From 406dc2fb2d1e657db2d7235885722dd86d07ea08 Mon Sep 17 00:00:00 2001 From: zvecr Date: Sat, 2 May 2020 22:44:36 +0100 Subject: [PATCH 001/930] Move encoder_read to common location --- quantum/quantum.c | 11 ----------- quantum/split_common/matrix.c | 8 +------- tmk_core/common/keyboard.c | 10 ++++++++++ 3 files changed, 11 insertions(+), 18 deletions(-) diff --git a/quantum/quantum.c b/quantum/quantum.c index 2053a1a5f479..a780ed43d0db 100644 --- a/quantum/quantum.c +++ b/quantum/quantum.c @@ -46,10 +46,6 @@ extern backlight_config_t backlight_config; # include "haptic.h" #endif -#ifdef ENCODER_ENABLE -# include "encoder.h" -#endif - #ifdef AUDIO_ENABLE # ifndef GOODBYE_SONG # define GOODBYE_SONG SONG(GOODBYE_SOUND) @@ -618,9 +614,6 @@ void matrix_init_quantum() { #ifdef RGB_MATRIX_ENABLE rgb_matrix_init(); #endif -#ifdef ENCODER_ENABLE - encoder_init(); -#endif #if defined(UNICODE_ENABLE) || defined(UNICODEMAP_ENABLE) || defined(UCIS_ENABLE) unicode_input_mode_init(); #endif @@ -658,10 +651,6 @@ void matrix_scan_quantum() { rgb_matrix_task(); #endif -#ifdef ENCODER_ENABLE - encoder_read(); -#endif - #ifdef WPM_ENABLE decay_wpm(); #endif diff --git a/quantum/split_common/matrix.c b/quantum/split_common/matrix.c index 8b91f8ca8342..95ee2433ad31 100644 --- a/quantum/split_common/matrix.c +++ b/quantum/split_common/matrix.c @@ -24,10 +24,6 @@ along with this program. If not, see . #include "config.h" #include "transport.h" -#ifdef ENCODER_ENABLE -# include "encoder.h" -#endif - #define ERROR_DISCONNECT_COUNT 5 #define ROWS_PER_HAND (MATRIX_ROWS / 2) @@ -255,9 +251,7 @@ void matrix_post_scan(void) { matrix_scan_quantum(); } else { transport_slave(matrix + thisHand); -#ifdef ENCODER_ENABLE - encoder_read(); -#endif + matrix_slave_scan_user(); } } diff --git a/tmk_core/common/keyboard.c b/tmk_core/common/keyboard.c index a767d9c8773e..200b1e8722ce 100644 --- a/tmk_core/common/keyboard.c +++ b/tmk_core/common/keyboard.c @@ -53,6 +53,9 @@ along with this program. If not, see . #ifdef RGBLIGHT_ENABLE # include "rgblight.h" #endif +#ifdef ENCODER_ENABLE +# include "encoder.h" +#endif #ifdef STENO_ENABLE # include "process_steno.h" #endif @@ -249,6 +252,9 @@ void keyboard_init(void) { #ifdef RGBLIGHT_ENABLE rgblight_init(); #endif +#ifdef ENCODER_ENABLE + encoder_init(); +#endif #ifdef STENO_ENABLE steno_init(); #endif @@ -345,6 +351,10 @@ void keyboard_task(void) { # endif #endif +#ifdef ENCODER_ENABLE + encoder_read(); +#endif + #ifdef QWIIC_ENABLE qwiic_task(); #endif From 6c2008c6883e34aa921223bc841636ee6ae336ad Mon Sep 17 00:00:00 2001 From: Stefano Date: Tue, 19 May 2020 22:03:23 +0200 Subject: [PATCH 002/930] Gherkin 26, 27, 28, 30 keys compatibility (#9136) * Gherkin 26, 27, 28, 30 compatibility * Update readme.md Co-authored-by: stevexyz --- .../gherkin/keymaps/stevexyz/keymap.c | 100 ++++++++---------- .../gherkin/keymaps/stevexyz/readme.md | 14 ++- 2 files changed, 55 insertions(+), 59 deletions(-) diff --git a/keyboards/40percentclub/gherkin/keymaps/stevexyz/keymap.c b/keyboards/40percentclub/gherkin/keymaps/stevexyz/keymap.c index 188c1cd5d84a..72df0675bec2 100644 --- a/keyboards/40percentclub/gherkin/keymaps/stevexyz/keymap.c +++ b/keyboards/40percentclub/gherkin/keymaps/stevexyz/keymap.c @@ -16,7 +16,8 @@ /* - * see jj40/stevexyz for more information + * The 25% SuperMicro keyboard: a pure - full features - "Alpha 26" keymap on Gherkin, compatible also with 28 and 30 keys layouts + * See https://github.com/stevexyz/qmk_firmware/blob/master/keyboards/40percentclub/gherkin/keymaps/stevexyz/readme.md for more information */ @@ -56,7 +57,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * ,---------------------------------------------------------------------. * | | | | | | | | | | | * | Q | W | E | R | T | Y | U | I | O | P | - * | ____ | ____ | ____ | ____ | ____ | ____ | ____ | ____ | ____ | ____ | + * | ____ | ____ | ____ | ____ | ____ | FnNav|NumSym| Alt | Ctrl | Shift| * |------+------+------+------+-------------+------+------+------+------| * | | | | | | | | | | | * | A | S | D | F | G | H | J | K | L | Enter| @@ -68,83 +69,73 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * '-------------------------------------------------------' */ [LAYER_HOME] = LAYOUT_ortho_3x10( - LT(LAYER_ARROWPAD, KC_Q), LT(LAYER_NUMPAD, KC_W), LT(LAYER_MEDIAPAD, KC_E), KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, - MT(MOD_LSFT, KC_A), LT(LAYER_FUNC, KC_S), LT(LAYER_NUMSYM, KC_D), MT(MOD_RALT, KC_F), MT(MOD_LGUI, KC_G), MT(MOD_RGUI, KC_H), MT(MOD_RALT, KC_J), LT(LAYER_FUNC, KC_K), LT(LAYER_NUMSYM, KC_L), MT(MOD_RSFT, KC_ENT), - XXXXXXX, MT(MOD_LCTL, KC_Z), MT(MOD_LALT, KC_X), LT(LAYER_FUNC, KC_C), LT(LAYER_NUMSYM, KC_V), MT(MOD_LSFT, KC_B), MT(MOD_LALT, KC_N), MT(MOD_RCTL, KC_M), MT(MOD_RSFT, KC_SPC), XXXXXXX ), + LT(LAYER_ARROWPAD, KC_Q), LT(LAYER_NUMPAD, KC_W), LT(LAYER_MEDIAPAD, KC_E), KC_R, KC_T, LT(LAYER_FUNC, KC_Y), LT(LAYER_NUMSYM, KC_U), MT(MOD_LALT, KC_I), MT(MOD_RCTL, KC_O), MT(MOD_RSFT, KC_P), + MT(MOD_LSFT, KC_A), LT(LAYER_FUNC, KC_S), LT(LAYER_NUMSYM, KC_D), MT(MOD_RALT, KC_F), MT(MOD_LGUI, KC_G), MT(MOD_RGUI, KC_H), MT(MOD_RALT, KC_J), LT(LAYER_FUNC, KC_K), LT(LAYER_NUMSYM, KC_L), MT(MOD_RSFT, KC_ENT), + KC_DOWN, MT(MOD_LCTL, KC_Z), MT(MOD_LALT, KC_X), LT(LAYER_FUNC, KC_C), LT(LAYER_NUMSYM, KC_V), MT(MOD_LSFT, KC_B), MT(MOD_LALT, KC_N), MT(MOD_RCTL, KC_M), MT(MOD_RSFT, KC_SPC), KC_BSPC + ), /* Function and Navigation Layer * ,---------------------------------------------------------------------. * | | | | | | | | | | | * | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | - * | ____ | ____ | ____ | ____ | ____ | ____ | ____ | ____ | ____ | ____ | + * | ____ | ____ | ____ | ____ | ____ | ____ |SysLay| Alt | Ctrl | Shift| * |------+------+------+------+-------------+------+------+------+------| * | | | | | | | | | | | - * | ESC | Home | PgDn | PgUp | End | Left | Down | Up | Right| Baksp| + * | ESC | Home | PgDn | PgUp | End | Left | Down | Up | Right|Backsp| * | Shift| ____ |SysLay| AltGr| OSkey| OSkey| AltGr| ____ |SysLay| Shift| * '------+------+------+------+------+------|------+------+------+------' * | | | | | | | | | - * | ____ | ____ | | ____ | ____ | ____ | ____ | ____ | + * | F11 | F12 | | Space|PrnScr|ScrLck|Pause |Backsp| * | Ctrl | Alt | ____ |SysLay| Shift| Alt | Ctrl | Shift| * '-------------------------------------------------------' */ [LAYER_FUNC] = LAYOUT_ortho_3x10( - KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, - MT(MOD_LSFT, KC_ESC), KC_HOME, LT(LAYER_SYST, KC_PGDN), MT(MOD_RALT, KC_PGUP), MT(MOD_LGUI, KC_END), MT(MOD_RGUI, KC_LEFT), MT(MOD_RALT, KC_DOWN), KC_UP, LT(LAYER_SYST, KC_RGHT), MT(MOD_RSFT, KC_BSPC), - XXXXXXX, KC_LCTL, KC_LALT, KC_NO, MO(LAYER_SYST), KC_LSFT, KC_LALT, KC_RCTL, MT(MOD_RSFT, KC_SPC), XXXXXXX ), + KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, LT(LAYER_SYST, KC_F7), MT(MOD_LALT, KC_F8), MT(MOD_RCTL,KC_F9), MT(MOD_RSFT, KC_F10), + MT(MOD_LSFT, KC_ESC), KC_HOME, LT(LAYER_SYST, KC_PGDN), MT(MOD_RALT, KC_PGUP), MT(MOD_LGUI, KC_END), MT(MOD_RGUI, KC_LEFT), MT(MOD_RALT, KC_DOWN), KC_UP, LT(LAYER_SYST, KC_RGHT), MT(MOD_RSFT, KC_BSPC), + KC_DOWN, MT(KC_LCTL, KC_F11), MT(KC_LALT, KC_F12), KC_NO, LT(LAYER_SYST, KC_SPACE), MT(KC_LSFT, KC_PSCR), MT(KC_LALT, KC_SLCK), MT(KC_RCTL, KC_PAUS), MT(MOD_RSFT, KC_BSPC), KC_UP + ), /* Number and Symbols Layer * ,---------------------------------------------------------------------. * | ! | @ | # | $ | % | ^ | & | * | ( | ) | * | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - * | ____ | ____ | ____ | ____ | ____ | ____ | ____ | ____ | ____ | ____ | + * | ____ | ____ | ____ | ____ | ____ |SysLay| ____ | Alt | Ctrl | Shift| * |------+------+------+------+-------------+------+------+------+------| * | | ~ | _ | + | { | } | | | : | " | | * | TAB | ` | - | = | [ | ] | \ | ; | ' | Del | * | Shift|SysLay| ____ | AltGr| OSkey| OSkey| AltGr|SysLay| ____ | Shift| * ' -----+------+------+------+------+------|------+------+------+------' * | | | | | < | > | ? | | - * | ____ | ____ | ____ | | , | . | / | ____ | + * |BackSp| Del | Enter| | , | . | / | Enter| * | Ctrl | Alt |SysLay| ____ | Shift| Alt | Ctrl | Shift| * '-------------------------------------------------------' */ [LAYER_NUMSYM] = LAYOUT_ortho_3x10( - KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, - MT(MOD_LSFT, KC_TAB), LT(LAYER_SYST, KC_GRV), KC_MINS, MT(MOD_RALT, KC_EQL), MT(MOD_LGUI, KC_LBRC), MT(MOD_RGUI, KC_RBRC), MT(MOD_RALT, KC_BSLS), LT(LAYER_SYST, KC_SCLN), KC_QUOT, MT(MOD_RSFT, KC_DEL), - XXXXXXX, KC_LCTL, KC_LALT, MO(LAYER_SYST), KC_NO, MT(MOD_LSFT, KC_COMM), MT(MOD_LALT, KC_DOT), MT(MOD_RCTL, KC_SLSH), MT(MOD_RSFT, KC_SPC), XXXXXXX ), + KC_1, KC_2, KC_3, KC_4, KC_5, LT(LAYER_SYST, KC_6), KC_7, MT(MOD_LALT, KC_8), MT(MOD_RCTL,KC_9), MT(MOD_RSFT, KC_0), + MT(MOD_LSFT, KC_TAB), LT(LAYER_SYST, KC_GRV), KC_MINS, MT(MOD_RALT, KC_EQL), MT(MOD_LGUI, KC_LBRC), MT(MOD_RGUI, KC_RBRC), MT(MOD_RALT, KC_BSLS), LT(LAYER_SYST, KC_SCLN), KC_QUOT, MT(MOD_RSFT, KC_DEL), + KC_LEFT, MT(KC_LCTL, KC_BSPC), MT(KC_LALT, KC_DEL), LT(LAYER_SYST, KC_ENT), KC_NO, MT(MOD_LSFT, KC_COMM), MT(MOD_LALT, KC_DOT), MT(MOD_RCTL, KC_SLSH), MT(MOD_RSFT, KC_ENT), KC_RGHT + ), /* System Layer * ,---------------------------------------------------------------------. * | | | | | | | | | | | - * | F11 | F12 | Play | Next |MsWhlU|MsBtn1|OSMenu|SysReq|MsBtn2|Backsp| - * | ____ | ____ | ____ | ____ | ____ | ____ | ____ | ____ | ____ | ____ | + * | Play | Stop | Prev | Next |MsBtn1|MsLeft|MSDown| MsUp |MsRigh|MsBtn2| + * | ____ | ____ | ____ | ____ | ____ | ____ | ____ | ____ | ____ | Shift| * |------+------+------+------+-------------+------+------+------+------| * | | | | | | | | | | | - * | Caps | Mute | Vol- | Vol+ |MsWhlD|MsLeft|MSDown| MsUp |MsRigh| Ins | - * | Shift| ____ | ____ | ____ | ____ | ____ | ____ | ____ | ____ | Shift| + * |Backsp| Mute | Vol- | Vol+ |MsWhlD| Left | Down | Up | Right|Backsp| + * | ____ | ____ | ____ | ____ | ____ | ____ | ____ | ____ | ____ | ____ | * '------+------+------+------+------+------|------+------+------+------' * | | | | | | | | | - * | ____ | ____ | | |PrnScr|ScrLck|Pause | ____ | - * | Ctrl | Alt | ____ | ____ | ____ | ____ | ____ | Shift| - * '-------------------------------------------------------' - * simplified view (for media and mouse there are dedicated layers) - * ,---------------------------------------------------------------------. - * | | | | | | | | | | | - * | F11 | F12 | | | | |OSMenu|SysReq| |Backsp| - * | ____ | ____ | ____ | ____ | ____ | ____ | ____ | ____ | ____ | ____ | - * |------+------+------+------+-------------+------+------+------+------| - * | | | | | | | | | | | - * | Caps | | | | | | | | | Ins | - * | Shift| ____ | ____ | ____ | ____ | ____ | ____ | ____ | ____ | Shift| - * '------+------+------+------+------+------|------+------+------+------+ - * | | | | | | | | | - * | | | | |PrnScr|ScrLck|Pause | | - * | Ctrl | Alt | ____ | ____ | ____ | ____ | ____ | Shift| + * | ____ | ____ | Enter| Space| Mute | Vol- | Vol+ | Space| + * | Ctrl | Alt | ____ | ____ | Shift| Alt | Ctrl | ____ | * '-------------------------------------------------------' */ [LAYER_SYST] = LAYOUT_ortho_3x10( - KC_F11, KC_F12, KC_MPLY, KC_MNXT, KC_MS_WH_UP, KC_MS_BTN1, KC_APP, KC_SYSREQ, KC_MS_BTN2, KC_BSPC, - MT(MOD_LSFT, KC_CAPS), KC_MUTE, KC_VOLD, KC_VOLU, KC_MS_WH_DOWN, KC_MS_LEFT, KC_MS_DOWN, KC_MS_UP, KC_MS_RIGHT, MT(MOD_RSFT, KC_INS), - XXXXXXX, KC_LCTL, KC_LALT, KC_NO, KC_NO, KC_PSCR, KC_SLCK, KC_PAUS, MT(MOD_RSFT, KC_SPC), XXXXXXX ), + KC_MPLY, KC_STOP, KC_MPRV, KC_MNXT, KC_MS_BTN1, KC_MS_LEFT, KC_MS_DOWN, KC_MS_UP, KC_MS_RIGHT, MT(MOD_RSFT, KC_MS_BTN2), + KC_BSPC, KC_DEL, KC_PGDN, KC_PGUP, KC_APP, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_BSPC, + KC_PGDN, MT(KC_LCTL, KC_CAPS), MT(KC_LALT, KC_INS), KC_ENT, KC_SPC, MT(MOD_RSFT, KC_MUTE), MT(MOD_LALT, KC_VOLD), MT(MOD_RCTL, KC_VOLU), KC_SPC, KC_PGUP + ), /* ArrowPad (mod su Q) /------mouse-------\ /-----cursor-------\ * ,---------------------------------------------------------------------. @@ -157,23 +148,24 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | Shift| ____ | ____ | ____ | ____ | ____ | ____ | ____ | ____ | ____ | * '------+------+------+------+------+------|------+------+------+------' * | | | | | | | | | - * | | |MsWhlU|MsDown|MsWhlD| End | Down | PdDn | + * | | |MsWhlU|MsDown|MsWhlD| End | PgDn | PgDn | * | Ctrl | Alt | ____ | ____ | ____ | ____ | ____ | ____ | * '-------------------------------------------------------' */ [LAYER_ARROWPAD] = LAYOUT_ortho_3x10( - KC_NO, KC_NO, KC_NO, KC_MS_BTN1, KC_MS_UP, KC_MS_BTN2, KC_HOME, KC_UP, KC_PGUP, KC_BSPC, - KC_LSFT, KC_NO, KC_NO, KC_MS_LEFT, KC_MS_DOWN, KC_MS_RIGHT, KC_LEFT, KC_DOWN, KC_RIGHT, KC_ENT, - XXXXXXX, KC_LCTL, KC_LALT, KC_MS_WH_UP, KC_MS_DOWN, KC_MS_WH_DOWN, KC_END, KC_DOWN, KC_PGDN, XXXXXXX ), + KC_NO, KC_NO, KC_NO, KC_MS_BTN1, KC_MS_UP, KC_MS_BTN2, KC_HOME, KC_UP, KC_PGUP, KC_BSPC, + KC_LSFT, KC_NO, KC_NO, KC_MS_LEFT, KC_MS_DOWN, KC_MS_RIGHT, KC_LEFT, KC_DOWN, KC_RIGHT, KC_ENT, + XXXXXXX, KC_LCTL, KC_LALT, KC_MS_WH_UP, KC_MS_DOWN, KC_MS_WH_DOWN, KC_END, KC_PGDN, KC_PGDN, XXXXXXX + ), /* NumPad (mod su W) * ,---------------------------------------------------------------------. * | | | | | | | | | | | - * | | | / | * | - |Backsp| 7 | 8 | 9 | 0 | + * | | | 3 | * | - |Backsp| 7 | 8 | 9 | 0 | * | ____ | ____ | ____ | ____ | ____ | ____ | ____ | ____ | ____ | ____ | * |------+------+------+------+-------------+------+------+------+------| * | | | | | | | | | | | - * | | | | = | + | . | 4 | 5 | 6 | Enter| + * | | | / | = | + | . | 4 | 5 | 6 | Enter| * | Shift| ____ | ____ | ____ | ____ | ____ | ____ | ____ | ____ | ____ | * '------+------+------+------+------+------|------+------+------+------' * | | | | | | | | | @@ -182,9 +174,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * '-------------------------------------------------------' */ [LAYER_NUMPAD] = LAYOUT_ortho_3x10( - KC_NO, KC_NO, KC_KP_SLASH, KC_KP_ASTERISK, KC_KP_MINUS, KC_BSPC, KC_7, KC_8, KC_9, KC_0, - KC_LSFT, KC_NO, KC_NO, KC_KP_EQUAL, KC_KP_PLUS, KC_DOT, KC_4, KC_5, KC_6, KC_ENT, - XXXXXXX, KC_LCTL, KC_LALT, KC_NO, KC_TAB, KC_COMM, KC_1, KC_2, KC_3, XXXXXXX ), + KC_NO, KC_NO, KC_3, KC_KP_ASTERISK, KC_KP_MINUS, KC_BSPC, KC_7, KC_8, KC_9, KC_0, + KC_LSFT, KC_NO, KC_KP_SLASH, KC_KP_EQUAL, KC_KP_PLUS, KC_DOT, KC_4, KC_5, KC_6, KC_ENT, + XXXXXXX, KC_LCTL, KC_LALT, KC_NO, KC_TAB, KC_COMM, KC_1, KC_2, KC_3, XXXXXXX + ), /* MediaPad (mod su E) * ,---------------------------------------------------------------------. @@ -202,9 +195,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * '-------------------------------------------------------' */ [LAYER_MEDIAPAD] = LAYOUT_ortho_3x10( - KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_VOLU, KC_NO, KC_NO, - KC_LSFT, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_MPRV, KC_MPLY, KC_MNXT, KC_NO, - XXXXXXX, KC_LCTL, KC_LALT, KC_NO, KC_NO, KC_NO, KC_MUTE, KC_VOLD, KC_NO, XXXXXXX ), + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_VOLU, KC_NO, KC_NO, + KC_LSFT, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_MPRV, KC_MPLY, KC_MNXT, KC_NO, + XXXXXXX, KC_LCTL, KC_LALT, KC_NO, KC_NO, KC_NO, KC_MUTE, KC_VOLD, KC_NO, XXXXXXX + ), }; @@ -225,15 +219,13 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { case CK_TRIPLEZERO: if (record->event.pressed) { SEND_STRING("000"); - } // else { when released... } + } // else { when released } break; } return true; }; void keyboard_pre_init_user(void) { - // Call the keyboard pre init code. - // Set our LED pins as output setPinOutput(D5); setPinOutput(B0); diff --git a/keyboards/40percentclub/gherkin/keymaps/stevexyz/readme.md b/keyboards/40percentclub/gherkin/keymaps/stevexyz/readme.md index 40d2bc22d57a..8fe7a60679e2 100644 --- a/keyboards/40percentclub/gherkin/keymaps/stevexyz/readme.md +++ b/keyboards/40percentclub/gherkin/keymaps/stevexyz/readme.md @@ -1,11 +1,15 @@ -# gherkin super micro edition +# The 25% SuperMicro keyboard +## A full featured keymap on Gherkin compatible with a pure "Alpha 26" layout -With this configuration the "28" layout first experimented on the plank-like jj40 is being ported to a more proper board, leaving just two keys not used. +With this configuration the "SuperMicro" layout first experimented on the plank-like jj40 is being ported to a more proper board, and with the last changes, this layout has been made compatible also to a "26 keys" one. So you can now choose to leave all 30 keys on the keyboard, or remove the two on the bottom line corners to have the "old" and comfortable 28 keys layout, or remove also space and enter to have the simplest "pure alpha" one! And even the intermediate 27 keys one is an interesting compatible option! -For more information please have a look at https://github.com/stevexyz/qmk_firmware/blob/master/keyboards/jj40/keymaps/stevexyz/readme.md +This keymap is for a generic usage, trying to avoid as much gimmick as possible (considering the number of keys) and retain muscle memory from people used to the standard Qwerty 104 keys one. Functions and numbers (with related symbols) are on the first row as expected; other examples of design coherency include the symbols on the central row laid out in the same order as you'll find on a standard full keyboard, and the cursor movement aligned to the common unix vi standard ("hjkl", and for symmetry "sdfg" for home/pgdn/pgup/end). I've personally used this layout for months on my home PC in parallel to my portable work PC. -The image below explain the main layers. In addition to them with q, w and e there are three specific dedicated layers for cursors/mouse, numpad and media. -![layers](https://raw.githubusercontent.com/stevexyz/qmk_firmware/master/keyboards/40percentclub/gherkin/keymaps/stevexyz/layers.jpeg) +Relying just on the alphabetic keys this layout can be also very easily ported and tested on any qmk supported keyboard (ok, butterstick excluded). + +The image below explains the main layers activated respectively with F, N or both modifiers pressed together. In addition to them there are available 5 layers that can be personalized as needed or completely removed without losing any functionality; three of them are currently setup in the default keymap for cursors/mouse, numpad and media (activated with q, w and e respectively). + +![layers](https://github.com/stevexyz/qmk_firmware/blob/master/keyboards/40percentclub/gherkin/keymaps/stevexyz/newlayout26272830.jpg) ![prototype](https://github.com/stevexyz/qmk_firmware/blob/master/keyboards/40percentclub/gherkin/keymaps/stevexyz/gherkin28.jpeg) From 58e3b01f37b35cdf77fb44f14765b11215104b24 Mon Sep 17 00:00:00 2001 From: TerryMathews Date: Tue, 19 May 2020 16:15:16 -0400 Subject: [PATCH 003/930] Candybar: VIA support for lefty and righty (#9066) * Candybar: VIA support for lefty and righty * Update keyboards/candybar/lefty/config.h Co-authored-by: Ryan * Update keyboards/candybar/righty/config.h Co-authored-by: Ryan * Update keyboards/candybar/lefty/keymaps/via/keymap.c Co-authored-by: Joel Challis Co-authored-by: Ryan Co-authored-by: Joel Challis --- keyboards/candybar/lefty/config.h | 4 +- keyboards/candybar/lefty/keymaps/via/keymap.c | 38 +++++++++++++++++++ keyboards/candybar/lefty/keymaps/via/rules.mk | 1 + keyboards/candybar/lefty/rules.mk | 2 +- keyboards/candybar/righty/config.h | 4 +- .../candybar/righty/keymaps/via/keymap.c | 38 +++++++++++++++++++ .../candybar/righty/keymaps/via/rules.mk | 1 + keyboards/candybar/righty/rules.mk | 2 +- 8 files changed, 84 insertions(+), 6 deletions(-) create mode 100644 keyboards/candybar/lefty/keymaps/via/keymap.c create mode 100644 keyboards/candybar/lefty/keymaps/via/rules.mk create mode 100644 keyboards/candybar/righty/keymaps/via/keymap.c create mode 100644 keyboards/candybar/righty/keymaps/via/rules.mk diff --git a/keyboards/candybar/lefty/config.h b/keyboards/candybar/lefty/config.h index c1539671301b..e8a1f00815ea 100644 --- a/keyboards/candybar/lefty/config.h +++ b/keyboards/candybar/lefty/config.h @@ -19,8 +19,8 @@ #include "config_common.h" /* USB Device descriptor parameter */ -#define VENDOR_ID 0xFEED -#define PRODUCT_ID 0x6060 +#define VENDOR_ID 0x544B //TK +#define PRODUCT_ID 0x0003 #define DEVICE_VER 0x0006 #define MANUFACTURER The Key Company #define PRODUCT Candybar diff --git a/keyboards/candybar/lefty/keymaps/via/keymap.c b/keyboards/candybar/lefty/keymaps/via/keymap.c new file mode 100644 index 000000000000..153fd99c507e --- /dev/null +++ b/keyboards/candybar/lefty/keymaps/via/keymap.c @@ -0,0 +1,38 @@ +/* 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 + +#define _BL 0 +#define _FL 1 + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* Keymap _BL: Base Layer (Default Layer) + */ +[_BL] = LAYOUT( + KC_P7 , KC_P8, KC_P9 , KC_PAST, 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_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_SCLN, KC_ENT , \ + KC_P1 , KC_P2, KC_P3 , KC_PPLS, 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(_FL), KC_P0, KC_PDOT, KC_PENT, KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_SPC , KC_BSPC, KC_APP , KC_LEFT, KC_DOWN, KC_RGHT), + + /* Keymap _FL: Function Layer + */ + [_FL] = LAYOUT( + KC_P7 , KC_P8, KC_P9 , KC_VOLU, RESET , KC_Q , KC_W , KC_E, KC_R , KC_T , KC_Y, KC_U , KC_I , KC_LBRC, KC_RBRC, KC_INS , KC_BSPC , \ + KC_P4 , KC_P5, KC_P6 , KC_VOLD, KC_TAB , KC_A , KC_SLCK, KC_D, KC_F , KC_G , KC_H, KC_J , KC_K , KC_L , KC_QUOT, KC_BSLS , \ + KC_P1 , KC_P2, KC_P3 , KC_PEQL, KC_LSFT, KC_Z , KC_X, KC_CAPS, KC_V , KC_B, KC_NLCK, KC_M , KC_COMM, KC_DOT , KC_SLSH, KC_PGUP , \ + KC_END, KC_P0, KC_PDOT, KC_PENT, KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_SPC , KC_BSPC, KC_APP , MO(_FL), KC_HOME, KC_PGDN), +}; diff --git a/keyboards/candybar/lefty/keymaps/via/rules.mk b/keyboards/candybar/lefty/keymaps/via/rules.mk new file mode 100644 index 000000000000..036bd6d1c3ec --- /dev/null +++ b/keyboards/candybar/lefty/keymaps/via/rules.mk @@ -0,0 +1 @@ +VIA_ENABLE = yes \ No newline at end of file diff --git a/keyboards/candybar/lefty/rules.mk b/keyboards/candybar/lefty/rules.mk index cb1b832886a0..52ef91c47ff3 100644 --- a/keyboards/candybar/lefty/rules.mk +++ b/keyboards/candybar/lefty/rules.mk @@ -7,7 +7,7 @@ MCU = STM32F072 # EXTRAFLAGS+=-flto LINK_TIME_OPTIMIZATION_ENABLE = yes BACKLIGHT_ENABLE = no -BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # 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 diff --git a/keyboards/candybar/righty/config.h b/keyboards/candybar/righty/config.h index c1539671301b..500453784657 100644 --- a/keyboards/candybar/righty/config.h +++ b/keyboards/candybar/righty/config.h @@ -19,8 +19,8 @@ #include "config_common.h" /* USB Device descriptor parameter */ -#define VENDOR_ID 0xFEED -#define PRODUCT_ID 0x6060 +#define VENDOR_ID 0x544B //TK +#define PRODUCT_ID 0x0002 #define DEVICE_VER 0x0006 #define MANUFACTURER The Key Company #define PRODUCT Candybar diff --git a/keyboards/candybar/righty/keymaps/via/keymap.c b/keyboards/candybar/righty/keymaps/via/keymap.c new file mode 100644 index 000000000000..8f4cc08c7467 --- /dev/null +++ b/keyboards/candybar/righty/keymaps/via/keymap.c @@ -0,0 +1,38 @@ +/* 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 + +#define _BL 0 +#define _FL 1 + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* Keymap _BL: Base Layer (Default Layer) + */ +[_BL] = 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_P7,KC_P8,KC_P9,KC_PAST, \ + 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_P4,KC_P5,KC_P6,KC_PMNS, \ + 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_P1,KC_P2,KC_P3,KC_PPLS, \ + KC_LCTL,KC_LGUI,KC_LALT,KC_SPC,KC_SPC,KC_BSPC,KC_APP,MO(_FL),KC_LEFT,KC_DOWN,KC_RGHT,KC_P0,KC_PDOT,KC_PENT), + + /* Keymap _FL: Function Layer + */ +[_FL] = LAYOUT( + RESET,KC_Q,KC_W,KC_E,KC_R,KC_T,KC_Y,KC_U,KC_I,KC_LBRC,KC_RBRC,KC_INS,KC_BSPC,KC_P7,KC_P8,KC_P9,KC_VOLU, \ + KC_TAB,KC_A,KC_SLCK,KC_D,KC_F,KC_G,KC_H,KC_J,KC_K,KC_L,KC_QUOT,KC_BSLS,KC_P4,KC_P5,KC_P6,KC_VOLD, \ + KC_LSFT,KC_Z,KC_X,KC_CAPS,KC_V,KC_B,KC_NLCK,KC_M,KC_COMM,KC_DOT,KC_SLSH,KC_PGUP,KC_P1,KC_P2,KC_P3,KC_PEQL, \ + KC_LCTL,KC_LGUI,KC_LALT,KC_SPC,KC_SPC,KC_BSPC,KC_APP,MO(_FL),KC_HOME,KC_PGDN,KC_END,KC_P0,KC_PDOT,KC_PENT), +}; diff --git a/keyboards/candybar/righty/keymaps/via/rules.mk b/keyboards/candybar/righty/keymaps/via/rules.mk new file mode 100644 index 000000000000..036bd6d1c3ec --- /dev/null +++ b/keyboards/candybar/righty/keymaps/via/rules.mk @@ -0,0 +1 @@ +VIA_ENABLE = yes \ No newline at end of file diff --git a/keyboards/candybar/righty/rules.mk b/keyboards/candybar/righty/rules.mk index cb1b832886a0..52ef91c47ff3 100644 --- a/keyboards/candybar/righty/rules.mk +++ b/keyboards/candybar/righty/rules.mk @@ -7,7 +7,7 @@ MCU = STM32F072 # EXTRAFLAGS+=-flto LINK_TIME_OPTIMIZATION_ENABLE = yes BACKLIGHT_ENABLE = no -BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # 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 From 494b34b63f84617ddc56ff6dc0395505a33eb24e Mon Sep 17 00:00:00 2001 From: Shadowtrance Date: Wed, 20 May 2020 06:28:55 +1000 Subject: [PATCH 004/930] Add Via support to the YMD09 (#9108) * Add Via support to the YMD09 * Update keyboards/ymdk/ymd09/config.h Co-authored-by: Ryan * Update keyboards/ymdk/ymd09/keymaps/via/rules.mk Co-authored-by: Ryan Co-authored-by: Ryan --- keyboards/ymdk/ymd09/config.h | 4 ++-- keyboards/ymdk/ymd09/keymaps/via/keymap.c | 20 ++++++++++++++++++++ keyboards/ymdk/ymd09/keymaps/via/rules.mk | 1 + keyboards/ymdk/ymd09/rules.mk | 1 + 4 files changed, 24 insertions(+), 2 deletions(-) create mode 100644 keyboards/ymdk/ymd09/keymaps/via/keymap.c create mode 100644 keyboards/ymdk/ymd09/keymaps/via/rules.mk diff --git a/keyboards/ymdk/ymd09/config.h b/keyboards/ymdk/ymd09/config.h index 372046b8bc40..8b34a98363e2 100644 --- a/keyboards/ymdk/ymd09/config.h +++ b/keyboards/ymdk/ymd09/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 0x0909 +#define VENDOR_ID 0x594D // "YM" +#define PRODUCT_ID 0x4409 // "D" + 09 #define DEVICE_VER 0x0001 #define MANUFACTURER YMDK #define PRODUCT YMD09 diff --git a/keyboards/ymdk/ymd09/keymaps/via/keymap.c b/keyboards/ymdk/ymd09/keymaps/via/keymap.c new file mode 100644 index 000000000000..e84b587a3617 --- /dev/null +++ b/keyboards/ymdk/ymd09/keymaps/via/keymap.c @@ -0,0 +1,20 @@ +#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, RESET, RGB_SAI, + RGB_HUD, RGB_VAD, RGB_SAD), + + [2] = LAYOUT(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), +}; diff --git a/keyboards/ymdk/ymd09/keymaps/via/rules.mk b/keyboards/ymdk/ymd09/keymaps/via/rules.mk new file mode 100644 index 000000000000..1e5b99807cb7 --- /dev/null +++ b/keyboards/ymdk/ymd09/keymaps/via/rules.mk @@ -0,0 +1 @@ +VIA_ENABLE = yes diff --git a/keyboards/ymdk/ymd09/rules.mk b/keyboards/ymdk/ymd09/rules.mk index 171e9b1fcb3e..be1811366e3c 100644 --- a/keyboards/ymdk/ymd09/rules.mk +++ b/keyboards/ymdk/ymd09/rules.mk @@ -30,3 +30,4 @@ BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches HD44780_ENABLE = no # Enable support for HD44780 based LCDs +LTO_ENABLE = yes # reduce firmware size From 209942366b7da264d349c37ac6f4f69a3484b526 Mon Sep 17 00:00:00 2001 From: artjomsR Date: Tue, 19 May 2020 22:05:32 +0100 Subject: [PATCH 005/930] Art userspace (#9068) * added git codes * started git layer * finished structure for git layer. MOD: replaced mouse with mod keys on right hand * layout changing layer * mod enter. default qwerty layer. removed mods on number layer * workman layout. git log, show. blank enter and bsspace * config layer. toggleable ctrl/alt for OS * removed keymap comments * strings and combos layers. sarcasm and ctrl_ctv. RGB configs * reintroduced enter and bspace. delete backspace as a function. git push -u and checkout -b * string macros * OS specific home/end * OS mac & win keys. N delete global backspace * refactored backspace functions * ctrl lctv macro * base layer toggle fix * whitespace * BS + L for FF and chrome * replaced 1 keycode with userspace * added userspace config * remove comments * add another keycode with a variable * moved all keymaps and codes to common file * ctrl z mod * removed ctrl z * sipmlified OS functions * moved is_win to keyboard level * added mac alt tab * added ctrl tab in mac + clean up variables in art.h * tild string macro. added mac left/right + home/end * mac ctrl backspace * enum layers for default layout * added ergodone keymap * ergodone compiles * clean up * clean up * removed obsolete OS_HOME/END * removed var * added ctrl nav to split75 * ergodone clean up + caps lock fix 75 * fix mac ctrl alt on right handside. added mac alt tab left right * fix ergodone config override * fixed alt left right not working on mac * added OS ctr_alt * mac ctrl del. fix tild * simplified tild macro * git stash apply * send_string_remembering_lenght * shifted strings print * restored KC_BSPACE functionality * moved KC_BSPC * numpad layer on Fn * media lights * ergodone final clean up * ergodone GIT AND MEDIA layers * ergodone GIT LAYER switch * default behaviour for all modified keys on BASE layer * refactored logic for default keycodes * ergodone final layers * ctrl_cav for translation and ctrl_l fix * toggleable layer with numpad * comments * numpad layer * Update users/art/config.h Co-authored-by: Joel Challis * enable dynamic macros for split75 * git branch and develop/master * removed esc from Nav * ergodone: ctrl alt for shift layer * macros and right alt for ergodone * fix ergodone N_backspace not working on git layers * mac language switch with alt+shift * Update users/art/art.c Co-authored-by: Ryan * Update users/art/art.c Co-authored-by: Ryan * Update users/art/art.c Co-authored-by: Ryan * Update keyboards/ergodone/keymaps/art/keymap.c Co-authored-by: Ryan * Update users/art/art.h Co-authored-by: Ryan * flashing leds to indicate current os * using rshift on shifted layers Co-authored-by: Joel Challis Co-authored-by: Ryan --- keyboards/ergodone/keymaps/art/keymap.c | 446 +++++++++++++++++ .../wheatfield/split75/keymaps/art/keymap.c | 334 ++++++++----- .../wheatfield/split75/keymaps/art/rules.mk | 1 + .../split75/keymaps/default/keymap.c | 4 +- users/art/art.c | 464 ++++++++++++++++++ users/art/art.h | 69 +++ users/art/config.h | 4 + users/art/rules.mk | 1 + 8 files changed, 1194 insertions(+), 129 deletions(-) create mode 100644 keyboards/ergodone/keymaps/art/keymap.c create mode 100644 keyboards/wheatfield/split75/keymaps/art/rules.mk create mode 100644 users/art/art.c create mode 100644 users/art/art.h create mode 100644 users/art/config.h create mode 100644 users/art/rules.mk diff --git a/keyboards/ergodone/keymaps/art/keymap.c b/keyboards/ergodone/keymaps/art/keymap.c new file mode 100644 index 000000000000..7fcbd5b61574 --- /dev/null +++ b/keyboards/ergodone/keymaps/art/keymap.c @@ -0,0 +1,446 @@ +#include "art.h" +#include "sendstring_workman_zxcvm.h" + +bool is_win = true; + +enum custom_keycodes { + keyboardSpecificKeyCode = NEW_SAFE_RANGE //not used +}; + +void led_show_current_os(void) { + if (is_win) { + ergodox_right_led_1_on(); + wait_ms(50); + ergodox_right_led_1_off(); + wait_ms(50); + ergodox_right_led_1_on(); + wait_ms(50); + ergodox_right_led_1_off(); + wait_ms(50); + ergodox_right_led_1_on(); + wait_ms(50); + ergodox_right_led_1_off(); + wait_ms(50); + } else { + ergodox_right_led_3_on(); + wait_ms(50); + ergodox_right_led_3_off(); + wait_ms(50); + ergodox_right_led_3_on(); + wait_ms(50); + ergodox_right_led_3_off(); + wait_ms(50); + ergodox_right_led_3_on(); + wait_ms(50); + ergodox_right_led_3_off(); + wait_ms(50); + } +} + +void matrix_init_user(void) { + led_show_current_os(); +} + +void led_set_user(uint8_t usb_led) { + if (usb_led & (1< +#include -enum layer_names { - BASE, - QWERTY_MOD, - QWERTY, - WORKMAN, - MOD, - MEDIA +bool is_win = false; + +enum custom_keycodes { + keyboardSpecificKeyCode = NEW_SAFE_RANGE //not used atm }; +bool led_update_user(led_t led_state) { + writePin(CAPSLOCK_LED_PIN, led_state.caps_lock); + return false; +} + +void led_show_current_os(void) { + if (is_win) { + writePinHigh(NUMLOCK_LED_PIN); + wait_ms(50); + writePinLow(NUMLOCK_LED_PIN); + wait_ms(50); + writePinHigh(NUMLOCK_LED_PIN); + wait_ms(50); + writePinLow(NUMLOCK_LED_PIN); + wait_ms(50); + writePinHigh(NUMLOCK_LED_PIN); + wait_ms(50); + writePinLow(NUMLOCK_LED_PIN); + wait_ms(50); + } else { + writePinHigh(SCROLLLOCK_LED_PIN); + wait_ms(50); + writePinLow(SCROLLLOCK_LED_PIN); + wait_ms(50); + writePinHigh(SCROLLLOCK_LED_PIN); + wait_ms(50); + writePinLow(SCROLLLOCK_LED_PIN); + wait_ms(50); + writePinHigh(SCROLLLOCK_LED_PIN); + wait_ms(50); + writePinLow(SCROLLLOCK_LED_PIN); + wait_ms(50); + } +} + +void keyboard_pre_init_user(void) { + led_show_current_os(); + + layer_state_set_user(layer_state); +} + +layer_state_t layer_state_set_user(layer_state_t state) { + writePinLow(NUMLOCK_LED_PIN); + writePinLow(SCROLLLOCK_LED_PIN); + switch (get_highest_layer(state)) { + case MEDIA: + writePinHigh(SCROLLLOCK_LED_PIN); + case BASE: + writePinHigh(NUMLOCK_LED_PIN); + break; + case NUMPAD: + writePinHigh(SCROLLLOCK_LED_PIN); + break; + } + return state; +} + const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - /* Base ,-----------------------------------------. ,-----------------------------------------------------. + /* QWERTY ,-----------------------------------------. ,-----------------------------------------------------. * | ESC | F1 | F2 | F3 | F4 | F5 | F6 | | F7 | F8 | F9 | F10 | F11 | F12 |Print| Ins | Home| * ,-----------. |-----+-----+-----+-----+-----+-----+-----| |-----+-----+-----+-----+-----+-----+-----------+-----| * | 8 | 9 | | ~ | 1 | 2 | 3 | 4 | 5 | 6 | | 7 | 8 | 9 | 0 | - | = | Backspac | Del | @@ -22,44 +77,20 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |-----+-----| |-----------------------------------------. `-------------------------------------------------+-----| * | 2 | 3 | | Shift | Z | X | C | V | B | | N | M | , | . | / | Shift | Up | PgDn| * |-----+-----| |-----------------------------------------' ,-------------------------------------------+-----+-----| - * | 0 | 1 | | Ctrl | GUI | Alt | Space |Space| | Space | Alt |QW_ON| Ctrl | Left| Down|Right| - * `-----------' `---------------------------------------' `-------------------------------------------------------' - */ - [BASE] = LAYOUT( -//--------------------------------Left Hand-----------------------------------| |--------------------------------Right Hand------------------------------------------------ - 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_INS, KC_HOME, -KC_8, KC_9, KC_GRAVE, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINUS, KC_EQUAL, KC_BSPC, KC_DEL, -KC_6, KC_7, KC_TAB, KC_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_4, KC_5, 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_2, KC_3, 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_0, KC_1, KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_SPC, KC_SPC, KC_RALT, MO(QWERTY_MOD), KC_RCTL, KC_LEFT, KC_DOWN, KC_RIGHT - ), - - /*QWERT On + Mod ,-----------------------------------------. ,-----------------------------------------------------. - * | | | | | | | | | | | | | | | | | | - * ,-----------. |-----+-----+-----+-----+-----+-----+-----| |-----+-----+-----+-----+-----+-----+-----------+-----| - * | | | | | | | | | | | | | | | | | | | | - * |-----+-----| |-----------------------------------------' ,--------------------------------------------------+-----| - * | | | | |MePrv| Vol+|MeNxt| | | | | | | | | | | | | - * |-----+-----| |---------------------------------------. `--------------------------------------------------+-----| - * | | | | | | Vol-| | | | | | | | | | | | | - * |-----+-----| |-----------------------------------------. `-------------------------------------------------+-----| - * | | | | | | Vol0|MePly| | | | | | | | | | | | - * |-----+-----| |-----------------------------------------' ,-------------------------------------------+-----+-----| - * | | | | QWERTY | | | | | | | | | | | | | + * | 0 | 1 | | Ctrl | GUI | Alt |Spac/MEDIA | BSPC| | NAV | Alt | NAV | Ctrl | Left| Down|Right| * `-----------' `---------------------------------------' `-------------------------------------------------------' */ - [QWERTY_MOD] = LAYOUT( -//--------------------------------Left Hand-----------------------------------------------| |--------------------------------Right Hand------------------------------------------------ - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, -_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, -_______, _______, _______, KC_MPRV, KC_VOLU, KC_MNXT, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, -_______, _______, _______, _______, KC_VOLD, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, -_______, _______, _______, _______, KC_MUTE, KC_MPLY, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, -_______, _______, TO(QWERTY),_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + [QWERTY] = LAYOUT( +//--------------------------------Left Hand------------------------------------| |--------------------------------Right Hand------------------------------------------------ + 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, LT(CONFIG, KC_PSCR), KC_INS, KC_HOME, +KC_VOLD,KC_VOLU, KC_GRAVE, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINUS, KC_EQUAL, KC_BSPC, KC_DEL, +KC_MPRV,KC_MNXT, KC_TAB, KC_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_HOME,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_ENTER, KC_PGUP, +DYN_MACRO_PLAY1,MO(STRINGS),KC_LSFT,KC_Z,KC_X,KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, LT(GIT,KC_SLSH), KC_RSFT, KC_UP, KC_PGDN, +DYN_REC_STOP,DYN_REC_START1,KC_LCTL, KC_LGUI, KC_LALT, LT(MEDIA,KC_SPC), LT(COMBOS,KC_BSPC), LT(NAV, KC_ENTER), KC_RALT, MO(LAYOUT_CHG),KC_RCTL, KC_LEFT, KC_DOWN, KC_RIGHT ), - /* QWERTY ,-----------------------------------------. ,-----------------------------------------------------. + /* Base ,-----------------------------------------. ,-----------------------------------------------------. * | ESC | F1 | F2 | F3 | F4 | F5 | F6 | | F7 | F8 | F9 | F10 | F11 | F12 |Print| Ins | Home| * ,-----------. |-----+-----+-----+-----+-----+-----+-----| |-----+-----+-----+-----+-----+-----+-----------+-----| * | 8 | 9 | | ~ | 1 | 2 | 3 | 4 | 5 | 6 | | 7 | 8 | 9 | 0 | - | = | Backspac | Del | @@ -70,68 +101,140 @@ _______, _______, TO(QWERTY),_______, _______, _______, _______, * |-----+-----| |-----------------------------------------. `-------------------------------------------------+-----| * | 2 | 3 | | Shift | Z | X | C | V | B | | N | M | , | . | / | Shift | Up | PgDn| * |-----+-----| |-----------------------------------------' ,-------------------------------------------+-----+-----| - * | 0 | 1 | | Ctrl | GUI | Alt |Spac/MEDIA | BSPC| | MOD | Alt | MOD | Ctrl | Left| Down|Right| + * | 0 | 1 | | Ctrl | GUI | Alt | Space |Space| | Space | Alt |QW_ON| Ctrl | Left| Down|Right| * `-----------' `---------------------------------------' `-------------------------------------------------------' */ - [QWERTY] = LAYOUT( -//--------------------------------Left Hand------------------------------------| |--------------------------------Right Hand------------------------------------------------ - 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_INS, KC_HOME, -KC_8, KC_9, KC_GRAVE, KC_1, KC_2, LGUI_T(KC_3), LALT_T(KC_4), LCTL_T(KC_5), KC_6, KC_7, LCTL_T(KC_8), LALT_T(KC_9), LGUI_T(KC_0), KC_MINUS, KC_EQUAL, KC_BSPC, KC_DEL, + [BASE] = LAYOUT( +//--------------------------------Left Hand-----------------------------------| |--------------------------------Right Hand------------------------------------------------ + 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, LT(CONFIG, KC_PSCR), KC_INS, KC_HOME, +KC_8, KC_9, KC_GRAVE, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINUS, KC_EQUAL, KC_BSPC, KC_DEL, KC_6, KC_7, KC_TAB, KC_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_4, KC_5, 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_4, KC_5, 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_2, KC_3, 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_0, KC_1, KC_LCTL, KC_LGUI, KC_LALT, LT(MEDIA, KC_SPC),KC_BSPC, MO(MOD), KC_RALT, MO(MOD),KC_RCTL, KC_LEFT, KC_DOWN, KC_RIGHT +KC_0, KC_1, OS_CTRL, OS_WIN, KC_LALT, KC_SPC, KC_SPC, KC_SPC, KC_RALT, MO(QWERTY_MOD), KC_RCTL, KC_LEFT, KC_DOWN, KC_RIGHT ), - /* WORKMAN ,-----------------------------------------. ,-----------------------------------------------------. - * | | | | | | | | | | | | | | | | | | - * ,-----------. |-----+-----+-----+-----+-----+-----+-----| |-----+-----+-----+-----+-----+-----+-----------+-----| - * | | | | | | | | | | | | | | | | | | | | - * |-----+-----| |-----------------------------------------' ,--------------------------------------------------+-----| - * | | | | | | | | | | | | | | | | | | | | - * |-----+-----| |---------------------------------------. `--------------------------------------------------+-----| - * | | | | | | | | | | | | | | | | | | | - * |-----+-----| |-----------------------------------------. `-------------------------------------------------+-----| - * | | | | | | | | | | | | | | | | | | | - * |-----+-----| |-----------------------------------------' ,-------------------------------------------+-----+-----| - * | | | | BASE | | | | | | | | | | | | | - * `-----------' `---------------------------------------' `-------------------------------------------------------' - */ [WORKMAN] = LAYOUT( //--------------------------------Left Hand-----------------------------------------------| |--------------------------------Right Hand------------------------------------------------ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, -_______, _______, _______, KC_Q, KC_D, KC_R, KC_W, KC_B, KC_J, KC_F, KC_U, KC_P, KC_SCLN,_______,_______, _______, _______, -_______, _______, _______, KC_A, KC_S, KC_H, KC_T, KC_G, KC_Y, KC_N, KC_E, KC_O, KC_I, _______, _______, _______, -_______, _______, _______, KC_Z, KC_X, KC_C, KC_V, KC_M, KC_K, KC_L, KC_COMM,KC_DOT, KC_SLSH, _______, _______, _______, -_______, _______, TO(BASE), _______,_______,_______, _______, _______, _______, TO(QWERTY), _______, _______, _______, _______ +_______, _______, _______, KC_Q, KC_D, KC_R, KC_W, KC_B, KC_J, KC_F, KC_U, KC_P, KC_SCLN, _______, _______, _______, _______, +_______, _______, _______, KC_A, KC_S, KC_H, KC_T, KC_G, KC_Y, KC_N, KC_E, KC_O, KC_I, _______, _______, _______, +_______, _______, _______, KC_Z, KC_X, KC_C, KC_V, KC_M, KC_K, KC_L, KC_COMM, KC_DOT, _______, _______, _______, _______, +_______, _______, _______, _______, _______, _______, _______, _______, _______, TO(QWERTY), _______, _______, _______, _______ ), - /* MOD ,-----------------------------------------. ,-----------------------------------------------------. - * | | | | | | | | | | | | | | | | | | - * ,-----------. |-----+-----+-----+-----+-----+-----+-----| |-----+-----+-----+-----+-----+-----+-----------+-----| - * | | | | | | | | | | | | | | | | | | | | - * |-----+-----| |-----------------------------------------' ,--------------------------------------------------+-----| - * | | | | | | | | | | | | | | | | | | | | - * |-----+-----| |---------------------------------------. `--------------------------------------------------+-----| - * | | | | | | | | | | | | | | | | | | | - * |-----+-----| |-----------------------------------------. `-------------------------------------------------+-----| - * | | | | | | | | | | | | | | | | | | | - * |-----+-----| |-----------------------------------------' ,-------------------------------------------+-----+-----| - * | | | | BASE | | | | | | | | | | | | | - * `-----------' `---------------------------------------' `-------------------------------------------------------' - */ - [MOD] = LAYOUT( + [NAV] = LAYOUT( +//--------------------------------Left Hand-----------------------------------------------| |--------------------------------Right Hand------------------------------------------------ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, +KC_8, KC_9, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, +KC_6, KC_7, _______, _______, KC_HOME, KC_UP, KC_END, KC_PGUP, _______, _______, _______, _______, _______, _______, _______, _______, _______, +KC_4, KC_5, _______, _______, KC_LEFT, KC_DOWN, KC_RIGHT, KC_PGDOWN, _______, CTR_ALT, KC_RSFT, _______, _______, _______, _______, _______, +KC_2, KC_3, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, +KC_0, KC_1, _______, _______, _______, KC_DEL, _______, _______, _______, _______, _______, _______, _______, _______ + ), + + [MEDIA] = LAYOUT( +//--------------------------------Left Hand-----------------------------------------------| |--------------------------------Right Hand------------------------------------------------ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, +_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, +_______, _______, _______, KC_MPRV, KC_VOLU, KC_MNXT, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, +_______, _______, _______, _______, KC_VOLD, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, +_______, _______, _______, _______, KC_MUTE, KC_MPLY, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, +_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + + [COMBOS] = LAYOUT( //--------------------------------Left Hand-----------------------------------------------| |--------------------------------Right Hand------------------------------------------------ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, -_______, _______, _______, _______, KC_HOME, KC_UP, KC_END, KC_PGUP, _______, KC_MS_BTN1,KC_MS_UP, KC_MS_BTN3,KC_MS_BTN2,_______,_______, _______, _______, -_______, _______, _______, _______, KC_LEFT, KC_DOWN, KC_RIGHT, KC_PGDOWN, _______,KC_MS_LEFT,KC_MS_DOWN,KC_MS_RIGHT,KC_APPLICATION, _______, _______, _______, +_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, +_______, _______, _______, _______, SARCASM, _______, CTRL_CTV, _______, _______, _______, _______, _______, _______, _______, _______, _______, +_______, _______, _______, _______, _______, CTRL_CAV, _______, _______, _______, CTRL_LCTV, _______, _______, _______, _______, _______, _______, +_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + + [STRINGS] = LAYOUT( +//--------------------------------Left Hand-----------------------------------------------| |--------------------------------Right Hand------------------------------------------------ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, +_______, _______, TILD_BLOCK, PRESCRIPTION, _______, _______, FOURS, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, +_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, +_______, _______, _______, ADMINS, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, -_______, TO(WORKMAN),TO(BASE), KC_MS_ACCEL0,KC_MS_ACCEL1,KC_MS_ACCEL2, _______, _______, _______, _______, _______, _______, _______, _______ +_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + + [QWERTY_MOD] = LAYOUT( +//--------------------------------Left Hand-----------------------------------------------| |--------------------------------Right Hand------------------------------------------------ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, +_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, +_______, _______, _______, KC_MPRV, KC_VOLU, KC_MNXT, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, +_______, _______, _______, _______, KC_VOLD, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, +_______, _______, _______, _______, KC_MUTE, KC_MPLY, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, +_______, _______, TO(QWERTY),_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ ), - /* MEDIA ,-----------------------------------------. ,-----------------------------------------------------. + [LAYOUT_CHG] = LAYOUT( +//--------------------------------Left Hand-----------------------------------------------| |--------------------------------Right Hand------------------------------------------------ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, +_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, +_______, _______, _______, _______, CTL_ALT(KC_HOME), CTL_ALT(KC_UP), CTL_ALT(KC_END), CTL_ALT(KC_PGUP), _______, _______,_______, _______,_______,_______,_______, _______, _______, +_______, _______, _______, _______, CTL_ALT(KC_LEFT), CTL_ALT(KC_DOWN), CTL_ALT(KC_RIGHT), CTL_ALT(KC_PGDOWN), _______,_______,_______,_______,_______, _______, _______, _______, +_______, _______, TO(WORKMAN), _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, +TO(NUMPAD), TO(NUMPAD), TO(BASE), _______, _______, _______, CTL_ALT(KC_BSPC), KC_LSFT, _______, _______, _______, _______, _______, _______ + ), + + [CONFIG] = LAYOUT( +//--------------------------------Left Hand-----------------------------------------------| |--------------------------------Right Hand------------------------------------------------ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, +RGB_VAI, RGB_VAD, RGB_MODE_PLAIN, RGB_MODE_BREATHE, RGB_MODE_RAINBOW, RGB_MODE_SWIRL, RGB_MODE_SNAKE, RGB_MODE_KNIGHT, RGB_MODE_XMAS, RGB_MODE_GRADIENT, RGB_MODE_RGBTEST, XXXXXXX, XXXXXXX, _______, _______, _______, _______, +RGB_SAI, RGB_SAD, _______, _______, _______, _______, _______, _______, _______, _______, _______, TOG_OS, _______, _______, _______, _______, _______, +RGB_HUI, RGB_HUD, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, +RGB_MOD, RGB_RMOD, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, +RGB_TOG, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + + [NUMPAD] = LAYOUT( +//--------------------------------Left Hand-----------------------------------------------| |--------------------------------Right Hand------------------------------------------------ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, +KC_8, KC_9, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, +KC_6, KC_7, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, +KC_4, KC_5, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, +KC_2, KC_3, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, +KC_0, KC_1, _______, _______, _______, _______, _______, _______, _______, TO(QWERTY),_______, _______, _______, _______ + ), + + [GIT] = LAYOUT( +//--------------------------------Left Hand-----------------------------------------------| |--------------------------------Right Hand------------------------------------------------ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, +_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, +_______, _______, _______, _______, G_DIFF, G_RST, _______, G_BRCH, _______, G_FTCH, _______, G_P, _______, _______, _______, _______, _______, +_______, _______, _______, G_ADD, G_S, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, +_______, _______, _______, _______, _______, G_C, _______, G_MERG, _______, G_LOG, _______, G_DEV, _______, _______, _______, _______, +_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + + [GIT_C] = LAYOUT( +//--------------------------------Left Hand-----------------------------------------------| |--------------------------------Right Hand------------------------------------------------ + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, +XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, XXXXXXX, +XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, +XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, G_CHEC, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, G_COMM, 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_BSPC, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX + ), + + [GIT_S] = LAYOUT( +//--------------------------------Left Hand-----------------------------------------------| |--------------------------------Right Hand------------------------------------------------ + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, +XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, XXXXXXX, +XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, +XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, G_STSH, G_SHOW, G_STAT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, 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_BSPC, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX + ), + + /* ,-----------------------------------------. ,-----------------------------------------------------. * | | | | | | | | | | | | | | | | | | * ,-----------. |-----+-----+-----+-----+-----+-----+-----| |-----+-----+-----+-----+-----+-----+-----------+-----| * | | | | | | | | | | | | | | | | | | | | @@ -140,50 +243,25 @@ _______, TO(WORKMAN),TO(BASE), KC_MS_ACCEL0,KC_MS_ACCEL1,KC_MS_ACCEL2, _______, * |-----+-----| |---------------------------------------. `--------------------------------------------------+-----| * | | | | | | | | | | | | | | | | | | | * |-----+-----| |-----------------------------------------. `-------------------------------------------------+-----| - * | | | | | | | Play| | | | | | | | | | | | + * | | | | | | | | | | | | | | | | | | | * |-----+-----| |-----------------------------------------' ,-------------------------------------------+-----+-----| - * | | | | BASE | | | | | | | | | | | | | + * | | | | | | | | | | | | | | | | | * `-----------' `---------------------------------------' `-------------------------------------------------------' */ - [MEDIA] = LAYOUT( -//--------------------------------Left Hand-----------------------------------------------| |--------------------------------Right Hand------------------------------------------------ - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, -_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, -_______, _______, _______, KC_MPRV, KC_VOLU, KC_MNXT, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, -_______, _______, _______, _______, KC_VOLD, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, -_______, _______, _______, _______, KC_MUTE, KC_MPLY, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, -_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ - ) + // [] = LAYOUT( +// //--------------------------------Left Hand-----------------------------------------------| |--------------------------------Right Hand------------------------------------------------ + // _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, +// _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, +// _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, +// _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, +// _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, +// _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + // ), }; -bool led_update_user(led_t led_state) { - writePin(CAPSLOCK_LED_PIN, led_state.caps_lock); - return false; -} +bool process_record_keymap(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { -void keyboard_pre_init_user(void) { - writePinHigh(SCROLLLOCK_LED_PIN); - wait_ms(50); - writePinHigh(CAPSLOCK_LED_PIN); - wait_ms(50); - writePinHigh(NUMLOCK_LED_PIN); - wait_ms(50); - writePinLow(SCROLLLOCK_LED_PIN); - wait_ms(50); - writePinLow(CAPSLOCK_LED_PIN); - wait_ms(50); - writePinLow(NUMLOCK_LED_PIN); - - layer_state_set_user(layer_state); -} - -layer_state_t layer_state_set_user(layer_state_t state) { - writePinLow(NUMLOCK_LED_PIN); - writePinLow(SCROLLLOCK_LED_PIN); - switch (get_highest_layer(state)) { - case BASE: - writePinHigh(SCROLLLOCK_LED_PIN); - break; - } - return state; -} + } + return true; +} \ No newline at end of file diff --git a/keyboards/wheatfield/split75/keymaps/art/rules.mk b/keyboards/wheatfield/split75/keymaps/art/rules.mk new file mode 100644 index 000000000000..5f8cb68ad0fb --- /dev/null +++ b/keyboards/wheatfield/split75/keymaps/art/rules.mk @@ -0,0 +1 @@ +DYNAMIC_MACRO_ENABLE = yes \ No newline at end of file diff --git a/keyboards/wheatfield/split75/keymaps/default/keymap.c b/keyboards/wheatfield/split75/keymaps/default/keymap.c index 069eb6bd10b2..30057f881a1a 100644 --- a/keyboards/wheatfield/split75/keymaps/default/keymap.c +++ b/keyboards/wheatfield/split75/keymaps/default/keymap.c @@ -1,6 +1,8 @@ #include QMK_KEYBOARD_H -#define BASE 0 +enum layer_names { + BASE +}; const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { diff --git a/users/art/art.c b/users/art/art.c new file mode 100644 index 000000000000..5596e237f8e5 --- /dev/null +++ b/users/art/art.c @@ -0,0 +1,464 @@ +#include "art.h" +#include "string.h" + +__attribute__ ((weak)) +bool process_record_keymap(uint16_t keycode, keyrecord_t *record) { + return true; +} + +__attribute__ ((weak)) +void led_show_current_os(void) { +} + +static bool mac_ctrl_on = false; //for switching tabs +static bool mac_gui_on = false; //for switching languages +static bool mac_alt_tab_on = false; //for switching windows + +static const char *key_up[2] = {SS_UP(X_LALT), SS_UP(X_LCTL)}; +static const char *key_down[2] = {SS_DOWN(X_LALT), SS_DOWN(X_LCTL)}; + +int char_to_del = 1; +static bool sarcasm_on = false; +static bool sarcasm_key = false; + +void backspace_n_times(int times) { + for (int i=0; ievent.pressed && (keycode != KC_BSPACE && keycode != XXXXXXX)) { + char_to_del = 1; + } + + switch (keycode) { + case KC_TAB: + if (record->event.pressed && is_mac_with_base_layer_off()) { + uint8_t mods = get_mods(); + uint8_t mod_state = mods & MOD_MASK_ALT; + if (get_mods() & mod_state) { + del_mods(mod_state); + add_mods(MOD_LCTL); + mac_alt_tab_on = true; + } + + mod_state = mods & MOD_MASK_CTRL; + if (get_mods() & mod_state && !mac_alt_tab_on) { + del_mods(mod_state); + add_mods(MOD_LGUI); + mac_ctrl_on = true; + } + } + break; + case KC_LSFT: + if (record->event.pressed && is_mac_with_base_layer_off()) { + uint8_t mods = get_mods(); + uint8_t mod_state = mods & MOD_MASK_AG; + if (get_mods() & mod_state) { + del_mods(mod_state); + add_mods(MOD_LGUI); + mac_gui_on = true; + SEND_STRING(SS_TAP(X_SPACE)); + return false; + } else { + return true; + } + } + break; + case KC_LEFT: + case KC_RIGHT: + if (record->event.pressed && is_mac_with_base_layer_off()) { + /* && !mac_ctrl_on/!mac_alt_tab_on are required since setting the state while holding the key changes + the modifier from OS's perspective. As a result, just the pressed key cannot be the single source + of truth to determine which state we're in, and a separate bool is required */ + uint8_t mods = get_mods(); + uint8_t mod_state = mods & MOD_MASK_ALT; + //Allows Ctrl <-/-> on Mac if Ctrl Tab is already pressed + if (get_mods() & mod_state && mac_alt_tab_on && !mac_ctrl_on) { + del_mods(mod_state); + add_mods(MOD_LCTL); + } + + mod_state = mods & MOD_MASK_CTRL; + if (get_mods() & mod_state && !mac_alt_tab_on) { + del_mods(mod_state); + add_mods(MOD_LALT); + mac_ctrl_on = true; + } + } + break; + case KC_DEL: + if (record->event.pressed && is_mac_with_base_layer_off()) { + uint8_t mod_state = get_mods() & MOD_MASK_CTRL; + if (get_mods() & mod_state) { + del_mods(mod_state); + add_mods(MOD_LALT); + mac_ctrl_on = true; + } + } + break; + case KC_LALT: + if (!record->event.pressed && is_mac_with_base_layer_off()) { + if (mac_alt_tab_on) { + unregister_mods(MOD_LCTL); + mac_alt_tab_on = false; + return false; + } else if (mac_gui_on) { + SEND_STRING(SS_UP(X_LGUI)); + mac_gui_on = false; + return false; + } + } + break; + case KC_RALT: + if (!record->event.pressed && mac_alt_tab_on && is_mac_with_base_layer_off()) { + unregister_mods(MOD_LCTL); + mac_alt_tab_on = false; + return false; + } + break; + case KC_LCTL: + case KC_RCTL: + if (!record->event.pressed && mac_ctrl_on && is_mac_with_base_layer_off()) { + SEND_STRING(SS_UP(X_LGUI) SS_UP(X_LALT)); + mac_ctrl_on = false; + return false; + } + break; + + case KC_HOME: + if (record->event.pressed && is_mac_with_base_layer_off()) { + SEND_STRING(SS_LCTL(SS_TAP(X_LEFT))); + return false; + } + break; + case KC_END: + if (record->event.pressed && is_mac_with_base_layer_off()) { + SEND_STRING(SS_LCTL(SS_TAP(X_RIGHT))); + return false; + } + break; + case KC_BSPC: + if (record->event.pressed) { + if (char_to_del > 1) { + layer_off(GIT_C); + layer_off(GIT_S); + backspace_n_times(char_to_del); + char_to_del = 1; + return false; + } + + if (is_mac_with_base_layer_off()) { + uint8_t mod_state = get_mods() & MOD_MASK_CTRL; + if (get_mods() & mod_state) { + del_mods(mod_state); + add_mods(MOD_LALT); + mac_ctrl_on = true; + } + } + } + break; + + /* ------------------------------------------------------------------------- + * CUSTOM MACROS + * ------------------------------------------------------------------------ */ + case CTRL_CTV: + if (record->event.pressed) { + if ( get_mods() & MOD_MASK_SHIFT ) { + clear_mods(); + SEND_STRING(SS_LCTL("ctv")); + } else { + SEND_STRING(SS_LCTL("ctv") SS_TAP(X_ENTER)); + } + } + break; + case CTRL_LCTV: + if (record->event.pressed) { + if ( get_mods() & MOD_MASK_SHIFT ) { + //Firefox + clear_mods(); + SEND_STRING(SS_LCTL("lcP")); + wait_ms(200); + SEND_STRING(SS_LCTL("v") SS_TAP(X_ENTER)); + } else if ( get_mods() & MOD_MASK_CTRL ) { + //Chrome + clear_mods(); + SEND_STRING(SS_LCTL("lcNv") SS_TAP(X_ENTER)); + } else { + SEND_STRING(SS_LCTL("lctv")); + } + } + break; + case CTRL_CAV: + if (record->event.pressed) { + SEND_STRING(SS_LCTL("c" SS_TAP(X_TAB))); + wait_ms(50); + SEND_STRING(SS_LCTL("av")); + } + break; + case SARCASM: + if (record->event.pressed) { + sarcasm_on = !sarcasm_on; + } + break; + + /* ------------------------------------------------------------------------- + * OS TOGGLING + * ------------------------------------------------------------------------ */ + case TOG_OS: + if (record->event.pressed) { + is_win = ! is_win; + led_show_current_os(); + } + break; + case CTR_ALT: + if (record->event.pressed) { + send_string(key_down[is_win]); + } else { + send_string(key_up[is_win]); + } + break; + case OS_CTRL: + if (is_win) { + if (record->event.pressed) { + SEND_STRING(SS_DOWN(X_LCTL)); + } else { + SEND_STRING(SS_UP(X_LCTL)); + } + } else { + if (record->event.pressed) { + SEND_STRING(SS_DOWN(X_LGUI)); + } else { + SEND_STRING(SS_UP(X_LGUI)); + } + } + break; + case OS_WIN: + if (is_win) { + if (record->event.pressed) { + SEND_STRING(SS_DOWN(X_LGUI)); + } else { + SEND_STRING(SS_UP(X_LGUI)); + } + } else { + if (record->event.pressed) { + SEND_STRING(SS_DOWN(X_LCTL)); + } else { + SEND_STRING(SS_UP(X_LCTL)); + } + } + break; + + /* ------------------------------------------------------------------------- + * STRING MACROS + * ------------------------------------------------------------------------ */ + // case : + // if (record->event.pressed) { + // send_string_remembering_length(""); + // } + // break; + // case : + // if (record->event.pressed) { + // send_string_remembering_length("", ""); + // } + // break; + case TILD_BLOCK: + if (record->event.pressed) { + SEND_STRING("```" SS_LSFT(SS_TAP(X_ENTER) SS_TAP(X_ENTER)) "```" SS_TAP(X_UP)); + char_to_del = 4; + } + break; + case ADMINS: + if (record->event.pressed) { + send_shifted_strings_add("admin", "/aurora/status"); + } + break; + case PRESCRIPTION: + if (record->event.pressed) { + SEND_STRING("55\t12122019\t"); + char_to_del = 8; + } + break; + case FOURS: + if (record->event.pressed) { + SEND_STRING("4444333322221111\t1\t12\t21\t123\n"); + char_to_del = 16; + } + break; + + case G_ADD: + if (record->event.pressed) { + send_string_remembering_length("git add "); + } + break; + case G_BRCH: + if (record->event.pressed) { + send_shifted_strings_add("git branch ", "-d "); + } + break; + case G_C: + if (record->event.pressed) { + send_string_remembering_length("git c[Heckout/Ommit]"); + layer_on(GIT_C); + } + break; + case G_CHEC: + if (!record->event.pressed) { + bool shifted = get_mods() & MOD_MASK_SHIFT; + clear_mods(); + + backspace_n_times(15); + SEND_STRING("heckout "); + char_to_del = 13; + if (shifted) { + SEND_STRING("-b "); + char_to_del = 16; + } + layer_off(GIT_C); + } + break; + case G_COMM: + if (!record->event.pressed) { + bool shifted = get_mods() & MOD_MASK_SHIFT; + clear_mods(); + + backspace_n_times(15); + SEND_STRING("ommit -"); + char_to_del = 15; + if (shifted) { + SEND_STRING("a"); + char_to_del = 16; + } + SEND_STRING("m \"\"" SS_TAP(X_LEFT)); + layer_off(GIT_C); + } + break; + case G_DEV: + if (record->event.pressed) { + send_shifted_strings("develop", "master"); + } + break; + case G_DIFF: + if (record->event.pressed) { + send_string_remembering_length("git diff "); + } + break; + case G_FTCH: + if (record->event.pressed) { + send_string_remembering_length("git fetch "); + } + break; + case G_LOG: + if (record->event.pressed) { + send_string_remembering_length("git log "); + } + break; + case G_MERG: + if (record->event.pressed) { + send_string_remembering_length("git merge "); + } + break; + case G_P: + if (record->event.pressed) { + send_shifted_strings_add("git pu", "sh -u "); + } + break; + case G_RST: + if (record->event.pressed) { + send_string_remembering_length("git reset "); + } + break; + case G_S: + if (!record->event.pressed) { + send_string_remembering_length("git s[taSh/How/taTus]"); + layer_on(GIT_S); + } + break; + case G_SHOW: + if (!record->event.pressed) { + backspace_n_times(16); + SEND_STRING("how "); + char_to_del = 9; + layer_off(GIT_S); + } + break; + case G_STSH: + if (!record->event.pressed) { + bool shifted = get_mods() & MOD_MASK_SHIFT; + clear_mods(); + + backspace_n_times(16); + SEND_STRING("tash "); + char_to_del = 10; + + if (shifted) { + clear_mods(); + SEND_STRING("apply "); + + char_to_del = 16; + } + + layer_off(GIT_S); + } + break; + case G_STAT: + if (!record->event.pressed) { + backspace_n_times(16); + SEND_STRING("tatus "); + char_to_del = 11; + layer_off(GIT_S); + } + break; + + case CTL_ALT_START ... CTL_ALT_END: + if (record->event.pressed) { + if (is_win) { + tap_code16(LCTL(keycode - CTL_ALT_START)); + } else { + tap_code16(LALT(keycode - CTL_ALT_START)); + } + } + break; + } + + return process_record_keymap(keycode, record); +} diff --git a/users/art/art.h b/users/art/art.h new file mode 100644 index 000000000000..58b005b933b4 --- /dev/null +++ b/users/art/art.h @@ -0,0 +1,69 @@ +#pragma once +#include QMK_KEYBOARD_H + +#define CTL_ALT(kc) (CTL_ALT_START + ((kc) & 0xff)) + +extern bool is_win; + +enum layer_names { + QWERTY, + WORKMAN, + BASE, //only specific for split75 +#if defined(KEYBOARD_wheatfield_split75) + QWERTY_MOD, + LAYOUT_CHG, +#elif defined(KEYBOARD_ergodone) + FKEYS, + CTRL_NAV, + SHIFT_NAV, +#endif + + MEDIA, + COMBOS, + STRINGS, + CONFIG, + NAV, + NUMPAD, + GIT, + GIT_C, + GIT_S +}; + +enum custom_keycodes_art { + CTRL_CTV = SAFE_RANGE, + CTRL_LCTV, + CTRL_CAV, + SARCASM, + + TOG_OS, + CTR_ALT, + OS_CTRL, + OS_WIN, + + TILD_BLOCK, + ADMINS, + PRESCRIPTION, + FOURS, + + G_ADD, + G_BRCH, + G_C, + G_CHEC, + G_COMM, + G_DEV, + G_DIFF, + G_FTCH, + G_LOG, + G_MERG, + G_P, + G_RST, + G_S, + G_STAT, + G_STSH, + G_SHOW, + + CTL_ALT_START, + CTL_ALT_END = CTL_ALT_START + 0xff, + + NEW_SAFE_RANGE //for keymap specific codes +}; diff --git a/users/art/config.h b/users/art/config.h new file mode 100644 index 000000000000..72419ff376b3 --- /dev/null +++ b/users/art/config.h @@ -0,0 +1,4 @@ +#pragma once + +#undef TAPPING_TOGGLE +#define TAPPING_TOGGLE 2 diff --git a/users/art/rules.mk b/users/art/rules.mk new file mode 100644 index 000000000000..2b701eb94992 --- /dev/null +++ b/users/art/rules.mk @@ -0,0 +1 @@ +SRC += art.c \ No newline at end of file From 1044519f3666667d576fc448be0d7569c1969db7 Mon Sep 17 00:00:00 2001 From: Kamel Makhloufi <742898+melka@users.noreply.github.com> Date: Tue, 19 May 2020 23:42:09 +0200 Subject: [PATCH 006/930] Added custom keymap with french mac layout. (#9115) * Added custom keymap with french mac layout. * Update keyboards/xd60/keymaps/melka/config.h Tested on my branch, seems to work well, thanks @drashna ! Co-authored-by: Drashna Jaelre * Update keyboards/xd60/keymaps/melka/keymap.c Co-authored-by: Ryan * Update keyboards/xd60/keymaps/melka/keymap.c Co-authored-by: Ryan * Update keyboards/xd60/keymaps/melka/keymap.c Co-authored-by: Ryan * Comitted changes from merge request - Removed rules.mk Co-authored-by: Kamel Makhloufi Co-authored-by: Drashna Jaelre Co-authored-by: Ryan --- keyboards/xd60/keymaps/melka/.gitignore | 1 + keyboards/xd60/keymaps/melka/config.h | 20 +++ keyboards/xd60/keymaps/melka/keymap.c | 165 ++++++++++++++++++ .../xd60/keymaps/melka/passwd_template.h | 10 ++ keyboards/xd60/keymaps/melka/readme.md | 21 +++ 5 files changed, 217 insertions(+) create mode 100644 keyboards/xd60/keymaps/melka/.gitignore create mode 100644 keyboards/xd60/keymaps/melka/config.h create mode 100644 keyboards/xd60/keymaps/melka/keymap.c create mode 100644 keyboards/xd60/keymaps/melka/passwd_template.h create mode 100644 keyboards/xd60/keymaps/melka/readme.md diff --git a/keyboards/xd60/keymaps/melka/.gitignore b/keyboards/xd60/keymaps/melka/.gitignore new file mode 100644 index 000000000000..c79982f2ea8a --- /dev/null +++ b/keyboards/xd60/keymaps/melka/.gitignore @@ -0,0 +1 @@ +passwd.h diff --git a/keyboards/xd60/keymaps/melka/config.h b/keyboards/xd60/keymaps/melka/config.h new file mode 100644 index 000000000000..37581d12ea9c --- /dev/null +++ b/keyboards/xd60/keymaps/melka/config.h @@ -0,0 +1,20 @@ +#pragma once + +#if __GNUC__ > 5 +# if __has_include("passwd.h") +# include "passwd.h" +# endif // if file exists +#endif // __GNUC__ + +#ifndef PASSWORD_A + #define PASSWORD_A "1234567890" +#endif + +#ifndef PASSWORD_B + #define PASSWORD_B "pass123" +#endif + +#define RGBLIGHT_LAYERS + +#define LSPO_KEYS KC_LSFT, KC_TRNS, KC_5 +#define RSPC_KEYS KC_RSFT, KC_TRNS, KC_MINS diff --git a/keyboards/xd60/keymaps/melka/keymap.c b/keyboards/xd60/keymaps/melka/keymap.c new file mode 100644 index 000000000000..bb3159981f3d --- /dev/null +++ b/keyboards/xd60/keymaps/melka/keymap.c @@ -0,0 +1,165 @@ +#include QMK_KEYBOARD_H + +/* +Security Note: While it is possible to use macros to send passwords, credit card numbers, +and other sensitive information it is a supremely bad idea to do so. Anyone who gets a hold +of your keyboard will be able to access that information by opening a text editor. +*/ +enum custom_keycodes +{ + PASS_A = SAFE_RANGE, + PASS_B +}; + +#define ___ KC_NO + +#define LAYOUT_melka( \ + 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, \ + K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E, \ + K40, K41, K42, K43, K44, K45, K46, K47, K48) \ + { \ + {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, K1D}, \ + {K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3E, K3D}, \ + {K40, K41, K42, ___, ___, K43, ___, K3C, K46, K0E, K44, K45, K47, K48} \ + } + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + // 0: Base Layer + LAYOUT_melka( + KC_NUBS, KC_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_ENT, + 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, + MT(KC_LSFT, KC_5), KC_GRV, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, MT(KC_RSFT, KC_MINS), KC_UP, MO(1), + KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, KC_RGUI, KC_RALT, KC_LEFT, KC_DOWN, KC_RIGHT), + + // 1: Function Layer + LAYOUT_melka( + 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_WH_U, KC_UP, KC_WH_D, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, KC_LEFT, KC_DOWN, KC_RIGHT, _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGUP, _______, + TO(2), TO(3), _______, KC_APP, BL_STEP, _______, _______, _______, _______, _______, _______, KC_END, KC_PGDN, KC_VOLU, _______, + _______, _______, _______, _______, _______, _______, _______, KC_VOLD, KC_MUTE), + + // 2: RGB Layer + LAYOUT_melka( + RGB_TOG, RGB_M_P, RGB_RMOD, RGB_MOD, RGB_M_B, RGB_M_R, RGB_M_SW, RGB_M_SN, RGB_M_K, RGB_M_X, RGB_M_G, RGB_M_T, _______, _______, RESET, + _______, RGB_HUD, RGB_HUI, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, RGB_SAD, RGB_SAI, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + TO(0), _______, RGB_VAD, RGB_VAI, _______, _______, _______, _______, _______, _______, _______, PASS_A, PASS_B, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______), + + // 3: Keypad Layer + LAYOUT_melka( + KC_ESC, _______, _______, _______, _______, _______, _______, _______, _______, KC_NLCK, KC_PEQL, KC_PSLS, KC_PAST, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_P7, KC_P8, KC_P9, KC_PMNS, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_P4, KC_P5, KC_P6, KC_PPLS, + TO(0), _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_P1, KC_P2, KC_P3, KC_PENT, TO(0), + _______, _______, _______, _______, KC_P0, KC_P0, KC_PDOT, KC_PENT, _______) +}; + +// Light LEDs 6 to 9 and 12 to 15 red when caps lock is active. Hard to ignore! +const rgblight_segment_t PROGMEM rgb_capslock_layer[] = RGBLIGHT_LAYER_SEGMENTS( + {2, 4, HSV_RED}, // Light 4 LEDs, starting with LED 6 + {6, 4, HSV_RED} // Light 4 LEDs, starting with LED 12 +); +// Light LEDs 9 & 10 in cyan when keyboard layer 1 is active +const rgblight_segment_t PROGMEM rgb_function_layer[] = RGBLIGHT_LAYER_SEGMENTS( + {9, 2, HSV_CYAN} +); +// Light LEDs 11 & 12 in purple when keyboard layer 2 is active +const rgblight_segment_t PROGMEM rgb_backlight_layer[] = RGBLIGHT_LAYER_SEGMENTS( + {10, 2, HSV_PURPLE} +); +const rgblight_segment_t PROGMEM rgb_keypad_layer[] = RGBLIGHT_LAYER_SEGMENTS( + {4, 4, HSV_RED} +); +// Now define the array of layers. Later layers take precedence +const rgblight_segment_t* const PROGMEM rgb_layers[] = RGBLIGHT_LAYERS_LIST( + rgb_capslock_layer, + rgb_function_layer, + rgb_backlight_layer, // Overrides caps lock layer + rgb_keypad_layer // Overrides other layers +); + +layer_state_t layer_state_set_user(layer_state_t state) { + // Both layers will light up if both kb layers are active + rgblight_set_layer_state(1, layer_state_cmp(state, 1)); + rgblight_set_layer_state(2, layer_state_cmp(state, 2)); + return state; +} + +bool led_update_user(led_t led_state) { + rgblight_set_layer_state(0, led_state.caps_lock); + return true; +} + +void keyboard_post_init_user(void) { + // Enable the LED layers + rgblight_layers = rgb_layers; +} +// Loop +void matrix_scan_user(void) { + // Empty +}; + +static bool control_disabled = false; +static bool delete_pressed = false; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) +{ + if (keycode == KC_BSPC) + { + if (record->event.pressed) + { + if (keyboard_report->mods & MOD_BIT(KC_LCTL)) + { + delete_pressed = true; + control_disabled = true; + unregister_code(KC_LCTL); + register_code(KC_DEL); + return false; + } + } + else if (delete_pressed) + { + delete_pressed = false; + unregister_code(KC_DEL); + + if (control_disabled) + { + control_disabled = false; + register_code(KC_LCTL); + } + return false; + } + } + else if (keycode == KC_LCTL && !record->event.pressed && delete_pressed) + { + delete_pressed = false; + control_disabled = false; + unregister_code(KC_DEL); + register_code(KC_BSPC); + return false; + } + + switch (keycode) + { + case PASS_A: + if (record->event.pressed) + { + SEND_STRING(PASSWORD_A "\n"); + } + break; + case PASS_B: + if (record->event.pressed) + { + SEND_STRING(PASSWORD_B "\n"); + } + break; + } + return true; +} diff --git a/keyboards/xd60/keymaps/melka/passwd_template.h b/keyboards/xd60/keymaps/melka/passwd_template.h new file mode 100644 index 000000000000..a78de6d40d6f --- /dev/null +++ b/keyboards/xd60/keymaps/melka/passwd_template.h @@ -0,0 +1,10 @@ +/* +To define your password, rename this file to passwd.h and edit the defines below. + +Security Note: While it is possible to use macros to send passwords, credit card numbers, +and other sensitive information it is a supremely bad idea to do so. Anyone who gets a hold +of your keyboard will be able to access that information by opening a text editor. +*/ + +#define PASSWORD_A "enter your first password here" +#define PASSWORD_B "second password if you need" diff --git a/keyboards/xd60/keymaps/melka/readme.md b/keyboards/xd60/keymaps/melka/readme.md new file mode 100644 index 000000000000..b9d9065da787 --- /dev/null +++ b/keyboards/xd60/keymaps/melka/readme.md @@ -0,0 +1,21 @@ +# melka's keymap for XIUDI's 60% XD60 rev3 PCB + +## Additional Notes +Custom Keymap for XD60 rev3. French Mac layout. + +## Security Note +This keymap includes macros for entering passwords. + +While it is possible to use macros to send passwords, credit card numbers, +and other sensitive information it is a supremely bad idea to do so. Anyone who gets a hold +of your keyboard will be able to access that information by opening a text editor. + +Use this functionnality at your own risk. + +To define your password, rename passwd_template.h file to passwd.h and edit the defines inside. + +## Build + +To build this keymap, simply run: + + make xd60/rev3:melka # XD60 rev3 From 82bb7d2852c76c7b2c8970bebd47bbd701d9416d Mon Sep 17 00:00:00 2001 From: pcoleman Date: Tue, 19 May 2020 17:01:54 -0500 Subject: [PATCH 007/930] Adding Chimera Ortho Plus (#9093) * Added Chimera Ortho keymap * Cleaning up the rules * Removing firmware sizes * Modified URLs to point to new locations * Remove _quantum functions from custom matrix.c code * Fix 1 * Update keyboards/chimera_ortho_plus/rules.mk Co-authored-by: Ryan * Update keyboards/chimera_ortho_plus/readme.md Co-authored-by: Ryan * Update keyboards/chimera_ortho_plus/readme.md Co-authored-by: Ryan * Update keyboards/chimera_ortho_plus/config.h Co-authored-by: Ryan * Update keyboards/chimera_ortho_plus/keymaps/default/keymap.c Co-authored-by: Ryan * Update keyboards/chimera_ortho_plus/keymaps/default/keymap.c Co-authored-by: Ryan * Update keyboards/chimera_ortho_plus/keymaps/default/keymap.c Co-authored-by: Ryan * Update keyboards/chimera_ortho_plus/keymaps/default/keymap.c Co-authored-by: Ryan * Update keyboards/chimera_ortho_plus/keymaps/default/keymap.c Co-authored-by: Ryan * Update keyboards/chimera_ortho_plus/config.h Co-authored-by: Ryan * Update keyboards/chimera_ortho_plus/chimera_ortho_plus.h Co-authored-by: Ryan * Update keyboards/chimera_ortho_plus/chimera_ortho_plus.h Co-authored-by: Ryan * Update keyboards/chimera_ortho_plus/chimera_ortho_plus.c Co-authored-by: Ryan * Update keyboards/chimera_ortho_plus/chimera_ortho_plus.c Co-authored-by: Ryan * Update keyboards/chimera_ortho_plus/keymaps/default/keymap.c Co-authored-by: Ryan * Update keyboards/chimera_ortho_plus/keymaps/default/keymap.c Co-authored-by: Ryan * Update keyboards/chimera_ortho_plus/chimera_ortho_plus.h Co-authored-by: Ryan * lining up the matrix * Update keyboards/chimera_ortho_plus/readme.md Co-authored-by: James Young <18669334+noroadsleft@users.noreply.github.com> * Update keyboards/chimera_ortho_plus/readme.md Co-authored-by: James Young <18669334+noroadsleft@users.noreply.github.com> * Update keyboards/chimera_ortho_plus/info.json Co-authored-by: James Young <18669334+noroadsleft@users.noreply.github.com> * Update keyboards/chimera_ortho_plus/chimera_ortho_plus.h Co-authored-by: James Young <18669334+noroadsleft@users.noreply.github.com> * Update keyboards/chimera_ortho_plus/keymaps/default/keymap.c Co-authored-by: Ryan * Update keyboards/chimera_ortho_plus/config.h Co-authored-by: Ryan Co-authored-by: Ryan Co-authored-by: James Young <18669334+noroadsleft@users.noreply.github.com> --- .../chimera_ortho_plus/chimera_ortho_plus.c | 23 +++ .../chimera_ortho_plus/chimera_ortho_plus.h | 38 ++++ keyboards/chimera_ortho_plus/config.h | 76 +++++++ keyboards/chimera_ortho_plus/info.json | 65 ++++++ .../keymaps/default/config.h | 5 + .../keymaps/default/keymap.c | 185 ++++++++++++++++++ keyboards/chimera_ortho_plus/matrix.c | 154 +++++++++++++++ keyboards/chimera_ortho_plus/readme.md | 15 ++ keyboards/chimera_ortho_plus/rules.mk | 37 ++++ 9 files changed, 598 insertions(+) create mode 100644 keyboards/chimera_ortho_plus/chimera_ortho_plus.c create mode 100644 keyboards/chimera_ortho_plus/chimera_ortho_plus.h create mode 100644 keyboards/chimera_ortho_plus/config.h create mode 100644 keyboards/chimera_ortho_plus/info.json create mode 100644 keyboards/chimera_ortho_plus/keymaps/default/config.h create mode 100644 keyboards/chimera_ortho_plus/keymaps/default/keymap.c create mode 100644 keyboards/chimera_ortho_plus/matrix.c create mode 100644 keyboards/chimera_ortho_plus/readme.md create mode 100644 keyboards/chimera_ortho_plus/rules.mk diff --git a/keyboards/chimera_ortho_plus/chimera_ortho_plus.c b/keyboards/chimera_ortho_plus/chimera_ortho_plus.c new file mode 100644 index 000000000000..1972f2a9c336 --- /dev/null +++ b/keyboards/chimera_ortho_plus/chimera_ortho_plus.c @@ -0,0 +1,23 @@ +#include "chimera_ortho_plus.h" + +void uart_init(void) { + SERIAL_UART_INIT(); +} + +void led_init(void) { + setPinOutput(D1); + setPinOutput(F4); + setPinOutput(F5); + writePinHigh(D1); + writePinHigh(F4); + writePinHigh(F5); +} + + +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(); +} diff --git a/keyboards/chimera_ortho_plus/chimera_ortho_plus.h b/keyboards/chimera_ortho_plus/chimera_ortho_plus.h new file mode 100644 index 000000000000..f75dc610574d --- /dev/null +++ b/keyboards/chimera_ortho_plus/chimera_ortho_plus.h @@ -0,0 +1,38 @@ +#pragma once + +#include "quantum.h" + +#define red_led_off PORTF |= (1<<5) +#define red_led_on PORTF &= ~(1<<5) +#define blu_led_off PORTF |= (1<<4) +#define blu_led_on PORTF &= ~(1<<4) +#define grn_led_off PORTD |= (1<<1) +#define grn_led_on PORTD &= ~(1<<1) + +#define set_led_off red_led_off; grn_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 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, k40, k41, k42, k43, k44, k45, k46, k47, \ + k48, k49, k50, k51 \ +) \ +{ \ + { k03, k40, k26, k15, k28, k01, k42, k31, k20, k33, k08, k10 }, \ + { k00, k37, k14, k27, k16, k36, k47, k19, k32, k21, k46, k11 }, \ + { k12, k25, k02, k39, k17, k49, k50, k18, k44, k09, k34, k23 }, \ + { k24, k13, k38, k04, k05, k48, k51, k06, k07, k45, k22, k35 }, \ + { k29, k41, KC_NO, KC_NO, KC_NO, KC_NO, k30, k43, KC_NO, KC_NO, KC_NO, KC_NO } \ +} diff --git a/keyboards/chimera_ortho_plus/config.h b/keyboards/chimera_ortho_plus/config.h new file mode 100644 index 000000000000..d47c1a7640f4 --- /dev/null +++ b/keyboards/chimera_ortho_plus/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 0xDE1D +#define DEVICE_VER 0x0001 +#define MANUFACTURER unknown +#define PRODUCT Chimera Ortho Plus +#define DESCRIPTION q.m.k. keyboard firmware for Chimera Ortho Plus + +/* key matrix size */ +#define MATRIX_ROWS 6 +#define MATRIX_COLS 12 + +/* 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) diff --git a/keyboards/chimera_ortho_plus/info.json b/keyboards/chimera_ortho_plus/info.json new file mode 100644 index 000000000000..7c892c441969 --- /dev/null +++ b/keyboards/chimera_ortho_plus/info.json @@ -0,0 +1,65 @@ +{ + "keyboard_name": "Chimera Ortho Plus", + "keyboard_folder": "chimera_ortho_plus", + "maintainer": "qmk", + "width": 13.5, + "height": 6, + "layouts": { + "LAYOUT": { + "layout": [ + {"label": "{", "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": 7.5, "y": 0}, + {"label": "7", "x": 8.5, "y": 0}, + {"label": "8", "x": 9.5, "y": 0}, + {"label": "9", "x": 10.5, "y": 0}, + {"label": "0", "x": 11.5, "y": 0}, + {"label": "}", "x": 12.5, "y": 0}, + {"label": "Esc", "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": "Y", "x": 7.5, "y": 1}, + {"label": "U", "x": 8.5, "y": 1}, + {"label": "I", "x": 9.5, "y": 1}, + {"label": "O", "x": 10.5, "y": 1}, + {"label": "P", "x": 11.5, "y": 1}, + {"label": "\"", "x": 12.5, "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": "H", "x": 7.5, "y": 2}, + {"label": "J", "x": 8.5, "y": 2}, + {"label": "K", "x": 9.5, "y": 2}, + {"label": "L", "x": 10.5, "y": 2}, + {"label": ";", "x": 11.5, "y": 2}, + {"label": "Enter", "x": 12.5, "y": 2}, + {"label": "(", "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": "B", "x": 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": ")", "x": 12.5, "y": 3}, + {"label": "Num Layer", "x": 4, "y": 4}, + {"label": "Back Space", "x": 5, "y": 4}, + {"label": "Space", "x": 7.5, "y": 4}, + {"label": "Symbol Layer", "x": 8.5, "y": 4} + ] + } + } +} diff --git a/keyboards/chimera_ortho_plus/keymaps/default/config.h b/keyboards/chimera_ortho_plus/keymaps/default/config.h new file mode 100644 index 000000000000..bdfd4db80fae --- /dev/null +++ b/keyboards/chimera_ortho_plus/keymaps/default/config.h @@ -0,0 +1,5 @@ +#pragma once + +// place overrides here +#define LONGPRESS_DELAY 150 +//#define LAYER_TOGGLE_DELAY 300 diff --git a/keyboards/chimera_ortho_plus/keymaps/default/keymap.c b/keyboards/chimera_ortho_plus/keymaps/default/keymap.c new file mode 100644 index 000000000000..9b4503770130 --- /dev/null +++ b/keyboards/chimera_ortho_plus/keymaps/default/keymap.c @@ -0,0 +1,185 @@ +#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 chimera_ortho_plus_layers { + _QWERTY, + _CAPS, + _NUMPAD, + _SYMBOLS, + _MACROS, + _NAV +}; + +#define KC_NMPD TG(_NUMPAD) +#define KC_SYMB TG(_SYMBOLS) +#define KC_SPFN LT(_NAV,KC_4) +#define KC_SCTL MT(MOD_LCTL, KC_2) +#define KC_SCTR MT(MOD_LCTL, KC_9) +#define KC_SPLT MT(MOD_LALT, KC_3) +#define KC_SPRT MT(MOD_LALT, KC_8) +#define KC_GBRC MT(MOD_RGUI, KC_7) +#define KC_GQOT MT(MOD_LGUI, KC_QUOT) +#define KC_MESC LT(_MACROS, KC_ESC) +#define KC_CAD LALT(LCTL(KC_DEL)) + +enum custom_keycodes { + KC_INCL = SAFE_RANGE, + KC_PULL, + KC_PUSH, + KC_SCAP, + KC_SCOF +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [_QWERTY] = LAYOUT( + //,-------+-------+-------+-------+-------+-------. ,-------+-------+-------+-------+-------+-------. + KC_LBRC, KC_1 ,KC_SCTL,KC_SPLT,KC_SPFN, KC_5 , KC_6 ,KC_GBRC,KC_SPRT,KC_SCTR, KC_0 ,KC_RBRC, + //|-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------| + KC_MESC, KC_Q , KC_W , KC_E , KC_R , KC_T , KC_Y , KC_U , KC_I , KC_O , KC_P ,KC_QUOT, + //|-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------| + 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_LSPO, KC_Z , KC_X , KC_C , KC_V , KC_B , KC_N , KC_M ,KC_COMM,KC_DOT ,KC_SLSH,KC_RSPC, + //|-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------| + KC_NMPD,KC_BSPC, KC_SPC ,KC_SYMB + //|-------------------------------+-------+-------| |-------+-------+-------------------------------| + ), + + [_CAPS] = LAYOUT( + //,-------+-------+-------+-------+-------+-------. ,-------+-------+-------+-------+-------+-------. + _______,KC_UNDS,_______,_______,_______,_______, _______,_______,_______,_______,_______,_______, + //|-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------| + _______,_______,_______,_______,_______,_______, _______,_______,_______,_______,_______,_______, + //|-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------| + _______,_______,_______,_______,_______,_______, _______,_______,_______,_______,KC_COLN,_______, + //|-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------| + KC_SCOF,_______,_______,_______,_______,_______, _______,_______,_______,_______,_______,KC_SCOF, + //|-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------| + _______,_______, _______,_______ + //|-------------------------------+-------+-------| |-------+-------+-------------------------------| + ), + + [_NUMPAD] = LAYOUT( + //,-------+-------+-------+-------+-------+-------. ,-------+-------+-------+-------+-------+-------. + _______,_______,_______,_______,_______,_______, _______,_______,_______,_______,KC_MINS,_______, + //|-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------| + _______,_______,KC_COLN,_______,_______,_______, _______, KC_7 , KC_8 , KC_9 ,KC_ASTR,_______, + //|-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------| + _______,_______,KC_DOT ,_______,_______,_______, _______, KC_4 , KC_5 , KC_6 ,KC_PLUS,_______, + //|-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------| + _______,_______,_______,_______,_______,_______, _______, KC_1 , KC_2 , KC_3 ,KC_SLSH,_______, + //|-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------| + _______,_______, _______, KC_0 + //|-------------------------------+-------+-------/ |-------+-------+-------------------------------| + ), + + [_SYMBOLS] = LAYOUT( + //,-------+-------+-------+-------+-------+-------. ,-------+-------+-------+-------+-------+-------. + _______,_______,_______,_______,_______,_______, _______,_______,_______,_______,_______,_______, + //|-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------| + _______,KC_EXLM, KC_AT ,KC_HASH,KC_DLR ,KC_PERC, KC_CIRC,KC_AMPR,KC_ASTR,KC_LPRN,KC_RPRN,KC_BSLS, + //|-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------| + KC_F1 , KC_F2 , KC_F3 , KC_F4 , KC_F5 , KC_F6 , KC_TILD,KC_EQL ,KC_UNDS,KC_LCBR,KC_RCBR,_______, + //|-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------| + KC_F7 , KC_F8 , KC_F9 ,KC_F10 ,KC_F11 ,KC_F12 , KC_GRV ,KC_PLUS,KC_MINS,KC_LBRC,KC_RBRC,_______, + //|-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------| + KC_PIPE,_______, _______,_______ + //|-------------------------------+-------+-------| |-------+-------+-------------------------------| + ), + + [_MACROS] = LAYOUT( + //,-------+-------+-------+-------+-------+-------. ,-------+-------+-------+-------+-------+-------. + _______,_______,_______,_______,_______,_______, _______ ,_______,_______,_______,_______,_______, + //|-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------| + _______,_______,_______,_______,_______,_______, _______ ,_______,KC_INCL,_______,_______,_______, + //|-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------| + _______,_______,_______,KC_CAD ,_______,_______, _______ ,_______,_______,_______,_______,_______, + //|-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------| + KC_SCAP,_______,_______,_______,_______,_______, _______ ,_______,KC_PULL,KC_PUSH,_______,_______, + //|-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------| + _______,_______, _______,_______ + //|-------------------------------+-------+-------| |-------+-------+-------------------------------| + ), + + [_NAV] = LAYOUT( + //,-------+-------+-------+-------+-------+-------. ,-------+-------+-------+-------+-------+-------. + _______,_______,_______,_______,_______,_______, _______,_______,_______,_______,_______,_______, + //|-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------| + _______,_______,_______,_______,_______,_______, _______,KC_PGUP, KC_UP ,KC_PGDN,KC_PSCR,_______, + //|-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------| + _______,_______,_______,_______,_______,_______, _______,KC_LEFT,KC_DOWN,KC_RGHT,_______,_______, + //|-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------| + _______,_______,_______,_______,_______,_______, _______,_______,_______,_______,_______,_______, + //|-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------| + _______,KC_DEL , _______,_______ + //|-------------------------------+-------+-------| |-------+-------+-------------------------------| + ) +}; + + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch(keycode) { + /* include some kind of library or header */ + case KC_INCL: + if (record->event.pressed) { + SEND_STRING("#include <>" SS_TAP(X_LEFT)); + } + return false; + case KC_PULL: + if (record->event.pressed) { + SEND_STRING("git pull\n"); + } + return false; + case KC_PUSH: + if (record->event.pressed){ + SEND_STRING("git push\n"); + } + return false; + case KC_SCAP: + if (record->event.pressed){ + layer_on(_CAPS); + tap_code(KC_CAPS); + } + return false; + case KC_SCOF: + if (record->event.pressed){ + layer_off(_CAPS); + tap_code(KC_CAPS); + } + return false; + } + return true; +}; + + +void matrix_scan_user(void) { + uint8_t layer = get_highest_layer(layer_state); + + switch (layer) { + case _QWERTY: + set_led_green; + break; + case _CAPS: + set_led_white; + break; + case _NUMPAD: + set_led_blue; + break; + case _SYMBOLS: + set_led_red; + break; + case _MACROS: + set_led_cyan; + break; + case _NAV: + set_led_magenta; + break; + default: + set_led_green; + break; + } +}; diff --git a/keyboards/chimera_ortho_plus/matrix.c b/keyboards/chimera_ortho_plus/matrix.c new file mode 100644 index 000000000000..ed6eac2b0933 --- /dev/null +++ b/keyboards/chimera_ortho_plus/matrix.c @@ -0,0 +1,154 @@ +/* +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 slave to send the matrix + SERIAL_UART_DATA = 's'; + + //trust the external keystates entirely, erase the last data + uint8_t uart_data[14] = {0}; + + //there are 10 bytes corresponding to 10 columns, and an end byte + for (uint8_t i = 0; i < 14; 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] << 6; + } + } + + + matrix_scan_quantum(); + return 1; +} + +inline +bool matrix_is_on(uint8_t row, uint8_t col) +{ + return (matrix[row] & ((matrix_row_t)1< Date: Tue, 19 May 2020 20:08:34 -0500 Subject: [PATCH 008/930] Add VIA Keymap to Liminal Directory (#8965) * add via keymap to liminal keyboard * fix keymap clarifications * Update keyboards/the_royal/liminal/keymaps/via/keymap.c Co-Authored-By: Drashna Jaelre Co-authored-by: TheRoyalSweatshirt Co-authored-by: Garret G <45295190+TheRoyalSweatshirt@users.noreply.github.com> Co-authored-by: Drashna Jaelre --- .../the_royal/liminal/keymaps/via/keymap.c | 57 +++++++++++++++++++ .../the_royal/liminal/keymaps/via/readme.md | 3 + .../the_royal/liminal/keymaps/via/rules.mk | 1 + 3 files changed, 61 insertions(+) create mode 100644 keyboards/the_royal/liminal/keymaps/via/keymap.c create mode 100644 keyboards/the_royal/liminal/keymaps/via/readme.md create mode 100644 keyboards/the_royal/liminal/keymaps/via/rules.mk diff --git a/keyboards/the_royal/liminal/keymaps/via/keymap.c b/keyboards/the_royal/liminal/keymaps/via/keymap.c new file mode 100644 index 000000000000..a3aee9121bad --- /dev/null +++ b/keyboards/the_royal/liminal/keymaps/via/keymap.c @@ -0,0 +1,57 @@ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +LAYOUT_base_kit_all( + KC_ESC, 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_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_QUOTE, 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, MO(3), + KC_END, KC_DEL, KC_LGUI, KC_LALT, MO(1), KC_SPACE, KC_CAPS, MO(2), KC_MENU, KC_RCTL + ), + +LAYOUT_base_kit_all( + KC_GRAVE, _______, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_UNDS, _______, + KC_TILD, _______, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_DQT, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + +LAYOUT_base_kit_all( + KC_BSLS, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_EQUAL, _______, + KC_PIPE, KC_CAPS, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_PLUS, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_LBRC, KC_RBRC, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + +LAYOUT_base_kit_all( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_UP, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_LEFT, KC_RGHT, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DOWN, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ) + +}; + + + +void keyboard_post_init_user(void) { + layer_state_set_user(layer_state); +} + +layer_state_t layer_state_set_user(layer_state_t state) { + switch (get_highest_layer(state)) { + case 1: + rgblight_setrgb (RGB_CORAL); + break; + case 2: + rgblight_setrgb (RGB_RED); + break; + case 3: + rgblight_setrgb (RGB_BLUE); + break; + default: // for any other layers, or the default layer + rgblight_setrgb (RGB_GREEN); + break; + } + return state; +} diff --git a/keyboards/the_royal/liminal/keymaps/via/readme.md b/keyboards/the_royal/liminal/keymaps/via/readme.md new file mode 100644 index 000000000000..5a1cda6823b3 --- /dev/null +++ b/keyboards/the_royal/liminal/keymaps/via/readme.md @@ -0,0 +1,3 @@ +# The VIA keymap for the Liminal Keyboard + +This keymap is for compatibility with the VIA configurator. \ No newline at end of file diff --git a/keyboards/the_royal/liminal/keymaps/via/rules.mk b/keyboards/the_royal/liminal/keymaps/via/rules.mk new file mode 100644 index 000000000000..1e5b99807cb7 --- /dev/null +++ b/keyboards/the_royal/liminal/keymaps/via/rules.mk @@ -0,0 +1 @@ +VIA_ENABLE = yes From 0fbcb41c8509279751b8676211b8686b1b866508 Mon Sep 17 00:00:00 2001 From: Joel Challis Date: Wed, 20 May 2020 05:54:55 +0100 Subject: [PATCH 009/930] Reintegrate previous docker docs (#9084) --- docs/_summary.md | 4 ++- docs/getting_started_docker.md | 47 ++++++++++++++++++++++++++++++++++ 2 files changed, 50 insertions(+), 1 deletion(-) create mode 100644 docs/getting_started_docker.md diff --git a/docs/_summary.md b/docs/_summary.md index 75b9a83e66b0..b711ab7d94e4 100644 --- a/docs/_summary.md +++ b/docs/_summary.md @@ -34,7 +34,9 @@ * [Customizing Functionality](custom_quantum_functions.md) * [Driver Installation with Zadig](driver_installation_zadig.md) * [Keymap Overview](keymap.md) - * [Vagrant Guide](getting_started_vagrant.md) + * Development Environments + * [Docker Guide](getting_started_docker.md) + * [Vagrant Guide](getting_started_vagrant.md) * Flashing * [Flashing](flashing.md) * [Flashing ATmega32A (ps2avrgb)](flashing_bootloadhid.md) diff --git a/docs/getting_started_docker.md b/docs/getting_started_docker.md new file mode 100644 index 000000000000..e5309fdbbf5c --- /dev/null +++ b/docs/getting_started_docker.md @@ -0,0 +1,47 @@ +# Docker Quick Start + +This project includes a Docker workflow that will allow you to build a new firmware for your keyboard very easily without major changes to your primary operating system. This also ensures that when you clone the project and perform a build, you have the exact same environment as anyone else and the QMK build infrastructure. This makes it much easier for people to help you troubleshoot any issues you encounter. + +## Requirements + +The main prerequisite is a working `docker` install. +* [Docker CE](https://docs.docker.com/install/#supported-platforms) + +## Usage + +Acquire a local copy of the QMK's repository (including submodules): + +```bash +git clone --recurse-submodules https://github.com/qmk/qmk_firmware.git +cd qmk_firmware +``` + +Run the following command to build a keymap: +```bash +util/docker_build.sh : +# For example: util/docker_build.sh planck/rev6:default +``` + +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`. + +There is also support for building _and_ flashing the keyboard straight from Docker by specifying the `target` as well: + +```bash +util/docker_build.sh keyboard:keymap:target +# For example: util/docker_build.sh planck/rev6:default:flash +``` + +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 all keyboards/keymaps) +``` + +## FAQ + +### Why can't I flash on Windows/macOS + +On Windows and macOS, it requires [Docker Machine](http://gw.tnode.com/docker/docker-machine-with-usb-support-on-windows-macos/) to be running. This is tedious to set up, so it's not recommended; use [QMK Toolbox](https://github.com/qmk/qmk_toolbox) instead. + +!> Docker for Windows requires [Hyper-V](https://docs.microsoft.com/en-us/virtualization/hyper-v-on-windows/quick-start/enable-hyper-v) to be enabled. This means that it cannot work on versions of Windows which don't have Hyper-V, such as Windows 7, Windows 8 and **Windows 10 Home**. From 3ad2be52a7098c269d741f8d59a424afdbd7302d Mon Sep 17 00:00:00 2001 From: Pete Johanson Date: Wed, 20 May 2020 11:09:13 -0400 Subject: [PATCH 010/930] CLI: Improve experience when running `qmk setup` on FreeBSD. (#8798) * CLI: Improve experience when running `qmk setup` on FreeBSD. * Install the `avrdude` package as well. * Switch to installing python packages w/ `--user` flag. * Basic getting started sections for FreeBSD. * Update `util/freebsd_install.sh` for root/non-root branches. * Add ID to doc section. Co-Authored-By: skullydazed * Add ID to another docs section. Co-Authored-By: skullydazed * Use `; then` in script for consistency. Co-Authored-By: skullydazed * Updated to use sudo in one shot if available. * Apply suggestions from code review Co-authored-by: Erovia * Style fixes for latest version in master. * Apply suggestions from code review Co-authored-by: Ryan Co-authored-by: skullydazed Co-authored-by: Erovia Co-authored-by: Ryan --- docs/newbs_getting_started.md | 21 +++++++++++++++++++-- util/freebsd_install.sh | 26 ++++++++++++++++++++++---- 2 files changed, 41 insertions(+), 6 deletions(-) diff --git a/docs/newbs_getting_started.md b/docs/newbs_getting_started.md index 13b25bf86a21..83df2f305044 100644 --- a/docs/newbs_getting_started.md +++ b/docs/newbs_getting_started.md @@ -69,10 +69,21 @@ You will need to install Git and Python. It's very likely that you already have * Fedora / Red Hat / CentOS: `sudo yum install git python3 python3-pip` * Arch / Manjaro: `sudo pacman -S git python python-pip python-setuptools libffi` - Install the global CLI to bootstrap your system: - `python3 -m pip install --user qmk` (on Arch-based distros you can also try the `qmk` package from AUR (**note**: it's maintained by a community member): `yay -S qmk`) +`python3 -m pip install --user qmk` (on Arch-based distros you can also try the `qmk` package from AUR (**note**: it's maintained by a community member): `yay -S qmk`) + +### FreeBSD + +You will need to install Git and Python. It's possible that you already have both, but if not, run the following commands to install them: + + pkg install git python3 + +Make sure that `$HOME/.local/bin` is added to your `$PATH` so that locally install Python packages are available. + +Once installed, you can install QMK CLI: + + python3 -m pip install --user qmk ## 3. Run QMK Setup :id=set-up-qmk @@ -88,6 +99,12 @@ This is due to a [bug](https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=839155) Sadly, Ubuntu reitroduced this bug and is [yet to fix it](https://bugs.launchpad.net/ubuntu/+source/bash/+bug/1588562). Luckily, the fix is easy. Run this as your user: `echo "PATH=$HOME/.local/bin:$PATH" >> $HOME/.bashrc && source $HOME/.bashrc` +?>**Note on FreeBSD**: +It is suggested to run `qmk setup` as a non-`root` user to start with, but this will likely identify packages that need to be installed to your +base system using `pkg`. However the installation will probably fail when run as an unprivileged user. +To manually install the base dependencies, run `./util/qmk_install.sh` either as `root`, or with `sudo`. +Once that completes, re-run `qmk setup` to complete the setup and checks. + ?> If you already know [how to use GitHub](getting_started_github.md), we recommend that you create your own fork and use `qmk setup /qmk_firmware` to clone your personal fork. If you don't know what that means you can safely ignore this message. ## 4. Test Your Build Environment diff --git a/util/freebsd_install.sh b/util/freebsd_install.sh index 81575920313d..09669024cc0c 100755 --- a/util/freebsd_install.sh +++ b/util/freebsd_install.sh @@ -1,7 +1,5 @@ #!/bin/sh -util_dir=$(dirname "$0") -pkg update -pkg install -y \ +packages=$(cat < /dev/null 2>&1; then + sudo pkg update + sudp pkg install -y ${packages} + else + echo "Make sure you run setup as root first to install base OS dependencies..." + echo "" + fi + + python3 -m pip install --user -r ${util_dir}/../requirements.txt +fi From b0c780ed32712d2eb38c69a2b9465a00b861381e Mon Sep 17 00:00:00 2001 From: Joel Challis Date: Wed, 20 May 2020 16:28:39 +0100 Subject: [PATCH 011/930] Fix ChibiOS FPU build logic (#9132) --- tmk_core/chibios.mk | 28 ++++++++++++---------------- tmk_core/rules.mk | 2 +- 2 files changed, 13 insertions(+), 17 deletions(-) diff --git a/tmk_core/chibios.mk b/tmk_core/chibios.mk index d0f1032acb43..09aaddeef052 100644 --- a/tmk_core/chibios.mk +++ b/tmk_core/chibios.mk @@ -220,6 +220,18 @@ COMPILEFLAGS += -fno-common COMPILEFLAGS += -fshort-wchar COMPILEFLAGS += $(THUMBFLAGS) +# FPU options default (Cortex-M4 and Cortex-M7 single precision). +USE_FPU_OPT ?= -mfloat-abi=hard -mfpu=fpv4-sp-d16 -fsingle-precision-constant + +# FPU-related options +USE_FPU ?= no +ifneq ($(USE_FPU),no) + COMPILEFLAGS += $(USE_FPU_OPT) + OPT_DEFS += -DCORTEX_USE_FPU=TRUE +else + OPT_DEFS += -DCORTEX_USE_FPU=FALSE +endif + CFLAGS += $(COMPILEFLAGS) ASFLAGS += $(THUMBFLAGS) @@ -241,22 +253,6 @@ OPT_DEFS += -DPORT_IGNORE_GCC_VERSION_CHECK=1 MCUFLAGS = -mcpu=$(MCU) -# FPU options default (Cortex-M4 and Cortex-M7 single precision). -ifeq ($(USE_FPU_OPT),) - USE_FPU_OPT = -mfloat-abi=$(USE_FPU) -mfpu=fpv4-sp-d16 -fsingle-precision-constant -endif - -# FPU-related options -ifeq ($(USE_FPU),) - USE_FPU = no -endif -ifneq ($(USE_FPU),no) - OPT += $(USE_FPU_OPT) - OPT_DEFS += -DCORTEX_USE_FPU=TRUE -else - OPT_DEFS += -DCORTEX_USE_FPU=FALSE -endif - DEBUG = gdb DFU_ARGS ?= diff --git a/tmk_core/rules.mk b/tmk_core/rules.mk index f45fd37929b6..9bb341ecb115 100644 --- a/tmk_core/rules.mk +++ b/tmk_core/rules.mk @@ -46,7 +46,7 @@ FORMAT = ihex # Optimization level, can be [0, 1, 2, 3, s]. # 0 = turn off optimization. s = optimize for size. # (Note: 3 is not always the best optimization level. See avr-libc FAQ.) -OPT = s +OPT ?= s # Compiler flag to set the C Standard level. # c89 = "ANSI" C From 8e1f706ac6aed03875ae9c6c00444778654b0380 Mon Sep 17 00:00:00 2001 From: Parker Coates Date: Wed, 20 May 2020 19:11:52 -0300 Subject: [PATCH 012/930] Enable backlight breathing support for the TADA68 (#9145) The factory TMK firmware for the TADA68 supports backlight breathing, so I was surprised when the BL_BRTG key I set up in the online QMK configurator didn't work. As far as I can tell, this was just a simple omission. --- keyboards/tada68/config.h | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/keyboards/tada68/config.h b/keyboards/tada68/config.h index 41eacbd86bf5..41618e9d269b 100755 --- a/keyboards/tada68/config.h +++ b/keyboards/tada68/config.h @@ -37,8 +37,6 @@ along with this program. If not, see . #define MATRIX_COL_PINS {F0,F1,E6,C7,C6,B7,D4,B1,B0,B5,B4,D7,D6,B3,F4} #define UNUSED_PINS -#define BACKLIGHT_PIN B6 - /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW @@ -53,8 +51,9 @@ along with this program. If not, see . /* Locking resynchronize hack */ #define LOCKING_RESYNC_ENABLE -/* Backlight configuration - */ +/* Backlight configuration */ +#define BACKLIGHT_PIN B6 +#define BACKLIGHT_BREATHING #define BACKLIGHT_LEVELS 4 /* From 83ebbf57b349552038d9d9af994eb2e9528ecbc5 Mon Sep 17 00:00:00 2001 From: Erovia Date: Thu, 21 May 2020 10:15:18 +0200 Subject: [PATCH 013/930] Fix submodule check (#9155) --- lib/python/qmk/cli/doctor.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/python/qmk/cli/doctor.py b/lib/python/qmk/cli/doctor.py index 636e49dab32d..20f8650e5e21 100755 --- a/lib/python/qmk/cli/doctor.py +++ b/lib/python/qmk/cli/doctor.py @@ -131,7 +131,10 @@ def check_submodules(): 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!') + cli.log.error('Submodule %s is not up to date!', submodule['name']) + ok = False + else: + cli.log.warn('Submodule %s is not up to date!', submodule['name']) return ok From d1df576ece12a7627a18e1581eed482cda2dbed5 Mon Sep 17 00:00:00 2001 From: Nick Brassel Date: Thu, 21 May 2020 20:31:42 +1000 Subject: [PATCH 014/930] Allow for overriding RAW endpoint usage page and ID. (#8834) * Allow for overriding RAW endpoint usage page and ID. * Move usb_descriptor_common.h. * Docs update. --- docs/feature_rawhid.md | 6 +++- tmk_core/protocol/arm_atsam/usb/udi_hid_kbd.c | 5 +-- tmk_core/protocol/usb_descriptor.c | 5 +-- tmk_core/protocol/usb_descriptor_common.h | 31 +++++++++++++++++++ tmk_core/protocol/vusb/vusb.c | 7 +++-- 5 files changed, 46 insertions(+), 8 deletions(-) create mode 100644 tmk_core/protocol/usb_descriptor_common.h diff --git a/docs/feature_rawhid.md b/docs/feature_rawhid.md index ed848a4c793c..01e215be45cd 100644 --- a/docs/feature_rawhid.md +++ b/docs/feature_rawhid.md @@ -44,7 +44,11 @@ To connect your host computer to your keyboard with raw HID you need four pieces 3. Usage Page 4. Usage -The first two can easily be found in your keyboard's `config.h` in the keyboard's main directory under `VENDOR_ID` and `PRODUCT_ID`. **Usage Page** is **`0xFF60`** and **Usage** is **`0x0061`**. +The first two can easily be found in your keyboard's `config.h` in the keyboard's main directory under `VENDOR_ID` and `PRODUCT_ID`. + +The final two can be overridden in your keyboard's `config.h` in the keyboard's main directory by redefining the values: `#define RAW_USAGE_PAGE 0xFF60` and `#define RAW_USAGE_ID 0x61`. + +By default, **Usage Page** is `0xFF60` and **Usage** is `0x61`. ### Building your host 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 3e9fbfdbed29..9ea4addcfc3e 100644 --- a/tmk_core/protocol/arm_atsam/usb/udi_hid_kbd.c +++ b/tmk_core/protocol/arm_atsam/usb/udi_hid_kbd.c @@ -55,6 +55,7 @@ #include "udi_hid_kbd.h" #include #include "report.h" +#include "usb_descriptor_common.h" //*************************************************************************** // KBD @@ -641,8 +642,8 @@ static uint8_t udi_hid_raw_report_recv[UDI_HID_RAW_REPORT_SIZE]; COMPILER_WORD_ALIGNED UDC_DESC_STORAGE udi_hid_raw_report_desc_t udi_hid_raw_report_desc = {{ - 0x06, 0x60, 0xFF, // Usage Page (Vendor Defined) - 0x09, 0x61, // Usage (Vendor Defined) + 0x06, RAW_USAGE_PAGE_LO, RAW_USAGE_PAGE_HI, // Usage Page (Vendor Defined) + 0x09, RAW_USAGE_ID, // Usage (Vendor Defined) 0xA1, 0x01, // Collection (Application) 0x75, 0x08, // Report Size (8) 0x15, 0x00, // Logical Minimum (0) diff --git a/tmk_core/protocol/usb_descriptor.c b/tmk_core/protocol/usb_descriptor.c index f2b91b099e35..8c71dd1dda77 100644 --- a/tmk_core/protocol/usb_descriptor.c +++ b/tmk_core/protocol/usb_descriptor.c @@ -39,6 +39,7 @@ #include "util.h" #include "report.h" #include "usb_descriptor.h" +#include "usb_descriptor_common.h" // clang-format off @@ -232,8 +233,8 @@ const USB_Descriptor_HIDReport_Datatype_t PROGMEM SharedReport[] = { #ifdef RAW_ENABLE const USB_Descriptor_HIDReport_Datatype_t PROGMEM RawReport[] = { - HID_RI_USAGE_PAGE(16, 0xFF60), // Vendor Defined - HID_RI_USAGE(8, 0x61), // Vendor Defined + HID_RI_USAGE_PAGE(16, RAW_USAGE_PAGE), // Vendor Defined + HID_RI_USAGE(8, RAW_USAGE_ID), // Vendor Defined HID_RI_COLLECTION(8, 0x01), // Application // Data to host HID_RI_USAGE(8, 0x62), // Vendor Defined diff --git a/tmk_core/protocol/usb_descriptor_common.h b/tmk_core/protocol/usb_descriptor_common.h new file mode 100644 index 000000000000..b1f602c82eba --- /dev/null +++ b/tmk_core/protocol/usb_descriptor_common.h @@ -0,0 +1,31 @@ +/* Copyright 2020 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 + +///////////////////// +// RAW Usage page and ID configuration + +#ifndef RAW_USAGE_PAGE +# define RAW_USAGE_PAGE 0xFF60 +#endif + +#ifndef RAW_USAGE_ID +# define RAW_USAGE_ID 0x61 +#endif + +#define RAW_USAGE_PAGE_HI ((uint8_t)(RAW_USAGE_PAGE >> 8)) +#define RAW_USAGE_PAGE_LO ((uint8_t)(RAW_USAGE_PAGE & 0xFF)) diff --git a/tmk_core/protocol/vusb/vusb.c b/tmk_core/protocol/vusb/vusb.c index a9f37c61b0ef..4c8e6003fe82 100644 --- a/tmk_core/protocol/vusb/vusb.c +++ b/tmk_core/protocol/vusb/vusb.c @@ -26,6 +26,7 @@ along with this program. If not, see . #include "vusb.h" #include "print.h" #include "debug.h" +#include "usb_descriptor_common.h" #ifdef RAW_ENABLE # include "raw_hid.h" @@ -409,9 +410,9 @@ const PROGMEM uchar keyboard_hid_report[] = { #ifdef RAW_ENABLE const PROGMEM uchar raw_hid_report[] = { - 0x06, 0x60, 0xFF, // Usage Page (Vendor Defined) - 0x09, 0x61, // Usage (Vendor Defined) - 0xA1, 0x01, // Collection (Application) + 0x06, RAW_USAGE_PAGE_LO, RAW_USAGE_PAGE_HI, // Usage Page (Vendor Defined) + 0x09, RAW_USAGE_ID, // Usage (Vendor Defined) + 0xA1, 0x01, // Collection (Application) // Data to host 0x09, 0x62, // Usage (Vendor Defined) 0x15, 0x00, // Logical Minimum (0) From 9c8f61dfa0dfb3a500ffd12b4a2d1a906a7b669f Mon Sep 17 00:00:00 2001 From: Ryan Date: Fri, 22 May 2020 02:24:39 +1000 Subject: [PATCH 015/930] [Docs] newbs_flashing.md: place bootloader instructions before Toolbox intro (#9077) * newbs_flashing.md: place bootloader instructions before Toolbox intro * Update docs/newbs_flashing.md * More wordsmithing, point ARM users at Discord if all else fails * Link Discord --- docs/newbs_flashing.md | 82 +++++++++++++++++++++--------------------- 1 file changed, 42 insertions(+), 40 deletions(-) diff --git a/docs/newbs_flashing.md b/docs/newbs_flashing.md index dc81efd21209..04c7c55aed93 100644 --- a/docs/newbs_flashing.md +++ b/docs/newbs_flashing.md @@ -1,18 +1,41 @@ -# Flashing Your Keyboard +# Flashing Your Keyboard -Now that you've built a custom firmware file you'll want to flash your keyboard. +Now that you've built a custom firmware file you'll want to flash your keyboard. + +## Put Your Keyboard into DFU (Bootloader) Mode + +In order to flash your custom firmware you must first put your keyboard into a special flashing mode. While it is in this mode you will not be able to type or otherwise use your keyboard. It is very important that you do not unplug the keyboard or otherwise interrupt the flashing process while the firmware is being written. + +Different keyboards have different ways to enter this special mode. If your PCB currently runs QMK, TMK, or PS2AVRGB (Bootmapper Client) and you have not been given specific instructions, try the following, in order: + +* Hold down both shift keys and press `Pause` +* Hold down both shift keys and press `B` +* Unplug your keyboard, hold down the Spacebar and `B` at the same time, plug in your keyboard and wait a second before releasing the keys +* Unplug your keyboard, hold down the top or bottom left key (usually Escape or Left Control) and plug in your keyboard +* Press the physical `RESET` button, usually located on the underside of the PCB +* Locate header pins on the PCB labeled `RESET` and `GND`, and short them together while plugging your PCB in + +If you've attempted all of the above to no avail, and the main chip on the board says `STM32` on it, this may be a bit more complicated. Generally your best bet is to ask on [Discord](https://discord.gg/Uq7gcHh) for assistance. It's likely some photos of the board will be asked for -- if you can get them ready beforehand it'll help move things along! + +Otherwise, you should see a message in yellow, similar to this in QMK Toolbox: + +``` +*** DFU device connected: Atmel Corp. ATmega32U4 (03EB:2FF4:0000) +``` + +and this bootloader device will also be present in Device Manager, System Information.app, or `lsusb`. ## Flashing Your Keyboard with QMK Toolbox -The simplest way to flash your keyboard will be with the [QMK Toolbox](https://github.com/qmk/qmk_toolbox/releases). +The simplest way to flash your keyboard will be with the [QMK Toolbox](https://github.com/qmk/qmk_toolbox/releases). -However, the QMK Toolbox is only available for Windows and macOS currently. If you're using Linux (or just wish to flash the firmware from the command line), proceed down to [Flash Your Keyboard From The Command Line](#flash-your-keyboard-from-the-command-line). +However, the Toolbox is currently only available for Windows and macOS. If you're using Linux (or just wish to flash the firmware from the command line), skip to the [Flash your Keyboard from the Command Line](#flash-your-keyboard-from-the-command-line) section. -### Load The File Into QMK Toolbox +### Load the File into QMK Toolbox Begin by opening the QMK Toolbox application. You'll want to locate the firmware file in Finder or Explorer. Your keyboard firmware may be in one of two formats- `.hex` or `.bin`. QMK tries to copy the appropriate one for your keyboard into the root `qmk_firmware` directory. -If you are on Windows or macOS there are commands you can use to easily open the current firmware folder in Explorer or Finder. +If you are on Windows or macOS, there are commands you can use to easily open the current folder in Explorer or Finder. #### Windows @@ -38,65 +61,44 @@ For example, the `planck/rev5` with a `default` keymap will have this filename: planck_rev5_default.hex ``` -Once you have located your firmware file drag it into the "Local file" box in QMK Toolbox, or click "Open" and navigate to where your firmware file is stored. - -### Put Your Keyboard Into DFU (Bootloader) Mode - -In order to flash your custom firmware you have to put your keyboard into a special flashing mode. While it is in this mode you will not be able to type or otherwise use your keyboard. It is very important that you do not unplug your keyboard or otherwise interrupt the flashing process while the firmware is being written. - -Different keyboards have different ways to enter this special mode. If your PCB currently runs QMK or TMK and you have not been given specific instructions try the following, in order: - -* Hold down both shift keys and press `Pause` -* Hold down both shift keys and press `B` -* Unplug your keyboard, hold down the Spacebar and `B` at the same time, plug in your keyboard and wait a second before releasing the keys -* Press the physical `RESET` button on the bottom of the PCB -* Locate header pins on the PCB labeled `BOOT0` or `RESET`, short those together while plugging your PCB in - -When you are successful you will see a message similar to this in QMK Toolbox: - -``` -*** Clueboard - Clueboard 66% HotSwap disconnected -- 0xC1ED:0x2390 -*** DFU device connected -``` +Once you have located your firmware file drag it into the "Local file" box in QMK Toolbox, or click "Open" and navigate to where your firmware file is stored. ### Flash Your Keyboard Click the `Flash` button in QMK Toolbox. You will see output similar to the following: ``` -*** Clueboard - Clueboard 66% HotSwap disconnected -- 0xC1ED:0x2390 -*** DFU device connected +*** DFU device connected: Atmel Corp. ATmega32U4 (03EB:2FF4:0000) *** Attempting to flash, please don't remove device ->>> dfu-programmer atmega32u4 erase --force +>>> dfu-programmer.exe atmega32u4 erase --force Erasing flash... Success Checking memory from 0x0 to 0x6FFF... Empty. ->>> dfu-programmer atmega32u4 flash /Users/skully/qmk_firmware/clueboard_66_hotswap_gen1_skully.hex - Checking memory from 0x0 to 0x55FF... Empty. - 0% 100% Programming 0x5600 bytes... +>>> dfu-programmer.exe atmega32u4 flash "D:\Git\qmk_firmware\gh60_satan_default.hex" + Checking memory from 0x0 to 0x3F7F... Empty. + 0% 100% Programming 0x3F80 bytes... [>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>] Success 0% 100% Reading 0x7000 bytes... [>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>] Success Validating... Success - 0x5600 bytes written into 0x7000 bytes memory (76.79%). ->>> dfu-programmer atmega32u4 reset + 0x3F80 bytes written into 0x7000 bytes memory (56.70%). +>>> dfu-programmer.exe atmega32u4 reset -*** DFU device disconnected -*** Clueboard - Clueboard 66% HotSwap connected -- 0xC1ED:0x2390 +*** DFU device disconnected: Atmel Corp: ATmega32U4 (03EB:2FF4:0000) ``` ## Flash your Keyboard from the Command Line -This has been made pretty simple compared to what it used to be. When you are ready to compile and flash your firmware, open up your terminal window and run the flash command: +This has been made pretty simple compared to what it used to be. When you are ready to compile and flash your firmware, open up your terminal window and run the flash command: qmk flash -If you have not configured your keyboard/keymap name, or you have multiple keyboards, you can specify the keyboard and keymap: +If you have not configured your keyboard/keymap name in the CLI, or you have multiple keyboards, you can specify the keyboard and keymap: qmk flash -kb -km -This will check the keyboard's configuration, and then attempt to flash it based on the specified bootloader. This means that you don't need to know which bootloader that your keyboard uses. Just run the command, and let the command do the heavy lifting. +This will check the keyboard's configuration, and then attempt to flash it based on the specified bootloader. This means that you don't need to know which bootloader that your keyboard uses. Just run the command, and let the command do the heavy lifting. -However, this does rely on the bootloader being set by the keyboard. If this information is not configured, or you're using a board that doesn't have a supported target to flash it, you will see this error: +However, this does rely on the bootloader being set by the keyboard. If this information is not configured, or you're using a board that doesn't have a supported target to flash it, you will see this error: WARNING: This board's bootloader is not specified or is not supported by the ":flash" target at this time. From 1816ad01d0efcc987b5aa7a833331b0f9d903d4f Mon Sep 17 00:00:00 2001 From: Joel Challis Date: Thu, 21 May 2020 17:59:01 +0100 Subject: [PATCH 016/930] Use LUFA funcs for split_util (#8594) --- quantum/split_common/split_util.c | 65 +++++++++++++++++++++---------- 1 file changed, 44 insertions(+), 21 deletions(-) diff --git a/quantum/split_common/split_util.c b/quantum/split_common/split_util.c index fb6a3b85af28..6f376ab40890 100644 --- a/quantum/split_common/split_util.c +++ b/quantum/split_common/split_util.c @@ -6,6 +6,14 @@ #include "transport.h" #include "quantum.h" +#ifdef PROTOCOL_LUFA +# include +#endif + +#ifdef PROTOCOL_VUSB +# include "usbdrv.h" +#endif + #ifdef EE_HANDS # include "eeconfig.h" #endif @@ -22,30 +30,54 @@ # define SPLIT_USB_TIMEOUT_POLL 10 #endif +#ifdef PROTOCOL_CHIBIOS +# define SPLIT_USB_DETECT // Force this on for now +#endif + volatile bool isLeftHand = true; -bool waitForUsb(void) { +#if defined(SPLIT_USB_DETECT) +# if defined(PROTOCOL_LUFA) +static inline bool usbHasActiveConnection(void) { return USB_Device_IsAddressSet(); } +static inline void usbDisable(void) { USB_Disable(); } +# elif defined(PROTOCOL_CHIBIOS) +static inline bool usbHasActiveConnection(void) { usbGetDriverStateI(&USBD1) == USB_ACTIVE; } +static inline void usbDisable(void) { usbStop(&USBD1); } +# elif defined(PROTOCOL_VUSB) +static inline bool usbHasActiveConnection(void) { + usbPoll(); + return usbConfiguration; +} +static inline void usbDisable(void) { usbDeviceDisconnect(); } +# else +static inline bool usbHasActiveConnection(void) { return true; } +static inline void usbDisable(void) {} +# endif + +bool usbIsActive(void) { 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 - if (usbGetDriverStateI(&USBD1) == USB_ACTIVE) { -#endif + if (usbHasActiveConnection()) { return true; } wait_ms(SPLIT_USB_TIMEOUT_POLL); } // 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 + usbDisable(); return false; } +#elif defined(PROTOCOL_LUFA) +static inline bool usbIsActive(void) { + USB_OTGPAD_On(); // enables VBUS pad + wait_us(5); + + return USB_VBUS_GetStatus(); // checks state of VBUS +} +#else +static inline bool usbIsActive(void) { return true; } +#endif __attribute__((weak)) bool is_keyboard_left(void) { #if defined(SPLIT_HAND_PIN) @@ -66,16 +98,7 @@ __attribute__((weak)) bool is_keyboard_master(void) { // only check once, as this is called often if (usbstate == UNKNOWN) { -#if defined(SPLIT_USB_DETECT) || defined(PROTOCOL_CHIBIOS) - 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 + usbstate = usbIsActive() ? MASTER : SLAVE; } return (usbstate == MASTER); From 205321c37740caaffbca69e626a8432fd369d20c Mon Sep 17 00:00:00 2001 From: Joel Challis Date: Thu, 21 May 2020 17:59:56 +0100 Subject: [PATCH 017/930] Slight speed increases for matrix scanning (#9150) --- quantum/matrix.c | 41 +++++++++++++++++++++-------------- quantum/split_common/matrix.c | 41 +++++++++++++++++++++-------------- 2 files changed, 50 insertions(+), 32 deletions(-) diff --git a/quantum/matrix.c b/quantum/matrix.c index 67d8af6ee8a3..9e998508a75c 100644 --- a/quantum/matrix.c +++ b/quantum/matrix.c @@ -48,17 +48,22 @@ static void init_pins(void) { } 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; + // Start with a clear matrix row + matrix_row_t current_row_value = 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); + current_row_value |= readPin(pin) ? 0 : (MATRIX_ROW_SHIFTER << col_index); } } - return (last_row_value != current_matrix[current_row]); + // If the row has changed, store the row and return the changed flag. + if (current_matrix[current_row] != current_row_value) { + current_matrix[current_row] = current_row_value; + return true; + } + return false; } #elif defined(DIODE_DIRECTION) @@ -84,12 +89,9 @@ static void init_pins(void) { } } -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; +static bool read_cols_on_row(matrix_row_t current_matrix[], uint8_t current_row) { + // Start with a clear matrix row + matrix_row_t current_row_value = 0; // Select row and wait for row selecton to stabilize select_row(current_row); @@ -101,13 +103,18 @@ 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 : (MATRIX_ROW_SHIFTER << col_index); + current_row_value |= pin_state ? 0 : (MATRIX_ROW_SHIFTER << col_index); } // Unselect row unselect_row(current_row); - return (last_row_value != current_matrix[current_row]); + // If the row has changed, store the row and return the changed flag. + if (current_matrix[current_row] != current_row_value) { + current_matrix[current_row] = current_row_value; + return true; + } + return false; } # elif (DIODE_DIRECTION == ROW2COL) @@ -143,19 +150,21 @@ static bool read_rows_on_col(matrix_row_t current_matrix[], uint8_t current_col) 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]; + matrix_row_t current_row_value = last_row_value; // 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); + current_row_value |= (MATRIX_ROW_SHIFTER << current_col); } else { // Pin HI, clear col bit - current_matrix[row_index] &= ~(MATRIX_ROW_SHIFTER << current_col); + current_row_value &= ~(MATRIX_ROW_SHIFTER << current_col); } // Determine if the matrix changed state - if ((last_row_value != current_matrix[row_index]) && !(matrix_changed)) { - matrix_changed = true; + if ((last_row_value != current_row_value)) { + matrix_changed |= true; + current_matrix[row_index] = current_row_value; } } diff --git a/quantum/split_common/matrix.c b/quantum/split_common/matrix.c index 8b91f8ca8342..27c37d4b00da 100644 --- a/quantum/split_common/matrix.c +++ b/quantum/split_common/matrix.c @@ -65,17 +65,22 @@ static void init_pins(void) { } 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; + // Start with a clear matrix row + matrix_row_t current_row_value = 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); + current_row_value |= readPin(pin) ? 0 : (MATRIX_ROW_SHIFTER << col_index); } } - return (last_row_value != current_matrix[current_row]); + // If the row has changed, store the row and return the changed flag. + if (current_matrix[current_row] != current_row_value) { + current_matrix[current_row] = current_row_value; + return true; + } + return false; } #elif defined(DIODE_DIRECTION) @@ -101,12 +106,9 @@ static void init_pins(void) { } } -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; +static bool read_cols_on_row(matrix_row_t current_matrix[], uint8_t current_row) { + // Start with a clear matrix row + matrix_row_t current_row_value = 0; // Select row and wait for row selecton to stabilize select_row(current_row); @@ -118,13 +120,18 @@ 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 : (MATRIX_ROW_SHIFTER << col_index); + current_row_value |= pin_state ? 0 : (MATRIX_ROW_SHIFTER << col_index); } // Unselect row unselect_row(current_row); - return (last_row_value != current_matrix[current_row]); + // If the row has changed, store the row and return the changed flag. + if (current_matrix[current_row] != current_row_value) { + current_matrix[current_row] = current_row_value; + return true; + } + return false; } # elif (DIODE_DIRECTION == ROW2COL) @@ -160,19 +167,21 @@ static bool read_rows_on_col(matrix_row_t current_matrix[], uint8_t current_col) 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]; + matrix_row_t current_row_value = last_row_value; // 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); + current_row_value |= (MATRIX_ROW_SHIFTER << current_col); } else { // Pin HI, clear col bit - current_matrix[row_index] &= ~(MATRIX_ROW_SHIFTER << current_col); + current_row_value &= ~(MATRIX_ROW_SHIFTER << current_col); } // Determine if the matrix changed state - if ((last_row_value != current_matrix[row_index]) && !(matrix_changed)) { - matrix_changed = true; + if ((last_row_value != current_row_value)) { + matrix_changed |= true; + current_matrix[row_index] = current_row_value; } } From 65150984bd1f9c301b080652fe60b181765bb9be Mon Sep 17 00:00:00 2001 From: Joel Challis Date: Thu, 21 May 2020 18:00:21 +0100 Subject: [PATCH 018/930] ARM split - Add uart half duplex transport support (#7987) * ARM split - Add uart half duplex transport support * Fix for f103 * initial full duplex pass * partially remove full duplex * Correct speeds within driver docs Co-authored-by: Nick Brassel Co-authored-by: Nick Brassel --- docs/_summary.md | 1 + docs/serial_driver.md | 59 +++++++++ drivers/chibios/serial.h | 62 +++++++++ drivers/chibios/serial_usart.c | 234 +++++++++++++++++++++++++++++++++ 4 files changed, 356 insertions(+) create mode 100644 docs/serial_driver.md create mode 100644 drivers/chibios/serial.h create mode 100644 drivers/chibios/serial_usart.c diff --git a/docs/_summary.md b/docs/_summary.md index b711ab7d94e4..0e82ab4f0c8b 100644 --- a/docs/_summary.md +++ b/docs/_summary.md @@ -128,6 +128,7 @@ * [SPI Driver](spi_driver.md) * [WS2812 Driver](ws2812_driver.md) * [EEPROM Driver](eeprom_driver.md) + * ['serial' Driver](serial_driver.md) * [GPIO Controls](internals_gpio_control.md) * [Keyboard Guidelines](hardware_keyboard_guidelines.md) diff --git a/docs/serial_driver.md b/docs/serial_driver.md new file mode 100644 index 000000000000..395b3ec3f967 --- /dev/null +++ b/docs/serial_driver.md @@ -0,0 +1,59 @@ +# 'serial' Driver +This driver powers the [Split Keyboard](feature_split_keyboard.md) feature. + +!> Serial in this context should be read as **sending information one bit at a time**, rather than implementing UART/USART/RS485/RS232 standards. + +All drivers in this category have the following characteristics: +* Provides data and signaling over a single conductor +* Limited to single master, single slave + +## Supported Driver Types + +| | AVR | ARM | +|-------------------|--------------------|--------------------| +| bit bang | :heavy_check_mark: | Soon™ | +| USART Half-duplex | | :heavy_check_mark: | + +## Driver configuration + +### Bitbang +Default driver, the absence of configuration assumes this driver. To configure it, add this to your rules.mk: + +```make +SERIAL_DRIVER = bitbang +``` + +Configure the driver via your config.h: +```c +#define SOFT_SERIAL_PIN D0 // or D1, D2, D3, E6 +#define SELECT_SOFT_SERIAL_SPEED 1 // or 0, 2, 3, 4, 5 + // 0: about 189kbps (Experimental only) + // 1: about 137kbps (default) + // 2: about 75kbps + // 3: about 39kbps + // 4: about 26kbps + // 5: about 20kbps +``` + +### USART Half-duplex +Targeting STM32 boards where communication is offloaded to a USART hardware device. The advantage is that this provides fast and accurate timings. `SOFT_SERIAL_PIN` for this driver is the configured USART TX pin. **The TX pin must have appropriate pull-up resistors**. To configure it, add this to your rules.mk: + +```make +SERIAL_DRIVER = usart +``` + +Configure the hardware via your config.h: +```c +#define SOFT_SERIAL_PIN B6 // USART TX pin +#define SELECT_SOFT_SERIAL_SPEED 1 // or 0, 2, 3, 4, 5 + // 0: about 460800 baud + // 1: about 230400 baud (default) + // 2: about 115200 baud + // 3: about 57600 baud + // 4: about 38400 baud + // 5: about 19200 baud +#define SERIAL_USART_DRIVER SD1 // USART driver of TX pin. default: SD1 +#define SERIAL_USART_TX_PAL_MODE 7 // Pin "alternate function", see the respective datasheet for the appropriate values for your MCU. default: 7 +``` + +You must also turn on the SERIAL feature in your halconf.h and mcuconf.h diff --git a/drivers/chibios/serial.h b/drivers/chibios/serial.h new file mode 100644 index 000000000000..0c1857d52e32 --- /dev/null +++ b/drivers/chibios/serial.h @@ -0,0 +1,62 @@ +#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 simple API (using signle-type transaction function) +// /* nothing */ +// //// USE flexible API (using multi-type transaction function) +// #define SERIAL_USE_MULTI_TRANSACTION +// +// ///////////////////////////////////////////////////////////////// + +// 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 result +#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/drivers/chibios/serial_usart.c b/drivers/chibios/serial_usart.c new file mode 100644 index 000000000000..62b4913cbfbb --- /dev/null +++ b/drivers/chibios/serial_usart.c @@ -0,0 +1,234 @@ +#include "quantum.h" +#include "serial.h" +#include "printf.h" + +#include "ch.h" +#include "hal.h" + +#ifndef USART_CR1_M0 +# define USART_CR1_M0 USART_CR1_M // some platforms (f1xx) dont have this so +#endif + +#ifndef USE_GPIOV1 +// The default PAL alternate modes are used to signal that the pins are used for USART +# ifndef SERIAL_USART_TX_PAL_MODE +# define SERIAL_USART_TX_PAL_MODE 7 +# endif +#endif + +#ifndef SERIAL_USART_DRIVER +# define SERIAL_USART_DRIVER SD1 +#endif + +#ifndef SERIAL_USART_CR1 +# define SERIAL_USART_CR1 (USART_CR1_PCE | USART_CR1_PS | USART_CR1_M0) // parity enable, odd parity, 9 bit length +#endif + +#ifndef SERIAL_USART_CR2 +# define SERIAL_USART_CR2 (USART_CR2_STOP_1) // 2 stop bits +#endif + +#ifndef SERIAL_USART_CR3 +# define SERIAL_USART_CR3 0 +#endif + +#ifdef SOFT_SERIAL_PIN +# define SERIAL_USART_TX_PIN SOFT_SERIAL_PIN +#endif + +#ifndef SELECT_SOFT_SERIAL_SPEED +# define SELECT_SOFT_SERIAL_SPEED 1 +#endif + +#ifdef SERIAL_USART_SPEED +// Allow advanced users to directly set SERIAL_USART_SPEED +#elif SELECT_SOFT_SERIAL_SPEED == 0 +# define SERIAL_USART_SPEED 460800 +#elif SELECT_SOFT_SERIAL_SPEED == 1 +# define SERIAL_USART_SPEED 230400 +#elif SELECT_SOFT_SERIAL_SPEED == 2 +# define SERIAL_USART_SPEED 115200 +#elif SELECT_SOFT_SERIAL_SPEED == 3 +# define SERIAL_USART_SPEED 57600 +#elif SELECT_SOFT_SERIAL_SPEED == 4 +# define SERIAL_USART_SPEED 38400 +#elif SELECT_SOFT_SERIAL_SPEED == 5 +# define SERIAL_USART_SPEED 19200 +#else +# error invalid SELECT_SOFT_SERIAL_SPEED value +#endif + +#define TIMEOUT 100 +#define HANDSHAKE_MAGIC 7 + +static inline msg_t sdWriteHalfDuplex(SerialDriver* driver, uint8_t* data, uint8_t size) { + msg_t ret = sdWrite(driver, data, size); + + // Half duplex requires us to read back the data we just wrote - just throw it away + uint8_t dump[size]; + sdRead(driver, dump, size); + + return ret; +} +#undef sdWrite +#define sdWrite sdWriteHalfDuplex + +static inline msg_t sdWriteTimeoutHalfDuplex(SerialDriver* driver, uint8_t* data, uint8_t size, uint32_t timeout) { + msg_t ret = sdWriteTimeout(driver, data, size, timeout); + + // Half duplex requires us to read back the data we just wrote - just throw it away + uint8_t dump[size]; + sdReadTimeout(driver, dump, size, timeout); + + return ret; +} +#undef sdWriteTimeout +#define sdWriteTimeout sdWriteTimeoutHalfDuplex + +static inline void sdClear(SerialDriver* driver) { + while (sdGetTimeout(driver, TIME_IMMEDIATE) != MSG_TIMEOUT) { + // Do nothing with the data + } +} + +static SerialConfig sdcfg = { + (SERIAL_USART_SPEED), // speed - mandatory + (SERIAL_USART_CR1), // CR1 + (SERIAL_USART_CR2), // CR2 + (SERIAL_USART_CR3) // CR3 +}; + +void handle_soft_serial_slave(void); + +/* + * This thread runs on the slave and responds to transactions initiated + * by the master + */ +static THD_WORKING_AREA(waSlaveThread, 2048); +static THD_FUNCTION(SlaveThread, arg) { + (void)arg; + chRegSetThreadName("slave_transport"); + + while (true) { + handle_soft_serial_slave(); + } +} + +__attribute__((weak)) void usart_init(void) { +#if defined(USE_GPIOV1) + palSetLineMode(SERIAL_USART_TX_PIN, PAL_MODE_STM32_ALTERNATE_OPENDRAIN); +#else + palSetLineMode(SERIAL_USART_TX_PIN, PAL_MODE_ALTERNATE(SERIAL_USART_TX_PAL_MODE) | PAL_STM32_OTYPE_OPENDRAIN); +#endif +} + +void usart_master_init(void) { + usart_init(); + + sdcfg.cr3 |= USART_CR3_HDSEL; + sdStart(&SERIAL_USART_DRIVER, &sdcfg); +} + +void usart_slave_init(void) { + usart_init(); + + sdcfg.cr3 |= USART_CR3_HDSEL; + sdStart(&SERIAL_USART_DRIVER, &sdcfg); + + // Start transport thread + chThdCreateStatic(waSlaveThread, sizeof(waSlaveThread), HIGHPRIO, SlaveThread, NULL); +} + +static SSTD_t* Transaction_table = NULL; +static uint8_t Transaction_table_size = 0; + +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; + + usart_master_init(); +} + +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; + + usart_slave_init(); +} + +void handle_soft_serial_slave(void) { + uint8_t sstd_index = sdGet(&SERIAL_USART_DRIVER); // first chunk is always transaction id + SSTD_t* trans = &Transaction_table[sstd_index]; + + // Always write back the sstd_index as part of a basic handshake + sstd_index ^= HANDSHAKE_MAGIC; + sdWrite(&SERIAL_USART_DRIVER, &sstd_index, sizeof(sstd_index)); + + if (trans->initiator2target_buffer_size) { + sdRead(&SERIAL_USART_DRIVER, trans->initiator2target_buffer, trans->initiator2target_buffer_size); + } + + if (trans->target2initiator_buffer_size) { + sdWrite(&SERIAL_USART_DRIVER, trans->target2initiator_buffer, trans->target2initiator_buffer_size); + } + + if (trans->status) { + *trans->status = TRANSACTION_ACCEPTED; + } +} + +///////// +// start transaction by initiator +// +// int soft_serial_transaction(int sstd_index) +// +// Returns: +// TRANSACTION_END +// TRANSACTION_NO_RESPONSE +// TRANSACTION_DATA_ERROR +#ifndef SERIAL_USE_MULTI_TRANSACTION +int soft_serial_transaction(void) { + uint8_t sstd_index = 0; +#else +int soft_serial_transaction(int index) { + uint8_t sstd_index = index; +#endif + + if (sstd_index > Transaction_table_size) return TRANSACTION_TYPE_ERROR; + SSTD_t* trans = &Transaction_table[sstd_index]; + msg_t res = 0; + + sdClear(&SERIAL_USART_DRIVER); + + // First chunk is always transaction id + sdWriteTimeout(&SERIAL_USART_DRIVER, &sstd_index, sizeof(sstd_index), TIME_MS2I(TIMEOUT)); + + uint8_t sstd_index_shake = 0xFF; + + // Which we always read back first so that we can error out correctly + // - due to the half duplex limitations on return codes, we always have to read *something* + // - without the read, write only transactions *always* succeed, even during the boot process where the slave is not ready + res = sdReadTimeout(&SERIAL_USART_DRIVER, &sstd_index_shake, sizeof(sstd_index_shake), TIME_MS2I(TIMEOUT)); + if (res < 0 || (sstd_index_shake != (sstd_index ^ HANDSHAKE_MAGIC))) { + dprintf("serial::usart_shake NO_RESPONSE\n"); + return TRANSACTION_NO_RESPONSE; + } + + if (trans->initiator2target_buffer_size) { + res = sdWriteTimeout(&SERIAL_USART_DRIVER, trans->initiator2target_buffer, trans->initiator2target_buffer_size, TIME_MS2I(TIMEOUT)); + if (res < 0) { + dprintf("serial::usart_transmit NO_RESPONSE\n"); + return TRANSACTION_NO_RESPONSE; + } + } + + if (trans->target2initiator_buffer_size) { + res = sdReadTimeout(&SERIAL_USART_DRIVER, trans->target2initiator_buffer, trans->target2initiator_buffer_size, TIME_MS2I(TIMEOUT)); + if (res < 0) { + dprintf("serial::usart_receive NO_RESPONSE\n"); + return TRANSACTION_NO_RESPONSE; + } + } + + return TRANSACTION_END; +} From b95979560c9b789d143a51d58446ef5c284c107d Mon Sep 17 00:00:00 2001 From: zvecr Date: Fri, 18 Oct 2019 20:06:28 +0100 Subject: [PATCH 019/930] Initial arm serial partially based on old lets split code --- drivers/chibios/serial.c | 290 +++++++++++++++++++++++++++++++++++++++ quantum/stm32/halconf.h | 4 +- 2 files changed, 292 insertions(+), 2 deletions(-) create mode 100644 drivers/chibios/serial.c diff --git a/drivers/chibios/serial.c b/drivers/chibios/serial.c new file mode 100644 index 000000000000..26c68065321e --- /dev/null +++ b/drivers/chibios/serial.c @@ -0,0 +1,290 @@ +/* + * WARNING: be careful changing this code, it is very timing dependent + */ + +#include "quantum.h" +#include "serial.h" +#include "wait.h" + +#include "hal.h" + +// TODO: resolve/remove build warnings +#if defined(RGBLIGHT_ENABLE) && defined(RGBLED_SPLIT) && defined(PROTOCOL_CHIBIOS) && defined(WS2812_DRIVER_BITBANG) +# warning "RGBLED_SPLIT not supported with bitbang WS2812 driver" +#endif + +// default wait implementation cannot be called within interrupt +// this method seems to be more accurate than GPT timers +#if PORT_SUPPORTS_RT == FALSE +# error "chSysPolledDelayX method not supported on this platform" +#else +# undef wait_us +# define wait_us(x) chSysPolledDelayX(US2RTC(STM32_SYSCLK, x)) +#endif + +#ifndef SELECT_SOFT_SERIAL_SPEED +# define SELECT_SOFT_SERIAL_SPEED 1 +// TODO: correct speeds... +// 0: about 189kbps (Experimental only) +// 1: about 137kbps (default) +// 2: about 75kbps +// 3: about 39kbps +// 4: about 26kbps +// 5: about 20kbps +#endif + +// Serial pulse period in microseconds. At the moment, going lower than 12 causes communication failure +#if SELECT_SOFT_SERIAL_SPEED == 0 +# define SERIAL_DELAY 12 +#elif SELECT_SOFT_SERIAL_SPEED == 1 +# define SERIAL_DELAY 16 +#elif SELECT_SOFT_SERIAL_SPEED == 2 +# define SERIAL_DELAY 24 +#elif SELECT_SOFT_SERIAL_SPEED == 3 +# define SERIAL_DELAY 32 +#elif SELECT_SOFT_SERIAL_SPEED == 4 +# define SERIAL_DELAY 48 +#elif SELECT_SOFT_SERIAL_SPEED == 5 +# define SERIAL_DELAY 64 +#else +# error invalid SELECT_SOFT_SERIAL_SPEED value +#endif + +inline static void serial_delay(void) { wait_us(SERIAL_DELAY); } +inline static void serial_delay_half(void) { wait_us(SERIAL_DELAY / 2); } +inline static void serial_delay_blip(void) { wait_us(1); } +inline static void serial_output(void) { setPinOutput(SOFT_SERIAL_PIN); } +inline static void serial_input(void) { setPinInputHigh(SOFT_SERIAL_PIN); } +inline static bool serial_read_pin(void) { return !!readPin(SOFT_SERIAL_PIN); } +inline static void serial_low(void) { writePinLow(SOFT_SERIAL_PIN); } +inline static void serial_high(void) { writePinHigh(SOFT_SERIAL_PIN); } + +void interrupt_handler(void *arg); + +// Use thread + palWaitLineTimeout instead of palSetLineCallback +// - Methods like setPinOutput and palEnableLineEvent/palDisableLineEvent +// cause the interrupt to lock up, which would limit to only receiving data... +static THD_WORKING_AREA(waThread1, 128); +static THD_FUNCTION(Thread1, arg) { + (void)arg; + chRegSetThreadName("blinker"); + while (true) { + palWaitLineTimeout(SOFT_SERIAL_PIN, TIME_INFINITE); + interrupt_handler(NULL); + } +} + +static SSTD_t *Transaction_table = NULL; +static uint8_t Transaction_table_size = 0; + +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(); + + palEnablePadEvent(PAL_PORT(SOFT_SERIAL_PIN), PAL_PAD(SOFT_SERIAL_PIN), PAL_EVENT_MODE_FALLING_EDGE); + chThdCreateStatic(waThread1, sizeof(waThread1), HIGHPRIO, Thread1, NULL); +} + +// Used by the master to synchronize timing with the slave. +static void __attribute__((noinline)) 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 __attribute__((noinline)) sync_send(void) { + serial_output(); + + serial_low(); + serial_delay(); + + serial_high(); +} + +// Reads a byte from the serial line +static uint8_t __attribute__((noinline)) 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(); + } + + return byte; +} + +// Sends a byte with MSB ordering +static void __attribute__((noinline)) 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 +void interrupt_handler(void *arg) { + chSysLockFromISR(); + + sync_send(); + + // read mid pulses + serial_delay_blip(); + + uint8_t checksum_computed = 0; + int sstd_index = 0; + +#ifdef SERIAL_USE_MULTI_TRANSACTION + sstd_index = serial_read_byte(); + sync_send(); +#endif + + SSTD_t *trans = &Transaction_table[sstd_index]; + for (int i = 0; i < trans->initiator2target_buffer_size; ++i) { + trans->initiator2target_buffer[i] = serial_read_byte(); + sync_send(); + checksum_computed += trans->initiator2target_buffer[i]; + } + checksum_computed ^= 7; + uint8_t checksum_received = serial_read_byte(); + sync_send(); + + // wait for the sync to finish sending + serial_delay(); + + uint8_t checksum = 0; + for (int i = 0; i < trans->target2initiator_buffer_size; ++i) { + serial_write_byte(trans->target2initiator_buffer[i]); + sync_send(); + serial_delay_half(); + checksum += trans->target2initiator_buffer[i]; + } + serial_write_byte(checksum ^ 7); + sync_send(); + + // wait for the sync to finish sending + serial_delay(); + + *trans->status = (checksum_computed == checksum_received) ? TRANSACTION_ACCEPTED : TRANSACTION_DATA_ERROR; + + // end transaction + serial_input(); + + // TODO: remove extra delay between transactions + serial_delay(); + + chSysUnlockFromISR(); +} + +///////// +// 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) { + int sstd_index = 0; +#else +int soft_serial_transaction(int sstd_index) { +#endif + + if (sstd_index > Transaction_table_size) return TRANSACTION_TYPE_ERROR; + SSTD_t *trans = &Transaction_table[sstd_index]; + + // TODO: remove extra delay between transactions + serial_delay(); + + // this code is very time dependent, so we need to disable interrupts + chSysLock(); + + // signal to the slave that we want to start a transaction + serial_output(); + serial_low(); + serial_delay_blip(); + + // wait for the slaves response + serial_input(); + serial_high(); + serial_delay(); + + // check if the slave is present + if (serial_read_pin()) { + // slave failed to pull the line low, assume not present + dprintf("serial::NO_RESPONSE\n"); + chSysUnlock(); + return TRANSACTION_NO_RESPONSE; + } + + // if the slave is present syncronize with it + + uint8_t checksum = 0; + // send data to the slave +#ifdef SERIAL_USE_MULTI_TRANSACTION + serial_write_byte(sstd_index); // first chunk is transaction id + sync_recv(); +#endif + for (int i = 0; i < trans->initiator2target_buffer_size; ++i) { + serial_write_byte(trans->initiator2target_buffer[i]); + sync_recv(); + checksum += trans->initiator2target_buffer[i]; + } + serial_write_byte(checksum ^ 7); + sync_recv(); + + serial_delay(); + serial_delay(); // read mid pulses + + // receive data from the slave + uint8_t checksum_computed = 0; + for (int i = 0; i < trans->target2initiator_buffer_size; ++i) { + trans->target2initiator_buffer[i] = serial_read_byte(); + sync_recv(); + checksum_computed += trans->target2initiator_buffer[i]; + } + checksum_computed ^= 7; + uint8_t checksum_received = serial_read_byte(); + + sync_recv(); + serial_delay(); + + if ((checksum_computed) != (checksum_received)) { + dprintf("serial::FAIL[%u,%u,%u]\n", checksum_computed, checksum_received, sstd_index); + serial_output(); + serial_high(); + + chSysUnlock(); + return TRANSACTION_DATA_ERROR; + } + + // always, release the line when not in use + serial_high(); + serial_output(); + + chSysUnlock(); + return TRANSACTION_END; +} diff --git a/quantum/stm32/halconf.h b/quantum/stm32/halconf.h index 533803a25f18..b6c7b392ca71 100644 --- a/quantum/stm32/halconf.h +++ b/quantum/stm32/halconf.h @@ -203,7 +203,7 @@ * @note Disabling this option saves both code and data space. */ # if !defined(PAL_USE_CALLBACKS) || defined(__DOXYGEN__) -# define PAL_USE_CALLBACKS FALSE +# define PAL_USE_CALLBACKS TRUE # endif /** @@ -211,7 +211,7 @@ * @note Disabling this option saves both code and data space. */ # if !defined(PAL_USE_WAIT) || defined(__DOXYGEN__) -# define PAL_USE_WAIT FALSE +# define PAL_USE_WAIT TRUE # endif /*===========================================================================*/ From c63fd051dade376ec8d44245b3b8058dd5549af6 Mon Sep 17 00:00:00 2001 From: QMK Bot Date: Thu, 21 May 2020 17:39:29 +0000 Subject: [PATCH 020/930] format code according to conventions [skip ci] --- quantum/matrix.c | 4 ++-- quantum/split_common/matrix.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/quantum/matrix.c b/quantum/matrix.c index 9e998508a75c..c68c56cac204 100644 --- a/quantum/matrix.c +++ b/quantum/matrix.c @@ -89,7 +89,7 @@ static void init_pins(void) { } } -static bool read_cols_on_row(matrix_row_t current_matrix[], uint8_t current_row) { +static bool read_cols_on_row(matrix_row_t current_matrix[], uint8_t current_row) { // Start with a clear matrix row matrix_row_t current_row_value = 0; @@ -149,7 +149,7 @@ static bool read_rows_on_col(matrix_row_t current_matrix[], uint8_t current_col) // 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]; + matrix_row_t last_row_value = current_matrix[row_index]; matrix_row_t current_row_value = last_row_value; // Check row pin state diff --git a/quantum/split_common/matrix.c b/quantum/split_common/matrix.c index 27c37d4b00da..c3b43020ca27 100644 --- a/quantum/split_common/matrix.c +++ b/quantum/split_common/matrix.c @@ -106,7 +106,7 @@ static void init_pins(void) { } } -static bool read_cols_on_row(matrix_row_t current_matrix[], uint8_t current_row) { +static bool read_cols_on_row(matrix_row_t current_matrix[], uint8_t current_row) { // Start with a clear matrix row matrix_row_t current_row_value = 0; @@ -166,7 +166,7 @@ static bool read_rows_on_col(matrix_row_t current_matrix[], uint8_t current_col) // 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]; + matrix_row_t last_row_value = current_matrix[row_index]; matrix_row_t current_row_value = last_row_value; // Check row pin state From dae6f6b39bead1e5a709e7c07d4c3589fa5e1354 Mon Sep 17 00:00:00 2001 From: ridingqwerty Date: Thu, 21 May 2020 15:33:20 -0400 Subject: [PATCH 021/930] Remove broken example from Makefile (#9159) * Remove broken example from Makefile * Correct example in Vagrantfile --- Makefile | 2 +- Vagrantfile | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 9ad0755d57bf..e22af59d51af 100644 --- a/Makefile +++ b/Makefile @@ -295,7 +295,7 @@ define PARSE_RULE $$(info | make project_folder:keymap[:target]) $$(info | Examples:) $$(info | make planck/rev4:default:dfu) - $$(info | make planck:default) + $$(info | make planck/rev4:default) $$(info |) endif endef diff --git a/Vagrantfile b/Vagrantfile index dae4e0d53d95..adb93a3cee14 100644 --- a/Vagrantfile +++ b/Vagrantfile @@ -89,7 +89,7 @@ Vagrant.configure(2) do |config| Examples: make planck/rev4:default:dfu - make planck:default + make planck/rev4:default EOT end From 02a8c874f885241306a62e8f43d6ed1f0ef1d3ac Mon Sep 17 00:00:00 2001 From: Thomas Baart Date: Thu, 21 May 2020 21:43:39 +0200 Subject: [PATCH 022/930] [Keymap] Kyria: Updated personal keymap, added asapjockey's keymap (#8019) * Updated personal keymap, added asapjockey's keymap * Update keyboards/kyria/keymaps/asapjockey/keymap.c * Update keyboards/kyria/keymaps/asapjockey/keymap.c * Update keyboards/kyria/keymaps/asapjockey/keymap.c * Update keyboards/kyria/keymaps/asapjockey/keymap.c * Update keyboards/kyria/keymaps/asapjockey/keymap.c * Update keyboards/kyria/keymaps/asapjockey/keymap.c * Fixed layers, brackets * Update keyboards/kyria/keymaps/asapjockey/keymap.c * Update keyboards/kyria/keymaps/asapjockey/keymap.c * Update keyboards/kyria/keymaps/asapjockey/keymap.c * Update keyboards/kyria/keymaps/asapjockey/keymap.c * Update keyboards/kyria/keymaps/asapjockey/keymap.c * Update keyboards/kyria/keymaps/asapjockey/keymap.c --- keyboards/kyria/keymaps/asapjockey/config.h | 47 +++ keyboards/kyria/keymaps/asapjockey/keymap.c | 312 +++++++++++++++++++ keyboards/kyria/keymaps/asapjockey/rules.mk | 5 + keyboards/kyria/keymaps/default/rules.mk | 2 +- keyboards/kyria/keymaps/thomasbaart/keymap.c | 47 ++- 5 files changed, 401 insertions(+), 12 deletions(-) create mode 100644 keyboards/kyria/keymaps/asapjockey/config.h create mode 100644 keyboards/kyria/keymaps/asapjockey/keymap.c create mode 100644 keyboards/kyria/keymaps/asapjockey/rules.mk diff --git a/keyboards/kyria/keymaps/asapjockey/config.h b/keyboards/kyria/keymaps/asapjockey/config.h new file mode 100644 index 000000000000..e878663bfb1e --- /dev/null +++ b/keyboards/kyria/keymaps/asapjockey/config.h @@ -0,0 +1,47 @@ +/* Copyright 2019 Thomas Baart + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#pragma once + +#ifdef OLED_DRIVER_ENABLE + #define OLED_DISPLAY_128X64 +#endif + +#ifdef RGBLIGHT_ENABLE + #define RGBLIGHT_ANIMATIONS + #define RGBLIGHT_HUE_STEP 8 + #define RGBLIGHT_SAT_STEP 8 + #define RGBLIGHT_VAL_STEP 8 + #define RGBLIGHT_SLEEP +#endif + +// EC11K encoders have a different resolution than other EC11 encoders. +// When using the default resolution of 4, if you notice your encoder skipping +// every other tick, lower the resolution to 2. +#define ENCODER_RESOLUTION 2 + +// The Leader key allows to flexibly assign macros to key sequences. +#define LEADER_PER_KEY_TIMING +#define LEADER_TIMEOUT 350 + +#define TAPPING_TERM 200 + +// 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 + +// Allows media codes to properly register in macros and rotary encoder code +#define TAP_CODE_DELAY 10 \ No newline at end of file diff --git a/keyboards/kyria/keymaps/asapjockey/keymap.c b/keyboards/kyria/keymaps/asapjockey/keymap.c new file mode 100644 index 000000000000..46e70e9e96f0 --- /dev/null +++ b/keyboards/kyria/keymaps/asapjockey/keymap.c @@ -0,0 +1,312 @@ +/* Copyright 2019 Thomas Baart + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public 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, + LOWER, + RAISE, + NAV, + ADJUST +}; + +enum custom_keycodes { + KC_LBR = SAFE_RANGE, + KC_RBR +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +/* + * Base Layer: QWERTY + * + * ,-------------------------------------------. ,-------------------------------------------. + * | TAB | Q | W | E | R | T | | Y | U | I | O | P | RCTL | + * |--------+------+------+------+------+------| |------+------+------+------+------+--------| + * | LCTL | A | S | D | F | G | | H | J | K | L | ; : | ' " | + * |--------+------+------+------+------+------+-------------. ,-------------+------+------+------+------+------+--------| + * | LSFT | Z | X | C | V | B | Del | Raise| |Adjust| Esc | N | M | , < | . > | / ? | LSFT | + * `----------------------+------+------+------+------+------| |------+------+------+------+------+----------------------' + * | | LALT | | Bspc | Lower| | Enter| Space| [ { | ] } | | + * | | | | | | | | | | | | + * `----------------------------------' `----------------------------------' + */ + [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_RCTL, + 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_DEL, MO(RAISE), MO(ADJUST), KC_ESC, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_LSFT, + XXXXXXX, KC_LALT, XXXXXXX, KC_BSPC, MO(LOWER), KC_ENT, KC_SPC, KC_LBR, KC_RBR, XXXXXXX + ), +/* + * Lower Layer: Numbers, functions, symbols + * + * ,-------------------------------------------. ,-------------------------------------------. + * | | 1 ! | 2 @ | 3 # | 4 $ | 5 % | | 6 ^ | 7 & | 8 * | 9 ( | 0 ) | | + * |--------+------+------+------+------+------| |------+------+------+------+------+--------| + * | | ! | @ | # | $ | % | | ^ | & | * | ( | ) | | + * |--------+------+------+------+------+------+-------------. ,-------------+------+------+------+------+------+--------| + * | | F1 | F2 | F3 | F4 | F5 | | | | | | F6 | F7 | F8 | F9 | F10 | | + * `----------------------+------+------+------+------+------| |------+------+------+------+------+----------------------' + * | | | | | | | | | ( | ) | | + * | | | | | | | | | | | | + * `----------------------------------' `----------------------------------' + */ + [LOWER] = LAYOUT( + _______, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, _______, + _______, 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_LPRN, KC_RPRN, _______ + ), +/* + * Raise Layer: Functions, Numbers + * + * ,-------------------------------------------. ,-------------------------------------------. + * | | | F7 | F8 | F9 | | | | 7 & | 8 * | 9 ( | - _ | | + * |--------+------+------+------+------+------| |------+------+------+------+------+--------| + * | | | F4 | F5 | F6 | | | | 4 * | 5 % | 6 ^ | = + | RCTL | + * |--------+------+------+------+------+------+-------------. ,-------------+------+------+------+------+------+--------| + * | | | F1 | F2 | F3 | | | | | | | | 1 ! | 2 @ | 3 # | \ | | | + * `----------------------+------+------+------+------+------| |------+------+------+------+------+----------------------' + * | | | | | | | | | 0 ) | | | + * | | | | | | | | | | | | + * `----------------------------------' `----------------------------------' + */ + [RAISE] = LAYOUT( + _______, _______, KC_F7, KC_F8, KC_F9, _______, _______, KC_7, KC_8, KC_9, _______, _______, + _______, _______, KC_F4, KC_F5, KC_F6, _______, _______, KC_4, KC_5, KC_6, _______, KC_RCTL, + _______, _______, KC_F1, KC_F2, KC_F3, _______, _______, _______, _______, _______, _______, KC_1, KC_2, KC_3, _______, _______, + _______, _______, _______, _______, _______, _______, _______, KC_0, _______, _______ + ), +/* + * Navigation Layer + * + * ,-------------------------------------------. ,-------------------------------------------. + * | | | | | | | | | | Up | | | RGBTOG | + * |--------+------+------+------+------+------| |------+------+------+------+------+--------| + * | | | | | | | | | Left | Down | Right| | RGBOFF | + * |--------+------+------+------+------+------+-------------. ,-------------+------+------+------+------+------+--------| + * | | | | | | | | | | | | | | | | | RGBON | + * `----------------------+------+------+------+------+------| |------+------+------+------+------+----------------------' + * | | | | | | | | | Reset|Debug | | + * | | | | | | | | | | | | + * `----------------------------------' `----------------------------------' + */ + [ADJUST] = LAYOUT( + _______, _______, _______, _______, _______, _______, _______, _______, KC_UP, _______, _______, RGB_TOG, + _______, _______, _______, _______, _______, _______, _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, RGB_HUI, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_HUD, + _______, _______, _______, _______, _______, _______, _______, RESET, DEBUG, _______ + ), +// /* +// * Layer template +// * +// * ,-------------------------------------------. ,-------------------------------------------. +// * | | | | | | | | | | | | | | +// * |--------+------+------+------+------+------| |------+------+------+------+------+--------| +// * | | | | | | | | | | | | | | +// * |--------+------+------+------+------+------+-------------. ,-------------+------+------+------+------+------+--------| +// * | | | | | | | | | | | | | | | | | | +// * `----------------------+------+------+------+------+------| |------+------+------+------+------+----------------------' +// * | | | | | | | | | | | | +// * | | | | | | | | | | | | +// * `----------------------------------' `----------------------------------' +// */ +// [_LAYERINDEX] = LAYOUT( +// _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, +// _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, +// _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, +// _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ +// ), +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case KC_LBR: { + if (record->event.pressed) { + if ((get_mods() & MOD_MASK_SHIFT) == MOD_MASK_SHIFT) { + register_code(KC_9); + } else { + register_code(KC_LBRC); + } + } else { // Release the key + if ((get_mods() & MOD_MASK_SHIFT) == MOD_MASK_SHIFT) { + unregister_code(KC_9); + } else { + unregister_code(KC_LBRC); + } + } + return false; + break; + } + case KC_RBR: { + if (record->event.pressed) { + if ((get_mods() & MOD_MASK_SHIFT) == MOD_MASK_SHIFT) { + register_code(KC_0); + } else { + register_code(KC_RBRC); + } + } else { // Release the key + if ((get_mods() & MOD_MASK_SHIFT) == MOD_MASK_SHIFT) { + unregister_code(KC_0); + } else { + unregister_code(KC_RBRC); + } + } + return false; + break; + } + } + return true; +} + +LEADER_EXTERNS(); + +void matrix_scan_user(void) { + LEADER_DICTIONARY() { + leading = false; + leader_end(); + + SEQ_ONE_KEY(KC_F) { // Shift + Ctrl + F + tap_code16(S(C(KC_F))); + } + } +} + +#ifdef OLED_DRIVER_ENABLE +oled_rotation_t oled_init_user(oled_rotation_t rotation) { + return OLED_ROTATION_180; +} + +static void render_kyria_logo(void) { + static const char PROGMEM kyria_logo[] = { + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128,128,192,224,240,112,120, 56, 60, 28, 30, 14, 14, 14, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 14, 14, 14, 30, 28, 60, 56,120,112,240,224,192,128,128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0,192,224,240,124, 62, 31, 15, 7, 3, 1,128,192,224,240,120, 56, 60, 28, 30, 14, 14, 7, 7,135,231,127, 31,255,255, 31,127,231,135, 7, 7, 14, 14, 30, 28, 60, 56,120,240,224,192,128, 1, 3, 7, 15, 31, 62,124,240,224,192, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0,240,252,255, 31, 7, 1, 0, 0,192,240,252,254,255,247,243,177,176, 48, 48, 48, 48, 48, 48, 48,120,254,135, 1, 0, 0,255,255, 0, 0, 1,135,254,120, 48, 48, 48, 48, 48, 48, 48,176,177,243,247,255,254,252,240,192, 0, 0, 1, 7, 31,255,252,240, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0,255,255,255, 0, 0, 0, 0, 0,254,255,255, 1, 1, 7, 30,120,225,129,131,131,134,134,140,140,152,152,177,183,254,248,224,255,255,224,248,254,183,177,152,152,140,140,134,134,131,131,129,225,120, 30, 7, 1, 1,255,255,254, 0, 0, 0, 0, 0,255,255,255, 0, 0, 0, 0,255,255, 0, 0,192,192, 48, 48, 0, 0,240,240, 0, 0, 0, 0, 0, 0,240,240, 0, 0,240,240,192,192, 48, 48, 48, 48,192,192, 0, 0, 48, 48,243,243, 0, 0, 0, 0, 0, 0, 48, 48, 48, 48, 48, 48,192,192, 0, 0, 0, 0, 0, + 0, 0, 0,255,255,255, 0, 0, 0, 0, 0,127,255,255,128,128,224,120, 30,135,129,193,193, 97, 97, 49, 49, 25, 25,141,237,127, 31, 7,255,255, 7, 31,127,237,141, 25, 25, 49, 49, 97, 97,193,193,129,135, 30,120,224,128,128,255,255,127, 0, 0, 0, 0, 0,255,255,255, 0, 0, 0, 0, 63, 63, 3, 3, 12, 12, 48, 48, 0, 0, 0, 0, 51, 51, 51, 51, 51, 51, 15, 15, 0, 0, 63, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 48, 48, 63, 63, 48, 48, 0, 0, 12, 12, 51, 51, 51, 51, 51, 51, 63, 63, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 15, 63,255,248,224,128, 0, 0, 3, 15, 63,127,255,239,207,141, 13, 12, 12, 12, 12, 12, 12, 12, 30,127,225,128, 0, 0,255,255, 0, 0,128,225,127, 30, 12, 12, 12, 12, 12, 12, 12, 13,141,207,239,255,127, 63, 15, 3, 0, 0,128,224,248,255, 63, 15, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 3, 7, 15, 62,124,248,240,224,192,128, 1, 3, 7, 15, 30, 28, 60, 56,120,112,112,224,224,225,231,254,248,255,255,248,254,231,225,224,224,112,112,120, 56, 60, 28, 30, 15, 7, 3, 1,128,192,224,240,248,124, 62, 15, 7, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 3, 7, 15, 14, 30, 28, 60, 56,120,112,112,112,224,224,224,224,224,224,224,224,224,224,224,224,224,224,224,224,112,112,112,120, 56, 60, 28, 30, 14, 15, 7, 3, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 + }; + oled_write_raw_P(kyria_logo, sizeof(kyria_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); +} + +static void render_status(void) { + // QMK Logo and version information + render_qmk_logo(); + oled_write_P(PSTR(" Kyria rev1.0\n\n"), false); + + // 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 LOWER: + oled_write_P(PSTR("Lower\n"), false); + break; + case RAISE: + oled_write_P(PSTR("Raise\n"), false); + break; + case NAV: + oled_write_P(PSTR("Navigation\n"), false); + break; + case ADJUST: + oled_write_P(PSTR("Adjust\n"), false); + break; + default: + oled_write_P(PSTR("Undefined\n"), false); + } + + // Host Keyboard LED Status + led_t led_state = host_keyboard_led_state(); + oled_write_P(led_state.num_lock ? PSTR("NUMLCK ") : PSTR(" "), false); + oled_write_P(led_state.caps_lock ? PSTR("CAPLCK ") : PSTR(" "), false); + oled_write_P(led_state.scroll_lock ? PSTR("SCRLCK ") : PSTR(" "), false); +} + +void oled_task_user(void) { + if (is_keyboard_master()) { + render_status(); // Renders the current keyboard state (layer, lock, caps, scroll, etc) + } else { + render_kyria_logo(); + } +} +#endif + +#ifdef ENCODER_ENABLE +void encoder_update_user(uint8_t index, bool clockwise) { + if (index == 0) { + switch (get_highest_layer(layer_state)) { + case QWERTY: + if (clockwise) { // Ctrl + I + tap_code16(C(KC_I)); + } else { // Shift + F3 + tap_code16(S(KC_F3)); + } + break; + case LOWER: + // History scrubbing. For Adobe products, hold shift while moving + // backward to go forward instead. + if (clockwise) { + tap_code16(C(KC_Y)); + } else { + tap_code16(C(KC_Z)); + } + break; + case RAISE: + if (clockwise) { // Subscript: CTRL + = + tap_code16(C(KC_EQL)); + } + break; + default: + // Nothing + break; + } + } else if (index == 1) { + switch (get_highest_layer(layer_state)) { + case QWERTY: + // Scroll by letter horizontally + if (clockwise) { + tap_code16(KC_RGHT); + } else { + tap_code16(KC_LEFT); + } + case LOWER: + // Nothing + break; + case RAISE: + // Find previous/Find next + if (clockwise) { + tap_code(KC_F3); + } else { + tap_code16(S(KC_F3)); + } + default: + // Nothing + break; + } + } +} +#endif diff --git a/keyboards/kyria/keymaps/asapjockey/rules.mk b/keyboards/kyria/keymaps/asapjockey/rules.mk new file mode 100644 index 000000000000..9b8e2941987c --- /dev/null +++ b/keyboards/kyria/keymaps/asapjockey/rules.mk @@ -0,0 +1,5 @@ +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 +LEADER_ENABLE = yes # Enable the Leader Key feature +MOUSEKEY_ENABLE = no diff --git a/keyboards/kyria/keymaps/default/rules.mk b/keyboards/kyria/keymaps/default/rules.mk index 213c50a80fe1..e3486a8a9f7e 100644 --- a/keyboards/kyria/keymaps/default/rules.mk +++ b/keyboards/kyria/keymaps/default/rules.mk @@ -1,3 +1,3 @@ OLED_DRIVER_ENABLE = yes # Enables the use of OLED displays -ENCODER_ENABLE = yes # ENables the use of one or more encoders +ENCODER_ENABLE = yes # Enables the use of one or more encoders RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow \ No newline at end of file diff --git a/keyboards/kyria/keymaps/thomasbaart/keymap.c b/keyboards/kyria/keymaps/thomasbaart/keymap.c index ea6ce0a749e2..6709cd86723b 100644 --- a/keyboards/kyria/keymaps/thomasbaart/keymap.c +++ b/keyboards/kyria/keymaps/thomasbaart/keymap.c @@ -173,9 +173,20 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { return true; } + +bool is_alt_tab_active = false; +uint16_t alt_tab_timer = 0; + LEADER_EXTERNS(); void matrix_scan_user(void) { + if (is_alt_tab_active) { + if (timer_elapsed(alt_tab_timer) > 1000) { + unregister_code(KC_LALT); + is_alt_tab_active = false; + } + } + LEADER_DICTIONARY() { leading = false; leader_end(); @@ -192,7 +203,13 @@ void matrix_scan_user(void) { SEQ_TWO_KEYS(KC_F, KC_P) { // Fusion Projection prefix SEND_STRING("[Projection] "); } - SEQ_TWO_KEYS(KC_E, KC_S) { // Email splitkb + SEQ_TWO_KEYS(KC_B, KC_B) { // Basecone invoice description + SEND_STRING("[Leveranciersnaam] [Factuurnummer]"); + } + SEQ_TWO_KEYS(KC_E, KC_S) { // Support email splitkb + SEND_STRING("support@splitkb.com"); + } + SEQ_TWO_KEYS(KC_E, KC_T) { // Email splitkb SEND_STRING("thomas@splitkb.com"); } SEQ_TWO_KEYS(KC_E, KC_P) { // Email personal @@ -204,15 +221,18 @@ void matrix_scan_user(void) { SEQ_TWO_KEYS(KC_S, KC_V) { // Splitkb VAT number SEND_STRING("NL210593349B01"); } - SEQ_THREE_KEYS(KC_S, KC_D, KC_K) { // Splitkb Kyria build log - SEND_STRING("https://docs.splitkb.com/docs/kyria-build-log/"); - } SEQ_TWO_KEYS(KC_B, KC_C) { // Discord bongocat SEND_STRING(":bongocat:\n"); } SEQ_TWO_KEYS(KC_C, KC_B) { // Discord code block SEND_STRING("```c" SS_LSFT("\n\n") "``` " SS_TAP(X_UP)); } + SEQ_TWO_KEYS(KC_Y, KC_S) { // Greeting + SEND_STRING("Yours sincerely,\n\nThomas Baart"); + } + SEQ_THREE_KEYS(KC_M, KC_V, KC_G) { // Greeting + SEND_STRING("Met vriendelijke groet,\n\nThomas Baart"); + } } } @@ -292,20 +312,25 @@ void encoder_update_user(uint8_t index, bool clockwise) { if (index == 0) { switch (biton32(layer_state)) { case QWERTY: - // Move whole words. Hold shift to select while moving. + // History scrubbing. For Adobe products, hold shift while moving + // backward to go forward instead. if (clockwise) { - tap_code16(C(KC_RGHT)); + tap_code16(C(KC_Z)); } else { - tap_code16(C(KC_LEFT)); + tap_code16(C(KC_Y)); } break; default: - // History scrubbing. For Adobe products, hold shift while moving - // backward to go forward instead. + // Switch between windows on Windows with alt tab. if (clockwise) { - tap_code16(C(KC_Z)); + if (!is_alt_tab_active) { + is_alt_tab_active = true; + register_code(KC_LALT); + } + alt_tab_timer = timer_read(); + tap_code16(KC_TAB); } else { - tap_code16(C(KC_Y)); + tap_code16(S(KC_TAB)); } break; } From 5246acb2e4c188198d503856a493b66174486db8 Mon Sep 17 00:00:00 2001 From: Rys Sommefeldt Date: Thu, 21 May 2020 20:49:35 +0100 Subject: [PATCH 023/930] [Keyboard] Add support for Ace of Spades TKL keyboard (#9128) * Add support for Ace of Spades * Fix the F-row mappings * Add the tkl_iso layout * Put KC_PAUS back in place of top layer reset * aholland909 personal keymap for Ace of Spades * Address PR feedback and rename to aos/tkl * Rename keyboard implementation filenames * Remove unnecessary layers * info.json for the configurator --- keyboards/aos/tkl/config.h | 56 +++++++++++ keyboards/aos/tkl/info.json | 98 +++++++++++++++++++ .../aos/tkl/keymaps/aholland909/keymap.c | 38 +++++++ keyboards/aos/tkl/keymaps/default/keymap.c | 38 +++++++ keyboards/aos/tkl/keymaps/default/readme.md | 3 + keyboards/aos/tkl/keymaps/via/keymap.c | 55 +++++++++++ keyboards/aos/tkl/keymaps/via/rules.mk | 2 + keyboards/aos/tkl/readme.md | 13 +++ keyboards/aos/tkl/rules.mk | 32 ++++++ keyboards/aos/tkl/tkl.c | 18 ++++ keyboards/aos/tkl/tkl.h | 46 +++++++++ 11 files changed, 399 insertions(+) create mode 100644 keyboards/aos/tkl/config.h create mode 100644 keyboards/aos/tkl/info.json create mode 100644 keyboards/aos/tkl/keymaps/aholland909/keymap.c create mode 100644 keyboards/aos/tkl/keymaps/default/keymap.c create mode 100644 keyboards/aos/tkl/keymaps/default/readme.md create mode 100644 keyboards/aos/tkl/keymaps/via/keymap.c create mode 100644 keyboards/aos/tkl/keymaps/via/rules.mk create mode 100644 keyboards/aos/tkl/readme.md create mode 100644 keyboards/aos/tkl/rules.mk create mode 100644 keyboards/aos/tkl/tkl.c create mode 100644 keyboards/aos/tkl/tkl.h diff --git a/keyboards/aos/tkl/config.h b/keyboards/aos/tkl/config.h new file mode 100644 index 000000000000..4e6ab3e3dc72 --- /dev/null +++ b/keyboards/aos/tkl/config.h @@ -0,0 +1,56 @@ +/* +Copyright 2020 aholland909 + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License 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 0x504B +#define PRODUCT_ID 0x1000 +#define DEVICE_VER 0x0001 +#define MANUFACTURER Ace of Spades +#define PRODUCT Ace of Spades TKL +#define DESCRIPTION Ace of Spades TKL + +/* key matrix size */ +#define MATRIX_ROWS 6 +#define MATRIX_COLS 17 + +#define MATRIX_ROW_PINS { D3, D2, B7, F1, C7, D5 } +#define MATRIX_COL_PINS { B0, B1, B2, B3, F4, F5, F6, F7, B6, B5, D7, B4, D6, F0, D1, C6, D4 } +#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 LOCKING_SUPPORT_ENABLE +/* Locking resynchronize hack */ +#define LOCKING_RESYNC_ENABLE + + +#define RGB_DI_PIN E6 +#ifdef RGB_DI_PIN + #define RGBLIGHT_ANIMATIONS + #define RGBLED_NUM 88 + #define RGBLIGHT_HUE_STEP 8 + #define RGBLIGHT_SAT_STEP 8 + #define RGBLIGHT_VAL_STEP 8 +#endif diff --git a/keyboards/aos/tkl/info.json b/keyboards/aos/tkl/info.json new file mode 100644 index 000000000000..f9665f3597f0 --- /dev/null +++ b/keyboards/aos/tkl/info.json @@ -0,0 +1,98 @@ +{ + "keyboard_name": "Ace of Spades TKL", + "maintainer": "rys", + "width": 18.25, + "height": 6.5, + "layouts": { + "LAYOUT_tkl_iso_wkl": { + "key_count": 85, + "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":"PrtSc", "x":15.25, "y":0}, + {"label":"Scroll Lock", "x":16.25, "y":0}, + {"label":"Pause", "x":17.25, "y":0}, + {"label":"\u00ac", "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":"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":"PgUp", "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":"PgDn", "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":"Up", "x":16.25, "y":4.5}, + {"label":"Ctrl", "x":0, "y":5.5, "w":1.5}, + {"label":"Alt", "x":2.5, "y":5.5, "w":1.5}, + {"label":"Space", "x":4, "y":5.5, "w":7}, + {"label":"AltGr", "x":11, "y":5.5, "w":1.5}, + {"label":"Ctrl", "x":13.5, "y":5.5, "w":1.5}, + {"label":"Left", "x":15.25, "y":5.5}, + {"label":"Down", "x":16.25, "y":5.5}, + {"label":"Right", "x":17.25, "y":5.5} + ] + } + } +} diff --git a/keyboards/aos/tkl/keymaps/aholland909/keymap.c b/keyboards/aos/tkl/keymaps/aholland909/keymap.c new file mode 100644 index 000000000000..5e224811fc76 --- /dev/null +++ b/keyboards/aos/tkl/keymaps/aholland909/keymap.c @@ -0,0 +1,38 @@ +/* +Copyright 2020 aholland909 + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public 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_iso_wkl( + 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_PSCR, KC_SLCK, KC_PAUSE, + + 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, + 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_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_SPC, KC_RGUI, TG(1), KC_LEFT, KC_DOWN, KC_RGHT), + + [1] = LAYOUT_tkl_iso_wkl( + RESET, 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_VOLU, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_M_P, RGB_M_B, _______, + _______, KC_MPRV, KC_VOLD, KC_MNXT, _______, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, _______, _______, _______, _______, + _______, _______, _______, _______, KC_CALC, _______, _______, _______, _______, _______, _______, _______, _______, RGB_HUI, + _______, _______, KC_MPLY, _______, _______, RGB_SAD, RGB_HUD, RGB_VAI), +}; diff --git a/keyboards/aos/tkl/keymaps/default/keymap.c b/keyboards/aos/tkl/keymaps/default/keymap.c new file mode 100644 index 000000000000..924815fcb3ae --- /dev/null +++ b/keyboards/aos/tkl/keymaps/default/keymap.c @@ -0,0 +1,38 @@ +/* +Copyright 2020 aholland909 + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public 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_iso_wkl( + KC_ESC, KC_F1, KC_F1, 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_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_SPC, KC_RGUI, MO(1), KC_LEFT, KC_DOWN, KC_RGHT + ), + [1] = LAYOUT_tkl_iso_wkl( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, RGB_M_P, RGB_M_B, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_HUI, + _______, _______, _______, _______, _______, RGB_SAD, RGB_HUD, RGB_VAI + ), +}; diff --git a/keyboards/aos/tkl/keymaps/default/readme.md b/keyboards/aos/tkl/keymaps/default/readme.md new file mode 100644 index 000000000000..0de9187eaa4f --- /dev/null +++ b/keyboards/aos/tkl/keymaps/default/readme.md @@ -0,0 +1,3 @@ +# The default keymap for Ace of Spades + +The Ace of Spades is a fixed ISO TKL with blocked winkeyless bottom row. diff --git a/keyboards/aos/tkl/keymaps/via/keymap.c b/keyboards/aos/tkl/keymaps/via/keymap.c new file mode 100644 index 000000000000..53d8481112ea --- /dev/null +++ b/keyboards/aos/tkl/keymaps/via/keymap.c @@ -0,0 +1,55 @@ +/* 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_tkl_iso_wkl( + KC_ESC, KC_F1, KC_F1, 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_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_SPC, KC_RGUI, MO(1), KC_LEFT, KC_DOWN, KC_RGHT + ), + [1] = LAYOUT_tkl_iso_wkl( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, RGB_M_P, RGB_M_B, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_HUI, + _______, _______, _______, _______, _______, RGB_SAD, RGB_HUD, RGB_VAI + ), + [2] = LAYOUT_tkl_iso_wkl( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______ + ), + [3] = LAYOUT_tkl_iso_wkl( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______ + ), +}; diff --git a/keyboards/aos/tkl/keymaps/via/rules.mk b/keyboards/aos/tkl/keymaps/via/rules.mk new file mode 100644 index 000000000000..96d2d189b2e6 --- /dev/null +++ b/keyboards/aos/tkl/keymaps/via/rules.mk @@ -0,0 +1,2 @@ +VIA_ENABLE = yes +MOUSEKEY_ENABLE = no diff --git a/keyboards/aos/tkl/readme.md b/keyboards/aos/tkl/readme.md new file mode 100644 index 000000000000..f1e59385aadc --- /dev/null +++ b/keyboards/aos/tkl/readme.md @@ -0,0 +1,13 @@ +# Ace of Spades TKL + +The TKL is a custom limited run keyboard designed by Ace of Spades and manufactured by Salvun. + +* Keyboard Maintainers: [aholland909](https://github.com/aholland909), [rys](https://github.com/rys) +* Hardware Supported: Ace of Spades custom TKL PCB by [aholland909](https://github.com/aholland909) +* Hardware Availability: Custom group buy + +Make example for this keyboard (after setting up your build environment): + + make aos/tkl: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/aos/tkl/rules.mk b/keyboards/aos/tkl/rules.mk new file mode 100644 index 000000000000..7a4fa8939133 --- /dev/null +++ b/keyboards/aos/tkl/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 = 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 diff --git a/keyboards/aos/tkl/tkl.c b/keyboards/aos/tkl/tkl.c new file mode 100644 index 000000000000..b4ff32d8f4a3 --- /dev/null +++ b/keyboards/aos/tkl/tkl.c @@ -0,0 +1,18 @@ +/* +Copyright 2020 aholland909 + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#include "tkl.h" diff --git a/keyboards/aos/tkl/tkl.h b/keyboards/aos/tkl/tkl.h new file mode 100644 index 000000000000..de1b9da27c6e --- /dev/null +++ b/keyboards/aos/tkl/tkl.h @@ -0,0 +1,46 @@ +/* +Copyright 2020 aholland909 + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License 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_tkl_iso_wkl( \ + K000, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, 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, K214, K215, K216, \ + K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K213, \ + K400, K401, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, K412, K415, \ + K500, K502, K505, K510, K512, K513, K515, K516 \ +) { \ + { K000, KC_NO, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, 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, K411, K412, KC_NO, KC_NO, K415, KC_NO }, \ + { K500, KC_NO, K502, KC_NO, KC_NO, KC_NO, KC_NO, K505, KC_NO, KC_NO, K510, KC_NO, K512, K513, KC_NO, K515, K516 }, \ +} From 179e5c018fcee9bcb0a7f1907cc96d44ed5cf554 Mon Sep 17 00:00:00 2001 From: Erovia Date: Thu, 21 May 2020 21:56:43 +0200 Subject: [PATCH 024/930] CLI: Rework submodule checking (#9162) --- lib/python/qmk/cli/doctor.py | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/lib/python/qmk/cli/doctor.py b/lib/python/qmk/cli/doctor.py index 20f8650e5e21..011c3dd3c23b 100755 --- a/lib/python/qmk/cli/doctor.py +++ b/lib/python/qmk/cli/doctor.py @@ -24,7 +24,6 @@ }, 'bin/qmk': {}, } -ESSENTIAL_SUBMODULES = ['lib/chibios', 'lib/lufa'] def _udev_rule(vid, pid=None, *args): @@ -124,17 +123,11 @@ def check_submodules(): 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']) + cli.log.error('Submodule %s has not yet been cloned!', submodule['name']) + ok = False elif not submodule['status']: - if submodule['name'] in ESSENTIAL_SUBMODULES: - cli.log.error('Submodule %s is not up to date!', submodule['name']) - ok = False - else: - cli.log.warn('Submodule %s is not up to date!', submodule['name']) + cli.log.error('Submodule %s is not up to date!', submodule['name']) + ok = False return ok From 6d84795bc1e4b867725e3ddd906af9e125f71e3b Mon Sep 17 00:00:00 2001 From: Joel Challis Date: Thu, 21 May 2020 21:20:46 +0100 Subject: [PATCH 025/930] Update ARM split keyboard docs (#9160) * Update ARM split keyboard docs * Update docs/serial_driver.md Co-authored-by: Nick Brassel Co-authored-by: Nick Brassel --- docs/feature_split_keyboard.md | 13 ++++++++++++- docs/proton_c_conversion.md | 2 +- docs/serial_driver.md | 16 +++++++++++++--- 3 files changed, 26 insertions(+), 5 deletions(-) diff --git a/docs/feature_split_keyboard.md b/docs/feature_split_keyboard.md index 66194c5f4b2f..63374a804e29 100644 --- a/docs/feature_split_keyboard.md +++ b/docs/feature_split_keyboard.md @@ -8,9 +8,20 @@ QMK Firmware has a generic implementation that is usable by any board, as well a For this, we will mostly be talking about the generic implementation used by the Let's Split and other keyboards. -!> ARM is not yet supported for Split Keyboards. Progress is being made, but we are not quite there, yet. +!> ARM is not yet fully supported for Split Keyboards and has many limitations. Progress is being made, but we have not yet reached 100% feature parity. +## Compatibility Overview + +| Transport | AVR | ARM | +|------------------------------|--------------------|--------------------| +| ['serial'](serial_driver.md) | :heavy_check_mark: | :white_check_mark: 1 | +| I2C | :heavy_check_mark: | | + +Notes: + +1. Both hardware and software limitations are detailed within the [driver documentation](serial_driver.md). + ## Hardware Configuration This assumes that you're using two Pro Micro-compatible controllers, and are using TRRS jacks to connect to two halves. diff --git a/docs/proton_c_conversion.md b/docs/proton_c_conversion.md index 98f1508a9e59..1b5e496e74aa 100644 --- a/docs/proton_c_conversion.md +++ b/docs/proton_c_conversion.md @@ -36,7 +36,7 @@ These are defaults based on what has been implemented for ARM boards. | [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 | +| [Split keyboards](feature_split_keyboard.md) | Partial - heavily dependent on enabled features | ## Manual Conversion diff --git a/docs/serial_driver.md b/docs/serial_driver.md index 395b3ec3f967..bc376b6ddda7 100644 --- a/docs/serial_driver.md +++ b/docs/serial_driver.md @@ -1,7 +1,7 @@ # 'serial' Driver This driver powers the [Split Keyboard](feature_split_keyboard.md) feature. -!> Serial in this context should be read as **sending information one bit at a time**, rather than implementing UART/USART/RS485/RS232 standards. +?> Serial in this context should be read as **sending information one bit at a time**, rather than implementing UART/USART/RS485/RS232 standards. All drivers in this category have the following characteristics: * Provides data and signaling over a single conductor @@ -11,7 +11,7 @@ All drivers in this category have the following characteristics: | | AVR | ARM | |-------------------|--------------------|--------------------| -| bit bang | :heavy_check_mark: | Soon™ | +| bit bang | :heavy_check_mark: | :heavy_check_mark: | | USART Half-duplex | | :heavy_check_mark: | ## Driver configuration @@ -35,6 +35,12 @@ Configure the driver via your config.h: // 5: about 20kbps ``` +#### ARM + +!> The bitbang driver causes connection issues with bitbang WS2812 driver + +Along with the generic options above, you must also turn on the `PAL_USE_CALLBACKS` feature in your halconf.h. + ### USART Half-duplex Targeting STM32 boards where communication is offloaded to a USART hardware device. The advantage is that this provides fast and accurate timings. `SOFT_SERIAL_PIN` for this driver is the configured USART TX pin. **The TX pin must have appropriate pull-up resistors**. To configure it, add this to your rules.mk: @@ -56,4 +62,8 @@ Configure the hardware via your config.h: #define SERIAL_USART_TX_PAL_MODE 7 // Pin "alternate function", see the respective datasheet for the appropriate values for your MCU. default: 7 ``` -You must also turn on the SERIAL feature in your halconf.h and mcuconf.h +You must also enable the ChibiOS `SERIAL` feature: +* In your board's halconf.h: `#define HAL_USE_SERIAL TRUE` +* In your board's mcuconf.h: `#define STM32_SERIAL_USE_USARTn TRUE` (where 'n' matches the peripheral number of your selected USART on the MCU) + +Do note that the configuration required is for the `SERIAL` peripheral, not the `UART` peripheral. From fd4f1029771fba4d620ca6cfc9710ccbba421206 Mon Sep 17 00:00:00 2001 From: Nick Brassel Date: Fri, 22 May 2020 06:25:03 +1000 Subject: [PATCH 026/930] Fix build. (#9163) --- quantum/split_common/split_util.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/quantum/split_common/split_util.c b/quantum/split_common/split_util.c index 6f376ab40890..dfd06f5f946a 100644 --- a/quantum/split_common/split_util.c +++ b/quantum/split_common/split_util.c @@ -41,7 +41,7 @@ volatile bool isLeftHand = true; static inline bool usbHasActiveConnection(void) { return USB_Device_IsAddressSet(); } static inline void usbDisable(void) { USB_Disable(); } # elif defined(PROTOCOL_CHIBIOS) -static inline bool usbHasActiveConnection(void) { usbGetDriverStateI(&USBD1) == USB_ACTIVE; } +static inline bool usbHasActiveConnection(void) { return usbGetDriverStateI(&USBD1) == USB_ACTIVE; } static inline void usbDisable(void) { usbStop(&USBD1); } # elif defined(PROTOCOL_VUSB) static inline bool usbHasActiveConnection(void) { From 9e4037465afe5a6e1888d4bf2a0b80fee9beed99 Mon Sep 17 00:00:00 2001 From: MechMerlin <30334081+mechmerlin@users.noreply.github.com> Date: Thu, 21 May 2020 13:34:28 -0700 Subject: [PATCH 027/930] [Keyboard] Wolfmark Club WM1 (#9121) * do the basic port for the WM1 * with much help from tzarc, get the addresses correct * make the keymap more closely mirror what the board has * Add QMK Configurator support * update the readme * get indicator leds working * enable RGB underglow * fix up rgb underglow * add notes regarding existence of backlight * Update keyboards/wolfmarkclub/wm1/readme.md * Update keyboards/wolfmarkclub/wm1/rules.mk * Update keyboards/wolfmarkclub/wm1/rules.mk * Update keyboards/wolfmarkclub/wm1/rules.mk * Update keyboards/wolfmarkclub/wm1/rules.mk * Update keyboards/wolfmarkclub/wm1/config.h * Update keyboards/wolfmarkclub/wm1/ld/wm1_f103.ld * Update keyboards/wolfmarkclub/wm1/bootloader_defs.h * Update keyboards/wolfmarkclub/wm1/config.h * Update keyboards/wolfmarkclub/wm1/rules.mk * Update keyboards/wolfmarkclub/wm1/wm1.c * Update keyboards/wolfmarkclub/wm1/wm1.c * Update keyboards/wolfmarkclub/wm1/rules.mk * Update keyboards/wolfmarkclub/wm1/rules.mk * Update keyboards/wolfmarkclub/wm1/readme.md * Update keyboards/wolfmarkclub/wm1/rules.mk * Update keyboards/wolfmarkclub/wm1/rules.mk * Update keyboards/wolfmarkclub/wm1/rules.mk * Update keyboards/wolfmarkclub/wm1/rules.mk * update readme --- keyboards/wolfmarkclub/wm1/bootloader_defs.h | 11 + keyboards/wolfmarkclub/wm1/chconf.h | 714 ++++++++++++++++++ keyboards/wolfmarkclub/wm1/config.h | 80 ++ keyboards/wolfmarkclub/wm1/halconf.h | 525 +++++++++++++ keyboards/wolfmarkclub/wm1/info.json | 12 + .../wolfmarkclub/wm1/keymaps/default/keymap.c | 17 + keyboards/wolfmarkclub/wm1/ld/wm1_f103.ld | 88 +++ keyboards/wolfmarkclub/wm1/mcuconf.h | 209 +++++ keyboards/wolfmarkclub/wm1/readme.md | 17 + keyboards/wolfmarkclub/wm1/rules.mk | 33 + keyboards/wolfmarkclub/wm1/wm1.c | 17 + keyboards/wolfmarkclub/wm1/wm1.h | 34 + 12 files changed, 1757 insertions(+) create mode 100644 keyboards/wolfmarkclub/wm1/bootloader_defs.h create mode 100644 keyboards/wolfmarkclub/wm1/chconf.h create mode 100644 keyboards/wolfmarkclub/wm1/config.h create mode 100644 keyboards/wolfmarkclub/wm1/halconf.h create mode 100644 keyboards/wolfmarkclub/wm1/info.json create mode 100644 keyboards/wolfmarkclub/wm1/keymaps/default/keymap.c create mode 100644 keyboards/wolfmarkclub/wm1/ld/wm1_f103.ld create mode 100644 keyboards/wolfmarkclub/wm1/mcuconf.h create mode 100644 keyboards/wolfmarkclub/wm1/readme.md create mode 100644 keyboards/wolfmarkclub/wm1/rules.mk create mode 100644 keyboards/wolfmarkclub/wm1/wm1.c create mode 100644 keyboards/wolfmarkclub/wm1/wm1.h diff --git a/keyboards/wolfmarkclub/wm1/bootloader_defs.h b/keyboards/wolfmarkclub/wm1/bootloader_defs.h new file mode 100644 index 000000000000..393d70fdc6e8 --- /dev/null +++ b/keyboards/wolfmarkclub/wm1/bootloader_defs.h @@ -0,0 +1,11 @@ +/* Address for jumping to bootloader on STM32 chips. */ +/* 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 + */ + +// STM32F103 does not have a USB bootloader in ROM -- the WM1 +// has a usermode USB mass storage device bootloader at the normal +// boot address -- `0x08000000`. +#define STM32_BOOTLOADER_ADDRESS 0x80000000 diff --git a/keyboards/wolfmarkclub/wm1/chconf.h b/keyboards/wolfmarkclub/wm1/chconf.h new file mode 100644 index 000000000000..f5e471640c56 --- /dev/null +++ b/keyboards/wolfmarkclub/wm1/chconf.h @@ -0,0 +1,714 @@ +/* + 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. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +/** + * @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. + * + * @addtogroup config + * @details Kernel related settings and hooks. + * @{ + */ + +#ifndef CHCONF_H +#define CHCONF_H + +#define _CHIBIOS_RT_CONF_ +#define _CHIBIOS_RT_CONF_VER_6_0_ + +/*===========================================================================*/ +/** + * @name System timers settings + * @{ + */ +/*===========================================================================*/ + +/** + * @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. + * @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. + */ +#if !defined(CH_CFG_ST_TIMEDELTA) +#define CH_CFG_ST_TIMEDELTA 0 +#endif + +/** @} */ + +/*===========================================================================*/ +/** + * @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. + */ +#if !defined(CH_CFG_TIME_QUANTUM) +#define CH_CFG_TIME_QUANTUM 0 +#endif + +/** + * @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. + */ +#if !defined(CH_CFG_MEMCORE_SIZE) +#define CH_CFG_MEMCORE_SIZE 0 +#endif + +/** + * @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. + */ +#if !defined(CH_CFG_NO_IDLE_THREAD) +#define CH_CFG_NO_IDLE_THREAD FALSE +#endif + +/** @} */ + +/*===========================================================================*/ +/** + * @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. + */ +#if !defined(CH_CFG_OPTIMIZE_SPEED) +#define CH_CFG_OPTIMIZE_SPEED TRUE +#endif + +/** @} */ + +/*===========================================================================*/ +/** + * @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. + */ +#if !defined(CH_CFG_USE_TM) +#define CH_CFG_USE_TM FALSE +#endif + +/** + * @brief Threads registry APIs. + * @details If enabled then the registry APIs are included in the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_REGISTRY) +#define CH_CFG_USE_REGISTRY TRUE +#endif + +/** + * @brief Threads synchronization APIs. + * @details If enabled then the @p chThdWait() function is included in + * the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_WAITEXIT) +#define CH_CFG_USE_WAITEXIT TRUE +#endif + +/** + * @brief Semaphores APIs. + * @details If enabled then the Semaphores APIs are included in the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_SEMAPHORES) +#define CH_CFG_USE_SEMAPHORES TRUE +#endif + +/** + * @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. + */ +#if !defined(CH_CFG_USE_SEMAPHORES_PRIORITY) +#define CH_CFG_USE_SEMAPHORES_PRIORITY FALSE +#endif + +/** + * @brief Mutexes APIs. + * @details If enabled then the mutexes APIs are included in the kernel. + * + * @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. + * @note Recursive mutexes are heavier and have an increased + * memory footprint. + * + * @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. + * @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. + */ +#if !defined(CH_CFG_USE_CONDVARS) +#define CH_CFG_USE_CONDVARS TRUE +#endif + +/** + * @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. + */ +#if !defined(CH_CFG_USE_CONDVARS_TIMEOUT) +#define CH_CFG_USE_CONDVARS_TIMEOUT FALSE +#endif + +/** + * @brief Events Flags APIs. + * @details If enabled then the event flags APIs are included in the kernel. + * + * @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. + * @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. + */ +#if !defined(CH_CFG_USE_EVENTS_TIMEOUT) +#define CH_CFG_USE_EVENTS_TIMEOUT TRUE +#endif + +/** + * @brief Synchronous Messages APIs. + * @details If enabled then the synchronous messages APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_MESSAGES) +#define CH_CFG_USE_MESSAGES TRUE +#endif + +/** + * @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. + */ +#if !defined(CH_CFG_USE_MESSAGES_PRIORITY) +#define CH_CFG_USE_MESSAGES_PRIORITY FALSE +#endif + +/** + * @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. + */ +#if !defined(CH_CFG_USE_MAILBOXES) +#define CH_CFG_USE_MAILBOXES TRUE +#endif + +/** + * @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. + */ +#if !defined(CH_CFG_USE_MEMCORE) +#define CH_CFG_USE_MEMCORE TRUE +#endif + +/** + * @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. + */ +#if !defined(CH_CFG_USE_HEAP) +#define CH_CFG_USE_HEAP TRUE +#endif + +/** + * @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. + */ +#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. + * @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. + */ +#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 + +/** @} */ + +/*===========================================================================*/ +/** + * @name Debug options + * @{ + */ +/*===========================================================================*/ + +/** + * @brief Debug option, kernel statistics. + * + * @note The default is @p FALSE. + */ +#if !defined(CH_DBG_STATISTICS) +#define CH_DBG_STATISTICS FALSE +#endif + +/** + * @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. + */ +#if !defined(CH_DBG_SYSTEM_STATE_CHECK) +#define CH_DBG_SYSTEM_STATE_CHECK FALSE +#endif + +/** + * @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. + */ +#if !defined(CH_DBG_ENABLE_CHECKS) +#define CH_DBG_ENABLE_CHECKS FALSE +#endif + +/** + * @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. + */ +#if !defined(CH_DBG_ENABLE_ASSERTS) +#define CH_DBG_ENABLE_ASSERTS FALSE +#endif + +/** + * @brief Debug option, trace buffer. + * @details If enabled then the trace buffer is activated. + * + * @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. + * @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. + */ +#if !defined(CH_DBG_ENABLE_STACK_CHECK) +#define CH_DBG_ENABLE_STACK_CHECK FALSE +#endif + +/** + * @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. + */ +#if !defined(CH_DBG_FILL_THREADS) +#define CH_DBG_FILL_THREADS FALSE +#endif + +/** + * @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. + */ +#if !defined(CH_DBG_THREADS_PROFILING) +#define CH_DBG_THREADS_PROFILING FALSE +#endif + +/** @} */ + +/*===========================================================================*/ +/** + * @name Kernel hooks + * @{ + */ +/*===========================================================================*/ + +/** + * @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. + */ +#define CH_CFG_THREAD_EXTRA_FIELDS \ + /* Add threads custom fields here.*/ + +/** + * @brief Threads initialization hook. + * @details User initialization code added to the @p _thread_init() function. + * + * @note It is invoked from within @p _thread_init() 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/wolfmarkclub/wm1/config.h b/keyboards/wolfmarkclub/wm1/config.h new file mode 100644 index 000000000000..d014fdcf8aac --- /dev/null +++ b/keyboards/wolfmarkclub/wm1/config.h @@ -0,0 +1,80 @@ +/* +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 0x2B29 +#define DEVICE_VER 0x0001 +#define MANUFACTURER Wolfmark Club +#define PRODUCT WM1 +#define DESCRIPTION Ergo 65% + +/* key matrix size */ +#define MATRIX_ROWS 5 +#define MATRIX_COLS 15 + +// 0 1 2 3 4 5 6 7 8 9 A B C D E +#define MATRIX_ROW_PINS { C4, A7, A6, A5, A4 } +#define MATRIX_COL_PINS { B10, B11, B12, B13, B14, B15, C6, C10, C11, C12, D2, B5, B6, B7, B8 } + +#define DIODE_DIRECTION COL2ROW + +/* number of backlight levels */ +// #define BACKLIGHT_PIN A2 +// #ifdef BACKLIGHT_PIN +// #define BACKLIGHT_LEVELS 5 +// #endif + +#define RGB_DI_PIN A3 +#ifdef RGB_DI_PIN +#define RGBLED_NUM 18 +#define RGBLIGHT_ANIMATIONS +#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 */ +#endif +/* 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/wolfmarkclub/wm1/halconf.h b/keyboards/wolfmarkclub/wm1/halconf.h new file mode 100644 index 000000000000..ff5ae7e8a5f6 --- /dev/null +++ b/keyboards/wolfmarkclub/wm1/halconf.h @@ -0,0 +1,525 @@ +/* + 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. + 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 + +#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 +#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 cryptographic subsystem. + */ +#if !defined(HAL_USE_CRY) || defined(__DOXYGEN__) +#define HAL_USE_CRY FALSE +#endif + +/** + * @brief Enables the DAC subsystem. + */ +#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 +#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 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 +#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 +#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 + +/** + * @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. */ +/*===========================================================================*/ + +/** + * @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 + +/** + * @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. */ +/*===========================================================================*/ + +/** + * @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 the zero-copy API. + */ +#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 + +/** + * @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. */ +/*===========================================================================*/ + +/** + * @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 16 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 256 bytes for both the transmission and receive + * buffers. + */ +#if !defined(SERIAL_USB_BUFFERS_SIZE) || defined(__DOXYGEN__) +#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 + +/*===========================================================================*/ +/* 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 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 +#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. */ +/*===========================================================================*/ + +/** + * @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 + +/*===========================================================================*/ +/* 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/wolfmarkclub/wm1/info.json b/keyboards/wolfmarkclub/wm1/info.json new file mode 100644 index 000000000000..651d0d5e97c0 --- /dev/null +++ b/keyboards/wolfmarkclub/wm1/info.json @@ -0,0 +1,12 @@ +{ + "keyboard_name": "Wolfmark Club WM1", + "url": "", + "maintainer": "qmk", + "width": 18.25, + "height": 5.25, + "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":8.75, "y":0}, {"x":9.75, "y":0}, {"x":10.75, "y":0}, {"x":11.75, "y":0}, {"x":12.75, "y":0}, {"x":13.75, "y":0}, {"x":14.75, "y":0}, {"x":15.75, "y":0}, {"x":17, "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":8.25, "y":1}, {"x":9.25, "y":1}, {"x":10.25, "y":1}, {"x":11.25, "y":1}, {"x":12.25, "y":1}, {"x":13.25, "y":1}, {"x":14.25, "y":1}, {"x":15.25, "y":1, "w":1.5}, {"x":17, "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":8.5, "y":2}, {"x":9.5, "y":2}, {"x":10.5, "y":2}, {"x":11.5, "y":2}, {"x":12.5, "y":2}, {"x":13.5, "y":2}, {"x":14.5, "y":2, "w":2.25}, {"x":17, "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":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, "w":1.75}, {"x":16.25, "y":3.25}, {"x":0, "y":4, "w":1.5}, {"x":3, "y":4, "w":1.5}, {"x":4.5, "y":4, "w":2}, {"x":6.5, "y":4}, {"x":8, "y":4, "w":2.75}, {"x":10.75, "y":4, "w":1.5}, {"x":13.25, "y":4, "w":1.5}, {"x":15.25, "y":4.25}, {"x":16.25, "y":4.25}, {"x":17.25, "y":4.25}] + } + } +} \ No newline at end of file diff --git a/keyboards/wolfmarkclub/wm1/keymaps/default/keymap.c b/keyboards/wolfmarkclub/wm1/keymaps/default/keymap.c new file mode 100644 index 000000000000..83e9ac21a75f --- /dev/null +++ b/keyboards/wolfmarkclub/wm1/keymaps/default/keymap.c @@ -0,0 +1,17 @@ +#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_GRV, 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_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, MO(1), +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_LGUI,KC_SPC, KC_SPC, KC_RALT, KC_RCTL, KC_LEFT, KC_DOWN, KC_RIGHT), + +[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, _______, _______, _______, +RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, +_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, +_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, +_______, _______, _______, _______, _______, _______, _______, _______, _______, _______), +}; \ No newline at end of file diff --git a/keyboards/wolfmarkclub/wm1/ld/wm1_f103.ld b/keyboards/wolfmarkclub/wm1/ld/wm1_f103.ld new file mode 100644 index 000000000000..41362282bc6b --- /dev/null +++ b/keyboards/wolfmarkclub/wm1/ld/wm1_f103.ld @@ -0,0 +1,88 @@ +/* + 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. +*/ + +/* + * STM32F103xC memory setup for use with the WM1 mass-storage device bootloader. + * You will have to change: + * OPT_DEFS = -DCORTEX_VTOR_INIT=0x10000 + * in your board's rules.mk + */ +MEMORY +{ + flash0 : org = 0x08010000, len = 256k - 0x10000 + 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 = 48k + 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/wolfmarkclub/wm1/mcuconf.h b/keyboards/wolfmarkclub/wm1/mcuconf.h new file mode 100644 index 000000000000..a645d3c5d5cf --- /dev/null +++ b/keyboards/wolfmarkclub/wm1/mcuconf.h @@ -0,0 +1,209 @@ +/* + 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_ + +#define STM32F103_MCUCONF + +/* + * STM32F103 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: + * 15...0 Lowest...Highest. + * + * DMA priorities: + * 0...3 Lowest...Highest. + */ + +/* + * HAL driver system settings. + */ +#define STM32_NO_INIT FALSE +#define STM32_HSI_ENABLED TRUE +#define STM32_LSI_ENABLED FALSE +#define STM32_HSE_ENABLED TRUE +#define STM32_LSE_ENABLED FALSE +#define STM32_SW STM32_SW_PLL +#define STM32_PLLSRC STM32_PLLSRC_HSE +#define STM32_PLLXTPRE STM32_PLLXTPRE_DIV1 +#define STM32_PLLMUL_VALUE 9 +#define STM32_HPRE STM32_HPRE_DIV1 +#define STM32_PPRE1 STM32_PPRE1_DIV2 +#define STM32_PPRE2 STM32_PPRE2_DIV2 +#define STM32_ADCPRE STM32_ADCPRE_DIV4 +#define STM32_USB_CLOCK_REQUIRED TRUE +#define STM32_USBPRE STM32_USBPRE_DIV1P5 +#define STM32_MCOSEL STM32_MCOSEL_NOCLOCK +#define STM32_RTCSEL STM32_RTCSEL_HSEDIV +#define STM32_PVD_ENABLE FALSE +#define STM32_PLS STM32_PLS_LEV0 + +/* + * ADC driver system settings. + */ +#define STM32_ADC_USE_ADC1 FALSE +#define STM32_ADC_ADC1_DMA_PRIORITY 2 +#define STM32_ADC_ADC1_IRQ_PRIORITY 6 + +/* + * CAN driver system settings. + */ +#define STM32_CAN_USE_CAN1 FALSE +#define STM32_CAN_CAN1_IRQ_PRIORITY 11 + +/* + * 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 + +/* + * 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_TIM4 FALSE +#define STM32_GPT_USE_TIM5 FALSE +#define STM32_GPT_USE_TIM8 FALSE +#define STM32_GPT_TIM1_IRQ_PRIORITY 7 +#define STM32_GPT_TIM2_IRQ_PRIORITY 7 +#define STM32_GPT_TIM3_IRQ_PRIORITY 7 +#define STM32_GPT_TIM4_IRQ_PRIORITY 7 +#define STM32_GPT_TIM5_IRQ_PRIORITY 7 +#define STM32_GPT_TIM8_IRQ_PRIORITY 7 + +/* + * 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 5 +#define STM32_I2C_I2C2_IRQ_PRIORITY 5 +#define STM32_I2C_I2C1_DMA_PRIORITY 3 +#define STM32_I2C_I2C2_DMA_PRIORITY 3 +#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_USE_TIM4 FALSE +#define STM32_ICU_USE_TIM5 FALSE +#define STM32_ICU_USE_TIM8 FALSE +#define STM32_ICU_TIM1_IRQ_PRIORITY 7 +#define STM32_ICU_TIM2_IRQ_PRIORITY 7 +#define STM32_ICU_TIM3_IRQ_PRIORITY 7 +#define STM32_ICU_TIM4_IRQ_PRIORITY 7 +#define STM32_ICU_TIM5_IRQ_PRIORITY 7 +#define STM32_ICU_TIM8_IRQ_PRIORITY 7 + +/* + * PWM driver system settings. + */ +#define STM32_PWM_USE_ADVANCED FALSE +#define STM32_PWM_USE_TIM1 FALSE +#define STM32_PWM_USE_TIM2 TRUE +#define STM32_PWM_USE_TIM3 FALSE +#define STM32_PWM_USE_TIM4 FALSE +#define STM32_PWM_USE_TIM5 FALSE +#define STM32_PWM_USE_TIM8 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_TIM5_IRQ_PRIORITY 7 +#define STM32_PWM_TIM8_IRQ_PRIORITY 7 + +/* + * RTC driver system settings. + */ +#define STM32_RTC_IRQ_PRIORITY 15 + +/* + * SERIAL driver system settings. + */ +#define STM32_SERIAL_USE_USART1 FALSE +#define STM32_SERIAL_USE_USART2 FALSE +#define STM32_SERIAL_USE_USART3 FALSE +#define STM32_SERIAL_USE_UART4 FALSE +#define STM32_SERIAL_USE_UART5 FALSE +#define STM32_SERIAL_USART1_PRIORITY 12 +#define STM32_SERIAL_USART2_PRIORITY 12 +#define STM32_SERIAL_USART3_PRIORITY 12 +#define STM32_SERIAL_UART4_PRIORITY 12 +#define STM32_SERIAL_UART5_PRIORITY 12 + +/* + * SPI driver system settings. + */ +#define STM32_SPI_USE_SPI1 FALSE +#define STM32_SPI_USE_SPI2 FALSE +#define STM32_SPI_USE_SPI3 FALSE +#define STM32_SPI_SPI1_DMA_PRIORITY 1 +#define STM32_SPI_SPI2_DMA_PRIORITY 1 +#define STM32_SPI_SPI3_DMA_PRIORITY 1 +#define STM32_SPI_SPI1_IRQ_PRIORITY 10 +#define STM32_SPI_SPI2_IRQ_PRIORITY 10 +#define STM32_SPI_SPI3_IRQ_PRIORITY 10 +#define STM32_SPI_DMA_ERROR_HOOK(spip) osalSysHalt("DMA failure") + +/* + * ST driver system settings. + */ +#define STM32_ST_IRQ_PRIORITY 8 +#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_USE_USART3 FALSE +#define STM32_UART_USART1_IRQ_PRIORITY 12 +#define STM32_UART_USART2_IRQ_PRIORITY 12 +#define STM32_UART_USART3_IRQ_PRIORITY 12 +#define STM32_UART_USART1_DMA_PRIORITY 0 +#define STM32_UART_USART2_DMA_PRIORITY 0 +#define STM32_UART_USART3_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_HP_IRQ_PRIORITY 13 +#define STM32_USB_USB1_LP_IRQ_PRIORITY 14 + +#endif /* _MCUCONF_H_ */ diff --git a/keyboards/wolfmarkclub/wm1/readme.md b/keyboards/wolfmarkclub/wm1/readme.md new file mode 100644 index 000000000000..74e92b2ee10c --- /dev/null +++ b/keyboards/wolfmarkclub/wm1/readme.md @@ -0,0 +1,17 @@ +# Wolfmark Club WM1 + +![WM1](https://i.imgur.com/TDFp97yl.jpg) + +Split Ergo 65% keyboard + +* Keyboard Maintainer: [MechMerlin](https://github.com/mechmerlin) +* Hardware Supported: WM1 +* Hardware Availability: Available through China run Group Buy. + +Make example for this keyboard (after setting up your build environment): + + make wolfmarkclub/wm1:default + +**Reset Key**: Hold the `Esc` key while plugging in your cable, and the board will appear as a USB drive on your computer. + +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/wolfmarkclub/wm1/rules.mk b/keyboards/wolfmarkclub/wm1/rules.mk new file mode 100644 index 000000000000..14ddab26d9dc --- /dev/null +++ b/keyboards/wolfmarkclub/wm1/rules.mk @@ -0,0 +1,33 @@ +# MCU name +MCU = STM32F103 + +# GENERIC STM32F103C8T6 board - mass storage bootloader +OPT_DEFS = -DCORTEX_VTOR_INIT=0x10000 +MCU_LDSCRIPT = wm1_f103 +BOARD = STM32_F103_STM32DUINO + +PROGRAM_CMD=echo 'CLI flashing not supported' >&2 + +# 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 = 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 = 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 +LTO_ENABLE = yes + +# Enter lower-power sleep mode when on the ChibiOS idle thread +OPT_DEFS += -DCORTEX_ENABLE_WFI_IDLE=TRUE diff --git a/keyboards/wolfmarkclub/wm1/wm1.c b/keyboards/wolfmarkclub/wm1/wm1.c new file mode 100644 index 000000000000..d199546f8906 --- /dev/null +++ b/keyboards/wolfmarkclub/wm1/wm1.c @@ -0,0 +1,17 @@ +#include "wm1.h" + +void matrix_init_kb(void) { + setPinOutput(B1); // Top Indicator LED + setPinOutput(B0); // Middle Indicator LED + setPinOutput(C5); // Bottom Indicator LED + matrix_init_user(); +} + +bool led_update_kb(led_t led_state) { + if(led_update_user(led_state)) { + writePin(B1, led_state.caps_lock); + writePin(B0, led_state.num_lock); + writePin(C5, led_state.scroll_lock); + } + return true; +} diff --git a/keyboards/wolfmarkclub/wm1/wm1.h b/keyboards/wolfmarkclub/wm1/wm1.h new file mode 100644 index 000000000000..1750b6366a56 --- /dev/null +++ b/keyboards/wolfmarkclub/wm1/wm1.h @@ -0,0 +1,34 @@ +/* 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" + +#define LAYOUT( \ + K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, K2D, \ + 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, \ + K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3E, \ + K40, K42, K43, K45, K47, K49, 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, KC_NO, K3E}, \ + {K40, KC_NO, K42, K43, KC_NO, K45, KC_NO, K47, KC_NO, K49, KC_NO, K4B, K4C, K4D, K4E } \ +} From 7ef2ea3d492f07a069b0dbbb2459d6b8149ddf29 Mon Sep 17 00:00:00 2001 From: Ryan Date: Fri, 22 May 2020 09:28:55 +1000 Subject: [PATCH 028/930] Improve the Makefile message a bit more (#9161) --- Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index e22af59d51af..0e57a72a0bd2 100644 --- a/Makefile +++ b/Makefile @@ -294,8 +294,8 @@ define PARSE_RULE $$(info | QMK's make format recently changed to use folder locations and colons:) $$(info | make project_folder:keymap[:target]) $$(info | Examples:) - $$(info | make planck/rev4:default:dfu) - $$(info | make planck/rev4:default) + $$(info | make dz60:default) + $$(info | make planck/rev6:default:flash) $$(info |) endif endef From 53224e03d62a4d0bd7c9f7e63fd6222ec649a4fa Mon Sep 17 00:00:00 2001 From: Ckat Date: Thu, 21 May 2020 23:37:09 +0000 Subject: [PATCH 029/930] [Keyboard] handwired/k8split (#9133) * New Keyboard: k8split * Apply suggestions from code review * move NKRO rule to keymap scope --- keyboards/handwired/k8split/README.md | 21 ++++++++ keyboards/handwired/k8split/config.h | 48 +++++++++++++++++++ keyboards/handwired/k8split/k8split.c | 18 +++++++ keyboards/handwired/k8split/k8split.h | 37 ++++++++++++++ .../k8split/keymaps/default/keymap.c | 33 +++++++++++++ .../handwired/k8split/keymaps/left/config.h | 21 ++++++++ .../handwired/k8split/keymaps/left/keymap.c | 47 ++++++++++++++++++ .../handwired/k8split/keymaps/right/config.h | 21 ++++++++ .../handwired/k8split/keymaps/right/keymap.c | 45 +++++++++++++++++ keyboards/handwired/k8split/rules.mk | 31 ++++++++++++ 10 files changed, 322 insertions(+) create mode 100644 keyboards/handwired/k8split/README.md create mode 100644 keyboards/handwired/k8split/config.h create mode 100644 keyboards/handwired/k8split/k8split.c create mode 100644 keyboards/handwired/k8split/k8split.h create mode 100644 keyboards/handwired/k8split/keymaps/default/keymap.c create mode 100644 keyboards/handwired/k8split/keymaps/left/config.h create mode 100644 keyboards/handwired/k8split/keymaps/left/keymap.c create mode 100644 keyboards/handwired/k8split/keymaps/right/config.h create mode 100644 keyboards/handwired/k8split/keymaps/right/keymap.c create mode 100644 keyboards/handwired/k8split/rules.mk diff --git a/keyboards/handwired/k8split/README.md b/keyboards/handwired/k8split/README.md new file mode 100644 index 000000000000..01c3365abc11 --- /dev/null +++ b/keyboards/handwired/k8split/README.md @@ -0,0 +1,21 @@ +# k8split +![left](https://raw.githubusercontent.com/Ckath/k8split/master/k8split_left.png) +![right](https://raw.githubusercontent.com/Ckath/k8split/master/k8split_right.png) + +my personal 8x6(x2) split keyboard, aiming to be a mostly normal keyboard layout with plenty of keys. see the hardware repo for more info. + +* Keyboard Maintainer: [Ckath](https://github.com/Ckath) +* Hardware: https://github.com/Ckath/k8split + +Make example for this keyboard (after setting up your build environment): + + make handwired/k8split:default + +Flashing (both halves are separate keyboards and the default layout is just for debugging): + + # left + make handwired/k8split:left:flash + # right + make handwired/k8split:right: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). diff --git a/keyboards/handwired/k8split/config.h b/keyboards/handwired/k8split/config.h new file mode 100644 index 000000000000..234ab1adb385 --- /dev/null +++ b/keyboards/handwired/k8split/config.h @@ -0,0 +1,48 @@ +/* +Copyright 2020 Ckat + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License 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 0xC81D +#define PRODUCT_ID 0xC868 +#define DEVICE_VER 0x0001 +#define MANUFACTURER Ckat +#define PRODUCT k8split +#define DESCRIPTION custom split keyboard + +/* key matrix size */ +#define MATRIX_ROWS 6 +#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 { D5, D3, D2, D1, D0, B7 } +#define MATRIX_COL_PINS { C7, C6, B6, B5, B4, D7, D6, D4 } + +/* COL2ROW, ROW2COL */ +#define DIODE_DIRECTION COL2ROW diff --git a/keyboards/handwired/k8split/k8split.c b/keyboards/handwired/k8split/k8split.c new file mode 100644 index 000000000000..300a075ae476 --- /dev/null +++ b/keyboards/handwired/k8split/k8split.c @@ -0,0 +1,18 @@ +/* +Copyright 2020 Ckat + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#include "k8split.h" diff --git a/keyboards/handwired/k8split/k8split.h b/keyboards/handwired/k8split/k8split.h new file mode 100644 index 000000000000..247c0d775a90 --- /dev/null +++ b/keyboards/handwired/k8split/k8split.h @@ -0,0 +1,37 @@ +/* +Copyright 2020 Ckat + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License 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, k06, k12, k18, k24, k30, k36, k42, \ + k01, k07, k13, k19, k25, k31, k37, k43, \ + k02, k08, k14, k20, k26, k32, k38, k44, \ + k03, k09, k15, k21, k27, k33, k39, k45, \ + k04, k10, k16, k22, k28, k34, k40, k46, \ + k05, k11, k17, k23, k29, k35, k41, k47 \ +) \ +{ \ + { k00, k06, k12, k18, k24, k30, k36, k42 }, \ + { k01, k07, k13, k19, k25, k31, k37, k43 }, \ + { k02, k08, k14, k20, k26, k32, k38, k44 }, \ + { k03, k09, k15, k21, k27, k33, k39, k45 }, \ + { k04, k10, k16, k22, k28, k34, k40, k46 }, \ + { k05, k11, k17, k23, k29, k35, k41, k47 } \ +} diff --git a/keyboards/handwired/k8split/keymaps/default/keymap.c b/keyboards/handwired/k8split/keymaps/default/keymap.c new file mode 100644 index 000000000000..84dc7498ccf8 --- /dev/null +++ b/keyboards/handwired/k8split/keymaps/default/keymap.c @@ -0,0 +1,33 @@ +/* +Copyright 2020 Ckat + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public 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 + +/* DEBUG + default map is strictly for debugging shorts + flash either the left or right keymap accordingly */ + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT( + KC_0, KC_5, KC_0, KC_5, KC_0, KC_5, KC_0, KC_5, + KC_1, KC_4, KC_1, KC_4, KC_1, KC_4, KC_1, KC_4, + KC_2, KC_3, KC_2, KC_3, KC_2, KC_3, KC_2, KC_3, + KC_3, KC_2, KC_3, KC_2, KC_3, KC_2, KC_3, KC_2, + KC_4, KC_1, KC_4, KC_1, KC_4, KC_1, KC_4, KC_1, + KC_5, KC_0, KC_5, KC_0, KC_5, KC_0, KC_5, KC_0 + ) +}; diff --git a/keyboards/handwired/k8split/keymaps/left/config.h b/keyboards/handwired/k8split/keymaps/left/config.h new file mode 100644 index 000000000000..968a6eb413c6 --- /dev/null +++ b/keyboards/handwired/k8split/keymaps/left/config.h @@ -0,0 +1,21 @@ +/* +Copyright 2020 Ckat + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#pragma once + +/* ensure NKRO is on */ +#define FORCE_NKRO diff --git a/keyboards/handwired/k8split/keymaps/left/keymap.c b/keyboards/handwired/k8split/keymaps/left/keymap.c new file mode 100644 index 000000000000..473a3b9f76e0 --- /dev/null +++ b/keyboards/handwired/k8split/keymaps/left/keymap.c @@ -0,0 +1,47 @@ +/* +Copyright 2020 Ckat + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public 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 KC_AUDIO_MMUTE KC_F20 +#define KC_COMP KC_APP + +/* LEFT + +---------------------------------------+ + | ESC| F1 | F2 | F3 | F4 | F5 | F6 |MUTE| + +---------------------------------------| + | ` | 1 | 2 | 3 | 4 | 5 | 6 |MMIC| + +-----------------------------------------+ + | TAB | q | w | e | r | t | JP | MWU| + +------------------------------------------+ + | CTRL | a | s | d | f | g |COMP| MWD| + +---------------------------------------------| + | SHIFT | z | x | c | v | b | F13| F14| + +-------------------------------------------------+ + | CTRL |CAPS|SUPR| ALT | SPACE | F15| F16| F17| + +-------------------------------------------------+ */ + +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_AUDIO_MUTE, + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_AUDIO_MMUTE, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_MHEN, KC_MS_WH_UP, + KC_LCTRL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_COMP, KC_MS_WH_DOWN, + KC_LSHIFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_F13, KC_F14, + KC_LCTRL, KC_CAPS, KC_LWIN, KC_LALT, KC_SPC, KC_F15, KC_F16, KC_F17 + ) +}; diff --git a/keyboards/handwired/k8split/keymaps/right/config.h b/keyboards/handwired/k8split/keymaps/right/config.h new file mode 100644 index 000000000000..968a6eb413c6 --- /dev/null +++ b/keyboards/handwired/k8split/keymaps/right/config.h @@ -0,0 +1,21 @@ +/* +Copyright 2020 Ckat + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#pragma once + +/* ensure NKRO is on */ +#define FORCE_NKRO diff --git a/keyboards/handwired/k8split/keymaps/right/keymap.c b/keyboards/handwired/k8split/keymaps/right/keymap.c new file mode 100644 index 000000000000..3c804f2cae74 --- /dev/null +++ b/keyboards/handwired/k8split/keymaps/right/keymap.c @@ -0,0 +1,45 @@ +/* +Copyright 2020 Ckat + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public 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 + +/* RIGHT + +---------------------------------------+ + | F7 | F8 | F9 | F10| F11| F12| INS|PSCR| + +--------------------------------------------| + | DEL| 7 | 8 | 9 | 0 | - | = | BCKSPC | + +--------------------------------------------| + | y | u | i | o | p | [ | ] | \ | + +---------------------------------------------| + |PGUP| h | j | k | l | ; | ' | ENTER | + +-----------------------------------------------| + |HOME|PGDN| n | m | , | . | / | SHIFT | + +-------------------------------------------------+ + | END| SPACE | ALT | <- | ↓ | ↑ | -> | CTRL | + +-------------------------------------------------+ */ + +/* /!\: rows are reversed in this half because I did all pcb design drunk */ +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT( + KC_END, KC_SPC, KC_RALT, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT, KC_RCTRL, + KC_HOME, KC_PGDN, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSHIFT, + KC_PGUP, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENTER, + KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, + KC_DEL, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, + KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_INS, KC_PSCR + ) +}; diff --git a/keyboards/handwired/k8split/rules.mk b/keyboards/handwired/k8split/rules.mk new file mode 100644 index 000000000000..3c7b0282c591 --- /dev/null +++ b/keyboards/handwired/k8split/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 = 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 +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +AUDIO_ENABLE = no # Audio output +FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches From 38d2c8cedf9f9f43b5ba372ffd38ccc7cc96be15 Mon Sep 17 00:00:00 2001 From: Joe Doh Date: Thu, 21 May 2020 22:51:36 -0400 Subject: [PATCH 030/930] [Keymap] dohmain 60_tsangan_hhkb layout (#9157) * initial commit for tsangan_hhkb community layout * keymap.c done * wrote readme * move media keys; add shortcuts * edit to reflect changes in keymap * update readme with imgur link --- .../60_tsangan_hhkb/dohmain/keymap.c | 43 +++++++++++++++++++ .../60_tsangan_hhkb/dohmain/readme.md | 37 ++++++++++++++++ 2 files changed, 80 insertions(+) create mode 100644 layouts/community/60_tsangan_hhkb/dohmain/keymap.c create mode 100644 layouts/community/60_tsangan_hhkb/dohmain/readme.md diff --git a/layouts/community/60_tsangan_hhkb/dohmain/keymap.c b/layouts/community/60_tsangan_hhkb/dohmain/keymap.c new file mode 100644 index 000000000000..2d92fd9c4da1 --- /dev/null +++ b/layouts/community/60_tsangan_hhkb/dohmain/keymap.c @@ -0,0 +1,43 @@ +#include QMK_KEYBOARD_H + +enum layer { + QWERTY, + COLEMAK, + FUNCTION, + ADJUST, +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [QWERTY] = LAYOUT_60_tsangan_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_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, + 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, LT(2,KC_ENT), + KC_LSPO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSPC, MO(3), + KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, KC_RGUI, KC_RALT, KC_RCTL + ), + + [COLEMAK] = LAYOUT_60_tsangan_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_GRV, + 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, + LT(2, KC_CAPS), KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, LT(2,KC_ENT), + KC_LSPO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSPC, MO(3), + KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, KC_RGUI, KC_RALT, KC_RCTL + ), + + [FUNCTION] = LAYOUT_60_tsangan_hhkb( + 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, KC_MPLY, KC_MPRV, KC_MNXT, XXXXXXX, XXXXXXX, KC_HOME, KC_UP, KC_END, KC_PSCR, KC_SLCK, KC_PAUS, XXXXXXX, + _______, XXXXXXX, KC_MUTE, KC_VOLD, KC_VOLU, XXXXXXX, XXXXXXX, KC_LEFT, KC_DOWN, KC_RGHT, KC_DEL, KC_INS, _______, + _______, KC_UNDO, KC_CUT, KC_COPY, KC_PSTE, KC_AGIN, XXXXXXX, XXXXXXX, KC_WBAK, KC_WFWD, KC_WREF, _______, KC_WHOM, + _______, _______, _______, _______, _______, KC_APP, _______ + ), + + [ADJUST] = LAYOUT_60_tsangan_hhkb( + C(A(KC_DEL)), XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_BRID, KC_BRIU, XXXXXXX, XXXXXXX, + C(S(KC_ESC)), TO(0), XXXXXXX, XXXXXXX, 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, TO(1), XXXXXXX, XXXXXXX, NK_TOGG, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, + XXXXXXX, XXXXXXX, XXXXXXX, _______, XXXXXXX, XXXXXXX, XXXXXXX + ), + +}; diff --git a/layouts/community/60_tsangan_hhkb/dohmain/readme.md b/layouts/community/60_tsangan_hhkb/dohmain/readme.md new file mode 100644 index 000000000000..90b615a028d1 --- /dev/null +++ b/layouts/community/60_tsangan_hhkb/dohmain/readme.md @@ -0,0 +1,37 @@ +# dohmain's 60% Tsangan HHKB layout +## Layout +![Layout Image](https://i.imgur.com/LfTyOF4.png) +## Features +### CapsFn +* Function layer is accessed by holding down `CapsLock` or `Enter`. +* `CapsLock` and `Enter` still function as normal when tapped. +### Space Cadet Shift +* Left and right `Shift` keys now output opening parenthesis `(` and closing parenthesis `)`, respectively, when tapped. +* When held down they function as normal. +### Navigation Cluster +The Navigation Cluster is laid out to be easily accessed with the right hand without moving your hand away from your typing position. The Navigation Cluster layout is focused around the placement of the arrow keys and is easy to remember the placement when broken down into groups. +* #### Arrows + * The arrow keys are placed on `I` `J` `K` `L` and maintains their natural positions. +* #### Home/End + * `Home` on `U` + * `End` on `O`. +* #### Page Up/Page Down + * `Page Up` on `H` + * `Page Down` on `N` +* #### Delete/Insert + * `Delete` on `;` + * `Insert` on `'` +### Media Controls + * `Play/Pause` on `W` + * `Previous Track` on `E` + * `Next Track` on `R` + * `Mute` on `S` + * `Volume Down` on `D` + * `Volume Up` on `F` +### Shortcuts + * `Undo` on `Z` + * `Cut` on `X` + * `Copy` on `C` + * `Paste` on `V` + * `Redo` on `B` + * `Print Screen` on `P` From 503cf18aedc8166bb5a84e15fb0c6c6da6d47f53 Mon Sep 17 00:00:00 2001 From: shohart Date: Sat, 23 May 2020 18:49:05 +0200 Subject: [PATCH 031/930] ymdk/bface - RGB config and minila layout (#9127) * Fix info about RGB LEDs on the bottom. * Added RGB LEDs support * Added RGB LEDs config options * Added minila layout with RGB keys * Create readme.md * Update keyboards/ymdk/bface/keymaps/minila/keymap.c Co-authored-by: Joel Challis * Update keyboards/ymdk/bface/keymaps/minila/keymap.c Co-authored-by: Joel Challis * Update keyboards/ymdk/bface/keymaps/minila/keymap.c Co-authored-by: Joel Challis * Update keyboards/ymdk/bface/keymaps/minila/readme.md Co-authored-by: James Young <18669334+noroadsleft@users.noreply.github.com> * Update keyboards/ymdk/bface/keymaps/minila/readme.md Co-authored-by: James Young <18669334+noroadsleft@users.noreply.github.com> Co-authored-by: Joel Challis Co-authored-by: James Young <18669334+noroadsleft@users.noreply.github.com> --- keyboards/ymdk/bface/README.md | 3 +- keyboards/ymdk/bface/config.h | 6 +++ keyboards/ymdk/bface/keymaps/minila/keymap.c | 42 +++++++++++++++++++ keyboards/ymdk/bface/keymaps/minila/readme.md | 11 +++++ keyboards/ymdk/bface/rules.mk | 3 +- 5 files changed, 63 insertions(+), 2 deletions(-) create mode 100644 keyboards/ymdk/bface/keymaps/minila/keymap.c create mode 100644 keyboards/ymdk/bface/keymaps/minila/readme.md diff --git a/keyboards/ymdk/bface/README.md b/keyboards/ymdk/bface/README.md index 04ba680de1d9..d99d4f9fb0d6 100644 --- a/keyboards/ymdk/bface/README.md +++ b/keyboards/ymdk/bface/README.md @@ -5,8 +5,9 @@ A 60% keyboard that runs ps2avrgb natively and fits the popular GH60 form factor. Another "bfake" or clone of the original B.face PCB by [Winkeyless](https://winkeyless.kr/product/b-face-x2-pcb/). This PCB has slightly different switch matrix than the origninal B.face, and is also different than the bfake. It commonly comes as the PCB in 60% keyboard kits sold by YMDK on Aliexpress. * Keyboard Maintainer: QMK Community -* Hardware Supported: White Bface Mini USB PCB with no RGB. +* Hardware Supported: White Bface Mini USB PCB with 12 RGB LEDs on the bottom. * Hardware Availability: [Shenzhen YMD Tech Co. (YMDK) on Aliexpress](https://www.aliexpress.com/item/32799437588.html) +* Case capability: You can not use generic GH60 plastic cases with this board as RGB LEDs on the bottom is messing with the supportive ribs of the case, just like on DZ60. Make example for this keyboard (after setting up your build environment): diff --git a/keyboards/ymdk/bface/config.h b/keyboards/ymdk/bface/config.h index dfcfbcaa1213..e6006aeb40e7 100644 --- a/keyboards/ymdk/bface/config.h +++ b/keyboards/ymdk/bface/config.h @@ -36,3 +36,9 @@ along with this program. If not, see . #define BACKLIGHT_PIN D4 #define BACKLIGHT_LEVELS 6 + +#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/ymdk/bface/keymaps/minila/keymap.c b/keyboards/ymdk/bface/keymaps/minila/keymap.c new file mode 100644 index 000000000000..4038e8f76248 --- /dev/null +++ b/keyboards/ymdk/bface/keymaps/minila/keymap.c @@ -0,0 +1,42 @@ +/* +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 . +*/ + +#include QMK_KEYBOARD_H + +enum layer_names { + _BL, + _FL +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + //Base Layer + [_BL] = 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_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, + 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_NO, MT(MOD_RCTL, KC_ENT), + KC_LSPO, 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_DEL, + KC_LCTL, KC_LGUI, KC_LALT, MO(_FL), KC_SPC, MO(_FL), KC_RALT, KC_APP, KC_LEFT, KC_DOWN, KC_RGHT + ), + //FN Layer + [_FL] = LAYOUT_all( + 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, _______, RESET, + _______, _______, KC_HOME, KC_UP, KC_END, KC_PGUP, _______, NK_TOGG, KC_PSCR, KC_SLCK, KC_PAUS, _______, BL_STEP, BL_TOGG, + _______, _______, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGDN, _______, KC_INS, KC_HOME, KC_PGUP, KC_BSPC, _______, _______, _______, + _______, _______, RGB_TOG, RGB_MOD, RGB_HUI, RGB_VAD, RGB_VAI, _______, KC_DEL, KC_END, KC_PGDN, _______, _______, _______, _______, + _______, _______, _______, _______, KC_ENT, _______, _______, _______, _______, _______, _______ + ), +}; diff --git a/keyboards/ymdk/bface/keymaps/minila/readme.md b/keyboards/ymdk/bface/keymaps/minila/readme.md new file mode 100644 index 000000000000..7b3760c136ea --- /dev/null +++ b/keyboards/ymdk/bface/keymaps/minila/readme.md @@ -0,0 +1,11 @@ +Basically layout like on Filco Minila board, found here: https://geekboards.ru/product/filco-minila + +There is one single function layer that can be accessed by holding either FN key or Caps Lock. Enter is also a Right Control when held down. Shifts are also '(' and ')' respectively when tapped. + +You can control underglow RGBs: + +* FN+Z - Toggle +* FN+X - Effect +* FN+C - Color +* FN+V - Brightness lower +* FN+B - Brightness higher diff --git a/keyboards/ymdk/bface/rules.mk b/keyboards/ymdk/bface/rules.mk index 8cabca8ee65c..3d51be11332d 100644 --- a/keyboards/ymdk/bface/rules.mk +++ b/keyboards/ymdk/bface/rules.mk @@ -18,4 +18,5 @@ EXTRAKEY_ENABLE = yes CONSOLE_ENABLE = no COMMAND_ENABLE = yes BACKLIGHT_ENABLE = yes -RGBLIGHT_ENABLE = no +RGBLIGHT_ENABLE = yes +WS2812_DRIVER = i2c From f66680d233d1abf61a38d3704a99941c62bfebbc Mon Sep 17 00:00:00 2001 From: Takeshi ISHII <2170248+mtei@users.noreply.github.com> Date: Sun, 24 May 2020 07:57:59 +0900 Subject: [PATCH 032/930] Fixed the indentation of the sample code in feature_pointing_device docs (#9177) * Fixed the indentation of the sample code in docs/feature_pointing_device.md sample. * Update docs/feature_pointing_device.md Co-authored-by: Joel Challis Co-authored-by: Joel Challis --- docs/feature_pointing_device.md | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/docs/feature_pointing_device.md b/docs/feature_pointing_device.md index b90c341d5ed7..f0b3d75bd8dd 100644 --- a/docs/feature_pointing_device.md +++ b/docs/feature_pointing_device.md @@ -27,20 +27,17 @@ In the following example, a custom key is used to click the mouse and scroll 127 ```c case MS_SPECIAL: - report_mouse_t currentReport = pointing_device_get_report(); - if (record->event.pressed) - { + report_mouse_t currentReport = pointing_device_get_report(); + if (record->event.pressed) { currentReport.v = 127; - currentReport.h = 127; - currentReport.buttons |= MOUSE_BTN1; //this is defined in report.h - } - else - { + currentReport.h = 127; + currentReport.buttons |= MOUSE_BTN1; // this is defined in report.h + } else { currentReport.v = -127; currentReport.h = -127; currentReport.buttons &= ~MOUSE_BTN1; } - pointing_device_set_report(currentReport); + pointing_device_set_report(currentReport); break; ``` From 2ac3a51d71a05fe46fc6967797b0d34d8fb3fcd8 Mon Sep 17 00:00:00 2001 From: Drashna Jaelre Date: Sun, 24 May 2020 15:02:00 -0700 Subject: [PATCH 033/930] Fix SPI EEPROM compile issue when Console is enabled (#9193) --- drivers/eeprom/eeprom_spi.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/drivers/eeprom/eeprom_spi.c b/drivers/eeprom/eeprom_spi.c index e10aaf14c84d..7b6416eafbf4 100644 --- a/drivers/eeprom/eeprom_spi.c +++ b/drivers/eeprom/eeprom_spi.c @@ -50,8 +50,9 @@ # define EXTERNAL_EEPROM_SPI_TIMEOUT 100 #endif -#ifdef CONSOLE_ENABLE -# include "print.h" +#if defined(CONSOLE_ENABLE) && defined(DEBUG_EEPROM_OUTPUT) +# include "timer.h" +# include "debug.h" #endif // CONSOLE_ENABLE static void init_spi_if_required(void) { @@ -93,7 +94,7 @@ static void spi_eeprom_transmit_address(uintptr_t addr) { void eeprom_driver_init(void) {} void eeprom_driver_erase(void) { -#ifdef CONSOLE_ENABLE +#if defined(CONSOLE_ENABLE) && defined(DEBUG_EEPROM_OUTPUT) uint32_t start = timer_read32(); #endif @@ -103,7 +104,7 @@ void eeprom_driver_erase(void) { eeprom_write_block(buf, (void *)(uintptr_t)addr, EXTERNAL_EEPROM_PAGE_SIZE); } -#ifdef CONSOLE_ENABLE +#if defined(CONSOLE_ENABLE) && defined(DEBUG_EEPROM_OUTPUT) dprintf("EEPROM erase took %ldms to complete\n", ((long)(timer_read32() - start))); #endif } @@ -141,7 +142,7 @@ void eeprom_read_block(void *buf, const void *addr, size_t len) { spi_eeprom_transmit_address((uintptr_t)addr); spi_receive(buf, len); -#ifdef DEBUG_EEPROM_OUTPUT +#if defined(CONSOLE_ENABLE) && defined(DEBUG_EEPROM_OUTPUT) dprintf("[EEPROM R] 0x%08lX: ", ((uint32_t)(uintptr_t)addr)); for (size_t i = 0; i < len; ++i) { dprintf(" %02X", (int)(((uint8_t *)buf)[i])); @@ -200,7 +201,7 @@ void eeprom_write_block(const void *buf, void *addr, size_t len) { return; } -#ifdef DEBUG_EEPROM_OUTPUT +#if defined(CONSOLE_ENABLE) && defined(DEBUG_EEPROM_OUTPUT) dprintf("[EEPROM W] 0x%08lX: ", ((uint32_t)(uintptr_t)target_addr)); for (size_t i = 0; i < write_length; i++) { dprintf(" %02X", (int)(uint8_t)(read_buf[i])); From 883dd2df80edf084d100c61c1b61782bfa5503f9 Mon Sep 17 00:00:00 2001 From: Drashna Jaelre Date: Sun, 24 May 2020 15:02:13 -0700 Subject: [PATCH 034/930] Fix i2c EEPROM compile issue when Console is enabled (#9186) * Fix i2c EEPROM compile issue when Console is enabled * Only use if both console and debugging is enabled --- drivers/eeprom/eeprom_i2c.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/drivers/eeprom/eeprom_i2c.c b/drivers/eeprom/eeprom_i2c.c index 88be2be06f19..ca8af3da51a4 100644 --- a/drivers/eeprom/eeprom_i2c.c +++ b/drivers/eeprom/eeprom_i2c.c @@ -37,8 +37,9 @@ // #define DEBUG_EEPROM_OUTPUT -#ifdef DEBUG_EEPROM_OUTPUT -# include "print.h" +#if defined(CONSOLE_ENABLE) && defined(DEBUG_EEPROM_OUTPUT) +# include "timer.h" +# include "debug.h" #endif // DEBUG_EEPROM_OUTPUT static inline void init_i2c_if_required(void) { @@ -60,7 +61,7 @@ static inline void fill_target_address(uint8_t *buffer, const void *addr) { void eeprom_driver_init(void) {} void eeprom_driver_erase(void) { -#ifdef CONSOLE_ENABLE +#if defined(CONSOLE_ENABLE) && defined(DEBUG_EEPROM_OUTPUT) uint32_t start = timer_read32(); #endif @@ -70,7 +71,7 @@ void eeprom_driver_erase(void) { eeprom_write_block(buf, (void *)(uintptr_t)addr, EXTERNAL_EEPROM_PAGE_SIZE); } -#ifdef CONSOLE_ENABLE +#if defined(CONSOLE_ENABLE) && defined(DEBUG_EEPROM_OUTPUT) dprintf("EEPROM erase took %ldms to complete\n", ((long)(timer_read32() - start))); #endif } @@ -83,7 +84,7 @@ void eeprom_read_block(void *buf, const void *addr, size_t len) { i2c_transmit(EXTERNAL_EEPROM_I2C_ADDRESS((uintptr_t)addr), complete_packet, EXTERNAL_EEPROM_ADDRESS_SIZE, 100); i2c_receive(EXTERNAL_EEPROM_I2C_ADDRESS((uintptr_t)addr), buf, len, 100); -#ifdef DEBUG_EEPROM_OUTPUT +#if defined(CONSOLE_ENABLE) && defined(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])); @@ -110,7 +111,7 @@ void eeprom_write_block(const void *buf, void *addr, size_t len) { complete_packet[EXTERNAL_EEPROM_ADDRESS_SIZE + i] = read_buf[i]; } -#ifdef DEBUG_EEPROM_OUTPUT +#if defined(CONSOLE_ENABLE) && defined(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])); From dc6fe85b87a62ddba13b501a8d81bea9d5ff563b Mon Sep 17 00:00:00 2001 From: Joel Challis Date: Mon, 25 May 2020 03:15:27 +0100 Subject: [PATCH 035/930] [Keyboard] Add zvecr/split_blackpill (#9166) * Add split_blackpill keyboard * Add RGB config * tidy up rules * fix usage of layer_state_t * Apply suggestions from code review * Apply suggestions from code review * Apply suggestions from code review * Add configurator support --- keyboards/zvecr/split_blackpill/chconf.h | 714 ++++++++++++++++++ keyboards/zvecr/split_blackpill/config.h | 180 +++++ keyboards/zvecr/split_blackpill/halconf.h | 525 +++++++++++++ keyboards/zvecr/split_blackpill/info.json | 13 + .../split_blackpill/keymaps/default/keymap.c | 91 +++ keyboards/zvecr/split_blackpill/mcuconf.h | 209 +++++ keyboards/zvecr/split_blackpill/readme.md | 15 + keyboards/zvecr/split_blackpill/rules.mk | 37 + .../zvecr/split_blackpill/split_blackpill.c | 29 + .../zvecr/split_blackpill/split_blackpill.h | 35 + 10 files changed, 1848 insertions(+) create mode 100644 keyboards/zvecr/split_blackpill/chconf.h create mode 100644 keyboards/zvecr/split_blackpill/config.h create mode 100644 keyboards/zvecr/split_blackpill/halconf.h create mode 100644 keyboards/zvecr/split_blackpill/info.json create mode 100644 keyboards/zvecr/split_blackpill/keymaps/default/keymap.c create mode 100644 keyboards/zvecr/split_blackpill/mcuconf.h create mode 100644 keyboards/zvecr/split_blackpill/readme.md create mode 100644 keyboards/zvecr/split_blackpill/rules.mk create mode 100644 keyboards/zvecr/split_blackpill/split_blackpill.c create mode 100644 keyboards/zvecr/split_blackpill/split_blackpill.h diff --git a/keyboards/zvecr/split_blackpill/chconf.h b/keyboards/zvecr/split_blackpill/chconf.h new file mode 100644 index 000000000000..f5e471640c56 --- /dev/null +++ b/keyboards/zvecr/split_blackpill/chconf.h @@ -0,0 +1,714 @@ +/* + 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. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +/** + * @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. + * + * @addtogroup config + * @details Kernel related settings and hooks. + * @{ + */ + +#ifndef CHCONF_H +#define CHCONF_H + +#define _CHIBIOS_RT_CONF_ +#define _CHIBIOS_RT_CONF_VER_6_0_ + +/*===========================================================================*/ +/** + * @name System timers settings + * @{ + */ +/*===========================================================================*/ + +/** + * @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. + * @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. + */ +#if !defined(CH_CFG_ST_TIMEDELTA) +#define CH_CFG_ST_TIMEDELTA 0 +#endif + +/** @} */ + +/*===========================================================================*/ +/** + * @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. + */ +#if !defined(CH_CFG_TIME_QUANTUM) +#define CH_CFG_TIME_QUANTUM 0 +#endif + +/** + * @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. + */ +#if !defined(CH_CFG_MEMCORE_SIZE) +#define CH_CFG_MEMCORE_SIZE 0 +#endif + +/** + * @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. + */ +#if !defined(CH_CFG_NO_IDLE_THREAD) +#define CH_CFG_NO_IDLE_THREAD FALSE +#endif + +/** @} */ + +/*===========================================================================*/ +/** + * @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. + */ +#if !defined(CH_CFG_OPTIMIZE_SPEED) +#define CH_CFG_OPTIMIZE_SPEED TRUE +#endif + +/** @} */ + +/*===========================================================================*/ +/** + * @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. + */ +#if !defined(CH_CFG_USE_TM) +#define CH_CFG_USE_TM FALSE +#endif + +/** + * @brief Threads registry APIs. + * @details If enabled then the registry APIs are included in the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_REGISTRY) +#define CH_CFG_USE_REGISTRY TRUE +#endif + +/** + * @brief Threads synchronization APIs. + * @details If enabled then the @p chThdWait() function is included in + * the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_WAITEXIT) +#define CH_CFG_USE_WAITEXIT TRUE +#endif + +/** + * @brief Semaphores APIs. + * @details If enabled then the Semaphores APIs are included in the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_SEMAPHORES) +#define CH_CFG_USE_SEMAPHORES TRUE +#endif + +/** + * @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. + */ +#if !defined(CH_CFG_USE_SEMAPHORES_PRIORITY) +#define CH_CFG_USE_SEMAPHORES_PRIORITY FALSE +#endif + +/** + * @brief Mutexes APIs. + * @details If enabled then the mutexes APIs are included in the kernel. + * + * @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. + * @note Recursive mutexes are heavier and have an increased + * memory footprint. + * + * @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. + * @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. + */ +#if !defined(CH_CFG_USE_CONDVARS) +#define CH_CFG_USE_CONDVARS TRUE +#endif + +/** + * @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. + */ +#if !defined(CH_CFG_USE_CONDVARS_TIMEOUT) +#define CH_CFG_USE_CONDVARS_TIMEOUT FALSE +#endif + +/** + * @brief Events Flags APIs. + * @details If enabled then the event flags APIs are included in the kernel. + * + * @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. + * @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. + */ +#if !defined(CH_CFG_USE_EVENTS_TIMEOUT) +#define CH_CFG_USE_EVENTS_TIMEOUT TRUE +#endif + +/** + * @brief Synchronous Messages APIs. + * @details If enabled then the synchronous messages APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_MESSAGES) +#define CH_CFG_USE_MESSAGES TRUE +#endif + +/** + * @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. + */ +#if !defined(CH_CFG_USE_MESSAGES_PRIORITY) +#define CH_CFG_USE_MESSAGES_PRIORITY FALSE +#endif + +/** + * @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. + */ +#if !defined(CH_CFG_USE_MAILBOXES) +#define CH_CFG_USE_MAILBOXES TRUE +#endif + +/** + * @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. + */ +#if !defined(CH_CFG_USE_MEMCORE) +#define CH_CFG_USE_MEMCORE TRUE +#endif + +/** + * @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. + */ +#if !defined(CH_CFG_USE_HEAP) +#define CH_CFG_USE_HEAP TRUE +#endif + +/** + * @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. + */ +#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. + * @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. + */ +#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 + +/** @} */ + +/*===========================================================================*/ +/** + * @name Debug options + * @{ + */ +/*===========================================================================*/ + +/** + * @brief Debug option, kernel statistics. + * + * @note The default is @p FALSE. + */ +#if !defined(CH_DBG_STATISTICS) +#define CH_DBG_STATISTICS FALSE +#endif + +/** + * @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. + */ +#if !defined(CH_DBG_SYSTEM_STATE_CHECK) +#define CH_DBG_SYSTEM_STATE_CHECK FALSE +#endif + +/** + * @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. + */ +#if !defined(CH_DBG_ENABLE_CHECKS) +#define CH_DBG_ENABLE_CHECKS FALSE +#endif + +/** + * @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. + */ +#if !defined(CH_DBG_ENABLE_ASSERTS) +#define CH_DBG_ENABLE_ASSERTS FALSE +#endif + +/** + * @brief Debug option, trace buffer. + * @details If enabled then the trace buffer is activated. + * + * @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. + * @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. + */ +#if !defined(CH_DBG_ENABLE_STACK_CHECK) +#define CH_DBG_ENABLE_STACK_CHECK FALSE +#endif + +/** + * @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. + */ +#if !defined(CH_DBG_FILL_THREADS) +#define CH_DBG_FILL_THREADS FALSE +#endif + +/** + * @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. + */ +#if !defined(CH_DBG_THREADS_PROFILING) +#define CH_DBG_THREADS_PROFILING FALSE +#endif + +/** @} */ + +/*===========================================================================*/ +/** + * @name Kernel hooks + * @{ + */ +/*===========================================================================*/ + +/** + * @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. + */ +#define CH_CFG_THREAD_EXTRA_FIELDS \ + /* Add threads custom fields here.*/ + +/** + * @brief Threads initialization hook. + * @details User initialization code added to the @p _thread_init() function. + * + * @note It is invoked from within @p _thread_init() 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/zvecr/split_blackpill/config.h b/keyboards/zvecr/split_blackpill/config.h new file mode 100644 index 000000000000..8165711c9b8e --- /dev/null +++ b/keyboards/zvecr/split_blackpill/config.h @@ -0,0 +1,180 @@ +/* Copyright 2020 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 0x5A56 +#define PRODUCT_ID 0x0001 +#define DEVICE_VER 0x0001 +#define MANUFACTURER zvecr +#define PRODUCT split_blackpill +#define DESCRIPTION ARM Split ortho_4x12 + +/* key matrix size */ +#define MATRIX_ROWS 8 // Rows are doubled-up +#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_COL_PINS { B11, B10, B1, B0, A7, A6 } +#define MATRIX_ROW_PINS { B15, B14, B13, B12 } +#define MATRIX_COL_PINS_RIGHT { B12, B13, B14, B15, A8, A9 } +#define MATRIX_ROW_PINS_RIGHT { B0, B1, B10, B11 } + +/* COL2ROW, ROW2COL*/ +#define DIODE_DIRECTION COL2ROW + +#define MATRIX_IO_DELAY 5 + +/* + * Split Keyboard specific options, make sure you have 'SPLIT_KEYBOARD = yes' in your rules.mk, and define SOFT_SERIAL_PIN. + */ +#define SPLIT_HAND_PIN B3 +#define SOFT_SERIAL_PIN B6 +#define SELECT_SOFT_SERIAL_SPEED 0 + +#define RGB_DI_PIN B4 +#define RGBLED_NUM 24 +#define RGBLED_SPLIT { 12, 12 } +#define RGBLIGHT_ANIMATIONS + +#define WS2812_PWM_DRIVER PWMD3 +#define WS2812_PWM_CHANNEL 1 +#define WS2812_DMA_STREAM STM32_DMA1_STREAM3 +#define WS2812_DMA_CHANNEL 3 + +/* 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 + +/* + * 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 */ +#define NO_ACTION_MACRO +#define NO_ACTION_FUNCTION + +/* Bootmagic Lite key configuration */ +#define BOOTMAGIC_LITE_ROW 0 +#define BOOTMAGIC_LITE_COLUMN 0 +#define BOOTMAGIC_LITE_ROW_RIGHT 4 +#define BOOTMAGIC_LITE_COLUMN_RIGHT 0 diff --git a/keyboards/zvecr/split_blackpill/halconf.h b/keyboards/zvecr/split_blackpill/halconf.h new file mode 100644 index 000000000000..cc6775020221 --- /dev/null +++ b/keyboards/zvecr/split_blackpill/halconf.h @@ -0,0 +1,525 @@ +/* + 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. + 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 + +#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 +#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 cryptographic subsystem. + */ +#if !defined(HAL_USE_CRY) || defined(__DOXYGEN__) +#define HAL_USE_CRY FALSE +#endif + +/** + * @brief Enables the DAC subsystem. + */ +#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 +#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 TRUE +#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 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 +#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 +#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 + +/** + * @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. */ +/*===========================================================================*/ + +/** + * @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 + +/** + * @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. */ +/*===========================================================================*/ + +/** + * @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 the zero-copy API. + */ +#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 + +/** + * @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. */ +/*===========================================================================*/ + +/** + * @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 16 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 256 bytes for both the transmission and receive + * buffers. + */ +#if !defined(SERIAL_USB_BUFFERS_SIZE) || defined(__DOXYGEN__) +#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 + +/*===========================================================================*/ +/* 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 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 +#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. */ +/*===========================================================================*/ + +/** + * @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 + +/*===========================================================================*/ +/* 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/zvecr/split_blackpill/info.json b/keyboards/zvecr/split_blackpill/info.json new file mode 100644 index 000000000000..d43dc6f403de --- /dev/null +++ b/keyboards/zvecr/split_blackpill/info.json @@ -0,0 +1,13 @@ +{ + "keyboard_name": "split_blackpill", + "url": "", + "maintainer": "zvecr", + "width": 12, + "height": 4, + "layouts": { + "LAYOUT_ortho_4x12": { + "key_count": 48, + "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}] + } + } +} diff --git a/keyboards/zvecr/split_blackpill/keymaps/default/keymap.c b/keyboards/zvecr/split_blackpill/keymaps/default/keymap.c new file mode 100644 index 000000000000..f9428c3292da --- /dev/null +++ b/keyboards/zvecr/split_blackpill/keymaps/default/keymap.c @@ -0,0 +1,91 @@ +#include QMK_KEYBOARD_H + +// Defines names for use in layer keycodes and the keymap +enum layer_names { + _QWERTY, + _LOWER, + _RAISE, + _ADJUST, +}; + +#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 | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Ctrl | GUI | Alt | App |Lower | Space |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, KC_ENT , + KC_LCTL, KC_LGUI, KC_LALT, KC_APP, 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| | | | |R Tog |R Mode|R Rev |R Grad| Reset| | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | | | | | |R HUI|R SAI|R VAI| | | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | | | | | |R HUD|R SAD|R VAD| | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | | + * `-----------------------------------------------------------------------------------' + */ +[_ADJUST] = LAYOUT_ortho_4x12( + _______, RESET, _______, _______, _______, _______, RGB_TOG, RGB_MOD, RGB_RMOD,RGB_M_G, RESET, _______, + _______, _______, _______, _______, _______, _______, RGB_HUI, RGB_SAI, RGB_VAI, _______, _______, _______, + _______, _______, _______, _______, _______, _______, RGB_HUD, RGB_SAD, RGB_VAD, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ +) + +}; + +layer_state_t layer_state_set_user(layer_state_t state) { + return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST); +} diff --git a/keyboards/zvecr/split_blackpill/mcuconf.h b/keyboards/zvecr/split_blackpill/mcuconf.h new file mode 100644 index 000000000000..4dea6bcf71a6 --- /dev/null +++ b/keyboards/zvecr/split_blackpill/mcuconf.h @@ -0,0 +1,209 @@ +/* + 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_ + +#define STM32F103_MCUCONF + +/* + * STM32F103 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: + * 15...0 Lowest...Highest. + * + * DMA priorities: + * 0...3 Lowest...Highest. + */ + +/* + * HAL driver system settings. + */ +#define STM32_NO_INIT FALSE +#define STM32_HSI_ENABLED TRUE +#define STM32_LSI_ENABLED FALSE +#define STM32_HSE_ENABLED TRUE +#define STM32_LSE_ENABLED FALSE +#define STM32_SW STM32_SW_PLL +#define STM32_PLLSRC STM32_PLLSRC_HSE +#define STM32_PLLXTPRE STM32_PLLXTPRE_DIV1 +#define STM32_PLLMUL_VALUE 9 +#define STM32_HPRE STM32_HPRE_DIV1 +#define STM32_PPRE1 STM32_PPRE1_DIV2 +#define STM32_PPRE2 STM32_PPRE2_DIV2 +#define STM32_ADCPRE STM32_ADCPRE_DIV4 +#define STM32_USB_CLOCK_REQUIRED TRUE +#define STM32_USBPRE STM32_USBPRE_DIV1P5 +#define STM32_MCOSEL STM32_MCOSEL_NOCLOCK +#define STM32_RTCSEL STM32_RTCSEL_HSEDIV +#define STM32_PVD_ENABLE FALSE +#define STM32_PLS STM32_PLS_LEV0 + +/* + * ADC driver system settings. + */ +#define STM32_ADC_USE_ADC1 FALSE +#define STM32_ADC_ADC1_DMA_PRIORITY 2 +#define STM32_ADC_ADC1_IRQ_PRIORITY 6 + +/* + * CAN driver system settings. + */ +#define STM32_CAN_USE_CAN1 FALSE +#define STM32_CAN_CAN1_IRQ_PRIORITY 11 + +/* + * 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 + +/* + * 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_TIM4 FALSE +#define STM32_GPT_USE_TIM5 FALSE +#define STM32_GPT_USE_TIM8 FALSE +#define STM32_GPT_TIM1_IRQ_PRIORITY 7 +#define STM32_GPT_TIM2_IRQ_PRIORITY 7 +#define STM32_GPT_TIM3_IRQ_PRIORITY 7 +#define STM32_GPT_TIM4_IRQ_PRIORITY 7 +#define STM32_GPT_TIM5_IRQ_PRIORITY 7 +#define STM32_GPT_TIM8_IRQ_PRIORITY 7 + +/* + * 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 5 +#define STM32_I2C_I2C2_IRQ_PRIORITY 5 +#define STM32_I2C_I2C1_DMA_PRIORITY 3 +#define STM32_I2C_I2C2_DMA_PRIORITY 3 +#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_USE_TIM4 FALSE +#define STM32_ICU_USE_TIM5 FALSE +#define STM32_ICU_USE_TIM8 FALSE +#define STM32_ICU_TIM1_IRQ_PRIORITY 7 +#define STM32_ICU_TIM2_IRQ_PRIORITY 7 +#define STM32_ICU_TIM3_IRQ_PRIORITY 7 +#define STM32_ICU_TIM4_IRQ_PRIORITY 7 +#define STM32_ICU_TIM5_IRQ_PRIORITY 7 +#define STM32_ICU_TIM8_IRQ_PRIORITY 7 + +/* + * 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_USE_TIM4 FALSE +#define STM32_PWM_USE_TIM5 FALSE +#define STM32_PWM_USE_TIM8 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_TIM5_IRQ_PRIORITY 7 +#define STM32_PWM_TIM8_IRQ_PRIORITY 7 + +/* + * RTC driver system settings. + */ +#define STM32_RTC_IRQ_PRIORITY 15 + +/* + * SERIAL driver system settings. + */ +#define STM32_SERIAL_USE_USART1 TRUE +#define STM32_SERIAL_USE_USART2 FALSE +#define STM32_SERIAL_USE_USART3 FALSE +#define STM32_SERIAL_USE_UART4 FALSE +#define STM32_SERIAL_USE_UART5 FALSE +#define STM32_SERIAL_USART1_PRIORITY 12 +#define STM32_SERIAL_USART2_PRIORITY 12 +#define STM32_SERIAL_USART3_PRIORITY 12 +#define STM32_SERIAL_UART4_PRIORITY 12 +#define STM32_SERIAL_UART5_PRIORITY 12 + +/* + * SPI driver system settings. + */ +#define STM32_SPI_USE_SPI1 FALSE +#define STM32_SPI_USE_SPI2 FALSE +#define STM32_SPI_USE_SPI3 FALSE +#define STM32_SPI_SPI1_DMA_PRIORITY 1 +#define STM32_SPI_SPI2_DMA_PRIORITY 1 +#define STM32_SPI_SPI3_DMA_PRIORITY 1 +#define STM32_SPI_SPI1_IRQ_PRIORITY 10 +#define STM32_SPI_SPI2_IRQ_PRIORITY 10 +#define STM32_SPI_SPI3_IRQ_PRIORITY 10 +#define STM32_SPI_DMA_ERROR_HOOK(spip) osalSysHalt("DMA failure") + +/* + * ST driver system settings. + */ +#define STM32_ST_IRQ_PRIORITY 8 +#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_USE_USART3 FALSE +#define STM32_UART_USART1_IRQ_PRIORITY 12 +#define STM32_UART_USART2_IRQ_PRIORITY 12 +#define STM32_UART_USART3_IRQ_PRIORITY 12 +#define STM32_UART_USART1_DMA_PRIORITY 0 +#define STM32_UART_USART2_DMA_PRIORITY 0 +#define STM32_UART_USART3_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_HP_IRQ_PRIORITY 13 +#define STM32_USB_USB1_LP_IRQ_PRIORITY 14 + +#endif /* _MCUCONF_H_ */ diff --git a/keyboards/zvecr/split_blackpill/readme.md b/keyboards/zvecr/split_blackpill/readme.md new file mode 100644 index 000000000000..811e308f7796 --- /dev/null +++ b/keyboards/zvecr/split_blackpill/readme.md @@ -0,0 +1,15 @@ +# split_blackpill + +![split_blackpill](https://i.imgur.com/cQTWvDFl.jpg) + +ARM Split ortho_4x12 mechanical keyboard. + +* Keyboard Maintainer: [zvecr](https://github.com/zvecr) +* Hardware Supported: f103 blackpill +* Hardware Availability: [repo](https://github.com/zvecr/split_blackpill) + +Make example for this keyboard (after setting up your build environment): + + make zvecr/split_blackpill: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/zvecr/split_blackpill/rules.mk b/keyboards/zvecr/split_blackpill/rules.mk new file mode 100644 index 000000000000..95d901ee06a8 --- /dev/null +++ b/keyboards/zvecr/split_blackpill/rules.mk @@ -0,0 +1,37 @@ +# MCU name +MCU = STM32F103 + +# GENERIC STM32F103C8T6 board - stm32duino bootloader +OPT_DEFS = -DCORTEX_VTOR_INIT=0x2000 +MCU_LDSCRIPT = STM32F103x8_stm32duino_bootloader +BOARD = STM32_F103_STM32DUINO +STM32_BOOTLOADER_ADDRESS = 0x80000000 + +DFU_ARGS = -d 1eaf:0003 -a2 -R +DFU_SUFFIX_ARGS = -v 1eaf -p 0003 + +# 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 +FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches + +SPLIT_KEYBOARD = yes +SERIAL_DRIVER = usart +WS2812_DRIVER = pwm +OPT_DEFS += -DSTM32_DMA_REQUIRED=TRUE + +LAYOUTS = ortho_4x12 diff --git a/keyboards/zvecr/split_blackpill/split_blackpill.c b/keyboards/zvecr/split_blackpill/split_blackpill.c new file mode 100644 index 000000000000..141f76e7b345 --- /dev/null +++ b/keyboards/zvecr/split_blackpill/split_blackpill.c @@ -0,0 +1,29 @@ +/* Copyright 2020 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 . + */ +#include "split_blackpill.h" + +void keyboard_pre_init_kb(void){ + // Workaround for reversible pcb/mcu + palSetLineMode(C13, PAL_MODE_OUTPUT_OPENDRAIN); + palSetLineMode(B9, PAL_MODE_OUTPUT_OPENDRAIN); + palSetLineMode(B8, PAL_MODE_OUTPUT_OPENDRAIN); + + keyboard_pre_init_user(); +} + +void board_init(void) { + AFIO->MAPR |= AFIO_MAPR_USART1_REMAP | AFIO_MAPR_TIM3_REMAP_PARTIALREMAP; +} diff --git a/keyboards/zvecr/split_blackpill/split_blackpill.h b/keyboards/zvecr/split_blackpill/split_blackpill.h new file mode 100644 index 000000000000..27504492ef3d --- /dev/null +++ b/keyboards/zvecr/split_blackpill/split_blackpill.h @@ -0,0 +1,35 @@ +/* Copyright 2020 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 LAYOUT_ortho_4x12( \ + 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 \ + ) \ + { \ + { L00, L01, L02, L03, L04, L05 }, \ + { L10, L11, L12, L13, L14, L15 }, \ + { L20, L21, L22, L23, L24, L25 }, \ + { L30, L31, L32, L33, L34, L35 }, \ + { R05, R04, R03, R02, R01, R00 }, \ + { R15, R14, R13, R12, R11, R10 }, \ + { R25, R24, R23, R22, R21, R20 }, \ + { R35, R34, R33, R32, R31, R30 } \ + } From 6ca00c2152831885e719a31e606bf041601a7a16 Mon Sep 17 00:00:00 2001 From: gmadrid Date: Mon, 25 May 2020 00:12:31 -0400 Subject: [PATCH 036/930] [Keyboard] PDBDOWN should be PCBDOWN. (#9192) --- keyboards/atreus/astar_mirrored/config.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/keyboards/atreus/astar_mirrored/config.h b/keyboards/atreus/astar_mirrored/config.h index 273f23a847bb..75155044def4 100644 --- a/keyboards/atreus/astar_mirrored/config.h +++ b/keyboards/atreus/astar_mirrored/config.h @@ -28,7 +28,7 @@ * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) * */ -#define PDBDOWN 1 +#define PCBDOWN 1 #define MATRIX_ROW_PINS { D0, D1, D3, D2 } #define MATRIX_COL_PINS { B7, D6, F7, F6, B6, D4, E6, B4, B5, C6, D7 } From d8f76f9e6dd76b20636f7726f98aac9c26d03aa5 Mon Sep 17 00:00:00 2001 From: yulei Date: Mon, 25 May 2020 20:16:33 +0800 Subject: [PATCH 037/930] Added missing shutdown_user() hook (#9180) * add missing shutdown_user() * use reset_keyboard() from quantum --- tmk_core/common/command.c | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/tmk_core/common/command.c b/tmk_core/common/command.c index af7c83702790..ee3188646c68 100644 --- a/tmk_core/common/command.c +++ b/tmk_core/common/command.c @@ -359,15 +359,8 @@ static bool command_common(uint8_t code) { // jump to bootloader case MAGIC_KC(MAGIC_KEY_BOOTLOADER): case MAGIC_KC(MAGIC_KEY_BOOTLOADER_ALT): - clear_keyboard(); // clear to prevent stuck keys print("\n\nJumping to bootloader... "); -#ifdef AUDIO_ENABLE - stop_all_notes(); - shutdown_user(); -#else - wait_ms(1000); -#endif - bootloader_jump(); // not return + reset_keyboard(); break; // debug toggle From f56d333db1a2dc4ec20de410ec9a26e5195e4411 Mon Sep 17 00:00:00 2001 From: Wilba Date: Tue, 26 May 2020 12:22:14 +1000 Subject: [PATCH 038/930] [Keyboard] Added wilba.tech WT60-XT (#9168) * Added wilba.tech WT60-XT * fix indent * Update keyboards/wilba_tech/wt60_xt/readme.md * Update keyboards/wilba_tech/wt60_xt/rules.mk * Update keyboards/wilba_tech/wt60_xt/wt60_xt.c --- keyboards/wilba_tech/wt60_xt/config.h | 183 ++++++++++++++++++ keyboards/wilba_tech/wt60_xt/info.json | 12 ++ .../wt60_xt/keymaps/default/keymap.c | 38 ++++ .../wilba_tech/wt60_xt/keymaps/via/keymap.c | 38 ++++ .../wilba_tech/wt60_xt/keymaps/via/rules.mk | 1 + keyboards/wilba_tech/wt60_xt/readme.md | 17 ++ keyboards/wilba_tech/wt60_xt/rules.mk | 31 +++ keyboards/wilba_tech/wt60_xt/wt60_xt.c | 100 ++++++++++ keyboards/wilba_tech/wt60_xt/wt60_xt.h | 35 ++++ 9 files changed, 455 insertions(+) create mode 100644 keyboards/wilba_tech/wt60_xt/config.h create mode 100644 keyboards/wilba_tech/wt60_xt/info.json create mode 100644 keyboards/wilba_tech/wt60_xt/keymaps/default/keymap.c create mode 100644 keyboards/wilba_tech/wt60_xt/keymaps/via/keymap.c create mode 100644 keyboards/wilba_tech/wt60_xt/keymaps/via/rules.mk create mode 100644 keyboards/wilba_tech/wt60_xt/readme.md create mode 100644 keyboards/wilba_tech/wt60_xt/rules.mk create mode 100644 keyboards/wilba_tech/wt60_xt/wt60_xt.c create mode 100644 keyboards/wilba_tech/wt60_xt/wt60_xt.h diff --git a/keyboards/wilba_tech/wt60_xt/config.h b/keyboards/wilba_tech/wt60_xt/config.h new file mode 100644 index 000000000000..410245cebd3e --- /dev/null +++ b/keyboards/wilba_tech/wt60_xt/config.h @@ -0,0 +1,183 @@ +/* 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 0x001C // PCB #28 +#define DEVICE_VER 0x0001 +#define MANUFACTURER wilba.tech +#define PRODUCT wilba.tech WT60-XT +#define DESCRIPTION wilba.tech WT60-XT + +#define C6_AUDIO +#define AUDIO_CLICKY + +/* key matrix size */ +#define MATRIX_ROWS 5 +#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 { F0, E6, F4, F6, F7 } +#define MATRIX_COL_PINS { B7, B0, F5, D5, B1, B2, B3, D3, D2, C7, B6, B5, B4, D7, D6, D4 } +#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 + +/* 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. + * + */ + +/* 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_HELP1 H +//#define MAGIC_KEY_HELP2 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_ALT1 ESC +//#define MAGIC_KEY_LAYER0_ALT2 GRAVE +//#define MAGIC_KEY_LAYER0 0 +//#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 PAUSE +//#define MAGIC_KEY_LOCK CAPS +//#define MAGIC_KEY_EEPROM E +//#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 diff --git a/keyboards/wilba_tech/wt60_xt/info.json b/keyboards/wilba_tech/wt60_xt/info.json new file mode 100644 index 000000000000..ed4a2ce01600 --- /dev/null +++ b/keyboards/wilba_tech/wt60_xt/info.json @@ -0,0 +1,12 @@ +{ + "keyboard_name": "wilba.tech WT60-XT", + "url": "https://wilba.tech", + "maintainer": "Wilba", + "width": 17.25, + "height": 5, + "layouts": { + "LAYOUT_all": { + "layout": [{"x":0, "y":0}, {"x":1, "y":0}, {"x":2.25, "y":0}, {"x":3.25, "y":0}, {"x":4.25, "y":0}, {"x":5.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.25, "y":0}, {"x":11.25, "y":0}, {"x":12.25, "y":0}, {"x":13.25, "y":0}, {"x":14.25, "y":0}, {"x":15.25, "y":0}, {"x":16.25, "y":0}, {"x":0, "y":1}, {"x":1, "y":1}, {"x":2.25, "y":1, "w":1.5}, {"x":3.75, "y":1}, {"x":4.75, "y":1}, {"x":5.75, "y":1}, {"x":6.75, "y":1}, {"x":7.75, "y":1}, {"x":8.75, "y":1}, {"x":9.75, "y":1}, {"x":10.75, "y":1}, {"x":11.75, "y":1}, {"x":12.75, "y":1}, {"x":13.75, "y":1}, {"x":14.75, "y":1}, {"x":15.75, "y":1, "w":1.5}, {"x":0, "y":2}, {"x":1, "y":2}, {"x":2.25, "y":2, "w":1.75}, {"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":12, "y":2}, {"x":13, "y":2}, {"x":14, "y":2}, {"x":15, "y":2, "w":2.25}, {"x":0, "y":3}, {"x":1, "y":3}, {"x":2.25, "y":3, "w":1.25}, {"x":3.5, "y":3}, {"x":4.5, "y":3}, {"x":5.5, "y":3}, {"x":6.5, "y":3}, {"x":7.5, "y":3}, {"x":8.5, "y":3}, {"x":9.5, "y":3}, {"x":10.5, "y":3}, {"x":11.5, "y":3}, {"x":12.5, "y":3}, {"x":13.5, "y":3}, {"x":14.5, "y":3, "w":1.75}, {"x":16.25, "y":3}, {"x":0, "y":4}, {"x":1, "y":4}, {"x":2.25, "y":4, "w":1.25}, {"x":3.5, "y":4, "w":1.25}, {"x":4.75, "y":4, "w":1.25}, {"x":6, "y":4, "w":6.25}, {"x":12.25, "y":4, "w":1.25}, {"x":13.5, "y":4, "w":1.25}, {"x":14.75, "y":4, "w":1.25}, {"x":16, "y":4, "w":1.25}] + } + } +} diff --git a/keyboards/wilba_tech/wt60_xt/keymaps/default/keymap.c b/keyboards/wilba_tech/wt60_xt/keymaps/default/keymap.c new file mode 100644 index 000000000000..7373f427730a --- /dev/null +++ b/keyboards/wilba_tech/wt60_xt/keymaps/default/keymap.c @@ -0,0 +1,38 @@ +// Default layout for WT60-XT +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +// Default layer +[0] = 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_DEL, + 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_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_NO, 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_F9, KC_F10, KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, MO(1), KC_RCTL), + +// Fn1 Layer +[1] = LAYOUT_all( + KC_TRNS, KC_TRNS, 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_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_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_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, 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, 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, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), + +}; diff --git a/keyboards/wilba_tech/wt60_xt/keymaps/via/keymap.c b/keyboards/wilba_tech/wt60_xt/keymaps/via/keymap.c new file mode 100644 index 000000000000..7373f427730a --- /dev/null +++ b/keyboards/wilba_tech/wt60_xt/keymaps/via/keymap.c @@ -0,0 +1,38 @@ +// Default layout for WT60-XT +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +// Default layer +[0] = 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_DEL, + 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_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_NO, 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_F9, KC_F10, KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, MO(1), KC_RCTL), + +// Fn1 Layer +[1] = LAYOUT_all( + KC_TRNS, KC_TRNS, 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_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_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_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, 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, 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, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), + +}; diff --git a/keyboards/wilba_tech/wt60_xt/keymaps/via/rules.mk b/keyboards/wilba_tech/wt60_xt/keymaps/via/rules.mk new file mode 100644 index 000000000000..1e5b99807cb7 --- /dev/null +++ b/keyboards/wilba_tech/wt60_xt/keymaps/via/rules.mk @@ -0,0 +1 @@ +VIA_ENABLE = yes diff --git a/keyboards/wilba_tech/wt60_xt/readme.md b/keyboards/wilba_tech/wt60_xt/readme.md new file mode 100644 index 000000000000..1b8d706c33ed --- /dev/null +++ b/keyboards/wilba_tech/wt60_xt/readme.md @@ -0,0 +1,17 @@ +# wilba.tech WT60-XT + +![wilba.tech WT60-XT](https://ionkeyboards.com/data/_uploaded/image/jubi_a.jpg) + +WT60-XT is a keyboard PCB supporting 60% layout with left side macro keys. [More info at wilba.tech](https://wilba.tech/) + +First produced as WT60-XT JUBI for ION Keyboards JUBI. + +* Keyboard Maintainer: [Wilba6582](https://github.com/Wilba6582) +* Hardware Supported: wilba.tech WT60-XT +* Hardware Availability: Custom keyboard group buys + +Make example for this keyboard (after setting up your build environment): + + make wilba_tech/wt60_xt: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/wilba_tech/wt60_xt/rules.mk b/keyboards/wilba_tech/wt60_xt/rules.mk new file mode 100644 index 000000000000..a272caf2d126 --- /dev/null +++ b/keyboards/wilba_tech/wt60_xt/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 = 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 = 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 = yes # Audio output on port C6 +FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches diff --git a/keyboards/wilba_tech/wt60_xt/wt60_xt.c b/keyboards/wilba_tech/wt60_xt/wt60_xt.c new file mode 100644 index 000000000000..1f4cb96987cf --- /dev/null +++ b/keyboards/wilba_tech/wt60_xt/wt60_xt.c @@ -0,0 +1,100 @@ +/* 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 . + */ + +#include "wt60_xt.h" + +#ifdef AUDIO_ENABLE +#include "audio.h" +#include "song_list.h" + +float tone_caps_on[][2] = SONG(CAPS_LOCK_ON_SOUND); +float tone_caps_off[][2] = SONG(CAPS_LOCK_OFF_SOUND); +float tone_numlk_on[][2] = SONG(NUM_LOCK_ON_SOUND); +float tone_numlk_off[][2] = SONG(NUM_LOCK_OFF_SOUND); +float tone_scroll_on[][2] = SONG(SCROLL_LOCK_ON_SOUND); +float tone_scroll_off[][2] = SONG(SCROLL_LOCK_OFF_SOUND); + +#endif + +// We want to enable audio clicky (i.e. compile it into firmware), +// but not have it "turned on" by default. +#ifdef AUDIO_CLICKY + +#include "process_clicky.h" +extern audio_config_t audio_config; + +void eeconfig_init_kb(void) { + // Reset Keyboard EEPROM value to blank, rather than to a set value + eeconfig_update_kb(0); + + // Need to read here because this isn't done before calling eeconfig_init_kb() + audio_config.raw = eeconfig_read_audio(); + // ...and this call needs audio_config initialized. + clicky_off(); + + eeconfig_init_user(); +} +#endif // AUDIO_CLICKY + +void keyboard_pre_init_kb(void) { + setPinOutput(F1); + + keyboard_pre_init_user(); +} + +bool led_update_kb(led_t led_state) { + if (led_update_user(led_state)) { + writePin(F1, led_state.caps_lock); + } + +#ifdef AUDIO_ENABLE + static led_t old_led_state = { .raw = 0 }; + + wait_ms(10); // gets rid of tick + + if (!is_playing_notes()) + { + if (led_state.caps_lock && !old_led_state.caps_lock) + { + PLAY_SONG(tone_caps_on); + } + else if (!led_state.caps_lock && old_led_state.caps_lock) + { + PLAY_SONG(tone_caps_off); + } + else if (led_state.num_lock && !old_led_state.num_lock) + { + PLAY_SONG(tone_numlk_on); + } + else if (!led_state.num_lock && old_led_state.num_lock) + { + PLAY_SONG(tone_numlk_off); + } + else if (led_state.scroll_lock && !old_led_state.scroll_lock) + { + PLAY_SONG(tone_scroll_on); + } + else if (!led_state.scroll_lock && old_led_state.scroll_lock) + { + PLAY_SONG(tone_scroll_off); + } + } + + old_led_state = led_state; +#endif // AUDIO_ENABLE + + return true; +} diff --git a/keyboards/wilba_tech/wt60_xt/wt60_xt.h b/keyboards/wilba_tech/wt60_xt/wt60_xt.h new file mode 100644 index 000000000000..7b1f8ba35445 --- /dev/null +++ b/keyboards/wilba_tech/wt60_xt/wt60_xt.h @@ -0,0 +1,35 @@ +/* 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" + +#define ____ KC_NO + +#define LAYOUT_all( \ + K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, K015, K215, \ + 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, K214, \ + K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, K314, K315, \ + K400, K401, K402, K403, K404, K408, 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, K214, K215 }, \ + { K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, K314, K315 }, \ + { K400, K401, K402, K403, K404, ____, ____, ____, K408, ____, ____, ____, K412, K413, K414, K415 } \ +} From 5c9906eb4fc569cd08d88dcd85ce9afaa5410ffb Mon Sep 17 00:00:00 2001 From: KOBAYASHI Daisuke Date: Tue, 26 May 2020 11:26:27 +0900 Subject: [PATCH 039/930] Add VIA support for kbd67rev1 (#9173) --- keyboards/kbdfans/kbd67/rev1/config.h | 4 +- .../kbdfans/kbd67/rev1/keymaps/via/keymap.c | 75 +++++++++++++++++++ .../kbdfans/kbd67/rev1/keymaps/via/readme.md | 1 + .../kbdfans/kbd67/rev1/keymaps/via/rules.mk | 2 + 4 files changed, 80 insertions(+), 2 deletions(-) create mode 100644 keyboards/kbdfans/kbd67/rev1/keymaps/via/keymap.c create mode 100644 keyboards/kbdfans/kbd67/rev1/keymaps/via/readme.md create mode 100644 keyboards/kbdfans/kbd67/rev1/keymaps/via/rules.mk diff --git a/keyboards/kbdfans/kbd67/rev1/config.h b/keyboards/kbdfans/kbd67/rev1/config.h index d20dcb1c57ca..86ef3b813956 100644 --- a/keyboards/kbdfans/kbd67/rev1/config.h +++ b/keyboards/kbdfans/kbd67/rev1/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 0x4B42 +#define PRODUCT_ID 0x6066 #define DEVICE_VER 0x0001 #define MANUFACTURER kbdfans #define PRODUCT kbd67 diff --git a/keyboards/kbdfans/kbd67/rev1/keymaps/via/keymap.c b/keyboards/kbdfans/kbd67/rev1/keymaps/via/keymap.c new file mode 100644 index 000000000000..48c9cd98040f --- /dev/null +++ b/keyboards/kbdfans/kbd67/rev1/keymaps/via/keymap.c @@ -0,0 +1,75 @@ +/* Copyright 2018 '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] = { +/* Keymap (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| + * |----------------------------------------------------------------| + * |Ctrl | 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 |Alt| FN|Ctrl|Lef|Dow|Rig | + * `----------------------------------------------------------------' + */ +[0] = 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_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(1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT), + + /* Keymap Fn Layer + * ,----------------------------------------------------------------. + * |~ `|F1 |F2 |F3 |F4 |F5 |F6 |F7 |F8 |F9 |F10|F11|F12|Del |Ins | + * |----------------------------------------------------------------| + * |Caps | |Up | | | | | |PSc|SLk|Pau|Up | | | | + * |----------------------------------------------------------------| + * | |Lef|Dow|Rig| | | | |Hom|PUp|Lef|Rig| | | + * |----------------------------------------------------------------| + * | | | | | | | | |End|PDn|Dow| |PUp| | + * |----------------------------------------------------------------| + * | | | | | | | |Hom|PDn|End | + * `----------------------------------------------------------------' + */ +[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_INS, + KC_CAPS,_______, KC_UP,_______,_______,_______,_______,_______,KC_PSCR,KC_SLCK,KC_PAUS, KC_UP,_______, _______,_______, + _______,KC_LEFT,KC_DOWN,KC_RGHT,_______,_______,_______,_______,KC_HOME,KC_PGUP,KC_LEFT,KC_RGHT, _______,_______, + _______,_______,_______,_______,_______,_______,_______,_______, KC_END,KC_PGDN,KC_DOWN, _______,KC_PGUP,_______, + _______, _______, _______, _______, _______,_______,_______,KC_HOME,KC_PGDN, KC_END), + + +[2] = LAYOUT_65_ansi( + _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______,_______, + _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______,_______, + _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______,_______, + _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______,_______,_______, + _______, _______, _______, _______, _______,_______,_______,_______,_______,_______), + + +[3] = LAYOUT_65_ansi( + _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______,_______, + _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______,_______, + _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______,_______, + _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______,_______,_______, + _______, _______, _______, _______, _______,_______,_______,_______,_______,_______), + +}; diff --git a/keyboards/kbdfans/kbd67/rev1/keymaps/via/readme.md b/keyboards/kbdfans/kbd67/rev1/keymaps/via/readme.md new file mode 100644 index 000000000000..f32cf23932cc --- /dev/null +++ b/keyboards/kbdfans/kbd67/rev1/keymaps/via/readme.md @@ -0,0 +1 @@ +# The via keymap for kbd67 diff --git a/keyboards/kbdfans/kbd67/rev1/keymaps/via/rules.mk b/keyboards/kbdfans/kbd67/rev1/keymaps/via/rules.mk new file mode 100644 index 000000000000..36b7ba9cbc98 --- /dev/null +++ b/keyboards/kbdfans/kbd67/rev1/keymaps/via/rules.mk @@ -0,0 +1,2 @@ +VIA_ENABLE = yes +LTO_ENABLE = yes From e4823aadec24bca0ecfd1184562d27a49fd20544 Mon Sep 17 00:00:00 2001 From: Ryan Date: Tue, 26 May 2020 12:43:14 +1000 Subject: [PATCH 040/930] Fix capitalisation of "GitHub" (#9184) --- docs/breaking_changes.md | 2 +- docs/cli_configuration.md | 2 +- docs/cli_development.md | 2 +- docs/configurator_step_by_step.md | 2 +- docs/de/README.md | 2 +- docs/de/_summary.md | 2 +- docs/de/newbs_learn_more_resources.md | 2 +- docs/es/README.md | 2 +- docs/es/_summary.md | 2 +- docs/es/newbs_best_practices.md | 2 +- docs/es/newbs_building_firmware_configurator.md | 2 +- docs/es/newbs_learn_more_resources.md | 2 +- docs/feature_userspace.md | 6 +++--- docs/fr-fr/README.md | 6 +++--- docs/fr-fr/breaking_changes.md | 2 +- docs/fr-fr/getting_started_github.md | 4 ++-- docs/fr-fr/newbs_best_practices.md | 2 +- docs/getting_started_github.md | 12 ++++++------ docs/he-il/README.md | 2 +- docs/he-il/_summary.md | 4 ++-- docs/he-il/getting_started_getting_help.md | 2 +- docs/he-il/getting_started_github.md | 10 +++++----- docs/ja/cli_configuration.md | 2 +- docs/ja/getting_started_github.md | 8 ++++---- docs/ja/newbs_building_firmware_configurator.md | 2 +- docs/ja/newbs_learn_more_resources.md | 4 ++-- docs/newbs_getting_started.md | 2 +- docs/other_vscode.md | 2 +- docs/pt-br/README.md | 2 +- docs/pt-br/_summary.md | 2 +- docs/ru-ru/_summary.md | 2 +- docs/ru-ru/getting_started_github.md | 4 ++-- docs/support.md | 2 +- docs/zh-cn/README.md | 2 +- docs/zh-cn/_summary.md | 2 +- docs/zh-cn/getting_started_getting_help.md | 2 +- docs/zh-cn/getting_started_github.md | 12 ++++++------ docs/zh-cn/newbs_building_firmware.md | 2 +- drivers/avr/apa102.c | 2 +- drivers/avr/i2c_master.c | 2 +- drivers/avr/i2c_master.h | 2 +- drivers/avr/i2c_slave.c | 2 +- drivers/avr/i2c_slave.h | 2 +- keyboards/8pack/readme.md | 2 +- keyboards/abacus/readme.md | 2 +- keyboards/allison/readme.md | 2 +- keyboards/allison_numpad/readme.md | 2 +- keyboards/alps64/readme.md | 2 +- keyboards/baguette/readme.md | 2 +- keyboards/converter/siemens_tastatur/readme.md | 2 +- keyboards/gingham/readme.md | 2 +- keyboards/handwired/fruity60/readme.md | 2 +- keyboards/handwired/mechboards_micropad/readme.md | 2 +- keyboards/hs60/v1/readme.md | 2 +- keyboards/hs60/v2/readme.md | 2 +- keyboards/keycapsss/o4l_5x12/readme.md | 2 +- keyboards/keycapsss/plaid_pad/readme.md | 2 +- keyboards/kv/revt/readme.md | 2 +- keyboards/maartenwut/mx5160/readme.md | 2 +- keyboards/mc_76k/readme.md | 2 +- keyboards/meson/readme.md | 2 +- keyboards/nightmare/readme.md | 2 +- keyboards/nk65/readme.md | 2 +- keyboards/pimentoso/paddino02/readme.md | 2 +- keyboards/tg4x/readme.md | 2 +- keyboards/uranuma/readme.md | 2 +- keyboards/vinta/readme.md | 2 +- keyboards/wilba_tech/zeal60/readme.md | 2 +- keyboards/wilba_tech/zeal65/readme.md | 2 +- tmk_core/protocol/arm_atsam/led_matrix.c | 2 +- 70 files changed, 95 insertions(+), 95 deletions(-) diff --git a/docs/breaking_changes.md b/docs/breaking_changes.md index 12bc0db9dae9..6c684970d829 100644 --- a/docs/breaking_changes.md +++ b/docs/breaking_changes.md @@ -102,7 +102,7 @@ This happens immediately after the previous `future` branch is merged. * [ ] Roll up the ChangeLog into one file. * [ ] `git commit -m 'Merge point for Breaking Change'` * [ ] `git push origin future` -* Github Actions +* GitHub Actions * [ ] Create a PR for `future` * [ ] Make sure travis comes back clean * [ ] Merge `future` PR diff --git a/docs/cli_configuration.md b/docs/cli_configuration.md index 1196ab669d1a..50f5dc6e2804 100644 --- a/docs/cli_configuration.md +++ b/docs/cli_configuration.md @@ -108,7 +108,7 @@ compile.keymap: skully -> None |-----|---------------|-------------| | user.keyboard | None | The keyboard path (Example: `clueboard/66/rev4`) | | user.keymap | None | The keymap name (Example: `default`) | -| user.name | None | The user's github username. | +| user.name | None | The user's GitHub username. | # All Configuration Options diff --git a/docs/cli_development.md b/docs/cli_development.md index af86686c0709..07c8f281bac4 100644 --- a/docs/cli_development.md +++ b/docs/cli_development.md @@ -210,7 +210,7 @@ Our tests can be found in `lib/python/qmk/tests/`. You will find both unit and i If your PR does not include a comprehensive set of tests please add comments like this to your code so that other people know where they can help: - # TODO(unassigned/): Write tests + # TODO(unassigned/): Write tests We use [nose2](https://nose2.readthedocs.io/en/latest/getting_started.html) to run our tests. You can refer to the nose2 documentation for more details on what you can do in your test functions. diff --git a/docs/configurator_step_by_step.md b/docs/configurator_step_by_step.md index aee1d4e1f622..965012a907e3 100644 --- a/docs/configurator_step_by_step.md +++ b/docs/configurator_step_by_step.md @@ -12,7 +12,7 @@ I'll say that again because it's important: !> **MAKE SURE YOU SELECT THE RIGHT VERSION!** -If your keyboard has been advertised to be powered by QMK but is not in the list, chances are a developer hasn't gotten to it yet or we haven't had a chance to merge it in yet. File an issue at [qmk_firmware](https://github.com/qmk/qmk_firmware/issues) requesting to support that particular keyboard, if there is no active [Pull Request](https://github.com/qmk/qmk_firmware/pulls?q=is%3Aopen+is%3Apr+label%3Akeyboard) for it. There are also QMK powered keyboards that are in their manufacturer's own github accounts. Double check for that as well. +If your keyboard has been advertised to be powered by QMK but is not in the list, chances are a developer hasn't gotten to it yet or we haven't had a chance to merge it in yet. File an issue at [qmk_firmware](https://github.com/qmk/qmk_firmware/issues) requesting to support that particular keyboard, if there is no active [Pull Request](https://github.com/qmk/qmk_firmware/pulls?q=is%3Aopen+is%3Apr+label%3Akeyboard) for it. There are also QMK powered keyboards that are in their manufacturer's own GitHub accounts. Double check for that as well. ## Step 2: Select Your Keyboard Layout diff --git a/docs/de/README.md b/docs/de/README.md index 88239d45d49d..bf8fbac57a9c 100644 --- a/docs/de/README.md +++ b/docs/de/README.md @@ -13,7 +13,7 @@ QMK (*Quantum Mechanical Keyboard*) ist eine Open-Source-Community, welche die Q ## Bezugsquelle für QMK -Wenn Du vorhast, deine Tastatur, Tastaturbelegung oder Features zu QMK beizusteuern, geht das am einfachsten, indem Du das [Repository auf Github](https://github.com/qmk/qmk_firmware#fork-destination-box) forkst, die Änderungen in deinem lokalen Repo vornimmst und anschließend einen [Pull Request](https://github.com/qmk/qmk_firmware/pulls) einreichst. +Wenn Du vorhast, deine Tastatur, Tastaturbelegung oder Features zu QMK beizusteuern, geht das am einfachsten, indem Du das [Repository auf GitHub](https://github.com/qmk/qmk_firmware#fork-destination-box) forkst, die Änderungen in deinem lokalen Repo vornimmst und anschließend einen [Pull Request](https://github.com/qmk/qmk_firmware/pulls) einreichst. Ansonsten kannst Du es als [zip](https://github.com/qmk/qmk_firmware/zipball/master) oder [tar](https://github.com/qmk/qmk_firmware/tarball/master) herunterladen, oder es direkt via git klonen (`git clone git@github.com:qmk/qmk_firmware.git` bzw. `git clone https://github.com/qmk/qmk_firmware.git`). diff --git a/docs/de/_summary.md b/docs/de/_summary.md index 19c75ecd38f5..ffbd292bd455 100644 --- a/docs/de/_summary.md +++ b/docs/de/_summary.md @@ -11,7 +11,7 @@ * [QMK CLI](de/cli.md) * [QMK CLI Konfiguration](de/cli_configuration.md) * [Zu QMK beitragen](de/contributing.md) - * [Anleitung für Github](de/getting_started_github.md) + * [Anleitung für GitHub](de/getting_started_github.md) * [Nach Hilfe fragen](de/getting_started_getting_help.md) * [Breaking Changes](de/breaking_changes.md) diff --git a/docs/de/newbs_learn_more_resources.md b/docs/de/newbs_learn_more_resources.md index 59b72152dd18..ac5adb0c12f7 100644 --- a/docs/de/newbs_learn_more_resources.md +++ b/docs/de/newbs_learn_more_resources.md @@ -6,7 +6,7 @@ Git Ressourcen: * [Gutes allgemeines Tutorial](https://www.codecademy.com/learn/learn-git) (auf Englisch) * [Git spielerisch anhand von Beispielen lernen](https://learngitbranching.js.org/) (auf Englisch) -* [Mehr über den allgemeinen Umgang mit Github](getting_started_github.md) +* [Mehr über den allgemeinen Umgang mit GitHub](getting_started_github.md) * [Mehr über Git im Bezug zu QMK](contributing.md) Mehr über die Arbeit mit der Befehlszeile: diff --git a/docs/es/README.md b/docs/es/README.md index d39b2780085c..75fd3cb64e0e 100644 --- a/docs/es/README.md +++ b/docs/es/README.md @@ -13,7 +13,7 @@ QMK (*Quantum Mechanical Keyboard*) es una comunidad open source que mantiene el ## Cómo conseguirlo -Si estás pensando en contribuir con un keymap, teclado, or característica a QMK, la manera más sencilla es hacer un [fork del repositorio en Github](https://github.com/qmk/qmk_firmware#fork-destination-box), y clonar tu repositorio localmente para hacer los cambios, subirlos, y abir un [Pull Request](https://github.com/qmk/qmk_firmware/pulls) desde tu fork. +Si estás pensando en contribuir con un keymap, teclado, or característica a QMK, la manera más sencilla es hacer un [fork del repositorio en GitHub](https://github.com/qmk/qmk_firmware#fork-destination-box), y clonar tu repositorio localmente para hacer los cambios, subirlos, y abir un [Pull Request](https://github.com/qmk/qmk_firmware/pulls) desde tu fork. De cualquier manera, también puedes descargarlo directamente en formatos ([zip](https://github.com/qmk/qmk_firmware/zipball/master), [tar](https://github.com/qmk/qmk_firmware/tarball/master)), o clonarlo via git (`git@github.com:qmk/qmk_firmware.git`), o https (`https://github.com/qmk/qmk_firmware.git`). diff --git a/docs/es/_summary.md b/docs/es/_summary.md index b58d825f746e..aa2a0ca5d973 100644 --- a/docs/es/_summary.md +++ b/docs/es/_summary.md @@ -11,7 +11,7 @@ * [QMK CLI](es/cli.md) * [Configuración de QMK CLI](es/cli_configuration.md) * [Contribuyendo a QMK](es/contributing.md) - * [Cómo usar Github](es/getting_started_github.md) + * [Cómo usar GitHub](es/getting_started_github.md) * [Obtener ayuda](es/getting_started_getting_help.md) * [Cambios incompatibles](es/breaking_changes.md) diff --git a/docs/es/newbs_best_practices.md b/docs/es/newbs_best_practices.md index fc2afb9ed244..2f72eff788cc 100644 --- a/docs/es/newbs_best_practices.md +++ b/docs/es/newbs_best_practices.md @@ -6,7 +6,7 @@ Este documento procura instruir a los novatos en las mejores prácticas para ten En este documento suponemos un par de cosas: -1. Tienes una cuenta de Github, y has hecho un [fork del repo qmk_firmware](getting_started_github.md) en tu cuenta. +1. Tienes una cuenta de GitHub, y has hecho un [fork del repo qmk_firmware](getting_started_github.md) en tu cuenta. 2. Has [configurado tu entorno de desarrollo](newbs_getting_started.md?id=environment-setup). diff --git a/docs/es/newbs_building_firmware_configurator.md b/docs/es/newbs_building_firmware_configurator.md index 9333159c2cb4..60d67f5fa4fe 100644 --- a/docs/es/newbs_building_firmware_configurator.md +++ b/docs/es/newbs_building_firmware_configurator.md @@ -21,7 +21,7 @@ Lo diré otra vez porque es importante !> **ASEGÚRATE DE QUE SELECCIONAS LA VERSIÓN CORRECTA!** -Si se ha anunciado que tu teclado funciona con QMK pero no está en la lista, es probable que un desarrollador no se haya encargado de él aún o que todavía no hemos tenido la oportunidad de incluirlo. Abre un issue en [qmk_firmware](https://github.com/qmk/qmk_firmware/issues) solicitando soportar ese teclado un particular, si no hay un [Pull Request](https://github.com/qmk/qmk_firmware/pulls?q=is%3Aopen+is%3Apr+label%3Akeyboard) activo para ello. Hay también teclados que funcionan con QMK que están en las cuentas de github de sus manufacturantes. Acuérdate de comprobar esto también. +Si se ha anunciado que tu teclado funciona con QMK pero no está en la lista, es probable que un desarrollador no se haya encargado de él aún o que todavía no hemos tenido la oportunidad de incluirlo. Abre un issue en [qmk_firmware](https://github.com/qmk/qmk_firmware/issues) solicitando soportar ese teclado un particular, si no hay un [Pull Request](https://github.com/qmk/qmk_firmware/pulls?q=is%3Aopen+is%3Apr+label%3Akeyboard) activo para ello. Hay también teclados que funcionan con QMK que están en las cuentas de GitHub de sus manufacturantes. Acuérdate de comprobar esto también. ## Eligiendo el layout de tu teclado diff --git a/docs/es/newbs_learn_more_resources.md b/docs/es/newbs_learn_more_resources.md index 413b9ffa5ef3..34fd7556bf18 100644 --- a/docs/es/newbs_learn_more_resources.md +++ b/docs/es/newbs_learn_more_resources.md @@ -6,7 +6,7 @@ Recursos de Git: * [Excelente tutorial general](https://www.codecademy.com/learn/learn-git) * [Juego de Git para aprender usando ejemplos](https://learngitbranching.js.org/) -* [Recursos de Git para aprender más sobre Github](getting_started_github.md) +* [Recursos de Git para aprender más sobre GitHub](getting_started_github.md) * [Recursos de Git dirigidos específicamente a QMK](contributing.md) diff --git a/docs/feature_userspace.md b/docs/feature_userspace.md index ac0a1360d92d..8665481db9a9 100644 --- a/docs/feature_userspace.md +++ b/docs/feature_userspace.md @@ -1,6 +1,6 @@ # Userspace: Sharing Code Between Keymaps -If you use more than one keyboard with a similar keymap, you might see the benefit in being able to share code between them. Create your own folder in `users/` named the same as your keymap (ideally your github username, ``) with the following structure: +If you use more than one keyboard with a similar keymap, you might see the benefit in being able to share code between them. Create your own folder in `users/` named the same as your keymap (ideally your GitHub username, ``) with the following structure: * `/users//` (added to the path automatically) * `readme.md` (optional, recommended) @@ -73,7 +73,7 @@ The reason for this, is that `.h` won't be added in time to add settings ( ## Readme (`readme.md`) -Please include authorship (your name, github username, email), and optionally [a license that's GPL compatible](https://www.gnu.org/licenses/license-list.html#GPLCompatibleLicenses). +Please include authorship (your name, GitHub username, email), and optionally [a license that's GPL compatible](https://www.gnu.org/licenses/license-list.html#GPLCompatibleLicenses). You can use this as a template: ``` @@ -93,7 +93,7 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . ``` -You'd want to replace the year, name, email and github username with your info. +You'd want to replace the year, name, email and GitHub username with your info. Additionally, this is a good place to document your code, if you wish to share it with others. diff --git a/docs/fr-fr/README.md b/docs/fr-fr/README.md index 4527ec4b4237..3743bedc97d5 100644 --- a/docs/fr-fr/README.md +++ b/docs/fr-fr/README.md @@ -4,8 +4,8 @@ [![Statut du build](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) [![Statut de la doc](https://img.shields.io/badge/docs-ready-orange.svg)](https://docs.qmk.fm) -[![Contributeurs Github](https://img.shields.io/github/contributors/qmk/qmk_firmware.svg)](https://github.com/qmk/qmk_firmware/pulse/monthly) -[![Forks Github](https://img.shields.io/github/forks/qmk/qmk_firmware.svg?style=social&label=Fork)](https://github.com/qmk/qmk_firmware/) +[![Contributeurs GitHub](https://img.shields.io/github/contributors/qmk/qmk_firmware.svg)](https://github.com/qmk/qmk_firmware/pulse/monthly) +[![Forks GitHub](https://img.shields.io/github/forks/qmk/qmk_firmware.svg?style=social&label=Fork)](https://github.com/qmk/qmk_firmware/) ## Qu'est-ce que QMK Firmware ? @@ -13,7 +13,7 @@ QMK (*Quantum Mechanical Keyboard*) est une communauté open source qui maintien ## Comment l'obtenir -Si vous souhaitez contribuer à une disposition de clavier (keymap), ou à des fonctionnalités de QMK alors le plus simple est de [forker le dépôt avec Github](https://github.com/qmk/qmk_firmware#fork-destination-box) puis cloner le dépôt localement pour y faire des changements. Vous pourrez pousser vos changements sur github puis ouvrir un [Pull Request](https://github.com/qmk/qmk_firmware/pulls) depuis votre fork Github. +Si vous souhaitez contribuer à une disposition de clavier (keymap), ou à des fonctionnalités de QMK alors le plus simple est de [forker le dépôt avec GitHub](https://github.com/qmk/qmk_firmware#fork-destination-box) puis cloner le dépôt localement pour y faire des changements. Vous pourrez pousser vos changements sur GitHub puis ouvrir un [Pull Request](https://github.com/qmk/qmk_firmware/pulls) depuis votre fork GitHub. Sinon, vous pouvez aussi le télécharger directement en ([zip](https://github.com/qmk/qmk_firmware/zipball/master), [tar](https://github.com/qmk/qmk_firmware/tarball/master)), ou le cloner avec git en ssh (`git@github.com:qmk/qmk_firmware.git`), ou https (`https://github.com/qmk/qmk_firmware.git`). diff --git a/docs/fr-fr/breaking_changes.md b/docs/fr-fr/breaking_changes.md index 53bbb2212aa1..2dbb26e5a5bc 100644 --- a/docs/fr-fr/breaking_changes.md +++ b/docs/fr-fr/breaking_changes.md @@ -101,7 +101,7 @@ Ceci est fait immédiatement après la fusion de la branche `future` précédent * [ ] Regroupe ChangeLog dans un fichier. * [ ] `git commit -m 'Merge point for Breaking Change'` * [ ] `git push origin future` -* Actions sur Github +* Actions sur GitHub * [ ] Crée un PR pour `future` * [ ] S'assurer que Travis ne relève aucun problème * [ ] Fusion le PR `future` diff --git a/docs/fr-fr/getting_started_github.md b/docs/fr-fr/getting_started_github.md index 48755625a78b..76d107dfb998 100644 --- a/docs/fr-fr/getting_started_github.md +++ b/docs/fr-fr/getting_started_github.md @@ -6,11 +6,11 @@ GitHub peut être un peu compliqué pour ceux qui n'y sont pas familier. Ce guid Commencez par la [page GitHub de QMK](https://github.com/qmk/qmk_firmware), et vous verrez un bouton dans le coin en haut à droite qui indique "Fork": -![Fork on Github](http://i.imgur.com/8Toomz4.jpg) +![Fork on GitHub](http://i.imgur.com/8Toomz4.jpg) Si vous faites partie d'une organisation, vous aurez besoin de savoir quel compte utiliser pour le fork. Dans la plupart des cas, vous voudrez créer le fork dans votre compte personnel. Une fois le fork complet (cela peut quelques fois prendre un peu de temps), appuyez sur le bouton "Clone or download": -![Download from Github](http://i.imgur.com/N1NYcSz.jpg) +![Download from GitHub](http://i.imgur.com/N1NYcSz.jpg) Faites attention à sélectionner "HTTPS", et sélectionnez le lien et copiez-le: diff --git a/docs/fr-fr/newbs_best_practices.md b/docs/fr-fr/newbs_best_practices.md index 14910131475e..ec68a5e3e529 100644 --- a/docs/fr-fr/newbs_best_practices.md +++ b/docs/fr-fr/newbs_best_practices.md @@ -44,7 +44,7 @@ git pull upstream master git push origin master ``` -Cela vous change la branche courante en master, synchronise les données de références du dépôt QMK vers votre ordinateur. La commande pull tire les données de références vers votre branche courante puis les y téleverse. La commande push permet de pousser la branche courante (master) vers votre fork github. +Cela vous change la branche courante en master, synchronise les données de références du dépôt QMK vers votre ordinateur. La commande pull tire les données de références vers votre branche courante puis les y téleverse. La commande push permet de pousser la branche courante (master) vers votre fork GitHub. ### Faire des changements diff --git a/docs/getting_started_github.md b/docs/getting_started_github.md index 07f523f57811..ae594f68d81c 100644 --- a/docs/getting_started_github.md +++ b/docs/getting_started_github.md @@ -1,16 +1,16 @@ -# How to Use Github with QMK +# How to Use GitHub with QMK -Github can be a little tricky to those that aren't familiar with it - this guide will walk through each step of forking, cloning, and submitting a pull request with QMK. +GitHub can be a little tricky to those that aren't familiar with it - this guide will walk through each step of forking, cloning, and submitting a pull request with QMK. ?> This guide assumes you're somewhat comfortable with running things at the command line, and have git installed on your system. -Start on the [QMK Github page](https://github.com/qmk/qmk_firmware), and you'll see a button in the upper right that says "Fork": +Start on the [QMK GitHub page](https://github.com/qmk/qmk_firmware), and you'll see a button in the upper right that says "Fork": -![Fork on Github](http://i.imgur.com/8Toomz4.jpg) +![Fork on GitHub](http://i.imgur.com/8Toomz4.jpg) If you're a part of an organization, you'll need to choose which account to fork it to. In most circumstances, you'll want to fork it to your personal account. Once your fork is completed (sometimes this takes a little while), click the "Clone or Download" button: -![Download from Github](http://i.imgur.com/N1NYcSz.jpg) +![Download from GitHub](http://i.imgur.com/N1NYcSz.jpg) And be sure to select "HTTPS", and select the link and copy it: @@ -54,7 +54,7 @@ To https://github.com/whoeveryouare/qmk_firmware.git + 20043e64...7da94ac5 master -> master ``` -Your changes now exist on your fork on Github - if you go back there (`https://github.com//qmk_firmware`), you can create a "New Pull Request" by clicking this button: +Your changes now exist on your fork on GitHub - if you go back there (`https://github.com//qmk_firmware`), you can create a "New Pull Request" by clicking this button: ![New Pull Request](http://i.imgur.com/DxMHpJ8.jpg) diff --git a/docs/he-il/README.md b/docs/he-il/README.md index 8e0c470b4421..c16801b2bd13 100644 --- a/docs/he-il/README.md +++ b/docs/he-il/README.md @@ -14,7 +14,7 @@ QMK (*Quantum Mechanical Keyboard*) היא קהילת קוד פתוח (open sour ## איך להשיג אותה -אם אתם מתכננים לתרום מיפוי מקשים, מקלדת או יכולת ל QMK, הדבר הקל ביותר הוא [לעשות פורק לריפו בGithub](https://github.com/qmk/qmk_firmware#fork-destination-box), ולעשות קלון לריפו בסביבה המקומית ושם לבצע את השינויים שלכם, לדחוף אותם ולפתוח [Pull Request](https://github.com/qmk/qmk_firmware/pulls) מהפורק שלך. +אם אתם מתכננים לתרום מיפוי מקשים, מקלדת או יכולת ל QMK, הדבר הקל ביותר הוא [לעשות פורק לריפו בGitHub](https://github.com/qmk/qmk_firmware#fork-destination-box), ולעשות קלון לריפו בסביבה המקומית ושם לבצע את השינויים שלכם, לדחוף אותם ולפתוח [Pull Request](https://github.com/qmk/qmk_firmware/pulls) מהפורק שלך. אחרת, אפשר להוריד את הקושחה באופן ישיר ([zip](https://github.com/qmk/qmk_firmware/zipball/master), [tar](https://github.com/qmk/qmk_firmware/tarball/master)), או לשכפל אותה באמצעות git (`git@github.com:qmk/qmk_firmware.git`), או https (`https://github.com/qmk/qmk_firmware.git`). diff --git a/docs/he-il/_summary.md b/docs/he-il/_summary.md index bdacd0d1fd29..148eb6400d8d 100644 --- a/docs/he-il/_summary.md +++ b/docs/he-il/_summary.md @@ -5,7 +5,7 @@ * [מקורות ללמידה](he-il/newbs_learn_more_resources.md) * [בסיס QMK](he-il/README.md) * [מבוא לQMK](he-il/getting_started_introduction.md) - * [איך להשתמש בGithub](he-il/getting_started_github.md) + * [איך להשתמש בGitHub](he-il/getting_started_github.md) * [קבלת עזרה](he-il/getting_started_getting_help.md) * [שאלות נפוצות](he-il/faq.md) * [שאלות נפוצות כלליות](he-il/faq_general.md) @@ -27,7 +27,7 @@ * [QMK CLI](he-il/cli.md) * [QMK CLI Config](he-il/cli_configuration.md) * [תרומה ל QMK](he-il/contributing.md) - * [איך להשתמש בGithub](he-il/getting_started_github.md) + * [איך להשתמש בGitHub](he-il/getting_started_github.md) * [קבלת עזרה](he-il/getting_started_getting_help.md) * [שינויים משמעותיים](he-il/breaking_changes.md) diff --git a/docs/he-il/getting_started_getting_help.md b/docs/he-il/getting_started_getting_help.md index 1a2edc3133f7..e62c9f403dd4 100644 --- a/docs/he-il/getting_started_getting_help.md +++ b/docs/he-il/getting_started_getting_help.md @@ -11,7 +11,7 @@ הפורום הרשמי של QMK נמצא ב - [/r/olkb](https://reddit.com/r/olkb) באתר [reddit.com](https://reddit.com). -## סוגיות Github +## סוגיות GitHub ניתן לפתוח [סוגייה ב-GitHub](https://github.com/qmk/qmk_firmware/issues). הדבר שימושי במיוחד כאשר הסוגיה דורשת דיון עמוק וארוך או דיבאגינג. \ No newline at end of file diff --git a/docs/he-il/getting_started_github.md b/docs/he-il/getting_started_github.md index e5d0f7c7829c..5cafac5ac56b 100644 --- a/docs/he-il/getting_started_github.md +++ b/docs/he-il/getting_started_github.md @@ -1,17 +1,17 @@
-# איך להשתמש ב-Github עם QMK +# איך להשתמש ב-GitHub עם QMK -Github עלול להיות קצת טריקי למי שלא מכיר את העבודה איתו - מדריך זה ילווה אתכם שלב אחר שלב דרך ביצוע פעולות fork, clone ו-pull request עם QMK. +GitHub עלול להיות קצת טריקי למי שלא מכיר את העבודה איתו - מדריך זה ילווה אתכם שלב אחר שלב דרך ביצוע פעולות fork, clone ו-pull request עם QMK. ?> מדריך זה מניח שאתם מרגישים בנוח עם הרצה של פקודות בסביבת command line (שורת הפקודה) ו-git מותקן במערכת שלכם. -התחילו ב- [עמוד של QMK ב-Github](https://github.com/qmk/qmk_firmware), ותצמאו כפתור בחלק העליון מימין עם התיכוב "Fork": +התחילו ב- [עמוד של QMK ב-GitHub](https://github.com/qmk/qmk_firmware), ותצמאו כפתור בחלק העליון מימין עם התיכוב "Fork": -![Fork ב-Github](http://i.imgur.com/8Toomz4.jpg) +![Fork ב-GitHub](http://i.imgur.com/8Toomz4.jpg) אם אתם חלק מארגון, תצטרכו לבחור לאיזה חשבון לבצע פעולת fork. ברוב המבקרים, תרצו לבצע fork לתוך החשבון הפרטי שלכם. ברגע שה-fork הסתיים (לפעמים זה יכול לקחת קצת זמן) הקליקו על כפתור ה-"Clone or Download": -![הורדה מ-Github](http://i.imgur.com/N1NYcSz.jpg) +![הורדה מ-GitHub](http://i.imgur.com/N1NYcSz.jpg) תוודאו שאתם בוחרים באופצייה של "HTTPS", בחרו את הקישור והעתיקו אותו: diff --git a/docs/ja/cli_configuration.md b/docs/ja/cli_configuration.md index 7e9c3e57fa01..d21a27596d4f 100644 --- a/docs/ja/cli_configuration.md +++ b/docs/ja/cli_configuration.md @@ -113,7 +113,7 @@ compile.keymap: skully -> None |-----|---------------|-------------| | user.keyboard | None | キーボードのパス (例: `clueboard/66/rev4`) | | user.keymap | None | キーマップ名 (例: `default`) | -| user.name | None | ユーザの github のユーザ名。 | +| user.name | None | ユーザの GitHub のユーザ名。 | # 全ての設定オプション diff --git a/docs/ja/getting_started_github.md b/docs/ja/getting_started_github.md index 5457c1e06e98..24a217c74598 100644 --- a/docs/ja/getting_started_github.md +++ b/docs/ja/getting_started_github.md @@ -1,15 +1,15 @@ -# QMK で Github を使う方法 +# QMK で GitHub を使う方法 -Github は慣れていない人には少し注意が必要です - このガイドは、QMK におけるフォーク、クローン、プルリクエストのサブミットの各ステップについて説明します。 +GitHub は慣れていない人には少し注意が必要です - このガイドは、QMK におけるフォーク、クローン、プルリクエストのサブミットの各ステップについて説明します。 ?> このガイドでは、あなたがコマンドラインでの実行にある程度慣れており、システムに git がインストールされていることを前提にしています。 -[QMK Github ページ](https://github.com/qmk/qmk_firmware)を開くと、右上に "Fork" というボタンが見えます: +[QMK GitHub ページ](https://github.com/qmk/qmk_firmware)を開くと、右上に "Fork" というボタンが見えます: ![Git でのフォーク](http://i.imgur.com/8Toomz4.jpg) @@ -59,7 +59,7 @@ To https://github.com/whoeveryouare/qmk_firmware.git + 20043e64...7da94ac5 master -> master ``` -あなたの変更は今では Github 上のフォークにあります - フォーク (`https://github.com//qmk_firmware`)に戻ると、"New Pull Request" ボタンをクリックすることで新しいプルリクエストを作成することができます: +あなたの変更は今では GitHub 上のフォークにあります - フォーク (`https://github.com//qmk_firmware`)に戻ると、"New Pull Request" ボタンをクリックすることで新しいプルリクエストを作成することができます: ![New Pull Request](http://i.imgur.com/DxMHpJ8.jpg) diff --git a/docs/ja/newbs_building_firmware_configurator.md b/docs/ja/newbs_building_firmware_configurator.md index e54921e52053..419ba1416b8a 100644 --- a/docs/ja/newbs_building_firmware_configurator.md +++ b/docs/ja/newbs_building_firmware_configurator.md @@ -28,7 +28,7 @@ QMK Configurator は Chrome/Firefox で最適に動作します。 キーボードが QMK を搭載していると宣伝されていてもリストにない場合は、開発者がまだ作業中か、私たちがまだマージするきっかけがなかった可能性があります。 アクティブな [Pull Request](https://github.com/qmk/qmk_firmware/pulls?q=is%3Aopen+is%3Apr+label%3Akeyboard) がない場合、[qmk_firmware](https://github.com/qmk/qmk_firmware/issues)で報告して、その特定のキーボードのサポートをリクエストします。 -製作者自身の github アカウントにある QMK 搭載キーボードもあります。 +製作者自身の GitHub アカウントにある QMK 搭載キーボードもあります。 それも再確認してください。 ## キーボードのレイアウトを選択する diff --git a/docs/ja/newbs_learn_more_resources.md b/docs/ja/newbs_learn_more_resources.md index 523d91a05a88..f2f8270e1d3b 100644 --- a/docs/ja/newbs_learn_more_resources.md +++ b/docs/ja/newbs_learn_more_resources.md @@ -14,7 +14,7 @@ * [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](getting_started_github.md) +* [Git Resources to Learn More About GitHub](getting_started_github.md) * [Git Resources Aimed Specifically toward QMK](contributing.md) ### 日本語 @@ -22,7 +22,7 @@ _日本語のリソース情報を募集中です。_ * [Git Game To Learn From Examples(日本語対応有り)](https://learngitbranching.js.org/) -* [QMK で Github を使う方法](ja/getting_started_github.md) +* [QMK で GitHub を使う方法](ja/getting_started_github.md) * [貢献方法](ja/contributing.md) ## コマンドラインに関するリソース: diff --git a/docs/newbs_getting_started.md b/docs/newbs_getting_started.md index 83df2f305044..1367d1b4097f 100644 --- a/docs/newbs_getting_started.md +++ b/docs/newbs_getting_started.md @@ -135,7 +135,7 @@ Most people new to QMK only have 1 keyboard. You can set this keyboard as your d qmk config user.keyboard=clueboard/66/rev4 -You can also set your default keymap name. Most people use their github username here, and we recommend that you do too. +You can also set your default keymap name. Most people use their GitHub username here, and we recommend that you do too. qmk config user.keymap= diff --git a/docs/other_vscode.md b/docs/other_vscode.md index 7427f758e5be..d544db6307ef 100644 --- a/docs/other_vscode.md +++ b/docs/other_vscode.md @@ -102,7 +102,7 @@ There are a number of extensions that you may want to install: This installs a bunch of Git related tools that may make using Git with QMK Firmware easier. * [EditorConfig for VS Code](https://marketplace.visualstudio.com/items?itemName=EditorConfig.EditorConfig) - _[Optional]_ - Helps to keep the code to the QMK Coding Conventions. * [Bracket Pair Colorizer 2](https://marketplace.visualstudio.com/items?itemName=CoenraadS.bracket-pair-colorizer-2) - _[Optional]_ - This color codes the brackets in your code, to make it easier to reference nested code. -* [Github Markdown Preview](https://marketplace.visualstudio.com/items?itemName=bierner.github-markdown-preview) - _[Optional]_ - Makes the markdown preview in VS Code more like GitHub's. +* [GitHub Markdown Preview](https://marketplace.visualstudio.com/items?itemName=bierner.github-markdown-preview) - _[Optional]_ - Makes the markdown preview in VS Code more like GitHub's. * [VS Live Share Extension Pack](https://marketplace.visualstudio.com/items?itemName=MS-vsliveshare.vsliveshare-pack) - _[Optional]_ - This extension allows somebody else to access your workspace (or you to access somebody else's workspace) and help out. This is great if you're having issues and need some help from somebody. * [VIM Keymap](https://marketplace.visualstudio.com/items?itemName=GiuseppeCesarano.vim-keymap) - _[Optional]_ - For those that prefer VIM style keybindings. There are other options for this, too. * [Travis CI Status](https://marketplace.visualstudio.com/items?itemName=felixrieseberg.vsc-travis-ci-status) - _[Optional]_ - This shows the current Travis CI status, if you have it set up. diff --git a/docs/pt-br/README.md b/docs/pt-br/README.md index 7cff6ce621fb..ea63ce13b5fd 100644 --- a/docs/pt-br/README.md +++ b/docs/pt-br/README.md @@ -12,7 +12,7 @@ QMK (*Quantum Mechanical Keyboard*) é uma comunidade de código aberto que mant ## 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. +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. diff --git a/docs/pt-br/_summary.md b/docs/pt-br/_summary.md index 78b3b202163c..e0a1b45b3312 100644 --- a/docs/pt-br/_summary.md +++ b/docs/pt-br/_summary.md @@ -11,7 +11,7 @@ * [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) + * [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) diff --git a/docs/ru-ru/_summary.md b/docs/ru-ru/_summary.md index f893be3cfd1b..09273172b6f2 100644 --- a/docs/ru-ru/_summary.md +++ b/docs/ru-ru/_summary.md @@ -11,7 +11,7 @@ * [QMK CLI](ru-ru/cli.md) * [QMK CLI Config](ru-ru/cli_configuration.md) * [Contributing to QMK](ru-ru/contributing.md) - * [How to Use Github](ru-ru/getting_started_github.md) + * [How to Use GitHub](ru-ru/getting_started_github.md) * [Getting Help](ru-ru/getting_started_getting_help.md) * [Breaking Changes](ru-ru/breaking_changes.md) diff --git a/docs/ru-ru/getting_started_github.md b/docs/ru-ru/getting_started_github.md index 3b4940dd15fd..4fd80791f11a 100644 --- a/docs/ru-ru/getting_started_github.md +++ b/docs/ru-ru/getting_started_github.md @@ -6,10 +6,10 @@ GitHub может показаться несколько сложным для Откройте [страницу QMK на GitHub] (https://github.com/qmk/qmk_firmware), и в правом верхнем углу вы увидите кнопку с надписью "Fork": -![Fork on Github](http://i.imgur.com/8Toomz4.jpg) +![Fork on GitHub](http://i.imgur.com/8Toomz4.jpg) Если вы состоите в какой-либо организации, вам нужно выбрать учетную запись, к которой будет привязан форк. В большинстве случаев это будет личной аккаунт. Как только ваш форк будет завершен (иногда это занимает немного времени), нажмите кнопку "Clone or Download": -![Download from Github](http://i.imgur.com/N1NYcSz.jpg) +![Download from GitHub](http://i.imgur.com/N1NYcSz.jpg) И обязательно выберите "HTTPS", затем выделите ссылку и скопируйте ее: diff --git a/docs/support.md b/docs/support.md index 79c1dbc1b5e5..938d9daf7849 100644 --- a/docs/support.md +++ b/docs/support.md @@ -12,6 +12,6 @@ If you need help with something, the best place to get quick support is going to The official QMK forum is [/r/olkb](https://reddit.com/r/olkb) on [reddit.com](https://reddit.com). -## Github Issues +## GitHub Issues You can open an [issue on GitHub](https://github.com/qmk/qmk_firmware/issues). This is especially handy when your issue will require long-term discussion or debugging. diff --git a/docs/zh-cn/README.md b/docs/zh-cn/README.md index bb7e0130f005..173af882dab8 100644 --- a/docs/zh-cn/README.md +++ b/docs/zh-cn/README.md @@ -13,7 +13,7 @@ QMK (*Quantum Mechanical Keyboard*) 是一个社区维护的开源软件,包 ## 如何得到它 -如果你打算贡献布局, 键盘, 或者其他QMK特性, 一下是最简单的方法:[从Github获得repo分支](https://github.com/qmk/qmk_firmware#fork-destination-box), 并克隆你的repo到本地进行编辑,推送,然后从你的分支打开 [Pull Request](https://github.com/qmk/qmk_firmware/pulls). +如果你打算贡献布局, 键盘, 或者其他QMK特性, 一下是最简单的方法:[从GitHub获得repo分支](https://github.com/qmk/qmk_firmware#fork-destination-box), 并克隆你的repo到本地进行编辑,推送,然后从你的分支打开 [Pull Request](https://github.com/qmk/qmk_firmware/pulls). 此外, 你也可以直接下载 ([zip](https://github.com/qmk/qmk_firmware/zipball/master), [tar](https://github.com/qmk/qmk_firmware/tarball/master)), 或者从git克隆 (`git@github.com:qmk/qmk_firmware.git`), 或 https (`https://github.com/qmk/qmk_firmware.git`). diff --git a/docs/zh-cn/_summary.md b/docs/zh-cn/_summary.md index 201b83894d08..cedcfbd52574 100644 --- a/docs/zh-cn/_summary.md +++ b/docs/zh-cn/_summary.md @@ -14,7 +14,7 @@ * [QMK命令行工具](zh-cn/cli.md) * [QMK命令行工具配置](zh-cn/cli_configuration.md) * [向QMK贡献代码](zh-cn/contributing.md) - * [如何使用Github](zh-cn/getting_started_github.md) + * [如何使用GitHub](zh-cn/getting_started_github.md) * [获得帮助](zh-cn/getting_started_getting_help.md) * [非兼容性修改](zh-cn/breaking_changes.md) diff --git a/docs/zh-cn/getting_started_getting_help.md b/docs/zh-cn/getting_started_getting_help.md index cf770a77081c..8c0ebaa2438f 100644 --- a/docs/zh-cn/getting_started_getting_help.md +++ b/docs/zh-cn/getting_started_getting_help.md @@ -10,6 +10,6 @@ QMK的官方论坛是[/r/olkb](https://reddit.com/r/olkb) 在[reddit.com](https://reddit.com)上. -## Github的Issue +## GitHub的Issue 你可以在GitHub上 [提出issue](https://github.com/qmk/qmk_firmware/issues).当您的问题需要长期讨论或调试时,这尤其方便。 diff --git a/docs/zh-cn/getting_started_github.md b/docs/zh-cn/getting_started_github.md index 2b2f7a75c589..9a01e43b7fd4 100644 --- a/docs/zh-cn/getting_started_github.md +++ b/docs/zh-cn/getting_started_github.md @@ -1,16 +1,16 @@ -# 如何在QMK中使用Github +# 如何在QMK中使用GitHub -Github can be a little tricky to those that aren't familiar with it - this guide will walk through each step of forking, cloning, and submitting a pull request with QMK. +GitHub can be a little tricky to those that aren't familiar with it - this guide will walk through each step of forking, cloning, and submitting a pull request with QMK. ?> 本教程假设您已安装GitHub,并且您喜欢使用命令行工作。 -首先 [Github上的QMK页面](https://github.com/qmk/qmk_firmware), 您能看到右上方有个按钮写着"Fork": +首先 [GitHub上的QMK页面](https://github.com/qmk/qmk_firmware), 您能看到右上方有个按钮写着"Fork": -![从Github上分叉](http://i.imgur.com/8Toomz4.jpg) +![从GitHub上分叉](http://i.imgur.com/8Toomz4.jpg) 如果你是某组织成员,你将需要选择分叉到哪个账户。一般情况下, 你是想要分叉到你的私人账户下。当你完成分叉 (有时需要等一会), 点击"Clone or Download" 按钮: -!从Github下载](http://i.imgur.com/N1NYcSz.jpg) +!从GitHub下载](http://i.imgur.com/N1NYcSz.jpg) 你要选择 "HTTPS", 然后选择链接复制: @@ -54,7 +54,7 @@ To https://github.com/whoeveryouare/qmk_firmware.git + 20043e64...7da94ac5 master -> master ``` -现在你的改动已经在你Github上的分支中了 - 如果你回到这 (`https://github.com/你的GitHub账户名/qmk_firmware`) ,你可以点击下方所示按钮创建 "New Pull Request": +现在你的改动已经在你GitHub上的分支中了 - 如果你回到这 (`https://github.com/你的GitHub账户名/qmk_firmware`) ,你可以点击下方所示按钮创建 "New Pull Request": ![新的 Pull Request](http://i.imgur.com/DxMHpJ8.jpg) diff --git a/docs/zh-cn/newbs_building_firmware.md b/docs/zh-cn/newbs_building_firmware.md index 31093f2543be..fc43583c2b06 100644 --- a/docs/zh-cn/newbs_building_firmware.md +++ b/docs/zh-cn/newbs_building_firmware.md @@ -20,7 +20,7 @@ ## 创建`default` 布局副本 -打开`keymaps`文件夹后,您将需要创建`default`文件夹的副本。我们强烈建议您将文件夹命名为与Github用户名相同的名称,但您也可以使用任何您想使用的名称,只要它只包含小写字母、数字和下划线字符。 +打开`keymaps`文件夹后,您将需要创建`default`文件夹的副本。我们强烈建议您将文件夹命名为与GitHub用户名相同的名称,但您也可以使用任何您想使用的名称,只要它只包含小写字母、数字和下划线字符。 要自动执行此过程,您还可以选择运行`new_keymap.sh`脚本。 diff --git a/drivers/avr/apa102.c b/drivers/avr/apa102.c index b174b39b8f22..740acb5739b7 100644 --- a/drivers/avr/apa102.c +++ b/drivers/avr/apa102.c @@ -2,7 +2,7 @@ * APA102 lib V1.0a * * Controls APA102 RGB-LEDs - * Author: Mikkel (Duckle29 on github) + * Author: Mikkel (Duckle29 on GitHub) * * Dec 22th, 2017 v1.0a Initial Version * diff --git a/drivers/avr/i2c_master.c b/drivers/avr/i2c_master.c index c084d5754f39..b1e48852984b 100644 --- a/drivers/avr/i2c_master.c +++ b/drivers/avr/i2c_master.c @@ -14,7 +14,7 @@ * along with this program. If not, see . */ /* Library made by: g4lvanix - * Github repository: https://github.com/g4lvanix/I2C-master-lib + * GitHub repository: https://github.com/g4lvanix/I2C-master-lib */ #include diff --git a/drivers/avr/i2c_master.h b/drivers/avr/i2c_master.h index 0a3b6c508cc5..4a35867cd057 100644 --- a/drivers/avr/i2c_master.h +++ b/drivers/avr/i2c_master.h @@ -14,7 +14,7 @@ * along with this program. If not, see . */ /* Library made by: g4lvanix - * Github repository: https://github.com/g4lvanix/I2C-master-lib + * GitHub repository: https://github.com/g4lvanix/I2C-master-lib */ #ifndef I2C_MASTER_H diff --git a/drivers/avr/i2c_slave.c b/drivers/avr/i2c_slave.c index 3fb684f70ac1..62a378165af2 100644 --- a/drivers/avr/i2c_slave.c +++ b/drivers/avr/i2c_slave.c @@ -14,7 +14,7 @@ * along with this program. If not, see . */ /* Library made by: g4lvanix - * Github repository: https://github.com/g4lvanix/I2C-slave-lib + * GitHub repository: https://github.com/g4lvanix/I2C-slave-lib */ #include diff --git a/drivers/avr/i2c_slave.h b/drivers/avr/i2c_slave.h index 5ed0b11a8e27..5d92150e6581 100644 --- a/drivers/avr/i2c_slave.h +++ b/drivers/avr/i2c_slave.h @@ -14,7 +14,7 @@ * along with this program. If not, see . */ /* Library made by: g4lvanix - * Github repository: https://github.com/g4lvanix/I2C-slave-lib + * GitHub repository: https://github.com/g4lvanix/I2C-slave-lib Info: Inititate the library by giving the required address. Read or write to the necessary buffer according to the opperation. diff --git a/keyboards/8pack/readme.md b/keyboards/8pack/readme.md index ad5df536a188..9c608e2a59e2 100644 --- a/keyboards/8pack/readme.md +++ b/keyboards/8pack/readme.md @@ -4,7 +4,7 @@ An open source 2x4 macropad designed by Charles Garcia. Keyboard Maintainer: [Charles Garcia](https://github.com/cgarcia2097) Hardware Supported: 8-Pack Macropad PCB -Hardware Availability: [8-Pack Github](https://github.com/cgarcia2097/8-Pack) +Hardware Availability: [8-Pack GitHub](https://github.com/cgarcia2097/8-Pack) Make example for this keyboard (after setting up your build environment): diff --git a/keyboards/abacus/readme.md b/keyboards/abacus/readme.md index 1f58a25a4ac3..ecf25b2edf5e 100644 --- a/keyboards/abacus/readme.md +++ b/keyboards/abacus/readme.md @@ -6,7 +6,7 @@ A first attempt at a PCB design for a mechanical keyboard. Includes rotary encod * Keyboard Maintainer: [nickolaij](https://github.com/nickolaij) * Hardware Supported: Abacus PCB, [Elite C Microcontroller](https://keeb.io/products/elite-c-usb-c-pro-micro-replacement-arduino-compatible-atmega32u4) or Pro Micro Microcontroller (Elite C has additional pins for encoder) -* Hardware Availability: [Abacus PCB Github](https://github.com/nickolaij/Abacus_Rev2) +* Hardware Availability: [Abacus PCB GitHub](https://github.com/nickolaij/Abacus_Rev2) Make example for this keyboard (after setting up your build environment): diff --git a/keyboards/allison/readme.md b/keyboards/allison/readme.md index 343ff2325d9f..60670cbad8dc 100644 --- a/keyboards/allison/readme.md +++ b/keyboards/allison/readme.md @@ -4,7 +4,7 @@ A custom luxurious 60 with F-row and Macro -* Keyboard Maintainer: [Yiancar](http://yiancar-designs.com/) and on [github](https://github.com/yiancar) +* 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) diff --git a/keyboards/allison_numpad/readme.md b/keyboards/allison_numpad/readme.md index 0226c44f6837..82992339e1ab 100644 --- a/keyboards/allison_numpad/readme.md +++ b/keyboards/allison_numpad/readme.md @@ -4,7 +4,7 @@ A custom luxurious numpad to match Allison -* Keyboard Maintainer: [Yiancar](http://yiancar-designs.com/) and on [github](https://github.com/yiancar) +* 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) diff --git a/keyboards/alps64/readme.md b/keyboards/alps64/readme.md index 1188d7819cba..4ad7bf3efeac 100644 --- a/keyboards/alps64/readme.md +++ b/keyboards/alps64/readme.md @@ -6,7 +6,7 @@ Keyboard Maintainer: QMK Community Hardware Supported: Alps64 PCB Hardware Availability: https://geekhack.org/index.php?topic=69666.0 -QMK is not the Alps64 official firmware. To use the official tools, refer to [TMK Keymap Editor](http://www.tmk-kbd.com/tmk_keyboard/editor/unimap/?alps64) or [TMK Keyboard Firmware on Github](https://github.com/tmk/tmk_keyboard). +QMK is not the Alps64 official firmware. To use the official tools, refer to [TMK Keymap Editor](http://www.tmk-kbd.com/tmk_keyboard/editor/unimap/?alps64) or [TMK Keyboard Firmware on GitHub](https://github.com/tmk/tmk_keyboard). Make example for this keyboard (after setting up your build environment): diff --git a/keyboards/baguette/readme.md b/keyboards/baguette/readme.md index e6188cc99048..501f81b328aa 100644 --- a/keyboards/baguette/readme.md +++ b/keyboards/baguette/readme.md @@ -5,7 +5,7 @@ Baguette This is a custom keyboard with backlight inspired by France. -Keyboard Maintainer: [Yiancar](http://yiancar-designs.com/) and on [github](https://github.com/yiancar) +Keyboard Maintainer: [Yiancar](http://yiancar-designs.com/) and on [GitHub](https://github.com/yiancar) Hardware Supported: ATMEGA 32u4 MCU with backlight support. Hardware Availability: Closed group-buy please contact the runners (Tesletron and Enjoy) diff --git a/keyboards/converter/siemens_tastatur/readme.md b/keyboards/converter/siemens_tastatur/readme.md index ca1b6ec0f3d0..651df9153f77 100644 --- a/keyboards/converter/siemens_tastatur/readme.md +++ b/keyboards/converter/siemens_tastatur/readme.md @@ -4,7 +4,7 @@ A Blue Pill STM32F103C8T6-based Converter board for a very very old keyboard. -Keyboard Maintainer: [Yiancar](http://yiancar-designs.com/) and on [github](https://github.com/yiancar) +Keyboard Maintainer: [Yiancar](http://yiancar-designs.com/) and on [GitHub](https://github.com/yiancar) Hardware Supported: Blue Pill STM32F103C8T6 Hardware Availability: Custom PCB available, contact me diff --git a/keyboards/gingham/readme.md b/keyboards/gingham/readme.md index d0c3e6fad791..089af1cf5eef 100644 --- a/keyboards/gingham/readme.md +++ b/keyboards/gingham/readme.md @@ -4,7 +4,7 @@ A 60% keyboard with only through hole components. -Keyboard Maintainer: [Yiancar](http://yiancar-designs.com/) and on [github](https://github.com/yiancar) +Keyboard Maintainer: [Yiancar](http://yiancar-designs.com/) and on [GitHub](https://github.com/yiancar) Hardware Supported: ATMEGA328p with vusb [PCB](https://github.com/yiancar/gingham_pcb) Hardware Availability: https://yiancar-designs.com/, https://novelkeys.xyz, https://mechboards.co.uk/ diff --git a/keyboards/handwired/fruity60/readme.md b/keyboards/handwired/fruity60/readme.md index ed476d264350..23aafc49ac3e 100644 --- a/keyboards/handwired/fruity60/readme.md +++ b/keyboards/handwired/fruity60/readme.md @@ -5,7 +5,7 @@ A 60% tsangan, split bs/rs keyboard designed to support the bluefruit 32u4 ble controller Keyboard Maintainer: [Yan-Fa Li](https://github.com/yanfali)
-Hardware Supported: [github](https://github.com/yanfali/fruity60)
+Hardware Supported: [GitHub](https://github.com/yanfali/fruity60)
Hardware Availability: You can make them yourself by downloading kicad and generating gerbers.
Make example for this keyboard (after setting up your build environment): diff --git a/keyboards/handwired/mechboards_micropad/readme.md b/keyboards/handwired/mechboards_micropad/readme.md index 36230b1281b2..c669d0f0d93e 100644 --- a/keyboards/handwired/mechboards_micropad/readme.md +++ b/keyboards/handwired/mechboards_micropad/readme.md @@ -3,7 +3,7 @@ Mechboards Micropad This was a freebie, use me and find out more about me :) -Keyboard Maintainer: [Yiancar](http://yiancar-designs.com/) and on [github](https://github.com/yiancar) +Keyboard Maintainer: [Yiancar](http://yiancar-designs.com/) and on [GitHub](https://github.com/yiancar) Hardware Supported: ATMega32u4 Hardware Availability: Random mechboards.co.uk order and UK meetups! diff --git a/keyboards/hs60/v1/readme.md b/keyboards/hs60/v1/readme.md index cbf5f4faaba0..4b613e2a52c9 100644 --- a/keyboards/hs60/v1/readme.md +++ b/keyboards/hs60/v1/readme.md @@ -5,7 +5,7 @@ HS60 This is a standard fixed layout 60% PCB. It comes in two varians, ISO and ANSI and support full per-key RGB. -Keyboard Maintainer: [Yiancar](http://yiancar-designs.com/) and on [github](https://github.com/yiancar) +Keyboard Maintainer: [Yiancar](http://yiancar-designs.com/) and on [GitHub](https://github.com/yiancar) Hardware Supported: HS60 ISO and ANSI PCBs with Atmega 32u4 Hardware Availability: https://mechboards.co.uk/shop/all/hs60-pcb/ diff --git a/keyboards/hs60/v2/readme.md b/keyboards/hs60/v2/readme.md index bd747b1f3cc7..f6f75cc7bf0c 100644 --- a/keyboards/hs60/v2/readme.md +++ b/keyboards/hs60/v2/readme.md @@ -5,7 +5,7 @@ HS60 V2.0 This is a standard fixed layout 60% PCB. It comes in three variants; ISO, ANSI and HHKB and support full per-key RGB. -Keyboard Maintainer: [Yiancar](http://yiancar-designs.com/) and on [github](https://github.com/yiancar) +Keyboard Maintainer: [Yiancar](http://yiancar-designs.com/) and on [GitHub](https://github.com/yiancar) Hardware Supported: HS60 ISO, ANSI and HHKB PCBs with STM32F303CC Hardware Availability: http://groupbuys.mechboards.co.uk/shop/hs60-hotswap-60-pcb/ diff --git a/keyboards/keycapsss/o4l_5x12/readme.md b/keyboards/keycapsss/o4l_5x12/readme.md index 4b1ebb6c7c32..16bdcc49f5b5 100644 --- a/keyboards/keycapsss/o4l_5x12/readme.md +++ b/keyboards/keycapsss/o4l_5x12/readme.md @@ -14,7 +14,7 @@ A ortholinear 5x12 keyboard made and sold by Keycapsss. [More info at Keycapsss. --- -- Keyboard Maintainer: BenRoe [Github](https://github.com/BenRoe) / [Twitter](https://twitter.com/ben_roe) +- Keyboard Maintainer: BenRoe [GitHub](https://github.com/BenRoe) / [Twitter](https://twitter.com/ben_roe) - Hardware Supported: Pro Micro - Hardware Availability: [Keycapsss.com](https://keycapsss.com) diff --git a/keyboards/keycapsss/plaid_pad/readme.md b/keyboards/keycapsss/plaid_pad/readme.md index ad38f119ce8f..76b4fa8e8e9e 100644 --- a/keyboards/keycapsss/plaid_pad/readme.md +++ b/keyboards/keycapsss/plaid_pad/readme.md @@ -5,7 +5,7 @@ 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) +* 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) diff --git a/keyboards/kv/revt/readme.md b/keyboards/kv/revt/readme.md index e2f463b37d37..23abc7803507 100644 --- a/keyboards/kv/revt/readme.md +++ b/keyboards/kv/revt/readme.md @@ -5,7 +5,7 @@ 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) +[More info on KVT GitHub](https://github.com/Hybrid65/KVT) * Keyboard Maintainer: [Neil Feagan](https://github.com/Hybrid65) * Hardware Supported: KVT, Proton C diff --git a/keyboards/maartenwut/mx5160/readme.md b/keyboards/maartenwut/mx5160/readme.md index 40753a8f55a8..3b0e15d7e53c 100644 --- a/keyboards/maartenwut/mx5160/readme.md +++ b/keyboards/maartenwut/mx5160/readme.md @@ -5,7 +5,7 @@ ## 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) +* Hardware Availability: [GitHub](https://github.com/Maartenwut/mx-5160) ## Build Make example for this keyboard (after setting up your build environment): diff --git a/keyboards/mc_76k/readme.md b/keyboards/mc_76k/readme.md index be9b5c5ec69c..e9577ebc9b4f 100644 --- a/keyboards/mc_76k/readme.md +++ b/keyboards/mc_76k/readme.md @@ -4,7 +4,7 @@ O-Ring suspended 60% with F-row keyboard -* Keyboard Maintainer: [Yiancar](http://yiancar-designs.com/) and on [github](https://github.com/yiancar) +* 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) diff --git a/keyboards/meson/readme.md b/keyboards/meson/readme.md index 3824690c1213..e5fdbad59176 100644 --- a/keyboards/meson/readme.md +++ b/keyboards/meson/readme.md @@ -4,7 +4,7 @@ A 3x14 split keyboard with two thumb keys on each half. Supports MX, Alps, and C Keyboard Maintainer: [PyroL](https://github.com/PyrooL) Hardware Supported: Meson PCBs, Pro Micro -Hardware Availability: [open source at PyroL's Github](https://github.com/PyrooL/Meson) +Hardware Availability: [open source at PyroL's GitHub](https://github.com/PyrooL/Meson) Make example for this keyboard (after setting up your build environment): diff --git a/keyboards/nightmare/readme.md b/keyboards/nightmare/readme.md index 9e53ac5a927a..0f9fcace8b77 100644 --- a/keyboards/nightmare/readme.md +++ b/keyboards/nightmare/readme.md @@ -6,7 +6,7 @@ A 50% pseudo-TMO50 clone with an adjusted bottom row, designed on the cheap with Keyboard Maintainer: [cfbender](https://github.com/cfbender) Hardware Supported: Nightmare case and PCB -Hardware Availability: [Github](https://github.com/cfbender/keyboards/tree/master/nightmare) +Hardware Availability: [GitHub](https://github.com/cfbender/keyboards/tree/master/nightmare) Make example for this keyboard (after setting up your build environment): diff --git a/keyboards/nk65/readme.md b/keyboards/nk65/readme.md index 41f52615a74b..5e7453a27d65 100755 --- a/keyboards/nk65/readme.md +++ b/keyboards/nk65/readme.md @@ -5,7 +5,7 @@ NK65 This is a standard fixed layout 65% PCB. It supports VIA and full per-key RGB. -Keyboard Maintainer: [Yiancar](http://yiancar-designs.com/) and on [github](https://github.com/yiancar) +Keyboard Maintainer: [Yiancar](http://yiancar-designs.com/) and on [GitHub](https://github.com/yiancar) Hardware Supported: A 65% keyboard with STM32F303CC Hardware Availability: https://novelkeys.xyz/ diff --git a/keyboards/pimentoso/paddino02/readme.md b/keyboards/pimentoso/paddino02/readme.md index 1e9518351a3d..c49508c7d737 100644 --- a/keyboards/pimentoso/paddino02/readme.md +++ b/keyboards/pimentoso/paddino02/readme.md @@ -2,7 +2,7 @@ 10-keys DIY mechanical macropad/gamepad. Features staggered columns, 2 thumb keys, symmetric PCB (you can build right-handed and left-handed versions with the same PCB). -Project page on Github, with build steps and 3d-printable files: +Project page on GitHub, with build steps and 3d-printable files: https://github.com/Pimentoso/Paddino02 diff --git a/keyboards/tg4x/readme.md b/keyboards/tg4x/readme.md index b1ce799512f3..a030033874a7 100644 --- a/keyboards/tg4x/readme.md +++ b/keyboards/tg4x/readme.md @@ -2,7 +2,7 @@ 40% sandwich keyboard driven by a pro micro. -For more info please refer to [MythosMann's Github](www.github.com/MythosMann/tg4x). +For more info please refer to [MythosMann's GitHub](www.github.com/MythosMann/tg4x). * Keyboard Maintainer: [MechMerlin](https://github.com/mechmerlin) * Hardware Supported: TG4x v2.1 PCB diff --git a/keyboards/uranuma/readme.md b/keyboards/uranuma/readme.md index 3e78fa6fe646..6927b4ace16b 100644 --- a/keyboards/uranuma/readme.md +++ b/keyboards/uranuma/readme.md @@ -5,7 +5,7 @@ It is a keyboard to input using fingers and palms. * Keyboard Maintainer: yohewi(yohewi@gmail.com) * Hardware Supported: UraNuma PCB -* Github [github.com/yohewi](https://github.com/yohewi) +* GitHub [github.com/yohewi](https://github.com/yohewi) * Hardware Availability: PCB, [Booth Shop](https://rt421.booth.pm/) Make example for this keyboard (after setting up your build environment): diff --git a/keyboards/vinta/readme.md b/keyboards/vinta/readme.md index 278c5e2c4b53..a55395197e46 100644 --- a/keyboards/vinta/readme.md +++ b/keyboards/vinta/readme.md @@ -6,7 +6,7 @@ Vinta This is an ARM-powered 65% keyboard PCB with USB Mini B connector and breakout for optional RGB underglow. -Keyboard Maintainer: [Peioris](http://peioris.space/) and on [github](https://github.com/coarse) +Keyboard Maintainer: [Peioris](http://peioris.space/) and on [GitHub](https://github.com/coarse) Hardware Supported: Vinta with STM32F042K6T6 Hardware Availability: Private Groupbuy (will post on Reddit once QMK has RGB underglow working) diff --git a/keyboards/wilba_tech/zeal60/readme.md b/keyboards/wilba_tech/zeal60/readme.md index 21d55af39b6c..2ae2787b72f0 100644 --- a/keyboards/wilba_tech/zeal60/readme.md +++ b/keyboards/wilba_tech/zeal60/readme.md @@ -5,7 +5,7 @@ Zeal60 This is a 60% PCB with per-key RGB LEDs and supports ANSI, ISO, winkey/winkeyless bottom row, HHKB-layout (split right shift and backspace). -Keyboard Maintainer: [Wilba](http://wilba.tech/) and on [github](https://github.com/Wilba6582) +Keyboard Maintainer: [Wilba](http://wilba.tech/) and on [GitHub](https://github.com/Wilba6582) Hardware Supported: Zeal60 PCB Rev 0-3 Hardware Availability: https://zealpc.net/collections/group-buy-pre-orders/products/zeal60rgb diff --git a/keyboards/wilba_tech/zeal65/readme.md b/keyboards/wilba_tech/zeal65/readme.md index 7441480384bd..63ff6abc36d7 100644 --- a/keyboards/wilba_tech/zeal65/readme.md +++ b/keyboards/wilba_tech/zeal65/readme.md @@ -5,7 +5,7 @@ Zeal65 This is a 65% PCB with per-key RGB LEDs and supports fixed, 1800-like bottom row and split backspace. It was designed for the Zephyr custom keyboard. -Keyboard Maintainer: [Wilba](http://wilba.tech/) and on [github](https://github.com/Wilba6582) +Keyboard Maintainer: [Wilba](http://wilba.tech/) and on [GitHub](https://github.com/Wilba6582) Hardware Supported: Zeal65 PCB Rev 1 Hardware Availability: https://zealpc.net/collections/group-buy-pre-orders/products/zephyr diff --git a/tmk_core/protocol/arm_atsam/led_matrix.c b/tmk_core/protocol/arm_atsam/led_matrix.c index c078980d681a..24eab2506763 100644 --- a/tmk_core/protocol/arm_atsam/led_matrix.c +++ b/tmk_core/protocol/arm_atsam/led_matrix.c @@ -326,7 +326,7 @@ const rgb_matrix_driver_t rgb_matrix_driver = {.init = init, .flush = flush, .se ==============================================================================*/ #ifdef USE_MASSDROP_CONFIGURATOR -// Ported from Massdrop QMK Github Repo +// Ported from Massdrop QMK GitHub Repo // TODO?: wire these up to keymap.c uint8_t led_animation_orientation = 0; From ba5e1f1bae1d724ab9b08229c2ce89d8d7714706 Mon Sep 17 00:00:00 2001 From: Yasuhiro SHIMIZU Date: Tue, 26 May 2020 12:16:03 +0900 Subject: [PATCH 041/930] [Keymap] update helix/rev2:yshrsmz keymap (#9047) * update helix keymap * use set_single_persistent_default_layer --- keyboards/helix/rev2/keymaps/yshrsmz/config.h | 4 +- keyboards/helix/rev2/keymaps/yshrsmz/keymap.c | 334 +++++++++++------- keyboards/helix/rev2/keymaps/yshrsmz/rules.mk | 3 +- 3 files changed, 206 insertions(+), 135 deletions(-) diff --git a/keyboards/helix/rev2/keymaps/yshrsmz/config.h b/keyboards/helix/rev2/keymaps/yshrsmz/config.h index d70f23c3e314..b8c1041cdc7b 100644 --- a/keyboards/helix/rev2/keymaps/yshrsmz/config.h +++ b/keyboards/helix/rev2/keymaps/yshrsmz/config.h @@ -17,10 +17,10 @@ GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . */ + #pragma once -/* auto shift config */ -#define AUTO_SHIFT_TIMEOUT 150 +// place overrides here // If you need more program area, try select and reduce rgblight modes to use. diff --git a/keyboards/helix/rev2/keymaps/yshrsmz/keymap.c b/keyboards/helix/rev2/keymaps/yshrsmz/keymap.c index e5b5f57d970c..bd8796d0648c 100644 --- a/keyboards/helix/rev2/keymaps/yshrsmz/keymap.c +++ b/keyboards/helix/rev2/keymaps/yshrsmz/keymap.c @@ -11,7 +11,6 @@ #include "ssd1306.h" #endif -extern keymap_config_t keymap_config; #ifdef RGBLIGHT_ENABLE //Following line allows macro to read current RGB settings @@ -26,20 +25,24 @@ extern uint8_t is_master; // entirely and just use numbers. enum layer_number { _QWERTY = 0, + _COLEMAK, + _DVORAK, _LOWER, _RAISE, - _FUNC, _ADJUST }; enum custom_keycodes { QWERTY = SAFE_RANGE, + COLEMAK, + DVORAK, LOWER, RAISE, - FUNC, ADJUST, + BACKLIT, EISU, - KANA + KANA, + RGBRST }; enum macro_keycodes { @@ -54,85 +57,106 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Qwerty * ,-----------------------------------------. ,-----------------------------------------. - * | ` | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | = | + * | ` | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | Del | * |------+------+------+------+------+------| |------+------+------+------+------+------| - * | Tab | Q | W | E | R | T | | Y | U | I | O | P | - | + * | Tab | Q | W | E | R | T | | Y | U | I | O | P | Bksp | * |------+------+------+------+------+------| |------+------+------+------+------+------| - * | ESC | A | S | D | F | G | | H | J | K | L | ; | ' | + * | Ctrl | A | S | D | F | G | | H | J | K | L | ; | ' | * |------+------+------+------+------+------+------+------+------+------+------+------+------+------| - * |Shift | Z | X | C | V | B | Fn | Fn | N | M | , | . | / |Shift | + * | Shift| Z | X | C | V | B | [ | ] | N | M | , | . | / |Enter | * |------+------+------+------+------+------+------+------+------+------+------+------+------+------| - * | EISU | Ctrl | Alt | GUI |Lower |Space | Bksp |Enter |Space |Raise | GUI | Alt | Ctrl | KANA | + * |Adjust| Esc | Alt | GUI | EISU |Lower |Space |Space |Raise | KANA | Left | Down | Up |Right | * `-------------------------------------------------------------------------------------------------' */ [_QWERTY] = LAYOUT( \ - KC_GRV, 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_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, FUNC, FUNC, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT , \ - EISU, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_BSPC, KC_ENT, KC_SPC, RAISE, KC_RGUI, KC_RALT, KC_RCTL, KANA \ + 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_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_LBRC, KC_RBRC, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT , \ + ADJUST, KC_ESC, KC_LALT, KC_LGUI, EISU, LOWER, KC_SPC, KC_SPC, RAISE, KANA, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \ ), - /* Lower + /* Colemak * ,-----------------------------------------. ,-----------------------------------------. - * | ~ | ! | @ | # | $ | % | | ^ | & | * | ( | ) | | + * | ` | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | Del | * |------+------+------+------+------+------| |------+------+------+------+------+------| - * | ~ | ! | @ | # | $ | % | | ^ | & | * | ( | ) | | + * | Tab | Q | W | F | P | G | | J | L | U | Y | ; | Bksp | * |------+------+------+------+------+------| |------+------+------+------+------+------| - * | Del | F1 | F2 | F3 | F4 | F5 | | F6 | _ | + | { | } | | | + * | Ctrl | A | R | S | T | D | | H | N | E | I | O | ' | * |------+------+------+------+------+------+------+------+------+------+------+------+------+------| - * | | F7 | F8 | F9 | F10 | F11 | | | F12 | | | | | | + * | Shift| Z | X | C | V | B | [ | ] | K | M | , | . | / |Enter | * |------+------+------+------+------+------+------+------+------+------+------+------+------+------| - * | | | | | | | | | | | Next | Vol- | Vol+ | Play | + * |Adjust| Esc | Alt | GUI | EISU |Lower |Space |Space |Raise | KANA | Left | Down | Up |Right | * `-------------------------------------------------------------------------------------------------' */ - [_LOWER] = LAYOUT( \ - KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, _______, \ - KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, _______, \ - KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, \ - _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, _______, _______, KC_F12, _______, _______, _______, _______, _______, \ - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY \ + [_COLEMAK] = 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_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_LBRC, KC_RBRC, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT , \ + ADJUST, KC_ESC, KC_LALT, KC_LGUI, EISU, LOWER, KC_SPC, KC_SPC, RAISE, KANA, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \ ), - /* Raise + /* Dvorak * ,-----------------------------------------. ,-----------------------------------------. * | ` | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | Bksp | * |------+------+------+------+------+------| |------+------+------+------+------+------| - * | ` | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | Del | + * | Tab | ' | , | . | P | Y | | F | G | C | R | L | Del | * |------+------+------+------+------+------| |------+------+------+------+------+------| - * | Del | F1 | F2 | F3 | F4 | F5 | | F6 | - | = | [ | ] | \ | + * | Ctrl | A | O | E | U | I | | D | H | T | N | S | / | * |------+------+------+------+------+------+------+------+------+------+------+------+------+------| - * | | F7 | F8 | F9 | F10 | F11 | | | F12 | | | | | | + * | Shift| ; | Q | J | K | X | [ | ] | B | M | W | V | Z |Enter | * |------+------+------+------+------+------+------+------+------+------+------+------+------+------| - * | | | | | | | | | | | Next | Vol- | Vol+ | Play | + * |Adjust| Esc | Alt | GUI | EISU |Lower |Space |Space |Raise | KANA | Left | Down | Up |Right | * `-------------------------------------------------------------------------------------------------' */ - [_RAISE] = LAYOUT( \ + [_DVORAK] = LAYOUT( \ KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, \ - KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL, \ - KC_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_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_DEL, \ + 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_LBRC, KC_RBRC, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_ENT , \ + ADJUST, KC_ESC, KC_LALT, KC_LGUI, EISU, LOWER, KC_SPC, KC_SPC, RAISE, KANA, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \ + ), + + /* Lower + * ,-----------------------------------------. ,-----------------------------------------. + * | ~ | ! | @ | # | $ | % | | ^ | & | * | ( | ) | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | ~ | ! | @ | # | $ | % | | ^ | & | * | ( | ) | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | F1 | F2 | F3 | F4 | F5 | | F6 | _ | + | { | } | | | + * |------+------+------+------+------+------+------+------+------+------+------+------+------+------| + * | | F7 | F8 | F9 | F10 | F11 | ( | ) | F12 | | | 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_TILD, 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_PIPE, \ + _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_LPRN, KC_RPRN, KC_F12, _______, _______, KC_HOME, KC_END, _______, \ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY \ ), - /* Func + /* Raise * ,-----------------------------------------. ,-----------------------------------------. * | ` | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | Bksp | * |------+------+------+------+------+------| |------+------+------+------+------+------| * | ` | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | Del | * |------+------+------+------+------+------| |------+------+------+------+------+------| - * | | | | | | | | LEFT | DOWN | UP |RIGHT | PGUP | | - * |------+------+------+------+------+------|------+------|------+------+------+------+------+------| - * | | | | | | | | | HOME | END |Alt+← |Alt+→ | PGDN | | - * |------+------+------+------+------+------+-------------+------+------+------+------+------+------| + * | | F1 | F2 | F3 | F4 | F5 | | F6 | - | = | [ | ] | \ | + * |------+------+------+------+------+------+------+------+------+------+------+------+------+------| + * | | F7 | F8 | F9 | F10 | F11 | | | F12 | | |PageDn|PageUp| | + * |------+------+------+------+------+------+------+------+------+------+------+------+------+------| * | | | | | | | | | | | Next | Vol- | Vol+ | Play | * `-------------------------------------------------------------------------------------------------' */ - [_FUNC] = LAYOUT( \ + [_RAISE] = LAYOUT( \ KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, \ KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL, \ - _______, _______, _______, _______, _______, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_PGUP, _______, \ - _______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, KC_END, LALT(KC_LEFT), LALT(KC_RGHT), KC_PGDN, _______, \ + _______, 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 \ ), @@ -140,9 +164,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * ,-----------------------------------------. ,-----------------------------------------. * | F1 | F2 | F3 | F4 | F5 | F6 | | F7 | F8 | F9 | F10 | F11 | F12 | * |------+------+------+------+------+------| |------+------+------+------+------+------| - * | | Reset| | | | | | | | | | | Del | + * | | Reset|RGBRST| | | | | | | | | | Del | * |------+------+------+------+------+------| |------+------+------+------+------+------| - * | | | |Aud on|Audoff| Mac | | Win |Qwerty| | | | | + * | | | |Aud on|Audoff| Mac | | Win |Qwerty|Colemk|Dvorak| | | * |------+------+------+------+------+------+------+------+------+------+------+------+------+------| * | | | | | | | | | | |RGB ON| HUE+ | SAT+ | VAL+ | * |------+------+------+------+------+------+------+------+------+------+------+------+------+------| @@ -151,8 +175,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ [_ADJUST] = LAYOUT( \ KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, \ - _______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL, \ - _______, _______, _______, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, _______, _______, _______, _______, \ + _______, RESET, RGBRST, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL, \ + _______, _______, _______, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, _______, _______, \ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_TOG, RGB_HUI, RGB_SAI, RGB_VAI, \ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_MOD, RGB_HUD, RGB_SAD, RGB_VAD \ ) @@ -164,81 +188,99 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Qwerty * ,-----------------------------------------. ,-----------------------------------------. - * | = | Q | W | E | R | T | | Y | U | I | O | P | - | + * | Tab | Q | W | E | R | T | | Y | U | I | O | P | Bksp | * |------+------+------+------+------+------| |------+------+------+------+------+------| - * | Esc | A | S | D | F | G | | H | J | K | L | ; | ' | + * | Ctrl | A | S | D | F | G | | H | J | K | L | ; | ' | * |------+------+------+------+------+------| |------+------+------+------+------+------| * | Shift| Z | X | C | V | B | | N | M | , | . | / |Enter | * |------+------+------+------+------+------+-------------+------+------+------+------+------+------| - * | EISU | Ctrl | Alt | GUI |ESC/Lower | Func | Bksp |Enter |Space |Raise | GUI | Alt | Ctrl | KANA | + * |Adjust| Esc | Alt | GUI | EISU |Lower |Space |Space |Raise | KANA | Left | Down | Up |Right | * `-------------------------------------------------------------------------------------------------' */ [_QWERTY] = LAYOUT( \ - KC_EQL, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_MINS, \ - 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_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 , \ - EISU, KC_LCTL, KC_LALT, KC_LGUI, LT(_LOWER, KC_ESC), FUNC, KC_BSPC, KC_ENT, KC_SPC, RAISE, KC_RGUI, KC_RALT, KC_RCTL, KANA \ + ADJUST, KC_ESC, KC_LALT, KC_LGUI, EISU, LOWER, KC_SPC, KC_SPC, RAISE, KANA, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \ ), - /* Lower + /* Colemak * ,-----------------------------------------. ,-----------------------------------------. - * | ~ | ! | @ | # | $ | % | | ^ | & | * | ( | ) | | + * | Tab | Q | W | F | P | G | | J | L | U | Y | ; | Bksp | * |------+------+------+------+------+------| |------+------+------+------+------+------| - * | Del | F1 | F2 | F3 | F4 | F5 | | F6 | _ | + | { | } | | | + * | Ctrl | A | R | S | T | D | | H | N | E | I | O | ' | * |------+------+------+------+------+------| |------+------+------+------+------+------| - * | | F7 | F8 | F9 | F10 | F11 | | F12 | | | | | | + * | Shift| Z | X | C | V | B | | K | M | , | . | / |Enter | * |------+------+------+------+------+------+-------------+------+------+------+------+------+------| - * | | | | | | | | | | | Next | Vol- | Vol+ | Play | + * |Adjust| Esc | Alt | GUI | EISU |Lower |Space |Space |Raise | KANA | Left | Down | Up |Right | * `-------------------------------------------------------------------------------------------------' */ - [_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_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 \ + [_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, EISU, LOWER, KC_SPC, KC_SPC, RAISE, KANA, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \ ), - /* Raise + /* Dvorak + * ,-----------------------------------------. ,-----------------------------------------. + * | Tab | ' | , | . | P | Y | | F | G | C | R | L | Del | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | 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 | EISU |Lower |Space |Space |Raise | KANA | 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_DEL, \ + 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, EISU, LOWER, KC_SPC, KC_SPC, RAISE, KANA, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \ + ), + + /* Lower * ,-----------------------------------------. ,-----------------------------------------. - * | ` | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | | + * | ~ | ! | @ | # | $ | % | | ^ | & | * | ( | ) | | * |------+------+------+------+------+------| |------+------+------+------+------+------| - * | Del | F1 | F2 | F3 | F4 | F5 | | F6 | - | = | [ | ] | \ | + * | | F1 | F2 | F3 | F4 | F5 | | F6 | _ | + | { | } | | | * |------+------+------+------+------+------| |------+------+------+------+------+------| - * | | F7 | F8 | F9 | F10 | F11 | | F12 | | | | | | + * | | F7 | F8 | F9 | F10 | F11 | | F12 | | | Home | End | | * |------+------+------+------+------+------+-------------+------+------+------+------+------+------| * | | | | | | | | | | | 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, _______, _______, _______, _______, _______, \ + [_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_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 \ ), - /* Func + /* Raise * ,-----------------------------------------. ,-----------------------------------------. * | ` | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | Del | * |------+------+------+------+------+------| |------+------+------+------+------+------| - * | | | | | | | | LEFT | DOWN | UP |RIGHT | PGUP | | + * | | F1 | F2 | F3 | F4 | F5 | | F6 | - | = | [ | ] | \ | * |------+------+------+------+------+------| |------+------+------+------+------+------| - * | | | | | | | | HOME | END |Alt+← |Alt+→ | PGDN | | + * | | F7 | F8 | F9 | F10 | F11 | | F12 | | |PageDn|PageUp| | * |------+------+------+------+------+------+-------------+------+------+------+------+------+------| * | | | | | | | | | | | Next | Vol- | Vol+ | Play | * `-------------------------------------------------------------------------------------------------' */ - [_FUNC] = LAYOUT( \ + [_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_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_PGUP, _______, \ - _______, _______, _______, _______, _______, _______, KC_HOME, KC_END, LALT(KC_LEFT), LALT(KC_RGHT), KC_PGDN, _______, \ + _______, 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) * ,-----------------------------------------. ,-----------------------------------------. - * | | Reset| | | | | | | | | | | Del | + * | | Reset|RGBRST| | | | | | | | | | Del | * |------+------+------+------+------+------| |------+------+------+------+------+------| - * | | | |Aud on|Audoff| Mac | | Win |Qwerty| | | | | + * | | | |Aud on|Audoff| Mac | | Win |Qwerty|Colemk|Dvorak| | | * |------+------+------+------+------+------| |------+------+------+------+------+------| * | | | | | | | | | |RGB ON| HUE+ | SAT+ | VAL+ | * |------+------+------+------+------+------+-------------+------+------+------+------+------+------| @@ -246,8 +288,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `-------------------------------------------------------------------------------------------------' */ [_ADJUST] = LAYOUT( \ - _______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL, \ - _______, _______, _______, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, _______, _______, _______, _______, \ + _______, RESET, RGBRST, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL, \ + _______, _______, _______, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, _______, _______, \ _______, _______, _______, _______, _______, _______, _______, _______, RGB_TOG, RGB_HUI, RGB_SAI, RGB_VAI, \ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_MOD, RGB_HUD, RGB_SAD, RGB_VAD \ ) @@ -272,11 +314,6 @@ float music_scale[][2] = SONG(MUSIC_SCALE_SOUND); bool TOG_STATUS = false; int RGB_current_mode; -void persistent_default_layer_set(uint16_t default_layer) { - eeconfig_update_default_layer(default_layer); - default_layer_set(default_layer); -} - // 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)) { @@ -296,7 +333,25 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { #ifdef AUDIO_ENABLE PLAY_SONG(tone_qwerty); #endif - persistent_default_layer_set(1UL<<_QWERTY); + set_single_persistent_default_layer(_QWERTY); + } + return false; + break; + case COLEMAK: + if (record->event.pressed) { + #ifdef AUDIO_ENABLE + PLAY_SONG(tone_colemak); + #endif + set_single_persistent_default_layer(_COLEMAK); + } + return false; + break; + case DVORAK: + if (record->event.pressed) { + #ifdef AUDIO_ENABLE + PLAY_SONG(tone_dvorak); + #endif + set_single_persistent_default_layer(_DVORAK); } return false; break; @@ -346,14 +401,6 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { } return false; break; - case FUNC: - if (record->event.pressed) { - layer_on(_FUNC); - } else { - layer_off(_FUNC); - } - return false; - break; case ADJUST: if (record->event.pressed) { layer_on(_ADJUST); @@ -397,6 +444,15 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { } return false; break; + case RGBRST: + #ifdef RGBLIGHT_ENABLE + if (record->event.pressed) { + eeconfig_update_rgblight_default(); + rgblight_enable(); + RGB_current_mode = rgblight_config.mode; + } + #endif + break; } return true; } @@ -444,14 +500,7 @@ void music_scale_user(void) //SSD1306 OLED update loop, make sure to add #define SSD1306OLED in config.h #ifdef SSD1306OLED -// hook point for 'led_test' keymap -// 'default' keymap's led_test_init() is empty function, do nothing -// 'led_test' keymap's led_test_init() force rgblight_mode_noeeprom(RGBLIGHT_MODE_RGB_TEST); -__attribute__ ((weak)) -void led_test_init(void) {} - void matrix_scan_user(void) { - led_test_init(); iota_gfx_task(); // this is what updates the display continuously } @@ -467,41 +516,42 @@ void matrix_update(struct CharacterMatrix *dest, #define L_BASE 0 #define L_LOWER (1<<_LOWER) #define L_RAISE (1<<_RAISE) -#define L_FUNC (1<<_FUNC) #define L_ADJUST (1<<_ADJUST) #define L_ADJUST_TRI (L_ADJUST|L_RAISE|L_LOWER) static void render_logo(struct CharacterMatrix *matrix) { - static char logo[]={ + static const char helix_logo[] PROGMEM ={ 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}; - matrix_write(matrix, logo); + matrix_write_P(matrix, helix_logo); //matrix_write_P(&matrix, PSTR(" Split keyboard kit")); } - - -void render_status(struct CharacterMatrix *matrix) { - - // Render to mode icon - static char logo[][2][3]={{{0x95,0x96,0},{0xb5,0xb6,0}},{{0x97,0x98,0},{0xb7,0xb8,0}}}; - if(keymap_config.swap_lalt_lgui==false){ - matrix_write(matrix, logo[0][0]); - matrix_write_P(matrix, PSTR("\n")); - matrix_write(matrix, logo[0][1]); - }else{ - matrix_write(matrix, logo[1][0]); - matrix_write_P(matrix, PSTR("\n")); - matrix_write(matrix, logo[1][1]); +static void render_rgbled_status(bool full, struct CharacterMatrix *matrix) { +#ifdef RGBLIGHT_ENABLE + char buf[30]; + if (RGBLIGHT_MODES > 1 && rgblight_config.enable) { + if (full) { + snprintf(buf, sizeof(buf), " LED %2d: %d,%d,%d ", + rgblight_config.mode, + rgblight_config.hue/RGBLIGHT_HUE_STEP, + rgblight_config.sat/RGBLIGHT_SAT_STEP, + rgblight_config.val/RGBLIGHT_VAL_STEP); + } else { + snprintf(buf, sizeof(buf), "[%2d] ",rgblight_config.mode); + } + matrix_write(matrix, buf); } +#endif +} +static void render_layer_status(struct CharacterMatrix *matrix) { // Define layers here, Have not worked out how to have text displayed for each layer. Copy down the number you see and add a case for it below - char buf[40]; - snprintf(buf,sizeof(buf), "Undef-%ld", layer_state); - matrix_write_P(matrix, PSTR("\nLayer: ")); + char buf[10]; + matrix_write_P(matrix, PSTR("Layer: ")); switch (layer_state) { case L_BASE: matrix_write_P(matrix, PSTR("Default")); @@ -512,24 +562,44 @@ void render_status(struct CharacterMatrix *matrix) { case L_LOWER: matrix_write_P(matrix, PSTR("Lower")); break; - case L_FUNC: - matrix_write_P(matrix, PSTR("Func")); - break; case L_ADJUST: case L_ADJUST_TRI: matrix_write_P(matrix, PSTR("Adjust")); break; default: + matrix_write_P(matrix, PSTR("Undef-")); + snprintf(buf,sizeof(buf), "%ld", layer_state); matrix_write(matrix, buf); } +} + +void render_status(struct CharacterMatrix *matrix) { + + // Render to mode icon + static const char os_logo[][2][3] PROGMEM ={{{0x95,0x96,0},{0xb5,0xb6,0}},{{0x97,0x98,0},{0xb7,0xb8,0}}}; + if(keymap_config.swap_lalt_lgui==false){ + matrix_write_P(matrix, os_logo[0][0]); + matrix_write_P(matrix, PSTR("\n")); + matrix_write_P(matrix, os_logo[0][1]); + }else{ + matrix_write_P(matrix, os_logo[1][0]); + matrix_write_P(matrix, PSTR("\n")); + matrix_write_P(matrix, os_logo[1][1]); + } + + matrix_write_P(matrix, PSTR(" ")); + render_layer_status(matrix); + matrix_write_P(matrix, PSTR("\n")); // Host Keyboard LED Status - char led[40]; - snprintf(led, sizeof(led), "\n%s %s %s", - (host_keyboard_leds() & (1< Date: Tue, 26 May 2020 14:10:48 +1000 Subject: [PATCH 042/930] [Keyboard] Add Key 65 by Fox Lab (#9116) * Add Key65 Universal PCB * Add ISO layout to universal * Correct universal info.json * Add Key 65 Hotswap * Correct typo in Key 65 Universal * Update readmes * Correct name * Update keyboards/foxlab/key65/hotswap/config.h * Apply suggestions from code review * Invert capslock LED state * Avoid initial capslock LED flash * Apply suggestions from code review * Update rules.mk * Apply suggestions from code review --- keyboards/foxlab/key65/hotswap/config.h | 172 ++++++++++ keyboards/foxlab/key65/hotswap/hotswap.c | 34 ++ keyboards/foxlab/key65/hotswap/hotswap.h | 33 ++ keyboards/foxlab/key65/hotswap/info.json | 80 +++++ .../key65/hotswap/keymaps/default/keymap.c | 36 +++ .../foxlab/key65/hotswap/keymaps/via/keymap.c | 48 +++ .../foxlab/key65/hotswap/keymaps/via/rules.mk | 1 + keyboards/foxlab/key65/hotswap/readme.md | 18 ++ keyboards/foxlab/key65/hotswap/rules.mk | 27 ++ keyboards/foxlab/key65/universal/config.h | 172 ++++++++++ keyboards/foxlab/key65/universal/info.json | 306 ++++++++++++++++++ .../key65/universal/keymaps/default/keymap.c | 36 +++ .../key65/universal/keymaps/via/keymap.c | 48 +++ .../key65/universal/keymaps/via/rules.mk | 1 + keyboards/foxlab/key65/universal/readme.md | 22 ++ keyboards/foxlab/key65/universal/rules.mk | 29 ++ keyboards/foxlab/key65/universal/universal.c | 34 ++ keyboards/foxlab/key65/universal/universal.h | 75 +++++ 18 files changed, 1172 insertions(+) create mode 100644 keyboards/foxlab/key65/hotswap/config.h create mode 100644 keyboards/foxlab/key65/hotswap/hotswap.c create mode 100644 keyboards/foxlab/key65/hotswap/hotswap.h create mode 100644 keyboards/foxlab/key65/hotswap/info.json create mode 100644 keyboards/foxlab/key65/hotswap/keymaps/default/keymap.c create mode 100644 keyboards/foxlab/key65/hotswap/keymaps/via/keymap.c create mode 100644 keyboards/foxlab/key65/hotswap/keymaps/via/rules.mk create mode 100644 keyboards/foxlab/key65/hotswap/readme.md create mode 100644 keyboards/foxlab/key65/hotswap/rules.mk create mode 100644 keyboards/foxlab/key65/universal/config.h create mode 100644 keyboards/foxlab/key65/universal/info.json create mode 100644 keyboards/foxlab/key65/universal/keymaps/default/keymap.c create mode 100644 keyboards/foxlab/key65/universal/keymaps/via/keymap.c create mode 100644 keyboards/foxlab/key65/universal/keymaps/via/rules.mk create mode 100644 keyboards/foxlab/key65/universal/readme.md create mode 100644 keyboards/foxlab/key65/universal/rules.mk create mode 100644 keyboards/foxlab/key65/universal/universal.c create mode 100644 keyboards/foxlab/key65/universal/universal.h diff --git a/keyboards/foxlab/key65/hotswap/config.h b/keyboards/foxlab/key65/hotswap/config.h new file mode 100644 index 000000000000..b6551f5a8626 --- /dev/null +++ b/keyboards/foxlab/key65/hotswap/config.h @@ -0,0 +1,172 @@ +/* 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 . + */ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0x464C // "FL" +#define PRODUCT_ID 0x0003 +#define DEVICE_VER 0x0001 +#define MANUFACTURER Fox Lab +#define PRODUCT Key 65 Hotswap +#define DESCRIPTION Key 65 Hotswap + +/* 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 { D2, D1, D0, D3, B3 } +#define MATRIX_COL_PINS { F5, F4, F1, F0, B0, F6, F7, C7, C6, B6, B5, B4, D7, D6, D4 } + +/* COL2ROW, ROW2COL*/ +#define DIODE_DIRECTION COL2ROW + +#define BACKLIGHT_PIN B7 +// #define BACKLIGHT_BREATHING +#define BACKLIGHT_LEVELS 5 + +#define RGB_DI_PIN E2 +#ifdef RGB_DI_PIN + #define RGBLED_NUM 8 + #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 */ + #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 + +/* 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 */ +#define NO_ACTION_MACRO +#define NO_ACTION_FUNCTION diff --git a/keyboards/foxlab/key65/hotswap/hotswap.c b/keyboards/foxlab/key65/hotswap/hotswap.c new file mode 100644 index 000000000000..6b3950d36128 --- /dev/null +++ b/keyboards/foxlab/key65/hotswap/hotswap.c @@ -0,0 +1,34 @@ +/* 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 . + */ + +#include "hotswap.h" + +void keyboard_pre_init_kb(void) { + led_init_ports(); + keyboard_pre_init_user(); +} + +void led_init_ports(void) { + setPinOutput(E6); + writePinHigh(E6); +} + +bool led_update_kb(led_t led_state) { + if (led_update_user(led_state)) { + writePin(E6, !led_state.caps_lock); + } + return true; +} diff --git a/keyboards/foxlab/key65/hotswap/hotswap.h b/keyboards/foxlab/key65/hotswap/hotswap.h new file mode 100644 index 000000000000..878a61bcef0a --- /dev/null +++ b/keyboards/foxlab/key65/hotswap/hotswap.h @@ -0,0 +1,33 @@ +/* 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 . + */ + +#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, K1E, \ + K20, K21, 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, K3E, \ + K40, K41, K42, K47, 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, KC_NO, K2E }, \ + { K30, KC_NO, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E }, \ + { K40, K41, K42, KC_NO, KC_NO, KC_NO, KC_NO, K47, KC_NO, KC_NO, KC_NO, K4B, K4C, K4D, K4E }, \ +} diff --git a/keyboards/foxlab/key65/hotswap/info.json b/keyboards/foxlab/key65/hotswap/info.json new file mode 100644 index 000000000000..99e5615dfe99 --- /dev/null +++ b/keyboards/foxlab/key65/hotswap/info.json @@ -0,0 +1,80 @@ +{ + "keyboard_name": "Key 65 Hotswap", + "url": "", + "maintainer": "qmk", + "width": 15, + "height": 5, + "layouts": { + "LAYOUT": { + "key_count": 66, + "layout": [ + {"label":"K00 (D2,F5)", "x":0, "y":0}, + {"label":"K01 (D2,F4)", "x":1, "y":0}, + {"label":"K02 (D2,F1)", "x":2, "y":0}, + {"label":"K03 (D2,F0)", "x":3, "y":0}, + {"label":"K04 (D2,B0)", "x":4, "y":0}, + {"label":"K05 (D2,F6)", "x":5, "y":0}, + {"label":"K06 (D2,F7)", "x":6, "y":0}, + {"label":"K07 (D2,C7)", "x":7, "y":0}, + {"label":"K08 (D2,C6)", "x":8, "y":0}, + {"label":"K09 (D2,B6)", "x":9, "y":0}, + {"label":"K0A (D2,B5)", "x":10, "y":0}, + {"label":"K0B (D2,B4)", "x":11, "y":0}, + {"label":"K0C (D2,D7)", "x":12, "y":0}, + {"label":"K0D (D2,D6)", "x":13, "y":0, "w":2}, + {"label":"K0E (D2,D4)", "x":15, "y":0}, + {"label":"K10 (D1,F5)", "x":0, "y":1, "w":1.5}, + {"label":"K11 (D1,F4)", "x":1.5, "y":1}, + {"label":"K12 (D1,F1)", "x":2.5, "y":1}, + {"label":"K13 (D1,F0)", "x":3.5, "y":1}, + {"label":"K14 (D1,B0)", "x":4.5, "y":1}, + {"label":"K15 (D1,F6)", "x":5.5, "y":1}, + {"label":"K16 (D1,F7)", "x":6.5, "y":1}, + {"label":"K17 (D1,C7)", "x":7.5, "y":1}, + {"label":"K18 (D1,C6)", "x":8.5, "y":1}, + {"label":"K19 (D1,B6)", "x":9.5, "y":1}, + {"label":"K1A (D1,B5)", "x":10.5, "y":1}, + {"label":"K1B (D1,B4)", "x":11.5, "y":1}, + {"label":"K1C (D1,D7)", "x":12.5, "y":1}, + {"label":"K1D (D1,D6)", "x":13.5, "y":1, "w":1.5}, + {"label":"K1E (D1,D4)", "x":15, "y":1}, + {"label":"K20 (D0,F5)", "x":0, "y":2, "w":1.75}, + {"label":"K21 (D0,F4)", "x":1.75, "y":2}, + {"label":"K22 (D0,F1)", "x":2.75, "y":2}, + {"label":"K23 (D0,F0)", "x":3.75, "y":2}, + {"label":"K24 (D0,B0)", "x":4.75, "y":2}, + {"label":"K25 (D0,F6)", "x":5.75, "y":2}, + {"label":"K26 (D0,F7)", "x":6.75, "y":2}, + {"label":"K27 (D0,C7)", "x":7.75, "y":2}, + {"label":"K28 (D0,C6)", "x":8.75, "y":2}, + {"label":"K29 (D0,B6)", "x":9.75, "y":2}, + {"label":"K2A (D0,B5)", "x":10.75, "y":2}, + {"label":"K2B (D0,B4)", "x":11.75, "y":2}, + {"label":"K2C (D0,D7)", "x":12.75, "y":2, "w":2.25}, + {"label":"K2E (D0,D4)", "x":15, "y":2}, + {"label":"K30 (D3,F5)", "x":0, "y":3, "w":2.25}, + {"label":"K32 (D3,F1)", "x":2.25, "y":3}, + {"label":"K33 (D3,F0)", "x":3.25, "y":3}, + {"label":"K34 (D3,B0)", "x":4.25, "y":3}, + {"label":"K35 (D3,F6)", "x":5.25, "y":3}, + {"label":"K36 (D3,F7)", "x":6.25, "y":3}, + {"label":"K37 (D3,C7)", "x":7.25, "y":3}, + {"label":"K38 (D3,C6)", "x":8.25, "y":3}, + {"label":"K39 (D3,B6)", "x":9.25, "y":3}, + {"label":"K3A (D3,B5)", "x":10.25, "y":3}, + {"label":"K3B (D3,B4)", "x":11.25, "y":3}, + {"label":"K3C (D3,D7)", "x":12.25, "y":3, "w":1.75}, + {"label":"K3D (D3,D6)", "x":14, "y":3}, + {"label":"K3E (D3,D4)", "x":15, "y":3}, + {"label":"K40 (B3,F5)", "x":0, "y":4, "w":1.5}, + {"label":"K41 (B3,F4)", "x":1.5, "y":4}, + {"label":"K42 (B3,F1)", "x":2.5, "y":4, "w":1.5}, + {"label":"K47 (B3,C7)", "x":4, "y":4, "w":7}, + {"label":"K4B (B3,B4)", "x":11, "y":4, "w":1.5}, + {"label":"K4C (B3,D7)", "x":13, "y":4}, + {"label":"K4D (B3,D6)", "x":14, "y":4}, + {"label":"K4E (B3,D4)", "x":15, "y":4} + ] + } + } +} diff --git a/keyboards/foxlab/key65/hotswap/keymaps/default/keymap.c b/keyboards/foxlab/key65/hotswap/keymaps/default/keymap.c new file mode 100644 index 000000000000..956b7ac2ee4f --- /dev/null +++ b/keyboards/foxlab/key65/hotswap/keymaps/default/keymap.c @@ -0,0 +1,36 @@ +/* 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 . + */ + +#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_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_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, MO(1), + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, 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, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, BL_TOGG, BL_DEC, BL_INC, BL_STEP, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______ + ), + +}; + diff --git a/keyboards/foxlab/key65/hotswap/keymaps/via/keymap.c b/keyboards/foxlab/key65/hotswap/keymaps/via/keymap.c new file mode 100644 index 000000000000..9bc43b766e95 --- /dev/null +++ b/keyboards/foxlab/key65/hotswap/keymaps/via/keymap.c @@ -0,0 +1,48 @@ +/* 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 . + */ + +#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_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_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, MO(1), + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, 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, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, BL_TOGG, BL_DEC, BL_INC, BL_STEP, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______ + ), + [2] = LAYOUT( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______ + ), + [3] = LAYOUT( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______ + ), +}; diff --git a/keyboards/foxlab/key65/hotswap/keymaps/via/rules.mk b/keyboards/foxlab/key65/hotswap/keymaps/via/rules.mk new file mode 100644 index 000000000000..1e5b99807cb7 --- /dev/null +++ b/keyboards/foxlab/key65/hotswap/keymaps/via/rules.mk @@ -0,0 +1 @@ +VIA_ENABLE = yes diff --git a/keyboards/foxlab/key65/hotswap/readme.md b/keyboards/foxlab/key65/hotswap/readme.md new file mode 100644 index 000000000000..61a6b6d924ae --- /dev/null +++ b/keyboards/foxlab/key65/hotswap/readme.md @@ -0,0 +1,18 @@ +# Foxlab Key 65 Hotswap + +![Key 65](https://i.imgur.com/28Qck8ul.jpg) + +Key 65 is featured with the three-layer case and dual-gasket structure. The plate mounting system is an improved version of the gasket sandwich on Leaf 60. In addition, we add gaskets between the middle case and the bottom case. There's an optional rubber sheet between the PCB and the plate. The numerous options will offer you the most freedom to make the keyboard look and feel as you wish. + +* Keyboard Maintainer: QMK +* Hardware Supported: Key 65 Hotswap PCB +* Hardware Availability: [Group Buy](https://geekhack.org/index.php?topic=102609.0) + +This version is for the hotswap variant with the fixed layout below: +![Layout](https://i.imgur.com/NDqjqJml.png) + +Make example for this keyboard (after setting up your build environment): + + make foxlab/key65/hotswap: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/foxlab/key65/hotswap/rules.mk b/keyboards/foxlab/key65/hotswap/rules.mk new file mode 100644 index 000000000000..15ccf06490e8 --- /dev/null +++ b/keyboards/foxlab/key65/hotswap/rules.mk @@ -0,0 +1,27 @@ +# 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 = 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 +AUDIO_ENABLE = no # Audio output +FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches diff --git a/keyboards/foxlab/key65/universal/config.h b/keyboards/foxlab/key65/universal/config.h new file mode 100644 index 000000000000..10efc25d1ab0 --- /dev/null +++ b/keyboards/foxlab/key65/universal/config.h @@ -0,0 +1,172 @@ +/* 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 . + */ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0x464C // "FL" +#define PRODUCT_ID 0x0004 +#define DEVICE_VER 0x0001 +#define MANUFACTURER Fox Lab +#define PRODUCT Key 65 Universal +#define DESCRIPTION Key 65 Universal + +/* key matrix size */ +#define MATRIX_ROWS 5 +#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 { D0, D1, F0, F4, F1 } +#define MATRIX_COL_PINS { B1, F5, F6, F7, C7, C6, B6, B5, B4, D7, D6, D4, D5, D3, D2, B0 } + +/* COL2ROW, ROW2COL*/ +#define DIODE_DIRECTION COL2ROW + +#define BACKLIGHT_PIN B7 +// #define BACKLIGHT_BREATHING +#define BACKLIGHT_LEVELS 5 + +#define RGB_DI_PIN E2 +#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 */ + #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 + +/* 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 */ +#define NO_ACTION_MACRO +#define NO_ACTION_FUNCTION diff --git a/keyboards/foxlab/key65/universal/info.json b/keyboards/foxlab/key65/universal/info.json new file mode 100644 index 000000000000..ce95ecd8cc6d --- /dev/null +++ b/keyboards/foxlab/key65/universal/info.json @@ -0,0 +1,306 @@ +{ + "keyboard_name": "Key 65 Universal", + "url": "", + "maintainer": "qmk", + "width": 16, + "height": 5, + "layouts": { + "LAYOUT_65_ansi_blocker_split_bs": { + "key_count": 68, + "layout": [ + {"label":"K00 (D0,B1)", "x":0, "y":0}, + {"label":"K01 (D0,F5)", "x":1, "y":0}, + {"label":"K02 (D0,F6)", "x":2, "y":0}, + {"label":"K03 (D0,F7)", "x":3, "y":0}, + {"label":"K04 (D0,C7)", "x":4, "y":0}, + {"label":"K05 (D0,C6)", "x":5, "y":0}, + {"label":"K06 (D0,B6)", "x":6, "y":0}, + {"label":"K07 (D0,B5)", "x":7, "y":0}, + {"label":"K08 (D0,B4)", "x":8, "y":0}, + {"label":"K09 (D0,D7)", "x":9, "y":0}, + {"label":"K0A (D0,D6)", "x":10, "y":0}, + {"label":"K0B (D0,D4)", "x":11, "y":0}, + {"label":"K0C (D0,D5)", "x":12, "y":0}, + {"label":"K0D (D0,D3)", "x":13, "y":0}, + {"label":"K0E (D0,D2)", "x":14, "y":0}, + {"label":"K0F (D0,B0)", "x":15, "y":0}, + {"label":"K10 (D1,B1)", "x":0, "y":1, "w":1.5}, + {"label":"K11 (D1,F5)", "x":1.5, "y":1}, + {"label":"K12 (D1,F6)", "x":2.5, "y":1}, + {"label":"K13 (D1,F7)", "x":3.5, "y":1}, + {"label":"K14 (D1,C7)", "x":4.5, "y":1}, + {"label":"K15 (D1,C6)", "x":5.5, "y":1}, + {"label":"K16 (D1,B6)", "x":6.5, "y":1}, + {"label":"K17 (D1,B5)", "x":7.5, "y":1}, + {"label":"K18 (D1,B4)", "x":8.5, "y":1}, + {"label":"K19 (D1,D7)", "x":9.5, "y":1}, + {"label":"K1A (D1,D6)", "x":10.5, "y":1}, + {"label":"K1B (D1,D4)", "x":11.5, "y":1}, + {"label":"K1C (D1,D5)", "x":12.5, "y":1}, + {"label":"K1D (D1,D3)", "x":13.5, "y":1, "w":1.5}, + {"label":"K1F (D1,B0)", "x":15, "y":1}, + {"label":"K20 (F0,B1)", "x":0, "y":2, "w":1.75}, + {"label":"K21 (F0,F5)", "x":1.75, "y":2}, + {"label":"K22 (F0,F6)", "x":2.75, "y":2}, + {"label":"K23 (F0,F7)", "x":3.75, "y":2}, + {"label":"K24 (F0,C7)", "x":4.75, "y":2}, + {"label":"K25 (F0,C6)", "x":5.75, "y":2}, + {"label":"K26 (F0,B6)", "x":6.75, "y":2}, + {"label":"K27 (F0,B5)", "x":7.75, "y":2}, + {"label":"K28 (F0,B4)", "x":8.75, "y":2}, + {"label":"K29 (F0,D7)", "x":9.75, "y":2}, + {"label":"K2A (F0,D6)", "x":10.75, "y":2}, + {"label":"K2B (F0,D4)", "x":11.75, "y":2}, + {"label":"K2D (F0,D3)", "x":12.75, "y":2, "w":2.25}, + {"label":"K2F (F0,B0)", "x":15, "y":2}, + {"label":"K30 (F4,B1)", "x":0, "y":3, "w":2.25}, + {"label":"K32 (F4,F6)", "x":2.25, "y":3}, + {"label":"K33 (F4,F7)", "x":3.25, "y":3}, + {"label":"K34 (F4,C7)", "x":4.25, "y":3}, + {"label":"K35 (F4,C6)", "x":5.25, "y":3}, + {"label":"K36 (F4,B6)", "x":6.25, "y":3}, + {"label":"K37 (F4,B5)", "x":7.25, "y":3}, + {"label":"K38 (F4,B4)", "x":8.25, "y":3}, + {"label":"K39 (F4,D7)", "x":9.25, "y":3}, + {"label":"K3A (F4,D6)", "x":10.25, "y":3}, + {"label":"K3B (F4,D4)", "x":11.25, "y":3}, + {"label":"K3C (F4,D5)", "x":12.25, "y":3, "w":1.75}, + {"label":"K3D (F4,D3)", "x":14, "y":3}, + {"label":"K3F (F4,B0)", "x":15, "y":3}, + {"label":"K40 (F1,B1)", "x":0, "y":4, "w":1.25}, + {"label":"K41 (F1,F5)", "x":1.25, "y":4, "w":1.25}, + {"label":"K42 (F1,F6)", "x":2.5, "y":4, "w":1.25}, + {"label":"K46 (F1,B6)", "x":3.75, "y":4, "w":6.25}, + {"label":"K4A (F1,D6)", "x":10, "y":4, "w":1.25}, + {"label":"K4B (F1,D4)", "x":11.25, "y":4, "w":1.25}, + {"label":"K4C (F1,D5)", "x":13, "y":4}, + {"label":"K4D (F1,D3)", "x":14, "y":4}, + {"label":"K4F (F1,B0)", "x":15, "y":4} + ] + }, + "LAYOUT_65_ansi_blocker_tsangan_split_bs": { + "key_count": 67, + "layout": [ + {"label":"K00 (D0,B1)", "x":0, "y":0}, + {"label":"K01 (D0,F5)", "x":1, "y":0}, + {"label":"K02 (D0,F6)", "x":2, "y":0}, + {"label":"K03 (D0,F7)", "x":3, "y":0}, + {"label":"K04 (D0,C7)", "x":4, "y":0}, + {"label":"K05 (D0,C6)", "x":5, "y":0}, + {"label":"K06 (D0,B6)", "x":6, "y":0}, + {"label":"K07 (D0,B5)", "x":7, "y":0}, + {"label":"K08 (D0,B4)", "x":8, "y":0}, + {"label":"K09 (D0,D7)", "x":9, "y":0}, + {"label":"K0A (D0,D6)", "x":10, "y":0}, + {"label":"K0B (D0,D4)", "x":11, "y":0}, + {"label":"K0C (D0,D5)", "x":12, "y":0}, + {"label":"K0D (D0,D3)", "x":13, "y":0}, + {"label":"K0E (D0,D2)", "x":14, "y":0}, + {"label":"K0F (D0,B0)", "x":15, "y":0}, + {"label":"K10 (D1,B1)", "x":0, "y":1, "w":1.5}, + {"label":"K11 (D1,F5)", "x":1.5, "y":1}, + {"label":"K12 (D1,F6)", "x":2.5, "y":1}, + {"label":"K13 (D1,F7)", "x":3.5, "y":1}, + {"label":"K14 (D1,C7)", "x":4.5, "y":1}, + {"label":"K15 (D1,C6)", "x":5.5, "y":1}, + {"label":"K16 (D1,B6)", "x":6.5, "y":1}, + {"label":"K17 (D1,B5)", "x":7.5, "y":1}, + {"label":"K18 (D1,B4)", "x":8.5, "y":1}, + {"label":"K19 (D1,D7)", "x":9.5, "y":1}, + {"label":"K1A (D1,D6)", "x":10.5, "y":1}, + {"label":"K1B (D1,D4)", "x":11.5, "y":1}, + {"label":"K1C (D1,D5)", "x":12.5, "y":1}, + {"label":"K1D (D1,D3)", "x":13.5, "y":1, "w":1.5}, + {"label":"K1F (D1,B0)", "x":15, "y":1}, + {"label":"K20 (F0,B1)", "x":0, "y":2, "w":1.75}, + {"label":"K21 (F0,F5)", "x":1.75, "y":2}, + {"label":"K22 (F0,F6)", "x":2.75, "y":2}, + {"label":"K23 (F0,F7)", "x":3.75, "y":2}, + {"label":"K24 (F0,C7)", "x":4.75, "y":2}, + {"label":"K25 (F0,C6)", "x":5.75, "y":2}, + {"label":"K26 (F0,B6)", "x":6.75, "y":2}, + {"label":"K27 (F0,B5)", "x":7.75, "y":2}, + {"label":"K28 (F0,B4)", "x":8.75, "y":2}, + {"label":"K29 (F0,D7)", "x":9.75, "y":2}, + {"label":"K2A (F0,D6)", "x":10.75, "y":2}, + {"label":"K2B (F0,D4)", "x":11.75, "y":2}, + {"label":"K2D (F0,D3)", "x":12.75, "y":2, "w":2.25}, + {"label":"K2F (F0,B0)", "x":15, "y":2}, + {"label":"K30 (F4,B1)", "x":0, "y":3, "w":2.25}, + {"label":"K32 (F4,F6)", "x":2.25, "y":3}, + {"label":"K33 (F4,F7)", "x":3.25, "y":3}, + {"label":"K34 (F4,C7)", "x":4.25, "y":3}, + {"label":"K35 (F4,C6)", "x":5.25, "y":3}, + {"label":"K36 (F4,B6)", "x":6.25, "y":3}, + {"label":"K37 (F4,B5)", "x":7.25, "y":3}, + {"label":"K38 (F4,B4)", "x":8.25, "y":3}, + {"label":"K39 (F4,D7)", "x":9.25, "y":3}, + {"label":"K3A (F4,D6)", "x":10.25, "y":3}, + {"label":"K3B (F4,D4)", "x":11.25, "y":3}, + {"label":"K3C (F4,D5)", "x":12.25, "y":3, "w":1.75}, + {"label":"K3D (F4,D3)", "x":14, "y":3}, + {"label":"K3F (F4,B0)", "x":15, "y":3}, + {"label":"K40 (F1,B1)", "x":0, "y":4, "w":1.5}, + {"label":"K41 (F1,F5)", "x":1.5, "y":4}, + {"label":"K42 (F1,F6)", "x":2.5, "y":4, "w":1.5}, + {"label":"K46 (F1,B6)", "x":4, "y":4, "w":7}, + {"label":"K4A (F1,D6)", "x":11, "y":4, "w":1.5}, + {"label":"K4C (F1,D5)", "x":13, "y":4}, + {"label":"K4D (F1,D3)", "x":14, "y":4}, + {"label":"K4F (F1,B0)", "x":15, "y":4} + ] + }, + "LAYOUT_iso_all": { + "key_count": 71, + "layout": [ + {"label":"K00 (D0,B1)", "x":0, "y":0}, + {"label":"K01 (D0,F5)", "x":1, "y":0}, + {"label":"K02 (D0,F6)", "x":2, "y":0}, + {"label":"K03 (D0,F7)", "x":3, "y":0}, + {"label":"K04 (D0,C7)", "x":4, "y":0}, + {"label":"K05 (D0,C6)", "x":5, "y":0}, + {"label":"K06 (D0,B6)", "x":6, "y":0}, + {"label":"K07 (D0,B5)", "x":7, "y":0}, + {"label":"K08 (D0,B4)", "x":8, "y":0}, + {"label":"K09 (D0,D7)", "x":9, "y":0}, + {"label":"K0A (D0,D6)", "x":10, "y":0}, + {"label":"K0B (D0,D4)", "x":11, "y":0}, + {"label":"K0C (D0,D5)", "x":12, "y":0}, + {"label":"K0D (D0,D3)", "x":13, "y":0}, + {"label":"K0E (D0,D2)", "x":14, "y":0}, + {"label":"K0F (D0,B0)", "x":15, "y":0}, + {"label":"K10 (D1,B1)", "x":0, "y":1, "w":1.5}, + {"label":"K11 (D1,F5)", "x":1.5, "y":1}, + {"label":"K12 (D1,F6)", "x":2.5, "y":1}, + {"label":"K13 (D1,F7)", "x":3.5, "y":1}, + {"label":"K14 (D1,C7)", "x":4.5, "y":1}, + {"label":"K15 (D1,C6)", "x":5.5, "y":1}, + {"label":"K16 (D1,B6)", "x":6.5, "y":1}, + {"label":"K17 (D1,B5)", "x":7.5, "y":1}, + {"label":"K18 (D1,B4)", "x":8.5, "y":1}, + {"label":"K19 (D1,D7)", "x":9.5, "y":1}, + {"label":"K1A (D1,D6)", "x":10.5, "y":1}, + {"label":"K1B (D1,D4)", "x":11.5, "y":1}, + {"label":"K1C (D1,D5)", "x":12.5, "y":1}, + {"label":"K1F (D1,B0)", "x":15, "y":1}, + {"label":"K20 (F0,B1)", "x":0, "y":2, "w":1.75}, + {"label":"K21 (F0,F5)", "x":1.75, "y":2}, + {"label":"K22 (F0,F6)", "x":2.75, "y":2}, + {"label":"K23 (F0,F7)", "x":3.75, "y":2}, + {"label":"K24 (F0,C7)", "x":4.75, "y":2}, + {"label":"K25 (F0,C6)", "x":5.75, "y":2}, + {"label":"K26 (F0,B6)", "x":6.75, "y":2}, + {"label":"K27 (F0,B5)", "x":7.75, "y":2}, + {"label":"K28 (F0,B4)", "x":8.75, "y":2}, + {"label":"K29 (F0,D7)", "x":9.75, "y":2}, + {"label":"K2A (F0,D6)", "x":10.75, "y":2}, + {"label":"K2B (F0,D4)", "x":11.75, "y":2}, + {"label":"K1D (D1,D3)", "x":12.75, "y":2}, + {"label":"K2D (F0,D3)", "x":13.75, "y":1, "w":1.25, "h":2}, + {"label":"K2F (F0,B0)", "x":15, "y":2}, + {"label":"K30 (F4,B1)", "x":0, "y":3, "w":1.25}, + {"label":"K31 (F4,F5)", "x":1.25, "y":3}, + {"label":"K32 (F4,F6)", "x":2.25, "y":3}, + {"label":"K33 (F4,F7)", "x":3.25, "y":3}, + {"label":"K34 (F4,C7)", "x":4.25, "y":3}, + {"label":"K35 (F4,C6)", "x":5.25, "y":3}, + {"label":"K36 (F4,B6)", "x":6.25, "y":3}, + {"label":"K37 (F4,B5)", "x":7.25, "y":3}, + {"label":"K38 (F4,B4)", "x":8.25, "y":3}, + {"label":"K39 (F4,D7)", "x":9.25, "y":3}, + {"label":"K3A (F4,D6)", "x":10.25, "y":3}, + {"label":"K3B (F4,D4)", "x":11.25, "y":3}, + {"label":"K3C (F4,D5)", "x":12.25, "y":3, "w":1.75}, + {"label":"K3D (F4,D3)", "x":14, "y":3}, + {"label":"K3F (F4,B0)", "x":15, "y":3}, + {"label":"K40 (F1,B1)", "x":0, "y":4, "w":1.25}, + {"label":"K41 (F1,F5)", "x":1.25, "y":4, "w":1.25}, + {"label":"K42 (F1,F6)", "x":2.5, "y":4, "w":1.25}, + {"label":"K44 (F1,C7)", "x":3.75, "y":4, "w":2.25}, + {"label":"K46 (F1,B6)", "x":6, "y":4, "w":1.25}, + {"label":"K48 (F1,B4)", "x":7.25, "y":4, "w":2.75}, + {"label":"K4A (F1,D6)", "x":10, "y":4, "w":1.25}, + {"label":"K4B (F1,D4)", "x":11.25, "y":4, "w":1.25}, + {"label":"K4C (F1,D5)", "x":13, "y":4}, + {"label":"K4D (F1,D3)", "x":14, "y":4}, + {"label":"K4F (F1,B0)", "x":15, "y":4} + ] + }, + "LAYOUT_all": { + "key_count": 71, + "layout": [ + {"label":"K00 (D0,B1)", "x":0, "y":0}, + {"label":"K01 (D0,F5)", "x":1, "y":0}, + {"label":"K02 (D0,F6)", "x":2, "y":0}, + {"label":"K03 (D0,F7)", "x":3, "y":0}, + {"label":"K04 (D0,C7)", "x":4, "y":0}, + {"label":"K05 (D0,C6)", "x":5, "y":0}, + {"label":"K06 (D0,B6)", "x":6, "y":0}, + {"label":"K07 (D0,B5)", "x":7, "y":0}, + {"label":"K08 (D0,B4)", "x":8, "y":0}, + {"label":"K09 (D0,D7)", "x":9, "y":0}, + {"label":"K0A (D0,D6)", "x":10, "y":0}, + {"label":"K0B (D0,D4)", "x":11, "y":0}, + {"label":"K0C (D0,D5)", "x":12, "y":0}, + {"label":"K0D (D0,D3)", "x":13, "y":0}, + {"label":"K0E (D0,D2)", "x":14, "y":0}, + {"label":"K0F (D0,B0)", "x":15, "y":0}, + {"label":"K10 (D1,B1)", "x":0, "y":1, "w":1.5}, + {"label":"K11 (D1,F5)", "x":1.5, "y":1}, + {"label":"K12 (D1,F6)", "x":2.5, "y":1}, + {"label":"K13 (D1,F7)", "x":3.5, "y":1}, + {"label":"K14 (D1,C7)", "x":4.5, "y":1}, + {"label":"K15 (D1,C6)", "x":5.5, "y":1}, + {"label":"K16 (D1,B6)", "x":6.5, "y":1}, + {"label":"K17 (D1,B5)", "x":7.5, "y":1}, + {"label":"K18 (D1,B4)", "x":8.5, "y":1}, + {"label":"K19 (D1,D7)", "x":9.5, "y":1}, + {"label":"K1A (D1,D6)", "x":10.5, "y":1}, + {"label":"K1B (D1,D4)", "x":11.5, "y":1}, + {"label":"K1C (D1,D5)", "x":12.5, "y":1}, + {"label":"K1D (D1,D3)", "x":13.5, "y":1, "w":1.5}, + {"label":"K1F (D1,B0)", "x":15, "y":1}, + {"label":"K20 (F0,B1)", "x":0, "y":2, "w":1.75}, + {"label":"K21 (F0,F5)", "x":1.75, "y":2}, + {"label":"K22 (F0,F6)", "x":2.75, "y":2}, + {"label":"K23 (F0,F7)", "x":3.75, "y":2}, + {"label":"K24 (F0,C7)", "x":4.75, "y":2}, + {"label":"K25 (F0,C6)", "x":5.75, "y":2}, + {"label":"K26 (F0,B6)", "x":6.75, "y":2}, + {"label":"K27 (F0,B5)", "x":7.75, "y":2}, + {"label":"K28 (F0,B4)", "x":8.75, "y":2}, + {"label":"K29 (F0,D7)", "x":9.75, "y":2}, + {"label":"K2A (F0,D6)", "x":10.75, "y":2}, + {"label":"K2B (F0,D4)", "x":11.75, "y":2}, + {"label":"K2D (F0,D3)", "x":12.75, "y":2, "w":2.25}, + {"label":"K2F (F0,B0)", "x":15, "y":2}, + {"label":"K30 (F4,B1)", "x":0, "y":3, "w":1.25}, + {"label":"K31 (F4,F5)", "x":1.25, "y":3}, + {"label":"K32 (F4,F6)", "x":2.25, "y":3}, + {"label":"K33 (F4,F7)", "x":3.25, "y":3}, + {"label":"K34 (F4,C7)", "x":4.25, "y":3}, + {"label":"K35 (F4,C6)", "x":5.25, "y":3}, + {"label":"K36 (F4,B6)", "x":6.25, "y":3}, + {"label":"K37 (F4,B5)", "x":7.25, "y":3}, + {"label":"K38 (F4,B4)", "x":8.25, "y":3}, + {"label":"K39 (F4,D7)", "x":9.25, "y":3}, + {"label":"K3A (F4,D6)", "x":10.25, "y":3}, + {"label":"K3B (F4,D4)", "x":11.25, "y":3}, + {"label":"K3C (F4,D5)", "x":12.25, "y":3, "w":1.75}, + {"label":"K3D (F4,D3)", "x":14, "y":3}, + {"label":"K3F (F4,B0)", "x":15, "y":3}, + {"label":"K40 (F1,B1)", "x":0, "y":4, "w":1.25}, + {"label":"K41 (F1,F5)", "x":1.25, "y":4, "w":1.25}, + {"label":"K42 (F1,F6)", "x":2.5, "y":4, "w":1.25}, + {"label":"K44 (F1,C7)", "x":3.75, "y":4, "w":2.25}, + {"label":"K46 (F1,B6)", "x":6, "y":4, "w":1.25}, + {"label":"K48 (F1,B4)", "x":7.25, "y":4, "w":2.75}, + {"label":"K4A (F1,D6)", "x":10, "y":4, "w":1.25}, + {"label":"K4B (F1,D4)", "x":11.25, "y":4, "w":1.25}, + {"label":"K4C (F1,D5)", "x":13, "y":4}, + {"label":"K4D (F1,D3)", "x":14, "y":4}, + {"label":"K4F (F1,B0)", "x":15, "y":4} + ] + } + } +} diff --git a/keyboards/foxlab/key65/universal/keymaps/default/keymap.c b/keyboards/foxlab/key65/universal/keymaps/default/keymap.c new file mode 100644 index 000000000000..9c2071f01aca --- /dev/null +++ b/keyboards/foxlab/key65/universal/keymaps/default/keymap.c @@ -0,0 +1,36 @@ +/* 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 . + */ + +#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_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, + 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_SPC, 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_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, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, BL_TOGG, BL_DEC, BL_INC, BL_STEP, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + +}; + diff --git a/keyboards/foxlab/key65/universal/keymaps/via/keymap.c b/keyboards/foxlab/key65/universal/keymaps/via/keymap.c new file mode 100644 index 000000000000..8d44f2c46101 --- /dev/null +++ b/keyboards/foxlab/key65/universal/keymaps/via/keymap.c @@ -0,0 +1,48 @@ +/* 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 . + */ + +#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_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, + 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_SPC, 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_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, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, BL_TOGG, BL_DEC, BL_INC, BL_STEP, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + [2] = LAYOUT_all( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + [3] = LAYOUT_all( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), +}; diff --git a/keyboards/foxlab/key65/universal/keymaps/via/rules.mk b/keyboards/foxlab/key65/universal/keymaps/via/rules.mk new file mode 100644 index 000000000000..1e5b99807cb7 --- /dev/null +++ b/keyboards/foxlab/key65/universal/keymaps/via/rules.mk @@ -0,0 +1 @@ +VIA_ENABLE = yes diff --git a/keyboards/foxlab/key65/universal/readme.md b/keyboards/foxlab/key65/universal/readme.md new file mode 100644 index 000000000000..967b9565f24a --- /dev/null +++ b/keyboards/foxlab/key65/universal/readme.md @@ -0,0 +1,22 @@ +# Foxlab Key 65 Universal + +![Key 65](https://i.imgur.com/28Qck8ul.jpg) + +Key 65 is featured with the three-layer case and dual-gasket structure. The plate mounting system is an improved version of the gasket sandwich on Leaf 60. In addition, we add gaskets between the middle case and the bottom case. There's an optional rubber sheet between the PCB and the plate. The numerous options will offer you the most freedom to make the keyboard look and feel as you wish. + +* Keyboard Maintainer: QMK +* Hardware Supported: Key 65 Universal PCB +* Hardware Availability: [Group Buy](https://geekhack.org/index.php?topic=102609.0) + +This version is for the universal variant with the layouts below available: +![Layout](https://i.imgur.com/MQTZV0ol.png) + +Make example for this keyboard (after setting up your build environment): + + make foxlab/key65/universal: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). + +## RGB LED support + +The universal PCB supports RGB LEDs as an LED strip, but is not supplied with one. To use RGB LEDs, you should configure the RGBLED_NUM to match the number of LEDs on your strip. diff --git a/keyboards/foxlab/key65/universal/rules.mk b/keyboards/foxlab/key65/universal/rules.mk new file mode 100644 index 000000000000..24a570cf2d7b --- /dev/null +++ b/keyboards/foxlab/key65/universal/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 = atmel-dfu + +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 +AUDIO_ENABLE = no # Audio output +FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches + +LAYOUTS = 65_ansi_blocker_split_bs # Support community layouts diff --git a/keyboards/foxlab/key65/universal/universal.c b/keyboards/foxlab/key65/universal/universal.c new file mode 100644 index 000000000000..361f3ad7f21f --- /dev/null +++ b/keyboards/foxlab/key65/universal/universal.c @@ -0,0 +1,34 @@ +/* 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 . + */ + +#include "universal.h" + +void keyboard_pre_init_kb(void) { + led_init_ports(); + keyboard_pre_init_user(); +} + +void led_init_ports(void) { + setPinOutput(E6); + writePinHigh(E6); +} + +bool led_update_kb(led_t led_state) { + if (led_update_user(led_state)) { + writePin(E6, !led_state.caps_lock); + } + return true; +} diff --git a/keyboards/foxlab/key65/universal/universal.h b/keyboards/foxlab/key65/universal/universal.h new file mode 100644 index 000000000000..9d92030c8178 --- /dev/null +++ b/keyboards/foxlab/key65/universal/universal.h @@ -0,0 +1,75 @@ +/* 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 . + */ + +#pragma once + +#include "quantum.h" + +#define LAYOUT_65_ansi_blocker_split_bs( \ + 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, K1D, K1F, \ + K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2D, K2F, \ + K30, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3F, \ + K40, K41, K42, K46, K4A, K4B, K4C, K4D, K4F \ +) { \ + { 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, K1D, KC_NO, K1F }, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, KC_NO, K2D, KC_NO, K2F }, \ + { K30, KC_NO, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, KC_NO, K3F }, \ + { K40, K41, K42, KC_NO, KC_NO, KC_NO, K46, KC_NO, KC_NO, KC_NO, K4A, K4B, K4C, K4D, KC_NO, K4F }, \ +} + +#define LAYOUT_65_ansi_blocker_tsangan_split_bs( \ + 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, K1D, K1F, \ + K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2D, K2F, \ + K30, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3F, \ + K40, K41, K42, K46, K4B, K4C, K4D, K4F \ +) { \ + { 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, K1D, KC_NO, K1F }, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, KC_NO, K2D, KC_NO, K2F }, \ + { K30, KC_NO, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, KC_NO, K3F }, \ + { K40, K41, K42, KC_NO, KC_NO, KC_NO, K46, KC_NO, KC_NO, KC_NO, KC_NO, K4B, K4C, K4D, KC_NO, K4F }, \ +} + +#define LAYOUT_iso_all( \ + 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, K1F, \ + K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K1D, K2D, K2F, \ + K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3F, \ + K40, K41, K42, K44, K46, K48, K4A, K4B, K4C, K4D, K4F \ +) { \ + { 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, K1D, KC_NO, K1F }, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, KC_NO, K2D, KC_NO, K2F }, \ + { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, KC_NO, K3F }, \ + { K40, K41, K42, KC_NO, K44, KC_NO, K46, KC_NO, K48, KC_NO, K4A, K4B, K4C, K4D, KC_NO, K4F }, \ +} + +#define LAYOUT_all( \ + 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, K1D, K1F, \ + K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2D, K2F, \ + K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3F, \ + K40, K41, K42, K44, K46, K48, K4A, K4B, K4C, K4D, K4F \ +) { \ + { 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, K1D, KC_NO, K1F }, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, KC_NO, K2D, KC_NO, K2F }, \ + { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, KC_NO, K3F }, \ + { K40, K41, K42, KC_NO, K44, KC_NO, K46, KC_NO, K48, KC_NO, K4A, K4B, K4C, K4D, KC_NO, K4F }, \ +} From bfe76053ba2767e8df1aea1183c8dcaabeaca8c9 Mon Sep 17 00:00:00 2001 From: yttyx Date: Tue, 26 May 2020 05:24:16 +0100 Subject: [PATCH 043/930] [Keymap] Niu keymap and README update (#9190) * - Balance 12 layers now in their final form - Added Plover layer - Updated README to use layout images * Add headings to layer images. * - Remove redundent TO(_BA) from FC layer - Link to new FC layer image from README * Highlight home keys. * Changes following review. --- keyboards/niu_mini/keymaps/yttyx/README.md | 80 ++------- keyboards/niu_mini/keymaps/yttyx/keymap.c | 192 ++++++++------------- keyboards/niu_mini/keymaps/yttyx/rules.mk | 4 +- 3 files changed, 85 insertions(+), 191 deletions(-) diff --git a/keyboards/niu_mini/keymaps/yttyx/README.md b/keyboards/niu_mini/keymaps/yttyx/README.md index a48bdcca35f6..ff3937c23208 100644 --- a/keyboards/niu_mini/keymaps/yttyx/README.md +++ b/keyboards/niu_mini/keymaps/yttyx/README.md @@ -1,7 +1,7 @@ # Overview -This layout is based on Balance Twelve (mirror variant) by Sasha Viminitz. Please see [this page](https://mathematicalmulticore.wordpress.com/the-keyboard-layout-project/) -for more information. It's designed for left-handers who use their right hand for the mouse. +This layout uses a mirror variant of Balance 12, created by Sasha Viminitz. See [this page](https://mathematicalmulticore.wordpress.com/the-keyboard-layout-project/) +for more information. ## To build @@ -19,74 +19,14 @@ sudo dfu-programmer atmega32u4 launch ## Layers -### Base: +### Balance 12 base (BA) layer +![Base layer](https://i.imgur.com/I0TkIHT.png) - .--------.-------.-------.-------.--------. .-------.-------.-------.-------.------. - | P | L | C | D | W | | U | O | Y | K | Q | - |--------+-------+-------+-------+--------| |-------+-------+-------+-------+------| - | N | R | S | T | M | | A | E | I | H | V | - |--------+-------+-------+-------+--------| |-------+-------+-------+-------+------| - | Z Sft | J Ctl | F Alt | G | B | | , | . Alt | ; Ctl | X Sft | Sup | - '--------'-------'-------+-------+--------+-----. .-----+-------+-------+-------'-------'------' - | BS P1 | Spc P2 | P3 | | | Sft | | - '-------'--------'-----' '-----'-------'-------' +### Numeric/Punctuation (NP) layer +![Numeric/Punctuation layer](https://i.imgur.com/GgZ0PCq.png) -### P1: Punctuation (1) +### Function/Cursor (FC) layer +![Function/Cursor layer](https://i.imgur.com/zcVID2d.png) - .--------.-------.-------.-------.-------. .------.-------.-------.-------.------. - | Esc | | | | | | | | / | ^ | | ~ | - |--------+-------+-------+-------+-------| |------+-------+-------+-------+------| - | Tab | | | | | | & | \ | ` | $ | Ent | - |--------+-------+-------+-------+-------| |------+-------+-------+-------+------| - | Sft | Ctl | Alt | Del | | | % | Alt | Ctl | Sft | Sup | - '--------'-------'-------+-------+-------+-----. .-----+------+-------+-------'-------'------' - | P1 | | | | | Sft | | - '-------'-------'-----' '-----'------'-------' - -### P2: Punctuation (2) - - .-------.-------.-------.-------.-------. .-------.-------.-------.-------.------. - | Esc | | NC | FV | | | ( | ) | " | ? | | - |-------+-------+-------+-------+-------| |-------+-------+-------+-------+------| - | Tab | Ctl-X | Ctl-C | Ctl-V | Ctl-Z | | { | } | ' | ! | Ent | - |-------+-------+-------+-------+-------| |-------+-------+-------+-------+------| - | Sft | Ctl | Alt | Del | Ent | | # | Alt | Ctl | Sft | Sup | - '-------'-------'-------+-------+-------+-----. .-----+-------+-------+-------'-------'------' - | BS | P2 | | | | Sft | | - '-------'-------'-----' '-----'-------'-------' - -### P3: Punctuation (3) - - .-------.-------.-------.-------.-------. .------.-------.-------.-------.------. - | Esc | | Break | Pscr | ScLk | | < | > | + | _ | = | - |-------+-------+-------+-------+-------| |------+-------+-------+-------+------| - | Tab | | | Caps | | | [ | ] | * | - | Ent | - |-------+-------+-------+-------+-------| |------+-------+-------+-------+------| - | Sft | Ctl | Alt | Del | | | @ | Alt | Ctl | Sft | Sup | - '-------'-------'-------+-------+-------+-----. .-----+------+-------+-------'-------'------' - | BS | | P3 | | | Sft | | - '-------'-------'-----' '-----'------'-------' - -### Numerals / Cursor control - - .-------.-------.-------.------.-------. .------.-------.-------.------.------. - | 1 | 2 | 3 | 4 | 5 | | Home | Up | End | PgUp | | - |-------+-------+-------+------+-------| |------+-------+-------+------+------| - | 6 | 7 | 8 | 9 | 0 | | Left | Down | Right | PgDn | | - |-------+-------+-------+------+-------| |------+-------+-------+------+------| - | Sft | Ctl | Alt | Del | . | | Ins | Alt | Ctl | Sft | Sup | - '-------'-------'-------+------+-------+-----. .-----+------+-------+-------'------'------' - | BS | BA | | | | Sft | | - '------'-------'-----' '-----'------'-------' - -### FV: Function keys / Cursor control (Vim) - - .-------.------.-------.-----.-------. .------.-------.-----.-------.------. - | F1 | F2 | F3 | F4 | F5 | | 0 | K | $ | Ctl-B | | - |-------+------+-------+-----+-------| |------+-------+-----+-------+------| - | F6 | F7 | F8 | F9 | F10 | | H | J | L | Ctl-F | | - |-------+------+-------+-----+-------| |------+-------+-----+-------+------| - | Sft | Ctl | Alt | F11 | F12 | | | Alt | Ctl | Sft | Sup | - '-------'------'-------+-----+-------+-----. .-----+------+-------+-----'-------'------' - | BS | BA | | | | Sft | | - '-----'-------'-----' '-----'------'-------' +### Plover (PL) layer +![Plover layer](https://i.imgur.com/RikOGXe.png) diff --git a/keyboards/niu_mini/keymaps/yttyx/keymap.c b/keyboards/niu_mini/keymaps/yttyx/keymap.c index e299a53b4849..79fda2be0040 100644 --- a/keyboards/niu_mini/keymaps/yttyx/keymap.c +++ b/keyboards/niu_mini/keymaps/yttyx/keymap.c @@ -1,141 +1,95 @@ #include QMK_KEYBOARD_H +#include "keymap_steno.h" enum layers { - BA, // Base (Balance Twelve mirror variant) - P1, // Punctuation (1) - P2, // Punctuation (2) - P3, // Punctuation (2) - NC, // Numerals / Cursor control - FV // Function keys / Cursor control (Vim) + _BA, // Base (Balance Twelve mirror variant) + _NP, // Numeric/Punctuation + _FC, // Function + _PL // Plover }; -// Abbreviations - base -#define KX_P1_BSPC LT(P1, KC_BSPC) -#define KX_P2_SPC LT(P2, KC_SPC) - -#define KX_SFT_Z MT(MOD_LSFT, KC_Z) -#define KX_CTL_J MT(MOD_LCTL, KC_J) -#define KX_ALT_F MT(MOD_LALT, KC_F) - -#define KX_ALT_DOT MT(MOD_LALT, KC_DOT) -#define KX_CTL_SCLN MT(MOD_LCTL, KC_SCLN) -#define KX_SFT_X MT(MOD_LSFT, KC_X) - -#define KX_AT LSFT(KC_QUOT) -#define KX_DQUOT LSFT(KC_2) -#define KX_PIPE LSFT(KC_NUBS) -#define KX_TILDA LSFT(KC_NUHS) - +// Abbreviations +#define KX_SFT_Z MT(MOD_LSFT, KC_Z) +#define KX_SFT_X MT(MOD_LSFT, KC_X) +#define LT_ESC_FC LT(_FC, KC_ESC) const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - /* - .--------.-------.-------.-------.--------. .-------.-------.-------.-------.------. - | P | L | C | D | W | | U | O | Y | K | Q | - |--------+-------+-------+-------+--------| |-------+-------+-------+-------+------| - | N | R | S | T | M | | A | E | I | H | V | - |--------+-------+-------+-------+--------| |-------+-------+-------+-------+------| - | Z Sft | J Ctl | F Alt | G | B | | , | . Alt | ; Ctl | X Sft | Sup | - '--------'-------'-------+-------+--------+-----. .-----+-------+-------+-------'-------'------' - | BS P1 | Spc P2 | P3 | | | Sft | | - '-------'--------'-----' '-----'-------'-------' - */ - [BA] = LAYOUT( - KC_P, KC_L, KC_C, KC_D, KC_W, XXXXXXX, XXXXXXX, KC_U, KC_O, KC_Y, KC_K, KC_Q, - KC_N, KC_R, KC_S, KC_T, KC_M, XXXXXXX, XXXXXXX, KC_A, KC_E, KC_I, KC_H, KC_V, - KX_SFT_Z, KX_CTL_J, KX_ALT_F, KC_G, KC_B, XXXXXXX, XXXXXXX, KC_COMM, KX_ALT_DOT, KX_CTL_SCLN, KX_SFT_X, KC_LGUI, - XXXXXXX, XXXXXXX, XXXXXXX, KX_P1_BSPC, KX_P2_SPC, MO(P3), XXXXXXX, KC_RSFT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX - ), - /* P1: Punctuation (1) - .--------.-------.-------.-------.-------. .------.-------.-------.-------.------. - | Esc | | | | | | | | / | ^ | | ~ | - |--------+-------+-------+-------+-------| |------+-------+-------+-------+------| - | Tab | | | | | | & | \ | ` | $ | Ent | - |--------+-------+-------+-------+-------| |------+-------+-------+-------+------| - | Sft | Ctl | Alt | Del | | | % | Alt | Ctl | Sft | Sup | - '--------'-------'-------+-------+-------+-----. .-----+------+-------+-------'-------'------' - | P1 | | | | | Sft | | - '-------'-------'-----' '-----'------'-------' + /* Base + .--------.--------.--------.--------.--------.--------.--------.--------.--------.--------.--------.--------. + | P | L | C | D | W | | | U | O | Y | K | Q | + |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + | N | R | S | T | M | | BS | A | E | I | H | V | + |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + | Z Sft | J | F | G | B | | Ent | ' @ | , < | . > | X Sft | | + |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + | Ctl | Alt | Sup | NP | Spc | Esc FC | Sft | Sft | Sup | Alt | Ctl | | + '--------'--------'--------'--------'--------'--------'--------'--------'--------'--------'--------'--------' */ - [P1] = LAYOUT( - KC_ESC, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KX_PIPE, KC_SLSH, KC_CIRC, KC_HASH, KX_TILDA, - KC_TAB, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_AMPR, KC_NUBS, KC_GRV, KC_DLR, KC_ENT, - KC_LSFT, KC_LCTL, KC_LALT, KC_DEL, XXXXXXX, XXXXXXX, XXXXXXX, KC_PERC, KC_LALT, KC_LCTL, KC_LSFT, _______, - XXXXXXX, XXXXXXX, XXXXXXX, _______, XXXXXXX, XXXXXXX, XXXXXXX, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX + [_BA] = LAYOUT( + KC_P, KC_L, KC_C, KC_D, KC_W, XXXXXXX, XXXXXXX, KC_U, KC_O, KC_Y, KC_K, KC_Q, + KC_N, KC_R, KC_S, KC_T, KC_M, XXXXXXX, KC_BSPC, KC_A, KC_E, KC_I, KC_H, KC_V, + KX_SFT_Z, KC_J, KC_F, KC_G, KC_B, XXXXXXX, KC_ENT, KC_QUOT, KC_COMM, KC_DOT, KX_SFT_X, XXXXXXX, + KC_LCTL, KC_LALT, KC_LGUI, MO(_NP), KC_SPC, LT_ESC_FC, KC_LSFT, KC_LSFT, KC_LGUI, KC_LALT, KC_LCTL, XXXXXXX ), - /* P2: Punctuation (2) - .-------.-------.-------.-------.-------. .-------.-------.-------.-------.------. - | Esc | | NC | FV | | | ( | ) | " | ? | | - |-------+-------+-------+-------+-------| |-------+-------+-------+-------+------| - | Tab | Ctl-X | Ctl-C | Ctl-V | Ctl-Z | | { | } | ' | ! | Ent | - |-------+-------+-------+-------+-------| |-------+-------+-------+-------+------| - | Sft | Ctl | Alt | Del | Ent | | # | Alt | Ctl | Sft | Sup | - '-------'-------'-------+-------+-------+-----. .-----+-------+-------+-------'-------'------' - | BS | P2 | | | | Sft | | - '-------'-------'-----' '-----'-------'-------' - */ - [P2] = LAYOUT( - KC_ESC, XXXXXXX, TO(NC), TO(FV), XXXXXXX, XXXXXXX, XXXXXXX, KC_LPRN, KC_RPRN, KX_DQUOT, KC_QUES, XXXXXXX, - KC_TAB, LCTL(KC_X), LCTL(KC_C), LCTL(KC_V), LCTL(KC_Z), XXXXXXX, XXXXXXX, KC_LCBR, KC_RCBR, KC_QUOT, KC_EXLM, KC_ENT, - KC_LSFT, KC_LCTL, KC_LALT, KC_DEL, KC_ENT, XXXXXXX, XXXXXXX, KC_NUHS, KC_LALT, KC_LCTL, KC_LSFT, _______, - XXXXXXX, XXXXXXX, XXXXXXX, KC_BSPC, _______, XXXXXXX, XXXXXXX, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX - ), - - /* P3: Punctuation (3) - .-------.-------.-------.-------.-------. .------.-------.-------.-------.------. - | Esc | | Break | Pscr | ScLk | | < | > | + | _ | = | - |-------+-------+-------+-------+-------| |------+-------+-------+-------+------| - | Tab | | | Caps | | | [ | ] | * | - | Ent | - |-------+-------+-------+-------+-------| |------+-------+-------+-------+------| - | Sft | Ctl | Alt | Del | | | @ | Alt | Ctl | Sft | Sup | - '-------'-------'-------+-------+-------+-----. .-----+------+-------+-------'-------'------' - | BS | | P3 | | | Sft | | - '-------'-------'-----' '-----'------'-------' - */ - [P3] = LAYOUT( - KC_ESC, XXXXXXX, KC_BRK, KC_PSCR, KC_SLCK, XXXXXXX, XXXXXXX, KC_LABK, KC_RABK, KC_PLUS, KC_UNDS, KC_EQL, - KC_TAB, XXXXXXX, XXXXXXX, KC_CAPS, XXXXXXX, XXXXXXX, XXXXXXX, KC_LBRC, KC_RBRC, KC_ASTR, KC_MINS, KC_ENT, - KC_LSFT, KC_LCTL, KC_LALT, KC_DEL, XXXXXXX, XXXXXXX, XXXXXXX, KX_AT, KC_LALT, KC_LCTL, KC_LSFT, _______, - XXXXXXX, XXXXXXX, XXXXXXX, KC_BSPC, XXXXXXX, _______, XXXXXXX, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX + /* Numeric/Punctuation (NP) + .--------.--------.--------.--------.--------.--------.--------.--------.--------.--------.--------.--------. + | 1 ! | 2 " | 3 | 4 $ | 5 % | PL | | 6 ^ | 7 & | 8 * | 9 ( | 0 ) | + |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + | Tab | Ctl-X | Ctl-C | Ctl-V | Ctl-Z | | | [ { | ] } | - _ | ; : | \ | | + |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + | Sft | | | Del | Ins | | | / ? | = + | # ~ | ` | | + |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + | Ctl | Alt | Sup | NP | Spc | | Sft | Sft | Sup | Alt | Ctl | | + '--------'--------'--------'--------'--------'--------'--------'--------'--------'--------'--------'--------' + */ + [_NP] = LAYOUT( + KC_1, KC_2, KC_3, KC_4, KC_5, TO(_PL), XXXXXXX, KC_6, KC_7, KC_8, KC_9, KC_0, + KC_TAB, C(KC_X), C(KC_C), C(KC_V), C(KC_Z), XXXXXXX, _______, KC_LBRC, KC_RBRC, KC_MINS, KC_SCLN, KC_NUBS, + KC_LSFT, XXXXXXX, XXXXXXX, KC_DEL, KC_INS, XXXXXXX, XXXXXXX, KC_SLSH, KC_EQL, KC_NUHS, KC_GRV, XXXXXXX, + _______, _______, _______, _______, _______, XXXXXXX, _______, _______, _______, _______, _______, XXXXXXX ), - /* NC: Numerals / Cursor control - .-------.-------.-------.------.-------. .------.-------.-------.------.------. - | 1 | 2 | 3 | 4 | 5 | | Home | Up | End | PgUp | | - |-------+-------+-------+------+-------| |------+-------+-------+------+------| - | 6 | 7 | 8 | 9 | 0 | | Left | Down | Right | PgDn | | - |-------+-------+-------+------+-------| |------+-------+-------+------+------| - | Sft | Ctl | Alt | Del | . | | Ins | Alt | Ctl | Sft | Sup | - '-------'-------'-------+------+-------+-----. .-----+------+-------+-------'------'------' - | BS | BA | | | | Sft | | - '------'-------'-----' '-----'------'-------' + /* Function/Cursor (FC) + .--------.--------.--------.--------.--------.--------.--------.--------.--------.--------.--------.--------. + | F1 | F2 | F3 | F4 | F5 | | | Home | Up | End | PgUp | | + |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + | F6 | F7 | F8 | F9 | F10 | | | Left | Down | Right | PgDn | | + |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + | Sft | | | F11 | F12 | | | PScr | Break | ScLk | Caps | | + |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + | Ctl | Alt | Sup | | Spc | | Sft | Sft | Sup | Alt | Ctl | | + '--------'--------'--------'--------'--------'--------'--------'--------'--------'--------'--------'--------' */ - [NC] = LAYOUT( - KC_1, KC_2, KC_3, KC_4, KC_5, XXXXXXX, XXXXXXX, KC_HOME, KC_UP, KC_END, KC_PGUP, XXXXXXX, - KC_6, KC_7, KC_8, KC_9, KC_0, XXXXXXX, XXXXXXX, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGDN, XXXXXXX, - KC_LSFT, KC_LCTL, KC_LALT, KC_DEL, KC_DOT, XXXXXXX, XXXXXXX, KC_INS, KC_LALT, KC_LCTL, KC_LSFT, _______, - XXXXXXX, XXXXXXX, XXXXXXX, KC_BSPC, TO(BA), XXXXXXX, XXXXXXX, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX + [_FC] = LAYOUT( + KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, XXXXXXX, XXXXXXX, KC_HOME, KC_UP, KC_END, KC_PGUP, XXXXXXX, + KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, XXXXXXX, XXXXXXX, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGDN, XXXXXXX, + _______, XXXXXXX, XXXXXXX, KC_F11, KC_F12, XXXXXXX, XXXXXXX, KC_PSCR, KC_BRK, KC_SLCK, KC_CAPS, XXXXXXX, + _______, _______, _______, XXXXXXX, _______, _______, _______, _______, _______, _______, _______, XXXXXXX ), - /* FV: Function keys / Cursor control (Vim) - .-------.------.-------.-----.-------. .------.-------.-----.-------.------. - | F1 | F2 | F3 | F4 | F5 | | 0 | K | $ | Ctl-B | | - |-------+------+-------+-----+-------| |------+-------+-----+-------+------| - | F6 | F7 | F8 | F9 | F10 | | H | J | L | Ctl-F | | - |-------+------+-------+-----+-------| |------+-------+-----+-------+------| - | Sft | Ctl | Alt | F11 | F12 | | | Alt | Ctl | Sft | Sup | - '-------'------'-------+-----+-------+-----. .-----+------+-------+-----'-------'------' - | BS | BA | | | | Sft | | - '-----'-------'-----' '-----'------'-------' + /* Plover (PL) + .--------.--------.--------.--------.--------.--------.--------.--------.--------.--------.--------.--------. + | # | # | # | # | # | BA | # | # | # | # | # | # | + |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + | S | T | P | H | * | | * | F | P | L | T | D | + |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + | S | K | W | R | * | | * | R | B | G | S | Z | + |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + | | | | A | O | | E | U | | | | | + '--------'--------'--------'--------'--------'--------'--------'--------'--------'--------'--------'--------' */ - [FV] = LAYOUT( - KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, XXXXXXX, XXXXXXX, KC_0, KC_K, KC_DLR, LCTL(KC_B), XXXXXXX, - KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, XXXXXXX, XXXXXXX, KC_H, KC_J, KC_L, LCTL(KC_F), XXXXXXX, - KC_LSFT, KC_LCTL, KC_LALT, KC_F11, KC_F12, XXXXXXX, XXXXXXX, XXXXXXX, KC_LALT, KC_LCTL, KC_LSFT, _______, - XXXXXXX, XXXXXXX, XXXXXXX, KC_BSPC, TO(BA), XXXXXXX, XXXXXXX, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX + [_PL] = LAYOUT( + STN_NUM, STN_NUM, STN_NUM, STN_NUM, STN_NUM, TO(_BA), STN_NUM, STN_NUM, STN_NUM, STN_NUM, STN_NUM, STN_NUM, + STN_S1, STN_TL, STN_PL, STN_HL, STN_ST1, XXXXXXX, STN_ST1, STN_FR, STN_PR, STN_LR, STN_TR, STN_DR, + STN_S2, STN_KL, STN_WL, STN_RL, STN_ST2, XXXXXXX, STN_ST2, STN_RR, STN_BR, STN_GR, STN_SR, STN_ZR, + XXXXXXX, XXXXXXX, XXXXXXX, STN_A, STN_O, XXXXXXX, STN_E, STN_U, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX ) }; +void matrix_init_user() { + steno_set_mode(STENO_MODE_GEMINI); +} diff --git a/keyboards/niu_mini/keymaps/yttyx/rules.mk b/keyboards/niu_mini/keymaps/yttyx/rules.mk index d8b21aa842da..a2566a20b0b4 100644 --- a/keyboards/niu_mini/keymaps/yttyx/rules.mk +++ b/keyboards/niu_mini/keymaps/yttyx/rules.mk @@ -6,5 +6,5 @@ MIDI_ENABLE = no MOUSEKEY_ENABLE = no NKRO_ENABLE = yes RGBLIGHT_ENABLE = no -STENO_ENABLE = no -VIRTSER_ENABLE = no +STENO_ENABLE = yes +VIRTSER_ENABLE = yes From 451c472d1d701507d06923a859561a60bfbcfa78 Mon Sep 17 00:00:00 2001 From: umi <57262844+umi-umi@users.noreply.github.com> Date: Tue, 26 May 2020 17:14:58 +0900 Subject: [PATCH 044/930] [Docs] Japanese translation of docs/feature_pointing_device.md (#8993) * add feature_pointing_device.md translation * update based on comment * update based on comment * update based on comment * update based on comment --- docs/ja/feature_pointing_device.md | 49 ++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 docs/ja/feature_pointing_device.md diff --git a/docs/ja/feature_pointing_device.md b/docs/ja/feature_pointing_device.md new file mode 100644 index 000000000000..8b26ac102f15 --- /dev/null +++ b/docs/ja/feature_pointing_device.md @@ -0,0 +1,49 @@ +# ポインティングデバイス :id=pointing-device + + + +ポインティングデバイスは汎用的な機能の総称です: システムポインタを移動します。マウスキーのような他のオプションも確かにありますが、これは簡単に変更可能で軽量であることを目指しています。機能を制御するためにカスタムキーを実装したり、他の周辺機器から情報を収集してここに直接挿入したりできます - QMK に処理を任せてください。 + +ポインティングデバイスを有効にするには、rules.mk の以下の行のコメントを解除します: + +```makefile +POINTING_DEVICE_ENABLE = yes +``` + +マウスレポートを操作するために、以下の関数を使うことができます: + +* `pointing_device_get_report()` - ホストコンピュータに送信された情報を表す現在の report_mouse_t を返します。 +* `pointing_device_set_report(report_mouse_t newMouseReport)` - ホストコンピュータに送信される report_mouse_t を上書き保存します。 + +report_mouse_t (ここでは "mouseReport") が以下のプロパティを持つことを覚えておいてください: + +* `mouseReport.x` - これは、x軸の動き(+ 右へ、- 左へ)を表す -127 から 127 (128ではなく、USB HID 仕様で定義されています)の符号付き整数です。 +* `mouseReport.y` - これは、y軸の動き(+ 上へ、- 下へ)を表す -127 から 127 (128ではなく、USB HID 仕様で定義されています)の符号付き整数です。 +* `mouseReport.v` - これは、垂直スクロール(+ 上へ、- 下へ)を表す -127 から 127 (128ではなく、USB HID 仕様で定義されています)の符号付き整数です。 +* `mouseReport.h` - これは、水平スクロール(+ 右へ、- 左へ)を表す -127 から 127 (128ではなく、USB HID 仕様で定義されています)の符号付き整数です。 +* `mouseReport.buttons` - これは uint8_t で、上位の5ビットを使っています。これらのビットはマウスボタンの状態を表します - ビット 3 はマウスボタン 5、ビット 7 はマウスボタン 1 です。 + +マウスレポートが送信されると、x、y、v、h のいずれの値も 0 に設定されます (これは "pointing_device_send()" で行われます。この挙動を回避するためにオーバーライドすることができます)。このように、ボタンの状態は持続しますが、動きは1度だけ起こります。さらにカスタマイズするために、`pointing_device_init` と `pointing_device_task` のどちらもオーバーライドすることができます。 + +以下の例では、カスタムキーを使ってマウスをクリックし垂直および水平方向に127単位スクロールし、リリースされた時にそれを全て元に戻します - なぜならこれは完全に便利な機能だからです。いいですか、以下はひとつの例です: + +```c +case MS_SPECIAL: + report_mouse_t currentReport = pointing_device_get_report(); + if (record->event.pressed) { + currentReport.v = 127; + currentReport.h = 127; + currentReport.buttons |= MOUSE_BTN1; // this is defined in report.h + } else { + currentReport.v = -127; + currentReport.h = -127; + currentReport.buttons &= ~MOUSE_BTN1; + } + pointing_device_set_report(currentReport); + break; +``` + +マウスレポートは送信されるたびに 0 (ボタンを除く)に設定されることを思い出してください。そのため、スクロールはそれぞれの場合に1度だけ発生します。 From af2ca136045c0157c5c093fb902dccacd9fa0e32 Mon Sep 17 00:00:00 2001 From: Leivince John Marte Date: Tue, 26 May 2020 18:35:06 +0800 Subject: [PATCH 045/930] [Keymap] Ported ok60 to via (#9179) * Initialize ok60/via * Update vendorId for ok60 to K6 0x4b36 * Update keyboards/ok60/config.h --- keyboards/ok60/config.h | 2 +- keyboards/ok60/keymaps/via/keymap.c | 36 +++++++++++++++++++++++++++++ keyboards/ok60/keymaps/via/rules.mk | 2 ++ 3 files changed, 39 insertions(+), 1 deletion(-) create mode 100644 keyboards/ok60/keymaps/via/keymap.c create mode 100644 keyboards/ok60/keymaps/via/rules.mk diff --git a/keyboards/ok60/config.h b/keyboards/ok60/config.h index cc056a489cc9..a8b6e47b5f57 100644 --- a/keyboards/ok60/config.h +++ b/keyboards/ok60/config.h @@ -21,7 +21,7 @@ along with this program. If not, see . #include "config_common.h" /* USB Device descriptor parameter */ -#define VENDOR_ID 0xFEED +#define VENDOR_ID 0x4B36 // K6 - ok60 #define PRODUCT_ID 0x6060 #define DEVICE_VER 0x0001 #define MANUFACTURER OK60 diff --git a/keyboards/ok60/keymaps/via/keymap.c b/keyboards/ok60/keymaps/via/keymap.c new file mode 100644 index 000000000000..d0f5939f4e99 --- /dev/null +++ b/keyboards/ok60/keymaps/via/keymap.c @@ -0,0 +1,36 @@ +#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_LSFT, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), KC_APP, KC_RCTL + ), + + [1] = LAYOUT_60_ansi( + 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, + _______, RGB_TOG, KC_UP, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, _______, _______, _______, _______, + _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, BL_DEC, BL_TOGG, BL_INC, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______ + ), + + [2] = LAYOUT_60_ansi( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______ + ), + + [3] = LAYOUT_60_ansi( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______ + ), +}; diff --git a/keyboards/ok60/keymaps/via/rules.mk b/keyboards/ok60/keymaps/via/rules.mk new file mode 100644 index 000000000000..36b7ba9cbc98 --- /dev/null +++ b/keyboards/ok60/keymaps/via/rules.mk @@ -0,0 +1,2 @@ +VIA_ENABLE = yes +LTO_ENABLE = yes From 6501377070ff20bd061ea85c7ae5517652b6478b Mon Sep 17 00:00:00 2001 From: Erovia Date: Tue, 26 May 2020 17:43:33 +0200 Subject: [PATCH 046/930] CLI: fix `json2c` subcommand and add/fix tests (#9206) Co-authored-by: Zach White --- .../onekey/keymaps/default_json/keymap.json | 9 +++++++++ keyboards/handwired/onekey/pytest/templates/keymap.c | 1 + lib/python/qmk/cli/json2c.py | 12 ++++++------ lib/python/qmk/tests/test_cli_commands.py | 6 ++++++ lib/python/qmk/tests/test_qmk_keymap.py | 4 ++-- 5 files changed, 24 insertions(+), 8 deletions(-) create mode 100644 keyboards/handwired/onekey/keymaps/default_json/keymap.json diff --git a/keyboards/handwired/onekey/keymaps/default_json/keymap.json b/keyboards/handwired/onekey/keymaps/default_json/keymap.json new file mode 100644 index 000000000000..cf30f37b797c --- /dev/null +++ b/keyboards/handwired/onekey/keymaps/default_json/keymap.json @@ -0,0 +1,9 @@ +{ + "keyboard":"handwired/onekey/pytest", + "keymap":"default_json", + "layout":"LAYOUT", + "layers":[["KC_A"]], + "author":"qmk", + "notes":"This file is a keymap.json file for handwired/onekey/pytest", + "version":1 +} diff --git a/keyboards/handwired/onekey/pytest/templates/keymap.c b/keyboards/handwired/onekey/pytest/templates/keymap.c index d355210c47f7..6cb25d52263e 100644 --- a/keyboards/handwired/onekey/pytest/templates/keymap.c +++ b/keyboards/handwired/onekey/pytest/templates/keymap.c @@ -1 +1,2 @@ +#include QMK_KEYBOARD_H const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {__KEYMAP_GOES_HERE__}; diff --git a/lib/python/qmk/cli/json2c.py b/lib/python/qmk/cli/json2c.py index 52184050707c..af0d80a9ac90 100755 --- a/lib/python/qmk/cli/json2c.py +++ b/lib/python/qmk/cli/json2c.py @@ -18,19 +18,19 @@ def json2c(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. """ # Error checking - if not cli.args.filename.exists(): - cli.log.error('JSON file does not exist!') + if cli.args.filename and cli.args.filename.name == '-': + # TODO(skullydazed/anyone): Read file contents from STDIN + cli.log.error('Reading from STDIN is not (yet) supported.') cli.print_usage() exit(1) - if cli.args.filename.name == '-': - # TODO(skullydazed/anyone): Read file contents from STDIN - 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) # Environment processing - if cli.args.output.name == ('-'): + if cli.args.output and cli.args.output.name == '-': cli.args.output = None # Parse the configurator json diff --git a/lib/python/qmk/tests/test_cli_commands.py b/lib/python/qmk/tests/test_cli_commands.py index a93587150cc3..768929de1d76 100644 --- a/lib/python/qmk/tests/test_cli_commands.py +++ b/lib/python/qmk/tests/test_cli_commands.py @@ -84,3 +84,9 @@ 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 + + +def test_json2c(): + result = check_subcommand('json2c', 'keyboards/handwired/onekey/keymaps/default_json/keymap.json') + assert result.returncode == 0 + assert result.stdout == '#include QMK_KEYBOARD_H\nconst uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {\t[0] = LAYOUT(KC_A)};\n\n' diff --git a/lib/python/qmk/tests/test_qmk_keymap.py b/lib/python/qmk/tests/test_qmk_keymap.py index 2db625600e90..d8669e54985a 100644 --- a/lib/python/qmk/tests/test_qmk_keymap.py +++ b/lib/python/qmk/tests/test_qmk_keymap.py @@ -8,12 +8,12 @@ def test_template_onekey_proton_c(): def test_template_onekey_pytest(): templ = qmk.keymap.template('handwired/onekey/pytest') - assert templ == 'const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {__KEYMAP_GOES_HERE__};\n' + assert templ == '#include QMK_KEYBOARD_H\nconst uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {__KEYMAP_GOES_HERE__};\n' def test_generate_onekey_pytest(): templ = qmk.keymap.generate('handwired/onekey/pytest', 'LAYOUT', [['KC_A']]) - assert templ == 'const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [0] = LAYOUT(KC_A)};\n' + assert templ == '#include QMK_KEYBOARD_H\nconst uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {\t[0] = LAYOUT(KC_A)};\n' # FIXME(skullydazed): Add a test for qmk.keymap.write that mocks up an FD. From 5d3bf8a050f3c0beb1f91147dc1ab54de36cbb05 Mon Sep 17 00:00:00 2001 From: nathanvercaemert <50712356+nathanvercaemert@users.noreply.github.com> Date: Tue, 26 May 2020 14:46:02 -0400 Subject: [PATCH 047/930] [Keymap] Contributing Home-Row-Centric-Mousekey Layout (#9195) * adding personal keymap to repository * starting to customize documentation to keymap * updated readme * updated readme --- .../keymaps/nathanvercaemert/config.h | 29 ++ .../keymaps/nathanvercaemert/keymap.c | 351 ++++++++++++++++++ .../keymaps/nathanvercaemert/readme.md | 26 ++ .../keymaps/nathanvercaemert/rules.mk | 10 + 4 files changed, 416 insertions(+) create mode 100644 keyboards/ergodox_ez/keymaps/nathanvercaemert/config.h create mode 100644 keyboards/ergodox_ez/keymaps/nathanvercaemert/keymap.c create mode 100644 keyboards/ergodox_ez/keymaps/nathanvercaemert/readme.md create mode 100644 keyboards/ergodox_ez/keymaps/nathanvercaemert/rules.mk diff --git a/keyboards/ergodox_ez/keymaps/nathanvercaemert/config.h b/keyboards/ergodox_ez/keymaps/nathanvercaemert/config.h new file mode 100644 index 000000000000..6d69b0011260 --- /dev/null +++ b/keyboards/ergodox_ez/keymaps/nathanvercaemert/config.h @@ -0,0 +1,29 @@ +/* + 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 +*/ +#define ORYX_CONFIGURATOR +#undef TAPPING_TERM +#define TAPPING_TERM 175 + +#undef MOUSEKEY_DELAY +#define MOUSEKEY_DELAY 20 + +#undef MOUSEKEY_MAX_SPEED +#define MOUSEKEY_MAX_SPEED 14 + +#undef MOUSEKEY_TIME_TO_MAX +#define MOUSEKEY_TIME_TO_MAX 30 + +#undef MOUSEKEY_WHEEL_INTERVAL +#define MOUSEKEY_WHEEL_INTERVAL 50 + +// /* Temporarily defining a tapping term that is ridiculous to see if i can tell if lt is working. */ +// #undef TAPPING_TERM +// #define TAPPING_TERM 499 + +/* Turning permissive hold and ignore mod tap interrupt off in order to test the tapping term. */ +#undef PERMISSIVE_HOLD +#define PERMISSIVE_HOLD +#undef IGNORE_MOD_TAP_INTERRUPT +#define IGNORE_MOD_TAP_INTERRUPT diff --git a/keyboards/ergodox_ez/keymaps/nathanvercaemert/keymap.c b/keyboards/ergodox_ez/keymaps/nathanvercaemert/keymap.c new file mode 100644 index 000000000000..c2960cfa16e8 --- /dev/null +++ b/keyboards/ergodox_ez/keymaps/nathanvercaemert/keymap.c @@ -0,0 +1,351 @@ +#include QMK_KEYBOARD_H +#include "version.h" +#include "keymap_german.h" +#include "keymap_nordic.h" +#include "keymap_french.h" +#include "keymap_spanish.h" +#include "keymap_hungarian.h" +#include "keymap_swedish.h" +#include "keymap_br_abnt2.h" +#include "keymap_canadian_multilingual.h" +#include "keymap_german_ch.h" +#include "keymap_jp.h" +#include "keymap_bepo.h" + +#define KC_MAC_UNDO LGUI(KC_Z) +#define KC_MAC_CUT LGUI(KC_X) +#define KC_MAC_COPY LGUI(KC_C) +#define KC_MAC_PASTE LGUI(KC_V) +#define KC_PC_UNDO LCTL(KC_Z) +#define KC_PC_CUT LCTL(KC_X) +#define KC_PC_COPY LCTL(KC_C) +#define KC_PC_PASTE LCTL(KC_V) +#define ES_LESS_MAC KC_GRAVE +#define ES_GRTR_MAC LSFT(KC_GRAVE) +#define ES_BSLS_MAC ALGR(KC_6) +#define NO_PIPE_ALT KC_GRAVE +#define NO_BSLS_ALT KC_EQUAL + +enum custom_keycodes { + RGB_SLD = EZ_SAFE_RANGE, +}; + +// tapdance keycodes +enum td_keycodes { + CTRL_TO12, + SHIFT_TO13, + ALT_TO11 +}; + +// define a type containing as many tapdance states as you need +typedef enum { + SINGLE_TAP, + SINGLE_HOLD, +} td_state_t; + +// create a global instance of the tapdance state type +static td_state_t td_state; + +// declare your tapdance functions: + +// function to determine the current tapdance state +int cur_dance (qk_tap_dance_state_t *state); + +// `finished` and `reset` functions for each tapdance keycode +void ctrlto12_finished (qk_tap_dance_state_t *state, void *user_data); +void ctrlto12_reset (qk_tap_dance_state_t *state, void *user_data); +void altto11_finished (qk_tap_dance_state_t *state, void *user_data); +void altto11_reset (qk_tap_dance_state_t *state, void *user_data); +void shiftto13_finished (qk_tap_dance_state_t *state, void *user_data); +void shiftto13_reset (qk_tap_dance_state_t *state, void *user_data); + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_ergodox_pretty( + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_INSERT, KC_Q, LGUI_T(KC_W), MT(MOD_HYPR, KC_E),LT(5,KC_R), KC_T, KC_NO, KC_NO, KC_Y, LT(6,KC_U), MT(MOD_HYPR, KC_I),RGUI_T(KC_O), KC_P, KC_PSCREEN, + KC_ESCAPE, LSFT_T(KC_A), LCTL_T(KC_S), LALT_T(KC_D), LT(1,KC_F), KC_G, KC_H, LT(2,KC_J), RALT_T(KC_K), RCTL_T(KC_L), RSFT_T(KC_SCOLON),KC_CAPSLOCK, + KC_HOME, LT(9,KC_Z), MT(MOD_LGUI | MOD_LCTL,KC_X), LT(7,KC_C), LT(3,KC_V), KC_B, KC_NO, KC_NO, KC_N, LT(4,KC_M), LT(8,KC_COMMA), MT(MOD_RGUI | MOD_RCTL, KC_DOT), KC_QUOTE, KC_END, + KC_NO, KC_NO, KC_NO, KC_NO, KC_DELETE, KC_TAB, KC_NO, KC_NO, KC_NO, KC_NO, + KC_NO, KC_NO, KC_NO, KC_NO, + KC_NO, KC_NO, + TO(10), KC_BSPACE, KC_NO, KC_NO, KC_ENTER, KC_SPACE + ), + [1] = LAYOUT_ergodox_pretty( + 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_NO, KC_LGUI, KC_HYPR, KC_NO, KC_NO, KC_TRANSPARENT, KC_TRANSPARENT, KC_NO, KC_7, KC_8, KC_9, KC_NO, KC_TRANSPARENT, + KC_TRANSPARENT, KC_LSHIFT, KC_LCTRL, KC_LALT, KC_TRANSPARENT, KC_NO, KC_NO, KC_4, KC_5, KC_6, KC_0, KC_TRANSPARENT, + KC_TRANSPARENT, KC_NO, MT(MOD_LGUI | MOD_LCTL,KC_NO), KC_NO, KC_NO, KC_NO, KC_TRANSPARENT, KC_TRANSPARENT, KC_NO, KC_1, KC_2, KC_3, KC_NO, 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 + ), + [2] = LAYOUT_ergodox_pretty( + 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_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_TRANSPARENT, KC_TRANSPARENT, KC_NO, KC_NO, KC_HYPR, KC_RGUI, KC_NO, KC_TRANSPARENT, + KC_TRANSPARENT, KC_LPRN, KC_RPRN, KC_ASTR, KC_SLASH, KC_NO, KC_NO, KC_TRANSPARENT, KC_RALT, KC_RCTRL, KC_RSHIFT, KC_TRANSPARENT, + KC_TRANSPARENT, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_TRANSPARENT, KC_TRANSPARENT, KC_NO, KC_NO, KC_NO, MT(MOD_RGUI | MOD_RCTL, KC_NO), KC_NO, 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 + ), + [3] = LAYOUT_ergodox_pretty( + 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_NO, KC_LGUI, KC_HYPR, KC_NO, KC_NO, KC_TRANSPARENT, KC_TRANSPARENT, KC_NO, KC_F9, KC_F10, KC_F11, KC_F12, KC_TRANSPARENT, + KC_TRANSPARENT, KC_LSHIFT, KC_LCTRL, KC_LALT, KC_NO, KC_NO, KC_NO, KC_F5, KC_F6, KC_F7, KC_F8, KC_TRANSPARENT, + KC_TRANSPARENT, KC_NO, MT(MOD_LGUI | MOD_LCTL,KC_NO), KC_NO, KC_TRANSPARENT, KC_NO, KC_TRANSPARENT, KC_TRANSPARENT, KC_NO, KC_F1, KC_F2, KC_F3, KC_F4, 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 + ), + [4] = LAYOUT_ergodox_pretty( + 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_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_TRANSPARENT, KC_TRANSPARENT, KC_NO, KC_NO, KC_HYPR, KC_RGUI, KC_NO, KC_TRANSPARENT, + KC_TRANSPARENT, KC_LBRACKET, KC_RBRACKET, KC_QUES, KC_EXLM, KC_NO, KC_NO, KC_NO, KC_RALT, KC_RCTRL, KC_RSHIFT, KC_TRANSPARENT, + KC_TRANSPARENT, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_TRANSPARENT, KC_TRANSPARENT, KC_NO, KC_TRANSPARENT, KC_NO, MT(MOD_RGUI | MOD_RCTL, KC_NO), KC_NO, 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 + ), + [5] = LAYOUT_ergodox_pretty( + 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_NO, KC_LGUI, KC_HYPR, KC_TRANSPARENT, KC_NO, KC_TRANSPARENT, KC_TRANSPARENT, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_TRANSPARENT, + KC_TRANSPARENT, KC_LSHIFT, KC_LCTRL, KC_LALT, KC_NO, KC_NO, KC_NO, KC_HASH, KC_BSLASH, KC_GRAVE, KC_TILD, KC_TRANSPARENT, + KC_TRANSPARENT, KC_NO, MT(MOD_LGUI | MOD_LCTL,KC_NO), KC_NO, KC_NO, KC_NO, KC_TRANSPARENT, KC_TRANSPARENT, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, 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 + ), + [6] = LAYOUT_ergodox_pretty( + 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_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_TRANSPARENT, KC_TRANSPARENT, KC_NO, KC_TRANSPARENT, KC_HYPR, KC_RGUI, KC_NO, KC_TRANSPARENT, + KC_TRANSPARENT, KC_UNDS, KC_EQUAL, KC_MINUS, KC_PLUS, KC_NO, KC_NO, KC_NO, KC_RALT, KC_RCTRL, KC_RSHIFT, KC_TRANSPARENT, + KC_TRANSPARENT, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_TRANSPARENT, KC_TRANSPARENT, KC_NO, KC_NO, KC_NO, MT(MOD_RGUI | MOD_RCTL, KC_NO), KC_NO, 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 + ), + [7] = LAYOUT_ergodox_pretty( + 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_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_TRANSPARENT, KC_TRANSPARENT, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_TRANSPARENT, + KC_TRANSPARENT, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_AT, KC_DLR, KC_PERC, KC_CIRC, KC_TRANSPARENT, + KC_TRANSPARENT, KC_NO, KC_NO, KC_TRANSPARENT, KC_NO, KC_NO, KC_TRANSPARENT, KC_TRANSPARENT, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, 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 + ), + [8] = LAYOUT_ergodox_pretty( + 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_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_TRANSPARENT, KC_TRANSPARENT, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_TRANSPARENT, + KC_TRANSPARENT, KC_LCBR, KC_RCBR, KC_AMPR, KC_PIPE, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_TRANSPARENT, + KC_TRANSPARENT, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_TRANSPARENT, KC_TRANSPARENT, KC_NO, KC_NO, KC_TRANSPARENT, KC_NO, KC_NO, 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 + ), + [9] = LAYOUT_ergodox_pretty( + 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_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_TRANSPARENT, KC_TRANSPARENT, KC_NO, KC_NO, KC_AUDIO_VOL_UP,KC_NO, KC_NO, KC_TRANSPARENT, + KC_TRANSPARENT, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_MEDIA_PREV_TRACK,KC_AUDIO_VOL_DOWN,KC_MEDIA_NEXT_TRACK,KC_MEDIA_PLAY_PAUSE,KC_TRANSPARENT, + KC_TRANSPARENT, KC_TRANSPARENT, KC_NO, KC_NO, KC_NO, KC_NO, KC_TRANSPARENT, KC_TRANSPARENT, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, 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 + ), + [10] = LAYOUT_ergodox_pretty( + 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_NO, KC_LGUI, KC_MS_BTN2, KC_NO, KC_NO, KC_TRANSPARENT, MT(MOD_RCTL, KC_A), KC_NO, KC_NO, KC_MS_UP, KC_NO, KC_NO, KC_TRANSPARENT, + KC_TRANSPARENT, TD(SHIFT_TO13), TD(CTRL_TO12), TD(ALT_TO11), KC_MS_BTN1, KC_NO, KC_NO, KC_MS_LEFT, KC_MS_DOWN, KC_MS_RIGHT, KC_NO, KC_TRANSPARENT, + KC_TRANSPARENT, KC_NO, MT(MOD_LGUI | MOD_LCTL,KC_NO), KC_NO, KC_NO, KC_NO, KC_TRANSPARENT, KC_TRANSPARENT, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, 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, TO(0) + ), + [11] = LAYOUT_ergodox_pretty( + 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_NO, KC_LGUI, KC_HYPR, KC_NO, KC_NO, KC_TRANSPARENT, KC_TRANSPARENT, KC_NO, KC_NO, KC_UP, KC_NO, KC_NO, KC_TRANSPARENT, + KC_TRANSPARENT, KC_LSHIFT, KC_LCTRL, KC_LALT, KC_NO, KC_NO, KC_NO, KC_LEFT, KC_DOWN, KC_RIGHT, KC_NO, KC_TRANSPARENT, + KC_TRANSPARENT, KC_NO, MT(MOD_LGUI | MOD_LCTL,KC_NO), KC_NO, KC_NO, KC_NO, KC_TRANSPARENT, KC_TRANSPARENT, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, 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, TO(0) + ), + [12] = LAYOUT_ergodox_pretty( + 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_NO, KC_LGUI, KC_HYPR, KC_NO, KC_NO, KC_TRANSPARENT, KC_TRANSPARENT, KC_NO, KC_NO, KC_MS_WH_UP, KC_NO, KC_NO, KC_TRANSPARENT, + KC_TRANSPARENT, KC_LSHIFT, KC_LCTRL, KC_LALT, KC_NO, KC_NO, KC_NO, KC_MS_WH_LEFT, KC_MS_WH_DOWN, KC_MS_WH_RIGHT, KC_NO, KC_TRANSPARENT, + KC_TRANSPARENT, KC_NO, MT(MOD_LGUI | MOD_LCTL,KC_NO), KC_NO, KC_NO, KC_NO, KC_TRANSPARENT, KC_TRANSPARENT, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, 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, TO(0) + ), + [13] = LAYOUT_ergodox_pretty( + 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_NO, KC_LGUI, KC_HYPR, KC_NO, KC_NO, KC_TRANSPARENT, KC_TRANSPARENT, KC_NO, KC_NO, KC_PGUP, KC_NO, KC_NO, KC_TRANSPARENT, + KC_TRANSPARENT, KC_LSHIFT, KC_LCTRL, KC_LALT, KC_NO, KC_NO, KC_NO, KC_NO, KC_PGDOWN, KC_NO, KC_NO, KC_TRANSPARENT, + KC_TRANSPARENT, KC_NO, MT(MOD_LGUI | MOD_LCTL,KC_NO), KC_NO, KC_NO, KC_NO, KC_TRANSPARENT, KC_TRANSPARENT, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, 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, TO(0) + ), +}; + + +/* Commenting out for debug purposes */ +// bool process_record_user(uint16_t keycode, keyrecord_t *record) { +// switch (keycode) { +// } +// return true; +// } + +uint32_t layer_state_set_user(uint32_t state) { + uint8_t layer = biton32(state); + ergodox_board_led_off(); + ergodox_right_led_1_off(); + ergodox_right_led_2_off(); + ergodox_right_led_3_off(); + switch (layer) { + case 1: + ergodox_right_led_1_on(); + break; + case 2: + ergodox_right_led_2_on(); + break; + case 3: + ergodox_right_led_3_on(); + break; + case 4: + ergodox_right_led_1_on(); + ergodox_right_led_2_on(); + break; + case 5: + ergodox_right_led_1_on(); + ergodox_right_led_3_on(); + break; + case 6: + ergodox_right_led_2_on(); + ergodox_right_led_3_on(); + break; + case 7: + ergodox_right_led_1_on(); + ergodox_right_led_2_on(); + ergodox_right_led_3_on(); + break; + default: + break; + } + return state; +}; + +// determine the tapdance state to return +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; } + } + else { return 2; } // any number higher than the maximum state value you return above +} + +void ctrlto12_finished (qk_tap_dance_state_t *state, void *user_data) { + td_state = cur_dance(state); + switch (td_state) { + case SINGLE_TAP: + layer_on(12); + break; + case SINGLE_HOLD: + register_mods(MOD_BIT(KC_LCTRL)); // for a layer-tap key, use `layer_on(_MY_LAYER)` here + break; + } +} + +void ctrlto12_reset (qk_tap_dance_state_t *state, void *user_data) { + switch (td_state) { + case SINGLE_TAP: + break; + case SINGLE_HOLD: + unregister_mods(MOD_BIT(KC_LCTRL)); // for a layer-tap key, use `layer_off(_MY_LAYER)` here + break; + } +} + +void shiftto13_finished (qk_tap_dance_state_t *state, void *user_data) { + td_state = cur_dance(state); + switch (td_state) { + case SINGLE_TAP: + layer_on(13); + break; + case SINGLE_HOLD: + register_mods(MOD_BIT(KC_LSHIFT)); // for a layer-tap key, use `layer_on(_MY_LAYER)` here + break; + } +} + +void shiftto13_reset (qk_tap_dance_state_t *state, void *user_data) { + switch (td_state) { + case SINGLE_TAP: + break; + case SINGLE_HOLD: + unregister_mods(MOD_BIT(KC_LSHIFT)); // for a layer-tap key, use `layer_off(_MY_LAYER)` here + break; + } +} + +void altto11_finished (qk_tap_dance_state_t *state, void *user_data) { + td_state = cur_dance(state); + switch (td_state) { + case SINGLE_TAP: + layer_on(11); + break; + case SINGLE_HOLD: + register_mods(MOD_BIT(KC_LALT)); // for a layer-tap key, use `layer_on(_MY_LAYER)` here + break; + } +} + +void altto11_reset (qk_tap_dance_state_t *state, void *user_data) { + switch (td_state) { + case SINGLE_TAP: + break; + case SINGLE_HOLD: + unregister_mods(MOD_BIT(KC_LALT)); // for a layer-tap key, use `layer_off(_MY_LAYER)` here + break; + } +} + +// define `ACTION_TAP_DANCE_FN_ADVANCED()` for each tapdance keycode, passing in `finished` and `reset` functions +qk_tap_dance_action_t tap_dance_actions[] = { + [CTRL_TO12] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, ctrlto12_finished, ctrlto12_reset), + [SHIFT_TO13] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, shiftto13_finished, shiftto13_reset), + [ALT_TO11] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, altto11_finished, altto11_reset) +}; + +/* Debugging functions */ + +void keyboard_post_init_user(void) { + // Customise these values to desired behaviour +// debug_enable=true; +// debug_matrix=true; +// debug_keyboard=true; +// debug_mouse=true; +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + // If console is enabled, it will print the matrix position and status of each key pressed +// #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 + return true; +} + diff --git a/keyboards/ergodox_ez/keymaps/nathanvercaemert/readme.md b/keyboards/ergodox_ez/keymaps/nathanvercaemert/readme.md new file mode 100644 index 000000000000..5570d9881c87 --- /dev/null +++ b/keyboards/ergodox_ez/keymaps/nathanvercaemert/readme.md @@ -0,0 +1,26 @@ +# The nathanvercaemert ErgoDox EZ configuration + +Centered around the home row and the use of mouse keys, this configuration focuses +on minimal finger movement. No key is more than one unit away from a finger on the home row. + +## Layers + +* Base Layer + * The two main thumb keys provide a loop to the mouse key layer. Pressing the left followed by the right always guarantees that you are on the base layer. + * There are a lot of dual function keys on the base layer. + * The layout of the letters is qwerty. + * Pinkys, ring fingers, and middle fingers apply dual function modifiers (along with the keys above and below the ring fingers.) +* Numbers, Symbols, and Function Keys. + * From the base layer, many keys are dual function layer switches. + * The switch on one hand changes the home row of the other hand to a row of symbols in most cases. + * The left index finger, and the key below it, change the right hand to the numbers and function keys + respectfully. +* Mouse Layer + * Clicking the main left thumb key navigates to the mouse layer (10.) Some dual function keys (technically tap dance functions) allow the left hand to apply modifiers to mouse clicks while tapping switches to + navigation layers. +* Navigation Layers + * From the Mouse Layer, taps to the left home row navigate to scroll keys, arrow keys, and page keys. + +Here is the image of my keymap: + +![Default](https://i.imgur.com/kXywQIq.png) \ No newline at end of file diff --git a/keyboards/ergodox_ez/keymaps/nathanvercaemert/rules.mk b/keyboards/ergodox_ez/keymaps/nathanvercaemert/rules.mk new file mode 100644 index 000000000000..b41c275dd135 --- /dev/null +++ b/keyboards/ergodox_ez/keymaps/nathanvercaemert/rules.mk @@ -0,0 +1,10 @@ +# Set any rules.mk overrides for your specific keymap here. +# See rules at https://docs.qmk.fm/#/config_options?id=the-rulesmk-file +LINK_TIME_OPTIMIZATION_ENABLE = yes +COMMAND_ENABLE = no +RGBLIGHT_ENABLE = no +TAP_DANCE_ENABLE=yes + + +#Beginning debugging process for LT() and permissive hold +CONSOLE_ENABLE = yes From 751316c34465ea77e066c3052729b207f3d62e0c Mon Sep 17 00:00:00 2001 From: Zach White Date: Tue, 26 May 2020 13:05:41 -0700 Subject: [PATCH 048/930] [CLI] Add a subcommand for getting information about a keyboard (#8666) You can now use `qmk info` to get information about keyboards and keymaps. Co-authored-by: Erovia --- docs/cli_commands.md | 37 +++- lib/python/qmk/c_parse.py | 161 ++++++++++++++ lib/python/qmk/cli/__init__.py | 1 + lib/python/qmk/cli/cformat.py | 10 +- lib/python/qmk/cli/info.py | 141 ++++++++++++ lib/python/qmk/cli/list/keymaps.py | 18 +- lib/python/qmk/commands.py | 1 + lib/python/qmk/comment_remover.py | 20 ++ lib/python/qmk/constants.py | 6 + lib/python/qmk/decorators.py | 9 +- lib/python/qmk/info.py | 249 ++++++++++++++++++++++ lib/python/qmk/keyboard.py | 111 ++++++++++ lib/python/qmk/keymap.py | 75 +++++-- lib/python/qmk/makefile.py | 32 --- lib/python/qmk/math.py | 33 +++ lib/python/qmk/path.py | 26 +-- lib/python/qmk/tests/test_cli_commands.py | 104 +++++++-- 17 files changed, 921 insertions(+), 113 deletions(-) create mode 100644 lib/python/qmk/c_parse.py create mode 100755 lib/python/qmk/cli/info.py create mode 100644 lib/python/qmk/comment_remover.py create mode 100644 lib/python/qmk/info.py create mode 100644 lib/python/qmk/keyboard.py create mode 100644 lib/python/qmk/math.py diff --git a/docs/cli_commands.md b/docs/cli_commands.md index eff5321bdb15..bb0de3c0db53 100644 --- a/docs/cli_commands.md +++ b/docs/cli_commands.md @@ -6,6 +6,8 @@ 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. +This command is directory aware. It will automatically fill in KEYBOARD and/or KEYMAP if you are in a keyboard or keymap directory. + **Usage for Configurator Exports**: ``` @@ -73,8 +75,9 @@ $ qmk compile -kb dz60 ## `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. -To specify a different bootloader, use `-bl `. Visit the [Flashing Firmware](flashing.md) guide for more details of the available bootloaders. +This command is similar to `qmk compile`, but can also target a bootloader. The bootloader is optional, and is set to `:flash` by default. To specify a different bootloader, use `-bl `. Visit the [Flashing Firmware](flashing.md) guide for more details of the available bootloaders. + +This command is directory aware. It will automatically fill in KEYBOARD and/or KEYMAP if you are in a keyboard or keymap directory. **Usage for Configurator Exports**: @@ -128,6 +131,32 @@ Check your environment and report problems only: qmk doctor -n +## `qmk info` + +Displays information about keyboards and keymaps in QMK. You can use this to get information about a keyboard, show the layouts, display the underlying key matrix, or to pretty-print JSON keymaps. + +**Usage**: + +``` +qmk info [-f FORMAT] [-m] [-l] [-km KEYMAP] [-kb KEYBOARD] +``` + +This command is directory aware. It will automatically fill in KEYBOARD and/or KEYMAP if you are in a keyboard or keymap directory. + +**Examples**: + +Show basic information for a keyboard: + + qmk info -kb planck/rev5 + +Show the matrix for a keyboard: + + qmk info -kb ergodox_ez -m + +Show a JSON keymap for a keyboard: + + qmk info -kb clueboard/california -km default + ## `qmk json2c` Creates a keymap.c from a QMK Configurator export. @@ -152,6 +181,8 @@ qmk list-keyboards This command lists all the keymaps for a specified keyboard (and revision). +This command is directory aware. It will automatically fill in KEYBOARD if you are in a keyboard directory. + **Usage**: ``` @@ -162,6 +193,8 @@ qmk list-keymaps -kb planck/ez This command creates a new keymap based on a keyboard's existing default keymap. +This command is directory aware. It will automatically fill in KEYBOARD and/or KEYMAP if you are in a keyboard or keymap directory. + **Usage**: ``` diff --git a/lib/python/qmk/c_parse.py b/lib/python/qmk/c_parse.py new file mode 100644 index 000000000000..e41e271a4355 --- /dev/null +++ b/lib/python/qmk/c_parse.py @@ -0,0 +1,161 @@ +"""Functions for working with config.h files. +""" +from pathlib import Path + +from milc import cli + +from qmk.comment_remover import comment_remover + +default_key_entry = {'x': -1, 'y': 0, 'w': 1} + + +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 to `qmk_firmware`. + """ + files = [] + for dir in dir_names: + files.extend(file for file in Path(dir).glob('**/*') if file.suffix in ['.c', '.h', '.cpp']) + return files + + +def find_layouts(file): + """Returns list of parsed LAYOUT preprocessor macros found in the supplied include file. + """ + file = Path(file) + aliases = {} # Populated with all `#define`s that aren't functions + parsed_layouts = {} + + # Search the file for LAYOUT macros and aliases + file_contents = file.read_text() + file_contents = comment_remover(file_contents) + file_contents = file_contents.replace('\\\n', '') + + for line in file_contents.split('\n'): + if line.startswith('#define') and '(' in line and 'LAYOUT' in line: + # We've found a LAYOUT macro + macro_name, layout, matrix = _parse_layout_macro(line.strip()) + + # Reject bad macro names + if macro_name.startswith('LAYOUT_kc') or not macro_name.startswith('LAYOUT'): + continue + + # Parse the matrix data + matrix_locations = _parse_matrix_locations(matrix, file, macro_name) + + # Parse the layout entries into a basic structure + default_key_entry['x'] = -1 # Set to -1 so _default_key(key) will increment it to 0 + layout = layout.strip() + parsed_layout = [_default_key(key) for key in layout.split(',')] + + for key in parsed_layout: + key['matrix'] = matrix_locations.get(key['label']) + + parsed_layouts[macro_name] = { + 'key_count': len(parsed_layout), + 'layout': parsed_layout, + 'filename': str(file), + } + + elif '#define' in line: + # Attempt to extract a new layout alias + try: + _, pp_macro_name, pp_macro_text = line.strip().split(' ', 2) + aliases[pp_macro_name] = pp_macro_text + except ValueError: + continue + + # Populate our aliases + for alias, text in aliases.items(): + if text in parsed_layouts and 'KEYMAP' not in alias: + parsed_layouts[alias] = parsed_layouts[text] + + return parsed_layouts + + +def parse_config_h_file(config_h_file, config_h=None): + """Extract defines from a config.h file. + """ + if not config_h: + config_h = {} + + config_h_file = Path(config_h_file) + + if config_h_file.exists(): + config_h_text = config_h_file.read_text() + config_h_text = config_h_text.replace('\\\n', '') + + for linenum, line in enumerate(config_h_text.split('\n')): + line = line.strip() + + if '//' in line: + line = line[:line.index('//')].strip() + + if not line: + continue + + line = line.split() + + if line[0] == '#define': + if len(line) == 1: + cli.log.error('%s: Incomplete #define! On or around line %s' % (config_h_file, linenum)) + elif len(line) == 2: + config_h[line[1]] = True + else: + config_h[line[1]] = ' '.join(line[2:]) + + elif line[0] == '#undef': + if len(line) == 2: + if line[1] in config_h: + if config_h[line[1]] is True: + del config_h[line[1]] + else: + config_h[line[1]] = False + else: + cli.log.error('%s: Incomplete #undef! On or around line %s' % (config_h_file, linenum)) + + return config_h + + +def _default_key(label=None): + """Increment x and return a copy of the default_key_entry. + """ + default_key_entry['x'] += 1 + new_key = default_key_entry.copy() + + if label: + new_key['label'] = label + + return new_key + + +def _parse_layout_macro(layout_macro): + """Split the LAYOUT macro into its constituent parts + """ + layout_macro = layout_macro.replace('\\', '').replace(' ', '').replace('\t', '').replace('#define', '') + macro_name, layout = layout_macro.split('(', 1) + layout, matrix = layout.split(')', 1) + + return macro_name, layout, matrix + + +def _parse_matrix_locations(matrix, file, macro_name): + """Parse raw matrix data into a dictionary keyed by the LAYOUT identifier. + """ + matrix_locations = {} + + for row_num, row in enumerate(matrix.split('},{')): + if row.startswith('LAYOUT'): + cli.log.error('%s: %s: Nested layout macro detected. Matrix data not available!', file, macro_name) + break + + row = row.replace('{', '').replace('}', '') + for col_num, identifier in enumerate(row.split(',')): + if identifier != 'KC_NO': + matrix_locations[identifier] = (row_num, col_num) + + return matrix_locations diff --git a/lib/python/qmk/cli/__init__.py b/lib/python/qmk/cli/__init__.py index 394a1353bc4e..47f60c601b12 100644 --- a/lib/python/qmk/cli/__init__.py +++ b/lib/python/qmk/cli/__init__.py @@ -13,6 +13,7 @@ from . import doctor from . import flash from . import hello +from . import info from . import json from . import json2c from . import list diff --git a/lib/python/qmk/cli/cformat.py b/lib/python/qmk/cli/cformat.py index 0cd8b6192a00..600161c5c53c 100644 --- a/lib/python/qmk/cli/cformat.py +++ b/lib/python/qmk/cli/cformat.py @@ -4,7 +4,9 @@ from shutil import which from milc import cli -import qmk.path + +from qmk.path import normpath +from qmk.c_parse import c_source_files def cformat_run(files, all_files): @@ -45,10 +47,10 @@ def cformat(cli): 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) + files.extend(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) + all_files = 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 @@ -56,7 +58,7 @@ def cformat(cli): 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)] + filtered_files = [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 diff --git a/lib/python/qmk/cli/info.py b/lib/python/qmk/cli/info.py new file mode 100755 index 000000000000..6977673e2983 --- /dev/null +++ b/lib/python/qmk/cli/info.py @@ -0,0 +1,141 @@ +"""Keyboard information script. + +Compile an info.json for a particular keyboard and pretty-print it. +""" +import json + +from milc import cli + +from qmk.decorators import automagic_keyboard, automagic_keymap +from qmk.keyboard import render_layouts, render_layout +from qmk.keymap import locate_keymap +from qmk.info import info_json +from qmk.path import is_keyboard + +ROW_LETTERS = '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnop' +COL_LETTERS = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijilmnopqrstuvwxyz' + + +def show_keymap(info_json, title_caps=True): + """Render the keymap in ascii art. + """ + keymap_path = locate_keymap(cli.config.info.keyboard, cli.config.info.keymap) + + if keymap_path and keymap_path.suffix == '.json': + if title_caps: + cli.echo('{fg_blue}Keymap "%s"{fg_reset}:', cli.config.info.keymap) + else: + cli.echo('{fg_blue}keymap_%s{fg_reset}:', cli.config.info.keymap) + + keymap_data = json.load(keymap_path.open()) + layout_name = keymap_data['layout'] + + for layer_num, layer in enumerate(keymap_data['layers']): + if title_caps: + cli.echo('{fg_cyan}Layer %s{fg_reset}:', layer_num) + else: + cli.echo('{fg_cyan}layer_%s{fg_reset}:', layer_num) + + print(render_layout(info_json['layouts'][layout_name]['layout'], layer)) + + +def show_layouts(kb_info_json, title_caps=True): + """Render the layouts with info.json labels. + """ + for layout_name, layout_art in render_layouts(kb_info_json).items(): + title = layout_name.title() if title_caps else layout_name + cli.echo('{fg_cyan}%s{fg_reset}:', title) + print(layout_art) # Avoid passing dirty data to cli.echo() + + +def show_matrix(info_json, title_caps=True): + """Render the layout with matrix labels in ascii art. + """ + for layout_name, layout in info_json['layouts'].items(): + # Build our label list + labels = [] + for key in layout['layout']: + if key['matrix']: + row = ROW_LETTERS[key['matrix'][0]] + col = COL_LETTERS[key['matrix'][1]] + + labels.append(row + col) + else: + labels.append('') + + # Print the header + if title_caps: + cli.echo('{fg_blue}Matrix for "%s"{fg_reset}:', layout_name) + else: + cli.echo('{fg_blue}matrix_%s{fg_reset}:', layout_name) + + print(render_layout(info_json['layouts'][layout_name]['layout'], labels)) + + +@cli.argument('-kb', '--keyboard', help='Keyboard to show info for.') +@cli.argument('-km', '--keymap', help='Show the layers for a JSON keymap too.') +@cli.argument('-l', '--layouts', action='store_true', help='Render the layouts.') +@cli.argument('-m', '--matrix', action='store_true', help='Render the layouts with matrix information.') +@cli.argument('-f', '--format', default='friendly', arg_only=True, help='Format to display the data in (friendly, text, json) (Default: friendly).') +@cli.subcommand('Keyboard information.') +@automagic_keyboard +@automagic_keymap +def info(cli): + """Compile an info.json for a particular keyboard and pretty-print it. + """ + # Determine our keyboard(s) + if not is_keyboard(cli.config.info.keyboard): + cli.log.error('Invalid keyboard: %s!', cli.config.info.keyboard) + exit(1) + + # Build the info.json file + kb_info_json = info_json(cli.config.info.keyboard) + + # Output in the requested format + if cli.args.format == 'json': + print(json.dumps(kb_info_json)) + exit() + + if cli.args.format == 'text': + for key in sorted(kb_info_json): + if key == 'layouts': + cli.echo('{fg_blue}layouts{fg_reset}: %s', ', '.join(sorted(kb_info_json['layouts'].keys()))) + else: + cli.echo('{fg_blue}%s{fg_reset}: %s', key, kb_info_json[key]) + + if cli.config.info.layouts: + show_layouts(kb_info_json, False) + + if cli.config.info.matrix: + show_matrix(kb_info_json, False) + + if cli.config_source.info.keymap and cli.config_source.info.keymap != 'config_file': + show_keymap(kb_info_json, False) + + elif cli.args.format == 'friendly': + cli.echo('{fg_blue}Keyboard Name{fg_reset}: %s', kb_info_json.get('keyboard_name', 'Unknown')) + cli.echo('{fg_blue}Manufacturer{fg_reset}: %s', kb_info_json.get('manufacturer', 'Unknown')) + if 'url' in kb_info_json: + cli.echo('{fg_blue}Website{fg_reset}: %s', kb_info_json['url']) + if kb_info_json.get('maintainer') == 'qmk': + cli.echo('{fg_blue}Maintainer{fg_reset}: QMK Community') + else: + cli.echo('{fg_blue}Maintainer{fg_reset}: %s', kb_info_json.get('maintainer', 'qmk')) + cli.echo('{fg_blue}Keyboard Folder{fg_reset}: %s', kb_info_json.get('keyboard_folder', 'Unknown')) + cli.echo('{fg_blue}Layouts{fg_reset}: %s', ', '.join(sorted(kb_info_json['layouts'].keys()))) + if 'width' in kb_info_json and 'height' in kb_info_json: + cli.echo('{fg_blue}Size{fg_reset}: %s x %s' % (kb_info_json['width'], kb_info_json['height'])) + cli.echo('{fg_blue}Processor{fg_reset}: %s', kb_info_json.get('processor', 'Unknown')) + cli.echo('{fg_blue}Bootloader{fg_reset}: %s', kb_info_json.get('bootloader', 'Unknown')) + + if cli.config.info.layouts: + show_layouts(kb_info_json, True) + + if cli.config.info.matrix: + show_matrix(kb_info_json, True) + + if cli.config_source.info.keymap and cli.config_source.info.keymap != 'config_file': + show_keymap(kb_info_json, True) + + else: + cli.log.error('Unknown format: %s', cli.args.format) diff --git a/lib/python/qmk/cli/list/keymaps.py b/lib/python/qmk/cli/list/keymaps.py index cec9ca0224e9..b18289eb3516 100644 --- a/lib/python/qmk/cli/list/keymaps.py +++ b/lib/python/qmk/cli/list/keymaps.py @@ -4,7 +4,7 @@ import qmk.keymap from qmk.decorators import automagic_keyboard -from qmk.errors import NoSuchKeyboardError +from qmk.path import is_keyboard @cli.argument("-kb", "--keyboard", help="Specify keyboard name. Example: 1upkeyboards/1up60hse") @@ -13,13 +13,9 @@ def list_keymaps(cli): """List the keymaps for a specific keyboard """ - 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', 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?") + if not is_keyboard(cli.config.list_keymaps.keyboard): + cli.log.error('Keyboard %s does not exist!', cli.config.list_keymaps.keyboard) + exit(1) + + for name in qmk.keymap.list_keymaps(cli.config.list_keymaps.keyboard): + print(name) diff --git a/lib/python/qmk/commands.py b/lib/python/qmk/commands.py index 5d2a03c9a8aa..5a6e60988ade 100644 --- a/lib/python/qmk/commands.py +++ b/lib/python/qmk/commands.py @@ -64,6 +64,7 @@ def compile_configurator_json(user_keymap, bootloader=None): def parse_configurator_json(configurator_file): """Open and parse a configurator json export """ + # FIXME(skullydazed/anyone): Add validation here user_keymap = json.load(configurator_file) return user_keymap diff --git a/lib/python/qmk/comment_remover.py b/lib/python/qmk/comment_remover.py new file mode 100644 index 000000000000..45a25257f8f5 --- /dev/null +++ b/lib/python/qmk/comment_remover.py @@ -0,0 +1,20 @@ +"""Removes C/C++ style comments from text. + +Gratefully adapted from https://stackoverflow.com/a/241506 +""" +import re + +comment_pattern = re.compile(r'//.*?$|/\*.*?\*/|\'(?:\\.|[^\\\'])*\'|"(?:\\.|[^\\"])*"', re.DOTALL | re.MULTILINE) + + +def _comment_stripper(match): + """Removes C/C++ style comments from a regex match. + """ + s = match.group(0) + return ' ' if s.startswith('/') else s + + +def comment_remover(text): + """Remove C/C++ style comments from text. + """ + return re.sub(comment_pattern, _comment_stripper, text) diff --git a/lib/python/qmk/constants.py b/lib/python/qmk/constants.py index 3e4709969da1..f0d56c4430de 100644 --- a/lib/python/qmk/constants.py +++ b/lib/python/qmk/constants.py @@ -7,3 +7,9 @@ # 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 + +# Supported processor types +ARM_PROCESSORS = 'cortex-m0', 'cortex-m0plus', 'cortex-m3', 'cortex-m4', 'MKL26Z64', 'MK20DX128', 'MK20DX256', 'STM32F042', 'STM32F072', 'STM32F103', 'STM32F303' +AVR_PROCESSORS = 'at90usb1286', 'at90usb646', 'atmega16u2', 'atmega328p', 'atmega32a', 'atmega32u2', 'atmega32u4', None +ALL_PROCESSORS = ARM_PROCESSORS + AVR_PROCESSORS +VUSB_PROCESSORS = 'atmega328p', 'atmega32a' diff --git a/lib/python/qmk/decorators.py b/lib/python/qmk/decorators.py index 94e14bf375a0..f8f2facb1c8d 100644 --- a/lib/python/qmk/decorators.py +++ b/lib/python/qmk/decorators.py @@ -5,7 +5,8 @@ from milc import cli -from qmk.path import is_keyboard, is_keymap_dir, under_qmk_firmware +from qmk.keymap import is_keymap_dir +from qmk.path import is_keyboard, under_qmk_firmware def automagic_keyboard(func): @@ -67,18 +68,18 @@ def wrapper(*args, **kwargs): while current_path.parent.name != 'keymaps': current_path = current_path.parent cli.config[cli._entrypoint.__name__]['keymap'] = current_path.name - cli.config_source[cli._entrypoint.__name__]['keyboard'] = 'keymap_directory' + cli.config_source[cli._entrypoint.__name__]['keymap'] = 'keymap_directory' # If we're in `qmk_firmware/layouts` guess the name from the community keymap they're in elif relative_cwd.parts[0] == 'layouts' and is_keymap_dir(relative_cwd): cli.config[cli._entrypoint.__name__]['keymap'] = relative_cwd.name - cli.config_source[cli._entrypoint.__name__]['keyboard'] = 'layouts_directory' + cli.config_source[cli._entrypoint.__name__]['keymap'] = 'layouts_directory' # If we're in `qmk_firmware/users` guess the name from the userspace they're in elif relative_cwd.parts[0] == 'users': # Guess the keymap name based on which userspace they're in cli.config[cli._entrypoint.__name__]['keymap'] = relative_cwd.parts[1] - cli.config_source[cli._entrypoint.__name__]['keyboard'] = 'users_directory' + cli.config_source[cli._entrypoint.__name__]['keymap'] = 'users_directory' return func(*args, **kwargs) diff --git a/lib/python/qmk/info.py b/lib/python/qmk/info.py new file mode 100644 index 000000000000..e1ace5d51bec --- /dev/null +++ b/lib/python/qmk/info.py @@ -0,0 +1,249 @@ +"""Functions that help us generate and use info.json files. +""" +import json +from glob import glob +from pathlib import Path + +from milc import cli + +from qmk.constants import ARM_PROCESSORS, AVR_PROCESSORS, VUSB_PROCESSORS +from qmk.c_parse import find_layouts +from qmk.keyboard import config_h, rules_mk +from qmk.math import compute + + +def info_json(keyboard): + """Generate the info.json data for a specific keyboard. + """ + info_data = { + 'keyboard_name': str(keyboard), + 'keyboard_folder': str(keyboard), + 'layouts': {}, + 'maintainer': 'qmk', + } + + for layout_name, layout_json in _find_all_layouts(keyboard).items(): + if not layout_name.startswith('LAYOUT_kc'): + info_data['layouts'][layout_name] = layout_json + + info_data = merge_info_jsons(keyboard, info_data) + info_data = _extract_config_h(info_data) + info_data = _extract_rules_mk(info_data) + + return info_data + + +def _extract_config_h(info_data): + """Pull some keyboard information from existing rules.mk files + """ + config_c = config_h(info_data['keyboard_folder']) + row_pins = config_c.get('MATRIX_ROW_PINS', '').replace('{', '').replace('}', '').strip() + col_pins = config_c.get('MATRIX_COL_PINS', '').replace('{', '').replace('}', '').strip() + direct_pins = config_c.get('DIRECT_PINS', '').replace(' ', '')[1:-1] + + info_data['diode_direction'] = config_c.get('DIODE_DIRECTION') + info_data['matrix_size'] = { + 'rows': compute(config_c.get('MATRIX_ROWS', '0')), + 'cols': compute(config_c.get('MATRIX_COLS', '0')), + } + info_data['matrix_pins'] = {} + + if row_pins: + info_data['matrix_pins']['rows'] = row_pins.split(',') + if col_pins: + info_data['matrix_pins']['cols'] = col_pins.split(',') + + if direct_pins: + direct_pin_array = [] + for row in direct_pins.split('},{'): + if row.startswith('{'): + row = row[1:] + if row.endswith('}'): + row = row[:-1] + + direct_pin_array.append([]) + + for pin in row.split(','): + if pin == 'NO_PIN': + pin = None + + direct_pin_array[-1].append(pin) + + info_data['matrix_pins']['direct'] = direct_pin_array + + info_data['usb'] = { + 'vid': config_c.get('VENDOR_ID'), + 'pid': config_c.get('PRODUCT_ID'), + 'device_ver': config_c.get('DEVICE_VER'), + 'manufacturer': config_c.get('MANUFACTURER'), + 'product': config_c.get('PRODUCT'), + 'description': config_c.get('DESCRIPTION'), + } + + return info_data + + +def _extract_rules_mk(info_data): + """Pull some keyboard information from existing rules.mk files + """ + rules = rules_mk(info_data['keyboard_folder']) + mcu = rules.get('MCU') + + if mcu in ARM_PROCESSORS: + arm_processor_rules(info_data, rules) + elif mcu in AVR_PROCESSORS: + avr_processor_rules(info_data, rules) + else: + cli.log.warning("%s: Unknown MCU: %s" % (info_data['keyboard_folder'], mcu)) + unknown_processor_rules(info_data, rules) + + return info_data + + +def _find_all_layouts(keyboard): + """Looks for layout macros associated with this keyboard. + """ + layouts = {} + rules = rules_mk(keyboard) + keyboard_path = Path(rules.get('DEFAULT_FOLDER', keyboard)) + + # Pull in all layouts defined in the standard files + current_path = Path('keyboards/') + for directory in keyboard_path.parts: + current_path = current_path / directory + keyboard_h = '%s.h' % (directory,) + keyboard_h_path = current_path / keyboard_h + if keyboard_h_path.exists(): + layouts.update(find_layouts(keyboard_h_path)) + + if not layouts: + # If we didn't find any layouts above we widen our search. This is error + # prone which is why we want to encourage people to follow the standard above. + cli.log.warning('%s: Falling back to searching for KEYMAP/LAYOUT macros.' % (keyboard)) + for file in glob('keyboards/%s/*.h' % keyboard): + if file.endswith('.h'): + these_layouts = find_layouts(file) + if these_layouts: + layouts.update(these_layouts) + + if 'LAYOUTS' in rules: + # Match these up against the supplied layouts + supported_layouts = rules['LAYOUTS'].strip().split() + for layout_name in sorted(layouts): + if not layout_name.startswith('LAYOUT_'): + continue + layout_name = layout_name[7:] + if layout_name in supported_layouts: + supported_layouts.remove(layout_name) + + if supported_layouts: + cli.log.error('%s: Missing LAYOUT() macro for %s' % (keyboard, ', '.join(supported_layouts))) + + return layouts + + +def arm_processor_rules(info_data, rules): + """Setup the default info for an ARM board. + """ + info_data['processor_type'] = 'arm' + info_data['bootloader'] = rules['BOOTLOADER'] if 'BOOTLOADER' in rules else 'unknown' + info_data['processor'] = rules['MCU'] if 'MCU' in rules else 'unknown' + info_data['protocol'] = 'ChibiOS' + + if info_data['bootloader'] == 'unknown': + if 'STM32' in info_data['processor']: + info_data['bootloader'] = 'stm32-dfu' + elif info_data.get('manufacturer') == 'Input Club': + info_data['bootloader'] = 'kiibohd-dfu' + + if 'STM32' in info_data['processor']: + info_data['platform'] = 'STM32' + elif 'MCU_SERIES' in rules: + info_data['platform'] = rules['MCU_SERIES'] + elif 'ARM_ATSAM' in rules: + info_data['platform'] = 'ARM_ATSAM' + + return info_data + + +def avr_processor_rules(info_data, rules): + """Setup the default info for an AVR board. + """ + info_data['processor_type'] = 'avr' + info_data['bootloader'] = rules['BOOTLOADER'] if 'BOOTLOADER' in rules else 'atmel-dfu' + info_data['platform'] = rules['ARCH'] if 'ARCH' in rules else 'unknown' + info_data['processor'] = rules['MCU'] if 'MCU' in rules else 'unknown' + info_data['protocol'] = 'V-USB' if rules.get('MCU') in VUSB_PROCESSORS else 'LUFA' + + # FIXME(fauxpark/anyone): Eventually we should detect the protocol by looking at PROTOCOL inherited from mcu_selection.mk: + # info_data['protocol'] = 'V-USB' if rules.get('PROTOCOL') == 'VUSB' else 'LUFA' + + return info_data + + +def unknown_processor_rules(info_data, rules): + """Setup the default keyboard info for unknown boards. + """ + info_data['bootloader'] = 'unknown' + info_data['platform'] = 'unknown' + info_data['processor'] = 'unknown' + info_data['processor_type'] = 'unknown' + info_data['protocol'] = 'unknown' + + return info_data + + +def merge_info_jsons(keyboard, info_data): + """Return a merged copy of all the info.json files for a keyboard. + """ + for info_file in find_info_json(keyboard): + # Load and validate the JSON data + with info_file.open('r') as info_fd: + new_info_data = json.load(info_fd) + + if not isinstance(new_info_data, dict): + cli.log.error("Invalid file %s, root object should be a dictionary.", str(info_file)) + continue + + # Copy whitelisted keys into `info_data` + for key in ('keyboard_name', 'manufacturer', 'identifier', 'url', 'maintainer', 'processor', 'bootloader', 'width', 'height'): + if key in new_info_data: + info_data[key] = new_info_data[key] + + # Merge the layouts in + if 'layouts' in new_info_data: + for layout_name, json_layout in new_info_data['layouts'].items(): + # Only pull in layouts we have a macro for + if layout_name in info_data['layouts']: + if info_data['layouts'][layout_name]['key_count'] != len(json_layout['layout']): + cli.log.error('%s: %s: Number of elements in info.json does not match! info.json:%s != %s:%s', info_data['keyboard_folder'], layout_name, len(json_layout['layout']), layout_name, len(info_data['layouts'][layout_name]['layout'])) + else: + for i, key in enumerate(info_data['layouts'][layout_name]['layout']): + key.update(json_layout['layout'][i]) + + return info_data + + +def find_info_json(keyboard): + """Finds all the info.json files associated with a keyboard. + """ + # Find the most specific first + base_path = Path('keyboards') + keyboard_path = base_path / keyboard + keyboard_parent = keyboard_path.parent + info_jsons = [keyboard_path / 'info.json'] + + # Add DEFAULT_FOLDER before parents, if present + rules = rules_mk(keyboard) + if 'DEFAULT_FOLDER' in rules: + info_jsons.append(Path(rules['DEFAULT_FOLDER']) / 'info.json') + + # Add in parent folders for least specific + for _ in range(5): + info_jsons.append(keyboard_parent / 'info.json') + if keyboard_parent.parent == base_path: + break + keyboard_parent = keyboard_parent.parent + + # Return a list of the info.json files that actually exist + return [info_json for info_json in info_jsons if info_json.exists()] diff --git a/lib/python/qmk/keyboard.py b/lib/python/qmk/keyboard.py new file mode 100644 index 000000000000..d1f2a301df58 --- /dev/null +++ b/lib/python/qmk/keyboard.py @@ -0,0 +1,111 @@ +"""Functions that help us work with keyboards. +""" +from array import array +from math import ceil +from pathlib import Path + +from qmk.c_parse import parse_config_h_file +from qmk.makefile import parse_rules_mk_file + + +def config_h(keyboard): + """Parses all the config.h files for a keyboard. + + Args: + keyboard: name of the keyboard + + Returns: + a dictionary representing the content of the entire config.h tree for a keyboard + """ + config = {} + cur_dir = Path('keyboards') + rules = rules_mk(keyboard) + keyboard = Path(rules['DEFAULT_FOLDER'] if 'DEFAULT_FOLDER' in rules else keyboard) + + for dir in keyboard.parts: + cur_dir = cur_dir / dir + config = {**config, **parse_config_h_file(cur_dir / 'config.h')} + + return config + + +def rules_mk(keyboard): + """Get a rules.mk for a keyboard + + Args: + keyboard: name of the keyboard + + Returns: + a dictionary representing the content of the entire rules.mk tree for a keyboard + """ + keyboard = Path(keyboard) + cur_dir = Path('keyboards') + rules = parse_rules_mk_file(cur_dir / keyboard / 'rules.mk') + + if 'DEFAULT_FOLDER' in rules: + keyboard = Path(rules['DEFAULT_FOLDER']) + + for i, dir in enumerate(keyboard.parts): + cur_dir = cur_dir / dir + rules = parse_rules_mk_file(cur_dir / 'rules.mk', rules) + + return rules + + +def render_layout(layout_data, key_labels=None): + """Renders a single layout. + """ + textpad = [array('u', ' ' * 200) for x in range(50)] + + for key in layout_data: + x = ceil(key.get('x', 0) * 4) + y = ceil(key.get('y', 0) * 3) + w = ceil(key.get('w', 1) * 4) + h = ceil(key.get('h', 1) * 3) + + if key_labels: + label = key_labels.pop(0) + if label.startswith('KC_'): + label = label[3:] + else: + label = key.get('label', '') + + label_len = w - 2 + label_leftover = label_len - len(label) + + if len(label) > label_len: + label = label[:label_len] + + label_blank = ' ' * label_len + label_border = '─' * label_len + label_middle = label + ' '*label_leftover # noqa: yapf insists there be no whitespace around * + + top_line = array('u', '┌' + label_border + '┐') + lab_line = array('u', '│' + label_middle + '│') + mid_line = array('u', '│' + label_blank + '│') + bot_line = array('u', '└' + label_border + "┘") + + textpad[y][x:x + w] = top_line + textpad[y + 1][x:x + w] = lab_line + for i in range(h - 3): + textpad[y + i + 2][x:x + w] = mid_line + textpad[y + h - 1][x:x + w] = bot_line + + lines = [] + for line in textpad: + if line.tounicode().strip(): + lines.append(line.tounicode().rstrip()) + + return '\n'.join(lines) + + +def render_layouts(info_json): + """Renders all the layouts from an `info_json` structure. + """ + layouts = {} + + for layout in info_json['layouts']: + layout_data = info_json['layouts'][layout]['layout'] + layouts[layout] = render_layout(layout_data) + + return layouts diff --git a/lib/python/qmk/keymap.py b/lib/python/qmk/keymap.py index 69cdc8d5b5ae..70730eb4a83f 100644 --- a/lib/python/qmk/keymap.py +++ b/lib/python/qmk/keymap.py @@ -2,8 +2,8 @@ """ from pathlib import Path -import qmk.path -import qmk.makefile +from qmk.path import is_keyboard +from qmk.keyboard import rules_mk # The `keymap.c` template to use when a keyboard doesn't have its own DEFAULT_KEYMAP_C = """#include QMK_KEYBOARD_H @@ -47,6 +47,14 @@ def _strip_any(keycode): return keycode +def is_keymap_dir(keymap): + """Return True if Path object `keymap` has a keymap file inside. + """ + for file in ('keymap.c', 'keymap.json'): + if (keymap / file).is_file(): + return True + + def generate(keyboard, layout, layers): """Returns a keymap.c for the specified keyboard, layout, and layers. @@ -95,7 +103,7 @@ 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_file = qmk.path.keymap(keyboard) / keymap / 'keymap.c' + keymap_file = keymap(keyboard) / keymap / 'keymap.c' keymap_file.parent.mkdir(parents=True, exist_ok=True) keymap_file.write_text(keymap_c) @@ -103,37 +111,76 @@ def write(keyboard, keymap, layout, layers): return keymap_file -def list_keymaps(keyboard_name): +def locate_keymap(keyboard, keymap): + """Returns the path to a keymap for a specific keyboard. + """ + if not is_keyboard(keyboard): + raise KeyError('Invalid keyboard: ' + repr(keyboard)) + + # Check the keyboard folder first, last match wins + checked_dirs = '' + keymap_path = '' + + for dir in keyboard.split('/'): + if checked_dirs: + checked_dirs = '/'.join((checked_dirs, dir)) + else: + checked_dirs = dir + + keymap_dir = Path('keyboards') / checked_dirs / 'keymaps' + + if (keymap_dir / keymap / 'keymap.c').exists(): + keymap_path = keymap_dir / keymap / 'keymap.c' + if (keymap_dir / keymap / 'keymap.json').exists(): + keymap_path = keymap_dir / keymap / 'keymap.json' + + if keymap_path: + return keymap_path + + # Check community layouts as a fallback + rules = rules_mk(keyboard) + + if "LAYOUTS" in rules: + for layout in rules["LAYOUTS"].split(): + community_layout = Path('layouts/community') / layout / keymap + if community_layout.exists(): + if (community_layout / 'keymap.json').exists(): + return community_layout / 'keymap.json' + if (community_layout / 'keymap.c').exists(): + return community_layout / 'keymap.c' + + +def list_keymaps(keyboard): """ List the available keymaps for a keyboard. Args: - keyboard_name: the keyboards full name with vendor and revision if necessary, example: clueboard/66/rev3 + keyboard: the keyboards full name with vendor and revision if necessary, example: clueboard/66/rev3 Returns: a set with the names of the available keymaps """ # parse all the rules.mk files for the keyboard - rules_mk = qmk.makefile.get_rules_mk(keyboard_name) + rules = rules_mk(keyboard) names = set() - if rules_mk: + if rules: # qmk_firmware/keyboards - keyboards_dir = Path.cwd() / "keyboards" + keyboards_dir = Path('keyboards') # path to the keyboard's directory - kb_path = keyboards_dir / keyboard_name + kb_path = keyboards_dir / keyboard # 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 = kb_path / "keymaps" if keymaps_dir.exists(): - names = names.union([keymap for keymap in keymaps_dir.iterdir() if (keymaps_dir / keymap / "keymap.c").is_file()]) + names = names.union([keymap.name for keymap in keymaps_dir.iterdir() if is_keymap_dir(keymap)]) 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 = Path.cwd() / "layouts" / "community" / layout + if "LAYOUTS" in rules: + for layout in rules["LAYOUTS"].split(): + cl_path = Path('layouts/community') / layout if cl_path.exists(): - names = names.union([keymap for keymap in cl_path.iterdir() if (cl_path / keymap / "keymap.c").is_file()]) + names = names.union([keymap.name for keymap in cl_path.iterdir() if is_keymap_dir(keymap)]) return sorted(names) diff --git a/lib/python/qmk/makefile.py b/lib/python/qmk/makefile.py index 8645056d2d31..02c2e70050c3 100644 --- a/lib/python/qmk/makefile.py +++ b/lib/python/qmk/makefile.py @@ -2,8 +2,6 @@ """ from pathlib import Path -from qmk.errors import NoSuchKeyboardError - def parse_rules_mk_file(file, rules_mk=None): """Turn a rules.mk file into a dictionary. @@ -51,33 +49,3 @@ def parse_rules_mk_file(file, rules_mk=None): rules_mk[key.strip()] = value.strip() return rules_mk - - -def get_rules_mk(keyboard): - """ Get a rules.mk for a keyboard - - Args: - keyboard: name of the keyboard - - Raises: - NoSuchKeyboardError: when the keyboard does not exists - - Returns: - a dictionary with the content of the rules.mk file - """ - # Start with qmk_firmware/keyboards - kb_path = Path.cwd() / "keyboards" - # walk down the directory tree - # and collect all rules.mk files - kb_dir = kb_path / keyboard - if kb_dir.exists(): - rules_mk = dict() - 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.") - - return rules_mk diff --git a/lib/python/qmk/math.py b/lib/python/qmk/math.py new file mode 100644 index 000000000000..88dc4a300c87 --- /dev/null +++ b/lib/python/qmk/math.py @@ -0,0 +1,33 @@ +"""Parse arbitrary math equations in a safe way. + +Gratefully copied from https://stackoverflow.com/a/9558001 +""" +import ast +import operator as op + +# supported operators +operators = {ast.Add: op.add, ast.Sub: op.sub, ast.Mult: op.mul, ast.Div: op.truediv, ast.Pow: op.pow, ast.BitXor: op.xor, ast.USub: op.neg} + + +def compute(expr): + """Parse a mathematical expression and return the answer. + + >>> compute('2^6') + 4 + >>> compute('2**6') + 64 + >>> compute('1 + 2*3**(4^5) / (6 + -7)') + -5.0 + """ + return _eval(ast.parse(expr, mode='eval').body) + + +def _eval(node): + if isinstance(node, ast.Num): # + return node.n + elif isinstance(node, ast.BinOp): # + return operators[type(node.op)](_eval(node.left), _eval(node.right)) + elif isinstance(node, ast.UnaryOp): # e.g., -1 + return operators[type(node.op)](_eval(node.operand)) + else: + raise TypeError(node) diff --git a/lib/python/qmk/path.py b/lib/python/qmk/path.py index 7306c433b86e..8df6f0e91588 100644 --- a/lib/python/qmk/path.py +++ b/lib/python/qmk/path.py @@ -4,20 +4,10 @@ import os from pathlib import Path -from qmk.constants import QMK_FIRMWARE, MAX_KEYBOARD_SUBFOLDERS +from qmk.constants import MAX_KEYBOARD_SUBFOLDERS, QMK_FIRMWARE 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. """ @@ -68,17 +58,3 @@ def normpath(path): return 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 768929de1d76..dce270de83cf 100644 --- a/lib/python/qmk/tests/test_cli_commands.py +++ b/lib/python/qmk/tests/test_cli_commands.py @@ -4,89 +4,151 @@ def check_subcommand(command, *args): cmd = ['bin/qmk', command] + list(args) - return run(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE, universal_newlines=True) + result = run(cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, universal_newlines=True) + return result + + +def check_returncode(result, expected=0): + """Print stdout if `result.returncode` does not match `expected`. + """ + if result.returncode != expected: + print('`%s` stdout:' % ' '.join(result.args)) + print(result.stdout) + print('returncode:', result.returncode) + assert result.returncode == expected def test_cformat(): result = check_subcommand('cformat', 'quantum/matrix.c') - assert result.returncode == 0 + check_returncode(result) def test_compile(): - assert check_subcommand('compile', '-kb', 'handwired/onekey/pytest', '-km', 'default').returncode == 0 + result = check_subcommand('compile', '-kb', 'handwired/onekey/pytest', '-km', 'default', '-n') + check_returncode(result) def test_flash(): - assert check_subcommand('flash', '-b').returncode == 1 - assert check_subcommand('flash').returncode == 1 + result = check_subcommand('flash', '-kb', 'handwired/onekey/pytest', '-km', 'default', '-n') + check_returncode(result) + + +def test_flash_bootloaders(): + result = check_subcommand('flash', '-b') + check_returncode(result, 1) def test_config(): result = check_subcommand('config') - assert result.returncode == 0 + check_returncode(result) assert 'general.color' in result.stdout def test_kle2json(): - assert check_subcommand('kle2json', 'kle.txt', '-f').returncode == 0 + result = check_subcommand('kle2json', 'kle.txt', '-f') + check_returncode(result) def test_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 + check_returncode(result) + assert 'QMK Doctor is checking your environment.' in result.stdout + assert 'QMK is ready to go' in result.stdout def test_hello(): result = check_subcommand('hello') - assert result.returncode == 0 - assert 'Hello,' in result.stderr + check_returncode(result) + assert 'Hello,' in result.stdout def test_pyformat(): result = check_subcommand('pyformat') - assert result.returncode == 0 - assert 'Successfully formatted the python code' in result.stderr + check_returncode(result) + assert 'Successfully formatted the python code' in result.stdout + + +def test_list_keyboards(): + result = check_subcommand('list-keyboards') + check_returncode(result) + # 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', 'handwired/onekey/pytest') - assert result.returncode == 0 + check_returncode(result, 0) assert 'default' and 'test' in result.stdout def test_list_keymaps_long(): result = check_subcommand('list-keymaps', '--keyboard', 'handwired/onekey/pytest') - assert result.returncode == 0 + check_returncode(result, 0) assert 'default' and 'test' in result.stdout def test_list_keymaps_kb_only(): result = check_subcommand('list-keymaps', '-kb', 'niu_mini') - assert result.returncode == 0 + check_returncode(result, 0) assert 'default' and 'via' in result.stdout def test_list_keymaps_vendor_kb(): result = check_subcommand('list-keymaps', '-kb', 'ai03/lunar') - assert result.returncode == 0 + check_returncode(result, 0) assert 'default' and 'via' in result.stdout def test_list_keymaps_vendor_kb_rev(): result = check_subcommand('list-keymaps', '-kb', 'kbdfans/kbd67/mkiirgb/v2') - assert result.returncode == 0 + check_returncode(result, 0) assert 'default' and 'via' in result.stdout def test_list_keymaps_no_keyboard_found(): result = check_subcommand('list-keymaps', '-kb', 'asdfghjkl') - assert result.returncode == 0 + check_returncode(result, 1) assert 'does not exist' in result.stdout def test_json2c(): result = check_subcommand('json2c', 'keyboards/handwired/onekey/keymaps/default_json/keymap.json') - assert result.returncode == 0 + check_returncode(result, 0) assert result.stdout == '#include QMK_KEYBOARD_H\nconst uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {\t[0] = LAYOUT(KC_A)};\n\n' + + +def test_info(): + result = check_subcommand('info', '-kb', 'handwired/onekey/pytest') + check_returncode(result) + assert 'Keyboard Name: handwired/onekey/pytest' in result.stdout + assert 'Processor: STM32F303' in result.stdout + assert 'Layout:' not in result.stdout + assert 'k0' not in result.stdout + + +def test_info_keyboard_render(): + result = check_subcommand('info', '-kb', 'handwired/onekey/pytest', '-l') + check_returncode(result) + assert 'Keyboard Name: handwired/onekey/pytest' in result.stdout + assert 'Processor: STM32F303' in result.stdout + assert 'Layout:' in result.stdout + assert 'k0' in result.stdout + + +def test_info_keymap_render(): + result = check_subcommand('info', '-kb', 'handwired/onekey/pytest', '-km', 'default_json') + check_returncode(result) + assert 'Keyboard Name: handwired/onekey/pytest' in result.stdout + assert 'Processor: STM32F303' in result.stdout + assert '│A │' in result.stdout + + +def test_info_matrix_render(): + result = check_subcommand('info', '-kb', 'handwired/onekey/pytest', '-m') + check_returncode(result) + assert 'Keyboard Name: handwired/onekey/pytest' in result.stdout + assert 'Processor: STM32F303' in result.stdout + assert 'LAYOUT' in result.stdout + assert '│0A│' in result.stdout + assert 'Matrix for "LAYOUT"' in result.stdout From 4ee623fdd588edb9ac8816040f01d7644a49bd52 Mon Sep 17 00:00:00 2001 From: Zach White Date: Tue, 26 May 2020 14:29:48 -0700 Subject: [PATCH 049/930] Fix compiling json files (#9210) --- lib/python/qmk/keymap.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/python/qmk/keymap.py b/lib/python/qmk/keymap.py index 70730eb4a83f..a2923f86db7e 100644 --- a/lib/python/qmk/keymap.py +++ b/lib/python/qmk/keymap.py @@ -2,8 +2,8 @@ """ from pathlib import Path -from qmk.path import is_keyboard from qmk.keyboard import rules_mk +import qmk.path # The `keymap.c` template to use when a keyboard doesn't have its own DEFAULT_KEYMAP_C = """#include QMK_KEYBOARD_H @@ -103,7 +103,7 @@ 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_file = keymap(keyboard) / keymap / 'keymap.c' + keymap_file = qmk.path.keymap(keyboard) / 'keymap.c' keymap_file.parent.mkdir(parents=True, exist_ok=True) keymap_file.write_text(keymap_c) @@ -114,7 +114,7 @@ def write(keyboard, keymap, layout, layers): def locate_keymap(keyboard, keymap): """Returns the path to a keymap for a specific keyboard. """ - if not is_keyboard(keyboard): + if not qmk.path.is_keyboard(keyboard): raise KeyError('Invalid keyboard: ' + repr(keyboard)) # Check the keyboard folder first, last match wins From a5e749d8cd76959e8103fff47d65725e19460d81 Mon Sep 17 00:00:00 2001 From: Zach White Date: Tue, 26 May 2020 15:18:49 -0700 Subject: [PATCH 050/930] Fix the path for generated keymaps (#9213) --- lib/python/qmk/cli/compile.py | 4 ---- lib/python/qmk/keymap.py | 6 +++++- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/python/qmk/cli/compile.py b/lib/python/qmk/cli/compile.py index 6480d624b043..341f365f8c17 100755 --- a/lib/python/qmk/cli/compile.py +++ b/lib/python/qmk/cli/compile.py @@ -7,7 +7,6 @@ from milc import cli -import qmk.path from qmk.decorators import automagic_keyboard, automagic_keymap from qmk.commands import compile_configurator_json, create_make_command, parse_configurator_json @@ -32,11 +31,8 @@ def compile(cli): # If a configurator JSON was provided generate a keymap and compile 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) - keymap_path = qmk.path.keymap(user_keymap['keyboard']) command = compile_configurator_json(user_keymap) - cli.log.info('Wrote keymap to {fg_cyan}%s/%s/keymap.c', keymap_path, user_keymap['keymap']) - else: if cli.config.compile.keyboard and cli.config.compile.keymap: # Generate the make command for a specific keyboard/keymap. diff --git a/lib/python/qmk/keymap.py b/lib/python/qmk/keymap.py index a2923f86db7e..78510a8a785e 100644 --- a/lib/python/qmk/keymap.py +++ b/lib/python/qmk/keymap.py @@ -2,6 +2,8 @@ """ from pathlib import Path +from milc import cli + from qmk.keyboard import rules_mk import qmk.path @@ -103,11 +105,13 @@ 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_file = qmk.path.keymap(keyboard) / 'keymap.c' + keymap_file = qmk.path.keymap(keyboard) / keymap / 'keymap.c' keymap_file.parent.mkdir(parents=True, exist_ok=True) keymap_file.write_text(keymap_c) + cli.log.info('Wrote keymap to {fg_cyan}%s', keymap_file) + return keymap_file From ac447d8acb95658fd58e6504abbc92d7acb21960 Mon Sep 17 00:00:00 2001 From: Wilba Date: Wed, 27 May 2020 10:18:13 +1000 Subject: [PATCH 051/930] ISSI driver compile error fix (#9169) --- drivers/issi/is31fl3731.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/issi/is31fl3731.c b/drivers/issi/is31fl3731.c index 9f006b8174bd..ef9e9162e202 100644 --- a/drivers/issi/is31fl3731.c +++ b/drivers/issi/is31fl3731.c @@ -64,7 +64,7 @@ uint8_t g_twi_transfer_buffer[20]; uint8_t g_pwm_buffer[DRIVER_COUNT][144]; bool g_pwm_buffer_update_required[DRIVER_COUNT] = {false}; -uint8_t g_led_control_registers[DRIVER_COUNT][18] = {{0}, {0}}; +uint8_t g_led_control_registers[DRIVER_COUNT][18] = {{0}}; bool g_led_control_registers_update_required[DRIVER_COUNT] = {false}; // This is the bit pattern in the LED control registers From a9b3c0a807e00e7279bb039abb5d5696ecd6d0c1 Mon Sep 17 00:00:00 2001 From: halfenergized Date: Wed, 27 May 2020 07:20:32 +0700 Subject: [PATCH 052/930] Adding TGR Tris/Tris CE Numpad (#9139) * Add TGR Tris * Update readme.md * Update rules.mk * Update keyboards/tgr/tris/keymaps/default/keymap.c Co-authored-by: Joel Challis * Update keyboards/tgr/tris/keymaps/via/keymap.c Co-authored-by: Joel Challis * Update keyboards/tgr/tris/keymaps/default/keymap.c Co-authored-by: Drashna Jaelre * Update keyboards/tgr/tris/keymaps/via/keymap.c Co-authored-by: Drashna Jaelre * Update keyboards/tgr/tris/tris.h Co-authored-by: Drashna Jaelre * Update keyboards/tgr/tris/info.json Co-authored-by: Joel Challis * update formatting * Revert "update formatting" This reverts commit ae2d6832673985a874f7f43d42bdb56679d851d6. Co-authored-by: Joel Challis Co-authored-by: Drashna Jaelre --- keyboards/tgr/tris/config.h | 50 ++++++++++++++++ keyboards/tgr/tris/info.json | 16 +++++ keyboards/tgr/tris/keymaps/default/keymap.c | 47 +++++++++++++++ keyboards/tgr/tris/keymaps/default/readme.md | 1 + keyboards/tgr/tris/keymaps/via/keymap.c | 57 ++++++++++++++++++ keyboards/tgr/tris/keymaps/via/rules.mk | 4 ++ keyboards/tgr/tris/readme.md | 19 ++++++ keyboards/tgr/tris/rules.mk | 26 ++++++++ keyboards/tgr/tris/tris.c | 33 ++++++++++ keyboards/tgr/tris/tris.h | 63 ++++++++++++++++++++ 10 files changed, 316 insertions(+) create mode 100644 keyboards/tgr/tris/config.h create mode 100644 keyboards/tgr/tris/info.json create mode 100644 keyboards/tgr/tris/keymaps/default/keymap.c create mode 100644 keyboards/tgr/tris/keymaps/default/readme.md create mode 100644 keyboards/tgr/tris/keymaps/via/keymap.c create mode 100644 keyboards/tgr/tris/keymaps/via/rules.mk create mode 100644 keyboards/tgr/tris/readme.md create mode 100644 keyboards/tgr/tris/rules.mk create mode 100644 keyboards/tgr/tris/tris.c create mode 100644 keyboards/tgr/tris/tris.h diff --git a/keyboards/tgr/tris/config.h b/keyboards/tgr/tris/config.h new file mode 100644 index 000000000000..32149087cf2b --- /dev/null +++ b/keyboards/tgr/tris/config.h @@ -0,0 +1,50 @@ +/* +Copyright 2020 halfenergized + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License 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 0x5447 //TG +#define PRODUCT_ID 0x5452 //TR +#define DEVICE_VER 0x0001 +#define MANUFACTURER TGR +#define PRODUCT Tris +#define DESCRIPTION Numpad by TGR + +#define MATRIX_ROWS 6 +#define MATRIX_COLS 4 + +#define MATRIX_ROW_PINS { B0, B1, B2, B3, B4, B5 } +#define MATRIX_COL_PINS { A3, A2, A1, A0 } + +#define DIODE_DIRECTION COL2ROW +#define DEBOUNCE 5 + +#define BACKLIGHT_PIN D4 +#define BACKLIGHT_LEVELS 3 + +#define RGBLED_NUM 6 +#define RGBLIGHT_ANIMATIONS + +/* 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/tgr/tris/info.json b/keyboards/tgr/tris/info.json new file mode 100644 index 000000000000..401bd6e30817 --- /dev/null +++ b/keyboards/tgr/tris/info.json @@ -0,0 +1,16 @@ +{ + "keyboard_name": "TGR Tris", + "url": "", + "maintainer": "halfenergized", + "width": 4, + "height": 6, + "layouts": { + "LAYOUT_ortho_6x4": { + "layout": [{"x":0, "y":0}, {"x":1, "y":0}, {"x":2, "y":0}, {"x":3, "y":0}, {"x":0, "y":1.25}, {"x":1, "y":1.25}, {"x":2, "y":1.25}, {"x":3, "y":1.25}, {"x":0, "y":2.25}, {"x":1, "y":2.25}, {"x":2, "y":2.25}, {"x":3, "y":2.25}, {"x":0, "y":3.25}, {"x":1, "y":3.25}, {"x":2, "y":3.25}, {"x":3, "y":3.25}, {"x":0, "y":4.25}, {"x":1, "y":4.25}, {"x":2, "y":4.25}, {"x":3, "y":4.25}, {"x":0, "y":5.25}, {"x":1, "y":5.25}, {"x":2, "y":5.25}, {"x":3, "y":5.25}] + }, + + "LAYOUT_numpad_6x4": { + "layout": [{"x":0, "y":0}, {"x":1, "y":0}, {"x":2, "y":0}, {"x":3, "y":0}, {"x":0, "y":1.25}, {"x":1, "y":1.25}, {"x":2, "y":1.25}, {"x":3, "y":1.25}, {"x":0, "y":2.25}, {"x":1, "y":2.25}, {"x":2, "y":2.25}, {"x":0, "y":3.25}, {"x":1, "y":3.25}, {"x":2, "y":3.25}, {"x":3, "y":2.25, "h":2}, {"x":0, "y":4.25}, {"x":1, "y":4.25}, {"x":2, "y":4.25}, {"x":0, "y":5.25, "w":2}, {"x":2, "y":5.25}, {"x":3, "y":4.25, "h":2}] + } + } +} diff --git a/keyboards/tgr/tris/keymaps/default/keymap.c b/keyboards/tgr/tris/keymaps/default/keymap.c new file mode 100644 index 000000000000..5a4e47a694f4 --- /dev/null +++ b/keyboards/tgr/tris/keymaps/default/keymap.c @@ -0,0 +1,47 @@ +/* Copyright 2020 halfenergized + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public 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_numpad_6x4( + KC_ESC, KC_TAB, MO(1), 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 + ), + + [1] = LAYOUT_numpad_6x4( + KC_TRNS, KC_TRNS, KC_TRNS, MO(2), + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_HOME, KC_UP, KC_PGUP, + KC_LEFT, KC_TRNS, KC_RGHT, KC_TRNS, + KC_END, KC_DOWN, KC_PGDN, + KC_INS, KC_DEL, KC_TRNS + ), + + [2] = LAYOUT_numpad_6x4( + 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 + ) +}; diff --git a/keyboards/tgr/tris/keymaps/default/readme.md b/keyboards/tgr/tris/keymaps/default/readme.md new file mode 100644 index 000000000000..660966577f79 --- /dev/null +++ b/keyboards/tgr/tris/keymaps/default/readme.md @@ -0,0 +1 @@ +# The default keymap for tris diff --git a/keyboards/tgr/tris/keymaps/via/keymap.c b/keyboards/tgr/tris/keymaps/via/keymap.c new file mode 100644 index 000000000000..bfa8dbc59b6f --- /dev/null +++ b/keyboards/tgr/tris/keymaps/via/keymap.c @@ -0,0 +1,57 @@ +/* Copyright 2020 halfenergized + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public 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_numpad_6x4( + KC_ESC, KC_TAB, MO(1), 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 + ), + + [1] = LAYOUT_numpad_6x4( + KC_TRNS, KC_TRNS, KC_TRNS, MO(2), + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_HOME, KC_UP, KC_PGUP, + KC_LEFT, KC_TRNS, KC_RGHT, KC_TRNS, + KC_END, KC_DOWN, KC_PGDN, + KC_INS, KC_DEL, KC_TRNS + ), + + [2] = LAYOUT_numpad_6x4( + 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 + ), + + [3] = LAYOUT_numpad_6x4( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, 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/tgr/tris/keymaps/via/rules.mk b/keyboards/tgr/tris/keymaps/via/rules.mk new file mode 100644 index 000000000000..7d47e6b72624 --- /dev/null +++ b/keyboards/tgr/tris/keymaps/via/rules.mk @@ -0,0 +1,4 @@ +VIA_ENABLE = yes +LTO_ENABLE = yes + +EXTRAKEY_ENABLE = no diff --git a/keyboards/tgr/tris/readme.md b/keyboards/tgr/tris/readme.md new file mode 100644 index 000000000000..8c3433700b8a --- /dev/null +++ b/keyboards/tgr/tris/readme.md @@ -0,0 +1,19 @@ +# TGR Tris/Tris CE + +A short description of the keyboard/project + +* Keyboard Maintainer: [poisonking](https://github.com/halfenergized) +* Hardware Supported: Tris PCB +* Hardware Availability: https://geekhack.org/index.php?topic=86221.0 + +Make example for this keyboard (after setting up your build environment): + + make tris:default + +Flashing example for this keyboard ([after setting up the bootloadHID flashing environment](https://docs.qmk.fm/#/flashing_bootloadhid)) + + make tris:default:flash + +**Reset Key**: Hold down the key located at top right position, 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/tgr/tris/rules.mk b/keyboards/tgr/tris/rules.mk new file mode 100644 index 000000000000..358ab6dcc8c8 --- /dev/null +++ b/keyboards/tgr/tris/rules.mk @@ -0,0 +1,26 @@ +# 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 = no +MOUSEKEY_ENABLE = no +EXTRAKEY_ENABLE = yes +CONSOLE_ENABLE = no +COMMAND_ENABLE = yes +BACKLIGHT_ENABLE = yes +RGBLIGHT_ENABLE = yes +WS2812_DRIVER = i2c + +LAYOUTS = numpad_6x4 ortho_6x4 diff --git a/keyboards/tgr/tris/tris.c b/keyboards/tgr/tris/tris.c new file mode 100644 index 000000000000..f354d7a3934d --- /dev/null +++ b/keyboards/tgr/tris/tris.c @@ -0,0 +1,33 @@ +/* Copyright 2020 halfenergized + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#include "tris.h" + +void keyboard_pre_init_kb(void) { + led_init_ports(); + keyboard_pre_init_user(); +} + +void led_init_ports(void) { + setPinOutput(D0); +} + +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/tgr/tris/tris.h b/keyboards/tgr/tris/tris.h new file mode 100644 index 000000000000..5ba1865d3b60 --- /dev/null +++ b/keyboards/tgr/tris/tris.h @@ -0,0 +1,63 @@ +/* Copyright 2020 halfenergized + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License 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 ___ KC_NO + +#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, k43 \ +) \ +{ \ + { k00, k01, k02, k03 }, \ + { k10, k11, k12, k13 }, \ + { k20, k21, k22, ___ }, \ + { k30, k31, k32, k33 }, \ + { k40, k41, k42, k43 }, \ + { k50, ___, k52, ___ } \ +} From 00c1401d3c3b6d5d672719f21795c10a387d15c8 Mon Sep 17 00:00:00 2001 From: Ryan Date: Wed, 27 May 2020 10:52:48 +1000 Subject: [PATCH 053/930] Documentation for keymap_extras (#9194) --- docs/_summary.md | 1 + docs/reference_keymap_extras.md | 79 +++++++++++++++++++++++++++++++++ 2 files changed, 80 insertions(+) create mode 100644 docs/reference_keymap_extras.md diff --git a/docs/_summary.md b/docs/_summary.md index 0e82ab4f0c8b..b3553b428501 100644 --- a/docs/_summary.md +++ b/docs/_summary.md @@ -55,6 +55,7 @@ * Simple Keycodes * [Full List](keycodes.md) * [Basic Keycodes](keycodes_basic.md) + * [Language-Specific Keycodes](reference_keymap_extras.md) * [Modifier Keys](feature_advanced_keycodes.md) * [Quantum Keycodes](quantum_keycodes.md) diff --git a/docs/reference_keymap_extras.md b/docs/reference_keymap_extras.md new file mode 100644 index 000000000000..4f21392494cc --- /dev/null +++ b/docs/reference_keymap_extras.md @@ -0,0 +1,79 @@ +# Language-specific Keycodes + +Keyboards are able to support a wide range of languages. However, they do not send the actual characters produced by pressing their keys - instead, they send numerical codes. In the USB HID spec, these are called "usages", although they are more often referred to as "scancodes" or "keycodes" when in the context of keyboards. +Less than 256 usages are defined in the HID Keyboard/Keypad usage page, and some of those do nothing on modern operating systems. So, how is this language support achieved? + +In a nutshell, the operating system maps the usages it receives to the appropriate character based on the user's configured keyboard layout. For example, when a Swedish person presses the key with the `å` character printed on it, the keyboard is *actually* sending the keycode for `[`. + +Obviously, this could get confusing, so QMK provides language-specific keycode aliases for many keyboard layouts. These won't do much on their own - you still have to set the matching keyboard layout in your OS settings. Think of them more as keycap labels for your keymap. + +To use these, simply `#include` the corresponding [header file](https://github.com/qmk/qmk_firmware/tree/master/quantum/keymap_extras) in your `keymap.c`, and add the keycodes defined in them in place of the `KC_` prefixed ones: + +|Layout |Header | +|---------------------------|--------------------------------| +|Canadian Multilingual (CSA)|`keymap_canadian_multilingual.h`| +|Croatian |`keymap_croatian.h` | +|Czech |`keymap_czech.h` | +|Danish |`keymap_danish.h` | +|Dutch (Belgium) |`keymap_belgian.h` | +|English (Ireland) |`keymap_irish.h` | +|English (UK) |`keymap_uk.h` | +|English (US International) |`keymap_us_international.h` | +|Estonian |`keymap_estonian.h` | +|Finnish |`keymap_finnish.h` | +|French |`keymap_french.h` | +|French (BÉPO) |`keymap_bepo.h` | +|French (Switzerland) |`keymap_fr_ch.h` | +|French (macOS, ISO) |`keymap_french_osx.h` | +|German |`keymap_german.h` | +|German (Switzerland) |`keymap_german_ch.h` | +|German (macOS) |`keymap_german_osx.h` | +|German (Neo2)* |`keymap_neo2.h` | +|Greek* |`keymap_greek.h` | +|Hungarian |`keymap_hungarian.h` | +|Icelandic |`keymap_icelandic.h` | +|Italian |`keymap_italian.h` | +|Italian (macOS, ANSI) |`keymap_italian_osx_ansi.h` | +|Italian (macOS, ISO) |`keymap_italian_osx_iso.h` | +|Japanese |`keymap_jp.h` | +|Korean |`keymap_korean.h` | +|Latvian |`keymap_latvian.h` | +|Lithuanian (ĄŽERTY) |`keymap_lithuanian_azerty.h` | +|Lithuanian (QWERTY) |`keymap_lithuanian_qwerty.h` | +|Norwegian |`keymap_norwegian.h` | +|Polish |`keymap_polish.h` | +|Portuguese |`keymap_portuguese.h` | +|Portuguese (Brazil) |`keymap_br_abnt2.h` | +|Romanian |`keymap_romanian.h` | +|Russian* |`keymap_russian.h` | +|Serbian* |`keymap_serbian.h` | +|Serbian (Latin) |`keymap_serbian_latin.h` | +|Slovak |`keymap_slovak.h` | +|Slovenian |`keymap_slovenian.h` | +|Spanish |`keymap_spanish.h` | +|Spanish (Dvorak) |`keymap_spanish_dvorak.h` | +|Swedish |`keymap_swedish.h` | +|Turkish (F) |`keymap_turkish_f.h` | +|Turkish (Q) |`keymap_turkish_q.h` | + +There are also a few which are not quite language-specific, but useful if you are not using a QWERTY layout: + +|Layout |Header | +|-------------------|------------------------| +|Colemak |`keymap_colemak.h` | +|Dvorak |`keymap_dvorak.h` | +|Dvorak (Programmer)|`keymap_dvp.h` | +|Norman |`keymap_norman.h` | +|Plover* |`keymap_plover.h` | +|Plover (Dvorak)* |`keymap_plover_dvorak.h`| +|Steno* |`keymap_steno.h` | +|Workman |`keymap_workman.h` | +|Workman (ZXCVM) |`keymap_workman_zxcvm.h`| + +## Sendstring Support + +By default, `SEND_STRING()` assumes a US ANSI keyboard layout is set. If you are using a different layout, you can also `#include "sendstring_*.h"` (as above) in your keymap to override the lookup tables used for mapping ASCII characters to keycodes. + +An important thing to note here is that `SEND_STRING()` only operates on [ASCII text](https://en.wikipedia.org/wiki/ASCII#Character_set). This means that you cannot pass it a string containing Unicode characters - this unfortunately includes accented characters that may be present in your desired layout. +Many layouts make certain characters, such as Grave or Tilde, available only as [dead keys](https://en.wikipedia.org/wiki/Dead_key), so you must add a space immediately after it in the string you want to send, to prevent it from potentially combining with the next character. +Certain other layouts have no Sendstring header as they do not use a Latin-derived alphabet (for example Greek and Russian), and thus there is no way to input most of the ASCII character set. These are marked above with a `*`. From 10c1e1b3abd5c91dd498610c985a9f4873a20288 Mon Sep 17 00:00:00 2001 From: yttyx Date: Wed, 27 May 2020 02:17:16 +0100 Subject: [PATCH 054/930] [Keymap] Update yttyx Planck keymap (#9191) * Normalise layout and README from yttyx niu keymap. * Correct case of README. * Changes following review. Co-authored-by: Nick Willis --- keyboards/planck/keymaps/yttyx/README.md | 30 ++++ keyboards/planck/keymaps/yttyx/config.h | 1 - keyboards/planck/keymaps/yttyx/keymap.c | 167 ++++++++--------------- keyboards/planck/keymaps/yttyx/readme.md | 68 --------- keyboards/planck/keymaps/yttyx/rules.mk | 2 +- 5 files changed, 89 insertions(+), 179 deletions(-) create mode 100644 keyboards/planck/keymaps/yttyx/README.md delete mode 100644 keyboards/planck/keymaps/yttyx/readme.md diff --git a/keyboards/planck/keymaps/yttyx/README.md b/keyboards/planck/keymaps/yttyx/README.md new file mode 100644 index 000000000000..963438e3b0f7 --- /dev/null +++ b/keyboards/planck/keymaps/yttyx/README.md @@ -0,0 +1,30 @@ +# Overview + +This layout uses a mirror variant of Balance 12, created by Sasha Viminitz. See [this page](https://mathematicalmulticore.wordpress.com/the-keyboard-layout-project/) +for more information. + +## To build + +``` +make planck/rev6:yttyx +``` + +## To build and flash + +``` +make planck/rev6:yttyx:flash +``` + +## Layers + +### Balance 12 base (BA) layer +![Base layer](https://i.imgur.com/I0TkIHT.png) + +### Numeric/Punctuation (NP) layer +![Numeric/Punctuation layer](https://i.imgur.com/GgZ0PCq.png) + +### Function/Cursor (FC) layer +![Function/Cursor layer](https://i.imgur.com/zcVID2d.png) + +### Plover (PL) layer +![Plover layer](https://i.imgur.com/RikOGXe.png) diff --git a/keyboards/planck/keymaps/yttyx/config.h b/keyboards/planck/keymaps/yttyx/config.h index 88d0c07e93b8..b9e113ec0bb4 100644 --- a/keyboards/planck/keymaps/yttyx/config.h +++ b/keyboards/planck/keymaps/yttyx/config.h @@ -2,4 +2,3 @@ #define NO_ACTION_ONESHOT #define NO_ACTION_MACRO #define NO_ACTION_FUNCTION -#define TAPPING_TOGGLE 2 diff --git a/keyboards/planck/keymaps/yttyx/keymap.c b/keyboards/planck/keymaps/yttyx/keymap.c index 0fcbae89237d..fa2a95a89e10 100644 --- a/keyboards/planck/keymaps/yttyx/keymap.c +++ b/keyboards/planck/keymaps/yttyx/keymap.c @@ -1,39 +1,32 @@ #include QMK_KEYBOARD_H -#include +#include "keymap_steno.h" -enum planck_layers { - _BA, // Base (Balance Twelve mirror variant) - _PL, // Plover (http://opensteno.org) - _NP, // Numeric/punctuation - _FC // Function/cursor +enum layers { + _BA, // Base (Balance Twelve mirror variant) + _NP, // Numeric/Punctuation + _FC, // Function + _PL // Plover }; -enum planck_keycodes { - BA = SAFE_RANGE, - PL -}; - - // Abbreviations #define KX_SFT_Z MT(MOD_LSFT, KC_Z) -#define KX_SFT_X MT(MOD_RSFT, KC_X) +#define KX_SFT_X MT(MOD_LSFT, KC_X) #define LT_ESC_FC LT(_FC, KC_ESC) - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - /* BA - .--------.--------.--------.--------.--------.--------.--------.--------.--------.--------.--------.--------. - | P | L | C | D | W | | | U | O | Y | K | Q | - |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| - | N | R | S | T | M | | BS | A | E | I | H | V | - |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| - | Z Sft | J | F | G | B | | Ent | ' @ | , < | . > | X Sft | | - |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| - | Ctl | Alt | Sup | NP | Spc | Esc/FC | Sft | Sft | Sup | Alt | Ctl | | - '--------'--------'--------'--------'--------'--------'--------'--------'--------'--------'--------'--------' - */ + /* Base + .--------.--------.--------.--------.--------.--------.--------.--------.--------.--------.--------.--------. + | P | L | C | D | W | | | U | O | Y | K | Q | + |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + | N | R | S | T | M | | BS | A | E | I | H | V | + |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + | Z Sft | J | F | G | B | | Ent | ' @ | , < | . > | X Sft | | + |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + | Ctl | Alt | Sup | NP | Spc | Esc FC | Sft | Sft | Sup | Alt | Ctl | | + '--------'--------'--------'--------'--------'--------'--------'--------'--------'--------'--------'--------' + */ [_BA] = LAYOUT_planck_grid( KC_P, KC_L, KC_C, KC_D, KC_W, XXXXXXX, XXXXXXX, KC_U, KC_O, KC_Y, KC_K, KC_Q, KC_N, KC_R, KC_S, KC_T, KC_M, XXXXXXX, KC_BSPC, KC_A, KC_E, KC_I, KC_H, KC_V, @@ -41,106 +34,62 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_LCTL, KC_LALT, KC_LGUI, MO(_NP), KC_SPC, LT_ESC_FC, KC_LSFT, KC_LSFT, KC_LGUI, KC_LALT, KC_LCTL, XXXXXXX ), - /* Plover - .--------.--------.--------.--------.--------.--------.--------.--------.--------.--------.--------.--------. - | # | # | # | # | # | BA | # | # | # | # | # | # | - |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| - | S | T | P | H | * | | * | F | P | L | T | D | - |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| - | S | K | W | R | * | | * | R | B | G | S | Z | - |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| - | | | | A | O | | E | U | | | | | - '--------'--------'--------'--------'--------'--------'--------'--------'--------'--------'--------'--------' - */ - [_PL] = LAYOUT_planck_grid( - STN_NUM, STN_NUM, STN_NUM, STN_NUM, STN_NUM, BA, STN_NUM, STN_NUM, STN_NUM, STN_NUM, STN_NUM, STN_NUM, - STN_S1, STN_TL, STN_PL, STN_HL, STN_ST1, XXXXXXX, STN_ST1, STN_FR, STN_PR, STN_LR, STN_TR, STN_DR, - STN_S2, STN_KL, STN_WL, STN_RL, STN_ST2, XXXXXXX, STN_ST2, STN_RR, STN_BR, STN_GR, STN_SR, STN_ZR, - XXXXXXX, XXXXXXX, XXXXXXX, STN_A, STN_O, XXXXXXX, STN_E, STN_U, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX - ), - - /* Numeric/punctuation - .--------.--------.--------.--------.--------.--------.--------.--------.--------.--------.--------.--------. - | 1 ! | 2 " | 3 | 4 $ | 5 % | PL | | 6 ^ | 7 & | 8 * | 9 ( | 0 ) | - |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| - | Tab | Ctl-X | Ctl-C | Ctl-V | Ctl-Z | | BS | [ { | ] } | - _ | ; : | \ | | - |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| - | Sft | | | Del | Ins | | | / ? | = + | # ~ | ` | | - |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| - | Ctl | Alt | Sup | NP | Spc | | Sft | Sft | Sup | Alt | Ctl | | - '--------'--------'--------'--------'--------'--------'--------'--------'--------'--------'--------'--------' + /* Numeric/Punctuation (NP) + .--------.--------.--------.--------.--------.--------.--------.--------.--------.--------.--------.--------. + | 1 ! | 2 " | 3 | 4 $ | 5 % | PL | | 6 ^ | 7 & | 8 * | 9 ( | 0 ) | + |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + | Tab | Ctl-X | Ctl-C | Ctl-V | Ctl-Z | | | [ { | ] } | - _ | ; : | \ | | + |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + | Sft | | | Del | Ins | | | / ? | = + | # ~ | ` | | + |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + | Ctl | Alt | Sup | NP | Spc | | Sft | Sft | Sup | Alt | Ctl | | + '--------'--------'--------'--------'--------'--------'--------'--------'--------'--------'--------'--------' */ [_NP] = LAYOUT_planck_grid( - KC_1, KC_2, KC_3, KC_4, KC_5, PL, XXXXXXX, KC_6, KC_7, KC_8, KC_9, KC_0, + KC_1, KC_2, KC_3, KC_4, KC_5, TO(_PL), XXXXXXX, KC_6, KC_7, KC_8, KC_9, KC_0, KC_TAB, C(KC_X), C(KC_C), C(KC_V), C(KC_Z), XXXXXXX, _______, KC_LBRC, KC_RBRC, KC_MINS, KC_SCLN, KC_NUBS, KC_LSFT, XXXXXXX, XXXXXXX, KC_DEL, KC_INS, XXXXXXX, XXXXXXX, KC_SLSH, KC_EQL, KC_NUHS, KC_GRV, XXXXXXX, _______, _______, _______, _______, _______, XXXXXXX, _______, _______, _______, _______, _______, XXXXXXX ), - /* Function/cursor - .--------.--------.--------.--------.--------.--------.--------.--------.--------.--------.--------.--------. - | F1 | F2 | F3 | F4 | F5 | | | Home | Up | End | PgUp | | - |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| - | F6 | F7 | F8 | F9 | F10 | | | Left | Down | Right | PgDn | | - |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| - | Sft | | | F11 | F12 | | | PScr | Break | ScLk | Caps | | - |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| - | Ctl | Alt | Sup | | Spc | | Sft | Sft | Sup | Alt | Ctl | | - '--------'--------'--------'--------'--------'--------'--------'--------'--------'--------'--------'--------' - */ + /* Function/Cursor (FC) + .--------.--------.--------.--------.--------.--------.--------.--------.--------.--------.--------.--------. + | F1 | F2 | F3 | F4 | F5 | | | Home | Up | End | PgUp | | + |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + | F6 | F7 | F8 | F9 | F10 | | | Left | Down | Right | PgDn | | + |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + | Sft | | | F11 | F12 | | | PScr | Break | ScLk | Caps | | + |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + | Ctl | Alt | Sup | | Spc | | Sft | Sft | Sup | Alt | Ctl | | + '--------'--------'--------'--------'--------'--------'--------'--------'--------'--------'--------'--------' + */ [_FC] = LAYOUT_planck_grid( KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, XXXXXXX, XXXXXXX, KC_HOME, KC_UP, KC_END, KC_PGUP, XXXXXXX, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, XXXXXXX, XXXXXXX, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGDN, XXXXXXX, _______, XXXXXXX, XXXXXXX, KC_F11, KC_F12, XXXXXXX, XXXXXXX, KC_PSCR, KC_BRK, KC_SLCK, KC_CAPS, XXXXXXX, _______, _______, _______, XXXXXXX, _______, _______, _______, _______, _______, _______, _______, XXXXXXX + ), + + /* Plover (PL) + .--------.--------.--------.--------.--------.--------.--------.--------.--------.--------.--------.--------. + | # | # | # | # | # | BA | # | # | # | # | # | # | + |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + | S | T | P | H | * | | * | F | P | L | T | D | + |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + | S | K | W | R | * | | * | R | B | G | S | Z | + |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + | | | | A | O | | E | U | | | | | + '--------'--------'--------'--------'--------'--------'--------'--------'--------'--------'--------'--------' + */ + [_PL] = LAYOUT_planck_grid( + STN_NUM, STN_NUM, STN_NUM, STN_NUM, STN_NUM, TO(_BA), STN_NUM, STN_NUM, STN_NUM, STN_NUM, STN_NUM, STN_NUM, + STN_S1, STN_TL, STN_PL, STN_HL, STN_ST1, XXXXXXX, STN_ST1, STN_FR, STN_PR, STN_LR, STN_TR, STN_DR, + STN_S2, STN_KL, STN_WL, STN_RL, STN_ST2, XXXXXXX, STN_ST2, STN_RR, STN_BR, STN_GR, STN_SR, STN_ZR, + XXXXXXX, XXXXXXX, XXXXXXX, STN_A, STN_O, XXXXXXX, STN_E, STN_U, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX ) }; - -#ifdef AUDIO_ENABLE - float plover_on[][2] = SONG(PLOVER_SOUND); - float plover_off[][2] = SONG(PLOVER_GOODBYE_SOUND); -#endif - -bool process_record_user(uint16_t keycode, keyrecord_t *record) { - switch (keycode) { - case PL: - if (record->event.pressed) { - #ifdef AUDIO_ENABLE - stop_all_notes(); - PLAY_SONG(plover_on); - #endif - - layer_off(_NP); - layer_off(_FC); - layer_on(_PL); - - if (!eeconfig_is_enabled()) { - eeconfig_init(); - } - - keymap_config.raw = eeconfig_read_keymap(); - keymap_config.nkro = 1; - eeconfig_update_keymap(keymap_config.raw); - } - return false; - case BA: - if (record->event.pressed) { - #ifdef AUDIO_ENABLE - PLAY_SONG(plover_off); - #endif - - layer_off(_NP); - layer_off(_PL); - layer_off(_FC); - } - return false; - } - return true; -} - void matrix_init_user() { steno_set_mode(STENO_MODE_GEMINI); } - diff --git a/keyboards/planck/keymaps/yttyx/readme.md b/keyboards/planck/keymaps/yttyx/readme.md deleted file mode 100644 index 6661c317046c..000000000000 --- a/keyboards/planck/keymaps/yttyx/readme.md +++ /dev/null @@ -1,68 +0,0 @@ -# Overview - -* Base layer uses the Balance Twelve layout ([reference](https://mathematicalmulticore.wordpress.com/the-keyboard-layout-project/)) -* Plover layer uses the same home position as the base layer ([reference](http://www.openstenoproject.org/)) - -## To build - -``` -make planck/rev6:yttyx -``` - -## To build and flash - -``` -make planck/rev6:yttyx:dfu-util -``` - -## Layers - -### Base - - .--------.--------.--------.--------.--------.--------.--------.--------.--------.--------.--------.--------. - | P | L | C | D | W | | | U | O | Y | K | Q | - |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| - | N | R | S | T | M | | BS | A | E | I | H | V | - |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| - | Z Sft | J | F | G | B | | Ent | ' @ | , < | . > | X Sft | | - |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| - | Ctl | Alt | Sup | NP | Spc | Esc/FC | Sft | Sft | Sup | Alt | Ctl | | - '--------'--------'--------'--------'--------'--------'--------'--------'--------'--------'--------'--------' - -### Plover - - .--------.--------.--------.--------.--------.--------.--------.--------.--------.--------.--------.--------. - | # | # | # | # | # | BA | # | # | # | # | # | # | - |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| - | S | T | P | H | * | | * | F | P | L | T | D | - |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| - | S | K | W | R | * | | * | R | B | G | S | Z | - |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| - | | | | A | O | | E | U | | | | | - '--------'--------'--------'--------'--------'--------'--------'--------'--------'--------'--------'--------' - -### Numeric/Punctuation - - .--------.--------.--------.--------.--------.--------.--------.--------.--------.--------.--------.--------. - | 1 ! | 2 " | 3 £ | 4 $ | 5 % | PL | | 6 ^ | 7 & | 8 * | 9 ( | 0 ) | - |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| - | Tab | Ctl-X | Ctl-C | Ctl-V | Ctl-Z | | BS | [ { | ] } | - _ | ; : | \ | | - |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| - | Sft | | | Del | Ins | | | / ? | = + | # ~ | ` | | - |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| - | Ctl | Alt | Sup | NP | Spc | | Sft | Sft | Sup | Alt | Ctl | | - '--------'--------'--------'--------'--------'--------'--------'--------'--------'--------'--------'--------' - -### Function - - .--------.--------.--------.--------.--------.--------.--------.--------.--------.--------.--------.--------. - | F1 | F2 | F3 | F4 | F5 | | | Home | Up | End | PgUp | | - |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| - | F6 | F7 | F8 | F9 | F10 | | | Left | Down | Right | PgDn | | - |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| - | Sft | | | F11 | F12 | | | PScr | Break | ScLk | Caps | | - |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| - | Ctl | Alt | Sup | | Spc | | Sft | Sft | Sup | Alt | Ctl | | - '--------'--------'--------'--------'--------'--------'--------'--------'--------'--------'--------'--------' - - diff --git a/keyboards/planck/keymaps/yttyx/rules.mk b/keyboards/planck/keymaps/yttyx/rules.mk index 27dac6d4da7d..94f6392790d1 100644 --- a/keyboards/planck/keymaps/yttyx/rules.mk +++ b/keyboards/planck/keymaps/yttyx/rules.mk @@ -1,5 +1,5 @@ # Build Options -AUDIO_ENABLE = yes +AUDIO_ENABLE = no CONSOLE_ENABLE = no EXTRAKEY_ENABLE = no MIDI_ENABLE = no From 1a5dc278bc5aadfce220e18d53ff612d6592a12b Mon Sep 17 00:00:00 2001 From: Zach White Date: Wed, 27 May 2020 00:43:22 -0700 Subject: [PATCH 055/930] Fix running qmk info without any arguments (#9218) --- lib/python/qmk/cli/info.py | 93 ++++++++++++++++++++++---------------- lib/python/qmk/path.py | 7 +-- 2 files changed, 59 insertions(+), 41 deletions(-) diff --git a/lib/python/qmk/cli/info.py b/lib/python/qmk/cli/info.py index 6977673e2983..5e4b391411d1 100755 --- a/lib/python/qmk/cli/info.py +++ b/lib/python/qmk/cli/info.py @@ -72,6 +72,53 @@ def show_matrix(info_json, title_caps=True): print(render_layout(info_json['layouts'][layout_name]['layout'], labels)) +def print_friendly_output(info_json): + """Print the info.json in a friendly text format. + """ + cli.echo('{fg_blue}Keyboard Name{fg_reset}: %s', info_json.get('keyboard_name', 'Unknown')) + cli.echo('{fg_blue}Manufacturer{fg_reset}: %s', info_json.get('manufacturer', 'Unknown')) + if 'url' in info_json: + cli.echo('{fg_blue}Website{fg_reset}: %s', info_json.get('url', '')) + if info_json.get('maintainer', 'qmk') == 'qmk': + cli.echo('{fg_blue}Maintainer{fg_reset}: QMK Community') + else: + cli.echo('{fg_blue}Maintainer{fg_reset}: %s', info_json['maintainer']) + cli.echo('{fg_blue}Keyboard Folder{fg_reset}: %s', info_json.get('keyboard_folder', 'Unknown')) + cli.echo('{fg_blue}Layouts{fg_reset}: %s', ', '.join(sorted(info_json['layouts'].keys()))) + if 'width' in info_json and 'height' in info_json: + cli.echo('{fg_blue}Size{fg_reset}: %s x %s' % (info_json['width'], info_json['height'])) + cli.echo('{fg_blue}Processor{fg_reset}: %s', info_json.get('processor', 'Unknown')) + cli.echo('{fg_blue}Bootloader{fg_reset}: %s', info_json.get('bootloader', 'Unknown')) + + if cli.config.info.layouts: + show_layouts(info_json, True) + + if cli.config.info.matrix: + show_matrix(info_json, True) + + if cli.config_source.info.keymap and cli.config_source.info.keymap != 'config_file': + show_keymap(info_json, True) + + +def print_text_output(info_json): + """Print the info.json in a plain text format. + """ + for key in sorted(info_json): + if key == 'layouts': + cli.echo('{fg_blue}layouts{fg_reset}: %s', ', '.join(sorted(info_json['layouts'].keys()))) + else: + cli.echo('{fg_blue}%s{fg_reset}: %s', key, info_json[key]) + + if cli.config.info.layouts: + show_layouts(info_json, False) + + if cli.config.info.matrix: + show_matrix(info_json, False) + + if cli.config_source.info.keymap and cli.config_source.info.keymap != 'config_file': + show_keymap(info_json, False) + + @cli.argument('-kb', '--keyboard', help='Keyboard to show info for.') @cli.argument('-km', '--keymap', help='Show the layers for a JSON keymap too.') @cli.argument('-l', '--layouts', action='store_true', help='Render the layouts.') @@ -84,8 +131,13 @@ def info(cli): """Compile an info.json for a particular keyboard and pretty-print it. """ # Determine our keyboard(s) + if not cli.config.info.keyboard: + cli.log.error('Missing paramater: --keyboard') + cli.subcommands['info'].print_help() + exit(1) + if not is_keyboard(cli.config.info.keyboard): - cli.log.error('Invalid keyboard: %s!', cli.config.info.keyboard) + cli.log.error('Invalid keyboard: "%s"', cli.config.info.keyboard) exit(1) # Build the info.json file @@ -97,45 +149,10 @@ def info(cli): exit() if cli.args.format == 'text': - for key in sorted(kb_info_json): - if key == 'layouts': - cli.echo('{fg_blue}layouts{fg_reset}: %s', ', '.join(sorted(kb_info_json['layouts'].keys()))) - else: - cli.echo('{fg_blue}%s{fg_reset}: %s', key, kb_info_json[key]) - - if cli.config.info.layouts: - show_layouts(kb_info_json, False) - - if cli.config.info.matrix: - show_matrix(kb_info_json, False) - - if cli.config_source.info.keymap and cli.config_source.info.keymap != 'config_file': - show_keymap(kb_info_json, False) + print_text_output(kb_info_json) elif cli.args.format == 'friendly': - cli.echo('{fg_blue}Keyboard Name{fg_reset}: %s', kb_info_json.get('keyboard_name', 'Unknown')) - cli.echo('{fg_blue}Manufacturer{fg_reset}: %s', kb_info_json.get('manufacturer', 'Unknown')) - if 'url' in kb_info_json: - cli.echo('{fg_blue}Website{fg_reset}: %s', kb_info_json['url']) - if kb_info_json.get('maintainer') == 'qmk': - cli.echo('{fg_blue}Maintainer{fg_reset}: QMK Community') - else: - cli.echo('{fg_blue}Maintainer{fg_reset}: %s', kb_info_json.get('maintainer', 'qmk')) - cli.echo('{fg_blue}Keyboard Folder{fg_reset}: %s', kb_info_json.get('keyboard_folder', 'Unknown')) - cli.echo('{fg_blue}Layouts{fg_reset}: %s', ', '.join(sorted(kb_info_json['layouts'].keys()))) - if 'width' in kb_info_json and 'height' in kb_info_json: - cli.echo('{fg_blue}Size{fg_reset}: %s x %s' % (kb_info_json['width'], kb_info_json['height'])) - cli.echo('{fg_blue}Processor{fg_reset}: %s', kb_info_json.get('processor', 'Unknown')) - cli.echo('{fg_blue}Bootloader{fg_reset}: %s', kb_info_json.get('bootloader', 'Unknown')) - - if cli.config.info.layouts: - show_layouts(kb_info_json, True) - - if cli.config.info.matrix: - show_matrix(kb_info_json, True) - - if cli.config_source.info.keymap and cli.config_source.info.keymap != 'config_file': - show_keymap(kb_info_json, True) + print_friendly_output(kb_info_json) else: cli.log.error('Unknown format: %s', cli.args.format) diff --git a/lib/python/qmk/path.py b/lib/python/qmk/path.py index 8df6f0e91588..591fad034b21 100644 --- a/lib/python/qmk/path.py +++ b/lib/python/qmk/path.py @@ -11,9 +11,10 @@ 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() + if keyboard_name: + keyboard_path = QMK_FIRMWARE / 'keyboards' / keyboard_name + rules_mk = keyboard_path / 'rules.mk' + return rules_mk.exists() def under_qmk_firmware(): From a1af8542c74525d7b5c5ff85052e6afa2589a418 Mon Sep 17 00:00:00 2001 From: squizzler <56064906+squizzler@users.noreply.github.com> Date: Wed, 27 May 2020 13:23:57 +0100 Subject: [PATCH 056/930] RSTHD keymap for Minidox (#9178) * Re-add liles after hard reset * repopulate with keymap * Update keyboards/minidox/keymaps/rsthd_combos/keymap.c Updated how the layers are defined to reduce firmware bloat Co-authored-by: Joel Challis * Update keyboards/minidox/keymaps/rsthd_combos/keymap.c Removed unnecessary key codes Co-authored-by: Joel Challis * Update keyboards/minidox/keymaps/rsthd_combos/keymap.c Removed backslash from each line of the layers in accordance with current convention. Co-authored-by: Ryan * Edit of readme Co-authored-by: Joel Challis Co-authored-by: Ryan --- .../minidox/keymaps/rsthd_combos/config.h | 9 ++ .../minidox/keymaps/rsthd_combos/keymap.c | 109 ++++++++++++++++++ .../minidox/keymaps/rsthd_combos/readme.md | 22 ++++ .../minidox/keymaps/rsthd_combos/rules.mk | 1 + 4 files changed, 141 insertions(+) create mode 100644 keyboards/minidox/keymaps/rsthd_combos/config.h create mode 100644 keyboards/minidox/keymaps/rsthd_combos/keymap.c create mode 100644 keyboards/minidox/keymaps/rsthd_combos/readme.md create mode 100644 keyboards/minidox/keymaps/rsthd_combos/rules.mk diff --git a/keyboards/minidox/keymaps/rsthd_combos/config.h b/keyboards/minidox/keymaps/rsthd_combos/config.h new file mode 100644 index 000000000000..1106412b59a3 --- /dev/null +++ b/keyboards/minidox/keymaps/rsthd_combos/config.h @@ -0,0 +1,9 @@ +#pragma once + +#define USE_SERIAL +#define EE_HANDS + + +#define COMBO_COUNT 10 +#define COMBO_TERM 100 +#define IGNORE_MOD_TAP_INTERRUPT diff --git a/keyboards/minidox/keymaps/rsthd_combos/keymap.c b/keyboards/minidox/keymaps/rsthd_combos/keymap.c new file mode 100644 index 000000000000..a3ba423c699e --- /dev/null +++ b/keyboards/minidox/keymaps/rsthd_combos/keymap.c @@ -0,0 +1,109 @@ +#include QMK_KEYBOARD_H + +// Defines names for use in layer keycodes and the keymap +enum layer_names { + _RSTHD, + _LOWER, + _RAISE, + _ADJUST +}; + +enum combo_events { + TOP_L, + TOP_R, + MID_L, + MID_R, + BOT_L, + BOT_R, + HN_QUOT, + TOP_CTR, + MID_CTR, + BOT_CTR, +}; + +const uint16_t PROGMEM fk_combo[] = {KC_F, KC_K, COMBO_END}; +const uint16_t PROGMEM zl_combo[] = {KC_Z, KC_L, COMBO_END}; +const uint16_t PROGMEM hd_combo[] = {KC_H, KC_D, COMBO_END}; +const uint16_t PROGMEM mn_combo[] = {KC_M, KC_N, COMBO_END}; +const uint16_t PROGMEM pb_combo[] = {KC_P, KC_B, COMBO_END}; +const uint16_t PROGMEM xw_combo[] = {KC_X, KC_W, COMBO_END}; +const uint16_t PROGMEM hn_combo[] = {KC_H, KC_N, COMBO_END}; +const uint16_t PROGMEM kz_combo[] = {KC_K, KC_Z, COMBO_END}; +const uint16_t PROGMEM dm_combo[] = {KC_D, KC_M, COMBO_END}; +const uint16_t PROGMEM bx_combo[] = {KC_B, KC_X, COMBO_END}; + +combo_t key_combos[COMBO_COUNT] = { + [TOP_L] = COMBO(fk_combo, KC_ESC), + [TOP_R] = COMBO(zl_combo, KC_AT), + [MID_L] = COMBO(hd_combo, KC_TAB), + [MID_R] = COMBO_ACTION(mn_combo), + [BOT_L] = COMBO(pb_combo, KC_HASH), + [BOT_R] = COMBO(xw_combo, KC_AMPR), + [HN_QUOT] = COMBO(hn_combo, KC_QUOT), + [TOP_CTR] = COMBO_ACTION(kz_combo), + [MID_CTR] = COMBO_ACTION(dm_combo), + [BOT_CTR] = COMBO_ACTION(bx_combo), +}; + + void process_combo_event(uint8_t combo_index, bool pressed) { + switch(combo_index) { + case MID_R: + if (pressed) { + tap_code16(LALT(KC_3)); + } + break; + case TOP_CTR: + if (pressed) { + set_oneshot_mods(MOD_LGUI); + } + break; + case MID_CTR: + if (pressed) { + set_oneshot_mods(MOD_LALT); + } + break; + case BOT_CTR: + if (pressed) { + set_oneshot_mods(MOD_LCTL); + } + break; + } + } + +// Defines for task manager and such +// For insertion in keymap +#define KILL LGUI(LALT(KC_ESC)) //Force quit controls +#define SCRCAP LCTL(LSFT(LGUI(KC_5))) //Screen capture controls +#define DSK_LFT LGUI(LCTL(KC_LEFT)) +#define DSK_RT LGUI(LCTL(KC_RIGHT)) + + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + +[_RSTHD] = LAYOUT( + KC_J, KC_C, KC_Y, KC_F, KC_K, KC_Z, KC_L, KC_COMM, KC_U, KC_Q, + KC_R, KC_S, KC_T, KC_H, KC_D, KC_M, KC_N, KC_A, KC_I , KC_O, + LCTL_T(KC_SLSH), LALT_T(KC_V), LGUI_T(KC_G), KC_P, KC_B, KC_X, KC_W, RGUI_T(KC_DOT), RALT_T(KC_SCLN),RCTL_T(KC_MINS), + OSM(MOD_LSFT), LT(_LOWER, KC_BSPC), KC_E, KC_SPC, LT(_RAISE, KC_ENT), OSM(MOD_LSFT) +), +[_RAISE] = LAYOUT( + KC_PAST, KC_7, KC_8, KC_9, KC_PLUS, KC_NUBS, LALT(KC_2), _______, LALT(KC_4), KC_DLR, + KC_CIRC, KC_4, KC_5, KC_6, KC_EQL, LSFT(KC_NUBS), KC_GRV, KC_TILD, KC_PIPE, KC_BSLS, + _______, RALT_T(KC_1), KC_2, KC_3,KC_PERC, _______, _______, _______, _______, _______, + _______, MO(_ADJUST), KC_0, _______, _______, _______ +), +[_LOWER] = LAYOUT( + _______, KC_LBRC, KC_QUES, KC_RBRC, KC_BRMU, KC_PGUP, KC_HOME, KC_UP, KC_END, KC_VOLU, + KC_ESC, KC_LPRN, KC_EXLM, KC_RPRN, KC_BRMD, KC_PGDN, KC_LEFT, KC_DOWN, KC_RIGHT, KC_VOLD, + _______, _______, _______, _______, _______, _______, KC_MPRV, KC_MPLY, KC_MNXT, KC__MUTE, + _______, _______, _______, KC_DEL, MO(_ADJUST), _______ +), +[_ADJUST] = LAYOUT( + _______, KC_F7, KC_F8, KC_F9, SCRCAP, _______, KC_F10, KC_F11, KC_F12, _______, + _______, KC_F1, KC_F2, KC_F3, _______, _______, KC_F4, KC_F5, KC_F6, _______, + OSM(MOD_LCTL),_______, _______, _______, RESET, KILL, _______, _______, _______, OSM(MOD_RCTL), + _______, _______, _______, _______, _______, _______ +) + +}; diff --git a/keyboards/minidox/keymaps/rsthd_combos/readme.md b/keyboards/minidox/keymaps/rsthd_combos/readme.md new file mode 100644 index 000000000000..877d7059e78b --- /dev/null +++ b/keyboards/minidox/keymaps/rsthd_combos/readme.md @@ -0,0 +1,22 @@ +# The RSTHD Layout for minidox - Empowered with Combos +An attempt at porting Xuming Zeng’s [RSTHD](https://xsznix.wordpress.com/2016/05/16/introducing-the-rsthd-layout/) from the Ergodox to the Minidox. +[KLE Link](http://www.keyboard-layout-editor.com/#/gists/3161700bf3573325804716b2bdafa50f) +![RSTHD empowered with chords](https://live.staticflickr.com/65535/49926249372_77ab8eba95_z.jpg) + +**Symbols and media/system keys work as shown with keyboard identified by MacOS as "International/ISO" hardware (not ANSI) and "Input Source" within Preferences set to "British" (Apple).** + +The key feature on this keymap, aside from the layout, is to telescope seven columns into five using combos. The top row and the bottom row form the basis of the number and nav layers respectively. Combos are shown in the above drawing using paired blue legends. +## Writing specific +As a hobby writer I have intended to make a layout that favours prose rather than code, with symbols used in everyday writing such as various (Western) currencies in easy reach. Hardcore coders will no doubt move their favourite symbols to where they feel most comfortable! +The thumb mounted 'E' made it difficult to adapt other keymaps to this letter layout and eventually drove this fundamental redesign. I have strove to minimise the risk of ‘negligent discharge’ of functions whilst typing - whose interruption which can be fatal to creative flow - and which my previous layouts adapted from various ones in the repository seemed prone. To this end hold-tap keys are not placed on the home row nor thumb operated 'space' and 'E' keys, shift gets its own keys, and I use combos to create a useful number of virtual keys. +## Combos! +I employ combos to simulate the missing inner and outer columns that the minidox lacks relative to the Ergodox. All combos operate on keys within the inner pair of columns of each side because during normal typing the index finger has to cover both these columns, making press events of adjacent keys unlikely to overlap. They are assigned names within the keymap that relate to their position on the keyboard (not to my assigned functions) so their functions can be changed at will to suit user preference without confusing the keymap. +- The six chords spanning the neighbouring two columns of each half correspond to keys in the outer columns of the Ergodox. +- A further four chords span the central divide, using pairs of letters that infrequently occur consecutively. + - The three combos spanning adjacent keys over the central divide simulate the mirrored inboard columns of the RSTHD map for Ergodox, and are set to chamber one shot of their respective modifiers. + - The quotation mark is a combo of both resting keys of the index fingers. This is inspired by ‘air quotes’ used in conversation. +I am confident these combos will rarely be accidentally triggered. If this occurs, try reducing the tapping term. +## Other features +- Number pad on left. This confers many benefits for the RSTHD layout, such as leaving key symbols on the primary layer uncovered that are useful for numbers (,.:-). On this layer ‘E’ becomes ‘0’. +- The nav cluster is now on the right hand and, upon activation ’space’ becomes ‘del’, which allows rapid navigation and editing of text. +- Pair of one shot shift keys, since mod-tap shift assigned to letters is a bad idea IMO. Some users might choose to move the shift onto the bottom left and right combos which corresponds to where shift lives in the outer columns of the ergodox layout. diff --git a/keyboards/minidox/keymaps/rsthd_combos/rules.mk b/keyboards/minidox/keymaps/rsthd_combos/rules.mk new file mode 100644 index 000000000000..ab1e438182a3 --- /dev/null +++ b/keyboards/minidox/keymaps/rsthd_combos/rules.mk @@ -0,0 +1 @@ +COMBO_ENABLE = yes From cb9be8a9dc33a65750ea49505d4971555a45de40 Mon Sep 17 00:00:00 2001 From: onefiftynine Date: Wed, 27 May 2020 20:03:02 -0500 Subject: [PATCH 057/930] Fix projectkb/alice LED indicator (#9226) Keyboard pre initialization code for LED pins. --- keyboards/projectkb/alice/alice.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/keyboards/projectkb/alice/alice.c b/keyboards/projectkb/alice/alice.c index b82e2050e397..22e387761594 100644 --- a/keyboards/projectkb/alice/alice.c +++ b/keyboards/projectkb/alice/alice.c @@ -1,9 +1,11 @@ #include "alice.h" -void matrix_init_board(void){ +void keyboard_pre_init_kb(void) { setPinOutput(INDICATOR_PIN_0); setPinOutput(INDICATOR_PIN_1); setPinOutput(INDICATOR_PIN_2); + + keyboard_pre_init_user(); } bool led_update_kb(led_t led_state) { From 13206b2f87b1bce87d58cdfdddb1bcc7b58e4a24 Mon Sep 17 00:00:00 2001 From: Ryan Date: Thu, 28 May 2020 11:27:14 +1000 Subject: [PATCH 058/930] Community layout support for KBDpad Mk.I (#9220) * Community layout support for KBDpad Mk.I * Matching spacing --- keyboards/kbdfans/kbdpad/mk1/info.json | 108 ++++++++++++++++-- .../kbdpad/mk1/keymaps/default/keymap.c | 15 +-- keyboards/kbdfans/kbdpad/mk1/mk1.h | 63 +++++++--- keyboards/kbdfans/kbdpad/mk1/readme.md | 6 +- keyboards/kbdfans/kbdpad/mk1/rules.mk | 2 + 5 files changed, 159 insertions(+), 35 deletions(-) diff --git a/keyboards/kbdfans/kbdpad/mk1/info.json b/keyboards/kbdfans/kbdpad/mk1/info.json index 4f0da62e83c5..68e8f6851512 100644 --- a/keyboards/kbdfans/kbdpad/mk1/info.json +++ b/keyboards/kbdfans/kbdpad/mk1/info.json @@ -1,12 +1,100 @@ { - "keyboard_name": "KBDfans KBDPad MKI", - "url": "https://kbdfans.com/products/kbdfans-pad-custom-mechanical-keyboard-diy-kit", - "maintainer": "qmk", - "width": 4, - "height": 6.25, - "layouts": { - "LAYOUT": { - "layout": [{"x":2, "y":0}, {"x":3, "y":0}, {"x":0, "y":1.25}, {"x":1, "y":1.25}, {"x":2, "y":1.25}, {"x":3, "y":1.25}, {"x":0, "y":2.25}, {"x":1, "y":2.25}, {"x":2, "y":2.25}, {"x":0, "y":3.25}, {"x":1, "y":3.25}, {"x":2, "y":3.25}, {"x":3, "y":2.25, "h":2}, {"x":0, "y":4.25}, {"x":1, "y":4.25}, {"x":2, "y":4.25}, {"x":0, "y":5.25, "w":2}, {"x":2, "y":5.25}, {"x":3, "y":4.25, "h":2}] - } - } + "keyboard_name": "KBDfans KBDPad MKI", + "url": "https://kbdfans.com/products/kbdfans-pad-custom-mechanical-keyboard-diy-kit", + "maintainer": "qmk", + "width": 4, + "height": 6.25, + "layouts": { + "LAYOUT": { + "layout": [ + {"x":2, "y":0}, + {"x":3, "y":0}, + + {"x":0, "y":1.25}, + {"x":1, "y":1.25}, + {"x":2, "y":1.25}, + {"x":3, "y":1.25}, + + {"x":0, "y":2.25}, + {"x":1, "y":2.25}, + {"x":2, "y":2.25}, + + {"x":0, "y":3.25}, + {"x":1, "y":3.25}, + {"x":2, "y":3.25}, + {"x":3, "y":2.25, "h":2}, + + {"x":0, "y":4.25}, + {"x":1, "y":4.25}, + {"x":2, "y":4.25}, + + {"x":0, "y":5.25, "w":2}, + {"x":2, "y":5.25}, + {"x":3, "y":4.25, "h":2} + ] + }, + "LAYOUT_numpad_6x4": { + "layout": [ + {"x":0, "y":0}, + {"x":1, "y":0}, + {"x":2, "y":0}, + {"x":3, "y":0}, + + {"x":0, "y":1.25}, + {"x":1, "y":1.25}, + {"x":2, "y":1.25}, + {"x":3, "y":1.25}, + + {"x":0, "y":2.25}, + {"x":1, "y":2.25}, + {"x":2, "y":2.25}, + + {"x":0, "y":3.25}, + {"x":1, "y":3.25}, + {"x":2, "y":3.25}, + {"x":3, "y":2.25, "h":2}, + + {"x":0, "y":4.25}, + {"x":1, "y":4.25}, + {"x":2, "y":4.25}, + + {"x":0, "y":5.25, "w":2}, + {"x":2, "y":5.25}, + {"x":3, "y":4.25, "h":2} + ] + }, + "LAYOUT_ortho_6x4": { + "layout": [ + {"x":0, "y":0}, + {"x":1, "y":0}, + {"x":2, "y":0}, + {"x":3, "y":0}, + + {"x":0, "y":1.25}, + {"x":1, "y":1.25}, + {"x":2, "y":1.25}, + {"x":3, "y":1.25}, + + {"x":0, "y":2.25}, + {"x":1, "y":2.25}, + {"x":2, "y":2.25}, + {"x":3, "y":2.25}, + + {"x":0, "y":3.25}, + {"x":1, "y":3.25}, + {"x":2, "y":3.25}, + {"x":3, "y":3.25}, + + {"x":0, "y":4.25}, + {"x":1, "y":4.25}, + {"x":2, "y":4.25}, + {"x":3, "y":4.25}, + + {"x":0, "y":5.25}, + {"x":1, "y":5.25}, + {"x":2, "y":5.25}, + {"x":3, "y":5.25} + ] + } + } } diff --git a/keyboards/kbdfans/kbdpad/mk1/keymaps/default/keymap.c b/keyboards/kbdfans/kbdpad/mk1/keymaps/default/keymap.c index 2d5053e0b6a7..58f2c597e7af 100644 --- a/keyboards/kbdfans/kbdpad/mk1/keymaps/default/keymap.c +++ b/keyboards/kbdfans/kbdpad/mk1/keymaps/default/keymap.c @@ -17,11 +17,12 @@ #include QMK_KEYBOARD_H const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { -[0] = LAYOUT(\ - KC_DEL, 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) \ + [0] = LAYOUT( + KC_DEL, 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 + ) }; diff --git a/keyboards/kbdfans/kbdpad/mk1/mk1.h b/keyboards/kbdfans/kbdpad/mk1/mk1.h index ace7466f5484..36b028727854 100644 --- a/keyboards/kbdfans/kbdpad/mk1/mk1.h +++ b/keyboards/kbdfans/kbdpad/mk1/mk1.h @@ -13,26 +13,59 @@ * 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. +// This is 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( \ - k52, k53, \ - k40, k41, k42, k43, \ - k30, k31, k32, \ - k20, k21, k22, k23, \ - k10, k11, k12, \ - k00, k02, k03 \ -){ \ - { k00, KC_NO, k02, k03 }, \ - { k10, k11, k12, KC_NO }, \ - { k20, k21, k22, k23 }, \ - { k30, k31, k32, KC_NO }, \ - { k40, k41, k42, k43 }, \ - { KC_NO, KC_NO, k52, k53 }, \ +#define LAYOUT( \ + k52, k53, \ + k40, k41, k42, k43, \ + k30, k31, k32, \ + k20, k21, k22, k23, \ + k10, k11, k12, \ + k00, k02, k03 \ +) { \ + { k00, KC_NO, k02, k03 }, \ + { k10, k11, k12, KC_NO }, \ + { k20, k21, k22, k23 }, \ + { k30, k31, k32, KC_NO }, \ + { k40, k41, k42, k43 }, \ + { KC_NO, KC_NO, k52, k53 } \ +} + +#define LAYOUT_numpad_6x4( \ + k50, k51, k52, k53, \ + k40, k41, k42, k43, \ + k30, k31, k32, \ + k20, k21, k22, k23, \ + k10, k11, k12, \ + k00, k02, k03 \ +) { \ + { k00, KC_NO, k02, k03 }, \ + { k10, k11, k12, KC_NO }, \ + { k20, k21, k22, k23 }, \ + { k30, k31, k32, KC_NO }, \ + { k40, k41, k42, k43 }, \ + { k50, k51, k52, k53 } \ +} + +#define LAYOUT_ortho_6x4( \ + k50, k51, k52, k53, \ + k40, k41, k42, k43, \ + k30, k31, k32, k33, \ + k20, k21, k22, k23, \ + k10, k11, k12, k13, \ + k00, k01, k02, k03 \ +) { \ + { k00, k01, k02, k03 }, \ + { k10, k11, k12, k13 }, \ + { k20, k21, k22, k23 }, \ + { k30, k31, k32, k33 }, \ + { k40, k41, k42, k43 }, \ + { k50, k51, k52, k53 } \ } diff --git a/keyboards/kbdfans/kbdpad/mk1/readme.md b/keyboards/kbdfans/kbdpad/mk1/readme.md index 2424d4d4d61b..27194e683f47 100644 --- a/keyboards/kbdfans/kbdpad/mk1/readme.md +++ b/keyboards/kbdfans/kbdpad/mk1/readme.md @@ -1,10 +1,10 @@ # KBDPad MKI -Custom numpad. +Custom numpad. The MKI shares the same ATmega32A and matrix layout as the newer V2 PCB (not to be confused with the MKII, which uses an ATmega32U2!). * Keyboard Maintainer: [MechMerlin](https://github.com/mechmerlin) -* Hardware Supported: KBDPad MKI -* Hardware Availability: [KBDfans](https://kbdfans.com/products/kbdfans-pad-custom-mechanical-keyboard-diy-kit) +* Hardware Supported: KBDPad MKI, KBDPad V2 +* Hardware Availability: [KBDfans](https://kbdfans.com/collections/20/products/kbdfans-kbdpad-pcb-v2) Make example for this keyboard (after setting up your build environment): diff --git a/keyboards/kbdfans/kbdpad/mk1/rules.mk b/keyboards/kbdfans/kbdpad/mk1/rules.mk index 6b4c1f6bae0f..679ac08fa8b7 100644 --- a/keyboards/kbdfans/kbdpad/mk1/rules.mk +++ b/keyboards/kbdfans/kbdpad/mk1/rules.mk @@ -20,3 +20,5 @@ COMMAND_ENABLE = no BACKLIGHT_ENABLE = yes RGBLIGHT_ENABLE = no # PCB has underglow LEDs, but case doesn't let them show. WS2812_DRIVER = i2c + +LAYOUTS = ortho_6x4 numpad_6x4 From 5263dfd46520bd40af1d2b39364436df1c96a111 Mon Sep 17 00:00:00 2001 From: Drashna Jaelre Date: Thu, 28 May 2020 01:26:53 -0700 Subject: [PATCH 059/930] Keyboards/zsa updates (#9214) --- keyboards/ergodox_ez/config.h | 8 +- keyboards/ergodox_ez/ergodox_ez.h | 15 +-- keyboards/ergodox_ez/info.json | 3 +- keyboards/ergodox_ez/keymaps/default/keymap.c | 104 ++++++------------ keyboards/ergodox_ez/readme.md | 49 +++++---- keyboards/planck/ez/ez.h | 4 + 6 files changed, 76 insertions(+), 107 deletions(-) diff --git a/keyboards/ergodox_ez/config.h b/keyboards/ergodox_ez/config.h index e60101e5e2ea..8ef600b08922 100644 --- a/keyboards/ergodox_ez/config.h +++ b/keyboards/ergodox_ez/config.h @@ -16,8 +16,7 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -#ifndef ERGODOX_EZ_CONFIG_H -#define ERGODOX_EZ_CONFIG_H +#pragma once #include "config_common.h" @@ -25,9 +24,8 @@ along with this program. If not, see . #define VENDOR_ID 0xFEED #define PRODUCT_ID 0x1307 #define DEVICE_VER 0x0001 -#define MANUFACTURER ErgoDox EZ +#define MANUFACTURER ZSA Technology Labs Inc #define PRODUCT ErgoDox EZ -#define DESCRIPTION QMK keyboard firmware for Ergodox EZ /* key matrix size */ #define MATRIX_ROWS 14 @@ -149,5 +147,3 @@ along with this program. If not, see . //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION //#define DEBUG_MATRIX_SCAN_RATE - -#endif diff --git a/keyboards/ergodox_ez/ergodox_ez.h b/keyboards/ergodox_ez/ergodox_ez.h index 7ff62d38a16b..88a0a2ee9fca 100644 --- a/keyboards/ergodox_ez/ergodox_ez.h +++ b/keyboards/ergodox_ez/ergodox_ez.h @@ -1,5 +1,4 @@ -#ifndef ERGODOX_EZ_H -#define ERGODOX_EZ_H +#pragma once #include "quantum.h" #include @@ -65,8 +64,7 @@ inline void ergodox_left_led_2_off(void) { ergodox_left_led_2 = 0; } inline void ergodox_left_led_3_off(void) { ergodox_left_led_3 = 0; } #endif // LEFT_LEDS -inline void ergodox_led_all_on(void) -{ +inline void ergodox_led_all_on(void) { ergodox_board_led_on(); ergodox_right_led_1_on(); ergodox_right_led_2_on(); @@ -100,19 +98,20 @@ inline void ergodox_right_led_set(uint8_t led, uint8_t n) { (OCR1C = n); } -inline void ergodox_led_all_set(uint8_t n) -{ +inline void ergodox_led_all_set(uint8_t n) { ergodox_right_led_1_set(n); ergodox_right_led_2_set(n); ergodox_right_led_3_set(n); } -#ifdef ORYX_CONFIGURATOR enum ergodox_ez_keycodes { LED_LEVEL = SAFE_RANGE, TOGGLE_LAYER_COLOR, EZ_SAFE_RANGE, }; + +#ifndef WEBUSB_ENABLE +# define WEBUSB_PAIR KC_NO #endif typedef union { @@ -271,5 +270,3 @@ extern keyboard_config_t keyboard_config; { R05, R15, R25, R35, R45, R55 }, \ { R06, R16, R26, R36, R46, KC_NO } \ } - -#endif diff --git a/keyboards/ergodox_ez/info.json b/keyboards/ergodox_ez/info.json index e543206fedc6..61ba58051da4 100644 --- a/keyboards/ergodox_ez/info.json +++ b/keyboards/ergodox_ez/info.json @@ -1,7 +1,8 @@ { "keyboard_name": "ErgoDox EZ", "url": "ergodox-ez.com", - "maintainer": "ZSA", + "maintainer": "ZSA via Drashna", + "manufacturer": "ZSA Technology Labs Inc", "width": 17, "height": 8, diff --git a/keyboards/ergodox_ez/keymaps/default/keymap.c b/keyboards/ergodox_ez/keymaps/default/keymap.c index 20c78bd57e3a..9079e48fcb3a 100644 --- a/keyboards/ergodox_ez/keymaps/default/keymap.c +++ b/keyboards/ergodox_ez/keymaps/default/keymap.c @@ -1,17 +1,18 @@ #include QMK_KEYBOARD_H #include "version.h" -#define BASE 0 // default layer -#define SYMB 1 // symbols -#define MDIA 2 // media keys +enum layers { + BASE, // default layer + SYMB, // symbols + MDIA, // media keys +}; enum custom_keycodes { #ifdef ORYX_CONFIGURATOR - EPRM = EZ_SAFE_RANGE, + VRSN = EZ_SAFE_RANGE, #else - EPRM = SAFE_RANGE, + VRSN = SAFE_RANGE, #endif - VRSN, RGB_SLD }; @@ -37,25 +38,16 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | |ace | End | | PgDn | | | * `--------------------' `----------------------' */ -[BASE] = LAYOUT_ergodox( +[BASE] = LAYOUT_ergodox_pretty( // left hand - KC_EQL, KC_1, KC_2, KC_3, KC_4, KC_5, KC_LEFT, - KC_DEL, KC_Q, KC_W, KC_E, KC_R, KC_T, TG(SYMB), - KC_BSPC, KC_A, KC_S, KC_D, KC_F, KC_G, - KC_LSFT, CTL_T(KC_Z), KC_X, KC_C, KC_V, KC_B, ALL_T(KC_NO), - LT(SYMB,KC_GRV), KC_QUOT, LALT(KC_LSFT), KC_LEFT, KC_RGHT, - ALT_T(KC_APP), KC_LGUI, - KC_HOME, - KC_SPC, KC_BSPC, KC_END, - // right hand - KC_RGHT, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, - TG(SYMB), KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS, - KC_H, KC_J, KC_K, KC_L, LT(MDIA, KC_SCLN), GUI_T(KC_QUOT), - MEH_T(KC_NO), KC_N, KC_M, KC_COMM, KC_DOT, CTL_T(KC_SLSH), KC_RSFT, - KC_UP, KC_DOWN, KC_LBRC, KC_RBRC, TT(SYMB), - KC_LALT, CTL_T(KC_ESC), - KC_PGUP, - KC_PGDN, KC_TAB, KC_ENT + KC_EQL, KC_1, KC_2, KC_3, KC_4, KC_5, KC_LEFT, KC_RGHT, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, + KC_DEL, KC_Q, KC_W, KC_E, KC_R, KC_T, TG(SYMB), TG(SYMB), KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS, + KC_BSPC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, LT(MDIA, KC_SCLN), GUI_T(KC_QUOT), + KC_LSFT, CTL_T(KC_Z), KC_X, KC_C, KC_V, KC_B, ALL_T(KC_NO), MEH_T(KC_NO), KC_N, KC_M, KC_COMM, KC_DOT, CTL_T(KC_SLSH), KC_RSFT, + LT(SYMB,KC_GRV), KC_QUOT, LALT(KC_LSFT), KC_LEFT, KC_RGHT, KC_UP, KC_DOWN, KC_LBRC, KC_RBRC, TT(SYMB), + ALT_T(KC_APP), KC_LGUI, KC_LALT, CTL_T(KC_ESC), + KC_HOME, KC_PGUP, + KC_SPC, KC_BSPC, KC_END, KC_PGDN, KC_TAB, KC_ENT ), /* Keymap 1: Symbol Layer * @@ -78,25 +70,16 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | | * `--------------------' `--------------------' */ -[SYMB] = LAYOUT_ergodox( +[SYMB] = LAYOUT_ergodox_pretty( // left hand - VRSN, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_TRNS, - KC_TRNS, KC_EXLM, KC_AT, KC_LCBR, KC_RCBR, KC_PIPE, KC_TRNS, - KC_TRNS, KC_HASH, KC_DLR, KC_LPRN, KC_RPRN, KC_GRV, - KC_TRNS, KC_PERC, KC_CIRC, KC_LBRC, KC_RBRC, KC_TILD, KC_TRNS, - EPRM, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - RGB_MOD, KC_TRNS, - KC_TRNS, - RGB_VAD, RGB_VAI, KC_TRNS, - // right hand - KC_TRNS, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, - KC_TRNS, KC_UP, KC_7, KC_8, KC_9, KC_ASTR, KC_F12, - KC_DOWN, KC_4, KC_5, KC_6, KC_PLUS, KC_TRNS, - KC_TRNS, KC_AMPR, KC_1, KC_2, KC_3, KC_BSLS, KC_TRNS, - KC_TRNS, KC_DOT, KC_0, KC_EQL, KC_TRNS, - RGB_TOG, RGB_SLD, - KC_TRNS, - KC_TRNS, RGB_HUD, RGB_HUI + VRSN, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_TRNS, KC_TRNS, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, + KC_TRNS, KC_EXLM, KC_AT, KC_LCBR, KC_RCBR, KC_PIPE, KC_TRNS, KC_TRNS, KC_UP, KC_7, KC_8, KC_9, KC_ASTR, KC_F12, + KC_TRNS, KC_HASH, KC_DLR, KC_LPRN, KC_RPRN, KC_GRV, KC_DOWN, KC_4, KC_5, KC_6, KC_PLUS, KC_TRNS, + KC_TRNS, KC_PERC, KC_CIRC, KC_LBRC, KC_RBRC, KC_TILD, KC_TRNS, KC_TRNS, KC_AMPR, KC_1, KC_2, KC_3, KC_BSLS, KC_TRNS, + EEP_RST, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_DOT, KC_0, KC_EQL, KC_TRNS, + RGB_MOD, KC_TRNS, RGB_TOG, RGB_SLD, + KC_TRNS, KC_TRNS, + RGB_VAD, RGB_VAI, KC_TRNS, KC_TRNS, RGB_HUD, RGB_HUI ), /* Keymap 2: Media and mouse keys * @@ -119,34 +102,23 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | | * `--------------------' `--------------------' */ -[MDIA] = LAYOUT_ergodox( +[MDIA] = LAYOUT_ergodox_pretty( // left hand - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_MS_U, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_MS_L, KC_MS_D, KC_MS_R, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_BTN1, KC_BTN2, - KC_TRNS, KC_TRNS, - KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, - // right hand - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MPLY, - KC_TRNS, KC_TRNS, KC_TRNS, KC_MPRV, KC_MNXT, KC_TRNS, KC_TRNS, - KC_VOLU, KC_VOLD, KC_MUTE, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, - KC_TRNS, - KC_TRNS, KC_TRNS, KC_WBAK + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_MS_U, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 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, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 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_MPRV, KC_MNXT, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_BTN1, KC_BTN2, KC_VOLU, KC_VOLD, KC_MUTE, KC_TRNS, KC_TRNS, + + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_WBAK ), }; bool process_record_user(uint16_t keycode, keyrecord_t *record) { if (record->event.pressed) { switch (keycode) { - case EPRM: - eeconfig_init(); - return false; case VRSN: SEND_STRING (QMK_KEYBOARD "/" QMK_KEYMAP " @ " QMK_VERSION); return false; @@ -161,7 +133,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { } // Runs just one time when the keyboard initializes. -void matrix_init_user(void) { +void keyboard_post_init_user(void) { #ifdef RGBLIGHT_COLOR_LAYER_0 rgblight_setrgb(RGBLIGHT_COLOR_LAYER_0); #endif @@ -179,10 +151,6 @@ layer_state_t layer_state_set_user(layer_state_t state) { case 0: #ifdef RGBLIGHT_COLOR_LAYER_0 rgblight_setrgb(RGBLIGHT_COLOR_LAYER_0); - #else - #ifdef RGBLIGHT_ENABLE - rgblight_init(); - #endif #endif break; case 1: diff --git a/keyboards/ergodox_ez/readme.md b/keyboards/ergodox_ez/readme.md index bce8ff3c6ffe..796e96ce531f 100644 --- a/keyboards/ergodox_ez/readme.md +++ b/keyboards/ergodox_ez/readme.md @@ -1,41 +1,44 @@ # ErgoDox EZ -The Ez uses the [Teensy Loader](https://www.pjrc.com/teensy/loader.html). +![ErgoDox EZ](http://www.coolthings.com/wp-content/uploads/2017/05/ergodox-ez-2.jpg) -Linux users need to modify udev rules as described on the [Teensy -Linux page]. Some distributions provide a binary, maybe called -`teensy-loader-cli`. +The ErgoDox EZ is a mass produced version of the original ErgoDox keyboard, with optional support for RGB Light (Shine) or RGB Matrix (Glow). -[Teensy Linux page]: https://www.pjrc.com/teensy/loader_linux.html +* Keyboard Maintainer: [ZSA Technology Labs Inc](https://github.com/zsa), Firmware maintained by [drashna](https://github.com/drashna) +* Hardware Supported: Original ErgoDox, ErgoDox EZ +* Hardware Availability: [ErgoDox EZ](https://ergodox-ez.com/), [ErgoDox.io](https://ergodox.io) -To flash the firmware: +Make example for this keyboard (after setting up your build environment): - - Build the firmware with `make :`, for example `make ergodox_ez:default` + make ergodox_ez:default:flash - - This will result in a hex file called `ergodox_ez_keymapname.hex`, e.g. - `ergodox_ez_default.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). - - Start the teensy loader. +## Oryx Configuation - - Load the .hex file into it. +If you have `ORYX_CONFIGURATOR` defined in your keymap's `config.h`, this enables a number of the built in options from the Oryx Configurator. - - Press the Reset button by inserting a paperclip gently into the reset hole - in the top right corner. +### Indicator LEDs - - Click the button in the Teensy app to download the firmware. +You can use the `LED_LEVEL` keycode to cycle through the brightness levels for the LEDs on the top right of the keyboard. These settings are saved in eeprom (persistant memory). -See also [video demonstration](https://www.youtube.com/watch?v=9PyiGUO9_KQ) using Teensy in auto mode. +Alternatively, you can set the brightness by calling the following functions: -To flash with ´teensy-loader-cli´: +```c +void ergodox_led_all_set(uint8_t level); +void ergodox_right_led_1_set(uint8_t level); +void ergodox_right_led_2_set(uint8_t level); +void ergodox_right_led_3_set(uint8_t level); +``` - - Build the firmware with `make keymapname`, for example `make default` +These settings are not persistent, so you'd need to reset it every time the board starts. - - Run ´teensy_loader_cli -mmcu=atmega32u4 -w ergodox_ez_.hex´ +These are on a 0-255 scale - - Press the Reset button by inserting a paperclip gently into the reset hole - in the top right corder. +### RGB Matrix Features -## Settings +If you're using the Smart LED (layer indication) feature from the Oryx Configurator, you want to make sure that you enable these options by adding `#define ORYX_CONFIGURATOR` to your keymap's `config.h`. -You may want to enable QMK_KEYS_PER_SCAN because the Ergodox has a relatively -slow scan rate. +This changes the `RGB_TOG` keycode so that it will toggle the lights on and off, in a way that will allow the Smart LEDs to continue to work, even with the rest of the LEDs turned off. + +Additionally, a new keycode has been added to toggle the Smart LEDs. Use `TOGGLE_LAYER_COLOR`, if you aren't already. diff --git a/keyboards/planck/ez/ez.h b/keyboards/planck/ez/ez.h index 29bcc1b83c37..352deb64765d 100644 --- a/keyboards/planck/ez/ez.h +++ b/keyboards/planck/ez/ez.h @@ -64,6 +64,10 @@ enum planck_ez_keycodes { EZ_SAFE_RANGE, }; +#ifndef WEBUSB_ENABLE +# define WEBUSB_PAIR KC_NO +#endif + typedef union { uint32_t raw; struct { From 7b8a013826ad90714a05ea522de53adf964ab3b9 Mon Sep 17 00:00:00 2001 From: Manna Harbour <51143715+manna-harbour@users.noreply.github.com> Date: Fri, 29 May 2020 03:02:12 +1000 Subject: [PATCH 060/930] Fix crkbd slave matrix print to require debug_matrix (#9217) * Fix crkbd slave matrix print to require debug_matrix * Remove redundant include Co-authored-by: Ryan Co-authored-by: Ryan --- keyboards/crkbd/rev1/split_scomm.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/keyboards/crkbd/rev1/split_scomm.c b/keyboards/crkbd/rev1/split_scomm.c index a1fe6ba5b823..12b00f6840f6 100644 --- a/keyboards/crkbd/rev1/split_scomm.c +++ b/keyboards/crkbd/rev1/split_scomm.c @@ -8,7 +8,7 @@ #include #include "serial.h" #ifdef CONSOLE_ENABLE - #include + #include "debug.h" #endif uint8_t volatile serial_slave_buffer[SERIAL_SLAVE_BUFFER_LENGTH] = {0}; @@ -63,9 +63,11 @@ int serial_update_buffers(int master_update) if( smatstatus == TRANSACTION_END ) { s_change_old = s_change_new; #ifdef CONSOLE_ENABLE - uprintf("slave matrix = %b %b %b %b\n", + if (debug_matrix) { + uprintf("slave matrix = %b %b %b %b\n", serial_slave_buffer[0], serial_slave_buffer[1], serial_slave_buffer[2], serial_slave_buffer[3]); + } #endif } } else { From fced377ac007d27f2650ccffbe0b18abcdcfe23d Mon Sep 17 00:00:00 2001 From: James Young <18669334+noroadsleft@users.noreply.github.com> Date: Sat, 30 May 2020 13:14:59 -0700 Subject: [PATCH 061/930] 2020 May 30 Breaking Changes Update (#9215) * Branch point for 2020 May 30 Breaking Change * Migrate `ACTION_LAYER_TOGGLE` to `TG()` (#8954) * Migrate `ACTION_MODS_ONESHOT` to `OSM()` (#8957) * Migrate `ACTION_DEFAULT_LAYER_SET` to `DF()` (#8958) * Migrate `ACTION_LAYER_MODS` to `LM()` (#8959) * Migrate `ACTION_MODS_TAP_KEY` to `MT()` (#8968) * Convert V-USB usbdrv to a submodule (#8321) * Unify Tap Hold functions and documentation (#8348) * Changing board names to prevent confusion (#8412) * Move the Keyboardio Model01 to a keyboardio/ subdir (#8499) * Move spaceman keyboards (#8830) * Migrate miscellaneous `fn_actions` entries (#8977) * Migrate `ACTION_MODS_KEY` to chained mod keycodes (#8979) * Organizing my keyboards (plaid, tartan, ergoinu) (#8537) * Refactor Lily58 to use split_common (#6260) * Refactor zinc to use split_common (#7114) * Add a message if bin/qmk doesn't work (#9000) * Fix conflicting types for 'tfp_printf' (#8269) * Fixed RGB_DISABLE_AFTER_TIMEOUT to be seconds based & small internals cleanup (#6480) * Refactor and updates to TKC1800 code (#8472) * Switch to qmk forks for everything (#9019) * audio refactor: replace deprecated PLAY_NOTE_ARRAY (#8484) * Audio enable corrections (2/3) (#8903) * Split HHKB to ANSI and JP layouts and Add VIA support for each (#8582) * Audio enable corrections (Part 4) (#8974) * Fix typo from PR7114 (#9171) * Augment future branch Changelogs (#8978) * Revert "Branch point for 2020 May 30 Breaking Change" --- .gitmodules | 8 +- Makefile | 6 +- docs/ChangeLog/20200530.md | 239 ++++++ docs/_summary.md | 1 + docs/breaking_changes.md | 45 +- docs/breaking_changes_instructions.md | 2 +- docs/custom_quantum_functions.md | 57 +- docs/feature_rgb_matrix.md | 3 +- docs/ja/custom_quantum_functions.md | 8 +- docs/tap_hold.md | 87 +- docs/zh-cn/custom_quantum_functions.md | 6 +- keyboards/at101_bh/at101_bh.c | 1 + .../at101_bh.h} | 5 +- .../{at101_blackheart => at101_bh}/config.h | 2 +- .../{at101_blackheart => at101_bh}/info.json | 4 +- .../keymaps/default/keymap.c | 0 .../{at101_blackheart => at101_bh}/readme.md | 8 +- .../{at101_blackheart => at101_bh}/rules.mk | 0 keyboards/at101_blackheart/at101_blackheart.c | 1 - keyboards/atomic/keymaps/pvc/keymap.c | 6 +- keyboards/atreus62/keymaps/atreus52/keymap.c | 17 +- .../pegasushoof/keymaps/blowrak/keymap.c | 8 +- keyboards/ckeys/handwire_101/config.h | 6 +- keyboards/ckeys/handwire_101/rules.mk | 2 +- .../clueboard/card/keymaps/default/keymap.c | 3 +- .../clueboard/card/keymaps/default/rules.mk | 2 +- .../usb_usb/keymaps/chriskopher/keymap.c | 2 +- .../usb_usb/keymaps/coloneljesus/keymap.c | 6 +- keyboards/crkbd/keymaps/drashna/keymap.c | 2 +- keyboards/cu75/cu75.c | 2 +- keyboards/{ => dm9records}/ergoinu/config.h | 0 keyboards/{ => dm9records}/ergoinu/ergoinu.c | 0 keyboards/{ => dm9records}/ergoinu/ergoinu.h | 0 keyboards/{ => dm9records}/ergoinu/info.json | 2 +- .../ergoinu/keymaps/default/config.h | 0 .../ergoinu/keymaps/default/keymap.c | 0 .../ergoinu/keymaps/default/rules.mk | 0 .../ergoinu/keymaps/default_jis/config.h | 0 .../ergoinu/keymaps/default_jis/keymap.c | 0 .../ergoinu/keymaps/default_jis/rules.mk | 0 keyboards/{ => dm9records}/ergoinu/matrix.c | 0 keyboards/{ => dm9records}/ergoinu/readme.md | 4 +- keyboards/{ => dm9records}/ergoinu/rules.mk | 4 +- keyboards/{ => dm9records}/ergoinu/serial.c | 0 keyboards/{ => dm9records}/ergoinu/serial.h | 0 .../{ => dm9records}/ergoinu/serial_config.h | 0 .../{ => dm9records}/ergoinu/split_util.c | 0 .../{ => dm9records}/ergoinu/split_util.h | 0 keyboards/{ => dm9records}/plaid/config.h | 0 keyboards/{ => dm9records}/plaid/info.json | 4 +- .../plaid/keymaps/brickbots/config.h | 0 .../plaid/keymaps/brickbots/keymap.c | 0 .../plaid/keymaps/brickbots/readme.md | 0 .../plaid/keymaps/default/config.h | 0 .../plaid/keymaps/default/keymap.c | 0 .../plaid/keymaps/default/readme.md | 0 .../plaid/keymaps/thehalfdeafchef/config.h | 0 .../plaid/keymaps/thehalfdeafchef/keymap.c | 0 .../plaid/keymaps/thehalfdeafchef/readme.md | 0 keyboards/{ => dm9records}/plaid/plaid.c | 0 keyboards/{ => dm9records}/plaid/plaid.h | 0 keyboards/{ => dm9records}/plaid/readme.md | 4 +- keyboards/{ => dm9records}/plaid/rules.mk | 0 keyboards/{ => dm9records}/tartan/config.h | 0 keyboards/{ => dm9records}/tartan/info.json | 2 +- .../tartan/keymaps/default/keymap.c | 0 .../tartan/keymaps/default/readme.md | 0 keyboards/{ => dm9records}/tartan/readme.md | 4 +- keyboards/{ => dm9records}/tartan/rules.mk | 0 keyboards/{ => dm9records}/tartan/tartan.c | 0 keyboards/{ => dm9records}/tartan/tartan.h | 0 keyboards/eco/rules.mk | 2 +- .../ergodox_stm32/keymaps/default/keymap.c | 4 - keyboards/ergotravel/keymaps/ckofy/keymap.c | 23 +- .../gh60/revc/keymaps/robotmaxtron/keymap.c | 6 +- keyboards/gh60/satan/keymaps/denolfe/keymap.c | 3 +- .../keymaps/milestogo/keymap.c | 1 - keyboards/hhkb/ansi/ansi.c | 1 + keyboards/hhkb/ansi/ansi.h | 23 + keyboards/hhkb/{ => ansi}/config.h | 15 +- keyboards/hhkb/ansi/hhkb_avr.h | 157 ++++ keyboards/hhkb/ansi/info.json | 73 ++ .../{ => ansi}/keymaps/blakedietz/README.md | 0 .../{ => ansi}/keymaps/blakedietz/config.h | 0 .../{ => ansi}/keymaps/blakedietz/keymap.c | 0 .../{ => ansi}/keymaps/blakedietz/rules.mk | 0 .../hhkb/{ => ansi}/keymaps/brett/config.h | 0 .../hhkb/{ => ansi}/keymaps/brett/keymap.c | 0 .../hhkb/{ => ansi}/keymaps/brett/readme.md | 0 .../hhkb/{ => ansi}/keymaps/brett/rules.mk | 0 .../hhkb/{ => ansi}/keymaps/cinaeco/README.md | 0 .../hhkb/{ => ansi}/keymaps/cinaeco/config.h | 0 .../hhkb/{ => ansi}/keymaps/cinaeco/keymap.c | 0 .../hhkb/{ => ansi}/keymaps/cinaeco/rules.mk | 0 .../hhkb/{ => ansi}/keymaps/dbroqua/keymap.c | 0 .../hhkb/{ => ansi}/keymaps/dbroqua/readme.md | 0 .../hhkb/{ => ansi}/keymaps/default/keymap.c | 0 .../hhkb/{ => ansi}/keymaps/eric/keymap.c | 0 .../dhertz => ansi/keymaps/krusli}/config.h | 0 .../hhkb/{ => ansi}/keymaps/krusli/keymap.c | 0 .../hhkb/{ => ansi}/keymaps/lxol/keymap.c | 16 +- .../hhkb/{ => ansi}/keymaps/mjt/config.h | 0 .../hhkb/{ => ansi}/keymaps/mjt/keymap.c | 3 +- .../hhkb/{ => ansi}/keymaps/mjt/readme.md | 0 keyboards/hhkb/ansi/keymaps/mjt/rules.mk | 1 + .../{ => ansi}/keymaps/schaeferdev/README.md | 0 .../{ => ansi}/keymaps/schaeferdev/config.h | 0 .../{ => ansi}/keymaps/schaeferdev/keymap.c | 0 .../{ => ansi}/keymaps/schaeferdev/rules.mk | 0 .../keymaps/shela/action_pseudo_lut.c | 0 .../keymaps/shela/action_pseudo_lut.h | 0 .../hhkb/{ => ansi}/keymaps/shela/config.h | 0 .../hhkb/{ => ansi}/keymaps/shela/keymap.c | 11 +- .../{ => ansi}/keymaps/shela/keymap_jis2us.h | 0 .../hhkb/{ => ansi}/keymaps/shela/readme.md | 0 .../hhkb/{ => ansi}/keymaps/shela/rules.mk | 0 .../hhkb/{ => ansi}/keymaps/smt/keymap.c | 0 .../{ => ansi}/keymaps/tobiasvl_iso/keymap.c | 0 .../{ => ansi}/keymaps/tobiasvl_iso/readme.md | 0 .../{ => ansi}/keymaps/tominabox1/.gitignore | 0 .../{ => ansi}/keymaps/tominabox1/keymap.c | 0 keyboards/hhkb/ansi/keymaps/via/keymap.c | 68 ++ keyboards/hhkb/ansi/keymaps/via/rules.mk | 1 + .../hhkb/{ => ansi}/keymaps/xyverz/keymap.c | 0 keyboards/hhkb/ansi/matrix.c | 211 +++++ keyboards/hhkb/ansi/readme.md | 14 + keyboards/hhkb/{ => ansi}/rules.mk | 12 +- keyboards/hhkb/hhkb.c | 1 - keyboards/hhkb/jp/config.h | 104 +++ keyboards/hhkb/{ => jp}/hhkb_avr.h | 13 +- keyboards/hhkb/{ => jp}/info.json | 67 +- keyboards/hhkb/jp/jp.c | 1 + keyboards/hhkb/{hhkb.h => jp/jp.h} | 26 +- .../hhkb/{ => jp}/keymaps/bakingpy/keymap.c | 0 .../hhkb/{ => jp}/keymaps/bakingpy/rules.mk | 0 .../jp => jp/keymaps/default}/keymap.c | 0 .../keymaps/default}/rules.mk | 0 .../keymaps/default_mac}/keymap.c | 0 .../jp => jp/keymaps/default_mac}/rules.mk | 0 .../krusli => jp/keymaps/dhertz}/config.h | 0 .../hhkb/{ => jp}/keymaps/dhertz/keymap.c | 0 .../hhkb/{ => jp}/keymaps/dhertz/keymap.h | 0 .../hhkb/{ => jp}/keymaps/dhertz/rules.mk | 0 .../hhkb/{ => jp}/keymaps/enoch_jp/keymap.c | 0 .../hhkb/{ => jp}/keymaps/enoch_jp/rules.mk | 0 .../{ => jp}/keymaps/halfqwerty_jp/README.md | 0 .../{ => jp}/keymaps/halfqwerty_jp/keymap.c | 0 .../keymaps/halfqwerty_jp}/rules.mk | 0 .../hhkb/{ => jp}/keymaps/rdg_jp/keymap.c | 0 .../hhkb/{ => jp}/keymaps/rdg_jp/rules.mk | 0 .../hhkb/{ => jp}/keymaps/sh_jp/README.md | 0 .../hhkb/{ => jp}/keymaps/sh_jp/keymap.c | 0 .../hhkb/{ => jp}/keymaps/sh_jp/rules.mk | 0 keyboards/hhkb/jp/keymaps/via/config.h | 2 + keyboards/hhkb/jp/keymaps/via/keymap.c | 58 ++ keyboards/hhkb/jp/keymaps/via/rules.mk | 1 + keyboards/hhkb/{ => jp}/matrix.c | 5 +- keyboards/hhkb/{ => jp}/readme.md | 2 +- keyboards/hhkb/jp/rules.mk | 69 ++ .../infinity60/keymaps/jpetermans/keymap.c | 8 +- keyboards/jd45/keymaps/justin/keymap.c | 20 +- keyboards/jd45/keymaps/mjt6u/keymap.c | 4 +- .../nyquist/keymaps/danielhklein/keymap.c | 13 +- .../keebio/viterbi/keymaps/bakingpy/keymap.c | 6 +- .../keebio/viterbi/keymaps/dwallace/keymap.c | 2 +- .../keebio/viterbi/keymaps/mike808/keymap.c | 4 +- keyboards/{ => keyboardio}/model01/config.h | 0 keyboards/{ => keyboardio}/model01/info.json | 2 +- .../model01/keymaps/default/config.h | 0 .../model01/keymaps/default/keymap.c | 0 .../model01/keymaps/default/readme.md | 0 .../model01/keymaps/dshields/config.h | 0 .../model01/keymaps/dshields/keymap.c | 0 .../model01/keymaps/dshields/readme.md | 0 .../model01/keymaps/tw1t611/config.h | 0 .../model01/keymaps/tw1t611/keymap.c | 0 .../model01/keymaps/tw1t611/readme.md | 0 keyboards/{ => keyboardio}/model01/leds.c | 0 keyboards/{ => keyboardio}/model01/leds.h | 0 keyboards/{ => keyboardio}/model01/matrix.c | 0 keyboards/{ => keyboardio}/model01/model01.c | 0 keyboards/{ => keyboardio}/model01/model01.h | 0 keyboards/{ => keyboardio}/model01/readme.md | 10 +- keyboards/{ => keyboardio}/model01/rules.mk | 0 .../model01/wire-protocol-constants.h | 0 keyboards/keyboardio/readme.md | 18 + keyboards/kinesis/keymaps/milestogo/keymap.c | 26 +- keyboards/lets_split/keymaps/mjt/keymap.c | 6 +- keyboards/lets_split/keymaps/piemod/keymap.c | 20 +- keyboards/lily58/config.h | 12 +- keyboards/lily58/i2c.c | 162 ---- keyboards/lily58/i2c.h | 46 -- keyboards/lily58/keymaps/chuan/config.h | 64 ++ keyboards/lily58/keymaps/chuan/keymap.c | 230 ++++++ keyboards/lily58/keymaps/chuan/rules.mk | 11 + keyboards/lily58/keymaps/default/config.h | 4 +- keyboards/lily58/keymaps/default/keymap.c | 58 +- keyboards/lily58/keymaps/default/rules.mk | 4 +- keyboards/lily58/keymaps/yuchi/keymap.c | 47 +- keyboards/lily58/keymaps/yuchi/rules.mk | 5 +- .../lib/{glcdfont.c => glcdfont_lily.c} | 1 + keyboards/lily58/lib/host_led_state_reader.c | 9 +- keyboards/lily58/lib/keylogger.c | 1 + keyboards/lily58/lib/layer_state_reader.c | 8 +- keyboards/lily58/lib/mode_icon_reader.c | 1 + keyboards/lily58/lib/timelogger.c | 1 + keyboards/lily58/lily58.c | 7 +- keyboards/lily58/rev1/config.h | 2 - keyboards/lily58/rev1/rules.mk | 3 - keyboards/lily58/rev1/split_scomm.c | 91 --- keyboards/lily58/rev1/split_scomm.h | 24 - keyboards/lily58/rev1/split_util.h | 19 - keyboards/lily58/rules.mk | 16 +- keyboards/lily58/serial.h | 84 -- keyboards/lily58/serial_config.h | 4 - keyboards/lily58/ssd1306.c | 344 -------- keyboards/lily58/ssd1306.h | 90 --- keyboards/meira/keymaps/default/keymap.c | 6 +- keyboards/meira/keymaps/grahampheath/keymap.c | 6 +- keyboards/meira/keymaps/takmiya/keymap.c | 2 +- keyboards/meishi/keymaps/default/keymap.c | 4 - keyboards/navi10/rev3/rules.mk | 2 +- .../nomu30/keymaps/center_sprit/keymap.c | 2 +- keyboards/nomu30/keymaps/like_jis/keymap.c | 2 +- .../config.h | 0 .../info.json | 2 +- .../keymaps/default/keymap.c | 0 keyboards/omnikey_bh/omnikey_bh.c | 1 + .../omnikey_bh.h} | 5 +- .../readme.md | 6 +- .../rules.mk | 0 .../omnikey_blackheart/omnikey_blackheart.c | 1 - keyboards/pancake/feather/readme.md | 1 - keyboards/pancake/keymaps/default/readme.md | 1 - keyboards/pancake/promicro/readme.md | 1 - keyboards/planck/keymaps/ab/keymap.c | 22 +- .../planck/keymaps/angerthosenear/keymap.c | 11 +- keyboards/planck/keymaps/austin/keymap.c | 13 +- keyboards/planck/keymaps/brandon/keymap.c | 10 +- keyboards/planck/keymaps/chance/keymap.c | 6 +- keyboards/planck/keymaps/charlie/keymap.c | 51 +- keyboards/planck/keymaps/circuit/keymap.c | 10 +- keyboards/planck/keymaps/david/keymap.c | 12 +- .../planck/keymaps/dr_notsokind/keymap.c | 10 +- keyboards/planck/keymaps/dzobert/keymap.c | 10 +- keyboards/planck/keymaps/emilyh/keymap.c | 16 +- keyboards/planck/keymaps/espynn/keymap.c | 20 +- keyboards/planck/keymaps/ishtob/keymap.c | 20 +- keyboards/planck/keymaps/joe/keymap.c | 21 +- keyboards/planck/keymaps/kyle/keymap.c | 12 +- keyboards/planck/keymaps/lucas/keymap.c | 9 +- keyboards/planck/keymaps/matrixman/keymap.c | 7 +- keyboards/planck/keymaps/max/keymap.c | 10 +- keyboards/planck/keymaps/mollat/keymap.c | 4 - keyboards/planck/keymaps/piemod/keymap.c | 46 +- keyboards/planck/keymaps/pvc/keymap.c | 6 +- .../planck/keymaps/that_canadian/keymap.c | 8 +- keyboards/planck/keymaps/zrichard/keymap.c | 6 +- keyboards/planck/rev6/config.h | 1 + keyboards/planck/rev6/rules.mk | 2 +- .../preonic/keymaps/that_canadian/keymap.c | 8 +- keyboards/preonic/rev1/rules.mk | 2 +- keyboards/preonic/rev2/rules.mk | 2 +- keyboards/preonic/rev3/config.h | 1 + keyboards/preonic/rev3/rules.mk | 2 +- .../rgbkb/zen/rev1/keymaps/default/keymap.c | 4 +- .../zen/rev1/keymaps/jwlawrence/keymap.c | 4 +- keyboards/scarletbandana/rules.mk | 2 +- keyboards/sck/neiso/rules.mk | 2 +- .../s60_x/keymaps/ansi_qwertz/keymap.c | 14 +- keyboards/sentraq/s60_x/keymaps/hasu/keymap.c | 28 +- keyboards/sentraq/s60_x/keymaps/jpec/keymap.c | 15 +- .../sentraq/s60_x/keymaps/poker/keymap.c | 34 +- .../sentraq/s60_x/keymaps/poker_bit/keymap.c | 13 +- .../sentraq/s60_x/keymaps/poker_set/keymap.c | 12 +- .../sentraq/s60_x/keymaps/spacefn/keymap.c | 9 +- .../sentraq/s65_x/keymaps/kelorean/keymap.c | 12 +- keyboards/sentraq/s65_x/keymaps/nall/keymap.c | 10 +- keyboards/{ => spaceman}/2_milk/2_milk.c | 0 keyboards/{ => spaceman}/2_milk/2_milk.h | 0 keyboards/{ => spaceman}/2_milk/config.h | 2 +- keyboards/{ => spaceman}/2_milk/info.json | 2 +- .../2_milk/keymaps/binary/keymap.c | 0 .../2_milk/keymaps/binary/readme.md | 0 .../2_milk/keymaps/copypasta/keymap.c | 0 .../2_milk/keymaps/copypasta/readme.md | 0 .../2_milk/keymaps/default/keymap.c | 0 .../2_milk/keymaps/default/readme.md | 0 .../2_milk/keymaps/emoji/config.h | 0 .../2_milk/keymaps/emoji/keymap.c | 0 .../2_milk/keymaps/emoji/readme.md | 0 .../2_milk/keymaps/emoji/rules.mk | 0 .../2_milk/keymaps/excessbread/keymap.c | 0 .../2_milk/keymaps/excessbread/readme.md | 0 .../2_milk/keymaps/mikethetiger/keymap.c | 0 .../2_milk/keymaps/mikethetiger/readme.md | 0 .../2_milk/keymaps/mikethetiger/rules.mk | 0 .../2_milk/keymaps/mouse/keymap.c | 0 .../2_milk/keymaps/mouse/readme.md | 0 keyboards/{ => spaceman}/2_milk/readme.md | 6 +- keyboards/{ => spaceman}/2_milk/rules.mk | 0 keyboards/{ => spaceman}/pancake/config.h | 0 .../{ => spaceman}/pancake/feather/config.h | 0 .../{ => spaceman}/pancake/feather/rules.mk | 0 keyboards/{ => spaceman}/pancake/info.json | 2 +- .../pancake/keymaps/default/keymap.c | 0 .../pancake/keymaps/default/readme.md | 3 + keyboards/{ => spaceman}/pancake/pancake.c | 0 keyboards/{ => spaceman}/pancake/pancake.h | 0 .../{ => spaceman}/pancake/promicro/config.h | 0 .../{ => spaceman}/pancake/promicro/rules.mk | 0 keyboards/{ => spaceman}/pancake/readme.md | 4 +- keyboards/subatomic/rules.mk | 2 +- .../liminal/keymaps/default/keymap.c | 4 +- .../liminal/keymaps/default_iso/keymap.c | 2 +- .../minivan/keymaps/like_jis/keymap.c | 2 +- .../minivan/keymaps/mjt/keymap.c | 12 +- .../roadkit/keymaps/mjt/keymap.c | 6 +- keyboards/tkc1800/config.h | 5 + keyboards/tkc1800/i2c.c | 166 ---- keyboards/tkc1800/i2c.h | 49 -- keyboards/tkc1800/keymaps/default/config.h | 24 - keyboards/tkc1800/keymaps/default/keymap.c | 99 +-- keyboards/tkc1800/keymaps/smt/config.h | 24 - keyboards/tkc1800/keymaps/smt/keymap.c | 95 +-- keyboards/tkc1800/keymaps/via/keymap.c | 99 +-- keyboards/tkc1800/keymaps/wkl/config.h | 24 - keyboards/tkc1800/keymaps/wkl/keymap.c | 100 +-- keyboards/tkc1800/keymaps/yanfali/config.h | 24 - keyboards/tkc1800/keymaps/yanfali/keymap.c | 94 +-- keyboards/tkc1800/rules.mk | 9 +- keyboards/tkc1800/tkc1800.c | 7 + .../treadstone32/keymaps/default/keymap.c | 2 +- .../treadstone32/keymaps/like_jis/keymap.c | 2 +- .../vision_division/keymaps/default/rules.mk | 1 - keyboards/vision_division/rules.mk | 2 +- keyboards/xd60/keymaps/Jos/keymap.c | 7 +- keyboards/xd60/keymaps/cheese/keymap.c | 8 +- .../{z150_blackheart => z150_bh}/config.h | 0 .../{z150_blackheart => z150_bh}/info.json | 2 +- .../keymaps/default/keymap.c | 0 .../keymaps/default_tkl/keymap.c | 0 .../{z150_blackheart => z150_bh}/readme.md | 6 +- .../{z150_blackheart => z150_bh}/rules.mk | 0 .../z150_blackheart.c => z150_bh/z150_bh.c} | 2 +- .../z150_blackheart.h => z150_bh/z150_bh.h} | 0 keyboards/zinc/config.h | 25 - keyboards/zinc/i2c.c | 162 ---- keyboards/zinc/i2c.h | 49 -- keyboards/zinc/keymaps/default/config.h | 2 - keyboards/zinc/keymaps/default/keymap.c | 26 +- keyboards/zinc/keymaps/default/readme_en.md | 131 +++ keyboards/zinc/keymaps/default/readme_jp.md | 48 +- keyboards/zinc/keymaps/default/rules.mk | 57 +- keyboards/zinc/keymaps/ginjake/config.h | 2 - keyboards/zinc/keymaps/ginjake/rules.mk | 48 +- keyboards/zinc/keymaps/monks/config.h | 2 - keyboards/zinc/keymaps/monks/keymap.c | 3 +- keyboards/zinc/keymaps/monks/readme_jp.md | 2 +- keyboards/zinc/keymaps/monks/rules.mk | 50 +- keyboards/zinc/keymaps/toshi0383/config.h | 2 - keyboards/zinc/keymaps/toshi0383/rules.mk | 67 +- keyboards/zinc/readme.md | 6 +- keyboards/zinc/rev1/config.h | 61 +- keyboards/zinc/rev1/matrix.c | 357 --------- keyboards/zinc/rev1/rev1.c | 1 - keyboards/zinc/rev1/rev1.h | 15 - keyboards/zinc/rev1/rules.mk | 5 +- keyboards/zinc/rev1/serial_config.h | 18 - keyboards/zinc/rev1/serial_config_simpleapi.h | 8 - keyboards/zinc/rev1/split_scomm.c | 95 --- keyboards/zinc/rev1/split_scomm.h | 24 - keyboards/zinc/rev1/split_util.c | 70 -- keyboards/zinc/rev1/split_util.h | 19 - keyboards/zinc/reva/config.h | 56 +- keyboards/zinc/reva/matrix.c | 357 --------- keyboards/zinc/reva/reva.c | 1 - keyboards/zinc/reva/reva.h | 15 - keyboards/zinc/reva/rules.mk | 5 +- keyboards/zinc/reva/serial_config.h | 18 - keyboards/zinc/reva/serial_config_simpleapi.h | 8 - keyboards/zinc/reva/split_scomm.c | 95 --- keyboards/zinc/reva/split_scomm.h | 24 - keyboards/zinc/reva/split_util.c | 70 -- keyboards/zinc/reva/split_util.h | 19 - keyboards/zinc/rules.mk | 4 - keyboards/zinc/serial.c | 589 -------------- keyboards/zinc/serial.h | 84 -- keyboards/zinc/zinc.h | 6 +- layouts/community/60_iso/unxmaal/keymap.c | 2 - layouts/community/ergodox/algernon/keymap.c | 18 +- .../ergodox/colemak_osx_pc_no/keymap.c | 3 +- layouts/community/ergodox/drashna/keymap.c | 2 +- layouts/community/ergodox/guni/keymap.c | 19 +- layouts/community/ergodox/kastyle/keymap.c | 8 +- layouts/community/ergodox/mpiechotka/keymap.c | 10 +- .../norwegian_programmer_osx_pc/keymap.c | 3 +- .../keymap.c | 3 +- layouts/community/ergodox/townk_osx/keymap.c | 13 +- lib/printf | 1 + lib/vusb | 1 + message.mk | 3 +- quantum/audio/audio.h | 3 - quantum/audio/audio_avr.c | 5 + quantum/rgb_matrix.c | 106 ++- quantum/rgb_matrix.h | 8 +- .../rgb_matrix_animations/breathing_anim.h | 2 +- .../rgb_matrix_animations/digital_rain_anim.h | 24 +- .../jellybean_raindrops_anim.h | 2 +- .../rgb_matrix_animations/raindrops_anim.h | 2 +- .../typing_heatmap_anim.h | 28 +- .../rgb_matrix_runners/effect_runner_dx_dy.h | 2 +- .../effect_runner_dx_dy_dist.h | 2 +- quantum/rgb_matrix_runners/effect_runner_i.h | 2 +- .../effect_runner_sin_cos_i.h | 2 +- quantum/rgb_matrix_types.h | 7 - tmk_core/common.mk | 9 +- tmk_core/common/action.c | 4 +- tmk_core/common/action_tapping.c | 6 +- tmk_core/common/action_tapping.h | 2 +- tmk_core/common/chibios/printf.c | 233 ------ tmk_core/common/chibios/printf.h | 110 --- tmk_core/common/command.c | 4 - tmk_core/common/print.h | 5 +- tmk_core/protocol/arm_atsam/led_matrix.c | 2 +- tmk_core/protocol/chibios/main.c | 3 - tmk_core/protocol/chibios/usb_main.c | 5 +- tmk_core/protocol/chibios/usb_main.h | 2 - tmk_core/protocol/iwrap.mk | 18 +- tmk_core/protocol/iwrap/main.c | 2 +- tmk_core/protocol/vusb.mk | 16 +- tmk_core/protocol/vusb/main.c | 4 +- tmk_core/protocol/vusb/sendchar_usart.c | 2 +- tmk_core/protocol/vusb/usbdrv/Changelog.txt | 308 ------- .../vusb/usbdrv/CommercialLicense.txt | 166 ---- tmk_core/protocol/vusb/usbdrv/License.txt | 361 --------- tmk_core/protocol/vusb/usbdrv/Readme.txt | 172 ---- tmk_core/protocol/vusb/usbdrv/USB-ID-FAQ.txt | 149 ---- .../protocol/vusb/usbdrv/USB-IDs-for-free.txt | 148 ---- tmk_core/protocol/vusb/usbdrv/asmcommon.inc | 188 ----- tmk_core/protocol/vusb/usbdrv/oddebug.c | 46 -- tmk_core/protocol/vusb/usbdrv/oddebug.h | 121 --- .../vusb/usbdrv/usbconfig-prototype.h | 376 --------- tmk_core/protocol/vusb/usbdrv/usbdrv.c | 622 --------------- tmk_core/protocol/vusb/usbdrv/usbdrv.h | 730 ----------------- tmk_core/protocol/vusb/usbdrv/usbdrvasm.S | 393 --------- tmk_core/protocol/vusb/usbdrv/usbdrvasm.asm | 21 - tmk_core/protocol/vusb/usbdrv/usbdrvasm12.inc | 393 --------- .../protocol/vusb/usbdrv/usbdrvasm128.inc | 750 ------------------ tmk_core/protocol/vusb/usbdrv/usbdrvasm15.inc | 423 ---------- tmk_core/protocol/vusb/usbdrv/usbdrvasm16.inc | 346 -------- .../protocol/vusb/usbdrv/usbdrvasm165.inc | 453 ----------- .../protocol/vusb/usbdrv/usbdrvasm18-crc.inc | 707 ----------------- tmk_core/protocol/vusb/usbdrv/usbdrvasm20.inc | 360 --------- .../protocol/vusb/usbdrv/usbportability.h | 146 ---- tmk_core/protocol/vusb/vusb.c | 34 +- users/ericgebhart/ericgebhart.c | 5 - users/ninjonas/ninjonas.c | 2 +- users/ridingqwerty/ridingqwerty.c | 2 +- users/tominabox1/tominabox1.c | 2 +- 460 files changed, 2627 insertions(+), 12712 deletions(-) create mode 100644 docs/ChangeLog/20200530.md create mode 100644 keyboards/at101_bh/at101_bh.c rename keyboards/{at101_blackheart/at101_blackheart.h => at101_bh/at101_bh.h} (96%) rename keyboards/{at101_blackheart => at101_bh}/config.h (95%) rename keyboards/{at101_blackheart => at101_bh}/info.json (98%) rename keyboards/{at101_blackheart => at101_bh}/keymaps/default/keymap.c (100%) rename keyboards/{at101_blackheart => at101_bh}/readme.md (77%) rename keyboards/{at101_blackheart => at101_bh}/rules.mk (100%) delete mode 100644 keyboards/at101_blackheart/at101_blackheart.c rename keyboards/{ => dm9records}/ergoinu/config.h (100%) rename keyboards/{ => dm9records}/ergoinu/ergoinu.c (100%) rename keyboards/{ => dm9records}/ergoinu/ergoinu.h (100%) rename keyboards/{ => dm9records}/ergoinu/info.json (98%) rename keyboards/{ => dm9records}/ergoinu/keymaps/default/config.h (100%) rename keyboards/{ => dm9records}/ergoinu/keymaps/default/keymap.c (100%) rename keyboards/{ => dm9records}/ergoinu/keymaps/default/rules.mk (100%) rename keyboards/{ => dm9records}/ergoinu/keymaps/default_jis/config.h (100%) rename keyboards/{ => dm9records}/ergoinu/keymaps/default_jis/keymap.c (100%) rename keyboards/{ => dm9records}/ergoinu/keymaps/default_jis/rules.mk (100%) rename keyboards/{ => dm9records}/ergoinu/matrix.c (100%) rename keyboards/{ => dm9records}/ergoinu/readme.md (89%) rename keyboards/{ => dm9records}/ergoinu/rules.mk (95%) rename keyboards/{ => dm9records}/ergoinu/serial.c (100%) rename keyboards/{ => dm9records}/ergoinu/serial.h (100%) rename keyboards/{ => dm9records}/ergoinu/serial_config.h (100%) rename keyboards/{ => dm9records}/ergoinu/split_util.c (100%) rename keyboards/{ => dm9records}/ergoinu/split_util.h (100%) rename keyboards/{ => dm9records}/plaid/config.h (100%) rename keyboards/{ => dm9records}/plaid/info.json (97%) rename keyboards/{ => dm9records}/plaid/keymaps/brickbots/config.h (100%) rename keyboards/{ => dm9records}/plaid/keymaps/brickbots/keymap.c (100%) rename keyboards/{ => dm9records}/plaid/keymaps/brickbots/readme.md (100%) rename keyboards/{ => dm9records}/plaid/keymaps/default/config.h (100%) rename keyboards/{ => dm9records}/plaid/keymaps/default/keymap.c (100%) rename keyboards/{ => dm9records}/plaid/keymaps/default/readme.md (100%) rename keyboards/{ => dm9records}/plaid/keymaps/thehalfdeafchef/config.h (100%) rename keyboards/{ => dm9records}/plaid/keymaps/thehalfdeafchef/keymap.c (100%) rename keyboards/{ => dm9records}/plaid/keymaps/thehalfdeafchef/readme.md (100%) rename keyboards/{ => dm9records}/plaid/plaid.c (100%) rename keyboards/{ => dm9records}/plaid/plaid.h (100%) rename keyboards/{ => dm9records}/plaid/readme.md (91%) rename keyboards/{ => dm9records}/plaid/rules.mk (100%) rename keyboards/{ => dm9records}/tartan/config.h (100%) rename keyboards/{ => dm9records}/tartan/info.json (99%) rename keyboards/{ => dm9records}/tartan/keymaps/default/keymap.c (100%) rename keyboards/{ => dm9records}/tartan/keymaps/default/readme.md (100%) rename keyboards/{ => dm9records}/tartan/readme.md (91%) rename keyboards/{ => dm9records}/tartan/rules.mk (100%) rename keyboards/{ => dm9records}/tartan/tartan.c (100%) rename keyboards/{ => dm9records}/tartan/tartan.h (100%) create mode 100644 keyboards/hhkb/ansi/ansi.c create mode 100644 keyboards/hhkb/ansi/ansi.h rename keyboards/hhkb/{ => ansi}/config.h (94%) create mode 100644 keyboards/hhkb/ansi/hhkb_avr.h create mode 100644 keyboards/hhkb/ansi/info.json rename keyboards/hhkb/{ => ansi}/keymaps/blakedietz/README.md (100%) rename keyboards/hhkb/{ => ansi}/keymaps/blakedietz/config.h (100%) rename keyboards/hhkb/{ => ansi}/keymaps/blakedietz/keymap.c (100%) rename keyboards/hhkb/{ => ansi}/keymaps/blakedietz/rules.mk (100%) rename keyboards/hhkb/{ => ansi}/keymaps/brett/config.h (100%) rename keyboards/hhkb/{ => ansi}/keymaps/brett/keymap.c (100%) rename keyboards/hhkb/{ => ansi}/keymaps/brett/readme.md (100%) rename keyboards/hhkb/{ => ansi}/keymaps/brett/rules.mk (100%) rename keyboards/hhkb/{ => ansi}/keymaps/cinaeco/README.md (100%) rename keyboards/hhkb/{ => ansi}/keymaps/cinaeco/config.h (100%) rename keyboards/hhkb/{ => ansi}/keymaps/cinaeco/keymap.c (100%) rename keyboards/hhkb/{ => ansi}/keymaps/cinaeco/rules.mk (100%) rename keyboards/hhkb/{ => ansi}/keymaps/dbroqua/keymap.c (100%) rename keyboards/hhkb/{ => ansi}/keymaps/dbroqua/readme.md (100%) rename keyboards/hhkb/{ => ansi}/keymaps/default/keymap.c (100%) rename keyboards/hhkb/{ => ansi}/keymaps/eric/keymap.c (100%) rename keyboards/hhkb/{keymaps/dhertz => ansi/keymaps/krusli}/config.h (100%) rename keyboards/hhkb/{ => ansi}/keymaps/krusli/keymap.c (100%) rename keyboards/hhkb/{ => ansi}/keymaps/lxol/keymap.c (97%) rename keyboards/hhkb/{ => ansi}/keymaps/mjt/config.h (100%) rename keyboards/hhkb/{ => ansi}/keymaps/mjt/keymap.c (98%) rename keyboards/hhkb/{ => ansi}/keymaps/mjt/readme.md (100%) create mode 100644 keyboards/hhkb/ansi/keymaps/mjt/rules.mk rename keyboards/hhkb/{ => ansi}/keymaps/schaeferdev/README.md (100%) rename keyboards/hhkb/{ => ansi}/keymaps/schaeferdev/config.h (100%) rename keyboards/hhkb/{ => ansi}/keymaps/schaeferdev/keymap.c (100%) rename keyboards/hhkb/{ => ansi}/keymaps/schaeferdev/rules.mk (100%) rename keyboards/hhkb/{ => ansi}/keymaps/shela/action_pseudo_lut.c (100%) rename keyboards/hhkb/{ => ansi}/keymaps/shela/action_pseudo_lut.h (100%) rename keyboards/hhkb/{ => ansi}/keymaps/shela/config.h (100%) rename keyboards/hhkb/{ => ansi}/keymaps/shela/keymap.c (95%) rename keyboards/hhkb/{ => ansi}/keymaps/shela/keymap_jis2us.h (100%) rename keyboards/hhkb/{ => ansi}/keymaps/shela/readme.md (100%) rename keyboards/hhkb/{ => ansi}/keymaps/shela/rules.mk (100%) rename keyboards/hhkb/{ => ansi}/keymaps/smt/keymap.c (100%) rename keyboards/hhkb/{ => ansi}/keymaps/tobiasvl_iso/keymap.c (100%) rename keyboards/hhkb/{ => ansi}/keymaps/tobiasvl_iso/readme.md (100%) rename keyboards/hhkb/{ => ansi}/keymaps/tominabox1/.gitignore (100%) rename keyboards/hhkb/{ => ansi}/keymaps/tominabox1/keymap.c (100%) create mode 100644 keyboards/hhkb/ansi/keymaps/via/keymap.c create mode 100644 keyboards/hhkb/ansi/keymaps/via/rules.mk rename keyboards/hhkb/{ => ansi}/keymaps/xyverz/keymap.c (100%) create mode 100644 keyboards/hhkb/ansi/matrix.c create mode 100644 keyboards/hhkb/ansi/readme.md rename keyboards/hhkb/{ => ansi}/rules.mk (94%) delete mode 100644 keyboards/hhkb/hhkb.c create mode 100644 keyboards/hhkb/jp/config.h rename keyboards/hhkb/{ => jp}/hhkb_avr.h (98%) rename keyboards/hhkb/{ => jp}/info.json (53%) create mode 100644 keyboards/hhkb/jp/jp.c rename keyboards/hhkb/{hhkb.h => jp/jp.h} (57%) rename keyboards/hhkb/{ => jp}/keymaps/bakingpy/keymap.c (100%) rename keyboards/hhkb/{ => jp}/keymaps/bakingpy/rules.mk (100%) rename keyboards/hhkb/{keymaps/jp => jp/keymaps/default}/keymap.c (100%) rename keyboards/hhkb/{keymaps/halfqwerty_jp => jp/keymaps/default}/rules.mk (100%) rename keyboards/hhkb/{keymaps/jp_mac => jp/keymaps/default_mac}/keymap.c (100%) rename keyboards/hhkb/{keymaps/jp => jp/keymaps/default_mac}/rules.mk (100%) rename keyboards/hhkb/{keymaps/krusli => jp/keymaps/dhertz}/config.h (100%) rename keyboards/hhkb/{ => jp}/keymaps/dhertz/keymap.c (100%) rename keyboards/hhkb/{ => jp}/keymaps/dhertz/keymap.h (100%) rename keyboards/hhkb/{ => jp}/keymaps/dhertz/rules.mk (100%) rename keyboards/hhkb/{ => jp}/keymaps/enoch_jp/keymap.c (100%) rename keyboards/hhkb/{ => jp}/keymaps/enoch_jp/rules.mk (100%) rename keyboards/hhkb/{ => jp}/keymaps/halfqwerty_jp/README.md (100%) rename keyboards/hhkb/{ => jp}/keymaps/halfqwerty_jp/keymap.c (100%) rename keyboards/hhkb/{keymaps/jp_mac => jp/keymaps/halfqwerty_jp}/rules.mk (100%) rename keyboards/hhkb/{ => jp}/keymaps/rdg_jp/keymap.c (100%) rename keyboards/hhkb/{ => jp}/keymaps/rdg_jp/rules.mk (100%) rename keyboards/hhkb/{ => jp}/keymaps/sh_jp/README.md (100%) rename keyboards/hhkb/{ => jp}/keymaps/sh_jp/keymap.c (100%) rename keyboards/hhkb/{ => jp}/keymaps/sh_jp/rules.mk (100%) create mode 100644 keyboards/hhkb/jp/keymaps/via/config.h create mode 100644 keyboards/hhkb/jp/keymaps/via/keymap.c create mode 100644 keyboards/hhkb/jp/keymaps/via/rules.mk rename keyboards/hhkb/{ => jp}/matrix.c (99%) rename keyboards/hhkb/{ => jp}/readme.md (95%) create mode 100644 keyboards/hhkb/jp/rules.mk rename keyboards/{ => keyboardio}/model01/config.h (100%) rename keyboards/{ => keyboardio}/model01/info.json (98%) rename keyboards/{ => keyboardio}/model01/keymaps/default/config.h (100%) rename keyboards/{ => keyboardio}/model01/keymaps/default/keymap.c (100%) rename keyboards/{ => keyboardio}/model01/keymaps/default/readme.md (100%) rename keyboards/{ => keyboardio}/model01/keymaps/dshields/config.h (100%) rename keyboards/{ => keyboardio}/model01/keymaps/dshields/keymap.c (100%) rename keyboards/{ => keyboardio}/model01/keymaps/dshields/readme.md (100%) rename keyboards/{ => keyboardio}/model01/keymaps/tw1t611/config.h (100%) rename keyboards/{ => keyboardio}/model01/keymaps/tw1t611/keymap.c (100%) rename keyboards/{ => keyboardio}/model01/keymaps/tw1t611/readme.md (100%) rename keyboards/{ => keyboardio}/model01/leds.c (100%) rename keyboards/{ => keyboardio}/model01/leds.h (100%) rename keyboards/{ => keyboardio}/model01/matrix.c (100%) rename keyboards/{ => keyboardio}/model01/model01.c (100%) rename keyboards/{ => keyboardio}/model01/model01.h (100%) rename keyboards/{ => keyboardio}/model01/readme.md (84%) rename keyboards/{ => keyboardio}/model01/rules.mk (100%) rename keyboards/{ => keyboardio}/model01/wire-protocol-constants.h (100%) create mode 100644 keyboards/keyboardio/readme.md delete mode 100755 keyboards/lily58/i2c.c delete mode 100755 keyboards/lily58/i2c.h create mode 100644 keyboards/lily58/keymaps/chuan/config.h create mode 100644 keyboards/lily58/keymaps/chuan/keymap.c create mode 100644 keyboards/lily58/keymaps/chuan/rules.mk rename keyboards/lily58/lib/{glcdfont.c => glcdfont_lily.c} (99%) delete mode 100755 keyboards/lily58/rev1/split_scomm.c delete mode 100755 keyboards/lily58/rev1/split_scomm.h delete mode 100755 keyboards/lily58/rev1/split_util.h delete mode 100755 keyboards/lily58/serial.h delete mode 100644 keyboards/lily58/serial_config.h delete mode 100755 keyboards/lily58/ssd1306.c delete mode 100755 keyboards/lily58/ssd1306.h rename keyboards/{omnikey_blackheart => omnikey_bh}/config.h (100%) rename keyboards/{omnikey_blackheart => omnikey_bh}/info.json (99%) rename keyboards/{omnikey_blackheart => omnikey_bh}/keymaps/default/keymap.c (100%) create mode 100644 keyboards/omnikey_bh/omnikey_bh.c rename keyboards/{omnikey_blackheart/omnikey_blackheart.h => omnikey_bh/omnikey_bh.h} (96%) rename keyboards/{omnikey_blackheart => omnikey_bh}/readme.md (83%) rename keyboards/{omnikey_blackheart => omnikey_bh}/rules.mk (100%) delete mode 100644 keyboards/omnikey_blackheart/omnikey_blackheart.c delete mode 100644 keyboards/pancake/feather/readme.md delete mode 100644 keyboards/pancake/keymaps/default/readme.md delete mode 100644 keyboards/pancake/promicro/readme.md rename keyboards/{ => spaceman}/2_milk/2_milk.c (100%) rename keyboards/{ => spaceman}/2_milk/2_milk.h (100%) rename keyboards/{ => spaceman}/2_milk/config.h (97%) rename keyboards/{ => spaceman}/2_milk/info.json (84%) rename keyboards/{ => spaceman}/2_milk/keymaps/binary/keymap.c (100%) rename keyboards/{ => spaceman}/2_milk/keymaps/binary/readme.md (100%) rename keyboards/{ => spaceman}/2_milk/keymaps/copypasta/keymap.c (100%) rename keyboards/{ => spaceman}/2_milk/keymaps/copypasta/readme.md (100%) rename keyboards/{ => spaceman}/2_milk/keymaps/default/keymap.c (100%) rename keyboards/{ => spaceman}/2_milk/keymaps/default/readme.md (100%) rename keyboards/{ => spaceman}/2_milk/keymaps/emoji/config.h (100%) rename keyboards/{ => spaceman}/2_milk/keymaps/emoji/keymap.c (100%) rename keyboards/{ => spaceman}/2_milk/keymaps/emoji/readme.md (100%) rename keyboards/{ => spaceman}/2_milk/keymaps/emoji/rules.mk (100%) rename keyboards/{ => spaceman}/2_milk/keymaps/excessbread/keymap.c (100%) rename keyboards/{ => spaceman}/2_milk/keymaps/excessbread/readme.md (100%) rename keyboards/{ => spaceman}/2_milk/keymaps/mikethetiger/keymap.c (100%) rename keyboards/{ => spaceman}/2_milk/keymaps/mikethetiger/readme.md (100%) rename keyboards/{ => spaceman}/2_milk/keymaps/mikethetiger/rules.mk (100%) rename keyboards/{ => spaceman}/2_milk/keymaps/mouse/keymap.c (100%) rename keyboards/{ => spaceman}/2_milk/keymaps/mouse/readme.md (100%) rename keyboards/{ => spaceman}/2_milk/readme.md (70%) rename keyboards/{ => spaceman}/2_milk/rules.mk (100%) rename keyboards/{ => spaceman}/pancake/config.h (100%) rename keyboards/{ => spaceman}/pancake/feather/config.h (100%) rename keyboards/{ => spaceman}/pancake/feather/rules.mk (100%) rename keyboards/{ => spaceman}/pancake/info.json (98%) rename keyboards/{ => spaceman}/pancake/keymaps/default/keymap.c (100%) create mode 100644 keyboards/spaceman/pancake/keymaps/default/readme.md rename keyboards/{ => spaceman}/pancake/pancake.c (100%) rename keyboards/{ => spaceman}/pancake/pancake.h (100%) rename keyboards/{ => spaceman}/pancake/promicro/config.h (100%) rename keyboards/{ => spaceman}/pancake/promicro/rules.mk (100%) rename keyboards/{ => spaceman}/pancake/readme.md (82%) delete mode 100644 keyboards/tkc1800/i2c.c delete mode 100644 keyboards/tkc1800/i2c.h delete mode 100644 keyboards/tkc1800/keymaps/default/config.h delete mode 100644 keyboards/tkc1800/keymaps/smt/config.h delete mode 100644 keyboards/tkc1800/keymaps/wkl/config.h delete mode 100644 keyboards/tkc1800/keymaps/yanfali/config.h delete mode 100644 keyboards/vision_division/keymaps/default/rules.mk rename keyboards/{z150_blackheart => z150_bh}/config.h (100%) rename keyboards/{z150_blackheart => z150_bh}/info.json (99%) rename keyboards/{z150_blackheart => z150_bh}/keymaps/default/keymap.c (100%) rename keyboards/{z150_blackheart => z150_bh}/keymaps/default_tkl/keymap.c (100%) rename keyboards/{z150_blackheart => z150_bh}/readme.md (86%) rename keyboards/{z150_blackheart => z150_bh}/rules.mk (100%) rename keyboards/{z150_blackheart/z150_blackheart.c => z150_bh/z150_bh.c} (95%) rename keyboards/{z150_blackheart/z150_blackheart.h => z150_bh/z150_bh.h} (100%) delete mode 100644 keyboards/zinc/i2c.c delete mode 100644 keyboards/zinc/i2c.h create mode 100644 keyboards/zinc/keymaps/default/readme_en.md delete mode 100644 keyboards/zinc/rev1/matrix.c delete mode 100644 keyboards/zinc/rev1/serial_config.h delete mode 100644 keyboards/zinc/rev1/serial_config_simpleapi.h delete mode 100644 keyboards/zinc/rev1/split_scomm.c delete mode 100644 keyboards/zinc/rev1/split_scomm.h delete mode 100644 keyboards/zinc/rev1/split_util.c delete mode 100644 keyboards/zinc/rev1/split_util.h delete mode 100644 keyboards/zinc/reva/matrix.c delete mode 100644 keyboards/zinc/reva/serial_config.h delete mode 100644 keyboards/zinc/reva/serial_config_simpleapi.h delete mode 100644 keyboards/zinc/reva/split_scomm.c delete mode 100644 keyboards/zinc/reva/split_scomm.h delete mode 100644 keyboards/zinc/reva/split_util.c delete mode 100644 keyboards/zinc/reva/split_util.h delete mode 100644 keyboards/zinc/serial.c delete mode 100644 keyboards/zinc/serial.h create mode 160000 lib/printf create mode 160000 lib/vusb delete mode 100644 tmk_core/common/chibios/printf.c delete mode 100644 tmk_core/common/chibios/printf.h delete mode 100644 tmk_core/protocol/vusb/usbdrv/Changelog.txt delete mode 100644 tmk_core/protocol/vusb/usbdrv/CommercialLicense.txt delete mode 100644 tmk_core/protocol/vusb/usbdrv/License.txt delete mode 100644 tmk_core/protocol/vusb/usbdrv/Readme.txt delete mode 100644 tmk_core/protocol/vusb/usbdrv/USB-ID-FAQ.txt delete mode 100644 tmk_core/protocol/vusb/usbdrv/USB-IDs-for-free.txt delete mode 100644 tmk_core/protocol/vusb/usbdrv/asmcommon.inc delete mode 100644 tmk_core/protocol/vusb/usbdrv/oddebug.c delete mode 100644 tmk_core/protocol/vusb/usbdrv/oddebug.h delete mode 100644 tmk_core/protocol/vusb/usbdrv/usbconfig-prototype.h delete mode 100644 tmk_core/protocol/vusb/usbdrv/usbdrv.c delete mode 100644 tmk_core/protocol/vusb/usbdrv/usbdrv.h delete mode 100644 tmk_core/protocol/vusb/usbdrv/usbdrvasm.S delete mode 100644 tmk_core/protocol/vusb/usbdrv/usbdrvasm.asm delete mode 100644 tmk_core/protocol/vusb/usbdrv/usbdrvasm12.inc delete mode 100644 tmk_core/protocol/vusb/usbdrv/usbdrvasm128.inc delete mode 100644 tmk_core/protocol/vusb/usbdrv/usbdrvasm15.inc delete mode 100644 tmk_core/protocol/vusb/usbdrv/usbdrvasm16.inc delete mode 100644 tmk_core/protocol/vusb/usbdrv/usbdrvasm165.inc delete mode 100644 tmk_core/protocol/vusb/usbdrv/usbdrvasm18-crc.inc delete mode 100644 tmk_core/protocol/vusb/usbdrv/usbdrvasm20.inc delete mode 100644 tmk_core/protocol/vusb/usbdrv/usbportability.h diff --git a/.gitmodules b/.gitmodules index 6d8ab8b94633..324ef790d34c 100644 --- a/.gitmodules +++ b/.gitmodules @@ -12,7 +12,13 @@ branch = master [submodule "lib/googletest"] path = lib/googletest - url = https://github.com/google/googletest + url = https://github.com/qmk/googletest [submodule "lib/lufa"] path = lib/lufa url = https://github.com/qmk/lufa +[submodule "lib/vusb"] + path = lib/vusb + url = https://github.com/qmk/v-usb +[submodule "lib/printf"] + path = lib/printf + url = https://github.com/qmk/printf diff --git a/Makefile b/Makefile index 0e57a72a0bd2..c851e01e7314 100644 --- a/Makefile +++ b/Makefile @@ -562,14 +562,16 @@ endef %: # Check if we have the CMP tool installed cmp $(ROOT_DIR)/Makefile $(ROOT_DIR)/Makefile >/dev/null 2>&1; if [ $$? -gt 0 ]; then printf "$(MSG_NO_CMP)"; exit 1; fi; - # Ensure that python3 is installed. This check can be removed after python is used in more places. - if ! python3 --version 1> /dev/null 2>&1; then printf "$(MSG_PYTHON_MISSING)"; fi + # Ensure that bin/qmk works. This will be a failing check after the next develop merge on 2020 Aug 29. + if ! bin/qmk hello 1> /dev/null 2>&1; then printf "$(MSG_PYTHON_MISSING)"; fi # Check if the submodules are dirty, and display a warning if they are ifndef SKIP_GIT if [ ! -e lib/chibios ]; then git submodule sync lib/chibios && git submodule update --depth 50 --init lib/chibios; fi if [ ! -e lib/chibios-contrib ]; then git submodule sync lib/chibios-contrib && git submodule update --depth 50 --init lib/chibios-contrib; fi if [ ! -e lib/ugfx ]; then git submodule sync lib/ugfx && git submodule update --depth 50 --init lib/ugfx; fi if [ ! -e lib/lufa ]; then git submodule sync lib/lufa && git submodule update --depth 50 --init lib/lufa; fi + if [ ! -e lib/vusb ]; then git submodule sync lib/vusb && git submodule update --depth 50 --init lib/vusb; fi + if [ ! -e lib/printf ]; then git submodule sync lib/printf && git submodule update --depth 50 --init lib/printf; fi git submodule status --recursive 2>/dev/null | \ while IFS= read -r x; do \ case "$$x" in \ diff --git a/docs/ChangeLog/20200530.md b/docs/ChangeLog/20200530.md new file mode 100644 index 000000000000..9def9ae12350 --- /dev/null +++ b/docs/ChangeLog/20200530.md @@ -0,0 +1,239 @@ +# QMK Breaking Change - 2020 May 30 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. + +The list of changes follows. + + +## Core Changes + +### Converting V-USB usbdrv to a submodule + +[#8321](https://github.com/qmk/qmk_firmware/pull/8321) and [qmk_compiler#62](https://github.com/qmk/qmk_compiler/pull/62). + +These PRs move the V-USB driver code out of the qmk_firmware repository and into a submodule pointed at https://github.com/obdev/v-usb. This will make it easier to update the codebase if needed, while applying any potential QMK-specific modifications by forking it to the QMK GitHub organization. + +### Unify Tap Hold functions and documentation + +[#8348](https://github.com/qmk/qmk_firmware/pull/8348) + +Updates all of the per key tap-hold functions to pass the `keyrecord_t` structure, and include documentation changes. + +Any remaining versions or code outside of the main repo will need to be converted: +| Old function | New Function | +|------------------------------------------------------|---------------------------------------------------------------------------| +|`uint16_t get_tapping_term(uint16_t keycode)` |`uint16_t get_tapping_term(uint16_t keycode, keyrecord_t *record)` | +|`bool get_ignore_mod_tap_interrupt(uint16_t keycode)` |`bool get_ignore_mod_tap_interrupt(uint16_t keycode, keyrecord_t *record)` | + +### Python Required In The Build Process + +[#9000](https://github.com/qmk/qmk_firmware/pull/9000) + +This is the last release of QMK that will work without having Python 3.6 (or later) installed. If your environment is not fully setup you will get a warning instructing you to set it up. + +After the next breaking change you will not be able to build if `bin/qmk hello` does not work. + +### Upgrade from tinyprintf to mpaland/printf + +[#8269](https://github.com/qmk/qmk_firmware/pull/8269) + +- Provides debug functionality on ChibiOS/ARM that is more compliant than previous integrations. +- Less maintenence, fewer QMK customisations, and allows QMK to sidestep previous compile and runtime issues. +- A `make git-submodule` may be required after pulling the latest QMK Firmware code to update to the new dependency. + +### Fixed RGB_DISABLE_AFTER_TIMEOUT to be seconds based & small internals cleanup + +[#6480](https://github.com/qmk/qmk_firmware/pull/6480) + +- Changes `RGB_DISABLE_AFTER_TIMEOUT` to be based on milliseconds instead of ticks. +- Includes a code cleanup, resulting in a savings of 100 bytes, depending on features used. +- Fixed issues with timeouts / suspending at the wrong time not turning off all LEDs in some cases. + +The `RGB_DISABLE_AFTER_TIMEOUT` definition is now deprecated, and has been superseded by `RGB_DISABLE_TIMEOUT`. To use the new definition, rename `RGB_DISABLE_AFTER_TIMEOUT` to `RGB_DISABLE_TIMEOUT` in your `config.h` file, and multiply the value set by 1200. + +Before: `#define RGB_DISABLE_AFTER_TIMEOUT 100` +After: `#define RGB_DISABLE_TIMEOUT 120000` + +### Switch to qmk forks for everything + +[#9019](https://github.com/qmk/qmk_firmware/pull/9019) + +Fork all QMK submodules to protect against upstream repositories disappearing. + +### code cleanup regarding deprecated macro PLAY_NOTE_ARRAY by replacing it with PLAY_SONG + +[#8484](https://github.com/qmk/qmk_firmware/pull/8484) + +Removes the deprecated `PLAY_NOTE_ARRAY` macro. References to it are replaced with `PLAY_SONG`, which references the same function. + +### fixing wrong configuration of AUDIO feature + +[#8903](https://github.com/qmk/qmk_firmware/pull/8903) and [#8974](https://github.com/qmk/qmk_firmware/pull/8974) + +`audio_avr.c` does not default to any pin; there has to be a #define XX_AUDIO in config.h at some level for Audio to actually work. Otherwise, the Audio code ends up cluttering the firmware, possibly breaking builds because the maximum allowed firmware size is exceeded. + +These changes fix this by disabling Audio on keyboards that have the feature misconfigured, and therefore non-functional. + +Also, add a compile-time error to alert the user to a missing pin-configuration (on AVR boards) when `AUDIO_ENABLE = yes` is set. + + +## Keyboard Refactors + +### Migrating Lily58 to use split_common + +[#6260](https://github.com/qmk/qmk_firmware/pull/6260) + +Modifies the default firmware for Lily58 to use the `split_common` library, instead of including and depending on its own set of libraries for the following functionality: + +- SSD1306 display +- i2c for OLED +- Serial Communication + +This allows current lily58 firmware to advance with updates to the `split_common` library, which is shared with many other split keyboards. + +#### To migrate existing Lily58 firmware: + +[Changes to `config.h`](https://github.com/qmk/qmk_firmware/pull/6260/files#diff-445ac369c8717dcd6fc6fc3630836fc1): +- Remove `#define SSD1306OLED` from config.h + + +[Changes to `keymap.c`](https://github.com/qmk/qmk_firmware/pull/6260/files#diff-20943ea59856e9bdf3d99ecb2eee40b7): +- Find/Replace each instance of `#ifdef SSD1306OLED` with `#ifdef OLED_DRIVER_ENABLE` +- The following changes are for compatibility with the OLED driver. If you don't use the OLED driver you may safely delete [this section](https://github.com/qmk/qmk_firmware/blob/e6b9980bd45c186f7360df68c24b6e05a80c10dc/keyboards/lily58/keymaps/default/keymap.c#L144-L190) +- Alternatively, if you did not change the OLED code from that in `default`, you may find it easier to simply copy the [relevant section](https://github.com/qmk/qmk_firmware/blob/4ac310668501ae6786c711ecc8f01f62ddaa1c0b/keyboards/lily58/keymaps/default/keymap.c#L138-L172). Otherwise, the changes you need to make are as follows (sample change [here](https://github.com/qmk/qmk_firmware/pull/6260/files#diff-20943ea59856e9bdf3d99ecb2eee40b7R138-R173)) +- [Remove](https://github.com/qmk/qmk_firmware/pull/6260/files#diff-20943ea59856e9bdf3d99ecb2eee40b7L138-L141) the block +```c +#ifdef SSD1306OLED + iota_gfx_init(!has_usb()); // turns on the display +#endif +``` +- Within the block bounded by `#ifdef OLED_DRIVER_ENABLE` and `#endif // OLED_DRIVER_ENABLE`, add the following block to ensure that your two OLEDs are rotated correctly across the left and right sides: +```c +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; +} +``` +- Remove the functions `matrix_scan_user`, `matrix_update` and `iota_gfx_task_user` +- Find/Replace `matrix_render_user(struct CharacterMatrix *matrix)` with `iota_gfx_task_user(void)` +- Find/Replace `is_master` with `is_keyboard_master()` +- For each instance of `matrix_write_ln(matrix, display_fn())`, rewrite it as `oled_write_ln(read_layer_state(), false);` +- For each instance of `matrix_write(matrix, read_logo());`, replace with `oled_write(read_logo(), false);` + +### Refactor zinc to use split_common + +[#7114](https://github.com/qmk/qmk_firmware/pull/7114) and [#9171](https://github.com/qmk/qmk_firmware/pull/9171) + +* Refactor to use split_common and remove split codes under the zinc/revx/ +* Add - backlight RGB LED and/or underglow RGB LED option +* Add - continuous RGB animations feature (between L and R halves) +* Fix - keymap files to adapt to changes + * all authors of keymaps confirmed this PR +* Update - documents and rules.mk + +### Refactor of TKC1800 to use common OLED code + +[#8472](https://github.com/qmk/qmk_firmware/pull/8472) + +Modifies the default firmware for TKC1800 to use the in-built I2C and OLED drivers, instead of including and depending on its own set of libraries for the following functionality: + +- SSD1306 display +- i2c for OLED + +This allows current TKC1800 firmware to advance with updates to those drivers, which are shared with other keyboards. + +#### To migrate existing TKC1800 firmware: + +[Changes to `config.h`](https://github.com/qmk/qmk_firmware/pull/8472/files#diff-d10b26e676b4a55cbb00d71955116526): +- Remove `#define SSD1306OLED` from config.h + +[Changes to `tkc1800.c`](https://github.com/qmk/qmk_firmware/pull/8472/files#diff-3b35bd30abe89c8110717c6972cd2cc5): +- Add the following to avoid debug errors on HID_listen if the screen is not present +```c +void keyboard_pre_init_kb(void) { + setPinInputHigh(D0); + setPinInputHigh(D1); + + keyboard_pre_init_user(); +} +``` + +[Changes to `keymap.c`](https://github.com/qmk/qmk_firmware/pull/8472/files#diff-05a2a344ce27e4d045fe68520ccd4771): +- Find/Replace each instance of `#ifdef SSD1306OLED` with `#ifdef OLED_DRIVER_ENABLE` +- The following changes are for compatibility with the OLED driver. If you don't use the OLED driver you may safely delete [this section](https://github.com/qmk/qmk_firmware/blob/e6b9980bd45c186f7360df68c24b6e05a80c10dc/keyboards/lily58/keymaps/default/keymap.c#L144-L190) +- [Remove](https://github.com/qmk/qmk_firmware/pull/6260/files#diff-20943ea59856e9bdf3d99ecb2eee40b7L91-L158) the block +```c +#ifdef SSD1306OLED + iota_gfx_init(!has_usb()); // turns on the display +#endif +``` +- Within the block bounded by `#ifdef OLED_DRIVER_ENABLE` and `#endif // OLED_DRIVER_ENABLE`, add the following block to ensure that your two OLEDs are rotated correctly across the left and right sides: +```c +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; +} +``` +- Remove the function `iota_gfx_task_user` + +### Split HHKB to ANSI and JP layouts and Add VIA support for each + +[#8582](https://github.com/qmk/qmk_firmware/pull/8582) + +- Splits the HHKB codebase into two separate folders `keyboards/hhkb/ansi` and `keyboards/hhkb/jp`. +- Adds VIA Configurator support for both versions. + +#### Migrating existing HHKB keymaps + +- Remove any checks for the `HHKB_JP` definition + - All checks for this definition have been removed, and each version uses the source that is appropriate to that version. +- Move the directory for your keymap into the appropriate `keymaps` directory + - `keyboards/hhkb/ansi/keymaps/` for ANSI HHKBs + - `keyboards/hhkb/jp/keymaps/` for HHKB JPs +- Compile with the new keyboard names + - This PR changes the compilation instructions for the HHKB Alternate Controller. To compile firmware for this controller moving forward, use: + - `make hhkb/ansi` for ANSI-layout HHKBs + - `make hhkb/jp` for HHKB JP keyboards + + +## Keyboard Moves + +- [#8412](https://github.com/qmk/qmk_firmware/pull/8412 "Changing board names to prevent confusion") by blindassassin111 +- [#8499](https://github.com/qmk/qmk_firmware/pull/8499 "Move the Keyboardio Model01 to a keyboardio/ subdir") by algernon +- [#8830](https://github.com/qmk/qmk_firmware/pull/8830 "Move spaceman keyboards") by Spaceman (formerly known as Rionlion100) +- [#8537](https://github.com/qmk/qmk_firmware/pull/8537 "Organizing my keyboards (plaid, tartan, ergoinu)") by hsgw + +Keyboards by Keyboardio, Spaceman, and hsgw move to vendor folders, while PCBs designed by blindassassin111 are renamed. + +Old Name | New Name +:----------------- | :----------------- +2_milk | spaceman/2_milk +at101_blackheart | at101_bh +ergoinu | dm9records/ergoinu +model01 | keyboardio/model01 +omnikey_blackheart | omnikey_bh +pancake | spaceman/pancake +plaid | dm9records/plaid +tartan | dm9records/tartan +z150_blackheart | z150_bh + +If you own one of these PCBs, please use the new names to compile your firmware moving forward. + + +## Keycode Migration PRs + +[#8954](https://github.com/qmk/qmk_firmware/pull/8954 "Migrate `ACTION_LAYER_TOGGLE` to `TG()`"), [#8957](https://github.com/qmk/qmk_firmware/pull/8957 "Migrate `ACTION_MODS_ONESHOT` to `OSM()`"), [#8958](https://github.com/qmk/qmk_firmware/pull/8958 "Migrate `ACTION_DEFAULT_LAYER_SET` to `DF()`"), [#8959](https://github.com/qmk/qmk_firmware/pull/8959 "Migrate `ACTION_LAYER_MODS` to `LM()`"), [#8968](https://github.com/qmk/qmk_firmware/pull/8968 "Migrate `ACTION_MODS_TAP_KEY` to `MT()`"), [#8977](https://github.com/qmk/qmk_firmware/pull/8977 "Migrate miscellaneous `fn_actions` entries"), and [#8979](https://github.com/qmk/qmk_firmware/pull/8979 "Migrate `ACTION_MODS_KEY` to chained mod keycodes") + +Authored by fauxpark, these pull requests remove references to deprecated TMK macros that have been superseded by native QMK keycodes. + +Old `fn_actions` action | New QMK keycode +:---------------------- | :-------------- +`ACTION_DEFAULT_LAYER_SET(layer)` | `DF(layer)` +`ACTION_LAYER_MODS(layer, mod)` | `LM(layer, mod)` +`ACTION_LAYER_ONESHOT(mod)` | `OSL(mod)` +`ACTION_LAYER_TOGGLE(layer)` | `TG(layer)` +`ACTION_MODS_ONESHOT(mod)` | `OSM(mod)` +`ACTION_MODS_TAP_KEY(mod, kc)` | `MT(mod, kc)` +`ACTION_MODS_KEY(mod, kc)`
e.g. `ACTION_MODS_KEY(MOD_LCTL, KC_0)` | `MOD(kc)`
e.g. `LCTL(KC_0)` diff --git a/docs/_summary.md b/docs/_summary.md index b3553b428501..1b6ddc67ca87 100644 --- a/docs/_summary.md +++ b/docs/_summary.md @@ -115,6 +115,7 @@ * [Overview](breaking_changes.md) * [My Pull Request Was Flagged](breaking_changes_instructions.md) * History + * [2020 May 30](ChangeLog/20200530.md) * [2020 Feb 29](ChangeLog/20200229.md) * [2019 Aug 30](ChangeLog/20190830.md) diff --git a/docs/breaking_changes.md b/docs/breaking_changes.md index 6c684970d829..154695ddacb6 100644 --- a/docs/breaking_changes.md +++ b/docs/breaking_changes.md @@ -6,27 +6,28 @@ 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 May 30](ChangeLog/20200530.md) * [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 May 30, 2020. +The next Breaking Change is scheduled for Aug 29, 2020. ### Important Dates -* [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. -* [ ] 2020 May 30 - Merge `future` to `master`. -* [ ] 2020 May 30 - `master` is unlocked. PR's can be merged again. +* [x] 2020 May 30 - `develop` is created. It will be rebased weekly. +* [ ] 2020 Aug 1 - `develop` closed to new PR's. +* [ ] 2020 Aug 1 - Call for testers. +* [ ] 2020 Aug 27 - `master` is locked, no PR's merged. +* [ ] 2020 Aug 29 - Merge `develop` to `master`. +* [ ] 2020 Aug 29 - `master` is unlocked. PR's can be merged again. ## What changes will be included? -To see a list of breaking change candidates you can look at the [`breaking_change` label](https://github.com/qmk/qmk_firmware/pulls?q=is%3Aopen+label%3Abreaking_change+is%3Apr). New changes might be added between now and when `future` is closed, and a PR with that label applied is not guaranteed to be merged. +To see a list of breaking change candidates you can look at the [`breaking_change` label](https://github.com/qmk/qmk_firmware/pulls?q=is%3Aopen+label%3Abreaking_change+is%3Apr). New changes might be added between now and when `develop` is closed, and a PR with that label applied is not guaranteed to be merged. -If you want your breaking change to be included in this round you need to create a PR with the `breaking_change` label and have it accepted before `future` closes. After `future` closes no new breaking changes will be accepted. +If you want your breaking change to be included in this round you need to create a PR with the `breaking_change` label and have it accepted before `develop` closes. After `develop` closes no new breaking changes will be accepted. Criteria for acceptance: @@ -37,9 +38,9 @@ Criteria for acceptance: This section documents various processes we use when running the Breaking Changes process. -## Rebase `future` from `master` +## Rebase `develop` from `master` -This is run every Friday while `future` is open. +This is run every Friday while `develop` is open. Process: @@ -47,31 +48,31 @@ Process: cd qmk_firmware git checkout master git pull --ff-only -git checkout future +git checkout develop git rebase master git push --force ``` -## Creating the `future` branch +## Creating the `develop` branch -This happens immediately after the previous `future` branch is merged. +This happens immediately after the previous `develop` branch is merged. * `qmk_firmware` git commands * [ ] `git checkout master` * [ ] `git pull --ff-only` - * [ ] `git checkout -b future` + * [ ] `git checkout -b develop` * [ ] Edit `readme.md` * [ ] Add a big notice at the top that this is a testing branch. * [ ] Include a link to this document * [ ] `git commit -m 'Branch point for Breaking Change'` * [ ] `git tag breakpoint___
` * [ ] `git tag ` # Prevent the breakpoint tag from confusing version incrementing - * [ ] `git push origin future` + * [ ] `git push origin develop` * [ ] `git push --tags` ## 4 Weeks Before Merge -* `future` is now closed to new PR's, only fixes for current PR's may be merged +* `develop` is now closed to new PR's, only fixes for current PR's may be merged * Post call for testers * [ ] Discord * [ ] GitHub PR @@ -94,15 +95,15 @@ This happens immediately after the previous `future` branch is merged. ## Day Of Merge * `qmk_firmware` git commands - * [ ] `git checkout future` + * [ ] `git checkout develop` * [ ] `git pull --ff-only` * [ ] `git rebase origin/master` * [ ] Edit `readme.md` - * [ ] Remove the notes about `future` + * [ ] Remove the notes about `develop` * [ ] Roll up the ChangeLog into one file. * [ ] `git commit -m 'Merge point for Breaking Change'` - * [ ] `git push origin future` + * [ ] `git push origin develop` * GitHub Actions - * [ ] Create a PR for `future` + * [ ] Create a PR for `develop` * [ ] Make sure travis comes back clean - * [ ] Merge `future` PR + * [ ] Merge `develop` PR diff --git a/docs/breaking_changes_instructions.md b/docs/breaking_changes_instructions.md index 3f2f93834f6c..d835671556d3 100644 --- a/docs/breaking_changes_instructions.md +++ b/docs/breaking_changes_instructions.md @@ -27,7 +27,7 @@ If you are contributing core code, and the only reason it needs to go through br 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. +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 `develop` – 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. diff --git a/docs/custom_quantum_functions.md b/docs/custom_quantum_functions.md index 84ae589ed6c3..6eb144af76b5 100644 --- a/docs/custom_quantum_functions.md +++ b/docs/custom_quantum_functions.md @@ -57,7 +57,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { case KC_ENTER: // Play a tone when enter is pressed if (record->event.pressed) { - PLAY_NOTE_ARRAY(tone_qwerty); + PLAY_SONG(tone_qwerty); } return true; // Let QMK send the enter press/release events default: @@ -438,7 +438,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { case KC_ENTER: // Play a tone when enter is pressed if (record->event.pressed) { - PLAY_NOTE_ARRAY(tone_qwerty); + PLAY_SONG(tone_qwerty); } return true; // Let QMK send the enter press/release events case RGB_LYR: // This allows me to use underglow as layer indication, or as normal @@ -486,56 +486,3 @@ And you're done. The RGB layer indication will only work if you want it to. And * Keymap: `void eeconfig_init_user(void)`, `uint32_t eeconfig_read_user(void)` and `void eeconfig_update_user(uint32_t val)` The `val` is the value of the data that you want to write to EEPROM. And the `eeconfig_read_*` function return a 32 bit (DWORD) value from the EEPROM. - -# Custom 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. - -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: - -```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; - } -} -``` - -## 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 user level functions are useful here, so no need to mark them as such. diff --git a/docs/feature_rgb_matrix.md b/docs/feature_rgb_matrix.md index 15057827c84d..a4f434cbd925 100644 --- a/docs/feature_rgb_matrix.md +++ b/docs/feature_rgb_matrix.md @@ -374,7 +374,8 @@ These are defined in [`rgblight_list.h`](https://github.com/qmk/qmk_firmware/blo ```c #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_TIMEOUT 0 // number of milliseconds to wait until rgb automatically turns off +#define RGB_DISABLE_AFTER_TIMEOUT 0 // OBSOLETE: 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) diff --git a/docs/ja/custom_quantum_functions.md b/docs/ja/custom_quantum_functions.md index 7e4fbd897eea..1524717c8e32 100644 --- a/docs/ja/custom_quantum_functions.md +++ b/docs/ja/custom_quantum_functions.md @@ -62,7 +62,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { case KC_ENTER: // enter が押された時に音を再生します if (record->event.pressed) { - PLAY_NOTE_ARRAY(tone_qwerty); + PLAY_SONG(tone_qwerty); } return true; // QMK に enter のプレスまたはリリースイベントを送信させます default: @@ -440,7 +440,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { case KC_ENTER: // enter が押された時に音を再生します if (record->event.pressed) { - PLAY_NOTE_ARRAY(tone_qwerty); + PLAY_SONG(tone_qwerty); } return true; // QMK に enter のプレスまたはリリースイベントを送信させます case RGB_LYR: // これにより、アンダーグローをレイヤー表示として、あるいは通常通りに使うことができます。 @@ -511,7 +511,7 @@ void eeconfig_init_user(void) { // EEPROM がリセットされます! キーコードに基づいて `TAPPING_TERM` を変更するには、次のようなものを `keymap.c` ファイルに追加します: ```c -uint16_t get_tapping_term(uint16_t keycode) { +uint16_t get_tapping_term(uint16_t keycode, keyrecord_t *record) { switch (keycode) { case SFT_T(KC_SPC): return TAPPING_TERM + 1250; @@ -528,7 +528,7 @@ uint16_t get_tapping_term(uint16_t keycode) { キーコードに基づいて `IGNORE_MOD_TAP_INTERRUPT` の値を変更するには、次のようなものを `keymap.c` ファイルに追加します: ```c -bool get_ignore_mod_tap_interrupt(uint16_t keycode) { +bool get_ignore_mod_tap_interrupt(uint16_t keycode, keyrecord_t *record) { switch (keycode) { case SFT_T(KC_SPC): return true; diff --git a/docs/tap_hold.md b/docs/tap_hold.md index a0b648694b9a..2dc57f03c2d4 100644 --- a/docs/tap_hold.md +++ b/docs/tap_hold.md @@ -4,6 +4,38 @@ While Tap-Hold options are fantastic, they are not without their issues. We hav These options let you modify the behavior of the Tap-Hold keys. +## Tapping Term + +The crux of all of the following features is the tapping term setting. This determines what is a tap and what is a hold. And the exact timing for this to feel natural can vary from keyboard to keyboard, from switch to switch, and from key to key. + +You can set the global time for this by adding the following setting to your `config.h`: + +```c +#define TAPPING_TERM 200 +``` + +This setting is defined in milliseconds, and does default to 200ms. This is a good average for a majority of people. + +For more granular control of this feature, you can add the following to your `config.h`: +```c +#define TAPPING_TERM_PER_KEY +``` + +You can then add the following function to your keymap: + +```c +uint16_t get_tapping_term(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case SFT_T(KC_SPC): + return TAPPING_TERM + 1250; + case LT(1, KC_GRV): + return 130; + default: + return TAPPING_TERM; +} +``` + + ## Permissive Hold As of [PR#1359](https://github.com/qmk/qmk_firmware/pull/1359/), there is a new `config.h` option: @@ -27,6 +59,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 LT(1, KC_BSPC): + return true; + default: + return false; + } +} +``` + ## Ignore Mod Tap Interrupt To enable this setting, add this to your `config.h`: @@ -62,13 +113,13 @@ For more granular control of this feature, you can add the following to your `co 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; - } +bool get_ignore_mod_tap_interrupt(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case SFT_T(KC_SPC): + return true; + default: + return false; + } } ``` @@ -106,12 +157,12 @@ 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; - } + switch (keycode) { + case LT(1, KC_BSPC): + return true; + default: + return false; + } } ``` @@ -126,3 +177,13 @@ To enable `retro tapping`, add the following to your `config.h`: Holding and releasing a dual function key without pressing another key will result in nothing happening. With retro tapping enabled, releasing the key without pressing another will send the original keycode even if it is outside the tapping term. For instance, holding and releasing `LT(2, KC_SPACE)` without hitting another key will result in nothing happening. With this enabled, it will send `KC_SPACE` instead. + +## Why do we include the key record for the per key functions? + +One thing that you may notice is that we include the key record for all of the "per key" functions, and may be wondering why we do that. + +Well, it's simply really: customization. But specifically, it depends on how your keyboard is wired up. For instance, if each row is actually using a row in the keyboard's matrix, then it may be simpler to use `if (record->event.row == 3)` instead of checking a whole bunch of keycodes. Which is especially good for those people using the Tap Hold type keys on the home row. So you could fine tune those to not interfere with your normal typing. + +## Why is there no `*_kb` or `*_user` functions?! + +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/zh-cn/custom_quantum_functions.md b/docs/zh-cn/custom_quantum_functions.md index f2c6098dcb70..95b2084dbf42 100644 --- a/docs/zh-cn/custom_quantum_functions.md +++ b/docs/zh-cn/custom_quantum_functions.md @@ -57,7 +57,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { case KC_ENTER: // 当按下回车时播放音符 if (record->event.pressed) { - PLAY_NOTE_ARRAY(tone_qwerty); + PLAY_SONG(tone_qwerty); } return true; // 让QMK触发回车按下/释放事件 default: @@ -413,7 +413,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { case KC_ENTER: // 在按下回车时播放音符 if (record->event.pressed) { - PLAY_NOTE_ARRAY(tone_qwerty); + PLAY_SONG(tone_qwerty); } return true; // 让QMK产生回车按下/释放事件 case RGB_LYR: // 本句让underglow作为层指示,或正常使用。 @@ -473,7 +473,7 @@ void eeconfig_init_user(void) { // EEPROM正被重置 想要修改基于键码的`TAPPING TERM`,你要向`keymap.c`文件添加如下代码: ```c -uint16_t get_tapping_term(uint16_t keycode) { +uint16_t get_tapping_term(uint16_t keycode, keyrecord_t *record) { switch (keycode) { case SFT_T(KC_SPC): return TAPPING_TERM + 1250; diff --git a/keyboards/at101_bh/at101_bh.c b/keyboards/at101_bh/at101_bh.c new file mode 100644 index 000000000000..3b519373b070 --- /dev/null +++ b/keyboards/at101_bh/at101_bh.c @@ -0,0 +1 @@ +#include "at101_bh.h" diff --git a/keyboards/at101_blackheart/at101_blackheart.h b/keyboards/at101_bh/at101_bh.h similarity index 96% rename from keyboards/at101_blackheart/at101_blackheart.h rename to keyboards/at101_bh/at101_bh.h index 24ac1b7c541b..54655cf60e8d 100644 --- a/keyboards/at101_blackheart/at101_blackheart.h +++ b/keyboards/at101_bh/at101_bh.h @@ -1,5 +1,4 @@ -#ifndef at101_blackheart_H -#define at101_blackheart_H +#pragma once #include "quantum.h" @@ -24,5 +23,3 @@ { K1000, K1001, KC_NO, KC_NO, KC_NO, K1005, K1006, K1007, K1008, K1009 }, \ { K1100, K1101, K1102, KC_NO, KC_NO, K1105, K1106, K1107, K1108, KC_NO } \ } - -#endif diff --git a/keyboards/at101_blackheart/config.h b/keyboards/at101_bh/config.h similarity index 95% rename from keyboards/at101_blackheart/config.h rename to keyboards/at101_bh/config.h index 83814c6486c5..6928118b7966 100644 --- a/keyboards/at101_blackheart/config.h +++ b/keyboards/at101_bh/config.h @@ -7,7 +7,7 @@ #define PRODUCT_ID 0x6060 #define DEVICE_VER 0x0001 #define MANUFACTURER blindassassin111 -#define PRODUCT AT101_Blackheart PCB +#define PRODUCT AT101_BH PCB #define DESCRIPTION Replacement AT101 PCB /* key matrix size */ diff --git a/keyboards/at101_blackheart/info.json b/keyboards/at101_bh/info.json similarity index 98% rename from keyboards/at101_blackheart/info.json rename to keyboards/at101_bh/info.json index 4bef46712d17..1d28dc230bd3 100644 --- a/keyboards/at101_blackheart/info.json +++ b/keyboards/at101_bh/info.json @@ -1,6 +1,6 @@ { - "keyboard_name": "AT101 Blackheart PCB", - "keyboard_folder": "at101_blackheart", + "keyboard_name": "AT101 BH PCB", + "keyboard_folder": "at101_bh", "url": "https://deskthority.net/group-buys-f50/programmable-vintage-board-pcbs-omnikey-at101-and-z-150-t19325.html", "maintainer": "qmk, blindassassin111", "width": 22.5, diff --git a/keyboards/at101_blackheart/keymaps/default/keymap.c b/keyboards/at101_bh/keymaps/default/keymap.c similarity index 100% rename from keyboards/at101_blackheart/keymaps/default/keymap.c rename to keyboards/at101_bh/keymaps/default/keymap.c diff --git a/keyboards/at101_blackheart/readme.md b/keyboards/at101_bh/readme.md similarity index 77% rename from keyboards/at101_blackheart/readme.md rename to keyboards/at101_bh/readme.md index d435d6955aa6..8a9ce2496ff2 100644 --- a/keyboards/at101_blackheart/readme.md +++ b/keyboards/at101_bh/readme.md @@ -1,15 +1,15 @@ -# AT101 Blackheart PCB +# AT101 BH PCB -![AT101 Blackheart PCB](https://deskthority.net/resources/image/48571) +![AT101 BH PCB](https://deskthority.net/resources/image/48571) A replacement PCB for AT101 keyboards. Keyboard Maintainer: QMK Community and blindassassin111 -Hardware Supported: AT101 blackheart PCB +Hardware Supported: AT101 BH PCB Hardware Availability: https://deskthority.net/group-buys-f50/programmable-vintage-board-pcbs-omnikey-at101-and-z-150-t19325.html Make example for this keyboard (after setting up your build environment): - make at101_blackheart:default + make at101_bh: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/at101_blackheart/rules.mk b/keyboards/at101_bh/rules.mk similarity index 100% rename from keyboards/at101_blackheart/rules.mk rename to keyboards/at101_bh/rules.mk diff --git a/keyboards/at101_blackheart/at101_blackheart.c b/keyboards/at101_blackheart/at101_blackheart.c deleted file mode 100644 index aa07a7864368..000000000000 --- a/keyboards/at101_blackheart/at101_blackheart.c +++ /dev/null @@ -1 +0,0 @@ -#include "at101_blackheart.h" diff --git a/keyboards/atomic/keymaps/pvc/keymap.c b/keyboards/atomic/keymaps/pvc/keymap.c index 33b3a9d824b8..361d702c5bc3 100644 --- a/keyboards/atomic/keymaps/pvc/keymap.c +++ b/keyboards/atomic/keymaps/pvc/keymap.c @@ -102,7 +102,7 @@ enum keyboard_macros { #define SC_CCLS LCTL(KC_F4) #define TG_NKRO MAGIC_TOGGLE_NKRO -#define OS_SHFT KC_FN0 +#define OS_SHFT OSM(MOD_LSFT) #define ________________ _______, _______ #define XXXXXXXXXXXXXXXX XXXXXXX, XXXXXXX @@ -258,10 +258,6 @@ void persistent_default_layer_set(uint16_t default_layer) { default_layer_set(default_layer); } -const uint16_t PROGMEM fn_actions[] = { - [0] = ACTION_MODS_ONESHOT(MOD_LSFT), -}; - const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { // MACRODOWN only works in this function diff --git a/keyboards/atreus62/keymaps/atreus52/keymap.c b/keyboards/atreus62/keymaps/atreus52/keymap.c index c7dcb67653cd..31a01ccd879f 100644 --- a/keyboards/atreus62/keymaps/atreus52/keymap.c +++ b/keyboards/atreus62/keymaps/atreus52/keymap.c @@ -10,6 +10,8 @@ #define KC_RAIS MO(RAISE) #define KC_LOWR MO(LOWER) +#define KC_TGBD TG(BDO) +#define KC_TGRS TG(RESETL) const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [DVORAK] = LAYOUT_kc( @@ -17,7 +19,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { NO, QUOT, COMM, DOT, P, Y, F, G, C, R, L, NO, \ NO, A, O, E, U, I, D, H, T, N, S, NO, \ NO, SCLN, Q, J, K, X, B, M, W, V, Z, NO, \ - NO, FN2, LALT, LCTL, LOWR, LSFT, BSPC, ENT, SPC, RAIS, LGUI, LEFT, RGHT, NO + NO, TGBD, LALT, LCTL, LOWR, LSFT, BSPC, ENT, SPC, RAIS, LGUI, LEFT, RGHT, NO ), [QWERTY] = LAYOUT_kc( @@ -25,7 +27,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { NO, Q, W, E, R, T, Y, U, I, O, P, NO, \ NO, A, S, D, F, G, H, J, K, L, SCLN, NO, \ NO, Z, X, C, V, B, N, M, COMM, DOT, SLSH, NO, \ - NO, FN2, LALT, LCTL, LOWR, LSFT, BSPC, ENT, SPC, RAIS, LGUI, LEFT, RGHT, NO + NO, TGBD, LALT, LCTL, LOWR, LSFT, BSPC, ENT, SPC, RAIS, LGUI, LEFT, RGHT, NO ), [RAISE] = LAYOUT_kc( @@ -33,7 +35,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { NO, TILD, GRV, LCBR, RCBR, DQUO, QUOT, EQL, PLUS, MINS, QUES, NO, \ NO, ESC, TAB, LPRN, RPRN, BSLS, SLSH, LEFT, DOWN, UP, RGHT, NO, \ NO, TRNS, TRNS, LBRC, RBRC, TRNS, INS, PIPE, UNDS, TRNS, TRNS, NO, \ - NO, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, FN3, NO + NO, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TGRS, NO ), [LOWER] = LAYOUT_kc( @@ -49,7 +51,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { NO, TAB, Q, W, E, R, 6, Y, I, O, P, NO, \ NO, LSFT, A, S, D, F, 7, G, H, J, K, NO, \ NO, T, Z, X, C, V, 8, B, N, M, L, NO, \ - NO, LCTL, SPC, SPC, SPC, SPC, COMM, ENT, 9, NO, NO, NO, FN2, NO + NO, LCTL, SPC, SPC, SPC, SPC, COMM, ENT, 9, NO, NO, NO, TGBD, NO ), [RESETL] = LAYOUT( @@ -57,15 +59,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, \ KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, \ KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, \ - KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_FN3,KC_NO + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, TG(RESETL),KC_NO ) }; -const uint16_t PROGMEM fn_actions[] = { - [2] = ACTION_LAYER_TOGGLE(BDO), // BDO layer - [3] = ACTION_LAYER_TOGGLE(RESETL) // RESET layer -}; - const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { // MACRODOWN only works in this function switch (id) { diff --git a/keyboards/bpiphany/pegasushoof/keymaps/blowrak/keymap.c b/keyboards/bpiphany/pegasushoof/keymaps/blowrak/keymap.c index aad2d643cd93..f9234a7b2f9d 100644 --- a/keyboards/bpiphany/pegasushoof/keymaps/blowrak/keymap.c +++ b/keyboards/bpiphany/pegasushoof/keymaps/blowrak/keymap.c @@ -48,7 +48,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TAB, SE_AO, SE_AE, SE_OE, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_COMM,SE_CIRC,SE_QUOT, KC_DEL, KC_END, KC_PGDN, \ KC_LCTRL,KC_A, KC_O, KC_E, KC_U, KC_I, KC_H, KC_D, KC_T, KC_N, KC_S, SE_MINS, KC_ENT, \ KC_LSFT, SE_LTGT,KC_DOT, KC_Q, KC_J, KC_K, KC_B, KC_X, KC_M, KC_W, KC_V, KC_Z, KC_RSFT, KC_UP, \ - MO(KM_MEDIA),KC_LGUI,KC_LALT, KC_SPC, KC_RALT,KC_RGUI,KC_MENU,KC_FN1, KC_LEFT,KC_DOWN,KC_RGHT), + MO(KM_MEDIA),KC_LGUI,KC_LALT, KC_SPC, KC_RALT,KC_RGUI,KC_MENU,TG(KM_QWERTY), KC_LEFT,KC_DOWN,KC_RGHT), /* Layer 1: Standard ISO layer */ [KM_QWERTY] = 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, \ @@ -56,7 +56,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, SE_AO, SE_CIRC,SE_QUOT, KC_DEL, KC_END, KC_PGDN, \ KC_LCTRL,KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, SE_OE, SE_AE, KC_ENT, \ KC_LSFT, SE_LTGT,KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM,KC_DOT, SE_MINS, KC_RSFT, KC_UP, \ - MO(KM_MEDIA),KC_LGUI,KC_LALT, KC_SPC, KC_RALT,KC_RGUI,KC_MENU,KC_FN1, KC_LEFT,KC_DOWN,KC_RGHT), + MO(KM_MEDIA),KC_LGUI,KC_LALT, KC_SPC, KC_RALT,KC_RGUI,KC_MENU,TG(KM_QWERTY), KC_LEFT,KC_DOWN,KC_RGHT), /* Layer 2: Media layer */ [KM_MEDIA] = LAYOUT( \ _______, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, KC_WAKE,KC_PWR, KC_SLEP, \ @@ -75,10 +75,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { _______,_______,_______, _______, _______,_______,_______,_______, _______,_______,_______), }; -const uint16_t PROGMEM fn_actions[] = { - [1] = ACTION_LAYER_TOGGLE(KM_QWERTY) -}; - void matrix_scan_user(void) { uint8_t layer = biton32(layer_state); diff --git a/keyboards/ckeys/handwire_101/config.h b/keyboards/ckeys/handwire_101/config.h index 3dc99319ed08..849f4f6077d7 100755 --- a/keyboards/ckeys/handwire_101/config.h +++ b/keyboards/ckeys/handwire_101/config.h @@ -158,12 +158,12 @@ along with this program. If not, see . //#define MAGIC_KEY_SLEEP_LED Z // Audio Click -#define AUDIO_CLICKY +//#define AUDIO_CLICKY // Music Mode Polyphony // NOTE: Must change polyphony_rate to a number higher than 0 in voices.c -#define AUDIO_VOICES -#define PITCH_STANDARD_A 880.0f +//#define AUDIO_VOICES +//#define PITCH_STANDARD_A 880.0f // Mouse keys #define MOUSEKEY_DELAY 0 diff --git a/keyboards/ckeys/handwire_101/rules.mk b/keyboards/ckeys/handwire_101/rules.mk index 41a29b35373f..83d55e0f7061 100755 --- a/keyboards/ckeys/handwire_101/rules.mk +++ b/keyboards/ckeys/handwire_101/rules.mk @@ -28,5 +28,5 @@ BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by d #MIDI_ENABLE = yes # MIDI controls UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID -AUDIO_ENABLE = yes # Audio output on port C6 +AUDIO_ENABLE = no # Audio output FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches diff --git a/keyboards/clueboard/card/keymaps/default/keymap.c b/keyboards/clueboard/card/keymaps/default/keymap.c index 0fa1d9d98911..0d94eb46c92a 100644 --- a/keyboards/clueboard/card/keymaps/default/keymap.c +++ b/keyboards/clueboard/card/keymaps/default/keymap.c @@ -38,6 +38,7 @@ void matrix_scan_user(void) { bool process_record_user(uint16_t keycode, keyrecord_t *record) { switch (keycode) { +#ifdef AUDIO_ENABLE case SONG_SU: if (record->event.pressed) { PLAY_SONG(tone_startup); @@ -58,7 +59,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { } return false; - +#endif default: return true; } diff --git a/keyboards/clueboard/card/keymaps/default/rules.mk b/keyboards/clueboard/card/keymaps/default/rules.mk index 998bb5e0eb1c..82ee482bed11 100644 --- a/keyboards/clueboard/card/keymaps/default/rules.mk +++ b/keyboards/clueboard/card/keymaps/default/rules.mk @@ -10,7 +10,7 @@ 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 +AUDIO_ENABLE = no # Audio output UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. diff --git a/keyboards/converter/usb_usb/keymaps/chriskopher/keymap.c b/keyboards/converter/usb_usb/keymaps/chriskopher/keymap.c index c472f78b7de2..716ff19abdd3 100644 --- a/keyboards/converter/usb_usb/keymaps/chriskopher/keymap.c +++ b/keyboards/converter/usb_usb/keymaps/chriskopher/keymap.c @@ -175,7 +175,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { // clang-format on // Configure ignore mod tap interrupt per key -bool get_ignore_mod_tap_interrupt(uint16_t keycode) { +bool get_ignore_mod_tap_interrupt(uint16_t keycode, keyrecord_t *record) { switch (keycode) { // I don't like how mod tap interrupt feels with these keys specifically when I'm typing case LCTL_T(KC_ESC): diff --git a/keyboards/converter/usb_usb/keymaps/coloneljesus/keymap.c b/keyboards/converter/usb_usb/keymaps/coloneljesus/keymap.c index 7e399081951d..ce4876536f83 100644 --- a/keyboards/converter/usb_usb/keymaps/coloneljesus/keymap.c +++ b/keyboards/converter/usb_usb/keymaps/coloneljesus/keymap.c @@ -283,13 +283,9 @@ const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { GRV, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, TRNS,DEL, TRNS,TRNS,TRNS, TRNS,TRNS,TRNS,TRNS, TRNS,TRNS, CAPS,TRNS,TRNS,ESC, TRNS,TRNS,TRNS,HOME,UP, END, PSCR,SLCK,PAUS, INS, TRNS,TRNS,TRNS, TRNS,TRNS,TRNS,TRNS, TRNS,TRNS, TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,PGUP,LEFT,DOWN,RGHT,TRNS,TRNS, TRNS,TRNS, TRNS,TRNS,TRNS,TRNS, TRNS,TRNS, - TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,SPC, PGDN,GRV, FN1, TRNS,APP, TRNS,TRNS, TRNS, TRNS,TRNS,TRNS,TRNS, TRNS,TRNS, + TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,SPC, PGDN,GRV, TILD, TRNS,APP, 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 ), }; -const action_t PROGMEM fn_actions[] = { - [1] = ACTION_MODS_KEY(MOD_LSFT, KC_GRV), // tilde -}; - #endif diff --git a/keyboards/crkbd/keymaps/drashna/keymap.c b/keyboards/crkbd/keymaps/drashna/keymap.c index 55d51eb08ac7..0769edf3b94d 100644 --- a/keyboards/crkbd/keymaps/drashna/keymap.c +++ b/keyboards/crkbd/keymaps/drashna/keymap.c @@ -124,7 +124,7 @@ bool process_record_keymap(uint16_t keycode, keyrecord_t *record) { oled_rotation_t oled_init_user(oled_rotation_t rotation) { return OLED_ROTATION_270; } #endif -uint16_t get_tapping_term(uint16_t keycode) { +uint16_t get_tapping_term(uint16_t keycode, keyrecord_t *record) { switch (keycode) { case ALT_T(KC_A): return TAPPING_TERM + 100; diff --git a/keyboards/cu75/cu75.c b/keyboards/cu75/cu75.c index 6dc289845457..60c92b708a6a 100644 --- a/keyboards/cu75/cu75.c +++ b/keyboards/cu75/cu75.c @@ -26,7 +26,7 @@ void matrix_init_kb(void) #ifdef AUDIO_ENABLE audio_init(); - PLAY_NOTE_ARRAY(test_sound, false, STACCATO); + PLAY_SONG(test_sound); // Fix port B5 cbi(DDRB, 5); sbi(PORTB, 5); diff --git a/keyboards/ergoinu/config.h b/keyboards/dm9records/ergoinu/config.h similarity index 100% rename from keyboards/ergoinu/config.h rename to keyboards/dm9records/ergoinu/config.h diff --git a/keyboards/ergoinu/ergoinu.c b/keyboards/dm9records/ergoinu/ergoinu.c similarity index 100% rename from keyboards/ergoinu/ergoinu.c rename to keyboards/dm9records/ergoinu/ergoinu.c diff --git a/keyboards/ergoinu/ergoinu.h b/keyboards/dm9records/ergoinu/ergoinu.h similarity index 100% rename from keyboards/ergoinu/ergoinu.h rename to keyboards/dm9records/ergoinu/ergoinu.h diff --git a/keyboards/ergoinu/info.json b/keyboards/dm9records/ergoinu/info.json similarity index 98% rename from keyboards/ergoinu/info.json rename to keyboards/dm9records/ergoinu/info.json index 81f53fd25577..3627049a5ed7 100644 --- a/keyboards/ergoinu/info.json +++ b/keyboards/dm9records/ergoinu/info.json @@ -1,7 +1,7 @@ { "keyboard_name": "Ergoinu", "url": "", - "maintainer": "hsgw", + "maintainer": "hsgw(Takuya Urakawa)", "width": 18, "height": 5.4, "layouts": { diff --git a/keyboards/ergoinu/keymaps/default/config.h b/keyboards/dm9records/ergoinu/keymaps/default/config.h similarity index 100% rename from keyboards/ergoinu/keymaps/default/config.h rename to keyboards/dm9records/ergoinu/keymaps/default/config.h diff --git a/keyboards/ergoinu/keymaps/default/keymap.c b/keyboards/dm9records/ergoinu/keymaps/default/keymap.c similarity index 100% rename from keyboards/ergoinu/keymaps/default/keymap.c rename to keyboards/dm9records/ergoinu/keymaps/default/keymap.c diff --git a/keyboards/ergoinu/keymaps/default/rules.mk b/keyboards/dm9records/ergoinu/keymaps/default/rules.mk similarity index 100% rename from keyboards/ergoinu/keymaps/default/rules.mk rename to keyboards/dm9records/ergoinu/keymaps/default/rules.mk diff --git a/keyboards/ergoinu/keymaps/default_jis/config.h b/keyboards/dm9records/ergoinu/keymaps/default_jis/config.h similarity index 100% rename from keyboards/ergoinu/keymaps/default_jis/config.h rename to keyboards/dm9records/ergoinu/keymaps/default_jis/config.h diff --git a/keyboards/ergoinu/keymaps/default_jis/keymap.c b/keyboards/dm9records/ergoinu/keymaps/default_jis/keymap.c similarity index 100% rename from keyboards/ergoinu/keymaps/default_jis/keymap.c rename to keyboards/dm9records/ergoinu/keymaps/default_jis/keymap.c diff --git a/keyboards/ergoinu/keymaps/default_jis/rules.mk b/keyboards/dm9records/ergoinu/keymaps/default_jis/rules.mk similarity index 100% rename from keyboards/ergoinu/keymaps/default_jis/rules.mk rename to keyboards/dm9records/ergoinu/keymaps/default_jis/rules.mk diff --git a/keyboards/ergoinu/matrix.c b/keyboards/dm9records/ergoinu/matrix.c similarity index 100% rename from keyboards/ergoinu/matrix.c rename to keyboards/dm9records/ergoinu/matrix.c diff --git a/keyboards/ergoinu/readme.md b/keyboards/dm9records/ergoinu/readme.md similarity index 89% rename from keyboards/ergoinu/readme.md rename to keyboards/dm9records/ergoinu/readme.md index 06e0cf352ebf..de0a1c6c9706 100644 --- a/keyboards/ergoinu/readme.md +++ b/keyboards/dm9records/ergoinu/readme.md @@ -11,11 +11,11 @@ Hardware Availability & Repository: [https://github.com/hsgw/ergoinu](https://gi Make example for this keyboard (after setting up your build environment): - make ergoinu:default + make dm9records/ergoinu:default (or) - make ergoinu:default_jis + make dm9records/ergoinu:default_jis 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. diff --git a/keyboards/ergoinu/rules.mk b/keyboards/dm9records/ergoinu/rules.mk similarity index 95% rename from keyboards/ergoinu/rules.mk rename to keyboards/dm9records/ergoinu/rules.mk index 6f5debe00c35..493046ffa4de 100644 --- a/keyboards/ergoinu/rules.mk +++ b/keyboards/dm9records/ergoinu/rules.mk @@ -26,7 +26,7 @@ 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. +RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. SUBPROJECT_rev1 = no USE_I2C = no # i2c is not supported # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE @@ -35,8 +35,6 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend CUSTOM_MATRIX = yes SRC += matrix.c serial.c split_util.c -DEFAULT_FOLDER = ergoinu - # ergoinu configs DISABLE_PROMICRO_LEDs = yes diff --git a/keyboards/ergoinu/serial.c b/keyboards/dm9records/ergoinu/serial.c similarity index 100% rename from keyboards/ergoinu/serial.c rename to keyboards/dm9records/ergoinu/serial.c diff --git a/keyboards/ergoinu/serial.h b/keyboards/dm9records/ergoinu/serial.h similarity index 100% rename from keyboards/ergoinu/serial.h rename to keyboards/dm9records/ergoinu/serial.h diff --git a/keyboards/ergoinu/serial_config.h b/keyboards/dm9records/ergoinu/serial_config.h similarity index 100% rename from keyboards/ergoinu/serial_config.h rename to keyboards/dm9records/ergoinu/serial_config.h diff --git a/keyboards/ergoinu/split_util.c b/keyboards/dm9records/ergoinu/split_util.c similarity index 100% rename from keyboards/ergoinu/split_util.c rename to keyboards/dm9records/ergoinu/split_util.c diff --git a/keyboards/ergoinu/split_util.h b/keyboards/dm9records/ergoinu/split_util.h similarity index 100% rename from keyboards/ergoinu/split_util.h rename to keyboards/dm9records/ergoinu/split_util.h diff --git a/keyboards/plaid/config.h b/keyboards/dm9records/plaid/config.h similarity index 100% rename from keyboards/plaid/config.h rename to keyboards/dm9records/plaid/config.h diff --git a/keyboards/plaid/info.json b/keyboards/dm9records/plaid/info.json similarity index 97% rename from keyboards/plaid/info.json rename to keyboards/dm9records/plaid/info.json index 13bd05c149e4..318154d7de1c 100644 --- a/keyboards/plaid/info.json +++ b/keyboards/dm9records/plaid/info.json @@ -1,8 +1,8 @@ { "keyboard_name": "Plaid // Through Hole", - "keyboard_folder": "planid", + "keyboard_folder": "dm9records/plaid", "url": "https://github.com/hsgw/plaid", - "maintainer": "hsgw", + "maintainer": "hsgw(Takuya Urakawa)", "width": 12, "height": 4, "layouts": { diff --git a/keyboards/plaid/keymaps/brickbots/config.h b/keyboards/dm9records/plaid/keymaps/brickbots/config.h similarity index 100% rename from keyboards/plaid/keymaps/brickbots/config.h rename to keyboards/dm9records/plaid/keymaps/brickbots/config.h diff --git a/keyboards/plaid/keymaps/brickbots/keymap.c b/keyboards/dm9records/plaid/keymaps/brickbots/keymap.c similarity index 100% rename from keyboards/plaid/keymaps/brickbots/keymap.c rename to keyboards/dm9records/plaid/keymaps/brickbots/keymap.c diff --git a/keyboards/plaid/keymaps/brickbots/readme.md b/keyboards/dm9records/plaid/keymaps/brickbots/readme.md similarity index 100% rename from keyboards/plaid/keymaps/brickbots/readme.md rename to keyboards/dm9records/plaid/keymaps/brickbots/readme.md diff --git a/keyboards/plaid/keymaps/default/config.h b/keyboards/dm9records/plaid/keymaps/default/config.h similarity index 100% rename from keyboards/plaid/keymaps/default/config.h rename to keyboards/dm9records/plaid/keymaps/default/config.h diff --git a/keyboards/plaid/keymaps/default/keymap.c b/keyboards/dm9records/plaid/keymaps/default/keymap.c similarity index 100% rename from keyboards/plaid/keymaps/default/keymap.c rename to keyboards/dm9records/plaid/keymaps/default/keymap.c diff --git a/keyboards/plaid/keymaps/default/readme.md b/keyboards/dm9records/plaid/keymaps/default/readme.md similarity index 100% rename from keyboards/plaid/keymaps/default/readme.md rename to keyboards/dm9records/plaid/keymaps/default/readme.md diff --git a/keyboards/plaid/keymaps/thehalfdeafchef/config.h b/keyboards/dm9records/plaid/keymaps/thehalfdeafchef/config.h similarity index 100% rename from keyboards/plaid/keymaps/thehalfdeafchef/config.h rename to keyboards/dm9records/plaid/keymaps/thehalfdeafchef/config.h diff --git a/keyboards/plaid/keymaps/thehalfdeafchef/keymap.c b/keyboards/dm9records/plaid/keymaps/thehalfdeafchef/keymap.c similarity index 100% rename from keyboards/plaid/keymaps/thehalfdeafchef/keymap.c rename to keyboards/dm9records/plaid/keymaps/thehalfdeafchef/keymap.c diff --git a/keyboards/plaid/keymaps/thehalfdeafchef/readme.md b/keyboards/dm9records/plaid/keymaps/thehalfdeafchef/readme.md similarity index 100% rename from keyboards/plaid/keymaps/thehalfdeafchef/readme.md rename to keyboards/dm9records/plaid/keymaps/thehalfdeafchef/readme.md diff --git a/keyboards/plaid/plaid.c b/keyboards/dm9records/plaid/plaid.c similarity index 100% rename from keyboards/plaid/plaid.c rename to keyboards/dm9records/plaid/plaid.c diff --git a/keyboards/plaid/plaid.h b/keyboards/dm9records/plaid/plaid.h similarity index 100% rename from keyboards/plaid/plaid.h rename to keyboards/dm9records/plaid/plaid.h diff --git a/keyboards/plaid/readme.md b/keyboards/dm9records/plaid/readme.md similarity index 91% rename from keyboards/plaid/readme.md rename to keyboards/dm9records/plaid/readme.md index a491d05d3bf2..79621deec8b7 100644 --- a/keyboards/plaid/readme.md +++ b/keyboards/dm9records/plaid/readme.md @@ -9,11 +9,11 @@ Hardware Supported: ATMEGA328p with vusb [PCB](https://github.com/hsgw/plaid) Hardware Availability: Group buy in r/mk Make example for this keyboard (after setting up your build environment): - make plaid:default + make dm9records/plaid:default Flashing example for this keyboard: - make plaid:default:flash + make dm9records/plaid:default:flash ## Bootloader use usbasploader in my repository. diff --git a/keyboards/plaid/rules.mk b/keyboards/dm9records/plaid/rules.mk similarity index 100% rename from keyboards/plaid/rules.mk rename to keyboards/dm9records/plaid/rules.mk diff --git a/keyboards/tartan/config.h b/keyboards/dm9records/tartan/config.h similarity index 100% rename from keyboards/tartan/config.h rename to keyboards/dm9records/tartan/config.h diff --git a/keyboards/tartan/info.json b/keyboards/dm9records/tartan/info.json similarity index 99% rename from keyboards/tartan/info.json rename to keyboards/dm9records/tartan/info.json index 72da8bd9d42d..ff0ddfdf9dc5 100644 --- a/keyboards/tartan/info.json +++ b/keyboards/dm9records/tartan/info.json @@ -1,6 +1,6 @@ { "keyboard_name": "Tartan # Through Hole", - "keyboard_folder": "tartan", + "keyboard_folder": "dm9records/tartan", "url": "https://github.com/hsgw/tartan", "maintainer": "hsgw(Takuya Urakawa)", "width": 13, diff --git a/keyboards/tartan/keymaps/default/keymap.c b/keyboards/dm9records/tartan/keymaps/default/keymap.c similarity index 100% rename from keyboards/tartan/keymaps/default/keymap.c rename to keyboards/dm9records/tartan/keymaps/default/keymap.c diff --git a/keyboards/tartan/keymaps/default/readme.md b/keyboards/dm9records/tartan/keymaps/default/readme.md similarity index 100% rename from keyboards/tartan/keymaps/default/readme.md rename to keyboards/dm9records/tartan/keymaps/default/readme.md diff --git a/keyboards/tartan/readme.md b/keyboards/dm9records/tartan/readme.md similarity index 91% rename from keyboards/tartan/readme.md rename to keyboards/dm9records/tartan/readme.md index 83a3aebaeae4..b8439ed22999 100644 --- a/keyboards/tartan/readme.md +++ b/keyboards/dm9records/tartan/readme.md @@ -10,12 +10,12 @@ A 60% keyboard with only through hole components. Make example for this keyboard (after setting up your build environment): - make tartan:default + make dm9records/tartan:default Flash firmware: // In bootloader mode - make tartan:default:flash + make dm9records/tartan:default:flash ## Bootloader use usbasploader in my repository. diff --git a/keyboards/tartan/rules.mk b/keyboards/dm9records/tartan/rules.mk similarity index 100% rename from keyboards/tartan/rules.mk rename to keyboards/dm9records/tartan/rules.mk diff --git a/keyboards/tartan/tartan.c b/keyboards/dm9records/tartan/tartan.c similarity index 100% rename from keyboards/tartan/tartan.c rename to keyboards/dm9records/tartan/tartan.c diff --git a/keyboards/tartan/tartan.h b/keyboards/dm9records/tartan/tartan.h similarity index 100% rename from keyboards/tartan/tartan.h rename to keyboards/dm9records/tartan/tartan.h diff --git a/keyboards/eco/rules.mk b/keyboards/eco/rules.mk index 7f7f20ed3b80..078131da7c77 100644 --- a/keyboards/eco/rules.mk +++ b/keyboards/eco/rules.mk @@ -23,7 +23,7 @@ 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 MIDI_ENABLE = yes # MIDI controls -AUDIO_ENABLE = yes # Audio output on port C6 +AUDIO_ENABLE = no # Audio output UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. diff --git a/keyboards/ergodox_stm32/keymaps/default/keymap.c b/keyboards/ergodox_stm32/keymaps/default/keymap.c index dcf8d15b7b79..04a12962e3ec 100644 --- a/keyboards/ergodox_stm32/keymaps/default/keymap.c +++ b/keyboards/ergodox_stm32/keymaps/default/keymap.c @@ -9,10 +9,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { }; -const uint16_t PROGMEM fn_actions[] = { - [1] = TT(1) -}; - layer_state_t layer_state_set_user(layer_state_t state) { uint8_t layer = get_highest_layer(state); diff --git a/keyboards/ergotravel/keymaps/ckofy/keymap.c b/keyboards/ergotravel/keymaps/ckofy/keymap.c index 691d4aa943ba..b9a2c140d875 100644 --- a/keyboards/ergotravel/keymaps/ckofy/keymap.c +++ b/keyboards/ergotravel/keymaps/ckofy/keymap.c @@ -18,17 +18,6 @@ enum custom_keycodes { ADJUST, }; -/* Fn keys */ - -enum { - - F_SFT = 0, - F_ALT, - F_CTRL, - F_NUMPAD -// F_LOWER, -// F_RAISE, -}; #define KC_ KC_TRNS #define KC_XXXX KC_NO @@ -57,8 +46,8 @@ enum { #define KC_UDO LCTL(KC_Z) #define KC_CUT LCTL(KC_X) #define KC_SVE LCTL(KC_S) -#define KC_OSH F(F_SFT) -#define KC_OCTL F(F_CTRL) +#define KC_OSH OSM(MOD_LSFT) +#define KC_OCTL OSM(MOD_LCTL) #define KC_NUMP TT(_NUMPAD) #define KC_SHESC MT(MOD_LSFT,KC_ESC) #define KC_SHENT MT(MOD_RSFT,KC_ENT) @@ -142,14 +131,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { }; -const uint16_t PROGMEM fn_actions[] = { - [F_SFT] = ACTION_MODS_ONESHOT (MOD_LSFT) - ,[F_ALT] = ACTION_MODS_ONESHOT (MOD_LALT) - ,[F_CTRL] = ACTION_MODS_ONESHOT (MOD_LCTL) -}; - - - bool process_record_user(uint16_t keycode, keyrecord_t *record) { switch (keycode) { case COLEMAK: diff --git a/keyboards/gh60/revc/keymaps/robotmaxtron/keymap.c b/keyboards/gh60/revc/keymaps/robotmaxtron/keymap.c index d7d8316c66a0..770fe723b565 100644 --- a/keyboards/gh60/revc/keymaps/robotmaxtron/keymap.c +++ b/keyboards/gh60/revc/keymaps/robotmaxtron/keymap.c @@ -65,9 +65,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ [_FL] = 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_DELETE, \ - KC_TRNS,F(1),KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_CALC,KC_PGUP,KC_UP,KC_PGDN,KC_PSCR,KC_SLCK,KC_PAUS,KC_TRNS, \ + KC_TRNS,TG(1),KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_CALC,KC_PGUP,KC_UP,KC_PGDN,KC_PSCR,KC_SLCK,KC_PAUS,KC_TRNS, \ KC_TRNS,KC_MUTE,KC__VOLDOWN,KC__VOLUP,KC_TRNS,KC_TRNS,KC_HOME,KC_LEFT,KC_DOWN,KC_RGHT,KC_INS,KC_TRNS,KC_TRNS,KC_TRNS, \ - KC_TRNS,KC_TRNS,F(3),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,TG(3),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), /* @@ -106,8 +106,6 @@ enum function_id { }; const uint16_t PROGMEM fn_actions[] = { - [1] = ACTION_LAYER_TOGGLE(1), // Toggle Arrow Layer overlay - [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 [6] = ACTION_FUNCTION(RGBLED_INCREASE_HUE), diff --git a/keyboards/gh60/satan/keymaps/denolfe/keymap.c b/keyboards/gh60/satan/keymaps/denolfe/keymap.c index 98fcd9b989ac..a70c409fe86f 100644 --- a/keyboards/gh60/satan/keymaps/denolfe/keymap.c +++ b/keyboards/gh60/satan/keymaps/denolfe/keymap.c @@ -62,7 +62,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_PGDN, KC_PGUP, KC_TRNS, KC_END, KC_MPRV, KC_MNXT, KC_MPLY, \ 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_TRNS, \ KC_TRNS, KC_TRNS, KC_TRNS, BL_DEC, BL_TOGG, BL_INC, KC_HOME, LCTL(KC_LEFT), LCTL(KC_END), LCTL(KC_RIGHT), KC_TRNS, RESET, \ - KC_TRNS, KC_TRNS, F(9), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), + KC_TRNS, KC_TRNS, LM(2, MOD_LSFT), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), #endif [_SL] = LAYOUT_60_ansi( @@ -99,7 +99,6 @@ const uint16_t PROGMEM fn_actions[] = { [7] = ACTION_FUNCTION(RGBLED_INCREASE_VAL), [8] = ACTION_FUNCTION(RGBLED_DECREASE_VAL), #endif - [9] = ACTION_LAYER_MODS(2, MOD_LSFT) }; void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) { diff --git a/keyboards/handwired/ms_sculpt_mobile/keymaps/milestogo/keymap.c b/keyboards/handwired/ms_sculpt_mobile/keymaps/milestogo/keymap.c index 602bdd157bcc..94d9289cdcd8 100644 --- a/keyboards/handwired/ms_sculpt_mobile/keymaps/milestogo/keymap.c +++ b/keyboards/handwired/ms_sculpt_mobile/keymaps/milestogo/keymap.c @@ -29,7 +29,6 @@ TRAN #define TT_SYM MO(_SYM) #define TT_MOV LT(_MOV,KC_BSPC) #define TT_NUM MO(_NUM) -#define SSFT ACTION_MODS_ONESHOT(MOD_LSFT) enum macro_keycodes { DHPASTE=1, diff --git a/keyboards/hhkb/ansi/ansi.c b/keyboards/hhkb/ansi/ansi.c new file mode 100644 index 000000000000..cefc4e06904e --- /dev/null +++ b/keyboards/hhkb/ansi/ansi.c @@ -0,0 +1 @@ +#include "ansi.h" \ No newline at end of file diff --git a/keyboards/hhkb/ansi/ansi.h b/keyboards/hhkb/ansi/ansi.h new file mode 100644 index 000000000000..28e8d2fef89b --- /dev/null +++ b/keyboards/hhkb/ansi/ansi.h @@ -0,0 +1,23 @@ +#pragma once + +#include "quantum.h" + +#define LAYOUT( \ + K31, K30, K00, K10, K11, K20, K21, K40, K41, K60, K61, K70, K71, K50, K51, \ + K32, K01, K02, K13, K12, K23, K22, K42, K43, K62, K63, K73, K72, K52, \ + K33, K04, K03, K14, K15, K24, K25, K45, K44, K65, K64, K74, K53, \ + K34, K05, K06, K07, K16, K17, K26, K46, K66, K76, K75, K55, K54, \ + K35, K36, K37, K57, K56) \ + \ +{ \ + { K00, K01, K02, K03, K04, K05, K06, K07 }, \ + { K10, K11, K12, K13, K14, K15, K16, K17 }, \ + { K20, K21, K22, K23, K24, K25, K26, KC_NO }, \ + { K30, K31, K32, K33, K34, K35, K36, K37 }, \ + { K40, K41, K42, K43, K44, K45, K46, KC_NO }, \ + { 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 } \ +} + +#define LAYOUT_60_hhkb LAYOUT diff --git a/keyboards/hhkb/config.h b/keyboards/hhkb/ansi/config.h similarity index 94% rename from keyboards/hhkb/config.h rename to keyboards/hhkb/ansi/config.h index fc747a6e9421..689fd556819d 100644 --- a/keyboards/hhkb/config.h +++ b/keyboards/hhkb/ansi/config.h @@ -15,25 +15,20 @@ 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 0xCAFE +#define VENDOR_ID 0x4848 // HH = happy hacking +#define PRODUCT_ID 0x0001 // ANSI HHKB #define DEVICE_VER 0x0104 #define MANUFACTURER q.m.k #define PRODUCT HHKB mod #define DESCRIPTION q.m.k keyboard firmware for HHKB /* key matrix size */ -#ifdef HHKB_JP -# define MATRIX_ROWS 16 -#else -# define MATRIX_ROWS 8 -#endif +#define MATRIX_ROWS 8 #define MATRIX_COLS 8 #define TAPPING_TERM 200 @@ -107,5 +102,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/hhkb/ansi/hhkb_avr.h b/keyboards/hhkb/ansi/hhkb_avr.h new file mode 100644 index 000000000000..f9446deef71a --- /dev/null +++ b/keyboards/hhkb/ansi/hhkb_avr.h @@ -0,0 +1,157 @@ +#pragma once + +#include +#include +#include +#include +#include + + +// Timer resolution check +#if (1000000/TIMER_RAW_FREQ > 20) +# error "Timer resolution(>20us) is not enough for HHKB matrix scan tweak on V-USB." +#endif + + +/* + * HHKB Matrix I/O + * + * row: HC4051[A,B,C] selects scan row0-7 + * row-ext: [En0,En1] row extention for JP + * col: LS145[A,B,C,D] selects scan col0-7 and enable(D) + * key: on: 0/off: 1 + * prev: hysteresis control: assert(1) when previous key state is on + */ + + +#if defined(__AVR_ATmega32U4__) +/* + * For TMK HHKB alt controller(ATMega32U4) + * + * row: PB0-2 + * col: PB3-5,6 + * key: PD7(pull-uped) + * prev: PB7 + * power: PD4(L:off/H:on) + * row-ext: PC6,7 for HHKB JP(active low) + */ +static inline void KEY_ENABLE(void) { (PORTB &= ~(1<<6)); } +static inline void KEY_UNABLE(void) { (PORTB |= (1<<6)); } +static inline bool KEY_STATE(void) { return (PIND & (1<<7)); } +static inline void KEY_PREV_ON(void) { (PORTB |= (1<<7)); } +static inline void KEY_PREV_OFF(void) { (PORTB &= ~(1<<7)); } +#ifdef HHKB_POWER_SAVING +static inline void KEY_POWER_ON(void) { + DDRB = 0xFF; PORTB = 0x40; // change pins output + DDRD |= (1<<4); PORTD |= (1<<4); // MOS FET switch on + /* Without this wait you will miss or get false key events. */ + _delay_ms(5); // wait for powering up +} +static inline void KEY_POWER_OFF(void) { + /* input with pull-up consumes less than without it when pin is open. */ + DDRB = 0x00; PORTB = 0xFF; // change pins input with pull-up + DDRD |= (1<<4); PORTD &= ~(1<<4); // MOS FET switch off +} +static inline bool KEY_POWER_STATE(void) { return PORTD & (1<<4); } +#else +static inline void KEY_POWER_ON(void) {} +static inline void KEY_POWER_OFF(void) {} +static inline bool KEY_POWER_STATE(void) { return true; } +#endif +static inline void KEY_INIT(void) +{ + /* row,col,prev: output */ + DDRB = 0xFF; + PORTB = 0x40; // unable + /* key: input with pull-up */ + DDRD &= ~0x80; + PORTD |= 0x80; + + KEY_UNABLE(); + KEY_PREV_OFF(); + + KEY_POWER_OFF(); +} +static inline void KEY_SELECT(uint8_t ROW, uint8_t COL) +{ + PORTB = (PORTB & 0xC0) | (((COL) & 0x07)<<3) | ((ROW) & 0x07); + +} + + +#elif defined(__AVR_AT90USB1286__) +/* + * For Teensy++(AT90USB1286) + * + * HHKB pro HHKB pro2 + * row: PB0-2 (6-8) (5-7) + * col: PB3-5,6 (9-12) (8-11) + * key: PE6(pull-uped) (4) (3) + * prev: PE7 (5) (4) + * + * TODO: convert into 'staitc inline' function + */ +#define KEY_INIT() do { \ + DDRB |= 0x7F; \ + DDRE |= (1<<7); \ + DDRE &= ~(1<<6); \ + PORTE |= (1<<6); \ +} while (0) +#define KEY_SELECT(ROW, COL) (PORTB = (PORTB & 0xC0) | \ + (((COL) & 0x07)<<3) | \ + ((ROW) & 0x07)) +#define KEY_ENABLE() (PORTB &= ~(1<<6)) +#define KEY_UNABLE() (PORTB |= (1<<6)) +#define KEY_STATE() (PINE & (1<<6)) +#define KEY_PREV_ON() (PORTE |= (1<<7)) +#define KEY_PREV_OFF() (PORTE &= ~(1<<7)) +#define KEY_POWER_ON() +#define KEY_POWER_OFF() +#define KEY_POWER_STATE() true + + +#else +# error "define code for matrix scan" +#endif + + +#if 0 +// For ATMega328P with V-USB +// +// #elif defined(__AVR_ATmega328P__) +// Ports for V-USB +// key: PB0(pull-uped) +// prev: PB1 +// row: PB2-4 +// col: PC0-2,3 +// power: PB5(Low:on/Hi-z:off) +#define KEY_INIT() do { \ + DDRB |= 0x3E; \ + DDRB &= ~(1<<0); \ + PORTB |= 1<<0; \ + DDRC |= 0x0F; \ + KEY_UNABLE(); \ + KEY_PREV_OFF(); \ +} while (0) +#define KEY_SELECT(ROW, COL) do { \ + PORTB = (PORTB & 0xE3) | ((ROW) & 0x07)<<2; \ + PORTC = (PORTC & 0xF8) | ((COL) & 0x07); \ +} while (0) +#define KEY_ENABLE() (PORTC &= ~(1<<3)) +#define KEY_UNABLE() (PORTC |= (1<<3)) +#define KEY_STATE() (PINB & (1<<0)) +#define KEY_PREV_ON() (PORTB |= (1<<1)) +#define KEY_PREV_OFF() (PORTB &= ~(1<<1)) +// Power supply switching +#define KEY_POWER_ON() do { \ + KEY_INIT(); \ + PORTB &= ~(1<<5); \ + _delay_ms(1); \ +} while (0) +#define KEY_POWER_OFF() do { \ + DDRB &= ~0x3F; \ + PORTB &= ~0x3F; \ + DDRC &= ~0x0F; \ + PORTC &= ~0x0F; \ +} while (0) +#endif diff --git a/keyboards/hhkb/ansi/info.json b/keyboards/hhkb/ansi/info.json new file mode 100644 index 000000000000..a36f1d44c82f --- /dev/null +++ b/keyboards/hhkb/ansi/info.json @@ -0,0 +1,73 @@ +{ + "keyboard_name": "HHKB", + "url": "", + "maintainer": "qmk", + "width": 15, + "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": "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": 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": "Return", "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": "", "x": 1.5, "y": 4 }, + { "label": "", "x": 2.5, "y": 4, "w": 1.5 }, + { "x": 4, "y": 4, "w": 6 }, + { "label": "", "x": 10, "y": 4, "w": 1.5 }, + { "label": "", "x": 11.5, "y": 4 } + ] + } + } +} diff --git a/keyboards/hhkb/keymaps/blakedietz/README.md b/keyboards/hhkb/ansi/keymaps/blakedietz/README.md similarity index 100% rename from keyboards/hhkb/keymaps/blakedietz/README.md rename to keyboards/hhkb/ansi/keymaps/blakedietz/README.md diff --git a/keyboards/hhkb/keymaps/blakedietz/config.h b/keyboards/hhkb/ansi/keymaps/blakedietz/config.h similarity index 100% rename from keyboards/hhkb/keymaps/blakedietz/config.h rename to keyboards/hhkb/ansi/keymaps/blakedietz/config.h diff --git a/keyboards/hhkb/keymaps/blakedietz/keymap.c b/keyboards/hhkb/ansi/keymaps/blakedietz/keymap.c similarity index 100% rename from keyboards/hhkb/keymaps/blakedietz/keymap.c rename to keyboards/hhkb/ansi/keymaps/blakedietz/keymap.c diff --git a/keyboards/hhkb/keymaps/blakedietz/rules.mk b/keyboards/hhkb/ansi/keymaps/blakedietz/rules.mk similarity index 100% rename from keyboards/hhkb/keymaps/blakedietz/rules.mk rename to keyboards/hhkb/ansi/keymaps/blakedietz/rules.mk diff --git a/keyboards/hhkb/keymaps/brett/config.h b/keyboards/hhkb/ansi/keymaps/brett/config.h similarity index 100% rename from keyboards/hhkb/keymaps/brett/config.h rename to keyboards/hhkb/ansi/keymaps/brett/config.h diff --git a/keyboards/hhkb/keymaps/brett/keymap.c b/keyboards/hhkb/ansi/keymaps/brett/keymap.c similarity index 100% rename from keyboards/hhkb/keymaps/brett/keymap.c rename to keyboards/hhkb/ansi/keymaps/brett/keymap.c diff --git a/keyboards/hhkb/keymaps/brett/readme.md b/keyboards/hhkb/ansi/keymaps/brett/readme.md similarity index 100% rename from keyboards/hhkb/keymaps/brett/readme.md rename to keyboards/hhkb/ansi/keymaps/brett/readme.md diff --git a/keyboards/hhkb/keymaps/brett/rules.mk b/keyboards/hhkb/ansi/keymaps/brett/rules.mk similarity index 100% rename from keyboards/hhkb/keymaps/brett/rules.mk rename to keyboards/hhkb/ansi/keymaps/brett/rules.mk diff --git a/keyboards/hhkb/keymaps/cinaeco/README.md b/keyboards/hhkb/ansi/keymaps/cinaeco/README.md similarity index 100% rename from keyboards/hhkb/keymaps/cinaeco/README.md rename to keyboards/hhkb/ansi/keymaps/cinaeco/README.md diff --git a/keyboards/hhkb/keymaps/cinaeco/config.h b/keyboards/hhkb/ansi/keymaps/cinaeco/config.h similarity index 100% rename from keyboards/hhkb/keymaps/cinaeco/config.h rename to keyboards/hhkb/ansi/keymaps/cinaeco/config.h diff --git a/keyboards/hhkb/keymaps/cinaeco/keymap.c b/keyboards/hhkb/ansi/keymaps/cinaeco/keymap.c similarity index 100% rename from keyboards/hhkb/keymaps/cinaeco/keymap.c rename to keyboards/hhkb/ansi/keymaps/cinaeco/keymap.c diff --git a/keyboards/hhkb/keymaps/cinaeco/rules.mk b/keyboards/hhkb/ansi/keymaps/cinaeco/rules.mk similarity index 100% rename from keyboards/hhkb/keymaps/cinaeco/rules.mk rename to keyboards/hhkb/ansi/keymaps/cinaeco/rules.mk diff --git a/keyboards/hhkb/keymaps/dbroqua/keymap.c b/keyboards/hhkb/ansi/keymaps/dbroqua/keymap.c similarity index 100% rename from keyboards/hhkb/keymaps/dbroqua/keymap.c rename to keyboards/hhkb/ansi/keymaps/dbroqua/keymap.c diff --git a/keyboards/hhkb/keymaps/dbroqua/readme.md b/keyboards/hhkb/ansi/keymaps/dbroqua/readme.md similarity index 100% rename from keyboards/hhkb/keymaps/dbroqua/readme.md rename to keyboards/hhkb/ansi/keymaps/dbroqua/readme.md diff --git a/keyboards/hhkb/keymaps/default/keymap.c b/keyboards/hhkb/ansi/keymaps/default/keymap.c similarity index 100% rename from keyboards/hhkb/keymaps/default/keymap.c rename to keyboards/hhkb/ansi/keymaps/default/keymap.c diff --git a/keyboards/hhkb/keymaps/eric/keymap.c b/keyboards/hhkb/ansi/keymaps/eric/keymap.c similarity index 100% rename from keyboards/hhkb/keymaps/eric/keymap.c rename to keyboards/hhkb/ansi/keymaps/eric/keymap.c diff --git a/keyboards/hhkb/keymaps/dhertz/config.h b/keyboards/hhkb/ansi/keymaps/krusli/config.h similarity index 100% rename from keyboards/hhkb/keymaps/dhertz/config.h rename to keyboards/hhkb/ansi/keymaps/krusli/config.h diff --git a/keyboards/hhkb/keymaps/krusli/keymap.c b/keyboards/hhkb/ansi/keymaps/krusli/keymap.c similarity index 100% rename from keyboards/hhkb/keymaps/krusli/keymap.c rename to keyboards/hhkb/ansi/keymaps/krusli/keymap.c diff --git a/keyboards/hhkb/keymaps/lxol/keymap.c b/keyboards/hhkb/ansi/keymaps/lxol/keymap.c similarity index 97% rename from keyboards/hhkb/keymaps/lxol/keymap.c rename to keyboards/hhkb/ansi/keymaps/lxol/keymap.c index 3e3b3d2ed0c2..462a980471f8 100644 --- a/keyboards/hhkb/keymaps/lxol/keymap.c +++ b/keyboards/hhkb/ansi/keymaps/lxol/keymap.c @@ -33,7 +33,7 @@ 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_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, LT(LALTLEV, KC_A), LT(LGUILEV, KC_S), KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, LT(RGUILEV, KC_L), LT(RALTLEV, KC_SCLN), KC_QUOT, KC_FN0, + KC_LCTL, LT(LALTLEV, KC_A), LT(LGUILEV, KC_S), KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, LT(RGUILEV, KC_L), LT(RALTLEV, KC_SCLN), KC_QUOT, MT(MOD_RCTL, 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(HHKB), KC_LALT, KC_LGUI, KC_SPC, KC_RGUI, KC_RALT), @@ -80,7 +80,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { RGUI(KC_ESC), RGUI(KC_1), RGUI(KC_2), RGUI(KC_3), RGUI(KC_4), RGUI(KC_5), RGUI(KC_6), RGUI(KC_7), RGUI(KC_8), RGUI(KC_9), RGUI(KC_0), RGUI(KC_MINS), RGUI(KC_EQL), RGUI(KC_BSLS), RGUI(KC_GRV), RGUI(KC_TAB), RGUI(KC_Q), RGUI(KC_W), RGUI(KC_E), RGUI(KC_R), RGUI(KC_T), RGUI(KC_Y), RGUI(KC_U), RGUI(KC_I), RGUI(KC_O), RGUI(KC_P), RGUI(KC_LBRC), RGUI(KC_RBRC), RGUI(KC_BSPC), - RGUI(KC_LCTL), RGUI(KC_A), RGUI(KC_S), RGUI(KC_D), RGUI(KC_F), RGUI(KC_G), RGUI(KC_H), RGUI(KC_J), RGUI(KC_K), KC_TRNS, KC_TRNS, RGUI(KC_QUOT), KC_FN0, + RGUI(KC_LCTL), RGUI(KC_A), RGUI(KC_S), RGUI(KC_D), RGUI(KC_F), RGUI(KC_G), RGUI(KC_H), RGUI(KC_J), RGUI(KC_K), KC_TRNS, KC_TRNS, RGUI(KC_QUOT), MT(MOD_RCTL, KC_ENT), RGUI(KC_LSFT), RGUI(KC_Z), RGUI(KC_X), RGUI(KC_C), RGUI(KC_V), RGUI(KC_B), RGUI(KC_N), RGUI(KC_M), RGUI(KC_COMM), RGUI(KC_DOT), RGUI(KC_SLSH), RGUI(KC_RSFT), KC_TRNS, KC_LALT, KC_LGUI, RGUI(KC_SPC), KC_RGUI, KC_RALT), @@ -104,7 +104,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { LGUI(KC_ESC), 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), LGUI(KC_MINS), LGUI(KC_EQL), LGUI(KC_BSLS), LGUI(KC_GRV), LGUI(KC_TAB), LGUI(KC_Q), LGUI(KC_W), LGUI(KC_E), LGUI(KC_R), LGUI(KC_T), LGUI(KC_Y), LGUI(KC_U), LGUI(KC_I), LGUI(KC_O), LGUI(KC_P), LGUI(KC_LBRC), LGUI(KC_RBRC), LGUI(KC_BSPC), - LGUI(KC_LCTL), KC_TRNS, KC_TRNS, LGUI(KC_D), LGUI(KC_F), LGUI(KC_G), LGUI(KC_H), LGUI(KC_J), LGUI(KC_K), LGUI(KC_L), LGUI(KC_SCLN), LGUI(KC_QUOT), KC_FN0, + LGUI(KC_LCTL), KC_TRNS, KC_TRNS, LGUI(KC_D), LGUI(KC_F), LGUI(KC_G), LGUI(KC_H), LGUI(KC_J), LGUI(KC_K), LGUI(KC_L), LGUI(KC_SCLN), LGUI(KC_QUOT), MT(MOD_RCTL, KC_ENT), KC_LSFT, LGUI(KC_Z), LGUI(KC_X), LGUI(KC_C), LGUI(KC_V), LGUI(KC_B), LGUI(KC_N), LGUI(KC_M), LGUI(KC_COMM), LGUI(KC_DOT), LGUI(KC_SLSH), KC_RSFT, KC_TRNS, KC_LALT, KC_LGUI, LGUI(KC_SPC), KC_LGUI, KC_RALT), @@ -128,7 +128,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { RALT(KC_ESC), RALT(KC_1), RALT(KC_2), RALT(KC_3), RALT(KC_4), RALT(KC_5), RALT(KC_6), RALT(KC_7), RALT(KC_8), RALT(KC_9), RALT(KC_0), RALT(KC_MINS), RALT(KC_EQL), RALT(KC_BSLS), RALT(KC_GRV), RALT(KC_TAB), RALT(KC_Q), RALT(KC_W), RALT(KC_E), RALT(KC_R), RALT(KC_T), RALT(KC_Y), RALT(KC_U), RALT(KC_I), RALT(KC_O), RALT(KC_P), RALT(KC_LBRC), RALT(KC_RBRC), RALT(KC_BSPC), - RALT(KC_LCTL), RALT(KC_A), RALT(KC_S), RALT(KC_D), RALT(KC_F), RALT(KC_G), RALT(KC_H), RALT(KC_J), RALT(KC_K), KC_TRNS, KC_TRNS, RALT(KC_QUOT), KC_FN0, + RALT(KC_LCTL), RALT(KC_A), RALT(KC_S), RALT(KC_D), RALT(KC_F), RALT(KC_G), RALT(KC_H), RALT(KC_J), RALT(KC_K), KC_TRNS, KC_TRNS, RALT(KC_QUOT), MT(MOD_RCTL, KC_ENT), RALT(KC_LSFT), RALT(KC_Z), RALT(KC_X), RALT(KC_C), RALT(KC_V), RALT(KC_B), RALT(KC_N), RALT(KC_M), RALT(KC_COMM), RALT(KC_DOT), RALT(KC_SLSH), RALT(KC_RSFT), KC_TRNS, KC_LALT, KC_LGUI, RALT(KC_SPC), KC_RGUI, KC_RALT), @@ -152,7 +152,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { LALT(KC_ESC), LALT(KC_1), LALT(KC_2), LALT(KC_3), LALT(KC_4), LALT(KC_5), LALT(KC_6), LALT(KC_7), LALT(KC_8), LALT(KC_9), LALT(KC_0), LALT(KC_MINS), LALT(KC_EQL), LALT(KC_BSLS), LALT(KC_GRV), LALT(KC_TAB), LALT(KC_Q), LALT(KC_W), LALT(KC_E), LALT(KC_R), LALT(KC_T), LALT(KC_Y), LALT(KC_U), LALT(KC_I), LALT(KC_O), LALT(KC_P), LALT(KC_LBRC), LALT(KC_RBRC), LALT(KC_BSPC), - LALT(KC_LCTL), KC_TRNS, KC_TRNS, LALT(KC_D), LALT(KC_F), LALT(KC_G), LALT(KC_H), LALT(KC_J), LALT(KC_K), LALT(KC_L), LALT(KC_SCLN), LALT(KC_QUOT), KC_FN0, + LALT(KC_LCTL), KC_TRNS, KC_TRNS, LALT(KC_D), LALT(KC_F), LALT(KC_G), LALT(KC_H), LALT(KC_J), LALT(KC_K), LALT(KC_L), LALT(KC_SCLN), LALT(KC_QUOT), MT(MOD_RCTL, KC_ENT), KC_LSFT, LALT(KC_Z), LALT(KC_X), LALT(KC_C), LALT(KC_V), LALT(KC_B), LALT(KC_N), LALT(KC_M), LALT(KC_COMM), LALT(KC_DOT), LALT(KC_SLSH), KC_RSFT, KC_TRNS, KC_LALT, KC_LGUI, LALT(KC_SPC), KC_LGUI, KC_RALT), @@ -176,14 +176,10 @@ 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_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, LT(LGUILEV, KC_A), LT(LALTLEV, KC_S), KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, LT(RALTLEV, KC_L), LT(RGUILEV, KC_SCLN), KC_QUOT, KC_FN0, + KC_LCTL, LT(LGUILEV, KC_A), LT(LALTLEV, KC_S), KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, LT(RALTLEV, KC_L), LT(RGUILEV, KC_SCLN), KC_QUOT, MT(MOD_RCTL, 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(HHKB), KC_RGUI, KC_RALT, KC_SPC, KC_RALT, KC_RGUI)}; -const uint16_t PROGMEM fn_actions[] = { - [0] = ACTION_MODS_TAP_KEY(MOD_RCTL, KC_ENT) // RControl with tap Enter* -}; - const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { // MACRODOWN only works in this function diff --git a/keyboards/hhkb/keymaps/mjt/config.h b/keyboards/hhkb/ansi/keymaps/mjt/config.h similarity index 100% rename from keyboards/hhkb/keymaps/mjt/config.h rename to keyboards/hhkb/ansi/keymaps/mjt/config.h diff --git a/keyboards/hhkb/keymaps/mjt/keymap.c b/keyboards/hhkb/ansi/keymaps/mjt/keymap.c similarity index 98% rename from keyboards/hhkb/keymaps/mjt/keymap.c rename to keyboards/hhkb/ansi/keymaps/mjt/keymap.c index e51eb8bf9226..b62676edd985 100644 --- a/keyboards/hhkb/keymaps/mjt/keymap.c +++ b/keyboards/hhkb/ansi/keymaps/mjt/keymap.c @@ -17,7 +17,6 @@ enum hhkb_keycodes DYNAMIC_MACRO_RANGE, }; -#include "dynamic_macro.h" const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { @@ -104,7 +103,7 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) bool process_record_user(uint16_t keycode, keyrecord_t *record) { uint16_t macro_kc = (keycode == MO(DYN) ? DYN_REC_STOP : keycode); - if (!process_record_dynamic_macro(macro_kc, record)) + if (!process_dynamic_macro(macro_kc, record)) { return false; } diff --git a/keyboards/hhkb/keymaps/mjt/readme.md b/keyboards/hhkb/ansi/keymaps/mjt/readme.md similarity index 100% rename from keyboards/hhkb/keymaps/mjt/readme.md rename to keyboards/hhkb/ansi/keymaps/mjt/readme.md diff --git a/keyboards/hhkb/ansi/keymaps/mjt/rules.mk b/keyboards/hhkb/ansi/keymaps/mjt/rules.mk new file mode 100644 index 000000000000..9e6797ed3074 --- /dev/null +++ b/keyboards/hhkb/ansi/keymaps/mjt/rules.mk @@ -0,0 +1 @@ +DYNAMIC_MACRO_ENABLE = yes diff --git a/keyboards/hhkb/keymaps/schaeferdev/README.md b/keyboards/hhkb/ansi/keymaps/schaeferdev/README.md similarity index 100% rename from keyboards/hhkb/keymaps/schaeferdev/README.md rename to keyboards/hhkb/ansi/keymaps/schaeferdev/README.md diff --git a/keyboards/hhkb/keymaps/schaeferdev/config.h b/keyboards/hhkb/ansi/keymaps/schaeferdev/config.h similarity index 100% rename from keyboards/hhkb/keymaps/schaeferdev/config.h rename to keyboards/hhkb/ansi/keymaps/schaeferdev/config.h diff --git a/keyboards/hhkb/keymaps/schaeferdev/keymap.c b/keyboards/hhkb/ansi/keymaps/schaeferdev/keymap.c similarity index 100% rename from keyboards/hhkb/keymaps/schaeferdev/keymap.c rename to keyboards/hhkb/ansi/keymaps/schaeferdev/keymap.c diff --git a/keyboards/hhkb/keymaps/schaeferdev/rules.mk b/keyboards/hhkb/ansi/keymaps/schaeferdev/rules.mk similarity index 100% rename from keyboards/hhkb/keymaps/schaeferdev/rules.mk rename to keyboards/hhkb/ansi/keymaps/schaeferdev/rules.mk diff --git a/keyboards/hhkb/keymaps/shela/action_pseudo_lut.c b/keyboards/hhkb/ansi/keymaps/shela/action_pseudo_lut.c similarity index 100% rename from keyboards/hhkb/keymaps/shela/action_pseudo_lut.c rename to keyboards/hhkb/ansi/keymaps/shela/action_pseudo_lut.c diff --git a/keyboards/hhkb/keymaps/shela/action_pseudo_lut.h b/keyboards/hhkb/ansi/keymaps/shela/action_pseudo_lut.h similarity index 100% rename from keyboards/hhkb/keymaps/shela/action_pseudo_lut.h rename to keyboards/hhkb/ansi/keymaps/shela/action_pseudo_lut.h diff --git a/keyboards/hhkb/keymaps/shela/config.h b/keyboards/hhkb/ansi/keymaps/shela/config.h similarity index 100% rename from keyboards/hhkb/keymaps/shela/config.h rename to keyboards/hhkb/ansi/keymaps/shela/config.h diff --git a/keyboards/hhkb/keymaps/shela/keymap.c b/keyboards/hhkb/ansi/keymaps/shela/keymap.c similarity index 95% rename from keyboards/hhkb/keymaps/shela/keymap.c rename to keyboards/hhkb/ansi/keymaps/shela/keymap.c index 2d5f4c64ac3a..3971e8f94559 100644 --- a/keyboards/hhkb/keymaps/shela/keymap.c +++ b/keyboards/hhkb/ansi/keymaps/shela/keymap.c @@ -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, LT(SPACE_FN, KC_SPACE), KC_FN4, KC_RGUI), + KC_LGUI, MT(MOD_LALT, KC_MHEN), LT(SPACE_FN, KC_SPACE), MT(MOD_RALT, KC_KANA), KC_RGUI), /* Layer 2: Dvorak Layer * ,-----------------------------------------------------------------------------------------. @@ -133,7 +133,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ [HHKB] = LAYOUT(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_CAPS, KC_FN5, KC_FN6, KC_FN7, KC_FN8, KC_FN9, KC_TRNS, KC_TRNS, KC_PSCR, KC_SLCK, KC_PAUS, KC_UP, KC_TRNS, KC_BSPC, + KC_CAPS, DF(BASE), DF(PSEUDO_US), DF(MOUSE), DF(TENKEY), DF(DVORAK), KC_TRNS, KC_TRNS, KC_PSCR, KC_SLCK, KC_PAUS, KC_UP, KC_TRNS, KC_BSPC, KC_TRNS, KC_VOLD, KC_VOLU, KC_MUTE, KC_TRNS, KC_TRNS, KC_PAST, KC_PSLS, KC_HOME, KC_PGUP, KC_LEFT, KC_RGHT, KC_PENT, 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), @@ -183,11 +183,4 @@ void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) */ const uint16_t PROGMEM fn_actions[] = { [1] = ACTION_FUNCTION(PSEUDO_US_FUNCTION), - [3] = ACTION_MODS_TAP_KEY(MOD_LALT, KC_MHEN), - [4] = ACTION_MODS_TAP_KEY(MOD_RALT, KC_KANA), - [5] = ACTION_DEFAULT_LAYER_SET(BASE), - [6] = ACTION_DEFAULT_LAYER_SET(PSEUDO_US), - [7] = ACTION_DEFAULT_LAYER_SET(MOUSE), - [8] = ACTION_DEFAULT_LAYER_SET(TENKEY), - [9] = ACTION_DEFAULT_LAYER_SET(DVORAK), }; diff --git a/keyboards/hhkb/keymaps/shela/keymap_jis2us.h b/keyboards/hhkb/ansi/keymaps/shela/keymap_jis2us.h similarity index 100% rename from keyboards/hhkb/keymaps/shela/keymap_jis2us.h rename to keyboards/hhkb/ansi/keymaps/shela/keymap_jis2us.h diff --git a/keyboards/hhkb/keymaps/shela/readme.md b/keyboards/hhkb/ansi/keymaps/shela/readme.md similarity index 100% rename from keyboards/hhkb/keymaps/shela/readme.md rename to keyboards/hhkb/ansi/keymaps/shela/readme.md diff --git a/keyboards/hhkb/keymaps/shela/rules.mk b/keyboards/hhkb/ansi/keymaps/shela/rules.mk similarity index 100% rename from keyboards/hhkb/keymaps/shela/rules.mk rename to keyboards/hhkb/ansi/keymaps/shela/rules.mk diff --git a/keyboards/hhkb/keymaps/smt/keymap.c b/keyboards/hhkb/ansi/keymaps/smt/keymap.c similarity index 100% rename from keyboards/hhkb/keymaps/smt/keymap.c rename to keyboards/hhkb/ansi/keymaps/smt/keymap.c diff --git a/keyboards/hhkb/keymaps/tobiasvl_iso/keymap.c b/keyboards/hhkb/ansi/keymaps/tobiasvl_iso/keymap.c similarity index 100% rename from keyboards/hhkb/keymaps/tobiasvl_iso/keymap.c rename to keyboards/hhkb/ansi/keymaps/tobiasvl_iso/keymap.c diff --git a/keyboards/hhkb/keymaps/tobiasvl_iso/readme.md b/keyboards/hhkb/ansi/keymaps/tobiasvl_iso/readme.md similarity index 100% rename from keyboards/hhkb/keymaps/tobiasvl_iso/readme.md rename to keyboards/hhkb/ansi/keymaps/tobiasvl_iso/readme.md diff --git a/keyboards/hhkb/keymaps/tominabox1/.gitignore b/keyboards/hhkb/ansi/keymaps/tominabox1/.gitignore similarity index 100% rename from keyboards/hhkb/keymaps/tominabox1/.gitignore rename to keyboards/hhkb/ansi/keymaps/tominabox1/.gitignore diff --git a/keyboards/hhkb/keymaps/tominabox1/keymap.c b/keyboards/hhkb/ansi/keymaps/tominabox1/keymap.c similarity index 100% rename from keyboards/hhkb/keymaps/tominabox1/keymap.c rename to keyboards/hhkb/ansi/keymaps/tominabox1/keymap.c diff --git a/keyboards/hhkb/ansi/keymaps/via/keymap.c b/keyboards/hhkb/ansi/keymaps/via/keymap.c new file mode 100644 index 000000000000..bdbd32898a00 --- /dev/null +++ b/keyboards/hhkb/ansi/keymaps/via/keymap.c @@ -0,0 +1,68 @@ +#include QMK_KEYBOARD_H + + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + /* BASE Level: Default Layer + |-------+---+---+---+---+---+---+---+---+---+---+-------+-----+-------+---| + | Esc | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | \ | ` | + |-------+---+---+---+---+---+---+---+---+---+---+-------+-----+-------+---| + | Tab | Q | W | E | R | T | Y | U | I | O | P | [ | ] | Backs | | + |-------+---+---+---+---+---+---+---+---+---+---+-------+-----+-------+---| + | Cont | A | S | D | F | G | H | J | K | L | ; | ' | Ent | | | + |-------+---+---+---+---+---+---+---+---+---+---+-------+-----+-------+---| + | Shift | Z | X | C | V | B | N | M | , | . | / | Shift | Fn0 | | | + |-------+---+---+---+---+---+---+---+---+---+---+-------+-----+-------+---| + + |------+------+-----------------------+------+------| + | LAlt | LGUI | ******* Space ******* | RGUI | RAlt | + |------+------+-----------------------+------+------| + */ + + [0] = LAYOUT( // default 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_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_LALT, KC_LGUI, /* */ KC_SPC, KC_RGUI, KC_RALT + ), + + /* Layer HHKB: HHKB mode (HHKB Fn) + |------+-----+-----+-----+----+----+----+----+-----+-----+-----+-----+-------+-------+-----| + | Pwr | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | Ins | Del | + |------+-----+-----+-----+----+----+----+----+-----+-----+-----+-----+-------+-------+-----| + | Caps | | | | | | | | Psc | Slk | Pus | Up | | Backs | | + |------+-----+-----+-----+----+----+----+----+-----+-----+-----+-----+-------+-------+-----| + | | VoD | VoU | Mut | | | * | / | Hom | PgU | Lef | Rig | Enter | | | + |------+-----+-----+-----+----+----+----+----+-----+-----+-----+-----+-------+-------+-----| + | | | | | | | + | - | End | PgD | Dow | | | | | + |------+-----+-----+-----+----+----+----+----+-----+-----+-----+-----+-------+-------+-----| + + |------+------+----------------------+------+------+ + | **** | **** | ******************** | **** | **** | + |------+------+----------------------+------+------+ + + */ + + [1] = LAYOUT( + 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_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_BSPC, + KC_TRNS, KC_VOLD, KC_VOLU, KC_MUTE, KC_TRNS, KC_TRNS, KC_PAST, KC_PSLS, KC_HOME, KC_PGUP, KC_LEFT, KC_RGHT, KC_PENT, + 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 + ), + [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 + ), + [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 + ) +}; diff --git a/keyboards/hhkb/ansi/keymaps/via/rules.mk b/keyboards/hhkb/ansi/keymaps/via/rules.mk new file mode 100644 index 000000000000..1e5b99807cb7 --- /dev/null +++ b/keyboards/hhkb/ansi/keymaps/via/rules.mk @@ -0,0 +1 @@ +VIA_ENABLE = yes diff --git a/keyboards/hhkb/keymaps/xyverz/keymap.c b/keyboards/hhkb/ansi/keymaps/xyverz/keymap.c similarity index 100% rename from keyboards/hhkb/keymaps/xyverz/keymap.c rename to keyboards/hhkb/ansi/keymaps/xyverz/keymap.c diff --git a/keyboards/hhkb/ansi/matrix.c b/keyboards/hhkb/ansi/matrix.c new file mode 100644 index 000000000000..f22e69f6b024 --- /dev/null +++ b/keyboards/hhkb/ansi/matrix.c @@ -0,0 +1,211 @@ +/* +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 . +*/ + +/* + * scan matrix + */ +#include +#include +#include +#include "print.h" +#include "debug.h" +#include "util.h" +#include "timer.h" +#include "matrix.h" +#include "hhkb_avr.h" +#include +#include "suspend.h" +#include "lufa.h" + + +// matrix power saving +#define MATRIX_POWER_SAVE 10000 +static uint32_t matrix_last_modified = 0; + +// matrix state buffer(1:on, 0:off) +static matrix_row_t *matrix; +static matrix_row_t *matrix_prev; +static matrix_row_t _matrix0[MATRIX_ROWS]; +static matrix_row_t _matrix1[MATRIX_ROWS]; + + +inline +uint8_t matrix_rows(void) +{ + return MATRIX_ROWS; +} + +inline +uint8_t matrix_cols(void) +{ + return MATRIX_COLS; +} + +void matrix_init(void) +{ +#ifdef DEBUG + debug_enable = true; + debug_keyboard = true; +#endif + + KEY_INIT(); + + // initialize matrix state: all keys off + for (uint8_t i=0; i < MATRIX_ROWS; i++) _matrix0[i] = 0x00; + for (uint8_t i=0; i < MATRIX_ROWS; i++) _matrix1[i] = 0x00; + matrix = _matrix0; + matrix_prev = _matrix1; +} + +__attribute__ ((weak)) +void matrix_scan_user(void) { +} + +void matrix_scan_kb(void) { + matrix_scan_user(); +} + +uint8_t matrix_scan(void) +{ + uint8_t *tmp; + + tmp = matrix_prev; + matrix_prev = matrix; + matrix = tmp; + + // power on + if (!KEY_POWER_STATE()) KEY_POWER_ON(); + for (uint8_t row = 0; row < MATRIX_ROWS; row++) { + for (uint8_t col = 0; col < MATRIX_COLS; col++) { + KEY_SELECT(row, col); + _delay_us(5); + + // Not sure this is needed. This just emulates HHKB controller's behaviour. + if (matrix_prev[row] & (1< 20/(1000000/TIMER_RAW_FREQ)) { + matrix[row] = matrix_prev[row]; + } + + _delay_us(5); + KEY_PREV_OFF(); + KEY_UNABLE(); + + // NOTE: KEY_STATE keep its state in 20us after KEY_ENABLE. + // This takes 25us or more to make sure KEY_STATE returns to idle state. + + _delay_us(75); + + } + if (matrix[row] ^ matrix_prev[row]) matrix_last_modified = timer_read32(); + } + // power off + if (KEY_POWER_STATE() && + (USB_DeviceState == DEVICE_STATE_Suspended || + USB_DeviceState == DEVICE_STATE_Unattached ) && + timer_elapsed32(matrix_last_modified) > MATRIX_POWER_SAVE) { + KEY_POWER_OFF(); + suspend_power_down(); + } + + matrix_scan_quantum(); + + return 1; +} + +bool matrix_is_modified(void) +{ + for (uint8_t i = 0; i < MATRIX_ROWS; i++) { + if (matrix[i] != matrix_prev[i]) + return true; + } + return false; +} + +inline +bool matrix_has_ghost(void) +{ + return false; +} + +inline +bool matrix_is_on(uint8_t row, uint8_t col) +{ + return (matrix[row] & (1<= 0; --r) { + count += bitpop16(matrix_get_row(r)); + } + return count; +} + +void matrix_power_up(void) { + KEY_POWER_ON(); +} +void matrix_power_down(void) { + KEY_POWER_OFF(); +} diff --git a/keyboards/hhkb/ansi/readme.md b/keyboards/hhkb/ansi/readme.md new file mode 100644 index 000000000000..495aa4c3f7b3 --- /dev/null +++ b/keyboards/hhkb/ansi/readme.md @@ -0,0 +1,14 @@ +HHKB Alternate Controller +=== + +An alternative controler for the HHKB designed by hasu. + +Keyboard Maintainer: QMK Community +Hardware Supported: HHKB Alternate Controller +Hardware Availability: https://geekhack.org/index.php?topic=12047.0 + +Make example for this keyboard (after setting up your build environment): + + make hhkb/ansi: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. diff --git a/keyboards/hhkb/rules.mk b/keyboards/hhkb/ansi/rules.mk similarity index 94% rename from keyboards/hhkb/rules.mk rename to keyboards/hhkb/ansi/rules.mk index 68fb51a30cff..a367ef48d144 100644 --- a/keyboards/hhkb/rules.mk +++ b/keyboards/hhkb/ansi/rules.mk @@ -47,14 +47,14 @@ OPT_DEFS += -DHHKB_RN42_ENABLE # Support for the RN42 Bluetooth module. This is the BT module in Hasu's BT # HHKB Alt controller. -RN42_DIR = rn42 +RN42_DIR = ../rn42 SRC += serial_uart.c \ - rn42/suart.S \ - rn42/rn42.c \ - rn42/rn42_task.c \ - rn42/battery.c \ - rn42/main.c + ../rn42/suart.S \ + ../rn42/rn42.c \ + ../rn42/rn42_task.c \ + ../rn42/battery.c \ + ../rn42/main.c VPATH += $(RN42_DIR) diff --git a/keyboards/hhkb/hhkb.c b/keyboards/hhkb/hhkb.c deleted file mode 100644 index a9d35123ffa0..000000000000 --- a/keyboards/hhkb/hhkb.c +++ /dev/null @@ -1 +0,0 @@ -#include "hhkb.h" \ No newline at end of file diff --git a/keyboards/hhkb/jp/config.h b/keyboards/hhkb/jp/config.h new file mode 100644 index 000000000000..01dab6d440cd --- /dev/null +++ b/keyboards/hhkb/jp/config.h @@ -0,0 +1,104 @@ +/* +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 0x4848 // HH = happy hacking +#define PRODUCT_ID 0x0002 // HHKB JP +#define DEVICE_VER 0x0104 +#define MANUFACTURER q.m.k +#define PRODUCT HHKB mod +#define DESCRIPTION q.m.k keyboard firmware for HHKB + +/* key matrix size */ +#define MATRIX_ROWS 16 +#define MATRIX_COLS 8 + +#define TAPPING_TERM 200 + +/* 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 + +#ifdef HHKB_RN42_ENABLE +// rn42 support -- acquired from the tmk repo. This is almost certainly not +// integrated with qmk in the correct way. + +#define SUART_OUT_PORT PORTD +#define SUART_OUT_BIT 0 +#define SUART_IN_PIN PIND +#define SUART_IN_BIT 1 + +#ifdef __AVR_ATmega32U4__ + /* iom32u4.h has no definition of UCSR1D. copy from iom32u2.h */ + #define UCSR1D _SFR_MEM8(0xCB) + #define RTSEN 0 + #define CTSEN 1 + + #define SERIAL_UART_BAUD 115200 + #define SERIAL_UART_DATA UDR1 + #define SERIAL_UART_UBRR ((F_CPU/(16.0*SERIAL_UART_BAUD)-1+0.5)) + #define SERIAL_UART_RXD_VECT USART1_RX_vect + #define SERIAL_UART_TXD_READY (UCSR1A&(1<>8); /* baud rate */ \ + UCSR1B |= (1< #include @@ -67,11 +66,11 @@ static inline void KEY_INIT(void) /* key: input with pull-up */ DDRD &= ~0x80; PORTD |= 0x80; -#ifdef HHKB_JP + /* row extention for HHKB JP */ DDRC |= (1<<6|1<<7); PORTC |= (1<<6|1<<7); -#endif + KEY_UNABLE(); KEY_PREV_OFF(); @@ -80,10 +79,10 @@ static inline void KEY_INIT(void) static inline void KEY_SELECT(uint8_t ROW, uint8_t COL) { PORTB = (PORTB & 0xC0) | (((COL) & 0x07)<<3) | ((ROW) & 0x07); -#ifdef HHKB_JP + if ((ROW) & 0x08) PORTC = (PORTC & ~(1<<6|1<<7)) | (1<<6); else PORTC = (PORTC & ~(1<<6|1<<7)) | (1<<7); -#endif + } @@ -163,5 +162,3 @@ static inline void KEY_SELECT(uint8_t ROW, uint8_t COL) PORTC &= ~0x0F; \ } while (0) #endif - -#endif diff --git a/keyboards/hhkb/info.json b/keyboards/hhkb/jp/info.json similarity index 53% rename from keyboards/hhkb/info.json rename to keyboards/hhkb/jp/info.json index 3beaff83da9a..7594987d96c3 100644 --- a/keyboards/hhkb/info.json +++ b/keyboards/hhkb/jp/info.json @@ -1,75 +1,10 @@ { - "keyboard_name": "hhkb", + "keyboard_name": "HHKB JP", "url": "", "maintainer": "qmk", "width": 15, "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": "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": 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": "Return", "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": "", "x": 1.5, "y": 4 }, - { "label": "", "x": 2.5, "y": 4, "w": 1.5 }, - { "x": 4, "y": 4, "w": 6 }, - { "label": "", "x": 10, "y": 4, "w": 1.5 }, - { "label": "", "x": 11.5, "y": 4 } - ] - }, - "LAYOUT_JP": { "layout": [ { "label": "Esc", "x": 0, "y": 0 }, diff --git a/keyboards/hhkb/jp/jp.c b/keyboards/hhkb/jp/jp.c new file mode 100644 index 000000000000..f1f1388c7739 --- /dev/null +++ b/keyboards/hhkb/jp/jp.c @@ -0,0 +1 @@ +#include "jp.h" \ No newline at end of file diff --git a/keyboards/hhkb/hhkb.h b/keyboards/hhkb/jp/jp.h similarity index 57% rename from keyboards/hhkb/hhkb.h rename to keyboards/hhkb/jp/jp.h index 668f78eecc53..a95796f25f9d 100644 --- a/keyboards/hhkb/hhkb.h +++ b/keyboards/hhkb/jp/jp.h @@ -1,28 +1,7 @@ -#ifndef HHKB_H -#define HHKB_H +#pragma once #include "quantum.h" -#define LAYOUT( \ - K31, K30, K00, K10, K11, K20, K21, K40, K41, K60, K61, K70, K71, K50, K51, \ - K32, K01, K02, K13, K12, K23, K22, K42, K43, K62, K63, K73, K72, K52, \ - K33, K04, K03, K14, K15, K24, K25, K45, K44, K65, K64, K74, K53, \ - K34, K05, K06, K07, K16, K17, K26, K46, K66, K76, K75, K55, K54, \ - K35, K36, K37, K57, K56) \ - \ -{ \ - { K00, K01, K02, K03, K04, K05, K06, K07 }, \ - { K10, K11, K12, K13, K14, K15, K16, K17 }, \ - { K20, K21, K22, K23, K24, K25, K26, KC_NO }, \ - { K30, K31, K32, K33, K34, K35, K36, K37 }, \ - { K40, K41, K42, K43, K44, K45, K46, KC_NO }, \ - { 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 } \ -} - -#define LAYOUT_60_hhkb LAYOUT - #define LAYOUT_JP( \ K02, K32, K62, K22, K12, K52, K72, KA2, K92, K82, KB2, KE2, KF2, KD2, KC2, \ K03, K63, K23, K13, K53, K73, KA3, K93, K83, KB3, KE3, KF3, KD3, \ @@ -47,6 +26,3 @@ { KC_NO, KC_NO, KE2, KE3, KE4, KE5, KE6, KC_NO }, \ { KC_NO, KC_NO, KF2, KF3, KF4, KF5, KF6, KC_NO } \ } - - -#endif diff --git a/keyboards/hhkb/keymaps/bakingpy/keymap.c b/keyboards/hhkb/jp/keymaps/bakingpy/keymap.c similarity index 100% rename from keyboards/hhkb/keymaps/bakingpy/keymap.c rename to keyboards/hhkb/jp/keymaps/bakingpy/keymap.c diff --git a/keyboards/hhkb/keymaps/bakingpy/rules.mk b/keyboards/hhkb/jp/keymaps/bakingpy/rules.mk similarity index 100% rename from keyboards/hhkb/keymaps/bakingpy/rules.mk rename to keyboards/hhkb/jp/keymaps/bakingpy/rules.mk diff --git a/keyboards/hhkb/keymaps/jp/keymap.c b/keyboards/hhkb/jp/keymaps/default/keymap.c similarity index 100% rename from keyboards/hhkb/keymaps/jp/keymap.c rename to keyboards/hhkb/jp/keymaps/default/keymap.c diff --git a/keyboards/hhkb/keymaps/halfqwerty_jp/rules.mk b/keyboards/hhkb/jp/keymaps/default/rules.mk similarity index 100% rename from keyboards/hhkb/keymaps/halfqwerty_jp/rules.mk rename to keyboards/hhkb/jp/keymaps/default/rules.mk diff --git a/keyboards/hhkb/keymaps/jp_mac/keymap.c b/keyboards/hhkb/jp/keymaps/default_mac/keymap.c similarity index 100% rename from keyboards/hhkb/keymaps/jp_mac/keymap.c rename to keyboards/hhkb/jp/keymaps/default_mac/keymap.c diff --git a/keyboards/hhkb/keymaps/jp/rules.mk b/keyboards/hhkb/jp/keymaps/default_mac/rules.mk similarity index 100% rename from keyboards/hhkb/keymaps/jp/rules.mk rename to keyboards/hhkb/jp/keymaps/default_mac/rules.mk diff --git a/keyboards/hhkb/keymaps/krusli/config.h b/keyboards/hhkb/jp/keymaps/dhertz/config.h similarity index 100% rename from keyboards/hhkb/keymaps/krusli/config.h rename to keyboards/hhkb/jp/keymaps/dhertz/config.h diff --git a/keyboards/hhkb/keymaps/dhertz/keymap.c b/keyboards/hhkb/jp/keymaps/dhertz/keymap.c similarity index 100% rename from keyboards/hhkb/keymaps/dhertz/keymap.c rename to keyboards/hhkb/jp/keymaps/dhertz/keymap.c diff --git a/keyboards/hhkb/keymaps/dhertz/keymap.h b/keyboards/hhkb/jp/keymaps/dhertz/keymap.h similarity index 100% rename from keyboards/hhkb/keymaps/dhertz/keymap.h rename to keyboards/hhkb/jp/keymaps/dhertz/keymap.h diff --git a/keyboards/hhkb/keymaps/dhertz/rules.mk b/keyboards/hhkb/jp/keymaps/dhertz/rules.mk similarity index 100% rename from keyboards/hhkb/keymaps/dhertz/rules.mk rename to keyboards/hhkb/jp/keymaps/dhertz/rules.mk diff --git a/keyboards/hhkb/keymaps/enoch_jp/keymap.c b/keyboards/hhkb/jp/keymaps/enoch_jp/keymap.c similarity index 100% rename from keyboards/hhkb/keymaps/enoch_jp/keymap.c rename to keyboards/hhkb/jp/keymaps/enoch_jp/keymap.c diff --git a/keyboards/hhkb/keymaps/enoch_jp/rules.mk b/keyboards/hhkb/jp/keymaps/enoch_jp/rules.mk similarity index 100% rename from keyboards/hhkb/keymaps/enoch_jp/rules.mk rename to keyboards/hhkb/jp/keymaps/enoch_jp/rules.mk diff --git a/keyboards/hhkb/keymaps/halfqwerty_jp/README.md b/keyboards/hhkb/jp/keymaps/halfqwerty_jp/README.md similarity index 100% rename from keyboards/hhkb/keymaps/halfqwerty_jp/README.md rename to keyboards/hhkb/jp/keymaps/halfqwerty_jp/README.md diff --git a/keyboards/hhkb/keymaps/halfqwerty_jp/keymap.c b/keyboards/hhkb/jp/keymaps/halfqwerty_jp/keymap.c similarity index 100% rename from keyboards/hhkb/keymaps/halfqwerty_jp/keymap.c rename to keyboards/hhkb/jp/keymaps/halfqwerty_jp/keymap.c diff --git a/keyboards/hhkb/keymaps/jp_mac/rules.mk b/keyboards/hhkb/jp/keymaps/halfqwerty_jp/rules.mk similarity index 100% rename from keyboards/hhkb/keymaps/jp_mac/rules.mk rename to keyboards/hhkb/jp/keymaps/halfqwerty_jp/rules.mk diff --git a/keyboards/hhkb/keymaps/rdg_jp/keymap.c b/keyboards/hhkb/jp/keymaps/rdg_jp/keymap.c similarity index 100% rename from keyboards/hhkb/keymaps/rdg_jp/keymap.c rename to keyboards/hhkb/jp/keymaps/rdg_jp/keymap.c diff --git a/keyboards/hhkb/keymaps/rdg_jp/rules.mk b/keyboards/hhkb/jp/keymaps/rdg_jp/rules.mk similarity index 100% rename from keyboards/hhkb/keymaps/rdg_jp/rules.mk rename to keyboards/hhkb/jp/keymaps/rdg_jp/rules.mk diff --git a/keyboards/hhkb/keymaps/sh_jp/README.md b/keyboards/hhkb/jp/keymaps/sh_jp/README.md similarity index 100% rename from keyboards/hhkb/keymaps/sh_jp/README.md rename to keyboards/hhkb/jp/keymaps/sh_jp/README.md diff --git a/keyboards/hhkb/keymaps/sh_jp/keymap.c b/keyboards/hhkb/jp/keymaps/sh_jp/keymap.c similarity index 100% rename from keyboards/hhkb/keymaps/sh_jp/keymap.c rename to keyboards/hhkb/jp/keymaps/sh_jp/keymap.c diff --git a/keyboards/hhkb/keymaps/sh_jp/rules.mk b/keyboards/hhkb/jp/keymaps/sh_jp/rules.mk similarity index 100% rename from keyboards/hhkb/keymaps/sh_jp/rules.mk rename to keyboards/hhkb/jp/keymaps/sh_jp/rules.mk diff --git a/keyboards/hhkb/jp/keymaps/via/config.h b/keyboards/hhkb/jp/keymaps/via/config.h new file mode 100644 index 000000000000..96c85573df1e --- /dev/null +++ b/keyboards/hhkb/jp/keymaps/via/config.h @@ -0,0 +1,2 @@ +// 3 layers or else it will not fit in EEPROM +#define DYNAMIC_KEYMAP_LAYER_COUNT 3 diff --git a/keyboards/hhkb/jp/keymaps/via/keymap.c b/keyboards/hhkb/jp/keymaps/via/keymap.c new file mode 100644 index 000000000000..cb1ba76fb0ef --- /dev/null +++ b/keyboards/hhkb/jp/keymaps/via/keymap.c @@ -0,0 +1,58 @@ +#include QMK_KEYBOARD_H + +/* Layer 0: HHKB JP + * ,-----------------------------------------------------------. + * |Esc| 1| 2| 3| 4| 5| 6| 7| 8| 9| 10| -| =|Yen|Bsp| + * |-----------------------------------------------------------| + * |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| | + * |------------------------------------------------------` Ent| + * |Ctrl | A| S| D| F| G| H| J| K| L| ;| '| `| | + * |-----------------------------------------------------------| + * |Shft | Z| X| C| V| B| N| M| ,| .| /| \| Up|Sft| + * |-----------------------------------------------------------| + * | ||Ctl|Alt|Cmd| | Spc |Bsp| | | ||Lft|Dwn|Rgh| + * `-----------------------------------------------------------' + */ + +/* Layer 1: HHKB mode (HHKB Fn) + * ,-----------------------------------------------------------. + * |Pwr| F1| F2| F3| F4| F5| F6| F7| F8| F9|F10|F11|F12|Ins|Del| + * |-----------------------------------------------------------| + * |Caps | | | | | | | |Psc|Slk|Pus|Up | | | + * |------------------------------------------------------` | + * | |VoD|VoU|Mut| | | *| /|Hom|PgU|Lef|Rig| | | + * |-----------------------------------------------------------| + * | | | | | | | +| -|End|PgD|Dow| | | | + * |-----------------------------------------------------------| + * | || | | | | | | | | || | | | + * `-----------------------------------------------------------' + */ + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_JP( + 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_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_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, + MO(1), KC_ZKHK, KC_LGUI, KC_LALT, KC_MHEN, KC_SPC, KC_HENK, KC_KANA, KC_RALT, MO(1), KC_LEFT, KC_DOWN, KC_RGHT), + + [1] = LAYOUT_JP( + 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_CAPS, _______, _______, _______, _______, _______, _______, _______, KC_PSCR, KC_SLCK, KC_PAUS, KC_UP, _______, + _______, KC_VOLD, KC_VOLU, KC_MUTE, KC_PWR, _______, KC_PAST, KC_PSLS, KC_HOME, KC_PGUP, KC_LEFT, KC_RGHT, _______, KC_PENT, + _______, _______, _______, _______, _______, _______, KC_PPLS, KC_PMNS, KC_END, KC_PGDN, KC_DOWN, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + [2] = LAYOUT_JP( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, 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 macro_id, uint8_t opt) +{ + return MACRO_NONE; +} diff --git a/keyboards/hhkb/jp/keymaps/via/rules.mk b/keyboards/hhkb/jp/keymaps/via/rules.mk new file mode 100644 index 000000000000..1e5b99807cb7 --- /dev/null +++ b/keyboards/hhkb/jp/keymaps/via/rules.mk @@ -0,0 +1 @@ +VIA_ENABLE = yes diff --git a/keyboards/hhkb/matrix.c b/keyboards/hhkb/jp/matrix.c similarity index 99% rename from keyboards/hhkb/matrix.c rename to keyboards/hhkb/jp/matrix.c index 666b6f595f17..437356af6d26 100644 --- a/keyboards/hhkb/matrix.c +++ b/keyboards/hhkb/jp/matrix.c @@ -140,13 +140,10 @@ uint8_t matrix_scan(void) // NOTE: KEY_STATE keep its state in 20us after KEY_ENABLE. // This takes 25us or more to make sure KEY_STATE returns to idle state. -#ifdef HHKB_JP + // Looks like JP needs faster scan due to its twice larger matrix // or it can drop keys in fast key typing _delay_us(30); -#else - _delay_us(75); -#endif } if (matrix[row] ^ matrix_prev[row]) matrix_last_modified = timer_read32(); } diff --git a/keyboards/hhkb/readme.md b/keyboards/hhkb/jp/readme.md similarity index 95% rename from keyboards/hhkb/readme.md rename to keyboards/hhkb/jp/readme.md index 57eb81439106..41c1d2214eaa 100644 --- a/keyboards/hhkb/readme.md +++ b/keyboards/hhkb/jp/readme.md @@ -9,6 +9,6 @@ Hardware Availability: https://geekhack.org/index.php?topic=12047.0 Make example for this keyboard (after setting up your build environment): - make hhkb:default + make hhkb/jp: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. diff --git a/keyboards/hhkb/jp/rules.mk b/keyboards/hhkb/jp/rules.mk new file mode 100644 index 000000000000..774b444c5318 --- /dev/null +++ b/keyboards/hhkb/jp/rules.mk @@ -0,0 +1,69 @@ +# 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 = 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 +# 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 + + +# HHKB_RN42_ENABLE = yes # Enable support for hasu's BT alt controller -- code borrowed from tmk source tree. + +# Either uncomment the HHKB_RN42_ENABLE line above, or run make enabling the +# feature. Be sure to clean any existing build before trying to enable rn42 +# support. For example: +# +# make hhkb-keymap-clean +# make hhkb-keymap-dfu HHKB_RN42_ENABLE=yes + +# project specific files +SRC = matrix.c + +ifeq ($(strip $(HHKB_RN42_ENABLE)), yes) + +OPT_DEFS += -DHHKB_RN42_ENABLE + +# Support for the RN42 Bluetooth module. This is the BT module in Hasu's BT +# HHKB Alt controller. +RN42_DIR = ../rn42 + +SRC += serial_uart.c \ + ../rn42/suart.S \ + ../rn42/rn42.c \ + ../rn42/rn42_task.c \ + ../rn42/battery.c \ + ../rn42/main.c + +VPATH += $(RN42_DIR) + +endif + + +# debug-on: EXTRAFLAGS += -DDEBUG -DDEBUG_ACTION +# debug-on: all + +# debug-off: EXTRAFLAGS += -DNO_DEBUG -DNO_PRINT +# debug-off: OPT_DEFS := $(filter-out -DCONSOLE_ENABLE,$(OPT_DEFS)) +# debug-off: all diff --git a/keyboards/infinity60/keymaps/jpetermans/keymap.c b/keyboards/infinity60/keymaps/jpetermans/keymap.c index c99b05e4c5c0..a169d658f705 100644 --- a/keyboards/infinity60/keymaps/jpetermans/keymap.c +++ b/keyboards/infinity60/keymaps/jpetermans/keymap.c @@ -15,8 +15,6 @@ enum ic60_keycodes { NUMPAD, FNAV, MEDIA, - TILDE, - CTLALTDEL, BACKLIGHT, BRIGHT, DIM, @@ -55,7 +53,7 @@ const uint16_t 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_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, \ TT(_FNAV), 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,F(TILDE),KC_NO, \ + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM,KC_DOT, KC_SLSH,LM(_TILDE, MOD_LSFT),KC_NO, \ KC_LCTL, KC_LGUI,KC_LALT, LT(_FNAV, KC_SPC), KC_RALT,TG(_NUMPAD),MO(_MEDIA), KC_RCTL \ ), @@ -74,7 +72,7 @@ const uint16_t keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_CAPS,_______,_______,_______,_______,_______,_______,KC_PGUP,KC_UP,KC_PGDN,KC_PSCR,_______,_______,KC_DEL, \ _______,_______,KC_BTN2,_______,_______,_______,KC_HOME,KC_LEFT,KC_DOWN,KC_RGHT,KC_INS,_______,_______, \ _______,KC_APP,KC_BTN1,KC_CALC,_______,_______,KC_END,_______,_______,_______,_______,_______,KC_NO, \ - _______,_______,_______, _______, F(CTLALTDEL),KC_NLCK,_______,_______ \ + _______,_______,_______, _______, C(A(KC_DEL)),KC_NLCK,_______,_______ \ ), /* media */ @@ -162,8 +160,6 @@ uint8_t led_game[5] = { //======== qmk functions ========= const uint16_t fn_actions[] = { - [CTLALTDEL] = ACTION_KEY(LALT(LCTL(KC_DEL))), - [TILDE] = ACTION_LAYER_MODS(_TILDE, MOD_LSFT), [ALL] = ACTION_FUNCTION(ACTION_LEDS_ALL), [GAME] = ACTION_FUNCTION(ACTION_LEDS_GAME), [BACKLIGHT] = ACTION_FUNCTION(ACTION_LEDS_BACKLIGHT), diff --git a/keyboards/jd45/keymaps/justin/keymap.c b/keyboards/jd45/keymaps/justin/keymap.c index 1c0e780724d5..985ff19b8877 100644 --- a/keyboards/jd45/keymaps/justin/keymap.c +++ b/keyboards/jd45/keymaps/justin/keymap.c @@ -3,15 +3,22 @@ #define KC_MO1 MO(1) #define KC_MO2 MO(2) #define KC_MO3 MO(3) +#define KC_LM4 LM(4, MOD_LSFT) + +#define KC_MTCM MT(MOD_LCTL, KC_MINS) +#define KC_MTSG MT(MOD_LSFT, KC_GRV) +#define KC_MTSW MT(MOD_RSFT, KC_RGUI) +#define KC_MTSC MT(MOD_RSFT, KC_CAPS) +#define KC_MTCT MT(MOD_LCTL, KC_TAB) #define KC_BLTG BL_TOGG const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [0] = LAYOUT_kc( ESC, Q, W, F, P, G, J, L, U, Y, SCLN, QUOT, BSPC, - FN8, A, R, S, T, D, H, N, E, I, O, ENT, - LSFT, Z, X, C, V, B, K, M, COMM, DOT, SLSH, FN6, - FN4, LGUI, FN7, MO2, MO1, SPC, FN5, RALT, MO3, FN0), + MTCT, A, R, S, T, D, H, N, E, I, O, ENT, + LSFT, Z, X, C, V, B, K, M, COMM, DOT, SLSH, MTSC, + MTSG, LGUI, LM4, MO2, MO1, SPC, MTSW, RALT, MO3, MTCM), [1] = LAYOUT_kc( TRNS, FN10, FN11, FN12, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, UP, DEL, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, HOME, PGUP, LEFT, RGHT, @@ -42,13 +49,6 @@ enum macro_id }; const uint16_t PROGMEM fn_actions[] = { - [0] = ACTION_MODS_TAP_KEY(MOD_LCTL, KC_MINS), - [4] = ACTION_MODS_TAP_KEY(MOD_LSFT, KC_GRV), - [5] = ACTION_MODS_TAP_KEY(MOD_RSFT, KC_RGUI), - [6] = ACTION_MODS_TAP_KEY(MOD_RSFT, KC_CAPS), - [7] = ACTION_LAYER_MODS(4, MOD_LSFT), // FN4 - [8] = ACTION_MODS_TAP_KEY(MOD_LCTL, KC_TAB), - [10] = ACTION_MACRO(PSWD1), [11] = ACTION_MACRO(PSWD2), [12] = ACTION_MACRO(PSWD3) diff --git a/keyboards/jd45/keymaps/mjt6u/keymap.c b/keyboards/jd45/keymaps/mjt6u/keymap.c index 6fda6ac95fab..dc7c3bb7e32d 100644 --- a/keyboards/jd45/keymaps/mjt6u/keymap.c +++ b/keyboards/jd45/keymaps/mjt6u/keymap.c @@ -119,7 +119,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { persistent_default_layer_set(1UL << _QWERTY); #ifdef AUDIO_ENABLE - PLAY_NOTE_ARRAY(tone_fnpc, false, 0); + PLAY_SONG(tone_fnpc); #endif print("Space-FN"); } @@ -130,7 +130,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { persistent_default_layer_set(1UL << _QWERTYNUMMODS); #ifdef AUDIO_ENABLE - PLAY_NOTE_ARRAY(tone_fnmac, false, 0); + PLAY_SONG(tone_fnmac); #endif print("Space-Numpad"); } diff --git a/keyboards/keebio/nyquist/keymaps/danielhklein/keymap.c b/keyboards/keebio/nyquist/keymaps/danielhklein/keymap.c index 14428812f2ba..00f0bb3ced4b 100644 --- a/keyboards/keebio/nyquist/keymaps/danielhklein/keymap.c +++ b/keyboards/keebio/nyquist/keymaps/danielhklein/keymap.c @@ -30,16 +30,9 @@ enum custom_keycodes { ARROW }; - // Enable these functions using FUNC(n) macro. - const uint16_t PROGMEM fn_actions[] = { - [0] = LT(_LOWER, KC_SPC), //Hold for momentary Lower layer, Tap for Backspace, - [1] = LT(_RAISE, KC_BSPC), //Hold for momentary Raise layer, Tap for Space, - [2] = MO(_ARROW), //Hold for momentary Arrow - }; - -#define SPC_LWR FUNC(0) -#define BSP_RSE FUNC(1) -#define ARW FUNC(2) +#define SPC_LWR LT(_LOWER, KC_SPC) +#define BSP_RSE LT(_RAISE, KC_BSPC) +#define ARW MO(_ARROW) // Underglow setup #define RGBLIGHT_SLEEP diff --git a/keyboards/keebio/viterbi/keymaps/bakingpy/keymap.c b/keyboards/keebio/viterbi/keymaps/bakingpy/keymap.c index f0122bef05a8..ab8cf2a9ae27 100644 --- a/keyboards/keebio/viterbi/keymaps/bakingpy/keymap.c +++ b/keyboards/keebio/viterbi/keymaps/bakingpy/keymap.c @@ -158,7 +158,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { case QWERTY: if (record->event.pressed) { #ifdef AUDIO_ENABLE - PLAY_NOTE_ARRAY(tone_qwerty, false, 0); + PLAY_SONG(tone_qwerty); #endif persistent_default_layer_set(1UL<<_QWERTY); } @@ -167,7 +167,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { case COLEMAK: if (record->event.pressed) { #ifdef AUDIO_ENABLE - PLAY_NOTE_ARRAY(tone_colemak, false, 0); + PLAY_SONG(tone_colemak); #endif persistent_default_layer_set(1UL<<_COLEMAK); } @@ -176,7 +176,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { case DVORAK: if (record->event.pressed) { #ifdef AUDIO_ENABLE - PLAY_NOTE_ARRAY(tone_dvorak, false, 0); + PLAY_SONG(tone_dvorak); #endif persistent_default_layer_set(1UL<<_DVORAK); } diff --git a/keyboards/keebio/viterbi/keymaps/dwallace/keymap.c b/keyboards/keebio/viterbi/keymaps/dwallace/keymap.c index 5a797cb0bd0c..c03cf970fd7d 100644 --- a/keyboards/keebio/viterbi/keymaps/dwallace/keymap.c +++ b/keyboards/keebio/viterbi/keymaps/dwallace/keymap.c @@ -155,7 +155,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { case QWERTY: if (record->event.pressed) { #ifdef AUDIO_ENABLE - PLAY_NOTE_ARRAY(tone_qwerty, false, 0); + PLAY_SONG(tone_qwerty); #endif persistent_default_layer_set(1UL<<_QWERTY); } diff --git a/keyboards/keebio/viterbi/keymaps/mike808/keymap.c b/keyboards/keebio/viterbi/keymaps/mike808/keymap.c index e1dc91d2b2b2..9922f1a555fc 100644 --- a/keyboards/keebio/viterbi/keymaps/mike808/keymap.c +++ b/keyboards/keebio/viterbi/keymaps/mike808/keymap.c @@ -128,7 +128,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { case QWERTY: if (record->event.pressed) { #ifdef AUDIO_ENABLE - PLAY_NOTE_ARRAY(tone_qwerty, false, 0); + PLAY_SONG(tone_qwerty); #endif persistent_default_layer_set(1UL << _QWERTY); } @@ -137,7 +137,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { case DVORAK: if (record->event.pressed) { #ifdef AUDIO_ENABLE - PLAY_NOTE_ARRAY(tone_dvorak, false, 0); + PLAY_SONG(tone_dvorak); #endif persistent_default_layer_set(1UL << _DVORAK); } diff --git a/keyboards/model01/config.h b/keyboards/keyboardio/model01/config.h similarity index 100% rename from keyboards/model01/config.h rename to keyboards/keyboardio/model01/config.h diff --git a/keyboards/model01/info.json b/keyboards/keyboardio/model01/info.json similarity index 98% rename from keyboards/model01/info.json rename to keyboards/keyboardio/model01/info.json index 60c914d5c049..66bea171d225 100644 --- a/keyboards/model01/info.json +++ b/keyboards/keyboardio/model01/info.json @@ -1,6 +1,6 @@ { "keyboard_name": "model01", - "keyboard_folder": "model01", + "keyboard_folder": "keyboardio/model01", "url": "https://keyboard.io", "maintainer": "qmk", "width": 18.5, diff --git a/keyboards/model01/keymaps/default/config.h b/keyboards/keyboardio/model01/keymaps/default/config.h similarity index 100% rename from keyboards/model01/keymaps/default/config.h rename to keyboards/keyboardio/model01/keymaps/default/config.h diff --git a/keyboards/model01/keymaps/default/keymap.c b/keyboards/keyboardio/model01/keymaps/default/keymap.c similarity index 100% rename from keyboards/model01/keymaps/default/keymap.c rename to keyboards/keyboardio/model01/keymaps/default/keymap.c diff --git a/keyboards/model01/keymaps/default/readme.md b/keyboards/keyboardio/model01/keymaps/default/readme.md similarity index 100% rename from keyboards/model01/keymaps/default/readme.md rename to keyboards/keyboardio/model01/keymaps/default/readme.md diff --git a/keyboards/model01/keymaps/dshields/config.h b/keyboards/keyboardio/model01/keymaps/dshields/config.h similarity index 100% rename from keyboards/model01/keymaps/dshields/config.h rename to keyboards/keyboardio/model01/keymaps/dshields/config.h diff --git a/keyboards/model01/keymaps/dshields/keymap.c b/keyboards/keyboardio/model01/keymaps/dshields/keymap.c similarity index 100% rename from keyboards/model01/keymaps/dshields/keymap.c rename to keyboards/keyboardio/model01/keymaps/dshields/keymap.c diff --git a/keyboards/model01/keymaps/dshields/readme.md b/keyboards/keyboardio/model01/keymaps/dshields/readme.md similarity index 100% rename from keyboards/model01/keymaps/dshields/readme.md rename to keyboards/keyboardio/model01/keymaps/dshields/readme.md diff --git a/keyboards/model01/keymaps/tw1t611/config.h b/keyboards/keyboardio/model01/keymaps/tw1t611/config.h similarity index 100% rename from keyboards/model01/keymaps/tw1t611/config.h rename to keyboards/keyboardio/model01/keymaps/tw1t611/config.h diff --git a/keyboards/model01/keymaps/tw1t611/keymap.c b/keyboards/keyboardio/model01/keymaps/tw1t611/keymap.c similarity index 100% rename from keyboards/model01/keymaps/tw1t611/keymap.c rename to keyboards/keyboardio/model01/keymaps/tw1t611/keymap.c diff --git a/keyboards/model01/keymaps/tw1t611/readme.md b/keyboards/keyboardio/model01/keymaps/tw1t611/readme.md similarity index 100% rename from keyboards/model01/keymaps/tw1t611/readme.md rename to keyboards/keyboardio/model01/keymaps/tw1t611/readme.md diff --git a/keyboards/model01/leds.c b/keyboards/keyboardio/model01/leds.c similarity index 100% rename from keyboards/model01/leds.c rename to keyboards/keyboardio/model01/leds.c diff --git a/keyboards/model01/leds.h b/keyboards/keyboardio/model01/leds.h similarity index 100% rename from keyboards/model01/leds.h rename to keyboards/keyboardio/model01/leds.h diff --git a/keyboards/model01/matrix.c b/keyboards/keyboardio/model01/matrix.c similarity index 100% rename from keyboards/model01/matrix.c rename to keyboards/keyboardio/model01/matrix.c diff --git a/keyboards/model01/model01.c b/keyboards/keyboardio/model01/model01.c similarity index 100% rename from keyboards/model01/model01.c rename to keyboards/keyboardio/model01/model01.c diff --git a/keyboards/model01/model01.h b/keyboards/keyboardio/model01/model01.h similarity index 100% rename from keyboards/model01/model01.h rename to keyboards/keyboardio/model01/model01.h diff --git a/keyboards/model01/readme.md b/keyboards/keyboardio/model01/readme.md similarity index 84% rename from keyboards/model01/readme.md rename to keyboards/keyboardio/model01/readme.md index 34bd291e2ed6..5f55a8812879 100644 --- a/keyboards/model01/readme.md +++ b/keyboards/keyboardio/model01/readme.md @@ -2,13 +2,13 @@ A split keyboard. -Keyboard Maintainer: QMK Community -Hardware Supported: Keyboardio Model 01 -Hardware Availability: [Keyboardio](https://shop.keyboard.io) +* Keyboard Maintainer: QMK Community +* Hardware Supported: Keyboardio Model 01 +* Hardware Availability: [Keyboardio](https://shop.keyboard.io) Make example for this keyboard (after setting up your build environment): - make model01:default + make keyboardio/model01: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). @@ -17,7 +17,7 @@ Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/ne To program the keyboard, if you have avrdude installed: - make model01:default:avrdude + make keyboardio/model01:default:flash When prompted to reset your keyboard, press the prog key at upper left. If the keyboard does not reset, you can hold the prog key while plugging it into your diff --git a/keyboards/model01/rules.mk b/keyboards/keyboardio/model01/rules.mk similarity index 100% rename from keyboards/model01/rules.mk rename to keyboards/keyboardio/model01/rules.mk diff --git a/keyboards/model01/wire-protocol-constants.h b/keyboards/keyboardio/model01/wire-protocol-constants.h similarity index 100% rename from keyboards/model01/wire-protocol-constants.h rename to keyboards/keyboardio/model01/wire-protocol-constants.h diff --git a/keyboards/keyboardio/readme.md b/keyboards/keyboardio/readme.md new file mode 100644 index 000000000000..d9ce48c23628 --- /dev/null +++ b/keyboards/keyboardio/readme.md @@ -0,0 +1,18 @@ +# Keyboardio + +Keyboardio are an US-based Keyboard maker, known for their +[Model01](https://shop.keyboard.io/collections/frontpage/products/model-01-keyboard), +and more recently, the Keyboardio +[Atreus](https://www.kickstarter.com/projects/keyboardio/atreus) keyboards. + +## Online Stores + +**Website:** https://shop.keyboard.io/ + +## Social Media + +**Discord:** https://discord.gg/4az77sf +**Forums:** https://community.keyboard.io/ +**Twitter:** https://twitter.com/keyboardio +**Facebook:** https://facebook.com/keyboardio +**Blog:** https://blog.keyboard.io/ diff --git a/keyboards/kinesis/keymaps/milestogo/keymap.c b/keyboards/kinesis/keymaps/milestogo/keymap.c index 024df591271c..8c01bcb83dc2 100644 --- a/keyboards/kinesis/keymaps/milestogo/keymap.c +++ b/keyboards/kinesis/keymaps/milestogo/keymap.c @@ -52,16 +52,16 @@ 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, LT(_SYMB, KC_RIGHT), + KC_GRAVE, KC_ESC, MT(MOD_LGUI,KC_LEFT), LT(_SYMB, KC_RIGHT), KC_LCTL,KC_LALT, KC_DEL, KC_BSPC, KC_DEL ,TT(_MOUSE) , - KC_F9 ,KC_F10 ,KC_F11 ,KC_F12 ,TT(_MOUSE) ,KC_FN1 ,TT(_SYMB), KC_NO, RESET, + KC_F9 ,KC_F10 ,KC_F11 ,KC_F12 ,TT(_MOUSE) ,TG(_MOUSE) ,TT(_SYMB), KC_NO, RESET, KC_6 ,KC_7 ,KC_8 ,KC_9 ,KC_0 ,KC_MINS, 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, - LT(_SYMB, KC_UP), KC_FN7, KC_LBRC ,KC_RBRC, + LT(_SYMB, KC_UP), MT(MOD_LGUI,KC_DOWN), 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, LT(_SYMB, KC_RIGHT), + _______, KC_COLON, MT(MOD_LGUI,KC_LEFT), 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, - LT(_SYMB, KC_UP), KC_FN7, KC_BSLS, XXXXXXX, + LT(_SYMB, KC_UP), MT(MOD_LGUI,KC_DOWN), 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, LT(_SYMB, KC_RIGHT), + _______, _______, MT(MOD_LGUI,KC_LEFT), 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, _______, _______, _______, _______, _______, _______, _______, _______, - LT(_SYMB, KC_UP), KC_FN7, _______, _______, + LT(_SYMB, KC_UP), MT(MOD_LGUI,KC_DOWN), _______, _______, _______, _______, _______, _______, _______, _______ @@ -192,7 +192,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_CAPS, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_EXLM ,KC_AT, KC_HASH, KC_DLR ,KC_PERC , _______, KC_NO, KC_NO, KC_UP, KC_NO, KC_PGUP, - KC_FN1, LGUI(KC_Z),LGUI(KC_X),LGUI(KC_C),LGUI(KC_V), KC_NO, + TG(_MOUSE), LGUI(KC_Z),LGUI(KC_X),LGUI(KC_C),LGUI(KC_V), KC_NO, _______, KC_NO, KC_NO, KC_UP, KC_NO, KC_PGDN, _______, _______, KC_NO, KC_NO, _______, _______, @@ -261,16 +261,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { }; - - -const uint16_t PROGMEM fn_actions[] = { - [1] = ACTION_LAYER_TOGGLE(_MOUSE) , - [4]= ACTION_MODS_TAP_KEY(MOD_LGUI,KC_LEFT), - [7]= ACTION_MODS_TAP_KEY(MOD_LGUI,KC_DOWN), - - -}; - const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { // MACRODOWN only works in this function diff --git a/keyboards/lets_split/keymaps/mjt/keymap.c b/keyboards/lets_split/keymaps/mjt/keymap.c index b0394659cc57..a7fa4f55d32f 100644 --- a/keyboards/lets_split/keymaps/mjt/keymap.c +++ b/keyboards/lets_split/keymaps/mjt/keymap.c @@ -152,7 +152,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { case QWERTY: if (record->event.pressed) { #ifdef AUDIO_ENABLE - PLAY_NOTE_ARRAY(tone_qwerty, false, 0); + PLAY_SONG(tone_qwerty); #endif persistent_default_layer_set(1UL<<_QWERTY); } @@ -161,7 +161,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { case COLEMAK: if (record->event.pressed) { #ifdef AUDIO_ENABLE - PLAY_NOTE_ARRAY(tone_colemak, false, 0); + PLAY_SONG(tone_colemak); #endif persistent_default_layer_set(1UL<<_COLEMAK); } @@ -170,7 +170,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { case DVORAK: if (record->event.pressed) { #ifdef AUDIO_ENABLE - PLAY_NOTE_ARRAY(tone_dvorak, false, 0); + PLAY_SONG(tone_dvorak); #endif persistent_default_layer_set(1UL<<_DVORAK); } diff --git a/keyboards/lets_split/keymaps/piemod/keymap.c b/keyboards/lets_split/keymaps/piemod/keymap.c index d789b7a8be8e..68e7e0ba05e0 100644 --- a/keyboards/lets_split/keymaps/piemod/keymap.c +++ b/keyboards/lets_split/keymaps/piemod/keymap.c @@ -29,7 +29,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_ESC, KC_QUOTE, LT(7, KC_COMMA), KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_DELETE, \ KC_TAB, LT(1, KC_A), LT(2, KC_O), LT(3, KC_E), LT(4, KC_U), KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_ENTER, \ KC_LSHIFT, KC_SCOLON, LT(5, KC_Q), KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_MINUS, \ - F(1), LT(6, KC_LCTRL), KC_MENU, KC_LALT, KC_LGUI, KC_BSPACE, KC_SPACE, KC_RCTRL, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT \ + C(KC_LALT), LT(6, KC_LCTRL), KC_MENU, KC_LALT, KC_LGUI, KC_BSPACE, KC_SPACE, KC_RCTRL, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT \ ), [_ARROW] = LAYOUT( \ @@ -41,7 +41,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_SYMBOL] = LAYOUT( \ 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(2), \ + KC_NO, KC_NO, KC_TRNS, KC_SCOLON, KC_COLN, KC_NO, KC_LCBR, KC_RCBR, KC_DLR, KC_PERC, KC_CIRC, S(KC_SLSH), \ 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 \ ), @@ -81,19 +81,3 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { 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 \ ) }; - -enum function_id { - TEENSY_KEY, - CUSTOM_KEY, - L_CTRL_ALT_ENT, - R_CTRL_ALT_ENT, -}; - -int CAPSLOCKED = 0; - - const uint16_t PROGMEM fn_actions[] = { - // Special Keys - [1] = ACTION_MODS_KEY(KC_LCTRL, KC_LALT), // FN10 = Ctrl + Alt. - // Symbols - [2] = ACTION_MODS_KEY(MOD_LSFT, KC_SLASH), // FN21 = Question mark. - }; diff --git a/keyboards/lily58/config.h b/keyboards/lily58/config.h index 50bf2beb3254..0bdaa1f76e7e 100644 --- a/keyboards/lily58/config.h +++ b/keyboards/lily58/config.h @@ -19,10 +19,11 @@ along with this program. If not, see . #pragma once #include "config_common.h" -#include -#define USE_I2C -#define USE_SERIAL +#ifndef SOFT_SERIAL_PIN +#define SOFT_SERIAL_PIN D2 +#define SERIAL_USE_MULTI_TRANSACTION +#endif #if !defined(NO_ACTION_MACRO) #define NO_ACTION_MACRO @@ -30,3 +31,8 @@ along with this program. If not, see . #if !defined(NO_ACTION_FUNCTION) #define NO_ACTION_FUNCTION #endif + +#define DIODE_DIRECTION COL2ROW + +// Use the lily version to get the Lily58 logo instead of the qmk logo +#define OLED_FONT_H "lib/glcdfont_lily.c" diff --git a/keyboards/lily58/i2c.c b/keyboards/lily58/i2c.c deleted file mode 100755 index 4bee5c639829..000000000000 --- a/keyboards/lily58/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/lily58/keymaps/chuan/config.h b/keyboards/lily58/keymaps/chuan/config.h new file mode 100644 index 000000000000..fa93060db16a --- /dev/null +++ b/keyboards/lily58/keymaps/chuan/config.h @@ -0,0 +1,64 @@ +/* +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 + +// #define USE_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 */ +#define TAPPING_TERM 200 + + +#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 + +#define ENCODERS_PAD_A { F4 } +#define ENCODERS_PAD_B { F5 } + + + /* Set 0 if debouncing isn't needed */ +#define DEBOUNCE 5 + +// Underglow +/* +#undef RGBLED_NUM +#define RGBLED_NUM 14 // Number of LEDs +#define RGBLIGHT_ANIMATIONS +#define RGBLIGHT_SLEEP +*/ diff --git a/keyboards/lily58/keymaps/chuan/keymap.c b/keyboards/lily58/keymaps/chuan/keymap.c new file mode 100644 index 000000000000..da49e67a0eb9 --- /dev/null +++ b/keyboards/lily58/keymaps/chuan/keymap.c @@ -0,0 +1,230 @@ +#include QMK_KEYBOARD_H + +#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 + +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 | - | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * |HYPER | A | S | D | F | G |-------. ,-------| H | J | K | L | ; | ' | + * |------+------+------+------+------+------| - | | + |------+------+------+------+------+------| + * |LShift| Z | X | C | V | B |-------| |-------| N | M | , | . | / |RShift| + * `-----------------------------------------/ / \ \-----------------------------------------' + * | LCtl | LGUI |LALT | /Space / \Space \ |RAISE | [ | ] | + * | | | |/ LOWER / \ \ | ' | | | + * `----------------------------' '------''--------------------' + */ + + [_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, \ + ALL_T(KC_GRV), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_ENTER, \ + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_MINS, MEH_T(KC_EQL), KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, \ + KC_LCTRL, KC_LGUI, KC_LALT,LT(_LOWER, KC_SPC), KC_SPC, LT(2,KC_QUOT), KC_LBRC, KC_RBRC \ +), +/* LOWER + * ,-----------------------------------------. ,-----------------------------------------. + * | | | | | | | | | | | | | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | F1 | F2 | F3 | F4 | F5 | F6 | | F7 | F8 | F9 | F10 | F11 | F12 | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | ` | ! | @ | # | $ | % |-------. ,-------| ^ | & | * | ( | ) | - | + * |------+------+------+------+------+------| cmd spc| | |------+------+------+------+------+------| + * | | | |ctrl c| | |-------| |-------| | - | _ | [ | ] | | | + * `-----------------------------------------/ / \ \-----------------------------------------' + * | LAlt | LGUI |LOWER | /Space / \Enter \ |RAISE | { | } | + * | | | |/ / \ \ | | | | + * `----------------------------' '------''--------------------' + */ +[_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_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, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______,_______, _______, _______,\ + _______, _______, _______, C(KC_C), _______, _______, LGUI(KC_SPC), _______, _______, KC_MINS, KC_UNDS , KC_LBRC, KC_RBRC, KC_PIPE, \ + _______, _______, _______, _______, _______, RAISE, KC_LCBR, KC_RCBR\ +), +/* RAISE + * ,-----------------------------------------. ,-----------------------------------------. + * | | | | | | | | | | | | | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | ` | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | F1 | F2 | F3 | F4 | F5 | F6 |-------. ,-------| | Left | Down | Up |Right | | + * |------+------+------+------+------+------| [ | | ] |------+------+------+------+------+------| + * | F7 | F8 | F9 | F10 | F11 | F12 |-------| |-------| + | - | = | [ | ] | \ | + * `-----------------------------------------/ / \ \-----------------------------------------' + * | LAlt | LGUI |LOWER | /Space / \Enter \ |RAISE |BackSP| RGUI | + * | | | |/ / \ \ | | | | + * `----------------------------' '------''--------------------' + */ + +[_RAISE] = LAYOUT( + KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, _______, KC_MRWD, KC_MPLY, KC_MFFD, KC_DEL, _______, \ + KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_6, LCTL(LSFT(KC_TAB)),KC_UP,LCTL(KC_TAB), KC_0, _______, \ + _______, _______, _______, _______, _______, _______, XXXXXXX, KC_LEFT, KC_DOWN, KC_RIGHT, KC_RGHT, XXXXXXX, \ + _______, _______, _______, _______, _______, _______, _______, TG(_ADJUST),KC_PLUS, KC_MUTE ,KC_VOLD ,KC_VOLU, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______ \ +), +/* ADJUST + * ,-----------------------------------------. ,-----------------------------------------. + * | | | | | | | | | 7 | 8 | 9 |RGB ON| HUE+ | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | | | | | | | | 4 | 5 | 6 | MODE | HUE- | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | | | | | |-------. ,-------| | 1 | 2 | 3 | SAT+ | VAL+ | + * |------+------+------+------+------+------| | |DEFAULT|------+------+------+------+------+------| + * | | | | | | |-------| |-------| | 0 | 0 | . | SAT- | VAL- | + * `-----------------------------------------/ / \ \-----------------------------------------' + * | LAlt | LGUI |LOWER | /Space / \Enter \ |RAISE |BackSP| RGUI | + * | | | |/ / \ \ | | | | + * `----------------------------' '------''--------------------' + */ + [_ADJUST] = LAYOUT( + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_7 , KC_8 , KC_9 , RGB_TOG, RGB_HUI, \ + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_4 , KC_5 , KC_6 , RGB_MOD, RGB_HUD, \ + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_1 , KC_2 , KC_3 , RGB_SAI, RGB_VAI, \ + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, TG(_ADJUST), XXXXXXX, KC_0 , KC_0 , KC_DOT, RGB_SAD, RGB_VAD,\ + _______, _______, _______, _______, _______, _______,KC_BSPC, _______ \ + ) +}; + +int RGB_current_mode; + +int counter = 0; +int lastIndex = 9; + +// 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 +} + +#ifdef OLED_DRIVER_ENABLE + +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; +} + +// 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); + +char encoder_debug[24]; + +void oled_task_user(void) { + // Host Keyboard Layer Status + snprintf(encoder_debug, sizeof(encoder_debug), "%i %i", counter, lastIndex ); + if (is_keyboard_master()) { + // If you want to change the display of OLED, you need to change here + oled_write_ln(read_layer_state(), false); + // oled_write_ln(read_keylog(), false); + // oled_write_ln(read_keylogs(), false); + // oled_write_ln(read_mode_icon(keymap_config.swap_lalt_lgui), false); + oled_write_ln(read_host_led_state(), false); + oled_write_ln(encoder_debug, false); + // oled_write_ln(read_timelog(), false); + } else { + oled_write(read_logo(), false); + // oled_write_ln(encoder_debug, false); + } +} +#endif //OLED_DRIVER_ENABLE + +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; +} + +void encoder_update_user(uint8_t index, bool clockwise) { + lastIndex = index; + if (clockwise) { + counter++; + tap_code(KC_PGDN); + } else { + counter--; + tap_code(KC_PGUP); + } +} diff --git a/keyboards/lily58/keymaps/chuan/rules.mk b/keyboards/lily58/keymaps/chuan/rules.mk new file mode 100644 index 000000000000..3e05cb7d920a --- /dev/null +++ b/keyboards/lily58/keymaps/chuan/rules.mk @@ -0,0 +1,11 @@ +EXTRAKEY_ENABLE = yes +NKRO_ENABLE = yes +ENCODER_ENABLE = yes +# If you want to change the display of OLED, you need to change here +SRC += ./lib/rgb_state_reader.c \ + ./lib/layer_state_reader.c \ + ./lib/logo_reader.c \ + ./lib/mode_icon_reader.c \ + ./lib/host_led_state_reader.c \ + ./lib/timelogger.c \ + ./lib/keylogger.c \ diff --git a/keyboards/lily58/keymaps/default/config.h b/keyboards/lily58/keymaps/default/config.h index 58bbdc5e9d05..6b9e52c05ee0 100644 --- a/keyboards/lily58/keymaps/default/config.h +++ b/keyboards/lily58/keymaps/default/config.h @@ -28,8 +28,6 @@ along with this program. If not, see . // #define MASTER_RIGHT // #define EE_HANDS -#define SSD1306OLED - #define USE_SERIAL_PD2 #define TAPPING_FORCE_HOLD @@ -49,4 +47,4 @@ along with this program. If not, see . #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/default/keymap.c b/keyboards/lily58/keymaps/default/keymap.c index f36248e12d33..f0fbaa8b0d2b 100644 --- a/keyboards/lily58/keymaps/default/keymap.c +++ b/keyboards/lily58/keymaps/default/keymap.c @@ -8,8 +8,6 @@ #include "ssd1306.h" #endif - - #ifdef RGBLIGHT_ENABLE //Following line allows macro to read current RGB settings extern rgblight_config_t rgblight_config; @@ -135,16 +133,18 @@ 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 +//SSD1306 OLED update loop, make sure to enable OLED_DRIVER_ENABLE=yes in rules.mk +#ifdef OLED_DRIVER_ENABLE -// When add source files to SRC in rules.mk, you can use functions. +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; +} + +// When you 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); @@ -156,42 +156,24 @@ const char *read_keylogs(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) { +void oled_task_user(void) { + if (is_keyboard_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()); + oled_write_ln(read_layer_state(), false); + oled_write_ln(read_keylog(), false); + oled_write_ln(read_keylogs(), false); + //oled_write_ln(read_mode_icon(keymap_config.swap_lalt_lgui), false); + //oled_write_ln(read_host_led_state(), false); + //oled_write_ln(read_timelog(), false); } 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; + oled_write(read_logo(), false); } } - -void iota_gfx_task_user(void) { - struct CharacterMatrix matrix; - matrix_clear(&matrix); - matrix_render_user(&matrix); - matrix_update(&display, &matrix); -} -#endif//SSD1306OLED +#endif // OLED_DRIVER_ENABLE bool process_record_user(uint16_t keycode, keyrecord_t *record) { if (record->event.pressed) { -#ifdef SSD1306OLED +#ifdef OLED_DRIVER_ENABLE set_keylog(keycode, record); #endif // set_timelog(); diff --git a/keyboards/lily58/keymaps/default/rules.mk b/keyboards/lily58/keymaps/default/rules.mk index b39305767b82..a5b6303a1e19 100644 --- a/keyboards/lily58/keymaps/default/rules.mk +++ b/keyboards/lily58/keymaps/default/rules.mk @@ -15,13 +15,13 @@ UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. SWAP_HANDS_ENABLE = no # Enable one-hand typing +OLED_DRIVER_ENABLE= yes # OLED display # 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 want to change the display of OLED, you need to change here -SRC += ./lib/glcdfont.c \ - ./lib/rgb_state_reader.c \ +SRC += ./lib/rgb_state_reader.c \ ./lib/layer_state_reader.c \ ./lib/logo_reader.c \ ./lib/keylogger.c \ diff --git a/keyboards/lily58/keymaps/yuchi/keymap.c b/keyboards/lily58/keymaps/yuchi/keymap.c index 13b6cb1687e8..d258fbcbc044 100644 --- a/keyboards/lily58/keymaps/yuchi/keymap.c +++ b/keyboards/lily58/keymaps/yuchi/keymap.c @@ -112,7 +112,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |LOWER | LGUI | Alt | /Space / \Enter \ |BackSP| RGUI |RAISE | * | | | |/ / \ \ | | | | * `----------------------------' '------''--------------------' - */ + */ [_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, \ @@ -137,14 +137,16 @@ 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 +//SSD1306 OLED update loop, make sure to enable OLED_DRIVER_ENABLE=yes in rules.mk +#ifdef OLED_DRIVER_ENABLE + +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; +} // When add source files to SRC in rules.mk, you can use functions. const char *read_layer_state(void); @@ -165,35 +167,22 @@ void matrix_scan_user(void) { 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()); + oled_write_ln(read_layer_state(), false); + oled_write_ln(read_keylog(), false); + oled_write_ln(read_keylogs(), false); + //oled_write_ln(read_mode_icon(keymap_config.swap_lalt_lgui), false); + //oled_write_ln(read_host_led_state(), false); + //oled_write_ln(read_timelog(), false); } else { - matrix_write(matrix, read_logo()); + oled_write(read_logo(), false); } } -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 +#ifdef OLED_DRIVER_ENABLE set_keylog(keycode, record); #endif // set_timelog(); @@ -236,4 +225,4 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { break; } return true; -} \ No newline at end of file +} diff --git a/keyboards/lily58/keymaps/yuchi/rules.mk b/keyboards/lily58/keymaps/yuchi/rules.mk index 922fac6b69fc..0db9ac50fa12 100644 --- a/keyboards/lily58/keymaps/yuchi/rules.mk +++ b/keyboards/lily58/keymaps/yuchi/rules.mk @@ -13,15 +13,14 @@ 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_ENABLE = yes # Enable WS2812 RGB underlight. SWAP_HANDS_ENABLE = no # Enable one-hand typing # 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 want to change the display of OLED, you need to change here -SRC += ./lib/glcdfont.c \ - ./lib/rgb_state_reader.c \ +SRC += ./lib/rgb_state_reader.c \ ./lib/layer_state_reader.c \ ./lib/logo_reader.c \ ./lib/keylogger.c \ diff --git a/keyboards/lily58/lib/glcdfont.c b/keyboards/lily58/lib/glcdfont_lily.c similarity index 99% rename from keyboards/lily58/lib/glcdfont.c rename to keyboards/lily58/lib/glcdfont_lily.c index 94f026ba971e..0aa69ea8226e 100644 --- a/keyboards/lily58/lib/glcdfont.c +++ b/keyboards/lily58/lib/glcdfont_lily.c @@ -1,6 +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. +// Modified to show the Lily58 logo instead of the qmk logo #include "progmem.h" // Standard ASCII 5x7 font diff --git a/keyboards/lily58/lib/host_led_state_reader.c b/keyboards/lily58/lib/host_led_state_reader.c index 0e22173b1d81..589dd6152ebe 100644 --- a/keyboards/lily58/lib/host_led_state_reader.c +++ b/keyboards/lily58/lib/host_led_state_reader.c @@ -1,15 +1,16 @@ #include +#include "led.h" +#include "host.h" #include "lily58.h" char host_led_state_str[24]; const char *read_host_led_state(void) { - uint8_t leds = host_keyboard_leds(); snprintf(host_led_state_str, sizeof(host_led_state_str), "NL:%s CL:%s SL:%s", - (leds & (1 << USB_LED_NUM_LOCK)) ? "on" : "- ", - (leds & (1 << USB_LED_CAPS_LOCK)) ? "on" : "- ", - (leds & (1 << USB_LED_SCROLL_LOCK)) ? "on" : "- "); + (IS_HOST_LED_ON(USB_LED_NUM_LOCK)) ? "on" : "- ", + (IS_HOST_LED_ON(USB_LED_CAPS_LOCK)) ? "on" : "- ", + (IS_HOST_LED_ON(USB_LED_SCROLL_LOCK)) ? "on" : "- "); return host_led_state_str; } diff --git a/keyboards/lily58/lib/keylogger.c b/keyboards/lily58/lib/keylogger.c index a1bd476d20b8..2fc3e663ecaa 100644 --- a/keyboards/lily58/lib/keylogger.c +++ b/keyboards/lily58/lib/keylogger.c @@ -1,4 +1,5 @@ #include +#include "action.h" #include "lily58.h" char keylog_str[24] = {}; diff --git a/keyboards/lily58/lib/layer_state_reader.c b/keyboards/lily58/lib/layer_state_reader.c index 48674b0673a2..0e9dd7039bb6 100644 --- a/keyboards/lily58/lib/layer_state_reader.c +++ b/keyboards/lily58/lib/layer_state_reader.c @@ -4,10 +4,10 @@ #include "lily58.h" #define L_BASE 0 -#define L_LOWER 2 -#define L_RAISE 4 -#define L_ADJUST 8 -#define L_ADJUST_TRI 14 +#define L_LOWER (1 << 1) +#define L_RAISE (1 << 2) +#define L_ADJUST (1 << 3) +#define L_ADJUST_TRI (L_ADJUST | L_RAISE | L_LOWER) char layer_state_str[24]; diff --git a/keyboards/lily58/lib/mode_icon_reader.c b/keyboards/lily58/lib/mode_icon_reader.c index 2bce4a71b0e1..27c6d92cd044 100644 --- a/keyboards/lily58/lib/mode_icon_reader.c +++ b/keyboards/lily58/lib/mode_icon_reader.c @@ -1,4 +1,5 @@ #include +#include #include "lily58.h" char mode_icon[24]; diff --git a/keyboards/lily58/lib/timelogger.c b/keyboards/lily58/lib/timelogger.c index bfbfbe8a2144..b00c13cb0ab2 100644 --- a/keyboards/lily58/lib/timelogger.c +++ b/keyboards/lily58/lib/timelogger.c @@ -1,4 +1,5 @@ #include +#include "timer.h" #include "lily58.h" char timelog_str[24] = {}; diff --git a/keyboards/lily58/lily58.c b/keyboards/lily58/lily58.c index eacd90a82de9..03975057f40f 100644 --- a/keyboards/lily58/lily58.c +++ b/keyboards/lily58/lily58.c @@ -1,10 +1,5 @@ #include "lily58.h" -#include "ssd1306.h" bool process_record_kb(uint16_t keycode, keyrecord_t *record) { -#ifdef SSD1306OLED - return process_record_gfx(keycode,record) && process_record_user(keycode, record); -#else return process_record_user(keycode, record); -#endif -} \ No newline at end of file +} diff --git a/keyboards/lily58/rev1/config.h b/keyboards/lily58/rev1/config.h index 4e8e3a7c9cdf..adcf11b52bca 100644 --- a/keyboards/lily58/rev1/config.h +++ b/keyboards/lily58/rev1/config.h @@ -36,8 +36,6 @@ along with this program. If not, see . #define MATRIX_ROW_PINS { C6, D7, E6, B4, B5 } #define MATRIX_COL_PINS { F6, F7, B1, B3, B2, B6 } -/* define tapping term */ -#define TAPPING_TERM 100 /* define if matrix has ghost */ //#define MATRIX_HAS_GHOST diff --git a/keyboards/lily58/rev1/rules.mk b/keyboards/lily58/rev1/rules.mk index 6028b5a5b95a..e69de29bb2d1 100644 --- a/keyboards/lily58/rev1/rules.mk +++ b/keyboards/lily58/rev1/rules.mk @@ -1,3 +0,0 @@ -SRC += rev1/matrix.c -SRC += rev1/split_util.c -SRC += rev1/split_scomm.c diff --git a/keyboards/lily58/rev1/split_scomm.c b/keyboards/lily58/rev1/split_scomm.c deleted file mode 100755 index a1fe6ba5b823..000000000000 --- a/keyboards/lily58/rev1/split_scomm.c +++ /dev/null @@ -1,91 +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\n", - serial_slave_buffer[0], serial_slave_buffer[1], - serial_slave_buffer[2], serial_slave_buffer[3]); -#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/lily58/rev1/split_scomm.h b/keyboards/lily58/rev1/split_scomm.h deleted file mode 100755 index 873d8939d81f..000000000000 --- a/keyboards/lily58/rev1/split_scomm.h +++ /dev/null @@ -1,24 +0,0 @@ -#ifndef SPLIT_COMM_H -#define SPLIT_COMM_H - -#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 - -#endif /* SPLIT_COMM_H */ diff --git a/keyboards/lily58/rev1/split_util.h b/keyboards/lily58/rev1/split_util.h deleted file mode 100755 index 687ca19bd3e5..000000000000 --- a/keyboards/lily58/rev1/split_util.h +++ /dev/null @@ -1,19 +0,0 @@ -#ifndef SPLIT_KEYBOARD_UTIL_H -#define SPLIT_KEYBOARD_UTIL_H - -#include -#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 diff --git a/keyboards/lily58/rules.mk b/keyboards/lily58/rules.mk index d413510bac1f..34b512d59a6c 100644 --- a/keyboards/lily58/rules.mk +++ b/keyboards/lily58/rules.mk @@ -29,19 +29,7 @@ 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 - -CUSTOM_MATRIX = yes - -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 +OLED_DRIVER_ENABLE = yes # OLED display +SPLIT_KEYBOARD = yes DEFAULT_FOLDER = lily58/rev1 diff --git a/keyboards/lily58/serial.h b/keyboards/lily58/serial.h deleted file mode 100755 index 7e0c0847a431..000000000000 --- a/keyboards/lily58/serial.h +++ /dev/null @@ -1,84 +0,0 @@ -#ifndef SOFT_SERIAL_H -#define SOFT_SERIAL_H - -#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 Simple API (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 flexible API (using multi-type transaction function) -// #define SERIAL_USE_MULTI_TRANSACTION -// -// ///////////////////////////////////////////////////////////////// - - -#ifndef SERIAL_USE_MULTI_TRANSACTION -/* --- USE Simple API (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 // USE Simple 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 - -#endif /* SOFT_SERIAL_H */ diff --git a/keyboards/lily58/serial_config.h b/keyboards/lily58/serial_config.h deleted file mode 100644 index 4fab8e8ddfcf..000000000000 --- a/keyboards/lily58/serial_config.h +++ /dev/null @@ -1,4 +0,0 @@ -#ifndef SOFT_SERIAL_PIN -#define SOFT_SERIAL_PIN D2 -#define SERIAL_USE_MULTI_TRANSACTION -#endif diff --git a/keyboards/lily58/ssd1306.c b/keyboards/lily58/ssd1306.c deleted file mode 100755 index 20c2738db774..000000000000 --- a/keyboards/lily58/ssd1306.c +++ /dev/null @@ -1,344 +0,0 @@ -#ifdef SSD1306OLED - -#include "ssd1306.h" -#include "i2c.h" -#include -#include "print.h" -#ifdef ADAFRUIT_BLE_ENABLE -#include "adafruit_ble.h" -#endif -#ifdef PROTOCOL_LUFA -#include "lufa.h" -#endif -#include "sendchar.h" -#include "timer.h" - -extern const unsigned char font[] PROGMEM; - -// 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 matrix_write_ln(struct CharacterMatrix *matrix, const char *data) { - char data_ln[strlen(data)+2]; - snprintf(data_ln, sizeof(data_ln), "%s\n", data); - matrix_write(matrix, data_ln); -} - -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/lily58/ssd1306.h b/keyboards/lily58/ssd1306.h deleted file mode 100755 index 0ca093093a17..000000000000 --- a/keyboards/lily58/ssd1306.h +++ /dev/null @@ -1,90 +0,0 @@ -#pragma once - -#include -#include -#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_ln(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/meira/keymaps/default/keymap.c b/keyboards/meira/keymaps/default/keymap.c index 9bcd771c4213..5c80df0f061c 100644 --- a/keyboards/meira/keymaps/default/keymap.c +++ b/keyboards/meira/keymaps/default/keymap.c @@ -187,7 +187,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { case QWERTY: if (record->event.pressed) { #ifdef AUDIO_ENABLE - PLAY_NOTE_ARRAY(tone_qwerty, false, 0); + PLAY_SONG(tone_qwerty); #endif // persistent_default_layer_set(1UL<<_QWERTY); } @@ -196,7 +196,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { case COLEMAK: if (record->event.pressed) { #ifdef AUDIO_ENABLE - PLAY_NOTE_ARRAY(tone_colemak, false, 0); + PLAY_SONG(tone_colemak); #endif // persistent_default_layer_set(1UL<<_COLEMAK); } @@ -205,7 +205,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { case DVORAK: if (record->event.pressed) { #ifdef AUDIO_ENABLE - PLAY_NOTE_ARRAY(tone_dvorak, false, 0); + PLAY_SONG(tone_dvorak); #endif // persistent_default_layer_set(1UL<<_DVORAK); } diff --git a/keyboards/meira/keymaps/grahampheath/keymap.c b/keyboards/meira/keymaps/grahampheath/keymap.c index cd02137877b9..ace172a2a404 100644 --- a/keyboards/meira/keymaps/grahampheath/keymap.c +++ b/keyboards/meira/keymaps/grahampheath/keymap.c @@ -243,7 +243,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { case QWERTY: if (record->event.pressed) { #ifdef AUDIO_ENABLE - PLAY_NOTE_ARRAY(tone_qwerty, false, 0); + PLAY_SONG(tone_qwerty); #endif } return false; @@ -251,7 +251,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { case COLEMAK: if (record->event.pressed) { #ifdef AUDIO_ENABLE - PLAY_NOTE_ARRAY(tone_colemak, false, 0); + PLAY_SONG(tone_colemak); #endif } return false; @@ -259,7 +259,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { case DVORAK: if (record->event.pressed) { #ifdef AUDIO_ENABLE - PLAY_NOTE_ARRAY(tone_dvorak, false, 0); + PLAY_SONG(tone_dvorak); #endif } return false; diff --git a/keyboards/meira/keymaps/takmiya/keymap.c b/keyboards/meira/keymaps/takmiya/keymap.c index 12dad6d69017..bf693d8ad220 100644 --- a/keyboards/meira/keymaps/takmiya/keymap.c +++ b/keyboards/meira/keymaps/takmiya/keymap.c @@ -153,7 +153,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { case QWERTY: if (record->event.pressed) { #ifdef AUDIO_ENABLE - PLAY_NOTE_ARRAY(tone_qwerty, false, 0); + PLAY_SONG(tone_qwerty); #endif // persistent_default_layer_set(1UL<<_QWERTY); } diff --git a/keyboards/meishi/keymaps/default/keymap.c b/keyboards/meishi/keymaps/default/keymap.c index 528beb168b76..ea6e42a961c8 100644 --- a/keyboards/meishi/keymaps/default/keymap.c +++ b/keyboards/meishi/keymaps/default/keymap.c @@ -21,10 +21,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), }; -const uint16_t PROGMEM fn_actions[] = { - -}; - void matrix_init_user(void) { } diff --git a/keyboards/navi10/rev3/rules.mk b/keyboards/navi10/rev3/rules.mk index b98e7eb2d659..d5a072f1617f 100644 --- a/keyboards/navi10/rev3/rules.mk +++ b/keyboards/navi10/rev3/rules.mk @@ -28,6 +28,6 @@ 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 = yes # Audio output on port C6 +AUDIO_ENABLE = no # Audio output FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches HD44780_ENABLE = no # Enable support for HD44780 based LCDs diff --git a/keyboards/nomu30/keymaps/center_sprit/keymap.c b/keyboards/nomu30/keymaps/center_sprit/keymap.c index 8ef037f42b64..cc540b891ffa 100644 --- a/keyboards/nomu30/keymaps/center_sprit/keymap.c +++ b/keyboards/nomu30/keymaps/center_sprit/keymap.c @@ -100,7 +100,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ) }; -uint16_t get_tapping_term(uint16_t keycode) { +uint16_t get_tapping_term(uint16_t keycode, keyrecord_t *record) { switch (keycode) { case KC_BSLO: return TAPPING_LAYER_TERM; diff --git a/keyboards/nomu30/keymaps/like_jis/keymap.c b/keyboards/nomu30/keymaps/like_jis/keymap.c index 203d0a7a4151..fc2d26ad7a31 100644 --- a/keyboards/nomu30/keymaps/like_jis/keymap.c +++ b/keyboards/nomu30/keymaps/like_jis/keymap.c @@ -100,7 +100,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ) }; -uint16_t get_tapping_term(uint16_t keycode) { +uint16_t get_tapping_term(uint16_t keycode, keyrecord_t *record) { switch (keycode) { case KC_BSLO: return TAPPING_LAYER_TERM; diff --git a/keyboards/omnikey_blackheart/config.h b/keyboards/omnikey_bh/config.h similarity index 100% rename from keyboards/omnikey_blackheart/config.h rename to keyboards/omnikey_bh/config.h diff --git a/keyboards/omnikey_blackheart/info.json b/keyboards/omnikey_bh/info.json similarity index 99% rename from keyboards/omnikey_blackheart/info.json rename to keyboards/omnikey_bh/info.json index 138c954b77a1..50d64e143cf6 100644 --- a/keyboards/omnikey_blackheart/info.json +++ b/keyboards/omnikey_bh/info.json @@ -1,5 +1,5 @@ { - "keyboard_name": "Omnikey Blackheart PCB", + "keyboard_name": "Omnikey BH PCB", "url": "", "maintainer": "qmk", "width": 25.5, diff --git a/keyboards/omnikey_blackheart/keymaps/default/keymap.c b/keyboards/omnikey_bh/keymaps/default/keymap.c similarity index 100% rename from keyboards/omnikey_blackheart/keymaps/default/keymap.c rename to keyboards/omnikey_bh/keymaps/default/keymap.c diff --git a/keyboards/omnikey_bh/omnikey_bh.c b/keyboards/omnikey_bh/omnikey_bh.c new file mode 100644 index 000000000000..c2f52f30c32c --- /dev/null +++ b/keyboards/omnikey_bh/omnikey_bh.c @@ -0,0 +1 @@ +#include "omnikey_bh.h" diff --git a/keyboards/omnikey_blackheart/omnikey_blackheart.h b/keyboards/omnikey_bh/omnikey_bh.h similarity index 96% rename from keyboards/omnikey_blackheart/omnikey_blackheart.h rename to keyboards/omnikey_bh/omnikey_bh.h index 5d2d948c4954..f36184f3905a 100644 --- a/keyboards/omnikey_blackheart/omnikey_blackheart.h +++ b/keyboards/omnikey_bh/omnikey_bh.h @@ -1,5 +1,4 @@ -#ifndef omnikey_blackheart -#define omnikey_blackheart +#pragma once #include "quantum.h" @@ -18,5 +17,3 @@ { K400, K401, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, K412, K413, K414, K415, K416, K417, K418, K419, K420, K421, KC_NO }, \ { K500, K501, K502, K503, K504, KC_NO, KC_NO, K507, KC_NO, KC_NO, KC_NO, KC_NO, K512, K513, K514, K515, K516, K517, K518, K519, K520, KC_NO, KC_NO } \ } - -#endif \ No newline at end of file diff --git a/keyboards/omnikey_blackheart/readme.md b/keyboards/omnikey_bh/readme.md similarity index 83% rename from keyboards/omnikey_blackheart/readme.md rename to keyboards/omnikey_bh/readme.md index 04bb49818c1d..7de22f29a451 100644 --- a/keyboards/omnikey_blackheart/readme.md +++ b/keyboards/omnikey_bh/readme.md @@ -1,14 +1,14 @@ -Omnikey Blackheart PCB +Omnikey BH PCB === A replacement PCB for Omnikey keyboards. Supports 101, 102, Plus, Ultra T, Ultra, Prime and Stellar, as well as customs. Keyboard Maintainer: QMK Community and blindassassin111 -Hardware Supported: Omnikey blackheart PCB +Hardware Supported: Omnikey BH PCB Hardware Availability: https://deskthority.net/group-buys-f50/omnikey-replacement-pcb-t18276.html Make example for this keyboard (after setting up your build environment): - make omnikey_blackheart:default + make omnikey_bh: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. diff --git a/keyboards/omnikey_blackheart/rules.mk b/keyboards/omnikey_bh/rules.mk similarity index 100% rename from keyboards/omnikey_blackheart/rules.mk rename to keyboards/omnikey_bh/rules.mk diff --git a/keyboards/omnikey_blackheart/omnikey_blackheart.c b/keyboards/omnikey_blackheart/omnikey_blackheart.c deleted file mode 100644 index e54047fa68a9..000000000000 --- a/keyboards/omnikey_blackheart/omnikey_blackheart.c +++ /dev/null @@ -1 +0,0 @@ -#include "omnikey_blackheart.h" diff --git a/keyboards/pancake/feather/readme.md b/keyboards/pancake/feather/readme.md deleted file mode 100644 index 8b137891791f..000000000000 --- a/keyboards/pancake/feather/readme.md +++ /dev/null @@ -1 +0,0 @@ - diff --git a/keyboards/pancake/keymaps/default/readme.md b/keyboards/pancake/keymaps/default/readme.md deleted file mode 100644 index 8b137891791f..000000000000 --- a/keyboards/pancake/keymaps/default/readme.md +++ /dev/null @@ -1 +0,0 @@ - diff --git a/keyboards/pancake/promicro/readme.md b/keyboards/pancake/promicro/readme.md deleted file mode 100644 index 8b137891791f..000000000000 --- a/keyboards/pancake/promicro/readme.md +++ /dev/null @@ -1 +0,0 @@ - diff --git a/keyboards/planck/keymaps/ab/keymap.c b/keyboards/planck/keymaps/ab/keymap.c index c028e7949f89..8835bfc87dbc 100644 --- a/keyboards/planck/keymaps/ab/keymap.c +++ b/keyboards/planck/keymaps/ab/keymap.c @@ -26,22 +26,12 @@ extern keymap_config_t keymap_config; // Func macro definitions. #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 -#define ZM_IN FUNC(5) // Zoom out -#define ZM_OUT FUNC(6) // Zoom in -#define EM_UNDO FUNC(7) // Emacs Undo - -// Enable these functions using FUNC(n) macro. -const uint16_t PROGMEM fn_actions[] = { - [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), - [5] = ACTION_MODS_KEY(MOD_LCTL, KC_MINS), - [6] = ACTION_MODS_KEY(MOD_LCTL, KC_PLUS), - [7] = ACTION_MODS_KEY(MOD_LCTL, KC_UNDS), - }; +#define CTL_CAPS MT(MOD_LCTL, KC_CAPS) // Tap for Caps, hold for Ctrl (DOESN'T SEEM TO WORK) +#define SFT_ENT MT(MOD_RSFT, KC_ENT) // Tap for Enter, hold for Shift +#define ZM_NRM C(KC_0) // Zoom normal +#define ZM_IN C(KC_MINS) // Zoom out +#define ZM_OUT C(KC_PLUS) // Zoom in +#define EM_UNDO C(KC_UNDS) // Emacs Undo // This config can be found at Keyboard layout editor site: http://goo.gl/zjXL2l const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { diff --git a/keyboards/planck/keymaps/angerthosenear/keymap.c b/keyboards/planck/keymaps/angerthosenear/keymap.c index 6a497641e6ba..6e9c69333e2c 100644 --- a/keyboards/planck/keymaps/angerthosenear/keymap.c +++ b/keyboards/planck/keymaps/angerthosenear/keymap.c @@ -16,21 +16,14 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), [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, DF(0), DF(1), 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, DF(0), DF(1), 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 ) }; - - -const uint16_t PROGMEM fn_actions[] = { - [3] = ACTION_DEFAULT_LAYER_SET(0), - [4] = ACTION_DEFAULT_LAYER_SET(1), - -}; diff --git a/keyboards/planck/keymaps/austin/keymap.c b/keyboards/planck/keymaps/austin/keymap.c index 16bca7951056..3461ca955199 100644 --- a/keyboards/planck/keymaps/austin/keymap.c +++ b/keyboards/planck/keymaps/austin/keymap.c @@ -12,25 +12,18 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { 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 + DF(0), 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, DF(0), DF(1), 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, DF(0), DF(1), 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 ) }; - - -const uint16_t PROGMEM fn_actions[] = { - [3] = ACTION_DEFAULT_LAYER_SET(0), - [4] = ACTION_DEFAULT_LAYER_SET(1), - -}; diff --git a/keyboards/planck/keymaps/brandon/keymap.c b/keyboards/planck/keymaps/brandon/keymap.c index ade4ea30f070..66533e53a21f 100644 --- a/keyboards/planck/keymaps/brandon/keymap.c +++ b/keyboards/planck/keymaps/brandon/keymap.c @@ -86,7 +86,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ [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), + MT(MOD_LCTL, KC_TAB), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, LT_NAVS, MT(MOD_RCTL, KC_ENT), 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 ), @@ -140,7 +140,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ [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), + MT(MOD_LCTL, KC_TAB), KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, MT(MOD_RCTL, KC_ENT), 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 ), @@ -224,12 +224,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ) }; -const uint16_t PROGMEM fn_actions[] = { - // Modifiers - [5] = ACTION_MODS_TAP_KEY(MOD_LCTL, KC_TAB), - [6] = ACTION_MODS_TAP_KEY(MOD_RCTL, KC_ENT), -}; - const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { switch(id) { diff --git a/keyboards/planck/keymaps/chance/keymap.c b/keyboards/planck/keymaps/chance/keymap.c index 23af2277bd64..46d077ddc342 100644 --- a/keyboards/planck/keymaps/chance/keymap.c +++ b/keyboards/planck/keymaps/chance/keymap.c @@ -45,7 +45,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_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_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_LCTRL,KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT ), @@ -179,10 +179,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { }; -const uint16_t PROGMEM fn_actions[] = { - [0] = ACTION_MODS_TAP_KEY(MOD_RSFT, KC_ENT), -}; - const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { // MACRODOWN only works in this function diff --git a/keyboards/planck/keymaps/charlie/keymap.c b/keyboards/planck/keymaps/charlie/keymap.c index 29d05022381c..4a3adba51331 100644 --- a/keyboards/planck/keymaps/charlie/keymap.c +++ b/keyboards/planck/keymaps/charlie/keymap.c @@ -2,52 +2,21 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [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_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, DF(1), 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 + KC_DELETE, KC_0, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, DF(0), + KC_O, KC_G, KC_S, KC_U, KC_T, C(KC_R), KC_F21, KC_F10, KC_F11, KC_F7, KC_F8, KC_F9, + KC_TAB, C(S(A(KC_F9))), C(S(KC_I)), S(KC_M), KC_F1, A(KC_BSPC), KC_F18, KC_F19, KC_F23, KC_F20, KC_F22, C(S(A(KC_F12))), + KC_COMM, KC_DOT, KC_R, C(KC_H), MO(2), KC_SPC, C(KC_S), KC_F2, C(S(A(KC_X))), 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 + [2] = LAYOUT_planck_grid( /* PHOTOSHOP */ + KC_ESC, C(KC_Z), C(KC_Y), KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, C(S(A(KC_F7))), C(S(A(KC_F8))), C(S(KC_X)), + KC_C, KC_NO, S(KC_MINS), C(S(KC_I)), KC_NO, C(S(KC_BSPC)), KC_NO, KC_NO, KC_NO, KC_NO, C(S(KC_F5)), KC_NO, + C(KC_F2), C(S(KC_F2)), C(KC_0), C(S(KC_H)), MO(2), KC_SPC, C(S(KC_S)), KC_NO, KC_NO, KC_F24, KC_NO ) }; - -const uint16_t PROGMEM fn_actions[] = { - [1] = ACTION_DEFAULT_LAYER_SET(0), // set Qwerty layout - [2] = ACTION_DEFAULT_LAYER_SET(1), // set Photoshop presets - - [4] = ACTION_MODS_KEY(MOD_LSFT | MOD_LCTL | MOD_LALT, KC_F9), // photo folder AHK - [5] = ACTION_MODS_KEY(MOD_LSFT | MOD_LCTL, KC_I), // select inverse - [6] = ACTION_MODS_KEY(MOD_LSFT, KC_M), // marquee select - [7] = ACTION_MODS_KEY(MOD_LALT, KC_BSPC), // fill - [8] = ACTION_MODS_KEY(MOD_LSFT | MOD_LCTL | MOD_LALT, KC_X), // warp - [9] = ACTION_MODS_KEY(MOD_LCTL | MOD_LALT | MOD_LSFT, KC_F12), // merge all new layer - [10] = ACTION_MODS_KEY(MOD_LCTL, KC_MINS), // zoom out - [11] = ACTION_MODS_KEY(MOD_LCTL, KC_H), // RBG sliders - [12] = ACTION_MODS_KEY(MOD_LCTL, KC_S), // save - [13] = ACTION_MODS_KEY(MOD_LSFT | MOD_LCTL, KC_F5), // layer mask from transparancy - [14] = ACTION_MODS_KEY(MOD_LCTL, KC_F2), // stroke - [15] = ACTION_MODS_KEY(MOD_LCTL | MOD_LSFT, KC_F2), // stroke layer - [16] = ACTION_MODS_KEY(MOD_LCTL, KC_0), // zoom 0 - [17] = ACTION_MODS_KEY(MOD_LSFT | MOD_LCTL, KC_H), // HSV sliders - [18] = ACTION_MODS_KEY(MOD_LCTL | MOD_LSFT, KC_S), // save as - [19] = ACTION_MODS_KEY(MOD_LSFT | MOD_LCTL | MOD_LALT, KC_F7), // gaussian blur - [20] = ACTION_MODS_KEY(MOD_LSFT | MOD_LCTL | MOD_LALT, KC_F8), // motion blur - [21] = ACTION_MODS_KEY(MOD_LSFT | MOD_LCTL, KC_X), // liquify filter - [22] = ACTION_MODS_KEY(MOD_LSFT, KC_MINS), // prev layer blending - [23] = ACTION_MODS_KEY(MOD_LSFT | MOD_LCTL, KC_BSPC), // KC_NOrmal layer blending - [24] = ACTION_MODS_KEY(MOD_LSFT, KC_EQL), // next layer blending - [25] = ACTION_MODS_KEY(MOD_LCTL, KC_Z), // step back - [26] = ACTION_MODS_KEY(MOD_LCTL, KC_Y), // step forward - [27] = ACTION_MODS_KEY(MOD_LCTL, KC_R), // rasterize - -}; diff --git a/keyboards/planck/keymaps/circuit/keymap.c b/keyboards/planck/keymaps/circuit/keymap.c index 018cff4e54d8..805ebd7fd38c 100644 --- a/keyboards/planck/keymaps/circuit/keymap.c +++ b/keyboards/planck/keymaps/circuit/keymap.c @@ -23,8 +23,8 @@ enum planck_keycodes { }; // Key code names -#define SFT_ENT FUNC(0) // Tap for enter, hold for right shift -#define LOCK FUNC(1) +#define SFT_ENT MT(MOD_RSFT, KC_ENT) // Tap for enter, hold for right shift +#define LOCK TG(_LOCKED) #define KC_PSTE KC_PASTE #ifdef TAP_DANCE_ENABLE @@ -41,12 +41,6 @@ qk_tap_dance_action_t tap_dance_actions[] = { }; #endif -// Function definitions -const uint16_t PROGMEM fn_actions[] = { - [0] = ACTION_MODS_TAP_KEY(MOD_RSFT, KC_ENT), - [1] = ACTION_LAYER_TOGGLE(_LOCKED) -}; - // Layout definitions const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { diff --git a/keyboards/planck/keymaps/david/keymap.c b/keyboards/planck/keymaps/david/keymap.c index 57aafed2a0d8..d093efe04acb 100644 --- a/keyboards/planck/keymaps/david/keymap.c +++ b/keyboards/planck/keymaps/david/keymap.c @@ -12,24 +12,18 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { 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 + DF(0), 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, DF(0), DF(1), 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, DF(0), DF(1), 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[] = { - [3] = ACTION_DEFAULT_LAYER_SET(0), - [4] = ACTION_DEFAULT_LAYER_SET(1), - -}; diff --git a/keyboards/planck/keymaps/dr_notsokind/keymap.c b/keyboards/planck/keymaps/dr_notsokind/keymap.c index a244da2e4225..1055c754f0fd 100644 --- a/keyboards/planck/keymaps/dr_notsokind/keymap.c +++ b/keyboards/planck/keymaps/dr_notsokind/keymap.c @@ -34,8 +34,8 @@ enum planck_keycodes { #include "dynamic_macro.h" // Key code names -#define SFT_ENT FUNC(0) // Tap for enter, hold for right shift -#define LOCK FUNC(1) +#define SFT_ENT MT(MOD_RSFT, KC_ENT) // Tap for enter, hold for right shift +#define LOCK TG(_LOCKED) #define KC_PSTE KC_PASTE #define ZOOM_IN LCTL(KC_EQL) #define ZOOM_OUT LCTL(KC_MINS) @@ -55,12 +55,6 @@ qk_tap_dance_action_t tap_dance_actions[] = { }; #endif -// Function definitions -const uint16_t PROGMEM fn_actions[] = { - [0] = ACTION_MODS_TAP_KEY(MOD_RSFT, KC_ENT), - [1] = ACTION_LAYER_TOGGLE(_LOCKED) -}; - // Layout definitions const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { diff --git a/keyboards/planck/keymaps/dzobert/keymap.c b/keyboards/planck/keymaps/dzobert/keymap.c index 17b1bef01930..6012c068a952 100644 --- a/keyboards/planck/keymaps/dzobert/keymap.c +++ b/keyboards/planck/keymaps/dzobert/keymap.c @@ -5,14 +5,14 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { 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 + DF(1), 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] = 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 + DF(0), 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, @@ -27,9 +27,3 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { 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[] = { - [3] = ACTION_DEFAULT_LAYER_SET(0), - [4] = ACTION_DEFAULT_LAYER_SET(1), - -}; diff --git a/keyboards/planck/keymaps/emilyh/keymap.c b/keyboards/planck/keymaps/emilyh/keymap.c index 4a8a7d0c5118..3beadd8e2db1 100644 --- a/keyboards/planck/keymaps/emilyh/keymap.c +++ b/keyboards/planck/keymaps/emilyh/keymap.c @@ -187,7 +187,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { case QWERTY: if (record->event.pressed) { #ifdef AUDIO_ENABLE - PLAY_NOTE_ARRAY(tone_qwerty, false, 0); + PLAY_SONG(tone_qwerty); #endif persistant_default_layer_set(1UL<<_QWERTY); } @@ -196,7 +196,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { case COLEMAK: if (record->event.pressed) { #ifdef AUDIO_ENABLE - PLAY_NOTE_ARRAY(tone_colemak, false, 0); + PLAY_SONG(tone_colemak); #endif persistant_default_layer_set(1UL<<_COLEMAK); } @@ -205,7 +205,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { case DVORAK: if (record->event.pressed) { #ifdef AUDIO_ENABLE - PLAY_NOTE_ARRAY(tone_dvorak, false, 0); + PLAY_SONG(tone_dvorak); #endif persistant_default_layer_set(1UL<<_DVORAK); } @@ -246,7 +246,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { if (record->event.pressed) { #ifdef AUDIO_ENABLE stop_all_notes(); - PLAY_NOTE_ARRAY(tone_plover, false, 0); + PLAY_SONG(tone_plover); #endif layer_off(_RAISE); layer_off(_LOWER); @@ -264,7 +264,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { case EXT_PLV: if (record->event.pressed) { #ifdef AUDIO_ENABLE - PLAY_NOTE_ARRAY(tone_plover_gb, false, 0); + PLAY_SONG(tone_plover_gb); #endif layer_off(_PLOVER); } @@ -285,12 +285,12 @@ void matrix_init_user(void) { void startup_user() { _delay_ms(20); // gets rid of tick - PLAY_NOTE_ARRAY(tone_startup, false, 0); + PLAY_SONG(tone_startup); } void shutdown_user() { - PLAY_NOTE_ARRAY(tone_goodbye, false, 0); + PLAY_SONG(tone_goodbye); _delay_ms(150); stop_all_notes(); } @@ -302,7 +302,7 @@ void music_on_user(void) void music_scale_user(void) { - PLAY_NOTE_ARRAY(music_scale, false, 0); + PLAY_SONG(music_scale); } #endif diff --git a/keyboards/planck/keymaps/espynn/keymap.c b/keyboards/planck/keymaps/espynn/keymap.c index 924a8c35c681..305fb6e759fd 100644 --- a/keyboards/planck/keymaps/espynn/keymap.c +++ b/keyboards/planck/keymaps/espynn/keymap.c @@ -36,21 +36,11 @@ extern keymap_config_t keymap_config; // Func macro definitions. #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 -#define ZM_IN FUNC(5) // Zoom out -#define ZM_OUT FUNC(6) // Zoom in - -// Enable these functions using FUNC(n) macro. -const uint16_t PROGMEM fn_actions[] = { - [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), - [5] = ACTION_MODS_KEY(MOD_LCTL, KC_MINS), - [6] = ACTION_MODS_KEY(MOD_LCTL, KC_PLUS), - [7] = ACTION_MODS_KEY(MOD_LCTL, KC_UNDS), - }; +#define CTL_CAPS MT(MOD_LCTL, KC_CAPS) // Tap for Caps, hold for Ctrl (DOESN'T SEEM TO WORK) +#define SFT_ENT MT(MOD_RSFT, KC_ENT) // Tap for Enter, hold for Shift +#define ZM_NRM C(KC_0) // Zoom normal +#define ZM_IN C(KC_MINS) // Zoom out +#define ZM_OUT C(KC_PLUS) // Zoom in // This config can be found at Keyboard layout editor site: https://goo.gl/cF7uIO const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { diff --git a/keyboards/planck/keymaps/ishtob/keymap.c b/keyboards/planck/keymaps/ishtob/keymap.c index e036d8a5a33c..aeb36b368791 100644 --- a/keyboards/planck/keymaps/ishtob/keymap.c +++ b/keyboards/planck/keymaps/ishtob/keymap.c @@ -198,10 +198,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { }; -const uint16_t PROGMEM fn_actions[] = { - ACTION_SWAP_HANDS_TAP_KEY(KC_SPC), -}; - #ifdef AUDIO_ENABLE float tone_startup[][2] = SONG(STARTUP_SOUND); @@ -230,7 +226,7 @@ bool process_record_keymap(uint16_t keycode, keyrecord_t *record) { case QWERTY: if (record->event.pressed) { #ifdef AUDIO_ENABLE - PLAY_NOTE_ARRAY(tone_qwerty, false, 0); + PLAY_SONG(tone_qwerty); #endif persistant_default_layer_set(1UL<<_QWERTY); } @@ -239,7 +235,7 @@ bool process_record_keymap(uint16_t keycode, keyrecord_t *record) { case COLEMAK: if (record->event.pressed) { #ifdef AUDIO_ENABLE - PLAY_NOTE_ARRAY(tone_colemak, false, 0); + PLAY_SONG(tone_colemak); #endif persistant_default_layer_set(1UL<<_COLEMAK); } @@ -248,7 +244,7 @@ bool process_record_keymap(uint16_t keycode, keyrecord_t *record) { case DVORAK: if (record->event.pressed) { #ifdef AUDIO_ENABLE - PLAY_NOTE_ARRAY(tone_dvorak, false, 0); + PLAY_SONG(tone_dvorak); #endif persistant_default_layer_set(1UL<<_DVORAK); } @@ -289,7 +285,7 @@ bool process_record_keymap(uint16_t keycode, keyrecord_t *record) { if (record->event.pressed) { #ifdef AUDIO_ENABLE stop_all_notes(); - PLAY_NOTE_ARRAY(tone_plover, false, 0); + PLAY_SONG(tone_plover); #endif layer_off(_RAISE); layer_off(_LOWER); @@ -307,7 +303,7 @@ bool process_record_keymap(uint16_t keycode, keyrecord_t *record) { case EXT_PLV: if (record->event.pressed) { #ifdef AUDIO_ENABLE - PLAY_NOTE_ARRAY(tone_plover_gb, false, 0); + PLAY_SONG(tone_plover_gb); #endif layer_off(_PLOVER); } @@ -331,12 +327,12 @@ void startup_user() rgblight_mode(RGB_MATRIX_CYCLE_ALL); #endif //RGB_matrix wait_ms(20); // gets rid of tick - PLAY_NOTE_ARRAY(tone_startup, false, 0); + PLAY_SONG(tone_startup); } void shutdown_user() { - PLAY_NOTE_ARRAY(tone_goodbye, false, 0); + PLAY_SONG(tone_goodbye); wait_ms(150); stop_all_notes(); } @@ -348,7 +344,7 @@ void music_on_user(void) void music_scale_user(void) { - PLAY_NOTE_ARRAY(music_scale, false, 0); + PLAY_SONG(music_scale); } #endif diff --git a/keyboards/planck/keymaps/joe/keymap.c b/keyboards/planck/keymaps/joe/keymap.c index b759a86cea98..49b2948e658d 100644 --- a/keyboards/planck/keymaps/joe/keymap.c +++ b/keyboards/planck/keymaps/joe/keymap.c @@ -7,25 +7,25 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [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, + MT(MOD_LSFT, KC_TAB), 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, + MT(MOD_LSFT, KC_TAB), 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 , + MT(MOD_LSFT, KC_TAB), 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, + MT(MOD_LSFT, KC_TAB), 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 */ @@ -44,21 +44,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { 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)) + DF(0), DF(1), DF(2), DF(3), MO(4), KC_TRNS, KC_TRNS, MO(5), KC_POWER, KC_WAKE, KC_SLEP, LCTL(LALT(KC_L)) ) }; -const uint16_t PROGMEM fn_actions[] = { - /* toggle layers */ - [6] = ACTION_DEFAULT_LAYER_SET(0), - [7] = ACTION_DEFAULT_LAYER_SET(1), - [8] = ACTION_DEFAULT_LAYER_SET(2), - [9] = ACTION_DEFAULT_LAYER_SET(3), - - /* tab on tap, shift on hold */ - [15] = ACTION_MODS_TAP_KEY(MOD_LSFT, KC_TAB), -}; - const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { switch (id) { diff --git a/keyboards/planck/keymaps/kyle/keymap.c b/keyboards/planck/keymaps/kyle/keymap.c index a788aa859f89..896dfe939776 100644 --- a/keyboards/planck/keymaps/kyle/keymap.c +++ b/keyboards/planck/keymaps/kyle/keymap.c @@ -12,24 +12,18 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { 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 + DF(0), 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, DF(0), DF(1), 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, DF(0), DF(1), 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[] = { - [3] = ACTION_DEFAULT_LAYER_SET(0), - [4] = ACTION_DEFAULT_LAYER_SET(1), - -}; diff --git a/keyboards/planck/keymaps/lucas/keymap.c b/keyboards/planck/keymaps/lucas/keymap.c index 9bd4b7a60b68..26ca6a5505ed 100644 --- a/keyboards/planck/keymaps/lucas/keymap.c +++ b/keyboards/planck/keymaps/lucas/keymap.c @@ -57,7 +57,7 @@ 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_NO, S(DE_AE), KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, S(DE_UE), S(DE_OE), KC_NO, TG(5), 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 @@ -105,7 +105,7 @@ 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), + MO(6), KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Z, KC_U, KC_I, KC_O, TG(5), 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 @@ -129,11 +129,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), }; -const uint16_t PROGMEM fn_actions[] = { - [4] = ACTION_LAYER_TOGGLE(5), // toggle Gaming - [5] = ACTION_MODS_TAP_KEY(KC_LSFT, KC_CAPS), //Shift on press, Caps on tap -}; - const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { switch(id) { diff --git a/keyboards/planck/keymaps/matrixman/keymap.c b/keyboards/planck/keymaps/matrixman/keymap.c index 20982a24ea2f..7525e345bb6c 100644 --- a/keyboards/planck/keymaps/matrixman/keymap.c +++ b/keyboards/planck/keymaps/matrixman/keymap.c @@ -14,7 +14,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { 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 + ,KC_LCTRL, KC_LGUI, LM(_NAV_ALT, MOD_LALT), KC_TAB, LT(_SYMB_L, KC_ESC), KC_LSFT, KC_LSFT, LT(_SYMB_R,KC_SPC), KC_BSPC, LM(_NAV_ALT, MOD_LALT), KC_RCTRL, KC_ENT ), // accessed via the left symb-layer key, includes a semicolon where the right symb-layer key was [_SYMB_L] = LAYOUT_planck_grid( @@ -53,11 +53,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ) }; -const uint16_t PROGMEM fn_actions[] = { - [0] = ACTION_LAYER_MODS(_NAV_ALT, MOD_LALT) - -}; - const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { // MACRODOWN only works in this function diff --git a/keyboards/planck/keymaps/max/keymap.c b/keyboards/planck/keymaps/max/keymap.c index 1e5d6a61c2fe..b84404e1e58e 100644 --- a/keyboards/planck/keymaps/max/keymap.c +++ b/keyboards/planck/keymaps/max/keymap.c @@ -16,20 +16,14 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), [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, DF(0), DF(1), 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, DF(0), DF(1), 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[] = { - [3] = ACTION_DEFAULT_LAYER_SET(0), - [4] = ACTION_DEFAULT_LAYER_SET(1), - -}; diff --git a/keyboards/planck/keymaps/mollat/keymap.c b/keyboards/planck/keymaps/mollat/keymap.c index 2952a0ca8fcf..f993d299b6f2 100644 --- a/keyboards/planck/keymaps/mollat/keymap.c +++ b/keyboards/planck/keymaps/mollat/keymap.c @@ -82,10 +82,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ) }; -const uint16_t PROGMEM fn_actions[] = { - [_LCTL] = ACTION_MODS_TAP_KEY(KC_LCTL, M(12)), // does not work -}; - const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { switch(id) { diff --git a/keyboards/planck/keymaps/piemod/keymap.c b/keyboards/planck/keymaps/piemod/keymap.c index 57002cc38672..d75b8bf53b15 100644 --- a/keyboards/planck/keymaps/piemod/keymap.c +++ b/keyboards/planck/keymaps/piemod/keymap.c @@ -1,13 +1,13 @@ #include QMK_KEYBOARD_H #define DVORAK 0 -#define ARROW 1 //F(1) -#define SYMBOL 2 // F(2) -#define NUMBER 3 // F(3) -#define FUNCTION 4 // F(4) -#define EMACS 5 // F(5) -#define CUSTOM_MACROS 6 // F(6) -#define MOUSE 7 // F(7) +#define ARROW 1 +#define SYMBOL 2 +#define NUMBER 3 +#define FUNCTION 4 +#define EMACS 5 +#define CUSTOM_MACROS 6 +#define MOUSE 7 #define LT_1A LT(1, KC_A) #define LT_2O LT(2, KC_O) @@ -22,7 +22,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { 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 + C(KC_LALT), 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( @@ -34,7 +34,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [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_TRNS, KC_SCOLON, KC_COLN, KC_NO, KC_LCBR, KC_RCBR, KC_DLR, KC_PERC, KC_CIRC, S(KC_SLSH), 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 ), @@ -75,31 +75,3 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), }; - - enum function_id { - TEENSY_KEY, - CUSTOM_KEY, - L_CTRL_ALT_ENT, - R_CTRL_ALT_ENT, - }; - - int CAPSLOCKED = 0; - - const uint16_t PROGMEM fn_actions[] = { - - // DVORAK 0 - // ARROW 1, F(1) - // SYMBOL 2, F(2) - // NUMBER 3, F(3) - // FUNCTION 4, F(4) - // EMACS 5, F(5) - // MACROS 6, F(6) - // MOUSE 7, F(7) - - // Special Keys - [10] = ACTION_MODS_KEY(KC_LCTRL, KC_LALT), // FN10 = Ctrl + Alt. - - // Symbols - [21] = ACTION_MODS_KEY(MOD_LSFT, KC_SLASH), // FN21 = Question mark. - - }; diff --git a/keyboards/planck/keymaps/pvc/keymap.c b/keyboards/planck/keymaps/pvc/keymap.c index 78123c44ce90..8428c2335f34 100644 --- a/keyboards/planck/keymaps/pvc/keymap.c +++ b/keyboards/planck/keymaps/pvc/keymap.c @@ -99,7 +99,7 @@ enum keyboard_macros { #define SC_CCLS LCTL(KC_F4) #define TG_NKRO MAGIC_TOGGLE_NKRO -#define OS_SHFT KC_FN0 +#define OS_SHFT OSM(MOD_RSFT) #define ________________ _______, _______ #define XXXXXXXXXXXXXXXX XXXXXXX, XXXXXXX @@ -234,10 +234,6 @@ void persistent_default_layer_set(uint16_t default_layer) default_layer_set(default_layer); } -const uint16_t PROGMEM fn_actions[] = { - [0] = ACTION_MODS_ONESHOT(MOD_RSFT), -}; - const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { diff --git a/keyboards/planck/keymaps/that_canadian/keymap.c b/keyboards/planck/keymaps/that_canadian/keymap.c index 178422cd8b9e..8974555fb964 100644 --- a/keyboards/planck/keymaps/that_canadian/keymap.c +++ b/keyboards/planck/keymaps/that_canadian/keymap.c @@ -144,7 +144,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { case QWERTY: if (record->event.pressed) { #ifdef AUDIO_ENABLE - PLAY_NOTE_ARRAY(tone_qwerty, false, 0); + PLAY_SONG(tone_qwerty); #endif persistant_default_layer_set(1UL<<_QWERTY); } @@ -185,12 +185,12 @@ void matrix_init_user(void) { void startup_user() { _delay_ms(20); // gets rid of tick - PLAY_NOTE_ARRAY(tone_startup, false, 0); + PLAY_SONG(tone_startup); } void shutdown_user() { - PLAY_NOTE_ARRAY(tone_goodbye, false, 0); + PLAY_SONG(tone_goodbye); _delay_ms(150); stop_all_notes(); } @@ -202,7 +202,7 @@ void music_on_user(void) void music_scale_user(void) { - PLAY_NOTE_ARRAY(music_scale, false, 0); + PLAY_SONG(music_scale); } #endif diff --git a/keyboards/planck/keymaps/zrichard/keymap.c b/keyboards/planck/keymaps/zrichard/keymap.c index 550117d00068..f3f60b7d1da3 100755 --- a/keyboards/planck/keymaps/zrichard/keymap.c +++ b/keyboards/planck/keymaps/zrichard/keymap.c @@ -107,7 +107,7 @@ enum { #define SC_CCLS LCTL(KC_F4) #define TG_NKRO MAGIC_TOGGLE_NKRO -#define OS_SHFT KC_FN0 +#define OS_SHFT OSM(MOD_RSFT) #define ________________ _______, _______ #define XXXXXXXXXXXXXXXX XXXXXXX, XXXXXXX @@ -243,10 +243,6 @@ void persistant_default_layer_set(uint16_t default_layer) default_layer_set(default_layer); } -const uint16_t PROGMEM fn_actions[] = { - [0] = ACTION_MODS_ONESHOT(MOD_RSFT), -}; - const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { diff --git a/keyboards/planck/rev6/config.h b/keyboards/planck/rev6/config.h index 3cea2e721e99..3fbbae027874 100644 --- a/keyboards/planck/rev6/config.h +++ b/keyboards/planck/rev6/config.h @@ -53,6 +53,7 @@ #define MUSIC_MAP #undef AUDIO_VOICES +// Note: following undef isn't really necessary on STM32, C6_AUDIO is AVR related #undef C6_AUDIO /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ diff --git a/keyboards/planck/rev6/rules.mk b/keyboards/planck/rev6/rules.mk index 49f6088c375c..d101f36d655e 100644 --- a/keyboards/planck/rev6/rules.mk +++ b/keyboards/planck/rev6/rules.mk @@ -14,7 +14,7 @@ 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 = yes # Audio output on port C6 +AUDIO_ENABLE = yes # Audio output UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. diff --git a/keyboards/preonic/keymaps/that_canadian/keymap.c b/keyboards/preonic/keymaps/that_canadian/keymap.c index bf9e89e1f2a7..d1d274f293e9 100644 --- a/keyboards/preonic/keymaps/that_canadian/keymap.c +++ b/keyboards/preonic/keymaps/that_canadian/keymap.c @@ -161,7 +161,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { case QWERTY: if (record->event.pressed) { #ifdef AUDIO_ENABLE - PLAY_NOTE_ARRAY(tone_qwerty, false, 0); + PLAY_SONG(tone_qwerty); #endif persistant_default_layer_set(1UL<<_QWERTY); } @@ -213,12 +213,12 @@ void matrix_init_user(void) { void startup_user() { _delay_ms(20); // gets rid of tick - PLAY_NOTE_ARRAY(tone_startup, false, 0); + PLAY_SONG(tone_startup); } void shutdown_user() { - PLAY_NOTE_ARRAY(tone_goodbye, false, 0); + PLAY_SONG(tone_goodbye); _delay_ms(150); stop_all_notes(); } @@ -230,7 +230,7 @@ void music_on_user(void) void music_scale_user(void) { - PLAY_NOTE_ARRAY(music_scale, false, 0); + PLAY_SONG(music_scale); } #endif diff --git a/keyboards/preonic/rev1/rules.mk b/keyboards/preonic/rev1/rules.mk index 9be496ce791b..45edfa0b0f14 100644 --- a/keyboards/preonic/rev1/rules.mk +++ b/keyboards/preonic/rev1/rules.mk @@ -23,7 +23,7 @@ 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 MIDI_ENABLE = no # MIDI controls -AUDIO_ENABLE = yes # Audio output on port C6 +AUDIO_ENABLE = yes # Audio output UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. diff --git a/keyboards/preonic/rev2/rules.mk b/keyboards/preonic/rev2/rules.mk index b98f9b52c8a3..f24c6a49b7b2 100644 --- a/keyboards/preonic/rev2/rules.mk +++ b/keyboards/preonic/rev2/rules.mk @@ -23,7 +23,7 @@ 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 MIDI_ENABLE = no # MIDI controls -AUDIO_ENABLE = yes # Audio output on port C6 +AUDIO_ENABLE = yes # Audio output UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. diff --git a/keyboards/preonic/rev3/config.h b/keyboards/preonic/rev3/config.h index b5b2ced5a72c..b7429f757a57 100644 --- a/keyboards/preonic/rev3/config.h +++ b/keyboards/preonic/rev3/config.h @@ -40,6 +40,7 @@ #define MUSIC_MAP #undef AUDIO_VOICES +// Note: following undef isn't really necessary on STM32, C6_AUDIO is AVR related #undef C6_AUDIO /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ diff --git a/keyboards/preonic/rev3/rules.mk b/keyboards/preonic/rev3/rules.mk index 4c5d2f2ffecd..a5fc16a2e57e 100644 --- a/keyboards/preonic/rev3/rules.mk +++ b/keyboards/preonic/rev3/rules.mk @@ -14,7 +14,7 @@ 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 = yes # Audio output on port C6 +AUDIO_ENABLE = yes # Audio output UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. diff --git a/keyboards/rgbkb/zen/rev1/keymaps/default/keymap.c b/keyboards/rgbkb/zen/rev1/keymaps/default/keymap.c index 23c4168f2bc4..4516f62e8ddf 100644 --- a/keyboards/rgbkb/zen/rev1/keymaps/default/keymap.c +++ b/keyboards/rgbkb/zen/rev1/keymaps/default/keymap.c @@ -78,7 +78,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { case QWERTY: if (record->event.pressed) { #ifdef AUDIO_ENABLE - PLAY_NOTE_ARRAY(tone_qwerty, false, 0); + PLAY_SONG(tone_qwerty); #endif persistant_default_layer_set(1UL<<_QWERTY); } @@ -87,7 +87,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { //case COLEMAK: //if (record->event.pressed) { //#ifdef AUDIO_ENABLE - //PLAY_NOTE_ARRAY(tone_colemak, false, 0); + //PLAY_SONG(tone_colemak); //#endif //persistant_default_layer_set(1UL<<_COLEMAK); //} diff --git a/keyboards/rgbkb/zen/rev1/keymaps/jwlawrence/keymap.c b/keyboards/rgbkb/zen/rev1/keymaps/jwlawrence/keymap.c index 13edd0db8da8..bca4684dc5ac 100644 --- a/keyboards/rgbkb/zen/rev1/keymaps/jwlawrence/keymap.c +++ b/keyboards/rgbkb/zen/rev1/keymaps/jwlawrence/keymap.c @@ -77,7 +77,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { case QWERTY: if (record->event.pressed) { #ifdef AUDIO_ENABLE - PLAY_NOTE_ARRAY(tone_qwerty, false, 0); + PLAY_SONG(tone_qwerty); #endif persistant_default_layer_set(1UL<<_QWERTY); } @@ -86,7 +86,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { //case COLEMAK: //if (record->event.pressed) { //#ifdef AUDIO_ENABLE - //PLAY_NOTE_ARRAY(tone_colemak, false, 0); + //PLAY_SONG(tone_colemak); //#endif //persistant_default_layer_set(1UL<<_COLEMAK); //} diff --git a/keyboards/scarletbandana/rules.mk b/keyboards/scarletbandana/rules.mk index ff2b9a258cee..32ff3a078bf8 100644 --- a/keyboards/scarletbandana/rules.mk +++ b/keyboards/scarletbandana/rules.mk @@ -26,7 +26,7 @@ NKRO_ENABLE = no # USB Nkey Rollover 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 +AUDIO_ENABLE = yes # Audio output RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. Do not enable this with audio at the same time. FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality, also set ISSI_ENABLE below for Miera diff --git a/keyboards/sck/neiso/rules.mk b/keyboards/sck/neiso/rules.mk index 221054879c6d..990edc9df2fb 100644 --- a/keyboards/sck/neiso/rules.mk +++ b/keyboards/sck/neiso/rules.mk @@ -28,6 +28,6 @@ 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 = yes # Audio output on port C6 +AUDIO_ENABLE = no # Audio output FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches HD44780_ENABLE = no # Enable support for HD44780 based LCDs diff --git a/keyboards/sentraq/s60_x/keymaps/ansi_qwertz/keymap.c b/keyboards/sentraq/s60_x/keymaps/ansi_qwertz/keymap.c index cfeda0a245d5..2bfe82977c73 100644 --- a/keyboards/sentraq/s60_x/keymaps/ansi_qwertz/keymap.c +++ b/keyboards/sentraq/s60_x/keymaps/ansi_qwertz/keymap.c @@ -29,14 +29,12 @@ along with this program. If not, see . //Function //Mute microphone #define KC_SPACEFN LT(2, KC_SPACE) -#define KC_OSLS KC_FN3 -#define KC_GMLK KC_FN1 +#define KC_OSLS OSM(MOD_LSFT) +#define KC_GMLK TG(1) #define KC_FUNC MO(2) #define MICMUTE RCTL(KC_LCTL) enum function_codes { - F_OSLS = 3, - F_GMLK = 1, }; enum layer_names { @@ -146,14 +144,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), }; -/* -* Fn action definition -*/ -const uint16_t PROGMEM fn_actions[] = { - [F_GMLK] = ACTION_LAYER_TOGGLE(1), // Disable SpaceFn and Oneshot Shift - [F_OSLS] = ACTION_MODS_ONESHOT(MOD_LSFT) // Oneshot Leftshift -}; - void matrix_init_user(void) { } diff --git a/keyboards/sentraq/s60_x/keymaps/hasu/keymap.c b/keyboards/sentraq/s60_x/keymaps/hasu/keymap.c index c72c37d9d305..cba307ba495c 100644 --- a/keyboards/sentraq/s60_x/keymaps/hasu/keymap.c +++ b/keyboards/sentraq/s60_x/keymaps/hasu/keymap.c @@ -7,6 +7,13 @@ #define KC_LT5 LT(5, KC_SLSH) #define KC_LT6 LT(6, KC_SCLN) +#define KC_MTRS MT(MOD_RSFT, KC_GRV) + +#define KC_DF0 DF(0) +#define KC_DF1 DF(1) +#define KC_DF2 DF(2) +#define KC_DF3 DF(3) + /* * Hasu */ @@ -28,7 +35,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { 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, LT6, QUOT, NO, ENT, \ - LSFT, NO, Z, X, C, V, B, N, M, COMM, DOT, LT5, NO, FN9, NO, \ + LSFT, NO, Z, X, C, V, B, N, M, COMM, DOT, LT5, NO, MTRS, NO, \ LCTL, LGUI, LALT, SPC, RALT, MO6, MO6, MO4), /* Keymap 1: colemak ┌─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┐ @@ -165,20 +172,9 @@ Lw: set Workman layout */ LAYOUT_kc( - FN5, FN6, FN7, FN8, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, \ - TRNS, FN5, FN8, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, \ - TRNS, TRNS, TRNS, FN7, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, \ - TRNS, TRNS, TRNS, TRNS, FN6, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, \ + DF0, DF1, DF2, DF3, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, \ + TRNS, DF0, DF3, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, \ + TRNS, TRNS, TRNS, DF2, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, \ + TRNS, TRNS, TRNS, TRNS, DF1, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, \ TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS), }; - -/* - * Fn action definition - */ -const uint16_t PROGMEM fn_actions[] = { - [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 - [8] = ACTION_DEFAULT_LAYER_SET(3), // set workman layout - [9] = ACTION_MODS_TAP_KEY(MOD_RSFT, KC_GRV), -}; diff --git a/keyboards/sentraq/s60_x/keymaps/jpec/keymap.c b/keyboards/sentraq/s60_x/keymaps/jpec/keymap.c index 014554019819..24182ad20a37 100644 --- a/keyboards/sentraq/s60_x/keymaps/jpec/keymap.c +++ b/keyboards/sentraq/s60_x/keymaps/jpec/keymap.c @@ -18,6 +18,9 @@ along with this program. If not, see . #define KC_MO1 MO(1) #define KC_SPFN LT(1, KC_SPC) +#define KC_SDEL S(KC_DEL) +#define KC_CINS C(KC_INS) +#define KC_SINS S(KC_INS) const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Layout 0: Default Layer @@ -57,20 +60,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ESC, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, TRNS, DEL, \ TRNS, MPRV, MPLY, MNXT, MSTP, TRNS, TRNS, PGUP, UP, PGDN, TRNS, SLCK, PAUS, INS, \ TRNS, VOLD, MUTE, VOLU, TRNS, TRNS, HOME, LEFT, DOWN, RGHT, END, TRNS, TRNS, PENT, \ - TRNS, TRNS, PSCR, FN2, FN3, FN4, CALC, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, CAPS, TRNS, \ + TRNS, TRNS, PSCR, SDEL, CINS, SINS, CALC, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, CAPS, TRNS, \ TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS), }; -/* -* Fn action definition -*/ -const uint16_t PROGMEM fn_actions[] = { - [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 */ -}; - - void matrix_init_user(void) { } diff --git a/keyboards/sentraq/s60_x/keymaps/poker/keymap.c b/keyboards/sentraq/s60_x/keymaps/poker/keymap.c index 3b38ed501b89..6286f2437179 100644 --- a/keyboards/sentraq/s60_x/keymaps/poker/keymap.c +++ b/keyboards/sentraq/s60_x/keymaps/poker/keymap.c @@ -3,6 +3,16 @@ #define KC_MO6 MO(6) #define KC_MO7 MO(7) +#define KC_DF0 DF(0) +#define KC_DF1 DF(1) +#define KC_DF2 DF(2) +#define KC_DF3 DF(3) + +#define KC_TG4 TG(4) +#define KC_TG5 TG(5) + +#define KC_CSES C(S(KC_ESC)) + const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* 0: qwerty ┌─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┐ @@ -139,10 +149,10 @@ FnS: toggle Arrow overlay */ LAYOUT_kc( ESC, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, TRNS, TRNS, \ - TRNS, FN2, UP, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, CALC, TRNS, HOME, INS, MO7, \ - TRNS, LEFT, DOWN, RGHT, TRNS, TRNS, PSCR, SLCK, PAUS, TRNS, FN3, END, TRNS, TRNS, \ + TRNS, TG5, UP, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, CALC, TRNS, HOME, INS, MO7, \ + TRNS, LEFT, DOWN, RGHT, TRNS, TRNS, PSCR, SLCK, PAUS, TRNS, CSES, END, TRNS, TRNS, \ TRNS, TRNS, DEL, TRNS, WHOM, MUTE, VOLU, VOLD, TRNS, PGUP, PGDN, DEL, TRNS, TRNS, TRNS, \ - TRNS, TRNS, TRNS, FN1, TRNS, TRNS, TRNS, TRNS), + TRNS, TRNS, TRNS, TG4, TRNS, TRNS, TRNS, TRNS), /* 7: Layout selector ┌─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┐ │ Lq │ Lc │ Ld │ Lw │ │ │ │ │ │ │ │ │ │▒▒▒▒▒│ │ @@ -163,19 +173,9 @@ Lw: set Workman layout */ LAYOUT_kc( - FN5, FN6, FN7, FN8, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, \ - TRNS, FN5, FN8, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, \ - TRNS, TRNS, TRNS, FN7, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, \ - TRNS, TRNS, TRNS, TRNS, FN6, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, \ + DF0, DF1, DF2, DF3, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, \ + TRNS, DF0, DF3, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, \ + TRNS, TRNS, TRNS, DF2, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, \ + TRNS, TRNS, TRNS, TRNS, DF1, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, \ TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS), }; -const uint16_t PROGMEM fn_actions[] = { - /* Poker Layout */ - [1] = ACTION_LAYER_TOGGLE(4), // toggle arrow overlay - [2] = ACTION_LAYER_TOGGLE(5), // toggle Esc overlay - [3] = ACTION_MODS_KEY(MOD_RCTL|MOD_RSFT, KC_ESC), // Task(RControl,RShift+Esc) - [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 - [8] = ACTION_DEFAULT_LAYER_SET(3), // set workman layout -}; diff --git a/keyboards/sentraq/s60_x/keymaps/poker_bit/keymap.c b/keyboards/sentraq/s60_x/keymaps/poker_bit/keymap.c index d66cc93c3aec..a4ab412ee2b8 100644 --- a/keyboards/sentraq/s60_x/keymaps/poker_bit/keymap.c +++ b/keyboards/sentraq/s60_x/keymaps/poker_bit/keymap.c @@ -1,5 +1,9 @@ #include QMK_KEYBOARD_H +#define KC_TG5 TG(5) +#define KC_TG6 TG(6) +#define KC_CSES C(S(KC_ESC)) + // Poker fix with toggle and bit operation // Fn + Esc = ` // Fn + {left, down, up, right} = {home, pgdown, pgup, end} @@ -38,10 +42,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ [4] = LAYOUT_kc( TRNS, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, TRNS, TRNS, \ - CAPS, FN2, UP, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, CALC, TRNS, HOME, INS, TRNS, \ - TRNS, LEFT, DOWN, RGHT, TRNS, TRNS, PSCR, SLCK, PAUS, TRNS, FN4, END, TRNS, TRNS, \ + CAPS, TG6, UP, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, CALC, TRNS, HOME, INS, TRNS, \ + TRNS, LEFT, DOWN, RGHT, TRNS, TRNS, PSCR, SLCK, PAUS, TRNS, CSES, END, TRNS, TRNS, \ TRNS, TRNS, DEL, TRNS, WHOM, MUTE, VOLU, VOLD, TRNS, PGUP, PGDN, DEL, TRNS, TRNS, TRNS, \ - TRNS, TRNS, TRNS, FN1, TRNS, TRNS, TRNS, TRNS), + TRNS, TRNS, TRNS, TG5, TRNS, TRNS, TRNS, TRNS), /* 5: Poker with Arrow ┌─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┐ │ │ │ │ │ │ │ │ │ │ │ │ │ │▒▒▒▒▒│ │ @@ -103,8 +107,5 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { const uint16_t PROGMEM fn_actions[] = { /* Poker Layout */ [0] = ACTION_LAYER_BIT_XOR(1, 0b0101, ON_BOTH), // Poker Fn(with fix for Esc) - [1] = ACTION_LAYER_TOGGLE(5), // Poker Arrow toggle - [2] = ACTION_LAYER_TOGGLE(6), // Poker Esc toggle [3] = ACTION_LAYER_BIT_XOR(1, 0b1101, ON_BOTH), // Poker Fn(with fix for Arrow) - [4] = ACTION_MODS_KEY(MOD_RCTL|MOD_RSFT, KC_ESC), // FN3 Task(RControl,RShift+Esc) }; diff --git a/keyboards/sentraq/s60_x/keymaps/poker_set/keymap.c b/keyboards/sentraq/s60_x/keymaps/poker_set/keymap.c index 3f639246795c..64678cd56ca8 100644 --- a/keyboards/sentraq/s60_x/keymaps/poker_set/keymap.c +++ b/keyboards/sentraq/s60_x/keymaps/poker_set/keymap.c @@ -1,5 +1,7 @@ #include QMK_KEYBOARD_H +#define KC_CSES C(S(KC_ESC)) + // Poker fix with set(state transition) // Fn + Esc = ` // Fn + {left, down, up, right} = {home, pgdown, pgup, end} @@ -96,7 +98,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { LAYOUT_kc( ESC, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, TRNS, TRNS, \ TRNS, FN6, UP, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, CALC, TRNS, HOME, INS, TRNS, \ - TRNS, LEFT, DOWN, RGHT, TRNS, TRNS, PSCR, SLCK, PAUS, TRNS, FN8, END, TRNS, TRNS, \ + TRNS, LEFT, DOWN, RGHT, TRNS, TRNS, PSCR, SLCK, PAUS, TRNS, CSES, END, TRNS, TRNS, \ TRNS, TRNS, DEL, TRNS, WHOM, MUTE, VOLU, VOLD, TRNS, PGUP, PGDN, DEL, TRNS, TRNS, TRNS, \ TRNS, TRNS, TRNS, FN5, FN4, TRNS, TRNS, TRNS), /* 5: Poker Fn'd arrow @@ -115,7 +117,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { LAYOUT_kc( ESC, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, TRNS, TRNS, \ TRNS, FN7, UP, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, CALC, TRNS, HOME, INS, TRNS, \ - TRNS, LEFT, DOWN, RGHT, TRNS, TRNS, PSCR, SLCK, PAUS, TRNS, FN8, END, TRNS, TRNS, \ + TRNS, LEFT, DOWN, RGHT, TRNS, TRNS, PSCR, SLCK, PAUS, TRNS, CSES, END, TRNS, TRNS, \ TRNS, TRNS, DEL, TRNS, WHOM, MUTE, VOLU, VOLD, TRNS, PGUP, PGDN, DEL, TRNS, PGUP, TRNS, \ TRNS, TRNS, TRNS, FN4, FN5, HOME, PGDN, END), /* 6: Poker Fn'd Esc @@ -134,7 +136,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { LAYOUT_kc( GRV, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, TRNS, TRNS, \ TRNS, FN4, UP, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, CALC, TRNS, HOME, INS, TRNS, \ - TRNS, LEFT, DOWN, RGHT, TRNS, TRNS, PSCR, SLCK, PAUS, TRNS, FN8, END, TRNS, TRNS, \ + TRNS, LEFT, DOWN, RGHT, TRNS, TRNS, PSCR, SLCK, PAUS, TRNS, CSES, END, TRNS, TRNS, \ TRNS, TRNS, DEL, TRNS, WHOM, MUTE, VOLU, VOLD, TRNS, PGUP, PGDN, DEL, TRNS, TRNS, TRNS, \ TRNS, TRNS, TRNS, FN7, FN6, TRNS, TRNS, TRNS), /* 7: Poker Fn'd Arrow + Esc @@ -153,7 +155,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { LAYOUT_kc( GRV, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, TRNS, TRNS, \ TRNS, FN5, UP, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, CALC, TRNS, HOME, INS, TRNS, \ - TRNS, LEFT, DOWN, RGHT, TRNS, TRNS, PSCR, SLCK, PAUS, TRNS, FN8, END, TRNS, TRNS, \ + TRNS, LEFT, DOWN, RGHT, TRNS, TRNS, PSCR, SLCK, PAUS, TRNS, CSES, END, TRNS, TRNS, \ TRNS, TRNS, DEL, TRNS, WHOM, MUTE, VOLU, VOLD, TRNS, PGUP, PGDN, DEL, TRNS, PGUP, TRNS, \ TRNS, TRNS, TRNS, FN6, FN7, HOME, PGDN, END), }; @@ -173,6 +175,4 @@ const uint16_t PROGMEM fn_actions[] = { [5] = ACTION_LAYER_SET(1, ON_RELEASE), // FN5 move to arrow when release [6] = ACTION_LAYER_SET(2, ON_RELEASE), // FN6 move to Esc when release [7] = ACTION_LAYER_SET(3, ON_RELEASE), // FN7 move to arrow + Esc when release - - [8] = ACTION_MODS_KEY(MOD_RCTL|MOD_RSFT, KC_ESC), // FN8 Task(RControl,RShift+Esc) }; diff --git a/keyboards/sentraq/s60_x/keymaps/spacefn/keymap.c b/keyboards/sentraq/s60_x/keymaps/spacefn/keymap.c index ee7ec6cd6875..6ef273d1e317 100644 --- a/keyboards/sentraq/s60_x/keymaps/spacefn/keymap.c +++ b/keyboards/sentraq/s60_x/keymaps/spacefn/keymap.c @@ -44,13 +44,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { GRV, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, TRNS, DEL, \ TRNS, TRNS, TRNS, ESC, TRNS, TRNS, TRNS, HOME, UP, END, PSCR, SLCK, PAUS, INS, \ TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, PGUP, LEFT, DOWN, RGHT, TRNS, TRNS, TRNS, TRNS, \ - TRNS, TRNS, TRNS, TRNS, TRNS, SPC, PGDN, GRV, FN1, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, \ + TRNS, TRNS, TRNS, TRNS, TRNS, SPC, PGDN, GRV, TILD, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, \ TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS), }; - -/* - * Fn action definition - */ -const uint16_t PROGMEM fn_actions[] = { - [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 d5b4937aa591..8e1496bc9c11 100644 --- a/keyboards/sentraq/s65_x/keymaps/kelorean/keymap.c +++ b/keyboards/sentraq/s65_x/keymaps/kelorean/keymap.c @@ -112,9 +112,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_FL] = LAYOUT_65_ansi( 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, _______, _______, \ - _______, F(3), KC_UP, _______, _______, _______, _______, _______, KC_PGUP, KC_PGDN, KC_PSCR, KC_SLCK, KC_PAUS, _______, _______, \ + _______, TG(_AL), KC_UP, _______, _______, _______, _______, _______, KC_PGUP, KC_PGDN, KC_PSCR, KC_SLCK, KC_PAUS, _______, _______, \ _______, KC_LEFT, KC_DOWN, KC_RIGHT, _______, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT, _______, _______, _______, _______, \ - _______, F(5), _______, F(1), F(2), _______, _______, _______, KC_HOME, KC_END, _______, _______, KC_VOLU, _______, \ + _______, TG(_UL), _______, TG(_CM), TG(_DV), _______, _______, _______, KC_HOME, KC_END, _______, _______, KC_VOLU, _______, \ _______, _______, _______, _______, _______, _______, _______, KC_MUTE, KC_VOLD, KC_MPLY), /* 5: Locking layer for controlling the underglow @@ -138,11 +138,3 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { _______, _______, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, _______, _______, _______, _______, _______, _______, \ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______), }; - -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 - [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 093070cb4b8c..8589a797fe64 100644 --- a/keyboards/sentraq/s65_x/keymaps/nall/keymap.c +++ b/keyboards/sentraq/s65_x/keymaps/nall/keymap.c @@ -66,9 +66,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_FL] = LAYOUT_65_ansi( 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, F(1), KC_UP, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PGUP, KC_PGDN, KC_PSCR, KC_SLCK, KC_PAUS, KC_TRNS, KC_TRNS, \ + KC_TRNS, TG(_AL), KC_UP, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PGUP, KC_PGDN, KC_PSCR, KC_SLCK, KC_PAUS, KC_TRNS, KC_TRNS, \ KC_TRNS, KC_LEFT, KC_DOWN, KC_RIGHT, KC_TRNS, KC_TRNS, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ - KC_TRNS, F(3), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_END, KC_TRNS, KC_TRNS, KC_VOLU, KC_TRNS, \ + KC_TRNS, TG(_UL), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_END, KC_TRNS, KC_TRNS, KC_VOLU, KC_TRNS, \ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MUTE, KC_VOLD, KC_MPLY), /* 3: Locking layer for controlling the underglow @@ -92,9 +92,3 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TRNS, KC_TRNS, 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, KC_TRNS), }; - -const uint16_t PROGMEM fn_actions[] = { - [1] = ACTION_LAYER_TOGGLE(_AL), // Toggle Arrow Layer overlay - [3] = ACTION_LAYER_TOGGLE(_UL), // Toggle Underglow Layer overlay -}; - diff --git a/keyboards/2_milk/2_milk.c b/keyboards/spaceman/2_milk/2_milk.c similarity index 100% rename from keyboards/2_milk/2_milk.c rename to keyboards/spaceman/2_milk/2_milk.c diff --git a/keyboards/2_milk/2_milk.h b/keyboards/spaceman/2_milk/2_milk.h similarity index 100% rename from keyboards/2_milk/2_milk.h rename to keyboards/spaceman/2_milk/2_milk.h diff --git a/keyboards/2_milk/config.h b/keyboards/spaceman/2_milk/config.h similarity index 97% rename from keyboards/2_milk/config.h rename to keyboards/spaceman/2_milk/config.h index e9a104117b19..49211535d02a 100644 --- a/keyboards/2_milk/config.h +++ b/keyboards/spaceman/2_milk/config.h @@ -20,7 +20,7 @@ #define VENDOR_ID 0xFEED #define PRODUCT_ID 0xB195 #define DEVICE_VER 0x0001 -#define MANUFACTURER rionlion100 +#define MANUFACTURER Spaceman #define PRODUCT 2% Milk #define DESCRIPTION A milk themed 2% Keyboard diff --git a/keyboards/2_milk/info.json b/keyboards/spaceman/2_milk/info.json similarity index 84% rename from keyboards/2_milk/info.json rename to keyboards/spaceman/2_milk/info.json index 6dc4eeaf8bfb..6c2bd78b2823 100644 --- a/keyboards/2_milk/info.json +++ b/keyboards/spaceman/2_milk/info.json @@ -2,7 +2,7 @@ "keyboard_name": "2% Milk", "keyboard_folder": "2_milk", "url": "", - "maintainer": "rionlion100 (Spaceman)", + "maintainer": "Spaceman", "width": 1, "height": 2, "layouts": { diff --git a/keyboards/2_milk/keymaps/binary/keymap.c b/keyboards/spaceman/2_milk/keymaps/binary/keymap.c similarity index 100% rename from keyboards/2_milk/keymaps/binary/keymap.c rename to keyboards/spaceman/2_milk/keymaps/binary/keymap.c diff --git a/keyboards/2_milk/keymaps/binary/readme.md b/keyboards/spaceman/2_milk/keymaps/binary/readme.md similarity index 100% rename from keyboards/2_milk/keymaps/binary/readme.md rename to keyboards/spaceman/2_milk/keymaps/binary/readme.md diff --git a/keyboards/2_milk/keymaps/copypasta/keymap.c b/keyboards/spaceman/2_milk/keymaps/copypasta/keymap.c similarity index 100% rename from keyboards/2_milk/keymaps/copypasta/keymap.c rename to keyboards/spaceman/2_milk/keymaps/copypasta/keymap.c diff --git a/keyboards/2_milk/keymaps/copypasta/readme.md b/keyboards/spaceman/2_milk/keymaps/copypasta/readme.md similarity index 100% rename from keyboards/2_milk/keymaps/copypasta/readme.md rename to keyboards/spaceman/2_milk/keymaps/copypasta/readme.md diff --git a/keyboards/2_milk/keymaps/default/keymap.c b/keyboards/spaceman/2_milk/keymaps/default/keymap.c similarity index 100% rename from keyboards/2_milk/keymaps/default/keymap.c rename to keyboards/spaceman/2_milk/keymaps/default/keymap.c diff --git a/keyboards/2_milk/keymaps/default/readme.md b/keyboards/spaceman/2_milk/keymaps/default/readme.md similarity index 100% rename from keyboards/2_milk/keymaps/default/readme.md rename to keyboards/spaceman/2_milk/keymaps/default/readme.md diff --git a/keyboards/2_milk/keymaps/emoji/config.h b/keyboards/spaceman/2_milk/keymaps/emoji/config.h similarity index 100% rename from keyboards/2_milk/keymaps/emoji/config.h rename to keyboards/spaceman/2_milk/keymaps/emoji/config.h diff --git a/keyboards/2_milk/keymaps/emoji/keymap.c b/keyboards/spaceman/2_milk/keymaps/emoji/keymap.c similarity index 100% rename from keyboards/2_milk/keymaps/emoji/keymap.c rename to keyboards/spaceman/2_milk/keymaps/emoji/keymap.c diff --git a/keyboards/2_milk/keymaps/emoji/readme.md b/keyboards/spaceman/2_milk/keymaps/emoji/readme.md similarity index 100% rename from keyboards/2_milk/keymaps/emoji/readme.md rename to keyboards/spaceman/2_milk/keymaps/emoji/readme.md diff --git a/keyboards/2_milk/keymaps/emoji/rules.mk b/keyboards/spaceman/2_milk/keymaps/emoji/rules.mk similarity index 100% rename from keyboards/2_milk/keymaps/emoji/rules.mk rename to keyboards/spaceman/2_milk/keymaps/emoji/rules.mk diff --git a/keyboards/2_milk/keymaps/excessbread/keymap.c b/keyboards/spaceman/2_milk/keymaps/excessbread/keymap.c similarity index 100% rename from keyboards/2_milk/keymaps/excessbread/keymap.c rename to keyboards/spaceman/2_milk/keymaps/excessbread/keymap.c diff --git a/keyboards/2_milk/keymaps/excessbread/readme.md b/keyboards/spaceman/2_milk/keymaps/excessbread/readme.md similarity index 100% rename from keyboards/2_milk/keymaps/excessbread/readme.md rename to keyboards/spaceman/2_milk/keymaps/excessbread/readme.md diff --git a/keyboards/2_milk/keymaps/mikethetiger/keymap.c b/keyboards/spaceman/2_milk/keymaps/mikethetiger/keymap.c similarity index 100% rename from keyboards/2_milk/keymaps/mikethetiger/keymap.c rename to keyboards/spaceman/2_milk/keymaps/mikethetiger/keymap.c diff --git a/keyboards/2_milk/keymaps/mikethetiger/readme.md b/keyboards/spaceman/2_milk/keymaps/mikethetiger/readme.md similarity index 100% rename from keyboards/2_milk/keymaps/mikethetiger/readme.md rename to keyboards/spaceman/2_milk/keymaps/mikethetiger/readme.md diff --git a/keyboards/2_milk/keymaps/mikethetiger/rules.mk b/keyboards/spaceman/2_milk/keymaps/mikethetiger/rules.mk similarity index 100% rename from keyboards/2_milk/keymaps/mikethetiger/rules.mk rename to keyboards/spaceman/2_milk/keymaps/mikethetiger/rules.mk diff --git a/keyboards/2_milk/keymaps/mouse/keymap.c b/keyboards/spaceman/2_milk/keymaps/mouse/keymap.c similarity index 100% rename from keyboards/2_milk/keymaps/mouse/keymap.c rename to keyboards/spaceman/2_milk/keymaps/mouse/keymap.c diff --git a/keyboards/2_milk/keymaps/mouse/readme.md b/keyboards/spaceman/2_milk/keymaps/mouse/readme.md similarity index 100% rename from keyboards/2_milk/keymaps/mouse/readme.md rename to keyboards/spaceman/2_milk/keymaps/mouse/readme.md diff --git a/keyboards/2_milk/readme.md b/keyboards/spaceman/2_milk/readme.md similarity index 70% rename from keyboards/2_milk/readme.md rename to keyboards/spaceman/2_milk/readme.md index f3a85458cedd..6745aa65c8e4 100644 --- a/keyboards/2_milk/readme.md +++ b/keyboards/spaceman/2_milk/readme.md @@ -4,12 +4,12 @@ A 2% Meme board themed around a milk carton -Keyboard Maintainer: Spaceman AKA:[Rionlion100](https://github.com/rionlion100) -Hardware Availability: [Open Source](https://github.com/Rionlion100/Spaceboards/tree/master/Keyboards/2%25%20Milk) +Keyboard Maintainer: [Spaceman](https://github.com/Spaceman) +Hardware Availability: [Open Source](https://github.com/Spaceman/Spaceboards/tree/master/Keyboards/2%25%20Milk) Make example for this keyboard (after setting up your build environment): - make 2_milk:default + make spaceman/2_milk: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/2_milk/rules.mk b/keyboards/spaceman/2_milk/rules.mk similarity index 100% rename from keyboards/2_milk/rules.mk rename to keyboards/spaceman/2_milk/rules.mk diff --git a/keyboards/pancake/config.h b/keyboards/spaceman/pancake/config.h similarity index 100% rename from keyboards/pancake/config.h rename to keyboards/spaceman/pancake/config.h diff --git a/keyboards/pancake/feather/config.h b/keyboards/spaceman/pancake/feather/config.h similarity index 100% rename from keyboards/pancake/feather/config.h rename to keyboards/spaceman/pancake/feather/config.h diff --git a/keyboards/pancake/feather/rules.mk b/keyboards/spaceman/pancake/feather/rules.mk similarity index 100% rename from keyboards/pancake/feather/rules.mk rename to keyboards/spaceman/pancake/feather/rules.mk diff --git a/keyboards/pancake/info.json b/keyboards/spaceman/pancake/info.json similarity index 98% rename from keyboards/pancake/info.json rename to keyboards/spaceman/pancake/info.json index 6d2b2a9bb407..9a21f09e18bf 100644 --- a/keyboards/pancake/info.json +++ b/keyboards/spaceman/pancake/info.json @@ -2,7 +2,7 @@ "keyboard_name": "Pancake", "keyboard_folder": "Pancake", "url": "", - "maintainer": "rionlion100 (Spaceman)", + "maintainer": "Spaceman", "width": 12, "height": 4, "layouts": { diff --git a/keyboards/pancake/keymaps/default/keymap.c b/keyboards/spaceman/pancake/keymaps/default/keymap.c similarity index 100% rename from keyboards/pancake/keymaps/default/keymap.c rename to keyboards/spaceman/pancake/keymaps/default/keymap.c diff --git a/keyboards/spaceman/pancake/keymaps/default/readme.md b/keyboards/spaceman/pancake/keymaps/default/readme.md new file mode 100644 index 000000000000..7eb8cc6d8d69 --- /dev/null +++ b/keyboards/spaceman/pancake/keymaps/default/readme.md @@ -0,0 +1,3 @@ +# Default keymap for Pancake + +designed by: Spaceman diff --git a/keyboards/pancake/pancake.c b/keyboards/spaceman/pancake/pancake.c similarity index 100% rename from keyboards/pancake/pancake.c rename to keyboards/spaceman/pancake/pancake.c diff --git a/keyboards/pancake/pancake.h b/keyboards/spaceman/pancake/pancake.h similarity index 100% rename from keyboards/pancake/pancake.h rename to keyboards/spaceman/pancake/pancake.h diff --git a/keyboards/pancake/promicro/config.h b/keyboards/spaceman/pancake/promicro/config.h similarity index 100% rename from keyboards/pancake/promicro/config.h rename to keyboards/spaceman/pancake/promicro/config.h diff --git a/keyboards/pancake/promicro/rules.mk b/keyboards/spaceman/pancake/promicro/rules.mk similarity index 100% rename from keyboards/pancake/promicro/rules.mk rename to keyboards/spaceman/pancake/promicro/rules.mk diff --git a/keyboards/pancake/readme.md b/keyboards/spaceman/pancake/readme.md similarity index 82% rename from keyboards/pancake/readme.md rename to keyboards/spaceman/pancake/readme.md index 3e3125f4d7a7..34cf6382bcb4 100644 --- a/keyboards/pancake/readme.md +++ b/keyboards/spaceman/pancake/readme.md @@ -2,11 +2,11 @@ Ortho 40% Ortho Keyboard with an option for the adafruit feather -Keyboard Maintainer: Spaceman AKA:[Rionlion100](https://github.com/rionlion100) +Keyboard Maintainer: [Spaceman](https://github.com/Spaceman) Hardware Availability: [GB](https://geekhack.org/index.php?topic=101371.0) Make example for this keyboard (after setting up your build environment): - make pancake:default + make spaceman/pancake: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/subatomic/rules.mk b/keyboards/subatomic/rules.mk index abff350ea0c7..0d77351f3263 100644 --- a/keyboards/subatomic/rules.mk +++ b/keyboards/subatomic/rules.mk @@ -23,7 +23,7 @@ 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 MIDI_ENABLE = yes # MIDI controls -AUDIO_ENABLE = yes # Audio output on port C6 +AUDIO_ENABLE = no # Audio output UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. diff --git a/keyboards/the_royal/liminal/keymaps/default/keymap.c b/keyboards/the_royal/liminal/keymaps/default/keymap.c index d9d949745308..dd986610116b 100644 --- a/keyboards/the_royal/liminal/keymaps/default/keymap.c +++ b/keyboards/the_royal/liminal/keymaps/default/keymap.c @@ -127,7 +127,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ) }; -uint16_t get_tapping_term(uint16_t keycode) { +uint16_t get_tapping_term(uint16_t keycode, keyrecord_t *record) { switch (keycode) { case LT(_LOWER, KC_SPACE): return 160; @@ -136,7 +136,7 @@ uint16_t get_tapping_term(uint16_t keycode) { default: #ifndef TAPPING_TERM return 200; -#else +#else return TAPPING_TERM; #endif } diff --git a/keyboards/the_royal/liminal/keymaps/default_iso/keymap.c b/keyboards/the_royal/liminal/keymaps/default_iso/keymap.c index 3d8debee3d67..62ff2b6a5d49 100644 --- a/keyboards/the_royal/liminal/keymaps/default_iso/keymap.c +++ b/keyboards/the_royal/liminal/keymaps/default_iso/keymap.c @@ -128,7 +128,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { }; -uint16_t get_tapping_term(uint16_t keycode) { +uint16_t get_tapping_term(uint16_t keycode, keyrecord_t *record) { switch (keycode) { case LT(_LOWER, KC_SPACE): return 160; diff --git a/keyboards/thevankeyboards/minivan/keymaps/like_jis/keymap.c b/keyboards/thevankeyboards/minivan/keymaps/like_jis/keymap.c index 3d282e182b38..509b49780281 100644 --- a/keyboards/thevankeyboards/minivan/keymaps/like_jis/keymap.c +++ b/keyboards/thevankeyboards/minivan/keymaps/like_jis/keymap.c @@ -114,7 +114,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { }; #define TAPPING_LAYER_TERM 150 // Custom LT Tapping term -uint16_t get_tapping_term(uint16_t keycode) { +uint16_t get_tapping_term(uint16_t keycode, keyrecord_t *record) { switch (keycode) { case KC_BSLO: return TAPPING_LAYER_TERM; diff --git a/keyboards/thevankeyboards/minivan/keymaps/mjt/keymap.c b/keyboards/thevankeyboards/minivan/keymaps/mjt/keymap.c index 6e22e9e23af0..a9d3a802dc01 100644 --- a/keyboards/thevankeyboards/minivan/keymaps/mjt/keymap.c +++ b/keyboards/thevankeyboards/minivan/keymaps/mjt/keymap.c @@ -99,7 +99,7 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) if (record->event.pressed) { #ifdef AUDIO_ENABLE stop_all_notes(); - PLAY_NOTE_ARRAY(tone_plover, false, 0); + PLAY_SONG(tone_plover); #endif layer_off(_NUMSYM); layer_off(_FKEYS); @@ -110,7 +110,7 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) case 7: // LAYERRESET if (record->event.pressed) { #ifdef AUDIO_ENABLE - PLAY_NOTE_ARRAY(tone_qwerty, false, 0); + PLAY_SONG(tone_qwerty); #endif layer_off(_NUMSYM); layer_off(_FKEYS); @@ -132,7 +132,7 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) if(record->event.pressed) { #ifdef AUDIO_ENABLE stop_all_notes(); - PLAY_NOTE_ARRAY(tone_adjust, false, 0); + PLAY_SONG(tone_adjust); #endif layer_off(_NUMSYM); layer_off(_FKEYS); @@ -166,12 +166,12 @@ void matrix_init_user(void) { void startup_user() { _delay_ms(20); // gets rid of tick - PLAY_NOTE_ARRAY(tone_startup, false, 0); + PLAY_SONG(tone_startup); } void shutdown_user() { - PLAY_NOTE_ARRAY(tone_goodbye, false, 0); + PLAY_SONG(tone_goodbye); _delay_ms(150); stop_all_notes(); } @@ -183,6 +183,6 @@ void music_on_user(void) void music_scale_user(void) { - PLAY_NOTE_ARRAY(music_scale, false, 0); + PLAY_SONG(music_scale); } #endif diff --git a/keyboards/thevankeyboards/roadkit/keymaps/mjt/keymap.c b/keyboards/thevankeyboards/roadkit/keymaps/mjt/keymap.c index 18454d56496f..db5f6c37c818 100644 --- a/keyboards/thevankeyboards/roadkit/keymaps/mjt/keymap.c +++ b/keyboards/thevankeyboards/roadkit/keymaps/mjt/keymap.c @@ -145,7 +145,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { case NUMPAD_LOCK: if (record->event.pressed) { #ifdef AUDIO_ENABLE - PLAY_NOTE_ARRAY(tone_numpad, false, 0); + PLAY_SONG(tone_numpad); #endif persistant_default_layer_set(1UL<<_NUMPAD); } @@ -154,7 +154,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { case NAVIGATION_LOCK: if (record->event.pressed) { #ifdef AUDIO_ENABLE - PLAY_NOTE_ARRAY(tone_navigation, false, 0); + PLAY_SONG(tone_navigation); #endif persistant_default_layer_set(1UL<<_NAVIGATION); } @@ -163,7 +163,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { case EXCEL_LOCK: if (record->event.pressed) { #ifdef AUDIO_ENABLE - PLAY_NOTE_ARRAY(tone_excel, false, 0); + PLAY_SONG(tone_excel); #endif persistant_default_layer_set(1UL<<_EXCEL); } diff --git a/keyboards/tkc1800/config.h b/keyboards/tkc1800/config.h index 5ba40bb35cd3..9c35699c92c7 100644 --- a/keyboards/tkc1800/config.h +++ b/keyboards/tkc1800/config.h @@ -67,6 +67,11 @@ along with this program. If not, see . /* Locking resynchronize hack */ #define LOCKING_RESYNC_ENABLE +#define QMK_ESC_OUTPUT A0 // usually COL +#define QMK_ESC_INPUT F4 // usually ROW +#define QMK_LED D2 // NumLock on TKC1800 +//#define QMK_SPEAKER C6 + /* * Force NKRO * diff --git a/keyboards/tkc1800/i2c.c b/keyboards/tkc1800/i2c.c deleted file mode 100644 index cd2b835d501d..000000000000 --- a/keyboards/tkc1800/i2c.c +++ /dev/null @@ -1,166 +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 800000L - -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/tkc1800/keymaps/default/config.h b/keyboards/tkc1800/keymaps/default/config.h deleted file mode 100644 index ee142927f3ad..000000000000 --- a/keyboards/tkc1800/keymaps/default/config.h +++ /dev/null @@ -1,24 +0,0 @@ -/* Copyright 2017 Mathias Andersson - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License 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 SSD1306OLED -//#define OLED_ROTATE180 -#define SSD1306_ADDRESS 0x3C - -// place overrides here diff --git a/keyboards/tkc1800/keymaps/default/keymap.c b/keyboards/tkc1800/keymaps/default/keymap.c index 5455934a3069..4f4c7f8e9cdc 100644 --- a/keyboards/tkc1800/keymaps/default/keymap.c +++ b/keyboards/tkc1800/keymaps/default/keymap.c @@ -13,11 +13,8 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ + #include QMK_KEYBOARD_H -#include "LUFA/Drivers/Peripheral/TWI.h" -#include "i2c.h" -#include "ssd1306.h" - //Layers @@ -26,13 +23,6 @@ enum { FUNCTION, }; -bool screenWorks = 0; - -//13 characters max without re-writing the "Layer: " format in iota_gfx_task_user() -static char layer_lookup[][14] = {"Base","Function"}; - - - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Keymap BASE: (Base Layer) Default Layer * ,-------------------------------------------------------. ,-------------------. @@ -88,72 +78,29 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), }; -bool process_record_user(uint16_t keycode, keyrecord_t *record) { - return true; -} - -void led_set_user(uint8_t usb_led) { -} - -void matrix_init_user(void) { - #ifdef USE_I2C - i2c_master_init(); - #ifdef SSD1306OLED - // calls code for the SSD1306 OLED - _delay_ms(400); - TWI_Init(TWI_BIT_PRESCALE_1, TWI_BITLENGTH_FROM_FREQ(1, 800000)); - if ( iota_gfx_init() ) { // turns on the display - screenWorks = 1; - } - #endif - #endif - #ifdef AUDIO_ENABLE - startup_user(); - #endif -} - -void matrix_scan_user(void) { - #ifdef SSD1306OLED - if ( screenWorks ) { - iota_gfx_task(); // this is what updates the display continuously - }; - #endif -} - -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) { - #if DEBUG_TO_SCREEN - if (debug_enable) { - return; +#ifdef OLED_DRIVER_ENABLE +void oled_task_user(void) { + oled_write_P(PSTR("TKC1800\n"),false); + // Host Keyboard Layer Status + oled_write_P(PSTR("Layer: "), false); + + switch (get_highest_layer(layer_state)) { + case BASE: + oled_write_P(PSTR("Base\n"), false); + break; + case FUNCTION: + oled_write_P(PSTR("Function\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); } - #endif - - struct CharacterMatrix matrix; - - matrix_clear(&matrix); - matrix_write_P(&matrix, PSTR("TKC1800")); - - uint8_t layer = biton32(layer_state); - - char buf[40]; - snprintf(buf,sizeof(buf), "Undef-%d", layer); - matrix_write_P(&matrix, PSTR("\nLayer: ")); - matrix_write(&matrix, layer_lookup[layer]); - // Host Keyboard LED Status - char led[40]; - snprintf(led, sizeof(led), "\n\n%s %s %s", - (host_keyboard_leds() & (1< - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License 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 SSD1306OLED -//#define OLED_ROTATE180 -#define SSD1306_ADDRESS 0x3C - -// place overrides here diff --git a/keyboards/tkc1800/keymaps/smt/keymap.c b/keyboards/tkc1800/keymaps/smt/keymap.c index 9f506b443b81..9b6ad80d3a63 100644 --- a/keyboards/tkc1800/keymaps/smt/keymap.c +++ b/keyboards/tkc1800/keymaps/smt/keymap.c @@ -13,10 +13,8 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ + #include QMK_KEYBOARD_H -#include "LUFA/Drivers/Peripheral/TWI.h" -#include "i2c.h" -#include "ssd1306.h" // Custom macros #define CTL_ESC CTL_T(KC_ESC) // Tap for Esc, hold for Ctrl @@ -32,11 +30,6 @@ enum { FUNCTION, }; -//13 characters max without re-writing the "Layer: " format in iota_gfx_task_user() -static char layer_lookup[][14] = {"Qwerty","Dvorak","Function"}; - - - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Keymap QWERTY: (Qwerty Layer) Default Layer * ,-------------------------------------------------------. ,-------------------. @@ -151,64 +144,34 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { return true; } -void led_set_user(uint8_t usb_led) { - -} - -void matrix_init_user(void) { - #ifdef USE_I2C - i2c_master_init(); - #ifdef SSD1306OLED - // calls code for the SSD1306 OLED - _delay_ms(400); - TWI_Init(TWI_BIT_PRESCALE_1, TWI_BITLENGTH_FROM_FREQ(1, 800000)); - iota_gfx_init(); // turns on the display - #endif - #endif - #ifdef AUDIO_ENABLE - startup_user(); - #endif -} - -void matrix_scan_user(void) { - #ifdef SSD1306OLED - iota_gfx_task(); // this is what updates the display continuously - #endif -} - -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) { - #if DEBUG_TO_SCREEN - if (debug_enable) { - return; +#ifdef OLED_DRIVER_ENABLE +void oled_task_user(void) { + oled_write_P(PSTR("TKC1800\n"),false); + // Host Keyboard Layer Status + oled_write_P(PSTR("Layer: "), false); + + switch (get_highest_layer(layer_state)) { + case QWERTY: + oled_write_P(PSTR("Base\n"), false); + break; + case COLEMAK: + oled_write_P(PSTR("Colemak\n"), false); + break; + case DVORAK: + oled_write_P(PSTR("Dvorak\n"), false); + break; + case FUNCTION: + oled_write_P(PSTR("Function\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); } - #endif - - struct CharacterMatrix matrix; - - matrix_clear(&matrix); - matrix_write_P(&matrix, PSTR("TKC1800")); - - uint8_t layer = biton32(layer_state); - - char buf[40]; - snprintf(buf,sizeof(buf), "Undef-%d", layer); - matrix_write_P(&matrix, PSTR("\nLayer: ")); - matrix_write(&matrix, layer_lookup[layer]); - // Host Keyboard LED Status - char led[40]; - snprintf(led, sizeof(led), "\n\n%s %s %s", - (host_keyboard_leds() & (1<. */ #include QMK_KEYBOARD_H -#include "LUFA/Drivers/Peripheral/TWI.h" -#include "i2c.h" -#include "ssd1306.h" - //Layers @@ -26,13 +22,6 @@ enum { FUNCTION, }; -bool screenWorks = 0; - -//13 characters max without re-writing the "Layer: " format in iota_gfx_task_user() -static char layer_lookup[][14] = {"Base","Function"}; - - - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Keymap BASE: (Base Layer) Default Layer * ,-------------------------------------------------------. ,-------------------. @@ -88,72 +77,28 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), }; -bool process_record_user(uint16_t keycode, keyrecord_t *record) { - return true; -} - -void led_set_user(uint8_t usb_led) { - -} - -void matrix_init_user(void) { - #ifdef USE_I2C - i2c_master_init(); - #ifdef SSD1306OLED - // calls code for the SSD1306 OLED - _delay_ms(400); - TWI_Init(TWI_BIT_PRESCALE_1, TWI_BITLENGTH_FROM_FREQ(1, 800000)); - if ( iota_gfx_init() ) { // turns on the display - screenWorks = 1; - } - #endif - #endif - #ifdef AUDIO_ENABLE - startup_user(); - #endif -} - -void matrix_scan_user(void) { - #ifdef SSD1306OLED - if ( screenWorks ) { - iota_gfx_task(); // this is what updates the display continuously - }; - #endif -} - -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) { - #if DEBUG_TO_SCREEN - if (debug_enable) { - return; +#ifdef OLED_DRIVER_ENABLE +void oled_task_user(void) { + oled_write_P(PSTR("TKC1800\n"),false); + // Host Keyboard Layer Status + oled_write_P(PSTR("Layer: "), false); + + switch (get_highest_layer(layer_state)) { + case BASE: + oled_write_P(PSTR("Base\n"), false); + break; + case FUNCTION: + oled_write_P(PSTR("Function\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); } - #endif - - struct CharacterMatrix matrix; - - matrix_clear(&matrix); - matrix_write_P(&matrix, PSTR("TKC1800")); - - uint8_t layer = biton32(layer_state); - - char buf[40]; - snprintf(buf,sizeof(buf), "Undef-%d", layer); - matrix_write_P(&matrix, PSTR("\nLayer: ")); - matrix_write(&matrix, layer_lookup[layer]); - // Host Keyboard LED Status - char led[40]; - snprintf(led, sizeof(led), "\n\n%s %s %s", - (host_keyboard_leds() & (1< - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License 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 SSD1306OLED -//#define OLED_ROTATE180 -#define SSD1306_ADDRESS 0x3C - -// place overrides here diff --git a/keyboards/tkc1800/keymaps/wkl/keymap.c b/keyboards/tkc1800/keymaps/wkl/keymap.c index 6f331c61ccbd..3c65b61d1178 100644 --- a/keyboards/tkc1800/keymaps/wkl/keymap.c +++ b/keyboards/tkc1800/keymaps/wkl/keymap.c @@ -13,11 +13,8 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ + #include QMK_KEYBOARD_H -#include "LUFA/Drivers/Peripheral/TWI.h" -#include "i2c.h" -#include "ssd1306.h" - //Layers @@ -26,13 +23,6 @@ enum { FUNCTION, }; -bool screenWorks = 0; - -//13 characters max without re-writing the "Layer: " format in iota_gfx_task_user() -static char layer_lookup[][14] = {"Base","Function"}; - - - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Keymap BASE: (Base Layer) Default Layer * ,-------------------------------------------------------. ,-------------------. @@ -71,72 +61,28 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), }; -bool process_record_user(uint16_t keycode, keyrecord_t *record) { - return true; -} - -void led_set_user(uint8_t usb_led) { - -} - -void matrix_init_user(void) { - #ifdef USE_I2C - i2c_master_init(); - #ifdef SSD1306OLED - // calls code for the SSD1306 OLED - _delay_ms(400); - TWI_Init(TWI_BIT_PRESCALE_1, TWI_BITLENGTH_FROM_FREQ(1, 800000)); - if ( iota_gfx_init() ) { // turns on the display - screenWorks = 1; - } - #endif - #endif - #ifdef AUDIO_ENABLE - startup_user(); - #endif -} - -void matrix_scan_user(void) { - #ifdef SSD1306OLED - if ( screenWorks ) { - iota_gfx_task(); // this is what updates the display continuously - }; - #endif -} - -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) { - #if DEBUG_TO_SCREEN - if (debug_enable) { - return; +#ifdef OLED_DRIVER_ENABLE +void oled_task_user(void) { + oled_write_P(PSTR("TKC1800\n"),false); + // Host Keyboard Layer Status + oled_write_P(PSTR("Layer: "), false); + + switch (get_highest_layer(layer_state)) { + case BASE: + oled_write_P(PSTR("Base\n"), false); + break; + case FUNCTION: + oled_write_P(PSTR("Function\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); } - #endif - - struct CharacterMatrix matrix; - - matrix_clear(&matrix); - matrix_write_P(&matrix, PSTR("TKC1800")); - - uint8_t layer = biton32(layer_state); - - char buf[40]; - snprintf(buf,sizeof(buf), "Undef-%d", layer); - matrix_write_P(&matrix, PSTR("\nLayer: ")); - matrix_write(&matrix, layer_lookup[layer]); - // Host Keyboard LED Status - char led[40]; - snprintf(led, sizeof(led), "\n\n%s %s %s", - (host_keyboard_leds() & (1< - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License 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 SSD1306OLED -//#define OLED_ROTATE180 -#define SSD1306_ADDRESS 0x3C - -// place overrides here diff --git a/keyboards/tkc1800/keymaps/yanfali/keymap.c b/keyboards/tkc1800/keymaps/yanfali/keymap.c index 8dad3446def9..bbffc2d20b0d 100644 --- a/keyboards/tkc1800/keymaps/yanfali/keymap.c +++ b/keyboards/tkc1800/keymaps/yanfali/keymap.c @@ -13,11 +13,8 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ + #include QMK_KEYBOARD_H -#include "LUFA/Drivers/Peripheral/TWI.h" -#include "i2c.h" -#include "ssd1306.h" - //Layers @@ -26,11 +23,6 @@ enum { FUNCTION, }; -//13 characters max without re-writing the "Layer: " format in iota_gfx_task_user() -static char layer_lookup[][14] = {"Base","Function"}; - - - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Keymap BASE: (Base Layer) Default Layer * ,-------------------------------------------------------. ,-------------------. @@ -69,68 +61,28 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), }; -bool process_record_user(uint16_t keycode, keyrecord_t *record) { - return true; -} - -void led_set_user(uint8_t usb_led) { - -} - -void matrix_init_user(void) { - #ifdef USE_I2C - i2c_master_init(); - #ifdef SSD1306OLED - // calls code for the SSD1306 OLED - _delay_ms(400); - TWI_Init(TWI_BIT_PRESCALE_1, TWI_BITLENGTH_FROM_FREQ(1, 800000)); - iota_gfx_init(); // turns on the display - #endif - #endif - #ifdef AUDIO_ENABLE - startup_user(); - #endif -} - -void matrix_scan_user(void) { - #ifdef SSD1306OLED - iota_gfx_task(); // this is what updates the display continuously - #endif -} - -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) { - #if DEBUG_TO_SCREEN - if (debug_enable) { - return; +#ifdef OLED_DRIVER_ENABLE +void oled_task_user(void) { + oled_write_P(PSTR("TKC1800\n"),false); + // Host Keyboard Layer Status + oled_write_P(PSTR("Layer: "), false); + + switch (get_highest_layer(layer_state)) { + case BASE: + oled_write_P(PSTR("Base\n"), false); + break; + case FUNCTION: + oled_write_P(PSTR("Function\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); } - #endif - - struct CharacterMatrix matrix; - - matrix_clear(&matrix); - matrix_write_P(&matrix, PSTR("TKC1800")); - - uint8_t layer = biton32(layer_state); - - char buf[40]; - snprintf(buf,sizeof(buf), "Undef-%d", layer); - matrix_write_P(&matrix, PSTR("\nLayer: ")); - matrix_write(&matrix, layer_lookup[layer]); - // Host Keyboard LED Status - char led[40]; - snprintf(led, sizeof(led), "\n\n%s %s %s", - (host_keyboard_leds() & (1<. */ #pragma once -//#ifndef CONFIG_H -//#define CONFIG_H #include "config_common.h" - -// GCC include 'config.h" sequence in qmk_firmware/keyboards/zinc/ -// -include keyboards/zinc/config.h -// -include keyboards/zinc/rev?/config.h -// -include keyboards/zinc/rev?/keymaps/MAPNAME/config.h -// XXXX.c - -#include - -// GCC include search path in qmk_firmare/keyboards/zinc/ -// #include "..." search starts here: -// #include <...> search starts here: -// keyboards/zinc/rev?/keymaps/MAPNAME -// keyboards/zinc -// keyboards/zinc/rev? -// . -// ./tmk_core -// ...... - -#define NO_ACTION_MACRO -#define NO_ACTION_FUNCTION - -//#endif /* CONFIG_H */ diff --git a/keyboards/zinc/i2c.c b/keyboards/zinc/i2c.c deleted file mode 100644 index 4bee5c639829..000000000000 --- a/keyboards/zinc/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/zinc/keymaps/default/config.h b/keyboards/zinc/keymaps/default/config.h index 4dcb0724ff75..2185dc9ebe4c 100644 --- a/keyboards/zinc/keymaps/default/config.h +++ b/keyboards/zinc/keymaps/default/config.h @@ -20,8 +20,6 @@ along with this program. If not, see . */ #pragma once -// if you need more program area, try uncomment follow line -#include "serial_config_simpleapi.h" // place overrides here // Selection of RGBLIGHT MODE to use. diff --git a/keyboards/zinc/keymaps/default/keymap.c b/keyboards/zinc/keymaps/default/keymap.c index 0f08d21ee788..cd1bf0328b83 100644 --- a/keyboards/zinc/keymaps/default/keymap.c +++ b/keyboards/zinc/keymaps/default/keymap.c @@ -139,7 +139,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { \ * |------+------+------+------+------+------| |------+------+------+------+------+------| * | |RGB ON| HUE+ | SAT+ | VAL+ | Mac | | Win | - | = |Print |ScLock|Pause | * |------+------+------+------+------+------| |------+------+------+------+------+------| - * | | MODE | HUE- | SAT- | VAL- | | | | | | | | | + * |MODE R| MODE | HUE- | SAT- | VAL- | | | | | | |PageUp| | * |------+------+------+------+------+------| |------+------+------+------+------+------| * | | | | EISU | EISU | EISU | | KANA | KANA | Home |PageDn|PageUp| End | * `-----------------------------------------' `-----------------------------------------' @@ -147,13 +147,13 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { \ [_ADJUST] = LAYOUT_ortho_4x12( \ _______, RESET, RGBRST, _______, _______, _______, _______, QWERTY, COLEMAK, DVORAK, _______, KC_INS, \ _______, RGB_TOG, RGB_HUI, RGB_SAI, RGB_VAI, AG_NORM, AG_SWAP, KC_MINS, KC_EQL, KC_PSCR, KC_SLCK, KC_PAUS,\ - _______, RGB_MOD, RGB_HUD, RGB_SAD, RGB_VAD, _______, _______, _______, _______, _______, _______, _______,\ - _______, _______, _______, EISU, EISU, EISU, KANA, KANA, KC_HOME, KC_PGDN, KC_PGUP, KC_END\ + RGB_RMOD,RGB_MOD, RGB_HUD, RGB_SAD, RGB_VAD, _______, _______, _______, _______, _______, KC_PGUP, _______,\ + _______, _______, _______, EISU, EISU, EISU, KANA, KANA, KANA, KC_HOME, KC_PGDN, KC_END\ ) }; // define variables for reactive RGB -bool TOG_STATUS = false; +bool TOG_STATUS = false; // Setting ADJUST layer RGB back to default void update_tri_layer_RGB(uint8_t layer1, uint8_t layer2, uint8_t layer3) { @@ -211,7 +211,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { } return false; break; - + case RAISE: if (record->event.pressed) { //not sure how to have keyboard check mode and set it to a variable, so my work around @@ -244,16 +244,28 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { } return false; break; + //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_RMOD: + #if defined(RGBLIGHT_ENABLE) + if (record->event.pressed) { + rgblight_mode_noeeprom(RGB_current_config.mode); + rgblight_step_reverse(); + RGB_current_config.mode = rgblight_config.mode; + } + return false; + #endif + break; + case RGB_MOD: - #ifdef RGBLIGHT_ENABLE + #if defined(RGBLIGHT_ENABLE) if (record->event.pressed) { rgblight_mode_noeeprom(RGB_current_config.mode); rgblight_step(); RGB_current_config.mode = rgblight_config.mode; } - #endif return false; + #endif break; case EISU: diff --git a/keyboards/zinc/keymaps/default/readme_en.md b/keyboards/zinc/keymaps/default/readme_en.md new file mode 100644 index 000000000000..6447e96ed421 --- /dev/null +++ b/keyboards/zinc/keymaps/default/readme_en.md @@ -0,0 +1,131 @@ +# The Default Zinc Layout +## layout + +### 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 | + |------+------+------+------+------+------| |------+------+------+------+------+------| + | Esc | Fn | Alt | Win |Lower |Space | | Space| Raise| Left | Down | Up | Right| + `------------------------------------------ ------------------------------------------' +``` + +### 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 | + |------+------+------+------+------+------| |------+------+------+------+------+------| + | Esc |ADJUST| Alt | Win |LOWER |Space | | Space| RAISE| Left | Down | Up | Right| + `------------------------------------------ ------------------------------------------' +``` + +### Dvorak + +``` + ,-----------------------------------------. ,-----------------------------------------. + | Tab | ' | , | . | P | Y | | F | G | C | R | L | Del | + |------+------+------+------+------+------| |------+------+------+------+------+------| + | Ctrl | A | O | E | U | I | | D | H | T | N | S | / | + |------+------+------+------+------+------| |------+------+------+------+------+------| + | Shift| ; | Q | J | K | X | | B | M | W | V | Z |Enter | + |------+------+------+------+------+------| |------+------+------+------+------+------| + | Esc |ADJUST| Alt | Win |LOWER |Space | | Space| RAISE| Left | Down | Up | Right| + `-----------------------------------------' `-----------------------------------------' +``` + +### Lower +``` + ,-----------------------------------------. ,-----------------------------------------. + | ~ | ! | @ | # | $ | % | | ^ | & | * | ( | ) | | + |------+------+------+------+------+------| |------+------+------+------+------+------| + | | | | | | | | - | _ | + | { | } | | | + |------+------+------+------+------+------| |------+------+------+------+------+------| + | | | | | | | | | | | Home | End | | + |------+------+------+------+------+------| |------+------+------+------+------+------| + | | | | | | | | | | Next | Vol- | Vol+ | Play | + `-----------------------------------------' `-----------------------------------------' +``` + +### 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 | + `-----------------------------------------' `-----------------------------------------' +``` + +### Adjust (Lower + Raise) +``` + ,-----------------------------------------. ,-----------------------------------------. + | | Reset|RGBRST|Aud on|Audoff| | | |Qwerty|Colemk|Dvorak| | Ins | + |------+------+------+------+------+------| |------+------+------+------+------+------| + | |RGB ON| HUE+ | SAT+ | VAL+ | Mac | | Win | - | = |Print |ScLock|Pause | + |------+------+------+------+------+------| |------+------+------+------+------+------| + |MODE R|RGBMOD| HUE- | SAT- | VAL- | | | | | | |PageUp| | + |------+------+------+------+------+------| |------+------+------+------+------+------| + | | | | EISU | EISU | EISU | | KANA | KANA | KANA | Home |PageDn| End | + `-----------------------------------------' `-----------------------------------------' +``` + +## Compile + +go to qmk top directory. + +``` +$ cd qmk_firmware +``` +make with `zinc:` + +``` +$ make zinc:default +``` + +To make and flash with `:flash` + +``` +$ make zinc:default:flash +``` + + +## Customize + +You can customize from the command line. + +``` +# Zinc keyboard 'default' keymap: convenient command line option +make ZINC= zinc:defualt +# option= back | under | both | cont | na | ios +# ex. +# make ZINC=under zinc:defualt +# make ZINC=under,ios zinc:defualt +# make ZINC=back zinc:default +# make ZINC=back,na zinc:default +# make ZINC=back,ios zinc:default +``` + +Or edit `qmk_firmware/keyboards/zinc/rev1/keymaps/~/rules.mk` directly. + +``` +# Zinc keyboard customize +LED_BACK_ENABLE = no # LED backlight (Enable SK6812mini backlight) +LED_UNDERGLOW_ENABLE = no # LED underglow (Enable WS2812 RGB underlight) +LED_BOTH_ENABLE = no # LED backlight and underglow +LED_RGB_CONT = no # LED continuous backlight or/and underglow between left Zinc and right Zinc +LED_ANIMATIONS = yes # LED animations +IOS_DEVICE_ENABLE = no # connect to IOS device (iPad,iPhone) +``` diff --git a/keyboards/zinc/keymaps/default/readme_jp.md b/keyboards/zinc/keymaps/default/readme_jp.md index dfedb37c15c1..8132f5036e5a 100644 --- a/keyboards/zinc/keymaps/default/readme_jp.md +++ b/keyboards/zinc/keymaps/default/readme_jp.md @@ -43,6 +43,44 @@ `-----------------------------------------' `-----------------------------------------' ``` + ### Lower +``` + ,-----------------------------------------. ,-----------------------------------------. + | ~ | ! | @ | # | $ | % | | ^ | & | * | ( | ) | | + |------+------+------+------+------+------| |------+------+------+------+------+------| + | | | | | | | | - | _ | + | { | } | | | + |------+------+------+------+------+------| |------+------+------+------+------+------| + | | | | | | | | | | | Home | End | | + |------+------+------+------+------+------| |------+------+------+------+------+------| + | | | | | | | | | | Next | Vol- | Vol+ | Play | + `-----------------------------------------' `-----------------------------------------' +``` + +### 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 | + `-----------------------------------------' `-----------------------------------------' +``` + +### Adjust (Lower + Raise) +``` + ,-----------------------------------------. ,-----------------------------------------. + | | Reset|RGBRST|Aud on|Audoff| | | |Qwerty|Colemk|Dvorak| | Ins | + |------+------+------+------+------+------| |------+------+------+------+------+------| + | |RGB ON| HUE+ | SAT+ | VAL+ | Mac | | Win | - | = |Print |ScLock|Pause | + |------+------+------+------+------+------| |------+------+------+------+------+------| + |MODE R|RGBMOD| HUE- | SAT- | VAL- | | | | | | |PageUp| | + |------+------+------+------+------+------| |------+------+------+------+------+------| + | | | | EISU | EISU | EISU | | KANA | KANA | KANA | Home |PageDn| End | + `-----------------------------------------' `-----------------------------------------' +``` ## コンパイルの仕方 @@ -76,7 +114,7 @@ $ make zinc:default:clean ``` # Zinc keyboard 'default' keymap: convenient command line option make ZINC= zinc:defualt -# option= back | under | na | ios +# option= back | under | both | cont | na | ios # ex. # make ZINC=under zinc:defualt # make ZINC=under,ios zinc:defualt @@ -85,16 +123,16 @@ make ZINC= zinc:defualt # make ZINC=back,ios zinc:default ``` -あるいは`qmk_firmware/keyboards/zinc/rev1/keymaps/default/rules.mk` の以下の部分を直接編集して機能を有効化してください。 +あるいは`qmk_firmware/keyboards/zinc/rev1/keymaps/~/rules.mk` の以下の部分を直接編集して機能を有効化してください。 ``` # Zinc keyboard customize LED_BACK_ENABLE = no # LED backlight (Enable SK6812mini backlight) LED_UNDERGLOW_ENABLE = no # LED underglow (Enable WS2812 RGB underlight) +LED_BOTH_ENABLE = no # LED backlight and underglow +LED_RGB_CONT = no # LED continuous backlight or/and underglow between left Zinc and right Zinc LED_ANIMATIONS = yes # LED animations IOS_DEVICE_ENABLE = no # connect to IOS device (iPad,iPhone) - - ``` ## RGB backlight を有効にする @@ -120,4 +158,4 @@ RBG Underglow や RGBバックライトの輝度を抑えて、iPad, iPhone に ``` IOS_DEVICE_ENABLE = no # connect to IOS device (iPad,iPhone) -``` \ No newline at end of file +``` diff --git a/keyboards/zinc/keymaps/default/rules.mk b/keyboards/zinc/keymaps/default/rules.mk index c980f7d00bfa..32e0f21610bc 100644 --- a/keyboards/zinc/keymaps/default/rules.mk +++ b/keyboards/zinc/keymaps/default/rules.mk @@ -20,6 +20,9 @@ define ZINC_CUSTOMISE_MSG $(info Zinc customize) $(info - LED_BACK_ENABLE=$(LED_BACK_ENABLE)) $(info - LED_UNDERGLOW_ENABLE=$(LED_UNDERGLOW_ENABLE)) + $(info - LED_BOTH_ENABLE=$(LED_BOTH_ENABLE)) + $(info - LED_RGB_CONT=$(LED_RGB_CONT)) + $(info - RGB_MATRIX=$(RGB_MATRIX)) $(info - LED_ANIMATION=$(LED_ANIMATIONS)) $(info - IOS_DEVICE_ENABLE=$(IOS_DEVICE_ENABLE)) endef @@ -27,6 +30,10 @@ endef # Zinc keyboard customize LED_BACK_ENABLE = no # LED backlight (Enable SK6812mini backlight) LED_UNDERGLOW_ENABLE = no # LED underglow (Enable WS2812 RGB underlight) +LED_BOTH_ENABLE = no # LED backlight and underglow +LED_RGB_CONT = no # LED continuous backlight or/and underglow between left Zinc and right Zinc +RGB_MATRIX = no # RGB LED Matrix +RGB_MATRIX_SPLIT_RIGHT = no # RGB Matrix for RIGHT Hand LED_ANIMATIONS = yes # LED animations IOS_DEVICE_ENABLE = no # connect to IOS device (iPad,iPhone) Link_Time_Optimization = no # if firmware size over limit, try this option @@ -36,7 +43,7 @@ Link_Time_Optimization = no # if firmware size over limit, try this option ### Zinc keyboard 'default' keymap: convenient command line option ## make ZINC= zinc:defualt -## option= back | under | na | ios +## option= back | under | both | cont | matrix | na | ios ## ex. ## make ZINC=under zinc:defualt ## make ZINC=under,ios zinc:defualt @@ -47,9 +54,22 @@ Link_Time_Optimization = no # if firmware size over limit, try this option ifneq ($(strip $(ZINC)),) ifeq ($(findstring back,$(ZINC)), back) LED_BACK_ENABLE = yes - else ifeq ($(findstring under,$(ZINC)), under) + endif + ifeq ($(findstring under,$(ZINC)), under) LED_UNDERGLOW_ENABLE = yes endif + ifeq ($(findstring both,$(ZINC)), both) + LED_BOTH_ENABLE = yes + endif + ifeq ($(findstring cont,$(ZINC)), cont) + LED_RGB_CONT = yes + endif + ifeq ($(findstring matrix,$(ZINC)), matrix) + RGB_MATRIX = yes + endif + ifeq ($(findstring right,$(ZINC)), right) + RGB_MATRIX_SPLIT_RIGHT = yes + endif ifeq ($(findstring na,$(ZINC)), na) LED_ANIMATIONS = no endif @@ -62,10 +82,11 @@ endif ifeq ($(strip $(LED_BACK_ENABLE)), yes) RGBLIGHT_ENABLE = yes - OPT_DEFS += -DRGBLED_BACK ifeq ($(strip $(LED_UNDERGLOW_ENABLE)), yes) - $(eval $(call ZINC_CUSTOMISE_MSG)) - $(error LED_BACK_ENABLE and LED_UNDERGLOW_ENABLE both 'yes') + OPT_DEFS += -DRGBLED_BOTH + $(info LED_BOTH_ENABLE option is enabled instead of LED_BACK_ENABLE and LED_UNDERGLOW_ENABLE) + else + OPT_DEFS += -DRGBLED_BACK endif else ifeq ($(strip $(LED_UNDERGLOW_ENABLE)), yes) RGBLIGHT_ENABLE = yes @@ -73,18 +94,36 @@ else RGBLIGHT_ENABLE = no endif +ifeq ($(strip $(LED_BOTH_ENABLE)), yes) + RGBLIGHT_ENABLE = yes + OPT_DEFS += -DRGBLED_BOTH +endif + +ifeq ($(strip $(LED_RGB_CONT)), yes) + OPT_DEFS += -DRGBLED_CONT +endif + +ifeq ($(strip $(RGB_MATRIX)), yes) + RGBLIGHT_ENABLE = no + RGB_MATRIX_ENABLE = WS2812 +endif + ifeq ($(strip $(IOS_DEVICE_ENABLE)), yes) - OPT_DEFS += -DIOS_DEVICE_ENABLE + OPT_DEFS += -DIOS_DEVICE_ENABLE endif ifeq ($(strip $(LED_ANIMATIONS)), yes) -# OPT_DEFS += -DRGBLIGHT_ANIMATIONS - OPT_DEFS += -DLED_ANIMATIONS +# OPT_DEFS += -DRGBLIGHT_ANIMATIONS + OPT_DEFS += -DLED_ANIMATIONS + +endif +ifeq ($(strip $(RGB_MATRIX_SPLIT_RIGHT)), yes) + OPT_DEFS += -DRGB_MATRIX_SPLIT_RIGHT endif ifeq ($(strip $(Link_Time_Optimization)),yes) - EXTRAFLAGS += -flto -DUSE_Link_Time_Optimization + EXTRAFLAGS += -flto -DUSE_Link_Time_Optimization endif # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE diff --git a/keyboards/zinc/keymaps/ginjake/config.h b/keyboards/zinc/keymaps/ginjake/config.h index 4dcb0724ff75..2185dc9ebe4c 100644 --- a/keyboards/zinc/keymaps/ginjake/config.h +++ b/keyboards/zinc/keymaps/ginjake/config.h @@ -20,8 +20,6 @@ along with this program. If not, see . */ #pragma once -// if you need more program area, try uncomment follow line -#include "serial_config_simpleapi.h" // place overrides here // Selection of RGBLIGHT MODE to use. diff --git a/keyboards/zinc/keymaps/ginjake/rules.mk b/keyboards/zinc/keymaps/ginjake/rules.mk index 2dcefc0016d0..2cb59fe8b85e 100644 --- a/keyboards/zinc/keymaps/ginjake/rules.mk +++ b/keyboards/zinc/keymaps/ginjake/rules.mk @@ -1,12 +1,11 @@ - # 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) +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 @@ -21,6 +20,8 @@ define ZINC_CUSTOMISE_MSG $(info Zinc customize) $(info - LED_BACK_ENABLE=$(LED_BACK_ENABLE)) $(info - LED_UNDERGLOW_ENABLE=$(LED_UNDERGLOW_ENABLE)) + $(info - LED_BOTH_ENABLE=$(LED_BOTH_ENABLE)) + $(info - LED_RGB_CONT=$(LED_RGB_CONT)) $(info - LED_ANIMATION=$(LED_ANIMATIONS)) $(info - IOS_DEVICE_ENABLE=$(IOS_DEVICE_ENABLE)) endef @@ -28,6 +29,8 @@ endef # Zinc keyboard customize LED_BACK_ENABLE = no # LED backlight (Enable SK6812mini backlight) LED_UNDERGLOW_ENABLE = no # LED underglow (Enable WS2812 RGB underlight) +LED_BOTH_ENABLE = no # LED backlight and underglow +LED_RGB_CONT = no # LED continuous backlight or/and underglow between left Zinc and right Zinc LED_ANIMATIONS = yes # LED animations IOS_DEVICE_ENABLE = no # connect to IOS device (iPad,iPhone) Link_Time_Optimization = no # if firmware size over limit, try this option @@ -37,7 +40,7 @@ Link_Time_Optimization = no # if firmware size over limit, try this option ### Zinc keyboard 'default' keymap: convenient command line option ## make ZINC= zinc:defualt -## option= back | under | na | ios +## option= back | under | both | cont | na | ios ## ex. ## make ZINC=under zinc:defualt ## make ZINC=under,ios zinc:defualt @@ -48,9 +51,16 @@ Link_Time_Optimization = no # if firmware size over limit, try this option ifneq ($(strip $(ZINC)),) ifeq ($(findstring back,$(ZINC)), back) LED_BACK_ENABLE = yes - else ifeq ($(findstring under,$(ZINC)), under) + endif + ifeq ($(findstring under,$(ZINC)), under) LED_UNDERGLOW_ENABLE = yes endif + ifeq ($(findstring both,$(ZINC)), both) + LED_BOTH_ENABLE = yes + endif + ifeq ($(findstring cont,$(ZINC)), cont) + LED_RGB_CONT = yes + endif ifeq ($(findstring na,$(ZINC)), na) LED_ANIMATIONS = no endif @@ -63,10 +73,11 @@ endif ifeq ($(strip $(LED_BACK_ENABLE)), yes) RGBLIGHT_ENABLE = yes - OPT_DEFS += -DRGBLED_BACK ifeq ($(strip $(LED_UNDERGLOW_ENABLE)), yes) - $(eval $(call ZINC_CUSTOMISE_MSG)) - $(error LED_BACK_ENABLE and LED_UNDERGLOW_ENABLE both 'yes') + OPT_DEFS += -DRGBLED_BOTH + $(info LED_BOTH_ENABLE option is enabled instead of LED_BACK_ENABLE and LED_UNDERGLOW_ENABLE) + else + OPT_DEFS += -DRGBLED_BACK endif else ifeq ($(strip $(LED_UNDERGLOW_ENABLE)), yes) RGBLIGHT_ENABLE = yes @@ -74,18 +85,27 @@ else RGBLIGHT_ENABLE = no endif +ifeq ($(strip $(LED_BOTH_ENABLE)), yes) + RGBLIGHT_ENABLE = yes + OPT_DEFS += -DRGBLED_BOTH +endif + +ifeq ($(strip $(LED_RGB_CONT)), yes) + OPT_DEFS += -DRGBLED_CONT +endif + ifeq ($(strip $(IOS_DEVICE_ENABLE)), yes) - OPT_DEFS += -DIOS_DEVICE_ENABLE + OPT_DEFS += -DIOS_DEVICE_ENABLE endif ifeq ($(strip $(LED_ANIMATIONS)), yes) -# OPT_DEFS += -DRGBLIGHT_ANIMATIONS - OPT_DEFS += -DLED_ANIMATIONS +# OPT_DEFS += -DRGBLIGHT_ANIMATIONS + OPT_DEFS += -DLED_ANIMATIONS endif ifeq ($(strip $(Link_Time_Optimization)),yes) - EXTRAFLAGS += -flto -DUSE_Link_Time_Optimization + EXTRAFLAGS += -flto -DUSE_Link_Time_Optimization endif # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE diff --git a/keyboards/zinc/keymaps/monks/config.h b/keyboards/zinc/keymaps/monks/config.h index 4dcb0724ff75..2185dc9ebe4c 100644 --- a/keyboards/zinc/keymaps/monks/config.h +++ b/keyboards/zinc/keymaps/monks/config.h @@ -20,8 +20,6 @@ along with this program. If not, see . */ #pragma once -// if you need more program area, try uncomment follow line -#include "serial_config_simpleapi.h" // place overrides here // Selection of RGBLIGHT MODE to use. diff --git a/keyboards/zinc/keymaps/monks/keymap.c b/keyboards/zinc/keymaps/monks/keymap.c index 5fd7c6aa857d..a30e8ac5fc1a 100644 --- a/keyboards/zinc/keymaps/monks/keymap.c +++ b/keyboards/zinc/keymaps/monks/keymap.c @@ -119,6 +119,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { \ // define variables for reactive RGB bool TOG_STATUS = false; + // 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)) { @@ -163,7 +164,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { } return false; break; - + case RAISE: if (record->event.pressed) { //not sure how to have keyboard check mode and set it to a variable, so my work around diff --git a/keyboards/zinc/keymaps/monks/readme_jp.md b/keyboards/zinc/keymaps/monks/readme_jp.md index f1495af4c8f0..e518eb7696df 100644 --- a/keyboards/zinc/keymaps/monks/readme_jp.md +++ b/keyboards/zinc/keymaps/monks/readme_jp.md @@ -100,4 +100,4 @@ RBG Underglow や RGBバックライトの輝度を抑えて、iPad, iPhone に ``` IOS_DEVICE_ENABLE = no # connect to IOS device (iPad,iPhone) -``` \ No newline at end of file +``` diff --git a/keyboards/zinc/keymaps/monks/rules.mk b/keyboards/zinc/keymaps/monks/rules.mk index eeabc004c376..c1b98deadaed 100644 --- a/keyboards/zinc/keymaps/monks/rules.mk +++ b/keyboards/zinc/keymaps/monks/rules.mk @@ -1,12 +1,11 @@ - # 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) +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 @@ -21,6 +20,8 @@ define ZINC_CUSTOMISE_MSG $(info Zinc customize) $(info - LED_BACK_ENABLE=$(LED_BACK_ENABLE)) $(info - LED_UNDERGLOW_ENABLE=$(LED_UNDERGLOW_ENABLE)) + $(info - LED_BOTH_ENABLE=$(LED_BOTH_ENABLE)) + $(info - LED_RGB_CONT=$(LED_RGB_CONT)) $(info - LED_ANIMATION=$(LED_ANIMATIONS)) $(info - IOS_DEVICE_ENABLE=$(IOS_DEVICE_ENABLE)) endef @@ -28,6 +29,8 @@ endef # Zinc keyboard customize LED_BACK_ENABLE = no # LED backlight (Enable SK6812mini backlight) LED_UNDERGLOW_ENABLE = no # LED underglow (Enable WS2812 RGB underlight) +LED_BOTH_ENABLE = no # LED backlight and underglow +LED_RGB_CONT = no # LED continuous backlight or/and underglow between left Zinc and right Zinc LED_ANIMATIONS = yes # LED animations IOS_DEVICE_ENABLE = no # connect to IOS device (iPad,iPhone) Link_Time_Optimization = no # if firmware size over limit, try this option @@ -37,7 +40,7 @@ Link_Time_Optimization = no # if firmware size over limit, try this option ### Zinc keyboard 'default' keymap: convenient command line option ## make ZINC= zinc:defualt -## option= back | under | na | ios +## option= back | under | both | cont | na | ios ## ex. ## make ZINC=under zinc:defualt ## make ZINC=under,ios zinc:defualt @@ -48,9 +51,16 @@ Link_Time_Optimization = no # if firmware size over limit, try this option ifneq ($(strip $(ZINC)),) ifeq ($(findstring back,$(ZINC)), back) LED_BACK_ENABLE = yes - else ifeq ($(findstring under,$(ZINC)), under) + endif + ifeq ($(findstring under,$(ZINC)), under) LED_UNDERGLOW_ENABLE = yes endif + ifeq ($(findstring both,$(ZINC)), both) + LED_BOTH_ENABLE = yes + endif + ifeq ($(findstring cont,$(ZINC)), cont) + LED_RGB_CONT = yes + endif ifeq ($(findstring na,$(ZINC)), na) LED_ANIMATIONS = no endif @@ -63,10 +73,11 @@ endif ifeq ($(strip $(LED_BACK_ENABLE)), yes) RGBLIGHT_ENABLE = yes - OPT_DEFS += -DRGBLED_BACK ifeq ($(strip $(LED_UNDERGLOW_ENABLE)), yes) - $(eval $(call ZINC_CUSTOMISE_MSG)) - $(error LED_BACK_ENABLE and LED_UNDERGLOW_ENABLE both 'yes') + OPT_DEFS += -DRGBLED_BOTH + $(info LED_BOTH_ENABLE option is enabled instead of LED_BACK_ENABLE and LED_UNDERGLOW_ENABLE) + else + OPT_DEFS += -DRGBLED_BACK endif else ifeq ($(strip $(LED_UNDERGLOW_ENABLE)), yes) RGBLIGHT_ENABLE = yes @@ -74,17 +85,27 @@ else RGBLIGHT_ENABLE = no endif +ifeq ($(strip $(LED_BOTH_ENABLE)), yes) + RGBLIGHT_ENABLE = yes + OPT_DEFS += -DRGBLED_BOTH +endif + +ifeq ($(strip $(LED_RGB_CONT)), yes) + OPT_DEFS += -DRGBLED_CONT +endif + ifeq ($(strip $(IOS_DEVICE_ENABLE)), yes) - OPT_DEFS += -DIOS_DEVICE_ENABLE + OPT_DEFS += -DIOS_DEVICE_ENABLE endif ifeq ($(strip $(LED_ANIMATIONS)), yes) -# OPT_DEFS += -DRGBLIGHT_ANIMATIONS - OPT_DEFS += -DLED_ANIMATIONS +# OPT_DEFS += -DRGBLIGHT_ANIMATIONS + OPT_DEFS += -DLED_ANIMATIONS + endif ifeq ($(strip $(Link_Time_Optimization)),yes) - EXTRAFLAGS += -flto -DUSE_Link_Time_Optimization + EXTRAFLAGS += -flto -DUSE_Link_Time_Optimization endif # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE @@ -94,4 +115,3 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend # $(info -- RGBLIGHT_ENABLE=$(RGBLIGHT_ENABLE)) # $(info -- OPT_DEFS=$(OPT_DEFS)) # $(info ) - diff --git a/keyboards/zinc/keymaps/toshi0383/config.h b/keyboards/zinc/keymaps/toshi0383/config.h index 33108a29e6f2..0d53d44247d5 100644 --- a/keyboards/zinc/keymaps/toshi0383/config.h +++ b/keyboards/zinc/keymaps/toshi0383/config.h @@ -21,8 +21,6 @@ along with this program. If not, see . */ #pragma once -// if you need more program area, try uncomment follow line -#include "serial_config_simpleapi.h" // place overrides here // Selection of RGBLIGHT MODE to use. diff --git a/keyboards/zinc/keymaps/toshi0383/rules.mk b/keyboards/zinc/keymaps/toshi0383/rules.mk index dca9aa7ff8cc..26ac02f3a0cb 100644 --- a/keyboards/zinc/keymaps/toshi0383/rules.mk +++ b/keyboards/zinc/keymaps/toshi0383/rules.mk @@ -1,11 +1,12 @@ # Build Options -# change yes to no to disable +# 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 +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 +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 @@ -19,6 +20,9 @@ define ZINC_CUSTOMISE_MSG $(info Zinc customize) $(info - LED_BACK_ENABLE=$(LED_BACK_ENABLE)) $(info - LED_UNDERGLOW_ENABLE=$(LED_UNDERGLOW_ENABLE)) + $(info - LED_BOTH_ENABLE=$(LED_BOTH_ENABLE)) + $(info - LED_RGB_CONT=$(LED_RGB_CONT)) + $(info - RGB_MATRIX=$(RGB_MATRIX)) $(info - LED_ANIMATION=$(LED_ANIMATIONS)) $(info - IOS_DEVICE_ENABLE=$(IOS_DEVICE_ENABLE)) endef @@ -26,6 +30,10 @@ endef # Zinc keyboard customize LED_BACK_ENABLE = no # LED backlight (Enable SK6812mini backlight) LED_UNDERGLOW_ENABLE = no # LED underglow (Enable WS2812 RGB underlight) +LED_BOTH_ENABLE = no # LED backlight and underglow +LED_RGB_CONT = no # LED continuous backlight or/and underglow between left Zinc and right Zinc +RGB_MATRIX = no # RGB LED Matrix +RGB_MATRIX_SPLIT_RIGHT = no # RGB Matrix for RIGHT Hand LED_ANIMATIONS = yes # LED animations IOS_DEVICE_ENABLE = no # connect to IOS device (iPad,iPhone) Link_Time_Optimization = no # if firmware size over limit, try this option @@ -35,7 +43,7 @@ Link_Time_Optimization = no # if firmware size over limit, try this option ### Zinc keyboard 'default' keymap: convenient command line option ## make ZINC= zinc:defualt -## option= back | under | na | ios +## option= back | under | both | cont | matrix | na | ios ## ex. ## make ZINC=under zinc:defualt ## make ZINC=under,ios zinc:defualt @@ -46,9 +54,22 @@ Link_Time_Optimization = no # if firmware size over limit, try this option ifneq ($(strip $(ZINC)),) ifeq ($(findstring back,$(ZINC)), back) LED_BACK_ENABLE = yes - else ifeq ($(findstring under,$(ZINC)), under) + endif + ifeq ($(findstring under,$(ZINC)), under) LED_UNDERGLOW_ENABLE = yes endif + ifeq ($(findstring both,$(ZINC)), both) + LED_BOTH_ENABLE = yes + endif + ifeq ($(findstring cont,$(ZINC)), cont) + LED_RGB_CONT = yes + endif + ifeq ($(findstring matrix,$(ZINC)), matrix) + RGB_MATRIX = yes + endif + ifeq ($(findstring right,$(ZINC)), right) + RGB_MATRIX_SPLIT_RIGHT = yes + endif ifeq ($(findstring na,$(ZINC)), na) LED_ANIMATIONS = no endif @@ -61,10 +82,11 @@ endif ifeq ($(strip $(LED_BACK_ENABLE)), yes) RGBLIGHT_ENABLE = yes - OPT_DEFS += -DRGBLED_BACK ifeq ($(strip $(LED_UNDERGLOW_ENABLE)), yes) - $(eval $(call ZINC_CUSTOMISE_MSG)) - $(error LED_BACK_ENABLE and LED_UNDERGLOW_ENABLE both 'yes') + OPT_DEFS += -DRGBLED_BOTH + $(info LED_BOTH_ENABLE option is enabled instead of LED_BACK_ENABLE and LED_UNDERGLOW_ENABLE) + else + OPT_DEFS += -DRGBLED_BACK endif else ifeq ($(strip $(LED_UNDERGLOW_ENABLE)), yes) RGBLIGHT_ENABLE = yes @@ -72,24 +94,43 @@ else RGBLIGHT_ENABLE = no endif +ifeq ($(strip $(LED_BOTH_ENABLE)), yes) + RGBLIGHT_ENABLE = yes + OPT_DEFS += -DRGBLED_BOTH +endif + +ifeq ($(strip $(LED_RGB_CONT)), yes) + OPT_DEFS += -DRGBLED_CONT +endif + +ifeq ($(strip $(RGB_MATRIX)), yes) + RGBLIGHT_ENABLE = no + RGB_MATRIX_ENABLE = WS2812 +endif + ifeq ($(strip $(IOS_DEVICE_ENABLE)), yes) - OPT_DEFS += -DIOS_DEVICE_ENABLE + OPT_DEFS += -DIOS_DEVICE_ENABLE endif ifeq ($(strip $(LED_ANIMATIONS)), yes) -# OPT_DEFS += -DRGBLIGHT_ANIMATIONS - OPT_DEFS += -DLED_ANIMATIONS +# OPT_DEFS += -DRGBLIGHT_ANIMATIONS + OPT_DEFS += -DLED_ANIMATIONS + +endif + +ifeq ($(strip $(RGB_MATRIX_SPLIT_RIGHT)), yes) + OPT_DEFS += -DRGB_MATRIX_SPLIT_RIGHT endif ifeq ($(strip $(Link_Time_Optimization)),yes) - EXTRAFLAGS += -flto -DUSE_Link_Time_Optimization + EXTRAFLAGS += -flto -DUSE_Link_Time_Optimization 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 + # Uncomment these for debugging # $(info -- RGBLIGHT_ENABLE=$(RGBLIGHT_ENABLE)) # $(info -- OPT_DEFS=$(OPT_DEFS)) # $(info ) - diff --git a/keyboards/zinc/readme.md b/keyboards/zinc/readme.md index 3b4ce105c8bd..0e8d6cd65dfd 100644 --- a/keyboards/zinc/readme.md +++ b/keyboards/zinc/readme.md @@ -5,9 +5,9 @@ Zinc 40% row-staggered split keyboard. -Keyboard Maintainer: [monksoffunk](https://github.com/monksoffunk/) [@monksoffunkJP](https://twitter.com/monksoffunkJP) -Hardware Supported: Zinc PCB -Hardware Availability: (https://twitter.com/monksoffunkJP) +* Keyboard Maintainer: [monksoffunk](https://github.com/monksoffunk/) [@monksoffunkJP](https://twitter.com/monksoffunkJP) +* Hardware Supported: Zinc PCB +* Hardware Availability: (https://twitter.com/monksoffunkJP) Make example for this keyboard (after setting up your build environment): diff --git a/keyboards/zinc/rev1/config.h b/keyboards/zinc/rev1/config.h index 6713b3098a39..1eb63df5bc86 100644 --- a/keyboards/zinc/rev1/config.h +++ b/keyboards/zinc/rev1/config.h @@ -18,9 +18,6 @@ along with this program. If not, see . #pragma once -//#ifndef REV1_CONFIG_H -//#define REV1_CONFIG_H - /* USB Device descriptor parameter */ #define VENDOR_ID 0xFEED #define PRODUCT_ID 0x9991 @@ -33,9 +30,8 @@ along with this program. If not, see . #define TAPPING_TERM 100 /* Use I2C or Serial */ -//#define USE_I2C #define USE_SERIAL -//#define USE_MATRIX_I2C +#define SOFT_SERIAL_PIN D2 /* Select hand configuration */ #define MASTER_LEFT @@ -44,18 +40,14 @@ along with this program. If not, see . /* key matrix size */ // Rows are doubled-up - #define MATRIX_ROWS 8 - #define MATRIX_ROW_PINS { F6, F7, B1, B3 } +#define MATRIX_ROWS 8 +#define MATRIX_ROW_PINS { F6, F7, B1, B3 } // wiring of each half #define MATRIX_COLS 6 #define MATRIX_COL_PINS { F4, D4, C6, D7, E6, B4 } -/* define if matrix has ghost */ -//#define MATRIX_HAS_GHOST - -/* number of backlight levels */ -// #define BACKLIGHT_LEVELS 3 +#define DIODE_DIRECTION COL2ROW /* Set 0 if debouncing isn't needed */ #define DEBOUNCE 5 @@ -67,25 +59,44 @@ along with this program. If not, see . /* 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 // 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 -#ifdef RGBLED_BACK - #define RGBLED_NUM 24 -#else - #define RGBLED_NUM 6 +#ifdef RGBLIGHT_ENABLE + #define RGBLIGHT_SPLIT + #ifdef RGBLED_BACK + #ifdef RGBLED_CONT + #define RGBLED_NUM 48 + #define RGBLED_SPLIT { 24, 24 } + #else + #define RGBLED_NUM 24 + #endif + #else + #ifdef RGBLED_BOTH + #ifdef RGBLED_CONT + #define RGBLED_NUM 60 + #define RGBLED_SPLIT { 30, 30 } +// #define RGBLIGHT_LED_MAP {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,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} + #else + #define RGBLED_NUM 30 + #endif + #else + #ifdef RGBLED_CONT + #define RGBLED_NUM 12 + #define RGBLED_SPLIT { 6, 6 } + #else + #define RGBLED_NUM 6 + #endif + #endif + #endif #endif #ifndef IOS_DEVICE_ENABLE - #if RGBLED_NUM <= 6 + #if (RGBLED_NUM <= 6) || (defined(RGBLED_CONT) && (RGBLED_NUM <= 12)) #define RGBLIGHT_LIMIT_VAL 255 #else - #if RGBLED_NUM <= 16 + #if (RGBLED_NUM <= 16) || (defined(RGBLED_CONT) && (RGBLED_NUM <= 32)) #define RGBLIGHT_LIMIT_VAL 130 #else #define RGBLIGHT_LIMIT_VAL 120 @@ -93,10 +104,10 @@ along with this program. If not, see . #endif #define RGBLIGHT_VAL_STEP 17 #else - #if RGBLED_NUM <= 6 + #if (RGBLED_NUM <= 6) || (defined(RGBLED_CONT) && (RGBLED_NUM <= 12)) #define RGBLIGHT_LIMIT_VAL 90 #else - #if RGBLED_NUM <= 16 + #if (RGBLED_NUM <= 16) || (defined(RGBLED_CONT) && (RGBLED_NUM <= 32)) #define RGBLIGHT_LIMIT_VAL 45 #else #define RGBLIGHT_LIMIT_VAL 35 @@ -136,5 +147,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/zinc/rev1/matrix.c b/keyboards/zinc/rev1/matrix.c deleted file mode 100644 index df674ce14397..000000000000 --- a/keyboards/zinc/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 "quantum.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(); - - setPinOutput(B0); - setPinOutput(D5); - writePinHigh(D5); - writePinHigh(B0); - - // 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) writePinLow(B0); - return 1; - } - writePinHigh(B0); - 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 - writePinLow(D5); - - 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 - writePinHigh(D5); - 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/zinc/rev1/rev1.c b/keyboards/zinc/rev1/rev1.c index 2ce08a07c435..a9c2cfdbaca9 100644 --- a/keyboards/zinc/rev1/rev1.c +++ b/keyboards/zinc/rev1/rev1.c @@ -3,4 +3,3 @@ void matrix_init_kb(void) { matrix_init_user(); }; - diff --git a/keyboards/zinc/rev1/rev1.h b/keyboards/zinc/rev1/rev1.h index aa1c408b0bf6..1bf2c565aecc 100644 --- a/keyboards/zinc/rev1/rev1.h +++ b/keyboards/zinc/rev1/rev1.h @@ -1,22 +1,7 @@ #pragma once -#include "../zinc.h" - #include "quantum.h" -#ifdef RGBLIGHT_ENABLE -//rgb led driver -#include "ws2812.h" -#endif - -#ifdef USE_I2C -#include -#ifdef __AVR__ - #include - #include -#endif -#endif - // Standard Keymap // (TRRS jack on both halves are to the left side) #define LAYOUT( \ diff --git a/keyboards/zinc/rev1/rules.mk b/keyboards/zinc/rev1/rules.mk index e78b9258d770..d38a61809075 100644 --- a/keyboards/zinc/rev1/rules.mk +++ b/keyboards/zinc/rev1/rules.mk @@ -1,4 +1 @@ -SRC += rev1/matrix.c -SRC += rev1/split_util.c -SRC += rev1/split_scomm.c -SRC += ws2812.c +SPLIT_KEYBOARD = yes diff --git a/keyboards/zinc/rev1/serial_config.h b/keyboards/zinc/rev1/serial_config.h deleted file mode 100644 index 9fb5dfc67149..000000000000 --- a/keyboards/zinc/rev1/serial_config.h +++ /dev/null @@ -1,18 +0,0 @@ -#ifndef SOFT_SERIAL_CONFIG_H -#define SOFT_SERIAL_CONFIG_H - -#ifndef SOFT_SERIAL_PIN -/* Soft Serial defines */ -#define SOFT_SERIAL_PIN D2 -// 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 -#endif - -//// USE flexible API (using multi-type transaction function) -#define SERIAL_USE_MULTI_TRANSACTION - -#endif /* SOFT_SERIAL_CONFIG_H */ diff --git a/keyboards/zinc/rev1/serial_config_simpleapi.h b/keyboards/zinc/rev1/serial_config_simpleapi.h deleted file mode 100644 index e2d22a41e7bc..000000000000 --- a/keyboards/zinc/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/zinc/rev1/split_scomm.c b/keyboards/zinc/rev1/split_scomm.c deleted file mode 100644 index 50d233ce9afd..000000000000 --- a/keyboards/zinc/rev1/split_scomm.c +++ /dev/null @@ -1,95 +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 SERIAL_DEBUG_MODE -#include -#endif -#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/zinc/rev1/split_scomm.h b/keyboards/zinc/rev1/split_scomm.h deleted file mode 100644 index 873d8939d81f..000000000000 --- a/keyboards/zinc/rev1/split_scomm.h +++ /dev/null @@ -1,24 +0,0 @@ -#ifndef SPLIT_COMM_H -#define SPLIT_COMM_H - -#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 - -#endif /* SPLIT_COMM_H */ diff --git a/keyboards/zinc/rev1/split_util.c b/keyboards/zinc/rev1/split_util.c deleted file mode 100644 index e1ff8b4379dc..000000000000 --- a/keyboards/zinc/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); - -#endif diff --git a/keyboards/zinc/reva/config.h b/keyboards/zinc/reva/config.h index 8eeb154acca1..e94ffb7c65f5 100644 --- a/keyboards/zinc/reva/config.h +++ b/keyboards/zinc/reva/config.h @@ -30,9 +30,8 @@ along with this program. If not, see . #define TAPPING_TERM 100 /* Use I2C or Serial */ -//#define USE_I2C #define USE_SERIAL -//#define USE_MATRIX_I2C +#define SOFT_SERIAL_PIN D2 /* Select hand configuration */ #define MASTER_LEFT @@ -41,18 +40,14 @@ along with this program. If not, see . /* key matrix size */ // Rows are doubled-up - #define MATRIX_ROWS 8 - #define MATRIX_ROW_PINS { D4, C6, D7, E6 } +#define MATRIX_ROWS 8 +#define MATRIX_ROW_PINS { D4, C6, D7, E6 } // wiring of each half #define MATRIX_COLS 6 #define MATRIX_COL_PINS { F4, F5, F6, F7, B1, B3} -/* define if matrix has ghost */ -//#define MATRIX_HAS_GHOST - -/* number of backlight levels */ -// #define BACKLIGHT_LEVELS 3 +#define DIODE_DIRECTION COL2ROW /* Set 0 if debouncing isn't needed */ #define DEBOUNCE 5 @@ -64,25 +59,44 @@ along with this program. If not, see . /* ws2812 RGB LED */ #define RGB_DI_PIN D3 -#define RGBLIGHT_TIMER -//#define RGBLED_NUM 24 // Number of LEDs. see ./keymaps/default/config.h -#define ws2812_PORTREG PORTD -#define ws2812_DDRREG DDRD // 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 -#ifdef RGBLED_BACK - #define RGBLED_NUM 24 -#else - #define RGBLED_NUM 6 +#ifdef RGBLIGHT_ENABLE + #define RGBLIGHT_SPLIT + #ifdef RGBLED_BACK + #ifdef RGBLED_CONT + #define RGBLED_NUM 48 + #define RGBLED_SPLIT { 24, 24 } + #else + #define RGBLED_NUM 24 + #endif + #else + #ifdef RGBLED_BOTH + #ifdef RGBLED_CONT + #define RGBLED_NUM 60 + #define RGBLED_SPLIT { 30, 30 } +// #define RGBLIGHT_LED_MAP {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,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} + #else + #define RGBLED_NUM 30 + #endif + #else + #ifdef RGBLED_CONT + #define RGBLED_NUM 12 + #define RGBLED_SPLIT { 6, 6 } + #else + #define RGBLED_NUM 6 + #endif + #endif + #endif #endif #ifndef IOS_DEVICE_ENABLE - #if RGBLED_NUM <= 6 + #if (RGBLED_NUM <= 6) || (defined(RGBLED_CONT) && (RGBLED_NUM <= 12)) #define RGBLIGHT_LIMIT_VAL 255 #else - #if RGBLED_NUM <= 16 + #if (RGBLED_NUM <= 16) || (defined(RGBLED_CONT) && (RGBLED_NUM <= 32)) #define RGBLIGHT_LIMIT_VAL 130 #else #define RGBLIGHT_LIMIT_VAL 120 @@ -90,10 +104,10 @@ along with this program. If not, see . #endif #define RGBLIGHT_VAL_STEP 17 #else - #if RGBLED_NUM <= 6 + #if (RGBLED_NUM <= 6) || (defined(RGBLED_CONT) && (RGBLED_NUM <= 12)) #define RGBLIGHT_LIMIT_VAL 90 #else - #if RGBLED_NUM <= 16 + #if (RGBLED_NUM <= 16) || (defined(RGBLED_CONT) && (RGBLED_NUM <= 32)) #define RGBLIGHT_LIMIT_VAL 45 #else #define RGBLIGHT_LIMIT_VAL 35 diff --git a/keyboards/zinc/reva/matrix.c b/keyboards/zinc/reva/matrix.c deleted file mode 100644 index 5b58500db82c..000000000000 --- a/keyboards/zinc/reva/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 "quantum.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(); - - setPinOutput(B0); - setPinOutput(D5); - writePinHigh(B0); - writePinHigh(D5); - - // 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) writePinLow(B0); - return 1; - } - writePinHigh(B0); - 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 - writePinLow(D5); - - 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 - writePinHigh(D5); - 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/zinc/reva/reva.c b/keyboards/zinc/reva/reva.c index 2ce08a07c435..a9c2cfdbaca9 100644 --- a/keyboards/zinc/reva/reva.c +++ b/keyboards/zinc/reva/reva.c @@ -3,4 +3,3 @@ void matrix_init_kb(void) { matrix_init_user(); }; - diff --git a/keyboards/zinc/reva/reva.h b/keyboards/zinc/reva/reva.h index aa1c408b0bf6..1bf2c565aecc 100644 --- a/keyboards/zinc/reva/reva.h +++ b/keyboards/zinc/reva/reva.h @@ -1,22 +1,7 @@ #pragma once -#include "../zinc.h" - #include "quantum.h" -#ifdef RGBLIGHT_ENABLE -//rgb led driver -#include "ws2812.h" -#endif - -#ifdef USE_I2C -#include -#ifdef __AVR__ - #include - #include -#endif -#endif - // Standard Keymap // (TRRS jack on both halves are to the left side) #define LAYOUT( \ diff --git a/keyboards/zinc/reva/rules.mk b/keyboards/zinc/reva/rules.mk index 3ea61267a254..83895bdcb878 100644 --- a/keyboards/zinc/reva/rules.mk +++ b/keyboards/zinc/reva/rules.mk @@ -1,4 +1 @@ -SRC += reva/matrix.c -SRC += reva/split_util.c -SRC += reva/split_scomm.c -SRC += ws2812.c +SPLIT_KEYBOARD = yes \ No newline at end of file diff --git a/keyboards/zinc/reva/serial_config.h b/keyboards/zinc/reva/serial_config.h deleted file mode 100644 index 9fb5dfc67149..000000000000 --- a/keyboards/zinc/reva/serial_config.h +++ /dev/null @@ -1,18 +0,0 @@ -#ifndef SOFT_SERIAL_CONFIG_H -#define SOFT_SERIAL_CONFIG_H - -#ifndef SOFT_SERIAL_PIN -/* Soft Serial defines */ -#define SOFT_SERIAL_PIN D2 -// 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 -#endif - -//// USE flexible API (using multi-type transaction function) -#define SERIAL_USE_MULTI_TRANSACTION - -#endif /* SOFT_SERIAL_CONFIG_H */ diff --git a/keyboards/zinc/reva/serial_config_simpleapi.h b/keyboards/zinc/reva/serial_config_simpleapi.h deleted file mode 100644 index e2d22a41e7bc..000000000000 --- a/keyboards/zinc/reva/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/zinc/reva/split_scomm.c b/keyboards/zinc/reva/split_scomm.c deleted file mode 100644 index 50d233ce9afd..000000000000 --- a/keyboards/zinc/reva/split_scomm.c +++ /dev/null @@ -1,95 +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 SERIAL_DEBUG_MODE -#include -#endif -#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/zinc/reva/split_scomm.h b/keyboards/zinc/reva/split_scomm.h deleted file mode 100644 index 873d8939d81f..000000000000 --- a/keyboards/zinc/reva/split_scomm.h +++ /dev/null @@ -1,24 +0,0 @@ -#ifndef SPLIT_COMM_H -#define SPLIT_COMM_H - -#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 - -#endif /* SPLIT_COMM_H */ diff --git a/keyboards/zinc/reva/split_util.c b/keyboards/zinc/reva/split_util.c deleted file mode 100644 index e1ff8b4379dc..000000000000 --- a/keyboards/zinc/reva/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); - -#endif diff --git a/keyboards/zinc/rules.mk b/keyboards/zinc/rules.mk index 63a8cc8fc3db..36e717d60a01 100644 --- a/keyboards/zinc/rules.mk +++ b/keyboards/zinc/rules.mk @@ -27,12 +27,8 @@ 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. -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 -CUSTOM_MATRIX = yes DEFAULT_FOLDER = zinc/rev1 diff --git a/keyboards/zinc/serial.c b/keyboards/zinc/serial.c deleted file mode 100644 index f6293c3dc231..000000000000 --- a/keyboards/zinc/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 //////////////////////////////// -#ifndef SERIAL_USE_MULTI_TRANSACTION -/* --- USE Simple API (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 Simple API (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/zinc/serial.h b/keyboards/zinc/serial.h deleted file mode 100644 index 7e0c0847a431..000000000000 --- a/keyboards/zinc/serial.h +++ /dev/null @@ -1,84 +0,0 @@ -#ifndef SOFT_SERIAL_H -#define SOFT_SERIAL_H - -#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 Simple API (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 flexible API (using multi-type transaction function) -// #define SERIAL_USE_MULTI_TRANSACTION -// -// ///////////////////////////////////////////////////////////////// - - -#ifndef SERIAL_USE_MULTI_TRANSACTION -/* --- USE Simple API (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 // USE Simple 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 - -#endif /* SOFT_SERIAL_H */ diff --git a/keyboards/zinc/zinc.h b/keyboards/zinc/zinc.h index 87d889da0332..dedc9253b0ef 100644 --- a/keyboards/zinc/zinc.h +++ b/keyboards/zinc/zinc.h @@ -1,5 +1,4 @@ -#ifndef ZINC_H -#define ZINC_H +#pragma once #ifdef KEYBOARD_zinc_reva #include "reva.h" @@ -8,7 +7,4 @@ #include "rev1.h" #endif - #include "quantum.h" - -#endif diff --git a/layouts/community/60_iso/unxmaal/keymap.c b/layouts/community/60_iso/unxmaal/keymap.c index 455d969f4707..9441997b4bf2 100644 --- a/layouts/community/60_iso/unxmaal/keymap.c +++ b/layouts/community/60_iso/unxmaal/keymap.c @@ -108,8 +108,6 @@ enum function_id { }; const uint16_t PROGMEM fn_actions[] = { - [1] = ACTION_LAYER_TOGGLE(1), // Toggle Arrow Layer overlay - [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 [6] = ACTION_FUNCTION(RGBLED_INCREASE_HUE), diff --git a/layouts/community/ergodox/algernon/keymap.c b/layouts/community/ergodox/algernon/keymap.c index fb6de1b721d5..e6e9bdaf7f03 100644 --- a/layouts/community/ergodox/algernon/keymap.c +++ b/layouts/community/ergodox/algernon/keymap.c @@ -79,9 +79,6 @@ enum { F_BSE = 0, F_HUN, F_GUI, - F_SFT, - F_ALT, - F_CTRL }; /* Custom keycodes */ @@ -146,9 +143,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ,KC_MPLY ,KC_SLSH ,KC_Q ,KC_J ,KC_K ,KC_X ,TD(CT_TMUX) ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,TD(CT_CLN) - ,F(F_ALT),F(F_GUI) - ,F(F_CTRL) - ,KC_BSPC,F(F_SFT),KC_ESC + ,OSM(MOD_LALT),F(F_GUI) + ,OSM(MOD_LCTL) + ,KC_BSPC,OSM(MOD_LSFT),KC_ESC // right hand ,M(Fx) ,M(A_0) ,M(A_2) ,M(A_4) ,M(A_6) ,M(A_8) ,M(A_PLVR) @@ -191,9 +188,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ,KC_NO ,KC_Z ,KC_Q ,KC_QUOT ,KC_COMM ,KC_DOT ,TD(CT_TMUX) ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,TD(CT_CLN) - ,F(F_ALT),F(F_GUI) - ,F(F_CTRL) - ,KC_BSPC,F(F_SFT),KC_ESC + ,OSM(MOD_LALT),F(F_GUI) + ,OSM(MOD_LCTL) + ,KC_BSPC,OSM(F_LSFT),KC_ESC // right hand ,M(Fx) ,M(A_0) ,M(A_2) ,M(A_4) ,M(A_6) ,M(A_8) ,M(A_PLVR) @@ -440,9 +437,6 @@ const uint16_t PROGMEM fn_actions[] = { [F_BSE] = ACTION_LAYER_CLEAR(ON_PRESS) ,[F_HUN] = ACTION_LAYER_INVERT(HUN, ON_PRESS) ,[F_GUI] = ACTION_MACRO_TAP(A_GUI) - ,[F_SFT] = ACTION_MODS_ONESHOT (MOD_LSFT) - ,[F_ALT] = ACTION_MODS_ONESHOT (MOD_LALT) - ,[F_CTRL] = ACTION_MODS_ONESHOT (MOD_LCTL) }; static void toggle_steno(int pressed) diff --git a/layouts/community/ergodox/colemak_osx_pc_no/keymap.c b/layouts/community/ergodox/colemak_osx_pc_no/keymap.c index 189ff5c43d4f..a4a453349493 100644 --- a/layouts/community/ergodox/colemak_osx_pc_no/keymap.c +++ b/layouts/community/ergodox/colemak_osx_pc_no/keymap.c @@ -41,7 +41,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { MO(4), KC_BTN1, KC_BTN2, KC_TAB,GUI_T(KC_COMMA), NO_AMPR, NO_PIPE, NO_PLUS, - KC_FN1,CTL_T(KC_DOT),ALT_T(NO_MINS), + OSM(MOD_LSFT),CTL_T(KC_DOT),ALT_T(NO_MINS), // right hand KC_FN5, NO_DLR, NO_LPRN, NO_RPRN ,KC_FN3, KC_FN4,NO_AT, NO_APOS, KC_J, KC_L, KC_U, KC_Y, NO_AA, NO_AE , @@ -222,7 +222,6 @@ enum macro_id { }; const uint16_t PROGMEM fn_actions[] = { - [1] = ACTION_MODS_ONESHOT(MOD_LSFT), // Sticky shift light. Tap for the next keypress to be shifted. Hold for regular shift. [2] = ACTION_MACRO(TILDE_NO), // Completed ~ character(pc and mac), no space needed. [3] = ACTION_MACRO(LESS_NO), // < completed on keypress down, to avoid shifting the next character if it is not released first. [4] = ACTION_MACRO(GRTR_NO), // > completed on keypress down, to avoid shifting the next character if it is not released first. diff --git a/layouts/community/ergodox/drashna/keymap.c b/layouts/community/ergodox/drashna/keymap.c index 69066a47cc48..cb256e5e57b8 100644 --- a/layouts/community/ergodox/drashna/keymap.c +++ b/layouts/community/ergodox/drashna/keymap.c @@ -457,7 +457,7 @@ void rgb_matrix_indicators_user(void) { #endif // RGB_MATRIX_INIT -uint16_t get_tapping_term(uint16_t keycode) { +uint16_t get_tapping_term(uint16_t keycode, keyrecord_t *record) { if (keycode >= QK_MOD_TAP && keycode <= QK_MOD_TAP_MAX) { if (mod_config(keycode & 0xf) & MOD_MASK_ALT) { return (2 * TAPPING_TERM); diff --git a/layouts/community/ergodox/guni/keymap.c b/layouts/community/ergodox/guni/keymap.c index 14d6f8d3ad1a..ff1dd72eb09d 100644 --- a/layouts/community/ergodox/guni/keymap.c +++ b/layouts/community/ergodox/guni/keymap.c @@ -7,7 +7,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { LAYOUT_ergodox( // layer 0 : default // 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, + MT(MOD_LCTL, KC_TAB) , KC_Q, KC_W, KC_E, KC_R, KC_T, KC_HOME, 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, @@ -16,13 +16,13 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_BSPC,KC_DEL ,KC_FN23, // 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_END , KC_Y, KC_U , KC_I, KC_O, KC_P, MT(MOD_RCTL, KC_BSLS), 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_PGDN , KC_N, KC_M , KC_COMM,KC_DOT, KC_SLSH,MT(MOD_RSFT, KC_ESC), KC_RALT , KC_DOWN,KC_UP, KC_NO ,KC_RGUI, KC_NO , KC_NO, KC_NO , - KC_FN29,KC_ENT ,KC_SPC + MT(MOD_RSFT, KC_ESC),KC_ENT ,KC_SPC ), LAYOUT_ergodox( // layer 1 : function and symbol keys @@ -122,20 +122,9 @@ enum function_id { const uint16_t PROGMEM fn_actions[] = { [0] = ACTION_FUNCTION(TEENSY_KEY), // FN0 - Teensy key [1] = ACTION_LAYER_SET(0, ON_PRESS), - //[11] = ACTION_MODS_KEY(MOD_LSFT, KC_COMM), - //[12] = ACTION_MODS_KEY(MOD_LSFT, KC_DOT), - - //[14] = ACTION_MODS_KEY(MOD_LSFT, KC_SLSH), - //[17] = ACTION_MODS_KEY(MOD_LSFT, KC_SCLN), - //[20] = ACTION_MODS_KEY(MOD_LSFT, KC_5), - //[21] = ACTION_MODS_KEY(MOD_LSFT, KC_QUOT), [23] = ACTION_LAYER_SET(3, ON_PRESS), [24] = ACTION_LAYER_SET(2, ON_PRESS), - [25] = ACTION_MODS_TAP_KEY(MOD_LCTL, KC_TAB), [26] = ACTION_LAYER_SET(1, ON_PRESS), - [28] = ACTION_MODS_TAP_KEY(MOD_RCTL,KC_BSLS), - //[29] = ACTION_LAYER_TOGGLE(4), - [29] = ACTION_MODS_TAP_KEY(MOD_RSFT,KC_ESC), }; diff --git a/layouts/community/ergodox/kastyle/keymap.c b/layouts/community/ergodox/kastyle/keymap.c index 923715477bbf..32eec96f506a 100644 --- a/layouts/community/ergodox/kastyle/keymap.c +++ b/layouts/community/ergodox/kastyle/keymap.c @@ -39,7 +39,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, TG(1), KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_LSFT, CTL_T(KC_Z), KC_X, KC_C, KC_V, KC_B, ALL_T(KC_NO), - KC_FN1, KC_BSLS, LALT(KC_LSFT), KC_LEFT, KC_RGHT, + SH_T(KC_GRV), KC_BSLS, LALT(KC_LSFT), KC_LEFT, KC_RGHT, KC_LGUI, ALT_T(KC_ESC), KC_HOME, KC_BSPC, KC_DEL, KC_END, @@ -48,7 +48,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { TG(1), KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS, KC_H, KC_J, KC_K, KC_L, LT(MDIA, KC_SCLN), KC_QUOT, MEH_T(KC_NO), KC_N, KC_M, KC_COMM, KC_DOT, CTL_T(KC_SLSH), KC_RSFT, - KC_UP, KC_DOWN, KC_LBRC, KC_RBRC, KC_FN1, + KC_UP, KC_DOWN, KC_LBRC, KC_RBRC, SH_T(KC_GRV), ALT_T(KC_ESC), KC_RGUI, KC_PGUP, KC_PGDN, KC_ENT, KC_SPC @@ -155,10 +155,6 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) return MACRO_NONE; }; -const uint16_t PROGMEM fn_actions[] = { - [1] = ACTION_SWAP_HANDS_TAP_KEY(KC_GRV) // FN1 - Tap = Grave/Tilde - Hold Momentary swap hands -}; - // Runs just one time when the keyboard initializes. void matrix_init_user(void) { diff --git a/layouts/community/ergodox/mpiechotka/keymap.c b/layouts/community/ergodox/mpiechotka/keymap.c index a673d0bd8aae..6a89e38a3274 100644 --- a/layouts/community/ergodox/mpiechotka/keymap.c +++ b/layouts/community/ergodox/mpiechotka/keymap.c @@ -15,9 +15,7 @@ enum { PC1, PC2, PC3, - PC4, - DL_BASE, - DL_BASE_CM, + PC4 }; const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { @@ -175,7 +173,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { // MACROS [MACR] = LAYOUT_ergodox( KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, - KC_NO, F(DL_BASE),F(DL_BASE_CM),KC_NO, KC_NO, KC_NO, KC_NO, + KC_NO, DF(BASE), DF(BASE_CM), KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, F(PC1), F(PC2), F(PC3), F(PC4), KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, @@ -199,9 +197,7 @@ const uint16_t PROGMEM fn_actions[] = { [PC1] = ACTION_MACRO(PC1), [PC2] = ACTION_MACRO(PC2), [PC3] = ACTION_MACRO(PC3), - [PC4] = ACTION_MACRO(PC4), - [DL_BASE] = ACTION_DEFAULT_LAYER_SET(BASE), - [DL_BASE_CM] = ACTION_DEFAULT_LAYER_SET(BASE_CM) + [PC4] = ACTION_MACRO(PC4) }; const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) diff --git a/layouts/community/ergodox/norwegian_programmer_osx_pc/keymap.c b/layouts/community/ergodox/norwegian_programmer_osx_pc/keymap.c index 63fea6e1c16a..ee9a9d1802b7 100644 --- a/layouts/community/ergodox/norwegian_programmer_osx_pc/keymap.c +++ b/layouts/community/ergodox/norwegian_programmer_osx_pc/keymap.c @@ -39,7 +39,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ALT_T(KC_ESC), KC_EXLM , NO_QUES, NO_COLN, KC_TAB, KC_HASH, KC_FN7, KC_FN6, - KC_FN1,CTL_T(KC_DOT),GUI_T(KC_COMMA), + OSM(MOD_LSFT),CTL_T(KC_DOT),GUI_T(KC_COMMA), // right hand KC_FN5, NO_DLR, NO_LPRN, NO_RPRN ,KC_FN3, KC_FN4,NO_AT, NO_APOS, KC_Y, KC_U, KC_I, KC_O, KC_P, NO_AA , @@ -138,7 +138,6 @@ enum macro_id { }; const uint16_t PROGMEM fn_actions[] = { - [1] = ACTION_MODS_ONESHOT(MOD_LSFT), // Sticky shift light. Tap for the next keypress to be shifted. Hold for regular shift. [2] = ACTION_MACRO(TILDE_NO), // Completed ~ character(pc and mac), no space needed. [3] = ACTION_MACRO(LESS_NO), // < completed on keypress down, to avoid shifting the next character if it is not released first. [4] = ACTION_MACRO(GRTR_NO), // > completed on keypress down, to avoid shifting the next character if it is not released first. diff --git a/layouts/community/ergodox/norwegian_programmer_osx_pc_colemak/keymap.c b/layouts/community/ergodox/norwegian_programmer_osx_pc_colemak/keymap.c index cb61ce59cb8b..af1d268bd9fb 100644 --- a/layouts/community/ergodox/norwegian_programmer_osx_pc_colemak/keymap.c +++ b/layouts/community/ergodox/norwegian_programmer_osx_pc_colemak/keymap.c @@ -39,7 +39,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ALT_T(KC_ESC), KC_EXLM , NO_QUES, NO_COLN, KC_TAB, KC_HASH, KC_FN7, KC_FN6, - KC_FN1,CTL_T(KC_DOT),GUI_T(KC_COMMA), + OSM(MOD_LSFT),CTL_T(KC_DOT),GUI_T(KC_COMMA), // right hand KC_FN5, NO_DLR, NO_LPRN, NO_RPRN ,KC_FN3, KC_FN4,NO_AT, NO_APOS, KC_J, KC_L, KC_U, KC_Y, NO_AA, NO_AE , @@ -138,7 +138,6 @@ enum macro_id { }; const uint16_t PROGMEM fn_actions[] = { - [1] = ACTION_MODS_ONESHOT(MOD_LSFT), // Sticky shift light. Tap for the next keypress to be shifted. Hold for regular shift. [2] = ACTION_MACRO(TILDE_NO), // Completed ~ character(pc and mac), no space needed. [3] = ACTION_MACRO(LESS_NO), // < completed on keypress down, to avoid shifting the next character if it is not released first. [4] = ACTION_MACRO(GRTR_NO), // > completed on keypress down, to avoid shifting the next character if it is not released first. diff --git a/layouts/community/ergodox/townk_osx/keymap.c b/layouts/community/ergodox/townk_osx/keymap.c index 55394fab214c..6799ad74602d 100644 --- a/layouts/community/ergodox/townk_osx/keymap.c +++ b/layouts/community/ergodox/townk_osx/keymap.c @@ -97,8 +97,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_ESC, KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, MEH_T(KC_F16), CTL_T(KC_BSLS), KC_A, KC_S, KC_D, KC_F, KC_G, - KC_FN2, KC_Z, KC_X, KC_C, KC_V, KC_B, ALL_T(KC_F18), - KC_FN1, TG(KEYPAD), KC_LCTRL, KC_LALT, KC_LGUI, + OSM(MOD_LSFT), KC_Z, KC_X, KC_C, KC_V, KC_B, ALL_T(KC_F18), + OSL(FN), TG(KEYPAD), KC_LCTRL, KC_LALT, KC_LGUI, M_TESC, M_TPASTE, KC_HOME, KC_BSPC, KC_DEL, KC_END, @@ -106,8 +106,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_POWER, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, 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), LT(KEYPAD, KC_RBRC), KC_FN1, + ALL_T(KC_F19), KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, OSM(MOD_LSFT), + KC_RGUI, KC_RALT, CTL_T(KC_LBRC), LT(KEYPAD, KC_RBRC), OSL(FN), M_OSXCPY, M_OSXPST, KC_PGUP, KC_PGDN, KC_ENT, KC_SPC), @@ -194,11 +194,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_NO, KC_NO, KC_NO, KC_NO)}; -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. -}; - const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { // MACRODOWN only works in this function switch(id) { diff --git a/lib/printf b/lib/printf new file mode 160000 index 000000000000..d3b984684bb8 --- /dev/null +++ b/lib/printf @@ -0,0 +1 @@ +Subproject commit d3b984684bb8a8bdc48cc7a1abecb93ce59bbe3e diff --git a/lib/vusb b/lib/vusb new file mode 160000 index 000000000000..9a42d205eb60 --- /dev/null +++ b/lib/vusb @@ -0,0 +1 @@ +Subproject commit 9a42d205eb60faca494ff4eabce8d59f0ec0fc7f diff --git a/message.mk b/message.mk index c8da7df0bb40..be04fa9b8104 100644 --- a/message.mk +++ b/message.mk @@ -84,8 +84,7 @@ 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 MSG_FILE_NEAR_LIMIT = The firmware size is approaching the maximum - $(CURRENT_SIZE)/$(MAX_SIZE) ($(PERCENT_SIZE)%%, $(FREE_SIZE) bytes free)\n MSG_PYTHON_MISSING = $(WARN_COLOR)WARNING:$(NO_COLOR)\n \ - Python 3 is not installed. It will be required by a future version\n\ - of qmk_firmware.\n\n\ + Can not run bin/qmk! This tool will be required when the develop branch is merged on 2020 Aug 29.\n\n\ Please run $(BOLD)util/qmk_install.sh$(NO_COLOR) to install all the dependencies QMK requires.\n\n MSG_FLASH_BOOTLOADER = $(WARN_COLOR)WARNING:$(NO_COLOR) This board's bootloader is not specified or is not supported by the \":flash\" target at this time.\n\n MSG_FLASH_ARCH = $(WARN_COLOR)WARNING:$(NO_COLOR) This board's architecture is not supported by the \":flash\" target at this time.\n\n diff --git a/quantum/audio/audio.h b/quantum/audio/audio.h index 2bcc27b4a19a..805cb4f7ab75 100644 --- a/quantum/audio/audio.h +++ b/quantum/audio/audio.h @@ -99,9 +99,6 @@ void play_notes(float (*np)[][2], uint16_t n_count, bool n_repeat); // length. This works around the limitation of C's sizeof operation on pointers. // The global float array for the song must be used here. #define NOTE_ARRAY_SIZE(x) ((int16_t)(sizeof(x) / (sizeof(x[0])))) -#define PLAY_NOTE_ARRAY(note_array, note_repeat, deprecated_arg) \ - play_notes(¬e_array, NOTE_ARRAY_SIZE((note_array)), (note_repeat)); \ - _Pragma("message \"'PLAY_NOTE_ARRAY' macro is deprecated\"") #define PLAY_SONG(note_array) play_notes(¬e_array, NOTE_ARRAY_SIZE((note_array)), false) #define PLAY_LOOP(note_array) play_notes(¬e_array, NOTE_ARRAY_SIZE((note_array)), true) diff --git a/quantum/audio/audio_avr.c b/quantum/audio/audio_avr.c index 781378788c63..5a96bf64393c 100644 --- a/quantum/audio/audio_avr.c +++ b/quantum/audio/audio_avr.c @@ -110,6 +110,11 @@ # define TIMER_1_DUTY_CYCLE OCR1C # define TIMER1_AUDIO_vect TIMER1_COMPC_vect #endif + +#if !defined(BPIN_AUDIO) && !defined(CPIN_AUDIO) +# error "Audio feature enabled, but no suitable pin selected - see docs/feature_audio.md under the AVR settings for available options." +#endif + // ----------------------------------------------------------------------------- int voices = 0; diff --git a/quantum/rgb_matrix.c b/quantum/rgb_matrix.c index 91032b6564ca..f3da0ab0f7d5 100644 --- a/quantum/rgb_matrix.c +++ b/quantum/rgb_matrix.c @@ -57,8 +57,12 @@ const point_t k_rgb_matrix_center = RGB_MATRIX_CENTER; // -----End rgb effect includes macros------- // ------------------------------------------ -#ifndef RGB_DISABLE_AFTER_TIMEOUT -# define RGB_DISABLE_AFTER_TIMEOUT 0 +#if defined(RGB_DISABLE_AFTER_TIMEOUT) && !defined(RGB_DISABLE_TIMEOUT) +# define RGB_DISABLE_TIMEOUT (RGB_DISABLE_AFTER_TIMEOUT * 1200) +#endif + +#ifndef RGB_DISABLE_TIMEOUT +# define RGB_DISABLE_TIMEOUT 0 #endif #ifndef RGB_DISABLE_WHEN_USB_SUSPENDED @@ -111,19 +115,29 @@ const point_t k_rgb_matrix_center = RGB_MATRIX_CENTER; # define RGB_MATRIX_STARTUP_SPD UINT8_MAX / 2 #endif -bool g_suspend_state = false; - -rgb_config_t rgb_matrix_config; - -rgb_counters_t g_rgb_counters; -static uint32_t rgb_counters_buffer; - +// globals +bool g_suspend_state = false; +rgb_config_t rgb_matrix_config; // TODO: would like to prefix this with g_ for global consistancy, do this in another pr +uint32_t g_rgb_timer; #ifdef RGB_MATRIX_FRAMEBUFFER_EFFECTS -uint8_t rgb_frame_buffer[MATRIX_ROWS][MATRIX_COLS] = {{0}}; -#endif +uint8_t g_rgb_frame_buffer[MATRIX_ROWS][MATRIX_COLS] = {{0}}; +#endif // RGB_MATRIX_FRAMEBUFFER_EFFECTS +#ifdef RGB_MATRIX_KEYREACTIVE_ENABLED +last_hit_t g_last_hit_tracker; +#endif // RGB_MATRIX_KEYREACTIVE_ENABLED +// internals +static uint8_t rgb_last_enable = UINT8_MAX; +static uint8_t rgb_last_effect = UINT8_MAX; +static effect_params_t rgb_effect_params = {0, 0xFF}; +static rgb_task_states rgb_task_state = SYNCING; +#if RGB_DISABLE_TIMEOUT > 0 +static uint32_t rgb_anykey_timer; +#endif // RGB_DISABLE_TIMEOUT > 0 + +// double buffers +static uint32_t rgb_timer_buffer; #ifdef RGB_MATRIX_KEYREACTIVE_ENABLED -last_hit_t g_last_hit_tracker; static last_hit_t last_hit_buffer; #endif // RGB_MATRIX_KEYREACTIVE_ENABLED @@ -169,21 +183,24 @@ void rgb_matrix_set_color(int index, uint8_t red, uint8_t green, uint8_t blue) { void rgb_matrix_set_color_all(uint8_t red, uint8_t green, uint8_t blue) { rgb_matrix_driver.set_color_all(red, green, blue); } bool process_rgb_matrix(uint16_t keycode, keyrecord_t *record) { +#if RGB_DISABLE_TIMEOUT > 0 + if (record->event.pressed) { + rgb_anykey_timer = 0; + } +#endif // RGB_DISABLE_TIMEOUT > 0 + #ifdef RGB_MATRIX_KEYREACTIVE_ENABLED uint8_t led[LED_HITS_TO_REMEMBER]; uint8_t led_count = 0; # if defined(RGB_MATRIX_KEYRELEASES) - if (!record->event.pressed) { - led_count = rgb_matrix_map_row_column_to_led(record->event.key.row, record->event.key.col, led); - g_rgb_counters.any_key_hit = 0; - } + if (!record->event.pressed) # elif defined(RGB_MATRIX_KEYPRESSES) - if (record->event.pressed) { - led_count = rgb_matrix_map_row_column_to_led(record->event.key.row, record->event.key.col, led); - g_rgb_counters.any_key_hit = 0; - } + if (record->event.pressed) # endif // defined(RGB_MATRIX_KEYRELEASES) + { + led_count = rgb_matrix_map_row_column_to_led(record->event.key.row, record->event.key.col, led); + } if (last_hit_buffer.count + led_count > LED_HITS_TO_REMEMBER) { memcpy(&last_hit_buffer.x[0], &last_hit_buffer.x[led_count], LED_HITS_TO_REMEMBER - led_count); @@ -216,7 +233,7 @@ void rgb_matrix_test(void) { // Mask out bits 4 and 5 // Increase the factor to make the test animation slower (and reduce to make it faster) uint8_t factor = 10; - switch ((g_rgb_counters.tick & (0b11 << factor)) >> factor) { + switch ((g_rgb_timer & (0b11 << factor)) >> factor) { case 0: { rgb_matrix_set_color_all(20, 0, 0); break; @@ -241,29 +258,26 @@ static bool rgb_matrix_none(effect_params_t *params) { return false; } - RGB_MATRIX_USE_LIMITS(led_min, led_max); - for (uint8_t i = led_min; i < led_max; i++) { - rgb_matrix_set_color(i, 0, 0, 0); - } - return led_max < DRIVER_LED_TOTAL; + rgb_matrix_set_color_all(0, 0, 0); + return false; } -static uint8_t rgb_last_enable = UINT8_MAX; -static uint8_t rgb_last_effect = UINT8_MAX; -static effect_params_t rgb_effect_params = {0, 0xFF}; -static rgb_task_states rgb_task_state = SYNCING; - static void rgb_task_timers(void) { +#if defined(RGB_MATRIX_KEYREACTIVE_ENABLED) || RGB_DISABLE_TIMEOUT > 0 + uint32_t deltaTime = timer_elapsed32(rgb_timer_buffer); +#endif // defined(RGB_MATRIX_KEYREACTIVE_ENABLED) || RGB_DISABLE_TIMEOUT > 0 + rgb_timer_buffer = timer_read32(); + // Update double buffer timers - uint16_t deltaTime = timer_elapsed32(rgb_counters_buffer); - rgb_counters_buffer = timer_read32(); - if (g_rgb_counters.any_key_hit < UINT32_MAX) { - if (UINT32_MAX - deltaTime < g_rgb_counters.any_key_hit) { - g_rgb_counters.any_key_hit = UINT32_MAX; +#if RGB_DISABLE_TIMEOUT > 0 + if (rgb_anykey_timer < UINT32_MAX) { + if (UINT32_MAX - deltaTime < rgb_anykey_timer) { + rgb_anykey_timer = UINT32_MAX; } else { - g_rgb_counters.any_key_hit += deltaTime; + rgb_anykey_timer += deltaTime; } } +#endif // RGB_DISABLE_TIMEOUT > 0 // Update double buffer last hit timers #ifdef RGB_MATRIX_KEYREACTIVE_ENABLED @@ -280,7 +294,7 @@ static void rgb_task_timers(void) { static void rgb_task_sync(void) { // next task - if (timer_elapsed32(g_rgb_counters.tick) >= RGB_MATRIX_LED_FLUSH_LIMIT) rgb_task_state = STARTING; + if (timer_elapsed32(g_rgb_timer) >= RGB_MATRIX_LED_FLUSH_LIMIT) rgb_task_state = STARTING; } static void rgb_task_start(void) { @@ -288,7 +302,7 @@ static void rgb_task_start(void) { rgb_effect_params.iter = 0; // update double buffers - g_rgb_counters.tick = rgb_counters_buffer; + g_rgb_timer = rgb_timer_buffer; #ifdef RGB_MATRIX_KEYREACTIVE_ENABLED g_last_hit_tracker = last_hit_buffer; #endif // RGB_MATRIX_KEYREACTIVE_ENABLED @@ -370,8 +384,16 @@ void rgb_matrix_task(void) { // Ideally we would also stop sending zeros to the LED driver PWM buffers // while suspended and just do a software shutdown. This is a cheap hack for now. - bool suspend_backlight = ((g_suspend_state && RGB_DISABLE_WHEN_USB_SUSPENDED) || (RGB_DISABLE_AFTER_TIMEOUT > 0 && g_rgb_counters.any_key_hit > RGB_DISABLE_AFTER_TIMEOUT * 60 * 20)); - uint8_t effect = suspend_backlight || !rgb_matrix_config.enable ? 0 : rgb_matrix_config.mode; + bool suspend_backlight = +#if RGB_DISABLE_WHEN_USB_SUSPENDED == true + g_suspend_state || +#endif // RGB_DISABLE_WHEN_USB_SUSPENDED == true +#if RGB_DISABLE_TIMEOUT > 0 + (rgb_anykey_timer > (uint32_t)RGB_DISABLE_TIMEOUT) || +#endif // RGB_DISABLE_TIMEOUT > 0 + false; + + uint8_t effect = suspend_backlight || !rgb_matrix_config.enable ? 0 : rgb_matrix_config.mode; switch (rgb_task_state) { case STARTING: @@ -405,8 +427,6 @@ __attribute__((weak)) void rgb_matrix_indicators_user(void) {} void rgb_matrix_init(void) { rgb_matrix_driver.init(); - // TODO: put the 1 second startup delay here? - #ifdef RGB_MATRIX_KEYREACTIVE_ENABLED g_last_hit_tracker.count = 0; for (uint8_t i = 0; i < LED_HITS_TO_REMEMBER; ++i) { diff --git a/quantum/rgb_matrix.h b/quantum/rgb_matrix.h index 7c37311b4e75..d9ce391068cf 100644 --- a/quantum/rgb_matrix.h +++ b/quantum/rgb_matrix.h @@ -178,14 +178,14 @@ extern const rgb_matrix_driver_t rgb_matrix_driver; extern rgb_config_t rgb_matrix_config; -extern bool g_suspend_state; -extern rgb_counters_t g_rgb_counters; -extern led_config_t g_led_config; +extern bool g_suspend_state; +extern uint32_t g_rgb_timer; +extern led_config_t g_led_config; #ifdef RGB_MATRIX_KEYREACTIVE_ENABLED extern last_hit_t g_last_hit_tracker; #endif #ifdef RGB_MATRIX_FRAMEBUFFER_EFFECTS -extern uint8_t rgb_frame_buffer[MATRIX_ROWS][MATRIX_COLS]; +extern uint8_t g_rgb_frame_buffer[MATRIX_ROWS][MATRIX_COLS]; #endif #endif diff --git a/quantum/rgb_matrix_animations/breathing_anim.h b/quantum/rgb_matrix_animations/breathing_anim.h index 92431555e7a8..887425f9dafc 100644 --- a/quantum/rgb_matrix_animations/breathing_anim.h +++ b/quantum/rgb_matrix_animations/breathing_anim.h @@ -6,7 +6,7 @@ bool BREATHING(effect_params_t* params) { RGB_MATRIX_USE_LIMITS(led_min, led_max); HSV hsv = rgb_matrix_config.hsv; - uint16_t time = scale16by8(g_rgb_counters.tick, rgb_matrix_config.speed / 8); + uint16_t time = scale16by8(g_rgb_timer, rgb_matrix_config.speed / 8); hsv.v = scale8(abs8(sin8(time) - 128) * 2, hsv.v); RGB rgb = hsv_to_rgb(hsv); for (uint8_t i = led_min; i < led_max; i++) { diff --git a/quantum/rgb_matrix_animations/digital_rain_anim.h b/quantum/rgb_matrix_animations/digital_rain_anim.h index 7a4a52db1b43..1de45f8e8db3 100644 --- a/quantum/rgb_matrix_animations/digital_rain_anim.h +++ b/quantum/rgb_matrix_animations/digital_rain_anim.h @@ -18,7 +18,7 @@ bool DIGITAL_RAIN(effect_params_t* params) { if (params->init) { rgb_matrix_set_color_all(0, 0, 0); - memset(rgb_frame_buffer, 0, sizeof(rgb_frame_buffer)); + memset(g_rgb_frame_buffer, 0, sizeof(g_rgb_frame_buffer)); drop = 0; } @@ -27,10 +27,10 @@ bool DIGITAL_RAIN(effect_params_t* params) { if (row == 0 && drop == 0 && rand() < RAND_MAX / RGB_DIGITAL_RAIN_DROPS) { // top row, pixels have just fallen and we're // making a new rain drop in this column - rgb_frame_buffer[row][col] = max_intensity; - } else if (rgb_frame_buffer[row][col] > 0 && rgb_frame_buffer[row][col] < max_intensity) { + g_rgb_frame_buffer[row][col] = max_intensity; + } else if (g_rgb_frame_buffer[row][col] > 0 && g_rgb_frame_buffer[row][col] < max_intensity) { // neither fully bright nor dark, decay it - rgb_frame_buffer[row][col]--; + g_rgb_frame_buffer[row][col]--; } // set the pixel colour uint8_t led[LED_HITS_TO_REMEMBER]; @@ -38,11 +38,11 @@ bool DIGITAL_RAIN(effect_params_t* params) { // TODO: multiple leds are supported mapped to the same row/column if (led_count > 0) { - if (rgb_frame_buffer[row][col] > pure_green_intensity) { - const uint8_t boost = (uint8_t)((uint16_t)max_brightness_boost * (rgb_frame_buffer[row][col] - pure_green_intensity) / (max_intensity - pure_green_intensity)); + if (g_rgb_frame_buffer[row][col] > pure_green_intensity) { + const uint8_t boost = (uint8_t)((uint16_t)max_brightness_boost * (g_rgb_frame_buffer[row][col] - pure_green_intensity) / (max_intensity - pure_green_intensity)); rgb_matrix_set_color(led[0], boost, max_intensity, boost); } else { - const uint8_t green = (uint8_t)((uint16_t)max_intensity * rgb_frame_buffer[row][col] / pure_green_intensity); + const uint8_t green = (uint8_t)((uint16_t)max_intensity * g_rgb_frame_buffer[row][col] / pure_green_intensity); rgb_matrix_set_color(led[0], 0, green, 0); } } @@ -55,15 +55,15 @@ bool DIGITAL_RAIN(effect_params_t* params) { for (uint8_t row = MATRIX_ROWS - 1; row > 0; row--) { for (uint8_t col = 0; col < MATRIX_COLS; col++) { // if ths is on the bottom row and bright allow decay - if (row == MATRIX_ROWS - 1 && rgb_frame_buffer[row][col] == max_intensity) { - rgb_frame_buffer[row][col]--; + if (row == MATRIX_ROWS - 1 && g_rgb_frame_buffer[row][col] == max_intensity) { + g_rgb_frame_buffer[row][col]--; } // check if the pixel above is bright - if (rgb_frame_buffer[row - 1][col] == max_intensity) { + if (g_rgb_frame_buffer[row - 1][col] == max_intensity) { // allow old bright pixel to decay - rgb_frame_buffer[row - 1][col]--; + g_rgb_frame_buffer[row - 1][col]--; // make this pixel bright - rgb_frame_buffer[row][col] = max_intensity; + g_rgb_frame_buffer[row][col] = max_intensity; } } } diff --git a/quantum/rgb_matrix_animations/jellybean_raindrops_anim.h b/quantum/rgb_matrix_animations/jellybean_raindrops_anim.h index 5596146a3800..ef2d1500b06f 100644 --- a/quantum/rgb_matrix_animations/jellybean_raindrops_anim.h +++ b/quantum/rgb_matrix_animations/jellybean_raindrops_anim.h @@ -12,7 +12,7 @@ static void jellybean_raindrops_set_color(int i, effect_params_t* params) { bool JELLYBEAN_RAINDROPS(effect_params_t* params) { if (!params->init) { // Change one LED every tick, make sure speed is not 0 - if (scale16by8(g_rgb_counters.tick, qadd8(rgb_matrix_config.speed, 16)) % 5 == 0) { + if (scale16by8(g_rgb_timer, qadd8(rgb_matrix_config.speed, 16)) % 5 == 0) { jellybean_raindrops_set_color(rand() % DRIVER_LED_TOTAL, params); } return false; diff --git a/quantum/rgb_matrix_animations/raindrops_anim.h b/quantum/rgb_matrix_animations/raindrops_anim.h index 9f839a1bce00..6e1b5acb0d49 100644 --- a/quantum/rgb_matrix_animations/raindrops_anim.h +++ b/quantum/rgb_matrix_animations/raindrops_anim.h @@ -22,7 +22,7 @@ static void raindrops_set_color(int i, effect_params_t* params) { bool RAINDROPS(effect_params_t* params) { if (!params->init) { // Change one LED every tick, make sure speed is not 0 - if (scale16by8(g_rgb_counters.tick, qadd8(rgb_matrix_config.speed, 16)) % 10 == 0) { + if (scale16by8(g_rgb_timer, qadd8(rgb_matrix_config.speed, 16)) % 10 == 0) { raindrops_set_color(rand() % DRIVER_LED_TOTAL, params); } return false; diff --git a/quantum/rgb_matrix_animations/typing_heatmap_anim.h b/quantum/rgb_matrix_animations/typing_heatmap_anim.h index dd313f16a5bc..e82c1b49eeb9 100644 --- a/quantum/rgb_matrix_animations/typing_heatmap_anim.h +++ b/quantum/rgb_matrix_animations/typing_heatmap_anim.h @@ -10,20 +10,20 @@ void process_rgb_matrix_typing_heatmap(keyrecord_t* record) { uint8_t m_col = col - 1; uint8_t p_col = col + 1; - if (m_col < col) rgb_frame_buffer[row][m_col] = qadd8(rgb_frame_buffer[row][m_col], 16); - rgb_frame_buffer[row][col] = qadd8(rgb_frame_buffer[row][col], 32); - if (p_col < MATRIX_COLS) rgb_frame_buffer[row][p_col] = qadd8(rgb_frame_buffer[row][p_col], 16); + if (m_col < col) g_rgb_frame_buffer[row][m_col] = qadd8(g_rgb_frame_buffer[row][m_col], 16); + g_rgb_frame_buffer[row][col] = qadd8(g_rgb_frame_buffer[row][col], 32); + if (p_col < MATRIX_COLS) g_rgb_frame_buffer[row][p_col] = qadd8(g_rgb_frame_buffer[row][p_col], 16); if (p_row < MATRIX_ROWS) { - if (m_col < col) rgb_frame_buffer[p_row][m_col] = qadd8(rgb_frame_buffer[p_row][m_col], 13); - rgb_frame_buffer[p_row][col] = qadd8(rgb_frame_buffer[p_row][col], 16); - if (p_col < MATRIX_COLS) rgb_frame_buffer[p_row][p_col] = qadd8(rgb_frame_buffer[p_row][p_col], 13); + if (m_col < col) g_rgb_frame_buffer[p_row][m_col] = qadd8(g_rgb_frame_buffer[p_row][m_col], 13); + g_rgb_frame_buffer[p_row][col] = qadd8(g_rgb_frame_buffer[p_row][col], 16); + if (p_col < MATRIX_COLS) g_rgb_frame_buffer[p_row][p_col] = qadd8(g_rgb_frame_buffer[p_row][p_col], 13); } if (m_row < row) { - if (m_col < col) rgb_frame_buffer[m_row][m_col] = qadd8(rgb_frame_buffer[m_row][m_col], 13); - rgb_frame_buffer[m_row][col] = qadd8(rgb_frame_buffer[m_row][col], 16); - if (p_col < MATRIX_COLS) rgb_frame_buffer[m_row][p_col] = qadd8(rgb_frame_buffer[m_row][p_col], 13); + if (m_col < col) g_rgb_frame_buffer[m_row][m_col] = qadd8(g_rgb_frame_buffer[m_row][m_col], 13); + g_rgb_frame_buffer[m_row][col] = qadd8(g_rgb_frame_buffer[m_row][col], 16); + if (p_col < MATRIX_COLS) g_rgb_frame_buffer[m_row][p_col] = qadd8(g_rgb_frame_buffer[m_row][p_col], 13); } } @@ -31,18 +31,18 @@ bool TYPING_HEATMAP(effect_params_t* params) { // Modified version of RGB_MATRIX_USE_LIMITS to work off of matrix row / col size uint8_t led_min = RGB_MATRIX_LED_PROCESS_LIMIT * params->iter; uint8_t led_max = led_min + RGB_MATRIX_LED_PROCESS_LIMIT; - if (led_max > sizeof(rgb_frame_buffer)) led_max = sizeof(rgb_frame_buffer); + if (led_max > sizeof(g_rgb_frame_buffer)) led_max = sizeof(g_rgb_frame_buffer); if (params->init) { rgb_matrix_set_color_all(0, 0, 0); - memset(rgb_frame_buffer, 0, sizeof rgb_frame_buffer); + memset(g_rgb_frame_buffer, 0, sizeof g_rgb_frame_buffer); } // Render heatmap & decrease for (int i = led_min; i < led_max; i++) { uint8_t row = i % MATRIX_ROWS; uint8_t col = i / MATRIX_ROWS; - uint8_t val = rgb_frame_buffer[row][col]; + uint8_t val = g_rgb_frame_buffer[row][col]; // set the pixel colour uint8_t led[LED_HITS_TO_REMEMBER]; @@ -55,10 +55,10 @@ bool TYPING_HEATMAP(effect_params_t* params) { rgb_matrix_set_color(led[j], rgb.r, rgb.g, rgb.b); } - rgb_frame_buffer[row][col] = qsub8(val, 1); + g_rgb_frame_buffer[row][col] = qsub8(val, 1); } - return led_max < sizeof(rgb_frame_buffer); + return led_max < sizeof(g_rgb_frame_buffer); } # endif // RGB_MATRIX_CUSTOM_EFFECT_IMPLS diff --git a/quantum/rgb_matrix_runners/effect_runner_dx_dy.h b/quantum/rgb_matrix_runners/effect_runner_dx_dy.h index 3d312190a525..9d0c9fab194a 100644 --- a/quantum/rgb_matrix_runners/effect_runner_dx_dy.h +++ b/quantum/rgb_matrix_runners/effect_runner_dx_dy.h @@ -5,7 +5,7 @@ typedef HSV (*dx_dy_f)(HSV hsv, int16_t dx, int16_t dy, uint8_t time); bool effect_runner_dx_dy(effect_params_t* params, dx_dy_f effect_func) { RGB_MATRIX_USE_LIMITS(led_min, led_max); - uint8_t time = scale16by8(g_rgb_counters.tick, rgb_matrix_config.speed / 2); + uint8_t time = scale16by8(g_rgb_timer, rgb_matrix_config.speed / 2); for (uint8_t i = led_min; i < led_max; i++) { RGB_MATRIX_TEST_LED_FLAGS(); int16_t dx = g_led_config.point[i].x - k_rgb_matrix_center.x; diff --git a/quantum/rgb_matrix_runners/effect_runner_dx_dy_dist.h b/quantum/rgb_matrix_runners/effect_runner_dx_dy_dist.h index 1f4767e3214c..2824c82527bf 100644 --- a/quantum/rgb_matrix_runners/effect_runner_dx_dy_dist.h +++ b/quantum/rgb_matrix_runners/effect_runner_dx_dy_dist.h @@ -5,7 +5,7 @@ typedef HSV (*dx_dy_dist_f)(HSV hsv, int16_t dx, int16_t dy, uint8_t dist, uint8 bool effect_runner_dx_dy_dist(effect_params_t* params, dx_dy_dist_f effect_func) { RGB_MATRIX_USE_LIMITS(led_min, led_max); - uint8_t time = scale16by8(g_rgb_counters.tick, rgb_matrix_config.speed / 2); + uint8_t time = scale16by8(g_rgb_timer, rgb_matrix_config.speed / 2); for (uint8_t i = led_min; i < led_max; i++) { RGB_MATRIX_TEST_LED_FLAGS(); int16_t dx = g_led_config.point[i].x - k_rgb_matrix_center.x; diff --git a/quantum/rgb_matrix_runners/effect_runner_i.h b/quantum/rgb_matrix_runners/effect_runner_i.h index eebfb78c028a..5e6bf5daaf32 100644 --- a/quantum/rgb_matrix_runners/effect_runner_i.h +++ b/quantum/rgb_matrix_runners/effect_runner_i.h @@ -5,7 +5,7 @@ typedef HSV (*i_f)(HSV hsv, uint8_t i, uint8_t time); bool effect_runner_i(effect_params_t* params, i_f effect_func) { RGB_MATRIX_USE_LIMITS(led_min, led_max); - uint8_t time = scale16by8(g_rgb_counters.tick, rgb_matrix_config.speed / 4); + uint8_t time = scale16by8(g_rgb_timer, rgb_matrix_config.speed / 4); for (uint8_t i = led_min; i < led_max; i++) { RGB_MATRIX_TEST_LED_FLAGS(); RGB rgb = hsv_to_rgb(effect_func(rgb_matrix_config.hsv, i, time)); diff --git a/quantum/rgb_matrix_runners/effect_runner_sin_cos_i.h b/quantum/rgb_matrix_runners/effect_runner_sin_cos_i.h index c02352b86d5c..3fb7d4805176 100644 --- a/quantum/rgb_matrix_runners/effect_runner_sin_cos_i.h +++ b/quantum/rgb_matrix_runners/effect_runner_sin_cos_i.h @@ -5,7 +5,7 @@ typedef HSV (*sin_cos_i_f)(HSV hsv, int8_t sin, int8_t cos, uint8_t i, uint8_t t bool effect_runner_sin_cos_i(effect_params_t* params, sin_cos_i_f effect_func) { RGB_MATRIX_USE_LIMITS(led_min, led_max); - uint16_t time = scale16by8(g_rgb_counters.tick, rgb_matrix_config.speed / 4); + uint16_t time = scale16by8(g_rgb_timer, rgb_matrix_config.speed / 4); int8_t cos_value = cos8(time) - 128; int8_t sin_value = sin8(time) - 128; for (uint8_t i = led_min; i < led_max; i++) { diff --git a/quantum/rgb_matrix_types.h b/quantum/rgb_matrix_types.h index fc23f55d0eb7..f447ac9c562a 100644 --- a/quantum/rgb_matrix_types.h +++ b/quantum/rgb_matrix_types.h @@ -43,13 +43,6 @@ typedef struct PACKED { bool init; } effect_params_t; -typedef struct PACKED { - // Global tick at 20 Hz - uint32_t tick; - // Ticks since this key was last hit. - uint32_t any_key_hit; -} rgb_counters_t; - typedef struct PACKED { uint8_t x; uint8_t y; diff --git a/tmk_core/common.mk b/tmk_core/common.mk index aa8a0eb7ad7e..63de7c7edeeb 100644 --- a/tmk_core/common.mk +++ b/tmk_core/common.mk @@ -1,3 +1,5 @@ +PRINTF_PATH = $(LIB_PATH)/printf + COMMON_DIR = common PLATFORM_COMMON_DIR = $(COMMON_DIR)/$(PLATFORM_KEY) @@ -21,7 +23,12 @@ TMK_COMMON_SRC += $(COMMON_DIR)/host.c \ ifeq ($(PLATFORM),AVR) TMK_COMMON_SRC += $(PLATFORM_COMMON_DIR)/xprintf.S else ifeq ($(PLATFORM),CHIBIOS) - TMK_COMMON_SRC += $(PLATFORM_COMMON_DIR)/printf.c + TMK_COMMON_SRC += $(PRINTF_PATH)/printf.c + TMK_COMMON_DEFS += -DPRINTF_DISABLE_SUPPORT_FLOAT + TMK_COMMON_DEFS += -DPRINTF_DISABLE_SUPPORT_EXPONENTIAL + TMK_COMMON_DEFS += -DPRINTF_DISABLE_SUPPORT_LONG_LONG + TMK_COMMON_DEFS += -DPRINTF_DISABLE_SUPPORT_PTRDIFF_T + VPATH += $(PRINTF_PATH) else ifeq ($(PLATFORM),ARM_ATSAM) TMK_COMMON_SRC += $(PLATFORM_COMMON_DIR)/printf.c endif diff --git a/tmk_core/common/action.c b/tmk_core/common/action.c index 3b1268dc940b..7a53e08ed383 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, keyrecord_t *record) { return false; } #endif #ifndef TAP_CODE_DELAY @@ -335,7 +335,7 @@ void process_action(keyrecord_t *record, action_t action) { # 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, false)) && + !get_ignore_mod_tap_interrupt(get_event_keycode(record->event, false), &record) && # endif record->tap.interrupted) { dprint("mods_tap: tap: cancel: add_mods\n"); diff --git a/tmk_core/common/action_tapping.c b/tmk_core/common/action_tapping.c index 34f08d890486..fe545c79a069 100644 --- a/tmk_core/common/action_tapping.c +++ b/tmk_core/common/action_tapping.c @@ -19,10 +19,10 @@ # define IS_TAPPING_RELEASED() (IS_TAPPING() && !tapping_key.event.pressed) # define IS_TAPPING_KEY(k) (IS_TAPPING() && KEYEQ(tapping_key.event.key, (k))) -__attribute__((weak)) uint16_t get_tapping_term(uint16_t keycode) { return TAPPING_TERM; } +__attribute__((weak)) uint16_t get_tapping_term(uint16_t keycode, keyrecord_t *record) { return TAPPING_TERM; } # ifdef TAPPING_TERM_PER_KEY -# define WITHIN_TAPPING_TERM(e) (TIMER_DIFF_16(e.time, tapping_key.event.time) < get_tapping_term(get_event_keycode(tapping_key.event, false))) +# define WITHIN_TAPPING_TERM(e) (TIMER_DIFF_16(e.time, tapping_key.event.time) < get_tapping_term(get_event_keycode(tapping_key.event, false), &tapping_key)) # else # define WITHIN_TAPPING_TERM(e) (TIMER_DIFF_16(e.time, tapping_key.event.time) < TAPPING_TERM) # endif @@ -122,7 +122,7 @@ 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, false)) >= 500) && + (get_tapping_term(get_event_keycode(tapping_key.event, false), keyp) >= 500) && # endif # ifdef PERMISSIVE_HOLD_PER_KEY !get_permissive_hold(get_event_keycode(tapping_key.event, false), keyp) && diff --git a/tmk_core/common/action_tapping.h b/tmk_core/common/action_tapping.h index 5eaef1c5f09a..7015ce76120b 100644 --- a/tmk_core/common/action_tapping.h +++ b/tmk_core/common/action_tapping.h @@ -33,7 +33,7 @@ along with this program. If not, see . #ifndef NO_ACTION_TAPPING uint16_t get_event_keycode(keyevent_t event, bool update_layer_cache); -uint16_t get_tapping_term(uint16_t keycode); +uint16_t get_tapping_term(uint16_t keycode, keyrecord_t *record); void action_tapping_process(keyrecord_t record); #endif diff --git a/tmk_core/common/chibios/printf.c b/tmk_core/common/chibios/printf.c deleted file mode 100644 index a99752bb3d44..000000000000 --- a/tmk_core/common/chibios/printf.c +++ /dev/null @@ -1,233 +0,0 @@ -/* - * found at: http://www.sparetimelabs.com/tinyprintf/tinyprintf.php - * and: http://www.sparetimelabs.com/printfrevisited/printfrevisited.php - */ - -/* -File: printf.c - -Copyright (C) 2004 Kustaa Nyholm - -This library is free software; you can redistribute it and/or -modify it under the terms of the GNU Lesser General Public -License as published by the Free Software Foundation; either -version 2.1 of the License, or (at your option) any later version. - -This library is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -Lesser General Public License for more details. - -You should have received a copy of the GNU Lesser General Public -License along with this library; if not, write to the Free Software -Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - -*/ - -#include "printf.h" - -typedef void (*putcf)(void*, char); -static putcf stdout_putf; -static void* stdout_putp; - -// this adds cca 400 bytes -#define PRINTF_LONG_SUPPORT - -#ifdef PRINTF_LONG_SUPPORT - -static void uli2a(unsigned long int num, unsigned int base, int uc, char* bf) { - int n = 0; - unsigned int d = 1; - while (num / d >= base) d *= base; - while (d != 0) { - int dgt = num / d; - num %= d; - d /= base; - if (n || dgt > 0 || d == 0) { - *bf++ = dgt + (dgt < 10 ? '0' : (uc ? 'A' : 'a') - 10); - ++n; - } - } - *bf = 0; -} - -static void li2a(long num, char* bf) { - if (num < 0) { - num = -num; - *bf++ = '-'; - } - uli2a(num, 10, 0, bf); -} - -#endif - -static void ui2a(unsigned int num, unsigned int base, int uc, char* bf) { - int n = 0; - unsigned int d = 1; - while (num / d >= base) d *= base; - while (d != 0) { - int dgt = num / d; - num %= d; - d /= base; - if (n || dgt > 0 || d == 0) { - *bf++ = dgt + (dgt < 10 ? '0' : (uc ? 'A' : 'a') - 10); - ++n; - } - } - *bf = 0; -} - -static void i2a(int num, char* bf) { - if (num < 0) { - num = -num; - *bf++ = '-'; - } - ui2a(num, 10, 0, bf); -} - -static int a2d(char ch) { - if (ch >= '0' && ch <= '9') - return ch - '0'; - else if (ch >= 'a' && ch <= 'f') - return ch - 'a' + 10; - else if (ch >= 'A' && ch <= 'F') - return ch - 'A' + 10; - else - return -1; -} - -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) { - if (digit > base) break; - num = num * base + digit; - ch = *p++; - } - *src = p; - *nump = num; - return ch; -} - -static void putchw(void* putp, putcf putf, int n, char z, char* bf) { - char fc = z ? '0' : ' '; - char ch; - char* p = bf; - while (*p++ && n > 0) n--; - while (n-- > 0) putf(putp, fc); - while ((ch = *bf++)) putf(putp, ch); -} - -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]; - - char ch; - - while ((ch = *(fmt++))) { - if (ch != '%') - putf(putp, ch); - else { - char lz = 0; -#ifdef PRINTF_LONG_SUPPORT - char lng = 0; -#endif - int w = 0; - ch = *(fmt++); - if (ch == '0') { - ch = *(fmt++); - lz = 1; - } - if (ch >= '0' && ch <= '9') { - ch = a2i(ch, &fmt, 10, &w); - } -#ifdef PRINTF_LONG_SUPPORT - if (ch == 'l') { - ch = *(fmt++); - lng = 1; - } -#endif - switch (ch) { - case 0: - goto abort; - case 'u': { -#ifdef PRINTF_LONG_SUPPORT - if (lng) - uli2a(va_arg(va, unsigned long int), 10, 0, bf); - else -#endif - ui2a(va_arg(va, unsigned int), 10, 0, bf); - putchw(putp, putf, w, lz, bf); - break; - } - case 'd': { -#ifdef PRINTF_LONG_SUPPORT - if (lng) - li2a(va_arg(va, unsigned long int), bf); - else -#endif - i2a(va_arg(va, int), bf); - putchw(putp, putf, w, lz, bf); - break; - } - case 'x': - case 'X': -#ifdef PRINTF_LONG_SUPPORT - if (lng) - uli2a(va_arg(va, unsigned long int), 16, (ch == 'X'), bf); - else -#endif - ui2a(va_arg(va, unsigned int), 16, (ch == 'X'), bf); - putchw(putp, putf, w, lz, bf); - break; - case 'c': - putf(putp, (char)(va_arg(va, int))); - break; - case 's': - putchw(putp, putf, w, 0, va_arg(va, char*)); - break; - case 'b': -#ifdef PRINTF_LONG_SUPPORT - if (lng) - uli2a(va_arg(va, unsigned long int), 2, 0, bf); - else -#endif - ui2a(va_arg(va, unsigned int), 2, 0, bf); - putchw(putp, putf, w, lz, bf); - break; - case '%': - putf(putp, ch); - default: - break; - } - } - } -abort:; -} - -void init_printf(void* putp, void (*putf)(void*, char)) { - stdout_putf = putf; - stdout_putp = putp; -} - -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; } - -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 deleted file mode 100644 index 775459e1e8af..000000000000 --- a/tmk_core/common/chibios/printf.h +++ /dev/null @@ -1,110 +0,0 @@ -/* - * found at: http://www.sparetimelabs.com/tinyprintf/tinyprintf.php - * and: http://www.sparetimelabs.com/printfrevisited/printfrevisited.php - */ - -/* -File: printf.h - -Copyright (C) 2004 Kustaa Nyholm - -This library is free software; you can redistribute it and/or -modify it under the terms of the GNU Lesser General Public -License as published by the Free Software Foundation; either -version 2.1 of the License, or (at your option) any later version. - -This library is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -See the GNU Lesser General Public License for more details. - -You should have received a copy of the GNU Lesser General Public -License along with this library; if not, write to the Free Software -Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - -This library is realy just two files: 'printf.h' and 'printf.c'. - -They provide a simple and small (+200 loc) printf functionality to -be used in embedded systems. - -I've found them so usefull in debugging that I do not bother with a -debugger at all. - -They are distributed in source form, so to use them, just compile them -into your project. - -Two printf variants are provided: printf and sprintf. - -The formats supported by this implementation are: 'd' 'u' 'c' 's' 'x' 'X'. - -Zero padding and field width are also supported. - -If the library is compiled with 'PRINTF_SUPPORT_LONG' defined then the -long specifier is also -supported. Note that this will pull in some long math routines (pun intended!) -and thus make your executable noticably longer. - -The memory foot print of course depends on the target cpu, compiler and -compiler options, but a rough guestimate (based on a H8S target) is about -1.4 kB for code and some twenty 'int's and 'char's, say 60 bytes of stack space. -Not too bad. Your milage may vary. By hacking the source code you can -get rid of some hunred bytes, I'm sure, but personally I feel the balance of -functionality and flexibility versus code size is close to optimal for -many embedded systems. - -To use the printf you need to supply your own character output function, -something like : - - void putc ( void* p, char c) - { - while (!SERIAL_PORT_EMPTY) ; - SERIAL_PORT_TX_REGISTER = c; - } - -Before you can call printf you need to initialize it to use your -character output function with something like: - - init_printf(NULL,putc); - -Notice the 'NULL' in 'init_printf' and the parameter 'void* p' in 'putc', -the NULL (or any pointer) you pass into the 'init_printf' will eventually be -passed to your 'putc' routine. This allows you to pass some storage space (or -anything realy) to the character output function, if necessary. -This is not often needed but it was implemented like that because it made -implementing the sprintf function so neat (look at the source code). - -The code is re-entrant, except for the 'init_printf' function, so it -is safe to call it from interupts too, although this may result in mixed output. -If you rely on re-entrancy, take care that your 'putc' function is re-entrant! - -The printf and sprintf functions are actually macros that translate to -'tfp_printf' and 'tfp_sprintf'. This makes it possible -to use them along with 'stdio.h' printf's in a single source file. -You just need to undef the names before you include the 'stdio.h'. -Note that these are not function like macros, so if you have variables -or struct members with these names, things will explode in your face. -Without variadic macros this is the best we can do to wrap these -fucnction. If it is a problem just give up the macros and use the -functions directly or rename them. - -For further details see source code. - -regs Kusti, 23.10.2004 -*/ - -#ifndef __TFP_PRINTF__ -#define __TFP_PRINTF__ - -#include - -void init_printf(void* putp, void (*putf)(void*, char)); - -int tfp_printf(const char* fmt, ...); -int tfp_sprintf(char* s, const char* fmt, ...); - -void tfp_format(void* putp, void (*putf)(void*, char), const char* fmt, va_list va); - -#define printf tfp_printf -#define sprintf tfp_sprintf - -#endif diff --git a/tmk_core/common/command.c b/tmk_core/common/command.c index ee3188646c68..3cfcba3058ce 100644 --- a/tmk_core/common/command.c +++ b/tmk_core/common/command.c @@ -43,10 +43,6 @@ along with this program. If not, see . # include "mousekey.h" #endif -#ifdef PROTOCOL_VUSB -# include "usbdrv.h" -#endif - #ifdef AUDIO_ENABLE # include "audio.h" #endif /* AUDIO_ENABLE */ diff --git a/tmk_core/common/print.h b/tmk_core/common/print.h index 04ca558109dc..1c77236212d2 100644 --- a/tmk_core/common/print.h +++ b/tmk_core/common/print.h @@ -72,9 +72,7 @@ extern "C" # elif defined(PROTOCOL_CHIBIOS) /* PROTOCOL_CHIBIOS */ -# ifndef TERMINAL_ENABLE -# include "chibios/printf.h" -# endif +# include "printf.h" // lib/printf/printf.h # ifdef USER_PRINT /* USER_PRINT */ @@ -89,7 +87,6 @@ extern "C" # define uprintf printf # else /* NORMAL PRINT */ - // Create user & normal print defines # define print(s) printf(s) # define println(s) printf(s "\r\n") diff --git a/tmk_core/protocol/arm_atsam/led_matrix.c b/tmk_core/protocol/arm_atsam/led_matrix.c index 24eab2506763..4b8cc7c5e16f 100644 --- a/tmk_core/protocol/arm_atsam/led_matrix.c +++ b/tmk_core/protocol/arm_atsam/led_matrix.c @@ -270,7 +270,7 @@ void flush(void) { } // This should only be performed once per frame - pomod = (float)((g_rgb_counters.tick / 10) % (uint32_t)(1000.0f / led_animation_speed)) / 10.0f * led_animation_speed; + pomod = (float)((g_rgb_timer / 10) % (uint32_t)(1000.0f / led_animation_speed)) / 10.0f * led_animation_speed; pomod *= 100.0f; pomod = (uint32_t)pomod % 10000; pomod /= 100.0f; diff --git a/tmk_core/protocol/chibios/main.c b/tmk_core/protocol/chibios/main.c index 61665eb6f4ba..7d32c16ed8c5 100644 --- a/tmk_core/protocol/chibios/main.c +++ b/tmk_core/protocol/chibios/main.c @@ -158,9 +158,6 @@ int main(void) { /* Init USB */ init_usb_driver(&USB_DRIVER); - /* init printf */ - init_printf(NULL, sendchar_pf); - #ifdef MIDI_ENABLE setup_midi(); #endif diff --git a/tmk_core/protocol/chibios/usb_main.c b/tmk_core/protocol/chibios/usb_main.c index ecc83d9ecc94..65bd291bec59 100644 --- a/tmk_core/protocol/chibios/usb_main.c +++ b/tmk_core/protocol/chibios/usb_main.c @@ -796,9 +796,8 @@ int8_t sendchar(uint8_t c) { } #endif /* CONSOLE_ENABLE */ -void sendchar_pf(void *p, char c) { - (void)p; - sendchar((uint8_t)c); +void _putchar(char character) { + sendchar(character); } #ifdef RAW_ENABLE diff --git a/tmk_core/protocol/chibios/usb_main.h b/tmk_core/protocol/chibios/usb_main.h index 17041b4f2fdf..94baf9b35e06 100644 --- a/tmk_core/protocol/chibios/usb_main.h +++ b/tmk_core/protocol/chibios/usb_main.h @@ -87,6 +87,4 @@ void console_flush_output(void); #endif /* CONSOLE_ENABLE */ -void sendchar_pf(void *p, char c); - #endif /* _USB_MAIN_H_ */ diff --git a/tmk_core/protocol/iwrap.mk b/tmk_core/protocol/iwrap.mk index eeedd83af2cf..934235bd8107 100644 --- a/tmk_core/protocol/iwrap.mk +++ b/tmk_core/protocol/iwrap.mk @@ -16,11 +16,17 @@ VPATH += $(TMK_DIR)/protocol/iwrap # V-USB # VUSB_DIR = protocol/vusb -OPT_DEFS += -DPROTOCOL_VUSB -SRC += $(VUSB_DIR)/vusb.c \ - $(VUSB_DIR)/usbdrv/usbdrv.c \ - $(VUSB_DIR)/usbdrv/usbdrvasm.S \ - $(VUSB_DIR)/usbdrv/oddebug.c -VPATH += $(TMK_DIR)/protocol/vusb:$(TMK_DIR)/protocol/vusb/usbdrv +# Path to the V-USB library +VUSB_PATH = $(LIB_PATH)/vusb + +SRC += $(VUSB_DIR)/vusb.c \ + $(VUSB_PATH)/usbdrv/usbdrv.c \ + $(VUSB_PATH)/usbdrv/usbdrvasm.S \ + $(VUSB_PATH)/usbdrv/oddebug.c +# Search Path +VPATH += $(TMK_PATH)/$(VUSB_DIR) +VPATH += $(VUSB_PATH) + +OPT_DEFS += -DPROTOCOL_VUSB diff --git a/tmk_core/protocol/iwrap/main.c b/tmk_core/protocol/iwrap/main.c index 6e9b5455b13a..4048a9791dc5 100644 --- a/tmk_core/protocol/iwrap/main.c +++ b/tmk_core/protocol/iwrap/main.c @@ -29,7 +29,7 @@ along with this program. If not, see . #include "iwrap.h" #ifdef PROTOCOL_VUSB # include "vusb.h" -# include "usbdrv.h" +# include #endif #include "uart.h" #include "suart.h" diff --git a/tmk_core/protocol/vusb.mk b/tmk_core/protocol/vusb.mk index 6df0d0d339d0..5e564f748056 100644 --- a/tmk_core/protocol/vusb.mk +++ b/tmk_core/protocol/vusb.mk @@ -1,13 +1,13 @@ VUSB_DIR = protocol/vusb -OPT_DEFS += -DPROTOCOL_VUSB +# Path to the V-USB library +VUSB_PATH = $(LIB_PATH)/vusb -SRC += $(VUSB_DIR)/main.c \ +SRC += $(VUSB_DIR)/main.c \ $(VUSB_DIR)/vusb.c \ - $(VUSB_DIR)/usbdrv/usbdrv.c \ - $(VUSB_DIR)/usbdrv/usbdrvasm.S \ - $(VUSB_DIR)/usbdrv/oddebug.c - + $(VUSB_PATH)/usbdrv/usbdrv.c \ + $(VUSB_PATH)/usbdrv/usbdrvasm.S \ + $(VUSB_PATH)/usbdrv/oddebug.c ifneq ($(strip $(CONSOLE_ENABLE)), yes) ifndef NO_UART @@ -18,4 +18,6 @@ endif # Search Path VPATH += $(TMK_PATH)/$(VUSB_DIR) -VPATH += $(TMK_PATH)/$(VUSB_DIR)/usbdrv +VPATH += $(VUSB_PATH) + +OPT_DEFS += -DPROTOCOL_VUSB diff --git a/tmk_core/protocol/vusb/main.c b/tmk_core/protocol/vusb/main.c index 7dc16926d2b7..b4063273daa9 100644 --- a/tmk_core/protocol/vusb/main.c +++ b/tmk_core/protocol/vusb/main.c @@ -12,8 +12,8 @@ #include #include #include -#include "usbdrv.h" -#include "oddebug.h" +#include +#include #include "vusb.h" #include "keyboard.h" #include "host.h" diff --git a/tmk_core/protocol/vusb/sendchar_usart.c b/tmk_core/protocol/vusb/sendchar_usart.c index 42bd9ee363d9..a920a9a536b3 100644 --- a/tmk_core/protocol/vusb/sendchar_usart.c +++ b/tmk_core/protocol/vusb/sendchar_usart.c @@ -3,7 +3,7 @@ * License: GNU GPL v2 (see License.txt), GNU GPL v3 or proprietary (CommercialLicense.txt) */ #include -#include "oddebug.h" +#include #include "sendchar.h" #if DEBUG_LEVEL > 0 diff --git a/tmk_core/protocol/vusb/usbdrv/Changelog.txt b/tmk_core/protocol/vusb/usbdrv/Changelog.txt deleted file mode 100644 index 1e74180a9edc..000000000000 --- a/tmk_core/protocol/vusb/usbdrv/Changelog.txt +++ /dev/null @@ -1,308 +0,0 @@ -This file documents changes in the firmware-only USB driver for atmel's AVR -microcontrollers. New entries are always appended to the end of the file. -Scroll down to the bottom to see the most recent changes. - -2005-04-01: - - Implemented endpoint 1 as interrupt-in endpoint. - - Moved all configuration options to usbconfig.h which is not part of the - driver. - - Changed interface for usbVendorSetup(). - - Fixed compatibility with ATMega8 device. - - Various minor optimizations. - -2005-04-11: - - Changed interface to application: Use usbFunctionSetup(), usbFunctionRead() - and usbFunctionWrite() now. Added configuration options to choose which - of these functions to compile in. - - Assembler module delivers receive data non-inverted now. - - Made register and bit names compatible with more AVR devices. - -2005-05-03: - - Allow address of usbRxBuf on any memory page as long as the buffer does - not cross 256 byte page boundaries. - - Better device compatibility: works with Mega88 now. - - Code optimization in debugging module. - - Documentation updates. - -2006-01-02: - - Added (free) default Vendor- and Product-IDs bought from voti.nl. - - Added USBID-License.txt file which defines the rules for using the free - shared VID/PID pair. - - Added readme.txt to the usbdrv directory which clarifies administrative - issues. - -2006-01-25: - - Added "configured state" to become more standards compliant. - - Added "HALT" state for interrupt endpoint. - - Driver passes the "USB Command Verifier" test from usb.org now. - - Made "serial number" a configuration option. - - Minor optimizations, we now recommend compiler option "-Os" for best - results. - - Added a version number to usbdrv.h - -2006-02-03: - - New configuration variable USB_BUFFER_SECTION for the memory section where - the USB rx buffer will go. This defaults to ".bss" if not defined. Since - this buffer MUST NOT cross 256 byte pages (not even touch a page at the - end), the user may want to pass a linker option similar to - "-Wl,--section-start=.mybuffer=0x800060". - - Provide structure for usbRequest_t. - - New defines for USB constants. - - Prepared for HID implementations. - - Increased data size limit for interrupt transfers to 8 bytes. - - New macro usbInterruptIsReady() to query interrupt buffer state. - -2006-02-18: - - Ensure that the data token which is sent as an ack to an OUT transfer is - always zero sized. This fixes a bug where the host reports an error after - sending an out transfer to the device, although all data arrived at the - device. - - Updated docs in usbdrv.h to reflect changed API in usbFunctionWrite(). - -* Release 2006-02-20 - - - Give a compiler warning when compiling with debugging turned on. - - Added Oleg Semyonov's changes for IAR-cc compatibility. - - Added new (optional) functions usbDeviceConnect() and usbDeviceDisconnect() - (also thanks to Oleg!). - - Rearranged tests in usbPoll() to save a couple of instructions in the most - likely case that no actions are pending. - - We need a delay between the SET ADDRESS request until the new address - becomes active. This delay was handled in usbPoll() until now. Since the - spec says that the delay must not exceed 2ms, previous versions required - aggressive polling during the enumeration phase. We have now moved the - handling of the delay into the interrupt routine. - - We must not reply with NAK to a SETUP transaction. We can only achieve this - by making sure that the rx buffer is empty when SETUP tokens are expected. - We therefore don't pass zero sized data packets from the status phase of - a transfer to usbPoll(). This change MAY cause troubles if you rely on - receiving a less than 8 bytes long packet in usbFunctionWrite() to - identify the end of a transfer. usbFunctionWrite() will NEVER be called - with a zero length. - -* Release 2006-03-14 - - - Improved IAR C support: tiny memory model, more devices - - Added template usbconfig.h file under the name usbconfig-prototype.h - -* Release 2006-03-26 - - - Added provision for one more interrupt-in endpoint (endpoint 3). - - Added provision for one interrupt-out endpoint (endpoint 1). - - Added flowcontrol macros for USB. - - Added provision for custom configuration descriptor. - - Allow ANY two port bits for D+ and D-. - - Merged (optional) receive endpoint number into global usbRxToken variable. - - Use USB_CFG_IOPORTNAME instead of USB_CFG_IOPORT. We now construct the - variable name from the single port letter instead of computing the address - of related ports from the output-port address. - -* Release 2006-06-26 - - - Updated documentation in usbdrv.h and usbconfig-prototype.h to reflect the - new features. - - Removed "#warning" directives because IAR does not understand them. Use - unused static variables instead to generate a warning. - - Do not include when compiling with IAR. - - Introduced USB_CFG_DESCR_PROPS_* in usbconfig.h to configure how each - USB descriptor should be handled. It is now possible to provide descriptor - data in Flash, RAM or dynamically at runtime. - - STALL is now a status in usbTxLen* instead of a message. We can now conform - to the spec and leave the stall status pending until it is cleared. - - Made usbTxPacketCnt1 and usbTxPacketCnt3 public. This allows the - application code to reset data toggling on interrupt pipes. - -* Release 2006-07-18 - - - Added an #if !defined __ASSEMBLER__ to the warning in usbdrv.h. This fixes - an assembler error. - - usbDeviceDisconnect() takes pull-up resistor to high impedance now. - -* Release 2007-02-01 - - - Merged in some code size improvements from usbtiny (thanks to Dick - Streefland for these optimizations!) - - Special alignment requirement for usbRxBuf not required any more. Thanks - again to Dick Streefland for this hint! - - Reverted to "#warning" instead of unused static variables -- new versions - of IAR CC should handle this directive. - - Changed Open Source license to GNU GPL v2 in order to make linking against - other free libraries easier. We no longer require publication of the - circuit diagrams, but we STRONGLY encourage it. If you improve the driver - itself, PLEASE grant us a royalty free license to your changes for our - commercial license. - -* Release 2007-03-29 - - - New configuration option "USB_PUBLIC" in usbconfig.h. - - Set USB version number to 1.10 instead of 1.01. - - Code used USB_CFG_DESCR_PROPS_STRING_DEVICE and - USB_CFG_DESCR_PROPS_STRING_PRODUCT inconsistently. Changed all occurrences - to USB_CFG_DESCR_PROPS_STRING_PRODUCT. - - New assembler module for 16.5 MHz RC oscillator clock with PLL in receiver - code. - - New assembler module for 16 MHz crystal. - - usbdrvasm.S contains common code only, clock-specific parts have been moved - to usbdrvasm12.S, usbdrvasm16.S and usbdrvasm165.S respectively. - -* Release 2007-06-25 - - - 16 MHz module: Do SE0 check in stuffed bits as well. - -* Release 2007-07-07 - - - Define hi8(x) for IAR compiler to limit result to 8 bits. This is necessary - for negative values. - - Added 15 MHz module contributed by V. Bosch. - - Interrupt vector name can now be configured. This is useful if somebody - wants to use a different hardware interrupt than INT0. - -* Release 2007-08-07 - - - Moved handleIn3 routine in usbdrvasm16.S so that relative jump range is - not exceeded. - - More config options: USB_RX_USER_HOOK(), USB_INITIAL_DATATOKEN, - USB_COUNT_SOF - - USB_INTR_PENDING can now be a memory address, not just I/O - -* Release 2007-09-19 - - - Split out common parts of assembler modules into separate include file - - Made endpoint numbers configurable so that given interface definitions - can be matched. See USB_CFG_EP3_NUMBER in usbconfig-prototype.h. - - Store endpoint number for interrupt/bulk-out so that usbFunctionWriteOut() - can handle any number of endpoints. - - Define usbDeviceConnect() and usbDeviceDisconnect() even if no - USB_CFG_PULLUP_IOPORTNAME is defined. Directly set D+ and D- to 0 in this - case. - -* Release 2007-12-01 - - - Optimize usbDeviceConnect() and usbDeviceDisconnect() for less code size - when USB_CFG_PULLUP_IOPORTNAME is not defined. - -* Release 2007-12-13 - - - Renamed all include-only assembler modules from *.S to *.inc so that - people don't add them to their project sources. - - Distribute leap bits in tx loop more evenly for 16 MHz module. - - Use "macro" and "endm" instead of ".macro" and ".endm" for IAR - - Avoid compiler warnings for constant expr range by casting some values in - USB descriptors. - -* Release 2008-01-21 - - - Fixed bug in 15 and 16 MHz module where the new address set with - SET_ADDRESS was already accepted at the next NAK or ACK we send, not at - the next data packet we send. This caused problems when the host polled - too fast. Thanks to Alexander Neumann for his help and patience debugging - this issue! - -* Release 2008-02-05 - - - Fixed bug in 16.5 MHz module where a register was used in the interrupt - handler before it was pushed. This bug was introduced with version - 2007-09-19 when common parts were moved to a separate file. - - Optimized CRC routine (thanks to Reimar Doeffinger). - -* Release 2008-02-16 - - - Removed outdated IAR compatibility stuff (code sections). - - Added hook macros for USB_RESET_HOOK() and USB_SET_ADDRESS_HOOK(). - - Added optional routine usbMeasureFrameLength() for calibration of the - internal RC oscillator. - -* Release 2008-02-28 - - - USB_INITIAL_DATATOKEN defaults to USBPID_DATA1 now, which means that we - start with sending USBPID_DATA0. - - Changed defaults in usbconfig-prototype.h - - Added free USB VID/PID pair for MIDI class devices - - Restructured AVR-USB as separate package, not part of PowerSwitch any more. - -* Release 2008-04-18 - - - Restructured usbdrv.c so that it is easier to read and understand. - - Better code optimization with gcc 4. - - If a second interrupt in endpoint is enabled, also add it to config - descriptor. - - Added config option for long transfers (above 254 bytes), see - USB_CFG_LONG_TRANSFERS in usbconfig.h. - - Added 20 MHz module contributed by Jeroen Benschop. - -* Release 2008-05-13 - - - Fixed bug in libs-host/hiddata.c function usbhidGetReport(): length - was not incremented, pointer to length was incremented instead. - - Added code to command line tool(s) which claims an interface. This code - is disabled by default, but may be necessary on newer Linux kernels. - - Added usbconfig.h option "USB_CFG_CHECK_DATA_TOGGLING". - - New header "usbportability.h" prepares ports to other development - environments. - - Long transfers (above 254 bytes) did not work when usbFunctionRead() was - used to supply the data. Fixed this bug. [Thanks to Alexander Neumann!] - - In hiddata.c (example code for sending/receiving data over HID), use - USB_RECIP_DEVICE instead of USB_RECIP_INTERFACE for control transfers so - that we need not claim the interface. - - in usbPoll() loop 20 times polling for RESET state instead of 10 times. - This accounts for the higher clock rates we now support. - - Added a module for 12.8 MHz RC oscillator with PLL in receiver loop. - - Added hook to SOF code so that oscillator can be tuned to USB frame clock. - - Added timeout to waitForJ loop. Helps preventing unexpected hangs. - - Added example code for oscillator tuning to libs-device (thanks to - Henrik Haftmann for the idea to this routine). - - Implemented option USB_CFG_SUPPRESS_INTR_CODE. - -* Release 2008-10-22 - - - Fixed libs-device/osctune.h: OSCCAL is memory address on ATMega88 and - similar, not offset of 0x20 needs to be added. - - Allow distribution under GPLv3 for those who have to link against other - code distributed under GPLv3. - -* Release 2008-11-26 - - - Removed libusb-win32 dependency for hid-data example in Makefile.windows. - It was never required and confused many people. - - Added extern uchar usbRxToken to usbdrv.h. - - Integrated a module with CRC checks at 18 MHz by Lukas Schrittwieser. - -* Release 2009-03-23 - - - Hid-mouse example used settings from hid-data example, fixed that. - - Renamed project to V-USB due to a trademark issue with Atmel(r). - - Changed CommercialLicense.txt and USBID-License.txt to make the - background of USB ID registration clearer. - -* Release 2009-04-15 - - - Changed CommercialLicense.txt to reflect the new range of PIDs from - Jason Kotzin. - - Removed USBID-License.txt in favor of USB-IDs-for-free.txt and - USB-ID-FAQ.txt - - Fixed a bug in the 12.8 MHz module: End Of Packet decection was made in - the center between bit 0 and 1 of each byte. This is where the data lines - are expected to change and the sampled data may therefore be nonsense. - We therefore check EOP ONLY if bits 0 AND 1 have both been read as 0 on D-. - - Fixed a bitstuffing problem in the 16 MHz module: If bit 6 was stuffed, - the unstuffing code in the receiver routine was 1 cycle too long. If - multiple bytes had the unstuffing in bit 6, the error summed up until the - receiver was out of sync. - - Included option for faster CRC routine. - Thanks to Slawomir Fras (BoskiDialer) for this code! - - Updated bits in Configuration Descriptor's bmAttributes according to - USB 1.1 (in particular bit 7, it is a must-be-set bit now). - -* Release 2009-08-22 - - - Moved first DBG1() after odDebugInit() in all examples. - - Use vector INT0_vect instead of SIG_INTERRUPT0 if defined. This makes - V-USB compatible with the new "p" suffix devices (e.g. ATMega328p). - - USB_CFG_CLOCK_KHZ setting is now required in usbconfig.h (no default any - more). - - New option USB_CFG_DRIVER_FLASH_PAGE allows boot loaders on devices with - more than 64 kB flash. - - Built-in configuration descriptor allows custom definition for second - endpoint now. - -* Release 2010-07-15 diff --git a/tmk_core/protocol/vusb/usbdrv/CommercialLicense.txt b/tmk_core/protocol/vusb/usbdrv/CommercialLicense.txt deleted file mode 100644 index 11d07d9df038..000000000000 --- a/tmk_core/protocol/vusb/usbdrv/CommercialLicense.txt +++ /dev/null @@ -1,166 +0,0 @@ -V-USB Driver Software License Agreement -Version 2009-08-03 - -THIS LICENSE AGREEMENT GRANTS YOU CERTAIN RIGHTS IN A SOFTWARE. YOU CAN -ENTER INTO THIS AGREEMENT AND ACQUIRE THE RIGHTS OUTLINED BELOW BY PAYING -THE AMOUNT ACCORDING TO SECTION 4 ("PAYMENT") TO OBJECTIVE DEVELOPMENT. - - -1 DEFINITIONS - -1.1 "OBJECTIVE DEVELOPMENT" shall mean OBJECTIVE DEVELOPMENT Software GmbH, -Grosse Schiffgasse 1A/7, 1020 Wien, AUSTRIA. - -1.2 "You" shall mean the Licensee. - -1.3 "V-USB" shall mean all files included in the package distributed under -the name "vusb" by OBJECTIVE DEVELOPMENT (http://www.obdev.at/vusb/) -unless otherwise noted. This includes the firmware-only USB device -implementation for Atmel AVR microcontrollers, some simple device examples -and host side software examples and libraries. - - -2 LICENSE GRANTS - -2.1 Source Code. OBJECTIVE DEVELOPMENT shall furnish you with the source -code of V-USB. - -2.2 Distribution and Use. OBJECTIVE DEVELOPMENT grants you the -non-exclusive right to use, copy and distribute V-USB with your hardware -product(s), restricted by the limitations in section 3 below. - -2.3 Modifications. OBJECTIVE DEVELOPMENT grants you the right to modify -the source code and your copy of V-USB according to your needs. - -2.4 USB IDs. OBJECTIVE DEVELOPMENT furnishes you with one or two USB -Product ID(s), sent to you in e-mail. These Product IDs are reserved -exclusively for you. OBJECTIVE DEVELOPMENT has obtained USB Product ID -ranges under the Vendor ID 5824 from Wouter van Ooijen (Van Ooijen -Technische Informatica, www.voti.nl) and under the Vendor ID 8352 from -Jason Kotzin (Clay Logic, www.claylogic.com). Both owners of the Vendor IDs -have obtained these IDs from the USB Implementers Forum, Inc. -(www.usb.org). OBJECTIVE DEVELOPMENT disclaims all liability which might -arise from the assignment of USB IDs. - -2.5 USB Certification. Although not part of this agreement, we want to make -it clear that you cannot become USB certified when you use V-USB or a USB -Product ID assigned by OBJECTIVE DEVELOPMENT. AVR microcontrollers don't -meet the electrical specifications required by the USB specification and -the USB Implementers Forum certifies only members who bought a Vendor ID of -their own. - - -3 LICENSE RESTRICTIONS - -3.1 Number of Units. Only one of the following three definitions is -applicable. Which one is determined by the amount you pay to OBJECTIVE -DEVELOPMENT, see section 4 ("Payment") below. - -Hobby License: You may use V-USB according to section 2 above in no more -than 5 hardware units. These units must not be sold for profit. - -Entry Level License: You may use V-USB according to section 2 above in no -more than 150 hardware units. - -Professional License: You may use V-USB according to section 2 above in -any number of hardware units, except for large scale production ("unlimited -fair use"). Quantities below 10,000 units are not considered large scale -production. If your reach quantities which are obviously large scale -production, you must pay a license fee of 0.10 EUR per unit for all units -above 10,000. - -3.2 Rental. You may not rent, lease, or lend V-USB or otherwise encumber -any copy of V-USB, or any of the rights granted herein. - -3.3 Transfer. You may not transfer your rights under this Agreement to -another party without OBJECTIVE DEVELOPMENT's prior written consent. If -such consent is obtained, you may permanently transfer this License to -another party. The recipient of such transfer must agree to all terms and -conditions of this Agreement. - -3.4 Reservation of Rights. OBJECTIVE DEVELOPMENT retains all rights not -expressly granted. - -3.5 Non-Exclusive Rights. Your license rights under this Agreement are -non-exclusive. - -3.6 Third Party Rights. This Agreement cannot grant you rights controlled -by third parties. In particular, you are not allowed to use the USB logo or -other trademarks owned by the USB Implementers Forum, Inc. without their -consent. Since such consent depends on USB certification, it should be -noted that V-USB will not pass certification because it does not -implement checksum verification and the microcontroller ports do not meet -the electrical specifications. - - -4 PAYMENT - -The payment amount depends on the variation of this agreement (according to -section 3.1) into which you want to enter. Concrete prices are listed on -OBJECTIVE DEVELOPMENT's web site, usually at -http://www.obdev.at/vusb/license.html. You agree to pay the amount listed -there to OBJECTIVE DEVELOPMENT or OBJECTIVE DEVELOPMENT's payment processor -or reseller. - - -5 COPYRIGHT AND OWNERSHIP - -V-USB is protected by copyright laws and international copyright -treaties, as well as other intellectual property laws and treaties. V-USB -is licensed, not sold. - - -6 TERM AND TERMINATION - -6.1 Term. This Agreement shall continue indefinitely. However, OBJECTIVE -DEVELOPMENT may terminate this Agreement and revoke the granted license and -USB-IDs if you fail to comply with any of its terms and conditions. - -6.2 Survival of Terms. All provisions regarding secrecy, confidentiality -and limitation of liability shall survive termination of this agreement. - - -7 DISCLAIMER OF WARRANTY AND LIABILITY - -LIMITED WARRANTY. V-USB IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY -KIND. TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW, OBJECTIVE -DEVELOPMENT AND ITS SUPPLIERS HEREBY DISCLAIM ALL WARRANTIES, EITHER -EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES -OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE, AND -NON-INFRINGEMENT, WITH REGARD TO V-USB, AND THE PROVISION OF OR FAILURE -TO PROVIDE SUPPORT SERVICES. THIS LIMITED WARRANTY GIVES YOU SPECIFIC LEGAL -RIGHTS. YOU MAY HAVE OTHERS, WHICH VARY FROM STATE/JURISDICTION TO -STATE/JURISDICTION. - -LIMITATION OF LIABILITY. TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW, -IN NO EVENT SHALL OBJECTIVE DEVELOPMENT OR ITS SUPPLIERS BE LIABLE FOR ANY -SPECIAL, INCIDENTAL, INDIRECT, OR CONSEQUENTIAL DAMAGES WHATSOEVER -(INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOSS OF BUSINESS PROFITS, -BUSINESS INTERRUPTION, LOSS OF BUSINESS INFORMATION, OR ANY OTHER PECUNIARY -LOSS) ARISING OUT OF THE USE OF OR INABILITY TO USE V-USB OR THE -PROVISION OF OR FAILURE TO PROVIDE SUPPORT SERVICES, EVEN IF OBJECTIVE -DEVELOPMENT HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. IN ANY -CASE, OBJECTIVE DEVELOPMENT'S ENTIRE LIABILITY UNDER ANY PROVISION OF THIS -AGREEMENT SHALL BE LIMITED TO THE AMOUNT ACTUALLY PAID BY YOU FOR V-USB. - - -8 MISCELLANEOUS TERMS - -8.1 Marketing. OBJECTIVE DEVELOPMENT has the right to mention for marketing -purposes that you entered into this agreement. - -8.2 Entire Agreement. This document represents the entire agreement between -OBJECTIVE DEVELOPMENT and you. It may only be modified in writing signed by -an authorized representative of both, OBJECTIVE DEVELOPMENT and you. - -8.3 Severability. In case a provision of these terms and conditions should -be or become partly or entirely invalid, ineffective, or not executable, -the validity of all other provisions shall not be affected. - -8.4 Applicable Law. This agreement is governed by the laws of the Republic -of Austria. - -8.5 Responsible Courts. The responsible courts in Vienna/Austria will have -exclusive jurisdiction regarding all disputes in connection with this -agreement. - diff --git a/tmk_core/protocol/vusb/usbdrv/License.txt b/tmk_core/protocol/vusb/usbdrv/License.txt deleted file mode 100644 index ce4c3aed457d..000000000000 --- a/tmk_core/protocol/vusb/usbdrv/License.txt +++ /dev/null @@ -1,361 +0,0 @@ -OBJECTIVE DEVELOPMENT GmbH's V-USB driver software is distributed under the -terms and conditions of the GNU GPL version 2 or the GNU GPL version 3. It is -your choice whether you apply the terms of version 2 or version 3. The full -text of GPLv2 is included below. In addition to the requirements in the GPL, -we STRONGLY ENCOURAGE you to do the following: - -(1) Publish your entire project on a web site and drop us a note with the URL. -Use the form at http://www.obdev.at/vusb/feedback.html for your submission. - -(2) Adhere to minimum publication standards. Please include AT LEAST: - - a circuit diagram in PDF, PNG or GIF format - - full source code for the host software - - a readme.txt file in ASCII format which describes the purpose of the - project and what can be found in which directories and which files - - a reference to http://www.obdev.at/vusb/ - -(3) If you improve the driver firmware itself, please give us a free license -to your modifications for our commercial license offerings. - - - - GNU GENERAL PUBLIC LICENSE - Version 2, June 1991 - - Copyright (C) 1989, 1991 Free Software Foundation, Inc. - 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - Preamble - - The licenses for most software are designed to take away your -freedom to share and change it. By contrast, the GNU General Public -License is intended to guarantee your freedom to share and change free -software--to make sure the software is free for all its users. This -General Public License applies to most of the Free Software -Foundation's software and to any other program whose authors commit to -using it. (Some other Free Software Foundation software is covered by -the GNU Library General Public License instead.) You can apply it to -your programs, too. - - When we speak of free software, we are referring to freedom, not -price. Our General Public Licenses are designed to make sure that you -have the freedom to distribute copies of free software (and charge for -this service if you wish), that you receive source code or can get it -if you want it, that you can change the software or use pieces of it -in new free programs; and that you know you can do these things. - - To protect your rights, we need to make restrictions that forbid -anyone to deny you these rights or to ask you to surrender the rights. -These restrictions translate to certain responsibilities for you if you -distribute copies of the software, or if you modify it. - - For example, if you distribute copies of such a program, whether -gratis or for a fee, you must give the recipients all the rights that -you have. You must make sure that they, too, receive or can get the -source code. And you must show them these terms so they know their -rights. - - We protect your rights with two steps: (1) copyright the software, and -(2) offer you this license which gives you legal permission to copy, -distribute and/or modify the software. - - Also, for each author's protection and ours, we want to make certain -that everyone understands that there is no warranty for this free -software. If the software is modified by someone else and passed on, we -want its recipients to know that what they have is not the original, so -that any problems introduced by others will not reflect on the original -authors' reputations. - - Finally, any free program is threatened constantly by software -patents. We wish to avoid the danger that redistributors of a free -program will individually obtain patent licenses, in effect making the -program proprietary. To prevent this, we have made it clear that any -patent must be licensed for everyone's free use or not licensed at all. - - The precise terms and conditions for copying, distribution and -modification follow. - - GNU GENERAL PUBLIC LICENSE - TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - - 0. This License applies to any program or other work which contains -a notice placed by the copyright holder saying it may be distributed -under the terms of this General Public License. The "Program", below, -refers to any such program or work, and a "work based on the Program" -means either the Program or any derivative work under copyright law: -that is to say, a work containing the Program or a portion of it, -either verbatim or with modifications and/or translated into another -language. (Hereinafter, translation is included without limitation in -the term "modification".) Each licensee is addressed as "you". - -Activities other than copying, distribution and modification are not -covered by this License; they are outside its scope. The act of -running the Program is not restricted, and the output from the Program -is covered only if its contents constitute a work based on the -Program (independent of having been made by running the Program). -Whether that is true depends on what the Program does. - - 1. You may copy and distribute verbatim copies of the Program's -source code as you receive it, in any medium, provided that you -conspicuously and appropriately publish on each copy an appropriate -copyright notice and disclaimer of warranty; keep intact all the -notices that refer to this License and to the absence of any warranty; -and give any other recipients of the Program a copy of this License -along with the Program. - -You may charge a fee for the physical act of transferring a copy, and -you may at your option offer warranty protection in exchange for a fee. - - 2. You may modify your copy or copies of the Program or any portion -of it, thus forming a work based on the Program, and copy and -distribute such modifications or work under the terms of Section 1 -above, provided that you also meet all of these conditions: - - a) You must cause the modified files to carry prominent notices - stating that you changed the files and the date of any change. - - b) You must cause any work that you distribute or publish, that in - whole or in part contains or is derived from the Program or any - part thereof, to be licensed as a whole at no charge to all third - parties under the terms of this License. - - c) If the modified program normally reads commands interactively - when run, you must cause it, when started running for such - interactive use in the most ordinary way, to print or display an - announcement including an appropriate copyright notice and a - notice that there is no warranty (or else, saying that you provide - a warranty) and that users may redistribute the program under - these conditions, and telling the user how to view a copy of this - License. (Exception: if the Program itself is interactive but - does not normally print such an announcement, your work based on - the Program is not required to print an announcement.) - -These requirements apply to the modified work as a whole. If -identifiable sections of that work are not derived from the Program, -and can be reasonably considered independent and separate works in -themselves, then this License, and its terms, do not apply to those -sections when you distribute them as separate works. But when you -distribute the same sections as part of a whole which is a work based -on the Program, the distribution of the whole must be on the terms of -this License, whose permissions for other licensees extend to the -entire whole, and thus to each and every part regardless of who wrote it. - -Thus, it is not the intent of this section to claim rights or contest -your rights to work written entirely by you; rather, the intent is to -exercise the right to control the distribution of derivative or -collective works based on the Program. - -In addition, mere aggregation of another work not based on the Program -with the Program (or with a work based on the Program) on a volume of -a storage or distribution medium does not bring the other work under -the scope of this License. - - 3. You may copy and distribute the Program (or a work based on it, -under Section 2) in object code or executable form under the terms of -Sections 1 and 2 above provided that you also do one of the following: - - a) Accompany it with the complete corresponding machine-readable - source code, which must be distributed under the terms of Sections - 1 and 2 above on a medium customarily used for software interchange; or, - - b) Accompany it with a written offer, valid for at least three - years, to give any third party, for a charge no more than your - cost of physically performing source distribution, a complete - machine-readable copy of the corresponding source code, to be - distributed under the terms of Sections 1 and 2 above on a medium - customarily used for software interchange; or, - - c) Accompany it with the information you received as to the offer - to distribute corresponding source code. (This alternative is - allowed only for noncommercial distribution and only if you - received the program in object code or executable form with such - an offer, in accord with Subsection b above.) - -The source code for a work means the preferred form of the work for -making modifications to it. For an executable work, complete source -code means all the source code for all modules it contains, plus any -associated interface definition files, plus the scripts used to -control compilation and installation of the executable. However, as a -special exception, the source code distributed need not include -anything that is normally distributed (in either source or binary -form) with the major components (compiler, kernel, and so on) of the -operating system on which the executable runs, unless that component -itself accompanies the executable. - -If distribution of executable or object code is made by offering -access to copy from a designated place, then offering equivalent -access to copy the source code from the same place counts as -distribution of the source code, even though third parties are not -compelled to copy the source along with the object code. - - 4. You may not copy, modify, sublicense, or distribute the Program -except as expressly provided under this License. Any attempt -otherwise to copy, modify, sublicense or distribute the Program is -void, and will automatically terminate your rights under this License. -However, parties who have received copies, or rights, from you under -this License will not have their licenses terminated so long as such -parties remain in full compliance. - - 5. You are not required to accept this License, since you have not -signed it. However, nothing else grants you permission to modify or -distribute the Program or its derivative works. These actions are -prohibited by law if you do not accept this License. Therefore, by -modifying or distributing the Program (or any work based on the -Program), you indicate your acceptance of this License to do so, and -all its terms and conditions for copying, distributing or modifying -the Program or works based on it. - - 6. Each time you redistribute the Program (or any work based on the -Program), the recipient automatically receives a license from the -original licensor to copy, distribute or modify the Program subject to -these terms and conditions. You may not impose any further -restrictions on the recipients' exercise of the rights granted herein. -You are not responsible for enforcing compliance by third parties to -this License. - - 7. If, as a consequence of a court judgment or allegation of patent -infringement or for any other reason (not limited to patent issues), -conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot -distribute so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you -may not distribute the Program at all. For example, if a patent -license would not permit royalty-free redistribution of the Program by -all those who receive copies directly or indirectly through you, then -the only way you could satisfy both it and this License would be to -refrain entirely from distribution of the Program. - -If any portion of this section is held invalid or unenforceable under -any particular circumstance, the balance of the section is intended to -apply and the section as a whole is intended to apply in other -circumstances. - -It is not the purpose of this section to induce you to infringe any -patents or other property right claims or to contest validity of any -such claims; this section has the sole purpose of protecting the -integrity of the free software distribution system, which is -implemented by public license practices. Many people have made -generous contributions to the wide range of software distributed -through that system in reliance on consistent application of that -system; it is up to the author/donor to decide if he or she is willing -to distribute software through any other system and a licensee cannot -impose that choice. - -This section is intended to make thoroughly clear what is believed to -be a consequence of the rest of this License. - - 8. If the distribution and/or use of the Program is restricted in -certain countries either by patents or by copyrighted interfaces, the -original copyright holder who places the Program under this License -may add an explicit geographical distribution limitation excluding -those countries, so that distribution is permitted only in or among -countries not thus excluded. In such case, this License incorporates -the limitation as if written in the body of this License. - - 9. The Free Software Foundation may publish revised and/or new versions -of the General Public License from time to time. Such new versions will -be similar in spirit to the present version, but may differ in detail to -address new problems or concerns. - -Each version is given a distinguishing version number. If the Program -specifies a version number of this License which applies to it and "any -later version", you have the option of following the terms and conditions -either of that version or of any later version published by the Free -Software Foundation. If the Program does not specify a version number of -this License, you may choose any version ever published by the Free Software -Foundation. - - 10. If you wish to incorporate parts of the Program into other free -programs whose distribution conditions are different, write to the author -to ask for permission. For software which is copyrighted by the Free -Software Foundation, write to the Free Software Foundation; we sometimes -make exceptions for this. Our decision will be guided by the two goals -of preserving the free status of all derivatives of our free software and -of promoting the sharing and reuse of software generally. - - NO WARRANTY - - 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY -FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN -OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES -PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED -OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS -TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE -PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, -REPAIR OR CORRECTION. - - 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING -WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR -REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, -INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING -OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED -TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY -YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER -PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE -POSSIBILITY OF SUCH DAMAGES. - - END OF TERMS AND CONDITIONS - - How to Apply These Terms to Your New Programs - - If you develop a new program, and you want it to be of the greatest -possible use to the public, the best way to achieve this is to make it -free software which everyone can redistribute and change under these terms. - - To do so, attach the following notices to the program. It is safest -to attach them to the start of each source file to most effectively -convey the exclusion of warranty; and each file should have at least -the "copyright" line and a pointer to where the full notice is found. - - - Copyright (C) - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - -Also add information on how to contact you by electronic and paper mail. - -If the program is interactive, make it output a short notice like this -when it starts in an interactive mode: - - Gnomovision version 69, Copyright (C) year name of author - Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. - This is free software, and you are welcome to redistribute it - under certain conditions; type `show c' for details. - -The hypothetical commands `show w' and `show c' should show the appropriate -parts of the General Public License. Of course, the commands you use may -be called something other than `show w' and `show c'; they could even be -mouse-clicks or menu items--whatever suits your program. - -You should also get your employer (if you work as a programmer) or your -school, if any, to sign a "copyright disclaimer" for the program, if -necessary. Here is a sample; alter the names: - - Yoyodyne, Inc., hereby disclaims all copyright interest in the program - `Gnomovision' (which makes passes at compilers) written by James Hacker. - - , 1 April 1989 - Ty Coon, President of Vice - -This General Public License does not permit incorporating your program into -proprietary programs. If your program is a subroutine library, you may -consider it more useful to permit linking proprietary applications with the -library. If this is what you want to do, use the GNU Library General -Public License instead of this License. diff --git a/tmk_core/protocol/vusb/usbdrv/Readme.txt b/tmk_core/protocol/vusb/usbdrv/Readme.txt deleted file mode 100644 index 3cff49f6fa2d..000000000000 --- a/tmk_core/protocol/vusb/usbdrv/Readme.txt +++ /dev/null @@ -1,172 +0,0 @@ -This is the readme file to Objective Development's firmware-only USB driver -for Atmel AVR microcontrollers. For more information please visit -http://www.obdev.at/vusb/ - -This directory contains the USB firmware only. Copy it as-is to your own -project and add all .c and .S files to your project (these files are marked -with an asterisk in the list below). Then copy usbconfig-prototype.h as -usbconfig.h to your project and edit it according to your configuration. - - -TECHNICAL DOCUMENTATION -======================= -The technical documentation (API) for the firmware driver is contained in the -file "usbdrv.h". Please read all of it carefully! Configuration options are -documented in "usbconfig-prototype.h". - -The driver consists of the following files: - readme.txt ............. The file you are currently reading. - Changelog.txt .......... Release notes for all versions of the driver. - usbdrv.h ............... Driver interface definitions and technical docs. -* usbdrv.c ............... High level language part of the driver. Link this - module to your code! -* usbdrvasm.S ............ Assembler part of the driver. This module is mostly - a stub and includes one of the usbdrvasm*.S files - depending on processor clock. Link this module to - your code! - usbdrvasm*.inc ......... Assembler routines for particular clock frequencies. - Included by usbdrvasm.S, don't link it directly! - asmcommon.inc .......... Common assembler routines. Included by - usbdrvasm*.inc, don't link it directly! - usbconfig-prototype.h .. Prototype for your own usbdrv.h file. -* oddebug.c .............. Debug functions. Only used when DEBUG_LEVEL is - defined to a value greater than 0. Link this module - to your code! - oddebug.h .............. Interface definitions of the debug module. - usbportability.h ....... Header with compiler-dependent stuff. - usbdrvasm.asm .......... Compatibility stub for IAR-C-compiler. Use this - module instead of usbdrvasm.S when you assembler - with IAR's tools. - License.txt ............ Open Source license for this driver. - CommercialLicense.txt .. Optional commercial license for this driver. - USB-ID-FAQ.txt ......... General infos about USB Product- and Vendor-IDs. - USB-IDs-for-free.txt ... List and terms of use for free shared PIDs. - -(*) ... These files should be linked to your project. - - -CPU CORE CLOCK FREQUENCY -======================== -We supply assembler modules for clock frequencies of 12 MHz, 12.8 MHz, 15 MHz, -16 MHz, 16.5 MHz 18 MHz and 20 MHz. Other clock rates are not supported. The -actual clock rate must be configured in usbconfig.h. - -12 MHz Clock -This is the traditional clock rate of V-USB because it's the lowest clock -rate where the timing constraints of the USB spec can be met. - -15 MHz Clock -Similar to 12 MHz, but some NOPs inserted. On the other hand, the higher clock -rate allows for some loops which make the resulting code size somewhat smaller -than the 12 MHz version. - -16 MHz Clock -This clock rate has been added for users of the Arduino board and other -ready-made boards which come with a fixed 16 MHz crystal. It's also an option -if you need the slightly higher clock rate for performance reasons. Since -16 MHz is not divisible by the USB low speed bit clock of 1.5 MHz, the code -is somewhat tricky and has to insert a leap cycle every third byte. - -12.8 MHz and 16.5 MHz Clock -The assembler modules for these clock rates differ from the other modules -because they have been built for an RC oscillator with only 1% precision. The -receiver code inserts leap cycles to compensate for clock deviations. 1% is -also the precision which can be achieved by calibrating the internal RC -oscillator of the AVR. Please note that only AVRs with internal 64 MHz PLL -oscillator can reach 16.5 MHz with the RC oscillator. This includes the very -popular ATTiny25, ATTiny45, ATTiny85 series as well as the ATTiny26. Almost -all AVRs can reach 12.8 MHz, although this is outside the specified range. - -See the EasyLogger example at http://www.obdev.at/vusb/easylogger.html for -code which calibrates the RC oscillator based on the USB frame clock. - -18 MHz Clock -This module is closer to the USB specification because it performs an on the -fly CRC check for incoming packets. Packets with invalid checksum are -discarded as required by the spec. If you also implement checks for data -PID toggling on application level (see option USB_CFG_CHECK_DATA_TOGGLING -in usbconfig.h for more info), this ensures data integrity. Due to the CRC -tables and alignment requirements, this code is bigger than modules for other -clock rates. To activate this module, you must define USB_CFG_CHECK_CRC to 1 -and USB_CFG_CLOCK_KHZ to 18000 in usbconfig.h. - -20 MHz Clock -This module is for people who won't do it with less than the maximum. Since -20 MHz is not divisible by the USB low speed bit clock of 1.5 MHz, the code -uses similar tricks as the 16 MHz module to insert leap cycles. - - -USB IDENTIFIERS -=============== -Every USB device needs a vendor- and a product-identifier (VID and PID). VIDs -are obtained from usb.org for a price of 1,500 USD. Once you have a VID, you -can assign PIDs at will. - -Since an entry level cost of 1,500 USD is too high for most small companies -and hobbyists, we provide some VID/PID pairs for free. See the file -USB-IDs-for-free.txt for details. - -Objective Development also has some license offerings which include product -IDs. See http://www.obdev.at/vusb/ for details. - - -DEVELOPMENT SYSTEM -================== -This driver has been developed and optimized for the GNU compiler version 3 -and 4. We recommend that you use the GNU compiler suite because it is freely -available. V-USB has also been ported to the IAR compiler and assembler. It -has been tested with IAR 4.10B/W32 and 4.12A/W32 on an ATmega8 with the -"small" and "tiny" memory model. Not every release is tested with IAR CC and -the driver may therefore fail to compile with IAR. Please note that gcc is -more efficient for usbdrv.c because this module has been deliberately -optimized for gcc. - -Gcc version 3 produces smaller code than version 4 due to new optimizing -capabilities which don't always improve things on 8 bit CPUs. The code size -generated by gcc 4 can be reduced with the compiler options --fno-move-loop-invariants, -fno-tree-scev-cprop and --fno-inline-small-functions in addition to -Os. On devices with more than -8k of flash memory, we also recommend the linker option --relax (written as --Wl,--relax for gcc) to convert absolute calls into relative where possible. - -For more information about optimizing options see: - - http://www.tty1.net/blog/2008-04-29-avr-gcc-optimisations_en.html - -These optimizations are good for gcc 4.x. Version 3.x of gcc does not support -most of these options and produces good code anyway. - - -USING V-USB FOR FREE -==================== -The AVR firmware driver is published under the GNU General Public License -Version 2 (GPL2) and the GNU General Public License Version 3 (GPL3). It is -your choice whether you apply the terms of version 2 or version 3. - -If you decide for the free GPL2 or GPL3, we STRONGLY ENCOURAGE you to do the -following things IN ADDITION to the obligations from the GPL: - -(1) Publish your entire project on a web site and drop us a note with the URL. -Use the form at http://www.obdev.at/vusb/feedback.html for your submission. -If you don't have a web site, you can publish the project in obdev's -documentation wiki at -http://www.obdev.at/goto.php?t=vusb-wiki&p=hosted-projects. - -(2) Adhere to minimum publication standards. Please include AT LEAST: - - a circuit diagram in PDF, PNG or GIF format - - full source code for the host software - - a readme.txt file in ASCII format which describes the purpose of the - project and what can be found in which directories and which files - - a reference to http://www.obdev.at/vusb/ - -(3) If you improve the driver firmware itself, please give us a free license -to your modifications for our commercial license offerings. - - -COMMERCIAL LICENSES FOR V-USB -============================= -If you don't want to publish your source code under the terms of the GPL, -you can simply pay money for V-USB. As an additional benefit you get -USB PIDs for free, reserved exclusively to you. See the file -"CommercialLicense.txt" for details. - diff --git a/tmk_core/protocol/vusb/usbdrv/USB-ID-FAQ.txt b/tmk_core/protocol/vusb/usbdrv/USB-ID-FAQ.txt deleted file mode 100644 index d1de8fb618ac..000000000000 --- a/tmk_core/protocol/vusb/usbdrv/USB-ID-FAQ.txt +++ /dev/null @@ -1,149 +0,0 @@ -Version 2009-08-22 - -========================== -WHY DO WE NEED THESE IDs? -========================== - -USB is more than a low level protocol for data transport. It also defines a -common set of requests which must be understood by all devices. And as part -of these common requests, the specification defines data structures, the -USB Descriptors, which are used to describe the properties of the device. - -From the perspective of an operating system, it is therefore possible to find -out basic properties of a device (such as e.g. the manufacturer and the name -of the device) without a device-specific driver. This is essential because -the operating system can choose a driver to load based on this information -(Plug-And-Play). - -Among the most important properties in the Device Descriptor are the USB -Vendor- and Product-ID. Both are 16 bit integers. The most simple form of -driver matching is based on these IDs. The driver announces the Vendor- and -Product-IDs of the devices it can handle and the operating system loads the -appropriate driver when the device is connected. - -It is obvious that this technique only works if the pair Vendor- plus -Product-ID is unique: Only devices which require the same driver can have the -same pair of IDs. - - -===================================================== -HOW DOES THE USB STANDARD ENSURE THAT IDs ARE UNIQUE? -===================================================== - -Since it is so important that USB IDs are unique, the USB Implementers Forum, -Inc. (usb.org) needs a way to enforce this legally. It is not forbidden by -law to build a device and assign it any random numbers as IDs. Usb.org -therefore needs an agreement to regulate the use of USB IDs. The agreement -binds only parties who agreed to it, of course. Everybody else is free to use -any numbers for their IDs. - -So how can usb.org ensure that every manufacturer of USB devices enters into -an agreement with them? They do it via trademark licensing. Usb.org has -registered the trademark "USB", all associated logos and related terms. If -you want to put an USB logo on your product or claim that it is USB -compliant, you must license these trademarks from usb.org. And this is where -you enter into an agreement. See the "USB-IF Trademark License Agreement and -Usage Guidelines for the USB-IF Logo" at -http://www.usb.org/developers/logo_license/. - -Licensing the USB trademarks requires that you buy a USB Vendor-ID from -usb.org (one-time fee of ca. 2,000 USD), that you become a member of usb.org -(yearly fee of ca. 4,000 USD) and that you meet all the technical -specifications from the USB spec. - -This means that most hobbyists and small companies will never be able to -become USB compliant, just because membership is so expensive. And you can't -be compliant with a driver based on V-USB anyway, because the AVR's port pins -don't meet the electrical specifications for USB. So, in principle, all -hobbyists and small companies are free to choose any random numbers for their -IDs. They have nothing to lose... - -There is one exception worth noting, though: If you use a sub-component which -implements USB, the vendor of the sub-components may guarantee USB -compliance. This might apply to some or all of FTDI's solutions. - - -======================================================================= -WHY SHOULD YOU OBTAIN USB IDs EVEN IF YOU DON'T LICENSE USB TRADEMARKS? -======================================================================= - -You have learned in the previous section that you are free to choose any -numbers for your IDs anyway. So why not do exactly this? There is still the -technical issue. If you choose IDs which are already in use by somebody else, -operating systems will load the wrong drivers and your device won't work. -Even if you choose IDs which are not currently in use, they may be in use in -the next version of the operating system or even after an automatic update. - -So what you need is a pair of Vendor- and Product-IDs for which you have the -guarantee that no USB compliant product uses them. This implies that no -operating system will ever ship with drivers responsible for these IDs. - - -============================================== -HOW DOES OBJECTIVE DEVELOPMENT HANDLE USB IDs? -============================================== - -Objective Development gives away pairs of USB-IDs with their V-USB licenses. -In order to ensure that these IDs are unique, Objective Development has an -agreement with the company/person who has bought the USB Vendor-ID from -usb.org. This agreement ensures that a range of USB Product-IDs is reserved -for assignment by Objective Development and that the owner of the Vendor-ID -won't give it to anybody else. - -This means that you have to trust three parties to ensure uniqueness of -your IDs: - - - Objective Development, that they don't give the same PID to more than - one person. - - The owner of the Vendor-ID that they don't assign PIDs from the range - assigned to Objective Development to anybody else. - - Usb.org that they don't assign the same Vendor-ID a second time. - - -================================== -WHO IS THE OWNER OF THE VENDOR-ID? -================================== - -Objective Development has obtained ranges of USB Product-IDs under two -Vendor-IDs: Under Vendor-ID 5824 from Wouter van Ooijen (Van Ooijen -Technische Informatica, www.voti.nl) and under Vendor-ID 8352 from Jason -Kotzin (Clay Logic, www.claylogic.com). Both VID owners have received their -Vendor-ID directly from usb.org. - - -========================================================================= -CAN I USE USB-IDs FROM OBJECTIVE DEVELOPMENT WITH OTHER DRIVERS/HARDWARE? -========================================================================= - -The short answer is: Yes. All you get is a guarantee that the IDs are never -assigned to anybody else. What more do you need? - - -============================ -WHAT ABOUT SHARED ID PAIRS? -============================ - -Objective Development has reserved some PID/VID pairs for shared use. You -have no guarantee of uniqueness for them, except that no USB compliant device -uses them. In order to avoid technical problems, we must ensure that all -devices with the same pair of IDs use the same driver on kernel level. For -details, see the file USB-IDs-for-free.txt. - - -====================================================== -I HAVE HEARD THAT SUB-LICENSING OF USB-IDs IS ILLEGAL? -====================================================== - -A 16 bit integer number cannot be protected by copyright laws. It is not -sufficiently complex. And since none of the parties involved entered into the -USB-IF Trademark License Agreement, we are not bound by this agreement. So -there is no reason why it should be illegal to sub-license USB-IDs. - - -============================================= -WHO IS LIABLE IF THERE ARE INCOMPATIBILITIES? -============================================= - -Objective Development disclaims all liabilities which might arise from the -assignment of IDs. If you guarantee product features to your customers -without proper disclaimer, YOU are liable for that. diff --git a/tmk_core/protocol/vusb/usbdrv/USB-IDs-for-free.txt b/tmk_core/protocol/vusb/usbdrv/USB-IDs-for-free.txt deleted file mode 100644 index 2f4d59ad18e1..000000000000 --- a/tmk_core/protocol/vusb/usbdrv/USB-IDs-for-free.txt +++ /dev/null @@ -1,148 +0,0 @@ -Version 2009-08-22 - -=========================== -FREE USB-IDs FOR SHARED USE -=========================== - -Objective Development has reserved a set of USB Product-IDs for use according -to the guidelines outlined below. For more information about the concept of -USB IDs please see the file USB-ID-FAQ.txt. Objective Development guarantees -that the IDs listed below are not used by any USB compliant devices. - - -==================== -MECHANISM OF SHARING -==================== - -From a technical point of view, two different devices can share the same USB -Vendor- and Product-ID if they require the same driver on operating system -level. We make use of this fact by assigning separate IDs for various device -classes. On application layer, devices must be distinguished by their textual -name or serial number. We offer separate sets of IDs for discrimination by -textual name and for serial number. - -Examples for shared use of USB IDs are included with V-USB in the "examples" -subdirectory. - - -====================================== -IDs FOR DISCRIMINATION BY TEXTUAL NAME -====================================== - -If you use one of the IDs listed below, your device and host-side software -must conform to these rules: - -(1) The USB device MUST provide a textual representation of the manufacturer -and product identification. The manufacturer identification MUST be available -at least in USB language 0x0409 (English/US). - -(2) The textual manufacturer identification MUST contain either an Internet -domain name (e.g. "mycompany.com") registered and owned by you, or an e-mail -address under your control (e.g. "myname@gmx.net"). You can embed the domain -name or e-mail address in any string you like, e.g. "Objective Development -http://www.obdev.at/vusb/". - -(3) You are responsible for retaining ownership of the domain or e-mail -address for as long as any of your products are in use. - -(4) You may choose any string for the textual product identification, as long -as this string is unique within the scope of your textual manufacturer -identification. - -(5) Application side device look-up MUST be based on the textual manufacturer -and product identification in addition to VID/PID matching. The driver -matching MUST be a comparison of the entire strings, NOT a sub-string match. - -(6) For devices which implement a particular USB device class (e.g. HID), the -operating system's default class driver MUST be used. If an operating system -driver for Vendor Class devices is needed, this driver must be libusb or -libusb-win32 (see http://libusb.org/ and -http://libusb-win32.sourceforge.net/). - -Table if IDs for discrimination by textual name: - -PID dec (hex) | VID dec (hex) | Description of use -==============+===============+============================================ -1500 (0x05dc) | 5824 (0x16c0) | For Vendor Class devices with libusb ---------------+---------------+-------------------------------------------- -1503 (0x05df) | 5824 (0x16c0) | For generic HID class devices (which are - | | NOT mice, keyboards or joysticks) ---------------+---------------+-------------------------------------------- -1505 (0x05e1) | 5824 (0x16c0) | For CDC-ACM class devices (modems) ---------------+---------------+-------------------------------------------- -1508 (0x05e4) | 5824 (0x16c0) | For MIDI class devices ---------------+---------------+-------------------------------------------- - -Note that Windows caches the textual product- and vendor-description for -mice, keyboards and joysticks. Name-bsed discrimination is therefore not -recommended for these device classes. - - -======================================= -IDs FOR DISCRIMINATION BY SERIAL NUMBER -======================================= - -If you use one of the IDs listed below, your device and host-side software -must conform to these rules: - -(1) The USB device MUST provide a textual representation of the serial -number. The serial number string MUST be available at least in USB language -0x0409 (English/US). - -(2) The serial number MUST start with either an Internet domain name (e.g. -"mycompany.com") registered and owned by you, or an e-mail address under your -control (e.g. "myname@gmx.net"), both terminated with a colon (":") character. -You MAY append any string you like for further discrimination of your devices. - -(3) You are responsible for retaining ownership of the domain or e-mail -address for as long as any of your products are in use. - -(5) Application side device look-up MUST be based on the serial number string -in addition to VID/PID matching. The matching must start at the first -character of the serial number string and include the colon character -terminating your domain or e-mail address. It MAY stop anywhere after that. - -(6) For devices which implement a particular USB device class (e.g. HID), the -operating system's default class driver MUST be used. If an operating system -driver for Vendor Class devices is needed, this driver must be libusb or -libusb-win32 (see http://libusb.org/ and -http://libusb-win32.sourceforge.net/). - -Table if IDs for discrimination by serial number string: - -PID dec (hex) | VID dec (hex) | Description of use -===============+===============+=========================================== -10200 (0x27d8) | 5824 (0x16c0) | For Vendor Class devices with libusb ----------------+---------------+------------------------------------------- -10201 (0x27d9) | 5824 (0x16c0) | For generic HID class devices (which are - | | NOT mice, keyboards or joysticks) ----------------+---------------+------------------------------------------- -10202 (0x27da) | 5824 (0x16c0) | For USB Mice ----------------+---------------+------------------------------------------- -10203 (0x27db) | 5824 (0x16c0) | For USB Keyboards ----------------+---------------+------------------------------------------- -10204 (0x27db) | 5824 (0x16c0) | For USB Joysticks ----------------+---------------+------------------------------------------- -10205 (0x27dc) | 5824 (0x16c0) | For CDC-ACM class devices (modems) ----------------+---------------+------------------------------------------- -10206 (0x27dd) | 5824 (0x16c0) | For MIDI class devices ----------------+---------------+------------------------------------------- - - -================= -ORIGIN OF USB-IDs -================= - -OBJECTIVE DEVELOPMENT Software GmbH has obtained all VID/PID pairs listed -here from Wouter van Ooijen (see www.voti.nl) for exclusive disposition. -Wouter van Ooijen has obtained the VID from the USB Implementers Forum, Inc. -(see www.usb.org). The VID is registered for the company name "Van Ooijen -Technische Informatica". - - -========== -DISCLAIMER -========== - -OBJECTIVE DEVELOPMENT Software GmbH disclaims all liability for any -problems which are caused by the shared use of these VID/PID pairs. diff --git a/tmk_core/protocol/vusb/usbdrv/asmcommon.inc b/tmk_core/protocol/vusb/usbdrv/asmcommon.inc deleted file mode 100644 index 07d692be3b97..000000000000 --- a/tmk_core/protocol/vusb/usbdrv/asmcommon.inc +++ /dev/null @@ -1,188 +0,0 @@ -/* Name: asmcommon.inc - * Project: V-USB, virtual USB port for Atmel's(r) AVR(r) microcontrollers - * Author: Christian Starkjohann - * Creation Date: 2007-11-05 - * Tabsize: 4 - * Copyright: (c) 2007 by OBJECTIVE DEVELOPMENT Software GmbH - * License: GNU GPL v2 (see License.txt), GNU GPL v3 or proprietary (CommercialLicense.txt) - * Revision: $Id$ - */ - -/* Do not link this file! Link usbdrvasm.S instead, which includes the - * appropriate implementation! - */ - -/* -General Description: -This file contains assembler code which is shared among the USB driver -implementations for different CPU cocks. Since the code must be inserted -in the middle of the module, it's split out into this file and #included. - -Jump destinations called from outside: - sofError: Called when no start sequence was found. - se0: Called when a package has been successfully received. - overflow: Called when receive buffer overflows. - doReturn: Called after sending data. - -Outside jump destinations used by this module: - waitForJ: Called to receive an already arriving packet. - sendAckAndReti: - sendNakAndReti: - sendCntAndReti: - usbSendAndReti: - -The following macros must be defined before this file is included: - .macro POP_STANDARD - .endm - .macro POP_RETI - .endm -*/ - -#define token x1 - -overflow: - ldi x2, 1< 0 - -# warning "Never compile production devices with debugging enabled" - -static void uartPutc(char c) { - while (!(ODDBG_USR & (1 << ODDBG_UDRE))) - ; /* wait for data register empty */ - ODDBG_UDR = c; -} - -static uchar hexAscii(uchar h) { - h &= 0xf; - if (h >= 10) h += 'a' - (uchar)10 - '0'; - h += '0'; - return h; -} - -static void printHex(uchar c) { - uartPutc(hexAscii(c >> 4)); - uartPutc(hexAscii(c)); -} - -void odDebug(uchar prefix, uchar *data, uchar len) { - printHex(prefix); - uartPutc(':'); - while (len--) { - uartPutc(' '); - printHex(*data++); - } - uartPutc('\r'); - uartPutc('\n'); -} - -#endif diff --git a/tmk_core/protocol/vusb/usbdrv/oddebug.h b/tmk_core/protocol/vusb/usbdrv/oddebug.h deleted file mode 100644 index f93f33879453..000000000000 --- a/tmk_core/protocol/vusb/usbdrv/oddebug.h +++ /dev/null @@ -1,121 +0,0 @@ -/* Name: oddebug.h - * Project: AVR library - * Author: Christian Starkjohann - * Creation Date: 2005-01-16 - * 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: oddebug.h 692 2008-11-07 15:07:40Z cs $ - */ - -#ifndef __oddebug_h_included__ -#define __oddebug_h_included__ - -/* -General Description: -This module implements a function for debug logs on the serial line of the -AVR microcontroller. Debugging can be configured with the define -'DEBUG_LEVEL'. If this macro is not defined or defined to 0, all debugging -calls are no-ops. If it is 1, DBG1 logs will appear, but not DBG2. If it is -2, DBG1 and DBG2 logs will be printed. - -A debug log consists of a label ('prefix') to indicate which debug log created -the output and a memory block to dump in hex ('data' and 'len'). -*/ - -#ifndef F_CPU -# define F_CPU 12000000 /* 12 MHz */ -#endif - -/* make sure we have the UART defines: */ -#include "usbportability.h" - -#ifndef uchar -# define uchar unsigned char -#endif - -#if DEBUG_LEVEL > 0 && !(defined TXEN || defined TXEN0) /* no UART in device */ -# warning "Debugging disabled because device has no UART" -# undef DEBUG_LEVEL -#endif - -#ifndef DEBUG_LEVEL -# define DEBUG_LEVEL 0 -#endif - -/* ------------------------------------------------------------------------- */ - -#if DEBUG_LEVEL > 0 -# define DBG1(prefix, data, len) odDebug(prefix, data, len) -#else -# define DBG1(prefix, data, len) -#endif - -#if DEBUG_LEVEL > 1 -# define DBG2(prefix, data, len) odDebug(prefix, data, len) -#else -# define DBG2(prefix, data, len) -#endif - -/* ------------------------------------------------------------------------- */ - -#if DEBUG_LEVEL > 0 -extern void odDebug(uchar prefix, uchar *data, uchar len); - -/* Try to find our control registers; ATMEL likes to rename these */ - -# if defined UBRR -# define ODDBG_UBRR UBRR -# elif defined UBRRL -# define ODDBG_UBRR UBRRL -# elif defined UBRR0 -# define ODDBG_UBRR UBRR0 -# elif defined UBRR0L -# define ODDBG_UBRR UBRR0L -# endif - -# if defined UCR -# define ODDBG_UCR UCR -# elif defined UCSRB -# define ODDBG_UCR UCSRB -# elif defined UCSR0B -# define ODDBG_UCR UCSR0B -# endif - -# if defined TXEN -# define ODDBG_TXEN TXEN -# else -# define ODDBG_TXEN TXEN0 -# endif - -# if defined USR -# define ODDBG_USR USR -# elif defined UCSRA -# define ODDBG_USR UCSRA -# elif defined UCSR0A -# define ODDBG_USR UCSR0A -# endif - -# if defined UDRE -# define ODDBG_UDRE UDRE -# else -# define ODDBG_UDRE UDRE0 -# endif - -# if defined UDR -# define ODDBG_UDR UDR -# elif defined UDR0 -# define ODDBG_UDR UDR0 -# endif - -static inline void odDebugInit(void) { - ODDBG_UCR |= (1 << ODDBG_TXEN); - ODDBG_UBRR = F_CPU / (19200 * 16L) - 1; -} -#else -# define odDebugInit() -#endif - -/* ------------------------------------------------------------------------- */ - -#endif /* __oddebug_h_included__ */ diff --git a/tmk_core/protocol/vusb/usbdrv/usbconfig-prototype.h b/tmk_core/protocol/vusb/usbdrv/usbconfig-prototype.h deleted file mode 100644 index 020ea51474ed..000000000000 --- a/tmk_core/protocol/vusb/usbdrv/usbconfig-prototype.h +++ /dev/null @@ -1,376 +0,0 @@ -/* 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__ - -/* -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). -+ To create your own usbconfig.h file, copy this file to your project's -+ firmware source directory) and rename it to "usbconfig.h". -+ Then edit it accordingly. -*/ - -/* ---------------------------- 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 4 -/* 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 0 -/* 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 0 -/* 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 10 -/* 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. - */ -#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 0 -/* 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 0xc0, 0x16 /* = 0x16c0 = 5824 = voti.nl */ -/* 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 0xdc, 0x05 /* = 0x05dc = 1500 */ -/* 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 'o', 'b', 'd', 'e', 'v', '.', 'a', 't' -#define USB_CFG_VENDOR_NAME_LEN 8 -/* 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', 'e', 'm', 'p', 'l', 'a', 't', 'e' -#define USB_CFG_DEVICE_NAME_LEN 8 -/* 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 0xff /* set to 0 if deferred to interface */ -#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 0 /* define class here if not at device level */ -#define USB_CFG_INTERFACE_SUBCLASS 0 -#define USB_CFG_INTERFACE_PROTOCOL 0 -/* 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 42 */ -/* 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 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 0 -#define USB_CFG_DESCR_PROPS_HID_REPORT 0 -#define USB_CFG_DESCR_PROPS_UNKNOWN 0 - -/* ----------------------- 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 */ - -#endif /* __usbconfig_h_included__ */ diff --git a/tmk_core/protocol/vusb/usbdrv/usbdrv.c b/tmk_core/protocol/vusb/usbdrv/usbdrv.c deleted file mode 100644 index f69198b1b989..000000000000 --- a/tmk_core/protocol/vusb/usbdrv/usbdrv.c +++ /dev/null @@ -1,622 +0,0 @@ -/* Name: usbdrv.c - * Project: V-USB, virtual USB port for Atmel's(r) AVR(r) microcontrollers - * Author: Christian Starkjohann - * Creation Date: 2004-12-29 - * 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: usbdrv.c 791 2010-07-15 15:56:13Z cs $ - */ - -#include "usbportability.h" -#include "usbdrv.h" -#include "oddebug.h" - -/* -General Description: -This module implements the C-part of the USB driver. See usbdrv.h for a -documentation of the entire driver. -*/ - -/* ------------------------------------------------------------------------- */ - -/* raw USB registers / interface to assembler code: */ -uchar usbRxBuf[2 * USB_BUFSIZE]; /* raw RX buffer: PID, 8 bytes data, 2 bytes CRC */ -uchar usbInputBufOffset; /* offset in usbRxBuf used for low level receiving */ -uchar usbDeviceAddr; /* assigned during enumeration, defaults to 0 */ -uchar usbNewDeviceAddr; /* device ID which should be set after status phase */ -uchar usbConfiguration; /* currently selected configuration. Administered by driver, but not used */ -volatile schar usbRxLen; /* = 0; number of bytes in usbRxBuf; 0 means free, -1 for flow control */ -uchar usbCurrentTok; /* last token received or endpoint number for last OUT token if != 0 */ -uchar usbRxToken; /* token for data we received; or endpont number for last OUT */ -volatile uchar usbTxLen = USBPID_NAK; /* number of bytes to transmit with next IN token or handshake token */ -uchar usbTxBuf[USB_BUFSIZE]; /* data to transmit with next IN, free if usbTxLen contains handshake token */ -#if USB_COUNT_SOF -volatile uchar usbSofCount; /* incremented by assembler module every SOF */ -#endif -#if USB_CFG_HAVE_INTRIN_ENDPOINT && !USB_CFG_SUPPRESS_INTR_CODE -usbTxStatus_t usbTxStatus1; -# if USB_CFG_HAVE_INTRIN_ENDPOINT3 -usbTxStatus_t usbTxStatus3; -# endif -#endif -#if USB_CFG_CHECK_DATA_TOGGLING -uchar usbCurrentDataToken; /* when we check data toggling to ignore duplicate packets */ -#endif - -/* USB status registers / not shared with asm code */ -uchar * usbMsgPtr; /* data to transmit next -- ROM or RAM address */ -static usbMsgLen_t usbMsgLen = USB_NO_MSG; /* remaining number of bytes */ -static uchar usbMsgFlags; /* flag values see below */ - -#define USB_FLG_MSGPTR_IS_ROM (1 << 6) -#define USB_FLG_USE_USER_RW (1 << 7) - -/* -optimizing hints: -- do not post/pre inc/dec integer values in operations -- assign value of USB_READ_FLASH() to register variables and don't use side effects in arg -- use narrow scope for variables which should be in X/Y/Z register -- assign char sized expressions to variables to force 8 bit arithmetics -*/ - -/* -------------------------- String Descriptors --------------------------- */ - -#if USB_CFG_DESCR_PROPS_STRINGS == 0 - -# if USB_CFG_DESCR_PROPS_STRING_0 == 0 -# undef USB_CFG_DESCR_PROPS_STRING_0 -# define USB_CFG_DESCR_PROPS_STRING_0 sizeof(usbDescriptorString0) -const PROGMEM char usbDescriptorString0[] = { - /* language descriptor */ - 4, /* sizeof(usbDescriptorString0): length of descriptor in bytes */ - 3, /* descriptor type */ - 0x09, 0x04, /* language index (0x0409 = US-English) */ -}; -# endif - -# if USB_CFG_DESCR_PROPS_STRING_VENDOR == 0 && USB_CFG_VENDOR_NAME_LEN -# undef USB_CFG_DESCR_PROPS_STRING_VENDOR -# define USB_CFG_DESCR_PROPS_STRING_VENDOR sizeof(usbDescriptorStringVendor) -const PROGMEM int usbDescriptorStringVendor[] = {USB_STRING_DESCRIPTOR_HEADER(USB_CFG_VENDOR_NAME_LEN), USB_CFG_VENDOR_NAME}; -# endif - -# if USB_CFG_DESCR_PROPS_STRING_PRODUCT == 0 && USB_CFG_DEVICE_NAME_LEN -# undef USB_CFG_DESCR_PROPS_STRING_PRODUCT -# define USB_CFG_DESCR_PROPS_STRING_PRODUCT sizeof(usbDescriptorStringDevice) -const PROGMEM int usbDescriptorStringDevice[] = {USB_STRING_DESCRIPTOR_HEADER(USB_CFG_DEVICE_NAME_LEN), USB_CFG_DEVICE_NAME}; -# endif - -# if USB_CFG_DESCR_PROPS_STRING_SERIAL_NUMBER == 0 && USB_CFG_SERIAL_NUMBER_LEN -# undef USB_CFG_DESCR_PROPS_STRING_SERIAL_NUMBER -# define USB_CFG_DESCR_PROPS_STRING_SERIAL_NUMBER sizeof(usbDescriptorStringSerialNumber) -const PROGMEM int usbDescriptorStringSerialNumber[] = {USB_STRING_DESCRIPTOR_HEADER(USB_CFG_SERIAL_NUMBER_LEN), USB_CFG_SERIAL_NUMBER}; -# endif - -#endif /* USB_CFG_DESCR_PROPS_STRINGS == 0 */ - -/* --------------------------- Device Descriptor --------------------------- */ - -#if USB_CFG_DESCR_PROPS_DEVICE == 0 -# undef USB_CFG_DESCR_PROPS_DEVICE -# define USB_CFG_DESCR_PROPS_DEVICE sizeof(usbDescriptorDevice) -const PROGMEM char usbDescriptorDevice[] = { - /* USB device descriptor */ - 18, /* sizeof(usbDescriptorDevice): length of descriptor in bytes */ - USBDESCR_DEVICE, /* descriptor type */ - 0x10, 0x01, /* USB version supported */ - USB_CFG_DEVICE_CLASS, USB_CFG_DEVICE_SUBCLASS, 0, /* protocol */ - 8, /* max packet size */ - /* the following two casts affect the first byte of the constant only, but - * that's sufficient to avoid a warning with the default values. - */ - (char)USB_CFG_VENDOR_ID, /* 2 bytes */ - (char)USB_CFG_DEVICE_ID, /* 2 bytes */ - USB_CFG_DEVICE_VERSION, /* 2 bytes */ - USB_CFG_DESCR_PROPS_STRING_VENDOR != 0 ? 1 : 0, /* manufacturer string index */ - USB_CFG_DESCR_PROPS_STRING_PRODUCT != 0 ? 2 : 0, /* product string index */ - USB_CFG_DESCR_PROPS_STRING_SERIAL_NUMBER != 0 ? 3 : 0, /* serial number string index */ - 1, /* number of configurations */ -}; -#endif - -/* ----------------------- Configuration Descriptor ------------------------ */ - -#if USB_CFG_DESCR_PROPS_HID_REPORT != 0 && USB_CFG_DESCR_PROPS_HID == 0 -# undef USB_CFG_DESCR_PROPS_HID -# define USB_CFG_DESCR_PROPS_HID 9 /* length of HID descriptor in config descriptor below */ -#endif - -#if USB_CFG_DESCR_PROPS_CONFIGURATION == 0 -# undef USB_CFG_DESCR_PROPS_CONFIGURATION -# define USB_CFG_DESCR_PROPS_CONFIGURATION sizeof(usbDescriptorConfiguration) -PROGMEM char usbDescriptorConfiguration[] = { - /* USB configuration descriptor */ - 9, /* sizeof(usbDescriptorConfiguration): length of descriptor in bytes */ - USBDESCR_CONFIG, /* descriptor type */ - 18 + 7 * USB_CFG_HAVE_INTRIN_ENDPOINT + 7 * USB_CFG_HAVE_INTRIN_ENDPOINT3 + (USB_CFG_DESCR_PROPS_HID & 0xff), 0, - /* total length of data returned (including inlined descriptors) */ - 1, /* number of interfaces in this configuration */ - 1, /* index of this configuration */ - 0, /* configuration name string index */ -# if USB_CFG_IS_SELF_POWERED - (1 << 7) | USBATTR_SELFPOWER, /* attributes */ -# else - (1 << 7), /* attributes */ -# endif - USB_CFG_MAX_BUS_POWER / 2, /* max USB current in 2mA units */ - /* interface descriptor follows inline: */ - 9, /* sizeof(usbDescrInterface): length of descriptor in bytes */ - USBDESCR_INTERFACE, /* descriptor type */ - 0, /* index of this interface */ - 0, /* alternate setting for this interface */ - USB_CFG_HAVE_INTRIN_ENDPOINT + USB_CFG_HAVE_INTRIN_ENDPOINT3, /* endpoints excl 0: number of endpoint descriptors to follow */ - USB_CFG_INTERFACE_CLASS, USB_CFG_INTERFACE_SUBCLASS, USB_CFG_INTERFACE_PROTOCOL, 0, /* string index for interface */ -# if (USB_CFG_DESCR_PROPS_HID & 0xff) /* HID descriptor */ - 9, /* sizeof(usbDescrHID): length of descriptor in bytes */ - USBDESCR_HID, /* descriptor type: HID */ - 0x01, 0x01, /* BCD representation of HID version */ - 0x00, /* target country code */ - 0x01, /* number of HID Report (or other HID class) Descriptor infos to follow */ - 0x22, /* descriptor type: report */ - USB_CFG_HID_REPORT_DESCRIPTOR_LENGTH, 0, /* total length of report descriptor */ -# endif -# if USB_CFG_HAVE_INTRIN_ENDPOINT /* endpoint descriptor for endpoint 1 */ - 7, /* sizeof(usbDescrEndpoint) */ - USBDESCR_ENDPOINT, /* descriptor type = endpoint */ - (char)0x81, /* IN endpoint number 1 */ - 0x03, /* attrib: Interrupt endpoint */ - 8, 0, /* maximum packet size */ - USB_CFG_INTR_POLL_INTERVAL, /* in ms */ -# endif -# if USB_CFG_HAVE_INTRIN_ENDPOINT3 /* endpoint descriptor for endpoint 3 */ - 7, /* sizeof(usbDescrEndpoint) */ - USBDESCR_ENDPOINT, /* descriptor type = endpoint */ - (char)(0x80 | USB_CFG_EP3_NUMBER), /* IN endpoint number 3 */ - 0x03, /* attrib: Interrupt endpoint */ - 8, 0, /* maximum packet size */ - USB_CFG_INTR_POLL_INTERVAL, /* in ms */ -# endif -}; -#endif - -/* ------------------------------------------------------------------------- */ - -static inline void usbResetDataToggling(void) { -#if USB_CFG_HAVE_INTRIN_ENDPOINT && !USB_CFG_SUPPRESS_INTR_CODE - USB_SET_DATATOKEN1(USB_INITIAL_DATATOKEN); /* reset data toggling for interrupt endpoint */ -# if USB_CFG_HAVE_INTRIN_ENDPOINT3 - USB_SET_DATATOKEN3(USB_INITIAL_DATATOKEN); /* reset data toggling for interrupt endpoint */ -# endif -#endif -} - -static inline void usbResetStall(void) { -#if USB_CFG_IMPLEMENT_HALT && USB_CFG_HAVE_INTRIN_ENDPOINT - usbTxLen1 = USBPID_NAK; -# if USB_CFG_HAVE_INTRIN_ENDPOINT3 - usbTxLen3 = USBPID_NAK; -# endif -#endif -} - -/* ------------------------------------------------------------------------- */ - -#if !USB_CFG_SUPPRESS_INTR_CODE -# if USB_CFG_HAVE_INTRIN_ENDPOINT -static void usbGenericSetInterrupt(uchar *data, uchar len, usbTxStatus_t *txStatus) { - uchar *p; - char i; - -# if USB_CFG_IMPLEMENT_HALT - if (usbTxLen1 == USBPID_STALL) return; -# endif - if (txStatus->len & 0x10) { /* packet buffer was empty */ - txStatus->buffer[0] ^= USBPID_DATA0 ^ USBPID_DATA1; /* toggle token */ - } else { - txStatus->len = USBPID_NAK; /* avoid sending outdated (overwritten) interrupt data */ - } - p = txStatus->buffer + 1; - i = len; - do { /* if len == 0, we still copy 1 byte, but that's no problem */ - *p++ = *data++; - } while (--i > 0); /* loop control at the end is 2 bytes shorter than at beginning */ - usbCrc16Append(&txStatus->buffer[1], len); - txStatus->len = len + 4; /* len must be given including sync byte */ - DBG2(0x21 + (((int)txStatus >> 3) & 3), txStatus->buffer, len + 3); -} - -USB_PUBLIC void usbSetInterrupt(uchar *data, uchar len) { usbGenericSetInterrupt(data, len, &usbTxStatus1); } -# endif - -# if USB_CFG_HAVE_INTRIN_ENDPOINT3 -USB_PUBLIC void usbSetInterrupt3(uchar *data, uchar len) { usbGenericSetInterrupt(data, len, &usbTxStatus3); } -# endif -#endif /* USB_CFG_SUPPRESS_INTR_CODE */ - -/* ------------------ utilities for code following below ------------------- */ - -/* Use defines for the switch statement so that we can choose between an - * if()else if() and a switch/case based implementation. switch() is more - * efficient for a LARGE set of sequential choices, if() is better in all other - * cases. - */ -#if USB_CFG_USE_SWITCH_STATEMENT -# define SWITCH_START(cmd) \ - switch (cmd) { \ - { -# define SWITCH_CASE(value) \ - } \ - break; \ - case (value): { -# define SWITCH_CASE2(v1, v2) \ - } \ - break; \ - case (v1): \ - case (v2): { -# define SWITCH_CASE3(v1, v2, v3) \ - } \ - break; \ - case (v1): \ - case (v2): \ - case (v3): { -# define SWITCH_DEFAULT \ - } \ - break; \ - default: { -# define SWITCH_END \ - } \ - } -#else -# define SWITCH_START(cmd) \ - { \ - uchar _cmd = cmd; \ - if (0) { -# define SWITCH_CASE(value) \ - } \ - else if (_cmd == (value)) { -# define SWITCH_CASE2(v1, v2) \ - } \ - else if (_cmd == (v1) || _cmd == (v2)) { -# define SWITCH_CASE3(v1, v2, v3) \ - } \ - else if (_cmd == (v1) || _cmd == (v2) || (_cmd == v3)) { -# define SWITCH_DEFAULT \ - } \ - else { -# define SWITCH_END \ - } \ - } -#endif - -#ifndef USB_RX_USER_HOOK -# define USB_RX_USER_HOOK(data, len) -#endif -#ifndef USB_SET_ADDRESS_HOOK -# define USB_SET_ADDRESS_HOOK() -#endif - -/* ------------------------------------------------------------------------- */ - -/* We use if() instead of #if in the macro below because #if can't be used - * in macros and the compiler optimizes constant conditions anyway. - * This may cause problems with undefined symbols if compiled without - * optimizing! - */ -#define GET_DESCRIPTOR(cfgProp, staticName) \ - if (cfgProp) { \ - if ((cfgProp)&USB_PROP_IS_RAM) flags = 0; \ - if ((cfgProp)&USB_PROP_IS_DYNAMIC) { \ - len = usbFunctionDescriptor(rq); \ - } else { \ - len = USB_PROP_LENGTH(cfgProp); \ - usbMsgPtr = (uchar *)(staticName); \ - } \ - } - -/* usbDriverDescriptor() is similar to usbFunctionDescriptor(), but used - * internally for all types of descriptors. - */ -static inline usbMsgLen_t usbDriverDescriptor(usbRequest_t *rq) { - usbMsgLen_t len = 0; - uchar flags = USB_FLG_MSGPTR_IS_ROM; - - SWITCH_START(rq->wValue.bytes[1]) - SWITCH_CASE(USBDESCR_DEVICE) /* 1 */ - GET_DESCRIPTOR(USB_CFG_DESCR_PROPS_DEVICE, usbDescriptorDevice) - SWITCH_CASE(USBDESCR_CONFIG) /* 2 */ - GET_DESCRIPTOR(USB_CFG_DESCR_PROPS_CONFIGURATION, usbDescriptorConfiguration) - SWITCH_CASE(USBDESCR_STRING) /* 3 */ -#if USB_CFG_DESCR_PROPS_STRINGS & USB_PROP_IS_DYNAMIC - if (USB_CFG_DESCR_PROPS_STRINGS & USB_PROP_IS_RAM) flags = 0; - len = usbFunctionDescriptor(rq); -#else /* USB_CFG_DESCR_PROPS_STRINGS & USB_PROP_IS_DYNAMIC */ - SWITCH_START(rq->wValue.bytes[0]) - SWITCH_CASE(0) - GET_DESCRIPTOR(USB_CFG_DESCR_PROPS_STRING_0, usbDescriptorString0) - SWITCH_CASE(1) - GET_DESCRIPTOR(USB_CFG_DESCR_PROPS_STRING_VENDOR, usbDescriptorStringVendor) - SWITCH_CASE(2) - GET_DESCRIPTOR(USB_CFG_DESCR_PROPS_STRING_PRODUCT, usbDescriptorStringDevice) - SWITCH_CASE(3) - GET_DESCRIPTOR(USB_CFG_DESCR_PROPS_STRING_SERIAL_NUMBER, usbDescriptorStringSerialNumber) - SWITCH_DEFAULT - if (USB_CFG_DESCR_PROPS_UNKNOWN & USB_PROP_IS_DYNAMIC) { - len = usbFunctionDescriptor(rq); - } - SWITCH_END -#endif /* USB_CFG_DESCR_PROPS_STRINGS & USB_PROP_IS_DYNAMIC */ -#if USB_CFG_DESCR_PROPS_HID_REPORT /* only support HID descriptors if enabled */ - SWITCH_CASE(USBDESCR_HID) /* 0x21 */ - GET_DESCRIPTOR(USB_CFG_DESCR_PROPS_HID, usbDescriptorConfiguration + 18) - SWITCH_CASE(USBDESCR_HID_REPORT) /* 0x22 */ - GET_DESCRIPTOR(USB_CFG_DESCR_PROPS_HID_REPORT, usbDescriptorHidReport) -#endif - SWITCH_DEFAULT - if (USB_CFG_DESCR_PROPS_UNKNOWN & USB_PROP_IS_DYNAMIC) { - len = usbFunctionDescriptor(rq); - } - SWITCH_END - usbMsgFlags = flags; - return len; -} - -/* ------------------------------------------------------------------------- */ - -/* usbDriverSetup() is similar to usbFunctionSetup(), but it's used for - * standard requests instead of class and custom requests. - */ -static inline usbMsgLen_t usbDriverSetup(usbRequest_t *rq) { - uchar len = 0, *dataPtr = usbTxBuf + 9; /* there are 2 bytes free space at the end of the buffer */ - uchar value = rq->wValue.bytes[0]; -#if USB_CFG_IMPLEMENT_HALT - uchar index = rq->wIndex.bytes[0]; -#endif - - dataPtr[0] = 0; /* default reply common to USBRQ_GET_STATUS and USBRQ_GET_INTERFACE */ - SWITCH_START(rq->bRequest) - SWITCH_CASE(USBRQ_GET_STATUS) /* 0 */ - uchar recipient = rq->bmRequestType & USBRQ_RCPT_MASK; /* assign arith ops to variables to enforce byte size */ - if (USB_CFG_IS_SELF_POWERED && recipient == USBRQ_RCPT_DEVICE) dataPtr[0] = USB_CFG_IS_SELF_POWERED; -#if USB_CFG_IMPLEMENT_HALT - if (recipient == USBRQ_RCPT_ENDPOINT && index == 0x81) /* request status for endpoint 1 */ - dataPtr[0] = usbTxLen1 == USBPID_STALL; -#endif - dataPtr[1] = 0; - len = 2; -#if USB_CFG_IMPLEMENT_HALT - SWITCH_CASE2(USBRQ_CLEAR_FEATURE, USBRQ_SET_FEATURE) /* 1, 3 */ - if (value == 0 && index == 0x81) { /* feature 0 == HALT for endpoint == 1 */ - usbTxLen1 = rq->bRequest == USBRQ_CLEAR_FEATURE ? USBPID_NAK : USBPID_STALL; - usbResetDataToggling(); - } -#endif - SWITCH_CASE(USBRQ_SET_ADDRESS) /* 5 */ - usbNewDeviceAddr = value; - USB_SET_ADDRESS_HOOK(); - SWITCH_CASE(USBRQ_GET_DESCRIPTOR) /* 6 */ - len = usbDriverDescriptor(rq); - goto skipMsgPtrAssignment; - SWITCH_CASE(USBRQ_GET_CONFIGURATION) /* 8 */ - dataPtr = &usbConfiguration; /* send current configuration value */ - len = 1; - SWITCH_CASE(USBRQ_SET_CONFIGURATION) /* 9 */ - usbConfiguration = value; - usbResetStall(); - SWITCH_CASE(USBRQ_GET_INTERFACE) /* 10 */ - len = 1; -#if USB_CFG_HAVE_INTRIN_ENDPOINT && !USB_CFG_SUPPRESS_INTR_CODE - SWITCH_CASE(USBRQ_SET_INTERFACE) /* 11 */ - usbResetDataToggling(); - usbResetStall(); -#endif - SWITCH_DEFAULT /* 7=SET_DESCRIPTOR, 12=SYNC_FRAME */ - /* Should we add an optional hook here? */ - SWITCH_END usbMsgPtr = dataPtr; -skipMsgPtrAssignment: - return len; -} - -/* ------------------------------------------------------------------------- */ - -/* usbProcessRx() is called for every message received by the interrupt - * routine. It distinguishes between SETUP and DATA packets and processes - * them accordingly. - */ -static inline void usbProcessRx(uchar *data, uchar len) { - usbRequest_t *rq = (void *)data; - - /* usbRxToken can be: - * 0x2d 00101101 (USBPID_SETUP for setup data) - * 0xe1 11100001 (USBPID_OUT: data phase of setup transfer) - * 0...0x0f for OUT on endpoint X - */ - DBG2(0x10 + (usbRxToken & 0xf), data, len + 2); /* SETUP=1d, SETUP-DATA=11, OUTx=1x */ - USB_RX_USER_HOOK(data, len) -#if USB_CFG_IMPLEMENT_FN_WRITEOUT - if (usbRxToken < 0x10) { /* OUT to endpoint != 0: endpoint number in usbRxToken */ - usbFunctionWriteOut(data, len); - return; - } -#endif - if (usbRxToken == (uchar)USBPID_SETUP) { - if (len != 8) /* Setup size must be always 8 bytes. Ignore otherwise. */ - return; - usbMsgLen_t replyLen; - usbTxBuf[0] = USBPID_DATA0; /* initialize data toggling */ - usbTxLen = USBPID_NAK; /* abort pending transmit */ - usbMsgFlags = 0; - uchar type = rq->bmRequestType & USBRQ_TYPE_MASK; - if (type != USBRQ_TYPE_STANDARD) { /* standard requests are handled by driver */ - replyLen = usbFunctionSetup(data); - } else { - replyLen = usbDriverSetup(rq); - } -#if USB_CFG_IMPLEMENT_FN_READ || USB_CFG_IMPLEMENT_FN_WRITE - if (replyLen == USB_NO_MSG) { /* use user-supplied read/write function */ - /* do some conditioning on replyLen, but on IN transfers only */ - if ((rq->bmRequestType & USBRQ_DIR_MASK) != USBRQ_DIR_HOST_TO_DEVICE) { - if (sizeof(replyLen) < sizeof(rq->wLength.word)) { /* help compiler with optimizing */ - replyLen = rq->wLength.bytes[0]; - } else { - replyLen = rq->wLength.word; - } - } - usbMsgFlags = USB_FLG_USE_USER_RW; - } else /* The 'else' prevents that we limit a replyLen of USB_NO_MSG to the maximum transfer len. */ -#endif - if (sizeof(replyLen) < sizeof(rq->wLength.word)) { /* help compiler with optimizing */ - if (!rq->wLength.bytes[1] && replyLen > rq->wLength.bytes[0]) /* limit length to max */ - replyLen = rq->wLength.bytes[0]; - } else { - if (replyLen > rq->wLength.word) /* limit length to max */ - replyLen = rq->wLength.word; - } - usbMsgLen = replyLen; - } else { /* usbRxToken must be USBPID_OUT, which means data phase of setup (control-out) */ -#if USB_CFG_IMPLEMENT_FN_WRITE - if (usbMsgFlags & USB_FLG_USE_USER_RW) { - uchar rval = usbFunctionWrite(data, len); - if (rval == 0xff) { /* an error occurred */ - usbTxLen = USBPID_STALL; - } else if (rval != 0) { /* This was the final package */ - usbMsgLen = 0; /* answer with a zero-sized data packet */ - } - } -#endif - } -} - -/* ------------------------------------------------------------------------- */ - -/* This function is similar to usbFunctionRead(), but it's also called for - * data handled automatically by the driver (e.g. descriptor reads). - */ -static uchar usbDeviceRead(uchar *data, uchar len) { - if (len > 0) { /* don't bother app with 0 sized reads */ -#if USB_CFG_IMPLEMENT_FN_READ - if (usbMsgFlags & USB_FLG_USE_USER_RW) { - len = usbFunctionRead(data, len); - } else -#endif - { - uchar i = len, *r = usbMsgPtr; - if (usbMsgFlags & USB_FLG_MSGPTR_IS_ROM) { /* ROM data */ - do { - uchar c = USB_READ_FLASH(r); /* assign to char size variable to enforce byte ops */ - *data++ = c; - r++; - } while (--i); - } else { /* RAM data */ - do { - *data++ = *r++; - } while (--i); - } - usbMsgPtr = r; - } - } - return len; -} - -/* ------------------------------------------------------------------------- */ - -/* usbBuildTxBlock() is called when we have data to transmit and the - * interrupt routine's transmit buffer is empty. - */ -static inline void usbBuildTxBlock(void) { - usbMsgLen_t wantLen; - uchar len; - - wantLen = usbMsgLen; - if (wantLen > 8) wantLen = 8; - usbMsgLen -= wantLen; - usbTxBuf[0] ^= USBPID_DATA0 ^ USBPID_DATA1; /* DATA toggling */ - len = usbDeviceRead(usbTxBuf + 1, wantLen); - if (len <= 8) { /* valid data packet */ - usbCrc16Append(&usbTxBuf[1], len); - len += 4; /* length including sync byte */ - if (len < 12) /* a partial package identifies end of message */ - usbMsgLen = USB_NO_MSG; - } else { - len = USBPID_STALL; /* stall the endpoint */ - usbMsgLen = USB_NO_MSG; - } - usbTxLen = len; - DBG2(0x20, usbTxBuf, len - 1); -} - -/* ------------------------------------------------------------------------- */ - -static inline void usbHandleResetHook(uchar notResetState) { -#ifdef USB_RESET_HOOK - static uchar wasReset; - uchar isReset = !notResetState; - - if (wasReset != isReset) { - USB_RESET_HOOK(isReset); - wasReset = isReset; - } -#endif -} - -/* ------------------------------------------------------------------------- */ - -USB_PUBLIC void usbPoll(void) { - schar len; - uchar i; - - len = usbRxLen - 3; - if (len >= 0) { - /* We could check CRC16 here -- but ACK has already been sent anyway. If you - * need data integrity checks with this driver, check the CRC in your app - * code and report errors back to the host. Since the ACK was already sent, - * retries must be handled on application level. - * unsigned crc = usbCrc16(buffer + 1, usbRxLen - 3); - */ - usbProcessRx(usbRxBuf + USB_BUFSIZE + 1 - usbInputBufOffset, len); -#if USB_CFG_HAVE_FLOWCONTROL - if (usbRxLen > 0) /* only mark as available if not inactivated */ - usbRxLen = 0; -#else - usbRxLen = 0; /* mark rx buffer as available */ -#endif - } - if (usbTxLen & 0x10) { /* transmit system idle */ - if (usbMsgLen != USB_NO_MSG) { /* transmit data pending? */ - usbBuildTxBlock(); - } - } - for (i = 20; i > 0; i--) { - uchar usbLineStatus = USBIN & USBMASK; - if (usbLineStatus != 0) /* SE0 has ended */ - goto isNotReset; - } - /* RESET condition, called multiple times during reset */ - usbNewDeviceAddr = 0; - usbDeviceAddr = 0; - usbResetStall(); - DBG1(0xff, 0, 0); -isNotReset: - usbHandleResetHook(i); -} - -/* ------------------------------------------------------------------------- */ - -USB_PUBLIC void usbInit(void) { -#if USB_INTR_CFG_SET != 0 - USB_INTR_CFG |= USB_INTR_CFG_SET; -#endif -#if USB_INTR_CFG_CLR != 0 - USB_INTR_CFG &= ~(USB_INTR_CFG_CLR); -#endif - USB_INTR_ENABLE |= (1 << USB_INTR_ENABLE_BIT); - usbResetDataToggling(); -#if USB_CFG_HAVE_INTRIN_ENDPOINT && !USB_CFG_SUPPRESS_INTR_CODE - usbTxLen1 = USBPID_NAK; -# if USB_CFG_HAVE_INTRIN_ENDPOINT3 - usbTxLen3 = USBPID_NAK; -# endif -#endif -} - -/* ------------------------------------------------------------------------- */ diff --git a/tmk_core/protocol/vusb/usbdrv/usbdrv.h b/tmk_core/protocol/vusb/usbdrv/usbdrv.h deleted file mode 100644 index 88a1bce76eeb..000000000000 --- a/tmk_core/protocol/vusb/usbdrv/usbdrv.h +++ /dev/null @@ -1,730 +0,0 @@ -/* Name: usbdrv.h - * Project: V-USB, virtual USB port for Atmel's(r) AVR(r) microcontrollers - * Author: Christian Starkjohann - * Creation Date: 2004-12-29 - * 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: usbdrv.h 793 2010-07-15 15:58:11Z cs $ - */ - -#ifndef __usbdrv_h_included__ -#define __usbdrv_h_included__ -#include "usbconfig.h" -#include "usbportability.h" - -/* -Hardware Prerequisites: -======================= -USB lines D+ and D- MUST be wired to the same I/O port. We recommend that D+ -triggers the interrupt (best achieved by using INT0 for D+), but it is also -possible to trigger the interrupt from D-. If D- is used, interrupts are also -triggered by SOF packets. D- requires a pull-up of 1.5k to +3.5V (and the -device must be powered at 3.5V) to identify as low-speed USB device. A -pull-down or pull-up of 1M SHOULD be connected from D+ to +3.5V to prevent -interference when no USB master is connected. If you use Zener diodes to limit -the voltage on D+ and D-, you MUST use a pull-down resistor, not a pull-up. -We use D+ as interrupt source and not D- because it does not trigger on -keep-alive and RESET states. If you want to count keep-alive events with -USB_COUNT_SOF, you MUST use D- as an interrupt source. - -As a compile time option, the 1.5k pull-up resistor on D- can be made -switchable to allow the device to disconnect at will. See the definition of -usbDeviceConnect() and usbDeviceDisconnect() further down in this file. - -Please adapt the values in usbconfig.h according to your hardware! - -The device MUST be clocked at exactly 12 MHz, 15 MHz, 16 MHz or 20 MHz -or at 12.8 MHz resp. 16.5 MHz +/- 1%. See usbconfig-prototype.h for details. - - -Limitations: -============ -Robustness with respect to communication errors: -The driver assumes error-free communication. It DOES check for errors in -the PID, but does NOT check bit stuffing errors, SE0 in middle of a byte, -token CRC (5 bit) and data CRC (16 bit). CRC checks can not be performed due -to timing constraints: We must start sending a reply within 7 bit times. -Bit stuffing and misplaced SE0 would have to be checked in real-time, but CPU -performance does not permit that. The driver does not check Data0/Data1 -toggling, but application software can implement the check. - -Input characteristics: -Since no differential receiver circuit is used, electrical interference -robustness may suffer. The driver samples only one of the data lines with -an ordinary I/O pin's input characteristics. However, since this is only a -low speed USB implementation and the specification allows for 8 times the -bit rate over the same hardware, we should be on the safe side. Even the spec -requires detection of asymmetric states at high bit rate for SE0 detection. - -Number of endpoints: -The driver supports the following endpoints: - -- Endpoint 0, the default control endpoint. -- Any number of interrupt- or bulk-out endpoints. The data is sent to - usbFunctionWriteOut() and USB_CFG_IMPLEMENT_FN_WRITEOUT must be defined - to 1 to activate this feature. The endpoint number can be found in the - global variable 'usbRxToken'. -- One default interrupt- or bulk-in endpoint. This endpoint is used for - interrupt- or bulk-in transfers which are not handled by any other endpoint. - You must define USB_CFG_HAVE_INTRIN_ENDPOINT in order to activate this - feature and call usbSetInterrupt() to send interrupt/bulk data. -- One additional interrupt- or bulk-in endpoint. This was endpoint 3 in - previous versions of this driver but can now be configured to any endpoint - number. You must define USB_CFG_HAVE_INTRIN_ENDPOINT3 in order to activate - this feature and call usbSetInterrupt3() to send interrupt/bulk data. The - endpoint number can be set with USB_CFG_EP3_NUMBER. - -Please note that the USB standard forbids bulk endpoints for low speed devices! -Most operating systems allow them anyway, but the AVR will spend 90% of the CPU -time in the USB interrupt polling for bulk data. - -Maximum data payload: -Data payload of control in and out transfers may be up to 254 bytes. In order -to accept payload data of out transfers, you need to implement -'usbFunctionWrite()'. - -USB Suspend Mode supply current: -The USB standard limits power consumption to 500uA when the bus is in suspend -mode. This is not a problem for self-powered devices since they don't need -bus power anyway. Bus-powered devices can achieve this only by putting the -CPU in sleep mode. The driver does not implement suspend handling by itself. -However, the application may implement activity monitoring and wakeup from -sleep. The host sends regular SE0 states on the bus to keep it active. These -SE0 states can be detected by using D- as the interrupt source. Define -USB_COUNT_SOF to 1 and use the global variable usbSofCount to check for bus -activity. - -Operation without an USB master: -The driver behaves neutral without connection to an USB master if D- reads -as 1. To avoid spurious interrupts, we recommend a high impedance (e.g. 1M) -pull-down or pull-up resistor on D+ (interrupt). If Zener diodes are used, -use a pull-down. If D- becomes statically 0, the driver may block in the -interrupt routine. - -Interrupt latency: -The application must ensure that the USB interrupt is not disabled for more -than 25 cycles (this is for 12 MHz, faster clocks allow longer latency). -This implies that all interrupt routines must either have the "ISR_NOBLOCK" -attribute set (see "avr/interrupt.h") or be written in assembler with "sei" -as the first instruction. - -Maximum interrupt duration / CPU cycle consumption: -The driver handles all USB communication during the interrupt service -routine. The routine will not return before an entire USB message is received -and the reply is sent. This may be up to ca. 1200 cycles @ 12 MHz (= 100us) if -the host conforms to the standard. The driver will consume CPU cycles for all -USB messages, even if they address another (low-speed) device on the same bus. - -*/ - -/* ------------------------------------------------------------------------- */ -/* --------------------------- Module Interface ---------------------------- */ -/* ------------------------------------------------------------------------- */ - -#define USBDRV_VERSION 20100715 -/* This define uniquely identifies a driver version. It is a decimal number - * constructed from the driver's release date in the form YYYYMMDD. If the - * driver's behavior or interface changes, you can use this constant to - * distinguish versions. If it is not defined, the driver's release date is - * older than 2006-01-25. - */ - -#ifndef USB_PUBLIC -# define USB_PUBLIC -#endif -/* USB_PUBLIC is used as declaration attribute for all functions exported by - * the USB driver. The default is no attribute (see above). You may define it - * to static either in usbconfig.h or from the command line if you include - * usbdrv.c instead of linking against it. Including the C module of the driver - * directly in your code saves a couple of bytes in flash memory. - */ - -#ifndef __ASSEMBLER__ -# ifndef uchar -# define uchar unsigned char -# endif -# ifndef schar -# define schar signed char -# endif -/* shortcuts for well defined 8 bit integer types */ - -# if USB_CFG_LONG_TRANSFERS /* if more than 254 bytes transfer size required */ -# define usbMsgLen_t unsigned -# else -# define usbMsgLen_t uchar -# endif -/* usbMsgLen_t is the data type used for transfer lengths. By default, it is - * defined to uchar, allowing a maximum of 254 bytes (255 is reserved for - * USB_NO_MSG below). If the usbconfig.h defines USB_CFG_LONG_TRANSFERS to 1, - * a 16 bit data type is used, allowing up to 16384 bytes (the rest is used - * for flags in the descriptor configuration). - */ -# define USB_NO_MSG ((usbMsgLen_t)-1) /* constant meaning "no message" */ - -struct usbRequest; /* forward declaration */ - -USB_PUBLIC void usbInit(void); -/* This function must be called before interrupts are enabled and the main - * loop is entered. We exepct that the PORT and DDR bits for D+ and D- have - * not been changed from their default status (which is 0). If you have changed - * them, set both back to 0 (configure them as input with no internal pull-up). - */ -USB_PUBLIC void usbPoll(void); -/* This function must be called at regular intervals from the main loop. - * Maximum delay between calls is somewhat less than 50ms (USB timeout for - * accepting a Setup message). Otherwise the device will not be recognized. - * Please note that debug outputs through the UART take ~ 0.5ms per byte - * at 19200 bps. - */ -extern uchar *usbMsgPtr; -/* This variable may be used to pass transmit data to the driver from the - * implementation of usbFunctionWrite(). It is also used internally by the - * driver for standard control requests. - */ -USB_PUBLIC usbMsgLen_t usbFunctionSetup(uchar data[8]); -/* This function is called when the driver receives a SETUP transaction from - * the host which is not answered by the driver itself (in practice: class and - * vendor requests). All control transfers start with a SETUP transaction where - * the host communicates the parameters of the following (optional) data - * transfer. The SETUP data is available in the 'data' parameter which can - * (and should) be casted to 'usbRequest_t *' for a more user-friendly access - * to parameters. - * - * If the SETUP indicates a control-in transfer, you should provide the - * requested data to the driver. There are two ways to transfer this data: - * (1) Set the global pointer 'usbMsgPtr' to the base of the static RAM data - * block and return the length of the data in 'usbFunctionSetup()'. The driver - * will handle the rest. Or (2) return USB_NO_MSG in 'usbFunctionSetup()'. The - * driver will then call 'usbFunctionRead()' when data is needed. See the - * documentation for usbFunctionRead() for details. - * - * If the SETUP indicates a control-out transfer, the only way to receive the - * data from the host is through the 'usbFunctionWrite()' call. If you - * implement this function, you must return USB_NO_MSG in 'usbFunctionSetup()' - * to indicate that 'usbFunctionWrite()' should be used. See the documentation - * of this function for more information. If you just want to ignore the data - * sent by the host, return 0 in 'usbFunctionSetup()'. - * - * Note that calls to the functions usbFunctionRead() and usbFunctionWrite() - * are only done if enabled by the configuration in usbconfig.h. - */ -USB_PUBLIC usbMsgLen_t usbFunctionDescriptor(struct usbRequest *rq); -/* You need to implement this function ONLY if you provide USB descriptors at - * runtime (which is an expert feature). It is very similar to - * usbFunctionSetup() above, but it is called only to request USB descriptor - * data. See the documentation of usbFunctionSetup() above for more info. - */ -# if USB_CFG_HAVE_INTRIN_ENDPOINT -USB_PUBLIC void usbSetInterrupt(uchar *data, uchar len); -/* This function sets the message which will be sent during the next interrupt - * IN transfer. The message is copied to an internal buffer and must not exceed - * a length of 8 bytes. The message may be 0 bytes long just to indicate the - * interrupt status to the host. - * If you need to transfer more bytes, use a control read after the interrupt. - */ -# define usbInterruptIsReady() (usbTxLen1 & 0x10) -/* This macro indicates whether the last interrupt message has already been - * sent. If you set a new interrupt message before the old was sent, the - * message already buffered will be lost. - */ -# if USB_CFG_HAVE_INTRIN_ENDPOINT3 -USB_PUBLIC void usbSetInterrupt3(uchar *data, uchar len); -# define usbInterruptIsReady3() (usbTxLen3 & 0x10) -/* Same as above for endpoint 3 */ -# endif -# endif /* USB_CFG_HAVE_INTRIN_ENDPOINT */ -# if USB_CFG_HID_REPORT_DESCRIPTOR_LENGTH /* simplified interface for backward compatibility */ -# define usbHidReportDescriptor usbDescriptorHidReport -/* should be declared as: PROGMEM char usbHidReportDescriptor[]; */ -/* If you implement an HID device, you need to provide a report descriptor. - * The HID report descriptor syntax is a bit complex. If you understand how - * report descriptors are constructed, we recommend that you use the HID - * Descriptor Tool from usb.org, see http://www.usb.org/developers/hidpage/. - * Otherwise you should probably start with a working example. - */ -# endif /* USB_CFG_HID_REPORT_DESCRIPTOR_LENGTH */ -# if USB_CFG_IMPLEMENT_FN_WRITE -USB_PUBLIC uchar usbFunctionWrite(uchar *data, uchar len); -/* This function is called by the driver to provide a control transfer's - * payload data (control-out). It is called in chunks of up to 8 bytes. The - * total count provided in the current control transfer can be obtained from - * the 'length' property in the setup data. If an error occurred during - * processing, return 0xff (== -1). The driver will answer the entire transfer - * with a STALL token in this case. If you have received the entire payload - * successfully, return 1. If you expect more data, return 0. If you don't - * know whether the host will send more data (you should know, the total is - * provided in the usbFunctionSetup() call!), return 1. - * NOTE: If you return 0xff for STALL, 'usbFunctionWrite()' may still be called - * for the remaining data. You must continue to return 0xff for STALL in these - * calls. - * In order to get usbFunctionWrite() called, define USB_CFG_IMPLEMENT_FN_WRITE - * to 1 in usbconfig.h and return 0xff in usbFunctionSetup().. - */ -# endif /* USB_CFG_IMPLEMENT_FN_WRITE */ -# if USB_CFG_IMPLEMENT_FN_READ -USB_PUBLIC uchar usbFunctionRead(uchar *data, uchar len); -/* This function is called by the driver to ask the application for a control - * transfer's payload data (control-in). It is called in chunks of up to 8 - * bytes each. You should copy the data to the location given by 'data' and - * return the actual number of bytes copied. If you return less than requested, - * the control-in transfer is terminated. If you return 0xff, the driver aborts - * the transfer with a STALL token. - * In order to get usbFunctionRead() called, define USB_CFG_IMPLEMENT_FN_READ - * to 1 in usbconfig.h and return 0xff in usbFunctionSetup().. - */ -# endif /* USB_CFG_IMPLEMENT_FN_READ */ - -extern uchar usbRxToken; /* may be used in usbFunctionWriteOut() below */ -# if USB_CFG_IMPLEMENT_FN_WRITEOUT -USB_PUBLIC void usbFunctionWriteOut(uchar *data, uchar len); -/* This function is called by the driver when data is received on an interrupt- - * or bulk-out endpoint. The endpoint number can be found in the global - * variable usbRxToken. You must define USB_CFG_IMPLEMENT_FN_WRITEOUT to 1 in - * usbconfig.h to get this function called. - */ -# endif /* USB_CFG_IMPLEMENT_FN_WRITEOUT */ -# ifdef USB_CFG_PULLUP_IOPORTNAME -# define usbDeviceConnect() ((USB_PULLUP_DDR |= (1 << USB_CFG_PULLUP_BIT)), (USB_PULLUP_OUT |= (1 << USB_CFG_PULLUP_BIT))) -# define usbDeviceDisconnect() ((USB_PULLUP_DDR &= ~(1 << USB_CFG_PULLUP_BIT)), (USB_PULLUP_OUT &= ~(1 << USB_CFG_PULLUP_BIT))) -# else /* USB_CFG_PULLUP_IOPORTNAME */ -# define usbDeviceConnect() (USBDDR &= ~(1 << USBMINUS)) -# define usbDeviceDisconnect() (USBDDR |= (1 << USBMINUS)) -# endif /* USB_CFG_PULLUP_IOPORTNAME */ -/* The macros usbDeviceConnect() and usbDeviceDisconnect() (intended to look - * like a function) connect resp. disconnect the device from the host's USB. - * If the constants USB_CFG_PULLUP_IOPORT and USB_CFG_PULLUP_BIT are defined - * in usbconfig.h, a disconnect consists of removing the pull-up resisitor - * from D-, otherwise the disconnect is done by brute-force pulling D- to GND. - * This does not conform to the spec, but it works. - * Please note that the USB interrupt must be disabled while the device is - * in disconnected state, or the interrupt handler will hang! You can either - * turn off the USB interrupt selectively with - * USB_INTR_ENABLE &= ~(1 << USB_INTR_ENABLE_BIT) - * or use cli() to disable interrupts globally. - */ -extern unsigned usbCrc16(unsigned data, uchar len); -# define usbCrc16(data, len) usbCrc16((unsigned)(data), len) -/* This function calculates the binary complement of the data CRC used in - * USB data packets. The value is used to build raw transmit packets. - * You may want to use this function for data checksums or to verify received - * data. We enforce 16 bit calling conventions for compatibility with IAR's - * tiny memory model. - */ -extern unsigned usbCrc16Append(unsigned data, uchar len); -# define usbCrc16Append(data, len) usbCrc16Append((unsigned)(data), len) -/* This function is equivalent to usbCrc16() above, except that it appends - * the 2 bytes CRC (lowbyte first) in the 'data' buffer after reading 'len' - * bytes. - */ -# if USB_CFG_HAVE_MEASURE_FRAME_LENGTH -extern unsigned usbMeasureFrameLength(void); -/* This function MUST be called IMMEDIATELY AFTER USB reset and measures 1/7 of - * the number of CPU cycles during one USB frame minus one low speed bit - * length. In other words: return value = 1499 * (F_CPU / 10.5 MHz) - * Since this is a busy wait, you MUST disable all interrupts with cli() before - * calling this function. - * This can be used to calibrate the AVR's RC oscillator. - */ -# endif -extern uchar usbConfiguration; -/* This value contains the current configuration set by the host. The driver - * allows setting and querying of this variable with the USB SET_CONFIGURATION - * and GET_CONFIGURATION requests, but does not use it otherwise. - * You may want to reflect the "configured" status with a LED on the device or - * switch on high power parts of the circuit only if the device is configured. - */ -# if USB_COUNT_SOF -extern volatile uchar usbSofCount; -/* This variable is incremented on every SOF packet. It is only available if - * the macro USB_COUNT_SOF is defined to a value != 0. - */ -# endif -# if USB_CFG_CHECK_DATA_TOGGLING -extern uchar usbCurrentDataToken; -/* This variable can be checked in usbFunctionWrite() and usbFunctionWriteOut() - * to ignore duplicate packets. - */ -# endif - -# define USB_STRING_DESCRIPTOR_HEADER(stringLength) ((2 * (stringLength) + 2) | (3 << 8)) -/* This macro builds a descriptor header for a string descriptor given the - * string's length. See usbdrv.c for an example how to use it. - */ -# if USB_CFG_HAVE_FLOWCONTROL -extern volatile schar usbRxLen; -# define usbDisableAllRequests() usbRxLen = -1 -/* Must be called from usbFunctionWrite(). This macro disables all data input - * from the USB interface. Requests from the host are answered with a NAK - * while they are disabled. - */ -# define usbEnableAllRequests() usbRxLen = 0 -/* May only be called if requests are disabled. This macro enables input from - * the USB interface after it has been disabled with usbDisableAllRequests(). - */ -# define usbAllRequestsAreDisabled() (usbRxLen < 0) -/* Use this macro to find out whether requests are disabled. It may be needed - * to ensure that usbEnableAllRequests() is never called when requests are - * enabled. - */ -# endif - -# define USB_SET_DATATOKEN1(token) usbTxBuf1[0] = token -# define USB_SET_DATATOKEN3(token) usbTxBuf3[0] = token -/* These two macros can be used by application software to reset data toggling - * for interrupt-in endpoints 1 and 3. Since the token is toggled BEFORE - * sending data, you must set the opposite value of the token which should come - * first. - */ - -#endif /* __ASSEMBLER__ */ - -/* ------------------------------------------------------------------------- */ -/* ----------------- Definitions for Descriptor Properties ----------------- */ -/* ------------------------------------------------------------------------- */ -/* This is advanced stuff. See usbconfig-prototype.h for more information - * about the various methods to define USB descriptors. If you do nothing, - * the default descriptors will be used. - */ -#define USB_PROP_IS_DYNAMIC (1 << 14) -/* If this property is set for a descriptor, usbFunctionDescriptor() will be - * used to obtain the particular descriptor. Data directly returned via - * usbMsgPtr are FLASH data by default, combine (OR) with USB_PROP_IS_RAM to - * return RAM data. - */ -#define USB_PROP_IS_RAM (1 << 15) -/* If this property is set for a descriptor, the data is read from RAM - * memory instead of Flash. The property is used for all methods to provide - * external descriptors. - */ -#define USB_PROP_LENGTH(len) ((len)&0x3fff) -/* If a static external descriptor is used, this is the total length of the - * descriptor in bytes. - */ - -/* all descriptors which may have properties: */ -#ifndef USB_CFG_DESCR_PROPS_DEVICE -# define USB_CFG_DESCR_PROPS_DEVICE 0 -#endif -#ifndef USB_CFG_DESCR_PROPS_CONFIGURATION -# define USB_CFG_DESCR_PROPS_CONFIGURATION 0 -#endif -#ifndef USB_CFG_DESCR_PROPS_STRINGS -# define USB_CFG_DESCR_PROPS_STRINGS 0 -#endif -#ifndef USB_CFG_DESCR_PROPS_STRING_0 -# define USB_CFG_DESCR_PROPS_STRING_0 0 -#endif -#ifndef USB_CFG_DESCR_PROPS_STRING_VENDOR -# define USB_CFG_DESCR_PROPS_STRING_VENDOR 0 -#endif -#ifndef USB_CFG_DESCR_PROPS_STRING_PRODUCT -# define USB_CFG_DESCR_PROPS_STRING_PRODUCT 0 -#endif -#ifndef USB_CFG_DESCR_PROPS_STRING_SERIAL_NUMBER -# define USB_CFG_DESCR_PROPS_STRING_SERIAL_NUMBER 0 -#endif -#ifndef USB_CFG_DESCR_PROPS_HID -# define USB_CFG_DESCR_PROPS_HID 0 -#endif -#if !(USB_CFG_DESCR_PROPS_HID_REPORT) -# undef USB_CFG_DESCR_PROPS_HID_REPORT -# if USB_CFG_HID_REPORT_DESCRIPTOR_LENGTH /* do some backward compatibility tricks */ -# define USB_CFG_DESCR_PROPS_HID_REPORT USB_CFG_HID_REPORT_DESCRIPTOR_LENGTH -# else -# define USB_CFG_DESCR_PROPS_HID_REPORT 0 -# endif -#endif -#ifndef USB_CFG_DESCR_PROPS_UNKNOWN -# define USB_CFG_DESCR_PROPS_UNKNOWN 0 -#endif - -/* ------------------ forward declaration of descriptors ------------------- */ -/* If you use external static descriptors, they must be stored in global - * arrays as declared below: - */ -#ifndef __ASSEMBLER__ -extern -# if !(USB_CFG_DESCR_PROPS_DEVICE & USB_PROP_IS_RAM) - PROGMEM -# endif - const char usbDescriptorDevice[]; - -extern -# if !(USB_CFG_DESCR_PROPS_CONFIGURATION & USB_PROP_IS_RAM) - PROGMEM -# endif - const char usbDescriptorConfiguration[]; - -extern -# if !(USB_CFG_DESCR_PROPS_HID_REPORT & USB_PROP_IS_RAM) - PROGMEM -# endif - const char usbDescriptorHidReport[]; - -extern -# if !(USB_CFG_DESCR_PROPS_STRING_0 & USB_PROP_IS_RAM) - PROGMEM -# endif - const char usbDescriptorString0[]; - -extern -# if !(USB_CFG_DESCR_PROPS_STRING_VENDOR & USB_PROP_IS_RAM) - PROGMEM -# endif - const int usbDescriptorStringVendor[]; - -extern -# if !(USB_CFG_DESCR_PROPS_STRING_PRODUCT & USB_PROP_IS_RAM) - PROGMEM -# endif - const int usbDescriptorStringDevice[]; - -extern -# if !(USB_CFG_DESCR_PROPS_STRING_SERIAL_NUMBER & USB_PROP_IS_RAM) - PROGMEM -# endif - const int usbDescriptorStringSerialNumber[]; - -#endif /* __ASSEMBLER__ */ - -/* ------------------------------------------------------------------------- */ -/* ------------------------ General Purpose Macros ------------------------- */ -/* ------------------------------------------------------------------------- */ - -#define USB_CONCAT(a, b) a##b -#define USB_CONCAT_EXPANDED(a, b) USB_CONCAT(a, b) - -#define USB_OUTPORT(name) USB_CONCAT(PORT, name) -#define USB_INPORT(name) USB_CONCAT(PIN, name) -#define USB_DDRPORT(name) USB_CONCAT(DDR, name) -/* The double-define trick above lets us concatenate strings which are - * defined by macros. - */ - -/* ------------------------------------------------------------------------- */ -/* ------------------------- Constant definitions -------------------------- */ -/* ------------------------------------------------------------------------- */ - -#if !defined __ASSEMBLER__ && (!defined USB_CFG_VENDOR_ID || !defined USB_CFG_DEVICE_ID) -# warning "You should define USB_CFG_VENDOR_ID and USB_CFG_DEVICE_ID in usbconfig.h" -/* If the user has not defined IDs, we default to obdev's free IDs. - * See USB-IDs-for-free.txt for details. - */ -#endif - -/* make sure we have a VID and PID defined, byte order is lowbyte, highbyte */ -#ifndef USB_CFG_VENDOR_ID -# define USB_CFG_VENDOR_ID 0xc0, 0x16 /* = 0x16c0 = 5824 = voti.nl */ -#endif - -#ifndef USB_CFG_DEVICE_ID -# if USB_CFG_HID_REPORT_DESCRIPTOR_LENGTH -# define USB_CFG_DEVICE_ID 0xdf, 0x05 /* = 0x5df = 1503, shared PID for HIDs */ -# elif USB_CFG_INTERFACE_CLASS == 2 -# define USB_CFG_DEVICE_ID 0xe1, 0x05 /* = 0x5e1 = 1505, shared PID for CDC Modems */ -# else -# define USB_CFG_DEVICE_ID 0xdc, 0x05 /* = 0x5dc = 1500, obdev's free PID */ -# endif -#endif - -/* Derive Output, Input and DataDirection ports from port names */ -#ifndef USB_CFG_IOPORTNAME -# error "You must define USB_CFG_IOPORTNAME in usbconfig.h, see usbconfig-prototype.h" -#endif - -#define USBOUT USB_OUTPORT(USB_CFG_IOPORTNAME) -#define USB_PULLUP_OUT USB_OUTPORT(USB_CFG_PULLUP_IOPORTNAME) -#define USBIN USB_INPORT(USB_CFG_IOPORTNAME) -#define USBDDR USB_DDRPORT(USB_CFG_IOPORTNAME) -#define USB_PULLUP_DDR USB_DDRPORT(USB_CFG_PULLUP_IOPORTNAME) - -#define USBMINUS USB_CFG_DMINUS_BIT -#define USBPLUS USB_CFG_DPLUS_BIT -#define USBIDLE (1 << USB_CFG_DMINUS_BIT) /* value representing J state */ -#define USBMASK ((1 << USB_CFG_DPLUS_BIT) | (1 << USB_CFG_DMINUS_BIT)) /* mask for USB I/O bits */ - -/* defines for backward compatibility with older driver versions: */ -#define USB_CFG_IOPORT USB_OUTPORT(USB_CFG_IOPORTNAME) -#ifdef USB_CFG_PULLUP_IOPORTNAME -# define USB_CFG_PULLUP_IOPORT USB_OUTPORT(USB_CFG_PULLUP_IOPORTNAME) -#endif - -#ifndef USB_CFG_EP3_NUMBER /* if not defined in usbconfig.h */ -# define USB_CFG_EP3_NUMBER 3 -#endif - -#ifndef USB_CFG_HAVE_INTRIN_ENDPOINT3 -# define USB_CFG_HAVE_INTRIN_ENDPOINT3 0 -#endif - -#define USB_BUFSIZE 11 /* PID, 8 bytes data, 2 bytes CRC */ - -/* ----- Try to find registers and bits responsible for ext interrupt 0 ----- */ - -#ifndef USB_INTR_CFG /* allow user to override our default */ -# if defined EICRA -# define USB_INTR_CFG EICRA -# else -# define USB_INTR_CFG MCUCR -# endif -#endif -#ifndef USB_INTR_CFG_SET /* allow user to override our default */ -# if defined(USB_COUNT_SOF) || defined(USB_SOF_HOOK) -# define USB_INTR_CFG_SET (1 << ISC01) /* cfg for falling edge */ - /* If any SOF logic is used, the interrupt must be wired to D- where - * we better trigger on falling edge - */ -# else -# define USB_INTR_CFG_SET ((1 << ISC00) | (1 << ISC01)) /* cfg for rising edge */ -# endif -#endif -#ifndef USB_INTR_CFG_CLR /* allow user to override our default */ -# define USB_INTR_CFG_CLR 0 /* no bits to clear */ -#endif - -#ifndef USB_INTR_ENABLE /* allow user to override our default */ -# if defined GIMSK -# define USB_INTR_ENABLE GIMSK -# elif defined EIMSK -# define USB_INTR_ENABLE EIMSK -# else -# define USB_INTR_ENABLE GICR -# endif -#endif -#ifndef USB_INTR_ENABLE_BIT /* allow user to override our default */ -# define USB_INTR_ENABLE_BIT INT0 -#endif - -#ifndef USB_INTR_PENDING /* allow user to override our default */ -# if defined EIFR -# define USB_INTR_PENDING EIFR -# else -# define USB_INTR_PENDING GIFR -# endif -#endif -#ifndef USB_INTR_PENDING_BIT /* allow user to override our default */ -# define USB_INTR_PENDING_BIT INTF0 -#endif - -/* -The defines above don't work for the following chips -at90c8534: no ISC0?, no PORTB, can't find a data sheet -at86rf401: no PORTB, no MCUCR etc, low clock rate -atmega103: no ISC0? (maybe omission in header, can't find data sheet) -atmega603: not defined in avr-libc -at43usb320, at43usb355, at76c711: have USB anyway -at94k: is different... - -at90s1200, attiny11, attiny12, attiny15, attiny28: these have no RAM -*/ - -/* ------------------------------------------------------------------------- */ -/* ----------------- USB Specification Constants and Types ----------------- */ -/* ------------------------------------------------------------------------- */ - -/* USB Token values */ -#define USBPID_SETUP 0x2d -#define USBPID_OUT 0xe1 -#define USBPID_IN 0x69 -#define USBPID_DATA0 0xc3 -#define USBPID_DATA1 0x4b - -#define USBPID_ACK 0xd2 -#define USBPID_NAK 0x5a -#define USBPID_STALL 0x1e - -#ifndef USB_INITIAL_DATATOKEN -# define USB_INITIAL_DATATOKEN USBPID_DATA1 -#endif - -#ifndef __ASSEMBLER__ - -typedef struct usbTxStatus { - volatile uchar len; - uchar buffer[USB_BUFSIZE]; -} usbTxStatus_t; - -extern usbTxStatus_t usbTxStatus1, usbTxStatus3; -# define usbTxLen1 usbTxStatus1.len -# define usbTxBuf1 usbTxStatus1.buffer -# define usbTxLen3 usbTxStatus3.len -# define usbTxBuf3 usbTxStatus3.buffer - -typedef union usbWord { - unsigned word; - uchar bytes[2]; -} usbWord_t; - -typedef struct usbRequest { - uchar bmRequestType; - uchar bRequest; - usbWord_t wValue; - usbWord_t wIndex; - usbWord_t wLength; -} usbRequest_t; -/* This structure matches the 8 byte setup request */ -#endif - -/* bmRequestType field in USB setup: - * d t t r r r r r, where - * d ..... direction: 0=host->device, 1=device->host - * t ..... type: 0=standard, 1=class, 2=vendor, 3=reserved - * r ..... recipient: 0=device, 1=interface, 2=endpoint, 3=other - */ - -/* USB setup recipient values */ -#define USBRQ_RCPT_MASK 0x1f -#define USBRQ_RCPT_DEVICE 0 -#define USBRQ_RCPT_INTERFACE 1 -#define USBRQ_RCPT_ENDPOINT 2 - -/* USB request type values */ -#define USBRQ_TYPE_MASK 0x60 -#define USBRQ_TYPE_STANDARD (0 << 5) -#define USBRQ_TYPE_CLASS (1 << 5) -#define USBRQ_TYPE_VENDOR (2 << 5) - -/* USB direction values: */ -#define USBRQ_DIR_MASK 0x80 -#define USBRQ_DIR_HOST_TO_DEVICE (0 << 7) -#define USBRQ_DIR_DEVICE_TO_HOST (1 << 7) - -/* USB Standard Requests */ -#define USBRQ_GET_STATUS 0 -#define USBRQ_CLEAR_FEATURE 1 -#define USBRQ_SET_FEATURE 3 -#define USBRQ_SET_ADDRESS 5 -#define USBRQ_GET_DESCRIPTOR 6 -#define USBRQ_SET_DESCRIPTOR 7 -#define USBRQ_GET_CONFIGURATION 8 -#define USBRQ_SET_CONFIGURATION 9 -#define USBRQ_GET_INTERFACE 10 -#define USBRQ_SET_INTERFACE 11 -#define USBRQ_SYNCH_FRAME 12 - -/* USB descriptor constants */ -#define USBDESCR_DEVICE 1 -#define USBDESCR_CONFIG 2 -#define USBDESCR_STRING 3 -#define USBDESCR_INTERFACE 4 -#define USBDESCR_ENDPOINT 5 -#define USBDESCR_HID 0x21 -#define USBDESCR_HID_REPORT 0x22 -#define USBDESCR_HID_PHYS 0x23 - -//#define USBATTR_BUSPOWER 0x80 // USB 1.1 does not define this value any more -#define USBATTR_SELFPOWER 0x40 -#define USBATTR_REMOTEWAKE 0x20 - -/* USB HID Requests */ -#define USBRQ_HID_GET_REPORT 0x01 -#define USBRQ_HID_GET_IDLE 0x02 -#define USBRQ_HID_GET_PROTOCOL 0x03 -#define USBRQ_HID_SET_REPORT 0x09 -#define USBRQ_HID_SET_IDLE 0x0a -#define USBRQ_HID_SET_PROTOCOL 0x0b - -/* ------------------------------------------------------------------------- */ - -#endif /* __usbdrv_h_included__ */ diff --git a/tmk_core/protocol/vusb/usbdrv/usbdrvasm.S b/tmk_core/protocol/vusb/usbdrv/usbdrvasm.S deleted file mode 100644 index 2e8097da9c46..000000000000 --- a/tmk_core/protocol/vusb/usbdrv/usbdrvasm.S +++ /dev/null @@ -1,393 +0,0 @@ -/* Name: usbdrvasm.S - * Project: V-USB, virtual USB port for Atmel's(r) AVR(r) microcontrollers - * Author: Christian Starkjohann - * Creation Date: 2007-06-13 - * Tabsize: 4 - * Copyright: (c) 2007 by OBJECTIVE DEVELOPMENT Software GmbH - * License: GNU GPL v2 (see License.txt), GNU GPL v3 or proprietary (CommercialLicense.txt) - * Revision: $Id: usbdrvasm.S 785 2010-05-30 17:57:07Z cs $ - */ - -/* -General Description: -This module is the assembler part of the USB driver. This file contains -general code (preprocessor acrobatics and CRC computation) and then includes -the file appropriate for the given clock rate. -*/ - -#define __SFR_OFFSET 0 /* used by avr-libc's register definitions */ -#include "usbportability.h" -#include "usbdrv.h" /* for common defs */ - -/* register names */ -#define x1 r16 -#define x2 r17 -#define shift r18 -#define cnt r19 -#define x3 r20 -#define x4 r21 -#define x5 r22 -#define bitcnt x5 -#define phase x4 -#define leap x4 - -/* Some assembler dependent definitions and declarations: */ - -#ifdef __IAR_SYSTEMS_ASM__ - extern usbRxBuf, usbDeviceAddr, usbNewDeviceAddr, usbInputBufOffset - extern usbCurrentTok, usbRxLen, usbRxToken, usbTxLen - extern usbTxBuf, usbTxStatus1, usbTxStatus3 -# if USB_COUNT_SOF - extern usbSofCount -# endif - public usbCrc16 - public usbCrc16Append - - COMMON INTVEC -# ifndef USB_INTR_VECTOR - ORG INT0_vect -# else /* USB_INTR_VECTOR */ - ORG USB_INTR_VECTOR -# undef USB_INTR_VECTOR -# endif /* USB_INTR_VECTOR */ -# define USB_INTR_VECTOR usbInterruptHandler - rjmp USB_INTR_VECTOR - RSEG CODE - -#else /* __IAR_SYSTEMS_ASM__ */ - -# ifndef USB_INTR_VECTOR /* default to hardware interrupt INT0 */ -# ifdef INT0_vect -# define USB_INTR_VECTOR INT0_vect // this is the "new" define for the vector -# else -# define USB_INTR_VECTOR SIG_INTERRUPT0 // this is the "old" vector -# endif -# endif - .text - .global USB_INTR_VECTOR - .type USB_INTR_VECTOR, @function - .global usbCrc16 - .global usbCrc16Append -#endif /* __IAR_SYSTEMS_ASM__ */ - - -#if USB_INTR_PENDING < 0x40 /* This is an I/O address, use in and out */ -# define USB_LOAD_PENDING(reg) in reg, USB_INTR_PENDING -# define USB_STORE_PENDING(reg) out USB_INTR_PENDING, reg -#else /* It's a memory address, use lds and sts */ -# define USB_LOAD_PENDING(reg) lds reg, USB_INTR_PENDING -# define USB_STORE_PENDING(reg) sts USB_INTR_PENDING, reg -#endif - -#define usbTxLen1 usbTxStatus1 -#define usbTxBuf1 (usbTxStatus1 + 1) -#define usbTxLen3 usbTxStatus3 -#define usbTxBuf3 (usbTxStatus3 + 1) - - -;---------------------------------------------------------------------------- -; Utility functions -;---------------------------------------------------------------------------- - -#ifdef __IAR_SYSTEMS_ASM__ -/* Register assignments for usbCrc16 on IAR cc */ -/* Calling conventions on IAR: - * First parameter passed in r16/r17, second in r18/r19 and so on. - * Callee must preserve r4-r15, r24-r29 (r28/r29 is frame pointer) - * Result is passed in r16/r17 - * In case of the "tiny" memory model, pointers are only 8 bit with no - * padding. We therefore pass argument 1 as "16 bit unsigned". - */ -RTMODEL "__rt_version", "3" -/* The line above will generate an error if cc calling conventions change. - * The value "3" above is valid for IAR 4.10B/W32 - */ -# define argLen r18 /* argument 2 */ -# define argPtrL r16 /* argument 1 */ -# define argPtrH r17 /* argument 1 */ - -# define resCrcL r16 /* result */ -# define resCrcH r17 /* result */ - -# define ptrL ZL -# define ptrH ZH -# define ptr Z -# define byte r22 -# define bitCnt r19 -# define polyL r20 -# define polyH r21 -# define scratch r23 - -#else /* __IAR_SYSTEMS_ASM__ */ -/* Register assignments for usbCrc16 on gcc */ -/* Calling conventions on gcc: - * First parameter passed in r24/r25, second in r22/23 and so on. - * Callee must preserve r1-r17, r28/r29 - * Result is passed in r24/r25 - */ -# define argLen r22 /* argument 2 */ -# define argPtrL r24 /* argument 1 */ -# define argPtrH r25 /* argument 1 */ - -# define resCrcL r24 /* result */ -# define resCrcH r25 /* result */ - -# define ptrL XL -# define ptrH XH -# define ptr x -# define byte r18 -# define bitCnt r19 -# define polyL r20 -# define polyH r21 -# define scratch r23 - -#endif - -#if USB_USE_FAST_CRC - -; This implementation is faster, but has bigger code size -; Thanks to Slawomir Fras (BoskiDialer) for this code! -; It implements the following C pseudo-code: -; unsigned table(unsigned char x) -; { -; unsigned value; -; -; value = (unsigned)x << 6; -; value ^= (unsigned)x << 7; -; if(parity(x)) -; value ^= 0xc001; -; return value; -; } -; unsigned usbCrc16(unsigned char *argPtr, unsigned char argLen) -; { -; unsigned crc = 0xffff; -; -; while(argLen--) -; crc = table(lo8(crc) ^ *argPtr++) ^ hi8(crc); -; return ~crc; -; } - -; extern unsigned usbCrc16(unsigned char *argPtr, unsigned char argLen); -; argPtr r24+25 / r16+r17 -; argLen r22 / r18 -; temp variables: -; byte r18 / r22 -; scratch r23 -; resCrc r24+r25 / r16+r17 -; ptr X / Z -usbCrc16: - mov ptrL, argPtrL - mov ptrH, argPtrH - ldi resCrcL, 0xFF - ldi resCrcH, 0xFF - rjmp usbCrc16LoopTest -usbCrc16ByteLoop: - ld byte, ptr+ - eor resCrcL, byte ; resCrcL is now 'x' in table() - mov byte, resCrcL ; compute parity of 'x' - swap byte - eor byte, resCrcL - mov scratch, byte - lsr byte - lsr byte - eor byte, scratch - inc byte - lsr byte - andi byte, 1 ; byte is now parity(x) - mov scratch, resCrcL - mov resCrcL, resCrcH - eor resCrcL, byte ; low byte of if(parity(x)) value ^= 0xc001; - neg byte - andi byte, 0xc0 - mov resCrcH, byte ; high byte of if(parity(x)) value ^= 0xc001; - clr byte - lsr scratch - ror byte - eor resCrcH, scratch - eor resCrcL, byte - lsr scratch - ror byte - eor resCrcH, scratch - eor resCrcL, byte -usbCrc16LoopTest: - subi argLen, 1 - brsh usbCrc16ByteLoop - com resCrcL - com resCrcH - ret - -#else /* USB_USE_FAST_CRC */ - -; This implementation is slower, but has less code size -; -; extern unsigned usbCrc16(unsigned char *argPtr, unsigned char argLen); -; argPtr r24+25 / r16+r17 -; argLen r22 / r18 -; temp variables: -; byte r18 / r22 -; bitCnt r19 -; poly r20+r21 -; scratch r23 -; resCrc r24+r25 / r16+r17 -; ptr X / Z -usbCrc16: - mov ptrL, argPtrL - mov ptrH, argPtrH - ldi resCrcL, 0 - ldi resCrcH, 0 - ldi polyL, lo8(0xa001) - ldi polyH, hi8(0xa001) - com argLen ; argLen = -argLen - 1: modified loop to ensure that carry is set - ldi bitCnt, 0 ; loop counter with starnd condition = end condition - rjmp usbCrcLoopEntry -usbCrcByteLoop: - ld byte, ptr+ - eor resCrcL, byte -usbCrcBitLoop: - ror resCrcH ; carry is always set here (see brcs jumps to here) - ror resCrcL - brcs usbCrcNoXor - eor resCrcL, polyL - eor resCrcH, polyH -usbCrcNoXor: - subi bitCnt, 224 ; (8 * 224) % 256 = 0; this loop iterates 8 times - brcs usbCrcBitLoop -usbCrcLoopEntry: - subi argLen, -1 - brcs usbCrcByteLoop -usbCrcReady: - ret -; Thanks to Reimar Doeffinger for optimizing this CRC routine! - -#endif /* USB_USE_FAST_CRC */ - -; extern unsigned usbCrc16Append(unsigned char *data, unsigned char len); -usbCrc16Append: - rcall usbCrc16 - st ptr+, resCrcL - st ptr+, resCrcH - ret - -#undef argLen -#undef argPtrL -#undef argPtrH -#undef resCrcL -#undef resCrcH -#undef ptrL -#undef ptrH -#undef ptr -#undef byte -#undef bitCnt -#undef polyL -#undef polyH -#undef scratch - - -#if USB_CFG_HAVE_MEASURE_FRAME_LENGTH -#ifdef __IAR_SYSTEMS_ASM__ -/* Register assignments for usbMeasureFrameLength on IAR cc */ -/* Calling conventions on IAR: - * First parameter passed in r16/r17, second in r18/r19 and so on. - * Callee must preserve r4-r15, r24-r29 (r28/r29 is frame pointer) - * Result is passed in r16/r17 - * In case of the "tiny" memory model, pointers are only 8 bit with no - * padding. We therefore pass argument 1 as "16 bit unsigned". - */ -# define resL r16 -# define resH r17 -# define cnt16L r30 -# define cnt16H r31 -# define cntH r18 - -#else /* __IAR_SYSTEMS_ASM__ */ -/* Register assignments for usbMeasureFrameLength on gcc */ -/* Calling conventions on gcc: - * First parameter passed in r24/r25, second in r22/23 and so on. - * Callee must preserve r1-r17, r28/r29 - * Result is passed in r24/r25 - */ -# define resL r24 -# define resH r25 -# define cnt16L r24 -# define cnt16H r25 -# define cntH r26 -#endif -# define cnt16 cnt16L - -; extern unsigned usbMeasurePacketLength(void); -; returns time between two idle strobes in multiples of 7 CPU clocks -.global usbMeasureFrameLength -usbMeasureFrameLength: - ldi cntH, 6 ; wait ~ 10 ms for D- == 0 - clr cnt16L - clr cnt16H -usbMFTime16: - dec cntH - breq usbMFTimeout -usbMFWaitStrobe: ; first wait for D- == 0 (idle strobe) - sbiw cnt16, 1 ;[0] [6] - breq usbMFTime16 ;[2] - sbic USBIN, USBMINUS ;[3] - rjmp usbMFWaitStrobe ;[4] -usbMFWaitIdle: ; then wait until idle again - sbis USBIN, USBMINUS ;1 wait for D- == 1 - rjmp usbMFWaitIdle ;2 - ldi cnt16L, 1 ;1 represents cycles so far - clr cnt16H ;1 -usbMFWaitLoop: - in cntH, USBIN ;[0] [7] - adiw cnt16, 1 ;[1] - breq usbMFTimeout ;[3] - andi cntH, USBMASK ;[4] - brne usbMFWaitLoop ;[5] -usbMFTimeout: -#if resL != cnt16L - mov resL, cnt16L - mov resH, cnt16H -#endif - ret - -#undef resL -#undef resH -#undef cnt16 -#undef cnt16L -#undef cnt16H -#undef cntH - -#endif /* USB_CFG_HAVE_MEASURE_FRAME_LENGTH */ - -;---------------------------------------------------------------------------- -; Now include the clock rate specific code -;---------------------------------------------------------------------------- - -#ifndef USB_CFG_CLOCK_KHZ -# ifdef F_CPU -# define USB_CFG_CLOCK_KHZ (F_CPU/1000) -# else -# error "USB_CFG_CLOCK_KHZ not defined in usbconfig.h and no F_CPU set!" -# endif -#endif - -#if USB_CFG_CHECK_CRC /* separate dispatcher for CRC type modules */ -# if USB_CFG_CLOCK_KHZ == 18000 -# include "usbdrvasm18-crc.inc" -# else -# error "USB_CFG_CLOCK_KHZ is not one of the supported crc-rates!" -# endif -#else /* USB_CFG_CHECK_CRC */ -# if USB_CFG_CLOCK_KHZ == 12000 -# include "usbdrvasm12.inc" -# elif USB_CFG_CLOCK_KHZ == 12800 -# include "usbdrvasm128.inc" -# elif USB_CFG_CLOCK_KHZ == 15000 -# include "usbdrvasm15.inc" -# elif USB_CFG_CLOCK_KHZ == 16000 -# include "usbdrvasm16.inc" -# elif USB_CFG_CLOCK_KHZ == 16500 -# include "usbdrvasm165.inc" -# elif USB_CFG_CLOCK_KHZ == 20000 -# include "usbdrvasm20.inc" -# else -# error "USB_CFG_CLOCK_KHZ is not one of the supported non-crc-rates!" -# endif -#endif /* USB_CFG_CHECK_CRC */ diff --git a/tmk_core/protocol/vusb/usbdrv/usbdrvasm.asm b/tmk_core/protocol/vusb/usbdrv/usbdrvasm.asm deleted file mode 100644 index 9cc4e4d739fc..000000000000 --- a/tmk_core/protocol/vusb/usbdrv/usbdrvasm.asm +++ /dev/null @@ -1,21 +0,0 @@ -/* Name: usbdrvasm.asm - * Project: V-USB, virtual USB port for Atmel's(r) AVR(r) microcontrollers - * Author: Christian Starkjohann - * Creation Date: 2006-03-01 - * Tabsize: 4 - * Copyright: (c) 2006 by OBJECTIVE DEVELOPMENT Software GmbH - * License: GNU GPL v2 (see License.txt), GNU GPL v3 or proprietary (CommercialLicense.txt) - * This Revision: $Id$ - */ - -/* -General Description: -The IAR compiler/assembler system prefers assembler files with file extension -".asm". We simply provide this file as an alias for usbdrvasm.S. - -Thanks to Oleg Semyonov for his help with the IAR tools port! -*/ - -#include "usbdrvasm.S" - -end diff --git a/tmk_core/protocol/vusb/usbdrv/usbdrvasm12.inc b/tmk_core/protocol/vusb/usbdrv/usbdrvasm12.inc deleted file mode 100644 index c1167584cbdd..000000000000 --- a/tmk_core/protocol/vusb/usbdrv/usbdrvasm12.inc +++ /dev/null @@ -1,393 +0,0 @@ -/* Name: usbdrvasm12.inc - * Project: V-USB, virtual USB port for Atmel's(r) AVR(r) microcontrollers - * Author: Christian Starkjohann - * Creation Date: 2004-12-29 - * Tabsize: 4 - * Copyright: (c) 2007 by OBJECTIVE DEVELOPMENT Software GmbH - * License: GNU GPL v2 (see License.txt), GNU GPL v3 or proprietary (CommercialLicense.txt) - * This Revision: $Id: usbdrvasm12.inc 740 2009-04-13 18:23:31Z cs $ - */ - -/* Do not link this file! Link usbdrvasm.S instead, which includes the - * appropriate implementation! - */ - -/* -General Description: -This file is the 12 MHz version of the asssembler part of the USB driver. It -requires a 12 MHz crystal (not a ceramic resonator and not a calibrated RC -oscillator). - -See usbdrv.h for a description of the entire driver. - -Since almost all of this code is timing critical, don't change unless you -really know what you are doing! Many parts require not only a maximum number -of CPU cycles, but even an exact number of cycles! - - -Timing constraints according to spec (in bit times): -timing subject min max CPUcycles ---------------------------------------------------------------------------- -EOP of OUT/SETUP to sync pattern of DATA0 (both rx) 2 16 16-128 -EOP of IN to sync pattern of DATA0 (rx, then tx) 2 7.5 16-60 -DATAx (rx) to ACK/NAK/STALL (tx) 2 7.5 16-60 -*/ - -;Software-receiver engine. Strict timing! Don't change unless you can preserve timing! -;interrupt response time: 4 cycles + insn running = 7 max if interrupts always enabled -;max allowable interrupt latency: 34 cycles -> max 25 cycles interrupt disable -;max stack usage: [ret(2), YL, SREG, YH, shift, x1, x2, x3, cnt, x4] = 11 bytes -;Numbers in brackets are maximum cycles since SOF. -USB_INTR_VECTOR: -;order of registers pushed: YL, SREG [sofError], YH, shift, x1, x2, x3, cnt - push YL ;2 [35] push only what is necessary to sync with edge ASAP - in YL, SREG ;1 [37] - push YL ;2 [39] -;---------------------------------------------------------------------------- -; Synchronize with sync pattern: -;---------------------------------------------------------------------------- -;sync byte (D-) pattern LSb to MSb: 01010100 [1 = idle = J, 0 = K] -;sync up with J to K edge during sync pattern -- use fastest possible loops -;The first part waits at most 1 bit long since we must be in sync pattern. -;YL is guarenteed to be < 0x80 because I flag is clear. When we jump to -;waitForJ, ensure that this prerequisite is met. -waitForJ: - inc YL - sbis USBIN, USBMINUS - brne waitForJ ; just make sure we have ANY timeout -waitForK: -;The following code results in a sampling window of 1/4 bit which meets the spec. - sbis USBIN, USBMINUS - rjmp foundK - sbis USBIN, USBMINUS - rjmp foundK - sbis USBIN, USBMINUS - rjmp foundK - sbis USBIN, USBMINUS - rjmp foundK - sbis USBIN, USBMINUS - rjmp foundK -#if USB_COUNT_SOF - lds YL, usbSofCount - inc YL - sts usbSofCount, YL -#endif /* USB_COUNT_SOF */ -#ifdef USB_SOF_HOOK - USB_SOF_HOOK -#endif - rjmp sofError -foundK: -;{3, 5} after falling D- edge, average delay: 4 cycles [we want 4 for center sampling] -;we have 1 bit time for setup purposes, then sample again. Numbers in brackets -;are cycles from center of first sync (double K) bit after the instruction - push YH ;2 [2] - lds YL, usbInputBufOffset;2 [4] - clr YH ;1 [5] - subi YL, lo8(-(usbRxBuf));1 [6] - sbci YH, hi8(-(usbRxBuf));1 [7] - - sbis USBIN, USBMINUS ;1 [8] we want two bits K [sample 1 cycle too early] - rjmp haveTwoBitsK ;2 [10] - pop YH ;2 [11] undo the push from before - rjmp waitForK ;2 [13] this was not the end of sync, retry -haveTwoBitsK: -;---------------------------------------------------------------------------- -; push more registers and initialize values while we sample the first bits: -;---------------------------------------------------------------------------- - push shift ;2 [16] - push x1 ;2 [12] - push x2 ;2 [14] - - in x1, USBIN ;1 [17] <-- sample bit 0 - ldi shift, 0xff ;1 [18] - bst x1, USBMINUS ;1 [19] - bld shift, 0 ;1 [20] - push x3 ;2 [22] - push cnt ;2 [24] - - in x2, USBIN ;1 [25] <-- sample bit 1 - ser x3 ;1 [26] [inserted init instruction] - eor x1, x2 ;1 [27] - bst x1, USBMINUS ;1 [28] - bld shift, 1 ;1 [29] - ldi cnt, USB_BUFSIZE;1 [30] [inserted init instruction] - rjmp rxbit2 ;2 [32] - -;---------------------------------------------------------------------------- -; Receiver loop (numbers in brackets are cycles within byte after instr) -;---------------------------------------------------------------------------- - -unstuff0: ;1 (branch taken) - andi x3, ~0x01 ;1 [15] - mov x1, x2 ;1 [16] x2 contains last sampled (stuffed) bit - in x2, USBIN ;1 [17] <-- sample bit 1 again - ori shift, 0x01 ;1 [18] - rjmp didUnstuff0 ;2 [20] - -unstuff1: ;1 (branch taken) - mov x2, x1 ;1 [21] x1 contains last sampled (stuffed) bit - andi x3, ~0x02 ;1 [22] - ori shift, 0x02 ;1 [23] - nop ;1 [24] - in x1, USBIN ;1 [25] <-- sample bit 2 again - rjmp didUnstuff1 ;2 [27] - -unstuff2: ;1 (branch taken) - andi x3, ~0x04 ;1 [29] - ori shift, 0x04 ;1 [30] - mov x1, x2 ;1 [31] x2 contains last sampled (stuffed) bit - nop ;1 [32] - in x2, USBIN ;1 [33] <-- sample bit 3 - rjmp didUnstuff2 ;2 [35] - -unstuff3: ;1 (branch taken) - in x2, USBIN ;1 [34] <-- sample stuffed bit 3 [one cycle too late] - andi x3, ~0x08 ;1 [35] - ori shift, 0x08 ;1 [36] - rjmp didUnstuff3 ;2 [38] - -unstuff4: ;1 (branch taken) - andi x3, ~0x10 ;1 [40] - in x1, USBIN ;1 [41] <-- sample stuffed bit 4 - ori shift, 0x10 ;1 [42] - rjmp didUnstuff4 ;2 [44] - -unstuff5: ;1 (branch taken) - andi x3, ~0x20 ;1 [48] - in x2, USBIN ;1 [49] <-- sample stuffed bit 5 - ori shift, 0x20 ;1 [50] - rjmp didUnstuff5 ;2 [52] - -unstuff6: ;1 (branch taken) - andi x3, ~0x40 ;1 [56] - in x1, USBIN ;1 [57] <-- sample stuffed bit 6 - ori shift, 0x40 ;1 [58] - rjmp didUnstuff6 ;2 [60] - -; extra jobs done during bit interval: -; bit 0: store, clear [SE0 is unreliable here due to bit dribbling in hubs] -; bit 1: se0 check -; bit 2: overflow check -; bit 3: recovery from delay [bit 0 tasks took too long] -; bit 4: none -; bit 5: none -; bit 6: none -; bit 7: jump, eor -rxLoop: - eor x3, shift ;1 [0] reconstruct: x3 is 0 at bit locations we changed, 1 at others - in x1, USBIN ;1 [1] <-- sample bit 0 - st y+, x3 ;2 [3] store data - ser x3 ;1 [4] - nop ;1 [5] - eor x2, x1 ;1 [6] - bst x2, USBMINUS;1 [7] - bld shift, 0 ;1 [8] - in x2, USBIN ;1 [9] <-- sample bit 1 (or possibly bit 0 stuffed) - andi x2, USBMASK ;1 [10] - breq se0 ;1 [11] SE0 check for bit 1 - andi shift, 0xf9 ;1 [12] -didUnstuff0: - breq unstuff0 ;1 [13] - eor x1, x2 ;1 [14] - bst x1, USBMINUS;1 [15] - bld shift, 1 ;1 [16] -rxbit2: - in x1, USBIN ;1 [17] <-- sample bit 2 (or possibly bit 1 stuffed) - andi shift, 0xf3 ;1 [18] - breq unstuff1 ;1 [19] do remaining work for bit 1 -didUnstuff1: - subi cnt, 1 ;1 [20] - brcs overflow ;1 [21] loop control - eor x2, x1 ;1 [22] - bst x2, USBMINUS;1 [23] - bld shift, 2 ;1 [24] - in x2, USBIN ;1 [25] <-- sample bit 3 (or possibly bit 2 stuffed) - andi shift, 0xe7 ;1 [26] - breq unstuff2 ;1 [27] -didUnstuff2: - eor x1, x2 ;1 [28] - bst x1, USBMINUS;1 [29] - bld shift, 3 ;1 [30] -didUnstuff3: - andi shift, 0xcf ;1 [31] - breq unstuff3 ;1 [32] - in x1, USBIN ;1 [33] <-- sample bit 4 - eor x2, x1 ;1 [34] - bst x2, USBMINUS;1 [35] - bld shift, 4 ;1 [36] -didUnstuff4: - andi shift, 0x9f ;1 [37] - breq unstuff4 ;1 [38] - nop2 ;2 [40] - in x2, USBIN ;1 [41] <-- sample bit 5 - eor x1, x2 ;1 [42] - bst x1, USBMINUS;1 [43] - bld shift, 5 ;1 [44] -didUnstuff5: - andi shift, 0x3f ;1 [45] - breq unstuff5 ;1 [46] - nop2 ;2 [48] - in x1, USBIN ;1 [49] <-- sample bit 6 - eor x2, x1 ;1 [50] - bst x2, USBMINUS;1 [51] - bld shift, 6 ;1 [52] -didUnstuff6: - cpi shift, 0x02 ;1 [53] - brlo unstuff6 ;1 [54] - nop2 ;2 [56] - in x2, USBIN ;1 [57] <-- sample bit 7 - eor x1, x2 ;1 [58] - bst x1, USBMINUS;1 [59] - bld shift, 7 ;1 [60] -didUnstuff7: - cpi shift, 0x04 ;1 [61] - brsh rxLoop ;2 [63] loop control -unstuff7: - andi x3, ~0x80 ;1 [63] - ori shift, 0x80 ;1 [64] - in x2, USBIN ;1 [65] <-- sample stuffed bit 7 - nop ;1 [66] - rjmp didUnstuff7 ;2 [68] - -macro POP_STANDARD ; 12 cycles - pop cnt - pop x3 - pop x2 - pop x1 - pop shift - pop YH - endm -macro POP_RETI ; 5 cycles - pop YL - out SREG, YL - pop YL - endm - -#include "asmcommon.inc" - -;---------------------------------------------------------------------------- -; Transmitting data -;---------------------------------------------------------------------------- - -txByteLoop: -txBitloop: -stuffN1Delay: ; [03] - ror shift ;[-5] [11] [59] - brcc doExorN1 ;[-4] [60] - subi x4, 1 ;[-3] - brne commonN1 ;[-2] - lsl shift ;[-1] compensate ror after rjmp stuffDelay - nop ;[00] stuffing consists of just waiting 8 cycles - rjmp stuffN1Delay ;[01] after ror, C bit is reliably clear - -sendNakAndReti: ;0 [-19] 19 cycles until SOP - ldi x3, USBPID_NAK ;1 [-18] - rjmp usbSendX3 ;2 [-16] -sendAckAndReti: ;0 [-19] 19 cycles until SOP - ldi x3, USBPID_ACK ;1 [-18] - rjmp usbSendX3 ;2 [-16] -sendCntAndReti: ;0 [-17] 17 cycles until SOP - mov x3, cnt ;1 [-16] -usbSendX3: ;0 [-16] - ldi YL, 20 ;1 [-15] 'x3' is R20 - ldi YH, 0 ;1 [-14] - ldi cnt, 2 ;1 [-13] -; rjmp usbSendAndReti fallthrough - -; USB spec says: -; idle = J -; J = (D+ = 0), (D- = 1) or USBOUT = 0x01 -; K = (D+ = 1), (D- = 0) or USBOUT = 0x02 -; Spec allows 7.5 bit times from EOP to SOP for replies (= 60 cycles) - -;usbSend: -;pointer to data in 'Y' -;number of bytes in 'cnt' -- including sync byte -;uses: x1...x2, x4, shift, cnt, Y [x1 = mirror USBOUT, x2 = USBMASK, x4 = bitstuff cnt] -;Numbers in brackets are time since first bit of sync pattern is sent (start of instruction) -usbSendAndReti: - in x2, USBDDR ;[-12] 12 cycles until SOP - ori x2, USBMASK ;[-11] - sbi USBOUT, USBMINUS ;[-10] prepare idle state; D+ and D- must have been 0 (no pullups) - out USBDDR, x2 ;[-8] <--- acquire bus - in x1, USBOUT ;[-7] port mirror for tx loop - ldi shift, 0x40 ;[-6] sync byte is first byte sent (we enter loop after ror) - ldi x2, USBMASK ;[-5] - push x4 ;[-4] -doExorN1: - eor x1, x2 ;[-2] [06] [62] - ldi x4, 6 ;[-1] [07] [63] -commonN1: -stuffN2Delay: - out USBOUT, x1 ;[00] [08] [64] <--- set bit - ror shift ;[01] - brcc doExorN2 ;[02] - subi x4, 1 ;[03] - brne commonN2 ;[04] - lsl shift ;[05] compensate ror after rjmp stuffDelay - rjmp stuffN2Delay ;[06] after ror, C bit is reliably clear -doExorN2: - eor x1, x2 ;[04] [12] - ldi x4, 6 ;[05] [13] -commonN2: - nop ;[06] [14] - subi cnt, 171 ;[07] [15] trick: (3 * 171) & 0xff = 1 - out USBOUT, x1 ;[08] [16] <--- set bit - brcs txBitloop ;[09] [25] [41] - -stuff6Delay: - ror shift ;[42] [50] - brcc doExor6 ;[43] - subi x4, 1 ;[44] - brne common6 ;[45] - lsl shift ;[46] compensate ror after rjmp stuffDelay - nop ;[47] stuffing consists of just waiting 8 cycles - rjmp stuff6Delay ;[48] after ror, C bit is reliably clear -doExor6: - eor x1, x2 ;[45] [53] - ldi x4, 6 ;[46] -common6: -stuff7Delay: - ror shift ;[47] [55] - out USBOUT, x1 ;[48] <--- set bit - brcc doExor7 ;[49] - subi x4, 1 ;[50] - brne common7 ;[51] - lsl shift ;[52] compensate ror after rjmp stuffDelay - rjmp stuff7Delay ;[53] after ror, C bit is reliably clear -doExor7: - eor x1, x2 ;[51] [59] - ldi x4, 6 ;[52] -common7: - ld shift, y+ ;[53] - tst cnt ;[55] - out USBOUT, x1 ;[56] <--- set bit - brne txByteLoop ;[57] - -;make SE0: - cbr x1, USBMASK ;[58] prepare SE0 [spec says EOP may be 15 to 18 cycles] - lds x2, usbNewDeviceAddr;[59] - lsl x2 ;[61] we compare with left shifted address - subi YL, 2 + 20 ;[62] Only assign address on data packets, not ACK/NAK in x3 - sbci YH, 0 ;[63] - out USBOUT, x1 ;[00] <-- out SE0 -- from now 2 bits = 16 cycles until bus idle -;2006-03-06: moved transfer of new address to usbDeviceAddr from C-Code to asm: -;set address only after data packet was sent, not after handshake - breq skipAddrAssign ;[01] - sts usbDeviceAddr, x2 ; if not skipped: SE0 is one cycle longer -skipAddrAssign: -;end of usbDeviceAddress transfer - ldi x2, 1< 12.5625 MHz -max frequency: 69.286 cycles for 8 bit -> 12.99 MHz -nominal frequency: 12.77 MHz ( = sqrt(min * max)) - -sampling positions: (next even number in range [+/- 0.5]) -cycle index range: 0 ... 66 -bits: -.5, 8.875, 17.25, 25.625, 34, 42.375, 50.75, 59.125 -[0/1], [9], [17], [25/+26], [34], [+42/43], [51], [59] - -bit number: 0 1 2 3 4 5 6 7 -spare cycles 1 2 1 2 1 1 1 0 - -operations to perform: duration cycle - ---------------- - eor fix, shift 1 -> 00 - andi phase, USBMASK 1 -> 08 - breq se0 1 -> 16 (moved to 11) - st y+, data 2 -> 24, 25 - mov data, fix 1 -> 33 - ser data 1 -> 41 - subi cnt, 1 1 -> 49 - brcs overflow 1 -> 50 - -layout of samples and operations: -[##] = sample bit -<##> = sample phase -*##* = operation - -0: *00* [01] 02 03 04 <05> 06 07 -1: *08* [09] 10 11 12 <13> 14 15 *16* -2: [17] 18 19 20 <21> 22 23 -3: *24* *25* [26] 27 28 29 <30> 31 32 -4: *33* [34] 35 36 37 <38> 39 40 -5: *41* [42] 43 44 45 <46> 47 48 -6: *49* *50* [51] 52 53 54 <55> 56 57 58 -7: [59] 60 61 62 <63> 64 65 66 -*****************************************************************************/ - -/* we prefer positive expressions (do if condition) instead of negative - * (skip if condition), therefore use defines for skip instructions: - */ -#define ifioclr sbis -#define ifioset sbic -#define ifrclr sbrs -#define ifrset sbrc - -/* The registers "fix" and "data" swap their meaning during the loop. Use - * defines to keep their name constant. - */ -#define fix x2 -#define data x1 -#undef phase /* phase has a default definition to x4 */ -#define phase x3 - - -USB_INTR_VECTOR: -;order of registers pushed: YL, SREG [sofError], YH, shift, x1, x2, x3, cnt, r0 - push YL ;2 push only what is necessary to sync with edge ASAP - in YL, SREG ;1 - push YL ;2 -;---------------------------------------------------------------------------- -; Synchronize with sync pattern: -;---------------------------------------------------------------------------- -;sync byte (D-) pattern LSb to MSb: 01010100 [1 = idle = J, 0 = K] -;sync up with J to K edge during sync pattern -- use fastest possible loops -;The first part waits at most 1 bit long since we must be in sync pattern. -;YL is guarenteed to be < 0x80 because I flag is clear. When we jump to -;waitForJ, ensure that this prerequisite is met. -waitForJ: - inc YL - sbis USBIN, USBMINUS - brne waitForJ ; just make sure we have ANY timeout -waitForK: -;The following code results in a sampling window of 1/4 bit which meets the spec. - sbis USBIN, USBMINUS - rjmp foundK - sbis USBIN, USBMINUS - rjmp foundK - sbis USBIN, USBMINUS - rjmp foundK - sbis USBIN, USBMINUS - rjmp foundK - sbis USBIN, USBMINUS ;[0] - rjmp foundK ;[1] -#if USB_COUNT_SOF - lds YL, usbSofCount - inc YL - sts usbSofCount, YL -#endif /* USB_COUNT_SOF */ -#ifdef USB_SOF_HOOK - USB_SOF_HOOK -#endif - rjmp sofError - -foundK: -;{3, 5} after falling D- edge, average delay: 4 cycles [we want 4 for center sampling] -;we have 1 bit time for setup purposes, then sample again. Numbers in brackets -;are cycles from center of first sync (double K) bit after the instruction - push YH ;[2] - lds YL, usbInputBufOffset;[4] - clr YH ;[6] - subi YL, lo8(-(usbRxBuf));[7] - sbci YH, hi8(-(usbRxBuf));[8] - - sbis USBIN, USBMINUS ;[9] we want two bits K [we want to sample at 8 + 4 - 1.5 = 10.5] - rjmp haveTwoBitsK ;[10] - pop YH ;[11] undo the push from before - rjmp waitForK ;[13] this was not the end of sync, retry -haveTwoBitsK: -;---------------------------------------------------------------------------- -; push more registers and initialize values while we sample the first bits: -;---------------------------------------------------------------------------- -#define fix x2 -#define data x1 - - push shift ;[12] - push x1 ;[14] - push x2 ;[16] - ldi shift, 0x80 ;[18] prevent bit-unstuffing but init low bits to 0 - ifioset USBIN, USBMINUS ;[19] [01] <--- bit 0 [10.5 + 8 = 18.5] - ori shift, 1<<0 ;[02] - push x3 ;[03] - push cnt ;[05] - push r0 ;[07] - ifioset USBIN, USBMINUS ;[09] <--- bit 1 - ori shift, 1<<1 ;[10] - ser fix ;[11] - ldi cnt, USB_BUFSIZE ;[12] - mov data, shift ;[13] - lsl shift ;[14] - nop2 ;[15] - ifioset USBIN, USBMINUS ;[17] <--- bit 2 - ori data, 3<<2 ;[18] store in bit 2 AND bit 3 - eor shift, data ;[19] do nrzi decoding - andi data, 1<<3 ;[20] - in phase, USBIN ;[21] <- phase - brne jumpToEntryAfterSet ;[22] if USBMINS at bit 3 was 1 - nop ;[23] - rjmp entryAfterClr ;[24] -jumpToEntryAfterSet: - rjmp entryAfterSet ;[24] - -;---------------------------------------------------------------------------- -; Receiver loop (numbers in brackets are cycles within byte after instr) -;---------------------------------------------------------------------------- -#undef fix -#define fix x1 -#undef data -#define data x2 - -bit7IsSet: - ifrclr phase, USBMINUS ;[62] check phase only if D- changed - lpm ;[63] - in phase, USBIN ;[64] <- phase (one cycle too late) - ori shift, 1 << 7 ;[65] - nop ;[66] -;;;;rjmp bit0AfterSet ; -> [00] == [67] moved block up to save jump -bit0AfterSet: - eor fix, shift ;[00] -#undef fix -#define fix x2 -#undef data -#define data x1 /* we now have result in data, fix is reset to 0xff */ - ifioclr USBIN, USBMINUS ;[01] <--- sample 0 - rjmp bit0IsClr ;[02] - andi shift, ~(7 << 0) ;[03] - breq unstuff0s ;[04] - in phase, USBIN ;[05] <- phase - rjmp bit1AfterSet ;[06] -unstuff0s: - in phase, USBIN ;[06] <- phase (one cycle too late) - andi fix, ~(1 << 0) ;[07] - ifioclr USBIN, USBMINUS ;[00] - ifioset USBIN, USBPLUS ;[01] - rjmp bit0IsClr ;[02] executed if first expr false or second true -se0AndStore: ; executed only if both bits 0 - st y+, x1 ;[15/17] cycles after start of byte - rjmp se0 ;[17/19] - -bit0IsClr: - ifrset phase, USBMINUS ;[04] check phase only if D- changed - lpm ;[05] - in phase, USBIN ;[06] <- phase (one cycle too late) - ori shift, 1 << 0 ;[07] -bit1AfterClr: - andi phase, USBMASK ;[08] - ifioset USBIN, USBMINUS ;[09] <--- sample 1 - rjmp bit1IsSet ;[10] - breq se0AndStore ;[11] if D- was 0 in bits 0 AND 1 and D+ was 0 in between, we have SE0 - andi shift, ~(7 << 1) ;[12] - in phase, USBIN ;[13] <- phase - breq unstuff1c ;[14] - rjmp bit2AfterClr ;[15] -unstuff1c: - andi fix, ~(1 << 1) ;[16] - nop2 ;[08] - nop2 ;[10] -bit1IsSet: - ifrclr phase, USBMINUS ;[12] check phase only if D- changed - lpm ;[13] - in phase, USBIN ;[14] <- phase (one cycle too late) - ori shift, 1 << 1 ;[15] - nop ;[16] -bit2AfterSet: - ifioclr USBIN, USBMINUS ;[17] <--- sample 2 - rjmp bit2IsClr ;[18] - andi shift, ~(7 << 2) ;[19] - breq unstuff2s ;[20] - in phase, USBIN ;[21] <- phase - rjmp bit3AfterSet ;[22] -unstuff2s: - in phase, USBIN ;[22] <- phase (one cycle too late) - andi fix, ~(1 << 2) ;[23] - nop2 ;[16] - nop2 ;[18] -bit2IsClr: - ifrset phase, USBMINUS ;[20] check phase only if D- changed - lpm ;[21] - in phase, USBIN ;[22] <- phase (one cycle too late) - ori shift, 1 << 2 ;[23] -bit3AfterClr: - st y+, data ;[24] -entryAfterClr: - ifioset USBIN, USBMINUS ;[26] <--- sample 3 - rjmp bit3IsSet ;[27] - andi shift, ~(7 << 3) ;[28] - breq unstuff3c ;[29] - in phase, USBIN ;[30] <- phase - rjmp bit4AfterClr ;[31] -unstuff3c: - in phase, USBIN ;[31] <- phase (one cycle too late) - andi fix, ~(1 << 3) ;[32] - nop2 ;[25] - nop2 ;[27] -bit3IsSet: - ifrclr phase, USBMINUS ;[29] check phase only if D- changed - lpm ;[30] - in phase, USBIN ;[31] <- phase (one cycle too late) - ori shift, 1 << 3 ;[32] -bit4AfterSet: - mov data, fix ;[33] undo this move by swapping defines -#undef fix -#define fix x1 -#undef data -#define data x2 - ifioclr USBIN, USBMINUS ;[34] <--- sample 4 - rjmp bit4IsClr ;[35] - andi shift, ~(7 << 4) ;[36] - breq unstuff4s ;[37] - in phase, USBIN ;[38] <- phase - rjmp bit5AfterSet ;[39] -unstuff4s: - in phase, USBIN ;[39] <- phase (one cycle too late) - andi fix, ~(1 << 4) ;[40] - nop2 ;[33] - nop2 ;[35] -bit4IsClr: - ifrset phase, USBMINUS ;[37] check phase only if D- changed - lpm ;[38] - in phase, USBIN ;[39] <- phase (one cycle too late) - ori shift, 1 << 4 ;[40] -bit5AfterClr: - ser data ;[41] - ifioset USBIN, USBMINUS ;[42] <--- sample 5 - rjmp bit5IsSet ;[43] - andi shift, ~(7 << 5) ;[44] - breq unstuff5c ;[45] - in phase, USBIN ;[46] <- phase - rjmp bit6AfterClr ;[47] -unstuff5c: - in phase, USBIN ;[47] <- phase (one cycle too late) - andi fix, ~(1 << 5) ;[48] - nop2 ;[41] - nop2 ;[43] -bit5IsSet: - ifrclr phase, USBMINUS ;[45] check phase only if D- changed - lpm ;[46] - in phase, USBIN ;[47] <- phase (one cycle too late) - ori shift, 1 << 5 ;[48] -bit6AfterSet: - subi cnt, 1 ;[49] - brcs jumpToOverflow ;[50] - ifioclr USBIN, USBMINUS ;[51] <--- sample 6 - rjmp bit6IsClr ;[52] - andi shift, ~(3 << 6) ;[53] - cpi shift, 2 ;[54] - in phase, USBIN ;[55] <- phase - brlt unstuff6s ;[56] - rjmp bit7AfterSet ;[57] - -jumpToOverflow: - rjmp overflow - -unstuff6s: - andi fix, ~(1 << 6) ;[50] - lpm ;[51] -bit6IsClr: - ifrset phase, USBMINUS ;[54] check phase only if D- changed - lpm ;[55] - in phase, USBIN ;[56] <- phase (one cycle too late) - ori shift, 1 << 6 ;[57] - nop ;[58] -bit7AfterClr: - ifioset USBIN, USBMINUS ;[59] <--- sample 7 - rjmp bit7IsSet ;[60] - andi shift, ~(1 << 7) ;[61] - cpi shift, 4 ;[62] - in phase, USBIN ;[63] <- phase - brlt unstuff7c ;[64] - rjmp bit0AfterClr ;[65] -> [00] == [67] -unstuff7c: - andi fix, ~(1 << 7) ;[58] - nop ;[59] - rjmp bit7IsSet ;[60] - -bit7IsClr: - ifrset phase, USBMINUS ;[62] check phase only if D- changed - lpm ;[63] - in phase, USBIN ;[64] <- phase (one cycle too late) - ori shift, 1 << 7 ;[65] - nop ;[66] -;;;;rjmp bit0AfterClr ; -> [00] == [67] moved block up to save jump -bit0AfterClr: - eor fix, shift ;[00] -#undef fix -#define fix x2 -#undef data -#define data x1 /* we now have result in data, fix is reset to 0xff */ - ifioset USBIN, USBMINUS ;[01] <--- sample 0 - rjmp bit0IsSet ;[02] - andi shift, ~(7 << 0) ;[03] - breq unstuff0c ;[04] - in phase, USBIN ;[05] <- phase - rjmp bit1AfterClr ;[06] -unstuff0c: - in phase, USBIN ;[06] <- phase (one cycle too late) - andi fix, ~(1 << 0) ;[07] - ifioclr USBIN, USBMINUS ;[00] - ifioset USBIN, USBPLUS ;[01] - rjmp bit0IsSet ;[02] executed if first expr false or second true - rjmp se0AndStore ;[03] executed only if both bits 0 -bit0IsSet: - ifrclr phase, USBMINUS ;[04] check phase only if D- changed - lpm ;[05] - in phase, USBIN ;[06] <- phase (one cycle too late) - ori shift, 1 << 0 ;[07] -bit1AfterSet: - andi shift, ~(7 << 1) ;[08] compensated by "ori shift, 1<<1" if bit1IsClr - ifioclr USBIN, USBMINUS ;[09] <--- sample 1 - rjmp bit1IsClr ;[10] - breq unstuff1s ;[11] - nop2 ;[12] do not check for SE0 if bit 0 was 1 - in phase, USBIN ;[14] <- phase (one cycle too late) - rjmp bit2AfterSet ;[15] -unstuff1s: - in phase, USBIN ;[13] <- phase - andi fix, ~(1 << 1) ;[14] - lpm ;[07] - nop2 ;[10] -bit1IsClr: - ifrset phase, USBMINUS ;[12] check phase only if D- changed - lpm ;[13] - in phase, USBIN ;[14] <- phase (one cycle too late) - ori shift, 1 << 1 ;[15] - nop ;[16] -bit2AfterClr: - ifioset USBIN, USBMINUS ;[17] <--- sample 2 - rjmp bit2IsSet ;[18] - andi shift, ~(7 << 2) ;[19] - breq unstuff2c ;[20] - in phase, USBIN ;[21] <- phase - rjmp bit3AfterClr ;[22] -unstuff2c: - in phase, USBIN ;[22] <- phase (one cycle too late) - andi fix, ~(1 << 2) ;[23] - nop2 ;[16] - nop2 ;[18] -bit2IsSet: - ifrclr phase, USBMINUS ;[20] check phase only if D- changed - lpm ;[21] - in phase, USBIN ;[22] <- phase (one cycle too late) - ori shift, 1 << 2 ;[23] -bit3AfterSet: - st y+, data ;[24] -entryAfterSet: - ifioclr USBIN, USBMINUS ;[26] <--- sample 3 - rjmp bit3IsClr ;[27] - andi shift, ~(7 << 3) ;[28] - breq unstuff3s ;[29] - in phase, USBIN ;[30] <- phase - rjmp bit4AfterSet ;[31] -unstuff3s: - in phase, USBIN ;[31] <- phase (one cycle too late) - andi fix, ~(1 << 3) ;[32] - nop2 ;[25] - nop2 ;[27] -bit3IsClr: - ifrset phase, USBMINUS ;[29] check phase only if D- changed - lpm ;[30] - in phase, USBIN ;[31] <- phase (one cycle too late) - ori shift, 1 << 3 ;[32] -bit4AfterClr: - mov data, fix ;[33] undo this move by swapping defines -#undef fix -#define fix x1 -#undef data -#define data x2 - ifioset USBIN, USBMINUS ;[34] <--- sample 4 - rjmp bit4IsSet ;[35] - andi shift, ~(7 << 4) ;[36] - breq unstuff4c ;[37] - in phase, USBIN ;[38] <- phase - rjmp bit5AfterClr ;[39] -unstuff4c: - in phase, USBIN ;[39] <- phase (one cycle too late) - andi fix, ~(1 << 4) ;[40] - nop2 ;[33] - nop2 ;[35] -bit4IsSet: - ifrclr phase, USBMINUS ;[37] check phase only if D- changed - lpm ;[38] - in phase, USBIN ;[39] <- phase (one cycle too late) - ori shift, 1 << 4 ;[40] -bit5AfterSet: - ser data ;[41] - ifioclr USBIN, USBMINUS ;[42] <--- sample 5 - rjmp bit5IsClr ;[43] - andi shift, ~(7 << 5) ;[44] - breq unstuff5s ;[45] - in phase, USBIN ;[46] <- phase - rjmp bit6AfterSet ;[47] -unstuff5s: - in phase, USBIN ;[47] <- phase (one cycle too late) - andi fix, ~(1 << 5) ;[48] - nop2 ;[41] - nop2 ;[43] -bit5IsClr: - ifrset phase, USBMINUS ;[45] check phase only if D- changed - lpm ;[46] - in phase, USBIN ;[47] <- phase (one cycle too late) - ori shift, 1 << 5 ;[48] -bit6AfterClr: - subi cnt, 1 ;[49] - brcs overflow ;[50] - ifioset USBIN, USBMINUS ;[51] <--- sample 6 - rjmp bit6IsSet ;[52] - andi shift, ~(3 << 6) ;[53] - cpi shift, 2 ;[54] - in phase, USBIN ;[55] <- phase - brlt unstuff6c ;[56] - rjmp bit7AfterClr ;[57] -unstuff6c: - andi fix, ~(1 << 6) ;[50] - lpm ;[51] -bit6IsSet: - ifrclr phase, USBMINUS ;[54] check phase only if D- changed - lpm ;[55] - in phase, USBIN ;[56] <- phase (one cycle too late) - ori shift, 1 << 6 ;[57] -bit7AfterSet: - ifioclr USBIN, USBMINUS ;[59] <--- sample 7 - rjmp bit7IsClr ;[60] - andi shift, ~(1 << 7) ;[61] - cpi shift, 4 ;[62] - in phase, USBIN ;[63] <- phase - brlt unstuff7s ;[64] - rjmp bit0AfterSet ;[65] -> [00] == [67] -unstuff7s: - andi fix, ~(1 << 7) ;[58] - nop ;[59] - rjmp bit7IsClr ;[60] - -macro POP_STANDARD ; 14 cycles - pop r0 - pop cnt - pop x3 - pop x2 - pop x1 - pop shift - pop YH - endm -macro POP_RETI ; 5 cycles - pop YL - out SREG, YL - pop YL - endm - -#include "asmcommon.inc" - -;---------------------------------------------------------------------------- -; Transmitting data -;---------------------------------------------------------------------------- - -txByteLoop: -txBitloop: -stuffN1Delay: ; [03] - ror shift ;[-5] [11] [63] - brcc doExorN1 ;[-4] [64] - subi x3, 1 ;[-3] - brne commonN1 ;[-2] - lsl shift ;[-1] compensate ror after rjmp stuffDelay - nop ;[00] stuffing consists of just waiting 8 cycles - rjmp stuffN1Delay ;[01] after ror, C bit is reliably clear - -sendNakAndReti: - ldi cnt, USBPID_NAK ;[-19] - rjmp sendCntAndReti ;[-18] -sendAckAndReti: - ldi cnt, USBPID_ACK ;[-17] -sendCntAndReti: - mov r0, cnt ;[-16] - ldi YL, 0 ;[-15] R0 address is 0 - ldi YH, 0 ;[-14] - ldi cnt, 2 ;[-13] -; rjmp usbSendAndReti fallthrough - -; USB spec says: -; idle = J -; J = (D+ = 0), (D- = 1) or USBOUT = 0x01 -; K = (D+ = 1), (D- = 0) or USBOUT = 0x02 -; Spec allows 7.5 bit times from EOP to SOP for replies (= 60 cycles) - -;usbSend: -;pointer to data in 'Y' -;number of bytes in 'cnt' -- including sync byte -;uses: x1...x3, shift, cnt, Y [x1 = mirror USBOUT, x2 = USBMASK, x3 = bitstuff cnt] -;Numbers in brackets are time since first bit of sync pattern is sent (start of instruction) -usbSendAndReti: - in x2, USBDDR ;[-10] 10 cycles until SOP - ori x2, USBMASK ;[-9] - sbi USBOUT, USBMINUS ;[-8] prepare idle state; D+ and D- must have been 0 (no pullups) - out USBDDR, x2 ;[-6] <--- acquire bus - in x1, USBOUT ;[-5] port mirror for tx loop - ldi shift, 0x40 ;[-4] sync byte is first byte sent (we enter loop after ror) - ldi x2, USBMASK ;[-3] -doExorN1: - eor x1, x2 ;[-2] [06] [62] - ldi x3, 6 ;[-1] [07] [63] -commonN1: -stuffN2Delay: - out USBOUT, x1 ;[00] [08] [64] <--- set bit - ror shift ;[01] - brcc doExorN2 ;[02] - subi x3, 1 ;[03] - brne commonN2 ;[04] - lsl shift ;[05] compensate ror after rjmp stuffDelay - rjmp stuffN2Delay ;[06] after ror, C bit is reliably clear -doExorN2: - eor x1, x2 ;[04] [12] - ldi x3, 6 ;[05] [13] -commonN2: - nop2 ;[06] [14] - subi cnt, 171 ;[08] [16] trick: (3 * 171) & 0xff = 1 - out USBOUT, x1 ;[09] [17] <--- set bit - brcs txBitloop ;[10] [27] [44] - -stuff6Delay: - ror shift ;[45] [53] - brcc doExor6 ;[46] - subi x3, 1 ;[47] - brne common6 ;[48] - lsl shift ;[49] compensate ror after rjmp stuffDelay - nop ;[50] stuffing consists of just waiting 8 cycles - rjmp stuff6Delay ;[51] after ror, C bit is reliably clear -doExor6: - eor x1, x2 ;[48] [56] - ldi x3, 6 ;[49] -common6: -stuff7Delay: - ror shift ;[50] [58] - out USBOUT, x1 ;[51] <--- set bit - brcc doExor7 ;[52] - subi x3, 1 ;[53] - brne common7 ;[54] - lsl shift ;[55] compensate ror after rjmp stuffDelay - rjmp stuff7Delay ;[56] after ror, C bit is reliably clear -doExor7: - eor x1, x2 ;[54] [62] - ldi x3, 6 ;[55] -common7: - ld shift, y+ ;[56] - nop ;[58] - tst cnt ;[59] - out USBOUT, x1 ;[60] [00]<--- set bit - brne txByteLoop ;[61] [01] -;make SE0: - cbr x1, USBMASK ;[02] prepare SE0 [spec says EOP may be 15 to 18 cycles] - lds x2, usbNewDeviceAddr;[03] - lsl x2 ;[05] we compare with left shifted address - subi YL, 2 + 0 ;[06] Only assign address on data packets, not ACK/NAK in r0 - sbci YH, 0 ;[07] - out USBOUT, x1 ;[00] <-- out SE0 -- from now 2 bits = 16 cycles until bus idle -;2006-03-06: moved transfer of new address to usbDeviceAddr from C-Code to asm: -;set address only after data packet was sent, not after handshake - breq skipAddrAssign ;[01] - sts usbDeviceAddr, x2 ; if not skipped: SE0 is one cycle longer -skipAddrAssign: -;end of usbDeviceAddress transfer - ldi x2, 1< 0) - echo "$s\n"; - } -} - -function printBit($isAfterSet, $bitNum) -{ - ob_start(); - if($isAfterSet){ -?> - ifioclr USBIN, USBMINUS ;[00] <--- sample - rjmp bit#IsClr ;[01] - andi shift, ~(7 << #) ;[02] - breq unstuff#s ;[03] - in phase, USBIN ;[04] <- phase - rjmp bit@AfterSet ;[05] -unstuff#s: - in phase, USBIN ;[05] <- phase (one cycle too late) - andi fix, ~(1 << #) ;[06] - nop2 ;[-1] - nop2 ;[01] -bit#IsClr: - ifrset phase, USBMINUS ;[03] check phase only if D- changed - lpm ;[04] - in phase, USBIN ;[05] <- phase (one cycle too late) - ori shift, 1 << # ;[06] - - ifioset USBIN, USBMINUS ;[00] <--- sample - rjmp bit#IsSet ;[01] - andi shift, ~(7 << #) ;[02] - breq unstuff#c ;[03] - in phase, USBIN ;[04] <- phase - rjmp bit@AfterClr ;[05] -unstuff#c: - in phase, USBIN ;[05] <- phase (one cycle too late) - andi fix, ~(1 << #) ;[06] - nop2 ;[-1] - nop2 ;[01] -bit#IsSet: - ifrclr phase, USBMINUS ;[03] check phase only if D- changed - lpm ;[04] - in phase, USBIN ;[05] <- phase (one cycle too late) - ori shift, 1 << # ;[06] - -*****************************************************************************/ diff --git a/tmk_core/protocol/vusb/usbdrv/usbdrvasm15.inc b/tmk_core/protocol/vusb/usbdrv/usbdrvasm15.inc deleted file mode 100644 index 401b7f8fff7f..000000000000 --- a/tmk_core/protocol/vusb/usbdrv/usbdrvasm15.inc +++ /dev/null @@ -1,423 +0,0 @@ -/* Name: usbdrvasm15.inc - * Project: V-USB, virtual USB port for Atmel's(r) AVR(r) microcontrollers - * Author: contributed by V. Bosch - * Creation Date: 2007-08-06 - * Tabsize: 4 - * Copyright: (c) 2007 by OBJECTIVE DEVELOPMENT Software GmbH - * License: GNU GPL v2 (see License.txt), GNU GPL v3 or proprietary (CommercialLicense.txt) - * Revision: $Id: usbdrvasm15.inc 740 2009-04-13 18:23:31Z cs $ - */ - -/* Do not link this file! Link usbdrvasm.S instead, which includes the - * appropriate implementation! - */ - -/* -General Description: -This file is the 15 MHz version of the asssembler part of the USB driver. It -requires a 15 MHz crystal (not a ceramic resonator and not a calibrated RC -oscillator). - -See usbdrv.h for a description of the entire driver. - -Since almost all of this code is timing critical, don't change unless you -really know what you are doing! Many parts require not only a maximum number -of CPU cycles, but even an exact number of cycles! -*/ - -;max stack usage: [ret(2), YL, SREG, YH, bitcnt, shift, x1, x2, x3, x4, cnt] = 12 bytes -;nominal frequency: 15 MHz -> 10.0 cycles per bit, 80.0 cycles per byte -; Numbers in brackets are clocks counted from center of last sync bit -; when instruction starts - -;---------------------------------------------------------------------------- -; order of registers pushed: -; YL, SREG [sofError] YH, shift, x1, x2, x3, bitcnt, cnt, x4 -;---------------------------------------------------------------------------- -USB_INTR_VECTOR: - push YL ;2 push only what is necessary to sync with edge ASAP - in YL, SREG ;1 - push YL ;2 -;---------------------------------------------------------------------------- -; Synchronize with sync pattern: -; -; sync byte (D-) pattern LSb to MSb: 01010100 [1 = idle = J, 0 = K] -; sync up with J to K edge during sync pattern -- use fastest possible loops -;The first part waits at most 1 bit long since we must be in sync pattern. -;YL is guarenteed to be < 0x80 because I flag is clear. When we jump to -;waitForJ, ensure that this prerequisite is met. -waitForJ: - inc YL - sbis USBIN, USBMINUS - brne waitForJ ; just make sure we have ANY timeout -;------------------------------------------------------------------------------- -; The following code results in a sampling window of < 1/4 bit -; which meets the spec. -;------------------------------------------------------------------------------- -waitForK: ;- - sbis USBIN, USBMINUS ;1 [00] <-- sample - rjmp foundK ;2 [01] - sbis USBIN, USBMINUS ; <-- sample - rjmp foundK - sbis USBIN, USBMINUS ; <-- sample - rjmp foundK - sbis USBIN, USBMINUS ; <-- sample - rjmp foundK - sbis USBIN, USBMINUS ; <-- sample - rjmp foundK - sbis USBIN, USBMINUS ; <-- sample - rjmp foundK -#if USB_COUNT_SOF - lds YL, usbSofCount - inc YL - sts usbSofCount, YL -#endif /* USB_COUNT_SOF */ -#ifdef USB_SOF_HOOK - USB_SOF_HOOK -#endif - rjmp sofError -;------------------------------------------------------------------------------ -; {3, 5} after falling D- edge, average delay: 4 cycles [we want 5 for -; center sampling] -; we have 1 bit time for setup purposes, then sample again. -; Numbers in brackets are cycles from center of first sync (double K) -; bit after the instruction -;------------------------------------------------------------------------------ -foundK: ;- [02] - lds YL, usbInputBufOffset;2 [03+04] tx loop - push YH ;2 [05+06] - clr YH ;1 [07] - subi YL, lo8(-(usbRxBuf)) ;1 [08] [rx loop init] - sbci YH, hi8(-(usbRxBuf)) ;1 [09] [rx loop init] - push shift ;2 [10+11] - ser shift ;1 [12] - sbis USBIN, USBMINUS ;1 [-1] [13] <--sample:we want two bits K (sample 1 cycle too early) - rjmp haveTwoBitsK ;2 [00] [14] - pop shift ;2 [15+16] undo the push from before - pop YH ;2 [17+18] undo the push from before - rjmp waitForK ;2 [19+20] this was not the end of sync, retry -; The entire loop from waitForK until rjmp waitForK above must not exceed two -; bit times (= 20 cycles). - -;---------------------------------------------------------------------------- -; push more registers and initialize values while we sample the first bits: -;---------------------------------------------------------------------------- -haveTwoBitsK: ;- [01] - push x1 ;2 [02+03] - push x2 ;2 [04+05] - push x3 ;2 [06+07] - push bitcnt ;2 [08+09] - in x1, USBIN ;1 [00] [10] <-- sample bit 0 - bst x1, USBMINUS ;1 [01] - bld shift, 0 ;1 [02] - push cnt ;2 [03+04] - ldi cnt, USB_BUFSIZE ;1 [05] - push x4 ;2 [06+07] tx loop - rjmp rxLoop ;2 [08] -;---------------------------------------------------------------------------- -; Receiver loop (numbers in brackets are cycles within byte after instr) -;---------------------------------------------------------------------------- -unstuff0: ;- [07] (branch taken) - andi x3, ~0x01 ;1 [08] - mov x1, x2 ;1 [09] x2 contains last sampled (stuffed) bit - in x2, USBIN ;1 [00] [10] <-- sample bit 1 again - andi x2, USBMASK ;1 [01] - breq se0Hop ;1 [02] SE0 check for bit 1 - ori shift, 0x01 ;1 [03] 0b00000001 - nop ;1 [04] - rjmp didUnstuff0 ;2 [05] -;----------------------------------------------------- -unstuff1: ;- [05] (branch taken) - mov x2, x1 ;1 [06] x1 contains last sampled (stuffed) bit - andi x3, ~0x02 ;1 [07] - ori shift, 0x02 ;1 [08] 0b00000010 - nop ;1 [09] - in x1, USBIN ;1 [00] [10] <-- sample bit 2 again - andi x1, USBMASK ;1 [01] - breq se0Hop ;1 [02] SE0 check for bit 2 - rjmp didUnstuff1 ;2 [03] -;----------------------------------------------------- -unstuff2: ;- [05] (branch taken) - andi x3, ~0x04 ;1 [06] - ori shift, 0x04 ;1 [07] 0b00000100 - mov x1, x2 ;1 [08] x2 contains last sampled (stuffed) bit - nop ;1 [09] - in x2, USBIN ;1 [00] [10] <-- sample bit 3 - andi x2, USBMASK ;1 [01] - breq se0Hop ;1 [02] SE0 check for bit 3 - rjmp didUnstuff2 ;2 [03] -;----------------------------------------------------- -unstuff3: ;- [00] [10] (branch taken) - in x2, USBIN ;1 [01] [11] <-- sample stuffed bit 3 one cycle too late - andi x2, USBMASK ;1 [02] - breq se0Hop ;1 [03] SE0 check for stuffed bit 3 - andi x3, ~0x08 ;1 [04] - ori shift, 0x08 ;1 [05] 0b00001000 - rjmp didUnstuff3 ;2 [06] -;---------------------------------------------------------------------------- -; extra jobs done during bit interval: -; -; bit 0: store, clear [SE0 is unreliable here due to bit dribbling in hubs], -; overflow check, jump to the head of rxLoop -; bit 1: SE0 check -; bit 2: SE0 check, recovery from delay [bit 0 tasks took too long] -; bit 3: SE0 check, recovery from delay [bit 0 tasks took too long] -; bit 4: SE0 check, none -; bit 5: SE0 check, none -; bit 6: SE0 check, none -; bit 7: SE0 check, reconstruct: x3 is 0 at bit locations we changed, 1 at others -;---------------------------------------------------------------------------- -rxLoop: ;- [09] - in x2, USBIN ;1 [00] [10] <-- sample bit 1 (or possibly bit 0 stuffed) - andi x2, USBMASK ;1 [01] - brne SkipSe0Hop ;1 [02] -se0Hop: ;- [02] - rjmp se0 ;2 [03] SE0 check for bit 1 -SkipSe0Hop: ;- [03] - ser x3 ;1 [04] - andi shift, 0xf9 ;1 [05] 0b11111001 - breq unstuff0 ;1 [06] -didUnstuff0: ;- [06] - eor x1, x2 ;1 [07] - bst x1, USBMINUS ;1 [08] - bld shift, 1 ;1 [09] - in x1, USBIN ;1 [00] [10] <-- sample bit 2 (or possibly bit 1 stuffed) - andi x1, USBMASK ;1 [01] - breq se0Hop ;1 [02] SE0 check for bit 2 - andi shift, 0xf3 ;1 [03] 0b11110011 - breq unstuff1 ;1 [04] do remaining work for bit 1 -didUnstuff1: ;- [04] - eor x2, x1 ;1 [05] - bst x2, USBMINUS ;1 [06] - bld shift, 2 ;1 [07] - nop2 ;2 [08+09] - in x2, USBIN ;1 [00] [10] <-- sample bit 3 (or possibly bit 2 stuffed) - andi x2, USBMASK ;1 [01] - breq se0Hop ;1 [02] SE0 check for bit 3 - andi shift, 0xe7 ;1 [03] 0b11100111 - breq unstuff2 ;1 [04] -didUnstuff2: ;- [04] - eor x1, x2 ;1 [05] - bst x1, USBMINUS ;1 [06] - bld shift, 3 ;1 [07] -didUnstuff3: ;- [07] - andi shift, 0xcf ;1 [08] 0b11001111 - breq unstuff3 ;1 [09] - in x1, USBIN ;1 [00] [10] <-- sample bit 4 - andi x1, USBMASK ;1 [01] - breq se0Hop ;1 [02] SE0 check for bit 4 - eor x2, x1 ;1 [03] - bst x2, USBMINUS ;1 [04] - bld shift, 4 ;1 [05] -didUnstuff4: ;- [05] - andi shift, 0x9f ;1 [06] 0b10011111 - breq unstuff4 ;1 [07] - nop2 ;2 [08+09] - in x2, USBIN ;1 [00] [10] <-- sample bit 5 - andi x2, USBMASK ;1 [01] - breq se0 ;1 [02] SE0 check for bit 5 - eor x1, x2 ;1 [03] - bst x1, USBMINUS ;1 [04] - bld shift, 5 ;1 [05] -didUnstuff5: ;- [05] - andi shift, 0x3f ;1 [06] 0b00111111 - breq unstuff5 ;1 [07] - nop2 ;2 [08+09] - in x1, USBIN ;1 [00] [10] <-- sample bit 6 - andi x1, USBMASK ;1 [01] - breq se0 ;1 [02] SE0 check for bit 6 - eor x2, x1 ;1 [03] - bst x2, USBMINUS ;1 [04] - bld shift, 6 ;1 [05] -didUnstuff6: ;- [05] - cpi shift, 0x02 ;1 [06] 0b00000010 - brlo unstuff6 ;1 [07] - nop2 ;2 [08+09] - in x2, USBIN ;1 [00] [10] <-- sample bit 7 - andi x2, USBMASK ;1 [01] - breq se0 ;1 [02] SE0 check for bit 7 - eor x1, x2 ;1 [03] - bst x1, USBMINUS ;1 [04] - bld shift, 7 ;1 [05] -didUnstuff7: ;- [05] - cpi shift, 0x04 ;1 [06] 0b00000100 - brlo unstuff7 ;1 [07] - eor x3, shift ;1 [08] reconstruct: x3 is 0 at bit locations we changed, 1 at others - nop ;1 [09] - in x1, USBIN ;1 [00] [10] <-- sample bit 0 - st y+, x3 ;2 [01+02] store data - eor x2, x1 ;1 [03] - bst x2, USBMINUS ;1 [04] - bld shift, 0 ;1 [05] - subi cnt, 1 ;1 [06] - brcs overflow ;1 [07] - rjmp rxLoop ;2 [08] -;----------------------------------------------------- -unstuff4: ;- [08] - andi x3, ~0x10 ;1 [09] - in x1, USBIN ;1 [00] [10] <-- sample stuffed bit 4 - andi x1, USBMASK ;1 [01] - breq se0 ;1 [02] SE0 check for stuffed bit 4 - ori shift, 0x10 ;1 [03] - rjmp didUnstuff4 ;2 [04] -;----------------------------------------------------- -unstuff5: ;- [08] - ori shift, 0x20 ;1 [09] - in x2, USBIN ;1 [00] [10] <-- sample stuffed bit 5 - andi x2, USBMASK ;1 [01] - breq se0 ;1 [02] SE0 check for stuffed bit 5 - andi x3, ~0x20 ;1 [03] - rjmp didUnstuff5 ;2 [04] -;----------------------------------------------------- -unstuff6: ;- [08] - andi x3, ~0x40 ;1 [09] - in x1, USBIN ;1 [00] [10] <-- sample stuffed bit 6 - andi x1, USBMASK ;1 [01] - breq se0 ;1 [02] SE0 check for stuffed bit 6 - ori shift, 0x40 ;1 [03] - rjmp didUnstuff6 ;2 [04] -;----------------------------------------------------- -unstuff7: ;- [08] - andi x3, ~0x80 ;1 [09] - in x2, USBIN ;1 [00] [10] <-- sample stuffed bit 7 - andi x2, USBMASK ;1 [01] - breq se0 ;1 [02] SE0 check for stuffed bit 7 - ori shift, 0x80 ;1 [03] - rjmp didUnstuff7 ;2 [04] - -macro POP_STANDARD ; 16 cycles - pop x4 - pop cnt - pop bitcnt - pop x3 - pop x2 - pop x1 - pop shift - pop YH - endm -macro POP_RETI ; 5 cycles - pop YL - out SREG, YL - pop YL - endm - -#include "asmcommon.inc" - -;--------------------------------------------------------------------------- -; USB spec says: -; idle = J -; J = (D+ = 0), (D- = 1) -; K = (D+ = 1), (D- = 0) -; Spec allows 7.5 bit times from EOP to SOP for replies -;--------------------------------------------------------------------------- -bitstuffN: ;- [04] - eor x1, x4 ;1 [05] - clr x2 ;1 [06] - nop ;1 [07] - rjmp didStuffN ;1 [08] -;--------------------------------------------------------------------------- -bitstuff6: ;- [04] - eor x1, x4 ;1 [05] - clr x2 ;1 [06] - rjmp didStuff6 ;1 [07] -;--------------------------------------------------------------------------- -bitstuff7: ;- [02] - eor x1, x4 ;1 [03] - clr x2 ;1 [06] - nop ;1 [05] - rjmp didStuff7 ;1 [06] -;--------------------------------------------------------------------------- -sendNakAndReti: ;- [-19] - ldi x3, USBPID_NAK ;1 [-18] - rjmp sendX3AndReti ;1 [-17] -;--------------------------------------------------------------------------- -sendAckAndReti: ;- [-17] - ldi cnt, USBPID_ACK ;1 [-16] -sendCntAndReti: ;- [-16] - mov x3, cnt ;1 [-15] -sendX3AndReti: ;- [-15] - ldi YL, 20 ;1 [-14] x3==r20 address is 20 - ldi YH, 0 ;1 [-13] - ldi cnt, 2 ;1 [-12] -; rjmp usbSendAndReti fallthrough -;--------------------------------------------------------------------------- -;usbSend: -;pointer to data in 'Y' -;number of bytes in 'cnt' -- including sync byte [range 2 ... 12] -;uses: x1...x4, btcnt, shift, cnt, Y -;Numbers in brackets are time since first bit of sync pattern is sent -;We need not to match the transfer rate exactly because the spec demands -;only 1.5% precision anyway. -usbSendAndReti: ;- [-13] 13 cycles until SOP - in x2, USBDDR ;1 [-12] - ori x2, USBMASK ;1 [-11] - sbi USBOUT, USBMINUS ;2 [-09-10] prepare idle state; D+ and D- must have been 0 (no pullups) - in x1, USBOUT ;1 [-08] port mirror for tx loop - out USBDDR, x2 ;1 [-07] <- acquire bus - ; need not init x2 (bitstuff history) because sync starts with 0 - ldi x4, USBMASK ;1 [-06] exor mask - ldi shift, 0x80 ;1 [-05] sync byte is first byte sent - ldi bitcnt, 6 ;1 [-04] -txBitLoop: ;- [-04] [06] - sbrs shift, 0 ;1 [-03] [07] - eor x1, x4 ;1 [-02] [08] - ror shift ;1 [-01] [09] -didStuffN: ;- [09] - out USBOUT, x1 ;1 [00] [10] <-- out N - ror x2 ;1 [01] - cpi x2, 0xfc ;1 [02] - brcc bitstuffN ;1 [03] - dec bitcnt ;1 [04] - brne txBitLoop ;1 [05] - sbrs shift, 0 ;1 [06] - eor x1, x4 ;1 [07] - ror shift ;1 [08] -didStuff6: ;- [08] - nop ;1 [09] - out USBOUT, x1 ;1 [00] [10] <-- out 6 - ror x2 ;1 [01] - cpi x2, 0xfc ;1 [02] - brcc bitstuff6 ;1 [03] - sbrs shift, 0 ;1 [04] - eor x1, x4 ;1 [05] - ror shift ;1 [06] - ror x2 ;1 [07] -didStuff7: ;- [07] - ldi bitcnt, 6 ;1 [08] - cpi x2, 0xfc ;1 [09] - out USBOUT, x1 ;1 [00] [10] <-- out 7 - brcc bitstuff7 ;1 [01] - ld shift, y+ ;2 [02+03] - dec cnt ;1 [04] - brne txBitLoop ;1 [05] -makeSE0: - cbr x1, USBMASK ;1 [06] prepare SE0 [spec says EOP may be 19 to 23 cycles] - lds x2, usbNewDeviceAddr;2 [07+08] - lsl x2 ;1 [09] we compare with left shifted address -;2006-03-06: moved transfer of new address to usbDeviceAddr from C-Code to asm: -;set address only after data packet was sent, not after handshake - out USBOUT, x1 ;1 [00] [10] <-- out SE0-- from now 2 bits==20 cycl. until bus idle - subi YL, 20 + 2 ;1 [01] Only assign address on data packets, not ACK/NAK in x3 - sbci YH, 0 ;1 [02] - breq skipAddrAssign ;1 [03] - sts usbDeviceAddr, x2 ;2 [04+05] if not skipped: SE0 is one cycle longer -;---------------------------------------------------------------------------- -;end of usbDeviceAddress transfer -skipAddrAssign: ;- [03/04] - ldi x2, 1< 10.6666666 cycles per bit, 85.333333333 cycles per byte -; Numbers in brackets are clocks counted from center of last sync bit -; when instruction starts - -USB_INTR_VECTOR: -;order of registers pushed: YL, SREG YH, [sofError], bitcnt, shift, x1, x2, x3, x4, cnt - push YL ;[-25] push only what is necessary to sync with edge ASAP - in YL, SREG ;[-23] - push YL ;[-22] - push YH ;[-20] -;---------------------------------------------------------------------------- -; Synchronize with sync pattern: -;---------------------------------------------------------------------------- -;sync byte (D-) pattern LSb to MSb: 01010100 [1 = idle = J, 0 = K] -;sync up with J to K edge during sync pattern -- use fastest possible loops -;The first part waits at most 1 bit long since we must be in sync pattern. -;YL is guarenteed to be < 0x80 because I flag is clear. When we jump to -;waitForJ, ensure that this prerequisite is met. -waitForJ: - inc YL - sbis USBIN, USBMINUS - brne waitForJ ; just make sure we have ANY timeout -waitForK: -;The following code results in a sampling window of < 1/4 bit which meets the spec. - sbis USBIN, USBMINUS ;[-15] - rjmp foundK ;[-14] - sbis USBIN, USBMINUS - rjmp foundK - sbis USBIN, USBMINUS - rjmp foundK - sbis USBIN, USBMINUS - rjmp foundK - sbis USBIN, USBMINUS - rjmp foundK - sbis USBIN, USBMINUS - rjmp foundK -#if USB_COUNT_SOF - lds YL, usbSofCount - inc YL - sts usbSofCount, YL -#endif /* USB_COUNT_SOF */ -#ifdef USB_SOF_HOOK - USB_SOF_HOOK -#endif - rjmp sofError -foundK: ;[-12] -;{3, 5} after falling D- edge, average delay: 4 cycles [we want 5 for center sampling] -;we have 1 bit time for setup purposes, then sample again. Numbers in brackets -;are cycles from center of first sync (double K) bit after the instruction - push bitcnt ;[-12] -; [---] ;[-11] - lds YL, usbInputBufOffset;[-10] -; [---] ;[-9] - clr YH ;[-8] - subi YL, lo8(-(usbRxBuf));[-7] [rx loop init] - sbci YH, hi8(-(usbRxBuf));[-6] [rx loop init] - push shift ;[-5] -; [---] ;[-4] - ldi bitcnt, 0x55 ;[-3] [rx loop init] - sbis USBIN, USBMINUS ;[-2] we want two bits K (sample 2 cycles too early) - rjmp haveTwoBitsK ;[-1] - pop shift ;[0] undo the push from before - pop bitcnt ;[2] undo the push from before - rjmp waitForK ;[4] this was not the end of sync, retry -; The entire loop from waitForK until rjmp waitForK above must not exceed two -; bit times (= 21 cycles). - -;---------------------------------------------------------------------------- -; push more registers and initialize values while we sample the first bits: -;---------------------------------------------------------------------------- -haveTwoBitsK: - push x1 ;[1] - push x2 ;[3] - push x3 ;[5] - ldi shift, 0 ;[7] - ldi x3, 1<<4 ;[8] [rx loop init] first sample is inverse bit, compensate that - push x4 ;[9] == leap - - in x1, USBIN ;[11] <-- sample bit 0 - andi x1, USBMASK ;[12] - bst x1, USBMINUS ;[13] - bld shift, 7 ;[14] - push cnt ;[15] - ldi leap, 0 ;[17] [rx loop init] - ldi cnt, USB_BUFSIZE;[18] [rx loop init] - rjmp rxbit1 ;[19] arrives at [21] - -;---------------------------------------------------------------------------- -; Receiver loop (numbers in brackets are cycles within byte after instr) -;---------------------------------------------------------------------------- - -; duration of unstuffing code should be 10.66666667 cycles. We adjust "leap" -; accordingly to approximate this value in the long run. - -unstuff6: - andi x2, USBMASK ;[03] - ori x3, 1<<6 ;[04] will not be shifted any more - andi shift, ~0x80;[05] - mov x1, x2 ;[06] sampled bit 7 is actually re-sampled bit 6 - subi leap, -1 ;[07] total duration = 11 bits -> subtract 1/3 - rjmp didUnstuff6 ;[08] - -unstuff7: - ori x3, 1<<7 ;[09] will not be shifted any more - in x2, USBIN ;[00] [10] re-sample bit 7 - andi x2, USBMASK ;[01] - andi shift, ~0x80;[02] - subi leap, 2 ;[03] total duration = 10 bits -> add 1/3 - rjmp didUnstuff7 ;[04] - -unstuffEven: - ori x3, 1<<6 ;[09] will be shifted right 6 times for bit 0 - in x1, USBIN ;[00] [10] - andi shift, ~0x80;[01] - andi x1, USBMASK ;[02] - breq se0 ;[03] - subi leap, -1 ;[04] total duration = 11 bits -> subtract 1/3 - nop2 ;[05] - rjmp didUnstuffE ;[06] - -unstuffOdd: - ori x3, 1<<5 ;[09] will be shifted right 4 times for bit 1 - in x2, USBIN ;[00] [10] - andi shift, ~0x80;[01] - andi x2, USBMASK ;[02] - breq se0 ;[03] - subi leap, -1 ;[04] total duration = 11 bits -> subtract 1/3 - nop2 ;[05] - rjmp didUnstuffO ;[06] - -rxByteLoop: - andi x1, USBMASK ;[03] - eor x2, x1 ;[04] - subi leap, 1 ;[05] - brpl skipLeap ;[06] - subi leap, -3 ;1 one leap cycle every 3rd byte -> 85 + 1/3 cycles per byte - nop ;1 -skipLeap: - subi x2, 1 ;[08] - ror shift ;[09] -didUnstuff6: - cpi shift, 0xfc ;[10] - in x2, USBIN ;[00] [11] <-- sample bit 7 - brcc unstuff6 ;[01] - andi x2, USBMASK ;[02] - eor x1, x2 ;[03] - subi x1, 1 ;[04] - ror shift ;[05] -didUnstuff7: - cpi shift, 0xfc ;[06] - brcc unstuff7 ;[07] - eor x3, shift ;[08] reconstruct: x3 is 1 at bit locations we changed, 0 at others - st y+, x3 ;[09] store data -rxBitLoop: - in x1, USBIN ;[00] [11] <-- sample bit 0/2/4 - andi x1, USBMASK ;[01] - eor x2, x1 ;[02] - andi x3, 0x3f ;[03] topmost two bits reserved for 6 and 7 - subi x2, 1 ;[04] - ror shift ;[05] - cpi shift, 0xfc ;[06] - brcc unstuffEven ;[07] -didUnstuffE: - lsr x3 ;[08] - lsr x3 ;[09] -rxbit1: - in x2, USBIN ;[00] [10] <-- sample bit 1/3/5 - andi x2, USBMASK ;[01] - breq se0 ;[02] - eor x1, x2 ;[03] - subi x1, 1 ;[04] - ror shift ;[05] - cpi shift, 0xfc ;[06] - brcc unstuffOdd ;[07] -didUnstuffO: - subi bitcnt, 0xab;[08] == addi 0x55, 0x55 = 0x100/3 - brcs rxBitLoop ;[09] - - subi cnt, 1 ;[10] - in x1, USBIN ;[00] [11] <-- sample bit 6 - brcc rxByteLoop ;[01] - rjmp overflow - -macro POP_STANDARD ; 14 cycles - pop cnt - pop x4 - pop x3 - pop x2 - pop x1 - pop shift - pop bitcnt - endm -macro POP_RETI ; 7 cycles - pop YH - pop YL - out SREG, YL - pop YL - endm - -#include "asmcommon.inc" - -; USB spec says: -; idle = J -; J = (D+ = 0), (D- = 1) -; K = (D+ = 1), (D- = 0) -; Spec allows 7.5 bit times from EOP to SOP for replies - -bitstuffN: - eor x1, x4 ;[5] - ldi x2, 0 ;[6] - nop2 ;[7] - nop ;[9] - out USBOUT, x1 ;[10] <-- out - rjmp didStuffN ;[0] - -bitstuff6: - eor x1, x4 ;[5] - ldi x2, 0 ;[6] Carry is zero due to brcc - rol shift ;[7] compensate for ror shift at branch destination - rjmp didStuff6 ;[8] - -bitstuff7: - ldi x2, 0 ;[2] Carry is zero due to brcc - rjmp didStuff7 ;[3] - - -sendNakAndReti: - ldi x3, USBPID_NAK ;[-18] - rjmp sendX3AndReti ;[-17] -sendAckAndReti: - ldi cnt, USBPID_ACK ;[-17] -sendCntAndReti: - mov x3, cnt ;[-16] -sendX3AndReti: - ldi YL, 20 ;[-15] x3==r20 address is 20 - ldi YH, 0 ;[-14] - ldi cnt, 2 ;[-13] -; rjmp usbSendAndReti fallthrough - -;usbSend: -;pointer to data in 'Y' -;number of bytes in 'cnt' -- including sync byte [range 2 ... 12] -;uses: x1...x4, btcnt, shift, cnt, Y -;Numbers in brackets are time since first bit of sync pattern is sent -;We don't match the transfer rate exactly (don't insert leap cycles every third -;byte) because the spec demands only 1.5% precision anyway. -usbSendAndReti: ; 12 cycles until SOP - in x2, USBDDR ;[-12] - ori x2, USBMASK ;[-11] - sbi USBOUT, USBMINUS;[-10] prepare idle state; D+ and D- must have been 0 (no pullups) - in x1, USBOUT ;[-8] port mirror for tx loop - out USBDDR, x2 ;[-7] <- acquire bus -; need not init x2 (bitstuff history) because sync starts with 0 - ldi x4, USBMASK ;[-6] exor mask - ldi shift, 0x80 ;[-5] sync byte is first byte sent -txByteLoop: - ldi bitcnt, 0x35 ;[-4] [6] binary 0011 0101 -txBitLoop: - sbrs shift, 0 ;[-3] [7] - eor x1, x4 ;[-2] [8] - out USBOUT, x1 ;[-1] [9] <-- out N - ror shift ;[0] [10] - ror x2 ;[1] -didStuffN: - cpi x2, 0xfc ;[2] - brcc bitstuffN ;[3] - lsr bitcnt ;[4] - brcc txBitLoop ;[5] - brne txBitLoop ;[6] - - sbrs shift, 0 ;[7] - eor x1, x4 ;[8] -didStuff6: - out USBOUT, x1 ;[-1] [9] <-- out 6 - ror shift ;[0] [10] - ror x2 ;[1] - cpi x2, 0xfc ;[2] - brcc bitstuff6 ;[3] - ror shift ;[4] -didStuff7: - ror x2 ;[5] - sbrs x2, 7 ;[6] - eor x1, x4 ;[7] - nop ;[8] - cpi x2, 0xfc ;[9] - out USBOUT, x1 ;[-1][10] <-- out 7 - brcc bitstuff7 ;[0] [11] - ld shift, y+ ;[1] - dec cnt ;[3] - brne txByteLoop ;[4] -;make SE0: - cbr x1, USBMASK ;[5] prepare SE0 [spec says EOP may be 21 to 25 cycles] - lds x2, usbNewDeviceAddr;[6] - lsl x2 ;[8] we compare with left shifted address - subi YL, 20 + 2 ;[9] Only assign address on data packets, not ACK/NAK in x3 - sbci YH, 0 ;[10] - out USBOUT, x1 ;[11] <-- out SE0 -- from now 2 bits = 22 cycles until bus idle -;2006-03-06: moved transfer of new address to usbDeviceAddr from C-Code to asm: -;set address only after data packet was sent, not after handshake - breq skipAddrAssign ;[0] - sts usbDeviceAddr, x2; if not skipped: SE0 is one cycle longer -skipAddrAssign: -;end of usbDeviceAddress transfer - ldi x2, 1< max 52 cycles interrupt disable -;max stack usage: [ret(2), r0, SREG, YL, YH, shift, x1, x2, x3, x4, cnt] = 12 bytes -;nominal frequency: 16.5 MHz -> 11 cycles per bit -; 16.3125 MHz < F_CPU < 16.6875 MHz (+/- 1.1%) -; Numbers in brackets are clocks counted from center of last sync bit -; when instruction starts - - -USB_INTR_VECTOR: -;order of registers pushed: YL, SREG [sofError], r0, YH, shift, x1, x2, x3, x4, cnt - push YL ;[-23] push only what is necessary to sync with edge ASAP - in YL, SREG ;[-21] - push YL ;[-20] -;---------------------------------------------------------------------------- -; Synchronize with sync pattern: -;---------------------------------------------------------------------------- -;sync byte (D-) pattern LSb to MSb: 01010100 [1 = idle = J, 0 = K] -;sync up with J to K edge during sync pattern -- use fastest possible loops -;The first part waits at most 1 bit long since we must be in sync pattern. -;YL is guarenteed to be < 0x80 because I flag is clear. When we jump to -;waitForJ, ensure that this prerequisite is met. -waitForJ: - inc YL - sbis USBIN, USBMINUS - brne waitForJ ; just make sure we have ANY timeout -waitForK: -;The following code results in a sampling window of < 1/4 bit which meets the spec. - sbis USBIN, USBMINUS ;[-15] - rjmp foundK ;[-14] - sbis USBIN, USBMINUS - rjmp foundK - sbis USBIN, USBMINUS - rjmp foundK - sbis USBIN, USBMINUS - rjmp foundK - sbis USBIN, USBMINUS - rjmp foundK - sbis USBIN, USBMINUS - rjmp foundK -#if USB_COUNT_SOF - lds YL, usbSofCount - inc YL - sts usbSofCount, YL -#endif /* USB_COUNT_SOF */ -#ifdef USB_SOF_HOOK - USB_SOF_HOOK -#endif - rjmp sofError -foundK: ;[-12] -;{3, 5} after falling D- edge, average delay: 4 cycles [we want 5 for center sampling] -;we have 1 bit time for setup purposes, then sample again. Numbers in brackets -;are cycles from center of first sync (double K) bit after the instruction - push r0 ;[-12] -; [---] ;[-11] - push YH ;[-10] -; [---] ;[-9] - lds YL, usbInputBufOffset;[-8] -; [---] ;[-7] - clr YH ;[-6] - subi YL, lo8(-(usbRxBuf));[-5] [rx loop init] - sbci YH, hi8(-(usbRxBuf));[-4] [rx loop init] - mov r0, x2 ;[-3] [rx loop init] - sbis USBIN, USBMINUS ;[-2] we want two bits K (sample 2 cycles too early) - rjmp haveTwoBitsK ;[-1] - pop YH ;[0] undo the pushes from before - pop r0 ;[2] - rjmp waitForK ;[4] this was not the end of sync, retry -; The entire loop from waitForK until rjmp waitForK above must not exceed two -; bit times (= 22 cycles). - -;---------------------------------------------------------------------------- -; push more registers and initialize values while we sample the first bits: -;---------------------------------------------------------------------------- -haveTwoBitsK: ;[1] - push shift ;[1] - push x1 ;[3] - push x2 ;[5] - push x3 ;[7] - ldi shift, 0xff ;[9] [rx loop init] - ori x3, 0xff ;[10] [rx loop init] == ser x3, clear zero flag - - in x1, USBIN ;[11] <-- sample bit 0 - bst x1, USBMINUS ;[12] - bld shift, 0 ;[13] - push x4 ;[14] == phase -; [---] ;[15] - push cnt ;[16] -; [---] ;[17] - ldi phase, 0 ;[18] [rx loop init] - ldi cnt, USB_BUFSIZE;[19] [rx loop init] - rjmp rxbit1 ;[20] -; [---] ;[21] - -;---------------------------------------------------------------------------- -; Receiver loop (numbers in brackets are cycles within byte after instr) -;---------------------------------------------------------------------------- -/* -byte oriented operations done during loop: -bit 0: store data -bit 1: SE0 check -bit 2: overflow check -bit 3: catch up -bit 4: rjmp to achieve conditional jump range -bit 5: PLL -bit 6: catch up -bit 7: jump, fixup bitstuff -; 87 [+ 2] cycles ------------------------------------------------------------------- -*/ -continueWithBit5: - in x2, USBIN ;[055] <-- bit 5 - eor r0, x2 ;[056] - or phase, r0 ;[057] - sbrc phase, USBMINUS ;[058] - lpm ;[059] optional nop3; modifies r0 - in phase, USBIN ;[060] <-- phase - eor x1, x2 ;[061] - bst x1, USBMINUS ;[062] - bld shift, 5 ;[063] - andi shift, 0x3f ;[064] - in x1, USBIN ;[065] <-- bit 6 - breq unstuff5 ;[066] *** unstuff escape - eor phase, x1 ;[067] - eor x2, x1 ;[068] - bst x2, USBMINUS ;[069] - bld shift, 6 ;[070] -didUnstuff6: ;[ ] - in r0, USBIN ;[071] <-- phase - cpi shift, 0x02 ;[072] - brlo unstuff6 ;[073] *** unstuff escape -didUnstuff5: ;[ ] - nop2 ;[074] -; [---] ;[075] - in x2, USBIN ;[076] <-- bit 7 - eor x1, x2 ;[077] - bst x1, USBMINUS ;[078] - bld shift, 7 ;[079] -didUnstuff7: ;[ ] - eor r0, x2 ;[080] - or phase, r0 ;[081] - in r0, USBIN ;[082] <-- phase - cpi shift, 0x04 ;[083] - brsh rxLoop ;[084] -; [---] ;[085] -unstuff7: ;[ ] - andi x3, ~0x80 ;[085] - ori shift, 0x80 ;[086] - in x2, USBIN ;[087] <-- sample stuffed bit 7 - nop ;[088] - rjmp didUnstuff7 ;[089] -; [---] ;[090] - ;[080] - -unstuff5: ;[067] - eor phase, x1 ;[068] - andi x3, ~0x20 ;[069] - ori shift, 0x20 ;[070] - in r0, USBIN ;[071] <-- phase - mov x2, x1 ;[072] - nop ;[073] - nop2 ;[074] -; [---] ;[075] - in x1, USBIN ;[076] <-- bit 6 - eor r0, x1 ;[077] - or phase, r0 ;[078] - eor x2, x1 ;[079] - bst x2, USBMINUS ;[080] - bld shift, 6 ;[081] no need to check bitstuffing, we just had one - in r0, USBIN ;[082] <-- phase - rjmp didUnstuff5 ;[083] -; [---] ;[084] - ;[074] - -unstuff6: ;[074] - andi x3, ~0x40 ;[075] - in x1, USBIN ;[076] <-- bit 6 again - ori shift, 0x40 ;[077] - nop2 ;[078] -; [---] ;[079] - rjmp didUnstuff6 ;[080] -; [---] ;[081] - ;[071] - -unstuff0: ;[013] - eor r0, x2 ;[014] - or phase, r0 ;[015] - andi x2, USBMASK ;[016] check for SE0 - in r0, USBIN ;[017] <-- phase - breq didUnstuff0 ;[018] direct jump to se0 would be too long - andi x3, ~0x01 ;[019] - ori shift, 0x01 ;[020] - mov x1, x2 ;[021] mov existing sample - in x2, USBIN ;[022] <-- bit 1 again - rjmp didUnstuff0 ;[023] -; [---] ;[024] - ;[014] - -unstuff1: ;[024] - eor r0, x1 ;[025] - or phase, r0 ;[026] - andi x3, ~0x02 ;[027] - in r0, USBIN ;[028] <-- phase - ori shift, 0x02 ;[029] - mov x2, x1 ;[030] - rjmp didUnstuff1 ;[031] -; [---] ;[032] - ;[022] - -unstuff2: ;[035] - eor r0, x2 ;[036] - or phase, r0 ;[037] - andi x3, ~0x04 ;[038] - in r0, USBIN ;[039] <-- phase - ori shift, 0x04 ;[040] - mov x1, x2 ;[041] - rjmp didUnstuff2 ;[042] -; [---] ;[043] - ;[033] - -unstuff3: ;[043] - in x2, USBIN ;[044] <-- bit 3 again - eor r0, x2 ;[045] - or phase, r0 ;[046] - andi x3, ~0x08 ;[047] - ori shift, 0x08 ;[048] - nop ;[049] - in r0, USBIN ;[050] <-- phase - rjmp didUnstuff3 ;[051] -; [---] ;[052] - ;[042] - -unstuff4: ;[053] - andi x3, ~0x10 ;[054] - in x1, USBIN ;[055] <-- bit 4 again - ori shift, 0x10 ;[056] - rjmp didUnstuff4 ;[057] -; [---] ;[058] - ;[048] - -rxLoop: ;[085] - eor x3, shift ;[086] reconstruct: x3 is 0 at bit locations we changed, 1 at others - in x1, USBIN ;[000] <-- bit 0 - st y+, x3 ;[001] -; [---] ;[002] - eor r0, x1 ;[003] - or phase, r0 ;[004] - eor x2, x1 ;[005] - in r0, USBIN ;[006] <-- phase - ser x3 ;[007] - bst x2, USBMINUS ;[008] - bld shift, 0 ;[009] - andi shift, 0xf9 ;[010] -rxbit1: ;[ ] - in x2, USBIN ;[011] <-- bit 1 - breq unstuff0 ;[012] *** unstuff escape - andi x2, USBMASK ;[013] SE0 check for bit 1 -didUnstuff0: ;[ ] Z only set if we detected SE0 in bitstuff - breq se0 ;[014] - eor r0, x2 ;[015] - or phase, r0 ;[016] - in r0, USBIN ;[017] <-- phase - eor x1, x2 ;[018] - bst x1, USBMINUS ;[019] - bld shift, 1 ;[020] - andi shift, 0xf3 ;[021] -didUnstuff1: ;[ ] - in x1, USBIN ;[022] <-- bit 2 - breq unstuff1 ;[023] *** unstuff escape - eor r0, x1 ;[024] - or phase, r0 ;[025] - subi cnt, 1 ;[026] overflow check - brcs overflow ;[027] - in r0, USBIN ;[028] <-- phase - eor x2, x1 ;[029] - bst x2, USBMINUS ;[030] - bld shift, 2 ;[031] - andi shift, 0xe7 ;[032] -didUnstuff2: ;[ ] - in x2, USBIN ;[033] <-- bit 3 - breq unstuff2 ;[034] *** unstuff escape - eor r0, x2 ;[035] - or phase, r0 ;[036] - eor x1, x2 ;[037] - bst x1, USBMINUS ;[038] - in r0, USBIN ;[039] <-- phase - bld shift, 3 ;[040] - andi shift, 0xcf ;[041] -didUnstuff3: ;[ ] - breq unstuff3 ;[042] *** unstuff escape - nop ;[043] - in x1, USBIN ;[044] <-- bit 4 - eor x2, x1 ;[045] - bst x2, USBMINUS ;[046] - bld shift, 4 ;[047] -didUnstuff4: ;[ ] - eor r0, x1 ;[048] - or phase, r0 ;[049] - in r0, USBIN ;[050] <-- phase - andi shift, 0x9f ;[051] - breq unstuff4 ;[052] *** unstuff escape - rjmp continueWithBit5;[053] -; [---] ;[054] - -macro POP_STANDARD ; 16 cycles - pop cnt - pop x4 - pop x3 - pop x2 - pop x1 - pop shift - pop YH - pop r0 - endm -macro POP_RETI ; 5 cycles - pop YL - out SREG, YL - pop YL - endm - -#include "asmcommon.inc" - - -; USB spec says: -; idle = J -; J = (D+ = 0), (D- = 1) -; K = (D+ = 1), (D- = 0) -; Spec allows 7.5 bit times from EOP to SOP for replies - -bitstuff7: - eor x1, x4 ;[4] - ldi x2, 0 ;[5] - nop2 ;[6] C is zero (brcc) - rjmp didStuff7 ;[8] - -bitstuffN: - eor x1, x4 ;[5] - ldi x2, 0 ;[6] - lpm ;[7] 3 cycle NOP, modifies r0 - out USBOUT, x1 ;[10] <-- out - rjmp didStuffN ;[0] - -#define bitStatus x3 - -sendNakAndReti: - ldi cnt, USBPID_NAK ;[-19] - rjmp sendCntAndReti ;[-18] -sendAckAndReti: - ldi cnt, USBPID_ACK ;[-17] -sendCntAndReti: - mov r0, cnt ;[-16] - ldi YL, 0 ;[-15] R0 address is 0 - ldi YH, 0 ;[-14] - ldi cnt, 2 ;[-13] -; rjmp usbSendAndReti fallthrough - -;usbSend: -;pointer to data in 'Y' -;number of bytes in 'cnt' -- including sync byte [range 2 ... 12] -;uses: x1...x4, shift, cnt, Y -;Numbers in brackets are time since first bit of sync pattern is sent -usbSendAndReti: ; 12 cycles until SOP - in x2, USBDDR ;[-12] - ori x2, USBMASK ;[-11] - sbi USBOUT, USBMINUS;[-10] prepare idle state; D+ and D- must have been 0 (no pullups) - in x1, USBOUT ;[-8] port mirror for tx loop - out USBDDR, x2 ;[-7] <- acquire bus -; need not init x2 (bitstuff history) because sync starts with 0 - ldi x4, USBMASK ;[-6] exor mask - ldi shift, 0x80 ;[-5] sync byte is first byte sent - ldi bitStatus, 0xff ;[-4] init bit loop counter, works for up to 12 bytes -byteloop: -bitloop: - sbrs shift, 0 ;[8] [-3] - eor x1, x4 ;[9] [-2] - out USBOUT, x1 ;[10] [-1] <-- out - ror shift ;[0] - ror x2 ;[1] -didStuffN: - cpi x2, 0xfc ;[2] - brcc bitstuffN ;[3] - nop ;[4] - subi bitStatus, 37 ;[5] 256 / 7 ~=~ 37 - brcc bitloop ;[6] when we leave the loop, bitStatus has almost the initial value - sbrs shift, 0 ;[7] - eor x1, x4 ;[8] - ror shift ;[9] -didStuff7: - out USBOUT, x1 ;[10] <-- out - ror x2 ;[0] - cpi x2, 0xfc ;[1] - brcc bitstuff7 ;[2] - ld shift, y+ ;[3] - dec cnt ;[5] - brne byteloop ;[6] -;make SE0: - cbr x1, USBMASK ;[7] prepare SE0 [spec says EOP may be 21 to 25 cycles] - lds x2, usbNewDeviceAddr;[8] - lsl x2 ;[10] we compare with left shifted address - out USBOUT, x1 ;[11] <-- out SE0 -- from now 2 bits = 22 cycles until bus idle -;2006-03-06: moved transfer of new address to usbDeviceAddr from C-Code to asm: -;set address only after data packet was sent, not after handshake - subi YL, 2 ;[0] Only assign address on data packets, not ACK/NAK in r0 - sbci YH, 0 ;[1] - breq skipAddrAssign ;[2] - sts usbDeviceAddr, x2; if not skipped: SE0 is one cycle longer -skipAddrAssign: -;end of usbDeviceAddress transfer - ldi x2, 1< 12 cycles per bit -; Numbers in brackets are clocks counted from center of last sync bit -; when instruction starts -;register use in receive loop to receive the data bytes: -; shift assembles the byte currently being received -; x1 holds the D+ and D- line state -; x2 holds the previous line state -; cnt holds the number of bytes left in the receive buffer -; x3 holds the higher crc byte (see algorithm below) -; x4 is used as temporary register for the crc algorithm -; x5 is used for unstuffing: when unstuffing the last received bit is inverted in shift (to prevent further -; unstuffing calls. In the same time the corresponding bit in x5 is cleared to mark the bit as beening iverted -; zl lower crc value and crc table index -; zh used for crc table accesses - -;-------------------------------------------------------------------------------------------------------------- -; CRC mods: -; table driven crc checker, Z points to table in prog space -; ZL is the lower crc byte, x3 is the higher crc byte -; x4 is used as temp register to store different results -; the initialization of the crc register is not 0xFFFF but 0xFE54. This is because during the receipt of the -; first data byte an virtual zero data byte is added to the crc register, this results in the correct initial -; value of 0xFFFF at beginning of the second data byte before the first data byte is added to the crc. -; The magic number 0xFE54 results form the crc table: At tabH[0x54] = 0xFF = crcH (required) and -; tabL[0x54] = 0x01 -> crcL = 0x01 xor 0xFE = 0xFF -; bitcnt is renamed to x5 and is used for unstuffing purposes, the unstuffing works like in the 12MHz version -;-------------------------------------------------------------------------------------------------------------- -; CRC algorithm: -; The crc register is formed by x3 (higher byte) and ZL (lower byte). The algorithm uses a 'reversed' form -; i.e. that it takes the least significant bit first and shifts to the right. So in fact the highest order -; bit seen from the polynomial devision point of view is the lsb of ZL. (If this sounds strange to you i -; propose a research on CRC :-) ) -; Each data byte received is xored to ZL, the lower crc byte. This byte now builds the crc -; table index. Next the new high byte is loaded from the table and stored in x4 until we have space in x3 -; (its destination). -; Afterwards the lower table is loaded from the table and stored in ZL (the old index is overwritten as -; we don't need it anymore. In fact this is a right shift by 8 bits.) Now the old crc high value is xored -; to ZL, this is the second shift of the old crc value. Now x4 (the temp reg) is moved to x3 and the crc -; calculation is done. -; Prior to the first byte the two CRC register have to be initialized to 0xFFFF (as defined in usb spec) -; however the crc engine also runs during the receipt of the first byte, therefore x3 and zl are initialized -; to a magic number which results in a crc value of 0xFFFF after the first complete byte. -; -; This algorithm is split into the extra cycles of the different bits: -; bit7: XOR the received byte to ZL -; bit5: load the new high byte to x4 -; bit6: load the lower xor byte from the table, xor zl and x3, store result in zl (=the new crc low value) -; move x4 (the new high byte) to x3, the crc value is ready -; - - -macro POP_STANDARD ; 18 cycles - pop ZH - pop ZL - pop cnt - pop x5 - pop x3 - pop x2 - pop x1 - pop shift - pop x4 - endm -macro POP_RETI ; 7 cycles - pop YH - pop YL - out SREG, YL - pop YL - endm - -macro CRC_CLEANUP_AND_CHECK - ; the last byte has already been xored with the lower crc byte, we have to do the table lookup and xor - ; x3 is the higher crc byte, zl the lower one - ldi ZH, hi8(usbCrcTableHigh);[+1] get the new high byte from the table - lpm x2, Z ;[+2][+3][+4] - ldi ZH, hi8(usbCrcTableLow);[+5] get the new low xor byte from the table - lpm ZL, Z ;[+6][+7][+8] - eor ZL, x3 ;[+7] xor the old high byte with the value from the table, x2:ZL now holds the crc value - cpi ZL, 0x01 ;[+8] if the crc is ok we have a fixed remainder value of 0xb001 in x2:ZL (see usb spec) - brne ignorePacket ;[+9] detected a crc fault -> paket is ignored and retransmitted by the host - cpi x2, 0xb0 ;[+10] - brne ignorePacket ;[+11] detected a crc fault -> paket is ignored and retransmitted by the host - endm - - -USB_INTR_VECTOR: -;order of registers pushed: YL, SREG, YH, [sofError], x4, shift, x1, x2, x3, x5, cnt, ZL, ZH - push YL ;[-28] push only what is necessary to sync with edge ASAP - in YL, SREG ;[-26] - push YL ;[-25] - push YH ;[-23] -;---------------------------------------------------------------------------- -; Synchronize with sync pattern: -;---------------------------------------------------------------------------- -;sync byte (D-) pattern LSb to MSb: 01010100 [1 = idle = J, 0 = K] -;sync up with J to K edge during sync pattern -- use fastest possible loops -;The first part waits at most 1 bit long since we must be in sync pattern. -;YL is guarenteed to be < 0x80 because I flag is clear. When we jump to -;waitForJ, ensure that this prerequisite is met. -waitForJ: - inc YL - sbis USBIN, USBMINUS - brne waitForJ ; just make sure we have ANY timeout -waitForK: -;The following code results in a sampling window of < 1/4 bit which meets the spec. - sbis USBIN, USBMINUS ;[-17] - rjmp foundK ;[-16] - sbis USBIN, USBMINUS - rjmp foundK - sbis USBIN, USBMINUS - rjmp foundK - sbis USBIN, USBMINUS - rjmp foundK - sbis USBIN, USBMINUS - rjmp foundK - sbis USBIN, USBMINUS - rjmp foundK - sbis USBIN, USBMINUS - rjmp foundK - sbis USBIN, USBMINUS - rjmp foundK - sbis USBIN, USBMINUS - rjmp foundK -#if USB_COUNT_SOF - lds YL, usbSofCount - inc YL - sts usbSofCount, YL -#endif /* USB_COUNT_SOF */ -#ifdef USB_SOF_HOOK - USB_SOF_HOOK -#endif - rjmp sofError -foundK: ;[-15] -;{3, 5} after falling D- edge, average delay: 4 cycles -;bit0 should be at 30 (2.5 bits) for center sampling. Currently at 4 so 26 cylces till bit 0 sample -;use 1 bit time for setup purposes, then sample again. Numbers in brackets -;are cycles from center of first sync (double K) bit after the instruction - push x4 ;[-14] -; [---] ;[-13] - lds YL, usbInputBufOffset;[-12] used to toggle the two usb receive buffers -; [---] ;[-11] - clr YH ;[-10] - subi YL, lo8(-(usbRxBuf));[-9] [rx loop init] - sbci YH, hi8(-(usbRxBuf));[-8] [rx loop init] - push shift ;[-7] -; [---] ;[-6] - ldi shift, 0x80 ;[-5] the last bit is the end of byte marker for the pid receiver loop - clc ;[-4] the carry has to be clear for receipt of pid bit 0 - sbis USBIN, USBMINUS ;[-3] we want two bits K (sample 3 cycles too early) - rjmp haveTwoBitsK ;[-2] - pop shift ;[-1] undo the push from before - pop x4 ;[1] - rjmp waitForK ;[3] this was not the end of sync, retry -; The entire loop from waitForK until rjmp waitForK above must not exceed two -; bit times (= 24 cycles). - -;---------------------------------------------------------------------------- -; push more registers and initialize values while we sample the first bits: -;---------------------------------------------------------------------------- -haveTwoBitsK: - push x1 ;[0] - push x2 ;[2] - push x3 ;[4] crc high byte - ldi x2, 1< jump back and store the byte - ori shift, 0x01 ;[11] invert the last received bit to prevent furhter unstuffing - in x2, USBIN ;[0] we have some free cycles so we could check for bit stuffing errors - andi x5, 0xFE ;[1] mark this bit as inverted (will be corrected before storing shift) - eor x1, x2 ;[2] x1 and x2 have to be different because the stuff bit is always a zero - andi x1, USBMASK ;[3] mask the interesting bits - breq stuffErr ;[4] if the stuff bit is a 1-bit something went wrong - mov x1, x2 ;[5] the next bit expects the last state to be in x1 - rjmp didunstuff0 ;[6] - ;[7] jump delay of rjmp didunstuffX - -unstuff1: ;[11] this is the jump delay of breq unstuffX - in x1, USBIN ;[0] we have some free cycles so we could check for bit stuffing errors - ori shift, 0x02 ;[1] invert the last received bit to prevent furhter unstuffing - andi x5, 0xFD ;[2] mark this bit as inverted (will be corrected before storing shift) - eor x2, x1 ;[3] x1 and x2 have to be different because the stuff bit is always a zero - andi x2, USBMASK ;[4] mask the interesting bits - breq stuffErr ;[5] if the stuff bit is a 1-bit something went wrong - mov x2, x1 ;[6] the next bit expects the last state to be in x2 - nop2 ;[7] - ;[8] - rjmp didunstuff1 ;[9] - ;[10] jump delay of rjmp didunstuffX - -unstuff2: ;[9] this is the jump delay of breq unstuffX - ori shift, 0x04 ;[10] invert the last received bit to prevent furhter unstuffing - andi x5, 0xFB ;[11] mark this bit as inverted (will be corrected before storing shift) - in x2, USBIN ;[0] we have some free cycles so we could check for bit stuffing errors - eor x1, x2 ;[1] x1 and x2 have to be different because the stuff bit is always a zero - andi x1, USBMASK ;[2] mask the interesting bits - breq stuffErr ;[3] if the stuff bit is a 1-bit something went wrong - mov x1, x2 ;[4] the next bit expects the last state to be in x1 - nop2 ;[5] - ;[6] - rjmp didunstuff2 ;[7] - ;[8] jump delay of rjmp didunstuffX - -unstuff3: ;[9] this is the jump delay of breq unstuffX - ori shift, 0x08 ;[10] invert the last received bit to prevent furhter unstuffing - andi x5, 0xF7 ;[11] mark this bit as inverted (will be corrected before storing shift) - in x1, USBIN ;[0] we have some free cycles so we could check for bit stuffing errors - eor x2, x1 ;[1] x1 and x2 have to be different because the stuff bit is always a zero - andi x2, USBMASK ;[2] mask the interesting bits - breq stuffErr ;[3] if the stuff bit is a 1-bit something went wrong - mov x2, x1 ;[4] the next bit expects the last state to be in x2 - nop2 ;[5] - ;[6] - rjmp didunstuff3 ;[7] - ;[8] jump delay of rjmp didunstuffX - - - -; the include has to be here due to branch distance restirctions -#define __USE_CRC__ -#include "asmcommon.inc" - - - -; USB spec says: -; idle = J -; J = (D+ = 0), (D- = 1) -; K = (D+ = 1), (D- = 0) -; Spec allows 7.5 bit times from EOP to SOP for replies -; 7.5 bit times is 90 cycles. ...there is plenty of time - - -sendNakAndReti: - ldi x3, USBPID_NAK ;[-18] - rjmp sendX3AndReti ;[-17] -sendAckAndReti: - ldi cnt, USBPID_ACK ;[-17] -sendCntAndReti: - mov x3, cnt ;[-16] -sendX3AndReti: - ldi YL, 20 ;[-15] x3==r20 address is 20 - ldi YH, 0 ;[-14] - ldi cnt, 2 ;[-13] -; rjmp usbSendAndReti fallthrough - -;usbSend: -;pointer to data in 'Y' -;number of bytes in 'cnt' -- including sync byte [range 2 ... 12] -;uses: x1...x4, btcnt, shift, cnt, Y -;Numbers in brackets are time since first bit of sync pattern is sent - -usbSendAndReti: ; 12 cycles until SOP - in x2, USBDDR ;[-12] - ori x2, USBMASK ;[-11] - sbi USBOUT, USBMINUS;[-10] prepare idle state; D+ and D- must have been 0 (no pullups) - in x1, USBOUT ;[-8] port mirror for tx loop - out USBDDR, x2 ;[-6] <- acquire bus - ldi x2, 0 ;[-6] init x2 (bitstuff history) because sync starts with 0 - ldi x4, USBMASK ;[-5] exor mask - ldi shift, 0x80 ;[-4] sync byte is first byte sent -txByteLoop: - ldi bitcnt, 0x40 ;[-3]=[9] binary 01000000 -txBitLoop: ; the loop sends the first 7 bits of the byte - sbrs shift, 0 ;[-2]=[10] if we have to send a 1 don't change the line state - eor x1, x4 ;[-1]=[11] - out USBOUT, x1 ;[0] - ror shift ;[1] - ror x2 ;[2] transfers the last sent bit to the stuffing history -didStuffN: - nop ;[3] - nop ;[4] - cpi x2, 0xfc ;[5] if we sent six consecutive ones - brcc bitstuffN ;[6] - lsr bitcnt ;[7] - brne txBitLoop ;[8] restart the loop while the 1 is still in the bitcount - -; transmit bit 7 - sbrs shift, 0 ;[9] - eor x1, x4 ;[10] -didStuff7: - ror shift ;[11] - out USBOUT, x1 ;[0] transfer bit 7 to the pins - ror x2 ;[1] move the bit into the stuffing history - cpi x2, 0xfc ;[2] - brcc bitstuff7 ;[3] - ld shift, y+ ;[4] get next byte to transmit - dec cnt ;[5] decrement byte counter - brne txByteLoop ;[7] if we have more bytes start next one - ;[8] branch delay - -;make SE0: - cbr x1, USBMASK ;[8] prepare SE0 [spec says EOP may be 25 to 30 cycles] - lds x2, usbNewDeviceAddr;[9] - lsl x2 ;[11] we compare with left shifted address - out USBOUT, x1 ;[0] <-- out SE0 -- from now 2 bits = 24 cycles until bus idle - subi YL, 20 + 2 ;[1] Only assign address on data packets, not ACK/NAK in x3 - sbci YH, 0 ;[2] -;2006-03-06: moved transfer of new address to usbDeviceAddr from C-Code to asm: -;set address only after data packet was sent, not after handshake - breq skipAddrAssign ;[3] - sts usbDeviceAddr, x2 ; if not skipped: SE0 is one cycle longer -skipAddrAssign: -;end of usbDeviceAddress transfer - ldi x2, 1< -int main (int argc, char **argv) -{ - int i, j; - for (i=0; i<512; i++){ - unsigned short crc = i & 0xff; - for(j=0; j<8; j++) crc = (crc >> 1) ^ ((crc & 1) ? 0xa001 : 0); - if((i & 7) == 0) printf("\n.byte "); - printf("0x%02x, ", (i > 0xff ? (crc >> 8) : crc) & 0xff); - if(i == 255) printf("\n"); - } - return 0; -} - -// Use the following algorithm to compute CRC values: -ushort computeCrc(uchar *msg, uchar msgLen) -{ - uchar i; - ushort crc = 0xffff; - for(i = 0; i < msgLen; i++) - crc = usbCrcTable16[lo8(crc) ^ msg[i]] ^ hi8(crc); - return crc; -} -*/ - -.balign 256 -usbCrcTableLow: -.byte 0x00, 0xC1, 0x81, 0x40, 0x01, 0xC0, 0x80, 0x41 -.byte 0x01, 0xC0, 0x80, 0x41, 0x00, 0xC1, 0x81, 0x40 -.byte 0x01, 0xC0, 0x80, 0x41, 0x00, 0xC1, 0x81, 0x40 -.byte 0x00, 0xC1, 0x81, 0x40, 0x01, 0xC0, 0x80, 0x41 -.byte 0x01, 0xC0, 0x80, 0x41, 0x00, 0xC1, 0x81, 0x40 -.byte 0x00, 0xC1, 0x81, 0x40, 0x01, 0xC0, 0x80, 0x41 -.byte 0x00, 0xC1, 0x81, 0x40, 0x01, 0xC0, 0x80, 0x41 -.byte 0x01, 0xC0, 0x80, 0x41, 0x00, 0xC1, 0x81, 0x40 -.byte 0x01, 0xC0, 0x80, 0x41, 0x00, 0xC1, 0x81, 0x40 -.byte 0x00, 0xC1, 0x81, 0x40, 0x01, 0xC0, 0x80, 0x41 -.byte 0x00, 0xC1, 0x81, 0x40, 0x01, 0xC0, 0x80, 0x41 -.byte 0x01, 0xC0, 0x80, 0x41, 0x00, 0xC1, 0x81, 0x40 -.byte 0x00, 0xC1, 0x81, 0x40, 0x01, 0xC0, 0x80, 0x41 -.byte 0x01, 0xC0, 0x80, 0x41, 0x00, 0xC1, 0x81, 0x40 -.byte 0x01, 0xC0, 0x80, 0x41, 0x00, 0xC1, 0x81, 0x40 -.byte 0x00, 0xC1, 0x81, 0x40, 0x01, 0xC0, 0x80, 0x41 -.byte 0x01, 0xC0, 0x80, 0x41, 0x00, 0xC1, 0x81, 0x40 -.byte 0x00, 0xC1, 0x81, 0x40, 0x01, 0xC0, 0x80, 0x41 -.byte 0x00, 0xC1, 0x81, 0x40, 0x01, 0xC0, 0x80, 0x41 -.byte 0x01, 0xC0, 0x80, 0x41, 0x00, 0xC1, 0x81, 0x40 -.byte 0x00, 0xC1, 0x81, 0x40, 0x01, 0xC0, 0x80, 0x41 -.byte 0x01, 0xC0, 0x80, 0x41, 0x00, 0xC1, 0x81, 0x40 -.byte 0x01, 0xC0, 0x80, 0x41, 0x00, 0xC1, 0x81, 0x40 -.byte 0x00, 0xC1, 0x81, 0x40, 0x01, 0xC0, 0x80, 0x41 -.byte 0x00, 0xC1, 0x81, 0x40, 0x01, 0xC0, 0x80, 0x41 -.byte 0x01, 0xC0, 0x80, 0x41, 0x00, 0xC1, 0x81, 0x40 -.byte 0x01, 0xC0, 0x80, 0x41, 0x00, 0xC1, 0x81, 0x40 -.byte 0x00, 0xC1, 0x81, 0x40, 0x01, 0xC0, 0x80, 0x41 -.byte 0x01, 0xC0, 0x80, 0x41, 0x00, 0xC1, 0x81, 0x40 -.byte 0x00, 0xC1, 0x81, 0x40, 0x01, 0xC0, 0x80, 0x41 -.byte 0x00, 0xC1, 0x81, 0x40, 0x01, 0xC0, 0x80, 0x41 -.byte 0x01, 0xC0, 0x80, 0x41, 0x00, 0xC1, 0x81, 0x40 - -; .balign 256 -usbCrcTableHigh: -.byte 0x00, 0xC0, 0xC1, 0x01, 0xC3, 0x03, 0x02, 0xC2 -.byte 0xC6, 0x06, 0x07, 0xC7, 0x05, 0xC5, 0xC4, 0x04 -.byte 0xCC, 0x0C, 0x0D, 0xCD, 0x0F, 0xCF, 0xCE, 0x0E -.byte 0x0A, 0xCA, 0xCB, 0x0B, 0xC9, 0x09, 0x08, 0xC8 -.byte 0xD8, 0x18, 0x19, 0xD9, 0x1B, 0xDB, 0xDA, 0x1A -.byte 0x1E, 0xDE, 0xDF, 0x1F, 0xDD, 0x1D, 0x1C, 0xDC -.byte 0x14, 0xD4, 0xD5, 0x15, 0xD7, 0x17, 0x16, 0xD6 -.byte 0xD2, 0x12, 0x13, 0xD3, 0x11, 0xD1, 0xD0, 0x10 -.byte 0xF0, 0x30, 0x31, 0xF1, 0x33, 0xF3, 0xF2, 0x32 -.byte 0x36, 0xF6, 0xF7, 0x37, 0xF5, 0x35, 0x34, 0xF4 -.byte 0x3C, 0xFC, 0xFD, 0x3D, 0xFF, 0x3F, 0x3E, 0xFE -.byte 0xFA, 0x3A, 0x3B, 0xFB, 0x39, 0xF9, 0xF8, 0x38 -.byte 0x28, 0xE8, 0xE9, 0x29, 0xEB, 0x2B, 0x2A, 0xEA -.byte 0xEE, 0x2E, 0x2F, 0xEF, 0x2D, 0xED, 0xEC, 0x2C -.byte 0xE4, 0x24, 0x25, 0xE5, 0x27, 0xE7, 0xE6, 0x26 -.byte 0x22, 0xE2, 0xE3, 0x23, 0xE1, 0x21, 0x20, 0xE0 -.byte 0xA0, 0x60, 0x61, 0xA1, 0x63, 0xA3, 0xA2, 0x62 -.byte 0x66, 0xA6, 0xA7, 0x67, 0xA5, 0x65, 0x64, 0xA4 -.byte 0x6C, 0xAC, 0xAD, 0x6D, 0xAF, 0x6F, 0x6E, 0xAE -.byte 0xAA, 0x6A, 0x6B, 0xAB, 0x69, 0xA9, 0xA8, 0x68 -.byte 0x78, 0xB8, 0xB9, 0x79, 0xBB, 0x7B, 0x7A, 0xBA -.byte 0xBE, 0x7E, 0x7F, 0xBF, 0x7D, 0xBD, 0xBC, 0x7C -.byte 0xB4, 0x74, 0x75, 0xB5, 0x77, 0xB7, 0xB6, 0x76 -.byte 0x72, 0xB2, 0xB3, 0x73, 0xB1, 0x71, 0x70, 0xB0 -.byte 0x50, 0x90, 0x91, 0x51, 0x93, 0x53, 0x52, 0x92 -.byte 0x96, 0x56, 0x57, 0x97, 0x55, 0x95, 0x94, 0x54 -.byte 0x9C, 0x5C, 0x5D, 0x9D, 0x5F, 0x9F, 0x9E, 0x5E -.byte 0x5A, 0x9A, 0x9B, 0x5B, 0x99, 0x59, 0x58, 0x98 -.byte 0x88, 0x48, 0x49, 0x89, 0x4B, 0x8B, 0x8A, 0x4A -.byte 0x4E, 0x8E, 0x8F, 0x4F, 0x8D, 0x4D, 0x4C, 0x8C -.byte 0x44, 0x84, 0x85, 0x45, 0x87, 0x47, 0x46, 0x86 -.byte 0x82, 0x42, 0x43, 0x83, 0x41, 0x81, 0x80, 0x40 - diff --git a/tmk_core/protocol/vusb/usbdrv/usbdrvasm20.inc b/tmk_core/protocol/vusb/usbdrv/usbdrvasm20.inc deleted file mode 100644 index 303abaf64c75..000000000000 --- a/tmk_core/protocol/vusb/usbdrv/usbdrvasm20.inc +++ /dev/null @@ -1,360 +0,0 @@ -/* Name: usbdrvasm20.inc - * Project: V-USB, virtual USB port for Atmel's(r) AVR(r) microcontrollers - * Author: Jeroen Benschop - * Based on usbdrvasm16.inc from Christian Starkjohann - * Creation Date: 2008-03-05 - * Tabsize: 4 - * Copyright: (c) 2008 by Jeroen Benschop and OBJECTIVE DEVELOPMENT Software GmbH - * License: GNU GPL v2 (see License.txt), GNU GPL v3 or proprietary (CommercialLicense.txt) - * Revision: $Id: usbdrvasm20.inc 740 2009-04-13 18:23:31Z cs $ - */ - -/* Do not link this file! Link usbdrvasm.S instead, which includes the - * appropriate implementation! - */ - -/* -General Description: -This file is the 20 MHz version of the asssembler part of the USB driver. It -requires a 20 MHz crystal (not a ceramic resonator and not a calibrated RC -oscillator). - -See usbdrv.h for a description of the entire driver. - -Since almost all of this code is timing critical, don't change unless you -really know what you are doing! Many parts require not only a maximum number -of CPU cycles, but even an exact number of cycles! -*/ - -#define leap2 x3 -#ifdef __IAR_SYSTEMS_ASM__ -#define nextInst $+2 -#else -#define nextInst .+0 -#endif - -;max stack usage: [ret(2), YL, SREG, YH, bitcnt, shift, x1, x2, x3, x4, cnt] = 12 bytes -;nominal frequency: 20 MHz -> 13.333333 cycles per bit, 106.666667 cycles per byte -; Numbers in brackets are clocks counted from center of last sync bit -; when instruction starts -;register use in receive loop: -; shift assembles the byte currently being received -; x1 holds the D+ and D- line state -; x2 holds the previous line state -; x4 (leap) is used to add a leap cycle once every three bytes received -; X3 (leap2) is used to add a leap cycle once every three stuff bits received -; bitcnt is used to determine when a stuff bit is due -; cnt holds the number of bytes left in the receive buffer - -USB_INTR_VECTOR: -;order of registers pushed: YL, SREG YH, [sofError], bitcnt, shift, x1, x2, x3, x4, cnt - push YL ;[-28] push only what is necessary to sync with edge ASAP - in YL, SREG ;[-26] - push YL ;[-25] - push YH ;[-23] -;---------------------------------------------------------------------------- -; Synchronize with sync pattern: -;---------------------------------------------------------------------------- -;sync byte (D-) pattern LSb to MSb: 01010100 [1 = idle = J, 0 = K] -;sync up with J to K edge during sync pattern -- use fastest possible loops -;The first part waits at most 1 bit long since we must be in sync pattern. -;YL is guarenteed to be < 0x80 because I flag is clear. When we jump to -;waitForJ, ensure that this prerequisite is met. -waitForJ: - inc YL - sbis USBIN, USBMINUS - brne waitForJ ; just make sure we have ANY timeout -waitForK: -;The following code results in a sampling window of < 1/4 bit which meets the spec. - sbis USBIN, USBMINUS ;[-19] - rjmp foundK ;[-18] - sbis USBIN, USBMINUS - rjmp foundK - sbis USBIN, USBMINUS - rjmp foundK - sbis USBIN, USBMINUS - rjmp foundK - sbis USBIN, USBMINUS - rjmp foundK - sbis USBIN, USBMINUS - rjmp foundK - sbis USBIN, USBMINUS - rjmp foundK - sbis USBIN, USBMINUS - rjmp foundK - sbis USBIN, USBMINUS - rjmp foundK -#if USB_COUNT_SOF - lds YL, usbSofCount - inc YL - sts usbSofCount, YL -#endif /* USB_COUNT_SOF */ -#ifdef USB_SOF_HOOK - USB_SOF_HOOK -#endif - rjmp sofError -foundK: ;[-16] -;{3, 5} after falling D- edge, average delay: 4 cycles -;bit0 should be at 34 for center sampling. Currently at 4 so 30 cylces till bit 0 sample -;use 1 bit time for setup purposes, then sample again. Numbers in brackets -;are cycles from center of first sync (double K) bit after the instruction - push bitcnt ;[-16] -; [---] ;[-15] - lds YL, usbInputBufOffset;[-14] -; [---] ;[-13] - clr YH ;[-12] - subi YL, lo8(-(usbRxBuf));[-11] [rx loop init] - sbci YH, hi8(-(usbRxBuf));[-10] [rx loop init] - push shift ;[-9] -; [---] ;[-8] - ldi shift,0x40 ;[-7] set msb to "1" so processing bit7 can be detected - nop2 ;[-6] -; [---] ;[-5] - ldi bitcnt, 5 ;[-4] [rx loop init] - sbis USBIN, USBMINUS ;[-3] we want two bits K (sample 3 cycles too early) - rjmp haveTwoBitsK ;[-2] - pop shift ;[-1] undo the push from before - pop bitcnt ;[1] - rjmp waitForK ;[3] this was not the end of sync, retry -; The entire loop from waitForK until rjmp waitForK above must not exceed two -; bit times (= 27 cycles). - -;---------------------------------------------------------------------------- -; push more registers and initialize values while we sample the first bits: -;---------------------------------------------------------------------------- -haveTwoBitsK: - push x1 ;[0] - push x2 ;[2] - push x3 ;[4] (leap2) - ldi leap2, 0x55 ;[6] add leap cycle on 2nd,5th,8th,... stuff bit - push x4 ;[7] == leap - ldi leap, 0x55 ;[9] skip leap cycle on 2nd,5th,8th,... byte received - push cnt ;[10] - ldi cnt, USB_BUFSIZE ;[12] [rx loop init] - ldi x2, 1< -#ifndef __IAR_SYSTEMS_ASM__ -# include -#endif - -#define __attribute__(arg) /* not supported on IAR */ - -#ifdef __IAR_SYSTEMS_ASM__ -# define __ASSEMBLER__ /* IAR does not define standard macro for asm */ -#endif - -#ifdef __HAS_ELPM__ -# define PROGMEM __farflash -#else -# define PROGMEM __flash -#endif - -#define USB_READ_FLASH(addr) (*(PROGMEM char *)(addr)) - -/* The following definitions are not needed by the driver, but may be of some - * help if you port a gcc based project to IAR. - */ -#define cli() __disable_interrupt() -#define sei() __enable_interrupt() -#define wdt_reset() __watchdog_reset() -#define _BV(x) (1 << (x)) - -/* assembler compatibility macros */ -#define nop2 rjmp $+2 /* jump to next instruction */ -#define XL r26 -#define XH r27 -#define YL r28 -#define YH r29 -#define ZL r30 -#define ZH r31 -#define lo8(x) LOW(x) -#define hi8(x) (((x)>>8) & 0xff) /* not HIGH to allow XLINK to make a proper range check */ - -/* Depending on the device you use, you may get problems with the way usbdrv.h - * handles the differences between devices. Since IAR does not use #defines - * for MCU registers, we can't check for the existence of a particular - * register with an #ifdef. If the autodetection mechanism fails, include - * definitions for the required USB_INTR_* macros in your usbconfig.h. See - * usbconfig-prototype.h and usbdrv.h for details. - */ - -/* ------------------------------------------------------------------------- */ -#elif __CODEVISIONAVR__ /* check for CodeVision AVR */ -/* ------------------------------------------------------------------------- */ -/* This port is not working (yet) */ - -/* #define F_CPU _MCU_CLOCK_FREQUENCY_ seems to be defined automatically */ - -#include -#include - -#define __attribute__(arg) /* not supported on IAR */ - -#define PROGMEM __flash -#define USB_READ_FLASH(addr) (*(PROGMEM char *)(addr)) - -#ifndef __ASSEMBLER__ -static inline void cli(void) -{ - #asm("cli"); -} -static inline void sei(void) -{ - #asm("sei"); -} -#endif -#define _delay_ms(t) delay_ms(t) -#define _BV(x) (1 << (x)) -#define USB_CFG_USE_SWITCH_STATEMENT 1 /* macro for if() cascase fails for unknown reason */ - -#define macro .macro -#define endm .endmacro -#define nop2 rjmp .+0 /* jump to next instruction */ - -/* ------------------------------------------------------------------------- */ -#else /* default development environment is avr-gcc/avr-libc */ -/* ------------------------------------------------------------------------- */ - -#include -#ifdef __ASSEMBLER__ -# define _VECTOR(N) __vector_ ## N /* io.h does not define this for asm */ -#else -# include -#endif - -#if USB_CFG_DRIVER_FLASH_PAGE -# define USB_READ_FLASH(addr) pgm_read_byte_far(((long)USB_CFG_DRIVER_FLASH_PAGE << 16) | (long)(addr)) -#else -# define USB_READ_FLASH(addr) pgm_read_byte(addr) -#endif - -#define macro .macro -#define endm .endm -#define nop2 rjmp .+0 /* jump to next instruction */ - -#endif /* development environment */ - -/* for conveniecne, ensure that PRG_RDB exists */ -#ifndef PRG_RDB -# define PRG_RDB(addr) USB_READ_FLASH(addr) -#endif -#endif /* __usbportability_h_INCLUDED__ */ diff --git a/tmk_core/protocol/vusb/vusb.c b/tmk_core/protocol/vusb/vusb.c index 4c8e6003fe82..5feff889a1a1 100644 --- a/tmk_core/protocol/vusb/vusb.c +++ b/tmk_core/protocol/vusb/vusb.c @@ -18,7 +18,7 @@ along with this program. If not, see . #include #include #include -#include "usbdrv.h" +#include #include "usbconfig.h" #include "host.h" #include "report.h" @@ -290,12 +290,12 @@ usbMsgLen_t usbFunctionSetup(uchar data[8]) { if (rq->bRequest == USBRQ_HID_GET_REPORT) { debug("GET_REPORT:"); /* we only have one report type, so don't look at wValue */ - usbMsgPtr = (void *)&keyboard_report; + usbMsgPtr = (usbMsgPtr_t)&keyboard_report; return sizeof(keyboard_report); } else if (rq->bRequest == USBRQ_HID_GET_IDLE) { debug("GET_IDLE: "); // debug_hex(vusb_idle_rate); - usbMsgPtr = &vusb_idle_rate; + usbMsgPtr = (usbMsgPtr_t)&vusb_idle_rate; return 1; } else if (rq->bRequest == USBRQ_HID_SET_IDLE) { vusb_idle_rate = rq->wValue.bytes[1]; @@ -815,29 +815,29 @@ USB_PUBLIC usbMsgLen_t usbFunctionDescriptor(struct usbRequest *rq) { */ switch (rq->wValue.bytes[1]) { case USBDESCR_DEVICE: - usbMsgPtr = (unsigned char *)&usbDeviceDescriptor; + usbMsgPtr = (usbMsgPtr_t)&usbDeviceDescriptor; len = sizeof(usbDeviceDescriptor_t); break; case USBDESCR_CONFIG: - usbMsgPtr = (unsigned char *)&usbConfigurationDescriptor; + usbMsgPtr = (usbMsgPtr_t)&usbConfigurationDescriptor; len = sizeof(usbConfigurationDescriptor_t); break; case USBDESCR_STRING: switch (rq->wValue.bytes[0]) { case 0: - usbMsgPtr = (unsigned char *)&usbStringDescriptorZero; + usbMsgPtr = (usbMsgPtr_t)&usbStringDescriptorZero; len = usbStringDescriptorZero.header.bLength; break; case 1: // iManufacturer - usbMsgPtr = (unsigned char *)&usbStringDescriptorManufacturer; + usbMsgPtr = (usbMsgPtr_t)&usbStringDescriptorManufacturer; len = usbStringDescriptorManufacturer.header.bLength; break; case 2: // iProduct - usbMsgPtr = (unsigned char *)&usbStringDescriptorProduct; + usbMsgPtr = (usbMsgPtr_t)&usbStringDescriptorProduct; len = usbStringDescriptorProduct.header.bLength; break; case 3: // iSerialNumber - usbMsgPtr = (unsigned char *)&usbStringDescriptorSerial; + usbMsgPtr = (usbMsgPtr_t)&usbStringDescriptorSerial; len = usbStringDescriptorSerial.header.bLength; break; } @@ -845,24 +845,24 @@ USB_PUBLIC usbMsgLen_t usbFunctionDescriptor(struct usbRequest *rq) { case USBDESCR_HID: switch (rq->wValue.bytes[0]) { case KEYBOARD_INTERFACE: - usbMsgPtr = (unsigned char *)&usbConfigurationDescriptor.keyboardHID; + usbMsgPtr = (usbMsgPtr_t)&usbConfigurationDescriptor.keyboardHID; len = sizeof(usbHIDDescriptor_t); break; #if defined(RAW_ENABLE) case RAW_INTERFACE: - usbMsgPtr = (unsigned char *)&usbConfigurationDescriptor.rawHID; + usbMsgPtr = (usbMsgPtr_t)&usbConfigurationDescriptor.rawHID; len = sizeof(usbHIDDescriptor_t); break; #endif #if defined(MOUSE_ENABLE) || defined(EXTRAKEY_ENABLE) case MOUSE_EXTRA_INTERFACE: - usbMsgPtr = (unsigned char *)&usbConfigurationDescriptor.mouseExtraHID; + usbMsgPtr = (usbMsgPtr_t)&usbConfigurationDescriptor.mouseExtraHID; len = sizeof(usbHIDDescriptor_t); break; #endif #if defined(CONSOLE_ENABLE) case CONSOLE_INTERFACE: - usbMsgPtr = (unsigned char *)&usbConfigurationDescriptor.consoleHID; + usbMsgPtr = (usbMsgPtr_t)&usbConfigurationDescriptor.consoleHID; len = sizeof(usbHIDDescriptor_t); break; #endif @@ -872,24 +872,24 @@ USB_PUBLIC usbMsgLen_t usbFunctionDescriptor(struct usbRequest *rq) { /* interface index */ switch (rq->wIndex.word) { case KEYBOARD_INTERFACE: - usbMsgPtr = (unsigned char *)keyboard_hid_report; + usbMsgPtr = (usbMsgPtr_t)keyboard_hid_report; len = sizeof(keyboard_hid_report); break; #if defined(RAW_ENABLE) case RAW_INTERFACE: - usbMsgPtr = (unsigned char *)raw_hid_report; + usbMsgPtr = (usbMsgPtr_t)raw_hid_report; len = sizeof(raw_hid_report); break; #endif #if defined(MOUSE_ENABLE) || defined(EXTRAKEY_ENABLE) case MOUSE_EXTRA_INTERFACE: - usbMsgPtr = (unsigned char *)mouse_extra_hid_report; + usbMsgPtr = (usbMsgPtr_t)mouse_extra_hid_report; len = sizeof(mouse_extra_hid_report); break; #endif #if defined(CONSOLE_ENABLE) case CONSOLE_INTERFACE: - usbMsgPtr = (unsigned char *)console_hid_report; + usbMsgPtr = (usbMsgPtr_t)console_hid_report; len = sizeof(console_hid_report); break; #endif diff --git a/users/ericgebhart/ericgebhart.c b/users/ericgebhart/ericgebhart.c index 76143c6ed1fc..abb87899b7b5 100644 --- a/users/ericgebhart/ericgebhart.c +++ b/users/ericgebhart/ericgebhart.c @@ -61,11 +61,6 @@ uint32_t layer_state_set_keymap (uint32_t state) { __attribute__ ((weak)) void led_set_keymap(uint8_t usb_led) {} -// Runs just one time when the keyboard initializes. -void matrix_init_user(void) { - //ACTION_DEFAULT_LAYER_SET(DVORAK) ; -} - // check default layerstate to see which layer we are on. // if (biton32(layer_state) == _DIABLO) { --- current layer // if (biton32(default_layer_state) == _DIABLO) { --- current default layer diff --git a/users/ninjonas/ninjonas.c b/users/ninjonas/ninjonas.c index 7e5afcec87ef..d66a5b008ce3 100644 --- a/users/ninjonas/ninjonas.c +++ b/users/ninjonas/ninjonas.c @@ -36,4 +36,4 @@ void keyboard_post_init_user() { } #endif layer_state_set_user(layer_state); -} \ No newline at end of file +} diff --git a/users/ridingqwerty/ridingqwerty.c b/users/ridingqwerty/ridingqwerty.c index ee6e7e897a83..19b417a80f40 100644 --- a/users/ridingqwerty/ridingqwerty.c +++ b/users/ridingqwerty/ridingqwerty.c @@ -45,7 +45,7 @@ layer_state_t layer_state_set_user(layer_state_t state) { return state; } -uint16_t get_tapping_term(uint16_t keycode) { +uint16_t get_tapping_term(uint16_t keycode, keyrecord_t *record) { switch (keycode) { case RC(ENT): case ED(ESC): diff --git a/users/tominabox1/tominabox1.c b/users/tominabox1/tominabox1.c index 95e6ee780332..d2e9e1258127 100644 --- a/users/tominabox1/tominabox1.c +++ b/users/tominabox1/tominabox1.c @@ -106,7 +106,7 @@ qk_tap_dance_action_t tap_dance_actions[] = { #endif // CRKBD -uint16_t get_tapping_term(uint16_t keycode) { +uint16_t get_tapping_term(uint16_t keycode, keyrecord_t *record) { switch (keycode) { case LSFT_T(KC_CAPS): return 250; From 8d3fca57a3d288a7d328952c426d055a999412bd Mon Sep 17 00:00:00 2001 From: Nick Brassel Date: Mon, 1 Jun 2020 11:53:01 +1000 Subject: [PATCH 062/930] Fix build when using IGNORE_MOD_TAP_INTERRUPT_PER_KEY. (#9258) --- 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 7a53e08ed383..909b9c39c934 100644 --- a/tmk_core/common/action.c +++ b/tmk_core/common/action.c @@ -335,7 +335,7 @@ void process_action(keyrecord_t *record, action_t action) { # 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, false), &record) && + !get_ignore_mod_tap_interrupt(get_event_keycode(record->event, false), record) && # endif record->tap.interrupted) { dprint("mods_tap: tap: cancel: add_mods\n"); From b2271d984dc1fe178ceb0d4dd698ea411c62b18c Mon Sep 17 00:00:00 2001 From: Joel Challis Date: Mon, 1 Jun 2020 02:53:43 +0100 Subject: [PATCH 063/930] Move plaid via keymap to correct location (#9255) --- keyboards/{ => dm9records}/plaid/keymaps/via/config.h | 0 keyboards/{ => dm9records}/plaid/keymaps/via/keymap.c | 0 keyboards/{ => dm9records}/plaid/keymaps/via/readme.md | 0 keyboards/{ => dm9records}/plaid/keymaps/via/rules.mk | 0 4 files changed, 0 insertions(+), 0 deletions(-) rename keyboards/{ => dm9records}/plaid/keymaps/via/config.h (100%) rename keyboards/{ => dm9records}/plaid/keymaps/via/keymap.c (100%) rename keyboards/{ => dm9records}/plaid/keymaps/via/readme.md (100%) rename keyboards/{ => dm9records}/plaid/keymaps/via/rules.mk (100%) diff --git a/keyboards/plaid/keymaps/via/config.h b/keyboards/dm9records/plaid/keymaps/via/config.h similarity index 100% rename from keyboards/plaid/keymaps/via/config.h rename to keyboards/dm9records/plaid/keymaps/via/config.h diff --git a/keyboards/plaid/keymaps/via/keymap.c b/keyboards/dm9records/plaid/keymaps/via/keymap.c similarity index 100% rename from keyboards/plaid/keymaps/via/keymap.c rename to keyboards/dm9records/plaid/keymaps/via/keymap.c diff --git a/keyboards/plaid/keymaps/via/readme.md b/keyboards/dm9records/plaid/keymaps/via/readme.md similarity index 100% rename from keyboards/plaid/keymaps/via/readme.md rename to keyboards/dm9records/plaid/keymaps/via/readme.md diff --git a/keyboards/plaid/keymaps/via/rules.mk b/keyboards/dm9records/plaid/keymaps/via/rules.mk similarity index 100% rename from keyboards/plaid/keymaps/via/rules.mk rename to keyboards/dm9records/plaid/keymaps/via/rules.mk From dfcd4f0d25bb3db8798ad8bb06da0fab68e7cf25 Mon Sep 17 00:00:00 2001 From: Kimat Boven Date: Mon, 1 Jun 2020 06:04:44 +0200 Subject: [PATCH 064/930] BE_J should map to KC_J (#9243) --- quantum/keymap_extras/keymap_belgian.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/quantum/keymap_extras/keymap_belgian.h b/quantum/keymap_extras/keymap_belgian.h index c6363a4377c5..b65db0532b85 100644 --- a/quantum/keymap_extras/keymap_belgian.h +++ b/quantum/keymap_extras/keymap_belgian.h @@ -67,7 +67,7 @@ #define BE_F KC_F // F #define BE_G KC_G // G #define BE_H KC_H // H -#define BE_J KC_K // J +#define BE_J KC_J // J #define BE_K KC_K // K #define BE_L KC_L // L #define BE_M KC_SCLN // M From e2e287ec5f720839efd8f7cecf447763433cda27 Mon Sep 17 00:00:00 2001 From: Joshua Diamond Date: Mon, 1 Jun 2020 05:02:28 -0400 Subject: [PATCH 065/930] Option to allow lighting layers when RGB Lighting is off (#9051) --- docs/config_options.md | 2 ++ docs/feature_rgblight.md | 4 ++++ quantum/rgblight.c | 24 ++++++++++++++++++------ 3 files changed, 24 insertions(+), 6 deletions(-) diff --git a/docs/config_options.md b/docs/config_options.md index b96079e6054c..ab26fd46ce1e 100644 --- a/docs/config_options.md +++ b/docs/config_options.md @@ -197,6 +197,8 @@ If you define these options you will enable the associated feature, which may in * Note: Increasing the maximum will increase the firmware size and slow sync on split keyboards. * `#define RGBLIGHT_LAYER_BLINK` * Adds ability to [blink](feature_rgblight.md?id=lighting-layer-blink) a lighting layer for a specified number of milliseconds (e.g. to acknowledge an action). +* `#define RGBLIGHT_LAYERS_OVERRIDE_RGB_OFF` + * If defined, then [lighting layers](feature_rgblight?id=overriding-rgb-lighting-onoff-status) will be shown even if RGB Light is off. * `#define RGBLED_NUM 12` * number of LEDs * `#define RGBLIGHT_SPLIT` diff --git a/docs/feature_rgblight.md b/docs/feature_rgblight.md index 7f5c8a36c1d7..5921e9941a0e 100644 --- a/docs/feature_rgblight.md +++ b/docs/feature_rgblight.md @@ -278,6 +278,10 @@ void post_process_record_user(uint16_t keycode, keyrecord_t *record) { } ``` +### Overriding RGB Lighting on/off status + +Normally lighting layers are not shown when RGB Lighting is disabled (e.g. with `RGB_TOG` keycode). If you would like lighting layers to work even when the RGB Lighting is otherwise off, add `#define RGBLIGHT_LAYERS_OVERRIDE_RGB_OFF` to your `config.h`. + ## Functions If you need to change your RGB lighting in code, for example in a macro to change the color whenever you switch layers, QMK provides a set of functions to assist you. See [`rgblight.h`](https://github.com/qmk/qmk_firmware/blob/master/quantum/rgblight.h) for the full list, but the most commonly used functions include: diff --git a/quantum/rgblight.c b/quantum/rgblight.c index 73a7afd7b3b2..949dd79fe78c 100644 --- a/quantum/rgblight.c +++ b/quantum/rgblight.c @@ -628,6 +628,13 @@ void rgblight_set_layer_state(uint8_t layer, bool enabled) { if (rgblight_status.timer_enabled == false) { rgblight_mode_noeeprom(rgblight_config.mode); } + +# ifdef RGBLIGHT_LAYERS_OVERRIDE_RGB_OFF + // If not enabled, then nothing else will actually set the LEDs... + if (!rgblight_config.enable) { + rgblight_set(); + } +# endif } bool rgblight_get_layer_state(uint8_t layer) { @@ -693,16 +700,11 @@ void rgblight_unblink_layers(void) { __attribute__((weak)) void rgblight_call_driver(LED_TYPE *start_led, uint8_t num_leds) { ws2812_setleds(start_led, num_leds); } #ifndef RGBLIGHT_CUSTOM_DRIVER + void rgblight_set(void) { LED_TYPE *start_led; uint8_t num_leds = rgblight_ranges.clipping_num_leds; -# ifdef RGBLIGHT_LAYERS - if (rgblight_layers != NULL) { - rgblight_layers_write(); - } -# endif - if (!rgblight_config.enable) { for (uint8_t i = rgblight_ranges.effect_start_pos; i < rgblight_ranges.effect_end_pos; i++) { led[i].r = 0; @@ -714,6 +716,16 @@ void rgblight_set(void) { } } +# ifdef RGBLIGHT_LAYERS + if (rgblight_layers != NULL +# ifndef RGBLIGHT_LAYERS_OVERRIDE_RGB_OFF + && rgblight_config.enable +# endif + ) { + rgblight_layers_write(); + } +# endif + # ifdef RGBLIGHT_LED_MAP LED_TYPE led0[RGBLED_NUM]; for (uint8_t i = 0; i < RGBLED_NUM; i++) { From 4f6f7b59cfd8de3d31ec30d568a1d19a188e88a9 Mon Sep 17 00:00:00 2001 From: Kimat Boven Date: Mon, 1 Jun 2020 15:14:14 +0200 Subject: [PATCH 066/930] `French (Belgium)` was missing (#9245) --- docs/reference_keymap_extras.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/reference_keymap_extras.md b/docs/reference_keymap_extras.md index 4f21392494cc..fd4b8dd8534c 100644 --- a/docs/reference_keymap_extras.md +++ b/docs/reference_keymap_extras.md @@ -23,6 +23,7 @@ To use these, simply `#include` the corresponding [header file](https://github.c |Finnish |`keymap_finnish.h` | |French |`keymap_french.h` | |French (BÉPO) |`keymap_bepo.h` | +|French (Belgium) |`keymap_belgian.h` | |French (Switzerland) |`keymap_fr_ch.h` | |French (macOS, ISO) |`keymap_french_osx.h` | |German |`keymap_german.h` | From 5f8e8540fb135b416a2d8f8a59df2b29ee9b9443 Mon Sep 17 00:00:00 2001 From: siano Date: Mon, 1 Jun 2020 15:24:18 +0200 Subject: [PATCH 067/930] Mac layout for XD87 (#9251) * Mac layout for XD87 * Rename to mac_underglow * Removed unused file * Fixed missing KC_RGUI * Cleanup * Updated readme. --- keyboards/xd87/keymaps/mac_underglow/keymap.c | 33 +++++++++++++++++++ .../xd87/keymaps/mac_underglow/readme.md | 13 ++++++++ keyboards/xd87/keymaps/mac_underglow/rules.mk | 3 ++ 3 files changed, 49 insertions(+) create mode 100755 keyboards/xd87/keymaps/mac_underglow/keymap.c create mode 100755 keyboards/xd87/keymaps/mac_underglow/readme.md create mode 100755 keyboards/xd87/keymaps/mac_underglow/rules.mk diff --git a/keyboards/xd87/keymaps/mac_underglow/keymap.c b/keyboards/xd87/keymaps/mac_underglow/keymap.c new file mode 100755 index 000000000000..34b260f35ae6 --- /dev/null +++ b/keyboards/xd87/keymaps/mac_underglow/keymap.c @@ -0,0 +1,33 @@ +/* Copyright 2020 Tomasz Adamczyk + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public 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( + 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_F14, KC_F15, + 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_LALT, KC_LGUI, KC_SPC, KC_RGUI, KC_RALT, MO(1),KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT ), + [1] = LAYOUT_tkl_ansi( + RESET, EEP_RST, DEBUG, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, 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, + KC_TRNS, KC_TRNS, KC_TRNS, 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_BRTG, 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, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 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/xd87/keymaps/mac_underglow/readme.md b/keyboards/xd87/keymaps/mac_underglow/readme.md new file mode 100755 index 000000000000..61fee2218f3a --- /dev/null +++ b/keyboards/xd87/keymaps/mac_underglow/readme.md @@ -0,0 +1,13 @@ +# The Mac OS layout for xd87 + +With underglow and backlight support. + +## Keymap + +### Layer 0 + +![XD87 - mac_underglow keymap - layer 0](https://i.imgur.com/LXq8phy.png) + +### Layer 1 + +![XD87 - mac_underglow_keymap - layer 1](https://i.imgur.com/swqwVaO.png) \ No newline at end of file diff --git a/keyboards/xd87/keymaps/mac_underglow/rules.mk b/keyboards/xd87/keymaps/mac_underglow/rules.mk new file mode 100755 index 000000000000..5cf1edf60be4 --- /dev/null +++ b/keyboards/xd87/keymaps/mac_underglow/rules.mk @@ -0,0 +1,3 @@ +BOOTMAGIC_ENABLE = lite +COMMAND_ENABLE = no +RGBLIGHT_ENABLE = yes From f1c33423b07886355c7a06c2bc785dcd22c4e10d Mon Sep 17 00:00:00 2001 From: cole smith <38364556+daysgobye@users.noreply.github.com> Date: Mon, 1 Jun 2020 13:07:49 -0700 Subject: [PATCH 068/930] Added new keyboard boardsource/3x4 (#9247) * added bordsource 3x4 macro pad * added bordsource 3x4 macro pad * Update keyboards/boardsource/3x4/3x4.h Co-authored-by: Nick Brassel * Update keyboards/boardsource/3x4/3x4.c Co-authored-by: Nick Brassel * Update keyboards/boardsource/3x4/config.h Co-authored-by: Nick Brassel * Update keyboards/boardsource/3x4/config.h Co-authored-by: Nick Brassel * Update keyboards/boardsource/3x4/config.h Co-authored-by: Nick Brassel * Update keyboards/boardsource/3x4/config.h Co-authored-by: Nick Brassel * added link to readme * Update keyboards/boardsource/3x4/keymaps/default/keymap.c Co-authored-by: Nick Brassel * Apply suggestions from code review Co-authored-by: Ryan Co-authored-by: Nick Brassel Co-authored-by: Ryan --- keyboards/boardsource/3x4/3x4.c | 1 + keyboards/boardsource/3x4/3x4.h | 12 ++ keyboards/boardsource/3x4/config.h | 144 ++++++++++++++++++ keyboards/boardsource/3x4/info.json | 28 ++++ .../boardsource/3x4/keymaps/default/keymap.c | 25 +++ keyboards/boardsource/3x4/readme.md | 14 ++ keyboards/boardsource/3x4/rules.mk | 31 ++++ 7 files changed, 255 insertions(+) create mode 100644 keyboards/boardsource/3x4/3x4.c create mode 100644 keyboards/boardsource/3x4/3x4.h create mode 100644 keyboards/boardsource/3x4/config.h create mode 100644 keyboards/boardsource/3x4/info.json create mode 100644 keyboards/boardsource/3x4/keymaps/default/keymap.c create mode 100644 keyboards/boardsource/3x4/readme.md create mode 100644 keyboards/boardsource/3x4/rules.mk diff --git a/keyboards/boardsource/3x4/3x4.c b/keyboards/boardsource/3x4/3x4.c new file mode 100644 index 000000000000..798d5a65c4b7 --- /dev/null +++ b/keyboards/boardsource/3x4/3x4.c @@ -0,0 +1 @@ +#include "3x4.h" diff --git a/keyboards/boardsource/3x4/3x4.h b/keyboards/boardsource/3x4/3x4.h new file mode 100644 index 000000000000..a27d32c74f74 --- /dev/null +++ b/keyboards/boardsource/3x4/3x4.h @@ -0,0 +1,12 @@ +#pragma once + +#include "quantum.h" +#define LAYOUT( \ + K00, K01, K02, K03, \ + K10, K11, K12, K13, \ + K20, K21, K22, K23 \ + ) { \ + {K00, K01, K02, K03}, \ + {K10, K11, K12, K13}, \ + {K20, K21, K22, K23} \ + } diff --git a/keyboards/boardsource/3x4/config.h b/keyboards/boardsource/3x4/config.h new file mode 100644 index 000000000000..95c6f9ac2736 --- /dev/null +++ b/keyboards/boardsource/3x4/config.h @@ -0,0 +1,144 @@ + + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xF7E0 +#define PRODUCT_ID 0x0412 +#define DEVICE_VER 0x0000 +#define MANUFACTURER Boardsource +#define PRODUCT 3x4 +#define DESCRIPTION Little macro pad + +/* key matrix size */ +#define MATRIX_ROWS 3 +#define MATRIX_COLS 4 + +#define MATRIX_ROW_PINS { F7, F6, F5,} +#define MATRIX_COL_PINS {B6, B2, B3, B1} + +#define DIODE_DIRECTION COL2ROW + +#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 + +/* + * 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. + * + */ + +/* 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_HELP1 H +//#define MAGIC_KEY_HELP2 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_ALT1 ESC +//#define MAGIC_KEY_LAYER0_ALT2 GRAVE +//#define MAGIC_KEY_LAYER0 0 +//#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 PAUSE +//#define MAGIC_KEY_LOCK CAPS +//#define MAGIC_KEY_EEPROM E +//#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 diff --git a/keyboards/boardsource/3x4/info.json b/keyboards/boardsource/3x4/info.json new file mode 100644 index 000000000000..4ef02873e3ff --- /dev/null +++ b/keyboards/boardsource/3x4/info.json @@ -0,0 +1,28 @@ +{ + "keyboard_name": "boardsource 4x3", + "url": "https://boardsource.xyz", + "maintainer": "boardsource", + "width": 4, + "height": 3, + "layouts": { + "LAYOUT": { + "layout": [ + { "label": "K01", "x": 0, "y": 0 }, + { "label": "K02", "x": 1, "y": 0 }, + { "label": "K03", "x": 2, "y": 0 }, + + { "label": "K04", "x": 0, "y": 1 }, + { "label": "K05", "x": 1, "y": 1 }, + { "label": "K06", "x": 2, "y": 1 }, + + { "label": "K07", "x": 0, "y": 2 }, + { "label": "K08", "x": 1, "y": 2 }, + { "label": "K09", "x": 2, "y": 2 }, + + { "label": "K10", "x": 0, "y": 3 }, + { "label": "K11", "x": 1, "y": 3 }, + { "label": "K12", "x": 2, "y": 3 } + ] + } + } +} diff --git a/keyboards/boardsource/3x4/keymaps/default/keymap.c b/keyboards/boardsource/3x4/keymaps/default/keymap.c new file mode 100644 index 000000000000..3add4f7fbf18 --- /dev/null +++ b/keyboards/boardsource/3x4/keymaps/default/keymap.c @@ -0,0 +1,25 @@ + +#include QMK_KEYBOARD_H + +#define _MAIN 0 +#define _RAISE 1 +#define _LOWER 2 + +// Readability keycodes +#define LOWER MO(_LOWER) +#define RAISE MO(_RAISE) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [_MAIN] = LAYOUT( + KC_0, KC_1, KC_4, KC_7, + KC_ENT, KC_2, KC_5, KC_8, + RAISE, KC_3, KC_6, KC_9 + ), + [_RAISE] = LAYOUT( + _______, _______, _______, _______, + _______, _______, _______, _______, + _______, _______, _______, RESET + ) + +}; diff --git a/keyboards/boardsource/3x4/readme.md b/keyboards/boardsource/3x4/readme.md new file mode 100644 index 000000000000..67a22ed4c0bf --- /dev/null +++ b/keyboards/boardsource/3x4/readme.md @@ -0,0 +1,14 @@ +# 3x4 +![Boardsource 3x4 macro](https://i.imgur.com/EiPF1hh.jpg) + +this macro pad / small 12 key was inspired by the plaid look + +* Keyboard Maintainer: [Boardsource](https://github.com/daysgobye) +* Hardware Supported: 3x4 v1 +* Hardware Availability: [Boardsource store](https://boardsource.xyz/store/5ecc2008eee64242946c98c1) + +Make example for this keyboard (after setting up your build environment): + + make boardsource/3x4: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/boardsource/3x4/rules.mk b/keyboards/boardsource/3x4/rules.mk new file mode 100644 index 000000000000..263c586048da --- /dev/null +++ b/keyboards/boardsource/3x4/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 +# 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 +MIDI_ENABLE = no # MIDI support +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +AUDIO_ENABLE = no # Audio output on port C6 +FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches From 5f5a6fff8bf18c85add37cfc303c7116e2753792 Mon Sep 17 00:00:00 2001 From: KOBAYASHI Daisuke Date: Tue, 2 Jun 2020 05:29:28 +0900 Subject: [PATCH 069/930] Remove the extra comma in the macro in the community keymap (#9175) --- layouts/community/65_ansi/mechmerlin/keymap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/layouts/community/65_ansi/mechmerlin/keymap.c b/layouts/community/65_ansi/mechmerlin/keymap.c index 57a1f0116756..df75b11f3f77 100644 --- a/layouts/community/65_ansi/mechmerlin/keymap.c +++ b/layouts/community/65_ansi/mechmerlin/keymap.c @@ -51,7 +51,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { _______, _______, _______, EEP_RST, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ ), }; From faa3e62e70912a2a3f75da0fb1812592f32a6871 Mon Sep 17 00:00:00 2001 From: Joel Challis Date: Mon, 1 Jun 2020 22:01:45 +0100 Subject: [PATCH 070/930] Prime_E - Increase number of via layers (#9065) * Prime_E - Increase number of via layers * Fix keymap alignment --- keyboards/primekb/prime_e/config.h | 2 ++ .../primekb/prime_e/keymaps/via/keymap.c | 28 +++++++++++++++++++ 2 files changed, 30 insertions(+) diff --git a/keyboards/primekb/prime_e/config.h b/keyboards/primekb/prime_e/config.h index c5647520381e..4a355efd72d0 100644 --- a/keyboards/primekb/prime_e/config.h +++ b/keyboards/primekb/prime_e/config.h @@ -50,3 +50,5 @@ along with this program. If not, see . #define LOCKING_SUPPORT_ENABLE /* Locking resynchronize hack */ #define LOCKING_RESYNC_ENABLE + +#define DYNAMIC_KEYMAP_LAYER_COUNT 8 diff --git a/keyboards/primekb/prime_e/keymaps/via/keymap.c b/keyboards/primekb/prime_e/keymaps/via/keymap.c index 5a09cb9694cc..46a310f3d65e 100644 --- a/keyboards/primekb/prime_e/keymaps/via/keymap.c +++ b/keyboards/primekb/prime_e/keymaps/via/keymap.c @@ -42,6 +42,34 @@ 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 + ), + + 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 + ), + + 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 + ), + + 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 + ), + + 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 ) }; From c2fd7f1b5b0999769db1f75e07c82f68fa861a06 Mon Sep 17 00:00:00 2001 From: Ryan Date: Tue, 2 Jun 2020 09:29:58 +1000 Subject: [PATCH 071/930] Fix error_log complaint about Elongate info.json (#9262) --- keyboards/acheron/elongate/info.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/keyboards/acheron/elongate/info.json b/keyboards/acheron/elongate/info.json index 9664638c5190..65e312259b1c 100644 --- a/keyboards/acheron/elongate/info.json +++ b/keyboards/acheron/elongate/info.json @@ -63,7 +63,7 @@ {"label":"Down", "x":11.25, "y":3.25}, {"label":"Right", "x":12.25, "y":3.25}, {"label":"0", "x":13.5, "y":3}, - {"label":".", "x":14.5, "y":3}, + {"label":".", "x":14.5, "y":3} ] } } From 0fee906e0938efc0eb9c6ccc3d2411fe932082c9 Mon Sep 17 00:00:00 2001 From: Fredrik Salomonsson Date: Mon, 1 Jun 2020 16:35:44 -0700 Subject: [PATCH 072/930] [Keymap] plattfot - Kyria layout (#9110) * [Keymap] plattfot - Kyria layout Keymap for programming, writing in both English and Swedish and easy navigate a tiling window manager. See README.md for more info * Fix letter case on the headline for the readme As suggested by fauxpark * Update keyboards/kyria/keymaps/plattfot/keymap.c Clean up double tap As suggested by fauxpark * Update led check for render_status As suggested by fauxpark * Update to use get_highest_layer for encoder_update_user As suggested by fauxpark * Missing an apostrophe in the header of the README.md Last minute change. * Removed explicit initialization for _DEFAULT As suggested by drashna * Use smaller image for the README.md As suggested by noroadsleft --- keyboards/kyria/keymaps/plattfot/README.md | 162 ++++++++ keyboards/kyria/keymaps/plattfot/config.h | 40 ++ keyboards/kyria/keymaps/plattfot/keymap.c | 437 +++++++++++++++++++++ keyboards/kyria/keymaps/plattfot/rules.mk | 5 + 4 files changed, 644 insertions(+) create mode 100644 keyboards/kyria/keymaps/plattfot/README.md create mode 100644 keyboards/kyria/keymaps/plattfot/config.h create mode 100644 keyboards/kyria/keymaps/plattfot/keymap.c create mode 100644 keyboards/kyria/keymaps/plattfot/rules.mk diff --git a/keyboards/kyria/keymaps/plattfot/README.md b/keyboards/kyria/keymaps/plattfot/README.md new file mode 100644 index 000000000000..b5b6ddaa2d0f --- /dev/null +++ b/keyboards/kyria/keymaps/plattfot/README.md @@ -0,0 +1,162 @@ +# plattfot's keymap for [Kyria](https://github.com/splitkb/kyria) + +![Keyboard](https://i.imgur.com/Pvsm973l.jpg) + +Designed to be ease of use when programming, typing in both English +and Swedish and navigating around in a tiling window manager, in my +case [sway](https://swaywm.org/). Uses the two rotary encoders (lower +left/right thumb row) as two palm buttons. + +This keymap avoids [Mod-tap](https://docs.qmk.fm/#/mod_tap) as they do +not work for me. [Kyria](https://github.com/splitkb/kyria) has enough +thumb keys to make it work without them. + + +# Base Layer: Default +``` + // ,-------------------------------------------. ,-------------------------------------------. + // | ` | Q | W | E | R | T | | Y | U | I | O | P | Å | + // |--------+------+------+------+------+------| |------+------+------+------+------+--------| + // | Tab | A | S | D | F | G | | H | J | K | L | ; : | ' " | + // |--------+------+------+------+------+------+-------------. ,-------------+------+------+------+------+------+--------| + // | LShift | Z | X | C | V | B | Lead | RAISE| | LOWER|DBLTAP| N | M | , < | . > | / ? | RShift | + // `----------------------+------+------+------+------+------| |------+------+------+------+------+----------------------' + // | MPlay| GUI | LCtrl| Space| LALT | | Enter|BSpace| NAV | LAlt |Worksp| + // | | | | | | | | | | |toggle| + // `----------------------------------' `----------------------------------' +``` + +Setup for typing in both English and Swedish (hence the Å in the top +right corner, which is just [ on an US layout). + +Modifiers are mostly on the left hand, to make it comfortable when +require keyboard and mouse. For example working in a DCC (Digital +Content Creation tool) like [Houdini](https://www.sidefx.com/) and +[Maya](https://www.autodesk.com/products/maya/overview). + +## Notable features on this layer + +Left rotary encoder +- Press: play/pause +- Rotate: Volume control + +Right rotary encoder +- Press: Call keybinding that toggles between two recent workspaces. + For [sway](https://swaywm.org/) that is `workspace + back_and_forth` +- Rotate: Page up/Page down. Used mouse scrolling at first. But + scrolling only works in the window where the mouse pointer + is. Which kind of defeated the purpose of having the scroll + on the keyboard, as I still needed to move my hand to the + mouse and then I could just use the scroll on the mouse. + +[Leader key](https://docs.qmk.fm/#/feature_leader_key) is mainly used +for jumping between workspaces. Otherwise I would need to use both +hands everytime I need to switch. With the leader key I can jump +between 1-5 with just the left hand. The right rotary encoder also +helps jumping back and forth between two workspaces by just pressing +down my right palm. + +The double tap key, which I based on a code snippet from a +[reddit post](https://www.reddit.com/r/olkb/comments/citkbx/double_key_press_modifier_qmkwould_work_like/ev9cue8). +When pressed, it will repeat the next key twice. Reason for this is +that I found it a bit awkward to hold down the lower key when I need +to type a symbol twice. Which happens a lot when programming or +running commands on the command line. Does not save me any key presses +but more comfortable to type double keys, for example `--` and `&&`. + +# Lower Layer: Symbols +``` + // + // ,-------------------------------------------. ,-------------------------------------------. + // | ~ | ! | @ | # | $ | % | | ^ | & | * | ( | ) | | + // |--------+------+------+------+------+------| |------+------+------+------+------+--------| + // | | | | _ | \ | - | + | | = | { | } | [ | ] | '' | + // |--------+------+------+------+------+------+-------------. ,-------------+------+------+------+------+------+--------| + // | | [] | {} | () | <> | | | | | | | | | < | > | ? | | + // `----------------------+------+------+------+------+------| |------+------+------+------+------+----------------------' + // | Mute | | | | | | | | | | | + // | | | | | | | | | | | | + // `----------------------------------' `----------------------------------' +``` + +Contains most of the symbols, only exceptions are those that are +already on the default US base layer i.e. quotes, punctuation and +forward slash. + +## Notable features on this layer + +Left rotary encoder +- Press: mute +- Rotate: Skip next/previous song + +The left letter bottom row contains macros to quickly type the +different types of brackets and move the cursor to be inside. For +example lower+c will type `()←`, where `←` is pressing the left arrow. +Same principle for the `''` macro. Really nice to have when +programming, and it is editor agnostic. + +# Raise Layer: Function keys +``` + // ,-------------------------------------------. ,-------------------------------------------. + // | | F1 | F2 | F3 | F4 | F5 | | F6 | F7 | F8 | F9 | F10 | | + // |--------+------+------+------+------+------| |------+------+------+------+------+--------| + // | | | | | | F11 | | F12 | | | | | | + // |--------+------+------+------+------+------+-------------. ,-------------+------+------+------+------+------+--------| + // | | | | | | |ScLock| | | | Ins | | | | | | | + // `----------------------+------+------+------+------+------| |------+------+------+------+------+----------------------' + // | | | | | | | Esc | Del | | RAlt | | + // | | | | | | | | | | | | + // `----------------------------------' `----------------------------------' +``` + +Access to the functional keys, which I mostly use to run `emacs` +compilation mode. + +Scroll Lock is used to toggle between English and Swedish. + +## Notable features on this layer + +Right rotary encoder +- Press: Right Alt, rarely use this, but it is needed for the Swedish + layout to type some symbols. But I find I mostly switch back + to the English layout if I need to type symbols. Might change + this in the future. +- Rotate: Moving between tabs in the browser, as described in this + [blog post](https://docs.splitkb.com/hc/en-us/articles/360010513760-How-can-I-use-a-rotary-encoder-). + +# Navigation Layer: Number keys, navigation +``` + // ,-------------------------------------------. ,-------------------------------------------. + // | | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | | + // |--------+------+------+------+------+------| |------+------+------+------+------+--------| + // | | | | | | | | | Left | Up | Down | Right| | + // |--------+------+------+------+------+------+-------------. ,-------------+------+------+------+------+------+--------| + // | | | | | | | | | | | | | | | | | | + // `----------------------+------+------+------+------+------| |------+------+------+------+------+----------------------' + // | | | | | | | | | | RCtrl| | + // | | | | | | | | | | | | + // `----------------------------------' `----------------------------------' +``` + +Access to the number as well as the arrow keys. Got use to the number +row after using [ErgoDox](https://www.ergodox.io/) keyboards for a few +years. Do not feel I need a numpad layer, which seems to be quite +common with small keyboards like this. + +# Adjust Layer: RGB +``` + // + // ,-------------------------------------------. ,-------------------------------------------. + // | | | | | | | | | | | | | | + // |--------+------+------+------+------+------| |------+------+------+------+------+--------| + // | | TOG | SAI | HUI | VAI | MOD | | | | | | | | + // |--------+------+------+------+------+------+-------------. ,-------------+------+------+------+------+------+--------| + // | | | SAD | HUD | VAD | RMOD | | | | | | | | | | | | + // `----------------------+------+------+------+------+------| |------+------+------+------+------+----------------------' + // | | | | | | | | | | | | + // | | | | | | | | | | | | + // `----------------------------------' `----------------------------------' +``` + +Right now it only contains adjustment to the underglow. diff --git a/keyboards/kyria/keymaps/plattfot/config.h b/keyboards/kyria/keymaps/plattfot/config.h new file mode 100644 index 000000000000..6e21c3ff5a8c --- /dev/null +++ b/keyboards/kyria/keymaps/plattfot/config.h @@ -0,0 +1,40 @@ +/* Copyright 2019 Thomas Baart + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#pragma once + +#ifdef OLED_DRIVER_ENABLE + #define OLED_DISPLAY_128X64 +#endif + +#ifdef RGBLIGHT_ENABLE + #define RGBLIGHT_ANIMATIONS + #define RGBLIGHT_HUE_STEP 8 + #define RGBLIGHT_SAT_STEP 8 + #define RGBLIGHT_VAL_STEP 8 +#endif + +#define ENCODER_DIRECTION_FLIP +// Fixing the skipping with the EC11K encoder +#define ENCODER_RESOLUTION 2 + +#define EE_HANDS + +// The Leader key allows to flexibly assign macros to key sequences. +#define LEADER_PER_KEY_TIMING +#define LEADER_TIMEOUT 350 + +#define TAPPING_TERM 200 diff --git a/keyboards/kyria/keymaps/plattfot/keymap.c b/keyboards/kyria/keymaps/plattfot/keymap.c new file mode 100644 index 000000000000..d897769898ba --- /dev/null +++ b/keyboards/kyria/keymaps/plattfot/keymap.c @@ -0,0 +1,437 @@ +/* Copyright 2020 Fredrik Salomonsson + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public 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 "version.h" + +enum custom_keycodes { + PLACEHOLDER = SAFE_RANGE, // can always be here + // Macros, where | is the cursor + M_LRBRC, // [|] + M_LRCBR, // {|} + M_LRPRN, // (|) + M_LRABR, // <|> + M_DQUOT, // '|' + // New keys + DBL_TAP, // Repeat next key +}; + +// Double Tap feature based on post from drashna +// https://www.reddit.com/r/olkb/comments/citkbx/double_key_press_modifier_qmkwould_work_like/ev9cue8/ +static bool double_tap_it = false; + +enum layers { + _DEFAULT, + _LOWER, + _RAISE, + _NAV, + _ADJUST, +}; + +// clang-format off +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +/* + * Base Layer: Default + * + * ,-------------------------------------------. ,-------------------------------------------. + * | ` | Q | W | E | R | T | | Y | U | I | O | P | Å | + * |--------+------+------+------+------+------| |------+------+------+------+------+--------| + * | Tab | A | S | D | F | G | | H | J | K | L | ; : | ' " | + * |--------+------+------+------+------+------+-------------. ,-------------+------+------+------+------+------+--------| + * | LShift | Z | X | C | V | B | Lead | RAISE| | LOWER|DBLTAP| N | M | , < | . > | / ? | RShift | + * `----------------------+------+------+------+------+------| |------+------+------+------+------+----------------------' + * | MPlay| GUI | LCtrl| Space| LALT | | Enter|BSpace| NAV | LAlt |Worksp| + * | | | | | | | | | | |toggle| + * `----------------------------------' `----------------------------------' + */ + [_DEFAULT] = LAYOUT( + 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_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_LEAD, OSL(_RAISE), OSL(_LOWER), DBL_TAP, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, + KC_MPLY, KC_LGUI, KC_LCTL, KC_SPACE, KC_LALT, KC_ENT, KC_BSPC, MO(_NAV), LCTL(KC_LALT), LGUI(KC_B) + ), + +/* + * Lower Layer: Symbols + * + * ,-------------------------------------------. ,-------------------------------------------. + * | ~ | ! | @ | # | $ | % | | ^ | & | * | ( | ) | | + * |--------+------+------+------+------+------| |------+------+------+------+------+--------| + * | | | | _ | \ | - | + | | = | { | } | [ | ] | '' | + * |--------+------+------+------+------+------+-------------. ,-------------+------+------+------+------+------+--------| + * | | [] | {} | () | <> | | | | | | | | | < | > | ? | | + * `----------------------+------+------+------+------+------| |------+------+------+------+------+----------------------' + * | Mute | | | | | | | | | | | + * | | | | | | | | | | | | + * `----------------------------------' `----------------------------------' + */ + [_LOWER] = LAYOUT( + KC_TILDE,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_BSLS, KC_MINS, KC_PLUS, KC_EQUAL,KC_LCBR, KC_RCBR, KC_LBRC, KC_RBRC, M_DQUOT, + _______, M_LRBRC, M_LRCBR, M_LRPRN, M_LRABR, _______, _______, _______, _______, _______, _______, _______, KC_LT, KC_GT, KC_QUES, _______, + KC_MUTE, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), +/* + * Raise Layer: Function keys + * + * ,-------------------------------------------. ,-------------------------------------------. + * | | F1 | F2 | F3 | F4 | F5 | | F6 | F7 | F8 | F9 | F10 | | + * |--------+------+------+------+------+------| |------+------+------+------+------+--------| + * | | | | | | F11 | | F12 | | | | | | + * |--------+------+------+------+------+------+-------------. ,-------------+------+------+------+------+------+--------| + * | | | | | | |ScLock| | | | Ins | | | | | | | + * `----------------------+------+------+------+------+------| |------+------+------+------+------+----------------------' + * | | | | | | | Esc | Del | | RAlt | | + * | | | | | | | | | | | | + * `----------------------------------' `----------------------------------' + */ + [_RAISE] = 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_SLCK, _______, _______, KC_INS, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, KC_ESC, KC_DEL, _______, KC_RALT, _______ + + ), +/* + * Navigation Layer: Number keys, navigation + * + * ,-------------------------------------------. ,-------------------------------------------. + * | | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | | + * |--------+------+------+------+------+------| |------+------+------+------+------+--------| + * | | | | | | | | | Left | Up | Down | Right| | + * |--------+------+------+------+------+------+-------------. ,-------------+------+------+------+------+------+--------| + * | | | | | | | | | | | | | | | | | | + * `----------------------+------+------+------+------+------| |------+------+------+------+------+----------------------' + * | | | | | | | | | | RCtrl| | + * | | | | | | | | | | | | + * `----------------------------------' `----------------------------------' + */ + [_NAV] = LAYOUT( + _______, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, _______, + _______, _______, _______, _______, _______, _______, _______, KC_LEFT, KC_UP, KC_DOWN, KC_RGHT, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, KC_RCTL, _______ + ), +/* + * Adjust Layer: RGB + * + * ,-------------------------------------------. ,-------------------------------------------. + * | | | | | | | | | | | | | | + * |--------+------+------+------+------+------| |------+------+------+------+------+--------| + * | | TOG | SAI | HUI | VAI | MOD | | | | | | | | + * |--------+------+------+------+------+------+-------------. ,-------------+------+------+------+------+------+--------| + * | | | SAD | HUD | VAD | RMOD | | | | | | | | | | | | + * `----------------------+------+------+------+------+------| |------+------+------+------+------+----------------------' + * | | | | | | | | | | | | + * | | | | | | | | | | | | + * `----------------------------------' `----------------------------------' + */ + [_ADJUST] = LAYOUT( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, RGB_TOG, RGB_SAI, RGB_HUI, RGB_VAI, RGB_MOD, _______, _______, _______, _______, _______, _______, + _______, _______, RGB_SAD, RGB_HUD, RGB_VAD, RGB_RMOD,_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), +// /* +// * Layer template +// * +// * ,-------------------------------------------. ,-------------------------------------------. +// * | | | | | | | | | | | | | | +// * |--------+------+------+------+------+------| |------+------+------+------+------+--------| +// * | | | | | | | | | | | | | | +// * |--------+------+------+------+------+------+-------------. ,-------------+------+------+------+------+------+--------| +// * | | | | | | | | | | | | | | | | | | +// * `----------------------+------+------+------+------+------| |------+------+------+------+------+----------------------' +// * | | | | | | | | | | | | +// * | | | | | | | | | | | | +// * `----------------------------------' `----------------------------------' +// */ +// [_LAYERINDEX] = LAYOUT( +// _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, +// _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, +// _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, +// _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ +// ), +}; +// clang-format on + +/* void keyboard_post_init_user(void) { */ +/* rgblight_setrgb(51, 135, 204); */ +/* } */ +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + if (record->event.pressed) { + switch (keycode) { + case M_LRPRN: + // Double tap gets messed up with macros, turning it off + double_tap_it = false; + SEND_STRING("()" SS_TAP(X_LEFT)); + clear_oneshot_layer_state(ONESHOT_OTHER_KEY_PRESSED); + return false; + case M_LRCBR: + double_tap_it = false; + SEND_STRING("{}" SS_TAP(X_LEFT)); + clear_oneshot_layer_state(ONESHOT_OTHER_KEY_PRESSED); + return false; + case M_LRBRC: + double_tap_it = false; + SEND_STRING("[]" SS_TAP(X_LEFT)); + clear_oneshot_layer_state(ONESHOT_OTHER_KEY_PRESSED); + return false; + case M_LRABR: + double_tap_it = false; + SEND_STRING("<>" SS_TAP(X_LEFT)); + clear_oneshot_layer_state(ONESHOT_OTHER_KEY_PRESSED); + return false; + case M_DQUOT: + double_tap_it = false; + SEND_STRING("''" SS_TAP(X_LEFT)); + clear_oneshot_layer_state(ONESHOT_OTHER_KEY_PRESSED); + return false; + case DBL_TAP: + double_tap_it = !double_tap_it; + return false; + case KC_LEAD: + double_tap_it = false; + return true; + } + } else if (double_tap_it && keycode != DBL_TAP) { + double_tap_it = false; + tap_code16(keycode); + clear_oneshot_layer_state(ONESHOT_OTHER_KEY_PRESSED); + } + + return true; +} + +layer_state_t layer_state_set_user(layer_state_t state) { return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST); } + +#ifdef OLED_DRIVER_ENABLE +oled_rotation_t oled_init_user(oled_rotation_t rotation) { return OLED_ROTATION_180; } + +// clang-format off +static void render_kyria_logo(void) { + static const char PROGMEM kyria_logo[] = { + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128,128,192,224,240,112,120, 56, 60, 28, 30, 14, 14, 14, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 14, 14, 14, 30, 28, 60, 56,120,112,240,224,192,128,128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0,192,224,240,124, 62, 31, 15, 7, 3, 1,128,192,224,240,120, 56, 60, 28, 30, 14, 14, 7, 7,135,231,127, 31,255,255, 31,127,231,135, 7, 7, 14, 14, 30, 28, 60, 56,120,240,224,192,128, 1, 3, 7, 15, 31, 62,124,240,224,192, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0,240,252,255, 31, 7, 1, 0, 0,192,240,252,254,255,247,243,177,176, 48, 48, 48, 48, 48, 48, 48,120,254,135, 1, 0, 0,255,255, 0, 0, 1,135,254,120, 48, 48, 48, 48, 48, 48, 48,176,177,243,247,255,254,252,240,192, 0, 0, 1, 7, 31,255,252,240, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0,255,255,255, 0, 0, 0, 0, 0,254,255,255, 1, 1, 7, 30,120,225,129,131,131,134,134,140,140,152,152,177,183,254,248,224,255,255,224,248,254,183,177,152,152,140,140,134,134,131,131,129,225,120, 30, 7, 1, 1,255,255,254, 0, 0, 0, 0, 0,255,255,255, 0, 0, 0, 0,255,255, 0, 0,192,192, 48, 48, 0, 0,240,240, 0, 0, 0, 0, 0, 0,240,240, 0, 0,240,240,192,192, 48, 48, 48, 48,192,192, 0, 0, 48, 48,243,243, 0, 0, 0, 0, 0, 0, 48, 48, 48, 48, 48, 48,192,192, 0, 0, 0, 0, 0, + 0, 0, 0,255,255,255, 0, 0, 0, 0, 0,127,255,255,128,128,224,120, 30,135,129,193,193, 97, 97, 49, 49, 25, 25,141,237,127, 31, 7,255,255, 7, 31,127,237,141, 25, 25, 49, 49, 97, 97,193,193,129,135, 30,120,224,128,128,255,255,127, 0, 0, 0, 0, 0,255,255,255, 0, 0, 0, 0, 63, 63, 3, 3, 12, 12, 48, 48, 0, 0, 0, 0, 51, 51, 51, 51, 51, 51, 15, 15, 0, 0, 63, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 48, 48, 63, 63, 48, 48, 0, 0, 12, 12, 51, 51, 51, 51, 51, 51, 63, 63, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 15, 63,255,248,224,128, 0, 0, 3, 15, 63,127,255,239,207,141, 13, 12, 12, 12, 12, 12, 12, 12, 30,127,225,128, 0, 0,255,255, 0, 0,128,225,127, 30, 12, 12, 12, 12, 12, 12, 12, 13,141,207,239,255,127, 63, 15, 3, 0, 0,128,224,248,255, 63, 15, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 3, 7, 15, 62,124,248,240,224,192,128, 1, 3, 7, 15, 30, 28, 60, 56,120,112,112,224,224,225,231,254,248,255,255,248,254,231,225,224,224,112,112,120, 56, 60, 28, 30, 15, 7, 3, 1,128,192,224,240,248,124, 62, 15, 7, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 3, 7, 15, 14, 30, 28, 60, 56,120,112,112,112,224,224,224,224,224,224,224,224,224,224,224,224,224,224,224,224,112,112,112,120, 56, 60, 28, 30, 14, 15, 7, 3, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 + }; + oled_write_raw_P(kyria_logo, sizeof(kyria_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); +} +// clang-format on + +static void render_status(void) { + // QMK Logo and version information + render_qmk_logo(); + oled_write_P(PSTR("Kyria rev1.0\n"), false); + oled_write_P(PSTR("v" QMK_VERSION "\n"), false); + + // Host Keyboard Layer Status + oled_write_P(PSTR("Layer: "), false); + switch (get_highest_layer(layer_state)) { + case _DEFAULT: + oled_write_P(PSTR("plattfot\n"), false); + break; + case _LOWER: + oled_write_P(PSTR("symbols\n"), false); + break; + case _RAISE: + oled_write_P(PSTR("function keys\n"), false); + break; + case _NAV: + oled_write_P(PSTR("numbers/navi\n"), false); + break; + case _ADJUST: + oled_write_P(PSTR("adjust\n"), false); + break; + default: + oled_write_P(PSTR("undefined\n"), false); + } + + // Host Keyboard LED Status and Double tap + led_t led_state = host_keyboard_led_state(); + if (led_state.num_lock) { + oled_write_P(PSTR("NUMLCK "), false); + } else if (double_tap_it) { + oled_write_P(PSTR("Double "), false); + } else { + oled_write_P(PSTR(" "), false); + } + + if (led_state.caps_lock) { + oled_write_P(PSTR("CAPLCK "), false); + } else if (double_tap_it) { + oled_write_P(PSTR("Tap "), false); + } else { + oled_write_P(PSTR(" "), false); + } + + oled_write_P(led_state.scroll_lock ? PSTR("SCRLCK ") : PSTR(" "), false); +} + +void oled_task_user(void) { + if (is_keyboard_master()) { + render_status(); // Renders the current keyboard state (layer, lock, caps, scroll, etc) + } else { + render_kyria_logo(); + } +} +#endif + +#ifdef ENCODER_ENABLE +void encoder_update_user(uint8_t index, bool clockwise) { + if (index == 0) { + switch (get_highest_layer(layer_state)) { + case _LOWER: + // Skip/Prev song + if (clockwise) { + tap_code(KC_MNXT); + clear_oneshot_layer_state(ONESHOT_OTHER_KEY_PRESSED); + } else { + tap_code(KC_MPRV); + clear_oneshot_layer_state(ONESHOT_OTHER_KEY_PRESSED); + } + break; + default: + // Volume control + if (clockwise) { + tap_code(KC_VOLU); + clear_oneshot_layer_state(ONESHOT_OTHER_KEY_PRESSED); + } else { + tap_code(KC_VOLD); + clear_oneshot_layer_state(ONESHOT_OTHER_KEY_PRESSED); + } + break; + } + } else if (index == 1) { + switch (get_highest_layer(layer_state)) { + case _RAISE: + // Credit to Thomas Baart for this + // See https://docs.splitkb.com/hc/en-us/articles/360010513760-How-can-I-use-a-rotary-encoder- + if (clockwise) { + tap_code16(C(KC_TAB)); + clear_oneshot_layer_state(ONESHOT_OTHER_KEY_PRESSED); + } else { + tap_code16(S(C(KC_TAB))); + clear_oneshot_layer_state(ONESHOT_OTHER_KEY_PRESSED); + } + break; + default: + // Scrolling + if (clockwise) { + tap_code(KC_PGDN); + clear_oneshot_layer_state(ONESHOT_OTHER_KEY_PRESSED); + } else { + tap_code(KC_PGUP); + clear_oneshot_layer_state(ONESHOT_OTHER_KEY_PRESSED); + } + break; + } + } +} +#endif + +LEADER_EXTERNS(); + +void matrix_scan_user(void) { + LEADER_DICTIONARY() { + leading = false; + leader_end(); + // Sway navigation + SEQ_ONE_KEY(KC_Q) { // Jump to workspace 1 + SEND_STRING(SS_LGUI("1")); + } + SEQ_ONE_KEY(KC_W) { // Jump to workspace 2 + SEND_STRING(SS_LGUI("2")); + } + SEQ_ONE_KEY(KC_E) { // Jump to workspace 3 + SEND_STRING(SS_LGUI("3")); + } + SEQ_ONE_KEY(KC_R) { // Jump to workspace 4 + SEND_STRING(SS_LGUI("4")); + } + SEQ_ONE_KEY(KC_T) { // Jump to workspace 5 + SEND_STRING(SS_LGUI("5")); + } + + SEQ_ONE_KEY(KC_Y) { // Jump to workspace 6 + SEND_STRING(SS_LGUI("6")); + } + SEQ_ONE_KEY(KC_U) { // Jump to workspace 7 + SEND_STRING(SS_LGUI("7")); + } + SEQ_ONE_KEY(KC_I) { // Jump to workspace 8 + SEND_STRING(SS_LGUI("8")); + } + SEQ_ONE_KEY(KC_O) { // Jump to workspace 9 + SEND_STRING(SS_LGUI("9")); + } + SEQ_ONE_KEY(KC_P) { // Jump to workspace 0 + SEND_STRING(SS_LGUI("0")); + } + SEQ_ONE_KEY(KC_G) { // View scratch pad + SEND_STRING(SS_LGUI("-")); + } + + // Sway move window + SEQ_TWO_KEYS(KC_M, KC_Q) { // Move to workspace 1 + SEND_STRING(SS_LSFT(SS_LGUI("1"))); + } + SEQ_TWO_KEYS(KC_M, KC_W) { // Move to workspace 2 + SEND_STRING(SS_LSFT(SS_LGUI("2"))); + } + SEQ_TWO_KEYS(KC_M, KC_E) { // Move to workspace 3 + SEND_STRING(SS_LSFT(SS_LGUI("3"))); + } + SEQ_TWO_KEYS(KC_M, KC_R) { // Move to workspace 4 + SEND_STRING(SS_LSFT(SS_LGUI("4"))); + } + SEQ_TWO_KEYS(KC_M, KC_T) { // Move to workspace 5 + SEND_STRING(SS_LSFT(SS_LGUI("5"))); + } + + SEQ_TWO_KEYS(KC_M, KC_Y) { // Move to workspace 6 + SEND_STRING(SS_LSFT(SS_LGUI("6"))); + } + SEQ_TWO_KEYS(KC_M, KC_U) { // Move to workspace 7 + SEND_STRING(SS_LSFT(SS_LGUI("7"))); + } + SEQ_TWO_KEYS(KC_M, KC_I) { // Move to workspace 8 + SEND_STRING(SS_LSFT(SS_LGUI("8"))); + } + SEQ_TWO_KEYS(KC_M, KC_O) { // Move to workspace 9 + SEND_STRING(SS_LSFT(SS_LGUI("9"))); + } + SEQ_TWO_KEYS(KC_M, KC_P) { // Move to workspace 0 + SEND_STRING(SS_LSFT(SS_LGUI("0"))); + } + SEQ_TWO_KEYS(KC_M, KC_G) { // Move to scratch pad + SEND_STRING(SS_LSFT(SS_LGUI("-"))); + } + } +} diff --git a/keyboards/kyria/keymaps/plattfot/rules.mk b/keyboards/kyria/keymaps/plattfot/rules.mk new file mode 100644 index 000000000000..412546d09a59 --- /dev/null +++ b/keyboards/kyria/keymaps/plattfot/rules.mk @@ -0,0 +1,5 @@ +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 +LEADER_ENABLE = yes # Enable the Leader Key feature +MOUSEKEY_ENABLE = no # Disable mouse, need to save space. From 563d5919b32c99b10e63754c4e5dab0c69a7c5e1 Mon Sep 17 00:00:00 2001 From: Joshua Diamond Date: Mon, 1 Jun 2020 20:12:08 -0400 Subject: [PATCH 073/930] Fix layer mask size for RGBLIGHT_LAYER_BLINK (#9260) --- quantum/rgblight.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/quantum/rgblight.c b/quantum/rgblight.c index 949dd79fe78c..d33484ccfdf2 100644 --- a/quantum/rgblight.c +++ b/quantum/rgblight.c @@ -672,9 +672,9 @@ static void rgblight_layers_write(void) { } # ifdef RGBLIGHT_LAYER_BLINK -uint8_t _blinked_layer_mask = 0; -uint16_t _blink_duration = 0; -static uint16_t _blink_timer; +rgblight_layer_mask_t _blinked_layer_mask = 0; +uint16_t _blink_duration = 0; +static uint16_t _blink_timer; void rgblight_blink_layer(uint8_t layer, uint16_t duration_ms) { rgblight_set_layer_state(layer, true); From aab5c44c7d94ace79337ae60b9185b820c390f00 Mon Sep 17 00:00:00 2001 From: mechlovin <57231893+mechlovin@users.noreply.github.com> Date: Tue, 2 Jun 2020 07:19:56 +0700 Subject: [PATCH 074/930] Infinity CE PCB: Update rules.mk (#9235) * Update rules.mk Actice NKRO function --- keyboards/mechlovin/infinityce/rules.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/keyboards/mechlovin/infinityce/rules.mk b/keyboards/mechlovin/infinityce/rules.mk index 8e8807c5e9b3..199f3316ccc9 100644 --- a/keyboards/mechlovin/infinityce/rules.mk +++ b/keyboards/mechlovin/infinityce/rules.mk @@ -22,7 +22,7 @@ COMMAND_ENABLE = no # Commands for debug and configuration # 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 +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 From 14eccef7bf433558ef9fbadc89dc35035f20cce0 Mon Sep 17 00:00:00 2001 From: goranzarkovic Date: Mon, 1 Jun 2020 19:23:25 -0500 Subject: [PATCH 075/930] Fixing the PRODUCT_ID to match the liminal.json on VIA repo (#9232) --- keyboards/the_royal/liminal/config.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/keyboards/the_royal/liminal/config.h b/keyboards/the_royal/liminal/config.h index 09b8d501dc6a..45cb48c4e972 100644 --- a/keyboards/the_royal/liminal/config.h +++ b/keyboards/the_royal/liminal/config.h @@ -4,7 +4,7 @@ /* USB Device descriptor parameter */ #define VENDOR_ID 0x4B4B -#define PRODUCT_ID 0x0002 +#define PRODUCT_ID 0x0003 #define DEVICE_VER 0x0001 #define MANUFACTURER TheRoyalSweatshirt #define PRODUCT Liminal From b8ddfd34ec2fbefefe54346056f56706a35a7a6d Mon Sep 17 00:00:00 2001 From: umi <57262844+umi-umi@users.noreply.github.com> Date: Tue, 2 Jun 2020 09:28:41 +0900 Subject: [PATCH 076/930] [Docs] Japanese translation of docs/feature_mouse_keys.md (#8992) * add feature_mouse_keys.md translation * update based on comment * update based on comment * update based on comment * update based on comment * update based on comment --- docs/ja/feature_mouse_keys.md | 127 ++++++++++++++++++++++++++++++++++ 1 file changed, 127 insertions(+) create mode 100644 docs/ja/feature_mouse_keys.md diff --git a/docs/ja/feature_mouse_keys.md b/docs/ja/feature_mouse_keys.md new file mode 100644 index 000000000000..43ca8bb08b2b --- /dev/null +++ b/docs/ja/feature_mouse_keys.md @@ -0,0 +1,127 @@ +# マウスキー + + + +マウスキーは、キーボードを使ってマウスをエミュレートできる機能です。様々な速度でポインタを移動し、5つのボタンを押し、8方向にスクロールすることができます。 + +## キーボードにマウスキーを追加 + +マウスキーを使うためには、少なくともマウスキーサポートを有効にし、マウスアクションをキーボードのキーにマップする必要があります。 + +### マウスキーを有効にする + +マウスキーを有効にするには、キーマップの `rules.mk` に以下の行を追加します: + +```c +MOUSEKEY_ENABLE = yes +``` + +### マウスアクションのマッピング + +キーマップでキー押下をマウスアクションにマップするために、以下のキーコードを使うことができます: + +| キー | エイリアス | 説明 | +|----------------|---------|-----------------| +| `KC_MS_UP` | `KC_MS_U` | カーソルを上に移動 | +| `KC_MS_DOWN` | `KC_MS_D` | カーソルを下に移動 | +| `KC_MS_LEFT` | `KC_MS_L` | カーソルを左に移動 | +| `KC_MS_RIGHT` | `KC_MS_R` | カーソルを右に移動 | +| `KC_MS_BTN1` | `KC_BTN1` | ボタン1を押す | +| `KC_MS_BTN2` | `KC_BTN2` | ボタン2を押す | +| `KC_MS_BTN3` | `KC_BTN3` | ボタン3を押す | +| `KC_MS_BTN4` | `KC_BTN4` | ボタン4を押す | +| `KC_MS_BTN5` | `KC_BTN5` | ボタン5を押す | +| `KC_MS_WH_UP` | `KC_WH_U` | ホイールを向こう側に回転 | +| `KC_MS_WH_DOWN` | `KC_WH_D` | ホイールを手前側に回転 | +| `KC_MS_WH_LEFT` | `KC_WH_L` | ホイールを左に倒す | +| `KC_MS_WH_RIGHT` | `KC_WH_R` | ホイールを右に倒す | +| `KC_MS_ACCEL0` | `KC_ACL0` | 速度を0に設定 | +| `KC_MS_ACCEL1` | `KC_ACL1` | 速度を1に設定 | +| `KC_MS_ACCEL2` | `KC_ACL2` | 速度を2に設定 | + +## マウスキーの設定 + +マウスキーはカーソルを移動するための2つの異なるモードをサポートします: + +* **加速 (デフォルト):** 移動キーを押したままにすると、カーソルが最大速度に達するまでカーソルを加速します。 +* **定速:** 移動キーを押したままにすると、カーソルを一定の速度で移動します。 + +同じ原則がスクロールにも適用されます。 + +時間、間隔、遅延の設定オプションは、ミリ秒で指定されます。スクロール速度はデフォルトスクロールステップの倍数として渡されます。例えば、スクロール速度8は、各スクロールアクションがオペレーティングシステムまたはアプリケーションで定義されるデフォルトのスクロールステップの8倍の距離進むことを意味します。 + +### 加速モード + +これはデフォルトのモードです。キーマップの `config.h` ファイルの以下の設定を使ってカーソルとスクロールの加速を調整することができます: + +| 定義 | デフォルト | 説明 | +|----------------------------|-------|---------------------------------------------------------| +| `MOUSEKEY_DELAY` | 300 | 移動キーを押してからカーソルが移動するまでの遅延 | +| `MOUSEKEY_INTERVAL` | 50 | カーソル移動間の時間 | +| `MOUSEKEY_MAX_SPEED` | 10 | 加速が停止する最大のカーソル速度 | +| `MOUSEKEY_TIME_TO_MAX` | 20 | 最大カーソル速度に達するまでの時間 | +| `MOUSEKEY_WHEEL_DELAY` | 300 | ホイールキーを押してからホイールが動くまでの遅延 | +| `MOUSEKEY_WHEEL_INTERVAL` | 100 | ホイールの動きの間の時間 | +| `MOUSEKEY_WHEEL_MAX_SPEED` | 8 | スクロールアクションごとのスクロールステップの最大数 | +| `MOUSEKEY_WHEEL_TIME_TO_MAX` | 40 | 最大スクロール速度に達するまでの時間 | + +ヒント: + +* `MOUSEKEY_DELAY` の設定が低すぎるとカーソルが応答しなくなります。設定が高すぎると小さな動きが難しくなります。 +* カーソルの動きをスムーズにするには、`MOUSEKEY_INTERVAL` の値を低くします。ディスプレイのリフレッシュレートが60Hzの場合、`16` (1/60) に設定することができます。これによりカーソルの速度が大幅に向上するため、`MOUSEKEY_MAX_SPEED` を下げた方が良いかもしれません。 +* `MOUSEKEY_TIME_TO_MAX` または `MOUSEKEY_WHEEL_TIME_TO_MAX` を `0` に設定すると、それぞれカーソルの速度またはスクロールの加速が無効になります。この方法では、一方を加速しながら他方を一定にすることができますが、これは定速モードでは不可能です。 +* `MOUSEKEY_WHEEL_INTERVAL` の設定が低すぎるとスクロールがとても速くなります。設定が高すぎるとホイールキーを押したままにした時にスクロールがとても遅くなります + +カーソルの加速は、X Window System MouseKeysAccel 機能と同じアルゴリズムを使います。詳細については [Wikipedia](https://en.wikipedia.org/wiki/Mouse_keys) をご覧ください。 + +### 定速モード + +このモードでは、カーソルおよびマウスホイールの両方について複数の異なる速度を定義することができます。加速はありません。`KC_ACL0`、`KC_ACL1` および `KC_ACL2` は、カーソルとスクロールの速度をそれぞれの設定に変更します。 + +速度の選択は、一時的とタップ選択のどちらかを選べます: + +* **一時的:** 選択された速度は、それぞれのキーを押している間のみアクティブになります。キーを放すと、マウスキーは変更される前の速度に戻ります。 +* **タップ選択:** それぞれのキーを押すと選択された速度がアクティブになり、キーを放した後もアクティブのままになります。デフォルトの速度は `KC_ACL1` です。未変更の速度はありません。 + +最も遅い速度から最も速い速度までのデフォルトの速度は以下の通りです: + +* **一時的:** `KC_ACL0` < `KC_ACL1` < *変更無し* < `KC_ACL2` +* **タップ選択:** `KC_ACL0` < `KC_ACL1` < `KC_ACL2` + +定速モードを使うには、少なくともキーマップの keymaps ディレクトリの `config.h` ファイルに `MK_3_SPEED` を定義する必要があります。 + +```c +#define MK_3_SPEED +``` + +一時的モードを有効にするには、`MK_MOMENTARY_ACCEL` も定義します: + +```c +#define MK_MOMENTARY_ACCEL +``` + +カーソル移動あるいはスクロールを調整する場合は、以下の設定を使います: + +| 定義 | デフォルト | 説明 | +|---------------------|-------------|-------------------------------------------| +| `MK_3_SPEED` | *定義なし* | 定速カーソルを有効にする | +| `MK_MOMENTARY_ACCEL` | *定義なし* | 一時的モードを有効にする | +| `MK_C_OFFSET_UNMOD` | 16 | 移動ごとのカーソルオフセット (変更無し) | +| `MK_C_INTERVAL_UNMOD` | 16 | カーソルの移動間の時間 (変更無し) | +| `MK_C_OFFSET_0` | 1 | 移動ごとのカーソルオフセット (`KC_ACL0`) | +| `MK_C_INTERVAL_0` | 32 | カーソル移動間の時間 (`KC_ACL0`) | +| `MK_C_OFFSET_1` | 4 | 移動ごとのカーソルオフセット (`KC_ACL1`) | +| `MK_C_INTERVAL_1` | 16 | カーソル移動間の時間 (`KC_ACL1`) | +| `MK_C_OFFSET_2` | 32 | 移動ごとのカーソルオフセット (`KC_ACL2`) | +| `MK_C_INTERVAL_2` | 16 | カーソル移動間の時間 (`KC_ACL2`) | +| `MK_W_OFFSET_UNMOD` | 1 | スクロールアクションごとのスクロールステップ (変更無し) | +| `MK_W_INTERVAL_UNMOD` | 40 | スクロールステップ間の時間 (変更無し) | +| `MK_W_OFFSET_0` | 1 | スクロールアクションごとのスクロールステップ (`KC_ACL0`) | +| `MK_W_INTERVAL_0` | 360 | スクロールステップ間の時間 (`KC_ACL0`) | +| `MK_W_OFFSET_1` | 1 | スクロールアクションごとのスクロールステップ (`KC_ACL1`) | +| `MK_W_INTERVAL_1` | 120 | スクロールステップ間の時間 (`KC_ACL1`) | +| `MK_W_OFFSET_2` | 1 | スクロールアクションごとのスクロールステップ (`KC_ACL2`) | +| `MK_W_INTERVAL_2` | 20 | スクロールステップ間の時間 (`KC_ACL2`) | From 306d02aa9328630ca97a8b8863286986dba85603 Mon Sep 17 00:00:00 2001 From: mechlovin <57231893+mechlovin@users.noreply.github.com> Date: Tue, 2 Jun 2020 07:31:14 +0700 Subject: [PATCH 077/930] Adelais: Fix indicator LED pinout (#9241) * Fix indicator LED pinout Fix indicator LED pinout, active some function --- keyboards/mechlovin/adelais/adelais.c | 2 +- keyboards/mechlovin/adelais/rules.mk | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/keyboards/mechlovin/adelais/adelais.c b/keyboards/mechlovin/adelais/adelais.c index c4676007efec..87f0caf09177 100644 --- a/keyboards/mechlovin/adelais/adelais.c +++ b/keyboards/mechlovin/adelais/adelais.c @@ -62,7 +62,7 @@ bool led_update_kb(led_t led_state) { if(led_update_user(led_state)) { writePin(B2, led_state.caps_lock); writePin(B9, led_state.scroll_lock); - writePin(C12, led_state.num_lock); + writePin(C15, led_state.num_lock); } return true; diff --git a/keyboards/mechlovin/adelais/rules.mk b/keyboards/mechlovin/adelais/rules.mk index 4681ac316322..91f87e5f39cd 100644 --- a/keyboards/mechlovin/adelais/rules.mk +++ b/keyboards/mechlovin/adelais/rules.mk @@ -8,12 +8,12 @@ MCU = STM32F303 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 = 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 +NKRO_ENABLE = yes # USB Nkey Rollover MIDI_ENABLE = no # MIDI support BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 From c73125eea7b482724635a2ac2e1c006a8fddfdad Mon Sep 17 00:00:00 2001 From: Ryan Date: Tue, 2 Jun 2020 18:53:38 +1000 Subject: [PATCH 078/930] Void Linux: Switch to cross-arm-none-eabi toolchain (#9228) --- util/linux_install.sh | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/util/linux_install.sh b/util/linux_install.sh index d30f7865582d..43044f85cb33 100755 --- a/util/linux_install.sh +++ b/util/linux_install.sh @@ -208,19 +208,13 @@ elif grep ID /etc/os-release | grep -q solus; then printf "\n$SOLUS_INFO\n" elif grep ID /etc/os-release | grep -q void; then - # musl Void systems don't have glibc cross compilers avaliable in their repos. - # glibc Void systems do have musl cross compilers though, for some reason. - # So, default to musl, and switch to glibc if it is installed. - CROSS_ARM=cross-arm-linux-musleabi - if xbps-query glibc > /dev/null; then # Check is glibc if installed - CROSS_ARM=cross-arm-linux-gnueabi - fi - sudo xbps-install \ avr-binutils \ avr-gcc \ avr-libc \ - $CROSS_ARM \ + cross-arm-none-eabi-binutils \ + cross-arm-none-eabi-gcc \ + cross-arm-none-eabi-newlib \ avrdude \ dfu-programmer \ dfu-util \ From 0def9ed528ff52b3d641bea236766323ecf6c65d Mon Sep 17 00:00:00 2001 From: jotix <47826561+jotix@users.noreply.github.com> Date: Tue, 2 Jun 2020 08:51:24 -0300 Subject: [PATCH 079/930] jotix ortho_4x12 layout (#9209) Co-authored-by: Ryan --- layouts/community/ortho_4x12/jotix/keymap.c | 32 ++++++++++----------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/layouts/community/ortho_4x12/jotix/keymap.c b/layouts/community/ortho_4x12/jotix/keymap.c index 600772288eed..09543090d25d 100644 --- a/layouts/community/ortho_4x12/jotix/keymap.c +++ b/layouts/community/ortho_4x12/jotix/keymap.c @@ -8,7 +8,7 @@ enum layers { #define LOWER MO(_LOWER) #define RAISE MO(_RAISE) -#define SHRAISE LM(_RAISE, MOD_LSFT) +#define TGLOWER TG(_LOWER) static bool is_ctl_pressed; static bool is_esc_pressed; @@ -18,45 +18,45 @@ 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_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_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_SLSH, + 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,KC_RALT,LOWER, KC_SPC, KC_SPC, RAISE, SHRAISE,KC_LEFT,KC_DOWN,KC_RGHT + KC_LCTL,KC_LGUI,KC_LALT,KC_RALT,LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT,KC_DOWN,KC_UP, KC_RGHT // └───────┴───────┴───────┴───────┴───────┴───────┴───────┴───────┴───────┴───────┴───────┴───────┘ ), [_LOWER] = LAYOUT_ortho_4x12 ( // ┌───────┬───────┬───────┬───────┬───────┬───────┬───────┬───────┬───────┬───────┬───────┬───────┐ - _______,KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10,_______, + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, _______, // ├───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┤ - _______,KC_F11, KC_F12, KC_INS, KC_HOME,KC_PGUP,_______,_______,_______,_______,_______,_______, + _______,KC_MINS,KC_EQL, KC_LBRC,KC_RBRC,KC_BSLS,KC_VOLU,KC_PSCR,KC_SLCK,KC_PAUS,_______,_______, // ├───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┤ - _______,_______,_______,KC_DEL, KC_END, KC_PGDN,_______,_______,_______,KC_BTN1,KC_MS_U,KC_BTN2, + _______,KC_UNDS,KC_PLUS,KC_LCBR,KC_RCBR,KC_PIPE,KC_VOLD,KC_MUTE,_______,_______,_______,_______, // ├───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┤ - _______,_______,_______,_______,_______,_______,_______,_______,_______,KC_MS_L,KC_MS_D,KC_MS_R + _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______ // └───────┴───────┴───────┴───────┴───────┴───────┴───────┴───────┴───────┴───────┴───────┴───────┘ ), [_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_TILD,KC_EXLM,KC_AT, KC_HASH,KC_DLR, KC_PERC,KC_CIRC,KC_AMPR,KC_ASTR,KC_LPRN,KC_RPRN,KC_DEL, // ├───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┤ - KC_CAPS,_______,_______,_______,_______,_______,KC_LBRC,KC_RBRC,KC_BSLS,KC_QUOT,_______,_______, + KC_CAPS,KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS,KC_EQL, KC_LBRC,KC_RBRC,KC_BSLS, // ├───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┤ - _______,_______,_______,_______,_______,_______,KC_MINS,KC_EQL, _______,_______,KC_VOLU,_______, + _______,KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_UNDS,KC_PLUS,KC_LCBR,KC_RCBR,KC_PIPE, // ├───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┤ - _______,_______,_______,_______,_______,_______,_______,_______,_______,KC_BSPC,KC_VOLD,KC_MUTE + _______,_______,_______,_______,TGLOWER,_______,_______,_______,KC_HOME,KC_PGDN,KC_PGUP,KC_END // └───────┴───────┴───────┴───────┴───────┴───────┴───────┴───────┴───────┴───────┴───────┴───────┘ ), }; -uint32_t layer_state_set_user(uint32_t state) { +layer_state_t layer_state_set_user(layer_state_t state) { #ifdef JOTANCK_LEDS - writePin(JOTANCK_LED2, (get_highest_layer(state) == _RAISE)); + writePin(JOTANCK_LED1, (get_highest_layer(state) == _LOWER)); #endif return state; } @@ -70,7 +70,7 @@ bool led_update_user(led_t led_state) { #ifdef JOTANCK_LEDS // CapsLock led - writePin(JOTANCK_LED1, led_state.caps_lock); + writePin(JOTANCK_LED2, led_state.caps_lock); #endif return true; } From f1e09dd388a12536975d0eefeb9fee76b7c4b98c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Eduardo=20Louren=C3=A7o=20Pinto=20Neto?= Date: Tue, 2 Jun 2020 17:33:27 -0300 Subject: [PATCH 080/930] Update keymap.c (#9265) Add Insert on Fn+Del and fix TG to TO for layer switching --- keyboards/kbdfans/kbd75/keymaps/edulpn/keymap.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/keyboards/kbdfans/kbd75/keymaps/edulpn/keymap.c b/keyboards/kbdfans/kbd75/keymaps/edulpn/keymap.c index 7e715a767c8f..533d83fdbbd7 100644 --- a/keyboards/kbdfans/kbd75/keymaps/edulpn/keymap.c +++ b/keyboards/kbdfans/kbd75/keymaps/edulpn/keymap.c @@ -8,7 +8,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [WINDOWS_LAYER] = 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, TG(MAC_LAYER), KC_DEL, + 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, TO(MAC_LAYER), 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_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, @@ -17,7 +17,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), [WINDOWS_FN_LAYER] = LAYOUT( - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MPRV, KC_MPLY, KC_MNXT, 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_MPRV, KC_MPLY, KC_MNXT, KC_MUTE, KC_VOLD, KC_VOLU, KC_TRNS, KC_TRNS, KC_INS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, @@ -26,7 +26,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), [MAC_LAYER] = 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, TG(WINDOWS_LAYER), KC_DEL, + 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, TO(WINDOWS_LAYER), 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_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, @@ -35,7 +35,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), [MAC_FN_LAYER] = LAYOUT( - RESET, KC_BRID, KC_BRIU, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MRWD, KC_MPLY, KC_MFFD, KC__MUTE, KC__VOLDOWN, KC__VOLUP, KC_TRNS, KC_TRNS, KC_TRNS, + RESET, KC_BRID, KC_BRIU, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MRWD, KC_MPLY, KC_MFFD, KC__MUTE, KC__VOLDOWN, KC__VOLUP, KC_TRNS, KC_TRNS, KC_INS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, @@ -64,4 +64,3 @@ uint32_t layer_state_set_user(uint32_t state) { } return state; } - From eefc05e07849dec8587faba29f3708172d8c3218 Mon Sep 17 00:00:00 2001 From: Dan Hertz Date: Tue, 2 Jun 2020 13:38:56 -0700 Subject: [PATCH 081/930] Update canoe:dhertz to use new post-init functions (#9257) * Update to use new post-init functions * Update readme so I don't forget reset key again --- keyboards/percent/canoe/keymaps/dhertz/keymap.c | 2 +- keyboards/percent/canoe/readme.md | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/keyboards/percent/canoe/keymaps/dhertz/keymap.c b/keyboards/percent/canoe/keymaps/dhertz/keymap.c index bc8a4bca20f8..7e8170aefc29 100644 --- a/keyboards/percent/canoe/keymaps/dhertz/keymap.c +++ b/keyboards/percent/canoe/keymaps/dhertz/keymap.c @@ -44,7 +44,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), }; -void matrix_init_keymap(void) { +void keyboard_post_init_user(void) { rgblight_enable_noeeprom(); rgblight_sethsv_teal(); } diff --git a/keyboards/percent/canoe/readme.md b/keyboards/percent/canoe/readme.md index d8a496f26c81..a4a409393986 100644 --- a/keyboards/percent/canoe/readme.md +++ b/keyboards/percent/canoe/readme.md @@ -14,4 +14,6 @@ Flashing example for this keyboard ([after setting up the bootloadHID flashing e make percent/canoe:default:flash +Reset Key: Hold down the key located at K11, commonly programmed as Q 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). From 1110fe6c6f86a684ba098d9c87665887278b068a Mon Sep 17 00:00:00 2001 From: Drashna Jaelre Date: Tue, 2 Jun 2020 16:32:02 -0700 Subject: [PATCH 082/930] Move dip switch init to back of the init process (#9233) --- quantum/quantum.c | 3 --- tmk_core/common/keyboard.c | 7 +++++++ 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/quantum/quantum.c b/quantum/quantum.c index 2053a1a5f479..346ea4e03ae6 100644 --- a/quantum/quantum.c +++ b/quantum/quantum.c @@ -630,9 +630,6 @@ void matrix_init_quantum() { #ifdef OUTPUT_AUTO_ENABLE set_output(OUTPUT_AUTO); #endif -#ifdef DIP_SWITCH_ENABLE - dip_switch_init(); -#endif matrix_init_kb(); } diff --git a/tmk_core/common/keyboard.c b/tmk_core/common/keyboard.c index 53d08959e85b..e2110363a6d5 100644 --- a/tmk_core/common/keyboard.c +++ b/tmk_core/common/keyboard.c @@ -86,6 +86,9 @@ along with this program. If not, see . #ifdef VIA_ENABLE # include "via.h" #endif +#ifdef DIP_SWITCH_ENABLE +# include "dip_switch.h" +#endif // Only enable this if console is enabled to print to #if defined(DEBUG_MATRIX_SCAN_RATE) && defined(CONSOLE_ENABLE) @@ -269,6 +272,10 @@ void keyboard_init(void) { keymap_config.nkro = 1; eeconfig_update_keymap(keymap_config.raw); #endif +#ifdef DIP_SWITCH_ENABLE + dip_switch_init(); +#endif + keyboard_post_init_kb(); /* Always keep this last */ } From 517d607fa4292a03fb8a880a07d27cb14020ed1d Mon Sep 17 00:00:00 2001 From: Joel Challis Date: Wed, 3 Jun 2020 00:49:52 +0100 Subject: [PATCH 083/930] [Keyboard] Add zvecr/zv48 (#9227) * Add zv48 keyboard * tidy up rules * correct product name --- keyboards/zvecr/zv48/config.h | 186 +++++ keyboards/zvecr/zv48/f401/chconf.h | 714 ++++++++++++++++++ keyboards/zvecr/zv48/f401/halconf.h | 525 +++++++++++++ keyboards/zvecr/zv48/f401/mcuconf.h | 253 +++++++ keyboards/zvecr/zv48/f401/rules.mk | 27 + keyboards/zvecr/zv48/f411/chconf.h | 714 ++++++++++++++++++ keyboards/zvecr/zv48/f411/halconf.h | 525 +++++++++++++ keyboards/zvecr/zv48/f411/mcuconf.h | 253 +++++++ keyboards/zvecr/zv48/f411/rules.mk | 27 + keyboards/zvecr/zv48/info.json | 13 + keyboards/zvecr/zv48/keymaps/default/keymap.c | 91 +++ keyboards/zvecr/zv48/readme.md | 16 + keyboards/zvecr/zv48/rules.mk | 29 + keyboards/zvecr/zv48/zv48.c | 27 + keyboards/zvecr/zv48/zv48.h | 35 + 15 files changed, 3435 insertions(+) create mode 100644 keyboards/zvecr/zv48/config.h create mode 100644 keyboards/zvecr/zv48/f401/chconf.h create mode 100644 keyboards/zvecr/zv48/f401/halconf.h create mode 100644 keyboards/zvecr/zv48/f401/mcuconf.h create mode 100644 keyboards/zvecr/zv48/f401/rules.mk create mode 100644 keyboards/zvecr/zv48/f411/chconf.h create mode 100644 keyboards/zvecr/zv48/f411/halconf.h create mode 100644 keyboards/zvecr/zv48/f411/mcuconf.h create mode 100644 keyboards/zvecr/zv48/f411/rules.mk create mode 100644 keyboards/zvecr/zv48/info.json create mode 100644 keyboards/zvecr/zv48/keymaps/default/keymap.c create mode 100644 keyboards/zvecr/zv48/readme.md create mode 100644 keyboards/zvecr/zv48/rules.mk create mode 100644 keyboards/zvecr/zv48/zv48.c create mode 100644 keyboards/zvecr/zv48/zv48.h diff --git a/keyboards/zvecr/zv48/config.h b/keyboards/zvecr/zv48/config.h new file mode 100644 index 000000000000..226efe67550d --- /dev/null +++ b/keyboards/zvecr/zv48/config.h @@ -0,0 +1,186 @@ +/* Copyright 2020 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 0x5A56 +#define PRODUCT_ID 0x0048 +#define DEVICE_VER 0x0001 +#define MANUFACTURER zvecr +#define PRODUCT zv48 +#define DESCRIPTION ARM Split ortho_4x12 + +/* key matrix size */ +#define MATRIX_ROWS 8 // Rows are doubled-up +#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_COL_PINS { B15, B10, B0, A5, A4, A3 } +#define MATRIX_ROW_PINS { A10, A15, B3, B4 } +#define MATRIX_COL_PINS_RIGHT { B10, B15, A10, A15, B3, B4 } +#define MATRIX_ROW_PINS_RIGHT { B0, A5, A4, A3 } + +/* COL2ROW, ROW2COL*/ +#define DIODE_DIRECTION COL2ROW + +#define MATRIX_IO_DELAY 5 + +/* + * Split Keyboard specific options, make sure you have 'SPLIT_KEYBOARD = yes' in your rules.mk, and define SOFT_SERIAL_PIN. + */ +#define SPLIT_HAND_PIN B9 +#define SOFT_SERIAL_PIN B6 +//#define SELECT_SOFT_SERIAL_SPEED 0 +#define SERIAL_USART_SPEED 921600 + +#define ENCODERS_PAD_A { B5 } +#define ENCODERS_PAD_B { A2 } + +#define RGB_DI_PIN B1 +#define RGBLED_NUM 48 +#define RGBLED_SPLIT {24, 24} +#define RGBLIGHT_LIMIT_VAL 120 +#define RGBLIGHT_ANIMATIONS + +#define WS2812_PWM_DRIVER PWMD3 +#define WS2812_PWM_CHANNEL 4 +#define WS2812_PWM_PAL_MODE 2 +#define WS2812_DMA_STREAM STM32_DMA1_STREAM2 +#define WS2812_DMA_CHANNEL 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 + +/* + * 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 */ +#define NO_ACTION_MACRO +#define NO_ACTION_FUNCTION + +/* Bootmagic Lite key configuration */ +#define BOOTMAGIC_LITE_ROW 0 +#define BOOTMAGIC_LITE_COLUMN 0 +#define BOOTMAGIC_LITE_ROW_RIGHT 4 +#define BOOTMAGIC_LITE_COLUMN_RIGHT 0 diff --git a/keyboards/zvecr/zv48/f401/chconf.h b/keyboards/zvecr/zv48/f401/chconf.h new file mode 100644 index 000000000000..0b8b69b0e02c --- /dev/null +++ b/keyboards/zvecr/zv48/f401/chconf.h @@ -0,0 +1,714 @@ +/* + 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. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +/** + * @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. + * + * @addtogroup config + * @details Kernel related settings and hooks. + * @{ + */ + +#ifndef CHCONF_H +#define CHCONF_H + +#define _CHIBIOS_RT_CONF_ +#define _CHIBIOS_RT_CONF_VER_6_0_ + +/*===========================================================================*/ +/** + * @name System timers settings + * @{ + */ +/*===========================================================================*/ + +/** + * @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. + * @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. + */ +#if !defined(CH_CFG_ST_TIMEDELTA) +#define CH_CFG_ST_TIMEDELTA 2 +#endif + +/** @} */ + +/*===========================================================================*/ +/** + * @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. + */ +#if !defined(CH_CFG_TIME_QUANTUM) +#define CH_CFG_TIME_QUANTUM 0 +#endif + +/** + * @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. + */ +#if !defined(CH_CFG_MEMCORE_SIZE) +#define CH_CFG_MEMCORE_SIZE 0 +#endif + +/** + * @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. + */ +#if !defined(CH_CFG_NO_IDLE_THREAD) +#define CH_CFG_NO_IDLE_THREAD FALSE +#endif + +/** @} */ + +/*===========================================================================*/ +/** + * @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. + */ +#if !defined(CH_CFG_OPTIMIZE_SPEED) +#define CH_CFG_OPTIMIZE_SPEED TRUE +#endif + +/** @} */ + +/*===========================================================================*/ +/** + * @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. + */ +#if !defined(CH_CFG_USE_TM) +#define CH_CFG_USE_TM TRUE +#endif + +/** + * @brief Threads registry APIs. + * @details If enabled then the registry APIs are included in the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_REGISTRY) +#define CH_CFG_USE_REGISTRY TRUE +#endif + +/** + * @brief Threads synchronization APIs. + * @details If enabled then the @p chThdWait() function is included in + * the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_WAITEXIT) +#define CH_CFG_USE_WAITEXIT TRUE +#endif + +/** + * @brief Semaphores APIs. + * @details If enabled then the Semaphores APIs are included in the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_SEMAPHORES) +#define CH_CFG_USE_SEMAPHORES TRUE +#endif + +/** + * @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. + */ +#if !defined(CH_CFG_USE_SEMAPHORES_PRIORITY) +#define CH_CFG_USE_SEMAPHORES_PRIORITY FALSE +#endif + +/** + * @brief Mutexes APIs. + * @details If enabled then the mutexes APIs are included in the kernel. + * + * @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. + * @note Recursive mutexes are heavier and have an increased + * memory footprint. + * + * @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. + * @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. + */ +#if !defined(CH_CFG_USE_CONDVARS) +#define CH_CFG_USE_CONDVARS TRUE +#endif + +/** + * @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. + */ +#if !defined(CH_CFG_USE_CONDVARS_TIMEOUT) +#define CH_CFG_USE_CONDVARS_TIMEOUT TRUE +#endif + +/** + * @brief Events Flags APIs. + * @details If enabled then the event flags APIs are included in the kernel. + * + * @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. + * @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. + */ +#if !defined(CH_CFG_USE_EVENTS_TIMEOUT) +#define CH_CFG_USE_EVENTS_TIMEOUT TRUE +#endif + +/** + * @brief Synchronous Messages APIs. + * @details If enabled then the synchronous messages APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_MESSAGES) +#define CH_CFG_USE_MESSAGES TRUE +#endif + +/** + * @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. + */ +#if !defined(CH_CFG_USE_MESSAGES_PRIORITY) +#define CH_CFG_USE_MESSAGES_PRIORITY FALSE +#endif + +/** + * @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. + */ +#if !defined(CH_CFG_USE_MAILBOXES) +#define CH_CFG_USE_MAILBOXES TRUE +#endif + +/** + * @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. + */ +#if !defined(CH_CFG_USE_MEMCORE) +#define CH_CFG_USE_MEMCORE TRUE +#endif + +/** + * @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. + */ +#if !defined(CH_CFG_USE_HEAP) +#define CH_CFG_USE_HEAP TRUE +#endif + +/** + * @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. + */ +#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. + * @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. + */ +#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 + +/** @} */ + +/*===========================================================================*/ +/** + * @name Debug options + * @{ + */ +/*===========================================================================*/ + +/** + * @brief Debug option, kernel statistics. + * + * @note The default is @p FALSE. + */ +#if !defined(CH_DBG_STATISTICS) +#define CH_DBG_STATISTICS FALSE +#endif + +/** + * @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. + */ +#if !defined(CH_DBG_SYSTEM_STATE_CHECK) +#define CH_DBG_SYSTEM_STATE_CHECK FALSE +#endif + +/** + * @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. + */ +#if !defined(CH_DBG_ENABLE_CHECKS) +#define CH_DBG_ENABLE_CHECKS FALSE +#endif + +/** + * @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. + */ +#if !defined(CH_DBG_ENABLE_ASSERTS) +#define CH_DBG_ENABLE_ASSERTS FALSE +#endif + +/** + * @brief Debug option, trace buffer. + * @details If enabled then the trace buffer is activated. + * + * @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. + * @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. + */ +#if !defined(CH_DBG_ENABLE_STACK_CHECK) +#define CH_DBG_ENABLE_STACK_CHECK FALSE +#endif + +/** + * @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. + */ +#if !defined(CH_DBG_FILL_THREADS) +#define CH_DBG_FILL_THREADS FALSE +#endif + +/** + * @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. + */ +#if !defined(CH_DBG_THREADS_PROFILING) +#define CH_DBG_THREADS_PROFILING FALSE +#endif + +/** @} */ + +/*===========================================================================*/ +/** + * @name Kernel hooks + * @{ + */ +/*===========================================================================*/ + +/** + * @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. + */ +#define CH_CFG_THREAD_EXTRA_FIELDS \ + /* Add threads custom fields here.*/ + +/** + * @brief Threads initialization hook. + * @details User initialization code added to the @p _thread_init() function. + * + * @note It is invoked from within @p _thread_init() 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/zvecr/zv48/f401/halconf.h b/keyboards/zvecr/zv48/f401/halconf.h new file mode 100644 index 000000000000..1f8df5dbbd55 --- /dev/null +++ b/keyboards/zvecr/zv48/f401/halconf.h @@ -0,0 +1,525 @@ +/* + 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. + 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 + +#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 +#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 cryptographic subsystem. + */ +#if !defined(HAL_USE_CRY) || defined(__DOXYGEN__) +#define HAL_USE_CRY FALSE +#endif + +/** + * @brief Enables the DAC subsystem. + */ +#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 +#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 TRUE +#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 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 +#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 +#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 + +/** + * @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. */ +/*===========================================================================*/ + +/** + * @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 + +/** + * @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. */ +/*===========================================================================*/ + +/** + * @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 the zero-copy API. + */ +#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 + +/** + * @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. */ +/*===========================================================================*/ + +/** + * @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 16 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 256 bytes for both the transmission and receive + * buffers. + */ +#if !defined(SERIAL_USB_BUFFERS_SIZE) || defined(__DOXYGEN__) +#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 + +/*===========================================================================*/ +/* 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 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 +#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. */ +/*===========================================================================*/ + +/** + * @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 + +/*===========================================================================*/ +/* 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/zvecr/zv48/f401/mcuconf.h b/keyboards/zvecr/zv48/f401/mcuconf.h new file mode 100644 index 000000000000..c0c96bc13e6e --- /dev/null +++ b/keyboards/zvecr/zv48/f401/mcuconf.h @@ -0,0 +1,253 @@ +/* + 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. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#ifndef MCUCONF_H +#define MCUCONF_H + +/* + * STM32F4xx 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: + * 15...0 Lowest...Highest. + * + * DMA priorities: + * 0...3 Lowest...Highest. + */ + +#define STM32F4xx_MCUCONF + +/* + * HAL driver system settings. + */ +#define STM32_NO_INIT FALSE +#define STM32_HSI_ENABLED TRUE +#define STM32_LSI_ENABLED TRUE +#define STM32_HSE_ENABLED TRUE +#define STM32_LSE_ENABLED FALSE +#define STM32_CLOCK48_REQUIRED TRUE +#define STM32_SW STM32_SW_PLL +#define STM32_PLLSRC STM32_PLLSRC_HSE +#define STM32_PLLM_VALUE 25 +#define STM32_PLLN_VALUE 336 +#define STM32_PLLP_VALUE 4 +#define STM32_PLLQ_VALUE 7 +#define STM32_HPRE STM32_HPRE_DIV1 +#define STM32_PPRE1 STM32_PPRE1_DIV4 +#define STM32_PPRE2 STM32_PPRE2_DIV2 +#define STM32_RTCSEL STM32_RTCSEL_LSI +#define STM32_RTCPRE_VALUE 8 +#define STM32_MCO1SEL STM32_MCO1SEL_HSI +#define STM32_MCO1PRE STM32_MCO1PRE_DIV1 +#define STM32_MCO2SEL STM32_MCO2SEL_SYSCLK +#define STM32_MCO2PRE STM32_MCO2PRE_DIV5 +#define STM32_I2SSRC STM32_I2SSRC_CKIN +#define STM32_PLLI2SN_VALUE 192 +#define STM32_PLLI2SR_VALUE 5 +#define STM32_PVD_ENABLE FALSE +#define STM32_PLS STM32_PLS_LEV0 +#define STM32_BKPRAM_ENABLE FALSE + +/* + * 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 6 +#define STM32_IRQ_EXTI20_PRIORITY 6 +#define STM32_IRQ_EXTI21_PRIORITY 15 +#define STM32_IRQ_EXTI22_PRIORITY 15 + +/* + * ADC driver system settings. + */ +#define STM32_ADC_ADCPRE ADC_CCR_ADCPRE_DIV4 +#define STM32_ADC_USE_ADC1 FALSE +#define STM32_ADC_ADC1_DMA_STREAM STM32_DMA_STREAM_ID(2, 4) +#define STM32_ADC_ADC1_DMA_PRIORITY 2 +#define STM32_ADC_IRQ_PRIORITY 6 +#define STM32_ADC_ADC1_DMA_IRQ_PRIORITY 6 + +/* + * 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_TIM4 FALSE +#define STM32_GPT_USE_TIM5 FALSE +#define STM32_GPT_USE_TIM9 FALSE +#define STM32_GPT_USE_TIM11 FALSE +#define STM32_GPT_TIM1_IRQ_PRIORITY 7 +#define STM32_GPT_TIM2_IRQ_PRIORITY 7 +#define STM32_GPT_TIM3_IRQ_PRIORITY 7 +#define STM32_GPT_TIM4_IRQ_PRIORITY 7 +#define STM32_GPT_TIM5_IRQ_PRIORITY 7 +#define STM32_GPT_TIM9_IRQ_PRIORITY 7 +#define STM32_GPT_TIM11_IRQ_PRIORITY 7 + +/* + * I2C driver system settings. + */ +#define STM32_I2C_USE_I2C1 FALSE +#define STM32_I2C_USE_I2C2 FALSE +#define STM32_I2C_USE_I2C3 FALSE +#define STM32_I2C_BUSY_TIMEOUT 50 +#define STM32_I2C_I2C1_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 0) +#define STM32_I2C_I2C1_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 6) +#define STM32_I2C_I2C2_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 2) +#define STM32_I2C_I2C2_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 7) +#define STM32_I2C_I2C3_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 2) +#define STM32_I2C_I2C3_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 4) +#define STM32_I2C_I2C1_IRQ_PRIORITY 5 +#define STM32_I2C_I2C2_IRQ_PRIORITY 5 +#define STM32_I2C_I2C3_IRQ_PRIORITY 5 +#define STM32_I2C_I2C1_DMA_PRIORITY 3 +#define STM32_I2C_I2C2_DMA_PRIORITY 3 +#define STM32_I2C_I2C3_DMA_PRIORITY 3 +#define STM32_I2C_DMA_ERROR_HOOK(i2cp) osalSysHalt("DMA failure") + +/* + * I2S driver system settings. + */ +#define STM32_I2S_USE_SPI2 FALSE +#define STM32_I2S_USE_SPI3 FALSE +#define STM32_I2S_SPI2_IRQ_PRIORITY 10 +#define STM32_I2S_SPI3_IRQ_PRIORITY 10 +#define STM32_I2S_SPI2_DMA_PRIORITY 1 +#define STM32_I2S_SPI3_DMA_PRIORITY 1 +#define STM32_I2S_SPI2_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 3) +#define STM32_I2S_SPI2_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 4) +#define STM32_I2S_SPI3_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 0) +#define STM32_I2S_SPI3_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 7) +#define STM32_I2S_DMA_ERROR_HOOK(i2sp) 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_USE_TIM4 FALSE +#define STM32_ICU_USE_TIM5 FALSE +#define STM32_ICU_USE_TIM9 FALSE +#define STM32_ICU_TIM1_IRQ_PRIORITY 7 +#define STM32_ICU_TIM2_IRQ_PRIORITY 7 +#define STM32_ICU_TIM3_IRQ_PRIORITY 7 +#define STM32_ICU_TIM4_IRQ_PRIORITY 7 +#define STM32_ICU_TIM5_IRQ_PRIORITY 7 +#define STM32_ICU_TIM9_IRQ_PRIORITY 7 + +/* + * 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_USE_TIM4 FALSE +#define STM32_PWM_USE_TIM5 FALSE +#define STM32_PWM_USE_TIM9 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_TIM5_IRQ_PRIORITY 7 +#define STM32_PWM_TIM9_IRQ_PRIORITY 7 + +/* + * SERIAL driver system settings. + */ +#define STM32_SERIAL_USE_USART1 TRUE +#define STM32_SERIAL_USE_USART2 FALSE +#define STM32_SERIAL_USE_USART6 FALSE +#define STM32_SERIAL_USART1_PRIORITY 12 +#define STM32_SERIAL_USART2_PRIORITY 12 +#define STM32_SERIAL_USART6_PRIORITY 12 + +/* + * SPI driver system settings. + */ +#define STM32_SPI_USE_SPI1 FALSE +#define STM32_SPI_USE_SPI2 FALSE +#define STM32_SPI_USE_SPI3 FALSE +#define STM32_SPI_SPI1_RX_DMA_STREAM STM32_DMA_STREAM_ID(2, 0) +#define STM32_SPI_SPI1_TX_DMA_STREAM STM32_DMA_STREAM_ID(2, 3) +#define STM32_SPI_SPI2_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 3) +#define STM32_SPI_SPI2_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 4) +#define STM32_SPI_SPI3_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 0) +#define STM32_SPI_SPI3_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 7) +#define STM32_SPI_SPI1_DMA_PRIORITY 1 +#define STM32_SPI_SPI2_DMA_PRIORITY 1 +#define STM32_SPI_SPI3_DMA_PRIORITY 1 +#define STM32_SPI_SPI1_IRQ_PRIORITY 10 +#define STM32_SPI_SPI2_IRQ_PRIORITY 10 +#define STM32_SPI_SPI3_IRQ_PRIORITY 10 +#define STM32_SPI_DMA_ERROR_HOOK(spip) osalSysHalt("DMA failure") + +/* + * ST driver system settings. + */ +#define STM32_ST_IRQ_PRIORITY 8 +#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_USE_USART6 FALSE +#define STM32_UART_USART1_RX_DMA_STREAM STM32_DMA_STREAM_ID(2, 5) +#define STM32_UART_USART1_TX_DMA_STREAM STM32_DMA_STREAM_ID(2, 7) +#define STM32_UART_USART2_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 5) +#define STM32_UART_USART2_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 6) +#define STM32_UART_USART6_RX_DMA_STREAM STM32_DMA_STREAM_ID(2, 2) +#define STM32_UART_USART6_TX_DMA_STREAM STM32_DMA_STREAM_ID(2, 7) +#define STM32_UART_USART1_IRQ_PRIORITY 12 +#define STM32_UART_USART2_IRQ_PRIORITY 12 +#define STM32_UART_USART6_IRQ_PRIORITY 12 +#define STM32_UART_USART1_DMA_PRIORITY 0 +#define STM32_UART_USART2_DMA_PRIORITY 0 +#define STM32_UART_USART6_DMA_PRIORITY 0 +#define STM32_UART_DMA_ERROR_HOOK(uartp) osalSysHalt("DMA failure") + +/* + * USB driver system settings. + */ +#define STM32_USB_USE_OTG1 TRUE +#define STM32_USB_OTG1_IRQ_PRIORITY 14 +#define STM32_USB_OTG1_RX_FIFO_SIZE 512 +#define STM32_USB_OTG_THREAD_PRIO NORMALPRIO+1 +#define STM32_USB_OTG_THREAD_STACK_SIZE 128 +#define STM32_USB_OTGFIFO_FILL_BASEPRI 0 + +/* + * WDG driver system settings. + */ +#define STM32_WDG_USE_IWDG FALSE + +#endif /* MCUCONF_H */ diff --git a/keyboards/zvecr/zv48/f401/rules.mk b/keyboards/zvecr/zv48/f401/rules.mk new file mode 100644 index 000000000000..e41d5ef7a2ea --- /dev/null +++ b/keyboards/zvecr/zv48/f401/rules.mk @@ -0,0 +1,27 @@ +## chip/board settings +# the next two should match the directories in +# /os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES) +MCU_FAMILY = STM32 +MCU_SERIES = STM32F4xx +# linker script to use +# it should exist either in /os/common/ports/ARMCMx/compilers/GCC/ld/ +# or /ld/ +MCU_LDSCRIPT = STM32F401xC +# startup code to use +# is should exist in /os/common/ports/ARMCMx/compilers/GCC/mk/ +MCU_STARTUP = stm32f4xx +# it should exist either in /os/hal/boards/ +# or /boards +BOARD = BLACKPILL_STM32_F401 +# 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 +ARMV = 7 +USE_FPU = yes +# Address of the booloader in system memory +STM32_BOOTLOADER_ADDRESS = 0x1FFF0000 + +# 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 diff --git a/keyboards/zvecr/zv48/f411/chconf.h b/keyboards/zvecr/zv48/f411/chconf.h new file mode 100644 index 000000000000..0b8b69b0e02c --- /dev/null +++ b/keyboards/zvecr/zv48/f411/chconf.h @@ -0,0 +1,714 @@ +/* + 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. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +/** + * @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. + * + * @addtogroup config + * @details Kernel related settings and hooks. + * @{ + */ + +#ifndef CHCONF_H +#define CHCONF_H + +#define _CHIBIOS_RT_CONF_ +#define _CHIBIOS_RT_CONF_VER_6_0_ + +/*===========================================================================*/ +/** + * @name System timers settings + * @{ + */ +/*===========================================================================*/ + +/** + * @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. + * @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. + */ +#if !defined(CH_CFG_ST_TIMEDELTA) +#define CH_CFG_ST_TIMEDELTA 2 +#endif + +/** @} */ + +/*===========================================================================*/ +/** + * @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. + */ +#if !defined(CH_CFG_TIME_QUANTUM) +#define CH_CFG_TIME_QUANTUM 0 +#endif + +/** + * @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. + */ +#if !defined(CH_CFG_MEMCORE_SIZE) +#define CH_CFG_MEMCORE_SIZE 0 +#endif + +/** + * @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. + */ +#if !defined(CH_CFG_NO_IDLE_THREAD) +#define CH_CFG_NO_IDLE_THREAD FALSE +#endif + +/** @} */ + +/*===========================================================================*/ +/** + * @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. + */ +#if !defined(CH_CFG_OPTIMIZE_SPEED) +#define CH_CFG_OPTIMIZE_SPEED TRUE +#endif + +/** @} */ + +/*===========================================================================*/ +/** + * @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. + */ +#if !defined(CH_CFG_USE_TM) +#define CH_CFG_USE_TM TRUE +#endif + +/** + * @brief Threads registry APIs. + * @details If enabled then the registry APIs are included in the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_REGISTRY) +#define CH_CFG_USE_REGISTRY TRUE +#endif + +/** + * @brief Threads synchronization APIs. + * @details If enabled then the @p chThdWait() function is included in + * the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_WAITEXIT) +#define CH_CFG_USE_WAITEXIT TRUE +#endif + +/** + * @brief Semaphores APIs. + * @details If enabled then the Semaphores APIs are included in the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_SEMAPHORES) +#define CH_CFG_USE_SEMAPHORES TRUE +#endif + +/** + * @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. + */ +#if !defined(CH_CFG_USE_SEMAPHORES_PRIORITY) +#define CH_CFG_USE_SEMAPHORES_PRIORITY FALSE +#endif + +/** + * @brief Mutexes APIs. + * @details If enabled then the mutexes APIs are included in the kernel. + * + * @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. + * @note Recursive mutexes are heavier and have an increased + * memory footprint. + * + * @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. + * @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. + */ +#if !defined(CH_CFG_USE_CONDVARS) +#define CH_CFG_USE_CONDVARS TRUE +#endif + +/** + * @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. + */ +#if !defined(CH_CFG_USE_CONDVARS_TIMEOUT) +#define CH_CFG_USE_CONDVARS_TIMEOUT TRUE +#endif + +/** + * @brief Events Flags APIs. + * @details If enabled then the event flags APIs are included in the kernel. + * + * @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. + * @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. + */ +#if !defined(CH_CFG_USE_EVENTS_TIMEOUT) +#define CH_CFG_USE_EVENTS_TIMEOUT TRUE +#endif + +/** + * @brief Synchronous Messages APIs. + * @details If enabled then the synchronous messages APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_MESSAGES) +#define CH_CFG_USE_MESSAGES TRUE +#endif + +/** + * @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. + */ +#if !defined(CH_CFG_USE_MESSAGES_PRIORITY) +#define CH_CFG_USE_MESSAGES_PRIORITY FALSE +#endif + +/** + * @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. + */ +#if !defined(CH_CFG_USE_MAILBOXES) +#define CH_CFG_USE_MAILBOXES TRUE +#endif + +/** + * @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. + */ +#if !defined(CH_CFG_USE_MEMCORE) +#define CH_CFG_USE_MEMCORE TRUE +#endif + +/** + * @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. + */ +#if !defined(CH_CFG_USE_HEAP) +#define CH_CFG_USE_HEAP TRUE +#endif + +/** + * @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. + */ +#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. + * @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. + */ +#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 + +/** @} */ + +/*===========================================================================*/ +/** + * @name Debug options + * @{ + */ +/*===========================================================================*/ + +/** + * @brief Debug option, kernel statistics. + * + * @note The default is @p FALSE. + */ +#if !defined(CH_DBG_STATISTICS) +#define CH_DBG_STATISTICS FALSE +#endif + +/** + * @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. + */ +#if !defined(CH_DBG_SYSTEM_STATE_CHECK) +#define CH_DBG_SYSTEM_STATE_CHECK FALSE +#endif + +/** + * @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. + */ +#if !defined(CH_DBG_ENABLE_CHECKS) +#define CH_DBG_ENABLE_CHECKS FALSE +#endif + +/** + * @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. + */ +#if !defined(CH_DBG_ENABLE_ASSERTS) +#define CH_DBG_ENABLE_ASSERTS FALSE +#endif + +/** + * @brief Debug option, trace buffer. + * @details If enabled then the trace buffer is activated. + * + * @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. + * @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. + */ +#if !defined(CH_DBG_ENABLE_STACK_CHECK) +#define CH_DBG_ENABLE_STACK_CHECK FALSE +#endif + +/** + * @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. + */ +#if !defined(CH_DBG_FILL_THREADS) +#define CH_DBG_FILL_THREADS FALSE +#endif + +/** + * @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. + */ +#if !defined(CH_DBG_THREADS_PROFILING) +#define CH_DBG_THREADS_PROFILING FALSE +#endif + +/** @} */ + +/*===========================================================================*/ +/** + * @name Kernel hooks + * @{ + */ +/*===========================================================================*/ + +/** + * @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. + */ +#define CH_CFG_THREAD_EXTRA_FIELDS \ + /* Add threads custom fields here.*/ + +/** + * @brief Threads initialization hook. + * @details User initialization code added to the @p _thread_init() function. + * + * @note It is invoked from within @p _thread_init() 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/zvecr/zv48/f411/halconf.h b/keyboards/zvecr/zv48/f411/halconf.h new file mode 100644 index 000000000000..1f8df5dbbd55 --- /dev/null +++ b/keyboards/zvecr/zv48/f411/halconf.h @@ -0,0 +1,525 @@ +/* + 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. + 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 + +#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 +#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 cryptographic subsystem. + */ +#if !defined(HAL_USE_CRY) || defined(__DOXYGEN__) +#define HAL_USE_CRY FALSE +#endif + +/** + * @brief Enables the DAC subsystem. + */ +#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 +#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 TRUE +#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 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 +#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 +#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 + +/** + * @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. */ +/*===========================================================================*/ + +/** + * @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 + +/** + * @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. */ +/*===========================================================================*/ + +/** + * @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 the zero-copy API. + */ +#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 + +/** + * @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. */ +/*===========================================================================*/ + +/** + * @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 16 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 256 bytes for both the transmission and receive + * buffers. + */ +#if !defined(SERIAL_USB_BUFFERS_SIZE) || defined(__DOXYGEN__) +#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 + +/*===========================================================================*/ +/* 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 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 +#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. */ +/*===========================================================================*/ + +/** + * @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 + +/*===========================================================================*/ +/* 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/zvecr/zv48/f411/mcuconf.h b/keyboards/zvecr/zv48/f411/mcuconf.h new file mode 100644 index 000000000000..f3a017731c4a --- /dev/null +++ b/keyboards/zvecr/zv48/f411/mcuconf.h @@ -0,0 +1,253 @@ +/* + 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. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#ifndef MCUCONF_H +#define MCUCONF_H + +/* + * STM32F4xx 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: + * 15...0 Lowest...Highest. + * + * DMA priorities: + * 0...3 Lowest...Highest. + */ + +#define STM32F4xx_MCUCONF + +/* + * HAL driver system settings. + */ +#define STM32_NO_INIT FALSE +#define STM32_HSI_ENABLED TRUE +#define STM32_LSI_ENABLED TRUE +#define STM32_HSE_ENABLED TRUE +#define STM32_LSE_ENABLED FALSE +#define STM32_CLOCK48_REQUIRED TRUE +#define STM32_SW STM32_SW_PLL +#define STM32_PLLSRC STM32_PLLSRC_HSE +#define STM32_PLLM_VALUE 25 +#define STM32_PLLN_VALUE 384 +#define STM32_PLLP_VALUE 4 +#define STM32_PLLQ_VALUE 8 +#define STM32_HPRE STM32_HPRE_DIV1 +#define STM32_PPRE1 STM32_PPRE1_DIV4 +#define STM32_PPRE2 STM32_PPRE2_DIV2 +#define STM32_RTCSEL STM32_RTCSEL_LSI +#define STM32_RTCPRE_VALUE 8 +#define STM32_MCO1SEL STM32_MCO1SEL_HSI +#define STM32_MCO1PRE STM32_MCO1PRE_DIV1 +#define STM32_MCO2SEL STM32_MCO2SEL_SYSCLK +#define STM32_MCO2PRE STM32_MCO2PRE_DIV5 +#define STM32_I2SSRC STM32_I2SSRC_CKIN +#define STM32_PLLI2SN_VALUE 192 +#define STM32_PLLI2SR_VALUE 5 +#define STM32_PVD_ENABLE FALSE +#define STM32_PLS STM32_PLS_LEV0 +#define STM32_BKPRAM_ENABLE FALSE + +/* + * 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 6 +#define STM32_IRQ_EXTI20_PRIORITY 6 +#define STM32_IRQ_EXTI21_PRIORITY 15 +#define STM32_IRQ_EXTI22_PRIORITY 15 + +/* + * ADC driver system settings. + */ +#define STM32_ADC_ADCPRE ADC_CCR_ADCPRE_DIV4 +#define STM32_ADC_USE_ADC1 FALSE +#define STM32_ADC_ADC1_DMA_STREAM STM32_DMA_STREAM_ID(2, 4) +#define STM32_ADC_ADC1_DMA_PRIORITY 2 +#define STM32_ADC_IRQ_PRIORITY 6 +#define STM32_ADC_ADC1_DMA_IRQ_PRIORITY 6 + +/* + * 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_TIM4 FALSE +#define STM32_GPT_USE_TIM5 FALSE +#define STM32_GPT_USE_TIM9 FALSE +#define STM32_GPT_USE_TIM11 FALSE +#define STM32_GPT_TIM1_IRQ_PRIORITY 7 +#define STM32_GPT_TIM2_IRQ_PRIORITY 7 +#define STM32_GPT_TIM3_IRQ_PRIORITY 7 +#define STM32_GPT_TIM4_IRQ_PRIORITY 7 +#define STM32_GPT_TIM5_IRQ_PRIORITY 7 +#define STM32_GPT_TIM9_IRQ_PRIORITY 7 +#define STM32_GPT_TIM11_IRQ_PRIORITY 7 + +/* + * I2C driver system settings. + */ +#define STM32_I2C_USE_I2C1 FALSE +#define STM32_I2C_USE_I2C2 FALSE +#define STM32_I2C_USE_I2C3 FALSE +#define STM32_I2C_BUSY_TIMEOUT 50 +#define STM32_I2C_I2C1_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 0) +#define STM32_I2C_I2C1_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 6) +#define STM32_I2C_I2C2_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 2) +#define STM32_I2C_I2C2_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 7) +#define STM32_I2C_I2C3_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 2) +#define STM32_I2C_I2C3_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 4) +#define STM32_I2C_I2C1_IRQ_PRIORITY 5 +#define STM32_I2C_I2C2_IRQ_PRIORITY 5 +#define STM32_I2C_I2C3_IRQ_PRIORITY 5 +#define STM32_I2C_I2C1_DMA_PRIORITY 3 +#define STM32_I2C_I2C2_DMA_PRIORITY 3 +#define STM32_I2C_I2C3_DMA_PRIORITY 3 +#define STM32_I2C_DMA_ERROR_HOOK(i2cp) osalSysHalt("DMA failure") + +/* + * I2S driver system settings. + */ +#define STM32_I2S_USE_SPI2 FALSE +#define STM32_I2S_USE_SPI3 FALSE +#define STM32_I2S_SPI2_IRQ_PRIORITY 10 +#define STM32_I2S_SPI3_IRQ_PRIORITY 10 +#define STM32_I2S_SPI2_DMA_PRIORITY 1 +#define STM32_I2S_SPI3_DMA_PRIORITY 1 +#define STM32_I2S_SPI2_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 3) +#define STM32_I2S_SPI2_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 4) +#define STM32_I2S_SPI3_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 0) +#define STM32_I2S_SPI3_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 7) +#define STM32_I2S_DMA_ERROR_HOOK(i2sp) 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_USE_TIM4 FALSE +#define STM32_ICU_USE_TIM5 FALSE +#define STM32_ICU_USE_TIM9 FALSE +#define STM32_ICU_TIM1_IRQ_PRIORITY 7 +#define STM32_ICU_TIM2_IRQ_PRIORITY 7 +#define STM32_ICU_TIM3_IRQ_PRIORITY 7 +#define STM32_ICU_TIM4_IRQ_PRIORITY 7 +#define STM32_ICU_TIM5_IRQ_PRIORITY 7 +#define STM32_ICU_TIM9_IRQ_PRIORITY 7 + +/* + * 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_USE_TIM4 FALSE +#define STM32_PWM_USE_TIM5 FALSE +#define STM32_PWM_USE_TIM9 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_TIM5_IRQ_PRIORITY 7 +#define STM32_PWM_TIM9_IRQ_PRIORITY 7 + +/* + * SERIAL driver system settings. + */ +#define STM32_SERIAL_USE_USART1 TRUE +#define STM32_SERIAL_USE_USART2 FALSE +#define STM32_SERIAL_USE_USART6 FALSE +#define STM32_SERIAL_USART1_PRIORITY 12 +#define STM32_SERIAL_USART2_PRIORITY 12 +#define STM32_SERIAL_USART6_PRIORITY 12 + +/* + * SPI driver system settings. + */ +#define STM32_SPI_USE_SPI1 FALSE +#define STM32_SPI_USE_SPI2 FALSE +#define STM32_SPI_USE_SPI3 FALSE +#define STM32_SPI_SPI1_RX_DMA_STREAM STM32_DMA_STREAM_ID(2, 0) +#define STM32_SPI_SPI1_TX_DMA_STREAM STM32_DMA_STREAM_ID(2, 3) +#define STM32_SPI_SPI2_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 3) +#define STM32_SPI_SPI2_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 4) +#define STM32_SPI_SPI3_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 0) +#define STM32_SPI_SPI3_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 7) +#define STM32_SPI_SPI1_DMA_PRIORITY 1 +#define STM32_SPI_SPI2_DMA_PRIORITY 1 +#define STM32_SPI_SPI3_DMA_PRIORITY 1 +#define STM32_SPI_SPI1_IRQ_PRIORITY 10 +#define STM32_SPI_SPI2_IRQ_PRIORITY 10 +#define STM32_SPI_SPI3_IRQ_PRIORITY 10 +#define STM32_SPI_DMA_ERROR_HOOK(spip) osalSysHalt("DMA failure") + +/* + * ST driver system settings. + */ +#define STM32_ST_IRQ_PRIORITY 8 +#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_USE_USART6 FALSE +#define STM32_UART_USART1_RX_DMA_STREAM STM32_DMA_STREAM_ID(2, 5) +#define STM32_UART_USART1_TX_DMA_STREAM STM32_DMA_STREAM_ID(2, 7) +#define STM32_UART_USART2_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 5) +#define STM32_UART_USART2_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 6) +#define STM32_UART_USART6_RX_DMA_STREAM STM32_DMA_STREAM_ID(2, 2) +#define STM32_UART_USART6_TX_DMA_STREAM STM32_DMA_STREAM_ID(2, 7) +#define STM32_UART_USART1_IRQ_PRIORITY 12 +#define STM32_UART_USART2_IRQ_PRIORITY 12 +#define STM32_UART_USART6_IRQ_PRIORITY 12 +#define STM32_UART_USART1_DMA_PRIORITY 0 +#define STM32_UART_USART2_DMA_PRIORITY 0 +#define STM32_UART_USART6_DMA_PRIORITY 0 +#define STM32_UART_DMA_ERROR_HOOK(uartp) osalSysHalt("DMA failure") + +/* + * USB driver system settings. + */ +#define STM32_USB_USE_OTG1 TRUE +#define STM32_USB_OTG1_IRQ_PRIORITY 14 +#define STM32_USB_OTG1_RX_FIFO_SIZE 512 +#define STM32_USB_OTG_THREAD_PRIO NORMALPRIO+1 +#define STM32_USB_OTG_THREAD_STACK_SIZE 128 +#define STM32_USB_OTGFIFO_FILL_BASEPRI 0 + +/* + * WDG driver system settings. + */ +#define STM32_WDG_USE_IWDG FALSE + +#endif /* MCUCONF_H */ diff --git a/keyboards/zvecr/zv48/f411/rules.mk b/keyboards/zvecr/zv48/f411/rules.mk new file mode 100644 index 000000000000..61add3aed53b --- /dev/null +++ b/keyboards/zvecr/zv48/f411/rules.mk @@ -0,0 +1,27 @@ +## chip/board settings +# the next two should match the directories in +# /os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES) +MCU_FAMILY = STM32 +MCU_SERIES = STM32F4xx +# linker script to use +# it should exist either in /os/common/ports/ARMCMx/compilers/GCC/ld/ +# or /ld/ +MCU_LDSCRIPT = STM32F411xE +# startup code to use +# is should exist in /os/common/ports/ARMCMx/compilers/GCC/mk/ +MCU_STARTUP = stm32f4xx +# it should exist either in /os/hal/boards/ +# or /boards +BOARD = BLACKPILL_STM32_F411 +# 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 +ARMV = 7 +USE_FPU = yes +# Address of the booloader in system memory +STM32_BOOTLOADER_ADDRESS = 0x1FFF0000 + +# 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 diff --git a/keyboards/zvecr/zv48/info.json b/keyboards/zvecr/zv48/info.json new file mode 100644 index 000000000000..b6a9c7693ce4 --- /dev/null +++ b/keyboards/zvecr/zv48/info.json @@ -0,0 +1,13 @@ +{ + "keyboard_name": "zv48", + "url": "", + "maintainer": "zvecr", + "width": 12, + "height": 4, + "layouts": { + "LAYOUT_ortho_4x12": { + "key_count": 48, + "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}] + } + } +} diff --git a/keyboards/zvecr/zv48/keymaps/default/keymap.c b/keyboards/zvecr/zv48/keymaps/default/keymap.c new file mode 100644 index 000000000000..f9428c3292da --- /dev/null +++ b/keyboards/zvecr/zv48/keymaps/default/keymap.c @@ -0,0 +1,91 @@ +#include QMK_KEYBOARD_H + +// Defines names for use in layer keycodes and the keymap +enum layer_names { + _QWERTY, + _LOWER, + _RAISE, + _ADJUST, +}; + +#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 | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Ctrl | GUI | Alt | App |Lower | Space |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, KC_ENT , + KC_LCTL, KC_LGUI, KC_LALT, KC_APP, 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| | | | |R Tog |R Mode|R Rev |R Grad| Reset| | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | | | | | |R HUI|R SAI|R VAI| | | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | | | | | |R HUD|R SAD|R VAD| | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | | + * `-----------------------------------------------------------------------------------' + */ +[_ADJUST] = LAYOUT_ortho_4x12( + _______, RESET, _______, _______, _______, _______, RGB_TOG, RGB_MOD, RGB_RMOD,RGB_M_G, RESET, _______, + _______, _______, _______, _______, _______, _______, RGB_HUI, RGB_SAI, RGB_VAI, _______, _______, _______, + _______, _______, _______, _______, _______, _______, RGB_HUD, RGB_SAD, RGB_VAD, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ +) + +}; + +layer_state_t layer_state_set_user(layer_state_t state) { + return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST); +} diff --git a/keyboards/zvecr/zv48/readme.md b/keyboards/zvecr/zv48/readme.md new file mode 100644 index 000000000000..88db2533a6d0 --- /dev/null +++ b/keyboards/zvecr/zv48/readme.md @@ -0,0 +1,16 @@ +# zv48 + +![zv48](https://i.imgur.com/ZJ9GfF6l.jpg) + +ARM Split ortho_4x12 mechanical keyboard. + +* Keyboard Maintainer: [zvecr](https://github.com/zvecr) +* Hardware Supported: f401/f411 blackpill +* Hardware Availability: [repo](https://github.com/zvecr/zv48) + +Make example for this keyboard (after setting up your build environment): + + make zvecr/zv48/f401:default + make zvecr/zv48/f411: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/zvecr/zv48/rules.mk b/keyboards/zvecr/zv48/rules.mk new file mode 100644 index 000000000000..41ec506e6cfc --- /dev/null +++ b/keyboards/zvecr/zv48/rules.mk @@ -0,0 +1,29 @@ +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +KEYBOARD_SHARED_EP = yes # Free up some extra endpoints - needed if console+mouse+extra +MOUSEKEY_ENABLE = yes # 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 +ENCODER_ENABLE = yes # Enable rotary encoder support +MIDI_ENABLE = no # MIDI support +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +AUDIO_ENABLE = no # Audio output +FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches + +SPLIT_KEYBOARD = yes +SERIAL_DRIVER = usart +WS2812_DRIVER = pwm +OPT_DEFS += -DSTM32_DMA_REQUIRED=TRUE + +DEFAULT_FOLDER = zvecr/zv48/f401 + +LAYOUTS = ortho_4x12 diff --git a/keyboards/zvecr/zv48/zv48.c b/keyboards/zvecr/zv48/zv48.c new file mode 100644 index 000000000000..3c3d1ab77793 --- /dev/null +++ b/keyboards/zvecr/zv48/zv48.c @@ -0,0 +1,27 @@ +/* Copyright 2020 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 . + */ +#include "zv48.h" + +void keyboard_pre_init_kb(void){ + // Workaround for reversible pcb/mcu + palSetLineMode(C13, PAL_MODE_INPUT_PULLUP); + palSetLineMode(C15, PAL_MODE_INPUT_PULLUP); + palSetLineMode(B7, PAL_MODE_OUTPUT_OPENDRAIN); + palSetLineMode(A0, PAL_MODE_OUTPUT_OPENDRAIN); + palSetLineMode(A1, PAL_MODE_OUTPUT_OPENDRAIN); + + keyboard_pre_init_user(); +} diff --git a/keyboards/zvecr/zv48/zv48.h b/keyboards/zvecr/zv48/zv48.h new file mode 100644 index 000000000000..27504492ef3d --- /dev/null +++ b/keyboards/zvecr/zv48/zv48.h @@ -0,0 +1,35 @@ +/* Copyright 2020 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 LAYOUT_ortho_4x12( \ + 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 \ + ) \ + { \ + { L00, L01, L02, L03, L04, L05 }, \ + { L10, L11, L12, L13, L14, L15 }, \ + { L20, L21, L22, L23, L24, L25 }, \ + { L30, L31, L32, L33, L34, L35 }, \ + { R05, R04, R03, R02, R01, R00 }, \ + { R15, R14, R13, R12, R11, R10 }, \ + { R25, R24, R23, R22, R21, R20 }, \ + { R35, R34, R33, R32, R31, R30 } \ + } From 81a2113cbd820151c1529bebd0bc71629d2de66e Mon Sep 17 00:00:00 2001 From: MechMerlin <30334081+mechmerlin@users.noreply.github.com> Date: Tue, 2 Jun 2020 17:07:18 -0700 Subject: [PATCH 084/930] VIA Support: Waldo 60 (#9151) * pick a sane VID * add the VIA Keymap * update copyright notice * Update keyboards/waldo/keymaps/via/keymap.c Co-authored-by: Ryan * Update keyboards/waldo/keymaps/via/keymap.c Co-authored-by: Ryan * Update keyboards/waldo/keymaps/via/keymap.c Co-authored-by: Ryan * Update keyboards/waldo/keymaps/via/keymap.c Co-authored-by: Ryan * Update keyboards/waldo/keymaps/via/readme.md Co-authored-by: James Young <18669334+noroadsleft@users.noreply.github.com> Co-authored-by: Ryan Co-authored-by: James Young <18669334+noroadsleft@users.noreply.github.com> --- keyboards/waldo/config.h | 2 +- keyboards/waldo/keymaps/via/keymap.c | 53 +++++++++++++++++++++++++++ keyboards/waldo/keymaps/via/readme.md | 1 + keyboards/waldo/keymaps/via/rules.mk | 2 + 4 files changed, 57 insertions(+), 1 deletion(-) create mode 100644 keyboards/waldo/keymaps/via/keymap.c create mode 100644 keyboards/waldo/keymaps/via/readme.md create mode 100644 keyboards/waldo/keymaps/via/rules.mk diff --git a/keyboards/waldo/config.h b/keyboards/waldo/config.h index c3272bf1dadd..1609eb2804d8 100644 --- a/keyboards/waldo/config.h +++ b/keyboards/waldo/config.h @@ -20,7 +20,7 @@ along with this program. If not, see . #include "config_common.h" /* USB Device descriptor parameter */ -#define VENDOR_ID 0xFEED +#define VENDOR_ID 0x4744 // GD for Greenwald Designs #define PRODUCT_ID 0x6060 #define DEVICE_VER 0x0001 #define MANUFACTURER Greenwald Designs diff --git a/keyboards/waldo/keymaps/via/keymap.c b/keyboards/waldo/keymaps/via/keymap.c new file mode 100644 index 000000000000..b7dfa5e4e276 --- /dev/null +++ b/keyboards/waldo/keymaps/via/keymap.c @@ -0,0 +1,53 @@ +/* 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_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( + 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, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 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_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 + ), + + [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/waldo/keymaps/via/readme.md b/keyboards/waldo/keymaps/via/readme.md new file mode 100644 index 000000000000..3b15345d6205 --- /dev/null +++ b/keyboards/waldo/keymaps/via/readme.md @@ -0,0 +1 @@ +# The Default VIA keymap for Waldo diff --git a/keyboards/waldo/keymaps/via/rules.mk b/keyboards/waldo/keymaps/via/rules.mk new file mode 100644 index 000000000000..36b7ba9cbc98 --- /dev/null +++ b/keyboards/waldo/keymaps/via/rules.mk @@ -0,0 +1,2 @@ +VIA_ENABLE = yes +LTO_ENABLE = yes From be73820f7bc4f03e3d095b694f31092187583ac7 Mon Sep 17 00:00:00 2001 From: MechMerlin <30334081+mechmerlin@users.noreply.github.com> Date: Tue, 2 Jun 2020 21:59:13 -0700 Subject: [PATCH 085/930] [Keyboard] New Keyboard: Duck TC-V3 (#8265) Co-Authored-By: Ryan Co-Authored-By: James Young <18669334+noroadsleft@users.noreply.github.com> Co-Authored-By: Drashna Jaelre Co-authored-by: Drashna Jaelre Co-authored-by: Joel Challis Co-authored-by: Ryan Co-authored-by: James Young <18669334+noroadsleft@users.noreply.github.com> --- keyboards/duck/readme.md | 3 +- keyboards/duck/tcv3/config.h | 45 +++ keyboards/duck/tcv3/indicator_leds.c | 123 ++++++++ keyboards/duck/tcv3/indicator_leds.h | 7 + keyboards/duck/tcv3/info.json | 16 ++ keyboards/duck/tcv3/keymaps/default/keymap.c | 37 +++ keyboards/duck/tcv3/keymaps/default/readme.md | 0 keyboards/duck/tcv3/keymaps/via/config.h | 1 + keyboards/duck/tcv3/keymaps/via/keymap.c | 42 +++ keyboards/duck/tcv3/keymaps/via/rules.mk | 2 + keyboards/duck/tcv3/matrix.c | 272 ++++++++++++++++++ keyboards/duck/tcv3/readme.md | 27 ++ keyboards/duck/tcv3/rules.mk | 36 +++ keyboards/duck/tcv3/tcv3.c | 134 +++++++++ keyboards/duck/tcv3/tcv3.h | 53 ++++ 15 files changed, 797 insertions(+), 1 deletion(-) create mode 100644 keyboards/duck/tcv3/config.h create mode 100644 keyboards/duck/tcv3/indicator_leds.c create mode 100644 keyboards/duck/tcv3/indicator_leds.h create mode 100644 keyboards/duck/tcv3/info.json create mode 100644 keyboards/duck/tcv3/keymaps/default/keymap.c create mode 100644 keyboards/duck/tcv3/keymaps/default/readme.md create mode 100644 keyboards/duck/tcv3/keymaps/via/config.h create mode 100644 keyboards/duck/tcv3/keymaps/via/keymap.c create mode 100644 keyboards/duck/tcv3/keymaps/via/rules.mk create mode 100644 keyboards/duck/tcv3/matrix.c create mode 100644 keyboards/duck/tcv3/readme.md create mode 100644 keyboards/duck/tcv3/rules.mk create mode 100644 keyboards/duck/tcv3/tcv3.c create mode 100644 keyboards/duck/tcv3/tcv3.h diff --git a/keyboards/duck/readme.md b/keyboards/duck/readme.md index 32076da7da4f..f5f6593b5b20 100644 --- a/keyboards/duck/readme.md +++ b/keyboards/duck/readme.md @@ -14,4 +14,5 @@ Lightsaver V3 Octagon V1 Octagon V2 Orion V3 -Viper V2 \ No newline at end of file +TC-V3 +Viper V2 diff --git a/keyboards/duck/tcv3/config.h b/keyboards/duck/tcv3/config.h new file mode 100644 index 000000000000..524b12b835fa --- /dev/null +++ b/keyboards/duck/tcv3/config.h @@ -0,0 +1,45 @@ +/* +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 + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0x444B // Duck ("DK") +#define PRODUCT_ID 0x5443 // TC-V3 ("TC") +#define DEVICE_VER 0x0001 +#define MANUFACTURER Duck +#define PRODUCT TC-V3 +#define DESCRIPTION Duck TC-V3 + +/* key matrix size */ +#define MATRIX_ROWS 6 +#define MATRIX_COLS 20 + +#define DIODE_DIRECTION COL2ROW + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCE 5 + +#define RGBLIGHT_ANIMATIONS +#define RGB_DI_PIN D6 +#define RGBLED_NUM 17 + +/* Set to top left most key */ +#define BOOTMAGIC_LITE_ROW 5 +#define BOOTMAGIC_LITE_COLUMN 10 diff --git a/keyboards/duck/tcv3/indicator_leds.c b/keyboards/duck/tcv3/indicator_leds.c new file mode 100644 index 000000000000..d7d641f9c2be --- /dev/null +++ b/keyboards/duck/tcv3/indicator_leds.c @@ -0,0 +1,123 @@ +/* +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 +#include +#include +#include +#include "indicator_leds.h" + +#define LED_T1H 900 +#define LED_T1L 600 +#define LED_T0H 400 +#define LED_T0L 900 + +void send_bit_d4(bool bitVal) { + if(bitVal) { + asm volatile ( + "sbi %[port], %[bit] \n\t" + ".rept %[onCycles] \n\t" + "nop \n\t" + ".endr \n\t" + "cbi %[port], %[bit] \n\t" + ".rept %[offCycles] \n\t" + "nop \n\t" + ".endr \n\t" + :: + [port] "I" (_SFR_IO_ADDR(PORTD)), + [bit] "I" (4), + [onCycles] "I" (NS_TO_CYCLES(LED_T1H) - 2), + [offCycles] "I" (NS_TO_CYCLES(LED_T1L) - 2)); + } else { + asm volatile ( + "sbi %[port], %[bit] \n\t" + ".rept %[onCycles] \n\t" + "nop \n\t" + ".endr \n\t" + "cbi %[port], %[bit] \n\t" + ".rept %[offCycles] \n\t" + "nop \n\t" + ".endr \n\t" + :: + [port] "I" (_SFR_IO_ADDR(PORTD)), + [bit] "I" (4), + [onCycles] "I" (NS_TO_CYCLES(LED_T0H) - 2), + [offCycles] "I" (NS_TO_CYCLES(LED_T0L) - 2)); + } +} + +void send_bit_d6(bool bitVal) +{ + if(bitVal) { + asm volatile ( + "sbi %[port], %[bit] \n\t" + ".rept %[onCycles] \n\t" + "nop \n\t" + ".endr \n\t" + "cbi %[port], %[bit] \n\t" + ".rept %[offCycles] \n\t" + "nop \n\t" + ".endr \n\t" + :: + [port] "I" (_SFR_IO_ADDR(PORTD)), + [bit] "I" (6), + [onCycles] "I" (NS_TO_CYCLES(LED_T1H) - 2), + [offCycles] "I" (NS_TO_CYCLES(LED_T1L) - 2)); + } else { + asm volatile ( + "sbi %[port], %[bit] \n\t" + ".rept %[onCycles] \n\t" + "nop \n\t" + ".endr \n\t" + "cbi %[port], %[bit] \n\t" + ".rept %[offCycles] \n\t" + "nop \n\t" + ".endr \n\t" + :: + [port] "I" (_SFR_IO_ADDR(PORTD)), + [bit] "I" (6), + [onCycles] "I" (NS_TO_CYCLES(LED_T0H) - 2), + [offCycles] "I" (NS_TO_CYCLES(LED_T0L) - 2)); + } +} + +void send_value(uint8_t byte, enum Device device) { + for(uint8_t b = 0; b < 8; b++) { + if(device == Device_STATUSLED) { + send_bit_d4(byte & 0b10000000); + } + if(device == Device_PCBRGB) { + send_bit_d6(byte & 0b10000000); + } + byte <<= 1; + } +} + +void send_color(uint8_t r, uint8_t g, uint8_t b, enum Device device) { + send_value(r, device); + send_value(g, device); + send_value(b, device); +} + +// Port from backlight_set_state +void indicator_leds_set(bool leds[8]) { + cli(); + send_color(leds[1] ? 255 : 0, leds[2] ? 255 : 0, leds[0] ? 255 : 0, Device_STATUSLED); + send_color(leds[4] ? 255 : 0, leds[3] ? 255 : 0, leds[5] ? 255 : 0, Device_STATUSLED); + leds[6] ? (PORTD &= ~0b10000000) : (PORTD |= 0b10000000); + sei(); + show(); +} diff --git a/keyboards/duck/tcv3/indicator_leds.h b/keyboards/duck/tcv3/indicator_leds.h new file mode 100644 index 000000000000..ad3ec54f52a9 --- /dev/null +++ b/keyboards/duck/tcv3/indicator_leds.h @@ -0,0 +1,7 @@ +#include "duck_led/duck_led.h" + +void indicator_leds_set(bool leds[8]); +void backlight_toggle_rgb(bool enabled); +void backlight_set_rgb(uint8_t cfg[17][3]); +void backlight_init_ports(void); +void send_color(uint8_t r, uint8_t g, uint8_t b, enum Device device); diff --git a/keyboards/duck/tcv3/info.json b/keyboards/duck/tcv3/info.json new file mode 100644 index 000000000000..e93c6b04f55a --- /dev/null +++ b/keyboards/duck/tcv3/info.json @@ -0,0 +1,16 @@ +{ + "keyboard_name": "TCV3", + "url": "", + "maintainer": "qmk", + "width": 19.5, + "height": 6.5, + "layouts": { + "LAYOUT_all": { + "layout": [{"x":0, "y":0}, {"x":1, "y":0}, {"x":2.25, "y":0}, {"x":4.25, "y":0}, {"x":5.25, "y":0}, {"x":6.25, "y":0}, {"x":7.25, "y":0}, {"x":8.75, "y":0}, {"x":9.75, "y":0}, {"x":10.75, "y":0}, {"x":11.75, "y":0}, {"x":13.25, "y":0}, {"x":14.25, "y":0}, {"x":15.25, "y":0}, {"x":16.25, "y":0}, {"x":17.5, "y":0}, {"x":18.5, "y":0}, {"x":0, "y":1.25}, {"x":1, "y":1.25}, {"x":2.25, "y":1.25}, {"x":3.25, "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.5, "y":1.25}, {"x":18.5, "y":1.25}, {"x":0, "y":2.25}, {"x":1, "y":2.25}, {"x":2.25, "y":2.25, "w":1.5}, {"x":3.75, "y":2.25}, {"x":4.75, "y":2.25}, {"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, "w":1.5}, {"x":17.5, "y":2.25}, {"x":18.5, "y":2.25}, {"x":0, "y":3.25}, {"x":1, "y":3.25}, {"x":2.25, "y":3.25, "w":1.75}, {"x":4, "y":3.25}, {"x":5, "y":3.25}, {"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, "w":1.25}, {"x":17.5, "y":3.25}, {"x":18.5, "y":3.25}, {"x":0, "y":4.25}, {"x":1, "y":4.25}, {"x":2.25, "y":4.25, "w":1.25}, {"x":3.5, "y":4.25}, {"x":4.5, "y":4.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, "w":1.75}, {"x":16.25, "y":4.25}, {"x":17.5, "y":4.5}, {"x":0, "y":5.25}, {"x":1, "y":5.25}, {"x":2.25, "y":5.25, "w":1.5}, {"x":3.75, "y":5.25}, {"x":4.75, "y":5.25, "w":1.5}, {"x":6.25, "y":5.25, "w":6}, {"x":12.25, "y":5.25, "w":1.5}, {"x":13.75, "y":5.25}, {"x":14.75, "y":5.25, "w":1.5}, {"x":16.5, "y":5.5}, {"x":17.5, "y":5.5}, {"x":18.5, "y":5.5}] + }, + + "LAYOUT": { + "layout": [{"x":0, "y":0}, {"x":1, "y":0}, {"x":2.25, "y":0}, {"x":4.25, "y":0}, {"x":5.25, "y":0}, {"x":6.25, "y":0}, {"x":7.25, "y":0}, {"x":8.75, "y":0}, {"x":9.75, "y":0}, {"x":10.75, "y":0}, {"x":11.75, "y":0}, {"x":13.25, "y":0}, {"x":14.25, "y":0}, {"x":15.25, "y":0}, {"x":16.25, "y":0}, {"x":17.5, "y":0}, {"x":18.5, "y":0}, {"x":0, "y":1.25}, {"x":1, "y":1.25}, {"x":2.25, "y":1.25}, {"x":3.25, "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, "w":2}, {"x":17.5, "y":1.25}, {"x":18.5, "y":1.25}, {"x":0, "y":2.25}, {"x":1, "y":2.25}, {"x":2.25, "y":2.25, "w":1.5}, {"x":3.75, "y":2.25}, {"x":4.75, "y":2.25}, {"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, "w":1.5}, {"x":17.5, "y":2.25}, {"x":18.5, "y":2.25}, {"x":0, "y":3.25}, {"x":1, "y":3.25}, {"x":2.25, "y":3.25, "w":1.75}, {"x":4, "y":3.25}, {"x":5, "y":3.25}, {"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, "w":2.25}, {"x":17.5, "y":3.25}, {"x":18.5, "y":3.25}, {"x":0, "y":4.25}, {"x":1, "y":4.25}, {"x":2.25, "y":4.25, "w":2.25}, {"x":4.5, "y":4.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, "w":2.75}, {"x":17.5, "y":4.5}, {"x":0, "y":5.25}, {"x":1, "y":5.25}, {"x":2.25, "y":5.25, "w":1.5}, {"x":3.75, "y":5.25}, {"x":4.75, "y":5.25, "w":1.5}, {"x":6.25, "y":5.25, "w":6}, {"x":12.25, "y":5.25, "w":1.5}, {"x":13.75, "y":5.25}, {"x":14.75, "y":5.25, "w":1.5}, {"x":16.5, "y":5.5}, {"x":17.5, "y":5.5}, {"x":18.5, "y":5.5}] + } + } +} diff --git a/keyboards/duck/tcv3/keymaps/default/keymap.c b/keyboards/duck/tcv3/keymaps/default/keymap.c new file mode 100644 index 000000000000..3f8e67954b14 --- /dev/null +++ b/keyboards/duck/tcv3/keymaps/default/keymap.c @@ -0,0 +1,37 @@ +/* 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 + +#define _BL 0 // Base Layer +#define _FL 1 // Fn Layer + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_BL] = LAYOUT(\ + KC_F1, KC_F2, 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_F3, KC_F4, 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_DEL, + KC_F5, KC_F6, KC_TAB, KC_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_END, + KC_F7, KC_F8, 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_PGDN, + KC_F9, KC_F10, 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_F11, KC_F12, KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, MO(_FL), KC_RGUI, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT), + + [_FL] = LAYOUT(\ + KC_TRNS, KC_TRNS, KC_TRNS, RGB_TOG, RGB_MOD, 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, 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, KC_TRNS, KC_TRNS, KC_TRNS), +}; \ No newline at end of file diff --git a/keyboards/duck/tcv3/keymaps/default/readme.md b/keyboards/duck/tcv3/keymaps/default/readme.md new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/keyboards/duck/tcv3/keymaps/via/config.h b/keyboards/duck/tcv3/keymaps/via/config.h new file mode 100644 index 000000000000..1f4e07e39f82 --- /dev/null +++ b/keyboards/duck/tcv3/keymaps/via/config.h @@ -0,0 +1 @@ +#define DYNAMIC_KEYMAP_LAYER_COUNT 3 \ No newline at end of file diff --git a/keyboards/duck/tcv3/keymaps/via/keymap.c b/keyboards/duck/tcv3/keymaps/via/keymap.c new file mode 100644 index 000000000000..ed82d0e12561 --- /dev/null +++ b/keyboards/duck/tcv3/keymaps/via/keymap.c @@ -0,0 +1,42 @@ +/* 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_F1, KC_F2, 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_F3, KC_F4, 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_DEL, + KC_F5, KC_F6, KC_TAB, KC_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_END, + KC_F7, KC_F8, 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_PGDN, + KC_F9, KC_F10, 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_F11, KC_F12, KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, MO(1), KC_RGUI, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT), + + [1] = LAYOUT(\ + KC_TRNS, KC_TRNS, KC_TRNS, RGB_TOG, RGB_MOD, 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, 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, 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, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + 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/duck/tcv3/keymaps/via/rules.mk b/keyboards/duck/tcv3/keymaps/via/rules.mk new file mode 100644 index 000000000000..36b7ba9cbc98 --- /dev/null +++ b/keyboards/duck/tcv3/keymaps/via/rules.mk @@ -0,0 +1,2 @@ +VIA_ENABLE = yes +LTO_ENABLE = yes diff --git a/keyboards/duck/tcv3/matrix.c b/keyboards/duck/tcv3/matrix.c new file mode 100644 index 000000000000..38bc5c882375 --- /dev/null +++ b/keyboards/duck/tcv3/matrix.c @@ -0,0 +1,272 @@ +/* +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 +#include +#include +#include "matrix.h" +#include "util.h" +#include "print.h" +#include "debug.h" +#include "debounce.h" +#include "wait.h" + +/* matrix state(1:on, 0:off) */ +static matrix_row_t matrix[MATRIX_ROWS]; +static matrix_row_t matrix_debouncing[MATRIX_ROWS]; + +static uint8_t read_rows(uint8_t col); +static void init_rows(void); +static void unselect_cols(void); +static void select_col(uint8_t col); + + +__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 backlight_init_ports(void) +{ + // DDRD |= 0b11010000; + // PORTD &= ~0b01010000; + // PORTD |= 0b10000000; + // DDRB |= 0b00011111; + // PORTB &= ~0b00001110; + // PORTB |= 0b00010001; + // DDRE |= 0b01000000; + // PORTE &= ~0b01000000; +} + +void matrix_init(void) { + backlight_init_ports(); + unselect_cols(); + init_rows(); + + for (uint8_t i=0; i < MATRIX_ROWS; i++) { + matrix[i] = 0; + matrix_debouncing[i] = 0; + } + + debounce_init(MATRIX_ROWS); + + matrix_init_quantum(); +} +uint8_t matrix_scan(void) { + bool changed = false; + + for (uint8_t col = 0; col < MATRIX_COLS; col++) { + select_col(col); + wait_us(30); + + uint8_t rows = read_rows(col); + + for (uint8_t row = 0; row < MATRIX_ROWS; row++) { + bool prev_bit = matrix_debouncing[row] & ((matrix_row_t)1< + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#include "tcv3.h" +#include "indicator_leds.h" + +enum BACKLIGHT_AREAS { + BACKLIGHT_ALPHA = 0b0000001, + BACKLIGHT_FROW = 0b0000010, + BACKLIGHT_MOD = 0b0000100, + BACKLIGHT_MACRO = 0b0001000, + BACKLIGHT_SWITCH = 0b0001111 +}; + +// uint8_t backlight_rgb_r = 255; +// uint8_t backlight_rgb_g = 0; +// uint8_t backlight_rgb_b = 0; +// uint8_t backlight_os_state = 0; +// uint32_t backlight_layer_state = 0; + +// void backlight_toggle_rgb(bool enabled) +// { +// if(enabled) { +// uint8_t rgb[17][3] = { +// {backlight_rgb_r, backlight_rgb_g, backlight_rgb_b}, +// {backlight_rgb_r, backlight_rgb_g, backlight_rgb_b}, +// {backlight_rgb_r, backlight_rgb_g, backlight_rgb_b}, +// {backlight_rgb_r, backlight_rgb_g, backlight_rgb_b}, +// {backlight_rgb_r, backlight_rgb_g, backlight_rgb_b}, +// {backlight_rgb_r, backlight_rgb_g, backlight_rgb_b}, +// {backlight_rgb_r, backlight_rgb_g, backlight_rgb_b}, +// {backlight_rgb_r, backlight_rgb_g, backlight_rgb_b}, +// {backlight_rgb_r, backlight_rgb_g, backlight_rgb_b}, +// {backlight_rgb_r, backlight_rgb_g, backlight_rgb_b}, +// {backlight_rgb_r, backlight_rgb_g, backlight_rgb_b}, +// {backlight_rgb_r, backlight_rgb_g, backlight_rgb_b}, +// {backlight_rgb_r, backlight_rgb_g, backlight_rgb_b}, +// {backlight_rgb_r, backlight_rgb_g, backlight_rgb_b}, +// {backlight_rgb_r, backlight_rgb_g, backlight_rgb_b}, +// {backlight_rgb_r, backlight_rgb_g, backlight_rgb_b}, +// {backlight_rgb_r, backlight_rgb_g, backlight_rgb_b} +// }; +// backlight_set_rgb(rgb); +// } else { +// uint8_t rgb[17][3] = { +// {0, 0, 0}, +// {0, 0, 0}, +// {0, 0, 0}, +// {0, 0, 0}, +// {0, 0, 0}, +// {0, 0, 0}, +// {0, 0, 0}, +// {0, 0, 0}, +// {0, 0, 0}, +// {0, 0, 0}, +// {0, 0, 0}, +// {0, 0, 0}, +// {0, 0, 0}, +// {0, 0, 0}, +// {0, 0, 0}, +// {0, 0, 0}, +// {0, 0, 0} +// }; +// backlight_set_rgb(rgb); +// } +// } + +// void backlight_set_rgb(uint8_t cfg[17][3]) +// { +// cli(); +// for(uint8_t i = 0; i < 17; ++i) { +// send_color(cfg[i][0], cfg[i][1], cfg[i][2], Device_PCBRGB); +// } +// sei(); +// show(); +// } + +// Q5, Q6, Q7 is connected to B1 - alphas +// Q8, Q9 is connected to B2 - frow +// Q1, Q2, Q3 is connected to B3 - mods +// Q4 is connected to E6 - macro keys + +void backlight_set(uint8_t level) { + level & BACKLIGHT_ALPHA ? (PORTB |= 0b00000010) : (PORTB &= ~0b00000010); + level & BACKLIGHT_FROW ? (PORTB |= 0b00000100) : (PORTB &= ~0b00000100); + level & BACKLIGHT_MOD ? (PORTB |= 0b00001000) : (PORTB &= ~0b00001000); + level & BACKLIGHT_MACRO ? (PORTE |= 0b01000000) : (PORTE &= ~0b01000000); +} + +// // Port from backlight_update_state +// void led_set_kb(uint8_t usb_led) { +// bool status[7] = { +// backlight_os_state & (1< + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License 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 + +#define LAYOUT_all( \ + K00, K01, K02, K04, K05, K06, K07, K09, K0A, K0B, K0C, K0D, K0E, K0F, K0G, K0J, 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, K2G, K2H, K2I, \ + K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E, K3G, K3H, K3I, \ + K40, K41, K42, k43, K44, K45, K46, K47, K48, K49, K4A, K4B, K4C, K4E, K4F, K4G, K4H, \ + K50, K51, K52, K53, K54, K5A, K5C, K5E, K5F, K5G, K5H, K5I \ +) { \ + { K00, K01, K02, XXX, K04, K05, K06, K07, XXX, K09, K0A, K0B, K0C, K0D, K0E, K0F, K0G, XXX, K0I, K0J }, \ + { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E, K1F, K1G, K1H, K1I, XXX }, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, K2E, XXX, K2G, K2H, K2I, XXX }, \ + { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E, XXX, K3G, K3H, K3I, XXX }, \ + { K40, K41, K42, K43, K44, K45, K46, K47, K48, K49, K4A, K4B, K4C, XXX, K4E, K4F, K4G, K4H, XXX, XXX }, \ + { K50, K51, K52, K53, K54, XXX, XXX, XXX, XXX, XXX, K5A, XXX, K5C, XXX, K5E, K5F, K5G, K5H, K5I, XXX }, \ +} + + +#define LAYOUT( \ + K00, K01, K02, K04, K05, K06, K07, K09, K0A, K0B, K0C, K0D, K0E, K0F, K0G, K0J, K0I, \ + K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E, K1G, K1H, K1I, \ + K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, K2E, K2G, K2H, K2I, \ + K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3G, K3H, K3I, \ + K40, K41, K42, K44, K45, K46, K47, K48, K49, K4A, K4B, K4C, K4E, K4F, K4H, \ + K50, K51, K52, K53, K54, K5A, K5C, K5E, K5F, K5G, K5H, K5I \ +) { \ + { K00, K01, K02, XXX, K04, K05, K06, K07, XXX, K09, K0A, K0B, K0C, K0D, K0E, K0F, K0G, XXX, K0I, K0J }, \ + { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E, XXX, K1G, K1H, K1I, XXX }, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, K2E, XXX, K2G, K2H, K2I, XXX }, \ + { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, XXX, XXX, K3G, K3H, K3I, XXX }, \ + { K40, K41, K42, XXX, K44, K45, K46, K47, K48, K49, K4A, K4B, K4C, XXX, K4E, K4F, XXX, K4H, XXX, XXX }, \ + { K50, K51, K52, K53, K54, XXX, XXX, XXX, XXX, XXX, K5A, XXX, K5C, XXX, K5E, K5F, K5G, K5H, K5I, XXX }, \ +} From 6fc4f1eddd8df1841dd7b6c59943bc32580cee82 Mon Sep 17 00:00:00 2001 From: Jesse Leventhal <45154268+jessel92@users.noreply.github.com> Date: Wed, 3 Jun 2020 19:25:59 -0400 Subject: [PATCH 086/930] [keyboard] Add two new The Mad Noodle Keypads (#8934) * Adding support for two new The Mad Noodle Keypads (Revised..Again) * Adding support for two new The Mad Noodle Keypads (Revised..Again) * Update keyboards/themadnoodle/ncc1701kbv2/ncc1701kbv2.h Co-Authored-By: Drashna Jaelre * Update keyboards/themadnoodle/noodlepad/noodlepad.h Co-Authored-By: Drashna Jaelre * Update keyboards/themadnoodle/ncc1701kbv2/rules.mk Co-Authored-By: Drashna Jaelre * Update keyboards/themadnoodle/noodlepad/rules.mk Co-Authored-By: Drashna Jaelre * Update keyboards/themadnoodle/noodlepad/keymaps/default/keymap.c Co-Authored-By: Drashna Jaelre * Update keyboards/themadnoodle/noodlepad/keymaps/default/keymap.c Co-Authored-By: Drashna Jaelre * Update keyboards/themadnoodle/noodlepad/keymaps/default/keymap.c Co-Authored-By: Drashna Jaelre * Update keyboards/themadnoodle/noodlepad/keymaps/default/keymap.c Co-Authored-By: Drashna Jaelre * Requested Changes to all files * Revert "Requested Changes to all files" This reverts commit 7f6c708da8edf779664ccc80b8932cad3ad37bf3. * Update keyboards/themadnoodle/ncc1701kbv2/info.json Co-Authored-By: Drashna Jaelre * Update keyboards/themadnoodle/ncc1701kbv2/keymaps/default/keymap.c Co-Authored-By: Drashna Jaelre * Update keyboards/themadnoodle/ncc1701kbv2/keymaps/default/keymap.c Co-Authored-By: Drashna Jaelre * Update keyboards/themadnoodle/ncc1701kbv2/keymaps/default/keymap.c Co-Authored-By: Drashna Jaelre * Update keyboards/themadnoodle/noodlepad/rules.mk Co-authored-by: Ryan * Update keyboards/themadnoodle/ncc1701kbv2/rules.mk Co-authored-by: Ryan * Update keyboards/themadnoodle/ncc1701kb/rules.mk Co-authored-by: Ryan * Update keyboards/themadnoodle/ncc1701kbv2/keymaps/default/keymap.c Co-authored-by: Drashna Jaelre * rework ncc1701kb v1 to vendor/keyboard/revision structure * rework ncc1701kb v2 to vendor/keyboard/revision structure * Update keyboards/themadnoodle/ncc1701kb/v2/rules.mk Co-authored-by: James Young <18669334+noroadsleft@users.noreply.github.com> * Update keyboards/themadnoodle/noodlepad/config.h Co-authored-by: James Young <18669334+noroadsleft@users.noreply.github.com> * Update keyboards/themadnoodle/noodlepad/info.json Co-authored-by: James Young <18669334+noroadsleft@users.noreply.github.com> * Update keyboards/themadnoodle/noodlepad/noodlepad.h Co-authored-by: James Young <18669334+noroadsleft@users.noreply.github.com> * Update keyboards/themadnoodle/noodlepad/rules.mk Co-authored-by: James Young <18669334+noroadsleft@users.noreply.github.com> * checkedout folder and removed v1 as requested * Update keyboards/themadnoodle/noodlepad/config.h Co-authored-by: Joel Challis * Update keyboards/themadnoodle/ncc1701kb/v2/config.h Co-authored-by: Joel Challis * Updated Noodle Pad Readme Co-authored-by: Drashna Jaelre Co-authored-by: Ryan Co-authored-by: James Young <18669334+noroadsleft@users.noreply.github.com> Co-authored-by: Joel Challis --- keyboards/themadnoodle/ncc1701kb/v2/config.h | 50 +++++++++++ keyboards/themadnoodle/ncc1701kb/v2/info.json | 22 +++++ .../ncc1701kb/v2/keymaps/default/keymap.c | 83 +++++++++++++++++++ keyboards/themadnoodle/ncc1701kb/v2/readme.md | 17 ++++ keyboards/themadnoodle/ncc1701kb/v2/rules.mk | 34 ++++++++ keyboards/themadnoodle/ncc1701kb/v2/v2.c | 1 + keyboards/themadnoodle/ncc1701kb/v2/v2.h | 32 +++++++ keyboards/themadnoodle/noodlepad/config.h | 50 +++++++++++ keyboards/themadnoodle/noodlepad/info.json | 22 +++++ .../noodlepad/keymaps/default/keymap.c | 83 +++++++++++++++++++ keyboards/themadnoodle/noodlepad/noodlepad.c | 1 + keyboards/themadnoodle/noodlepad/noodlepad.h | 31 +++++++ keyboards/themadnoodle/noodlepad/readme.md | 17 ++++ keyboards/themadnoodle/noodlepad/rules.mk | 34 ++++++++ 14 files changed, 477 insertions(+) create mode 100644 keyboards/themadnoodle/ncc1701kb/v2/config.h create mode 100644 keyboards/themadnoodle/ncc1701kb/v2/info.json create mode 100644 keyboards/themadnoodle/ncc1701kb/v2/keymaps/default/keymap.c create mode 100644 keyboards/themadnoodle/ncc1701kb/v2/readme.md create mode 100644 keyboards/themadnoodle/ncc1701kb/v2/rules.mk create mode 100644 keyboards/themadnoodle/ncc1701kb/v2/v2.c create mode 100644 keyboards/themadnoodle/ncc1701kb/v2/v2.h create mode 100644 keyboards/themadnoodle/noodlepad/config.h create mode 100644 keyboards/themadnoodle/noodlepad/info.json create mode 100644 keyboards/themadnoodle/noodlepad/keymaps/default/keymap.c create mode 100644 keyboards/themadnoodle/noodlepad/noodlepad.c create mode 100644 keyboards/themadnoodle/noodlepad/noodlepad.h create mode 100644 keyboards/themadnoodle/noodlepad/readme.md create mode 100644 keyboards/themadnoodle/noodlepad/rules.mk diff --git a/keyboards/themadnoodle/ncc1701kb/v2/config.h b/keyboards/themadnoodle/ncc1701kb/v2/config.h new file mode 100644 index 000000000000..6e19eedddd21 --- /dev/null +++ b/keyboards/themadnoodle/ncc1701kb/v2/config.h @@ -0,0 +1,50 @@ +/* +Copyright 2020 The Mad Noodle (Jesse Leventhal) + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License 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 0x0002 +#define MANUFACTURER The Mad Noodle +#define PRODUCT NCC1701KB v2 +#define DESCRIPTION NCC1701KB v2 macro keypad + +/* 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 + +/* RGB BackLight */ +#define RGB_DI_PIN B7 +#define RGBLED_NUM 4 +#define RGBLIGHT_SLEEP +#define RGBLIGHT_ANIMATIONS +/*Encoders */ +#define ENCODERS_PAD_A { D0 } +#define ENCODERS_PAD_B { D1 } + + +/* COL2ROW or ROW2COL */ +#define DIODE_DIRECTION ROW2COL diff --git a/keyboards/themadnoodle/ncc1701kb/v2/info.json b/keyboards/themadnoodle/ncc1701kb/v2/info.json new file mode 100644 index 000000000000..b0b82d532aec --- /dev/null +++ b/keyboards/themadnoodle/ncc1701kb/v2/info.json @@ -0,0 +1,22 @@ +{ + "keyboard_name": "NCC-1701-KB v2", + "url": "instagram.com/the_mad_noodle", + "maintainer": "The-Mad-Noodle", + "width": 3, + "height": 3, + "layouts": { + "LAYOUT_ortho_3x3": { + "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/themadnoodle/ncc1701kb/v2/keymaps/default/keymap.c b/keyboards/themadnoodle/ncc1701kb/v2/keymaps/default/keymap.c new file mode 100644 index 000000000000..486db5070e77 --- /dev/null +++ b/keyboards/themadnoodle/ncc1701kb/v2/keymaps/default/keymap.c @@ -0,0 +1,83 @@ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + /* LAYER 0 + * ,-----------------------. + * | << | MUTE | >> | ENCODER - PRESS (MUTE) / HOLD (LAYER 2) / KNOB (VOLUME CONTROL) + * |-------+-------+-------| + * | STOP | PLAY | MEDIA | + * |-------+-------+-------| + * | CALC | MAIL | PC/FN | + * `-----------------------' + */ + + [0] = LAYOUT_ortho_3x3( + KC_MPRV, LT(2, KC_MUTE), KC_MNXT, + KC_MSTP, KC_MPLY, KC_MSEL, + KC_CALC, KC_MAIL, LT(1, KC_MYCM) + ), + + + /* LAYER 1 + * ,-----------------------. + * | MODE+ |RGB TOG| MODE- | ENCODER - PRESS (NA) / KNOB (Hue Control) + * |-------+-------+-------| + * | SPD- | SPD+ |Bright | + * |-------+-------+-------| + * | SAT+ | SAT- | | + * `-----------------------' + */ + + [1] = LAYOUT_ortho_3x3( + RGB_MOD, RGB_TOG, RGB_RMOD, + RGB_SPI, RGB_SPD, RGB_VAI, + RGB_SAI, RGB_SAD, KC_TRNS + ), + + + /* LAYER 2 (ENCODER) + * ,-----------------------. + * | | | | ENCODER - PRESS (NA) / KNOB (Arrow Left/Right) + * |-------+-------+-------| + * | | | | + * |-------+-------+-------| + * | | | | + * `-----------------------' + */ + + [2] = LAYOUT_ortho_3x3( + KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS + ) + +}; + +void encoder_update_user(uint8_t index, bool clockwise) { + + switch (get_highest_layer(layer_state)) { + case 1: + if (clockwise) { + rgblight_increase_hue(); + } else { + rgblight_decrease_hue(); + } + break; + case 2: + if (clockwise) { + tap_code(KC_RGHT); + } else { + tap_code(KC_LEFT); + } + break; + default: + if (clockwise) { + tap_code(KC_VOLU); + } else { + tap_code(KC_VOLD); + } + break; + + } +} diff --git a/keyboards/themadnoodle/ncc1701kb/v2/readme.md b/keyboards/themadnoodle/ncc1701kb/v2/readme.md new file mode 100644 index 000000000000..4e70dd342211 --- /dev/null +++ b/keyboards/themadnoodle/ncc1701kb/v2/readme.md @@ -0,0 +1,17 @@ +# NCC-1701-KB v2 Keypad with Encoder + +![NCC-1701-KB V2 TOP](https://static.wixstatic.com/media/59d0ff_e9812deb74a4408ca77599a19a8f93b6~mv2.jpg) +![NCC-1701-KB V2 RGB](https://static.wixstatic.com/media/59d0ff_7a8968b70ed849a591664332964cc936~mv2.jpg) + +The NCC-1701-KB v2 by The Mad Noodle Prototypes is a custom Star Trek inspired 3x3 mechanical keypad with an encoder knob and full RGB Underglow. + +* Keyboard Maintainer: [The Mad Noodle Prototypes](https://github.com/The-Mad-Noodle) +* Hardware Supported: NCC-1701-KB v2 PCB, ATmega32U4 +* Hardware Availability: [MadNoodlePrototypes.com](https://www.madnoodleprototypes.com/shop) + +Make example for this keyboard (after setting up your build environment): + + make themadnoodle/ncc1701kb/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/themadnoodle/ncc1701kb/v2/rules.mk b/keyboards/themadnoodle/ncc1701kb/v2/rules.mk new file mode 100644 index 000000000000..960f1d7a6461 --- /dev/null +++ b/keyboards/themadnoodle/ncc1701kb/v2/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 = no # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = yes # 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 diff --git a/keyboards/themadnoodle/ncc1701kb/v2/v2.c b/keyboards/themadnoodle/ncc1701kb/v2/v2.c new file mode 100644 index 000000000000..caf7c6f0f2bf --- /dev/null +++ b/keyboards/themadnoodle/ncc1701kb/v2/v2.c @@ -0,0 +1 @@ +#include "v2.h" diff --git a/keyboards/themadnoodle/ncc1701kb/v2/v2.h b/keyboards/themadnoodle/ncc1701kb/v2/v2.h new file mode 100644 index 000000000000..5d3b65be56a0 --- /dev/null +++ b/keyboards/themadnoodle/ncc1701kb/v2/v2.h @@ -0,0 +1,32 @@ +/* Copyright 2020 The Mad Noodle (Jesse Leventhal) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License 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_3x3( \ + k00, k01, k02, \ + k10, k11, k12, \ + k20, k21, k22 \ +) \ +{ \ + { k00, k01, k02 }, \ + { k10, k11, k12 }, \ + { k20, k21, k22 } \ +} + diff --git a/keyboards/themadnoodle/noodlepad/config.h b/keyboards/themadnoodle/noodlepad/config.h new file mode 100644 index 000000000000..0b1d723e050f --- /dev/null +++ b/keyboards/themadnoodle/noodlepad/config.h @@ -0,0 +1,50 @@ +/* +Copyright 2020 The Mad Noodle (Jesse Leventhal) + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License 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 The Mad Noodle +#define PRODUCT Noodle Pad v1 +#define DESCRIPTION Noodle Pad macro keypad + +/* 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 + +/* RGB BackLight */ +#define RGB_DI_PIN B7 +#define RGBLED_NUM 4 +#define RGBLIGHT_SLEEP +#define RGBLIGHT_ANIMATIONS +/*Encoders */ +#define ENCODERS_PAD_A { D0 } +#define ENCODERS_PAD_B { D1 } + + +/* COL2ROW or ROW2COL */ +#define DIODE_DIRECTION ROW2COL diff --git a/keyboards/themadnoodle/noodlepad/info.json b/keyboards/themadnoodle/noodlepad/info.json new file mode 100644 index 000000000000..9e75cb6354d0 --- /dev/null +++ b/keyboards/themadnoodle/noodlepad/info.json @@ -0,0 +1,22 @@ +{ + "keyboard_name": "NoodlePad", + "url": "instagram.com/the_mad_noodle", + "maintainer": "The-Mad-Noodle", + "width": 3, + "height": 3, + "layouts": { + "LAYOUT_ortho_3x3": { + "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/themadnoodle/noodlepad/keymaps/default/keymap.c b/keyboards/themadnoodle/noodlepad/keymaps/default/keymap.c new file mode 100644 index 000000000000..e487c27262e8 --- /dev/null +++ b/keyboards/themadnoodle/noodlepad/keymaps/default/keymap.c @@ -0,0 +1,83 @@ +#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_ortho_3x3( + KC_MPRV, LT(2, KC_MUTE), KC_MNXT, + KC_MSTP, KC_MPLY, KC_MSEL, + KC_CALC, KC_MAIL, LT(1, KC_MYCM) + ), + + + /* LAYER 1 + * ,-----------------------. + * | MODE+ |RGB TOG| MODE- | ENCODER - PRESS (NA) / KNOB (Hue Control) + * |-------+-------+-------| + * | SPD- | SPD+ |Bright | + * |-------+-------+-------| + * | SAT+ | SAT- | | + * `-----------------------' + */ + + [1] = LAYOUT_ortho_3x3( + RGB_MOD, RGB_TOG, RGB_RMOD, + RGB_SPI, RGB_SPD, RGB_VAI, + RGB_SAI, RGB_SAD, KC_TRNS + ), + + + /* LAYER 2 (ENCODER) + * ,-----------------------. + * | | | | ENCODER - PRESS (NA) / KNOB (Arrow Left/Right) + * |-------+-------+-------| + * | | | | + * |-------+-------+-------| + * | | | | + * `-----------------------' + */ + + [2] = LAYOUT_ortho_3x3( + KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS + ) + +}; + +void encoder_update_user(uint8_t index, bool clockwise) { + + switch (get_highest_layer(layer_state)) { + case 1: + if (clockwise) { + rgblight_increase_hue(); + } else { + rgblight_decrease_hue(); + } + break; + case 2: + if (clockwise) { + tap_code(KC_RGHT); + } else { + tap_code(KC_LEFT); + } + break; + default: + if (clockwise) { + tap_code(KC_VOLU); + } else { + tap_code(KC_VOLD); + } + break; + + } +} diff --git a/keyboards/themadnoodle/noodlepad/noodlepad.c b/keyboards/themadnoodle/noodlepad/noodlepad.c new file mode 100644 index 000000000000..afabf78629f4 --- /dev/null +++ b/keyboards/themadnoodle/noodlepad/noodlepad.c @@ -0,0 +1 @@ +#include "noodlepad.h" diff --git a/keyboards/themadnoodle/noodlepad/noodlepad.h b/keyboards/themadnoodle/noodlepad/noodlepad.h new file mode 100644 index 000000000000..e1aa5d2a6f2b --- /dev/null +++ b/keyboards/themadnoodle/noodlepad/noodlepad.h @@ -0,0 +1,31 @@ +/* Copyright 2020 The Mad Noodle (Jesse Leventhal) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License 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_3x3( \ + k00, k01, k02, \ + k10, k11, k12, \ + k20, k21, k22 \ +) \ +{ \ + { k00, k01, k02 }, \ + { k10, k11, k12 }, \ + { k20, k21, k22 } \ +} diff --git a/keyboards/themadnoodle/noodlepad/readme.md b/keyboards/themadnoodle/noodlepad/readme.md new file mode 100644 index 000000000000..e4439dac45b5 --- /dev/null +++ b/keyboards/themadnoodle/noodlepad/readme.md @@ -0,0 +1,17 @@ +# Noodle Pad v1 Keypad with Encoder + +![NoodlePad TOP](https://static.wixstatic.com/media/59d0ff_052f27ee5ae84266821af7277c51c4ed~mv2.jpg) +![NoodlePad RGB](https://static.wixstatic.com/media/59d0ff_c91f2adc258547a38cc5b480a8d9c510~mv2.jpg) + +The Noodle Pad by The Mad Noodle Prototypes is a custom 3x3 mechanical keypad with an encoder knob and full RGB Underglow. + +* Keyboard Maintainer: [The Mad Noodle Prototypes](https://github.com/The-Mad-Noodle) +* Hardware Supported: NoodlePad PCB, ATmega32U4 +* Hardware Availability: [MadNoodlePrototypes.com](https://www.madnoodleprototypes.com/shop) + +Make example for this keyboard (after setting up your build environment): + + make themadnoodle/noodlepad: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/themadnoodle/noodlepad/rules.mk b/keyboards/themadnoodle/noodlepad/rules.mk new file mode 100644 index 000000000000..960f1d7a6461 --- /dev/null +++ b/keyboards/themadnoodle/noodlepad/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 = no # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = yes # 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 From e571f53ae917e12982e87720025f5c5defe73abb Mon Sep 17 00:00:00 2001 From: Joel Challis Date: Thu, 4 Jun 2020 09:45:35 +0100 Subject: [PATCH 087/930] Fix wt60_d and rama_works_u80_a Configurator config (#9292) --- keyboards/wilba_tech/rama_works_u80_a/info.json | 2 +- keyboards/wilba_tech/wt60_d/info.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/keyboards/wilba_tech/rama_works_u80_a/info.json b/keyboards/wilba_tech/rama_works_u80_a/info.json index 3652b4e51206..d85a26d1bb64 100644 --- a/keyboards/wilba_tech/rama_works_u80_a/info.json +++ b/keyboards/wilba_tech/rama_works_u80_a/info.json @@ -6,7 +6,7 @@ "height": 6.5, "layouts": { "LAYOUT_all": { - "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":"PrtSc", "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":"!", "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":"Backspace", "x":13, "y":1.5}, {"x":14, "y":1.5}, {"label":"Insert", "x":15.25, "y":1.5}, {"label":"Home", "x":16.25, "y":1.5}, {"label":"PgUp", "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":"|", "x":13.5, "y":2.5, "w":1.5}, {"label":"Delete", "x":15.25, "y":2.5}, {"label":"End", "x":16.25, "y":2.5}, {"label":"PgDn", "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":"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}, {"x":14, "y":4.5}, {"label":"\u2191", "x":16.25, "y":4.5}, {"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":6.25}, {"label":"Alt", "x":10, "y":5.5, "w":1.25}, {"label":"Win", "x":11.25, "y":5.5, "w":1.25}, {"label":"Menu", "x":12.5, "y":5.5, "w":1.25}, {"label":"Ctrl", "x":13.75, "y":5.5, "w":1.25}, {"label":"\u2190", "x":15.25, "y":5.5}, {"label":"\u2193", "x":16.25, "y":5.5}, {"label":"\u2192", "x":17.25, "y":5.5}] + "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":"PrtSc", "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":"!", "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":"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":"PgUp", "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":"|", "x":13.5, "y":2.5, "w":1.5}, {"label":"Delete", "x":15.25, "y":2.5}, {"label":"End", "x":16.25, "y":2.5}, {"label":"PgDn", "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":"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":2.75}, {"label":"\u2191", "x":16.25, "y":4.5}, {"label":"Ctrl", "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}, {"label":"\u2190", "x":15.25, "y":5.5}, {"label":"\u2193", "x":16.25, "y":5.5}, {"label":"\u2192", "x":17.25, "y":5.5}] } } } diff --git a/keyboards/wilba_tech/wt60_d/info.json b/keyboards/wilba_tech/wt60_d/info.json index bdd9c60a779d..d8ae260e51cb 100644 --- a/keyboards/wilba_tech/wt60_d/info.json +++ b/keyboards/wilba_tech/wt60_d/info.json @@ -6,7 +6,7 @@ "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}, {"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": [{"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":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":"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}] } } } \ No newline at end of file From 7b2c09de5944c20da97b720cc8219d46b6dba9eb Mon Sep 17 00:00:00 2001 From: Joel Challis Date: Thu, 4 Jun 2020 09:57:37 +0100 Subject: [PATCH 088/930] Fix handwired/novem Configurator config (#9291) --- keyboards/handwired/novem/info.json | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/keyboards/handwired/novem/info.json b/keyboards/handwired/novem/info.json index df0b6932010b..6a18a5af2112 100644 --- a/keyboards/handwired/novem/info.json +++ b/keyboards/handwired/novem/info.json @@ -10,8 +10,12 @@ {"label":"k00", "x":0, "y":0}, {"label":"k01", "x":1, "y":0}, {"label":"k02", "x":2, "y":0}, - {"label":"k10", "x":0, "y":1, "w":1.5}, - {"label":"k12", "x":1.5, "y":1, "w":1.5} + {"label":"k03", "x":0, "y":1}, + {"label":"k04", "x":1, "y":1}, + {"label":"k05", "x":2, "y":1}, + {"label":"k06", "x":0, "y":2}, + {"label":"k07", "x":1, "y":2}, + {"label":"k08", "x":2, "y":2} ] } } From 232b9dabbe00f41a89ebbae414cd5e39bdd45264 Mon Sep 17 00:00:00 2001 From: Joel Challis Date: Thu, 4 Jun 2020 10:07:37 +0100 Subject: [PATCH 089/930] Fix 'does not have a readme.md' warnings (#9294) --- keyboards/ergodox_stm32/readme.md | 9 +++++++++ keyboards/handwired/myskeeb/readme.md | 11 +++++++++++ 2 files changed, 20 insertions(+) create mode 100644 keyboards/ergodox_stm32/readme.md create mode 100644 keyboards/handwired/myskeeb/readme.md diff --git a/keyboards/ergodox_stm32/readme.md b/keyboards/ergodox_stm32/readme.md new file mode 100644 index 000000000000..f8b9c4c553ec --- /dev/null +++ b/keyboards/ergodox_stm32/readme.md @@ -0,0 +1,9 @@ +# ergodox_stm32 + +* Keyboard Maintainer: [Codetector1374](https://github.com/Codetector1374) + +Make example for this keyboard (after setting up your build environment): + + make ergodox_stm32: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/myskeeb/readme.md b/keyboards/handwired/myskeeb/readme.md new file mode 100644 index 000000000000..80be57e4b68a --- /dev/null +++ b/keyboards/handwired/myskeeb/readme.md @@ -0,0 +1,11 @@ +# myskeeb + +Handwired Keyboard based on the Ergodash, with an OLED similar to Kyria. + +* Keyboard Maintainer: [su8044](https://github.com/su8044) + +Make example for this keyboard (after setting up your build environment): + + make handwired/myskeeb: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 e84e9a2004cbec490f94d74353864f19dfad89c4 Mon Sep 17 00:00:00 2001 From: Frothy Date: Thu, 4 Jun 2020 13:22:29 -0300 Subject: [PATCH 090/930] Add Via support for Percent Canoe (#9276) * Add Via support for Percent Canoe * Removed unnecessary flags from rules.mk * Changes as per PR * Added 2 additional empty layers (for a total of 4) * Set a unique vendor id for all percent studio boards * Set a unique product id for the canoe * Fixed formatting, removed trailing comma * Fixed PS/PT typo for vendor id * Removed unnecessary variables * Removed unnecessary slashes * Fixed missing layer name --- keyboards/percent/booster/config.h | 4 +- keyboards/percent/canoe/config.h | 4 +- keyboards/percent/canoe/keymaps/via/keymap.c | 49 ++++++++++++++++++++ keyboards/percent/canoe/keymaps/via/rules.mk | 4 ++ keyboards/percent/skog/config.h | 2 +- keyboards/percent/skog_lite/config.h | 2 +- 6 files changed, 59 insertions(+), 6 deletions(-) create mode 100644 keyboards/percent/canoe/keymaps/via/keymap.c create mode 100644 keyboards/percent/canoe/keymaps/via/rules.mk diff --git a/keyboards/percent/booster/config.h b/keyboards/percent/booster/config.h index 23ac7ad0c812..9c36a65f9195 100644 --- a/keyboards/percent/booster/config.h +++ b/keyboards/percent/booster/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 0x5053 /* PS */ +#define PRODUCT_ID 0x4253 #define DEVICE_VER 0x0001 #define MANUFACTURER Percent Studio #define PRODUCT Booster diff --git a/keyboards/percent/canoe/config.h b/keyboards/percent/canoe/config.h index c6720ea16d86..b8a306b7e163 100644 --- a/keyboards/percent/canoe/config.h +++ b/keyboards/percent/canoe/config.h @@ -20,8 +20,8 @@ along with this program. If not, see . #include "config_common.h" -#define VENDOR_ID 0x20A0 -#define PRODUCT_ID 0x422D +#define VENDOR_ID 0x5053 /* PS */ +#define PRODUCT_ID 0x434E #define DEVICE_VER 0x0200 #define MANUFACTURER Percent Studios #define PRODUCT CANOE diff --git a/keyboards/percent/canoe/keymaps/via/keymap.c b/keyboards/percent/canoe/keymaps/via/keymap.c new file mode 100644 index 000000000000..28eb222b12e5 --- /dev/null +++ b/keyboards/percent/canoe/keymaps/via/keymap.c @@ -0,0 +1,49 @@ +/* +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 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_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_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_LEFT, KC_DOWN, KC_RIGHT), + + [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_PAUS, + KC_TRNS, KC_TRNS, KC_UP, KC_TRNS, RGB_TOG, RGB_VAI, RGB_HUI, RGB_SAI, KC_INS, RESET, KC_PSCR, KC_SLCK, KC_PAUS, KC_BSLS, KC_SLCK, + KC_TRNS, KC_LEFT, KC_DOWN, KC_RIGHT,RGB_MOD, RGB_VAD, RGB_HUD, RGB_SAD, KC_TRNS, KC_TRNS, KC_F14, KC_F15, KC_INS, KC_HOME, + KC_LSFT, KC_MPRV, KC_MPLY, KC_MNXT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_RSFT, KC_PGUP, KC_END, + KC_LCTL, KC_LGUI, KC_LALT, KC_TRNS, KC_RALT, KC_TRNS, KC_HOME, KC_PGDN, KC_END), + + [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/percent/canoe/keymaps/via/rules.mk b/keyboards/percent/canoe/keymaps/via/rules.mk new file mode 100644 index 000000000000..1ebdc3e8b218 --- /dev/null +++ b/keyboards/percent/canoe/keymaps/via/rules.mk @@ -0,0 +1,4 @@ +VIA_ENABLE = yes +LTO_ENABLE = yes + +EXTRAKEY_ENABLE = no \ No newline at end of file diff --git a/keyboards/percent/skog/config.h b/keyboards/percent/skog/config.h index 099de6da216c..047bac02e82f 100644 --- a/keyboards/percent/skog/config.h +++ b/keyboards/percent/skog/config.h @@ -17,7 +17,7 @@ along with this program. If not, see . #pragma once -#define VENDOR_ID 0x20A0 +#define VENDOR_ID 0x5053 /* PS */ #define PRODUCT_ID 0x422D #define DEVICE_VER 0x0200 diff --git a/keyboards/percent/skog_lite/config.h b/keyboards/percent/skog_lite/config.h index 625effca86f5..e28dcfcd2f34 100644 --- a/keyboards/percent/skog_lite/config.h +++ b/keyboards/percent/skog_lite/config.h @@ -19,7 +19,7 @@ along with this program. If not, see . #include "config_common.h" -#define VENDOR_ID 0x20A0 +#define VENDOR_ID 0x5053 /* PS */ #define PRODUCT_ID 0x422D #define DEVICE_VER 0x0200 #define MANUFACTURER Percent Studios From 6cfc3cd940370d80fd44554eb9f669950495e1f9 Mon Sep 17 00:00:00 2001 From: Josh Hinnebusch Date: Thu, 4 Jun 2020 19:56:04 -0400 Subject: [PATCH 091/930] [Keyboard] add hineybush/h10 pcb (#9036) * initial h10 commit * update h10 * update files, add via keymap * edit h10 readme * update per PR requests * add copyright (i think this is what fauxpark wants) * fix comment * remove config.h files * update per PR requests * Update keyboards/hineybush/h10/info.json * Update keyboards/hineybush/h10/info.json --- keyboards/hineybush/h10/config.h | 126 +++++++++++++++ keyboards/hineybush/h10/h10.c | 29 ++++ keyboards/hineybush/h10/h10.h | 146 ++++++++++++++++++ keyboards/hineybush/h10/info.json | 12 ++ .../hineybush/h10/keymaps/default/keymap.c | 40 +++++ .../hineybush/h10/keymaps/default/readme.md | 1 + keyboards/hineybush/h10/keymaps/via/keymap.c | 56 +++++++ keyboards/hineybush/h10/keymaps/via/readme.md | 1 + keyboards/hineybush/h10/keymaps/via/rules.mk | 2 + keyboards/hineybush/h10/readme.md | 15 ++ keyboards/hineybush/h10/rules.mk | 26 ++++ 11 files changed, 454 insertions(+) create mode 100644 keyboards/hineybush/h10/config.h create mode 100644 keyboards/hineybush/h10/h10.c create mode 100644 keyboards/hineybush/h10/h10.h create mode 100644 keyboards/hineybush/h10/info.json create mode 100644 keyboards/hineybush/h10/keymaps/default/keymap.c create mode 100644 keyboards/hineybush/h10/keymaps/default/readme.md create mode 100644 keyboards/hineybush/h10/keymaps/via/keymap.c create mode 100644 keyboards/hineybush/h10/keymaps/via/readme.md create mode 100644 keyboards/hineybush/h10/keymaps/via/rules.mk create mode 100644 keyboards/hineybush/h10/readme.md create mode 100644 keyboards/hineybush/h10/rules.mk diff --git a/keyboards/hineybush/h10/config.h b/keyboards/hineybush/h10/config.h new file mode 100644 index 000000000000..7d57ec2bc801 --- /dev/null +++ b/keyboards/hineybush/h10/config.h @@ -0,0 +1,126 @@ +/* +Copyright 2020 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 0xEBD8 +#define DEVICE_VER 0x0001 +#define MANUFACTURER hineybush +#define PRODUCT h10 +#define DESCRIPTION Custom numpad PCB + +/* 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 { B0, C6, B6, B5, B4, D7 } +#define MATRIX_COL_PINS { F0, C7, B1, B2 } +#define UNUSED_PINS + +/* COL2ROW, ROW2COL*/ +#define DIODE_DIRECTION COL2ROW + +#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 + +/* disable these deprecated features by default */ +#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/hineybush/h10/h10.c b/keyboards/hineybush/h10/h10.c new file mode 100644 index 000000000000..fbaca7f38edc --- /dev/null +++ b/keyboards/hineybush/h10/h10.c @@ -0,0 +1,29 @@ +/* Copyright 2020 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 "h10.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. + +/* +bool led_update_kb(led_t led_state) { + // placeholder for LED indicator added to next revision + + return led_update_user(led_state); +} +*/ diff --git a/keyboards/hineybush/h10/h10.h b/keyboards/hineybush/h10/h10.h new file mode 100644 index 000000000000..33010cb3682d --- /dev/null +++ b/keyboards/hineybush/h10/h10.h @@ -0,0 +1,146 @@ +/* Copyright 2020 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_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, \ + k51, k52, k53 \ +) \ +{ \ + {k00, k01, k02, k03}, \ + {k10, k11, k12, k13}, \ + {k20, k21, k22, KC_NO}, \ + {k30, k31, k32, k33}, \ + {k40, k41, k42, KC_NO}, \ + {KC_NO, k51, k52, k53} \ +} + +#define LAYOUT_split_plus( \ + k00, k01, k02, k03, \ + k10, k11, k12, k13, \ + k20, k21, k22, k23, \ + k30, k31, k32, k33, \ + k40, k41, k42, \ + k51, k52, k53 \ +) \ +{ \ + {k00, k01, k02, k03}, \ + {k10, k11, k12, k13}, \ + {k20, k21, k22, k23}, \ + {k30, k31, k32, k33}, \ + {k40, k41, k42, KC_NO}, \ + {KC_NO, k51, k52, k53} \ +} + +#define LAYOUT_split_zero( \ + k00, k01, k02, k03, \ + k10, k11, k12, k13, \ + k20, k21, k22, \ + k30, k31, k32, k33, \ + k40, k41, k42, \ + k50, k51, 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, k51, k52, k53} \ +} + +#define LAYOUT_split_enter( \ + k00, k01, k02, k03, \ + k10, k11, k12, k13, \ + k20, k21, k22, \ + k30, k31, k32, k33, \ + k40, k41, k42, k43, \ + k51, k52, k53 \ +) \ +{ \ + {k00, k01, k02, k03}, \ + {k10, k11, k12, k13}, \ + {k20, k21, k22, KC_NO}, \ + {k30, k31, k32, k33}, \ + {k40, k41, k42, k43}, \ + {KC_NO, k51, k52, k53} \ +} + +#define LAYOUT_split_enter_plus( \ + k00, k01, k02, k03, \ + k10, k11, k12, k13, \ + k20, k21, k22, k23, \ + k30, k31, k32, k33, \ + k40, k41, k42, k43, \ + k51, k52, k53 \ +) \ +{ \ + {k00, k01, k02, k03}, \ + {k10, k11, k12, k13}, \ + {k20, k21, k22, k23}, \ + {k30, k31, k32, k33}, \ + {k40, k41, k42, k43}, \ + {KC_NO, k51, k52, k53} \ +} + +#define LAYOUT_split_zero_plus( \ + k00, k01, k02, k03, \ + k10, k11, k12, k13, \ + k20, k21, k22, k23, \ + k30, k31, k32, k33, \ + k40, k41, k42, \ + k50, k51, k52, k53 \ +) \ +{ \ + {k00, k01, k02, k03}, \ + {k10, k11, k12, k13}, \ + {k20, k21, k22, k23}, \ + {k30, k31, k32, k33}, \ + {k40, k41, k42, KC_NO}, \ + {k50, k51, k52, k53} \ +} diff --git a/keyboards/hineybush/h10/info.json b/keyboards/hineybush/h10/info.json new file mode 100644 index 000000000000..b08c407c3102 --- /dev/null +++ b/keyboards/hineybush/h10/info.json @@ -0,0 +1,12 @@ +{ + "keyboard_name": "h10", + "url": "", + "maintainer": "hineybush", + "width": 5.25, + "height": 7.5, + "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}] + } + } +} diff --git a/keyboards/hineybush/h10/keymaps/default/keymap.c b/keyboards/hineybush/h10/keymaps/default/keymap.c new file mode 100644 index 000000000000..125cce88bf88 --- /dev/null +++ b/keyboards/hineybush/h10/keymaps/default/keymap.c @@ -0,0 +1,40 @@ +/* Copyright 2020 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] = { + /* Base */ + [0] = LAYOUT_numpad_6x4( + KC_ESC, KC_PEQL, KC_BSPC, MO(1), + 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 + ), + [1] = LAYOUT_numpad_6x4( + KC_VOLU, KC_MPLY, KC_MNXT, KC_TRNS, + 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, RESET + ), +}; + + + diff --git a/keyboards/hineybush/h10/keymaps/default/readme.md b/keyboards/hineybush/h10/keymaps/default/readme.md new file mode 100644 index 000000000000..fd8638b75c26 --- /dev/null +++ b/keyboards/hineybush/h10/keymaps/default/readme.md @@ -0,0 +1 @@ +# The default keymap for h10 diff --git a/keyboards/hineybush/h10/keymaps/via/keymap.c b/keyboards/hineybush/h10/keymaps/via/keymap.c new file mode 100644 index 000000000000..5b6d9a3e4fbf --- /dev/null +++ b/keyboards/hineybush/h10/keymaps/via/keymap.c @@ -0,0 +1,56 @@ +/* Copyright 2020 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] = { + /* Base */ + [0] = LAYOUT_numpad_6x4( + KC_ESC, KC_PEQL, KC_BSPC, MO(1), + 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 + ), + [1] = LAYOUT_numpad_6x4( + KC_VOLU, KC_MPLY, KC_MNXT, KC_TRNS, + 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, RESET + ), + [2] = LAYOUT_numpad_6x4( + KC_VOLU, KC_MPLY, KC_MNXT, KC_TRNS, + 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 + ), + [3] = LAYOUT_numpad_6x4( + KC_VOLU, KC_MPLY, KC_MNXT, KC_TRNS, + 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 + ), +}; + + + diff --git a/keyboards/hineybush/h10/keymaps/via/readme.md b/keyboards/hineybush/h10/keymaps/via/readme.md new file mode 100644 index 000000000000..5986e1482747 --- /dev/null +++ b/keyboards/hineybush/h10/keymaps/via/readme.md @@ -0,0 +1 @@ +# The via keymap for h10 diff --git a/keyboards/hineybush/h10/keymaps/via/rules.mk b/keyboards/hineybush/h10/keymaps/via/rules.mk new file mode 100644 index 000000000000..7a029a79555c --- /dev/null +++ b/keyboards/hineybush/h10/keymaps/via/rules.mk @@ -0,0 +1,2 @@ +# Copyright hineybush 2020 +VIA_ENABLE = yes diff --git a/keyboards/hineybush/h10/readme.md b/keyboards/hineybush/h10/readme.md new file mode 100644 index 000000000000..19b8a44cda79 --- /dev/null +++ b/keyboards/hineybush/h10/readme.md @@ -0,0 +1,15 @@ +# h10 + +![h10](https://i.imgur.com/PeMuPZir.jpg) + +A custom numpad PCB. + +* Keyboard Maintainer: [hineybush](https://github.com/hineybush) +* Hardware Supported: h10 proto 1 +* Hardware Availability: hiney.cc + +Make example for this keyboard (after setting up your build environment): + + make hineybush/h10: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/h10/rules.mk b/keyboards/hineybush/h10/rules.mk new file mode 100644 index 000000000000..45048737989f --- /dev/null +++ b/keyboards/hineybush/h10/rules.mk @@ -0,0 +1,26 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +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 = 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 +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 +FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches + +LAYOUTS = ortho_6x4 numpad_6x4 From a2dee4494d27a0a7d6075317a1b41e0ff4db194f Mon Sep 17 00:00:00 2001 From: Joel Challis Date: Fri, 5 Jun 2020 01:33:35 +0100 Subject: [PATCH 092/930] Fix mechlovin/pisces Configurator config (#9290) * Fix mechlovin/pisces Configurator config * Update keyboards/mechlovin/pisces/info.json --- keyboards/mechlovin/pisces/info.json | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/keyboards/mechlovin/pisces/info.json b/keyboards/mechlovin/pisces/info.json index 5b32d1186e5f..bb6e4b8c3269 100644 --- a/keyboards/mechlovin/pisces/info.json +++ b/keyboards/mechlovin/pisces/info.json @@ -65,8 +65,9 @@ {"label":"K3C (F6,D7)", "x":12.25, "y":3, "w":1.75}, {"label":"K3D (F6,B4)", "x":14, "y":3}, {"label":"K3E (F6,B5)", "x":15, "y":3}, - {"label":"K40 (F7,E6)", "x":0, "y":4, "w":1.5}, - {"label":"K42 (F7,B3)", "x":2.25, "y":4, "w":1.5}, + {"label":"K40 (F7,E6)", "x":0, "y":4, "w":1.25}, + {"label":"K41 (F7,B1)", "x":1.25, "y":4, "w":1.25}, + {"label":"K42 (F7,B3)", "x":2.5, "y":4, "w":1.25}, {"label":"K46 (F7,D3)", "x":3.75, "y":4, "w":6.25}, {"label":"K4A (F7,D4)", "x":10, "y":4, "w":1.25}, {"label":"K4B (F7,D6)", "x":11.25, "y":4, "w":1.25}, From a68b0ed9a25dcbfd616faabab10a123c3c0710fd Mon Sep 17 00:00:00 2001 From: itsnoteasy Date: Fri, 5 Jun 2020 07:55:39 +0100 Subject: [PATCH 093/930] [Keyboard] Add ortho5by12 keyboard (#9141) * Add files via upload * Update keyboards/ortho5by12/rules.mk * Add files via upload * Add files via upload * Update keyboards/ortho5by12/ortho5by12.h * Update keyboards/ortho5by12/ortho5by12.h * Add files via upload * Add files via upload * Update keyboards/ortho5by12/readme.md * Update keyboards/ortho5by12/readme.md * Update keyboards/ortho5by12/readme.md * Update keyboards/ortho5by12/readme.md * Update keyboards/ortho5by12/readme.md * Update keyboards/ortho5by12/readme.md * Update keyboards/ortho5by12/info.json * Update keyboards/ortho5by12/ortho5by12.h * Apply suggestions from code review * Update rules.mk * Update config.h * Update config.h * Update config.h * Delete rules.mk * Delete config.h * Delete info.json * Delete ortho5by12.c * Delete ortho5by12.h * Delete readme.md * Delete keymap.c --- keyboards/ortho5by12/config.h | 59 +++++ keyboards/ortho5by12/info.json | 137 +++++++++++ keyboards/ortho5by12/keymaps/default/keymap.c | 215 ++++++++++++++++++ keyboards/ortho5by12/ortho5by12.c | 30 +++ keyboards/ortho5by12/ortho5by12.h | 57 +++++ keyboards/ortho5by12/readme.md | 55 +++++ keyboards/ortho5by12/rules.mk | 34 +++ 7 files changed, 587 insertions(+) create mode 100644 keyboards/ortho5by12/config.h create mode 100644 keyboards/ortho5by12/info.json create mode 100644 keyboards/ortho5by12/keymaps/default/keymap.c create mode 100644 keyboards/ortho5by12/ortho5by12.c create mode 100644 keyboards/ortho5by12/ortho5by12.h create mode 100644 keyboards/ortho5by12/readme.md create mode 100644 keyboards/ortho5by12/rules.mk diff --git a/keyboards/ortho5by12/config.h b/keyboards/ortho5by12/config.h new file mode 100644 index 000000000000..629059ef050a --- /dev/null +++ b/keyboards/ortho5by12/config.h @@ -0,0 +1,59 @@ +/* +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"*/ +// These VID/PID is not verified. Use at your own risk. +#define VENDOR_ID 0x16C0 +#define PRODUCT_ID 0x27DB +#define DEVICE_VER 0x0002 +#define MANUFACTURER /u/squeezeonein +#define PRODUCT ortho5by12 +#define DESCRIPTION 12x5 ortholinear keyboard with through hole components + +/* key matrix size, duplex 10x6 */ +#define MATRIX_ROWS 10 +#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) + * + 0 1 2 3 4 5 6 7 8 9 */ +#define MATRIX_ROW_PINS { B5, B1, B2, B3, B4, C0, D5, D6, D7, B0 } +#define MATRIX_COL_PINS { C2, D0, D1, D4, C3, C1 } +#define UNUSED_PINS + +/* 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 + +#define BOOTMAGIC_LITE_ROW 7 +#define BOOTMAGIC_LITE_COLUMN 2 diff --git a/keyboards/ortho5by12/info.json b/keyboards/ortho5by12/info.json new file mode 100644 index 000000000000..934e499a3f29 --- /dev/null +++ b/keyboards/ortho5by12/info.json @@ -0,0 +1,137 @@ +{ + "keyboard_name": "ortho5by12", + "keyboard_folder": "ortho5by12", + "url": "https://github.com/itsnoteasy/misc/blob/master/ortho5by12.zip", + "maintainer": "itsnoteasy", + "width": 12, + "height": 5, + "layouts": { + "LAYOUT_ortho_5x12_1x2uC": { + "key_count": 59, + "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": 4, "y": 0 }, + { "w": 1, "x": 5, "y": 0 }, + { "w": 1, "x": 6, "y": 0 }, + { "w": 1, "x": 7, "y": 0 }, + { "w": 1, "x": 8, "y": 0 }, + { "w": 1, "x": 9, "y": 0 }, + { "w": 1, "x": 10, "y": 0 }, + { "w": 1, "x": 11, "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": 4, "y": 1 }, + { "w": 1, "x": 5, "y": 1 }, + { "w": 1, "x": 6, "y": 1 }, + { "w": 1, "x": 7, "y": 1 }, + { "w": 1, "x": 8, "y": 1 }, + { "w": 1, "x": 9, "y": 1 }, + { "w": 1, "x": 10, "y": 1 }, + { "w": 1, "x": 11, "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": 4, "y": 2 }, + { "w": 1, "x": 5, "y": 2 }, + { "w": 1, "x": 6, "y": 2 }, + { "w": 1, "x": 7, "y": 2 }, + { "w": 1, "x": 8, "y": 2 }, + { "w": 1, "x": 9, "y": 2 }, + { "w": 1, "x": 10, "y": 2 }, + { "w": 1, "x": 11, "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 }, + { "w": 1, "x": 4, "y": 3 }, + { "w": 1, "x": 5, "y": 3 }, + { "w": 1, "x": 6, "y": 3 }, + { "w": 1, "x": 7, "y": 3 }, + { "w": 1, "x": 8, "y": 3 }, + { "w": 1, "x": 9, "y": 3 }, + { "w": 1, "x": 10, "y": 3 }, + { "w": 1, "x": 11, "y": 3 }, + { "w": 1, "x": 0, "y": 4 }, + { "w": 1, "x": 1, "y": 4 }, + { "w": 1, "x": 2, "y": 4 }, + { "w": 1, "x": 3, "y": 4 }, + { "w": 1, "x": 4, "y": 4 }, + { "w": 2, "x": 5, "y": 4 }, + { "w": 1, "x": 7, "y": 4 }, + { "w": 1, "x": 8, "y": 4 }, + { "w": 1, "x": 9, "y": 4 }, + { "w": 1, "x": 10, "y": 4 }, + { "w": 1, "x": 11, "y": 4 } ] + }, + "LAYOUT_ortho_5x12": { + "key_count": 60, + "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": 4, "y": 0 }, + { "w": 1, "x": 5, "y": 0 }, + { "w": 1, "x": 6, "y": 0 }, + { "w": 1, "x": 7, "y": 0 }, + { "w": 1, "x": 8, "y": 0 }, + { "w": 1, "x": 9, "y": 0 }, + { "w": 1, "x": 10, "y": 0 }, + { "w": 1, "x": 11, "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": 4, "y": 1 }, + { "w": 1, "x": 5, "y": 1 }, + { "w": 1, "x": 6, "y": 1 }, + { "w": 1, "x": 7, "y": 1 }, + { "w": 1, "x": 8, "y": 1 }, + { "w": 1, "x": 9, "y": 1 }, + { "w": 1, "x": 10, "y": 1 }, + { "w": 1, "x": 11, "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": 4, "y": 2 }, + { "w": 1, "x": 5, "y": 2 }, + { "w": 1, "x": 6, "y": 2 }, + { "w": 1, "x": 7, "y": 2 }, + { "w": 1, "x": 8, "y": 2 }, + { "w": 1, "x": 9, "y": 2 }, + { "w": 1, "x": 10, "y": 2 }, + { "w": 1, "x": 11, "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 }, + { "w": 1, "x": 4, "y": 3 }, + { "w": 1, "x": 5, "y": 3 }, + { "w": 1, "x": 6, "y": 3 }, + { "w": 1, "x": 7, "y": 3 }, + { "w": 1, "x": 8, "y": 3 }, + { "w": 1, "x": 9, "y": 3 }, + { "w": 1, "x": 10, "y": 3 }, + { "w": 1, "x": 11, "y": 3 }, + { "w": 1, "x": 0, "y": 4 }, + { "w": 1, "x": 1, "y": 4 }, + { "w": 1, "x": 2, "y": 4 }, + { "w": 1, "x": 3, "y": 4 }, + { "w": 1, "x": 4, "y": 4 }, + { "w": 1, "x": 5, "y": 4 }, + { "w": 1, "x": 6, "y": 4 }, + { "w": 1, "x": 7, "y": 4 }, + { "w": 1, "x": 8, "y": 4 }, + { "w": 1, "x": 9, "y": 4 }, + { "w": 1, "x": 10, "y": 4 }, + { "w": 1, "x": 11, "y": 4 } ] + } + } +} diff --git a/keyboards/ortho5by12/keymaps/default/keymap.c b/keyboards/ortho5by12/keymaps/default/keymap.c new file mode 100644 index 000000000000..67fb80a32f25 --- /dev/null +++ b/keyboards/ortho5by12/keymaps/default/keymap.c @@ -0,0 +1,215 @@ +/* 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 + +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 | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Brite| Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | + * `-----------------------------------------------------------------------------------' + */ +[_QWERTY] = LAYOUT_ortho_5x12( + 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, 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_ortho_5x12( + 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_ortho_5x12( + 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 |ISO ~ |ISO | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | Next | Vol- | Vol+ | Play | + * `-----------------------------------------------------------------------------------' + */ +[_LOWER] = LAYOUT_ortho_5x12( + 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 + * ,-----------------------------------------------------------------------------------. + * | ` | 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_ortho_5x12( + 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_ortho_5x12( + 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, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL, + _______, _______, _______, _______, _______, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ +) + + +}; + +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; + 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 BACKLIT: + if (record->event.pressed) { + register_code(KC_RSFT); + #ifdef BACKLIGHT_ENABLE + backlight_step(); + #endif + } else { + unregister_code(KC_RSFT); + } + return false; + } + return true; +}; diff --git a/keyboards/ortho5by12/ortho5by12.c b/keyboards/ortho5by12/ortho5by12.c new file mode 100644 index 000000000000..615ab9d04eba --- /dev/null +++ b/keyboards/ortho5by12/ortho5by12.c @@ -0,0 +1,30 @@ +/* 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 "ortho5by12.h" + +void matrix_init_kb(void) { + setPinOutput(C4); + setPinOutput(C5); +} + +bool led_update_kb(led_t led_state) { + bool res = led_update_user(led_state); + if(res) { + writePin(C4, led_state.num_lock); + writePin(C5, led_state.caps_lock); + } + return res; +} diff --git a/keyboards/ortho5by12/ortho5by12.h b/keyboards/ortho5by12/ortho5by12.h new file mode 100644 index 000000000000..84f59859d8ec --- /dev/null +++ b/keyboards/ortho5by12/ortho5by12.h @@ -0,0 +1,57 @@ +/* Copyright 2019 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" + +#define LAYOUT_ortho_5x12( \ + 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, \ + K80, K81, K82, K83, K84, K85, K90, K91, K92, K93, K94, K95 \ +) { \ + { K01, K03, K05, K11, K13, K15 }, \ + { K00, K02, K04, K10, K12, K14 }, \ + { K20, K22, K24, K30, K32, K34 }, \ + { K21, K23, K25, K31, K33, K35 }, \ + { K41, K43, K45, K51, K53, K55 }, \ + { K40, K42, K44, K50, K52, K54 }, \ + { K60, K62, K64, K70, K72, K74 }, \ + { K61, K63, K65, K71, K73, K75 }, \ + { K81, K83, K85, K91, K93, K95 }, \ + { K80, K82, K84, K90, K92, K94 } \ +} + +#define LAYOUT_ortho_5x12_1x2uC( \ + 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, \ + K80, K81, K82, K83, K84, K85, K91, K92, K93, K94, K95 \ +) { \ + { K01, K03, K05, K11, K13, K15 }, \ + { K00, K02, K04, K10, K12, K14 }, \ + { K20, K22, K24, K30, K32, K34 }, \ + { K21, K23, K25, K31, K33, K35 }, \ + { K41, K43, K45, K51, K53, K55 }, \ + { K40, K42, K44, K50, K52, K54 }, \ + { K60, K62, K64, K70, K72, K74 }, \ + { K61, K63, K65, K71, K73, K75 }, \ + { K81, K83, K85, K91, K93, K95 }, \ + { K80, K82, K84, XXX, K92, K94 } \ +} diff --git a/keyboards/ortho5by12/readme.md b/keyboards/ortho5by12/readme.md new file mode 100644 index 000000000000..8d059bdf471a --- /dev/null +++ b/keyboards/ortho5by12/readme.md @@ -0,0 +1,55 @@ +# ortho5by12 // Through Hole + +A Plaid-style 5x12 design with two indicator LEDs. + +Uses a Schottky 1N4729A/3.6V diode. This is left out of the Plaid BOM which is identical, except for number of 1N4148 diodes (60+attrition). I recommend using 10k resistors for the LEDs instead of the Plaid's 1.5k to make them less glaring. I reckon hsgw was just trying to shave down the parts cost by re-using the 1.5kohm. + +I use a spare PCB as the backplate since it has the same dimensions. + +This was developed on Linux Mint so you'll have to adapt the commands yourself if you run anything else. + +pic here: https://www.reddit.com/r/MechanicalKeyboards/comments/g0ukw4/ortho5by12_through_hole/ + +* Keyboard Maintainer: [gipetto](https://github.com/itsnoteasy) +* Hardware Supported: ATmega328P with V-USB +* Hardware Availability: [PCB](https://github.com/itsnoteasy/misc/blob/master/ortho5by12.zip) + +Make example for this keyboard (after setting up your build environment): + + make ortho5by12:default + +Flash firmware: + + make ortho5by12:default:flash + +Bootloader doesn't seem to work for the time being. I deleted the last line in ortho5by12.hex and copied the USBasp bootloader onto the end in a text editor, then flashed over AVRISP using a Teensy 2.0 (following the [QMK ISP Flashing Guide](https://docs.qmk.fm/#/isp_flashing_guide)). I used a cut up MCU socket soldered to stripboard to make an ISP programming socket. Remember to make fuse in the USBasp directory on a new MCU. + +## ISP pinout: + + R4 + + Reset SCK MISO + + GND MOSI VCC + + C5 + +## A few build notes: + +I haven't found it easy to get into bootloader mode every time. sometimes there's no alternative but +to use the ISP header, or pull the IC. + +Put the switch diodes in with the banded end down towards the switches. This gives the fastest scan rate. If you don't and go by the silkscreen then you can swap COL2ROW/ROW2COL from whatever it currently is. The speed penalty is negligible anyway. The silkscreen is probably wrong, so do the component placement from KiCad nightly; it caught me out. +If you attempt to map the duplex matrix you will hate me so don't bother. I should have used one LED pin as an extra matrix pin, but in my naivete I thought it was used for a bootloader function. The duplexing is compensated for in a header file so you can use a standard Preonic keymap with any extra unavailable pins commented out. On the upside there's some funky twin LED code out there for Plaids which should be compatible. + +Boot and Reset switches have swapped position to my other PCB to ease routing - Boot is on the right. + +## Bootloader + +Use USBaspLoader from hsgw's 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/ortho5by12/rules.mk b/keyboards/ortho5by12/rules.mk new file mode 100644 index 000000000000..465c5184f619 --- /dev/null +++ b/keyboards/ortho5by12/rules.mk @@ -0,0 +1,34 @@ +# 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 + +# 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 +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +AUDIO_ENABLE = 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_HAS_RGB = no From f4ff225c004702b030f01ea0da98f9e966b7de80 Mon Sep 17 00:00:00 2001 From: Leon Anavi Date: Fri, 5 Jun 2020 10:48:58 +0300 Subject: [PATCH 094/930] [Keyboard] keyboards/anavi: Add ANAVI Macro Pad 8 (#9164) ANAVI Macro Pad 8 is an open source mini mechanical keyboard with 8 keys, backlit, addressable RGB WS2812B LED strip on the back and mini OLED display. Powered by ATmega 32U4 microcontroller and with microUSB connector. Co-authored-by: Drashna Jaelre Co-authored-by: Ryan Co-authored-by: James Young <18669334+noroadsleft@users.noreply.github.com> Co-authored-by: Joel Challis Signed-off-by: Leon Anavi --- keyboards/anavi/macropad8/config.h | 72 ++++++ keyboards/anavi/macropad8/glcdfont.c | 232 ++++++++++++++++++ keyboards/anavi/macropad8/info.json | 12 + .../anavi/macropad8/keymaps/default/keymap.c | 61 +++++ .../anavi/macropad8/keymaps/kodi/keymap.c | 68 +++++ keyboards/anavi/macropad8/macropad8.c | 1 + keyboards/anavi/macropad8/macropad8.h | 11 + keyboards/anavi/macropad8/readme.md | 18 ++ keyboards/anavi/macropad8/rules.mk | 32 +++ 9 files changed, 507 insertions(+) create mode 100644 keyboards/anavi/macropad8/config.h create mode 100644 keyboards/anavi/macropad8/glcdfont.c create mode 100644 keyboards/anavi/macropad8/info.json create mode 100644 keyboards/anavi/macropad8/keymaps/default/keymap.c create mode 100644 keyboards/anavi/macropad8/keymaps/kodi/keymap.c create mode 100644 keyboards/anavi/macropad8/macropad8.c create mode 100644 keyboards/anavi/macropad8/macropad8.h create mode 100644 keyboards/anavi/macropad8/readme.md create mode 100644 keyboards/anavi/macropad8/rules.mk diff --git a/keyboards/anavi/macropad8/config.h b/keyboards/anavi/macropad8/config.h new file mode 100644 index 000000000000..e517d909d8d7 --- /dev/null +++ b/keyboards/anavi/macropad8/config.h @@ -0,0 +1,72 @@ +/* +Copyright 2020 Leon Anavi + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License 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 0xCEEB +#define PRODUCT_ID 0x0001 +#define DEVICE_VER 0x0001 +#define MANUFACTURER ANAVI +#define PRODUCT Macro Pad 8 +#define DESCRIPTION 8-key mechanical keyboard/keypad/macropad with backlit, mini OLED display and RGB LED strip + +/* key matrix size */ +#define MATRIX_ROWS 2 +#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) + * NO_DIODE = switches are directly connected to AVR pins + * +*/ +#define DIRECT_PINS { \ + { D4, F6, B5, E6 }, \ + { F5, F7, B4, C6 } \ +} + +#define BACKLIGHT_PIN D7 +#define BACKLIGHT_BREATHING +#define BACKLIGHT_LEVELS 3 +#define RGBLIGHT_SLEEP + +#define UNUSED_PINS + +/* ws2812B RGB LED */ +#ifdef RGBLIGHT_ENABLE +# define RGB_DI_PIN F4 +# define RGBLIGHT_ANIMATIONS +# define RGBLED_NUM 4 +# define RGBLIGHT_HUE_STEP 10 +# define RGBLIGHT_SAT_STEP 17 +# define RGBLIGHT_VAL_STEP 17 +# define RGBLIGHT_LIMIT_VAL 255 +#endif + +#ifdef OLED_DRIVER_ENABLE +# define OLED_DISPLAY_128X64 +# define OLED_TIMEOUT 60000 +# define OLED_FONT_H "keyboards/anavi/macropad8/glcdfont.c" +#endif diff --git a/keyboards/anavi/macropad8/glcdfont.c b/keyboards/anavi/macropad8/glcdfont.c new file mode 100644 index 000000000000..10ce3b345737 --- /dev/null +++ b/keyboards/anavi/macropad8/glcdfont.c @@ -0,0 +1,232 @@ +#include "progmem.h" + +// 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, +}; diff --git a/keyboards/anavi/macropad8/info.json b/keyboards/anavi/macropad8/info.json new file mode 100644 index 000000000000..bcdbb9532e2c --- /dev/null +++ b/keyboards/anavi/macropad8/info.json @@ -0,0 +1,12 @@ +{ + "keyboard_name": "ANAVI Macro Pad 8", + "url": "", + "maintainer": "leon-anavi", + "width": 4, + "height": 2, + "layouts": { + "LAYOUT_ortho_2x4": { + "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}] + } + } +} diff --git a/keyboards/anavi/macropad8/keymaps/default/keymap.c b/keyboards/anavi/macropad8/keymaps/default/keymap.c new file mode 100644 index 000000000000..8cdf90280d46 --- /dev/null +++ b/keyboards/anavi/macropad8/keymaps/default/keymap.c @@ -0,0 +1,61 @@ +#include QMK_KEYBOARD_H + +#define _MAIN 0 +#define _FN 1 + +#define KC_X0 LT(_FN, KC_ESC) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_MAIN] = LAYOUT_ortho_2x4( + G(KC_D), KC_UP, C(KC_C), C(KC_V), + KC_LEFT, KC_DOWN, KC_RGHT, MO(_FN) + ), + + [_FN] = LAYOUT_ortho_2x4( + RGB_TOG, RGB_MOD, RGB_M_R, RGB_M_SN, + BL_TOGG, BL_STEP, BL_BRTG, _______ + ) +}; + +#ifdef OLED_DRIVER_ENABLE +oled_rotation_t oled_init_user(oled_rotation_t rotation) { + return OLED_ROTATION_180; // flips the display 180 degrees if offhand +} + +void oled_task_user(void) { + // Host Keyboard Layer Status + oled_write_ln_P(PSTR("ANAVI Macro Pad 8"), false); + oled_write_P(PSTR("Active layer:"), false); + + switch (get_highest_layer(layer_state)) { + case _MAIN: + oled_write_ln_P(PSTR("Main"), false); + break; + case _FN: + oled_write_ln_P(PSTR("FN"), false); + break; + default: + // Or use the write_ln shortcut over adding '\n' to the end of your string + oled_write_ln_P(PSTR("N/A"), false); + } + + // Host Keyboard LED Status + led_t led_state = host_keyboard_led_state(); + oled_write_P(PSTR("Num Lock: "), false); + oled_write_ln_P(led_state.num_lock ? PSTR("On") : PSTR("Off"), false); + oled_write_P(PSTR("Caps Lock: "), false); + oled_write_ln_P(led_state.caps_lock ? PSTR("On") : PSTR("Off"), false); + oled_write_P(PSTR("Scroll Lock: "), false); + oled_write_ln_P(led_state.scroll_lock ? PSTR("On") : PSTR("Off"), false); + oled_write_P(PSTR("Backlit: "), false); + oled_write_ln_P(is_backlight_enabled() ? PSTR("On") : PSTR("Off"), false); +#ifdef RGBLIGHT_ENABLE + static char rgbStatusLine1[26] = {0}; + snprintf(rgbStatusLine1, sizeof(rgbStatusLine1), "RGB Mode: %d", rgblight_get_mode()); + oled_write_ln(rgbStatusLine1, false); + static char rgbStatusLine2[26] = {0}; + snprintf(rgbStatusLine2, sizeof(rgbStatusLine2), "h:%d s:%d v:%d", rgblight_get_hue(), rgblight_get_sat(), rgblight_get_val()); + oled_write_ln(rgbStatusLine2, false); +#endif +} +#endif diff --git a/keyboards/anavi/macropad8/keymaps/kodi/keymap.c b/keyboards/anavi/macropad8/keymaps/kodi/keymap.c new file mode 100644 index 000000000000..17b00807e46f --- /dev/null +++ b/keyboards/anavi/macropad8/keymaps/kodi/keymap.c @@ -0,0 +1,68 @@ +#include QMK_KEYBOARD_H + +#define _MAIN 0 +#define _FN 1 + +#define KC_X0 LT(_FN, KC_ESC) + +#ifdef RGBLIGHT_ENABLE +// How long (in ms) to wait between animation steps for the rainbow mode +const uint8_t RGBLED_RAINBOW_MOOD_INTERVALS[] PROGMEM = {60, 30, 15}; +// How long (in milliseconds) to wait between animation steps for each of the "Swirling rainbow" animations +const uint8_t RGBLED_RAINBOW_SWIRL_INTERVALS[] PROGMEM = {20, 10, 4}; +#endif + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_MAIN] = LAYOUT_ortho_2x4( + KC_ESC, KC_UP, KC_ENTER, KC_X, + KC_LEFT, KC_DOWN, KC_RIGHT, MO(_FN) + ), + + [_FN] = LAYOUT_ortho_2x4( + RGB_TOG, RGB_MOD, RGB_M_R, RGB_M_SN, + BL_TOGG, BL_STEP, BL_BRTG, _______ + ) +}; + +#ifdef OLED_DRIVER_ENABLE +oled_rotation_t oled_init_user(oled_rotation_t rotation) { + return OLED_ROTATION_180; // flips the display 180 degrees if offhand +} + +void oled_task_user(void) { + // Host Keyboard Layer Status + oled_write_ln_P(PSTR("ANAVI Macro Pad 8"), false); + oled_write_P(PSTR("Active layer:"), false); + + switch (get_highest_layer(layer_state)) { + case _MAIN: + oled_write_ln_P(PSTR("Main"), false); + break; + case _FN: + oled_write_ln_P(PSTR("FN"), false); + break; + default: + // Or use the write_ln shortcut over adding '\n' to the end of your string + oled_write_ln_P(PSTR("N/A"), false); + } + + // Host Keyboard LED Status + led_t led_state = host_keyboard_led_state(); + oled_write_P(PSTR("Num Lock: "), false); + oled_write_ln_P(led_state.num_lock ? PSTR("On") : PSTR("Off"), false); + oled_write_P(PSTR("Caps Lock: "), false); + oled_write_ln_P(led_state.caps_lock ? PSTR("On") : PSTR("Off"), false); + oled_write_P(PSTR("Scroll Lock: "), false); + oled_write_ln_P(led_state.scroll_lock ? PSTR("On") : PSTR("Off"), false); + oled_write_P(PSTR("Backlit: "), false); + oled_write_ln_P(is_backlight_enabled() ? PSTR("On") : PSTR("Off"), false); +#ifdef RGBLIGHT_ENABLE + static char rgbStatusLine1[26] = {0}; + snprintf(rgbStatusLine1, sizeof(rgbStatusLine1), "RGB Mode: %d", rgblight_get_mode()); + oled_write_ln(rgbStatusLine1, false); + static char rgbStatusLine2[26] = {0}; + snprintf(rgbStatusLine2, sizeof(rgbStatusLine2), "h:%d s:%d v:%d", rgblight_get_hue(), rgblight_get_sat(), rgblight_get_val()); + oled_write_ln(rgbStatusLine2, false); +#endif +} +#endif diff --git a/keyboards/anavi/macropad8/macropad8.c b/keyboards/anavi/macropad8/macropad8.c new file mode 100644 index 000000000000..2859cd042dfa --- /dev/null +++ b/keyboards/anavi/macropad8/macropad8.c @@ -0,0 +1 @@ +#include "macropad8.h" diff --git a/keyboards/anavi/macropad8/macropad8.h b/keyboards/anavi/macropad8/macropad8.h new file mode 100644 index 000000000000..3ebee830d31e --- /dev/null +++ b/keyboards/anavi/macropad8/macropad8.h @@ -0,0 +1,11 @@ +#pragma once + +#include "quantum.h" + +#define LAYOUT_ortho_2x4( \ + k01, k02, k03, k04, \ + k05, k06, k07, k08 \ + ) { \ + { k01, k02, k03, k04 }, \ + { k05, k06, k07, k08 } \ +} diff --git a/keyboards/anavi/macropad8/readme.md b/keyboards/anavi/macropad8/readme.md new file mode 100644 index 000000000000..20af445854f4 --- /dev/null +++ b/keyboards/anavi/macropad8/readme.md @@ -0,0 +1,18 @@ +# ANAVI Macro Pad 8 + + +ANAVI Macro Pad 8 is an open source mini mechanical keyboard with 8 keys, backlit, addressable RGB WS2812B LED strip on the back and mini OLED display. Powered by ATmega32U4 microcontroller and with microUSB connector. + +* Keyboard Maintainer: [Leon Anavi](https://github.com/leon-anavi) +* Hardware Supported: ANAVI Macro Pad 8 +* Hardware Availability: [PCB Files](https://github.com/AnaviTechnology/anavi-macro-pad-8) + +Make example for this keyboard (after setting up your build environment): + + qmk compile -kb anavi/macropad8 -km default + +Flash to ANAVI Macro Pad 8: + + qmk flash -kb anavi/macropad8 -km 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/anavi/macropad8/rules.mk b/keyboards/anavi/macropad8/rules.mk new file mode 100644 index 000000000000..498c27a209f0 --- /dev/null +++ b/keyboards/anavi/macropad8/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 = 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 = no # Audio output on port C6 +UNICODE_ENABLE = yes # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. +OLED_DRIVER_ENABLE = yes # Enable Support for SSD1306 or SH1106 OLED Displays; Communicating over I2C + +# 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 9219f9e724ed57d4e7488c1db00c5ad08d713585 Mon Sep 17 00:00:00 2001 From: Abi Shalom Date: Fri, 5 Jun 2020 03:46:28 -0500 Subject: [PATCH 095/930] Changes to abishalom Tada68 keymap (#9278) * Changes to abishalom Tada68 keymap * Update keyboards/tada68/keymaps/abishalom/rules.mk --- keyboards/tada68/keymaps/abishalom/keymap.c | 43 ++++---------------- keyboards/tada68/keymaps/abishalom/readme.md | 4 +- keyboards/tada68/keymaps/abishalom/rules.mk | 9 ++-- 3 files changed, 15 insertions(+), 41 deletions(-) diff --git a/keyboards/tada68/keymaps/abishalom/keymap.c b/keyboards/tada68/keymaps/abishalom/keymap.c index 94217948e033..010d5067910e 100644 --- a/keyboards/tada68/keymaps/abishalom/keymap.c +++ b/keyboards/tada68/keymaps/abishalom/keymap.c @@ -6,7 +6,6 @@ // entirely and just use numbers. #define _BL 0 #define _FL 1 -#define _NL 2 #define SEMI_FN LT(_FL, KC_SCLN) @@ -15,8 +14,6 @@ enum { TD_WIN_LOCK = 0 }; -//BL_BRTG - breathing mode. Would like to put in. - //Tap Dance Definitions qk_tap_dance_action_t tap_dance_actions[] = { [TD_WIN_LOCK] = ACTION_TAP_DANCE_DOUBLE(MAGIC_NO_GUI, MAGIC_UNNO_GUI) @@ -26,7 +23,6 @@ qk_tap_dance_action_t tap_dance_actions[] = { ////In Layer declaration, add tap dance item in place of a key code //TD(TD_WIN_LOCK) -// Double Tap Fn button to get caps. FN + Tab to get to number layer -> Maybe switch to FN + space?. // Press fn+GUI once to lock, double tap to unlock. const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { @@ -52,45 +48,22 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Keymap _FL: Function Layer * ,----------------------------------------------------------------. - * | | F1|F2 |F3 |F4 |F5 |F6 |F7 |F8 |F9 |F10|F11|F12|Del | | + * | ` | F1|F2 |F3 |F4 |F5 |F6 |F7 |F8 |F9 |F10|F11|F12|Del | | * |----------------------------------------------------------------| - * |#PAD |Pre| U |NXT| | | |PGD| U |PGU|PSC| | | |Ins | + * | |Pre| U |NXT| | | |PGD| U |PGU|PSC| | | |Ins | * |----------------------------------------------------------------| - * | |L | D | R |PPl| | | L | D | R | | | |Home| + * | |MUT|VU-|VU+|PPl| | | L | D | R | | | |Home| * |----------------------------------------------------------------| - * | CAPS |MUT|VU-|VU+| | | |BRG|BL-|BL+|BLT| |Stp|End | + * | | |BRG|BL-|BL+|BLT| | | | | | |Stp|End | * |----------------------------------------------------------------| * | |WTOG| | | | | |Pre|PPl|Nxt | * `----------------------------------------------------------------' */ [_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, _______ , \ - TO(_NL),KC_MPRV, KC_UP ,KC_MNXT,_______, _______,_______,KC_PGDN,KC_UP,KC_PGUP,KC_PSCR,_______,_______, _______,KC_INSERT, \ - _______,KC_LEFT,KC_DOWN,KC_RGHT,KC_MPLY,_______,_______,KC_LEFT,KC_DOWN,KC_RGHT,_______,_______, _______,KC_HOME, \ - _______,KC_MUTE,KC_VOLD,KC_VOLU, _______,_______, _______,BL_BRTG,BL_DEC,BL_INC,BL_TOGG,_______, KC_STOP, KC_END, \ + 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_MPRV,KC_MNXT,_______, _______,_______,KC_PGDN,KC_UP,KC_PGUP,KC_PSCR,_______,_______, _______,KC_INSERT, \ + _______,KC_MUTE,KC_VOLD,KC_VOLU,KC_MPLY,_______,_______,KC_LEFT,KC_DOWN,KC_RGHT,_______,_______, _______,KC_HOME, \ + _______,_______,BL_BRTG,BL_DEC, BL_INC,BL_TOGG, _______,_______,_______,_______,_______,_______, KC_STOP, KC_END, \ _______,TD(TD_WIN_LOCK),_______, _______, _______,KC_TRNS,_______,KC_MPRV,KC_MPLY, KC_MNXT), - -//Press either of function keys to get back to base layer. - - /* Keymap _NL: Number Layer - * ,----------------------------------------------------------------. - * |ESC| F1 | F2| F3| F4| |#L | 7 | 8 | 9 | - | | = | | | - * |----------------------------------------------------------------| - * | TAB | | UP| | | | / | 4 | 5 | 6 | + | | | | DEL| - * |----------------------------------------------------------------| - * | _BL |LFT|DWN|RGT| | | * | 1 | 2 | 3 |ENT| | ENT |PgUp| - * |----------------------------------------------------------------| - * | SHIFT | | | | | | 0 | 0 | , | . |BKS| SHIFT| U |PgDn| - * |----------------------------------------------------------------| - * |CTRL|WIN |ALT | |ALT| _BL |CTRL| L | D | R| - * `----------------------------------------------------------------' - */ -[_NL] = LAYOUT_ansi( - _______, KC_F1 ,KC_F2, KC_F3, KC_F4, _______, KC_NLCK, KC_P7, KC_P8, KC_P9, KC_PMNS, KC_PEQL, KC_PEQL, _______, _______ , \ - KC_TAB,_______, KC_UP,_______,_______, _______,KC_PSLS,KC_P4,KC_P5,KC_P6,KC_PPLS,_______,_______, _______,KC_DEL, \ - TO(_BL),KC_LEFT,KC_DOWN,KC_RGHT,_______,_______,KC_PAST,KC_P1,KC_P2,KC_P3,KC_PENT,_______, KC_ENT,KC_PGUP, \ - KC_LSFT,_______,_______,_______, _______,_______, KC_P0,KC_P0,KC_PCMM,KC_PDOT,KC_BSPC,KC_RSFT, KC_UP, KC_PGDN, \ - KC_LCTRL,KC_LGUI,KC_LALT, KC_SPC, KC_RALT,TO(_BL),KC_RCTRL,KC_LEFT,KC_DOWN, KC_RGHT), - }; diff --git a/keyboards/tada68/keymaps/abishalom/readme.md b/keyboards/tada68/keymaps/abishalom/readme.md index 511704223ba7..e0a852fbbf0d 100644 --- a/keyboards/tada68/keymaps/abishalom/readme.md +++ b/keyboards/tada68/keymaps/abishalom/readme.md @@ -1,6 +1,6 @@ -# Godolphins13 Tada68 +# abishalom Tada68 My Tada68 layout. Caps lock acts as a function key when held, otherwise just caps lock. -In the function layer, arrow keys mapped to both wasd and ijkl, as I haven't really decided which I like best. +In the function layer, arrow keys mapped to ijkl, while the wasd keys used for media controls. diff --git a/keyboards/tada68/keymaps/abishalom/rules.mk b/keyboards/tada68/keymaps/abishalom/rules.mk index b3eaa6215011..1112b40d7b1a 100644 --- a/keyboards/tada68/keymaps/abishalom/rules.mk +++ b/keyboards/tada68/keymaps/abishalom/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 = 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 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 @@ -16,3 +16,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 = yes # Breathing sleep LED during USB suspend TAP_DANCE_ENABLE = yes # Tappa Dance Bitch +VIA_ENABLE = yes From c12e429da28399004dddcf2c67f7cb4bca8d28e4 Mon Sep 17 00:00:00 2001 From: MakotoKurauchi Date: Fri, 5 Jun 2020 17:49:16 +0900 Subject: [PATCH 096/930] [Keymap] add keymap for meishi2 (#9270) * add keymap "led_status" * modified readme * Update keyboards/meishi2/keymaps/led_status/keymap.c * I modified the code to be simple. * Update keyboards/meishi2/keymaps/led_status/keymap.c --- keyboards/meishi2/keymaps/led_status/keymap.c | 36 +++++++++++++++++++ .../meishi2/keymaps/led_status/readme.md | 3 ++ 2 files changed, 39 insertions(+) create mode 100644 keyboards/meishi2/keymaps/led_status/keymap.c create mode 100644 keyboards/meishi2/keymaps/led_status/readme.md diff --git a/keyboards/meishi2/keymaps/led_status/keymap.c b/keyboards/meishi2/keymaps/led_status/keymap.c new file mode 100644 index 000000000000..fb8a33930f3f --- /dev/null +++ b/keyboards/meishi2/keymaps/led_status/keymap.c @@ -0,0 +1,36 @@ +/* Copyright 2019 Biacco42 + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public 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 PRO_MICRO_LED_TX D5 +#define PRO_MICRO_LED_RX B0 + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT( /* Base */ + LCTL(KC_Z), LCTL(KC_X), LCTL(KC_C), LCTL(KC_V) + ) +}; + +void matrix_init_user(void) { + setPinOutput(PRO_MICRO_LED_TX); + setPinOutput(PRO_MICRO_LED_RX); +} + +bool led_update_user(led_t led_state) { + writePin(PRO_MICRO_LED_TX, !led_state.num_lock); + writePin(PRO_MICRO_LED_RX, !led_state.caps_lock); + return true; +} diff --git a/keyboards/meishi2/keymaps/led_status/readme.md b/keyboards/meishi2/keymaps/led_status/readme.md new file mode 100644 index 000000000000..802ada91db17 --- /dev/null +++ b/keyboards/meishi2/keymaps/led_status/readme.md @@ -0,0 +1,3 @@ +# modified keymap for meishi2 + +The LED on Pro Micro lights up when CAPS LOCK and NUM LOCK are in place. From d03bc3a9c185f97d3813758e7f6df7c879f42ad0 Mon Sep 17 00:00:00 2001 From: Joshua Diamond Date: Fri, 5 Jun 2020 05:01:47 -0400 Subject: [PATCH 097/930] Major enhancements to spidey3 keymaps and userspace (#9261) * Add Chrome OS specific keys to 75_ansi/spidey3 * Clean up duplicative settings in rules.mk * Refactor spidey3 userspace to use rgb layer blink * Blink green on wakeup * Improve _FN layer indicator * Glyph transformation modes: wide, script, fraktur, and enclosed characters * Add spider unicode glyph * Fix compile error when NO_ACTION_ONESHOT * Add a few more emoji * Further refinement of lighting layer usage * Fix reversed yes/no ack * Lighting layers override RGB off * Fix missing wide and incorrect script numbers * Add LOL and surprise emoji * Add missing break in switch statement * Trim firmware size * Use usage ID definitions in report.h * Some minor whitespace cleanup * Disable some unused features to reduce firmware size * Print version on startup * Seed rand() on first keystroke * Add a key to immediately sleep CrOS * Switch to Bootmagic Lite * Trim down firmware size a little bit more * Make RGBLIGHT_MODE_TWINKLE+4 my default * Scan rate debug / fix version printing Delay printing version on startup (console may not be ready) Better scan rate reporting * Disable locking caps, etc. to save more space * Enable LTO * Better seed for rand() * Set MAX_LAYER for some performance improvement * Another scan rate improvement * Set manufacturer * New startup animation * Add GUI lock for F-keys (for CrOS) * Add visual indication for glyph replacement and F-keys GUI lock * Some cleanup; run cformat on spidey3 userspace * Cycle between debug verbosity options * Fix disable RGB Lighting after wakeup on Mac --- layouts/community/75_ansi/spidey3/config.h | 9 + layouts/community/75_ansi/spidey3/keymap.c | 9 +- layouts/community/75_ansi/spidey3/rules.mk | 8 +- users/spidey3/config.h | 18 ++ users/spidey3/init.c | 20 +- users/spidey3/layer_rgb.c | 311 +++++++++++++++------ users/spidey3/rules.mk | 2 + users/spidey3/spidey3.c | 271 +++++++++++++++--- users/spidey3/spidey3.h | 72 +++-- users/spidey3/unicode.c | 30 +- users/spidey3/unicode.h | 13 +- 11 files changed, 584 insertions(+), 179 deletions(-) create mode 100644 layouts/community/75_ansi/spidey3/config.h diff --git a/layouts/community/75_ansi/spidey3/config.h b/layouts/community/75_ansi/spidey3/config.h new file mode 100644 index 000000000000..7fe098f0e8a8 --- /dev/null +++ b/layouts/community/75_ansi/spidey3/config.h @@ -0,0 +1,9 @@ +#pragma once + +#define NO_ACTION_ONESHOT +#define NO_ACTION_MACRO +#define NO_ACTION_FUNCTION +#undef LOCKING_SUPPORT_ENABLE + +#define LAYER_STATE_8BIT +#define MAX_LAYER 4 diff --git a/layouts/community/75_ansi/spidey3/keymap.c b/layouts/community/75_ansi/spidey3/keymap.c index fbb6a980621c..aaa93ee2d029 100644 --- a/layouts/community/75_ansi/spidey3/keymap.c +++ b/layouts/community/75_ansi/spidey3/keymap.c @@ -1,6 +1,5 @@ #include "spidey3.h" -#define CH_MENU A(S(KC_S)) #define OSX_PSC G(S(KC_4)) #define FN_MENU LT(_FN,KC_APP) @@ -34,11 +33,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), // FN [_FN] = LAYOUT_75_ansi( - RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_SLEP, KC_WAKE, KC_PWR, - EEP_RST, _______, _______, _______, _______, _______, _______, _______, X_BUL, KC_MPRV, KC_MNXT, X_DASH, _______, KC_PAUS, KC_SLCK, + RESET, SPI_NORMAL, SPI_WIDE, SPI_SCRIPT, SPI_BLOCKS, SPI_CIRCLE, SPI_SQUARE, SPI_PARENS, SPI_FRAKTR, _______, _______, _______, SPI_GFLOCK, KC_SLEP, KC_WAKE, KC_PWR, + EEP_RST, X(SAD), X(MEH), X(HAPPY), X(ANGRY), X(THUMBDN), X(THUMBUP), X(SPIDER), X_BUL, X(LOL), X(SURPRISE),X_DASH, _______, KC_PAUS, KC_SLCK, _______, RGB_TOG, RGB_MOD, RGB_HUD, RGB_HUI, RGB_SAD, RGB_SAI, RGB_VAD, RGB_VAI, RGB_SPD, RGB_SPI, VLK_TOG, _______, _______, KC_BRIU, _______, RGB_M_P, RGB_M_B, RGB_M_R, RGB_M_SW, RGB_M_SN, RGB_M_K, RGB_M_G, RGB_M_T, SPI_LNX, _______, _______, _______, KC_BRID, - _______, SPI_GLO, _______, SPI_WIN, _______, NK_TOGG, TG(_NUMPAD),SPI_OSX, X(LARR), X(RARR), DEBUG, _______, KC_VOLU, KC_MUTE, - _______, _______, _______, KC_MPLY, KC_APP, _______, CH_MENU, KC_MPRV, KC_VOLD, KC_MNXT + _______, SPI_GLO, CH_SUSP, SPI_WIN, _______, NK_TOGG, TG(_NUMPAD),SPI_OSX, X(LARR), X(RARR), DEBUG, _______, KC_VOLU, KC_MUTE, + _______, _______, _______, KC_MPLY, CH_ASST, _______, CH_CPNL, KC_MPRV, KC_VOLD, KC_MNXT ) }; diff --git a/layouts/community/75_ansi/spidey3/rules.mk b/layouts/community/75_ansi/spidey3/rules.mk index fdb44b3ea55d..7d5c56841e0b 100644 --- a/layouts/community/75_ansi/spidey3/rules.mk +++ b/layouts/community/75_ansi/spidey3/rules.mk @@ -1,18 +1,12 @@ # 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 = 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 BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality -AUDIO_ENABLE = no -RGBLIGHT_ENABLE = yes UNICODEMAP_ENABLE = yes VELOCIKEY_ENABLE = yes +GRAVE_ESC_ENABLE = no # The following disabled to save space SPACE_CADET_ENABLE = no diff --git a/users/spidey3/config.h b/users/spidey3/config.h index 9da7f5530259..053240718e67 100644 --- a/users/spidey3/config.h +++ b/users/spidey3/config.h @@ -3,3 +3,21 @@ #define LED_DISABLE_WHEN_USB_SUSPENDED true #define RGB_DISABLE_WHEN_USB_SUSPENDED true #define RGBLIGHT_LAYERS +#define RGBLIGHT_MAX_LAYERS 16 +#define RGBLIGHT_LAYER_BLINK +#define RGBLIGHT_LAYERS_OVERRIDE_RGB_OFF + +#undef RGBLIGHT_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_STATIC_GRADIENT +#define RGBLIGHT_EFFECT_ALTERNATING +#define RGBLIGHT_EFFECT_TWINKLE + +#define SPI_DEBUG_SCAN_RATE + +#undef MANUFACTURER +#define MANUFACTURER Window of Fire diff --git a/users/spidey3/init.c b/users/spidey3/init.c index b9239460934c..273c2b28992f 100644 --- a/users/spidey3/init.c +++ b/users/spidey3/init.c @@ -1,30 +1,28 @@ #include "spidey3.h" void keyboard_post_init_user(void) { - print("keyboard_post_init_user\n"); - uprintf("\tdebug_enable=%u\n", debug_enable); #ifdef RGBLIGHT_ENABLE - keyboard_post_init_user_rgb(); + keyboard_post_init_user_rgb(); #endif } void eeconfig_init_user(void) { - print("eeconfig_init_user\n"); - set_single_persistent_default_layer(_BASE); + print("eeconfig_init_user\n"); + set_single_persistent_default_layer(_BASE); #ifdef UNICODEMAP_ENABLE - eeconfig_init_user_unicode(); + eeconfig_init_user_unicode(); #endif #ifdef RGBLIGHT_ENABLE - eeconfig_init_user_rgb(); + eeconfig_init_user_rgb(); #endif } void shutdown_user() { #ifdef RGBLIGHT_ENABLE - clear_rgb_layers(); - rgblight_enable(); - rgblight_mode_noeeprom(RGBLIGHT_MODE_STATIC_LIGHT); - rgblight_sethsv_noeeprom(HSV_RED); + clear_rgb_layers(); + rgblight_enable(); + rgblight_mode_noeeprom(RGBLIGHT_MODE_STATIC_LIGHT); + rgblight_sethsv_noeeprom(HSV_RED); #endif } diff --git a/users/spidey3/layer_rgb.c b/users/spidey3/layer_rgb.c index 75e66384e272..160cc43174d8 100644 --- a/users/spidey3/layer_rgb.c +++ b/users/spidey3/layer_rgb.c @@ -5,127 +5,280 @@ uint32_t rgb_mode; uint16_t rgb_hue; -uint8_t rgb_sat; -uint8_t rgb_val; -bool rgb_saved = 0; - -void spidey_swirl(void) { - dprint("Setting Spidey Swirl!\n"); - rgblight_enable(); - rgblight_mode(RGBLIGHT_MODE_RAINBOW_SWIRL); - rgblight_sethsv(213, 255, 128); +uint8_t rgb_sat; +uint8_t rgb_val; +bool rgb_saved = 0; + +void spidey_glow(void) { + rgblight_enable(); + rgblight_mode(RGBLIGHT_MODE_TWINKLE + 4); + rgblight_sethsv(213, 255, 128); #ifdef VELOCIKEY_ENABLE - if (!velocikey_enabled()) - velocikey_toggle(); + if (velocikey_enabled()) velocikey_toggle(); #endif } -void eeconfig_init_user_rgb(void) -{ - spidey_swirl(); -} +void eeconfig_init_user_rgb(void) { spidey_glow(); } + +// clang-format off + +// Convenience macros +#define CORNER_BL(color) { 0, 1, color } +#define CORNER_BR(color) { RGBLED_NUM / 2 - 1, 1, color } +#define CORNER_FR(color) { RGBLED_NUM / 2, 1, color } +#define CORNER_FL(color) { RGBLED_NUM - 1, 1, color } +#define CORNERS(color) {0, 1, color}, {RGBLED_NUM / 2 - 1, 2, color}, { RGBLED_NUM - 1, 1, color } +#define FRONT(inset, color) { RGBLED_NUM / 2 + inset, RGBLED_NUM / 2 - 2 * inset, color } +#define BACK(inset, color) { inset, RGBLED_NUM / 2 - 2 * inset, color } + +#define LAYER_OFFSET 0 +const rgblight_segment_t PROGMEM _layer1_layer[] = RGBLIGHT_LAYER_SEGMENTS(CORNER_BR(HSV_PURPLE)); +const rgblight_segment_t PROGMEM _layer2_layer[] = RGBLIGHT_LAYER_SEGMENTS(CORNERS(HSV_MAGENTA)); +const rgblight_segment_t PROGMEM _layer3_layer[] = RGBLIGHT_LAYER_SEGMENTS(CORNERS(HSV_GREEN)); + +#define LOCK_OFFSET 3 +const rgblight_segment_t PROGMEM _numlock_layer[] = RGBLIGHT_LAYER_SEGMENTS(FRONT(3, HSV_YELLOW)); +const rgblight_segment_t PROGMEM _capslock_layer[] = RGBLIGHT_LAYER_SEGMENTS(CORNER_FL(HSV_AZURE)); +const rgblight_segment_t PROGMEM _scrolllock_layer[] = RGBLIGHT_LAYER_SEGMENTS(CORNER_FR(HSV_ORANGE)); + +#define MISC_OFFSET 6 +const rgblight_segment_t PROGMEM _gflock_layer[] = RGBLIGHT_LAYER_SEGMENTS(BACK(1, HSV_ORANGE)); +const rgblight_segment_t PROGMEM _glyphreplace_layer[] = RGBLIGHT_LAYER_SEGMENTS(FRONT(1, HSV_ORANGE)); + +#define ACK_OFFSET 8 +const rgblight_segment_t PROGMEM _no_layer[] = RGBLIGHT_LAYER_SEGMENTS(FRONT(1, HSV_RED)); +const rgblight_segment_t PROGMEM _yes_layer[] = RGBLIGHT_LAYER_SEGMENTS(FRONT(1, HSV_GREEN)); +const rgblight_segment_t PROGMEM _meh_layer[] = RGBLIGHT_LAYER_SEGMENTS(FRONT(1, HSV_YELLOW)); + +// Now define the array of layers. Higher numbered layers take precedence. +const rgblight_segment_t *const PROGMEM _rgb_layers[] = { + [LAYER_OFFSET + 0] = _layer1_layer, + [LAYER_OFFSET + 1] = _layer2_layer, + [LAYER_OFFSET + 2] = _layer3_layer, + + [LOCK_OFFSET + USB_LED_NUM_LOCK] = _numlock_layer, + [LOCK_OFFSET + USB_LED_CAPS_LOCK] = _capslock_layer, + [LOCK_OFFSET + USB_LED_SCROLL_LOCK] = _scrolllock_layer, + + [MISC_OFFSET + 0] = _gflock_layer, + [MISC_OFFSET + 1] = _glyphreplace_layer, + + [ACK_OFFSET + ACK_NO] = _no_layer, + [ACK_OFFSET + ACK_YES] = _yes_layer, + [ACK_OFFSET + ACK_MEH] = _meh_layer, -const rgblight_segment_t PROGMEM _capslock_layer[] = RGBLIGHT_LAYER_SEGMENTS( {0, 2, HSV_AZURE}, {14, 2, HSV_AZURE} ); -const rgblight_segment_t PROGMEM _layer1_layer[] = RGBLIGHT_LAYER_SEGMENTS( {7, 1, HSV_PURPLE} ); -const rgblight_segment_t PROGMEM _layer2_layer[] = RGBLIGHT_LAYER_SEGMENTS( {10, 3, HSV_MAGENTA} ); -const rgblight_segment_t PROGMEM _layer3_layer[] = RGBLIGHT_LAYER_SEGMENTS( {10, 1, HSV_GREEN} ); -const rgblight_segment_t PROGMEM _yes_layer[] = RGBLIGHT_LAYER_SEGMENTS( {9, 6, HSV_GREEN} ); -const rgblight_segment_t PROGMEM _no_layer[] = RGBLIGHT_LAYER_SEGMENTS( {9, 6, HSV_RED} ); + [ACK_OFFSET + ACK_MEH + 1] = NULL +}; + +// clang-format on -// Now define the array of layers. Later layers take precedence -const rgblight_segment_t* const PROGMEM _rgb_layers[] = - RGBLIGHT_LAYERS_LIST( _capslock_layer, _layer1_layer, _layer2_layer, _layer3_layer, _yes_layer, _no_layer ); const uint8_t PROGMEM _n_rgb_layers = sizeof(_rgb_layers) / sizeof(_rgb_layers[0]) - 1; void clear_rgb_layers() { - for (uint8_t i=0; i<_n_rgb_layers; i++) { + dprint("clear_rgb_layers()\n"); + for (uint8_t i = 0; i < _n_rgb_layers; i++) { rgblight_set_layer_state(i, false); } } void do_rgb_layers(layer_state_t state, uint8_t start, uint8_t end) { - dprint("do_rgb_layers()\n"); - for (uint8_t i=start; i 0; i -= STARTUP_ANIMATION_STEP) { + rgblight_sethsv_noeeprom((i + old_hue) % 255, STARTUP_ANIMATION_SATURATION, STARTUP_ANIMATION_VALUE); + matrix_scan(); + wait_ms(10); + } + + if (ramp_down) { + dprintln("ramp_down"); + for (uint8_t i = STARTUP_ANIMATION_VALUE; i > 0; i -= STARTUP_ANIMATION_STEP) { + rgblight_sethsv_noeeprom(old_hue, STARTUP_ANIMATION_SATURATION, i); + matrix_scan(); + wait_ms(10); + } + } else if (ramp_to) { + dprintf("ramp_to s=%u, v=%u\n", old_sat, old_val); + uint8_t steps = 50; + for (uint8_t i = 0; i < steps; i++) { + uint8_t s = STARTUP_ANIMATION_SATURATION + i * (((float)old_sat - STARTUP_ANIMATION_SATURATION) / (float)steps); + uint8_t v = STARTUP_ANIMATION_VALUE + i * (((float)old_val - STARTUP_ANIMATION_VALUE) / (float)steps); + rgblight_sethsv_noeeprom(old_hue, s, v); + matrix_scan(); + wait_ms(10); + } + } + rgblight_mode_noeeprom(old_mode); + } + if (is_enabled) { + rgblight_sethsv_noeeprom(old_hue, old_sat, old_val); + } else { + rgblight_disable_noeeprom(); + // Hack! + // rgblight_sethsv_noeeprom() doesn't update these if rgblight is disabled, + // but if do it before disabling we get an ugly flash. + rgblight_config.hue = old_hue; + rgblight_config.sat = old_sat; + rgblight_config.val = old_val; + } + dprint("done\n"); + startup_animation_done = true; + } } layer_state_t default_layer_state_set_user_rgb(layer_state_t state) { - dprint("default_layer_state_set_user_rgb()\n"); - do_rgb_layers(state, 1u, RGB_LAYER_BASE_REGULAR); + do_rgb_layers(state, 1u, LAYER_BASE_REGULAR); return state; } layer_state_t layer_state_set_user_rgb(layer_state_t state) { - dprint("layer_state_set_user_rgb()\n"); - do_rgb_layers(state, RGB_LAYER_BASE_REGULAR, RGB_LAYER_BASE_ACKS); + do_rgb_layers(state, LAYER_BASE_REGULAR, LAYER_BASE_END); return state; } bool led_update_user_rgb(led_t led_state) { - dprintf("caps_lock=%u\n", led_state.caps_lock); - rgblight_set_layer_state(0, led_state.caps_lock); + dprintf("num=%u, cap=%u, scl=%u, cmp=%u, kan=%u\n", led_state.num_lock, led_state.caps_lock, led_state.scroll_lock, led_state.compose, led_state.kana); + + rgblight_set_layer_state(LOCK_OFFSET + USB_LED_NUM_LOCK, led_state.num_lock); + rgblight_set_layer_state(LOCK_OFFSET + USB_LED_CAPS_LOCK, led_state.caps_lock); + rgblight_set_layer_state(LOCK_OFFSET + USB_LED_SCROLL_LOCK, led_state.scroll_lock); + return true; } -void rgb_layer_ack(bool yn, bool pressed) { - uint8_t layer = RGB_LAYER_BASE_ACKS + (yn ? 0 : 1); - rgblight_set_layer_state(layer, pressed); +void rgb_layer_ack_yn(bool yn) { rgb_layer_ack(yn ? ACK_YES : ACK_NO); } + +void rgb_layer_ack(layer_ack_t n) { + uint8_t layer = ACK_OFFSET + n; + dprintf("rgb_layer_ack(%u) ==> %u\n", n, layer); + rgblight_blink_layer(layer, RGB_LAYER_ACK_DURATION); } -extern keymap_config_t keymap_config; +extern keymap_config_t keymap_config; +extern rgblight_config_t rgblight_config; + +extern bool spi_gflock; +extern uint16_t spi_replace_mode; bool process_record_user_rgb(uint16_t keycode, keyrecord_t *record) { - bool pressed = record->event.pressed; - - switch (keycode) { - case SPI_GLO: - if (pressed) { - spidey_swirl(); - } - return false; - - // Acks follow... - case DEBUG: - rgb_layer_ack(debug_enable, pressed); - return false; - - case SPI_LNX: - case SPI_OSX: - case SPI_WIN: - rgb_layer_ack(true, pressed); - return false; - - // Tricky! - // For these, on press the toggle hasn't happened yet, - // so we need a little logic to invert, assuming that - // on key press the flag WILL be toggled, and on key - // release the flag has already been toggled. + if (record->event.pressed) { + switch (keycode) { + case SPI_GLO: + spidey_glow(); + return false; + } + } + + return true; +} + +void post_process_record_user_rgb(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + // Acks follow... + case DEBUG: + rgb_layer_ack_yn(debug_enable); + break; + + case SPI_LNX: + case SPI_OSX: + case SPI_WIN: + rgb_layer_ack(ACK_MEH); + break; + + case SPI_GFLOCK: + rgb_layer_ack_yn(spi_gflock); + rgblight_set_layer_state(MISC_OFFSET + 0, spi_gflock); + break; + + case SPI_NORMAL ... SPI_FRAKTR: + rgb_layer_ack_yn(spi_replace_mode != SPI_NORMAL); + rgblight_set_layer_state(MISC_OFFSET + 1, spi_replace_mode != SPI_NORMAL); + break; + + case RGB_TOG: + rgb_layer_ack_yn(rgblight_config.enable); + break; #ifdef VELOCIKEY_ENABLE - case VLK_TOG: - rgb_layer_ack(pressed != velocikey_enabled(), pressed); - return true; + case VLK_TOG: + rgb_layer_ack_yn(velocikey_enabled()); + break; #endif #ifdef NKRO_ENABLE - case NK_TOGG: - case NK_ON: - case NK_OFF: - rgb_layer_ack(pressed != keymap_config.nkro, pressed); - return true; + case NK_TOGG: + case NK_ON: + case NK_OFF: + rgb_layer_ack_yn(keymap_config.nkro); + break; #endif - } - - return true; + } } diff --git a/users/spidey3/rules.mk b/users/spidey3/rules.mk index 0a77d2bfc76b..2d4da22946cf 100644 --- a/users/spidey3/rules.mk +++ b/users/spidey3/rules.mk @@ -1,3 +1,5 @@ +BOOTMAGIC_ENABLE = lite +LTO_ENABLE = yes SRC += init.c SRC += spidey3.c diff --git a/users/spidey3/spidey3.c b/users/spidey3/spidey3.c index 8be99dea046a..9d696494f744 100644 --- a/users/spidey3/spidey3.c +++ b/users/spidey3/spidey3.c @@ -1,80 +1,267 @@ #include QMK_KEYBOARD_H #include "spidey3.h" +#include "version.h" +#include -bool process_record_user(uint16_t keycode, keyrecord_t *record) { +static bool rand_seeded = false; -// If console is enabled, it will print the matrix position and status of each key pressed -// dprintf("KL: kc: %u, col: %u, row: %u, pressed: %u\n", keycode, record->event.key.col, record->event.key.row, record->event.pressed); +uint16_t spi_replace_mode = SPI_NORMAL; +bool spi_gflock = false; - if (record->event.pressed) { - switch (keycode) { -#ifndef NO_DEBUG - // Re-implement this here, but fix the persistence! - case DEBUG: - debug_enable ^= 1; - if (debug_enable) { - print("DEBUG: enabled.\n"); - } else { - print("DEBUG: disabled.\n"); +#if defined(CONSOLE_ENABLE) && !defined(NO_DEBUG) +static uint32_t matrix_scan_count = 0; +static bool reported_version = false; + +# if defined(SPI_DEBUG_SCAN_RATE) +static uint32_t matrix_timer = 0; +static uint32_t last_matrix_scan_count = 0; +# endif + +void matrix_scan_user(void) { +# if defined(SPI_DEBUG_SCAN_RATE) + matrix_scan_count++; + if (debug_enable) { + uint32_t timer_now = timer_read32(); + if (matrix_timer == 0) { + matrix_timer = timer_now; + last_matrix_scan_count = matrix_scan_count; + matrix_scan_count = 0; + } else if (TIMER_DIFF_32(timer_now, matrix_timer) > SPI_SCAN_RATE_INTERVAL * 1000) { + matrix_timer = timer_now; + last_matrix_scan_count = matrix_scan_count; + matrix_scan_count = 0; + if (!reported_version) { + uprintln(QMK_KEYBOARD "/" QMK_KEYMAP " @ " QMK_VERSION ", Built on: " QMK_BUILDDATE); + reported_version = true; + } + uprintf("scan rate: %lu/s\n", last_matrix_scan_count / SPI_SCAN_RATE_INTERVAL); + } + } +# else + if (!reported_version) { + matrix_scan_count++; + if (matrix_scan_count > 300) { + uprintln(QMK_KEYBOARD "/" QMK_KEYMAP " @ " QMK_VERSION ", Built on: " QMK_BUILDDATE); + reported_version = true; } - eeconfig_update_debug(debug_config.raw); + } +# endif +} +#endif + +bool process_record_glyph_replacement(uint16_t keycode, keyrecord_t *record, uint32_t baseAlphaLower, uint32_t baseAlphaUpper, uint32_t zeroGlyph, uint32_t baseNumberOne, uint32_t spaceGlyph) { + uint8_t temp_mod = get_mods(); +#ifndef NO_ACTION_ONESHOT + uint8_t temp_osm = get_oneshot_mods(); +#else + uint8_t temp_osm = 0; +#endif + if ((((temp_mod | temp_osm) & (MOD_MASK_CTRL | MOD_MASK_ALT | MOD_MASK_GUI))) == 0) { + switch (keycode) { + case KC_A ... KC_Z: + if (record->event.pressed) { + clear_mods(); +#ifndef NO_ACTION_ONESHOT + clear_oneshot_mods(); +#endif + + unicode_input_start(); + uint32_t base = ((temp_mod | temp_osm) & MOD_MASK_SHIFT) ? baseAlphaUpper : baseAlphaLower; + register_hex32(base + (keycode - KC_A)); + unicode_input_finish(); + + set_mods(temp_mod); + } + return false; + case KC_0: + if ((temp_mod | temp_osm) & MOD_MASK_SHIFT) { // skip shifted numbers, so that we can still use symbols etc. + return true; + } + if (record->event.pressed) { + unicode_input_start(); + register_hex32(zeroGlyph); + unicode_input_finish(); + } + return false; + case KC_1 ... KC_9: + if ((temp_mod | temp_osm) & MOD_MASK_SHIFT) { // skip shifted numbers, so that we can still use symbols etc. + return true; + } + if (record->event.pressed) { + unicode_input_start(); + register_hex32(baseNumberOne + (keycode - KC_1)); + unicode_input_finish(); + } + return false; + case KC_SPACE: + if (record->event.pressed) { + unicode_input_start(); + register_hex32(spaceGlyph); // em space + unicode_input_finish(); + } + return false; + } + } + + return true; +} + +bool process_gflock(uint16_t keycode, keyrecord_t *record) { + if (!spi_gflock) { + return true; + } + + if (record->event.pressed) { + register_code16(G(keycode)); + } else { + unregister_code16(G(keycode)); + } + return false; +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + if (!rand_seeded) { + srand(record->event.time % keycode); + rand_seeded = true; + } + + if (record->event.pressed) { + switch (keycode) { +#ifndef NO_DEBUG + // Re-implement this here, but fix the persistence! + case DEBUG: + if (!debug_enable) { + debug_enable = 1; +# if defined(SPI_DEBUG_SCAN_RATE) + matrix_timer = 0; + reported_version = false; +# endif + } else if (!debug_keyboard) { + debug_keyboard = 1; + } else if (!debug_matrix) { + debug_matrix = 1; + } else { + debug_enable = 0; + debug_keyboard = 0; + debug_matrix = 0; + } + uprintf("DEBUG: enable=%u, keyboard=%u, matrix=%u\n", debug_enable, debug_keyboard, debug_matrix); + eeconfig_update_debug(debug_config.raw); + return false; #endif - break; - case SPI_LNX: - dprint("SPI_LNX\n"); - set_single_persistent_default_layer(_BASE); - layer_off(_OSX); + + // clang-format off + + case CH_CPNL: host_consumer_send(AL_CONTROL_PANEL); return false; + case CH_ASST: host_consumer_send(AL_ASSISTANT); return false; + case CH_SUSP: tap_code16(LGUI(LSFT(KC_L))); return true; + + // clang-format on + + case SPI_LNX: + dprint("SPI_LNX\n"); + set_single_persistent_default_layer(_BASE); + layer_off(_OSX); #if defined(UNICODE_ENABLE) || defined(UNICODEMAP_ENABLE) - set_unicode_input_mode(UC_LNX); + set_unicode_input_mode(UC_LNX); #endif - break; - case SPI_OSX: - dprint("SPI_OSX\n"); - set_single_persistent_default_layer(_OSX); + break; + case SPI_OSX: + dprint("SPI_OSX\n"); + set_single_persistent_default_layer(_OSX); #if defined(UNICODE_ENABLE) || defined(UNICODEMAP_ENABLE) - set_unicode_input_mode(UC_OSX); + set_unicode_input_mode(UC_OSX); #endif - break; - case SPI_WIN: - dprint("SPI_WIN\n"); - set_single_persistent_default_layer(_BASE); - layer_off(_OSX); + break; + case SPI_WIN: + dprint("SPI_WIN\n"); + set_single_persistent_default_layer(_BASE); + layer_off(_OSX); #if defined(UNICODE_ENABLE) || defined(UNICODEMAP_ENABLE) - set_unicode_input_mode(UC_WINC); + set_unicode_input_mode(UC_WINC); #endif - break; + break; + + case SPI_NORMAL ... SPI_FRAKTR: + spi_replace_mode = (spi_replace_mode == keycode) ? SPI_NORMAL : keycode; + dprintf("spi_replace_mode = %u\n", spi_replace_mode); + break; + + case SPI_GFLOCK: + spi_gflock = !spi_gflock; + dprintf("spi_gflock = %u\n", spi_gflock); + break; + } + } else { + switch (keycode) { + case CH_CPNL: + case CH_ASST: + host_consumer_send(0); + return false; + } + } + + switch (keycode) { + case KC_A ... KC_0: + case KC_SPACE: + switch (spi_replace_mode) { + case SPI_WIDE: + return process_record_glyph_replacement(keycode, record, 0xFF41, 0xFF21, 0xFF10, 0xFF11, 0x2003); + case SPI_SCRIPT: + return process_record_glyph_replacement(keycode, record, 0x1D4EA, 0x1D4D0, 0x1D7CE, 0x1D7CF, 0x2002); + case SPI_BLOCKS: + return process_record_glyph_replacement(keycode, record, 0x1F170, 0x1F170, '0', '1', 0x2002); + case SPI_CIRCLE: + return process_record_glyph_replacement(keycode, record, 0x1F150, 0x1F150, '0', '1', 0x2002); + case SPI_SQUARE: + return process_record_glyph_replacement(keycode, record, 0x1F130, 0x1F130, '0', '1', 0x2002); + case SPI_PARENS: + return process_record_glyph_replacement(keycode, record, 0x1F110, 0x1F110, '0', '1', 0x2002); + case SPI_FRAKTR: + return process_record_glyph_replacement(keycode, record, 0x1D586, 0x1D56C, '0', '1', 0x2002); + } + break; + + case KC_F1 ... KC_F24: + return process_gflock(keycode, record); } - } #ifdef RGBLIGHT_ENABLE - bool res = process_record_user_rgb(keycode, record); - if (res) return true; + bool res = process_record_user_rgb(keycode, record); + if (!res) return false; #endif - return false; + return true; +} + +void post_process_record_user(uint16_t keycode, keyrecord_t *record) { +#ifdef RGBLIGHT_ENABLE + post_process_record_user_rgb(keycode, record); +#endif + return; } layer_state_t default_layer_state_set_user(layer_state_t state) { #ifdef RGBLIGHT_ENABLE - return default_layer_state_set_user_rgb(state); + return default_layer_state_set_user_rgb(state); #else - return state; + return state; #endif } layer_state_t layer_state_set_user(layer_state_t state) { #ifdef RGBLIGHT_ENABLE - return layer_state_set_user_rgb(state); + return layer_state_set_user_rgb(state); #else - return state; + return state; #endif } bool led_update_user(led_t led_state) { #ifdef RGBLIGHT_ENABLE - return led_update_user_rgb(led_state); + return led_update_user_rgb(led_state); #else - return true; + return true; #endif } diff --git a/users/spidey3/spidey3.h b/users/spidey3/spidey3.h index 224858391dce..5bfba4e59285 100644 --- a/users/spidey3/spidey3.h +++ b/users/spidey3/spidey3.h @@ -3,41 +3,71 @@ #include QMK_KEYBOARD_H #ifdef UNICODEMAP_ENABLE -#include "unicode.h" +# include "unicode.h" #endif enum userspace_layers { - _BASE = 0, - _OSX, - _NUMPAD, - _FN, -}; - -enum rgb_base_layer { - RGB_LAYER_BASE_DEFAULT = _BASE, - RGB_LAYER_BASE_REGULAR = _NUMPAD, - RGB_LAYER_BASE_ACKS = _FN+1, + _BASE = 0, + _OSX, + _NUMPAD, + _FN, }; enum custom_keycodes { - SPI_GLO = SAFE_RANGE, - SPI_LNX, - SPI_OSX, - SPI_WIN, + SPI_GLO = SAFE_RANGE, + SPI_LNX, // Mode: Linux + SPI_OSX, // Mode: Mac + SPI_WIN, // Mode: Windows + CH_CPNL, // AL Control Panel + CH_ASST, // AL Context-aware Desktop Assistant + CH_SUSP, // Suspend + + SPI_NORMAL, + SPI_WIDE, + SPI_SCRIPT, + SPI_BLOCKS, + SPI_CIRCLE, + SPI_SQUARE, + SPI_PARENS, + SPI_FRAKTR, + SPI_GFLOCK, }; #ifdef RGBLIGHT_ENABLE -void eeconfig_init_user_rgb(void); -void matrix_init_user_rgb(void); -void keyboard_post_init_user_rgb(void); -bool process_record_user_rgb(uint16_t keycode, keyrecord_t *record); + +enum layer_base { + LAYER_BASE_DEFAULT = _BASE, + LAYER_BASE_REGULAR = _NUMPAD, + LAYER_BASE_END = _FN + 1, +}; + +typedef enum layer_ack { + ACK_NO = 0, + ACK_YES, + ACK_MEH, +} layer_ack_t; + +# define RGB_LAYER_ACK_DURATION 500 + +void eeconfig_init_user_rgb(void); +void matrix_init_user_rgb(void); +void keyboard_post_init_user_rgb(void); +bool process_record_user_rgb(uint16_t keycode, keyrecord_t *record); +void post_process_record_user_rgb(uint16_t keycode, keyrecord_t *record); layer_state_t layer_state_set_user_rgb(layer_state_t state); layer_state_t default_layer_state_set_user_rgb(layer_state_t state); -bool led_update_user_rgb(led_t led_state); -void clear_rgb_layers(void); +bool led_update_user_rgb(led_t led_state); +void rgb_layer_ack(layer_ack_t n); +void rgb_layer_ack_yn(bool yn); +void clear_rgb_layers(void); #endif #ifdef UNICODEMAP_ENABLE void eeconfig_init_user_unicode(void); #endif +#ifdef SPI_DEBUG_SCAN_RATE +# ifndef SPI_SCAN_RATE_INTERVAL +# define SPI_SCAN_RATE_INTERVAL 10 +# endif +#endif diff --git a/users/spidey3/unicode.c b/users/spidey3/unicode.c index 41ceef83756e..39a990674c57 100644 --- a/users/spidey3/unicode.c +++ b/users/spidey3/unicode.c @@ -2,18 +2,24 @@ #include "unicode.h" const uint32_t PROGMEM unicode_map[] = { - [BUL1] = 0x2022, // • - [BUL2] = 0x25E6, // ◦ - [LARR] = 0x2190, // ← - [RARR] = 0x2192, // → - [ENDASH] = 0x2013, // – - [EMDASH] = 0x2014, // — + [BUL1] = 0x2022, // • + [BUL2] = 0x25E6, // ◦ + [LARR] = 0x2190, // ← + [RARR] = 0x2192, // → + [ENDASH] = 0x2013, // – + [EMDASH] = 0x2014, // — + [SPIDER] = 0x1F577, // 🕷 + [SAD] = 0x2639, // ☹ + [MEH] = 0x1F611, // 😑 + [HAPPY] = 0x1F600, // 😀 + [ANGRY] = 0x1F620, // 😠 + [THUMBUP] = 0x1F44D, // 👍 + [THUMBDN] = 0x1F44E, // 👎 + [LOL] = 0x1F602, // 😂 + [SURPRISE] = 0x1F62E, // 😮 }; -void eeconfig_init_user_unicode(void) -{ - // Default to Linux style - set_unicode_input_mode(UC_LNX); +void eeconfig_init_user_unicode(void) { + // Default to Linux style + set_unicode_input_mode(UC_LNX); } - - diff --git a/users/spidey3/unicode.h b/users/spidey3/unicode.h index 72a91e8a8069..db7824983b18 100644 --- a/users/spidey3/unicode.h +++ b/users/spidey3/unicode.h @@ -11,9 +11,18 @@ enum unicode_names { RARR, ENDASH, EMDASH, + SPIDER, + SAD, + MEH, + HAPPY, + ANGRY, + THUMBUP, + THUMBDN, + LOL, + SURPRISE, }; -#define X_BUL (XP(BUL1, BUL2)) -#define X_DASH (XP(ENDASH, EMDASH)) +# define X_BUL (XP(BUL1, BUL2)) +# define X_DASH (XP(ENDASH, EMDASH)) #endif From 7a75af83429980c0d59dadc69a7ec64d68a2cbfa Mon Sep 17 00:00:00 2001 From: Jeremy Bernhardt Date: Fri, 5 Jun 2020 03:06:58 -0600 Subject: [PATCH 098/930] [Keyboard] Gboards common - TOGG()/inject.h (#9236) --- keyboards/gboards/g/keymap_combo.h | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/keyboards/gboards/g/keymap_combo.h b/keyboards/gboards/g/keymap_combo.h index 674d3356cc8b..1302c460352c 100644 --- a/keyboards/gboards/g/keymap_combo.h +++ b/keyboards/gboards/g/keymap_combo.h @@ -11,14 +11,21 @@ case name: \ if (pressed) SEND_STRING(string); \ break; -#define BLANK(...) +#define A_TOGG(name, layer, ...) \ + case name: \ + if (pressed) layer_invert(layer); \ + break; + +#define BLANK(...) // Generate data needed for combos/actions // Create Enum #undef COMB #undef SUBS +#undef TOGG #define COMB K_ENUM #define SUBS A_ENUM +#define TOGG A_ENUM enum combos { #include "combos.def" }; @@ -26,20 +33,25 @@ enum combos { // Bake combos into mem #undef COMB #undef SUBS +#undef TOGG #define COMB K_DATA #define SUBS A_DATA +#define TOGG A_DATA #include "combos.def" #undef COMB #undef SUBS +#undef TOGG // Fill combo array #define COMB K_COMB #define SUBS A_COMB +#define TOGG A_COMB combo_t key_combos[] = { #include "combos.def" }; #undef COMB #undef SUBS +#undef TOGG // Export length to combo module int COMBO_LEN = sizeof(key_combos) / sizeof(key_combos[0]); @@ -47,10 +59,17 @@ int COMBO_LEN = sizeof(key_combos) / sizeof(key_combos[0]); // Fill QMK hook #define COMB BLANK #define SUBS A_ACTI +#define TOGG A_TOGG void process_combo_event(uint8_t combo_index, bool pressed) { switch (combo_index) { #include "combos.def" } + + // Allow user overrides per keymap +#if __has_include("inject.h") +# include "inject.h" +#endif } #undef COMB #undef SUBS +#undef TOGG From ca451c5aa0948b112db771252de41cb85066556e Mon Sep 17 00:00:00 2001 From: Chandler Date: Fri, 5 Jun 2020 04:12:07 -0500 Subject: [PATCH 099/930] [Keyboard] add 1894 support to qmk (#9238) --- keyboards/atxkb/1894/1894.c | 16 + keyboards/atxkb/1894/1894.h | 86 ++++++ keyboards/atxkb/1894/config.h | 169 +++++++++++ keyboards/atxkb/1894/info.json | 277 ++++++++++++++++++ keyboards/atxkb/1894/keymaps/default/keymap.c | 39 +++ .../atxkb/1894/keymaps/default/readme.md | 3 + .../keymaps/default_ansi_tsangan/keymap.c | 38 +++ .../keymaps/default_ansi_tsangan/readme.md | 3 + keyboards/atxkb/1894/keymaps/via/keymap.c | 55 ++++ keyboards/atxkb/1894/keymaps/via/readme.md | 3 + keyboards/atxkb/1894/keymaps/via/rules.mk | 1 + keyboards/atxkb/1894/readme.md | 15 + keyboards/atxkb/1894/rules.mk | 33 +++ keyboards/atxkb/readme.md | 3 + 14 files changed, 741 insertions(+) create mode 100644 keyboards/atxkb/1894/1894.c create mode 100644 keyboards/atxkb/1894/1894.h create mode 100644 keyboards/atxkb/1894/config.h create mode 100644 keyboards/atxkb/1894/info.json create mode 100644 keyboards/atxkb/1894/keymaps/default/keymap.c create mode 100644 keyboards/atxkb/1894/keymaps/default/readme.md create mode 100644 keyboards/atxkb/1894/keymaps/default_ansi_tsangan/keymap.c create mode 100644 keyboards/atxkb/1894/keymaps/default_ansi_tsangan/readme.md create mode 100644 keyboards/atxkb/1894/keymaps/via/keymap.c create mode 100644 keyboards/atxkb/1894/keymaps/via/readme.md create mode 100644 keyboards/atxkb/1894/keymaps/via/rules.mk create mode 100644 keyboards/atxkb/1894/readme.md create mode 100644 keyboards/atxkb/1894/rules.mk create mode 100644 keyboards/atxkb/readme.md diff --git a/keyboards/atxkb/1894/1894.c b/keyboards/atxkb/1894/1894.c new file mode 100644 index 000000000000..9ac75b91e49c --- /dev/null +++ b/keyboards/atxkb/1894/1894.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 "1894.h" diff --git a/keyboards/atxkb/1894/1894.h b/keyboards/atxkb/1894/1894.h new file mode 100644 index 000000000000..8e541b2cf443 --- /dev/null +++ b/keyboards/atxkb/1894/1894.h @@ -0,0 +1,86 @@ +/* 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( \ + 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, K213, \ + K300, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, \ + K400, K401, K402, K406, 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, KC_NO, K213 }, \ + { K300, KC_NO, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, KC_NO}, \ + { K400, K401, K402, KC_NO, KC_NO, KC_NO, K406, KC_NO, KC_NO, KC_NO, K410, K411, K412, K413 } \ +} + +#define LAYOUT_60_ansi_split_bs_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, 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, 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, K410, K411, K412, K413 } \ +} + +#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, \ + 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/atxkb/1894/config.h b/keyboards/atxkb/1894/config.h new file mode 100644 index 000000000000..93dd93a6a220 --- /dev/null +++ b/keyboards/atxkb/1894/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 0x5458 // TX +#define PRODUCT_ID 0x0001 +#define DEVICE_VER 0x0001 +#define MANUFACTURER atxkb +#define PRODUCT 1894 +#define DESCRIPTION atxkb 1894 + +/* 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/atxkb/1894/info.json b/keyboards/atxkb/1894/info.json new file mode 100644 index 000000000000..7c44bdf01602 --- /dev/null +++ b/keyboards/atxkb/1894/info.json @@ -0,0 +1,277 @@ +{ + "keyboard_name": "1894", + "url": "https://atxkb.com", + "maintainer": "austexcn", + "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": { + "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_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.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_tsangan_hhkb": { + "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/atxkb/1894/keymaps/default/keymap.c b/keyboards/atxkb/1894/keymaps/default/keymap.c new file mode 100644 index 000000000000..65902ae583e8 --- /dev/null +++ b/keyboards/atxkb/1894/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/atxkb/1894/keymaps/default/readme.md b/keyboards/atxkb/1894/keymaps/default/readme.md new file mode 100644 index 000000000000..eb6b7baccfe2 --- /dev/null +++ b/keyboards/atxkb/1894/keymaps/default/readme.md @@ -0,0 +1,3 @@ +# The default keymap for 1894 + +Fits just about everything on two layers. diff --git a/keyboards/atxkb/1894/keymaps/default_ansi_tsangan/keymap.c b/keyboards/atxkb/1894/keymaps/default_ansi_tsangan/keymap.c new file mode 100644 index 000000000000..410f9b379f7e --- /dev/null +++ b/keyboards/atxkb/1894/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_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_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, _______, _______, _______, + _______, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, _______, _______, KC_PSCR, _______, + _______, _______, _______, _______, _______, _______, _______ + ) +}; diff --git a/keyboards/atxkb/1894/keymaps/default_ansi_tsangan/readme.md b/keyboards/atxkb/1894/keymaps/default_ansi_tsangan/readme.md new file mode 100644 index 000000000000..712f7fa1aa4f --- /dev/null +++ b/keyboards/atxkb/1894/keymaps/default_ansi_tsangan/readme.md @@ -0,0 +1,3 @@ +# The default_ansi_tsangan keymap for 1894 + +Simplified down to the basic ANSI Tsangan layouts for ease of configuration. diff --git a/keyboards/atxkb/1894/keymaps/via/keymap.c b/keyboards/atxkb/1894/keymaps/via/keymap.c new file mode 100644 index 000000000000..67c5cd37eabc --- /dev/null +++ b/keyboards/atxkb/1894/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/atxkb/1894/keymaps/via/readme.md b/keyboards/atxkb/1894/keymaps/via/readme.md new file mode 100644 index 000000000000..0dc4a94580af --- /dev/null +++ b/keyboards/atxkb/1894/keymaps/via/readme.md @@ -0,0 +1,3 @@ +# The via keymap for 1894 + +For via configurator use diff --git a/keyboards/atxkb/1894/keymaps/via/rules.mk b/keyboards/atxkb/1894/keymaps/via/rules.mk new file mode 100644 index 000000000000..036bd6d1c3ec --- /dev/null +++ b/keyboards/atxkb/1894/keymaps/via/rules.mk @@ -0,0 +1 @@ +VIA_ENABLE = yes \ No newline at end of file diff --git a/keyboards/atxkb/1894/readme.md b/keyboards/atxkb/1894/readme.md new file mode 100644 index 000000000000..f62e0758e49e --- /dev/null +++ b/keyboards/atxkb/1894/readme.md @@ -0,0 +1,15 @@ +# atxkb 1894 + +![atxkb 1894](https://i.imgur.com/epXYdPA.jpg) + +1894 is a keyboard PCB supporting 60% layouts. It is a revised version of the [Voyager60](https://github.com/ai03-2725/Voyager60) pcb by [ai03](https://github.com/ai03-2725) that supports a JST connector instead of usb-c and has perimeter cutouts for gasket support. The Voyager60 and therefore the 1894 is compatible with ai03's [polaris](https://github.com/austexcn/qmk_firmware/tree/master/keyboards/ai03/polaris) QMK implementation and as such this is just a copy with edits to update the name. + +* Keyboard Maintainer: [austexcn](https://github.com/austexcn) +* Hardware Supported: atxkb Moontower +* Hardware Availability: [atxkb](https://atxkb.com) + +Make example for this keyboard (after setting up your build environment): + + make atxkb/1894: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/atxkb/1894/rules.mk b/keyboards/atxkb/1894/rules.mk new file mode 100644 index 000000000000..56e1ed8e0c46 --- /dev/null +++ b/keyboards/atxkb/1894/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 = yes # Commands for debug and configuration +# 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 + +LAYOUTS = 60_ansi 60_ansi_split_bs_rshift 60_tsangan_hhkb diff --git a/keyboards/atxkb/readme.md b/keyboards/atxkb/readme.md new file mode 100644 index 000000000000..f15245efdc36 --- /dev/null +++ b/keyboards/atxkb/readme.md @@ -0,0 +1,3 @@ +# atxkb + +Website: [atxkb](https://atxkb.com) From b327d2040245ba50e8b3560e6a15df659aa51760 Mon Sep 17 00:00:00 2001 From: Derek Date: Fri, 5 Jun 2020 05:13:31 -0400 Subject: [PATCH 100/930] [Keyboard] add Juliet (#9240) Co-authored-by: Ryan Co-authored-by: Derek --- keyboards/handwired/juliet/config.h | 220 ++++++++++++++++++ keyboards/handwired/juliet/info.json | 21 ++ keyboards/handwired/juliet/juliet.c | 16 ++ keyboards/handwired/juliet/juliet.h | 76 ++++++ .../handwired/juliet/keymaps/default/keymap.c | 31 +++ keyboards/handwired/juliet/readme.md | 15 ++ keyboards/handwired/juliet/rules.mk | 32 +++ 7 files changed, 411 insertions(+) create mode 100644 keyboards/handwired/juliet/config.h create mode 100644 keyboards/handwired/juliet/info.json create mode 100644 keyboards/handwired/juliet/juliet.c create mode 100644 keyboards/handwired/juliet/juliet.h create mode 100644 keyboards/handwired/juliet/keymaps/default/keymap.c create mode 100644 keyboards/handwired/juliet/readme.md create mode 100644 keyboards/handwired/juliet/rules.mk diff --git a/keyboards/handwired/juliet/config.h b/keyboards/handwired/juliet/config.h new file mode 100644 index 000000000000..6713749d867a --- /dev/null +++ b/keyboards/handwired/juliet/config.h @@ -0,0 +1,220 @@ +/* +Copyright 2020 na-cly + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License 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 0x6B62 +#define PRODUCT_ID 0x4069 +#define DEVICE_VER 0x0001 +#define MANUFACTURER nacly +#define PRODUCT juliet +#define DESCRIPTION Pro Micro Enabled ROMEO: ROMEO by coseyfannitutti + +/* 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) + * + */ + +/* A Custom matrix.c is used to poll the port expander C6 shows that the pins are hardwired there */ +/* 0 1 2 3 4 5 6 7 8 9 10 11*/ +#define MATRIX_ROW_PINS { F5, D2, D3, F4 } +#define MATRIX_COL_PINS { D1, D0, D4, C6, D7, E6, B4, B5, B1, B3, B2, 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 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 + + +/* Bootmagic Lite key configuration +#define BOOTMAGIC_LITE_ROW 0 +#define BOOTMAGIC_LITE_COLUMN 0 +*/ diff --git a/keyboards/handwired/juliet/info.json b/keyboards/handwired/juliet/info.json new file mode 100644 index 000000000000..1cf2a192e15a --- /dev/null +++ b/keyboards/handwired/juliet/info.json @@ -0,0 +1,21 @@ +{ + "keyboard_name": "juliet", + "url": "https://github.com/Na-Cly/juliet", + "maintainer": "Na-Cly", + "width": 13, + "height": 4, + "layouts": { + "LAYOUT_all": { + "layout": [{"label":"1.5u", "x":0, "y":0, "w":1.5}, {"x":1.5, "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}, {"label":"1.5u", "x":11.5, "y":0, "w":1.5}, {"label":"1.75u", "x":0, "y":1, "w":1.75}, {"x":1.75, "y":1}, {"x":2.75, "y":1}, {"x":3.75, "y":1}, {"x":4.75, "y":1}, {"x":5.75, "y":1}, {"x":6.75, "y":1}, {"x":7.75, "y":1}, {"x":8.75, "y":1}, {"x":9.75, "y":1}, {"label":"2.25u", "x":10.75, "y":1, "w":2.25}, {"label":"1.25u", "x":0, "y":2, "w":1.25}, {"x":1.25, "y":2}, {"x":2.25, "y":2}, {"x":3.25, "y":2}, {"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}, {"label":"1.75u", "x":11.25, "y":2, "w":1.75}, {"label":"1.25u", "x":0, "y":3, "w":1.25}, {"label":"1u", "x":1.25, "y":3}, {"label":"1.25u", "x":2.25, "y":3, "w":1.25}, {"label":"2.25u", "x":3.5, "y":3, "w":2.25}, {"label":"1u", "x":5.75, "y":3}, {"label":"2.75u", "x":6.75, "y":3, "w":2.75}, {"label":"1.25u", "x":9.5, "y":3, "w":1.25}, {"label":"1u", "x":10.75, "y":3}, {"label":"1.25u", "x":11.75, "y":3, "w":1.25}] + }, + "LAYOUT_ansi_split_lshift": { + "layout": [{"label":"1.5u", "x":0, "y":0, "w":1.5}, {"x":1.5, "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}, {"label":"1.5u", "x":11.5, "y":0, "w":1.5}, {"label":"1.75u", "x":0, "y":1, "w":1.75}, {"x":1.75, "y":1}, {"x":2.75, "y":1}, {"x":3.75, "y":1}, {"x":4.75, "y":1}, {"x":5.75, "y":1}, {"x":6.75, "y":1}, {"x":7.75, "y":1}, {"x":8.75, "y":1}, {"x":9.75, "y":1}, {"label":"2.25u", "x":10.75, "y":1, "w":2.25}, {"label":"1.25u", "x":0, "y":2, "w":1.25}, {"x":1.25, "y":2}, {"x":2.25, "y":2}, {"x":3.25, "y":2}, {"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}, {"label":"1.75u", "x":11.25, "y":2, "w":1.75}, {"label":"1.25u", "x":0, "y":3, "w":1.25}, {"label":"1u", "x":1.25, "y":3}, {"label":"1u", "x":2.25, "y":3}, {"label":"6.25u", "x":3.25, "y":3, "w":6.25}, {"label":"1.25u", "x":9.5, "y":3, "w":1.25}, {"label":"1u", "x":10.75, "y":3}, {"label":"1.25u", "x":11.75, "y":3, "w":1.25}] + }, + "LAYOUT_ansi_split_space": { + "layout": [{"label":"1.5u", "x":0, "y":0, "w":1.5}, {"x":1.5, "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}, {"label":"1.5u", "x":11.5, "y":0, "w":1.5}, {"label":"1.75u", "x":0, "y":1, "w":1.75}, {"x":1.75, "y":1}, {"x":2.75, "y":1}, {"x":3.75, "y":1}, {"x":4.75, "y":1}, {"x":5.75, "y":1}, {"x":6.75, "y":1}, {"x":7.75, "y":1}, {"x":8.75, "y":1}, {"x":9.75, "y":1}, {"label":"2.25u", "x":10.75, "y":1, "w":2.25}, {"label":"2.25u", "x":0, "y":2, "w":2.25}, {"x":2.25, "y":2}, {"x":3.25, "y":2}, {"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}, {"label":"1.75u", "x":11.25, "y":2, "w":1.75}, {"label":"1.25u", "x":0, "y":3, "w":1.25}, {"label":"1u", "x":1.25, "y":3}, {"label":"1.25u", "x":2.25, "y":3, "w":1.25}, {"label":"2.25u", "x":3.5, "y":3, "w":2.25}, {"label":"1u", "x":5.75, "y":3}, {"label":"2.75u", "x":6.75, "y":3, "w":2.75}, {"label":"1.25u", "x":9.5, "y":3, "w":1.25}, {"label":"1u", "x":10.75, "y":3}, {"label":"1.25u", "x":11.75, "y":3, "w":1.25}] + }, + "LAYOUT_ansi_40": { + "layout": [{"label":"1.5u", "x":0, "y":0, "w":1.5}, {"x":1.5, "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}, {"label":"1.5u", "x":11.5, "y":0, "w":1.5}, {"label":"1.75u", "x":0, "y":1, "w":1.75}, {"x":1.75, "y":1}, {"x":2.75, "y":1}, {"x":3.75, "y":1}, {"x":4.75, "y":1}, {"x":5.75, "y":1}, {"x":6.75, "y":1}, {"x":7.75, "y":1}, {"x":8.75, "y":1}, {"x":9.75, "y":1}, {"label":"2.25u", "x":10.75, "y":1, "w":2.25}, {"label":"2.25u", "x":0, "y":2, "w":2.25}, {"x":2.25, "y":2}, {"x":3.25, "y":2}, {"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}, {"label":"1.75u", "x":11.25, "y":2, "w":1.75}, {"label":"1.25u", "x":0, "y":3, "w":1.25}, {"label":"1u", "x":1.25, "y":3}, {"label":"1u", "x":2.25, "y":3}, {"label":"6.25u", "x":3.25, "y":3, "w":6.25}, {"label":"1.25u", "x":9.5, "y":3, "w":1.25}, {"label":"1u", "x":10.75, "y":3}, {"label":"1.25u", "x":11.75, "y":3, "w":1.25}] + } + } +} \ No newline at end of file diff --git a/keyboards/handwired/juliet/juliet.c b/keyboards/handwired/juliet/juliet.c new file mode 100644 index 000000000000..fd8a9bf86860 --- /dev/null +++ b/keyboards/handwired/juliet/juliet.c @@ -0,0 +1,16 @@ +/* Copyright 2019 coseyfannitutti + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#include "juliet.h" diff --git a/keyboards/handwired/juliet/juliet.h b/keyboards/handwired/juliet/juliet.h new file mode 100644 index 000000000000..971a391b433d --- /dev/null +++ b/keyboards/handwired/juliet/juliet.h @@ -0,0 +1,76 @@ +/* Copyright 2019 coseyfannitutti + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License 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. + */ +#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, K1B, \ + K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, \ + K30, K31, K32, K34, K36, K37, 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, _x_, K1B, }, \ +{ K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, }, \ +{ K30, K31, K32, _x_, K34, _x_, K36, K37, _x_, K39, K3A, K3B, } \ +} + +#define LAYOUT_ansi_40( \ + 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, K31, K32, K36, 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, _x_, K1B, }, \ +{ K20, _x_, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, }, \ +{ K30, K31, K32, _x_, _x_, _x_, K36, _x_, _x_, K39, K3A, K3B, } \ +} + +#define LAYOUT_ansi_split_lshift( \ + K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, \ + K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, 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, }, \ +{ K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, _x_, K1B, }, \ +{ K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, }, \ +{ K30, K31, K32, _x_, _x_, _x_, K36, _x_, _x_, K39, K3A, K3B, } \ +} + +#define LAYOUT_ansi_split_space( \ + 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, K31, K32, K34, K36, K37, 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, _x_, K1B, }, \ +{ K20, _x_, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, }, \ +{ K30, K31, K32, _x_, K34, _x_, K36, K37, _x_, K39, K3A, K3B, } \ +} diff --git a/keyboards/handwired/juliet/keymaps/default/keymap.c b/keyboards/handwired/juliet/keymaps/default/keymap.c new file mode 100644 index 000000000000..1d7f5569a2c4 --- /dev/null +++ b/keyboards/handwired/juliet/keymaps/default/keymap.c @@ -0,0 +1,31 @@ +/* Copyright 2019 COSEYFANNITUTTI + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public 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_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_QUOT, + 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, KC_LGUI, KC_LALT, KC_BSPC, KC_ENT, KC_SPC, KC_RALT, MO(1), KC_RCTL ), + + [1] = 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_VOLU, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT, KC_ENT, + KC_VOLD, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MINS, KC_EQL, KC_SLSH, 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/juliet/readme.md b/keyboards/handwired/juliet/readme.md new file mode 100644 index 000000000000..59853c133f06 --- /dev/null +++ b/keyboards/handwired/juliet/readme.md @@ -0,0 +1,15 @@ +# juliet + +Pro Micro Enabled ROMEO. + +Original PCB design by coseyfannitutti + +* Keyboard Maintainer: [NaCly](https://github.com/Na-Cly) +* Hardware Supported: juliet PCB, Pro Micro +* Hardware Availability: https://github.com/Na-Cly/juliet + +Make example for this keyboard (after setting up your build environment): + + make handwired/juliet: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/juliet/rules.mk b/keyboards/handwired/juliet/rules.mk new file mode 100644 index 000000000000..25dfc3947c5c --- /dev/null +++ b/keyboards/handwired/juliet/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 = 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 From 3972978c8d21dbd9619a8bc708a361858286e9ef Mon Sep 17 00:00:00 2001 From: Takeshi ISHII <2170248+mtei@users.noreply.github.com> Date: Fri, 5 Jun 2020 21:49:34 +0900 Subject: [PATCH 101/930] The TAGs of the original document has been updated to facilitate future verification. (#9285) --- docs/ja/newbs_git_best_practices.md | 4 ++-- docs/ja/newbs_git_resolving_merge_conflicts.md | 4 ++-- docs/ja/newbs_git_resynchronize_a_branch.md | 4 ++-- docs/ja/newbs_git_using_your_master_branch.md | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/docs/ja/newbs_git_best_practices.md b/docs/ja/newbs_git_best_practices.md index 4e20e4e0b02b..7ba16fce7516 100644 --- a/docs/ja/newbs_git_best_practices.md +++ b/docs/ja/newbs_git_best_practices.md @@ -2,8 +2,8 @@ ## または、"如何にして私は心配することをやめて Git を愛することを学んだか。" diff --git a/docs/ja/newbs_git_resolving_merge_conflicts.md b/docs/ja/newbs_git_resolving_merge_conflicts.md index 893c3d503573..532b1e30019b 100644 --- a/docs/ja/newbs_git_resolving_merge_conflicts.md +++ b/docs/ja/newbs_git_resolving_merge_conflicts.md @@ -2,8 +2,8 @@ ブランチでの作業の完了に時間がかかる場合、他の人が行った変更が、プルリクエストを開いたときにブランチに加えた変更と競合することがあります。 diff --git a/docs/ja/newbs_git_resynchronize_a_branch.md b/docs/ja/newbs_git_resynchronize_a_branch.md index e81d2da1fb1c..567ec38bfec4 100644 --- a/docs/ja/newbs_git_resynchronize_a_branch.md +++ b/docs/ja/newbs_git_resynchronize_a_branch.md @@ -2,8 +2,8 @@ 仮にあなたの `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 3ee1996c1be4..308a61eded10 100644 --- a/docs/ja/newbs_git_using_your_master_branch.md +++ b/docs/ja/newbs_git_using_your_master_branch.md @@ -2,8 +2,8 @@ QMK の開発では、何がどこで行われているかにかかわらず、`master` ブランチを最新の状態に保つことを強くお勧めします、しかし `master` ブランチには***絶対に直接コミットしないでください***。 From 12efb28e138567a5447b9c14b1e5f20839f34687 Mon Sep 17 00:00:00 2001 From: Frothy Date: Sat, 6 Jun 2020 12:56:59 -0300 Subject: [PATCH 102/930] [Keyboard] Add Via config for Clueboard 66 (#9010) * Added Via config for Clueboard 66 * Update keyboards/clueboard/66/keymaps/via/rules.mk Co-authored-by: Ryan * Enabled MouseKeys This required enabling LINK_TIME_OPTIMIZATION_ENABLE * Added 4th layer as per tzarc's recommendation on another PR Co-authored-by: Ryan --- keyboards/clueboard/66/keymaps/via/keymap.c | 46 +++++++++++++++++++++ keyboards/clueboard/66/keymaps/via/rules.mk | 4 ++ 2 files changed, 50 insertions(+) create mode 100644 keyboards/clueboard/66/keymaps/via/keymap.c create mode 100644 keyboards/clueboard/66/keymaps/via/rules.mk diff --git a/keyboards/clueboard/66/keymaps/via/keymap.c b/keyboards/clueboard/66/keymaps/via/keymap.c new file mode 100644 index 000000000000..f5c0c4644f4e --- /dev/null +++ b/keyboards/clueboard/66/keymaps/via/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. +#define _BL 0 +#define _FL 1 +#define _CL 2 +#define _EL 3 + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* Keymap _BL: Base Layer (Default Layer) + */ +[_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, + KC_TAB, KC_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_N, KC_M, KC_COMM,KC_DOT, KC_SLSH, KC_RSFT, KC_UP, + KC_LCTL,KC_LGUI,KC_LALT, KC_SPC, KC_RALT,MO(_FL),KC_RCTL,KC_LEFT,KC_DOWN,KC_RGHT), + + /* Keymap _FL: Function Layer + */ +[_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_MPRV,KC_MPLY,KC_MNXT,_______,KC_MUTE, KC_VOLD, + _______,_______,MO(_CL),_______,_______,_______,_______,_______,_______,_______,_______,_______, _______, + _______, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______, KC_PGUP, + _______,_______,_______, _______, _______,MO(_FL),_______,KC_HOME,KC_PGDN,KC_END), + + /* Keymap _CL: Control layer + */ +[_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_TOG, RGB_VAI, + _______,_______,_______,_______,RESET, _______,_______,_______,_______,_______,_______,_______,_______,_______, RGB_VAD, + _______,_______,MO(_CL),_______,_______,_______,_______,_______,_______,_______,_______,_______, _______, + _______, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______, RGB_SAI, + _______,_______,_______, RGB_MOD, _______,MO(_FL),_______,RGB_HUD,RGB_SAD,RGB_HUI), + + /* Keymap _EL: Empty layer + */ +[_EL] = LAYOUT_66_ansi( + _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______, _______, + _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______, + _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______, + _______, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______, _______, + _______,_______,_______, _______, _______,_______,_______,_______,_______,_______) +}; \ No newline at end of file diff --git a/keyboards/clueboard/66/keymaps/via/rules.mk b/keyboards/clueboard/66/keymaps/via/rules.mk new file mode 100644 index 000000000000..e85bff468f68 --- /dev/null +++ b/keyboards/clueboard/66/keymaps/via/rules.mk @@ -0,0 +1,4 @@ +# rules.mk overrides to enable VIA + +VIA_ENABLE = yes +LINK_TIME_OPTIMIZATION_ENABLE = yes \ No newline at end of file From 9f400794c021555e56f09542cf7e2afea5a68e8c Mon Sep 17 00:00:00 2001 From: umi <57262844+umi-umi@users.noreply.github.com> Date: Sun, 7 Jun 2020 03:08:24 +0900 Subject: [PATCH 103/930] [Docs] Japanese translation of docs/feature_swap_hands.md (#9032) * add feature_swap_hands.md translation * update based on comment * back to original translation --- docs/ja/feature_swap_hands.md | 36 +++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 docs/ja/feature_swap_hands.md diff --git a/docs/ja/feature_swap_hands.md b/docs/ja/feature_swap_hands.md new file mode 100644 index 000000000000..3150801c5542 --- /dev/null +++ b/docs/ja/feature_swap_hands.md @@ -0,0 +1,36 @@ +# スワップハンドアクション + + + +スワップハンドアクションにより、別のレイヤーを必要とせずに片手入力をサポートします。Makefile に `SWAP_HANDS_ENABLE` を設定し、キーマップに `hand_swap_config` エントリを定義します。これで `ACTION_SWAP_HANDS` コマンドキーが押されるたびにキーボードがミラーされます。例えば、QWERTY で "Hello, World" を入力するには、`^Ge^s^s^w^c W^wr^sd` を入力します。 + +## 設定 + +設定テーブルは列/行から新しい列/行にマップするための単純な2次元配列です。Planck の `hand_swap_config` の例: + +```C +const keypos_t hand_swap_config[MATRIX_ROWS][MATRIX_COLS] = { + {{11, 0}, {10, 0}, {9, 0}, {8, 0}, {7, 0}, {6, 0}, {5, 0}, {4, 0}, {3, 0}, {2, 0}, {1, 0}, {0, 0}}, + {{11, 1}, {10, 1}, {9, 1}, {8, 1}, {7, 1}, {6, 1}, {5, 1}, {4, 1}, {3, 1}, {2, 1}, {1, 1}, {0, 1}}, + {{11, 2}, {10, 2}, {9, 2}, {8, 2}, {7, 2}, {6, 2}, {5, 2}, {4, 2}, {3, 2}, {2, 2}, {1, 2}, {0, 2}}, + {{11, 3}, {10, 3}, {9, 3}, {8, 3}, {7, 3}, {6, 3}, {5, 3}, {4, 3}, {3, 3}, {2, 3}, {1, 3}, {0, 3}}, +}; +``` + +配列のインデックスはマトリックスと同様に逆になり、値の型は `{col, row}` である `keypos_t` で、全ての値はゼロベースであることに注意してください。上の例では、`hand_swap_config[2][4]` (第3行, 第5列)は `{7, 2}` (第3行, 第8列) を返します。はい。紛らわしいです。 + +## キーコードの入れ替え + +| キー | 説明 | +|-----------|-------------------------------------------------------------------------| +| `SH_T(key)` | タップで `key` を送信する。押している時の一時的な入れ替え。 | +| `SH_ON` | 入れ替えをオンにして、そのままにする。 | +| `SH_OFF` | 入れ替えをオフにして、そのままにする。既知の状態に戻るのに適しています。 | +| `SH_MON` | 押すとスワップハンドし、放すと通常に戻る (一時的)。 | +| `SH_MOFF` | 一時的に入れ替えをオフする。 | +| `SH_TG` | キーを押すたびに入れ替えのオンとオフを切り替える。 | +| `SH_TT` | タップで切り替える。押されている時の一時的なもの。 | +| `SH_OS` | ワンショットスワップハンド: 押されている時あるいは次のキーを押すまで切り替える。 | From b9a38487f390b593eafead0228beedfda375eb32 Mon Sep 17 00:00:00 2001 From: Pete Johanson Date: Sun, 7 Jun 2020 04:06:55 -0400 Subject: [PATCH 104/930] [Docs] Update udev rules to use TAG+="uaccess". (#8750) --- docs/faq_build.md | 27 ++++++++++++--------------- 1 file changed, 12 insertions(+), 15 deletions(-) diff --git a/docs/faq_build.md b/docs/faq_build.md index 2f1a4dd7f4e6..7cfb0040d0e3 100644 --- a/docs/faq_build.md +++ b/docs/faq_build.md @@ -28,33 +28,30 @@ sudo udevadm trigger **/etc/udev/rules.d/50-atmel-dfu.rules:** ``` # Atmel ATMega32U4 -SUBSYSTEMS=="usb", ATTRS{idVendor}=="03eb", ATTRS{idProduct}=="2ff4", MODE:="0666" +SUBSYSTEMS=="usb", ATTRS{idVendor}=="03eb", ATTRS{idProduct}=="2ff4", TAG+="uaccess", RUN{builtin}+="uaccess" # Atmel USBKEY AT90USB1287 -SUBSYSTEMS=="usb", ATTRS{idVendor}=="03eb", ATTRS{idProduct}=="2ffb", MODE:="0666" +SUBSYSTEMS=="usb", ATTRS{idVendor}=="03eb", ATTRS{idProduct}=="2ffb", TAG+="uaccess", RUN{builtin}+="uaccess" # Atmel ATMega32U2 -SUBSYSTEMS=="usb", ATTRS{idVendor}=="03eb", ATTRS{idProduct}=="2ff0", MODE:="0666" +SUBSYSTEMS=="usb", ATTRS{idVendor}=="03eb", ATTRS{idProduct}=="2ff0", TAG+="uaccess", RUN{builtin}+="uaccess" ``` -**/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" +SUBSYSTEMS=="usb", ATTRS{idVendor}=="1c11", ATTRS{idProduct}=="b007", TAG+="uaccess", RUN{builtin}+="uaccess" ``` **/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" +SUBSYSTEMS=="usb", ATTRS{idVendor}=="2a03", ATTRS{idProduct}=="0036", TAG+="uaccess", RUN{builtin}+="uaccess", ENV{ID_MM_DEVICE_IGNORE}="1" +SUBSYSTEMS=="usb", ATTRS{idVendor}=="2341", ATTRS{idProduct}=="0036", TAG+="uaccess", RUN{builtin}+="uaccess", ENV{ID_MM_DEVICE_IGNORE}="1" +SUBSYSTEMS=="usb", ATTRS{idVendor}=="1b4f", ATTRS{idProduct}=="9205", TAG+="uaccess", RUN{builtin}+="uaccess", ENV{ID_MM_DEVICE_IGNORE}="1" +SUBSYSTEMS=="usb", ATTRS{idVendor}=="1b4f", ATTRS{idProduct}=="9203", TAG+="uaccess", RUN{builtin}+="uaccess", ENV{ID_MM_DEVICE_IGNORE}="1" ``` -**Note:** ModemManager filtering only works when not in strict mode, the following commands can update that settings: +**Note:** With older (before 1.12) ModemManager, filtering only works when not in strict mode, the following commands can update that settings: ```console sudo sed -i 's/--filter-policy=strict/--filter-policy=default/' /lib/systemd/system/ModemManager.service sudo systemctl daemon-reload @@ -64,15 +61,15 @@ sudo systemctl restart ModemManager **/etc/udev/rules.d/56-dfu-util.rules:** ``` # stm32duino -SUBSYSTEMS=="usb", ATTRS{idVendor}=="1eaf", ATTRS{idProduct}=="0003", MODE:="0666" +SUBSYSTEMS=="usb", ATTRS{idVendor}=="1eaf", ATTRS{idProduct}=="0003", TAG+="uaccess", RUN{builtin}+="uaccess" # Generic stm32 -SUBSYSTEMS=="usb", ATTRS{idVendor}=="0483", ATTRS{idProduct}=="df11", MODE:="0666" +SUBSYSTEMS=="usb", ATTRS{idVendor}=="0483", ATTRS{idProduct}=="df11", TAG+="uaccess", RUN{builtin}+="uaccess" ``` **/etc/udev/rules.d/57-bootloadhid.rules:** ``` # bootloadHID -SUBSYSTEMS=="usb", ATTRS{idVendor}=="16c0", ATTRS{idProduct}=="05df", MODE:="0666" +SUBSYSTEMS=="usb", ATTRS{idVendor}=="16c0", ATTRS{idProduct}=="05df", TAG+="uaccess", RUN{builtin}+="uaccess" ``` ### Serial device is not detected in bootloader mode on Linux From a7f093b40c11d377cfc15057e0873e908605fd80 Mon Sep 17 00:00:00 2001 From: umi <57262844+umi-umi@users.noreply.github.com> Date: Mon, 8 Jun 2020 02:24:35 +0900 Subject: [PATCH 105/930] [Docs] Japanese translation of docs/feature_terminal.md (#9033) * add feature_terminal.md translation * add header for git * update based on comment --- docs/ja/feature_terminal.md | 112 ++++++++++++++++++++++++++++++++++++ 1 file changed, 112 insertions(+) create mode 100644 docs/ja/feature_terminal.md diff --git a/docs/ja/feature_terminal.md b/docs/ja/feature_terminal.md new file mode 100644 index 000000000000..8e125ecee0c2 --- /dev/null +++ b/docs/ja/feature_terminal.md @@ -0,0 +1,112 @@ +# ターミナル + + + +> この機能は現在のところ*巨大*であり、おそらく大量のメモリを搭載したキーボード、または楽しみのためにのみ配置する必要があります。 + +ターミナル機能はテキストエディタを介してキーストロークで通信するように設計されたコマンドラインのようなインタフェースです。エディタで自動インデント機能をオフにすることは有益です。 + +有効にするには、以下を `rules.mk` または `Makefile` に貼り付けます: + + TERMINAL_ENABLE = yes + +そして、オンまたはオフにするために、`TERM_ON` および `TERM_OFF` キーコードを使います。 + +有効な場合、`> ` プロンプトが現れ、ここでコマンドやバックスペース(オーディオが有効な場合は、先頭に到達するとベルが鳴ります)を入力することができ、エンターを入力するとコマンドを送信します。矢印キーは現在のところ無効なため、混乱することはありません。マウスでカーソルを移動することはお勧めしません。 + +`#define TERMINAL_HELP` は、このページでは実際には必要のない他の出力ヘルパーを有効にします。 + +"上矢印" および "下矢印" により、過去に入力した5つのコマンドを順に切り替えることができます。 + +## 今後のアイデア + +* キーボード/ユーザ拡張可能なコマンド +* より小さなフットプリント +* 矢印キーのサポート +* コマンド履歴 - 完了 +* SD カードのサポート +* バッファディスプレイのための LCD サポート +* キーコード -> 名称の対応表 +* レイヤー状態 +* *アナログ/デジタル ポートの読み込み/書き込み* +* RGB モード関連機能 +* マクロ定義 +* EEPROM の読み込み/書き込み +* オーディオ制御 + +## 現在のコマンド + +### `about` + +現在の QMK のバージョンとビルドした日の出力: + +``` +> about +QMK Firmware + v0.5.115-7-g80ed73-dirty + Built: 2017-08-29-20:24:44 +``` + + +### `print-buffer` + +最後に入力した5つのコマンドの出力 + +``` +> print-buffer +0. print-buffer +1. help +2. about +3. keymap 0 +4. help +5. flush-buffer +``` + +### `flush-buffer` + +コマンドバッファをクリア +``` +> flush-buffer +Buffer cleared! +``` + + +### `help` + + +利用可能なコマンドの出力: + +``` +> help +commands available: + about help keycode keymap exit print-buffer flush-buffer +``` + +### `keycode ` + +特定のレイヤー、行および列のキーコード値の出力: + +``` +> keycode 0 1 0 +0x29 (41) +``` + +### `keymap ` + +特定のレイヤーの全てのキーマップの出力 + +``` +> keymap 0 +0x002b, 0x0014, 0x001a, 0x0008, 0x0015, 0x0017, 0x001c, 0x0018, 0x000c, 0x0012, 0x0013, 0x002a, +0x0029, 0x0004, 0x0016, 0x0007, 0x0009, 0x000a, 0x000b, 0x000d, 0x000e, 0x000f, 0x0033, 0x0034, +0x00e1, 0x001d, 0x001b, 0x0006, 0x0019, 0x0005, 0x0011, 0x0010, 0x0036, 0x0037, 0x0038, 0x0028, +0x5cd6, 0x00e0, 0x00e2, 0x00e3, 0x5cd4, 0x002c, 0x002c, 0x5cd5, 0x0050, 0x0051, 0x0052, 0x004f, +> +``` + +### `exit` + +ターミナルの終了 - `TERM_OFF` と同じ。 From d7523c1260d3154a16d223060a24e32d18ebb1a2 Mon Sep 17 00:00:00 2001 From: umi <57262844+umi-umi@users.noreply.github.com> Date: Mon, 8 Jun 2020 02:26:30 +0900 Subject: [PATCH 106/930] [Docs] Japanese translation of docs/feature_ps2_mouse.md (#9030) * add feature_ps2_mouse.md translation * update based on comment * update based on comment * update based on comment * update based on comment --- docs/ja/feature_ps2_mouse.md | 293 +++++++++++++++++++++++++++++++++++ 1 file changed, 293 insertions(+) create mode 100644 docs/ja/feature_ps2_mouse.md diff --git a/docs/ja/feature_ps2_mouse.md b/docs/ja/feature_ps2_mouse.md new file mode 100644 index 000000000000..aae6d947bfae --- /dev/null +++ b/docs/ja/feature_ps2_mouse.md @@ -0,0 +1,293 @@ +# PS/2 マウスサポート :id=ps2-mouse-support + + + +PS/2 マウス (例えばタッチパッドあるいはトラックポイント)を複合デバイスとしてキーボードに接続することができます。 + +トラックポイントを接続するには、トラックポイントモジュールを入手し (つまり、Thinkpad キーボードから部品を取って)、モジュールの各ピンの機能を特定し、コントローラとトラックポイントモジュールの間に必要な回路を作成する必要があります。詳細については、Deskthority Wiki の[トラックポイントハードウェア](https://deskthority.net/wiki/TrackPoint_Hardware)ページを参照してください。 + +PS/2 デバイスの接続は、USART(最善)、割り込み(次善)、 または busywait(非推奨)の3つのやり方が有ります。 + +## トラックポイントとコントローラ間の回路 :id=the-circuitry-between-trackpoint-and-controller + +動作させるには、DATA と CLK のふたつのラインを 4.7k の抵抗で 5V にプルアップしてやる必要があります。 + +``` + DATA ----------+--------- PIN + | + 4.7K + | +MODULE 5+ --------+--+--------- PWR CONTROLLER + | + 4.7K + | + CLK ------+------------ PIN +``` + + +## Busywait バージョン :id=busywait-version + +注意: これは非推奨です。ギクシャクした動きや、未送信の入力が発生するかもしれません。可能であれば、割り込みまたは USART バージョンを使ってください。 + +rules.mk で: + +```makefile +PS2_MOUSE_ENABLE = yes +PS2_USE_BUSYWAIT = yes +``` + +キーボードの config.h で: + +```c +#ifdef PS2_USE_BUSYWAIT +# define PS2_CLOCK_PORT PORTD +# define PS2_CLOCK_PIN PIND +# define PS2_CLOCK_DDR DDRD +# define PS2_CLOCK_BIT 1 +# define PS2_DATA_PORT PORTD +# define PS2_DATA_PIN PIND +# define PS2_DATA_DDR DDRD +# define PS2_DATA_BIT 2 +#endif +``` + +## 割り込みバージョン :id=interrupt-version + +以下の例はクロックのために D2 を、データのために D5 を使います。クロックには任意の INT あるいは PCINT ピンを、データには任意のピンを使うことができます。 + +rules.mk で: + +```makefile +PS2_MOUSE_ENABLE = yes +PS2_USE_INT = yes +``` + +キーボードの config.h で: + +```c +#ifdef PS2_USE_INT +#define PS2_CLOCK_PORT PORTD +#define PS2_CLOCK_PIN PIND +#define PS2_CLOCK_DDR DDRD +#define PS2_CLOCK_BIT 2 +#define PS2_DATA_PORT PORTD +#define PS2_DATA_PIN PIND +#define PS2_DATA_DDR DDRD +#define PS2_DATA_BIT 5 + +#define PS2_INT_INIT() do { \ + EICRA |= ((1< Date: Mon, 8 Jun 2020 15:49:18 +1000 Subject: [PATCH 107/930] [Keyboard] Fix error_log complaint about handwired/onekey layout macro (#9263) --- .../handwired/onekey/keymaps/adc/keymap.c | 6 +-- .../onekey/keymaps/backlight/keymap.c | 45 +++++++++---------- .../handwired/onekey/keymaps/default/keymap.c | 2 +- .../onekey/keymaps/default_json/keymap.json | 14 +++--- .../handwired/onekey/keymaps/eep_rst/keymap.c | 2 +- .../onekey/keymaps/i2c_scanner/keymap.c | 2 +- .../handwired/onekey/keymaps/reset/keymap.c | 2 +- .../handwired/onekey/keymaps/rgb/keymap.c | 8 ++-- keyboards/handwired/onekey/onekey.h | 6 +-- layouts/community/ortho_1x1/test/keymap.c | 7 +-- 10 files changed, 44 insertions(+), 50 deletions(-) diff --git a/keyboards/handwired/onekey/keymaps/adc/keymap.c b/keyboards/handwired/onekey/keymaps/adc/keymap.c index 6626894fac11..00238b8e6c62 100644 --- a/keyboards/handwired/onekey/keymaps/adc/keymap.c +++ b/keyboards/handwired/onekey/keymaps/adc/keymap.c @@ -7,7 +7,7 @@ enum custom_keycodes { }; const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - LAYOUT(ADC_SAMPLE) // + LAYOUT_ortho_1x1(ADC_SAMPLE) }; bool process_record_user(uint16_t keycode, keyrecord_t *record) { @@ -16,7 +16,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { if (record->event.pressed) { int16_t val = analogReadPin(ADC_PIN); - char buffer [50]; + char buffer[50]; sprintf(buffer, "ADC:%u\n", val); #ifdef CONSOLE_ENABLE printf(buffer); @@ -30,5 +30,5 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { }; // adc_mux pinToMux(pin_t pin) { -// return TO_MUX( ADC_CHANNEL_IN1, 0 ); +// return TO_MUX(ADC_CHANNEL_IN1, 0); // }; diff --git a/keyboards/handwired/onekey/keymaps/backlight/keymap.c b/keyboards/handwired/onekey/keymaps/backlight/keymap.c index 1f4be16a623c..1fbbc632da0c 100644 --- a/keyboards/handwired/onekey/keymaps/backlight/keymap.c +++ b/keyboards/handwired/onekey/keymaps/backlight/keymap.c @@ -2,39 +2,38 @@ //Tap Dance Declarations enum { - TD_BL = 0 + TD_BL = 0 }; -void dance_cln_finished (qk_tap_dance_state_t *state, void *user_data) { - // noop +void dance_cln_finished(qk_tap_dance_state_t *state, void *user_data) { + // noop } -void dance_cln_reset (qk_tap_dance_state_t *state, void *user_data) { - switch (state->count) { - case 1: - // single tap - step through backlight - backlight_step(); - break; +void dance_cln_reset(qk_tap_dance_state_t *state, void *user_data) { + switch (state->count) { + case 1: + // single tap - step through backlight + backlight_step(); + break; #ifdef BACKLIGHT_BREATHING - case 2: - // double tap - toggle breathing - breathing_toggle(); - break; - case 3: - //tripple tap - do some pulse stuff - breathing_pulse(); - break; + case 2: + // double tap - toggle breathing + breathing_toggle(); + break; + case 3: + // triple tap - do some pulse stuff + breathing_pulse(); + break; #endif - default: - // more - nothing - break; - } + default: + break; + } } qk_tap_dance_action_t tap_dance_actions[] = { - [TD_BL] = ACTION_TAP_DANCE_FN_ADVANCED (NULL, dance_cln_finished, dance_cln_reset) + [TD_BL] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, dance_cln_finished, dance_cln_reset) }; const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - LAYOUT( TD(TD_BL) ) + LAYOUT_ortho_1x1(TD(TD_BL)) }; diff --git a/keyboards/handwired/onekey/keymaps/default/keymap.c b/keyboards/handwired/onekey/keymaps/default/keymap.c index dd64f9fa55b4..a5782f7a1368 100644 --- a/keyboards/handwired/onekey/keymaps/default/keymap.c +++ b/keyboards/handwired/onekey/keymaps/default/keymap.c @@ -1,5 +1,5 @@ #include QMK_KEYBOARD_H const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - LAYOUT( KC_A ) + LAYOUT_ortho_1x1(KC_A) }; diff --git a/keyboards/handwired/onekey/keymaps/default_json/keymap.json b/keyboards/handwired/onekey/keymaps/default_json/keymap.json index cf30f37b797c..ce4c4b474df6 100644 --- a/keyboards/handwired/onekey/keymaps/default_json/keymap.json +++ b/keyboards/handwired/onekey/keymaps/default_json/keymap.json @@ -1,9 +1,9 @@ { - "keyboard":"handwired/onekey/pytest", - "keymap":"default_json", - "layout":"LAYOUT", - "layers":[["KC_A"]], - "author":"qmk", - "notes":"This file is a keymap.json file for handwired/onekey/pytest", - "version":1 + "keyboard": "handwired/onekey/pytest", + "keymap": "default_json", + "layout": "LAYOUT_ortho_1x1", + "layers": [["KC_A"]], + "author": "qmk", + "notes": "This file is a keymap.json file for handwired/onekey/pytest", + "version": 1 } diff --git a/keyboards/handwired/onekey/keymaps/eep_rst/keymap.c b/keyboards/handwired/onekey/keymaps/eep_rst/keymap.c index adb8e4cd2fc8..3f7a6b8502c4 100644 --- a/keyboards/handwired/onekey/keymaps/eep_rst/keymap.c +++ b/keyboards/handwired/onekey/keymaps/eep_rst/keymap.c @@ -1,5 +1,5 @@ #include QMK_KEYBOARD_H const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - LAYOUT( EEP_RST ) + LAYOUT_ortho_1x1(EEP_RST) }; diff --git a/keyboards/handwired/onekey/keymaps/i2c_scanner/keymap.c b/keyboards/handwired/onekey/keymaps/i2c_scanner/keymap.c index 262bd588f2b0..ea8443709df7 100644 --- a/keyboards/handwired/onekey/keymaps/i2c_scanner/keymap.c +++ b/keyboards/handwired/onekey/keymaps/i2c_scanner/keymap.c @@ -21,7 +21,7 @@ i2c_status_t i2c_start_bodge(uint8_t address, uint16_t timeout) { #endif const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - LAYOUT(KC_A) // + LAYOUT_ortho_1x1(KC_A) }; void do_scan(void) { diff --git a/keyboards/handwired/onekey/keymaps/reset/keymap.c b/keyboards/handwired/onekey/keymaps/reset/keymap.c index 6a68fda81888..ec1b33e64fe9 100644 --- a/keyboards/handwired/onekey/keymaps/reset/keymap.c +++ b/keyboards/handwired/onekey/keymaps/reset/keymap.c @@ -1,5 +1,5 @@ #include QMK_KEYBOARD_H const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - LAYOUT( RESET ) + LAYOUT_ortho_1x1(RESET) }; diff --git a/keyboards/handwired/onekey/keymaps/rgb/keymap.c b/keyboards/handwired/onekey/keymaps/rgb/keymap.c index a96c6f386398..c3e77f1ec1ba 100644 --- a/keyboards/handwired/onekey/keymaps/rgb/keymap.c +++ b/keyboards/handwired/onekey/keymaps/rgb/keymap.c @@ -1,11 +1,11 @@ #include QMK_KEYBOARD_H const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - LAYOUT( RGB_MOD ) + LAYOUT_ortho_1x1(RGB_MOD) }; void keyboard_post_init_user(void) { - rgblight_enable_noeeprom(); - rgblight_sethsv_noeeprom_cyan(); - rgblight_mode_noeeprom(RGBLIGHT_MODE_RAINBOW_SWIRL); + rgblight_enable_noeeprom(); + rgblight_sethsv_noeeprom_cyan(); + rgblight_mode_noeeprom(RGBLIGHT_MODE_RAINBOW_SWIRL); } diff --git a/keyboards/handwired/onekey/onekey.h b/keyboards/handwired/onekey/onekey.h index 2924ff3ff8dc..72cab45be508 100644 --- a/keyboards/handwired/onekey/onekey.h +++ b/keyboards/handwired/onekey/onekey.h @@ -18,8 +18,8 @@ #include "quantum.h" -#define LAYOUT( \ +#define LAYOUT_ortho_1x1( \ k00 \ - ) { \ - { k00 } \ +) { \ + { k00 } \ } diff --git a/layouts/community/ortho_1x1/test/keymap.c b/layouts/community/ortho_1x1/test/keymap.c index 6a186669b07e..8821823d9995 100644 --- a/layouts/community/ortho_1x1/test/keymap.c +++ b/layouts/community/ortho_1x1/test/keymap.c @@ -2,11 +2,6 @@ /* 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 -), + LAYOUT_ortho_1x1(KC_B) }; From 93a1c5ca1661e163e1d4be6fd61c26194269e6b9 Mon Sep 17 00:00:00 2001 From: Maarten Dekkers Date: Mon, 8 Jun 2020 08:57:49 +0200 Subject: [PATCH 108/930] [Keyboard] Add VIA support for Eon40 (#9330) Co-authored-by: Maarten Dekkers --- .../maartenwut/eon40/keymaps/via/keymap.c | 43 +++++++++++++++++++ .../maartenwut/eon40/keymaps/via/rules.mk | 2 + 2 files changed, 45 insertions(+) create mode 100644 keyboards/maartenwut/eon40/keymaps/via/keymap.c create mode 100644 keyboards/maartenwut/eon40/keymaps/via/rules.mk diff --git a/keyboards/maartenwut/eon40/keymaps/via/keymap.c b/keyboards/maartenwut/eon40/keymaps/via/keymap.c new file mode 100644 index 000000000000..fdd74fc5c1f7 --- /dev/null +++ b/keyboards/maartenwut/eon40/keymaps/via/keymap.c @@ -0,0 +1,43 @@ +/* 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 + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +[0] = 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(1), KC_SPC, KC_BSPC, MO(2), KC_LEFT, KC_DOWN, KC_UP, KC_MPLY), + +[1] = 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), + +[2] = 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, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______), + +[3] = LAYOUT_ortho_4x12( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______) + +}; \ No newline at end of file diff --git a/keyboards/maartenwut/eon40/keymaps/via/rules.mk b/keyboards/maartenwut/eon40/keymaps/via/rules.mk new file mode 100644 index 000000000000..36b7ba9cbc98 --- /dev/null +++ b/keyboards/maartenwut/eon40/keymaps/via/rules.mk @@ -0,0 +1,2 @@ +VIA_ENABLE = yes +LTO_ENABLE = yes From 4a7725b3eef1b41ead2b42ab24a6af7fb4b1c93f Mon Sep 17 00:00:00 2001 From: Takeshi ISHII <2170248+mtei@users.noreply.github.com> Date: Tue, 9 Jun 2020 00:02:32 +0900 Subject: [PATCH 109/930] [Update] Japanese translation of docs/newbs_testing_debugging.md. (#9286) * Updated the Japanese translation of newbs_testing_debugging.md. Updated the Japanese translation of newbs_testing_debugging.md to 0.9.0. * Update docs/ja/newbs_testing_debugging.md Co-authored-by: s-show * Update docs/ja/newbs_testing_debugging.md Co-authored-by: shela * Update docs/ja/newbs_testing_debugging.md Co-authored-by: shela Co-authored-by: s-show Co-authored-by: shela --- docs/ja/newbs_testing_debugging.md | 25 +++++++++++-------------- 1 file changed, 11 insertions(+), 14 deletions(-) diff --git a/docs/ja/newbs_testing_debugging.md b/docs/ja/newbs_testing_debugging.md index 784f872e676a..b80e09fc7000 100644 --- a/docs/ja/newbs_testing_debugging.md +++ b/docs/ja/newbs_testing_debugging.md @@ -2,27 +2,21 @@ カスタムファームウェアをキーボードへ書き込んだら、テストする準備が整います。運が良ければ全て問題なく動作しているはずですが、もしそうでなければこのドキュメントがどこが悪いのか調べるのに役立ちます。 ## テスト -通常、キーボードをテストするのは非常に簡単です。全てのキーをひとつずつ押して、期待されるキーが送信されていることを確認します。キーを押したことを見逃さないためのプログラムもあります。 +通常、キーボードをテストするのは非常に簡単です。 +全てのキーをひとつずつ押して、期待されるキーが送信されていることを確認します。 +QMK を実行していなくても、[QMK Configurator](https://config.qmk.fm/#/test/) のテストモードを使ってキーボードを確認することができます。 -メモ: これらのプログラムは QMK によって提供・承認されたものではありません。 +## デバッグ :id=debugging -* [QMK Configurator](https://config.qmk.fm/#/test/) (Web Based) -* [Switch Hitter](https://web.archive.org/web/20190413233743/https://elitekeyboards.com/switchhitter.php) (Windows Only) -* [Keyboard Viewer](https://www.imore.com/how-use-keyboard-viewer-your-mac) (Mac Only) -* [Keyboard Tester](http://www.keyboardtester.com) (Web Based) -* [Keyboard Checker](http://keyboardchecker.com) (Web Based) - -## デバッグ - -`rules.mk`へ`CONSOLE_ENABLE = yes`の設定をするとキーボードはデバッグ情報を出力します。デフォルトの出力は非常に限られたものですが、デバッグモードをオンにすることでデバッグ情報の量を増やすことが出来ます。キーマップの`DEBUG`キーコードを使用するか、デバッグモードを有効にする [Command](ja/feature_command.md) 機能を使用するか、以下のコードをキーマップに追加します。 +`rules.mk`へ`CONSOLE_ENABLE = yes`の設定をするとキーボードはデバッグ情報を出力します。デフォルトの出力は非常に限られたものですが、デバッグモードをオンにすることでデバッグ情報の量を増やすことが出来ます。キーマップの`DEBUG`キーコードを使用するか、デバッグモードを有効にする [コマンド](ja/feature_command.md) 機能を使用するか、以下のコードをキーマップに追加します。 ```c void keyboard_post_init_user(void) { @@ -34,6 +28,10 @@ void keyboard_post_init_user(void) { } ``` +## デバッグツール :id=debugging-tools + +キーボードのデバッグに使えるツールは2つあります。 + ### QMK Toolboxを使ったデバッグ 互換性のある環境では、[QMK Toolbox](https://github.com/qmk/qmk_toolbox)を使うことでキーボードからのデバッグメッセージを表示できます。 @@ -42,7 +40,6 @@ void keyboard_post_init_user(void) { ターミナルベースの方法がお好みですか?PJRC が提供する[hid_listen](https://www.pjrc.com/teensy/hid_listen.html)もデバッグメッセージの表示に使用できます。ビルド済みの実行ファイルは Windows, Linux, MacOS 用が用意されています。 - ## 独自のデバッグメッセージを送信する From b19187c62c397b44ab657d8bac2a2b05c77cc9c9 Mon Sep 17 00:00:00 2001 From: Takeshi ISHII <2170248+mtei@users.noreply.github.com> Date: Tue, 9 Jun 2020 00:04:14 +0900 Subject: [PATCH 110/930] [Update] Japanese translation of newbs_learn_more_resources.md (#9288) * Updated the Japanese translation of newbs_learn_more_resources.md Updated the Japanese translation of newbs_learn_more_resources.md to 0.9.0. * update docs/ja/newbs_learn_more_resources.md * update ja/newbs_learn_more_resources.md --- docs/ja/newbs_learn_more_resources.md | 39 ++++++++++++++++----------- 1 file changed, 24 insertions(+), 15 deletions(-) diff --git a/docs/ja/newbs_learn_more_resources.md b/docs/ja/newbs_learn_more_resources.md index f2f8270e1d3b..e5437ca86af1 100644 --- a/docs/ja/newbs_learn_more_resources.md +++ b/docs/ja/newbs_learn_more_resources.md @@ -2,35 +2,44 @@ これらのリソースは、QMK コミュニティの新しいメンバーに、初心者向けドキュメントで提供されている情報に対する理解を深めることを目的としています。 -## Git に関するリース: +## QMK に関するリソース: -### 英語 +### 英語 :id=english-resources-qmk -* [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](getting_started_github.md) -* [Git Resources Aimed Specifically toward QMK](contributing.md) +* [Thomas Baart's QMK Basics Blog](https://thomasbaart.nl/category/mechanical-keyboards/firmware/qmk/qmk-basics/) – 新規ユーザーの視点から見た QMK ファームウェアの使い方の基本を網羅した、ユーザー作成のブログ。 -### 日本語 +### 日本語 :id=japanese-resources-qmk _日本語のリソース情報を募集中です。_ -* [Git Game To Learn From Examples(日本語対応有り)](https://learngitbranching.js.org/) -* [QMK で GitHub を使う方法](ja/getting_started_github.md) -* [貢献方法](ja/contributing.md) - ## コマンドラインに関するリソース: -### 英語 +### 英語 :id=english-resources-cli * [Good General Tutorial on Command Line](https://www.codecademy.com/learn/learn-the-command-line) -### 日本語 +### 日本語 :id=japanese-resources-cli + +_日本語のリソース情報を募集中です。_ + +## Git に関するリソース: + +### 英語 :id=english-resources-git + +* [Great General Tutorial](https://www.codecademy.com/learn/learn-git) +* [Flight Rules For Git](https://github.com/k88hudson/git-flight-rules) +* [Git Game To Learn From Examples](https://learngitbranching.js.org/) + +### 日本語 :id=japanese-resources-git _日本語のリソース情報を募集中です。_ + +* [Git Game To Learn From Examples(日本語対応有り)](https://learngitbranching.js.org/) + git のブランチの作り方、マージの仕方などがビジュアルに学べます。 +* [QMK で GitHub を使う方法](ja/getting_started_github.md) From 3736db6081ac75ed425fde5ff52deab78d27b650 Mon Sep 17 00:00:00 2001 From: Ryan Date: Tue, 9 Jun 2020 21:28:36 +1000 Subject: [PATCH 111/930] Add OS compatibility matrix for basic keycodes (#8557) --- docs/keycodes.md | 405 ++++++++++++++++++++++++----------------------- 1 file changed, 206 insertions(+), 199 deletions(-) diff --git a/docs/keycodes.md b/docs/keycodes.md index 40a46964a815..5fbc8f4fa6b8 100644 --- a/docs/keycodes.md +++ b/docs/keycodes.md @@ -8,205 +8,212 @@ This is a reference only. Each group of keys links to the page documenting their See also: [Basic Keycodes](keycodes_basic.md) -|Key |Aliases |Description | -|-----------------------|------------------------------|-----------------------------------------------| -|`KC_NO` |`XXXXXXX` |Ignore this key (NOOP) | -|`KC_TRANSPARENT` |`KC_TRNS`, `_______` |Use the next lowest non-transparent key | -|`KC_A` | |`a` and `A` | -|`KC_B` | |`b` and `B` | -|`KC_C` | |`c` and `C` | -|`KC_D` | |`d` and `D` | -|`KC_E` | |`e` and `E` | -|`KC_F` | |`f` and `F` | -|`KC_G` | |`g` and `G` | -|`KC_H` | |`h` and `H` | -|`KC_I` | |`i` and `I` | -|`KC_J` | |`j` and `J` | -|`KC_K` | |`k` and `K` | -|`KC_L` | |`l` and `L` | -|`KC_M` | |`m` and `M` | -|`KC_N` | |`n` and `N` | -|`KC_O` | |`o` and `O` | -|`KC_P` | |`p` and `P` | -|`KC_Q` | |`q` and `Q` | -|`KC_R` | |`r` and `R` | -|`KC_S` | |`s` and `S` | -|`KC_T` | |`t` and `T` | -|`KC_U` | |`u` and `U` | -|`KC_V` | |`v` and `V` | -|`KC_W` | |`w` and `W` | -|`KC_X` | |`x` and `X` | -|`KC_Y` | |`y` and `Y` | -|`KC_Z` | |`z` and `Z` | -|`KC_1` | |`1` and `!` | -|`KC_2` | |`2` and `@` | -|`KC_3` | |`3` and `#` | -|`KC_4` | |`4` and `$` | -|`KC_5` | |`5` and `%` | -|`KC_6` | |`6` and `^` | -|`KC_7` | |`7` and `&` | -|`KC_8` | |`8` and `*` | -|`KC_9` | |`9` and `(` | -|`KC_0` | |`0` and `)` | -|`KC_ENTER` |`KC_ENT` |Return (Enter) | -|`KC_ESCAPE` |`KC_ESC` |Escape | -|`KC_BSPACE` |`KC_BSPC` |Delete (Backspace) | -|`KC_TAB` | |Tab | -|`KC_SPACE` |`KC_SPC` |Spacebar | -|`KC_MINUS` |`KC_MINS` |`-` and `_` | -|`KC_EQUAL` |`KC_EQL` |`=` and `+` | -|`KC_LBRACKET` |`KC_LBRC` |`[` and `{` | -|`KC_RBRACKET` |`KC_RBRC` |`]` and `}` | -|`KC_BSLASH` |`KC_BSLS` |`\` and `\|` | -|`KC_NONUS_HASH` |`KC_NUHS` |Non-US `#` and `~` | -|`KC_SCOLON` |`KC_SCLN` |`;` and `:` | -|`KC_QUOTE` |`KC_QUOT` |`'` and `"` | -|`KC_GRAVE` |`KC_GRV`, `KC_ZKHK` |` and `~`, JIS Zenkaku/Hankaku| -|`KC_COMMA` |`KC_COMM` |`,` and `<` | -|`KC_DOT` | |`.` and `>` | -|`KC_SLASH` |`KC_SLSH` |`/` and `?` | -|`KC_CAPSLOCK` |`KC_CLCK`, `KC_CAPS` |Caps Lock | -|`KC_F1` | |F1 | -|`KC_F2` | |F2 | -|`KC_F3` | |F3 | -|`KC_F4` | |F4 | -|`KC_F5` | |F5 | -|`KC_F6` | |F6 | -|`KC_F7` | |F7 | -|`KC_F8` | |F8 | -|`KC_F9` | |F9 | -|`KC_F10` | |F10 | -|`KC_F11` | |F11 | -|`KC_F12` | |F12 | -|`KC_PSCREEN` |`KC_PSCR` |Print Screen | -|`KC_SCROLLLOCK` |`KC_SLCK`, `KC_BRMD` |Scroll Lock, Brightness Down (macOS) | -|`KC_PAUSE` |`KC_PAUS`, `KC_BRK`, `KC_BRMU`|Pause, Brightness Up (macOS) | -|`KC_INSERT` |`KC_INS` |Insert | -|`KC_HOME` | |Home | -|`KC_PGUP` | |Page Up | -|`KC_DELETE` |`KC_DEL` |Forward Delete | -|`KC_END` | |End | -|`KC_PGDOWN` |`KC_PGDN` |Page Down | -|`KC_RIGHT` |`KC_RGHT` |Right Arrow | -|`KC_LEFT` | |Left Arrow | -|`KC_DOWN` | |Down Arrow | -|`KC_UP` | |Up Arrow | -|`KC_NUMLOCK` |`KC_NLCK` |Keypad Num Lock and Clear | -|`KC_KP_SLASH` |`KC_PSLS` |Keypad `/` | -|`KC_KP_ASTERISK` |`KC_PAST` |Keypad `*` | -|`KC_KP_MINUS` |`KC_PMNS` |Keypad `-` | -|`KC_KP_PLUS` |`KC_PPLS` |Keypad `+` | -|`KC_KP_ENTER` |`KC_PENT` |Keypad Enter | -|`KC_KP_1` |`KC_P1` |Keypad `1` and End | -|`KC_KP_2` |`KC_P2` |Keypad `2` and Down Arrow | -|`KC_KP_3` |`KC_P3` |Keypad `3` and Page Down | -|`KC_KP_4` |`KC_P4` |Keypad `4` and Left Arrow | -|`KC_KP_5` |`KC_P5` |Keypad `5` | -|`KC_KP_6` |`KC_P6` |Keypad `6` and Right Arrow | -|`KC_KP_7` |`KC_P7` |Keypad `7` and Home | -|`KC_KP_8` |`KC_P8` |Keypad `8` and Up Arrow | -|`KC_KP_9` |`KC_P9` |Keypad `9` and Page Up | -|`KC_KP_0` |`KC_P0` |Keypad `0` and Insert | -|`KC_KP_DOT` |`KC_PDOT` |Keypad `.` and Delete | -|`KC_NONUS_BSLASH` |`KC_NUBS` |Non-US `\` and `\|` | -|`KC_APPLICATION` |`KC_APP` |Application (Windows Menu Key) | -|`KC_POWER` | |System Power (macOS) | -|`KC_KP_EQUAL` |`KC_PEQL` |Keypad `=` | -|`KC_F13` | |F13 | -|`KC_F14` | |F14 | -|`KC_F15` | |F15 | -|`KC_F16` | |F16 | -|`KC_F17` | |F17 | -|`KC_F18` | |F18 | -|`KC_F19` | |F19 | -|`KC_F20` | |F20 | -|`KC_F21` | |F21 | -|`KC_F22` | |F22 | -|`KC_F23` | |F23 | -|`KC_F24` | |F24 | -|`KC_EXECUTE` |`KC_EXEC` |Execute | -|`KC_HELP` | |Help | -|`KC_MENU` | |Menu | -|`KC_SELECT` |`KC_SLCT` |Select | -|`KC_STOP` | |Stop | -|`KC_AGAIN` |`KC_AGIN` |Again | -|`KC_UNDO` | |Undo | -|`KC_CUT` | |Cut | -|`KC_COPY` | |Copy | -|`KC_PASTE` |`KC_PSTE` |Paste | -|`KC_FIND` | |Find | -|`KC__MUTE` | |Mute (macOS) | -|`KC__VOLUP` | |Volume Up (macOS) | -|`KC__VOLDOWN` | |Volume Down (macOS) | -|`KC_LOCKING_CAPS` |`KC_LCAP` |Locking Caps Lock | -|`KC_LOCKING_NUM` |`KC_LNUM` |Locking Num Lock | -|`KC_LOCKING_SCROLL` |`KC_LSCR` |Locking Scroll Lock | -|`KC_KP_COMMA` |`KC_PCMM` |Keypad `,` | -|`KC_KP_EQUAL_AS400` | |Keypad `=` on AS/400 keyboards | -|`KC_INT1` |`KC_RO` |JIS `\` and `_` | -|`KC_INT2` |`KC_KANA` |JIS Katakana/Hiragana | -|`KC_INT3` |`KC_JYEN` |JIS `¥` and `\|` | -|`KC_INT4` |`KC_HENK` |JIS Henkan | -|`KC_INT5` |`KC_MHEN` |JIS Muhenkan | -|`KC_INT6` | |JIS Numpad `,` | -|`KC_INT7` | |International 7 | -|`KC_INT8` | |International 8 | -|`KC_INT9` | |International 9 | -|`KC_LANG1` |`KC_HAEN` |Hangul/English | -|`KC_LANG2` |`KC_HANJ` |Hanja | -|`KC_LANG3` | |JIS Katakana | -|`KC_LANG4` | |JIS Hiragana | -|`KC_LANG5` | |JIS Zenkaku/Hankaku | -|`KC_LANG6` | |Language 6 | -|`KC_LANG7` | |Language 7 | -|`KC_LANG8` | |Language 8 | -|`KC_LANG9` | |Language 9 | -|`KC_ALT_ERASE` |`KC_ERAS` |Alternate Erase | -|`KC_SYSREQ` | |SysReq/Attention | -|`KC_CANCEL` | |Cancel | -|`KC_CLEAR` |`KC_CLR` |Clear | -|`KC_PRIOR` | |Prior | -|`KC_RETURN` | |Return | -|`KC_SEPARATOR` | |Separator | -|`KC_OUT` | |Out | -|`KC_OPER` | |Oper | -|`KC_CLEAR_AGAIN` | |Clear/Again | -|`KC_CRSEL` | |CrSel/Props | -|`KC_EXSEL` | |ExSel | -|`KC_LCTRL` |`KC_LCTL` |Left Control | -|`KC_LSHIFT` |`KC_LSFT` |Left Shift | -|`KC_LALT` |`KC_LOPT` |Left Alt (Option) | -|`KC_LGUI` |`KC_LCMD`, `KC_LWIN` |Left GUI (Windows/Command/Meta key) | -|`KC_RCTRL` |`KC_RCTL` |Right Control | -|`KC_RSHIFT` |`KC_RSFT` |Right Shift | -|`KC_RALT` |`KC_ROPT`, `KC_ALGR` |Right Alt (Option/AltGr) | -|`KC_RGUI` |`KC_RCMD`, `KC_RWIN` |Right GUI (Windows/Command/Meta key) | -|`KC_SYSTEM_POWER` |`KC_PWR` |System Power Down | -|`KC_SYSTEM_SLEEP` |`KC_SLEP` |System Sleep | -|`KC_SYSTEM_WAKE` |`KC_WAKE` |System Wake | -|`KC_AUDIO_MUTE` |`KC_MUTE` |Mute | -|`KC_AUDIO_VOL_UP` |`KC_VOLU` |Volume Up | -|`KC_AUDIO_VOL_DOWN` |`KC_VOLD` |Volume Down | -|`KC_MEDIA_NEXT_TRACK` |`KC_MNXT` |Next Track | -|`KC_MEDIA_PREV_TRACK` |`KC_MPRV` |Previous Track | -|`KC_MEDIA_STOP` |`KC_MSTP` |Stop Track (Windows) | -|`KC_MEDIA_PLAY_PAUSE` |`KC_MPLY` |Play/Pause Track | -|`KC_MEDIA_SELECT` |`KC_MSEL` |Launch Media Player (Windows) | -|`KC_MEDIA_EJECT` |`KC_EJCT` |Eject (macOS) | -|`KC_MAIL` | |Launch Mail (Windows) | -|`KC_CALCULATOR` |`KC_CALC` |Launch Calculator (Windows) | -|`KC_MY_COMPUTER` |`KC_MYCM` |Launch My Computer (Windows) | -|`KC_WWW_SEARCH` |`KC_WSCH` |Browser Search (Windows) | -|`KC_WWW_HOME` |`KC_WHOM` |Browser Home (Windows) | -|`KC_WWW_BACK` |`KC_WBAK` |Browser Back (Windows) | -|`KC_WWW_FORWARD` |`KC_WFWD` |Browser Forward (Windows) | -|`KC_WWW_STOP` |`KC_WSTP` |Browser Stop (Windows) | -|`KC_WWW_REFRESH` |`KC_WREF` |Browser Refresh (Windows) | -|`KC_WWW_FAVORITES` |`KC_WFAV` |Browser Favorites (Windows) | -|`KC_MEDIA_FAST_FORWARD`|`KC_MFFD` |Next Track (macOS) | -|`KC_MEDIA_REWIND` |`KC_MRWD` |Previous Track (macOS) | -|`KC_BRIGHTNESS_UP` |`KC_BRIU` |Brightness Up | -|`KC_BRIGHTNESS_DOWN` |`KC_BRID` |Brightness Down | +|Key |Aliases |Description |Windows |macOS |Linux1| +|-----------------------|------------------------------|-----------------------------------------------|-------------|-------------|-----------------| +|`KC_NO` |`XXXXXXX` |Ignore this key (NOOP) |*N/A* |*N/A* |*N/A* | +|`KC_TRANSPARENT` |`KC_TRNS`, `_______` |Use the next lowest non-transparent key |*N/A* |*N/A* |*N/A* | +|`KC_A` | |`a` and `A` |✔ |✔ |✔ | +|`KC_B` | |`b` and `B` |✔ |✔ |✔ | +|`KC_C` | |`c` and `C` |✔ |✔ |✔ | +|`KC_D` | |`d` and `D` |✔ |✔ |✔ | +|`KC_E` | |`e` and `E` |✔ |✔ |✔ | +|`KC_F` | |`f` and `F` |✔ |✔ |✔ | +|`KC_G` | |`g` and `G` |✔ |✔ |✔ | +|`KC_H` | |`h` and `H` |✔ |✔ |✔ | +|`KC_I` | |`i` and `I` |✔ |✔ |✔ | +|`KC_J` | |`j` and `J` |✔ |✔ |✔ | +|`KC_K` | |`k` and `K` |✔ |✔ |✔ | +|`KC_L` | |`l` and `L` |✔ |✔ |✔ | +|`KC_M` | |`m` and `M` |✔ |✔ |✔ | +|`KC_N` | |`n` and `N` |✔ |✔ |✔ | +|`KC_O` | |`o` and `O` |✔ |✔ |✔ | +|`KC_P` | |`p` and `P` |✔ |✔ |✔ | +|`KC_Q` | |`q` and `Q` |✔ |✔ |✔ | +|`KC_R` | |`r` and `R` |✔ |✔ |✔ | +|`KC_S` | |`s` and `S` |✔ |✔ |✔ | +|`KC_T` | |`t` and `T` |✔ |✔ |✔ | +|`KC_U` | |`u` and `U` |✔ |✔ |✔ | +|`KC_V` | |`v` and `V` |✔ |✔ |✔ | +|`KC_W` | |`w` and `W` |✔ |✔ |✔ | +|`KC_X` | |`x` and `X` |✔ |✔ |✔ | +|`KC_Y` | |`y` and `Y` |✔ |✔ |✔ | +|`KC_Z` | |`z` and `Z` |✔ |✔ |✔ | +|`KC_1` | |`1` and `!` |✔ |✔ |✔ | +|`KC_2` | |`2` and `@` |✔ |✔ |✔ | +|`KC_3` | |`3` and `#` |✔ |✔ |✔ | +|`KC_4` | |`4` and `$` |✔ |✔ |✔ | +|`KC_5` | |`5` and `%` |✔ |✔ |✔ | +|`KC_6` | |`6` and `^` |✔ |✔ |✔ | +|`KC_7` | |`7` and `&` |✔ |✔ |✔ | +|`KC_8` | |`8` and `*` |✔ |✔ |✔ | +|`KC_9` | |`9` and `(` |✔ |✔ |✔ | +|`KC_0` | |`0` and `)` |✔ |✔ |✔ | +|`KC_ENTER` |`KC_ENT` |Return (Enter) |✔ |✔ |✔ | +|`KC_ESCAPE` |`KC_ESC` |Escape |✔ |✔ |✔ | +|`KC_BSPACE` |`KC_BSPC` |Delete (Backspace) |✔ |✔ |✔ | +|`KC_TAB` | |Tab |✔ |✔ |✔ | +|`KC_SPACE` |`KC_SPC` |Spacebar |✔ |✔ |✔ | +|`KC_MINUS` |`KC_MINS` |`-` and `_` |✔ |✔ |✔ | +|`KC_EQUAL` |`KC_EQL` |`=` and `+` |✔ |✔ |✔ | +|`KC_LBRACKET` |`KC_LBRC` |`[` and `{` |✔ |✔ |✔ | +|`KC_RBRACKET` |`KC_RBRC` |`]` and `}` |✔ |✔ |✔ | +|`KC_BSLASH` |`KC_BSLS` |`\` and `\|` |✔ |✔ |✔ | +|`KC_NONUS_HASH` |`KC_NUHS` |Non-US `#` and `~` |✔ |✔ |✔ | +|`KC_SCOLON` |`KC_SCLN` |`;` and `:` |✔ |✔ |✔ | +|`KC_QUOTE` |`KC_QUOT` |`'` and `"` |✔ |✔ |✔ | +|`KC_GRAVE` |`KC_GRV`, `KC_ZKHK` |` and `~`, JIS Zenkaku/Hankaku|✔ |✔ |✔ | +|`KC_COMMA` |`KC_COMM` |`,` and `<` |✔ |✔ |✔ | +|`KC_DOT` | |`.` and `>` |✔ |✔ |✔ | +|`KC_SLASH` |`KC_SLSH` |`/` and `?` |✔ |✔ |✔ | +|`KC_CAPSLOCK` |`KC_CLCK`, `KC_CAPS` |Caps Lock |✔ |✔ |✔ | +|`KC_F1` | |F1 |✔ |✔ |✔ | +|`KC_F2` | |F2 |✔ |✔ |✔ | +|`KC_F3` | |F3 |✔ |✔ |✔ | +|`KC_F4` | |F4 |✔ |✔ |✔ | +|`KC_F5` | |F5 |✔ |✔ |✔ | +|`KC_F6` | |F6 |✔ |✔ |✔ | +|`KC_F7` | |F7 |✔ |✔ |✔ | +|`KC_F8` | |F8 |✔ |✔ |✔ | +|`KC_F9` | |F9 |✔ |✔ |✔ | +|`KC_F10` | |F10 |✔ |✔ |✔ | +|`KC_F11` | |F11 |✔ |✔ |✔ | +|`KC_F12` | |F12 |✔ |✔ |✔ | +|`KC_PSCREEN` |`KC_PSCR` |Print Screen |✔ |✔2|✔ | +|`KC_SCROLLLOCK` |`KC_SLCK`, `KC_BRMD` |Scroll Lock, Brightness Down (macOS) |✔ |✔2|✔ | +|`KC_PAUSE` |`KC_PAUS`, `KC_BRK`, `KC_BRMU`|Pause, Brightness Up (macOS) |✔ |✔2|✔ | +|`KC_INSERT` |`KC_INS` |Insert |✔ | |✔ | +|`KC_HOME` | |Home |✔ |✔ |✔ | +|`KC_PGUP` | |Page Up |✔ |✔ |✔ | +|`KC_DELETE` |`KC_DEL` |Forward Delete |✔ |✔ |✔ | +|`KC_END` | |End |✔ |✔ |✔ | +|`KC_PGDOWN` |`KC_PGDN` |Page Down |✔ |✔ |✔ | +|`KC_RIGHT` |`KC_RGHT` |Right Arrow |✔ |✔ |✔ | +|`KC_LEFT` | |Left Arrow |✔ |✔ |✔ | +|`KC_DOWN` | |Down Arrow |✔ |✔ |✔ | +|`KC_UP` | |Up Arrow |✔ |✔ |✔ | +|`KC_NUMLOCK` |`KC_NLCK` |Keypad Num Lock and Clear |✔ |✔ |✔ | +|`KC_KP_SLASH` |`KC_PSLS` |Keypad `/` |✔ |✔ |✔ | +|`KC_KP_ASTERISK` |`KC_PAST` |Keypad `*` |✔ |✔ |✔ | +|`KC_KP_MINUS` |`KC_PMNS` |Keypad `-` |✔ |✔ |✔ | +|`KC_KP_PLUS` |`KC_PPLS` |Keypad `+` |✔ |✔ |✔ | +|`KC_KP_ENTER` |`KC_PENT` |Keypad Enter |✔ |✔ |✔ | +|`KC_KP_1` |`KC_P1` |Keypad `1` and End |✔ |✔ |✔ | +|`KC_KP_2` |`KC_P2` |Keypad `2` and Down Arrow |✔ |✔ |✔ | +|`KC_KP_3` |`KC_P3` |Keypad `3` and Page Down |✔ |✔ |✔ | +|`KC_KP_4` |`KC_P4` |Keypad `4` and Left Arrow |✔ |✔ |✔ | +|`KC_KP_5` |`KC_P5` |Keypad `5` |✔ |✔ |✔ | +|`KC_KP_6` |`KC_P6` |Keypad `6` and Right Arrow |✔ |✔ |✔ | +|`KC_KP_7` |`KC_P7` |Keypad `7` and Home |✔ |✔ |✔ | +|`KC_KP_8` |`KC_P8` |Keypad `8` and Up Arrow |✔ |✔ |✔ | +|`KC_KP_9` |`KC_P9` |Keypad `9` and Page Up |✔ |✔ |✔ | +|`KC_KP_0` |`KC_P0` |Keypad `0` and Insert |✔ |✔ |✔ | +|`KC_KP_DOT` |`KC_PDOT` |Keypad `.` and Delete |✔ |✔ |✔ | +|`KC_NONUS_BSLASH` |`KC_NUBS` |Non-US `\` and `\|` |✔ |✔ |✔ | +|`KC_APPLICATION` |`KC_APP` |Application (Windows Context Menu Key) |✔ | |✔ | +|`KC_POWER` | |System Power | |✔3|✔ | +|`KC_KP_EQUAL` |`KC_PEQL` |Keypad `=` |✔ |✔ |✔ | +|`KC_F13` | |F13 |✔ |✔ |✔ | +|`KC_F14` | |F14 |✔ |✔ |✔ | +|`KC_F15` | |F15 |✔ |✔ |✔ | +|`KC_F16` | |F16 |✔ |✔ |✔ | +|`KC_F17` | |F17 |✔ |✔ |✔ | +|`KC_F18` | |F18 |✔ |✔ |✔ | +|`KC_F19` | |F19 |✔ |✔ |✔ | +|`KC_F20` | |F20 |✔ | |✔ | +|`KC_F21` | |F21 |✔ | |✔ | +|`KC_F22` | |F22 |✔ | |✔ | +|`KC_F23` | |F23 |✔ | |✔ | +|`KC_F24` | |F24 |✔ | |✔ | +|`KC_EXECUTE` |`KC_EXEC` |Execute | | |✔ | +|`KC_HELP` | |Help | | |✔ | +|`KC_MENU` | |Menu | | |✔ | +|`KC_SELECT` |`KC_SLCT` |Select | | |✔ | +|`KC_STOP` | |Stop | | |✔ | +|`KC_AGAIN` |`KC_AGIN` |Again | | |✔ | +|`KC_UNDO` | |Undo | | |✔ | +|`KC_CUT` | |Cut | | |✔ | +|`KC_COPY` | |Copy | | |✔ | +|`KC_PASTE` |`KC_PSTE` |Paste | | |✔ | +|`KC_FIND` | |Find | | |✔ | +|`KC__MUTE` | |Mute | |✔ |✔ | +|`KC__VOLUP` | |Volume Up | |✔ |✔ | +|`KC__VOLDOWN` | |Volume Down | |✔ |✔ | +|`KC_LOCKING_CAPS` |`KC_LCAP` |Locking Caps Lock |✔ |✔ | | +|`KC_LOCKING_NUM` |`KC_LNUM` |Locking Num Lock |✔ |✔ | | +|`KC_LOCKING_SCROLL` |`KC_LSCR` |Locking Scroll Lock |✔ |✔ | | +|`KC_KP_COMMA` |`KC_PCMM` |Keypad `,` | | |✔ | +|`KC_KP_EQUAL_AS400` | |Keypad `=` on AS/400 keyboards | | | | +|`KC_INT1` |`KC_RO` |JIS `\` and `_` |✔ | |✔ | +|`KC_INT2` |`KC_KANA` |JIS Katakana/Hiragana |✔ | |✔ | +|`KC_INT3` |`KC_JYEN` |JIS `¥` and `\|` |✔ | |✔ | +|`KC_INT4` |`KC_HENK` |JIS Henkan |✔ | |✔ | +|`KC_INT5` |`KC_MHEN` |JIS Muhenkan |✔ | |✔ | +|`KC_INT6` | |JIS Numpad `,` | | |✔ | +|`KC_INT7` | |International 7 | | | | +|`KC_INT8` | |International 8 | | | | +|`KC_INT9` | |International 9 | | | | +|`KC_LANG1` |`KC_HAEN` |Hangul/English | | |✔ | +|`KC_LANG2` |`KC_HANJ` |Hanja | | |✔ | +|`KC_LANG3` | |JIS Katakana | | |✔ | +|`KC_LANG4` | |JIS Hiragana | | |✔ | +|`KC_LANG5` | |JIS Zenkaku/Hankaku | | |✔ | +|`KC_LANG6` | |Language 6 | | | | +|`KC_LANG7` | |Language 7 | | | | +|`KC_LANG8` | |Language 8 | | | | +|`KC_LANG9` | |Language 9 | | | | +|`KC_ALT_ERASE` |`KC_ERAS` |Alternate Erase | | | | +|`KC_SYSREQ` | |SysReq/Attention | | | | +|`KC_CANCEL` | |Cancel | | | | +|`KC_CLEAR` |`KC_CLR` |Clear | | |✔ | +|`KC_PRIOR` | |Prior | | | | +|`KC_RETURN` | |Return | | | | +|`KC_SEPARATOR` | |Separator | | | | +|`KC_OUT` | |Out | | | | +|`KC_OPER` | |Oper | | | | +|`KC_CLEAR_AGAIN` | |Clear/Again | | | | +|`KC_CRSEL` | |CrSel/Props | | | | +|`KC_EXSEL` | |ExSel | | | | +|`KC_LCTRL` |`KC_LCTL` |Left Control |✔ |✔ |✔ | +|`KC_LSHIFT` |`KC_LSFT` |Left Shift |✔ |✔ |✔ | +|`KC_LALT` |`KC_LOPT` |Left Alt (Option) |✔ |✔ |✔ | +|`KC_LGUI` |`KC_LCMD`, `KC_LWIN` |Left GUI (Windows/Command/Meta key) |✔ |✔ |✔ | +|`KC_RCTRL` |`KC_RCTL` |Right Control |✔ |✔ |✔ | +|`KC_RSHIFT` |`KC_RSFT` |Right Shift |✔ |✔ |✔ | +|`KC_RALT` |`KC_ROPT`, `KC_ALGR` |Right Alt (Option/AltGr) |✔ |✔ |✔ | +|`KC_RGUI` |`KC_RCMD`, `KC_RWIN` |Right GUI (Windows/Command/Meta key) |✔ |✔ |✔ | +|`KC_SYSTEM_POWER` |`KC_PWR` |System Power Down |✔ |✔3|✔ | +|`KC_SYSTEM_SLEEP` |`KC_SLEP` |System Sleep |✔ |✔3|✔ | +|`KC_SYSTEM_WAKE` |`KC_WAKE` |System Wake | |✔3|✔ | +|`KC_AUDIO_MUTE` |`KC_MUTE` |Mute |✔ |✔ |✔ | +|`KC_AUDIO_VOL_UP` |`KC_VOLU` |Volume Up |✔ |✔4|✔ | +|`KC_AUDIO_VOL_DOWN` |`KC_VOLD` |Volume Down |✔ |✔4|✔ | +|`KC_MEDIA_NEXT_TRACK` |`KC_MNXT` |Next Track |✔ |✔5|✔ | +|`KC_MEDIA_PREV_TRACK` |`KC_MPRV` |Previous Track |✔ |✔5|✔ | +|`KC_MEDIA_STOP` |`KC_MSTP` |Stop Track |✔ | |✔ | +|`KC_MEDIA_PLAY_PAUSE` |`KC_MPLY` |Play/Pause Track |✔ |✔ |✔ | +|`KC_MEDIA_SELECT` |`KC_MSEL` |Launch Media Player |✔ | |✔ | +|`KC_MEDIA_EJECT` |`KC_EJCT` |Eject | |✔ |✔ | +|`KC_MAIL` | |Launch Mail |✔ | |✔ | +|`KC_CALCULATOR` |`KC_CALC` |Launch Calculator |✔ | |✔ | +|`KC_MY_COMPUTER` |`KC_MYCM` |Launch My Computer |✔ | |✔ | +|`KC_WWW_SEARCH` |`KC_WSCH` |Browser Search |✔ | |✔ | +|`KC_WWW_HOME` |`KC_WHOM` |Browser Home |✔ | |✔ | +|`KC_WWW_BACK` |`KC_WBAK` |Browser Back |✔ | |✔ | +|`KC_WWW_FORWARD` |`KC_WFWD` |Browser Forward |✔ | |✔ | +|`KC_WWW_STOP` |`KC_WSTP` |Browser Stop |✔ | |✔ | +|`KC_WWW_REFRESH` |`KC_WREF` |Browser Refresh |✔ | |✔ | +|`KC_WWW_FAVORITES` |`KC_WFAV` |Browser Favorites |✔ | |✔ | +|`KC_MEDIA_FAST_FORWARD`|`KC_MFFD` |Next Track |✔ |✔5|✔ | +|`KC_MEDIA_REWIND` |`KC_MRWD` |Previous Track |✔6|✔5|✔ | +|`KC_BRIGHTNESS_UP` |`KC_BRIU` |Brightness Up |✔ |✔ |✔ | +|`KC_BRIGHTNESS_DOWN` |`KC_BRID` |Brightness Down |✔ |✔ |✔ | + +1. The Linux kernel HID driver recognizes [nearly all keycodes](https://github.com/torvalds/linux/blob/master/drivers/hid/hid-input.c), but the default bindings depend on the DE/WM.
+2. Treated as F13-F15.
+3. Must be held for about three seconds, and will display a prompt instead.
+4. Holding Shift+Option allows for finer control of volume level.
+5. Skips the entire track in iTunes when tapped, seeks within the current track when held.
+6. WMP does not recognize the Rewind key, but both alter playback speed in VLC. ## Quantum Keycodes :id=quantum-keycodes From b83fb9eb711ea8c7b064a660bc20b62f4d812bd4 Mon Sep 17 00:00:00 2001 From: Cable Car Designs <17062872+westfoxtrot@users.noreply.github.com> Date: Tue, 9 Jun 2020 19:37:41 +0100 Subject: [PATCH 112/930] [Keyboard] add prophet support (#9275) * add prophet support * Update keyboards/westfoxtrot/prophet/config.h * Update keyboards/westfoxtrot/prophet/rules.mk * Update keyboards/westfoxtrot/prophet/config.h * Update keyboards/westfoxtrot/prophet/prophet.c * Update keyboards/westfoxtrot/prophet/readme.md * Update keyboards/westfoxtrot/prophet/readme.md * Update keyboards/westfoxtrot/prophet/keymaps/default/keymap.c * Update keyboards/westfoxtrot/prophet/keymaps/default/keymap.c * Update keyboards/westfoxtrot/prophet/keymaps/via/keymap.c * Update keyboards/westfoxtrot/prophet/keymaps/via/keymap.c * Update keyboards/westfoxtrot/prophet/keymaps/via/keymap.c * Update keyboards/westfoxtrot/prophet/keymaps/via/keymap.c * remove bootloader_defs fixed via keymap * Update keyboards/westfoxtrot/prophet/prophet.h * Update keyboards/westfoxtrot/prophet/keymaps/default/keymap.c * Update keyboards/westfoxtrot/prophet/keymaps/default/keymap.c * Update keyboards/westfoxtrot/prophet/keymaps/via/keymap.c * Update keyboards/westfoxtrot/prophet/keymaps/via/keymap.c * Update keyboards/westfoxtrot/prophet/keymaps/via/keymap.c * changed vendor id * changed prophet.c --- keyboards/westfoxtrot/prophet/chconf.h | 714 ++++++++++++++++++ keyboards/westfoxtrot/prophet/config.h | 33 + keyboards/westfoxtrot/prophet/halconf.h | 525 +++++++++++++ .../prophet/keymaps/default/keymap.c | 21 + .../prophet/keymaps/default/readme.md | 1 + .../westfoxtrot/prophet/keymaps/via/keymap.c | 34 + .../westfoxtrot/prophet/keymaps/via/rules.mk | 2 + keyboards/westfoxtrot/prophet/mcuconf.h | 176 +++++ keyboards/westfoxtrot/prophet/prophet.c | 19 + keyboards/westfoxtrot/prophet/prophet.h | 20 + keyboards/westfoxtrot/prophet/readme.md | 11 + keyboards/westfoxtrot/prophet/rules.mk | 19 + 12 files changed, 1575 insertions(+) create mode 100644 keyboards/westfoxtrot/prophet/chconf.h create mode 100644 keyboards/westfoxtrot/prophet/config.h create mode 100644 keyboards/westfoxtrot/prophet/halconf.h create mode 100644 keyboards/westfoxtrot/prophet/keymaps/default/keymap.c create mode 100644 keyboards/westfoxtrot/prophet/keymaps/default/readme.md create mode 100644 keyboards/westfoxtrot/prophet/keymaps/via/keymap.c create mode 100644 keyboards/westfoxtrot/prophet/keymaps/via/rules.mk create mode 100644 keyboards/westfoxtrot/prophet/mcuconf.h create mode 100644 keyboards/westfoxtrot/prophet/prophet.c create mode 100644 keyboards/westfoxtrot/prophet/prophet.h create mode 100644 keyboards/westfoxtrot/prophet/readme.md create mode 100644 keyboards/westfoxtrot/prophet/rules.mk diff --git a/keyboards/westfoxtrot/prophet/chconf.h b/keyboards/westfoxtrot/prophet/chconf.h new file mode 100644 index 000000000000..03f63da36a88 --- /dev/null +++ b/keyboards/westfoxtrot/prophet/chconf.h @@ -0,0 +1,714 @@ +/* + 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. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +/** + * @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. + * + * @addtogroup config + * @details Kernel related settings and hooks. + * @{ + */ + +#ifndef CHCONF_H +#define CHCONF_H + +#define _CHIBIOS_RT_CONF_ +#define _CHIBIOS_RT_CONF_VER_6_0_ + +/*===========================================================================*/ +/** + * @name System timers settings + * @{ + */ +/*===========================================================================*/ + +/** + * @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. + * @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. + */ +#if !defined(CH_CFG_ST_TIMEDELTA) +#define CH_CFG_ST_TIMEDELTA 2 +#endif + +/** @} */ + +/*===========================================================================*/ +/** + * @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. + */ +#if !defined(CH_CFG_TIME_QUANTUM) +#define CH_CFG_TIME_QUANTUM 0 +#endif + +/** + * @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. + */ +#if !defined(CH_CFG_MEMCORE_SIZE) +#define CH_CFG_MEMCORE_SIZE 0 +#endif + +/** + * @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. + */ +#if !defined(CH_CFG_NO_IDLE_THREAD) +#define CH_CFG_NO_IDLE_THREAD FALSE +#endif + +/** @} */ + +/*===========================================================================*/ +/** + * @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. + */ +#if !defined(CH_CFG_OPTIMIZE_SPEED) +#define CH_CFG_OPTIMIZE_SPEED FALSE +#endif + +/** @} */ + +/*===========================================================================*/ +/** + * @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. + */ +#if !defined(CH_CFG_USE_TM) +#define CH_CFG_USE_TM FALSE +#endif + +/** + * @brief Threads registry APIs. + * @details If enabled then the registry APIs are included in the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_REGISTRY) +#define CH_CFG_USE_REGISTRY TRUE +#endif + +/** + * @brief Threads synchronization APIs. + * @details If enabled then the @p chThdWait() function is included in + * the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_WAITEXIT) +#define CH_CFG_USE_WAITEXIT TRUE +#endif + +/** + * @brief Semaphores APIs. + * @details If enabled then the Semaphores APIs are included in the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_SEMAPHORES) +#define CH_CFG_USE_SEMAPHORES TRUE +#endif + +/** + * @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. + */ +#if !defined(CH_CFG_USE_SEMAPHORES_PRIORITY) +#define CH_CFG_USE_SEMAPHORES_PRIORITY FALSE +#endif + +/** + * @brief Mutexes APIs. + * @details If enabled then the mutexes APIs are included in the kernel. + * + * @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. + * @note Recursive mutexes are heavier and have an increased + * memory footprint. + * + * @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. + * @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. + */ +#if !defined(CH_CFG_USE_CONDVARS) +#define CH_CFG_USE_CONDVARS TRUE +#endif + +/** + * @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. + */ +#if !defined(CH_CFG_USE_CONDVARS_TIMEOUT) +#define CH_CFG_USE_CONDVARS_TIMEOUT FALSE +#endif + +/** + * @brief Events Flags APIs. + * @details If enabled then the event flags APIs are included in the kernel. + * + * @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. + * @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. + */ +#if !defined(CH_CFG_USE_EVENTS_TIMEOUT) +#define CH_CFG_USE_EVENTS_TIMEOUT TRUE +#endif + +/** + * @brief Synchronous Messages APIs. + * @details If enabled then the synchronous messages APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_MESSAGES) +#define CH_CFG_USE_MESSAGES TRUE +#endif + +/** + * @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. + */ +#if !defined(CH_CFG_USE_MESSAGES_PRIORITY) +#define CH_CFG_USE_MESSAGES_PRIORITY FALSE +#endif + +/** + * @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. + */ +#if !defined(CH_CFG_USE_MAILBOXES) +#define CH_CFG_USE_MAILBOXES TRUE +#endif + +/** + * @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. + */ +#if !defined(CH_CFG_USE_MEMCORE) +#define CH_CFG_USE_MEMCORE TRUE +#endif + +/** + * @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. + */ +#if !defined(CH_CFG_USE_HEAP) +#define CH_CFG_USE_HEAP FALSE +#endif + +/** + * @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. + */ +#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. + * @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. + */ +#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 + +/** @} */ + +/*===========================================================================*/ +/** + * @name Debug options + * @{ + */ +/*===========================================================================*/ + +/** + * @brief Debug option, kernel statistics. + * + * @note The default is @p FALSE. + */ +#if !defined(CH_DBG_STATISTICS) +#define CH_DBG_STATISTICS FALSE +#endif + +/** + * @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. + */ +#if !defined(CH_DBG_SYSTEM_STATE_CHECK) +#define CH_DBG_SYSTEM_STATE_CHECK FALSE +#endif + +/** + * @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. + */ +#if !defined(CH_DBG_ENABLE_CHECKS) +#define CH_DBG_ENABLE_CHECKS FALSE +#endif + +/** + * @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. + */ +#if !defined(CH_DBG_ENABLE_ASSERTS) +#define CH_DBG_ENABLE_ASSERTS FALSE +#endif + +/** + * @brief Debug option, trace buffer. + * @details If enabled then the trace buffer is activated. + * + * @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. + * @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. + */ +#if !defined(CH_DBG_ENABLE_STACK_CHECK) +#define CH_DBG_ENABLE_STACK_CHECK FALSE +#endif + +/** + * @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. + */ +#if !defined(CH_DBG_FILL_THREADS) +#define CH_DBG_FILL_THREADS FALSE +#endif + +/** + * @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. + */ +#if !defined(CH_DBG_THREADS_PROFILING) +#define CH_DBG_THREADS_PROFILING FALSE +#endif + +/** @} */ + +/*===========================================================================*/ +/** + * @name Kernel hooks + * @{ + */ +/*===========================================================================*/ + +/** + * @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. + */ +#define CH_CFG_THREAD_EXTRA_FIELDS \ + /* Add threads custom fields here.*/ + +/** + * @brief Threads initialization hook. + * @details User initialization code added to the @p _thread_init() function. + * + * @note It is invoked from within @p _thread_init() 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/westfoxtrot/prophet/config.h b/keyboards/westfoxtrot/prophet/config.h new file mode 100644 index 000000000000..2a457866c201 --- /dev/null +++ b/keyboards/westfoxtrot/prophet/config.h @@ -0,0 +1,33 @@ +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFF21 +#define PRODUCT_ID 0xAA03 +#define DEVICE_VER 0x0001 +#define MANUFACTURER westfoxtrot +#define PRODUCT prophet +#define DESCRIPTION QMK Firmware for the prophet PCB + +/* key matrix size */ +#define MATRIX_ROWS 5 +#define MATRIX_COLS 14 + +/* + * Keyboard Matrix Assignments +*/ +#define MATRIX_ROW_PINS { C13, B2, B1, A4, A3 } +#define MATRIX_COL_PINS { A6, A7, B0, A9, A8, A14, A15, B3, B4, B5, B8, B7, B6, B9 } +#define UNUSED_PINS + +/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */ +#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/westfoxtrot/prophet/halconf.h b/keyboards/westfoxtrot/prophet/halconf.h new file mode 100644 index 000000000000..16f32117d51b --- /dev/null +++ b/keyboards/westfoxtrot/prophet/halconf.h @@ -0,0 +1,525 @@ +/* + 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. + 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 + +#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 +#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 cryptographic subsystem. + */ +#if !defined(HAL_USE_CRY) || defined(__DOXYGEN__) +#define HAL_USE_CRY FALSE +#endif + +/** + * @brief Enables the DAC subsystem. + */ +#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 +#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 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 +#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 +#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 + +/** + * @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. */ +/*===========================================================================*/ + +/** + * @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 + +/** + * @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. */ +/*===========================================================================*/ + +/** + * @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 the zero-copy API. + */ +#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 + +/** + * @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. */ +/*===========================================================================*/ + +/** + * @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 16 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 256 bytes for both the transmission and receive + * buffers. + */ +#if !defined(SERIAL_USB_BUFFERS_SIZE) || defined(__DOXYGEN__) +#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 + +/*===========================================================================*/ +/* 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 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 +#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. */ +/*===========================================================================*/ + +/** + * @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 + +/*===========================================================================*/ +/* 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/westfoxtrot/prophet/keymaps/default/keymap.c b/keyboards/westfoxtrot/prophet/keymaps/default/keymap.c new file mode 100644 index 000000000000..095baf9ac905 --- /dev/null +++ b/keyboards/westfoxtrot/prophet/keymaps/default/keymap.c @@ -0,0 +1,21 @@ +#include QMK_KEYBOARD_H + +#define _MA 0 +#define _F1 1 + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [_MA] = 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_GRV, 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_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_BSLS,KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M,KC_COMM, KC_DOT,KC_SLSH,KC_RSFT, MO(_F1), + KC_LGUI,KC_LGUI,KC_LALT, KC_SPC, KC_RALT,KC_RGUI,KC_RCTL), + + [_F1] = 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_INS,KC_DEL, + KC_CAPS,_______,_______,_______,_______,_______,_______,_______,KC_PSCR,KC_SLCK,KC_PAUS,KC_UP,_______,KC_DEL, + _______,KC_VOLD,KC_VOLU,KC_MUTE,KC_EJCT,_______,KC_PAST,KC_PSLS,KC_HOME,KC_PGUP,KC_LEFT,KC_RIGHT, _______, + _______,_______,_______,_______,_______,_______,_______,KC_PPLS,KC_PMNS,KC_END,KC_PGDN,KC_DOWN,_______,_______, + _______,_______,_______, _______, KC_STOP,_______,_______) + }; diff --git a/keyboards/westfoxtrot/prophet/keymaps/default/readme.md b/keyboards/westfoxtrot/prophet/keymaps/default/readme.md new file mode 100644 index 000000000000..8d2b027b8ffa --- /dev/null +++ b/keyboards/westfoxtrot/prophet/keymaps/default/readme.md @@ -0,0 +1 @@ +# The default keymap for prophet \ No newline at end of file diff --git a/keyboards/westfoxtrot/prophet/keymaps/via/keymap.c b/keyboards/westfoxtrot/prophet/keymaps/via/keymap.c new file mode 100644 index 000000000000..966ea3a84dae --- /dev/null +++ b/keyboards/westfoxtrot/prophet/keymaps/via/keymap.c @@ -0,0 +1,34 @@ +#include QMK_KEYBOARD_H + +#define _MA 0 +#define _F1 1 + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [_MA] = 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_GRV, 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_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_BSLS,KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M,KC_COMM, KC_DOT,KC_SLSH,KC_RSFT, MO(_F1), + KC_LGUI,KC_LGUI,KC_LALT, KC_SPC, KC_RALT,KC_RGUI,KC_RCTL), + + [_F1] = 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_INS,KC_DEL, + KC_CAPS,_______,_______,_______,_______,_______,_______,_______,KC_PSCR,KC_SLCK,KC_PAUS,KC_UP,_______,KC_DEL, + _______,KC_VOLD,KC_VOLU,KC_MUTE,KC_EJCT,_______,KC_PAST,KC_PSLS,KC_HOME,KC_PGUP,KC_LEFT,KC_RIGHT, _______, + _______,_______,_______,_______,_______,_______,_______,KC_PPLS,KC_PMNS,KC_END,KC_PGDN,KC_DOWN,_______,_______, + _______,_______,_______, _______, KC_STOP,_______,_______), + [2] = LAYOUT_all( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______ ), + + [3] = LAYOUT_all( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______ ), + }; diff --git a/keyboards/westfoxtrot/prophet/keymaps/via/rules.mk b/keyboards/westfoxtrot/prophet/keymaps/via/rules.mk new file mode 100644 index 000000000000..36b7ba9cbc98 --- /dev/null +++ b/keyboards/westfoxtrot/prophet/keymaps/via/rules.mk @@ -0,0 +1,2 @@ +VIA_ENABLE = yes +LTO_ENABLE = yes diff --git a/keyboards/westfoxtrot/prophet/mcuconf.h b/keyboards/westfoxtrot/prophet/mcuconf.h new file mode 100644 index 000000000000..0e49478c8b05 --- /dev/null +++ b/keyboards/westfoxtrot/prophet/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 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_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/westfoxtrot/prophet/prophet.c b/keyboards/westfoxtrot/prophet/prophet.c new file mode 100644 index 000000000000..6fdfd63cdb63 --- /dev/null +++ b/keyboards/westfoxtrot/prophet/prophet.c @@ -0,0 +1,19 @@ +#include "prophet.h" + +void keyboard_pre_init_kb (void) { + setPinOutput(B12); + setPinOutput(B13); +} + +bool led_update_kb(led_t led_state) { + bool res = led_update_user(led_state); + if(res) { + writePin(B13, led_state.caps_lock); + } + return res; +} + +__attribute__((weak)) layer_state_t layer_state_set_user(layer_state_t state) { + writePin(B12, layer_state_cmp(state, 1)); + return state; +} diff --git a/keyboards/westfoxtrot/prophet/prophet.h b/keyboards/westfoxtrot/prophet/prophet.h new file mode 100644 index 000000000000..fb2450ca71e9 --- /dev/null +++ b/keyboards/westfoxtrot/prophet/prophet.h @@ -0,0 +1,20 @@ +#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, K4D, \ + 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, K3C, K3D, \ + K40, K41, K42, K46, K4A, K4B, K4C \ +) \ +{ \ + {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, K3C, K3D}, \ + {K40, K41, K42, ___, ___, ___, K46, ___, ___, ___, K4A, K4B, K4C, K4D} \ +} diff --git a/keyboards/westfoxtrot/prophet/readme.md b/keyboards/westfoxtrot/prophet/readme.md new file mode 100644 index 000000000000..0c114b541f68 --- /dev/null +++ b/keyboards/westfoxtrot/prophet/readme.md @@ -0,0 +1,11 @@ +# prophet + +* Keyboard Maintainer: [westfoxtrot](https://github.com/westfoxtrot) +* Hardware Supported: All versions of the prophet PCB +* Hardware Availability: sold with prophet GB, [PCB Files](https://github.com/westfoxtrot/prophet_pcb) + +Make example for this keyboard (after setting up your build environment): + + make westfoxtrot/prophet: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/prophet/rules.mk b/keyboards/westfoxtrot/prophet/rules.mk new file mode 100644 index 000000000000..71fe10068294 --- /dev/null +++ b/keyboards/westfoxtrot/prophet/rules.mk @@ -0,0 +1,19 @@ +# MCU name +MCU = STM32F072 + +# 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 = 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 +CUSTOM_MATRIX = no # Custom matrix file +BACKLIGHT_ENABLE = no +RGBLIGHT_ENABLE = no + +# Enter lower-power sleep mode when on the ChibiOS idle thread +OPT_DEFS += -DCORTEX_ENABLE_WFI_IDLE=TRUE From 86812f22e42b493d7021fe4bcb726ac9412b8e55 Mon Sep 17 00:00:00 2001 From: Maarten Dekkers Date: Tue, 9 Jun 2020 21:10:00 +0200 Subject: [PATCH 113/930] [Keyboard] Add nt660 PCB (#9042) * Upload nt660 files * Apply suggestions from code review * Apply suggestions from code review --- keyboards/maartenwut/nt660/config.h | 256 ++++++++++++++++++ keyboards/maartenwut/nt660/info.json | 234 ++++++++++++++++ .../maartenwut/nt660/keymaps/default/keymap.c | 26 ++ .../nt660/keymaps/maartenwut/config.h | 3 + .../nt660/keymaps/maartenwut/keymap.c | 58 ++++ .../maartenwut/nt660/keymaps/via/keymap.c | 44 +++ .../maartenwut/nt660/keymaps/via/rules.mk | 2 + keyboards/maartenwut/nt660/nt660.c | 32 +++ keyboards/maartenwut/nt660/nt660.h | 73 +++++ keyboards/maartenwut/nt660/readme.md | 19 ++ keyboards/maartenwut/nt660/rules.mk | 34 +++ 11 files changed, 781 insertions(+) create mode 100644 keyboards/maartenwut/nt660/config.h create mode 100644 keyboards/maartenwut/nt660/info.json create mode 100644 keyboards/maartenwut/nt660/keymaps/default/keymap.c create mode 100644 keyboards/maartenwut/nt660/keymaps/maartenwut/config.h create mode 100644 keyboards/maartenwut/nt660/keymaps/maartenwut/keymap.c create mode 100644 keyboards/maartenwut/nt660/keymaps/via/keymap.c create mode 100644 keyboards/maartenwut/nt660/keymaps/via/rules.mk create mode 100644 keyboards/maartenwut/nt660/nt660.c create mode 100644 keyboards/maartenwut/nt660/nt660.h create mode 100644 keyboards/maartenwut/nt660/readme.md create mode 100644 keyboards/maartenwut/nt660/rules.mk diff --git a/keyboards/maartenwut/nt660/config.h b/keyboards/maartenwut/nt660/config.h new file mode 100644 index 000000000000..84e93b4f049d --- /dev/null +++ b/keyboards/maartenwut/nt660/config.h @@ -0,0 +1,256 @@ +/* +Copyright 2020 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 0x1F02 +#define DEVICE_VER 0x0001 +#define MANUFACTURER Maartenwut +#define PRODUCT nt660 +#define DESCRIPTION Replacement PCB for Leopold FC660M + +/* 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 {B7,E6,F6,F7,C7} +#define MATRIX_COL_PINS {D6,D7,B4,B5,B6,C6,B0,B1,B2,B3,F0,F1,F4,F5,D4} +#define UNUSED_PINS + +/* 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 // 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 */ +#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 D6 // usually COL +#define QMK_ESC_INPUT B7 // usually ROW +#define QMK_LED D0 diff --git a/keyboards/maartenwut/nt660/info.json b/keyboards/maartenwut/nt660/info.json new file mode 100644 index 000000000000..4b2b61969841 --- /dev/null +++ b/keyboards/maartenwut/nt660/info.json @@ -0,0 +1,234 @@ +{ + "keyboard_name": "nt660", + "url": "", + "maintainer": "maartenwut", + "width": 16.5, + "height": 5, + "layouts": { + "LAYOUT_all": { + "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":"k0f", "x":13, "y":0, "w":2}, + {"label":"k0d", "x":15.5, "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":"k1f", "x":13.5, "y":1, "w":1.5}, + {"label":"k1d", "x":15.5, "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":"k2f", "x":13.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}, + {"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":2.25}, + {"label":"k3f", "x":14.5, "y":3}, + + {"label":"k40", "x":0, "y":4, "w":1.25}, + {"label":"k41", "x":1.25, "y":4}, + {"label":"k42", "x":2.25, "y":4, "w":1.25}, + {"label":"k46", "x":3.5, "y":4, "w":6.25}, + {"label":"k49", "x":9.75, "y":4, "w":1.25}, + {"label":"k4a", "x":11, "y":4, "w":1.25}, + {"label":"k4b", "x":12.25, "y":4, "w":1.25}, + {"label":"k4c", "x":13.5, "y":4}, + {"label":"k4f", "x":14.5, "y":4}, + {"label":"k4d", "x":15.5, "y":4} + ] + }, + "LAYOUT_66_ansi": { + "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":"Insert", "x":15.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":"Delete", "x":15.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":"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.25}, + {"label":"\u2191", "x":14.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}, + {"x":3.5, "y":4, "w":6.25}, + {"label":"Alt", "x":9.75, "y":4, "w":1.25}, + {"label":"Win", "x":11, "y":4, "w":1.25}, + {"label":"Menu", "x":12.25, "y":4, "w":1.25}, + {"label":"\u2190", "x":13.5, "y":4}, + {"label":"\u2193", "x":14.5, "y":4}, + {"label":"\u2192", "x":15.5, "y":4} + ] + }, + "LAYOUT_66_iso": { + "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":"Insert", "x":15.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":"Delete", "x":15.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":"NUBS", "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.25}, + {"label":"\u2191", "x":14.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}, + {"x":3.5, "y":4, "w":6.25}, + {"label":"Alt", "x":9.75, "y":4, "w":1.25}, + {"label":"Win", "x":11, "y":4, "w":1.25}, + {"label":"Menu", "x":12.25, "y":4, "w":1.25}, + {"label":"\u2190", "x":13.5, "y":4}, + {"label":"\u2193", "x":14.5, "y":4}, + {"label":"\u2192", "x":15.5, "y":4} + ] + } + } +} diff --git a/keyboards/maartenwut/nt660/keymaps/default/keymap.c b/keyboards/maartenwut/nt660/keymaps/default/keymap.c new file mode 100644 index 000000000000..305cc8c873e0 --- /dev/null +++ b/keyboards/maartenwut/nt660/keymaps/default/keymap.c @@ -0,0 +1,26 @@ +/* Copyright 2020 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 + +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_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_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_APP, KC_RCTRL,KC_LEFT, KC_DOWN, KC_RGHT), +}; diff --git a/keyboards/maartenwut/nt660/keymaps/maartenwut/config.h b/keyboards/maartenwut/nt660/keymaps/maartenwut/config.h new file mode 100644 index 000000000000..9b18f58269ef --- /dev/null +++ b/keyboards/maartenwut/nt660/keymaps/maartenwut/config.h @@ -0,0 +1,3 @@ +#pragma once + +#define RETRO_TAPPING diff --git a/keyboards/maartenwut/nt660/keymaps/maartenwut/keymap.c b/keyboards/maartenwut/nt660/keymaps/maartenwut/keymap.c new file mode 100644 index 000000000000..3232f8e55163 --- /dev/null +++ b/keyboards/maartenwut/nt660/keymaps/maartenwut/keymap.c @@ -0,0 +1,58 @@ +/* Copyright 2020 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 +#define _GA 1 +#define _FL 2 +#define _SP 3 + +#define SPACE LT(_SP, KC_SPC) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +[_MA] = 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_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_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_RSFT, KC_UP, + KC_LCTL, KC_LGUI, KC_LALT, SPACE, KC_RALT, KC_RCTRL,MO(_FL), KC_LEFT, KC_DOWN, KC_RGHT), + +[_GA] = LAYOUT_all( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, KC_SPC, _______, _______, _______, _______, _______, _______), + +[_FL] = 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, RESET, KC_PSCR, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_INS, + _______, _______, _______, _______, _______, TG(_GA), _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_VOLD, KC_VOLU, KC_MUTE, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______), + +[_SP] = 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_UP, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______), +}; diff --git a/keyboards/maartenwut/nt660/keymaps/via/keymap.c b/keyboards/maartenwut/nt660/keymaps/via/keymap.c new file mode 100644 index 000000000000..5b8c2e342f8c --- /dev/null +++ b/keyboards/maartenwut/nt660/keymaps/via/keymap.c @@ -0,0 +1,44 @@ +/* Copyright 2020 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 + +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_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_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, MO(1), KC_RCTRL,KC_LEFT, KC_DOWN, KC_RGHT), +[1] = LAYOUT_all( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______), +[2] = LAYOUT_all( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______), +[3] = LAYOUT_all( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______), +}; diff --git a/keyboards/maartenwut/nt660/keymaps/via/rules.mk b/keyboards/maartenwut/nt660/keymaps/via/rules.mk new file mode 100644 index 000000000000..36b7ba9cbc98 --- /dev/null +++ b/keyboards/maartenwut/nt660/keymaps/via/rules.mk @@ -0,0 +1,2 @@ +VIA_ENABLE = yes +LTO_ENABLE = yes diff --git a/keyboards/maartenwut/nt660/nt660.c b/keyboards/maartenwut/nt660/nt660.c new file mode 100644 index 000000000000..8ecc58ec17ff --- /dev/null +++ b/keyboards/maartenwut/nt660/nt660.c @@ -0,0 +1,32 @@ +/* Copyright 2020 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 "nt660.h" +void matrix_init_kb(void) { + matrix_init_user(); + led_init_ports(); +} + +void led_init_ports(void) { + setPinOutput(D0); +} + +bool led_update_kb(led_t led_state) { + if(led_update_user(led_state)) { + writePin(D0, !led_state.caps_lock); + } + + return true; +} diff --git a/keyboards/maartenwut/nt660/nt660.h b/keyboards/maartenwut/nt660/nt660.h new file mode 100644 index 000000000000..ce3d4fa624eb --- /dev/null +++ b/keyboards/maartenwut/nt660/nt660.h @@ -0,0 +1,73 @@ +/* Copyright 2020 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 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, k0f, k0d, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1f, k1d, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2f, \ + k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3f, \ + k40, k41, k42, k46, k49, k4a, k4b, k4c, k4f, k4d \ +) \ +{ \ + {k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0f, k0d}, \ + {k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1f, k1d}, \ + {k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2f, XXX}, \ + {k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3f, XXX}, \ + {k40, k41, k42, XXX, XXX, XXX, k46, XXX, XXX, k49, k4a, k4b, k4c, k4f, k4d} \ +} +#define LAYOUT_66_ansi( \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0f, k0d, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1f, k1d, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2f, \ + k30, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3f, \ + k40, k41, k42, k46, k49, k4a, k4b, k4c, k4f, k4d \ +) \ +{ \ + {k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0f, k0d}, \ + {k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1f, k1d}, \ + {k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, XXX, k2f, XXX}, \ + {k30, XXX, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3f, XXX}, \ + {k40, k41, k42, XXX, XXX, XXX, k46, XXX, XXX, k49, k4a, k4b, k4c, k4f, k4d} \ +} + +#define LAYOUT_66_iso( \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0f, 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, k2f, \ + k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3f, \ + k40, k41, k42, k46, k49, k4a, k4b, k4c, k4f, k4d \ +) \ +{ \ + {k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0f, k0d}, \ + {k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, XXX, k1d}, \ + {k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2f, XXX}, \ + {k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3f, XXX}, \ + {k40, k41, k42, XXX, XXX, XXX, k46, XXX, XXX, k49, k4a, k4b, k4c, k4f, k4d} \ +} diff --git a/keyboards/maartenwut/nt660/readme.md b/keyboards/maartenwut/nt660/readme.md new file mode 100644 index 000000000000..cb7b19ca597a --- /dev/null +++ b/keyboards/maartenwut/nt660/readme.md @@ -0,0 +1,19 @@ +# nt660 + +A drop-in replacement PCB for the Leopold FC660M. + +* Keyboard Maintainer: [Maartenwut](https://github.com/Maartenwut) +* Hardware Supported: nt660 PCB +* Hardware Availability: [maartenwut.com](https://maartenwut.com/product/nt-660/) + +## Flashing + +In place of the DIP switches on the original PCB there is a small button. Press that to jump to the bootloader. + +--- + +Make example for this keyboard (after setting up your build environment): + + make maartenwut/nt660: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/nt660/rules.mk b/keyboards/maartenwut/nt660/rules.mk new file mode 100644 index 000000000000..b633c90f0ac0 --- /dev/null +++ b/keyboards/maartenwut/nt660/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 = 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 = no # Console for debug +COMMAND_ENABLE = no # Commands for debug and configuration +# 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 = 66_ansi 66_iso From 7281e86e9870c9006f26ae32247031b7a94daa3b Mon Sep 17 00:00:00 2001 From: clanghans <66272877+clanghans@users.noreply.github.com> Date: Tue, 9 Jun 2020 21:11:01 +0200 Subject: [PATCH 114/930] XD75 clanghans layout (#9313) Co-authored-by: Ryan --- keyboards/xd75/keymaps/clanghans/config.h | 21 +++++++ keyboards/xd75/keymaps/clanghans/keymap.c | 64 ++++++++++++++++++++++ keyboards/xd75/keymaps/clanghans/readme.md | 11 ++++ 3 files changed, 96 insertions(+) create mode 100755 keyboards/xd75/keymaps/clanghans/config.h create mode 100755 keyboards/xd75/keymaps/clanghans/keymap.c create mode 100755 keyboards/xd75/keymaps/clanghans/readme.md diff --git a/keyboards/xd75/keymaps/clanghans/config.h b/keyboards/xd75/keymaps/clanghans/config.h new file mode 100755 index 000000000000..c21c036fd6f3 --- /dev/null +++ b/keyboards/xd75/keymaps/clanghans/config.h @@ -0,0 +1,21 @@ +/* Copyright 2020 Chris Langhans + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License 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/xd75/keymaps/clanghans/keymap.c b/keyboards/xd75/keymaps/clanghans/keymap.c new file mode 100755 index 000000000000..09a2bec55c04 --- /dev/null +++ b/keyboards/xd75/keymaps/clanghans/keymap.c @@ -0,0 +1,64 @@ +/* Copyright 2020 Chris Langhans + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public 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 +#define _QW 0 +#define _FN 1 + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* QWERTY + * ┌──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┐ + * │ Esc │ 1 │ 2 │ 3 │ 4 │ 5 │ Bsp │ 6 │ 7 │ 8 │ 9 │ 0 │ - │ = │ ~ │ + * ├──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┤ + * │ Tab │ Q │ W │ E │ R │ T │ Del │ Y │ U │ I │ O │ P │ [ │ ] │ \ │ + * ├──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┤ + * │ Ctrl │ A │ S │ D │ F │ G │ │ H │ J │ K │ L │ ; │ ' │ Home │ PgUp │ + * ├──────┼──────┼──────┼──────┼──────┼──────┼Enter ┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┤ + * │ Shift│ Z │ X │ C │ V │ B │ │ N │ M │ , │ . │ / │ Shft │ End │ PgDn │ + * ├──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┤ + * │ Ctrl │ Gui │ Alt │ FN │ Bsp │ N/A │ Space │ Alt │ Ctrl │ Left │ Down │ Up │ Right│ + * └──────┴──────┴──────┴──────┴──────┴──────┴──────┴──────┴──────┴──────┴──────┴──────┴──────┴──────┴──────┘ + */ + [_QW] = LAYOUT( + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_BSPC, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_GRV, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_DEL, 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_ENT, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_HOME, KC_PGUP, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, XXXXXXX, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_END, KC_PGDN, + KC_LCTL, KC_LGUI, KC_LALT, MO(_FN), XXXXXXX, KC_BSPC, XXXXXXX, KC_SPC, XXXXXXX, KC_RALT, KC_RCTL, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT + ), + + /* FUNCTION + * ┌──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┐ + * │Alt F4│ F1 │ F2 │ F3 │ F4 │ F5 │ │ F6 │ F7 │ F8 │ F9 │ F10 │ F11 │ F12 │ # Lk │ + * ├──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┤ + * │ │ │ │ │RGBHUI│BL_TOG│ │ 7 │ 8 │ 9 │ / │ │ │ │ │ + * ├──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┤ + * │ │ │ │ │RGBSAI│RGBMOD│ │ 4 │ 5 │ 6 │ * │ │ │ │Reset │ + * ├──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┤ + * │ │ │ │ │RGBVAI│ │ │ 1 │ 2 │ 3 │ - │ │ │ │ │ + * ├──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┤ + * │ │ │ │ │ │ │ │ 0 │ │ , │ + │ │ │ │ │ + * └──────┴──────┴──────┴──────┴──────┴──────┴──────┴──────┴──────┴──────┴──────┴──────┴──────┴──────┴──────┘ + */ + [_FN] = 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_NLCK, + _______, _______, _______, _______, RGB_HUI, RGB_TOG, _______, KC_P7, KC_P8, KC_P9, KC_PSLS, _______, _______, _______, _______, + _______, _______, _______, _______, RGB_SAI, RGB_MOD, _______, KC_P4, KC_P5, KC_P6, KC_PAST, _______, _______, _______, RESET, + _______, _______, _______, _______, RGB_VAI, _______, _______, KC_P1, KC_P2, KC_P3, KC_PMNS, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, KC_P0, _______, KC_PDOT, KC_PPLS, _______, _______, _______, _______ + ) +}; diff --git a/keyboards/xd75/keymaps/clanghans/readme.md b/keyboards/xd75/keymaps/clanghans/readme.md new file mode 100755 index 000000000000..bce20f613368 --- /dev/null +++ b/keyboards/xd75/keymaps/clanghans/readme.md @@ -0,0 +1,11 @@ +# xd75 from Chris Langhans + +- qwerty layer +- special function layer with num pad and shortcuts + +* Build/Flash + qmk setup + qmk compile -kb xd75 -km clanghans + qmk flash -kb xd75 -km clanghans + + Hit 'Raise'+'PgUp' for entering bootloader mode From c0cb2ab1c13605a17ce1bcf3835c3aa55edb82f6 Mon Sep 17 00:00:00 2001 From: Rolf Don Date: Wed, 10 Jun 2020 02:22:28 +0200 Subject: [PATCH 115/930] Adding extra supported Boardwalk layout (#9341) * Added ortho layout with 2x2u spacebars --- keyboards/boardwalk/boardwalk.h | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/keyboards/boardwalk/boardwalk.h b/keyboards/boardwalk/boardwalk.h index 580a320c1f91..8a613ce49d66 100644 --- a/keyboards/boardwalk/boardwalk.h +++ b/keyboards/boardwalk/boardwalk.h @@ -17,6 +17,21 @@ { k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, k410, k411, k412, k413 } \ } +#define LAYOUT_ortho_2x2u( \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k010, k011, k012, k013, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k110, k111, k112, k113, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k210, k211, k212, k213, \ + k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k310, k311, k312, k313, \ + k40, k41, k42, k43, k44, k45, k47, k49, k410, k411, k412, k413 \ +) \ +{ \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k010, k011, k012, k013 }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k110, k111, k112, k113 }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k210, k211, k212, k213 }, \ + { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k310, k311, k312, k313 }, \ + { k40, k41, k42, k43, k44, k45, KC_NO, k47, KC_NO, k49, k410, k411, k412, k413 } \ +} + #define LAYOUT_ortho_hhkb( \ k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k010, k011, k012, k013, \ k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k110, k111, k112, k113, \ From 01e74b0ac65880cc12c816b67ab41e4439b4b7db Mon Sep 17 00:00:00 2001 From: AlisGraveNil <63020540+AlisGraveNil@users.noreply.github.com> Date: Tue, 9 Jun 2020 21:04:02 -0400 Subject: [PATCH 116/930] Sidekick/qmk firmware (#9229) * 5/28/20 * Create readme 2.md * Revert inadvertently changed files * Update keyboards/clawsome/sidekick/config.h Co-authored-by: Nick Brassel * Update keyboards/clawsome/sidekick/rules.mk Co-authored-by: Nick Brassel * Update keyboards/clawsome/sidekick/config.h Co-authored-by: Ryan * Update keyboards/clawsome/sidekick/info.json Co-authored-by: Ryan * Update keyboards/clawsome/sidekick/info.json Co-authored-by: Ryan * Update keyboards/clawsome/sidekick/rules.mk Co-authored-by: Ryan * Update keyboards/clawsome/sidekick/rules.mk Co-authored-by: Ryan * Update keyboards/clawsome/sidekick/rules.mk Co-authored-by: Nick Brassel Co-authored-by: Nick Brassel Co-authored-by: Ryan --- keyboards/clawsome/sidekick/config.h | 37 +++++++++++++++++ keyboards/clawsome/sidekick/info.json | 40 ++++++++++++++++++ .../sidekick/keymaps/default/keymap.c | 41 +++++++++++++++++++ keyboards/clawsome/sidekick/readme.md | 14 +++++++ keyboards/clawsome/sidekick/rules.mk | 25 +++++++++++ keyboards/clawsome/sidekick/sidekick.c | 16 ++++++++ keyboards/clawsome/sidekick/sidekick.h | 33 +++++++++++++++ 7 files changed, 206 insertions(+) create mode 100644 keyboards/clawsome/sidekick/config.h create mode 100644 keyboards/clawsome/sidekick/info.json create mode 100644 keyboards/clawsome/sidekick/keymaps/default/keymap.c create mode 100644 keyboards/clawsome/sidekick/readme.md create mode 100644 keyboards/clawsome/sidekick/rules.mk create mode 100644 keyboards/clawsome/sidekick/sidekick.c create mode 100644 keyboards/clawsome/sidekick/sidekick.h diff --git a/keyboards/clawsome/sidekick/config.h b/keyboards/clawsome/sidekick/config.h new file mode 100644 index 000000000000..933dde81ed93 --- /dev/null +++ b/keyboards/clawsome/sidekick/config.h @@ -0,0 +1,37 @@ +/* +Copyright 2020 AAClawson (AlisGraveNil) + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License 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 0xDB9F +#define DEVICE_VER 0x0001 +#define MANUFACTURER AlisGraveNil +#define PRODUCT Sidekick +#define DESCRIPTION A 27-key QMK-powered macropad + +/* key matrix size */ +#define MATRIX_ROWS 5 +#define MATRIX_COLS 7 + +#define MATRIX_ROW_PINS { D0, C6, B2, B6, B5 } +#define MATRIX_COL_PINS { F6, F5, B1, B3, E6, D7, D4 } + +#define DIODE_DIRECTION COL2ROW diff --git a/keyboards/clawsome/sidekick/info.json b/keyboards/clawsome/sidekick/info.json new file mode 100644 index 000000000000..cd6d4f00041d --- /dev/null +++ b/keyboards/clawsome/sidekick/info.json @@ -0,0 +1,40 @@ +{ + "keyboard_name": "Sidekick", + "url": "", + "maintainer": "qmk", + "width": 7, + "height": 5, + "layouts": { + "LAYOUT": { + "layout": [ + {"label":"K00 (D0,F6)", "x":0, "y":0}, + {"label":"K01 (D0,F5)", "x":1, "y":0}, + {"label":"K02 (D0,B1)", "x":2, "y":0}, + {"label":"K03 (D0,B3)", "x":3, "y":0}, + {"label":"K04 (D0,E6)", "x":4, "y":0}, + {"label":"K05 (D0,D7)", "x":5, "y":0}, + {"label":"K06 (D0,D4)", "x":6, "y":0}, + {"label":"K10 (C6,F6)", "x":0, "y":1}, + {"label":"K11 (C6,F5)", "x":1, "y":1}, + {"label":"K12 (C6,B1)", "x":2, "y":1}, + {"label":"K13 (C6,B3)", "x":3, "y":1}, + {"label":"K14 (C6,E6)", "x":4, "y":1}, + {"label":"K15 (C6,D7)", "x":5, "y":1}, + {"label":"K16 (C6,D4)", "x":6, "y":1, "h":2}, + {"label":"K23 (B2,B3)", "x":3, "y":2}, + {"label":"K24 (B2,E6)", "x":4, "y":2}, + {"label":"K25 (B2,D7)", "x":5, "y":2}, + {"label":"K31 (B6,F5)", "x":1, "y":3}, + {"label":"K33 (B6,B3)", "x":3, "y":3}, + {"label":"K34 (B6,E6)", "x":4, "y":3}, + {"label":"K35 (B6,D7)", "x":5, "y":3}, + {"label":"K36 (B6,D4)", "x":6, "y":3, "h":2}, + {"label":"K40 (B5,F6)", "x":0, "y":4}, + {"label":"K41 (B5,F5)", "x":1, "y":4}, + {"label":"K42 (B5,B1)", "x":2, "y":4}, + {"label":"K43 (B5,B3)", "x":3, "y":4, "w":2}, + {"label":"K45 (B5,D7)", "x":5, "y":4} + ] + } + } +} diff --git a/keyboards/clawsome/sidekick/keymaps/default/keymap.c b/keyboards/clawsome/sidekick/keymaps/default/keymap.c new file mode 100644 index 000000000000..e445a02f8717 --- /dev/null +++ b/keyboards/clawsome/sidekick/keymaps/default/keymap.c @@ -0,0 +1,41 @@ +/* Copyright 2020 AAClawson (AlisGraveNil) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public 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] = { + /* + * ------------------------------------ + * |INS |HOME|PGUP|NUM | / | * | - | + * ------------------------------------ + * |DEL |END |PGDN| 7 | 8 | 9 | + | + * ------------------------------| | + * | | | | 4 | 5 | 6 | | + * ------------------------------------ + * | | UP | | 1 | 2 | 3 |ENT | + * ------------------------------| | + * |LEFT|DOWN|RGHT| 0 | . | | + * ------------------------------------ + */ + [0] = LAYOUT( + KC_INS, KC_HOME, KC_PGUP, KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS, + KC_DEL, KC_END, KC_PGDN, KC_P7, KC_P8, KC_P9, KC_PPLS, + KC_P4, KC_P5, KC_P6, + KC_UP, KC_P1, KC_P2, KC_P3, KC_PENT, + KC_LEFT, KC_DOWN, KC_RGHT, KC_P0, KC_PDOT + ), + +}; + diff --git a/keyboards/clawsome/sidekick/readme.md b/keyboards/clawsome/sidekick/readme.md new file mode 100644 index 000000000000..ed9ecd3f9dfa --- /dev/null +++ b/keyboards/clawsome/sidekick/readme.md @@ -0,0 +1,14 @@ +# Sidekick + +This is a 5x7 macropad designed to be used with any 60% or less board. +You still need those arrow keys and that num-pad, so here it is, in a conveniently move-able package! + +- Keyboard Maintainer: [AAClawson](https://github.com/AlisGraveNil) +- Hardware Supported: Sidekick 2.0a & 2.0b, Pro Micro, Elite-C +- Hardware Availability: Not available yet; will be sold at a later date + +Make example for this keyboard (after setting up your build environment): + + make clawsome/sidekick: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/clawsome/sidekick/rules.mk b/keyboards/clawsome/sidekick/rules.mk new file mode 100644 index 000000000000..22a9b129fe32 --- /dev/null +++ b/keyboards/clawsome/sidekick/rules.mk @@ -0,0 +1,25 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +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 = 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 diff --git a/keyboards/clawsome/sidekick/sidekick.c b/keyboards/clawsome/sidekick/sidekick.c new file mode 100644 index 000000000000..4f52b1ba1241 --- /dev/null +++ b/keyboards/clawsome/sidekick/sidekick.c @@ -0,0 +1,16 @@ +/* Copyright 2020 AAClawson (AlisGraveNil) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#include "sidekick.h" diff --git a/keyboards/clawsome/sidekick/sidekick.h b/keyboards/clawsome/sidekick/sidekick.h new file mode 100644 index 000000000000..fcb93a9bb1b7 --- /dev/null +++ b/keyboards/clawsome/sidekick/sidekick.h @@ -0,0 +1,33 @@ +/* Copyright 2020 AAClawson (AlisGraveNil) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License 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, \ + K10, K11, K12, K13, K14, K15, K16, \ + K23, K24, K25, \ + K31, K33, K34, K35, K36, \ + K40, K41, K42, K43, K45 \ +) { \ + { K00, K01, K02, K03, K04, K05, K06 }, \ + { K10, K11, K12, K13, K14, K15, K16 }, \ + { KC_NO, KC_NO, KC_NO, K23, K24, K25, KC_NO }, \ + { KC_NO, K31, KC_NO, K33, K34, K35, K36 }, \ + { K40, K41, K42, K43, KC_NO, K45, KC_NO }, \ +} + From 1d1c0503b669abcf8c059a5962e6819b1376a885 Mon Sep 17 00:00:00 2001 From: James Young <18669334+noroadsleft@users.noreply.github.com> Date: Tue, 9 Jun 2020 19:22:33 -0700 Subject: [PATCH 117/930] Gami Studio Lex60: Configurator Layout support (#7726) * Gami Studio Lex60: Configurator Layout support * correct key sizes on bottom row per lukelex * add LAYOUT_60_ansi To test, run `make gami_studio/lex60:default_60_ansi` and flash. * add 60_ansi keymap To test, run `make gami_studio/lex60:60_ansi` and flash. * remove data for 60_ansi layout --- keyboards/gami_studio/lex60/info.json | 79 +++++++++++++++++++++++++++ 1 file changed, 79 insertions(+) create mode 100644 keyboards/gami_studio/lex60/info.json diff --git a/keyboards/gami_studio/lex60/info.json b/keyboards/gami_studio/lex60/info.json new file mode 100644 index 000000000000..2a2afd40c74b --- /dev/null +++ b/keyboards/gami_studio/lex60/info.json @@ -0,0 +1,79 @@ +{ + "keyboard_name": "Gami Studio Lex60", + "url": "", + "maintainer": "GamiStudio", + "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":"\\", "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":"\\", "x":13.5, "y":1, "w":1.5}, + {"label":"LCtl / Esc", "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":"ISO #", "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":"ISO \\", "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":"Ctrl", "x":0, "y":4, "w":1.5}, + {"label":"GUI", "x":1.5, "y":4, "w":1.5}, + {"label":"LAlt", "x":3, "y":4, "w":1.5}, + {"label":"Space", "x":4.5, "y":4, "w":2.25}, + {"label":"Fn / Enter", "x":6.75, "y":4, "w":2.75}, + {"label":"GUI", "x":9.5, "y":4, "w":1.5}, + {"label":"RAlt", "x":11, "y":4, "w":1.25}, + {"label":"Menu", "x":12.25, "y":4, "w":1.25}, + {"label":"Ctrl", "x":13.5, "y":4, "w":1.5} + ] + } + } +} From 184c362324171a77e108fe29058fa51c438d04b4 Mon Sep 17 00:00:00 2001 From: Danny Date: Tue, 9 Jun 2020 22:32:46 -0400 Subject: [PATCH 118/930] Add BDN9 rev2 (#9017) --- keyboards/keebio/bdn9/bdn9.c | 17 - keyboards/keebio/bdn9/bdn9.h | 40 +- keyboards/keebio/bdn9/config.h | 64 -- keyboards/keebio/bdn9/info.json | 6 +- keyboards/keebio/bdn9/keymaps/bcat/keymap.c | 4 + .../bdn9/keymaps/codecoffeecode/rules.mk | 6 +- .../keebio/bdn9/keymaps/default/config.h | 5 + .../keebio/bdn9/keymaps/default/keymap.c | 17 +- .../keymaps/mousepad/{rule.mk => rules.mk} | 0 keyboards/keebio/bdn9/keymaps/test/config.h | 5 + keyboards/keebio/bdn9/keymaps/test/keymap.c | 49 ++ keyboards/keebio/bdn9/keymaps/via/rules.mk | 2 +- keyboards/keebio/bdn9/readme.md | 2 +- keyboards/keebio/bdn9/rev1/config.h | 66 ++ keyboards/keebio/bdn9/rev1/rev1.c | 18 + keyboards/keebio/bdn9/rev1/rev1.h | 38 + keyboards/keebio/bdn9/rev1/rules.mk | 34 + keyboards/keebio/bdn9/rev2/chconf.h | 714 ++++++++++++++++++ keyboards/keebio/bdn9/rev2/config.h | 67 ++ keyboards/keebio/bdn9/rev2/halconf.h | 525 +++++++++++++ keyboards/keebio/bdn9/rev2/mcuconf.h | 176 +++++ keyboards/keebio/bdn9/rev2/rev2.c | 39 + keyboards/keebio/bdn9/rev2/rev2.h | 38 + keyboards/keebio/bdn9/rev2/rules.mk | 27 + keyboards/keebio/bdn9/rules.mk | 35 +- 25 files changed, 1835 insertions(+), 159 deletions(-) create mode 100644 keyboards/keebio/bdn9/keymaps/default/config.h rename keyboards/keebio/bdn9/keymaps/mousepad/{rule.mk => rules.mk} (100%) create mode 100644 keyboards/keebio/bdn9/keymaps/test/config.h create mode 100644 keyboards/keebio/bdn9/keymaps/test/keymap.c create mode 100644 keyboards/keebio/bdn9/rev1/config.h create mode 100644 keyboards/keebio/bdn9/rev1/rev1.c create mode 100644 keyboards/keebio/bdn9/rev1/rev1.h create mode 100644 keyboards/keebio/bdn9/rev1/rules.mk create mode 100644 keyboards/keebio/bdn9/rev2/chconf.h create mode 100644 keyboards/keebio/bdn9/rev2/config.h create mode 100644 keyboards/keebio/bdn9/rev2/halconf.h create mode 100644 keyboards/keebio/bdn9/rev2/mcuconf.h create mode 100644 keyboards/keebio/bdn9/rev2/rev2.c create mode 100644 keyboards/keebio/bdn9/rev2/rev2.h create mode 100644 keyboards/keebio/bdn9/rev2/rules.mk diff --git a/keyboards/keebio/bdn9/bdn9.c b/keyboards/keebio/bdn9/bdn9.c index f3842d098976..0ff55fd6d45c 100644 --- a/keyboards/keebio/bdn9/bdn9.c +++ b/keyboards/keebio/bdn9/bdn9.c @@ -1,18 +1 @@ #include "bdn9.h" - -void eeconfig_init_kb(void) { -#ifdef BACKLIGHT_ENABLE - backlight_enable(); - backlight_level(5); -#endif -#ifdef RGBLIGHT_ENABLE - rgblight_enable(); // Enable RGB by default - rgblight_sethsv(0, 255, 255); // Set default HSV - red hue, full saturation, full brightness -#ifdef RGBLIGHT_ANIMATIONS - rgblight_mode(RGBLIGHT_MODE_RAINBOW_SWIRL + 2); // set to RGB_RAINBOW_SWIRL by default -#endif -#endif - - eeconfig_update_kb(0); - eeconfig_init_user(); -} diff --git a/keyboards/keebio/bdn9/bdn9.h b/keyboards/keebio/bdn9/bdn9.h index 8a4511326476..94ba78a6ade9 100644 --- a/keyboards/keebio/bdn9/bdn9.h +++ b/keyboards/keebio/bdn9/bdn9.h @@ -1,37 +1,7 @@ -/* Copyright 2019 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 -#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( \ - KA1, KA2, KA3, \ - KB1, KB2, KB3, \ - KC1, KC2, KC3 \ -) \ -{ \ - { KA1, KA2, KA3 }, \ - { KB1, KB2, KB3 }, \ - { KC1, KC2, KC3 } \ -} +#ifdef KEYBOARD_keebio_bdn9_rev1 + #include "rev1.h" +#elif KEYBOARD_keebio_bdn9_rev2 + #include "rev2.h" +#endif diff --git a/keyboards/keebio/bdn9/config.h b/keyboards/keebio/bdn9/config.h index 40c8a1d77a88..b8c5759db6b6 100644 --- a/keyboards/keebio/bdn9/config.h +++ b/keyboards/keebio/bdn9/config.h @@ -1,67 +1,3 @@ -/* -Copyright 2019 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 #include "config_common.h" - -/* USB Device descriptor parameter */ -#define VENDOR_ID 0xCB10 -#define PRODUCT_ID 0x1133 -#define DEVICE_VER 0x0100 -#define MANUFACTURER Keebio -#define PRODUCT BDN9 -#define DESCRIPTION 3x3 Macropad with Rotary Encoders - -/* key matrix size */ -#define MATRIX_ROWS 3 -#define MATRIX_COLS 3 - -/* Keyboard Matrix Assignments */ -#define DIRECT_PINS { \ - { D2, D4, F4 }, \ - { D7, B1, B3 }, \ - { E6, B4, B2 } \ -} - -#define ENCODERS_PAD_A { D1, F5 } -#define ENCODERS_PAD_B { D0, F6 } - - -#define BACKLIGHT_PIN B5 -// #define BACKLIGHT_BREATHING -#define BACKLIGHT_LEVELS 7 - -#define RGB_DI_PIN D3 -#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 -#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 \ No newline at end of file diff --git a/keyboards/keebio/bdn9/info.json b/keyboards/keebio/bdn9/info.json index a985a05e04d1..1c8f5dec8383 100644 --- a/keyboards/keebio/bdn9/info.json +++ b/keyboards/keebio/bdn9/info.json @@ -1,7 +1,7 @@ { - "keyboard_name": "Keeb.io BDN9", - "url": "", - "maintainer": "nooges", + "keyboard_name": "Keebio BDN9", + "url": "https://keeb.io", + "maintainer": "Keebio", "width": 3, "height": 3, "layouts": { diff --git a/keyboards/keebio/bdn9/keymaps/bcat/keymap.c b/keyboards/keebio/bdn9/keymaps/bcat/keymap.c index 05d324034c3c..41246ba7d9ee 100644 --- a/keyboards/keebio/bdn9/keymaps/bcat/keymap.c +++ b/keyboards/keebio/bdn9/keymaps/bcat/keymap.c @@ -31,9 +31,13 @@ void encoder_update_user(uint8_t index, bool clockwise) { /* Top-right encoder (backlight brightness) */ case 1: if (clockwise) { +#ifdef BACKLIGHT_ENABLE backlight_increase(); +#endif } else { +#ifdef BACKLIGHT_ENABLE backlight_decrease(); +#endif } break; } diff --git a/keyboards/keebio/bdn9/keymaps/codecoffeecode/rules.mk b/keyboards/keebio/bdn9/keymaps/codecoffeecode/rules.mk index e910b7bea5d2..1724fe7eead6 100644 --- a/keyboards/keebio/bdn9/keymaps/codecoffeecode/rules.mk +++ b/keyboards/keebio/bdn9/keymaps/codecoffeecode/rules.mk @@ -1,2 +1,4 @@ -MOUSEKEY_ENABLE = yes -CTPC = yes \ No newline at end of file +MOUSEKEY_ENABLE = yes +ifneq (, $(findstring rev1, $(KEYBOARD))) + CTPC = yes +endif diff --git a/keyboards/keebio/bdn9/keymaps/default/config.h b/keyboards/keebio/bdn9/keymaps/default/config.h new file mode 100644 index 000000000000..e09fba9232bd --- /dev/null +++ b/keyboards/keebio/bdn9/keymaps/default/config.h @@ -0,0 +1,5 @@ +#pragma once + +#ifdef RGB_MATRIX_ENABLE +# define RGB_MATRIX_KEYPRESSES +#endif diff --git a/keyboards/keebio/bdn9/keymaps/default/keymap.c b/keyboards/keebio/bdn9/keymaps/default/keymap.c index c700019dc069..a88617caaa2c 100644 --- a/keyboards/keebio/bdn9/keymaps/default/keymap.c +++ b/keyboards/keebio/bdn9/keymaps/default/keymap.c @@ -15,6 +15,12 @@ */ #include QMK_KEYBOARD_H +enum encoder_names { + _LEFT, + _RIGHT, + _MIDDLE, +}; + const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* | Knob 1: Vol Dn/Up | | Knob 2: Page Dn/Up | @@ -40,14 +46,21 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { }; void encoder_update_user(uint8_t index, bool clockwise) { - if (index == 0) { + if (index == _LEFT) { if (clockwise) { tap_code(KC_VOLU); } else { tap_code(KC_VOLD); } } - else if (index == 1) { + else if (index == _MIDDLE) { + if (clockwise) { + tap_code(KC_DOWN); + } else { + tap_code(KC_UP); + } + } + else if (index == _RIGHT) { if (clockwise) { tap_code(KC_PGDN); } else { diff --git a/keyboards/keebio/bdn9/keymaps/mousepad/rule.mk b/keyboards/keebio/bdn9/keymaps/mousepad/rules.mk similarity index 100% rename from keyboards/keebio/bdn9/keymaps/mousepad/rule.mk rename to keyboards/keebio/bdn9/keymaps/mousepad/rules.mk diff --git a/keyboards/keebio/bdn9/keymaps/test/config.h b/keyboards/keebio/bdn9/keymaps/test/config.h new file mode 100644 index 000000000000..e09fba9232bd --- /dev/null +++ b/keyboards/keebio/bdn9/keymaps/test/config.h @@ -0,0 +1,5 @@ +#pragma once + +#ifdef RGB_MATRIX_ENABLE +# define RGB_MATRIX_KEYPRESSES +#endif diff --git a/keyboards/keebio/bdn9/keymaps/test/keymap.c b/keyboards/keebio/bdn9/keymaps/test/keymap.c new file mode 100644 index 000000000000..244b5f7cb30c --- /dev/null +++ b/keyboards/keebio/bdn9/keymaps/test/keymap.c @@ -0,0 +1,49 @@ +#include QMK_KEYBOARD_H + +enum encoder_names { + _LEFT, + _RIGHT, + _MIDDLE, +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT( + KC_A, KC_B, KC_C, + KC_D, KC_E, KC_F, + KC_G, KC_H, RGB_MOD + ), + /* + | RESET | N/A | Media Stop | + | Held: Layer 2 | Home | RGB Mode | + | Media Previous | End | Media Next | + */ + [1] = LAYOUT( + RESET , BL_STEP, KC_STOP, + _______, KC_HOME, RGB_MOD, + KC_MPRV, KC_END , KC_MNXT + ), +}; + +void encoder_update_user(uint8_t index, bool clockwise) { + if (index == _LEFT) { + if (clockwise) { + rgblight_increase_hue(); + } else { + rgblight_decrease_hue(); + } + } + else if (index == _MIDDLE) { + if (clockwise) { + rgblight_increase_sat(); + } else { + rgblight_decrease_sat(); + } + } + else if (index == _RIGHT) { + if (clockwise) { + rgblight_increase_val(); + } else { + rgblight_decrease_val(); + } + } +} diff --git a/keyboards/keebio/bdn9/keymaps/via/rules.mk b/keyboards/keebio/bdn9/keymaps/via/rules.mk index 5b604f2b06d3..aa554ae29467 100644 --- a/keyboards/keebio/bdn9/keymaps/via/rules.mk +++ b/keyboards/keebio/bdn9/keymaps/via/rules.mk @@ -1,5 +1,5 @@ VIA_ENABLE = yes LINK_TIME_OPTIMIZATION_ENABLE = yes MOUSEKEY_ENABLE = yes -CONSOLE_ENABLE = no +CONSOLE_ENABLE = yes COMMAND_ENABLE = no diff --git a/keyboards/keebio/bdn9/readme.md b/keyboards/keebio/bdn9/readme.md index ddbe7f144b65..d77dcc61701a 100644 --- a/keyboards/keebio/bdn9/readme.md +++ b/keyboards/keebio/bdn9/readme.md @@ -10,6 +10,6 @@ Hardware Availability: [Keebio - BDN9](https://keeb.io/products/bdn9-3x3-9-key-m Make example for this keyboard (after setting up your build environment): - make keebio/bdn9:default + make keebio/bdn9/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/keebio/bdn9/rev1/config.h b/keyboards/keebio/bdn9/rev1/config.h new file mode 100644 index 000000000000..678be9fe81cb --- /dev/null +++ b/keyboards/keebio/bdn9/rev1/config.h @@ -0,0 +1,66 @@ +/* +Copyright 2019 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 + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xCB10 +#define PRODUCT_ID 0x1133 +#define DEVICE_VER 0x0100 +#define MANUFACTURER Keebio +#define PRODUCT BDN9 Rev. 1 +#define DESCRIPTION 3x3 Macropad with Rotary Encoders + +/* key matrix size */ +#define MATRIX_ROWS 3 +#define MATRIX_COLS 3 + +/* Keyboard Matrix Assignments */ +#define DIRECT_PINS { \ + { D2, D4, F4 }, \ + { D7, B1, B3 }, \ + { E6, B4, B2 } \ +} + +#define ENCODERS_PAD_A { D1, F5 } +#define ENCODERS_PAD_B { D0, F6 } + +#define BACKLIGHT_PIN B5 +// #define BACKLIGHT_BREATHING +#define BACKLIGHT_LEVELS 7 + +#define RGB_DI_PIN D3 +#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 +#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 diff --git a/keyboards/keebio/bdn9/rev1/rev1.c b/keyboards/keebio/bdn9/rev1/rev1.c new file mode 100644 index 000000000000..4b32b73a0bb9 --- /dev/null +++ b/keyboards/keebio/bdn9/rev1/rev1.c @@ -0,0 +1,18 @@ +#include "rev1.h" + +void eeconfig_init_kb(void) { +#ifdef BACKLIGHT_ENABLE + backlight_enable(); + backlight_level(5); +#endif +#ifdef RGBLIGHT_ENABLE + rgblight_enable(); // Enable RGB by default + rgblight_sethsv(0, 255, 255); // Set default HSV - red hue, full saturation, full brightness +#ifdef RGBLIGHT_ANIMATIONS + rgblight_mode(RGBLIGHT_MODE_RAINBOW_SWIRL + 2); // set to RGB_RAINBOW_SWIRL by default +#endif +#endif + + eeconfig_update_kb(0); + eeconfig_init_user(); +} diff --git a/keyboards/keebio/bdn9/rev1/rev1.h b/keyboards/keebio/bdn9/rev1/rev1.h new file mode 100644 index 000000000000..9e04032d812c --- /dev/null +++ b/keyboards/keebio/bdn9/rev1/rev1.h @@ -0,0 +1,38 @@ +/* Copyright 2019 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 + +#include "bdn9.h" +#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( \ + KA1, KA2, KA3, \ + KB1, KB2, KB3, \ + KC1, KC2, KC3 \ +) \ +{ \ + { KA1, KA2, KA3 }, \ + { KB1, KB2, KB3 }, \ + { KC1, KC2, KC3 } \ +} diff --git a/keyboards/keebio/bdn9/rev1/rules.mk b/keyboards/keebio/bdn9/rev1/rules.mk new file mode 100644 index 000000000000..176175ca2bd4 --- /dev/null +++ b/keyboards/keebio/bdn9/rev1/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 = 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 = 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 +ENCODER_ENABLE = yes \ No newline at end of file diff --git a/keyboards/keebio/bdn9/rev2/chconf.h b/keyboards/keebio/bdn9/rev2/chconf.h new file mode 100644 index 000000000000..03f63da36a88 --- /dev/null +++ b/keyboards/keebio/bdn9/rev2/chconf.h @@ -0,0 +1,714 @@ +/* + 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. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +/** + * @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. + * + * @addtogroup config + * @details Kernel related settings and hooks. + * @{ + */ + +#ifndef CHCONF_H +#define CHCONF_H + +#define _CHIBIOS_RT_CONF_ +#define _CHIBIOS_RT_CONF_VER_6_0_ + +/*===========================================================================*/ +/** + * @name System timers settings + * @{ + */ +/*===========================================================================*/ + +/** + * @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. + * @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. + */ +#if !defined(CH_CFG_ST_TIMEDELTA) +#define CH_CFG_ST_TIMEDELTA 2 +#endif + +/** @} */ + +/*===========================================================================*/ +/** + * @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. + */ +#if !defined(CH_CFG_TIME_QUANTUM) +#define CH_CFG_TIME_QUANTUM 0 +#endif + +/** + * @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. + */ +#if !defined(CH_CFG_MEMCORE_SIZE) +#define CH_CFG_MEMCORE_SIZE 0 +#endif + +/** + * @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. + */ +#if !defined(CH_CFG_NO_IDLE_THREAD) +#define CH_CFG_NO_IDLE_THREAD FALSE +#endif + +/** @} */ + +/*===========================================================================*/ +/** + * @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. + */ +#if !defined(CH_CFG_OPTIMIZE_SPEED) +#define CH_CFG_OPTIMIZE_SPEED FALSE +#endif + +/** @} */ + +/*===========================================================================*/ +/** + * @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. + */ +#if !defined(CH_CFG_USE_TM) +#define CH_CFG_USE_TM FALSE +#endif + +/** + * @brief Threads registry APIs. + * @details If enabled then the registry APIs are included in the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_REGISTRY) +#define CH_CFG_USE_REGISTRY TRUE +#endif + +/** + * @brief Threads synchronization APIs. + * @details If enabled then the @p chThdWait() function is included in + * the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_WAITEXIT) +#define CH_CFG_USE_WAITEXIT TRUE +#endif + +/** + * @brief Semaphores APIs. + * @details If enabled then the Semaphores APIs are included in the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_SEMAPHORES) +#define CH_CFG_USE_SEMAPHORES TRUE +#endif + +/** + * @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. + */ +#if !defined(CH_CFG_USE_SEMAPHORES_PRIORITY) +#define CH_CFG_USE_SEMAPHORES_PRIORITY FALSE +#endif + +/** + * @brief Mutexes APIs. + * @details If enabled then the mutexes APIs are included in the kernel. + * + * @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. + * @note Recursive mutexes are heavier and have an increased + * memory footprint. + * + * @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. + * @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. + */ +#if !defined(CH_CFG_USE_CONDVARS) +#define CH_CFG_USE_CONDVARS TRUE +#endif + +/** + * @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. + */ +#if !defined(CH_CFG_USE_CONDVARS_TIMEOUT) +#define CH_CFG_USE_CONDVARS_TIMEOUT FALSE +#endif + +/** + * @brief Events Flags APIs. + * @details If enabled then the event flags APIs are included in the kernel. + * + * @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. + * @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. + */ +#if !defined(CH_CFG_USE_EVENTS_TIMEOUT) +#define CH_CFG_USE_EVENTS_TIMEOUT TRUE +#endif + +/** + * @brief Synchronous Messages APIs. + * @details If enabled then the synchronous messages APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_MESSAGES) +#define CH_CFG_USE_MESSAGES TRUE +#endif + +/** + * @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. + */ +#if !defined(CH_CFG_USE_MESSAGES_PRIORITY) +#define CH_CFG_USE_MESSAGES_PRIORITY FALSE +#endif + +/** + * @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. + */ +#if !defined(CH_CFG_USE_MAILBOXES) +#define CH_CFG_USE_MAILBOXES TRUE +#endif + +/** + * @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. + */ +#if !defined(CH_CFG_USE_MEMCORE) +#define CH_CFG_USE_MEMCORE TRUE +#endif + +/** + * @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. + */ +#if !defined(CH_CFG_USE_HEAP) +#define CH_CFG_USE_HEAP FALSE +#endif + +/** + * @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. + */ +#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. + * @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. + */ +#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 + +/** @} */ + +/*===========================================================================*/ +/** + * @name Debug options + * @{ + */ +/*===========================================================================*/ + +/** + * @brief Debug option, kernel statistics. + * + * @note The default is @p FALSE. + */ +#if !defined(CH_DBG_STATISTICS) +#define CH_DBG_STATISTICS FALSE +#endif + +/** + * @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. + */ +#if !defined(CH_DBG_SYSTEM_STATE_CHECK) +#define CH_DBG_SYSTEM_STATE_CHECK FALSE +#endif + +/** + * @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. + */ +#if !defined(CH_DBG_ENABLE_CHECKS) +#define CH_DBG_ENABLE_CHECKS FALSE +#endif + +/** + * @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. + */ +#if !defined(CH_DBG_ENABLE_ASSERTS) +#define CH_DBG_ENABLE_ASSERTS FALSE +#endif + +/** + * @brief Debug option, trace buffer. + * @details If enabled then the trace buffer is activated. + * + * @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. + * @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. + */ +#if !defined(CH_DBG_ENABLE_STACK_CHECK) +#define CH_DBG_ENABLE_STACK_CHECK FALSE +#endif + +/** + * @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. + */ +#if !defined(CH_DBG_FILL_THREADS) +#define CH_DBG_FILL_THREADS FALSE +#endif + +/** + * @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. + */ +#if !defined(CH_DBG_THREADS_PROFILING) +#define CH_DBG_THREADS_PROFILING FALSE +#endif + +/** @} */ + +/*===========================================================================*/ +/** + * @name Kernel hooks + * @{ + */ +/*===========================================================================*/ + +/** + * @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. + */ +#define CH_CFG_THREAD_EXTRA_FIELDS \ + /* Add threads custom fields here.*/ + +/** + * @brief Threads initialization hook. + * @details User initialization code added to the @p _thread_init() function. + * + * @note It is invoked from within @p _thread_init() 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/keebio/bdn9/rev2/config.h b/keyboards/keebio/bdn9/rev2/config.h new file mode 100644 index 000000000000..a3716fddcdd8 --- /dev/null +++ b/keyboards/keebio/bdn9/rev2/config.h @@ -0,0 +1,67 @@ +/* +Copyright 2020 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 + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xCB10 +#define PRODUCT_ID 0x2133 +#define DEVICE_VER 0x0200 +#define MANUFACTURER Keebio +#define PRODUCT BDN9 Rev. 2 +#define DESCRIPTION 3x3 Macropad with Rotary Encoders + +/* key matrix size */ +#define MATRIX_ROWS 3 +#define MATRIX_COLS 3 + +/* Keyboard Matrix Assignments */ +#define DIRECT_PINS { \ + { B12, B5, B6 }, \ + { B14, B4, B7 }, \ + { A3, F1, F0 } \ +} + +// Left, Right, Middle +#define ENCODERS_PAD_A { A8, B3, A10 } +#define ENCODERS_PAD_B { B11, A15, A9 } + +#define RGB_DI_PIN B15 +#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 +// RGB Matrix +# ifdef RGB_MATRIX_ENABLE +# define DRIVER_LED_TOTAL RGBLED_NUM +# endif +#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 diff --git a/keyboards/keebio/bdn9/rev2/halconf.h b/keyboards/keebio/bdn9/rev2/halconf.h new file mode 100644 index 000000000000..ff5ae7e8a5f6 --- /dev/null +++ b/keyboards/keebio/bdn9/rev2/halconf.h @@ -0,0 +1,525 @@ +/* + 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. + 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 + +#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 +#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 cryptographic subsystem. + */ +#if !defined(HAL_USE_CRY) || defined(__DOXYGEN__) +#define HAL_USE_CRY FALSE +#endif + +/** + * @brief Enables the DAC subsystem. + */ +#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 +#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 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 +#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 +#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 + +/** + * @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. */ +/*===========================================================================*/ + +/** + * @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 + +/** + * @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. */ +/*===========================================================================*/ + +/** + * @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 the zero-copy API. + */ +#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 + +/** + * @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. */ +/*===========================================================================*/ + +/** + * @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 16 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 256 bytes for both the transmission and receive + * buffers. + */ +#if !defined(SERIAL_USB_BUFFERS_SIZE) || defined(__DOXYGEN__) +#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 + +/*===========================================================================*/ +/* 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 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 +#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. */ +/*===========================================================================*/ + +/** + * @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 + +/*===========================================================================*/ +/* 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/keebio/bdn9/rev2/mcuconf.h b/keyboards/keebio/bdn9/rev2/mcuconf.h new file mode 100644 index 000000000000..0e49478c8b05 --- /dev/null +++ b/keyboards/keebio/bdn9/rev2/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 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_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/keebio/bdn9/rev2/rev2.c b/keyboards/keebio/bdn9/rev2/rev2.c new file mode 100644 index 000000000000..689abd0b1d4e --- /dev/null +++ b/keyboards/keebio/bdn9/rev2/rev2.c @@ -0,0 +1,39 @@ +#include "rev2.h" + +#ifdef RGB_MATRIX_ENABLE +led_config_t g_led_config = { { + // Key Matrix to LED Index + { 0, 1, 2 }, + { 3, 4, 5 }, + { 6, 7, 8 } +}, { + // LED Index to Physical Position + { 0, 0 }, { 112, 0 }, { 224, 0 }, + { 0, 32 }, { 112, 32 }, { 224, 32 }, + { 0, 64 }, { 112, 64 }, { 224, 64 }, + { 56, 64 }, { 168, 64 }, +}, { + // LED Index to Flag + 4, 4, 4, + 4, 4, 4, + 4, 4, 4, + 2, 2 +} }; +#endif + +void eeconfig_init_kb(void) { +#ifdef RGBLIGHT_ENABLE + rgblight_enable(); // Enable RGB by default + rgblight_sethsv(0, 255, 255); // Set default HSV - red hue, full saturation, full brightness +# ifdef RGBLIGHT_ANIMATIONS + rgblight_mode(RGBLIGHT_MODE_RAINBOW_SWIRL + 2); // set to RGB_RAINBOW_SWIRL by default +# endif +#endif + +#ifdef RGB_MATRIX_ENABLE + rgb_matrix_enable(); // Enable RGB by default +#endif + + eeconfig_update_kb(0); + eeconfig_init_user(); +} diff --git a/keyboards/keebio/bdn9/rev2/rev2.h b/keyboards/keebio/bdn9/rev2/rev2.h new file mode 100644 index 000000000000..0f0603c1d6a4 --- /dev/null +++ b/keyboards/keebio/bdn9/rev2/rev2.h @@ -0,0 +1,38 @@ +/* Copyright 2020 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 + +#include "bdn9.h" +#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( \ + KA1, KA2, KA3, \ + KB1, KB2, KB3, \ + KC1, KC2, KC3 \ +) \ +{ \ + { KA1, KA2, KA3 }, \ + { KB1, KB2, KB3 }, \ + { KC1, KC2, KC3 } \ +} diff --git a/keyboards/keebio/bdn9/rev2/rules.mk b/keyboards/keebio/bdn9/rev2/rules.mk new file mode 100644 index 000000000000..5e5fa2ff911d --- /dev/null +++ b/keyboards/keebio/bdn9/rev2/rules.mk @@ -0,0 +1,27 @@ +# 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 = 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 +ENCODER_ENABLE = yes +RGB_MATRIX_ENABLE = WS2812 + +# Enter lower-power sleep mode when on the ChibiOS idle thread +OPT_DEFS += -DCORTEX_ENABLE_WFI_IDLE=TRUE diff --git a/keyboards/keebio/bdn9/rules.mk b/keyboards/keebio/bdn9/rules.mk index 176175ca2bd4..431a8ad02751 100644 --- a/keyboards/keebio/bdn9/rules.mk +++ b/keyboards/keebio/bdn9/rules.mk @@ -1,34 +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 = 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 = 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 -ENCODER_ENABLE = yes \ No newline at end of file +DEFAULT_FOLDER = keebio/bdn9/rev1 From b7cb4111ea1804b90dfe2ab402b1776ae4d07d26 Mon Sep 17 00:00:00 2001 From: umi <57262844+umi-umi@users.noreply.github.com> Date: Wed, 10 Jun 2020 21:04:39 +0900 Subject: [PATCH 119/930] [Docs] Japanese translation of docs/feature_wpm.md (#9254) * add feature_wpm.md translation * update based on comment * update based on comment * update based on comment --- docs/ja/feature_wpm.md | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 docs/ja/feature_wpm.md diff --git a/docs/ja/feature_wpm.md b/docs/ja/feature_wpm.md new file mode 100644 index 000000000000..3cb5e58fcb0f --- /dev/null +++ b/docs/ja/feature_wpm.md @@ -0,0 +1,24 @@ +# Word Per Minute (WPM) の計算 + + + +WPM 機能は、キーストローク間の時間から1分あたりの平均(移動平均)単語数を計算し、様々な用途で利用できるようにします。 + +`rules.mk` に以下を追加することで WPM システムを有効にします: + + WPM_ENABLE = yes + +ソフトシリアルを使っている分割キーボードについては、計算された WPM スコアがマスター側とスレーブ側で利用可能です。 + +## 公開関数 + +`uint8_t get_current_wpm(void);` +この関数は符号なし整数で現在の WPM を返します。 + + +## WPM 計算のためのカスタマイズ化されたキー + +デフォルトでは、WPM スコアは文字、空白、およびいくつかの句読点のみを含みます。WPM の計算に含むとみなす文字セットを変更したい場合は、`wpm_keycode_user(uint16_t keycode)` を実装し、計算に含めたい文字について true を返し、計算しない特定のキーコードに false を返すようにします。 From cff3c3bf284a2d60b1c3cb80e9775580559de739 Mon Sep 17 00:00:00 2001 From: Adrian Date: Wed, 10 Jun 2020 18:25:45 +0200 Subject: [PATCH 120/930] Fixed slave-side keyboard half unresponsiveness (#9360) * Fixed slave-side keyboard half unresponsiveness due to how LUFA handles USB_Disable() * changes to formatting Co-authored-by: Joel Challis Co-authored-by: Joel Challis --- quantum/split_common/split_util.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/quantum/split_common/split_util.c b/quantum/split_common/split_util.c index dfd06f5f946a..afcd9d2aa586 100644 --- a/quantum/split_common/split_util.c +++ b/quantum/split_common/split_util.c @@ -39,7 +39,10 @@ volatile bool isLeftHand = true; #if defined(SPLIT_USB_DETECT) # if defined(PROTOCOL_LUFA) static inline bool usbHasActiveConnection(void) { return USB_Device_IsAddressSet(); } -static inline void usbDisable(void) { USB_Disable(); } +static inline void usbDisable(void) { + USB_Disable(); + USB_DeviceState = DEVICE_STATE_Unattached; +} # elif defined(PROTOCOL_CHIBIOS) static inline bool usbHasActiveConnection(void) { return usbGetDriverStateI(&USBD1) == USB_ACTIVE; } static inline void usbDisable(void) { usbStop(&USBD1); } From 08e08b660c36eb2b9b4e8cc438735f1aa97cfc1b Mon Sep 17 00:00:00 2001 From: James Young <18669334+noroadsleft@users.noreply.github.com> Date: Wed, 10 Jun 2020 09:34:18 -0700 Subject: [PATCH 121/930] Add VIA support to KC60 (#9351) * Add VIA support to KC60 * enable Bootmagic Lite --- keyboards/kc60/keymaps/via/keymap.c | 32 ++++++++++++++++++++++++++++ keyboards/kc60/keymaps/via/readme.md | 1 + keyboards/kc60/keymaps/via/rules.mk | 2 ++ keyboards/kc60/rules.mk | 2 +- 4 files changed, 36 insertions(+), 1 deletion(-) create mode 100644 keyboards/kc60/keymaps/via/keymap.c create mode 100644 keyboards/kc60/keymaps/via/readme.md create mode 100644 keyboards/kc60/keymaps/via/rules.mk diff --git a/keyboards/kc60/keymaps/via/keymap.c b/keyboards/kc60/keymaps/via/keymap.c new file mode 100644 index 000000000000..5623f2333dec --- /dev/null +++ b/keyboards/kc60/keymaps/via/keymap.c @@ -0,0 +1,32 @@ +#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_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_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, LT(1,KC_APP), + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, LT(1,KC_APP), KC_RCTL + ), + [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, XXXXXXX, XXXXXXX, + XXXXXXX, XXXXXXX, KC_UP, XXXXXXX, XXXXXXX, XXXXXXX, KC_INS, KC_HOME, KC_UP, KC_END, KC_PGUP, KC_PSCR, KC_SLCK, KC_PAUS, + XXXXXXX, KC_LEFT, KC_DOWN, KC_RGHT, XXXXXXX, XXXXXXX, KC_DEL, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGDN, XXXXXXX, XXXXXXX, XXXXXXX, + _______, XXXXXXX, XXXXXXX, BL_DEC, BL_TOGG, BL_INC, BL_BRTG, XXXXXXX, KC_MUTE, KC_VOLD, KC_VOLU, XXXXXXX, _______, _______, + _______, _______, _______, XXXXXXX, _______, _______, _______, _______ + ), + [2] = LAYOUT_all( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______ + ), + [3] = LAYOUT_all( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______ + ), +}; diff --git a/keyboards/kc60/keymaps/via/readme.md b/keyboards/kc60/keymaps/via/readme.md new file mode 100644 index 000000000000..e573ceee4f0b --- /dev/null +++ b/keyboards/kc60/keymaps/via/readme.md @@ -0,0 +1 @@ +# The default VIA keymap for KC60 diff --git a/keyboards/kc60/keymaps/via/rules.mk b/keyboards/kc60/keymaps/via/rules.mk new file mode 100644 index 000000000000..36b7ba9cbc98 --- /dev/null +++ b/keyboards/kc60/keymaps/via/rules.mk @@ -0,0 +1,2 @@ +VIA_ENABLE = yes +LTO_ENABLE = yes diff --git a/keyboards/kc60/rules.mk b/keyboards/kc60/rules.mk index e1c92de96115..044233e44052 100644 --- a/keyboards/kc60/rules.mk +++ b/keyboards/kc60/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 = yes # Console for debug From cce301ae83b85a69c71073273fd8ade4c81226f8 Mon Sep 17 00:00:00 2001 From: Sergey Vlasov Date: Wed, 10 Jun 2020 20:43:09 +0300 Subject: [PATCH 122/930] kbdfans/kbd67/rev2: Fix ISO layout macro (#9329) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit A user in Discord reported that the right bracket and ISO hash keys on KBD67 rev2 using LAYOUT_65_iso were swapped. When comparing LAYOUT_65_iso with LAYOUT_65_ansi, the problem with a wrong assignment of the right bracket key is obvious — that key is K1D in the ANSI layout macro, but the ISO layout macro had K1E there, and K1D at the position of the ISO hash key. Fix the LAYOUT_65_iso macro by swapping those arguments (and also align the K1D argument for the right bracket key properly). --- keyboards/kbdfans/kbd67/rev2/rev2.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/keyboards/kbdfans/kbd67/rev2/rev2.h b/keyboards/kbdfans/kbd67/rev2/rev2.h index dba434926685..5eb76243ad01 100644 --- a/keyboards/kbdfans/kbd67/rev2/rev2.h +++ b/keyboards/kbdfans/kbd67/rev2/rev2.h @@ -89,8 +89,8 @@ #define LAYOUT_65_iso( \ K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0E, K0F, \ - K10, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1E, K1F, \ - K20, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K1D, K2D, K2F, \ + 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, K46, K4A, K4B, K4C, K4D, K4E, K4F \ ) \ From 713d34cda448b19a9e49b1e3eb1dd546d85e002b Mon Sep 17 00:00:00 2001 From: fluffactually Date: Wed, 10 Jun 2020 18:45:22 +0100 Subject: [PATCH 123/930] Add new iris keymap 'fluffactually' (#9325) * Add new iris keymap 'fluffactually' * Keymap suggested changes - layer_state_t --- .../iris/keymaps/fluffactually/config.h | 22 +++++++ .../iris/keymaps/fluffactually/keymap.c | 65 +++++++++++++++++++ .../iris/keymaps/fluffactually/readme.md | 14 ++++ 3 files changed, 101 insertions(+) create mode 100644 keyboards/keebio/iris/keymaps/fluffactually/config.h create mode 100644 keyboards/keebio/iris/keymaps/fluffactually/keymap.c create mode 100644 keyboards/keebio/iris/keymaps/fluffactually/readme.md diff --git a/keyboards/keebio/iris/keymaps/fluffactually/config.h b/keyboards/keebio/iris/keymaps/fluffactually/config.h new file mode 100644 index 000000000000..83203b69bc75 --- /dev/null +++ b/keyboards/keebio/iris/keymaps/fluffactually/config.h @@ -0,0 +1,22 @@ +/* +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 +#define TAPPING_TOGGLE 2 \ No newline at end of file diff --git a/keyboards/keebio/iris/keymaps/fluffactually/keymap.c b/keyboards/keebio/iris/keymaps/fluffactually/keymap.c new file mode 100644 index 000000000000..c2d07b70645f --- /dev/null +++ b/keyboards/keebio/iris/keymaps/fluffactually/keymap.c @@ -0,0 +1,65 @@ +#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_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,LSFT_T(KC_EQL),RCTL_T(KC_MINS),KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, + //└────────┴────────┴────────┴───┬────┴───┬────┴───┬────┴───┬────┘ └───┬────┴───┬────┴───┬────┴───┬────┴────────┴────────┴────────┘ + KC_LGUI, TT(1), KC_ENT, KC_SPC, TT(2), KC_RALT + // └────────┴────────┴────────┘ └────────┴────────┴────────┘ + ), + + [1] = 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_END, _______, _______, _______, _______, _______, _______, _______, KC_DEL, + //├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤ + _______, KC_HOME, _______, _______, KC_PGDN, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, _______, _______, + //├────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┤ + _______, _______, _______, _______, _______, KC_PGUP, KC_LBRC, KC_RBRC, _______, _______, _______, _______, _______, _______, + //└────────┴────────┴────────┴───┬────┴───┬────┴───┬────┴───┬────┘ └───┬────┴───┬────┴───┬────┴───┬────┴────────┴────────┴────────┘ + _______, _______, _______, _______, _______, _______ + // └────────┴────────┴────────┘ └────────┴────────┴────────┘ + ), + + [2] = LAYOUT( + //┌────────┬────────┬────────┬────────┬────────┬────────┐ ┌────────┬────────┬────────┬────────┬────────┬────────┐ + KC_GRV, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, RESET, + //├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤ + KC_MUTE, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, RGB_TOG, + //├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤ + KC_VOLU, KC_BRIU, KC_MNXT, KC_MPLY, _______, _______, _______, RGB_SPI, RGB_HUI, RGB_SAI, RGB_VAI, RGB_MOD, + //├────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┤ + KC_VOLD, KC_BRID, KC_MPRV, KC_MSTP, _______, KC_LBRC, KC_LCBR, KC_RCBR, KC_RBRC, RGB_SPD, RGB_HUD, RGB_SAD, RGB_VAD, RGB_RMOD, + //└────────┴────────┴────────┴───┬────┴───┬────┴───┬────┴───┬────┘ └───┬────┴───┬────┴───┬────┴───┬────┴────────┴────────┴────────┘ + _______, _______, _______, _______, _______, _______ + // └────────┴────────┴────────┘ └────────┴────────┴────────┘ + ), + + [3] = LAYOUT( + //┌────────┬────────┬────────┬────────┬────────┬────────┐ ┌────────┬────────┬────────┬────────┬────────┬────────┐ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + //├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + //├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + //├────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┤ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + //└────────┴────────┴────────┴───┬────┴───┬────┴───┬────┴───┬────┘ └───┬────┴───┬────┴───┬────┴───┬────┴────────┴────────┴────────┘ + _______, _______, _______, _______, _______, _______ + // └────────┴────────┴────────┘ └────────┴────────┴────────┘ + ) +}; + +layer_state_t layer_state_set_user(layer_state_t state) { + return update_tri_layer_state(state, 1, 2, 3); +} diff --git a/keyboards/keebio/iris/keymaps/fluffactually/readme.md b/keyboards/keebio/iris/keymaps/fluffactually/readme.md new file mode 100644 index 000000000000..68092a11a213 --- /dev/null +++ b/keyboards/keebio/iris/keymaps/fluffactually/readme.md @@ -0,0 +1,14 @@ +# Iris layout by fluffactually + +![fluffactually](https://i.imgur.com/vmJSa9n.png) + +[KLE link](http://www.keyboard-layout-editor.com/#/gists/a6e67ca7177e7f5e4e44fbc1f09cdfae) + +A gentle departure from the default layout. Changes include: + +* Vim movement keys +* Mod-Tap upper thumb keys +* Layer Tap-Toggle layer keys (TAPPING_TOGGLE 2) +* Grave Escape +* Lower backspace +* Reshuffled Raise layer to make it harder to accidentally reset From 5c2b46dc47f8e4c0e806b78b58324ac66869d7a8 Mon Sep 17 00:00:00 2001 From: Danny Date: Wed, 10 Jun 2020 15:12:02 -0400 Subject: [PATCH 124/930] Add Sinc keyboard (#8986) * Add Sinc (WIP) * Rename layouts, add keymaps * Set EEPROM VIA layout value * Update QMK Configurator json * Update VIA layout value * Add default folder * Add PR suggestions * Fix keyboard name --- keyboards/keebio/sinc/config.h | 21 + keyboards/keebio/sinc/info.json | 998 ++++++++++++++++++ .../keebio/sinc/keymaps/default/keymap.c | 36 + keyboards/keebio/sinc/keymaps/iso/keymap.c | 36 + keyboards/keebio/sinc/keymaps/via/keymap.c | 55 + keyboards/keebio/sinc/keymaps/via/rules.mk | 3 + keyboards/keebio/sinc/readme.md | 20 + keyboards/keebio/sinc/rev1/config.h | 69 ++ keyboards/keebio/sinc/rev1/rev1.c | 33 + keyboards/keebio/sinc/rev1/rev1.h | 219 ++++ keyboards/keebio/sinc/rev1/rules.mk | 3 + keyboards/keebio/sinc/rules.mk | 34 + keyboards/keebio/sinc/sinc.c | 1 + keyboards/keebio/sinc/sinc.h | 7 + 14 files changed, 1535 insertions(+) create mode 100644 keyboards/keebio/sinc/config.h create mode 100644 keyboards/keebio/sinc/info.json create mode 100644 keyboards/keebio/sinc/keymaps/default/keymap.c create mode 100644 keyboards/keebio/sinc/keymaps/iso/keymap.c create mode 100644 keyboards/keebio/sinc/keymaps/via/keymap.c create mode 100644 keyboards/keebio/sinc/keymaps/via/rules.mk create mode 100644 keyboards/keebio/sinc/readme.md create mode 100644 keyboards/keebio/sinc/rev1/config.h create mode 100644 keyboards/keebio/sinc/rev1/rev1.c create mode 100644 keyboards/keebio/sinc/rev1/rev1.h create mode 100644 keyboards/keebio/sinc/rev1/rules.mk create mode 100644 keyboards/keebio/sinc/rules.mk create mode 100644 keyboards/keebio/sinc/sinc.c create mode 100644 keyboards/keebio/sinc/sinc.h diff --git a/keyboards/keebio/sinc/config.h b/keyboards/keebio/sinc/config.h new file mode 100644 index 000000000000..cfb6bf4ffccd --- /dev/null +++ b/keyboards/keebio/sinc/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/keebio/sinc/info.json b/keyboards/keebio/sinc/info.json new file mode 100644 index 000000000000..fbbde699c431 --- /dev/null +++ b/keyboards/keebio/sinc/info.json @@ -0,0 +1,998 @@ +{ + "keyboard_name": "Sinc", + "url": "https://keeb.io", + "maintainer": "nooges", + "width": 19, + "height": 6.25, + "layouts": { + "LAYOUT_75": { + "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":8.5, "y":0}, + {"label":"F8", "x":9.5, "y":0}, + {"label":"F9", "x":10.75, "y":0}, + {"label":"F10", "x":11.75, "y":0}, + {"label":"F11", "x":12.75, "y":0}, + {"label":"F12", "x":13.75, "y":0}, + {"label":"F13", "x":15, "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":8, "y":1.25}, + {"label":"8", "x":9, "y":1.25}, + {"label":"9", "x":10, "y":1.25}, + {"label":"0", "x":11, "y":1.25}, + {"label":"-", "x":12, "y":1.25}, + {"label":"=", "x":13, "y":1.25}, + {"label":"Del", "x":14, "y":1.25}, + {"label":"Bksp", "x":15, "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":7.5, "y":2.25}, + {"label":"U", "x":8.5, "y":2.25}, + {"label":"I", "x":9.5, "y":2.25}, + {"label":"O", "x":10.5, "y":2.25}, + {"label":"P", "x":11.5, "y":2.25}, + {"label":"[", "x":12.5, "y":2.25}, + {"label":"]", "x":13.5, "y":2.25}, + {"label":"Backslash", "x":14.5, "y":2.25, "w":1.5}, + + {"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":7.75, "y":3.25}, + {"label":"J", "x":8.75, "y":3.25}, + {"label":"K", "x":9.75, "y":3.25}, + {"label":"L", "x":10.75, "y":3.25}, + {"label":";", "x":11.75, "y":3.25}, + {"label":"'", "x":12.75, "y":3.25}, + {"label":"Enter", "x":13.75, "y":3.25, "w":2.25}, + + {"label":"Shift", "x":0, "y":4.25, "w":2.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":8.25, "y":4.25}, + {"label":"M", "x":9.25, "y":4.25}, + {"label":",", "x":10.25, "y":4.25}, + {"label":".", "x":11.25, "y":4.25}, + {"label":"/", "x":12.25, "y":4.25}, + {"label":"Shift", "x":13.25, "y":4.25, "w":1.75}, + {"label":"Up", "x":15, "y":4.25}, + + {"label":"Ctrl", "x":0, "y":5.25, "w":1.25}, + {"label":"Alt", "x":1.25, "y":5.25, "w":1.25}, + {"label":"Win", "x":2.5, "y":5.25, "w":1.25}, + {"label":"Fn", "x":3.75, "y":5.25, "w":1.25}, + {"label":"Space", "x":5, "y":5.25}, + {"label":"Space", "x":6, "y":5.25, "w":1.25}, + + {"label":"Fn", "x":8.25, "y":5.25, "w":1.25}, + {"label":"Space", "x":9.5, "y":5.25, "w":1.5}, + {"label":"Alt", "x":11, "y":5.25}, + {"label":"Ctrl", "x":12, "y":5.25}, + {"label":"Left", "x":13, "y":5.25}, + {"label":"Down", "x":14, "y":5.25}, + {"label":"Right", "x":15, "y":5.25} + ] + }, + "LAYOUT_80": { + "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":8.5, "y":0}, + {"label":"F8", "x":9.5, "y":0}, + {"label":"F9", "x":10.75, "y":0}, + {"label":"F10", "x":11.75, "y":0}, + {"label":"F11", "x":12.75, "y":0}, + {"label":"F12", "x":13.75, "y":0}, + {"label":"F13", "x":15, "y":0}, + {"label":"F14", "x":16, "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":8, "y":1.25}, + {"label":"8", "x":9, "y":1.25}, + {"label":"9", "x":10, "y":1.25}, + {"label":"0", "x":11, "y":1.25}, + {"label":"-", "x":12, "y":1.25}, + {"label":"=", "x":13, "y":1.25}, + {"label":"Del", "x":14, "y":1.25}, + {"label":"Bksp", "x":15, "y":1.25}, + {"label":"Home", "x":16, "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":7.5, "y":2.25}, + {"label":"U", "x":8.5, "y":2.25}, + {"label":"I", "x":9.5, "y":2.25}, + {"label":"O", "x":10.5, "y":2.25}, + {"label":"P", "x":11.5, "y":2.25}, + {"label":"[", "x":12.5, "y":2.25}, + {"label":"]", "x":13.5, "y":2.25}, + {"label":"Backslash", "x":14.5, "y":2.25, "w":1.5}, + {"label":"End", "x":16, "y":2.25}, + + {"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":7.75, "y":3.25}, + {"label":"J", "x":8.75, "y":3.25}, + {"label":"K", "x":9.75, "y":3.25}, + {"label":"L", "x":10.75, "y":3.25}, + {"label":";", "x":11.75, "y":3.25}, + {"label":"'", "x":12.75, "y":3.25}, + {"label":"Enter", "x":13.75, "y":3.25, "w":2.25}, + {"label":"Page Up", "x":16, "y":3.25}, + + {"label":"Shift", "x":0, "y":4.25, "w":2.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":8.25, "y":4.25}, + {"label":"M", "x":9.25, "y":4.25}, + {"label":",", "x":10.25, "y":4.25}, + {"label":".", "x":11.25, "y":4.25}, + {"label":"/", "x":12.25, "y":4.25}, + {"label":"Shift", "x":13.25, "y":4.25, "w":1.75}, + {"label":"Up", "x":15, "y":4.25}, + {"label":"Page Down", "x":16, "y":4.25}, + + {"label":"Ctrl", "x":0, "y":5.25, "w":1.25}, + {"label":"Alt", "x":1.25, "y":5.25, "w":1.25}, + {"label":"Win", "x":2.5, "y":5.25, "w":1.25}, + {"label":"Fn", "x":3.75, "y":5.25, "w":1.25}, + {"label":"Space", "x":5, "y":5.25}, + {"label":"Space", "x":6, "y":5.25, "w":1.25}, + + {"label":"Fn", "x":8.25, "y":5.25, "w":1.25}, + {"label":"Space", "x":9.5, "y":5.25, "w":1.5}, + {"label":"Alt", "x":11, "y":5.25}, + {"label":"Ctrl", "x":12, "y":5.25}, + {"label":"Win", "x":13, "y":5.25}, + {"label":"Left", "x":14, "y":5.25}, + {"label":"Down", "x":15, "y":5.25}, + {"label":"Right", "x":16, "y":5.25} + ] + }, + "LAYOUT_75_with_macro": { + "layout": [ + {"label":"Mute", "x":0, "y":0}, + {"label":"Esc", "x":2.25, "y":0}, + {"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":"F5", "x":7.75, "y":0}, + {"label":"F6", "x":8.75, "y":0}, + + {"label":"F7", "x":10.75, "y":0}, + {"label":"F8", "x":11.75, "y":0}, + {"label":"F9", "x":13, "y":0}, + {"label":"F10", "x":14, "y":0}, + {"label":"F11", "x":15, "y":0}, + {"label":"F12", "x":16, "y":0}, + {"label":"F13", "x":17.25, "y":0}, + + {"label":"F1", "x":0, "y":1.25}, + {"label":"F6", "x":1, "y":1.25}, + + {"label":"Esc", "x":2.25, "y":1.25}, + {"label":"1", "x":3.25, "y":1.25}, + {"label":"2", "x":4.25, "y":1.25}, + {"label":"3", "x":5.25, "y":1.25}, + {"label":"4", "x":6.25, "y":1.25}, + {"label":"5", "x":7.25, "y":1.25}, + {"label":"6", "x":8.25, "y":1.25}, + + {"label":"7", "x":10.25, "y":1.25}, + {"label":"8", "x":11.25, "y":1.25}, + {"label":"9", "x":12.25, "y":1.25}, + {"label":"0", "x":13.25, "y":1.25}, + {"label":"-", "x":14.25, "y":1.25}, + {"label":"=", "x":15.25, "y":1.25}, + {"label":"Del", "x":16.25, "y":1.25}, + {"label":"Bksp", "x":17.25, "y":1.25}, + + {"label":"F2", "x":0, "y":2.25}, + {"label":"F7", "x":1, "y":2.25}, + + {"label":"Tab", "x":2.25, "y":2.25, "w":1.5}, + {"label":"Q", "x":3.75, "y":2.25}, + {"label":"W", "x":4.75, "y":2.25}, + {"label":"E", "x":5.75, "y":2.25}, + {"label":"R", "x":6.75, "y":2.25}, + {"label":"T", "x":7.75, "y":2.25}, + + {"label":"Y", "x":9.75, "y":2.25}, + {"label":"U", "x":10.75, "y":2.25}, + {"label":"I", "x":11.75, "y":2.25}, + {"label":"O", "x":12.75, "y":2.25}, + {"label":"P", "x":13.75, "y":2.25}, + {"label":"{", "x":14.75, "y":2.25}, + {"label":"}", "x":15.75, "y":2.25}, + {"label":"Backslash", "x":16.75, "y":2.25, "w":1.5}, + + {"label":"F3", "x":0, "y":3.25}, + {"label":"F8", "x":1, "y":3.25}, + + {"label":"Caps Lock", "x":2.25, "y":3.25, "w":1.75}, + {"label":"A", "x":4, "y":3.25}, + {"label":"S", "x":5, "y":3.25}, + {"label":"D", "x":6, "y":3.25}, + {"label":"F", "x":7, "y":3.25}, + {"label":"G", "x":8, "y":3.25}, + + {"label":"H", "x":10, "y":3.25}, + {"label":"J", "x":11, "y":3.25}, + {"label":"K", "x":12, "y":3.25}, + {"label":"L", "x":13, "y":3.25}, + {"label":":", "x":14, "y":3.25}, + {"label":"\"", "x":15, "y":3.25}, + {"label":"Enter", "x":16, "y":3.25, "w":2.25}, + + {"label":"F4", "x":0, "y":4.25}, + {"label":"F9", "x":1, "y":4.25}, + + {"label":"Shift", "x":2.25, "y":4.25, "w":2.25}, + {"label":"Z", "x":4.5, "y":4.25}, + {"label":"X", "x":5.5, "y":4.25}, + {"label":"C", "x":6.5, "y":4.25}, + {"label":"V", "x":7.5, "y":4.25}, + {"label":"B", "x":8.5, "y":4.25}, + + {"label":"N", "x":10.5, "y":4.25}, + {"label":"M", "x":11.5, "y":4.25}, + {"label":",", "x":12.5, "y":4.25}, + {"label":".", "x":13.5, "y":4.25}, + {"label":"/", "x":14.5, "y":4.25}, + {"label":"Shift", "x":15.5, "y":4.25, "w":1.75}, + {"label":"Fn", "x":17.25, "y":4.25}, + + {"label":"F5", "x":0, "y":5.25}, + {"label":"F10", "x":1, "y":5.25}, + + {"label":"Ctrl", "x":2.25, "y":5.25, "w":1.25}, + {"label":"Win", "x":3.5, "y":5.25, "w":1.25}, + {"label":"Alt", "x":4.75, "y":5.25, "w":1.25}, + {"label":"Fn", "x":6, "y":5.25, "w":1.25}, + {"label":"Space", "x":7.25, "y":5.25}, + {"label":"Space", "x":8.25, "y":5.25, "w":1.25}, + + {"label":"Fn", "x":10.5, "y":5.25, "w":1.25}, + {"label":"Space", "x":11.75, "y":5.25, "w":1.5}, + {"label":"Alt", "x":13.25, "y":5.25}, + {"label":"Ctrl", "x":14.25, "y":5.25}, + {"label":"Left", "x":15.25, "y":5.25}, + {"label":"Down", "x":16.25, "y":5.25}, + {"label":"Right", "x":17.25, "y":5.25} + ] + }, + "LAYOUT_80_with_macro": { + "layout": [ + {"label":"Mute", "x":0, "y":0}, + {"label":"Esc", "x":2.25, "y":0}, + {"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":"F5", "x":7.75, "y":0}, + {"label":"F6", "x":8.75, "y":0}, + + {"label":"F7", "x":10.75, "y":0}, + {"label":"F8", "x":11.75, "y":0}, + {"label":"F9", "x":13, "y":0}, + {"label":"F10", "x":14, "y":0}, + {"label":"F11", "x":15, "y":0}, + {"label":"F12", "x":16, "y":0}, + {"label":"F13", "x":17.25, "y":0}, + {"label":"F14", "x":18.25, "y":0}, + + {"label":"F1", "x":0, "y":1.25}, + {"label":"F6", "x":1, "y":1.25}, + + {"label":"Esc", "x":2.25, "y":1.25}, + {"label":"1", "x":3.25, "y":1.25}, + {"label":"2", "x":4.25, "y":1.25}, + {"label":"3", "x":5.25, "y":1.25}, + {"label":"4", "x":6.25, "y":1.25}, + {"label":"5", "x":7.25, "y":1.25}, + {"label":"6", "x":8.25, "y":1.25}, + + {"label":"7", "x":10.25, "y":1.25}, + {"label":"8", "x":11.25, "y":1.25}, + {"label":"9", "x":12.25, "y":1.25}, + {"label":"0", "x":13.25, "y":1.25}, + {"label":"-", "x":14.25, "y":1.25}, + {"label":"=", "x":15.25, "y":1.25}, + {"label":"=", "x":16.25, "y":1.25}, + {"label":"Bksp", "x":17.25, "y":1.25}, + {"label":"Home", "x":18.25, "y":1.25}, + + {"label":"F2", "x":0, "y":2.25}, + {"label":"F7", "x":1, "y":2.25}, + + {"label":"Tab", "x":2.25, "y":2.25, "w":1.5}, + {"label":"Q", "x":3.75, "y":2.25}, + {"label":"W", "x":4.75, "y":2.25}, + {"label":"E", "x":5.75, "y":2.25}, + {"label":"R", "x":6.75, "y":2.25}, + {"label":"T", "x":7.75, "y":2.25}, + + {"label":"Y", "x":9.75, "y":2.25}, + {"label":"U", "x":10.75, "y":2.25}, + {"label":"I", "x":11.75, "y":2.25}, + {"label":"O", "x":12.75, "y":2.25}, + {"label":"P", "x":13.75, "y":2.25}, + {"label":"{", "x":14.75, "y":2.25}, + {"label":"}", "x":15.75, "y":2.25}, + {"label":"|", "x":16.75, "y":2.25, "w":1.5}, + {"label":"PgUp", "x":18.25, "y":2.25}, + + {"label":"F3", "x":0, "y":3.25}, + {"label":"F8", "x":1, "y":3.25}, + + {"label":"Caps Lock", "x":2.25, "y":3.25, "w":1.75}, + {"label":"A", "x":4, "y":3.25}, + {"label":"S", "x":5, "y":3.25}, + {"label":"D", "x":6, "y":3.25}, + {"label":"F", "x":7, "y":3.25}, + {"label":"G", "x":8, "y":3.25}, + + {"label":"H", "x":10, "y":3.25}, + {"label":"J", "x":11, "y":3.25}, + {"label":"K", "x":12, "y":3.25}, + {"label":"L", "x":13, "y":3.25}, + {"label":":", "x":14, "y":3.25}, + {"label":"\"", "x":15, "y":3.25}, + {"label":"Enter", "x":16, "y":3.25, "w":2.25}, + {"label":"PgDn", "x":18.25, "y":3.25}, + + {"label":"F4", "x":0, "y":4.25}, + {"label":"F9", "x":1, "y":4.25}, + + {"label":"Shift", "x":2.25, "y":4.25, "w":2.25}, + {"label":"Z", "x":4.5, "y":4.25}, + {"label":"X", "x":5.5, "y":4.25}, + {"label":"C", "x":6.5, "y":4.25}, + {"label":"V", "x":7.5, "y":4.25}, + {"label":"B", "x":8.5, "y":4.25}, + + {"label":"N", "x":10.5, "y":4.25}, + {"label":"M", "x":11.5, "y":4.25}, + {"label":",", "x":12.5, "y":4.25}, + {"label":".", "x":13.5, "y":4.25}, + {"label":"/", "x":14.5, "y":4.25}, + {"label":"Shift", "x":15.5, "y":4.25, "w":1.75}, + {"label":"Up", "x":17.25, "y":4.25}, + {"label":"End", "x":18.25, "y":4.25}, + + {"label":"F5", "x":0, "y":5.25}, + {"label":"F10", "x":1, "y":5.25}, + + {"label":"Ctrl", "x":2.25, "y":5.25, "w":1.25}, + {"label":"Win", "x":3.5, "y":5.25, "w":1.25}, + {"label":"Alt", "x":4.75, "y":5.25, "w":1.25}, + {"label":"Fn", "x":6, "y":5.25, "w":1.25}, + {"label":"Space", "x":7.25, "y":5.25}, + {"label":"Space", "x":8.25, "y":5.25, "w":1.25}, + + {"label":"Fn", "x":10.5, "y":5.25, "w":1.25}, + {"label":"Space", "x":11.75, "y":5.25, "w":1.5}, + {"label":"Alt", "x":13.25, "y":5.25}, + {"label":"Ctrl", "x":14.25, "y":5.25}, + {"label":"Win", "x":15.25, "y":5.25}, + {"label":"Left", "x":16.25, "y":5.25}, + {"label":"Down", "x":17.25, "y":5.25}, + {"label":"Right", "x":18.25, "y":5.25} + ] + }, + "LAYOUT_75_iso": { + "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":8.5, "y":0}, + {"label":"F8", "x":9.5, "y":0}, + {"label":"F9", "x":10.75, "y":0}, + {"label":"F10", "x":11.75, "y":0}, + {"label":"F11", "x":12.75, "y":0}, + {"label":"F12", "x":13.75, "y":0}, + {"label":"F13", "x":15, "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":8, "y":1.25}, + {"label":"8", "x":9, "y":1.25}, + {"label":"9", "x":10, "y":1.25}, + {"label":"0", "x":11, "y":1.25}, + {"label":"-", "x":12, "y":1.25}, + {"label":"=", "x":13, "y":1.25}, + {"label":"Del", "x":14, "y":1.25}, + {"label":"Bksp", "x":15, "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":7.5, "y":2.25}, + {"label":"U", "x":8.5, "y":2.25}, + {"label":"I", "x":9.5, "y":2.25}, + {"label":"O", "x":10.5, "y":2.25}, + {"label":"P", "x":11.5, "y":2.25}, + {"label":"[", "x":12.5, "y":2.25}, + {"label":"]", "x":13.5, "y":2.25}, + + {"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":7.75, "y":3.25}, + {"label":"J", "x":8.75, "y":3.25}, + {"label":"K", "x":9.75, "y":3.25}, + {"label":"L", "x":10.75, "y":3.25}, + {"label":";", "x":11.75, "y":3.25}, + {"label":"'", "x":12.75, "y":3.25}, + {"label":"NUHS", "x":13.75, "y":3.25}, + {"label":"Enter", "x":14.75, "y":2.25, "w":1.25, "h": 2}, + + {"label":"Shift", "x":0, "y":4.25, "w":1.25}, + {"label":"NUBS", "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":8.25, "y":4.25}, + {"label":"M", "x":9.25, "y":4.25}, + {"label":",", "x":10.25, "y":4.25}, + {"label":".", "x":11.25, "y":4.25}, + {"label":"/", "x":12.25, "y":4.25}, + {"label":"Shift", "x":13.25, "y":4.25, "w":1.75}, + {"label":"Up", "x":15, "y":4.25}, + + {"label":"Ctrl", "x":0, "y":5.25, "w":1.25}, + {"label":"Alt", "x":1.25, "y":5.25, "w":1.25}, + {"label":"Win", "x":2.5, "y":5.25, "w":1.25}, + {"label":"Fn", "x":3.75, "y":5.25, "w":1.25}, + {"label":"Space", "x":5, "y":5.25}, + {"label":"Space", "x":6, "y":5.25, "w":1.25}, + + {"label":"Fn", "x":8.25, "y":5.25, "w":1.25}, + {"label":"Space", "x":9.5, "y":5.25, "w":1.5}, + {"label":"Alt", "x":11, "y":5.25}, + {"label":"Ctrl", "x":12, "y":5.25}, + {"label":"Left", "x":13, "y":5.25}, + {"label":"Down", "x":14, "y":5.25}, + {"label":"Right", "x":15, "y":5.25} + ] + }, + "LAYOUT_80_iso": { + "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":8.5, "y":0}, + {"label":"F8", "x":9.5, "y":0}, + {"label":"F9", "x":10.75, "y":0}, + {"label":"F10", "x":11.75, "y":0}, + {"label":"F11", "x":12.75, "y":0}, + {"label":"F12", "x":13.75, "y":0}, + {"label":"F13", "x":15, "y":0}, + {"label":"F14", "x":16, "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":8, "y":1.25}, + {"label":"8", "x":9, "y":1.25}, + {"label":"9", "x":10, "y":1.25}, + {"label":"0", "x":11, "y":1.25}, + {"label":"-", "x":12, "y":1.25}, + {"label":"=", "x":13, "y":1.25}, + {"label":"Del", "x":14, "y":1.25}, + {"label":"Bksp", "x":15, "y":1.25}, + {"label":"Home", "x":16, "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":7.5, "y":2.25}, + {"label":"U", "x":8.5, "y":2.25}, + {"label":"I", "x":9.5, "y":2.25}, + {"label":"O", "x":10.5, "y":2.25}, + {"label":"P", "x":11.5, "y":2.25}, + {"label":"[", "x":12.5, "y":2.25}, + {"label":"]", "x":13.5, "y":2.25}, + {"label":"End", "x":16, "y":2.25}, + + {"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":7.75, "y":3.25}, + {"label":"J", "x":8.75, "y":3.25}, + {"label":"K", "x":9.75, "y":3.25}, + {"label":"L", "x":10.75, "y":3.25}, + {"label":";", "x":11.75, "y":3.25}, + {"label":"'", "x":12.75, "y":3.25}, + {"label":"NUHS", "x":13.75, "y":3.25}, + {"label":"Enter", "x":14.75, "y":2.25, "w":1.25, "h": 2}, + {"label":"Page Up", "x":16, "y":3.25}, + + {"label":"Shift", "x":0, "y":4.25, "w":1.25}, + {"label":"NUBS", "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":8.25, "y":4.25}, + {"label":"M", "x":9.25, "y":4.25}, + {"label":",", "x":10.25, "y":4.25}, + {"label":".", "x":11.25, "y":4.25}, + {"label":"/", "x":12.25, "y":4.25}, + {"label":"Shift", "x":13.25, "y":4.25, "w":1.75}, + {"label":"Up", "x":15, "y":4.25}, + {"label":"Page Down", "x":16, "y":4.25}, + + {"label":"Ctrl", "x":0, "y":5.25, "w":1.25}, + {"label":"Alt", "x":1.25, "y":5.25, "w":1.25}, + {"label":"Win", "x":2.5, "y":5.25, "w":1.25}, + {"label":"Fn", "x":3.75, "y":5.25, "w":1.25}, + {"label":"Space", "x":5, "y":5.25}, + {"label":"Space", "x":6, "y":5.25, "w":1.25}, + + {"label":"Fn", "x":8.25, "y":5.25, "w":1.25}, + {"label":"Space", "x":9.5, "y":5.25, "w":1.5}, + {"label":"Alt", "x":11, "y":5.25}, + {"label":"Ctrl", "x":12, "y":5.25}, + {"label":"Win", "x":13, "y":5.25}, + {"label":"Left", "x":14, "y":5.25}, + {"label":"Down", "x":15, "y":5.25}, + {"label":"Right", "x":16, "y":5.25} + ] + }, + "LAYOUT_75_iso_with_macro": { + "layout": [ + {"label":"Mute", "x":0, "y":0}, + {"label":"Esc", "x":2.25, "y":0}, + {"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":"F5", "x":7.75, "y":0}, + {"label":"F6", "x":8.75, "y":0}, + + {"label":"F7", "x":10.75, "y":0}, + {"label":"F8", "x":11.75, "y":0}, + {"label":"F9", "x":13, "y":0}, + {"label":"F10", "x":14, "y":0}, + {"label":"F11", "x":15, "y":0}, + {"label":"F12", "x":16, "y":0}, + {"label":"F13", "x":17.25, "y":0}, + + {"label":"F1", "x":0, "y":1.25}, + {"label":"F6", "x":1, "y":1.25}, + + {"label":"Esc", "x":2.25, "y":1.25}, + {"label":"1", "x":3.25, "y":1.25}, + {"label":"2", "x":4.25, "y":1.25}, + {"label":"3", "x":5.25, "y":1.25}, + {"label":"4", "x":6.25, "y":1.25}, + {"label":"5", "x":7.25, "y":1.25}, + {"label":"6", "x":8.25, "y":1.25}, + + {"label":"7", "x":10.25, "y":1.25}, + {"label":"8", "x":11.25, "y":1.25}, + {"label":"9", "x":12.25, "y":1.25}, + {"label":"0", "x":13.25, "y":1.25}, + {"label":"-", "x":14.25, "y":1.25}, + {"label":"=", "x":15.25, "y":1.25}, + {"label":"Del", "x":16.25, "y":1.25}, + {"label":"Bksp", "x":17.25, "y":1.25}, + + {"label":"F2", "x":0, "y":2.25}, + {"label":"F7", "x":1, "y":2.25}, + + {"label":"Tab", "x":2.25, "y":2.25, "w":1.5}, + {"label":"Q", "x":3.75, "y":2.25}, + {"label":"W", "x":4.75, "y":2.25}, + {"label":"E", "x":5.75, "y":2.25}, + {"label":"R", "x":6.75, "y":2.25}, + {"label":"T", "x":7.75, "y":2.25}, + + {"label":"Y", "x":9.75, "y":2.25}, + {"label":"U", "x":10.75, "y":2.25}, + {"label":"I", "x":11.75, "y":2.25}, + {"label":"O", "x":12.75, "y":2.25}, + {"label":"P", "x":13.75, "y":2.25}, + {"label":"{", "x":14.75, "y":2.25}, + {"label":"}", "x":15.75, "y":2.25}, + + {"label":"F3", "x":0, "y":3.25}, + {"label":"F8", "x":1, "y":3.25}, + + {"label":"Caps Lock", "x":2.25, "y":3.25, "w":1.75}, + {"label":"A", "x":4, "y":3.25}, + {"label":"S", "x":5, "y":3.25}, + {"label":"D", "x":6, "y":3.25}, + {"label":"F", "x":7, "y":3.25}, + {"label":"G", "x":8, "y":3.25}, + + {"label":"H", "x":10, "y":3.25}, + {"label":"J", "x":11, "y":3.25}, + {"label":"K", "x":12, "y":3.25}, + {"label":"L", "x":13, "y":3.25}, + {"label":":", "x":14, "y":3.25}, + {"label":"\"", "x":15, "y":3.25}, + {"label":"NUHS", "x":16, "y":3.25}, + {"label":"Enter", "x":17, "y":2.25, "w":1.25, "h": 2}, + + {"label":"F4", "x":0, "y":4.25}, + {"label":"F9", "x":1, "y":4.25}, + + {"label":"Shift", "x":2.25, "y":4.25, "w":1.25}, + {"label":"NUBS", "x":3.5, "y":4.25}, + {"label":"Z", "x":4.5, "y":4.25}, + {"label":"X", "x":5.5, "y":4.25}, + {"label":"C", "x":6.5, "y":4.25}, + {"label":"V", "x":7.5, "y":4.25}, + {"label":"B", "x":8.5, "y":4.25}, + + {"label":"N", "x":10.5, "y":4.25}, + {"label":"M", "x":11.5, "y":4.25}, + {"label":",", "x":12.5, "y":4.25}, + {"label":".", "x":13.5, "y":4.25}, + {"label":"/", "x":14.5, "y":4.25}, + {"label":"Shift", "x":15.5, "y":4.25, "w":1.75}, + {"label":"Fn", "x":17.25, "y":4.25}, + + {"label":"F5", "x":0, "y":5.25}, + {"label":"F10", "x":1, "y":5.25}, + + {"label":"Ctrl", "x":2.25, "y":5.25, "w":1.25}, + {"label":"Win", "x":3.5, "y":5.25, "w":1.25}, + {"label":"Alt", "x":4.75, "y":5.25, "w":1.25}, + {"label":"Fn", "x":6, "y":5.25, "w":1.25}, + {"label":"Space", "x":7.25, "y":5.25}, + {"label":"Space", "x":8.25, "y":5.25, "w":1.25}, + + {"label":"Fn", "x":10.5, "y":5.25, "w":1.25}, + {"label":"Space", "x":11.75, "y":5.25, "w":1.5}, + {"label":"Alt", "x":13.25, "y":5.25}, + {"label":"Ctrl", "x":14.25, "y":5.25}, + {"label":"Left", "x":15.25, "y":5.25}, + {"label":"Down", "x":16.25, "y":5.25}, + {"label":"Right", "x":17.25, "y":5.25} + ] + }, + "LAYOUT_80_iso_with_macro": { + "layout": [ + {"label":"Mute", "x":0, "y":0}, + {"label":"Esc", "x":2.25, "y":0}, + {"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":"F5", "x":7.75, "y":0}, + {"label":"F6", "x":8.75, "y":0}, + + {"label":"F7", "x":10.75, "y":0}, + {"label":"F8", "x":11.75, "y":0}, + {"label":"F9", "x":13, "y":0}, + {"label":"F10", "x":14, "y":0}, + {"label":"F11", "x":15, "y":0}, + {"label":"F12", "x":16, "y":0}, + {"label":"F13", "x":17.25, "y":0}, + {"label":"F14", "x":18.25, "y":0}, + + {"label":"F1", "x":0, "y":1.25}, + {"label":"F6", "x":1, "y":1.25}, + + {"label":"Esc", "x":2.25, "y":1.25}, + {"label":"1", "x":3.25, "y":1.25}, + {"label":"2", "x":4.25, "y":1.25}, + {"label":"3", "x":5.25, "y":1.25}, + {"label":"4", "x":6.25, "y":1.25}, + {"label":"5", "x":7.25, "y":1.25}, + {"label":"6", "x":8.25, "y":1.25}, + + {"label":"7", "x":10.25, "y":1.25}, + {"label":"8", "x":11.25, "y":1.25}, + {"label":"9", "x":12.25, "y":1.25}, + {"label":"0", "x":13.25, "y":1.25}, + {"label":"-", "x":14.25, "y":1.25}, + {"label":"=", "x":15.25, "y":1.25}, + {"label":"=", "x":16.25, "y":1.25}, + {"label":"Bksp", "x":17.25, "y":1.25}, + {"label":"Home", "x":18.25, "y":1.25}, + + {"label":"F2", "x":0, "y":2.25}, + {"label":"F7", "x":1, "y":2.25}, + + {"label":"Tab", "x":2.25, "y":2.25, "w":1.5}, + {"label":"Q", "x":3.75, "y":2.25}, + {"label":"W", "x":4.75, "y":2.25}, + {"label":"E", "x":5.75, "y":2.25}, + {"label":"R", "x":6.75, "y":2.25}, + {"label":"T", "x":7.75, "y":2.25}, + + {"label":"Y", "x":9.75, "y":2.25}, + {"label":"U", "x":10.75, "y":2.25}, + {"label":"I", "x":11.75, "y":2.25}, + {"label":"O", "x":12.75, "y":2.25}, + {"label":"P", "x":13.75, "y":2.25}, + {"label":"{", "x":14.75, "y":2.25}, + {"label":"}", "x":15.75, "y":2.25}, + {"label":"PgUp", "x":18.25, "y":2.25}, + + {"label":"F3", "x":0, "y":3.25}, + {"label":"F8", "x":1, "y":3.25}, + + {"label":"Caps Lock", "x":2.25, "y":3.25, "w":1.75}, + {"label":"A", "x":4, "y":3.25}, + {"label":"S", "x":5, "y":3.25}, + {"label":"D", "x":6, "y":3.25}, + {"label":"F", "x":7, "y":3.25}, + {"label":"G", "x":8, "y":3.25}, + + {"label":"H", "x":10, "y":3.25}, + {"label":"J", "x":11, "y":3.25}, + {"label":"K", "x":12, "y":3.25}, + {"label":"L", "x":13, "y":3.25}, + {"label":":", "x":14, "y":3.25}, + {"label":"\"", "x":15, "y":3.25}, + {"label":"NUHS", "x":16, "y":3.25}, + {"label":"Enter", "x":17, "y":2.25, "w":1.25, "h": 2}, + {"label":"PgDn", "x":18.25, "y":3.25}, + + {"label":"F4", "x":0, "y":4.25}, + {"label":"F9", "x":1, "y":4.25}, + + {"label":"Shift", "x":2.25, "y":4.25, "w":1.25}, + {"label":"NUBS", "x":3.5, "y":4.25}, + {"label":"Z", "x":4.5, "y":4.25}, + {"label":"X", "x":5.5, "y":4.25}, + {"label":"C", "x":6.5, "y":4.25}, + {"label":"V", "x":7.5, "y":4.25}, + {"label":"B", "x":8.5, "y":4.25}, + + {"label":"N", "x":10.5, "y":4.25}, + {"label":"M", "x":11.5, "y":4.25}, + {"label":",", "x":12.5, "y":4.25}, + {"label":".", "x":13.5, "y":4.25}, + {"label":"/", "x":14.5, "y":4.25}, + {"label":"Shift", "x":15.5, "y":4.25, "w":1.75}, + {"label":"Up", "x":17.25, "y":4.25}, + {"label":"End", "x":18.25, "y":4.25}, + + {"label":"F5", "x":0, "y":5.25}, + {"label":"F10", "x":1, "y":5.25}, + + {"label":"Ctrl", "x":2.25, "y":5.25, "w":1.25}, + {"label":"Win", "x":3.5, "y":5.25, "w":1.25}, + {"label":"Alt", "x":4.75, "y":5.25, "w":1.25}, + {"label":"Fn", "x":6, "y":5.25, "w":1.25}, + {"label":"Space", "x":7.25, "y":5.25}, + {"label":"Space", "x":8.25, "y":5.25, "w":1.25}, + + {"label":"Fn", "x":10.5, "y":5.25, "w":1.25}, + {"label":"Space", "x":11.75, "y":5.25, "w":1.5}, + {"label":"Alt", "x":13.25, "y":5.25}, + {"label":"Ctrl", "x":14.25, "y":5.25}, + {"label":"Win", "x":15.25, "y":5.25}, + {"label":"Left", "x":16.25, "y":5.25}, + {"label":"Down", "x":17.25, "y":5.25}, + {"label":"Right", "x":18.25, "y":5.25} + ] + }, + "LAYOUT_all": { + "layout": [ + {"label":"Mute", "x":0, "y":0}, + {"label":"Esc", "x":2.25, "y":0}, + {"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":"F5", "x":7.75, "y":0}, + {"label":"F6", "x":8.75, "y":0}, + + {"label":"F7", "x":10.75, "y":0}, + {"label":"F8", "x":11.75, "y":0}, + {"label":"F9", "x":13, "y":0}, + {"label":"F10", "x":14, "y":0}, + {"label":"F11", "x":15, "y":0}, + {"label":"F12", "x":16, "y":0}, + {"label":"F13", "x":17.25, "y":0}, + {"label":"F14", "x":18.25, "y":0}, + + {"label":"F1", "x":0, "y":1.25}, + {"label":"F6", "x":1, "y":1.25}, + + {"label":"Esc", "x":2.25, "y":1.25}, + {"label":"1", "x":3.25, "y":1.25}, + {"label":"2", "x":4.25, "y":1.25}, + {"label":"3", "x":5.25, "y":1.25}, + {"label":"4", "x":6.25, "y":1.25}, + {"label":"5", "x":7.25, "y":1.25}, + {"label":"6", "x":8.25, "y":1.25}, + + {"label":"7", "x":10.25, "y":1.25}, + {"label":"8", "x":11.25, "y":1.25}, + {"label":"9", "x":12.25, "y":1.25}, + {"label":"0", "x":13.25, "y":1.25}, + {"label":"-", "x":14.25, "y":1.25}, + {"label":"=", "x":15.25, "y":1.25}, + {"label":"=", "x":16.25, "y":1.25}, + {"label":"Bksp", "x":17.25, "y":1.25}, + {"label":"Home", "x":18.25, "y":1.25}, + + {"label":"F2", "x":0, "y":2.25}, + {"label":"F7", "x":1, "y":2.25}, + + {"label":"Tab", "x":2.25, "y":2.25, "w":1.5}, + {"label":"Q", "x":3.75, "y":2.25}, + {"label":"W", "x":4.75, "y":2.25}, + {"label":"E", "x":5.75, "y":2.25}, + {"label":"R", "x":6.75, "y":2.25}, + {"label":"T", "x":7.75, "y":2.25}, + + {"label":"Y", "x":9.75, "y":2.25}, + {"label":"U", "x":10.75, "y":2.25}, + {"label":"I", "x":11.75, "y":2.25}, + {"label":"O", "x":12.75, "y":2.25}, + {"label":"P", "x":13.75, "y":2.25}, + {"label":"{", "x":14.75, "y":2.25}, + {"label":"}", "x":15.75, "y":2.25}, + {"label":"|", "x":16.75, "y":2.25, "w":1.5}, + {"label":"PgUp", "x":18.25, "y":2.25}, + + {"label":"F3", "x":0, "y":3.25}, + {"label":"F8", "x":1, "y":3.25}, + + {"label":"Caps Lock", "x":2.25, "y":3.25, "w":1.75}, + {"label":"A", "x":4, "y":3.25}, + {"label":"S", "x":5, "y":3.25}, + {"label":"D", "x":6, "y":3.25}, + {"label":"F", "x":7, "y":3.25}, + {"label":"G", "x":8, "y":3.25}, + + {"label":"H", "x":10, "y":3.25}, + {"label":"J", "x":11, "y":3.25}, + {"label":"K", "x":12, "y":3.25}, + {"label":"L", "x":13, "y":3.25}, + {"label":":", "x":14, "y":3.25}, + {"label":"\"", "x":15, "y":3.25}, + {"label":"NUHS", "x":16, "y":3.25}, + {"label":"Enter", "x":17, "y":3.25, "w":1.25}, + {"label":"PgDn", "x":18.25, "y":3.25}, + + {"label":"F4", "x":0, "y":4.25}, + {"label":"F9", "x":1, "y":4.25}, + + {"label":"Shift", "x":2.25, "y":4.25, "w":1.25}, + {"label":"NUBS", "x":3.5, "y":4.25}, + {"label":"Z", "x":4.5, "y":4.25}, + {"label":"X", "x":5.5, "y":4.25}, + {"label":"C", "x":6.5, "y":4.25}, + {"label":"V", "x":7.5, "y":4.25}, + {"label":"B", "x":8.5, "y":4.25}, + + {"label":"N", "x":10.5, "y":4.25}, + {"label":"M", "x":11.5, "y":4.25}, + {"label":",", "x":12.5, "y":4.25}, + {"label":".", "x":13.5, "y":4.25}, + {"label":"/", "x":14.5, "y":4.25}, + {"label":"Shift", "x":15.5, "y":4.25, "w":1.75}, + {"label":"Up", "x":17.25, "y":4.25}, + {"label":"End", "x":18.25, "y":4.25}, + + {"label":"F5", "x":0, "y":5.25}, + {"label":"F10", "x":1, "y":5.25}, + + {"label":"Ctrl", "x":2.25, "y":5.25, "w":1.25}, + {"label":"Win", "x":3.5, "y":5.25, "w":1.25}, + {"label":"Alt", "x":4.75, "y":5.25, "w":1.25}, + {"label":"Fn", "x":6, "y":5.25, "w":1.25}, + {"label":"Space", "x":7.25, "y":5.25}, + {"label":"Space", "x":8.25, "y":5.25, "w":1.25}, + + {"label":"Fn", "x":10.5, "y":5.25, "w":1.25}, + {"label":"Space", "x":11.75, "y":5.25, "w":1.5}, + {"label":"Alt", "x":13.25, "y":5.25}, + {"label":"Ctrl", "x":14.25, "y":5.25}, + {"label":"Win", "x":15.25, "y":5.25}, + {"label":"Left", "x":16.25, "y":5.25}, + {"label":"Down", "x":17.25, "y":5.25}, + {"label":"Right", "x":18.25, "y":5.25} + ] + } + } +} diff --git a/keyboards/keebio/sinc/keymaps/default/keymap.c b/keyboards/keebio/sinc/keymaps/default/keymap.c new file mode 100644 index 000000000000..e7acf19cb662 --- /dev/null +++ b/keyboards/keebio/sinc/keymaps/default/keymap.c @@ -0,0 +1,36 @@ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_80_with_macro( + KC_MUTE, 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_F1, KC_F2, 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_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_END, + 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_PGUP, + 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_PGDN, + KC_F9, KC_F10, KC_LCTL, KC_LALT, KC_LGUI, MO(1), KC_SPC, KC_SPC, MO(1), KC_SPC, KC_RALT, KC_RCTL, KC_RGUI, KC_LEFT, KC_DOWN, KC_RGHT + ), + [1] = LAYOUT_80_with_macro( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + RGB_HUI, RGB_HUD, 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_SAI, RGB_SAD, RGB_TOG, RGB_MOD, _______, KC_UP, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + RGB_VAI, RGB_VAD, _______, _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), +}; + +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/sinc/keymaps/iso/keymap.c b/keyboards/keebio/sinc/keymaps/iso/keymap.c new file mode 100644 index 000000000000..4d4089fa5115 --- /dev/null +++ b/keyboards/keebio/sinc/keymaps/iso/keymap.c @@ -0,0 +1,36 @@ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_80_iso_with_macro( + KC_MUTE, 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_F1, KC_F2, 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_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_END, + 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_ENT, KC_PGUP, + 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_PGDN, + KC_F9, KC_F10, KC_LCTL, KC_LALT, KC_LGUI, MO(1), KC_SPC, KC_SPC, MO(1), KC_SPC, KC_RALT, KC_RCTL, KC_RGUI, KC_LEFT, KC_DOWN, KC_RGHT + ), + [1] = LAYOUT_80_iso_with_macro( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + RGB_HUI, RGB_HUD, 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_SAI, RGB_SAD, RGB_TOG, RGB_MOD, _______, KC_UP, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + RGB_VAI, RGB_VAD, _______, _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), +}; + +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/sinc/keymaps/via/keymap.c b/keyboards/keebio/sinc/keymaps/via/keymap.c new file mode 100644 index 000000000000..3a614da2feef --- /dev/null +++ b/keyboards/keebio/sinc/keymaps/via/keymap.c @@ -0,0 +1,55 @@ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_all( + KC_MUTE, 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_F1, KC_F2, 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_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_END, + 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_ENT, KC_PGUP, + 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_PGDN, + KC_F9, KC_F10, KC_LCTL, KC_LALT, KC_LGUI, MO(1), KC_SPC, KC_SPC, MO(1), KC_SPC, KC_RALT, KC_RCTL, KC_RGUI, KC_LEFT, KC_DOWN, KC_RGHT + ), + + [1] = LAYOUT_all( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + RGB_HUI, RGB_HUD, 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_SAI, RGB_SAD, RGB_TOG, RGB_MOD, _______, KC_UP, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + RGB_VAI, RGB_VAD, _______, _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + + [2] = LAYOUT_all( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + + [3] = LAYOUT_all( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ) +}; + +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/sinc/keymaps/via/rules.mk b/keyboards/keebio/sinc/keymaps/via/rules.mk new file mode 100644 index 000000000000..4b1bcabda81a --- /dev/null +++ b/keyboards/keebio/sinc/keymaps/via/rules.mk @@ -0,0 +1,3 @@ +VIA_ENABLE = yes +CONSOLE_ENABLE = yes +LTO_ENABLE = yes diff --git a/keyboards/keebio/sinc/readme.md b/keyboards/keebio/sinc/readme.md new file mode 100644 index 000000000000..29d9ed0415d6 --- /dev/null +++ b/keyboards/keebio/sinc/readme.md @@ -0,0 +1,20 @@ +# Sinc + +A split 75% staggered keyboard made and sold by Keebio. [More info at Keebio](https://keeb.io). + +* Keyboard Maintainer: [Bakingpy/nooges](https://github.com/nooges) +* Hardware Availability: [Keebio](https://keeb.io/) + +Make example for this keyboard (after setting up your build environment): + + make keebio/sinc/rev1:default + +Example of flashing this keyboard: + + make keebio/sinc/rev1:default:flash + +Handedness detection is already hardwired onto the PCB, so no need to deal with `EE_HANDS` or flashing .eep files. + +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. + +A build guide for this keyboard can be found here: [Keebio Build Guides](https://docs.keeb.io) diff --git a/keyboards/keebio/sinc/rev1/config.h b/keyboards/keebio/sinc/rev1/config.h new file mode 100644 index 000000000000..acd4cfb1f67d --- /dev/null +++ b/keyboards/keebio/sinc/rev1/config.h @@ -0,0 +1,69 @@ +/* +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 0x1267 +#define DEVICE_VER 0x0100 +#define MANUFACTURER Keebio +#define PRODUCT Sinc Rev. 1 +#define DESCRIPTION Split 75 percent staggered keyboard + +/* key matrix size */ +// Rows are doubled-up +#define MATRIX_ROWS 12 +#define MATRIX_COLS 9 + +#define DIODE_DIRECTION COL2ROW +// wiring of each half +#define MATRIX_ROW_PINS { B1, B2, C7, B4, D7, B0 } +#define MATRIX_COL_PINS { F4, F1, F0, B7, B3, D2, D3, D5, D4 } +#define MATRIX_ROW_PINS_RIGHT { B3, B2, B6, B4, D7, B0 } +#define MATRIX_COL_PINS_RIGHT { F1, F0, F4, F5, F6, D5, C7, D3, B7 } +#define SPLIT_HAND_PIN F7 +#define ENCODERS_PAD_A { F5 } +#define ENCODERS_PAD_B { F6 } +#define ENCODERS_PAD_A_RIGHT { D6 } +#define ENCODERS_PAD_B_RIGHT { D4 } + +/* Set 0 if debouncing isn't needed */ +#define DEBOUNCE 5 + +#define BACKLIGHT_PIN B5 +#define CAPS_LOCK_LED_PIN B6 + +/* 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 } + +// Set right column, left macro, 1.75u shift, and 5x1u on by default +#define VIA_EEPROM_LAYOUT_OPTIONS_DEFAULT 0x00D4 +#define VIA_EEPROM_LAYOUT_OPTIONS_SIZE 2 diff --git a/keyboards/keebio/sinc/rev1/rev1.c b/keyboards/keebio/sinc/rev1/rev1.c new file mode 100644 index 000000000000..0de46d65ec9d --- /dev/null +++ b/keyboards/keebio/sinc/rev1/rev1.c @@ -0,0 +1,33 @@ +#include "sinc.h" +#include "split_util.h" + +void matrix_init_kb(void) { + setPinOutput(CAPS_LOCK_LED_PIN); + matrix_init_user(); +} + +bool led_update_kb(led_t led_state) { + // Only update if left half + if (isLeftHand && led_update_user(led_state)) { + writePin(CAPS_LOCK_LED_PIN, !led_state.caps_lock); + } + return true; +} + +void eeconfig_init_kb(void) { +#ifdef BACKLIGHT_ENABLE + backlight_enable(); + backlight_level(3); +#endif +#ifdef RGBLIGHT_ENABLE + rgblight_enable(); // Enable RGB by default + rgblight_sethsv(0, 255, 128); // Set default HSV - red hue, full saturation, medium brightness + rgblight_sethsv(0, 255, 255); // Set default HSV - red hue, full saturation, full brightness +#ifdef RGBLIGHT_ANIMATIONS + rgblight_mode(RGBLIGHT_MODE_RAINBOW_SWIRL + 2); // set to RGB_RAINBOW_SWIRL by default +#endif +#endif + + eeconfig_update_kb(0); + eeconfig_init_user(); +} diff --git a/keyboards/keebio/sinc/rev1/rev1.h b/keyboards/keebio/sinc/rev1/rev1.h new file mode 100644 index 000000000000..1fbbc2d6af1d --- /dev/null +++ b/keyboards/keebio/sinc/rev1/rev1.h @@ -0,0 +1,219 @@ +#pragma once + +#include "sinc.h" +#include "quantum.h" + +#ifdef USE_I2C +#include +#ifdef __AVR__ + #include + #include +#endif +#endif + +#define LAYOUT_75( \ + LF3, LF4, LF5, LF6, LF7, LF8, LF9, RF2, RF3, RF4, RF5, RF6, RF7, RF8, \ + 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, LE7, LE8, RE1, RE2, RE3, RE4, RE5, 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 }, \ + { KC_NO, KC_NO, LF3, LF4, LF5, LF6, LF7, LF8, LF9 }, \ + { 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, RE3, RE4, RE5, KC_NO, RE7, RE8, KC_NO }, \ + { KC_NO, RF2, RF3, RF4, RF5, RF6, RF7, RF8, KC_NO } \ + } + +#define LAYOUT_80( \ + LF3, LF4, LF5, LF6, LF7, LF8, LF9, RF2, RF3, RF4, RF5, RF6, RF7, RF8, RF9, \ + 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, LE7, LE8, RE1, RE2, RE3, RE4, RE5, 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 }, \ + { KC_NO, KC_NO, LF3, LF4, LF5, LF6, LF7, LF8, LF9 }, \ + { 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, RE3, RE4, RE5, KC_NO, RE7, RE8, RE9 }, \ + { KC_NO, RF2, RF3, RF4, RF5, RF6, RF7, RF8, RF9 } \ + } + +#define LAYOUT_75_with_macro( \ + LF1, LF3, LF4, LF5, LF6, LF7, LF8, LF9, RF2, RF3, RF4, RF5, RF6, RF7, RF8, \ + 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, LE7, LE8, RE1, RE2, RE3, RE4, RE5, 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 }, \ + { LF1, KC_NO, LF3, LF4, LF5, LF6, LF7, LF8, LF9 }, \ + { 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, RE3, RE4, RE5, KC_NO, RE7, RE8, KC_NO }, \ + { KC_NO, RF2, RF3, RF4, RF5, RF6, RF7, RF8, KC_NO } \ + } + +#define LAYOUT_80_with_macro( \ + LF1, LF3, LF4, LF5, LF6, LF7, LF8, LF9, RF2, RF3, RF4, RF5, RF6, RF7, RF8, RF9, \ + 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, LE7, LE8, RE1, RE2, RE3, RE4, RE5, 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 }, \ + { LF1, KC_NO, LF3, LF4, LF5, LF6, LF7, LF8, LF9 }, \ + { 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, RE3, RE4, RE5, KC_NO, RE7, RE8, RE9 }, \ + { KC_NO, RF2, RF3, RF4, RF5, RF6, RF7, RF8, RF9 } \ + } + +#define LAYOUT_75_iso( \ + LF3, LF4, LF5, LF6, LF7, LF8, LF9, RF2, RF3, RF4, RF5, RF6, RF7, RF8, \ + 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, LE7, LE8, RE1, RE2, RE3, RE4, RE5, 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 }, \ + { KC_NO, KC_NO, LF3, LF4, LF5, LF6, LF7, LF8, LF9 }, \ + { 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, RE3, RE4, RE5, KC_NO, RE7, RE8, KC_NO }, \ + { KC_NO, RF2, RF3, RF4, RF5, RF6, RF7, RF8, KC_NO } \ + } + +#define LAYOUT_80_iso( \ + LF3, LF4, LF5, LF6, LF7, LF8, LF9, RF2, RF3, RF4, RF5, RF6, RF7, RF8, RF9, \ + 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, LE7, LE8, RE1, RE2, RE3, RE4, RE5, 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 }, \ + { KC_NO, KC_NO, LF3, LF4, LF5, LF6, LF7, LF8, LF9 }, \ + { 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, RE3, RE4, RE5, KC_NO, RE7, RE8, RE9 }, \ + { KC_NO, RF2, RF3, RF4, RF5, RF6, RF7, RF8, RF9 } \ + } + +#define LAYOUT_75_iso_with_macro( \ + LF1, LF3, LF4, LF5, LF6, LF7, LF8, LF9, RF2, RF3, RF4, RF5, RF6, RF7, RF8, \ + 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, LE7, LE8, RE1, RE2, RE3, RE4, RE5, 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 }, \ + { LF1, KC_NO, LF3, LF4, LF5, LF6, LF7, LF8, LF9 }, \ + { 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, RE3, RE4, RE5, KC_NO, RE7, RE8, KC_NO }, \ + { KC_NO, RF2, RF3, RF4, RF5, RF6, RF7, RF8, KC_NO } \ + } + +#define LAYOUT_80_iso_with_macro( \ + LF1, LF3, LF4, LF5, LF6, LF7, LF8, LF9, RF2, RF3, RF4, RF5, RF6, RF7, RF8, RF9, \ + 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, LE7, LE8, RE1, RE2, RE3, RE4, RE5, 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 }, \ + { LF1, KC_NO, LF3, LF4, LF5, LF6, LF7, LF8, LF9 }, \ + { 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, RE3, RE4, RE5, KC_NO, RE7, RE8, RE9 }, \ + { KC_NO, RF2, RF3, RF4, RF5, RF6, RF7, RF8, RF9 } \ + } + +#define LAYOUT_all( \ + LF1, LF3, LF4, LF5, LF6, LF7, LF8, LF9, RF2, RF3, RF4, RF5, RF6, RF7, RF8, RF9, \ + 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, RE3, RE4, RE5, 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 }, \ + { LF1, KC_NO, LF3, LF4, LF5, LF6, LF7, LF8, LF9 }, \ + { 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, RE3, RE4, RE5, KC_NO, RE7, RE8, RE9 }, \ + { KC_NO, RF2, RF3, RF4, RF5, RF6, RF7, RF8, RF9 } \ + } diff --git a/keyboards/keebio/sinc/rev1/rules.mk b/keyboards/keebio/sinc/rev1/rules.mk new file mode 100644 index 000000000000..32e788159916 --- /dev/null +++ b/keyboards/keebio/sinc/rev1/rules.mk @@ -0,0 +1,3 @@ +BACKLIGHT_ENABLE = yes +RGBLIGHT_ENABLE = yes +ENCODER_ENABLE = yes diff --git a/keyboards/keebio/sinc/rules.mk b/keyboards/keebio/sinc/rules.mk new file mode 100644 index 000000000000..209b74de96e8 --- /dev/null +++ b/keyboards/keebio/sinc/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 = 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 +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 +LTO_ENABLE = yes +SPLIT_KEYBOARD = yes + +DEFAULT_FOLDER = keebio/sinc/rev1 diff --git a/keyboards/keebio/sinc/sinc.c b/keyboards/keebio/sinc/sinc.c new file mode 100644 index 000000000000..c4dbfcd3d166 --- /dev/null +++ b/keyboards/keebio/sinc/sinc.c @@ -0,0 +1 @@ +#include "sinc.h" diff --git a/keyboards/keebio/sinc/sinc.h b/keyboards/keebio/sinc/sinc.h new file mode 100644 index 000000000000..3e873010524c --- /dev/null +++ b/keyboards/keebio/sinc/sinc.h @@ -0,0 +1,7 @@ +#pragma once + +#include "quantum.h" + +#ifdef KEYBOARD_keebio_sinc_rev1 + #include "rev1.h" +#endif From e26bc21d1452dcf04332d300a874dacc8d74862d Mon Sep 17 00:00:00 2001 From: Chandler Date: Wed, 10 Jun 2020 15:32:19 -0500 Subject: [PATCH 125/930] fix rgb mode selection and lighting increments for the 1894 (#9336) --- keyboards/atxkb/1894/config.h | 12 ++++++------ keyboards/atxkb/1894/rules.mk | 1 + 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/keyboards/atxkb/1894/config.h b/keyboards/atxkb/1894/config.h index 93dd93a6a220..27acb8afba76 100644 --- a/keyboards/atxkb/1894/config.h +++ b/keyboards/atxkb/1894/config.h @@ -55,13 +55,13 @@ along with this program. If not, see . #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 */ + #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 + #define RGBLIGHT_ANIMATIONS // /*== or choose animations ==*/ // #define RGBLIGHT_EFFECT_BREATHING // #define RGBLIGHT_EFFECT_RAINBOW_MOOD diff --git a/keyboards/atxkb/1894/rules.mk b/keyboards/atxkb/1894/rules.mk index 56e1ed8e0c46..7910681a3150 100644 --- a/keyboards/atxkb/1894/rules.mk +++ b/keyboards/atxkb/1894/rules.mk @@ -29,5 +29,6 @@ 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 +LTO_ENABLE = yes LAYOUTS = 60_ansi 60_ansi_split_bs_rshift 60_tsangan_hhkb From 7aa4cc9603b8cdb0ea3ede753eff7d07a86a18b0 Mon Sep 17 00:00:00 2001 From: itsnoteasy Date: Wed, 10 Jun 2020 22:23:11 +0100 Subject: [PATCH 126/930] adds support for the atmega328 (#9043) Co-authored-by: Ryan --- docs/adc_driver.md | 4 ++-- docs/compatible_microcontrollers.md | 1 + docs/feature_backlight.md | 2 +- docs/spi_driver.md | 2 +- drivers/avr/analog.c | 4 ++-- drivers/avr/spi_master.c | 2 +- drivers/avr/spi_master.h | 2 +- quantum/backlight/backlight_avr.c | 2 +- quantum/config_common.h | 2 +- quantum/mcu_selection.mk | 18 ++++++++++++++++++ tmk_core/common/avr/bootloader.c | 2 +- tmk_core/common/uart.c | 2 +- 12 files changed, 31 insertions(+), 12 deletions(-) diff --git a/docs/adc_driver.md b/docs/adc_driver.md index 7c4e05efc4bc..f8fb94094e84 100644 --- a/docs/adc_driver.md +++ b/docs/adc_driver.md @@ -22,7 +22,7 @@ Then place this include at the top of your code: ### AVR -|Channel|AT90USB64/128|ATmega16/32U4|ATmega32A|ATmega328P| +|Channel|AT90USB64/128|ATmega16/32U4|ATmega32A|ATmega328/P| |-------|-------------|-------------|---------|----------| |0 |`F0` |`F0` |`A0` |`C0` | |1 |`F1` |`F1` |`A1` |`C1` | @@ -39,7 +39,7 @@ Then place this include at the top of your code: |12 | |`B5` | | | |13 | |`B6` | | | -\* The ATmega328P possesses two extra ADC channels; however, they are not present on the DIP pinout, and are not shared with GPIO pins. You can use `adc_read()` directly to gain access to these. +\* The ATmega328/P possesses two extra ADC channels; however, they are not present on the DIP pinout, and are not shared with GPIO pins. You can use `adc_read()` directly to gain access to these. ### ARM diff --git a/docs/compatible_microcontrollers.md b/docs/compatible_microcontrollers.md index 85dd440d37b0..ac90ed7464fa 100644 --- a/docs/compatible_microcontrollers.md +++ b/docs/compatible_microcontrollers.md @@ -14,6 +14,7 @@ Certain MCUs which do not have native USB will use [V-USB](https://www.obdev.at/ * [ATmega32A](https://www.microchip.com/wwwproducts/en/ATmega32A) * [ATmega328P](https://www.microchip.com/wwwproducts/en/ATmega328P) +* [ATmega328](https://www.microchip.com/wwwproducts/en/ATmega328) ## ARM diff --git a/docs/feature_backlight.md b/docs/feature_backlight.md index 5f69468c349c..7e4401b40fc7 100644 --- a/docs/feature_backlight.md +++ b/docs/feature_backlight.md @@ -89,7 +89,7 @@ BACKLIGHT_DRIVER = pwm Hardware PWM is supported according to the following table: -|Backlight Pin|AT90USB64/128|ATmega16/32U4|ATmega16/32U2|ATmega32A|ATmega328P| +|Backlight Pin|AT90USB64/128|ATmega16/32U4|ATmega16/32U2|ATmega32A|ATmega328/P| |-------------|-------------|-------------|-------------|---------|----------| |`B1` | | | | |Timer 1 | |`B2` | | | | |Timer 1 | diff --git a/docs/spi_driver.md b/docs/spi_driver.md index c170bf1dfc71..1d432432ad1a 100644 --- a/docs/spi_driver.md +++ b/docs/spi_driver.md @@ -11,7 +11,7 @@ No special setup is required - just connect the `SS`, `SCK`, `MOSI` and `MISO` p |ATMega16/32U2/4|`B0`|`B1` |`B2` |`B3` | |AT90USB64/128 |`B0`|`B1` |`B2` |`B3` | |ATmega32A |`B4`|`B7` |`B5` |`B6` | -|ATmega328P |`B2`|`B5` |`B3` |`B4` | +|ATmega328/P |`B2`|`B5` |`B3` |`B4` | You may use more than one slave select pin, not just the `SS` pin. This is useful when you have multiple devices connected and need to communicate with them individually. `SPI_SS_PIN` can be passed to `spi_start()` to refer to `SS`. diff --git a/drivers/avr/analog.c b/drivers/avr/analog.c index abe478b7129d..9b8397b933f3 100644 --- a/drivers/avr/analog.c +++ b/drivers/avr/analog.c @@ -38,7 +38,7 @@ int16_t analogRead(uint8_t pin) { // clang-format on if (pin >= 12) return 0; return adc_read(pgm_read_byte(pin_to_mux + pin)); -#elif defined(__AVR_AT90USB646__) || defined(__AVR_AT90USB647__) || defined(__AVR_AT90USB1286__) || defined(__AVR_AT90USB1287__) || defined(__AVR_ATmega328P__) +#elif defined(__AVR_AT90USB646__) || defined(__AVR_AT90USB647__) || defined(__AVR_AT90USB1286__) || defined(__AVR_AT90USB1287__) || defined(__AVR_ATmega328P__) || defined(__AVR_ATmega328__) if (pin >= 8) return 0; return adc_read(pin); #else @@ -85,7 +85,7 @@ uint8_t pinToMux(pin_t pin) { case A6: return _BV(MUX2) | _BV(MUX1); // ADC6 case A7: return _BV(MUX2) | _BV(MUX1) | _BV(MUX0); // ADC7 default: return _BV(MUX4) | _BV(MUX3) | _BV(MUX2) | _BV(MUX1) | _BV(MUX0); // 0V -#elif defined(__AVR_ATmega328P__) +#elif defined(__AVR_ATmega328P__) || defined(__AVR_ATmega328__) case C0: return 0; // ADC0 case C1: return _BV(MUX0); // ADC1 case C2: return _BV(MUX1); // ADC2 diff --git a/drivers/avr/spi_master.c b/drivers/avr/spi_master.c index 32cc55c8361b..f91baf70baf1 100644 --- a/drivers/avr/spi_master.c +++ b/drivers/avr/spi_master.c @@ -28,7 +28,7 @@ # define SPI_SCK_PIN B7 # define SPI_MOSI_PIN B5 # define SPI_MISO_PIN B6 -#elif defined(__AVR_ATmega328P__) +#elif defined(__AVR_ATmega328P__) || defined(__AVR_ATmega328__) # define SPI_SCK_PIN B5 # define SPI_MOSI_PIN B3 # define SPI_MISO_PIN B4 diff --git a/drivers/avr/spi_master.h b/drivers/avr/spi_master.h index b69c1cbd66e3..e36a7c21c066 100644 --- a/drivers/avr/spi_master.h +++ b/drivers/avr/spi_master.h @@ -25,7 +25,7 @@ typedef int16_t spi_status_t; # define SPI_SS_PIN B0 #elif defined(__AVR_ATmega32A__) # define SPI_SS_PIN B4 -#elif defined(__AVR_ATmega328P__) +#elif defined(__AVR_ATmega328P__) || defined(__AVR_ATmega328__) # define SPI_SS_PIN B2 #endif diff --git a/quantum/backlight/backlight_avr.c b/quantum/backlight/backlight_avr.c index ce13f1118462..b3e882ffe128 100644 --- a/quantum/backlight/backlight_avr.c +++ b/quantum/backlight/backlight_avr.c @@ -103,7 +103,7 @@ # define COMxx1 COM1A1 # define OCRxx OCR1A # endif -#elif defined(__AVR_ATmega328P__) && (BACKLIGHT_PIN == B1 || BACKLIGHT_PIN == B2) +#elif (defined(__AVR_ATmega328P__) || defined(__AVR_ATmega328__)) && (BACKLIGHT_PIN == B1 || BACKLIGHT_PIN == B2) # define HARDWARE_PWM # define ICRx ICR1 # define TCCRxA TCCR1A diff --git a/quantum/config_common.h b/quantum/config_common.h index 9861c8678096..9b28e8d63f8c 100644 --- a/quantum/config_common.h +++ b/quantum/config_common.h @@ -58,7 +58,7 @@ # define PINC_ADDRESS 0x3 # define PINB_ADDRESS 0x6 # define PINA_ADDRESS 0x9 -# elif defined(__AVR_ATmega328P__) +# elif defined(__AVR_ATmega328P__) || defined(__AVR_ATmega328__) # define ADDRESS_BASE 0x00 # define PINB_ADDRESS 0x3 # define PINC_ADDRESS 0x6 diff --git a/quantum/mcu_selection.mk b/quantum/mcu_selection.mk index 33de162bb16d..a1d2c5fbf6f0 100644 --- a/quantum/mcu_selection.mk +++ b/quantum/mcu_selection.mk @@ -288,6 +288,24 @@ ifneq (,$(filter $(MCU),atmega328p)) NO_SUSPEND_POWER_DOWN ?= yes endif +ifneq (,$(filter $(MCU),atmega328)) + # MCU name for avrdude + AVRDUDE_MCU = m328 + + PROTOCOL = VUSB + + # 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. + F_CPU ?= 16000000 + + # unsupported features for now + NO_UART ?= yes + NO_SUSPEND_POWER_DOWN ?= yes +endif + ifneq (,$(filter $(MCU),attiny85)) PROTOCOL = VUSB diff --git a/tmk_core/common/avr/bootloader.c b/tmk_core/common/avr/bootloader.c index 7e5d2b057941..a1db55da934e 100644 --- a/tmk_core/common/avr/bootloader.c +++ b/tmk_core/common/avr/bootloader.c @@ -247,7 +247,7 @@ void bootloader_jump(void) { #else // Assume remaining boards are DFU, even if the flag isn't set -# if !(defined(__AVR_ATmega32A__) || defined(__AVR_ATmega328P__) || defined(__AVR_ATtiny85__)) // no USB - maybe BOOTLOADER_BOOTLOADHID instead though? +# if !(defined(__AVR_ATmega32A__) || defined(__AVR_ATmega328P__) || defined(__AVR_ATmega328__) || defined(__AVR_ATtiny85__)) // no USB - maybe BOOTLOADER_BOOTLOADHID instead though? UDCON = 1; USBCON = (1 << FRZCLK); // disable USB UCSR1B = 0; diff --git a/tmk_core/common/uart.c b/tmk_core/common/uart.c index b29d3bbb9413..150e256c8f2f 100644 --- a/tmk_core/common/uart.c +++ b/tmk_core/common/uart.c @@ -31,7 +31,7 @@ #include "uart.h" -#if defined(__AVR_ATmega168__) || defined(__AVR_ATmega168P__) || defined(__AVR_ATmega328P__) +#if defined(__AVR_ATmega168__) || defined(__AVR_ATmega168P__) || defined(__AVR_ATmega328P__) || defined(__AVR_ATmega328__) # define UDRn UDR0 # define UBRRnL UBRR0L # define UCSRnA UCSR0A From 263536586daebcf09d31ab78a623da9366ebf7f7 Mon Sep 17 00:00:00 2001 From: Keebz Dot Net <64744703+keebzdotnet@users.noreply.github.com> Date: Wed, 10 Jun 2020 14:32:03 -0700 Subject: [PATCH 127/930] [Keyboard] Wazowski 23-19 PCB Support (#9198) Co-authored-by: Joel Challis Co-authored-by: Ryan Co-authored-by: Chris Figueroa --- keyboards/keebzdotnet/wazowski/config.h | 223 ++++++++++++++++++ keyboards/keebzdotnet/wazowski/info.json | 27 +++ .../wazowski/keymaps/default/keymap.c | 30 +++ .../wazowski/keymaps/default/readme.md | 1 + keyboards/keebzdotnet/wazowski/readme.md | 15 ++ keyboards/keebzdotnet/wazowski/rules.mk | 31 +++ keyboards/keebzdotnet/wazowski/wazowski.c | 17 ++ keyboards/keebzdotnet/wazowski/wazowski.h | 38 +++ 8 files changed, 382 insertions(+) create mode 100644 keyboards/keebzdotnet/wazowski/config.h create mode 100644 keyboards/keebzdotnet/wazowski/info.json create mode 100644 keyboards/keebzdotnet/wazowski/keymaps/default/keymap.c create mode 100644 keyboards/keebzdotnet/wazowski/keymaps/default/readme.md create mode 100644 keyboards/keebzdotnet/wazowski/readme.md create mode 100644 keyboards/keebzdotnet/wazowski/rules.mk create mode 100644 keyboards/keebzdotnet/wazowski/wazowski.c create mode 100644 keyboards/keebzdotnet/wazowski/wazowski.h diff --git a/keyboards/keebzdotnet/wazowski/config.h b/keyboards/keebzdotnet/wazowski/config.h new file mode 100644 index 000000000000..56f05515af0e --- /dev/null +++ b/keyboards/keebzdotnet/wazowski/config.h @@ -0,0 +1,223 @@ +/* +Copyright 2020 keebzdotnet + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License 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 0x53FC +#define DEVICE_VER 0x0001 +#define MANUFACTURER keebzdotnet +#define PRODUCT wazowski 23-19 +#define DESCRIPTION A modern keyboard from an animated monster movie keyboard + +/* key matrix size */ +#define MATRIX_ROWS 3 +#define MATRIX_COLS 5 + +/* + * 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 } +#define MATRIX_COL_PINS { F7, B1, B3, B2, B6 } +#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 */ +#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 0 diff --git a/keyboards/keebzdotnet/wazowski/info.json b/keyboards/keebzdotnet/wazowski/info.json new file mode 100644 index 000000000000..26d0da54b299 --- /dev/null +++ b/keyboards/keebzdotnet/wazowski/info.json @@ -0,0 +1,27 @@ +{ + "keyboard_name": "wazowski", + "url": "", + "maintainer": "keebzdotnet", + "width": 9, + "height": 5, + "layouts": { + "LAYOUT": { + "layout": [ + {"label":"k00", "x":0, "y":3}, + {"label":"k01", "x":1, "y":0}, + {"label":"k02", "x":1, "y":4}, + {"label":"k03", "x":2, "y":3}, + {"label":"k04", "x":3, "y":2}, + {"label":"k05", "x":3, "y":4}, + {"label":"k06", "x":4, "y":2}, + {"label":"k07", "x":4, "y":3}, + {"label":"k08", "x":5, "y":2}, + {"label":"k09", "x":5, "y":3}, + {"label":"k10", "x":6, "y":2}, + {"label":"k11", "x":7, "y":1}, + {"label":"k12", "x":7, "y":3}, + {"label":"k13", "x":8, "y":2} + ] + } + } +} diff --git a/keyboards/keebzdotnet/wazowski/keymaps/default/keymap.c b/keyboards/keebzdotnet/wazowski/keymaps/default/keymap.c new file mode 100644 index 000000000000..2d042443baf4 --- /dev/null +++ b/keyboards/keebzdotnet/wazowski/keymaps/default/keymap.c @@ -0,0 +1,30 @@ +/* Copyright 2020 keebzdotnet + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public 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 +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* Base */ + [_BASE] = LAYOUT( + 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 + ), +}; diff --git a/keyboards/keebzdotnet/wazowski/keymaps/default/readme.md b/keyboards/keebzdotnet/wazowski/keymaps/default/readme.md new file mode 100644 index 000000000000..435ccad319b6 --- /dev/null +++ b/keyboards/keebzdotnet/wazowski/keymaps/default/readme.md @@ -0,0 +1 @@ +# The default keymap for wazowski diff --git a/keyboards/keebzdotnet/wazowski/readme.md b/keyboards/keebzdotnet/wazowski/readme.md new file mode 100644 index 000000000000..553b6e938bc8 --- /dev/null +++ b/keyboards/keebzdotnet/wazowski/readme.md @@ -0,0 +1,15 @@ +# wazowski 23-19 + +![wazowski 23-19](https://i.imgur.com/fzHzqKI.jpg) + +There once was a r/mech post that showed a horrible keyboard from Monster Inc. This is a modernized version of it + +* Keyboard Maintainer: [keebzdotnet](https://github.com/keebzdotnet) +* Hardware Supported: Wazowski 23-19 PCB +* Hardware Availability: https://www.keebz.net/shop/wazoski-pcb + +Make example for this keyboard (after setting up your build environment): + + make keebzdotnet/wazowski: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/keebzdotnet/wazowski/rules.mk b/keyboards/keebzdotnet/wazowski/rules.mk new file mode 100644 index 000000000000..b8ce67b680ea --- /dev/null +++ b/keyboards/keebzdotnet/wazowski/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 = 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 = 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 +FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches diff --git a/keyboards/keebzdotnet/wazowski/wazowski.c b/keyboards/keebzdotnet/wazowski/wazowski.c new file mode 100644 index 000000000000..d4d6119ae5e9 --- /dev/null +++ b/keyboards/keebzdotnet/wazowski/wazowski.c @@ -0,0 +1,17 @@ +/* Copyright 2020 keebzdotnet + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#include "wazowski.h" diff --git a/keyboards/keebzdotnet/wazowski/wazowski.h b/keyboards/keebzdotnet/wazowski/wazowski.h new file mode 100644 index 000000000000..98af75a0e8b7 --- /dev/null +++ b/keyboards/keebzdotnet/wazowski/wazowski.h @@ -0,0 +1,38 @@ +/* Copyright 2020 keebzdotnet + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License 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, \ + k10, k11, k12, k13 \ +) \ +{ \ + { k00, k01, k02, k03, k04 }, \ + { k05, k06, k07, k08, k09 }, \ + { k10, k11, KC_NO, k12, k13 } \ +} From 7e8dc2e570e21a018b3cfdf860ef03dd8d2a20f3 Mon Sep 17 00:00:00 2001 From: elmo-space Date: Wed, 10 Jun 2020 23:33:26 +0200 Subject: [PATCH 128/930] [Keymap] Add dual layer keymap for xd002 macropad (#9222) Co-authored-by: Joel Challis Co-authored-by: Drashna Jaelre --- .../xd002/keymaps/multilayer_rgb/config.h | 22 +++ .../xd002/keymaps/multilayer_rgb/keymap.c | 173 ++++++++++++++++++ .../xd002/keymaps/multilayer_rgb/rgblite.h | 9 + .../xd002/keymaps/multilayer_rgb/rules.mk | 2 + 4 files changed, 206 insertions(+) create mode 100644 keyboards/xd002/keymaps/multilayer_rgb/config.h create mode 100644 keyboards/xd002/keymaps/multilayer_rgb/keymap.c create mode 100644 keyboards/xd002/keymaps/multilayer_rgb/rgblite.h create mode 100644 keyboards/xd002/keymaps/multilayer_rgb/rules.mk diff --git a/keyboards/xd002/keymaps/multilayer_rgb/config.h b/keyboards/xd002/keymaps/multilayer_rgb/config.h new file mode 100644 index 000000000000..f478baf3b37e --- /dev/null +++ b/keyboards/xd002/keymaps/multilayer_rgb/config.h @@ -0,0 +1,22 @@ +/* Copyright 2020 elmo-space + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#pragma once + +/*enable layers*/ +#undef NO_ACTION_LAYER + +/* increase tap duration (spotify doesn't like very short taps)*/ +#define TAP_CODE_DELAY 100 diff --git a/keyboards/xd002/keymaps/multilayer_rgb/keymap.c b/keyboards/xd002/keymaps/multilayer_rgb/keymap.c new file mode 100644 index 000000000000..01a96119e58c --- /dev/null +++ b/keyboards/xd002/keymaps/multilayer_rgb/keymap.c @@ -0,0 +1,173 @@ +/* Copyright 2020 elmo-space + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public 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 "rgblite.h" + +// Defines names for use in layer keycodes and the keymap +enum layer_names { + _BASE, + _FUNC, +}; + +// set your keycodes here +#define layer1_left KC_PAUS +#define layer1_right KC_MPLY +#define layer2_left KC_MPRV +#define layer2_right KC_MNXT + + +enum custom_keycodes { + LEFT1 = SAFE_RANGE, + RIGHT1, + LEFT2, + RIGHT2 +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_BASE] = LAYOUT( + LEFT1, RIGHT1 + ), + [_FUNC] = LAYOUT( + LEFT2, RIGHT2 + ) +}; + +static bool key1_down = false; +static bool key2_down = false; +static char layer_switched = 0; // this prevents the individual keys getting triggered after a layerchange + +bool process_record_user(uint16_t keycode, keyrecord_t *record) +{ + switch (keycode) + { + case LEFT1: + if (record->event.pressed) + { + if (key2_down) + { + layer_on(1); + layer_switched = 2; + return false; + break; + } + key1_down = true; + } + else { + if (layer_switched > 0) { + --layer_switched; + key1_down = false; + } + else { + tap_code(layer1_left); + key1_down = false; + } + } + return false; + break; + case RIGHT1: + if (record->event.pressed) + { + if (key1_down) + { + layer_on(1); + layer_switched = 2; + return false; + break; + } + key2_down = true; + } + else { + if (layer_switched > 0) { + --layer_switched; + key2_down = false; + } + else { + tap_code(layer1_right); + key2_down = false; + } + } + return false; + break; + case LEFT2: + if (record->event.pressed) + { + if (key2_down) + { + layer_off(1); + layer_switched = 2; + return false; + break; + } + key1_down = true; + } + else { + if (layer_switched > 0) { + --layer_switched; + key1_down = false; + } + else { + tap_code(layer2_left); + key1_down = false; + } + } + return false; + break; + case RIGHT2: + if (record->event.pressed) + { + if (key1_down) + { + layer_off(1); + layer_switched = 2; + return false; + break; + } + key2_down = true; + } + else { + if (layer_switched > 0) { + --layer_switched; + key2_down = false; + } + else { + tap_code(layer2_right); + key2_down = false; + } + } + return false; + break; + } + return true; +}; + +// layer colors +layer_state_t layer_state_set_user(layer_state_t state) { + switch (get_highest_layer(state)) { + case _FUNC: + rgblight_setrgb_red(); + break; + default: // for any other layers, or the default layer + rgblight_setrgb_green(); + break; + } + return state; +} + +// default color +void keyboard_post_init_user(void) { + rgblight_setrgb_green(); +} diff --git a/keyboards/xd002/keymaps/multilayer_rgb/rgblite.h b/keyboards/xd002/keymaps/multilayer_rgb/rgblite.h new file mode 100644 index 000000000000..ddc61d5f4341 --- /dev/null +++ b/keyboards/xd002/keymaps/multilayer_rgb/rgblite.h @@ -0,0 +1,9 @@ +#pragma once + +#include "ws2812.h" +#include "rgblight_list.h" + +static inline void rgblight_setrgb(uint8_t _r, uint8_t _g, uint8_t _b) { + LED_TYPE leds[RGBLED_NUM] = {{.r = _r, .g = _g, .b = _b}, {.r = _r, .g = _g, .b = _b}}; + ws2812_setleds(leds, RGBLED_NUM); +} diff --git a/keyboards/xd002/keymaps/multilayer_rgb/rules.mk b/keyboards/xd002/keymaps/multilayer_rgb/rules.mk new file mode 100644 index 000000000000..69d592aa4bbb --- /dev/null +++ b/keyboards/xd002/keymaps/multilayer_rgb/rules.mk @@ -0,0 +1,2 @@ +SRC += ws2812.c +EXTRAKEY_ENABLE = yes From 09fc6cab343dee74cf39db52b9371156abc6ec1e Mon Sep 17 00:00:00 2001 From: yfuku <30647434+yfuku@users.noreply.github.com> Date: Thu, 11 Jun 2020 06:38:11 +0900 Subject: [PATCH 129/930] Add bat43 rev2 (#9319) * add rev2 * Update keyboards/bat43/rev1/rules.mk Co-authored-by: Ryan * Update keyboards/bat43/rev2/rules.mk Co-authored-by: Ryan Co-authored-by: Ryan --- keyboards/bat43/bat43.h | 50 +++----------------- keyboards/bat43/{ => rev1}/info.json | 0 keyboards/bat43/rev1/rev1.c | 17 +++++++ keyboards/bat43/rev1/rev1.h | 46 ++++++++++++++++++ keyboards/bat43/rev1/rules.mk | 1 + keyboards/bat43/rev2/info.json | 71 ++++++++++++++++++++++++++++ keyboards/bat43/rev2/rev2.c | 17 +++++++ keyboards/bat43/rev2/rev2.h | 46 ++++++++++++++++++ keyboards/bat43/rev2/rules.mk | 1 + keyboards/bat43/rules.mk | 2 + 10 files changed, 208 insertions(+), 43 deletions(-) rename keyboards/bat43/{ => rev1}/info.json (100%) create mode 100644 keyboards/bat43/rev1/rev1.c create mode 100644 keyboards/bat43/rev1/rev1.h create mode 100644 keyboards/bat43/rev1/rules.mk create mode 100644 keyboards/bat43/rev2/info.json create mode 100644 keyboards/bat43/rev2/rev2.c create mode 100644 keyboards/bat43/rev2/rev2.h create mode 100644 keyboards/bat43/rev2/rules.mk diff --git a/keyboards/bat43/bat43.h b/keyboards/bat43/bat43.h index cf21486a9e54..42d44107b4ab 100644 --- a/keyboards/bat43/bat43.h +++ b/keyboards/bat43/bat43.h @@ -1,46 +1,10 @@ -/* Copyright 2020 yfuku - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License 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. - */ +#ifdef KEYBOARD_bat43_rev1 + #include "rev1.h" +#endif +#ifdef KEYBOARD_bat43_rev2 + #include "rev2.h" +#endif - -#define LAYOUT( \ - k00, k01, k02, k03, k04, k05, k40, k41, k42, k43, k44, k45, \ - k10, k11, k12, k13, k14, k15, k30, k50, k51, k52, k53, k54, k55, \ - k20, k21, k22, k23, k24, k25, k60, k61, k62, k63, k64, k65, \ - k33, k34, k35, k70, k71, k72, \ - k74, k75, k73, k31, k32 \ -) { \ - { 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 }, \ -} +#include "quantum.h" diff --git a/keyboards/bat43/info.json b/keyboards/bat43/rev1/info.json similarity index 100% rename from keyboards/bat43/info.json rename to keyboards/bat43/rev1/info.json diff --git a/keyboards/bat43/rev1/rev1.c b/keyboards/bat43/rev1/rev1.c new file mode 100644 index 000000000000..cff7598740b1 --- /dev/null +++ b/keyboards/bat43/rev1/rev1.c @@ -0,0 +1,17 @@ +/* Copyright 2020 yfuku + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public 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/bat43/rev1/rev1.h b/keyboards/bat43/rev1/rev1.h new file mode 100644 index 000000000000..cf21486a9e54 --- /dev/null +++ b/keyboards/bat43/rev1/rev1.h @@ -0,0 +1,46 @@ +/* Copyright 2020 yfuku + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License 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, k40, k41, k42, k43, k44, k45, \ + k10, k11, k12, k13, k14, k15, k30, k50, k51, k52, k53, k54, k55, \ + k20, k21, k22, k23, k24, k25, k60, k61, k62, k63, k64, k65, \ + k33, k34, k35, k70, k71, k72, \ + k74, k75, k73, k31, k32 \ +) { \ + { 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/bat43/rev1/rules.mk b/keyboards/bat43/rev1/rules.mk new file mode 100644 index 000000000000..8b137891791f --- /dev/null +++ b/keyboards/bat43/rev1/rules.mk @@ -0,0 +1 @@ + diff --git a/keyboards/bat43/rev2/info.json b/keyboards/bat43/rev2/info.json new file mode 100644 index 000000000000..e1a6c8607cda --- /dev/null +++ b/keyboards/bat43/rev2/info.json @@ -0,0 +1,71 @@ +{ + "keyboard_name": "bat43", + "url": "", + "maintainer": "yfuku", + "width": 15, + "height": 5.1, + "layouts": { + "LAYOUT": { + "layout": [ + {"label":"k00", "x":0, "y":1.43}, + {"label":"k01", "x":1, "y":1.11}, + {"label":"k02", "x":2, "y":0.38}, + {"label":"k03", "x":3, "y":0}, + {"label":"k04", "x":4, "y":0.05}, + {"label":"k05", "x":5, "y":0.16}, + + {"label":"k40", "x":9, "y":0.16}, + {"label":"k41", "x":10, "y":0.05}, + {"label":"k42", "x":11, "y":0}, + {"label":"k43", "x":12, "y":0.38}, + {"label":"k44", "x":13, "y":1.11}, + {"label":"k45", "x":14, "y":1.43}, + + {"label":"k10", "x":0, "y":2.43}, + {"label":"k11", "x":1, "y":2.11}, + {"label":"k12", "x":2, "y":1.38}, + {"label":"k13", "x":3, "y":1}, + {"label":"k14", "x":4, "y":1.05}, + {"label":"k15", "x":5, "y":1.16}, + + {"label":"k30", "x":7, "y":1.16}, + + {"label":"k50", "x":9, "y":1.16}, + {"label":"k51", "x":10, "y":1.05}, + {"label":"k52", "x":11, "y":1}, + {"label":"k53", "x":12, "y":1.38}, + {"label":"k54", "x":13, "y":2.11}, + {"label":"k55", "x":14, "y":2.43}, + + {"label":"k20", "x":0, "y":3.43}, + {"label":"k21", "x":1, "y":3.11}, + {"label":"k22", "x":2, "y":2.38}, + {"label":"k23", "x":3, "y":2}, + {"label":"k24", "x":4, "y":2.05}, + {"label":"k25", "x":5, "y":2.16}, + + {"label":"k60", "x":9, "y":2.16}, + {"label":"k61", "x":10, "y":2.05}, + {"label":"k62", "x":11, "y":2}, + {"label":"k63", "x":12, "y":2.38}, + {"label":"k64", "x":13, "y":3.11}, + {"label":"k65", "x":14, "y":3.43}, + + {"label":"k33", "x":4, "y":3.3}, + {"label":"k34", "x":5, "y":3.3}, + {"label":"k35", "x":6, "y":3.3}, + + {"label":"k70", "x":8, "y":3.3}, + {"label":"k71", "x":9, "y":3.3}, + {"label":"k72", "x":10, "y":3.3}, + + {"label":"k75", "x":5.1, "y":4.3, "w":0.8, "h":0.8}, + {"label":"k74", "x":6.1, "y":4.3, "w":0.8, "h":0.8}, + + {"label":"k73", "x":8.1, "y":4.3, "w":0.8, "h":0.8}, + {"label":"k31", "x":9.1, "y":4.3, "w":0.8, "h":0.8}, + {"label":"k32", "x":10.1, "y":4.3, "w":0.8, "h":0.8} + ] + } + } +} diff --git a/keyboards/bat43/rev2/rev2.c b/keyboards/bat43/rev2/rev2.c new file mode 100644 index 000000000000..cffc0acd32be --- /dev/null +++ b/keyboards/bat43/rev2/rev2.c @@ -0,0 +1,17 @@ +/* Copyright 2020 yfuku + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#include "rev2.h" diff --git a/keyboards/bat43/rev2/rev2.h b/keyboards/bat43/rev2/rev2.h new file mode 100644 index 000000000000..f84cdbaa4d42 --- /dev/null +++ b/keyboards/bat43/rev2/rev2.h @@ -0,0 +1,46 @@ +/* Copyright 2020 yfuku + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License 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, k40, k41, k42, k43, k44, k45, \ + k10, k11, k12, k13, k14, k15, k30, k50, k51, k52, k53, k54, k55, \ + k20, k21, k22, k23, k24, k25, k60, k61, k62, k63, k64, k65, \ + k33, k34, k35, k70, k71, k72, \ + k75, k74, k73, k31, k32 \ +) { \ + { 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/bat43/rev2/rules.mk b/keyboards/bat43/rev2/rules.mk new file mode 100644 index 000000000000..8b137891791f --- /dev/null +++ b/keyboards/bat43/rev2/rules.mk @@ -0,0 +1 @@ + diff --git a/keyboards/bat43/rules.mk b/keyboards/bat43/rules.mk index 70400b5d0d42..cc29455e3f30 100644 --- a/keyboards/bat43/rules.mk +++ b/keyboards/bat43/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 + +DEFAULT_FOLDER = bat43/rev2 From 8640b432148d44bc54ebabbc8be42b22b91a3ec4 Mon Sep 17 00:00:00 2001 From: James Incandenza <64759429+j-inc@users.noreply.github.com> Date: Wed, 10 Jun 2020 17:39:07 -0400 Subject: [PATCH 130/930] [Keymap] WPM-responsive OLED animation in personal keymap (#9264) Using the wpm feature, I create a responsive OLED animation that changes based on how fast the user types. As written there are three phases (It's bongo cat!) but can easily be reconfigured and replaced with other images. Multiple byte arrays consume considerable space so choose your usage wisely. When customized, the smaller the byte array used, the better, due to space limitations on most microcontrollers. I made this with no prior knowledge of C, so I'm looking forward to any and all suggested improvements. Credit is owed to obosob for laying the foundation for this little script as well to /u/pixelbenny for graciously providing the bongocat artwork I adapted for the animation. The config.h includes a tweak to the Kyria's LED mapping, so that the order now reflects their physical positions, making animations smoother. Co-authored-by: Ryan Co-authored-by: Drashna Jaelre Co-authored-by: Simon Schuster Co-authored-by: James Incandenza --- keyboards/kyria/keymaps/j-inc/config.h | 45 +++ keyboards/kyria/keymaps/j-inc/keymap.c | 369 +++++++++++++++++++++++++ keyboards/kyria/keymaps/j-inc/rules.mk | 18 ++ 3 files changed, 432 insertions(+) create mode 100644 keyboards/kyria/keymaps/j-inc/config.h create mode 100644 keyboards/kyria/keymaps/j-inc/keymap.c create mode 100644 keyboards/kyria/keymaps/j-inc/rules.mk diff --git a/keyboards/kyria/keymaps/j-inc/config.h b/keyboards/kyria/keymaps/j-inc/config.h new file mode 100644 index 000000000000..833fbe4bd9b0 --- /dev/null +++ b/keyboards/kyria/keymaps/j-inc/config.h @@ -0,0 +1,45 @@ +/* Copyright 2019 Thomas Baart + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#pragma once + +#ifdef OLED_DRIVER_ENABLE + #define OLED_DISPLAY_128X64 + #define OLED_TIMEOUT 300000 +#endif + +// If you are using an Elite C rev3 on the slave side, uncomment the lines below: +#define SPLIT_USB_DETECT +#define NO_USB_STARTUP_CHECK +#define SPLIT_USB_TIMEOUT 1000 + +#define MASTER_RIGHT +#define ENCODER_DIRECTION_FLIP + + +#define NO_ACTION_MACRO +#define NO_ACTION_FUNCTION +#define NO_ACTION_ONESHOT +#define OLED_FONT_END 127 + + +#ifdef RGBLIGHT_ENABLE + #define RGBLIGHT_LED_MAP {0,1,2,9,8,7,4,3,5,6,19,18,17,10,11,12,15,16,14,13} // Orients Kyria LEDs to a circle around both halves. + //#define RBGLIGHT_LED_MAP {9,8,6,7,5,3,2,4,1,0,10,12,13,11,14,16,17,15,18,19} // Orients Kyria LEDs for a left half-right half columnar progression. + #define RGBLIGHT_EFFECT_RAINBOW_SWIRL + //#define RGBLIGHT_EFFECT_STATIC_GRADIENT + #define RGBLIGHT_SLEEP +#endif diff --git a/keyboards/kyria/keymaps/j-inc/keymap.c b/keyboards/kyria/keymaps/j-inc/keymap.c new file mode 100644 index 000000000000..77f9d442d3c8 --- /dev/null +++ b/keyboards/kyria/keymaps/j-inc/keymap.c @@ -0,0 +1,369 @@ +/* Copyright 2019 Thomas Baart + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public 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 +bool is_alt_tab_active = false; +uint16_t alt_tab_timer = 0; + +char wpm_str[10]; + +enum layers { + _QWERTY, + _2WERTY, //pronounced "twerty," obviously + _LOWER, + _RAISE, + _ADJUST, +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +/* + * Base Layer: QWERTY + * + * ,-------------------------------------------. ,-------------------------------------------. + * |RAIS/ESC| Q | W | E | R | T | | Y | U | I | O | P | BKSP | + * |--------+------+------+------+------+------| |------+------+------+------+------+--------| + * |Tab | A | S | D | F | G | | H | J | K | L | ; : | ' " | + * |--------+------+------+------+------+------+-------------. ,-------------+------+------+------+------+------+--------| + * | CTRL | Z | X | C | V | B |Enter |Ctrl | |Ctrl |(2u) | N | M | , < | . > | / ? | - _ | + * `----------------------+------+------+------+------+------| |------+------+------+------+------+----------------------' + * | TG(1)| Alt | Win | Shift| Back | | Enter| Space| Win | Alt |TG(3) | + * | | | | Lower| space| | Lower| Raise| | | | + * `----------------------------------' `----------------------------------' + */ + [_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, + 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_ENT, KC_LCTL, KC_RCTL, _______, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_MINS, + TG(1), KC_LALT, KC_LGUI, KC_LSFT, KC_BSPC, LT(3, KC_ENT), LT(2, KC_SPC), KC_RGUI, KC_RALT, TG(2) + ), +/* + * This layer exists to change encoder functions. + * + * ,-------------------------------------------. ,-------------------------------------------. + * | | | | | | | | | | | | | | + * |--------+------+------+------+------+------| |------+------+------+------+------+--------| + * | | | | | | | | | | | | | | + * |--------+------+------+------+------+------+-------------. ,-------------+------+------+------+------+------+--------| + * | | | | | | | | | | | | | | | | | | + * `----------------------+------+------+------+------+------| |------+------+------+------+------+----------------------' + * | | | | | | | | | | | | + * | | | | | | | | | | | | + * `----------------------------------' `----------------------------------' + */ + [_2WERTY] = LAYOUT( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + KC_TRNS, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), +/* + * Lower Layer: numpad and arrow + * + * ,-------------------------------------------. ,-------------------------------------------. + * | | | 7 | 8 | 9 | 0 | | PGUP | | UP | | | Del + | + * |--------+------+------+------+------+------| |------+------+------+------+------+--------| + * | CAPS | | 4 | 5 | 6 | Tab | | PGDN | Left | Down | Right| | | + * |--------+------+------+------+------+------+-------------. ,-------------+------+------+------+------+------+--------| + * | | | 1 | 2 | 3 | Ent | | | | | | | LBRC | RBRC | | |\ | += | + * `----------------------+------+------+------+------+------| |------+------+------+------+------+----------------------' + * | | Tab | Ent | | | | | | | | | + * | | | | | | | | | | | | + * `----------------------------------' `----------------------------------' + */ + [_LOWER] = LAYOUT( + _______, _______, KC_7, KC_8, KC_9, KC_0, KC_PGUP, _______, KC_UP, _______, _______, KC_DEL, + KC_CAPS, _______, KC_4, KC_5, KC_6, KC_TAB, KC_PGDN, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, + KC_LSFT, KC_0, KC_1, KC_2, KC_3, KC_ENT, KC_TRNS, KC_TRNS, MO(4), _______, KC_LBRC, KC_RBRC, _______, _______, KC_BSLS, KC_EQL, + KC_TRNS, KC_TAB, KC_ENT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, _______, _______, _______ + ), +/* + * Raise Layer: F keys and media + * + * ,-------------------------------------------. ,-------------------------------------------. + * | | | | | | | | F9 | F10 | F11 | F12 | | | + * |--------+------+------+------+------+------| |------+------+------+------+------+--------| + * | | | Prev | Play | Next | VolUp| | F5 | F6 | F7 | F8 | | | + * |--------+------+------+------+------+------+-------------. ,-------------+------+------+------+------+------+--------| + * | | | | | Mute | VolDn| | | | | | F1 | F2 | F3 | F4 | | | + * `----------------------+------+------+------+------+------| |------+------+------+------+------+----------------------' + * | | | | | | | | | | | | + * | | | | | | | | | | | | + * `----------------------------------' `----------------------------------' + */ + [_RAISE] = LAYOUT( + _______, _______, _______, _______, _______, _______, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______, + _______, _______, KC_MPRV, KC_MPLY, KC_MNXT, KC_VOLU, KC_F5, KC_F6, KC_F7, KC_F8, _______, _______, + _______, _______, _______, _______, KC_MUTE, KC_VOLD, _______, _______, _______, _______, KC_F1, KC_F2, KC_F3, KC_F4, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_TRNS + ), +/* + * Adjust Layer: Function keys, RGB + * + * ,-------------------------------------------. ,-------------------------------------------. + * | | F1 | F2 | F3 | F4 | F5 | | F6 | F7 | F8 | F9 | F10 | | + * |--------+------+------+------+------+------| |------+------+------+------+------+--------| + * | | VAI | SAI | HUI | SPI | MOD | | | | | F11 | F12 | | + * |--------+------+------+------+------+------+-------------. ,-------------+------+------+------+------+------+--------| + * | | VID | SAD | HUD | SPD | RMOD | | | | | | | | | | | | + * `----------------------+------+------+------+------+------| |------+------+------+------+------+----------------------' + * | | | | | | | | | | | | + * | | | | | | | | | | | | + * `----------------------------------' `----------------------------------' + */ + [_ADJUST] = LAYOUT( + _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, _______, + RGB_TOG, RGB_VAI, RGB_SAI, RGB_HUI, RGB_SPI, RGB_MOD, _______, _______, _______, KC_F11, KC_F12, _______, + _______, RGB_VAD, RGB_SAD, RGB_HUD, RGB_SPD, RGB_RMOD,_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + KC_TRNS, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), +// /* +// * Layer template +// * +// * ,-------------------------------------------. ,-------------------------------------------. +// * | | | | | | | | | | | | | | +// * |--------+------+------+------+------+------| |------+------+------+------+------+--------| +// * | | | | | | | | | | | | | | +// * |--------+------+------+------+------+------+-------------. ,-------------+------+------+------+------+------+--------| +// * | | | | | | | | | | | | | | | | | | +// * `----------------------+------+------+------+------+------| |------+------+------+------+------+----------------------' +// * | | | | | | | | | | | | +// * | | | | | | | | | | | | +// * `----------------------------------' `----------------------------------' +// */ +// [_LAYERINDEX] = LAYOUT( +// _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, +// _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, +// _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, +// _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ +// ), +}; + +layer_state_t layer_state_set_user(layer_state_t state) { + return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST); +} + +#ifdef OLED_DRIVER_ENABLE + +oled_rotation_t oled_init_user(oled_rotation_t rotation) { + return OLED_ROTATION_180; +} + +static void render_status(void) { + // Host Keyboard Layer Status + oled_write_P(PSTR("Layer: "), false); + switch (get_highest_layer(layer_state)) { + case _QWERTY: + oled_write_P(PSTR("QWERTY"), false); + break; + case _2WERTY: + oled_write_P(PSTR("2WERTY"), false); + break; + case _LOWER: + oled_write_P(PSTR("Numpad"), false); + break; + case _RAISE: + oled_write_P(PSTR("F Keys"), false); + break; + case _ADJUST: + oled_write_P(PSTR("RGB "), false); + break; + default: + oled_write_P(PSTR("Undefined"), false); + } + + //Host Keyboard LED Status + led_t led_state = host_keyboard_led_state(); + oled_write_P(led_state.num_lock ? PSTR("NUM ") : PSTR(" "), false); + oled_write_P(led_state.caps_lock ? PSTR("CAPS ") : PSTR(" "), false); + oled_write_P(led_state.scroll_lock ? PSTR("SCRL") : PSTR(" "), false); +} + + +// WPM-responsive animation stuff here +#define IDLE_FRAMES 5 +#define IDLE_SPEED 40 // below this wpm value your animation will idle + +// #define PREP_FRAMES 1 // uncomment if >1 + +#define TAP_FRAMES 2 +#define TAP_SPEED 60 // above this wpm value typing animation to triggere + +#define ANIM_FRAME_DURATION 200 // how long each frame lasts in ms +// #define SLEEP_TIMER 60000 // should sleep after this period of 0 wpm, needs fixing +#define ANIM_SIZE 636 // number of bytes in array, minimize for adequate firmware size, max is 1024 + +uint32_t anim_timer = 0; +uint32_t anim_sleep = 0; +uint8_t current_idle_frame = 0; +// uint8_t current_prep_frame = 0; // uncomment if PREP_FRAMES >1 +uint8_t current_tap_frame = 0; + +// Images credit j-inc(/James Incandenza) and pixelbenny. Credit to obosob for initial animation approach. +static void render_anim(void) { + static const char PROGMEM idle[IDLE_FRAMES][ANIM_SIZE] = { + { + 0, 0,126,126, 24, 60,102, 66, 0, 12, 28,112,112, 28, 12, 0,116,116, 20, 20,124,104, 0,124,124, 0,112,120, 44, 36,124,124,0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 64, 64, 32, 32, 32, 32, 16, 16, 16, 16, 16, 8, 8, 4, 4, 4, 8, 48, 64,128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128,128,128, + 0, 0, 0, 0,192, 96, 48, 24, 12,132,198, 98, 35, 51, 17,145,113,241,113,145, 17, 51, 35, 98,198,132, 12, 24, 48, 96,192, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 24,100,130, 2, 2, 2, 2, 2, 1, 0, 0, 0, 0,128,128, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 0, 48, 48, 0,192,193,193,194, 4, 8, 16, 32, 64,128, 0, 0, 0,128,128,128,128, 64, 64, 64, 64, 32, 32, 32, 32, 16, 16, 16, 16, 8, 8, 8, 8, 8,196, 4,196, 4,196, 2,194, 2,194, 1, 1, 1, 1, 0, 0, 0, + 0, 0,252, 15, 1, 0,248, 14, 31,109,140,148,148,164,166,249,224,255,224,249,166,164,148,148,140,109, 31, 14,248, 0, 1, 15,252, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,192, 56, 4, 3, 0, 0, 0, 0, 0, 0, 0, 12, 12, 12, 13, 1, 0, 64,160, 33, 34, 18, 17, 17, 17, 9, 8, 8, 8, 8, 4, 4, 8, 8, 16, 16, 16, 16, 16, 17, 15, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,170,170,255,255,195,191,127, 3,127,191,195,255,255,170,170, 0, 0, 0, 0, + 0, 0, 31,120,192, 0, 15, 56,124,219,152, 20, 20, 18, 50,207, 3,255, 3,207, 50, 18, 20, 20,152,219,124, 56, 15, 0,192,120, 31, 16, 16, 16, 16, 8, 8, 8, 8, 8, 4, 4, 4, 4, 4, 2, 3, 2, 2, 1, 1, 1, 1, 1, 1, 2, 2, 4, 4, 8, 8, 8, 8, 8, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2,130,135, 31, 7,159, 7, 28, 7,159, 7,159, 7, 2,130, 0, 0, 0, 0, + 32, 16, 16, 16, 17, 11, 14, 12, 24, 16, 49, 35, 98,102, 68, 68, 71, 71, 71, 68, 68,102, 98, 35, 49, 16, 24, 12, 6, 3, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 8, 8, 23, 0, 15, 1, 2, 1, 15, 0, 15, 2, 5, 8 + }, + { + 0, 0,126,126, 24, 60,102, 66, 0, 12, 28,112,112, 28, 12, 0,116,116, 20, 20,124,104, 0,124,124, 0,112,120, 44, 36,124,124,0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 64, 64, 32, 32, 32, 32, 16, 16, 16, 16, 16, 8, 8, 4, 4, 4, 8, 48, 64,128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128,128,128, + 0, 0, 0, 0,192, 96, 48, 24, 12,132,198, 98, 35, 51, 17,145,113,241,113,145, 17, 51, 35, 98,198,132, 12, 24, 48, 96,192, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 24,100,130, 2, 2, 2, 2, 2, 1, 0, 0, 0, 0,128,128, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 0, 48, 48, 0,192,193,193,194, 4, 8, 16, 32, 64,128, 0, 0, 0,128,128,128,128, 64, 64, 64, 64, 32, 32, 32, 32, 16, 16, 16, 16, 8, 8, 8, 8, 8,196, 4,196, 4,196, 2,194, 2,194, 1, 1, 1, 1, 0, 0, 0, + 0, 0,252, 15, 1, 0,248, 14, 31,109,140,148,148,164,166,249,224,255,224,249,166,164,148,148,140,109, 31, 14,248, 0, 1, 15,252, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,192, 56, 4, 3, 0, 0, 0, 0, 0, 0, 0, 12, 12, 12, 13, 1, 0, 64,160, 33, 34, 18, 17, 17, 17, 9, 8, 8, 8, 8, 4, 4, 8, 8, 16, 16, 16, 16, 16, 17, 15, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,170,170,255,255,195,191,127, 3,127,191,195,255,255,170,170, 0, 0, 0, 0, + 0, 0, 31,120,192, 0, 15, 56,124,219,152, 20, 20, 18, 50,207, 3,255, 3,207, 50, 18, 20, 20,152,219,124, 56, 15, 0,192,120, 31, 16, 16, 16, 16, 8, 8, 8, 8, 8, 4, 4, 4, 4, 4, 2, 3, 2, 2, 1, 1, 1, 1, 1, 1, 2, 2, 4, 4, 8, 8, 8, 8, 8, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2,130,135, 31, 7,159, 7, 28, 7,159, 7,159, 7, 2,130, 0, 0, 0, 0, + 32, 16, 16, 16, 17, 11, 14, 12, 24, 16, 49, 35, 98,102, 68, 68, 71, 71, 71, 68, 68,102, 98, 35, 49, 16, 24, 12, 6, 3, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 8, 8, 23, 0, 15, 1, 2, 1, 15, 0, 15, 2, 5, 8 + }, + { + 0, 0,126,126, 24, 60,102, 66, 0, 12, 28,112,112, 28, 12, 0,116,116, 20, 20,124,104, 0,124,124, 0,112,120, 44, 36,124,124,0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128,128, 64, 64, 64, 64, 32, 32, 32, 32, 16, 8, 4, 2, 2, 4, 24, 96,128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128,128,128, + 0, 0, 0, 0,192, 96, 48, 24, 12,132,198, 98, 35, 51, 17,145,113,241,113,145, 17, 51, 35, 98,198,132, 12, 24, 48, 96,192, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 60,194, 1, 1, 2, 2, 4, 4, 2, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 96, 96, 0,129,130,130,132, 8, 16, 32, 64,128, 0, 0, 0, 0,128,128,128,128, 64, 64, 64, 64, 32, 32, 32, 32, 16, 16, 16, 16, 8, 8, 8, 8, 8,196, 4,196, 4,196, 2,194, 2,194, 1, 1, 1, 1, 0, 0, 0, + 0, 0,252, 15, 1, 0,248, 14, 31,109,140,148,148,164,166,249,224,255,224,249,166,164,148,148,140,109, 31, 14,248, 0, 1, 15,252, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128,112, 25, 6, 0, 0, 0, 0, 0, 0, 0, 24, 24, 24, 27, 3, 0, 64,160, 34, 36, 20, 18, 18, 18, 11, 8, 8, 8, 8, 5, 5, 9, 9, 16, 16, 16, 16, 16, 17, 15, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,170,170,255,255,195,191,127, 3,127,191,195,255,255,170,170, 0, 0, 0, 0, + 0, 0, 31,120,192, 0, 15, 56,124,219,152, 20, 20, 18, 50,207, 3,255, 3,207, 50, 18, 20, 20,152,219,124, 56, 15, 0,192,120, 31, 16, 16, 16, 16, 8, 8, 8, 8, 8, 4, 4, 4, 4, 4, 2, 3, 2, 2, 1, 1, 1, 1, 1, 1, 2, 2, 4, 4, 8, 8, 8, 8, 8, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2,130,135, 31, 7,159, 7, 28, 7,159, 7,159, 7, 2,130, 0, 0, 0, 0, + 32, 16, 16, 16, 17, 11, 14, 12, 24, 16, 49, 35, 98,102, 68, 68, 71, 71, 71, 68, 68,102, 98, 35, 49, 16, 24, 12, 6, 3, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 8, 8, 23, 0, 15, 1, 2, 1, 15, 0, 15, 2, 5, 8 + }, + { + 0, 0,126,126, 24, 60,102, 66, 0, 12, 28,112,112, 28, 12, 0,116,116, 20, 20,124,104, 0,124,124, 0,112,120, 44, 36,124,124,0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128,128, 0, 0, 0, 0, 0,128, 64, 64, 32, 32, 32, 32, 16, 16, 16, 16, 8, 4, 2, 1, 1, 2, 12, 48, 64,128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128,128,128, + 0, 0, 0, 0,192, 96, 48, 24, 12,132,198, 98, 35, 51, 17,145,113,241,113,145, 17, 51, 35, 98,198,132, 12, 24, 48, 96,192, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 30,225, 0, 0, 1, 1, 2, 2, 1, 0, 0, 0, 0,128,128, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 0, 48, 48, 0,192,193,193,194, 4, 8, 16, 32, 64,128, 0, 0, 0,128,128,128,128, 64, 64, 64, 64, 32, 32, 32, 32, 16, 16, 16, 16, 8, 8, 8, 8, 8,196, 4,196, 4,196, 2,194, 2,194, 1, 1, 1, 1, 0, 0, 0, + 0, 0,252, 15, 1, 0,248, 14, 31,109,140,148,148,164,166,249,224,255,224,249,166,164,148,148,140,109, 31, 14,248, 0, 1, 15,252, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128,112, 12, 3, 0, 0, 0, 0, 0, 0, 0, 12, 12, 12, 13, 1, 0, 64,160, 33, 34, 18, 17, 17, 17, 9, 8, 8, 8, 8, 4, 4, 8, 8, 16, 16, 16, 16, 16, 17, 15, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,170,170,255,255,195,191,127, 3,127,191,195,255,255,170,170, 0, 0, 0, 0, + 0, 0, 31,120,192, 0, 15, 56,124,219,152, 20, 20, 18, 50,207, 3,255, 3,207, 50, 18, 20, 20,152,219,124, 56, 15, 0,192,120, 31, 16, 16, 16, 16, 8, 8, 8, 8, 8, 4, 4, 4, 4, 4, 2, 3, 2, 2, 1, 1, 1, 1, 1, 1, 2, 2, 4, 4, 8, 8, 8, 8, 8, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2,130,135, 31, 7,159, 7, 28, 7,159, 7,159, 7, 2,130, 0, 0, 0, 0, + 32, 16, 16, 16, 17, 11, 14, 12, 24, 16, 49, 35, 98,102, 68, 68, 71, 71, 71, 68, 68,102, 98, 35, 49, 16, 24, 12, 6, 3, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 8, 8, 23, 0, 15, 1, 2, 1, 15, 0, 15, 2, 5, 8 + }, + { + 0, 0,126,126, 24, 60,102, 66, 0, 12, 28,112,112, 28, 12, 0,116,116, 20, 20,124,104, 0,124,124, 0,112,120, 44, 36,124,124,0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 64, 64, 32, 32, 32, 32, 16, 16, 16, 16, 8, 8, 4, 2, 2, 2, 4, 56, 64,128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128,128,128, + 0, 0, 0, 0,192, 96, 48, 24, 12,132,198, 98, 35, 51, 17,145,113,241,113,145, 17, 51, 35, 98,198,132, 12, 24, 48, 96,192, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 28,226, 1, 1, 2, 2, 2, 2, 1, 0, 0, 0, 0,128,128, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 0, 48, 48, 0,192,193,193,194, 4, 8, 16, 32, 64,128, 0, 0, 0,128,128,128,128, 64, 64, 64, 64, 32, 32, 32, 32, 16, 16, 16, 16, 8, 8, 8, 8, 8,196, 4,196, 4,196, 2,194, 2,194, 1, 1, 1, 1, 0, 0, 0, + 0, 0,252, 15, 1, 0,248, 14, 31,109,140,148,148,164,166,249,224,255,224,249,166,164,148,148,140,109, 31, 14,248, 0, 1, 15,252, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128,112, 12, 3, 0, 0, 0, 0, 0, 0, 0, 12, 12, 12, 13, 1, 0, 64,160, 33, 34, 18, 17, 17, 17, 9, 8, 8, 8, 8, 4, 4, 8, 8, 16, 16, 16, 16, 16, 17, 15, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,170,170,255,255,195,191,127, 3,127,191,195,255,255,170,170, 0, 0, 0, 0, + 0, 0, 31,120,192, 0, 15, 56,124,219,152, 20, 20, 18, 50,207, 3,255, 3,207, 50, 18, 20, 20,152,219,124, 56, 15, 0,192,120, 31, 16, 16, 16, 16, 8, 8, 8, 8, 8, 4, 4, 4, 4, 4, 2, 3, 2, 2, 1, 1, 1, 1, 1, 1, 2, 2, 4, 4, 8, 8, 8, 8, 8, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2,130,135, 31, 7,159, 7, 28, 7,159, 7,159, 7, 2,130, 0, 0, 0, 0, + 32, 16, 16, 16, 17, 11, 14, 12, 24, 16, 49, 35, 98,102, 68, 68, 71, 71, 71, 68, 68,102, 98, 35, 49, 16, 24, 12, 6, 3, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 8, 8, 23, 0, 15, 1, 2, 1, 15, 0, 15, 2, 5, 8 + } + }; + static const char PROGMEM prep[][ANIM_SIZE] = { + { + 0, 0,126,126, 24, 60,102, 66, 0, 12, 28,112,112, 28, 12, 0,116,116, 20, 20,124,104, 0,124,124, 0,112,120, 44, 36,124,124,0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128,128, 0, 0, 0, 0, 0,128, 64, 64, 32, 32, 32, 32, 16, 16, 16, 16, 8, 4, 2, 1, 1, 2, 12, 48, 64,128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128,128,128, + 0, 0, 0, 0,192, 96, 48, 24, 12,132,198, 98, 35, 51, 17,145,113,241,113,145, 17, 51, 35, 98,198,132, 12, 24, 48, 96,192, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 30,225, 0, 0, 1, 1, 2, 2,129,128,128, 0, 0,128,128, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 0, 48, 48, 0, 0, 1,225, 26, 6, 9, 49, 53, 1,138,124, 0, 0,128,128,128,128, 64, 64, 64, 64, 32, 32, 32, 32, 16, 16, 16, 16, 8, 8, 8, 8, 8,196, 4,196, 4,196, 2,194, 2,194, 1, 1, 1, 1, 0, 0, 0, + 0, 0,252, 15, 1, 0,248, 14, 31,109,140,148,148,164,166,249,224,255,224,249,166,164,148,148,140,109, 31, 14,248, 0, 1, 15,252, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128,112, 12, 3, 0, 0, 24, 6, 5,152,153,132,195,124, 65, 65, 64, 64, 32, 33, 34, 18, 17, 17, 17, 9, 8, 8, 8, 8, 4, 4, 4, 4, 4, 4, 2, 2, 2, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,170,170,255,255,195,191,127, 3,127,191,195,255,255,170,170, 0, 0, 0, 0, + 0, 0, 31,120,192, 0, 15, 56,124,219,152, 20, 20, 18, 50,207, 3,255, 3,207, 50, 18, 20, 20,152,219,124, 56, 15, 0,192,120, 31, 16, 16, 16, 16, 8, 8, 8, 8, 8, 4, 4, 4, 4, 4, 2, 3, 2, 2, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2,130,135, 31, 7,159, 7, 28, 7,159, 7,159, 7, 2,130, 0, 0, 0, 0, + 32, 16, 16, 16, 17, 11, 14, 12, 24, 16, 49, 35, 98,102, 68, 68, 71, 71, 71, 68, 68,102, 98, 35, 49, 16, 24, 12, 6, 3, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 8, 8, 23, 0, 15, 1, 2, 1, 15, 0, 15, 2, 5, 8 + } + }; + static const char PROGMEM tap[TAP_FRAMES][ANIM_SIZE] = { + { + 0, 0,126,126, 24, 60,102, 66, 0, 12, 28,112,112, 28, 12, 0,116,116, 20, 20,124,104, 0,124,124, 0,112,120, 44, 36,124,124,0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128,128, 0, 0, 0, 0, 0,128, 64, 64, 32, 32, 32, 32, 16, 16, 16, 16, 8, 4, 2, 1, 1, 2, 12, 48, 64,128, 0, 0, 0, 0, 0, 0, 0,248,248,248,248, 0, 0, 0, 0, 0,128,128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128,128,128, + 0, 0, 0, 0,192, 96, 48, 24, 12,132,198, 98, 35, 51, 17,145,113,241,113,145, 17, 51, 35, 98,198,132, 12, 24, 48, 96,192, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 30,225, 0, 0, 1, 1, 2, 2,129,128,128, 0, 0,128,128, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 0, 48, 48, 0, 0, 1, 1, 2, 4, 8, 16, 32, 67,135, 7, 1, 0,184,188,190,159, 95, 95, 79, 76, 32, 32, 32, 32, 16, 16, 16, 16, 8, 8, 8, 8, 8,196, 4,196, 4,196, 2,194, 2,194, 1, 1, 1, 1, 0, 0, 0, + 0, 0,252, 15, 1, 0,248, 14, 31,109,140,148,148,164,166,249,224,255,224,249,166,164,148,148,140,109, 31, 14,248, 0, 1, 15,252, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128,112, 12, 3, 0, 0, 24, 6, 5,152,153,132, 67,124, 65, 65, 64, 64, 32, 33, 34, 18, 17, 17, 17, 9, 8, 8, 8, 8, 4, 4, 8, 8, 16, 16, 16, 16, 16, 17, 15, 1, 61,124,252,252,252,252,252, 60, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,170,170,255,255,195,191,127, 3,127,191,195,255,255,170,170, 0, 0, 0, 0, + 0, 0, 31,120,192, 0, 15, 56,124,219,152, 20, 20, 18, 50,207, 3,255, 3,207, 50, 18, 20, 20,152,219,124, 56, 15, 0,192,120, 63, 16, 16, 16, 16, 8, 8, 8, 8, 8, 4, 4, 4, 4, 4, 2, 3, 2, 2, 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, 1, 3, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2,130,135, 31, 7,159, 7, 28, 7,159, 7,159, 7, 2,130, 0, 0, 0, 0, + 32, 16, 16, 16, 17, 11, 14, 12, 24, 16, 49, 35, 98,102, 68, 68, 71, 71, 71, 68, 68,102, 98, 35, 49, 16, 24, 12, 6, 3, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 8, 8, 23, 0, 15, 1, 2, 1, 15, 0, 15, 2, 5, 8 + }, + { + 0, 0,126,126, 24, 60,102, 66, 0, 12, 28,112,112, 28, 12, 0,116,116, 20, 20,124,104, 0,124,124, 0,112,120, 44, 36,124,124,0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128,128, 0, 0, 0, 0, 0,128, 64, 64, 32, 32, 32, 32, 16, 16, 16, 16, 8, 4, 2, 1, 1, 2, 12, 48, 64,128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128,128,128, + 0, 0, 0, 0,192, 96, 48, 24, 12,132,198, 98, 35, 51, 17,145,113,241,113,145, 17, 51, 35, 98,198,132, 12, 24, 48, 96,192, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 30,225, 0, 0, 1, 1, 2, 2, 1, 0, 0, 0, 0,128,128, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 0, 48, 48, 0, 0, 1,225, 26, 6, 9, 49, 53, 1,138,124, 0, 0,128,128,128,128, 64, 64, 64, 64, 32, 32, 32, 32, 16, 16, 16, 16, 8, 8, 8, 8, 8,196, 4,196, 4,196, 2,194, 2,194, 1, 1, 1, 1, 0, 0, 0, + 0, 0,252, 15, 1, 0,248, 14, 31,109,140,148,148,164,166,249,224,255,224,249,166,164,148,148,140,109, 31, 14,248, 0, 1, 15,252, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128,112, 12, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 64,160, 33, 34, 18, 17, 17, 17, 9, 8, 8, 8, 8, 4, 4, 4, 4, 4, 4, 2, 2, 2, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,170,170,255,255,195,191,127, 3,127,191,195,255,255,170,170, 0, 0, 0, 0, + 0, 0, 31,120,192, 0, 15, 56,124,219,152, 20, 20, 18, 50,207, 3,255, 3,207, 50, 18, 20, 20,152,219,124, 56, 15, 0,192,120, 31, 16, 16, 16, 16, 8, 8, 8, 8, 8, 4, 4, 4, 4, 4, 2, 3,122,122,121,121,121,121, 57, 49, 2, 2, 4, 4, 8, 8, 8,136,136,135,128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2,130,135, 31, 7,159, 7, 28, 7,159, 7,159, 7, 2,130, 0, 0, 0, 0, + 32, 16, 16, 16, 17, 11, 14, 12, 24, 16, 49, 35, 98,102, 68, 68, 71, 71, 71, 68, 68,102, 98, 35, 49, 16, 24, 12, 6, 3, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 48,120,124,254,255, 63, 7, 0, 0, 0, 0,255,255,127,127, 63, 62, 28, 24, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 8, 8, 23, 0, 15, 1, 2, 1, 15, 0, 15, 2, 5, 8 + }, + }; + + //assumes 1 frame prep stage + void animation_phase(void) { + if(get_current_wpm() <=IDLE_SPEED){ + current_idle_frame = (current_idle_frame + 1) % IDLE_FRAMES; + oled_write_raw_P(idle[abs((IDLE_FRAMES-1)-current_idle_frame)], ANIM_SIZE); + } + if(get_current_wpm() >IDLE_SPEED && get_current_wpm() 1 + oled_write_raw_P(prep[0], ANIM_SIZE); // remove if IDLE_FRAMES >1 + } + if(get_current_wpm() >=TAP_SPEED){ + current_tap_frame = (current_tap_frame + 1) % TAP_FRAMES; + oled_write_raw_P(tap[abs((TAP_FRAMES-1)-current_tap_frame)], ANIM_SIZE); + } + } + if(get_current_wpm() != 000) { + oled_on(); // not essential but turns on animation OLED with any alpha keypress + if(timer_elapsed32(anim_timer) > ANIM_FRAME_DURATION) { + anim_timer = timer_read32(); + animation_phase(); + } + anim_sleep = timer_read32(); + } else { + if(timer_elapsed32(anim_sleep) > OLED_TIMEOUT) { + oled_off(); + } else { + if(timer_elapsed32(anim_timer) > ANIM_FRAME_DURATION) { + anim_timer = timer_read32(); + animation_phase(); + } + } + } +} + +// static void render_skull(void) { // Helen Tseong (http://shewolfe.co/), the original artist behind the skull, sadly only allowing use of the skull for my personal use. Her (excellent) works are copyright her, and I claim no ownership. Reach out to her for permission! +// static const char PROGMEM skull[] = { +// }; +// oled_write_raw_P(skull, 801); +// } + +void oled_task_user(void) { + if (is_keyboard_master()) { + //render_skull(); + //oled_set_cursor(7,6); + render_status(); + // Renders the current keyboard state (layer, lock, caps, scroll, etc) + } else { + render_anim(); + oled_set_cursor(0,6); + sprintf(wpm_str, " WPM: %03d", get_current_wpm()); + oled_write(wpm_str, false); + + } +} +#endif + +#ifdef ENCODER_ENABLE +void encoder_update_user(uint8_t index, bool clockwise) { + switch(biton32(layer_state)){ + case 1: + if (clockwise) { + tap_code16(C(KC_TAB)); + } else { + tap_code16(S(C(KC_TAB))); + } + break; + default: + if (clockwise) { + if (!is_alt_tab_active) { + is_alt_tab_active = true; + register_code(KC_LALT); + } + alt_tab_timer = timer_read(); + tap_code16(KC_TAB); + } else { + tap_code16(S(KC_TAB)); + } + break; + } +} +void matrix_scan_user(void) { + if (is_alt_tab_active) { + if (timer_elapsed(alt_tab_timer) > 1250) { + unregister_code(KC_LALT); + is_alt_tab_active = false; + } + } +} + +#endif diff --git a/keyboards/kyria/keymaps/j-inc/rules.mk b/keyboards/kyria/keymaps/j-inc/rules.mk new file mode 100644 index 000000000000..87d07f667e0e --- /dev/null +++ b/keyboards/kyria/keymaps/j-inc/rules.mk @@ -0,0 +1,18 @@ +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_ANIMATIONS = yes +WPM_ENABLE = yes +MOUSEKEY_ENABLE = no + +TAP_DANCE_ENABLE = no +STENO_ENABLE = no +BOOTMAGIC_ENABLE =no +TERMINAL_ENABLE = no +GRAVE_ESC_ENABLE = no +MAGIC_ENABLE = no +SPACE_CADET_ENABLE = no +KEY_LOCK_ENABLE = no +AUDIO_ENABLE = no +CONSOLE_ENABLE = no +VELOCIKEY_ENABLE = no From 437446ba8f636afbc2048aa655fc1c2662fbe2ce Mon Sep 17 00:00:00 2001 From: Tsan-Kuang Lee <1425438+tsankuanglee@users.noreply.github.com> Date: Wed, 10 Jun 2020 16:40:17 -0500 Subject: [PATCH 131/930] Fix one shot swaphands compiler error when NO_ACTION_ONESHOT is defined (#9296) * init * add RETRO_TAP; tap anyway after TAP_TERM, if no interruption * RETRO_TAP works for other types of taps * revert to upstream/master * explain this fork in readme * use one readme.md file instaed * fix the error if NO_ACTION_ONESHOT is defined * restore readme.md to upstream master Co-authored-by: Tsan-Kuang Lee --- tmk_core/common/action.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tmk_core/common/action.c b/tmk_core/common/action.c index 909b9c39c934..b39836f0fb1e 100644 --- a/tmk_core/common/action.c +++ b/tmk_core/common/action.c @@ -604,6 +604,7 @@ void process_action(keyrecord_t *record, action_t action) { swap_hands = false; } break; +# ifndef NO_ACTION_ONESHOT case OP_SH_ONESHOT: if (event.pressed) { set_oneshot_swaphands(); @@ -611,6 +612,7 @@ void process_action(keyrecord_t *record, action_t action) { release_oneshot_swaphands(); } break; +# endif # ifndef NO_ACTION_TAPPING case OP_SH_TAP_TOGGLE: @@ -701,9 +703,11 @@ void process_action(keyrecord_t *record, action_t action) { #endif #ifdef SWAP_HANDS_ENABLE +# ifndef NO_ACTION_ONESHOT if (event.pressed && !(action.kind.id == ACT_SWAP_HANDS && action.swap.code == OP_SH_ONESHOT)) { use_oneshot_swaphands(); } +# endif #endif #ifndef NO_ACTION_ONESHOT From 573d1fbb929b83989e3b5933852282299d87d467 Mon Sep 17 00:00:00 2001 From: Drashna Jaelre Date: Wed, 10 Jun 2020 15:18:53 -0700 Subject: [PATCH 132/930] Include `pointing_device_send` in docs (#9185) --- docs/feature_pointing_device.md | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/docs/feature_pointing_device.md b/docs/feature_pointing_device.md index f0b3d75bd8dd..c9309d6975d9 100644 --- a/docs/feature_pointing_device.md +++ b/docs/feature_pointing_device.md @@ -21,7 +21,11 @@ Keep in mind that a report_mouse_t (here "mouseReport") has the following proper * `mouseReport.h` - this is a signed int from -127 to 127 (not 128, this is defined in USB HID spec) representing horizontal scrolling (+ right, - left). * `mouseReport.buttons` - this is a uint8_t in which the last 5 bits are used. These bits represent the mouse button state - bit 3 is mouse button 5, and bit 7 is mouse button 1. -When the mouse report is sent, the x, y, v, and h values are set to 0 (this is done in "pointing_device_send()", which can be overridden to avoid this behavior). This way, button states persist, but movement will only occur once. For further customization, both `pointing_device_init` and `pointing_device_task` can be overridden. +Once you have made the necessary changes to the mouse report, you need to send it: + +* `pointing_device_send()` - Sends the mouse report to the host and zeroes out the report. + +When the mouse report is sent, the x, y, v, and h values are set to 0 (this is done in `pointing_device_send()`, which can be overridden to avoid this behavior). This way, button states persist, but movement will only occur once. For further customization, both `pointing_device_init` and `pointing_device_task` can be overridden. In the following example, a custom key is used to click the mouse and scroll 127 units vertically and horizontally, then undo all of that when released - because that's a totally useful function. Listen, this is an example: @@ -38,6 +42,7 @@ case MS_SPECIAL: currentReport.buttons &= ~MOUSE_BTN1; } pointing_device_set_report(currentReport); + pointing_device_send(); break; ``` From a056d945618342dfdc88f0ea05dfe7a0190a0e0b Mon Sep 17 00:00:00 2001 From: MechMerlin <30334081+mechmerlin@users.noreply.github.com> Date: Wed, 10 Jun 2020 15:26:21 -0700 Subject: [PATCH 133/930] [keyboard] Project Keyboard Signature 87 (#9062) * preliminary check in, basically a copy from 159's github with a few additions to get it to compile * update readme * fixup the LAYOUT macro labels to be more reasonable * add tkl_ansi LAYOUT macro for community layout support * clean up rules.mk, add community layout suport, and add in bootloader * add a tsangan layout macro * spruce up readme * add VIA keymap * add qmk configurator support * Update keyboards/projectkb/signature87/rules.mk Co-authored-by: Joel Challis * Update keyboards/projectkb/signature87/rules.mk Co-authored-by: Joel Challis * Update keyboards/projectkb/signature87/rules.mk Co-authored-by: Joel Challis * remove unneeded file * Update keyboards/projectkb/signature87/config.h Co-authored-by: Joel Challis * Update keyboards/projectkb/signature87/rules.mk Co-authored-by: Ryan * Update keyboards/projectkb/signature87/config.h Co-authored-by: Joel Challis Co-authored-by: Ryan --- keyboards/projectkb/signature87/chconf.h | 714 ++++++++++++++++++ keyboards/projectkb/signature87/config.h | 46 ++ keyboards/projectkb/signature87/halconf.h | 525 +++++++++++++ keyboards/projectkb/signature87/info.json | 24 + .../signature87/keymaps/default/keymap.c | 40 + .../signature87/keymaps/via/keymap.c | 58 ++ .../signature87/keymaps/via/rules.mk | 2 + keyboards/projectkb/signature87/mcuconf.h | 176 +++++ keyboards/projectkb/signature87/readme.md | 13 + keyboards/projectkb/signature87/rules.mk | 19 + keyboards/projectkb/signature87/signature87.c | 1 + keyboards/projectkb/signature87/signature87.h | 93 +++ 12 files changed, 1711 insertions(+) create mode 100644 keyboards/projectkb/signature87/chconf.h create mode 100644 keyboards/projectkb/signature87/config.h create mode 100644 keyboards/projectkb/signature87/halconf.h create mode 100644 keyboards/projectkb/signature87/info.json create mode 100644 keyboards/projectkb/signature87/keymaps/default/keymap.c create mode 100644 keyboards/projectkb/signature87/keymaps/via/keymap.c create mode 100644 keyboards/projectkb/signature87/keymaps/via/rules.mk create mode 100644 keyboards/projectkb/signature87/mcuconf.h create mode 100644 keyboards/projectkb/signature87/readme.md create mode 100644 keyboards/projectkb/signature87/rules.mk create mode 100644 keyboards/projectkb/signature87/signature87.c create mode 100644 keyboards/projectkb/signature87/signature87.h diff --git a/keyboards/projectkb/signature87/chconf.h b/keyboards/projectkb/signature87/chconf.h new file mode 100644 index 000000000000..ce6a08e32924 --- /dev/null +++ b/keyboards/projectkb/signature87/chconf.h @@ -0,0 +1,714 @@ +/* + 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. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +/** + * @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. + * + * @addtogroup config + * @details Kernel related settings and hooks. + * @{ + */ + +#ifndef CHCONF_H +#define CHCONF_H + +#define _CHIBIOS_RT_CONF_ +#define _CHIBIOS_RT_CONF_VER_6_0_ + +/*===========================================================================*/ +/** + * @name System timers settings + * @{ + */ +/*===========================================================================*/ + +/** + * @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. + * @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. + */ +#if !defined(CH_CFG_ST_TIMEDELTA) +#define CH_CFG_ST_TIMEDELTA 2 +#endif + +/** @} */ + +/*===========================================================================*/ +/** + * @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. + */ +#if !defined(CH_CFG_TIME_QUANTUM) +#define CH_CFG_TIME_QUANTUM 0 +#endif + +/** + * @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. + */ +#if !defined(CH_CFG_MEMCORE_SIZE) +#define CH_CFG_MEMCORE_SIZE 0 +#endif + +/** + * @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. + */ +#if !defined(CH_CFG_NO_IDLE_THREAD) +#define CH_CFG_NO_IDLE_THREAD FALSE +#endif + +/** @} */ + +/*===========================================================================*/ +/** + * @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. + */ +#if !defined(CH_CFG_OPTIMIZE_SPEED) +#define CH_CFG_OPTIMIZE_SPEED FALSE +#endif + +/** @} */ + +/*===========================================================================*/ +/** + * @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. + */ +#if !defined(CH_CFG_USE_TM) +#define CH_CFG_USE_TM FALSE +#endif + +/** + * @brief Threads registry APIs. + * @details If enabled then the registry APIs are included in the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_REGISTRY) +#define CH_CFG_USE_REGISTRY TRUE +#endif + +/** + * @brief Threads synchronization APIs. + * @details If enabled then the @p chThdWait() function is included in + * the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_WAITEXIT) +#define CH_CFG_USE_WAITEXIT TRUE +#endif + +/** + * @brief Semaphores APIs. + * @details If enabled then the Semaphores APIs are included in the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_SEMAPHORES) +#define CH_CFG_USE_SEMAPHORES TRUE +#endif + +/** + * @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. + */ +#if !defined(CH_CFG_USE_SEMAPHORES_PRIORITY) +#define CH_CFG_USE_SEMAPHORES_PRIORITY FALSE +#endif + +/** + * @brief Mutexes APIs. + * @details If enabled then the mutexes APIs are included in the kernel. + * + * @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. + * @note Recursive mutexes are heavier and have an increased + * memory footprint. + * + * @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. + * @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. + */ +#if !defined(CH_CFG_USE_CONDVARS) +#define CH_CFG_USE_CONDVARS TRUE +#endif + +/** + * @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. + */ +#if !defined(CH_CFG_USE_CONDVARS_TIMEOUT) +#define CH_CFG_USE_CONDVARS_TIMEOUT FALSE +#endif + +/** + * @brief Events Flags APIs. + * @details If enabled then the event flags APIs are included in the kernel. + * + * @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. + * @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. + */ +#if !defined(CH_CFG_USE_EVENTS_TIMEOUT) +#define CH_CFG_USE_EVENTS_TIMEOUT TRUE +#endif + +/** + * @brief Synchronous Messages APIs. + * @details If enabled then the synchronous messages APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_MESSAGES) +#define CH_CFG_USE_MESSAGES TRUE +#endif + +/** + * @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. + */ +#if !defined(CH_CFG_USE_MESSAGES_PRIORITY) +#define CH_CFG_USE_MESSAGES_PRIORITY FALSE +#endif + +/** + * @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. + */ +#if !defined(CH_CFG_USE_MAILBOXES) +#define CH_CFG_USE_MAILBOXES TRUE +#endif + +/** + * @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. + */ +#if !defined(CH_CFG_USE_MEMCORE) +#define CH_CFG_USE_MEMCORE TRUE +#endif + +/** + * @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. + */ +#if !defined(CH_CFG_USE_HEAP) +#define CH_CFG_USE_HEAP FALSE +#endif + +/** + * @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. + */ +#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. + * @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. + */ +#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 + +/** @} */ + +/*===========================================================================*/ +/** + * @name Debug options + * @{ + */ +/*===========================================================================*/ + +/** + * @brief Debug option, kernel statistics. + * + * @note The default is @p FALSE. + */ +#if !defined(CH_DBG_STATISTICS) +#define CH_DBG_STATISTICS FALSE +#endif + +/** + * @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. + */ +#if !defined(CH_DBG_SYSTEM_STATE_CHECK) +#define CH_DBG_SYSTEM_STATE_CHECK FALSE +#endif + +/** + * @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. + */ +#if !defined(CH_DBG_ENABLE_CHECKS) +#define CH_DBG_ENABLE_CHECKS FALSE +#endif + +/** + * @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. + */ +#if !defined(CH_DBG_ENABLE_ASSERTS) +#define CH_DBG_ENABLE_ASSERTS FALSE +#endif + +/** + * @brief Debug option, trace buffer. + * @details If enabled then the trace buffer is activated. + * + * @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. + * @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. + */ +#if !defined(CH_DBG_ENABLE_STACK_CHECK) +#define CH_DBG_ENABLE_STACK_CHECK FALSE +#endif + +/** + * @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. + */ +#if !defined(CH_DBG_FILL_THREADS) +#define CH_DBG_FILL_THREADS FALSE +#endif + +/** + * @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. + */ +#if !defined(CH_DBG_THREADS_PROFILING) +#define CH_DBG_THREADS_PROFILING FALSE +#endif + +/** @} */ + +/*===========================================================================*/ +/** + * @name Kernel hooks + * @{ + */ +/*===========================================================================*/ + +/** + * @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. + */ +#define CH_CFG_THREAD_EXTRA_FIELDS \ + /* Add threads custom fields here.*/ + +/** + * @brief Threads initialization hook. + * @details User initialization code added to the @p _thread_init() function. + * + * @note It is invoked from within @p _thread_init() 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 */ + +/** @} */ \ No newline at end of file diff --git a/keyboards/projectkb/signature87/config.h b/keyboards/projectkb/signature87/config.h new file mode 100644 index 000000000000..c9e289870adb --- /dev/null +++ b/keyboards/projectkb/signature87/config.h @@ -0,0 +1,46 @@ +/* +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 + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0x0159 +#define PRODUCT_ID 0x0187 +#define DEVICE_VER 0x0001 +#define MANUFACTURER Project Keyboard +#define PRODUCT Signature87 +#define DESCRIPTION Tenkeyless PCB with JST breakout support + +/* key matrix size */ +#define MATRIX_ROWS 12 +#define MATRIX_COLS 9 + +// 0 1 2 3 4 5 6 7 8 9 A B +#define MATRIX_COL_PINS { A7, A6, A5, A4, A3, A2, A15, B3, B4 } +#define MATRIX_ROW_PINS { B13, B12, A8, B15, A10, A9, B9, B8, B1, B0, B10, B2 } +#define DIODE_DIRECTION COL2ROW + +/* 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 diff --git a/keyboards/projectkb/signature87/halconf.h b/keyboards/projectkb/signature87/halconf.h new file mode 100644 index 000000000000..c9e53d87b813 --- /dev/null +++ b/keyboards/projectkb/signature87/halconf.h @@ -0,0 +1,525 @@ +/* + 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. + 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 + +#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 +#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 cryptographic subsystem. + */ +#if !defined(HAL_USE_CRY) || defined(__DOXYGEN__) +#define HAL_USE_CRY FALSE +#endif + +/** + * @brief Enables the DAC subsystem. + */ +#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 +#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 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 +#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 +#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 + +/** + * @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. */ +/*===========================================================================*/ + +/** + * @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 + +/** + * @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. */ +/*===========================================================================*/ + +/** + * @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 the zero-copy API. + */ +#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 + +/** + * @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. */ +/*===========================================================================*/ + +/** + * @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 16 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 256 bytes for both the transmission and receive + * buffers. + */ +#if !defined(SERIAL_USB_BUFFERS_SIZE) || defined(__DOXYGEN__) +#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 + +/*===========================================================================*/ +/* 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 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 +#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. */ +/*===========================================================================*/ + +/** + * @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 + +/*===========================================================================*/ +/* 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 */ + +/** @} */ \ No newline at end of file diff --git a/keyboards/projectkb/signature87/info.json b/keyboards/projectkb/signature87/info.json new file mode 100644 index 000000000000..a93a51ee954d --- /dev/null +++ b/keyboards/projectkb/signature87/info.json @@ -0,0 +1,24 @@ +{ + "keyboard_name": "Signature 87", + "url": "", + "maintainer": "qmk", + "width": 18.25, + "height": 6.25, + "layouts": { + "LAYOUT_all": { + "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}, {"x":14, "y":1.25}, {"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_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_tsangan_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}, {"x":14, "y":1.25}, {"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.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_wkl_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}, {"x":14, "y":1.25}, {"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.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}] + } + } +} \ No newline at end of file diff --git a/keyboards/projectkb/signature87/keymaps/default/keymap.c b/keyboards/projectkb/signature87/keymaps/default/keymap.c new file mode 100644 index 000000000000..d150ef33ccb9 --- /dev/null +++ b/keyboards/projectkb/signature87/keymaps/default/keymap.c @@ -0,0 +1,40 @@ +/* +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 + + +// 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. + +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_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_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( + 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, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 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/projectkb/signature87/keymaps/via/keymap.c b/keyboards/projectkb/signature87/keymaps/via/keymap.c new file mode 100644 index 000000000000..fd6130478500 --- /dev/null +++ b/keyboards/projectkb/signature87/keymaps/via/keymap.c @@ -0,0 +1,58 @@ +/* +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 + + +// 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. + +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_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_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( + 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, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 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 + ), + + [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 + ) +}; \ No newline at end of file diff --git a/keyboards/projectkb/signature87/keymaps/via/rules.mk b/keyboards/projectkb/signature87/keymaps/via/rules.mk new file mode 100644 index 000000000000..36b7ba9cbc98 --- /dev/null +++ b/keyboards/projectkb/signature87/keymaps/via/rules.mk @@ -0,0 +1,2 @@ +VIA_ENABLE = yes +LTO_ENABLE = yes diff --git a/keyboards/projectkb/signature87/mcuconf.h b/keyboards/projectkb/signature87/mcuconf.h new file mode 100644 index 000000000000..fd3967d28158 --- /dev/null +++ b/keyboards/projectkb/signature87/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_ */ \ No newline at end of file diff --git a/keyboards/projectkb/signature87/readme.md b/keyboards/projectkb/signature87/readme.md new file mode 100644 index 000000000000..3f3ca1d63e55 --- /dev/null +++ b/keyboards/projectkb/signature87/readme.md @@ -0,0 +1,13 @@ +# Signature87 + +Project Keyboard ANSI only PCB for Kepler TKL. + +* Keyboard Maintainer: [159](https://github.com/projectkeyboard), [MechMerlin](https://github.com/mechmerlin) +* Hardware Supported: STM32F072CBT6 +* Hardware Availability: [projectkeyboard](https://store.projectkeyboard.com/) + +Make example for this keyboard (after setting up your build environment): + + make projectkb/signature87: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/projectkb/signature87/rules.mk b/keyboards/projectkb/signature87/rules.mk new file mode 100644 index 000000000000..fe0d976d111a --- /dev/null +++ b/keyboards/projectkb/signature87/rules.mk @@ -0,0 +1,19 @@ +# MCU name +MCU = STM32F072 + +# 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 +BACKLIGHT_ENABLE = no + +# Enter lower-power sleep mode when on the ChibiOS idle thread +OPT_DEFS += -DCORTEX_ENABLE_WFI_IDLE=TRUE + +LAYOUTS = tkl_ansi diff --git a/keyboards/projectkb/signature87/signature87.c b/keyboards/projectkb/signature87/signature87.c new file mode 100644 index 000000000000..e210f67de9fc --- /dev/null +++ b/keyboards/projectkb/signature87/signature87.c @@ -0,0 +1 @@ +#include "signature87.h" \ No newline at end of file diff --git a/keyboards/projectkb/signature87/signature87.h b/keyboards/projectkb/signature87/signature87.h new file mode 100644 index 000000000000..b97570ef955b --- /dev/null +++ b/keyboards/projectkb/signature87/signature87.h @@ -0,0 +1,93 @@ +#pragma once + +#include "quantum.h" + +#define KNO KC_NO + +#define LAYOUT_all( \ + K00, K11, K01, K12, K02, K13, K03, K14, K04, K15, K06, K16, K07, K17, K08, K18, \ + K20, K30, K21, K31, K22, K32, K23, K33, K24, K34, K25, K35, K26, K36, K27, K37, K28, K38, \ + K40, K50, K41, K51, K42, K52, K43, K53, K44, K54, K45, K55, K46, K57, K47, K58, K48, \ + K60, K70, K61, K71, K62, K72, K63, K73, K64, K74, K65, K75, K66, \ + K80, K90, K81, K91, K82, K92, K83, K93, K84, K94, K85, K96, K86, K98, \ + KA0, KB0, KA1, KB2, KA4, KB5, KA6, KB6, KA7, KB8, KA8 \ +) { \ + { K00, K01, K02, K03, K04, KNO, K06, K07, K08 }, \ + { KNO, 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, KNO, K57, K58 }, \ + { K60, K61, K62, K63, K64, K65, K66, KNO, KNO }, \ + { K70, K71, K72, K73, K74, K75, KNO, KNO, KNO }, \ + { K80, K81, K82, K83, K84, K85, K86, KNO, KNO }, \ + { K90, K91, K92, K93, K94, KNO, K96, KNO, K98 }, \ + { KA0, KA1, KNO, KNO, KA4, KNO, KA6, KA7, KA8 }, \ + { KB0, KNO, KB2, KNO, KNO, KB5, KB6, KNO, KB8 } \ +} + +#define LAYOUT_tkl_ansi( \ + K00, K11, K01, K12, K02, K13, K03, K14, K04, K15, K06, K16, K07, K17, K08, K18, \ + K20, K30, K21, K31, K22, K32, K23, K33, K24, K34, K25, K35, K26, K36, K37, K28, K38, \ + K40, K50, K41, K51, K42, K52, K43, K53, K44, K54, K45, K55, K46, K57, K47, K58, K48, \ + K60, K70, K61, K71, K62, K72, K63, K73, K64, K74, K65, K75, K66, \ + K80, K90, K81, K91, K82, K92, K83, K93, K84, K94, K85, K96, K98, \ + KA0, KB0, KA1, KB2, KA4, KB5, KA6, KB6, KA7, KB8, KA8 \ +) { \ + { K00, K01, K02, K03, K04, KNO, K06, K07, K08 }, \ + { KNO, K11, K12, K13, K14, K15, K16, K17, K18 }, \ + { K20, K21, K22, K23, K24, K25, K26, KNO, 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, KNO, K57, K58 }, \ + { K60, K61, K62, K63, K64, K65, K66, KNO, KNO }, \ + { K70, K71, K72, K73, K74, K75, KNO, KNO, KNO }, \ + { K80, K81, K82, K83, K84, K85, KNO, KNO, KNO }, \ + { K90, K91, K92, K93, K94, KNO, K96, KNO, K98 }, \ + { KA0, KA1, KNO, KNO, KA4, KNO, KA6, KA7, KA8 }, \ + { KB0, KNO, KB2, KNO, KNO, KB5, KB6, KNO, KB8 } \ +} + +#define LAYOUT_tkl_tsangan_ansi( \ + K00, K11, K01, K12, K02, K13, K03, K14, K04, K15, K06, K16, K07, K17, K08, K18, \ + K20, K30, K21, K31, K22, K32, K23, K33, K24, K34, K25, K35, K26, K36, K27, K37, K28, K38, \ + K40, K50, K41, K51, K42, K52, K43, K53, K44, K54, K45, K55, K46, K57, K47, K58, K48, \ + K60, K70, K61, K71, K62, K72, K63, K73, K64, K74, K65, K75, K66, \ + K80, K90, K81, K91, K82, K92, K83, K93, K84, K94, K85, K96, K86, K98, \ + KA0, KB0, KA1, KB2, KB5, KA6, KB6, KA7, KB8, KA8 \ +) { \ + { K00, K01, K02, K03, K04, KNO, K06, K07, K08 }, \ + { KNO, 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, KNO, K57, K58 }, \ + { K60, K61, K62, K63, K64, K65, K66, KNO, KNO }, \ + { K70, K71, K72, K73, K74, K75, KNO, KNO, KNO }, \ + { K80, K81, K82, K83, K84, K85, K86, KNO, KNO }, \ + { K90, K91, K92, K93, K94, KNO, K96, KNO, K98 }, \ + { KA0, KA1, KNO, KNO, KNO, KNO, KA6, KA7, KA8 }, \ + { KB0, KNO, KB2, KNO, KNO, KB5, KB6, KNO, KB8 } \ +} + +#define LAYOUT_wkl_ansi( \ + K00, K11, K01, K12, K02, K13, K03, K14, K04, K15, K06, K16, k07, K17, K08, K18, \ + K20, K30, K21, K31, K22, K32, K23, K33, K24, K34, K25, K35, K26, K36, K27, K37, K28, K38, \ + K40, K50, K41, K51, K42, K52, K43, K53, K44, K54, K45, K55, K46, K57, K47, K58, K48, \ + K60, K70, K61, K71, K62, K72, K63, K73, K64, K74, K65, K75, K66, \ + K80, K90, K81, K91, K82, K92, K83, K93, K84, K94, K85, K96, K86, K98, \ + KA0, KA1, KB2, KB5, KB6, KA7, KB8, KA8 \ +) { \ + { K00, K01, K02, K03, K04, KNO, K06, K07, K08 }, \ + { KNO, 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, KNO, K57, K58 }, \ + { K60, K61, K62, K63, K64, K65, K66, KNO, KNO }, \ + { K70, K71, K72, K73, K74, K75, KNO, KNO, KNO }, \ + { K80, K81, K82, K83, K84, K85, K86, KNO, KNO }, \ + { K90, K91, K92, K93, K94, KNO, K96, KNO, K98 }, \ + { KA0, KA1, KNO, KNO, KNO, KNO, KNO, KA7, KA8 }, \ + { KNO, KNO, KB2, KNO, KNO, KB5, KB6, KNO, KB8 } \ +} From 2543bad250f68190a373563b52464c3f7e642847 Mon Sep 17 00:00:00 2001 From: precondition <57645186+precondition@users.noreply.github.com> Date: Wed, 10 Jun 2020 22:27:25 +0000 Subject: [PATCH 134/930] [Docs] Fixed the hyperlink to `/users/_example/`. (#9326) --- docs/feature_userspace.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/feature_userspace.md b/docs/feature_userspace.md index 8665481db9a9..77a6c8d7621a 100644 --- a/docs/feature_userspace.md +++ b/docs/feature_userspace.md @@ -111,7 +111,7 @@ This is ideal for when you want ensure everything compiles successfully when pre ## Examples -For a brief example, checkout [`/users/_example/`](https://github.com/qmk/qmk_firmware/tree/master/users/drashna). +For a brief example, checkout [`/users/_example/`](https://github.com/qmk/qmk_firmware/tree/master/users/_example). For a more complicated example, checkout [`/users/drashna/`](https://github.com/qmk/qmk_firmware/tree/master/users/drashna)'s userspace. From 3afd2d81b8e48378dbb468a35bd6f06bd442a6f9 Mon Sep 17 00:00:00 2001 From: Nick Brassel Date: Thu, 11 Jun 2020 08:32:58 +1000 Subject: [PATCH 135/930] Add documentation for selecting an Arm MCU (#9046) * Initial doco write-up. * Update docs/platformdev_selecting_arm_mcu.md Co-authored-by: James Young <18669334+noroadsleft@users.noreply.github.com> * Apply suggestions from code review Co-authored-by: Ryan Co-authored-by: James Young <18669334+noroadsleft@users.noreply.github.com> Co-authored-by: Ryan --- docs/_summary.md | 1 + docs/platformdev_selecting_arm_mcu.md | 58 +++++++++++++++++++++++++++ 2 files changed, 59 insertions(+) create mode 100644 docs/platformdev_selecting_arm_mcu.md diff --git a/docs/_summary.md b/docs/_summary.md index 1b6ddc67ca87..63c54ec21931 100644 --- a/docs/_summary.md +++ b/docs/_summary.md @@ -145,6 +145,7 @@ * Hardware Platform Development * Arm/ChibiOS + * [Selecting an MCU](platformdev_selecting_arm_mcu.md) * [Early initialization](platformdev_chibios_earlyinit.md) * QMK Reference diff --git a/docs/platformdev_selecting_arm_mcu.md b/docs/platformdev_selecting_arm_mcu.md new file mode 100644 index 000000000000..c115aa6e0fdf --- /dev/null +++ b/docs/platformdev_selecting_arm_mcu.md @@ -0,0 +1,58 @@ +# Choosing an Arm MCU :id=choose-arm-mcu + +This page outlines the selection criteria to ensure compatibility with Arm/ChibiOS. + +QMK uses the Hardware Abstraction Layer of ChibiOS in order to run on Arm devices. ChibiOS in general is best supported on STM32 devices, both in the perspective of base MCU support, as well as on-MCU peripheral support. As an extension to the core ChibiOS MCU support, QMK also utilises ChibiOS-Contrib (which includes the Kinetis MCU support layer, as an example), but it does not provide as great a level of peripheral support or general testing for supported devices. + +Adding support for new MCU families must go through ChibiOS or ChibiOS-Contrib -- QMK does not have the bandwidth, resources, nor the inclination to maintain long-term MCU support for your board of choice. + +To be clear: this also includes commercial boards -- unless agreed upon by all parties, QMK will not take over maintenance of a bespoke MCU support package. Even if MCU support is upstreamed into ChibiOS/ChibiOS-Contrib, QMK reserves the right to deprecate and/or remove keyboards utilising support packages that aren't kept up to date with upstream ChibiOS itself. + +## Selecting an already-supported MCU :id=selecting-already-supported-mcu + +### STM32 families + +As outlined earlier, STM32 is the preferred option to ensure greatest compatibility with the subsystems already implemented in QMK. Not all subsystems are compatible yet, but for the most widely-used support is already present. + +The simplest solution to determine if an STM32 MCU is compatible is to navigate to the list of supported STM32 ports in QMK's [ChibiOS fork](https://github.com/qmk/ChibiOS/tree/master/os/hal/ports/STM32). Inside this directory, each of the supported STM32 families will be listed, and inside each family a file called `stm32_registry.h` will be present. Scanning through these files will show `#define`s such as the following, which can be used to determine if ChibiOS supports a particular MCU: + +```c +#if defined(STM32F303xC) || defined(__DOXYGEN__) +``` + +The example shows that STM32F303xC devices are supported by ChibiOS. + +The next step is to ensure that USB is supported on those devices by ChibiOS -- you can confirm this by checking inside the same section guarded by the `#define` above, specifically for the following to be `TRUE`: + +```c +#define STM32_HAS_USB TRUE +``` + +or one of the following being `TRUE`: + +```c +#define STM32_HAS_OTG1 TRUE +#define STM32_HAS_OTG2 TRUE +``` + +For the most part, this is the bare minimum to be able to have a high confidence that QMK will be able to run on your MCU. After that, it's all up to configuration. + +### Non-STM32 families + +ChibiOS does have support for a handful of non-STM32 devices, and the list can be found in QMK's [ChibiOS fork](https://github.com/qmk/ChibiOS/tree/master/os/hal/ports) and [ChibiOS-Contrib fork](https://github.com/qmk/ChibiOS-Contrib/tree/master/os/hal/ports). Non-STM32 support is likely out of date, and only supports ancient MCUs -- whilst it might be possible to use these, it's not recommended. + +Do note that there are sometimes licensing restrictions with respect to redistribution. As an example, binaries built for nRF5 are not able to be redistributed via QMK Configurator, due to the licensing of their board support package. + +## Adding support for a new STM32 MCU (for an existing family) :id=add-new-stm32-mcu + +Usually, one can "masquerade" as an existing MCU of the same family, especially if the only difference is RAM or Flash size. As an example, some MCUs within the same family are virtually identical, with the exception of adding a cryptographic peripheral -- STM32L072 vs. STM32L082 for instance. Given the unlikely use of the cryptographic peripheral, L082 chips can actually run as if they're an L072, and can be targeted accordingly. + +Adding proper support for new MCUs within an existing STM32 family should ideally be upstreamed to ChibiOS. In general, this will require modifications of the `stm32_registry.h` file, providing correct responses for the same `#define`s provided for the other MCUs in that family. + +## Adding support for a new STM32 Family :id=add-new-stm32-family + +If this is a requirement, this needs to go through upstream ChibiOS before QMK would consider accepting boards targeting the new family. More information for porting should be sought by approaching ChibiOS directly, rather than through QMK. + +## Adding support for a new MCU Family :id=add-new-mcu-family + +As stated earlier, in order for a new MCU family to be supported by QMK, it needs to be upstreamed into ChibiOS-Contrib before QMK will consider accepting boards using it. The same principle applies for development -- you're best approaching the ChibiOS-Contrib maintainers to get a bit more of an idea on what's involved with upstreaming your contribution. From 97ddc7ea18fc5438b18b86caa742642eca2224fb Mon Sep 17 00:00:00 2001 From: neon4272 <50256318+neon4272@users.noreply.github.com> Date: Thu, 11 Jun 2020 08:46:13 +1000 Subject: [PATCH 136/930] Fix Ubuntu/Debian setup when $PATH contains spaces (#9307) * Change `echo` to `export` * Add `export` as a note under the `echo` command * Remove note from last commit Co-authored-by: Ryan * Update docs/newbs_getting_started.md Co-authored-by: Ryan * Update docs/newbs_getting_started.md Add 1 line of whitespace under note Co-authored-by: Ryan Co-authored-by: Ryan --- docs/newbs_getting_started.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/newbs_getting_started.md b/docs/newbs_getting_started.md index 1367d1b4097f..e374a8f8e53e 100644 --- a/docs/newbs_getting_started.md +++ b/docs/newbs_getting_started.md @@ -97,7 +97,7 @@ In most situations you will want to answer Yes to all of the prompts. It's possible, that you will get an error saying something like: `bash: qmk: command not found`. This is due to a [bug](https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=839155) Debian introduced with their Bash 4.4 release, which removed `$HOME/.local/bin` from the PATH. This bug was later fixed on Debian and Ubuntu. Sadly, Ubuntu reitroduced this bug and is [yet to fix it](https://bugs.launchpad.net/ubuntu/+source/bash/+bug/1588562). -Luckily, the fix is easy. Run this as your user: `echo "PATH=$HOME/.local/bin:$PATH" >> $HOME/.bashrc && source $HOME/.bashrc` +Luckily, the fix is easy. Run this as your user: `echo "PATH=$HOME/.local/bin:\"$PATH\"" >> $HOME/.bashrc && source $HOME/.bashrc` ?>**Note on FreeBSD**: It is suggested to run `qmk setup` as a non-`root` user to start with, but this will likely identify packages that need to be installed to your From fffee6ade1ec21bc3221642b8e5d2d3b735bb1b1 Mon Sep 17 00:00:00 2001 From: George Mao Date: Wed, 10 Jun 2020 16:12:53 -0700 Subject: [PATCH 137/930] Fixing Iron165 VIA Keymap (#9298) * Fixing via issues * Fixing whitespace issues on the keymap * Fixed the default via layer 1 keymap, was a little weird before * Removing redundant declarations in via/rules.mk --- .../cannonkeys/iron165/keymaps/via/keymap.c | 40 ++++++++++++++----- .../cannonkeys/iron165/keymaps/via/rules.mk | 5 +-- 2 files changed, 30 insertions(+), 15 deletions(-) diff --git a/keyboards/cannonkeys/iron165/keymaps/via/keymap.c b/keyboards/cannonkeys/iron165/keymaps/via/keymap.c index ac0efd62c443..610b442cdc60 100644 --- a/keyboards/cannonkeys/iron165/keymaps/via/keymap.c +++ b/keyboards/cannonkeys/iron165/keymaps/via/keymap.c @@ -24,23 +24,41 @@ along with this program. If not, see . enum layer_names { _BASE, _FN1, + _FN2, + _FN3 }; const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [_BASE] = 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_GRV, 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_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_NUBS, KC_ENT, KC_PGUP, - 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_PGDN, - KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, MO(_FN1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT + [_BASE] = 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_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_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_PGUP, + 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_PGDN, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, MO(_FN1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT ), [_FN1] = LAYOUT_default( - 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_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, - BL_BRTG, 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, - BL_INC, BL_DEC, BL_TOGG, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_GRV, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RESET, KC_TRNS, KC_TRNS + 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_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 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_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_MPRV, KC_MPLY, KC_MNXT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 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( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 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( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 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/iron165/keymaps/via/rules.mk b/keyboards/cannonkeys/iron165/keymaps/via/rules.mk index d12497792d56..16d33cd89fe4 100644 --- a/keyboards/cannonkeys/iron165/keymaps/via/rules.mk +++ b/keyboards/cannonkeys/iron165/keymaps/via/rules.mk @@ -1,5 +1,2 @@ -# rules.mk overrides to enable VIA - -RAW_ENABLE = yes -DYNAMIC_KEYMAP_ENABLE = yes +VIA_ENABLE = yes From 9b0c7347333967df1e3e3611c0ef85c57f7f0ad7 Mon Sep 17 00:00:00 2001 From: James Young <18669334+noroadsleft@users.noreply.github.com> Date: Thu, 11 Jun 2020 04:07:15 -0700 Subject: [PATCH 138/930] Fix Configurator layout data for clueboard/2x1800/2019 (#9373) --- keyboards/clueboard/2x1800/2019/info.json | 1215 ++++++++++++++++++++- 1 file changed, 1189 insertions(+), 26 deletions(-) diff --git a/keyboards/clueboard/2x1800/2019/info.json b/keyboards/clueboard/2x1800/2019/info.json index 0e3bb36a9d88..dcd153c86d19 100644 --- a/keyboards/clueboard/2x1800/2019/info.json +++ b/keyboards/clueboard/2x1800/2019/info.json @@ -1,41 +1,1204 @@ { - "keyboard_name": "Clueboard 2x1800", + "keyboard_name": "Clueboard 2x1800 2019", "url": "", "maintainer": "skullydazed", "width": 24, - "height": 6.5, + "height": 8, "layouts": { - "LAYOUT": { - "key_count": 127, + "LAYOUT_all": { "layout": [ - {"label":"Home", "x":0, "y":0}, {"label":"End", "x":1, "y":0}, {"label":"PgUp", "x":2, "y":0}, {"label":"PgDn", "x":3, "y":0}, {"label":"Esc", "x":4.75, "y":0}, {"label":"F1", "x":6.25, "y":0}, {"label":"F2", "x":7.25, "y":0}, {"label":"F3", "x":8.25, "y":0}, {"label":"F4", "x":9.25, "y":0}, {"label":"F5", "x":10.75, "y":0}, {"label":"F6", "x":11.75, "y":0}, {"label":"F7", "x":12.75, "y":0}, {"label":"F8", "x":13.75, "y":0}, {"label":"F9", "x":15.25, "y":0}, {"label":"F10", "x":16.25, "y":0}, {"label":"F11", "x":17.25, "y":0}, {"label":"F12", "x":18.25, "y":0}, {"label":"PrtSc", "x":20, "y":0}, {"label":"Scroll Lock", "x":21, "y":0}, {"label":"Pause", "x":22, "y":0}, {"label":"Insert", "x":23, "y":0}, - {"label":"-", "x":0, "y":1.25}, {"label":"Num Lock", "x":1, "y":1.25}, {"label":"/", "x":2, "y":1.25}, {"label":"*", "x":3, "y":1.25}, {"label":"~", "x":4.5, "y":1.25}, {"label":"!", "x":5.5, "y":1.25}, {"label":"@", "x":6.5, "y":1.25}, {"label":"#", "x":7.5, "y":1.25}, {"label":"$", "x":8.5, "y":1.25}, {"label":"%", "x":9.5, "y":1.25}, {"label":"^", "x":10.5, "y":1.25}, {"label":"&", "x":11.5, "y":1.25}, {"label":"*", "x":12.5, "y":1.25}, {"label":"(", "x":13.5, "y":1.25}, {"label":")", "x":14.5, "y":1.25}, {"label":"_", "x":15.5, "y":1.25}, {"label":"+", "x":16.5, "y":1.25}, {"label":"Backspace", "x":17.5, "y":1.25, "w":2}, {"label":"Num Lock", "x":20, "y":1.25}, {"label":"/", "x":21, "y":1.25}, {"label":"*", "x":22, "y":1.25}, {"label":"-", "x":23, "y":1.25}, - {"label":"+", "x":0, "y":2.25, "h":2}, {"label":"7", "x":1, "y":2.25}, {"label":"8", "x":2, "y":2.25}, {"label":"9", "x":3, "y":2.25}, {"label":"Tab", "x":4.5, "y":2.25, "w":1.5}, {"label":"Q", "x":6, "y":2.25}, {"label":"W", "x":7, "y":2.25}, {"label":"E", "x":8, "y":2.25}, {"label":"R", "x":9, "y":2.25}, {"label":"T", "x":10, "y":2.25}, {"label":"Y", "x":11, "y":2.25}, {"label":"U", "x":12, "y":2.25}, {"label":"I", "x":13, "y":2.25}, {"label":"O", "x":14, "y":2.25}, {"label":"P", "x":15, "y":2.25}, {"label":"{", "x":16, "y":2.25}, {"label":"}", "x":17, "y":2.25}, {"label":"|", "x":18, "y":2.25, "w":1.5}, {"label":"7", "x":20, "y":2.25}, {"label":"8", "x":21, "y":2.25}, {"label":"9", "x":22, "y":2.25}, {"label":"+", "x":23, "y":2.25, "h":2}, - {"label":"4", "x":1, "y":3.25}, {"label":"5", "x":2, "y":3.25}, {"label":"6", "x":3, "y":3.25}, {"label":"Caps Lock", "x":4.5, "y":3.25, "w":1.75}, {"label":"A", "x":6.25, "y":3.25}, {"label":"S", "x":7.25, "y":3.25}, {"label":"D", "x":8.25, "y":3.25}, {"label":"F", "x":9.25, "y":3.25}, {"label":"G", "x":10.25, "y":3.25}, {"label":"H", "x":11.25, "y":3.25}, {"label":"J", "x":12.25, "y":3.25}, {"label":"K", "x":13.25, "y":3.25}, {"label":"L", "x":14.25, "y":3.25}, {"label":":", "x":15.25, "y":3.25}, {"label":"\"", "x":16.25, "y":3.25}, {"label":"Enter", "x":17.25, "y":3.25, "w":2.25}, {"label":"4", "x":20, "y":3.25}, {"label":"5", "x":21, "y":3.25}, {"label":"6", "x":22, "y":3.25}, - {"label":"Enter", "x":0, "y":4.25, "h":2}, {"label":"1", "x":1, "y":4.25}, {"label":"2", "x":2, "y":4.25}, {"label":"3", "x":3, "y":4.25}, {"label":"\\u2191", "x":4.25, "y":4.5}, {"label":"Shift", "x":5.5, "y":4.25, "w":1.25}, {"label":"Z", "x":6.75, "y":4.25}, {"label":"X", "x":7.75, "y":4.25}, {"label":"C", "x":8.75, "y":4.25}, {"label":"V", "x":9.75, "y":4.25}, {"label":"B", "x":10.75, "y":4.25}, {"label":"N", "x":11.75, "y":4.25}, {"label":"M", "x":12.75, "y":4.25}, {"label":"<", "x":13.75, "y":4.25}, {"label":">", "x":14.75, "y":4.25}, {"label":"?", "x":15.75, "y":4.25}, {"label":"Shift", "x":16.75, "y":4.25, "w":1.75}, {"label":"\\u2191", "x":18.75, "y":4.5}, {"label":"1", "x":20, "y":4.25}, {"label":"2", "x":21, "y":4.25}, {"label":"3", "x":22, "y":4.25}, {"label":"Enter", "x":23, "y":4.25, "h":2}, - {"label":"0", "x":1, "y":5.25}, {"label":".", "x":2, "y":5.25}, {"label":"\\u2190", "x":3.25, "y":5.5}, {"label":"\\u2193", "x":4.25, "y":5.5}, {"label":"\\u2192", "x":5.25, "y":5.5}, {"label":"Ctrl", "x":6.5, "y":5.25}, {"label":"Win", "x":7.5, "y":5.25}, {"label":"Alt", "x":8.5, "y":5.25}, {"label":"1u", "x":9.5, "y":5.25}, {"label":"1u", "x":10.5, "y":5.25}, {"label":"1u", "x":11.5, "y":5.25}, {"label":"1u", "x":12.5, "y":5.25}, {"label":"Alt", "x":13.5, "y":5.25}, {"label":"Win", "x":14.5, "y":5.25}, {"label":"Menu", "x":15.5, "y":5.25}, {"label":"Ctrl", "x":16.5, "y":5.25}, {"label":"\\u2190", "x":17.75, "y":5.5}, {"label":"\\u2193", "x":18.75, "y":5.5}, {"label":"\\u2192", "x":19.75, "y":5.5}, {"label":"0", "x":21, "y":5.25}, {"label":".", "x":22, "y":5.25} + {"label":"e00", "x":3, "y":0}, + {"label":"e01", "x":4, "y":0}, + {"label":"e02", "x":19, "y":0}, + {"label":"e03", "x":20, "y":0}, + {"label":"k00", "x":0, "y":1.5}, + {"label":"k01", "x":1, "y":1.5}, + {"label":"k02", "x":2, "y":1.5}, + {"label":"k03", "x":3, "y":1.5}, + {"label":"k04", "x":4.75, "y":1.5}, + {"label":"k06", "x":6.25, "y":1.5}, + {"label":"k07", "x":7.25, "y":1.5}, + {"label":"k08", "x":8.25, "y":1.5}, + {"label":"k09", "x":9.25, "y":1.5}, + {"label":"k0a", "x":10.75, "y":1.5}, + {"label":"k60", "x":11.75, "y":1.5}, + {"label":"k61", "x":12.75, "y":1.5}, + {"label":"k62", "x":13.75, "y":1.5}, + {"label":"k63", "x":15.25, "y":1.5}, + {"label":"k64", "x":16.25, "y":1.5}, + {"label":"k65", "x":17.25, "y":1.5}, + {"label":"k66", "x":18.25, "y":1.5}, + {"label":"k67", "x":20, "y":1.5}, + {"label":"k68", "x":21, "y":1.5}, + {"label":"k69", "x":22, "y":1.5}, + {"label":"k6a", "x":23, "y":1.5}, + {"label":"k10", "x":0, "y":2.75}, + {"label":"k11", "x":1, "y":2.75}, + {"label":"k12", "x":2, "y":2.75}, + {"label":"k13", "x":3, "y":2.75}, + {"label":"k14", "x":4.5, "y":2.75}, + {"label":"k15", "x":5.5, "y":2.75}, + {"label":"k16", "x":6.5, "y":2.75}, + {"label":"k17", "x":7.5, "y":2.75}, + {"label":"k18", "x":8.5, "y":2.75}, + {"label":"k19", "x":9.5, "y":2.75}, + {"label":"k1a", "x":10.5, "y":2.75}, + {"label":"k70", "x":11.5, "y":2.75}, + {"label":"k71", "x":12.5, "y":2.75}, + {"label":"k72", "x":13.5, "y":2.75}, + {"label":"k73", "x":14.5, "y":2.75}, + {"label":"k74", "x":15.5, "y":2.75}, + {"label":"k75", "x":16.5, "y":2.75}, + {"label":"k76", "x":17.5, "y":2.75, "w":2}, + {"label":"k77", "x":20, "y":2.75}, + {"label":"k78", "x":21, "y":2.75}, + {"label":"k79", "x":22, "y":2.75}, + {"label":"k7a", "x":23, "y":2.75}, + {"label":"k20", "x":0, "y":3.75, "h":2}, + {"label":"k21", "x":1, "y":3.75}, + {"label":"k22", "x":2, "y":3.75}, + {"label":"k23", "x":3, "y":3.75}, + {"label":"k24", "x":4.5, "y":3.75, "w":1.5}, + {"label":"k25", "x":6, "y":3.75}, + {"label":"k26", "x":7, "y":3.75}, + {"label":"k27", "x":8, "y":3.75}, + {"label":"k28", "x":9, "y":3.75}, + {"label":"k29", "x":10, "y":3.75}, + {"label":"k2a", "x":11, "y":3.75}, + {"label":"k80", "x":12, "y":3.75}, + {"label":"k81", "x":13, "y":3.75}, + {"label":"k82", "x":14, "y":3.75}, + {"label":"k83", "x":15, "y":3.75}, + {"label":"k84", "x":16, "y":3.75}, + {"label":"k85", "x":17, "y":3.75}, + {"label":"k86", "x":18, "y":3.75, "w":1.5}, + {"label":"k87", "x":20, "y":3.75}, + {"label":"k88", "x":21, "y":3.75}, + {"label":"k89", "x":22, "y":3.75}, + {"label":"k8a", "x":23, "y":3.75, "h":2}, + {"label":"k31", "x":1, "y":4.75}, + {"label":"k32", "x":2, "y":4.75}, + {"label":"k33", "x":3, "y":4.75}, + {"label":"k34", "x":4.5, "y":4.75, "w":1.75}, + {"label":"k35", "x":6.25, "y":4.75}, + {"label":"k36", "x":7.25, "y":4.75}, + {"label":"k37", "x":8.25, "y":4.75}, + {"label":"k38", "x":9.25, "y":4.75}, + {"label":"k39", "x":10.25, "y":4.75}, + {"label":"k3a", "x":11.25, "y":4.75}, + {"label":"k90", "x":12.25, "y":4.75}, + {"label":"k91", "x":13.25, "y":4.75}, + {"label":"k92", "x":14.25, "y":4.75}, + {"label":"k93", "x":15.25, "y":4.75}, + {"label":"k94", "x":16.25, "y":4.75}, + {"label":"k9a", "x":17.25, "y":4.75}, + {"label":"k95", "x":18.25, "y":4.75, "w":1.25}, + {"label":"k97", "x":20, "y":4.75}, + {"label":"k98", "x":21, "y":4.75}, + {"label":"k99", "x":22, "y":4.75}, + {"label":"k40", "x":0, "y":5.75, "h":2}, + {"label":"k41", "x":1, "y":5.75}, + {"label":"k42", "x":2, "y":5.75}, + {"label":"k43", "x":3, "y":5.75}, + {"label":"k44", "x":4.25, "y":6}, + {"label":"k45", "x":5.5, "y":5.75, "w":1.25}, + {"label":"k46", "x":6.75, "y":5.75}, + {"label":"k47", "x":7.75, "y":5.75}, + {"label":"k48", "x":8.75, "y":5.75}, + {"label":"k49", "x":9.75, "y":5.75}, + {"label":"k4a", "x":10.75, "y":5.75}, + {"label":"ka0", "x":11.75, "y":5.75}, + {"label":"ka1", "x":12.75, "y":5.75}, + {"label":"ka2", "x":13.75, "y":5.75}, + {"label":"ka3", "x":14.75, "y":5.75}, + {"label":"ka4", "x":15.75, "y":5.75}, + {"label":"ka5", "x":16.75, "y":5.75, "w":1.75}, + {"label":"k96", "x":18.75, "y":6}, + {"label":"ka7", "x":20, "y":5.75}, + {"label":"ka8", "x":21, "y":5.75}, + {"label":"ka9", "x":22, "y":5.75}, + {"label":"kaa", "x":23, "y":5.75, "h":2}, + {"label":"k51", "x":1, "y":6.75}, + {"label":"k52", "x":2, "y":6.75}, + {"label":"k53", "x":3.25, "y":7}, + {"label":"k54", "x":4.25, "y":7}, + {"label":"k55", "x":5.25, "y":7}, + {"label":"k56", "x":6.5, "y":6.75}, + {"label":"k57", "x":7.5, "y":6.75}, + {"label":"k58", "x":8.5, "y":6.75}, + {"label":"k59", "x":9.5, "y":6.75}, + {"label":"k5a", "x":10.5, "y":6.75}, + {"label":"kb0", "x":11.5, "y":6.75}, + {"label":"kb1", "x":12.5, "y":6.75}, + {"label":"kb2", "x":13.5, "y":6.75}, + {"label":"kb3", "x":14.5, "y":6.75}, + {"label":"kb4", "x":15.5, "y":6.75}, + {"label":"kb5", "x":16.5, "y":6.75}, + {"label":"ka6", "x":17.75, "y":7}, + {"label":"kb6", "x":18.75, "y":7}, + {"label":"kb7", "x":19.75, "y":7}, + {"label":"kb8", "x":21, "y":6.75}, + {"label":"kb9", "x":22, "y":6.75} ] }, - "LAYOUT_7u_space": { - "key_count": 121, + "LAYOUT_1u_ansi": { "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.75, "y":0}, {"label":"k06", "x":6.25, "y":0}, {"label":"k07", "x":7.25, "y":0}, {"label":"k08", "x":8.25, "y":0}, {"label":"k09", "x":9.25, "y":0}, {"label":"k0a", "x":10.75, "y":0}, {"label":"k60", "x":11.75, "y":0}, {"label":"k61", "x":12.75, "y":0}, {"label":"k62", "x":13.75, "y":0}, {"label":"k63", "x":15.25, "y":0}, {"label":"k64", "x":16.25, "y":0}, {"label":"k65", "x":17.25, "y":0}, {"label":"k66", "x":18.25, "y":0}, {"label":"k67", "x":20, "y":0}, {"label":"k68", "x":21, "y":0}, {"label":"k69", "x":22, "y":0}, {"label":"k6a", "x":23, "y":0}, - {"label":"k10", "x":0, "y":1.25}, {"label":"k11", "x":1, "y":1.25}, {"label":"k12", "x":2, "y":1.25}, {"label":"k13", "x":3, "y":1.25}, {"label":"k14", "x":4.5, "y":1.25}, {"label":"k15", "x":5.5, "y":1.25}, {"label":"k16", "x":6.5, "y":1.25}, {"label":"k17", "x":7.5, "y":1.25}, {"label":"k18", "x":8.5, "y":1.25}, {"label":"k19", "x":9.5, "y":1.25}, {"label":"k0a", "x":10.5, "y":1.25}, {"label":"k70", "x":11.5, "y":1.25}, {"label":"k71", "x":12.5, "y":1.25}, {"label":"k72", "x":13.5, "y":1.25}, {"label":"k73", "x":14.5, "y":1.25}, {"label":"k74", "x":15.5, "y":1.25}, {"label":"k75", "x":16.5, "y":1.25}, {"label":"k76", "x":17.5, "y":1.25, "w":2}, {"label":"k77", "x":20, "y":1.25}, {"label":"k78", "x":21, "y":1.25}, {"label":"k79", "x":22, "y":1.25}, {"label":"k7a", "x":23, "y":1.25}, - {"label":"k20", "x":0, "y":2.25, "h":2}, {"label":"k21", "x":1, "y":2.25}, {"label":"k22", "x":2, "y":2.25}, {"label":"k23", "x":3, "y":2.25}, {"label":"k24", "x":4.5, "y":2.25, "w":1.5}, {"label":"k25", "x":6, "y":2.25}, {"label":"k26", "x":7, "y":2.25}, {"label":"k27", "x":8, "y":2.25}, {"label":"k28", "x":9, "y":2.25}, {"label":"k29", "x":10, "y":2.25}, {"label":"k2a", "x":11, "y":2.25}, {"label":"k80", "x":12, "y":2.25}, {"label":"k81", "x":13, "y":2.25}, {"label":"k82", "x":14, "y":2.25}, {"label":"k83", "x":15, "y":2.25}, {"label":"k84", "x":16, "y":2.25}, {"label":"k85", "x":17, "y":2.25}, {"label":"k86", "x":18, "y":2.25, "w":1.5}, {"label":"k87", "x":20, "y":2.25}, {"label":"k88", "x":21, "y":2.25}, {"label":"k89", "x":22, "y":2.25}, {"label":"k8a", "x":23, "y":2.25, "h":2}, - {"label":"k31", "x":1, "y":3.25}, {"label":"k32", "x":2, "y":3.25}, {"label":"k33", "x":3, "y":3.25}, {"label":"k34", "x":4.5, "y":3.25, "w":1.75}, {"label":"k35", "x":6.25, "y":3.25}, {"label":"k36", "x":7.25, "y":3.25}, {"label":"k37", "x":8.25, "y":3.25}, {"label":"k38", "x":9.25, "y":3.25}, {"label":"k39", "x":10.25, "y":3.25}, {"label":"k3a", "x":11.25, "y":3.25}, {"label":"k90", "x":12.25, "y":3.25}, {"label":"k91", "x":13.25, "y":3.25}, {"label":"k92", "x":14.25, "y":3.25}, {"label":"k93", "x":15.25, "y":3.25}, {"label":"k94", "x":16.25, "y":3.25}, {"label":"k95", "x":17.25, "y":3.25, "w":2.25}, {"label":"k97", "x":20, "y":3.25}, {"label":"k98", "x":21, "y":3.25}, {"label":"k99", "x":22, "y":3.25}, - {"label":"k40", "x":0, "y":4.25, "h":2}, {"label":"k41", "x":1, "y":4.25}, {"label":"k42", "x":2, "y":4.25}, {"label":"k43", "x":3, "y":4.25}, {"label":"k45", "x":5.5, "y":4.25, "w":1.25}, {"label":"k46", "x":6.75, "y":4.25}, {"label":"k47", "x":7.75, "y":4.25}, {"label":"k48", "x":8.75, "y":4.25}, {"label":"k49", "x":9.75, "y":4.25}, {"label":"k4a", "x":10.75, "y":4.25}, {"label":"ka0", "x":11.75, "y":4.25}, {"label":"ka1", "x":12.75, "y":4.25}, {"label":"ka2", "x":13.75, "y":4.25}, {"label":"ka3", "x":14.75, "y":4.25}, {"label":"ka4", "x":15.75, "y":4.25}, {"label":"ka5", "x":16.75, "y":4.25, "w":1.75}, {"label":"ka7", "x":20, "y":4.25}, {"label":"ka8", "x":21, "y":4.25}, {"label":"ka9", "x":22, "y":4.25}, {"label":"kaa", "x":23, "y":4.25, "h":2}, {"label":"k44", "x":4.25, "y":4.5}, {"label":"k96", "x":18.75, "y":4.5}, - {"label":"k51", "x":1, "y":5.25}, {"label":"k52", "x":2, "y":5.25}, {"label":"k56", "x":6.5, "y":5.25}, {"label":"k57", "x":7.5, "y":5.25}, {"label":"kb0", "x":8.5, "y":5.25, "w":7}, {"label":"kb4", "x":15.5, "y":5.25}, {"label":"kb5", "x":16.5, "y":5.25}, {"label":"kb8", "x":21, "y":5.25}, {"label":"kb9", "x":22, "y":5.25}, {"label":"k53", "x":3.25, "y":5.5}, {"label":"k54", "x":4.25, "y":5.5}, {"label":"k55", "x":5.25, "y":5.5}, {"label":"ka6", "x":17.75, "y":5.5}, {"label":"kb6", "x":18.75, "y":5.5}, {"label":"kb7", "x":19.75, "y":5.5} + {"label":"e00", "x":3, "y":0}, + {"label":"e01", "x":4, "y":0}, + {"label":"e02", "x":19, "y":0}, + {"label":"e03", "x":20, "y":0}, + {"label":"k00", "x":0, "y":1.5}, + {"label":"k01", "x":1, "y":1.5}, + {"label":"k02", "x":2, "y":1.5}, + {"label":"k03", "x":3, "y":1.5}, + {"label":"k04", "x":4.75, "y":1.5}, + {"label":"k06", "x":6.25, "y":1.5}, + {"label":"k07", "x":7.25, "y":1.5}, + {"label":"k08", "x":8.25, "y":1.5}, + {"label":"k09", "x":9.25, "y":1.5}, + {"label":"k0a", "x":10.75, "y":1.5}, + {"label":"k60", "x":11.75, "y":1.5}, + {"label":"k61", "x":12.75, "y":1.5}, + {"label":"k62", "x":13.75, "y":1.5}, + {"label":"k63", "x":15.25, "y":1.5}, + {"label":"k64", "x":16.25, "y":1.5}, + {"label":"k65", "x":17.25, "y":1.5}, + {"label":"k66", "x":18.25, "y":1.5}, + {"label":"k67", "x":20, "y":1.5}, + {"label":"k68", "x":21, "y":1.5}, + {"label":"k69", "x":22, "y":1.5}, + {"label":"k6a", "x":23, "y":1.5}, + {"label":"k10", "x":0, "y":2.75}, + {"label":"k11", "x":1, "y":2.75}, + {"label":"k12", "x":2, "y":2.75}, + {"label":"k13", "x":3, "y":2.75}, + {"label":"k14", "x":4.5, "y":2.75}, + {"label":"k15", "x":5.5, "y":2.75}, + {"label":"k16", "x":6.5, "y":2.75}, + {"label":"k17", "x":7.5, "y":2.75}, + {"label":"k18", "x":8.5, "y":2.75}, + {"label":"k19", "x":9.5, "y":2.75}, + {"label":"k1a", "x":10.5, "y":2.75}, + {"label":"k70", "x":11.5, "y":2.75}, + {"label":"k71", "x":12.5, "y":2.75}, + {"label":"k72", "x":13.5, "y":2.75}, + {"label":"k73", "x":14.5, "y":2.75}, + {"label":"k74", "x":15.5, "y":2.75}, + {"label":"k75", "x":16.5, "y":2.75}, + {"label":"k76", "x":17.5, "y":2.75, "w":2}, + {"label":"k77", "x":20, "y":2.75}, + {"label":"k78", "x":21, "y":2.75}, + {"label":"k79", "x":22, "y":2.75}, + {"label":"k7a", "x":23, "y":2.75}, + {"label":"k20", "x":0, "y":3.75, "h":2}, + {"label":"k21", "x":1, "y":3.75}, + {"label":"k22", "x":2, "y":3.75}, + {"label":"k23", "x":3, "y":3.75}, + {"label":"k24", "x":4.5, "y":3.75, "w":1.5}, + {"label":"k25", "x":6, "y":3.75}, + {"label":"k26", "x":7, "y":3.75}, + {"label":"k27", "x":8, "y":3.75}, + {"label":"k28", "x":9, "y":3.75}, + {"label":"k29", "x":10, "y":3.75}, + {"label":"k2a", "x":11, "y":3.75}, + {"label":"k80", "x":12, "y":3.75}, + {"label":"k81", "x":13, "y":3.75}, + {"label":"k82", "x":14, "y":3.75}, + {"label":"k83", "x":15, "y":3.75}, + {"label":"k84", "x":16, "y":3.75}, + {"label":"k85", "x":17, "y":3.75}, + {"label":"k86", "x":18, "y":3.75, "w":1.5}, + {"label":"k87", "x":20, "y":3.75}, + {"label":"k88", "x":21, "y":3.75}, + {"label":"k89", "x":22, "y":3.75}, + {"label":"k8a", "x":23, "y":3.75, "h":2}, + {"label":"k31", "x":1, "y":4.75}, + {"label":"k32", "x":2, "y":4.75}, + {"label":"k33", "x":3, "y":4.75}, + {"label":"k34", "x":4.5, "y":4.75, "w":1.75}, + {"label":"k35", "x":6.25, "y":4.75}, + {"label":"k36", "x":7.25, "y":4.75}, + {"label":"k37", "x":8.25, "y":4.75}, + {"label":"k38", "x":9.25, "y":4.75}, + {"label":"k39", "x":10.25, "y":4.75}, + {"label":"k3a", "x":11.25, "y":4.75}, + {"label":"k90", "x":12.25, "y":4.75}, + {"label":"k91", "x":13.25, "y":4.75}, + {"label":"k92", "x":14.25, "y":4.75}, + {"label":"k93", "x":15.25, "y":4.75}, + {"label":"k94", "x":16.25, "y":4.75}, + {"label":"k95", "x":17.25, "y":4.75, "w":2.25}, + {"label":"k97", "x":20, "y":4.75}, + {"label":"k98", "x":21, "y":4.75}, + {"label":"k99", "x":22, "y":4.75}, + {"label":"k40", "x":0, "y":5.75, "h":2}, + {"label":"k41", "x":1, "y":5.75}, + {"label":"k42", "x":2, "y":5.75}, + {"label":"k43", "x":3, "y":5.75}, + {"label":"k44", "x":4.25, "y":6}, + {"label":"k45", "x":5.5, "y":5.75, "w":1.25}, + {"label":"k46", "x":6.75, "y":5.75}, + {"label":"k47", "x":7.75, "y":5.75}, + {"label":"k48", "x":8.75, "y":5.75}, + {"label":"k49", "x":9.75, "y":5.75}, + {"label":"k4a", "x":10.75, "y":5.75}, + {"label":"ka0", "x":11.75, "y":5.75}, + {"label":"ka1", "x":12.75, "y":5.75}, + {"label":"ka2", "x":13.75, "y":5.75}, + {"label":"ka3", "x":14.75, "y":5.75}, + {"label":"ka4", "x":15.75, "y":5.75}, + {"label":"ka5", "x":16.75, "y":5.75, "w":1.75}, + {"label":"k96", "x":18.75, "y":6}, + {"label":"ka7", "x":20, "y":5.75}, + {"label":"ka8", "x":21, "y":5.75}, + {"label":"ka9", "x":22, "y":5.75}, + {"label":"kaa", "x":23, "y":5.75, "h":2}, + {"label":"k51", "x":1, "y":6.75}, + {"label":"k52", "x":2, "y":6.75}, + {"label":"k53", "x":3.25, "y":7}, + {"label":"k54", "x":4.25, "y":7}, + {"label":"k55", "x":5.25, "y":7}, + {"label":"k56", "x":6.5, "y":6.75}, + {"label":"k57", "x":7.5, "y":6.75}, + {"label":"k58", "x":8.5, "y":6.75}, + {"label":"k59", "x":9.5, "y":6.75}, + {"label":"k5a", "x":10.5, "y":6.75}, + {"label":"kb0", "x":11.5, "y":6.75}, + {"label":"kb1", "x":12.5, "y":6.75}, + {"label":"kb2", "x":13.5, "y":6.75}, + {"label":"kb3", "x":14.5, "y":6.75}, + {"label":"kb4", "x":15.5, "y":6.75}, + {"label":"kb5", "x":16.5, "y":6.75}, + {"label":"ka6", "x":17.75, "y":7}, + {"label":"kb6", "x":18.75, "y":7}, + {"label":"kb7", "x":19.75, "y":7}, + {"label":"kb8", "x":21, "y":6.75}, + {"label":"kb9", "x":22, "y":6.75} ] }, - "LAYOUT_4u_space": { - "key_count": 124, + "LAYOUT_1u_iso": { "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.75, "y":0}, {"label":"k06", "x":6.25, "y":0}, {"label":"k07", "x":7.25, "y":0}, {"label":"k08", "x":8.25, "y":0}, {"label":"k09", "x":9.25, "y":0}, {"label":"k0a", "x":10.75, "y":0}, {"label":"k60", "x":11.75, "y":0}, {"label":"k61", "x":12.75, "y":0}, {"label":"k62", "x":13.75, "y":0}, {"label":"k63", "x":15.25, "y":0}, {"label":"k64", "x":16.25, "y":0}, {"label":"k65", "x":17.25, "y":0}, {"label":"k66", "x":18.25, "y":0}, {"label":"k67", "x":20, "y":0}, {"label":"k68", "x":21, "y":0}, {"label":"k69", "x":22, "y":0}, {"label":"k6a", "x":23, "y":0}, - {"label":"k10", "x":0, "y":1.25}, {"label":"k11", "x":1, "y":1.25}, {"label":"k12", "x":2, "y":1.25}, {"label":"k13", "x":3, "y":1.25}, {"label":"k14", "x":4.5, "y":1.25}, {"label":"k15", "x":5.5, "y":1.25}, {"label":"k16", "x":6.5, "y":1.25}, {"label":"k17", "x":7.5, "y":1.25}, {"label":"k18", "x":8.5, "y":1.25}, {"label":"k19", "x":9.5, "y":1.25}, {"label":"k0a", "x":10.5, "y":1.25}, {"label":"k70", "x":11.5, "y":1.25}, {"label":"k71", "x":12.5, "y":1.25}, {"label":"k72", "x":13.5, "y":1.25}, {"label":"k73", "x":14.5, "y":1.25}, {"label":"k74", "x":15.5, "y":1.25}, {"label":"k75", "x":16.5, "y":1.25}, {"label":"k76", "x":17.5, "y":1.25, "w":2}, {"label":"k77", "x":20, "y":1.25}, {"label":"k78", "x":21, "y":1.25}, {"label":"k79", "x":22, "y":1.25}, {"label":"k7a", "x":23, "y":1.25}, - {"label":"k20", "x":0, "y":2.25, "h":2}, {"label":"k21", "x":1, "y":2.25}, {"label":"k22", "x":2, "y":2.25}, {"label":"k23", "x":3, "y":2.25}, {"label":"k24", "x":4.5, "y":2.25, "w":1.5}, {"label":"k25", "x":6, "y":2.25}, {"label":"k26", "x":7, "y":2.25}, {"label":"k27", "x":8, "y":2.25}, {"label":"k28", "x":9, "y":2.25}, {"label":"k29", "x":10, "y":2.25}, {"label":"k2a", "x":11, "y":2.25}, {"label":"k80", "x":12, "y":2.25}, {"label":"k81", "x":13, "y":2.25}, {"label":"k82", "x":14, "y":2.25}, {"label":"k83", "x":15, "y":2.25}, {"label":"k84", "x":16, "y":2.25}, {"label":"k85", "x":17, "y":2.25}, {"label":"k86", "x":18, "y":2.25, "w":1.5}, {"label":"k87", "x":20, "y":2.25}, {"label":"k88", "x":21, "y":2.25}, {"label":"k89", "x":22, "y":2.25}, {"label":"k8a", "x":23, "y":2.25, "h":2}, - {"label":"k31", "x":1, "y":3.25}, {"label":"k32", "x":2, "y":3.25}, {"label":"k33", "x":3, "y":3.25}, {"label":"k34", "x":4.5, "y":3.25, "w":1.75}, {"label":"k35", "x":6.25, "y":3.25}, {"label":"k36", "x":7.25, "y":3.25}, {"label":"k37", "x":8.25, "y":3.25}, {"label":"k38", "x":9.25, "y":3.25}, {"label":"k39", "x":10.25, "y":3.25}, {"label":"k3a", "x":11.25, "y":3.25}, {"label":"k90", "x":12.25, "y":3.25}, {"label":"k91", "x":13.25, "y":3.25}, {"label":"k92", "x":14.25, "y":3.25}, {"label":"k93", "x":15.25, "y":3.25}, {"label":"k94", "x":16.25, "y":3.25}, {"label":"k95", "x":17.25, "y":3.25, "w":2.25}, {"label":"k97", "x":20, "y":3.25}, {"label":"k98", "x":21, "y":3.25}, {"label":"k99", "x":22, "y":3.25}, - {"label":"k40", "x":0, "y":4.25, "h":2}, {"label":"k41", "x":1, "y":4.25}, {"label":"k42", "x":2, "y":4.25}, {"label":"k43", "x":3, "y":4.25}, {"label":"k45", "x":5.5, "y":4.25, "w":1.25}, {"label":"k46", "x":6.75, "y":4.25}, {"label":"k47", "x":7.75, "y":4.25}, {"label":"k48", "x":8.75, "y":4.25}, {"label":"k49", "x":9.75, "y":4.25}, {"label":"k4a", "x":10.75, "y":4.25}, {"label":"ka0", "x":11.75, "y":4.25}, {"label":"ka1", "x":12.75, "y":4.25}, {"label":"ka2", "x":13.75, "y":4.25}, {"label":"ka3", "x":14.75, "y":4.25}, {"label":"ka4", "x":15.75, "y":4.25}, {"label":"ka5", "x":16.75, "y":4.25, "w":1.75}, {"label":"ka7", "x":20, "y":4.25}, {"label":"ka8", "x":21, "y":4.25}, {"label":"ka9", "x":22, "y":4.25}, {"label":"kaa", "x":23, "y":4.25, "h":2}, {"label":"k44", "x":4.25, "y":4.5}, {"label":"k96", "x":18.75, "y":4.5}, - {"label":"k51", "x":1, "y":5.25}, {"label":"k52", "x":2, "y":5.25}, {"label":"k56", "x":6.5, "y":5.25}, {"label":"k57", "x":7.5, "y":5.25}, {"label":"k58", "x":8.5, "y":5.25}, {"label":"kb0", "x":9.5, "y":5.25, "w":4}, {"label":"kb2", "x":13.5, "y":5.25}, {"label":"kb3", "x":14.5, "y":5.25}, {"label":"kb4", "x":15.5, "y":5.25}, {"label":"kb5", "x":16.5, "y":5.25}, {"label":"kb8", "x":21, "y":5.25}, {"label":"kb9", "x":22, "y":5.25}, {"label":"k53", "x":3.25, "y":5.5}, {"label":"k54", "x":4.25, "y":5.5}, {"label":"k55", "x":5.25, "y":5.5}, {"label":"ka6", "x":17.75, "y":5.5}, {"label":"kb6", "x":18.75, "y":5.5}, {"label":"kb7", "x":19.75, "y":5.5} + {"label":"e00", "x":3, "y":0}, + {"label":"e01", "x":4, "y":0}, + {"label":"e02", "x":19, "y":0}, + {"label":"e03", "x":20, "y":0}, + {"label":"k00", "x":0, "y":1.5}, + {"label":"k01", "x":1, "y":1.5}, + {"label":"k02", "x":2, "y":1.5}, + {"label":"k03", "x":3, "y":1.5}, + {"label":"k04", "x":4.75, "y":1.5}, + {"label":"k06", "x":6.25, "y":1.5}, + {"label":"k07", "x":7.25, "y":1.5}, + {"label":"k08", "x":8.25, "y":1.5}, + {"label":"k09", "x":9.25, "y":1.5}, + {"label":"k0a", "x":10.75, "y":1.5}, + {"label":"k60", "x":11.75, "y":1.5}, + {"label":"k61", "x":12.75, "y":1.5}, + {"label":"k62", "x":13.75, "y":1.5}, + {"label":"k63", "x":15.25, "y":1.5}, + {"label":"k64", "x":16.25, "y":1.5}, + {"label":"k65", "x":17.25, "y":1.5}, + {"label":"k66", "x":18.25, "y":1.5}, + {"label":"k67", "x":20, "y":1.5}, + {"label":"k68", "x":21, "y":1.5}, + {"label":"k69", "x":22, "y":1.5}, + {"label":"k6a", "x":23, "y":1.5}, + {"label":"k10", "x":0, "y":2.75}, + {"label":"k11", "x":1, "y":2.75}, + {"label":"k12", "x":2, "y":2.75}, + {"label":"k13", "x":3, "y":2.75}, + {"label":"k14", "x":4.5, "y":2.75}, + {"label":"k15", "x":5.5, "y":2.75}, + {"label":"k16", "x":6.5, "y":2.75}, + {"label":"k17", "x":7.5, "y":2.75}, + {"label":"k18", "x":8.5, "y":2.75}, + {"label":"k19", "x":9.5, "y":2.75}, + {"label":"k1a", "x":10.5, "y":2.75}, + {"label":"k70", "x":11.5, "y":2.75}, + {"label":"k71", "x":12.5, "y":2.75}, + {"label":"k72", "x":13.5, "y":2.75}, + {"label":"k73", "x":14.5, "y":2.75}, + {"label":"k74", "x":15.5, "y":2.75}, + {"label":"k75", "x":16.5, "y":2.75}, + {"label":"k76", "x":17.5, "y":2.75, "w":2}, + {"label":"k77", "x":20, "y":2.75}, + {"label":"k78", "x":21, "y":2.75}, + {"label":"k79", "x":22, "y":2.75}, + {"label":"k7a", "x":23, "y":2.75}, + {"label":"k20", "x":0, "y":3.75, "h":2}, + {"label":"k21", "x":1, "y":3.75}, + {"label":"k22", "x":2, "y":3.75}, + {"label":"k23", "x":3, "y":3.75}, + {"label":"k24", "x":4.5, "y":3.75, "w":1.5}, + {"label":"k25", "x":6, "y":3.75}, + {"label":"k26", "x":7, "y":3.75}, + {"label":"k27", "x":8, "y":3.75}, + {"label":"k28", "x":9, "y":3.75}, + {"label":"k29", "x":10, "y":3.75}, + {"label":"k2a", "x":11, "y":3.75}, + {"label":"k80", "x":12, "y":3.75}, + {"label":"k81", "x":13, "y":3.75}, + {"label":"k82", "x":14, "y":3.75}, + {"label":"k83", "x":15, "y":3.75}, + {"label":"k84", "x":16, "y":3.75}, + {"label":"k85", "x":17, "y":3.75}, + {"label":"k87", "x":20, "y":3.75}, + {"label":"k88", "x":21, "y":3.75}, + {"label":"k89", "x":22, "y":3.75}, + {"label":"k8a", "x":23, "y":3.75, "h":2}, + {"label":"k31", "x":1, "y":4.75}, + {"label":"k32", "x":2, "y":4.75}, + {"label":"k33", "x":3, "y":4.75}, + {"label":"k34", "x":4.5, "y":4.75, "w":1.75}, + {"label":"k35", "x":6.25, "y":4.75}, + {"label":"k36", "x":7.25, "y":4.75}, + {"label":"k37", "x":8.25, "y":4.75}, + {"label":"k38", "x":9.25, "y":4.75}, + {"label":"k39", "x":10.25, "y":4.75}, + {"label":"k3a", "x":11.25, "y":4.75}, + {"label":"k90", "x":12.25, "y":4.75}, + {"label":"k91", "x":13.25, "y":4.75}, + {"label":"k92", "x":14.25, "y":4.75}, + {"label":"k93", "x":15.25, "y":4.75}, + {"label":"k94", "x":16.25, "y":4.75}, + {"label":"k9a", "x":17.25, "y":4.75}, + {"label":"k95", "x":18.25, "y":3.75, "w":1.25, "h":2}, + {"label":"k97", "x":20, "y":4.75}, + {"label":"k98", "x":21, "y":4.75}, + {"label":"k99", "x":22, "y":4.75}, + {"label":"k40", "x":0, "y":5.75, "h":2}, + {"label":"k41", "x":1, "y":5.75}, + {"label":"k42", "x":2, "y":5.75}, + {"label":"k43", "x":3, "y":5.75}, + {"label":"k44", "x":4.25, "y":6}, + {"label":"k45", "x":5.5, "y":5.75, "w":1.25}, + {"label":"k46", "x":6.75, "y":5.75}, + {"label":"k47", "x":7.75, "y":5.75}, + {"label":"k48", "x":8.75, "y":5.75}, + {"label":"k49", "x":9.75, "y":5.75}, + {"label":"k4a", "x":10.75, "y":5.75}, + {"label":"ka0", "x":11.75, "y":5.75}, + {"label":"ka1", "x":12.75, "y":5.75}, + {"label":"ka2", "x":13.75, "y":5.75}, + {"label":"ka3", "x":14.75, "y":5.75}, + {"label":"ka4", "x":15.75, "y":5.75}, + {"label":"ka5", "x":16.75, "y":5.75, "w":1.75}, + {"label":"k96", "x":18.75, "y":6}, + {"label":"ka7", "x":20, "y":5.75}, + {"label":"ka8", "x":21, "y":5.75}, + {"label":"ka9", "x":22, "y":5.75}, + {"label":"kaa", "x":23, "y":5.75, "h":2}, + {"label":"k51", "x":1, "y":6.75}, + {"label":"k52", "x":2, "y":6.75}, + {"label":"k53", "x":3.25, "y":7}, + {"label":"k54", "x":4.25, "y":7}, + {"label":"k55", "x":5.25, "y":7}, + {"label":"k56", "x":6.5, "y":6.75}, + {"label":"k57", "x":7.5, "y":6.75}, + {"label":"k58", "x":8.5, "y":6.75}, + {"label":"k59", "x":9.5, "y":6.75}, + {"label":"k5a", "x":10.5, "y":6.75}, + {"label":"kb0", "x":11.5, "y":6.75}, + {"label":"kb1", "x":12.5, "y":6.75}, + {"label":"kb2", "x":13.5, "y":6.75}, + {"label":"kb3", "x":14.5, "y":6.75}, + {"label":"kb4", "x":15.5, "y":6.75}, + {"label":"kb5", "x":16.5, "y":6.75}, + {"label":"ka6", "x":17.75, "y":7}, + {"label":"kb6", "x":18.75, "y":7}, + {"label":"kb7", "x":19.75, "y":7}, + {"label":"kb8", "x":21, "y":6.75}, + {"label":"kb9", "x":22, "y":6.75} + ] + }, + "LAYOUT_2u_ansi": { + "layout": [ + {"label":"e00", "x":3, "y":0}, + {"label":"e01", "x":4, "y":0}, + {"label":"e02", "x":19, "y":0}, + {"label":"e03", "x":20, "y":0}, + {"label":"k00", "x":0, "y":1.5}, + {"label":"k01", "x":1, "y":1.5}, + {"label":"k02", "x":2, "y":1.5}, + {"label":"k03", "x":3, "y":1.5}, + {"label":"k04", "x":4.75, "y":1.5}, + {"label":"k06", "x":6.25, "y":1.5}, + {"label":"k07", "x":7.25, "y":1.5}, + {"label":"k08", "x":8.25, "y":1.5}, + {"label":"k09", "x":9.25, "y":1.5}, + {"label":"k0a", "x":10.75, "y":1.5}, + {"label":"k60", "x":11.75, "y":1.5}, + {"label":"k61", "x":12.75, "y":1.5}, + {"label":"k62", "x":13.75, "y":1.5}, + {"label":"k63", "x":15.25, "y":1.5}, + {"label":"k64", "x":16.25, "y":1.5}, + {"label":"k65", "x":17.25, "y":1.5}, + {"label":"k66", "x":18.25, "y":1.5}, + {"label":"k67", "x":20, "y":1.5}, + {"label":"k68", "x":21, "y":1.5}, + {"label":"k69", "x":22, "y":1.5}, + {"label":"k6a", "x":23, "y":1.5}, + {"label":"k10", "x":0, "y":2.75}, + {"label":"k11", "x":1, "y":2.75}, + {"label":"k12", "x":2, "y":2.75}, + {"label":"k13", "x":3, "y":2.75}, + {"label":"k14", "x":4.5, "y":2.75}, + {"label":"k15", "x":5.5, "y":2.75}, + {"label":"k16", "x":6.5, "y":2.75}, + {"label":"k17", "x":7.5, "y":2.75}, + {"label":"k18", "x":8.5, "y":2.75}, + {"label":"k19", "x":9.5, "y":2.75}, + {"label":"k1a", "x":10.5, "y":2.75}, + {"label":"k70", "x":11.5, "y":2.75}, + {"label":"k71", "x":12.5, "y":2.75}, + {"label":"k72", "x":13.5, "y":2.75}, + {"label":"k73", "x":14.5, "y":2.75}, + {"label":"k74", "x":15.5, "y":2.75}, + {"label":"k75", "x":16.5, "y":2.75}, + {"label":"k76", "x":17.5, "y":2.75, "w":2}, + {"label":"k77", "x":20, "y":2.75}, + {"label":"k78", "x":21, "y":2.75}, + {"label":"k79", "x":22, "y":2.75}, + {"label":"k7a", "x":23, "y":2.75}, + {"label":"k20", "x":0, "y":3.75, "h":2}, + {"label":"k21", "x":1, "y":3.75}, + {"label":"k22", "x":2, "y":3.75}, + {"label":"k23", "x":3, "y":3.75}, + {"label":"k24", "x":4.5, "y":3.75, "w":1.5}, + {"label":"k25", "x":6, "y":3.75}, + {"label":"k26", "x":7, "y":3.75}, + {"label":"k27", "x":8, "y":3.75}, + {"label":"k28", "x":9, "y":3.75}, + {"label":"k29", "x":10, "y":3.75}, + {"label":"k2a", "x":11, "y":3.75}, + {"label":"k80", "x":12, "y":3.75}, + {"label":"k81", "x":13, "y":3.75}, + {"label":"k82", "x":14, "y":3.75}, + {"label":"k83", "x":15, "y":3.75}, + {"label":"k84", "x":16, "y":3.75}, + {"label":"k85", "x":17, "y":3.75}, + {"label":"k86", "x":18, "y":3.75, "w":1.5}, + {"label":"k87", "x":20, "y":3.75}, + {"label":"k88", "x":21, "y":3.75}, + {"label":"k89", "x":22, "y":3.75}, + {"label":"k8a", "x":23, "y":3.75, "h":2}, + {"label":"k31", "x":1, "y":4.75}, + {"label":"k32", "x":2, "y":4.75}, + {"label":"k33", "x":3, "y":4.75}, + {"label":"k34", "x":4.5, "y":4.75, "w":1.75}, + {"label":"k35", "x":6.25, "y":4.75}, + {"label":"k36", "x":7.25, "y":4.75}, + {"label":"k37", "x":8.25, "y":4.75}, + {"label":"k38", "x":9.25, "y":4.75}, + {"label":"k39", "x":10.25, "y":4.75}, + {"label":"k3a", "x":11.25, "y":4.75}, + {"label":"k90", "x":12.25, "y":4.75}, + {"label":"k91", "x":13.25, "y":4.75}, + {"label":"k92", "x":14.25, "y":4.75}, + {"label":"k93", "x":15.25, "y":4.75}, + {"label":"k94", "x":16.25, "y":4.75}, + {"label":"k95", "x":17.25, "y":4.75, "w":2.25}, + {"label":"k97", "x":20, "y":4.75}, + {"label":"k98", "x":21, "y":4.75}, + {"label":"k99", "x":22, "y":4.75}, + {"label":"k40", "x":0, "y":5.75, "h":2}, + {"label":"k41", "x":1, "y":5.75}, + {"label":"k42", "x":2, "y":5.75}, + {"label":"k43", "x":3, "y":5.75}, + {"label":"k44", "x":4.25, "y":6}, + {"label":"k45", "x":5.5, "y":5.75, "w":1.25}, + {"label":"k46", "x":6.75, "y":5.75}, + {"label":"k47", "x":7.75, "y":5.75}, + {"label":"k48", "x":8.75, "y":5.75}, + {"label":"k49", "x":9.75, "y":5.75}, + {"label":"k4a", "x":10.75, "y":5.75}, + {"label":"ka0", "x":11.75, "y":5.75}, + {"label":"ka1", "x":12.75, "y":5.75}, + {"label":"ka2", "x":13.75, "y":5.75}, + {"label":"ka3", "x":14.75, "y":5.75}, + {"label":"ka4", "x":15.75, "y":5.75}, + {"label":"ka5", "x":16.75, "y":5.75, "w":1.75}, + {"label":"k96", "x":18.75, "y":6}, + {"label":"ka7", "x":20, "y":5.75}, + {"label":"ka8", "x":21, "y":5.75}, + {"label":"ka9", "x":22, "y":5.75}, + {"label":"kaa", "x":23, "y":5.75, "h":2}, + {"label":"k51", "x":1, "y":6.75}, + {"label":"k52", "x":2, "y":6.75}, + {"label":"k53", "x":3.25, "y":7}, + {"label":"k54", "x":4.25, "y":7}, + {"label":"k55", "x":5.25, "y":7}, + {"label":"k56", "x":6.5, "y":6.75}, + {"label":"k57", "x":7.5, "y":6.75}, + {"label":"k58", "x":8.5, "y":6.75}, + {"label":"k59", "x":9.5, "y":6.75}, + {"label":"kb0", "x":10.5, "y":6.75, "w":2}, + {"label":"kb1", "x":12.5, "y":6.75}, + {"label":"kb2", "x":13.5, "y":6.75}, + {"label":"kb3", "x":14.5, "y":6.75}, + {"label":"kb4", "x":15.5, "y":6.75}, + {"label":"kb5", "x":16.5, "y":6.75}, + {"label":"ka6", "x":17.75, "y":7}, + {"label":"kb6", "x":18.75, "y":7}, + {"label":"kb7", "x":19.75, "y":7}, + {"label":"kb8", "x":21, "y":6.75}, + {"label":"kb9", "x":22, "y":6.75} + ] + }, + "LAYOUT_2u_iso": { + "layout": [ + {"label":"e00", "x":3, "y":0}, + {"label":"e01", "x":4, "y":0}, + {"label":"e02", "x":19, "y":0}, + {"label":"e03", "x":20, "y":0}, + {"label":"k00", "x":0, "y":1.5}, + {"label":"k01", "x":1, "y":1.5}, + {"label":"k02", "x":2, "y":1.5}, + {"label":"k03", "x":3, "y":1.5}, + {"label":"k04", "x":4.75, "y":1.5}, + {"label":"k06", "x":6.25, "y":1.5}, + {"label":"k07", "x":7.25, "y":1.5}, + {"label":"k08", "x":8.25, "y":1.5}, + {"label":"k09", "x":9.25, "y":1.5}, + {"label":"k0a", "x":10.75, "y":1.5}, + {"label":"k60", "x":11.75, "y":1.5}, + {"label":"k61", "x":12.75, "y":1.5}, + {"label":"k62", "x":13.75, "y":1.5}, + {"label":"k63", "x":15.25, "y":1.5}, + {"label":"k64", "x":16.25, "y":1.5}, + {"label":"k65", "x":17.25, "y":1.5}, + {"label":"k66", "x":18.25, "y":1.5}, + {"label":"k67", "x":20, "y":1.5}, + {"label":"k68", "x":21, "y":1.5}, + {"label":"k69", "x":22, "y":1.5}, + {"label":"k6a", "x":23, "y":1.5}, + {"label":"k10", "x":0, "y":2.75}, + {"label":"k11", "x":1, "y":2.75}, + {"label":"k12", "x":2, "y":2.75}, + {"label":"k13", "x":3, "y":2.75}, + {"label":"k14", "x":4.5, "y":2.75}, + {"label":"k15", "x":5.5, "y":2.75}, + {"label":"k16", "x":6.5, "y":2.75}, + {"label":"k17", "x":7.5, "y":2.75}, + {"label":"k18", "x":8.5, "y":2.75}, + {"label":"k19", "x":9.5, "y":2.75}, + {"label":"k1a", "x":10.5, "y":2.75}, + {"label":"k70", "x":11.5, "y":2.75}, + {"label":"k71", "x":12.5, "y":2.75}, + {"label":"k72", "x":13.5, "y":2.75}, + {"label":"k73", "x":14.5, "y":2.75}, + {"label":"k74", "x":15.5, "y":2.75}, + {"label":"k75", "x":16.5, "y":2.75}, + {"label":"k76", "x":17.5, "y":2.75, "w":2}, + {"label":"k77", "x":20, "y":2.75}, + {"label":"k78", "x":21, "y":2.75}, + {"label":"k79", "x":22, "y":2.75}, + {"label":"k7a", "x":23, "y":2.75}, + {"label":"k20", "x":0, "y":3.75, "h":2}, + {"label":"k21", "x":1, "y":3.75}, + {"label":"k22", "x":2, "y":3.75}, + {"label":"k23", "x":3, "y":3.75}, + {"label":"k24", "x":4.5, "y":3.75, "w":1.5}, + {"label":"k25", "x":6, "y":3.75}, + {"label":"k26", "x":7, "y":3.75}, + {"label":"k27", "x":8, "y":3.75}, + {"label":"k28", "x":9, "y":3.75}, + {"label":"k29", "x":10, "y":3.75}, + {"label":"k2a", "x":11, "y":3.75}, + {"label":"k80", "x":12, "y":3.75}, + {"label":"k81", "x":13, "y":3.75}, + {"label":"k82", "x":14, "y":3.75}, + {"label":"k83", "x":15, "y":3.75}, + {"label":"k84", "x":16, "y":3.75}, + {"label":"k85", "x":17, "y":3.75}, + {"label":"k87", "x":20, "y":3.75}, + {"label":"k88", "x":21, "y":3.75}, + {"label":"k89", "x":22, "y":3.75}, + {"label":"k8a", "x":23, "y":3.75, "h":2}, + {"label":"k31", "x":1, "y":4.75}, + {"label":"k32", "x":2, "y":4.75}, + {"label":"k33", "x":3, "y":4.75}, + {"label":"k34", "x":4.5, "y":4.75, "w":1.75}, + {"label":"k35", "x":6.25, "y":4.75}, + {"label":"k36", "x":7.25, "y":4.75}, + {"label":"k37", "x":8.25, "y":4.75}, + {"label":"k38", "x":9.25, "y":4.75}, + {"label":"k39", "x":10.25, "y":4.75}, + {"label":"k3a", "x":11.25, "y":4.75}, + {"label":"k90", "x":12.25, "y":4.75}, + {"label":"k91", "x":13.25, "y":4.75}, + {"label":"k92", "x":14.25, "y":4.75}, + {"label":"k93", "x":15.25, "y":4.75}, + {"label":"k94", "x":16.25, "y":4.75}, + {"label":"k9a", "x":17.25, "y":4.75}, + {"label":"k95", "x":18.25, "y":3.75, "w":1.25, "h":2}, + {"label":"k97", "x":20, "y":4.75}, + {"label":"k98", "x":21, "y":4.75}, + {"label":"k99", "x":22, "y":4.75}, + {"label":"k40", "x":0, "y":5.75, "h":2}, + {"label":"k41", "x":1, "y":5.75}, + {"label":"k42", "x":2, "y":5.75}, + {"label":"k43", "x":3, "y":5.75}, + {"label":"k44", "x":4.25, "y":6}, + {"label":"k45", "x":5.5, "y":5.75, "w":1.25}, + {"label":"k46", "x":6.75, "y":5.75}, + {"label":"k47", "x":7.75, "y":5.75}, + {"label":"k48", "x":8.75, "y":5.75}, + {"label":"k49", "x":9.75, "y":5.75}, + {"label":"k4a", "x":10.75, "y":5.75}, + {"label":"ka0", "x":11.75, "y":5.75}, + {"label":"ka1", "x":12.75, "y":5.75}, + {"label":"ka2", "x":13.75, "y":5.75}, + {"label":"ka3", "x":14.75, "y":5.75}, + {"label":"ka4", "x":15.75, "y":5.75}, + {"label":"ka5", "x":16.75, "y":5.75, "w":1.75}, + {"label":"k96", "x":18.75, "y":6}, + {"label":"ka7", "x":20, "y":5.75}, + {"label":"ka8", "x":21, "y":5.75}, + {"label":"ka9", "x":22, "y":5.75}, + {"label":"kaa", "x":23, "y":5.75, "h":2}, + {"label":"k51", "x":1, "y":6.75}, + {"label":"k52", "x":2, "y":6.75}, + {"label":"k53", "x":3.25, "y":7}, + {"label":"k54", "x":4.25, "y":7}, + {"label":"k55", "x":5.25, "y":7}, + {"label":"k56", "x":6.5, "y":6.75}, + {"label":"k57", "x":7.5, "y":6.75}, + {"label":"k58", "x":8.5, "y":6.75}, + {"label":"k59", "x":9.5, "y":6.75}, + {"label":"kb0", "x":10.5, "y":6.75, "w":2}, + {"label":"kb1", "x":12.5, "y":6.75}, + {"label":"kb2", "x":13.5, "y":6.75}, + {"label":"kb3", "x":14.5, "y":6.75}, + {"label":"kb4", "x":15.5, "y":6.75}, + {"label":"kb5", "x":16.5, "y":6.75}, + {"label":"ka6", "x":17.75, "y":7}, + {"label":"kb6", "x":18.75, "y":7}, + {"label":"kb7", "x":19.75, "y":7}, + {"label":"kb8", "x":21, "y":6.75}, + {"label":"kb9", "x":22, "y":6.75} + ] + }, + "LAYOUT_4u_ansi": { + "layout": [ + {"label":"e00", "x":3, "y":0}, + {"label":"e01", "x":4, "y":0}, + {"label":"e02", "x":19, "y":0}, + {"label":"e03", "x":20, "y":0}, + {"label":"k00", "x":0, "y":1.5}, + {"label":"k01", "x":1, "y":1.5}, + {"label":"k02", "x":2, "y":1.5}, + {"label":"k03", "x":3, "y":1.5}, + {"label":"k04", "x":4.75, "y":1.5}, + {"label":"k06", "x":6.25, "y":1.5}, + {"label":"k07", "x":7.25, "y":1.5}, + {"label":"k08", "x":8.25, "y":1.5}, + {"label":"k09", "x":9.25, "y":1.5}, + {"label":"k0a", "x":10.75, "y":1.5}, + {"label":"k60", "x":11.75, "y":1.5}, + {"label":"k61", "x":12.75, "y":1.5}, + {"label":"k62", "x":13.75, "y":1.5}, + {"label":"k63", "x":15.25, "y":1.5}, + {"label":"k64", "x":16.25, "y":1.5}, + {"label":"k65", "x":17.25, "y":1.5}, + {"label":"k66", "x":18.25, "y":1.5}, + {"label":"k67", "x":20, "y":1.5}, + {"label":"k68", "x":21, "y":1.5}, + {"label":"k69", "x":22, "y":1.5}, + {"label":"k6a", "x":23, "y":1.5}, + {"label":"k10", "x":0, "y":2.75}, + {"label":"k11", "x":1, "y":2.75}, + {"label":"k12", "x":2, "y":2.75}, + {"label":"k13", "x":3, "y":2.75}, + {"label":"k14", "x":4.5, "y":2.75}, + {"label":"k15", "x":5.5, "y":2.75}, + {"label":"k16", "x":6.5, "y":2.75}, + {"label":"k17", "x":7.5, "y":2.75}, + {"label":"k18", "x":8.5, "y":2.75}, + {"label":"k19", "x":9.5, "y":2.75}, + {"label":"k1a", "x":10.5, "y":2.75}, + {"label":"k70", "x":11.5, "y":2.75}, + {"label":"k71", "x":12.5, "y":2.75}, + {"label":"k72", "x":13.5, "y":2.75}, + {"label":"k73", "x":14.5, "y":2.75}, + {"label":"k74", "x":15.5, "y":2.75}, + {"label":"k75", "x":16.5, "y":2.75}, + {"label":"k76", "x":17.5, "y":2.75, "w":2}, + {"label":"k77", "x":20, "y":2.75}, + {"label":"k78", "x":21, "y":2.75}, + {"label":"k79", "x":22, "y":2.75}, + {"label":"k7a", "x":23, "y":2.75}, + {"label":"k20", "x":0, "y":3.75, "h":2}, + {"label":"k21", "x":1, "y":3.75}, + {"label":"k22", "x":2, "y":3.75}, + {"label":"k23", "x":3, "y":3.75}, + {"label":"k24", "x":4.5, "y":3.75, "w":1.5}, + {"label":"k25", "x":6, "y":3.75}, + {"label":"k26", "x":7, "y":3.75}, + {"label":"k27", "x":8, "y":3.75}, + {"label":"k28", "x":9, "y":3.75}, + {"label":"k29", "x":10, "y":3.75}, + {"label":"k2a", "x":11, "y":3.75}, + {"label":"k80", "x":12, "y":3.75}, + {"label":"k81", "x":13, "y":3.75}, + {"label":"k82", "x":14, "y":3.75}, + {"label":"k83", "x":15, "y":3.75}, + {"label":"k84", "x":16, "y":3.75}, + {"label":"k85", "x":17, "y":3.75}, + {"label":"k86", "x":18, "y":3.75, "w":1.5}, + {"label":"k87", "x":20, "y":3.75}, + {"label":"k88", "x":21, "y":3.75}, + {"label":"k89", "x":22, "y":3.75}, + {"label":"k8a", "x":23, "y":3.75, "h":2}, + {"label":"k31", "x":1, "y":4.75}, + {"label":"k32", "x":2, "y":4.75}, + {"label":"k33", "x":3, "y":4.75}, + {"label":"k34", "x":4.5, "y":4.75, "w":1.75}, + {"label":"k35", "x":6.25, "y":4.75}, + {"label":"k36", "x":7.25, "y":4.75}, + {"label":"k37", "x":8.25, "y":4.75}, + {"label":"k38", "x":9.25, "y":4.75}, + {"label":"k39", "x":10.25, "y":4.75}, + {"label":"k3a", "x":11.25, "y":4.75}, + {"label":"k90", "x":12.25, "y":4.75}, + {"label":"k91", "x":13.25, "y":4.75}, + {"label":"k92", "x":14.25, "y":4.75}, + {"label":"k93", "x":15.25, "y":4.75}, + {"label":"k94", "x":16.25, "y":4.75}, + {"label":"k95", "x":17.25, "y":4.75, "w":2.25}, + {"label":"k97", "x":20, "y":4.75}, + {"label":"k98", "x":21, "y":4.75}, + {"label":"k99", "x":22, "y":4.75}, + {"label":"k40", "x":0, "y":5.75, "h":2}, + {"label":"k41", "x":1, "y":5.75}, + {"label":"k42", "x":2, "y":5.75}, + {"label":"k43", "x":3, "y":5.75}, + {"label":"k44", "x":4.25, "y":6}, + {"label":"k45", "x":5.5, "y":5.75, "w":1.25}, + {"label":"k46", "x":6.75, "y":5.75}, + {"label":"k47", "x":7.75, "y":5.75}, + {"label":"k48", "x":8.75, "y":5.75}, + {"label":"k49", "x":9.75, "y":5.75}, + {"label":"k4a", "x":10.75, "y":5.75}, + {"label":"ka0", "x":11.75, "y":5.75}, + {"label":"ka1", "x":12.75, "y":5.75}, + {"label":"ka2", "x":13.75, "y":5.75}, + {"label":"ka3", "x":14.75, "y":5.75}, + {"label":"ka4", "x":15.75, "y":5.75}, + {"label":"ka5", "x":16.75, "y":5.75, "w":1.75}, + {"label":"k96", "x":18.75, "y":6}, + {"label":"ka7", "x":20, "y":5.75}, + {"label":"ka8", "x":21, "y":5.75}, + {"label":"ka9", "x":22, "y":5.75}, + {"label":"kaa", "x":23, "y":5.75, "h":2}, + {"label":"k51", "x":1, "y":6.75}, + {"label":"k52", "x":2, "y":6.75}, + {"label":"k53", "x":3.25, "y":7}, + {"label":"k54", "x":4.25, "y":7}, + {"label":"k55", "x":5.25, "y":7}, + {"label":"k56", "x":6.5, "y":6.75}, + {"label":"k57", "x":7.5, "y":6.75}, + {"label":"k58", "x":8.5, "y":6.75}, + {"label":"kb0", "x":9.5, "y":6.75, "w":4}, + {"label":"kb2", "x":13.5, "y":6.75}, + {"label":"kb3", "x":14.5, "y":6.75}, + {"label":"kb4", "x":15.5, "y":6.75}, + {"label":"kb5", "x":16.5, "y":6.75}, + {"label":"ka6", "x":17.75, "y":7}, + {"label":"kb6", "x":18.75, "y":7}, + {"label":"kb7", "x":19.75, "y":7}, + {"label":"kb8", "x":21, "y":6.75}, + {"label":"kb9", "x":22, "y":6.75} + ] + }, + "LAYOUT_4u_iso": { + "layout": [ + {"label":"e00", "x":3, "y":0}, + {"label":"e01", "x":4, "y":0}, + {"label":"e02", "x":19, "y":0}, + {"label":"e03", "x":20, "y":0}, + {"label":"k00", "x":0, "y":1.5}, + {"label":"k01", "x":1, "y":1.5}, + {"label":"k02", "x":2, "y":1.5}, + {"label":"k03", "x":3, "y":1.5}, + {"label":"k04", "x":4.75, "y":1.5}, + {"label":"k06", "x":6.25, "y":1.5}, + {"label":"k07", "x":7.25, "y":1.5}, + {"label":"k08", "x":8.25, "y":1.5}, + {"label":"k09", "x":9.25, "y":1.5}, + {"label":"k0a", "x":10.75, "y":1.5}, + {"label":"k60", "x":11.75, "y":1.5}, + {"label":"k61", "x":12.75, "y":1.5}, + {"label":"k62", "x":13.75, "y":1.5}, + {"label":"k63", "x":15.25, "y":1.5}, + {"label":"k64", "x":16.25, "y":1.5}, + {"label":"k65", "x":17.25, "y":1.5}, + {"label":"k66", "x":18.25, "y":1.5}, + {"label":"k67", "x":20, "y":1.5}, + {"label":"k68", "x":21, "y":1.5}, + {"label":"k69", "x":22, "y":1.5}, + {"label":"k6a", "x":23, "y":1.5}, + {"label":"k10", "x":0, "y":2.75}, + {"label":"k11", "x":1, "y":2.75}, + {"label":"k12", "x":2, "y":2.75}, + {"label":"k13", "x":3, "y":2.75}, + {"label":"k14", "x":4.5, "y":2.75}, + {"label":"k15", "x":5.5, "y":2.75}, + {"label":"k16", "x":6.5, "y":2.75}, + {"label":"k17", "x":7.5, "y":2.75}, + {"label":"k18", "x":8.5, "y":2.75}, + {"label":"k19", "x":9.5, "y":2.75}, + {"label":"k1a", "x":10.5, "y":2.75}, + {"label":"k70", "x":11.5, "y":2.75}, + {"label":"k71", "x":12.5, "y":2.75}, + {"label":"k72", "x":13.5, "y":2.75}, + {"label":"k73", "x":14.5, "y":2.75}, + {"label":"k74", "x":15.5, "y":2.75}, + {"label":"k75", "x":16.5, "y":2.75}, + {"label":"k76", "x":17.5, "y":2.75, "w":2}, + {"label":"k77", "x":20, "y":2.75}, + {"label":"k78", "x":21, "y":2.75}, + {"label":"k79", "x":22, "y":2.75}, + {"label":"k7a", "x":23, "y":2.75}, + {"label":"k20", "x":0, "y":3.75, "h":2}, + {"label":"k21", "x":1, "y":3.75}, + {"label":"k22", "x":2, "y":3.75}, + {"label":"k23", "x":3, "y":3.75}, + {"label":"k24", "x":4.5, "y":3.75, "w":1.5}, + {"label":"k25", "x":6, "y":3.75}, + {"label":"k26", "x":7, "y":3.75}, + {"label":"k27", "x":8, "y":3.75}, + {"label":"k28", "x":9, "y":3.75}, + {"label":"k29", "x":10, "y":3.75}, + {"label":"k2a", "x":11, "y":3.75}, + {"label":"k80", "x":12, "y":3.75}, + {"label":"k81", "x":13, "y":3.75}, + {"label":"k82", "x":14, "y":3.75}, + {"label":"k83", "x":15, "y":3.75}, + {"label":"k84", "x":16, "y":3.75}, + {"label":"k85", "x":17, "y":3.75}, + {"label":"k87", "x":20, "y":3.75}, + {"label":"k88", "x":21, "y":3.75}, + {"label":"k89", "x":22, "y":3.75}, + {"label":"k8a", "x":23, "y":3.75, "h":2}, + {"label":"k31", "x":1, "y":4.75}, + {"label":"k32", "x":2, "y":4.75}, + {"label":"k33", "x":3, "y":4.75}, + {"label":"k34", "x":4.5, "y":4.75, "w":1.75}, + {"label":"k35", "x":6.25, "y":4.75}, + {"label":"k36", "x":7.25, "y":4.75}, + {"label":"k37", "x":8.25, "y":4.75}, + {"label":"k38", "x":9.25, "y":4.75}, + {"label":"k39", "x":10.25, "y":4.75}, + {"label":"k3a", "x":11.25, "y":4.75}, + {"label":"k90", "x":12.25, "y":4.75}, + {"label":"k91", "x":13.25, "y":4.75}, + {"label":"k92", "x":14.25, "y":4.75}, + {"label":"k93", "x":15.25, "y":4.75}, + {"label":"k94", "x":16.25, "y":4.75}, + {"label":"k9a", "x":17.25, "y":4.75}, + {"label":"k95", "x":18.25, "y":3.75, "w":1.25, "h":2}, + {"label":"k97", "x":20, "y":4.75}, + {"label":"k98", "x":21, "y":4.75}, + {"label":"k99", "x":22, "y":4.75}, + {"label":"k40", "x":0, "y":5.75, "h":2}, + {"label":"k41", "x":1, "y":5.75}, + {"label":"k42", "x":2, "y":5.75}, + {"label":"k43", "x":3, "y":5.75}, + {"label":"k44", "x":4.25, "y":6}, + {"label":"k45", "x":5.5, "y":5.75, "w":1.25}, + {"label":"k46", "x":6.75, "y":5.75}, + {"label":"k47", "x":7.75, "y":5.75}, + {"label":"k48", "x":8.75, "y":5.75}, + {"label":"k49", "x":9.75, "y":5.75}, + {"label":"k4a", "x":10.75, "y":5.75}, + {"label":"ka0", "x":11.75, "y":5.75}, + {"label":"ka1", "x":12.75, "y":5.75}, + {"label":"ka2", "x":13.75, "y":5.75}, + {"label":"ka3", "x":14.75, "y":5.75}, + {"label":"ka4", "x":15.75, "y":5.75}, + {"label":"ka5", "x":16.75, "y":5.75, "w":1.75}, + {"label":"k96", "x":18.75, "y":6}, + {"label":"ka7", "x":20, "y":5.75}, + {"label":"ka8", "x":21, "y":5.75}, + {"label":"ka9", "x":22, "y":5.75}, + {"label":"kaa", "x":23, "y":5.75, "h":2}, + {"label":"k51", "x":1, "y":6.75}, + {"label":"k52", "x":2, "y":6.75}, + {"label":"k53", "x":3.25, "y":7}, + {"label":"k54", "x":4.25, "y":7}, + {"label":"k55", "x":5.25, "y":7}, + {"label":"k56", "x":6.5, "y":6.75}, + {"label":"k57", "x":7.5, "y":6.75}, + {"label":"k58", "x":8.5, "y":6.75}, + {"label":"kb0", "x":9.5, "y":6.75, "w":4}, + {"label":"kb2", "x":13.5, "y":6.75}, + {"label":"kb3", "x":14.5, "y":6.75}, + {"label":"kb4", "x":15.5, "y":6.75}, + {"label":"kb5", "x":16.5, "y":6.75}, + {"label":"ka6", "x":17.75, "y":7}, + {"label":"kb6", "x":18.75, "y":7}, + {"label":"kb7", "x":19.75, "y":7}, + {"label":"kb8", "x":21, "y":6.75}, + {"label":"kb9", "x":22, "y":6.75} + ] + }, + "LAYOUT_7u_ansi": { + "layout": [ + {"label":"e00", "x":3, "y":0}, + {"label":"e01", "x":4, "y":0}, + {"label":"e02", "x":19, "y":0}, + {"label":"e03", "x":20, "y":0}, + {"label":"k00", "x":0, "y":1.5}, + {"label":"k01", "x":1, "y":1.5}, + {"label":"k02", "x":2, "y":1.5}, + {"label":"k03", "x":3, "y":1.5}, + {"label":"k04", "x":4.75, "y":1.5}, + {"label":"k06", "x":6.25, "y":1.5}, + {"label":"k07", "x":7.25, "y":1.5}, + {"label":"k08", "x":8.25, "y":1.5}, + {"label":"k09", "x":9.25, "y":1.5}, + {"label":"k0a", "x":10.75, "y":1.5}, + {"label":"k60", "x":11.75, "y":1.5}, + {"label":"k61", "x":12.75, "y":1.5}, + {"label":"k62", "x":13.75, "y":1.5}, + {"label":"k63", "x":15.25, "y":1.5}, + {"label":"k64", "x":16.25, "y":1.5}, + {"label":"k65", "x":17.25, "y":1.5}, + {"label":"k66", "x":18.25, "y":1.5}, + {"label":"k67", "x":20, "y":1.5}, + {"label":"k68", "x":21, "y":1.5}, + {"label":"k69", "x":22, "y":1.5}, + {"label":"k6a", "x":23, "y":1.5}, + {"label":"k10", "x":0, "y":2.75}, + {"label":"k11", "x":1, "y":2.75}, + {"label":"k12", "x":2, "y":2.75}, + {"label":"k13", "x":3, "y":2.75}, + {"label":"k14", "x":4.5, "y":2.75}, + {"label":"k15", "x":5.5, "y":2.75}, + {"label":"k16", "x":6.5, "y":2.75}, + {"label":"k17", "x":7.5, "y":2.75}, + {"label":"k18", "x":8.5, "y":2.75}, + {"label":"k19", "x":9.5, "y":2.75}, + {"label":"k1a", "x":10.5, "y":2.75}, + {"label":"k70", "x":11.5, "y":2.75}, + {"label":"k71", "x":12.5, "y":2.75}, + {"label":"k72", "x":13.5, "y":2.75}, + {"label":"k73", "x":14.5, "y":2.75}, + {"label":"k74", "x":15.5, "y":2.75}, + {"label":"k75", "x":16.5, "y":2.75}, + {"label":"k76", "x":17.5, "y":2.75, "w":2}, + {"label":"k77", "x":20, "y":2.75}, + {"label":"k78", "x":21, "y":2.75}, + {"label":"k79", "x":22, "y":2.75}, + {"label":"k7a", "x":23, "y":2.75}, + {"label":"k20", "x":0, "y":3.75, "h":2}, + {"label":"k21", "x":1, "y":3.75}, + {"label":"k22", "x":2, "y":3.75}, + {"label":"k23", "x":3, "y":3.75}, + {"label":"k24", "x":4.5, "y":3.75, "w":1.5}, + {"label":"k25", "x":6, "y":3.75}, + {"label":"k26", "x":7, "y":3.75}, + {"label":"k27", "x":8, "y":3.75}, + {"label":"k28", "x":9, "y":3.75}, + {"label":"k29", "x":10, "y":3.75}, + {"label":"k2a", "x":11, "y":3.75}, + {"label":"k80", "x":12, "y":3.75}, + {"label":"k81", "x":13, "y":3.75}, + {"label":"k82", "x":14, "y":3.75}, + {"label":"k83", "x":15, "y":3.75}, + {"label":"k84", "x":16, "y":3.75}, + {"label":"k85", "x":17, "y":3.75}, + {"label":"k86", "x":18, "y":3.75, "w":1.5}, + {"label":"k87", "x":20, "y":3.75}, + {"label":"k88", "x":21, "y":3.75}, + {"label":"k89", "x":22, "y":3.75}, + {"label":"k8a", "x":23, "y":3.75, "h":2}, + {"label":"k31", "x":1, "y":4.75}, + {"label":"k32", "x":2, "y":4.75}, + {"label":"k33", "x":3, "y":4.75}, + {"label":"k34", "x":4.5, "y":4.75, "w":1.75}, + {"label":"k35", "x":6.25, "y":4.75}, + {"label":"k36", "x":7.25, "y":4.75}, + {"label":"k37", "x":8.25, "y":4.75}, + {"label":"k38", "x":9.25, "y":4.75}, + {"label":"k39", "x":10.25, "y":4.75}, + {"label":"k3a", "x":11.25, "y":4.75}, + {"label":"k90", "x":12.25, "y":4.75}, + {"label":"k91", "x":13.25, "y":4.75}, + {"label":"k92", "x":14.25, "y":4.75}, + {"label":"k93", "x":15.25, "y":4.75}, + {"label":"k94", "x":16.25, "y":4.75}, + {"label":"k95", "x":17.25, "y":4.75, "w":2.25}, + {"label":"k97", "x":20, "y":4.75}, + {"label":"k98", "x":21, "y":4.75}, + {"label":"k99", "x":22, "y":4.75}, + {"label":"k40", "x":0, "y":5.75, "h":2}, + {"label":"k41", "x":1, "y":5.75}, + {"label":"k42", "x":2, "y":5.75}, + {"label":"k43", "x":3, "y":5.75}, + {"label":"k44", "x":4.25, "y":6}, + {"label":"k45", "x":5.5, "y":5.75, "w":1.25}, + {"label":"k46", "x":6.75, "y":5.75}, + {"label":"k47", "x":7.75, "y":5.75}, + {"label":"k48", "x":8.75, "y":5.75}, + {"label":"k49", "x":9.75, "y":5.75}, + {"label":"k4a", "x":10.75, "y":5.75}, + {"label":"ka0", "x":11.75, "y":5.75}, + {"label":"ka1", "x":12.75, "y":5.75}, + {"label":"ka2", "x":13.75, "y":5.75}, + {"label":"ka3", "x":14.75, "y":5.75}, + {"label":"ka4", "x":15.75, "y":5.75}, + {"label":"ka5", "x":16.75, "y":5.75, "w":1.75}, + {"label":"k96", "x":18.75, "y":6}, + {"label":"ka7", "x":20, "y":5.75}, + {"label":"ka8", "x":21, "y":5.75}, + {"label":"ka9", "x":22, "y":5.75}, + {"label":"kaa", "x":23, "y":5.75, "h":2}, + {"label":"k51", "x":1, "y":6.75}, + {"label":"k52", "x":2, "y":6.75}, + {"label":"k53", "x":3.25, "y":7}, + {"label":"k54", "x":4.25, "y":7}, + {"label":"k55", "x":5.25, "y":7}, + {"label":"k56", "x":6.5, "y":6.75}, + {"label":"k57", "x":7.5, "y":6.75}, + {"label":"kb0", "x":8.5, "y":6.75, "w":7}, + {"label":"kb4", "x":15.5, "y":6.75}, + {"label":"kb5", "x":16.5, "y":6.75}, + {"label":"ka6", "x":17.75, "y":7}, + {"label":"kb6", "x":18.75, "y":7}, + {"label":"kb7", "x":19.75, "y":7}, + {"label":"kb8", "x":21, "y":6.75}, + {"label":"kb9", "x":22, "y":6.75} + ] + }, + "LAYOUT_7u_iso": { + "layout": [ + {"label":"e00", "x":3, "y":0}, + {"label":"e01", "x":4, "y":0}, + {"label":"e02", "x":19, "y":0}, + {"label":"e03", "x":20, "y":0}, + {"label":"k00", "x":0, "y":1.5}, + {"label":"k01", "x":1, "y":1.5}, + {"label":"k02", "x":2, "y":1.5}, + {"label":"k03", "x":3, "y":1.5}, + {"label":"k04", "x":4.75, "y":1.5}, + {"label":"k06", "x":6.25, "y":1.5}, + {"label":"k07", "x":7.25, "y":1.5}, + {"label":"k08", "x":8.25, "y":1.5}, + {"label":"k09", "x":9.25, "y":1.5}, + {"label":"k0a", "x":10.75, "y":1.5}, + {"label":"k60", "x":11.75, "y":1.5}, + {"label":"k61", "x":12.75, "y":1.5}, + {"label":"k62", "x":13.75, "y":1.5}, + {"label":"k63", "x":15.25, "y":1.5}, + {"label":"k64", "x":16.25, "y":1.5}, + {"label":"k65", "x":17.25, "y":1.5}, + {"label":"k66", "x":18.25, "y":1.5}, + {"label":"k67", "x":20, "y":1.5}, + {"label":"k68", "x":21, "y":1.5}, + {"label":"k69", "x":22, "y":1.5}, + {"label":"k6a", "x":23, "y":1.5}, + {"label":"k10", "x":0, "y":2.75}, + {"label":"k11", "x":1, "y":2.75}, + {"label":"k12", "x":2, "y":2.75}, + {"label":"k13", "x":3, "y":2.75}, + {"label":"k14", "x":4.5, "y":2.75}, + {"label":"k15", "x":5.5, "y":2.75}, + {"label":"k16", "x":6.5, "y":2.75}, + {"label":"k17", "x":7.5, "y":2.75}, + {"label":"k18", "x":8.5, "y":2.75}, + {"label":"k19", "x":9.5, "y":2.75}, + {"label":"k1a", "x":10.5, "y":2.75}, + {"label":"k70", "x":11.5, "y":2.75}, + {"label":"k71", "x":12.5, "y":2.75}, + {"label":"k72", "x":13.5, "y":2.75}, + {"label":"k73", "x":14.5, "y":2.75}, + {"label":"k74", "x":15.5, "y":2.75}, + {"label":"k75", "x":16.5, "y":2.75}, + {"label":"k76", "x":17.5, "y":2.75, "w":2}, + {"label":"k77", "x":20, "y":2.75}, + {"label":"k78", "x":21, "y":2.75}, + {"label":"k79", "x":22, "y":2.75}, + {"label":"k7a", "x":23, "y":2.75}, + {"label":"k20", "x":0, "y":3.75, "h":2}, + {"label":"k21", "x":1, "y":3.75}, + {"label":"k22", "x":2, "y":3.75}, + {"label":"k23", "x":3, "y":3.75}, + {"label":"k24", "x":4.5, "y":3.75, "w":1.5}, + {"label":"k25", "x":6, "y":3.75}, + {"label":"k26", "x":7, "y":3.75}, + {"label":"k27", "x":8, "y":3.75}, + {"label":"k28", "x":9, "y":3.75}, + {"label":"k29", "x":10, "y":3.75}, + {"label":"k2a", "x":11, "y":3.75}, + {"label":"k80", "x":12, "y":3.75}, + {"label":"k81", "x":13, "y":3.75}, + {"label":"k82", "x":14, "y":3.75}, + {"label":"k83", "x":15, "y":3.75}, + {"label":"k84", "x":16, "y":3.75}, + {"label":"k85", "x":17, "y":3.75}, + {"label":"k87", "x":20, "y":3.75}, + {"label":"k88", "x":21, "y":3.75}, + {"label":"k89", "x":22, "y":3.75}, + {"label":"k8a", "x":23, "y":3.75, "h":2}, + {"label":"k31", "x":1, "y":4.75}, + {"label":"k32", "x":2, "y":4.75}, + {"label":"k33", "x":3, "y":4.75}, + {"label":"k34", "x":4.5, "y":4.75, "w":1.75}, + {"label":"k35", "x":6.25, "y":4.75}, + {"label":"k36", "x":7.25, "y":4.75}, + {"label":"k37", "x":8.25, "y":4.75}, + {"label":"k38", "x":9.25, "y":4.75}, + {"label":"k39", "x":10.25, "y":4.75}, + {"label":"k3a", "x":11.25, "y":4.75}, + {"label":"k90", "x":12.25, "y":4.75}, + {"label":"k91", "x":13.25, "y":4.75}, + {"label":"k92", "x":14.25, "y":4.75}, + {"label":"k93", "x":15.25, "y":4.75}, + {"label":"k94", "x":16.25, "y":4.75}, + {"label":"k9a", "x":17.25, "y":4.75}, + {"label":"k95", "x":18.25, "y":3.75, "w":1.25, "h":2}, + {"label":"k97", "x":20, "y":4.75}, + {"label":"k98", "x":21, "y":4.75}, + {"label":"k99", "x":22, "y":4.75}, + {"label":"k40", "x":0, "y":5.75, "h":2}, + {"label":"k41", "x":1, "y":5.75}, + {"label":"k42", "x":2, "y":5.75}, + {"label":"k43", "x":3, "y":5.75}, + {"label":"k44", "x":4.25, "y":6}, + {"label":"k45", "x":5.5, "y":5.75, "w":1.25}, + {"label":"k46", "x":6.75, "y":5.75}, + {"label":"k47", "x":7.75, "y":5.75}, + {"label":"k48", "x":8.75, "y":5.75}, + {"label":"k49", "x":9.75, "y":5.75}, + {"label":"k4a", "x":10.75, "y":5.75}, + {"label":"ka0", "x":11.75, "y":5.75}, + {"label":"ka1", "x":12.75, "y":5.75}, + {"label":"ka2", "x":13.75, "y":5.75}, + {"label":"ka3", "x":14.75, "y":5.75}, + {"label":"ka4", "x":15.75, "y":5.75}, + {"label":"ka5", "x":16.75, "y":5.75, "w":1.75}, + {"label":"k96", "x":18.75, "y":6}, + {"label":"ka7", "x":20, "y":5.75}, + {"label":"ka8", "x":21, "y":5.75}, + {"label":"ka9", "x":22, "y":5.75}, + {"label":"kaa", "x":23, "y":5.75, "h":2}, + {"label":"k51", "x":1, "y":6.75}, + {"label":"k52", "x":2, "y":6.75}, + {"label":"k53", "x":3.25, "y":7}, + {"label":"k54", "x":4.25, "y":7}, + {"label":"k55", "x":5.25, "y":7}, + {"label":"k56", "x":6.5, "y":6.75}, + {"label":"k57", "x":7.5, "y":6.75}, + {"label":"kb0", "x":8.5, "y":6.75, "w":7}, + {"label":"kb4", "x":15.5, "y":6.75}, + {"label":"kb5", "x":16.5, "y":6.75}, + {"label":"ka6", "x":17.75, "y":7}, + {"label":"kb6", "x":18.75, "y":7}, + {"label":"kb7", "x":19.75, "y":7}, + {"label":"kb8", "x":21, "y":6.75}, + {"label":"kb9", "x":22, "y":6.75} ] } } From 0cb4da2c74f126016c8a0597341db441ef16265a Mon Sep 17 00:00:00 2001 From: Sergey Vlasov Date: Thu, 11 Jun 2020 14:26:10 +0300 Subject: [PATCH 139/930] Really fix Ubuntu/Debian setup when $PATH contains spaces (#9370) PR #9307 fixed the immediately visible problem (the command that was added to $HOME/.bashrc was incorrect because of missing quotes around paths with spaces). However, the modified command is still wrong - it captures the value of $PATH at the setup time, and the resulting command written out to $HOME/.bashrc will overwrite $PATH with that captured value, ignoring any changes in the environment. This may be especially important for WSL, where the initial value of $PATH in Linux includes everything which has been added to %PATH% on the Windows side; after adding that command to $HOME/.bashrc the WSL environment will no longer pick up any changes made by newly installed Windows software. Instead of that, use single quotes around the command, so that the environment variables are not expanded at the setup time, and the command that is added to $HOME/.bashrc becomes exactly this: PATH="$HOME/.local/bin:$PATH" This command will use the $HOME and $PATH environment variable values at the time the command is executed, not at the time the QMK setup is performed, so any further updates to $PATH are taken into account. Double quotes also ensure that the command is safe even if the values of those environment variables contain spaces. --- docs/newbs_getting_started.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/newbs_getting_started.md b/docs/newbs_getting_started.md index e374a8f8e53e..a4ee9c0f52af 100644 --- a/docs/newbs_getting_started.md +++ b/docs/newbs_getting_started.md @@ -97,7 +97,7 @@ In most situations you will want to answer Yes to all of the prompts. It's possible, that you will get an error saying something like: `bash: qmk: command not found`. This is due to a [bug](https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=839155) Debian introduced with their Bash 4.4 release, which removed `$HOME/.local/bin` from the PATH. This bug was later fixed on Debian and Ubuntu. Sadly, Ubuntu reitroduced this bug and is [yet to fix it](https://bugs.launchpad.net/ubuntu/+source/bash/+bug/1588562). -Luckily, the fix is easy. Run this as your user: `echo "PATH=$HOME/.local/bin:\"$PATH\"" >> $HOME/.bashrc && source $HOME/.bashrc` +Luckily, the fix is easy. Run this as your user: `echo 'PATH="$HOME/.local/bin:$PATH"' >> $HOME/.bashrc && source $HOME/.bashrc` ?>**Note on FreeBSD**: It is suggested to run `qmk setup` as a non-`root` user to start with, but this will likely identify packages that need to be installed to your From e2699773879f17e70e05dd043f2231786c6a61ad Mon Sep 17 00:00:00 2001 From: Adrian Date: Thu, 11 Jun 2020 13:45:53 +0200 Subject: [PATCH 140/930] Murcielago: improve default keymap (#9363) * Squashed new default keymap for murcielago --- .../murcielago/rev1/keymaps/default/keymap.c | 105 +++++++++--------- .../murcielago/rev1/keymaps/via/keymap.c | 105 +++++++++--------- 2 files changed, 100 insertions(+), 110 deletions(-) diff --git a/keyboards/murcielago/rev1/keymaps/default/keymap.c b/keyboards/murcielago/rev1/keymaps/default/keymap.c index b3abed763169..9837fcff419c 100644 --- a/keyboards/murcielago/rev1/keymaps/default/keymap.c +++ b/keyboards/murcielago/rev1/keymaps/default/keymap.c @@ -2,9 +2,9 @@ enum layers { BASE, - _RAISE, - _LOWER, - _POWER + _NAV, + _SYM, + _FN }; #define PRE_WRD LCTL(KC_LEFT) // jump to next word @@ -13,107 +13,102 @@ enum layers { #define NXT_WDL LCTL(KC_DEL) // delete next word #define PRE_WDL LCTL(KC_BSPC) // delete previous word -#define KC_EURO ALGR(KC_5) -#define LA_CAP MT(MOD_LALT, KC_CAPS) // Left alt on hold, caps lock on tap -#define RA_ENT MT(MOD_RALT, KC_ENT) // Right alt on hold, enter on tap - -#define RAISE MO(_RAISE) // Raise layer access -#define LOWER MO(_LOWER) // Lower layer access -#define POWER MO(_POWER) // Power layer access (raise and lower) +#define NAV MO(_NAV) // NAV layer access +#define SYM MO(_SYM) // SYM layer access +#define FN OSL(_FN) // FN layer access /* - * This default keymap is aimed at users of the US international layout + * This default keymap is aimed at users of the US or US international layout */ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* BASE * ,-----------------------------------------. ,-----------------------------------------. * | =+ | 1! | 2@ | 3# | 4$ | 5% | | 6^ | 7& | 8* | 9( | 0) | -_ | * |------+------+------+------+------+------| |------+------+------+------+------+------| - * | [{ | Q | W | E | R | T | | Y | U | I | O | P | }] | + * | Tab | Q | W | E | R | T | | Y | U | I | O | P | \| | * |------+------+------+------+------+------| |------+------+------+------+------+------| * | Del | A | S | D | F | G | | H | J | K | L | ;: | '" | * |------+------+------+------+------+------+------. ,------+------+------+------+------+------+------| - * | Sft | Z | X | C | V | B | GEsc | | Tab | N | M | ,< | .> | /? | Sft | + * | Sft | Z | X | C | V | B | Esc | | Ent | N | M | ,< | .> | /? | Sft | * `------------------------------------------------' `------------------------------------------------' - * | LA/CL| LGUI |LOWER | Back | Ctrl | |RA/Ent|Space |RAISE | RGUI | Play | + * | LAlt | LGUI | SYM | Back | Ctrl | | RAlt |Space | NAV | PWR | Play | * `----------------------------------' `----------------------------------' */ [BASE] = LAYOUT( /* qwerty */ KC_EQL, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, - KC_LBRC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_RBRC, + 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_DEL, 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_GESC, KC_TAB, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, - LA_CAP, KC_LGUI, LOWER, KC_BSPC, KC_LCTL, RA_ENT, KC_SPC, RAISE, KC_RGUI, KC_MPLY + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_GESC, KC_ENT, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, + KC_LALT, KC_LGUI, SYM, KC_BSPC, KC_LCTL, KC_RALT, KC_SPC, NAV, FN, KC_MPLY ), - /* RAISE + /* NAV - navigation layer * ,-----------------------------------------. ,-----------------------------------------. - * | RST | F1 | F2 | F3 | F4 | F5 | | F6 | F7 | F8 | F9 | F10 | F11 | + * | F12 | F1 | F2 | F3 | F4 | F5 | | F6 | F7 | F8 | F9 | F10| F11| * |------+------+------+------+------+------| |------+------+------+------+------+------| - * | | ! | @ | # | $ | % | | |PRE W | UP |NXT W | | F12 | + * | | | | | | | | |PRE W | UP |NXT W | | | * |------+------+------+------+------+------| |------+------+------+------+------+------| - * | | | | ( | [ | { | < | | | LEFT | DOWN |RIGHT | | | + * | | | | | | | | HOME | LEFT | DOWN |RIGHT | END | | * |------+------+------+------+------+------+------. ,------+------+------+------+------+------+------| - * | | ~ | = | + | \ | | | | | |DEL PW| Ins |DEL NW| | | + * | | | | | | | | | | |DEL PW| Ins |DEL NW| | | * `------------------------------------------------' `------------------------------------------------' - * | | |POWER | | | | | | | | | + * | | | | | | | | | | | | * `----------------------------------' `----------------------------------' */ - [_RAISE] = LAYOUT( /* raise 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_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, XXXXXXX, PRE_WRD, KC_UP, NXT_WRD, XXXXXXX, KC_F12, - _______, KC_PIPE, KC_LPRN, KC_LBRC, KC_LCBR, KC_LABK, XXXXXXX, KC_LEFT, KC_DOWN, KC_RGHT, XXXXXXX, XXXXXXX, - _______, KC_TILD, KC_EQL, KC_PLUS, KC_BSLS, XXXXXXX, _______, _______, XXXXXXX, PRE_WDL, KC_INS, NXT_WDL, XXXXXXX, _______, - _______, _______, POWER, _______, _______, _______, _______, _______, _______, _______ + [_NAV] = LAYOUT( + 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, XXXXXXX, PRE_WRD, KC_UP, NXT_WRD, XXXXXXX, XXXXXXX, + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_HOME, KC_LEFT, KC_DOWN, KC_RGHT, KC_END, XXXXXXX, + _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, PRE_WDL, KC_INS, NXT_WDL, XXXXXXX, XXXXXXX, + _______, XXXXXXX, XXXXXXX, XXXXXXX, _______, XXXXXXX, XXXXXXX, _______, XXXXXXX, XXXXXXX ), - /* LOWER + /* SYM - symbols and numpad layer * ,-----------------------------------------. ,-----------------------------------------. - * | RST | F1 | F2 | F3 | F4 | F5 | | F6 | F7 | F8 | F9 | F10 | F11 | + * | F12 | F1 | F2 | F3 | F4 | F5 | | F6 | F7 | F8 | F9 | F10| F11| * |------+------+------+------+------+------| |------+------+------+------+------+------| - * | | |PRE W | UP |NXT W | | | ^ | & | * | € | ? | F12 | + * | | | | ( | ) | | | | 7 | 8 | 9 | | | * |------+------+------+------+------+------| |------+------+------+------+------+------| - * | | | LEFT | DOWN |RIGHT | | | > | } | ] | ) | | | | + * | CLck | | ~ | { | } | | | + | 4 | 5 | 6 | - | | * |------+------+------+------+------+------+------. ,------+------+------+------+------+------+------| - * | | |DEL PW| Ins |DEL NW| | | | | | / | - | _ | ` | | + * | | | ` | [ | ] | | | | NEnt | * | 1 | 2 | 3 | / | | * `------------------------------------------------' `------------------------------------------------' - * | | | | | | | | |POWER | | | + * | | | | | | | | 0 | | | NLck | * `----------------------------------' `----------------------------------' */ - [_LOWER] = LAYOUT( /* lower layer */ - RESET, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, - _______, XXXXXXX, PRE_WRD, KC_UP, NXT_WRD, XXXXXXX, KC_CIRC, KC_AMPR, KC_ASTR, KC_EURO, KC_QUES, KC_F12, - _______, XXXXXXX, KC_LEFT, KC_DOWN, KC_RGHT, XXXXXXX, KC_RABK, KC_RCBR, KC_RBRC, KC_RPRN, KC_PIPE, XXXXXXX, - _______, XXXXXXX, PRE_WDL, KC_INS, NXT_WDL, XXXXXXX, _______, _______, XXXXXXX, KC_SLSH, KC_MINS, KC_UNDS, KC_GRV, _______, - _______, _______, _______, _______, _______, _______, _______, POWER, _______, _______ + [_SYM] = LAYOUT( + 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, KC_LPRN, KC_RPRN, XXXXXXX, XXXXXXX, KC_P7, KC_P8, KC_P9, XXXXXXX, XXXXXXX, + KC_CAPS, XXXXXXX, KC_TILD, KC_LCBR, KC_RCBR, XXXXXXX, KC_PPLS, KC_P4, KC_P5, KC_P6, KC_PMNS, XXXXXXX, + XXXXXXX, XXXXXXX, KC_GRV, KC_LBRC, KC_RBRC, XXXXXXX, XXXXXXX, KC_PENT, KC_PAST, KC_P1, KC_P2, KC_P3, KC_PSLS, XXXXXXX, + XXXXXXX, XXXXXXX, _______, XXXXXXX, XXXXXXX, XXXXXXX, KC_P0, XXXXXXX, XXXXXXX, KC_NLCK ), - - /* POWER + + /* FN - one-shot access to F-keys with modifiers * ,-----------------------------------------. ,-----------------------------------------. - * | RST | F1 | F2 | F3 | F4 | F5 | | F6 | F7 | F8 | F9 | F10 | F11 | + * | F12 | F1 | F2 | F3 | F4 | F5 | | F6 | F7 | F8 | F9 | F10| F11| * |------+------+------+------+------+------| |------+------+------+------+------+------| - * | | ! | @ | # | $ | % | | ^ | & | * | € | ? | F12 | + * |A F12 |A F1 |A F2 |A F3 |A F4 |A F5 | | A F6 | A F7 | A F8 | A F9 | A F10| A F11| * |------+------+------+------+------+------| |------+------+------+------+------+------| - * | | | | ( | [ | { | < | | > | } | ] | ) | | | | + * |C F12 |C F1 |C F2 |C F3 |C F4 |C F5 | | C F6 | C F7 | C F8 | C F9 | C F10| C F11| * |------+------+------+------+------+------+------. ,------+------+------+------+------+------+------| - * | | ~ | = | + | \ | | | | | | / | - | _ | ` | | + * | | | | | | | | | | | | | | | | * `------------------------------------------------' `------------------------------------------------' * | | | | | | | | | | | | * `----------------------------------' `----------------------------------' */ - [_POWER] = LAYOUT( /* lower and raise combined */ - RESET, 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_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_EURO, KC_QUES, KC_F12, - _______, KC_PIPE, KC_LPRN, KC_LBRC, KC_LCBR, KC_LABK, KC_RABK, KC_RCBR, KC_RBRC, KC_RPRN, KC_PIPE, XXXXXXX, - _______, KC_TILD, KC_EQL, KC_PLUS, KC_BSLS, XXXXXXX, _______, _______, XXXXXXX, KC_SLSH, KC_MINS, KC_UNDS, KC_GRV, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + [_FN] = LAYOUT( + KC_F12, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, + C(KC_F12), C(KC_F1),C(KC_F2),C(KC_F3),C(KC_F4),C(KC_F5), C(KC_F6),C(KC_F7),C(KC_F8),C(KC_F9),C(KC_F10),C(KC_F11), + A(KC_F12), A(KC_F1),A(KC_F2),A(KC_F3),A(KC_F4),A(KC_F5), A(KC_F6),A(KC_F7),A(KC_F8),A(KC_F9),A(KC_F10),A(KC_F11), + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, XXXXXXX ) - }; void encoder_update_user(uint8_t index, bool clockwise) { switch (get_highest_layer(layer_state)) { - case _RAISE: + case _NAV ... _SYM: if (index == 0 || index == 1) { /* Left or right encoder */ // Next/previous track clockwise ? tap_code(KC_MNXT) : tap_code(KC_MPRV); diff --git a/keyboards/murcielago/rev1/keymaps/via/keymap.c b/keyboards/murcielago/rev1/keymaps/via/keymap.c index b3abed763169..9837fcff419c 100644 --- a/keyboards/murcielago/rev1/keymaps/via/keymap.c +++ b/keyboards/murcielago/rev1/keymaps/via/keymap.c @@ -2,9 +2,9 @@ enum layers { BASE, - _RAISE, - _LOWER, - _POWER + _NAV, + _SYM, + _FN }; #define PRE_WRD LCTL(KC_LEFT) // jump to next word @@ -13,107 +13,102 @@ enum layers { #define NXT_WDL LCTL(KC_DEL) // delete next word #define PRE_WDL LCTL(KC_BSPC) // delete previous word -#define KC_EURO ALGR(KC_5) -#define LA_CAP MT(MOD_LALT, KC_CAPS) // Left alt on hold, caps lock on tap -#define RA_ENT MT(MOD_RALT, KC_ENT) // Right alt on hold, enter on tap - -#define RAISE MO(_RAISE) // Raise layer access -#define LOWER MO(_LOWER) // Lower layer access -#define POWER MO(_POWER) // Power layer access (raise and lower) +#define NAV MO(_NAV) // NAV layer access +#define SYM MO(_SYM) // SYM layer access +#define FN OSL(_FN) // FN layer access /* - * This default keymap is aimed at users of the US international layout + * This default keymap is aimed at users of the US or US international layout */ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* BASE * ,-----------------------------------------. ,-----------------------------------------. * | =+ | 1! | 2@ | 3# | 4$ | 5% | | 6^ | 7& | 8* | 9( | 0) | -_ | * |------+------+------+------+------+------| |------+------+------+------+------+------| - * | [{ | Q | W | E | R | T | | Y | U | I | O | P | }] | + * | Tab | Q | W | E | R | T | | Y | U | I | O | P | \| | * |------+------+------+------+------+------| |------+------+------+------+------+------| * | Del | A | S | D | F | G | | H | J | K | L | ;: | '" | * |------+------+------+------+------+------+------. ,------+------+------+------+------+------+------| - * | Sft | Z | X | C | V | B | GEsc | | Tab | N | M | ,< | .> | /? | Sft | + * | Sft | Z | X | C | V | B | Esc | | Ent | N | M | ,< | .> | /? | Sft | * `------------------------------------------------' `------------------------------------------------' - * | LA/CL| LGUI |LOWER | Back | Ctrl | |RA/Ent|Space |RAISE | RGUI | Play | + * | LAlt | LGUI | SYM | Back | Ctrl | | RAlt |Space | NAV | PWR | Play | * `----------------------------------' `----------------------------------' */ [BASE] = LAYOUT( /* qwerty */ KC_EQL, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, - KC_LBRC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_RBRC, + 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_DEL, 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_GESC, KC_TAB, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, - LA_CAP, KC_LGUI, LOWER, KC_BSPC, KC_LCTL, RA_ENT, KC_SPC, RAISE, KC_RGUI, KC_MPLY + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_GESC, KC_ENT, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, + KC_LALT, KC_LGUI, SYM, KC_BSPC, KC_LCTL, KC_RALT, KC_SPC, NAV, FN, KC_MPLY ), - /* RAISE + /* NAV - navigation layer * ,-----------------------------------------. ,-----------------------------------------. - * | RST | F1 | F2 | F3 | F4 | F5 | | F6 | F7 | F8 | F9 | F10 | F11 | + * | F12 | F1 | F2 | F3 | F4 | F5 | | F6 | F7 | F8 | F9 | F10| F11| * |------+------+------+------+------+------| |------+------+------+------+------+------| - * | | ! | @ | # | $ | % | | |PRE W | UP |NXT W | | F12 | + * | | | | | | | | |PRE W | UP |NXT W | | | * |------+------+------+------+------+------| |------+------+------+------+------+------| - * | | | | ( | [ | { | < | | | LEFT | DOWN |RIGHT | | | + * | | | | | | | | HOME | LEFT | DOWN |RIGHT | END | | * |------+------+------+------+------+------+------. ,------+------+------+------+------+------+------| - * | | ~ | = | + | \ | | | | | |DEL PW| Ins |DEL NW| | | + * | | | | | | | | | | |DEL PW| Ins |DEL NW| | | * `------------------------------------------------' `------------------------------------------------' - * | | |POWER | | | | | | | | | + * | | | | | | | | | | | | * `----------------------------------' `----------------------------------' */ - [_RAISE] = LAYOUT( /* raise 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_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, XXXXXXX, PRE_WRD, KC_UP, NXT_WRD, XXXXXXX, KC_F12, - _______, KC_PIPE, KC_LPRN, KC_LBRC, KC_LCBR, KC_LABK, XXXXXXX, KC_LEFT, KC_DOWN, KC_RGHT, XXXXXXX, XXXXXXX, - _______, KC_TILD, KC_EQL, KC_PLUS, KC_BSLS, XXXXXXX, _______, _______, XXXXXXX, PRE_WDL, KC_INS, NXT_WDL, XXXXXXX, _______, - _______, _______, POWER, _______, _______, _______, _______, _______, _______, _______ + [_NAV] = LAYOUT( + 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, XXXXXXX, PRE_WRD, KC_UP, NXT_WRD, XXXXXXX, XXXXXXX, + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_HOME, KC_LEFT, KC_DOWN, KC_RGHT, KC_END, XXXXXXX, + _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, PRE_WDL, KC_INS, NXT_WDL, XXXXXXX, XXXXXXX, + _______, XXXXXXX, XXXXXXX, XXXXXXX, _______, XXXXXXX, XXXXXXX, _______, XXXXXXX, XXXXXXX ), - /* LOWER + /* SYM - symbols and numpad layer * ,-----------------------------------------. ,-----------------------------------------. - * | RST | F1 | F2 | F3 | F4 | F5 | | F6 | F7 | F8 | F9 | F10 | F11 | + * | F12 | F1 | F2 | F3 | F4 | F5 | | F6 | F7 | F8 | F9 | F10| F11| * |------+------+------+------+------+------| |------+------+------+------+------+------| - * | | |PRE W | UP |NXT W | | | ^ | & | * | € | ? | F12 | + * | | | | ( | ) | | | | 7 | 8 | 9 | | | * |------+------+------+------+------+------| |------+------+------+------+------+------| - * | | | LEFT | DOWN |RIGHT | | | > | } | ] | ) | | | | + * | CLck | | ~ | { | } | | | + | 4 | 5 | 6 | - | | * |------+------+------+------+------+------+------. ,------+------+------+------+------+------+------| - * | | |DEL PW| Ins |DEL NW| | | | | | / | - | _ | ` | | + * | | | ` | [ | ] | | | | NEnt | * | 1 | 2 | 3 | / | | * `------------------------------------------------' `------------------------------------------------' - * | | | | | | | | |POWER | | | + * | | | | | | | | 0 | | | NLck | * `----------------------------------' `----------------------------------' */ - [_LOWER] = LAYOUT( /* lower layer */ - RESET, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, - _______, XXXXXXX, PRE_WRD, KC_UP, NXT_WRD, XXXXXXX, KC_CIRC, KC_AMPR, KC_ASTR, KC_EURO, KC_QUES, KC_F12, - _______, XXXXXXX, KC_LEFT, KC_DOWN, KC_RGHT, XXXXXXX, KC_RABK, KC_RCBR, KC_RBRC, KC_RPRN, KC_PIPE, XXXXXXX, - _______, XXXXXXX, PRE_WDL, KC_INS, NXT_WDL, XXXXXXX, _______, _______, XXXXXXX, KC_SLSH, KC_MINS, KC_UNDS, KC_GRV, _______, - _______, _______, _______, _______, _______, _______, _______, POWER, _______, _______ + [_SYM] = LAYOUT( + 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, KC_LPRN, KC_RPRN, XXXXXXX, XXXXXXX, KC_P7, KC_P8, KC_P9, XXXXXXX, XXXXXXX, + KC_CAPS, XXXXXXX, KC_TILD, KC_LCBR, KC_RCBR, XXXXXXX, KC_PPLS, KC_P4, KC_P5, KC_P6, KC_PMNS, XXXXXXX, + XXXXXXX, XXXXXXX, KC_GRV, KC_LBRC, KC_RBRC, XXXXXXX, XXXXXXX, KC_PENT, KC_PAST, KC_P1, KC_P2, KC_P3, KC_PSLS, XXXXXXX, + XXXXXXX, XXXXXXX, _______, XXXXXXX, XXXXXXX, XXXXXXX, KC_P0, XXXXXXX, XXXXXXX, KC_NLCK ), - - /* POWER + + /* FN - one-shot access to F-keys with modifiers * ,-----------------------------------------. ,-----------------------------------------. - * | RST | F1 | F2 | F3 | F4 | F5 | | F6 | F7 | F8 | F9 | F10 | F11 | + * | F12 | F1 | F2 | F3 | F4 | F5 | | F6 | F7 | F8 | F9 | F10| F11| * |------+------+------+------+------+------| |------+------+------+------+------+------| - * | | ! | @ | # | $ | % | | ^ | & | * | € | ? | F12 | + * |A F12 |A F1 |A F2 |A F3 |A F4 |A F5 | | A F6 | A F7 | A F8 | A F9 | A F10| A F11| * |------+------+------+------+------+------| |------+------+------+------+------+------| - * | | | | ( | [ | { | < | | > | } | ] | ) | | | | + * |C F12 |C F1 |C F2 |C F3 |C F4 |C F5 | | C F6 | C F7 | C F8 | C F9 | C F10| C F11| * |------+------+------+------+------+------+------. ,------+------+------+------+------+------+------| - * | | ~ | = | + | \ | | | | | | / | - | _ | ` | | + * | | | | | | | | | | | | | | | | * `------------------------------------------------' `------------------------------------------------' * | | | | | | | | | | | | * `----------------------------------' `----------------------------------' */ - [_POWER] = LAYOUT( /* lower and raise combined */ - RESET, 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_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_EURO, KC_QUES, KC_F12, - _______, KC_PIPE, KC_LPRN, KC_LBRC, KC_LCBR, KC_LABK, KC_RABK, KC_RCBR, KC_RBRC, KC_RPRN, KC_PIPE, XXXXXXX, - _______, KC_TILD, KC_EQL, KC_PLUS, KC_BSLS, XXXXXXX, _______, _______, XXXXXXX, KC_SLSH, KC_MINS, KC_UNDS, KC_GRV, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + [_FN] = LAYOUT( + KC_F12, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, + C(KC_F12), C(KC_F1),C(KC_F2),C(KC_F3),C(KC_F4),C(KC_F5), C(KC_F6),C(KC_F7),C(KC_F8),C(KC_F9),C(KC_F10),C(KC_F11), + A(KC_F12), A(KC_F1),A(KC_F2),A(KC_F3),A(KC_F4),A(KC_F5), A(KC_F6),A(KC_F7),A(KC_F8),A(KC_F9),A(KC_F10),A(KC_F11), + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, XXXXXXX ) - }; void encoder_update_user(uint8_t index, bool clockwise) { switch (get_highest_layer(layer_state)) { - case _RAISE: + case _NAV ... _SYM: if (index == 0 || index == 1) { /* Left or right encoder */ // Next/previous track clockwise ? tap_code(KC_MNXT) : tap_code(KC_MPRV); From ccb4b81b3f69ccfc088b63f34599720bb6f382c3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Catriel=20M=C3=BCller?= Date: Thu, 11 Jun 2020 09:39:56 -0300 Subject: [PATCH 141/930] Fix my personal keymap // Custom keymap for Kbdfans/kbd67/rev2 with improvements on Accessibility (#9207) Co-authored-by: Ryan --- .../dz65rgb/keymaps/catrielmuller/keymap.c | 28 ++++++++-------- .../keymaps/catrielmuller_camilad/config.h | 17 ++++++++++ .../keymaps/catrielmuller_camilad/keymap.c | 33 +++++++++++++++++++ .../keymaps/catrielmuller_camilad/readme.md | 1 + .../keymaps/catrielmuller_camilad/rules.mk | 1 + 5 files changed, 66 insertions(+), 14 deletions(-) create mode 100644 keyboards/kbdfans/kbd67/rev2/keymaps/catrielmuller_camilad/config.h create mode 100644 keyboards/kbdfans/kbd67/rev2/keymaps/catrielmuller_camilad/keymap.c create mode 100644 keyboards/kbdfans/kbd67/rev2/keymaps/catrielmuller_camilad/readme.md create mode 100644 keyboards/kbdfans/kbd67/rev2/keymaps/catrielmuller_camilad/rules.mk diff --git a/keyboards/dztech/dz65rgb/keymaps/catrielmuller/keymap.c b/keyboards/dztech/dz65rgb/keymaps/catrielmuller/keymap.c index 597f6530d8ba..8bd606910799 100644 --- a/keyboards/dztech/dz65rgb/keymaps/catrielmuller/keymap.c +++ b/keyboards/dztech/dz65rgb/keymaps/catrielmuller/keymap.c @@ -21,19 +21,19 @@ enum layers { } const layers_leds_map[] = { - [_MAIN] = 17, - [_INDEX] = 16, - [_FN] = 15, - [_MULTIMEDIA] = 14, - [_EMOJI] = 13, - [_EXT1] = 12, - [_EXT2] = 11, - [_EXT3] = 10, - [_EXT4] = 9, - [_EXT5] = 18, - [_EXT6] = 19, - [_RGB] = 20, - [_CONFIG] = 21, + [_MAIN] = 0, + [_INDEX] = 1, + [_FN] = 2, + [_MULTIMEDIA] = 3, + [_EMOJI] = 4, + [_EXT1] = 5, + [_EXT2] = 6, + [_EXT3] = 7, + [_EXT4] = 8, + [_EXT5] = 9, + [_EXT6] = 10, + [_RGB] = 11, + [_CONFIG] = 12, }; enum unicode_names { @@ -234,7 +234,7 @@ void rgb_matrix_indicators_user(void) { // CapsLock Light if (IS_HOST_LED_ON(USB_LED_CAPS_LOCK)) { - rgb_matrix_set_color(8, MAIN_COLOR[0], MAIN_COLOR[1], MAIN_COLOR[2]); + rgb_matrix_set_color(30, MAIN_COLOR[0], MAIN_COLOR[1], MAIN_COLOR[2]); } // Show Selected Layer diff --git a/keyboards/kbdfans/kbd67/rev2/keymaps/catrielmuller_camilad/config.h b/keyboards/kbdfans/kbd67/rev2/keymaps/catrielmuller_camilad/config.h new file mode 100644 index 000000000000..2498b480c9d9 --- /dev/null +++ b/keyboards/kbdfans/kbd67/rev2/keymaps/catrielmuller_camilad/config.h @@ -0,0 +1,17 @@ +/* + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License 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 ONESHOT_TIMEOUT 5000 diff --git a/keyboards/kbdfans/kbd67/rev2/keymaps/catrielmuller_camilad/keymap.c b/keyboards/kbdfans/kbd67/rev2/keymaps/catrielmuller_camilad/keymap.c new file mode 100644 index 000000000000..948f0a80ae13 --- /dev/null +++ b/keyboards/kbdfans/kbd67/rev2/keymaps/catrielmuller_camilad/keymap.c @@ -0,0 +1,33 @@ +/* + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public 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( + 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, + OSM(MOD_LSFT),KC_Z ,KC_X ,KC_C ,KC_V ,KC_B ,KC_N ,KC_M ,KC_COMM,KC_DOT ,KC_SLSH,OSM(MOD_RSFT) ,KC_UP ,KC_END , + OSM(MOD_LCTL),OSM(MOD_LGUI),OSM(MOD_LALT),KC_SPC ,OSM(MOD_RALT),OSL(1) ,OSM(MOD_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_INS , + _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,KC_PSCR, + _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,TILDE ,_______ ,_______, + _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______ ,KC_PGUP,_______, + _______,_______,_______,_______ ,_______,_______,_______,KC_HOME,KC_PGDN,KC_END ), + +}; diff --git a/keyboards/kbdfans/kbd67/rev2/keymaps/catrielmuller_camilad/readme.md b/keyboards/kbdfans/kbd67/rev2/keymaps/catrielmuller_camilad/readme.md new file mode 100644 index 000000000000..2e3d2a171bd7 --- /dev/null +++ b/keyboards/kbdfans/kbd67/rev2/keymaps/catrielmuller_camilad/readme.md @@ -0,0 +1 @@ +# A keymap for kbd67 with some improvements for accessibility diff --git a/keyboards/kbdfans/kbd67/rev2/keymaps/catrielmuller_camilad/rules.mk b/keyboards/kbdfans/kbd67/rev2/keymaps/catrielmuller_camilad/rules.mk new file mode 100644 index 000000000000..72bbe7ddb27d --- /dev/null +++ b/keyboards/kbdfans/kbd67/rev2/keymaps/catrielmuller_camilad/rules.mk @@ -0,0 +1 @@ +CONSOLE_ENABLE = no From 044b4aaf018522ae326bae71ae5a899930fbdf1b Mon Sep 17 00:00:00 2001 From: umi <57262844+umi-umi@users.noreply.github.com> Date: Sat, 13 Jun 2020 15:50:19 +0900 Subject: [PATCH 142/930] [Docs] Japanese translation of docs/feature_split_keyboard.md (#9031) * add feature_split_keyboard.md translation * add header for git * update based on comment * update based on comment --- docs/ja/feature_split_keyboard.md | 232 ++++++++++++++++++++++++++++++ 1 file changed, 232 insertions(+) create mode 100644 docs/ja/feature_split_keyboard.md diff --git a/docs/ja/feature_split_keyboard.md b/docs/ja/feature_split_keyboard.md new file mode 100644 index 000000000000..275647b8033b --- /dev/null +++ b/docs/ja/feature_split_keyboard.md @@ -0,0 +1,232 @@ +# 分割キーボード + + + +QMK ファームウェアリポジトリの多くのキーボードは、"分割"キーボードです。それらは2つのコントローラを使います — 1つは USB に接続し、もう1つは TRRS または同様のケーブルを介してシリアルまたは I2C 接続で接続します。 + +分割キーボードには多くの利点がありますが、有効にするには追加の作業が必要です。 + +QMK ファームウェアには、任意のキーボードで使用可能な一般的な実装と、多くのキーボード固有の実装があります。 + +このため、主に Let's Split とその他のキーボードで使われる一般的な実装について説明します。 + +!> ARM はまだ完全には分割キーボードをサポートしておらず、様々な制限があります。進捗はしていますが、機能の100%にはまだ達していません。 + + +## 互換性の概要 + +| Transport | AVR | ARM | +|------------------------------|--------------------|--------------------| +| ['serial'](serial_driver.md) | :heavy_check_mark: | :white_check_mark: 1 | +| I2C | :heavy_check_mark: | | + +注意: + +1. ハードウェアとソフトウェアの両方の制限は、[ドライバーのドキュメント](serial_driver.md)の中で説明されます。 + +## ハードウェア設定 + +2つの Pro Micro 互換のコントローラを使っており、キーボードの左右を接続するために TRRS ジャックを使っていることを前提とします。 + +### ハードウェア要件 + +左右それぞれのキーボードマトリックスのためのダイオードとスイッチとは別に、2個の TRRS ソケットと 1本の TRRS ケーブルが必要です。 + +あるいは、少なくとも3本のワイヤがあるケーブルとソケットを使うことができます。 + +キーボードの左右間で通信するために I2C を使いたい場合は、少なくとも4本のワイヤを備えたケーブルと 2個の 4.7kΩ プルアップ抵抗が必要です。 + +#### 考慮事項 + +最も一般的に使われる接続は、TRRS ケーブルとジャックです。これらは4本のワイヤを提供し、分割キーボードに非常に有用で、簡単に見つけることができます。 + +ただし、ワイヤのうちの1本が Vcc を供給するため、キーボードはホットプラグ不可能です。TRRS ケーブルを抜き差しする前に、必ずキーボードのUSB接続をはずす必要があります。そうしなければ、コントローラを短絡させたり、もっと悪いことが起こるかもしれません。 + +別のオプションは電話ケーブルを使うことです (例えば、旧式の RJ-11/RJ-14 ケーブル)。実際に4本のワイヤ/レーンをサポートするものを使うようにしてください。 + +ただし、USB ケーブル、SATA ケーブル、そして単に4本の電線でもコントローラ間の通信に使用できることがわかっています。 + +!> コントローラ間の通信に USB ケーブルを使っても問題ありませんが、コネクタは通常の USB 接続と間違えられるかもしれず、配線方法によってはキーボードが短絡する可能性があります。このため、分割キーボードの接続のためにはお勧めできません。 + +### シリアル配線 + +2つの Pro Micro 間で GND、Vcc、D0 (別名 PDO あるいは pin 3) を TRS/TRRS ケーブルの3本のワイヤで接続します。 + +?> ここで使われるピンは実際には以下の `SOFT_SERIAL_PIN` によって設定されることに注意してください。 + +![シリアル配線](https://i.imgur.com/C3D1GAQ.png) + +### I2C 配線 + +2つの Pro Micro 間で GND、Vcc、さらに SCL と SDA (それぞれ 別名 PD0/ピン3 および PD1/ピン2) を TRRS ケーブルの4本のワイヤで接続します。 + +プルアップ抵抗はキーボードの左右どちら側にも配置することができます。もし各側を単独で使いたい場合は、4つの抵抗を使い、両側にプルアップ抵抗を配置することもできます。 + +![I2C 配線](https://i.imgur.com/Hbzhc6E.png) + +## ファームウェア設定 + +分割キーボード機能を有効にするには、以下を `rules.mk` に追加してください: + +```make +SPLIT_KEYBOARD = yes +``` + +カスタムトランスポート (通信メソッド)を使っている場合は、以下を追加する必要もあります: + +```make +SPLIT_TRANSPORT = custom +``` + +### 左右の設定 + +デフォルトでは、ファームウェアはどちら側がどちらであるかを認識しません; 決定するには幾つかの助けが必要です。これを行うには幾つかの方法があり、以下に優先順に列挙します。 + +#### ピンによる左右の設定 + +左右を決定するためにコントローラ上のピンを読むようにファームウェアを設定することができます。これを行うには、以下を `config.h` ファイルに追加します: + +```c +#define SPLIT_HAND_PIN B7 +``` + +これは指定されたピンを読み込みます。high の場合、コントローラはそれを左側だと仮定し、low の場合、それは右側であると仮定します。 + +#### EEPROM による左右の設定 + +このメソッドは永続ストレージ(`EEPROM`)のフラグを設定することで、キーボードの左右を設定します。これはコントローラが最初に起動する時にチェックされ、キーボードのどちら側であるかとキーボードのレイアウトの向きを決定します。 + + +このメソッドを有効にするには、以下を `config.h` ファイルに追加します: + +```c +#define EE_HANDS +``` + +ただし、各コントローラに正しい側の EEPROM ファイルを書き込む必要があります。これを手動で行うこともできますが、ファームウェアを書き込む時にこれを行う avrdude および dfu のターゲットが存在します。 + +* `:avrdude-split-left` +* `:avrdude-split-right` +* `:dfu-split-left` +* `:dfu-split-right` +* `:dfu-util-split-left` +* `:dfu-util-split-right` + +この設定は、`EEP_RST` キーや `eeconfig_init()` 関数を使って EEPROM を再初期化する時には変更されません。ただし、ファームウェアの組み込みオプション以外で EEPROM をリセット([QMK Toolbox]() の "Reset EEPROM" ボタンの動作のように、`EEPROM` を上書きするファイルを書きこむなど)した場合、`EEPROM` ファイルを再書き込みする必要があります。 + +`EEPROM` ファイルは、QMK ファームウェアのリポジトリ内の[ここ](https://github.com/qmk/qmk_firmware/tree/master/quantum/split_common)にあります。 + +#### `#define` による左右の設定 + +コンパイル時に左右を設定することができます。これは以下を `config.h` ファイルに追加することで行うことができます: + +```c +#define MASTER_RIGHT +``` + +あるいは + +```c +#define MASTER_LEFT +``` + +どちらも定義されていない場合、左右のデフォルトは `MASTER_LEFT` になります。 + + +### 通信オプション + +全ての分割キーボードが同一であるとは限らないため、`config.h` ファイル内で設定することができる多くの追加のオプションがあります。 + +```c +#define USE_I2C +``` + +これは分割キーボードの I2C サポートを有効にします。これは厳密には通信用ではありませんが、OLED あるいは I2C ベースのデバイスに使うことができます。 + +```c +#define SOFT_SERIAL_PIN D0 +``` + +これはシリアル通信用に使われるピンを設定します。シリアルを使っていない場合は、これを定義する必要はありません。 + +ただし、キーボード上でシリアルおよび I2C を使っている場合は、これを設定し、D0 および D1 以外の値に設定する必要があります (これらは I2C 通信のために使われます)。 + +```c +#define SELECT_SOFT_SERIAL_SPEED {#}` +``` + +シリアル通信に問題がある場合は、この値を変更して、シリアル用の通信速度を制御することができます。デフォルトは1で、可能な値は以下の通りです: + +* **`0`**: 約189kbps (実験用途専用) +* **`1`**: 約137kbps (デフォルト) +* **`2`**: 約75kbps +* **`3`**: 約39kbps +* **`4`**: 約26kbps +* **`5`**: 約20kbps + +### ハードウェア設定オプション + +ハードウェアのセットアップ方法に基づいて、設定する必要のある設定が幾つかあります。 + +```c +#define MATRIX_ROW_PINS_RIGHT { } +#define MATRIX_COL_PINS_RIGHT { } +``` + +これにより、右側のマトリックスに異なるピンのセットを指定することができます。これは、左右の形が違うキーボード (Keebio の Quefrency など)で、左右で別の構成が必要な場合に便利です。 + +```c +#define DIRECT_PINS_RIGHT { { F1, F0, B0, C7 }, { F4, F5, F6, F7 } } +``` + +これにより右側のための異なる直接ピンのセットを指定することができます。 + +```c +#define ENCODERS_PAD_A_RIGHT { encoder1a, encoder2a } +#define ENCODERS_PAD_B_RIGHT { encoder1b, encoder2b } +``` + +これにより右側のための異なるエンコーダピンのセットを指定することができます。 + +```c +#define RGBLIGHT_SPLIT +``` + +このオプションは、分割キーボードのコントローラ間で RGB ライトモードの同期を有効にします。これはコントローラに直接配線されている RGB LED を持つキーボード用です (つまり、それらは TRRS ケーブルで "追加データ"オプションを使っていません)。 + +```c +#define RGBLED_SPLIT { 6, 6 } +``` + +これは各コントローラに直接接続されている LED の数を設定します。最初の数は左側、2番目の数は右側です。 + +?> この設定は `RGBLIGHT_SPLIT` が有効になっていることを意味し、有効になっていない場合は強制的に有効にします。 + + +```c +#define SPLIT_USB_DETECT +``` +このオプションは、スタートアップの挙動を変更して、マスタ/スレーブの決定時にアクティブな USB 接続を検出します。このオプションがタイムアウトになった場合、その片側はスレーブと見なされます。これは ARM のデフォルトの挙動で、AVR Teensy ボードに必要です (ハードウェアの制限のため)。 + +?> この設定はバッテリパックを使ったデモの機能を停止します。 + +```c +#define SPLIT_USB_TIMEOUT 2000 +``` +これは、`SPLIT_USB_DETECT` を使う時のマスタ/スレーブを検出する場合の最大タイムアウトを設定します。 + +```c +#define SPLIT_USB_TIMEOUT_POLL 10 +``` +これは `SPLIT_USB_DETECT` を使う時のマスタ/スレーブを検出する場合のポーリング頻度を設定します + +## 追加のリソース(英語) + +Nicinabox には Let's Split キーボードのための[非常に優れた詳細なガイド](https://github.com/nicinabox/lets-split-guide)があり、トラブルシューティング情報を含む知っておくべきほとんど全てをカバーします。 + +ただし、RGB ライトセクションは、RGB Split コードが QMK ファームウェアに追加されるずっと前に書かれたため、古くなっています。ガイドに従う代わりに、各 LED テーブ(訳注: LED strip とも呼びます)を直接コントローラに配線します。 + + From 54ef02dead1663ca7ed91c862f97d9fc1a2b5cb7 Mon Sep 17 00:00:00 2001 From: Andrew Kannan Date: Sat, 13 Jun 2020 03:06:38 -0400 Subject: [PATCH 143/930] Fix project alice indicators (#9342) --- keyboards/projectkb/alice/alice.c | 1 + 1 file changed, 1 insertion(+) diff --git a/keyboards/projectkb/alice/alice.c b/keyboards/projectkb/alice/alice.c index 22e387761594..aacf448bffb4 100644 --- a/keyboards/projectkb/alice/alice.c +++ b/keyboards/projectkb/alice/alice.c @@ -8,6 +8,7 @@ void keyboard_pre_init_kb(void) { keyboard_pre_init_user(); } + bool led_update_kb(led_t led_state) { bool runDefault = led_update_user(led_state); if (runDefault) { From 400423d10b53ea9e309e7b014aa4685961f25a4f Mon Sep 17 00:00:00 2001 From: MechMerlin <30334081+mechmerlin@users.noreply.github.com> Date: Sat, 13 Jun 2020 00:16:07 -0700 Subject: [PATCH 144/930] VIA Support: Noxary 260 (#9349) * add VIA support to noxary 260 * change the layout macro to be 60_ansi as thats going to be the base VIA layout * update readme --- keyboards/noxary/260/keymaps/via/keymap.c | 85 +++++++++++++++++++++++ keyboards/noxary/260/keymaps/via/rules.mk | 2 + keyboards/noxary/260/readme.md | 6 +- 3 files changed, 90 insertions(+), 3 deletions(-) create mode 100644 keyboards/noxary/260/keymaps/via/keymap.c create mode 100644 keyboards/noxary/260/keymaps/via/rules.mk diff --git a/keyboards/noxary/260/keymaps/via/keymap.c b/keyboards/noxary/260/keymaps/via/keymap.c new file mode 100644 index 000000000000..4177abd154fc --- /dev/null +++ b/keyboards/noxary/260/keymaps/via/keymap.c @@ -0,0 +1,85 @@ +/* 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] = { + /* _BL: Base Layer(Default) - For ISO enter use ANSI enter + * ,-----------------------------------------------------------. + * |Esc | 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =| \|BSpc| + * |-----------------------------------------------------------| + * |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| \ | + * |-----------------------------------------------------------| + * |CAPS | A| S| D| F| G| H| J| K| L| ;| '| #| Ent| + * |-----------------------------------------------------------| + * |Shift| \| Z| X| C| V| B| N| M| ,| .| /|Shift |Del| + * |-----------------------------------------------------------| + * |Ctrl|Win |Alt | Space |Alt |Win |Mo(1) |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_LALT, KC_RGUI, MO(1), KC_RCTL), + /* _FL1: Function Layer 1 - For ISO enter use ANSI enter + * ,----------------------------------------------------------------. + * | `|F1| F2| F3| F4| F5| F6| F7| F8| F9|F10|F11|F12| |PScr| | + * |----------------------------------------------------------------| + * | | | | |RST| | | | | | | | | | Ins| + * |----------------------------------------------------------------| + * | | | | | | | | | | | | | | |Home| + * |----------------------------------------------------------------| + * | | | | | | | | | |Bl-|Bl+| |Mute|Vol+| End| + * |----------------------------------------------------------------| + * | | | | BL_Toggle | | | | |Vol-| | + * `----------------------------------------------------------------' + */ + [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_PSCR, + _______, KC_VOLU, _______, _______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, KC_VOLD, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, BL_DEC, BL_INC, _______, KC_MUTE, + _______, _______, _______, BL_TOGG, _______, _______, _______, _______), + /* _FL2: Function Layer 2 - For ISO enter use ANSI enter + * ,----------------------------------------------------------------. + * | | | | | | | | | | | | | | | | | + * |----------------------------------------------------------------| + * | | | | | | | | | | | | | | | | + * |----------------------------------------------------------------| + * | | | | | | | | | | | | | | | | + * |----------------------------------------------------------------| + * | | | | | | | | | | | | | | | | + * |----------------------------------------------------------------| + * | | | | | | | | | | | + * `----------------------------------------------------------------' + */ + [2] = LAYOUT_60_ansi( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______), + + [3] = LAYOUT_60_ansi( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______), +}; + diff --git a/keyboards/noxary/260/keymaps/via/rules.mk b/keyboards/noxary/260/keymaps/via/rules.mk new file mode 100644 index 000000000000..36b7ba9cbc98 --- /dev/null +++ b/keyboards/noxary/260/keymaps/via/rules.mk @@ -0,0 +1,2 @@ +VIA_ENABLE = yes +LTO_ENABLE = yes diff --git a/keyboards/noxary/260/readme.md b/keyboards/noxary/260/readme.md index 48cbbbf22970..80b9f8e5150a 100644 --- a/keyboards/noxary/260/readme.md +++ b/keyboards/noxary/260/readme.md @@ -4,9 +4,9 @@ Noxary 260 A fully customizable 60% keyboard. -Keyboard Maintainer: [MechMerlin](https://github.com/mechmerlin), [Rozakiin](https://github.com/rozakiin) -Hardware Supported: Noxary 260 PCB -Hardware Availability: [Geekhack Group Buy](https://geekhack.org/index.php?topic=93572.0) +* Keyboard Maintainer: [MechMerlin](https://github.com/mechmerlin), [Rozakiin](https://github.com/rozakiin) +* Hardware Supported: Noxary 260 PCB +* Hardware Availability: [Geekhack Group Buy](https://geekhack.org/index.php?topic=93572.0) Make example for this keyboard (after setting up your build environment): From 1f42071238c57aff1ec2d441fe82ae2df4a0853f Mon Sep 17 00:00:00 2001 From: mcarni Date: Sat, 13 Jun 2020 09:29:22 +0200 Subject: [PATCH 145/930] dz60 iso split - cleaned up the readme and replaced normal key with numpad key on numpad layer (#9339) * README cleanup * replaced "normal" numbers with "keypad" numbers: KC_P4 replaced by KC_KP_P4 * replaced "normal" keys on Numpad Layer with the "KeyPad" keys KC_1 replaced by KC_P1 etc. --- .../dz60/keymaps/iso_split-spacebar/README.md | 123 ++++++++++-------- .../dz60/keymaps/iso_split-spacebar/keymap.c | 33 +++-- 2 files changed, 95 insertions(+), 61 deletions(-) diff --git a/keyboards/dz60/keymaps/iso_split-spacebar/README.md b/keyboards/dz60/keymaps/iso_split-spacebar/README.md index 7d96f2225fac..2600d2271574 100644 --- a/keyboards/dz60/keymaps/iso_split-spacebar/README.md +++ b/keyboards/dz60/keymaps/iso_split-spacebar/README.md @@ -1,69 +1,86 @@ -# iso layout with a split spacebar +# ISO layout with a split spacebar -i needed to have an ISO layout -and i wanted to have a split spacebar -i couldn't find anything ready so i cobbled this together +I needed to have an ISO layout +and I wanted to have a split spacebar +I couldn't find anything ready +so i cobbled this together ----- Layer 0 - BL -this is basically the standard iso layout with the addition of the split spacebar +## Layer 0 - BL + +standard ISO layout with the addition of the split spacebar menu key (KC_APP) is used to move to the next layer the key in between the two spacebars is the function key - *,-----------------------------------------------------------. - *| ' | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = |Backsp | - *|-----------------------------------------------------------| - *| Tab | q | w | e | r | t | y | u | i | o | p | [ | ] |enter| - *|------------------------------------------------------ | - *| Caps | a | s | d | f | g | h | j | k | l | ; | ' | # | | - *|-----------------------------------------------------------| - *|Shft| < | z | x | c | v | b | n | m | , | . | / | Shift | - *|-----------------------------------------------------------| - *|Ctrl|Gui |Alt | Space | FN | Space |Alt |Gui | NL |Ctrl | - *`-----------------------------------------------------------' ----- Layer 1 - FL +``` +,-----------------------------------------------------------. +| ' | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = |Backsp | +|-----------------------------------------------------------| +| Tab | q | w | e | r | t | y | u | i | o | p | [ | ] |enter| +|------------------------------------------------------ | +| Caps | a | s | d | f | g | h | j | k | l | ; | ' | # | | +|-----------------------------------------------------------| +|Shft| < | z | x | c | v | b | n | m | , | . | / | Shift | +|-----------------------------------------------------------| +|Ctrl|Gui |Alt | Space | FN | Space |Alt |Gui | NL |Ctrl | +`-----------------------------------------------------------' +``` + +## Layer 1 - FL + quite standard function layer arrow keys and mouse movement/buttons on the home row - *,-----------------------------------------------------------. - *|ESC|F1 |F2 |F3 |F4 |F5 |F6 |F7 |F8 |F9 |F10|F11|F12| DEL | - *|-----------------------------------------------------------| - *| | | | | | | | | | |prt| | | | - *|------------------------------------------------------ | - *| |m l|m d|m u|m r| | | l | d | u | r | | | | - *|-----------------------------------------------------------| - *| | | | | |mb1|mb2| |hm |pgd|pgu|end| | - *|-----------------------------------------------------------| - *| | | | | | | | | | | - *`-----------------------------------------------------------' ----- Layer 2 - NL +``` +,-----------------------------------------------------------. +|ESC|F1 |F2 |F3 |F4 |F5 |F6 |F7 |F8 |F9 |F10|F11|F12| DEL | +|-----------------------------------------------------------| +| | | | | | | | | | |prt| | | | +|------------------------------------------------------ | +| |m l|m d|m u|m r| | | l | d | u | r | | | | +|-----------------------------------------------------------| +| | | | | |mb1|mb2| |hm |pgd|pgu|end| | +|-----------------------------------------------------------| +| | | | | | | | | | | +`-----------------------------------------------------------' +``` + +## Layer 2 - NL + numbers numbers numbers... first key (top left) to return to BL menu key (KC_APP) is used to move to the next layer - *,-----------------------------------------------------------. - *|BL | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | | | | - *|-----------------------------------------------------------| - *| | 4 | 5 | 6 | * | / | | 4 | 5 | 6 | * | / | ] | | - *|------------------------------------------------------ | - *| | 7 | 8 | 9 | + | - | | 1 | 2 | 3 | + | - | | | - *|-----------------------------------------------------------| - *| | | 0 | , | . | = | | | 0 | , | . | = | | - *|-----------------------------------------------------------| - *| | | | | | | | | RL | | - *`-----------------------------------------------------------' + +``` +,-----------------------------------------------------------. +|BL | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | | | | +|-----------------------------------------------------------| +| | 4 | 5 | 6 | * | / | | 4 | 5 | 6 | * | / | ] | | +|------------------------------------------------------ | +| | 7 | 8 | 9 | + | - | | 1 | 2 | 3 | + | - | | | +|-----------------------------------------------------------| +| | | 0 | , | . | = | | | 0 | , | . | = | | +|-----------------------------------------------------------| +| | | | | | | | | RL | | +`-----------------------------------------------------------' +``` ----- Layer 3 - BL +## Layer 3 - BL + all the fancy lights and useful reset button (top right) - *,-----------------------------------------------------------. - *|BL | | | | | | | | | | | | |Reset | - *|-----------------------------------------------------------| - *| |tog|mod|hui|hud| | |sai|sad|vai|vad| | | | - *|------------------------------------------------------ | - *| |sta|bre|rai|swi| | |sna|kni|gra|xms| | | | - *|-----------------------------------------------------------| - *| | |bd |bt |bi |bs | | | | | | | | - *|-----------------------------------------------------------| - *| | | | | | | | | BL | | - *`-----------------------------------------------------------' + +``` +,-----------------------------------------------------------. +|BL | | | | | | | | | | | | |Reset | +|-----------------------------------------------------------| +| |tog|mod|hui|hud| | |sai|sad|vai|vad| | | | +|------------------------------------------------------ | +| |sta|bre|rai|swi| | |sna|kni|gra|xms| | | | +|-----------------------------------------------------------| +| | |bd |bt |bi |bs | | | | | | | | +|-----------------------------------------------------------| +| | | | | | | | | BL | | +`-----------------------------------------------------------' +``` diff --git a/keyboards/dz60/keymaps/iso_split-spacebar/keymap.c b/keyboards/dz60/keymaps/iso_split-spacebar/keymap.c index a54c06f55783..a9e811f9a411 100644 --- a/keyboards/dz60/keymaps/iso_split-spacebar/keymap.c +++ b/keyboards/dz60/keymaps/iso_split-spacebar/keymap.c @@ -112,12 +112,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `-----------------------------------------------------------' */ [NL] = LAYOUT_60_iso_split( - // 1 2 3 4 5 6 7 8 9 10 11 12 13 14 - TG(NL), KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, _______, - _______, KC_4, KC_5, KC_6, KC_PAST, KC_PSLS, _______, KC_4, KC_5, KC_6, KC_PAST, KC_PSLS, _______, - _______, KC_7, KC_8, KC_9, KC_PPLS, KC_PMNS, _______, KC_1, KC_2, KC_3, KC_PPLS, KC_PMNS, _______, _______, - _______, KC_0, KC_COMM, KC_DOT, KC_EQL, _______, _______, _______, KC_0, KC_COMM, KC_DOT, KC_EQL, _______, - _______, _______, _______, _______, MO(FL), _______, _______, _______, TG(RL), _______), + // 1 2 3 4 5 6 7 8 9 10 11 12 13 14 + TG(NL), KC_P1, KC_P2, KC_P3, KC_P4, KC_P5, KC_P6, KC_P7, KC_P8, KC_P9, KC_P0, KC_PPLS, KC_PMNS, _______, + _______, KC_P4, KC_P5, KC_P6, KC_PAST, KC_PSLS, _______, KC_P4, KC_P5, KC_P6, KC_PAST, KC_PSLS, _______, + _______, KC_P7, KC_P8, KC_P9, KC_PPLS, KC_PMNS, _______, KC_P1, KC_P2, KC_P3, KC_PPLS, KC_PMNS, _______, _______, + _______, KC_P0, KC_COMM, KC_DOT, KC_PEQL, KC_PSLS, KC_PMNS, _______, KC_P0, KC_COMM, KC_DOT, KC_PEQL, _______, + _______, _______, _______, _______, MO(FL), _______, _______, _______, TG(RL), _______), /* Keymap RL: RGB Layer * @@ -150,6 +150,23 @@ void persistent_default_layer_set(uint16_t default_layer) { default_layer_set(default_layer); } +// always enable num lock on layer NL and disable on other layers +// thanks to spidey3 & Erovia on discord +layer_state_t layer_state_set_user(layer_state_t state) { + switch (get_highest_layer(state)) { + case NL: + if (!host_keyboard_led_state().num_lock) { + tap_code16(KC_NLCK); + } + break; + default: // for any other layers, or the default layer + if (host_keyboard_led_state().num_lock) { + tap_code16(KC_NLCK); + } + break; + } + return state; +} // layer-activated RGB underglow @@ -172,11 +189,11 @@ void matrix_scan_user(void) { break; case NL: RGB_NL_MODE; - // RGB_NL_LIGHT; + RGB_NL_LIGHT; break; case RL: RGB_RL_MODE; - // RGB_RL_LIGHT; + RGB_RL_LIGHT; break; } From 2bfcb6bfc5766ede2b63041af3a163408caa6ad9 Mon Sep 17 00:00:00 2001 From: Gautham Yerroju Date: Sat, 13 Jun 2020 01:18:33 -0700 Subject: [PATCH 146/930] [Keymap] Add custom corne keymap (#9283) * Add custom corne keymap * Clean up rules.mk * Clean up base layer on keymap.c * Clean up lower layer on keymap.c * Clean up raise layer on keymap.c * Clean up adjust layer in keymap.c --- keyboards/crkbd/keymaps/gotham/README.md | 16 ++ keyboards/crkbd/keymaps/gotham/config.h | 88 +++++++ keyboards/crkbd/keymaps/gotham/glcdfont.c | 18 ++ keyboards/crkbd/keymaps/gotham/keycodes.h | 28 +++ keyboards/crkbd/keymaps/gotham/keymap.c | 143 ++++++++++++ keyboards/crkbd/keymaps/gotham/oled.c | 265 ++++++++++++++++++++++ keyboards/crkbd/keymaps/gotham/rgb.c | 79 +++++++ keyboards/crkbd/keymaps/gotham/rules.mk | 6 + 8 files changed, 643 insertions(+) create mode 100644 keyboards/crkbd/keymaps/gotham/README.md create mode 100644 keyboards/crkbd/keymaps/gotham/config.h create mode 100644 keyboards/crkbd/keymaps/gotham/glcdfont.c create mode 100644 keyboards/crkbd/keymaps/gotham/keycodes.h create mode 100644 keyboards/crkbd/keymaps/gotham/keymap.c create mode 100644 keyboards/crkbd/keymaps/gotham/oled.c create mode 100644 keyboards/crkbd/keymaps/gotham/rgb.c create mode 100644 keyboards/crkbd/keymaps/gotham/rules.mk diff --git a/keyboards/crkbd/keymaps/gotham/README.md b/keyboards/crkbd/keymaps/gotham/README.md new file mode 100644 index 000000000000..23c1d4fdd81f --- /dev/null +++ b/keyboards/crkbd/keymaps/gotham/README.md @@ -0,0 +1,16 @@ +# Gotham's custom CRKBD Layout + +My take on the 40% layout with programming in mind. Do read about the layers, it helps with forming a mental model to remember the keymap better than just memorization. + +## Layers +- QWERTY: Base layer. The idea is to reduce thumb movement by placing commonly used keys and layers on resting thumb positions (center thumb keys). You might need to play around with TAPPING_TERM to find your perfect setting. Also, both Lower and Raise buttons appear on both halves for easy access (think of it as: middle thumb key is Lower, outer thumb key is Raise). +- LOWER: Numbers, common symbols and navigation. Easiest layer to reach (middle thumb button on both halves). The nav is shaped as a T instead of an inverted T for a few reasons. First, Left and Right needed to be on the home row (since I use them a lot to navigate through code). But the Up key can't be on the top row because numbers occupy that space. So I moved the Up and Down keys one key down. It takes some getting used to, but I find this a great balance without separating the nav and number rows. The nav cluster also contains Home and End keys below Left and Right, making it a breeze to navigate through code. +- RAISE: All symbols are here, arranged in a way that can be (kind of) deduced more by logic and less by memory. On the left hand, the first 2 cols contain the symbols for shifted numbers 1-6, with ! and @ in the home row instead of the top row. Think of the 3 rows as symbols for 3 and 4, 1 and 2, 5 and 6). The next 2 cols contain common brackets. On the right hand is everything else. Note that -, _ and = are close to the home row because of how common they are in code. Operators (&, | and !) are on the top row for convinience. Just try and remember where +, *, < and > located. Admitedlly, the locations for these symbols could use improvement. +- ADJUST: Contains settings and Function keys. This is placed on the bottom-right corner (triggerred by the pinky), since the thumb keys already have multiple uses. + +## Custom OLED +This keymap includes custom OLED font and code. The font contains some logos and status indidcators for some of the features I use (RGB and Audio). Enable OLED in rukes.mk to check it out. Feel free to reuse the font or parts of it. +__KNOWN BUG:__ When the computer sleeps, one of the OLEDs is always on (they don't turn off on their own, and the timeout doesn't work). I haven't been able to figure out what's going on there and am open to suggestions/PRs. + +## Flashing +Flash using `make crkbd:gotham:avrdude` for Pro Micro and `make crkbd:gotham:dfu` for Elite-C. diff --git a/keyboards/crkbd/keymaps/gotham/config.h b/keyboards/crkbd/keymaps/gotham/config.h new file mode 100644 index 000000000000..ed08203aa156 --- /dev/null +++ b/keyboards/crkbd/keymaps/gotham/config.h @@ -0,0 +1,88 @@ +#pragma once + +#define EE_HANDS +#define SPLIT_USB_DETECT + +#undef USE_I2C +#undef SSD1306OLED + +#define USE_SERIAL_PD2 + +#define IGNORE_MOD_TAP_INTERRUPT +#define PERMISSIVE_HOLD +#define TAPPING_TERM 250 + +#define NO_ACTION_ONESHOT + +#ifdef AUDIO_ENABLE +# define B5_AUDIO +# define NO_MUSIC_MODE +# define AUDIO_CLICKY +#endif + +#define OLED_FONT_H "keyboards/crkbd/keymaps/gotham/glcdfont.c" + +#define RGBLIGHT_SLEEP + +#ifdef RGBLIGHT_ENABLE +# undef RGBLED_NUM +# define RGBLED_NUM 6 +# define RGBLIGHT_LIMIT_VAL 150 +# define RGBLIGHT_HUE_STEP 16 +# define RGBLIGHT_SAT_STEP 32 +# define RGBLIGHT_VAL_STEP 32 + +# define RGBLIGHT_EFFECT_RAINBOW_MOOD +# define RGBLIGHT_EFFECT_RAINBOW_SWIRL +# define RGBLIGHT_EFFECT_KNIGHT +#endif + +#ifdef RGB_MATRIX_ENABLE +# define RGB_MATRIX_KEYPRESSES // reacts to keypresses +# define RGB_DISABLE_WHEN_USB_SUSPENDED true // turn off effects when suspended +# 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 32 +# define RGB_MATRIX_SAT_STEP 64 +# define RGB_MATRIX_VAL_STEP 64 +# define RGB_MATRIX_SPD_STEP 20 +# define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_SOLID_COLOR + +/* 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_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 diff --git a/keyboards/crkbd/keymaps/gotham/glcdfont.c b/keyboards/crkbd/keymaps/gotham/glcdfont.c new file mode 100644 index 000000000000..656b13974a3f --- /dev/null +++ b/keyboards/crkbd/keymaps/gotham/glcdfont.c @@ -0,0 +1,18 @@ +// This is the 'classic' fixed-space bitmap font for Adafruit_GFX since 1.0. +// See gfxfont.h for newer custom bitmap font info. +// https://helixfonteditor.netlify.com/ + +#include "progmem.h" + +// 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, 0x60, 0x30, 0x18, 0xF8, 0x18, 0x00, 0xC0, 0x70, 0x1C, 0x06, 0x03, 0x01, 0x01, 0x01, 0x01, 0x01, 0xC3, 0x7E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x08, 0x08, 0x00, 0x00, 0x08, 0x08, 0x08, 0x00, 0x1C, 0x22, 0x41, 0x41, 0x41, 0x22, 0x1C, 0x00, 0x08, 0x08, 0x08, 0x00, 0x00, 0x08, 0x08, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x20, 0xF8, 0x0C, 0x04, 0xE7, 0xE4, 0xE4, 0x07, 0x04, 0xE4, 0xE7, 0xE4, 0x04, 0x07, 0xE4, 0xE4, 0xE7, 0x04, 0x0C, 0xF8, 0x20, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1C, 0x1C, 0x3E, 0x7F, 0x7F, 0x00, 0x14, 0x08, 0x14, 0x00, 0x00, 0x00, 0x1C, 0x1C, 0x3E, 0x7F, 0x7F, 0x00, 0x22, 0x1C, 0x41, 0x3E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x18, 0x0C, 0x06, 0x0C, 0x18, 0x30, 0x77, 0x77, 0x77, 0x00, 0x77, 0x77, + 0x77, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3E, 0x4A, 0x4F, 0x4A, 0x3E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x60, 0x70, 0x3E, 0x1F, 0x19, 0x18, 0x0C, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF8, 0x0C, 0x06, 0x07, 0xFC, 0x00, 0xFF, 0x01, 0x00, 0x00, 0x00, 0xFF, 0x80, 0xFF, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF0, 0x1C, 0x07, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1C, 0x22, 0x41, 0x00, 0x00, 0x1C, 0x22, 0x00, 0x00, 0x1C, 0x3E, 0x7F, 0x63, 0x41, 0x22, 0x1C, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x49, 0x49, 0xFF, 0x00, 0x00, 0x0F, 0x1F, 0x3F, 0x38, 0x30, 0xFF, 0xFF, 0xFF, 0x30, 0x38, 0x3F, 0x1F, 0x0F, 0x00, 0x00, 0xFF, 0x49, 0x49, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x40, 0x60, 0x6A, 0x64, 0x6A, 0x60, 0x40, 0x00, 0x00, 0x00, 0x00, 0x04, 0x42, 0x69, 0x65, 0x65, 0x65, 0x69, 0x42, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x06, 0x06, 0x0C, 0x18, 0x30, 0x66, 0x66, 0x66, 0x00, 0x00, 0xFC, 0x24, 0x24, 0xFC, 0x24, 0x24, 0xFC, 0x24, 0x24, 0xFC, 0x24, 0x24, 0xFC, 0x24, 0x24, 0xFC, 0x24, 0x24, 0xFC, 0x24, 0x24, 0xFC, 0x24, 0x24, 0xFC, 0x00, 0x00, 0x00, 0xF0, 0x90, 0x90, 0xF0, 0x90, 0x90, 0xF0, 0x98, 0x9C, 0xF2, 0x22, 0x21, 0xE1, 0x01, 0x01, 0x01, 0xF1, 0x91, 0x91, 0xFA, 0x4C, 0x4C, 0xF8, 0x48, 0x48, 0xF8, 0x48, 0x48, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x0E, 0x18, 0x30, 0x21, 0x21, 0x31, 0x18, 0x10, 0x30, 0x20, 0x60, 0x41, 0x60, 0x20, 0x30, 0x18, 0x30, 0x60, 0x40, 0x40, 0x47, 0x4C, 0x48, 0x68, 0x38, 0x1C, 0x0F, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x1C, 0x22, 0x41, 0x63, 0x7F, 0x3E, 0x1C, + 0x00, 0x00, 0x22, 0x1C, 0x00, 0x00, 0x41, 0x22, 0x1C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x02, 0x0F, 0x18, 0x10, 0x70, 0x10, 0x10, 0x70, 0x10, 0x13, 0x73, 0x13, 0x10, 0x70, 0x10, 0x10, 0x70, 0x10, 0x18, 0x0F, 0x02, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1C, 0x22, 0xC9, 0xD1, 0xC9, 0x22, 0x1C, 0x00, 0x00, 0x00, 0x00, 0x10, 0x02, 0x38, 0xFC, 0xED, 0xFC, 0x38, 0x02, 0x10, 0x00, 0x00, 0x08, 0x0C, 0x7E, 0x7F, 0x7E, 0x0C, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0F, 0x09, 0x09, 0x09, 0x0F, 0x09, 0x09, 0x0F, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x0F, 0x09, 0x09, 0x0F, 0x09, 0x09, 0x09, 0x0F, 0x00, 0x00, 0x00, 0x07, 0x04, 0x04, 0x07, 0x04, 0x04, 0x07, 0x04, 0x04, 0x0F, 0x09, 0x09, 0x0F, 0x00, 0x00, 0x00, 0x07, 0x04, 0x04, 0x07, 0x02, 0x02, 0x03, 0x02, 0x02, 0x03, 0x02, 0x02, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +}; diff --git a/keyboards/crkbd/keymaps/gotham/keycodes.h b/keyboards/crkbd/keymaps/gotham/keycodes.h new file mode 100644 index 000000000000..9ba44c54a7cb --- /dev/null +++ b/keyboards/crkbd/keymaps/gotham/keycodes.h @@ -0,0 +1,28 @@ +#pragma once + +enum layers { + _QWERTY, + _LOWER, + _RAISE, + _ADJUST, +}; + +enum custom_keycodes { QWERTY = SAFE_RANGE, LOWER, RAISE, ADJUST, RGBRST }; + +#define SFT_EQ MT(MOD_LSFT, KC_EQL) +#define SFT_QT MT(MOD_RSFT, KC_QUOT) + +#define SFT_A MT(MOD_LSFT, KC_A) +#define CTL_Z MT(MOD_LCTL, KC_Z) + +#define SFT_SCLN MT(MOD_RSFT, KC_SCLN) +#define CTL_SLSH MT(MOD_RCTL, KC_SLSH) + +#define LOW_SPC LT(_LOWER, KC_SPC) +#define RAI_EQ LT(_RAISE, KC_EQL) +#define RAI_ENT LT(_RAISE, KC_ENT) +#define LOW_BSP LT(_LOWER, KC_BSPC) +#define LOW_DEL LT(_LOWER, KC_DEL) +#define ADJ_GRV LT(_ADJUST, KC_GRV) +#define KC_ANGL LSFT(KC_COMM) +#define KC_ANGR LSFT(KC_DOT) diff --git a/keyboards/crkbd/keymaps/gotham/keymap.c b/keyboards/crkbd/keymaps/gotham/keymap.c new file mode 100644 index 000000000000..6657f21ee9d4 --- /dev/null +++ b/keyboards/crkbd/keymaps/gotham/keymap.c @@ -0,0 +1,143 @@ +#include QMK_KEYBOARD_H +#include "keycodes.h" + +#ifdef OLED_DRIVER_ENABLE +# include "oled.c" +#endif + +#if defined(RGBLIGHT_ENABLE) || defined(RGB_MATRIX_ENABLE) +# include "rgb.c" +#endif + +// clang-format off +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_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_BSLS, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + SFT_EQ, SFT_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, SFT_SCLN,SFT_QT, + //---------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + KC_LCTL, CTL_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, CTL_SLSH,ADJ_GRV, + //---------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| + KC_LALT, LOW_SPC, RAI_EQ, RAI_ENT, LOW_BSP, KC_LGUI + //|--------------------------| |--------------------------| + + + ), + + [_LOWER] = LAYOUT( + //|-----------------------------------------------------| |-----------------------------------------------------| + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, _______, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + _______, KC_ANGL, KC_ANGR, KC_LPRN, KC_RPRN, KC_PGUP, KC_MINS, KC_LEFT, KC_UP, KC_RIGHT,KC_PLUS, _______, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + _______, XXXXXXX, XXXXXXX, KC_LBRC, KC_RBRC, KC_PGDOWN, KC_UNDS, KC_HOME, KC_DOWN, KC_END, XXXXXXX, _______, + //|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| + _______, _______, _______, _______, LOW_DEL, _______ + //|--------------------------| |--------------------------| + ), + + [_RAISE] = LAYOUT( + //|-----------------------------------------------------| |-----------------------------------------------------| + KC_ESC, KC_HASH, KC_DLR, KC_LCBR, KC_RCBR, XXXXXXX, XXXXXXX, KC_AMPR, KC_PIPE, KC_EXLM, KC_ASTR, XXXXXXX, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + _______, KC_EXLM, KC_AT, KC_LPRN, KC_RPRN, XXXXXXX, XXXXXXX, KC_UNDS, KC_EQL, KC_ANGL, KC_ANGR, XXXXXXX, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + _______, KC_PERC, KC_CIRC, KC_LBRC, KC_RBRC, XXXXXXX, XXXXXXX, KC_MINS, KC_PLUS, XXXXXXX, KC_BSLS, _______, + //|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| + _______, _______, _______, _______, _______, _______ + //|--------------------------| |--------------------------| + ), + + [_ADJUST] = LAYOUT( + //|-----------------------------------------------------| |-----------------------------------------------------| + XXXXXXX, CK_RST, CK_DOWN, CK_UP, CK_TOGG, RGB_TOG, MU_TOG, KC_F12, KC_F7, KC_F8, KC_F9, XXXXXXX,\ + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + XXXXXXX, RGB_HUI, RGB_SAI, RGB_VAI, RGB_SPI, RGB_MOD, MU_MOD, KC_F11, KC_F4, KC_F5, KC_F6, RESET, \ + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + XXXXXXX, RGB_HUD, RGB_SAD, RGB_VAD, RGB_SPD, RGBRST, AU_TOG, KC_F10, KC_F1, KC_F2, KC_F3, _______,\ + //|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| + _______, _______, _______, _______, KC_VOLD, KC_VOLU \ + //|--------------------------| |--------------------------| + ) +}; +// clang-format off + +#if defined(RGBLIGHT_ENABLE) || defined(RGB_MATRIX_ENABLE) +layer_state_t layer_state_set_user(layer_state_t state) { + /* For any layer other than default, save current RGB state and switch to layer-based RGB */ + if (layer_state_cmp(state, 0)) { + restore_rgb_config(); + } else { + uint8_t layer = get_highest_layer(state); + if (layer_state_cmp(layer_state, 0)) save_rgb_config(); + rgb_by_layer(layer); + } + return state; +} +#endif + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { +#ifdef OLED_DRIVER_ENABLE + if (record->event.pressed) { + oled_timer = timer_read(); + add_keylog(keycode); + } +#endif + + switch (keycode) { + case LOWER: + if (record->event.pressed) { + layer_on(_LOWER); + } else { + layer_off(_LOWER); + } + return false; + case RAISE: + if (record->event.pressed) { + layer_on(_RAISE); + } else { + layer_off(_RAISE); + } + return false; + case ADJUST: + if (record->event.pressed) { + layer_on(_ADJUST); + } else { + layer_off(_ADJUST); + } + return false; +#if defined(RGBLIGHT_ENABLE) || defined(RGB_MATRIX_ENABLE) + case RGB_MOD: + case RGB_TOG: + case RGB_HUI: + case RGB_HUD: + case RGB_SAI: + case RGB_SAD: + case RGB_VAI: + case RGB_VAD: + case RGB_SPI: + case RGB_SPD: + /* Override layer-based RGB and resume RGB effect to be able to preview changes */ + if (record->event.pressed) { + restore_rgb_config(); + process_rgb(keycode, record); + save_rgb_config(); + } + return false; + case RGBRST: + if (record->event.pressed) { +# ifdef RGBLIGHT_ENABLE + eeconfig_update_rgblight_default(); + rgblight_enable(); +# elif RGB_MATRIX_ENABLE + eeconfig_update_rgb_matrix_default(); + rgb_matrix_enable(); +# endif + save_rgb_config(); + } + return false; +#endif + } + return true; +} diff --git a/keyboards/crkbd/keymaps/gotham/oled.c b/keyboards/crkbd/keymaps/gotham/oled.c new file mode 100644 index 000000000000..ac6f236fc6b9 --- /dev/null +++ b/keyboards/crkbd/keymaps/gotham/oled.c @@ -0,0 +1,265 @@ +#pragma once + +extern uint8_t is_master; + +#if defined(RGBLIGHT_ENABLE) || defined(RGB_MATRIX_ENABLE) +# include "rgb.c" +#endif + +#ifdef AUDIO_ENABLE +extern audio_config_t audio_config; +#endif + +// 5x3 Logos + +void render_corne_logo(void) { + static const char PROGMEM font_logo[16] = {0x80, 0x81, 0x82, 0x83, 0x84, 0xa0, 0xa1, 0xa2, 0xa3, 0xa4, 0xc0, 0xc1, 0xc2, 0xc3, 0xc4, 0}; + oled_write_P(font_logo, false); +}; + +void render_qmk_logo(void) { + static const char PROGMEM font_qmk_logo[16] = {0x8a, 0x8b, 0x8c, 0x8d, 0x8e, 0xaa, 0xab, 0xac, 0xad, 0xae, 0xca, 0xcb, 0xcc, 0xcd, 0xce, 0}; + oled_write_P(font_qmk_logo, false); +}; + +// 5x2 Keyboard, Controller logos + +void render_keyboard(void) { + static const char PROGMEM font_keyboard[11] = {0xb6, 0xb7, 0xb8, 0xb9, 0xba, 0xd6, 0xd7, 0xd8, 0xd9, 0xda, 0}; + oled_write_P(font_keyboard, false); +}; + +void render_kb_split(void) { + static const char PROGMEM font_kb_split[11] = {0xba, 0xbb, 0xbc, 0xbd, 0xbe, 0xda, 0xdb, 0xdc, 0xdd, 0xde, 0}; + oled_write_P(font_kb_split, false); +}; + +// 5x1 Layer indicator + +void render_layer(void) { + static const char PROGMEM font_layer[4][6] = { + {0x85, 0x86, 0x87, 0x88, 0x89, 0}, + {0xa5, 0xa6, 0xa7, 0xa8, 0xa9, 0}, + {0xc5, 0xc6, 0xc7, 0xc8, 0xc9, 0}, + {0x9a, 0x9b, 0x9c, 0x9d, 0x9e, 0}, + }; + uint8_t layer = 0; + if (layer_state_is(_LOWER)) { + layer = 1; + } else if (layer_state_is(_RAISE)) { + layer = 2; + } else if (layer_state_is(_ADJUST)) { + layer = 3; + } + oled_write_P(font_layer[layer], false); +}; + + // 2x1 Audio, clicky and RGB status indicators + +#ifdef AUDIO_ENABLE +void render_audio_status(void) { + static const char PROGMEM font_audio_off[3] = {0x8f, 0x90, 0}; + static const char PROGMEM font_audio_on[3] = {0x91, 0x92, 0}; + oled_write_P(audio_config.enable ? font_audio_on : font_audio_off, false); +}; + +void render_clicky_status(void) { + static const char PROGMEM font_clicky_off[3] = {0xaf, 0xb0, 0}; + static const char PROGMEM font_clicky_on[3] = {0xb1, 0xb2, 0}; + oled_write_P(audio_config.clicky_enable ? font_clicky_on : font_clicky_off, false); +}; +#endif + +#if defined(RGB_MATRIX_ENABLE) || defined(RGBLIGHT_ENABLE) +void render_rgb_status(void) { + static const char PROGMEM font_rgb_off[3] = {0xcf, 0xd0, 0}; + static const char PROGMEM font_rgb_on[3] = {0xd1, 0xd2, 0}; +# ifdef RGBLIGHT_ENABLE + bool rgb_enabled = rgblight_config.enable; +# elif RGB_MATRIX_ENABLE + bool rgb_enabled = rgb_matrix_config.enable; +# endif + oled_write_P(rgb_enabled ? font_rgb_on : font_rgb_off, false); +}; +#endif + +// 2x1 Ctrl, Alt, Shift, GUI, Mouse + +void render_mod_ctrl(void) { + static const char PROGMEM font_ctrl[3] = {0x93, 0x94, 0}; + oled_write_P(font_ctrl, false); +}; + +void render_mod_alt(void) { + static const char PROGMEM font_alt[3] = {0xb3, 0xb4, 0}; + oled_write_P(font_alt, false); +}; + +void render_mod_shift(void) { + static const char PROGMEM font_shift[3] = {0xd3, 0xd4, 0}; + oled_write_P(font_shift, false); +}; + +void render_mod_gui(void) { + static const char PROGMEM font_gui[3] = {0x95, 0x96, 0}; + oled_write_P(font_gui, false); +}; + +#ifdef MOUSEKEY_ENABLE +void render_mod_mouse(void) { + static const char PROGMEM font_mouse[3] = {0x97, 0x98, 0}; + oled_write_P(font_mouse, false); +}; +#endif + +// 5x2 Mod and feature indicator clusters + +void render_mod_status(void) { +#ifdef NO_ACTION_ONESHOT + uint8_t modifiers = get_mods(); +#else + uint8_t modifiers = get_mods() | get_oneshot_mods(); +#endif + + (modifiers & MOD_MASK_CTRL) ? render_mod_ctrl() : oled_write_P(PSTR(" "), false); + oled_write_P(PSTR(" "), false); + (modifiers & MOD_MASK_SHIFT) ? render_mod_shift() : oled_write_P(PSTR(" "), false); + + (modifiers & MOD_MASK_ALT) ? render_mod_alt() : oled_write_P(PSTR(" "), false); + oled_write_P(PSTR(" "), false); + (modifiers & MOD_MASK_GUI) ? render_mod_gui() : oled_write_P(PSTR(" "), false); +} + +void render_feature_status(void) { +#if defined(RGB_MATRIX_ENABLE) || defined(RGBLIGHT_ENABLE) + render_rgb_status(); +#endif + +#ifdef AUDIO_ENABLE + oled_write_P(PSTR(" "), false); + render_audio_status(); +#endif +}; + +// Keylogger +#define KEYLOGGER_LENGTH 5 +static uint16_t oled_timer = 0; +static char keylog_str[KEYLOGGER_LENGTH + 1] = {"\n"}; +// 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) { + 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]); + } +} + +void render_keylogger_status(void) { + oled_write(keylog_str, false); +} + +void render_prompt(void) { + bool blink = (timer_read() % 1000) < 500; + + if (layer_state_is(_LOWER)) { + oled_write_ln_P(blink ? PSTR("> lo_") : PSTR("> lo "), false); + } else if (layer_state_is(_RAISE)) { + oled_write_ln_P(blink ? PSTR("> hi_") : PSTR("> hi "), false); + } else if (layer_state_is(_ADJUST)) { + oled_write_ln_P(blink ? PSTR("> aj_") : PSTR("> aj "), false); + } else { + oled_write_ln_P(blink ? PSTR("> _ ") : PSTR("> "), false); + } +}; + +void render_status_secondary(void) { + oled_write_ln("", false); + oled_write_ln("", false); + + render_kb_split(); + + oled_write_ln("", false); + oled_write_ln("", false); + oled_write_ln("", false); + + render_layer(); + + oled_write_ln("", false); + oled_write_ln("", false); + oled_write_ln("", false); + + #if defined(RGB_MATRIX_ENABLE) || defined(RGBLIGHT_ENABLE) || defined(AUDIO_ENABLE) + layer_state_is(_ADJUST) ? render_feature_status() : render_mod_status(); + #else + render_mod_status(); + #endif +}; + +void render_status_main(void) { + oled_write_ln("", false); + oled_write_ln("", false); + + render_corne_logo(); + + oled_write_ln("", false); + oled_write_ln("", false); + oled_write_ln("", false); + + render_qmk_logo(); + + oled_write_ln("", false); + oled_write_ln("", false); + oled_write_ln("", false); + + render_prompt(); +} + +oled_rotation_t oled_init_user(oled_rotation_t rotation) { + return OLED_ROTATION_270; +} + +void oled_task_user(void) { + if (timer_elapsed(oled_timer) > 10000) { + oled_off(); + return; + } + #ifndef SPLIT_KEYBOARD + else { + oled_on(); + } + #endif + + if (is_master) { + render_status_main(); + } else { + render_status_secondary(); + } +} diff --git a/keyboards/crkbd/keymaps/gotham/rgb.c b/keyboards/crkbd/keymaps/gotham/rgb.c new file mode 100644 index 000000000000..9f66428836dc --- /dev/null +++ b/keyboards/crkbd/keymaps/gotham/rgb.c @@ -0,0 +1,79 @@ +#pragma once + +#ifdef RGBLIGHT_ENABLE +extern rgblight_config_t rgblight_config; +rgblight_config_t RGB_current_config; +#endif + +#ifdef RGB_MATRIX_ENABLE +extern rgb_config_t rgb_matrix_config; +rgb_config_t RGB_current_config; +#endif + +void save_rgb_config(void) { +#ifdef RGBLIGHT_ENABLE + RGB_current_config.enable = rgblight_config.enable; + RGB_current_config.mode = rgblight_get_mode(); + RGB_current_config.speed = rgblight_get_speed(); + RGB_current_config.hue = rgblight_get_hue(); + RGB_current_config.sat = rgblight_get_sat(); + RGB_current_config.val = rgblight_get_val(); +#elif RGB_MATRIX_ENABLE + RGB_current_config.enable = rgb_matrix_config.enable; + RGB_current_config.mode = rgb_matrix_get_mode(); + RGB_current_config.speed = rgb_matrix_config.speed; + RGB_current_config.hsv = rgb_matrix_config.hsv; +#endif +} + +void restore_rgb_config(void) { +#ifdef RGBLIGHT_ENABLE + rgblight_set_speed_noeeprom(RGB_current_config.speed); + if (rgblight_config.mode != RGB_current_config.mode) { + rgblight_mode_noeeprom(RGB_current_config.mode); + } + if ((RGB_current_config.hue != rgblight_config.hue) || (RGB_current_config.sat != rgblight_config.sat) || (RGB_current_config.val != rgblight_config.val)) { + rgblight_sethsv_noeeprom(RGB_current_config.hue, RGB_current_config.sat, RGB_current_config.val); + } + if (rgblight_config.enable) { + rgblight_enable_noeeprom(); + } else { + rgblight_disable_noeeprom(); + } +#elif RGB_MATRIX_ENABLE + rgb_matrix_config.speed = RGB_current_config.speed; + if (rgb_matrix_config.mode != RGB_current_config.mode) { + rgb_matrix_mode_noeeprom(RGB_current_config.mode); + } + if ((RGB_current_config.hsv.h != rgb_matrix_config.hsv.h) || (RGB_current_config.hsv.s != rgb_matrix_config.hsv.s) || (RGB_current_config.hsv.v != rgb_matrix_config.hsv.v)) { + rgb_matrix_sethsv_noeeprom(RGB_current_config.hsv.h, RGB_current_config.hsv.s, RGB_current_config.hsv.v); + } + if (rgb_matrix_config.enable) { + rgb_matrix_enable_noeeprom(); + } else { + rgb_matrix_disable_noeeprom(); + } +#endif +} + +void rgb_by_layer(int layer) { +#ifdef RGBLIGHT_ENABLE + rgblight_mode_noeeprom(RGBLIGHT_MODE_STATIC_LIGHT); +#elif RGB_MATRIX_ENABLE + rgb_matrix_mode_noeeprom(RGB_MATRIX_SOLID_COLOR); +#endif + + switch (layer) { + case _ADJUST: + rgblight_sethsv_noeeprom(9, 255, 255); + break; + case _RAISE: + rgblight_sethsv_noeeprom(HSV_CYAN); + break; + case _LOWER: + rgblight_sethsv_noeeprom(HSV_MAGENTA); + break; + default: + rgblight_sethsv_noeeprom(HSV_RED); + } +} diff --git a/keyboards/crkbd/keymaps/gotham/rules.mk b/keyboards/crkbd/keymaps/gotham/rules.mk new file mode 100644 index 000000000000..eaf8f89fd1f0 --- /dev/null +++ b/keyboards/crkbd/keymaps/gotham/rules.mk @@ -0,0 +1,6 @@ +MOUSEKEY_ENABLE = no +EXTRAKEY_ENABLE = yes +AUDIO_ENABLE = yes +RGBLIGHT_ENABLE = yes +OLED_DRIVER_ENABLE = yes +LTO_ENABLE = yes From 4057d44989e2ee83ca3b171bdb1a29bc9f3ae0cd Mon Sep 17 00:00:00 2001 From: Gautham Yerroju Date: Sat, 13 Jun 2020 01:24:13 -0700 Subject: [PATCH 147/930] [Keymap] Add Kyria keymap (#9224) * Add Kyria keymap * clean split hand detection code * rename "joystick" to "thumbstick" * thumbstick overhaul * removed angle correction, seems buggy * save some memory * Remove deprecated config option * Use the correct types for getting host led states * Fix include path * Made .h files for encoder and oled code * Increase speed cap on thumbstick --- keyboards/kyria/keymaps/gotham/README.md | 56 +++++ keyboards/kyria/keymaps/gotham/config.h | 48 +++++ .../kyria/keymaps/gotham/encoder_utils.c | 94 +++++++++ .../kyria/keymaps/gotham/encoder_utils.h | 37 ++++ keyboards/kyria/keymaps/gotham/keycodes.h | 16 ++ keyboards/kyria/keymaps/gotham/keymap.c | 126 +++++++++++ keyboards/kyria/keymaps/gotham/oled_utils.c | 103 +++++++++ keyboards/kyria/keymaps/gotham/oled_utils.h | 25 +++ keyboards/kyria/keymaps/gotham/rules.mk | 21 ++ keyboards/kyria/keymaps/gotham/thumbstick.c | 195 ++++++++++++++++++ keyboards/kyria/keymaps/gotham/thumbstick.h | 98 +++++++++ 11 files changed, 819 insertions(+) create mode 100644 keyboards/kyria/keymaps/gotham/README.md create mode 100644 keyboards/kyria/keymaps/gotham/config.h create mode 100644 keyboards/kyria/keymaps/gotham/encoder_utils.c create mode 100644 keyboards/kyria/keymaps/gotham/encoder_utils.h create mode 100644 keyboards/kyria/keymaps/gotham/keycodes.h create mode 100644 keyboards/kyria/keymaps/gotham/keymap.c create mode 100644 keyboards/kyria/keymaps/gotham/oled_utils.c create mode 100644 keyboards/kyria/keymaps/gotham/oled_utils.h create mode 100644 keyboards/kyria/keymaps/gotham/rules.mk create mode 100644 keyboards/kyria/keymaps/gotham/thumbstick.c create mode 100644 keyboards/kyria/keymaps/gotham/thumbstick.h diff --git a/keyboards/kyria/keymaps/gotham/README.md b/keyboards/kyria/keymaps/gotham/README.md new file mode 100644 index 000000000000..1598e95a73e4 --- /dev/null +++ b/keyboards/kyria/keymaps/gotham/README.md @@ -0,0 +1,56 @@ +# Gotham's Keymap for [Kyria](https://github.com/splitkb/kyria) + +## Keymap +This is my personal keymap for Kyria with some mods. + +More information about the Kyria keyboard can be found [here](https://blog.splitkb.com/blog/introducing-the-kyria) + +### Rotary Encoders + +Press the encoder on each half to cycle between: +- Volume +- Word Nav (Ctrl + Left / Right) +- Left / Right +- Up / Down +- Page Up / Page Down + +### OLEDs + +Master-side OLED displays dynamic data: +- Current layer +- Current mode of each rotary encoder +- Current mode of thumbstick + +Slave-side OLED currently only displays a static content. + +### Thumbstick + +A PSP 2000 thumbstick is attached to the right half. It will currently only function when the USB cable is connected to the right half. When I figure out how to transfer data between halves using serial link, I will make this work regardless of which side is the master. + +#### Thumbstick Configuration + +- __THUMBSTICK_ENABLE:__ Enable thumbstick. +- __THUMBSTICK_PIN_X/Y (mandatory):__ The QMK pins to use for the respective axis. The values are from the [QMK's ADC driver](https://docs.qmk.fm/#/adc_driver). I used F0 and F1, for example. +- __THUMBSTICK_FLIP_X/Y:__ Mirror the direction of the respective axis. Use to compensate for actual orientation of thumbstick. +- __THUMBSTICK_DEBUG:__ Print raw and calculated values from analogReadPin to console. Will only work with CONSOLE_ENABLE turned on. + +#### Thumbstick Fine-tuning + +More tunables are described here. Values like deadzone threshold are hardware-specific. The theoretical range for analog readings is [0, 1023], but emperical readings don't extend the entire range. To find the right values, turn on CONSOLE_ENABLE in rules.mk and THUMBSTICK_DEBUG in config.h to look at the raw values from the pins using hid_listen (or QMK Toolbox). + +- __THUMBSTICK_DEAD_ZONE 90:__ Values below this are ignored (deadzone). +- __THUMBSTICK_FINE_ZONE 180:__ Values below this enable fine movement. + +- __THUMBSTICK_MODE :__ One of THUMBSTICK_MODE_MOUSE, THUMBSTICK_MODE_ARROWS and THUMBSTICK_MODE_SCROLL. This is just the default mode, it can be changed by calling ```void thumbstick_mode_cycle(bool reverse)``` within code. + +- __THUMBSTICK_SPEED 127:__ Cursor speed in THUMBSTICK_MODE_MOUSE. +- __THUMBSTICK_FINE_SPEED 64:__ Fine cursor speed in THUMBSTICK_MODE_MOUSE (kicks in when slightly nudging the thumbstick). +- __THUMBSTICK_SCROLL_SPEED 1:__ Scrolling speed in THUMBSTICK_MODE_SCROLL. + +- __THUMBSTICK_EIGHT_AXIS true:__ 8-axis toggle for ARROW and SCROLL modes. Disable to fall back to 4 axes (think D-pads vs analog stick). +- __THUMBSTICK_AXIS_SEPARATION 0.5f:__ Float value between 0 and 1, used to discretize the circular range into distinct zones for 8-axis. Imagine the top-right quadrant on a graph, and picture the diagonal. This value indicates the angular "distance" from the diagonal to either axis. Moving from the diagonal to each of the axes, this value changes from 0 to 1. So, a value of 0.5 will "sweep" from the center to half-way towards each axis, creating a zone across the diagonal. Smaller values make narrower diagonal zones, and vice versa. + +#### Thanks + +- @pyrho and u/\_GEIST\_ for the inspiration and initial reference code. +- @zvecr and @drashna for code review and more pointers. diff --git a/keyboards/kyria/keymaps/gotham/config.h b/keyboards/kyria/keymaps/gotham/config.h new file mode 100644 index 000000000000..1b84d996fedd --- /dev/null +++ b/keyboards/kyria/keymaps/gotham/config.h @@ -0,0 +1,48 @@ +/* Copyright 2019 Thomas Baart + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License 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 EE_HANDS +#define IGNORE_MOD_TAP_INTERRUPT + +// Fix for Elite C rev3 +#define SPLIT_USB_DETECT +// Speed up slave half startup +#define SPLIT_USB_TIMEOUT 1000 + +#ifdef OLED_DRIVER_ENABLE +# define OLED_DISPLAY_128X64 +# define OLED_TIMEOUT 10000 +#endif + +#ifdef RGBLIGHT_ENABLE +# define RGBLIGHT_EFFECT_BREATHING +# define RGBLIGHT_EFFECT_RAINBOW_MOOD +# define RGBLIGHT_EFFECT_RAINBOW_SWIRL +# define RGBLIGHT_EFFECT_KNIGHT +#endif + +#ifdef ENCODER_ENABLE +# define ENCODER_DIRECTION_FLIP +# define ENCODER_RESOLUTION 2 +#endif + +#ifdef THUMBSTICK_ENABLE +# define THUMBSTICK_FLIP_X +# define THUMBSTICK_PIN_X F0 +# define THUMBSTICK_PIN_Y F1 +#endif diff --git a/keyboards/kyria/keymaps/gotham/encoder_utils.c b/keyboards/kyria/keymaps/gotham/encoder_utils.c new file mode 100644 index 000000000000..1c2962339d32 --- /dev/null +++ b/keyboards/kyria/keymaps/gotham/encoder_utils.c @@ -0,0 +1,94 @@ +#include "encoder_utils.h" + +void encoder_utils_init(void) { + encoder_left_mode = ENC_MODE_VOLUME; + encoder_right_mode = ENC_MODE_LEFT_RIGHT; +} + +void set_encoder_mode(bool left, encoder_mode_t mode) { + if (left) { + encoder_left_mode = mode; + } else { + encoder_right_mode = mode; + } +} + +encoder_mode_t get_encoder_mode(bool left) { + if (left) { + return encoder_left_mode; + } else { + return encoder_right_mode; + } +} + +void cycle_encoder_mode(bool left, bool reverse) { + encoder_mode_t mode = get_encoder_mode(left); + if (reverse) { + mode = (mode == 0) ? (_ENC_MODE_LAST - 1) : (mode - 1); + } else { + mode = (mode == (_ENC_MODE_LAST - 1)) ? 0 : (mode + 1); + } + set_encoder_mode(left, mode); +} + +void encoder_action_volume(uint8_t clockwise) { + if (clockwise) { + tap_code(KC_VOLU); + } else { + tap_code(KC_VOLD); + } +} + +void encoder_action_word_nav(uint8_t clockwise) { + if (clockwise) { + tap_code16(C(KC_RIGHT)); + } else { + tap_code16(C(KC_LEFT)); + } +} + +void encoder_action_left_right(uint8_t clockwise) { + if (clockwise) { + tap_code(KC_RIGHT); + } else { + tap_code(KC_LEFT); + } +} + +void encoder_action_up_down(uint8_t clockwise) { + if (clockwise) { + tap_code(KC_UP); + } else { + tap_code(KC_DOWN); + } +} + +void encoder_action_paging(uint8_t clockwise) { + if (clockwise) { + tap_code(KC_PGUP); + } else { + tap_code(KC_PGDN); + } +} + +void encoder_action(encoder_mode_t mode, uint8_t clockwise) { + switch (mode) { + case ENC_MODE_VOLUME: + encoder_action_volume(clockwise); + break; + case ENC_MODE_WORD_NAV: + encoder_action_word_nav(clockwise); + break; + case ENC_MODE_LEFT_RIGHT: + encoder_action_left_right(clockwise); + break; + case ENC_MODE_UP_DOWN: + encoder_action_up_down(clockwise); + break; + case ENC_MODE_PAGING: + encoder_action_paging(clockwise); + break; + default: + encoder_action_volume(clockwise); + } +} diff --git a/keyboards/kyria/keymaps/gotham/encoder_utils.h b/keyboards/kyria/keymaps/gotham/encoder_utils.h new file mode 100644 index 000000000000..60db6c6bd851 --- /dev/null +++ b/keyboards/kyria/keymaps/gotham/encoder_utils.h @@ -0,0 +1,37 @@ +#pragma once + +#include + +#include "quantum.h" + +typedef enum { + ENC_MODE_VOLUME = 0, + ENC_MODE_WORD_NAV, + ENC_MODE_LEFT_RIGHT, + ENC_MODE_UP_DOWN, + ENC_MODE_PAGING, + _ENC_MODE_LAST // Do not use, except for looping through enum values +} encoder_mode_t; + +encoder_mode_t encoder_left_mode; +encoder_mode_t encoder_right_mode; + +void encoder_utils_init(void); + +void set_encoder_mode(bool left, encoder_mode_t mode); + +encoder_mode_t get_encoder_mode(bool left); + +void cycle_encoder_mode(bool left, bool reverse); + +void encoder_action_volume(uint8_t clockwise); + +void encoder_action_word_nav(uint8_t clockwise); + +void encoder_action_left_right(uint8_t clockwise); + +void encoder_action_up_down(uint8_t clockwise); + +void encoder_action_paging(uint8_t clockwise); + +void encoder_action(encoder_mode_t mode, uint8_t clockwise); diff --git a/keyboards/kyria/keymaps/gotham/keycodes.h b/keyboards/kyria/keymaps/gotham/keycodes.h new file mode 100644 index 000000000000..0730d49250d5 --- /dev/null +++ b/keyboards/kyria/keymaps/gotham/keycodes.h @@ -0,0 +1,16 @@ +#pragma once + +#include "quantum.h" + +enum layers { _QWERTY = 0, _LOWER, _RAISE, _ADJUST }; + +enum custom_keycodes { + ENC_MODE_L = SAFE_RANGE, + ENC_MODE_R, + TMB_MODE, +}; + +#define ESC_RAISE LT(_RAISE, KC_ESC) +#define BSLS_RAISE LT(_RAISE, KC_BSLS) +#define SFT_QUOT MT(MOD_RSFT, KC_QUOT) +#define CTL_MINS MT(MOD_RCTL, KC_MINS) diff --git a/keyboards/kyria/keymaps/gotham/keymap.c b/keyboards/kyria/keymaps/gotham/keymap.c new file mode 100644 index 000000000000..572ea067ebd2 --- /dev/null +++ b/keyboards/kyria/keymaps/gotham/keymap.c @@ -0,0 +1,126 @@ +/* Copyright 2019 Thomas Baart + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public 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 "keycodes.h" + +#ifdef ENCODER_ENABLE +# include "encoder_utils.h" +#endif + +#ifdef OLED_DRIVER_ENABLE +# include "oled_utils.h" +#endif + +#ifdef THUMBSTICK_ENABLE +# include "thumbstick.h" +#endif + +// clang-format off +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +/* + * Base Layer: QWERTY +*/ + [_QWERTY] = LAYOUT( + ESC_RAISE, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, BSLS_RAISE, + KC_LSFT, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, SFT_QUOT, + KC_LCTL, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_LGUI, KC_NO, TMB_MODE, KC_NO, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, CTL_MINS, + ENC_MODE_L, KC_LALT, LT(_LOWER, KC_SPC), LT(_RAISE, KC_TAB), KC_LSFT, KC_EQL, LT(_RAISE, KC_ENT), LT(_LOWER, KC_BSPC), KC_DEL, ENC_MODE_R + ), +/* + * Lower Layer: Symbols, Navigation + */ + [_LOWER] = LAYOUT( + _______, KC_HASH, KC_DLR, KC_LCBR, KC_RCBR, KC_PIPE, _______, _______, _______, _______, _______, KC_PIPE, + _______, KC_EXLM, KC_AT, KC_LPRN, KC_RPRN, KC_GRV, KC_PGUP, KC_LEFT, KC_UP, KC_RGHT, _______, KC_QUOT, + _______, KC_PERC, KC_CIRC, KC_LBRC, KC_RBRC, KC_TILD, _______, _______, _______, _______, KC_PGDN, KC_HOME, KC_DOWN, KC_END, _______, KC_MINS, + _______, _______, _______, KC_SCLN, KC_EQL, KC_EQL, KC_SCLN, _______, _______, _______ + ), +/* + * Raise Layer: Number keys, media, more symbols + */ + [_RAISE] = LAYOUT( + _______, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, _______, + _______, _______, KC_MPRV, KC_MPLY, KC_MNXT, KC_VOLU, KC_MINS, KC_PLUS, KC_ASTR, KC_SLSH, KC_PERC, _______, + _______, _______, _______, _______, KC_MUTE, KC_VOLD, _______, _______, _______, _______, KC_AMPR, KC_PIPE, KC_COMM, KC_DOT, KC_SLSH, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), +/* + * Adjust Layer: Function keys, RGB + */ + [_ADJUST] = LAYOUT( + _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, _______, + _______, RGB_TOG, RGB_SAI, RGB_HUI, RGB_VAI, RGB_MOD, _______, _______, _______, KC_F11, KC_F12, _______, + _______, _______, RGB_SAD, RGB_HUD, RGB_VAD, RGB_RMOD,_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), +}; +// clang-format on + +void matrix_init_user(void) { +#ifdef ENCODER_ENABLE + encoder_utils_init(); +#endif +} + +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) { +#ifdef ENCODER_ENABLE + case ENC_MODE_L: + if (record->event.pressed) { + cycle_encoder_mode(true, false); + } + break; + case ENC_MODE_R: + if (record->event.pressed) { + cycle_encoder_mode(false, false); + } + break; +#endif +#ifdef THUMBSTICK_ENABLE + case TMB_MODE: + if (record->event.pressed) { + thumbstick_mode_cycle(false); + } +#endif + } + return true; +} + +#ifdef OLED_DRIVER_ENABLE +oled_rotation_t oled_init_user(oled_rotation_t rotation) { return OLED_ROTATION_180; } + +void oled_task_user(void) { render_status(); } +#endif + +#ifdef ENCODER_ENABLE +void encoder_update_user(uint8_t index, bool clockwise) { + if (index == 0) { + encoder_action(get_encoder_mode(true), clockwise); +# ifdef OLED_DRIVER_ENABLE + oled_on(); +# endif + } else if (index == 1) { + encoder_action(get_encoder_mode(false), clockwise); +# ifdef OLED_DRIVER_ENABLE + oled_on(); +# endif + } +} +#endif diff --git a/keyboards/kyria/keymaps/gotham/oled_utils.c b/keyboards/kyria/keymaps/gotham/oled_utils.c new file mode 100644 index 000000000000..9d76c974916a --- /dev/null +++ b/keyboards/kyria/keymaps/gotham/oled_utils.c @@ -0,0 +1,103 @@ +#include "oled_utils.h" + + 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, 0x00 + }; + + oled_write_P(qmk_logo, false); + } + +void render_layer(void) { + oled_write_P(PSTR("\nLayer: "), false); + switch (get_highest_layer(layer_state)) { + case _QWERTY: + oled_write_P(PSTR("Default\n"), false); + break; + case _LOWER: + oled_write_P(PSTR("Lower\n"), false); + break; + case _RAISE: + oled_write_P(PSTR("Raise\n"), false); + break; + case _ADJUST: + oled_write_P(PSTR("Adjust\n"), false); + break; + default: + oled_write_P(PSTR("???\n"), false); + } +} + +#ifdef ENCODER_ENABLE +void render_encoder(encoder_mode_t mode) { + switch (mode) { + case ENC_MODE_VOLUME: + oled_write_P(PSTR("Volume\n"), false); + break; + case ENC_MODE_WORD_NAV: + oled_write_P(PSTR("Word Nav\n"), false); + break; + case ENC_MODE_LEFT_RIGHT: + oled_write_P(PSTR("Left / Right\n"), false); + break; + case ENC_MODE_UP_DOWN: + oled_write_P(PSTR("Up / Down\n"), false); + break; + case ENC_MODE_PAGING: + oled_write_P(PSTR("PgUp / PgDwn\n"), false); + break; + default: + oled_write_P(PSTR("???\n"), false); + } +} +#endif + +#ifdef THUMBSTICK_ENABLE +void render_thumbstick(thumbstick_mode_t mode) { + switch (mode) { + case THUMBSTICK_MODE_MOUSE: + oled_write_P(PSTR("Mouse"), false); + break; + case THUMBSTICK_MODE_ARROWS: + oled_write_P(PSTR("Arrows"), false); + break; + case THUMBSTICK_MODE_SCROLL: + oled_write_P(PSTR("Scroll"), false); + break; + default: + oled_write_P(PSTR("???\n"), false); + } +} +#endif + +void render_status(void) { + if (is_keyboard_master()) { + // Host Keyboard Layer Status + render_layer(); +#ifdef ENCODER_ENABLE + // Encoder state + oled_write_P(PSTR("L-Enc: "), false); + render_encoder(encoder_left_mode); + oled_write_P(PSTR("R-Enc: "), false); + render_encoder(encoder_right_mode); +#endif +#ifdef THUMBSTICK_ENABLE + if (!isLeftHand) { + // Thumbstick state + oled_write_P(PSTR("Joystick: "), false); + render_thumbstick(thumbstick_state.config.mode); + } +#endif + // Host Keyboard LED Status + led_t led_state = host_keyboard_led_state(); + oled_write_P(led_state.num_lock ? PSTR("NUMLCK ") : PSTR(" "), false); + oled_write_P(led_state.caps_lock ? PSTR("CAPLCK ") : PSTR(" "), false); + oled_write_P(led_state.scroll_lock ? PSTR("SCRLCK ") : PSTR(" "), false); + } else { + // QMK Logo and version information + render_qmk_logo(); + oled_write_P(PSTR("\n Kyria v1.0\n"), false); + } +} diff --git a/keyboards/kyria/keymaps/gotham/oled_utils.h b/keyboards/kyria/keymaps/gotham/oled_utils.h new file mode 100644 index 000000000000..7e3bf44c82cd --- /dev/null +++ b/keyboards/kyria/keymaps/gotham/oled_utils.h @@ -0,0 +1,25 @@ +#pragma once + +#include "keycodes.h" + +#ifdef ENCODER_ENABLE +# include "encoder_utils.h" +#endif + +#ifdef THUMBSTICK_ENABLE +# include "thumbstick.h" +#endif + +void render_kyria_logo(void); + +void render_layer(void); + +#ifdef ENCODER_ENABLE +void render_encoder(encoder_mode_t mode); +#endif + +#ifdef THUMBSTICK_ENABLE +void render_thumbstick(thumbstick_mode_t mode); +#endif + +void render_status(void); diff --git a/keyboards/kyria/keymaps/gotham/rules.mk b/keyboards/kyria/keymaps/gotham/rules.mk new file mode 100644 index 000000000000..0bd8badb4d48 --- /dev/null +++ b/keyboards/kyria/keymaps/gotham/rules.mk @@ -0,0 +1,21 @@ +CONSOLE_ENABLE = yes # Console for debug +ENCODER_ENABLE = yes # ENables the use of one or more encoders +RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow +MOUSEKEY_ENABLE = no # Mouse keys +OLED_DRIVER_ENABLE = yes # Enables the use of OLED displays +THUMBSTICK_ENABLE = yes # Enables analog thumbstick code + +ifeq ($(strip $(ENCODER_ENABLE)), yes) + SRC += encoder_utils.c +endif + +ifeq ($(strip $(OLED_DRIVER_ENABLE)), yes) + SRC += oled_utils.c +endif + +ifeq ($(strip $(THUMBSTICK_ENABLE)), yes) + POINTING_DEVICE_ENABLE = yes + OPT_DEFS += -DTHUMBSTICK_ENABLE + SRC += analog.c + SRC += thumbstick.c +endif diff --git a/keyboards/kyria/keymaps/gotham/thumbstick.c b/keyboards/kyria/keymaps/gotham/thumbstick.c new file mode 100644 index 000000000000..ec08fb07d4c9 --- /dev/null +++ b/keyboards/kyria/keymaps/gotham/thumbstick.c @@ -0,0 +1,195 @@ +#include "thumbstick.h" + +void thumbstick_init(void) { + thumbstickTimer = 0; + thumbstickScrollTimer = 0; + + thumbstick_state.config.mode = THUMBSTICK_MODE_MOUSE; + thumbstick_state.config.deadZone = THUMBSTICK_DEAD_ZONE; + thumbstick_state.config.fineZone = THUMBSTICK_FINE_ZONE; + thumbstick_state.config.speed = THUMBSTICK_SPEED; + thumbstick_state.config.fineSpeed = THUMBSTICK_FINE_SPEED; + thumbstick_state.config.axisSeparation = THUMBSTICK_AXIS_SEPARATION; + thumbstick_state.config.eightAxis = THUMBSTICK_EIGHT_AXIS; + +#if defined THUMBSTICK_DEBUG + rawX = 0; + rawY = 0; + distX = 0; + distY = 0; + thumbstickLogTimer = 0; +#endif +} + +// Axis-level wrapper to read raw value, do logging and calculate speed +int16_t thumbstick_get_component(uint8_t pin) { + uint16_t analogValue = analogReadPin(pin); + // Compute direction + bool directionIsPositive = (analogValue > THUMBSTICK_RANGE_CENTER); + // Compute distance from the center + uint16_t distance = directionIsPositive ? (analogValue - THUMBSTICK_RANGE_CENTER) : (THUMBSTICK_RANGE_CENTER - analogValue); +#if defined THUMBSTICK_DEBUG + if (pin == THUMBSTICK_PIN_X) { + rawX = analogValue; + distX = distance; + } else { + rawY = analogValue; + distY = distance; + } +#endif + // Compute component (range of [0 to 1023]) + return directionIsPositive ? distance : -(int16_t)distance; +} + +void thumbstick_mode_set(thumbstick_mode_t mode) { thumbstick_state.config.mode = mode; } + +thumbstick_mode_t thumbstick_mode_get(void) { return thumbstick_state.config.mode; } + +void thumbstick_mode_cycle(bool reverse) { + thumbstick_mode_t mode = thumbstick_mode_get(); + if (reverse) { + mode = (mode == 0) ? (_THUMBSTICK_MODE_LAST - 1) : (mode - 1); + } else { + mode = (mode == (_THUMBSTICK_MODE_LAST - 1)) ? 0 : (mode + 1); + } + thumbstick_mode_set(mode); +} + +// Get mouse speed +int16_t thumbstick_get_mouse_speed(int16_t component) { + int16_t maxSpeed; + uint16_t distance = abs(component); + if (distance > THUMBSTICK_FINE_ZONE) { + maxSpeed = THUMBSTICK_SPEED; + } else if (distance > THUMBSTICK_DEAD_ZONE) { + maxSpeed = THUMBSTICK_FINE_SPEED; + } else { + return 0; + } + return (float)maxSpeed * component / THUMBSTICK_RANGE_CENTER; +} + +// Fix direction within one of 8 axes (or 4 if 8-axis is disabled) +thumbstick_direction_t thumbstick_get_discretized_direction(thumbstick_vector_t vector, float axisSeparation, bool eightAxis) { + thumbstick_direction_t direction; + uint16_t absX = abs(vector.x); + uint16_t absY = abs(vector.y); + uint16_t maxComponent = (absX > absY) ? absX : absY; + bool insideDeadZone = (maxComponent <= THUMBSTICK_DEAD_ZONE); + bool outsideDiagonalZone = ((abs(absX - absY) / (float)maxComponent) >= axisSeparation); + if (insideDeadZone) { + direction.up = direction.down = direction.left = direction.right = false; + } else { + direction.up = (vector.y < 0); + direction.down = (vector.y > 0); + direction.left = (vector.x < 0); + direction.right = (vector.x > 0); + // Let only the dominant direction remain under the right conditions + if (outsideDiagonalZone || !eightAxis) { + if (absX > absY) { + direction.up = direction.down = false; + } else { + direction.left = direction.right = false; + } + } + } + return direction; +} + +thumbstick_direction_t scrollDirection; // Declaring global to save stack space +void thumbstick_process(void) { + if (timer_elapsed(thumbstickTimer) > THUMBSTICK_TIMEOUT) { + thumbstickTimer = timer_read(); +#ifndef THUMBSTICK_FLIP_X + thumbstick_state.vector.x = thumbstick_get_component(THUMBSTICK_PIN_X); +#else + thumbstick_state.vector.x = -thumbstick_get_component(THUMBSTICK_PIN_X); +#endif +#ifndef THUMBSTICK_FLIP_Y + thumbstick_state.vector.y = thumbstick_get_component(THUMBSTICK_PIN_Y); +#else + thumbstick_state.vector.y = -thumbstick_get_component(THUMBSTICK_PIN_Y); +#endif + switch (thumbstick_state.config.mode) { + case THUMBSTICK_MODE_MOUSE: + thumbstick_state.report.x = thumbstick_get_mouse_speed(thumbstick_state.vector.x); + thumbstick_state.report.y = thumbstick_get_mouse_speed(thumbstick_state.vector.y); + break; + case THUMBSTICK_MODE_ARROWS: + thumbstick_state.direction = thumbstick_get_discretized_direction(thumbstick_state.vector, thumbstick_state.config.axisSeparation, thumbstick_state.config.eightAxis); + break; + case THUMBSTICK_MODE_SCROLL: + if (timer_elapsed(thumbstickScrollTimer) > THUMBSTICK_SCROLL_TIMEOUT) { + thumbstickScrollTimer = timer_read(); + scrollDirection = thumbstick_get_discretized_direction(thumbstick_state.vector, thumbstick_state.config.axisSeparation, false); + thumbstick_state.report.v = (scrollDirection.up || scrollDirection.down) ? (scrollDirection.up ? THUMBSTICK_SCROLL_SPEED : -THUMBSTICK_SCROLL_SPEED) : 0; + thumbstick_state.report.h = (scrollDirection.left || scrollDirection.right) ? (scrollDirection.left ? -THUMBSTICK_SCROLL_SPEED : THUMBSTICK_SCROLL_SPEED) : 0; + } else { + thumbstick_state.report.v = thumbstick_state.report.h = 0; + } + break; + default: + break; + } + } +} + +void update_keycode_status(uint16_t keycode, bool last, bool current) { + if (last != current) { + if (current) { + register_code16(keycode); + } else { + unregister_code16(keycode); + } + } +} + +void pointing_device_init(void) { thumbstick_init(); } + +void pointing_device_task(void) { + report_mouse_t report = pointing_device_get_report(); + + if (!isLeftHand) { + thumbstick_process(); + switch (thumbstick_state.config.mode) { + case THUMBSTICK_MODE_MOUSE: + report.x = thumbstick_state.report.x; + report.y = thumbstick_state.report.y; +#ifdef THUMBSTICK_DEBUG + if (timer_elapsed(thumbstickLogTimer) > 100) { + thumbstickLogTimer = timer_read(); + uprintf("Raw (%d, %d); Dist (%u, %u); Vec (%d, %d);\n", rawX, rawY, distX, distY, thumbstick_state.vector.x, thumbstick_state.vector.y); + } +#endif + break; + case THUMBSTICK_MODE_ARROWS: + update_keycode_status(KC_UP, thumbstick_state.lastDirection.up, thumbstick_state.direction.up); + update_keycode_status(KC_DOWN, thumbstick_state.lastDirection.down, thumbstick_state.direction.down); + update_keycode_status(KC_LEFT, thumbstick_state.lastDirection.left, thumbstick_state.direction.left); + update_keycode_status(KC_RIGHT, thumbstick_state.lastDirection.right, thumbstick_state.direction.right); + thumbstick_state.lastDirection = thumbstick_state.direction; +#ifdef THUMBSTICK_DEBUG + if (timer_elapsed(thumbstickLogTimer) > 100) { + thumbstickLogTimer = timer_read(); + uprintf("Up %d; Down %d; Left: %d; Right %d; Vec (%d, %d);\n", direction.up, direction.down, direction.left, direction.right, thumbstick_state.vector.x, thumbstick_state.vector.y); + } +#endif + break; + case THUMBSTICK_MODE_SCROLL: + report.v = thumbstick_state.report.v; + report.h = thumbstick_state.report.h; +#ifdef THUMBSTICK_DEBUG + if (timer_elapsed(thumbstickLogTimer) > 100) { + thumbstickLogTimer = timer_read(); + uprintf("Scroll (%d, %d)\n", report.h, report.v); + } +#endif + break; + default: + break; + } + } + + pointing_device_set_report(report); + pointing_device_send(); +} diff --git a/keyboards/kyria/keymaps/gotham/thumbstick.h b/keyboards/kyria/keymaps/gotham/thumbstick.h new file mode 100644 index 000000000000..aff939c746cf --- /dev/null +++ b/keyboards/kyria/keymaps/gotham/thumbstick.h @@ -0,0 +1,98 @@ +#pragma once + +typedef enum { + THUMBSTICK_MODE_MOUSE = 0, + THUMBSTICK_MODE_ARROWS, + THUMBSTICK_MODE_SCROLL, + _THUMBSTICK_MODE_LAST // Do not use, except for looping through enum values +} thumbstick_mode_t; + +// Parameters +#define THUMBSTICK_DEAD_ZONE 90 // Values below this are ignored (deadzone) +#define THUMBSTICK_FINE_ZONE 180 // Values below this enable fine movement + +#define THUMBSTICK_MODE THUMBSTICK_MODE_MOUSE +#define THUMBSTICK_SPEED 256 +#define THUMBSTICK_FINE_SPEED 96 +#define THUMBSTICK_SCROLL_SPEED 1 + +#define THUMBSTICK_EIGHT_AXIS true +#define THUMBSTICK_AXIS_SEPARATION 0.5f + +// Implicit and derived constants +#define THUMBSTICK_TIMEOUT 10 // Mouse report throttling time in ms +#define THUMBSTICK_SCROLL_TIMEOUT 200 // Mouse scroll throttling time in ms +#define THUMBSTICK_RANGE_START 0 +#define THUMBSTICK_RANGE_STOP 1023 +#define THUMBSTICK_RANGE_CENTER (THUMBSTICK_RANGE_STOP - THUMBSTICK_RANGE_START + 1) / 2 +#define THUMBSTICK_RANGE_MOVEMENT (THUMBSTICK_RANGE_CENTER - THUMBSTICK_DEAD_ZONE) + +#include "timer.h" +#include "analog.h" +#include "split_util.h" +#include "pointing_device.h" + +#if defined THUMBSTICK_DEBUG +# include "print.h" +uint16_t rawX; +uint16_t rawY; +uint16_t distX; +uint16_t distY; +uint16_t thumbstickLogTimer; +#endif + +typedef struct { + thumbstick_mode_t mode; + uint16_t deadZone; + uint16_t fineZone; + uint16_t speed; + uint16_t fineSpeed; + float axisSeparation; + bool eightAxis; +} thumbstick_config_t; + +typedef struct { + int16_t x; + int16_t y; +} thumbstick_vector_t; + +typedef struct { + bool up; + bool right; + bool down; + bool left; +} thumbstick_direction_t; + +typedef struct { + thumbstick_config_t config; + thumbstick_vector_t vector; + thumbstick_direction_t direction; + thumbstick_direction_t lastDirection; + report_mouse_t report; +} thumbstick_state_t; + +uint16_t thumbstickTimer; +uint16_t thumbstickScrollTimer; + +thumbstick_state_t thumbstick_state; + +void thumbstick_mode_set(thumbstick_mode_t mode); + +thumbstick_mode_t thumbstick_mode_get(void); + +void thumbstick_mode_cycle(bool reverse); + +void thumbstick_init(void); + +// Axis-level wrapper to read raw value, do logging and calculate speed +int16_t thumbstick_get_component(uint8_t pin); + +// Get mouse speed +int16_t thumbstick_get_mouse_speed(int16_t component); + +// Fix direction within one of 8 axes (or 4 if 8-axis is disabled) +thumbstick_direction_t thumbstick_get_discretized_direction(thumbstick_vector_t vector, float axisSeparation, bool eightAxis); + +void thumbstick_process(void); + +void update_keycode_status(uint16_t keycode, bool last, bool current); From d1730ec760360b38fd6f5d162a5eb1f22e893b0f Mon Sep 17 00:00:00 2001 From: Callum Oakley Date: Sat, 13 Jun 2020 12:11:28 +0100 Subject: [PATCH 148/930] [keymap] upstreaming a minor keymap update (#9366) --- keyboards/planck/keymaps/callum/keymap.c | 23 ++++++++++++++++------- keyboards/planck/keymaps/callum/readme.md | 8 -------- 2 files changed, 16 insertions(+), 15 deletions(-) diff --git a/keyboards/planck/keymaps/callum/keymap.c b/keyboards/planck/keymaps/callum/keymap.c index 34ef05248747..4db54577b01a 100644 --- a/keyboards/planck/keymaps/callum/keymap.c +++ b/keyboards/planck/keymaps/callum/keymap.c @@ -75,11 +75,20 @@ #define tabr G(S(KC_RBRC)) #define fwd G(KC_RBRC) #define back G(KC_LBRC) -#define dtl C(KC_LEFT) -#define dtr C(KC_RGHT) #define slup S(A(KC_UP)) #define sldn S(A(KC_DOWN)) +#define ctl1 C(KC_1) +#define ctl2 C(KC_2) +#define ctl3 C(KC_3) +#define ctl4 C(KC_4) +#define ctl5 C(KC_5) +#define ctl6 C(KC_6) +#define ctl7 C(KC_7) +#define ctl8 C(KC_8) +#define ctl9 C(KC_9) +#define ctl0 C(KC_0) + #define f1 KC_F1 #define f2 KC_F2 #define f3 KC_F3 @@ -105,8 +114,8 @@ #define next KC_MNXT #define play KC_MPLY #define prev KC_MPRV -#define vold KC_F11 -#define volu KC_F12 +#define vold KC_VOLD +#define volu KC_VOLU #define symb MO(SYMB) #define move MO(MOVE) @@ -168,9 +177,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), [MOVE] = LAYOUT_planck_grid( - 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, ____, + esc, ctl1, ctl2, ctl3, ctl4, xxxx, xxxx, home, up, end, ctl7, caps, + del, ctl5, slup, tabl, tabr, xxxx, xxxx, left, down, rght, ctl8, xxxx, + ____, ctl6, sldn, back, fwd, xxxx, xxxx, pgdn, pgup, ctl0, ctl9, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____ ), diff --git a/keyboards/planck/keymaps/callum/readme.md b/keyboards/planck/keymaps/callum/readme.md index 3eae9ad3cead..561901b48e56 100644 --- a/keyboards/planck/keymaps/callum/readme.md +++ b/keyboards/planck/keymaps/callum/readme.md @@ -26,13 +26,5 @@ This is a layout for the grid planck, built with a few ideals in mind: higher ones. (number arrangement borrowed from [dustypomeleau's minidox layout][]. -Layout rendered with [keyboard-layout-editor.com][]: - -![](https://callumoakley.net/images/keymap.png) - -The only behaviour not captured in this graphic is: pressing both cmd keys will -send cmd+ctrl. See [keymap.c][] for details. - [dustypomeleau's minidox layout]: https://github.com/qmk/qmk_firmware/tree/master/keyboards/minidox/keymaps/dustypomerleau -[keyboard-layout-editor.com]: http://www.keyboard-layout-editor.com [keymap.c]: keymap.c From 867fded9801a84e901bc381d8f523e45544b6119 Mon Sep 17 00:00:00 2001 From: Maarten Dekkers Date: Sat, 13 Jun 2020 20:41:53 +0200 Subject: [PATCH 149/930] [Keyboard] Add OmronTKL (#9346) * Add OmronTKL * Fix column pins --- keyboards/maartenwut/omrontkl/config.h | 220 +++++++++++++ keyboards/maartenwut/omrontkl/info.json | 299 ++++++++++++++++++ .../omrontkl/keymaps/default/keymap.c | 42 +++ keyboards/maartenwut/omrontkl/omrontkl.c | 16 + keyboards/maartenwut/omrontkl/omrontkl.h | 79 +++++ keyboards/maartenwut/omrontkl/readme.md | 13 + keyboards/maartenwut/omrontkl/rules.mk | 32 ++ 7 files changed, 701 insertions(+) create mode 100644 keyboards/maartenwut/omrontkl/config.h create mode 100644 keyboards/maartenwut/omrontkl/info.json create mode 100644 keyboards/maartenwut/omrontkl/keymaps/default/keymap.c create mode 100644 keyboards/maartenwut/omrontkl/omrontkl.c create mode 100644 keyboards/maartenwut/omrontkl/omrontkl.h create mode 100644 keyboards/maartenwut/omrontkl/readme.md create mode 100644 keyboards/maartenwut/omrontkl/rules.mk diff --git a/keyboards/maartenwut/omrontkl/config.h b/keyboards/maartenwut/omrontkl/config.h new file mode 100644 index 000000000000..a07500edfb0a --- /dev/null +++ b/keyboards/maartenwut/omrontkl/config.h @@ -0,0 +1,220 @@ +/* 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 0xEA78 +#define DEVICE_VER 0x0001 +#define MANUFACTURER Maartenwut +#define PRODUCT OmronTKL +#define DESCRIPTION A TKL PCB for Omron switches + +/* 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 {D0,D1,D2,D3,D4,B7} +#define MATRIX_COL_PINS {F0,C7,F1,C6,F4,B6,F5,B5,F6,B4,F7,D7,D6,D5,B3,B1,B2} +#define UNUSED_PINS {E6,B0} + +/* 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 D0 +// #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 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 0 diff --git a/keyboards/maartenwut/omrontkl/info.json b/keyboards/maartenwut/omrontkl/info.json new file mode 100644 index 000000000000..faf9569644b2 --- /dev/null +++ b/keyboards/maartenwut/omrontkl/info.json @@ -0,0 +1,299 @@ +{ + "keyboard_name": "OmronTKL", + "url": "", + "maintainer": "qmk", + "width": 18.25, + "height": 6.25, + "layouts": { + "LAYOUT_all": { + "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}, + {"x":14, "y":1.25}, + {"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}, + {"x":13.75, "y":3.25, "w":1.25}, + + {"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.5}, + {"x":1.5, "y":5.25, "w":1.25}, + {"x":2.75, "y":5.25, "w":1.5}, + {"x":4.25, "y":5.25, "w":6.5}, + {"x":10.75, "y":5.25, "w":1.5}, + {"x":12.25, "y":5.25, "w":1.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_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.5}, + {"x":1.5, "y":5.25, "w":1.25}, + {"x":2.75, "y":5.25, "w":1.5}, + {"x":4.25, "y":5.25, "w":6.5}, + {"x":10.75, "y":5.25, "w":1.5}, + {"x":12.25, "y":5.25, "w":1.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_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.5}, + {"x":1.5, "y":5.25, "w":1.25}, + {"x":2.75, "y":5.25, "w":1.5}, + {"x":4.25, "y":5.25, "w":6.5}, + {"x":10.75, "y":5.25, "w":1.5}, + {"x":12.25, "y":5.25, "w":1.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} + ] + } + } +} diff --git a/keyboards/maartenwut/omrontkl/keymaps/default/keymap.c b/keyboards/maartenwut/omrontkl/keymaps/default/keymap.c new file mode 100644 index 000000000000..7d8304ed74f8 --- /dev/null +++ b/keyboards/maartenwut/omrontkl/keymaps/default/keymap.c @@ -0,0 +1,42 @@ +/* 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_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_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_RCTRL, KC_LEFT, KC_DOWN, KC_RGHT), +[_FN] = LAYOUT_all( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_VOLD, KC_MUTE, KC_VOLU, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MPRV, KC_MPLY, KC_MNXT, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______), + +}; \ No newline at end of file diff --git a/keyboards/maartenwut/omrontkl/omrontkl.c b/keyboards/maartenwut/omrontkl/omrontkl.c new file mode 100644 index 000000000000..e8748ea61219 --- /dev/null +++ b/keyboards/maartenwut/omrontkl/omrontkl.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 "omrontkl.h" diff --git a/keyboards/maartenwut/omrontkl/omrontkl.h b/keyboards/maartenwut/omrontkl/omrontkl.h new file mode 100644 index 000000000000..c8292def401e --- /dev/null +++ b/keyboards/maartenwut/omrontkl/omrontkl.h @@ -0,0 +1,79 @@ +/* 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, 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, k0d, 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, k4f, \ + k50, k51, k52, k56, 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, XXX, XXX, XXX }, \ + { k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, k4a, k4b, k4c, k4d, XXX, k4f, XXX }, \ + { k50, k51, k52, XXX, XXX, XXX, k56, XXX, XXX, XXX, XXX, k5b, k5c, k5d, k5e, k5f, k5g } \ +} + +#define LAYOUT_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, k5b, k5c, k5d, k5e, k5f, k5g \ +) \ +{ \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, XXX, 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, XXX, k3d, XXX, XXX, XXX }, \ + { k40, XXX, k42, k43, k44, k45, k46, k47, k48, k49, k4a, k4b, k4c, XXX, XXX, k4f, XXX }, \ + { k50, k51, k52, XXX, XXX, XXX, k56, XXX, XXX, XXX, XXX, k5b, k5c, k5d, k5e, k5f, k5g } \ +} + +#define LAYOUT_iso( \ + 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, 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, k4f, \ + k50, k51, k52, k56, k5b, k5c, k5d, k5e, k5f, k5g \ +) \ +{ \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, XXX, 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, XXX, k2e, k2f, k2g }, \ + { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d, XXX, XXX, XXX }, \ + { k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, k4a, k4b, k4c, XXX, XXX, k4f, XXX }, \ + { k50, k51, k52, XXX, XXX, XXX, k56, XXX, XXX, XXX, XXX, k5b, k5c, k5d, k5e, k5f, k5g } \ +} diff --git a/keyboards/maartenwut/omrontkl/readme.md b/keyboards/maartenwut/omrontkl/readme.md new file mode 100644 index 000000000000..2141fbc8e29a --- /dev/null +++ b/keyboards/maartenwut/omrontkl/readme.md @@ -0,0 +1,13 @@ +# OmronTKL + +## Support +* Keyboard Maintainer: [Maarten Dekkers](https://github.com/maartenwut) +* Hardware Supported: OmronTKL +* Hardware Availability: none + +## Build +Make example for this keyboard (after setting up your build environment): + + make maartenwut/omrontkl: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/omrontkl/rules.mk b/keyboards/maartenwut/omrontkl/rules.mk new file mode 100644 index 000000000000..8fc9b9c73d44 --- /dev/null +++ b/keyboards/maartenwut/omrontkl/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 = 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 +# 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 From b1609133095509e9929d6f9bf7a581a67b077fbd Mon Sep 17 00:00:00 2001 From: mechlovin <57231893+mechlovin@users.noreply.github.com> Date: Sun, 14 Jun 2020 01:43:04 +0700 Subject: [PATCH 150/930] [Keyboard] Add new PCB Infinity87 (#9287) * Add new PCB Infinity87 * Update keymap.c * Update readme.md * Update rules.mk * update * Update info.json --- keyboards/mechlovin/infinity87/config.h | 73 ++++++++++++ keyboards/mechlovin/infinity87/infinity87.c | 38 +++++++ keyboards/mechlovin/infinity87/infinity87.h | 37 ++++++ keyboards/mechlovin/infinity87/info.json | 106 ++++++++++++++++++ .../infinity87/keymaps/default/keymap.c | 27 +++++ .../infinity87/keymaps/default/readme.md | 1 + .../mechlovin/infinity87/keymaps/via/keymap.c | 52 +++++++++ .../infinity87/keymaps/via/readme.md | 1 + .../mechlovin/infinity87/keymaps/via/rules.mk | 1 + keyboards/mechlovin/infinity87/readme.md | 15 +++ keyboards/mechlovin/infinity87/rules.mk | 21 ++++ 11 files changed, 372 insertions(+) create mode 100644 keyboards/mechlovin/infinity87/config.h create mode 100644 keyboards/mechlovin/infinity87/infinity87.c create mode 100644 keyboards/mechlovin/infinity87/infinity87.h create mode 100644 keyboards/mechlovin/infinity87/info.json create mode 100644 keyboards/mechlovin/infinity87/keymaps/default/keymap.c create mode 100644 keyboards/mechlovin/infinity87/keymaps/default/readme.md create mode 100644 keyboards/mechlovin/infinity87/keymaps/via/keymap.c create mode 100644 keyboards/mechlovin/infinity87/keymaps/via/readme.md create mode 100644 keyboards/mechlovin/infinity87/keymaps/via/rules.mk create mode 100644 keyboards/mechlovin/infinity87/readme.md create mode 100644 keyboards/mechlovin/infinity87/rules.mk diff --git a/keyboards/mechlovin/infinity87/config.h b/keyboards/mechlovin/infinity87/config.h new file mode 100644 index 000000000000..6c1545024c3a --- /dev/null +++ b/keyboards/mechlovin/infinity87/config.h @@ -0,0 +1,73 @@ +/* +Copyright 2020 Team 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 +#define PRODUCT_ID 0x8701 +#define DEVICE_VER 0x0001 +#define MANUFACTURER Team.Mechlovin +#define PRODUCT Infinity 87 +#define DESCRIPTION Team.Mechlovin Infinity 87 + +/* 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 { A10, B13, B12, B11, C14, C15 } +#define MATRIX_COL_PINS { C13, B9, B4, B7, B8, B5, B6, A9, A5, A6, A7,B1, B2, B10, B3, B14, B15 } + +#define DIODE_DIRECTION COL2ROW + + +#define BACKLIGHT_PIN B0 +#define BACKLIGHT_BREATHING +#define BACKLIGHT_PWM_DRIVER PWMD3 +#define BACKLIGHT_PWM_CHANNEL 3 + +#define RGB_DI_PIN A15 +#define RGBLED_NUM 26 +#define RGBLIGHT_LIMIT_VAL 255 +#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 + +// generated by KBFirmware JSON to QMK Parser +// https://noroadsleft.github.io/kbf_qmk_converter/ \ No newline at end of file diff --git a/keyboards/mechlovin/infinity87/infinity87.c b/keyboards/mechlovin/infinity87/infinity87.c new file mode 100644 index 000000000000..2de528bc366a --- /dev/null +++ b/keyboards/mechlovin/infinity87/infinity87.c @@ -0,0 +1,38 @@ +/* Copyright 2020 Team 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 "infinity87.h" + +void matrix_init_kb(void) { + matrix_init_user(); + led_init_ports(); +} + +void led_init_ports(void) { + setPinOutput(A3); + writePinLow(A3); + setPinOutput(A4); + writePinLow(A4); +} + +bool led_update_kb(led_t led_state) { + if(led_update_user(led_state)) { + writePin(A4, led_state.caps_lock); + writePin(A3, led_state.num_lock); + } + + return true; +} diff --git a/keyboards/mechlovin/infinity87/infinity87.h b/keyboards/mechlovin/infinity87/infinity87.h new file mode 100644 index 000000000000..4810d9d86a4f --- /dev/null +++ b/keyboards/mechlovin/infinity87/infinity87.h @@ -0,0 +1,37 @@ +/* Copyright 2020 Team 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, K0E, K0F, K0G, \ + K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K0D, 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, 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, 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, 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 }, \ +} + +// generated by KBFirmware JSON to QMK Parser +// https://noroadsleft.github.io/kbf_qmk_converter/ \ No newline at end of file diff --git a/keyboards/mechlovin/infinity87/info.json b/keyboards/mechlovin/infinity87/info.json new file mode 100644 index 000000000000..78d6a29bc872 --- /dev/null +++ b/keyboards/mechlovin/infinity87/info.json @@ -0,0 +1,106 @@ +{ + "keyboard_name": "infinity87", + "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,F4)", "x":2, "y":0}, + {"label":"K02 (B0,C0)", "x":3, "y":0}, + {"label":"K03 (B0,C1)", "x":4, "y":0}, + {"label":"K04 (B0,C2)", "x":5, "y":0}, + {"label":"K05 (B0,C3)", "x":6.5, "y":0}, + {"label":"K06 (B0,C4)", "x":7.5, "y":0}, + {"label":"K07 (B0,C5)", "x":8.5, "y":0}, + {"label":"K08 (B0,C6)", "x":9.5, "y":0}, + {"label":"K09 (B0,C7)", "x":11, "y":0}, + {"label":"K0A (B0,D0)", "x":12, "y":0}, + {"label":"K0B (B0,D1)", "x":13, "y":0}, + {"label":"K0C (B0,D2)", "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,F4)", "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}, + {"label":"K0D (B0,D3)", "x":14, "y":1.25}, + {"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,F4)", "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,F4)", "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,F4)", "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,F4)", "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/" +} diff --git a/keyboards/mechlovin/infinity87/keymaps/default/keymap.c b/keyboards/mechlovin/infinity87/keymaps/default/keymap.c new file mode 100644 index 000000000000..a98abef90c8b --- /dev/null +++ b/keyboards/mechlovin/infinity87/keymaps/default/keymap.c @@ -0,0 +1,27 @@ +/* Copyright 2020 Team 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, 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_HASH, 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_LSFT, KC_LSFT, KC_UP, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_LALT, KC_LGUI,MO(1), KC_LCTL, KC_LEFT, KC_DOWN, KC_RGHT + ), +}; diff --git a/keyboards/mechlovin/infinity87/keymaps/default/readme.md b/keyboards/mechlovin/infinity87/keymaps/default/readme.md new file mode 100644 index 000000000000..01ef555056b7 --- /dev/null +++ b/keyboards/mechlovin/infinity87/keymaps/default/readme.md @@ -0,0 +1 @@ +# The default keymap for infinity87 diff --git a/keyboards/mechlovin/infinity87/keymaps/via/keymap.c b/keyboards/mechlovin/infinity87/keymaps/via/keymap.c new file mode 100644 index 000000000000..22250ad0e633 --- /dev/null +++ b/keyboards/mechlovin/infinity87/keymaps/via/keymap.c @@ -0,0 +1,52 @@ +/* Copyright 2020 Team 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, 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_HASH, 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_LSFT, KC_LSFT, KC_UP, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_LALT, KC_LGUI, MO(1), KC_LCTL, 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/infinity87/keymaps/via/readme.md b/keyboards/mechlovin/infinity87/keymaps/via/readme.md new file mode 100644 index 000000000000..8867d290cdfb --- /dev/null +++ b/keyboards/mechlovin/infinity87/keymaps/via/readme.md @@ -0,0 +1 @@ +# The via keymap for infinity87 diff --git a/keyboards/mechlovin/infinity87/keymaps/via/rules.mk b/keyboards/mechlovin/infinity87/keymaps/via/rules.mk new file mode 100644 index 000000000000..036bd6d1c3ec --- /dev/null +++ b/keyboards/mechlovin/infinity87/keymaps/via/rules.mk @@ -0,0 +1 @@ +VIA_ENABLE = yes \ No newline at end of file diff --git a/keyboards/mechlovin/infinity87/readme.md b/keyboards/mechlovin/infinity87/readme.md new file mode 100644 index 000000000000..892cecef1d71 --- /dev/null +++ b/keyboards/mechlovin/infinity87/readme.md @@ -0,0 +1,15 @@ +# infinity87 + +![infinity87](https://i.imgur.com/QuK1EnN.png) + +A replacement PCB for TKL keyboard. A87 form factor,south-facing stabilisers. + +* Keyboard Maintainer: [Team Mechlovin'](https://github.com/mechlovin) +* Hardware Supported: Infinity87 rev.1 (1.6mm & 1.2mm). +* Hardware Availability: [Geekhack GB](https://geekhack.org/index.php?topic=105853.0), [Reddit GB](https://www.reddit.com/r/mechmarket/comments/g4vf2w/gb_team_mechlovin_infinity_87_a87_form_factor/) + +Make example for this keyboard (after setting up your build environment): + + make mechlovin/infinity87: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/infinity87/rules.mk b/keyboards/mechlovin/infinity87/rules.mk new file mode 100644 index 000000000000..00676c2ecb42 --- /dev/null +++ b/keyboards/mechlovin/infinity87/rules.mk @@ -0,0 +1,21 @@ +# MCU name +MCU = STM32F303 + +# 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 = 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 From 1f2807c2deb0f90222090537feca38682c9aa5b5 Mon Sep 17 00:00:00 2001 From: elmo-space Date: Sat, 13 Jun 2020 20:45:03 +0200 Subject: [PATCH 151/930] Add ANSI and ISO layout for KBD67mkII soldered PCB (#9340) * add ansi and iso layouts * fix iso map mistake * fix mistake again... * Update keyboards/kbdfans/kbd67/mkii_soldered/keymaps/iso/keymap.c * rename layout macros to the blocker variants and add ansi_split_bs * Apply suggestions from code review --- .../kbdfans/kbd67/mkii_soldered/info.json | 354 ++++++++++++++---- .../kbd67/mkii_soldered/keymaps/ansi/keymap.c | 33 ++ .../mkii_soldered/keymaps/ansi/readme.md | 3 + .../keymaps/ansi_split_bs/keymap.c | 33 ++ .../keymaps/ansi_split_bs/readme.md | 3 + .../mkii_soldered/keymaps/default/keymap.c | 7 - .../kbd67/mkii_soldered/keymaps/iso/keymap.c | 32 ++ .../kbd67/mkii_soldered/keymaps/iso/readme.md | 3 + .../kbd67/mkii_soldered/mkii_soldered.h | 46 ++- 9 files changed, 435 insertions(+), 79 deletions(-) create mode 100644 keyboards/kbdfans/kbd67/mkii_soldered/keymaps/ansi/keymap.c create mode 100644 keyboards/kbdfans/kbd67/mkii_soldered/keymaps/ansi/readme.md create mode 100644 keyboards/kbdfans/kbd67/mkii_soldered/keymaps/ansi_split_bs/keymap.c create mode 100644 keyboards/kbdfans/kbd67/mkii_soldered/keymaps/ansi_split_bs/readme.md create mode 100644 keyboards/kbdfans/kbd67/mkii_soldered/keymaps/iso/keymap.c create mode 100644 keyboards/kbdfans/kbd67/mkii_soldered/keymaps/iso/readme.md diff --git a/keyboards/kbdfans/kbd67/mkii_soldered/info.json b/keyboards/kbdfans/kbd67/mkii_soldered/info.json index 6440a007eeb2..72c851e35af9 100644 --- a/keyboards/kbdfans/kbd67/mkii_soldered/info.json +++ b/keyboards/kbdfans/kbd67/mkii_soldered/info.json @@ -7,77 +7,289 @@ "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":"Back Space", "x":13, "y":0}, - {"label":"Delete", "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":"|", "x":13.5, "y":1, "w":1.5}, - {"label":"End", "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":"PgUp", "x":15, "y":2}, - {"label":"Shift", "x":0, "y":3, "w":1.25}, - {"label":"Hi", "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":"↑", "x":14, "y":3}, - {"label":"PgDn", "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":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":"←", "x":13, "y":4}, - {"label":"↓", "x":14, "y":4}, - {"label":"→", "x":15, "y":4} - ] + {"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":"Back Space", "x":13, "y":0}, + {"label":"Delete", "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":"|", "x":13.5, "y":1, "w":1.5}, + {"label":"End", "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":"PgUp", "x":15, "y":2}, + {"label":"Shift", "x":0, "y":3, "w":1.25}, + {"label":"Hi", "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":"↑", "x":14, "y":3}, + {"label":"PgDn", "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":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":"←", "x":13, "y":4}, + {"label":"↓", "x":14, "y":4}, + {"label":"→", "x":15, "y":4} + ] + }, + "LAYOUT_65_ansi_blocker": { + "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":"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":"End", "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":"PgUp", "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":"PgDn", "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":"Ctrl", "x":11.25, "y":4, "w":1.25}, + {"label":"\u2190", "x":13, "y":4}, + {"label":"\u2193", "x":14, "y":4}, + {"label":"\u2192", "x":15, "y":4} + ] + }, + "LAYOUT_65_iso_blocker": { + "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":"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":"End", "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":"PgUp", "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":"\u2191", "x":14, "y":3}, + {"label":"PgDn", "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":"Ctrl", "x":11.25, "y":4, "w":1.25}, + {"label":"\u2190", "x":13, "y":4}, + {"label":"\u2193", "x":14, "y":4}, + {"label":"\u2192", "x":15, "y":4} + ] + }, + "LAYOUT_65_ansi_blocker_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":"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":"End", "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":"PgUp", "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":"PgDn", "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}, + {"label":"\u2190", "x":13, "y":4}, + {"label":"\u2193", "x":14, "y":4}, + {"label":"\u2192", "x":15, "y":4} + ] } } } diff --git a/keyboards/kbdfans/kbd67/mkii_soldered/keymaps/ansi/keymap.c b/keyboards/kbdfans/kbd67/mkii_soldered/keymaps/ansi/keymap.c new file mode 100644 index 000000000000..1f093baab842 --- /dev/null +++ b/keyboards/kbdfans/kbd67/mkii_soldered/keymaps/ansi/keymap.c @@ -0,0 +1,33 @@ +/* Copyright 2020 elmo-space + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public 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( /* 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_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, + 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_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, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT + ), + [1] = LAYOUT_65_ansi_blocker( /* 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, BL_INC, + KC_CAPS, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, BL_DEC, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_PGUP, _______, + _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_END + ) +}; diff --git a/keyboards/kbdfans/kbd67/mkii_soldered/keymaps/ansi/readme.md b/keyboards/kbdfans/kbd67/mkii_soldered/keymaps/ansi/readme.md new file mode 100644 index 000000000000..051a9ce16446 --- /dev/null +++ b/keyboards/kbdfans/kbd67/mkii_soldered/keymaps/ansi/readme.md @@ -0,0 +1,3 @@ +# The default ANSI keymap for KBD67 MKII + +A basic 65% keymap. diff --git a/keyboards/kbdfans/kbd67/mkii_soldered/keymaps/ansi_split_bs/keymap.c b/keyboards/kbdfans/kbd67/mkii_soldered/keymaps/ansi_split_bs/keymap.c new file mode 100644 index 000000000000..1c443ae7342a --- /dev/null +++ b/keyboards/kbdfans/kbd67/mkii_soldered/keymaps/ansi_split_bs/keymap.c @@ -0,0 +1,33 @@ +/* Copyright 2020 elmo-space + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public 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_split_bs( /* 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_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_END, + 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_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, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT + ), + [1] = LAYOUT_65_ansi_blocker_split_bs( /* 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, _______, _______, BL_INC, + KC_CAPS, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, BL_DEC, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_PGUP, _______, + _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_END + ) +}; diff --git a/keyboards/kbdfans/kbd67/mkii_soldered/keymaps/ansi_split_bs/readme.md b/keyboards/kbdfans/kbd67/mkii_soldered/keymaps/ansi_split_bs/readme.md new file mode 100644 index 000000000000..1f3f3633560e --- /dev/null +++ b/keyboards/kbdfans/kbd67/mkii_soldered/keymaps/ansi_split_bs/readme.md @@ -0,0 +1,3 @@ +# The default ANSI with Split Backspace keymap for KBD67 MKII + +A basic 65% keymap. diff --git a/keyboards/kbdfans/kbd67/mkii_soldered/keymaps/default/keymap.c b/keyboards/kbdfans/kbd67/mkii_soldered/keymaps/default/keymap.c index 6dcbf00dd257..61f3aa8c5fbf 100644 --- a/keyboards/kbdfans/kbd67/mkii_soldered/keymaps/default/keymap.c +++ b/keyboards/kbdfans/kbd67/mkii_soldered/keymaps/default/keymap.c @@ -15,13 +15,6 @@ */ #include QMK_KEYBOARD_H -/* K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K212, 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, K213, K214, \ - * K300, K404, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K313, K314, \ - * K400, K401, K402, K403, K405, K407, K409, K410, K411, K413, K414 \ - */ - 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_HOME, diff --git a/keyboards/kbdfans/kbd67/mkii_soldered/keymaps/iso/keymap.c b/keyboards/kbdfans/kbd67/mkii_soldered/keymaps/iso/keymap.c new file mode 100644 index 000000000000..c49da957280f --- /dev/null +++ b/keyboards/kbdfans/kbd67/mkii_soldered/keymaps/iso/keymap.c @@ -0,0 +1,32 @@ +/* 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_65_iso_blocker( /* 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_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_END, + 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_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, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT + ), + [1] = LAYOUT_65_iso_blocker( /* 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, BL_INC, + KC_CAPS, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, BL_DEC, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_PGUP, _______, + _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_END + ) +}; diff --git a/keyboards/kbdfans/kbd67/mkii_soldered/keymaps/iso/readme.md b/keyboards/kbdfans/kbd67/mkii_soldered/keymaps/iso/readme.md new file mode 100644 index 000000000000..e2dd061075dd --- /dev/null +++ b/keyboards/kbdfans/kbd67/mkii_soldered/keymaps/iso/readme.md @@ -0,0 +1,3 @@ +# The default ISO keymap for KBD67 MKII + +A basic 65% keymap. diff --git a/keyboards/kbdfans/kbd67/mkii_soldered/mkii_soldered.h b/keyboards/kbdfans/kbd67/mkii_soldered/mkii_soldered.h index 7eb11f1ff07c..6b80aa20b6ba 100644 --- a/keyboards/kbdfans/kbd67/mkii_soldered/mkii_soldered.h +++ b/keyboards/kbdfans/kbd67/mkii_soldered/mkii_soldered.h @@ -37,7 +37,51 @@ { 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 }, \ { K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, KC_NO, K313, K314 }, \ - { K400, K401, K402, K403, K404, K405, KC_NO, K407, KC_NO, K409, K410, K411, KC_NO, K413, K414 } \ + { K400, K401, K402, K403, K404, K405, KC_NO, K407, KC_NO, K409, K410, K411, KC_NO, K413, K414 } \ } +#define LAYOUT_65_ansi_blocker( \ + 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, K213, K214, \ + K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K313, K314, \ + K400, K401, K402, K405, K409, K410, K411, K413, K414 \ +) \ +{ \ + { 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, KC_NO, K213, K214 }, \ + { K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, KC_NO, K313, K314 }, \ + { K400, K401, K402, KC_NO, KC_NO, K405, KC_NO, KC_NO, KC_NO, K409, K410, K411, KC_NO, K413, K414 } \ +} + +#define LAYOUT_65_ansi_blocker_split_bs( \ + K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K212, 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, K213, K214, \ + K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K313, K314, \ + K400, K401, K402, K405, K409, K410, K411, K413, K414 \ +) \ +{ \ + { 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, K213, K214 }, \ + { K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, KC_NO, K313, K314 }, \ + { K400, K401, K402, KC_NO, KC_NO, K405, KC_NO, KC_NO, KC_NO, K409, K410, K411, KC_NO, K413, K414 } \ +} + +#define LAYOUT_65_iso_blocker( \ + 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, K114, \ + K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K214, \ + K300, K404, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K313, K314, \ + K400, K401, K402, K405, K409, K410, K411, K413, K414 \ +) \ +{ \ + { 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, KC_NO, K114 }, \ + { K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K214 }, \ + { K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, KC_NO, K313, K314 }, \ + { K400, K401, K402, KC_NO, K404, K405, KC_NO, KC_NO, KC_NO, K409, K410, K411, KC_NO, K413, K414 } \ +} From 897c4cd1753cb831f8ca74b6d6feaeecd20fd869 Mon Sep 17 00:00:00 2001 From: qunguyentk <40719920+qunguyentk@users.noreply.github.com> Date: Sun, 14 Jun 2020 01:48:48 +0700 Subject: [PATCH 152/930] [Keyboard] Add Batpad 2x4 PCB (#9295) * Add files via upload * Update config.h * Update config.h * Update keyboards/Yncognito/batpad/batpad.c * Update batpad.c * Update keyboards/Yncognito/batpad/keymaps/default/keymap.c * Update keyboards/Yncognito/batpad/batpad.h * Update keyboards/Yncognito/batpad/keymaps/default/keymap.c * Update keyboards/Yncognito/batpad/keymaps/default/keymap.c * Update keyboards/Yncognito/batpad/keymaps/via/keymap.c * Update keyboards/Yncognito/batpad/keymaps/via/keymap.c * Update keyboards/Yncognito/batpad/keymaps/via/keymap.c * Update keyboards/Yncognito/batpad/batpad.c * Rename keyboards/Yncognito/batpad/rules.mk to keyboards/yncognito/batpad/rules.mk * Rename keyboards/Yncognito/batpad/readme.md to keyboards/yncognito/batpad/readme.md * Rename keyboards/Yncognito/batpad/info.json to keyboards/yncognito/batpad/info.json * Rename keyboards/Yncognito/batpad/config.h to keyboards/yncognito/batpad/config.h * Rename keyboards/Yncognito/batpad/batpad.h to keyboards/yncognito/batpad/batpad.h * Rename keyboards/Yncognito/batpad/batpad.c to keyboards/yncognito/batpad/batpad.c * Rename keyboards/Yncognito/batpad/keymaps/default/readme.md to keyboards/yncognito/batpad/keymaps/default/readme.md * Rename keyboards/Yncognito/batpad/keymaps/default/keymap.c to keyboards/yncognito/batpad/keymaps/default/keymap.c * Rename keyboards/Yncognito/batpad/keymaps/default/config.h to keyboards/yncognito/batpad/keymaps/default/config.h * Rename keyboards/Yncognito/batpad/keymaps/via/rules.mk to keyboards/yncognito/batpad/keymaps/via/rules.mk * Rename keyboards/Yncognito/batpad/keymaps/via/keymap.c to keyboards/yncognito/batpad/keymaps/via/keymap.c * Rename keyboards/Yncognito/batpad/keymaps/via/config.h to keyboards/yncognito/batpad/keymaps/via/config.h * Update keyboards/yncognito/batpad/readme.md * Update keyboards/yncognito/batpad/readme.md * Update keyboards/yncognito/batpad/rules.mk * Delete config.h * Delete config.h * Update readme.md * Update keyboards/yncognito/batpad/batpad.c * Update keyboards/yncognito/batpad/readme.md * Update keyboards/yncognito/batpad/keymaps/via/keymap.c * Update keyboards/yncognito/batpad/info.json * Update keyboards/yncognito/batpad/batpad.h --- keyboards/yncognito/batpad/batpad.c | 35 +++++++++++ keyboards/yncognito/batpad/batpad.h | 29 +++++++++ keyboards/yncognito/batpad/config.h | 60 +++++++++++++++++++ keyboards/yncognito/batpad/info.json | 23 +++++++ .../yncognito/batpad/keymaps/default/keymap.c | 34 +++++++++++ .../batpad/keymaps/default/readme.md | 1 + .../yncognito/batpad/keymaps/via/keymap.c | 36 +++++++++++ .../yncognito/batpad/keymaps/via/rules.mk | 1 + keyboards/yncognito/batpad/readme.md | 14 +++++ keyboards/yncognito/batpad/rules.mk | 35 +++++++++++ 10 files changed, 268 insertions(+) create mode 100644 keyboards/yncognito/batpad/batpad.c create mode 100644 keyboards/yncognito/batpad/batpad.h create mode 100644 keyboards/yncognito/batpad/config.h create mode 100644 keyboards/yncognito/batpad/info.json create mode 100644 keyboards/yncognito/batpad/keymaps/default/keymap.c create mode 100644 keyboards/yncognito/batpad/keymaps/default/readme.md create mode 100644 keyboards/yncognito/batpad/keymaps/via/keymap.c create mode 100644 keyboards/yncognito/batpad/keymaps/via/rules.mk create mode 100644 keyboards/yncognito/batpad/readme.md create mode 100644 keyboards/yncognito/batpad/rules.mk diff --git a/keyboards/yncognito/batpad/batpad.c b/keyboards/yncognito/batpad/batpad.c new file mode 100644 index 000000000000..d7292533fbb8 --- /dev/null +++ b/keyboards/yncognito/batpad/batpad.c @@ -0,0 +1,35 @@ +/* Copyright 2020 Yncognito + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#include "batpad.h" + + +#ifdef RGB_MATRIX_ENABLE +led_config_t g_led_config ={ + { + {4 ,5 ,6 ,7 }, + {0 ,1 ,2 ,3 } + }, + { + {0,0},{75,0},{145,0},{224,0}, + {0,64},{75,64},{145,64},{224,64} + }, + { + 0x04,0x04,0x04,0x04, + 0x04,0x04,0x04,0x04 + } +}; + +#endif diff --git a/keyboards/yncognito/batpad/batpad.h b/keyboards/yncognito/batpad/batpad.h new file mode 100644 index 000000000000..c7c9c3595bd3 --- /dev/null +++ b/keyboards/yncognito/batpad/batpad.h @@ -0,0 +1,29 @@ +/* Copyright 2020 Yncognito + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License 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_2x4( \ + K00, K01, K02, K03, \ + K10, K11, K12, K13 \ +) { \ + { K00, K01, K02, K03 }, \ + { K10, K11, K12, K13 }, \ +} + +// generated by KBFirmware JSON to QMK Parser +// https://noroadsleft.github.io/kbf_qmk_converter/ diff --git a/keyboards/yncognito/batpad/config.h b/keyboards/yncognito/batpad/config.h new file mode 100644 index 000000000000..31dab82dc5dd --- /dev/null +++ b/keyboards/yncognito/batpad/config.h @@ -0,0 +1,60 @@ +/* +Copyright 2020 Yncognito + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License 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 0x7979 +#define PRODUCT_ID 0x6602 +#define DEVICE_VER 0x0001 +#define MANUFACTURER Yncognito +#define PRODUCT Batpad +#define DESCRIPTION A bat with 8 keys + +/* key matrix size */ +#define MATRIX_ROWS 2 +#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 } +#define MATRIX_COL_PINS { F1, F0, D5, D3 } + +#define DIODE_DIRECTION COL2ROW + +#define RGB_DI_PIN B5 +#define DRIVER_LED_TOTAL 8 +#define RGB_MATRIX_KEYPRESSES +#define RGB_MATRIX_KEYRELEASES +#define RGB_MATRIX_FRAMEBUFFER_EFFECTS +#define RGB_DISABLE_AFTER_TIMEOUT 0 +#define RGB_DISABLE_WHEN_USB_SUSPENDED false +#define RGB_MATRIX_LED_FLUSH_LIMIT 16 +#define RGB_MATRIX_MAXIMUM_BRIGHTNESS 255 +#define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_CYCLE_ALL + + diff --git a/keyboards/yncognito/batpad/info.json b/keyboards/yncognito/batpad/info.json new file mode 100644 index 000000000000..7a0c8173a802 --- /dev/null +++ b/keyboards/yncognito/batpad/info.json @@ -0,0 +1,23 @@ +{ + "keyboard_name": "batpad", + "url": "", + "maintainer": "qmk", + "width": 4, + "height": 2, + "layouts": { + "LAYOUT_ortho_2x4": { + "key_count": 8, + "layout": [ + {"label":"K00 (F4,F1)", "x":0, "y":0}, + {"label":"K01 (F4,F0)", "x":1, "y":0}, + {"label":"K02 (F4,D5)", "x":2, "y":0}, + {"label":"K03 (F4,D3)", "x":3, "y":0}, + {"label":"K10 (C7,F1)", "x":0, "y":1}, + {"label":"K11 (C7,F0)", "x":1, "y":1}, + {"label":"K12 (C7,D5)", "x":2, "y":1}, + {"label":"K13 (C7,D3)", "x":3, "y":1} + ] + } + } + ,"meta": "https://noroadsleft.github.io/kbf_qmk_converter/" +} diff --git a/keyboards/yncognito/batpad/keymaps/default/keymap.c b/keyboards/yncognito/batpad/keymaps/default/keymap.c new file mode 100644 index 000000000000..8b8809c9c606 --- /dev/null +++ b/keyboards/yncognito/batpad/keymaps/default/keymap.c @@ -0,0 +1,34 @@ +/* Copyright 2020 Yncognito + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public 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_2x4( + + KC_Q, KC_W, KC_E, KC_R, + KC_LGUI, KC_SPC, RGB_TOG, RGB_MOD + ), + [1] = LAYOUT_ortho_2x4( + KC_Q, KC_W, KC_E, KC_R, + KC_LGUI, KC_SPC, RGB_TOG, RGB_MOD + ), + [2] = LAYOUT_ortho_2x4( + KC_Q, KC_W, KC_E, KC_R, + KC_LGUI, KC_SPC, RGB_TOG, RGB_MOD + ), + + +}; diff --git a/keyboards/yncognito/batpad/keymaps/default/readme.md b/keyboards/yncognito/batpad/keymaps/default/readme.md new file mode 100644 index 000000000000..ecc5d913a81c --- /dev/null +++ b/keyboards/yncognito/batpad/keymaps/default/readme.md @@ -0,0 +1 @@ +# The default keymap for batpad diff --git a/keyboards/yncognito/batpad/keymaps/via/keymap.c b/keyboards/yncognito/batpad/keymaps/via/keymap.c new file mode 100644 index 000000000000..1d109624efed --- /dev/null +++ b/keyboards/yncognito/batpad/keymaps/via/keymap.c @@ -0,0 +1,36 @@ +/* Copyright 2020 Yncognito + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public 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_2x4( + KC_Q, KC_W, KC_E, KC_R, + KC_LGUI, KC_SPC, RGB_TOG, RGB_MOD + ), + [1] = LAYOUT_ortho_2x4( + KC_Q, KC_W, KC_E, KC_R, + KC_LGUI, KC_SPC, RGB_TOG, RGB_MOD + ), + [2] = LAYOUT_ortho_2x4( + KC_Q, KC_W, KC_E, KC_R, + KC_LGUI, KC_SPC, RGB_TOG, RGB_MOD + ), + [3] = LAYOUT_ortho_2x4( + _______, _______, _______, _______, + _______, _______, _______, _______ + ), + +}; diff --git a/keyboards/yncognito/batpad/keymaps/via/rules.mk b/keyboards/yncognito/batpad/keymaps/via/rules.mk new file mode 100644 index 000000000000..1e5b99807cb7 --- /dev/null +++ b/keyboards/yncognito/batpad/keymaps/via/rules.mk @@ -0,0 +1 @@ +VIA_ENABLE = yes diff --git a/keyboards/yncognito/batpad/readme.md b/keyboards/yncognito/batpad/readme.md new file mode 100644 index 000000000000..356f06024043 --- /dev/null +++ b/keyboards/yncognito/batpad/readme.md @@ -0,0 +1,14 @@ +# Batpad + +![batpad](https://i.imgur.com/CZ3m0jhl.jpg) + +A 8 keys macropad! + +* Keyboard Maintainer: Yncognito +* Hardware Supported: Batpad/Atmega32u4 + +Make example for this keyboard (after setting up your build environment): + + make yncognito/batpad: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/yncognito/batpad/rules.mk b/keyboards/yncognito/batpad/rules.mk new file mode 100644 index 000000000000..dabad7e1e8f6 --- /dev/null +++ b/keyboards/yncognito/batpad/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 = 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 +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 = no # Audio output on port C6 +FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches + +# generated by KBFirmware JSON to QMK Parser +# https://noroadsleft.github.io/kbf_qmk_converter/ From f68abbf6c8668d68e5eab0be9c537fe1ca5fa79f Mon Sep 17 00:00:00 2001 From: QMK Bot Date: Sat, 13 Jun 2020 18:51:08 +0000 Subject: [PATCH 153/930] format code according to conventions [skip ci] --- keyboards/yncognito/batpad/batpad.c | 70 +++++----- keyboards/yncognito/batpad/batpad.h | 58 ++++----- keyboards/yncognito/batpad/config.h | 120 +++++++++--------- keyboards/yncognito/batpad/info.json | 46 +++---- .../yncognito/batpad/keymaps/default/keymap.c | 68 +++++----- .../yncognito/batpad/keymaps/via/keymap.c | 72 +++++------ keyboards/yncognito/batpad/rules.mk | 70 +++++----- 7 files changed, 252 insertions(+), 252 deletions(-) diff --git a/keyboards/yncognito/batpad/batpad.c b/keyboards/yncognito/batpad/batpad.c index d7292533fbb8..caafd5727895 100644 --- a/keyboards/yncognito/batpad/batpad.c +++ b/keyboards/yncognito/batpad/batpad.c @@ -1,35 +1,35 @@ -/* Copyright 2020 Yncognito - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -#include "batpad.h" - - -#ifdef RGB_MATRIX_ENABLE -led_config_t g_led_config ={ - { - {4 ,5 ,6 ,7 }, - {0 ,1 ,2 ,3 } - }, - { - {0,0},{75,0},{145,0},{224,0}, - {0,64},{75,64},{145,64},{224,64} - }, - { - 0x04,0x04,0x04,0x04, - 0x04,0x04,0x04,0x04 - } -}; - -#endif +/* Copyright 2020 Yncognito + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#include "batpad.h" + + +#ifdef RGB_MATRIX_ENABLE +led_config_t g_led_config ={ + { + {4 ,5 ,6 ,7 }, + {0 ,1 ,2 ,3 } + }, + { + {0,0},{75,0},{145,0},{224,0}, + {0,64},{75,64},{145,64},{224,64} + }, + { + 0x04,0x04,0x04,0x04, + 0x04,0x04,0x04,0x04 + } +}; + +#endif diff --git a/keyboards/yncognito/batpad/batpad.h b/keyboards/yncognito/batpad/batpad.h index c7c9c3595bd3..1cc79edf814c 100644 --- a/keyboards/yncognito/batpad/batpad.h +++ b/keyboards/yncognito/batpad/batpad.h @@ -1,29 +1,29 @@ -/* Copyright 2020 Yncognito - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License 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_2x4( \ - K00, K01, K02, K03, \ - K10, K11, K12, K13 \ -) { \ - { K00, K01, K02, K03 }, \ - { K10, K11, K12, K13 }, \ -} - -// generated by KBFirmware JSON to QMK Parser -// https://noroadsleft.github.io/kbf_qmk_converter/ +/* Copyright 2020 Yncognito + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License 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_2x4( \ + K00, K01, K02, K03, \ + K10, K11, K12, K13 \ +) { \ + { K00, K01, K02, K03 }, \ + { K10, K11, K12, K13 }, \ +} + +// generated by KBFirmware JSON to QMK Parser +// https://noroadsleft.github.io/kbf_qmk_converter/ diff --git a/keyboards/yncognito/batpad/config.h b/keyboards/yncognito/batpad/config.h index 31dab82dc5dd..379fc886d77b 100644 --- a/keyboards/yncognito/batpad/config.h +++ b/keyboards/yncognito/batpad/config.h @@ -1,60 +1,60 @@ -/* -Copyright 2020 Yncognito - -This program is free software: you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation, either version 2 of the License, or -(at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License 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 0x7979 -#define PRODUCT_ID 0x6602 -#define DEVICE_VER 0x0001 -#define MANUFACTURER Yncognito -#define PRODUCT Batpad -#define DESCRIPTION A bat with 8 keys - -/* key matrix size */ -#define MATRIX_ROWS 2 -#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 } -#define MATRIX_COL_PINS { F1, F0, D5, D3 } - -#define DIODE_DIRECTION COL2ROW - -#define RGB_DI_PIN B5 -#define DRIVER_LED_TOTAL 8 -#define RGB_MATRIX_KEYPRESSES -#define RGB_MATRIX_KEYRELEASES -#define RGB_MATRIX_FRAMEBUFFER_EFFECTS -#define RGB_DISABLE_AFTER_TIMEOUT 0 -#define RGB_DISABLE_WHEN_USB_SUSPENDED false -#define RGB_MATRIX_LED_FLUSH_LIMIT 16 -#define RGB_MATRIX_MAXIMUM_BRIGHTNESS 255 -#define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_CYCLE_ALL - - +/* +Copyright 2020 Yncognito + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License 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 0x7979 +#define PRODUCT_ID 0x6602 +#define DEVICE_VER 0x0001 +#define MANUFACTURER Yncognito +#define PRODUCT Batpad +#define DESCRIPTION A bat with 8 keys + +/* key matrix size */ +#define MATRIX_ROWS 2 +#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 } +#define MATRIX_COL_PINS { F1, F0, D5, D3 } + +#define DIODE_DIRECTION COL2ROW + +#define RGB_DI_PIN B5 +#define DRIVER_LED_TOTAL 8 +#define RGB_MATRIX_KEYPRESSES +#define RGB_MATRIX_KEYRELEASES +#define RGB_MATRIX_FRAMEBUFFER_EFFECTS +#define RGB_DISABLE_AFTER_TIMEOUT 0 +#define RGB_DISABLE_WHEN_USB_SUSPENDED false +#define RGB_MATRIX_LED_FLUSH_LIMIT 16 +#define RGB_MATRIX_MAXIMUM_BRIGHTNESS 255 +#define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_CYCLE_ALL + + diff --git a/keyboards/yncognito/batpad/info.json b/keyboards/yncognito/batpad/info.json index 7a0c8173a802..2c0fd0d2ebf0 100644 --- a/keyboards/yncognito/batpad/info.json +++ b/keyboards/yncognito/batpad/info.json @@ -1,23 +1,23 @@ -{ - "keyboard_name": "batpad", - "url": "", - "maintainer": "qmk", - "width": 4, - "height": 2, - "layouts": { - "LAYOUT_ortho_2x4": { - "key_count": 8, - "layout": [ - {"label":"K00 (F4,F1)", "x":0, "y":0}, - {"label":"K01 (F4,F0)", "x":1, "y":0}, - {"label":"K02 (F4,D5)", "x":2, "y":0}, - {"label":"K03 (F4,D3)", "x":3, "y":0}, - {"label":"K10 (C7,F1)", "x":0, "y":1}, - {"label":"K11 (C7,F0)", "x":1, "y":1}, - {"label":"K12 (C7,D5)", "x":2, "y":1}, - {"label":"K13 (C7,D3)", "x":3, "y":1} - ] - } - } - ,"meta": "https://noroadsleft.github.io/kbf_qmk_converter/" -} +{ + "keyboard_name": "batpad", + "url": "", + "maintainer": "qmk", + "width": 4, + "height": 2, + "layouts": { + "LAYOUT_ortho_2x4": { + "key_count": 8, + "layout": [ + {"label":"K00 (F4,F1)", "x":0, "y":0}, + {"label":"K01 (F4,F0)", "x":1, "y":0}, + {"label":"K02 (F4,D5)", "x":2, "y":0}, + {"label":"K03 (F4,D3)", "x":3, "y":0}, + {"label":"K10 (C7,F1)", "x":0, "y":1}, + {"label":"K11 (C7,F0)", "x":1, "y":1}, + {"label":"K12 (C7,D5)", "x":2, "y":1}, + {"label":"K13 (C7,D3)", "x":3, "y":1} + ] + } + } + ,"meta": "https://noroadsleft.github.io/kbf_qmk_converter/" +} diff --git a/keyboards/yncognito/batpad/keymaps/default/keymap.c b/keyboards/yncognito/batpad/keymaps/default/keymap.c index 8b8809c9c606..6cf40a182ec9 100644 --- a/keyboards/yncognito/batpad/keymaps/default/keymap.c +++ b/keyboards/yncognito/batpad/keymaps/default/keymap.c @@ -1,34 +1,34 @@ -/* Copyright 2020 Yncognito - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public 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_2x4( - - KC_Q, KC_W, KC_E, KC_R, - KC_LGUI, KC_SPC, RGB_TOG, RGB_MOD - ), - [1] = LAYOUT_ortho_2x4( - KC_Q, KC_W, KC_E, KC_R, - KC_LGUI, KC_SPC, RGB_TOG, RGB_MOD - ), - [2] = LAYOUT_ortho_2x4( - KC_Q, KC_W, KC_E, KC_R, - KC_LGUI, KC_SPC, RGB_TOG, RGB_MOD - ), - - -}; +/* Copyright 2020 Yncognito + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public 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_2x4( + + KC_Q, KC_W, KC_E, KC_R, + KC_LGUI, KC_SPC, RGB_TOG, RGB_MOD + ), + [1] = LAYOUT_ortho_2x4( + KC_Q, KC_W, KC_E, KC_R, + KC_LGUI, KC_SPC, RGB_TOG, RGB_MOD + ), + [2] = LAYOUT_ortho_2x4( + KC_Q, KC_W, KC_E, KC_R, + KC_LGUI, KC_SPC, RGB_TOG, RGB_MOD + ), + + +}; diff --git a/keyboards/yncognito/batpad/keymaps/via/keymap.c b/keyboards/yncognito/batpad/keymaps/via/keymap.c index 1d109624efed..6e02a719349f 100644 --- a/keyboards/yncognito/batpad/keymaps/via/keymap.c +++ b/keyboards/yncognito/batpad/keymaps/via/keymap.c @@ -1,36 +1,36 @@ -/* Copyright 2020 Yncognito - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public 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_2x4( - KC_Q, KC_W, KC_E, KC_R, - KC_LGUI, KC_SPC, RGB_TOG, RGB_MOD - ), - [1] = LAYOUT_ortho_2x4( - KC_Q, KC_W, KC_E, KC_R, - KC_LGUI, KC_SPC, RGB_TOG, RGB_MOD - ), - [2] = LAYOUT_ortho_2x4( - KC_Q, KC_W, KC_E, KC_R, - KC_LGUI, KC_SPC, RGB_TOG, RGB_MOD - ), - [3] = LAYOUT_ortho_2x4( - _______, _______, _______, _______, - _______, _______, _______, _______ - ), - -}; +/* Copyright 2020 Yncognito + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public 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_2x4( + KC_Q, KC_W, KC_E, KC_R, + KC_LGUI, KC_SPC, RGB_TOG, RGB_MOD + ), + [1] = LAYOUT_ortho_2x4( + KC_Q, KC_W, KC_E, KC_R, + KC_LGUI, KC_SPC, RGB_TOG, RGB_MOD + ), + [2] = LAYOUT_ortho_2x4( + KC_Q, KC_W, KC_E, KC_R, + KC_LGUI, KC_SPC, RGB_TOG, RGB_MOD + ), + [3] = LAYOUT_ortho_2x4( + _______, _______, _______, _______, + _______, _______, _______, _______ + ), + +}; diff --git a/keyboards/yncognito/batpad/rules.mk b/keyboards/yncognito/batpad/rules.mk index dabad7e1e8f6..71cf8ef3e9b4 100644 --- a/keyboards/yncognito/batpad/rules.mk +++ b/keyboards/yncognito/batpad/rules.mk @@ -1,35 +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 = 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 -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 = no # Audio output on port C6 -FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches - -# generated by KBFirmware JSON to QMK Parser -# https://noroadsleft.github.io/kbf_qmk_converter/ +# 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 +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 = no # Audio output on port C6 +FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches + +# generated by KBFirmware JSON to QMK Parser +# https://noroadsleft.github.io/kbf_qmk_converter/ From 307013a2f868593784446b55f5c29ef9b6072f5c Mon Sep 17 00:00:00 2001 From: Sid Carter Date: Sat, 13 Jun 2020 15:03:11 -0400 Subject: [PATCH 154/930] [Keymap] Personal keymaps for Prime_E, Corne, Space65 and updates (#9234) * initial draft maps * updates to the keymap to enable LED * does one still have to do these shenanigans? * update keymap with lights * update OLED stuff * update corne config * update singav3 pcb config * update ilpse config and map * update prime keymap as well * update the keymap for prime_e * update tapping term and keymap * switch numbers to the raise layer * move nav to lower * add mousekeys as well * some fixes * update keymap * add my layout for space65 * update map * update keymap * add grave key * update config for my keymap * update keymap * switch to newer mechanisms * grave on capslock * cleanup * udpate config * update keymap * Update keyboards/gray_studio/space65/keymaps/madhatter/rules.mk * Update keyboards/gray_studio/space65/keymaps/madhatter/keymap.c * Update keyboards/crkbd/keymaps/madhatter/rules.mk * Update keyboards/crkbd/keymaps/madhatter/rules.mk * Update keyboards/gray_studio/space65/keymaps/madhatter/keymap.c * Update keyboards/crkbd/keymaps/madhatter/keymap.c * Update keyboards/primekb/prime_e/keymaps/madhatter/config.h * Update keyboards/gray_studio/space65/keymaps/madhatter/config.h * Update keyboards/crkbd/keymaps/madhatter/keymap.c * Update keyboards/wilba_tech/wt75_b/keymaps/madhatter/config.h * Update keyboards/crkbd/keymaps/madhatter/keymap.c * Update keyboards/crkbd/keymaps/madhatter/keymap.c * Update keyboards/gray_studio/space65/keymaps/madhatter/config.h * Update keyboards/primekb/prime_e/keymaps/madhatter/config.h * Update keyboards/wilba_tech/wt75_b/keymaps/madhatter/config.h * Update keyboards/crkbd/keymaps/madhatter/keymap.c * Update keyboards/crkbd/keymaps/madhatter/keymap.c * Update keyboards/primekb/prime_e/keymaps/madhatter/keymap.c * Update keyboards/crkbd/keymaps/madhatter/readme.md * remove file I don't use --- keyboards/crkbd/keymaps/madhatter/config.h | 18 ++ keyboards/crkbd/keymaps/madhatter/keymap.c | 215 ++++++++++++++++++ keyboards/crkbd/keymaps/madhatter/rules.mk | 11 + .../space65/keymaps/madhatter/config.h | 4 + .../space65/keymaps/madhatter/keymap.c | 43 ++++ .../space65/keymaps/madhatter/rules.mk | 5 + .../prime_e/keymaps/madhatter/config.h | 6 + .../prime_e/keymaps/madhatter/keymap.c | 160 +++++++++++++ .../wt75_b/keymaps/madhatter/config.h | 4 + .../wt75_b/keymaps/madhatter/keymap.c | 2 +- 10 files changed, 467 insertions(+), 1 deletion(-) create mode 100644 keyboards/crkbd/keymaps/madhatter/config.h create mode 100644 keyboards/crkbd/keymaps/madhatter/keymap.c create mode 100644 keyboards/crkbd/keymaps/madhatter/rules.mk create mode 100644 keyboards/gray_studio/space65/keymaps/madhatter/config.h create mode 100644 keyboards/gray_studio/space65/keymaps/madhatter/keymap.c create mode 100644 keyboards/gray_studio/space65/keymaps/madhatter/rules.mk create mode 100644 keyboards/primekb/prime_e/keymaps/madhatter/config.h create mode 100644 keyboards/primekb/prime_e/keymaps/madhatter/keymap.c create mode 100644 keyboards/wilba_tech/wt75_b/keymaps/madhatter/config.h diff --git a/keyboards/crkbd/keymaps/madhatter/config.h b/keyboards/crkbd/keymaps/madhatter/config.h new file mode 100644 index 000000000000..9a4d85dfce9c --- /dev/null +++ b/keyboards/crkbd/keymaps/madhatter/config.h @@ -0,0 +1,18 @@ +#pragma once + +#define EE_HANDS + +#define SSD1306OLED + +#ifdef RGBLIGHT_ENABLE +# 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 +#endif + +#undef PRODUCT +#define PRODUCT MadHatter Hacked Corne Keyboard diff --git a/keyboards/crkbd/keymaps/madhatter/keymap.c b/keyboards/crkbd/keymaps/madhatter/keymap.c new file mode 100644 index 000000000000..9f52d3b540d3 --- /dev/null +++ b/keyboards/crkbd/keymaps/madhatter/keymap.c @@ -0,0 +1,215 @@ +#include QMK_KEYBOARD_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); +#endif + +extern uint8_t is_master; + +enum corny_layers { + _QWERTY, + _LOWER, + _RAISE, + _ADJUST, +}; + +enum custom_keycodes { + QWERTY = SAFE_RANGE, + LOWER, + RAISE, + ADJUST, + RGBRST +}; + +#define LY_LWR MO(_LOWER) +#define LY_RSE MO(_RAISE) + +#define KY_CESC LCTL_T(KC_ESC) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_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, + //|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| + KC_LALT, LY_LWR, KC_LCMD, KC_SPC, LY_RSE, KC_ENT + //`--------------------------' `--------------------------' + + ), + + [_LOWER] = LAYOUT( + //,-----------------------------------------------------. ,-----------------------------------------------------. + 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_LCTL, XXXXXXX, KC_LEFT, KC_DOWN, KC_UP,KC_RIGHT, 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_LALT, LY_LWR, KC_LCMD, KC_SPC, LY_RSE, KC_ENT + //`--------------------------' `--------------------------' + ), + + [_RAISE] = 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_LCTL, XXXXXXX, KC_PGUP, KC_HOME, KC_END,KC_PGDN, 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_LALT, LY_LWR, KC_LCMD, KC_SPC, LY_RSE, KC_ENT + //`--------------------------' `--------------------------' + ), + + [_ADJUST] = LAYOUT( + //,-----------------------------------------------------. ,-----------------------------------------------------. + RESET, KC_BTN1, KC_MS_U, KC_BTN2, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + XXXXXXX, KC_MS_L, KC_MS_D, KC_MS_R, XXXXXXX, XXXXXXX, RGB_TOG, RGB_HUI, RGB_SAI, RGB_VAI, XXXXXXX, XXXXXXX, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + XXXXXXX, RGBRST, EEP_RST, AG_TOGG, XXXXXXX, XXXXXXX, RGB_MOD, RGB_HUD, RGB_SAD, RGB_VAD, XXXXXXX, XXXXXXX, + //|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| + KC_LALT, LY_LWR, KC_LCMD, KC_SPC, LY_RSE, KC_ENT + //`--------------------------' `--------------------------' + ) +}; + +layer_state_t layer_state_set_user(layer_state_t state) { + return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST); +} + +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_get_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; + 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; + case ADJUST: + if (record->event.pressed) { + layer_on(_ADJUST); + } else { + layer_off(_ADJUST); + } + return false; + } + return true; +} diff --git a/keyboards/crkbd/keymaps/madhatter/rules.mk b/keyboards/crkbd/keymaps/madhatter/rules.mk new file mode 100644 index 000000000000..dfee5a0bf87a --- /dev/null +++ b/keyboards/crkbd/keymaps/madhatter/rules.mk @@ -0,0 +1,11 @@ +BOOTLOADER = atmel-dfu # Elite-C + +MOUSEKEY_ENABLE = yes +RGBLIGHT_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 diff --git a/keyboards/gray_studio/space65/keymaps/madhatter/config.h b/keyboards/gray_studio/space65/keymaps/madhatter/config.h new file mode 100644 index 000000000000..e297ebedc54c --- /dev/null +++ b/keyboards/gray_studio/space65/keymaps/madhatter/config.h @@ -0,0 +1,4 @@ +#pragma once + +#undef PRODUCT +#define PRODUCT MadHatter\x27s Custom Spacc diff --git a/keyboards/gray_studio/space65/keymaps/madhatter/keymap.c b/keyboards/gray_studio/space65/keymaps/madhatter/keymap.c new file mode 100644 index 000000000000..2fa47f427b3b --- /dev/null +++ b/keyboards/gray_studio/space65/keymaps/madhatter/keymap.c @@ -0,0 +1,43 @@ +/* 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 keyboard_layers { + _QWERTY, + _FNM +}; + +#define FNM MO(_FNM) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +[_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_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_GRV, 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_END, + KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, KC_SPC, KC_SPC, FNM, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT + ), + +[_FNM] = LAYOUT( + 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_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, RESET, 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, + AG_TOGG, 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, KC_TRNS, KC_HOME, KC_PGDN, KC_END + ), + +}; diff --git a/keyboards/gray_studio/space65/keymaps/madhatter/rules.mk b/keyboards/gray_studio/space65/keymaps/madhatter/rules.mk new file mode 100644 index 000000000000..1e9835b3bd66 --- /dev/null +++ b/keyboards/gray_studio/space65/keymaps/madhatter/rules.mk @@ -0,0 +1,5 @@ +EXTRAKEY_ENABLE = yes +CONSOLE_ENABLE = no +COMMAND_ENABLE = no +SLEEP_LED_ENABLE = no +NKRO_ENABLE = yes diff --git a/keyboards/primekb/prime_e/keymaps/madhatter/config.h b/keyboards/primekb/prime_e/keymaps/madhatter/config.h new file mode 100644 index 000000000000..8075bb73d554 --- /dev/null +++ b/keyboards/primekb/prime_e/keymaps/madhatter/config.h @@ -0,0 +1,6 @@ +#pragma once + +#define TAPPING_TERM 150 + +#undef PRODUCT +#define PRODUCT MadHatter\x27s Custom Ilpse diff --git a/keyboards/primekb/prime_e/keymaps/madhatter/keymap.c b/keyboards/primekb/prime_e/keymaps/madhatter/keymap.c new file mode 100644 index 000000000000..7b08d0ecf458 --- /dev/null +++ b/keyboards/primekb/prime_e/keymaps/madhatter/keymap.c @@ -0,0 +1,160 @@ +/* Copyright 2018 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 + +#define BLINK_DURATION 512 +#define CAPS_LED_PIN B1 +#define NUM_LED_PIN B2 +#define SCROLL_LED_PIN B3 + +uint8_t CAPS; +uint16_t BLINK_TIMER = 0; +uint8_t CAPS_LED_STATE = 0; + +// Init togg_indicator so the compiler doesn't complain when I declare it last. +static void togg_indicator(uint8_t *state, uint8_t pin); + +enum ilpse_layers { + _QWERTY, + _LOWER, + _RAISE, + _ADJUST +}; + +enum skank_keycodes { + QWERTY = SAFE_RANGE, + LOWER, + RAISE, + ADJUST +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_QWERTY] = LAYOUT( + KC_GESC, 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_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_B, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, + KC_LCTL, KC_LALT, LOWER, KC_LCMD, LT(_RAISE, KC_SPC), KC_LALT, KC_RGUI, KC_RCTL + ), + + [_LOWER] = 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_DEL, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 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_LBRC, KC_RBRC, KC_BSLS, KC_TRNS, + KC_TRNS, KC_TRNS, LOWER, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ), + + [_RAISE] = LAYOUT( + 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_MINS, KC_EQL, KC_LCBR, KC_RCBR, KC_PIPE, KC_GRV, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_UNDS, KC_PLUS, KC_LBRC, KC_RBRC, KC_BSLS, KC_TILD, + KC_TRNS, KC_TRNS, LOWER, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ), + + [_ADJUST] = 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_CAPS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + AG_TOGG, KC_TRNS, LOWER, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ) +}; + +void matrix_init_user(void) { + // set CapsLock LED to output and low + setPinOutput(CAPS_LED_PIN); + writePinLow(CAPS_LED_PIN); + // set NumLock LED to output and low + setPinOutput(NUM_LED_PIN); + writePinLow(NUM_LED_PIN); + // set ScrollLock LED to output and low + setPinOutput(SCROLL_LED_PIN); + writePinLow(SCROLL_LED_PIN); +} + +void matrix_scan_user(void) { + if (CAPS == 1) { + // Blink the first led when capslock is active + if (BLINK_TIMER >= BLINK_DURATION) { + togg_indicator(&CAPS_LED_STATE, CAPS_LED_PIN); + BLINK_TIMER = 0; + } + BLINK_TIMER++; + } +} + +//function for layer indicator LED +layer_state_t layer_state_set_user(layer_state_t state) { + if (layer_state_cmp(state, 1)) { + writePinHigh(CAPS_LED_PIN); + } else { + writePinLow(CAPS_LED_PIN); + } + if (layer_state_cmp(state, 2)) { + writePinHigh(NUM_LED_PIN); + } else { + writePinLow(NUM_LED_PIN); + } + if (layer_state_cmp(state, 3)) { + writePinHigh(SCROLL_LED_PIN); + } else { + writePinLow(SCROLL_LED_PIN); + } + return state; +} + +void led_set_user(uint8_t usb_led) { + CAPS = IS_LED_ON(usb_led, USB_LED_CAPS_LOCK); +} + +void togg_indicator(uint8_t *state, uint8_t pin) { + // Toggles a pin based on the current state + if (*state == 0){ + *state = 1; + writePinHigh(pin); + } + else if (*state == 1){ + *state = 0; + writePinLow(pin); + } +} + +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 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; + } + return true; +} diff --git a/keyboards/wilba_tech/wt75_b/keymaps/madhatter/config.h b/keyboards/wilba_tech/wt75_b/keymaps/madhatter/config.h new file mode 100644 index 000000000000..afb1d86d6c68 --- /dev/null +++ b/keyboards/wilba_tech/wt75_b/keymaps/madhatter/config.h @@ -0,0 +1,4 @@ +#pragma once + +#undef PRODUCT +#define PRODUCT MadHatter\x27s Custom Singa V3 diff --git a/keyboards/wilba_tech/wt75_b/keymaps/madhatter/keymap.c b/keyboards/wilba_tech/wt75_b/keymaps/madhatter/keymap.c index b2fe74df7bb7..8b650dee3543 100644 --- a/keyboards/wilba_tech/wt75_b/keymaps/madhatter/keymap.c +++ b/keyboards/wilba_tech/wt75_b/keymaps/madhatter/keymap.c @@ -1,6 +1,6 @@ #include QMK_KEYBOARD_H -enum my_layers { +enum singav3_layers { _QWERTY, _FNMS }; From ba7f52aaeba878544973952ca3fcce27ab4bb92d Mon Sep 17 00:00:00 2001 From: cole smith <38364556+daysgobye@users.noreply.github.com> Date: Sat, 13 Jun 2020 12:08:54 -0700 Subject: [PATCH 155/930] Boardsource 3x4 info json fix (#9266) * added bordsource 3x4 macro pad * added bordsource 3x4 macro pad * Update keyboards/boardsource/3x4/3x4.h * Update keyboards/boardsource/3x4/3x4.c * Update keyboards/boardsource/3x4/config.h * Update keyboards/boardsource/3x4/config.h * Update keyboards/boardsource/3x4/config.h * Update keyboards/boardsource/3x4/config.h * added link to readme * Update keyboards/boardsource/3x4/keymaps/default/keymap.c * Apply suggestions from code review * changed the layout to refelect the keyboard * Update keyboards/boardsource/3x4/info.json Oh your right my bad. In the future is there an easier way for me to test the info.json and the confiscator before doing my pr? * Apply suggestions from code review * got 3x4 building again * Apply suggestions from code review * applied requested change on readme * Update keyboards/boardsource/3x4/readme.md * Apply suggestions from code review --- keyboards/boardsource/3x4/info.json | 21 ++++++++++--------- .../boardsource/3x4/keymaps/default/keymap.c | 9 ++++---- keyboards/boardsource/3x4/readme.md | 3 ++- 3 files changed, 18 insertions(+), 15 deletions(-) diff --git a/keyboards/boardsource/3x4/info.json b/keyboards/boardsource/3x4/info.json index 4ef02873e3ff..ea7a981032b6 100644 --- a/keyboards/boardsource/3x4/info.json +++ b/keyboards/boardsource/3x4/info.json @@ -5,23 +5,24 @@ "width": 4, "height": 3, "layouts": { + "LAYOUT": { + "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": "K04", "x": 0, "y": 1 }, - { "label": "K05", "x": 1, "y": 1 }, - { "label": "K06", "x": 2, "y": 1 }, - - { "label": "K07", "x": 0, "y": 2 }, - { "label": "K08", "x": 1, "y": 2 }, - { "label": "K09", "x": 2, "y": 2 }, + { "label": "K05", "x": 0, "y": 1 }, + { "label": "K06", "x": 1, "y": 1 }, + { "label": "K07", "x": 2, "y": 1 }, + { "label": "K08", "x": 3, "y": 1 }, - { "label": "K10", "x": 0, "y": 3 }, - { "label": "K11", "x": 1, "y": 3 }, - { "label": "K12", "x": 2, "y": 3 } + { "label": "K09", "x": 0, "y": 2 }, + { "label": "K10", "x": 1, "y": 2 }, + { "label": "K11", "x": 2, "y": 2 }, + { "label": "K12", "x": 3, "y": 2 } ] } } diff --git a/keyboards/boardsource/3x4/keymaps/default/keymap.c b/keyboards/boardsource/3x4/keymaps/default/keymap.c index 3add4f7fbf18..67133735fa1f 100644 --- a/keyboards/boardsource/3x4/keymaps/default/keymap.c +++ b/keyboards/boardsource/3x4/keymaps/default/keymap.c @@ -1,9 +1,10 @@ - #include QMK_KEYBOARD_H -#define _MAIN 0 -#define _RAISE 1 -#define _LOWER 2 +enum layers { + _MAIN, + _RAISE, + _LOWER, +}; // Readability keycodes #define LOWER MO(_LOWER) diff --git a/keyboards/boardsource/3x4/readme.md b/keyboards/boardsource/3x4/readme.md index 67a22ed4c0bf..9d7ef895c6dc 100644 --- a/keyboards/boardsource/3x4/readme.md +++ b/keyboards/boardsource/3x4/readme.md @@ -1,5 +1,6 @@ # 3x4 -![Boardsource 3x4 macro](https://i.imgur.com/EiPF1hh.jpg) + +![Boardsource 3x4 macro](https://i.imgur.com/EiPF1hhl.jpg) this macro pad / small 12 key was inspired by the plaid look From 622e94c6cdf6a307ee87b6add974def647979f15 Mon Sep 17 00:00:00 2001 From: George Mao Date: Sat, 13 Jun 2020 23:39:57 -0700 Subject: [PATCH 156/930] [Keyboard] Add S7 Elephant Rev2 Support (#9398) * Add S7 Elephant Rev2 Support * Apply suggestions from code review I tested the changes on my board as well, thanks for the suggestions! * Added a default folder in the makefile so that this would no longer be a breaking change --- keyboards/s7_elephant/readme.md | 11 +- keyboards/s7_elephant/{ => rev1}/config.h | 14 +- keyboards/s7_elephant/{ => rev1}/info.json | 0 .../{ => rev1}/keymaps/default/config.h | 0 .../{ => rev1}/keymaps/default/keymap.c | 0 .../{ => rev1}/keymaps/default/readme.md | 0 keyboards/s7_elephant/rev1/readme.md | 17 ++ keyboards/s7_elephant/rev1/rev1.c | 1 + .../{s7_elephant.h => rev1/rev1.h} | 4 +- keyboards/s7_elephant/rev1/rules.mk | 25 +++ keyboards/s7_elephant/rev2/config.h | 83 +++++++++ keyboards/s7_elephant/rev2/info.json | 167 ++++++++++++++++++ .../s7_elephant/rev2/keymaps/default/keymap.c | 65 +++++++ .../rev2/keymaps/default/readme.md | 35 ++++ .../s7_elephant/rev2/keymaps/via/keymap.c | 92 ++++++++++ .../s7_elephant/rev2/keymaps/via/readme.md | 35 ++++ .../s7_elephant/rev2/keymaps/via/rules.mk | 1 + keyboards/s7_elephant/rev2/readme.md | 17 ++ keyboards/s7_elephant/rev2/rev2.c | 19 ++ keyboards/s7_elephant/rev2/rev2.h | 61 +++++++ keyboards/s7_elephant/rev2/rules.mk | 33 ++++ keyboards/s7_elephant/rules.mk | 26 +-- keyboards/s7_elephant/s7_elephant.c | 1 - 23 files changed, 670 insertions(+), 37 deletions(-) rename keyboards/s7_elephant/{ => rev1}/config.h (79%) rename keyboards/s7_elephant/{ => rev1}/info.json (100%) rename keyboards/s7_elephant/{ => rev1}/keymaps/default/config.h (100%) rename keyboards/s7_elephant/{ => rev1}/keymaps/default/keymap.c (100%) rename keyboards/s7_elephant/{ => rev1}/keymaps/default/readme.md (100%) create mode 100644 keyboards/s7_elephant/rev1/readme.md create mode 100644 keyboards/s7_elephant/rev1/rev1.c rename keyboards/s7_elephant/{s7_elephant.h => rev1/rev1.h} (99%) create mode 100644 keyboards/s7_elephant/rev1/rules.mk create mode 100644 keyboards/s7_elephant/rev2/config.h create mode 100644 keyboards/s7_elephant/rev2/info.json create mode 100644 keyboards/s7_elephant/rev2/keymaps/default/keymap.c create mode 100644 keyboards/s7_elephant/rev2/keymaps/default/readme.md create mode 100644 keyboards/s7_elephant/rev2/keymaps/via/keymap.c create mode 100644 keyboards/s7_elephant/rev2/keymaps/via/readme.md create mode 100644 keyboards/s7_elephant/rev2/keymaps/via/rules.mk create mode 100644 keyboards/s7_elephant/rev2/readme.md create mode 100644 keyboards/s7_elephant/rev2/rev2.c create mode 100644 keyboards/s7_elephant/rev2/rev2.h create mode 100644 keyboards/s7_elephant/rev2/rules.mk delete mode 100644 keyboards/s7_elephant/s7_elephant.c diff --git a/keyboards/s7_elephant/readme.md b/keyboards/s7_elephant/readme.md index 466e3f7316de..76838be218a8 100644 --- a/keyboards/s7_elephant/readme.md +++ b/keyboards/s7_elephant/readme.md @@ -4,13 +4,16 @@ A high-end 70% custom keyboard designed and produced by [jacky](https://geekhack.org/index.php?action=profile;u=63864) from Geekhack. -Keyboard Maintainer: QMK Community -Hardware Supported: S7 Elephant -Hardware Availability: [The GB has ended with little chance to run again.](https://geekhack.org/index.php?topic=96434.0) +**Firmware files are SPECIFIC to each revision. Firmware files from rev1 will not work on rev2 and vice versa.** Please use the `.hex` appropriate for your board. + +* Keyboard Maintainer: QMK Community +* Hardware Supported: S7 Elephant rev1, rev2 +* Hardware Availability: [The GB has had 2 rounds with little chance to run again.](https://geekhack.org/index.php?topic=96434.0) Make example for this keyboard (after setting up your build environment): - make s7_elephant:default:dfu + make s7_elephant/rev1:default # 2018 run + make s7_elephant/rev2:default # 2019 run To enter the bootloader, either short the pins on the PCB or the RESET button on the FN layer. diff --git a/keyboards/s7_elephant/config.h b/keyboards/s7_elephant/rev1/config.h similarity index 79% rename from keyboards/s7_elephant/config.h rename to keyboards/s7_elephant/rev1/config.h index c4f57178d83f..d2770d117b60 100644 --- a/keyboards/s7_elephant/config.h +++ b/keyboards/s7_elephant/rev1/config.h @@ -3,7 +3,7 @@ #include "config_common.h" /* USB Device descriptor parameter */ -#define VENDOR_ID 0xFEED +#define VENDOR_ID 0xA13B // Hexidecimal A13B will be Jacky's vendor ID #define PRODUCT_ID 0x0007 #define DEVICE_VER 0x0001 #define MANUFACTURER jacky @@ -22,9 +22,6 @@ /* 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 @@ -40,3 +37,12 @@ #define RGBLIGHT_VAL_STEP 8 #define RGBLIGHT_SLEEP #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 diff --git a/keyboards/s7_elephant/info.json b/keyboards/s7_elephant/rev1/info.json similarity index 100% rename from keyboards/s7_elephant/info.json rename to keyboards/s7_elephant/rev1/info.json diff --git a/keyboards/s7_elephant/keymaps/default/config.h b/keyboards/s7_elephant/rev1/keymaps/default/config.h similarity index 100% rename from keyboards/s7_elephant/keymaps/default/config.h rename to keyboards/s7_elephant/rev1/keymaps/default/config.h diff --git a/keyboards/s7_elephant/keymaps/default/keymap.c b/keyboards/s7_elephant/rev1/keymaps/default/keymap.c similarity index 100% rename from keyboards/s7_elephant/keymaps/default/keymap.c rename to keyboards/s7_elephant/rev1/keymaps/default/keymap.c diff --git a/keyboards/s7_elephant/keymaps/default/readme.md b/keyboards/s7_elephant/rev1/keymaps/default/readme.md similarity index 100% rename from keyboards/s7_elephant/keymaps/default/readme.md rename to keyboards/s7_elephant/rev1/keymaps/default/readme.md diff --git a/keyboards/s7_elephant/rev1/readme.md b/keyboards/s7_elephant/rev1/readme.md new file mode 100644 index 000000000000..702be4c3a786 --- /dev/null +++ b/keyboards/s7_elephant/rev1/readme.md @@ -0,0 +1,17 @@ +# S7 Elephant + +![S7 Elephant](https://i.imgur.com/CaHxKBJ.jpg) + +A high-end 70% custom keyboard designed and produced by [jacky](https://geekhack.org/index.php?action=profile;u=63864) from Geekhack. + +* Keyboard Maintainer: QMK Community +* Hardware Supported: S7 Elephant +* Hardware Availability: [The GB has ended with little chance to run again.](https://geekhack.org/index.php?topic=96434.0) + +Make example for this keyboard (after setting up your build environment): + + make s7_elephant/rev1:default + +To enter the bootloader, either short the pins on the PCB or the RESET button on the FN layer. + +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/s7_elephant/rev1/rev1.c b/keyboards/s7_elephant/rev1/rev1.c new file mode 100644 index 000000000000..520a869e57ba --- /dev/null +++ b/keyboards/s7_elephant/rev1/rev1.c @@ -0,0 +1 @@ +#include "rev1.h" diff --git a/keyboards/s7_elephant/s7_elephant.h b/keyboards/s7_elephant/rev1/rev1.h similarity index 99% rename from keyboards/s7_elephant/s7_elephant.h rename to keyboards/s7_elephant/rev1/rev1.h index c351ffdb91bb..958ba0fae0af 100644 --- a/keyboards/s7_elephant/s7_elephant.h +++ b/keyboards/s7_elephant/rev1/rev1.h @@ -1,5 +1,4 @@ -#ifndef S7_ELEPHANT_H -#define S7_ELEPHANT_H +#pragma once #include "quantum.h" @@ -852,4 +851,3 @@ K400, K401, K402, K403, K407, K410, K4 { K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, K314, K315 }, \ { K400, K401, K402, K403, ____, ____, ____, K407, ____, ____, K410, ____, ____, K413, K414, K415 } \ } -#endif diff --git a/keyboards/s7_elephant/rev1/rules.mk b/keyboards/s7_elephant/rev1/rules.mk new file mode 100644 index 000000000000..91fe85c3dfb1 --- /dev/null +++ b/keyboards/s7_elephant/rev1/rules.mk @@ -0,0 +1,25 @@ +# 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 = 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 +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = yes # Enable keyboard underlight functionality diff --git a/keyboards/s7_elephant/rev2/config.h b/keyboards/s7_elephant/rev2/config.h new file mode 100644 index 000000000000..5c5b526aa7cf --- /dev/null +++ b/keyboards/s7_elephant/rev2/config.h @@ -0,0 +1,83 @@ +/* +Copyright 2020 MudkipMao + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License 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 0xA13B // Hexidecimal A13B will be Jacky's vendor ID +#define PRODUCT_ID 0x0008 // 8 for S7++ +#define DEVICE_VER 0x0002 +#define MANUFACTURER Jacky +#define PRODUCT Jacky S7 Elephant Rev 2 +#define DESCRIPTION A high-end 70% custom keyboard + +/* Don't remove this without also removing LTO_ENABLE=yes in rules.mk */ +#define NO_ACTION_MACRO +#define NO_ACTION_FUNCTION + +/* key matrix size */ +#define MATRIX_ROWS 5 +#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) + * + * + * 0 1 2 3 4 5 6 7 8 9 A B C D E F */ +#define MATRIX_ROW_PINS { B0, B1, B2, B3, B7 } +#define MATRIX_COL_PINS { D0, D1, D2, D3, D5, D4, D6, D7, B4, F7, F6, F5, F4, F1, F0, E6 } + +/* Setting the matrix value of top left key for bootmagic lite */ +#define BOOTMAGIC_LITE_ROW 0 +#define BOOTMAGIC_LITE_COLUMN 15 + +#define DIODE_DIRECTION ROW2COL + +#define BACKLIGHT_PIN B6 +// #define BACKLIGHT_BREATHING +#define BACKLIGHT_LEVELS 15 + +#define RGB_DI_PIN E2 +#ifdef RGB_DI_PIN +#define RGBLIGHT_ANIMATIONS +#define RGBLED_NUM 2 +#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 */ +#endif // RGB_DI_PIN + +/* 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 + +// generated by KBFirmware JSON to QMK Parser +// https://noroadsleft.github.io/kbf_qmk_converter/ diff --git a/keyboards/s7_elephant/rev2/info.json b/keyboards/s7_elephant/rev2/info.json new file mode 100644 index 000000000000..5c811cd47df8 --- /dev/null +++ b/keyboards/s7_elephant/rev2/info.json @@ -0,0 +1,167 @@ +{ + "keyboard_name": "S7 Elephant Rev2", + "url": "https://geekhack.org/index.php?topic=103148.0", + "maintainer": "qmk", + "width": 17.25, + "height": 5, + "layouts": { + "LAYOUT_all": { + "key_count": 75, + "layout": [ + {"label":"K0F (B0,E6)", "x":0, "y":0}, + {"label":"K00 (B0,D0)", "x":1.25, "y":0}, + {"label":"K01 (B0,D1)", "x":2.25, "y":0}, + {"label":"K02 (B0,D2)", "x":3.25, "y":0}, + {"label":"K03 (B0,D3)", "x":4.25, "y":0}, + {"label":"K04 (B0,D5)", "x":5.25, "y":0}, + {"label":"K05 (B0,D4)", "x":6.25, "y":0}, + {"label":"K06 (B0,D6)", "x":7.25, "y":0}, + {"label":"K07 (B0,D7)", "x":8.25, "y":0}, + {"label":"K08 (B0,B4)", "x":9.25, "y":0}, + {"label":"K09 (B0,F7)", "x":10.25, "y":0}, + {"label":"K0A (B0,F6)", "x":11.25, "y":0}, + {"label":"K0B (B0,F5)", "x":12.25, "y":0}, + {"label":"K0C (B0,F4)", "x":13.25, "y":0}, + {"label":"K0D (B0,F1)", "x":14.25, "y":0}, + {"label":"K0E (B0,F0)", "x":15.25, "y":0}, + {"label":"K4E (B7,F0)", "x":16.25, "y":0}, + {"label":"K1F (B1,E6)", "x":0, "y":1}, + {"label":"K10 (B1,D0)", "x":1.25, "y":1, "w":1.5}, + {"label":"K11 (B1,D1)", "x":2.75, "y":1}, + {"label":"K12 (B1,D2)", "x":3.75, "y":1}, + {"label":"K13 (B1,D3)", "x":4.75, "y":1}, + {"label":"K14 (B1,D5)", "x":5.75, "y":1}, + {"label":"K15 (B1,D4)", "x":6.75, "y":1}, + {"label":"K16 (B1,D6)", "x":7.75, "y":1}, + {"label":"K17 (B1,D7)", "x":8.75, "y":1}, + {"label":"K18 (B1,B4)", "x":9.75, "y":1}, + {"label":"K19 (B1,F7)", "x":10.75, "y":1}, + {"label":"K1A (B1,F6)", "x":11.75, "y":1}, + {"label":"K1B (B1,F5)", "x":12.75, "y":1}, + {"label":"K1C (B1,F4)", "x":13.75, "y":1}, + {"label":"K2C (B2,F4)", "x":14.75, "y":1, "w":1.5}, + {"label":"K1E (B1,F0)", "x":16.25, "y":1}, + {"label":"K2F (B2,E6)", "x":0, "y":2}, + {"label":"K20 (B2,D0)", "x":1.25, "y":2, "w":1.75}, + {"label":"K21 (B2,D1)", "x":3, "y":2}, + {"label":"K22 (B2,D2)", "x":4, "y":2}, + {"label":"K23 (B2,D3)", "x":5, "y":2}, + {"label":"K24 (B2,D5)", "x":6, "y":2}, + {"label":"K25 (B2,D4)", "x":7, "y":2}, + {"label":"K26 (B2,D6)", "x":8, "y":2}, + {"label":"K27 (B2,D7)", "x":9, "y":2}, + {"label":"K28 (B2,B4)", "x":10, "y":2}, + {"label":"K29 (B2,F7)", "x":11, "y":2}, + {"label":"K2A (B2,F6)", "x":12, "y":2}, + {"label":"K2B (B2,F5)", "x":13, "y":2}, + {"label":"K1D (B1,F1)", "x":14, "y":2, "w":2.25}, + {"label":"K2E (B2,F0)", "x":16.25, "y":2}, + {"label":"K3F (B3,E6)", "x":0, "y":3}, + {"label":"K30 (B3,D0)", "x":1.25, "y":3, "w":1.25}, + {"label":"K31 (B3,D1)", "x":2.5, "y":3}, + {"label":"K32 (B3,D2)", "x":3.5, "y":3}, + {"label":"K33 (B3,D3)", "x":4.5, "y":3}, + {"label":"K34 (B3,D5)", "x":5.5, "y":3}, + {"label":"K35 (B3,D4)", "x":6.5, "y":3}, + {"label":"K36 (B3,D6)", "x":7.5, "y":3}, + {"label":"K37 (B3,D7)", "x":8.5, "y":3}, + {"label":"K38 (B3,B4)", "x":9.5, "y":3}, + {"label":"K39 (B3,F7)", "x":10.5, "y":3}, + {"label":"K3A (B3,F6)", "x":11.5, "y":3}, + {"label":"K3B (B3,F5)", "x":12.5, "y":3}, + {"label":"K3C (B3,F4)", "x":13.5, "y":3, "w":1.75}, + {"label":"K3D (B3,F1)", "x":15.25, "y":3}, + {"label":"K3E (B3,F0)", "x":16.25, "y":3}, + {"label":"K4F (B7,E6)", "x":0, "y":4}, + {"label":"K40 (B7,D0)", "x":1.25, "y":4, "w":1.25}, + {"label":"K41 (B7,D1)", "x":2.5, "y":4, "w":1.25}, + {"label":"K42 (B7,D2)", "x":3.75, "y":4, "w":1.25}, + {"label":"K46 (B7,D6)", "x":5, "y":4, "w":6.25}, + {"label":"K48 (B7,B4)", "x":11.25, "y":4}, + {"label":"K49 (B7,F7)", "x":12.25, "y":4}, + {"label":"K4A (B7,F6)", "x":13.25, "y":4}, + {"label":"K4B (B7,F5)", "x":14.25, "y":4}, + {"label":"K4C (B7,F4)", "x":15.25, "y":4}, + {"label":"K4D (B7,F1)", "x":16.25, "y":4} + ] + }, + "LAYOUT_ansi_1u": { + "key_count": 73, + "layout": [ + {"label":"K0F", "x":0, "y":0}, + {"label":"K00", "x":1.25, "y":0}, + {"label":"K01", "x":2.25, "y":0}, + {"label":"K02", "x":3.25, "y":0}, + {"label":"K03", "x":4.25, "y":0}, + {"label":"K04", "x":5.25, "y":0}, + {"label":"K05", "x":6.25, "y":0}, + {"label":"K06", "x":7.25, "y":0}, + {"label":"K07", "x":8.25, "y":0}, + {"label":"K08", "x":9.25, "y":0}, + {"label":"K09", "x":10.25, "y":0}, + {"label":"K0A", "x":11.25, "y":0}, + {"label":"K0B", "x":12.25, "y":0}, + {"label":"K0C", "x":13.25, "y":0}, + {"label":"K0E", "x":14.25, "y":0, "w":2}, + {"label":"K4E", "x":16.25, "y":0}, + {"label":"K1F", "x":0, "y":1}, + {"label":"K10", "x":1.25, "y":1, "w":1.5}, + {"label":"K11", "x":2.75, "y":1}, + {"label":"K12", "x":3.75, "y":1}, + {"label":"K13", "x":4.75, "y":1}, + {"label":"K14", "x":5.75, "y":1}, + {"label":"K15", "x":6.75, "y":1}, + {"label":"K16", "x":7.75, "y":1}, + {"label":"K17", "x":8.75, "y":1}, + {"label":"K18", "x":9.75, "y":1}, + {"label":"K19", "x":10.75, "y":1}, + {"label":"K1A", "x":11.75, "y":1}, + {"label":"K1B", "x":12.75, "y":1}, + {"label":"K1C", "x":13.75, "y":1}, + {"label":"K2C", "x":14.75, "y":1, "w":1.5}, + {"label":"K1E", "x":16.25, "y":1}, + {"label":"K2F", "x":0, "y":2}, + {"label":"K20", "x":1.25, "y":2, "w":1.75}, + {"label":"K21", "x":3, "y":2}, + {"label":"K22", "x":4, "y":2}, + {"label":"K23", "x":5, "y":2}, + {"label":"K24", "x":6, "y":2}, + {"label":"K25", "x":7, "y":2}, + {"label":"K26", "x":8, "y":2}, + {"label":"K27", "x":9, "y":2}, + {"label":"K28", "x":10, "y":2}, + {"label":"K29", "x":11, "y":2}, + {"label":"K2A", "x":12, "y":2}, + {"label":"K2B", "x":13, "y":2}, + {"label":"K1D", "x":14, "y":2, "w":2.25}, + {"label":"K2E", "x":16.25, "y":2}, + {"label":"K3F", "x":0, "y":3}, + {"label":"K30", "x":1.25, "y":3, "w":2.25}, + {"label":"K32", "x":3.5, "y":3}, + {"label":"K33", "x":4.5, "y":3}, + {"label":"K34", "x":5.5, "y":3}, + {"label":"K35", "x":6.5, "y":3}, + {"label":"K36", "x":7.5, "y":3}, + {"label":"K37", "x":8.5, "y":3}, + {"label":"K38", "x":9.5, "y":3}, + {"label":"K39", "x":10.5, "y":3}, + {"label":"K3A", "x":11.5, "y":3}, + {"label":"K3B", "x":12.5, "y":3}, + {"label":"K3C", "x":13.5, "y":3, "w":1.75}, + {"label":"K3D", "x":15.25, "y":3}, + {"label":"K3E", "x":16.25, "y":3}, + {"label":"K4F", "x":0, "y":4}, + {"label":"K40", "x":1.25, "y":4, "w":1.25}, + {"label":"K41", "x":2.5, "y":4, "w":1.25}, + {"label":"K42", "x":3.75, "y":4, "w":1.25}, + {"label":"K46", "x":5, "y":4, "w":6.25}, + {"label":"K48", "x":11.25, "y":4}, + {"label":"K49", "x":12.25, "y":4}, + {"label":"K4A", "x":13.25, "y":4}, + {"label":"K4B", "x":14.25, "y":4}, + {"label":"K4C", "x":15.25, "y":4}, + {"label":"K4D", "x":16.25, "y":4} + ] + } + } +} diff --git a/keyboards/s7_elephant/rev2/keymaps/default/keymap.c b/keyboards/s7_elephant/rev2/keymaps/default/keymap.c new file mode 100644 index 000000000000..b1fbd3830d63 --- /dev/null +++ b/keyboards/s7_elephant/rev2/keymaps/default/keymap.c @@ -0,0 +1,65 @@ +#include QMK_KEYBOARD_H + +enum custom_layers { + _QWERTY, + _FN +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +/* Qwerty + * ,------. ,-------------------------------------------------------------------------------------------------. + * | F1 | | Esc`~ | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | Bkspc | Ins | + * |------| |-------------------------------------------------------------------------------------------------| + * | F2 | | Tab | Q | W | E | R | T | Y | U | I | O | P | [ | ] | \ | Del | + * |------| |-------------------------------------------------------------------------------------------------| + * | F3 | | Caps | A | S | D | F | G | H | J | K | L | ; | ' | Enter | Home| + * |------| |-------------------------------------------------------------------------------------------------| + * | F4 | | Shift | Z | X | C | V | B | N | M | , | . | / | RShift | U | End | + * |------| |-------------------------------------------------------------------------------------------------| + * | F5 | | Ctrl | Gui | Alt | Space | RAlt | FN | RCtrl | L | D | R | + * `------' `-------------------------------------------------------------------------------------------------' + */ + + [_QWERTY] = LAYOUT_ansi_1u( + 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_INS, + KC_F2, KC_TAB, KC_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_F3, 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_F4, 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_F5, KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(_FN), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT + ), + +/* FN + * ,------. ,-------------------------------------------------------------------------------------------------. + * |Reset | | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | PScr | ScrLck |Pause| + * |------| |-------------------------------------------------------------------------------------------------| + * | | | | | | | | | | | | | | | | | | + * |------| |-------------------------------------------------------------------------------------------------| + * | | | |Prev |Play |Next | | | | |VolD |Mute |VolU | | |PgUp | + * |------| |-------------------------------------------------------------------------------------------------| + * | | | | | | | | | | | | | | | |PgDn | + * |------| |-------------------------------------------------------------------------------------------------| + * |EEPRST| | | | | | | | | | | | + * `------' `-------------------------------------------------------------------------------------------------' + */ + + [_FN] = LAYOUT_ansi_1u( + 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_PSCR, KC_SLCK, KC_PAUS, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, KC_MPRV, KC_MPLY, KC_MNXT, _______, _______, _______, _______, KC_VOLD, KC_MUTE, KC_VOLU, _______, _______, KC_PGUP, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_PGDN, + EEP_RST, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), +}; + +bool led_update_user(led_t led_state) { + // Turn LEDs On/Off for Caps Lock + if (led_state.caps_lock) { + rgblight_enable_noeeprom(); + rgblight_sethsv_noeeprom(0, 0, 80); + } else { + rgblight_sethsv_noeeprom(0, 0, 80); + rgblight_disable_noeeprom(); + } + return false; +} diff --git a/keyboards/s7_elephant/rev2/keymaps/default/readme.md b/keyboards/s7_elephant/rev2/keymaps/default/readme.md new file mode 100644 index 000000000000..c4fe30acdd58 --- /dev/null +++ b/keyboards/s7_elephant/rev2/keymaps/default/readme.md @@ -0,0 +1,35 @@ +# Default keymap for S7 Elephant + +**Features** + +* LEDs are functioning as Caps-Lock indicators + +## QWERTY (Normal) Layer +``` +,------. ,-------------------------------------------------------------------------------------------------. +| F1 | | Esc`~ | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | Bkspc |Home | +|------| |-------------------------------------------------------------------------------------------------| +| F2 | | Tab | Q | W | E | R | T | Y | U | I | O | P | [ | ] | \ | End | +|------| |-------------------------------------------------------------------------------------------------| +| F3 | | Caps | A | S | D | F | G | H | J | K | L | ; | ' | Enter | Ins | +|------| |-------------------------------------------------------------------------------------------------| +| F4 | | Shift | Z | X | C | V | B | N | M | , | . | / | RShift | U | Del | +|------| |-------------------------------------------------------------------------------------------------| +| F5 | | Ctrl | Gui | Alt | Space | FN | RAlt | RCtrl | L | D | R | +`------' `-------------------------------------------------------------------------------------------------' +``` + +## FN Layer +``` +,------. ,-------------------------------------------------------------------------------------------------. +|Reset | | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | PScr | ScrLck |Pause| +|------| |-------------------------------------------------------------------------------------------------| +| | | | | | | | | | | | | | | | | | +|------| |-------------------------------------------------------------------------------------------------| +| | | |Prev |Play |Next | | | | |VolD |Mute |VolU | | |PgUp | +|------| |-------------------------------------------------------------------------------------------------| +| | | | | | | | | | | | | | | |PgDn | +|------| |-------------------------------------------------------------------------------------------------| +|EPRM | | | | | | | | | | | | +`------' `-------------------------------------------------------------------------------------------------' +``` diff --git a/keyboards/s7_elephant/rev2/keymaps/via/keymap.c b/keyboards/s7_elephant/rev2/keymaps/via/keymap.c new file mode 100644 index 000000000000..b81777b12ad7 --- /dev/null +++ b/keyboards/s7_elephant/rev2/keymaps/via/keymap.c @@ -0,0 +1,92 @@ +#include QMK_KEYBOARD_H + +// For readability +enum layer_names { + _BASE, + _FN1, + _FN2, + _FN3, +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + /* Default layer + * ,------. ,-------------------------------------------------------------------------------------------------. + * | F1 | | Esc | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | Bkspc | Ins | + * |------| |-------------------------------------------------------------------------------------------------| + * | F2 | | Tab | Q | W | E | R | T | Y | U | I | O | P | [ | ] | \ | Del | + * |------| |-------------------------------------------------------------------------------------------------| + * | F3 | | Caps | A | S | D | F | G | H | J | K | L | ; | ' | Enter |Home | + * |------| |-------------------------------------------------------------------------------------------------| + * | F4 | | Shift | Z | X | C | V | B | N | M | , | . | / | RShift | U | End | + * |------| |-------------------------------------------------------------------------------------------------| + * | F5 | | Ctrl | Gui | Alt | Space | RAlt | FN | RCtrl | L | D | R | + * `------' `-------------------------------------------------------------------------------------------------' + */ + [_BASE] = LAYOUT_ansi_1u( + KC_F1, 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_INS, + KC_F2, KC_TAB, KC_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_F3, 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_F4, 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_F5, KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT), + + /* Fn1 Layer + * ,------. ,-------------------------------------------------------------------------------------------------. + * | F6 | | `~ | | | | | | | | | | | | | | | + * |------| |-------------------------------------------------------------------------------------------------| + * | F7 | | | | | | | | | | | | | | | | | + * |------| |-------------------------------------------------------------------------------------------------| + * | F8 | | |VolD |VolU |Mute | | | | | | | | | |PgUp | + * |------| |-------------------------------------------------------------------------------------------------| + * | F9 | | |Prev |Play |Next | | | | | | | | | |PgDn | + * |------| |-------------------------------------------------------------------------------------------------| + * | F10 | | | | | | | | | | | | + * `------' `-------------------------------------------------------------------------------------------------' + */ + [_FN1] = LAYOUT_ansi_1u( + KC_F6, KC_GRV, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_F7, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_F8, KC_TRNS, KC_VOLD, KC_VOLU, KC_MUTE, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PGUP, + KC_F9, KC_TRNS, KC_MPRV, KC_MPLY, KC_MNXT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PGDN, + KC_F10, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), + + /* Fn2 Layer + * ,------. ,-------------------------------------------------------------------------------------------------. + * | | | | | | | | | | | | | | | | | | + * |------| |-------------------------------------------------------------------------------------------------| + * | | | | | | | | | | | | | | | | | | + * |------| |-------------------------------------------------------------------------------------------------| + * | | | | | | | | | | | | | | | | | + * |------| |-------------------------------------------------------------------------------------------------| + * | | | | | | | | | | | | | | | | | + * |------| |-------------------------------------------------------------------------------------------------| + * | | | | | | | | | | | | | + * `------' `-------------------------------------------------------------------------------------------------' + */ + [_FN2] = LAYOUT_ansi_1u( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 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 + * ,------. ,-------------------------------------------------------------------------------------------------. + * | | | | | | | | | | | | | | | | | | + * |------| |-------------------------------------------------------------------------------------------------| + * | | | | | | | | | | | | | | | | | | + * |------| |-------------------------------------------------------------------------------------------------| + * | | | | | | | | | | | | | | | | | + * |------| |-------------------------------------------------------------------------------------------------| + * | | | | | | | | | | | | | | | | | + * |------| |-------------------------------------------------------------------------------------------------| + * | | | | | | | | | | | | | + * `------' `-------------------------------------------------------------------------------------------------' + */ + [_FN3] = LAYOUT_ansi_1u( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 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/s7_elephant/rev2/keymaps/via/readme.md b/keyboards/s7_elephant/rev2/keymaps/via/readme.md new file mode 100644 index 000000000000..c4fe30acdd58 --- /dev/null +++ b/keyboards/s7_elephant/rev2/keymaps/via/readme.md @@ -0,0 +1,35 @@ +# Default keymap for S7 Elephant + +**Features** + +* LEDs are functioning as Caps-Lock indicators + +## QWERTY (Normal) Layer +``` +,------. ,-------------------------------------------------------------------------------------------------. +| F1 | | Esc`~ | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | Bkspc |Home | +|------| |-------------------------------------------------------------------------------------------------| +| F2 | | Tab | Q | W | E | R | T | Y | U | I | O | P | [ | ] | \ | End | +|------| |-------------------------------------------------------------------------------------------------| +| F3 | | Caps | A | S | D | F | G | H | J | K | L | ; | ' | Enter | Ins | +|------| |-------------------------------------------------------------------------------------------------| +| F4 | | Shift | Z | X | C | V | B | N | M | , | . | / | RShift | U | Del | +|------| |-------------------------------------------------------------------------------------------------| +| F5 | | Ctrl | Gui | Alt | Space | FN | RAlt | RCtrl | L | D | R | +`------' `-------------------------------------------------------------------------------------------------' +``` + +## FN Layer +``` +,------. ,-------------------------------------------------------------------------------------------------. +|Reset | | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | PScr | ScrLck |Pause| +|------| |-------------------------------------------------------------------------------------------------| +| | | | | | | | | | | | | | | | | | +|------| |-------------------------------------------------------------------------------------------------| +| | | |Prev |Play |Next | | | | |VolD |Mute |VolU | | |PgUp | +|------| |-------------------------------------------------------------------------------------------------| +| | | | | | | | | | | | | | | |PgDn | +|------| |-------------------------------------------------------------------------------------------------| +|EPRM | | | | | | | | | | | | +`------' `-------------------------------------------------------------------------------------------------' +``` diff --git a/keyboards/s7_elephant/rev2/keymaps/via/rules.mk b/keyboards/s7_elephant/rev2/keymaps/via/rules.mk new file mode 100644 index 000000000000..1e5b99807cb7 --- /dev/null +++ b/keyboards/s7_elephant/rev2/keymaps/via/rules.mk @@ -0,0 +1 @@ +VIA_ENABLE = yes diff --git a/keyboards/s7_elephant/rev2/readme.md b/keyboards/s7_elephant/rev2/readme.md new file mode 100644 index 000000000000..04cbafd96f53 --- /dev/null +++ b/keyboards/s7_elephant/rev2/readme.md @@ -0,0 +1,17 @@ +# S7 Elephant + +![S7 Elephant](https://i.imgur.com/CaHxKBJ.jpg) + +A high-end 70% custom keyboard designed and produced by [jacky](https://geekhack.org/index.php?action=profile;u=63864) from Geekhack. + +* Keyboard Maintainer: QMK Community +* Hardware Supported: S7 Elephant +* Hardware Availability: [The GB has ended with little chance to run again.](https://geekhack.org/index.php?topic=96434.0) + +Make example for this keyboard (after setting up your build environment): + + make s7_elephant/rev2:default + +To enter the bootloader, either short the pins on the PCB next to CAPSLOCK or the press the RESET button on the FN layer. + +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/s7_elephant/rev2/rev2.c b/keyboards/s7_elephant/rev2/rev2.c new file mode 100644 index 000000000000..3e84aedd5267 --- /dev/null +++ b/keyboards/s7_elephant/rev2/rev2.c @@ -0,0 +1,19 @@ +/* Copyright 2020 MudkipMao + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#include "rev2.h" + +// generated by KBFirmware JSON to QMK Parser +// https://noroadsleft.github.io/kbf_qmk_converter/ diff --git a/keyboards/s7_elephant/rev2/rev2.h b/keyboards/s7_elephant/rev2/rev2.h new file mode 100644 index 000000000000..16fe50aadbff --- /dev/null +++ b/keyboards/s7_elephant/rev2/rev2.h @@ -0,0 +1,61 @@ +#pragma once + +#include "quantum.h" + +#define ___ KC_NO + +/* ALL: This is an odd layout that the JSON file comes preloaded with. Split left-shift and ansi enter + * ,------. ,-------------------------------------------------------------------------------------------------. + * | | | | | | | | | | | | | | | | | | + * |------| |-------------------------------------------------------------------------------------------------| + | | | | | | | | | | | | | | | | | | + * |------| |-------------------------------------------------------------------------------------------------| + * | | | | | | | | | | | | | | | | | + * |------| |-------------------------------------------------------------------------------------------------| + * | | | | | | | | | | | | | | | | | | + * |------| |-------------------------------------------------------------------------------------------------| + * | | | | | | | | | | | | | + * `------' `-------------------------------------------------------------------------------------------------' + */ + +#define LAYOUT_all( \ + K0F, K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, K4E, \ + K1F, K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K2C, K1E, \ + K2F, K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K1D, K2E, \ + K3F, K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E, \ + K4F, K40, K41, K42, K46, K48, K49, K4A, K4B, K4C, K4D \ +) { \ + { 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, K1D, 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, K3B, K3C, K3D, K3E, K3F }, \ + { K40, K41, K42, ___, ___, ___, K46, ___, K48, K49, K4A, K4B, K4C, K4D, K4E, K4F } \ +} + +/* ANSI + * ,---. ,---------------------------------------------------------------. + * | | | | | | | | | | | | | | | | | | + * |---| |---------------------------------------------------------------| + * | | | | | | | | | | | | | | | | | | + * |---| |---------------------------------------------------------------| + * | | | | | | | | | | | | | | | | | + * |---| |---------------------------------------------------------------| + * | | | | | | | | | | | | | | | | | + * |---| |---------------------------------------------------------------| + * | | | | | | | | | | | | | + * `---' `---------------------------------------------------------------' + */ + +#define LAYOUT_ansi_1u( \ + K0F, K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0E, K4E, \ + K1F, K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K2C, K1E, \ + K2F, K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K1D, K2E, \ + K3F, K30, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E, \ + K4F, K40, K41, K42, K46, K48, K49, K4A, K4B, K4C, K4D \ +) { \ + { 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, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, ___, K2E, K2F }, \ + { K30, ___, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E, K3F }, \ + { K40, K41, K42, ___, ___, ___, K46, ___, K48, K49, K4A, K4B, K4C, K4D, K4E, K4F } \ +} diff --git a/keyboards/s7_elephant/rev2/rules.mk b/keyboards/s7_elephant/rev2/rules.mk new file mode 100644 index 000000000000..cbf45a2b9be9 --- /dev/null +++ b/keyboards/s7_elephant/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 = yes # 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 +LTO_ENABLE = yes diff --git a/keyboards/s7_elephant/rules.mk b/keyboards/s7_elephant/rules.mk index 91fe85c3dfb1..318b6ee209ca 100644 --- a/keyboards/s7_elephant/rules.mk +++ b/keyboards/s7_elephant/rules.mk @@ -1,25 +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 -# comment out to disable the options. -# -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 -BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality -RGBLIGHT_ENABLE = yes # Enable keyboard underlight functionality +DEFAULT_FOLDER = s7_elephant/rev1 \ No newline at end of file diff --git a/keyboards/s7_elephant/s7_elephant.c b/keyboards/s7_elephant/s7_elephant.c deleted file mode 100644 index a869f46dbe57..000000000000 --- a/keyboards/s7_elephant/s7_elephant.c +++ /dev/null @@ -1 +0,0 @@ -#include "s7_elephant.h" From 294cfd8d33aea0b2846fd57c0fdfb6475e093c98 Mon Sep 17 00:00:00 2001 From: jems-lee <30412555+jems-lee@users.noreply.github.com> Date: Sun, 14 Jun 2020 12:49:36 -0400 Subject: [PATCH 157/930] Delete trailing period in documentation (#9416) --- docs/feature_leader_key.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/feature_leader_key.md b/docs/feature_leader_key.md index 828d6557d3e6..0803a411c6c1 100644 --- a/docs/feature_leader_key.md +++ b/docs/feature_leader_key.md @@ -5,7 +5,7 @@ If you've ever used Vim, you know what a Leader key is. If not, you're about to That's what `KC_LEAD` does. Here's an example: 1. Pick a key on your keyboard you want to use as the Leader key. Assign it the keycode `KC_LEAD`. This key would be dedicated just for this -- it's a single action key, can't be used for anything else. -2. Include the line `#define LEADER_TIMEOUT 300` in your `config.h`. This sets the timeout for the `KC_LEAD` key. Specifically, when you press the `KC_LEAD` key, you only have a certain amount of time to complete the Leader Key sequence. The `300` here sets that to 300ms, and you can increase this value to give you more time to hit the sequence. But any keys pressed during this timeout are intercepted and not sent, so you may want to keep this value low. . +2. Include the line `#define LEADER_TIMEOUT 300` in your `config.h`. This sets the timeout for the `KC_LEAD` key. Specifically, when you press the `KC_LEAD` key, you only have a certain amount of time to complete the Leader Key sequence. The `300` here sets that to 300ms, and you can increase this value to give you more time to hit the sequence. But any keys pressed during this timeout are intercepted and not sent, so you may want to keep this value low. * By default, this timeout is how long after pressing `KC_LEAD` to complete your entire sequence. This may be very low for some people. So you may want to increase this timeout. Optionally, you may want to enable the `LEADER_PER_KEY_TIMING` option, which resets the timeout after each key is tapped. This allows you to maintain a low value here, but still be able to use the longer sequences. To enable this option, add `#define LEADER_PER_KEY_TIMING` to your `config.h`. 3. Within your `matrix_scan_user` function, add something like this: From c029c5b187508755b2030354906a55d1c5349a9e Mon Sep 17 00:00:00 2001 From: Maarten Dekkers Date: Mon, 15 Jun 2020 11:09:24 +0200 Subject: [PATCH 158/930] [Keyboard] Add Eon75 (#9333) Co-authored-by: Drashna Jaelre Co-authored-by: Maarten Dekkers --- keyboards/maartenwut/eon75/config.h | 221 ++++++++++++++ keyboards/maartenwut/eon75/eon75.c | 45 +++ keyboards/maartenwut/eon75/eon75.h | 97 ++++++ keyboards/maartenwut/eon75/info.json | 289 ++++++++++++++++++ .../maartenwut/eon75/keymaps/default/keymap.c | 34 +++ .../maartenwut/eon75/keymaps/via/keymap.c | 47 +++ .../maartenwut/eon75/keymaps/via/rules.mk | 2 + keyboards/maartenwut/eon75/readme.md | 13 + keyboards/maartenwut/eon75/rules.mk | 32 ++ 9 files changed, 780 insertions(+) create mode 100644 keyboards/maartenwut/eon75/config.h create mode 100644 keyboards/maartenwut/eon75/eon75.c create mode 100644 keyboards/maartenwut/eon75/eon75.h create mode 100644 keyboards/maartenwut/eon75/info.json create mode 100644 keyboards/maartenwut/eon75/keymaps/default/keymap.c create mode 100644 keyboards/maartenwut/eon75/keymaps/via/keymap.c create mode 100644 keyboards/maartenwut/eon75/keymaps/via/rules.mk create mode 100644 keyboards/maartenwut/eon75/readme.md create mode 100644 keyboards/maartenwut/eon75/rules.mk diff --git a/keyboards/maartenwut/eon75/config.h b/keyboards/maartenwut/eon75/config.h new file mode 100644 index 000000000000..41be76245b7a --- /dev/null +++ b/keyboards/maartenwut/eon75/config.h @@ -0,0 +1,221 @@ +/* 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 0x5C62 +#define DEVICE_VER 0x0001 +#define MANUFACTURER Maartenwut +#define PRODUCT Eon75 +#define DESCRIPTION A 75% PCB + +/* key matrix size */ +#define MATRIX_ROWS 12 +#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 {D1,D0,D3,D2,D6,D4,D7,B4,B5,B6,C6,C7} +#define MATRIX_COL_PINS {E6,F0,F1,F4,F5,F6,F7,B3} +#define UNUSED_PINS {B2,B1} + +/* 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 D0 +// #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 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 0 + diff --git a/keyboards/maartenwut/eon75/eon75.c b/keyboards/maartenwut/eon75/eon75.c new file mode 100644 index 000000000000..86b462dd9ecc --- /dev/null +++ b/keyboards/maartenwut/eon75/eon75.c @@ -0,0 +1,45 @@ +/* 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 "eon75.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 and high + setPinOutput(D5); + writePinHigh(D5); + + setPinOutput(B7); + writePinHigh(B7); + + setPinOutput(B0); + writePinHigh(B0); +} + +bool led_update_kb(led_t led_state) { + if(led_update_user(led_state)) { + writePin(D5, !led_state.caps_lock); + writePin(B7, !led_state.num_lock); + writePin(B0, !led_state.scroll_lock); + } + + return true; +} diff --git a/keyboards/maartenwut/eon75/eon75.h b/keyboards/maartenwut/eon75/eon75.h new file mode 100644 index 000000000000..5ce932a6467f --- /dev/null +++ b/keyboards/maartenwut/eon75/eon75.h @@ -0,0 +1,97 @@ +/* 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, 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, k37, \ + k40, k50, k41, k51, k42, k52, k43, k53, k44, k54, k45, k55, k46, k47, k57, \ + k60, k70, k61, k71, k62, k72, k63, k73, k64, k74, k65, k75, k66, k76, k77, \ + k80, k90, k81, k91, k82, k92, k83, k93, k84, k94, k85, k95, k86, k87, k97, \ + ka0, kb0, ka1, kb3, ka5, kb5, ka6, kb6, ka7, kb7 \ +) \ +{ \ + { k00, k01, k02, k03, k04, k05, k06, k07 }, \ + { k10, k11, XXX, 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, XXX, k57 }, \ + { k60, k61, k62, k63, k64, k65, k66, XXX }, \ + { k70, k71, k72, k73, k74, k75, k76, k77 }, \ + { k80, k81, k82, k83, k84, k85, k86, k87 }, \ + { k90, k91, k92, k93, k94, k95, XXX, k97 }, \ + { ka0, ka1, XXX, XXX, XXX, ka5, ka6, ka7 }, \ + { kb0, XXX, XXX, kb3, XXX, kb5, kb6, kb7 } \ +} + +#define LAYOUT_ansi( \ + k00, k10, k01, k11, k02, k03, k13, k04, k14, k05, k15, k06, k16, k07, k17, \ + k20, k30, k21, k31, k22, k32, k23, k33, k24, k34, k25, k35, k26, k27, k37, \ + k40, k50, k41, k51, k42, k52, k43, k53, k44, k54, k45, k55, k46, k47, k57, \ + k60, k70, k61, k71, k62, k72, k63, k73, k64, k74, k65, k75, k76, k77, \ + k80, k81, k91, k82, k92, k83, k93, k84, k94, k85, k95, k86, k87, k97, \ + ka0, kb0, ka1, kb3, ka5, kb5, ka6, kb6, ka7, kb7 \ +) \ +{ \ + { k00, k01, k02, k03, k04, k05, k06, k07 }, \ + { k10, k11, XXX, k13, k14, k15, k16, k17 }, \ + { k20, k21, k22, k23, k24, k25, k26, k27 }, \ + { k30, k31, k32, k33, k34, k35, XXX, k37 }, \ + { k40, k41, k42, k43, k44, k45, k46, k47 }, \ + { k50, k51, k52, k53, k54, k55, XXX, k57 }, \ + { k60, k61, k62, k63, k64, k65, XXX, XXX }, \ + { k70, k71, k72, k73, k74, k75, k76, k77 }, \ + { k80, k81, k82, k83, k84, k85, k86, k87 }, \ + { XXX, k91, k92, k93, k94, k95, XXX, k97 }, \ + { ka0, ka1, XXX, XXX, XXX, ka5, ka6, ka7 }, \ + { kb0, XXX, XXX, kb3, XXX, kb5, kb6, kb7 } \ +} + +#define LAYOUT_iso( \ + k00, k10, k01, k11, k02, k03, k13, k04, k14, k05, k15, k06, k16, k07, k17, \ + k20, k30, k21, k31, k22, k32, k23, k33, k24, k34, k25, k35, k26, k27, k37, \ + k40, k50, k41, k51, k42, k52, k43, k53, k44, k54, k45, k55, k46, k57, \ + k60, k70, k61, k71, k62, k72, k63, k73, k64, k74, k65, k75, k66, k76, k77, \ + k80, k90, k81, k91, k82, k92, k83, k93, k84, k94, k85, k95, k86, k87, k97, \ + ka0, kb0, ka1, kb3, ka5, kb5, ka6, kb6, ka7, kb7 \ +) \ +{ \ + { k00, k01, k02, k03, k04, k05, k06, k07 }, \ + { k10, k11, XXX, k13, k14, k15, k16, k17 }, \ + { k20, k21, k22, k23, k24, k25, k26, k27 }, \ + { k30, k31, k32, k33, k34, k35, XXX, k37 }, \ + { k40, k41, k42, k43, k44, k45, k46, XXX }, \ + { k50, k51, k52, k53, k54, k55, XXX, k57 }, \ + { k60, k61, k62, k63, k64, k65, k66, XXX }, \ + { k70, k71, k72, k73, k74, k75, k76, k77 }, \ + { k80, k81, k82, k83, k84, k85, k86, k87 }, \ + { k90, k91, k92, k93, k94, k95, XXX, k97 }, \ + { ka0, ka1, XXX, XXX, XXX, ka5, ka6, ka7 }, \ + { kb0, XXX, XXX, kb3, XXX, kb5, kb6, kb7 } \ +} diff --git a/keyboards/maartenwut/eon75/info.json b/keyboards/maartenwut/eon75/info.json new file mode 100644 index 000000000000..9066542a1f36 --- /dev/null +++ b/keyboards/maartenwut/eon75/info.json @@ -0,0 +1,289 @@ +{ + "keyboard_name": "Eon75", + "url": "", + "maintainer": "qmk", + "width": 16.5, + "height": 6.5, + "layouts": { + "LAYOUT_all": { + "layout": [ + {"x":0, "y":0}, + {"x":1.5, "y":0}, + {"x":2.5, "y":0}, + {"x":3.5, "y":0}, + {"x":4.5, "y":0}, + {"x":5.75, "y":0}, + {"x":6.75, "y":0}, + {"x":7.75, "y":0}, + {"x":8.75, "y":0}, + {"x":10, "y":0}, + {"x":11, "y":0}, + {"x":12, "y":0}, + {"x":13, "y":0}, + {"x":14.5, "y":0}, + {"x":15.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, "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}, + {"x":14, "y":1.25}, + {"x":15.5, "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.5, "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":3.25, "w":1.25}, + {"x":15.5, "y":3.25}, + + {"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.25, "y":4.5}, + {"x":15.5, "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}, + {"x":11, "y":5.25}, + {"x":12, "y":5.25}, + {"x":13.25, "y":5.5}, + {"x":14.25, "y":5.5}, + {"x":15.25, "y":5.5} + ] + }, + "LAYOUT_ansi": { + "layout": [ + {"x":0, "y":0}, + {"x":1.5, "y":0}, + {"x":2.5, "y":0}, + {"x":3.5, "y":0}, + {"x":4.5, "y":0}, + {"x":5.75, "y":0}, + {"x":6.75, "y":0}, + {"x":7.75, "y":0}, + {"x":8.75, "y":0}, + {"x":10, "y":0}, + {"x":11, "y":0}, + {"x":12, "y":0}, + {"x":13, "y":0}, + {"x":14.5, "y":0}, + {"x":15.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, "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.5, "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.5, "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":15.5, "y":3.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.25, "y":4.5}, + {"x":15.5, "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}, + {"x":11, "y":5.25}, + {"x":12, "y":5.25}, + {"x":13.25, "y":5.5}, + {"x":14.25, "y":5.5}, + {"x":15.25, "y":5.5} + ] + }, + "LAYOUT_iso": { + "layout": [ + {"x":0, "y":0}, + {"x":1.5, "y":0}, + {"x":2.5, "y":0}, + {"x":3.5, "y":0}, + {"x":4.5, "y":0}, + {"x":5.75, "y":0}, + {"x":6.75, "y":0}, + {"x":7.75, "y":0}, + {"x":8.75, "y":0}, + {"x":10, "y":0}, + {"x":11, "y":0}, + {"x":12, "y":0}, + {"x":13, "y":0}, + {"x":14.5, "y":0}, + {"x":15.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, "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.5, "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.5, "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":15.5, "y":3.25}, + + {"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.25, "y":4.5}, + {"x":15.5, "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}, + {"x":11, "y":5.25}, + {"x":12, "y":5.25}, + {"x":13.25, "y":5.5}, + {"x":14.25, "y":5.5}, + {"x":15.25, "y":5.5} + ] + } + } +} diff --git a/keyboards/maartenwut/eon75/keymaps/default/keymap.c b/keyboards/maartenwut/eon75/keymaps/default/keymap.c new file mode 100644 index 000000000000..fcfba4c866db --- /dev/null +++ b/keyboards/maartenwut/eon75/keymaps/default/keymap.c @@ -0,0 +1,34 @@ +/* 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 + +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_HOME, KC_END, + 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_TAB, KC_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_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, KC_RGUI, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT), +[1] = LAYOUT_all( + RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______), + +}; \ No newline at end of file diff --git a/keyboards/maartenwut/eon75/keymaps/via/keymap.c b/keyboards/maartenwut/eon75/keymaps/via/keymap.c new file mode 100644 index 000000000000..070d38b09faa --- /dev/null +++ b/keyboards/maartenwut/eon75/keymaps/via/keymap.c @@ -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 . + */ +#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_HOME, KC_END, + 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_TAB, KC_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_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_RCTL, KC_LEFT, KC_DOWN, KC_RGHT), +[1] = LAYOUT_all( + RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______), +[2] = LAYOUT_all( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______), +[3] = LAYOUT_all( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______) +}; \ No newline at end of file diff --git a/keyboards/maartenwut/eon75/keymaps/via/rules.mk b/keyboards/maartenwut/eon75/keymaps/via/rules.mk new file mode 100644 index 000000000000..36b7ba9cbc98 --- /dev/null +++ b/keyboards/maartenwut/eon75/keymaps/via/rules.mk @@ -0,0 +1,2 @@ +VIA_ENABLE = yes +LTO_ENABLE = yes diff --git a/keyboards/maartenwut/eon75/readme.md b/keyboards/maartenwut/eon75/readme.md new file mode 100644 index 000000000000..8c697c1c6886 --- /dev/null +++ b/keyboards/maartenwut/eon75/readme.md @@ -0,0 +1,13 @@ +# Eon75 + +## Support +* Keyboard Maintainer: [Maarten Dekkers](https://github.com/maartenwut) +* Hardware Supported: Eon75 +* Hardware Availability: None + +## Build +Make example for this keyboard (after setting up your build environment): + + make maartenwut/eon75: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/eon75/rules.mk b/keyboards/maartenwut/eon75/rules.mk new file mode 100644 index 000000000000..264e0ea67d2d --- /dev/null +++ b/keyboards/maartenwut/eon75/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 = 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 From da76734fe0aba64140d4d127161cc4390776ffd7 Mon Sep 17 00:00:00 2001 From: Josh Johnson Date: Mon, 15 Jun 2020 19:17:30 +1000 Subject: [PATCH 159/930] [Keyboard] Hub16 keymap bugfix (#9345) --- keyboards/hub16/config.h | 3 +-- keyboards/hub16/keymaps/default/keymap.c | 32 +++++++++++++++++------- keyboards/hub16/readme.md | 4 +-- 3 files changed, 26 insertions(+), 13 deletions(-) diff --git a/keyboards/hub16/config.h b/keyboards/hub16/config.h index c7dec995ebc2..ed14178d6011 100755 --- a/keyboards/hub16/config.h +++ b/keyboards/hub16/config.h @@ -81,8 +81,7 @@ along with this program. If not, see . #define DEBOUNCE 20 /* ENCODER THINGS */ - -// #define NUMBER_OF_ENCODERS 2 +// #define ENCODER_DIRECTION_FLIP #define ENCODERS_PAD_A \ { F6, B4 } #define ENCODERS_PAD_B \ diff --git a/keyboards/hub16/keymaps/default/keymap.c b/keyboards/hub16/keymaps/default/keymap.c index 2d12dba0d4f0..d3cad67ae114 100755 --- a/keyboards/hub16/keymaps/default/keymap.c +++ b/keyboards/hub16/keymaps/default/keymap.c @@ -21,16 +21,18 @@ // Keyboard Layers enum keyboard_layers{ _BASE = 0, - _CONTROL + _CTRL }; // Tap Dance Declarations -enum tap_dance { TD_TO_LED = 0, TD_TO_DEFAULT = 1 }; +void td_ctrl (qk_tap_dance_state_t *state, void *user_data); + +enum tap_dance { CTRL = 0, BASE = 1 }; qk_tap_dance_action_t tap_dance_actions[] = { - // 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)}; + // Tap once for standard key on base layer, twice to toggle to control layer + [CTRL] = ACTION_TAP_DANCE_FN(td_ctrl), + [BASE] = ACTION_TAP_DANCE_LAYER_MOVE(_______, _BASE)}; const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_BASE] = LAYOUT( /* Base */ @@ -38,19 +40,19 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { 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) + KC_M, KC_N, KC_O, TD(CTRL) ), - [_CONTROL] = LAYOUT( /* LED Control */ + [_CTRL] = LAYOUT( /* 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) + _______, _______, RESET, TD(BASE) ), }; -// Keyboard is setup to 'warp' the pressed key with F24, +// Keyboard is setup to 'wrap' the pressed key with an unused Fxx key, // allowing for easy differentiation from a real keyboard. void encoder_update_user(uint8_t index, bool clockwise) { if (index == 0) { /* Left Encoder */ @@ -99,3 +101,15 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { } return true; } + +// Below works around TD() not running key press through process_record_user. +// Fixes bug of CTRL layer move key not being wrapped in by modifier on single tap +void td_ctrl (qk_tap_dance_state_t *state, void *user_data) { + if (state->count == 1) { + register_code(KC_WRAP); + tap_code(KC_P); + unregister_code(KC_WRAP); + } else if (state->count == 2) { + layer_move(_CTRL); + } +} \ No newline at end of file diff --git a/keyboards/hub16/readme.md b/keyboards/hub16/readme.md index 996fa4463506..1409af5bbed4 100755 --- a/keyboards/hub16/readme.md +++ b/keyboards/hub16/readme.md @@ -1,8 +1,8 @@ # Hub16 -Hub16 is a 16 Key Macro Pad with inbuilt USB 2.0 hub and dual rotary encoders. +Hub16 is a 16 Key Macro Pad with an 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). +For more information regarding the keyboard, please visit the [Hub16 Website](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) From 8e0af2f5ba1e094149ce5ce2ac4e25c462f98f23 Mon Sep 17 00:00:00 2001 From: Reed Date: Mon, 15 Jun 2020 05:55:00 -0400 Subject: [PATCH 160/930] [Docs] Fix link to mod_tap.md in the one_shot_keys.md file (#9380) --- docs/one_shot_keys.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/one_shot_keys.md b/docs/one_shot_keys.md index 73d78b415027..aa3db5acb211 100644 --- a/docs/one_shot_keys.md +++ b/docs/one_shot_keys.md @@ -15,7 +15,7 @@ You can control the behavior of one shot keys by defining these in `config.h`: #define ONESHOT_TIMEOUT 5000 /* Time (in ms) before the one shot key is released */ ``` -* `OSM(mod)` - Momentarily hold down *mod*. You must use the `MOD_*` keycodes as shown in [Mod Tap](#mod-tap), not the `KC_*` codes. +* `OSM(mod)` - Momentarily hold down *mod*. You must use the `MOD_*` keycodes as shown in [Mod Tap](mod_tap.md), not the `KC_*` codes. * `OSL(layer)` - momentary switch to *layer*. Sometimes, you want to activate a one-shot key as part of a macro or tap dance routine. From 44d93285d1e5ae0fdaaaab33aa15ffab456b9434 Mon Sep 17 00:00:00 2001 From: Ryan Date: Mon, 15 Jun 2020 20:06:10 +1000 Subject: [PATCH 161/930] Change ?= to = in keyboard rules.mk (#9390) --- keyboards/alu84/rules.mk | 20 ++++++------- keyboards/amj40/rules.mk | 24 ++++++++-------- keyboards/ckeys/nakey/rules.mk | 26 ++++++++--------- keyboards/fc660c/rules.mk | 10 +++---- keyboards/gh80_3000/rules.mk | 20 ++++++------- keyboards/handwired/magicforce61/rules.mk | 24 ++++++++-------- keyboards/handwired/not_so_minidox/rules.mk | 28 +++++++++---------- .../handwired/onekey/blackpill_f401/rules.mk | 2 +- .../handwired/onekey/blackpill_f411/rules.mk | 2 +- keyboards/handwired/woodpad/rules.mk | 28 +++++++++---------- keyboards/katana60/rules.mk | 26 ++++++++--------- keyboards/knops/mini/rules.mk | 26 ++++++++--------- keyboards/kona_classic/rules.mk | 24 ++++++++-------- keyboards/mt40/rules.mk | 24 ++++++++-------- keyboards/noxary/268/rules.mk | 20 ++++++------- keyboards/omnikey_bh/rules.mk | 20 ++++++------- keyboards/paladin64/rules.mk | 26 ++++++++--------- keyboards/primekb/prime_r/rules.mk | 20 ++++++------- keyboards/sx60/rules.mk | 22 +++++++-------- keyboards/toad/rules.mk | 20 ++++++------- keyboards/uk78/rules.mk | 20 ++++++------- keyboards/wilba_tech/zeal60/rules.mk | 2 +- keyboards/xmmx/rules.mk | 20 ++++++------- 23 files changed, 227 insertions(+), 227 deletions(-) diff --git a/keyboards/alu84/rules.mk b/keyboards/alu84/rules.mk index b5f249057481..81dbad070b6a 100755 --- a/keyboards/alu84/rules.mk +++ b/keyboards/alu84/rules.mk @@ -14,13 +14,13 @@ 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 ?= 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 -BACKLIGHT_ENABLE ?= yes # Enable keyboard backlight functionality -AUDIO_ENABLE ?= no -RGBLIGHT_ENABLE ?= yes +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 +BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality +AUDIO_ENABLE = no +RGBLIGHT_ENABLE = yes diff --git a/keyboards/amj40/rules.mk b/keyboards/amj40/rules.mk index 5d6cff98916c..cd894dac12ef 100755 --- a/keyboards/amj40/rules.mk +++ b/keyboards/amj40/rules.mk @@ -14,15 +14,15 @@ BOOTLOADER = atmel-dfu # 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 ?= 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 -BACKLIGHT_ENABLE ?= yes # 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 +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 +BACKLIGHT_ENABLE = yes # 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 diff --git a/keyboards/ckeys/nakey/rules.mk b/keyboards/ckeys/nakey/rules.mk index 95fd5e4621e6..7c0477bcf95b 100644 --- a/keyboards/ckeys/nakey/rules.mk +++ b/keyboards/ckeys/nakey/rules.mk @@ -14,20 +14,20 @@ 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 +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 +SLEEP_LED_ENABLE = no # Breathing sleep 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 +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 LAYOUTS = numpad_5x4 diff --git a/keyboards/fc660c/rules.mk b/keyboards/fc660c/rules.mk index 3a3ac4e5d279..54fadc826457 100644 --- a/keyboards/fc660c/rules.mk +++ b/keyboards/fc660c/rules.mk @@ -15,11 +15,11 @@ BOOTLOADER = atmel-dfu # 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 -NKRO_ENABLE ?= yes # USB Nkey Rollover - not yet supported in LUFA +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 # Optimize size but this may cause error "relocation truncated to fit" #EXTRALDFLAGS = -Wl,--relax diff --git a/keyboards/gh80_3000/rules.mk b/keyboards/gh80_3000/rules.mk index 524303ec24e3..d6cb5fcfa5fe 100644 --- a/keyboards/gh80_3000/rules.mk +++ b/keyboards/gh80_3000/rules.mk @@ -14,15 +14,15 @@ BOOTLOADER = atmel-dfu # 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 -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 +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 +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +AUDIO_ENABLE = no +RGBLIGHT_ENABLE = no LAYOUTS = fullsize_ansi fullsize_iso diff --git a/keyboards/handwired/magicforce61/rules.mk b/keyboards/handwired/magicforce61/rules.mk index d1ed63f65b3f..b72fff09602b 100644 --- a/keyboards/handwired/magicforce61/rules.mk +++ b/keyboards/handwired/magicforce61/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) -COMMAND_ENABLE ?= yes # Commands for debug and configuration +BOOTMAGIC_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 +SLEEP_LED_ENABLE = no # Breathing sleep 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 controls -UNICODE_ENABLE ?= no # Unicode -BLUETOOTH_ENABLE ?= no # Enable Bluetooth with the Adafruit EZ-Key HID -AUDIO_ENABLE ?= no # Audio output on port C6 +NKRO_ENABLE = no # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default +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 diff --git a/keyboards/handwired/not_so_minidox/rules.mk b/keyboards/handwired/not_so_minidox/rules.mk index ae5cb83b7bf9..6e87d7545cba 100644 --- a/keyboards/handwired/not_so_minidox/rules.mk +++ b/keyboards/handwired/not_so_minidox/rules.mk @@ -15,21 +15,21 @@ 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) -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(+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 # 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 CUSTOM_MATRIX = yes SRC += matrix.c \ diff --git a/keyboards/handwired/onekey/blackpill_f401/rules.mk b/keyboards/handwired/onekey/blackpill_f401/rules.mk index 36093820c988..609262049cad 100644 --- a/keyboards/handwired/onekey/blackpill_f401/rules.mk +++ b/keyboards/handwired/onekey/blackpill_f401/rules.mk @@ -20,7 +20,7 @@ MCU = cortex-m4 ARMV = 7 USE_FPU = yes # Address of the booloader in system memory -STM32_BOOTLOADER_ADDRESS ?= 0x1FFF0000 +STM32_BOOTLOADER_ADDRESS = 0x1FFF0000 # Options to pass to dfu-util when flashing DFU_ARGS = -d 0483:df11 -a 0 -s 0x08000000:leave diff --git a/keyboards/handwired/onekey/blackpill_f411/rules.mk b/keyboards/handwired/onekey/blackpill_f411/rules.mk index 18fb92dbe883..f2e0f2b4f956 100644 --- a/keyboards/handwired/onekey/blackpill_f411/rules.mk +++ b/keyboards/handwired/onekey/blackpill_f411/rules.mk @@ -20,7 +20,7 @@ MCU = cortex-m4 ARMV = 7 USE_FPU = yes # Address of the booloader in system memory -STM32_BOOTLOADER_ADDRESS ?= 0x1FFF0000 +STM32_BOOTLOADER_ADDRESS = 0x1FFF0000 # Options to pass to dfu-util when flashing DFU_ARGS = -d 0483:df11 -a 0 -s 0x08000000:leave diff --git a/keyboards/handwired/woodpad/rules.mk b/keyboards/handwired/woodpad/rules.mk index 7725131978e4..a3a1e5ffe9a3 100644 --- a/keyboards/handwired/woodpad/rules.mk +++ b/keyboards/handwired/woodpad/rules.mk @@ -14,19 +14,19 @@ 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) -COMMAND_ENABLE ?= yes # Commands for debug and configuration +BOOTMAGIC_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 +SLEEP_LED_ENABLE = no # Breathing sleep 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) -UNICODE_ENABLE ?= no # Unicode -BLUETOOTH_ENABLE ?= no # Enable 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 +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) +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable 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 diff --git a/keyboards/katana60/rules.mk b/keyboards/katana60/rules.mk index 62a038091e94..e41c168c4fc3 100644 --- a/keyboards/katana60/rules.mk +++ b/keyboards/katana60/rules.mk @@ -14,18 +14,18 @@ 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 ?= yes # Console for debug -COMMAND_ENABLE ?= yes # Commands for debug and 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 +COMMAND_ENABLE = yes # Commands for debug and configuration # 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 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 +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 diff --git a/keyboards/knops/mini/rules.mk b/keyboards/knops/mini/rules.mk index 312bfb4fdc7d..1d0be651643a 100644 --- a/keyboards/knops/mini/rules.mk +++ b/keyboards/knops/mini/rules.mk @@ -14,18 +14,18 @@ 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 ?= yes # Console for debug -COMMAND_ENABLE ?= yes # Commands for debug and 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 +COMMAND_ENABLE = yes # Commands for debug and configuration # 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 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 +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 diff --git a/keyboards/kona_classic/rules.mk b/keyboards/kona_classic/rules.mk index 2640360f26e5..8c5740b51b3d 100644 --- a/keyboards/kona_classic/rules.mk +++ b/keyboards/kona_classic/rules.mk @@ -14,17 +14,17 @@ 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 +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 +SLEEP_LED_ENABLE = no # Breathing sleep 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 controls -UNICODE_ENABLE ?= no # Unicode -BLUETOOTH_ENABLE ?= no # Enable Bluetooth with the Adafruit EZ-Key HID -AUDIO_ENABLE ?= no # Audio output on port C6 +NKRO_ENABLE = no # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default +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 diff --git a/keyboards/mt40/rules.mk b/keyboards/mt40/rules.mk index c81f35f656df..2b8e18a95ca1 100644 --- a/keyboards/mt40/rules.mk +++ b/keyboards/mt40/rules.mk @@ -12,18 +12,18 @@ MCU = atmega32a BOOTLOADER = bootloadHID # build 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 ?= 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 -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. +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 +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. WS2812_DRIVER = i2c TAP_DANCE_ENABLE = no diff --git a/keyboards/noxary/268/rules.mk b/keyboards/noxary/268/rules.mk index b57e64fcecdb..f2d381510d0c 100644 --- a/keyboards/noxary/268/rules.mk +++ b/keyboards/noxary/268/rules.mk @@ -14,13 +14,13 @@ BOOTLOADER = atmel-dfu # 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 -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 ?= no +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 +BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality +AUDIO_ENABLE = no +RGBLIGHT_ENABLE = no diff --git a/keyboards/omnikey_bh/rules.mk b/keyboards/omnikey_bh/rules.mk index 59f163e2f4c1..739bea3932e8 100644 --- a/keyboards/omnikey_bh/rules.mk +++ b/keyboards/omnikey_bh/rules.mk @@ -14,13 +14,13 @@ BOOTLOADER = halfkay # 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 +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 diff --git a/keyboards/paladin64/rules.mk b/keyboards/paladin64/rules.mk index 6caa47e90787..739e00613c08 100755 --- a/keyboards/paladin64/rules.mk +++ b/keyboards/paladin64/rules.mk @@ -14,18 +14,18 @@ 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 ?= 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 -BACKLIGHT_ENABLE ?= no # Enable keyboard backlight functionality -AUDIO_ENABLE ?= no -RGBLIGHT_ENABLE ?= yes -#PS2_MOUSE_ENABLE ?= yes -#PS2_USE_USART ?= yes -#PS2_USE_INT ?= yes +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 +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +AUDIO_ENABLE = no +RGBLIGHT_ENABLE = yes +#PS2_MOUSE_ENABLE = yes +#PS2_USE_USART = yes +#PS2_USE_INT = yes LAYOUTS = 60_ansi diff --git a/keyboards/primekb/prime_r/rules.mk b/keyboards/primekb/prime_r/rules.mk index fb3fd385e3b0..6f7dd47059de 100644 --- a/keyboards/primekb/prime_r/rules.mk +++ b/keyboards/primekb/prime_r/rules.mk @@ -14,13 +14,13 @@ 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 ?= yes # Enable keyboard backlight functionality -AUDIO_ENABLE ?= no -RGBLIGHT_ENABLE ?= no +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 = yes # Enable keyboard backlight functionality +AUDIO_ENABLE = no +RGBLIGHT_ENABLE = no diff --git a/keyboards/sx60/rules.mk b/keyboards/sx60/rules.mk index 64b2f2b2c29a..3fa616a27e13 100755 --- a/keyboards/sx60/rules.mk +++ b/keyboards/sx60/rules.mk @@ -14,17 +14,17 @@ 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 ?= yes # Enable keyboard backlight functionality -AUDIO_ENABLE ?= no -RGBLIGHT_ENABLE ?= no -CUSTOM_MATRIX ?= yes +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 = yes # Enable keyboard backlight functionality +AUDIO_ENABLE = no +RGBLIGHT_ENABLE = no +CUSTOM_MATRIX = yes # project specific files SRC = twimaster.c \ diff --git a/keyboards/toad/rules.mk b/keyboards/toad/rules.mk index 731b405c0528..94733eeaf02c 100644 --- a/keyboards/toad/rules.mk +++ b/keyboards/toad/rules.mk @@ -14,13 +14,13 @@ BOOTLOADER = atmel-dfu # 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 -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 +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 +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +AUDIO_ENABLE = no +RGBLIGHT_ENABLE = no diff --git a/keyboards/uk78/rules.mk b/keyboards/uk78/rules.mk index 40fc506aa006..7bcfa4ef146a 100644 --- a/keyboards/uk78/rules.mk +++ b/keyboards/uk78/rules.mk @@ -14,13 +14,13 @@ BOOTLOADER = atmel-dfu # Build Options # comment out to disable the options. # -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 -BACKLIGHT_ENABLE ?= yes # Enable keyboard backlight functionality -AUDIO_ENABLE ?= no -RGBLIGHT_ENABLE ?= yes +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 +BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality +AUDIO_ENABLE = no +RGBLIGHT_ENABLE = yes diff --git a/keyboards/wilba_tech/zeal60/rules.mk b/keyboards/wilba_tech/zeal60/rules.mk index 31c960c22ee8..172ebaf6b5ef 100644 --- a/keyboards/wilba_tech/zeal60/rules.mk +++ b/keyboards/wilba_tech/zeal60/rules.mk @@ -34,7 +34,7 @@ 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 +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend CIE1931_CURVE = yes diff --git a/keyboards/xmmx/rules.mk b/keyboards/xmmx/rules.mk index 731b405c0528..94733eeaf02c 100644 --- a/keyboards/xmmx/rules.mk +++ b/keyboards/xmmx/rules.mk @@ -14,13 +14,13 @@ BOOTLOADER = atmel-dfu # 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 -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 +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 +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +AUDIO_ENABLE = no +RGBLIGHT_ENABLE = no From a8d073368f0e4cc51109fab50f7c9cb88d843940 Mon Sep 17 00:00:00 2001 From: James Young <18669334+noroadsleft@users.noreply.github.com> Date: Mon, 15 Jun 2020 03:09:48 -0700 Subject: [PATCH 162/930] [Keyboard] Fix Configurator layout data for acheron/elongate (#9392) --- keyboards/acheron/elongate/info.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/keyboards/acheron/elongate/info.json b/keyboards/acheron/elongate/info.json index 65e312259b1c..46784164b4a5 100644 --- a/keyboards/acheron/elongate/info.json +++ b/keyboards/acheron/elongate/info.json @@ -5,7 +5,7 @@ "width": 15.5, "height": 4.25, "layouts": { - "LAYOUT_all": { + "LAYOUT": { "layout": [ {"label":"Tab", "x":0, "y":0}, {"label":"Q", "x":1, "y":0}, @@ -33,7 +33,7 @@ {"label":"J", "x":7.25, "y":1}, {"label":"K", "x":8.25, "y":1}, {"label":"L", "x":9.25, "y":1}, - {"label":"Enter", "x":10.25, "y":1.75}, + {"label":"Enter", "x":10.25, "y":1, "w":1.75}, {"label":"4", "x":12.5, "y":1}, {"label":"5", "x":13.5, "y":1}, {"label":"6", "x":14.5, "y":1}, @@ -47,7 +47,7 @@ {"label":"N", "x":6.75, "y":2}, {"label":"M", "x":7.75, "y":2}, {"label":"<", "x":8.75, "y":2}, - {"label":"Fn1", "x":9.75, "y":2}, + {"label":"Fn1", "x":9.75, "y":2, "w":1.25}, {"label":"Up", "x":11.25, "y":2.25}, {"label":"1", "x":12.5, "y":2}, {"label":"2", "x":13.5, "y":2}, From d8e3294aeaf6d0b2e9400aefdd5bf2ff63d4d981 Mon Sep 17 00:00:00 2001 From: James Young <18669334+noroadsleft@users.noreply.github.com> Date: Mon, 15 Jun 2020 03:10:15 -0700 Subject: [PATCH 163/930] [Keyboard] Fix Configurator layout data for handwired/1800fl (#9393) --- keyboards/handwired/p1800fl/info.json | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/keyboards/handwired/p1800fl/info.json b/keyboards/handwired/p1800fl/info.json index 1509b59d96ab..93f4e8aaebc7 100644 --- a/keyboards/handwired/p1800fl/info.json +++ b/keyboards/handwired/p1800fl/info.json @@ -75,11 +75,11 @@ {"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":"Up", "x":14.25, "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":2.5, "y":4, "w":1.25}, @@ -87,12 +87,12 @@ {"label":"Ctrl", "x":10, "y":4}, {"label":"Win", "x":11, "y":4}, {"label":"Alt", "x":12, "y":4}, - {"label":"0", "x":16.5, "y":4}, - {"label":".", "x":17.5, "y":4}, - {"label":"Enter", "x":18.5, "y":4}, {"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":"Right", "x":15.25, "y":4.25}, + {"label":"0", "x":16.5, "y":4}, + {"label":".", "x":17.5, "y":4}, + {"label":"Enter", "x":18.5, "y":4} ] } } From b008a9afe6f216cebe4c664d5ce59cd6bfe755c3 Mon Sep 17 00:00:00 2001 From: James Young <18669334+noroadsleft@users.noreply.github.com> Date: Mon, 15 Jun 2020 03:11:19 -0700 Subject: [PATCH 164/930] HID Liberation Device Refactor and Configurator layout support (#9394) --- keyboards/hid_liber/hid_liber.c | 36 ++----- keyboards/hid_liber/hid_liber.h | 7 +- keyboards/hid_liber/info.json | 101 ++++++++++++++++++ keyboards/hid_liber/keymaps/default/config.h | 1 - keyboards/hid_liber/keymaps/default/keymap.c | 55 ++++------ keyboards/hid_liber/keymaps/default/readme.md | 10 +- keyboards/hid_liber/keymaps/default/rules.mk | 1 - keyboards/hid_liber/readme.md | 14 +-- keyboards/hid_liber/rules.mk | 2 +- 9 files changed, 143 insertions(+), 84 deletions(-) create mode 100644 keyboards/hid_liber/info.json delete mode 100755 keyboards/hid_liber/keymaps/default/config.h delete mode 100755 keyboards/hid_liber/keymaps/default/rules.mk diff --git a/keyboards/hid_liber/hid_liber.c b/keyboards/hid_liber/hid_liber.c index 6517c9206224..2d2130743f1c 100755 --- a/keyboards/hid_liber/hid_liber.c +++ b/keyboards/hid_liber/hid_liber.c @@ -24,34 +24,16 @@ 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_init_ports(void) { - DDRB |= (1<<5) | (1<<6); // OUT + setPinOutput(B5); + setPinOutput(B6); } -void led_set_kb(uint8_t usb_led) { - if (usb_led & (1<. */ -#ifndef HID_LIBER_H -#define HID_LIBER_H +#pragma once #include "quantum.h" @@ -69,7 +68,3 @@ /* Q */ { ___ , ___ , KQ2 , ___ , ___ , ___ , ___ , KQ7 }, \ /* R */ { ___ , ___ , ___ , ___ , KR4 , ___ , ___ , ___ } \ } - - - -#endif diff --git a/keyboards/hid_liber/info.json b/keyboards/hid_liber/info.json new file mode 100644 index 000000000000..581ac55a2c81 --- /dev/null +++ b/keyboards/hid_liber/info.json @@ -0,0 +1,101 @@ +{ + "keyboard_name": "bpiphany HIDLiberation", + "url": "", + "maintainer": "qmk", + "width": 18.25, + "height": 6.5, + "layouts": { + "LAYOUT": { + "layout": [ + {"label":"KG1", "x":0, "y":0}, + {"label":"KH7", "x":2, "y":0}, + {"label":"KJ7", "x":3, "y":0}, + {"label":"KJ6", "x":4, "y":0}, + {"label":"KJ1", "x":5, "y":0}, + {"label":"KO5", "x":6.5, "y":0}, + {"label":"KL1", "x":7.5, "y":0}, + {"label":"KA6", "x":8.5, "y":0}, + {"label":"KA7", "x":9.5, "y":0}, + {"label":"KD7", "x":11, "y":0}, + {"label":"KD5", "x":12, "y":0}, + {"label":"KD1", "x":13, "y":0}, + {"label":"KD2", "x":14, "y":0}, + {"label":"KB5", "x":15.25, "y":0}, + {"label":"KB3", "x":16.25, "y":0}, + {"label":"KO3", "x":17.25, "y":0}, + {"label":"KG7", "x":0, "y":1.5}, + {"label":"KG5", "x":1, "y":1.5}, + {"label":"KH5", "x":2, "y":1.5}, + {"label":"KJ5", "x":3, "y":1.5}, + {"label":"KI5", "x":4, "y":1.5}, + {"label":"KI7", "x":5, "y":1.5}, + {"label":"KK7", "x":6, "y":1.5}, + {"label":"KK5", "x":7, "y":1.5}, + {"label":"KL5", "x":8, "y":1.5}, + {"label":"KA5", "x":9, "y":1.5}, + {"label":"KC5", "x":10, "y":1.5}, + {"label":"KC7", "x":11, "y":1.5}, + {"label":"KL7", "x":12, "y":1.5}, + {"label":"KD6", "x":13, "y":1.5, "w":2}, + {"label":"KQ7", "x":15.25, "y":1.5}, + {"label":"KN7", "x":16.25, "y":1.5}, + {"label":"KM7", "x":17.25, "y":1.5}, + {"label":"KG6", "x":0, "y":2.5, "w":1.5}, + {"label":"KG3", "x":1.5, "y":2.5}, + {"label":"KH3", "x":2.5, "y":2.5}, + {"label":"KJ3", "x":3.5, "y":2.5}, + {"label":"KI3", "x":4.5, "y":2.5}, + {"label":"KI6", "x":5.5, "y":2.5}, + {"label":"KK6", "x":6.5, "y":2.5}, + {"label":"KK3", "x":7.5, "y":2.5}, + {"label":"KL3", "x":8.5, "y":2.5}, + {"label":"KA3", "x":9.5, "y":2.5}, + {"label":"KC3", "x":10.5, "y":2.5}, + {"label":"KC6", "x":11.5, "y":2.5}, + {"label":"KL6", "x":12.5, "y":2.5}, + {"label":"KD4", "x":13.5, "y":2.5, "w":1.5}, + {"label":"KP7", "x":15.25, "y":2.5}, + {"label":"KN5", "x":16.25, "y":2.5}, + {"label":"KM5", "x":17.25, "y":2.5}, + {"label":"KH6", "x":0, "y":3.5, "w":1.75}, + {"label":"KG4", "x":1.75, "y":3.5}, + {"label":"KH4", "x":2.75, "y":3.5}, + {"label":"KJ4", "x":3.75, "y":3.5}, + {"label":"KI4", "x":4.75, "y":3.5}, + {"label":"KI1", "x":5.75, "y":3.5}, + {"label":"KK1", "x":6.75, "y":3.5}, + {"label":"KK4", "x":7.75, "y":3.5}, + {"label":"KL4", "x":8.75, "y":3.5}, + {"label":"KA4", "x":9.75, "y":3.5}, + {"label":"KC4", "x":10.75, "y":3.5}, + {"label":"KC1", "x":11.75, "y":3.5}, + {"label":"KD0", "x":12.75, "y":3.5, "w":2.25}, + {"label":"KF6", "x":0, "y":4.5, "w":1.25}, + {"label":"KH1", "x":1.25, "y":4.5}, + {"label":"KG0", "x":2.25, "y":4.5}, + {"label":"KH0", "x":3.25, "y":4.5}, + {"label":"KJ0", "x":4.25, "y":4.5}, + {"label":"KI0", "x":5.25, "y":4.5}, + {"label":"KI2", "x":6.25, "y":4.5}, + {"label":"KK2", "x":7.25, "y":4.5}, + {"label":"KK0", "x":8.25, "y":4.5}, + {"label":"KL0", "x":9.25, "y":4.5}, + {"label":"KA0", "x":10.25, "y":4.5}, + {"label":"KC2", "x":11.25, "y":4.5}, + {"label":"KF4", "x":12.25, "y":4.5, "w":2.75}, + {"label":"KN1", "x":16.25, "y":4.5}, + {"label":"KO7", "x":0, "y":5.5, "w":1.25}, + {"label":"KE6", "x":1.25, "y":5.5, "w":1.25}, + {"label":"KB1", "x":2.5, "y":5.5, "w":1.25}, + {"label":"KP1", "x":3.75, "y":5.5, "w":6.25}, + {"label":"KB2", "x":10, "y":5.5, "w":1.25}, + {"label":"KR4", "x":11.25, "y":5.5, "w":1.25}, + {"label":"KA2", "x":12.5, "y":5.5, "w":1.25}, + {"label":"KO0", "x":13.75, "y":5.5, "w":1.25}, + {"label":"KN2", "x":15.25, "y":5.5}, + {"label":"KP2", "x":16.25, "y":5.5}, + {"label":"KQ2", "x":17.25, "y":5.5} + ] + } + } +} diff --git a/keyboards/hid_liber/keymaps/default/config.h b/keyboards/hid_liber/keymaps/default/config.h deleted file mode 100755 index 7b9637ef9c2c..000000000000 --- a/keyboards/hid_liber/keymaps/default/config.h +++ /dev/null @@ -1 +0,0 @@ -#pragma once \ No newline at end of file diff --git a/keyboards/hid_liber/keymaps/default/keymap.c b/keyboards/hid_liber/keymaps/default/keymap.c index 1102b0b96b75..60ff8d11b007 100755 --- a/keyboards/hid_liber/keymaps/default/keymap.c +++ b/keyboards/hid_liber/keymaps/default/keymap.c @@ -16,45 +16,26 @@ */ #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 // Base Layer -#define _FL 1 // Media Layer +enum layer_names { + _BL, // Base Layer + _FL, // Media Layer +}; const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [_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_BRK, \ - 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_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, MO(_FL), KC_RCTL, KC_LEFT, KC_DOWN, KC_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_BRK, + 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_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, MO(_FL), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT ), - [_FL] = LAYOUT( \ - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_VOLD, KC_MSTP, KC_VOLU, \ - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_MPLY, KC_MNXT, \ - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ + [_FL] = LAYOUT( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_VOLD, KC_MSTP, KC_VOLU, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_MPLY, KC_MNXT, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ ), }; - -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/hid_liber/keymaps/default/readme.md b/keyboards/hid_liber/keymaps/default/readme.md index 963524389ee9..2bae07e5484d 100755 --- a/keyboards/hid_liber/keymaps/default/readme.md +++ b/keyboards/hid_liber/keymaps/default/readme.md @@ -1,4 +1,4 @@ -# ANSI Keymap for the HID Liberation Device +# The default keymap for the HID Liberation Device A basic keymap intended for the HID Liberation Device using the standard ANSI layout. @@ -19,9 +19,9 @@ This keymap has two layers. To access the functions on the second layer, hold do |-----------------------------------------------------------| '-----------' |Caps | A| S| D| F| G| H| J| K| L| ;| '|Return | |-----------------------------------------------------------| ,---. - |Shift | Z| X| C| V| B| N| M| ,| .| /|Shift | |Up | + |Sft |ISO| Z| X| C| V| B| N| M| ,| .| /|Shift | |Up | |-----------------------------------------------------------| ,-----------. - |Ctl|Gui|Alt| Space |Alt|Gui|Fn |Ctl| |Lef|Dow|Rig| + |Ctl |Gui |Alt | Space |Alt |Gui |Fn |Ctl | |Lef|Dow|Rig| `-----------------------------------------------------------' `-----------' ### Layer 2: Media Layer @@ -35,7 +35,7 @@ This keymap has two layers. To access the functions on the second layer, hold do |-----------------------------------------------------------| '-----------' | | | | | | | | | | | | | | |-----------------------------------------------------------| ,---. - | | | | | | | | | | | | | | | + | | | | | | | | | | | | | | | | |-----------------------------------------------------------| ,-----------. - | | | | | | | | | | | | | + | | | | | | | | | | | | | `-----------------------------------------------------------' `-----------' diff --git a/keyboards/hid_liber/keymaps/default/rules.mk b/keyboards/hid_liber/keymaps/default/rules.mk deleted file mode 100755 index 15b7f725b26d..000000000000 --- a/keyboards/hid_liber/keymaps/default/rules.mk +++ /dev/null @@ -1 +0,0 @@ -CONSOLE_ENABLE = yes diff --git a/keyboards/hid_liber/readme.md b/keyboards/hid_liber/readme.md index bc16c165bed9..d70ace123d5f 100755 --- a/keyboards/hid_liber/readme.md +++ b/keyboards/hid_liber/readme.md @@ -1,15 +1,17 @@ -HID Liberation Device -===================== -DIY daughterboard for Filco Majestouch TKL developed by Geekhack and Deskthority communities. -The PCB was engineered by bpiphany. +# HID Liberation Device + +DIY daughterboard for Filco Majestouch TKL developed by Geekhack and Deskthority communities. The PCB was engineered by bpiphany. ## Wiki on Deskthority.net - [Instructions](http://deskthority.net/wiki/HID_Liberation_Device_-_Instructions) - [Assembly Instructions](http://deskthority.net/wiki/HID_Liberation_Device_-_DIY_Instructions) -## Build +* Keyboard Maintainer: [The QMK Community](https://github.com/qmk) +* Hardware Supported: HID Liberation Device (ATmega32U4) +* Hardware Availability: Discontinued + Make example for this keyboard (after setting up your build environment): make hid_liber: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). diff --git a/keyboards/hid_liber/rules.mk b/keyboards/hid_liber/rules.mk index a0f881731a79..f4d7618ec051 100755 --- a/keyboards/hid_liber/rules.mk +++ b/keyboards/hid_liber/rules.mk @@ -17,7 +17,7 @@ BOOTLOADER = atmel-dfu 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 +CONSOLE_ENABLE = yes # 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 From 7f5656996ca2f5a62a148ef9165d0681ba806f07 Mon Sep 17 00:00:00 2001 From: William Lindvall Date: Mon, 15 Jun 2020 03:26:58 -0700 Subject: [PATCH 165/930] [Keymap] Add "shwilliam" Preonic keymap (#9409) Co-authored-by: Ryan --- keyboards/preonic/keymaps/shwilliam/config.h | 19 ++ keyboards/preonic/keymaps/shwilliam/keymap.c | 299 ++++++++++++++++++ keyboards/preonic/keymaps/shwilliam/readme.md | 40 +++ keyboards/preonic/keymaps/shwilliam/rules.mk | 1 + 4 files changed, 359 insertions(+) create mode 100644 keyboards/preonic/keymaps/shwilliam/config.h create mode 100644 keyboards/preonic/keymaps/shwilliam/keymap.c create mode 100644 keyboards/preonic/keymaps/shwilliam/readme.md create mode 100644 keyboards/preonic/keymaps/shwilliam/rules.mk diff --git a/keyboards/preonic/keymaps/shwilliam/config.h b/keyboards/preonic/keymaps/shwilliam/config.h new file mode 100644 index 000000000000..959f94fe2b4b --- /dev/null +++ b/keyboards/preonic/keymaps/shwilliam/config.h @@ -0,0 +1,19 @@ +#pragma once + +#ifdef AUDIO_ENABLE + #define STARTUP_SONG SONG(PREONIC_SOUND) + // #define STARTUP_SONG SONG(NO_SOUND) +#endif + +#define MUSIC_MASK (keycode != KC_NO) + +/* prevent use of disabled MIDI features in the keymap */ +//#define MIDI_ENABLE_STRICT 1 + +#define MIDI_BASIC + +/* enable advanced MIDI features */ +//#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/shwilliam/keymap.c b/keyboards/preonic/keymaps/shwilliam/keymap.c new file mode 100644 index 000000000000..c9d6cbab4236 --- /dev/null +++ b/keyboards/preonic/keymaps/shwilliam/keymap.c @@ -0,0 +1,299 @@ +/* Copyright 2020 William Lindvall + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public 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 { + LIQUOT = SAFE_RANGE, + RIQUOT, + LQUOT, + RQUOT, + LTITLE, + RTITLE, + TBULLET, + FBULLET, + FN_ARROW, + MAIL, + GITHUB, + HEART, + E_LCRY, + E_FLOWER, + E_SHEART, + E_KISS, + E_PHEART, + E_NOGOOD, + E_PARTY, + E_ROCKET, + E_SHRUG, + E_WIZARD, + E_OKBUST, + E_OKHAND, + E_SLEEP, + E_HUNNED, + E_2HEART +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case LIQUOT: + if (record->event.pressed) { + SEND_STRING(SS_LALT("300a")); + } + return false; + case RIQUOT: + if (record->event.pressed) { + SEND_STRING(SS_LALT("300b")); + } + return false; + case LQUOT: + if (record->event.pressed) { + SEND_STRING(SS_LALT("300c")); + } + return false; + case RQUOT: + if (record->event.pressed) { + SEND_STRING(SS_LALT("300d")); + } + return false; + case LTITLE: + if (record->event.pressed) { + SEND_STRING(SS_LALT("3010")); + } + return false; + case RTITLE: + if (record->event.pressed) { + SEND_STRING(SS_LALT("3011")); + } + return false; + case TBULLET: + if (record->event.pressed) { + SEND_STRING(SS_LALT("2023")); + } + return false; + case FBULLET: + if (record->event.pressed) { + SEND_STRING(SS_LALT("2055")); + } + return false; + case MAIL: + if (record->event.pressed) { + SEND_STRING("w-lindvall@outlook.com"); + } + return false; + case GITHUB: + if (record->event.pressed) { + SEND_STRING("https://github.com/shwilliam"); + } + return false; + case FN_ARROW: + if (record->event.pressed) { + SEND_STRING("=>"); + } + return false; + case HEART: + if (record->event.pressed) { + SEND_STRING(SS_LALT("2661")); + } + return false; + case E_LCRY: + if (record->event.pressed) { + SEND_STRING(SS_LALT("D83D+DE02")); + } + return false; + case E_FLOWER: + if (record->event.pressed) { + SEND_STRING(SS_LALT("D83C+DF38")); + } + return false; + case E_SHEART: + if (record->event.pressed) { + SEND_STRING(SS_LALT("D83D+DC96")); + } + return false; + case E_KISS: + if (record->event.pressed) { + SEND_STRING(SS_LALT("D83D+DE18")); + } + return false; + case E_PHEART: + if (record->event.pressed) { + SEND_STRING(SS_LALT("D83D+DC9C")); + } + return false; + case E_NOGOOD: + if (record->event.pressed) { + SEND_STRING(SS_LALT("D83D+DE45")); + } + return false; + case E_PARTY: + if (record->event.pressed) { + SEND_STRING(SS_LALT("D83C+DF8A")); + } + return false; + case E_ROCKET: + if (record->event.pressed) { + SEND_STRING(SS_LALT("D83D+DE80")); + } + return false; + case E_SHRUG: + if (record->event.pressed) { + SEND_STRING(SS_LALT("D83E+DD37")); + } + return false; + case E_WIZARD: + if (record->event.pressed) { + SEND_STRING(SS_LALT("D83E+DDD9")); + } + return false; + case E_OKBUST: + if (record->event.pressed) { + SEND_STRING(SS_LALT("D83D+DE46")); + } + return false; + case E_OKHAND: + if (record->event.pressed) { + SEND_STRING(SS_LALT("D83D+DC4C")); + } + return false; + case E_SLEEP: + if (record->event.pressed) { + SEND_STRING(SS_LALT("D83D+DE34")); + } + return false; + case E_HUNNED: + if (record->event.pressed) { + SEND_STRING(SS_LALT("D83D+DCAF")); + } + return false; + case E_2HEART: + if (record->event.pressed) { + SEND_STRING(SS_LALT("D83D+DC95")); + } + return false; + } + return true; +}; + +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 | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | H/Esc| a | s | d | f | g | h | j | k | l | ' | Enter| + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | Shift| z | x | c | v | b | n | m | , | . | / | ; | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | PDown| PUp | Alt | OS | Opt | Raise| Space| Lower| Left | Down | Up | Right| + * `-----------------------------------------------------------------------------------' + */ + + [0] = 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_DEL, + KC_TAB ,KC_Q ,KC_W ,KC_E ,KC_R ,KC_T ,KC_Y ,KC_U ,KC_I ,KC_O ,KC_P ,KC_BSPC, + C_S_T(KC_ESC),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_B ,KC_N ,KC_M ,KC_COMM ,KC_DOT ,KC_SLSH ,KC_SCLN, + KC_PGDN ,KC_PGUP ,KC_LALT ,KC_LGUI ,KC_LCTL ,MO(1) ,KC_SPC ,MO(2) ,KC_LEFT ,KC_DOWN ,KC_UP ,KC_RGHT + ), + + /* raise + * ,-----------------------------------------------------------------------------------. + * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) |SRight| + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | Q | W | E | R | T | Y | U | I | O | P | SLeft| + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | A | S | D | F | G | H | J | K | L | " | \ | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | Emoji| Z | X | C | V | B | N | M | < | > | ? | : | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | End | Home | ShAlt| ShOS | ShOpt|~~~~~~| Space| | | BDown| BUp | | + * `-----------------------------------------------------------------------------------' + */ + + [1] = 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 ,SGUI(KC_RGHT), + KC_NO ,LSFT(KC_Q),LSFT(KC_W) ,LSFT(KC_E) ,LSFT(KC_R) ,LSFT(KC_T),LSFT(KC_Y),LSFT(KC_U),LSFT(KC_I),LSFT(KC_O),LSFT(KC_P),SGUI(KC_LEFT), + KC_NO ,LSFT(KC_A),LSFT(KC_S) ,LSFT(KC_D) ,LSFT(KC_F) ,LSFT(KC_G),LSFT(KC_H),LSFT(KC_J),LSFT(KC_K),LSFT(KC_L),KC_DQUO ,KC_BSLS, + OSL(3) ,LSFT(KC_Z),LSFT(KC_X) ,LSFT(KC_C) ,LSFT(KC_V) ,LSFT(KC_B),LSFT(KC_N),LSFT(KC_M),KC_LT ,KC_GT ,KC_QUES ,KC_COLN, + KC_END ,KC_HOME ,LSFT(KC_LALT),LSFT(KC_LGUI),LSFT(KC_LCTL),KC_TRNS ,KC_SPC ,KC_TRNS ,KC_NO ,KC_BRID ,KC_BRIU ,KC_NO + ), + + /* lower + * ,-----------------------------------------------------------------------------------. + * | ♡ | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | ‣ | CLeft| MUp |CRight|MWDown| 【 | - | _ | | | = | + | DLeft| + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | MLeft| MDown|MRight| MWUp | 】 | Left | Down | Up | Right| ( | ) | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | 《 | 》 | 「 | 」 | ⁕ | | { | } | [ | ] | => | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Mail |GitHub| | | | | Space|~~~~~~| VMute| VDown| VUp | | + * `-----------------------------------------------------------------------------------' + */ + + [2] = LAYOUT_preonic_grid( + HEART ,KC_F1 ,KC_F2 ,KC_F3 ,KC_F4 ,KC_F5 ,KC_F6 ,KC_F7 ,KC_F8 ,KC_F9 ,KC_F10 ,KC_NO, + TBULLET ,KC_BTN1 ,KC_MS_U ,KC_BTN2 ,KC_WH_D ,LTITLE ,KC_MINS ,KC_UNDS ,KC_PIPE ,KC_EQL ,KC_PLUS ,LGUI(KC_BSPC), + KC_NO ,KC_MS_L ,KC_MS_D ,KC_MS_R ,KC_WH_U ,RTITLE ,KC_LEFT ,KC_DOWN ,KC_UP ,KC_RGHT ,KC_LPRN ,KC_RPRN, + KC_NO ,LIQUOT ,RIQUOT ,LQUOT ,RQUOT ,FBULLET ,KC_NO ,KC_LCBR ,KC_RCBR ,KC_LBRC ,KC_RBRC ,FN_ARROW, + MAIL ,GITHUB ,KC_NO ,KC_NO ,KC_NO ,KC_TRNS ,KC_BSPC ,KC_TRNS ,KC_MUTE ,KC_VOLD ,KC_VOLU ,KC_NO + ), + + /* emoji + * ,-----------------------------------------------------------------------------------. + * | | 1 | 2 | | | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | w | | r | | y | | | o | p | | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | | s | | f | | h | | k | l | | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | z | | c | | | n | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | | + * `-----------------------------------------------------------------------------------' + * + * mnemonics: + * + * 100 - 💯 + * 2 hearts - 💕 + * cry - 😂 + * flower - 🌸 + * heart - 💖 + * kiss - 😘 + * love - 💜 + * no - 🙅 + * ok - 🙆 + * party - 🎊 + * rocket - 🚀 + * shrug - 🤷 + * wizard - 🧙 + * yes - 👌 + * zzz - 😴 + * + */ + + [3] = LAYOUT_preonic_grid( + KC_NO ,E_HUNNED,E_2HEART,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO, + KC_NO ,KC_NO ,E_WIZARD,KC_NO ,E_ROCKET,KC_NO ,E_OKHAND,KC_NO ,KC_NO ,E_OKBUST,E_PARTY ,KC_NO, + KC_NO ,KC_NO ,E_SHRUG ,KC_NO ,E_FLOWER,KC_NO ,E_SHEART,KC_NO ,E_KISS ,E_PHEART,KC_NO ,KC_NO, + KC_NO ,E_SLEEP ,KC_NO ,E_LCRY ,KC_NO ,KC_NO ,E_NOGOOD,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO, + KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO + ) + +}; diff --git a/keyboards/preonic/keymaps/shwilliam/readme.md b/keyboards/preonic/keymaps/shwilliam/readme.md new file mode 100644 index 000000000000..bb0f2e1797ba --- /dev/null +++ b/keyboards/preonic/keymaps/shwilliam/readme.md @@ -0,0 +1,40 @@ +# [@shwilliam](https://github.com/shwilliam)'s Preonic Layout + +![shwilliam's preonic layout image](https://user-images.githubusercontent.com/38357771/84585088-dc536380-adc0-11ea-8378-6fb8ffbc6a8d.png) + +## Overview + +- Shift, backspace, raise and lower on thumbs +- Arrows on Vim keys +- Function arrow key (`=>`) +- Common parens one key from home-row +- Brightness/volume control +- Tap caps-lock for escape, hold for left control and left shift +- Alternative punctuation + - Corner brackets + - Double-angle brackets + - Lenticular brackets +- Select to left and right keys +- Emoji layer + +## Layers + +### QWERTY + +- Base layer; similar to default Preonic keymap + +### Raise + +- Mostly shifted QWERTY layer with alternative actions +- Brightness control + +### Lower + +- Common parentheses +- Arrows on Vim keys +- Mouse controls on WASD +- Volume control + +### Emoji + +- Emoji layout based on mnemonics diff --git a/keyboards/preonic/keymaps/shwilliam/rules.mk b/keyboards/preonic/keymaps/shwilliam/rules.mk new file mode 100644 index 000000000000..dcf16bef3994 --- /dev/null +++ b/keyboards/preonic/keymaps/shwilliam/rules.mk @@ -0,0 +1 @@ +SRC += muse.c From 357a888d805c21c9cb4917f55d558195e8b85db5 Mon Sep 17 00:00:00 2001 From: Drashna Jaelre Date: Mon, 15 Jun 2020 03:41:28 -0700 Subject: [PATCH 166/930] [Keymap] Drashna's Keymap Update - Display Edition (#9282) OLED Display fixes Add support for RGBLIGHT Layers Add gaming layer to corn and kyria RGBLight Startup Animation fixes and improvements (uses matrix_scan now!) Pimoroni Trackball support added (IT'S RGB!!!) Fix issues due to code changes --- keyboards/crkbd/keymaps/drashna/keymap.c | 12 +- keyboards/kyria/keymaps/drashna/config.h | 1 + keyboards/kyria/keymaps/drashna/keymap.c | 48 ++++- keyboards/kyria/keymaps/drashna/rules.mk | 6 +- layouts/community/ergodox/drashna/config.h | 5 +- layouts/community/ergodox/drashna/keymap.c | 58 +++++- layouts/community/ergodox/drashna/rules.mk | 14 +- layouts/community/ortho_5x12/drashna/rules.mk | 11 +- users/drashna/.gitlab-ci.yml | 5 +- users/drashna/config.h | 7 +- users/drashna/drashna.c | 6 +- users/drashna/drashna.h | 3 + users/drashna/oled_stuff.c | 17 +- users/drashna/pimoroni_trackball.c | 114 +++++++++++ users/drashna/pimoroni_trackball.h | 18 ++ users/drashna/process_records.c | 2 +- users/drashna/rgb_matrix_stuff.c | 6 +- users/drashna/rgb_stuff.c | 177 ++++-------------- users/drashna/rules.mk | 10 +- 19 files changed, 332 insertions(+), 188 deletions(-) create mode 100644 users/drashna/pimoroni_trackball.c create mode 100644 users/drashna/pimoroni_trackball.h diff --git a/keyboards/crkbd/keymaps/drashna/keymap.c b/keyboards/crkbd/keymaps/drashna/keymap.c index 0769edf3b94d..d9c1605ce983 100644 --- a/keyboards/crkbd/keymaps/drashna/keymap.c +++ b/keyboards/crkbd/keymaps/drashna/keymap.c @@ -121,7 +121,17 @@ bool process_record_keymap(uint16_t keycode, keyrecord_t *record) { } #ifdef OLED_DRIVER_ENABLE -oled_rotation_t oled_init_user(oled_rotation_t rotation) { return OLED_ROTATION_270; } +oled_rotation_t oled_init_user(oled_rotation_t rotation) { +# ifndef SPLIT_KEYBOARD + if (is_master) { +# endif + return OLED_ROTATION_270; +# ifndef SPLIT_KEYBOARD + } else { + return rotation; + } +# endif +} #endif uint16_t get_tapping_term(uint16_t keycode, keyrecord_t *record) { diff --git a/keyboards/kyria/keymaps/drashna/config.h b/keyboards/kyria/keymaps/drashna/config.h index f93069ac00ef..5e9d8b010eba 100644 --- a/keyboards/kyria/keymaps/drashna/config.h +++ b/keyboards/kyria/keymaps/drashna/config.h @@ -32,6 +32,7 @@ # define RGBLIGHT_SAT_STEP 8 # define RGBLIGHT_VAL_STEP 8 # define RGBLIGHT_SPLIT +# define RGBLIGHT_LAYERS #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 5e97ca55adb4..98afff19f9f5 100644 --- a/keyboards/kyria/keymaps/drashna/keymap.c +++ b/keyboards/kyria/keymaps/drashna/keymap.c @@ -23,7 +23,7 @@ uint8_t is_master; 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, MEH(KC_MINS), TG(_DIABLO), KC_NO, K26, K27, K28, K29, RCTL_T(K2A), OS_RSFT, \ + OS_LSFT, CTL_T(K21), K22, K23, K24, K25, TG(_GAMEPAD), MEH(KC_MINS), TG(_DIABLO), KC_CAPS, 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 */ @@ -85,6 +85,14 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_LSFT, ___________________BLANK___________________, _______, _______, _______, _______, ___________________BLANK___________________, KC_RSFT, _______, _______, KC_LALT, _______, _______, _______, _______, KC_RGUI, _______, _______ ), + + [_GAMEPAD] = LAYOUT_wrapper( + KC_ESC, KC_K, KC_Q, KC_W, KC_E, KC_R, _______, _______, _______, _______, _______, _______, + KC_TAB, KC_G, KC_A, KC_S, KC_D, KC_F, _______, _______, _______, _______, _______, _______, + KC_LCTL, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, _______, _______, _______, LALT(KC_PSCR), _______, _______, _______, _______, _______, _______, + _______, MAGIC_TOGGLE_NKRO, KC_V, KC_SPC, KC_H, _______, _______, _______, _______, _______ + ), + [_DIABLO] = LAYOUT_wrapper( KC_ESC, KC_S, KC_I, KC_F, KC_M, KC_T, KC_F9, KC_F10, KC_F11, KC_F12, KC_NO, KC_NO, KC_TAB, KC_1, KC_2, KC_3, KC_4, KC_G, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, @@ -172,3 +180,41 @@ void encoder_update_user(uint8_t index, bool clockwise) { } } #endif + +#ifdef RGBLIGHT_LAYERS +const rgblight_segment_t PROGMEM shift_layers[] = RGBLIGHT_LAYER_SEGMENTS( + { 8, 1, 120, 255, 255}, + { 18, 1, 120, 255, 255} +); +const rgblight_segment_t PROGMEM control_layers[] = RGBLIGHT_LAYER_SEGMENTS( + { 6, 1, 0, 255, 255}, + { 16, 1, 0, 255, 255} +); +const rgblight_segment_t PROGMEM alt_layers[] = RGBLIGHT_LAYER_SEGMENTS( + { 2, 1, 240, 255, 255}, + { 17, 1, 250, 255, 255} +); +const rgblight_segment_t PROGMEM gui_layers[] = RGBLIGHT_LAYER_SEGMENTS( + { 7, 1, 51, 255, 255}, + { 12, 1, 51, 255, 255} +); + +const rgblight_segment_t* const PROGMEM my_rgb_layers[] = RGBLIGHT_LAYERS_LIST( + shift_layers, + control_layers, + alt_layers, + gui_layers +); + +void keyboard_post_init_keymap(void) { + rgblight_layers = my_rgb_layers; +} + +void matrix_scan_keymap(void) { + uint8_t mods = mod_config(get_mods()|get_oneshot_mods()); + rgblight_set_layer_state(0, mods & MOD_MASK_SHIFT); + rgblight_set_layer_state(1, mods & MOD_MASK_CTRL); + rgblight_set_layer_state(2, mods & MOD_MASK_ALT); + rgblight_set_layer_state(3, mods & MOD_MASK_GUI); +} +#endif diff --git a/keyboards/kyria/keymaps/drashna/rules.mk b/keyboards/kyria/keymaps/drashna/rules.mk index 2486ecd5d5d9..0604c84bdd86 100644 --- a/keyboards/kyria/keymaps/drashna/rules.mk +++ b/keyboards/kyria/keymaps/drashna/rules.mk @@ -1,17 +1,17 @@ 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 = no +RGBLIGHT_STARTUP_ANIMATION = yes BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration -MOUSEKEY_ENABLE = no # Mouse keys +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 BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default MIDI_ENABLE = no # MIDI support -UNICODE_ENABLE = yes # Unicode +UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches diff --git a/layouts/community/ergodox/drashna/config.h b/layouts/community/ergodox/drashna/config.h index 8f1c9f6a2a61..8ad589f93815 100644 --- a/layouts/community/ergodox/drashna/config.h +++ b/layouts/community/ergodox/drashna/config.h @@ -15,7 +15,7 @@ #define PRODUCT DrashnaDox - Hacked ErgoDox EZ Hybrid Monstrosity #undef DEBOUNCE -#define DEBOUNCE 60 +#define DEBOUNCE 15 #define TAPPING_TERM_PER_KEY @@ -30,3 +30,6 @@ # undef RGBLIGHT_SLEEP # endif #endif + +#define PIMORONI_TRACKBALL_INVERT_X +#define PIMORONI_TRACKBALL_INVERT_Y diff --git a/layouts/community/ergodox/drashna/keymap.c b/layouts/community/ergodox/drashna/keymap.c index cb256e5e57b8..8f5aaf6cdc57 100644 --- a/layouts/community/ergodox/drashna/keymap.c +++ b/layouts/community/ergodox/drashna/keymap.c @@ -10,7 +10,11 @@ extern rgblight_config_t rgblight_config; #endif -enum more_custom_keycodes { KC_SWAP_NUM = NEW_SAFE_RANGE }; +enum more_custom_keycodes { + KC_SWAP_NUM = NEW_SAFE_RANGE, + PM_SCROLL, + PM_PRECISION, +}; // define layer change stuff for underglow indicator bool skip_leds = false; @@ -33,7 +37,7 @@ bool skip_leds = false; LALT_T(KC_TAB), K01, K02, K03, K04, K05, TG(_DIABLO), TG(_DIABLO), K06, K07, K08, K09, K0A, KC_BSLS, \ KC_C1R3, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, RALT_T(KC_QUOT), \ KC_MLSF, CTL_T(K21), K22, K23, K24, K25, TG(_GAMEPAD), TG(_GAMEPAD), K26, K27, K28, K29, RCTL_T(K2A), KC_MRSF, \ - KC_GRV, OS_MEH, OS_HYPR, KC_LBRC, KC_RBRC, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, UC(0x2E2E), \ + KC_GRV, OS_MEH, OS_HYPR, KC_LBRC, KC_RBRC, KC_BTN1, KC_BTN3, KC_BTN2, PM_SCROLL, PM_PRECISION, \ OS_LALT, OS_LGUI, OS_RGUI, CTL_T(KC_ESCAPE), \ KC_APP, KC_MENU, \ KC_SPC, LT(_LOWER, KC_BSPC), OS_LWR, OS_RSE, LT(_RAISE, KC_DEL), KC_ENT \ @@ -281,7 +285,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_ADJUST] = LAYOUT_ergodox_pretty_wrapper( KC_MAKE, _______, _______, _______, _______, _______, UC_MOD, KC_NUKE, _________________ADJUST_R1_________________, KC_RST, - VRSN, _________________ADJUST_L1_________________, _______, _______, _______, _______, _______, _______, _______, EEP_RST, + VRSN, _________________ADJUST_L1_________________, _______, _______, _________________ADJUST_R1_________________, EEP_RST, _______, _________________ADJUST_L2_________________, _________________ADJUST_R2_________________, RGB_IDL, _______, _________________ADJUST_L3_________________, _______, _______, _________________ADJUST_R3_________________, TG(_MODS), _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, @@ -293,6 +297,26 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { }; // clang-format on +#ifdef PIMORONI_TRACKBALL_ENABLE +void run_trackball_cleanup(void) { + if (trackball_is_scrolling()) { + trackball_set_rgbw(RGB_CYAN, 0x00); + } else if (trackball_get_precision() != 1.0) { + trackball_set_rgbw(RGB_GREEN, 0x00); + } else { + trackball_set_rgbw(RGB_MAGENTA, 0x00); + } +} + +void keyboard_post_init_keymap(void) { + // trackball_set_precision(1.5); + trackball_set_rgbw(RGB_MAGENTA, 0x00); +} +void shutdown_keymap(void) { + trackball_set_rgbw(RGB_RED, 0x00); +} +#endif + bool process_record_keymap(uint16_t keycode, keyrecord_t *record) { switch (keycode) { case KC_1: @@ -321,6 +345,34 @@ bool process_record_keymap(uint16_t keycode, keyrecord_t *record) { eeconfig_update_user(userspace_config.raw); } break; +#ifdef PIMORONI_TRACKBALL_ENABLE + case PM_SCROLL: + trackball_set_scrolling(record->event.pressed); + run_trackball_cleanup(); + break; + case PM_PRECISION: + if (record->event.pressed) { + trackball_set_precision(1.5); + } else { + trackball_set_precision(1); + } + run_trackball_cleanup(); + break; +#if !defined(MOUSEKEY_ENABLE) && defined(POINTING_DEVICE_ENABLE) + case KC_BTN1 ... KC_BTN3: + { + report_mouse_t currentReport = pointing_device_get_report(); + if (record->event.pressed) { + currentReport.buttons |= (1 << (keycode - KC_BTN1)); // this is defined in report.h + } else { + currentReport.buttons &= ~(1 << (keycode - KC_BTN1)); + } + pointing_device_set_report(currentReport); + pointing_device_send(); + break; + } +# endif +#endif } // switch (keycode) { // case KC_P00: diff --git a/layouts/community/ergodox/drashna/rules.mk b/layouts/community/ergodox/drashna/rules.mk index 387bd20f68d6..51b4c9a6010f 100644 --- a/layouts/community/ergodox/drashna/rules.mk +++ b/layouts/community/ergodox/drashna/rules.mk @@ -1,18 +1,20 @@ BOOTMAGIC_ENABLE = lite TAP_DANCE_ENABLE = yes COMMAND_ENABLE = no # Commands for debug and configuration -CONSOLE_ENABLE = +CONSOLE_ENABLE = no SPACE_CADET_ENABLE = no ifeq ($(strip $(KEYBOARD)), ergodox_ez) - RGBLIGHT_ENABLE = yes - RGB_MATRIX_ENABLE = yes - RGBLIGHT_TWINKLE = no - INDICATOR_LIGHTS = no + RGBLIGHT_ENABLE = yes + RGB_MATRIX_ENABLE = yes + RGBLIGHT_TWINKLE = no + INDICATOR_LIGHTS = no RGBLIGHT_STARTUP_ANIMATION = yes + PIMORONI_TRACKBALL_ENABLE = yes + MOUSEKEY_ENABLE = no endif -UNICODE_ENABLE = yes +UNICODE_ENABLE = no UNICDOEMAP_ENABLE = no diff --git a/layouts/community/ortho_5x12/drashna/rules.mk b/layouts/community/ortho_5x12/drashna/rules.mk index b5d55a681d8d..2c59c614fea4 100644 --- a/layouts/community/ortho_5x12/drashna/rules.mk +++ b/layouts/community/ortho_5x12/drashna/rules.mk @@ -7,9 +7,10 @@ TAP_DANCE_ENABLE = no NKRO_ENABLE = yes ifeq ($(strip $(KEYBOARD)), fractal) - RGB_MATRIX_ENABLE = no - AUDIO_ENABLE = yes - RGBLIGHT_ENABLE = yes - RGBLIGHT_TWINKLE = yes - BOOTLOADER = qmk-dfu + RGB_MATRIX_ENABLE = no + AUDIO_ENABLE = yes + RGBLIGHT_ENABLE = yes + RGBLIGHT_TWINKLE = yes + RGBLIGHT_STARTUP_ANIMATION = yes + BOOTLOADER = qmk-dfu endif diff --git a/users/drashna/.gitlab-ci.yml b/users/drashna/.gitlab-ci.yml index 7218a21bec48..71d216267fbb 100644 --- a/users/drashna/.gitlab-ci.yml +++ b/users/drashna/.gitlab-ci.yml @@ -7,16 +7,15 @@ QMK Firmware: GIT_SUBMODULE_STRATEGY: recursive tags: - linux - image: ubuntu:18.10 + image: qmkfm/base_container before_script: - apt-get update -qy - apt-get install -y build-essential avr-libc binutils-arm-none-eabi binutils-avr dfu-programmer dfu-util gcc gcc-arm-none-eabi git libnewlib-arm-none-eabi gcc-avr python3 unzip wget zip - avr-gcc --version - uname -a script: - - make test:all - make planck/rev6:default planck/rev5:default - - make keebio/iris/rev2:drashna keebio/iris/rev2:drashna_old ergodox_ez:drashna ergodox_ez:drashna_glow keebio/viterbi/rev1:drashna orthodox/rev1:drashna orthodox/rev3:drashna crkbd:drashna planck/light:drashna planck/rev6:drashna fractal:drashna primekb/prime_m:drashna -j2 --output-sync + - make all:drashna -j2 artifacts: name: "$CI_JOB_NAME-$CI_COMMIT_REF_SLUG" paths: diff --git a/users/drashna/config.h b/users/drashna/config.h index 64b4b64ab792..7d83c7884443 100644 --- a/users/drashna/config.h +++ b/users/drashna/config.h @@ -1,7 +1,7 @@ #pragma once // Use custom magic number so that when switching branches, EEPROM always gets reset -#define EECONFIG_MAGIC_NUMBER (uint16_t)0x1338 +#define EECONFIG_MAGIC_NUMBER (uint16_t)0x1339 /* Set Polling rate to 1000Hz */ #define USB_POLLING_INTERVAL_MS 1 @@ -98,8 +98,9 @@ # define ONESHOT_TIMEOUT 3000 #endif // !ONESHOT_TIMEOUT -#ifndef QMK_KEYS_PER_SCAN -# define QMK_KEYS_PER_SCAN 4 +#ifdef QMK_KEYS_PER_SCAN +# undef QMK_KEYS_PER_SCAN +# define QMK_KEYS_PER_SCAN 1 #endif // !QMK_KEYS_PER_SCAN // this makes it possible to do rolling combos (zx) with keys that diff --git a/users/drashna/drashna.c b/users/drashna/drashna.c index ba19d4803fd8..5c0f180278e7 100644 --- a/users/drashna/drashna.c +++ b/users/drashna/drashna.c @@ -113,13 +113,9 @@ 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/drashna.h b/users/drashna/drashna.h index c10ea5114a0d..dd2b0225841a 100644 --- a/users/drashna/drashna.h +++ b/users/drashna/drashna.h @@ -34,6 +34,9 @@ along with this program. If not, see . #if defined(OLED_DRIVER_ENABLE) # include "oled_stuff.h" #endif +#if defined(PIMORONI_TRACKBALL_ENABLE) +# include "pimoroni_trackball.h" +#endif /* Define layer names */ enum userspace_layers { diff --git a/users/drashna/oled_stuff.c b/users/drashna/oled_stuff.c index 7580de1d33b2..6503b970e258 100644 --- a/users/drashna/oled_stuff.c +++ b/users/drashna/oled_stuff.c @@ -170,6 +170,13 @@ void render_bootmagic_status(void) { {{0x95, 0x96, 0}, {0xb5, 0xb6, 0}}, }; + bool is_bootmagic_on; + #ifdef OLED_DISPLAY_128X64 + is_bootmagic_on = !keymap_config.swap_lctl_lgui; + #else + is_bootmagic_on = keymap_config.swap_lctl_lgui; + #endif + oled_write_P(PSTR(OLED_RENDER_BOOTMAGIC_NAME), false); #ifdef OLED_DISPLAY_128X64 if (keymap_config.swap_lctl_lgui) @@ -177,11 +184,11 @@ void render_bootmagic_status(void) { oled_write_P(PSTR(" "), false); #endif { - oled_write_P(logo[1][0], false); + oled_write_P(logo[1][0], is_bootmagic_on); #ifdef OLED_DISPLAY_128X64 } else { #endif - oled_write_P(logo[0][0], false); + oled_write_P(logo[0][0], !is_bootmagic_on); } oled_write_P(PSTR(" "), false); #ifdef OLED_DISPLAY_128X64 @@ -192,11 +199,11 @@ void render_bootmagic_status(void) { if (keymap_config.swap_lctl_lgui) #endif { - oled_write_P(logo[1][1], false); + oled_write_P(logo[1][1], is_bootmagic_on); #ifdef OLED_DISPLAY_128X64 } else { #endif - oled_write_P(logo[0][1], false); + oled_write_P(logo[0][1], !is_bootmagic_on); } oled_write_P(PSTR(" "), false); #ifdef OLED_DISPLAY_128X64 @@ -233,7 +240,7 @@ __attribute__((weak)) void oled_driver_render_logo(void) { } void render_status_secondary(void) { -#if !defined(SPLIT_TRANSPORT_MIRROR) || defined(OLED_DRIVER_128x64) +#if !defined(SPLIT_TRANSPORT_MIRROR) || defined(OLED_DISPLAY_128X64) oled_driver_render_logo(); #endif #ifdef SPLIT_TRANSPORT_MIRROR diff --git a/users/drashna/pimoroni_trackball.c b/users/drashna/pimoroni_trackball.c new file mode 100644 index 000000000000..c5bb560b354c --- /dev/null +++ b/users/drashna/pimoroni_trackball.c @@ -0,0 +1,114 @@ +#include "pimoroni_trackball.h" +#include "i2c_master.h" + +static uint8_t scrolling = 0; +static int16_t x_offset = 0; +static int16_t y_offset = 0; +static int16_t h_offset = 0; +static int16_t v_offset = 0; +static float precisionSpeed = 1; + +#ifndef I2C_TIMEOUT +# define I2C_TIMEOUT 100 +#endif +#ifndef MOUSE_DEBOUNCE +# define MOUSE_DEBOUNCE 5 +#endif + +void trackball_set_rgbw(uint8_t red, uint8_t green, uint8_t blue, uint8_t white) { + uint8_t data[] = {0x00, red, green, blue, white}; + i2c_transmit(TRACKBALL_WRITE, data, sizeof(data), I2C_TIMEOUT); +} + +int16_t mouse_offset(uint8_t positive, uint8_t negative, int16_t scale) { + int16_t offset = (int16_t)positive - (int16_t)negative; + int16_t magnitude = (int16_t)(scale * offset * offset * precisionSpeed); + return offset < 0 ? -magnitude : magnitude; +} + +void update_member(int8_t* member, int16_t* offset) { + if (*offset > 127) { + *member = 127; + *offset -= 127; + } else if (*offset < -127) { + *member = -127; + *offset += 127; + } else { + *member = *offset; + *offset = 0; + } +} + +__attribute__((weak)) void trackball_check_click(bool pressed, report_mouse_t* mouse) { + if (pressed) { + mouse->buttons |= MOUSE_BTN1; + } else { + mouse->buttons &= ~MOUSE_BTN1; + } +} + +float trackball_get_precision(void) { return precisionSpeed; } +void trackball_set_precision(float precision) { precisionSpeed = precision; } +bool trackball_is_scrolling(void) { return scrolling; } +void trackball_set_scrolling(bool scroll) { scrolling = scroll; } + +__attribute__((weak)) void pointing_device_init(void) { trackball_set_rgbw(0x00,0x00,0x00,0x4F); } + +void pointing_device_task(void) { + static bool debounce; + static uint16_t debounce_timer; + uint8_t state[5] = {}; + if (i2c_readReg(TRACKBALL_WRITE, 0x04, state, 5, I2C_TIMEOUT) == I2C_STATUS_SUCCESS) { + if (!state[4] && !debounce) { + if (scrolling) { +#ifdef PIMORONI_TRACKBALL_INVERT_X + h_offset += mouse_offset(state[2], state[3], 1); +#else + h_offset -= mouse_offset(state[2], state[3], 1); +#endif +#ifdef PIMORONI_TRACKBALL_INVERT_Y + v_offset += mouse_offset(state[1], state[0], 1); +#else + v_offset -= mouse_offset(state[1], state[0], 1); +#endif + } else { +#ifdef PIMORONI_TRACKBALL_INVERT_X + x_offset -= mouse_offset(state[2], state[3], 5); +#else + x_offset += mouse_offset(state[2], state[3], 5); +#endif +#ifdef PIMORONI_TRACKBALL_INVERT_Y + y_offset -= mouse_offset(state[1], state[0], 5); +#else + y_offset += mouse_offset(state[1], state[0], 5); +#endif + } + } else { + if (state[4]) { + debounce = true; + debounce_timer = timer_read(); + } + } + } + + if (timer_elapsed(debounce_timer) > MOUSE_DEBOUNCE) debounce = false; + + report_mouse_t mouse = pointing_device_get_report(); + + trackball_check_click(state[4] & (1 << 7), &mouse); + + +#ifndef PIMORONI_TRACKBALL_ROTATE + update_member(&mouse.x, &x_offset); + update_member(&mouse.y, &y_offset); + update_member(&mouse.h, &h_offset); + update_member(&mouse.v, &v_offset); +#else + update_member(&mouse.x, &y_offset); + update_member(&mouse.y, &x_offset); + update_member(&mouse.h, &v_offset); + update_member(&mouse.v, &h_offset); +#endif + pointing_device_set_report(mouse); + pointing_device_send(); +} diff --git a/users/drashna/pimoroni_trackball.h b/users/drashna/pimoroni_trackball.h new file mode 100644 index 000000000000..7e8a7cc8163a --- /dev/null +++ b/users/drashna/pimoroni_trackball.h @@ -0,0 +1,18 @@ +#pragma once + +#include "quantum.h" +#include "pointing_device.h" + +#ifndef TRACKBALL_ADDRESS +# define TRACKBALL_ADDRESS 0x0A +#endif +#define TRACKBALL_WRITE ((TRACKBALL_ADDRESS << 1) | I2C_WRITE) +#define TRACKBALL_READ ((TRACKBALL_ADDRESS << 1) | I2C_READ) + +void trackball_set_rgbw(uint8_t red, uint8_t green, uint8_t blue, uint8_t white); +void trackball_check_click(bool pressed, report_mouse_t *mouse); + +float trackball_get_precision(void); +void trackball_set_precision(float precision); +bool trackball_is_scrolling(void); +void trackball_set_scrolling(bool scroll); diff --git a/users/drashna/process_records.c b/users/drashna/process_records.c index 101b3d95ceaa..8e3d3356eefe 100644 --- a/users/drashna/process_records.c +++ b/users/drashna/process_records.c @@ -51,7 +51,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { clear_mods(); clear_oneshot_mods(); #endif - send_string_with_delay_P(PSTR("bin/qmk"), TAP_CODE_DELAY); + send_string_with_delay_P(PSTR("qmk"), TAP_CODE_DELAY); #ifndef MAKE_BOOTLOADER if ((temp_mod | temp_osm) & MOD_MASK_SHIFT) #endif diff --git a/users/drashna/rgb_matrix_stuff.c b/users/drashna/rgb_matrix_stuff.c index 0914aab14447..c9c3224fa56d 100644 --- a/users/drashna/rgb_matrix_stuff.c +++ b/users/drashna/rgb_matrix_stuff.c @@ -12,14 +12,14 @@ static uint32_t hypno_timer; 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; + if (hsv.v > rgb_matrix_get_val()) { + hsv.v = rgb_matrix_get_val(); } switch (mode) { case 1: // breathing { - uint16_t time = scale16by8(g_rgb_counters.tick, speed / 8); + uint16_t time = scale16by8(g_rgb_timer, 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++) { diff --git a/users/drashna/rgb_stuff.c b/users/drashna/rgb_stuff.c index 06b1e3c0c411..defee9ac1827 100644 --- a/users/drashna/rgb_stuff.c +++ b/users/drashna/rgb_stuff.c @@ -2,136 +2,13 @@ #include "rgb_stuff.h" #include "eeprom.h" -extern rgblight_config_t rgblight_config; -bool has_initialized; +bool has_initialized; -void rgblight_sethsv_default_helper(uint8_t index) { rgblight_sethsv_at(rgblight_config.hue, rgblight_config.sat, rgblight_config.val, index); } - -/* 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 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 +void rgblight_sethsv_default_helper(uint8_t index) { rgblight_sethsv_at(rgblight_get_hue(), rgblight_get_sat(), rgblight_get_val(), index); } #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; @@ -170,9 +47,6 @@ void start_rgb_light(void) { 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; @@ -197,7 +71,7 @@ void start_rgb_light(void) { light->timer = timer_read(); light->life = 0xC0 + rand() % 0x40; - light->hue = rgblight_config.hue + (rand() % 0xB4) - 0x54; + light->hue = rgblight_get_hue() + (rand() % 0xB4) - 0x54; rgblight_sethsv_at(light->hue, 255, light->life, light_index); } @@ -227,39 +101,52 @@ bool process_record_user_rgb_light(uint16_t keycode, keyrecord_t *record) { return true; } +#if defined(RGBLIGHT_STARTUP_ANIMATION) +static bool is_enabled; +static bool is_rgblight_startup; +static uint8_t old_hue; +static uint16_t rgblight_startup_loop_timer; +#endif + void keyboard_post_init_rgb_light(void) { #if defined(RGBLIGHT_STARTUP_ANIMATION) - bool is_enabled = rgblight_config.enable; + is_enabled = rgblight_is_enabled(); if (userspace_config.rgb_layer_change) { rgblight_enable_noeeprom(); } - if (rgblight_config.enable) { + if (rgblight_is_enabled()) { layer_state_set_rgb_light(layer_state); - uint16_t old_hue = rgblight_config.hue; + old_hue = rgblight_get_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); - } + is_rgblight_startup = true; } - if (!is_enabled) { - rgblight_disable_noeeprom(); - } - #endif layer_state_set_rgb_light(layer_state); } void matrix_scan_rgb_light(void) { -#ifdef RGBLIGHT_ENABLE # ifdef RGBLIGHT_TWINKLE scan_rgblight_fadeout(); # endif // RGBLIGHT_ENABLE -# ifdef INDICATOR_LIGHTS - matrix_scan_indicator(); -# endif +#if defined(RGBLIGHT_STARTUP_ANIMATION) + if (is_rgblight_startup && is_keyboard_master()) { + if (timer_elapsed(rgblight_startup_loop_timer) > 10) { + static uint8_t counter; + counter++; + rgblight_sethsv_noeeprom((counter + old_hue) % 255, 255, 255); + rgblight_startup_loop_timer = timer_read(); + if (counter == 255) { + is_rgblight_startup = false; + if (!is_enabled) { + rgblight_disable_noeeprom(); + } + if (userspace_config.rgb_layer_change) { + layer_state_set_rgb_light(layer_state); + } + } + } + } #endif } diff --git a/users/drashna/rules.mk b/users/drashna/rules.mk index 051368ff5ea5..b7523a436cad 100644 --- a/users/drashna/rules.mk +++ b/users/drashna/rules.mk @@ -22,9 +22,6 @@ 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 @@ -62,3 +59,10 @@ endif ifeq ($(strip $(OLED_DRIVER_ENABLE)), yes) SRC += oled_stuff.c endif + +ifeq ($(strip $(PIMORONI_TRACKBALL_ENABLE)), yes) + POINTING_DEVICE_ENABLE := yes + OPT_DEFS += -DPIMORONI_TRACKBALL_ENABLE + SRC += pimoroni_trackball.c + QUANTUM_LIB_SRC += i2c_master.c +endif From e8a02afc8cb2c29f522ec05bbf89a8bcd32dbe26 Mon Sep 17 00:00:00 2001 From: Thomas Lim Date: Mon, 15 Jun 2020 06:45:56 -0400 Subject: [PATCH 167/930] Add VIA support to keebio/nyquist (#9399) --- keyboards/keebio/nyquist/keymaps/via/keymap.c | 48 +++++++++++++++++++ keyboards/keebio/nyquist/keymaps/via/rules.mk | 2 + 2 files changed, 50 insertions(+) create mode 100644 keyboards/keebio/nyquist/keymaps/via/keymap.c create mode 100644 keyboards/keebio/nyquist/keymaps/via/rules.mk diff --git a/keyboards/keebio/nyquist/keymaps/via/keymap.c b/keyboards/keebio/nyquist/keymaps/via/keymap.c new file mode 100644 index 000000000000..43ce83bb14f5 --- /dev/null +++ b/keyboards/keebio/nyquist/keymaps/via/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 | 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 | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * |Adjust| Ctrl | Alt | GUI |Lower |Space |Space |Raise | Left | Down | Up |Right | + * `-----------------------------------------------------------------------------------' + */ +[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_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, KC_ENT , + KC_NO, KC_LCTL, KC_LALT, KC_LGUI, KC_NO, KC_SPC, KC_SPC, KC_NO, KC_LEFT, KC_DOWN, KC_UP, 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, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + 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 +), +[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 +), + +}; + diff --git a/keyboards/keebio/nyquist/keymaps/via/rules.mk b/keyboards/keebio/nyquist/keymaps/via/rules.mk new file mode 100644 index 000000000000..43061db1dd46 --- /dev/null +++ b/keyboards/keebio/nyquist/keymaps/via/rules.mk @@ -0,0 +1,2 @@ +VIA_ENABLE = yes +LTO_ENABLE = yes \ No newline at end of file From 7576f6162e662c23a174ed8730c93e22a985e7c9 Mon Sep 17 00:00:00 2001 From: csc027 Date: Mon, 15 Jun 2020 10:48:21 +0000 Subject: [PATCH 168/930] [Keymap] csc027/keymap-updates (#9420) --- keyboards/keebio/iris/keymaps/csc027/keymap.c | 12 ++--- keyboards/planck/keymaps/csc027/keymap.c | 46 ++++------------ keyboards/planck/keymaps/csc027/rules.mk | 2 +- users/csc027/csc027.h | 2 +- users/csc027/defines.h | 52 +++++++++++++++++-- users/csc027/usb_led.c | 18 +++---- 6 files changed, 74 insertions(+), 58 deletions(-) diff --git a/keyboards/keebio/iris/keymaps/csc027/keymap.c b/keyboards/keebio/iris/keymaps/csc027/keymap.c index 82a07739141a..f81e8f848a06 100644 --- a/keyboards/keebio/iris/keymaps/csc027/keymap.c +++ b/keyboards/keebio/iris/keymaps/csc027/keymap.c @@ -52,12 +52,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { _______, _______, _______, _______, _______, _______ ), - [_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 + [_GG] = LAYOUT( + KC_5, KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, + KC_T, KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS, + KC_G, MC_LSEC, KC_A, KC_S, KC_D, KC_F, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_ENT, + KC_B, KC_LCTL, KC_Z, KC_X, KC_C, KC_SPC, KC_SPC, _______, KC_N, KC_M, KC_COMM, KC_DOT, TO(_CS), TO(_QW), + KC_LALT, KC_V, KC_SPC, _______, KC_M, KC_B ), [_CS] = LAYOUT( diff --git a/keyboards/planck/keymaps/csc027/keymap.c b/keyboards/planck/keymaps/csc027/keymap.c index e39be03eb045..38e3e074135d 100644 --- a/keyboards/planck/keymaps/csc027/keymap.c +++ b/keyboards/planck/keymaps/csc027/keymap.c @@ -46,43 +46,17 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ___________________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) + [_GG] = LAYOUT_wrapper( + ________________General_Game_4x12_L1_______________, ________________General_Game_4x12_R1_______________, + ________________General_Game_4x12_L2_______________, ________________General_Game_4x12_R2_______________, + ________________General_Game_4x12_L3_______________, ________________General_Game_4x12_R3_______________, + ________________General_Game_4x12_L4_______________, ________________General_Game_4x12_R4_______________ ), - /* 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) + [_CS] = LAYOUT_wrapper( + ___________________CSGO_4x12_L1____________________, ___________________CSGO_4x12_R1____________________, + ___________________CSGO_4x12_L2____________________, ___________________CSGO_4x12_R2____________________, + ___________________CSGO_4x12_L3____________________, ___________________CSGO_4x12_R3____________________, + ___________________CSGO_4x12_L4____________________, ___________________CSGO_4x12_R4____________________ ) }; diff --git a/keyboards/planck/keymaps/csc027/rules.mk b/keyboards/planck/keymaps/csc027/rules.mk index 801031fb1edc..cf92d56749b0 100644 --- a/keyboards/planck/keymaps/csc027/rules.mk +++ b/keyboards/planck/keymaps/csc027/rules.mk @@ -2,5 +2,5 @@ BOOTMAGIC_ENABLE = no COMMAND_ENABLE = no CONSOLE_ENABLE = no EXTRAKEY_ENABLE = no -LTO_ENABLE = yes +LTO_ENABLE = no RGBLIGHT_ENABLE = no diff --git a/users/csc027/csc027.h b/users/csc027/csc027.h index 96bf7dc0eb09..6daae2a30a53 100644 --- a/users/csc027/csc027.h +++ b/users/csc027/csc027.h @@ -24,6 +24,6 @@ enum custom_layers { _MS, // Mouse _GT, // Git _CN, // Convenience - _GW, // Guild Wars 2 + _GG, // General Gaming _CS // Counter-Strike: Global Offensive }; diff --git a/users/csc027/defines.h b/users/csc027/defines.h index 4f52938f1f68..3f599ad654ae 100644 --- a/users/csc027/defines.h +++ b/users/csc027/defines.h @@ -20,10 +20,6 @@ * 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. * @@ -46,7 +42,7 @@ #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 +#define _____________________QWERTY_R4_____________________ KC_SPC, RAISE, KC_BSLS, OSL(_GT), TO(_GG), XXXXXXX /* Raise Layer * @@ -213,6 +209,52 @@ #define ___________________CONVENIENCE_R3__________________ XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______ #define ___________________CONVENIENCE_R4__________________ _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX +/* General Game 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| + * `-----------------------------------' `-----------------------------------' + */ + +#define ________________General_Game_4x12_L1_______________ KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5 +#define ________________General_Game_4x12_L2_______________ KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T +#define ________________General_Game_4x12_L3_______________ MC_LSEC, KC_A, KC_S, KC_D, KC_F, KC_G +#define ________________General_Game_4x12_L4_______________ KC_LCTL, KC_Z, KC_LALT, KC_X, KC_C, KC_SPC + +#define ________________General_Game_4x12_R1_______________ KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC +#define ________________General_Game_4x12_R2_______________ KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS +#define ________________General_Game_4x12_R3_______________ KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_ENT +#define ________________General_Game_4x12_R4_______________ 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| + * `-----------------------------------' `-----------------------------------' + */ + +#define ___________________CSGO_4x12_L1____________________ XXXXXXX, KC_1, KC_2, KC_3, KC_4, KC_5 +#define ___________________CSGO_4x12_L2____________________ KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T +#define ___________________CSGO_4x12_L3____________________ KC_LSFT, KC_A, KC_S, KC_D, KC_F, KC_G +#define ___________________CSGO_4x12_L4____________________ KC_LCTL, KC_Z, KC_LALT, KC_X, KC_B, KC_SPC + +#define ___________________CSGO_4x12_R1____________________ KC_6, KC_P7, KC_P8, KC_P9, KC_0, KC_BSPC +#define ___________________CSGO_4x12_R2____________________ KC_Y, KC_P4, KC_P5, KC_P6, XXXXXXX, KC_NLCK +#define ___________________CSGO_4x12_R3____________________ KC_H, KC_P1, KC_P2, KC_P3, KC_PENT, KC_ESC +#define ___________________CSGO_4x12_R4____________________ KC_SPC, KC_P0, KC_P0, KC_PDOT, TO(_QW), TO(_QW) + /* Convenience macros * * These are accelerator macros for simplifying declaration of PROGMEM strings diff --git a/users/csc027/usb_led.c b/users/csc027/usb_led.c index 1418e32cad92..473b153a1718 100644 --- a/users/csc027/usb_led.c +++ b/users/csc027/usb_led.c @@ -10,21 +10,21 @@ #if defined(AUDIO_ENABLE) || defined(RGBLIGHT_ENABLE) -bool led_update_user(led_t usb_led) { - static led_t old_usb_led = { +bool led_update_user(led_t new_led) { + static led_t old_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(); + if(old_led.caps_lock != new_led.caps_lock) { + new_led.caps_lock ? on_usb_led_on() : on_usb_led_off(); + } else if(old_led.num_lock != new_led.num_lock) { + new_led.num_lock ? on_usb_led_on() : on_usb_led_off(); + } else if(old_led.scroll_lock != new_led.scroll_lock) { + new_led.scroll_lock ? on_usb_led_on() : on_usb_led_off(); } - old_usb_led = usb_led; + old_led = new_led; return true; } From 3814dacf27a11e398fe426c4b03b860137b10676 Mon Sep 17 00:00:00 2001 From: MURAMATSU Atshshi Date: Tue, 16 Jun 2020 13:46:12 +0900 Subject: [PATCH 169/930] [Keymap] Add froggy keymap with 106/109 (JP) settings for helix keyboard (#8967) * initial commit for froggy 106 key mode * add mode indicator on OLED * use #pragma once instead of include guard * remove unusable codes * remove audio codes, because helix rev.2 has no audio feature * use set_single_persistent_default_layer * remove eeprom update check --- .../helix/rev2/keymaps/froggy_106/config.h | 41 + .../helix/rev2/keymaps/froggy_106/helixfont.h | 235 +++++ .../helix/rev2/keymaps/froggy_106/keymap.c | 822 ++++++++++++++++++ .../helix/rev2/keymaps/froggy_106/readme.md | 85 ++ .../helix/rev2/keymaps/froggy_106/rules.mk | 23 + 5 files changed, 1206 insertions(+) create mode 100644 keyboards/helix/rev2/keymaps/froggy_106/config.h create mode 100644 keyboards/helix/rev2/keymaps/froggy_106/helixfont.h create mode 100644 keyboards/helix/rev2/keymaps/froggy_106/keymap.c create mode 100644 keyboards/helix/rev2/keymaps/froggy_106/readme.md create mode 100644 keyboards/helix/rev2/keymaps/froggy_106/rules.mk diff --git a/keyboards/helix/rev2/keymaps/froggy_106/config.h b/keyboards/helix/rev2/keymaps/froggy_106/config.h new file mode 100644 index 000000000000..36c3f2a7999e --- /dev/null +++ b/keyboards/helix/rev2/keymaps/froggy_106/config.h @@ -0,0 +1,41 @@ +/* +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 + +#undef TAPPING_TERM +#define TAPPING_TERM 200 +#define ONESHOT_TAP_TOGGLE 5 /* Tapping this number of times holds the key until tapped this number of times again. */ +#define ONESHOT_TIMEOUT 5000 /* Time (in ms) before the one shot key is released */ + +// If you need more program area, try select and reduce rgblight modes to use. + +// 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/helix/rev2/keymaps/froggy_106/helixfont.h b/keyboards/helix/rev2/keymaps/froggy_106/helixfont.h new file mode 100644 index 000000000000..3a79a1937ba7 --- /dev/null +++ b/keyboards/helix/rev2/keymaps/froggy_106/helixfont.h @@ -0,0 +1,235 @@ +// This is the 'classic' fixed-space bitmap font for Adafruit_GFX since 1.0. +// See gfxfont.h for newer custom bitmap font info. + +#pragma once + +#include "progmem.h" + +// Standard ASCII 5x7 font + +static 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, +0xFC, 0xFE, 0x02, 0x82, 0x82, 0x82, +0x82, 0x82, 0x82, 0xC2, 0x82, 0x02, +0x02, 0xFE, 0x00, 0x00, 0xFE, 0xFE, +0x02, 0x62, 0x62, 0x62, 0x62, 0xE2, +0x62, 0x62, 0xE2, 0x02, 0x02, 0xFC, +0x00, 0x00, 0x00, 0xF0, 0xFC, 0xFC, +0xFC, 0x00, 0xFC, 0xFC, 0xF0, 0x80, +0x00, 0x00, 0x00, 0x00, 0x00, 0xF0, +0x30, 0x40, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x20, 0x00, 0x00, 0x24, 0xA4, +0xA4, 0xBC, 0xA4, 0x24, 0x24, 0x00, +0x00, 0x00, 0x24, 0xA4, 0x24, 0x24, +0x3C, 0x04, 0x04, 0x00, 0x00, 0x00, +0xB8, 0xA4, 0xA4, 0xA4, 0xBC, 0x00, +0x00, 0x00, 0x00, 0xFC, 0x00, 0xFC, +0x00, 0x44, 0x44, 0x44, 0xDC, 0x44, +0x04, 0x3C, 0x00, 0x00, 0x00, 0x00, +0xFC, 0xFE, 0xFE, 0x7E, 0x7E, 0x7E, +0x7E, 0x7E, 0x7E, 0x3E, 0x7E, 0xFE, +0xFE, 0xFE, 0x00, 0x00, 0xFE, 0xFE, +0xFE, 0x9E, 0x9E, 0x9E, 0x9E, 0x1E, +0x9E, 0x9E, 0x1E, 0xFE, 0xFE, 0xFC, +0x00, 0x00, 0x00, 0x00, 0x00, 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, +0x7F, 0x7F, 0x40, 0x41, 0x41, 0x41, +0x41, 0x41, 0x41, 0x41, 0x41, 0x40, +0x40, 0x7F, 0x00, 0x00, 0x7F, 0x7F, +0x40, 0x40, 0x40, 0x40, 0x40, 0x41, +0x40, 0x40, 0x43, 0x40, 0x40, 0x7F, +0x00, 0x20, 0x3C, 0x3E, 0x3E, 0x3E, +0x3E, 0x00, 0x3E, 0x3E, 0x3E, 0x3E, +0x38, 0x00, 0x00, 0xF0, 0xFB, 0xFB, +0x00, 0x50, 0x60, 0xFF, 0xFC, 0x3C, +0x1E, 0x0E, 0x0C, 0xFC, 0xF8, 0xE8, +0xE8, 0xE8, 0x30, 0x00, 0x00, 0x00, +0x00, 0x00, 0x02, 0x00, 0x00, 0x00, +0x00, 0x04, 0x04, 0x1B, 0x04, 0x04, +0x00, 0x00, 0x00, 0x00, 0x57, 0x50, +0x57, 0x54, 0x57, 0x10, 0x50, 0x00, +0x00, 0x00, 0x97, 0x94, 0x97, 0x94, +0xF7, 0x00, 0x00, 0x00, 0x00, 0x00, +0xE4, 0x14, 0xF4, 0x94, 0xF7, 0x00, +0x00, 0x00, 0x00, 0xFF, 0x00, 0xFF, +0x00, 0x38, 0xA4, 0xA4, 0xA5, 0x3C, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x7F, 0x7F, 0x7F, 0x7E, 0x7E, 0x7E, +0x7E, 0x7E, 0x7E, 0x7E, 0x7E, 0x7F, +0x7F, 0x7F, 0x00, 0x00, 0x7F, 0x7F, +0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7E, +0x7F, 0x7F, 0x7C, 0x7F, 0x7F, 0x7F, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0xFE, 0xFE, 0x02, 0x62, 0x62, 0x62, +0xE2, 0x62, 0x62, 0x62, 0xC2, 0x02, +0x02, 0xFE, 0x00, 0x00, 0xFE, 0xFE, +0x02, 0x82, 0xC2, 0xE2, 0xF2, 0x82, +0x82, 0x82, 0x82, 0x02, 0x02, 0xFE, +0x00, 0x00, 0x00, 0x3C, 0x66, 0x66, +0x66, 0x66, 0x66, 0x66, 0x66, 0x66, +0x00, 0x00, 0x00, 0x07, 0x7F, 0xDF, +0x00, 0x05, 0x03, 0x7F, 0x1F, 0x1E, +0x3C, 0x38, 0x18, 0x1F, 0x0F, 0x0D, +0x0D, 0x0D, 0x06, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x20, 0x20, 0x50, +0x8C, 0x50, 0x20, 0x20, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x09, 0x09, +0x06, 0x09, 0x09, 0x00, 0x00, 0x00, +0x00, 0x00, 0x1C, 0x12, 0x12, 0x12, +0x1E, 0x10, 0x10, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0xFF, 0x00, 0x73, +0x84, 0xE7, 0x94, 0x94, 0x94, 0x67, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0xFE, 0xFE, 0xFE, 0x9E, 0x9E, 0x9E, +0x1E, 0x9E, 0x9E, 0x9E, 0x3E, 0xFE, +0xFE, 0xFE, 0x00, 0x00, 0xFE, 0xFE, +0xFE, 0x7E, 0x3E, 0x1E, 0x0E, 0x7E, +0x7E, 0x7E, 0x7E, 0xFE, 0xFE, 0xFE, +0x00, 0x00, 0x00, 0x3C, 0x66, 0x66, +0x60, 0x60, 0x60, 0x60, 0x60, 0x60, +0x00, 0x00, 0x00, 0x07, 0x7F, 0xDF, +0x00, 0x00, 0xE0, 0xF8, 0xFC, 0xFC, +0xFC, 0xFC, 0xFC, 0xFC, 0xF0, 0x80, +0x00, 0x00, 0x00, 0x00, 0x00, 0xF0, +0x3F, 0x7F, 0x40, 0x46, 0x46, 0x46, +0x47, 0x46, 0x46, 0x46, 0x43, 0x40, +0x40, 0x7F, 0x00, 0x00, 0x7F, 0x7F, +0x40, 0x41, 0x43, 0x47, 0x4F, 0x41, +0x41, 0x41, 0x41, 0x40, 0x40, 0x3F, +0x00, 0x00, 0x00, 0x3E, 0x73, 0x60, +0x70, 0x3E, 0x07, 0x03, 0x67, 0x3E, +0x00, 0x00, 0x00, 0x00, 0x00, 0x07, +0x06, 0x01, 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, 0x04, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x08, 0x08, +0x36, 0x08, 0x08, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x1F, 0x00, 0x0E, +0x10, 0x1C, 0x12, 0x12, 0x12, 0x12, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x3F, 0x7F, 0x7F, 0x79, 0x79, 0x79, +0x78, 0x79, 0x79, 0x79, 0x7C, 0x7F, +0x7F, 0x7F, 0x00, 0x00, 0x7F, 0x7F, +0x7F, 0x7E, 0x7C, 0x78, 0x70, 0x7E, +0x7E, 0x7E, 0x7E, 0x7F, 0x7F, 0x3F, +0x00, 0x00, 0x00, 0x03, 0x03, 0x03, +0x03, 0x3F, 0x63, 0x63, 0x63, 0x3F, +0x00, 0x00, 0x00, 0x00, 0x00, 0x07, +0x00, 0x00, 0x07, 0x1F, 0x3F, 0x0F, +0x07, 0x0F, 0x3F, 0x3F, 0x0F, 0x00, +0x03, 0x06, 0x00, 0xF0, 0xFB, 0xFB, +}; diff --git a/keyboards/helix/rev2/keymaps/froggy_106/keymap.c b/keyboards/helix/rev2/keymaps/froggy_106/keymap.c new file mode 100644 index 000000000000..d32c4fa0ca51 --- /dev/null +++ b/keyboards/helix/rev2/keymaps/froggy_106/keymap.c @@ -0,0 +1,822 @@ +#include QMK_KEYBOARD_H +#include "keymap_jp.h" +#include +#ifdef SSD1306OLED + #include "ssd1306.h" +#endif + +extern uint8_t is_master; + +#define DELAY_TIME 75 +static uint16_t key_timer; +static uint16_t tap_timer; +static uint16_t delay_registered_code; +static uint8_t delay_registered_layer; +static uint8_t delay_mat_row; +static uint8_t delay_mat_col; +static bool delay_key_stat; +static bool delay_key_pressed; +static bool tapping_key; + +// 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, + _BASE_106, + _OPT, + _OPT_106, + _SYM, + _SYM_106, + _NUM, + _NUM_106, + _FUNC, + _LAYER_NUM, +}; +bool RGBAnimation = false; //Flag for LED Layer color Refresh. + +typedef union { + uint32_t raw; + struct { + bool mac_mode:1; + }; +} user_config_t; +user_config_t user_config; + +#define IS_MODE_106() ((default_layer_state & (1UL << _BASE_106)) != 0) +#define IS_MODE_MAC() (user_config.mac_mode) +#ifndef MAX +#define MAX(X, Y) ((X) > (Y) ? (X) : (Y)) +#endif +#ifndef MIN +#define MIN(X, Y) ((X) < (Y) ? (X) : (Y)) +#endif + +enum custom_keycodes { + QWERTY = SAFE_RANGE, + EISU, + KANA, + RGBRST, + RGBOFF, + RGB1, + RGB2, + RGB3, + OPT_TAP_SP, + DESKTOP, + MAC, + WIN, + L_SYM, + L_NUM, + TO_106, + TO_101, +}; + +enum macro_keycodes { + KC_SAMPLEMACRO, +}; + +//Macros +#define M_SAMPLE M(KC_SAMPLEMACRO) + +#if MATRIX_ROWS == 10 // HELIX_ROWS == 5 +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + /* Base + * ,-----------------------------------------. ,-----------------------------------------. + * | C+z | ; | [ | ( | < | { | | | | | | | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | KANA | P | K | R | A | F | | | | | | | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | BS | D | T | H | E | O | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------+------+------| + * | Shift| Y | S | N | I | U |Space | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------+------+------| + * | Ctrl | Alt | Gui | Sym | Num | OPT | Ent | | | | | | | | + * `-------------------------------------------------------------------------------------------------' + */ + [_BASE] = LAYOUT( \ + LCTL(KC_Z), KC_SCLN, KC_LBRC, KC_LPRN, KC_LT, KC_LCBR, _______, _______, _______, _______, _______, _______, \ + KANA, KC_P, KC_K, KC_R, KC_A, KC_F, _______, _______, _______, _______, _______, _______, \ + KC_BSPC, KC_D, KC_T, KC_H, KC_E, KC_O, _______, _______, _______, _______, _______, _______, \ + OSM(MOD_LSFT), KC_Y, KC_S, KC_N, KC_I, KC_U, KC_SPC, _______, _______, _______, _______, _______, _______, _______, \ + OSM(MOD_LCTL), OSM(MOD_LALT), OSM(MOD_LGUI), L_SYM, L_NUM, OPT_TAP_SP, KC_ENT, _______, _______, _______, _______, _______, _______, _______ \ + ), + [_BASE_106] = LAYOUT( \ + LCTL(KC_Z), JP_SCLN, JP_LBRC, JP_LPRN, JP_LT, JP_LCBR, _______, _______, _______, _______, _______, _______, \ + KANA, KC_P, KC_K, KC_R, KC_A, KC_F, _______, _______, _______, _______, _______, _______, \ + KC_BSPC, KC_D, KC_T, KC_H, KC_E, KC_O, _______, _______, _______, _______, _______, _______, \ + OSM(MOD_LSFT), KC_Y, KC_S, KC_N, KC_I, KC_U, KC_SPC, _______, _______, _______, _______, _______, _______, _______, \ + OSM(MOD_LCTL), OSM(MOD_LALT), OSM(MOD_LGUI), L_SYM, L_NUM, OPT_TAP_SP, KC_ENT, _______, _______, _______, _______, _______, _______, _______ \ + ), + + /* Opt + * ,-----------------------------------------. ,-----------------------------------------. + * | Esc | : | ] | ) | > | } | | | | | | | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | EISU| J | M | B | ' | Tab | | | | | | | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | . | V | C | L | Z | Q | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------+------+------| + * | | X | G | W | - | Del | Esc | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | , | DTOP | | | | | | | | | | + * `-------------------------------------------------------------------------------------------------' + */ + [_OPT] = LAYOUT( \ + KC_ESC, KC_COLN,KC_RBRC, KC_RPRN,KC_GT, KC_RCBR, _______, _______, _______, _______, _______, _______, \ + EISU, KC_J, KC_M, KC_B, KC_QUOT, KC_TAB, _______, _______, _______, _______, _______, _______, \ + KC_DOT, KC_V, KC_C, KC_L, KC_Z, KC_Q, _______, _______, _______, _______, _______, _______, \ + _______, KC_X, KC_G, KC_W, KC_MINUS, KC_DEL, KC_ESC, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______,_______, KC_COMM,DESKTOP, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ + ), + [_OPT_106] = LAYOUT( \ + KC_ESC, JP_COLN,JP_RBRC, JP_RPRN,JP_GT, JP_RCBR, _______, _______, _______, _______, _______, _______, \ + EISU, KC_J, KC_M, KC_B, JP_QUOT, KC_TAB, _______, _______, _______, _______, _______, _______, \ + KC_DOT, KC_V, KC_C, KC_L, KC_Z, KC_Q, _______, _______, _______, _______, _______, _______, \ + _______, KC_X, KC_G, KC_W, JP_MINS, KC_DEL, KC_ESC, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______,_______, KC_COMM,DESKTOP, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ + ), + + /* Sym + * ,-----------------------------------------. ,-----------------------------------------. + * | Ins | GRV | | PU | PD | ^ | | | | | | | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | \ | # | = | ? | % | | | | | | | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | $ | upA | @ | ! | | | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------+------+------| + * | CL | <- | dwA | -> | _ | & | | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------+------+------| + * | | | PS | | ~ | | | | | | | | | | + * `-------------------------------------------------------------------------------------------------' + */ + [_SYM] = LAYOUT( \ + KC_INS, KC_GRV, _______, KC_PGUP, KC_PGDN, KC_CIRC, _______, _______, _______, _______, _______, _______, \ + _______, KC_BSLS, KC_HASH, KC_EQL, KC_QUES, KC_PERC, _______, _______, _______, _______, _______, _______, \ + _______, KC_DLR, KC_UP, KC_AT, KC_EXLM, KC_PIPE, _______, _______, _______, _______, _______, _______, \ + KC_CAPS, KC_LEFT, KC_DOWN, KC_RIGHT,KC_UNDS, KC_AMPR, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, KC_PSCR, _______, KC_TILD, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ + ), + [_SYM_106] = LAYOUT( \ + KC_INS, JP_GRV, _______, KC_PGUP, KC_PGDN, JP_CIRC, _______, _______, _______, _______, _______, _______, \ + _______, JP_BSLS, JP_HASH, JP_EQL, JP_QUES, JP_PERC, _______, _______, _______, _______, _______, _______, \ + _______, JP_DLR, KC_UP, JP_AT, JP_EXLM, JP_PIPE, _______, _______, _______, _______, _______, _______, \ + KC_CAPS, KC_LEFT, KC_DOWN, KC_RIGHT,JP_UNDS, JP_AMPR, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, KC_PSCR, _______, JP_TILD, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ + ), + + /* Raise + * ,-----------------------------------------. ,-----------------------------------------. + * | | | Func | home | End | | | | | | | | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | * | 7 | 8 | 9 | - | | | | | | | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | . | / | 4 | 5 | 6 | + | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------+------+------| + * | LN | 0 | 1 | 2 | 3 |C+S+F1| | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------+------+------| + * | | | . | , | | | | | | | | | | | + * `-------------------------------------------------------------------------------------------------' + */ + [_NUM] = LAYOUT( \ + _______, _______, OSL(_FUNC), KC_HOME, KC_END, _______, _______, _______, _______, _______, _______, _______, \ + _______, KC_ASTR, KC_P7, KC_P8, KC_P9, KC_MINS, _______, _______, _______, _______, _______, _______, \ + KC_DOT, KC_SLSH, KC_P4, KC_P5, KC_P6, KC_PLUS, _______, _______, _______, _______, _______, _______, \ + KC_NLCK, KC_P0, KC_P1, KC_P2, KC_P3, LCTL(S(KC_F1)), _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, KC_PDOT, KC_COMM, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ + ), + [_NUM_106] = LAYOUT( \ + _______, _______, OSL(_FUNC), KC_HOME, KC_END, _______, _______, _______, _______, _______, _______, _______, \ + _______, JP_ASTR, KC_P7, KC_P8, KC_P9, JP_MINS, _______, _______, _______, _______, _______, _______, \ + KC_DOT, JP_SLSH, KC_P4, KC_P5, KC_P6, JP_PLUS, _______, _______, _______, _______, _______, _______, \ + KC_NLCK, KC_P0, KC_P1, KC_P2, KC_P3, LCTL(S(KC_F1)), _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, KC_PDOT, JP_COMM, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ + ), + + /* Func + * ,-----------------------------------------. ,-----------------------------------------. + * |RGBRST| Hue |To101 | RST | Mac | Win | | | | | | | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | RGB1 | VAL+ | F7 | F8 | F9 |To106 | | | | | | | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | RGB2 | VAL- | F4 | F5 | F6 | F12 | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------+------+------| + * | RGB3 | F10 | F1 | F2 | F3 | F11 | | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------+------+------| + * |RGBOFF| | | | | | | | | | | | | | + * `-------------------------------------------------------------------------------------------------' + */ + [_FUNC] = LAYOUT( \ + RGBRST,RGB_HUI, TO_101, RESET, MAC, WIN, _______, _______, _______, _______, _______, _______, \ + RGB1, RGB_VAI, KC_F7, KC_F8, KC_F9, TO_106, _______, _______, _______, _______, _______, _______, \ + RGB2, RGB_VAD, KC_F4, KC_F5, KC_F6, KC_F12, _______, _______, _______, _______, _______, _______, \ + RGB3, KC_F10, KC_F1, KC_F2, KC_F3, KC_F11, _______, _______, _______, _______, _______, _______, _______, _______, \ + RGBOFF,_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ + ) +}; +#else +#error "undefined keymaps" +#endif + +void set_mac_mode(bool enable) { + if(enable){ + user_config.mac_mode = true; + keymap_config.swap_lalt_lgui = false; + keymap_config.swap_ralt_rgui = false; + }else{ + user_config.mac_mode = false; + keymap_config.swap_lalt_lgui = true; + keymap_config.swap_ralt_rgui = true; + } + eeconfig_update_user(user_config.raw); +} + +void eeconfig_init_user(void) { + user_config.raw = 0; + eeconfig_update_user(user_config.raw); +} + +void keyboard_post_init_user(void) { + user_config.raw = eeconfig_read_user(); + set_mac_mode(user_config.mac_mode); +} + +bool find_mairix(uint16_t keycode, uint8_t *row, uint8_t *col){ + int base_keymap = IS_MODE_106() ? _BASE_106 : _BASE; + for(uint8_t i=0; ievent.key.col; + row = record->event.key.row; + if (record->event.pressed && ((row < 5 && is_master) || (row >= 5 && !is_master))) { + int end = keybuf_end; + keybufs[end].col = col; + keybufs[end].row = row % 5; + keybufs[end].frame = 0; + keybuf_end ++; + } + #endif + + if(tap_timer&&keycode!=OPT_TAP_SP){ + tapping_key = true; + } + + if(keycode==delay_registered_code){ + if (!record->event.pressed){ + unregister_delay_code(); + } + } + + switch (keycode) { + case KC_SCLN: + case KC_LBRC: + case KC_LPRN: + case KC_LT: + case KC_LCBR: + case KC_P: + case KC_K: + case KC_R: + case KC_A: + case KC_F: + case KC_BSPC: + case KC_D: + case KC_T: + case KC_H: + case KC_E: + case KC_O: + case KC_Y: + case KC_S: + case KC_N: + case KC_I: + case KC_U: + case LCTL(KC_Z): + case KC_SPC: + //case JP_SCLN: // == KC_SCLN + case JP_LBRC: + case JP_LPRN: + //case JP_LT: // == KC_LT + case JP_LCBR: + if (IS_MODE_106()) { + if (keycode == KC_LBRC || keycode == KC_LPRN || keycode == KC_LCBR) + break; + }else{ + if (keycode == JP_LBRC || keycode == JP_LPRN || keycode == JP_LCBR) + break; + } + if (record->event.pressed) { + if (IS_MODE_106()) + register_delay_code(_BASE_106); + else + register_delay_code(_BASE); + if(find_mairix(keycode, &delay_mat_row, &delay_mat_col)){ + key_timer = timer_read(); + delay_key_stat = true; + delay_key_pressed = true; + } + }else{ + delay_key_pressed = false; + } + return false; + break; + case L_SYM: + if (record->event.pressed) { + if (IS_MODE_106()) { + register_delay_code(_SYM_106); + layer_on(_SYM_106); + }else{ + register_delay_code(_SYM); + layer_on(_SYM); + } + }else{ + layer_off(_SYM); + layer_off(_SYM_106); + if(delay_registered_layer == _SYM || delay_registered_layer == _SYM_106) { + unregister_delay_code(); + } + } + return false; + break; + case L_NUM: + if (record->event.pressed) { + if (IS_MODE_106()) { + register_delay_code(_NUM_106); + layer_on(_NUM_106); + }else{ + register_delay_code(_NUM); + layer_on(_NUM); + } + }else{ + layer_off(_NUM); + layer_off(_NUM_106); + if(delay_registered_layer == _NUM || delay_registered_layer == _NUM_106) { + unregister_delay_code(); + } + } + return false; + break; + case OPT_TAP_SP: + if (record->event.pressed) { + tapping_key = false; + if (IS_MODE_106()) { + register_delay_code(_OPT_106); + layer_on(_OPT_106); + }else{ + register_delay_code(_OPT); + layer_on(_OPT); + } + tap_timer = timer_read(); + }else{ + layer_off(_OPT); + layer_off(_OPT_106); + if(tapping_key==false && timer_elapsed(tap_timer) < TAPPING_TERM){ + SEND_STRING(" "); + }else if(delay_registered_layer == _OPT || delay_registered_layer == _OPT_106) { + unregister_delay_code(); + } + tap_timer = 0; + } + return false; + break; + case EISU: + if (record->event.pressed) { + if(IS_MODE_MAC()){ + register_code(KC_LANG2); + }else{ + SEND_STRING(SS_LALT("`")); + } + } else { + unregister_code(KC_LANG2); + } + return false; + break; + case KANA: + if (record->event.pressed) { + if(IS_MODE_MAC()){ + register_code(KC_LANG1); + }else{ + SEND_STRING(SS_LALT("`")); + } + } else { + unregister_code(KC_LANG1); + } + return false; + break; + case DESKTOP: + if (record->event.pressed) { + if(IS_MODE_MAC()){ + register_code(KC_F11); + }else{ + SEND_STRING(SS_LGUI("d")); + } + } else { + unregister_code(KC_F11); + } + return false; + break; + case RGBRST: + #ifdef RGBLIGHT_ENABLE + if (record->event.pressed) { + eeconfig_update_rgblight_default(); + rgblight_enable(); + RGBAnimation = false; + } + #endif + break; + case RGBOFF: + #ifdef RGBLIGHT_ENABLE + if (record->event.pressed) { + rgblight_disable(); + } + #endif + break; + case RGB1: + #ifdef RGBLIGHT_ENABLE + if (record->event.pressed) { + RGBAnimation = true; + rgblight_mode(RGBLIGHT_MODE_RAINBOW_MOOD); + } + #endif + break; + case RGB2: + #ifdef RGBLIGHT_ENABLE + if (record->event.pressed) { + RGBAnimation = true; + rgblight_mode(RGBLIGHT_MODE_RAINBOW_SWIRL + 1); + } + #endif + break; + case RGB3: + #ifdef RGBLIGHT_ENABLE + if (record->event.pressed) { + RGBAnimation = true; + rgblight_mode(RGBLIGHT_MODE_KNIGHT); + } + #endif + break; + case MAC: + if (record->event.pressed) { + set_mac_mode(true); + } + break; + case WIN: + if (record->event.pressed) { + set_mac_mode(false); + } + break; + case TO_101: + if (record->event.pressed) { + if (IS_MODE_106()) { + set_single_persistent_default_layer(_BASE); + } + } + break; + case TO_106: + if (record->event.pressed) { + if (!IS_MODE_106()) { + set_single_persistent_default_layer(_BASE_106); + } + } + break; + } + return true; +} + + +//keyboard start-up code. Runs once when the firmware starts up. +void matrix_init_user(void) { + //SSD1306 OLED init, make sure to add #define SSD1306OLED in config.h + #ifdef SSD1306OLED + iota_gfx_init(!has_usb()); // turns on the display + #endif +} + +// LED Effect +#ifdef RGBLIGHT_ENABLE +unsigned char rgb[7][5][3]; +void led_ripple_effect(char r, char g, char b) { + static int scan_count = -10; + static int keys[] = { 6, 6, 6, 7, 7 }; + static int keys_sum[] = { 0, 6, 12, 18, 25 }; + + 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 y = scan_count; + int dist_y = abs(y - keybufs[i].row); + for (int x=0; x= 6 && scan_count <= 10) { + int y = scan_count - 6; + for (int x=0; x= 12) { scan_count = 0; } +} +#endif + +layer_state_t layer_state_old; + +//runs every scan cycle (a lot) +void matrix_scan_user(void) { + #ifdef SSD1306OLED + iota_gfx_task(); // this is what updates the display continuously + #endif + + if(delay_key_stat && (timer_elapsed(key_timer) > DELAY_TIME)){ + if (IS_MODE_106()) + register_delay_code(_BASE_106); + else + register_delay_code(_BASE); + if(!delay_key_pressed){ + unregister_delay_code(); + } + } + + if(layer_state_old != layer_state){ + for (int8_t i = _LAYER_NUM-1; i > _BASE_106; i--) { + if(IS_LAYER_ON(i)){ + register_delay_code(i); + break; + } + } + layer_state_old = layer_state; + } + + #ifdef RGBLIGHT_ENABLE + if(!RGBAnimation){ + if(IS_LAYER_ON(_FUNC)){ + #ifdef RGBLED_BACK + led_ripple_effect(127,23,0); + #else + rgblight_setrgb(127,23,0); + #endif + }else if(IS_LAYER_ON(_NUM)||IS_LAYER_ON(_NUM_106)){ + #ifdef RGBLED_BACK + led_ripple_effect(127,0,61); + #else + rgblight_setrgb(127,0,61); + #endif + }else if(IS_LAYER_ON(_SYM)||IS_LAYER_ON(_SYM_106)){ + #ifdef RGBLED_BACK + led_ripple_effect(0,127,0); + #else + rgblight_setrgb(0,127,0); + #endif + }else if(IS_LAYER_ON(_OPT)||IS_LAYER_ON(_OPT_106)){ + #ifdef RGBLED_BACK + led_ripple_effect(127,0,100); + #else + rgblight_setrgb(127,0,100); + #endif + } else { + #ifdef RGBLED_BACK + led_ripple_effect(0,112,127); + #else + rgblight_setrgb(0,112,127); + #endif + } + } + #endif +} + +//SSD1306 OLED update loop, make sure to add #define SSD1306OLED in config.h +#ifdef SSD1306OLED + +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; + } +} + +// Render to OLED +void render_status(struct CharacterMatrix *matrix) { + + // froggy logo + static char logo[4][17]= + { + {0x68,0x69,0x6a,0x6b,0x6c,0x6d,0x6e,0x6f,0x70,0x71,0x72,0x73,0x74,0}, + {0x88,0x89,0x8a,0x8b,0x8c,0x8d,0x8e,0x8f,0x90,0x91,0x92,0x93,0x94,0}, + {0xa8,0xa9,0xaa,0xab,0xac,0xad,0xae,0xaf,0xb0,0xb1,0xb2,0xb3,0xb4,0}, + {0xc8,0xc9,0xca,0xcb,0xcc,0xcd,0xce,0xcf,0xd0,0xd1,0xd2,0xd3,0}, + }; + + static char modectl[4][2][4]= + { + { + {0x65,0x66,0x67,0}, //WIN + {0x85,0x86,0x87,0}, //WIN + }, + { + {0xa5,0xa6,0xa7,0}, //US(101) + {0xc5,0xc6,0xc7,0}, //US(101) + }, + { + {0xbd,0xbe,0xbf,0}, //MAC + {0xdd,0xde,0xdf,0}, //MAC + }, + { + {0xba,0xbb,0xbc,0}, //JP(106) + {0xda,0xdb,0xdc,0}, //JP(106) + }, + }; + + static char indctr[8][2][4]= + { + // white icon + { + {0x60,0x61,0x62,0}, //NUM + {0x63,0x64,0} //FUNC + }, + { + {0x80,0x81,0x82,0}, //NUM + {0x83,0x84,0} //FUNC + }, + { + {0xa0,0xa1,0xa2,0}, //CAPS + {0xa3,0xa4,0} //SCLK + }, + { + {0xc0,0xc1,0xc2,0}, //CAPS + {0xc3,0xc4,0} //SCLK + }, + // Black icon + { + {0x75,0x76,0x77,0}, //NUM + {0x78,0x79,0} //FUNC + }, + { + {0x95,0x96,0x97,0}, //NUM + {0x98,0x99,0} //FUNC + }, + { + {0xb5,0xb6,0xb7,0}, //CAPS + {0xb8,0xb9,0} //SCLK + }, + { + {0xd5,0xd6,0xd7,0}, //CAPS + {0xd8,0xd9,0} //SCLK + }, + }; + + int rown = 0; + int rowf = 0; + int rowa = 0; + int rows = 0; + int rowm = 0; + int rowj = 1; + + //Set Indicator icon + if (host_keyboard_leds() & (1< | } | +|------+------+------+------+------+------| +| EISU | J | M | B | ' | Tab | +|------+------+------+------+------+------| +| . | V | C | L | Z | Q | +|------+------+------+------+------+------+------. +| | X | G | W | - | Del | Esc | +|------+------+------+------+------+------+------| +| | | | , | DTOP | | | +`------------------------------------------------' +``` + +### Num +``` +,-----------------------------------------. +| | | Func | home | End | | +|------+------+------+------+------+------| +| | * | 7 | 8 | 9 | - | +|------+------+------+------+------+------| +| . | / | 4 | 5 | 6 | + | +|------+------+------+------+------+------+------. +| LN | 0 | 1 | 2 | 3 |C+S+F1| | +|------+------+------+------+------+------+------| +| | | | , | | | | +`------------------------------------------------' +``` + +### Sym +``` +,-----------------------------------------. +| Ins | GRV | | PU | PD | ^ | +|------+------+------+------+------+------| +| | \ | # | = | ? | % | +|------+------+------+------+------+------| +| | $ | upA | @ | ! | | | +|------+------+------+------+------+------+------. +| CL | <- | dwA | -> | _ | & | | +|------+------+------+------+------+------+------| +| | | PS | | ~ | | | + `-----------------------------------------------' +``` + +### Func +``` +,-----------------------------------------. +|RGBRST| Hue | to101| RST | Mac | Win | +|------+------+------+------+------+------| +| RGB1 | VAL+ | F7 | F8 | F9 | to106| +|------+------+------+------+------+------| +| RGB2 | VAL- | F4 | F5 | F6 | F12 | +|------+------+------+------+------+------+------. +| RGB3 | F10 | F1 | F2 | F3 | F11 | | +|------+------+------+------+------+------+------| +|RGBOFF| | | | | | | +`------------------------------------------------' +``` diff --git a/keyboards/helix/rev2/keymaps/froggy_106/rules.mk b/keyboards/helix/rev2/keymaps/froggy_106/rules.mk new file mode 100644 index 000000000000..bea059ca16d5 --- /dev/null +++ b/keyboards/helix/rev2/keymaps/froggy_106/rules.mk @@ -0,0 +1,23 @@ +# QMK Standard 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 +# +# See TOP/keyboards/helix/rules.mk for a list of options that can be set. +# See TOP/docs/config_options.md for more information. +# +LINK_TIME_OPTIMIZATION_ENABLE = no # if firmware size over limit, try this option + +# Helix Spacific Build Options +# you can uncomment and edit follows 7 Variables +# jp: 以下の7つの変数を必要に応じて編集し、コメントアウトをはずします。 +HELIX_ROWS = 5 # Helix Rows is 4 or 5 +OLED_ENABLE = yes # OLED_ENABLE +LOCAL_GLCDFONT = yes # use each keymaps "helixfont.h" insted of "common/glcdfont.c" +LED_BACK_ENABLE = yes # LED backlight (Enable WS2812 RGB underlight.) +LED_UNDERGLOW_ENABLE = no # LED underglow (Enable WS2812 RGB underlight.) +LED_ANIMATIONS = yes # LED animations +# IOS_DEVICE_ENABLE = no # connect to IOS device (iPad,iPhone) + +# convert Helix-specific options (that represent combinations of standard options) +# into QMK standard options. +include $(strip $(KEYBOARD_LOCAL_FEATURES_MK)) From 80b2b710da1795940ec519909594bd19872346ec Mon Sep 17 00:00:00 2001 From: cole smith <38364556+daysgobye@users.noreply.github.com> Date: Tue, 16 Jun 2020 12:08:30 -0700 Subject: [PATCH 170/930] added 4x12 (#9411) Co-authored-by: Ryan Co-authored-by: Drashna Jaelre --- keyboards/boardsource/4x12/4x12.c | 1 + keyboards/boardsource/4x12/4x12.h | 14 ++ keyboards/boardsource/4x12/config.h | 142 ++++++++++++++++++ keyboards/boardsource/4x12/info.json | 64 ++++++++ .../boardsource/4x12/keymaps/default/keymap.c | 36 +++++ keyboards/boardsource/4x12/readme.md | 12 ++ keyboards/boardsource/4x12/rules.mk | 32 ++++ 7 files changed, 301 insertions(+) create mode 100644 keyboards/boardsource/4x12/4x12.c create mode 100644 keyboards/boardsource/4x12/4x12.h create mode 100644 keyboards/boardsource/4x12/config.h create mode 100644 keyboards/boardsource/4x12/info.json create mode 100644 keyboards/boardsource/4x12/keymaps/default/keymap.c create mode 100644 keyboards/boardsource/4x12/readme.md create mode 100644 keyboards/boardsource/4x12/rules.mk diff --git a/keyboards/boardsource/4x12/4x12.c b/keyboards/boardsource/4x12/4x12.c new file mode 100644 index 000000000000..2aec6900ad82 --- /dev/null +++ b/keyboards/boardsource/4x12/4x12.c @@ -0,0 +1 @@ +#include "4x12.h" diff --git a/keyboards/boardsource/4x12/4x12.h b/keyboards/boardsource/4x12/4x12.h new file mode 100644 index 000000000000..52c23708fa08 --- /dev/null +++ b/keyboards/boardsource/4x12/4x12.h @@ -0,0 +1,14 @@ +#pragma once +#include "quantum.h" + +#define LAYOUT_ortho_4x12( \ + 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 \ + ) { \ + {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} \ + } diff --git a/keyboards/boardsource/4x12/config.h b/keyboards/boardsource/4x12/config.h new file mode 100644 index 000000000000..e8f858586cc6 --- /dev/null +++ b/keyboards/boardsource/4x12/config.h @@ -0,0 +1,142 @@ +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xF7E0 +#define PRODUCT_ID 0x0412 +#define DEVICE_VER 0x0000 +#define MANUFACTURER Boardsource +#define PRODUCT 4x12 +#define DESCRIPTION 40 percent ortho keyboard + +/* key matrix size */ +#define MATRIX_ROWS 4 +#define MATRIX_COLS 12 +#define MATRIX_ROW_PINS { D2, D3, D1, D0} +#define MATRIX_COL_PINS { F4, F5, F6, F7, B1, B3, B2, B6, B5, B4, E6, D7 } + +#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 + +/* 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. + * + */ + +/* 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_HELP1 H +//#define MAGIC_KEY_HELP2 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_ALT1 ESC +//#define MAGIC_KEY_LAYER0_ALT2 GRAVE +//#define MAGIC_KEY_LAYER0 0 +//#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 PAUSE +//#define MAGIC_KEY_LOCK CAPS +//#define MAGIC_KEY_EEPROM E +//#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 diff --git a/keyboards/boardsource/4x12/info.json b/keyboards/boardsource/4x12/info.json new file mode 100644 index 000000000000..d5f40fd3b282 --- /dev/null +++ b/keyboards/boardsource/4x12/info.json @@ -0,0 +1,64 @@ +{ + "keyboard_name": "Boardsource 4x12", + "url": "https://boardsource.xyz", + "maintainer": "Boardsource", + "width": 12, + "height": 4, + "layouts": { + "LAYOUT_ortho_4x12": { + "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, "y": 0 }, + { "label": "K07", "x": 6, "y": 0 }, + { "label": "K08", "x": 7, "y": 0 }, + { "label": "K09", "x": 8, "y": 0 }, + { "label": "K010", "x": 9, "y": 0 }, + { "label": "K011", "x": 10, "y": 0 }, + { "label": "K012", "x": 11, "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, "y": 1 }, + { "label": "K17", "x": 6, "y": 1 }, + { "label": "K18", "x": 7, "y": 1 }, + { "label": "K19", "x": 8, "y": 1 }, + { "label": "K110", "x": 9, "y": 1 }, + { "label": "K111", "x": 10, "y": 1 }, + { "label": "K112", "x": 11, "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, "y": 2 }, + { "label": "K27", "x": 6, "y": 2 }, + { "label": "K28", "x": 7, "y": 2 }, + { "label": "K29", "x": 8, "y": 2 }, + { "label": "K210", "x": 9, "y": 2 }, + { "label": "K211", "x": 10, "y": 2 }, + { "label": "K212", "x": 11, "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, "y": 3 }, + { "label": "K37", "x": 6, "y": 3 }, + { "label": "K38", "x": 7, "y": 3 }, + { "label": "K39", "x": 8, "y": 3 }, + { "label": "K310", "x": 9, "y": 3 }, + { "label": "K311", "x": 10, "y": 3 }, + { "label": "K312", "x": 11, "y": 3 } + ] + } + } +} diff --git a/keyboards/boardsource/4x12/keymaps/default/keymap.c b/keyboards/boardsource/4x12/keymaps/default/keymap.c new file mode 100644 index 000000000000..d9a0c47a6b39 --- /dev/null +++ b/keyboards/boardsource/4x12/keymaps/default/keymap.c @@ -0,0 +1,36 @@ +#include QMK_KEYBOARD_H + +enum layers { + _MAIN, + _RAISE, + _LOWER, +}; + +// Readability keycodes +#define LOWER MO(_LOWER) +#define RAISE MO(_RAISE) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [_MAIN] = 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_PIPE, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT + ), + + [_RAISE] = 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, _______, + RESET, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY + ), + + [_LOWER] = 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 + ) + +}; diff --git a/keyboards/boardsource/4x12/readme.md b/keyboards/boardsource/4x12/readme.md new file mode 100644 index 000000000000..17cf01ed025f --- /dev/null +++ b/keyboards/boardsource/4x12/readme.md @@ -0,0 +1,12 @@ +# 4x12 +![boardsource 4x12](https://i.imgur.com/rVtAEq5.jpg) + +* Keyboard Maintainer: [Boardsource](https://github.com/daysgobye) +* Hardware Supported: 4x12 v1 +* Hardware Availability: this keyboard is available from the [Boardsource store](https://boardsource.xyz/store/5ecb7dad86879c9a0c22db32) + +Make example for this keyboard (after setting up your build environment): + + make boardsource/4x12: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/boardsource/4x12/rules.mk b/keyboards/boardsource/4x12/rules.mk new file mode 100644 index 000000000000..0999b9d62b84 --- /dev/null +++ b/keyboards/boardsource/4x12/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 = 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 +MIDI_ENABLE = no # MIDI support +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable 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 = ortho_4x12 From 0b7b74f56a68bdae82e74c61de22f9eae42488d7 Mon Sep 17 00:00:00 2001 From: yiancar Date: Tue, 16 Jun 2020 22:02:01 +0100 Subject: [PATCH 171/930] Nebula65 (#9368) * Initial nebula65 commit * Use PWM driver * Polishing * Remove random rgblight settings * Spelling fix * Update keyboards/nebula65/keymaps/default/readme.md Co-authored-by: Ryan * Update keyboards/nebula65/keymaps/via/readme.md Co-authored-by: Ryan * Update keyboards/nebula65/readme.md Co-authored-by: Ryan * Update keyboards/nebula65/readme.md Co-authored-by: Ryan * Clean includes in .h file * Update keyboards/nebula65/readme.md Co-authored-by: Drashna Jaelre * Further cleanup Co-authored-by: Ryan Co-authored-by: Drashna Jaelre --- keyboards/nebula65/chconf.h | 714 +++++++++++++++++++ keyboards/nebula65/config.h | 163 +++++ keyboards/nebula65/halconf.h | 525 ++++++++++++++ keyboards/nebula65/info.json | 85 +++ keyboards/nebula65/keymaps/default/keymap.c | 46 ++ keyboards/nebula65/keymaps/default/readme.md | 7 + keyboards/nebula65/keymaps/via/keymap.c | 46 ++ keyboards/nebula65/keymaps/via/readme.md | 7 + keyboards/nebula65/keymaps/via/rules.mk | 1 + keyboards/nebula65/mcuconf.h | 273 +++++++ keyboards/nebula65/nebula65.c | 20 + keyboards/nebula65/nebula65.h | 37 + keyboards/nebula65/readme.md | 32 + keyboards/nebula65/rules.mk | 34 + keyboards/wilba_tech/wt_rgb_backlight.c | 164 +++-- 15 files changed, 2091 insertions(+), 63 deletions(-) create mode 100644 keyboards/nebula65/chconf.h create mode 100755 keyboards/nebula65/config.h create mode 100644 keyboards/nebula65/halconf.h create mode 100755 keyboards/nebula65/info.json create mode 100755 keyboards/nebula65/keymaps/default/keymap.c create mode 100755 keyboards/nebula65/keymaps/default/readme.md create mode 100755 keyboards/nebula65/keymaps/via/keymap.c create mode 100755 keyboards/nebula65/keymaps/via/readme.md create mode 100755 keyboards/nebula65/keymaps/via/rules.mk create mode 100644 keyboards/nebula65/mcuconf.h create mode 100755 keyboards/nebula65/nebula65.c create mode 100755 keyboards/nebula65/nebula65.h create mode 100755 keyboards/nebula65/readme.md create mode 100755 keyboards/nebula65/rules.mk diff --git a/keyboards/nebula65/chconf.h b/keyboards/nebula65/chconf.h new file mode 100644 index 000000000000..aac33037058e --- /dev/null +++ b/keyboards/nebula65/chconf.h @@ -0,0 +1,714 @@ +/* + 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. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +/** + * @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. + * + * @addtogroup config + * @details Kernel related settings and hooks. + * @{ + */ + +#ifndef CHCONF_H +#define CHCONF_H + +#define _CHIBIOS_RT_CONF_ +#define _CHIBIOS_RT_CONF_VER_6_0_ + +/*===========================================================================*/ +/** + * @name System timers settings + * @{ + */ +/*===========================================================================*/ + +/** + * @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. + * @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. + */ +#if !defined(CH_CFG_ST_TIMEDELTA) +#define CH_CFG_ST_TIMEDELTA 2 +#endif + +/** @} */ + +/*===========================================================================*/ +/** + * @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. + */ +#if !defined(CH_CFG_TIME_QUANTUM) +#define CH_CFG_TIME_QUANTUM 0 +#endif + +/** + * @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. + */ +#if !defined(CH_CFG_MEMCORE_SIZE) +#define CH_CFG_MEMCORE_SIZE 0 +#endif + +/** + * @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. + */ +#if !defined(CH_CFG_NO_IDLE_THREAD) +#define CH_CFG_NO_IDLE_THREAD FALSE +#endif + +/** @} */ + +/*===========================================================================*/ +/** + * @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. + */ +#if !defined(CH_CFG_OPTIMIZE_SPEED) +#define CH_CFG_OPTIMIZE_SPEED TRUE +#endif + +/** @} */ + +/*===========================================================================*/ +/** + * @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. + */ +#if !defined(CH_CFG_USE_TM) +#define CH_CFG_USE_TM TRUE +#endif + +/** + * @brief Threads registry APIs. + * @details If enabled then the registry APIs are included in the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_REGISTRY) +#define CH_CFG_USE_REGISTRY TRUE +#endif + +/** + * @brief Threads synchronization APIs. + * @details If enabled then the @p chThdWait() function is included in + * the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_WAITEXIT) +#define CH_CFG_USE_WAITEXIT TRUE +#endif + +/** + * @brief Semaphores APIs. + * @details If enabled then the Semaphores APIs are included in the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_SEMAPHORES) +#define CH_CFG_USE_SEMAPHORES TRUE +#endif + +/** + * @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. + */ +#if !defined(CH_CFG_USE_SEMAPHORES_PRIORITY) +#define CH_CFG_USE_SEMAPHORES_PRIORITY FALSE +#endif + +/** + * @brief Mutexes APIs. + * @details If enabled then the mutexes APIs are included in the kernel. + * + * @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. + * @note Recursive mutexes are heavier and have an increased + * memory footprint. + * + * @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. + * @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. + */ +#if !defined(CH_CFG_USE_CONDVARS) +#define CH_CFG_USE_CONDVARS TRUE +#endif + +/** + * @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. + */ +#if !defined(CH_CFG_USE_CONDVARS_TIMEOUT) +#define CH_CFG_USE_CONDVARS_TIMEOUT TRUE +#endif + +/** + * @brief Events Flags APIs. + * @details If enabled then the event flags APIs are included in the kernel. + * + * @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. + * @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. + */ +#if !defined(CH_CFG_USE_EVENTS_TIMEOUT) +#define CH_CFG_USE_EVENTS_TIMEOUT TRUE +#endif + +/** + * @brief Synchronous Messages APIs. + * @details If enabled then the synchronous messages APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_MESSAGES) +#define CH_CFG_USE_MESSAGES TRUE +#endif + +/** + * @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. + */ +#if !defined(CH_CFG_USE_MESSAGES_PRIORITY) +#define CH_CFG_USE_MESSAGES_PRIORITY TRUE +#endif + +/** + * @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. + */ +#if !defined(CH_CFG_USE_MAILBOXES) +#define CH_CFG_USE_MAILBOXES TRUE +#endif + +/** + * @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. + */ +#if !defined(CH_CFG_USE_MEMCORE) +#define CH_CFG_USE_MEMCORE TRUE +#endif + +/** + * @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. + */ +#if !defined(CH_CFG_USE_HEAP) +#define CH_CFG_USE_HEAP TRUE +#endif + +/** + * @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. + */ +#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. + * @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. + */ +#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 + +/** @} */ + +/*===========================================================================*/ +/** + * @name Debug options + * @{ + */ +/*===========================================================================*/ + +/** + * @brief Debug option, kernel statistics. + * + * @note The default is @p FALSE. + */ +#if !defined(CH_DBG_STATISTICS) +#define CH_DBG_STATISTICS FALSE +#endif + +/** + * @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. + */ +#if !defined(CH_DBG_SYSTEM_STATE_CHECK) +#define CH_DBG_SYSTEM_STATE_CHECK FALSE +#endif + +/** + * @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. + */ +#if !defined(CH_DBG_ENABLE_CHECKS) +#define CH_DBG_ENABLE_CHECKS FALSE +#endif + +/** + * @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. + */ +#if !defined(CH_DBG_ENABLE_ASSERTS) +#define CH_DBG_ENABLE_ASSERTS FALSE +#endif + +/** + * @brief Debug option, trace buffer. + * @details If enabled then the trace buffer is activated. + * + * @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. + * @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. + */ +#if !defined(CH_DBG_ENABLE_STACK_CHECK) +#define CH_DBG_ENABLE_STACK_CHECK TRUE +#endif + +/** + * @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. + */ +#if !defined(CH_DBG_FILL_THREADS) +#define CH_DBG_FILL_THREADS FALSE +#endif + +/** + * @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. + */ +#if !defined(CH_DBG_THREADS_PROFILING) +#define CH_DBG_THREADS_PROFILING FALSE +#endif + +/** @} */ + +/*===========================================================================*/ +/** + * @name Kernel hooks + * @{ + */ +/*===========================================================================*/ + +/** + * @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. + */ +#define CH_CFG_THREAD_EXTRA_FIELDS \ + /* Add threads custom fields here.*/ + +/** + * @brief Threads initialization hook. + * @details User initialization code added to the @p _thread_init() function. + * + * @note It is invoked from within @p _thread_init() 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/nebula65/config.h b/keyboards/nebula65/config.h new file mode 100755 index 000000000000..efd413328714 --- /dev/null +++ b/keyboards/nebula65/config.h @@ -0,0 +1,163 @@ +/* +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 0x5336 +#define DEVICE_VER 0x0001 +#define MANUFACTURER Yiancar-Designs +#define PRODUCT NEBULA65 +#define DESCRIPTION "A 65-percent, tool-free RGB keyboard" + +/* key matrix size */ +#define MATRIX_ROWS 5 +#define MATRIX_COLS 15 + +#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, A5 } +// To enable debugger set A13 A14 -> A5 A7 + +/* 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. + * + */ + +#define WS2812_PWM_DRIVER PWMD3 // 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_STREAM3 // DMA Stream for TIMx_UP, see the respective reference manual for the appropriate values for your MCU. +#define WS2812_DMA_CHANNEL 3 // DMA Channel for TIMx_UP, see the respective reference manual for the appropriate values for your MCU. + +#define RGB_DI_PIN A7 +#ifdef RGB_DI_PIN + #define RGBLED_NUM 10 + #define RGBLIGHT_HUE_STEP 8 + #define RGBLIGHT_SAT_STEP 8 + #define RGBLIGHT_VAL_STEP 8 + #define RGBLIGHT_LIMIT_VAL 210 /* The maximum brightness level */ + #define RGBLIGHT_ANIMATIONS +#endif + +/* Bootmagic Lite key configuration */ +#define BOOTMAGIC_LITE_ROW 0 +#define BOOTMAGIC_LITE_COLUMN 0 + +/* Backlight options */ + +#define RGB_BACKLIGHT_ENABLED 1 + +#define RGB_BACKLIGHT_NEBULA65 + +// they aren't really used if RGB_BACKLIGHT_NEBULA65 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 128 + +// 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 0b0110000000000001 +#define RGB_BACKLIGHT_ALPHAS_MODS_ROW_1 0b0100000000000001 +#define RGB_BACKLIGHT_ALPHAS_MODS_ROW_2 0b0110000000000001 +#define RGB_BACKLIGHT_ALPHAS_MODS_ROW_3 0b0111000000000001 +#define RGB_BACKLIGHT_ALPHAS_MODS_ROW_4 0b0111111000000111 + +#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 32 + +// VIA lighting is handled by the keyboard-level code +#define VIA_CUSTOM_LIGHTING_ENABLE +#define VIA_QMK_RGBLIGHT_ENABLE diff --git a/keyboards/nebula65/halconf.h b/keyboards/nebula65/halconf.h new file mode 100644 index 000000000000..e4952ece8720 --- /dev/null +++ b/keyboards/nebula65/halconf.h @@ -0,0 +1,525 @@ +/* + 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. + 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 + +#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 +#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 cryptographic subsystem. + */ +#if !defined(HAL_USE_CRY) || defined(__DOXYGEN__) +#define HAL_USE_CRY FALSE +#endif + +/** + * @brief Enables the DAC subsystem. + */ +#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 +#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 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 +#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 +#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 + +/** + * @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. */ +/*===========================================================================*/ + +/** + * @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 + +/** + * @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. */ +/*===========================================================================*/ + +/** + * @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 the zero-copy API. + */ +#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 + +/** + * @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. */ +/*===========================================================================*/ + +/** + * @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 16 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 256 bytes for both the transmission and receive + * buffers. + */ +#if !defined(SERIAL_USB_BUFFERS_SIZE) || defined(__DOXYGEN__) +#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 + +/*===========================================================================*/ +/* 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 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 +#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. */ +/*===========================================================================*/ + +/** + * @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 + +/*===========================================================================*/ +/* 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/nebula65/info.json b/keyboards/nebula65/info.json new file mode 100755 index 000000000000..c68e11ddad00 --- /dev/null +++ b/keyboards/nebula65/info.json @@ -0,0 +1,85 @@ +{ + "keyboard_name": "NEBULA65", + "url": "", + "maintainer": "yiancar", + "width": 17.25, + "height": 5, + "layouts": { + "LAYOUT_68_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.25, "y":0}, + {"x":16.25, "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.25, "y":1}, + {"x":16.25, "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":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":15.25, "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, "w":1.25}, + {"x":11.25, "y":4, "w":1.25}, + {"x":12.5, "y":4, "w":1.25}, + {"x":14.25, "y":4}, + {"x":15.25, "y":4}, + {"x":16.25, "y":4} + ] + } + } +} diff --git a/keyboards/nebula65/keymaps/default/keymap.c b/keyboards/nebula65/keymaps/default/keymap.c new file mode 100755 index 000000000000..da4479f89be0 --- /dev/null +++ b/keyboards/nebula65/keymaps/default/keymap.c @@ -0,0 +1,46 @@ +/* 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_68_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_INS, 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_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_68_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_INS, KC_PGUP, + 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_DEL, KC_PGDN, + 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, 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_VOLU, KC_VOLD, KC_MUTE, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), + +[2] = LAYOUT_68_ansi( /* 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), + +[3] = LAYOUT_68_ansi( /* 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), +}; diff --git a/keyboards/nebula65/keymaps/default/readme.md b/keyboards/nebula65/keymaps/default/readme.md new file mode 100755 index 000000000000..324676b64e03 --- /dev/null +++ b/keyboards/nebula65/keymaps/default/readme.md @@ -0,0 +1,7 @@ +# The default keymap for Nebula65. VIA support disabled. + +![Layer 0](https://i.imgur.com/dXyRwb1.png) + +![Layer 1](https://i.imgur.com/4izTAFa.png) + +Default layer is normal ANSI 65% diff --git a/keyboards/nebula65/keymaps/via/keymap.c b/keyboards/nebula65/keymaps/via/keymap.c new file mode 100755 index 000000000000..da4479f89be0 --- /dev/null +++ b/keyboards/nebula65/keymaps/via/keymap.c @@ -0,0 +1,46 @@ +/* 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_68_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_INS, 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_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_68_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_INS, KC_PGUP, + 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_DEL, KC_PGDN, + 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, 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_VOLU, KC_VOLD, KC_MUTE, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), + +[2] = LAYOUT_68_ansi( /* 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), + +[3] = LAYOUT_68_ansi( /* 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), +}; diff --git a/keyboards/nebula65/keymaps/via/readme.md b/keyboards/nebula65/keymaps/via/readme.md new file mode 100755 index 000000000000..d15266ea7c1e --- /dev/null +++ b/keyboards/nebula65/keymaps/via/readme.md @@ -0,0 +1,7 @@ +# The default keymap for Nebula65. VIA support enabled. + +![Layer 0](https://i.imgur.com/dXyRwb1.png) + +![Layer 1](https://i.imgur.com/4izTAFa.png) + +Default layer is normal ANSI 65% diff --git a/keyboards/nebula65/keymaps/via/rules.mk b/keyboards/nebula65/keymaps/via/rules.mk new file mode 100755 index 000000000000..1e5b99807cb7 --- /dev/null +++ b/keyboards/nebula65/keymaps/via/rules.mk @@ -0,0 +1 @@ +VIA_ENABLE = yes diff --git a/keyboards/nebula65/mcuconf.h b/keyboards/nebula65/mcuconf.h new file mode 100644 index 000000000000..3b1301f085bb --- /dev/null +++ b/keyboards/nebula65/mcuconf.h @@ -0,0 +1,273 @@ +/* + 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. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#ifndef MCUCONF_H +#define MCUCONF_H + +/* + * STM32F3xx 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: + * 15...0 Lowest...Highest. + * + * DMA priorities: + * 0...3 Lowest...Highest. + */ + +#define STM32F3xx_MCUCONF +#define STM32F303_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_LSI_ENABLED TRUE +#define STM32_HSE_ENABLED TRUE +#define STM32_LSE_ENABLED FALSE +#define STM32_SW STM32_SW_PLL +#define STM32_PLLSRC STM32_PLLSRC_HSE +#define STM32_PREDIV_VALUE 1 +#define STM32_PLLMUL_VALUE 9 +#define STM32_HPRE STM32_HPRE_DIV1 +#define STM32_PPRE1 STM32_PPRE1_DIV2 +#define STM32_PPRE2 STM32_PPRE2_DIV2 +#define STM32_MCOSEL STM32_MCOSEL_NOCLOCK +#define STM32_ADC12PRES STM32_ADC12PRES_DIV1 +#define STM32_ADC34PRES STM32_ADC34PRES_DIV1 +#define STM32_USART1SW STM32_USART1SW_PCLK +#define STM32_USART2SW STM32_USART2SW_PCLK +#define STM32_USART3SW STM32_USART3SW_PCLK +#define STM32_UART4SW STM32_UART4SW_PCLK +#define STM32_UART5SW STM32_UART5SW_PCLK +#define STM32_I2C1SW STM32_I2C1SW_SYSCLK +#define STM32_I2C2SW STM32_I2C2SW_SYSCLK +#define STM32_TIM1SW STM32_TIM1SW_PCLK2 +#define STM32_TIM8SW STM32_TIM8SW_PCLK2 +#define STM32_RTCSEL STM32_RTCSEL_LSI +#define STM32_USB_CLOCK_REQUIRED TRUE +#define STM32_USBPRE STM32_USBPRE_DIV1P5 + +/* + * 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. + */ +#define STM32_ADC_DUAL_MODE FALSE +#define STM32_ADC_COMPACT_SAMPLES FALSE +#define STM32_ADC_USE_ADC1 FALSE +#define STM32_ADC_USE_ADC2 FALSE +#define STM32_ADC_USE_ADC3 FALSE +#define STM32_ADC_USE_ADC4 FALSE +#define STM32_ADC_ADC1_DMA_STREAM STM32_DMA_STREAM_ID(1, 1) +#define STM32_ADC_ADC2_DMA_STREAM STM32_DMA_STREAM_ID(2, 1) +#define STM32_ADC_ADC3_DMA_STREAM STM32_DMA_STREAM_ID(2, 5) +#define STM32_ADC_ADC4_DMA_STREAM STM32_DMA_STREAM_ID(2, 2) +#define STM32_ADC_ADC1_DMA_PRIORITY 2 +#define STM32_ADC_ADC2_DMA_PRIORITY 2 +#define STM32_ADC_ADC3_DMA_PRIORITY 2 +#define STM32_ADC_ADC4_DMA_PRIORITY 2 +#define STM32_ADC_ADC12_IRQ_PRIORITY 5 +#define STM32_ADC_ADC3_IRQ_PRIORITY 5 +#define STM32_ADC_ADC4_IRQ_PRIORITY 5 +#define STM32_ADC_ADC1_DMA_IRQ_PRIORITY 5 +#define STM32_ADC_ADC2_DMA_IRQ_PRIORITY 5 +#define STM32_ADC_ADC3_DMA_IRQ_PRIORITY 5 +#define STM32_ADC_ADC4_DMA_IRQ_PRIORITY 5 +#define STM32_ADC_ADC12_CLOCK_MODE ADC_CCR_CKMODE_AHB_DIV1 +#define STM32_ADC_ADC34_CLOCK_MODE ADC_CCR_CKMODE_AHB_DIV1 + +/* + * CAN driver system settings. + */ +#define STM32_CAN_USE_CAN1 FALSE +#define STM32_CAN_CAN1_IRQ_PRIORITY 11 + +/* + * DAC driver system settings. + */ +#define STM32_DAC_DUAL_MODE FALSE +#define STM32_DAC_USE_DAC1_CH1 TRUE +#define STM32_DAC_USE_DAC1_CH2 TRUE +#define STM32_DAC_DAC1_CH1_IRQ_PRIORITY 10 +#define STM32_DAC_DAC1_CH2_IRQ_PRIORITY 10 +#define STM32_DAC_DAC1_CH1_DMA_PRIORITY 2 +#define STM32_DAC_DAC1_CH2_DMA_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_TIM4 TRUE +#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 +#define STM32_GPT_TIM4_IRQ_PRIORITY 7 +#define STM32_GPT_TIM6_IRQ_PRIORITY 7 +#define STM32_GPT_TIM7_IRQ_PRIORITY 7 +#define STM32_GPT_TIM8_IRQ_PRIORITY 7 + +/* + * 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 10 +#define STM32_I2C_I2C2_IRQ_PRIORITY 10 +#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_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 +#define STM32_ICU_TIM4_IRQ_PRIORITY 7 +#define STM32_ICU_TIM8_IRQ_PRIORITY 7 + +/* + * 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_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. + */ +#define STM32_SERIAL_USE_USART1 FALSE +#define STM32_SERIAL_USE_USART2 FALSE +#define STM32_SERIAL_USE_USART3 FALSE +#define STM32_SERIAL_USE_UART4 FALSE +#define STM32_SERIAL_USE_UART5 FALSE +#define STM32_SERIAL_USART1_PRIORITY 12 +#define STM32_SERIAL_USART2_PRIORITY 12 +#define STM32_SERIAL_USART3_PRIORITY 12 +#define STM32_SERIAL_UART4_PRIORITY 12 +#define STM32_SERIAL_UART5_PRIORITY 12 + +/* + * SPI driver system settings. + */ +#define STM32_SPI_USE_SPI1 FALSE +#define STM32_SPI_USE_SPI2 FALSE +#define STM32_SPI_USE_SPI3 FALSE +#define STM32_SPI_SPI1_DMA_PRIORITY 1 +#define STM32_SPI_SPI2_DMA_PRIORITY 1 +#define STM32_SPI_SPI3_DMA_PRIORITY 1 +#define STM32_SPI_SPI1_IRQ_PRIORITY 10 +#define STM32_SPI_SPI2_IRQ_PRIORITY 10 +#define STM32_SPI_SPI3_IRQ_PRIORITY 10 +#define STM32_SPI_DMA_ERROR_HOOK(spip) osalSysHalt("DMA failure") + +/* + * ST driver system settings. + */ +#define STM32_ST_IRQ_PRIORITY 8 +#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_USE_USART3 FALSE +#define STM32_UART_USART1_IRQ_PRIORITY 12 +#define STM32_UART_USART2_IRQ_PRIORITY 12 +#define STM32_UART_USART3_IRQ_PRIORITY 12 +#define STM32_UART_USART1_DMA_PRIORITY 0 +#define STM32_UART_USART2_DMA_PRIORITY 0 +#define STM32_UART_USART3_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_HP_IRQ_PRIORITY 13 +#define STM32_USB_USB1_LP_IRQ_PRIORITY 14 + +/* + * WDG driver system settings. + */ +#define STM32_WDG_USE_IWDG FALSE + +#endif /* MCUCONF_H */ diff --git a/keyboards/nebula65/nebula65.c b/keyboards/nebula65/nebula65.c new file mode 100755 index 000000000000..b3e7cc66399b --- /dev/null +++ b/keyboards/nebula65/nebula65.c @@ -0,0 +1,20 @@ +/* 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 . + */ +#ifndef RGB_BACKLIGHT_NEBULA65 +#error RGB_BACKLIGHT_NEBULA65 not defined, recheck config.h +#endif + +#include "nebula65.h" diff --git a/keyboards/nebula65/nebula65.h b/keyboards/nebula65/nebula65.h new file mode 100755 index 000000000000..db9c7f26cb6b --- /dev/null +++ b/keyboards/nebula65/nebula65.h @@ -0,0 +1,37 @@ +/* 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 + +#define XXX KC_NO + +#include "quantum.h" +#include "../wilba_tech/wt_rgb_backlight_keycodes.h" + +// This a shortcut to help you visually see your layout. + +#define LAYOUT_68_ansi( \ + K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, K2E, \ + K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K2C, K1E, K3E, \ + 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, \ + K40, K41, K42, K46, 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, XXX, K1E }, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, K2E }, \ + { K30, XXX, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E }, \ + { K40, K41, K42, XXX, XXX, XXX, K46, XXX, XXX, K49, K4A, K4B, K4C, K4D, K4E } \ +} diff --git a/keyboards/nebula65/readme.md b/keyboards/nebula65/readme.md new file mode 100755 index 000000000000..5189c049c37e --- /dev/null +++ b/keyboards/nebula65/readme.md @@ -0,0 +1,32 @@ +# Nebula65 + +This is a standard fixed layout 65% PCB. It supports VIA, full per-key RGB and underglow RGB. + +* Keyboard Maintainer: [Yiancar](http://yiancar-designs.com/) and on [GitHub](https://github.com/yiancar) +* Hardware Supported: A 65% keyboard with STM32F303CC +* Hardware Availability: https://spaceholdings.net/ + +## Instructions + +### Build + +Make example for this keyboard (after setting up your build environment): + + make nebula65: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). + +### Reset + +- Unplug +- Hold Escape +- Plug In +- Unplug +- Release Escape + +### Flash + +- Unplug +- Hold Escape +- Plug In +- Flash using QMK Toolbox or dfu-util (`make nebula65::flash`) diff --git a/keyboards/nebula65/rules.mk b/keyboards/nebula65/rules.mk new file mode 100755 index 000000000000..399385b3e0e6 --- /dev/null +++ b/keyboards/nebula65/rules.mk @@ -0,0 +1,34 @@ +# 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 +RGBLIGHT_ENABLE = yes # Underglow RGB +WS2812_DRIVER = pwm # Underglow RGB Driver + +CIE1931_CURVE = yes + +LAYOUTS = 68_ansi + +# project specific files +SRC += keyboards/wilba_tech/wt_main.c \ + keyboards/wilba_tech/wt_rgb_backlight.c \ + drivers/issi/is31fl3733.c \ + quantum/color.c +QUANTUM_LIB_SRC += drivers/chibios/i2c_master.c diff --git a/keyboards/wilba_tech/wt_rgb_backlight.c b/keyboards/wilba_tech/wt_rgb_backlight.c index 1a8bd8981a51..221d924c4c4c 100644 --- a/keyboards/wilba_tech/wt_rgb_backlight.c +++ b/keyboards/wilba_tech/wt_rgb_backlight.c @@ -21,6 +21,7 @@ defined(RGB_BACKLIGHT_KOYU) || \ defined(RGB_BACKLIGHT_HS60) || \ defined(RGB_BACKLIGHT_NK65) || \ + defined(RGB_BACKLIGHT_NEBULA65) || \ defined(RGB_BACKLIGHT_U80_A) || \ defined(RGB_BACKLIGHT_DAWN60) || \ defined(RGB_BACKLIGHT_WT60_B) || \ @@ -43,7 +44,7 @@ #include "wt_rgb_backlight_api.h" #include "wt_rgb_backlight_keycodes.h" -#if !defined(RGB_BACKLIGHT_HS60) && !defined(RGB_BACKLIGHT_NK65) +#if !defined(RGB_BACKLIGHT_HS60) && !defined(RGB_BACKLIGHT_NK65) && !defined(RGB_BACKLIGHT_NEBULA65) #include #include "drivers/avr/i2c_master.h" #else @@ -74,7 +75,7 @@ LED_TYPE g_ws2812_leds[WS2812_LED_TOTAL]; #elif defined(RGB_BACKLIGHT_HS60) #include "drivers/issi/is31fl3733.h" #define BACKLIGHT_LED_COUNT 64 -#elif defined(RGB_BACKLIGHT_NK65) +#elif defined(RGB_BACKLIGHT_NK65) || defined(RGB_BACKLIGHT_NEBULA65) #include "drivers/issi/is31fl3733.h" #define BACKLIGHT_LED_COUNT 69 #else @@ -211,7 +212,7 @@ const is31_led g_is31_leds[DRIVER_LED_TOTAL] = { {0, K_16, J_16, L_16}, //LA64 }; -#elif defined(RGB_BACKLIGHT_NK65) +#elif defined(RGB_BACKLIGHT_NK65) || defined(RGB_BACKLIGHT_NEBULA65) // 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) @@ -498,7 +499,7 @@ const is31_led g_is31_leds[DRIVER_LED_TOTAL] = { * | | G location * | | | B location * | | | | */ - {0, C1_1, C3_2, C4_2}, //A1 + {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 @@ -564,7 +565,7 @@ const is31_led g_is31_leds[DRIVER_LED_TOTAL] = { {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 + {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 @@ -808,7 +809,7 @@ const Point g_map_led_to_point[BACKLIGHT_LED_COUNT] PROGMEM = { const Point g_map_led_to_point_polar[BACKLIGHT_LED_COUNT] PROGMEM = { // LA0..LA17 {59,129}, {69,129}, {80,138}, {88,154}, {95,175}, {100,200}, {104,227}, {107,255}, {128,226}, - {59,255}, {64,255}, {69,255}, {75,255}, {80,255}, {84,255}, {88,255}, {91,255}, {95,255}, + {59,255}, {64,255}, {69,255}, {75,255}, {80,255}, {84,255}, {88,255}, {91,255}, {95,255}, // LB0..LB17 {53,255}, {48,255}, {44,255}, {40,255}, {35,255}, {255,255}, {255,255}, {255,255}, {255,255}, {48,138}, {40,154}, {33,175}, {28,200}, {24,227}, {21,255}, {255,255}, {255,255}, {255,255}, @@ -819,7 +820,7 @@ const Point g_map_led_to_point_polar[BACKLIGHT_LED_COUNT] PROGMEM = { {0,26}, {0,60}, {0,94}, {0,128}, {0,162}, {0,218}, {227,193}, {234,245}, {255,255}, {195,128}, {205,135}, {214,149}, {221,169}, {255,255}, {210,244}, {213,255}, {218,255}, {222,255}, // LE0..LE17 - {255,255}, {255,255}, {255,255}, {255,255}, {255,255}, {255,255}, {255,255}, {255,255}, {255,255}, + {255,255}, {255,255}, {255,255}, {255,255}, {255,255}, {255,255}, {255,255}, {255,255}, {255,255}, {70,255}, {66,255}, {62,255}, {59,255}, {56,255}, {73,255}, {76,255}, {79,255}, {84,255}, // LF0..LF17 {52,255}, {49,255}, {47,255}, {44,255}, {41,255}, {38,255}, {37,255}, {25,255}, {14,255}, @@ -883,7 +884,7 @@ const Point g_map_led_to_point_polar[BACKLIGHT_LED_COUNT] PROGMEM = { const Point g_map_led_to_point[BACKLIGHT_LED_COUNT] PROGMEM = { // LA1..LA50 {0,0}, {4,16}, {6,32}, {2,48}, {16,0}, {24,16}, {28,32}, {36,48}, {32,0}, {40,16}, {44,32}, {52,48}, {48,0}, - {56,16}, {60,32}, {68,48}, {64,0}, {72,16}, {76,32}, {84,48}, {80,0}, {88,16}, {92,32}, {100,48}, {96,0}, {104,16}, + {56,16}, {60,32}, {68,48}, {64,0}, {72,16}, {76,32}, {84,48}, {80,0}, {88,16}, {92,32}, {100,48}, {96,0}, {104,16}, {108,32}, {116,48}, {112,0}, {120,16}, {124,32}, {132,48}, {128,0}, {136,16}, {140,32}, {148,48}, {144,0}, {152,16}, {156,32}, {164,48}, {160,0}, {168,16}, {172,32}, {180,48}, {176,0}, {184, 16}, {188,32}, {20,48}, {192,0}, {200,16}, {255,255},// LA51 does not exit, dummy @@ -896,7 +897,7 @@ const Point g_map_led_to_point_polar[BACKLIGHT_LED_COUNT] PROGMEM = { // LA1..LA50 {96,255}, {109,255}, {128,242}, {147,255}, {93,255}, {105,238}, {128,192}, {154,216}, {89,255}, {101,208}, {128,155}, {159,188}, {85,255}, {96,181}, {128,119}, {165,163}, {81,255}, {89,157}, {128,82}, {173,143}, {75,255}, {81,139}, {128,46}, {183,131}, {70,255}, {70,129}, - {129,9}, {195,128}, {64,255}, {58,129}, {255,27}, {206,136}, {58,255}, {47,139}, {255,64}, {215,152}, {53,255}, {39,157}, {255,101}, + {129,9}, {195,128}, {64,255}, {58,129}, {255,27}, {206,136}, {58,255}, {47,139}, {255,64}, {215,152}, {53,255}, {39,157}, {255,101}, {222,175}, {47,255}, {32,181}, {255,137}, {228,201}, {43,255}, {27,208}, {255, 174}, {150,246}, {39,255}, {23,238}, {255,255},// LA51 does not exit, dummy // LA52..LA60 @@ -927,6 +928,29 @@ const Point g_map_led_to_point_polar[BACKLIGHT_LED_COUNT] PROGMEM = { //LA62..LB5 {221,255}, {225,255}, {229,255}, {22,255}, {12,255}, {244,255}, {234,255}, {255,255} }; +#elif defined(RGB_BACKLIGHT_NEBULA65) +const Point g_map_led_to_point[BACKLIGHT_LED_COUNT] PROGMEM = { + // LA1..LA60 + {0,0}, {4,16}, {6,31}, {10,47}, {16,0}, {24,16}, {27,31}, {35,47}, {31,0}, {39,16}, {43,31}, {51,47}, + {47,0}, {55,16}, {59,31}, {67,47}, {63,0}, {71,16}, {75,31}, {82,47}, {79,0}, {86,16}, {90,31}, {98,47}, + {94,0}, {102,16}, {106,31}, {114,47}, {110,0}, {118,16}, {122,31}, {130,47}, {126,0}, {133,16}, {137,31}, + {145,47}, {141,0}, {149,16}, {153,31}, {161,47}, {157,0}, {165,16}, {169,31}, {177,47}, {173,0}, {181, 16}, {184,31}, + {159,63}, {188,0}, {196,16}, {206,47}, {220,47}, {212,0}, {216,16}, {210,31}, {220,63}, {2,63}, {22,63}, {41,63}, {100,63}, + {255,255},// LA61 does not exit, dummy + //LA62..LB5 + {179,63}, {198,63}, {224,63}, {239,0}, {239,16}, {255,16}, {255,63}, {255,0} +}; +const Point g_map_led_to_point_polar[BACKLIGHT_LED_COUNT] PROGMEM = { + // LA1..LA60 + {96,255}, {109,255}, {128,244}, {148,255}, {93,255}, {106,245}, {128,201}, {153,225}, {80,255}, {103,219}, {128,169}, {156,200}, + {87,255}, {99,194}, {128,138}, {161,177}, {83,255}, {94,171}, {128,106}, {167,157}, {79,255}, {87,152}, {128,75}, {174,141}, {74,255}, + {80,138}, {128,43}, {183,131}, {70,255}, {70,129}, {129,12}, {193,128}, {65,255}, {60,128}, {255,20}, {203,133}, {60,255}, + {51,135}, {255,51}, {212,145}, {55,255}, {42,148}, {255,83}, {219,162}, {50,255}, {36,166}, {255,114}, + {202,255}, {46,255}, {30,188}, {228,203}, {231,225}, {40,255}, {25,219}, {255,165}, {217,255}, {160,255}, {164,255}, {168,255}, {183,255}, + {255,255},// LA61 does not exit, dummy + //LA62..LB5 + {207,255}, {213,255}, {218,255}, {35,255}, {21,255}, {19,255}, {224,255}, {32,255} +}; #elif defined(RGB_BACKLIGHT_M6_B) // M6-B is really simple: // 0 3 5 @@ -940,45 +964,45 @@ const Point g_map_led_to_point_polar[BACKLIGHT_LED_COUNT] PROGMEM = { #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}, + {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}, + {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}, + {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}, + {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 + //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} + //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 @@ -994,7 +1018,7 @@ void map_led_to_point( uint8_t index, Point *point ) point->x = pgm_read_byte(addr); point->y = pgm_read_byte(addr+1); -#if defined(RGB_BACKLIGHT_M6_B) || defined(RGB_BACKLIGHT_HS60) || defined(RGB_BACKLIGHT_NK65) +#if defined(RGB_BACKLIGHT_M6_B) || defined(RGB_BACKLIGHT_HS60) || defined(RGB_BACKLIGHT_NK65) || defined(RGB_BACKLIGHT_NEBULA65) return; #endif @@ -1181,7 +1205,7 @@ const uint8_t g_map_row_column_to_led[MATRIX_ROWS][MATRIX_COLS] PROGMEM = { { 4-1, 48-1, 8-1, 12-1, 16-1, 20-1, 24-1, 28-1, 32-1, 36-1, 40-1, 44-1, 255, 52-1 }, { 57-1, 58-1, 59-1, 255, 255, 255, 60-1, 255, 255, 255, 62-1, 63-1, 64-1, 56-1 } }; -#elif defined(RGB_BACKLIGHT_NK65) +#elif defined(RGB_BACKLIGHT_NK65) || defined(RGB_BACKLIGHT_NEBULA65) // // LA1, LA5, LA9, LA13, LA17, LA21, LA25, LA29, LA33, LA37, LA41, LA45, LA49, LA53, LB1, // LA2, LA6, LA10, LA14, LA18, LA22, LA26, LA30, LA34, LA38, LA42, LA46, LA50, ---, LB2, @@ -1207,15 +1231,15 @@ const uint8_t g_map_row_column_to_led[MATRIX_ROWS][MATRIX_COLS] PROGMEM = { // 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, +// 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 } -}; + { -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 ) @@ -1234,7 +1258,7 @@ void backlight_update_pwm_buffers(void) #elif defined(RGB_BACKLIGHT_HS60) IS31FL3733_update_pwm_buffers( ISSI_ADDR_1, 0 ); IS31FL3733_update_led_control_registers( ISSI_ADDR_1, 0 ); -#elif defined(RGB_BACKLIGHT_NK65) +#elif defined(RGB_BACKLIGHT_NK65) || defined(RGB_BACKLIGHT_NEBULA65) IS31FL3733_update_pwm_buffers( ISSI_ADDR_1, 0 ); IS31FL3733_update_pwm_buffers( ISSI_ADDR_2, 1 ); IS31FL3733_update_led_control_registers( ISSI_ADDR_1, 0 ); @@ -1269,7 +1293,7 @@ void backlight_set_color( int index, uint8_t red, uint8_t green, uint8_t blue ) { #if defined(RGB_BACKLIGHT_M6_B) IS31FL3218_set_color( index, red, green, blue ); -#elif defined(RGB_BACKLIGHT_HS60) || defined(RGB_BACKLIGHT_NK65) +#elif defined(RGB_BACKLIGHT_HS60) || defined(RGB_BACKLIGHT_NK65) || defined(RGB_BACKLIGHT_NEBULA65) IS31FL3733_set_color( index, red, green, blue ); #elif defined(RGB_BACKLIGHT_DAWN60) if( index < DRIVER_LED_TOTAL ) { @@ -1278,7 +1302,7 @@ void backlight_set_color( int index, uint8_t red, uint8_t green, uint8_t blue ) 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); + ws2812_setleds(g_ws2812_leds, WS2812_LED_TOTAL); } #else IS31FL3731_set_color( index, red, green, blue ); @@ -1289,7 +1313,7 @@ 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) +#elif defined(RGB_BACKLIGHT_HS60) || defined(RGB_BACKLIGHT_NK65) || defined(RGB_BACKLIGHT_NEBULA65) // 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); @@ -1301,7 +1325,7 @@ void backlight_set_color_all( uint8_t red, uint8_t green, uint8_t blue ) g_ws2812_leds[i].g = green; g_ws2812_leds[i].b = blue; } - ws2812_setleds(g_ws2812_leds, WS2812_LED_TOTAL); + ws2812_setleds(g_ws2812_leds, WS2812_LED_TOTAL); #else IS31FL3731_set_color_all( red, green, blue ); #endif @@ -1316,7 +1340,7 @@ void backlight_set_key_hit(uint8_t row, uint8_t column) g_any_key_hit = 0; } -#if !defined(RGB_BACKLIGHT_HS60) && !defined(RGB_BACKLIGHT_NK65) +#if !defined(RGB_BACKLIGHT_HS60) && !defined(RGB_BACKLIGHT_NK65) && !defined(RGB_BACKLIGHT_NEBULA65) // This is (F_CPU/1024) / 20 Hz // = 15625 Hz / 20 Hz // = 781 @@ -1508,15 +1532,15 @@ 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) || +#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 { + } else { backlight_set_color(i + DRIVER_LED_TOTAL, rgb2.r, rgb2.g, rgb2.b); - } - } + } + } #endif } @@ -1611,7 +1635,7 @@ void backlight_effect_cycle_all(void) for ( int i=0; i 5+64-1 ) ); //LB6-LB64 + // This only caches it for later + IS31FL3733_set_led_control_register( index, enabled, enabled, enabled ); + } + // This actually updates the LED drivers + IS31FL3733_update_led_control_registers( ISSI_ADDR_1, 0 ); + IS31FL3733_update_led_control_registers( ISSI_ADDR_2, 1 ); #else IS31FL3731_init( ISSI_ADDR_1 ); IS31FL3731_init( ISSI_ADDR_2 ); @@ -2430,7 +2468,7 @@ void backlight_init_drivers(void) // This actually updates the LED drivers IS31FL3731_update_led_control_registers( ISSI_ADDR_1, 0 ); IS31FL3731_update_led_control_registers( ISSI_ADDR_2, 1 ); -#if defined(RGB_BACKLIGHT_U80_A) +#if defined(RGB_BACKLIGHT_U80_A) IS31FL3731_update_led_control_registers( ISSI_ADDR_3, 2 ); #endif #endif // !defined(RGB_BACKLIGHT_M6_B) From f420741f9bf4dd2527d93962ec2c98e4a04545c2 Mon Sep 17 00:00:00 2001 From: Ryan Date: Wed, 17 Jun 2020 17:30:54 +1000 Subject: [PATCH 172/930] Fix error_log complaint about clueboard/66_hotswap/gen1 layout macro (#9400) * Fix error_log complaint about clueboard/66_hotswap/gen1 layout macro * Remove gen1 info.json in favour of higher level file * Split into revision-specific info.json --- keyboards/clueboard/66_hotswap/gen1/info.json | 168 +++++++++++- keyboards/clueboard/66_hotswap/gen1/rules.mk | 2 +- keyboards/clueboard/66_hotswap/info.json | 25 -- .../clueboard/66_hotswap/prototype/info.json | 245 ++++++++++++++++++ 4 files changed, 407 insertions(+), 33 deletions(-) delete mode 100644 keyboards/clueboard/66_hotswap/info.json create mode 100644 keyboards/clueboard/66_hotswap/prototype/info.json diff --git a/keyboards/clueboard/66_hotswap/gen1/info.json b/keyboards/clueboard/66_hotswap/gen1/info.json index bab110f3d50c..76c2b44208c9 100644 --- a/keyboards/clueboard/66_hotswap/gen1/info.json +++ b/keyboards/clueboard/66_hotswap/gen1/info.json @@ -1,11 +1,165 @@ { - "layouts": { - "LAYOUT": { - "layout": [{"x": 0, "y": 0, "w": 1, "label": "GRAVE"}, {"x": 1, "y": 0, "w": 1, "label": "1"}, {"x": 2, "y": 0, "w": 1, "label": "2"}, {"x": 3, "y": 0, "w": 1, "label": "3"}, {"x": 4, "y": 0, "w": 1, "label": "4"}, {"x": 5, "y": 0, "w": 1, "label": "5"}, {"x": 6, "y": 0, "w": 1, "label": "6"}, {"x": 7, "y": 0, "w": 1, "label": "7"}, {"x": 8, "y": 0, "w": 1, "label": "8"}, {"x": 9, "y": 0, "w": 1, "label": "9"}, {"x": 10, "y": 0, "w": 1, "label": "0"}, {"x": 11, "y": 0, "w": 1, "label": "DASH"}, {"x": 12, "y": 0, "w": 1, "label": "EQUALSIGN"}, {"x": 13, "y": 0, "w": 1, "label": "YEN"}, {"x": 14, "y": 0, "w": 1, "label": "BACKSPACE"}, {"x": 15.5, "y": 0, "w": 1, "label": "PAGEUP"}, {"x": 0, "y": 1, "w": 1.5, "label": "TAB"}, {"x": 1.5, "y": 1, "w": 1, "label": "Q"}, {"x": 2.5, "y": 1, "w": 1, "label": "W"}, {"x": 3.5, "y": 1, "w": 1, "label": "E"}, {"x": 4.5, "y": 1, "w": 1, "label": "R"}, {"x": 5.5, "y": 1, "w": 1, "label": "T"}, {"x": 6.5, "y": 1, "w": 1, "label": "Y"}, {"x": 7.5, "y": 1, "w": 1, "label": "U"}, {"x": 8.5, "y": 1, "w": 1, "label": "I"}, {"x": 9.5, "y": 1, "w": 1, "label": "O"}, {"x": 10.5, "y": 1, "w": 1, "label": "P"}, {"x": 11.5, "y": 1, "w": 1, "label": "LBRACKET"}, {"x": 12.5, "y": 1, "w": 1, "label": "RBRACKET"}, {"x": 13.5, "y": 1, "w": 1.5, "label": "BACKSLASH"}, {"x": 15.5, "y": 1, "w": 1, "label": "PAGEDOWN"}, {"x": 0, "y": 2, "w": 1.75, "label": "CAPSLOCK"}, {"x": 1.75, "y": 2, "w": 1, "label": "A"}, {"x": 2.75, "y": 2, "w": 1, "label": "S"}, {"x": 3.75, "y": 2, "w": 1, "label": "D"}, {"x": 4.75, "y": 2, "w": 1, "label": "F"}, {"x": 5.75, "y": 2, "w": 1, "label": "G"}, {"x": 6.75, "y": 2, "w": 1, "label": "H"}, {"x": 7.75, "y": 2, "w": 1, "label": "J"}, {"x": 8.75, "y": 2, "w": 1, "label": "K"}, {"x": 9.75, "y": 2, "w": 1, "label": "L"}, {"x": 10.75, "y": 2, "w": 1, "label": "SEMICOLON"}, {"x": 11.75, "y": 2, "w": 1, "label": "QUOTE"}, {"x": 13.75, "y": 2, "w": 1.25, "label": "ENTER"}, {"x": 0, "y": 3, "w": 1.25, "label": "LSHIFT"}, {"x": 2.25, "y": 3, "w": 1, "label": "Z"}, {"x": 3.25, "y": 3, "w": 1, "label": "X"}, {"x": 4.25, "y": 3, "w": 1, "label": "C"}, {"x": 5.25, "y": 3, "w": 1, "label": "V"}, {"x": 6.25, "y": 3, "w": 1, "label": "B"}, {"x": 7.25, "y": 3, "w": 1, "label": "N"}, {"x": 8.25, "y": 3, "w": 1, "label": "M"}, {"x": 9.25, "y": 3, "w": 1, "label": "COMMA"}, {"x": 10.25, "y": 3, "w": 1, "label": "PERIOD"}, {"x": 11.25, "y": 3, "w": 1, "label": "SLASH"}, {"x": 13.25, "y": 3, "w": 1.25, "label": "RSHIFT"}, {"x": 14.5, "y": 3, "w": 1, "label": "UP"}, {"x": 0, "y": 4, "w": 1.25, "label": "LCTRL"}, {"x": 1.25, "y": 4, "w": 1, "label": "LALT"}, {"x": 2.25, "y": 4, "w": 1.25, "label": "LCMD"}, {"x": 3.5, "y": 4, "w": 1.25, "label": "MUHENKAN"}, {"x": 4.75, "y": 4, "w": 2, "label": "SPACE1"}, {"x": 6.75, "y": 4, "w": 2, "label": "SPACE2"}, {"x": 8.75, "y": 4, "w": 1.25, "label": "HENKAN"}, {"x": 10, "y": 4, "w": 1.25, "label": "RCMD"}, {"x": 11.25, "y": 4, "w": 1, "label": "RCTRL"}, {"x": 12.25, "y": 4, "w": 1.25, "label": "FN"}, {"x": 13.5, "y": 4, "w": 1, "label": "LEFT"}, {"x": 14.5, "y": 4, "w": 1, "label": "DOWN"}, {"x": 15.5, "y": 4, "w": 1, "label": "RIGHT"}] - }, + "keyboard_name": "Clueboard 66% HotSwap Gen1", + "maintainer": "skullydazed", + "width": 16.5, + "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, "w": 2}, - "LAYOUT_66_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}, {"x":15.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}, {"x":15.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":"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.25}, {"x":14.5, "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}, {"label":"Menu", "x":12.25, "y":4, "w":1.25}, {"x":13.5, "y":4}, {"x":14.5, "y":4}, {"x":15.5, "y":4}] + {"x": 15.5, "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.5, "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": 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.25}, + + {"x": 14.5, "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": 2.75}, + {"x": 6.5, "y": 4, "w": 2.25}, + {"x": 8.75, "y": 4, "w": 1.25}, + {"x": 10, "y": 4, "w": 1.25}, + {"x": 11.25, "y": 4}, + {"x": 12.25, "y": 4, "w": 1.25}, + {"x": 13.5, "y": 4}, + {"x": 14.5, "y": 4}, + {"x": 15.5, "y": 4} + ] + }, + "LAYOUT_66_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.5, "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.5, "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": 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.25}, + + {"x": 14.5, "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, "w": 1.25}, + {"x": 11.25, "y": 4}, + {"x": 12.25, "y": 4, "w": 1.25}, + + {"x": 13.5, "y": 4}, + {"x": 14.5, "y": 4}, + {"x": 15.5, "y": 4} + ] + } } - } } diff --git a/keyboards/clueboard/66_hotswap/gen1/rules.mk b/keyboards/clueboard/66_hotswap/gen1/rules.mk index 1de003ce5a93..c013268455c0 100644 --- a/keyboards/clueboard/66_hotswap/gen1/rules.mk +++ b/keyboards/clueboard/66_hotswap/gen1/rules.mk @@ -21,4 +21,4 @@ AUDIO_ENABLE = yes # project specific files SRC = led.c -LAYOUTS += 66_ansi +LAYOUTS = 66_ansi diff --git a/keyboards/clueboard/66_hotswap/info.json b/keyboards/clueboard/66_hotswap/info.json deleted file mode 100644 index 04a748764c4f..000000000000 --- a/keyboards/clueboard/66_hotswap/info.json +++ /dev/null @@ -1,25 +0,0 @@ -{ - "keyboard_name": "Clueboard 66% HotSwap", - "width": 16.5, - "height": 5, - "layouts": { - "LAYOUT": { - "layout": [ - {"x": 0, "y": 0, "label": "GRAVE"}, {"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": 7, "y": 0, "label": "7"}, {"x": 8, "y": 0, "label": "8"}, {"x": 9, "y": 0, "label": "9"}, {"x": 10, "y": 0, "label": "0"}, {"x": 11, "y": 0, "label": "DASH"}, {"x": 12, "y": 0, "label": "EQUALSIGN"}, {"x": 13, "y": 0, "w": 2, "label": "BACKSPACE"}, {"x": 15.5, "y": 0, "label": "PAGEUP"}, - {"x": 0, "y": 1, "w": 1.5, "label": "TAB"}, {"x": 1.5, "y": 1, "label": "Q"}, {"x": 2.5, "y": 1, "label": "W"}, {"x": 3.5, "y": 1, "label": "E"}, {"x": 4.5, "y": 1, "label": "R"}, {"x": 5.5, "y": 1, "label": "T"}, {"x": 6.5, "y": 1, "label": "Y"}, {"x": 7.5, "y": 1, "label": "U"}, {"x": 8.5, "y": 1, "label": "I"}, {"x": 9.5, "y": 1, "label": "O"}, {"x": 10.5, "y": 1, "label": "P"}, {"x": 11.5, "y": 1, "label": "LBRACKET"}, {"x": 12.5, "y": 1, "label": "RBRACKET"}, {"x": 13.5, "y": 1, "w": 1.5, "label": "BACKSLASH"}, {"x": 15.5, "y": 1, "label": "PAGEDOWN"}, - {"x": 0, "y": 2, "w": 1.75, "label": "CAPS LOCK"}, {"x": 1.75, "y": 2, "label": "A"}, {"x": 2.75, "y": 2, "label": "S"}, {"x": 3.75, "y": 2, "label": "D"}, {"x": 4.75, "y": 2, "label": "F"}, {"x": 5.75, "y": 2, "label": "G"}, {"x": 6.75, "y": 2, "label": "H"}, {"x": 7.75, "y": 2, "label": "J"}, {"x": 8.75, "y": 2, "label": "K"}, {"x": 9.75, "y": 2, "label": "L"}, {"x": 10.75, "y": 2, "label": "SEMICOLON"}, {"x": 11.75, "y": 2, "label": "QUOTE"}, {"x": 12.75, "y": 2, "w": 2.25, "label": "ENTER"}, - {"x": 0, "y": 3, "w": 2.25, "label": "LSHIFT"}, {"x": 2.25, "y": 3, "label": "Z"}, {"x": 3.25, "y": 3, "label": "X"}, {"x": 4.25, "y": 3, "label": "C"}, {"x": 5.25, "y": 3, "label": "V"}, {"x": 6.25, "y": 3, "label": "B"}, {"x": 7.25, "y": 3, "label": "N"}, {"x": 8.25, "y": 3, "label": "M"}, {"x": 9.25, "y": 3, "label": "COMMA"}, {"x": 10.25, "y": 3, "label": "PERIOD"}, {"x": 11.25, "y": 3, "label": "SLASH"}, {"x": 12.25, "y": 3, "w": 2.25, "label": "RSHIFT"}, {"x": 14.5, "y": 3, "label": "UP"}, - {"x": 0, "y": 4, "w": 1.25, "label": "LCTRL"}, {"x": 1.25, "y": 4, "w": 1.25, "label": "LGUI"}, {"x": 2.5, "y": 4, "w": 1.25, "label": "LALT"}, {"x": 3.75, "y": 4, "w": 2.75, "label": "SPACE1"}, {"x": 6.5, "y": 4, "w": 2.25, "label": "SPACE2"}, {"x": 8.75, "y": 4, "w": 1.25, "label": "RGUI"}, {"x": 10, "y": 4, "w": 1.25, "label": "RALT"}, {"x": 11.25, "y": 4, "label": "FN"}, {"x": 12.25, "y": 4, "w": 1.25, "label": "RCTRL"}, {"x": 13.5, "y": 4, "label": "LEFT"}, {"x": 14.5, "y": 4, "label": "DOWN"}, {"x": 15.5, "y": 4, "label": "RIGHT"} - ] - }, - "LAYOUT_66_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": "PAGEUP", "x": 15.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": "PAGEDOWN", "x": 15.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": "SEMICOLON", "x": 10.75, "y": 2}, {"label": "QUOTE", "x": 11.75, "y": 2}, {"label": "ENTER", "x": 12.75, "y": 2, "w": 2.25}, - {"label": "LSHIFT", "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": "COMMA", "x": 9.25, "y": 3}, {"label": "PERIOD", "x": 10.25, "y": 3}, {"label": "SLASH", "x": 11.25, "y": 3}, {"label": "RSHIFT", "x": 12.25, "y": 3, "w": 2.25}, {"label": "UP", "x": 14.5, "y": 3}, - {"label": "LCTRL", "x": 0, "y": 4, "w": 1.25}, {"label": "LGUI", "x": 1.25, "y": 4, "w": 1.25}, {"label": "LALT", "x": 2.5, "y": 4, "w": 1.25}, {"label": "SPACE", "x": 3.75, "y": 4, "w": 6.25}, {"label": "RALT", "x": 10, "y": 4, "w": 1.25}, {"label": "RGUI", "x": 11.25, "y": 4}, {"label": "FN", "x": 12.25, "y": 4, "w": 1.25}, {"label": "LEFT", "x": 13.5, "y": 4}, {"label": "DOWN", "x": 14.5, "y": 4}, {"label": "RIGHT", "x": 15.5, "y": 4} - ] - } - } -} diff --git a/keyboards/clueboard/66_hotswap/prototype/info.json b/keyboards/clueboard/66_hotswap/prototype/info.json new file mode 100644 index 000000000000..32bd51d09833 --- /dev/null +++ b/keyboards/clueboard/66_hotswap/prototype/info.json @@ -0,0 +1,245 @@ +{ + "keyboard_name": "Clueboard 66% HotSwap Prototype", + "maintainer": "skullydazed", + "width": 16.5, + "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, "w": 2}, + + {"x": 15.5, "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.5, "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": 0, "y": 3, "w": 1.25}, + {"x": 1.25, "y": 3}, + {"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}, + {"x": 13.25, "y": 3, "w": 1.25}, + {"x": 14.5, "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": 2.75}, + {"x": 6.5, "y": 4, "w": 2.25}, + {"x": 8.75, "y": 4, "w": 1.25}, + {"x": 10, "y": 4, "w": 1.25}, + {"x": 11.25, "y": 4}, + {"x": 12.25, "y": 4, "w": 1.25}, + {"x": 13.5, "y": 4}, + {"x": 14.5, "y": 4}, + {"x": 15.5, "y": 4} + ] + }, + "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, "w": 2}, + + {"x": 15.5, "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.5, "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": 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.25}, + + {"x": 14.5, "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": 2.75}, + {"x": 6.5, "y": 4, "w": 2.25}, + {"x": 8.75, "y": 4, "w": 1.25}, + {"x": 10, "y": 4, "w": 1.25}, + {"x": 11.25, "y": 4}, + {"x": 12.25, "y": 4, "w": 1.25}, + {"x": 13.5, "y": 4}, + {"x": 14.5, "y": 4}, + {"x": 15.5, "y": 4} + ] + }, + "LAYOUT_66_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.5, "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.5, "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": 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.25}, + + {"x": 14.5, "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, "w": 1.25}, + {"x": 11.25, "y": 4}, + {"x": 12.25, "y": 4, "w": 1.25}, + + {"x": 13.5, "y": 4}, + {"x": 14.5, "y": 4}, + {"x": 15.5, "y": 4} + ] + } + } +} From a0bf235644064e6a63f4df51ae501269bbd68652 Mon Sep 17 00:00:00 2001 From: Erovia Date: Wed, 17 Jun 2020 23:45:53 +0100 Subject: [PATCH 173/930] CLI: Add ATmega328 and ATtiny85 to supported CPUs (#9371) * CLI: Add ATmega328 to supported CPUs Support for ATmega328 was added in #9043. * Update lib/python/qmk/constants.py --- lib/python/qmk/constants.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/python/qmk/constants.py b/lib/python/qmk/constants.py index f0d56c4430de..36a20adf4be1 100644 --- a/lib/python/qmk/constants.py +++ b/lib/python/qmk/constants.py @@ -12,4 +12,4 @@ ARM_PROCESSORS = 'cortex-m0', 'cortex-m0plus', 'cortex-m3', 'cortex-m4', 'MKL26Z64', 'MK20DX128', 'MK20DX256', 'STM32F042', 'STM32F072', 'STM32F103', 'STM32F303' AVR_PROCESSORS = 'at90usb1286', 'at90usb646', 'atmega16u2', 'atmega328p', 'atmega32a', 'atmega32u2', 'atmega32u4', None ALL_PROCESSORS = ARM_PROCESSORS + AVR_PROCESSORS -VUSB_PROCESSORS = 'atmega328p', 'atmega32a' +VUSB_PROCESSORS = 'atmega328p', 'atmega32a', 'atmega328', 'attiny85' From 1a159a38ed127fa80762a7c1b8150ba19ac34ddf Mon Sep 17 00:00:00 2001 From: Ryan Date: Thu, 18 Jun 2020 10:10:35 +1000 Subject: [PATCH 174/930] Clean up Tap Dance docs (#9372) * Clean up Tap Dance docs * Add heading IDs for translation --- docs/feature_tap_dance.md | 532 +++++++++++++++++++------------------- 1 file changed, 260 insertions(+), 272 deletions(-) diff --git a/docs/feature_tap_dance.md b/docs/feature_tap_dance.md index 2e8ab5350663..877c37336ec3 100644 --- a/docs/feature_tap_dance.md +++ b/docs/feature_tap_dance.md @@ -1,31 +1,24 @@ # Tap Dance: A Single Key Can Do 3, 5, or 100 Different Things -## Introduction +## Introduction :id=introduction + Hit the semicolon key once, send a semicolon. Hit it twice, rapidly -- send a colon. Hit it three times, and your keyboard's LEDs do a wild dance. That's just one example of what Tap Dance can do. It's one of the nicest community-contributed features in the firmware, conceived and created by [algernon](https://github.com/algernon) in [#451](https://github.com/qmk/qmk_firmware/pull/451). Here's how algernon describes the feature: With this feature one can specify keys that behave differently, based on the amount of times they have been tapped, and when interrupted, they get handled before the interrupter. -## Explanatory Comparison with `ACTION_FUNCTION_TAP` -`ACTION_FUNCTION_TAP` can offer similar functionality to Tap Dance, but it's worth noting some important differences. To do this, let's explore a certain setup! We want one key to send `Space` on single-tap, but `Enter` on double-tap. - -With `ACTION_FUNCTION_TAP`, it is quite a rain-dance to set this up, and has the problem that when the sequence is interrupted, the interrupting key will be sent first. Thus, `SPC a` will result in `a SPC` being sent, if `SPC` and `a` are both typed within `TAPPING_TERM`. With the Tap Dance feature, that'll come out correctly as `SPC a` (even if both `SPC` and `a` are typed within the `TAPPING_TERM`. - -To achieve this correct handling of interrupts, the implementation of Tap Dance hooks into two parts of the system: `process_record_quantum()`, and the matrix scan. These two parts are explained below, but for now the point to note is that we need the latter to be able to time out a tap sequence even when a key is not being pressed. That way, `SPC` alone will time out and register after `TAPPING_TERM` time. +## How to Use Tap Dance :id=how-to-use -## How to Use Tap Dance -But enough of the generalities; lets look at how to actually use Tap Dance! - -First, you will need `TAP_DANCE_ENABLE=yes` in your `rules.mk`, because the feature is disabled by default. This adds a little less than 1k to the firmware size. +First, you will need `TAP_DANCE_ENABLE = yes` in your `rules.mk`, because the feature is disabled by default. This adds a little less than 1k to the firmware size. Optionally, you might want to set a custom `TAPPING_TERM` time by adding something like this in you `config.h`: -``` +```c #define TAPPING_TERM 175 ``` -The `TAPPING_TERM` time is the maximum time allowed between taps of your Tap Dance key, and is measured in milliseconds. For example, if you used the above `#define` statement and set up a Tap Dance key that sends `Space` on single-tap and `Enter` on double-tap, then this key will send `ENT` only if you tap this key twice in less than 175ms. If you tap the key, wait more than 175ms, and tap the key again you'll end up sending `SPC SPC` instead. +The `TAPPING_TERM` time is the maximum time allowed between taps of your Tap Dance key, and is measured in milliseconds. For example, if you used the above `#define` statement and set up a Tap Dance key that sends `Space` on single-tap and `Enter` on double-tap, then this key will send `ENT` only if you tap this key twice in less than 175ms. If you tap the key, wait more than 175ms, and tap the key again you'll end up sending `SPC SPC` instead. -Next, you will want to define some tap-dance keys, which is easiest to do with the `TD()` macro, that - similar to `F()` - takes a number, which will later be used as an index into the `tap_dance_actions` array. +Next, you will want to define some tap-dance keys, which is easiest to do with the `TD()` macro, that takes a number which will later be used as an index into the `tap_dance_actions` array. After this, you'll want to use the `tap_dance_actions` array to specify what actions shall be taken when a tap-dance key is in action. Currently, there are five possible options: @@ -43,11 +36,12 @@ The first option is enough for a lot of cases, that just want dual roles. For ex Similar to the first option, the second option is good for simple layer-switching cases. -For more complicated cases, use the third or fourth options (examples of each are listed below). +For more complicated cases, use the third or fourth options (examples of each are listed below). Finally, the fifth option is particularly useful if your non-Tap-Dance keys start behaving weirdly after adding the code for your Tap Dance keys. The likely problem is that you changed the `TAPPING_TERM` time to make your Tap Dance keys easier for you to use, and that this has changed the way your other keys handle interrupts. -## Implementation Details +## Implementation Details :id=implementation + Well, that's the bulk of it! You should now be able to work through the examples below, and to develop your own Tap Dance functionality. But if you want a deeper understanding of what's going on behind the scenes, then read on for the explanation of how it all works! The main entry point is `process_tap_dance()`, called from `process_record_quantum()`, which is run for every keypress, and our handler gets to run early. This function checks whether the key pressed is a tap-dance key. If it is not, and a tap-dance was in action, we handle that first, and enqueue the newly pressed key. If it is a tap-dance key, then we check if it is the same as the already active one (if there's one active, that is). If it is not, we fire off the old one first, then register the new one. If it was the same, we increment the counter and reset the timer. @@ -58,9 +52,9 @@ Our next stop is `matrix_scan_tap_dance()`. This handles the timeout of tap-danc For the sake of flexibility, tap-dance actions can be either a pair of keycodes, or a user function. The latter allows one to handle higher tap counts, or do extra things, like blink the LEDs, fiddle with the backlighting, and so on. This is accomplished by using an union, and some clever macros. -# Examples +## Examples :id=examples -## Simple Example +### Simple Example :id=simple-example Here's a simple example for a single definition: @@ -69,23 +63,26 @@ Here's a simple example for a single definition: 3. In your `keymap.c` file, define the variables and definitions, then add to your keymap: ```c -//Tap Dance Declarations +// Tap Dance declarations enum { - TD_ESC_CAPS = 0 + TD_ESC_CAPS, }; -//Tap Dance Definitions +// Tap Dance definitions qk_tap_dance_action_t tap_dance_actions[] = { - //Tap once for Esc, twice for Caps Lock - [TD_ESC_CAPS] = ACTION_TAP_DANCE_DOUBLE(KC_ESC, KC_CAPS) -// Other declarations would go here, separated by commas, if you have them + // Tap once for Escape, twice for Caps Lock + [TD_ESC_CAPS] = ACTION_TAP_DANCE_DOUBLE(KC_ESC, KC_CAPS), }; -//In Layer declaration, add tap dance item in place of a key code -TD(TD_ESC_CAPS) +// Add tap dance item in place of a key code +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + // ... + TD(TD_ESC_CAPS) + // ... +}; ``` -## Complex Examples +### Complex Examples :id=complex-examples This section details several complex tap dance examples. All the enums used in the examples are declared like this: @@ -93,104 +90,105 @@ All the enums used in the examples are declared like this: ```c // Enums defined for all examples: enum { - CT_SE = 0, - CT_CLN, - CT_EGG, - CT_FLSH, - X_TAP_DANCE + CT_SE, + CT_CLN, + CT_EGG, + CT_FLSH, + X_TAP_DANCE }; ``` -### Example 1: Send `:` on Single Tap, `;` on Double Tap + +#### Example 1: Send `:` on Single Tap, `;` on Double Tap :id=example-1 + ```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_finished(qk_tap_dance_state_t *state, void *user_data) { + if (state->count == 1) { + register_code16(KC_COLN); + } 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); - } +void dance_cln_reset(qk_tap_dance_state_t *state, void *user_data) { + if (state->count == 1) { + unregister_code16(KC_COLN); + } else { + unregister_code(KC_SCLN); + } } -//All tap dance functions would go here. Only showing this one. +// All tap dance functions would go here. Only showing this one. qk_tap_dance_action_t tap_dance_actions[] = { - [CT_CLN] = ACTION_TAP_DANCE_FN_ADVANCED (NULL, dance_cln_finished, dance_cln_reset) + [CT_CLN] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, dance_cln_finished, dance_cln_reset), }; ``` -### Example 2: Send "Safety Dance!" After 100 Taps + +#### Example 2: Send "Safety Dance!" After 100 Taps :id=example-2 + ```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); - } +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) + [CT_EGG] = ACTION_TAP_DANCE_FN(dance_egg), }; ``` -### Example 3: Turn LED Lights On Then Off, One at a Time +#### Example 3: Turn LED Lights On Then Off, One at a Time :id=example-3 ```c -// on each tap, light up one led, from right to left -// on the forth tap, turn them off from right to left +// On each tap, light up one LED, from right to left +// On the fourth tap, turn them off from right to left 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(); - } + 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(); + wait_ms(50); + ergodox_right_led_2_off(); + wait_ms(50); + ergodox_right_led_1_off(); + } } -// on the fourth tap, set the keyboard on flash state +// On the fourth tap, set the keyboard on flash state void dance_flsh_finished(qk_tap_dance_state_t *state, void *user_data) { - if (state->count >= 4) { - reset_keyboard(); - reset_tap_dance(state); - } + if (state->count >= 4) { + reset_keyboard(); + } } -// if the flash state didn't happen, then turn off LEDs, left to right +// If the flash state didn't happen, then turn off LEDs, left to right 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(); + ergodox_right_led_1_off(); + wait_ms(50); + ergodox_right_led_2_off(); + wait_ms(50); + ergodox_right_led_3_off(); } -//All tap dances now put together. Example 3 is "CT_FLASH" +// All tap dances now put together. Example 3 is "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) + [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) }; ``` -### Example 4: 'Quad Function Tap-Dance' +#### Example 4: 'Quad Function Tap-Dance' :id=example-4 By [DanielGGordon](https://github.com/danielggordon) @@ -201,40 +199,37 @@ Below is a specific example: * Double Tap = Send `Escape` * Double Tap and Hold = Send `Alt` -## Setup - You will need a few things that can be used for 'Quad Function Tap-Dance'. You'll need to add these to the top of your `keymap.c` file, before your keymap. ```c typedef struct { - bool is_press_action; - int state; + bool is_press_action; + uint8_t 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 + SINGLE_TAP = 1, + SINGLE_HOLD, + DOUBLE_TAP, + DOUBLE_HOLD, + DOUBLE_SINGLE_TAP, // Send two single taps + TRIPLE_TAP, + TRIPLE_HOLD }; -//Tap dance enums +// Tap dance enums enum { - X_CTL = 0, - SOME_OTHER_DANCE + X_CTL, + SOME_OTHER_DANCE }; -int cur_dance (qk_tap_dance_state_t *state); - -//for the x tap dance. Put it here so it can be used in any keymap -void x_finished (qk_tap_dance_state_t *state, void *user_data); -void x_reset (qk_tap_dance_state_t *state, void *user_data); +uint8_t cur_dance(qk_tap_dance_state_t *state); +// For the x tap dance. Put it here so it can be used in any keymap +void x_finished(qk_tap_dance_state_t *state, void *user_data); +void x_reset(qk_tap_dance_state_t *state, void *user_data); ``` Now, at the bottom of your `keymap.c` file, you'll need to add the following: @@ -267,65 +262,62 @@ Now, at the bottom of your `keymap.c` file, you'll need to add the following: * For the third point, there does exist the 'DOUBLE_SINGLE_TAP', however this is not fully tested * */ -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 +uint8_t 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 the 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 } -//instanalize an instance of 'tap' for the 'x' tap dance. +// Create an instance of 'tap' for the 'x' tap dance. static tap xtap_state = { - .is_press_action = true, - .state = 0 + .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); - //Last case is for fast typing. Assuming your key is `f`: - //For example, when typing the word `buffer`, and you want to make sure that you send `ff` and not `Esc`. - //In order to type `ff` when typing fast, the next character will have to be hit within the `TAPPING_TERM`, which by default is 200ms. - } +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; + // Last case is for fast typing. Assuming your key is `f`: + // For example, when typing the word `buffer`, and you want to make sure that you send `ff` and not `Esc`. + // In order to type `ff` when typing fast, the next character will have to be hit within the `TAPPING_TERM`, which by default is 200ms. + case DOUBLE_SINGLE_TAP: tap_code(KC_X); register_code(KC_X); + } } -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; +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) + [X_CTL] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, x_finished, x_reset) }; ``` @@ -335,90 +327,91 @@ If you want to implement this in your userspace, then you may want to check out > In this configuration "hold" takes place **after** tap dance timeout (see `ACTION_TAP_DANCE_FN_ADVANCED_TIME`). To achieve instant hold, remove `state->interrupted` checks in conditions. As a result you may use comfortable longer tapping periods to have more time for taps and not to wait too long for holds (try starting with doubled `TAPPING_TERM`). -### Example 5: Using tap dance for advanced mod-tap and layer-tap keys :id=example-5-using-tap-dance-for-advanced-mod-tap-and-layer-tap-keys +#### Example 5: Using tap dance for advanced mod-tap and layer-tap keys :id=example-5 Tap dance can be used to emulate `MT()` and `LT()` behavior when the tapped code is not a basic keycode. This is useful to send tapped keycodes that normally require `Shift`, such as parentheses or curly braces—or other modified keycodes, such as `Control + X`. Below your layers and custom keycodes, add the following: ```c -// tapdance keycodes +// Tap Dance keycodes enum td_keycodes { - ALT_LP // Our example key: `LALT` when held, `(` when tapped. Add additional keycodes for each tapdance. + ALT_LP // Our example key: `LALT` when held, `(` when tapped. Add additional keycodes for each tapdance. }; -// define a type containing as many tapdance states as you need +// Define a type containing as many tapdance states as you need typedef enum { - SINGLE_TAP, - SINGLE_HOLD, - DOUBLE_SINGLE_TAP + SINGLE_TAP, + SINGLE_HOLD, + DOUBLE_SINGLE_TAP } td_state_t; -// create a global instance of the tapdance state type +// Create a global instance of the tapdance state type static td_state_t td_state; -// declare your tapdance functions: +// Declare your tapdance functions: -// function to determine the current tapdance state -int cur_dance (qk_tap_dance_state_t *state); +// Function to determine the current tapdance state +uint8_t cur_dance(qk_tap_dance_state_t *state); // `finished` and `reset` functions for each tapdance keycode -void altlp_finished (qk_tap_dance_state_t *state, void *user_data); -void altlp_reset (qk_tap_dance_state_t *state, void *user_data); +void altlp_finished(qk_tap_dance_state_t *state, void *user_data); +void altlp_reset(qk_tap_dance_state_t *state, void *user_data); ``` Below your `LAYOUT`, define each of the tapdance functions: ```c -// determine the tapdance state to return -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; } // any number higher than the maximum state value you return above +// Determine the tapdance state to return +uint8_t 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; // Any number higher than the maximum state value you return above } - -// handle the possible states for each tapdance keycode you define: - -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)); // for a layer-tap key, use `layer_on(_MY_LAYER)` here - break; - case DOUBLE_SINGLE_TAP: // allow nesting of 2 parens `((` within tapping term - tap_code16(KC_LPRN); - register_code16(KC_LPRN); - } + +// Handle the possible states for each tapdance keycode you define: + +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)); // For a layer-tap key, use `layer_on(_MY_LAYER)` here + break; + case DOUBLE_SINGLE_TAP: // Allow nesting of 2 parens `((` within tapping term + 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)); // for a layer-tap key, use `layer_off(_MY_LAYER)` here - break; - case DOUBLE_SINGLE_TAP: - unregister_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)); // For a layer-tap key, use `layer_off(_MY_LAYER)` here + break; + case DOUBLE_SINGLE_TAP: + unregister_code16(KC_LPRN); + } } -// define `ACTION_TAP_DANCE_FN_ADVANCED()` for each tapdance keycode, passing in `finished` and `reset` functions +// Define `ACTION_TAP_DANCE_FN_ADVANCED()` for each tapdance keycode, passing in `finished` and `reset` functions qk_tap_dance_action_t tap_dance_actions[] = { - [ALT_LP] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, altlp_finished, altlp_reset) + [ALT_LP] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, altlp_finished, altlp_reset) }; ``` Wrap each tapdance keycode in `TD()` when including it in your keymap, e.g. `TD(ALT_LP)`. -### Example 6: Using tap dance for momentary-layer-switch and layer-toggle keys +#### Example 6: Using tap dance for momentary-layer-switch and layer-toggle keys :id=example-6 Tap Dance can be used to mimic MO(layer) and TG(layer) functionality. For this example, we will set up a key to function as `KC_QUOT` on single-tap, as `MO(_MY_LAYER)` on single-hold, and `TG(_MY_LAYER)` on double-tap. @@ -426,97 +419,92 @@ The first step is to include the following code towards the beginning of your `k ```c typedef struct { - bool is_press_action; - int state; + bool is_press_action; + uint8_t state; } tap; -//Define a type for as many tap dance states as you need +// Define a type for as many tap dance states as you need enum { - SINGLE_TAP = 1, - SINGLE_HOLD = 2, - DOUBLE_TAP = 3 + SINGLE_TAP = 1, + SINGLE_HOLD, + DOUBLE_TAP }; enum { - QUOT_LAYR = 0 //Our custom tap dance key; add any other tap dance keys to this enum + QUOT_LAYR, // Our custom tap dance key; add any other tap dance keys to this enum }; -//Declare the functions to be used with your tap dance key(s) +// Declare the functions to be used with your tap dance key(s) -//Function associated with all tap dances -int cur_dance (qk_tap_dance_state_t *state); +// Function associated with all tap dances +uint8_t cur_dance(qk_tap_dance_state_t *state); -//Functions associated with individual tap dances -void ql_finished (qk_tap_dance_state_t *state, void *user_data); -void ql_reset (qk_tap_dance_state_t *state, void *user_data); +// Functions associated with individual tap dances +void ql_finished(qk_tap_dance_state_t *state, void *user_data); +void ql_reset(qk_tap_dance_state_t *state, void *user_data); ``` Towards the bottom of your `keymap.c`, include the following code: ```c -//Determine the current tap dance state -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; +// Determine the current tap dance state +uint8_t 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; } -//Initialize tap structure associated with example tap dance key +// Initialize tap structure associated with example tap dance key static tap ql_tap_state = { - .is_press_action = true, - .state = 0 + .is_press_action = true, + .state = 0 }; -//Functions that control what our tap dance key does -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: - //check to see if the layer is already set - if (layer_state_is(_MY_LAYER)) { - //if already set, then switch it off - layer_off(_MY_LAYER); - } else { - //if not already set, then switch the layer on - layer_on(_MY_LAYER); - } - break; - } +// Functions that control what our tap dance key does +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: + // Check to see if the layer is already set + if (layer_state_is(_MY_LAYER)) { + // If already set, then switch it off + layer_off(_MY_LAYER); + } else { + // If not already set, then switch the layer on + layer_on(_MY_LAYER); + } + break; + } } -void ql_reset (qk_tap_dance_state_t *state, void *user_data) { - //if the key was held down and now is released then switch off the layer - if (ql_tap_state.state==SINGLE_HOLD) { - layer_off(_MY_LAYER); - } - ql_tap_state.state = 0; +void ql_reset(qk_tap_dance_state_t *state, void *user_data) { + // If the key was held down and now is released then switch off the layer + if (ql_tap_state.state == SINGLE_HOLD) { + layer_off(_MY_LAYER); + } + ql_tap_state.state = 0; } -//Associate our tap dance key with its functionality +// Associate our tap dance key with its functionality qk_tap_dance_action_t tap_dance_actions[] = { - [QUOT_LAYR] = ACTION_TAP_DANCE_FN_ADVANCED_TIME(NULL, ql_finished, ql_reset, 275) + [QUOT_LAYR] = ACTION_TAP_DANCE_FN_ADVANCED_TIME(NULL, ql_finished, ql_reset, 275) }; ``` -The above code is similar to that used in previous examples. The one point to note is that we need to be able to check which layers are active at any time so we can toggle them if needed. To do this we use the `layer_state_is( layer )` function which returns `true` if the given `layer` is active. +The above code is similar to that used in previous examples. The one point to note is that we need to be able to check which layers are active at any time so we can toggle them if needed. To do this we use the `layer_state_is(layer)` function which returns `true` if the given `layer` is active. The use of `cur_dance()` and `ql_tap_state` mirrors the above examples. -The `case:SINGLE_TAP` in `ql_finished` is similar to the above examples. The `case:SINGLE_HOLD` works in conjunction with `ql_reset()` to switch to `_MY_LAYER` while the tap dance key is held, and to switch away from `_MY_LAYER` when the key is released. This mirrors the use of `MO(_MY_LAYER)`. The `case:DOUBLE_TAP` works by checking whether `_MY_LAYER` is the active layer, and toggling it on or off accordingly. This mirrors the use of `TG(_MY_LAYER)`. +The `case:SINGLE_TAP` in `ql_finished` is similar to the above examples. The `SINGLE_HOLD` case works in conjunction with `ql_reset()` to switch to `_MY_LAYER` while the tap dance key is held, and to switch away from `_MY_LAYER` when the key is released. This mirrors the use of `MO(_MY_LAYER)`. The `DOUBLE_TAP` case works by checking whether `_MY_LAYER` is the active layer, and toggling it on or off accordingly. This mirrors the use of `TG(_MY_LAYER)`. -`tap_dance_actions[]` works similar to the above examples. Note that I used `ACTION_TAP_DANCE_FN_ADVANCED_TIME()` instead of `ACTION_TAP_DANCE_FN_ADVANCED()`. This is because I like my `TAPPING_TERM` to be short (~175ms) for my non-tap-dance keys but find that this is too quick for me to reliably complete tap dance actions - thus the increased time of 275ms here. +`tap_dance_actions[]` works similar to the above examples. Note that I used `ACTION_TAP_DANCE_FN_ADVANCED_TIME()` instead of `ACTION_TAP_DANCE_FN_ADVANCED()`. This is because I like my `TAPPING_TERM` to be short (\~175ms) for my non-tap-dance keys but find that this is too quick for me to reliably complete tap dance actions - thus the increased time of 275ms here. Finally, to get this tap dance key working, be sure to include `TD(QUOT_LAYR)` in your `keymaps[]`. From 8018f4db2d6d2af506ba0f405b7ce0484799db02 Mon Sep 17 00:00:00 2001 From: Hybrid <62749953+Hybrid2288@users.noreply.github.com> Date: Thu, 18 Jun 2020 03:32:02 +0200 Subject: [PATCH 175/930] [Keymap] new keymap for XD75 (#8675) Co-authored-by: grousselle --- keyboards/xd75/keymaps/hybrid/config.h | 20 ++ keyboards/xd75/keymaps/hybrid/keymap.c | 310 ++++++++++++++++++++++++ keyboards/xd75/keymaps/hybrid/readme.md | 13 + keyboards/xd75/keymaps/hybrid/rules.mk | 21 ++ 4 files changed, 364 insertions(+) create mode 100644 keyboards/xd75/keymaps/hybrid/config.h create mode 100644 keyboards/xd75/keymaps/hybrid/keymap.c create mode 100644 keyboards/xd75/keymaps/hybrid/readme.md create mode 100644 keyboards/xd75/keymaps/hybrid/rules.mk diff --git a/keyboards/xd75/keymaps/hybrid/config.h b/keyboards/xd75/keymaps/hybrid/config.h new file mode 100644 index 000000000000..8aa116d99398 --- /dev/null +++ b/keyboards/xd75/keymaps/hybrid/config.h @@ -0,0 +1,20 @@ +/* Copyright 2017 Benjamin Kesselring + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License 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 170 +//#define RGBLIGHT_LAYERS +// place overrides here diff --git a/keyboards/xd75/keymaps/hybrid/keymap.c b/keyboards/xd75/keymaps/hybrid/keymap.c new file mode 100644 index 000000000000..e8b5a3536bcd --- /dev/null +++ b/keyboards/xd75/keymaps/hybrid/keymap.c @@ -0,0 +1,310 @@ +/* Copyright 2020 Hybrid + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public 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 { + _MAIN = 0, + _LY1, + _LY2, +}; + +enum { + TD_A, + TD_E, + TD_I, + TD_O, + TD_U, + TD_SLASH, + TD_UNDER, + TD_OP_ACCOL, + TD_CL_ACCOL, + TD_QUESTION, + TD_CEDILLE, + TD_DOT, +}; + + + +void dance_a_accent (qk_tap_dance_state_t *state, void *user_data) { + if (state->count == 2) { + tap_code (KC_0); + } + else { + tap_code (KC_Q); + } +} +void dance_e_accent (qk_tap_dance_state_t *state, void *user_data) { + if (state->count == 2) { + tap_code (KC_2); + } + else if (state->count == 3) { + tap_code (KC_7); + } + else { + tap_code (KC_E); + } +} +void dance_i_accent (qk_tap_dance_state_t *state, void *user_data) { + if (state->count == 2) { + tap_code (KC_NLCK); + register_code (KC_LALT); + tap_code (KC_P0); + tap_code (KC_P2); + tap_code (KC_P3); + tap_code (KC_P8); + unregister_code (KC_LALT); + tap_code (KC_NLCK); + } + else { + tap_code (KC_I); + + } +} +void dance_o_accent (qk_tap_dance_state_t *state, void *user_data) { + if (state->count == 2) { + tap_code (KC_NLCK); + register_code (KC_LALT); + tap_code (KC_P0); + tap_code (KC_P2); + tap_code (KC_P4); + tap_code (KC_P4); + unregister_code (KC_LALT); + tap_code (KC_NLCK); + } + else { + tap_code (KC_O); + } +} +void dance_u_accent (qk_tap_dance_state_t *state, void *user_data) { + if (state->count == 2) { + tap_code (KC_NLCK); + register_code (KC_LALT); + tap_code (KC_P0); + tap_code (KC_P2); + tap_code (KC_P4); + tap_code (KC_P9); + unregister_code (KC_LALT); + tap_code (KC_NLCK); + } + else { + tap_code (KC_U); + } + +} +void dance_slash (qk_tap_dance_state_t *state, void *user_data) { + if (state->count == 2) { + tap_code (KC_NLCK); + register_code (KC_LALT); + tap_code (KC_P0); + tap_code (KC_P9); + tap_code (KC_P2); + unregister_code (KC_LALT); + tap_code (KC_NLCK); + } + else { + tap_code (KC_PSLS); + } +} +void dance_under (qk_tap_dance_state_t *state, void *user_data) { + if (state->count == 2) { + tap_code (KC_NLCK); + register_code (KC_LALT); + tap_code (KC_P0); + tap_code (KC_P9); + tap_code (KC_P5); + unregister_code (KC_LALT); + tap_code (KC_NLCK); + } + else { + tap_code (KC_6); + } +} +void dance_open_accol (qk_tap_dance_state_t *state, void *user_data) { + if (state->count == 2) { + tap_code (KC_NLCK); + register_code (KC_LALT); + tap_code (KC_P0); + tap_code (KC_P1); + tap_code (KC_P2); + tap_code (KC_P3); + unregister_code (KC_LALT); + tap_code (KC_NLCK); + } + else if (state->count == 3) { + tap_code (KC_NLCK); + register_code (KC_LALT); + tap_code (KC_P0); + tap_code (KC_P9); + tap_code (KC_P1); + unregister_code (KC_LALT); + tap_code (KC_NLCK); + } + else { + tap_code (KC_5); + } +} +void dance_close_accol (qk_tap_dance_state_t *state, void *user_data) { + if (state->count == 2) { + tap_code (KC_NLCK); + register_code (KC_LALT); + tap_code (KC_P0); + tap_code (KC_P1); + tap_code (KC_P2); + tap_code (KC_P5); + unregister_code (KC_LALT); + tap_code (KC_NLCK); + + } + else if (state->count == 3) { + tap_code (KC_NLCK); + register_code (KC_LALT); + tap_code (KC_P0); + tap_code (KC_P9); + tap_code (KC_P3); + unregister_code (KC_LALT); + tap_code (KC_NLCK); + } + else { + tap_code (KC_MINS); + } +} +void dance_question (qk_tap_dance_state_t *state, void *user_data) { + if (state->count == 2) { + tap_code (KC_NLCK); + register_code (KC_LALT); + tap_code (KC_P0); + tap_code (KC_P0); + tap_code (KC_P3); + tap_code (KC_P3); + unregister_code (KC_LALT); + tap_code (KC_NLCK); + + } + else { + tap_code (KC_NLCK); + register_code (KC_LALT); + tap_code (KC_P0); + tap_code (KC_P0); + tap_code (KC_P6); + tap_code (KC_P3); + unregister_code (KC_LALT); + tap_code (KC_NLCK); + + } +} +void dance_cedille (qk_tap_dance_state_t *state, void *user_data) { + if (state->count == 2) { + tap_code (KC_9); + } + else { + tap_code (KC_C); + } +} +void dance_dot (qk_tap_dance_state_t *state, void *user_data) { + if (state->count == 2) { + tap_code (KC_NLCK); + register_code (KC_LALT); + tap_code (KC_P0); + tap_code (KC_P4); + tap_code (KC_P4); + unregister_code (KC_LALT); + tap_code (KC_NLCK); + } + else { + tap_code (KC_NLCK); + register_code (KC_LALT); + tap_code (KC_P0); + tap_code (KC_P4); + tap_code (KC_P6); + unregister_code (KC_LALT); + tap_code (KC_NLCK); + } +} +qk_tap_dance_action_t tap_dance_actions[] = { + [TD_A] = ACTION_TAP_DANCE_FN(dance_a_accent), + [TD_E] = ACTION_TAP_DANCE_FN(dance_e_accent), + [TD_I] = ACTION_TAP_DANCE_FN(dance_i_accent), + [TD_O] = ACTION_TAP_DANCE_FN(dance_o_accent), + [TD_U] = ACTION_TAP_DANCE_FN(dance_u_accent), + [TD_SLASH] = ACTION_TAP_DANCE_FN(dance_slash), + [TD_UNDER] = ACTION_TAP_DANCE_FN(dance_under), + [TD_OP_ACCOL] = ACTION_TAP_DANCE_FN(dance_open_accol), + [TD_CL_ACCOL] = ACTION_TAP_DANCE_FN(dance_close_accol), + [TD_QUESTION] = ACTION_TAP_DANCE_FN(dance_question), + [TD_CEDILLE] = ACTION_TAP_DANCE_FN(dance_cedille), + [TD_DOT] = ACTION_TAP_DANCE_FN(dance_dot), +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +// red led layout + [_MAIN] = LAYOUT_ortho_5x15( + KC_ESC, KC_RBRC, KC_1, KC_2, KC_3, KC_4, KC_5, TD(TD_DOT), KC_6, KC_7, KC_8, KC_9, KC_0, DF(_LY1), KC_NO, + KC_TAB, TD(TD_A), KC_W, TD(TD_E), KC_R, KC_T, KC_Y, KC_ENT, TD(TD_U), TD(TD_I), TD(TD_O), KC_P, KC_NO, TD(TD_OP_ACCOL), TD(TD_CL_ACCOL), + KC_PGUP, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_ENT, KC_J, KC_K, KC_L, KC_SCLN, KC_UP, KC_NO, KC_NO, + KC_PGDN, KC_Z, KC_X, TD(TD_CEDILLE), KC_V, KC_B, KC_N, KC_DOT, TD(TD_QUESTION), TD(TD_UNDER), TD(TD_SLASH), KC_LEFT, KC_DOWN, KC_RGHT, KC_NO, + KC_NO, KC_NO, KC_LALT, KC_LCTL, KC_LSFT, KC_SPC, KC_HOME, KC_LGUI, KC_END, KC_BSPC, KC_RALT, KC_DEL, KC_PMNS, KC_NO, MO(1) + ), + +// green led layout + [_LY1] = LAYOUT_ortho_5x15( + KC_ESC, RGB_TOG, RGB_RMOD, RGB_M_P, RGB_M_B, RGB_M_SW, RGB_M_K, RGB_M_G, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, DF(_LY2), DF(_MAIN), + DEBUG, KC_PSCR, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS, + RESET, KC_NO, KC_S, KC_D, KC_F, KC_G, KC_Z, KC_J, KC_K, KC_L, KC_M, KC_P7, KC_P8, KC_P9, KC_PPLS, KC_LSFT, + KC_NO, KC_X, KC_C, KC_V, KC_B, KC_N, KC_COMM, KC_SCLN, KC_NO, KC_NO, KC_P4, KC_P5, KC_P6, KC_PEQL, KC_LCBR, + KC_NO, KC_NO, KC_NO, KC_SPC, KC_SPC, KC_SPC, KC_TRNS, KC_NO, KC_TRNS, KC_P0, KC_P1, KC_P2, KC_P3, KC_TRNS + ), + +// blue led layout + [_LY2] = LAYOUT_ortho_5x15( + KC_MPRV, KC_MNXT, KC_NO, KC_NO, KC_NO, BL_ON, BL_OFF, KC_NO, KC_NO, KC_NO, RGB_TOG, RGB_RMOD, RGB_MOD, KC_NO, DF(_LY1), + KC_VOLD, KC_VOLU, KC_NO, KC_NO, KC_NO, BL_TOGG, BL_STEP, KC_NO, KC_NO, KC_NO, KC_NO, RGB_HUD, RGB_HUI, RGB_M_P, RGB_M_B, + KC_MPLY, KC_MSTP, KC_MUTE, KC_NO, KC_NO, BL_DEC, BL_INC, KC_NO, KC_NO, KC_NO, KC_NO, RGB_SAD, RGB_SAI, RGB_M_R, RGB_M_SW, + KC_MRWD, KC_MFFD, KC_NO, KC_NO, KC_NO, BL_BRTG, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, RGB_VAD, RGB_VAI, RGB_M_SN, RGB_M_K, + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_TRNS, KC_TRNS, KC_TRNS, KC_NO, KC_NO, RGB_SPD, RGB_SPI, RGB_M_X, RGB_M_G + ) + +}; + + +//Define layer colors +#define rgblight_setrgb_user_MAIN() rgblight_sethsv_red() +#define rgblight_setrgb_user_LY1() rgblight_sethsv_green() +#define rgblight_setrgb_user_LY2() rgblight_sethsv_blue() + +void matrix_init_user(void) { + rgblight_enable(); + rgblight_mode(1); + rgblight_setrgb_user_MAIN(); +} + + +//Set a color based on the layer +layer_state_t layer_state_set_user(layer_state_t state) { + switch (get_highest_layer(state)) { + case _LY1: + rgblight_setrgb_user_LY1(); + break; + case _LY2: + rgblight_setrgb_user_LY2(); + break; + default: + rgblight_setrgb_user_MAIN(); + break; + } + return state; +} diff --git a/keyboards/xd75/keymaps/hybrid/readme.md b/keyboards/xd75/keymaps/hybrid/readme.md new file mode 100644 index 000000000000..dbe41037c23d --- /dev/null +++ b/keyboards/xd75/keymaps/hybrid/readme.md @@ -0,0 +1,13 @@ +# +# My XD75 keyboard +# The layouts are 100 % customizable by myself. +# The layout 1 is almost finished (layer 2 and layer 3 are not finished, for testing purpose as far) +# Layout 1 => rgb red +# Layout 2 => rgb green +# Layout 1 => rgb blue +# (to memorize => rgb :) ) +# +# I added some double tap dance for french accent (à é è î ô ù, not for every accents) and c & ç +# Some double tap dance for useful mapping (- & _ , ({[ & )}], etc... ) +# +# diff --git a/keyboards/xd75/keymaps/hybrid/rules.mk b/keyboards/xd75/keymaps/hybrid/rules.mk new file mode 100644 index 000000000000..403c3c65ce97 --- /dev/null +++ b/keyboards/xd75/keymaps/hybrid/rules.mk @@ -0,0 +1,21 @@ +# Copyright 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 . + +RGBLIGHT_ENABLE = yes +TAP_DANCE_ENABLE = yes +UNICODE_ENABLE = no +SLEEP_LED_ENABLE = no +BACKLIGHT_ENABLE = no + From 39ff121d7389fd6575e65ecb54b11bb87777ca38 Mon Sep 17 00:00:00 2001 From: Dan Date: Wed, 17 Jun 2020 21:53:36 -0400 Subject: [PATCH 176/930] Implement game mode layer for dcompact on planck (#9402) --- keyboards/planck/keymaps/dcompact/keymap.c | 103 +++++++++++++++++++- keyboards/planck/keymaps/dcompact/readme.md | 2 +- 2 files changed, 101 insertions(+), 4 deletions(-) diff --git a/keyboards/planck/keymaps/dcompact/keymap.c b/keyboards/planck/keymaps/dcompact/keymap.c index 0e53d305d524..cb4cd3f5b9e1 100644 --- a/keyboards/planck/keymaps/dcompact/keymap.c +++ b/keyboards/planck/keymaps/dcompact/keymap.c @@ -34,6 +34,9 @@ enum planck_layers { _RAISE, _FUNC, _PLOVER, + _GAME, + _LNUM, + _LFUN, _ADJUST, _MOUSE }; @@ -41,12 +44,16 @@ enum planck_layers { enum planck_keycodes { BASE = SAFE_RANGE, PLOVER, + GAME, + LNUM, + LFUN, LOWER, RAISE, FUNC, MOUSE, ADJUST, - EXT_PLV + EXT_PLV, + EXT_GM }; const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { @@ -59,14 +66,14 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |------+------+------+------+------+------|------+------+------+------+------+------| * |Del/Sf| : ; | Q | J | K | X | B | M | W | V | Z | Bspc | * |------+------+------+------+------+------+------+------+------+------+------+------| - * | Ctrl |Plover| GUI | Alt |Lower |Shift |Space |Raise | Alt | GUI | Fn |Enter | + * | Ctrl | Game | GUI | Alt |Lower |Shift |Space |Raise | Alt | GUI | Fn |Enter | * `-----------------------------------------------------------------------------------' */ [_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 + KC_LCTL, GAME, KC_LGUI, KC_LALT, LOWER, KC_LSFT, KC_SPC, RAISE, KC_RALT, KC_RGUI, FUNC, KC_ENT ), /* Lower @@ -123,6 +130,61 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { _______, _______, _______, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, XXXXXXX ), +/* Game + * ,-----------------------------------------------------------------------------------. + * | Tab | Q | W | E | H | Z | I | | | | | | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * |Shift | A | S | D | U | X | P | | | | | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | Ctrl | F | G | R | M | C | O | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Esc | ~ | Alt |Space |Shift | LNUM | LFUN | | | | | Exit | + * `-----------------------------------------------------------------------------------' + */ +[_GAME] = LAYOUT_planck_grid( + KC_TAB, KC_Q, KC_W, KC_E, KC_H, KC_Z, KC_I, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + KC_LSFT, KC_A, KC_S, KC_D, KC_U, KC_X, KC_P, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + KC_LCTL, KC_F, KC_G, KC_R, KC_M, KC_C, KC_O, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + KC_ESC, KC_TILD, KC_LALT, KC_SPC, KC_LSFT, LNUM, LFUN, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, EXT_GM +), + +/* LNum + * ,-----------------------------------------------------------------------------------. + * | Tab | 1 | 2 | 3 | 4 | | | | | | | | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * |Shift | 5 | 6 | 7 | 8 | | | | | | | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | Ctrl | 9 | 10 | , | . | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Esc | | Alt |Space |Shift | | | | | | | | + * `-----------------------------------------------------------------------------------' + */ +[_LNUM] = LAYOUT_planck_grid( + _______, KC_1, KC_2, KC_3, KC_4, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + _______, KC_5, KC_6, KC_7, KC_8, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + _______, KC_9, KC_0, KC_COMM, KC_DOT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + _______, XXXXXXX, _______, _______, _______, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX +), + +/* LFun + * ,-----------------------------------------------------------------------------------. + * | Tab | F1 | F2 | F3 | F4 | | | | | | | | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * |Shift | F5 | F6 | F7 | F8 | | | | | | | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | Ctrl | F9 | F10 | F11 | F12 | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Esc | | Alt |Space |Shift | | | | | | | | + * `-----------------------------------------------------------------------------------' + */ +[_LFUN] = LAYOUT_planck_grid( + _______, KC_F1, KC_F2, KC_F3, KC_F4, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + _______, KC_F5, KC_F6, KC_F7, KC_F8, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + _______, KC_F9, KC_F10, KC_F11, KC_F12, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + _______, XXXXXXX, _______, _______, _______, XXXXXXX, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX +), + + /* Mouse (Not Reachable on Planck) * ,-----------------------------------------------------------------------------------. * | | | | | | | | | | | | | @@ -234,6 +296,41 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { } return false; break; + case GAME: + if (!record->event.pressed) { + #ifdef AUDIO_ENABLE + stop_all_notes(); + PLAY_SONG(plover_song); + #endif + layer_on(_GAME); + } + return false; + break; + case EXT_GM: + if (record->event.pressed) { + #ifdef AUDIO_ENABLE + PLAY_SONG(plover_gb_song); + #endif + layer_off(_GAME); + } + return false; + break; + case LNUM: + if (record->event.pressed) { + layer_on(_LNUM); + } else { + layer_off(_LNUM); + } + return false; + break; + case LFUN: + if (record->event.pressed) { + layer_on(_LFUN); + } else { + layer_off(_LFUN); + } + return false; + break; case MOUSE: if (record->event.pressed) { layer_on(_MOUSE); diff --git a/keyboards/planck/keymaps/dcompact/readme.md b/keyboards/planck/keymaps/dcompact/readme.md index cd88c3fed34b..f3f3d8ca6ead 100644 --- a/keyboards/planck/keymaps/dcompact/readme.md +++ b/keyboards/planck/keymaps/dcompact/readme.md @@ -1,6 +1,6 @@ # DCompact Layout -**Dvorak, Layered, Mouse-Enabled, Compact -- now with Plover~** +**Dvorak, Layered, Mouse-Enabled, Compact -- now with Game Mode~** _See [the layout source](keymap.c) for the actual layout_ From 157319fbd03e6f7a6618111fd03ab3e53317893e Mon Sep 17 00:00:00 2001 From: KgOfHedgehogs Date: Thu, 18 Jun 2020 04:17:30 +0200 Subject: [PATCH 177/930] [Keyboard] Jian keyboard (#8914) Co-authored-by: Joel Challis Co-authored-by: Drashna Jaelre Co-authored-by: Ryan Co-authored-by: Nick Brassel --- keyboards/jian/config.h | 21 + keyboards/jian/handwired/config.h | 41 ++ keyboards/jian/handwired/handwired.c | 8 + keyboards/jian/handwired/handwired.h | 30 ++ keyboards/jian/handwired/rules.mk | 19 + keyboards/jian/info.json | 67 +++ keyboards/jian/jian.c | 1 + keyboards/jian/jian.h | 19 + keyboards/jian/keymaps/advanced/config.h | 27 ++ keyboards/jian/keymaps/advanced/keymap.c | 584 +++++++++++++++++++++++ keyboards/jian/keymaps/advanced/rules.mk | 5 + keyboards/jian/keymaps/default/config.h | 22 + keyboards/jian/keymaps/default/keymap.c | 120 +++++ keyboards/jian/keymaps/default/rules.mk | 2 + keyboards/jian/nsrev2/config.h | 129 +++++ keyboards/jian/nsrev2/nsrev2.c | 74 +++ keyboards/jian/nsrev2/nsrev2.h | 39 ++ keyboards/jian/nsrev2/rules.mk | 20 + keyboards/jian/readme.md | 16 + keyboards/jian/rev1/config.h | 138 ++++++ keyboards/jian/rev1/rev1.c | 74 +++ keyboards/jian/rev1/rev1.h | 56 +++ keyboards/jian/rev1/rules.mk | 20 + keyboards/jian/rev2/config.h | 136 ++++++ keyboards/jian/rev2/rev2.c | 74 +++ keyboards/jian/rev2/rev2.h | 39 ++ keyboards/jian/rev2/rules.mk | 20 + keyboards/jian/rules.mk | 1 + 28 files changed, 1802 insertions(+) create mode 100644 keyboards/jian/config.h create mode 100644 keyboards/jian/handwired/config.h create mode 100644 keyboards/jian/handwired/handwired.c create mode 100644 keyboards/jian/handwired/handwired.h create mode 100644 keyboards/jian/handwired/rules.mk create mode 100644 keyboards/jian/info.json create mode 100644 keyboards/jian/jian.c create mode 100644 keyboards/jian/jian.h create mode 100644 keyboards/jian/keymaps/advanced/config.h create mode 100644 keyboards/jian/keymaps/advanced/keymap.c create mode 100644 keyboards/jian/keymaps/advanced/rules.mk create mode 100644 keyboards/jian/keymaps/default/config.h create mode 100644 keyboards/jian/keymaps/default/keymap.c create mode 100644 keyboards/jian/keymaps/default/rules.mk create mode 100644 keyboards/jian/nsrev2/config.h create mode 100644 keyboards/jian/nsrev2/nsrev2.c create mode 100644 keyboards/jian/nsrev2/nsrev2.h create mode 100644 keyboards/jian/nsrev2/rules.mk create mode 100644 keyboards/jian/readme.md create mode 100644 keyboards/jian/rev1/config.h create mode 100644 keyboards/jian/rev1/rev1.c create mode 100644 keyboards/jian/rev1/rev1.h create mode 100644 keyboards/jian/rev1/rules.mk create mode 100644 keyboards/jian/rev2/config.h create mode 100644 keyboards/jian/rev2/rev2.c create mode 100644 keyboards/jian/rev2/rev2.h create mode 100644 keyboards/jian/rev2/rules.mk create mode 100644 keyboards/jian/rules.mk diff --git a/keyboards/jian/config.h b/keyboards/jian/config.h new file mode 100644 index 000000000000..cfb6bf4ffccd --- /dev/null +++ b/keyboards/jian/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/jian/handwired/config.h b/keyboards/jian/handwired/config.h new file mode 100644 index 000000000000..5b69621bcdac --- /dev/null +++ b/keyboards/jian/handwired/config.h @@ -0,0 +1,41 @@ +/* +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" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xC0DE +#define PRODUCT_ID 0x1337 +#define DEVICE_VER 0x0010 +#define MANUFACTURER KgOfHedgehogs +#define PRODUCT Huma +#define DESCRIPTION An ergo handwired keyboard + +/* key matrix size */ +// Rows are doubled-up +#define MATRIX_ROWS 4 +#define MATRIX_COLS 14 +#define DIODE_DIRECTION COL2ROW + +// wiring of each half +#define MATRIX_ROW_PINS { D3, D2, B5, B6 } +#define MATRIX_COL_PINS { F4, F5, F6, F7, B1, B3, B2, B4, E6, D7, C6, D4, D0, D1 } + +/* Set 0 if debouncing isn't needed */ +#define DEBOUNCE 5 diff --git a/keyboards/jian/handwired/handwired.c b/keyboards/jian/handwired/handwired.c new file mode 100644 index 000000000000..bcb7ec710298 --- /dev/null +++ b/keyboards/jian/handwired/handwired.c @@ -0,0 +1,8 @@ +#include "handwired.h" + +const keypos_t hand_swap_config[MATRIX_ROWS][MATRIX_COLS] = { + {{13, 0}, {12, 0}, {11, 0}, {10, 0}, {9, 0}, {8, 0}, {7, 0}, {6, 0}, {5, 0}, {4, 0}, {3, 0}, {2, 0}, {1, 0}, {0, 0}}, + {{13, 1}, {12, 1}, {11, 1}, {10, 1}, {9, 1}, {8, 1}, {7, 1}, {6, 1}, {5, 1}, {4, 1}, {3, 1}, {2, 1}, {1, 1}, {0, 1}}, + {{13, 2}, {12, 2}, {11, 2}, {10, 2}, {9, 2}, {8, 2}, {7, 2}, {6, 2}, {5, 2}, {4, 2}, {3, 2}, {2, 2}, {1, 2}, {0, 2}}, + {{13, 3}, {12, 3}, {11, 3}, {10, 3}, {9, 3}, {8, 3}, {7, 3}, {6, 3}, {5, 3}, {4, 3}, {3, 3}, {2, 3}, {1, 3}, {0, 3}}, +}; diff --git a/keyboards/jian/handwired/handwired.h b/keyboards/jian/handwired/handwired.h new file mode 100644 index 000000000000..9b388b94ae23 --- /dev/null +++ b/keyboards/jian/handwired/handwired.h @@ -0,0 +1,30 @@ +#pragma once + +#include "jian.h" + +#define XXX KC_NO +#define LAYOUT( \ + L00, L01, L02, L03, L04, L05, L06, R06, R05, R04, R03, R02, R01, R00, \ + L11, L12, L13, L14, L15, L16, R16, R15, R14, R13, R12, R11, \ + L21, L22, L23, L24, L25, L26, R26, R25, R24, R23, R22, R21, \ + L34, L35, L36, R36, R35, R34 \ +) \ +{ \ + {L00, L01, L02, L03, L04, L05, L06, R06, R05, R04, R03, R02, R01, R00}, \ + {XXX, L11, L12, L13, L14, L15, L16, R16, R15, R14, R13, R12, R11, XXX}, \ + {XXX, L21, L22, L23, L24, L25, L26, R26, R25, R24, R23, R22, R21, XXX}, \ + {XXX, XXX, XXX, XXX, L34, L35, L36, R36, R35, R34, XXX, XXX, XXX, XXX} \ +} + +#define LAYOUT_symmetric( \ + K00, K01, K02, K03, K04, K05, K06, \ + K11, K12, K13, K14, K15, K16, \ + K21, K22, K23, K24, K25, K26, \ + K34, K35, K36 \ +) \ +{ \ + {K00, K01, K02, K03, K04, K05, K06, K06, K05, K04, K03, K02, K01, K00}, \ + {XXX, K11, K12, K13, K14, K15, K16, K16, K15, K14, K13, K12, K11, XXX}, \ + {XXX, K21, K22, K23, K24, K25, K26, K26, K25, K24, K23, K22, K21, XXX}, \ + {XXX, XXX, XXX, XXX, K34, K35, K36, K36, K35, K34, XXX, XXX, XXX, XXX} \ +} diff --git a/keyboards/jian/handwired/rules.mk b/keyboards/jian/handwired/rules.mk new file mode 100644 index 000000000000..61f40dfcbe1a --- /dev/null +++ b/keyboards/jian/handwired/rules.mk @@ -0,0 +1,19 @@ +# 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 +# +SPLIT_KEYBOARD = no +BACKLIGHT_ENABLE = no +RGBLIGHT_ENABLE = no diff --git a/keyboards/jian/info.json b/keyboards/jian/info.json new file mode 100644 index 000000000000..4503fb3b477c --- /dev/null +++ b/keyboards/jian/info.json @@ -0,0 +1,67 @@ +{ + "keyboard_name": "jian", + "url": "t.me/s/kgofhedgehogs", + "maintainer": "KGOH", + "width": 17, + "height": 4, + "layouts": { + "LAYOUT": { + "layout": [ + { "label": "Super", "x": 0, "y": 1.5 }, + { "label": "~", "x": 1, "y": 0.75 }, + { "label": "Q", "x": 2, "y": 0.625 }, + { "label": "W", "x": 3, "y": 0.25 }, + { "label": "E", "x": 4, "y": 0 }, + { "label": "R", "x": 5, "y": 0.25 }, + { "label": "T", "x": 6, "y": 0.375 }, + + { "label": "Y", "x": 10, "y": 0.375 }, + { "label": "U", "x": 11, "y": 0.25 }, + { "label": "I", "x": 12, "y": 0 }, + { "label": "O", "x": 13, "y": 0.25 }, + { "label": "P", "x": 14, "y": 0.625 }, + { "label": "{[", "x": 15, "y": 0.75 }, + { "label": "}]", "x": 16, "y": 1.5 }, + + + { "label": "Ctrl", "x": 1, "y": 1.75 }, + { "label": "A", "x": 2, "y": 1.625 }, + { "label": "S", "x": 3, "y": 1.25 }, + { "label": "D", "x": 4, "y": 1 }, + { "label": "F", "x": 5, "y": 1.25 }, + { "label": "G", "x": 6, "y": 1.375 }, + + { "label": "H", "x": 10, "y": 1.375 }, + { "label": "J", "x": 11, "y": 1.25 }, + { "label": "K", "x": 12, "y": 1 }, + { "label": "L", "x": 13, "y": 1.25 }, + { "label": ":;", "x": 14, "y": 1.625 }, + { "label": "\"'", "x": 15, "y": 1.75 }, + + + { "label": "Alt", "x": 1, "y": 2.75 }, + { "label": "Z", "x": 2, "y": 2.625 }, + { "label": "X", "x": 3, "y": 2.25 }, + { "label": "C", "x": 4, "y": 2 }, + { "label": "V", "x": 5, "y": 2.25 }, + { "label": "B", "x": 6, "y": 2.375 }, + + { "label": "N", "x": 10, "y": 2.375 }, + { "label": "M", "x": 11, "y": 2.25 }, + { "label": "<,", "x": 12, "y": 2 }, + { "label": ">.", "x": 13, "y": 2.25 }, + { "label": "?/", "x": 14, "y": 2.625 }, + { "label": "|\\", "x": 15, "y": 2.75 }, + + + { "label": "Tab", "x": 5, "y": 3.25 }, + { "label": "Spc", "x": 6, "y": 3.375 }, + { "label": "Enter", "x": 7, "y": 3.5 }, + + { "label": "Esc", "x": 9, "y": 3.5 }, + { "label": "Bscp", "x": 10, "y": 3.375 }, + { "label": "Del", "x": 11, "y": 3.25 } + ] + } + } +} diff --git a/keyboards/jian/jian.c b/keyboards/jian/jian.c new file mode 100644 index 000000000000..e85b8554f039 --- /dev/null +++ b/keyboards/jian/jian.c @@ -0,0 +1 @@ +#include "jian.h" diff --git a/keyboards/jian/jian.h b/keyboards/jian/jian.h new file mode 100644 index 000000000000..d09d056e9b50 --- /dev/null +++ b/keyboards/jian/jian.h @@ -0,0 +1,19 @@ +#pragma once + +#include "quantum.h" + +#ifdef KEYBOARD_jian_handwired + #include "handwired.h" +#endif + +#ifdef KEYBOARD_jian_rev1 + #include "rev1.h" +#endif + +#ifdef KEYBOARD_jian_rev2 +#include "rev2.h" +#endif + +#ifdef KEYBOARD_jian_nsrev2 + #include "nsrev2.h" +#endif diff --git a/keyboards/jian/keymaps/advanced/config.h b/keyboards/jian/keymaps/advanced/config.h new file mode 100644 index 000000000000..85b41c86d8d5 --- /dev/null +++ b/keyboards/jian/keymaps/advanced/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 + +//#define AUTO_SHIFT_TIMEOUT 150 +//#define NO_AUTO_SHIFT_NUMERIC +//#define AUTO_SHIFT_MODIFIERS +#define IGNORE_MOD_TAP_INTERRUPT +#define ALT_LAYOUTS_ENABLE +//#define TRAINING_HALFES_LOCK diff --git a/keyboards/jian/keymaps/advanced/keymap.c b/keyboards/jian/keymaps/advanced/keymap.c new file mode 100644 index 000000000000..417678f7e6ac --- /dev/null +++ b/keyboards/jian/keymaps/advanced/keymap.c @@ -0,0 +1,584 @@ +#include QMK_KEYBOARD_H + +typedef union { + uint32_t raw; + struct { + bool thumb_alt :1; + bool iso :1; + }; +} user_config_t; + +user_config_t user_config; + +#ifdef STENO_ENABLE +#include "keymap_steno.h" +#endif // STENO_ENABLE + + +#define QWERTY_base 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_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, \ + KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH +#define DVORAK_base KC_GRV, KC_QUOT, KC_COMM, KC_DOT,KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_LBRC, KC_RBRC, \ + KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_SLSH, \ + KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z +#define COLEMAK_base KC_GRV, 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_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, \ + KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH +#define WORKMAN_base KC_GRV, KC_Q, KC_D, KC_R, KC_W, KC_B, KC_J, KC_F, KC_U, KC_P, KC_SCLN, KC_LBRC, KC_RBRC, \ + KC_A, KC_S, KC_H, KC_T, KC_G, KC_Y, KC_N, KC_E, KC_O, KC_I, KC_QUOT, \ + KC_Z, KC_X, KC_M, KC_C, KC_V, KC_K, KC_L, KC_COMM, KC_DOT, KC_SLSH +#ifdef ALT_LAYOUTS_ENABLE +#include "keymap_dvorak.h" +#include "keymap_colemak.h" +#include "keymap_workman.h" +#define DVK2QWE_base DV_GRV, DV_Q, DV_W, DV_E, DV_R, DV_T, DV_Y, DV_U, DV_I, DV_O, DV_P, DV_LBRC, DV_RBRC, \ + DV_A, DV_S, DV_D, DV_F, DV_G, DV_H, DV_J, DV_K, DV_L, DV_SCLN, DV_QUOT, \ + DV_Z, DV_X, DV_C, DV_V, DV_B, DV_N, DV_M, DV_COMM, DV_DOT, DV_SLSH +#define CMK2QWE_base KC_GRV, CM_Q, CM_W, CM_E, CM_R, CM_T, CM_Y, CM_U, CM_I, CM_O, CM_P, KC_LBRC, KC_RBRC, \ + CM_A, CM_S, CM_D, CM_F, CM_G, CM_H, CM_J, CM_K, CM_L, CM_SCLN, KC_QUOT, \ + CM_Z, CM_X, CM_C, CM_V, CM_B, CM_N, CM_M, CM_COMM, CM_DOT, CM_SLSH +#define WMN2QWE_base KC_GRV, WK_Q, WK_W, WK_E, WK_R, WK_T, WK_Y, WK_U, WK_I, WK_O, WK_P, KC_LBRC, KC_RBRC, \ + WK_A, WK_S, WK_D, WK_F, WK_G, WK_H, WK_J, WK_K, WK_L, WK_SCLN, KC_QUOT, \ + WK_Z, WK_X, WK_C, WK_V, WK_B, WK_N, WK_M, KC_COMM, KC_DOT, KC_SLSH +#define CMK2DVK_base KC_GRV, KC_QUOT, KC_COMM, KC_DOT,CM_P, CM_Y, CM_F, CM_G, CM_C, CM_R, CM_L, KC_LBRC, KC_RBRC, \ + CM_A, CM_O, CM_E, CM_U, CM_I, CM_D, CM_H, CM_T, CM_N, CM_S, CM_SLSH, \ + CM_SCLN, CM_Q, CM_J, CM_K, CM_X, CM_B, CM_M, CM_W, CM_V, CM_Z +#define WMN2DVK_base KC_GRV, KC_QUOT, KC_COMM, KC_DOT,WK_P, WK_Y, WK_F, WK_G, WK_C, WK_R, WK_L, KC_LBRC, KC_RBRC, \ + WK_A, WK_O, WK_E, WK_U, WK_I, WK_D, WK_H, WK_T, WK_N, WK_S, KC_SLSH, \ + WK_SCLN, WK_Q, WK_J, WK_K, WK_X, WK_B, WK_M, WK_W, WK_V, WK_Z +#define DVK2CMK_base DV_GRV, DV_Q, DV_W, DV_F, DV_P, DV_G, DV_J, DV_L, DV_U, DV_Y, DV_SCLN, DV_LBRC, DV_RBRC, \ + DV_A, DV_R, DV_S, DV_T, DV_D, DV_H, DV_N, DV_E, DV_I, DV_O, DV_QUOT, \ + DV_Z, DV_X, DV_C, DV_V, DV_B, DV_K, DV_M, DV_COMM, DV_DOT, DV_SLSH +#define WMN2CMK_base KC_GRV, WK_Q, WK_W, WK_F, WK_P, WK_G, WK_J, WK_L, WK_U, WK_Y, WK_SCLN, KC_LBRC, KC_RBRC, \ + WK_A, WK_R, WK_S, WK_T, WK_D, WK_H, WK_N, WK_E, WK_I, WK_O, KC_QUOT, \ + WK_Z, WK_X, WK_C, WK_V, WK_B, WK_K, WK_M, KC_COMM, KC_DOT, KC_SLSH +#define DVK2WMN_base DV_GRV, DV_Q, DV_D, DV_R, DV_W, DV_B, DV_J, DV_F, DV_U, DV_P, DV_SCLN, DV_LBRC, DV_RBRC, \ + DV_A, DV_S, DV_H, DV_T, DV_G, DV_Y, DV_N, DV_E, DV_O, DV_I, DV_QUOT, \ + DV_Z, DV_X, DV_M, DV_C, DV_V, DV_K, DV_L, DV_COMM, DV_DOT, DV_SLSH +#define CMK2WMN_base KC_GRV, CM_Q, CM_D, CM_R, CM_W, CM_B, CM_J, CM_F, CM_U, CM_P, CM_SCLN, KC_LBRC, KC_RBRC, \ + CM_A, CM_S, CM_H, CM_T, CM_G, CM_Y, CM_N, CM_E, CM_O, CM_I, KC_QUOT, \ + CM_Z, CM_X, CM_M, CM_C, CM_V, CM_K, CM_L, CM_COMM, CM_DOT, CM_SLSH +#endif // ALT_LAYOUTS_ENABLE + +enum jian_layers { + _QWERTY, +#ifdef ALT_LAYOUTS_ENABLE + _DVORAK, + _COLEMAK, + _WORKMAN, + _DVK2QWE, + _DVK2CMK, + _DVK2WMN, + _CMK2QWE, + _CMK2DVK, + _CMK2WMN, + _WMN2QWE, + _WMN2DVK, + _WMN2CMK, +#endif // ALT_LAYOUTS_ENABLE + _ISO, + _LOWER, + _RAISE, + _ADJUST, + _BCKLT_ADJ, + _THUMB_ALT, +#ifdef TRAINING_HALFES_LOCK + _LEFT, + _RIGHT, +#endif //TRAINING_HALFES_LOCK +#ifdef DIPS_ENABLE + _DIPS, +#endif // DIPS_ENABLE +#ifdef STENO_ENABLE + _PLOVER +#endif // STENO_ENABLE +}; + +enum jian_keycodes { + QWERTY = SAFE_RANGE, + PLOVER, + EXT_PLV, + EXT_RGB, + ISO, + THUMB_ALT, +//ifdef ALT_LAYOUTS_ENABLE + CH_WMN, + CH_CMK, + CH_QWE, + CH_DVK, +//endif // ALT_LAYOUTS_ENABLE +#ifdef DIPS_ENABLE + LAYOUT0, + LAYOUT1, + LAYOUT2, + LAYOUT3, + DIP_ISO, + FLIP_TH, + DIP6, + DIP7, + DIP8, + DIP9, + DIP10, + DIP11, +#endif // DIPS_ENABLE +}; + +#ifdef TRAINING_HALFES_LOCK +static uint8_t lock_timeout = 1; +static uint8_t lock_cooldown = 0; +#endif //TRAINING_HALFES_LOCK +#ifdef DIPS_ENABLE +#ifdef ALT_LAYOUTS_ENABLE +static uint8_t layout_conversion_dip_state = 0; +#endif // ALT_LAYOUTS_ENABLE +#endif // DIPS_ENABLE + +#define LOWER MO(_LOWER) +#define RAISE MO(_RAISE) + +#define BL_ADJ TG(_BCKLT_ADJ) +#define TG_LWR TG(_LOWER) +#define TG_RSE TG(_RAISE) + +#define RBR_RGU MT(MOD_RGUI, KC_RBRC) +#define F12_RGU MT(MOD_RGUI, KC_F12) +#define EQL_LCT MT(MOD_LCTL, KC_EQL) +#define APP_LCT MT(MOD_LCTL, KC_APP) +#define EQL_RCT MT(MOD_RCTL, KC_EQL) +#define QUO_RCT MT(MOD_RCTL, KC_QUOT) +#define APP_RCT MT(MOD_RCTL, KC_APP) +#define MIN_RCT MT(MOD_RCTL, KC_MINS) +#define PLS_LAL MT(MOD_LALT, KC_PPLS) +#define BSL_RAL MT(MOD_RALT, KC_BSLS) + +#define NBS_LCT MT(MOD_LCTL, KC_NUBS) +#define BSH_LAL MT(MOD_LALT, KC_BSLS) +#define APP_RAL MT(MOD_RALT, KC_APP) + +#define BSP_LSH MT(MOD_LSFT, KC_BSPC) +#define BSP_RSH MT(MOD_RSFT, KC_BSPC) +#define SPC_LSH MT(MOD_LSFT, KC_SPC) +#define SPC_RSH MT(MOD_RSFT, KC_SPC) +#define DEL_RSE LT(_RAISE, KC_DEL) +#define TAB_RSE LT(_RAISE, KC_TAB) +#define ENT_LWR LT(_LOWER, KC_ENT) +#define ESC_LWR LT(_LOWER, KC_ESC) + +#define RGU_RBR RGUI_T(KC_RBRC) +#define RCT_QUO RCTL_T(KC_QUOT) + +#define LAYOUT_base( \ + GRV, Q, W, E, R, T, Y, U, I, O, P, LBRC, RBRC, \ + A, S, D, F, G, H, J, K, L, SCLN, QUOT, \ + Z, X, C, V, B, N, M, COMM, DOT, SLSH \ + ) \ + LAYOUT( \ + KC_LGUI, GRV, Q, W, E, R, T, Y, U, I, O, P, LBRC, RGU_RBR, \ + KC_LCTL, A, S, D, F, G, H, J, K, L, SCLN, RCT_QUO, \ + KC_LALT, Z, X, C, V, B, N, M, COMM, DOT, SLSH, BSL_RAL, \ + TAB_RSE, SPC_LSH, ENT_LWR, ESC_LWR, BSP_RSH, DEL_RSE \ + ) +#define LAYOUT_base_wrapper(...) LAYOUT_base(__VA_ARGS__) + +#ifdef SWAP_HANDS_ENABLE +#define SW_TG SH_TG +#else +#define SW_TG _______ +#endif + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +[_QWERTY] = LAYOUT_base_wrapper(QWERTY_base), + +#ifdef DIPS_ENABLE +[_DIPS] = LAYOUT_DIPS(\ + LAYOUT0, LAYOUT1, LAYOUT2, LAYOUT3, DIP_ISO, FLIP_TH, \ + LAYOUT0, LAYOUT1, LAYOUT2, LAYOUT3, DIP_ISO, FLIP_TH \ +), +#endif // DIPS_ENABLE + +[_LOWER] = LAYOUT( + _______, KC_UNDS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, F12_RGU, + EQL_LCT, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, MIN_RCT, + PLS_LAL, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, _______, + _______, _______, _______, _______, _______, _______ +), + +[_RAISE] = LAYOUT( + _______, KC_NLCK, KC_PSLS, KC_P7, KC_P8, KC_P9, KC_PMNS, KC_VOLU, KC_HOME, KC_PSCR, KC_PGUP, KC_SLCK, KC_CAPS, _______, + EQL_LCT, KC_PAST, KC_P4, KC_P5, KC_P6, KC_PPLS, KC_MUTE, KC_LEFT, KC_UP, KC_RGHT, KC_INS, APP_RCT, + _______, KC_P0, KC_P1, KC_P2, KC_P3, KC_PCMM, KC_VOLD, KC_END, KC_DOWN, KC_PGDN, KC_PAUS, _______, + _______, _______, _______, _______, _______, _______ +), + +[_ADJUST] = LAYOUT_symmetric( + RESET, DEBUG, KC_ASUP, CH_WMN, CH_CMK, CH_QWE, CH_DVK, + KC_ASRP, KC_ASTG, XXXXXXX, XXXXXXX, QWERTY, PLOVER, + BL_ADJ, KC_ASDN, XXXXXXX, XXXXXXX, ISO, THUMB_ALT, + _______, SW_TG, _______ +), +#if defined(RGBLIGHT) | defined(BACKLIGHT_ENABLE) +[_BCKLT_ADJ] = LAYOUT_symmetric( + XXXXXXX, XXXXXXX, XXXXXXX, BL_INC, RGB_VAI, RGB_HUD, RGB_HUI, + XXXXXXX, XXXXXXX, BL_DEC, RGB_VAD, RGB_SAD, RGB_SAI, + BL_ADJ, BL_BRTG, BL_TOGG, RGB_TOG, RGB_RMOD,RGB_MOD, + _______, _______, _______ +), +#endif // defined(RGBLIGHT) | defined(BACKLIGHT_ENABLE) +#ifdef TRAINING_HALFES_LOCK +[_LEFT] = LAYOUT_base( + _______, _______, _______, _______, _______, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, + _______, _______, _______, _______, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, + _______, _______, _______, _______, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX +), + +[_RIGHT] = LAYOUT_base( + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, _______, _______, _______, _______, _______, _______, + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, _______, _______, _______, _______, _______, + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, _______, _______, _______, _______ +), +#endif // TRAINING_HALFES_LOCK + +#ifdef STENO_ENABLE +[_PLOVER] = LAYOUT( + EXT_PLV, STN_N1, STN_N2, STN_N3, STN_N4, STN_N5, STN_N6, STN_N7, STN_N8, STN_N9, STN_NA, STN_NB, STN_NC, EXT_PLV, + 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, + XXXXXXX, STN_A, STN_O, STN_E, STN_U, XXXXXXX +), +#endif // STENO_ENABLE + +[_THUMB_ALT] = LAYOUT( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + DEL_RSE, BSP_LSH, ESC_LWR, ENT_LWR, SPC_RSH, TAB_RSE +), + +[_ISO] = LAYOUT( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + LCTL_T(KC_NUBS), _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + LALT_T(KC_NUHS), _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_RALT, + _______, _______, _______, _______, _______, _______ +), + +#ifdef ALT_LAYOUTS_ENABLE +[_DVORAK] = LAYOUT_base_wrapper(DVORAK_base), +[_COLEMAK] = LAYOUT_base_wrapper(COLEMAK_base), +[_WORKMAN] = LAYOUT_base_wrapper(WORKMAN_base), +[_DVK2QWE] = LAYOUT_base_wrapper(DVK2QWE_base), +[_CMK2QWE] = LAYOUT_base_wrapper(CMK2QWE_base), +[_WMN2QWE] = LAYOUT_base_wrapper(WMN2QWE_base), +[_CMK2DVK] = LAYOUT_base_wrapper(CMK2DVK_base), +[_WMN2DVK] = LAYOUT_base_wrapper(WMN2DVK_base), +[_DVK2CMK] = LAYOUT_base_wrapper(DVK2CMK_base), +[_WMN2CMK] = LAYOUT_base_wrapper(WMN2CMK_base), +[_DVK2WMN] = LAYOUT_base_wrapper(DVK2WMN_base), +[_CMK2WMN] = LAYOUT_base_wrapper(CMK2WMN_base) +#endif // ALT_LAYOUTS_ENABLE +}; + +uint32_t layer_state_set_user(uint32_t state) { + return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST); +} + +#ifdef DIPS_ENABLE +#ifdef ALT_LAYOUTS_ENABLE +void layout_convert(uint8_t statuses) { + switch (0b1111 & statuses) { + case 0b0000: + set_single_persistent_default_layer(_QWERTY); + break; + case 0b0001: + set_single_persistent_default_layer(_DVORAK); + break; + case 0b0010: + set_single_persistent_default_layer(_COLEMAK); + break; + case 0b0011: + set_single_persistent_default_layer(_WORKMAN); + break; + case 0b0100: + set_single_persistent_default_layer(_DVK2QWE); + break; + case 0b0101: + set_single_persistent_default_layer(_QWERTY); + break; + case 0b0110: + set_single_persistent_default_layer(_DVK2CMK); + break; + case 0b0111: + set_single_persistent_default_layer(_DVK2WMN); + break; + case 0b1000: + set_single_persistent_default_layer(_CMK2QWE); + break; + case 0b1001: + set_single_persistent_default_layer(_CMK2DVK); + break; + case 0b1010: + set_single_persistent_default_layer(_QWERTY); + break; + case 0b1011: + set_single_persistent_default_layer(_CMK2WMN); + break; + case 0b1100: + set_single_persistent_default_layer(_WMN2QWE); + break; + case 0b1101: + set_single_persistent_default_layer(_WMN2DVK); + break; + case 0b1110: + set_single_persistent_default_layer(_WMN2CMK); + break; + case 0b1111: + set_single_persistent_default_layer(_QWERTY); + break; + } +} +#endif // ALT_LAYOUTS_ENABLE +#endif // DIPS_ENABLE + +void matrix_init_user(void) { +#ifdef DIPS_ENABLE + layer_on(_DIPS); +#endif // DIPS_ENABLE +} + +void keyboard_post_init_user(void) { + user_config.raw = eeconfig_read_user(); + if (user_config.thumb_alt) { + layer_on(_THUMB_ALT); + } else { + layer_off(_THUMB_ALT); + } + if (user_config.iso) { + layer_on(_ISO); + } else { + layer_off(_ISO); + } +} + +#ifdef ALT_LAYOUTS_ENABLE +static char change_layout_input = 0; +static bool change_layout_keystroke = 0; +void change_layout_conversion(uint16_t keycode) { + switch (keycode) { + case CH_WMN: + change_layout_input |= 0b1000 << (change_layout_keystroke << 2); + break; + case CH_CMK: + change_layout_input |= 0b0100 << (change_layout_keystroke << 2); + break; + case CH_DVK: + change_layout_input |= 0b0010 << (change_layout_keystroke << 2); + break; + case CH_QWE: + change_layout_input |= 0b0001 << (change_layout_keystroke << 2); + break; + } + if (change_layout_keystroke == 1) { + switch (change_layout_input) { + case 0b00010001: + set_single_persistent_default_layer(_QWERTY); + break; + case 0b00100001: + set_single_persistent_default_layer(_DVORAK); + break; + case 0b01000001: + set_single_persistent_default_layer(_COLEMAK); + break; + case 0b10000001: + set_single_persistent_default_layer(_WORKMAN); + break; + case 0b00010010: + set_single_persistent_default_layer(_DVK2QWE); + break; + case 0b00100010: + set_single_persistent_default_layer(_QWERTY); + break; + case 0b01000010: + set_single_persistent_default_layer(_DVK2CMK); + break; + case 0b10000010: + set_single_persistent_default_layer(_DVK2WMN); + break; + case 0b00010100: + set_single_persistent_default_layer(_CMK2QWE); + break; + case 0b00100100: + set_single_persistent_default_layer(_CMK2DVK); + break; + case 0b01000100: + set_single_persistent_default_layer(_QWERTY); + break; + case 0b10000100: + set_single_persistent_default_layer(_CMK2WMN); + break; + case 0b00011000: + set_single_persistent_default_layer(_WMN2QWE); + break; + case 0b00101000: + set_single_persistent_default_layer(_WMN2DVK); + break; + case 0b01001000: + set_single_persistent_default_layer(_WMN2CMK); + break; + case 0b10001000: + set_single_persistent_default_layer(_QWERTY); + break; + } + change_layout_input = 0; + } + change_layout_keystroke ^= 1; +} +#endif // ALT_LAYOUTS_ENABLE + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { +#ifdef TRAINING_HALFES_LOCK + if (!record->event.pressed) { + lock_cooldown = --lock_cooldown < 0 ? 0 : lock_cooldown; + } + if (lock_cooldown == 0) { + layer_off(_LEFT); + layer_off(_RIGHT); + } +#endif // TRAINING_HALFES_LOCK + switch (keycode) { +#ifdef TRAINING_HALFES_LOCK + case SPC_RSH: + case BSP_RSH: + case DEL_RSE: + case ESC_LWR: + case BSL_RAL: + case RGU_RBR: + case RCT_QUO: + if (record->event.pressed) { + layer_on(_LEFT); + lock_cooldown = lock_timeout; + } + else { + lock_cooldown = 0; + layer_off(_LEFT); + } + break; + case BSP_LSH: + case SPC_LSH: + case TAB_RSE: + case ENT_LWR: + case KC_LCTL: + case KC_LGUI: + case KC_LALT: + if (record->event.pressed) { + layer_on(_RIGHT); + lock_cooldown = lock_timeout; + } + else { + lock_cooldown = 0; + layer_off(_RIGHT); + } + break; +#endif // TRAINING_HALFES_LOCK +#ifdef STENO_ENABLE + case PLOVER: + if (!record->event.pressed) { + 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; + case EXT_PLV: + if (record->event.pressed) { + layer_off(_PLOVER); + } + return false; +#endif // STENO_ENABLE + case QWERTY: + if (record->event.pressed) { + set_single_persistent_default_layer(_QWERTY); + } + return false; +#ifdef ALT_LAYOUTS_ENABLE + case CH_WMN: + case CH_CMK: + case CH_QWE: + case CH_DVK: + if (record->event.pressed) { + change_layout_conversion(keycode); + } + return false; +#endif // ALT_LAYOUTS_ENABLE +#ifdef DIPS_ENABLE +#ifdef ALT_LAYOUTS_ENABLE + case LAYOUT0: + if (record->event.pressed) { + layout_conversion_dip_state |= 1 << 0; + } else { + layout_conversion_dip_state &= ~(1 << 0); + } + layout_convert(layout_conversion_dip_state); + return false; + case LAYOUT1: + if (record->event.pressed) { + layout_conversion_dip_state |= 1 << 1; + } else { + layout_conversion_dip_state &= ~(1 << 1); + } + layout_convert(layout_conversion_dip_state); + return false; + case LAYOUT2: + if (record->event.pressed) { + layout_conversion_dip_state |= 1 << 2; + } else { + layout_conversion_dip_state &= ~(1 << 2); + } + layout_convert(layout_conversion_dip_state); + return false; + case LAYOUT3: + if (record->event.pressed) { + layout_conversion_dip_state |= 1 << 3; + } else { + layout_conversion_dip_state &= ~(1 << 3); + } + layout_convert(layout_conversion_dip_state); + return false; +#endif // ALT_LAYOUTS_ENABLE + case DIP_ISO: + if (record->event.pressed) { + layer_on(_ISO); + } else { + layer_off(_ISO); + } + return false; + case FLIP_TH: + if (record->event.pressed) { + layer_on(_THUMB_ALT); + } else { + layer_off(_THUMB_ALT); + } + return false; +#endif // DIPS_ENABLE + case THUMB_ALT: + if (record->event.pressed) { + layer_invert(_THUMB_ALT); + user_config.thumb_alt ^= 1; + eeconfig_update_user(user_config.raw); + } + return false; + case ISO: + if (record->event.pressed) { + layer_invert(_ISO); + user_config.iso ^= 1; + eeconfig_update_user(user_config.raw); + } + return false; + } + return true; +} diff --git a/keyboards/jian/keymaps/advanced/rules.mk b/keyboards/jian/keymaps/advanced/rules.mk new file mode 100644 index 000000000000..2a61a263930d --- /dev/null +++ b/keyboards/jian/keymaps/advanced/rules.mk @@ -0,0 +1,5 @@ +SWAP_HANDS_ENABLE = yes +STENO_ENABLE = no +MOUSEKEY_ENABLE = no +EXTRAKEY_ENABLE = yes # Audio control and System control + diff --git a/keyboards/jian/keymaps/default/config.h b/keyboards/jian/keymaps/default/config.h new file mode 100644 index 000000000000..4d9cb17cac58 --- /dev/null +++ b/keyboards/jian/keymaps/default/config.h @@ -0,0 +1,22 @@ +/* +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 IGNORE_MOD_TAP_INTERRUPT diff --git a/keyboards/jian/keymaps/default/keymap.c b/keyboards/jian/keymaps/default/keymap.c new file mode 100644 index 000000000000..7f4391f7d2eb --- /dev/null +++ b/keyboards/jian/keymaps/default/keymap.c @@ -0,0 +1,120 @@ +#include QMK_KEYBOARD_H + +enum jian_layers { + _QWERTY, + _DVORAK, + _COLEMAK, + _WORKMAN, + _LOWER, + _RAISE, + _ADJUST, + _BCKLT_ADJ +}; + +enum jian_keycodes { + QWERTY = SAFE_RANGE, + DVORAK, + COLEMAK, + WORKMAN +}; + +#define RAISE_T(kc) LT(_RAISE, kc) +#define LOWER_T(kc) LT(_LOWER, kc) + +#ifdef SWAP_HANDS_ENABLE +#define SW_TG SH_TG +#else +#define SW_TG _______ +#endif + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +[_QWERTY] = LAYOUT( + KC_LGUI, KC_GRV, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, RGUI_T(KC_RBRC), + KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, RCTL_T(KC_QUOT), + KC_LALT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, RALT_T(KC_BSLS), + RAISE_T(KC_TAB), LSFT_T(KC_SPC), LOWER_T(KC_ENT), LOWER_T(KC_ESC), RSFT_T(KC_BSPC), RAISE_T(KC_DEL) +), + +[_DVORAK] = LAYOUT( + KC_LGUI, KC_GRV, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_LBRC, RGUI_T(KC_RBRC), + KC_LCTL, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, RCTL_T(KC_SLSH), + KC_LALT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, RALT_T(KC_BSLS), + RAISE_T(KC_TAB), LSFT_T(KC_SPC), LOWER_T(KC_ENT), LOWER_T(KC_ESC), RSFT_T(KC_BSPC), RAISE_T(KC_DEL) +), + +[_COLEMAK] = LAYOUT( + KC_LGUI, KC_GRV, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_LBRC, RGUI_T(KC_RBRC), + KC_LCTL, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, RCTL_T(KC_QUOT), + KC_LALT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, RALT_T(KC_BSLS), + RAISE_T(KC_TAB), LSFT_T(KC_SPC), LOWER_T(KC_ENT), LOWER_T(KC_ESC), RSFT_T(KC_BSPC), RAISE_T(KC_DEL) +), + +[_WORKMAN] = LAYOUT( + KC_LGUI, KC_GRV, KC_Q, KC_D, KC_R, KC_W, KC_B, KC_J, KC_F, KC_U, KC_P, KC_SCLN, KC_LBRC, RGUI_T(KC_RBRC), + KC_LCTL, KC_A, KC_S, KC_H, KC_T, KC_G, KC_Y, KC_N, KC_E, KC_O, KC_I, RCTL_T(KC_QUOT), + KC_LALT, KC_Z, KC_X, KC_M, KC_C, KC_V, KC_K, KC_L, KC_COMM, KC_DOT, KC_SLSH, RALT_T(KC_BSLS), + RAISE_T(KC_TAB), LSFT_T(KC_SPC), LOWER_T(KC_ENT), LOWER_T(KC_ESC), RSFT_T(KC_BSPC), RAISE_T(KC_DEL) +), + +[_LOWER] = LAYOUT( + _______, KC_UNDS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, RGUI_T(KC_F12), + LCTL_T(KC_EQL), KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, RCTL_T(KC_MINS), + LALT_T(KC_PPLS), KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, _______, + _______, _______, _______, _______, _______, _______ +), + +[_RAISE] = LAYOUT( + _______, KC_NLCK, KC_PSLS, KC_P7, KC_P8, KC_P9, KC_PMNS, KC_VOLU, KC_HOME, KC_PSCR, KC_PGUP, KC_SLCK, KC_CAPS, _______, + LCTL_T(KC_EQL), KC_PAST, KC_P4, KC_P5, KC_P6, KC_PPLS, KC_MUTE, KC_LEFT, KC_UP, KC_RGHT, KC_INS, RCTL_T(KC_APP), + _______, KC_P0, KC_P1, KC_P2, KC_P3, KC_PCMM, KC_VOLD, KC_END, KC_DOWN, KC_PGDN, KC_PAUS, _______, + _______, _______, _______, _______, _______, _______ +), + +[_ADJUST] = LAYOUT_symmetric( + RESET, DEBUG, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + XXXXXXX, WORKMAN, COLEMAK, DVORAK, QWERTY, XXXXXXX, + TG(_BCKLT_ADJ), XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + _______, SW_TG, _______ +), + +#if defined(RGBLIGHT) || defined(BACKLIGHT_ENABLE) +[_BCKLT_ADJ] = LAYOUT_symmetric( + XXXXXXX, XXXXXXX, XXXXXXX, BL_INC, RGB_VAI, RGB_HUD, RGB_HUI, + XXXXXXX, XXXXXXX, BL_DEC, RGB_VAD, RGB_SAD, RGB_SAI, + TG(_BCKLT_ADJ), BL_BRTG, BL_TOGG, RGB_TOG, RGB_RMOD,RGB_MOD, + _______, _______, _______ +) +#endif // defined(RGBLIGHT) || defined(BACKLIGHT_ENABLE) + +}; + +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 DVORAK: + if (record->event.pressed) { + set_single_persistent_default_layer(_DVORAK); + } + return false; + case COLEMAK: + if (record->event.pressed) { + set_single_persistent_default_layer(_COLEMAK); + } + return false; + case WORKMAN: + if (record->event.pressed) { + set_single_persistent_default_layer(_WORKMAN); + } + return false; + } + return true; +} diff --git a/keyboards/jian/keymaps/default/rules.mk b/keyboards/jian/keymaps/default/rules.mk new file mode 100644 index 000000000000..092b119d39b8 --- /dev/null +++ b/keyboards/jian/keymaps/default/rules.mk @@ -0,0 +1,2 @@ +SWAP_HANDS_ENABLE = yes +EXTRAKEY_ENABLE = yes # Audio control and System control diff --git a/keyboards/jian/nsrev2/config.h b/keyboards/jian/nsrev2/config.h new file mode 100644 index 000000000000..9277aa19afb5 --- /dev/null +++ b/keyboards/jian/nsrev2/config.h @@ -0,0 +1,129 @@ +/* +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" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xC0DE +#define PRODUCT_ID 0x1337 +#define DEVICE_VER 0x0210 +#define MANUFACTURER KgOfHedgehogs +#define PRODUCT Huma +#define DESCRIPTION An ergo keyboard + +/* key matrix size */ +// Rows are doubled-up +#define MATRIX_ROWS 8 +#define MATRIX_COLS 6 +#define DIODE_DIRECTION COL2ROW + + +// wiring of each half +#define MATRIX_ROW_PINS { F4, F5, B1, B3, D1, D0, D7, E6 } +#define MATRIX_COL_PINS { D3, D2, B4, F6, F7, B2 } + +/* Set 0 if debouncing isn't needed */ +#define DEBOUNCE 5 + +#define PHYSICAL_LEDS_ENABLE + +#ifdef BACKLIGHT_ENABLE +#define BACKLIGHT_PIN C6 +#define BACKLIGHT_LEVELS 5 +#define BACKLIGHT_BREATHING //not working with splits right now +#define BREATHING_PERIOD 6 +#endif + +/* ws2812 RGB LED */ +#define RGB_DI_PIN D4 +#define RGBLIGHT_TIMER +#define RGBLED_NUM 7 // Number of LEDs +#define RGBLIGHT_ANIMATIONS //not working with splits right now + +#define RGBLIGHT_SLEEP +#define RGBLIGHT_SPLIT + +#ifndef IOS_DEVICE_ENABLE +#if RGBLED_NUM <= 6 +#define RGBLIGHT_LIMIT_VAL 255 +#else +#define RGBLIGHT_LIMIT_VAL 130 +#endif +#define RGBLIGHT_VAL_STEP 8 +#else +#if RGBLED_NUM <= 6 +#define RGBLIGHT_LIMIT_VAL 90 +#else +#define RGBLIGHT_LIMIT_VAL 45 +#endif +#define RGBLIGHT_VAL_STEP 4 +#endif +#define RGBLIGHT_HUE_STEP 10 +#define RGBLIGHT_SAT_STEP 17 + +#if defined(RGBLIGHT_ENABLE) && !defined(IOS_DEVICE_ENABLE) +#define USB_MAX_POWER_CONSUMPTION 400 +#else +// iOS device need lessthan 100 +#define USB_MAX_POWER_CONSUMPTION 100 +#endif + +#define NUM_LOCK_LED_PIN B6 +#define CAPS_LOCK_LED_PIN B5 +// #define SCROLL_LOCK_LED_PIN B6 + +// #define NUM_NMOSFET //uncomment this if you using n-mosfet +// #define CAPS_NMOSFET //uncomment this if you using n-mosfet +// #define SCROLL_NMOSFET //uncomment this if you using n-mosfet + +// #define NUM_INVERT // uncomment this if you want to reverse logic of numlock +// This will make it light up only when lock is off +// (Doesn't work on mac. There is no num lock, so it will be always off and lit) + +#ifdef NUM_NMOSFET +#define RESET_NUM_LOCK_LED() writePinLow(NUM_LOCK_LED_PIN) +#ifdef NUM_INVERT +#define UPDATE_NUM_LOCK_LED() writePin(NUM_LOCK_LED_PIN, !led_state.num_lock) +#else +#define UPDATE_NUM_LOCK_LED() writePin(NUM_LOCK_LED_PIN, led_state.num_lock) +#endif // NUM_INVERT +#else +#define RESET_NUM_LOCK_LED() writePinHigh(NUM_LOCK_LED_PIN) +#ifdef NUM_INVERT +#define UPDATE_NUM_LOCK_LED() writePin(NUM_LOCK_LED_PIN, led_state.num_lock) +#else +#define UPDATE_NUM_LOCK_LED() writePin(NUM_LOCK_LED_PIN, !led_state.num_lock) +#endif // NUM_INVERT +#endif // NUM_NMOSFET + +#ifdef CAPS_NMOSFET +#define RESET_CAPS_LOCK_LED() writePinLow(CAPS_LOCK_LED_PIN) +#define UPDATE_CAPS_LOCK_LED() writePin(CAPS_LOCK_LED_PIN, led_state.caps_lock) +#else +#define RESET_CAPS_LOCK_LED() writePinHigh(CAPS_LOCK_LED_PIN) +#define UPDATE_CAPS_LOCK_LED() writePin(CAPS_LOCK_LED_PIN, !led_state.caps_lock) +#endif // CAPS_NMOSFET + +#ifdef SCROLL_NMOSFET +#define RESET_SCROLL_LOCK_LED() writePinLow(SCROLL_LOCK_LED_PIN) +#define UPDATE_SCROLL_LOCK_LED() writePin(SCROLL_LOCK_LED_PIN, led_state.scroll_lock) +#else +#define RESET_SCROLL_LOCK_LED() writePinHigh(SCROLL_LOCK_LED_PIN) +#define UPDATE_SCROLL_LOCK_LED() writePin(SCROLL_LOCK_LED_PIN, !led_state.scroll_lock) +#endif // SCROLL_NMOSFET diff --git a/keyboards/jian/nsrev2/nsrev2.c b/keyboards/jian/nsrev2/nsrev2.c new file mode 100644 index 000000000000..a7508ad9b246 --- /dev/null +++ b/keyboards/jian/nsrev2/nsrev2.c @@ -0,0 +1,74 @@ +#include "nsrev2.h" + +// TODO: +#ifdef SWAP_HANDS_ENABLE +const keypos_t hand_swap_config[MATRIX_ROWS][MATRIX_COLS] = { + {{0, 4}, {1, 4}, {2, 4}, {3, 4}, {4, 4}, {5, 4}}, + {{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, 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}}, +}; +#endif + +static bool backlight_was_toggled = false; + +void suspend_power_down_kb(void) { + if (is_backlight_enabled()) { + backlight_disable(); + backlight_was_toggled = true; + } +} + +void suspend_wakeup_init_kb(void) { + if (backlight_was_toggled) { + backlight_enable(); + backlight_was_toggled = false; + } +} + +#ifdef PHYSICAL_LEDS_ENABLE +void led_init_kb(void) +{ +#ifdef NUM_LOCK_LED_PIN + setPinOutput(NUM_LOCK_LED_PIN); + RESET_NUM_LOCK_LED(); +#endif // NUM_LOCK_LED_PIN +#ifdef CAPS_LOCK_LED_PIN + setPinOutput(CAPS_LOCK_LED_PIN); + RESET_CAPS_LOCK_LED(); +#endif // CAPS_LOCK_LED_PIN +#ifdef SCROLL_LOCK_LED_PIN + setPinOutput(SCROLL_LOCK_LED_PIN); + RESET_SCROLL_LOCK_LED(); +#endif // SCROLL_LOCK_LED_PIN +} +#endif // PHYSICAL_LEDS_ENABLE + +void matrix_init_kb(void) { +#ifdef PHYSICAL_LEDS_ENABLE + led_init_kb(); +#endif // PHYSICAL_LEDS_ENABLE + matrix_init_user(); +}; + +#ifdef PHYSICAL_LEDS_ENABLE +bool led_update_kb(led_t led_state) { + bool res = led_update_user(led_state); + if(res) { +#ifdef NUM_LOCK_LED_PIN + UPDATE_NUM_LOCK_LED(); +#endif // NUM_LOCK_LED_PIN +#ifdef CAPS_LOCK_LED_PIN + UPDATE_CAPS_LOCK_LED(); +#endif // CAPS_LOCK_LED_PIN +#ifdef SCROLL_LOCK_LED_PIN + UPDATE_SCROLL_LOCK_LED(); +#endif // SCROLL_LOCK_LED_PIN + } + return res; +} +#endif // PHYSICAL_LEDS_ENABLE diff --git a/keyboards/jian/nsrev2/nsrev2.h b/keyboards/jian/nsrev2/nsrev2.h new file mode 100644 index 000000000000..9dfb7240b137 --- /dev/null +++ b/keyboards/jian/nsrev2/nsrev2.h @@ -0,0 +1,39 @@ +#pragma once + +#include "jian.h" + +#define XXX KC_NO + +#define LAYOUT( \ + L20, L00, L01, L12, L02, L03, L04, R04, R03, R02, R12, R01, R00, R20, \ + L10, L11, L22, L13, L14, L05, R05, R14, R13, R22, R11, R10, \ + L21, L32, L33, L23, L24, L15, R15, R24, R23, R33, R32, R21, \ + L34, L25, L35, R35, R25, R34 \ +) \ +{ \ + {L00, L01, L02, L03, L04, L05 }, \ + {L10, L11, L12, L13, L14, L15 }, \ + {L20, L21, L22, L23, L24, L25 }, \ + {XXX, XXX, L32, L33, L34, L35 }, \ + {R00, R01, R02, R03, R04, R05 }, \ + {R10, R11, R12, R13, R14, R15 }, \ + {R20, R21, R22, R23, R24, R25 }, \ + {XXX, XXX, R32, R33, R34, R35 } \ +} + +#define LAYOUT_symmetric( \ + K20, K00, K01, K12, K02, K03, K04, \ + K10, K11, K22, K13, K14, K05, \ + K21, K32, K33, K23, K24, K15, \ + K34, K25, K35 \ +) \ +{ \ + {K00, K01, K02, K03, K04, K05 }, \ + {K10, K11, K12, K13, K14, K15 }, \ + {K20, K21, K22, K23, K24, K25 }, \ + {XXX, XXX, K32, K33, K34, K35 }, \ + {K00, K01, K02, K03, K04, K05 }, \ + {K10, K11, K12, K13, K14, K15 }, \ + {K20, K21, K22, K23, K24, K25 }, \ + {XXX, XXX, K32, K33, K34, K35 } \ +} diff --git a/keyboards/jian/nsrev2/rules.mk b/keyboards/jian/nsrev2/rules.mk new file mode 100644 index 000000000000..3942e629a157 --- /dev/null +++ b/keyboards/jian/nsrev2/rules.mk @@ -0,0 +1,20 @@ +# 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 +# +CONSOLE_ENABLE = no +SPLIT_KEYBOARD = no +BACKLIGHT_ENABLE = yes +RGBLIGHT_ENABLE = no diff --git a/keyboards/jian/readme.md b/keyboards/jian/readme.md new file mode 100644 index 000000000000..7afff2ab70ee --- /dev/null +++ b/keyboards/jian/readme.md @@ -0,0 +1,16 @@ +# Jian + + + +A 40% ergonomic keyboard kit. Jian supports cherry mx, alps, kailh choc switches PCB and plate mounted. You can assembly keyboard without mounting plate. Jian also supports rgb led strip like ws2812b and 1 color in-switch backlight. Each half can work standalone. + +* Keyboard Maintainer: [KGOH](https://github.com/KGOH) +* Hardware Supported: Jian PCB rev1, rev2, Pro Micro +* Layout: [keyboard-layout-editor.com](http://www.keyboard-layout-editor.com/#/gists/4b6c2af67148f58ddd6c6b2976c4370f) +* Hardware Availability: [Telegram channel](https://t.me/KgOfHedgehogs) + +Make example for this keyboard (after setting up your build environment): + + make jian/rev2: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/jian/rev1/config.h b/keyboards/jian/rev1/config.h new file mode 100644 index 000000000000..799a71fc07bc --- /dev/null +++ b/keyboards/jian/rev1/config.h @@ -0,0 +1,138 @@ +/* +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" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xC0DE +#define PRODUCT_ID 0x1337 +#define DEVICE_VER 0x0100 +#define MANUFACTURER KgOfHedgehogs +#define PRODUCT Jian +#define DESCRIPTION An ergo split keyboard + +/* key matrix size */ +// Rows are doubled-up +#define MATRIX_ROWS 8 +#define MATRIX_COLS 7 +#define DIODE_DIRECTION COL2ROW + +// wiring of each half +#define MATRIX_ROW_PINS { D3, D2, E6, B4 } +#define MATRIX_COL_PINS { F4, F5, F6, F7, B1, B3, B2 } + +/* Use I2C or Serial, not both */ +// #define USE_SERIAL +#define USE_I2C + +/* Select hand configuration */ +// #define MASTER_LEFT +// #define MASTER_RIGHT +#define EE_HANDS + +// different Jian configs +#define DIPS_ENABLE +#define PHYSICAL_LEDS_ENABLE +#define NUM_LOCK_LED_PIN C6 +#define CAPS_LOCK_LED_PIN D7 +#define SCROLL_LOCK_LED_PIN B5 + +// #define NUM_NMOSFET //uncomment this if you using n-mosfet +// #define CAPS_NMOSFET //uncomment this if you using n-mosfet +// #define SCROLL_NMOSFET //uncomment this if you using n-mosfet + +// #define NUM_INVERT // uncomment this if you want to reverse logic of numlock +// This will make it light up only when lock is off +// (Doesn't work on mac. There is no num lock, so it will be always off and lit) + +#ifdef NUM_NMOSFET +#define RESET_NUM_LOCK_LED() writePinLow(NUM_LOCK_LED_PIN) +#ifdef NUM_INVERT +#define UPDATE_NUM_LOCK_LED() writePin(NUM_LOCK_LED_PIN, !led_state.num_lock) +#else +#define UPDATE_NUM_LOCK_LED() writePin(NUM_LOCK_LED_PIN, led_state.num_lock) +#endif // NUM_INVERT +#else +#define RESET_NUM_LOCK_LED() writePinHigh(NUM_LOCK_LED_PIN) +#ifdef NUM_INVERT +#define UPDATE_NUM_LOCK_LED() writePin(NUM_LOCK_LED_PIN, led_state.num_lock) +#else +#define UPDATE_NUM_LOCK_LED() writePin(NUM_LOCK_LED_PIN, !led_state.num_lock) +#endif // NUM_INVERT +#endif // NUM_NMOSFET + +#ifdef CAPS_NMOSFET +#define RESET_CAPS_LOCK_LED() writePinLow(CAPS_LOCK_LED_PIN) +#define UPDATE_CAPS_LOCK_LED() writePin(CAPS_LOCK_LED_PIN, led_state.caps_lock) +#else +#define RESET_CAPS_LOCK_LED() writePinHigh(CAPS_LOCK_LED_PIN) +#define UPDATE_CAPS_LOCK_LED() writePin(CAPS_LOCK_LED_PIN, !led_state.caps_lock) +#endif // CAPS_NMOSFET + +#ifdef SCROLL_NMOSFET +#define RESET_SCROLL_LOCK_LED() writePinLow(SCROLL_LOCK_LED_PIN) +#define UPDATE_SCROLL_LOCK_LED() writePin(SCROLL_LOCK_LED_PIN, led_state.scroll_lock) +#else +#define RESET_SCROLL_LOCK_LED() writePinHigh(SCROLL_LOCK_LED_PIN) +#define UPDATE_SCROLL_LOCK_LED() writePin(SCROLL_LOCK_LED_PIN, !led_state.scroll_lock) +#endif // SCROLL_NMOSFET + +/* Set 0 if debouncing isn't needed */ +#define DEBOUNCE 5 + +#ifdef BACKLIGHT_ENABLE +#define BACKLIGHT_PIN B6 +#define BACKLIGHT_LEVELS 5 +//#define BACKLIGHT_BREATHING //not working with splits right now +#define BREATHING_PERIOD 6 +#endif + +/* ws2812 RGB LED */ +#define RGB_DI_PIN D4 +#define RGBLIGHT_TIMER +#define RGBLED_NUM 7 // Number of LEDs +#define RGBLIGHT_ANIMATIONS //not working with splits right now + +#define RGBLIGHT_SLEEP +#define RGBLIGHT_SPLIT + +#ifndef IOS_DEVICE_ENABLE +#if RGBLED_NUM <= 6 +#define RGBLIGHT_LIMIT_VAL 255 +#else +#define RGBLIGHT_LIMIT_VAL 130 +#endif +#define RGBLIGHT_VAL_STEP 8 +#else +#if RGBLED_NUM <= 6 +#define RGBLIGHT_LIMIT_VAL 90 +#else +#define RGBLIGHT_LIMIT_VAL 45 +#endif +#define RGBLIGHT_VAL_STEP 4 +#endif +#define RGBLIGHT_HUE_STEP 10 +#define RGBLIGHT_SAT_STEP 17 + +#if defined(RGBLIGHT_ENABLE) && !defined(IOS_DEVICE_ENABLE) +#define USB_MAX_POWER_CONSUMPTION 400 +#else +// iOS device need lessthan 100 +#define USB_MAX_POWER_CONSUMPTION 100 +#endif diff --git a/keyboards/jian/rev1/rev1.c b/keyboards/jian/rev1/rev1.c new file mode 100644 index 000000000000..f1cfe99180ea --- /dev/null +++ b/keyboards/jian/rev1/rev1.c @@ -0,0 +1,74 @@ +#include "rev1.h" + +#ifdef SWAP_HANDS_ENABLE +__attribute__ ((weak)) +const keypos_t hand_swap_config[MATRIX_ROWS][MATRIX_COLS] = { + {{0, 4}, {1, 4}, {2, 4}, {3, 4}, {4, 4}, {5, 4}, {6, 4}}, + {{0, 5}, {1, 5}, {2, 5}, {3, 5}, {4, 5}, {5, 5}, {6, 5}}, + {{0, 6}, {1, 6}, {2, 6}, {3, 6}, {4, 6}, {5, 6}, {6, 6}}, + {{0, 7}, {1, 7}, {2, 7}, {3, 7}, {4, 7}, {5, 7}, {6, 7}}, + {{0, 0}, {1, 0}, {2, 0}, {3, 0}, {4, 0}, {5, 0}, {6, 0}}, + {{0, 1}, {1, 1}, {2, 1}, {3, 1}, {4, 1}, {5, 1}, {6, 1}}, + {{0, 2}, {1, 2}, {2, 2}, {3, 2}, {4, 2}, {5, 2}, {6, 2}}, + {{0, 3}, {1, 3}, {2, 3}, {3, 3}, {4, 3}, {5, 3}, {6, 3}}, +}; +#endif + +static bool backlight_was_toggled = false; + +void suspend_power_down_kb(void) { + if (is_backlight_enabled()) { + backlight_disable(); + backlight_was_toggled = true; + } +} + +void suspend_wakeup_init_kb(void) { + if (backlight_was_toggled) { + backlight_enable(); + backlight_was_toggled = false; + } +} + +#ifdef PHYSICAL_LEDS_ENABLE +void led_init_kb(void) +{ +#ifdef NUM_LOCK_LED_PIN + setPinOutput(NUM_LOCK_LED_PIN); + RESET_NUM_LOCK_LED(); +#endif // NUM_LOCK_LED_PIN +#ifdef CAPS_LOCK_LED_PIN + setPinOutput(CAPS_LOCK_LED_PIN); + RESET_CAPS_LOCK_LED(); +#endif // CAPS_LOCK_LED_PIN +#ifdef SCROLL_LOCK_LED_PIN + setPinOutput(SCROLL_LOCK_LED_PIN); + RESET_SCROLL_LOCK_LED(); +#endif // SCROLL_LOCK_LED_PIN +} +#endif // PHYSICAL_LEDS_ENABLE + +void matrix_init_kb(void) { +#ifdef PHYSICAL_LEDS_ENABLE + led_init_kb(); +#endif // PHYSICAL_LEDS_ENABLE + matrix_init_user(); +}; + +#ifdef PHYSICAL_LEDS_ENABLE +bool led_update_kb(led_t led_state) { + bool res = led_update_user(led_state); + if(res) { +#ifdef NUM_LOCK_LED_PIN + UPDATE_NUM_LOCK_LED(); +#endif // NUM_LOCK_LED_PIN +#ifdef CAPS_LOCK_LED_PIN + UPDATE_CAPS_LOCK_LED(); +#endif // CAPS_LOCK_LED_PIN +#ifdef SCROLL_LOCK_LED_PIN + UPDATE_SCROLL_LOCK_LED(); +#endif // SCROLL_LOCK_LED_PIN + } + return res; +} +#endif // PHYSICAL_LEDS_ENABLE diff --git a/keyboards/jian/rev1/rev1.h b/keyboards/jian/rev1/rev1.h new file mode 100644 index 000000000000..ee55de628761 --- /dev/null +++ b/keyboards/jian/rev1/rev1.h @@ -0,0 +1,56 @@ +#pragma once + +#include "jian.h" + +#define XXX KC_NO + +#define LAYOUT( \ + L00, L01, L02, L03, L04, L05, L06, R06, R05, R04, R03, R02, R01, R00, \ + L11, L12, L13, L14, L15, L16, R16, R15, R14, R13, R12, R11, \ + L21, L22, L23, L24, L25, L26, R26, R25, R24, R23, R22, R21, \ + L34, L35, L36, R36, R35, R34 \ +) \ +{ \ + {L00, L01, L02, L03, L04, L05, L06}, \ + {XXX, L11, L12, L13, L14, L15, L16}, \ + {XXX, L21, L22, L23, L24, L25, L26}, \ + {XXX, XXX, XXX, XXX, L34, L35, L36}, \ + {R00, R01, R02, R03, R04, R05, R06}, \ + {XXX, R11, R12, R13, R14, R15, R16}, \ + {XXX, R21, R22, R23, R24, R25, R26}, \ + {XXX, XXX, XXX, XXX, R34, R35, R36} \ +} + +#define LAYOUT_symmetric( \ + K00, K01, K02, K03, K04, K05, K06, \ + K11, K12, K13, K14, K15, K16, \ + K21, K22, K23, K24, K25, K26, \ + K34, K35, K36 \ +) \ +{ \ + {K00, K01, K02, K03, K04, K05, K06}, \ + {XXX, K11, K12, K13, K14, K15, K16}, \ + {XXX, K21, K22, K23, K24, K25, K26}, \ + {XXX, XXX, XXX, XXX, K34, K35, K36}, \ + {K00, K01, K02, K03, K04, K05, K06}, \ + {XXX, K11, K12, K13, K14, K15, K16}, \ + {XXX, K21, K22, K23, K24, K25, K26}, \ + {XXX, XXX, XXX, XXX, K34, K35, K36} \ +} + +#ifdef DIPS_ENABLE +#define LAYOUT_dips( \ + DL0, DL1, DL2, DL3, DL4, DL5, \ + DR5, DR4, DR3, DR2, DR1, DR0 \ +) \ +{ \ + {XXX, XXX, XXX, XXX, XXX, XXX, XXX}, \ + {DL0, XXX, XXX, XXX, XXX, XXX, XXX}, \ + {DL1, XXX, XXX, XXX, XXX, XXX, XXX}, \ + {DL2, DL3, DL4, DL5, XXX, XXX, XXX}, \ + {XXX, XXX, XXX, XXX, XXX, XXX, XXX}, \ + {DR0, XXX, XXX, XXX, XXX, XXX, XXX}, \ + {DR1, XXX, XXX, XXX, XXX, XXX, XXX}, \ + {DR2, DR3, DR4, DR5, XXX, XXX, XXX}, \ +} +#endif // DIPS_ENABLE diff --git a/keyboards/jian/rev1/rules.mk b/keyboards/jian/rev1/rules.mk new file mode 100644 index 000000000000..915b6475484c --- /dev/null +++ b/keyboards/jian/rev1/rules.mk @@ -0,0 +1,20 @@ +# 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 +# +CONSOLE_ENABLE = no +SPLIT_KEYBOARD = yes +BACKLIGHT_ENABLE = yes +RGBLIGHT_ENABLE = yes diff --git a/keyboards/jian/rev2/config.h b/keyboards/jian/rev2/config.h new file mode 100644 index 000000000000..760389cc6424 --- /dev/null +++ b/keyboards/jian/rev2/config.h @@ -0,0 +1,136 @@ +/* +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" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xC0DE +#define PRODUCT_ID 0x1337 +#define DEVICE_VER 0x0200 +#define MANUFACTURER KgOfHedgehogs +#define PRODUCT Jian +#define DESCRIPTION An ergo keyboard + +/* key matrix size */ +// Rows are doubled-up +#define MATRIX_ROWS 8 +#define MATRIX_COLS 6 +#define DIODE_DIRECTION COL2ROW + +// wiring of each half +#define MATRIX_ROW_PINS { F4, F5, B1, B3 } +#define MATRIX_COL_PINS { D3, D2, B4, F6, F7, B2 } + +//#define USE_I2C +#define USE_SERIAL +#define SOFT_SERIAL_PIN D1 + +//#define EE_HANDS +#define SPLIT_HAND_PIN E6 + +/* Set 0 if debouncing isn't needed */ +#define DEBOUNCE 5 + +#define PHYSICAL_LEDS_ENABLE +#define IOS_DEVICE_ENABLE + +#ifdef BACKLIGHT_ENABLE +#define BACKLIGHT_PIN C6 +#define BACKLIGHT_LEVELS 5 +#define BACKLIGHT_BREATHING //not working with splits right now +#define BREATHING_PERIOD 6 +#endif + +/* ws2812 RGB LED */ +#define RGB_DI_PIN D4 +#define RGBLIGHT_TIMER +#define RGBLED_NUM 7 // Number of LEDs +#define RGBLIGHT_ANIMATIONS //not working with splits right now + +#define RGBLIGHT_SLEEP +#define RGBLIGHT_SPLIT + +#ifndef IOS_DEVICE_ENABLE +#if RGBLED_NUM <= 6 +#define RGBLIGHT_LIMIT_VAL 255 +#else +#define RGBLIGHT_LIMIT_VAL 130 +#endif +#define RGBLIGHT_VAL_STEP 8 +#else +#if RGBLED_NUM <= 6 +#define RGBLIGHT_LIMIT_VAL 90 +#else +#define RGBLIGHT_LIMIT_VAL 45 +#endif +#define RGBLIGHT_VAL_STEP 4 +#endif +#define RGBLIGHT_HUE_STEP 10 +#define RGBLIGHT_SAT_STEP 17 + +#if defined(RGBLIGHT_ENABLE) && !defined(IOS_DEVICE_ENABLE) +#define USB_MAX_POWER_CONSUMPTION 400 +#else +// iOS device need lessthan 100 +#define USB_MAX_POWER_CONSUMPTION 100 +#endif + +#define NUM_LOCK_LED_PIN D7 +#define CAPS_LOCK_LED_PIN B5 +#define SCROLL_LOCK_LED_PIN B6 + +// #define NUM_NMOSFET //uncomment this if you using n-mosfet +// #define CAPS_NMOSFET //uncomment this if you using n-mosfet +// #define SCROLL_NMOSFET //uncomment this if you using n-mosfet + +// #define NUM_INVERT // uncomment this if you want to reverse logic of numlock +// This will make it light up only when lock is off +// (Doesn't work on mac. There is no num lock, so it will be always off and lit) + +#ifdef NUM_NMOSFET +#define RESET_NUM_LOCK_LED() writePinLow(NUM_LOCK_LED_PIN) +#ifdef NUM_INVERT +#define UPDATE_NUM_LOCK_LED() writePin(NUM_LOCK_LED_PIN, !led_state.num_lock) +#else +#define UPDATE_NUM_LOCK_LED() writePin(NUM_LOCK_LED_PIN, led_state.num_lock) +#endif // NUM_INVERT +#else +#define RESET_NUM_LOCK_LED() writePinHigh(NUM_LOCK_LED_PIN) +#ifdef NUM_INVERT +#define UPDATE_NUM_LOCK_LED() writePin(NUM_LOCK_LED_PIN, led_state.num_lock) +#else +#define UPDATE_NUM_LOCK_LED() writePin(NUM_LOCK_LED_PIN, !led_state.num_lock) +#endif // NUM_INVERT +#endif // NUM_NMOSFET + +#ifdef CAPS_NMOSFET +#define RESET_CAPS_LOCK_LED() writePinLow(CAPS_LOCK_LED_PIN) +#define UPDATE_CAPS_LOCK_LED() writePin(CAPS_LOCK_LED_PIN, led_state.caps_lock) +#else +#define RESET_CAPS_LOCK_LED() writePinHigh(CAPS_LOCK_LED_PIN) +#define UPDATE_CAPS_LOCK_LED() writePin(CAPS_LOCK_LED_PIN, !led_state.caps_lock) +#endif // CAPS_NMOSFET + +#ifdef SCROLL_NMOSFET +#define RESET_SCROLL_LOCK_LED() writePinLow(SCROLL_LOCK_LED_PIN) +#define UPDATE_SCROLL_LOCK_LED() writePin(SCROLL_LOCK_LED_PIN, led_state.scroll_lock) +#else +#define RESET_SCROLL_LOCK_LED() writePinHigh(SCROLL_LOCK_LED_PIN) +#define UPDATE_SCROLL_LOCK_LED() writePin(SCROLL_LOCK_LED_PIN, !led_state.scroll_lock) +#endif // SCROLL_NMOSFET diff --git a/keyboards/jian/rev2/rev2.c b/keyboards/jian/rev2/rev2.c new file mode 100644 index 000000000000..6f4808de7303 --- /dev/null +++ b/keyboards/jian/rev2/rev2.c @@ -0,0 +1,74 @@ +#include "rev2.h" + +#ifdef SWAP_HANDS_ENABLE +__attribute__ ((weak)) +const keypos_t hand_swap_config[MATRIX_ROWS][MATRIX_COLS] = { + {{0, 4}, {1, 4}, {2, 4}, {3, 4}, {4, 4}, {5, 4}}, + {{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, 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}}, +}; +#endif + +static bool backlight_was_toggled = false; + +void suspend_power_down_kb(void) { + if (is_backlight_enabled()) { + backlight_disable(); + backlight_was_toggled = true; + } +} + +void suspend_wakeup_init_kb(void) { + if (backlight_was_toggled) { + backlight_enable(); + backlight_was_toggled = false; + } +} + +#ifdef PHYSICAL_LEDS_ENABLE +void led_init_kb(void) +{ +#ifdef NUM_LOCK_LED_PIN + setPinOutput(NUM_LOCK_LED_PIN); + RESET_NUM_LOCK_LED(); +#endif // NUM_LOCK_LED_PIN +#ifdef CAPS_LOCK_LED_PIN + setPinOutput(CAPS_LOCK_LED_PIN); + RESET_CAPS_LOCK_LED(); +#endif // CAPS_LOCK_LED_PIN +#ifdef SCROLL_LOCK_LED_PIN + setPinOutput(SCROLL_LOCK_LED_PIN); + RESET_SCROLL_LOCK_LED(); +#endif // SCROLL_LOCK_LED_PIN +} +#endif // PHYSICAL_LEDS_ENABLE + +void matrix_init_kb(void) { +#ifdef PHYSICAL_LEDS_ENABLE + led_init_kb(); +#endif // PHYSICAL_LEDS_ENABLE + matrix_init_user(); +}; + +#ifdef PHYSICAL_LEDS_ENABLE +bool led_update_kb(led_t led_state) { + bool res = led_update_user(led_state); + if(res) { +#ifdef NUM_LOCK_LED_PIN + UPDATE_NUM_LOCK_LED(); +#endif // NUM_LOCK_LED_PIN +#ifdef CAPS_LOCK_LED_PIN + UPDATE_CAPS_LOCK_LED(); +#endif // CAPS_LOCK_LED_PIN +#ifdef SCROLL_LOCK_LED_PIN + UPDATE_SCROLL_LOCK_LED(); +#endif // SCROLL_LOCK_LED_PIN + } + return res; +} +#endif // PHYSICAL_LEDS_ENABLE diff --git a/keyboards/jian/rev2/rev2.h b/keyboards/jian/rev2/rev2.h new file mode 100644 index 000000000000..9dfb7240b137 --- /dev/null +++ b/keyboards/jian/rev2/rev2.h @@ -0,0 +1,39 @@ +#pragma once + +#include "jian.h" + +#define XXX KC_NO + +#define LAYOUT( \ + L20, L00, L01, L12, L02, L03, L04, R04, R03, R02, R12, R01, R00, R20, \ + L10, L11, L22, L13, L14, L05, R05, R14, R13, R22, R11, R10, \ + L21, L32, L33, L23, L24, L15, R15, R24, R23, R33, R32, R21, \ + L34, L25, L35, R35, R25, R34 \ +) \ +{ \ + {L00, L01, L02, L03, L04, L05 }, \ + {L10, L11, L12, L13, L14, L15 }, \ + {L20, L21, L22, L23, L24, L25 }, \ + {XXX, XXX, L32, L33, L34, L35 }, \ + {R00, R01, R02, R03, R04, R05 }, \ + {R10, R11, R12, R13, R14, R15 }, \ + {R20, R21, R22, R23, R24, R25 }, \ + {XXX, XXX, R32, R33, R34, R35 } \ +} + +#define LAYOUT_symmetric( \ + K20, K00, K01, K12, K02, K03, K04, \ + K10, K11, K22, K13, K14, K05, \ + K21, K32, K33, K23, K24, K15, \ + K34, K25, K35 \ +) \ +{ \ + {K00, K01, K02, K03, K04, K05 }, \ + {K10, K11, K12, K13, K14, K15 }, \ + {K20, K21, K22, K23, K24, K25 }, \ + {XXX, XXX, K32, K33, K34, K35 }, \ + {K00, K01, K02, K03, K04, K05 }, \ + {K10, K11, K12, K13, K14, K15 }, \ + {K20, K21, K22, K23, K24, K25 }, \ + {XXX, XXX, K32, K33, K34, K35 } \ +} diff --git a/keyboards/jian/rev2/rules.mk b/keyboards/jian/rev2/rules.mk new file mode 100644 index 000000000000..bbfde67f944e --- /dev/null +++ b/keyboards/jian/rev2/rules.mk @@ -0,0 +1,20 @@ +# 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 +# +CONSOLE_ENABLE = no +SPLIT_KEYBOARD = yes +BACKLIGHT_ENABLE = yes +RGBLIGHT_ENABLE = yes diff --git a/keyboards/jian/rules.mk b/keyboards/jian/rules.mk new file mode 100644 index 000000000000..c19fa00b5cb9 --- /dev/null +++ b/keyboards/jian/rules.mk @@ -0,0 +1 @@ +DEFAULT_FOLDER = jian/rev2 From abf466e57df57680d689701de5887f24a5075f65 Mon Sep 17 00:00:00 2001 From: James Young <18669334+noroadsleft@users.noreply.github.com> Date: Wed, 17 Jun 2020 20:47:25 -0700 Subject: [PATCH 178/930] Add Configurator layout support for westfoxtrot/prophet (#9428) --- keyboards/westfoxtrot/prophet/info.json | 76 +++++++++++++++++++++++++ 1 file changed, 76 insertions(+) create mode 100644 keyboards/westfoxtrot/prophet/info.json diff --git a/keyboards/westfoxtrot/prophet/info.json b/keyboards/westfoxtrot/prophet/info.json new file mode 100644 index 000000000000..fa4c5a9e5499 --- /dev/null +++ b/keyboards/westfoxtrot/prophet/info.json @@ -0,0 +1,76 @@ +{ + "keyboard_name": "Prophet", + "url": "", + "maintainer": "westfoxtrot", + "width": 15, + "height": 5, + "layouts": { + "LAYOUT_all": { + "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}, + {"label":"K4D", "x":14, "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":"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":"K2D", "x":12.75, "y":2, "w":2.25}, + {"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":"K40", "x":0, "y":4, "w":1.5}, + {"label":"K41", "x":1.5, "y":4}, + {"label":"K42", "x":2.5, "y":4, "w":1.5}, + {"label":"K46", "x":4, "y":4, "w":7}, + {"label":"K4A", "x":11, "y":4, "w":1.5}, + {"label":"K4B", "x":12.5, "y":4}, + {"label":"K4C", "x":13.5, "y":4, "w":1.5} + ] + } + } +} From b0fd064491b601b6e3ec56f0b68d0b2271a297b3 Mon Sep 17 00:00:00 2001 From: James Young <18669334+noroadsleft@users.noreply.github.com> Date: Wed, 17 Jun 2020 20:47:52 -0700 Subject: [PATCH 179/930] Fix Kudox Columner Configurator key ordering (#9427) --- keyboards/kudox/columner/info.json | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/keyboards/kudox/columner/info.json b/keyboards/kudox/columner/info.json index 8d98c817881e..d11632d9da62 100644 --- a/keyboards/kudox/columner/info.json +++ b/keyboards/kudox/columner/info.json @@ -11,6 +11,8 @@ {"label":"3", "x":3.25, "y":0}, {"label":"4", "x":4.25, "y":0.25}, {"label":"5", "x":5.25, "y":0.5}, + {"label":"{", "x":6.25, "y":1.25, "h":1.25}, + {"label":"}", "x":10, "y":1.25, "h":1.25}, {"label":"6", "x":11, "y":0.5}, {"label":"7", "x":12, "y":0.25}, {"label":"8", "x":13, "y":0}, @@ -23,8 +25,8 @@ {"label":"E", "x":3.25, "y":1}, {"label":"R", "x":4.25, "y":1.25}, {"label":"T", "x":5.25, "y":1.5}, - {"label":"{", "x":6.25, "y":1.25, "h":1.25}, - {"label":"}", "x":10, "y":1.25, "h":1.25}, + {"label":"-", "x":6.25, "y":2.5, "h":1.25}, + {"label":"=", "x":10, "y":2.5, "h":1.25}, {"label":"Y", "x":11, "y":1.5}, {"label":"U", "x":12, "y":1.25}, {"label":"I", "x":13, "y":1}, @@ -46,11 +48,9 @@ {"label":"Shift", "x":0, "y":3.5, "w":1.25}, {"label":"Z", "x":1.25, "y":3.5}, {"label":"X", "x":2.25, "y":3.25}, - {"label":"V", "x":4.25, "y":3.25}, {"label":"C", "x":3.25, "y":3}, + {"label":"V", "x":4.25, "y":3.25}, {"label":"B", "x":5.25, "y":3.5}, - {"label":"-", "x":6.25, "y":2.5, "h":1.25}, - {"label":"=", "x":10, "y":2.5, "h":1.25}, {"label":"N", "x":11, "y":3.5}, {"label":"M", "x":12, "y":3.25}, {"label":",", "x":13, "y":3}, @@ -66,7 +66,7 @@ {"label":"Space", "x":6.25, "y":5}, {"label":"Space", "x":10, "y":5}, {"label":"GUI", "x":11, "y":4.75}, - {"label":"LANG2", "x":12, "y":4.5}, + {"label":"LANG1", "x":12, "y":4.5}, {"label":"\u2190", "x":13, "y":4}, {"label":"\u2193", "x":14, "y":4.25}, {"label":"\u2191", "x":15, "y":4.5}, From faae375ccd5207dabea254d4013aeff7cf8d0c10 Mon Sep 17 00:00:00 2001 From: Ryan Date: Thu, 18 Jun 2020 14:23:09 +1000 Subject: [PATCH 180/930] Fix error_log complaint about Preonic layouts (#9443) --- keyboards/preonic/info.json | 276 ++++++------- keyboards/preonic/preonic.h | 2 +- keyboards/preonic/rev1/rev1.h | 58 ++- keyboards/preonic/rev2/rev2.h | 58 ++- keyboards/preonic/rev3/info.json | 669 ++++++++++++++++--------------- keyboards/preonic/rev3/rev3.h | 189 +++++---- 6 files changed, 627 insertions(+), 625 deletions(-) diff --git a/keyboards/preonic/info.json b/keyboards/preonic/info.json index cb0798b545a1..8de5e24d93bf 100644 --- a/keyboards/preonic/info.json +++ b/keyboards/preonic/info.json @@ -1,137 +1,145 @@ { - "keyboard_name": "Preonic", - "keyboard_folder": "preonic", - "url": "https://olkb.com/preonic", - "maintainer": "jackhumbert", - "width": 12, - "height": 5, - "layouts": { - "LAYOUT_preonic_1x2uC": { - "key_count": 59, - "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": 4, "y": 0 }, - { "w": 1, "x": 5, "y": 0 }, - { "w": 1, "x": 6, "y": 0 }, - { "w": 1, "x": 7, "y": 0 }, - { "w": 1, "x": 8, "y": 0 }, - { "w": 1, "x": 9, "y": 0 }, - { "w": 1, "x": 10, "y": 0 }, - { "w": 1, "x": 11, "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": 4, "y": 1 }, - { "w": 1, "x": 5, "y": 1 }, - { "w": 1, "x": 6, "y": 1 }, - { "w": 1, "x": 7, "y": 1 }, - { "w": 1, "x": 8, "y": 1 }, - { "w": 1, "x": 9, "y": 1 }, - { "w": 1, "x": 10, "y": 1 }, - { "w": 1, "x": 11, "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": 4, "y": 2 }, - { "w": 1, "x": 5, "y": 2 }, - { "w": 1, "x": 6, "y": 2 }, - { "w": 1, "x": 7, "y": 2 }, - { "w": 1, "x": 8, "y": 2 }, - { "w": 1, "x": 9, "y": 2 }, - { "w": 1, "x": 10, "y": 2 }, - { "w": 1, "x": 11, "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 }, - { "w": 1, "x": 4, "y": 3 }, - { "w": 1, "x": 5, "y": 3 }, - { "w": 1, "x": 6, "y": 3 }, - { "w": 1, "x": 7, "y": 3 }, - { "w": 1, "x": 8, "y": 3 }, - { "w": 1, "x": 9, "y": 3 }, - { "w": 1, "x": 10, "y": 3 }, - { "w": 1, "x": 11, "y": 3 }, - { "w": 1, "x": 0, "y": 4 }, - { "w": 1, "x": 1, "y": 4 }, - { "w": 1, "x": 2, "y": 4 }, - { "w": 1, "x": 3, "y": 4 }, - { "w": 1, "x": 4, "y": 4 }, - { "w": 2, "x": 5, "y": 4 }, - { "w": 1, "x": 7, "y": 4 }, - { "w": 1, "x": 8, "y": 4 }, - { "w": 1, "x": 9, "y": 4 }, - { "w": 1, "x": 10, "y": 4 }, - { "w": 1, "x": 11, "y": 4 } ] - }, - "LAYOUT_ortho_5x12": { - "key_count": 60, - "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": 4, "y": 0 }, - { "w": 1, "x": 5, "y": 0 }, - { "w": 1, "x": 6, "y": 0 }, - { "w": 1, "x": 7, "y": 0 }, - { "w": 1, "x": 8, "y": 0 }, - { "w": 1, "x": 9, "y": 0 }, - { "w": 1, "x": 10, "y": 0 }, - { "w": 1, "x": 11, "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": 4, "y": 1 }, - { "w": 1, "x": 5, "y": 1 }, - { "w": 1, "x": 6, "y": 1 }, - { "w": 1, "x": 7, "y": 1 }, - { "w": 1, "x": 8, "y": 1 }, - { "w": 1, "x": 9, "y": 1 }, - { "w": 1, "x": 10, "y": 1 }, - { "w": 1, "x": 11, "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": 4, "y": 2 }, - { "w": 1, "x": 5, "y": 2 }, - { "w": 1, "x": 6, "y": 2 }, - { "w": 1, "x": 7, "y": 2 }, - { "w": 1, "x": 8, "y": 2 }, - { "w": 1, "x": 9, "y": 2 }, - { "w": 1, "x": 10, "y": 2 }, - { "w": 1, "x": 11, "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 }, - { "w": 1, "x": 4, "y": 3 }, - { "w": 1, "x": 5, "y": 3 }, - { "w": 1, "x": 6, "y": 3 }, - { "w": 1, "x": 7, "y": 3 }, - { "w": 1, "x": 8, "y": 3 }, - { "w": 1, "x": 9, "y": 3 }, - { "w": 1, "x": 10, "y": 3 }, - { "w": 1, "x": 11, "y": 3 }, - { "w": 1, "x": 0, "y": 4 }, - { "w": 1, "x": 1, "y": 4 }, - { "w": 1, "x": 2, "y": 4 }, - { "w": 1, "x": 3, "y": 4 }, - { "w": 1, "x": 4, "y": 4 }, - { "w": 1, "x": 5, "y": 4 }, - { "w": 1, "x": 6, "y": 4 }, - { "w": 1, "x": 7, "y": 4 }, - { "w": 1, "x": 8, "y": 4 }, - { "w": 1, "x": 9, "y": 4 }, - { "w": 1, "x": 10, "y": 4 }, - { "w": 1, "x": 11, "y": 4 } ] + "keyboard_name": "Preonic", + "keyboard_folder": "preonic", + "url": "https://olkb.com/preonic", + "maintainer": "jackhumbert", + "width": 12, + "height": 5, + "layouts": { + "LAYOUT_preonic_1x2uC": { + "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}, + + {"x": 0, "y": 4}, + {"x": 1, "y": 4}, + {"x": 2, "y": 4}, + {"x": 3, "y": 4}, + {"x": 4, "y": 4}, + {"x": 5, "y": 4, "w": 2}, + {"x": 7, "y": 4}, + {"x": 8, "y": 4}, + {"x": 9, "y": 4}, + {"x": 10, "y": 4}, + {"x": 11, "y": 4} + ] + }, + "LAYOUT_ortho_5x12": { + "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}, + + {"x": 0, "y": 4}, + {"x": 1, "y": 4}, + {"x": 2, "y": 4}, + {"x": 3, "y": 4}, + {"x": 4, "y": 4}, + {"x": 5, "y": 4}, + {"x": 6, "y": 4}, + {"x": 7, "y": 4}, + {"x": 8, "y": 4}, + {"x": 9, "y": 4}, + {"x": 10, "y": 4}, + {"x": 11, "y": 4} + ] + } } - } } diff --git a/keyboards/preonic/preonic.h b/keyboards/preonic/preonic.h index aa184ccbdbd3..4f8ebcc3ee51 100644 --- a/keyboards/preonic/preonic.h +++ b/keyboards/preonic/preonic.h @@ -23,4 +23,4 @@ ** ** ** Name of Alias Matrix Name: ** ******* ----------------- ------------------- ****/ -#define LAYOUT_ortho_5x12 LAYOUT_preonic_grid +#define LAYOUT_preonic_grid LAYOUT_ortho_5x12 diff --git a/keyboards/preonic/rev1/rev1.h b/keyboards/preonic/rev1/rev1.h index 6ca4afd3e2f0..003bb5cee0c3 100644 --- a/keyboards/preonic/rev1/rev1.h +++ b/keyboards/preonic/rev1/rev1.h @@ -18,36 +18,30 @@ #include "preonic.h" -#ifdef __AVR__ // Preonic revs. 1 & 2 +#define LAYOUT_preonic_1x2uC( \ + 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, \ + k40, k41, k42, k43, k44, k45, k47, k48, k49, k4a, k4b \ +) { \ + { 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 }, \ + { k40, k41, k42, k43, k44, k45, k45, k47, k48, k49, k4a, k4b } \ +} - #define LAYOUT_preonic_1x2uC( \ - 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, \ - k40, k41, k42, k43, k44, k45, k47, k48, k49, k4a, k4b \ - ) \ - { \ - { 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 }, \ - { k40, k41, k42, k43, k44, k45, k45, k47, k48, k49, k4a, k4b } \ - } - - #define LAYOUT_preonic_grid( \ - 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, \ - k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, k4a, k4b \ - ) \ - { \ - { 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 }, \ - { k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, k4a, k4b } \ - } - -#endif +#define LAYOUT_ortho_5x12( \ + 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, \ + k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, k4a, k4b \ +) { \ + { 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 }, \ + { k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, k4a, k4b } \ +} diff --git a/keyboards/preonic/rev2/rev2.h b/keyboards/preonic/rev2/rev2.h index 6ca4afd3e2f0..003bb5cee0c3 100644 --- a/keyboards/preonic/rev2/rev2.h +++ b/keyboards/preonic/rev2/rev2.h @@ -18,36 +18,30 @@ #include "preonic.h" -#ifdef __AVR__ // Preonic revs. 1 & 2 +#define LAYOUT_preonic_1x2uC( \ + 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, \ + k40, k41, k42, k43, k44, k45, k47, k48, k49, k4a, k4b \ +) { \ + { 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 }, \ + { k40, k41, k42, k43, k44, k45, k45, k47, k48, k49, k4a, k4b } \ +} - #define LAYOUT_preonic_1x2uC( \ - 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, \ - k40, k41, k42, k43, k44, k45, k47, k48, k49, k4a, k4b \ - ) \ - { \ - { 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 }, \ - { k40, k41, k42, k43, k44, k45, k45, k47, k48, k49, k4a, k4b } \ - } - - #define LAYOUT_preonic_grid( \ - 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, \ - k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, k4a, k4b \ - ) \ - { \ - { 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 }, \ - { k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, k4a, k4b } \ - } - -#endif +#define LAYOUT_ortho_5x12( \ + 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, \ + k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, k4a, k4b \ +) { \ + { 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 }, \ + { k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, k4a, k4b } \ +} diff --git a/keyboards/preonic/rev3/info.json b/keyboards/preonic/rev3/info.json index b1ad1227e1a1..fd72055e19c8 100644 --- a/keyboards/preonic/rev3/info.json +++ b/keyboards/preonic/rev3/info.json @@ -1,330 +1,345 @@ { - "keyboard_name": "Preonic rev. 3", - "keyboard_folder": "preonic/rev3", - "url": "https://olkb.com/preonic", - "maintainer": "jackhumbert", - "width": 12, - "height": 5, - "layouts": { - "LAYOUT_preonic_1x2uC": { - "key_count": 59, - "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}, - {"label":"k11", "x":1, "y":1}, - {"label":"k12", "x":2, "y":1}, - {"label":"k13", "x":3, "y":1}, - {"label":"k14", "x":4, "y":1}, - {"label":"k15", "x":5, "y":1}, - {"label":"k16", "x":6, "y":1}, - {"label":"k17", "x":7, "y":1}, - {"label":"k18", "x":8, "y":1}, - {"label":"k19", "x":9, "y":1}, - {"label":"k1a", "x":10, "y":1}, - {"label":"k1b", "x":11, "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":"k24", "x":4, "y":2}, - {"label":"k25", "x":5, "y":2}, - {"label":"k26", "x":6, "y":2}, - {"label":"k27", "x":7, "y":2}, - {"label":"k28", "x":8, "y":2}, - {"label":"k29", "x":9, "y":2}, - {"label":"k2a", "x":10, "y":2}, - {"label":"k2b", "x":11, "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":"k34", "x":4, "y":3}, - {"label":"k35", "x":5, "y":3}, - {"label":"k36", "x":6, "y":3}, - {"label":"k37", "x":7, "y":3}, - {"label":"k38", "x":8, "y":3}, - {"label":"k39", "x":9, "y":3}, - {"label":"k3a", "x":10, "y":3}, - {"label":"k3b", "x":11, "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":"k44", "x":4, "y":4}, - {"label":"k45", "x":5, "y":4, "w":2}, - {"label":"k47", "x":7, "y":4}, - {"label":"k48", "x":8, "y":4}, - {"label":"k49", "x":9, "y":4}, - {"label":"k4a", "x":10, "y":4}, - {"label":"k4b", "x":11, "y":4} - ] - }, - "LAYOUT_preonic_1x2uR": { - "key_count": 59, - "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}, - {"label":"k11", "x":1, "y":1}, - {"label":"k12", "x":2, "y":1}, - {"label":"k13", "x":3, "y":1}, - {"label":"k14", "x":4, "y":1}, - {"label":"k15", "x":5, "y":1}, - {"label":"k16", "x":6, "y":1}, - {"label":"k17", "x":7, "y":1}, - {"label":"k18", "x":8, "y":1}, - {"label":"k19", "x":9, "y":1}, - {"label":"k1a", "x":10, "y":1}, - {"label":"k1b", "x":11, "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":"k24", "x":4, "y":2}, - {"label":"k25", "x":5, "y":2}, - {"label":"k26", "x":6, "y":2}, - {"label":"k27", "x":7, "y":2}, - {"label":"k28", "x":8, "y":2}, - {"label":"k29", "x":9, "y":2}, - {"label":"k2a", "x":10, "y":2}, - {"label":"k2b", "x":11, "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":"k34", "x":4, "y":3}, - {"label":"k35", "x":5, "y":3}, - {"label":"k36", "x":6, "y":3}, - {"label":"k37", "x":7, "y":3}, - {"label":"k38", "x":8, "y":3}, - {"label":"k39", "x":9, "y":3}, - {"label":"k3a", "x":10, "y":3}, - {"label":"k3b", "x":11, "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":"k44", "x":4, "y":4}, - {"label":"k45", "x":5, "y":4}, - {"label":"k47", "x":6, "y":4, "w":2}, - {"label":"k48", "x":8, "y":4}, - {"label":"k49", "x":9, "y":4}, - {"label":"k4a", "x":10, "y":4}, - {"label":"k4b", "x":11, "y":4} - ] - }, - "LAYOUT_preonic_1x2uL": { - "key_count": 59, - "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}, - {"label":"k11", "x":1, "y":1}, - {"label":"k12", "x":2, "y":1}, - {"label":"k13", "x":3, "y":1}, - {"label":"k14", "x":4, "y":1}, - {"label":"k15", "x":5, "y":1}, - {"label":"k16", "x":6, "y":1}, - {"label":"k17", "x":7, "y":1}, - {"label":"k18", "x":8, "y":1}, - {"label":"k19", "x":9, "y":1}, - {"label":"k1a", "x":10, "y":1}, - {"label":"k1b", "x":11, "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":"k24", "x":4, "y":2}, - {"label":"k25", "x":5, "y":2}, - {"label":"k26", "x":6, "y":2}, - {"label":"k27", "x":7, "y":2}, - {"label":"k28", "x":8, "y":2}, - {"label":"k29", "x":9, "y":2}, - {"label":"k2a", "x":10, "y":2}, - {"label":"k2b", "x":11, "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":"k34", "x":4, "y":3}, - {"label":"k35", "x":5, "y":3}, - {"label":"k36", "x":6, "y":3}, - {"label":"k37", "x":7, "y":3}, - {"label":"k38", "x":8, "y":3}, - {"label":"k39", "x":9, "y":3}, - {"label":"k3a", "x":10, "y":3}, - {"label":"k3b", "x":11, "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":"k44", "x":4, "y":4, "w":2}, - {"label":"k46", "x":6, "y":4}, - {"label":"k47", "x":7, "y":4}, - {"label":"k48", "x":8, "y":4}, - {"label":"k49", "x":9, "y":4}, - {"label":"k4a", "x":10, "y":4}, - {"label":"k4b", "x":11, "y":4} - ] - }, - "LAYOUT_preonic_2x2u": { - "key_count": 58, - "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}, - {"label":"k11", "x":1, "y":1}, - {"label":"k12", "x":2, "y":1}, - {"label":"k13", "x":3, "y":1}, - {"label":"k14", "x":4, "y":1}, - {"label":"k15", "x":5, "y":1}, - {"label":"k16", "x":6, "y":1}, - {"label":"k17", "x":7, "y":1}, - {"label":"k18", "x":8, "y":1}, - {"label":"k19", "x":9, "y":1}, - {"label":"k1a", "x":10, "y":1}, - {"label":"k1b", "x":11, "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":"k24", "x":4, "y":2}, - {"label":"k25", "x":5, "y":2}, - {"label":"k26", "x":6, "y":2}, - {"label":"k27", "x":7, "y":2}, - {"label":"k28", "x":8, "y":2}, - {"label":"k29", "x":9, "y":2}, - {"label":"k2a", "x":10, "y":2}, - {"label":"k2b", "x":11, "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":"k34", "x":4, "y":3}, - {"label":"k35", "x":5, "y":3}, - {"label":"k36", "x":6, "y":3}, - {"label":"k37", "x":7, "y":3}, - {"label":"k38", "x":8, "y":3}, - {"label":"k39", "x":9, "y":3}, - {"label":"k3a", "x":10, "y":3}, - {"label":"k3b", "x":11, "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":"k44", "x":4, "y":4, "w":2}, - {"label":"k46", "x":6, "y":4, "w":2}, - {"label":"k48", "x":8, "y":4}, - {"label":"k49", "x":9, "y":4}, - {"label":"k4a", "x":10, "y":4}, - {"label":"k4b", "x":11, "y":4} - ] - }, - "LAYOUT_ortho_5x12": { - "key_count": 60, - "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}, - {"label":"k11", "x":1, "y":1}, - {"label":"k12", "x":2, "y":1}, - {"label":"k13", "x":3, "y":1}, - {"label":"k14", "x":4, "y":1}, - {"label":"k15", "x":5, "y":1}, - {"label":"k16", "x":6, "y":1}, - {"label":"k17", "x":7, "y":1}, - {"label":"k18", "x":8, "y":1}, - {"label":"k19", "x":9, "y":1}, - {"label":"k1a", "x":10, "y":1}, - {"label":"k1b", "x":11, "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":"k24", "x":4, "y":2}, - {"label":"k25", "x":5, "y":2}, - {"label":"k26", "x":6, "y":2}, - {"label":"k27", "x":7, "y":2}, - {"label":"k28", "x":8, "y":2}, - {"label":"k29", "x":9, "y":2}, - {"label":"k2a", "x":10, "y":2}, - {"label":"k2b", "x":11, "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":"k34", "x":4, "y":3}, - {"label":"k35", "x":5, "y":3}, - {"label":"k36", "x":6, "y":3}, - {"label":"k37", "x":7, "y":3}, - {"label":"k38", "x":8, "y":3}, - {"label":"k39", "x":9, "y":3}, - {"label":"k3a", "x":10, "y":3}, - {"label":"k3b", "x":11, "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":"k44", "x":4, "y":4}, - {"label":"k45", "x":5, "y":4}, - {"label":"k46", "x":6, "y":4}, - {"label":"k47", "x":7, "y":4}, - {"label":"k48", "x":8, "y":4}, - {"label":"k49", "x":9, "y":4}, - {"label":"k4a", "x":10, "y":4}, - {"label":"k4b", "x":11, "y":4} - ] + "keyboard_name": "Preonic rev. 3", + "keyboard_folder": "preonic/rev3", + "url": "https://olkb.com/preonic", + "maintainer": "jackhumbert", + "width": 12, + "height": 5, + "layouts": { + "LAYOUT_preonic_1x2uC": { + "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}, + + {"x": 0, "y": 4}, + {"x": 1, "y": 4}, + {"x": 2, "y": 4}, + {"x": 3, "y": 4}, + {"x": 4, "y": 4}, + {"x": 5, "y": 4, "w": 2}, + {"x": 7, "y": 4}, + {"x": 8, "y": 4}, + {"x": 9, "y": 4}, + {"x": 10, "y": 4}, + {"x": 11, "y": 4} + ] + }, + "LAYOUT_preonic_1x2uR": { + "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}, + + {"x": 0, "y": 4}, + {"x": 1, "y": 4}, + {"x": 2, "y": 4}, + {"x": 3, "y": 4}, + {"x": 4, "y": 4}, + {"x": 5, "y": 4}, + {"x": 6, "y": 4, "w": 2}, + {"x": 8, "y": 4}, + {"x": 9, "y": 4}, + {"x": 10, "y": 4}, + {"x": 11, "y": 4} + ] + }, + "LAYOUT_preonic_1x2uL": { + "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}, + + {"x": 0, "y": 4}, + {"x": 1, "y": 4}, + {"x": 2, "y": 4}, + {"x": 3, "y": 4}, + {"x": 4, "y": 4, "w": 2}, + {"x": 6, "y": 4}, + {"x": 7, "y": 4}, + {"x": 8, "y": 4}, + {"x": 9, "y": 4}, + {"x": 10, "y": 4}, + {"x": 11, "y": 4} + ] + }, + "LAYOUT_preonic_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}, + {"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}, + + {"x": 0, "y": 4}, + {"x": 1, "y": 4}, + {"x": 2, "y": 4}, + {"x": 3, "y": 4}, + {"x": 4, "y": 4, "w": 2}, + {"x": 6, "y": 4, "w": 2}, + {"x": 8, "y": 4}, + {"x": 9, "y": 4}, + {"x": 10, "y": 4}, + {"x": 11, "y": 4} + ] + }, + "LAYOUT_ortho_5x12": { + "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}, + + {"x": 0, "y": 4}, + {"x": 1, "y": 4}, + {"x": 2, "y": 4}, + {"x": 3, "y": 4}, + {"x": 4, "y": 4}, + {"x": 5, "y": 4}, + {"x": 6, "y": 4}, + {"x": 7, "y": 4}, + {"x": 8, "y": 4}, + {"x": 9, "y": 4}, + {"x": 10, "y": 4}, + {"x": 11, "y": 4} + ] + } } - } } diff --git a/keyboards/preonic/rev3/rev3.h b/keyboards/preonic/rev3/rev3.h index af97239fd117..e6462d5b751f 100644 --- a/keyboards/preonic/rev3/rev3.h +++ b/keyboards/preonic/rev3/rev3.h @@ -18,106 +18,97 @@ #include "preonic.h" -#ifndef __AVR__ // Preonic rev. 3 and later +#define LAYOUT_preonic_1x2uC( \ + 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, \ + k40, k41, k42, k43, k44, k45, k47, k48, k49, k4a, k4b \ +) { \ + { k00, k01, k02, k03, k04, k05 }, \ + { k10, k11, k12, k13, k14, k15 }, \ + { k20, k21, k22, k23, k24, k25 }, \ + { k30, k31, k32, k33, k34, k35 }, \ + { k06, k07, k08, k09, k0a, k0b }, \ + { k16, k17, k18, k19, k1a, k1b }, \ + { k26, k27, k28, k29, k2a, k2b }, \ + { k36, k37, k38, k39, k3a, k3b }, \ + { k40, k41, k42, k49, k4a, k4b }, \ + { k45, k47, k48, k43, k44, k45 } \ +} - #define LAYOUT_preonic_1x2uC( \ - 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, \ - k40, k41, k42, k43, k44, k45, k47, k48, k49, k4a, k4b \ - ) \ - { \ - { k00, k01, k02, k03, k04, k05 }, \ - { k10, k11, k12, k13, k14, k15 }, \ - { k20, k21, k22, k23, k24, k25 }, \ - { k30, k31, k32, k33, k34, k35 }, \ - { k06, k07, k08, k09, k0a, k0b }, \ - { k16, k17, k18, k19, k1a, k1b }, \ - { k26, k27, k28, k29, k2a, k2b }, \ - { k36, k37, k38, k39, k3a, k3b }, \ - { k40, k41, k42, k49, k4a, k4b }, \ - { k45, k47, k48, k43, k44, k45 } \ - } +#define LAYOUT_preonic_1x2uR( \ + 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, \ + k40, k41, k42, k43, k44, k45, k47, k48, k49, k4a, k4b \ + ) { \ + { k00, k01, k02, k03, k04, k05 }, \ + { k10, k11, k12, k13, k14, k15 }, \ + { k20, k21, k22, k23, k24, k25 }, \ + { k30, k31, k32, k33, k34, k35 }, \ + { k06, k07, k08, k09, k0a, k0b }, \ + { k16, k17, k18, k19, k1a, k1b }, \ + { k26, k27, k28, k29, k2a, k2b }, \ + { k36, k37, k38, k39, k3a, k3b }, \ + { k40, k41, k42, k49, k4a, k4b }, \ + { k47, k47, k48, k43, k44, k45 } \ +} - #define LAYOUT_preonic_1x2uR( \ - 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, \ - k40, k41, k42, k43, k44, k45, k47, k48, k49, k4a, k4b \ - ) \ - { \ - { k00, k01, k02, k03, k04, k05 }, \ - { k10, k11, k12, k13, k14, k15 }, \ - { k20, k21, k22, k23, k24, k25 }, \ - { k30, k31, k32, k33, k34, k35 }, \ - { k06, k07, k08, k09, k0a, k0b }, \ - { k16, k17, k18, k19, k1a, k1b }, \ - { k26, k27, k28, k29, k2a, k2b }, \ - { k36, k37, k38, k39, k3a, k3b }, \ - { k40, k41, k42, k49, k4a, k4b }, \ - { k47, k47, k48, k43, k44, k45 } \ - } +#define LAYOUT_preonic_1x2uL( \ + 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, \ + k40, k41, k42, k43, k44, k46, k47, k48, k49, k4a, k4b \ +) { \ + { k00, k01, k02, k03, k04, k05 }, \ + { k10, k11, k12, k13, k14, k15 }, \ + { k20, k21, k22, k23, k24, k25 }, \ + { k30, k31, k32, k33, k34, k35 }, \ + { k06, k07, k08, k09, k0a, k0b }, \ + { k16, k17, k18, k19, k1a, k1b }, \ + { k26, k27, k28, k29, k2a, k2b }, \ + { k36, k37, k38, k39, k3a, k3b }, \ + { k40, k41, k42, k49, k4a, k4b }, \ + { k46, k47, k48, k43, k44, k44 } \ +} - #define LAYOUT_preonic_1x2uL( \ - 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, \ - k40, k41, k42, k43, k44, k46, k47, k48, k49, k4a, k4b \ - ) \ - { \ - { k00, k01, k02, k03, k04, k05 }, \ - { k10, k11, k12, k13, k14, k15 }, \ - { k20, k21, k22, k23, k24, k25 }, \ - { k30, k31, k32, k33, k34, k35 }, \ - { k06, k07, k08, k09, k0a, k0b }, \ - { k16, k17, k18, k19, k1a, k1b }, \ - { k26, k27, k28, k29, k2a, k2b }, \ - { k36, k37, k38, k39, k3a, k3b }, \ - { k40, k41, k42, k49, k4a, k4b }, \ - { k46, k47, k48, k43, k44, k44 } \ - } +#define LAYOUT_preonic_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, k35, k36, k37, k38, k39, k3a, k3b, \ + k40, k41, k42, k43, k44, k46, k48, k49, k4a, k4b \ +) { \ + { k00, k01, k02, k03, k04, k05 }, \ + { k10, k11, k12, k13, k14, k15 }, \ + { k20, k21, k22, k23, k24, k25 }, \ + { k30, k31, k32, k33, k34, k35 }, \ + { k06, k07, k08, k09, k0a, k0b }, \ + { k16, k17, k18, k19, k1a, k1b }, \ + { k26, k27, k28, k29, k2a, k2b }, \ + { k36, k37, k38, k39, k3a, k3b }, \ + { k40, k41, k42, k49, k4a, k4b }, \ + { k46, k46, k48, k43, k44, k44 } \ +} - #define LAYOUT_preonic_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, k35, k36, k37, k38, k39, k3a, k3b, \ - k40, k41, k42, k43, k44, k46, k48, k49, k4a, k4b \ - ) \ - { \ - { k00, k01, k02, k03, k04, k05 }, \ - { k10, k11, k12, k13, k14, k15 }, \ - { k20, k21, k22, k23, k24, k25 }, \ - { k30, k31, k32, k33, k34, k35 }, \ - { k06, k07, k08, k09, k0a, k0b }, \ - { k16, k17, k18, k19, k1a, k1b }, \ - { k26, k27, k28, k29, k2a, k2b }, \ - { k36, k37, k38, k39, k3a, k3b }, \ - { k40, k41, k42, k49, k4a, k4b }, \ - { k46, k46, k48, k43, k44, k44 } \ - } - - #define LAYOUT_preonic_grid( \ - 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, \ - k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, k4a, k4b \ - ) \ - { \ - { k00, k01, k02, k03, k04, k05 }, \ - { k10, k11, k12, k13, k14, k15 }, \ - { k20, k21, k22, k23, k24, k25 }, \ - { k30, k31, k32, k33, k34, k35 }, \ - { k06, k07, k08, k09, k0a, k0b }, \ - { k16, k17, k18, k19, k1a, k1b }, \ - { k26, k27, k28, k29, k2a, k2b }, \ - { k36, k37, k38, k39, k3a, k3b }, \ - { k40, k41, k42, k49, k4a, k4b }, \ - { k46, k47, k48, k43, k44, k45 } \ - } - -#endif +#define LAYOUT_ortho_5x12( \ + 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, \ + k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, k4a, k4b \ +) { \ + { k00, k01, k02, k03, k04, k05 }, \ + { k10, k11, k12, k13, k14, k15 }, \ + { k20, k21, k22, k23, k24, k25 }, \ + { k30, k31, k32, k33, k34, k35 }, \ + { k06, k07, k08, k09, k0a, k0b }, \ + { k16, k17, k18, k19, k1a, k1b }, \ + { k26, k27, k28, k29, k2a, k2b }, \ + { k36, k37, k38, k39, k3a, k3b }, \ + { k40, k41, k42, k49, k4a, k4b }, \ + { k46, k47, k48, k43, k44, k45 } \ +} From ed528403fd768e804887b957891b7a16319ae4dc Mon Sep 17 00:00:00 2001 From: Maarten Dekkers Date: Thu, 18 Jun 2020 06:30:34 +0200 Subject: [PATCH 181/930] [Keyboard] Add Eon87 (#9337) Co-authored-by: Maarten Dekkers --- keyboards/maartenwut/eon87/config.h | 220 +++++++++++++ keyboards/maartenwut/eon87/eon87.c | 16 + keyboards/maartenwut/eon87/eon87.h | 79 +++++ keyboards/maartenwut/eon87/info.json | 301 ++++++++++++++++++ .../maartenwut/eon87/keymaps/default/keymap.c | 42 +++ .../eon87/keymaps/default/readme.md | 1 + .../maartenwut/eon87/keymaps/via/keymap.c | 50 +++ .../maartenwut/eon87/keymaps/via/rules.mk | 2 + keyboards/maartenwut/eon87/readme.md | 13 + keyboards/maartenwut/eon87/rules.mk | 34 ++ 10 files changed, 758 insertions(+) create mode 100644 keyboards/maartenwut/eon87/config.h create mode 100644 keyboards/maartenwut/eon87/eon87.c create mode 100644 keyboards/maartenwut/eon87/eon87.h create mode 100644 keyboards/maartenwut/eon87/info.json create mode 100644 keyboards/maartenwut/eon87/keymaps/default/keymap.c create mode 100644 keyboards/maartenwut/eon87/keymaps/default/readme.md create mode 100644 keyboards/maartenwut/eon87/keymaps/via/keymap.c create mode 100644 keyboards/maartenwut/eon87/keymaps/via/rules.mk create mode 100644 keyboards/maartenwut/eon87/readme.md create mode 100644 keyboards/maartenwut/eon87/rules.mk diff --git a/keyboards/maartenwut/eon87/config.h b/keyboards/maartenwut/eon87/config.h new file mode 100644 index 000000000000..14fec2e584c0 --- /dev/null +++ b/keyboards/maartenwut/eon87/config.h @@ -0,0 +1,220 @@ +/* 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 0xAA6B +#define DEVICE_VER 0x0001 +#define MANUFACTURER Maartenwut +#define PRODUCT Eon87 +#define DESCRIPTION A TKL 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 {B1,B2,B3,D4,D1,D5} +#define MATRIX_COL_PINS {F0,F1,F4,F5,F6,F7,C7,C6,B6,B5,B4,D7,D6,E6,B7,D3,D2} +#define UNUSED_PINS {B0} + +/* 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 D0 +// #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 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 0 diff --git a/keyboards/maartenwut/eon87/eon87.c b/keyboards/maartenwut/eon87/eon87.c new file mode 100644 index 000000000000..4f6b4037621d --- /dev/null +++ b/keyboards/maartenwut/eon87/eon87.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 "eon87.h" diff --git a/keyboards/maartenwut/eon87/eon87.h b/keyboards/maartenwut/eon87/eon87.h new file mode 100644 index 000000000000..08aa3d55b00b --- /dev/null +++ b/keyboards/maartenwut/eon87/eon87.h @@ -0,0 +1,79 @@ +/* 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, 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, k0d, 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, k4f, \ + k50, k51, k52, k54, k56, k58, 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, XXX, XXX, XXX }, \ + { k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, k4a, k4b, k4c, k4d, XXX, k4f, XXX }, \ + { k50, k51, k52, XXX, k54, XXX, k56, XXX, k58, XXX, k5a, k5b, k5c, k5d, k5e, k5f, k5g } \ +} + +#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, XXX, 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, XXX, k3d, XXX, XXX, XXX }, \ + { k40, XXX, k42, k43, k44, k45, k46, k47, k48, k49, k4a, k4b, k4c, XXX, XXX, k4f, XXX }, \ + { k50, k51, k52, XXX, XXX, XXX, k56, XXX, XXX, XXX, k5a, k5b, k5c, k5d, k5e, k5f, k5g } \ +} + +#define LAYOUT_tkl_iso( \ + 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, 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, 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, XXX, 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, XXX, k2e, k2f, k2g }, \ + { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d, XXX, XXX, XXX }, \ + { k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, k4a, k4b, k4c, XXX, XXX, k4f, XXX }, \ + { k50, k51, k52, XXX, XXX, XXX, k56, XXX, XXX, XXX, k5a, k5b, k5c, k5d, k5e, k5f, k5g } \ +} diff --git a/keyboards/maartenwut/eon87/info.json b/keyboards/maartenwut/eon87/info.json new file mode 100644 index 000000000000..8d7dadfab51d --- /dev/null +++ b/keyboards/maartenwut/eon87/info.json @@ -0,0 +1,301 @@ +{ + "keyboard_name": "Eon87", + "url": "", + "maintainer": "qmk", + "width": 18.25, + "height": 6.25, + "layouts": { + "LAYOUT_all": { + "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}, + {"x":14, "y":1.25}, + {"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}, + + {"x":13.75, "y":3.25, "w":1.25}, + {"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_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_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} + ] + } + } +} diff --git a/keyboards/maartenwut/eon87/keymaps/default/keymap.c b/keyboards/maartenwut/eon87/keymaps/default/keymap.c new file mode 100644 index 000000000000..4eaff0f4a522 --- /dev/null +++ b/keyboards/maartenwut/eon87/keymaps/default/keymap.c @@ -0,0 +1,42 @@ +/* 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_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_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_SPC, KC_SPC, KC_RALT, KC_RGUI, KC_APP, KC_RCTRL, KC_LEFT, KC_DOWN, KC_RGHT), +[_FN] = LAYOUT_all( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_VOLD, KC_MUTE, KC_VOLU, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MPRV, KC_MPLY, KC_MNXT, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______), + +}; \ No newline at end of file diff --git a/keyboards/maartenwut/eon87/keymaps/default/readme.md b/keyboards/maartenwut/eon87/keymaps/default/readme.md new file mode 100644 index 000000000000..a70270cfacca --- /dev/null +++ b/keyboards/maartenwut/eon87/keymaps/default/readme.md @@ -0,0 +1 @@ +This is the default keymap for the Eon87. diff --git a/keyboards/maartenwut/eon87/keymaps/via/keymap.c b/keyboards/maartenwut/eon87/keymaps/via/keymap.c new file mode 100644 index 000000000000..67543b54cc30 --- /dev/null +++ b/keyboards/maartenwut/eon87/keymaps/via/keymap.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 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_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_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(1), KC_UP, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_SPC, KC_SPC, KC_RALT, KC_RGUI, KC_APP, KC_RCTRL, KC_LEFT, KC_DOWN, KC_RGHT), +[1] = LAYOUT_all( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_VOLD, KC_MUTE, KC_VOLU, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MPRV, KC_MPLY, KC_MNXT, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______), + +[2] = LAYOUT_all( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______), + +[3] = LAYOUT_all( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______), + +}; \ No newline at end of file diff --git a/keyboards/maartenwut/eon87/keymaps/via/rules.mk b/keyboards/maartenwut/eon87/keymaps/via/rules.mk new file mode 100644 index 000000000000..36b7ba9cbc98 --- /dev/null +++ b/keyboards/maartenwut/eon87/keymaps/via/rules.mk @@ -0,0 +1,2 @@ +VIA_ENABLE = yes +LTO_ENABLE = yes diff --git a/keyboards/maartenwut/eon87/readme.md b/keyboards/maartenwut/eon87/readme.md new file mode 100644 index 000000000000..bfd5afd1a9b9 --- /dev/null +++ b/keyboards/maartenwut/eon87/readme.md @@ -0,0 +1,13 @@ +# Eon87 + +## Support +* Keyboard Maintainer: [Maarten Dekkers](https://github.com/maartenwut) +* Hardware Supported: Eon87 +* Hardware Availability: [maartenwut.com](https://maartenwut.com) + +## Build +Make example for this keyboard (after setting up your build environment): + + make maartenwut/eon87: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/eon87/rules.mk b/keyboards/maartenwut/eon87/rules.mk new file mode 100644 index 000000000000..65cfca7d4bb5 --- /dev/null +++ b/keyboards/maartenwut/eon87/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 = 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 = no # Commands for debug and configuration +# 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 + +LAYOUTS = tkl_ansi tkl_iso From 30fd69886dcf069a4e0d2c02ce18803500fcad2e Mon Sep 17 00:00:00 2001 From: Gregorio <38576492+ohchiko@users.noreply.github.com> Date: Thu, 18 Jun 2020 11:39:16 +0700 Subject: [PATCH 182/930] [Keyboard] Add Mixi (#9364) * [Keyboard] Add Mixi Co-authored-by: Ryan Co-authored-by: Ryan --- keyboards/mixi/config.h | 47 +++++++++ keyboards/mixi/info.json | 22 +++++ keyboards/mixi/keymaps/default/keymap.c | 116 +++++++++++++++++++++++ keyboards/mixi/keymaps/default/readme.md | 10 ++ keyboards/mixi/keymaps/via/keymap.c | 116 +++++++++++++++++++++++ keyboards/mixi/keymaps/via/rules.mk | 2 + keyboards/mixi/mixi.c | 13 +++ keyboards/mixi/mixi.h | 13 +++ keyboards/mixi/readme.md | 15 +++ keyboards/mixi/rules.mk | 27 ++++++ 10 files changed, 381 insertions(+) create mode 100644 keyboards/mixi/config.h create mode 100644 keyboards/mixi/info.json create mode 100644 keyboards/mixi/keymaps/default/keymap.c create mode 100644 keyboards/mixi/keymaps/default/readme.md create mode 100644 keyboards/mixi/keymaps/via/keymap.c create mode 100644 keyboards/mixi/keymaps/via/rules.mk create mode 100644 keyboards/mixi/mixi.c create mode 100644 keyboards/mixi/mixi.h create mode 100644 keyboards/mixi/readme.md create mode 100644 keyboards/mixi/rules.mk diff --git a/keyboards/mixi/config.h b/keyboards/mixi/config.h new file mode 100644 index 000000000000..cb89dd2cb0ae --- /dev/null +++ b/keyboards/mixi/config.h @@ -0,0 +1,47 @@ +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0x4752 +#define PRODUCT_ID 0x4D49 +#define DEVICE_VER 0x0001 +#define MANUFACTURER gregorio +#define PRODUCT Mixi +#define DESCRIPTION Mixi macropad by gregorio + +/* key matrix size */ +#define MATRIX_ROWS 3 +#define MATRIX_COLS 3 + +/* Keyboard Matrix Assignments */ +#define DIRECT_PINS { \ + { D1, D4, F4 }, \ + { D0, B4, F5 }, \ + { C6, F7, B6 } \ +} + +#define ENCODERS_PAD_A { F5 } +#define ENCODERS_PAD_B { F4 } + +/* 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 B5 +#ifdef RGB_DI_PIN +#define RGBLED_NUM 5 +#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 */ +#define RGBLIGHT_ANIMATIONS +#define RGBLIGHT_LAYERS +#define RGBLIGHT_LAYER_BLINK +#endif diff --git a/keyboards/mixi/info.json b/keyboards/mixi/info.json new file mode 100644 index 000000000000..123e23dc6be2 --- /dev/null +++ b/keyboards/mixi/info.json @@ -0,0 +1,22 @@ +{ + "keyboard_name": "Mixi", + "url": "https://tokopedia.com/sell-stuffs", + "maintainer": "ohchiko", + "width": 3, + "height": 3, + "layouts": { + "LAYOUT": { + "layout": [ + {"x":0, "y":0}, + {"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/mixi/keymaps/default/keymap.c b/keyboards/mixi/keymaps/default/keymap.c new file mode 100644 index 000000000000..806a7a924c19 --- /dev/null +++ b/keyboards/mixi/keymaps/default/keymap.c @@ -0,0 +1,116 @@ +#include QMK_KEYBOARD_H + +// please change this value to the desired layer definitions +#define LAYERNUM 3 + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + /* + * | Knob: Layer +/- | + * .---------------------------------------. + * | Mute | Play/Pause | Hold: Layer 2 | + * |----------|------------|---------------| + * | Previous | Up | Next | + * |----------|------------|---------------| + * | Left | Down | Right | + * '---------------------------------------' + */ + [0] = + LAYOUT( + KC_MUTE, KC_MPLY, MO(2), + KC_MNXT, KC_UP , KC_MPRV , + KC_LEFT, KC_DOWN , KC_RGHT + ), + + /* + * .-----------------------. + * | NUM 7 | NUM 8 | NUM 9 | + * |-------|-------|-------| + * | NUM 4 | NUM 5 | NUM 6 | + * |-------|-------|-------| + * | NUM 1 | NUM 2 | NUM 3 | + * '-----------------------' + */ + [1] = + LAYOUT( + KC_P7, KC_P8, KC_P8, + KC_P4, KC_P5, KC_P6, + KC_P1, KC_P2, KC_P3 + ), + + /* + * | Knob: Volume +/- | + * .--------------------------------------. + * | N/A | N/A | Hold: Layer 2 | + * |--------------|-------|---------------| + * | RESET EEPROM | RESET | DEBUG MODE | + * |--------------|-------|---------------| + * | N/A | N/A | N/A | + * '--------------------------------------' + */ + [2] = + LAYOUT( + KC_NO , KC_NO, KC_TRNS, + EEP_RST, RESET, DEBUG , + KC_NO , KC_NO, KC_NO + ) + +}; + +const rgblight_segment_t PROGMEM _base_layer[] = RGBLIGHT_LAYER_SEGMENTS( + {0, RGBLED_NUM, HSV_WHITE} + ); +const rgblight_segment_t PROGMEM _middle_layer[] = RGBLIGHT_LAYER_SEGMENTS( + {0, RGBLED_NUM, HSV_GREEN} + ); +const rgblight_segment_t PROGMEM _top_layer[] = RGBLIGHT_LAYER_SEGMENTS( + {0, RGBLED_NUM, HSV_RED} + ); + +const rgblight_segment_t* const PROGMEM _rgb_layers[] = +RGBLIGHT_LAYERS_LIST( + _base_layer, + _middle_layer, + _top_layer + ); + +void keyboard_post_init_user(void) { + rgblight_layers = _rgb_layers; +} + +layer_state_t layer_state_set_user(layer_state_t state) { + + switch (get_highest_layer(state)) { + case 0: + rgblight_blink_layer(0, 500); + break; + case 1: + rgblight_blink_layer(1, 500); + break; + case 2: + rgblight_blink_layer(2, 500); + break; + } + return state; +} + +uint8_t selected_layer = 0; +void encoder_update_user(uint8_t index, bool clockwise) { + if (index == 0) { + if (layer_state_is(2)) { + if (clockwise) { + tap_code(KC_VOLU); + } else { + tap_code(KC_VOLD); + } + } else { + if (clockwise && selected_layer < (LAYERNUM-2)) { /* Prevent switch to layer 2 using encoder */ + selected_layer++; + layer_move(selected_layer); + } else if (!clockwise && selected_layer > 0) { + selected_layer--; + layer_move(selected_layer); + } + } + } +} diff --git a/keyboards/mixi/keymaps/default/readme.md b/keyboards/mixi/keymaps/default/readme.md new file mode 100644 index 000000000000..863fa6f5d68d --- /dev/null +++ b/keyboards/mixi/keymaps/default/readme.md @@ -0,0 +1,10 @@ +![Mixi Layout Image](https://i.imgur.com/UIXj9O6.png) + +# Default Mixi Layout + +This is the default layout that comes flashed on every Mixi macropad. Layer 1 +and Layer 2 are accessible by rotating the encoder. Layer 3 is not accessible +by the encoder, instead is accessible by holding the [0,2] key on Layer 1. While +Layer 3 is active, rotating the encoder will results in increasing/decreasing +media volume. This layout is expected the encoder is on the left side or [0,0] +key. diff --git a/keyboards/mixi/keymaps/via/keymap.c b/keyboards/mixi/keymaps/via/keymap.c new file mode 100644 index 000000000000..806a7a924c19 --- /dev/null +++ b/keyboards/mixi/keymaps/via/keymap.c @@ -0,0 +1,116 @@ +#include QMK_KEYBOARD_H + +// please change this value to the desired layer definitions +#define LAYERNUM 3 + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + /* + * | Knob: Layer +/- | + * .---------------------------------------. + * | Mute | Play/Pause | Hold: Layer 2 | + * |----------|------------|---------------| + * | Previous | Up | Next | + * |----------|------------|---------------| + * | Left | Down | Right | + * '---------------------------------------' + */ + [0] = + LAYOUT( + KC_MUTE, KC_MPLY, MO(2), + KC_MNXT, KC_UP , KC_MPRV , + KC_LEFT, KC_DOWN , KC_RGHT + ), + + /* + * .-----------------------. + * | NUM 7 | NUM 8 | NUM 9 | + * |-------|-------|-------| + * | NUM 4 | NUM 5 | NUM 6 | + * |-------|-------|-------| + * | NUM 1 | NUM 2 | NUM 3 | + * '-----------------------' + */ + [1] = + LAYOUT( + KC_P7, KC_P8, KC_P8, + KC_P4, KC_P5, KC_P6, + KC_P1, KC_P2, KC_P3 + ), + + /* + * | Knob: Volume +/- | + * .--------------------------------------. + * | N/A | N/A | Hold: Layer 2 | + * |--------------|-------|---------------| + * | RESET EEPROM | RESET | DEBUG MODE | + * |--------------|-------|---------------| + * | N/A | N/A | N/A | + * '--------------------------------------' + */ + [2] = + LAYOUT( + KC_NO , KC_NO, KC_TRNS, + EEP_RST, RESET, DEBUG , + KC_NO , KC_NO, KC_NO + ) + +}; + +const rgblight_segment_t PROGMEM _base_layer[] = RGBLIGHT_LAYER_SEGMENTS( + {0, RGBLED_NUM, HSV_WHITE} + ); +const rgblight_segment_t PROGMEM _middle_layer[] = RGBLIGHT_LAYER_SEGMENTS( + {0, RGBLED_NUM, HSV_GREEN} + ); +const rgblight_segment_t PROGMEM _top_layer[] = RGBLIGHT_LAYER_SEGMENTS( + {0, RGBLED_NUM, HSV_RED} + ); + +const rgblight_segment_t* const PROGMEM _rgb_layers[] = +RGBLIGHT_LAYERS_LIST( + _base_layer, + _middle_layer, + _top_layer + ); + +void keyboard_post_init_user(void) { + rgblight_layers = _rgb_layers; +} + +layer_state_t layer_state_set_user(layer_state_t state) { + + switch (get_highest_layer(state)) { + case 0: + rgblight_blink_layer(0, 500); + break; + case 1: + rgblight_blink_layer(1, 500); + break; + case 2: + rgblight_blink_layer(2, 500); + break; + } + return state; +} + +uint8_t selected_layer = 0; +void encoder_update_user(uint8_t index, bool clockwise) { + if (index == 0) { + if (layer_state_is(2)) { + if (clockwise) { + tap_code(KC_VOLU); + } else { + tap_code(KC_VOLD); + } + } else { + if (clockwise && selected_layer < (LAYERNUM-2)) { /* Prevent switch to layer 2 using encoder */ + selected_layer++; + layer_move(selected_layer); + } else if (!clockwise && selected_layer > 0) { + selected_layer--; + layer_move(selected_layer); + } + } + } +} diff --git a/keyboards/mixi/keymaps/via/rules.mk b/keyboards/mixi/keymaps/via/rules.mk new file mode 100644 index 000000000000..36b7ba9cbc98 --- /dev/null +++ b/keyboards/mixi/keymaps/via/rules.mk @@ -0,0 +1,2 @@ +VIA_ENABLE = yes +LTO_ENABLE = yes diff --git a/keyboards/mixi/mixi.c b/keyboards/mixi/mixi.c new file mode 100644 index 000000000000..533cf3b88179 --- /dev/null +++ b/keyboards/mixi/mixi.c @@ -0,0 +1,13 @@ +#include "mixi.h" + +void eeconfig_init_kb(void) { +#ifdef RGBLIGHT_ENABLE + rgblight_enable(); // Enable RGB underglow by default +#ifdef RGBLIGHT_ANIMATIONS + rgblight_mode(RGBLIGHT_MODE_TWINKLE + 5); // Set to RGB_TWINKLE animation by default +#endif +#endif + + eeconfig_update_kb(0); + eeconfig_init_user(); +} diff --git a/keyboards/mixi/mixi.h b/keyboards/mixi/mixi.h new file mode 100644 index 000000000000..8b2bc7090bab --- /dev/null +++ b/keyboards/mixi/mixi.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 } \ +} diff --git a/keyboards/mixi/readme.md b/keyboards/mixi/readme.md new file mode 100644 index 000000000000..4c911db57086 --- /dev/null +++ b/keyboards/mixi/readme.md @@ -0,0 +1,15 @@ +# Mixi + +![Mixi](https://i.imgur.com/GPO6Khu.jpg) + +A mini 3x3 macropad with rotary encoders support and RGB underglow and also tray mount support. Currently the PCB and kits can only be purchased in Indonesia. + +* Keyboard Maintainer: [ohchiko](https://github.com/ohchiko) +* Hardware Supported: Mixi PCB, Arduino Pro Micro +* Hardware Availability: [Tokopedia/Sell Stuffs](https://tokopedia.com/sell-stuffs) (Indonesia only). + +Make example for this keyboard (after setting up your build environment): + + make mixi: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/mixi/rules.mk b/keyboards/mixi/rules.mk new file mode 100644 index 000000000000..99b1f1cbc5ed --- /dev/null +++ b/keyboards/mixi/rules.mk @@ -0,0 +1,27 @@ +# 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 = 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 +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow +ENCODER_ENABLE = yes +AUDIO_ENABLE = no From 67f374029df96bec9f5adc26e23a7d7e1139a129 Mon Sep 17 00:00:00 2001 From: unicorn855 Date: Thu, 18 Jun 2020 06:52:33 +0200 Subject: [PATCH 183/930] [Keyboard] added VIA support for HotDox (#9377) * added VIA support for HotDox * Update keyboards/hotdox/keymaps/via/keymap.c Thank you drashna :) Co-authored-by: Drashna Jaelre Co-authored-by: Drashna Jaelre --- keyboards/hotdox/config.h | 6 +- keyboards/hotdox/keymaps/via/config.h | 4 + keyboards/hotdox/keymaps/via/keymap.c | 210 ++++++++++++++++++++++++++ keyboards/hotdox/keymaps/via/rules.mk | 12 ++ 4 files changed, 229 insertions(+), 3 deletions(-) create mode 100644 keyboards/hotdox/keymaps/via/config.h create mode 100644 keyboards/hotdox/keymaps/via/keymap.c create mode 100644 keyboards/hotdox/keymaps/via/rules.mk diff --git a/keyboards/hotdox/config.h b/keyboards/hotdox/config.h index ed15f4bb4a49..db162a0f7aa4 100644 --- a/keyboards/hotdox/config.h +++ b/keyboards/hotdox/config.h @@ -3,12 +3,12 @@ #include "config_common.h" /* USB Device descriptor parameter */ -#define VENDOR_ID 0xFEED -#define PRODUCT_ID 0xE11D +#define VENDOR_ID 0x414B // 'AK' Alpaca Keyboards +#define PRODUCT_ID 0x0001 // sequentially numbered #define DEVICE_VER 0x0001 #define MANUFACTURER Z.P.Z.O. -#define PRODUCT HotDox +#define PRODUCT Alpaca Keyboards HotDox #define DESCRIPTION QMK keyboard firmware for HotDox /* key matrix size */ diff --git a/keyboards/hotdox/keymaps/via/config.h b/keyboards/hotdox/keymaps/via/config.h new file mode 100644 index 000000000000..2c143476a765 --- /dev/null +++ b/keyboards/hotdox/keymaps/via/config.h @@ -0,0 +1,4 @@ +#pragma once + +// place overrides here +#define DYNAMIC_KEYMAP_LAYER_COUNT 3 \ No newline at end of file diff --git a/keyboards/hotdox/keymaps/via/keymap.c b/keyboards/hotdox/keymaps/via/keymap.c new file mode 100644 index 000000000000..c90e4cbef305 --- /dev/null +++ b/keyboards/hotdox/keymaps/via/keymap.c @@ -0,0 +1,210 @@ +#include QMK_KEYBOARD_H +#include "version.h" + +//#define BASE 0 // default layer +//#define SYMB 1 // symbols +//#define MDIA 2 // media keys + +enum custom_keycodes { + VRSN = SAFE_RANGE, + RGB_SLD +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +/* Keymap 0: Basic layer + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * | = | 1 | 2 | 3 | 4 | 5 | LEFT | | RIGHT| 6 | 7 | 8 | 9 | 0 | - | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | Del | Q | W | E | R | T | L1 | | L1 | Y | U | I | O | P | \ | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | BkSp | A | S | D | F | G |------| |------| H | J | K | L |; / L2|' / Cmd | + * |--------+------+------+------+------+------| Hyper| | Meh |------+------+------+------+------+--------| + * | LShift |Z/Ctrl| X | C | V | B | | | | N | M | , | . |//Ctrl| RShift | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * |Grv/L1| '" |AltShf| Left | Right| | Up | Down | [ | ] | ~L1 | + * `----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * | App | LGui | | Alt |Ctrl/Esc| + * ,------|------|------| |------+--------+------. + * | | | Home | | PgUp | | | + * | Space|Backsp|------| |------| Tab |Enter | + * | |ace | End | | PgDn | | | + * `--------------------' `----------------------' + */ +// If it accepts an argument (i.e, is a function), it doesn't need KC_. +// Otherwise, it needs KC_* +[0] = LAYOUT_ergodox( // layer 0 : default + // left hand + KC_EQL, KC_1, KC_2, KC_3, KC_4, KC_5, KC_LEFT, + KC_DEL, KC_Q, KC_W, KC_E, KC_R, KC_T, TG(1), + KC_BSPC, KC_A, KC_S, KC_D, KC_F, KC_G, + KC_LSFT, CTL_T(KC_Z), KC_X, KC_C, KC_V, KC_B, ALL_T(KC_NO), + LT(1,KC_GRV),KC_QUOT, LALT(KC_LSFT), KC_LEFT,KC_RGHT, + ALT_T(KC_APP), KC_LGUI, + KC_HOME, + KC_SPC,KC_BSPC,KC_END, + // right hand + KC_RGHT, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, + TG(1), KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS, + KC_H, KC_J, KC_K, KC_L, LT(2, KC_SCLN),GUI_T(KC_QUOT), + MEH_T(KC_NO),KC_N, KC_M, KC_COMM,KC_DOT, CTL_T(KC_SLSH), KC_RSFT, + KC_UP, KC_DOWN,KC_LBRC,KC_RBRC, KC_FN1, + KC_LALT, CTL_T(KC_ESC), + KC_PGUP, + KC_PGDN,KC_TAB,KC_ENT + ), +/* Keymap 1: Symbol Layer + * + * ,---------------------------------------------------. ,--------------------------------------------------. + * |Version | F1 | F2 | F3 | F4 | F5 | | | | F6 | F7 | F8 | F9 | F10 | F11 | + * |---------+------+------+------+------+------+------| |------+------+------+------+------+------+--------| + * | | ! | @ | { | } | | | | | | Up | 7 | 8 | 9 | * | F12 | + * |---------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | # | $ | ( | ) | ` |------| |------| Down | 4 | 5 | 6 | + | | + * |---------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | % | ^ | [ | ] | ~ | | | | & | 1 | 2 | 3 | \ | | + * `---------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * | EEP_RST | | | | | | | . | 0 | = | | + * `-----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * |Animat| | |Toggle|Solid | + * ,------|------|------| |------+------+------. + * |Bright|Bright| | | |Hue- |Hue+ | + * |ness- |ness+ |------| |------| | | + * | | | | | | | | + * `--------------------' `--------------------' + */ +// SYMBOLS +[1] = LAYOUT_ergodox( + // left hand + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, + KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS, + KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, + KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, + KC_TRNS,KC_TRNS, + KC_TRNS, + KC_TRNS,KC_TRNS,KC_TRNS, + // right hand + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, + KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS +), +/* Keymap 2: Media and mouse keys + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * | | | | | | | | | | | | | | | | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | | | | MsUp | | | | | | | | | | | | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | |MsLeft|MsDown|MsRght| |------| |------| | | | | | Play | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | | | | | | | | | | | Prev | Next | | | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * | | | | Lclk | Rclk | |VolUp |VolDn | Mute | | | + * `----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * | | | | | | + * ,------|------|------| |------+------+------. + * | | | | | | |Brwser| + * | | |------| |------| |Back | + * | | | | | | | | + * `--------------------' `--------------------' + */ +// MEDIA AND MOUSE +[2] = LAYOUT_ergodox( + // left hand + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, + KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS, + KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, + KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, + KC_TRNS,KC_TRNS, + KC_TRNS, + KC_TRNS,KC_TRNS,KC_TRNS, + // right hand + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 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_ergodox( + // left hand + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, + KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS, + KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, + KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, + KC_TRNS,KC_TRNS, + KC_TRNS, + KC_TRNS,KC_TRNS,KC_TRNS, + // right hand + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 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) { + // dynamically generate these. + case VRSN: + if (record->event.pressed) { + SEND_STRING (QMK_KEYBOARD "/" QMK_KEYMAP " @ " QMK_VERSION); + } + return false; + break; + case RGB_SLD: + if (record->event.pressed) { + #ifdef RGBLIGHT_ENABLE + rgblight_mode(1); + #endif + } + return false; + break; + } + return true; +} + +// 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) { + + uint8_t layer = get_highest_layer(layer_state); + + ergodox_right_led_1_off(); + ergodox_right_led_2_off(); + ergodox_right_led_3_off(); + switch (layer) { + // TODO: Make this relevant to the ErgoDox EZ. + case 1: + ergodox_right_led_1_on(); + break; + case 2: + ergodox_right_led_2_on(); + break; + default: + // none + break; + } +}; diff --git a/keyboards/hotdox/keymaps/via/rules.mk b/keyboards/hotdox/keymaps/via/rules.mk new file mode 100644 index 000000000000..02752039c054 --- /dev/null +++ b/keyboards/hotdox/keymaps/via/rules.mk @@ -0,0 +1,12 @@ +VIA_ENABLE = yes +LTO_ENABLE = yes + +MOUSEKEY_ENABLE = no # Mouse keys +EXTRAKEY_ENABLE = no # Audio control and System control + +LEADER_ENABLE = no +FAUXCLICKY_ENABLE = no +MIDI_ENABLE = no +BLUETOOTH_ENABLE = no +KEY_LOCK_ENABLE = no +TERMINAL_ENABLE = no \ No newline at end of file From 3e27ceee4220a56ec35d5567773cf9cda4b22842 Mon Sep 17 00:00:00 2001 From: yiancar Date: Thu, 18 Jun 2020 06:16:26 +0100 Subject: [PATCH 184/930] [Keyboard] Nebula12 keyboard (#9397) Co-authored-by: Ryan Co-authored-by: Drashna Jaelre --- .../boards/ST_STM32F072B_DISCOVERY/board.c | 268 +++++ .../boards/ST_STM32F072B_DISCOVERY/board.h | 940 ++++++++++++++++++ .../boards/ST_STM32F072B_DISCOVERY/board.mk | 5 + .../ST_STM32F072B_DISCOVERY/cfg/board.chcfg | 703 +++++++++++++ keyboards/nebula12/bootloader_defs.h | 7 + keyboards/nebula12/chconf.h | 714 +++++++++++++ keyboards/nebula12/config.h | 169 ++++ keyboards/nebula12/halconf.h | 525 ++++++++++ keyboards/nebula12/info.json | 14 + keyboards/nebula12/keymaps/default/keymap.c | 42 + keyboards/nebula12/keymaps/default/readme.md | 7 + keyboards/nebula12/keymaps/via/keymap.c | 42 + keyboards/nebula12/keymaps/via/readme.md | 5 + keyboards/nebula12/keymaps/via/rules.mk | 1 + keyboards/nebula12/mcuconf.h | 176 ++++ keyboards/nebula12/nebula12.c | 20 + keyboards/nebula12/nebula12.h | 35 + keyboards/nebula12/readme.md | 32 + keyboards/nebula12/rules.mk | 34 + keyboards/wilba_tech/wt_rgb_backlight.c | 109 +- 20 files changed, 3839 insertions(+), 9 deletions(-) create mode 100644 keyboards/nebula12/boards/ST_STM32F072B_DISCOVERY/board.c create mode 100644 keyboards/nebula12/boards/ST_STM32F072B_DISCOVERY/board.h create mode 100644 keyboards/nebula12/boards/ST_STM32F072B_DISCOVERY/board.mk create mode 100644 keyboards/nebula12/boards/ST_STM32F072B_DISCOVERY/cfg/board.chcfg create mode 100644 keyboards/nebula12/bootloader_defs.h create mode 100644 keyboards/nebula12/chconf.h create mode 100755 keyboards/nebula12/config.h create mode 100644 keyboards/nebula12/halconf.h create mode 100755 keyboards/nebula12/info.json create mode 100755 keyboards/nebula12/keymaps/default/keymap.c create mode 100755 keyboards/nebula12/keymaps/default/readme.md create mode 100755 keyboards/nebula12/keymaps/via/keymap.c create mode 100755 keyboards/nebula12/keymaps/via/readme.md create mode 100755 keyboards/nebula12/keymaps/via/rules.mk create mode 100644 keyboards/nebula12/mcuconf.h create mode 100755 keyboards/nebula12/nebula12.c create mode 100755 keyboards/nebula12/nebula12.h create mode 100755 keyboards/nebula12/readme.md create mode 100755 keyboards/nebula12/rules.mk diff --git a/keyboards/nebula12/boards/ST_STM32F072B_DISCOVERY/board.c b/keyboards/nebula12/boards/ST_STM32F072B_DISCOVERY/board.c new file mode 100644 index 000000000000..7c09bd997cb1 --- /dev/null +++ b/keyboards/nebula12/boards/ST_STM32F072B_DISCOVERY/board.c @@ -0,0 +1,268 @@ +/* + 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. + 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" +#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; + +/** + * @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 + {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_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. */ +/*===========================================================================*/ + +/** + * @brief Early initialization code. + * @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. + */ +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) { + SYSCFG->CFGR1 |= SYSCFG_CFGR1_I2C1_DMA_RMP; + SYSCFG->CFGR1 &= ~(SYSCFG_CFGR1_SPI2_DMA_RMP); +} diff --git a/keyboards/nebula12/boards/ST_STM32F072B_DISCOVERY/board.h b/keyboards/nebula12/boards/ST_STM32F072B_DISCOVERY/board.h new file mode 100644 index 000000000000..57636d1f12f5 --- /dev/null +++ b/keyboards/nebula12/boards/ST_STM32F072B_DISCOVERY/board.h @@ -0,0 +1,940 @@ +/* + 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 + +/*===========================================================================*/ +/* Driver constants. */ +/*===========================================================================*/ + +/* + * Setup for ST STM32F072B-Discovery board. + */ + +/* + * Board identifier. + */ +#define BOARD_ST_STM32F072B_DISCOVERY +#define BOARD_NAME "ST STM32F072B-Discovery" + +/* + * Board oscillators-related settings. + * NOTE: HSE not fitted. + */ +#if !defined(STM32_LSECLK) +#define STM32_LSECLK 32768 +#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) + +/*===========================================================================*/ +/* 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. + * 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)) + +/*===========================================================================*/ +/* External declarations. */ +/*===========================================================================*/ + +#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/nebula12/boards/ST_STM32F072B_DISCOVERY/board.mk b/keyboards/nebula12/boards/ST_STM32F072B_DISCOVERY/board.mk new file mode 100644 index 000000000000..b98dcdd26c6a --- /dev/null +++ b/keyboards/nebula12/boards/ST_STM32F072B_DISCOVERY/board.mk @@ -0,0 +1,5 @@ +# List of all the board related files. +BOARDSRC = $(BOARD_PATH)/boards/ST_STM32F072B_DISCOVERY/board.c + +# Required include directories +BOARDINC = $(BOARD_PATH)/boards/ST_STM32F072B_DISCOVERY diff --git a/keyboards/nebula12/boards/ST_STM32F072B_DISCOVERY/cfg/board.chcfg b/keyboards/nebula12/boards/ST_STM32F072B_DISCOVERY/cfg/board.chcfg new file mode 100644 index 000000000000..9c7cf4fd76a3 --- /dev/null +++ b/keyboards/nebula12/boards/ST_STM32F072B_DISCOVERY/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/nebula12/bootloader_defs.h b/keyboards/nebula12/bootloader_defs.h new file mode 100644 index 000000000000..02c48c4e6dcb --- /dev/null +++ b/keyboards/nebula12/bootloader_defs.h @@ -0,0 +1,7 @@ +/* Address for jumping to bootloader on STM32 chips. */ +/* 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 + */ +#define STM32_BOOTLOADER_ADDRESS 0x1FFFC800 diff --git a/keyboards/nebula12/chconf.h b/keyboards/nebula12/chconf.h new file mode 100644 index 000000000000..03f63da36a88 --- /dev/null +++ b/keyboards/nebula12/chconf.h @@ -0,0 +1,714 @@ +/* + 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. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +/** + * @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. + * + * @addtogroup config + * @details Kernel related settings and hooks. + * @{ + */ + +#ifndef CHCONF_H +#define CHCONF_H + +#define _CHIBIOS_RT_CONF_ +#define _CHIBIOS_RT_CONF_VER_6_0_ + +/*===========================================================================*/ +/** + * @name System timers settings + * @{ + */ +/*===========================================================================*/ + +/** + * @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. + * @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. + */ +#if !defined(CH_CFG_ST_TIMEDELTA) +#define CH_CFG_ST_TIMEDELTA 2 +#endif + +/** @} */ + +/*===========================================================================*/ +/** + * @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. + */ +#if !defined(CH_CFG_TIME_QUANTUM) +#define CH_CFG_TIME_QUANTUM 0 +#endif + +/** + * @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. + */ +#if !defined(CH_CFG_MEMCORE_SIZE) +#define CH_CFG_MEMCORE_SIZE 0 +#endif + +/** + * @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. + */ +#if !defined(CH_CFG_NO_IDLE_THREAD) +#define CH_CFG_NO_IDLE_THREAD FALSE +#endif + +/** @} */ + +/*===========================================================================*/ +/** + * @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. + */ +#if !defined(CH_CFG_OPTIMIZE_SPEED) +#define CH_CFG_OPTIMIZE_SPEED FALSE +#endif + +/** @} */ + +/*===========================================================================*/ +/** + * @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. + */ +#if !defined(CH_CFG_USE_TM) +#define CH_CFG_USE_TM FALSE +#endif + +/** + * @brief Threads registry APIs. + * @details If enabled then the registry APIs are included in the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_REGISTRY) +#define CH_CFG_USE_REGISTRY TRUE +#endif + +/** + * @brief Threads synchronization APIs. + * @details If enabled then the @p chThdWait() function is included in + * the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_WAITEXIT) +#define CH_CFG_USE_WAITEXIT TRUE +#endif + +/** + * @brief Semaphores APIs. + * @details If enabled then the Semaphores APIs are included in the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_SEMAPHORES) +#define CH_CFG_USE_SEMAPHORES TRUE +#endif + +/** + * @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. + */ +#if !defined(CH_CFG_USE_SEMAPHORES_PRIORITY) +#define CH_CFG_USE_SEMAPHORES_PRIORITY FALSE +#endif + +/** + * @brief Mutexes APIs. + * @details If enabled then the mutexes APIs are included in the kernel. + * + * @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. + * @note Recursive mutexes are heavier and have an increased + * memory footprint. + * + * @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. + * @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. + */ +#if !defined(CH_CFG_USE_CONDVARS) +#define CH_CFG_USE_CONDVARS TRUE +#endif + +/** + * @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. + */ +#if !defined(CH_CFG_USE_CONDVARS_TIMEOUT) +#define CH_CFG_USE_CONDVARS_TIMEOUT FALSE +#endif + +/** + * @brief Events Flags APIs. + * @details If enabled then the event flags APIs are included in the kernel. + * + * @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. + * @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. + */ +#if !defined(CH_CFG_USE_EVENTS_TIMEOUT) +#define CH_CFG_USE_EVENTS_TIMEOUT TRUE +#endif + +/** + * @brief Synchronous Messages APIs. + * @details If enabled then the synchronous messages APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_MESSAGES) +#define CH_CFG_USE_MESSAGES TRUE +#endif + +/** + * @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. + */ +#if !defined(CH_CFG_USE_MESSAGES_PRIORITY) +#define CH_CFG_USE_MESSAGES_PRIORITY FALSE +#endif + +/** + * @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. + */ +#if !defined(CH_CFG_USE_MAILBOXES) +#define CH_CFG_USE_MAILBOXES TRUE +#endif + +/** + * @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. + */ +#if !defined(CH_CFG_USE_MEMCORE) +#define CH_CFG_USE_MEMCORE TRUE +#endif + +/** + * @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. + */ +#if !defined(CH_CFG_USE_HEAP) +#define CH_CFG_USE_HEAP FALSE +#endif + +/** + * @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. + */ +#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. + * @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. + */ +#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 + +/** @} */ + +/*===========================================================================*/ +/** + * @name Debug options + * @{ + */ +/*===========================================================================*/ + +/** + * @brief Debug option, kernel statistics. + * + * @note The default is @p FALSE. + */ +#if !defined(CH_DBG_STATISTICS) +#define CH_DBG_STATISTICS FALSE +#endif + +/** + * @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. + */ +#if !defined(CH_DBG_SYSTEM_STATE_CHECK) +#define CH_DBG_SYSTEM_STATE_CHECK FALSE +#endif + +/** + * @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. + */ +#if !defined(CH_DBG_ENABLE_CHECKS) +#define CH_DBG_ENABLE_CHECKS FALSE +#endif + +/** + * @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. + */ +#if !defined(CH_DBG_ENABLE_ASSERTS) +#define CH_DBG_ENABLE_ASSERTS FALSE +#endif + +/** + * @brief Debug option, trace buffer. + * @details If enabled then the trace buffer is activated. + * + * @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. + * @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. + */ +#if !defined(CH_DBG_ENABLE_STACK_CHECK) +#define CH_DBG_ENABLE_STACK_CHECK FALSE +#endif + +/** + * @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. + */ +#if !defined(CH_DBG_FILL_THREADS) +#define CH_DBG_FILL_THREADS FALSE +#endif + +/** + * @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. + */ +#if !defined(CH_DBG_THREADS_PROFILING) +#define CH_DBG_THREADS_PROFILING FALSE +#endif + +/** @} */ + +/*===========================================================================*/ +/** + * @name Kernel hooks + * @{ + */ +/*===========================================================================*/ + +/** + * @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. + */ +#define CH_CFG_THREAD_EXTRA_FIELDS \ + /* Add threads custom fields here.*/ + +/** + * @brief Threads initialization hook. + * @details User initialization code added to the @p _thread_init() function. + * + * @note It is invoked from within @p _thread_init() 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/nebula12/config.h b/keyboards/nebula12/config.h new file mode 100755 index 000000000000..8b460a87af05 --- /dev/null +++ b/keyboards/nebula12/config.h @@ -0,0 +1,169 @@ +/* +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 0x5337 +#define DEVICE_VER 0x0001 +#define MANUFACTURER Yiancar-Designs +#define PRODUCT NEBULA12 +#define DESCRIPTION "A 12-key, tool-free RGB keyboard" + +/* key matrix size */ +#define MATRIX_ROWS 4 +#define MATRIX_COLS 3 + +#define MATRIX_ROW_PINS { A8, C15, A0, A1 } +#define MATRIX_COL_PINS { A9, C13, C14 } +// To enable debugger set A13 A14 -> A5 A7 + +/* COL2ROW, ROW2COL*/ +#define DIODE_DIRECTION COL2ROW + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCE 5 + +/* Setting up 400KHz I2C Clock for a 48MHz system clock */ +#define I2C1_SCL_PAL_MODE 1 +#define I2C1_SDA_PAL_MODE 1 +#define I2C1_TIMINGR_SCLDEL 3U +#define I2C1_TIMINGR_SDADEL 1U +#define I2C1_TIMINGR_SCLH 3U +#define I2C1_TIMINGR_SCLL 9U + +/* 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. + * + */ + +#define WS2812_SPI SPID2 // default: SPID1 +#define WS2812_SPI_MOSI_PAL_MODE 0 // Pin "alternate function", see the respective datasheet for the appropriate values for your MCU. default: 5 + +#define RGB_DI_PIN B15 +#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 */ + #define RGBLIGHT_ANIMATIONS +#endif + +/* Bootmagic Lite key configuration */ +#define BOOTMAGIC_LITE_ROW 0 +#define BOOTMAGIC_LITE_COLUMN 0 + +/* Backlight options */ + +#define RGB_BACKLIGHT_ENABLED 1 + +#define RGB_BACKLIGHT_NEBULA12 + +// they aren't really used if RGB_BACKLIGHT_NEBULA65 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 1 +#define DRIVER_LED_TOTAL 16 + +// 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 0b0000000000000000 +#define RGB_BACKLIGHT_ALPHAS_MODS_ROW_1 0b0000000000000000 +#define RGB_BACKLIGHT_ALPHAS_MODS_ROW_2 0b0000000000000000 +#define RGB_BACKLIGHT_ALPHAS_MODS_ROW_3 0b0000000000000000 +#define RGB_BACKLIGHT_ALPHAS_MODS_ROW_4 0b0000000000000000 + +#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 32 + +// VIA lighting is handled by the keyboard-level code +#define VIA_CUSTOM_LIGHTING_ENABLE +#define VIA_QMK_RGBLIGHT_ENABLE diff --git a/keyboards/nebula12/halconf.h b/keyboards/nebula12/halconf.h new file mode 100644 index 000000000000..b5b151ee26a2 --- /dev/null +++ b/keyboards/nebula12/halconf.h @@ -0,0 +1,525 @@ +/* + 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. + 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 + +#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 +#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 cryptographic subsystem. + */ +#if !defined(HAL_USE_CRY) || defined(__DOXYGEN__) +#define HAL_USE_CRY FALSE +#endif + +/** + * @brief Enables the DAC subsystem. + */ +#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 +#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 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 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 +#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 +#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 + +/** + * @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. */ +/*===========================================================================*/ + +/** + * @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 + +/** + * @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. */ +/*===========================================================================*/ + +/** + * @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 the zero-copy API. + */ +#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 + +/** + * @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. */ +/*===========================================================================*/ + +/** + * @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 16 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 256 bytes for both the transmission and receive + * buffers. + */ +#if !defined(SERIAL_USB_BUFFERS_SIZE) || defined(__DOXYGEN__) +#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 + +/*===========================================================================*/ +/* 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 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 +#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. */ +/*===========================================================================*/ + +/** + * @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 + +/*===========================================================================*/ +/* 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/nebula12/info.json b/keyboards/nebula12/info.json new file mode 100755 index 000000000000..16d04fa86a56 --- /dev/null +++ b/keyboards/nebula12/info.json @@ -0,0 +1,14 @@ +{ + "keyboard_name": "NEBULA12", + "url": "", + "maintainer": "yiancar", + "width": 3, + "height": 4, + "layouts": { + "LAYOUT_68_ansi": { + "layout": [ + {"x":0, "y":0}, {"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}, {"x":0, "y":3}, {"x":1, "y":3}, {"x":2, "y":3} + ] + } + } +} diff --git a/keyboards/nebula12/keymaps/default/keymap.c b/keyboards/nebula12/keymaps/default/keymap.c new file mode 100755 index 000000000000..670d25e732a6 --- /dev/null +++ b/keyboards/nebula12/keymaps/default/keymap.c @@ -0,0 +1,42 @@ +/* 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_P7, KC_P8, KC_P9, + KC_P4, KC_P5, KC_P6, + KC_P1, KC_P2, KC_P3, + MO(1), KC_P0, KC_PDOT), + +[1] = LAYOUT_all( /* FN */ + RGB_TOG, RGB_MOD, KC_TRNS, + EF_DEC, EF_INC, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_PENT), + +[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), + +[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), +}; diff --git a/keyboards/nebula12/keymaps/default/readme.md b/keyboards/nebula12/keymaps/default/readme.md new file mode 100755 index 000000000000..706ec9f3bf7b --- /dev/null +++ b/keyboards/nebula12/keymaps/default/readme.md @@ -0,0 +1,7 @@ +# The default keymap for Nebula12. VIA support disabled. + +![Layer 0](https://i.imgur.com/CoMteJW.png) + +![Layer 1](https://i.imgur.com/LbIPiJj.png) + +The full RGB control does not fit due to the small number of keys. Using VIA might be a good idea! diff --git a/keyboards/nebula12/keymaps/via/keymap.c b/keyboards/nebula12/keymaps/via/keymap.c new file mode 100755 index 000000000000..670d25e732a6 --- /dev/null +++ b/keyboards/nebula12/keymaps/via/keymap.c @@ -0,0 +1,42 @@ +/* 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_P7, KC_P8, KC_P9, + KC_P4, KC_P5, KC_P6, + KC_P1, KC_P2, KC_P3, + MO(1), KC_P0, KC_PDOT), + +[1] = LAYOUT_all( /* FN */ + RGB_TOG, RGB_MOD, KC_TRNS, + EF_DEC, EF_INC, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_PENT), + +[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), + +[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), +}; diff --git a/keyboards/nebula12/keymaps/via/readme.md b/keyboards/nebula12/keymaps/via/readme.md new file mode 100755 index 000000000000..7023515d770d --- /dev/null +++ b/keyboards/nebula12/keymaps/via/readme.md @@ -0,0 +1,5 @@ +# The default keymap for Nebula12. VIA support enabled. + +![Layer 0](https://i.imgur.com/CoMteJW.png) + +![Layer 1](https://i.imgur.com/LbIPiJj.png) diff --git a/keyboards/nebula12/keymaps/via/rules.mk b/keyboards/nebula12/keymaps/via/rules.mk new file mode 100755 index 000000000000..1e5b99807cb7 --- /dev/null +++ b/keyboards/nebula12/keymaps/via/rules.mk @@ -0,0 +1 @@ +VIA_ENABLE = yes diff --git a/keyboards/nebula12/mcuconf.h b/keyboards/nebula12/mcuconf.h new file mode 100644 index 000000000000..a414763ed1d0 --- /dev/null +++ b/keyboards/nebula12/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 TRUE +#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 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 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/nebula12/nebula12.c b/keyboards/nebula12/nebula12.c new file mode 100755 index 000000000000..6deecb8f47f4 --- /dev/null +++ b/keyboards/nebula12/nebula12.c @@ -0,0 +1,20 @@ +/* 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 . + */ +#ifndef RGB_BACKLIGHT_NEBULA12 +#error RGB_BACKLIGHT_NEBULA12 not defined, recheck config.h +#endif + +#include "nebula12.h" diff --git a/keyboards/nebula12/nebula12.h b/keyboards/nebula12/nebula12.h new file mode 100755 index 000000000000..1c73fbdaeccc --- /dev/null +++ b/keyboards/nebula12/nebula12.h @@ -0,0 +1,35 @@ +/* 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 + +#define XXX KC_NO + +#include "quantum.h" +#include "../wilba_tech/wt_rgb_backlight_keycodes.h" + +// This a shortcut to help you visually see your layout. + +#define LAYOUT_all( \ + K00, K01, K02, \ + K10, K11, K12, \ + K20, K21, K22, \ + K30, K31, K32 \ +) { \ + { K00, K01, K02, }, \ + { K10, K11, K12, }, \ + { K20, K21, K22, }, \ + { K30, K31, K32, } \ +} diff --git a/keyboards/nebula12/readme.md b/keyboards/nebula12/readme.md new file mode 100755 index 000000000000..3a68d0a97d18 --- /dev/null +++ b/keyboards/nebula12/readme.md @@ -0,0 +1,32 @@ +# Nebula65 + +This is a standard fixed layout 12 key PCB. It supports VIA, full per-key RGB and underglow RGB. + +* Keyboard Maintainer: [Yiancar](http://yiancar-designs.com/) and on [GitHub](https://github.com/yiancar) +* Hardware Supported: A 65% keyboard with STM32F072CB +* Hardware Availability: https://spaceholdings.net/ + +## Instructions + +### Build + +Make example for this keyboard (after setting up your build environment): + + make nebula12: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). + +### Reset + +- Unplug +- Hold Escape +- Plug In +- Unplug +- Release Escape + +### Flash + +- Unplug +- Hold Escape +- Plug In +- Flash using QMK Toolbox or dfu-util (`make nebula12::dfu-util`) diff --git a/keyboards/nebula12/rules.mk b/keyboards/nebula12/rules.mk new file mode 100755 index 000000000000..c897d9ddaac2 --- /dev/null +++ b/keyboards/nebula12/rules.mk @@ -0,0 +1,34 @@ +# MCU name +MCU = STM32F072 + +BOARD = ST_STM32F072B_DISCOVERY + +# 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 +RGBLIGHT_ENABLE = yes # Underglow RGB +WS2812_DRIVER = spi # Underglow RGB Driver + +CIE1931_CURVE = yes + +# project specific files +SRC += keyboards/wilba_tech/wt_main.c \ + keyboards/wilba_tech/wt_rgb_backlight.c \ + drivers/issi/is31fl3731.c \ + quantum/color.c +QUANTUM_LIB_SRC += drivers/chibios/i2c_master.c diff --git a/keyboards/wilba_tech/wt_rgb_backlight.c b/keyboards/wilba_tech/wt_rgb_backlight.c index 221d924c4c4c..e2506bf3f90d 100644 --- a/keyboards/wilba_tech/wt_rgb_backlight.c +++ b/keyboards/wilba_tech/wt_rgb_backlight.c @@ -21,6 +21,7 @@ defined(RGB_BACKLIGHT_KOYU) || \ defined(RGB_BACKLIGHT_HS60) || \ defined(RGB_BACKLIGHT_NK65) || \ + defined(RGB_BACKLIGHT_NEBULA12) || \ defined(RGB_BACKLIGHT_NEBULA65) || \ defined(RGB_BACKLIGHT_U80_A) || \ defined(RGB_BACKLIGHT_DAWN60) || \ @@ -44,7 +45,7 @@ #include "wt_rgb_backlight_api.h" #include "wt_rgb_backlight_keycodes.h" -#if !defined(RGB_BACKLIGHT_HS60) && !defined(RGB_BACKLIGHT_NK65) && !defined(RGB_BACKLIGHT_NEBULA65) +#if !defined(RGB_BACKLIGHT_HS60) && !defined(RGB_BACKLIGHT_NK65) && !defined(RGB_BACKLIGHT_NEBULA65) && !defined(RGB_BACKLIGHT_NEBULA12) #include #include "drivers/avr/i2c_master.h" #else @@ -84,6 +85,8 @@ LED_TYPE g_ws2812_leds[WS2812_LED_TOTAL]; #define BACKLIGHT_LED_COUNT 108 #elif defined(RGB_BACKLIGHT_DAWN60) #define BACKLIGHT_LED_COUNT 84 //64 + 20 +#elif defined(RGB_BACKLIGHT_NEBULA12) +#define BACKLIGHT_LED_COUNT 16 #else #define BACKLIGHT_LED_COUNT 72 #endif @@ -358,6 +361,36 @@ const is31_led g_is31_leds[DRIVER_LED_TOTAL] = { {1, K_16, J_16, L_16}, //LB64 }; +#elif defined(RGB_BACKLIGHT_NEBULA12) +// 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 + +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 +}; + #elif defined(RGB_BACKLIGHT_U80_A) // U80-A prototype uses 3 ISSI drivers @@ -928,6 +961,21 @@ const Point g_map_led_to_point_polar[BACKLIGHT_LED_COUNT] PROGMEM = { //LA62..LB5 {221,255}, {225,255}, {229,255}, {22,255}, {12,255}, {244,255}, {234,255}, {255,255} }; + +#elif defined(RGB_BACKLIGHT_NEBULA12) +const Point g_map_led_to_point[BACKLIGHT_LED_COUNT] PROGMEM = { + // A1..A16 + {0,0}, {16,0}, {32,0}, {0,16}, {16,16}, {32,16}, {0,32}, {16,32}, + {255,255}, {255,255}, {255,255}, {255,255}, + {32,48}, {16,48}, {0,48}, {32,32} +}; +const Point g_map_led_to_point_polar[BACKLIGHT_LED_COUNT] PROGMEM = { + // A1..A16 + {72,197}, {64,194}, {56,197}, {85,74}, {64,64}, {43,74}, {171,74}, {192,64}, + {255,255}, {255,255}, {255,255}, {255,255}, + {200,196}, {192,192}, {184,196}, {213,74} +}; + #elif defined(RGB_BACKLIGHT_NEBULA65) const Point g_map_led_to_point[BACKLIGHT_LED_COUNT] PROGMEM = { // LA1..LA60 @@ -951,6 +999,7 @@ const Point g_map_led_to_point_polar[BACKLIGHT_LED_COUNT] PROGMEM = { //LA62..LB5 {207,255}, {213,255}, {218,255}, {35,255}, {21,255}, {19,255}, {224,255}, {32,255} }; + #elif defined(RGB_BACKLIGHT_M6_B) // M6-B is really simple: // 0 3 5 @@ -1018,7 +1067,7 @@ void map_led_to_point( uint8_t index, Point *point ) point->x = pgm_read_byte(addr); point->y = pgm_read_byte(addr+1); -#if defined(RGB_BACKLIGHT_M6_B) || defined(RGB_BACKLIGHT_HS60) || defined(RGB_BACKLIGHT_NK65) || defined(RGB_BACKLIGHT_NEBULA65) +#if defined(RGB_BACKLIGHT_M6_B) || defined(RGB_BACKLIGHT_HS60) || defined(RGB_BACKLIGHT_NK65) || defined(RGB_BACKLIGHT_NEBULA65) || defined(RGB_BACKLIGHT_NEBULA12) return; #endif @@ -1219,6 +1268,18 @@ const uint8_t g_map_row_column_to_led[MATRIX_ROWS][MATRIX_COLS] PROGMEM = { { 4-1, 255, 8-1, 12-1, 16-1, 20-1, 24-1, 28-1, 32-1, 36-1, 40-1, 44-1, 51-1, 52-1, 3+64-1 }, { 57-1, 58-1, 59-1, 255, 255, 255, 60-1, 255, 255, 48-1, 62-1, 63-1, 64-1, 56-1, 4+64-1 } }; +#elif defined(RGB_BACKLIGHT_NEBULA12) +// +// A1, A2, A3, +// A4, A5, A6, +// A7, A8, A16, +// A15, A14, A13, +const uint8_t g_map_row_column_to_led[MATRIX_ROWS][MATRIX_COLS] PROGMEM = { + { 1-1, 2-1, 3-1 }, + { 4-1, 5-1, 6-1 }, + { 7-1, 8-1, 16-1 }, + { 15-1, 14-1, 13-1 } +}; #elif defined(RGB_BACKLIGHT_M6_B) // M6-B is really simple: // 0 3 5 @@ -1263,6 +1324,9 @@ void backlight_update_pwm_buffers(void) IS31FL3733_update_pwm_buffers( ISSI_ADDR_2, 1 ); IS31FL3733_update_led_control_registers( ISSI_ADDR_1, 0 ); IS31FL3733_update_led_control_registers( ISSI_ADDR_2, 1 ); +#elif defined(RGB_BACKLIGHT_NEBULA12) + IS31FL3731_update_pwm_buffers( ISSI_ADDR_1, 0 ); + IS31FL3731_update_led_control_registers( ISSI_ADDR_1, 0 ); #elif defined(RGB_BACKLIGHT_U80_A) static uint8_t driver = 0; switch ( driver ) @@ -1340,7 +1404,7 @@ void backlight_set_key_hit(uint8_t row, uint8_t column) g_any_key_hit = 0; } -#if !defined(RGB_BACKLIGHT_HS60) && !defined(RGB_BACKLIGHT_NK65) && !defined(RGB_BACKLIGHT_NEBULA65) +#if !defined(RGB_BACKLIGHT_HS60) && !defined(RGB_BACKLIGHT_NK65) && !defined(RGB_BACKLIGHT_NEBULA65) && !defined(RGB_BACKLIGHT_NEBULA12) // This is (F_CPU/1024) / 20 Hz // = 15625 Hz / 20 Hz // = 781 @@ -1376,6 +1440,28 @@ void backlight_timer_disable(void) { TIMSK3 &= ~_BV(OCIE3A); } +#elif defined(RGB_BACKLIGHT_NEBULA12) //STM32, use GPT with TIM3. Enable in halconf.h +static void gpt_backlight_timer_task(GPTDriver *gptp); +// Timer setup at 200Khz, callback at 10k ticks = 20Hz +static GPTConfig gpt3cfg1 = { + .frequency = 200000U, + .callback = gpt_backlight_timer_task +}; + +void backlight_timer_init(void) +{ + gptStart(&GPTD3, &gpt3cfg1); +} + +void backlight_timer_enable(void) +{ + gptStartContinuous(&GPTD3, 10000); +} + +void backlight_timer_disable(void) +{ + gptStopTimer(&GPTD3); +} #else //STM32, use GPT with TIM4. Enable in halconf.h static void gpt_backlight_timer_task(GPTDriver *gptp); // Timer setup at 200Khz, callback at 10k ticks = 20Hz @@ -1398,7 +1484,7 @@ void backlight_timer_disable(void) { gptStopTimer(&GPTD4); } -#endif //!defined(RGB_BACKLIGHT_HS60) && !defined(RGB_BACKLIGHT_NK65) +#endif //!defined(RGB_BACKLIGHT_HS60) && !defined(RGB_BACKLIGHT_NK65) && !defined(RGB_BACKLIGHT_NEBULA12) void backlight_set_suspend_state(bool state) { @@ -1635,7 +1721,7 @@ void backlight_effect_cycle_all(void) for ( int i=0; i= 9-1 && index <= 12-1 ) ); // A9-A12 #endif // This only caches it for later IS31FL3731_set_led_control_register( index, enabled, enabled, enabled ); } // This actually updates the LED drivers IS31FL3731_update_led_control_registers( ISSI_ADDR_1, 0 ); +#if !defined(RGB_BACKLIGHT_NEBULA12) IS31FL3731_update_led_control_registers( ISSI_ADDR_2, 1 ); +#endif #if defined(RGB_BACKLIGHT_U80_A) IS31FL3731_update_led_control_registers( ISSI_ADDR_3, 2 ); #endif From 43b6f031b184432eba647f04bc69ced72ee2dd08 Mon Sep 17 00:00:00 2001 From: Pierre Chevalier Date: Thu, 18 Jun 2020 06:18:16 +0100 Subject: [PATCH 185/930] [Keymap] Add pierrec83's Kyria keymap (#9401) --- keyboards/kyria/keymaps/pierrec83/config.h | 65 +++++++++++++++++++ keyboards/kyria/keymaps/pierrec83/encoders.c | 63 ++++++++++++++++++ keyboards/kyria/keymaps/pierrec83/keymap.c | 18 +++++ keyboards/kyria/keymaps/pierrec83/keymap.json | 1 + keyboards/kyria/keymaps/pierrec83/layers.h | 7 ++ keyboards/kyria/keymaps/pierrec83/readme.md | 44 +++++++++++++ keyboards/kyria/keymaps/pierrec83/rules.mk | 5 ++ 7 files changed, 203 insertions(+) create mode 100644 keyboards/kyria/keymaps/pierrec83/config.h create mode 100644 keyboards/kyria/keymaps/pierrec83/encoders.c create mode 100644 keyboards/kyria/keymaps/pierrec83/keymap.c create mode 100644 keyboards/kyria/keymaps/pierrec83/keymap.json create mode 100644 keyboards/kyria/keymaps/pierrec83/layers.h create mode 100644 keyboards/kyria/keymaps/pierrec83/readme.md create mode 100644 keyboards/kyria/keymaps/pierrec83/rules.mk diff --git a/keyboards/kyria/keymaps/pierrec83/config.h b/keyboards/kyria/keymaps/pierrec83/config.h new file mode 100644 index 000000000000..eb222c0d7ae7 --- /dev/null +++ b/keyboards/kyria/keymaps/pierrec83/config.h @@ -0,0 +1,65 @@ +/* Copyright 2020 Pierre Chevalier + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#pragma once + +#ifdef OLED_DRIVER_ENABLE + #define OLED_DISPLAY_128X64 +#endif + +#ifdef RGBLIGHT_ENABLE + #define RGBLIGHT_ANIMATIONS + #define RGBLIGHT_HUE_STEP 8 + #define RGBLIGHT_SAT_STEP 8 + #define RGBLIGHT_VAL_STEP 8 +#endif + +#ifdef ENCODER_ENABLE + #define ENCODER_DIRECTION_FLIP + #define ENCODER_RESOLUTION 2 +#endif + +#define TAPPING_TERM 200 +#define PERMISSIVE_HOLD +#define IGNORE_MOD_TAP_INTERRUPT +#define TAPPING_FORCE_HOLD +// 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 + +// Allows media codes to properly register in macros and rotary encoder code +#define TAP_CODE_DELAY 10 + +// If you are using an Elite C rev3 on the slave side, uncomment the lines below: +// #define SPLIT_USB_DETECT +// #define NO_USB_STARTUP_CHECK + +// Set the mouse settings to a comfortable speed/accuracy trade-off +// Assume the screen refresh rate is 60 Htz or higher +// The default is 50. This makes the mouse ~3 times faster and more accurate +#define MOUSEKEY_INTERVAL 16 +// The default is 20. Since we made the mouse about 3 times faster with the previous setting, +// give it more time to accelerate to max speed to retain precise control over short distances. +#define MOUSEKEY_TIME_TO_MAX 40 +// The default is 300. Let's try and make this as low as possible while keeping the cursor responsive +#define MOUSEKEY_DELAY 100 +// It makes sense to use the same delay for the mouseweel +#define MOUSEKEY_WHEEL_DELAY 100 +// The default is 100 +#define MOUSEKEY_WHEEL_INTERVAL 50 +// The default is 40 +#define MOUSEKEY_WHEEL_TIME_TO_MAX 100 + diff --git a/keyboards/kyria/keymaps/pierrec83/encoders.c b/keyboards/kyria/keymaps/pierrec83/encoders.c new file mode 100644 index 000000000000..2497b9eb732c --- /dev/null +++ b/keyboards/kyria/keymaps/pierrec83/encoders.c @@ -0,0 +1,63 @@ +#include QMK_KEYBOARD_H +#include "layers.h" + +#ifdef ENCODER_ENABLE + +void encoder_update_user(uint8_t index, bool clockwise) { + if (index == 0) { + switch (get_highest_layer(layer_state)) { + case WORKMAN: + if (clockwise) { + tap_code(KC_VOLU); + } else { + tap_code(KC_VOLD); + } + break; + case SYMBOLS: + case FN: + if (clockwise) { + tap_code(KC_PGDN); + } else { + tap_code(KC_PGUP); + } + break; + case NAV: + case RNAV: + default: + if (clockwise) { + tap_code16(C(A(KC_RIGHT))); + } else { + tap_code16(C(A(KC_LEFT))); + } + break; + } + } else if (index == 1) { + switch (get_highest_layer(layer_state)) { + case WORKMAN: + if (clockwise) { + tap_code(KC_BRIU); + } else { + tap_code(KC_BRID); + } + break; + case SYMBOLS: + case FN: + if (clockwise) { + tap_code16(C(KC_RIGHT)); + } else { + tap_code16(C(KC_LEFT)); + } + break; + case NAV: + case RNAV: + default: + if (clockwise) { + tap_code16(C(KC_TAB)); + } else { + tap_code16(C(S(KC_TAB))); + } + break; + } + } +} +#endif diff --git a/keyboards/kyria/keymaps/pierrec83/keymap.c b/keyboards/kyria/keymaps/pierrec83/keymap.c new file mode 100644 index 000000000000..204895dc1049 --- /dev/null +++ b/keyboards/kyria/keymaps/pierrec83/keymap.c @@ -0,0 +1,18 @@ +#include QMK_KEYBOARD_H + +/* THIS FILE WAS GENERATED! + * + * This file was generated by qmk json2c. You may or may not want to + * edit it directly. + */ + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT(KC_NO, KC_Q, KC_D, KC_R, KC_W, KC_B, KC_J, KC_F, KC_U, KC_P, KC_SCLN, KC_NO, KC_NO, LSFT_T(KC_A), LT(5,KC_S), LT(1,KC_H), LT(3,KC_T), KC_G, KC_Y, LT(4,KC_N), LT(2,KC_E), LT(6,KC_O), LSFT_T(KC_I), KC_NO, KC_NO, KC_Z, KC_X, KC_M, KC_C, KC_V, TG(2), TG(2), TG(1), TG(1), KC_K, KC_L, LALT_T(KC_COMM), LCTL_T(KC_DOT), KC_SLSH, KC_NO, KC_NO, KC_NO, LCA(KC_LEFT), KC_BSPC, KC_NO, KC_NO, LT(7,KC_SPC), LCA(KC_RGHT), KC_NO, KC_NO), + [1] = LAYOUT(KC_TRNS, KC_TRNS, LCTL(LSFT(KC_C)), KC_PGUP, LCTL(LSFT(KC_V)), KC_TRNS, RGB_MOD, KC_BTN1, KC_WH_U, KC_BTN2, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_BTN2, KC_NO, KC_BTN1, KC_TRNS, RGB_RMOD, KC_MS_L, KC_MS_D, KC_MS_U, KC_MS_R, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PGDN, KC_TRNS, KC_TRNS, TG(1), TG(1), KC_TRNS, KC_TRNS, RGB_TOG, KC_WH_L, KC_WH_D, KC_WH_R, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, LCTL(LSFT(KC_TAB)), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, LCTL(KC_TAB), KC_TRNS, KC_TRNS), + [2] = LAYOUT(KC_TRNS, KC_TRNS, KC_TRNS, KC_PGUP, KC_TRNS, KC_TRNS, RGB_MOD, KC_TRNS, KC_WH_U, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_LEFT, KC_UP, KC_DOWN, KC_RGHT, KC_TRNS, RGB_RMOD, KC_LGUI, KC_NO, LCTL(KC_LALT), LCA(KC_LSFT), KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_PGDN, KC_END, KC_TRNS, KC_TRNS, KC_TRNS, TG(2), TG(2), RGB_TOG, KC_TRNS, KC_WH_D, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, LGUI(KC_LEFT), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, LGUI(KC_RGHT), KC_TRNS, KC_TRNS), + [3] = LAYOUT(KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_UNDS, KC_PIPE, KC_QUOT, KC_TRNS, KC_TRNS, KC_TRNS, KC_CIRC, KC_ASTR, KC_AMPR, KC_NO, KC_TRNS, KC_HASH, KC_TILD, KC_SLSH, KC_DQUO, KC_DLR, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MINS, KC_BSLS, KC_GRV, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_BRID, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_BRIU, KC_TRNS, KC_TRNS), + [4] = LAYOUT(KC_TRNS, KC_TRNS, KC_COLN, KC_LT, KC_GT, KC_SCLN, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_LCBR, KC_RCBR, KC_LPRN, KC_RPRN, KC_AT, KC_TRNS, KC_NO, KC_EQL, KC_PLUS, KC_PERC, KC_TRNS, KC_TRNS, KC_TRNS, KC_EXLM, 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, KC_VOLD, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_VOLU, KC_TRNS, KC_TRNS), + [5] = LAYOUT(KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_F7, KC_F8, KC_F9, KC_F10, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_NO, KC_TRNS, KC_TRNS, 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_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, LCTL(KC_LALT), KC_TRNS, KC_TRNS, KC_TRNS), + [6] = LAYOUT(KC_TRNS, KC_PSLS, KC_7, KC_8, KC_9, KC_PPLS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_0, KC_4, KC_5, KC_6, KC_PMNS, KC_TRNS, KC_TRNS, KC_NO, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PAST, KC_1, KC_2, KC_3, KC_PEQL, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), + [7] = LAYOUT(KC_TRNS, KC_TRNS, KC_ESC, KC_COLN, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_DEL, KC_TRNS, KC_TRNS, KC_TRNS, KC_PERC, KC_SLSH, KC_ENT, KC_EXLM, KC_TRNS, KC_LGUI, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RALT_T(KC_COMM), RCTL_T(KC_DOT), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TAB, KC_TRNS, KC_TRNS, KC_NO, KC_TRNS, KC_TRNS, KC_TRNS) +}; diff --git a/keyboards/kyria/keymaps/pierrec83/keymap.json b/keyboards/kyria/keymaps/pierrec83/keymap.json new file mode 100644 index 000000000000..79d88009c123 --- /dev/null +++ b/keyboards/kyria/keymaps/pierrec83/keymap.json @@ -0,0 +1 @@ +{"version":1,"notes":"My awesome keymap","documentation":"\"This file is a QMK Configurator export. You can import this at . It can also be used directly with QMK's source code.\n\nTo setup your QMK environment check out the tutorial: \n\nYou can convert this file to a keymap.c using this command: `qmk json2c {keymap}`\n\nYou can compile this keymap using this command: `qmk compile {keymap}`\"\n","keyboard":"kyria/rev1","keymap":"pierrec83","layout":"LAYOUT","layers":[["KC_NO","KC_Q","KC_D","KC_R","KC_W","KC_B","KC_J","KC_F","KC_U","KC_P","KC_SCLN","KC_NO","KC_NO","LSFT_T(KC_A)","LT(5,KC_S)","LT(1,KC_H)","LT(3,KC_T)","KC_G","KC_Y","LT(4,KC_N)","LT(2,KC_E)","LT(6,KC_O)","LSFT_T(KC_I)","KC_NO","KC_NO","KC_Z","KC_X","KC_M","KC_C","KC_V","TG(2)","TG(2)","TG(1)","TG(1)","KC_K","KC_L","LALT_T(KC_COMM)","LCTL_T(KC_DOT)","KC_SLSH","KC_NO","KC_NO","KC_NO","LCA(KC_LEFT)","KC_BSPC","KC_NO","KC_NO","LT(7,KC_SPC)","LCA(KC_RGHT)","KC_NO","KC_NO"],["KC_TRNS","KC_TRNS","ANY(LCTL(LSFT(KC_C)))","KC_PGUP","ANY(LCTL(LSFT(KC_V)))","KC_TRNS","RGB_MOD","KC_BTN1","KC_WH_U","KC_BTN2","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_BTN2","KC_NO","KC_BTN1","KC_TRNS","RGB_RMOD","KC_MS_L","KC_MS_D","KC_MS_U","KC_MS_R","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_PGDN","KC_TRNS","KC_TRNS","TG(1)","TG(1)","KC_TRNS","KC_TRNS","RGB_TOG","KC_WH_L","KC_WH_D","KC_WH_R","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","ANY(LCTL(LSFT(KC_TAB)))","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","LCTL(KC_TAB)","KC_TRNS","KC_TRNS"],["KC_TRNS","KC_TRNS","KC_TRNS","KC_PGUP","KC_TRNS","KC_TRNS","RGB_MOD","KC_TRNS","KC_WH_U","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_LEFT","KC_UP","KC_DOWN","KC_RGHT","KC_TRNS","RGB_RMOD","KC_LGUI","KC_NO","LCTL(KC_LALT)","LCA(KC_LSFT)","KC_TRNS","KC_TRNS","KC_TRNS","KC_HOME","KC_PGDN","KC_END","KC_TRNS","KC_TRNS","KC_TRNS","TG(2)","TG(2)","RGB_TOG","KC_TRNS","KC_WH_D","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","LGUI(KC_LEFT)","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","LGUI(KC_RGHT)","KC_TRNS","KC_TRNS"],["KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_UNDS","KC_PIPE","KC_QUOT","KC_TRNS","KC_TRNS","KC_TRNS","KC_CIRC","KC_ASTR","KC_AMPR","KC_NO","KC_TRNS","KC_HASH","KC_TILD","KC_SLSH","KC_DQUO","KC_DLR","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_MINS","KC_BSLS","KC_GRV","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_BRID","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_BRIU","KC_TRNS","KC_TRNS"],["KC_TRNS","KC_TRNS","KC_COLN","KC_LT","KC_GT","KC_SCLN","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_LCBR","KC_RCBR","KC_LPRN","KC_RPRN","KC_AT","KC_TRNS","KC_NO","KC_EQL","KC_PLUS","KC_PERC","KC_TRNS","KC_TRNS","KC_TRNS","KC_EXLM","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","KC_VOLD","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_VOLU","KC_TRNS","KC_TRNS"],["KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_F7","KC_F8","KC_F9","KC_F10","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_NO","KC_TRNS","KC_TRNS","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_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","LCTL(KC_LALT)","KC_TRNS","KC_TRNS","KC_TRNS"],["KC_TRNS","KC_PSLS","KC_7","KC_8","KC_9","KC_PPLS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_0","KC_4","KC_5","KC_6","KC_PMNS","KC_TRNS","KC_TRNS","KC_NO","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_PAST","KC_1","KC_2","KC_3","KC_PEQL","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS"],["KC_TRNS","KC_TRNS","KC_ESC","KC_COLN","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_DEL","KC_TRNS","KC_TRNS","KC_TRNS","KC_PERC","KC_SLSH","KC_ENT","KC_EXLM","KC_TRNS","KC_LGUI","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","RALT_T(KC_COMM)","RCTL_T(KC_DOT)","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TAB","KC_TRNS","KC_TRNS","KC_NO","KC_TRNS","KC_TRNS","KC_TRNS"]],"author":"Anonymous"} \ No newline at end of file diff --git a/keyboards/kyria/keymaps/pierrec83/layers.h b/keyboards/kyria/keymaps/pierrec83/layers.h new file mode 100644 index 000000000000..12a988d37e43 --- /dev/null +++ b/keyboards/kyria/keymaps/pierrec83/layers.h @@ -0,0 +1,7 @@ +enum layers { + WORKMAN = 0, + RNAV, + NAV, + SYMBOLS, + FN, +}; diff --git a/keyboards/kyria/keymaps/pierrec83/readme.md b/keyboards/kyria/keymaps/pierrec83/readme.md new file mode 100644 index 000000000000..fae22f83666c --- /dev/null +++ b/keyboards/kyria/keymaps/pierrec83/readme.md @@ -0,0 +1,44 @@ +@pierrec83's keymap for the Kyria +=== + +A comfortable for me using 34 keys. + +This keymap has evolved over a period of time from iterating as I observed pain points in my interacting with my home and work computers (MacOS and Linux. I edited many of the shortcuts in MacOS to match those in Linux for consistency). + +Features +--- +* Mouse keys with constants tuned so the keyboard usable for me as my sole pointing device +* Homerow layers activation +* Minimal unhoming of the thumbs (the one side thumb key I do use does not overlap with typing english or code) +* Minimal side-index motion thanks to workman base layer and similar principles in other layers +* Two symbol layers, both activated with one homerow key and either another key on the same hand's homerow or a key from the other hand +* Mousing around, including left and right clicking can be done either one-handed or fully on the homerow with both hands +* Easy chaining of common command line or vim patterns, such as `~/`, `()`, `ESC : w ENTER` etc. +* Outer pinky columns unused for ergonomic reasons +* Common OS shortcuts like switching workspaces on gnome or MacOS easily accessible (for the shortcuts I use. This may not apply to others) + +Instructions to update the keymap +--- + +For now, I am still more comfortable updating the keymap through the qmk configurator as I don't trust myself to manually keep comments describing the keymap in sync with the code itself. This means that my keymap.c is generated and not really readable. For a readble view of my keymap, one must import keymap.json into [qmk configurator](https://config.qmk.fm) and use the web UI or print it. + +To update the keymap, +* Load keymap.json into qmk configurator +* Perform any edits +* Export the keymap. This should save a json file in `~/Downloads/pierrec83.json` or equivalent for your OS +* From the root of qmk_firmware, move the keymap to its destination: +``` +mv ~/Downloads/pierrec83.json keyboards/kyria/keymaps/pierrec83/keymap.json +``` +* Regenerate the `keymap.c`: +``` +qmk json2c keyboards/kyria/keymaps/pierrec83/keymap.json -o keyboards/kyria/keymaps/pierrec83/keymap.c +``` +* Flash the firmware (for instance, if left hand is plugged): +``` +qmk flash -kb kyria -km pierrec83 -bl dfu-split-left +``` + +Author +--- +I am @pierrec83 on Twitter, @pierrechevalier83 on github. I chose the shorter nickname for my keymap. diff --git a/keyboards/kyria/keymaps/pierrec83/rules.mk b/keyboards/kyria/keymaps/pierrec83/rules.mk new file mode 100644 index 000000000000..78f0ac93f1a5 --- /dev/null +++ b/keyboards/kyria/keymaps/pierrec83/rules.mk @@ -0,0 +1,5 @@ +OLED_DRIVER_ENABLE = no # Enables the use of OLED displays +ENCODER_ENABLE = yes # ENables the use of one or more encoders +RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow + +SRC += encoders.c From 78fdd406227f55f8bb2a1891e7fdbcb4b3daf13b Mon Sep 17 00:00:00 2001 From: Dan Date: Thu, 18 Jun 2020 01:20:45 -0400 Subject: [PATCH 186/930] [Keymap] Dcompact for iris (#9406) Co-authored-by: Dan Herrera Co-authored-by: Ryan --- .../keebio/iris/keymaps/dcompact/config.h | 21 ++ .../keebio/iris/keymaps/dcompact/keymap.c | 231 ++++++++++++++++++ .../keebio/iris/keymaps/dcompact/readme.md | 45 ++++ 3 files changed, 297 insertions(+) create mode 100644 keyboards/keebio/iris/keymaps/dcompact/config.h create mode 100644 keyboards/keebio/iris/keymaps/dcompact/keymap.c create mode 100644 keyboards/keebio/iris/keymaps/dcompact/readme.md diff --git a/keyboards/keebio/iris/keymaps/dcompact/config.h b/keyboards/keebio/iris/keymaps/dcompact/config.h new file mode 100644 index 000000000000..149a54be7fa3 --- /dev/null +++ b/keyboards/keebio/iris/keymaps/dcompact/config.h @@ -0,0 +1,21 @@ +/* +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 diff --git a/keyboards/keebio/iris/keymaps/dcompact/keymap.c b/keyboards/keebio/iris/keymaps/dcompact/keymap.c new file mode 100644 index 000000000000..ec1ffac8c18e --- /dev/null +++ b/keyboards/keebio/iris/keymaps/dcompact/keymap.c @@ -0,0 +1,231 @@ +#include QMK_KEYBOARD_H + +// Custom Keycodes and Combinations Used +#define DEL_SHF SFT_T(KC_DEL) +#define QUAKE LCTL(KC_GRV) + +#define WKSP_L LALT(LCTL(KC_LEFT)) +#define WKSP_D LALT(LCTL(KC_DOWN)) +#define WKSP_U LALT(LCTL(KC_UP)) +#define WKSP_R LALT(LCTL(KC_RGHT)) + +enum custom_layers { + _BASE, + _LOWER, + _RAISE, + _FUNC, + _GAME, + _LNUM, + _LFUN, + _ADJUST +}; + + +enum custom_keycodes { + BASE = SAFE_RANGE, + LOWER, + RAISE, + FUNC, + GAME, + EXT_GM, + LNUM, + LFUN, + ADJUST +}; + + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [_BASE] = LAYOUT( + //┌────────┬────────┬────────┬────────┬────────┬────────┐ ┌────────┬────────┬────────┬────────┬────────┬────────┐ + 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, GAME, KC_LGUI, KC_LALT, LOWER, KC_LSFT, _______, _______, KC_SPC, RAISE, KC_RALT, KC_RGUI, FUNC, KC_ENT, + //└────────┴────────┴────────┴───┬────┴───┬────┴───┬────┴───┬────┘ └───┬────┴───┬────┴───┬────┴───┬────┴────────┴────────┴────────┘ + KC_LALT, LOWER, KC_LSFT, KC_SPC, RAISE, KC_RALT + // └────────┴────────┴────────┘ └────────┴────────┴────────┘ + ), + + [_LOWER] = LAYOUT( + //┌────────┬────────┬────────┬────────┬────────┬────────┐ ┌────────┬────────┬────────┬────────┬────────┬────────┐ + 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, XXXXXXX, XXXXXXX, + //└────────┴────────┴────────┴───┬────┴───┬────┴───┬────┴───┬────┘ └───┬────┴───┬────┴───┬────┴───┬────┴────────┴────────┴────────┘ + _______, _______, _______, XXXXXXX, _______, XXXXXXX + // └────────┴────────┴────────┘ └────────┴────────┴────────┘ + ), + + [_RAISE] = LAYOUT( + //┌────────┬────────┬────────┬────────┬────────┬────────┐ ┌────────┬────────┬────────┬────────┬────────┬────────┐ + 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, XXXXXXX, XXXXXXX, KC_RABK, _______, KC_0, KC_DOT, KC_COMM, XXXXXXX, + //└────────┴────────┴────────┴───┬────┴───┬────┴───┬────┴───┬────┘ └───┬────┴───┬────┴───┬────┴───┬────┴────────┴────────┴────────┘ + _______, _______, KC_LABK, KC_RABK, _______, KC_0 + // └────────┴────────┴────────┘ └────────┴────────┴────────┘ + ), + + [_FUNC] = LAYOUT( + //┌────────┬────────┬────────┬────────┬────────┬────────┐ ┌────────┬────────┬────────┬────────┬────────┬────────┐ + 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, + //└────────┴────────┴────────┴───┬────┴───┬────┴───┬────┴───┬────┘ └───┬────┴───┬────┴───┬────┴───┬────┴────────┴────────┴────────┘ + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX + // └────────┴────────┴────────┘ └────────┴────────┴────────┘ + ), + + [_GAME] = LAYOUT( + //┌────────┬────────┬────────┬────────┬────────┬────────┐ ┌────────┬────────┬────────┬────────┬────────┬────────┐ + KC_TAB, KC_Q, KC_W, KC_E, KC_H, KC_Z, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + //├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤ + KC_LSFT, KC_A, KC_S, KC_D, KC_U, KC_X, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + //├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤ + KC_LCTL, KC_F, KC_G, KC_R, KC_M, KC_C, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + //├────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┤ + KC_ESC, KC_TILD, KC_LALT, KC_SPC, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, EXT_GM, + //└────────┴────────┴────────┴───┬────┴───┬────┴───┬────┴───┬────┘ └───┬────┴───┬────┴───┬────┴───┬────┴────────┴────────┴────────┘ + KC_SPC, LNUM, LFUN, XXXXXXX, XXXXXXX, XXXXXXX + // └────────┴────────┴────────┘ └────────┴────────┴────────┘ + ), + + [_LNUM] = LAYOUT( + //┌────────┬────────┬────────┬────────┬────────┬────────┐ ┌────────┬────────┬────────┬────────┬────────┬────────┐ + _______, KC_1, KC_2, KC_3, KC_4, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + //├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤ + _______, KC_5, KC_6, KC_7, KC_8, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + //├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤ + _______, KC_9, KC_0, KC_COMM, KC_DOT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + //├────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┤ + _______, _______, _______, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + //└────────┴────────┴────────┴───┬────┴───┬────┴───┬────┴───┬────┘ └───┬────┴───┬────┴───┬────┴───┬────┴────────┴────────┴────────┘ + _______, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX + // └────────┴────────┴────────┘ └────────┴────────┴────────┘ + ), + + [_LFUN] = LAYOUT( + //┌────────┬────────┬────────┬────────┬────────┬────────┐ ┌────────┬────────┬────────┬────────┬────────┬────────┐ + _______, KC_F1, KC_F2, KC_F3, KC_F4, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + //├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤ + _______, KC_F5, KC_F6, KC_F7, KC_F8, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + //├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤ + _______, KC_F9, KC_F10, KC_F11, KC_F12, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + //├────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┤ + _______, _______, _______, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + //└────────┴────────┴────────┴───┬────┴───┬────┴───┬────┴───┬────┘ └───┬────┴───┬────┴───┬────┴───┬────┴────────┴────────┴────────┘ + _______, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX + // └────────┴────────┴────────┘ └────────┴────────┴────────┘ + ), + + [_ADJUST] = LAYOUT( + //┌────────┬────────┬────────┬────────┬────────┬────────┐ ┌────────┬────────┬────────┬────────┬────────┬────────┐ + _______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL, + //├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤ + _______, _______, _______, _______, _______, BL_STEP, RGB_TOG, RGB_HUI, RGB_SAI, RGB_SAI, _______, _______, + //├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤ + _______, _______, _______, _______, _______, BL_BRTG, RGB_MOD, RGB_HUD, RGB_SAD, RGB_VAD, _______, _______, + //├────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┤ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + //└────────┴────────┴────────┴───┬────┴───┬────┴───┬────┴───┬────┘ └───┬────┴───┬────┴───┬────┴───┬────┴────────┴────────┴────────┘ + _______, _______, _______, _______, _______, _______ + // └────────┴────────┴────────┘ └────────┴────────┴────────┘ + ) +}; + +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; + 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 FUNC: + if (record->event.pressed) { + layer_on(_FUNC); + } else { + layer_off(_FUNC); + } + return false; + case GAME: + if (!record->event.pressed) { + #ifdef AUDIO_ENABLE + stop_all_notes(); + PLAY_SONG(plover_song); + #endif + rgblight_mode(RGBLIGHT_MODE_SNAKE); + layer_on(_GAME); + } + return false; + case EXT_GM: + if (record->event.pressed) { + #ifdef AUDIO_ENABLE + PLAY_SONG(plover_gb_song); + #endif + rgblight_mode(RGBLIGHT_MODE_RAINBOW_MOOD); + layer_off(_GAME); + } + return false; + case LNUM: + if (record->event.pressed) { + layer_on(_LNUM); + } else { + layer_off(_LNUM); + } + return false; + case LFUN: + if (record->event.pressed) { + layer_on(_LFUN); + } else { + layer_off(_LFUN); + } + return false; + } + return true; +} + +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 { + tap_code(KC_PGUP); + } + } +} diff --git a/keyboards/keebio/iris/keymaps/dcompact/readme.md b/keyboards/keebio/iris/keymaps/dcompact/readme.md new file mode 100644 index 000000000000..f3f3d8ca6ead --- /dev/null +++ b/keyboards/keebio/iris/keymaps/dcompact/readme.md @@ -0,0 +1,45 @@ +# DCompact Layout + +**Dvorak, Layered, Mouse-Enabled, Compact -- now with Game Mode~** + +_See [the layout source](keymap.c) for the actual layout_ + +## Goals + +The following are the goals kept in mind when designing the DCompact +layout: + +- Provide minimal travel distance when typing English or coding +- Consistent muscle memory translation from standard QWERTY +- Stateless typing experience +- OS-agnostic features, macros, and key placement +- Minimize dependence on mouse usage + +These are generally all met or balanced within reason. This layout is +not intended at all to be a familiar layout for much of anyone (except +maybe those who already type in Dvorak) -- this is meant to amplify the +best parts of having limited, ortholinear keys with layering. + +## As Reference Material + +If you're reading this hoping to find reference material to implement +your own layout, then please feel free to copy over this layout and +make edits where you see fit. I removed a lot of the features I felt +extraneous to my usage and simplified style where I felt needed. This +would hopefully mean that my code should feel like a good base to +develop from for those new to QMK. + +_Remember that settings defined in the layout directory override and +merge with those in the keyboard folder_ + +## Relevant Links + +- [Online Dvorak Layout Trainer](https://learn.dvorak.nl/) +- [Dvorak Wikipedia Page](https://en.wikipedia.org/wiki/Dvorak_Simplified_Keyboard) +- [QMK Docs](https://docs.qmk.fm/#/) +- [QMK KeyCode Reference](https://docs.qmk.fm/#/keycodes) + +## Contact + +Maintainer: [Dan](https://github.com/loksonarius) + From aae1814319c4992471d074ed18b8b7b4842b0a66 Mon Sep 17 00:00:00 2001 From: Yasha Mostofi Date: Thu, 18 Jun 2020 02:06:11 -0500 Subject: [PATCH 187/930] [Keyboard] Add Via support for Let's Split v2 (#9448) * initial let's split with rgb * Revert default * Add Via keymap * Remove my keymap * Remove trailing slashes --- keyboards/lets_split/keymaps/via/config.h | 40 ++++++++++++ keyboards/lets_split/keymaps/via/keymap.c | 77 +++++++++++++++++++++++ keyboards/lets_split/keymaps/via/rules.mk | 4 ++ keyboards/lets_split/rev2/config.h | 6 +- 4 files changed, 124 insertions(+), 3 deletions(-) create mode 100644 keyboards/lets_split/keymaps/via/config.h create mode 100644 keyboards/lets_split/keymaps/via/keymap.c create mode 100644 keyboards/lets_split/keymaps/via/rules.mk diff --git a/keyboards/lets_split/keymaps/via/config.h b/keyboards/lets_split/keymaps/via/config.h new file mode 100644 index 000000000000..df24c53cde2d --- /dev/null +++ b/keyboards/lets_split/keymaps/via/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/via/keymap.c b/keyboards/lets_split/keymaps/via/keymap.c new file mode 100644 index 000000000000..1509a2e6a2ce --- /dev/null +++ b/keyboards/lets_split/keymaps/via/keymap.c @@ -0,0 +1,77 @@ +#include QMK_KEYBOARD_H + +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 | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * |Reset | Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | + * `-----------------------------------------------------------------------------------' + */ +[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 , + RESET, KC_LCTL, KC_LALT, KC_LGUI, MO(1), KC_SPC, KC_SPC, MO(2), 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 | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | MO(3)| Next | Vol- | Vol+ | Play | + * `-----------------------------------------------------------------------------------' + */ +[1] = 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),_______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, MO(3), 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 | + * `-----------------------------------------------------------------------------------' + */ +[2] = 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 | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | |rgb_md|Aud on|Audoff|AGnorm|AGswap| | | | | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | | | | | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | + * `-----------------------------------------------------------------------------------' + */ +[3] = LAYOUT_ortho_4x12( + _______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL, + _______, _______, RGB_MOD, AU_ON, AU_OFF, AG_NORM, AG_SWAP, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ +) + +}; diff --git a/keyboards/lets_split/keymaps/via/rules.mk b/keyboards/lets_split/keymaps/via/rules.mk new file mode 100644 index 000000000000..48e7e7f25fd9 --- /dev/null +++ b/keyboards/lets_split/keymaps/via/rules.mk @@ -0,0 +1,4 @@ +RGBLIGHT_ENABLE = yes # LED strips +VIA_ENABLE = yes +LTO_ENABLE = yes +MOUSEKEY_ENABLE = no diff --git a/keyboards/lets_split/rev2/config.h b/keyboards/lets_split/rev2/config.h index 0977d7c6701c..d5b5b57d0351 100644 --- a/keyboards/lets_split/rev2/config.h +++ b/keyboards/lets_split/rev2/config.h @@ -19,9 +19,9 @@ along with this program. If not, see . #pragma once /* USB Device descriptor parameter */ -#define VENDOR_ID 0xFEED -#define PRODUCT_ID 0x3060 -#define DEVICE_VER 0x0001 +#define VENDOR_ID 0x6F77 +#define PRODUCT_ID 0x0002 +#define DEVICE_VER 0x0002 #define MANUFACTURER Wootpatoot #define PRODUCT Lets Split v2 #define DESCRIPTION A split keyboard for the cheap makers From f7eb030e917a8fa360ad7cc7bb26d804cf4c5f6c Mon Sep 17 00:00:00 2001 From: Jason Laqua Date: Thu, 18 Jun 2020 02:07:34 -0500 Subject: [PATCH 188/930] Standardize how unicode is processed (fixes #8768) (#8770) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Konstantin Đorđević --- docs/feature_unicode.md | 13 ++- quantum/process_keycode/process_ucis.c | 97 ++++++++----------- quantum/process_keycode/process_ucis.h | 26 +++-- .../process_keycode/process_unicode_common.c | 25 ++++- .../process_keycode/process_unicode_common.h | 2 + quantum/process_keycode/process_unicodemap.c | 21 +--- 6 files changed, 89 insertions(+), 95 deletions(-) diff --git a/docs/feature_unicode.md b/docs/feature_unicode.md index a6f2cb4d0de9..aedffe4ea253 100644 --- a/docs/feature_unicode.md +++ b/docs/feature_unicode.md @@ -66,13 +66,16 @@ Then define a table like this in your keymap file: ```c const qk_ucis_symbol_t ucis_symbol_table[] = UCIS_TABLE( - UCIS_SYM("poop", 0x1F4A9), // 💩 - UCIS_SYM("rofl", 0x1F923), // 🤣 - UCIS_SYM("kiss", 0x1F619) // 😙 + UCIS_SYM("poop", 0x1F4A9), // 💩 + UCIS_SYM("rofl", 0x1F923), // 🤣 + UCIS_SYM("cuba", 0x1F1E8, 0x1F1FA), // 🇨🇺 + UCIS_SYM("look", 0x0CA0, 0x005F, 0x0CA0), // ಠ_ಠ ); ``` -To use it, call `qk_ucis_start()`. Then, type the mnemonic for the character (such as "rofl"), and hit Space or Enter. QMK should erase the "rofl" text and insert the laughing emoji. +By default, each table entry may be up to 3 code points long. This number can be changed by adding `#define UCIS_MAX_CODE_POINTS n` to your `config.h` file. + +To use UCIS input, call `qk_ucis_start()`. Then, type the mnemonic for the character (such as "rofl") and hit Space, Enter or Esc. QMK should erase the "rofl" text and insert the laughing emoji. ### Customization @@ -90,7 +93,7 @@ Unicode input in QMK works by inputting a sequence of characters to the OS, sort The following input modes are available: -* **`UC_MAC`**: macOS built-in Unicode hex input. Supports code points up to `0xFFFF` (`0x10FFFF` with Unicode Map). +* **`UC_MAC`**: macOS built-in Unicode hex input. Supports code points up to `0x10FFFF` (all possible code points). To enable, go to _System Preferences > Keyboard > Input Sources_, add _Unicode Hex Input_ to the list (it's under _Other_), then activate it from the input dropdown in the Menu Bar. By default, this mode uses the left Option key (`KC_LALT`) for Unicode input, but this can be changed by defining [`UNICODE_KEY_MAC`](#input-key-configuration) with another keycode. diff --git a/quantum/process_keycode/process_ucis.c b/quantum/process_keycode/process_ucis.c index 024077317f3d..2541d6eb2612 100644 --- a/quantum/process_keycode/process_ucis.c +++ b/quantum/process_keycode/process_ucis.c @@ -27,7 +27,7 @@ void qk_ucis_start(void) { __attribute__((weak)) void qk_ucis_start_user(void) { unicode_input_start(); - register_hex(0x2328); + register_hex(0x2328); // ⌨ unicode_input_finish(); } @@ -35,74 +35,54 @@ __attribute__((weak)) void qk_ucis_success(uint8_t symbol_index) {} static bool is_uni_seq(char *seq) { uint8_t i; - for (i = 0; seq[i]; i++) { - uint16_t code; - if (('1' <= seq[i]) && (seq[i] <= '0')) - code = seq[i] - '1' + KC_1; - else - code = seq[i] - 'a' + KC_A; - - if (i > qk_ucis_state.count || qk_ucis_state.codes[i] != code) return false; + uint16_t keycode; + if ('1' <= seq[i] && seq[i] <= '0') { + keycode = seq[i] - '1' + KC_1; + } else { + keycode = seq[i] - 'a' + KC_A; + } + if (i > qk_ucis_state.count || qk_ucis_state.codes[i] != keycode) { + return false; + } } - - return (qk_ucis_state.codes[i] == KC_ENT || qk_ucis_state.codes[i] == KC_SPC); + return qk_ucis_state.codes[i] == KC_ENT || qk_ucis_state.codes[i] == KC_SPC; } __attribute__((weak)) void qk_ucis_symbol_fallback(void) { for (uint8_t i = 0; i < qk_ucis_state.count - 1; i++) { - uint8_t code = qk_ucis_state.codes[i]; - register_code(code); - unregister_code(code); + uint8_t keycode = qk_ucis_state.codes[i]; + register_code(keycode); + unregister_code(keycode); wait_ms(UNICODE_TYPE_DELAY); } } __attribute__((weak)) void qk_ucis_cancel(void) {} -void register_ucis(const char *hex) { - for (int i = 0; hex[i]; i++) { - uint8_t kc = 0; - char c = hex[i]; - - switch (c) { - case '0': - kc = KC_0; - break; - case '1' ... '9': - kc = c - '1' + KC_1; - break; - case 'a' ... 'f': - kc = c - 'a' + KC_A; - break; - case 'A' ... 'F': - kc = c - 'A' + KC_A; - break; - } - - if (kc) { - register_code(kc); - unregister_code(kc); - wait_ms(UNICODE_TYPE_DELAY); - } +void register_ucis(const uint32_t *code_points) { + for (int i = 0; i < UCIS_MAX_CODE_POINTS && code_points[i]; i++) { + register_unicode(code_points[i]); + wait_ms(UNICODE_TYPE_DELAY); } } bool process_ucis(uint16_t keycode, keyrecord_t *record) { - uint8_t i; - - if (!qk_ucis_state.in_progress) return true; + if (!qk_ucis_state.in_progress || !record->event.pressed) { + return true; + } - if (qk_ucis_state.count >= UCIS_MAX_SYMBOL_LENGTH && !(keycode == KC_BSPC || keycode == KC_ESC || keycode == KC_SPC || keycode == KC_ENT)) { + bool special = keycode == KC_SPC || keycode == KC_ENT || + keycode == KC_ESC || keycode == KC_BSPC; + if (qk_ucis_state.count >= UCIS_MAX_SYMBOL_LENGTH && !special) { return false; } - if (!record->event.pressed) return true; - qk_ucis_state.codes[qk_ucis_state.count] = keycode; qk_ucis_state.count++; - if (keycode == KC_BSPC) { + switch (keycode) { + case KC_BSPC: if (qk_ucis_state.count >= 2) { qk_ucis_state.count -= 2; return true; @@ -110,12 +90,11 @@ bool process_ucis(uint16_t keycode, keyrecord_t *record) { qk_ucis_state.count--; return false; } - } - if (keycode == KC_ENT || keycode == KC_SPC || keycode == KC_ESC) { - bool symbol_found = false; - - for (i = qk_ucis_state.count; i > 0; i--) { + case KC_SPC: + case KC_ENT: + case KC_ESC: + for (uint8_t i = 0; i < qk_ucis_state.count; i++) { register_code(KC_BSPC); unregister_code(KC_BSPC); wait_ms(UNICODE_TYPE_DELAY); @@ -127,25 +106,25 @@ bool process_ucis(uint16_t keycode, keyrecord_t *record) { return false; } - unicode_input_start(); + uint8_t i; + bool symbol_found = false; for (i = 0; ucis_symbol_table[i].symbol; i++) { if (is_uni_seq(ucis_symbol_table[i].symbol)) { symbol_found = true; - register_ucis(ucis_symbol_table[i].code + 2); + register_ucis(ucis_symbol_table[i].code_points); break; } } - if (!symbol_found) { - qk_ucis_symbol_fallback(); - } - unicode_input_finish(); - if (symbol_found) { qk_ucis_success(i); + } else { + qk_ucis_symbol_fallback(); } qk_ucis_state.in_progress = false; return false; + + default: + return true; } - return true; } diff --git a/quantum/process_keycode/process_ucis.h b/quantum/process_keycode/process_ucis.h index 0f93a198bb0f..a667430bdace 100644 --- a/quantum/process_keycode/process_ucis.h +++ b/quantum/process_keycode/process_ucis.h @@ -22,10 +22,13 @@ #ifndef UCIS_MAX_SYMBOL_LENGTH # define UCIS_MAX_SYMBOL_LENGTH 32 #endif +#ifndef UCIS_MAX_CODE_POINTS +# define UCIS_MAX_CODE_POINTS 3 +#endif typedef struct { - char *symbol; - char *code; + char * symbol; + uint32_t code_points[UCIS_MAX_CODE_POINTS]; } qk_ucis_symbol_t; typedef struct { @@ -36,12 +39,17 @@ typedef struct { extern qk_ucis_state_t qk_ucis_state; -#define UCIS_TABLE(...) \ - { \ - __VA_ARGS__, { NULL, NULL } \ +// clang-format off + +#define UCIS_TABLE(...) \ + { \ + __VA_ARGS__, \ + { NULL, {} } \ } -#define UCIS_SYM(name, code) \ - { name, #code } +#define UCIS_SYM(name, ...) \ + { name, {__VA_ARGS__} } + +// clang-format on extern const qk_ucis_symbol_t ucis_symbol_table[]; @@ -49,5 +57,7 @@ void qk_ucis_start(void); void qk_ucis_start_user(void); void qk_ucis_symbol_fallback(void); void qk_ucis_success(uint8_t symbol_index); -void register_ucis(const char *hex); + +void register_ucis(const uint32_t *code_points); + bool process_ucis(uint16_t keycode, keyrecord_t *record); diff --git a/quantum/process_keycode/process_unicode_common.c b/quantum/process_keycode/process_unicode_common.c index fb502150120d..bea34c31eab7 100644 --- a/quantum/process_keycode/process_unicode_common.c +++ b/quantum/process_keycode/process_unicode_common.c @@ -171,6 +171,25 @@ void register_hex32(uint32_t hex) { } } +void register_unicode(uint32_t code_point) { + if (code_point > 0x10FFFF || (code_point > 0xFFFF && unicode_config.input_mode == UC_WIN)) { + // Code point out of range, do nothing + return; + } + + unicode_input_start(); + if (code_point > 0xFFFF && unicode_config.input_mode == UC_MAC) { + // Convert code point to UTF-16 surrogate pair on macOS + code_point -= 0x10000; + uint32_t lo = code_point & 0x3FF, hi = (code_point & 0xFFC00) >> 10; + register_hex32(hi + 0xD800); + register_hex32(lo + 0xDC00); + } else { + register_hex32(code_point); + } + unicode_input_finish(); +} + // clang-format off void send_unicode_hex_string(const char *str) { @@ -236,14 +255,12 @@ void send_unicode_string(const char *str) { return; } - int32_t code_point = 0; while (*str) { + int32_t code_point = 0; str = decode_utf8(str, &code_point); if (code_point >= 0) { - unicode_input_start(); - register_hex32(code_point); - unicode_input_finish(); + register_unicode(code_point); } } } diff --git a/quantum/process_keycode/process_unicode_common.h b/quantum/process_keycode/process_unicode_common.h index 4579fde8d5d6..3082fbb5f00d 100644 --- a/quantum/process_keycode/process_unicode_common.h +++ b/quantum/process_keycode/process_unicode_common.h @@ -89,6 +89,8 @@ void unicode_input_cancel(void); void register_hex(uint16_t hex); void register_hex32(uint32_t hex); +void register_unicode(uint32_t code_point); + 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 2f402a2fd239..789a90445bb2 100644 --- a/quantum/process_keycode/process_unicodemap.c +++ b/quantum/process_keycode/process_unicodemap.c @@ -36,25 +36,8 @@ __attribute__((weak)) uint16_t unicodemap_index(uint16_t keycode) { bool process_unicodemap(uint16_t keycode, keyrecord_t *record) { if (keycode >= QK_UNICODEMAP && keycode <= QK_UNICODEMAP_PAIR_MAX && record->event.pressed) { - unicode_input_start(); - - uint32_t code = pgm_read_dword(unicode_map + unicodemap_index(keycode)); - uint8_t input_mode = get_unicode_input_mode(); - - if (code > 0x10FFFF || (code > 0xFFFF && input_mode == UC_WIN)) { - // Character is out of range supported by the platform - unicode_input_cancel(); - } else if (code > 0xFFFF && input_mode == UC_MAC) { - // Convert to UTF-16 surrogate pair on Mac - code -= 0x10000; - uint32_t lo = code & 0x3FF, hi = (code & 0xFFC00) >> 10; - register_hex32(hi + 0xD800); - register_hex32(lo + 0xDC00); - unicode_input_finish(); - } else { - register_hex32(code); - unicode_input_finish(); - } + uint32_t code_point = pgm_read_dword(unicode_map + unicodemap_index(keycode)); + register_unicode(code_point); } return true; } From 9c1097e768aed90e4c56a3a18f6c1cc9cac52391 Mon Sep 17 00:00:00 2001 From: Joshua Diamond Date: Thu, 18 Jun 2020 03:07:48 -0400 Subject: [PATCH 189/930] Fix for One Shot Layer not being cleaned up after some actions (#8832) --- tmk_core/common/action.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/tmk_core/common/action.c b/tmk_core/common/action.c index b39836f0fb1e..82be9cc9209c 100644 --- a/tmk_core/common/action.c +++ b/tmk_core/common/action.c @@ -192,7 +192,14 @@ void process_record(keyrecord_t *record) { return; } - if (!process_record_quantum(record)) return; + if (!process_record_quantum(record)) { +#ifndef NO_ACTION_ONESHOT + if (is_oneshot_layer_active() && record->event.pressed) { + clear_oneshot_layer_state(ONESHOT_OTHER_KEY_PRESSED); + } +#endif + return; + } process_record_handler(record); post_process_record_quantum(record); @@ -231,7 +238,7 @@ void process_action(keyrecord_t *record, action_t action) { #ifndef NO_ACTION_ONESHOT bool do_release_oneshot = false; // notice we only clear the one shot layer if the pressed key is not a modifier. - if (is_oneshot_layer_active() && event.pressed && !IS_MOD(action.key.code) + if (is_oneshot_layer_active() && event.pressed && (action.kind.id == ACT_USAGE || !IS_MOD(action.key.code)) # ifdef SWAP_HANDS_ENABLE && !(action.kind.id == ACT_SWAP_HANDS && action.swap.code == OP_SH_ONESHOT) # endif From d88dca3ca79d908c34fb5bf4af40c52b4cfce7f8 Mon Sep 17 00:00:00 2001 From: James Young <18669334+noroadsleft@users.noreply.github.com> Date: Thu, 18 Jun 2020 00:15:22 -0700 Subject: [PATCH 190/930] YMD75: move MCU/Bootloader rules to revision level (#9452) Work-around for an issue with QMK Configurator's API. --- keyboards/ymd75/rev1/rules.mk | 13 +++++++++++++ keyboards/ymd75/rev2/rules.mk | 13 +++++++++++++ keyboards/ymd75/rules.mk | 13 ------------- 3 files changed, 26 insertions(+), 13 deletions(-) diff --git a/keyboards/ymd75/rev1/rules.mk b/keyboards/ymd75/rev1/rules.mk index 66ffbb499ddb..b77457b5ac3b 100644 --- a/keyboards/ymd75/rev1/rules.mk +++ b/keyboards/ymd75/rev1/rules.mk @@ -1,3 +1,16 @@ +# 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 = yes MOUSEKEY_ENABLE = no diff --git a/keyboards/ymd75/rev2/rules.mk b/keyboards/ymd75/rev2/rules.mk index 66ffbb499ddb..b77457b5ac3b 100644 --- a/keyboards/ymd75/rev2/rules.mk +++ b/keyboards/ymd75/rev2/rules.mk @@ -1,3 +1,16 @@ +# 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 = yes MOUSEKEY_ENABLE = no diff --git a/keyboards/ymd75/rules.mk b/keyboards/ymd75/rules.mk index 437f9f4a52cc..756d20c54c15 100644 --- a/keyboards/ymd75/rules.mk +++ b/keyboards/ymd75/rules.mk @@ -1,14 +1 @@ -# 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 - DEFAULT_FOLDER = ymd75/rev1 From 716924de3e07eb4a6f39a9c8da9ba0fc64c7f796 Mon Sep 17 00:00:00 2001 From: Brad Arnett Date: Thu, 18 Jun 2020 03:01:22 -0700 Subject: [PATCH 191/930] [Keyboard] Added ymdk split64 based on walston's work (#9183) * Added ymdk split64 based on walson's work * Commented out features on walston's keymap as it was too big to compile * Update keyboards/ymdk_sp64/config.h * Update keyboards/ymdk_sp64/keymaps/daed/keymap.c * Update keyboards/ymdk_sp64/matrix.c * Update keyboards/ymdk_sp64/matrix.c * Update keyboards/ymdk_sp64/matrix.c * keymap changes * Update keyboards/ymdk_sp64/matrix.c * Update keyboards/ymdk_sp64/matrix.c * Update keyboards/ymdk_sp64/rules.mk * Update keyboards/ymdk_sp64/config.h * Update keyboards/ymdk_sp64/config.h * Update keyboards/ymdk_sp64/readme.md * Update keyboards/ymdk_sp64/rules.mk * Update keyboards/ymdk_sp64/config.h * Update keyboards/ymdk_sp64/rules.mk * Update keyboards/ymdk_sp64/ymdk_sp64.c * Update keyboards/ymdk_sp64/keymaps/walston/rules.mk * Update keyboards/ymdk_sp64/readme.md * Made requested changes and moved keyboard under ymdk directory * Update keyboards/ymdk/ymdk_sp64/keymaps/walston/keymap.c * Update keyboards/ymdk/ymdk_sp64/config.h * Update keyboards/ymdk/ymdk_sp64/config.h * Update keyboards/ymdk/ymdk_sp64/keymaps/default/keymap.c * Update keyboards/ymdk/ymdk_sp64/keymaps/default/keymap.c * updated changes for pr 9183 * updated changes for pr 9183 * updated changes for pr 9183 * Removed redundant "QMK_KEYBOARD_H" include --- keyboards/ymdk/sp64/config.h | 45 +++++ keyboards/ymdk/sp64/info.json | 79 +++++++++ keyboards/ymdk/sp64/keymaps/daed/keymap.c | 140 +++++++++++++++ keyboards/ymdk/sp64/keymaps/default/keymap.c | 74 ++++++++ keyboards/ymdk/sp64/keymaps/walston/keymap.c | 94 +++++++++++ keyboards/ymdk/sp64/keymaps/walston/rules.mk | 1 + keyboards/ymdk/sp64/matrix.c | 169 +++++++++++++++++++ keyboards/ymdk/sp64/readme.md | 17 ++ keyboards/ymdk/sp64/rules.mk | 32 ++++ keyboards/ymdk/sp64/sp64.c | 93 ++++++++++ keyboards/ymdk/sp64/sp64.h | 84 +++++++++ 11 files changed, 828 insertions(+) create mode 100644 keyboards/ymdk/sp64/config.h create mode 100644 keyboards/ymdk/sp64/info.json create mode 100644 keyboards/ymdk/sp64/keymaps/daed/keymap.c create mode 100644 keyboards/ymdk/sp64/keymaps/default/keymap.c create mode 100644 keyboards/ymdk/sp64/keymaps/walston/keymap.c create mode 100644 keyboards/ymdk/sp64/keymaps/walston/rules.mk create mode 100644 keyboards/ymdk/sp64/matrix.c create mode 100644 keyboards/ymdk/sp64/readme.md create mode 100644 keyboards/ymdk/sp64/rules.mk create mode 100644 keyboards/ymdk/sp64/sp64.c create mode 100644 keyboards/ymdk/sp64/sp64.h diff --git a/keyboards/ymdk/sp64/config.h b/keyboards/ymdk/sp64/config.h new file mode 100644 index 000000000000..fc3e2d7dc2b3 --- /dev/null +++ b/keyboards/ymdk/sp64/config.h @@ -0,0 +1,45 @@ +/* +Copyright 2019 Neil Kettle + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License 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 0x594D +#define PRODUCT_ID 0x5364 +#define DEVICE_VER 0x0200 +#define MANUFACTURER YMDK +#define PRODUCT SP64 +#define DESCRIPTION YMDK Split 64 + +#define MATRIX_ROWS 6 +#define MATRIX_COLS 15 + +#define RIGHT_HALF + +/* disable these deprecated features by default */ +#define NO_ACTION_MACRO +#define NO_ACTION_FUNCTION + +/* RGB underglow */ +#define RGBLED_NUM 12 +#define RGBLIGHT_HUE_STEP 8 +#define RGBLIGHT_SAT_STEP 8 +#define RGBLIGHT_VAL_STEP 8 +#define RGBLIGHT_LIMIT_VAL 250 /* The maximum brightness level */ +#define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */ +#define RGBLIGHT_ANIMATIONS diff --git a/keyboards/ymdk/sp64/info.json b/keyboards/ymdk/sp64/info.json new file mode 100644 index 000000000000..798124d8480d --- /dev/null +++ b/keyboards/ymdk/sp64/info.json @@ -0,0 +1,79 @@ +{ + "keyboard_name": "YMDK_SP64", + "url": "", + "maintainer": "walston", + "width": 16, + "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":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, "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":7.5, "y":1}, + {"label":"U", "x":8.5, "y":1}, + {"label":"I", "x":9.5, "y":1}, + {"label":"O", "x":10.5, "y":1}, + {"label":"P", "x":11.5, "y":1}, + {"label":"{ ", "x":12.5, "y":1}, + {"label":"}", "x":13.5, "y":1}, + {"label":"|", "x":14.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":7.75, "y":2}, + {"label":"J", "x":8.75, "y":2}, + {"label":"K", "x":9.75, "y":2}, + {"label":"L", "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":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":8, "y":3}, + {"label":"M", "x":9, "y":3}, + {"label":"<", "x":10, "y":3}, + {"label":">", "x":11, "y":3}, + {"label":"?", "x":12, "y":3}, + {"label":"Shift", "x":13, "y":3}, + {"label":"Up", "x":14, "y":3}, + {"label":"F3", "x":15, "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":2.25}, + {"label":"Fn", "x":5.75, "y":4}, + {"label":"Space", "x":7.75, "y":4, "w":2.75}, + {"label":"Alt", "x":10.5, "y":4, "w":1.25}, + {"label":"Win", "x":11.75, "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/ymdk/sp64/keymaps/daed/keymap.c b/keyboards/ymdk/sp64/keymaps/daed/keymap.c new file mode 100644 index 000000000000..7174c108b34a --- /dev/null +++ b/keyboards/ymdk/sp64/keymaps/daed/keymap.c @@ -0,0 +1,140 @@ +#include QMK_KEYBOARD_H + +enum layer_names { + _BASE, + _GAMER, + _FN, + _RAISE, + _MODE, + _GACROS, +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +/* Keymap 0: Basic layer + * + * ┌-----┬-----┬-----┬-----┬-----┬-----┬-----┐ ┌-----┬-----┬-----┬-----┬-----┬-----┬----------┐ + * │ Esc │ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ │ 7 │ 8 │ 9 │ 0 │ - │ = │ BkSp │ + * ├-----┴--┬--┴--┬--┴--┬--┴--┬--┴--┬--┴--┬--┘ ┌--┴-----┴--┬--┴--┬--┴--┬--┴--┬--┴--┬--┴--┬-------┤ + * │ Tab │ Q │ W │ E │ R │ T │ │ Y │ U │ I │ O │ P │ [ │ ] │ \ │ + * ├--------┴┬----┴┬----┴┬----┴┬----┴┬----┴┐ └┬----┴┬----┴┬----┴┬----┴┬----┴┬----┴┬----┴-------┤ + * │ Ctrl │ A │ S │ D │ F │ G │ │ H │ J │ K │ L │ ; │ ' │ Enter │ + * ├---------┴┬----┴┬----┴┬----┴┬----┴┬----┴┐ └┬----┴┬----┴┬----┴┬----┴┬----┴┬----┴┬-----┬-----┤ + * │ LShift │ Z │ X │ C │ V │ B │ │ N │ M │ < │ > │ ? │ Sft │ Up │ _MO │ + * ├------┬---┴-┬---┴--┬--┴-----┴----┬┴----┬┘ ┌┴-----┴-----┴--┬--┴----┬┴-----┼-----┼-----┼-----┤ + * │ _FN │ Win │ Alt │ │ _RA │ │ │ Alt │ Win │ Lft │ Dwn │ Rgt │ + * └------┴-----┴------┴-------------┴-----┘ └---------------┴-------┴------┴-----┴-----┴-----┘ + */ +[_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_MINUS, KC_EQUAL, KC_BSPACE, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRACKET, KC_RBRACKET, KC_BSLS, + KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCOLON, KC_QUOTE, 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, MO(_MODE), + MO(_FN), KC_LGUI, KC_LALT, KC_SPACE, MO(_RAISE), KC_SPACE, KC_RALT, KC_RCTL, KC_LEFT, KC_DOWN, KC_RIGHT + ), +/* Keymap 1: Gamer layer + * + * ┌-----┬-----┬-----┬-----┬-----┬-----┬-----┐ ┌-----┬-----┬-----┬-----┬-----┬-----┬----------┐ + * │ Esc │ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ │ 7 │ 8 │ 9 │ 0 │ - │ = │ BkSp │ + * ├-----┴--┬--┴--┬--┴--┬--┴--┬--┴--┬--┴--┬--┘ ┌--┴-----┴--┬--┴--┬--┴--┬--┴--┬--┴--┬--┴--┬-------┤ + * │ Tab │ Q │ W │ E │ R │ T │ │ Y │ U │ I │ O │ P │ [ │ ] │ \ │ + * ├--------┴┬----┴┬----┴┬----┴┬----┴┬----┴┐ └┬----┴┬----┴┬----┴┬----┴┬----┴┬----┴┬----┴-------┤ + * │ Ctrl │ A │ S │ D │ F │ G │ │ H │ J │ K │ L │ ; │ ' │ Enter │ + * ├---------┴┬----┴┬----┴┬----┴┬----┴┬----┴┐ └┬----┴┬----┴┬----┴┬----┴┬----┴┬----┴┬-----┬-----┤ + * │ LShift │ Z │ X │ C │ V │ B │ │ N │ M │ < │ > │ ? │ Sft │ Up │ _MO │ + * ├------┬---┴-┬---┴--┬--┴-----┴----┬┴----┬┘ ┌┴-----┴-----┴--┬--┴----┬┴-----┼-----┼-----┼-----┤ + * │ _FN │ F13 │ Alt │ │ _GA │ │ │ Alt │ Win │ Lft │ Dwn │ Rgt │ + * └------┴-----┴------┴-------------┴-----┘ └---------------┴-------┴------┴-----┴-----┴-----┘ + */ +[_GAMER] = LAYOUT( + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINUS, KC_EQUAL, KC_BSPACE, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRACKET, KC_RBRACKET, KC_BSLS, + KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCOLON, KC_QUOTE, 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, MO(_MODE), + MO(_FN), KC_F13, KC_LALT, KC_SPACE, MO(_GACROS), KC_SPACE, KC_RALT, KC_RCTL, KC_LEFT, KC_DOWN, KC_RIGHT + ), + +/* Keymap 2: Function + * + * ┌-----┬-----┬-----┬-----┬-----┬-----┬-----┐ ┌-----┬-----┬-----┬-----┬-----┬-----┬----------┐ + * │ ` │ F1 │ F2 │ F3 │ F4 │ F5 │ F6 │ │ F7 │ F8 │ F9 │ F10 │ F11 │ F12 │ │ + * ├-----┴--┬--┴--┬--┴--┬--┴--┬--┴--┬--┴--┬--┘ ┌--┴-----┴--┬--┴--┬--┴--┬--┴--┬--┴--┬--┴--┬-------┤ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + * ├--------┴┬----┴┬----┴┬----┴┬----┴┬----┴┐ └┬----┴┬----┴┬----┴┬----┴┬----┴┬----┴┬----┴-------┤ + * │ │ │ │ │ │ │ │Left │ Up │Down │Right│ │ │ │ + * ├---------┴┬----┴┬----┴┬----┴┬----┴┬----┴┐ └┬----┴┬----┴┬----┴┬----┴┬----┴┬----┴┬-----┬-----┤ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + * ├------┬---┴-┬---┴--┬--┴-----┴----┬┴----┬┘ ┌┴-----┴-----┴--┬--┴----┬┴-----┼-----┼-----┼-----┤ + * │ │ │ │ │ │ │ │ │ │ │ │ │ + * └------┴-----┴------┴-------------┴-----┘ └---------------┴-------┴------┴-----┴-----┴-----┘ + */ +[_FN] = 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_CAPS, _______, _______, _______, _______, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_PGUP, _______, + _______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_END + ), +/* Keymap 3: Raise / Quality of life + * + * ┌-----┬-----┬-----┬-----┬-----┬-----┬-----┐ ┌-----┬-----┬-----┬-----┬-----┬-----┬----------┐ + * │ ` │ F1 │ F2 │ F3 │ F4 │ F5 │ F6 │ │ F7 │ F8 │ F9 │ F10 │ F11 │ F12 │ │ + * ├-----┴--┬--┴--┬--┴--┬--┴--┬--┴--┬--┴--┬--┘ ┌--┴-----┴--┬--┴--┬--┴--┬--┴--┬--┴--┬--┴--┬-------┤ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + * ├--------┴┬----┴┬----┴┬----┴┬----┴┬----┴┐ └┬----┴┬----┴┬----┴┬----┴┬----┴┬----┴┬----┴-------┤ + * │ │ │ │ │ │ │ │Left │ Up │Down │Right│ │ │ │ + * ├---------┴┬----┴┬----┴┬----┴┬----┴┬----┴┐ └┬----┴┬----┴┬----┴┬----┴┬----┴┬----┴┬-----┬-----┤ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + * ├------┬---┴-┬---┴--┬--┴-----┴----┬┴----┬┘ ┌┴-----┴-----┴--┬--┴----┬┴-----┼-----┼-----┼-----┤ + * │ │ │ │ │ │ │ │ │ │ │ │ │ + * └------┴-----┴------┴-------------┴-----┘ └---------------┴-------┴------┴-----┴-----┴-----┘ + */ +[_RAISE] = 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_CAPS, _______, _______, _______, _______, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_PGUP, _______, + _______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_END + ), +/* Keymap 4: Mode switching + * + * ┌-----┬-----┬-----┬-----┬-----┬-----┬-----┐ ┌-----┬-----┬-----┬-----┬-----┬-----┬----------┐ + * │ ` │ F1 │ F2 │ F3 │ F4 │ F5 │ F6 │ │ F7 │ F8 │ F9 │ F10 │ F11 │ F12 │ │ + * ├-----┴--┬--┴--┬--┴--┬--┴--┬--┴--┬--┴--┬--┘ ┌--┴-----┴--┬--┴--┬--┴--┬--┴--┬--┴--┬--┴--┬-------┤ + * │ RGB 0/1│RGBM-│RGBB+│RGBM+│ │ │ │ │ │ │ │ │ │ │ Reset │ + * ├--------┴┬----┴┬----┴┬----┴┬----┴┬----┴┐ └┬----┴┬----┴┬----┴┬----┴┬----┴┬----┴┬----┴-------┤ + * │ │RGBS-│RGBB-│RGBS+│ │ │ │Left │ Up │Down │Right│ │ │ │ + * ├---------┴┬----┴┬----┴┬----┴┬----┴┬----┴┐ └┬----┴┬----┴┬----┴┬----┴┬----┴┬----┴┬-----┬-----┤ + * │ │ │ │ │ │ │ │ │ │ │ GAME| BASE│ │ │ │ + * ├------┬---┴-┬---┴--┬--┴-----┴----┬┴----┬┘ ┌┴-----┴-----┴--┬--┴----┬┴-----┼-----┼-----┼-----┤ + * │ │ │ │ │ │ │ │ │ │ │ │ │ + * └------┴-----┴------┴-------------┴-----┘ └---------------┴-------┴------┴-----┴-----┴-----┘ + */ +[_MODE] = 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, _______, + RGB_TOG, RGB_RMOD, RGB_VAI, RGB_MOD, _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET, + _______, RGB_SPD, RGB_VAD, RGB_SPI, _______, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, TO(_GAMER), TO(_BASE), _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), +/* Keymap 5: Gaming macros + * + * ┌-----┬-----┬-----┬-----┬-----┬-----┬-----┐ ┌-----┬-----┬-----┬-----┬-----┬-----┬----------┐ + * │ ` │ F1 │ F2 │ F3 │ F4 │ F5 │ F6 │ │ F7 │ F8 │ F9 │ F10 │ F11 │ F12 │ │ + * ├-----┴--┬--┴--┬--┴--┬--┴--┬--┴--┬--┴--┬--┘ ┌--┴-----┴--┬--┴--┬--┴--┬--┴--┬--┴--┬--┴--┬-------┤ + * │ │ │ PUSH│ │ │ │ │ │ │ │ │ │ │ │ │ + * ├--------┴┬----┴┬----┴┬----┴┬----┴┬----┴┐ └┬----┴┬----┴┬----┴┬----┴┬----┴┬----┴┬----┴-------┤ + * │ │ │ FALL│ │ │ │ │Left │ Up │Down │Right│ │ │ │ + * ├---------┴┬----┴┬----┴┬----┴┬----┴┬----┴┐ └┬----┴┬----┴┬----┴┬----┴┬----┴┬----┴┬-----┬-----┤ + * │ │ │ CAP │ │ │ │ │ │ │ │ GAME| BASE│ │ │ │ + * ├------┬---┴-┬---┴--┬--┴-----┴----┬┴----┬┘ ┌┴-----┴-----┴--┬--┴----┬┴-----┼-----┼-----┼-----┤ + * │ │ │ │ │ │ │ │ │ │ │ │ │ + * └------┴-----┴------┴-------------┴-----┘ └---------------┴-------┴------┴-----┴-----┴-----┘ + */ +[_GACROS] = 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_LEFT, KC_DOWN, KC_UP, KC_RIGHT, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, TO(_GAMER), TO(_BASE), _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), +}; diff --git a/keyboards/ymdk/sp64/keymaps/default/keymap.c b/keyboards/ymdk/sp64/keymaps/default/keymap.c new file mode 100644 index 000000000000..e988d6e91b79 --- /dev/null +++ b/keyboards/ymdk/sp64/keymaps/default/keymap.c @@ -0,0 +1,74 @@ +#include QMK_KEYBOARD_H + +enum layer_names { + BASE, // default layer + _FN, // function layer + _FX // media keys +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +/* Keymap 0: Basic layer + * + * ┌-----┬-----┬-----┬-----┬-----┬-----┬-----┐ ┌-----┬-----┬-----┬-----┬-----┬-----┬----------┐ + * │ Esc │ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ │ 7 │ 8 │ 9 │ 0 │ - │ = │ BkSp │ + * ├-----┴--┬--┴--┬--┴--┬--┴--┬--┴--┬--┴--┬--┘ ┌--┴-----┴--┬--┴--┬--┴--┬--┴--┬--┴--┬--┴--┬-------┤ + * │ 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 │ < │ > │ ? │ Sft │ Up │ Fn │ + * ├------┬---┴-┬---┴--┬--┴-----┴----┬┴----┬┘ ┌┴-----┴-----┴--┬--┴----┬┴-----┼-----┼-----┼-----┤ + * │ Ctrl │ Win │ Alt │ │ Fn │ │ │ Alt │ Win │ Lft │ Dwn │ Rgt │ + * └------┴-----┴------┴-------------┴-----┘ └---------------┴-------┴------┴-----┴-----┴-----┘ + */ +[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_MINUS, KC_EQUAL, KC_BSPACE, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRACKET, KC_RBRACKET, KC_BSLS, + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCOLON, KC_QUOTE, 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, KC_F3, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPACE, MO(_FN), KC_SPACE, KC_RALT, KC_RGUI, KC_LEFT, KC_DOWN, KC_RIGHT + ), +/* Function + * + * ┌-----┬-----┬-----┬-----┬-----┬-----┬-----┐ ┌-----┬-----┬-----┬-----┬-----┬-----┬----------┐ + * │ │ F1 │ F2 │ F3 │ F4 │ F5 │ F6 │ │ F7 │ F8 │ F9 │ F10 │ F11 │ F12 │ │ + * ├-----┴--┬--┴--┬--┴--┬--┴--┬--┴--┬--┴--┬--┘ ┌--┴-----┴--┬--┴--┬--┴--┬--┴--┬--┴--┬--┴--┬-------┤ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + * ├--------┴┬----┴┬----┴┬----┴┬----┴┬----┴┐ └┬----┴┬----┴┬----┴┬----┴┬----┴┬----┴┬----┴-------┤ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + * ├---------┴┬----┴┬----┴┬----┴┬----┴┬----┴┐ └┬----┴┬----┴┬----┴┬----┴┬----┴┬----┴┬-----┬-----┤ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + * ├------┬---┴-┬---┴--┬--┴-----┴----┬┴----┬┘ ┌┴-----┴-----┴--┬--┴----┬┴-----┼-----┼-----┼-----┤ + * │ │ │ │ │ │ │ │ │ │ │ │ │ + * └------┴-----┴------┴-------------┴-----┘ └---------------┴-------┴------┴-----┴-----┴-----┘ + */ +[_FN] = 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, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), +/* Media + * + * ┌-----┬-----┬-----┬-----┬-----┬-----┬-----┐ ┌-----┬-----┬-----┬-----┬-----┬-----┬----------┐ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + * ├-----┴--┬--┴--┬--┴--┬--┴--┬--┴--┬--┴--┬--┘ ┌--┴--┬--┴--┬--┴--┬--┴--┬--┴--┬--┴--┬--┴--┬-------┤ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + * ├--------┴┬----┴┬----┴┬----┴┬----┴┬----┴┐ └┬----┴┬----┴┬----┴┬----┴┬----┴┬----┴┬----┴-------┤ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + * ├---------┴┬----┴┬----┴┬----┴┬----┴┬----┴┐ └┬----┴┬----┴┬----┴┬----┴┬----┴┬----┴┬-----┬-----┤ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + * ├------┬---┴-┬---┴--┬--┴-----┴----┬┴----┬┘ ┌┴-----┴-----┴--┬--┴----┬┴-----┼-----┼-----┼-----┤ + * │ │ │ │ │ │ │ │ │ │ │ │ │ + * └------┴-----┴------┴-------------┴-----┘ └---------------┴-------┴------┴-----┴-----┴-----┘ + */ +[_FX] = LAYOUT( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), +}; + diff --git a/keyboards/ymdk/sp64/keymaps/walston/keymap.c b/keyboards/ymdk/sp64/keymaps/walston/keymap.c new file mode 100644 index 000000000000..ada3073fb99b --- /dev/null +++ b/keyboards/ymdk/sp64/keymaps/walston/keymap.c @@ -0,0 +1,94 @@ +#include QMK_KEYBOARD_H +enum layer_names { + BASE, // default layer + _FUN, // function layer + _NUMPAD, // num-pad + _MEDIA // media keys +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +/* Keymap 0: Basic layer + * + * ┌-----┬-----┬-----┬-----┬-----┬-----┬-----┐ ┌-----┬-----┬-----┬-----┬-----┬-----┬----------┐ + * │ ` │ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ │ 7 │ 8 │ 9 │ 0 │ - │ = │ BkSp │ + * ├-----┴--┬--┴--┬--┴--┬--┴--┬--┴--┬--┴--┬--┘ ┌--┴-----┴--┬--┴--┬--┴--┬--┴--┬--┴--┬--┴--┬-------┤ + * │ Tab │ Q │ W │ E │ R │ T │ │ Y │ U │ I │ O │ P │ [ │ ] │ \ │ + * ├--------┴┬----┴┬----┴┬----┴┬----┴┬----┴┐ └┬----┴┬----┴┬----┴┬----┴┬----┴┬----┴┬----┴-------┤ + * │ Ctrl │ A │ S │ D │ F │ G │ │ H │ J │ K │ L │ ; │ ' │ Enter │ + * ├---------┴┬----┴┬----┴┬----┴┬----┴┬----┴┐ └┬----┴┬----┴┬----┴┬----┴┬----┴┬----┴┬-----┬-----┤ + * │ LShift │ Z │ X │ C │ V │ B │ │ N │ M │ < │ > │ ? │ Sft │ Up │_MED │ + * ├------┬---┴-┬---┴--┬--┴-----┴----┬┴----┬┘ ┌┴-----┴-----┴--┬--┴----┬┴-----┼-----┼-----┼-----┤ + * │ _NUM │_MED │ Alt │ Cmd │ Spc │ │ Space │ Cmd │ Alt │ Lft │ Dwn │ Rgt │ + * └------┴-----┴------┴-------------┴-----┘ └---------------┴-------┴------┴-----┴-----┴-----┘ + */ +[BASE] = LAYOUT( + MT(RESET, KC_GRAVE), KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINUS, KC_EQUAL, KC_BSPACE, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRACKET, KC_RBRACKET, KC_BSLS, + KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCOLON, KC_QUOTE, 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, OSL(_MEDIA), + LT(_NUMPAD, KC_CAPS), TT(_MEDIA), KC_LALT, KC_LGUI, LT(_FUN, KC_SPACE), KC_SPACE, KC_RGUI, KC_RALT, KC_LEFT, KC_DOWN, KC_RIGHT + ), +/* Keymap 1: Function Layer / Vim Arrows + * + * ┌-----┬-----┬-----┬-----┬-----┬-----┬-----┐ ┌-----┬-----┬-----┬-----┬-----┬-----┬----------┐ + * │ Esc │ F1 │ F2 │ F3 │ F4 │ F5 │ F6 │ │ F7 │ F8 │ F9 │ F10 │ F11 │ F12 │ │ + * ├-----┴--┬--┴--┬--┴--┬--┴--┬--┴--┬--┴--┬--┘ ┌--┴-----┴--┬--┴--┬--┴--┬--┴--┬--┴--┬--┴--┬-------┤ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + * ├--------┴┬----┴┬----┴┬----┴┬----┴┬----┴┐ └┬----┴┬----┴┬----┴┬----┴┬----┴┬----┴┬----┴-------┤ + * │ │ │ │ │ │ │ │ │Left │ Up │Down │Right│ │ │ + * ├---------┴┬----┴┬----┴┬----┴┬----┴┬----┴┐ └┬----┴┬----┴┬----┴┬----┴┬----┴┬----┴┬-----┬-----┤ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + * ├------┬---┴-┬---┴--┬--┴-----┴----┬┴----┬┘ ┌┴-----┴-----┴--┬--┴----┬┴-----┼-----┼-----┼-----┤ + * │ │ │ │ │ │ │ │ │ │ │ │ │ + * └------┴-----┴------┴-------------┴-----┘ └---------------┴-------┴------┴-----┴-----┴-----┘ + */ +[_FUN] = 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_LEFT, KC_UP, KC_DOWN, KC_RIGHT, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), +/* Keymap 2: NumPad + * + * ┌-----┬-----┬-----┬-----┬-----┬-----┬-----┐ ┌-----┬-----┬-----┬-----┬-----┬-----┬----------┐ + * │ │ │ │ │ │ │ │ │ 7 │ 8 │ 9 │ │ Vol-│ Vol+│ Mute │ + * ├-----┴--┬--┴--┬--┴--┬--┴--┬--┴--┬--┴--┬--┘ ┌--┴--┬--┴--┬--┴--┬--┴--┬--┴--┬--┴--┬--┴--┬-------┤ + * │ │ │ │ │ │ │ │ │ 4 │ 5 │ 6 │ │ |<< │ >>| │ >|| │ + * ├--------┴┬----┴┬----┴┬----┴┬----┴┬----┴┐ └┬----┴┬----┴┬----┴┬----┴┬----┴┬----┴┬----┴-------┤ + * │ │ │ │ │ │ │ │ │ 1 │ 2 │ 3 │ │ │ │ + * ├---------┴┬----┴┬----┴┬----┴┬----┴┬----┴┐ └┬----┴┬----┴┬----┴┬----┴┬----┴┬----┴┬-----┬-----┤ + * │ │ │ │ │ │ │ │ │ 0 │ │ │ │ │ │ │ + * ├------┬---┴-┬---┴--┬--┴-----┴----┬┴----┬┘ ┌┴-----┴-----┴--┬--┴----┬┴-----┼-----┼-----┼-----┤ + * │ │ │ │ │ │ │ │ │ │ │ │ │ + * └------┴-----┴------┴-------------┴-----┘ └---------------┴-------┴------┴-----┴-----┴-----┘ + */ +[_NUMPAD] = LAYOUT( + _______, _______, _______, _______, _______, _______, _______, KC_P7, KC_P8, KC_P9, _______, KC_VOLD, KC_VOLU, KC_MUTE, + _______, _______, _______, _______, _______, _______, _______, KC_P4, KC_P5, KC_P6, _______, KC_MPRV, KC_MNXT, KC_MPLY, + _______, _______, _______, _______, _______, _______, _______, KC_P1, KC_P2, KC_P3, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, KC_P0, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), +/* Keymap 3: Media + * + * ┌-----┬-----┬-----┬-----┬-----┬-----┬-----┐ ┌-----┬-----┬-----┬-----┬-----┬-----┬----------┐ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + * ├-----┴--┬--┴--┬--┴--┬--┴--┬--┴--┬--┴--┬--┘ ┌--┴--┬--┴--┬--┴--┬--┴--┬--┴--┬--┴--┬--┴--┬-------┤ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + * ├--------┴┬----┴┬----┴┬----┴┬----┴┬----┴┐ └┬----┴┬----┴┬----┴┬----┴┬----┴┬----┴┬----┴-------┤ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + * ├---------┴┬----┴┬----┴┬----┴┬----┴┬----┴┐ └┬----┴┬----┴┬----┴┬----┴┬----┴┬----┴┬-----┬-----┤ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + * ├------┬---┴-┬---┴--┬--┴-----┴----┬┴----┬┘ ┌┴-----┴-----┴--┬--┴----┬┴-----┼-----┼-----┼-----┤ + * │ │ │ │ Backlight │ │ │ │ │ │ │ │ │ + * └------┴-----┴------┴-------------┴-----┘ └---------------┴-------┴------┴-----┴-----┴-----┘ + */ +[_MEDIA] = LAYOUT( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, RGB_TOG, _______, _______, _______, _______, _______, _______, _______ + ), +}; diff --git a/keyboards/ymdk/sp64/keymaps/walston/rules.mk b/keyboards/ymdk/sp64/keymaps/walston/rules.mk new file mode 100644 index 000000000000..a6c5cfa18a0c --- /dev/null +++ b/keyboards/ymdk/sp64/keymaps/walston/rules.mk @@ -0,0 +1 @@ +COMMAND_ENABLE = no diff --git a/keyboards/ymdk/sp64/matrix.c b/keyboards/ymdk/sp64/matrix.c new file mode 100644 index 000000000000..8dd2bb8d765b --- /dev/null +++ b/keyboards/ymdk/sp64/matrix.c @@ -0,0 +1,169 @@ +/* +Copyright 2013 Oleg Kostyuk +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#include "matrix.h" +#include +#include +#include +#include "wait.h" +#include "action_layer.h" +#include "print.h" +#include "debug.h" +#include "util.h" +#include "sp64.h" +#include "debounce.h" + +/* matrix state(1:on, 0:off) */ +static matrix_row_t matrix[MATRIX_ROWS]; + +// Debouncing: store for each key the number of scans until it's eligible to +// change. When scanning the matrix, ignore any changes in keys that have +// already changed in the last DEBOUNCE scans. +static matrix_row_t matrix_debouncing[MATRIX_ROWS]; + +static void matrix_select_row(uint8_t row); + +#ifdef RIGHT_HALF +static uint8_t mcp23018_reset_loop = 0; +#endif + +void matrix_init(void) +{ + // all outputs for rows high + DDRB = 0xFF; + PORTB = 0xFF; + // all inputs for columns + DDRA = 0x00; + DDRC &= ~(0x111111<<2); + DDRD &= ~(1<= 1300) { + // since mcp23018_reset_loop is 8 bit - we'll try to reset once in 255 matrix scans + // this will be approx bit more frequent than once per second + print("trying to reset mcp23018\n"); + mcp23018_status = init_mcp23018(); + if (mcp23018_status) { + print("left side not responding\n"); + } else { + print("left side attached\n"); + } + } + } +#endif + bool changed = false; + for (uint8_t row = 0; row < MATRIX_ROWS; row++) + { + matrix_row_t cols; + + matrix_select_row(row); +#ifndef RIGHT_HALF + _delay_us(5); +#endif + + cols = ( + // cols 0..7, PORTA 0 -> 7 + (~PINA) & 0xFF + ); + +#ifdef RIGHT_HALF + uint8_t data = 0x7F; + // Receive the columns from right half + i2c_receive(I2C_ADDR_WRITE, &data, 1, MCP23018_I2C_TIMEOUT); + cols |= ((~(data) & 0x7F) << 7); +#endif + + if (matrix_debouncing[row] != cols) { + matrix_debouncing[row] = cols; + //debouncing = DEBOUNCE; + changed = true; + } + } + + debounce(matrix_debouncing, matrix, MATRIX_ROWS, changed); + + matrix_scan_quantum(); + +#ifdef DEBUG_MATRIX + for (uint8_t c = 0; c < MATRIX_COLS; c++) + for (uint8_t r = 0; r < MATRIX_ROWS; r++) + if (matrix_is_on(r, c)) xprintf("r:%d c:%d \n", r, c); +#endif + + return (uint8_t)changed; +} + +inline +matrix_row_t matrix_get_row(uint8_t row) +{ + return matrix[row]; +} + +void matrix_print(void) +{ + print("\nr/c 0123456789ABCDEF\n"); + for (uint8_t row = 0; row < MATRIX_ROWS; row++) { + phex(row); print(": "); + pbin_reverse16(matrix_get_row(row)); + print("\n"); + } +} + +uint8_t matrix_key_count(void) +{ + uint8_t count = 0; + for (uint8_t i = 0; i < MATRIX_ROWS; i++) { + count += bitpop16(matrix[i]); + } + return count; +} + +static void matrix_select_row(uint8_t row) +{ +#ifdef RIGHT_HALF + uint8_t txdata[3]; + + //Set the remote row on port A + txdata[0] = GPIOA; + txdata[1] = 0xFF & ~(1<. + */ + +#include "sp64.h" + +#ifdef RIGHT_HALF +bool i2c_initialized = 0; +i2c_status_t mcp23018_status = I2C_STATUS_ERROR; + +uint8_t init_mcp23018(void) +{ + uint8_t data[3]; + mcp23018_status = I2C_STATUS_ERROR; + + // I2C subsystem + if (i2c_initialized == 0) { + i2c_init(); // on pins D(1,0) + i2c_initialized = true; + _delay_ms(1000); + } + + // set pin direction + // - unused : input : 1 + // - input : input : 1 + // - driving : output : + data[0] = IODIRA; + data[1] = 0b00000000; + data[2] = 0b11111111; + mcp23018_status = i2c_transmit(I2C_ADDR_WRITE, (uint8_t *)data, 3, MCP23018_I2C_TIMEOUT); + if (mcp23018_status != I2C_STATUS_SUCCESS) + goto out; + + // set pull-up + // - unused : on : 1 + // - input : on : 1 + // - driving : off : 0 + data[0] = GPPUA; + data[1] = 0b00000000; + data[2] = 0b11111111; + mcp23018_status = i2c_transmit(I2C_ADDR_WRITE, (uint8_t *)data, 3, MCP23018_I2C_TIMEOUT); + if (mcp23018_status != I2C_STATUS_SUCCESS) + goto out; + + // set logical value (doesn't matter on inputs) + // - unused : hi-Z : 1 + // - input : hi-Z : 1 + // - driving : hi-Z : 1 + data[0] = OLATA; + data[1] = 0b11111111; + data[2] = 0b11111111; + mcp23018_status = i2c_transmit(I2C_ADDR_WRITE, (uint8_t *)data, 3, MCP23018_I2C_TIMEOUT); + +out: + return (mcp23018_status); +} +#endif + +// Optional override functions below. +// You can leave any or all of these undefined. +// These are only required if you want to perform custom actions. + +__attribute__ ((weak)) +void matrix_init_user(void) {} + +void matrix_init_kb(void) { + // put your keyboard start-up code here + // runs once when the firmware starts up + + matrix_init_user(); +} + +__attribute__ ((weak)) +void matrix_scan_user(void) {} + +void matrix_scan_kb(void) { + // put your looping keyboard code here + // runs every cycle (a lot) + + matrix_scan_user(); +} diff --git a/keyboards/ymdk/sp64/sp64.h b/keyboards/ymdk/sp64/sp64.h new file mode 100644 index 000000000000..63620f0c3ca1 --- /dev/null +++ b/keyboards/ymdk/sp64/sp64.h @@ -0,0 +1,84 @@ +/* Copyright 2019 Neil Kettle + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License 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 RIGHT_HALF +# include +# include "i2c_master.h" + +// I2C aliases and register addresses (see "mcp23018.md") +# define I2C_ADDR 0b0100000 +# define I2C_ADDR_WRITE ( (I2C_ADDR<<1) | I2C_WRITE ) +# define I2C_ADDR_READ ( (I2C_ADDR<<1) | I2C_READ ) +# define IODIRA 0x00 // i/o direction register +# define IODIRB 0x01 +# define GPPUA 0x0C // GPIO pull-up resistor register +# define GPPUB 0x0D +# define GPIOA 0x12 // general purpose i/o port register (write modifies OLAT) +# define GPIOB 0x13 +# define OLATA 0x14 // output latch register +# define OLATB 0x15 + +extern i2c_status_t mcp23018_status; +# define MCP23018_I2C_TIMEOUT 100 + +uint8_t init_mcp23018(void); +#endif + +#define ___ KC_NO +#define XXX 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. + * + * LEFT HAND RIGHT HAND + * ┌-----┬-----┬-----┬-----┬-----┬-----┬-----┐ ┌-----┬-----┬-----┬-----┬-----┬-----┬----------┐ + * │ L00 │ L01 │ L02 │ L03 │ L04 │ L05 │ L06 │ │ R07 │ R08 │ R09 │ R0A │ R0B │ R0C │ R0D │ + * ├-----┴--┬--┴--┬--┴--┬--┴--┬--┴--┬--┴--┬--┘ ┌--┴--┬--┴--┬--┴--┬--┴--┬--┴--┬--┴--┬--┴--┬-------┤ + * │ L10 │ L11 │ L12 │ L13 │ L14 │ L15 │ │ R16 │ R17 │ R18 │ R19 │ R1A │ R1B │ R1C │ R1D │ + * ├--------┴┬----┴┬----┴┬----┴┬----┴┬----┴┐ └┬----┴┬----┴┬----┴┬----┴┬----┴┬----┴┬----┴-------┤ + * │ L20 │ L21 │ L22 │ L23 │ L24 │ L25 │ │ R26 │ R27 │ R28 │ R29 │ R2A │ R2B │ R2C │ + * ├---------┴┬----┴┬----┴┬----┴┬----┴┬----┴┐ └┬----┴┬----┴┬----┴┬----┴┬----┴┬----┴┬-----┬-----┤ + * │ L30 │ L31 │ L32 │ L33 │ L34 │ L35 │ │ R36 │ R37 │ R38 │ R39 │ R3A │ R3B │ R3C │ R3D │ + * ├------┬---┴-┬---┴--┬--┴-----┴----┬┴----┬┘ ┌┴-----┴-----┴--┬--┴----┬┴-----┼-----┼-----┼-----┤ + * │ L40 │ L41 │ L42 │ L43 │ L45 │ │ R46 │ R48 │ R4A │ R4B │ R4C │ R4D │ + * └------┴-----┴------┴-------------┴-----┘ └---------------┴-------┴------┴-----┴-----┴-----┘ + */ +#define LAYOUT( \ + L00, L01, L02, L03, L04, L05, L06, R07, R08, R09, R0A, R0B, R0C, R0D, \ + L10, L11, L12, L13, L14, L15, R16, R17, R18, R19, R1A, R1B, R1C, R1D, \ + L20, L21, L22, L23, L24, L25, R26, R27, R28, R29, R2A, R2B, R2C, \ + L30, L31, L32, L33, L34, L35, R36, R37, R38, R39, R3A, R3B, R3C, R3D, \ + L40, L41, L42, L43, L45, R46, R48, R4A, R4B, R4C, R4D \ + ) \ + /* matrix positions */ \ + { \ + { ___, ___, ___, ___, ___, ___, ___, R46, R48, R4A, R4B, R4C, R4D, R3D }, \ + { L40, L41, L42, L43, L45, L06, ___, R36, R37, R38, R39, R3A, R3B, R3C }, \ + { L30, L31, L32, L33, L34, L35, ___, R26, R27, R28, R29, R2A, R2B, R2C }, \ + { L20, L21, L22, L23, L24, L25, ___, R17, R18, R19, R1A, R1B, R1C, R1D }, \ + { L10, L11, L12, L13, L14, L15, ___, R07, R08, R09, R0A, R0B, R0C, R0D }, \ + { L00, L01, L02, L03, L04, L05, ___, R16, ___, ___, ___, ___, ___, ___ } \ + } + From db80209e697770cca0ba44e437efa548247b387f Mon Sep 17 00:00:00 2001 From: Ryan Date: Fri, 19 Jun 2020 04:37:47 +1000 Subject: [PATCH 192/930] Parse version better in `qmk doctor` GCC version checks (#9324) --- lib/python/qmk/cli/doctor.py | 15 +++++++++++++-- lib/python/qmk/tests/test_cli_commands.py | 8 ++++---- 2 files changed, 17 insertions(+), 6 deletions(-) diff --git a/lib/python/qmk/cli/doctor.py b/lib/python/qmk/cli/doctor.py index 011c3dd3c23b..4d7ba52181da 100755 --- a/lib/python/qmk/cli/doctor.py +++ b/lib/python/qmk/cli/doctor.py @@ -3,6 +3,7 @@ Check out the user's QMK environment and make sure it's ready to compile. """ import platform +import re import shutil import subprocess from pathlib import Path @@ -50,6 +51,16 @@ def _deprecated_udev_rule(vid, pid=None): return 'SUBSYSTEMS=="usb", ATTRS{idVendor}=="%s", MODE:="0666"' % vid +def parse_gcc_version(version): + m = re.match(r"(\d+)(?:\.(\d+))?(?:\.(\d+))?", version) + + return { + 'major': int(m.group(1)), + 'minor': int(m.group(2)) if m.group(2) else 0, + 'patch': int(m.group(3)) if m.group(3) else 0 + } + + def check_arm_gcc_version(): """Returns True if the arm-none-eabi-gcc version is not known to cause problems. """ @@ -66,8 +77,8 @@ def check_avr_gcc_version(): if 'output' in ESSENTIAL_BINARIES['avr-gcc']: version_number = ESSENTIAL_BINARIES['avr-gcc']['output'].strip() - major, minor, rest = version_number.split('.', 2) - if int(major) > 8: + parsed_version = parse_gcc_version(version_number) + if parsed_version['major'] > 8: cli.log.error('We do not recommend avr-gcc newer than 8. Downgrading to 8.x is recommended.') return False diff --git a/lib/python/qmk/tests/test_cli_commands.py b/lib/python/qmk/tests/test_cli_commands.py index dce270de83cf..68f8ed604744 100644 --- a/lib/python/qmk/tests/test_cli_commands.py +++ b/lib/python/qmk/tests/test_cli_commands.py @@ -115,7 +115,7 @@ def test_list_keymaps_no_keyboard_found(): def test_json2c(): result = check_subcommand('json2c', 'keyboards/handwired/onekey/keymaps/default_json/keymap.json') check_returncode(result, 0) - assert result.stdout == '#include QMK_KEYBOARD_H\nconst uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {\t[0] = LAYOUT(KC_A)};\n\n' + assert result.stdout == '#include QMK_KEYBOARD_H\nconst uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {\t[0] = LAYOUT_ortho_1x1(KC_A)};\n\n' def test_info(): @@ -132,7 +132,7 @@ def test_info_keyboard_render(): check_returncode(result) assert 'Keyboard Name: handwired/onekey/pytest' in result.stdout assert 'Processor: STM32F303' in result.stdout - assert 'Layout:' in result.stdout + assert 'Layouts:' in result.stdout assert 'k0' in result.stdout @@ -149,6 +149,6 @@ def test_info_matrix_render(): check_returncode(result) assert 'Keyboard Name: handwired/onekey/pytest' in result.stdout assert 'Processor: STM32F303' in result.stdout - assert 'LAYOUT' in result.stdout + assert 'LAYOUT_ortho_1x1' in result.stdout assert '│0A│' in result.stdout - assert 'Matrix for "LAYOUT"' in result.stdout + assert 'Matrix for "LAYOUT_ortho_1x1"' in result.stdout From 016b4be7515797e28b586fca731c092814339f7d Mon Sep 17 00:00:00 2001 From: Takeshi ISHII <2170248+mtei@users.noreply.github.com> Date: Fri, 19 Jun 2020 04:53:16 +0900 Subject: [PATCH 193/930] Update docs/ja/feature_backlight.md: apply #9043's change (#9454) --- docs/ja/feature_backlight.md | 58 ++++++++++++++++++------------------ 1 file changed, 29 insertions(+), 29 deletions(-) diff --git a/docs/ja/feature_backlight.md b/docs/ja/feature_backlight.md index e722656b79e8..760c6444c235 100644 --- a/docs/ja/feature_backlight.md +++ b/docs/ja/feature_backlight.md @@ -1,8 +1,8 @@ # バックライト 多くのキーボードは、キースイッチを貫通して配置されたり、キースイッチの下に配置された個々の LED によって、バックライトキーをサポートします。この機能は通常スイッチごとに単一の色しか使用できないため、[RGB アンダーグロー](ja/feature_rgblight.md)および [RGB マトリックス](ja/feature_rgb_matrix.md)機能のどちらとも異なりますが、キーボードに複数の異なる単一色の LED を取り付けることは当然可能です。 @@ -94,29 +94,29 @@ BACKLIGHT_DRIVER = pwm ハードウェア PWM は以下の表に従ってサポートされます: -| バックライトピン | AT90USB64/128 | ATmega16/32U4 | ATmega16/32U2 | ATmega32A | ATmega328P | +| バックライトピン | AT90USB64/128 | ATmega16/32U4 | ATmega16/32U2 | ATmega32A | ATmega328/P | |-------------|-------------|-------------|-------------|---------|----------| -| `B1` | | | | | Timer 1 | -| `B2` | | | | | Timer 1 | -| `B5` | Timer 1 | Timer 1 | | | | -| `B6` | Timer 1 | Timer 1 | | | | -| `B7` | Timer 1 | Timer 1 | Timer 1 | | | -| `C4` | Timer 3 | | | | | -| `C5` | Timer 3 | | Timer 1 | | | -| `C6` | Timer 3 | Timer 3 | Timer 1 | | | -| `D4` | | | | Timer 1 | | -| `D5` | | | | Timer 1 | | +| `B1` | | | | | Timer 1 | +| `B2` | | | | | Timer 1 | +| `B5` | Timer 1 | Timer 1 | | | | +| `B6` | Timer 1 | Timer 1 | | | | +| `B7` | Timer 1 | Timer 1 | Timer 1 | | | +| `C4` | Timer 3 | | | | | +| `C5` | Timer 3 | | Timer 1 | | | +| `C6` | Timer 3 | Timer 3 | Timer 1 | | | +| `D4` | | | | Timer 1 | | +| `D5` | | | | Timer 1 | | 他の全てのピンはソフトウェア PWM を使います。[オーディオ](ja/feature_audio.md)機能が無効あるいは1つのタイマだけを使っている場合は、ハードウェアタイマによってバックライト PWM を引き起こすことができます: | オーディオピン | オーディオタイマ | ソフトウェア PWM タイマ | |---------|-----------|------------------| -| `C4` | Timer 3 | Timer 1 | -| `C5` | Timer 3 | Timer 1 | -| `C6` | Timer 3 | Timer 1 | -| `B5` | Timer 1 | Timer 3 | -| `B6` | Timer 1 | Timer 3 | -| `B7` | Timer 1 | Timer 3 | +| `C4` | Timer 3 | Timer 1 | +| `C5` | Timer 3 | Timer 1 | +| `C6` | Timer 3 | Timer 1 | +| `B5` | Timer 1 | Timer 3 | +| `B6` | Timer 1 | Timer 3 | +| `B7` | Timer 1 | Timer 3 | 両方のタイマーがオーディオのために使われている場合、バックライト PWM はハードウェアタイマを使いませんが、代わりにマトリックススキャンの間に引き起こされます。この場合、PWM の計算は十分なタイミングの精度で呼ばれないかもしれないため、バックライトの明滅はサポートされず、バックライトもちらつくかもしれません。 @@ -126,13 +126,13 @@ BACKLIGHT_DRIVER = pwm | 定義 | デフォルト | 説明 | |---------------------|-------------|--------------------------------------------------------------------------------------------------------------| -| `BACKLIGHT_PIN` | `B7` | LED を制御するピン。自身のキーボードを設計している場合を除き、これを変更する必要はないはずです | -| `BACKLIGHT_PINS` | *定義なし* | 実験的: 詳細は以下を見てください | -| `BACKLIGHT_LEVELS` | `3` | 輝度のレベルの数 (オフを除いて最大 31) | +| `BACKLIGHT_PIN` | `B7` | LED を制御するピン。自身のキーボードを設計している場合を除き、これを変更する必要はないはずです | +| `BACKLIGHT_PINS` | *定義なし* | 実験的: 詳細は以下を見てください | +| `BACKLIGHT_LEVELS` | `3` | 輝度のレベルの数 (オフを除いて最大 31) | | `BACKLIGHT_CAPS_LOCK` | *定義なし* | バックライトを使って Caps Lock のインジケータを有効にする (専用 LED の無いキーボードのため) | | `BACKLIGHT_BREATHING` | *定義なし* | サポートされる場合は、バックライトの明滅動作を有効にする | -| `BREATHING_PERIOD` | `6` | 各バックライトの "明滅" の長さ(秒) | -| `BACKLIGHT_ON_STATE` | `1` | バックライトが "オン" の時のバックライトピンの状態 - high の場合は `1`、low の場合は `0` | +| `BREATHING_PERIOD` | `6` | 各バックライトの "明滅" の長さ(秒) | +| `BACKLIGHT_ON_STATE` | `1` | バックライトが "オン" の時のバックライトピンの状態 - high の場合は `1`、low の場合は `0` | ### バックライトオン状態 @@ -192,10 +192,10 @@ BACKLIGHT_DRIVER = pwm | 定義 | デフォルト | 説明 | |------------------------|-------------|-------------------------------------------------------------------------------------------------------------| -| `BACKLIGHT_PIN` | `B7` | LED を制御するピン。自身のキーボードを設計している場合を除き、これを変更する必要はないはずです | -| `BACKLIGHT_PWM_DRIVER` | `PWMD4` | 使用する PWM ドライバ。ピンから PWM タイマへのマッピングについては、ST データシートを見てください。自身のキーボードを設計している場合を除き、これを変更する必要はないはずです | -| `BACKLIGHT_PWM_CHANNEL` | `3` | 使用する PWM チャンネル。ピンから PWM チャンネルへのマッピングについては、ST データシートを見てください。自身のキーボードを設計している場合を除き、これを変更する必要はないはずです | -| `BACKLIGHT_PAL_MODE` | `2` | 使用するピンの代替機能。ピンの AF マッピングについては ST データシートを見てください。自身のキーボードを設計している場合を除き、これを変更する必要はないはずです | +| `BACKLIGHT_PIN` | `B7` | LED を制御するピン。自身のキーボードを設計している場合を除き、これを変更する必要はないはずです | +| `BACKLIGHT_PWM_DRIVER` | `PWMD4` | 使用する PWM ドライバ。ピンから PWM タイマへのマッピングについては、ST データシートを見てください。自身のキーボードを設計している場合を除き、これを変更する必要はないはずです | +| `BACKLIGHT_PWM_CHANNEL` | `3` | 使用する PWM チャンネル。ピンから PWM チャンネルへのマッピングについては、ST データシートを見てください。自身のキーボードを設計している場合を除き、これを変更する必要はないはずです | +| `BACKLIGHT_PAL_MODE` | `2` | 使用するピンの代替機能。ピンの AF マッピングについては ST データシートを見てください。自身のキーボードを設計している場合を除き、これを変更する必要はないはずです | ## Software PWM Driver :id=software-pwm-driver @@ -210,7 +210,7 @@ BACKLIGHT_DRIVER = software | 定義 | デフォルト | 説明 | |-----------------|-------------|-------------------------------------------------------------------------------------------------------------| -| `BACKLIGHT_PIN` | `B7` | LED を制御するピン。自身のキーボードを設計している場合を除き、これを変更する必要はないはずです | +| `BACKLIGHT_PIN` | `B7` | LED を制御するピン。自身のキーボードを設計している場合を除き、これを変更する必要はないはずです | | `BACKLIGHT_PINS` | *定義なし* | 実験的: 詳細は以下を見てください | ### 複数のバックライトピン From 7be65f2cd04c90ee5146139509762baa3f286520 Mon Sep 17 00:00:00 2001 From: Rozakiin <6567067+Rozakiin@users.noreply.github.com> Date: Thu, 18 Jun 2020 21:14:09 +0100 Subject: [PATCH 194/930] Add VIA support to Noxary 220 and Update Noxary 280 for readability (#9348) * Update noxary 220 readme.md * Update Noxary 280 readme.md add heading and spelling * Update spelling of Noxary 280 keymap copyright * Update Noxary 280 config.h change product ID and product name, remove commented code * Change MCU name and disable Mousekey * Update Noxary 220 config.h Change vendor ID, Product ID, Product name and desc, remove commented code * Update 220.h change LAYOUT_ortho_6x4 to LAYOUT, change copyrght to Rozakiin * Change LED indicator function update copyright to Rozakiin * Add via keymap * Update Noxary 220 default keymap for readability and numpad codes * Update all Noxary 220 readme.md to conform to QMK templates * Update Noxary 280 readme.md to conform to QMK template * Disable console and command, and enable link time optimisation for VIA * Update Noxary 280 keymaps for better readability * Update keyboards/noxary/220/keymaps/default/keymap.c * Update keyboards/noxary/220/220.h * Update keyboards/noxary/220/keymaps/default/keymap.c * Update keyboards/noxary/220/keymaps/default/keymap.c * Update keyboards/noxary/220/keymaps/via/rules.mk * Update keyboards/noxary/280/keymaps/default/keymap.c * Update keyboards/noxary/280/keymaps/via/rules.mk * Update keyboards/noxary/220/rules.mk * Update keyboards/noxary/280/keymaps/via/keymap.c * Update keyboards/noxary/220/keymaps/default/keymap.c * Update keyboards/noxary/220/keymaps/default/keymap.c * Update keyboards/noxary/220/keymaps/via/keymap.c * Update keyboards/noxary/220/keymaps/via/keymap.c * Update keyboards/noxary/220/keymaps/via/keymap.c * Update keyboards/noxary/220/keymaps/via/keymap.c * Update keyboards/noxary/220/keymaps/via/keymap.c * Update keyboards/noxary/280/config.h * Update keyboards/noxary/220/rules.mk * Update keyboards/noxary/220/config.h * Update keyboards/noxary/280/readme.md Change layout links to ones with background removed --- keyboards/noxary/220/220.c | 40 +--- keyboards/noxary/220/220.h | 2 +- keyboards/noxary/220/config.h | 36 +--- keyboards/noxary/220/keymaps/default/keymap.c | 155 ++++++++++----- .../noxary/220/keymaps/default/readme.md | 2 + keyboards/noxary/220/keymaps/via/keymap.c | 122 ++++++++++++ keyboards/noxary/220/keymaps/via/readme.md | 3 + keyboards/noxary/220/keymaps/via/rules.mk | 5 + keyboards/noxary/220/readme.md | 4 +- keyboards/noxary/220/rules.mk | 5 +- keyboards/noxary/280/config.h | 35 +--- keyboards/noxary/280/keymaps/default/keymap.c | 169 +++++++++------- .../noxary/280/keymaps/default/readme.md | 2 + keyboards/noxary/280/keymaps/via/keymap.c | 185 +++++++++--------- keyboards/noxary/280/keymaps/via/readme.md | 2 + keyboards/noxary/280/keymaps/via/rules.mk | 3 + keyboards/noxary/280/readme.md | 10 +- 17 files changed, 459 insertions(+), 321 deletions(-) create mode 100644 keyboards/noxary/220/keymaps/via/keymap.c create mode 100644 keyboards/noxary/220/keymaps/via/readme.md create mode 100644 keyboards/noxary/220/keymaps/via/rules.mk diff --git a/keyboards/noxary/220/220.c b/keyboards/noxary/220/220.c index e671e15a43a4..0af57ff36d83 100644 --- a/keyboards/noxary/220/220.c +++ b/keyboards/noxary/220/220.c @@ -1,4 +1,4 @@ -/* Copyright 2019 MechMerlin +/* Copyright 2020 Rozakiin * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -26,37 +26,9 @@ 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) { - // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here - if (IS_LED_ON(usb_led, USB_LED_NUM_LOCK)) { - writePinLow(C6); - } else { - writePinHigh(C6); - } - led_set_user(usb_led); +bool led_update_kb(led_t led_state) { + if(led_update_user(led_state)) { + writePin(C6, led_state.num_lock); + } + return true; } \ No newline at end of file diff --git a/keyboards/noxary/220/220.h b/keyboards/noxary/220/220.h index 3f1375e2a6a4..26419976c873 100644 --- a/keyboards/noxary/220/220.h +++ b/keyboards/noxary/220/220.h @@ -1,4 +1,4 @@ -/* Copyright 2019 MechMerlin +/* Copyright 2019 Rozakiin * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/keyboards/noxary/220/config.h b/keyboards/noxary/220/config.h index 1242de61bc27..757113807634 100644 --- a/keyboards/noxary/220/config.h +++ b/keyboards/noxary/220/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 0x6060 +#define VENDOR_ID 0x4E58 //"NX" +#define PRODUCT_ID 0x00DC //220 #define DEVICE_VER 0x0001 #define MANUFACTURER Noxary #define PRODUCT 220 -#define DESCRIPTION A custom numpad +#define DESCRIPTION A custom numpad keyboard. /* key matrix size */ #define MATRIX_ROWS 6 @@ -57,42 +57,12 @@ along with this program. If not, see . #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 -/* 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 */ diff --git a/keyboards/noxary/220/keymaps/default/keymap.c b/keyboards/noxary/220/keymaps/default/keymap.c index a72841db5467..ec49ea160d8f 100644 --- a/keyboards/noxary/220/keymaps/default/keymap.c +++ b/keyboards/noxary/220/keymaps/default/keymap.c @@ -15,62 +15,109 @@ */ #include QMK_KEYBOARD_H -// Defines the keycodes used by our macros in process_record_user -enum custom_keycodes { - QMKBEST = SAFE_RANGE, - QMKURL +// 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 { + _BL, + _FL1, + _FL2, + _FL3 }; const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - - LAYOUT_ortho_6x4( - KC_ESC, BL_TOGG, BL_DEC, BL_INC, - KC_NLCK, KC_SLSH, KC_ASTR, KC_PEQL, - KC_7, KC_8, KC_9, KC_PMNS, - KC_4, KC_5, KC_6, KC_PPLS, - KC_1, KC_2, KC_3, KC_PENT, - KC_0, KC_0, KC_DEL, KC_PENT), - - LAYOUT_ortho_6x4( - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), + /* Base Layer + * ┌───┬───┬───┬───┐ + * │Esc│BLT│BL-│BL+│ + * ├───┼───┼───┼───┤ + * │NLK│ / │ * │ = │ + * ├───┼───┼───┼───┤ + * │ 7 │ 8 │ 9 │ - │ + * ├───┼───┼───┼───┤ + * │ 4 │ 5 │ 6 │ + │ + * ├───┼───┼───┼───┤ + * │ 1 │ 2 │ 3 │ENT│ + * ├───┼───┼───┼───┤ + * │ 0 │ 0 │ . │ENT│ + * └───┴───┴───┴───┘ + */ + [_BL] = LAYOUT_ortho_6x4( + KC_ESC, BL_TOGG, BL_DEC, BL_INC, + KC_NLCK, KC_PSLS, KC_PAST, KC_PEQL, + KC_P7, KC_P8, KC_P9, KC_PMNS, + KC_P4, KC_P5, KC_P6, KC_PPLS, + KC_P1, KC_P2, KC_P3, KC_PENT, + KC_P0, KC_P0, KC_PDOT, KC_PENT + ), + /* Function Layer 1 + * ┌───┬───┬───┬───┐ + * │ │ │ │ │ + * ├───┼───┼───┼───┤ + * │ │ │ │ │ + * ├───┼───┼───┼───┤ + * │ │ │ │ │ + * ├───┼───┼───┼───┤ + * │ │ │ │ │ + * ├───┼───┼───┼───┤ + * │ │ │ │ │ + * ├───┼───┼───┼───┤ + * │ │ │ │ │ + * └───┴───┴───┴───┘ + */ + [_FL1] = LAYOUT_ortho_6x4( + _______, _______, _______, _______, + _______, _______, _______, _______, + _______, _______, _______, _______, + _______, _______, _______, _______, + _______, _______, _______, _______, + _______, _______, _______, _______ + ), + /* Function Layer 2 + * ┌───┬───┬───┬───┐ + * │ │ │ │ │ + * ├───┼───┼───┼───┤ + * │ │ │ │ │ + * ├───┼───┼───┼───┤ + * │ │ │ │ │ + * ├───┼───┼───┼───┤ + * │ │ │ │ │ + * ├───┼───┼───┼───┤ + * │ │ │ │ │ + * ├───┼───┼───┼───┤ + * │ │ │ │ │ + * └───┴───┴───┴───┘ + */ + [_FL2] = LAYOUT_ortho_6x4( + _______, _______, _______, _______, + _______, _______, _______, _______, + _______, _______, _______, _______, + _______, _______, _______, _______, + _______, _______, _______, _______, + _______, _______, _______, _______ + ), + /* Function Layer 3 + * ┌───┬───┬───┬───┐ + * │ │ │ │ │ + * ├───┼───┼───┼───┤ + * │ │ │ │ │ + * ├───┼───┼───┼───┤ + * │ │ │ │ │ + * ├───┼───┼───┼───┤ + * │ │ │ │ │ + * ├───┼───┼───┼───┤ + * │ │ │ │ │ + * ├───┼───┼───┼───┤ + * │ │ │ │ │ + * └───┴───┴───┴───┘ + */ + [_FL3] = LAYOUT_ortho_6x4( + _______, _______, _______, _______, + _______, _______, _______, _______, + _______, _______, _______, _______, + _______, _______, _______, _______, + _______, _______, _______, _______, + _______, _______, _______, _______ + ), }; - -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/noxary/220/keymaps/default/readme.md b/keyboards/noxary/220/keymaps/default/readme.md index bff7feda38a1..40f25464a07f 100644 --- a/keyboards/noxary/220/keymaps/default/readme.md +++ b/keyboards/noxary/220/keymaps/default/readme.md @@ -1 +1,3 @@ +![Noxary 220 Layout Image](https://i.imgur.com/jVQ50lt.png) + # The default keymap for Noxary 220 \ No newline at end of file diff --git a/keyboards/noxary/220/keymaps/via/keymap.c b/keyboards/noxary/220/keymaps/via/keymap.c new file mode 100644 index 000000000000..1bfc7a8d044a --- /dev/null +++ b/keyboards/noxary/220/keymaps/via/keymap.c @@ -0,0 +1,122 @@ +/* Copyright 2020 Rozakiin + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public 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. +enum layer_names { + _BL, + _FL1, + _FL2, + _FL3 +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* Base Layer + * ┌───┬───┬───┬───┐ + * │Esc│BLT│BL-│BL+│ + * ├───┼───┼───┼───┤ + * │NLK│ / │ * │ = │ + * ├───┼───┼───┼───┤ + * │ 7 │ 8 │ 9 │ - │ + * ├───┼───┼───┼───┤ + * │ 4 │ 5 │ 6 │ + │ + * ├───┼───┼───┼───┤ + * │ 1 │ 2 │ 3 │ENT│ + * ├───┼───┼───┼───┤ + * │ 0 │ 0 │ . │ENT│ + * └───┴───┴───┴───┘ + */ + [_BL] = LAYOUT_ortho_6x4( + KC_ESC, BL_TOGG, BL_DEC, BL_INC, + KC_NLCK, KC_PSLS, KC_PAST, KC_PEQL, + KC_P7, KC_P8, KC_P9, KC_PMNS, + KC_P4, KC_P5, KC_P6, KC_PPLS, + KC_P1, KC_P2, KC_P3, KC_PENT, + KC_P0, KC_P0, KC_PDOT, KC_PENT + ), + /* Function Layer 1 + * ┌───┬───┬───┬───┐ + * │ │ │ │ │ + * ├───┼───┼───┼───┤ + * │ │ │ │ │ + * ├───┼───┼───┼───┤ + * │ │ │ │ │ + * ├───┼───┼───┼───┤ + * │ │ │ │ │ + * ├───┼───┼───┼───┤ + * │ │ │ │ │ + * ├───┼───┼───┼───┤ + * │ │ │ │ │ + * └───┴───┴───┴───┘ + */ + [_FL1] = LAYOUT_ortho_6x4( + _______, _______, _______, _______, + _______, _______, _______, _______, + _______, _______, _______, _______, + _______, _______, _______, _______, + _______, _______, _______, _______, + _______, _______, _______, _______ + ), + /* Function Layer 2 + * ┌───┬───┬───┬───┐ + * │ │ │ │ │ + * ├───┼───┼───┼───┤ + * │ │ │ │ │ + * ├───┼───┼───┼───┤ + * │ │ │ │ │ + * ├───┼───┼───┼───┤ + * │ │ │ │ │ + * ├───┼───┼───┼───┤ + * │ │ │ │ │ + * ├───┼───┼───┼───┤ + * │ │ │ │ │ + * └───┴───┴───┴───┘ + */ + [_FL2] = LAYOUT_ortho_6x4( + _______, _______, _______, _______, + _______, _______, _______, _______, + _______, _______, _______, _______, + _______, _______, _______, _______, + _______, _______, _______, _______, + _______, _______, _______, _______ + ), + /* Function Layer 3 + * ┌───┬───┬───┬───┐ + * │ │ │ │ │ + * ├───┼───┼───┼───┤ + * │ │ │ │ │ + * ├───┼───┼───┼───┤ + * │ │ │ │ │ + * ├───┼───┼───┼───┤ + * │ │ │ │ │ + * ├───┼───┼───┼───┤ + * │ │ │ │ │ + * ├───┼───┼───┼───┤ + * │ │ │ │ │ + * └───┴───┴───┴───┘ + */ + [_FL3] = LAYOUT_ortho_6x4( + _______, _______, _______, _______, + _______, _______, _______, _______, + _______, _______, _______, _______, + _______, _______, _______, _______, + _______, _______, _______, _______, + _______, _______, _______, _______ + ), +}; diff --git a/keyboards/noxary/220/keymaps/via/readme.md b/keyboards/noxary/220/keymaps/via/readme.md new file mode 100644 index 000000000000..1e2b4542d7a1 --- /dev/null +++ b/keyboards/noxary/220/keymaps/via/readme.md @@ -0,0 +1,3 @@ +![Noxary 220 Layout Image](https://i.imgur.com/GsswjSf.png) + +# The VIA keymap for Noxary 220 \ No newline at end of file diff --git a/keyboards/noxary/220/keymaps/via/rules.mk b/keyboards/noxary/220/keymaps/via/rules.mk new file mode 100644 index 000000000000..c2e96d233b21 --- /dev/null +++ b/keyboards/noxary/220/keymaps/via/rules.mk @@ -0,0 +1,5 @@ +VIA_ENABLE = yes +MOUSEKEY_ENABLE = no +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = no # Commands for debug and configuration +LTO_ENABLE = yes diff --git a/keyboards/noxary/220/readme.md b/keyboards/noxary/220/readme.md index 1fcdfcc3c744..bae50c413752 100644 --- a/keyboards/noxary/220/readme.md +++ b/keyboards/noxary/220/readme.md @@ -1,6 +1,8 @@ # Noxary 220 -A fully customizable numpad +![Noxary 220](https://i.imgur.com/8XCxJhP.png) + +A fully customizable (4x6) numpad keyboard. Keyboard Maintainer: [MechMerlin](https://github.com/mechmerlin), [Rozakiin](https://github.com/rozakiin) Hardware Supported: Noxary 220 PCB diff --git a/keyboards/noxary/220/rules.mk b/keyboards/noxary/220/rules.mk index f099fefb5d23..8d6532925a10 100644 --- a/keyboards/noxary/220/rules.mk +++ b/keyboards/noxary/220/rules.mk @@ -1,5 +1,5 @@ # MCU name -MCU = atmega32u4 +MCU = atmega32u2 # Bootloader selection # Teensy halfkay @@ -14,7 +14,7 @@ BOOTLOADER = atmel-dfu # 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 = yes # Console for debug @@ -30,6 +30,5 @@ UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = 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 diff --git a/keyboards/noxary/280/config.h b/keyboards/noxary/280/config.h index d0a10866a92e..0fe0121733bf 100644 --- a/keyboards/noxary/280/config.h +++ b/keyboards/noxary/280/config.h @@ -20,12 +20,12 @@ along with this program. If not, see . #include "config_common.h" /* USB Device descriptor parameter */ -#define VENDOR_ID 0x4E58 -#define PRODUCT_ID 0x0050 +#define VENDOR_ID 0x4E58 //"NX" +#define PRODUCT_ID 0x0118 //280 #define DEVICE_VER 0x0001 #define MANUFACTURER Noxary #define PRODUCT 280 -#define DESCRIPTION A custom TKL +#define DESCRIPTION A custom TKL keyboard. /* key matrix size */ #define MATRIX_ROWS 12 @@ -57,33 +57,6 @@ along with this program. If not, see . #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 @@ -91,8 +64,6 @@ 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 */ diff --git a/keyboards/noxary/280/keymaps/default/keymap.c b/keyboards/noxary/280/keymaps/default/keymap.c index 3d993e04253c..38fff0da2fd0 100644 --- a/keyboards/noxary/280/keymaps/default/keymap.c +++ b/keyboards/noxary/280/keymaps/default/keymap.c @@ -1,4 +1,4 @@ -/* Copyright 2019 Rozakin +/* Copyright 2020 Rozakiin * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -15,35 +15,34 @@ */ #include QMK_KEYBOARD_H -// Defines the keycodes used by our macros in process_record_user -enum custom_keycodes { - QMKBEST = SAFE_RANGE, - QMKURL -}; - // 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 +enum layer_names { + _BL, + _FL1, + _FL2, + _FL3 +}; + 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| - * `------------------------------------------------------------' `--------------' + /* Base Layer - For ISO enter use ANSI enter + * ┌───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┬───┐┌───┬───┬───┐ + * │ESC│ │F1 │F2 │F3 │F4 │ │F5 │F6 │F7 │F8 │ │F9 │F10│F11│F12││PRT│SLK│PSE│ + * └───┘ └───┴───┴───┴───┘ └───┴───┴───┴───┘ └───┴───┴───┴───┘└───┴───┴───┘ + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐┌───┬───┬───┐ + * │ ` │ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ - │ = │ \ │BSP││INS│HME│PUP│ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤├───┼───┼───┤ + * │ TAB │ Q │ W │ E │ R │ T │ Y │ U │ I │ O │ P │ [ │ ] │ \ ││DEL│END│PDN│ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤└───┴───┴───┘ + * │ CAPS │ A │ S │ D │ F │ G │ H │ J │ K │ L │ ; │ ' │ ENTER │ + * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┬───┤ ┌───┐ + * │SFT │ \ │ Z │ X │ C │ V │ B │ N │ M │ , │ . │ / │Shift │M1 │ │ ↑ │ + * ├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬┴───┤┌───┼───┼───┐ + * │CTRL│Win │ALT │ SPC │ALT │WIN │M(1)│CTRL││ ← │ ↓ │ → │ + * └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘└───┴───┴───┘ */ [_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, @@ -51,52 +50,78 @@ 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, 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( - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______), - - + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, MO(_FL1), KC_RCTRL, KC_LEFT, KC_DOWN, KC_RGHT + ), + /* Function Layer 1 - For ISO enter use ANSI enter + * ┌───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┬───┐┌───┬───┬───┐ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ││ │ │ │ + * └───┘ └───┴───┴───┴───┘ └───┴───┴───┴───┘ └───┴───┴───┴───┘└───┴───┴───┘ + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐┌───┬───┬───┐ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ││ │ │ │ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤├───┼───┼───┤ + * │ │ │ │ │ │RST│ │ │ │ │ │ │ │ ││ │ │ │ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤└───┴───┴───┘ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │ + * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┬───┤ ┌───┐ + * │ │ │ │ │ │ │ │ │ │BL-│BL+│ │ MUTE │ │ │VL+│ + * ├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬┴───┤┌───┼───┼───┐ + * │ │ │ │ BL_TOGGLE │ │ │ │ ││ │VL-│ │ + * └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘└───┴───┴───┘ + */ + [_FL1] = LAYOUT( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, BL_DEC, BL_INC, _______, KC_MUTE, _______, KC_VOLU, + _______, _______, _______, BL_TOGG, _______, _______, _______, _______, _______, KC_VOLD, _______ + ), + /* Function Layer 2 - For ISO enter use ANSI enter + * ┌───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┬───┐┌───┬───┬───┐ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ││ │ │ │ + * └───┘ └───┴───┴───┴───┘ └───┴───┴───┴───┘ └───┴───┴───┴───┘└───┴───┴───┘ + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐┌───┬───┬───┐ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ││ │ │ │ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤├───┼───┼───┤ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │ ││ │ │ │ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤└───┴───┴───┘ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │ + * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┬───┤ ┌───┐ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + * ├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬┴───┤┌───┼───┼───┐ + * │ │ │ │ │ │ │ │ ││ │ │ │ + * └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘└───┴───┴───┘ + */ + [_FL2] = LAYOUT( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + /* Function Layer 3 - For ISO enter use ANSI enter + * ┌───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┬───┐┌───┬───┬───┐ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ││ │ │ │ + * └───┘ └───┴───┴───┴───┘ └───┴───┴───┴───┘ └───┴───┴───┴───┘└───┴───┴───┘ + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐┌───┬───┬───┐ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ││ │ │ │ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤├───┼───┼───┤ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │ ││ │ │ │ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤└───┴───┴───┘ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │ + * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┬───┤ ┌───┐ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + * ├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬┴───┤┌───┼───┼───┐ + * │ │ │ │ │ │ │ │ ││ │ │ │ + * └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘└───┴───┴───┘ + */ + [_FL3] = LAYOUT( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), }; - diff --git a/keyboards/noxary/280/keymaps/default/readme.md b/keyboards/noxary/280/keymaps/default/readme.md index e1a03dc002da..3b6bc24f32fd 100644 --- a/keyboards/noxary/280/keymaps/default/readme.md +++ b/keyboards/noxary/280/keymaps/default/readme.md @@ -1 +1,3 @@ +![Noxary 280 Layout Image](https://i.imgur.com/7Go0py2.png) + # The default keymap for Noxary 280 \ No newline at end of file diff --git a/keyboards/noxary/280/keymaps/via/keymap.c b/keyboards/noxary/280/keymaps/via/keymap.c index d7fe69170245..38fff0da2fd0 100644 --- a/keyboards/noxary/280/keymaps/via/keymap.c +++ b/keyboards/noxary/280/keymaps/via/keymap.c @@ -1,4 +1,4 @@ -/* Copyright 2019 Rozakin +/* Copyright 2020 Rozakiin * * This 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,26 +19,30 @@ // 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 +enum layer_names { + _BL, + _FL1, + _FL2, + _FL3 +}; + 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| - * `------------------------------------------------------------' `--------------' + /* Base Layer - For ISO enter use ANSI enter + * ┌───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┬───┐┌───┬───┬───┐ + * │ESC│ │F1 │F2 │F3 │F4 │ │F5 │F6 │F7 │F8 │ │F9 │F10│F11│F12││PRT│SLK│PSE│ + * └───┘ └───┴───┴───┴───┘ └───┴───┴───┴───┘ └───┴───┴───┴───┘└───┴───┴───┘ + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐┌───┬───┬───┐ + * │ ` │ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ - │ = │ \ │BSP││INS│HME│PUP│ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤├───┼───┼───┤ + * │ TAB │ Q │ W │ E │ R │ T │ Y │ U │ I │ O │ P │ [ │ ] │ \ ││DEL│END│PDN│ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤└───┴───┴───┘ + * │ CAPS │ A │ S │ D │ F │ G │ H │ J │ K │ L │ ; │ ' │ ENTER │ + * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┬───┤ ┌───┐ + * │SFT │ \ │ Z │ X │ C │ V │ B │ N │ M │ , │ . │ / │Shift │M1 │ │ ↑ │ + * ├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬┴───┤┌───┼───┼───┐ + * │CTRL│Win │ALT │ SPC │ALT │WIN │M(1)│CTRL││ ← │ ↓ │ → │ + * └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘└───┴───┴───┘ */ [_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, @@ -46,73 +50,78 @@ 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, 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( - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______), - + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, MO(_FL1), KC_RCTRL, KC_LEFT, KC_DOWN, KC_RGHT + ), + /* Function Layer 1 - For ISO enter use ANSI enter + * ┌───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┬───┐┌───┬───┬───┐ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ││ │ │ │ + * └───┘ └───┴───┴───┴───┘ └───┴───┴───┴───┘ └───┴───┴───┴───┘└───┴───┴───┘ + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐┌───┬───┬───┐ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ││ │ │ │ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤├───┼───┼───┤ + * │ │ │ │ │ │RST│ │ │ │ │ │ │ │ ││ │ │ │ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤└───┴───┴───┘ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │ + * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┬───┤ ┌───┐ + * │ │ │ │ │ │ │ │ │ │BL-│BL+│ │ MUTE │ │ │VL+│ + * ├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬┴───┤┌───┼───┼───┐ + * │ │ │ │ BL_TOGGLE │ │ │ │ ││ │VL-│ │ + * └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘└───┴───┴───┘ + */ + [_FL1] = LAYOUT( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, BL_DEC, BL_INC, _______, KC_MUTE, _______, KC_VOLU, + _______, _______, _______, BL_TOGG, _______, _______, _______, _______, _______, KC_VOLD, _______ + ), + /* Function Layer 2 - For ISO enter use ANSI enter + * ┌───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┬───┐┌───┬───┬───┐ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ││ │ │ │ + * └───┘ └───┴───┴───┴───┘ └───┴───┴───┴───┘ └───┴───┴───┴───┘└───┴───┴───┘ + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐┌───┬───┬───┐ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ││ │ │ │ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤├───┼───┼───┤ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │ ││ │ │ │ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤└───┴───┴───┘ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │ + * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┬───┤ ┌───┐ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + * ├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬┴───┤┌───┼───┼───┐ + * │ │ │ │ │ │ │ │ ││ │ │ │ + * └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘└───┴───┴───┘ + */ + [_FL2] = LAYOUT( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + /* 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 index 71535a3bd701..e4a1d5d4ed09 100644 --- a/keyboards/noxary/280/keymaps/via/readme.md +++ b/keyboards/noxary/280/keymaps/via/readme.md @@ -1 +1,3 @@ +![Noxary 280 Layout Image](https://i.imgur.com/7Go0py2.png) + # 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 index 96d2d189b2e6..c2e96d233b21 100644 --- a/keyboards/noxary/280/keymaps/via/rules.mk +++ b/keyboards/noxary/280/keymaps/via/rules.mk @@ -1,2 +1,5 @@ VIA_ENABLE = yes MOUSEKEY_ENABLE = no +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = no # Commands for debug and configuration +LTO_ENABLE = yes diff --git a/keyboards/noxary/280/readme.md b/keyboards/noxary/280/readme.md index 5af7441ddf71..1668594a8ba8 100644 --- a/keyboards/noxary/280/readme.md +++ b/keyboards/noxary/280/readme.md @@ -1,9 +1,13 @@ -Noxary 280 +# Noxary 280 + +![Noxary 280 WKL](https://i.imgur.com/CuQz0qWl.png) +![Noxary 280 WK](https://i.imgur.com/iAQYzsql.png) + A fully customizable TKL keyboard. -Keyboard Maintainer: [MechMerlin](https://github.com/mechmerlin), [Rozakin](https://github.com/rozakiin) -Hardware Supported: 280 PCB +Keyboard Maintainer: [MechMerlin](https://github.com/mechmerlin), [Rozakiin](https://github.com/rozakiin) +Hardware Supported: Noxary 280 PCB Hardware Availability: [Geekhack Group Buy](https://geekhack.org/index.php?topic=95660.0) Make example for this keyboard (after setting up your build environment): From 3eefe31a54df07f5624f49632d986dff9725afe4 Mon Sep 17 00:00:00 2001 From: Niclas Date: Fri, 19 Jun 2020 01:32:27 +0000 Subject: [PATCH 195/930] Keymap: Add custom keymap for Planck (#9417) * Keymap: Add custom keymap for Planck * Fixup buffet's planck keymap --- keyboards/planck/keymaps/buffet/config.h | 46 +++ keyboards/planck/keymaps/buffet/keymap.c | 384 ++++++++++++++++++ keyboards/planck/keymaps/buffet/readme.md | 104 +++++ .../planck/keymaps/buffet/rgb_matrix_user.inc | 18 + keyboards/planck/keymaps/buffet/rules.mk | 6 + 5 files changed, 558 insertions(+) create mode 100644 keyboards/planck/keymaps/buffet/config.h create mode 100644 keyboards/planck/keymaps/buffet/keymap.c create mode 100644 keyboards/planck/keymaps/buffet/readme.md create mode 100644 keyboards/planck/keymaps/buffet/rgb_matrix_user.inc create mode 100644 keyboards/planck/keymaps/buffet/rules.mk diff --git a/keyboards/planck/keymaps/buffet/config.h b/keyboards/planck/keymaps/buffet/config.h new file mode 100644 index 000000000000..478b282b3113 --- /dev/null +++ b/keyboards/planck/keymaps/buffet/config.h @@ -0,0 +1,46 @@ +#pragma once + +#define TAPPING_TERM 150 +#define PERMISSIVE_HOLD + +// Disable all RGB effects +#define DISABLE_RGB_MATRIX_GRADIENT_LEFT_RIGHT +#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 + +// Most tactile encoders have detents every 4 stages +#define ENCODER_RESOLUTION 4 diff --git a/keyboards/planck/keymaps/buffet/keymap.c b/keyboards/planck/keymaps/buffet/keymap.c new file mode 100644 index 000000000000..78a9f711c495 --- /dev/null +++ b/keyboards/planck/keymaps/buffet/keymap.c @@ -0,0 +1,384 @@ +/* Copyright 2015-2017 Jack Humbert + * 2020 Niclas Meyer + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public 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 K(kc) (1ull<<((kc) - ALPHA)) + +#define KALPHA K(ALPHA) +#define KBETA K(BETA) +#define KGAMMA K(GAMMA) +#define KDELTA K(DELTA) +#define KEPSILON K(EPSILON) +#define KZETA K(ZETA) +#define KTHETA K(THETA) +#define KIOTA K(IOTA) +#define KKAPPA K(KAPPA) + +enum keys { + ALPHA = SAFE_RANGE, + BETA, + GAMMA, + DELTA, + EPSILON, + ZETA, + THETA, + IOTA, + KAPPA, + LOCK, + NONE, +}; + +enum layers { + NORMAL, + QWERTY, + GAME, + LOWER, + RAISE, + PHI, + FN, +}; + +#define XXXX KC_NO +#define ____ KC_TRNS + +#define CQWER LM(QWERTY, MOD_LCTL) +#define AQWER LM(QWERTY, MOD_LALT) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [NORMAL] = LAYOUT_planck_grid( + ALPHA, BETA, GAMMA, DELTA, ____, ____, ____, ____, DELTA, GAMMA, BETA, ALPHA, + EPSILON, ZETA, THETA, IOTA, ____, ____, ____, ____, IOTA, THETA, ZETA, EPSILON, + ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, + MO(PHI), CQWER, AQWER, MO(FN), KAPPA, ____, XXXX, KAPPA, MO(FN), ____, ____, MO(PHI) + ), + [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_SFTENT, + MO(PHI), KC_LCTL, KC_LALT, KC_LGUI, MO(LOWER), KC_SPC, XXXX, MO(RAISE), KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT + ), + [GAME] = LAYOUT_planck_grid( + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, + KC_LSFT, KC_A, KC_S, KC_D, KC_F, KC_G, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT, + KC_LCTL, KC_Z, KC_X, KC_C, KC_SPC, ____, XXXX, ____, KC_V, KC_B, ____, MO(PHI) + ), + [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_DEL, ____, ____, ____, ____, ____, ____, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, + ____, ____, ____, ____, ____, ____, ____, KC_PGUP, KC_PGDN, KC_HOME, KC_END, ____, + ____, ____, ____, ____, ____, ____, XXXX, ____, 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_DEL, + KC_DEL, ____, ____, ____, ____, ____, ____, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, + ____, ____, ____, ____, ____, ____, ____, KC_PGUP, KC_PGDN, KC_HOME, KC_END, ____, + ____, ____, ____, ____, ____, ____, XXXX, ____, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY + ), + [PHI] = LAYOUT_planck_grid( + RESET, KC_F1, KC_F2, KC_F3, KC_F4, ____, ____, ____, ____, ____, ____, KC_DEL, + ____, KC_F5, KC_F6, KC_F7, KC_F8, ____, ____, DF(QWERTY), DF(NORMAL), DF(GAME), ____, KC_F13, + ____, KC_F9, KC_F10, KC_F11, KC_F12, ____, ____, ____, ____, ____, ____, ____, + ____, RGB_TOG, RGB_MOD, ____, ____, ____, XXXX, ____, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY + ), + [FN] = LAYOUT_planck_grid( + ____, ____, KC_UP, ____, ____, ____, ____, ____, ____, KC_UP, ____, ____, + KC_DEL, KC_LEFT, KC_DOWN, KC_RIGHT, ____, ____, ____, ____, KC_LEFT, KC_DOWN, KC_RIGHT, KC_DEL, + KC_HOME, KC_END, KC_PGUP, KC_PGDN, ____, ____, ____, ____, KC_PGDN, KC_PGUP, KC_HOME, KC_END, + ____, ____, ____, ____, ____, ____, XXXX, ____, ____, ____, ____, ____ + ), +}; + +static uint16_t left_chord = 0; +static uint16_t right_chord = 0; + +static bool locking = false; +static bool locked = false; +static uint16_t mods = 0; + +#define PROCESS_MOD(mod) \ + do { \ + if ((mods & MOD_##mod) && !(keys & MOD_##mod)) { \ + unregister_code16(KC_##mod); \ + } \ + if (!(mods & MOD_##mod) && (keys & MOD_##mod)) { \ + register_code16(KC_##mod); \ + } \ + } while (0) + +static void process_keys(uint16_t keys) { + if (keys == NONE) { + return; + } + + if (keys == LOCK) { + locking = !locking; + return; + } + + if ((keys & QK_ONE_SHOT_MOD) == QK_ONE_SHOT_MOD) { + PROCESS_MOD(LCTL); + PROCESS_MOD(LSFT); + PROCESS_MOD(LALT); + PROCESS_MOD(LGUI); + + mods = keys & ~QK_ONE_SHOT_MOD; + locked = false; + + if (locking) { + locking = false; + locked = true; + } + + return; + } + + // Normal key + tap_code16(keys); + locking = false; + + if (mods && !locked) { + if (mods & MOD_LCTL) { + unregister_code16(KC_LCTL); + } + + if (mods & MOD_LSFT) { + unregister_code16(KC_LSFT); + } + + if (mods & MOD_LALT) { + unregister_code16(KC_LALT); + } + + if (mods & MOD_LGUI) { + unregister_code16(KC_LGUI); + } + + mods = 0; + } +} + +static uint16_t chord_to_keys(uint16_t chord) { + switch (chord) { + // Unshifted Extra + case KKAPPA: return KC_SPC; + case KEPSILON | KZETA | KTHETA | KIOTA: return KC_ENT; + case KEPSILON | KZETA | KGAMMA | KIOTA: return KC_TAB; + case KEPSILON | KIOTA: return KC_BSPC; + case KKAPPA | KEPSILON: return KC_ESC; + + // Shifted Extra + case KKAPPA | KEPSILON | KZETA | KTHETA | KIOTA: return S(KC_ENT); + case KKAPPA | KEPSILON | KZETA | KGAMMA | KIOTA: return S(KC_TAB); + case KKAPPA | KEPSILON | KIOTA: return S(KC_BSPC); + + // Lowercase Letters + case KBETA: return KC_A; + case KZETA | KDELTA: return KC_B; + case KBETA | KGAMMA | KDELTA: return KC_C; + case KZETA | KTHETA | KIOTA: return KC_D; + case KDELTA: return KC_E; + case KGAMMA | KIOTA: return KC_F; + case KBETA | KTHETA: return KC_G; + case KZETA | KTHETA: return KC_H; + case KGAMMA: return KC_I; + case KBETA | KGAMMA | KIOTA: return KC_J; + case KBETA | KTHETA | KIOTA: return KC_K; + case KBETA | KGAMMA: return KC_L; + case KBETA | KDELTA: return KC_M; + case KZETA: return KC_N; + case KTHETA: return KC_O; + case KZETA | KGAMMA: return KC_P; + case KBETA | KTHETA | KDELTA: return KC_Q; + case KGAMMA | KDELTA: return KC_R; + case KTHETA | KIOTA: return KC_S; + case KIOTA: return KC_T; + case KZETA | KIOTA: return KC_U; + case KTHETA | KDELTA: return KC_V; + case KZETA | KGAMMA | KIOTA: return KC_W; + case KZETA | KTHETA | KDELTA: return KC_X; + case KBETA | KIOTA: return KC_Y; + case KZETA | KGAMMA | KDELTA: return KC_Z; + + // Uppercase Letters + case KKAPPA | KBETA: return S(KC_A); + case KKAPPA | KZETA | KDELTA: return S(KC_B); + case KKAPPA | KBETA | KGAMMA | KDELTA: return S(KC_C); + case KKAPPA | KZETA | KTHETA | KIOTA: return S(KC_D); + case KKAPPA | KDELTA: return S(KC_E); + case KKAPPA | KGAMMA | KIOTA: return S(KC_F); + case KKAPPA | KBETA | KTHETA: return S(KC_G); + case KKAPPA | KZETA | KTHETA: return S(KC_H); + case KKAPPA | KGAMMA: return S(KC_I); + case KKAPPA | KBETA | KGAMMA | KIOTA: return S(KC_J); + case KKAPPA | KBETA | KTHETA | KIOTA: return S(KC_K); + case KKAPPA | KBETA | KGAMMA: return S(KC_L); + case KKAPPA | KBETA | KDELTA: return S(KC_M); + case KKAPPA | KZETA: return S(KC_N); + case KKAPPA | KTHETA: return S(KC_O); + case KKAPPA | KZETA | KGAMMA: return S(KC_P); + case KKAPPA | KBETA | KTHETA | KDELTA: return S(KC_Q); + case KKAPPA | KGAMMA | KDELTA: return S(KC_R); + case KKAPPA | KTHETA | KIOTA: return S(KC_S); + case KKAPPA | KIOTA: return S(KC_T); + case KKAPPA | KZETA | KIOTA: return S(KC_U); + case KKAPPA | KTHETA | KDELTA: return S(KC_V); + case KKAPPA | KZETA | KGAMMA | KIOTA: return S(KC_W); + case KKAPPA | KZETA | KTHETA | KDELTA: return S(KC_X); + case KKAPPA | KBETA | KIOTA: return S(KC_Y); + case KKAPPA | KZETA | KGAMMA | KDELTA: return S(KC_Z); + + // Unshifted Numbers + case KEPSILON | KZETA: return KC_0; + case KEPSILON | KZETA | KIOTA: return KC_1; + case KEPSILON | KZETA | KTHETA: return KC_2; + case KEPSILON | KBETA: return KC_3; + case KEPSILON | KBETA | KDELTA: return KC_4; + case KEPSILON | KBETA | KGAMMA: return KC_5; + case KEPSILON | KBETA | KIOTA: return KC_6; + case KEPSILON | KTHETA: return KC_7; + case KEPSILON | KBETA | KGAMMA | KIOTA: return KC_8; + case KEPSILON | KGAMMA | KDELTA: return KC_9; + + // Shifted Numbers + case KKAPPA | KEPSILON | KZETA | KIOTA: return KC_EXLM; + case KKAPPA | KEPSILON | KZETA | KTHETA: return KC_AT; + case KKAPPA | KEPSILON | KBETA: return KC_HASH; + case KKAPPA | KEPSILON | KBETA | KDELTA: return KC_DLR; + case KKAPPA | KEPSILON | KBETA | KGAMMA: return KC_PERC; + case KKAPPA | KEPSILON | KBETA | KIOTA: return KC_CIRC; + case KKAPPA | KEPSILON | KTHETA: return KC_AMPR; + case KKAPPA | KEPSILON | KBETA | KGAMMA | KIOTA: return KC_ASTR; + case KKAPPA | KEPSILON | KGAMMA | KDELTA: return KC_LPRN; + case KKAPPA | KEPSILON | KZETA: return KC_RPRN; + + // Unshifted Symbols + case KEPSILON | KBETA | KTHETA | KIOTA: return KC_MINS; + case KEPSILON | KZETA | KTHETA | KDELTA: return KC_EQL; + case KEPSILON | KZETA | KGAMMA: return KC_LBRC; + case KEPSILON | KGAMMA | KIOTA: return KC_RBRC; + case KEPSILON | KBETA | KTHETA: return KC_BSLS; + case KEPSILON | KBETA | KGAMMA | KDELTA: return KC_SCLN; + case KEPSILON | KZETA | KDELTA: return KC_QUOT; + case KEPSILON | KTHETA | KIOTA: return KC_COMM; + case KEPSILON | KZETA | KGAMMA | KDELTA: return KC_DOT; + case KEPSILON | KGAMMA: return KC_SLSH; + case KEPSILON | KDELTA: return KC_GRV; + + // Shifted Symbols + case KKAPPA | KEPSILON | KBETA | KTHETA | KIOTA: return KC_UNDS; + case KKAPPA | KEPSILON | KZETA | KTHETA | KDELTA: return KC_PLUS; + case KKAPPA | KEPSILON | KZETA | KGAMMA: return KC_LCBR; + case KKAPPA | KEPSILON | KGAMMA | KIOTA: return KC_RCBR; + case KKAPPA | KEPSILON | KBETA | KTHETA: return KC_PIPE; + case KKAPPA | KEPSILON | KBETA | KGAMMA | KDELTA: return KC_COLN; + case KKAPPA | KEPSILON | KZETA | KDELTA: return KC_DQT; + case KKAPPA | KEPSILON | KTHETA | KIOTA: return KC_LT; + case KKAPPA | KEPSILON | KZETA | KGAMMA | KDELTA: return KC_GT; + case KKAPPA | KEPSILON | KGAMMA: return KC_QUES; + case KKAPPA | KEPSILON | KDELTA: return KC_TILD; + + // Modifiers + case KALPHA | KIOTA: return LOCK; + + case KALPHA: return QK_ONE_SHOT_MOD; // Release all + + case KALPHA | KBETA: return OSM(MOD_LCTL); + case KALPHA | KGAMMA: return OSM(MOD_LSFT); + case KALPHA | KDELTA: return OSM(MOD_LALT); + case KALPHA | KKAPPA: return OSM(MOD_LGUI); + + case KALPHA | KBETA | KGAMMA: return OSM(MOD_LCTL | MOD_LSFT); + case KALPHA | KBETA | KDELTA: return OSM(MOD_LCTL | MOD_LALT); + case KALPHA | KBETA | KKAPPA: return OSM(MOD_LCTL | MOD_LGUI); + case KALPHA | KGAMMA | KDELTA: return OSM(MOD_LSFT | MOD_LALT); + case KALPHA | KGAMMA | KKAPPA: return OSM(MOD_LSFT | MOD_LGUI); + case KALPHA | KDELTA | KKAPPA: return OSM(MOD_LALT | MOD_LGUI); + + case KALPHA | KBETA | KGAMMA | KDELTA: return OSM(MOD_LCTL | MOD_LSFT | MOD_LALT); + case KALPHA | KBETA | KGAMMA | KKAPPA: return OSM(MOD_LCTL | MOD_LSFT | MOD_LGUI); + case KALPHA | KBETA | KDELTA | KKAPPA: return OSM(MOD_LCTL | MOD_LALT | MOD_LGUI); + case KALPHA | KGAMMA | KDELTA | KKAPPA: return OSM(MOD_LSFT | MOD_LALT | MOD_LGUI); + + case KALPHA | KBETA | KGAMMA | KDELTA | KKAPPA: return OSM(MOD_LCTL | MOD_LSFT | MOD_LALT | MOD_LGUI); + } + + return NONE; +} + +static uint16_t *get_hand(keypos_t *key) { + if (key->row <= 3) { + return &left_chord; + } + + if (key->row <= 6) { + return &right_chord; + } + + // row 7 + if (key->col <= 2) { + return &right_chord; + } else { + return &left_chord; + } +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + if (keycode < ALPHA) { + return true; + } + + uint16_t *chord = get_hand(&record->event.key); + + if (record->event.pressed) { + *chord |= K(keycode); + return false; + } + + if (*chord != 0) { + process_keys(chord_to_keys(*chord)); + *chord = 0; + } + + return false; +} + +#ifdef KEYBOARD_planck_ez + +#define LED_BRIGHTNESS 50 + +layer_state_t default_layer_state_set_user(layer_state_t state) { + switch (state) { + case 1U << NORMAL: + planck_ez_left_led_off(); + planck_ez_right_led_off(); + break; + case 1U << QWERTY: + planck_ez_left_led_level(LED_BRIGHTNESS); + planck_ez_right_led_off(); + break; + case 1U << GAME: + planck_ez_left_led_off(); + planck_ez_right_led_level(LED_BRIGHTNESS); + break; + } + + return state; +} + +#endif /* KEYBOARD_planck_ez */ diff --git a/keyboards/planck/keymaps/buffet/readme.md b/keyboards/planck/keymaps/buffet/readme.md new file mode 100644 index 000000000000..223595b92c0b --- /dev/null +++ b/keyboards/planck/keymaps/buffet/readme.md @@ -0,0 +1,104 @@ +# buffet's planck layout + +## Layout + +The Layout is based on keychords. +The general idea is that you're able to type everything with either hand, so that you can alternate between hands as you type. + +The keys are in a 2x4 block in the top left and top right respectively (mirrored). +They have greek letter names (see `keymap.c` for more info). + +Thumb added to any key means shift is pressed as well. + +`-` means the finger presses nothing. +`^` means the finger presses the upper row. +`v` means the finger presses the lower row. + +``` +Space: thumb +Return: vvvv vvvv +Tab: vv^v v^vv +Bspace: v--v v--v +Esc: lower pinky and thumb +``` + +### Letters + +``` +a: -^-- --^- +b: -v-^ ^-v- +c: -^^^ ^^^- +d: -vvv vvv- +e: ---^ ^--- +f: --^v v^-- +g: -^v- -v^- +h: -vv- -vv- +i: --^- -^-- +j: -^^v v^^- +k: -^vv vv^- +l: -^^- -^^- +m: -^-^ ^-^- +n: -v-- --v- +o: --v- -v-- +p: -v^- -^v- +q: -^v^ ^v^- +r: --^^ ^^-- +s: --vv vv-- +t: ---v v--- +u: -v-v v-v- +v: --v^ ^v-- +w: -v^v v^v- +x: -vv^ ^vv- +y: -^-v v-^- +z: -v^^ ^^v- +``` + +### Numbers and Symbols + +``` +0: vv-- --vv +1: vv-v v-vv +2: vvv- -vvv +3: v^-- --^v +4: v^-^ ^-^v +5: v^^- -^^v +6: v^-v v-^v +7: v-v- -v-v +8: v^^v v^^v +9: v-^^ ^^-v +-: v^vv vv^v +=: vvv^ ^vvv +[: vv^- -^vv +]: v-^v v^-v +\: v^v- -v^v +;: v^^^ ^^^v +': vv-^ ^-vv +,: v-vv vv-v +.: vv^^ ^^vv +/: v-^- -^-v +`: v--^ ^--v +``` + +### Modifiers + +Modifiers all use the top pinky key, and a combinations of modifiers you want to activate for the next keypress (very similar to how OMS work). +For the modifiers the top row of keys is used. + +``` +Control: Ringfinger +Shift: Middlefinger +Alt: Indexfinger +Super: Thumb +``` + +`^--v v--^` can be used to lock the next modifier input. + +### Remaining + +These combinations are unused. + +``` +v^v^ +v-v^ +v--- +``` diff --git a/keyboards/planck/keymaps/buffet/rgb_matrix_user.inc b/keyboards/planck/keymaps/buffet/rgb_matrix_user.inc new file mode 100644 index 000000000000..e217d1010a3b --- /dev/null +++ b/keyboards/planck/keymaps/buffet/rgb_matrix_user.inc @@ -0,0 +1,18 @@ +RGB_MATRIX_EFFECT(rainbow_stripe) + +#ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS + +static HSV rainbow_stripe_math(HSV hsv, uint8_t i, uint8_t time) { + if (i >= 14 && i <= 21) { + hsv.h = g_led_config.point[i].x - time; + } else { + hsv.v = 0; + } + return hsv; +} + +bool rainbow_stripe(effect_params_t* params) { + return effect_runner_i(params, &rainbow_stripe_math); +} + +#endif // RGB_MATRIX_CUSTOM_EFFECT_IMPLS diff --git a/keyboards/planck/keymaps/buffet/rules.mk b/keyboards/planck/keymaps/buffet/rules.mk new file mode 100644 index 000000000000..7774d766577a --- /dev/null +++ b/keyboards/planck/keymaps/buffet/rules.mk @@ -0,0 +1,6 @@ +AUDIO_ENABLE = no +BOOTMAGIC_ENABLE = lite +COMMAND_ENABLE = no +MOUSEKEY_ENABLE = no + +RGB_MATRIX_CUSTOM_USER = yes From 3f85e90126c37c5ee79be52ae5d764271d4a7734 Mon Sep 17 00:00:00 2001 From: Ryan Date: Fri, 19 Jun 2020 13:16:57 +1000 Subject: [PATCH 196/930] Fix Eon87 info.json (#9460) * Fix Eon87 info.json * Adjust bottom row sizes --- keyboards/maartenwut/eon87/info.json | 556 ++++++++++++++------------- 1 file changed, 287 insertions(+), 269 deletions(-) diff --git a/keyboards/maartenwut/eon87/info.json b/keyboards/maartenwut/eon87/info.json index 8d7dadfab51d..b0ed86a7ead0 100644 --- a/keyboards/maartenwut/eon87/info.json +++ b/keyboards/maartenwut/eon87/info.json @@ -7,294 +7,312 @@ "layouts": { "LAYOUT_all": { "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}, - {"x":14, "y":1.25}, - {"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}, - - {"x":13.75, "y":3.25, "w":1.25}, - {"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": 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}, + {"x": 14, "y": 1.25}, + + {"x": 15.25, "y": 1.25}, + {"x": 16.25, "y": 1.25}, + {"x": 17.25, "y": 1.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} + {"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}, + {"x": 13.75, "y": 3.25, "w": 1.25}, + + {"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": 2.25}, + {"x": 6, "y": 5.25, "w": 1.25}, + {"x": 7.25, "y": 5.25, "w": 2.75}, + {"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": { "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": 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":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": 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":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": 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":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": 16.25, "y": 4.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":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} + {"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": 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":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": 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":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": 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":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": 16.25, "y": 4.25}, - {"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":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} + {"x": 15.25, "y": 5.25}, + {"x": 16.25, "y": 5.25}, + {"x": 17.25, "y": 5.25} ] } } From 60be8d9f245c03db60e6297e357fec516b31bc62 Mon Sep 17 00:00:00 2001 From: AlisGraveNil <63020540+AlisGraveNil@users.noreply.github.com> Date: Thu, 18 Jun 2020 23:31:51 -0400 Subject: [PATCH 197/930] [Keyboard] GameBuddy macropad (#9391) * GameBuddy macropad * Update config.h * Update keyboards/clawsome/gamebuddy/config.h * Update keyboards/clawsome/gamebuddy/readme.md * Update keyboards/clawsome/gamebuddy/readme.md * Update keyboards/clawsome/gamebuddy/readme.md * Update readme.md * Update keyboards/clawsome/gamebuddy/rules.mk * Update keyboards/clawsome/gamebuddy/readme.md --- keyboards/clawsome/gamebuddy/config.h | 37 +++++++++++++++++ keyboards/clawsome/gamebuddy/gamebuddy.c | 16 ++++++++ keyboards/clawsome/gamebuddy/gamebuddy.h | 32 +++++++++++++++ keyboards/clawsome/gamebuddy/info.json | 41 +++++++++++++++++++ .../gamebuddy/keymaps/default/keymap.c | 41 +++++++++++++++++++ keyboards/clawsome/gamebuddy/readme.md | 13 ++++++ keyboards/clawsome/gamebuddy/rules.mk | 25 +++++++++++ 7 files changed, 205 insertions(+) create mode 100644 keyboards/clawsome/gamebuddy/config.h create mode 100644 keyboards/clawsome/gamebuddy/gamebuddy.c create mode 100644 keyboards/clawsome/gamebuddy/gamebuddy.h create mode 100644 keyboards/clawsome/gamebuddy/info.json create mode 100644 keyboards/clawsome/gamebuddy/keymaps/default/keymap.c create mode 100644 keyboards/clawsome/gamebuddy/readme.md create mode 100644 keyboards/clawsome/gamebuddy/rules.mk diff --git a/keyboards/clawsome/gamebuddy/config.h b/keyboards/clawsome/gamebuddy/config.h new file mode 100644 index 000000000000..822cc23abae1 --- /dev/null +++ b/keyboards/clawsome/gamebuddy/config.h @@ -0,0 +1,37 @@ +/* +Copyright 2020 AAClawson (AlisGraveNil) + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License 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 0x17B9 +#define DEVICE_VER 0x0001 +#define MANUFACTURER AlisGraveNil +#define PRODUCT GameBuddy +#define DESCRIPTION A 26-key QMK-powered macropad designed for gaming! + +/* key matrix size */ +#define MATRIX_ROWS 5 +#define MATRIX_COLS 7 + +#define MATRIX_ROW_PINS { D1, D0, E6, B3, B2 } +#define MATRIX_COL_PINS { F5, F6, F7, B1, C6, D7, B6 } + +#define DIODE_DIRECTION COL2ROW diff --git a/keyboards/clawsome/gamebuddy/gamebuddy.c b/keyboards/clawsome/gamebuddy/gamebuddy.c new file mode 100644 index 000000000000..464bdef8926c --- /dev/null +++ b/keyboards/clawsome/gamebuddy/gamebuddy.c @@ -0,0 +1,16 @@ +/* Copyright 2020 AAClawson (AlisGraveNil) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#include "gamebuddy.h" \ No newline at end of file diff --git a/keyboards/clawsome/gamebuddy/gamebuddy.h b/keyboards/clawsome/gamebuddy/gamebuddy.h new file mode 100644 index 000000000000..f1ee9ab357fd --- /dev/null +++ b/keyboards/clawsome/gamebuddy/gamebuddy.h @@ -0,0 +1,32 @@ +/* Copyright 2020 AAClawson (AlisGraveNil) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License 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, \ + K10, K11, K12, K13, K14, K15, \ + K20, K22, K23, K24, K25, \ + K30, K31, K32, K33, K34, K35, K46, \ + K44, K45 \ +) { \ + { K00, K01, K02, K03, K04, K05, KC_NO }, \ + { K10, K11, K12, K13, K14, K15, KC_NO }, \ + { K20, KC_NO, K22, K23, K24, K25, KC_NO }, \ + { K30, K31, K32, K33, K34, K35, KC_NO }, \ + { KC_NO, KC_NO, KC_NO, KC_NO, K44, K45, K46 }, \ +} diff --git a/keyboards/clawsome/gamebuddy/info.json b/keyboards/clawsome/gamebuddy/info.json new file mode 100644 index 000000000000..5562f0615efe --- /dev/null +++ b/keyboards/clawsome/gamebuddy/info.json @@ -0,0 +1,41 @@ +{ + "keyboard_name": "GameBuddy", + "url": "", + "maintainer": "qmk", + "width": 7, + "height": 5, + "layouts": { + "LAYOUT": { + "layout": [ + {"label":"K00 (D1,F5)", "x":0, "y":0}, + {"label":"K01 (D1,F6)", "x":1, "y":0}, + {"label":"K02 (D1,F7)", "x":2, "y":0}, + {"label":"K03 (D1,B1)", "x":3, "y":0}, + {"label":"K04 (D1,C6)", "x":4, "y":0}, + {"label":"K05 (D1,D7)", "x":5, "y":0}, + {"label":"K10 (D0,F5)", "x":0, "y":1}, + {"label":"K11 (D0,F6)", "x":1, "y":1}, + {"label":"K12 (D0,F7)", "x":2, "y":1}, + {"label":"K13 (D0,B1)", "x":3, "y":1}, + {"label":"K14 (D0,C6)", "x":4, "y":1}, + {"label":"K15 (D0,D7)", "x":5, "y":1}, + {"label":"K20 (E6,F5)", "x":0, "y":2, "w":2}, + {"label":"K22 (E6,F7)", "x":2, "y":2}, + {"label":"K23 (E6,B1)", "x":3, "y":2}, + {"label":"K24 (E6,C6)", "x":4, "y":2}, + {"label":"K25 (E6,D7)", "x":5, "y":2}, + {"label":"K30 (B3,F5)", "x":0, "y":3}, + {"label":"K31 (B3,F6)", "x":1, "y":3}, + {"label":"K32 (B3,F7)", "x":2, "y":3}, + {"label":"K33 (B3,B1)", "x":3, "y":3}, + {"label":"K34 (B3,C6)", "x":4, "y":3}, + {"label":"K35 (B3,D7)", "x":5, "y":3}, + {"label":"K46 (B2,B6)", "x":6, "y":3, "h":2}, + {"label":"K44 (B2,C6)", "x":4, "y":4}, + {"label":"K45 (B2,D7)", "x":5, "y":4} + ] + } + } + ,"meta": "https://noroadsleft.github.io/kbf_qmk_converter/" +} + diff --git a/keyboards/clawsome/gamebuddy/keymaps/default/keymap.c b/keyboards/clawsome/gamebuddy/keymaps/default/keymap.c new file mode 100644 index 000000000000..2a5794adfd4a --- /dev/null +++ b/keyboards/clawsome/gamebuddy/keymaps/default/keymap.c @@ -0,0 +1,41 @@ +/* Copyright 2020 AAClawson (AlisGraveNil) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public 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] = { + /* + * ------------------------------- + * |ESC | 1 | 2 | 3 | 4 | 5 | + * ------------------------------- + * |TAB | V | Q | W | E | R | + * ------------------------------| + * |LSFT | A | S | D | G | + * ------------------------------------ + * |LCTL| N | X | F | C | M |SPC | + * ------------------------------| | + * |LALT|LGUI| | + * ---------------- + */ + [0] = LAYOUT( + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, + KC_TAB, KC_V, KC_Q, KC_W, KC_E, KC_R, + KC_LSFT, KC_A, KC_S, KC_D, KC_G, + KC_LCTL, KC_N, KC_X, KC_F, KC_C, KC_M, KC_SPC, + KC_LALT, KC_LGUI + ), + +}; + diff --git a/keyboards/clawsome/gamebuddy/readme.md b/keyboards/clawsome/gamebuddy/readme.md new file mode 100644 index 000000000000..62e28dcbca49 --- /dev/null +++ b/keyboards/clawsome/gamebuddy/readme.md @@ -0,0 +1,13 @@ +# GameBuddy + +This is a 5x7 macropad designed for left-hand usage for videogames, with special focus on FPS layouts! + +* Keyboard Maintainer: [AAClawson](https://github.com/AlisGraveNil) +* Hardware Supported: GameBuddy, Pro Micro, Elite-C +* Hardware Availability: www.clawboards.xyz + +Make example for this keyboard (after setting up your build environment): + + make clawsome/gamebuddy: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/clawsome/gamebuddy/rules.mk b/keyboards/clawsome/gamebuddy/rules.mk new file mode 100644 index 000000000000..44d0c26b7531 --- /dev/null +++ b/keyboards/clawsome/gamebuddy/rules.mk @@ -0,0 +1,25 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +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 From 5a5ecd7dd9729280ef72c5133c4007ef15c3f300 Mon Sep 17 00:00:00 2001 From: Ryan Date: Fri, 19 Jun 2020 15:51:50 +1000 Subject: [PATCH 198/930] Remove rules.mk for gboards/engine and gboards/g (#9444) --- keyboards/gboards/engine/rules.mk | 1 - keyboards/gboards/g/rules.mk | 1 - 2 files changed, 2 deletions(-) delete mode 100644 keyboards/gboards/engine/rules.mk delete mode 100644 keyboards/gboards/g/rules.mk diff --git a/keyboards/gboards/engine/rules.mk b/keyboards/gboards/engine/rules.mk deleted file mode 100644 index 186f59386d76..000000000000 --- a/keyboards/gboards/engine/rules.mk +++ /dev/null @@ -1 +0,0 @@ -SRC += engine.c diff --git a/keyboards/gboards/g/rules.mk b/keyboards/gboards/g/rules.mk deleted file mode 100644 index 186f59386d76..000000000000 --- a/keyboards/gboards/g/rules.mk +++ /dev/null @@ -1 +0,0 @@ -SRC += engine.c From b43bdc1c69bb5a57976a159bfc00c4ac1c7c7f8f Mon Sep 17 00:00:00 2001 From: Rossman360 <53881724+Rossman360@users.noreply.github.com> Date: Fri, 19 Jun 2020 18:27:27 -0400 Subject: [PATCH 199/930] rebound rev4, consolodated switch matrix from 5x12 to 7x8 (#9314) --- keyboards/montsinger/rebound/rebound.h | 2 + keyboards/montsinger/rebound/rev4/config.h | 65 +++++++++ keyboards/montsinger/rebound/rev4/info.json | 128 ++++++++++++++++++ .../rebound/rev4/keymaps/default/keymap.c | 102 ++++++++++++++ .../rebound/rev4/keymaps/rossman360/keymap.c | 120 ++++++++++++++++ .../rebound/rev4/keymaps/rossman360/rules.mk | 4 + keyboards/montsinger/rebound/rev4/rev4.h | 59 ++++++++ keyboards/montsinger/rebound/rev4/rules.mk | 33 +++++ users/rossman360/rossman360.h | 1 + 9 files changed, 514 insertions(+) create mode 100644 keyboards/montsinger/rebound/rev4/config.h create mode 100644 keyboards/montsinger/rebound/rev4/info.json create mode 100644 keyboards/montsinger/rebound/rev4/keymaps/default/keymap.c create mode 100644 keyboards/montsinger/rebound/rev4/keymaps/rossman360/keymap.c create mode 100644 keyboards/montsinger/rebound/rev4/keymaps/rossman360/rules.mk create mode 100644 keyboards/montsinger/rebound/rev4/rev4.h create mode 100644 keyboards/montsinger/rebound/rev4/rules.mk diff --git a/keyboards/montsinger/rebound/rebound.h b/keyboards/montsinger/rebound/rebound.h index 848316a3668a..6bddfb2c3abc 100644 --- a/keyboards/montsinger/rebound/rebound.h +++ b/keyboards/montsinger/rebound/rebound.h @@ -24,4 +24,6 @@ #include "rev2.h" #elif defined(KEYBOARD_montsinger_rebound_rev3) #include "rev3.h" +#elif defined(KEYBOARD_montsinger_rebound_rev4) + #include "rev4.h" #endif diff --git a/keyboards/montsinger/rebound/rev4/config.h b/keyboards/montsinger/rebound/rev4/config.h new file mode 100644 index 000000000000..c4fc053ea9c0 --- /dev/null +++ b/keyboards/montsinger/rebound/rev4/config.h @@ -0,0 +1,65 @@ +/* +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 8 +#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 { D1, D0, D4, C6, F7, F6, F5, F4 } +#define MATRIX_COL_PINS { D7, E6, B4, B5, B2, B3, B1 } +#define UNUSED_PINS { B6 } + +#define ENCODERS_PAD_A { D2 } +#define ENCODERS_PAD_B { 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/rev4/info.json b/keyboards/montsinger/rebound/rev4/info.json new file mode 100644 index 000000000000..23893b6c689f --- /dev/null +++ b/keyboards/montsinger/rebound/rev4/info.json @@ -0,0 +1,128 @@ +{ + "keyboard":"montsinger/rebound/rev4", + "url": "https://montsinger.net", + "maintainer": "rossman360", + "width": 13, + "height": 4, + "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":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":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":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":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":6, "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_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":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} + ] + } + } +} diff --git a/keyboards/montsinger/rebound/rev4/keymaps/default/keymap.c b/keyboards/montsinger/rebound/rev4/keymaps/default/keymap.c new file mode 100644 index 000000000000..be038b1f53d7 --- /dev/null +++ b/keyboards/montsinger/rebound/rev4/keymaps/default/keymap.c @@ -0,0 +1,102 @@ +#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] = LAYOUT_all( + 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_PGUP, 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_PGDN, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT , + ADJUST, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_ENT, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT +), + +[_COLEMAK] = LAYOUT_all( + 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] = LAYOUT_all( + 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] = LAYOUT_all( + 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] = 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_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] = LAYOUT_all( + _______, 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); + } + break; + case COLEMAK: + if (record->event.pressed) { + set_single_persistent_default_layer(_COLEMAK); + } + break; + case DVORAK: + if (record->event.pressed) { + set_single_persistent_default_layer(_DVORAK); + } + break; + } + return true; +} + +void encoder_update_user(uint8_t index, bool clockwise) { + if (clockwise) { + tap_code16(S(KC_VOLD)); + } else { + tap_code16(KC_VOLU); + } +} diff --git a/keyboards/montsinger/rebound/rev4/keymaps/rossman360/keymap.c b/keyboards/montsinger/rebound/rev4/keymaps/rossman360/keymap.c new file mode 100644 index 000000000000..a0c3ab639547 --- /dev/null +++ b/keyboards/montsinger/rebound/rev4/keymaps/rossman360/keymap.c @@ -0,0 +1,120 @@ +#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_all( + 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 ,MO(_DEL), KC_H , KC_J , KC_K , KC_L , KC_SCLN, KC_QUOT, + KC_LSFT , KC_Z , KC_X , KC_C , KC_V , KC_B , LM(_FN1, MOD_LALT), KC_N , KC_M , KC_COMM, KC_DOT , KC_SLSH, KC_MINS, + CMDBSP , ALTDEL , KC_NO , CTRLSP , TABMOD , PGMOD , QUIT , ENTMOD , SPCMOD , MO(_DEL),KC_NO , KC_BSPC, KC_DEL + ), + +[_FN1] = LAYOUT_all( + _______, TAB1 , TAB2 , TAB3 , TAB4 , _______, _______, UNDO , _______, _______, _______, CTAB , + KC_CAPS, _______, _______, _______, _______, _______, _______, KC_HOME, KC_LEFT, KC_UP , KC_RIGHT,KC_END , KC_NO , + _______, _______, XPANDR , _______, PMERGE , _______, _______, _______, PMERGE , KC_DOWN, _______, _______, EMDASH , + WREFRESH,_______, _______, _______, LWORD , RWORD , _______, KC_NO , _______, KC_NO , _______, _______, _______ + ), + +[_FN2] = LAYOUT_all( + _______, SPEAK1 , SPEAK2 , SPEAK3 , SPEAK4 , _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, PARADOWN, CSPEAK, _______, _______, KC_NO , KC_NO , _______, _______, _______ + ), + +[_DEL] = LAYOUT_all( + RESET, _______, _______, _______, _______, _______, _______, UNDO , _______, _______, _______, CTAB , + REMCAPS, _______, _______, _______, _______, _______, _______, _______, KC_LEFT, KC_UP ,KC_RIGHT, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DOWN, _______, _______, _______, + _______, _______, _______, BLINE , KC_BSPC, BWORD , _______, KC_NO , KC_NO , _______, _______, _______, _______ + ), + +[_NUM] = LAYOUT_all( + KC_GRV , KC_1 , KC_7 , KC_8 , KC_9 , KC_5 , KC_6 , KC_7 , KC_8 , KC_9 , KC_MINS, KC_EQL, + KC_CAPS, _______, KC_4 , KC_5 , KC_6 , KC_BSPC, KC_LBRC, KC_MINS, KC_4 , KC_5 , KC_6 , KC_COLN, _______, + KC_COMM, KC_DOT , KC_1 , KC_2 , KC_3 ,KC_ENTER, KC_RBRC, KC_RBRC, KC_1 , KC_2 , KC_3 , KC_BSLS, _______, + _______, _______, _______, _______, KC_0 , _______, _______, KC_NO , KC_NO , KC_0 , _______, _______, _______ + ) +}; + +void encoder_update_user(uint8_t index, bool clockwise) { + switch(get_highest_layer(layer_state)){ +case _BASE: + if (clockwise) { + tap_code16(KC_VOLD); + } else { + tap_code16(KC_VOLU); + } + break; +case _DEL: + if (clockwise) { + tap_code16(KC_F11); + } else { + tap_code16(KC_F3); + } + break; + + case _FN1: + if (clockwise) { + tap_code16(S(KC_TAB)); + } else { + tap_code16(KC_TAB); + } + break; +} +} + +#ifdef OLED_DRIVER_ENABLE +void oled_task_user(void) { + // Host Keyboard Layer Status + oled_write_P(PSTR(""), false); + + switch (get_highest_layer(layer_state)) { + case _BASE: + oled_write_P(PSTR("Rebound\n"), false); + oled_write_P(PSTR("Rev3.1\n"), false); + break; + case _FN1: + oled_write_P(PSTR("Fn\n"), false); + break; + case _FN2: + oled_write_P(PSTR("Para\n"), false); + break; + case _NUM: + oled_write_P(PSTR("Num\n"), false); + break; + case _DEL: + oled_write_P(PSTR("Del\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 + led_t led_state = host_keyboard_led_state(); + oled_write_P(led_state.num_lock ? PSTR("NUM ") : PSTR(" "), false); + oled_write_P(led_state.caps_lock ? PSTR("CAPS") : PSTR(" "), false); + oled_write_P(led_state.scroll_lock ? PSTR("SCR ") : PSTR(" "), false); + +} + +#endif diff --git a/keyboards/montsinger/rebound/rev4/keymaps/rossman360/rules.mk b/keyboards/montsinger/rebound/rev4/keymaps/rossman360/rules.mk new file mode 100644 index 000000000000..fa835793e75a --- /dev/null +++ b/keyboards/montsinger/rebound/rev4/keymaps/rossman360/rules.mk @@ -0,0 +1,4 @@ +MOUSEKEY_ENABLE = no +CONSOLE_ENABLE = no +COMMAND_ENABLE = no +OLED_DRIVER_ENABLE = no diff --git a/keyboards/montsinger/rebound/rev4/rev4.h b/keyboards/montsinger/rebound/rev4/rev4.h new file mode 100644 index 000000000000..923f7d1a2477 --- /dev/null +++ b/keyboards/montsinger/rebound/rev4/rev4.h @@ -0,0 +1,59 @@ +/* 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, K70, K01, K71, K02, K72, K04, K84, K05, K75, K06, K76, \ + K10, K60, K11, K61, K12, K62, K14, K74, K15, K65, K16, K66, \ + K20, K50, K21, K51, K22, K52, K24, K64, K25, K55, K26, K56,\ + K30, K40, K31, K41, K32, K42, K34, K54, K35, K45, K36, K46\ + ) { \ + { K00, K01, K02, K04, K05, K06, K07}, \ + { K10, K11, K12, K14, K15, K16, K17 }, \ + { K20, K21, K22, K24, K25, K26, K27 }, \ + { K30, K31, K32, K34, K35, K36, K37 }, \ + { K40, K41, K42, K44, K45, K46, K47 }, \ + { K50, K51, K52, K54, K55, K56, K57 }, \ + { K60, K61, K62, K64, K65, K66, K67 }, \ + { K70, K71, K72, K74, K75, K76, K77 } \ +} + +#define LAYOUT_all( \ + K00, K70, K01, K71, K02, K72, K04, K74, K05, K75, K06, K76, \ + K10, K60, K11, K61, K12, K62, K13, K14, K64, K15, K65, K16, K66, \ + K20, K50, K21, K51, K22, K52, K23, K24, K54, K25, K55, K26, K56,\ + K30, K40, K31, K41, K32, K42, K33, K34, K44, K35, K45, K36, K46\ + ) { \ + { K00, K01, K02, KC_NO, K04, K05, K06}, \ + { K10, K11, K12, K13, K14, K15, K16}, \ + { K20, K21, K22, K23, K24, K25, K26}, \ + { K30, K31, K32, K33, K34, K35, K36}, \ + { K40, K41, K42, KC_NO, K44, K45, K46}, \ + { K50, K51, K52, KC_NO, K54, K55, K56}, \ + { K60, K61, K62, KC_NO, K64, K65, K66}, \ + { K70, K71, K72, KC_NO, K74, K75, K76} \ +} + diff --git a/keyboards/montsinger/rebound/rev4/rules.mk b/keyboards/montsinger/rebound/rev4/rules.mk new file mode 100644 index 000000000000..0759709231e1 --- /dev/null +++ b/keyboards/montsinger/rebound/rev4/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 + +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 +ENCODER_ENABLE = yes + +LAYOUTS = ortho_4x12 +LAYOUTS_HAS_RGB = no + diff --git a/users/rossman360/rossman360.h b/users/rossman360/rossman360.h index 994916b54194..8786da831396 100644 --- a/users/rossman360/rossman360.h +++ b/users/rossman360/rossman360.h @@ -2,6 +2,7 @@ #include "quantum.h" #define BWORD LCTL(KC_BSPC) +#define BLINE LALT(KC_BSPC) #define LWORD LCTL(KC_LEFT) #define RWORD LCTL(KC_RIGHT) #define JUMPBACK LSFT(KC_TAB) From c7851484457e5ab604962ae7c914b863b8de0cb2 Mon Sep 17 00:00:00 2001 From: Xelus22 <17491233+Xelus22@users.noreply.github.com> Date: Fri, 19 Jun 2020 22:35:32 +0000 Subject: [PATCH 200/930] STM32 WS2812 Open Drain Configuration (#9414) * update docs stm32 only and applies to all 3 driver * cformat --- docs/ws2812_driver.md | 11 +++++++++++ drivers/chibios/ws2812.c | 10 +++++++++- drivers/chibios/ws2812_pwm.c | 22 +++++++++++++++++----- drivers/chibios/ws2812_spi.c | 22 +++++++++++++++++----- 4 files changed, 54 insertions(+), 11 deletions(-) diff --git a/docs/ws2812_driver.md b/docs/ws2812_driver.md index 51b053b9b4a0..fe5f88585a9f 100644 --- a/docs/ws2812_driver.md +++ b/docs/ws2812_driver.md @@ -99,3 +99,14 @@ While not an exhaustive list, the following table provides the scenarios that ha | f401/f411 | :heavy_check_mark: | *Other supported ChibiOS boards and/or pins may function, it will be highly chip and configuration dependent.* + +### Push Pull and Open Drain Configuration +The default configuration is a push pull on the defined pin. +This can be configured for bitbang, PWM and SPI. + +Note: This only applies to STM32 boards. + + To configure the `RGB_DI_PIN` to open drain configuration add this to your config.h file: +```c + #define WS2812_EXTERNAL_PULLUP +``` diff --git a/drivers/chibios/ws2812.c b/drivers/chibios/ws2812.c index bdca565d881f..2c2d9fb2dcd4 100644 --- a/drivers/chibios/ws2812.c +++ b/drivers/chibios/ws2812.c @@ -14,6 +14,14 @@ # endif #endif +// Push Pull or Open Drain Configuration +// Default Push Pull +#ifndef WS2812_EXTERNAL_PULLUP +# define WS2812_OUTPUT_MODE PAL_MODE_OUTPUT_PUSHPULL +#else +# define WS2812_OUTPUT_MODE PAL_MODE_OUTPUT_OPENDRAIN +#endif + #define NUMBER_NOPS 6 #define CYCLES_PER_SEC (STM32_SYSCLK / NUMBER_NOPS * NOP_FUDGE) #define NS_PER_SEC (1000000000L) // Note that this has to be SIGNED since we want to be able to check for negative values of derivatives @@ -66,7 +74,7 @@ void sendByte(uint8_t byte) { } } -void ws2812_init(void) { setPinOutput(RGB_DI_PIN); } +void ws2812_init(void) { palSetLineMode(RGB_DI_PIN, WS2812_OUTPUT_MODE); } // Setleds for standard RGB void ws2812_setleds(LED_TYPE *ledarray, uint16_t leds) { diff --git a/drivers/chibios/ws2812_pwm.c b/drivers/chibios/ws2812_pwm.c index 1a172102987b..ba45d00425a1 100644 --- a/drivers/chibios/ws2812_pwm.c +++ b/drivers/chibios/ws2812_pwm.c @@ -24,6 +24,22 @@ # define WS2812_DMA_CHANNEL 2 // DMA Channel for TIMx_UP #endif +// Push Pull or Open Drain Configuration +// Default Push Pull +#ifndef WS2812_EXTERNAL_PULLUP +# if defined(USE_GPIOV1) +# define WS2812_OUTPUT_MODE PAL_MODE_STM32_ALTERNATE_PUSHPULL +# else +# define WS2812_OUTPUT_MODE PAL_MODE_ALTERNATE(WS2812_PWM_PAL_MODE) | PAL_STM32_OTYPE_PUSHPULL | PAL_STM32_OSPEED_HIGHEST | PAL_STM32_PUPDR_FLOATING +# endif +#else +# if defined(USE_GPIOV1) +# define WS2812_OUTPUT_MODE PAL_MODE_STM32_ALTERNATE_OPENDRAIN +# else +# define WS2812_OUTPUT_MODE PAL_MODE_ALTERNATE(WS2812_PWM_PAL_MODE) | PAL_STM32_OTYPE_OPENDRAIN | PAL_STM32_OSPEED_HIGHEST | PAL_STM32_PUPDR_FLOATING +# endif +#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 @@ -142,11 +158,7 @@ void ws2812_init(void) { 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 + palSetLineMode(RGB_DI_PIN, WS2812_OUTPUT_MODE); // 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 diff --git a/drivers/chibios/ws2812_spi.c b/drivers/chibios/ws2812_spi.c index 36e08e39ed37..3bbada7fef1c 100644 --- a/drivers/chibios/ws2812_spi.c +++ b/drivers/chibios/ws2812_spi.c @@ -16,6 +16,22 @@ # define WS2812_SPI_MOSI_PAL_MODE 5 #endif +// Push Pull or Open Drain Configuration +// Default Push Pull +#ifndef WS2812_EXTERNAL_PULLUP +# if defined(USE_GPIOV1) +# define WS2812_OUTPUT_MODE PAL_MODE_STM32_ALTERNATE_PUSHPULL +# else +# define WS2812_OUTPUT_MODE PAL_MODE_ALTERNATE(WS2812_SPI_MOSI_PAL_MODE) | PAL_STM32_OTYPE_PUSHPULL +# endif +#else +# if defined(USE_GPIOV1) +# define WS2812_OUTPUT_MODE PAL_MODE_STM32_ALTERNATE_OPENDRAIN +# else +# define WS2812_OUTPUT_MODE PAL_MODE_ALTERNATE(WS2812_SPI_MOSI_PAL_MODE) | PAL_STM32_OTYPE_OPENDRAIN +# endif +#endif + #define BYTES_FOR_LED_BYTE 4 #define NB_COLORS 3 #define BYTES_FOR_LED (BYTES_FOR_LED_BYTE * NB_COLORS) @@ -52,11 +68,7 @@ static void set_led_color_rgb(LED_TYPE color, int pos) { } 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 + palSetLineMode(RGB_DI_PIN, WS2812_OUTPUT_MODE); // TODO: more dynamic baudrate static const SPIConfig spicfg = { From 18e561b82cdb71bed0162b3ce4083a2d269e5336 Mon Sep 17 00:00:00 2001 From: Joshua Diamond Date: Fri, 19 Jun 2020 22:59:28 -0400 Subject: [PATCH 201/930] Fix incorrect delay when setting WS2812 (and similar) leds (#9302) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Fix incorrect delay when setting WS2812 (and similar) leds * Add documentation for WS2812_DELAY_MICROSECONDS * Remove improper cast to uint8_t Co-authored-by: Sergey Vlasov * Remove unneeded cast to uint8_t and correct math Co-authored-by: Sergey Vlasov * microseconds -> µs Co-authored-by: Ryan * Make documentation better match the spec sheet. Co-authored-by: Ryan * Rename macro to match spec sheet * Further correction to the delay maths for the SPI case. Co-authored-by: Joel Challis * Move ws2812_common.h to the drivers directory * Revert "Further correction to the delay maths for the SPI case." This reverts commit e61b56a2cfc7dfec9992a7a3af92afa50e5b8ec0. * Remove ws2812_setleds_pin(); consolidate ws2812.h Co-authored-by: Sergey Vlasov Co-authored-by: Ryan Co-authored-by: Joel Challis --- docs/ws2812_driver.md | 9 +++++++++ drivers/avr/ws2812.c | 20 +++++--------------- drivers/chibios/ws2812.c | 2 +- drivers/chibios/ws2812.h | 16 ---------------- drivers/chibios/ws2812_pwm.c | 7 +++---- drivers/chibios/ws2812_spi.c | 2 +- drivers/{avr => }/ws2812.h | 18 +++++++++--------- keyboards/wilba_tech/wt_rgb_backlight.c | 2 +- 8 files changed, 29 insertions(+), 47 deletions(-) delete mode 100644 drivers/chibios/ws2812.h rename drivers/{avr => }/ws2812.h (75%) diff --git a/docs/ws2812_driver.md b/docs/ws2812_driver.md index fe5f88585a9f..941e1bde084a 100644 --- a/docs/ws2812_driver.md +++ b/docs/ws2812_driver.md @@ -19,6 +19,15 @@ These LEDs are called "addressable" because instead of using a wire per color, e ## Driver configuration +### All drivers + +Different versions of the addressable LEDs have differing requirements for the TRST period between frames. +The default setting is 280 µs, which should work for most cases, but this can be overridden in your config.h. e.g.: + +```c +#define WS2812_TRST_US 80 +``` + ### Bitbang Default driver, the absence of configuration assumes this driver. To configure it, add this to your rules.mk: diff --git a/drivers/avr/ws2812.c b/drivers/avr/ws2812.c index 5c3d72dcb5e8..dd2ef899124d 100644 --- a/drivers/avr/ws2812.c +++ b/drivers/avr/ws2812.c @@ -36,25 +36,15 @@ static inline void ws2812_sendarray_mask(uint8_t *data, uint16_t datlen, uint8_t masklo, uint8_t maskhi); -// Setleds for standard RGB -void inline ws2812_setleds(LED_TYPE *ledarray, uint16_t number_of_leds) { - // wrap up usage of RGB_DI_PIN - ws2812_setleds_pin(ledarray, number_of_leds, RGB_DI_PIN); -} - -void ws2812_setleds_pin(LED_TYPE *ledarray, uint16_t number_of_leds, uint8_t pin) { - DDRx_ADDRESS(RGB_DI_PIN) |= pinmask(pin); +void ws2812_setleds(LED_TYPE *ledarray, uint16_t number_of_leds) { + DDRx_ADDRESS(RGB_DI_PIN) |= pinmask(RGB_DI_PIN); - uint8_t masklo = ~(pinmask(pin)) & PORTx_ADDRESS(pin); - uint8_t maskhi = pinmask(pin) | PORTx_ADDRESS(pin); + uint8_t masklo = ~(pinmask(RGB_DI_PIN)) & PORTx_ADDRESS(RGB_DI_PIN); + uint8_t maskhi = pinmask(RGB_DI_PIN) | PORTx_ADDRESS(RGB_DI_PIN); ws2812_sendarray_mask((uint8_t *)ledarray, number_of_leds * sizeof(LED_TYPE), masklo, maskhi); -#ifdef RGBW - _delay_us(80); -#else - _delay_us(50); -#endif + _delay_us(WS2812_TRST_US); } /* diff --git a/drivers/chibios/ws2812.c b/drivers/chibios/ws2812.c index 2c2d9fb2dcd4..5917b7f0ecf0 100644 --- a/drivers/chibios/ws2812.c +++ b/drivers/chibios/ws2812.c @@ -51,7 +51,7 @@ // The reset gap can be 6000 ns, but depending on the LED strip it may have to be increased // to values like 600000 ns. If it is too small, the pixels will show nothing most of the time. -#define RES 10000 // Width of the low gap between bits to cause a frame to latch +#define RES (1000 * WS2812_TRST_US) // Width of the low gap between bits to cause a frame to latch void sendByte(uint8_t byte) { // WS2812 protocol wants most significant bits first diff --git a/drivers/chibios/ws2812.h b/drivers/chibios/ws2812.h deleted file mode 100644 index 41c22a00b886..000000000000 --- a/drivers/chibios/ws2812.h +++ /dev/null @@ -1,16 +0,0 @@ -#pragma once - -#include "quantum/color.h" - -/* User Interface - * - * Input: - * ledarray: An array of GRB data describing the LED colors - * number_of_leds: The number of LEDs to write - * - * The functions will perform the following actions: - * - Set the data-out pin as output - * - Send out the LED data - * - Wait 50us to reset the LEDs - */ -void ws2812_setleds(LED_TYPE *ledarray, uint16_t number_of_leds); diff --git a/drivers/chibios/ws2812_pwm.c b/drivers/chibios/ws2812_pwm.c index ba45d00425a1..7113db11e0b9 100644 --- a/drivers/chibios/ws2812_pwm.c +++ b/drivers/chibios/ws2812_pwm.c @@ -53,11 +53,10 @@ /** * @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 + * The reset period for each frame is defined in WS2812_TRST_US. + * Calculate the number of zeroes to add at the end assuming 1.25 uS/bit: */ -#define WS2812_RESET_BIT_N (50) +#define WS2812_RESET_BIT_N (1000 * WS2812_TRST_US / 1250) #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 */ diff --git a/drivers/chibios/ws2812_spi.c b/drivers/chibios/ws2812_spi.c index 3bbada7fef1c..7a1d2f05daf7 100644 --- a/drivers/chibios/ws2812_spi.c +++ b/drivers/chibios/ws2812_spi.c @@ -36,7 +36,7 @@ #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 RESET_SIZE (1000 * WS2812_TRST_US / (2 * 1250)) #define PREAMBLE_SIZE 4 static uint8_t txbuf[PREAMBLE_SIZE + DATA_SIZE + RESET_SIZE] = {0}; diff --git a/drivers/avr/ws2812.h b/drivers/ws2812.h similarity index 75% rename from drivers/avr/ws2812.h rename to drivers/ws2812.h index 88eb0818942c..370b14f3e8f1 100644 --- a/drivers/avr/ws2812.h +++ b/drivers/ws2812.h @@ -1,11 +1,4 @@ /* - * light weight WS2812 lib include - * - * Version 2.3 - Nev 29th 2015 - * Author: Tim (cpldcpu@gmail.com) - * - * Please do not change this file! All configuration is handled in "ws2812_config.h" - * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 2 of the License, or @@ -24,12 +17,20 @@ #include "quantum/color.h" +/* + * Older WS2812s can handle a reset time (TRST) of 50us, but recent + * component revisions require a minimum of 280us. + */ + +#if !defined(WS2812_TRST_US) +#define WS2812_TRST_US 280 +#endif + /* User Interface * * Input: * ledarray: An array of GRB data describing the LED colors * number_of_leds: The number of LEDs to write - * pin (optional): A pin_t definition for the line to drive * * The functions will perform the following actions: * - Set the data-out pin as output @@ -37,4 +38,3 @@ * - Wait 50us to reset the LEDs */ void ws2812_setleds(LED_TYPE *ledarray, uint16_t number_of_leds); -void ws2812_setleds_pin(LED_TYPE *ledarray, uint16_t number_of_leds, uint8_t pin); diff --git a/keyboards/wilba_tech/wt_rgb_backlight.c b/keyboards/wilba_tech/wt_rgb_backlight.c index e2506bf3f90d..92e14165ee25 100644 --- a/keyboards/wilba_tech/wt_rgb_backlight.c +++ b/keyboards/wilba_tech/wt_rgb_backlight.c @@ -55,7 +55,7 @@ #endif #if defined(RGB_BACKLIGHT_DAWN60) -#include "drivers/avr/ws2812.h" +#include "ws2812.h" LED_TYPE g_ws2812_leds[WS2812_LED_TOTAL]; #endif From 8b572de5236589ea91e2f0cce218298e67b9f5ee Mon Sep 17 00:00:00 2001 From: QMK Bot Date: Sat, 20 Jun 2020 03:37:04 +0000 Subject: [PATCH 202/930] format code according to conventions [skip ci] --- drivers/chibios/ws2812.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/chibios/ws2812.c b/drivers/chibios/ws2812.c index 5917b7f0ecf0..0440cac7550d 100644 --- a/drivers/chibios/ws2812.c +++ b/drivers/chibios/ws2812.c @@ -51,7 +51,7 @@ // The reset gap can be 6000 ns, but depending on the LED strip it may have to be increased // to values like 600000 ns. If it is too small, the pixels will show nothing most of the time. -#define RES (1000 * WS2812_TRST_US) // Width of the low gap between bits to cause a frame to latch +#define RES (1000 * WS2812_TRST_US) // Width of the low gap between bits to cause a frame to latch void sendByte(uint8_t byte) { // WS2812 protocol wants most significant bits first From 05e6cc265509af3286ab0e695839e311acc58b55 Mon Sep 17 00:00:00 2001 From: James Young <18669334+noroadsleft@users.noreply.github.com> Date: Fri, 19 Jun 2020 20:45:25 -0700 Subject: [PATCH 203/930] Enable Mousekeys for Keebio Quefrency rev1 (#9478) --- keyboards/keebio/quefrency/rev1/rules.mk | 2 ++ 1 file changed, 2 insertions(+) diff --git a/keyboards/keebio/quefrency/rev1/rules.mk b/keyboards/keebio/quefrency/rev1/rules.mk index 58e9a76b2302..14423312b07e 100644 --- a/keyboards/keebio/quefrency/rev1/rules.mk +++ b/keyboards/keebio/quefrency/rev1/rules.mk @@ -1 +1,3 @@ BOOTLOADER = caterina + +MOUSEKEY_ENABLE = yes # Mouse keys From d9eae3ef033d3adce7da1ba3d57cc9480659deb0 Mon Sep 17 00:00:00 2001 From: MelGeek <65591833+melgeek001365@users.noreply.github.com> Date: Sat, 20 Jun 2020 12:49:15 +0800 Subject: [PATCH 204/930] Support IS31FL3741 and IS31FL3741A. (#9201) --- common_features.mk | 9 +- drivers/issi/is31fl3741.c | 289 +++++++++++++++++++++++++++++++++++ drivers/issi/is31fl3741.h | 55 +++++++ quantum/rgb_matrix.h | 2 + quantum/rgb_matrix_drivers.c | 27 +++- 5 files changed, 376 insertions(+), 6 deletions(-) create mode 100644 drivers/issi/is31fl3741.c create mode 100644 drivers/issi/is31fl3741.h diff --git a/common_features.mk b/common_features.mk index bdc6f883eb9c..e23de553b379 100644 --- a/common_features.mk +++ b/common_features.mk @@ -144,7 +144,7 @@ ifeq ($(strip $(RGBLIGHT_ENABLE)), yes) endif endif -VALID_MATRIX_TYPES := yes IS31FL3731 IS31FL3733 IS31FL3737 WS2812 custom +VALID_MATRIX_TYPES := yes IS31FL3731 IS31FL3733 IS31FL3737 IS31FL3741 WS2812 custom LED_MATRIX_ENABLE ?= no ifneq ($(strip $(LED_MATRIX_ENABLE)), no) @@ -205,6 +205,13 @@ ifeq ($(strip $(RGB_MATRIX_ENABLE)), IS31FL3737) QUANTUM_LIB_SRC += i2c_master.c endif +ifeq ($(strip $(RGB_MATRIX_ENABLE)), IS31FL3741) + OPT_DEFS += -DIS31FL3741 -DSTM32_I2C -DHAL_USE_I2C=TRUE + COMMON_VPATH += $(DRIVER_PATH)/issi + SRC += is31fl3741.c + QUANTUM_LIB_SRC += i2c_master.c +endif + ifeq ($(strip $(RGB_MATRIX_ENABLE)), WS2812) OPT_DEFS += -DWS2812 WS2812_DRIVER_REQUIRED := yes diff --git a/drivers/issi/is31fl3741.c b/drivers/issi/is31fl3741.c new file mode 100644 index 000000000000..45d2b4099098 --- /dev/null +++ b/drivers/issi/is31fl3741.c @@ -0,0 +1,289 @@ +/* Copyright 2017 Jason Williams + * Copyright 2018 Jack Humbert + * Copyright 2018 Yiancar + * Copyright 2020 MelGeek + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#include "wait.h" + +#include "is31fl3741.h" +#include +#include "i2c_master.h" +#include "progmem.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) +// The address will vary depending on your wiring: +// 00 <-> GND +// 01 <-> SCL +// 10 <-> SDA +// 11 <-> VCC +// ADDR1 represents A1:A0 of the 7-bit address. +// ADDR2 represents A3:A2 of the 7-bit address. +// The result is: 0b101(ADDR2)(ADDR1) +#define ISSI_ADDR_DEFAULT 0x60 + +#define ISSI_COMMANDREGISTER 0xFD +#define ISSI_COMMANDREGISTER_WRITELOCK 0xFE +#define ISSI_INTERRUPTMASKREGISTER 0xF0 +#define ISSI_INTERRUPTSTATUSREGISTER 0xF1 +#define ISSI_IDREGISTER 0xFC + +#define ISSI_PAGE_PWM0 0x00 // PG0 +#define ISSI_PAGE_PWM1 0x01 // PG1 +#define ISSI_PAGE_SCALING_0 0x02 // PG2 +#define ISSI_PAGE_SCALING_1 0x03 // PG3 +#define ISSI_PAGE_FUNCTION 0x04 // PG4 + +#define ISSI_REG_CONFIGURATION 0x00 // PG4 +#define ISSI_REG_GLOBALCURRENT 0x01 // PG4 +#define ISSI_REG_PULLDOWNUP 0x02 // PG4 +#define ISSI_REG_RESET 0x3F // PG4 + +#ifndef ISSI_TIMEOUT +# define ISSI_TIMEOUT 100 +#endif + +#ifndef ISSI_PERSISTENCE +# define ISSI_PERSISTENCE 0 +#endif + +#define ISSI_MAX_LEDS 351 + +// Transfer buffer for TWITransmitData() +uint8_t g_twi_transfer_buffer[20] = {0xFF}; + +// These buffers match the IS31FL3741 and IS31FL3741A PWM registers. +// The scaling buffers match the PG2 and PG3 LED On/Off registers. +// Storing them like this is optimal for I2C transfers to the registers. +// We could optimize this and take out the unused registers from these +// buffers and the transfers in IS31FL3741_write_pwm_buffer() but it's +// probably not worth the extra complexity. +uint8_t g_pwm_buffer[DRIVER_COUNT][ISSI_MAX_LEDS]; +bool g_pwm_buffer_update_required = false; +bool g_scaling_registers_update_required[DRIVER_COUNT] = {false}; + +uint8_t g_scaling_registers[DRIVER_COUNT][ISSI_MAX_LEDS]; + +uint32_t IS31FL3741_get_cw_sw_position(uint8_t cs, uint8_t sw) { + uint32_t pos = 0; + + if (cs < 31) { + if (sw < 7) { + pos = (sw - 1) * 30 + (cs - 1); + + } else { + pos = 0xB4 + (sw - 7) * 30 + (cs - 1); + } + } else { + pos = 0xB4 + 0x5A + (sw - 1) * 9 + (cs - 31); + } + + return pos; +} + +void IS31FL3741_write_register(uint8_t addr, uint8_t reg, uint8_t data) { + g_twi_transfer_buffer[0] = reg; + g_twi_transfer_buffer[1] = data; + +#if ISSI_PERSISTENCE > 0 + for (uint8_t i = 0; i < ISSI_PERSISTENCE; i++) { + if (i2c_transmit(addr << 1, g_twi_transfer_buffer, 2, ISSI_TIMEOUT) == 0) break; + } +#else + i2c_transmit(addr << 1, g_twi_transfer_buffer, 2, ISSI_TIMEOUT); +#endif +} + +bool IS31FL3741_write_pwm_buffer(uint8_t addr, uint8_t *pwm_buffer) { + // unlock the command register and select PG2 + IS31FL3741_write_register(addr, ISSI_COMMANDREGISTER_WRITELOCK, 0xC5); + IS31FL3741_write_register(addr, ISSI_COMMANDREGISTER, ISSI_PAGE_PWM0); + + for (int i = 0; i < 342; i += 18) { + g_twi_transfer_buffer[0] = i % 180; + + if (i == 180) { + // unlock the command register and select PG2 + IS31FL3741_write_register(addr, ISSI_COMMANDREGISTER_WRITELOCK, 0xC5); + IS31FL3741_write_register(addr, ISSI_COMMANDREGISTER, ISSI_PAGE_PWM1); + } + + memcpy(g_twi_transfer_buffer + 1, pwm_buffer + i, 18); + +#if ISSI_PERSISTENCE > 0 + for (uint8_t i = 0; i < ISSI_PERSISTENCE; i++) { + if (i2c_transmit(addr << 1, g_twi_transfer_buffer, 19, ISSI_TIMEOUT) != 0) { + return false; + } + } +#else + if (i2c_transmit(addr << 1, g_twi_transfer_buffer, 19, ISSI_TIMEOUT) != 0) { + return false; + } +#endif + } + + // transfer the left cause the total number is 351 + g_twi_transfer_buffer[0] = 162; + memcpy(g_twi_transfer_buffer + 1, pwm_buffer + 342, 9); + +#if ISSI_PERSISTENCE > 0 + for (uint8_t i = 0; i < ISSI_PERSISTENCE; i++) { + if (i2c_transmit(addr << 1, g_twi_transfer_buffer, 10, ISSI_TIMEOUT) != 0) { + return false; + } + } +#else + if (i2c_transmit(addr << 1, g_twi_transfer_buffer, 10, ISSI_TIMEOUT) != 0) { + return false; + } +#endif + + return true; +} + +void IS31FL3741_init(uint8_t addr) { + // In order to avoid the LEDs being driven with garbage data + // in the LED driver's PWM registers, shutdown is enabled last. + // Set up the mode and other settings, clear the PWM registers, + // then disable software shutdown. + // Unlock the command register. + + // Unlock the command register. + IS31FL3741_write_register(addr, ISSI_COMMANDREGISTER_WRITELOCK, 0xC5); + + // Select PG4 + IS31FL3741_write_register(addr, ISSI_COMMANDREGISTER, ISSI_PAGE_FUNCTION); + + // Set to Normal operation + IS31FL3741_write_register(addr, ISSI_REG_CONFIGURATION, 0x01); + + // Set Golbal Current Control Register + IS31FL3741_write_register(addr, ISSI_REG_GLOBALCURRENT, 0xFF); + // Set Pull up & Down for SWx CSy + IS31FL3741_write_register(addr, ISSI_REG_PULLDOWNUP, 0x77); + +// IS31FL3741_update_led_scaling_registers(addr, 0xFF, 0xFF, 0xFF); + +// Wait 10ms to ensure the device has woken up. + wait_ms(10); +} + +void IS31FL3741_set_color(int index, uint8_t red, uint8_t green, uint8_t blue) { + if (index >= 0 && index < DRIVER_LED_TOTAL) { + is31_led led = g_is31_leds[index]; + uint32_t rp = 0, gp = 0, bp = 0; + + rp = IS31FL3741_get_cw_sw_position(led.rcs, led.rsw); + gp = IS31FL3741_get_cw_sw_position(led.gcs, led.gsw); + bp = IS31FL3741_get_cw_sw_position(led.bcs, led.bsw); + + g_pwm_buffer[led.driver][rp] = red; + g_pwm_buffer[led.driver][gp] = green; + g_pwm_buffer[led.driver][bp] = blue; + g_pwm_buffer_update_required = true; + } +} + +void IS31FL3741_set_color_all(uint8_t red, uint8_t green, uint8_t blue) { + for (int i = 0; i < DRIVER_LED_TOTAL; i++) { + IS31FL3741_set_color(i, red, green, blue); + } +} + +void IS31FL3741_set_led_control_register(uint8_t index, bool red, bool green, bool blue) { + is31_led led = g_is31_leds[index]; + + uint32_t scaling_register_r = IS31FL3741_get_cw_sw_position(led.rcs, led.rsw); + uint32_t scaling_register_g = IS31FL3741_get_cw_sw_position(led.gcs, led.gsw); + uint32_t scaling_register_b = IS31FL3741_get_cw_sw_position(led.bcs, led.bsw); + + if (red) { + g_scaling_registers[led.driver][scaling_register_r] = 0xFF; + } else { + g_scaling_registers[led.driver][scaling_register_r] = 0x00; + } + + if (green) { + g_scaling_registers[led.driver][scaling_register_g] = 0xFF; + } else { + g_scaling_registers[led.driver][scaling_register_g] = 0x00; + } + + if (blue) { + g_scaling_registers[led.driver][scaling_register_b] = 0xFF; + } else { + g_scaling_registers[led.driver][scaling_register_b] = 0x00; + } + + g_scaling_registers_update_required[led.driver] = true; +} + +void IS31FL3741_update_pwm_buffers(uint8_t addr1, uint8_t addr2) { + if (g_pwm_buffer_update_required) { + IS31FL3741_write_pwm_buffer(addr1, g_pwm_buffer[0]); + } + + g_pwm_buffer_update_required = false; +} + +void IS31FL3741_set_pwm_buffer(const is31_led *pled, uint8_t red, uint8_t green, uint8_t blue) { + uint32_t rp = 0, gp = 0, bp = 0; + + rp = IS31FL3741_get_cw_sw_position(pled->rcs, pled->rsw); + gp = IS31FL3741_get_cw_sw_position(pled->gcs, pled->gsw); + bp = IS31FL3741_get_cw_sw_position(pled->bcs, pled->bsw); + + g_pwm_buffer[pled->driver][rp] = red; + g_pwm_buffer[pled->driver][gp] = green; + g_pwm_buffer[pled->driver][bp] = blue; + + g_pwm_buffer_update_required = true; +} + +void IS31FL3741_update_led_control_registers(uint8_t addr, uint8_t index) { + if (g_scaling_registers_update_required[index]) { + // unlock the command register and select PG2 + IS31FL3741_write_register(addr, ISSI_COMMANDREGISTER_WRITELOCK, 0xC5); + IS31FL3741_write_register(addr, ISSI_COMMANDREGISTER, ISSI_PAGE_SCALING_0); + + for (int i = 0; i < 180; ++i) { + IS31FL3741_write_register(addr, i, g_scaling_registers[0][i]); + } + + // unlock the command register and select PG3 + IS31FL3741_write_register(addr, ISSI_COMMANDREGISTER_WRITELOCK, 0xC5); + IS31FL3741_write_register(addr, ISSI_COMMANDREGISTER, ISSI_PAGE_SCALING_1); + + for (int i = 0; i < 171; ++i) { + IS31FL3741_write_register(addr, i, g_scaling_registers[0][180 + i]); + } + } +} + +void IS31FL3741_set_scaling_registers(const is31_led *pled, uint8_t red, uint8_t green, uint8_t blue) { + uint32_t rp = 0, gp = 0, bp = 0; + + rp = IS31FL3741_get_cw_sw_position(pled->rcs, pled->rsw); + gp = IS31FL3741_get_cw_sw_position(pled->gcs, pled->gsw); + bp = IS31FL3741_get_cw_sw_position(pled->bcs, pled->bsw); + + g_scaling_registers[pled->driver][rp] = red; + g_scaling_registers[pled->driver][gp] = green; + g_scaling_registers[pled->driver][bp] = blue; +} diff --git a/drivers/issi/is31fl3741.h b/drivers/issi/is31fl3741.h new file mode 100644 index 000000000000..3fa853467be2 --- /dev/null +++ b/drivers/issi/is31fl3741.h @@ -0,0 +1,55 @@ +/* Copyright 2017 Jason Williams + * Copyright 2018 Jack Humbert + * Copyright 2018 Yiancar + * Copyright 2020 MelGeek + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License 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 +#include + +typedef struct is31_led { + uint8_t driver : 2; + uint8_t rcs; + uint8_t rsw; + uint8_t gcs; + uint8_t gsw; + uint8_t bcs; + uint8_t bsw; +} __attribute__((packed)) is31_led; + +extern const is31_led g_is31_leds[DRIVER_LED_TOTAL]; +extern const is31_led g_is31_indicator_leds[DRIVER_INDICATOR_LED_TOTAL]; + +void IS31FL3741_init(uint8_t addr); +void IS31FL3741_write_register(uint8_t addr, uint8_t reg, uint8_t data); +bool IS31FL3741_write_pwm_buffer(uint8_t addr, uint8_t *pwm_buffer); + +void IS31FL3741_set_color(int index, uint8_t red, uint8_t green, uint8_t blue); +void IS31FL3741_set_color_all(uint8_t red, uint8_t green, uint8_t blue); + +void IS31FL3741_set_led_control_register(uint8_t index, bool red, bool green, bool blue); + +// This should not be called from an interrupt +// (eg. from a timer interrupt). +// Call this while idle (in between matrix scans). +// If the buffer is dirty, it will update the driver with the buffer. +void IS31FL3741_update_pwm_buffers(uint8_t addr1, uint8_t addr2); +void IS31FL3741_update_led_control_registers(uint8_t addr1, uint8_t addr2); +void IS31FL3741_set_scaling_registers(const is31_led *pled, uint8_t red, uint8_t green, uint8_t blue); + +void IS31FL3741_set_pwm_buffer(const is31_led *pled, uint8_t red, uint8_t green, uint8_t blue); diff --git a/quantum/rgb_matrix.h b/quantum/rgb_matrix.h index d9ce391068cf..03e9e8572c57 100644 --- a/quantum/rgb_matrix.h +++ b/quantum/rgb_matrix.h @@ -32,6 +32,8 @@ # include "is31fl3733.h" #elif defined(IS31FL3737) # include "is31fl3737.h" +#elif defined(IS31FL3741) +# include "is31fl3741.h" #elif defined(WS2812) # include "ws2812.h" #endif diff --git a/quantum/rgb_matrix_drivers.c b/quantum/rgb_matrix_drivers.c index ea41b0d3962f..204b6c551f97 100644 --- a/quantum/rgb_matrix_drivers.c +++ b/quantum/rgb_matrix_drivers.c @@ -23,7 +23,7 @@ * be here if shared between boards. */ -#if defined(IS31FL3731) || defined(IS31FL3733) || defined(IS31FL3737) +#if defined(IS31FL3731) || defined(IS31FL3733) || defined(IS31FL3737) || defined(IS31FL3741) # include "i2c_master.h" @@ -34,8 +34,10 @@ static void init(void) { IS31FL3731_init(DRIVER_ADDR_2); # elif defined(IS31FL3733) IS31FL3733_init(DRIVER_ADDR_1, 0); -# else +# elif defined(IS31FL3737) IS31FL3737_init(DRIVER_ADDR_1); +# else + IS31FL3741_init(DRIVER_ADDR_1); # endif for (int index = 0; index < DRIVER_LED_TOTAL; index++) { bool enabled = true; @@ -44,8 +46,10 @@ static void init(void) { IS31FL3731_set_led_control_register(index, enabled, enabled, enabled); # elif defined(IS31FL3733) IS31FL3733_set_led_control_register(index, enabled, enabled, enabled); -# else +# elif defined(IS31FL3737) IS31FL3737_set_led_control_register(index, enabled, enabled, enabled); +# else + IS31FL3741_set_led_control_register(index, enabled, enabled, enabled); # endif } // This actually updates the LED drivers @@ -55,8 +59,10 @@ static void init(void) { # elif defined(IS31FL3733) IS31FL3733_update_led_control_registers(DRIVER_ADDR_1, 0); IS31FL3733_update_led_control_registers(DRIVER_ADDR_2, 1); -# else +# elif defined(IS31FL3737) IS31FL3737_update_led_control_registers(DRIVER_ADDR_1, DRIVER_ADDR_2); +# else + IS31FL3741_update_led_control_registers(DRIVER_ADDR_1, 0); # endif } @@ -84,7 +90,7 @@ const rgb_matrix_driver_t rgb_matrix_driver = { .set_color = IS31FL3733_set_color, .set_color_all = IS31FL3733_set_color_all, }; -# else +# elif defined(IS31FL3737) static void flush(void) { IS31FL3737_update_pwm_buffers(DRIVER_ADDR_1, DRIVER_ADDR_2); } const rgb_matrix_driver_t rgb_matrix_driver = { @@ -93,6 +99,17 @@ const rgb_matrix_driver_t rgb_matrix_driver = { .set_color = IS31FL3737_set_color, .set_color_all = IS31FL3737_set_color_all, }; +# else +static void flush(void) { + IS31FL3741_update_pwm_buffers(DRIVER_ADDR_1, DRIVER_ADDR_2); +} + +const rgb_matrix_driver_t rgb_matrix_driver = { + .init = init, + .flush = flush, + .set_color = IS31FL3741_set_color, + .set_color_all = IS31FL3741_set_color_all, +}; # endif #elif defined(WS2812) From 580cb2c1dfc4b5b00744a1a6f39107d6e91e1159 Mon Sep 17 00:00:00 2001 From: Takeshi ISHII <2170248+mtei@users.noreply.github.com> Date: Sat, 20 Jun 2020 21:02:16 +0900 Subject: [PATCH 205/930] [Update] Files with Japanese translations related to #8822 (#9455) * The TAG of the original document has been updated to facilitate future verification. * The TAG of the original document has been updated to facilitate future verification. * The TAG of the original document has been updated to facilitate future verification. --- docs/ja/faq_debug.md | 4 ++-- docs/ja/flashing.md | 4 ++-- docs/ja/getting_started_vagrant.md | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/docs/ja/faq_debug.md b/docs/ja/faq_debug.md index 856e9473a177..b70edf63d756 100644 --- a/docs/ja/faq_debug.md +++ b/docs/ja/faq_debug.md @@ -1,8 +1,8 @@ # デバッグの FAQ このページは、キーボードのトラブルシューティングについての様々な一般的な質問を説明します。 diff --git a/docs/ja/flashing.md b/docs/ja/flashing.md index 713d4fdf9e00..15828514525d 100644 --- a/docs/ja/flashing.md +++ b/docs/ja/flashing.md @@ -1,8 +1,8 @@ # 書き込みの手順とブートローダ情報 キーボードが使用するブートローダにはかなり多くの種類があり、ほぼ全てが異なる書き込みの方法を使います。幸いなことに、[QMK Toolbox](https://github.com/qmk/qmk_toolbox/releases) のようなプロジェクトは、あまり深く考える必要無しに様々なタイプと互換性を持つことを目指していますが、この文章では様々なタイプのブートローダとそれらを書き込むために利用可能な方法について説明します。 diff --git a/docs/ja/getting_started_vagrant.md b/docs/ja/getting_started_vagrant.md index 66fb89510773..58eca5c0a302 100644 --- a/docs/ja/getting_started_vagrant.md +++ b/docs/ja/getting_started_vagrant.md @@ -1,8 +1,8 @@ # Vagrant クイックスタート このプロジェクトは、プライマリオペレーティングシステムに大きな変更を加えることなくキーボードの新しいファームウェアを非常に簡単に構築することができる `Vagrantfile` を含みます。これは、あなたがプロジェクトをクローンしビルドを実行した時に、ビルドのために Vagrantfile を使っている他のユーザと全く同じ環境を持つことも保証します。これにより、人々はあなたが遭遇した問題の解決をより簡単に行えるようになります。 From de79d55187be24e714e1351810fa81ecad35474e Mon Sep 17 00:00:00 2001 From: MechMerlin <30334081+mechmerlin@users.noreply.github.com> Date: Sat, 20 Jun 2020 13:47:50 -0700 Subject: [PATCH 206/930] New Keyboard: E8.5 TKL (#9447) Co-authored-by: Ryan --- keyboards/exclusive/e85/config.h | 209 +++++++++++++ keyboards/exclusive/e85/e85.c | 17 + keyboards/exclusive/e85/e85.h | 87 ++++++ keyboards/exclusive/e85/info.json | 293 ++++++++++++++++++ .../exclusive/e85/keymaps/default/keymap.c | 37 +++ .../exclusive/e85/keymaps/standard/keymap.c | 37 +++ .../exclusive/e85/keymaps/tsangan/keymap.c | 37 +++ keyboards/exclusive/e85/keymaps/via/config.h | 1 + keyboards/exclusive/e85/keymaps/via/keymap.c | 45 +++ keyboards/exclusive/e85/keymaps/via/rules.mk | 3 + keyboards/exclusive/e85/readme.md | 17 + keyboards/exclusive/e85/rules.mk | 32 ++ keyboards/exclusive/readme.md | 1 + 13 files changed, 816 insertions(+) create mode 100644 keyboards/exclusive/e85/config.h create mode 100644 keyboards/exclusive/e85/e85.c create mode 100644 keyboards/exclusive/e85/e85.h create mode 100644 keyboards/exclusive/e85/info.json create mode 100644 keyboards/exclusive/e85/keymaps/default/keymap.c create mode 100644 keyboards/exclusive/e85/keymaps/standard/keymap.c create mode 100644 keyboards/exclusive/e85/keymaps/tsangan/keymap.c create mode 100644 keyboards/exclusive/e85/keymaps/via/config.h create mode 100644 keyboards/exclusive/e85/keymaps/via/keymap.c create mode 100644 keyboards/exclusive/e85/keymaps/via/rules.mk create mode 100644 keyboards/exclusive/e85/readme.md create mode 100644 keyboards/exclusive/e85/rules.mk diff --git a/keyboards/exclusive/e85/config.h b/keyboards/exclusive/e85/config.h new file mode 100644 index 000000000000..d122c93619c3 --- /dev/null +++ b/keyboards/exclusive/e85/config.h @@ -0,0 +1,209 @@ +/* +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 0x4558 // EX +#define PRODUCT_ID 0xE851 // E8.5 Version 1 +#define DEVICE_VER 0x0001 +#define MANUFACTURER Exclusive +#define PRODUCT E8.5 Hotswap PCB +#define DESCRIPTION A custom TKL keyboard + +/* key matrix size */ +#define MATRIX_ROWS 11 +#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) + * + */ + +// 0 1 2 3 4 5 6 7 8 9 A +#define MATRIX_ROW_PINS { E6, B0, B1, B2, B3, B7, F7, F6, F5, F4, F1 } +#define MATRIX_COL_PINS { D0, D1, D2, D3, D5, D4, D6, D7, B4 } +#define UNUSED_PINS + +/* COL2ROW, ROW2COL*/ +#define DIODE_DIRECTION ROW2COL + +/* + * 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 B6 +// #define BACKLIGHT_BREATHING +// #define BACKLIGHT_LEVELS 6 + +#define RGB_DI_PIN E2 +#ifdef RGB_DI_PIN + #define RGBLED_NUM 18 + #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 + +/* 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 */ +#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 0 diff --git a/keyboards/exclusive/e85/e85.c b/keyboards/exclusive/e85/e85.c new file mode 100644 index 000000000000..20cd0e03f5f5 --- /dev/null +++ b/keyboards/exclusive/e85/e85.c @@ -0,0 +1,17 @@ +/* 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 "e85.h" diff --git a/keyboards/exclusive/e85/e85.h b/keyboards/exclusive/e85/e85.h new file mode 100644 index 000000000000..19b2dff5507d --- /dev/null +++ b/keyboards/exclusive/e85/e85.h @@ -0,0 +1,87 @@ +/* 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 ___ KC_NO + +// This is the layout for the soldered PCB +#define LAYOUT_all( \ + K00, K01, K02, K03, K04, K05, K06, K07, K08, K68, K67, K65, K64, K63, K66, K62, K61, \ + K10, K11, K12, K13, K14, K15, K16, K17, K18, K78, K70, K77, K75, K74, K73, K76, K72, K71, \ + K20, K21, K22, K23, K24, K25, K26, K27, K28, K88, K87, K85, K84, K94, K86, K82, K81, \ + K30, K31, K32, K33, K34, K35, K36, K37, K38, K98, K97, K95, K83, \ + K40, K41, K42, K43, K44, K45, K46, K47, K48, KA8, KA7, KA5, KA4, KA3, K92, \ + K50, K51, K52, K56, K58, K57, K54, K53, KA6, KA2, KA1 \ +) { \ + { 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, KC_NO, K56, K57, K58 }, \ + { KC_NO, K61, K62, K63, K64, K65, K66, K67, K68 }, \ + { K70, K71, K72, K73, K74, K75, K76, K77, K78 }, \ + { KC_NO, K81, K82, K83, K84, K85, K86, K87, K88 }, \ + { KC_NO, KC_NO, K92, KC_NO, K94, K95, KC_NO, K97, K98 }, \ + { KC_NO, KA1, KA2, KA3, KA4, KA5, KA6, KA7, KA8 }, \ +} + +// This is the layout for one hotswap PCB and can also be used on the soldered edition +#define LAYOUT_ansi_standard( \ + K00, K01, K02, K03, K04, K05, K06, K07, K08, K68, K67, K65, K64, K63, K66, K62, K61, \ + K10, K11, K12, K13, K14, K15, K16, K17, K18, K78, K70, K77, K75, K73, K76, K72, K71, \ + K20, K21, K22, K23, K24, K25, K26, K27, K28, K88, K87, K85, K84, K83, K86, K82, K81, \ + K30, K31, K32, K33, K34, K35, K36, K37, K38, K98, K97, K95, K93, \ + K40, K42, K43, K44, K45, K46, K47, K48, KA8, KA7, KA5, KA4, K92, \ + K50, K51, K52, K56, K58, K57, K54, K53, KA6, KA2, KA1 \ +) { \ + { 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, KC_NO, K42, K43, K44, K45, K46, K47, K48 }, \ + { K50, K51, K52, K53, K54, KC_NO, K56, K57, K58 }, \ + { KC_NO, K61, K62, K63, K64, K65, K66, K67, K68 }, \ + { K70, K71, K72, K73, KC_NO, K75, K76, K77, K78 }, \ + { KC_NO, K81, K82, K83, K84, K85, K86, K87, K88 }, \ + { KC_NO, KC_NO, K92, K93, KC_NO, K95, KC_NO, K97, K98 }, \ + { KC_NO, KA1, KA2, KC_NO, KA4, KA5, KA6, KA7, KA8 }, \ +} + +// This is the layout for one hotswap PCB and can also be used on the soldered edition +#define LAYOUT_ansi_tsangan( \ + K00, K01, K02, K03, K04, K05, K06, K07, K08, K68, K67, K65, K64, K63, K66, K62, K61, \ + K10, K11, K12, K13, K14, K15, K16, K17, K18, K78, K70, K77, K75, K73, K76, K72, K71, \ + K20, K21, K22, K23, K24, K25, K26, K27, K28, K88, K87, K85, K84, K83, K86, K82, K81, \ + K30, K31, K32, K33, K34, K35, K36, K37, K38, K98, K97, K95, K93, \ + K40, K42, K43, K44, K45, K46, K47, K48, KA8, KA7, KA5, KA4, K92, \ + K50, K51, K52, K56, K57, K54, K53, KA6, KA2, KA1 \ +) { \ + { 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, KC_NO, K42, K43, K44, K45, K46, K47, K48 }, \ + { K50, K51, K52, K53, K54, KC_NO, K56, K57, KC_NO }, \ + { KC_NO, K61, K62, K63, K64, K65, K66, K67, K68 }, \ + { K70, K71, K72, K73, KC_NO, K75, K76, K77, K78 }, \ + { KC_NO, K81, K82, K83, K84, K85, K86, K87, K88 }, \ + { KC_NO, KC_NO, K92, K93, KC_NO, K95, KC_NO, K97, K98 }, \ + { KC_NO, KA1, KA2, KC_NO, KA4, KA5, KA6, KA7, KA8 }, \ +} diff --git a/keyboards/exclusive/e85/info.json b/keyboards/exclusive/e85/info.json new file mode 100644 index 000000000000..cc888a1576b1 --- /dev/null +++ b/keyboards/exclusive/e85/info.json @@ -0,0 +1,293 @@ +{ + "keyboard_name": "Exclusive E8.5 TKL", + "url": "", + "maintainer": "qmk", + "width": 18.25, + "height": 6.5, + "layouts": { + "LAYOUT_all": { + "key_count": 91, + "layout": [ + {"label":"K00 (E6,D0)", "x":0, "y":0}, + {"label":"K01 (E6,D1)", "x":1.25, "y":0}, + {"label":"K02 (E6,D2)", "x":2.25, "y":0}, + {"label":"K03 (E6,D3)", "x":3.25, "y":0}, + {"label":"K04 (E6,D5)", "x":4.25, "y":0}, + {"label":"K05 (E6,D4)", "x":5.5, "y":0}, + {"label":"K06 (E6,D6)", "x":6.5, "y":0}, + {"label":"K07 (E6,D7)", "x":7.5, "y":0}, + {"label":"K08 (E6,B4)", "x":8.5, "y":0}, + {"label":"K68 (F7,B4)", "x":9.75, "y":0}, + {"label":"K67 (F7,D7)", "x":10.75, "y":0}, + {"label":"K65 (F7,D4)", "x":11.75, "y":0}, + {"label":"K64 (F7,D5)", "x":12.75, "y":0}, + {"label":"K63 (F7,D3)", "x":14, "y":0}, + {"label":"K66 (F7,D6)", "x":15.25, "y":0}, + {"label":"K62 (F7,D2)", "x":16.25, "y":0}, + {"label":"K61 (F7,D1)", "x":17.25, "y":0}, + {"label":"K10 (B0,D0)", "x":0, "y":1.5}, + {"label":"K11 (B0,D1)", "x":1, "y":1.5}, + {"label":"K12 (B0,D2)", "x":2, "y":1.5}, + {"label":"K13 (B0,D3)", "x":3, "y":1.5}, + {"label":"K14 (B0,D5)", "x":4, "y":1.5}, + {"label":"K15 (B0,D4)", "x":5, "y":1.5}, + {"label":"K16 (B0,D6)", "x":6, "y":1.5}, + {"label":"K17 (B0,D7)", "x":7, "y":1.5}, + {"label":"K18 (B0,B4)", "x":8, "y":1.5}, + {"label":"K78 (F6,B4)", "x":9, "y":1.5}, + {"label":"K70 (F6,D0)", "x":10, "y":1.5}, + {"label":"K77 (F6,D7)", "x":11, "y":1.5}, + {"label":"K75 (F6,D4)", "x":12, "y":1.5}, + {"label":"K74 (F6,D5)", "x":13, "y":1.5}, + {"label":"K73 (F6,D3)", "x":14, "y":1.5}, + {"label":"K76 (F6,D6)", "x":15.25, "y":1.5}, + {"label":"K72 (F6,D2)", "x":16.25, "y":1.5}, + {"label":"K71 (F6,D1)", "x":17.25, "y":1.5}, + {"label":"K20 (B1,D0)", "x":0, "y":2.5, "w":1.5}, + {"label":"K21 (B1,D1)", "x":1.5, "y":2.5}, + {"label":"K22 (B1,D2)", "x":2.5, "y":2.5}, + {"label":"K23 (B1,D3)", "x":3.5, "y":2.5}, + {"label":"K24 (B1,D5)", "x":4.5, "y":2.5}, + {"label":"K25 (B1,D4)", "x":5.5, "y":2.5}, + {"label":"K26 (B1,D6)", "x":6.5, "y":2.5}, + {"label":"K27 (B1,D7)", "x":7.5, "y":2.5}, + {"label":"K28 (B1,B4)", "x":8.5, "y":2.5}, + {"label":"K88 (F5,B4)", "x":9.5, "y":2.5}, + {"label":"K87 (F5,D7)", "x":10.5, "y":2.5}, + {"label":"K85 (F5,D4)", "x":11.5, "y":2.5}, + {"label":"K84 (F5,D5)", "x":12.5, "y":2.5}, + {"label":"K94 (F4,D5)", "x":13.5, "y":2.5, "w":1.5}, + {"label":"K86 (F5,D6)", "x":15.25, "y":2.5}, + {"label":"K82 (F5,D2)", "x":16.25, "y":2.5}, + {"label":"K81 (F5,D1)", "x":17.25, "y":2.5}, + {"label":"K30 (B2,D0)", "x":0, "y":3.5, "w":1.75}, + {"label":"K31 (B2,D1)", "x":1.75, "y":3.5}, + {"label":"K32 (B2,D2)", "x":2.75, "y":3.5}, + {"label":"K33 (B2,D3)", "x":3.75, "y":3.5}, + {"label":"K34 (B2,D5)", "x":4.75, "y":3.5}, + {"label":"K35 (B2,D4)", "x":5.75, "y":3.5}, + {"label":"K36 (B2,D6)", "x":6.75, "y":3.5}, + {"label":"K37 (B2,D7)", "x":7.75, "y":3.5}, + {"label":"K38 (B2,B4)", "x":8.75, "y":3.5}, + {"label":"K98 (F4,B4)", "x":9.75, "y":3.5}, + {"label":"K97 (F4,D7)", "x":10.75, "y":3.5}, + {"label":"K95 (F4,D4)", "x":11.75, "y":3.5}, + {"label":"K83 (F5,D3)", "x":12.75, "y":3.5, "w":2.25}, + {"label":"K40 (B3,D0)", "x":0, "y":4.5, "w":1.25}, + {"label":"K41 (B3,D1)", "x":1.25, "y":4.5}, + {"label":"K42 (B3,D2)", "x":2.25, "y":4.5}, + {"label":"K43 (B3,D3)", "x":3.25, "y":4.5}, + {"label":"K44 (B3,D5)", "x":4.25, "y":4.5}, + {"label":"K45 (B3,D4)", "x":5.25, "y":4.5}, + {"label":"K46 (B3,D6)", "x":6.25, "y":4.5}, + {"label":"K47 (B3,D7)", "x":7.25, "y":4.5}, + {"label":"K48 (B3,B4)", "x":8.25, "y":4.5}, + {"label":"KA8 (F1,B4)", "x":9.25, "y":4.5}, + {"label":"KA7 (F1,D7)", "x":10.25, "y":4.5}, + {"label":"KA5 (F1,D4)", "x":11.25, "y":4.5}, + {"label":"KA4 (F1,D5)", "x":12.25, "y":4.5, "w":1.75}, + {"label":"KA3 (F1,D3)", "x":14, "y":4.5}, + {"label":"K92 (F4,D2)", "x":16.25, "y":4.5}, + {"label":"K50 (B7,D0)", "x":0, "y":5.5, "w":1.25}, + {"label":"K51 (B7,D1)", "x":1.25, "y":5.5, "w":1.25}, + {"label":"K52 (B7,D2)", "x":2.5, "y":5.5, "w":1.25}, + {"label":"K56 (B7,D6)", "x":3.75, "y":5.5, "w":6.25}, + {"label":"K58 (B7,B4)", "x":10, "y":5.5, "w":1.25}, + {"label":"K57 (B7,D7)", "x":11.25, "y":5.5, "w":1.25}, + {"label":"K54 (B7,D5)", "x":12.5, "y":5.5, "w":1.25}, + {"label":"K53 (B7,D3)", "x":13.75, "y":5.5, "w":1.25}, + {"label":"KA6 (F1,D6)", "x":15.25, "y":5.5}, + {"label":"KA2 (F1,D2)", "x":16.25, "y":5.5}, + {"label":"KA1 (F1,D1)", "x":17.25, "y":5.5} + ] + }, + + "LAYOUT_ansi_standard": { + "key_count": 88, + "layout": [ + {"label":"K00 (E6,D0)", "x":0, "y":0}, + {"label":"K01 (E6,D1)", "x":1.25, "y":0}, + {"label":"K02 (E6,D2)", "x":2.25, "y":0}, + {"label":"K03 (E6,D3)", "x":3.25, "y":0}, + {"label":"K04 (E6,D5)", "x":4.25, "y":0}, + {"label":"K05 (E6,D4)", "x":5.5, "y":0}, + {"label":"K06 (E6,D6)", "x":6.5, "y":0}, + {"label":"K07 (E6,D7)", "x":7.5, "y":0}, + {"label":"K08 (E6,B4)", "x":8.5, "y":0}, + {"label":"K68 (F7,B4)", "x":9.75, "y":0}, + {"label":"K67 (F7,D7)", "x":10.75, "y":0}, + {"label":"K65 (F7,D4)", "x":11.75, "y":0}, + {"label":"K64 (F7,D5)", "x":12.75, "y":0}, + {"label":"K63 (F7,D3)", "x":14, "y":0}, + {"label":"K66 (F7,D6)", "x":15.25, "y":0}, + {"label":"K62 (F7,D2)", "x":16.25, "y":0}, + {"label":"K61 (F7,D1)", "x":17.25, "y":0}, + {"label":"K10 (B0,D0)", "x":0, "y":1.5}, + {"label":"K11 (B0,D1)", "x":1, "y":1.5}, + {"label":"K12 (B0,D2)", "x":2, "y":1.5}, + {"label":"K13 (B0,D3)", "x":3, "y":1.5}, + {"label":"K14 (B0,D5)", "x":4, "y":1.5}, + {"label":"K15 (B0,D4)", "x":5, "y":1.5}, + {"label":"K16 (B0,D6)", "x":6, "y":1.5}, + {"label":"K17 (B0,D7)", "x":7, "y":1.5}, + {"label":"K18 (B0,B4)", "x":8, "y":1.5}, + {"label":"K78 (F6,B4)", "x":9, "y":1.5}, + {"label":"K70 (F6,D0)", "x":10, "y":1.5}, + {"label":"K77 (F6,D7)", "x":11, "y":1.5}, + {"label":"K75 (F6,D4)", "x":12, "y":1.5}, + {"label":"K73 (F6,D3)", "x":13, "y":1.5, "w":2}, + {"label":"K76 (F6,D6)", "x":15.25, "y":1.5}, + {"label":"K72 (F6,D2)", "x":16.25, "y":1.5}, + {"label":"K71 (F6,D1)", "x":17.25, "y":1.5}, + {"label":"K20 (B1,D0)", "x":0, "y":2.5, "w":1.5}, + {"label":"K21 (B1,D1)", "x":1.5, "y":2.5}, + {"label":"K22 (B1,D2)", "x":2.5, "y":2.5}, + {"label":"K23 (B1,D3)", "x":3.5, "y":2.5}, + {"label":"K24 (B1,D5)", "x":4.5, "y":2.5}, + {"label":"K25 (B1,D4)", "x":5.5, "y":2.5}, + {"label":"K26 (B1,D6)", "x":6.5, "y":2.5}, + {"label":"K27 (B1,D7)", "x":7.5, "y":2.5}, + {"label":"K28 (B1,B4)", "x":8.5, "y":2.5}, + {"label":"K88 (F5,B4)", "x":9.5, "y":2.5}, + {"label":"K87 (F5,D7)", "x":10.5, "y":2.5}, + {"label":"K85 (F5,D4)", "x":11.5, "y":2.5}, + {"label":"K84 (F5,D5)", "x":12.5, "y":2.5}, + {"label":"K83 (F5,D3)", "x":13.5, "y":2.5, "w":1.5}, + {"label":"K86 (F5,D6)", "x":15.25, "y":2.5}, + {"label":"K82 (F5,D2)", "x":16.25, "y":2.5}, + {"label":"K81 (F5,D1)", "x":17.25, "y":2.5}, + {"label":"K30 (B2,D0)", "x":0, "y":3.5, "w":1.75}, + {"label":"K31 (B2,D1)", "x":1.75, "y":3.5}, + {"label":"K32 (B2,D2)", "x":2.75, "y":3.5}, + {"label":"K33 (B2,D3)", "x":3.75, "y":3.5}, + {"label":"K34 (B2,D5)", "x":4.75, "y":3.5}, + {"label":"K35 (B2,D4)", "x":5.75, "y":3.5}, + {"label":"K36 (B2,D6)", "x":6.75, "y":3.5}, + {"label":"K37 (B2,D7)", "x":7.75, "y":3.5}, + {"label":"K38 (B2,B4)", "x":8.75, "y":3.5}, + {"label":"K98 (F4,B4)", "x":9.75, "y":3.5}, + {"label":"K97 (F4,D7)", "x":10.75, "y":3.5}, + {"label":"K95 (F4,D4)", "x":11.75, "y":3.5}, + {"label":"K93 (F4,D3)", "x":12.75, "y":3.5, "w":2.25}, + {"label":"K40 (B3,D0)", "x":0, "y":4.5, "w":2.25}, + {"label":"K42 (B3,D2)", "x":2.25, "y":4.5}, + {"label":"K43 (B3,D3)", "x":3.25, "y":4.5}, + {"label":"K44 (B3,D5)", "x":4.25, "y":4.5}, + {"label":"K45 (B3,D4)", "x":5.25, "y":4.5}, + {"label":"K46 (B3,D6)", "x":6.25, "y":4.5}, + {"label":"K47 (B3,D7)", "x":7.25, "y":4.5}, + {"label":"K48 (B3,B4)", "x":8.25, "y":4.5}, + {"label":"KA8 (F1,B4)", "x":9.25, "y":4.5}, + {"label":"KA7 (F1,D7)", "x":10.25, "y":4.5}, + {"label":"KA5 (F1,D4)", "x":11.25, "y":4.5}, + {"label":"KA4 (F1,D5)", "x":12.25, "y":4.5, "w":2.75}, + {"label":"K92 (F4,D2)", "x":16.25, "y":4.5}, + {"label":"K50 (B7,D0)", "x":0, "y":5.5, "w":1.25}, + {"label":"K51 (B7,D1)", "x":1.25, "y":5.5, "w":1.25}, + {"label":"K52 (B7,D2)", "x":2.5, "y":5.5, "w":1.25}, + {"label":"K56 (B7,D6)", "x":3.75, "y":5.5, "w":6.25}, + {"label":"K58 (B7,B4)", "x":10, "y":5.5, "w":1.25}, + {"label":"K57 (B7,D7)", "x":11.25, "y":5.5, "w":1.25}, + {"label":"K54 (B7,D5)", "x":12.5, "y":5.5, "w":1.25}, + {"label":"K53 (B7,D3)", "x":13.75, "y":5.5, "w":1.25}, + {"label":"KA6 (F1,D6)", "x":15.25, "y":5.5}, + {"label":"KA2 (F1,D2)", "x":16.25, "y":5.5}, + {"label":"KA1 (F1,D1)", "x":17.25, "y":5.5} + ] + }, + + "LAYOUT_ansi_tsangan": { + "key_count": 87, + "layout": [ + {"label":"K00 (E6,D0)", "x":0, "y":0}, + {"label":"K01 (E6,D1)", "x":1.25, "y":0}, + {"label":"K02 (E6,D2)", "x":2.25, "y":0}, + {"label":"K03 (E6,D3)", "x":3.25, "y":0}, + {"label":"K04 (E6,D5)", "x":4.25, "y":0}, + {"label":"K05 (E6,D4)", "x":5.5, "y":0}, + {"label":"K06 (E6,D6)", "x":6.5, "y":0}, + {"label":"K07 (E6,D7)", "x":7.5, "y":0}, + {"label":"K08 (E6,B4)", "x":8.5, "y":0}, + {"label":"K68 (F7,B4)", "x":9.75, "y":0}, + {"label":"K67 (F7,D7)", "x":10.75, "y":0}, + {"label":"K65 (F7,D4)", "x":11.75, "y":0}, + {"label":"K64 (F7,D5)", "x":12.75, "y":0}, + {"label":"K63 (F7,D3)", "x":14, "y":0}, + {"label":"K66 (F7,D6)", "x":15.25, "y":0}, + {"label":"K62 (F7,D2)", "x":16.25, "y":0}, + {"label":"K61 (F7,D1)", "x":17.25, "y":0}, + {"label":"K10 (B0,D0)", "x":0, "y":1.5}, + {"label":"K11 (B0,D1)", "x":1, "y":1.5}, + {"label":"K12 (B0,D2)", "x":2, "y":1.5}, + {"label":"K13 (B0,D3)", "x":3, "y":1.5}, + {"label":"K14 (B0,D5)", "x":4, "y":1.5}, + {"label":"K15 (B0,D4)", "x":5, "y":1.5}, + {"label":"K16 (B0,D6)", "x":6, "y":1.5}, + {"label":"K17 (B0,D7)", "x":7, "y":1.5}, + {"label":"K18 (B0,B4)", "x":8, "y":1.5}, + {"label":"K78 (F6,B4)", "x":9, "y":1.5}, + {"label":"K70 (F6,D0)", "x":10, "y":1.5}, + {"label":"K77 (F6,D7)", "x":11, "y":1.5}, + {"label":"K75 (F6,D4)", "x":12, "y":1.5}, + {"label":"K73 (F6,D3)", "x":13, "y":1.5, "w":2}, + {"label":"K76 (F6,D6)", "x":15.25, "y":1.5}, + {"label":"K72 (F6,D2)", "x":16.25, "y":1.5}, + {"label":"K71 (F6,D1)", "x":17.25, "y":1.5}, + {"label":"K20 (B1,D0)", "x":0, "y":2.5, "w":1.5}, + {"label":"K21 (B1,D1)", "x":1.5, "y":2.5}, + {"label":"K22 (B1,D2)", "x":2.5, "y":2.5}, + {"label":"K23 (B1,D3)", "x":3.5, "y":2.5}, + {"label":"K24 (B1,D5)", "x":4.5, "y":2.5}, + {"label":"K25 (B1,D4)", "x":5.5, "y":2.5}, + {"label":"K26 (B1,D6)", "x":6.5, "y":2.5}, + {"label":"K27 (B1,D7)", "x":7.5, "y":2.5}, + {"label":"K28 (B1,B4)", "x":8.5, "y":2.5}, + {"label":"K88 (F5,B4)", "x":9.5, "y":2.5}, + {"label":"K87 (F5,D7)", "x":10.5, "y":2.5}, + {"label":"K85 (F5,D4)", "x":11.5, "y":2.5}, + {"label":"K84 (F5,D5)", "x":12.5, "y":2.5}, + {"label":"K83 (F5,D3)", "x":13.5, "y":2.5, "w":1.5}, + {"label":"K86 (F5,D6)", "x":15.25, "y":2.5}, + {"label":"K82 (F5,D2)", "x":16.25, "y":2.5}, + {"label":"K81 (F5,D1)", "x":17.25, "y":2.5}, + {"label":"K30 (B2,D0)", "x":0, "y":3.5, "w":1.75}, + {"label":"K31 (B2,D1)", "x":1.75, "y":3.5}, + {"label":"K32 (B2,D2)", "x":2.75, "y":3.5}, + {"label":"K33 (B2,D3)", "x":3.75, "y":3.5}, + {"label":"K34 (B2,D5)", "x":4.75, "y":3.5}, + {"label":"K35 (B2,D4)", "x":5.75, "y":3.5}, + {"label":"K36 (B2,D6)", "x":6.75, "y":3.5}, + {"label":"K37 (B2,D7)", "x":7.75, "y":3.5}, + {"label":"K38 (B2,B4)", "x":8.75, "y":3.5}, + {"label":"K98 (F4,B4)", "x":9.75, "y":3.5}, + {"label":"K97 (F4,D7)", "x":10.75, "y":3.5}, + {"label":"K95 (F4,D4)", "x":11.75, "y":3.5}, + {"label":"K93 (F4,D3)", "x":12.75, "y":3.5, "w":2.25}, + {"label":"K40 (B3,D0)", "x":0, "y":4.5, "w":2.25}, + {"label":"K42 (B3,D2)", "x":2.25, "y":4.5}, + {"label":"K43 (B3,D3)", "x":3.25, "y":4.5}, + {"label":"K44 (B3,D5)", "x":4.25, "y":4.5}, + {"label":"K45 (B3,D4)", "x":5.25, "y":4.5}, + {"label":"K46 (B3,D6)", "x":6.25, "y":4.5}, + {"label":"K47 (B3,D7)", "x":7.25, "y":4.5}, + {"label":"K48 (B3,B4)", "x":8.25, "y":4.5}, + {"label":"KA8 (F1,B4)", "x":9.25, "y":4.5}, + {"label":"KA7 (F1,D7)", "x":10.25, "y":4.5}, + {"label":"KA5 (F1,D4)", "x":11.25, "y":4.5}, + {"label":"KA4 (F1,D5)", "x":12.25, "y":4.5, "w":2.75}, + {"label":"K92 (F4,D2)", "x":16.25, "y":4.5}, + {"label":"K50 (B7,D0)", "x":0, "y":5.5, "w":1.5}, + {"label":"K51 (B7,D1)", "x":1.5, "y":5.5}, + {"label":"K52 (B7,D2)", "x":2.5, "y":5.5, "w":1.5}, + {"label":"K56 (B7,D6)", "x":4, "y":5.5, "w":7}, + {"label":"K57 (B7,D7)", "x":11, "y":5.5, "w":1.5}, + {"label":"K54 (B7,D5)", "x":12.5, "y":5.5}, + {"label":"K53 (B7,D3)", "x":13.5, "y":5.5, "w":1.5}, + {"label":"KA6 (F1,D6)", "x":15.25, "y":5.5}, + {"label":"KA2 (F1,D2)", "x":16.25, "y":5.5}, + {"label":"KA1 (F1,D1)", "x":17.25, "y":5.5} + ] + } + } + ,"meta": "https://noroadsleft.github.io/kbf_qmk_converter/" +} diff --git a/keyboards/exclusive/e85/keymaps/default/keymap.c b/keyboards/exclusive/e85/keymaps/default/keymap.c new file mode 100644 index 000000000000..80f8e0eeb4b4 --- /dev/null +++ b/keyboards/exclusive/e85/keymaps/default/keymap.c @@ -0,0 +1,37 @@ +/* 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_ansi_tsangan( + 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, MO(1), 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_RCTL, KC_LEFT, KC_DOWN, KC_RGHT + ), + + [1] = LAYOUT_ansi_tsangan( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + RGB_MOD, RGB_TOG, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + BL_TOGG, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + +}; diff --git a/keyboards/exclusive/e85/keymaps/standard/keymap.c b/keyboards/exclusive/e85/keymaps/standard/keymap.c new file mode 100644 index 000000000000..c6778180be1a --- /dev/null +++ b/keyboards/exclusive/e85/keymaps/standard/keymap.c @@ -0,0 +1,37 @@ +/* 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_ansi_standard( + 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, MO(1), 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_APP, KC_RGUI, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT + ), + + [1] = LAYOUT_ansi_standard( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + RGB_MOD, RGB_TOG, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + BL_TOGG, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + +}; diff --git a/keyboards/exclusive/e85/keymaps/tsangan/keymap.c b/keyboards/exclusive/e85/keymaps/tsangan/keymap.c new file mode 100644 index 000000000000..80f8e0eeb4b4 --- /dev/null +++ b/keyboards/exclusive/e85/keymaps/tsangan/keymap.c @@ -0,0 +1,37 @@ +/* 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_ansi_tsangan( + 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, MO(1), 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_RCTL, KC_LEFT, KC_DOWN, KC_RGHT + ), + + [1] = LAYOUT_ansi_tsangan( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + RGB_MOD, RGB_TOG, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + BL_TOGG, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + +}; diff --git a/keyboards/exclusive/e85/keymaps/via/config.h b/keyboards/exclusive/e85/keymaps/via/config.h new file mode 100644 index 000000000000..78f3f6a69656 --- /dev/null +++ b/keyboards/exclusive/e85/keymaps/via/config.h @@ -0,0 +1 @@ + #define DYNAMIC_KEYMAP_LAYER_COUNT 3 \ No newline at end of file diff --git a/keyboards/exclusive/e85/keymaps/via/keymap.c b/keyboards/exclusive/e85/keymaps/via/keymap.c new file mode 100644 index 000000000000..c55c35ce192f --- /dev/null +++ b/keyboards/exclusive/e85/keymaps/via/keymap.c @@ -0,0 +1,45 @@ +/* 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_ansi_tsangan( + 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, MO(1), 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_RCTL, KC_LEFT, KC_DOWN, KC_RGHT + ), + + [1] = LAYOUT_ansi_tsangan( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + RGB_MOD, RGB_TOG, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + BL_TOGG, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + + [2] = LAYOUT_ansi_tsangan( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), +}; diff --git a/keyboards/exclusive/e85/keymaps/via/rules.mk b/keyboards/exclusive/e85/keymaps/via/rules.mk new file mode 100644 index 000000000000..29a6f75191f0 --- /dev/null +++ b/keyboards/exclusive/e85/keymaps/via/rules.mk @@ -0,0 +1,3 @@ +VIA_ENABLE = yes +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = no # Commands for debug and configuration \ No newline at end of file diff --git a/keyboards/exclusive/e85/readme.md b/keyboards/exclusive/e85/readme.md new file mode 100644 index 000000000000..fe5af17de8d6 --- /dev/null +++ b/keyboards/exclusive/e85/readme.md @@ -0,0 +1,17 @@ +# Exclusive E8.5 Hotswap + +Custom hotswap PCB for Exclusive E8.5. + +The switch matrix is identical between all three PCB variants of this board. Choose the correct LAYOUT that best matches the physical LAYOUT of your PCB. + +* Keyboard Maintainer: [MechMerlin](https://github.com/mechmerlin) +* Hardware Supported: E8.5 Hotswap/Soldered, atmega32u4 +* Hardware Availability: [Geekhack GB](https://geekhack.org/index.php?topic=103520) + +Make example for this keyboard (after setting up your build environment): + + make exclusive/e85:default + +**Reset Key**: The board can be reset by shorting the two holes underneath the PCB, or pressing the reset button on the reverse side. + +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/e85/rules.mk b/keyboards/exclusive/e85/rules.mk new file mode 100644 index 000000000000..e9c1ed8f1f89 --- /dev/null +++ b/keyboards/exclusive/e85/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 = 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 +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +AUDIO_ENABLE = no # Audio output +FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches +LTO_ENABLE = yes diff --git a/keyboards/exclusive/readme.md b/keyboards/exclusive/readme.md index 486e07d99b27..bee613bf4509 100644 --- a/keyboards/exclusive/readme.md +++ b/keyboards/exclusive/readme.md @@ -8,3 +8,4 @@ All files related to firmware of keyboards designed by Exclusive. * [e6-v2](./e6v2/): maintainers [MechMerlin](https://github.com/mechmerlin), [amnesia0287](https://github.com/amnesia0287) * [e7-v1](./e7v1): maintainer [masterzen](https://github.com/masterzen) * [e6.5](./e65): maintainer [masterzen](https://github.com/masterzen) +* [e8.5](./e85): maintainer [MechMerlin](https://github.com/mechmerlin) From 69b484600f672ef9b1368c121512d579f9b7fc98 Mon Sep 17 00:00:00 2001 From: Ryan Date: Sun, 21 Jun 2020 06:51:50 +1000 Subject: [PATCH 207/930] Remove more useless code (#9475) --- keyboards/absinthe/rules.mk | 12 ------------ keyboards/hhkb/ansi/config.h | 5 ----- keyboards/hhkb/jp/config.h | 5 ----- keyboards/kingly_keys/smd_milk/2_milk.c | 16 --------------- keyboards/kingly_keys/smd_milk/2_milk.h | 26 ------------------------- 5 files changed, 64 deletions(-) delete mode 100644 keyboards/kingly_keys/smd_milk/2_milk.c delete mode 100644 keyboards/kingly_keys/smd_milk/2_milk.h diff --git a/keyboards/absinthe/rules.mk b/keyboards/absinthe/rules.mk index f0b8037c912c..8f534909dfd5 100644 --- a/keyboards/absinthe/rules.mk +++ b/keyboards/absinthe/rules.mk @@ -11,16 +11,6 @@ MCU = atmega32u4 # ATmega328P USBasp 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 -# Otherwise, delete this section -# 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 # @@ -39,7 +29,5 @@ 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 ENCODER_ENABLE = yes RGBLIGHT_ENABLE = yes -# EXTRAFLAGS += -flto diff --git a/keyboards/hhkb/ansi/config.h b/keyboards/hhkb/ansi/config.h index 689fd556819d..53d958cc176b 100644 --- a/keyboards/hhkb/ansi/config.h +++ b/keyboards/hhkb/ansi/config.h @@ -54,11 +54,6 @@ along with this program. If not, see . #define SUART_IN_BIT 1 #ifdef __AVR_ATmega32U4__ - /* iom32u4.h has no definition of UCSR1D. copy from iom32u2.h */ - #define UCSR1D _SFR_MEM8(0xCB) - #define RTSEN 0 - #define CTSEN 1 - #define SERIAL_UART_BAUD 115200 #define SERIAL_UART_DATA UDR1 #define SERIAL_UART_UBRR ((F_CPU/(16.0*SERIAL_UART_BAUD)-1+0.5)) diff --git a/keyboards/hhkb/jp/config.h b/keyboards/hhkb/jp/config.h index 01dab6d440cd..9f6819b86e9e 100644 --- a/keyboards/hhkb/jp/config.h +++ b/keyboards/hhkb/jp/config.h @@ -54,11 +54,6 @@ along with this program. If not, see . #define SUART_IN_BIT 1 #ifdef __AVR_ATmega32U4__ - /* iom32u4.h has no definition of UCSR1D. copy from iom32u2.h */ - #define UCSR1D _SFR_MEM8(0xCB) - #define RTSEN 0 - #define CTSEN 1 - #define SERIAL_UART_BAUD 115200 #define SERIAL_UART_DATA UDR1 #define SERIAL_UART_UBRR ((F_CPU/(16.0*SERIAL_UART_BAUD)-1+0.5)) diff --git a/keyboards/kingly_keys/smd_milk/2_milk.c b/keyboards/kingly_keys/smd_milk/2_milk.c deleted file mode 100644 index 95fa50e02979..000000000000 --- a/keyboards/kingly_keys/smd_milk/2_milk.c +++ /dev/null @@ -1,16 +0,0 @@ -/* Copyright 2019 Sebastian Williams - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -#include "smd_milk.h" diff --git a/keyboards/kingly_keys/smd_milk/2_milk.h b/keyboards/kingly_keys/smd_milk/2_milk.h deleted file mode 100644 index 8f294817f912..000000000000 --- a/keyboards/kingly_keys/smd_milk/2_milk.h +++ /dev/null @@ -1,26 +0,0 @@ -/* Copyright 2019 Sebastian Williams - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License 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 \ -) { \ - { K00 }, \ - { K01 } \ -} From 02781979d6af096e8adb6bb02af7639b73c8f267 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Konstantin=20=C4=90or=C4=91evi=C4=87?= Date: Sat, 20 Jun 2020 22:58:48 +0200 Subject: [PATCH 208/930] [Docs] Improve Unicode documentation (#8676) --- docs/feature_macros.md | 89 +++++++++++----------- docs/feature_unicode.md | 159 +++++++++++++++++++++++----------------- 2 files changed, 137 insertions(+), 111 deletions(-) diff --git a/docs/feature_macros.md b/docs/feature_macros.md index 1c7705a51609..acd40d1bf349 100644 --- a/docs/feature_macros.md +++ b/docs/feature_macros.md @@ -6,34 +6,34 @@ Macros allow you to send multiple keystrokes when pressing just one key. QMK has ## The New Way: `SEND_STRING()` & `process_record_user` -Sometimes you just want a key to type out words or phrases. For the most common situations we've provided `SEND_STRING()`, which will type out your string (i.e. a sequence of characters) for you. All ASCII characters that are easily translated to a keycode are supported (e.g. `\n\t`). +Sometimes you want a key to type out words or phrases. For the most common situations, we've provided `SEND_STRING()`, which will type out a string (i.e. a sequence of characters) for you. All ASCII characters that are easily translatable to a keycode are supported (e.g. `qmk 123\n\t`). Here is an example `keymap.c` for a two-key keyboard: ```c enum custom_keycodes { - QMKBEST = SAFE_RANGE, + QMKBEST = SAFE_RANGE, }; bool process_record_user(uint16_t keycode, keyrecord_t *record) { - switch (keycode) { + 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; + 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; }; const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [0] = { - {QMKBEST, KC_ESC} - } + [0] = { + {QMKBEST, KC_ESC}, + // ... + }, }; ``` @@ -49,42 +49,45 @@ You can do that by adding another keycode and adding another case to the switch ```c enum custom_keycodes { - QMKBEST = SAFE_RANGE, - QMKURL, - MY_OTHER_MACRO + QMKBEST = SAFE_RANGE, + QMKURL, + MY_OTHER_MACRO, }; bool process_record_user(uint16_t keycode, keyrecord_t *record) { - switch (keycode) { + 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; + 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; + if (record->event.pressed) { + // when keycode QMKURL is pressed + SEND_STRING("https://qmk.fm/\n"); + } else { + // when keycode QMKURL is released + } + break; + case MY_OTHER_MACRO: - if (record->event.pressed) { - SEND_STRING(SS_LCTL("ac")); // selects all and copies - } - break; - } - return true; + if (record->event.pressed) { + SEND_STRING(SS_LCTL("ac")); // selects all and copies + } + break; + } + return true; }; const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [0] = { - {MY_CUSTOM_MACRO, MY_OTHER_MACRO} - } + [0] = { + {MY_CUSTOM_MACRO, MY_OTHER_MACRO}, + // ... + }, }; ``` diff --git a/docs/feature_unicode.md b/docs/feature_unicode.md index aedffe4ea253..02a7bea5dabe 100644 --- a/docs/feature_unicode.md +++ b/docs/feature_unicode.md @@ -2,11 +2,25 @@ Unicode characters can be input straight from your keyboard! There are some limitations, however. -QMK has three different methods for enabling Unicode input and defining keycodes: +In order to enable Unicode support on your keyboard, you will need to do the following: -## Basic Unicode +1. Choose one of three supported Unicode implementations: [Basic Unicode](#basic-unicode), [Unicode Map](#unicode-map), [UCIS](#ucis). +2. Find which [input mode](#input-modes) is the best match for your operating system and setup. +3. [Set](#setting-the-input-mode) the appropriate input mode (or modes) in your configuration. +4. Add Unicode keycodes to your keymap. -This method supports Unicode code points up to `0x7FFF`. This covers characters for most modern languages, as well as symbols, but it doesn't cover emoji. + +## 1. Methods :id=methods + +QMK supports three different methods for enabling Unicode input and adding Unicode characters to your keymap. Each has its pros and cons in terms of flexibility and ease of use. Choose the one that best fits your use case. + +The Basic method should be enough for most users. However, if you need a wider range of supported characters (including emoji, rare symbols etc.), you should use Unicode Map. + +
+ +### 1.1. Basic Unicode :id=basic-unicode + +The easiest to use method, albeit somewhat limited. It stores Unicode characters as keycodes in the keymap itself, so it only supports code points up to `0x7FFF`. This covers characters for most modern languages (including East Asian), as well as symbols, but it doesn't cover emoji. Add the following to your `rules.mk`: @@ -14,11 +28,13 @@ Add the following to your `rules.mk`: UNICODE_ENABLE = yes ``` -Then add `UC(c)` keycodes to your keymap, where _c_ is the code point (preferably in hexadecimal, up to 4 digits long). For example: `UC(0x45B)`, `UC(0x30C4)`. +Then add `UC(c)` keycodes to your keymap, where _c_ is the code point of the desired character (preferably in hexadecimal, up to 4 digits long). For example, `UC(0x40B)` will output [Ћ](https://unicode-table.com/en/040B/), and `UC(0x30C4)` will output [ツ](https://unicode-table.com/en/30C4). -## Unicode Map +
-This method supports all possible code points (up to `0x10FFFF`); however, you need to maintain a separate mapping table in your keymap file, which may contain at most 16384 entries. +### 1.2. Unicode Map :id=unicode-map + +In addition to standard character ranges, this method also covers emoji, ancient scripts, rare symbols etc. In fact, all possible code points (up to `0x10FFFF`) are supported. Here, Unicode characters are stored in a separate mapping table. You need to maintain a `unicode_map` array in your keymap file, which may contain at most 16384 entries. Add the following to your `rules.mk`: @@ -26,7 +42,7 @@ Add the following to your `rules.mk`: UNICODEMAP_ENABLE = yes ``` -Then add `X(i)` keycodes to your keymap, where _i_ is an array index into the mapping table: +Then add `X(i)` keycodes to your keymap, where _i_ is the desired character's index in the mapping table. This can be a numeric value, but it's recommended to keep the indices in an enum and access them by name. ```c enum unicode_names { @@ -44,15 +60,17 @@ const uint32_t PROGMEM unicode_map[] = { Then you can use `X(BANG)`, `X(SNEK)` etc. in your keymap. -### Lower and Upper Case +#### Lower and Upper Case Characters often come in lower and upper case pairs, such as å and Å. To make inputting these characters easier, you can use `XP(i, j)` in your keymap, where _i_ and _j_ are the mapping table indices of the lower and upper case character, respectively. If you're holding down Shift or have Caps Lock turned on when you press the key, the second (upper case) character will be inserted; otherwise, the first (lower case) version will appear. This is most useful when creating a keymap for an international layout with special characters. Instead of having to put the lower and upper case versions of a character on separate keys, you can have them both on the same key by using `XP()`. This helps blend Unicode keys in with regular alphas. -Due to keycode size constraints, _i_ and _j_ can each only refer to one of the first 128 characters in your `unicode_map`. In other words, 0 ≤ _i_ ≤ 127 and 0 ≤ _j_ ≤ 127. This is enough for most use cases, but if you'd like to customize the index calculation, you can override the [`unicodemap_index()`](https://github.com/qmk/qmk_firmware/blob/71f640d47ee12c862c798e1f56392853c7b1c1a8/quantum/process_keycode/process_unicodemap.c#L40) function. This also allows you to, say, check Ctrl instead of Shift/Caps. +Due to keycode size constraints, _i_ and _j_ can each only refer to one of the first 128 characters in your `unicode_map`. In other words, 0 ≤ _i_ ≤ 127 and 0 ≤ _j_ ≤ 127. This is enough for most use cases, but if you'd like to customize the index calculation, you can override the [`unicodemap_index()`](https://github.com/qmk/qmk_firmware/blob/71f640d47ee12c862c798e1f56392853c7b1c1a8/quantum/process_keycode/process_unicodemap.c#L36) function. This also allows you to, say, check Ctrl instead of Shift/Caps. + +
-## UCIS +### 1.3. UCIS :id=ucis This method also supports all possible code points. As with the Unicode Map method, you need to maintain a mapping table in your keymap file. However, there are no built-in keycodes for this feature — you have to create a custom keycode or function that invokes this functionality. @@ -77,7 +95,7 @@ By default, each table entry may be up to 3 code points long. This number can be To use UCIS input, call `qk_ucis_start()`. Then, type the mnemonic for the character (such as "rofl") and hit Space, Enter or Esc. QMK should erase the "rofl" text and insert the laughing emoji. -### Customization +#### Customization There are several functions that you can define in your keymap to customize the functionality of this feature. @@ -87,7 +105,8 @@ There are several functions that you can define in your keymap to customize the You can find the default implementations of these functions in [`process_ucis.c`](https://github.com/qmk/qmk_firmware/blob/master/quantum/process_keycode/process_ucis.c). -## Input Modes + +## 2. Input Modes :id=input-modes Unicode input in QMK works by inputting a sequence of characters to the OS, sort of like a macro. Unfortunately, the way this is done differs for each platform. Specifically, each platform requires a different combination of keys to trigger Unicode input. Therefore, a corresponding input mode has to be set in QMK. @@ -96,54 +115,67 @@ The following input modes are available: * **`UC_MAC`**: macOS built-in Unicode hex input. Supports code points up to `0x10FFFF` (all possible code points). To enable, go to _System Preferences > Keyboard > Input Sources_, add _Unicode Hex Input_ to the list (it's under _Other_), then activate it from the input dropdown in the Menu Bar. - By default, this mode uses the left Option key (`KC_LALT`) for Unicode input, but this can be changed by defining [`UNICODE_KEY_MAC`](#input-key-configuration) with another keycode. + By default, this mode uses the left Option key (`KC_LALT`) for Unicode input, but this can be changed by defining [`UNICODE_KEY_MAC`](#input-key-configuration) with a different keycode. - !> Using the _Unicode Hex Input_ input source may disable some Option based shortcuts, such as Option + Left Arrow and Option + Right Arrow. + !> Using the _Unicode Hex Input_ input source may disable some Option-based shortcuts, such as Option+Left and Option+Right. - !> `UC_OSX` is a deprecated alias of `UC_MAC` that will be removed in a future version of QMK. + !> `UC_OSX` is a deprecated alias of `UC_MAC` that will be removed in future versions of QMK. All new keymaps should use `UC_MAC`. * **`UC_LNX`**: Linux built-in IBus Unicode input. Supports code points up to `0x10FFFF` (all possible code points). Enabled by default and works almost anywhere on IBus-enabled distros. Without IBus, this mode works under GTK apps, but rarely anywhere else. - By default, this mode uses Ctrl+Shift+U (`LCTL(LSFT(KC_U))`) to start Unicode input, but this can be changed by defining [`UNICODE_KEY_LNX`](#input-key-configuration) with another keycode. This might be required for IBus versions ≥1.5.15, where Ctrl+Shift+U behavior is consolidated into Ctrl+Shift+E. + By default, this mode uses Ctrl+Shift+U (`LCTL(LSFT(KC_U))`) to start Unicode input, but this can be changed by defining [`UNICODE_KEY_LNX`](#input-key-configuration) with a different keycode. This might be required for IBus versions ≥1.5.15, where Ctrl+Shift+U behavior is consolidated into Ctrl+Shift+E. * **`UC_WIN`**: _(not recommended)_ Windows built-in hex numpad Unicode input. Supports code points up to `0xFFFF`. - To enable, create a registry key under `HKEY_CURRENT_USER\Control Panel\Input Method\EnableHexNumpad` of type `REG_SZ` called `EnableHexNumpad` and set its value to `1`. This can be done from the Command Prompt by running `reg add "HKCU\Control Panel\Input Method" -v EnableHexNumpad -t REG_SZ -d 1` with administrator privileges. Reboot afterwards. + To enable, create a registry key under `HKEY_CURRENT_USER\Control Panel\Input Method` of type `REG_SZ` called `EnableHexNumpad` and set its value to `1`. This can be done from the Command Prompt by running `reg add "HKCU\Control Panel\Input Method" -v EnableHexNumpad -t REG_SZ -d 1` with administrator privileges. Reboot afterwards. This mode is not recommended because of reliability and compatibility issues; use the `UC_WINC` mode instead. * **`UC_BSD`**: _(non implemented)_ Unicode input under BSD. Not implemented at this time. If you're a BSD user and want to help add support for it, please [open an issue on GitHub](https://github.com/qmk/qmk_firmware/issues). * **`UC_WINC`**: Windows Unicode input using [WinCompose](https://github.com/samhocevar/wincompose). As of v0.9.0, supports code points up to `0x10FFFF` (all possible code points). - To enable, install the [latest release](https://github.com/samhocevar/wincompose/releases/latest). Once installed, WinCompose will automatically run on startup. Works reliably under all version of Windows supported by the app. - By default, this mode uses right Alt (`KC_RALT`) as the Compose key, but this can be changed in the WinCompose settings and by defining [`UNICODE_KEY_WINC`](#input-key-configuration) with another keycode. + To enable, install the [latest release](https://github.com/samhocevar/wincompose/releases/latest). Once installed, WinCompose will automatically run on startup. This mode works reliably under all version of Windows supported by the app. + By default, this mode uses right Alt (`KC_RALT`) as the Compose key, but this can be changed in the WinCompose settings and by defining [`UNICODE_KEY_WINC`](#input-key-configuration) with a different keycode. + -### Switching Input Modes +## 3. Setting the Input Mode :id=setting-the-input-mode -There are two ways to set the input mode for Unicode: by keycode or by function. Keep in mind that both methods write to persistent storage (EEPROM), and are loaded each time the keyboard starts. So once you've set it the first time, you don't need to set it again unless you want to change it, or you've reset the EEPROM settings. +To set your desired input mode, add the following define to your `config.h`: -You can switch the input mode at any time by using one of the following keycodes. The easiest way is to add the ones you use to your keymap. +```c +#define UNICODE_SELECTED_MODES UC_LNX +``` -|Keycode |Alias |Input Mode |Description | -|----------------------|---------|------------|--------------------------------------------------------------| -|`UNICODE_MODE_FORWARD`|`UC_MOD` |Next in list|[Cycle](#input-mode-cycling) through selected modes | -|`UNICODE_MODE_REVERSE`|`UC_RMOD`|Prev in list|[Cycle](#input-mode-cycling) through selected modes in reverse| -|`UNICODE_MODE_MAC` |`UC_M_MA`|`UC_MAC` |Switch to macOS input | -|`UNICODE_MODE_LNX` |`UC_M_LN`|`UC_LNX` |Switch to Linux input | -|`UNICODE_MODE_WIN` |`UC_M_WI`|`UC_WIN` |Switch to Windows input | -|`UNICODE_MODE_BSD` |`UC_M_BS`|`UC_BSD` |Switch to BSD input (not implemented) | -|`UNICODE_MODE_WINC` |`UC_M_WC`|`UC_WINC` |Switch to Windows input using WinCompose | +This example sets the board's default input mode to `UC_LNX`. You can replace this with `UC_MAC`, `UC_WINC`, or any of the other modes listed [above](#input-modes). The board will automatically use the selected mode on startup, unless you manually switch to another mode (see [below](#keycodes)). -You can also switch the input mode by calling `set_unicode_input_mode(x)` in your code, where _x_ is one of the above input mode constants (e.g. `UC_LNX`). Since the function only needs to be called once, it's recommended that you do it in `eeconfig_init_user()` (or a similar function). For example: +You can also select multiple input modes, which allows you to easily cycle through them using the `UC_MOD`/`UC_RMOD` keycodes. ```c -void eeconfig_init_user(void) { - set_unicode_input_mode(UC_LNX); -} +#define UNICODE_SELECTED_MODES UC_MAC, UC_LNX, UC_WINC ``` -### Audio Feedback +Note that the values are separated by commas. The board will remember the last used input mode and will continue using it on next power-up. You can disable this and force it to always start with the first mode in the list by adding `#define UNICODE_CYCLE_PERSIST false` to your `config.h`. + +#### Keycodes + +You can switch the input mode at any time by using the following keycodes. Adding these to your keymap allows you to quickly switch to a specific input mode, including modes not listed in `UNICODE_SELECTED_MODES`. + +|Keycode |Alias |Input Mode |Description | +|----------------------|---------|------------|-----------------------------------------------------------------------------| +|`UNICODE_MODE_FORWARD`|`UC_MOD` |Next in list|Cycle through selected modes, reverse direction when Shift is held | +|`UNICODE_MODE_REVERSE`|`UC_RMOD`|Prev in list|Cycle through selected modes in reverse, forward direction when Shift is held| +|`UNICODE_MODE_MAC` |`UC_M_MA`|`UC_MAC` |Switch to macOS input | +|`UNICODE_MODE_LNX` |`UC_M_LN`|`UC_LNX` |Switch to Linux input | +|`UNICODE_MODE_WIN` |`UC_M_WI`|`UC_WIN` |Switch to Windows input | +|`UNICODE_MODE_BSD` |`UC_M_BS`|`UC_BSD` |Switch to BSD input _(not implemented)_ | +|`UNICODE_MODE_WINC` |`UC_M_WC`|`UC_WINC` |Switch to Windows input using WinCompose | + +You can also switch the input mode by calling `set_unicode_input_mode(x)` in your code, where _x_ is one of the above input mode constants (e.g. `UC_LNX`). + +?> Using `UNICODE_SELECTED_MODES` is preferable to calling `set_unicode_input_mode()` in `matrix_init_user()` or similar functions, since it's better integrated into the Unicode system and has the added benefit of avoiding unnecessary writes to EEPROM. + +#### Audio Feedback If you have the [Audio feature](feature_audio.md) enabled on the board, you can set melodies to be played when you press the above keys. That way you can have some audio feedback when switching input modes. @@ -157,20 +189,21 @@ For instance, you can add these definitions to your `config.h` file: #define UNICODE_SONG_WINC UNICODE_WINDOWS ``` -### Additional Customization + +## Additional Customization Because Unicode is a large and versatile feature, there are a number of options you can customize to make it work better on your system. -#### Start and Finish Input Functions +### Start and Finish Input Functions The functions for starting and finishing Unicode input on your platform can be overridden locally. Possible uses include customizing input mode behavior if you don't use the default keys, or adding extra visual/audio feedback to Unicode input. -* `void unicode_input_start(void)` – This sends the initial sequence that tells your platform to enter Unicode input mode. For example, it presses Ctrl+Shift+U on Linux and holds the Option key on macOS. -* `void unicode_input_finish(void)` – This is called to exit Unicode input mode, for example by pressing Space or releasing the Option key. +* `void unicode_input_start(void)` – This sends the initial sequence that tells your platform to enter Unicode input mode. For example, it holds the left Alt key followed by Num+ on Windows, and presses the `UNICODE_KEY_LNX` combination (default: Ctrl+Shift+U) on Linux. +* `void unicode_input_finish(void)` – This is called to exit Unicode input mode, for example by pressing Space or releasing the Alt key. You can find the default implementations of these functions in [`process_unicode_common.c`](https://github.com/qmk/qmk_firmware/blob/master/quantum/process_keycode/process_unicode_common.c). -#### Input Key Configuration +### Input Key Configuration You can customize the keys used to trigger Unicode input for macOS, Linux and WinCompose by adding corresponding defines to your `config.h`. The default values match the platforms' default settings, so you shouldn't need to change this unless Unicode input isn't working, or you want to use a different key (e.g. in order to free up left or right Alt). @@ -180,54 +213,47 @@ You can customize the keys used to trigger Unicode input for macOS, Linux and Wi |`UNICODE_KEY_LNX` |`uint16_t`|`LCTL(LSFT(KC_U))`|`#define UNICODE_KEY_LNX LCTL(LSFT(KC_E))`| |`UNICODE_KEY_WINC`|`uint8_t` |`KC_RALT` |`#define UNICODE_KEY_WINC KC_RGUI` | -#### Input Mode Cycling -You can choose which input modes are available for cycling through. By default, this is disabled. If you want to enable it, limiting it to just the modes you use makes sense. Note that the values in the list are comma-delimited. +## Sending Unicode Strings -```c -#define UNICODE_SELECTED_MODES UC_MAC, UC_LNX, UC_WIN, UC_WINC -``` +QMK provides several functions that allow you to send Unicode input to the host programmatically: -You can cycle through the selected modes by using the `UC_MOD`/`UC_RMOD` keycodes, or by calling `cycle_unicode_input_mode(offset)` in your code (`offset` is how many modes to move forward by, so +1 corresponds to `UC_MOD`). +### `send_unicode_string()` -By default, when the keyboard boots, it will initialize the input mode to the last one you used. You can disable this and make it start with the first mode in the list every time by adding the following to your `config.h`: +This function is much like `send_string()`, but it allows you to input UTF-8 characters directly. It supports all code points, provided the selected input mode also supports it. Make sure your `keymap.c` file is formatted using UTF-8 encoding. ```c -#define UNICODE_CYCLE_PERSIST false +send_unicode_string("(ノಠ痊ಠ)ノ彡┻━┻"); ``` -!> 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. +Example uses include sending Unicode strings when a key is pressed, as described in [Macros](feature_macros.md). -## `send_unicode_string()` +### `send_unicode_hex_string()` -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. +Similar to `send_unicode_string()`, but the characters are represented by their Unicode code points, written in hexadecimal and separated by spaces. For example, the table flip above would be achieved with: ```c -send_unicode_string("(ノಠ痊ಠ)ノ彡┻━┻"); +send_unicode_hex_string("0028 30CE 0CA0 75CA 0CA0 0029 30CE 5F61 253B 2501 253B"); ``` -## `send_unicode_hex_string()` +An easy way to convert your Unicode string to this format is to use [this site](https://r12a.github.io/app-conversion/) and take the result in the "Hex/UTF-32" section. -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"); -``` +## Additional Language Support -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. +In `quantum/keymap_extras`, you'll see various language files — these work the same way as the ones for alternative layouts such as Colemak or BÉPO. When you include one of these language headers, you gain access to keycodes specific to that language / national layout. Such keycodes are defined by a 2-letter country/language code, followed by an underscore and a 4-letter abbreviation of the character to which the key corresponds. For example, including `keymap_french.h` and using `FR_UGRV` in your keymap will output `ù` when typed on a system with a native French AZERTY layout. -## Additional Language Support +If the primary system layout you use on your machine is different from US ANSI, using these language-specific keycodes can help your QMK keymaps better match what will actually be output on the screen. However, keep in mind that these keycodes are just aliases for the corresponding default US keycodes under the hood, and that the HID protocol used by keyboards is itself inherently based on US ANSI. -In `quantum/keymap_extras/`, you'll see various language files - these work the same way as the alternative layout ones do. Most are defined by their two letter country/language code followed by an underscore and a 4-letter abbreviation of its name. `FR_UGRV` which will result in a `ù` when using a software-implemented AZERTY layout. It's currently difficult to send such characters in just the firmware. ## International Characters on Windows -### AutoHotkey allows Windows users to create custom hotkeys among others. +### AutoHotkey -The method does not require Unicode support in the keyboard itself but depends instead of [AutoHotkey](https://autohotkey.com) running in the background. +The method does not require Unicode support in the keyboard itself but instead depends on [AutoHotkey](https://autohotkey.com) running in the background. First you need to select a modifier combination that is not in use by any of your programs. -CtrlAltWin is not used very widely and should therefore be perfect for this. +Ctrl+Alt+Win is not used very widely and should therefore be perfect for this. There is a macro defined for a mod-tab combo `LCAG_T`. Add this mod-tab combo to a key on your keyboard, e.g.: `LCAG_T(KC_TAB)`. This makes the key behave like a tab key if pressed and released immediately but changes it to the modifier if used with another key. @@ -242,8 +268,5 @@ AutoHotkey inserts the Text right of `Send, ` when this combination is pressed. ### US International -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 à. - +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 à. You can find details on how to enable this [here](https://support.microsoft.com/en-us/help/17424/windows-change-keyboard-layout). From e58ab6d326f7d99e9b518ae3b3a9da5045104d63 Mon Sep 17 00:00:00 2001 From: Thorsten Date: Sat, 20 Jun 2020 23:03:06 +0200 Subject: [PATCH 209/930] update shell.nix (#8910) * now uses gcc 8.4 * fixes building boards with adafruit feather (in my case pancake) --- shell.nix | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/shell.nix b/shell.nix index 8906bacfae9d..78bc005f7e57 100644 --- a/shell.nix +++ b/shell.nix @@ -8,26 +8,21 @@ let in { dfu-programmer = addDarwinSupport super.dfu-programmer; teensy-loader-cli = addDarwinSupport super.teensy-loader-cli; - - avrgcc = super.avrgcc.overrideAttrs (oldAttrs: rec { - name = "avr-gcc-8.1.0"; - src = super.fetchurl { - url = "mirror://gcc/releases/gcc-8.1.0/gcc-8.1.0.tar.xz"; - sha256 = "0lxil8x0jjx7zbf90cy1rli650akaa6hpk8wk8s62vk2jbwnc60x"; - }; - }); }; nixpkgs = builtins.fetchTarball { - url = "https://github.com/NixOS/nixpkgs/archive/0260747427737b980f0.tar.gz"; - sha256 = "1p2yc6b40xvvxvmlqd9wb440pkrimnlc2wsbpa5rddlpx1dn8qmf"; + url = "https://github.com/NixOS/nixpkgs/archive/903266491b7b9b0379e88709feca0af900def0d9.tar.gz"; + sha256 = "1b5wjrfgyha6s15k1yjyx41hvrpmd5szpkpkxk6l5hyrfqsr8wip"; }; pkgs = import nixpkgs { overlays = [ overlay ]; }; in with pkgs; -let avr_incflags = [ +let + avrlibc = pkgsCross.avr.libcCross; + + avr_incflags = [ "-isystem ${avrlibc}/avr/include" "-B${avrlibc}/avr/lib/avr5" "-L${avrlibc}/avr/lib/avr5" @@ -41,7 +36,12 @@ stdenv.mkDerivation { name = "qmk-firmware"; buildInputs = [ dfu-programmer dfu-util diffutils git python3 ] - ++ lib.optional avr [ avrbinutils avrgcc avrlibc avrdude ] + ++ lib.optional avr [ + pkgsCross.avr.buildPackages.binutils + pkgsCross.avr.buildPackages.gcc8 + avrlibc + avrdude + ] ++ lib.optional arm [ gcc-arm-embedded ] ++ lib.optional teensy [ teensy-loader-cli ]; From b6e9ef8dd1f2d9e7f0ea82b60e823bf25f5164b6 Mon Sep 17 00:00:00 2001 From: Joel Challis Date: Sat, 20 Jun 2020 22:19:56 +0100 Subject: [PATCH 210/930] CI: Run 'qmk info' on keyboard changes (#9212) --- .github/workflows/info.yml | 49 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 .github/workflows/info.yml diff --git a/.github/workflows/info.yml b/.github/workflows/info.yml new file mode 100644 index 000000000000..31a11058361c --- /dev/null +++ b/.github/workflows/info.yml @@ -0,0 +1,49 @@ +name: PR Lint keyboards + +on: + pull_request: + paths: + - 'keyboards/**' + +jobs: + info: + runs-on: ubuntu-latest + + container: qmkfm/base_container + + steps: + - uses: actions/checkout@v2 + with: + fetch-depth: 0 + + - name: Print info + run: | + git rev-parse --short HEAD + echo ${{ github.event.pull_request.base.sha }} + git diff --name-only ${{ github.event.pull_request.base.sha }}... + + - name: Run qmk info + shell: 'bash {0}' + run: | + QMK_CHANGES=$(git diff --name-only ${{ github.event.pull_request.base.sha }}...) + QMK_KEYBOARDS=$(qmk list-keyboards) + + exit_code=0 + for KB in $QMK_KEYBOARDS; do + KEYBOARD_CHANGES=$(echo "$QMK_CHANGES" | grep -E '^(keyboards/'${KB}'/)') + if [[ -z "$KEYBOARD_CHANGES" ]]; then + # skip as no changes for this keyboard + continue + fi + + KEYMAP_ONLY=$(echo "$KEYBOARD_CHANGES" | grep -cv /keymaps/) + if [[ $KEYMAP_ONLY -gt 0 ]]; then + echo "linting ${KB}" + + # TODO: info info always returns 0 - right now the only way to know failure is to inspect log lines + qmk info -kb ${KB} 2>&1 | tee /tmp/$$ + !(grep -cq ☒ /tmp/$$) + : $((exit_code = $exit_code + $?)) + fi + done + exit $exit_code From 5c07363054c02d09754a32ff4005c9535eeb6ec8 Mon Sep 17 00:00:00 2001 From: Joshua Diamond Date: Sat, 20 Jun 2020 17:39:45 -0400 Subject: [PATCH 211/930] spidey3 userspace: GUI F-Key lock was affecting some non-F-keys (#9469) --- users/spidey3/spidey3.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/users/spidey3/spidey3.c b/users/spidey3/spidey3.c index 9d696494f744..4e364628aa98 100644 --- a/users/spidey3/spidey3.c +++ b/users/spidey3/spidey3.c @@ -223,7 +223,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { } break; - case KC_F1 ... KC_F24: + case KC_F1 ... KC_F12: return process_gflock(keycode, record); } From d7f9e6fcf1e13d77298cb1f5169cea240709c163 Mon Sep 17 00:00:00 2001 From: siano Date: Sat, 20 Jun 2020 23:47:09 +0200 Subject: [PATCH 212/930] Added missing RGB controls on layer 1. (#9481) --- keyboards/xd87/keymaps/mac_underglow/keymap.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/keyboards/xd87/keymaps/mac_underglow/keymap.c b/keyboards/xd87/keymaps/mac_underglow/keymap.c index 34b260f35ae6..e5bdebab5cf9 100755 --- a/keyboards/xd87/keymaps/mac_underglow/keymap.c +++ b/keyboards/xd87/keymaps/mac_underglow/keymap.c @@ -26,8 +26,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [1] = LAYOUT_tkl_ansi( RESET, EEP_RST, DEBUG, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 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, - KC_TRNS, KC_TRNS, KC_TRNS, 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_BRTG, 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, + KC_TRNS, RGB_TOG, RGB_VAI, RGB_MOD, RGB_HUI, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, BL_BRTG, BL_DEC, + KC_TRNS, KC_TRNS, RGB_VAD, RGB_RMOD,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, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 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 8252f378d9b453b0078699363543be501c9b81d8 Mon Sep 17 00:00:00 2001 From: stanrc85 <47038504+stanrc85@users.noreply.github.com> Date: Sat, 20 Jun 2020 17:57:33 -0400 Subject: [PATCH 213/930] Add velocikey to alice keymap (#9476) --- keyboards/projectkb/alice/keymaps/stanrc85/keymap.c | 2 +- users/stanrc85/rules.mk | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/keyboards/projectkb/alice/keymaps/stanrc85/keymap.c b/keyboards/projectkb/alice/keymaps/stanrc85/keymap.c index 667ffe4f696c..300362c281e7 100644 --- a/keyboards/projectkb/alice/keymaps/stanrc85/keymap.c +++ b/keyboards/projectkb/alice/keymaps/stanrc85/keymap.c @@ -50,7 +50,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_FN2_60] = LAYOUT_default( BL_TOGG, RGB_TOG, RGB_MOD, RGB_VAD, RGB_VAI, RGB_SAI, RGB_HUD, RGB_HUI, _______, _______, _______, _______, _______, _______, _______, _______, - BL_INC, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET, + BL_INC, VLK_TOG, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET, BL_DEC, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MAKE, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, TG(_DEFAULT) diff --git a/users/stanrc85/rules.mk b/users/stanrc85/rules.mk index d544b2d95a83..83cda852d84b 100644 --- a/users/stanrc85/rules.mk +++ b/users/stanrc85/rules.mk @@ -24,4 +24,5 @@ ifeq ($(strip $(KEYBOARD)), projectkb/alice/rev1) SRC += rgblight_layers.c VIA_ENABLE = yes LTO_ENABLE = no + VELOCIKEY_ENABLE=yes endif \ No newline at end of file From 30cdf9331a0a5b78ddc9d0aff45ff1168de97ae8 Mon Sep 17 00:00:00 2001 From: Drashna Jaelre Date: Sat, 20 Jun 2020 15:07:26 -0700 Subject: [PATCH 214/930] Change `led` variable in rgb_matrix_drivers to avoid conflicts (#9412) * Change `led` to `led_matrix` in rgb_matrix_drivers Is a minor change that only affects the driver file. However, this will allow somebody to run rgblight along side rgb matrix using the ws2812 driver, as well. Specifically, so you can use the custom driver for rgblight to set a different pin (barring a change to the `ws2812_setleds` function). Courtesy of discord conversion: https://discordapp.com/channels/440868230475677696/568161140534935572/721555623191248906 * Change name to be super specific * Update rgb_matrix_drivers.c --- quantum/rgb_matrix_drivers.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/quantum/rgb_matrix_drivers.c b/quantum/rgb_matrix_drivers.c index 204b6c551f97..22259360868e 100644 --- a/quantum/rgb_matrix_drivers.c +++ b/quantum/rgb_matrix_drivers.c @@ -115,27 +115,27 @@ const rgb_matrix_driver_t rgb_matrix_driver = { #elif defined(WS2812) // LED color buffer -LED_TYPE led[DRIVER_LED_TOTAL]; +LED_TYPE rgb_matrix_ws2812_array[DRIVER_LED_TOTAL]; static void init(void) {} static void flush(void) { // Assumes use of RGB_DI_PIN - ws2812_setleds(led, DRIVER_LED_TOTAL); + ws2812_setleds(rgb_matrix_ws2812_array, DRIVER_LED_TOTAL); } // Set an led in the buffer to a color static inline void setled(int i, uint8_t r, uint8_t g, uint8_t b) { - led[i].r = r; - led[i].g = g; - led[i].b = b; + rgb_matrix_ws2812_array[i].r = r; + rgb_matrix_ws2812_array[i].g = g; + rgb_matrix_ws2812_array[i].b = b; # ifdef RGBW - convert_rgb_to_rgbw(led[i]); + convert_rgb_to_rgbw(rgb_matrix_ws2812_array[i]); # endif } static void setled_all(uint8_t r, uint8_t g, uint8_t b) { - for (int i = 0; i < sizeof(led) / sizeof(led[0]); i++) { + for (int i = 0; i < sizeof(rgb_matrix_ws2812_array) / sizeof(rgb_matrix_ws2812_array[0]); i++) { setled(i, r, g, b); } } From f36112e957e6ce815563766d86f8bbcc278b3f78 Mon Sep 17 00:00:00 2001 From: cole smith <38364556+daysgobye@users.noreply.github.com> Date: Sat, 20 Jun 2020 15:13:43 -0700 Subject: [PATCH 215/930] added keyboard 5x12 to boardsource folder (#9438) * added keyboard 5x12 to boardsource folder * Apply suggestions from code review Co-authored-by: Ryan Co-authored-by: Ryan --- keyboards/boardsource/5x12/5x12.c | 1 + keyboards/boardsource/5x12/5x12.h | 17 +++ keyboards/boardsource/5x12/config.h | 143 ++++++++++++++++++ keyboards/boardsource/5x12/info.json | 77 ++++++++++ .../boardsource/5x12/keymaps/default/keymap.c | 39 +++++ keyboards/boardsource/5x12/readme.md | 13 ++ keyboards/boardsource/5x12/rules.mk | 33 ++++ 7 files changed, 323 insertions(+) create mode 100644 keyboards/boardsource/5x12/5x12.c create mode 100644 keyboards/boardsource/5x12/5x12.h create mode 100644 keyboards/boardsource/5x12/config.h create mode 100644 keyboards/boardsource/5x12/info.json create mode 100644 keyboards/boardsource/5x12/keymaps/default/keymap.c create mode 100644 keyboards/boardsource/5x12/readme.md create mode 100644 keyboards/boardsource/5x12/rules.mk diff --git a/keyboards/boardsource/5x12/5x12.c b/keyboards/boardsource/5x12/5x12.c new file mode 100644 index 000000000000..579cd5effc1a --- /dev/null +++ b/keyboards/boardsource/5x12/5x12.c @@ -0,0 +1 @@ +#include "5x12.h" \ No newline at end of file diff --git a/keyboards/boardsource/5x12/5x12.h b/keyboards/boardsource/5x12/5x12.h new file mode 100644 index 000000000000..bbc0689b442e --- /dev/null +++ b/keyboards/boardsource/5x12/5x12.h @@ -0,0 +1,17 @@ +#pragma once +#include "quantum.h" + +#define LAYOUT_ortho_5x12( \ + 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 \ + ) { \ + {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} \ + } + diff --git a/keyboards/boardsource/5x12/config.h b/keyboards/boardsource/5x12/config.h new file mode 100644 index 000000000000..1cd7101589aa --- /dev/null +++ b/keyboards/boardsource/5x12/config.h @@ -0,0 +1,143 @@ +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xF7E0 +#define PRODUCT_ID 0x0412 +#define DEVICE_VER 0x0000 +#define MANUFACTURER Boardsource +#define PRODUCT 5x12 +#define DESCRIPTION 50 percent ortho keyboard + +/* key matrix size */ +#define MATRIX_ROWS 5 +#define MATRIX_COLS 12 +#define MATRIX_ROW_PINS { D2, D3, D1, D0, D4 } +#define MATRIX_COL_PINS { F4, F5, F6, F7, B1, B3, B2, B6, B5, B4, E6, D7 } + +/* 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 + +/* 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. + * + */ + +/* 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_HELP1 H +//#define MAGIC_KEY_HELP2 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_ALT1 ESC +//#define MAGIC_KEY_LAYER0_ALT2 GRAVE +//#define MAGIC_KEY_LAYER0 0 +//#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 PAUSE +//#define MAGIC_KEY_LOCK CAPS +//#define MAGIC_KEY_EEPROM E +//#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 diff --git a/keyboards/boardsource/5x12/info.json b/keyboards/boardsource/5x12/info.json new file mode 100644 index 000000000000..a4cfc398a23b --- /dev/null +++ b/keyboards/boardsource/5x12/info.json @@ -0,0 +1,77 @@ +{ + "keyboard_name": "boardsource 5x12", + "url": "https://boardsource.xyz", + "maintainer": "boardsource", + "width": 12, + "height": 5, + "layouts": { + "LAYOUT": { + "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, "y": 0 }, + { "label": "K07", "x": 6, "y": 0 }, + { "label": "K08", "x": 7, "y": 0 }, + { "label": "K09", "x": 8, "y": 0 }, + { "label": "K010", "x": 9, "y": 0 }, + { "label": "K011", "x": 10, "y": 0 }, + { "label": "K012", "x": 11, "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, "y": 1 }, + { "label": "K17", "x": 6, "y": 1 }, + { "label": "K18", "x": 7, "y": 1 }, + { "label": "K19", "x": 8, "y": 1 }, + { "label": "K110", "x": 9, "y": 1 }, + { "label": "K111", "x": 10, "y": 1 }, + { "label": "K112", "x": 11, "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, "y": 2 }, + { "label": "K27", "x": 6, "y": 2 }, + { "label": "K28", "x": 7, "y": 2 }, + { "label": "K29", "x": 8, "y": 2 }, + { "label": "K210", "x": 9, "y": 2 }, + { "label": "K211", "x": 10, "y": 2 }, + { "label": "K212", "x": 11, "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, "y": 3 }, + { "label": "K37", "x": 6, "y": 3 }, + { "label": "K38", "x": 7, "y": 3 }, + { "label": "K39", "x": 8, "y": 3 }, + { "label": "K310", "x": 9, "y": 3 }, + { "label": "K311", "x": 10, "y": 3 }, + { "label": "K312", "x": 11, "y": 3 }, + + { "label": "K41", "x": 0, "y": 4 }, + { "label": "K42", "x": 1, "y": 4 }, + { "label": "K43", "x": 2, "y": 4 }, + { "label": "K44", "x": 3, "y": 4 }, + { "label": "K45", "x": 4, "y": 4 }, + { "label": "K46", "x": 5, "y": 4 }, + { "label": "K47", "x": 6, "y": 4 }, + { "label": "K48", "x": 7, "y": 4 }, + { "label": "K49", "x": 8, "y": 4 }, + { "label": "K410", "x": 9, "y": 4 }, + { "label": "K411", "x": 10, "y": 4 }, + { "label": "K412", "x": 11, "y": 4 } + ] + } + } +} diff --git a/keyboards/boardsource/5x12/keymaps/default/keymap.c b/keyboards/boardsource/5x12/keymaps/default/keymap.c new file mode 100644 index 000000000000..19bdde0ffb9c --- /dev/null +++ b/keyboards/boardsource/5x12/keymaps/default/keymap.c @@ -0,0 +1,39 @@ +#include QMK_KEYBOARD_H + +enum layers { + _MAIN, + _RAISE, + _LOWER, +}; + +// Readability keycodes +#define LOWER MO(_LOWER) +#define RAISE MO(_RAISE) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [_MAIN] = LAYOUT_ortho_5x12( + 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, KC_ENT, + KC_PIPE, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT + ), + + [_RAISE] = LAYOUT_ortho_5x12( + 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_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, + RESET, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY + ), + + [_LOWER] = LAYOUT_ortho_5x12( + 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_UP, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, + KC_CAPS, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + RESET, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY + ) + +}; diff --git a/keyboards/boardsource/5x12/readme.md b/keyboards/boardsource/5x12/readme.md new file mode 100644 index 000000000000..f1bf8a84c302 --- /dev/null +++ b/keyboards/boardsource/5x12/readme.md @@ -0,0 +1,13 @@ +# 5x12 + +![boardsource 5x12](https://i.imgur.com/xuNxpgh.jpg) + +* Keyboard Maintainer: [Boardsource](https://github.com/daysgobye) +* Hardware Supported: 5x12 v1 +* Hardware Availability: this keyboard is available from the [Boardsource store](https://boardsource.xyz/store/5ecb822386879c9a0c22db84) + +Make example for this keyboard (after setting up your build environment): + + make boardsource/5x12: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/boardsource/5x12/rules.mk b/keyboards/boardsource/5x12/rules.mk new file mode 100644 index 000000000000..f26c7fa800c2 --- /dev/null +++ b/keyboards/boardsource/5x12/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 +MIDI_ENABLE = no # MIDI support +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable 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 = ortho_5x12 From b7da69ec85c5f3e3981dd4590c52139a1539bc17 Mon Sep 17 00:00:00 2001 From: AlexOConnorHub <43659595+AlexOConnorHub@users.noreply.github.com> Date: Sun, 21 Jun 2020 03:10:01 -0400 Subject: [PATCH 216/930] Adding information to feature_encoders.md (#9486) Co-authored-by: Ryan --- docs/feature_encoders.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/feature_encoders.md b/docs/feature_encoders.md index 7799b78d6e42..8f9ba1a80a79 100644 --- a/docs/feature_encoders.md +++ b/docs/feature_encoders.md @@ -26,7 +26,7 @@ If your encoder's clockwise directions are incorrect, you can swap the A & B pad #define ENCODER_DIRECTION_FLIP ``` -Additionally, the resolution can be specified in the same file (the default & suggested is 4): +Additionally, the resolution, which defines how many pulses the encoder registers between each detent, can be defined with: ```c #define ENCODER_RESOLUTION 4 From 32340e14fb8491b9e381b1b5d971a2ee946ded72 Mon Sep 17 00:00:00 2001 From: Ryan Date: Sun, 21 Jun 2020 19:54:53 +1000 Subject: [PATCH 217/930] Update newbs MSYS2 pacman instructions (#9445) --- docs/newbs_getting_started.md | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/docs/newbs_getting_started.md b/docs/newbs_getting_started.md index a4ee9c0f52af..dfb2d54fc4ff 100644 --- a/docs/newbs_getting_started.md +++ b/docs/newbs_getting_started.md @@ -41,16 +41,11 @@ We've tried to make QMK as easy to set up as possible. You only have to prepare You will need to install MSYS2, Git, and the QMK CLI. -* Follow the installation instructions on the [MSYS2 homepage](http://www.msys2.org). -* Close any open MSYS2 terminals and open a new MSYS2 MinGW 64-bit terminal. NOTE: This is **not** the same as the MSYS terminal that opens when installation is completed. +Follow the installation instructions on the [MSYS2 homepage](http://www.msys2.org). Close any open MSYS terminals and open a new MinGW 64-bit terminal. **NOTE: This is *not* the same as the MSYS terminal that opens when installation is completed.** -After opening a new MSYS2 MinGW 64-bit terminal, make sure `pacman` is up to date with: +Then, run the following: - pacman -Syu - -You may be asked to close and reopen the window. Do this and keep running the above command until it says `there is nothing to do`. Then run the following: - - pacman -S git mingw-w64-x86_64-toolchain mingw-w64-x86_64-python3-pip + pacman --needed --noconfirm --disable-download-timeout -S git mingw-w64-x86_64-toolchain mingw-w64-x86_64-python3-pip python3 -m pip install qmk ### macOS From 2f85f6fbffaf6a7a2b747c7d6064fb86a21d91f6 Mon Sep 17 00:00:00 2001 From: Takeshi ISHII <2170248+mtei@users.noreply.github.com> Date: Sun, 21 Jun 2020 20:17:16 +0900 Subject: [PATCH 218/930] [Docs] Japanese translation of breaking_changes*.md (#8576) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * add japanese translation 'docs/ja/breaking_changes.md' Note: this is cherry-pick from umi-umi's translation in PR #7248 * update ja/breaking_changes.md * update ja/breaking_changes.md, add ja/breaking_changes_instructions.md * translating ja/breaking_changes_instructions.md * translating ja/breaking_changes_instructions.md * translated ja/breaking_changes_instructions.md * update ja/breaking_changes.md, ja/breaking_changes_instructions.md Breaking change の訳語を「破壊的な変更」から「互換性を破る変更」に変更。 ただし、文中の用語としては、Breaking change をそのまま使用するむねドキュメントの導入部で 訳注でしめし、文中では、原語のまま使用する。 * update docs/ja/_summary.md * Update docs/ja/breaking_changes.md Co-Authored-By: shela * Update docs/ja/breaking_changes.md Co-Authored-By: shela * Update docs/ja/breaking_changes.md Co-Authored-By: shela * Update docs/ja/breaking_changes.md Co-Authored-By: shela * Update docs/ja/breaking_changes.md Co-Authored-By: shela * Update docs/ja/breaking_changes.md Co-Authored-By: shela * Update docs/ja/breaking_changes.md * update docs/ja/breaking_changes.md * update docs/ja/breaking_changes.md * update docs/ja/breaking_changes.md * update docs/ja/breaking_changes.md * update docs/ja/breaking_changes.md * Update docs/ja/breaking_changes_instructions.md Co-Authored-By: shela * Update docs/ja/breaking_changes_instructions.md Co-Authored-By: shela * update docs/ja/breaking_changes.md * Update docs/ja/breaking_changes_instructions.md Co-Authored-By: shela * Update docs/ja/breaking_changes_instructions.md * Update docs/ja/breaking_changes_instructions.md Co-Authored-By: shela * update docs/ja/breaking_changes_instructions.md * update docs/ja/breaking_changes_instructions.md * The base of the translation of docs/ja/breaking_changes_instructions.md was changed to 0.9.0. * The base of the translation of docs/ja/breaking_changes.md was changed to 0.9.0. * Update docs/ja/breaking_changes.md Co-authored-by: s-show * update docs/ja/breaking_changes.md * Update docs/ja/breaking_changes_instructions.md Co-authored-by: shela * update docs/ja/breaking_changes.md * update docs/ja/breaking_changes.md Co-authored-by: umi-umi <57262844+umi-umi@users.noreply.github.com> Co-authored-by: shela Co-authored-by: s-show --- docs/ja/_summary.md | 2 +- docs/ja/breaking_changes.md | 120 +++++++++++++++++++++++ docs/ja/breaking_changes_instructions.md | 51 ++++++++++ 3 files changed, 172 insertions(+), 1 deletion(-) create mode 100644 docs/ja/breaking_changes.md create mode 100644 docs/ja/breaking_changes_instructions.md diff --git a/docs/ja/_summary.md b/docs/ja/_summary.md index e6423c6c26f5..987df23d76db 100644 --- a/docs/ja/_summary.md +++ b/docs/ja/_summary.md @@ -106,7 +106,7 @@ * [Velocikey](ja/feature_velocikey.md) * QMK の開発 - * 破壊的な変更 + * 互換性を破る変更/Breaking changes * [概要](ja/breaking_changes.md) * [プルリクエストにフラグが付けられた](ja/breaking_changes_instructions.md) * 履歴 diff --git a/docs/ja/breaking_changes.md b/docs/ja/breaking_changes.md new file mode 100644 index 000000000000..936d0a4722c0 --- /dev/null +++ b/docs/ja/breaking_changes.md @@ -0,0 +1,120 @@ +# Breaking changes/互換性を破る変更 + + + +このドキュメントは QMK の互換性を破る変更(Breaking change) のプロセスについて説明します。 +互換性を破る変更とは、互換性がなかったり潜在的な危険が生じるように QMK の動作を変える変更を指します。 +ユーザが QMK ツリーを更新しても自分のキーマップが壊れない事を確信できるように、これらの変更を制限します。(訳注:以後、原文のまま Breaking change を用語として使用します。) + +Breaking change ピリオドとは、危険な変更、または予想外の変更を QMK へ行なう PR をマージする時のことです。 +付随するテスト期間があるため、問題が起きることはまれか、有りえないと確信しています。 + +## 過去の Breaking change には何が含まれますか? + +* [2020年5月30日](ja/ChangeLog/20200530.md) +* [2020年2月29日](ja/ChangeLog/20200229.md) +* [2019年8月30日](ja/ChangeLog/20190830.md) + +## 次の Breaking change はいつですか? + +次の Breaking change は2020年8月29日に予定されています。 + +### 重要な日付 + +* [x] 2020年 5月30日 - `develop` が作成されました。毎週リベースされます。 +* [ ] 2020年 8月 1日 - `develop` は新しいPRを取り込みません。 +* [ ] 2020年 8月 1日 - テスターの募集。 +* [ ] 2020年 8月27日 - `master`がロックされ、PR はマージされません。 +* [ ] 2020年 8月29日 - `develop` を `master` にマージします。 +* [ ] 2020年 8月29日 - `master` のロックが解除されます。PR を再びマージすることができます。 + +## どのような変更が含まれますか? + +最新の Breaking change 候補を見るには、[`breaking_change` ラベル](https://github.com/qmk/qmk_firmware/pulls?q=is%3Aopen+label%3Abreaking_change+is%3Apr)を参照してください。 +現在から `develop` が閉じられるまでの間に新しい変更が追加される可能性があり、そのラベルが適用された PR はマージされることは保証されていません。 + +このラウンドに、あなたの Breaking change を含めたい場合は、`breaking_change` ラベルを持つ PR を作成し、`develop` が閉じる前に承認してもらう必要があります。 +`develop` が閉じた後は、新しい Breaking change は受け付けられません。 + +受け入れの基準: + +* PR が完了し、マージの準備ができている +* PR が ChangeLog を持つ + +# チェックリスト + +ここでは、Breaking change プロセスを実行する時に使用する様々なプロセスについて説明します。 + +## `master` から `develop` をリベースします + +これは `develop` が開いている間、毎週金曜日に実行されます。 + +プロセス: + +``` +cd qmk_firmware +git checkout master +git pull --ff-only +git checkout develop +git rebase master +git push --force +``` + +## `develop` ブランチの作成 + +以前の `develop` ブランチがマージされた直後に、これが発生します。 + +* `qmk_firmware` git commands + * [ ] `git checkout master` + * [ ] `git pull --ff-only` + * [ ] `git checkout -b develop` + * [ ] Edit `readme.md` + * [ ] これがテストブランチであることを上部に大きな通知で追加します。 + * [ ] このドキュメントへのリンクを含めます + * [ ] `git commit -m 'Branch point for Breaking Change'` + * [ ] `git tag breakpoint___
` + * [ ] `git tag ` # ブレーキング ポイント タグがバージョンの増分を混乱させないようにします + * [ ] `git push origin develop` + * [ ] `git push --tags` + +## マージの 4 週間前 + +* `develop` は新しい PR に対して閉じられ、現在の PR の修正のみがマージされる可能性があります。 +* テスターの呼び出しを投稿します + * [ ] Discord + * [ ] GitHub PR + * [ ] https://reddit.com/r/olkb + +## マージの 1 週間前 + +* master が < 2 日前> から <マージの日> まで閉じられることを発表します + * [ ] Discord + * [ ] GitHub PR + * [ ] https://reddit.com/r/olkb + +## マージの 2 日前 + +* master が 2 日間閉じられることを発表します + * [ ] Discord + * [ ] GitHub PR + * [ ] https://reddit.com/r/olkb + +## マージの日 + +* `qmk_firmware` git commands + * [ ] `git checkout develop` + * [ ] `git pull --ff-only` + * [ ] `git rebase origin/master` + * [ ] Edit `readme.md` + * [ ] `develop` についてのメモを削除 + * [ ] ChangeLog を 1 つのファイルにまとめます。 + * [ ] `git commit -m 'Merge point for Breaking Change'` + * [ ] `git push origin develop` +* GitHub Actions + * [ ] `develop`の PR を作成します + * [ ] travis がクリーンに戻ったことを確認します + * [ ] `develop` PR をマージします diff --git a/docs/ja/breaking_changes_instructions.md b/docs/ja/breaking_changes_instructions.md new file mode 100644 index 000000000000..69d17d73c5f5 --- /dev/null +++ b/docs/ja/breaking_changes_instructions.md @@ -0,0 +1,51 @@ +# breaking changes/互換性を破る変更: プルリクエストにフラグが付けられた + + + +QMK のメンバーがあなたのプルリクエストに返信し、あなたの提出したものは Breaking change (互換性を破る変更) であると述べている場合があります。メンバーの判断では、あなたが提案した変更は QMK やその利用者にとってより大きな影響を持つと考えられます。 + +プルリクエストにフラグが立てられる原因となるものには、以下のようなものがあります: + +- **ユーザーのキーマップに対する編集** + ユーザーが自分のキーマップを QMK に提出した後、しばらくしてさらに更新してプルリクエストを開いたところ、それが `qmk/qmk_firmware` リポジトリで編集されていたためにマージできなかったことに気づくことがあるかもしれません。すべてのユーザーが Git や GitHub を使いこなせるわけではないので、ユーザー自身で問題を修正できないことに気づくかもしれません。 +- **期待される動作の変更** + QMK の動作を変更すると、既存の QMK 機能への変更を組み込んだ新しいファームウェアをフラッシュした場合、ユーザはハードウェアまたは QMK が壊れていると考え、希望する動作を復元する手段がないことに気付くことがあります。 +- **ユーザーのアクションを必要とする変更** + 変更には、ツールチェインを更新したり、Git で何らかのアクションを取るなど、ユーザーがアクションを行う必要がある場合もあります。 +- **精査が必要な変更** + 時には、投稿がプロジェクトとしての QMK に影響を与えることもあります。これは、著作権やライセンスの問題、コーディング規約、大規模な機能のオーバーホール、コミュニティによるより広範なテストを必要とする「リスクの高い」変更、あるいは全く別のものである可能性があります。 +- **エンドユーザーとのコミュニケーションを必要とする変更** + これには、将来の非推奨化への警告、時代遅れの慣習、その他伝えなければならないが上記のカテゴリのどれかに当てはまらないものが含まれます。 + +## 何をすればいいのか? + +提出したものが Breaking change だと判断された場合、手続きをスムーズに進めるためにできることがいくつかあります。 + +### PR を分割することを検討する + +あなたがコアコードを投稿していて、それが Breaking change プロセスを経る必要がある唯一の理由が、あなたの変更に合わせてキーマップを更新していることである場合、古いキーマップが機能し続けるような方法であなたの機能を投稿できるかどうかを検討してください。 +そののち、Breaking change プロセスを経て古いコードを削除する別の PR を提出してください。 + +### ChangeLog エントリの提供 + +Breaking change プロセスを経て提出する際には、変更ログのエントリを含めることを我々は要請します。 +エントリーは、あなたのプルリクエストが行う変更の短い要約としてください – [ここの各セクションは changelog として開始されました](ja/ChangeLog/20190830.md "n.b. This should link to the 2019 Aug 30 Breaking Changes doc - @noroadsleft")。 + +変更ログは `docs/ChangeLog/YYYYMMDD/PR####.md` に置いてください。 +ここで、`YYYYMMDD` は QMK の breaking change ブランチ – 通常は `develop` という名称 – が `master` ブランチにマージされる日付、`####` はプルリクエストの番号です。 + +ユーザー側でのアクションを必要とする場合、あなたの変更ログは、どのようなアクションを取らなければならないかをユーザーに指示するか、そのようなアクションを指示する場所にリンクする必要があります。 + +### 変更点を文書化する + +提出物の目的を理解し、それが必要とする可能性のある意味合いやアクションを理解することで、レビュープロセスをより簡単にすることができます。この目的のためには変更履歴で十分かもしれませんが、より広範囲の変更を行う場合には、変更履歴には不向きな詳細レベルが必要になるかもしれません。 + +あなたのプルリクエストにコメントしたり、質問やコメント、変更要求に対応したりすることは、非常にありがたいことです。 + +### 助けを求める + +あなたの提出物にフラグが立ったことで、あなたはびっくりしてしまったかもしれません。もし、あなた自身が脅されたり、圧倒されたりしていると感じたら、私たちに知らせてください。プルリクエストにコメントするか、[Discord で QMK チームに連絡を取ってください](https://discord.gg/Uq7gcHh)。 From a91034b802bd91ec4aa9db963adbd0d2deb2f40b Mon Sep 17 00:00:00 2001 From: Takeshi ISHII <2170248+mtei@users.noreply.github.com> Date: Sun, 21 Jun 2020 21:45:27 +0900 Subject: [PATCH 219/930] [Update] Change Original TAGs of Japanese translations (#9453) * The TAGs of the original document has been updated to facilitate future verification. * docs/ja/driver_installation_zadig.md * docs/ja/feature_audio.md * docs/ja/feature_auto_shift.md * docs/ja/feature_bluetooth.md * docs/ja/hardware_avr.md * docs/ja/hardware_drivers.md * docs/ja/getting_started_make_guide.md * The TAG of the original document has been updated to facilitate future verification. * The TAG of the original document has been updated to facilitate future verification. * update docs/ja/feature_tap_dance.md --- docs/ja/cli_configuration.md | 4 ++-- docs/ja/driver_installation_zadig.md | 4 ++-- docs/ja/feature_audio.md | 4 ++-- docs/ja/feature_auto_shift.md | 4 ++-- docs/ja/feature_bluetooth.md | 4 ++-- docs/ja/feature_tap_dance.md | 4 ++-- docs/ja/getting_started_make_guide.md | 4 ++-- docs/ja/hardware_avr.md | 4 ++-- docs/ja/hardware_drivers.md | 4 ++-- 9 files changed, 18 insertions(+), 18 deletions(-) diff --git a/docs/ja/cli_configuration.md b/docs/ja/cli_configuration.md index d21a27596d4f..f4857a602941 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/driver_installation_zadig.md b/docs/ja/driver_installation_zadig.md index 268940ec066e..1d5e8552a486 100644 --- a/docs/ja/driver_installation_zadig.md +++ b/docs/ja/driver_installation_zadig.md @@ -1,8 +1,8 @@ # Zadig を使ったブートローダドライバのインストール QMK はホストにたいして通常の HID キーボードデバイスとして振る舞うため特別なドライバは必要ありません。しかし、Windows でのキーボードへの書き込みは、多くの場合、キーボードをリセットした時に現れるブートローダデバイスで*行います*。 diff --git a/docs/ja/feature_audio.md b/docs/ja/feature_audio.md index 0f845161eb86..2d13c3f7ccc2 100644 --- a/docs/ja/feature_audio.md +++ b/docs/ja/feature_audio.md @@ -1,8 +1,8 @@ # オーディオ キーボードは音を出すことができます!Planck、Preonic あるいは特定の PWM 対応ピンにアクセスできる AVR キーボードがある場合は、単純なスピーカーを接続してビープ音を鳴らすことができます。これらのビープ音を使ってレイヤーの変化、モディファイア、特殊キーを示したり、あるいは単にイカした8ビットの曲を鳴らすことができます。 diff --git a/docs/ja/feature_auto_shift.md b/docs/ja/feature_auto_shift.md index c230f93815ef..50d40b17b1f4 100644 --- a/docs/ja/feature_auto_shift.md +++ b/docs/ja/feature_auto_shift.md @@ -1,8 +1,8 @@ # 自動シフト: なぜシフトキーが必要ですか? キーをタップすると、その文字を取得します。キーをタップするが、*わずかに*長く押し続けると、シフト状態になります。ほら!シフトキーは必要ありません! diff --git a/docs/ja/feature_bluetooth.md b/docs/ja/feature_bluetooth.md index 90b88bd7c24b..4443a4e3ea50 100644 --- a/docs/ja/feature_bluetooth.md +++ b/docs/ja/feature_bluetooth.md @@ -1,8 +1,8 @@ # Bluetooth ## Bluetooth の既知のサポートハードウェア diff --git a/docs/ja/feature_tap_dance.md b/docs/ja/feature_tap_dance.md index 5583b04ce484..5425b2a4208e 100644 --- a/docs/ja/feature_tap_dance.md +++ b/docs/ja/feature_tap_dance.md @@ -1,8 +1,8 @@ # タップダンス: 1つのキーが3つ、5つまたは100の異なる動作をします ## イントロダクション diff --git a/docs/ja/getting_started_make_guide.md b/docs/ja/getting_started_make_guide.md index d33485ce1114..0d39583a1dcd 100644 --- a/docs/ja/getting_started_make_guide.md +++ b/docs/ja/getting_started_make_guide.md @@ -1,8 +1,8 @@ # より詳細な `make` 手順 `make` コマンドの完全な構文は `::` です: diff --git a/docs/ja/hardware_avr.md b/docs/ja/hardware_avr.md index 6eb86a378673..fecbfd71ffb8 100644 --- a/docs/ja/hardware_avr.md +++ b/docs/ja/hardware_avr.md @@ -2,8 +2,8 @@ このページでは QMK における AVR マイコンのサポートについて説明します。AVR マイコンには、Atmel 社製の atmega32u4、atmega32u2、at90usb1286 やその他のマイコンを含みます。AVR マイコンは、簡単に動かせるよう設計された8ビットの MCU です。キーボードでよく使用される AVR マイコンには USB 機能や大きなキーボードマトリックスのためのたくさんの GPIO を搭載しています。これらは、現在、キーボードで使われる最も一般的な MCU です。 diff --git a/docs/ja/hardware_drivers.md b/docs/ja/hardware_drivers.md index cc85589e7b25..f77b48ba8e6f 100644 --- a/docs/ja/hardware_drivers.md +++ b/docs/ja/hardware_drivers.md @@ -2,8 +2,8 @@ QMK はたくさんの異なるハードウェアで使われています。最も一般的な MCU とマトリックス構成をサポートしていますが、キーボードへ他のハードウェアを追加し制御するためのドライバーもいくつか用意されています。例えば、マウスやポインティングデバイス、分割キーボード用の IO エキスパンダ、Bluetooth モジュール、LCD、OLED、TFT 液晶などがあります。 From b0a31f0bf3347fa7c6342a369c50c1b1fc7321ca Mon Sep 17 00:00:00 2001 From: Takeshi ISHII <2170248+mtei@users.noreply.github.com> Date: Sun, 21 Jun 2020 21:49:43 +0900 Subject: [PATCH 220/930] update ja/hardware_keyboard_guidelines.md (#9457) --- docs/ja/hardware_keyboard_guidelines.md | 71 ++++++++++++++++++++++++- 1 file changed, 69 insertions(+), 2 deletions(-) diff --git a/docs/ja/hardware_keyboard_guidelines.md b/docs/ja/hardware_keyboard_guidelines.md index 5a9de52ef42f..ebcbb155420e 100644 --- a/docs/ja/hardware_keyboard_guidelines.md +++ b/docs/ja/hardware_keyboard_guidelines.md @@ -2,8 +2,8 @@ QMK は開始以来、コミュニティにおけるキーボードの作成や保守に貢献しているあなたのような人たちのおかげで飛躍的に成長しました。私たちが成長するにつれて、うまくやるためのいくつかのパターンを発見しました。他の人たちがあなたの苦労の恩恵を受けやすくするため、それにあわせてもらえるようお願いします。 @@ -66,10 +66,77 @@ Clueboard は、サブフォルダをまとめるためとキーボードのリ 全てのプロジェクトには、マトリックスサイズ、製品名、USB VID/PID、説明、その他の設定などが含まれた `config.h` ファイルが必要です。一般に、このファイルを使用して常に機能するキーボードの重要な情報やデフォルトを設定します。 +また、`config.h` ファイルはサブフォルダにも置くことができ、その読み込み順は以下の通りです。 + +* `keyboards/top_folder/config.h` + * `keyboards/top_folder/sub_1/config.h` + * `keyboards/top_folder/sub_1/sub_2/config.h` + * `keyboards/top_folder/sub_1/sub_2/sub_3/config.h` + * `keyboards/top_folder/sub_1/sub_2/sub_3/sub_4/config.h` + * `users/a_user_folder/config.h` + * `keyboards/top_folder/keymaps/a_keymap/config.h` + * `keyboards/top_folder/sub_1/sub_2/sub_3/sub_4/post_config.h` + * `keyboards/top_folder/sub_1/sub_2/sub_3/post_config.h` + * `keyboards/top_folder/sub_1/sub_2/post_config.h` + * `keyboards/top_folder/sub_1/post_config.h` +* `keyboards/top_folder/post_config.h` + +`post_config.h` ファイルは、`config.h` ファイルで指定された内容に応じて、追加の後処理を行うために使用することができます。 +例えば、キーマップレベルの `config.h` ファイルで `IOS_DEVICE_ENABLE` マクロを以下のように定義すると、`post_config.h` ファイルでより詳細な設定を行うことができます。 + +* `keyboards/top_folder/keymaps/a_keymap/config.h` + ```c + #define IOS_DEVICE_ENABLE + ``` +* `keyboards/top_folder/post_config.h` + ```c + #ifndef IOS_DEVICE_ENABLE + // USB_MAX_POWER_CONSUMPTION value for this keyboard + #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 + + #ifdef RGBLIGHT_ENABLE + #ifndef IOS_DEVICE_ENABLE + #define RGBLIGHT_LIMIT_VAL 200 + #define RGBLIGHT_VAL_STEP 17 + #else + #define RGBLIGHT_LIMIT_VAL 35 + #define RGBLIGHT_VAL_STEP 4 + #endif + #ifndef RGBLIGHT_HUE_STEP + #define RGBLIGHT_HUE_STEP 10 + #endif + #ifndef RGBLIGHT_SAT_STEP + #define RGBLIGHT_SAT_STEP 17 + #endif + #endif + ``` + +?> 上記の例のように `post_config.h` でオプションを定義する場合、キーボードやユーザレベルの `config.h` で同じオプションを定義してはいけません。 + ### `rules.mk` このファイルが存在するということは、フォルダがキーボードであり、`make` コマンドで使用できることを意味します。ここでキーボードのビルド環境を構築し、デフォルトの機能を設定します。 +`rules.mk` ファイルはサブフォルダにも置くことができ、その読み込み順は以下の通りです。 + +* `keyboards/top_folder/rules.mk` + * `keyboards/top_folder/sub_1/rules.mk` + * `keyboards/top_folder/sub_1/sub_2/rules.mk` + * `keyboards/top_folder/sub_1/sub_2/sub_3/rules.mk` + * `keyboards/top_folder/sub_1/sub_2/sub_3/sub_4/rules.mk` + * `keyboards/top_folder/keymaps/a_keymap/rules.mk` + * `users/a_user_folder/rules.mk` +* `common_features.mk` + +`rules.mk` ファイルに書かれた多くの設定は `common_features.mk` によって解釈され、必要なソースファイルやコンパイラのオプションが設定されます。 + +?> 詳しくは `build_keyboard.mk` と `common_features.mk` を見てください。 + ### `` ここではキーボードのカスタマイズされたコードを記述します。通常、初期化してキーボードのハードウェアを制御するコードを記述します。キーボードが LED やスピーカー、その他付属ハードウェアのないキーマトリックスのみで構成されている場合は空にできます。 From 3e0f8f9c8bada31c014c09a61b0c7d21e5614329 Mon Sep 17 00:00:00 2001 From: Takeshi ISHII <2170248+mtei@users.noreply.github.com> Date: Sun, 21 Jun 2020 21:56:06 +0900 Subject: [PATCH 221/930] update docs/ja/feature_bootmagic.md (#9459) --- docs/ja/feature_bootmagic.md | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/docs/ja/feature_bootmagic.md b/docs/ja/feature_bootmagic.md index 1f38914edae8..20a93d5c4482 100644 --- a/docs/ja/feature_bootmagic.md +++ b/docs/ja/feature_bootmagic.md @@ -1,8 +1,8 @@ # ブートマジック 再書き込みせずにキーボードの挙動を変更することができる、3つの独立した関連する機能があります。それぞれは似たような機能を持ちますが、キーボードがどのように設定されているかによって異なる方法でアクセスされます。 @@ -149,6 +149,17 @@ BOOTMAGIC_ENABLE = lite !> ブートマジックライトを使用すると、EEPROM を**常にリセットします**。つまり保存された全ての設定は失われます。 +## 分割キーボード + +`SPLIT_HAND_PIN` のようなオプションで、左右の設定があらかじめ決められている場合は、キーボードの左右で別のキーを設定する必要があるかもしれません。これを行うには、`config.h` ファイルに以下のエントリを追加します。 + +```c +#define BOOTMAGIC_LITE_ROW_RIGHT 4 +#define BOOTMAGIC_LITE_COLUMN_RIGHT 1 +``` + +デフォルトでは、これらの値は設定されていません。 + ## 高度なブートマジックライト `bootmagic_lite` 関数は必要に応じてコード内で置き換えることができるように、弱く定義されています。これの良い例は Zeal60 キーボードで、追加の処理が必要です。 From e79fb2c26e62b8820c8bdf7e142a605ccefe24ad Mon Sep 17 00:00:00 2001 From: shela Date: Mon, 22 Jun 2020 04:03:35 +0900 Subject: [PATCH 222/930] [Docs] fix indentation (#9491) --- docs/ja/feature_pointing_device.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/ja/feature_pointing_device.md b/docs/ja/feature_pointing_device.md index 8b26ac102f15..1d655627dde3 100644 --- a/docs/ja/feature_pointing_device.md +++ b/docs/ja/feature_pointing_device.md @@ -32,7 +32,7 @@ report_mouse_t (ここでは "mouseReport") が以下のプロパティを持つ ```c case MS_SPECIAL: - report_mouse_t currentReport = pointing_device_get_report(); + report_mouse_t currentReport = pointing_device_get_report(); if (record->event.pressed) { currentReport.v = 127; currentReport.h = 127; @@ -42,7 +42,7 @@ case MS_SPECIAL: currentReport.h = -127; currentReport.buttons &= ~MOUSE_BTN1; } - pointing_device_set_report(currentReport); + pointing_device_set_report(currentReport); break; ``` From af4bc251f9d4032abf12d0377b5e948701e82713 Mon Sep 17 00:00:00 2001 From: Gregorio <38576492+ohchiko@users.noreply.github.com> Date: Mon, 22 Jun 2020 04:59:43 +0700 Subject: [PATCH 223/930] Updates on Mixi default keymaps and fixes on configuration (#9467) --- keyboards/mixi/config.h | 4 +- keyboards/mixi/keymaps/default/keymap.c | 43 ++++++++--------- keyboards/mixi/keymaps/default/readme.md | 2 +- keyboards/mixi/keymaps/via/keymap.c | 60 +++++++++++++++--------- keyboards/mixi/mixi.c | 3 +- keyboards/mixi/readme.md | 2 +- 6 files changed, 67 insertions(+), 47 deletions(-) diff --git a/keyboards/mixi/config.h b/keyboards/mixi/config.h index cb89dd2cb0ae..aed57f3241c9 100644 --- a/keyboards/mixi/config.h +++ b/keyboards/mixi/config.h @@ -21,8 +21,8 @@ { C6, F7, B6 } \ } -#define ENCODERS_PAD_A { F5 } -#define ENCODERS_PAD_B { F4 } +#define ENCODERS_PAD_A { D7, B1 } +#define ENCODERS_PAD_B { E6, B3 } /* Set 0 if debouncing isn't needed */ #define DEBOUNCE 5 diff --git a/keyboards/mixi/keymaps/default/keymap.c b/keyboards/mixi/keymaps/default/keymap.c index 806a7a924c19..21c3c669a053 100644 --- a/keyboards/mixi/keymaps/default/keymap.c +++ b/keyboards/mixi/keymaps/default/keymap.c @@ -6,36 +6,37 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* - * | Knob: Layer +/- | - * .---------------------------------------. - * | Mute | Play/Pause | Hold: Layer 2 | - * |----------|------------|---------------| - * | Previous | Up | Next | - * |----------|------------|---------------| - * | Left | Down | Right | - * '---------------------------------------' + * | Knob: Layer +/- | + * .------------------------------------------------. + * | Volume Mute | Media Play/Pause | Hold: Layer 2 | + * |-------------|------------------|---------------| + * | Media Prev | Up | Media Next | + * |-------------|------------------|---------------| + * | Left | Down | Right | + * '------------------------------------------------' */ [0] = LAYOUT( - KC_MUTE, KC_MPLY, MO(2), - KC_MNXT, KC_UP , KC_MPRV , + KC_MUTE, KC_MPLY, MO(2) , + KC_MPRV, KC_UP , KC_MNXT, KC_LEFT, KC_DOWN , KC_RGHT ), /* - * .-----------------------. - * | NUM 7 | NUM 8 | NUM 9 | - * |-------|-------|-------| - * | NUM 4 | NUM 5 | NUM 6 | - * |-------|-------|-------| - * | NUM 1 | NUM 2 | NUM 3 | - * '-----------------------' + * | Knob: Layer +/- | + * .---------------------------------------------------. + * | RGB Toggle | Media Play/Pause | Hold: Layer 2 | + * |----------------|------------------|---------------| + * | Media Previous | RGB Bright+ | Media Next | + * |----------------|------------------|---------------| + * | RGB Anim- | RGB Bright- | RGB Anim+ | + * '---------------------------------------------------' */ [1] = LAYOUT( - KC_P7, KC_P8, KC_P8, - KC_P4, KC_P5, KC_P6, - KC_P1, KC_P2, KC_P3 + RGB_TOG , KC_TRNS, KC_TRNS, + KC_TRNS , RGB_VAI, KC_TRNS, + RGB_RMOD, RGB_VAD, RGB_MOD ), /* @@ -58,7 +59,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { }; const rgblight_segment_t PROGMEM _base_layer[] = RGBLIGHT_LAYER_SEGMENTS( - {0, RGBLED_NUM, HSV_WHITE} + {0, RGBLED_NUM, HSV_BLUE} ); const rgblight_segment_t PROGMEM _middle_layer[] = RGBLIGHT_LAYER_SEGMENTS( {0, RGBLED_NUM, HSV_GREEN} diff --git a/keyboards/mixi/keymaps/default/readme.md b/keyboards/mixi/keymaps/default/readme.md index 863fa6f5d68d..c780eb5f4e2a 100644 --- a/keyboards/mixi/keymaps/default/readme.md +++ b/keyboards/mixi/keymaps/default/readme.md @@ -1,4 +1,4 @@ -![Mixi Layout Image](https://i.imgur.com/UIXj9O6.png) +![Mixi Layout Image](https://i.imgur.com/WCtQ6GG.jpg) # Default Mixi Layout diff --git a/keyboards/mixi/keymaps/via/keymap.c b/keyboards/mixi/keymaps/via/keymap.c index 806a7a924c19..4ffaf111dc63 100644 --- a/keyboards/mixi/keymaps/via/keymap.c +++ b/keyboards/mixi/keymaps/via/keymap.c @@ -6,36 +6,37 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* - * | Knob: Layer +/- | - * .---------------------------------------. - * | Mute | Play/Pause | Hold: Layer 2 | - * |----------|------------|---------------| - * | Previous | Up | Next | - * |----------|------------|---------------| - * | Left | Down | Right | - * '---------------------------------------' + * | Knob: Layer +/- | + * .------------------------------------------------. + * | Volume Mute | Media Play/Pause | Hold: Layer 2 | + * |-------------|------------------|---------------| + * | Media Prev | Up | Media Next | + * |-------------|------------------|---------------| + * | Left | Down | Right | + * '------------------------------------------------' */ [0] = LAYOUT( - KC_MUTE, KC_MPLY, MO(2), - KC_MNXT, KC_UP , KC_MPRV , + KC_MUTE, KC_MPLY, MO(2) , + KC_MPRV, KC_UP , KC_MNXT, KC_LEFT, KC_DOWN , KC_RGHT ), /* - * .-----------------------. - * | NUM 7 | NUM 8 | NUM 9 | - * |-------|-------|-------| - * | NUM 4 | NUM 5 | NUM 6 | - * |-------|-------|-------| - * | NUM 1 | NUM 2 | NUM 3 | - * '-----------------------' + * | Knob: Layer +/- | + * .---------------------------------------------------. + * | RGB Toggle | Media Play/Pause | Hold: Layer 2 | + * |----------------|------------------|---------------| + * | Media Previous | RGB Bright+ | Media Next | + * |----------------|------------------|---------------| + * | RGB Anim- | RGB Bright- | RGB Anim+ | + * '---------------------------------------------------' */ [1] = LAYOUT( - KC_P7, KC_P8, KC_P8, - KC_P4, KC_P5, KC_P6, - KC_P1, KC_P2, KC_P3 + RGB_TOG , KC_TRNS, KC_TRNS, + KC_TRNS , RGB_VAI, KC_TRNS, + RGB_RMOD, RGB_VAD, RGB_MOD ), /* @@ -53,12 +54,29 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_NO , KC_NO, KC_TRNS, EEP_RST, RESET, DEBUG , KC_NO , KC_NO, KC_NO + ), + + /* + * | Knob: N/A | + * .-----------------. + * | N/A | N/A | N/A | + * |-----------------| + * | N/A | N/A | N/A | + * |-----------------| + * | N/A | N/A | N/A | + * '-----------------' + */ + [3] = + LAYOUT( + KC_NO, KC_NO, KC_NO, + KC_NO, KC_NO, KC_NO, + KC_NO, KC_NO, KC_NO ) }; const rgblight_segment_t PROGMEM _base_layer[] = RGBLIGHT_LAYER_SEGMENTS( - {0, RGBLED_NUM, HSV_WHITE} + {0, RGBLED_NUM, HSV_BLUE} ); const rgblight_segment_t PROGMEM _middle_layer[] = RGBLIGHT_LAYER_SEGMENTS( {0, RGBLED_NUM, HSV_GREEN} diff --git a/keyboards/mixi/mixi.c b/keyboards/mixi/mixi.c index 533cf3b88179..43625bcd568d 100644 --- a/keyboards/mixi/mixi.c +++ b/keyboards/mixi/mixi.c @@ -3,8 +3,9 @@ void eeconfig_init_kb(void) { #ifdef RGBLIGHT_ENABLE rgblight_enable(); // Enable RGB underglow by default + rgblight_sethsv(0, 255, 255); #ifdef RGBLIGHT_ANIMATIONS - rgblight_mode(RGBLIGHT_MODE_TWINKLE + 5); // Set to RGB_TWINKLE animation by default + rgblight_mode(RGBLIGHT_MODE_RAINBOW_SWIRL + 5); // Set to RGB_RAINBOW_SWIRL animation by default #endif #endif diff --git a/keyboards/mixi/readme.md b/keyboards/mixi/readme.md index 4c911db57086..e8930809411a 100644 --- a/keyboards/mixi/readme.md +++ b/keyboards/mixi/readme.md @@ -1,6 +1,6 @@ # Mixi -![Mixi](https://i.imgur.com/GPO6Khu.jpg) +![Mixi](https://i.imgur.com/f6hHXKZ.jpg) A mini 3x3 macropad with rotary encoders support and RGB underglow and also tray mount support. Currently the PCB and kits can only be purchased in Indonesia. From cb13dd0a33c153d8cb0a26596489804c012eaae4 Mon Sep 17 00:00:00 2001 From: MechMerlin <30334081+mechmerlin@users.noreply.github.com> Date: Sun, 21 Jun 2020 15:47:41 -0700 Subject: [PATCH 224/930] Enable NKRO on 1up's boards (#9434) * enable NKRO and keep consistent with bootmagic set to lite * Update keyboards/1upkeyboards/1up60hse/rules.mk Co-authored-by: Ryan Co-authored-by: Ryan --- keyboards/1upkeyboards/1up60hse/rules.mk | 6 +++--- keyboards/1upkeyboards/1up60rgb/rules.mk | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/keyboards/1upkeyboards/1up60hse/rules.mk b/keyboards/1upkeyboards/1up60hse/rules.mk index bce414e25a5c..2ba1f9ef506f 100644 --- a/keyboards/1upkeyboards/1up60hse/rules.mk +++ b/keyboards/1upkeyboards/1up60hse/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 @@ -22,8 +22,8 @@ COMMAND_ENABLE = yes # Commands for debug and configuration # 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 +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 UNICODE_ENABLE = no # Unicode diff --git a/keyboards/1upkeyboards/1up60rgb/rules.mk b/keyboards/1upkeyboards/1up60rgb/rules.mk index 24f737398e7e..ea5308b96058 100644 --- a/keyboards/1upkeyboards/1up60rgb/rules.mk +++ b/keyboards/1upkeyboards/1up60rgb/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = atmel-dfu # Build Options # comment out to disable the options. # -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 = no # Console for debug From 3d6d89966614be1e80d9957fb83743934c5eb162 Mon Sep 17 00:00:00 2001 From: Nick Brassel Date: Mon, 22 Jun 2020 11:21:48 +1000 Subject: [PATCH 225/930] `qmk cformat` (#9500) --- drivers/issi/is31fl3741.c | 5 +- drivers/ws2812.h | 4 +- quantum/process_keycode/process_ucis.c | 79 +++++++++---------- .../process_keycode/process_unicode_common.c | 2 +- quantum/process_keycode/process_unicodemap.c | 2 +- quantum/rgb_matrix_drivers.c | 6 +- 6 files changed, 47 insertions(+), 51 deletions(-) diff --git a/drivers/issi/is31fl3741.c b/drivers/issi/is31fl3741.c index 45d2b4099098..ab4b31465b00 100644 --- a/drivers/issi/is31fl3741.c +++ b/drivers/issi/is31fl3741.c @@ -24,7 +24,6 @@ #include "i2c_master.h" #include "progmem.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) // The address will vary depending on your wiring: @@ -178,9 +177,9 @@ void IS31FL3741_init(uint8_t addr) { // Set Pull up & Down for SWx CSy IS31FL3741_write_register(addr, ISSI_REG_PULLDOWNUP, 0x77); -// IS31FL3741_update_led_scaling_registers(addr, 0xFF, 0xFF, 0xFF); + // IS31FL3741_update_led_scaling_registers(addr, 0xFF, 0xFF, 0xFF); -// Wait 10ms to ensure the device has woken up. + // Wait 10ms to ensure the device has woken up. wait_ms(10); } diff --git a/drivers/ws2812.h b/drivers/ws2812.h index 370b14f3e8f1..f179fcb0ef5a 100644 --- a/drivers/ws2812.h +++ b/drivers/ws2812.h @@ -18,12 +18,12 @@ #include "quantum/color.h" /* - * Older WS2812s can handle a reset time (TRST) of 50us, but recent + * Older WS2812s can handle a reset time (TRST) of 50us, but recent * component revisions require a minimum of 280us. */ #if !defined(WS2812_TRST_US) -#define WS2812_TRST_US 280 +# define WS2812_TRST_US 280 #endif /* User Interface diff --git a/quantum/process_keycode/process_ucis.c b/quantum/process_keycode/process_ucis.c index 2541d6eb2612..12b0aba9bfea 100644 --- a/quantum/process_keycode/process_ucis.c +++ b/quantum/process_keycode/process_ucis.c @@ -72,8 +72,7 @@ bool process_ucis(uint16_t keycode, keyrecord_t *record) { return true; } - bool special = keycode == KC_SPC || keycode == KC_ENT || - keycode == KC_ESC || keycode == KC_BSPC; + bool special = keycode == KC_SPC || keycode == KC_ENT || keycode == KC_ESC || keycode == KC_BSPC; if (qk_ucis_state.count >= UCIS_MAX_SYMBOL_LENGTH && !special) { return false; } @@ -82,49 +81,49 @@ bool process_ucis(uint16_t keycode, keyrecord_t *record) { qk_ucis_state.count++; switch (keycode) { - case KC_BSPC: - if (qk_ucis_state.count >= 2) { - qk_ucis_state.count -= 2; - return true; - } else { - qk_ucis_state.count--; - return false; - } + case KC_BSPC: + if (qk_ucis_state.count >= 2) { + qk_ucis_state.count -= 2; + return true; + } else { + qk_ucis_state.count--; + return false; + } - case KC_SPC: - case KC_ENT: - case KC_ESC: - for (uint8_t i = 0; i < qk_ucis_state.count; i++) { - register_code(KC_BSPC); - unregister_code(KC_BSPC); - wait_ms(UNICODE_TYPE_DELAY); - } + case KC_SPC: + case KC_ENT: + case KC_ESC: + for (uint8_t i = 0; i < qk_ucis_state.count; i++) { + register_code(KC_BSPC); + unregister_code(KC_BSPC); + wait_ms(UNICODE_TYPE_DELAY); + } - if (keycode == KC_ESC) { - qk_ucis_state.in_progress = false; - qk_ucis_cancel(); - return false; - } + if (keycode == KC_ESC) { + qk_ucis_state.in_progress = false; + qk_ucis_cancel(); + return false; + } - uint8_t i; - bool symbol_found = false; - for (i = 0; ucis_symbol_table[i].symbol; i++) { - if (is_uni_seq(ucis_symbol_table[i].symbol)) { - symbol_found = true; - register_ucis(ucis_symbol_table[i].code_points); - break; + uint8_t i; + bool symbol_found = false; + for (i = 0; ucis_symbol_table[i].symbol; i++) { + if (is_uni_seq(ucis_symbol_table[i].symbol)) { + symbol_found = true; + register_ucis(ucis_symbol_table[i].code_points); + break; + } + } + if (symbol_found) { + qk_ucis_success(i); + } else { + qk_ucis_symbol_fallback(); } - } - if (symbol_found) { - qk_ucis_success(i); - } else { - qk_ucis_symbol_fallback(); - } - qk_ucis_state.in_progress = false; - return false; + qk_ucis_state.in_progress = false; + return false; - default: - return true; + default: + return true; } } diff --git a/quantum/process_keycode/process_unicode_common.c b/quantum/process_keycode/process_unicode_common.c index bea34c31eab7..84c44d987499 100644 --- a/quantum/process_keycode/process_unicode_common.c +++ b/quantum/process_keycode/process_unicode_common.c @@ -257,7 +257,7 @@ void send_unicode_string(const char *str) { while (*str) { int32_t code_point = 0; - str = decode_utf8(str, &code_point); + str = decode_utf8(str, &code_point); if (code_point >= 0) { register_unicode(code_point); diff --git a/quantum/process_keycode/process_unicodemap.c b/quantum/process_keycode/process_unicodemap.c index 789a90445bb2..fcf676c24e7c 100644 --- a/quantum/process_keycode/process_unicodemap.c +++ b/quantum/process_keycode/process_unicodemap.c @@ -22,7 +22,7 @@ __attribute__((weak)) uint16_t unicodemap_index(uint16_t keycode) { uint16_t index = keycode - QK_UNICODEMAP_PAIR; bool shift = unicode_saved_mods & MOD_MASK_SHIFT; - bool caps = IS_HOST_LED_ON(USB_LED_CAPS_LOCK); + bool caps = IS_HOST_LED_ON(USB_LED_CAPS_LOCK); if (shift ^ caps) { index >>= 7; } diff --git a/quantum/rgb_matrix_drivers.c b/quantum/rgb_matrix_drivers.c index 22259360868e..37bc20ef5375 100644 --- a/quantum/rgb_matrix_drivers.c +++ b/quantum/rgb_matrix_drivers.c @@ -23,7 +23,7 @@ * be here if shared between boards. */ -#if defined(IS31FL3731) || defined(IS31FL3733) || defined(IS31FL3737) || defined(IS31FL3741) +#if defined(IS31FL3731) || defined(IS31FL3733) || defined(IS31FL3737) || defined(IS31FL3741) # include "i2c_master.h" @@ -100,9 +100,7 @@ const rgb_matrix_driver_t rgb_matrix_driver = { .set_color_all = IS31FL3737_set_color_all, }; # else -static void flush(void) { - IS31FL3741_update_pwm_buffers(DRIVER_ADDR_1, DRIVER_ADDR_2); -} +static void flush(void) { IS31FL3741_update_pwm_buffers(DRIVER_ADDR_1, DRIVER_ADDR_2); } const rgb_matrix_driver_t rgb_matrix_driver = { .init = init, From 0b09189087c580bc8d3aa2bd529a08c7633d3e2b Mon Sep 17 00:00:00 2001 From: Paul Ewers Date: Sun, 21 Jun 2020 23:11:10 -0700 Subject: [PATCH 226/930] [Keymap] New custom 'super alt' keymap for the Drop ALT (#9385) * New custom 'super alt' keymap for the Drop ALT * Improvements to 'super alt' keymap based on PR feedback * Fix flickering LED caps lock bug * Code cleanup from PR feedback * Minor keymap layout cleanup --- .../massdrop/alt/keymaps/ewersp/README.md | 30 +++ .../massdrop/alt/keymaps/ewersp/config.h | 3 + .../massdrop/alt/keymaps/ewersp/keymap.c | 196 ++++++++++++++++++ 3 files changed, 229 insertions(+) create mode 100644 keyboards/massdrop/alt/keymaps/ewersp/README.md create mode 100644 keyboards/massdrop/alt/keymaps/ewersp/config.h create mode 100644 keyboards/massdrop/alt/keymaps/ewersp/keymap.c diff --git a/keyboards/massdrop/alt/keymaps/ewersp/README.md b/keyboards/massdrop/alt/keymaps/ewersp/README.md new file mode 100644 index 000000000000..d2e691a9ef51 --- /dev/null +++ b/keyboards/massdrop/alt/keymaps/ewersp/README.md @@ -0,0 +1,30 @@ +## Greetings, Traveler! + +This layout is for the [Massdrop ALT Keyboard](https://drop.com/buy/massdrop-alt-mechanical-keyboard) and targets Windows machines. + +This keymap is very similar to the default keymap for the Drop ALT, but it overloads the left alt key to behave like an additional 'Fn' key while keeping the functionality of the alt key intact. + +### For example: +``` +LeftAlt + 1...N -> F1...FN +LeftAlt + L/R Arrows -> Home/End +LeftAlt + Home -> End +LeftAlt + Backspace -> Delete +LeftAlt + Esc -> Backtick (`) +``` + +The novel part of this keymap is that it **preserves the default functionality** of the left alt key, so ```'alt + tab', 'ctrl + alt + del', 'alt + f4'```, etc. all work as expected without using any janky timers. + +Everything also works with other modifier keys, so ```'alt + L/R' and 'alt + shift + L/R'``` work great for text manipulation to select lines. + +This **'super alt'** keymap will feel very familiar for anyone **coming from macOS** since the Windows alt key is in the same position as CMD on macOS keyboards. + +And finally, the original alt key functionality can be toggled at any time by pressing **```'Fn + period'```** so even if you don't like it, you can turn it off. + +This keymap was based on the 'default' Drop ALT keymap (and _not_ 'default_md') which means it supports all the fancy QMK RGB patterns, and isn't limited to the stock options that come with the board. + +It's also worth noting that this keymap fixes an outstanding issue where the caps lock LED flickers when the RGB mode is keylight or underglow. I could not find a general purpose fix, but the one included here works quite well. + +If you have any questions, feel free to reach out to me at: ewersp [at] gmail [dot] com. + +Enjoy! **<3** diff --git a/keyboards/massdrop/alt/keymaps/ewersp/config.h b/keyboards/massdrop/alt/keymaps/ewersp/config.h new file mode 100644 index 000000000000..1c801d7e3c1c --- /dev/null +++ b/keyboards/massdrop/alt/keymaps/ewersp/config.h @@ -0,0 +1,3 @@ +#pragma once + +#define FORCE_NKRO diff --git a/keyboards/massdrop/alt/keymaps/ewersp/keymap.c b/keyboards/massdrop/alt/keymaps/ewersp/keymap.c new file mode 100644 index 000000000000..483ea3cfb2a1 --- /dev/null +++ b/keyboards/massdrop/alt/keymaps/ewersp/keymap.c @@ -0,0 +1,196 @@ +#include QMK_KEYBOARD_H + +enum alt_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 + ALT_DEL, //Added to map left alt + backspace to delete +}; + +// Friendly layer names +enum alt_layers { + DEF = 0, + ALT, + FUNC, + SUPR +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [DEF] = LAYOUT_65_ansi_blocker( + 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_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, MO(SUPR), KC_SPC, KC_RALT, MO(FUNC),KC_LEFT, KC_DOWN, KC_RGHT + ), + [ALT] = LAYOUT_65_ansi_blocker( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, KC_LALT, _______, _______, _______, _______, _______, _______ + ), + [FUNC] = 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_MUTE, + _______, RGB_SPD, RGB_VAI, RGB_SPI, RGB_HUI, RGB_SAI, _______, U_T_AUTO,U_T_AGCR,_______, KC_PSCR, KC_SLCK, KC_PAUS, _______, KC_END, + _______, RGB_RMOD,RGB_VAD, RGB_MOD, RGB_HUD, RGB_SAD, _______, _______, _______, _______, _______, _______, _______, KC_VOLU, + _______, RGB_TOG, _______, _______, _______, MD_BOOT, NK_TOGG, DBG_TOG, _______, TG(ALT), _______, _______, KC_PGUP, KC_VOLD, + _______, _______, KC_LALT, _______, _______, _______, KC_HOME, KC_PGDN, KC_END + ), + [SUPR] = 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, ALT_DEL, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_END, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, KC_HOME, _______, KC_END + ) +}; + +// If the super alt layer is the active layer +bool super_alt_layer_active = false; + +// If we need to unregister alt when leaving the super alt layer +bool need_to_unregister_alt = false; + +#define MODS_SHIFT (get_mods() & MOD_BIT(KC_LSHIFT) || get_mods() & MOD_BIT(KC_RSHIFT)) +#define MODS_CTRL (get_mods() & MOD_BIT(KC_LCTL) || get_mods() & MOD_BIT(KC_RCTRL)) +#define MODS_ALT (get_mods() & MOD_BIT(KC_LALT) || get_mods() & MOD_BIT(KC_RALT)) + +// Taken from 'g_led_config' in config_led.c +#define CAPS_LOCK_LED_ID 30 + +// This runs every matrix scan (every 'frame') +void rgb_matrix_indicators_user(void) { + led_flags_t flags = rgb_matrix_get_flags(); + + // If we're in either keylight or underglow modes (but not both simultaneously) + if (HAS_FLAGS(flags, LED_FLAG_KEYLIGHT) != HAS_FLAGS(flags, LED_FLAG_UNDERGLOW)) { + + // This fixes a bug where the caps lock LED flickers when toggled in either keylight or underglow modes + if (host_keyboard_leds() & (1 << USB_LED_CAPS_LOCK)) { + rgb_matrix_set_color(CAPS_LOCK_LED_ID, RGB_WHITE); + } else { + rgb_matrix_set_color(CAPS_LOCK_LED_ID, 0, 0, 0); + } + } +} + +// This runs code every time that the layers get changed +layer_state_t layer_state_set_user(layer_state_t state) { + switch (get_highest_layer(state)) { + case DEF: + // When returning to the default layer, check if we need to unregister the left alt key + if (super_alt_layer_active && need_to_unregister_alt) { + unregister_code(KC_LALT); + } + + super_alt_layer_active = false; + need_to_unregister_alt = false; + break; + case SUPR: + super_alt_layer_active = true; + break; + } + return state; +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + static uint32_t key_timer; + + switch (keycode) { + // These are the keys we want to 'fall though' and behave as usual when pressed with the alt modifier + case KC_A ... KC_Z: + case KC_TAB: + case KC_DEL: + case KC_UP: + case KC_DOWN: + case MO(FUNC): + if (super_alt_layer_active && record->event.pressed) { + // Only activate the alt modifier for the first key press + if ((get_mods() & MOD_BIT(KC_LALT)) == false) { + register_code(KC_LALT); + need_to_unregister_alt = true; + } + } + // We still want to process the keycode normally + return true; + case ALT_DEL: + if (record->event.pressed) { + register_code(KC_DEL); + } else { + unregister_code(KC_DEL); + } + return false; + case U_T_AUTO: + if (record->event.pressed && MODS_SHIFT && MODS_CTRL) { + TOGGLE_FLAG_AND_PRINT(usb_extra_manual, "USB extra port manual mode"); + } + return false; + case U_T_AGCR: + if (record->event.pressed && MODS_SHIFT && MODS_CTRL) { + 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(); + } else { + if (timer_elapsed32(key_timer) >= 500) { + reset_keyboard(); + } + } + return false; + case RGB_TOG: + if (record->event.pressed) { + switch (rgb_matrix_get_flags()) { + case LED_FLAG_ALL: { + rgb_matrix_set_flags(LED_FLAG_KEYLIGHT); + rgb_matrix_set_color_all(0, 0, 0); + } + break; + case LED_FLAG_KEYLIGHT: { + rgb_matrix_set_flags(LED_FLAG_UNDERGLOW); + rgb_matrix_set_color_all(0, 0, 0); + } + break; + case LED_FLAG_UNDERGLOW: { + rgb_matrix_set_flags(LED_FLAG_NONE); + rgb_matrix_disable_noeeprom(); + } + break; + default: { + rgb_matrix_set_flags(LED_FLAG_ALL); + rgb_matrix_enable_noeeprom(); + } + break; + } + } + return false; + default: + return true; // Process all other keycodes normally + } +} From 82dc8faaf30a6b77ec715852c3841fde087b6b07 Mon Sep 17 00:00:00 2001 From: AlexOConnorHub <43659595+AlexOConnorHub@users.noreply.github.com> Date: Mon, 22 Jun 2020 03:43:08 -0400 Subject: [PATCH 227/930] Fixing MIDI for ARM without NKRO enabled (#9466) --- tmk_core/protocol/midi/qmk_midi.h | 1 + 1 file changed, 1 insertion(+) diff --git a/tmk_core/protocol/midi/qmk_midi.h b/tmk_core/protocol/midi/qmk_midi.h index 0a348d5fde64..819087a405fe 100644 --- a/tmk_core/protocol/midi/qmk_midi.h +++ b/tmk_core/protocol/midi/qmk_midi.h @@ -2,6 +2,7 @@ #ifdef MIDI_ENABLE # include "midi.h" +# include extern MidiDevice midi_device; void setup_midi(void); void send_midi_packet(MIDI_EventPacket_t* event); From 98642ca02878741531105bd879c0d61110198b62 Mon Sep 17 00:00:00 2001 From: Drashna Jaelre Date: Mon, 22 Jun 2020 01:38:58 -0700 Subject: [PATCH 228/930] Improve keycode handling for RGB (#7677) Co-authored-by: drashna Co-authored-by: noroadsleft <18669334+noroadsleft@users.noreply.github.com> --- docs/feature_rgb_matrix.md | 11 +++- docs/feature_rgblight.md | 4 ++ quantum/process_keycode/process_rgb.c | 85 ++++++++++++++++++++++++--- 3 files changed, 91 insertions(+), 9 deletions(-) diff --git a/docs/feature_rgb_matrix.md b/docs/feature_rgb_matrix.md index a4f434cbd925..9604bdcc8982 100644 --- a/docs/feature_rgb_matrix.md +++ b/docs/feature_rgb_matrix.md @@ -186,8 +186,16 @@ All RGB keycodes are currently shared with the RGBLIGHT system: |`RGB_VAD` | |Decrease value (brightness), increase value when Shift is held | |`RGB_SPI` | |Increase effect speed (does not support eeprom yet), decrease speed when Shift is held| |`RGB_SPD` | |Decrease effect speed (does not support eeprom yet), increase speed when Shift is held| +|`RGB_MODE_PLAIN` |`RGB_M_P `|Static (no animation) mode | +|`RGB_MODE_BREATHE` |`RGB_M_B` |Breathing animation mode | +|`RGB_MODE_RAINBOW` |`RGB_M_R` |Full gradient scrolling left to right (uses the `RGB_MATRIX_CYCLE_LEFT_RIGHT` mode) | +|`RGB_MODE_SWIRL` |`RGB_M_SW`|Full gradient spinning pinwheel around center of keyboard (uses `RGB_MATRIX_CYCLE_PINWHEEL` mode) | -* `RGB_MODE_*` keycodes will generally work, but are not currently mapped to the correct effects for the RGB Matrix system +* `RGB_MODE_*` keycodes will generally work, but not all of the modes are currently mapped to the correct effects for the RGB Matrix system. + +`RGB_MODE_PLAIN`, `RGB_MODE_BREATHE`, `RGB_MODE_RAINBOW`, and `RGB_MATRIX_SWIRL` are the only ones that are mapped properly. The rest don't have a direct equivalent, and are not mapped. + +!> By default, if you have both the [RGB Light](feature_rgblight.md) and the RGB Matrix feature enabled, these keycodes will work for both features, at the same time. You can disable the keycode functionality by defining the `*_DISABLE_KEYCODES` option for the specific feature. ## RGB Matrix Effects :id=rgb-matrix-effects @@ -385,6 +393,7 @@ These are defined in [`rgblight_list.h`](https://github.com/qmk/qmk_firmware/blo #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 +#define RGB_MATRIX_DISABLE_KEYCODES // disables control of rgb matrix by keycodes (must use code functions to control the feature) ``` ## EEPROM storage :id=eeprom-storage diff --git a/docs/feature_rgblight.md b/docs/feature_rgblight.md index 5921e9941a0e..a81b50e828a9 100644 --- a/docs/feature_rgblight.md +++ b/docs/feature_rgblight.md @@ -64,6 +64,9 @@ Changing the **Value** sets the overall brightness.
|`RGB_MODE_GRADIENT`|`RGB_M_G` |Static gradient animation mode | |`RGB_MODE_RGBTEST` |`RGB_M_T` |Red, Green, Blue test animation mode | +!> By default, if you have both the RGB Light and the [RGB Matrix](feature_rgb_matrix.md) feature enabled, these keycodes will work for both features, at the same time. You can disable the keycode functionality by defining the `*_DISABLE_KEYCODES` option for the specific feature. + + ## Configuration Your RGB lighting can be configured by placing these `#define`s in your `config.h`: @@ -76,6 +79,7 @@ Your RGB lighting can be configured by placing these `#define`s in your `config. |`RGBLIGHT_LIMIT_VAL` |`255` |The maximum brightness level | |`RGBLIGHT_SLEEP` |*Not defined*|If defined, the RGB lighting will be switched off when the host goes to sleep| |`RGBLIGHT_SPLIT` |*Not defined*|If defined, synchronization functionality for split keyboards is added| +|`RGBLIGHT_DISABLE_KEYCODES`|*not defined*|If defined, disables the ability to control RGB Light from the keycodes. You must use code functions to control the feature| ## Effects and Animations diff --git a/quantum/process_keycode/process_rgb.c b/quantum/process_keycode/process_rgb.c index 21164b8f9fc6..a1e46e03483f 100644 --- a/quantum/process_keycode/process_rgb.c +++ b/quantum/process_keycode/process_rgb.c @@ -59,78 +59,147 @@ bool process_rgb(const uint16_t keycode, const keyrecord_t *record) { uint8_t shifted = get_mods() & MOD_MASK_SHIFT; switch (keycode) { case RGB_TOG: +#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; case RGB_MODE_FORWARD: +#if defined(RGBLIGHT_ENABLE) && !defined(RGBLIGHT_DISABLE_KEYCODES) handleKeycodeRGB(shifted, rgblight_step, rgblight_step_reverse); +#endif +#if defined(RGB_MATRIX_ENABLE) && !defined(RGB_MATRIX_DISABLE_KEYCODES) + handleKeycodeRGB(shifted, rgb_matrix_step, rgb_matrix_step_reverse); +#endif return false; case RGB_MODE_REVERSE: +#if defined(RGBLIGHT_ENABLE) && !defined(RGBLIGHT_DISABLE_KEYCODES) handleKeycodeRGB(shifted, rgblight_step_reverse, rgblight_step); +#endif +#if defined(RGB_MATRIX_ENABLE) && !defined(RGB_MATRIX_DISABLE_KEYCODES) + handleKeycodeRGB(shifted, rgb_matrix_step_reverse, rgb_matrix_step); +#endif return false; case RGB_HUI: +#if defined(RGBLIGHT_ENABLE) && !defined(RGBLIGHT_DISABLE_KEYCODES) handleKeycodeRGB(shifted, rgblight_increase_hue, rgblight_decrease_hue); +#endif +#if defined(RGB_MATRIX_ENABLE) && !defined(RGB_MATRIX_DISABLE_KEYCODES) + handleKeycodeRGB(shifted, rgb_matrix_increase_hue, rgb_matrix_decrease_hue); +#endif return false; case RGB_HUD: +#if defined(RGBLIGHT_ENABLE) && !defined(RGBLIGHT_DISABLE_KEYCODES) handleKeycodeRGB(shifted, rgblight_decrease_hue, rgblight_increase_hue); +#endif +#if defined(RGB_MATRIX_ENABLE) && !defined(RGB_MATRIX_DISABLE_KEYCODES) + handleKeycodeRGB(shifted, rgb_matrix_decrease_hue, rgb_matrix_increase_hue); +#endif return false; case RGB_SAI: +#if defined(RGBLIGHT_ENABLE) && !defined(RGBLIGHT_DISABLE_KEYCODES) handleKeycodeRGB(shifted, rgblight_increase_sat, rgblight_decrease_sat); +#endif +#if defined(RGB_MATRIX_ENABLE) && !defined(RGB_MATRIX_DISABLE_KEYCODES) + handleKeycodeRGB(shifted, rgb_matrix_increase_sat, rgb_matrix_decrease_sat); +#endif return false; case RGB_SAD: +#if defined(RGBLIGHT_ENABLE) && !defined(RGBLIGHT_DISABLE_KEYCODES) handleKeycodeRGB(shifted, rgblight_decrease_sat, rgblight_increase_sat); +#endif +#if defined(RGB_MATRIX_ENABLE) && !defined(RGB_MATRIX_DISABLE_KEYCODES) + handleKeycodeRGB(shifted, rgb_matrix_decrease_sat, rgb_matrix_increase_sat); +#endif return false; case RGB_VAI: +#if defined(RGBLIGHT_ENABLE) && !defined(RGBLIGHT_DISABLE_KEYCODES) handleKeycodeRGB(shifted, rgblight_increase_val, rgblight_decrease_val); +#endif +#if defined(RGB_MATRIX_ENABLE) && !defined(RGB_MATRIX_DISABLE_KEYCODES) + handleKeycodeRGB(shifted, rgb_matrix_increase_val, rgb_matrix_decrease_val); +#endif return false; case RGB_VAD: +#if defined(RGBLIGHT_ENABLE) && !defined(RGBLIGHT_DISABLE_KEYCODES) handleKeycodeRGB(shifted, rgblight_decrease_val, rgblight_increase_val); +#endif +#if defined(RGB_MATRIX_ENABLE) && !defined(RGB_MATRIX_DISABLE_KEYCODES) + handleKeycodeRGB(shifted, rgb_matrix_decrease_val, rgb_matrix_increase_val); +#endif return false; case RGB_SPI: +#if defined(RGBLIGHT_ENABLE) && !defined(RGBLIGHT_DISABLE_KEYCODES) handleKeycodeRGB(shifted, rgblight_increase_speed, rgblight_decrease_speed); +#endif +#if defined(RGB_MATRIX_ENABLE) && !defined(RGB_MATRIX_DISABLE_KEYCODES) + handleKeycodeRGB(shifted, rgb_matrix_increase_speed, rgb_matrix_decrease_speed); +#endif return false; case RGB_SPD: +#if defined(RGBLIGHT_ENABLE) && !defined(RGBLIGHT_DISABLE_KEYCODES) handleKeycodeRGB(shifted, rgblight_decrease_speed, rgblight_increase_speed); +#endif +#if defined(RGB_MATRIX_ENABLE) && !defined(RGB_MATRIX_DISABLE_KEYCODES) + handleKeycodeRGB(shifted, rgb_matrix_decrease_speed, rgb_matrix_increase_speed); +#endif return false; case RGB_MODE_PLAIN: +#if defined(RGBLIGHT_ENABLE) && !defined(RGBLIGHT_DISABLE_KEYCODES) rgblight_mode(RGBLIGHT_MODE_STATIC_LIGHT); +#endif +#if defined(RGB_MATRIX_ENABLE) && !defined(RGB_MATRIX_DISABLE_KEYCODES) + rgb_matrix_mode(RGB_MATRIX_SOLID_COLOR); +#endif return false; case RGB_MODE_BREATHE: -#ifdef RGBLIGHT_EFFECT_BREATHING +#if defined(RGBLIGHT_ENABLE) && !defined(RGBLIGHT_DISABLE_KEYCODES) && defined(RGBLIGHT_EFFECT_BREATHING) handleKeycodeRGBMode(RGBLIGHT_MODE_BREATHING, RGBLIGHT_MODE_BREATHING_end); +#endif +#if defined(RGB_MATRIX_ENABLE) && !defined(RGB_MATRIX_DISABLE_KEYCODES) && !defined(DISABLE_RGB_MATRIX_BREATHING) + rgb_matrix_mode(RGB_MATRIX_BREATHING); #endif return false; case RGB_MODE_RAINBOW: -#ifdef RGBLIGHT_EFFECT_RAINBOW_MOOD +#if defined(RGBLIGHT_ENABLE) && !defined(RGBLIGHT_DISABLE_KEYCODES) && defined( RGBLIGHT_EFFECT_RAINBOW_MOOD) handleKeycodeRGBMode(RGBLIGHT_MODE_RAINBOW_MOOD, RGBLIGHT_MODE_RAINBOW_MOOD_end); +#endif +#if defined(RGB_MATRIX_ENABLE) && !defined(RGB_MATRIX_DISABLE_KEYCODES) && !defined(DISABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT) + rgb_matrix_mode(RGB_MATRIX_CYCLE_LEFT_RIGHT); #endif return false; case RGB_MODE_SWIRL: -#ifdef RGBLIGHT_EFFECT_RAINBOW_SWIRL +#if defined(RGBLIGHT_ENABLE) && !defined(RGBLIGHT_DISABLE_KEYCODES) && defined( RGBLIGHT_EFFECT_RAINBOW_SWIRL) handleKeycodeRGBMode(RGBLIGHT_MODE_RAINBOW_SWIRL, RGBLIGHT_MODE_RAINBOW_SWIRL_end); +#endif +#if defined(RGB_MATRIX_ENABLE) && !defined(RGB_MATRIX_DISABLE_KEYCODES) && !defined(DISABLE_RGB_MATRIX_CYCLE_PINWHEEL) + rgb_matrix_mode(RGB_MATRIX_CYCLE_PINWHEEL); #endif return false; case RGB_MODE_SNAKE: -#ifdef RGBLIGHT_EFFECT_SNAKE +#if defined(RGBLIGHT_ENABLE) && !defined(RGBLIGHT_DISABLE_KEYCODES) && defined( RGBLIGHT_EFFECT_SNAKE) handleKeycodeRGBMode(RGBLIGHT_MODE_SNAKE, RGBLIGHT_MODE_SNAKE_end); #endif return false; case RGB_MODE_KNIGHT: -#ifdef RGBLIGHT_EFFECT_KNIGHT +#if defined(RGBLIGHT_ENABLE) && !defined(RGBLIGHT_DISABLE_KEYCODES) && defined( RGBLIGHT_EFFECT_KNIGHT) handleKeycodeRGBMode(RGBLIGHT_MODE_KNIGHT, RGBLIGHT_MODE_KNIGHT_end); #endif return false; case RGB_MODE_XMAS: -#ifdef RGBLIGHT_EFFECT_CHRISTMAS +#if defined(RGBLIGHT_ENABLE) && !defined(RGBLIGHT_DISABLE_KEYCODES) && defined( RGBLIGHT_EFFECT_CHRISTMAS) rgblight_mode(RGBLIGHT_MODE_CHRISTMAS); #endif return false; case RGB_MODE_GRADIENT: -#ifdef RGBLIGHT_EFFECT_STATIC_GRADIENT +#if defined(RGBLIGHT_ENABLE) && !defined(RGBLIGHT_DISABLE_KEYCODES) && defined( 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 +#if defined(RGBLIGHT_ENABLE) && !defined(RGBLIGHT_DISABLE_KEYCODES) && defined( RGBLIGHT_EFFECT_RGB_TEST) rgblight_mode(RGBLIGHT_MODE_RGB_TEST); #endif return false; From 4b13c4957844dfeca3c72c3c8782708081fc22ed Mon Sep 17 00:00:00 2001 From: LucW Date: Mon, 22 Jun 2020 16:45:47 +0800 Subject: [PATCH 229/930] user keymaps for ergodox_ez/dvorak_42_key / atreus/dvorak_42_key (#9429) Co-authored-by: Drashna Jaelre Co-authored-by: Ryan --- .../atreus/keymaps/dvorak_42_key/keymap.c | 30 +++- .../ergodox_ez/keymaps/dvorak_42_key/keymap.c | 164 +++++++++--------- 2 files changed, 104 insertions(+), 90 deletions(-) diff --git a/keyboards/atreus/keymaps/dvorak_42_key/keymap.c b/keyboards/atreus/keymaps/dvorak_42_key/keymap.c index 0fda245e2ee5..3f769494494f 100644 --- a/keyboards/atreus/keymaps/dvorak_42_key/keymap.c +++ b/keyboards/atreus/keymaps/dvorak_42_key/keymap.c @@ -23,6 +23,7 @@ #define AS_GO_IMPLEMENTATION LCTL(LALT(KC_B)) #define AS_CLOSETAB LCTL(KC_F4) #define AS_CLOSETOOLWINDOW LCTL(LSFT(KC_F4)) +#define AS_ALTENTER LALT(KC_ENTER) enum custom_keycodes { PLACEHOLDER = SAFE_RANGE, // can always be here @@ -35,13 +36,16 @@ enum custom_keycodes { CLOUD9_GOTO_LINE, CLOUD9_NAVIGATE, + // Windows 10 macros + W10_TASKVIEW, + W10_WORKSPACE_LEFT, + W10_WORKSPACE_RIGHT, + }; // building instructions: // make atreus:dvorak_42_key -// flashing instructions: -// avrdude -p atmega32u4 -c avr109 -U flash:w:atreus_dvorak_42_key.hex -P COM7 const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [BASE] = LAYOUT( @@ -55,7 +59,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_ESC, AS_GO_IMPLEMENTATION, RCTL(KC_Z), RCTL(KC_S), MEH(KC_A), MEH(KC_B), KC_HOME, KC_UP, KC_END, KC_PGUP, AS_BACK, AS_SYMBOL, RSFT(KC_TAB), KC_TAB, SHELL_DEL_WORD, LCTL(KC_LEFT), KC_LEFT, KC_DOWN, KC_RIGHT, LCTL(KC_RIGHT), AS_FINDUSAGE, AS_CLASS, AS_TABLEFT, AS_TABRIGHT, AS_CLOSETAB, KC_TRNS, RCTL(KC_C), RCTL(KC_X), RCTL(KC_V), KC_PGDOWN, - AS_CLOSETOOLWINDOW, AS_GO_DECLARATION, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_ENTER, KC_SPACE, KC_BSPC, RCTL(KC_BSPC), KC_DELETE, LCTL(KC_DELETE) + AS_CLOSETOOLWINDOW, AS_GO_DECLARATION, KC_TRNS, KC_TRNS, AS_ALTENTER, KC_TRNS, KC_ENTER, KC_SPACE, KC_BSPC, RCTL(KC_BSPC), KC_DELETE, LCTL(KC_DELETE) ), [KEYSEL] = LAYOUT( @@ -73,10 +77,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), [BROWSER_CONTROL] = LAYOUT( - MEH(KC_0), KC_BTN3, KC_MS_U, KC_BTN1, KC_BTN2, KC_UP, KC_PGUP, KC_PGDN, KC_MS_WH_UP, MEH(KC_9), - MEH(KC_1), KC_MS_L, KC_MS_D, KC_MS_R, MEH(KC_6), KC_DOWN, RSFT(RCTL(KC_TAB)), RCTL(KC_TAB), KC_MS_WH_DOWN, LALT(KC_LEFT), - MEH(KC_2), MEH(KC_3), MEH(KC_4), MEH(KC_5), MEH(KC_7), MEH(KC_8), RCTL(KC_1), RCTL(KC_9), KC_F6, KC_F5, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RCTL(KC_W), RCTL(KC_T), RSFT(RCTL(KC_TAB)), KC_TRNS, KC_TRNS, KC_TRNS + MEH(KC_0), KC_BTN3, KC_MS_U, KC_BTN1, KC_BTN2, KC_UP, KC_PGUP, KC_PGDN, KC_MS_WH_UP, MEH(KC_9), + MEH(KC_1), KC_MS_L, KC_MS_D, KC_MS_R, MEH(KC_6), KC_DOWN, RSFT(RCTL(KC_TAB)), RCTL(KC_TAB), KC_MS_WH_DOWN, LALT(KC_LEFT), + MEH(KC_2), W10_TASKVIEW, W10_WORKSPACE_LEFT, W10_WORKSPACE_RIGHT, MEH(KC_7), MEH(KC_8), RCTL(KC_1), RCTL(KC_9), KC_F6, KC_F5, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RCTL(KC_W), RCTL(KC_T), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS ), }; @@ -108,9 +112,19 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { SEND_STRING(SS_LCTRL("e")); return true; break; + case W10_TASKVIEW: + tap_code16(G(KC_TAB)); + return true; + break; + case W10_WORKSPACE_LEFT: + tap_code16(G(C(KC_LEFT))); + return true; + break; + case W10_WORKSPACE_RIGHT: + tap_code16(G(C(KC_RIGHT))); + break; } } return true; } - diff --git a/keyboards/ergodox_ez/keymaps/dvorak_42_key/keymap.c b/keyboards/ergodox_ez/keymaps/dvorak_42_key/keymap.c index dc18edac8f23..22b8a9b9e0c9 100644 --- a/keyboards/ergodox_ez/keymaps/dvorak_42_key/keymap.c +++ b/keyboards/ergodox_ez/keymaps/dvorak_42_key/keymap.c @@ -50,30 +50,23 @@ enum custom_keycodes { SHELL_EXPAND_OE_LOGPATTERN, SHELL_EXPAND_OE_TRANPATTERN, - // Cloud9 macros - CLOUD9_TAB_LEFT, - CLOUD9_TAB_RIGHT, - CLOUD9_TAB_CLOSE, - CLOUD9_GOTO_SYMBOL, - CLOUD9_GOTO_LINE, - CLOUD9_NAVIGATE, - // Windows 10 macros, WINDOWS10_WORKSPACE_LEFT, WINDOWS10_WORKSPACE_RIGHT, + WINDOWS10_TASK_VIEW }; #define BASE 0 // base dvorak layer -#define BASE_ALTERNATE 1 // base dvorak layer, with different layer toggling -#define KEYNAV 2 // arrow navigation (right hand) -#define KEYSEL 3 // arrow navigation + shift (allow text selection) -#define SHELL_NAV 4 // bash shortcuts -#define SHELL_SCREEN 5 // linux screen shortcuts -#define SCREEN_NAV 6 // navigate between linux screen tabs -#define BROWSER_CONTROL 7 // control browser and mouse -#define COMBINED 8 // combined numbers and symbols layer -#define ANDROID_STUDIO 9 +#define KEYNAV 1 // arrow navigation (right hand) +#define KEYSEL 2 // arrow navigation + shift (allow text selection) +#define SHELL_NAV 3 // bash shortcuts +#define SHELL_SCREEN 4 // linux screen shortcuts +#define SCREEN_NAV 5 // navigate between linux screen tabs +#define BROWSER_CONTROL 6 // control browser and mouse +#define COMBINED 7 // combined numbers and symbols layer +#define ANDROID_STUDIO 8 // android studio specific layer +#define VSCODE 9 // visual studio code specific layer // macros @@ -117,6 +110,34 @@ enum custom_keycodes { #define AS_CLOSETAB LCTL(KC_F4) #define AS_CLOSETOOLWINDOW LCTL(LSFT(KC_F4)) +// visual studio code shortcuts +#define VS_FILE LCTL(KC_P) +#define VS_LINE LCTL(KC_G) +#define VS_SYMBOLEDITOR LCTL(LSFT(KC_O)) +#define VS_DEFINITION KC_F12 +#define VS_IMPLEMENTATION LCTL(KC_F12) +#define VS_REFERENCES LSFT(KC_F12) +#define VS_BACK LALT(KC_LEFT) +#define VS_BRACKET LCTL(LSFT(KC_BSLS)) +#define VS_TABLEFT LCTL(KC_PGUP) +#define VS_TABRIGHT LCTL(KC_PGDN) +#define VS_CLOSETAB LCTL(KC_W) +#define VS_CLOSEPANEL LCTL(LSFT(KC_W)) +#define VS_TERMINAL LCTL(KC_GRAVE) +#define VS_BUILD LCTL(LSFT(KC_B)) +#define VS_COMMANDS LCTL(LSFT(KC_P)) +#define VS_CMT_BLOCK LSFT(LALT(KC_A)) +#define VS_CMT_LINE LCTL(KC_SLSH) +#define VS_DEL_LINE LCTL(LSFT(KC_K)) +#define VS_COPYLINEDOWN LSFT(LALT(KC_DOWN)) +// visual studio bookmark commands +#define VS_BM_LIST LCTL(LALT(KC_L)) +#define VS_BM_LISTALL LCTL(LALT(KC_A)) +#define VS_BM_PREV LCTL(LALT(KC_P)) +#define VS_BM_NEXT LCTL(LALT(KC_N)) +#define VS_BM_TOGGLE LCTL(LALT(KC_K)) +#define VS_BM_LABEL LCTL(LALT(KC_B)) + #define MACRO_SCREEN_NUM(MACRO_NAME,NUM) \ case MACRO_NAME:\ @@ -166,12 +187,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, OSL(SCREEN_NAV), KC_QUOTE, KC_COMMA, KC_DOT, KC_P, KC_Y, MEH(KC_2), OSL(SHELL_NAV), KC_A, KC_O, KC_E, KC_U, KC_I, - OSL(SHELL_SCREEN), KC_SCOLON, KC_Q, KC_J, KC_K, KC_X, MEH(KC_3), + OSL(SHELL_SCREEN), KC_SCOLON, KC_Q, KC_J, KC_K, KC_X, MO(VSCODE), MEH(KC_1), OSM(MOD_LSFT), OSM(MOD_LCTL), MO(KEYSEL), MO(BROWSER_CONTROL), // left thumb cluster WINDOWS10_WORKSPACE_LEFT, WINDOWS10_WORKSPACE_RIGHT, - MEH(KC_6), + WINDOWS10_TASK_VIEW, MO(COMBINED),MO(KEYNAV), OSM(MOD_LALT), // right hand @@ -186,39 +207,13 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), - // alternate base layout - [BASE_ALTERNATE] = LAYOUT_ergodox( - // left hand - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - OSL(ANDROID_STUDIO),KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - // bottom row - KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, - // thumb cluster - KC_TRNS,KC_TRNS, - KC_TRNS, - KC_TRNS,KC_TRNS,KC_TRNS, - // right hand - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - // bottom row - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - // thumb cluster - KC_TRNS, KC_TRNS, - KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS - ), - [KEYNAV] = LAYOUT_ergodox( // left hand - KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS,KC_ESC, CLOUD9_GOTO_LINE, RCTL(KC_Z), RCTL(KC_S), MEH(KC_F10), KC_TRNS, - KC_TRNS,KC_LSFT, CLOUD9_GOTO_SYMBOL, RSFT(KC_TAB), KC_TAB, MEH(KC_A), - KC_TRNS,MEH(KC_B), CLOUD9_NAVIGATE, CLOUD9_TAB_LEFT, CLOUD9_TAB_RIGHT, CLOUD9_TAB_CLOSE, KC_TRNS, - KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS,KC_ESC, KC_TRNS, RCTL(KC_Z), RCTL(KC_S), KC_TRNS, KC_TRNS, + KC_TRNS,KC_LSFT, KC_TRNS, RSFT(KC_TAB), KC_TAB, KC_TRNS, + KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, // left thumb cluster KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, @@ -242,7 +237,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TRNS,MEH(KC_L), MEH(KC_M),MEH(KC_N), MEH(KC_O), MEH(KC_P), KC_TRNS,MEH(KC_Q), MEH(KC_R),MEH(KC_S), MEH(KC_T), MEH(KC_U), KC_TRNS, // bottom row - RESET,DF(BASE),DF(BASE_ALTERNATE),KC_TRNS,KC_TRNS, + RESET,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, // thumb cluster KC_TRNS,KC_TRNS, KC_TRNS, @@ -355,10 +350,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS, // right hand - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, AS_FINDUSAGE, AS_GO_DECLARATION, AS_GO_IMPLEMENTATION, KC_TRNS, - KC_TRNS, AS_TABLEFT, AS_TABRIGHT, AS_SYMBOL, AS_CLASS, AS_BACK, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, AS_CLOSETAB, AS_CLOSETOOLWINDOW, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, AS_FINDUSAGE, AS_GO_DECLARATION, AS_GO_IMPLEMENTATION, KC_TRNS, + AS_CLOSETAB, AS_TABLEFT, AS_TABRIGHT, AS_SYMBOL, AS_CLASS, AS_BACK, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, AS_CLOSETOOLWINDOW, KC_TRNS, // bottom row KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, // thumb cluster @@ -367,6 +362,32 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TRNS, KC_TRNS, KC_TRNS ), + // vscode shortcuts shortcuts + [VSCODE] = LAYOUT_ergodox( + // left hand + KC_NO, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + // bottom row + KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, + // thumb cluster + KC_TRNS,KC_TRNS, + KC_TRNS, + KC_TRNS,KC_TRNS,KC_TRNS, + // right hand + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + VS_CMT_LINE, VS_COPYLINEDOWN, VS_REFERENCES, VS_DEFINITION, VS_IMPLEMENTATION, VS_LINE, VS_BRACKET, + VS_CLOSETAB, VS_TABLEFT, VS_TABRIGHT, VS_SYMBOLEDITOR, VS_FILE, VS_BACK, + VS_CMT_BLOCK, KC_TRNS, VS_BM_PREV, VS_BM_NEXT, VS_BM_LIST, VS_BM_LISTALL, VS_BM_TOGGLE, + // bottom row + VS_COMMANDS, VS_BUILD, VS_TERMINAL, VS_CLOSEPANEL, VS_BM_LABEL, + // thumb cluster + KC_TRNS, KC_TRNS, + KC_TRNS, + KC_TRNS, VS_DEL_LINE, KC_TRNS + ), + [COMBINED] = LAYOUT_ergodox( // left hand @@ -407,10 +428,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { // right hand KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_UP, KC_PGUP, KC_PGDN, KC_MS_WH_UP, KC_TRNS, KC_TRNS, - KC_DOWN, RSFT(RCTL(KC_TAB)), RCTL(KC_TAB), KC_MS_WH_DOWN, LALT(KC_LEFT), KC_TRNS, + KC_DOWN, RCTL(KC_PGUP), RCTL(KC_PGDN),KC_MS_WH_DOWN, LALT(KC_LEFT), KC_TRNS, KC_TRNS, KC_TRNS, RCTL(KC_1), RCTL(KC_9), KC_F6, KC_F5, KC_TRNS, // bottom row - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + RCTL(LSFT(KC_TAB)), RCTL(KC_TAB), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RCTL(KC_W), RCTL(KC_T) @@ -623,31 +644,6 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { SEND_STRING(" | dumptlog - "); return true; break; - // Cloud9 macros - case CLOUD9_TAB_LEFT: - SEND_STRING(SS_LCTRL("[")); - return true; - break; - case CLOUD9_TAB_RIGHT: - SEND_STRING(SS_LCTRL("]")); - return true; - break; - case CLOUD9_TAB_CLOSE: - SEND_STRING(SS_LALT("w")); - return true; - break; - case CLOUD9_GOTO_SYMBOL: - SEND_STRING(SS_LSFT(SS_LCTRL("e"))); - return true; - break; - case CLOUD9_GOTO_LINE: - SEND_STRING(SS_LCTRL("g")); - return true; - break; - case CLOUD9_NAVIGATE: - SEND_STRING(SS_LCTRL("e")); - return true; - break; case WINDOWS10_WORKSPACE_LEFT: SEND_STRING(SS_LGUI(SS_LCTRL(SS_TAP(X_LEFT)))); return true; @@ -655,6 +651,9 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { case WINDOWS10_WORKSPACE_RIGHT: SEND_STRING(SS_LGUI(SS_LCTRL(SS_TAP(X_RIGHT)))); break; + case WINDOWS10_TASK_VIEW: + SEND_STRING(SS_LGUI(SS_TAP(X_TAB))); + break; } } @@ -686,6 +685,7 @@ void matrix_scan_user(void) { case KEYNAV: case KEYSEL: case SCREEN_NAV: + case VSCODE: ergodox_right_led_3_on(); break; case BROWSER_CONTROL: From 5f06fce2c5c003cae0cba88c5f152fbff4e072f6 Mon Sep 17 00:00:00 2001 From: Ryan Date: Mon, 22 Jun 2020 18:49:47 +1000 Subject: [PATCH 230/930] Fix info.json for Uni660 (#9489) --- keyboards/sirius/uni660/rev1/info.json | 105 +++++++++++++++++-- keyboards/sirius/uni660/rev2/ansi/info.json | 107 +++++++++++++++++-- keyboards/sirius/uni660/rev2/iso/info.json | 108 ++++++++++++++++++-- 3 files changed, 300 insertions(+), 20 deletions(-) diff --git a/keyboards/sirius/uni660/rev1/info.json b/keyboards/sirius/uni660/rev1/info.json index aa6b01cdf07f..a3be1976c726 100644 --- a/keyboards/sirius/uni660/rev1/info.json +++ b/keyboards/sirius/uni660/rev1/info.json @@ -1,12 +1,105 @@ { "keyboard_name": "Uni660", - "url": "", - "maintainer": "qmk", - "width": 19, - "height": 5, + "url": "", + "maintainer": "qmk", + "width": 19, + "height": 5, "layouts": { "LAYOUT": { - "layout": [{"label":"Esc", "x":0, "y":0}, {"label":"~", "x":1.5, "y":0}, {"label":"!", "x":2.5, "y":0}, {"label":"@", "x":3.5, "y":0}, {"label":"#", "x":4.5, "y":0}, {"label":"$", "x":5.5, "y":0}, {"label":"%", "x":6.5, "y":0}, {"label":"^", "x":7.5, "y":0}, {"label":"&", "x":9.5, "y":0}, {"label":"*", "x":10.5, "y":0}, {"label":"(", "x":11.5, "y":0}, {"label":")", "x":12.5, "y":0}, {"label":"_", "x":13.5, "y":0}, {"label":"+", "x":14.5, "y":0}, {"label":"Backspace", "x":15.5, "y":0, "w":2}, {"label":"Insert", "x":18, "y":0}, {"label":"F1", "x":0, "y":1}, {"label":"Tab", "x":1.5, "y":1, "w":1.5}, {"label":"Q", "x":3, "y":1}, {"label":"W", "x":4, "y":1}, {"label":"E", "x":5, "y":1}, {"label":"R", "x":6, "y":1}, {"label":"T", "x":7, "y":1}, {"label":"Y", "x":9, "y":1}, {"label":"U", "x":10, "y":1}, {"label":"I", "x":11, "y":1}, {"label":"O", "x":12, "y":1}, {"label":"P", "x":13, "y":1}, {"label":"{", "x":14, "y":1}, {"label":"}", "x":15, "y":1}, {"label":"|", "x":16, "y":1, "w":1.5}, {"label":"Delete", "x":18, "y":1}, {"label":"F2", "x":0, "y":2}, {"label":"Caps Lock", "x":1.5, "y":2, "w":1.75}, {"label":"A", "x":3.25, "y":2}, {"label":"S", "x":4.25, "y":2}, {"label":"D", "x":5.25, "y":2}, {"label":"F", "x":6.25, "y":2}, {"label":"G", "x":7.25, "y":2}, {"label":"H", "x":9.25, "y":2}, {"label":"J", "x":10.25, "y":2}, {"label":"K", "x":11.25, "y":2}, {"label":"L", "x":12.25, "y":2}, {"label":":", "x":13.25, "y":2}, {"label":"\"", "x":14.25, "y":2}, {"label":"Enter", "x":15.25, "y":2, "w":2.25}, {"label":"F3", "x":0, "y":3}, {"label":"Shift", "x":1.5, "y":3, "w":2.25}, {"label":"Z", "x":3.75, "y":3}, {"label":"X", "x":4.75, "y":3}, {"label":"C", "x":5.75, "y":3}, {"label":"V", "x":6.75, "y":3}, {"label":"B", "x":7.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":"Shift", "x":14.75, "y":3, "w":2.25}, {"label":"Up", "x":17, "y":3}, {"label":"F4", "x":0, "y":4}, {"label":"Ctrl", "x":1.5, "y":4, "w":1.25}, {"label":"Win", "x":2.75, "y":4, "w":1.25}, {"label":"Alt", "x":4, "y":4, "w":1.25}, {"x":5.25, "y":4, "w":2.25}, {"label":"Fn", "x":7.5, "y":4}, {"x":9.5, "y":4, "w":2.75}, {"label":"Alt", "x":12.25, "y":4, "w":1.25}, {"label":"Menu", "x":13.5, "y":4, "w":1.25}, {"label":"Ctrl", "x":14.75, "y":4, "w":1.25}, {"label":"Left", "x":16, "y":4}, {"label":"Down", "x":17, "y":4}, {"label":"Right", "x":18, "y":4}] + "layout": [ + {"x": 0, "y": 0}, + + {"x": 1.5, "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": 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": 0, "y": 1}, + + {"x": 1.5, "y": 1, "w": 1.5}, + {"x": 3, "y": 1}, + {"x": 4, "y": 1}, + {"x": 5, "y": 1}, + {"x": 6, "y": 1}, + {"x": 7, "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": 0, "y": 2}, + + {"x": 1.5, "y": 2, "w": 1.75}, + {"x": 3.25, "y": 2}, + {"x": 4.25, "y": 2}, + {"x": 5.25, "y": 2}, + {"x": 6.25, "y": 2}, + {"x": 7.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, "w": 2.25}, + + {"x": 0, "y": 3}, + + {"x": 1.5, "y": 3, "w": 2.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": 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": 2.25}, + + {"x": 17, "y": 3}, + + {"x": 0, "y": 4}, + + {"x": 1.5, "y": 4, "w": 1.25}, + {"x": 2.75, "y": 4, "w": 1.25}, + {"x": 4, "y": 4, "w": 1.25}, + {"x": 5.25, "y": 4, "w": 2.25}, + {"x": 7.5, "y": 4}, + + {"x": 9.5, "y": 4, "w": 2.75}, + {"x": 12.25, "y": 4, "w": 1.25}, + {"x": 13.5, "y": 4, "w": 1.25}, + {"x": 14.75, "y": 4, "w": 1.25}, + + {"x": 16, "y": 4}, + {"x": 17, "y": 4}, + {"x": 18, "y": 4} + ] } } -} \ No newline at end of file +} diff --git a/keyboards/sirius/uni660/rev2/ansi/info.json b/keyboards/sirius/uni660/rev2/ansi/info.json index 08d21d07755d..24050961cd0c 100644 --- a/keyboards/sirius/uni660/rev2/ansi/info.json +++ b/keyboards/sirius/uni660/rev2/ansi/info.json @@ -1,12 +1,105 @@ { - "keyboard_name": "Uni660", - "url": "", - "maintainer": "qmk", - "width": 19, - "height": 5, + "keyboard_name": "Uni660", + "url": "", + "maintainer": "qmk", + "width": 19, + "height": 5, "layouts": { "LAYOUT_ansi": { - "layout": [{"label":"Esc", "x":0, "y":0}, {"label":"~", "x":1.5, "y":0}, {"label":"!", "x":2.5, "y":0}, {"label":"@", "x":3.5, "y":0}, {"label":"#", "x":4.5, "y":0}, {"label":"$", "x":5.5, "y":0}, {"label":"%", "x":6.5, "y":0}, {"label":"^", "x":7.5, "y":0}, {"label":"&", "x":9.5, "y":0}, {"label":"*", "x":10.5, "y":0}, {"label":"(", "x":11.5, "y":0}, {"label":")", "x":12.5, "y":0}, {"label":"_", "x":13.5, "y":0}, {"label":"+", "x":14.5, "y":0}, {"label":"Backspace", "x":15.5, "y":0, "w":2}, {"label":"Insert", "x":18, "y":0}, {"label":"F1", "x":0, "y":1}, {"label":"Tab", "x":1.5, "y":1, "w":1.5}, {"label":"Q", "x":3, "y":1}, {"label":"W", "x":4, "y":1}, {"label":"E", "x":5, "y":1}, {"label":"R", "x":6, "y":1}, {"label":"T", "x":7, "y":1}, {"label":"Y", "x":9, "y":1}, {"label":"U", "x":10, "y":1}, {"label":"I", "x":11, "y":1}, {"label":"O", "x":12, "y":1}, {"label":"P", "x":13, "y":1}, {"label":"{", "x":14, "y":1}, {"label":"}", "x":15, "y":1}, {"label":"|", "x":16, "y":1, "w":1.5}, {"label":"Delete", "x":18, "y":1}, {"label":"F2", "x":0, "y":2}, {"label":"Caps Lock", "x":1.5, "y":2, "w":1.75}, {"label":"A", "x":3.25, "y":2}, {"label":"S", "x":4.25, "y":2}, {"label":"D", "x":5.25, "y":2}, {"label":"F", "x":6.25, "y":2}, {"label":"G", "x":7.25, "y":2}, {"label":"H", "x":9.25, "y":2}, {"label":"J", "x":10.25, "y":2}, {"label":"K", "x":11.25, "y":2}, {"label":"L", "x":12.25, "y":2}, {"label":":", "x":13.25, "y":2}, {"label":"\"", "x":14.25, "y":2}, {"label":"Enter", "x":15.25, "y":2, "w":2.25}, {"label":"F3", "x":0, "y":3}, {"label":"Shift", "x":1.5, "y":3, "w":2.25}, {"label":"Z", "x":3.75, "y":3}, {"label":"X", "x":4.75, "y":3}, {"label":"C", "x":5.75, "y":3}, {"label":"V", "x":6.75, "y":3}, {"label":"B", "x":7.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":"Shift", "x":14.75, "y":3, "w":2.25}, {"label":"Up", "x":17, "y":3}, {"label":"F4", "x":0, "y":4}, {"label":"Ctrl", "x":1.5, "y":4, "w":1.25}, {"label":"Win", "x":2.75, "y":4, "w":1.25}, {"label":"Alt", "x":4, "y":4, "w":1.25}, {"x":5.25, "y":4, "w":2.25}, {"label":"Fn", "x":7.5, "y":4}, {"x":9.5, "y":4, "w":2.75}, {"label":"Alt", "x":12.25, "y":4, "w":1.25}, {"label":"Menu", "x":13.5, "y":4, "w":1.25}, {"label":"Ctrl", "x":14.75, "y":4, "w":1.25}, {"label":"Left", "x":16, "y":4}, {"label":"Down", "x":17, "y":4}, {"label":"Right", "x":18, "y":4}] + "layout": [ + {"x": 0, "y": 0}, + + {"x": 1.5, "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": 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": 0, "y": 1}, + + {"x": 1.5, "y": 1, "w": 1.5}, + {"x": 3, "y": 1}, + {"x": 4, "y": 1}, + {"x": 5, "y": 1}, + {"x": 6, "y": 1}, + {"x": 7, "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": 0, "y": 2}, + + {"x": 1.5, "y": 2, "w": 1.75}, + {"x": 3.25, "y": 2}, + {"x": 4.25, "y": 2}, + {"x": 5.25, "y": 2}, + {"x": 6.25, "y": 2}, + {"x": 7.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, "w": 2.25}, + + {"x": 0, "y": 3}, + + {"x": 1.5, "y": 3, "w": 2.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": 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": 2.25}, + + {"x": 17, "y": 3}, + + {"x": 0, "y": 4}, + + {"x": 1.5, "y": 4, "w": 1.25}, + {"x": 2.75, "y": 4, "w": 1.25}, + {"x": 4, "y": 4, "w": 1.25}, + {"x": 5.25, "y": 4, "w": 2.25}, + {"x": 7.5, "y": 4}, + + {"x": 9.5, "y": 4, "w": 2.75}, + {"x": 12.25, "y": 4, "w": 1.25}, + {"x": 13.5, "y": 4, "w": 1.25}, + {"x": 14.75, "y": 4, "w": 1.25}, + + {"x": 16, "y": 4}, + {"x": 17, "y": 4}, + {"x": 18, "y": 4} + ] } } -} \ No newline at end of file +} diff --git a/keyboards/sirius/uni660/rev2/iso/info.json b/keyboards/sirius/uni660/rev2/iso/info.json index cd32c736905e..faaf217e9db0 100644 --- a/keyboards/sirius/uni660/rev2/iso/info.json +++ b/keyboards/sirius/uni660/rev2/iso/info.json @@ -1,12 +1,106 @@ { - "keyboard_name": "Uni660", - "url": "", - "maintainer": "qmk", - "width": 19, - "height": 5, + "keyboard_name": "Uni660", + "url": "", + "maintainer": "qmk", + "width": 19, + "height": 5, "layouts": { "LAYOUT_iso": { - "layout": [{"label":"Esc", "x":0, "y":0}, {"label":"\u00ac", "x":1.5, "y":0}, {"label":"!", "x":2.5, "y":0}, {"label":"\"", "x":3.5, "y":0}, {"label":"\u00a3", "x":4.5, "y":0}, {"label":"$", "x":5.5, "y":0}, {"label":"%", "x":6.5, "y":0}, {"label":"^", "x":7.5, "y":0}, {"label":"&", "x":9.5, "y":0}, {"label":"*", "x":10.5, "y":0}, {"label":"(", "x":11.5, "y":0}, {"label":")", "x":12.5, "y":0}, {"label":"_", "x":13.5, "y":0}, {"label":"+", "x":14.5, "y":0}, {"label":"Backspace", "x":15.5, "y":0, "w":2}, {"label":"Insert", "x":18, "y":0}, {"label":"F1", "x":0, "y":1}, {"label":"Tab", "x":1.5, "y":1, "w":1.5}, {"label":"Q", "x":3, "y":1}, {"label":"W", "x":4, "y":1}, {"label":"E", "x":5, "y":1}, {"label":"R", "x":6, "y":1}, {"label":"T", "x":7, "y":1}, {"label":"Y", "x":9, "y":1}, {"label":"U", "x":10, "y":1}, {"label":"I", "x":11, "y":1}, {"label":"O", "x":12, "y":1}, {"label":"P", "x":13, "y":1}, {"label":"{", "x":14, "y":1}, {"label":"}", "x":15, "y":1}, {"label":"Enter", "x":16.25, "y":1, "w":1.25, "h":2}, {"label":"Delete", "x":18, "y":1}, {"label":"F2", "x":0, "y":2}, {"label":"Caps Lock", "x":1.5, "y":2, "w":1.75}, {"label":"A", "x":3.25, "y":2}, {"label":"S", "x":4.25, "y":2}, {"label":"D", "x":5.25, "y":2}, {"label":"F", "x":6.25, "y":2}, {"label":"G", "x":7.25, "y":2}, {"label":"H", "x":9.25, "y":2}, {"label":"J", "x":10.25, "y":2}, {"label":"K", "x":11.25, "y":2}, {"label":"L", "x":12.25, "y":2}, {"label":":", "x":13.25, "y":2}, {"label":"@", "x":14.25, "y":2}, {"label":"~", "x":15.25, "y":2}, {"label":"F3", "x":0, "y":3}, {"label":"Shift", "x":1.5, "y":3, "w":1.25}, {"label":"|", "x":2.75, "y":3}, {"label":"Z", "x":3.75, "y":3}, {"label":"X", "x":4.75, "y":3}, {"label":"C", "x":5.75, "y":3}, {"label":"V", "x":6.75, "y":3}, {"label":"B", "x":7.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":"Shift", "x":14.75, "y":3, "w":2.25}, {"label":"Up", "x":17, "y":3}, {"label":"F4", "x":0, "y":4}, {"label":"Ctrl", "x":1.5, "y":4, "w":1.25}, {"label":"Win", "x":2.75, "y":4, "w":1.25}, {"label":"Alt", "x":4, "y":4, "w":1.25}, {"x":5.25, "y":4, "w":2.25}, {"label":"Fn", "x":7.5, "y":4}, {"x":9.5, "y":4, "w":2.75}, {"label":"Alt", "x":12.25, "y":4, "w":1.25}, {"label":"Menu", "x":13.5, "y":4, "w":1.25}, {"label":"Ctrl", "x":14.75, "y":4, "w":1.25}, {"label":"Left", "x":16, "y":4}, {"label":"Down", "x":17, "y":4}, {"label":"Right", "x":18, "y":4}] + "layout": [ + {"x": 0, "y": 0}, + + {"x": 1.5, "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": 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": 0, "y": 1}, + + {"x": 1.5, "y": 1, "w": 1.5}, + {"x": 3, "y": 1}, + {"x": 4, "y": 1}, + {"x": 5, "y": 1}, + {"x": 6, "y": 1}, + {"x": 7, "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.25, "y": 1, "w": 1.25, "h": 2}, + + {"x": 18, "y": 1}, + + {"x": 0, "y": 2}, + + {"x": 1.5, "y": 2, "w": 1.75}, + {"x": 3.25, "y": 2}, + {"x": 4.25, "y": 2}, + {"x": 5.25, "y": 2}, + {"x": 6.25, "y": 2}, + {"x": 7.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": 0, "y": 3}, + + {"x": 1.5, "y": 3, "w": 1.25}, + {"x": 2.75, "y": 3}, + {"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": 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": 2.25}, + + {"x": 17, "y": 3}, + + {"x": 0, "y": 4}, + + {"x": 1.5, "y": 4, "w": 1.25}, + {"x": 2.75, "y": 4, "w": 1.25}, + {"x": 4, "y": 4, "w": 1.25}, + {"x": 5.25, "y": 4, "w": 2.25}, + {"x": 7.5, "y": 4}, + + {"x": 9.5, "y": 4, "w": 2.75}, + {"x": 12.25, "y": 4, "w": 1.25}, + {"x": 13.5, "y": 4, "w": 1.25}, + {"x": 14.75, "y": 4, "w": 1.25}, + + {"x": 16, "y": 4}, + {"x": 17, "y": 4}, + {"x": 18, "y": 4} + ] } } -} \ No newline at end of file +} From 924573ece24589869831b7450468971c4dbe980a Mon Sep 17 00:00:00 2001 From: umi <57262844+umi-umi@users.noreply.github.com> Date: Mon, 22 Jun 2020 20:08:26 +0900 Subject: [PATCH 231/930] [Docs] Japanese translation of docs/feature_macros.md (#9137) * add feature_macros.md translation * update based on comment * update based on comment --- docs/ja/feature_macros.md | 399 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 399 insertions(+) create mode 100644 docs/ja/feature_macros.md diff --git a/docs/ja/feature_macros.md b/docs/ja/feature_macros.md new file mode 100644 index 000000000000..1204fa8ff2ea --- /dev/null +++ b/docs/ja/feature_macros.md @@ -0,0 +1,399 @@ +# マクロ + + + +マクロにより、1つのキーを押すだけで複数のキーストロークを送信することができます。QMK にはマクロを定義し使う方法が幾つかあります。これらはなんでもすることができます: よく使うフレーズの入力、コピーペースト、反復的なゲームの動き、あるいはコードを書くことさえ手助けします。 + +!> **セキュリティの注意**: マクロを使って、パスワード、クレジットカード番号、その他の機密情報のいずれも送信することが可能ですが、それは非常に悪い考えです。あなたのキーボードを手に入れた人は誰でもテキストエディタを開いてその情報にアクセスすることができます。 + +## 新しい方法: `SEND_STRING()` と `process_record_user` + +単語またはフレーズを入力するキーが欲しい時があります。最も一般的な状況のために `SEND_STRING()` を提供しています。これは文字列(つまり、文字のシーケンス)を入力します。簡単にキーコードに変換することができる全ての ASCII 文字がサポートされています (例えば、`\n\t`)。 + +以下は2キーのキーボードのための `keymap.c` の例です: + +```c +enum custom_keycodes { + QMKBEST = SAFE_RANGE, +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case QMKBEST: + if (record->event.pressed) { + // キーコード QMKBEST が押された時 + SEND_STRING("QMK is the best thing ever!"); + } else { + // キーコード QMKBEST が放された時 + } + break; + + } + return true; +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = { + {QMKBEST, KC_ESC} + } +}; +``` + +ここで起きることは以下の通りです: +最初に他のキーコードで使用されていない範囲で新しいカスタムキーコードを定義します。 +次に、`process_record_user` 関数を使います。これはキーが押されるか放されるたびに呼び出され、カスタムキーコードがアクティブかどうかを確認します。 +アクティブな場合、`SEND_STRING` マクロ (これは C プロセッサのマクロで、QMK のマクロと混同しないでください)を介して文字列 `"QMK is the best thing ever!"` をコンピュータに送信します。 +呼び出し元に、処理したばかりのキー押下を通常通り(機能を置き換えたり変更したりしなかったので)処理し続けるよう指示するため、`true` を返します。 +最後に、最初のボタンがマクロをアクティブにし、2番目のボタンが単なるエスケープボタンになるようにキーマップを定義します。 + +複数のマクロを追加することもできます。 +以下のように、別のキーコードを追加し、switch 文に別の case ラベルを追加することで、それを行うことができます: + +```c +enum custom_keycodes { + QMKBEST = SAFE_RANGE, + QMKURL, + MY_OTHER_MACRO +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case QMKBEST: + if (record->event.pressed) { + // キーコード QMKBEST が押された時 + SEND_STRING("QMK is the best thing ever!"); + } else { + // キーコード QMKBEST が放された時 + } + break; + case QMKURL: + if (record->event.pressed) { + // キーコード QMKURL が押された場合 + SEND_STRING("https://qmk.fm/\n"); + } else { + // キーコード QMKURL が放された場合 + } + break; + case MY_OTHER_MACRO: + if (record->event.pressed) { + SEND_STRING(SS_LCTL("ac")); // 全てを選択しコピーします + } + break; + } + return true; +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = { + {MY_CUSTOM_MACRO, MY_OTHER_MACRO} + } +}; +``` + +### 高度なマクロ + +`process_record_user()` 関数のほかに、`post_process_record_user()` 関数があります。これは `process_record` の後に実行され、キーストロークが送信された後の処理に使用できます。これは例えば、通常のキーの前に押され、通常のキーの後で放されるキーがほしい場合に便利です。 + +この例では、通常のキー入力を変更して、キーストロークが通常送信される前に `F22` が押されるようにし、キーが放された__後にのみ__ `F22` キーを放します。 + +```c +static uint8_t f22_tracker; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case KC_A ... KC_F21: // F22 をスキップする方法に注意してください + case KC_F23 ... KC_EXSEL: //exsel は修飾キーの直前のキーです + if (record->event.pressed) { + register_code(KC_F22); //これは F22 を押したことを送信することを意味します + f22_tracker++; + register_code(keycode); + return false; + } + break; + } + return true; +} + +void post_process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case KC_A ... KC_F21: // F22 をスキップする方法に注意してください + case KC_F23 ... KC_EXSEL: //exsel は修飾キーの直前のキーです + if (!record->event.pressed) { + f22_tracker--; + if (!f22_tracker) { + unregister_code(KC_F22); //これは F22 を放したことを送信することを意味します + } + } + break; + } +} +``` + + +### タップ、ダウン、アップ + +`Ctrl` あるいは `Home` など、ソースコードに文字列として表記できないキーをマクロで使うこともできます。 +以下のようにラップすることで任意のコードを送信することができます: + +* `SS_TAP()` キーを押して放します。 +* `SS_DOWN()` キーを押します (ただし、放しません)。 +* `SS_UP()` キーを放します。 + +例えば: + + SEND_STRING(SS_TAP(X_HOME)); + +`KC_HOME` をタップします - プリフィックスが `X_` で `KC_` ではないことに注意してください。以下のように、他の文字列と組み合わせることもできます: + + SEND_STRING("VE"SS_TAP(X_HOME)"LO"); + +これは "VE" に続けて `KC_HOME` をタップ、そして "LO" (新しい行の場合は "LOVE" と綴る)を送信します。 + +文字列に遅延を追加することもできます: + +* `SS_DELAY(msecs)` は指定されたミリ秒だけ遅らせます。 + +例えば: + + SEND_STRING("VE" SS_DELAY(1000) SS_TAP(X_HOME) "LO"); + +これは "VE" 、1秒の遅延、`KC_HOME` をタップ、"LO" (新しい行の場合は "LOVE" と綴るが、中間に遅延がある) を送信します。 + +使用できるモッドショートカットもいくつかあります: + +* `SS_LCTL(文字列)` +* `SS_LSFT(文字列)` +* `SS_LALT(文字列)`、`SS_LOPT(文字列)` +* `SS_LGUI(文字列)`、`SS_LCMD(文字列)`、`SS_LWIN(文字列)` +* `SS_RCTL(文字列)` +* `SS_RSFT(文字列)` +* `SS_RALT(文字列)`、`SS_ROPT(文字列)`、`SS_ALGR(文字列)` +* `SS_RGUI(文字列)`、`SS_RCMD(文字列)`、`SS_RWIN(文字列)` + +これらはそれぞれの修飾キーを押し、指定された文字列を送信してから、修飾キーを解放します。 +それらは以下のように使うことができます: + + SEND_STRING(SS_LCTL("a")); + +これは、左 Control +`a` (左 Control をダウンし、`a`、左 Control をアップ)を送信します - それらは文字列(例えば `"k"`)であり、`X_K` キーコードでは無いことに注意してください。 + +### 代替キーマップ + +デフォルトでは、QWERTY レイアウトの US キーマップを想定しています; それを変更したい場合(例えば OS がソフトウェア Colemak を使う場合)、キーマップのどこかに以下を含めます: + + #include + +### メモリ内の文字列 + +何らかの理由で文字列を操作していて、(リテラル、文字列定数の代わりに)生成したばかりのものを出力する必要がある場合は、以下のように `send_string()` を使うことができます: + +```c +char my_str[4] = "ok."; +send_string(my_str); +``` + +上で定義したショートカットは `send_string()` では動作しないですが、必要に応じて別の行に分けることができます: + +```c +char my_str[4] = "ok."; +SEND_STRING("I said: "); +send_string(my_str); +SEND_STRING(".."SS_TAP(X_END)); +``` + + +## 高度なマクロ関数 + +マクロの生成に役立つ関数が幾つかあります。マクロの中にかなり高度なコードを書くことができますが、機能が複雑になりすぎる場合は、代わりにカスタムキーコードを定義することをお勧めします。マクロはシンプルにしなければなりません。 + +?> 追加の機能として、[便利な関数](ja/ref_functions.md) の中で説明される関数を使うこともできます。例えば `reset_keyboard()` によりマクロの一部としてキーボードをリセットすることができます。 + +### `record->event.pressed` + +これでスイッチが押されているか放されているかどうかをテストすることができます。以下が例です。 + +```c + if (record->event.pressed) { + // キーダウン時 + } else { + // キーアップ時 + } +``` + +### `register_code();` + +これはコンピュータに `` キーダウンイベントを送信します。例として `KC_ESC`、`KC_C`、`KC_4` や、`KC_LSFT` と `KC_LGUI` のような修飾キーなどもあります。 + +### `unregister_code();` + +`register_code` 関数と対応して、これは `` キーアップイベントをコンピュータに送信します。これを使わない場合、キーは送信されるまで押し続けられます。 + +### `tap_code();` + +これは `register_code()` を送信し、その後 `unregister_code()` を送信します。押下とリリースイベントの両方を送信する場合に便利です (押し続けるのではなく、キーを"タップ"する)。 + +タップの登録(解除)に問題がある場合、`config.h` ファイルで `#define TAP_CODE_DELAY 100` を設定することで、登録イベントと解除イベントの間に遅延を追加することができます。値はミリ秒です。 + +### `register_code16();`、`unregister_code16();`、`tap_code16();` + +これらの関数は対応する通常の関数と同様に機能しますが、修飾キーで修飾されたキーコードを使うことができます (Shift、Alt、Control、GUI を適用)。 + +例えば、修飾キーを押して(`register_code()`して)、キーコードを押す(`register_code()`する)代わりに、`register_code16(S(KC_5));` を使うことができます。 + +### `clear_keyboard();` + +これは現在押されている全ての修飾キーとキーをクリアします。 + +### `clear_mods();` + +これは現在押されている全ての修飾キーをクリアします。 + +### `clear_keyboard_but_mods();` + +これは現在押されている修飾キー以外の全てのキーをクリアします。 + +## 高度な例: + +### スーパー ALT↯TAB + +このマクロは `KC_LALT` を登録し、`KC_TAB` をタップして、1000ms 待ちます。キーが再度タップされると、別の `KC_TAB` が送信されます; タップが無い場合、`KC_LALT` が登録解除され、ウィンドウを切り替えることができます。 + +```c +bool is_alt_tab_active = false; # keymap.c の先頭付近にこれを追加します +uint16_t alt_tab_timer = 0; # すぐにそれらを使います + +enum custom_keycodes { # 素晴らしいキーコードを用意してください + ALT_TAB = SAFE_RANGE, +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { # これはキーコードを利用したつまらない作業のほとんどを行います。 + 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; +} + +void matrix_scan_user(void) { # とても重要なタイマー + if (is_alt_tab_active) { + if (timer_elapsed(alt_tab_timer) > 1000) { + unregister_code(KC_LALT); + is_alt_tab_active = false; + } + } +} +``` + +--- + +## **(非推奨)** 古い方法: `MACRO()` と `action_get_macro` + +!> これは TMK から継承されており、更新されていません - 代わりに `SEND_STRING` と `process_record_user` を使うことをお勧めします。 + +デフォルトでは、QMK はマクロが無いことを前提としています。マクロを定義するには、`action_get_macro()` 関数を作成します。例えば: + +```c +const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { + if (record->event.pressed) { + switch(id) { + case 0: + return MACRO(D(LSFT), T(H), U(LSFT), T(I), D(LSFT), T(1), U(LSFT), END); + case 1: + return MACRO(D(LSFT), T(B), U(LSFT), T(Y), T(E), D(LSFT), T(1), U(LSFT), END); + } + } + return MACRO_NONE; +}; +``` + +これは割り当てられているキーが押された時に実行される2つのマクロを定義します。キーが放された時にそれらを実行したい場合は、if 文を変更することができます。 + + if (!record->event.pressed) { + +### マクロコマンド + +マクロは以下のコマンドを含めることができます: + +* I() はストロークの間隔をミリ秒単位で変更します。 +* D() はキーを押します。 +* U() はキーを放します。 +* T() はキーをタイプ(押して放す)します。 +* W() は待ちます (ミリ秒)。 +* END 終了マーク。 + +### マクロをキーにマッピングする + +マクロを呼び出すにはキーマップ内で `M()` 関数を使います。例えば、2キーのキーボードのキーマップは以下の通りです: + +```c +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT( + M(0), M(1) + ), +}; + +const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { + if (record->event.pressed) { + switch(id) { + case 0: + return MACRO(D(LSFT), T(H), U(LSFT), T(I), D(LSFT), T(1), U(LSFT), END); + case 1: + return MACRO(D(LSFT), T(B), U(LSFT), T(Y), T(E), D(LSFT), T(1), U(LSFT), END); + } + } + return MACRO_NONE; +}; +``` + +左側のキーを押すと、"Hi!" を入力し、右側のキーを押すと "Bye!" を入力します。 + +### マクロに名前を付ける + +キーマップを読みやすくしながらキーマップから参照したいマクロがたくさんある場合は、ファイルの先頭で `#define` を使って名前を付けることができます。 + +```c +#define M_HI M(0) +#define M_BYE M(1) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT( + M_HI, M_BYE + ), +}; +``` + + +## 高度な例: + +### 単一キーのコピーと貼り付け + +この例は、押された時に `Ctrl-C` を送信し、放される時に `Ctrl-V` を送信するマクロを定義します。 + +```c +const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { + switch(id) { + case 0: { + if (record->event.pressed) { + return MACRO( D(LCTL), T(C), U(LCTL), END ); + } else { + return MACRO( D(LCTL), T(V), U(LCTL), END ); + } + break; + } + } + return MACRO_NONE; +}; +``` From c7cc20918b0048184d489d691ba60ce9316c15bb Mon Sep 17 00:00:00 2001 From: umi <57262844+umi-umi@users.noreply.github.com> Date: Mon, 22 Jun 2020 20:11:49 +0900 Subject: [PATCH 232/930] [Docs] Japanese translation of docs/feature_userspace.md (#9253) * add feature_userspace.md translation * update based on comment --- docs/ja/feature_userspace.md | 260 +++++++++++++++++++++++++++++++++++ 1 file changed, 260 insertions(+) create mode 100644 docs/ja/feature_userspace.md diff --git a/docs/ja/feature_userspace.md b/docs/ja/feature_userspace.md new file mode 100644 index 000000000000..69381324717e --- /dev/null +++ b/docs/ja/feature_userspace.md @@ -0,0 +1,260 @@ +# ユーザスペース: キーマップ間でのコードの共有 + + + +似たキーマップを複数のキーボードで使う場合、それらの間でコードを共有できるという利点が得られることがあります。`users/`に以下の構造でキーマップ(理想的には GitHub のユーザ名、``)と同じ名前の独自のフォルダを作成します: + +* `/users//` (パスに自動的に追加されます) + * `readme.md` (オプション、推奨) + * `rules.mk` (自動的に含まれます) + * `config.h` (自動的に含まれます) + * `.h` (オプション) + * `.c` (オプション) + * `cool_rgb_stuff.c` (オプション) + * `cool_rgb_stuff.h` (オプション) + + +以下のように、`` という名前のキーマップをビルドする時のみ、これが全て起きます: + + make planck: + +例えば、 + + make planck:jack + +は、`/users/jack/rules.mk` に加えて、パスに `/users/jack/` フォルダを含めます。 + +!> この `name` は必要に応じて[上書き](#override-default-userspace)することができます。 + +## `Rules.mk` + +`rules.mk` は自動的に処理される2つファイルのうちの1つです。これにより、コンパイル時に追加のソースファイル( `.c` など)を追加できます。 + +追加されるデフォルトのソースファイルとして `.c` を使うことを強くお勧めします。それを追加するために、以下のように `rules.mk` に SRC を追加する必要があります: + + SRC += .c + +追加のファイルも同じ方法で追加できます - ただし、``.c/.h という名前のファイルを最初に用意することをお勧めします。 + +ビルド時に `/users//rules.mk` ファイルはキーマップの `rules.mk` の_後_でインクルードされます。これにより、キーボードによっては利用できないことのある個々の QMK 機能を利用する機能をユーザスペース `rules.mk` に持つことができます。 + +例えば、RGB ライトをサポートする全てのキーボード間で RGB 制御機能を共有する場合、RGBLIGHT 機能が有効であればサポートを追加することができます: +```make +ifeq ($(strip $(RGBLIGHT_ENABLE)), yes) + # ここにファンシーな rgb 関数のソースを含める + SRC += cool_rgb_stuff.c +endif +``` + +別のやり方として、キーマップの `rules.mk` で `define RGB_ENABLE` と定義し、以下のようにユーザスペースの `rules.mk` で変数をチェックすることができます: +```make +ifdef RGB_ENABLE + # ここにファンシーな rgb 関数のソースを含める + SRC += cool_rgb_stuff.c +endif +``` + +### デフォルトのユーザスペースの上書き :id=override-default-userspace + +デフォルトでは、使用されるユーザスペース名はキーマップ名と同じです。状況によってはこれは望ましくありません。例えば、[レイアウト](ja/feature_layouts.md)機能を使う場合、異なるキーマップに同じ名前 (例えば、ANSI および ISO) を使うことができません。レイアウトに `mylayout-ansi` や `mylayout-iso` という名前を付け、以下の行をレイアウトの `rules.mk` に追加します: + +``` +USER_NAME := mylayout +``` + +これは、基板上に物理的に異なる機能を備えた、複数の異なるキーボード(RGBライトを備えたキーボード、オーディオを備えたキーボード、LEDの数が異なる、コントローラ上の異なるPINに接続されているなど)がある場合にも役立ちます。 + +## 設定オプション (`config.h`) + +さらに、ここにある `config.h` はキーマップフォルダ内の同名のファイルと同じように処理されます。これは `.h` ファイルとは別個に処理されます。 + +この理由は、`.h` は (`#define TAPPING_TERM 100` などのような)設定を追加する時には追加されず、`config.h` ファイル内の `` ファイルを含めるとコンパイルの問題を引き起こすからです。 + +!>`config.h` は[設定オプション](ja/config_options.md)のために使い、`.h` ファイルはユーザあるいは(レイヤーあるいはキーコードのための enum のような)キーマップ固有の設定のために使うべきです + + +## Readme (`readme.md`) + +作者情報 (あなたの名前、GitHub ユーザ名、eメール)およびオプションで[GPL 互換のライセンス](https://www.gnu.org/licenses/license-list.html#GPLCompatibleLicenses)を含めてください。 + +以下をテンプレートとして使うことができます: +``` +Copyright @ + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +``` + +年、名前、eメールおよび GitHub ユーザ名をあなたの情報に置き換えます。 + +さらに、コードを他の人に共有したい場合、ここはコードを文章化するのに適した場所です。 + +## 特定のキーマップをサポートする全てのキーボードをビルドする + +1つのコマンドで全てのキーマップのビルドを確認したいですか?以下で実行することができます: + + make all: + +例えば、 + + make all:jack + +これは、[_プルリクエスト_](https://github.com/qmk/qmk_firmware/pulls) を準備する時に全てが正常にコンパイルされることを確認したい場合に最適です。 + +## 例 + +簡単な例については、[`/users/_example/`](https://github.com/qmk/qmk_firmware/tree/master/users/drashna) を調べてください。 +より複雑な例については、[`/users/drashna/`](https://github.com/qmk/qmk_firmware/tree/master/users/drashna) のユーザスペースを調べてください。 + + +### カスタマイズされた関数 :id=customized-functions + +QMK には、[`_quantum`、`_kb` および `_user` バージョン](ja/custom_quantum_functions.md#a-word-on-core-vs-keyboards-vs-keymap)を持つ使用可能な[関数](custom_quantum_functions.md)が山ほどあります。 ほとんどの場合、これらの関数のユーザバージョンを使う必要があります。しかし問題はそれらをユーザスペースで使う場合、キーマップで使うことができるバージョンが無いことです。 + +しかし、実際にはキーマップバージョンのサポートを追加し、ユーザスペースとキーマップの両方で使うことができます。 + + +例えば、`layer_state_set_user()` 関数を見てみましょう。全てのキーボードで [Tri Layer State](ja/ref_functions.md#olkb-tri-layers) 機能を有効にしながら、`keymap.c` ファイルで Tri Layer 機能を保持することができます。 + +`` ファイル内で、以下を追加する必要があります: +```c +__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, 2, 3, 5); + return layer_state_set_keymap (state); +} +``` +`__attribute__ ((weak))` 部分は、コンパイラにこれが `keymap.c` 内のバージョンに置き換えられるプレースホルダ関数であることを伝えます。そうすれば、`keymap.c` に追加する必要はありませんが、追加しても関数が同じ名前を持つため競合することはありません。 + +ここでの `_keymap` 部分は重要では無く、`_quantum`、`_kb` あるいは `_user` は既に使われているため、それら以外のものである必要があります。`layer_state_set_mine`、`layer_state_set_fn` などを使うことができます。 + +[`users/drashna`](https://github.com/qmk/qmk_firmware/tree/master/users/drashna) 内の [`template.c`](https://github.com/qmk/qmk_firmware/blob/master/users/drashna/template.c) でこのリストと他の一般的な関数を見つけることができます。 + +### カスタム機能 + +ユーザスペース機能は膨大な数のキーボードをサポートすることができるため、特定の機能は有効にしたいが、他のキーボードでは有効にしたくないかもしれません。そして実際に自分のユーザスペースで有効あるいは無効にすることができる「機能」を作成することができます。 + +例えば、(スペースを節約するために)特定のキーボードでのみたくさんのマクロを利用したい場合、それらを `#ifdef MACROS_ENABLED` して「見えないように」してから、キーボードごとに有効にすることができます。これを行うには、以下を rules.mk に追加します。 +```make +ifeq ($(strip $(MACROS_ENABLED)), yes) + OPT_DEFS += -DMACROS_ENABLED +endif +``` +`OPT_DEFS` 設定は `MACROS_ENABLED` がキーボード用に定義されるようにし(名前の前に `-D` があることに注意してください)、c/h ファイルで状態をチェックするために `#ifdef MACROS_ENABLED` を使うことができ、それに基づいてそのコードを処理します。 + +次にキーマップの `rules.mk` に `MACROS_ENABLED = yes` を追加し、ユーザスペースでこの機能とコードを有効にします。 + +そして `process_record_user` 関数の中で、以下のようなことを行います: +```c +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { +#ifdef MACROS_ENABLED + case MACRO1: + if (!record->event.pressed) { + SEND_STRING("This is macro 1!"); + } + break; + case MACRO2: + if (!record->event.pressed) { + SEND_STRING("This is macro 2!"); + } + break; +#endif + } + return true; +} +``` + + +### 結合マクロ + +全てのキーマップについてユーザスペースにマクロやそのほかの関数を統合したい場合は、そうすることができます。これは上記の[カスタマイズ関数](#customized-functions)の例に基づいています。これは異なるキーボード間で共有される大量のマクロを維持し、キーボード固有のマクロも可能です。 + +最初に、全ての `keymap.c` ファイルを調べ、代わりに `process_record_user` を `process_record_keymap` に置き換えます。この方法では、これらのキーボードでキーボード固有のコードを使用でき、カスタムの "global" キーコードも使うことができます。また、`SAFE_RANGE` を `NEW_SAFE_RANGE` に置き換えて、キーコードが重複しないようにすることもできます。 + +次に、全ての keymap.c ファイルに `#include ` を追加します。これにより、各キーマップでそれらを再定義することなく新しいキーコードを使うことができます。 + +それが完了したら、必要なキーコードの定義を `.h` ファイルに設定します。例えば: +```c +#pragma once + +#include "quantum.h" +#include "action.h" +#include "version.h" + +// 全てを定義 +enum custom_keycodes { + KC_MAKE = SAFE_RANGE, + NEW_SAFE_RANGE // キーマップ固有のコードについては "NEW_SAFE_RANGE" を使用 +}; +``` + +ここで、`.c` ファイルを作成し、この内容をそれに追加します: + +```c +#include ".h" + +__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: // ファームウェアをコンパイルし、キーボードのブートローダに基づく書き込みコマンドを追加します + 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; + + } + return process_record_keymap(keycode, record); +} +``` + +(マクロパッドのような) Shift ボタンを持たないキーボードについては、ブートローダオプションを常に含める方法が必要です。これを行うには、以下をユーザスペースフォルダ内の `rules.mk` に追加します: + +```make +ifeq ($(strip $(FLASH_BOOTLOADER)), yes) + OPT_DEFS += -DFLASH_BOOTLOADER +endif +``` + +これは任意のキーマップで使うことができる新しい `KC_MAKE` キーコードを追加します。そして、このキーコードは、`make :` を出力するため、頻繁なコンパイルを簡単にします。そして、これは現在のキーボードの情報を出力するため、全てのキーボードとキーマップで動作します。そのため毎回これを入力する必要はありません。 + +また、Shift を押したままにすると書き込みの対象 (`:flash`) をコマンドに追加します。Control を押したままにすると、複数のファイルを一度に処理することでコンパイル時間を短縮する幾つかのコマンドを追加します。 + +そして Shift キーが無いキーボード、あるいは常に書き込みを試したいキーボードについては、キーマップの `rules.mk` に `FLASH_BOOTLOADER = yes` を追加することができます。 + +?> これはブートローダの設定に基づいて正しいユーティリティを使って新しくコンパイルされたファームウェアを自動的に書き込むはずです (あるいはデフォルトで HEX ファイルを生成するだけ)。ただし、これは全てのシステムで動作するわけではないことに注意してください。はっきり言うと、AVRDUDE は WSL では動作しません。そして、これは BootloadHID あるいは mdloader をサポートしません。 From 58af0305f57baa83d7233ff5eee1930396989fca Mon Sep 17 00:00:00 2001 From: Takeshi ISHII <2170248+mtei@users.noreply.github.com> Date: Mon, 22 Jun 2020 20:13:01 +0900 Subject: [PATCH 233/930] [Update] Japanese translation of newbs.md (#9388) * update docs/ja/newbs.md * Update docs/ja/newbs.md Co-authored-by: shela * Update docs/ja/newbs.md Co-authored-by: shela * Update docs/ja/newbs.md Co-authored-by: shela Co-authored-by: shela --- docs/ja/newbs.md | 45 ++++++++++++++++++++++++++------------------- 1 file changed, 26 insertions(+), 19 deletions(-) diff --git a/docs/ja/newbs.md b/docs/ja/newbs.md index 465b82106d27..b582bc425672 100644 --- a/docs/ja/newbs.md +++ b/docs/ja/newbs.md @@ -2,40 +2,47 @@ -QMK は、メカニカルキーボード用の強力なオープンソースファームウェアです。 -QMK を使用して、シンプルかつ強力な方法でキーボードをカスタマイズできます。 -完全な初心者からプログラマーに至るまで、あらゆるスキルレベルの人々が QMK を使用してキーボードをカスタマイズしています。 -このガイドは、あなたのスキルにかかわらず、同じことを行う手助けをします。 +キーボードには、コンピュータ入っているものと似たようなプロセッサが入っています。 +このプロセッサでは、キーボードのボタンの押し下げの検出を担当し、キーが押されたときにコンピュータに通知するソフトウェアが動作しています。 +QMK Firmware は、そのソフトウェアの役割を果たし、ボタンの押下を検出しその情報をホストコンピュータに渡します。 +カスタムキーマップを作るということは、キーボード上で動くプログラムを作るということなのです。 + +QMK は、簡単なことは簡単に、そして、難しいことを可能なことにすることで、あなたの手にたくさんのパワーをもたらします。 +パワフルなキーマップを作るためにプログラムを作成する方法を知る必要はありません。いくつかのシンプルな文法に従うだけで OK です。 お使いのキーボードで QMK を実行できるかどうか不明ですか? もし作成したキーボードがメカニカルキーボードの場合、実行できる可能性が高いです。 -QMK は[多くの趣味のキーボード](http://qmk.fm/keyboards/)をサポートしているため、もし現在のキーボードで QMK を実行できない場合でも、ニーズに合ったキーボードを見つけるのに問題はないはずです。 +QMK は[多くの趣味のキーボード](http://qmk.fm/keyboards/)をサポートしています。 +現在使用しているキーボードが QMK を実行できない場合、QMK を実行できるキーボードの選択肢はたくさんあります。 + +## このガイドは私のためにあるのでしょうか? + +このガイドは、ソースコードを使ってキーボードのファームウェアを構築したいと考えている人に適しています。 +もしあなたがすでにプログラマーであれば、このプロセスはとても身近で簡単に理解できるでしょう。 +もし、プログラミングの考え方に抵抗があるのであれば、代わりに[私たちのオンラインGUI](ja/newbs_building_firmware_configurator.md)を見てみてください。 ## 概要 -このガイドには7つの主要なセクションがあります。 +このガイドには4つの主要なセクションがあります。 -* [はじめに](ja/newbs_getting_started.md) -* [コマンドラインを使用して初めてのファームウェアを構築する](ja/newbs_building_firmware.md) -* [オンライン GUI を使用して初めてのファームウェアを構築する](ja/newbs_building_firmware_configurator.md) -* [ファームウェアを書きこむ](ja/newbs_flashing.md) -* [テストとデバッグ](ja/newbs_testing_debugging.md) -* [QMK における Git 運用作法](ja/newbs_git_best_practices.md) -* [さらに学ぶための学習リソース](ja/newbs_learn_more_resources.md) +1. [環境設定](ja/newbs_getting_started.md) +2. [コマンドラインを使用して初めてのファームウェアを構築する](ja/newbs_building_firmware.md) +3. [ファームウェアを書きこむ](ja/newbs_flashing.md) +4. [テストとデバッグ](ja/newbs_testing_debugging.md) このガイドは、これまでソフトウェアをコンパイルしたことがない人を支援することに特化しています。 その観点から選択と推奨を行います。 これらの手順の多くには代替方法があり、これらの代替方法のほとんどをサポートしています。 タスクを達成する方法について疑問がある場合は、[案内を求めることができます](ja/getting_started_getting_help.md)。 -## 追加のリソース(英語) +## 追加のリソース -* [Thomas Baart's QMK Basics Blog](https://thomasbaart.nl/category/mechanical-keyboards/firmware/qmk/qmk-basics/) – 新規ユーザ視点から見た QMK ファームウェアの基本的な使用方法をカバーしたユーザ作成のブログ。 +このガイドの他にも、QMK の学習に役立つリソースがいくつかあります。[学習リソース](ja/newbs_learn_more_resources.md)のページにまとめました。 -## 追加のリソース(日本語) +## オープンソース -_日本語のリソース情報を募集中です。_ +QMKは GNU General Public License でリリースされているオープンソース・ソフトウェアです。 From 1ab8f969f6a8a804241a64a8df40c49daab409a7 Mon Sep 17 00:00:00 2001 From: Takeshi ISHII <2170248+mtei@users.noreply.github.com> Date: Mon, 22 Jun 2020 20:24:33 +0900 Subject: [PATCH 234/930] [Update] Japanese Translation of docs/faq_build.md (#9458) * update docs/ja/faq_build.md * update docs/ja/faq_build.md to 0.9.10 * Update docs/ja/faq_build.md Co-authored-by: shela Co-authored-by: shela --- docs/ja/faq_build.md | 46 ++++++++++++++++---------------------------- 1 file changed, 17 insertions(+), 29 deletions(-) diff --git a/docs/ja/faq_build.md b/docs/ja/faq_build.md index 9b4ce12a4863..2b63cef85a9b 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)ガイドを読むべきです。 @@ -32,33 +32,30 @@ sudo udevadm trigger **/etc/udev/rules.d/50-atmel-dfu.rules:** ``` # Atmel ATMega32U4 -SUBSYSTEMS=="usb", ATTRS{idVendor}=="03eb", ATTRS{idProduct}=="2ff4", MODE:="0666" +SUBSYSTEMS=="usb", ATTRS{idVendor}=="03eb", ATTRS{idProduct}=="2ff4", TAG+="uaccess", RUN{builtin}+="uaccess" # Atmel USBKEY AT90USB1287 -SUBSYSTEMS=="usb", ATTRS{idVendor}=="03eb", ATTRS{idProduct}=="2ffb", MODE:="0666" +SUBSYSTEMS=="usb", ATTRS{idVendor}=="03eb", ATTRS{idProduct}=="2ffb", TAG+="uaccess", RUN{builtin}+="uaccess" # Atmel ATMega32U2 -SUBSYSTEMS=="usb", ATTRS{idVendor}=="03eb", ATTRS{idProduct}=="2ff0", MODE:="0666" +SUBSYSTEMS=="usb", ATTRS{idVendor}=="03eb", ATTRS{idProduct}=="2ff0", TAG+="uaccess", RUN{builtin}+="uaccess" ``` -**/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" +SUBSYSTEMS=="usb", ATTRS{idVendor}=="1c11", ATTRS{idProduct}=="b007", TAG+="uaccess", RUN{builtin}+="uaccess" ``` **/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" +SUBSYSTEMS=="usb", ATTRS{idVendor}=="2a03", ATTRS{idProduct}=="0036", TAG+="uaccess", RUN{builtin}+="uaccess", ENV{ID_MM_DEVICE_IGNORE}="1" +SUBSYSTEMS=="usb", ATTRS{idVendor}=="2341", ATTRS{idProduct}=="0036", TAG+="uaccess", RUN{builtin}+="uaccess", ENV{ID_MM_DEVICE_IGNORE}="1" +SUBSYSTEMS=="usb", ATTRS{idVendor}=="1b4f", ATTRS{idProduct}=="9205", TAG+="uaccess", RUN{builtin}+="uaccess", ENV{ID_MM_DEVICE_IGNORE}="1" +SUBSYSTEMS=="usb", ATTRS{idVendor}=="1b4f", ATTRS{idProduct}=="9203", TAG+="uaccess", RUN{builtin}+="uaccess", ENV{ID_MM_DEVICE_IGNORE}="1" ``` -**注意:** ModemManager フィルタリングは厳格モードでは無い場合のみ動作します。以下のコマンドでその設定を変更することができます: +**注意:** 古い(1.12以前の) ModemManager では、フィルタリングは厳密なモードではない場合にのみ動作し、以下のコマンドはその設定を更新することができます。 ```console sudo sed -i 's/--filter-policy=strict/--filter-policy=default/' /lib/systemd/system/ModemManager.service sudo systemctl daemon-reload @@ -68,15 +65,15 @@ sudo systemctl restart ModemManager **/etc/udev/rules.d/56-dfu-util.rules:** ``` # stm32duino -SUBSYSTEMS=="usb", ATTRS{idVendor}=="1eaf", ATTRS{idProduct}=="0003", MODE:="0666" +SUBSYSTEMS=="usb", ATTRS{idVendor}=="1eaf", ATTRS{idProduct}=="0003", TAG+="uaccess", RUN{builtin}+="uaccess" # Generic stm32 -SUBSYSTEMS=="usb", ATTRS{idVendor}=="0483", ATTRS{idProduct}=="df11", MODE:="0666" +SUBSYSTEMS=="usb", ATTRS{idVendor}=="0483", ATTRS{idProduct}=="df11", TAG+="uaccess", RUN{builtin}+="uaccess" ``` **/etc/udev/rules.d/57-bootloadhid.rules:** ``` # bootloadHID -SUBSYSTEMS=="usb", ATTRS{idVendor}=="16c0", ATTRS{idProduct}=="05df", MODE:="0666" +SUBSYSTEMS=="usb", ATTRS{idVendor}=="16c0", ATTRS{idProduct}=="05df", TAG+="uaccess", RUN{builtin}+="uaccess" ``` ### Linux のブートローダモードで Serial デバイスが検知されない @@ -116,23 +113,14 @@ 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 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@8 -brew install dfu-programmer -brew install dfu-util -brew install arm-gcc-bin@8 -brew install avrdude +brew rm avr-gcc avr-gcc@8 dfu-programmer dfu-util gcc-arm-none-eabi arm-gcc-bin@8 avrdude qmk +brew install qmk/qmk/qmk brew link --force avr-gcc@8 brew link --force arm-gcc-bin@8 ``` From 24b0cda3e877c28c53c1aca02ef6e0eaa66fad91 Mon Sep 17 00:00:00 2001 From: Josh Hinnebusch Date: Mon, 22 Jun 2020 15:25:56 -0400 Subject: [PATCH 235/930] [Keyboard] add h60 PCB (#9242) * add h60 initial files * add h60 image * updated per PR request * Update keyboards/hineybush/h60/keymaps/default/keymap.c * Update keyboards/hineybush/h60/keymaps/kei/keymap.c * Update keyboards/hineybush/h60/keymaps/via/keymap.c * Update keyboards/hineybush/h60/h60.h * Update keyboards/hineybush/h60/h60.h * Update keyboards/hineybush/h60/rules.mk --- keyboards/hineybush/h60/config.h | 89 ++++++++++++++ keyboards/hineybush/h60/h60.c | 31 +++++ keyboards/hineybush/h60/h60.h | 111 ++++++++++++++++++ .../hineybush/h60/keymaps/default/keymap.c | 28 +++++ .../hineybush/h60/keymaps/default/readme.md | 1 + keyboards/hineybush/h60/keymaps/kei/keymap.c | 26 ++++ keyboards/hineybush/h60/keymaps/kei/readme.md | 1 + keyboards/hineybush/h60/keymaps/via/keymap.c | 40 +++++++ keyboards/hineybush/h60/keymaps/via/readme.md | 1 + keyboards/hineybush/h60/keymaps/via/rules.mk | 1 + keyboards/hineybush/h60/readme.md | 15 +++ keyboards/hineybush/h60/rules.mk | 25 ++++ 12 files changed, 369 insertions(+) create mode 100644 keyboards/hineybush/h60/config.h create mode 100644 keyboards/hineybush/h60/h60.c create mode 100644 keyboards/hineybush/h60/h60.h create mode 100644 keyboards/hineybush/h60/keymaps/default/keymap.c create mode 100644 keyboards/hineybush/h60/keymaps/default/readme.md create mode 100644 keyboards/hineybush/h60/keymaps/kei/keymap.c create mode 100644 keyboards/hineybush/h60/keymaps/kei/readme.md create mode 100644 keyboards/hineybush/h60/keymaps/via/keymap.c create mode 100644 keyboards/hineybush/h60/keymaps/via/readme.md create mode 100644 keyboards/hineybush/h60/keymaps/via/rules.mk create mode 100644 keyboards/hineybush/h60/readme.md create mode 100644 keyboards/hineybush/h60/rules.mk diff --git a/keyboards/hineybush/h60/config.h b/keyboards/hineybush/h60/config.h new file mode 100644 index 000000000000..ef14fdd4f89e --- /dev/null +++ b/keyboards/hineybush/h60/config.h @@ -0,0 +1,89 @@ +/* +Copyright 2020 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 0xEBBE +#define DEVICE_VER 0x0001 +#define MANUFACTURER hineybush keyboards +#define PRODUCT h60 +#define DESCRIPTION A 60% PCB. + +/* key matrix size */ +#define MATRIX_ROWS 5 +#define MATRIX_COLS 14 + +#define MATRIX_ROW_PINS { B6, B5, B4, D7, E6 } +#define MATRIX_COL_PINS { B3, D0, D1, D2, D3, D5, D6, C7, F0, F1, F4, F5, F6, F7 } +#define UNUSED_PINS + +/* COL2ROW, ROW2COL*/ +#define DIODE_DIRECTION COL2ROW + +#define BACKLIGHT_PIN B7 +#define BACKLIGHT_BREATHING +#define BACKLIGHT_LEVELS 3 + +// leaving this here if I decide to add RGB down the line + +// #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 + +/* 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 */ +#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/hineybush/h60/h60.c b/keyboards/hineybush/h60/h60.c new file mode 100644 index 000000000000..c3f13824796f --- /dev/null +++ b/keyboards/hineybush/h60/h60.c @@ -0,0 +1,31 @@ +/* Copyright 2020 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 "h60.h" + +void matrix_init_kb(void) { + // put your keyboard start-up code here + // runs once when the firmware starts up + setPinOutput(C6); +} + +bool led_update_kb(led_t led_state) { + if(led_update_user(led_state)) { + writePin(C6, !led_state.caps_lock); + } + return true; +} + diff --git a/keyboards/hineybush/h60/h60.h b/keyboards/hineybush/h60/h60.h new file mode 100644 index 000000000000..0a19ffbf3bd1 --- /dev/null +++ b/keyboards/hineybush/h60/h60.h @@ -0,0 +1,111 @@ +/* Copyright 2020 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, k113, \ + k100, k101, k102, k103, k104, k105, k106, k107, k108, k109, k110, k111, k112, k213, \ + k200, k201, k202, k203, k204, k205, k206, k207, k208, k209, k210, k211, k212, \ + k300, k301, k302, k303, k304, k305, k306, k307, k308, k309, k310, k311, k312, \ + k400, k401, k402, k403, k406, k408, k409, k410, k411, k412 \ +) { \ + { 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, KC_NO}, \ + { k400, k401, k402, k403, KC_NO,KC_NO,k406, KC_NO,k408, k409, k410, k411, k412, KC_NO} \ +} + +#define LAYOUT_60_ansi(\ + k000, k001, k002, k003, k004, k005, k006, k007, k008, k009, k010, k011, k012, k113, \ + k100, k101, k102, k103, k104, k105, k106, k107, k108, k109, k110, k111, k112, k213, \ + k200, k201, k202, k203, k204, k205, k206, k207, k208, k209, k210, k211, k212, \ + k300, k301, k302, k303, k304, k305, k306, k307, k308, k309, k310, k311, \ + k400, k401, k402, k406, k409, k410, k411, k412 \ +) { \ + { k000, k001, k002, k003, k004, k005, k006, k007, k008, k009, k010, k011, k012, KC_NO}, \ + { 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, KC_NO,KC_NO}, \ + { k400, k401, k402, KC_NO,KC_NO,KC_NO,k406, KC_NO,KC_NO,k409, k410, k411, k412, KC_NO} \ +} + +#define LAYOUT_60_ansi_split_bs_rshift(\ + k000, k001, k002, k003, k004, k005, k006, k007, k008, k009, k010, k011, k012, k013, k113, \ + k100, k101, k102, k103, k104, k105, k106, k107, k108, k109, k110, k111, k112, k213, \ + k200, k201, k202, k203, k204, k205, k206, k207, k208, k209, k210, k211, k212, \ + k300, k301, k302, k303, k304, k305, k306, k307, k308, k309, k310, k311, k312, \ + k400, k401, k402, k406, k409, k410, k411, k412 \ +) { \ + { 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, KC_NO}, \ + { k400, k401, k402, KC_NO,KC_NO,KC_NO,k406, KC_NO,KC_NO,k409, k410, k411, k412, KC_NO} \ +} + +#define LAYOUT_60_hhkb(\ + k000, k001, k002, k003, k004, k005, k006, k007, k008, k009, k010, k011, k012, k013, k113, \ + k100, k101, k102, k103, k104, k105, k106, k107, k108, k109, k110, k111, k112, k213, \ + k200, k201, k202, k203, k204, k205, k206, k207, k208, k209, k210, k211, k212, \ + k300, k301, k302, k303, k304, k305, k306, k307, k308, k309, k310, k311, k312, \ + k401, k402, k406, k410, k411 \ +) { \ + { 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, KC_NO}, \ + { KC_NO,k401, k402, KC_NO,KC_NO,KC_NO,k406, KC_NO,KC_NO,KC_NO,k410, k411, KC_NO,KC_NO} \ +} + +#define LAYOUT_60_tsangan_hhkb(\ + k000, k001, k002, k003, k004, k005, k006, k007, k008, k009, k010, k011, k012, k013, k113, \ + k100, k101, k102, k103, k104, k105, k106, k107, k108, k109, k110, k111, k112, k213, \ + k200, k201, k202, k203, k204, k205, k206, k207, k208, k209, k210, k211, k212, \ + k300, k301, k302, k303, k304, k305, k306, k307, k308, k309, k310, k311, k312, \ + k400, k401, k402, k406, k410, k411, k412 \ +) { \ + { 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, KC_NO}, \ + { k400, k401, k402, KC_NO,KC_NO,KC_NO,k406, KC_NO,KC_NO,KC_NO,k410, k411, k412, KC_NO} \ +} + +#define LAYOUT_60_tsangan_split_rshift(\ + k000, k001, k002, k003, k004, k005, k006, k007, k008, k009, k010, k011, k012, k113, \ + k100, k101, k102, k103, k104, k105, k106, k107, k108, k109, k110, k111, k112, k213, \ + k200, k201, k202, k203, k204, k205, k206, k207, k208, k209, k210, k211, k212, \ + k300, k301, k302, k303, k304, k305, k306, k307, k308, k309, k310, k311, k312, \ + k400, k401, k402, k406, k410, k411, k412 \ +) { \ + { k000, k001, k002, k003, k004, k005, k006, k007, k008, k009, k010, k011, k012, KC_NO}, \ + { 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, KC_NO}, \ + { k400, k401, k402, KC_NO,KC_NO,KC_NO,k406, KC_NO,KC_NO,KC_NO,k410, k411, k412, KC_NO} \ +} diff --git a/keyboards/hineybush/h60/keymaps/default/keymap.c b/keyboards/hineybush/h60/keymaps/default/keymap.c new file mode 100644 index 000000000000..9195da4b8587 --- /dev/null +++ b/keyboards/hineybush/h60/keymaps/default/keymap.c @@ -0,0 +1,28 @@ +/* Copyright 2020 hineybush + + */ +#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] = 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, MO(1), KC_RGUI, KC_RCTL), + + [_FN] = LAYOUT_60_ansi( + 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, 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_MPLY, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), +}; diff --git a/keyboards/hineybush/h60/keymaps/default/readme.md b/keyboards/hineybush/h60/keymaps/default/readme.md new file mode 100644 index 000000000000..08aa4a5c8fe2 --- /dev/null +++ b/keyboards/hineybush/h60/keymaps/default/readme.md @@ -0,0 +1 @@ +# The default keymap for h60 diff --git a/keyboards/hineybush/h60/keymaps/kei/keymap.c b/keyboards/hineybush/h60/keymaps/kei/keymap.c new file mode 100644 index 000000000000..528e1ac970d5 --- /dev/null +++ b/keyboards/hineybush/h60/keymaps/kei/keymap.c @@ -0,0 +1,26 @@ +/* Copyright 2020 hineybush + + */ +#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] = 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_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_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_LALT, KC_LGUI, KC_SPC, KC_RGUI, KC_RALT), + [_FN] = LAYOUT_60_hhkb( + 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, 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_MPLY, KC_TRNS, KC_TRNS), +}; diff --git a/keyboards/hineybush/h60/keymaps/kei/readme.md b/keyboards/hineybush/h60/keymaps/kei/readme.md new file mode 100644 index 000000000000..c7b8dd630121 --- /dev/null +++ b/keyboards/hineybush/h60/keymaps/kei/readme.md @@ -0,0 +1 @@ +# The default keymap for the Kei keyboard diff --git a/keyboards/hineybush/h60/keymaps/via/keymap.c b/keyboards/hineybush/h60/keymaps/via/keymap.c new file mode 100644 index 000000000000..75c9ac2dd2c5 --- /dev/null +++ b/keyboards/hineybush/h60/keymaps/via/keymap.c @@ -0,0 +1,40 @@ +/* Copyright 2020 hineybush + + */ +#include QMK_KEYBOARD_H + +// Defines names for use in layer keycodes and the keymap +enum layer_names { + _BASE, + _FN1, + _FN2, + _FN3 +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [_BASE] = 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_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_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_TRNS, + KC_LCTL, KC_LGUI, KC_LALT, KC_TRNS, KC_SPC, KC_TRNS, KC_RALT, MO(1), KC_RGUI, KC_RCTL), + [_FN1] = LAYOUT_all( + 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, 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_MPLY, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), + [_FN2] = 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), + [_FN3] = 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/hineybush/h60/keymaps/via/readme.md b/keyboards/hineybush/h60/keymaps/via/readme.md new file mode 100644 index 000000000000..a8d6e39e1513 --- /dev/null +++ b/keyboards/hineybush/h60/keymaps/via/readme.md @@ -0,0 +1 @@ +# The via keymap for h60 diff --git a/keyboards/hineybush/h60/keymaps/via/rules.mk b/keyboards/hineybush/h60/keymaps/via/rules.mk new file mode 100644 index 000000000000..1e5b99807cb7 --- /dev/null +++ b/keyboards/hineybush/h60/keymaps/via/rules.mk @@ -0,0 +1 @@ +VIA_ENABLE = yes diff --git a/keyboards/hineybush/h60/readme.md b/keyboards/hineybush/h60/readme.md new file mode 100644 index 000000000000..3bc38cc0adaf --- /dev/null +++ b/keyboards/hineybush/h60/readme.md @@ -0,0 +1,15 @@ +# h60 + +![h60](https://live.staticflickr.com/65535/49952697531_2efeaa0bd6_k.jpg) + +A GH60 form factor PCB for 60% keyboards. Uses a USB Type C connector. + +* Keyboard Maintainer: [hineybush](https://github.com/hineybush) +* Hardware Supported: h60 +* Hardware Availability: [hiney.cc](https://hiney.cc) + +Make example for this keyboard (after setting up your build environment): + + make hineybush/h60: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/h60/rules.mk b/keyboards/hineybush/h60/rules.mk new file mode 100644 index 000000000000..92da9c653f92 --- /dev/null +++ b/keyboards/hineybush/h60/rules.mk @@ -0,0 +1,25 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +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 = 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 = 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 +FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches +LAYOUTS = 60_ansi 60_ansi_split_bs_rshift 60_hhkb 60_tsangan_hhkb From f0bde7906d35c1955a39251659e80d41caccbc54 Mon Sep 17 00:00:00 2001 From: Manna Harbour <51143715+manna-harbour@users.noreply.github.com> Date: Tue, 23 Jun 2020 15:30:05 +1000 Subject: [PATCH 236/930] Update miryoku (#9442) - Add mouse buttons overlay layer - Change button order - Remove crkbd hardware specifics - Add alternative base layer alphas - Change title - Add logo - Reword intro text - Add dev branch and new commits links - Replace manual toc and remove anchors - Unindent lists - Reduce headings - Update docs - Build keymap as object instead of including .c file - Add kle subset mapping images - Add alternative mapping support - Change default mapping for ortho_4x12 - Add split mapping for ortho_4x12 - Add contact section - Add #pragma once to layout and keyboard config.h --- .../keymaps/manna-harbour_miryoku/config.h | 26 +- .../keymaps/manna-harbour_miryoku/keymap.c | 53 -- .../keymaps/manna-harbour_miryoku/rules.mk | 7 - .../ergodox/manna-harbour_miryoku/config.h | 20 + .../ergodox/manna-harbour_miryoku/keymap.c | 19 - .../ortho_4x12/manna-harbour_miryoku/config.h | 31 + .../ortho_4x12/manna-harbour_miryoku/keymap.c | 15 - users/manna-harbour_miryoku/config.h | 15 + .../manna-harbour_miryoku.c | 61 +- .../manna-harbour_miryoku.h | 19 + users/manna-harbour_miryoku/miryoku.org | 559 +++++++++++------- users/manna-harbour_miryoku/rules.mk | 17 +- 12 files changed, 513 insertions(+), 329 deletions(-) delete mode 100644 keyboards/crkbd/keymaps/manna-harbour_miryoku/rules.mk create mode 100644 layouts/community/ergodox/manna-harbour_miryoku/config.h create mode 100644 layouts/community/ortho_4x12/manna-harbour_miryoku/config.h create mode 100644 users/manna-harbour_miryoku/manna-harbour_miryoku.h diff --git a/keyboards/crkbd/keymaps/manna-harbour_miryoku/config.h b/keyboards/crkbd/keymaps/manna-harbour_miryoku/config.h index e2fe1824da34..a3d430b1e82f 100644 --- a/keyboards/crkbd/keymaps/manna-harbour_miryoku/config.h +++ b/keyboards/crkbd/keymaps/manna-harbour_miryoku/config.h @@ -2,17 +2,15 @@ #pragma once -#define EE_HANDS - -#ifdef RGB_MATRIX_ENABLE -#define RGB_MATRIX_KEYPRESSES // reacts to keypresses -#define RGB_DISABLE_WHEN_USB_SUSPENDED true // turn off effects when suspended -#define RGB_MATRIX_FRAMEBUFFER_EFFECTS -#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 -#endif - -#define SSD1306OLED // old oled driver +#define LAYOUT_miryoku( \ + 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, \ + N30, N31, K32, K33, K34, K35, K36, K37, N38, N39 \ +) \ +LAYOUT( \ +KC_NO, K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, KC_NO, \ +KC_NO, K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, KC_NO, \ +KC_NO, K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, KC_NO, \ + K32, K33, K34, K35, K36, K37 \ +) diff --git a/keyboards/crkbd/keymaps/manna-harbour_miryoku/keymap.c b/keyboards/crkbd/keymaps/manna-harbour_miryoku/keymap.c index f5be6844f8c4..a852ddd05cd4 100644 --- a/keyboards/crkbd/keymaps/manna-harbour_miryoku/keymap.c +++ b/keyboards/crkbd/keymaps/manna-harbour_miryoku/keymap.c @@ -1,54 +1 @@ // generated from users/manna-harbour_miryoku/miryoku.org -*- buffer-read-only: t -*- - -#define LAYOUT_miryoku( \ - 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, \ - N30, N31, K32, K33, K34, K35, K36, K37, N38, N39 \ -) \ -LAYOUT( \ -KC_NO, K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, KC_NO, \ -KC_NO, K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, KC_NO, \ -KC_NO, K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, KC_NO, \ - K32, K33, K34, K35, K36, K37 \ -) - -#include "manna-harbour_miryoku.c" - - -#ifdef SSD1306OLED - -#include "ssd1306.h" - -void matrix_init_user(void) { - iota_gfx_init(!has_usb()); // turns on the display -} - -// When add source files to SRC in rules.mk, you can use functions. -const char *read_logo(void); - -void matrix_scan_user(void) { - iota_gfx_task(); -} - -void matrix_render_user(struct CharacterMatrix *matrix) { - if (host_keyboard_leds() & (1<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 diff --git a/keyboards/crkbd/keymaps/manna-harbour_miryoku/rules.mk b/keyboards/crkbd/keymaps/manna-harbour_miryoku/rules.mk deleted file mode 100644 index c4fb15f34263..000000000000 --- a/keyboards/crkbd/keymaps/manna-harbour_miryoku/rules.mk +++ /dev/null @@ -1,7 +0,0 @@ -# generated from users/manna-harbour_miryoku/miryoku.org -*- buffer-read-only: t -*- - -RGB_MATRIX_ENABLE = WS2812 - -# old oled driver -SRC += ./lib/glcdfont.c \ - ./lib/logo_reader.c diff --git a/layouts/community/ergodox/manna-harbour_miryoku/config.h b/layouts/community/ergodox/manna-harbour_miryoku/config.h new file mode 100644 index 000000000000..0f20409c2e84 --- /dev/null +++ b/layouts/community/ergodox/manna-harbour_miryoku/config.h @@ -0,0 +1,20 @@ +// generated from users/manna-harbour_miryoku/miryoku.org -*- buffer-read-only: t -*- + +#pragma once + +#define LAYOUT_miryoku(\ +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,\ +N30, N31, K32, K33, K34, K35, K36, K37, N38, N39\ +)\ +LAYOUT_ergodox_pretty( \ +KC_NO, KC_NO, KC_NO, 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, K01, K02, K03, K04, KC_NO, KC_NO, K05, K06, K07, K08, K09, KC_NO, \ +KC_NO, K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, KC_NO, \ +KC_NO, K20, K21, K22, K23, K24, KC_NO, KC_NO, K25, K26, K27, K28, K29, KC_NO, \ +KC_NO, KC_NO, KC_NO, KC_NO, K32, K37, KC_NO, KC_NO, KC_NO, KC_NO, \ + KC_NO, KC_NO, KC_NO, KC_NO, \ + KC_NO, KC_NO, \ + K33, K34, KC_NO, KC_NO, K35, K36 \ +) diff --git a/layouts/community/ergodox/manna-harbour_miryoku/keymap.c b/layouts/community/ergodox/manna-harbour_miryoku/keymap.c index 1c715a68f7ae..a852ddd05cd4 100644 --- a/layouts/community/ergodox/manna-harbour_miryoku/keymap.c +++ b/layouts/community/ergodox/manna-harbour_miryoku/keymap.c @@ -1,20 +1 @@ // generated from users/manna-harbour_miryoku/miryoku.org -*- buffer-read-only: t -*- - -#define LAYOUT_miryoku(\ -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,\ -N30, N31, K32, K33, K34, K35, K36, K37, N38, N39\ -)\ -LAYOUT_ergodox_pretty( \ -KC_NO, KC_NO, KC_NO, 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, K01, K02, K03, K04, KC_NO, KC_NO, K05, K06, K07, K08, K09, KC_NO, \ -KC_NO, K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, KC_NO, \ -KC_NO, K20, K21, K22, K23, K24, KC_NO, KC_NO, K25, K26, K27, K28, K29, KC_NO, \ -KC_NO, KC_NO, KC_NO, KC_NO, K32, K37, KC_NO, KC_NO, KC_NO, KC_NO, \ - KC_NO, KC_NO, KC_NO, KC_NO, \ - KC_NO, KC_NO, \ - K33, K34, KC_NO, KC_NO, K35, K36 \ -) - -#include "manna-harbour_miryoku.c" diff --git a/layouts/community/ortho_4x12/manna-harbour_miryoku/config.h b/layouts/community/ortho_4x12/manna-harbour_miryoku/config.h new file mode 100644 index 000000000000..772b510ef6f1 --- /dev/null +++ b/layouts/community/ortho_4x12/manna-harbour_miryoku/config.h @@ -0,0 +1,31 @@ +// generated from users/manna-harbour_miryoku/miryoku.org -*- buffer-read-only: t -*- + +#pragma once + +#if defined MIRYOKU_MAPPING_SPLIT +#define LAYOUT_miryoku(\ +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,\ +N30, N31, K32, K33, K34, K35, K36, K37, N38, N39\ +)\ +LAYOUT_ortho_4x12(\ +KC_NO, K01, K02, K03, K04, KC_NO, KC_NO, K05, K06, K07, K08, KC_NO,\ +K00, K11, K12, K13, K14, KC_NO, KC_NO, K15, K16, K17, K18, K09,\ +K10, K21, K22, K23, K24, KC_NO, KC_NO, K25, K26, K27, K28, K19,\ +K20, KC_NO, KC_NO, K32, K33, K34, K35, K36, K37, KC_NO, KC_NO, K29\ +) +#else +#define LAYOUT_miryoku(\ +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,\ +N30, N31, K32, K33, K34, K35, K36, K37, N38, N39\ +)\ +LAYOUT_ortho_4x12(\ +K00, K01, K02, K03, K04, KC_NO, KC_NO, K05, K06, K07, K08, K09,\ +K10, K11, K12, K13, K14, KC_NO, KC_NO, K15, K16, K17, K18, K19,\ +K20, K21, K22, K23, K24, KC_NO, KC_NO, K25, K26, K27, K28, K29,\ +KC_NO, KC_NO, K32, K33, K34, K34, K35, K35, K36, K37, KC_NO, KC_NO\ +) +#endif diff --git a/layouts/community/ortho_4x12/manna-harbour_miryoku/keymap.c b/layouts/community/ortho_4x12/manna-harbour_miryoku/keymap.c index 07bc15c2af41..a852ddd05cd4 100644 --- a/layouts/community/ortho_4x12/manna-harbour_miryoku/keymap.c +++ b/layouts/community/ortho_4x12/manna-harbour_miryoku/keymap.c @@ -1,16 +1 @@ // generated from users/manna-harbour_miryoku/miryoku.org -*- buffer-read-only: t -*- - -#define LAYOUT_miryoku(\ -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,\ -N30, N31, K32, K33, K34, K35, K36, K37, N38, N39\ -)\ -LAYOUT_ortho_4x12(\ -KC_NO, K01, K02, K03, K04, KC_NO, KC_NO, K05, K06, K07, K08, KC_NO,\ -K00, K11, K12, K13, K14, KC_NO, KC_NO, K15, K16, K17, K18, K09,\ -K10, K21, K22, K23, K24, KC_NO, KC_NO, K25, K26, K27, K28, K19,\ -K20, KC_NO, KC_NO, K32, K33, K34, K35, K36, K37, KC_NO, KC_NO, K29\ -) - -#include "manna-harbour_miryoku.c" diff --git a/users/manna-harbour_miryoku/config.h b/users/manna-harbour_miryoku/config.h index 5ac3208c90cb..db16088158ff 100644 --- a/users/manna-harbour_miryoku/config.h +++ b/users/manna-harbour_miryoku/config.h @@ -2,6 +2,9 @@ #pragma once +// default but important +#define TAPPING_TERM 200 + // Prevent normal rollover on alphas from accidentally triggering mods. #define IGNORE_MOD_TAP_INTERRUPT @@ -10,3 +13,15 @@ // Recommended for heavy chording. #define QMK_KEYS_PER_SCAN 4 + +// Mouse key speed and acceleration. +#undef MOUSEKEY_DELAY +#define MOUSEKEY_DELAY 0 +#undef MOUSEKEY_INTERVAL +#define MOUSEKEY_INTERVAL 16 +#undef MOUSEKEY_WHEEL_DELAY +#define MOUSEKEY_WHEEL_DELAY 0 +#undef MOUSEKEY_MAX_SPEED +#define MOUSEKEY_MAX_SPEED 6 +#undef MOUSEKEY_TIME_TO_MAX +#define MOUSEKEY_TIME_TO_MAX 64 diff --git a/users/manna-harbour_miryoku/manna-harbour_miryoku.c b/users/manna-harbour_miryoku/manna-harbour_miryoku.c index 8ae38c25c8f8..9bc0f17e6330 100644 --- a/users/manna-harbour_miryoku/manna-harbour_miryoku.c +++ b/users/manna-harbour_miryoku/manna-harbour_miryoku.c @@ -1,28 +1,51 @@ // generated from users/manna-harbour_miryoku/miryoku.org -*- buffer-read-only: t -*- -#include QMK_KEYBOARD_H - -#define KC_NP KC_NO // key is not present -#define KC_NA KC_NO // present but not available for use -#define KC_NU KC_NO // available but not used - -// non-KC_ keycodes -#define KC_RST RESET -#define KC_TOG RGB_TOG -#define KC_MOD RGB_MOD -#define KC_HUI RGB_HUI -#define KC_SAI RGB_SAI -#define KC_VAI RGB_VAI - -enum layers { BASE, MEDR, NAVR, MOUR, NSSL, NSL, FUNL }; +#include "manna-harbour_miryoku.h" const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +#if defined MIRYOKU_ALPHAS_QWERTY + [BASE] = LAYOUT_miryoku( + KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, + LGUI_T(KC_A), LALT_T(KC_S), LCTL_T(KC_D), LSFT_T(KC_F), KC_G, KC_H, LSFT_T(KC_J), LCTL_T(KC_K), LALT_T(KC_L), LGUI_T(KC_QUOT), + KC_Z, ALGR_T(KC_X), KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, ALGR_T(KC_DOT), KC_SLSH, + KC_NP, KC_NP, LT(MEDR, KC_ESC), LT(NAVR, KC_SPC), LT(MOUR, KC_TAB), LT(NSSL, KC_ENT), LT(NSL, KC_BSPC), LT(FUNL, KC_DEL), KC_NP, KC_NP + ), +#elif defined MIRYOKU_ALPHAS_DVORAK + [BASE] = LAYOUT_miryoku( + KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, + LGUI_T(KC_A), LALT_T(KC_O), LCTL_T(KC_E), LSFT_T(KC_U), KC_I, KC_D, LSFT_T(KC_H), LCTL_T(KC_T), LALT_T(KC_N), LGUI_T(KC_S), + KC_SLSH, ALGR_T(KC_Q), KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, ALGR_T(KC_V), KC_Z, + KC_NP, KC_NP, LT(MEDR, KC_ESC), LT(NAVR, KC_SPC), LT(MOUR, KC_TAB), LT(NSSL, KC_ENT), LT(NSL, KC_BSPC), LT(FUNL, KC_DEL), KC_NP, KC_NP + ), +#elif defined MIRYOKU_ALPHAS_COLEMAK + [BASE] = LAYOUT_miryoku( + KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_QUOT, + LGUI_T(KC_A), LALT_T(KC_R), LCTL_T(KC_S), LSFT_T(KC_T), KC_D, KC_H, LSFT_T(KC_N), LCTL_T(KC_E), LALT_T(KC_I), LGUI_T(KC_O), + KC_Z, ALGR_T(KC_X), KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, ALGR_T(KC_DOT), KC_SLSH, + KC_NP, KC_NP, LT(MEDR, KC_ESC), LT(NAVR, KC_SPC), LT(MOUR, KC_TAB), LT(NSSL, KC_ENT), LT(NSL, KC_BSPC), LT(FUNL, KC_DEL), KC_NP, KC_NP + ), +#elif defined MIRYOKU_ALPHAS_COLEMAKDH + [BASE] = LAYOUT_miryoku( + KC_Q, KC_W, KC_F, KC_P, KC_B, KC_J, KC_L, KC_U, KC_Y, KC_QUOT, + LGUI_T(KC_A), LALT_T(KC_R), LCTL_T(KC_S), LSFT_T(KC_T), KC_G, KC_K, LSFT_T(KC_N), LCTL_T(KC_E), LALT_T(KC_I), LGUI_T(KC_O), + KC_Z, ALGR_T(KC_X), KC_C, KC_D, KC_V, KC_M, KC_H, KC_COMM, ALGR_T(KC_DOT), KC_SLSH, + KC_NP, KC_NP, LT(MEDR, KC_ESC), LT(NAVR, KC_SPC), LT(MOUR, KC_TAB), LT(NSSL, KC_ENT), LT(NSL, KC_BSPC), LT(FUNL, KC_DEL), KC_NP, KC_NP + ), +#elif defined MIRYOKU_ALPHAS_WORKMAN + [BASE] = LAYOUT_miryoku( + KC_Q, KC_D, KC_R, KC_W, KC_B, KC_J, KC_F, KC_U, KC_P, KC_QUOT, + LGUI_T(KC_A), LALT_T(KC_S), LCTL_T(KC_H), LSFT_T(KC_T), KC_G, KC_Y, LSFT_T(KC_N), LCTL_T(KC_E), LALT_T(KC_O), LGUI_T(KC_I), + KC_Z, ALGR_T(KC_X), KC_M, KC_C, KC_V, KC_K, KC_L, KC_COMM, ALGR_T(KC_DOT), KC_SLSH, + KC_NP, KC_NP, LT(MEDR, KC_ESC), LT(NAVR, KC_SPC), LT(MOUR, KC_TAB), LT(NSSL, KC_ENT), LT(NSL, KC_BSPC), LT(FUNL, KC_DEL), KC_NP, KC_NP + ), +#else [BASE] = LAYOUT_miryoku( KC_Q, KC_W, KC_F, KC_P, KC_B, KC_J, KC_L, KC_U, KC_Y, KC_QUOT, LGUI_T(KC_A), LALT_T(KC_R), LCTL_T(KC_S), LSFT_T(KC_T), KC_G, KC_M, LSFT_T(KC_N), LCTL_T(KC_E), LALT_T(KC_I), LGUI_T(KC_O), KC_Z, ALGR_T(KC_X), KC_C, KC_D, KC_V, KC_K, KC_H, KC_COMM, ALGR_T(KC_DOT), KC_SLSH, KC_NP, KC_NP, LT(MEDR, KC_ESC), LT(NAVR, KC_SPC), LT(MOUR, KC_TAB), LT(NSSL, KC_ENT), LT(NSL, KC_BSPC), LT(FUNL, KC_DEL), KC_NP, KC_NP ), +#endif [NAVR] = LAYOUT_miryoku( KC_RST, KC_NA, KC_NA, KC_NA, KC_NA, KC_AGIN, KC_UNDO, KC_CUT, KC_COPY, KC_PSTE, KC_LGUI, KC_LALT, KC_LCTL, KC_LSFT, KC_NA, KC_CAPS, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, @@ -33,7 +56,13 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_RST, KC_NA, KC_NA, KC_NA, KC_NA, KC_NU, KC_NU, KC_NU, KC_NU, KC_NU, KC_LGUI, KC_LALT, KC_LCTL, KC_LSFT, KC_NA, KC_NU, KC_MS_L, KC_MS_D, KC_MS_U, KC_MS_R, KC_NA, KC_ALGR, KC_NA, KC_NA, KC_NA, KC_NU, KC_WH_L, KC_WH_D, KC_WH_U, KC_WH_R, - KC_NP, KC_NP, KC_NA, KC_NA, KC_NA, KC_BTN3, KC_BTN1, KC_BTN2, KC_NP, KC_NP + KC_NP, KC_NP, KC_NA, KC_NA, KC_NA, KC_BTN1, KC_BTN3, KC_BTN2, KC_NP, KC_NP + ), + [MBO] = LAYOUT_miryoku( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_NP, KC_NP, KC_TRNS, KC_TRNS, KC_TRNS, KC_BTN1, KC_BTN3, KC_BTN2, KC_NP, KC_NP ), [MEDR] = LAYOUT_miryoku( KC_RST, KC_NA, KC_NA, KC_NA, KC_NA, KC_TOG, KC_MOD, KC_HUI, KC_SAI, KC_VAI, diff --git a/users/manna-harbour_miryoku/manna-harbour_miryoku.h b/users/manna-harbour_miryoku/manna-harbour_miryoku.h new file mode 100644 index 000000000000..5f543cb0f6ce --- /dev/null +++ b/users/manna-harbour_miryoku/manna-harbour_miryoku.h @@ -0,0 +1,19 @@ +// generated from users/manna-harbour_miryoku/miryoku.org -*- buffer-read-only: t -*- + +#pragma once + +#include QMK_KEYBOARD_H + +#define KC_NP KC_NO // key is not present +#define KC_NA KC_NO // present but not available for use +#define KC_NU KC_NO // available but not used + +// non-KC_ keycodes +#define KC_RST RESET +#define KC_TOG RGB_TOG +#define KC_MOD RGB_MOD +#define KC_HUI RGB_HUI +#define KC_SAI RGB_SAI +#define KC_VAI RGB_VAI + +enum layers { BASE, MBO, MEDR, NAVR, MOUR, NSSL, NSL, FUNL }; diff --git a/users/manna-harbour_miryoku/miryoku.org b/users/manna-harbour_miryoku/miryoku.org index 692321d01ebc..011e43455a29 100644 --- a/users/manna-harbour_miryoku/miryoku.org +++ b/users/manna-harbour_miryoku/miryoku.org @@ -1,68 +1,75 @@ -#+Title: miryoku.org +# After making changes to code or tables call org-babel-tangle (C-c C-v t). + +#+Title: Miryoku [[https://raw.githubusercontent.com/manna-harbour/miryoku/master/miryoku-roa-32.png]] [[https://raw.githubusercontent.com/manna-harbour/miryoku/master/kle-miryoku-keycodes.png]] -The miryoku layout is an ergonomic, minimal, orthogonal layout for ergo or ortho -keyboards, implemented as part of the QMK firmware. The layout is maintained in -emacs org-mode tables and converted to QMK keymap data structures using embedded -python scripts. The layout is mapped onto keyboards with different physical -layouts as a subset without code duplication using the QMK userspace feature and -C macros. Versions of the layout can also be seen outside of the QMK source at -[[https://github.com/manna-harbour/miryoku/]]. +Miryoku is an ergonomic, minimal, orthogonal layout for ergo or ortho keyboards, +implemented as part of the QMK firmware. -After making changes here call org-babel-tangle (C-c C-v t). +The layout is maintained in emacs org-mode tables and converted to QMK keymap +data structures using embedded python scripts. It is mapped onto keyboards with +different physical layouts as a subset without code duplication using the QMK +userspace feature and C macros. -* Contents +Please see the [[https://github.com/manna-harbour/qmk_firmware/blob/miryoku/users/manna-harbour_miryoku/miryoku.org][development branch]] for any [[https://github.com/qmk/qmk_firmware/compare/master...manna-harbour:miryoku][updates not yet merged into QMK]]. +Additional visualisations are provided outside QMK in the [[https://github.com/manna-harbour/miryoku/blob/master/README.org][Miryoku (Extras) repository]]. +* Contents :TOC: - [[#layout][Layout]] + - [[#general-principles][General Principles]] + - [[#details][Details]] + - [[#layers][Layers]] - [[#code-generation][Code Generation]] + - [[#table-conversion-scripts][Table Conversion Scripts]] + - [[#data][Data]] - [[#subset-mapping][Subset Mapping]] -- [[#related-documentation][Related Documentation]] - + - [[#userspace][Userspace]] + - [[#layouts][Layouts]] + - [[#keyboards][Keyboards]] +- [[#documentation][Documentation]] + - [[#qmk][QMK]] + - [[#org-mode][Org Mode]] +- [[#contact][Contact]] * Layout -:PROPERTIES: -:CUSTOM_ID: layout -:END: - -** Info - -*** General Principles - - - Use layers instead of reaching. - - Use both hands instead of contortions. - - Use the home positions as much as possible. - - Make full use of the thumbs. - - Avoid unnecessary complication. - - -*** Specifics - - - 5 columns, 3 rows, 3 thumb keys, 2 hands. - - Can be used on almost any split or non-split ergo or ortho keyboard. - - Includes all keys found on a US layout TKL keyboard, plus media keys and - mouse emulation. - - Home row is the middle row, home thumb key is the middle thumb key. - - Maximum 1-u movement from home position for fingers and thumbs, and only - along one axis (except for the inner index finger column which is - deprioritised compared with the home columns). - - Dual-function modifiers on home row, mirrored on both hands. - - Dual-function layer change on thumbs. - - Layers are designed orthogonally with a single purpose per hand and are - accessed by holding a thumb key on the opposite hand. - - All layers on the same hand are based on the same basic key arrangement. - - Holding layer change and modifiers on one hand combined with a single key - press on the other hand can produce any combination of modifiers and - single keys without any finger contortions. - - Single function mods are also defined on layers on the same hand as the - layer change thumb key so layer change and mods can be held in any order - or simultaneously without race conditions. - - As mods are only enabled on the opposite hand, auto-repeat is available on - the home row on layers for use with cursor and mouse keys. - - Tap-hold auto-repeat is disabled to permit faster tap-hold switching on - thumbs, but thumb tap keys are mirrored onto some layers for use with - auto-repeat. On other layers thumb keys are redefined with important - functions for that layer. + +** General Principles + +- Use layers instead of reaching. +- Use both hands instead of contortions. +- Use the home positions as much as possible. +- Make full use of the thumbs. +- Avoid unnecessary complication. + + +** Details + +- 5 columns, 3 rows, 3 thumb keys, 2 hands. +- Can be used on almost any split or non-split ergo or ortho keyboard. +- Includes all keys found on a US layout TKL keyboard, plus media keys and mouse + emulation. +- Home row is the middle row, home thumb key is the middle thumb key. +- Maximum 1-u movement from home position for fingers and thumbs, and only along + one axis (except for the inner index finger column which is deprioritised + compared with the home columns). +- Dual-function modifiers on home row, mirrored on both hands. +- Dual-function layer change on thumbs. +- Layers are designed orthogonally with a single purpose per hand and are + accessed by holding a thumb key on the opposite hand. +- All layers on the same hand are based on the same basic key arrangement. +- Holding layer change and modifiers on one hand combined with a single key + press on the other hand can produce any combination of modifiers and single + keys without any finger contortions. +- Single function mods are also defined on layers on the same hand as the layer + change thumb key so layer change and mods can be held in any order or + simultaneously without race conditions. +- As mods are only enabled on the opposite hand, auto-repeat is available on the + home row on layers for use with cursor and mouse keys. +- Tap-hold auto-repeat is disabled to permit faster tap-hold switching on + thumbs, but thumb tap keys are mirrored onto some layers for use with + auto-repeat. On other layers thumb keys are redefined with important + functions for that layer. ** Layers @@ -86,16 +93,21 @@ into the corresponding tap-hold keycodes for mods and layer change. RST and mods will be available on sub layers on the same hand as the layer change thumb key. Unknown names are considered to be layer names. -Base layer alphas are Colemak DHm. Thumb keys are backspace, enter, delete on +Base layer alphas are Colemak-DHm. Thumb keys are backspace, enter, delete on the right and space, tab, escape on the left. Dot, comma and apostrophe are included for prose, dot and slash for file and directory names. -#+NAME: tap +**** Tap + +#+NAME: colemakdhm | Q | W | F | P | B | J | L | U | Y | ' | | A | R | S | T | G | M | N | E | I | O | | Z | X | C | D | V | K | H | , | . | / | | NP | NP | ESC | SPC | TAB | ENT | BSPC | DEL | NP | NP | + +**** Hold + #+NAME: hold | RST | | | | | | | | | RST | | LGUI | LALT | LCTL | LSFT | | | LSFT | LCTL | LALT | LGUI | @@ -103,6 +115,52 @@ included for prose, dot and slash for file and directory names. | NP | NP | MEDR | NAVR | MOUR | NSSL | NSL | FUNL | NP | NP | +**** Alternative Base Layer Alphas + +Alternative base layer alphas are provided. To select, append +e.g. ~MIRYOKU_ALPHAS=QWERTY~ to the make command line when building. + +***** QWERTY (QWERTY) +#+NAME: 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 | , | . | / | +| NP | NP | ESC | SPC | TAB | ENT | BSPC | DEL | NP | NP | + + +***** Dvorak (DVORAK) +#+NAME: dvorak +| ' | , | . | P | Y | F | G | C | R | L | +| A | O | E | U | I | D | H | T | N | S | +| / | Q | J | K | X | B | M | W | V | Z | +| NP | NP | ESC | SPC | TAB | ENT | BSPC | DEL | NP | NP | + + +***** Colemak (COLEMAK) +#+NAME: colemak +| Q | W | F | P | G | J | L | U | Y | ' | +| A | R | S | T | D | H | N | E | I | O | +| Z | X | C | V | B | K | M | , | . | / | +| NP | NP | ESC | SPC | TAB | ENT | BSPC | DEL | NP | NP | + + +***** Colemak Mod-DH (COLEMAKDH) +#+NAME: colemakdh +| Q | W | F | P | B | J | L | U | Y | ' | +| A | R | S | T | G | K | N | E | I | O | +| Z | X | C | D | V | M | H | , | . | / | +| NP | NP | ESC | SPC | TAB | ENT | BSPC | DEL | NP | NP | + + +***** Workman (WORKMAN) +#+NAME: workman +| Q | D | R | W | B | J | F | U | P | ' | +| A | S | H | T | G | Y | N | E | O | I | +| Z | X | M | C | V | K | L | , | . | / | +| NP | NP | ESC | SPC | TAB | ENT | BSPC | DEL | NP | NP | + + + *** Navigation (NAVR) Primary right-hand layer (left home thumb) is navigation and editing. Cursor @@ -120,15 +178,27 @@ layer to avoid having to layer change mid edit and to enable auto-repeat. *** Mouse (MOUR) Secondary RH layer is mouse emulation. Mouse movement mirrors cursor navigation -on home and wheel mirrors line / page movement below. Buttons are on the -thumbs. Mouse movement, click, and drag with modifiers can be performed from +on home and wheel mirrors line / page movement below. Buttons are on the thumbs +(L, M, R). Mouse movement, click, and drag with modifiers can be performed from the home position. Unused keys are available for other related functions. #+NAME: mour | | | | | | | | MS_L | MS_D | MS_U | MS_R | | | WH_L | WH_D | WH_U | WH_R | -| BTN3 | BTN1 | BTN2 | NP | NP | +| BTN1 | BTN3 | BTN2 | NP | NP | + + +**** Mouse Buttons Overlay (MBO) + +Available for automatic activation depending on keyboard hardware and +configuration. Not activated manually. + +#+NAME: mbo +| | | | | | | | | | | +| | | | | | | | | | | +| | | | | | | | | | | +| NP | NP | | | | BTN1 | BTN3 | BTN2 | NP | NP | *** Media (MEDR) @@ -211,9 +281,6 @@ Duplicate base layer tap keys on thumbs rather than trans to enable auto-repeat. * Code Generation -:PROPERTIES: -:CUSTOM_ID: code-generation -:END: ** Table Conversion Scripts @@ -222,14 +289,14 @@ Duplicate base layer tap keys on thumbs rather than trans to enable auto-repeat. Produce base layer from separate tap and hold tables. #+NAME: table-layout-taphold -#+BEGIN_SRC python :var tap_table=tap :var hold_table=hold :var symbol_names_table=symbol-names :var mods_list=mods :tangle no :results verbatim +#+BEGIN_SRC python :var layer_name="BASE" :var tap_table=colemakdhm :var hold_table=hold :var symbol_names_table=symbol-names :var mods_list=mods :tangle no :results verbatim width = 19 mods_dict = dict.fromkeys(mods_list) symbol_names_dict = {} for symbol, name, shifted_symbol, shifted_name in symbol_names_table: symbol_names_dict[symbol] = name symbol_names_dict[shifted_symbol] = shifted_name -results = ' [BASE] = LAYOUT_miryoku(\n' +results = ' [' + layer_name + '] = LAYOUT_miryoku(\n' for tap_row, hold_row in map(None, tap_table, hold_table): results += ' ' for tap, hold in map(None, tap_row, hold_row): @@ -254,7 +321,7 @@ return results : [BASE] = LAYOUT_miryoku( : KC_Q, KC_W, KC_F, KC_P, KC_B, KC_J, KC_L, KC_U, KC_Y, KC_QUOT, : LGUI_T(KC_A), LALT_T(KC_R), LCTL_T(KC_S), LSFT_T(KC_T), KC_G, KC_M, LSFT_T(KC_N), LCTL_T(KC_E), LALT_T(KC_I), LGUI_T(KC_O), -: KC_Z, KC_X, KC_C, KC_D, KC_V, KC_K, KC_H, KC_COMM, KC_DOT, KC_SLSH, +: KC_Z, ALGR_T(KC_X), KC_C, KC_D, KC_V, KC_K, KC_H, KC_COMM, ALGR_T(KC_DOT), KC_SLSH, : KC_NP, KC_NP, LT(MEDR, KC_ESC), LT(NAVR, KC_SPC), LT(MOUR, KC_TAB), LT(NSSL, KC_ENT), LT(NSL, KC_BSPC), LT(FUNL, KC_DEL), KC_NP, KC_NP : ) @@ -314,6 +381,43 @@ return results : ) +*** table-layout-full + +Produce full layer from single table. Fill for unused keys is configurable. + +#+NAME: table-layout-full +#+BEGIN_SRC python :var table=mbo :var layer_name="MBO" :var fill="TRNS" :var symbol_names_table=symbol-names :tangle no :results verbatim +width = 9 +symbol_names_dict = {} +for symbol, name, shifted_symbol, shifted_name in symbol_names_table: + symbol_names_dict[symbol] = name + symbol_names_dict[shifted_symbol] = shifted_name +results = ' [' + layer_name + '] = LAYOUT_miryoku(\n' +for row in table: + results += ' ' + for key in row: + if key == '': + code = fill + elif key in symbol_names_dict: + code = symbol_names_dict[key] + else: + code = key + code = 'KC_' + str(code) + results += (code + ', ').ljust(width) + results = results.rstrip(' ') + '\n' +results = results.rstrip('\n, ') + '\n )' +return results +#+END_SRC + +#+RESULTS: table-layout-full +: [MBO] = LAYOUT_miryoku( +: KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, +: KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, +: KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, +: KC_NP, KC_NP, KC_TRNS, KC_TRNS, KC_TRNS, KC_BTN1, KC_BTN3, KC_BTN2, KC_NP, KC_NP +: ) + + *** table-enums Produce layer enums from layer names in hold table. @@ -321,7 +425,7 @@ Produce layer enums from layer names in hold table. #+NAME: table-enums #+BEGIN_SRC python :var hold_table=hold :var mods_list=mods :tangle no mods_dict = dict.fromkeys(mods_list) -results = 'enum layers { BASE, ' +results = 'enum layers { BASE, MBO, ' for hold_row in hold_table: for hold in hold_row: if hold not in mods_dict and hold != '' and hold != 'NP' and hold != 'RST': @@ -331,7 +435,7 @@ return results #+END_SRC #+RESULTS: table-enums -: enum layers { BASE, MEDR, NAVR, MOUR, NSSL, NSL, FUNL }; +: enum layers { BASE, MBO, MEDR, NAVR, MOUR, NSSL, NSL, FUNL }; ** Data @@ -376,8 +480,6 @@ Modifiers usable in hold table. Need to have the same name for KC_ and _T versi - ALGR -** Other - *** header Header for tangled src files. @@ -389,25 +491,27 @@ generated from users/manna-harbour_miryoku/miryoku.org -*- buffer-read-only: t * Subset Mapping -:PROPERTIES: -:CUSTOM_ID: subset-mapping -:END: + +The keymap, build options, and configuration are shared between keyboards. The +layout is mapped onto keyboards with different physical layouts as a subset. ** Userspace -The keymap and configuration are shared between keyboards. The keymap is -defined for LAYOUT_miryoku which is 10x4, with the outer 2 positions on the -bottom row unused and the rest of the bottom row are the thumb keys. +The keymap is defined for LAYOUT_miryoku which is 10x4, with the outer 2 +positions on the bottom row unused and the rest of the bottom row being the +thumb keys. +*** manna-harbour_miryoku.h -*** manna-harbour_miryoku.c +Keymap-related definitions. Included from manna-harbour_miryoku.c. Can be +included from keymap or layout keymap.c if needed. -Contains the keymap. Included from keymap.c - -[[./manna-harbour_miryoku.c][users/manna-harbour_miryoku/manna-harbour_miryoku.c]] -#+BEGIN_SRC C :noweb yes :padline no :tangle manna-harbour_miryoku.c +[[./manna-harbour_miryoku.h][users/manna-harbour_miryoku/manna-harbour_miryoku.h]] +#+BEGIN_SRC C :noweb yes :padline no :tangle manna-harbour_miryoku.h // <
> +#pragma once + #include QMK_KEYBOARD_H #define KC_NP KC_NO // key is not present @@ -423,11 +527,36 @@ Contains the keymap. Included from keymap.c #define KC_VAI RGB_VAI <> +#+END_SRC + + +*** manna-harbour_miryoku.c + +Contains the keymap. Added from rules.mk. + +[[./manna-harbour_miryoku.c][users/manna-harbour_miryoku/manna-harbour_miryoku.c]] +#+BEGIN_SRC C :noweb yes :padline no :tangle manna-harbour_miryoku.c +// <
> + +#include "manna-harbour_miryoku.h" const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { -<>, +#if defined MIRYOKU_ALPHAS_QWERTY +<>, +#elif defined MIRYOKU_ALPHAS_DVORAK +<>, +#elif defined MIRYOKU_ALPHAS_COLEMAK +<>, +#elif defined MIRYOKU_ALPHAS_COLEMAKDH +<>, +#elif defined MIRYOKU_ALPHAS_WORKMAN +<>, +#else +<>, +#endif <>, <>, +<>, <>, <>, <>, @@ -446,6 +575,9 @@ Config options. Automatically included. #pragma once +// default but important +#define TAPPING_TERM 200 + // Prevent normal rollover on alphas from accidentally triggering mods. #define IGNORE_MOD_TAP_INTERRUPT @@ -455,6 +587,18 @@ Config options. Automatically included. // Recommended for heavy chording. #define QMK_KEYS_PER_SCAN 4 +// Mouse key speed and acceleration. +#undef MOUSEKEY_DELAY +#define MOUSEKEY_DELAY 0 +#undef MOUSEKEY_INTERVAL +#define MOUSEKEY_INTERVAL 16 +#undef MOUSEKEY_WHEEL_DELAY +#define MOUSEKEY_WHEEL_DELAY 0 +#undef MOUSEKEY_MAX_SPEED +#define MOUSEKEY_MAX_SPEED 6 +#undef MOUSEKEY_TIME_TO_MAX +#define MOUSEKEY_TIME_TO_MAX 64 + #+END_SRC @@ -466,10 +610,20 @@ Build options. Automatically included. #+BEGIN_SRC makefile :noweb yes :padline no :tangle rules.mk # <
> -MOUSEKEY_ENABLE = yes # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -EXTRAFLAGS += -flto # Link Time Optimization to reduce code size, 31358->28034/28672 +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +SRC += manna-harbour_miryoku.c # keymap + +# select alternative base layer alphas +ifneq ($(strip $(MIRYOKU_ALPHAS)),) + OPT_DEFS += -DMIRYOKU_ALPHAS_$(MIRYOKU_ALPHAS) +endif + +# select alternative subset mappings +ifneq ($(strip $(MIRYOKU_MAPPING)),) + OPT_DEFS += -DMIRYOKU_MAPPING_$(MIRYOKU_MAPPING) +endif #+END_SRC @@ -477,7 +631,9 @@ EXTRAFLAGS += -flto # Link Time Optimization to reduce code size, 31358->28 To use the keymap on a keyboard supporting the layouts feature, LAYOUT_miryoku is defined as a macro mapping onto the layout's own LAYOUT macro, leaving the -unused keys as KC_NO. The userspace keymap is then included. +unused keys as KC_NO. + +The following are example layouts. *** ergodox @@ -486,10 +642,26 @@ secondary thumb keys are the inner and outer 2u thumb keys and the tertiary thumb key is the innermost key of the partial bottom row. The remaining keys are unused. -[[../../layouts/community/ergodox/manna-harbour_miryoku/keymap.c][layouts/community/ergodox/manna-harbour_miryoku/keymap.c]] -#+BEGIN_SRC C :noweb yes :padline no :tangle ../../layouts/community/ergodox/manna-harbour_miryoku/keymap.c +[[https://raw.githubusercontent.com/manna-harbour/miryoku/master/kle-miryoku-mapping-ergodox.png]] + +To build for any keyboard using the this layout (ergodone, ergodox_ez, +ergodox_infinity, hotdox) e.g. the ergodox_ez, + +#+BEGIN_SRC sh :tangle no +make ergodox_ez:manna-harbour_miryoku:flash +#+END_SRC + + +**** config.h + +Contains subset mapping. + +[[../../layouts/community/ergodox/manna-harbour_miryoku/config.h][layouts/community/ergodox/manna-harbour_miryoku/config.h]] +#+BEGIN_SRC C :noweb yes :padline no :tangle ../../layouts/community/ergodox/manna-harbour_miryoku/config.h // <
> +#pragma once + #define LAYOUT_miryoku(\ K00, K01, K02, K03, K04, K05, K06, K07, K08, K09,\ K10, K11, K12, K13, K14, K15, K16, K17, K18, K19,\ @@ -506,32 +678,62 @@ KC_NO, KC_NO, KC_NO, KC_NO, K32, K37, KC_NO, KC_ KC_NO, KC_NO, \ K33, K34, KC_NO, KC_NO, K35, K36 \ ) +#+END_SRC + + +**** keymap.c -#include "manna-harbour_miryoku.c" +Required by the build system. +[[../../layouts/community/ergodox/manna-harbour_miryoku/keymap.c][layouts/community/ergodox/manna-harbour_miryoku/keymap.c]] +#+BEGIN_SRC C :noweb yes :padline no :tangle ../../layouts/community/ergodox/manna-harbour_miryoku/keymap.c +// <
> #+END_SRC -To build for any keyboard using the this layout (ergodone, ergodox_ez, -ergodox_infinity, hotdox) e.g. the ergodox_ez, + +*** ortho_4x12 + +For the ortho_4x12 layout, the middle two columns, and the 2 keys on each end of +the bottom row are unused. This allows the hands to be positioned without ulnar +deviation of the wrists. + +In the implementation, the 2 unused middle columns bottom row keys are mapped as +duplicates of their adjacent keys to support alternative bottom row physical +layouts including 1x2uC (MIT), 1x2uR, 1x2uL, and 2x2u. + +[[https://raw.githubusercontent.com/manna-harbour/miryoku/master/kle-miryoku-mapping-ortho_4x12.png]] + +For split keyboards using this layout the halves can be positioned and rotated +for each hand and so an alternative mapping is provided. The right half is as +follows: The rightmost column bottom 3 keys is the pinkie column. The middle 4 +columns top 3 rows are for the remaining fingers. The pinkie column is one row +lower than the other columns to provide some column stagger. The bottom row +left 3 keys are the thumb keys. The remaining keys are unused. To select this +mapping, append ~MIRYOKU_MAPPING=SPLIT~ to the make command line when building. + +[[https://raw.githubusercontent.com/manna-harbour/miryoku/master/kle-miryoku-mapping-ortho_4x12-split.png]] + +To build for any keyboard using this layout (4x4, nori, chimera_ls, contra, +divergetm2, jj40, lets_split, lets_split_eh, meira, niu_mini, planck, telophase, +vitamins_included, zinc, zlant, ortho48, kbd4x, levinson, wavelet, plaid): #+BEGIN_SRC sh :tangle no -cd ../.. && make ergodox_ez:manna-harbour_miryoku:teensy +make planck/rev6:manna-harbour_miryoku:flash # planck +make keebio/levinson:manna-harbour_miryoku:flash MIRYOKU_MAPPING=SPLIT # levinson #+END_SRC +**** config.h -*** ortho_4x12 - -For the ortho_4x12 layout, the right half as is as follows: The rightmost column -bottom 3 rows is the pinkie column. The middle 4 columns top 3 rows are for the -remaining fingers. The pinkie column is one row lower than the other columns to -provide some column stagger on ortho keyboards. The bottom row left 3 columns -are the thumb keys. The remaining keys are unused. +Contains subset mapping. -[[../../layouts/community/ortho_4x12/manna-harbour_miryoku/keymap.c][layouts/community/ortho_4x12/manna-harbour_miryoku/keymap.c]] -#+BEGIN_SRC C :noweb yes :padline no :tangle ../../layouts/community/ortho_4x12/manna-harbour_miryoku/keymap.c +[[../../layouts/community/ortho_4x12/manna-harbour_miryoku/config.h][layouts/community/ortho_4x12/manna-harbour_miryoku/config.h]] +#+BEGIN_SRC C :noweb yes :padline no :tangle ../../layouts/community/ortho_4x12/manna-harbour_miryoku/config.h // <
> +#pragma once + +#if defined MIRYOKU_MAPPING_SPLIT #define LAYOUT_miryoku(\ K00, K01, K02, K03, K04, K05, K06, K07, K08, K09,\ K10, K11, K12, K13, K14, K15, K16, K17, K18, K19,\ @@ -544,18 +746,30 @@ K00, K11, K12, K13, K14, KC_NO, KC_NO, K15, K16, K17, K18, K09 K10, K21, K22, K23, K24, KC_NO, KC_NO, K25, K26, K27, K28, K19,\ K20, KC_NO, KC_NO, K32, K33, K34, K35, K36, K37, KC_NO, KC_NO, K29\ ) +#else +#define LAYOUT_miryoku(\ +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,\ +N30, N31, K32, K33, K34, K35, K36, K37, N38, N39\ +)\ +LAYOUT_ortho_4x12(\ +K00, K01, K02, K03, K04, KC_NO, KC_NO, K05, K06, K07, K08, K09,\ +K10, K11, K12, K13, K14, KC_NO, KC_NO, K15, K16, K17, K18, K19,\ +K20, K21, K22, K23, K24, KC_NO, KC_NO, K25, K26, K27, K28, K29,\ +KC_NO, KC_NO, K32, K33, K34, K34, K35, K35, K36, K37, KC_NO, KC_NO\ +) +#endif +#+END_SRC -#include "manna-harbour_miryoku.c" -#+END_SRC +**** keymap.c -To build for any keyboard using this layout (4x4, nori, chimera_ls, contra, -divergetm2, jj40, lets_split, lets_split_eh, meira, niu_mini, planck, telophase, -vitamins_included, zinc, zlant, ortho48, kbd4x, levinson, wavelet, plaid) -e.g. the levinson, +Required by the build system. -#+BEGIN_SRC sh :tangle no -make keebio/levinson:manna-harbour_miryoku:avrdude +[[../../layouts/community/ortho_4x12/manna-harbour_miryoku/keymap.c][layouts/community/ortho_4x12/manna-harbour_miryoku/keymap.c]] +#+BEGIN_SRC C :noweb yes :padline no :tangle ../../layouts/community/ortho_4x12/manna-harbour_miryoku/keymap.c +// <
> #+END_SRC @@ -563,18 +777,30 @@ make keebio/levinson:manna-harbour_miryoku:avrdude To use the keymap on a keyboard which does not support the layouts feature, LAYOUT_miryoku is defined as a macro mapping onto the keyboard's own LAYOUT -macro, leaving the unused keys as KC_NO. The userspace keymap is then included. +macro, leaving the unused keys as KC_NO. + +The following are example keyboards. *** crkbd The outer columns are unused. -**** keymap.c +To build for this keyboard, -[[../../keyboards/crkbd/keymaps/manna-harbour_miryoku/keymap.c][keyboards/crkbd/keymaps/manna-harbour_miryoku/keymap.c]] -#+BEGIN_SRC C :noweb yes :padline no :tangle ../../keyboards/crkbd/keymaps/manna-harbour_miryoku/keymap.c +#+BEGIN_SRC sh :tangle no +make crkbd:manna-harbour_miryoku:flash +#+END_SRC + +**** config.h + +Contains subset mapping. + +[[../../keyboards/crkbd/keymaps/manna-harbour_miryoku/config.h][keyboards/crkbd/keymaps/manna-harbour_miryoku/config.h]] +#+BEGIN_SRC C :noweb yes :padline no :tangle ../../keyboards/crkbd/keymaps/manna-harbour_miryoku/config.h // <
> +#pragma once + #define LAYOUT_miryoku( \ K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, \ K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, \ @@ -587,114 +813,33 @@ KC_NO, K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, KC_ KC_NO, K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, KC_NO, \ K32, K33, K34, K35, K36, K37 \ ) - -#include "manna-harbour_miryoku.c" - - -#ifdef SSD1306OLED - -#include "ssd1306.h" - -void matrix_init_user(void) { - iota_gfx_init(!has_usb()); // turns on the display -} - -// When add source files to SRC in rules.mk, you can use functions. -const char *read_logo(void); - -void matrix_scan_user(void) { - iota_gfx_task(); -} - -void matrix_render_user(struct CharacterMatrix *matrix) { - if (host_keyboard_leds() & (1<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 - #+END_SRC -**** config.h - -[[../../keyboards/crkbd/keymaps/manna-harbour_miryoku/config.h][keyboards/crkbd/keymaps/manna-harbour_miryoku/config.h]] -#+BEGIN_SRC C :noweb yes :padline no :tangle ../../keyboards/crkbd/keymaps/manna-harbour_miryoku/config.h -// <
> - -#pragma once - -#define EE_HANDS - -#ifdef RGB_MATRIX_ENABLE -#define RGB_MATRIX_KEYPRESSES // reacts to keypresses -#define RGB_DISABLE_WHEN_USB_SUSPENDED true // turn off effects when suspended -#define RGB_MATRIX_FRAMEBUFFER_EFFECTS -#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 -#endif - -#define SSD1306OLED // old oled driver - -#+END_SRC - - -**** rules.mk - -[[../../keyboards/crkbd/keymaps/manna-harbour_miryoku/rules.mk][keyboards/crkbd/keymaps/manna-harbour_miryoku/rules.mk]] -#+BEGIN_SRC C :noweb yes :padline no :tangle ../../keyboards/crkbd/keymaps/manna-harbour_miryoku/rules.mk -# <
> - -RGB_MATRIX_ENABLE = WS2812 - -# old oled driver -SRC += ./lib/glcdfont.c \ - ./lib/logo_reader.c - -#+END_SRC - +**** keymap.c -To build for this keyboard, +Required by the build system. -#+BEGIN_SRC sh :tangle no -cd ../.. && make crkbd:manna-harbour_miryoku:flash +[[../../keyboards/crkbd/keymaps/manna-harbour_miryoku/keymap.c][keyboards/crkbd/keymaps/manna-harbour_miryoku/keymap.c]] +#+BEGIN_SRC C :noweb yes :padline no :tangle ../../keyboards/crkbd/keymaps/manna-harbour_miryoku/keymap.c +// <
> #+END_SRC -* Related Documentation -:PROPERTIES: -:CUSTOM_ID: related-documentation -:END: - +* Documentation ** QMK - https://qmk.fm/ - https://docs.qmk.fm/#/getting_started_introduction -- https://docs.qmk.fm/#/hardware_keyboard_guidelines - https://docs.qmk.fm/#/config_options - https://docs.qmk.fm/#/keycodes - https://docs.qmk.fm/#/feature_advanced_keycodes +- https://docs.qmk.fm/#/feature_layers +- https://docs.qmk.fm/#/mod_tap - https://docs.qmk.fm/#/feature_layouts - https://docs.qmk.fm/#/feature_userspace +- https://docs.qmk.fm/#/feature_mouse_keys - https://docs.qmk.fm/#/getting_started_make_guide @@ -703,3 +848,13 @@ cd ../.. && make crkbd:manna-harbour_miryoku:flash - https://orgmode.org/ - https://orgmode.org/manual/Tables.html - https://orgmode.org/manual/Working-with-Source-Code.html + + +* Contact + +For issues with this branch, or to request support for additional base layer +alphas, layouts, or keyboards, please [[https://github.com/manna-harbour/qmk_firmware/issues/new][open an issue]]. + +For more general discussion, please join a relevant [[https://www.reddit.com/user/manna_harbour/posts/?sort=new][recent thread]] or [[https://www.reddit.com/message/compose/?to=manna_harbour][send a PM]]. + +[[https://github.com/manna-harbour][https://raw.githubusercontent.com/manna-harbour/miryoku/master/manna-harbour-boa-32.png]] diff --git a/users/manna-harbour_miryoku/rules.mk b/users/manna-harbour_miryoku/rules.mk index a54616b47aaa..ca135af07aee 100644 --- a/users/manna-harbour_miryoku/rules.mk +++ b/users/manna-harbour_miryoku/rules.mk @@ -1,5 +1,16 @@ # generated from users/manna-harbour_miryoku/miryoku.org -*- buffer-read-only: t -*- -MOUSEKEY_ENABLE = yes # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -LTO_ENABLE = yes +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control + +SRC += manna-harbour_miryoku.c # keymap + +# select alternative base layer alphas +ifneq ($(strip $(MIRYOKU_ALPHAS)),) + OPT_DEFS += -DMIRYOKU_ALPHAS_$(MIRYOKU_ALPHAS) +endif + +# select alternative subset mappings +ifneq ($(strip $(MIRYOKU_MAPPING)),) + OPT_DEFS += -DMIRYOKU_MAPPING_$(MIRYOKU_MAPPING) +endif From d353fcb99cfe345cde29cb7dc94cceaab82c610b Mon Sep 17 00:00:00 2001 From: Rozakiin <6567067+Rozakiin@users.noreply.github.com> Date: Tue, 23 Jun 2020 07:08:36 +0100 Subject: [PATCH 237/930] Add VIA support to Noxary x268 (#9450) * Update USB descriptors * Update default keymap for readability * Update readme description * Update rules.mk build options, enable bootmagic and mousekey * Add commented modern led code * Add VIA keymap * Update default keymap readme.md layout image * Update keyboards/noxary/x268/rules.mk remove incorrect comment * Update keyboards/noxary/x268/x268.c remove commented setPinOutput(B1) * Update keyboards/noxary/x268/keymaps/default/readme.md Flip order of layout image and title * Update keyboards/noxary/x268/keymaps/via/readme.md Flip order of layout image and title * Update LED function to led_update_kb() --- keyboards/noxary/x268/config.h | 8 +- .../noxary/x268/keymaps/default/keymap.c | 142 +++++++++++------- .../noxary/x268/keymaps/default/readme.md | 2 + keyboards/noxary/x268/keymaps/via/keymap.c | 111 ++++++++++++++ keyboards/noxary/x268/keymaps/via/readme.md | 3 + keyboards/noxary/x268/keymaps/via/rules.mk | 5 + keyboards/noxary/x268/readme.md | 3 +- keyboards/noxary/x268/rules.mk | 10 +- keyboards/noxary/x268/x268.c | 39 ++--- 9 files changed, 226 insertions(+), 97 deletions(-) create mode 100644 keyboards/noxary/x268/keymaps/via/keymap.c create mode 100644 keyboards/noxary/x268/keymaps/via/readme.md create mode 100644 keyboards/noxary/x268/keymaps/via/rules.mk diff --git a/keyboards/noxary/x268/config.h b/keyboards/noxary/x268/config.h index 0604f6529b30..c342da505851 100644 --- a/keyboards/noxary/x268/config.h +++ b/keyboards/noxary/x268/config.h @@ -20,12 +20,12 @@ along with this program. If not, see . #include "config_common.h" /* USB Device descriptor parameter */ -#define VENDOR_ID 0x4E58 -#define PRODUCT_ID 0x0044 -#define DEVICE_VER 0x00F2 +#define VENDOR_ID 0x4E58 //"NX" +#define PRODUCT_ID 0x010C //268 +#define DEVICE_VER 0x0078 //"x" #define MANUFACTURER Noxary #define PRODUCT x268 -#define DESCRIPTION QMK keyboard firmware for x268 +#define DESCRIPTION A fully customizable RGB 65% keyboard. /* key matrix size */ #define MATRIX_ROWS 5 diff --git a/keyboards/noxary/x268/keymaps/default/keymap.c b/keyboards/noxary/x268/keymaps/default/keymap.c index ae07f5213d7d..7f26a6c10ecd 100644 --- a/keyboards/noxary/x268/keymaps/default/keymap.c +++ b/keyboards/noxary/x268/keymaps/default/keymap.c @@ -1,83 +1,111 @@ +/* Copyright 2020 Rozakiin + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public 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 +enum layer_names { + _BL, + _FL1, + _FL2, + _FL3 +}; + const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - /* _BL: Base Layer(Default) - For ISO enter use ANSI enter - * ,----------------------------------------------------------------. - * |Esc | 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =| \|BSpc| Grv| - * |----------------------------------------------------------------| - * |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| \ | Del| - * |----------------------------------------------------------------| - * |CAPS | A| S| D| F| G| H| J| K| L| ;| '| #| Ent|PgUp| - * |----------------------------------------------------------------| - * |Shift| \| Z| X| C| V| B| N| M| ,| .| /|Shift | Up|PgDn| - * |----------------------------------------------------------------| - * |Ctrl|Win |Alt | Space |Alt|Mo(1)|Ctrl|Lef|Dow|Rght| - * `----------------------------------------------------------------' + /* Base Layer - For ISO enter use ANSI enter + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┬───┐ + * │Esc│ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ - │ = │ \ │Bsp│ ` │ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┼───┤ + * │ Tab │ Q │ W │ E │ R │ T │ Y │ U │ I │ O │ P │ [ │ ] │ \ │Del│ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┼───┤ + * │ Caps │ A │ S │ D │ F │ G │ H │ J │ K │ L │ ; │ ' │ # │Ent │PgU│ + * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┬───┼───┤ + * │Sft │ \ │ Z │ X │ C │ V │ B │ N │ M │ , │ . │ / │Shift │ ↑ │PgD│ + * ├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┼───┴┬──┴─┬─┴──┬───┼───┼───┤ + * │Ctrl│Win │Alt │ Space │Alt │M(1)│Ctrl│ ← │ ↓ │ → │ + * └────┴────┴────┴─────────────────────┴────┴────┴────┴───┴───┴───┘ */ [_BL] = 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_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_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_LALT, MO(_FL1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT), - /* _FL1: Function Layer 1 - For ISO enter use ANSI enter - * ,----------------------------------------------------------------. - * | `|F1| F2| F3| F4| F5| F6| F7| F8| F9|F10|F11|F12| |PScr| | - * |----------------------------------------------------------------| - * | | | | |RST| | | | | | | | | | Ins| - * |----------------------------------------------------------------| - * | | | | | | | | | | | | | | |Home| - * |----------------------------------------------------------------| - * | | | | | | | | | |Bl-|Bl+| |Mute|Vol+| End| - * |----------------------------------------------------------------| - * | | | | BL_Toggle | | | | |Vol-| | - * `----------------------------------------------------------------' + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_LALT, MO(_FL1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT + ), + /* Function Layer 1 - For ISO enter use ANSI enter + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┬───┐ + * │ ` │F1 │F2 │F3 │F4 │F5 │F6 │F7 │F8 │F9 │F10│F11│F12│ │Psc│ │ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┼───┤ + * │ │ │ │ │RST│ │ │ │ │ │ │ │ │ │Ins│ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┼───┤ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │Hme│ + * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┬───┼───┤ + * │ │ │ │ │ │ │ │ │ │Bl-│Bl+│ │ Mute │Vl+│End│ + * ├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┼───┴┬──┴─┬─┴──┬───┼───┼───┤ + * │ │ │ │ BL_Toggle │ │ │ │ │Vl-│ │ + * └────┴────┴────┴─────────────────────┴────┴────┴────┴───┴───┴───┘ */ [_FL1] = 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, _______, RGB_TOG, RGB_VAI, RGB_SAI, RGB_HUI, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_INS, _______, RGB_VAD, RGB_SAD, RGB_HUD, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, _______, _______, _______, _______, _______, _______, _______, _______, _______, BL_DEC, BL_INC, _______, KC_MUTE, KC_VOLU, KC_END, - _______, _______, _______, BL_TOGG, _______, _______, _______, _______, KC_VOLD, _______), - /* _FL2: Function Layer 2 - For ISO enter use ANSI enter - * ,----------------------------------------------------------------. - * | | | | | | | | | | | | | | | | | - * |----------------------------------------------------------------| - * | | | | | | | | | | | | | | | | - * |----------------------------------------------------------------| - * | | | | | | | | | | | | | | | | - * |----------------------------------------------------------------| - * | | | | | | | | | | | | | | | | - * |----------------------------------------------------------------| - * | | | | | | | | | | | - * `----------------------------------------------------------------' + _______, _______, _______, BL_TOGG, _______, _______, _______, _______, KC_VOLD, _______ + ), + /* Function Layer 2 - For ISO enter use ANSI enter + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┬───┐ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┼───┤ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┼───┤ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┬───┼───┤ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + * ├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┼───┴┬──┴─┬─┴──┬───┼───┼───┤ + * │ │ │ │ │ │ │ │ │ │ │ + * └────┴────┴────┴─────────────────────┴────┴────┴────┴───┴───┴───┘ */ [_FL2] = LAYOUT( _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______), - - -}; - - -void matrix_init_user(void) { -} - -void matrix_scan_user(void) { -} - -bool process_record_user(uint16_t keycode, keyrecord_t *record) { - return true; -} - + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + /* Function Layer 3 - For ISO enter use ANSI enter + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┬───┐ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┼───┤ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┼───┤ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┬───┼───┤ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + * ├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┼───┴┬──┴─┬─┴──┬───┼───┼───┤ + * │ │ │ │ │ │ │ │ │ │ │ + * └────┴────┴────┴─────────────────────┴────┴────┴────┴───┴───┴───┘ + */ + [_FL3] = LAYOUT( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), +}; \ No newline at end of file diff --git a/keyboards/noxary/x268/keymaps/default/readme.md b/keyboards/noxary/x268/keymaps/default/readme.md index 5d5bd69592ca..3540b3905042 100644 --- a/keyboards/noxary/x268/keymaps/default/readme.md +++ b/keyboards/noxary/x268/keymaps/default/readme.md @@ -1 +1,3 @@ # The default keymap for x268 + +![x268 Layout Image](https://i.imgur.com/D9jQz6g.png) diff --git a/keyboards/noxary/x268/keymaps/via/keymap.c b/keyboards/noxary/x268/keymaps/via/keymap.c new file mode 100644 index 000000000000..7f26a6c10ecd --- /dev/null +++ b/keyboards/noxary/x268/keymaps/via/keymap.c @@ -0,0 +1,111 @@ +/* Copyright 2020 Rozakiin + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public 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. +enum layer_names { + _BL, + _FL1, + _FL2, + _FL3 +}; + + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* Base Layer - For ISO enter use ANSI enter + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┬───┐ + * │Esc│ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ - │ = │ \ │Bsp│ ` │ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┼───┤ + * │ Tab │ Q │ W │ E │ R │ T │ Y │ U │ I │ O │ P │ [ │ ] │ \ │Del│ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┼───┤ + * │ Caps │ A │ S │ D │ F │ G │ H │ J │ K │ L │ ; │ ' │ # │Ent │PgU│ + * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┬───┼───┤ + * │Sft │ \ │ Z │ X │ C │ V │ B │ N │ M │ , │ . │ / │Shift │ ↑ │PgD│ + * ├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┼───┴┬──┴─┬─┴──┬───┼───┼───┤ + * │Ctrl│Win │Alt │ Space │Alt │M(1)│Ctrl│ ← │ ↓ │ → │ + * └────┴────┴────┴─────────────────────┴────┴────┴────┴───┴───┴───┘ + */ + [_BL] = 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_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_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_LALT, MO(_FL1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT + ), + /* Function Layer 1 - For ISO enter use ANSI enter + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┬───┐ + * │ ` │F1 │F2 │F3 │F4 │F5 │F6 │F7 │F8 │F9 │F10│F11│F12│ │Psc│ │ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┼───┤ + * │ │ │ │ │RST│ │ │ │ │ │ │ │ │ │Ins│ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┼───┤ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │Hme│ + * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┬───┼───┤ + * │ │ │ │ │ │ │ │ │ │Bl-│Bl+│ │ Mute │Vl+│End│ + * ├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┼───┴┬──┴─┬─┴──┬───┼───┼───┤ + * │ │ │ │ BL_Toggle │ │ │ │ │Vl-│ │ + * └────┴────┴────┴─────────────────────┴────┴────┴────┴───┴───┴───┘ + */ + [_FL1] = 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, _______, + RGB_TOG, RGB_VAI, RGB_SAI, RGB_HUI, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_INS, + _______, RGB_VAD, RGB_SAD, RGB_HUD, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, + _______, _______, _______, _______, _______, _______, _______, _______, _______, BL_DEC, BL_INC, _______, KC_MUTE, KC_VOLU, KC_END, + _______, _______, _______, BL_TOGG, _______, _______, _______, _______, KC_VOLD, _______ + ), + /* Function Layer 2 - For ISO enter use ANSI enter + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┬───┐ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┼───┤ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┼───┤ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┬───┼───┤ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + * ├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┼───┴┬──┴─┬─┴──┬───┼───┼───┤ + * │ │ │ │ │ │ │ │ │ │ │ + * └────┴────┴────┴─────────────────────┴────┴────┴────┴───┴───┴───┘ + */ + [_FL2] = LAYOUT( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + /* Function Layer 3 - For ISO enter use ANSI enter + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┬───┐ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┼───┤ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┼───┤ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┬───┼───┤ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + * ├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┼───┴┬──┴─┬─┴──┬───┼───┼───┤ + * │ │ │ │ │ │ │ │ │ │ │ + * └────┴────┴────┴─────────────────────┴────┴────┴────┴───┴───┴───┘ + */ + [_FL3] = LAYOUT( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), +}; \ No newline at end of file diff --git a/keyboards/noxary/x268/keymaps/via/readme.md b/keyboards/noxary/x268/keymaps/via/readme.md new file mode 100644 index 000000000000..e0e0b9f92d02 --- /dev/null +++ b/keyboards/noxary/x268/keymaps/via/readme.md @@ -0,0 +1,3 @@ +# The VIA keymap for x268 + +![x268 Layout Image](https://i.imgur.com/D9jQz6g.png) diff --git a/keyboards/noxary/x268/keymaps/via/rules.mk b/keyboards/noxary/x268/keymaps/via/rules.mk new file mode 100644 index 000000000000..c2e96d233b21 --- /dev/null +++ b/keyboards/noxary/x268/keymaps/via/rules.mk @@ -0,0 +1,5 @@ +VIA_ENABLE = yes +MOUSEKEY_ENABLE = no +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = no # Commands for debug and configuration +LTO_ENABLE = yes diff --git a/keyboards/noxary/x268/readme.md b/keyboards/noxary/x268/readme.md index c1c05c34d584..4dd1a7c78a61 100644 --- a/keyboards/noxary/x268/readme.md +++ b/keyboards/noxary/x268/readme.md @@ -2,11 +2,10 @@ ![x268](https://geekhack.org/index.php?action=dlattach;topic=96377.0;attach=198826;image) -A fully customizable 65% keyboard. +A fully customizable RGB 65% keyboard. * Keyboard Maintainer: [Rozakiin](https://github.com/rozakiin) * Hardware Supported: x268 PCB - * rev1 * Hardware Availability: * [Noxary - 268](https://geekhack.org/index.php?topic=92066.0) * [LZ - CLS ms](https://geekhack.org/index.php?topic=96377) diff --git a/keyboards/noxary/x268/rules.mk b/keyboards/noxary/x268/rules.mk index a8654dc912f4..c4b8c21177e2 100644 --- a/keyboards/noxary/x268/rules.mk +++ b/keyboards/noxary/x268/rules.mk @@ -14,17 +14,17 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration -MOUSEKEY_ENABLE = no # Mouse keys +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 on B7 by default -RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow +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 UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID diff --git a/keyboards/noxary/x268/x268.c b/keyboards/noxary/x268/x268.c index 3921270acc6f..589d59deff8b 100644 --- a/keyboards/noxary/x268/x268.c +++ b/keyboards/noxary/x268/x268.c @@ -1,4 +1,4 @@ -/* Copyright 2018 Rozakiin +/* Copyright 2020 Rozakiin * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -15,39 +15,20 @@ */ #include "x268.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(B0); 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_user(uint8_t usb_led) { - - if (usb_led & (1 << USB_LED_CAPS_LOCK)) { - DDRB |= (1 << 0); PORTB |= (1 << 0); - } - else { - DDRB &= ~(1 << 0); PORTB &= ~(1 << 0); +bool led_update_kb(led_t led_state) { + if(led_update_user(led_state)) { + writePin(B0, led_state.caps_lock); } + return true; } From a8bb5840ad3e093b82e5c08fd594ab35c554a876 Mon Sep 17 00:00:00 2001 From: Rozakiin <6567067+Rozakiin@users.noreply.github.com> Date: Tue, 23 Jun 2020 07:24:33 +0100 Subject: [PATCH 238/930] Update VIA support for Noxary 268.2 (#9451) * Update readme.md description * Enable bootmagic lite * Update USB descriptor * Add modern led code * Update default keymap for readability * Update default keymap readme with layout image * Add VIA keymap * Update keyboards/noxary/268_2/keymaps/default/readme.md Flip order of layout image and title * Update keyboards/noxary/268_2/keymaps/via/readme.md Flip order of layout image and title * Update keyboards/noxary/268_2/readme.md bullet point keyboard maintainer * Update keyboards/noxary/268_2/readme.md Change list style --- keyboards/noxary/268_2/268_2.c | 19 +-- keyboards/noxary/268_2/config.h | 34 +----- .../noxary/268_2/keymaps/default/keymap.c | 68 ++++++++++- .../noxary/268_2/keymaps/default/readme.md | 4 +- keyboards/noxary/268_2/keymaps/via/keymap.c | 110 ++++++++++++++++++ keyboards/noxary/268_2/keymaps/via/readme.md | 3 + keyboards/noxary/268_2/keymaps/via/rules.mk | 5 + keyboards/noxary/268_2/readme.md | 8 +- keyboards/noxary/268_2/rules.mk | 2 +- 9 files changed, 202 insertions(+), 51 deletions(-) create mode 100644 keyboards/noxary/268_2/keymaps/via/keymap.c create mode 100644 keyboards/noxary/268_2/keymaps/via/readme.md create mode 100644 keyboards/noxary/268_2/keymaps/via/rules.mk diff --git a/keyboards/noxary/268_2/268_2.c b/keyboards/noxary/268_2/268_2.c index 5af56a386d67..9a2b4432d3d8 100644 --- a/keyboards/noxary/268_2/268_2.c +++ b/keyboards/noxary/268_2/268_2.c @@ -15,13 +15,16 @@ */ #include "268_2.h" -void led_set_kb(uint8_t usb_led) { - if (IS_LED_ON(usb_led, USB_LED_CAPS_LOCK)) { - setPinOutput(B0); - writePinHigh(B0); - } else { - setPinInput(B0); - } +void matrix_init_kb(void) { + // put your keyboard start-up code here + // runs once when the firmware starts up + setPinOutput(B0); + matrix_init_user(); +} - led_set_user(usb_led); +bool led_update_kb(led_t led_state) { + if(led_update_user(led_state)) { + writePin(B0, led_state.caps_lock); + } + return true; } diff --git a/keyboards/noxary/268_2/config.h b/keyboards/noxary/268_2/config.h index fbfb97f02bf6..1d6681595bbc 100644 --- a/keyboards/noxary/268_2/config.h +++ b/keyboards/noxary/268_2/config.h @@ -20,12 +20,12 @@ along with this program. If not, see . #include "config_common.h" /* USB Device descriptor parameter */ -#define VENDOR_ID 0x4E58 -#define PRODUCT_ID 0x0044 +#define VENDOR_ID 0x4E58 //"NX" +#define PRODUCT_ID 0x010C //268 #define DEVICE_VER 0x0002 #define MANUFACTURER Noxary #define PRODUCT 268.2 -#define DESCRIPTION QMK keyboard firmware for 268.2 +#define DESCRIPTION A fully customizable 65% keyboard. /* key matrix size */ #define MATRIX_ROWS 5 @@ -57,34 +57,6 @@ along with this program. If not, see . //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 diff --git a/keyboards/noxary/268_2/keymaps/default/keymap.c b/keyboards/noxary/268_2/keymaps/default/keymap.c index 01d5613cac4e..90e392deb857 100644 --- a/keyboards/noxary/268_2/keymaps/default/keymap.c +++ b/keyboards/noxary/268_2/keymaps/default/keymap.c @@ -1,3 +1,18 @@ +/* Copyright 2020 Rozakiin + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public 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. @@ -6,7 +21,9 @@ // entirely and just use numbers. enum layer_names { _BL, - _FL + _FL1, + _FL2, + _FL3 }; const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { @@ -28,10 +45,9 @@ 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_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_LEFT, KC_DOWN, KC_RGHT + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(_FL1), KC_LEFT, KC_DOWN, KC_RGHT ), - - /* Function Layer + /* Function Layer 1 * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┬───┐ * │ ` │F1 │F2 │F3 │F4 │F5 │F6 │F7 │F8 │F9 │F10│F11│F12│ PScr │ │ * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┼───┤ @@ -44,11 +60,51 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * │ │ │ │ BL Toggle │ │ │ │ │Vl-│ │ * └────┴────┴────┴────────────────────────┴────┴────┴─┴───┴───┴───┘ */ - [_FL] = LAYOUT_65_ansi_blocker( + [_FL1] = 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_PSCR, _______, _______, _______, _______, _______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_INS, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, _______, _______, _______, _______, _______, _______, _______, _______, _______, BL_DEC, BL_INC, KC_MUTE, KC_VOLU, KC_END, _______, _______, _______, BL_TOGG, _______, _______, _______, KC_VOLD, _______ - ) + ), + /* Function Layer 2 + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┬───┐ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┼───┤ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┼───┤ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┬───┼───┤ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + * ├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬─┬───┼───┼───┤ + * │ │ │ │ │ │ │ │ │ │ │ + * └────┴────┴────┴────────────────────────┴────┴────┴─┴───┴───┴───┘ + */ + [_FL2] = LAYOUT_65_ansi_blocker( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + /* Function Layer 3 + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┬───┐ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┼───┤ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┼───┤ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┬───┼───┤ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + * ├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬─┬───┼───┼───┤ + * │ │ │ │ │ │ │ │ │ │ │ + * └────┴────┴────┴────────────────────────┴────┴────┴─┴───┴───┴───┘ + */ + [_FL3] = LAYOUT_65_ansi_blocker( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), }; diff --git a/keyboards/noxary/268_2/keymaps/default/readme.md b/keyboards/noxary/268_2/keymaps/default/readme.md index c4c832cc645d..2dfcc984e742 100644 --- a/keyboards/noxary/268_2/keymaps/default/readme.md +++ b/keyboards/noxary/268_2/keymaps/default/readme.md @@ -1 +1,3 @@ -# The default keymap for 268_2 +# The default keymap for 268.2 + +![Noxary 268.2 Layout Image](https://i.imgur.com/oIQiqcy.png) diff --git a/keyboards/noxary/268_2/keymaps/via/keymap.c b/keyboards/noxary/268_2/keymaps/via/keymap.c new file mode 100644 index 000000000000..c4f044e4fe0b --- /dev/null +++ b/keyboards/noxary/268_2/keymaps/via/keymap.c @@ -0,0 +1,110 @@ +/* Copyright 2020 Rozakiin + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public 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. +enum layer_names { + _BL, + _FL1, + _FL2, + _FL3 +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* Base Layer + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┬───┐ + * │Esc│ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ - │ = │ Bspc │ ` │ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┼───┤ + * │ Tab │ Q │ W │ E │ R │ T │ Y │ U │ I │ O │ P │ [ │ ] │ \ │Del│ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┼───┤ + * │ Caps │ A │ S │ D │ F │ G │ H │ J │ K │ L │ ; │ ' │ Enter │PgU│ + * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┬───┼───┤ + * │ Shift │ Z │ X │ C │ V │ B │ N │ M │ , │ . │ / │Shift │ ↑ │PgD│ + * ├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬─┬───┼───┼───┤ + * │Ctrl│Win │Alt │ Space │Alt │ Fn │ │ ← │ ↓ │ → │ + * └────┴────┴────┴────────────────────────┴────┴────┴─┴───┴───┴───┘ + */ + [_BL] = LAYOUT_65_ansi_blocker( + 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(_FL1), KC_LEFT, KC_DOWN, KC_RGHT + ), + /* Function Layer 1 + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┬───┐ + * │ ` │F1 │F2 │F3 │F4 │F5 │F6 │F7 │F8 │F9 │F10│F11│F12│ PScr │ │ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┼───┤ + * │ │ │ │ │RST│ │ │ │ │ │ │ │ │ │Ins│ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┼───┤ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │Hom│ + * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┬───┼───┤ + * │ │ │ │ │ │ │ │ │ │Bl-│Bl+│ Mute │Vl+│End│ + * ├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬─┬───┼───┼───┤ + * │ │ │ │ BL Toggle │ │ │ │ │Vl-│ │ + * └────┴────┴────┴────────────────────────┴────┴────┴─┴───┴───┴───┘ + */ + [_FL1] = 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_PSCR, _______, + _______, _______, _______, _______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_INS, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, + _______, _______, _______, _______, _______, _______, _______, _______, _______, BL_DEC, BL_INC, KC_MUTE, KC_VOLU, KC_END, + _______, _______, _______, BL_TOGG, _______, _______, _______, KC_VOLD, _______ + ), + /* Function Layer 2 + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┬───┐ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┼───┤ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┼───┤ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┬───┼───┤ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + * ├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬─┬───┼───┼───┤ + * │ │ │ │ │ │ │ │ │ │ │ + * └────┴────┴────┴────────────────────────┴────┴────┴─┴───┴───┴───┘ + */ + [_FL2] = LAYOUT_65_ansi_blocker( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + /* Function Layer 3 + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┬───┐ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┼───┤ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┼───┤ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┬───┼───┤ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + * ├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬─┬───┼───┼───┤ + * │ │ │ │ │ │ │ │ │ │ │ + * └────┴────┴────┴────────────────────────┴────┴────┴─┴───┴───┴───┘ + */ + [_FL3] = LAYOUT_65_ansi_blocker( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), +}; diff --git a/keyboards/noxary/268_2/keymaps/via/readme.md b/keyboards/noxary/268_2/keymaps/via/readme.md new file mode 100644 index 000000000000..0918bfb97c8d --- /dev/null +++ b/keyboards/noxary/268_2/keymaps/via/readme.md @@ -0,0 +1,3 @@ +# The VIA keymap for 268.2 + +![Noxary 268.2 Layout Image](https://i.imgur.com/oIQiqcy.png) diff --git a/keyboards/noxary/268_2/keymaps/via/rules.mk b/keyboards/noxary/268_2/keymaps/via/rules.mk new file mode 100644 index 000000000000..1974f5d3f591 --- /dev/null +++ b/keyboards/noxary/268_2/keymaps/via/rules.mk @@ -0,0 +1,5 @@ +VIA_ENABLE = yes +MOUSEKEY_ENABLE = no +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = no # Commands for debug and configuration +LTO_ENABLE = yes \ No newline at end of file diff --git a/keyboards/noxary/268_2/readme.md b/keyboards/noxary/268_2/readme.md index 075a1d26c7d7..5689594c0bcd 100644 --- a/keyboards/noxary/268_2/readme.md +++ b/keyboards/noxary/268_2/readme.md @@ -1,12 +1,12 @@ # Noxary 268.2 -![268.2](https://www.keebtalk.com/uploads/db8059/original/2X/6/65b93c83cadd98bbf8e3b1d739621d54b682609a.jpg) +![Noxary 268.2](https://www.keebtalk.com/uploads/db8059/original/2X/6/65b93c83cadd98bbf8e3b1d739621d54b682609a.jpg) A fully customizable 65% keyboard. -Keyboard Maintainer: [Rozakiin](https://github.com/rozakiin) -Hardware Supported: 268.2 PCB -Hardware Availability: [Noxary](https://shop.noxary.co/collections/268-2/products/noxary-268-2-polycarbonate) +* Keyboard Maintainer: [Rozakiin](https://github.com/rozakiin) +* Hardware Supported: Noxary 268.2 PCB +* Hardware Availability: [Noxary](https://shop.noxary.co/collections/268-2/products/noxary-268-2-polycarbonate) Make example for this keyboard (after setting up your build environment): diff --git a/keyboards/noxary/268_2/rules.mk b/keyboards/noxary/268_2/rules.mk index 230ecc453810..168d3a2c120a 100644 --- a/keyboards/noxary/268_2/rules.mk +++ b/keyboards/noxary/268_2/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 = no # Console for debug From 9ae8a451978dac09365a95f1e0173166fca3d096 Mon Sep 17 00:00:00 2001 From: shela Date: Tue, 23 Jun 2020 16:24:23 +0900 Subject: [PATCH 239/930] fixed the layer limit of LT() (#9492) --- docs/feature_layers.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/feature_layers.md b/docs/feature_layers.md index c6ffb24053b6..d3ee747e69f6 100644 --- a/docs/feature_layers.md +++ b/docs/feature_layers.md @@ -19,7 +19,7 @@ These functions allow you to activate layers in various ways. Note that layers a ### Caveats :id=caveats -Currently, `LT()` and `MT()` are limited to the [Basic Keycode set](keycodes_basic.md), meaning you can't use keycodes like `LCTL()`, `KC_TILD`, or anything greater than `0xFF`. Specifically, dual function keys like `LT` and `MT` use a 16 bit keycode. 4 bits are used for the function identifier, the next 12 are divided into the parameters. Layer Tap uses 4 bits for the layer (and is why it's limited to layers 0-16, actually), while Mod Tap does the same, 4 bits for the identifier, 4 bits for which mods are used, and all of them use 8 bits for the keycode. Because of this, the keycode used is limited to `0xFF` (0-255), which are the basic keycodes only. +Currently, `LT()` and `MT()` are limited to the [Basic Keycode set](keycodes_basic.md), meaning you can't use keycodes like `LCTL()`, `KC_TILD`, or anything greater than `0xFF`. Specifically, dual function keys like `LT` and `MT` use a 16 bit keycode. 4 bits are used for the function identifier, the next 12 are divided into the parameters. Layer Tap uses 4 bits for the layer (and is why it's limited to layers 0-15, actually), while Mod Tap does the same, 4 bits for the identifier, 4 bits for which mods are used, and all of them use 8 bits for the keycode. Because of this, the keycode used is limited to `0xFF` (0-255), which are the basic keycodes only. Expanding this would be complicated, at best. Moving to a 32-bit keycode would solve a lot of this, but would double the amount of space that the keymap matrix uses. And it could potentially cause issues, too. If you need to apply modifiers to your tapped keycode, [Tap Dance](feature_tap_dance.md#example-5-using-tap-dance-for-advanced-mod-tap-and-layer-tap-keys) can be used to accomplish this. From b3b617633c0df8e38145d6efb8d64cc4760559ef Mon Sep 17 00:00:00 2001 From: umi <57262844+umi-umi@users.noreply.github.com> Date: Tue, 23 Jun 2020 16:42:01 +0900 Subject: [PATCH 240/930] [Docs] Japanese translation of docs/feature_layers.md (#9252) * add feature_layers.md translation * update based on comment * update based on comment * update based on comment --- docs/ja/feature_advanced_keycodes.md | 57 +++------------- docs/ja/feature_layers.md | 99 ++++++++++++++++++++++++++++ 2 files changed, 108 insertions(+), 48 deletions(-) create mode 100644 docs/ja/feature_layers.md diff --git a/docs/ja/feature_advanced_keycodes.md b/docs/ja/feature_advanced_keycodes.md index c6e21feb9463..502a67f80c43 100644 --- a/docs/ja/feature_advanced_keycodes.md +++ b/docs/ja/feature_advanced_keycodes.md @@ -1,53 +1,10 @@ -# レイヤーの切り替えとトグル :id=switching-and-toggling-layers +# 修飾キー :id=modifier-keys -これらの機能により、様々な方法でレイヤーをアクティブ化することができます。レイヤーは一般的に独立したレイアウトでは無いことに注意してください -- 複数のレイヤーを一度にアクティブ化することができ、レイヤーが `KC_TRNS` を使ってキーの押下を下のレイヤーに渡すことが一般的です。レイヤーの詳細については、[キーマップの概要](ja/keymap.md#keymap-and-layers)を見てください。MO()、LM()、TT() あるいは LT() を使って一時的なレイヤーの切り替えを使う場合、上のレイヤーのキーを透過にするようにしてください。さもないと意図したように動作しないかもしれません。 - -* `DF(layer)` - デフォルトレイヤーを切り替えます。デフォルトレイヤーは、他のレイヤーがその上に積み重なっている、常にアクティブな基本レイヤーです。デフォルトレイヤーの詳細については以下を見てください。これは QWERTY から Dvorak レイアウトに切り替えるために使うことができます。(これは一時的な切り替えであり、キーボードの電源が切れるまでしか持続しないことに注意してください。デフォルトレイヤーを永続的に変更するには、[process_record_user](ja/custom_quantum_functions.md#programming-the-behavior-of-any-keycode) 内で `set_single_persistent_default_layer` 関数を呼び出すなど、より深いカスタマイズが必要です。) -* `MO(layer)` - 一時的に*レイヤー*をアクティブにします。キーを放すとすぐに、レイヤーは非アクティブになります。 -* `LM(layer, mod)` - (`MO` のように)一時的に*レイヤー*をアクティブにしますが、モディファイア *mod* がアクティブな状態です。layer 0-15 と、左モディファイアのみをサポートします: `MOD_LCTL`、`MOD_LSFT`、`MOD_LALT`、`MOD_LGUI` (`KC_` の代わりに `MOD_` 定数を使うことに注意してください)。これらのモディファイアは、例えば `LM(_RAISE, MOD_LCTL | MOD_LALT)` のように、ビット単位の OR を使って組み合わせることができます。 -* `LT(layer, kc)` - ホールドされた時に*レイヤー*を一時的にアクティブにし、タップされた時に *kc* を送信します。layer 0-15 のみをサポートします。 -* `OSL(layer)` - 次のキーが押されるまで、一時的に*レイヤー*をアクティブにします。詳細と追加機能については、[ワンショットキー](ja/one_shot_keys.md)を見てください。 -* `TG(layer)` - *レイヤー*を切り替えます。非アクティブな場合はアクティブにし、逆も同様です。 -* `TO(layer)` - *レイヤー*をアクティブにし、他の全てのレイヤー(デフォルトレイヤーを除く)を非アクティブにします。この関数は特別です。1つのレイヤーをアクティブなレイヤースタックに追加/削除する代わりに、現在のアクティブなレイヤーを完全に置き換え、唯一上位のレイヤーを下位のレイヤーで置き換えることができるからです。これはキーダウンで(キーが押されるとすぐに)アクティブになります。 -* `TT(layer)` - レイヤーのタップ切り替え。キーを押したままにすると*レイヤー*がアクティブにされ、放すと非アクティブになります (`MO` 風)。繰り返しタップすると、レイヤーはオンあるいはオフを切り替えます (`TG` 風)。デフォルトでは5回のタップが必要ですが、`TAPPING_TOGGLE` を定義することで変更することができます -- 例えば、2回のタップだけで切り替えるには、`#define TAPPING_TOGGLE 2` を定義します。 - -## 注意事項 - -現在のところ、`LT()` と `MT()` は[基本的なキーコードセット](ja/keycodes_basic.md)に制限されています。つまり、`LCTL()`、`KC_TILD` あるいは `0xFF` より大きなキーコードを使うことができません。レイヤータップあるいはモッドタップのキーコードの一部として指定されたモディファイアは無視されます。タップしたキーコードにモディファイアを適用する必要がある場合は、[タップダンス](ja/feature_tap_dance.md#example-5-using-tap-dance-for-advanced-mod-tap-and-layer-tap-keys)を使うことができます。 - -さらに、モッドタップあるいはレイヤータップで少なくとも1つの右手用のモディファイアが指定された場合、指定された全てのモディファイアが右手用になるため、2つをうまく組み合わせて一致させることはできません。 - -# レイヤーの使用 - -レイヤーを切り替える時は注意してください。(キーボードを取り外さずに)そのレイヤーを非アクティブにすることができずレイヤーから移動できなくなる可能性があります。最も一般的な問題を避けるためのガイドラインを作成しました。 - -## 初心者 - -QMK を使い始めたばかりの場合は、全てを単純にしたいでしょう。レイヤーをセットアップする時は、これらのガイドラインに従ってください: - -* デフォルトの "base" レイヤーとして、layer 0 をセットアップします。これは通常の入力レイヤーであり、任意のレイアウト (qwerty、dvorak、colemak など)にすることができます。通常はキーボードのキーのほとんどまたは全てが定義されているため、これを最下位のレイヤーとして設定することが重要です。そうすることで、もしそれが他のレイヤーの上 (つまりレイヤー番号が大きい)にある場合の影響を防ぎます。 -* layer 0 をルートとして、レイヤーを "ツリー" レイアウトに配置します。他の複数のレイヤーから同じレイヤーに行こうとしないでください。 -* 各レイヤーのキーマップでは、より高い番号のレイヤーのみを参照します。レイヤーは最大の番号(最上位)のアクティブレイヤーから処理されるため、下位レイヤーの状態を変更するのは難しくエラーが発生しやすくなります。 - -## 中級ユーザ - -複数の基本レイヤーが必要な場合があります。例えば、QWERTY と Dvorak を切り替える場合、国ごとに異なるレイアウトを切り替える場合、あるいは異なるビデオゲームごとにレイアウトを切り替える場合などです。基本レイヤーは常に最小の番号のレイヤーである必要があります。複数の基本レイヤーがある場合、常にそれらを相互排他的に扱う必要があります。1つの基本レイヤーがオンの場合、他をオフにします。 - -## 上級ユーザ - -レイヤーがどのように動作し、何ができるかを理解したら、より創造的になります。初心者のセクションで列挙されている規則は、幾つかの巧妙な詳細を回避するのに役立ちますが、特に超コンパクトなキーボードのユーザにとって制約になる場合があります。レイヤーの仕組みを理解することで、レイヤーをより高度な方法で使うことができます。 - -レイヤーは番号順に上に積み重なっています。キーの押下の動作を決定する時に、QMK は上から順にレイヤーを走査し、`KC_TRNS` に設定されていない最初のアクティブなレイヤーに到達すると停止します。結果として、現在のレイヤーよりも数値的に低いレイヤーをアクティブにし、現在のレイヤー(あるいはアクティブでターゲットレイヤーよりも高い別のレイヤー)に `KC_TRNS` 以外のものがある場合、それが送信されるキーであり、アクティブ化したばかりのレイヤー上のキーではありません。これが、ほとんどの人の "なぜレイヤーが切り替わらないのか" 問題の原因です。 - -場合によっては、マクロ内あるいはタップダンスルーチンの一部としてレイヤーを切り替えほうが良いかもしれません。`layer_on` はレイヤーをアクティブにし、`layer_off` はそれを非アクティブにします。もっと多くのレイヤーに関する関数は、[action_layer.h](https://github.com/qmk/qmk_firmware/blob/master/tmk_core/common/action_layer.h) で見つけることができます。 - -# 修飾キー :id=modifier-keys - 以下のようにキーコードとモディファイアを組み合わせることができます。押すと、モディファイアのキーダウンイベントが送信され、次に `kc` のキーダウンイベントが送信されます。放すと、`kc` のキーアップイベントが送信され、次にモディファイアのキーアップイベントが送信されます。 | キー | エイリアス | 説明 | @@ -66,12 +23,16 @@ QMK を使い始めたばかりの場合は、全てを単純にしたいでし | `MEH(kc)` | | 左 Control、左 Shift、左 Alt を押しながら `kc` を押します。 | | `HYPR(kc)` | | 左 Control、左 Shift、左 Alt、左 GUI を押しながら `kc` を押します。 | -また、それらを繋げることができます。例えば、`LCTL(LALT(KC_DEL))` は1回のキー押下で Control+Alt+Delete を送信するキーを作成します。 +また、それらを繋げることができます。例えば、`LCTL(LALT(KC_DEL))` または `C(A(KC_DEL))` は1回のキー押下で Control+Alt+Delete を送信するキーを作成します。 -# 過去の内容 +# 過去の内容 :id=legacy-content このページには多くの機能が含まれていました。このページを構成していた多くのセクションをそれぞれのページに移動しました。これより下は全て単なるリダイレクトであるため、web上で古いリンクをたどっている人は探しているものを見つけることができます。 +## レイヤー :id=switching-and-toggling-layers + +* [レイヤー](ja/feature_layers.md) + ## モッドタップ :id=mod-tap * [モッドタップ](ja/mod_tap.md) diff --git a/docs/ja/feature_layers.md b/docs/ja/feature_layers.md new file mode 100644 index 000000000000..b855172094b0 --- /dev/null +++ b/docs/ja/feature_layers.md @@ -0,0 +1,99 @@ +# レイヤー :id=layers + + + +QMK ファームウェアの最も強力で良く使われている機能の一つは、レイヤーを使う機能です。ほとんどの人にとって、これはラップトップやタブレットキーボードにあるのと同じように、様々なキーを可能にするファンクションキーに相当します。 + +レイヤースタックがどのように動作するかの詳細な説明については、[キーマップの概要](ja/keymap.md#keymap-and-layers)を調べてください。 + +## レイヤーの切り替えとトグル :id=switching-and-toggling-layers + +以下の関数により、様々な方法でレイヤーをアクティブにすることができます。レイヤーは通常、独立したレイアウトでは無いことに注意してください -- 複数のレイヤーを一度にアクティブにすることができ、レイヤーが `KC_TRNS` を使ってキーの押下を下のレイヤーへと透過させることが一般的です。MO()、LM()、TT() あるいは LT() を使って一時的なレイヤーの切り替えを使う場合、上のレイヤーのキーを透過にするようにしてください。さもないと意図したように動作しないかもしれません。 + +* `DF(layer)` - デフォルトレイヤーを切り替えます。デフォルトレイヤーは、他のレイヤーがその上に積み重なっている、常にアクティブな基本レイヤーです。デフォルトレイヤーの詳細については以下を見てください。これは QWERTY から Dvorak レイアウトに切り替えるために使うことができます。(これは一時的な切り替えであり、キーボードの電源が切れるまでしか持続しないことに注意してください。デフォルトレイヤーを永続的に変更するには、[process_record_user](ja/custom_quantum_functions.md#programming-the-behavior-of-any-keycode) 内で `set_single_persistent_default_layer` 関数を呼び出すなど、より深いカスタマイズが必要です。) +* `MO(layer)` - 一時的に*レイヤー*をアクティブにします。キーを放すとすぐに、レイヤーは非アクティブになります。 +* `LM(layer, mod)` - (`MO` のように)一時的に*レイヤー*をアクティブにしますが、モディファイア *mod* がアクティブな状態です。layer 0-15 と、左モディファイアのみをサポートします: `MOD_LCTL`、`MOD_LSFT`、`MOD_LALT`、`MOD_LGUI` (`KC_` 定数の代わりに `MOD_` 定数を使うことに注意してください)。これらのモディファイアは、例えば `LM(_RAISE, MOD_LCTL | MOD_LALT)` のように、ビット単位の OR を使って組み合わせることができます。 +* `LT(layer, kc)` - ホールドされた時に*レイヤー*を一時的にアクティブにし、タップされた時に *kc* を送信します。layer 0-15 のみをサポートします。 +* `OSL(layer)` - 次のキーが押されるまで、一時的に*レイヤー*をアクティブにします。詳細と追加機能については、[ワンショットキー](ja/one_shot_keys.md)を見てください。 +* `TG(layer)` - *レイヤー*を切り替えます。非アクティブな場合はアクティブにし、逆も同様です。 +* `TO(layer)` - *レイヤー*をアクティブにし、他の全てのレイヤー(デフォルトレイヤーを除く)を非アクティブにします。この関数は特別です。1つのレイヤーをアクティブなレイヤースタックに追加/削除する代わりに、現在のアクティブなレイヤーを完全に置き換え、唯一上位のレイヤーを下位のレイヤーで置き換えることができるからです。これはキーダウンで(キーが押されるとすぐに)アクティブになります。 +* `TT(layer)` - レイヤーのタップ切り替え。キーを押したままにすると*レイヤー*がアクティブにされ、放すと非アクティブになります (`MO` 風)。繰り返しタップすると、レイヤーはオンあるいはオフを切り替えます (`TG` 風)。デフォルトでは5回のタップが必要ですが、`TAPPING_TOGGLE` を定義することで変更することができます -- 例えば、2回のタップだけで切り替えるには、`#define TAPPING_TOGGLE 2` を定義します。 + +### 注意事項 :id=caveats + +現在のところ、`LT()` と `MT()` は[基本的なキーコードセット](ja/keycodes_basic.md)に制限されています。つまり、`LCTL()`、`KC_TILD` あるいは `0xFF` より大きなキーコードを使うことができません。特に、`LT` と `MT` のような二重の機能キーは16ビットキーコードを使います。4ビットは機能の識別のために使われ、次の12ビットはパラメータに分かれます。レイヤータップはレイヤーに4ビットを使います(実はレイヤータップがレイヤー 0-16 に制限されている理由です)。モッドタップも同じですが、識別子に4ビット、モッドのために4ビットが使われ、全体でキーコードに8ビットを使います。このため、使用されるキーコードは `0xFF` (0-255) に制限され、基本的なキーコードのみです。 + +これを拡張してもせいぜい複雑になるだけでしょう。32ビットキーコードに移行すると、これの多くが解決されますが、キーマップマトリックスが使用する領域が2倍になります。また、問題が起きる可能性もあります。タップしたキーコードにモディファイアを適用する必要がある場合は、[タップダンス](ja/feature_tap_dance.md#example-5-using-tap-dance-for-advanced-mod-tap-and-layer-tap-keys)を使うことができます。 + +さらに、モッドタップあるいはレイヤータップで少なくとも1つの右手用のモディファイアが指定された場合、指定された全てのモディファイアが右手用になるため、2つをうまく組み合わせて一致させることはできません。 + +## レイヤーとの連携 :id=working-with-layers + +レイヤーを切り替える時は注意してください。(キーボードを取り外さずに)そのレイヤーを非アクティブにすることができずレイヤーから移動できなくなる可能性があります。最も一般的な問題を避けるためのガイドラインを作成しました。 + +### 初心者 :id=beginners + +QMK を使い始めたばかりの場合は、全てを単純にしたいでしょう。レイヤーをセットアップする時は、これらのガイドラインに従ってください: + +* デフォルトの "base" レイヤーとして、layer 0 をセットアップします。これは通常の入力レイヤーであり、任意のレイアウト (qwerty、dvorak、colemak など)にすることができます。通常はキーボードのキーのほとんどまたは全てが定義されているため、これを最下位のレイヤーとして設定することが重要です。そうすることで、もしそれが他のレイヤーの上 (つまりレイヤー番号が大きい)にある場合の影響を防ぎます。 +* layer 0 をルートとして、レイヤーを "ツリー" レイアウトに配置します。他の複数のレイヤーから同じレイヤーに行こうとしないでください。 +* 各レイヤーのキーマップでは、より高い番号のレイヤーのみを参照します。レイヤーは最大の番号(最上位)のアクティブレイヤーから処理されるため、下位レイヤーの状態を変更するのは難しくエラーが発生しやすくなります。 + +### 中級ユーザ :id=intermediate-users + +複数の基本レイヤーが必要な場合があります。例えば、QWERTY と Dvorak を切り替える場合、国ごとに異なるレイアウトを切り替える場合、あるいは異なるビデオゲームごとにレイアウトを切り替える場合などです。基本レイヤーは常に最小の番号のレイヤーである必要があります。複数の基本レイヤーがある場合、常にそれらを相互排他的に扱う必要があります。1つの基本レイヤーがオンの場合、他をオフにします。 + +### 上級ユーザ :id=advanced-users + +レイヤーがどのように動作し、何ができるかを理解したら、より創造的になります。初心者のセクションで列挙されている規則は、幾つかの巧妙な詳細を回避するのに役立ちますが、特に超コンパクトなキーボードのユーザにとって制約になる場合があります。レイヤーの仕組みを理解することで、レイヤーをより高度な方法で使うことができます。 + +レイヤーは番号順に上に積み重なっています。キーの押下の動作を決定する時に、QMK は上から順にレイヤーを走査し、`KC_TRNS` に設定されていない最初のアクティブなレイヤーに到達すると停止します。結果として、現在のレイヤーよりも数値的に低いレイヤーをアクティブにし、現在のレイヤー(あるいはアクティブでターゲットレイヤーよりも高い別のレイヤー)に `KC_TRNS` 以外のものがある場合、それが送信されるキーであり、アクティブ化したばかりのレイヤー上のキーではありません。これが、ほとんどの人の "なぜレイヤーが切り替わらないのか" 問題の原因です。 + +場合によっては、マクロ内あるいはタップダンスルーチンの一部としてレイヤーを切り替えほうが良いかもしれません。`layer_on` はレイヤーをアクティブにし、`layer_off` はそれを非アクティブにします。もっと多くのレイヤーに関する関数は、[action_layer.h](https://github.com/qmk/qmk_firmware/blob/master/tmk_core/common/action_layer.h) で見つけることができます。 + +## 関数 :id=functions + +レイヤーの使用あるいは操作に関係する多くの関数(と変数)があります。 + +| 関数 | 説明 | +|----------------------------------------------|---------------------------------------------------------------------------------------------------------| +| `layer_state_set(layer_mask)` | 直接レイヤーの状態を設定する (推奨。何をしているのか分かっていない場合は使わないでください)。 | +| `layer_clear()` | 全てのレイヤーを消去する (全てをオフにします)。 | +| `layer_move(layer)` | 指定されたレイヤーをオンにし、それ以外をオフにする。 | +| `layer_on(layer)` | 指定されたレイヤーをオンにし、それ以外を既存の状態のままにする。 | +| `layer_off(layer)` | 指定されたレイヤーをオフにし、それ以外を既存の状態のままにする。 | +| `layer_invert(layer)` | 指定されたレイヤーの状態を反転/トグルする。 | +| `layer_or(layer_mask)` | 指定されたレイヤーと既存のレイヤー状態の間で一致するビットに基づいてレイヤーをオンにする。 | +| `layer_and(layer_mask)` | 指定されたレイヤーと既存のレイヤー状態の間で有効なビットに基づいてレイヤーをオンにする。 | +| `layer_xor(layer_mask)` | 指定されたレイヤーと既存のレイヤー状態の間で一致しないビットに基づいてレイヤーをオンにする。 | +| `layer_debug(layer_mask)` | デバッガのコンソールに現在のビットマスクと最も高いレイヤーを出力する。 | +| `default_layer_set(layer_mask)` | 直接デフォルトレイヤーの状態を設定する (推奨。何をしているのか分かっていない場合は使わないでください)。 | +| `default_layer_or(layer_mask)` | 指定されたレイヤーと既存のデフォルトレイヤー状態の間で一致するビットに基づいてレイヤーをオンにする。 | +| `default_layer_and(layer_mask)` | 指定されたレイヤーと既存のデフォルトレイヤー状態の間で一致する有効なビットに基づいてレイヤーをオンにする。 | +| `default_layer_xor(layer_mask)` | 指定されたレイヤーと既存のデフォルトレイヤー状態の間で一致しないビットに基づいてレイヤーをオンにする。 | +| `default_layer_debug(layer_mask)` | デバッガのコンソールに現在のビットマスクと最も高いアクティブなレイヤーを出力する。 | +| [`set_single_persistent_default_layer(layer)`](ja/ref_functions.md#setting-the-persistent-default-layer) | デフォルトレイヤーを設定し、それを永続化メモリ (EEPROM) に書き込む。 | +| [`update_tri_layer(x, y, z)`](ja/ref_functions.md#update_tri_layerx-y-z) | レイヤー `x` と `y` の両方がオンであるかを調べ、それに基づいて `z` を設定する(両方がオンの場合オン、そうでなければオフ)。 | +| [`update_tri_layer_state(state, x, y, z)`](ja/ref_functions.md#update_tri_layer_statestate-x-y-z) | `update_tri_layer(x, y, z)` と同じことをするが、`layer_state_set_*` 関数から呼ばれる。 | + + +呼び出すことができる関数に加えて、レイヤーが変更されるたびに呼び出されるコールバック関数が幾つかあります。これはレイヤー状態を関数に渡し、読み取りや変更することができます。 + +| コールバック | 説明 | +|-----------------------------------------------------|----------------------------------------------------------------------------------------| +| `layer_state_set_kb(layer_state_t state)` | キーボードレベルのレイヤー関数のためのコールバック。 | +| `layer_state_set_user(layer_state_t state)` | ユーザレベルのレイヤー関数のためのコールバック。 | +| `default_layer_state_set_kb(layer_state_t state)` | キーボードレベルのデフォルトレイヤー関数のためのコールバック。キーボードの初期化時に呼ばれます。 | +| `default_layer_state_set_user(layer_state_t state)` | ユーザレベルのデフォルトレイヤー関数のためのコールバック。キーボードの初期化時に呼ばれます。 | + +?> これらのコールバックを使うための追加の情報については、[レイヤー変換コード](ja/custom_quantum_functions.md#layer-change-code)のドキュメントを調べてください。 + +| チェック関数 | 説明 | +|-------------------------------------------|------------------------------------------------------------------------------| +| `layer_state_cmp(cmp_layer_state, layer)` | これは `cmp_layer_state` を調べて、指定された `layer` が有効かどうかを確認します。これは、レイヤーコールバックで使うためのものです。 | +| `layer_state_is(layer)` | これはレイヤーの状態を調べて、指定された `layer` が有効かどうかを確認します。(グローバルレイヤー状態については、`layer_state_cmp` を呼びます)。 | + +!> `IS_LAYER_ON(layer)` もありますが、`layer_state_cmp` 関数には、レイヤー0で正しい値を返すようにするために追加の処理があります。さもないと、レイヤー0がオンになっているかどうかを確認する時に誤った値が返されることがあります。 From 146873fd8e6f3ca08ba1c0a283f70cb2e72c0c83 Mon Sep 17 00:00:00 2001 From: Brandon Schlack Date: Tue, 23 Jun 2020 01:27:34 -0700 Subject: [PATCH 241/930] Add more community layout support to Discipline (#8540) --- keyboards/coseyfannitutti/discipline/discipline.h | 8 ++++++-- keyboards/coseyfannitutti/discipline/rules.mk | 2 +- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/keyboards/coseyfannitutti/discipline/discipline.h b/keyboards/coseyfannitutti/discipline/discipline.h index 3369d7efb416..61ac086c8cdf 100644 --- a/keyboards/coseyfannitutti/discipline/discipline.h +++ b/keyboards/coseyfannitutti/discipline/discipline.h @@ -34,7 +34,7 @@ { K40, K41, K42, _x_, _x_, _x_, K46, _x_, _x_, K49, K4A, K4B, K4C, K4D, K4E} \ } -#define LAYOUT_65_ansi_2_right_mods( \ +#define LAYOUT_65_ansi_blocker( \ 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, \ @@ -48,6 +48,8 @@ { K40, K41, K42, _x_, _x_, _x_, K46, _x_, _x_, K49, K4A, _x_, K4C, K4D, K4E} \ } +#define LAYOUT_65_ansi_2_right_mods LAYOUT_65_ansi_blocker + #define LAYOUT_wkl_ansi_2_right_mods( \ 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, \ @@ -90,7 +92,7 @@ { K40, K41, K42, _x_, _x_, _x_, K46, _x_, _x_, K49, K4A, K4B, K4C, K4D, K4E} \ } -#define LAYOUT_65_iso_2_right_mods( \ +#define LAYOUT_65_iso_blocker( \ 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, K2D, K1D, K2E, \ @@ -104,6 +106,8 @@ { K40, K41, K42, _x_, _x_, _x_, K46, _x_, _x_, K49, K4A, _x_, K4C, K4D, K4E} \ } +#define LAYOUT_65_iso_2_right_mods LAYOUT_65_iso_blocker + #define LAYOUT_wkl_iso_2_right_mods( \ 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, \ diff --git a/keyboards/coseyfannitutti/discipline/rules.mk b/keyboards/coseyfannitutti/discipline/rules.mk index 5cf0b039655d..f556cb1d4463 100644 --- a/keyboards/coseyfannitutti/discipline/rules.mk +++ b/keyboards/coseyfannitutti/discipline/rules.mk @@ -35,4 +35,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 -LAYOUTS = 65_ansi 65_iso +LAYOUTS = 65_ansi 65_ansi_blocker 65_iso 65_iso_blocker From b0e30862d6d9d0d748ee9861e5751d5e9a885bfb Mon Sep 17 00:00:00 2001 From: Stefano Date: Tue, 23 Jun 2020 10:28:05 +0200 Subject: [PATCH 242/930] bm43a stevexyz keymap (#9468) Co-authored-by: Joel Challis Co-authored-by: steve --- keyboards/bm43a/keymaps/stevexyz/keymap.c | 40 ++++++++++++++++++++++ keyboards/bm43a/keymaps/stevexyz/readme.md | 25 ++++++++++++++ keyboards/bm43a/keymaps/stevexyz/rules.mk | 8 +++++ 3 files changed, 73 insertions(+) create mode 100644 keyboards/bm43a/keymaps/stevexyz/keymap.c create mode 100644 keyboards/bm43a/keymaps/stevexyz/readme.md create mode 100644 keyboards/bm43a/keymaps/stevexyz/rules.mk diff --git a/keyboards/bm43a/keymaps/stevexyz/keymap.c b/keyboards/bm43a/keymaps/stevexyz/keymap.c new file mode 100644 index 000000000000..04df426ba994 --- /dev/null +++ b/keyboards/bm43a/keymaps/stevexyz/keymap.c @@ -0,0 +1,40 @@ +/* Copyright 2020 Stefano Maragò + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public 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] = { // 12+11+11+9 + [0] = LAYOUT( + MT(MOD_LGUI,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_ENT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_UP, KC_DOT, + KC_LCTL, TT(1), KC_LALT, KC_SPC, MT(MOD_RSFT,KC_SPC), TT(1), KC_LEFT, KC_DOWN, KC_RGHT ), + [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_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL, + KC_LSFT, KC_GRV, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, KC_SCLN, KC_QUOT, KC_PGUP, KC_SLSH, + KC_LCTL, LT(2,KC_APP), KC_LALT, KC_SPC, MT(MOD_RSFT,KC_SPC), LT(2,KC_INS), KC_HOME, KC_PGDN, KC_END ), + [2] = LAYOUT( + DF(0), KC_PSCR, KC_SLCK, KC_PAUS, KC_PSLS, KC_PAST, KC_7, KC_8, KC_9, KC_PMNS, KC_PEQL, KC_BSPC, + KC_CAPS, KC_MPLY, KC_STOP, KC_MPRV, KC_MNXT, XXXXXXX, KC_4, KC_5, KC_6, KC_PPLS, KC_PENT, + DF(2), KC_MUTE, KC_VOLD, KC_VOLU, KC_COMM, KC_1, KC_2, KC_3, KC_MS_BTN1, KC_MS_UP, KC_MS_BTN2, + DF(3), XXXXXXX, XXXXXXX, KC_SPC, KC_0, KC_DOT, KC_MS_LEFT, KC_MS_DOWN, KC_MS_RIGHT ), + [3] = LAYOUT( + DF(0), KC_SLEP, KC_BRID, KC_BRIU, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RESET, + XXXXXXX, BL_TOGG, BL_DEC, BL_INC, BL_STEP, BL_BRTG, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + XXXXXXX, RGB_TOG, RGB_RMOD, RGB_MOD, RGB_VAD, RGB_VAI, RGB_HUD, RGB_HUI, RGB_SAD, RGB_SAI, XXXXXXX, + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX ), +}; + diff --git a/keyboards/bm43a/keymaps/stevexyz/readme.md b/keyboards/bm43a/keymaps/stevexyz/readme.md new file mode 100644 index 000000000000..9e4da10d2ad4 --- /dev/null +++ b/keyboards/bm43a/keymaps/stevexyz/readme.md @@ -0,0 +1,25 @@ +This is a full-featured bm43a layout inspired by the smaller "Super Micro gherkin" and "jj28" sisters. + +In addition to the default key layer, there is a function/numbers/symbols layer easily activated with either one of the two "meta" (red) keys and containing almost all keyset missing. + +On top of this, activated with both meta keys, there a system layer where are placed media keys, mouse emulation, and Numpad in addition to the PrintScreen/ScrLock/Pause keys. + +The below picture show all layers on the actual keys (if someone would be able to print these labels let me know! :)). + +![layout](https://raw.githubusercontent.com/stevexyz/qmk_firmware/master/keyboards/bm43a/keymaps/stevexyz/layout.jpeg) + +Notes: +- The Windows/OS key is overlayed with the Esc one +- To activate permanently the function/number/symbols layer you can use the "layer tap toggle" functionality (now set to the default 5 presses). For the system layer to be activated permanently is enough to hit shift in this layer (so with the two meta keys pressed) +- From the System Layer you can "jump" to an additional Lights layer pressing the control key +- Meta-Esc (or simply Esc from the System and Lights layers) and the keyboard is coming back to default key layer in case they are activated permanently + + +And a view on the actual build: + +![layout](https://raw.githubusercontent.com/stevexyz/qmk_firmware/master/keyboards/bm43a/keymaps/stevexyz/actualbuild.jpeg) + +In order to compile the module from qmk root directory use the command 'make bm43a:stevexyz' + +And in order to upload the new firmware use the command: 'bin/qmk flash -kb bm43a -km stevexyz' (you can initiate programming with keyboard RESET key, that in this keymap has been moved on the backspace button in the "lights" layer) + diff --git a/keyboards/bm43a/keymaps/stevexyz/rules.mk b/keyboards/bm43a/keymaps/stevexyz/rules.mk new file mode 100644 index 000000000000..fa2ef5c2b28a --- /dev/null +++ b/keyboards/bm43a/keymaps/stevexyz/rules.mk @@ -0,0 +1,8 @@ +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +COMMAND_ENABLE = no # Commands for debug and configuration +CONSOLE_ENABLE = no # Console for debug + +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow From a502ce43c3073325f7273e400f5524a3e8a61cdc Mon Sep 17 00:00:00 2001 From: moyi4681 Date: Tue, 23 Jun 2020 16:32:45 +0800 Subject: [PATCH 243/930] create maja info json (#9472) --- keyboards/kbdfans/maja/info.json | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 keyboards/kbdfans/maja/info.json diff --git a/keyboards/kbdfans/maja/info.json b/keyboards/kbdfans/maja/info.json new file mode 100644 index 000000000000..94760fb2a6ec --- /dev/null +++ b/keyboards/kbdfans/maja/info.json @@ -0,0 +1,12 @@ +{ + "keyboard_name": "maja", + "url": "", + "maintainer": "KBDFANS", + "width": 16, + "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}, {"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}, {"label":"Ctrl", "x":0, "y":4, "w":1.5}, {"label":"Win", "x":2.5, "y":4, "w":1.5}, {"label":"Alt", "x":4, "y":4, "w":2}, {"x":6, "y":4, "w":1.25}, {"label":"Alt", "x":7.25, "y":4, "w":2.75}, {"label":"Win", "x":10, "y":4, "w":1.5}, {"label":"Menu", "x":13, "y":4}, {"label":"Ctrl", "x":14, "y":4}, {"x":15, "y":4}] + } + } +} From aea2d6845a99973d7a1663382bcc7a0d0e6067e0 Mon Sep 17 00:00:00 2001 From: Ryan Date: Tue, 23 Jun 2020 18:40:00 +1000 Subject: [PATCH 244/930] Fix error_log complaint about Big Series boards (#9510) --- keyboards/bigseries/1key/info.json | 20 ++++++++++--------- keyboards/bigseries/1key/rules.mk | 32 +++++++++++++++++++++++++++++- keyboards/bigseries/2key/info.json | 21 +++++++++++--------- keyboards/bigseries/2key/rules.mk | 32 +++++++++++++++++++++++++++++- keyboards/bigseries/3key/info.json | 22 +++++++++++--------- keyboards/bigseries/3key/rules.mk | 32 +++++++++++++++++++++++++++++- keyboards/bigseries/4key/info.json | 24 +++++++++++++--------- keyboards/bigseries/4key/rules.mk | 32 +++++++++++++++++++++++++++++- keyboards/bigseries/rules.mk | 27 ------------------------- 9 files changed, 175 insertions(+), 67 deletions(-) delete mode 100755 keyboards/bigseries/rules.mk diff --git a/keyboards/bigseries/1key/info.json b/keyboards/bigseries/1key/info.json index ff2fd54c575f..a289e122d175 100644 --- a/keyboards/bigseries/1key/info.json +++ b/keyboards/bigseries/1key/info.json @@ -1,12 +1,14 @@ { - "keyboard_name": "Big Series 1-Key", - "url": "", - "maintainer": "qmk", - "width": 4, - "height": 4, - "layouts": { - "LAYOUT": { - "layout": [{"x":0, "y":0, "w":4, "h":4}] + "keyboard_name": "Big Series 1-Key", + "url": "", + "maintainer": "qmk", + "width": 4, + "height": 4, + "layouts": { + "LAYOUT": { + "layout": [ + {"x": 0, "y": 0, "w": 4, "h": 4} + ] + } } - } } diff --git a/keyboards/bigseries/1key/rules.mk b/keyboards/bigseries/1key/rules.mk index 772d56beb6df..111ac42f9f8a 100755 --- a/keyboards/bigseries/1key/rules.mk +++ b/keyboards/bigseries/1key/rules.mk @@ -1 +1,31 @@ -# Dummy file to make the QMK build system happy \ No newline at end of file +# 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 = 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 +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +AUDIO_ENABLE = no # Audio output +FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches diff --git a/keyboards/bigseries/2key/info.json b/keyboards/bigseries/2key/info.json index 2aea4d200568..faa5ac8545f8 100644 --- a/keyboards/bigseries/2key/info.json +++ b/keyboards/bigseries/2key/info.json @@ -1,12 +1,15 @@ { - "keyboard_name": "Big Series 2-Key", - "url": "", - "maintainer": "qmk", - "width": 8, - "height": 4, - "layouts": { - "LAYOUT": { - "layout": [{"x":0, "y":0, "w":4, "h":4}, {"x":4, "y":0, "w":4, "h":4}] + "keyboard_name": "Big Series 2-Key", + "url": "", + "maintainer": "qmk", + "width": 8, + "height": 4, + "layouts": { + "LAYOUT": { + "layout": [ + {"x": 0, "y": 0, "w": 4, "h": 4}, + {"x": 4, "y": 0, "w": 4, "h": 4} + ] + } } - } } diff --git a/keyboards/bigseries/2key/rules.mk b/keyboards/bigseries/2key/rules.mk index 772d56beb6df..111ac42f9f8a 100755 --- a/keyboards/bigseries/2key/rules.mk +++ b/keyboards/bigseries/2key/rules.mk @@ -1 +1,31 @@ -# Dummy file to make the QMK build system happy \ No newline at end of file +# 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 = 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 +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +AUDIO_ENABLE = no # Audio output +FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches diff --git a/keyboards/bigseries/3key/info.json b/keyboards/bigseries/3key/info.json index 8f0b8c55c203..4e48ca47e66a 100644 --- a/keyboards/bigseries/3key/info.json +++ b/keyboards/bigseries/3key/info.json @@ -1,12 +1,16 @@ { - "keyboard_name": "Big Series 3-Key", - "url": "", - "maintainer": "qmk", - "width": 12, - "height": 4, - "layouts": { - "LAYOUT": { - "layout": [{"x":0, "y":0, "w":4, "h":4}, {"x":4, "y":0, "w":4, "h":4}, {"x":8, "y":0, "w":4, "h":4}] + "keyboard_name": "Big Series 3-Key", + "url": "", + "maintainer": "qmk", + "width": 12, + "height": 4, + "layouts": { + "LAYOUT": { + "layout": [ + {"x": 0, "y": 0, "w": 4, "h": 4}, + {"x": 4, "y": 0, "w": 4, "h": 4}, + {"x": 8, "y": 0, "w": 4, "h": 4} + ] + } } - } } diff --git a/keyboards/bigseries/3key/rules.mk b/keyboards/bigseries/3key/rules.mk index 772d56beb6df..111ac42f9f8a 100755 --- a/keyboards/bigseries/3key/rules.mk +++ b/keyboards/bigseries/3key/rules.mk @@ -1 +1,31 @@ -# Dummy file to make the QMK build system happy \ No newline at end of file +# 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 = 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 +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +AUDIO_ENABLE = no # Audio output +FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches diff --git a/keyboards/bigseries/4key/info.json b/keyboards/bigseries/4key/info.json index 0bdee578a731..f31e4826a7dc 100644 --- a/keyboards/bigseries/4key/info.json +++ b/keyboards/bigseries/4key/info.json @@ -1,12 +1,18 @@ { - "keyboard_name": "Big Series 4-Key", - "url": "", - "maintainer": "qmk", - "width": 8, - "height": 8, - "layouts": { - "LAYOUT": { - "layout": [{"x":0, "y":0, "w":4, "h":4}, {"x":4, "y":0, "w":4, "h":4}, {"x":0, "y":4, "w":4, "h":4}, {"x":4, "y":4, "w":4, "h":4}] + "keyboard_name": "Big Series 4-Key", + "url": "", + "maintainer": "qmk", + "width": 8, + "height": 8, + "layouts": { + "LAYOUT": { + "layout": [ + {"x": 0, "y": 0, "w": 4, "h": 4}, + {"x": 4, "y": 0, "w": 4, "h": 4}, + + {"x": 0, "y": 4, "w": 4, "h": 4}, + {"x": 4, "y": 4, "w": 4, "h": 4} + ] + } } - } } diff --git a/keyboards/bigseries/4key/rules.mk b/keyboards/bigseries/4key/rules.mk index 772d56beb6df..111ac42f9f8a 100755 --- a/keyboards/bigseries/4key/rules.mk +++ b/keyboards/bigseries/4key/rules.mk @@ -1 +1,31 @@ -# Dummy file to make the QMK build system happy \ No newline at end of file +# 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 = 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 +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +AUDIO_ENABLE = no # Audio output +FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches diff --git a/keyboards/bigseries/rules.mk b/keyboards/bigseries/rules.mk deleted file mode 100755 index 2f52d9558623..000000000000 --- a/keyboards/bigseries/rules.mk +++ /dev/null @@ -1,27 +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 = 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 -BACKLIGHT_ENABLE = no # Custom backlighting code is used, so this should not be enabled -AUDIO_ENABLE = no # This can be enabled if a speaker is connected to the expansion port. Not compatible with RGBLIGHT below -RGBLIGHT_ENABLE = yes # This can be enabled if a ws2812 strip is connected to the expansion port. - From 3028662fa3b86be55e13875e82ec81969fca03be Mon Sep 17 00:00:00 2001 From: Danny Date: Tue, 23 Jun 2020 05:05:44 -0400 Subject: [PATCH 245/930] [Keyboard] Add KBO-5000 keyboard (#9381) * Initial fork of Sinc * Setup keymaps, layouts, and encoders * Add ANSI configurator layout * Add ISO layout for configurator * Add all layout option for configurator * Fix spacing * Remove extra line * Remove unneeded ifdef --- keyboards/keebio/kbo5000/config.h | 21 ++ keyboards/keebio/kbo5000/info.json | 339 ++++++++++++++++++ keyboards/keebio/kbo5000/kbo5000.c | 1 + keyboards/keebio/kbo5000/kbo5000.h | 7 + .../keebio/kbo5000/keymaps/default/keymap.c | 58 +++ keyboards/keebio/kbo5000/keymaps/iso/keymap.c | 58 +++ keyboards/keebio/kbo5000/keymaps/via/config.h | 3 + keyboards/keebio/kbo5000/keymaps/via/keymap.c | 58 +++ keyboards/keebio/kbo5000/keymaps/via/rules.mk | 3 + keyboards/keebio/kbo5000/readme.md | 20 ++ keyboards/keebio/kbo5000/rev1/config.h | 65 ++++ keyboards/keebio/kbo5000/rev1/rev1.c | 32 ++ keyboards/keebio/kbo5000/rev1/rev1.h | 73 ++++ keyboards/keebio/kbo5000/rev1/rules.mk | 3 + keyboards/keebio/kbo5000/rules.mk | 34 ++ 15 files changed, 775 insertions(+) create mode 100644 keyboards/keebio/kbo5000/config.h create mode 100644 keyboards/keebio/kbo5000/info.json create mode 100644 keyboards/keebio/kbo5000/kbo5000.c create mode 100644 keyboards/keebio/kbo5000/kbo5000.h create mode 100644 keyboards/keebio/kbo5000/keymaps/default/keymap.c create mode 100644 keyboards/keebio/kbo5000/keymaps/iso/keymap.c create mode 100644 keyboards/keebio/kbo5000/keymaps/via/config.h create mode 100644 keyboards/keebio/kbo5000/keymaps/via/keymap.c create mode 100644 keyboards/keebio/kbo5000/keymaps/via/rules.mk create mode 100644 keyboards/keebio/kbo5000/readme.md create mode 100644 keyboards/keebio/kbo5000/rev1/config.h create mode 100644 keyboards/keebio/kbo5000/rev1/rev1.c create mode 100644 keyboards/keebio/kbo5000/rev1/rev1.h create mode 100644 keyboards/keebio/kbo5000/rev1/rules.mk create mode 100644 keyboards/keebio/kbo5000/rules.mk diff --git a/keyboards/keebio/kbo5000/config.h b/keyboards/keebio/kbo5000/config.h new file mode 100644 index 000000000000..cfb6bf4ffccd --- /dev/null +++ b/keyboards/keebio/kbo5000/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/keebio/kbo5000/info.json b/keyboards/keebio/kbo5000/info.json new file mode 100644 index 000000000000..222587c26b3f --- /dev/null +++ b/keyboards/keebio/kbo5000/info.json @@ -0,0 +1,339 @@ +{ + "keyboard_name": "KBO-5000", + "url": "https://keeb.io", + "maintainer": "nooges", + "width": 20.5, + "height": 6.25, + "layouts": { + "LAYOUT_ansi": { + "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":10, "y":0}, + {"label":"F8", "x":11, "y":0}, + {"label":"F9", "x":12.5, "y":0}, + {"label":"F10", "x":13.5, "y":0}, + {"label":"F11", "x":14.5, "y":0}, + {"label":"F12", "x":15.5, "y":0}, + {"label":"Prt Sc", "x":17.5, "y":0}, + {"label":"Scr Lk", "x":18.5, "y":0}, + {"label":"Pause", "x":19.5, "y":0}, + + {"label":"F13", "x":0, "y":1.25}, + {"label":"~", "x":1.5, "y":1.25}, + {"label":"!", "x":2.5, "y":1.25}, + {"label":"@", "x":3.5, "y":1.25}, + {"label":"#", "x":4.5, "y":1.25}, + {"label":"$", "x":5.5, "y":1.25}, + {"label":"%", "x":6.5, "y":1.25}, + {"label":"^", "x":7.5, "y":1.25}, + + {"label":"&", "x":10, "y":1.25}, + {"label":"*", "x":11, "y":1.25}, + {"label":"(", "x":12, "y":1.25}, + {"label":")", "x":13, "y":1.25}, + {"label":"_", "x":14, "y":1.25}, + {"label":"+", "x":15, "y":1.25}, + {"label":"Del", "x":16, "y":1.25}, + {"label":"Bksp", "x":17, "y":1.25}, + {"label":"Ins", "x":18.5, "y":1.25}, + {"label":"Pg Up", "x":19.5, "y":1.25}, + + {"label":"F14", "x":0, "y":2.25}, + {"label":"Tab", "x":1.5, "y":2.25, "w":1.5}, + {"label":"Q", "x":3, "y":2.25}, + {"label":"W", "x":4, "y":2.25}, + {"label":"E", "x":5, "y":2.25}, + {"label":"R", "x":6, "y":2.25}, + {"label":"T", "x":7, "y":2.25}, + + {"label":"Y", "x":9.5, "y":2.25}, + {"label":"U", "x":10.5, "y":2.25}, + {"label":"I", "x":11.5, "y":2.25}, + {"label":"O", "x":12.5, "y":2.25}, + {"label":"P", "x":13.5, "y":2.25}, + {"label":"{", "x":14.5, "y":2.25}, + {"label":"}", "x":15.5, "y":2.25}, + {"label":"|", "x":16.5, "y":2.25, "w":1.5}, + {"label":"Del", "x":18.5, "y":2.25}, + {"label":"Pg Dn", "x":19.5, "y":2.25}, + + {"label":"F15", "x":0, "y":3.25}, + {"label":"Caps Lock", "x":1.5, "y":3.25, "w":1.75}, + {"label":"A", "x":3.25, "y":3.25}, + {"label":"S", "x":4.25, "y":3.25}, + {"label":"D", "x":5.25, "y":3.25}, + {"label":"F", "x":6.25, "y":3.25}, + {"label":"G", "x":7.25, "y":3.25}, + + {"label":"H", "x":9.75, "y":3.25}, + {"label":"J", "x":10.75, "y":3.25}, + {"label":"K", "x":11.75, "y":3.25}, + {"label":"L", "x":12.75, "y":3.25}, + {"label":":", "x":13.75, "y":3.25}, + {"label":"\"", "x":14.75, "y":3.25}, + {"label":"Enter", "x":15.75, "y":3.25, "w":2.25}, + {"label":"Home", "x":18.5, "y":3.25}, + {"label":"End", "x":19.5, "y":3.25}, + + {"label":"F16", "x":0, "y":4.25}, + {"label":"Shift", "x":1.5, "y":4.25, "w":2.25}, + {"label":"Z", "x":3.75, "y":4.25}, + {"label":"X", "x":4.75, "y":4.25}, + {"label":"C", "x":5.75, "y":4.25}, + {"label":"V", "x":6.75, "y":4.25}, + {"label":"B", "x":7.75, "y":4.25}, + {"label":"N", "x":10.25, "y":4.25}, + {"label":"M", "x":11.25, "y":4.25}, + {"label":"<", "x":12.25, "y":4.25}, + {"label":">", "x":13.25, "y":4.25}, + {"label":"?", "x":14.25, "y":4.25}, + {"label":"Shift", "x":15.25, "y":4.25, "w":1.75}, + {"label":"Up", "x":18.5, "y":4.25}, + + {"label":"F17", "x":0, "y":5.25}, + {"label":"Ctrl", "x":1.5, "y":5.25, "w":1.25}, + {"label":"Win", "x":2.75, "y":5.25}, + {"label":"Alt", "x":3.75, "y":5.25, "w":1.25}, + {"label":"Fn", "x":5, "y":5.25, "w":1.25}, + {"label":"Space", "x":6.25, "y":5.25}, + {"label":"Fn", "x":7.25, "y":5.25, "w":1.25}, + {"label":"Fn", "x":10, "y":5.25, "w":1.25}, + {"label":"Space", "x":11.25, "y":5.25, "w":2.25}, + {"label":"Alt", "x":13.5, "y":5.25, "w":1.25}, + {"label":"Win", "x":14.75, "y":5.25}, + {"label":"Ctrl", "x":15.75, "y":5.25, "w":1.25}, + {"label":"Left", "x":17.5, "y":5.25}, + {"label":"Down", "x":18.5, "y":5.25}, + {"label":"Right", "x":19.5, "y":5.25} + ] + }, + "LAYOUT_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":10, "y":0}, + {"label":"F8", "x":11, "y":0}, + {"label":"F9", "x":12.5, "y":0}, + {"label":"F10", "x":13.5, "y":0}, + {"label":"F11", "x":14.5, "y":0}, + {"label":"F12", "x":15.5, "y":0}, + {"label":"Prt Sc", "x":17.5, "y":0}, + {"label":"Scr Lk", "x":18.5, "y":0}, + {"label":"Pause", "x":19.5, "y":0}, + + {"label":"F13", "x":0, "y":1.25}, + {"label":"~", "x":1.5, "y":1.25}, + {"label":"!", "x":2.5, "y":1.25}, + {"label":"@", "x":3.5, "y":1.25}, + {"label":"#", "x":4.5, "y":1.25}, + {"label":"$", "x":5.5, "y":1.25}, + {"label":"%", "x":6.5, "y":1.25}, + {"label":"^", "x":7.5, "y":1.25}, + + {"label":"&", "x":10, "y":1.25}, + {"label":"*", "x":11, "y":1.25}, + {"label":"(", "x":12, "y":1.25}, + {"label":")", "x":13, "y":1.25}, + {"label":"_", "x":14, "y":1.25}, + {"label":"+", "x":15, "y":1.25}, + {"label":"Del", "x":16, "y":1.25}, + {"label":"Bksp", "x":17, "y":1.25}, + {"label":"Ins", "x":18.5, "y":1.25}, + {"label":"Pg Up", "x":19.5, "y":1.25}, + + {"label":"F14", "x":0, "y":2.25}, + {"label":"Tab", "x":1.5, "y":2.25, "w":1.5}, + {"label":"Q", "x":3, "y":2.25}, + {"label":"W", "x":4, "y":2.25}, + {"label":"E", "x":5, "y":2.25}, + {"label":"R", "x":6, "y":2.25}, + {"label":"T", "x":7, "y":2.25}, + + {"label":"Y", "x":9.5, "y":2.25}, + {"label":"U", "x":10.5, "y":2.25}, + {"label":"I", "x":11.5, "y":2.25}, + {"label":"O", "x":12.5, "y":2.25}, + {"label":"P", "x":13.5, "y":2.25}, + {"label":"{", "x":14.5, "y":2.25}, + {"label":"}", "x":15.5, "y":2.25}, + {"label":"Del", "x":18.5, "y":2.25}, + {"label":"Pg Dn", "x":19.5, "y":2.25}, + + {"label":"F15", "x":0, "y":3.25}, + {"label":"Caps Lock", "x":1.5, "y":3.25, "w":1.75}, + {"label":"A", "x":3.25, "y":3.25}, + {"label":"S", "x":4.25, "y":3.25}, + {"label":"D", "x":5.25, "y":3.25}, + {"label":"F", "x":6.25, "y":3.25}, + {"label":"G", "x":7.25, "y":3.25}, + + {"label":"H", "x":9.75, "y":3.25}, + {"label":"J", "x":10.75, "y":3.25}, + {"label":"K", "x":11.75, "y":3.25}, + {"label":"L", "x":12.75, "y":3.25}, + {"label":":", "x":13.75, "y":3.25}, + {"label":"\"", "x":14.75, "y":3.25}, + {"label":"#", "x":15.75, "y":3.25}, + {"label":"Enter", "x":16.75, "y":2.25, "w":1.25, "h":2}, + {"label":"Home", "x":18.5, "y":3.25}, + {"label":"End", "x":19.5, "y":3.25}, + + {"label":"F16", "x":0, "y":4.25}, + {"label":"Shift", "x":1.5, "y":4.25, "w":1.25}, + {"label":"\\", "x":2.75, "y":4.25}, + {"label":"Z", "x":3.75, "y":4.25}, + {"label":"X", "x":4.75, "y":4.25}, + {"label":"C", "x":5.75, "y":4.25}, + {"label":"V", "x":6.75, "y":4.25}, + {"label":"B", "x":7.75, "y":4.25}, + {"label":"N", "x":10.25, "y":4.25}, + {"label":"M", "x":11.25, "y":4.25}, + {"label":"<", "x":12.25, "y":4.25}, + {"label":">", "x":13.25, "y":4.25}, + {"label":"?", "x":14.25, "y":4.25}, + {"label":"Shift", "x":15.25, "y":4.25, "w":1.75}, + {"label":"Up", "x":18.5, "y":4.25}, + + {"label":"F17", "x":0, "y":5.25}, + {"label":"Ctrl", "x":1.5, "y":5.25, "w":1.25}, + {"label":"Win", "x":2.75, "y":5.25}, + {"label":"Alt", "x":3.75, "y":5.25, "w":1.25}, + {"label":"Fn", "x":5, "y":5.25, "w":1.25}, + {"label":"Space", "x":6.25, "y":5.25}, + {"label":"Fn", "x":7.25, "y":5.25, "w":1.25}, + {"label":"Fn", "x":10, "y":5.25, "w":1.25}, + {"label":"Space", "x":11.25, "y":5.25, "w":2.25}, + {"label":"Alt", "x":13.5, "y":5.25, "w":1.25}, + {"label":"Win", "x":14.75, "y":5.25}, + {"label":"Ctrl", "x":15.75, "y":5.25, "w":1.25}, + {"label":"Left", "x":17.5, "y":5.25}, + {"label":"Down", "x":18.5, "y":5.25}, + {"label":"Right", "x":19.5, "y":5.25} + ] + }, + "LAYOUT_all": { + "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":10, "y":0}, + {"label":"F8", "x":11, "y":0}, + {"label":"F9", "x":12.5, "y":0}, + {"label":"F10", "x":13.5, "y":0}, + {"label":"F11", "x":14.5, "y":0}, + {"label":"F12", "x":15.5, "y":0}, + {"label":"Prt Sc", "x":17.5, "y":0}, + {"label":"Scr Lk", "x":18.5, "y":0}, + {"label":"Pause", "x":19.5, "y":0}, + + {"label":"F13", "x":0, "y":1.25}, + {"label":"~", "x":1.5, "y":1.25}, + {"label":"!", "x":2.5, "y":1.25}, + {"label":"@", "x":3.5, "y":1.25}, + {"label":"#", "x":4.5, "y":1.25}, + {"label":"$", "x":5.5, "y":1.25}, + {"label":"%", "x":6.5, "y":1.25}, + {"label":"^", "x":7.5, "y":1.25}, + + {"label":"&", "x":10, "y":1.25}, + {"label":"*", "x":11, "y":1.25}, + {"label":"(", "x":12, "y":1.25}, + {"label":")", "x":13, "y":1.25}, + {"label":"_", "x":14, "y":1.25}, + {"label":"+", "x":15, "y":1.25}, + {"label":"Del", "x":16, "y":1.25}, + {"label":"Bksp", "x":17, "y":1.25}, + {"label":"Ins", "x":18.5, "y":1.25}, + {"label":"Pg Up", "x":19.5, "y":1.25}, + + {"label":"F14", "x":0, "y":2.25}, + {"label":"Tab", "x":1.5, "y":2.25, "w":1.5}, + {"label":"Q", "x":3, "y":2.25}, + {"label":"W", "x":4, "y":2.25}, + {"label":"E", "x":5, "y":2.25}, + {"label":"R", "x":6, "y":2.25}, + {"label":"T", "x":7, "y":2.25}, + + {"label":"Y", "x":9.5, "y":2.25}, + {"label":"U", "x":10.5, "y":2.25}, + {"label":"I", "x":11.5, "y":2.25}, + {"label":"O", "x":12.5, "y":2.25}, + {"label":"P", "x":13.5, "y":2.25}, + {"label":"{", "x":14.5, "y":2.25}, + {"label":"}", "x":15.5, "y":2.25}, + {"label":"|", "x":16.5, "y":2.25, "w":1.5}, + {"label":"Del", "x":18.5, "y":2.25}, + {"label":"Pg Dn", "x":19.5, "y":2.25}, + + {"label":"F15", "x":0, "y":3.25}, + {"label":"Caps Lock", "x":1.5, "y":3.25, "w":1.75}, + {"label":"A", "x":3.25, "y":3.25}, + {"label":"S", "x":4.25, "y":3.25}, + {"label":"D", "x":5.25, "y":3.25}, + {"label":"F", "x":6.25, "y":3.25}, + {"label":"G", "x":7.25, "y":3.25}, + + {"label":"H", "x":9.75, "y":3.25}, + {"label":"J", "x":10.75, "y":3.25}, + {"label":"K", "x":11.75, "y":3.25}, + {"label":"L", "x":12.75, "y":3.25}, + {"label":":", "x":13.75, "y":3.25}, + {"label":"\"", "x":14.75, "y":3.25}, + {"label":"#", "x":15.75, "y":3.25}, + {"label":"Enter", "x":16.75, "y":3.25, "w":1.25}, + {"label":"Home", "x":18.5, "y":3.25}, + {"label":"End", "x":19.5, "y":3.25}, + + {"label":"F16", "x":0, "y":4.25}, + {"label":"Shift", "x":1.5, "y":4.25, "w":1.25}, + {"label":"\\", "x":2.75, "y":4.25}, + {"label":"Z", "x":3.75, "y":4.25}, + {"label":"X", "x":4.75, "y":4.25}, + {"label":"C", "x":5.75, "y":4.25}, + {"label":"V", "x":6.75, "y":4.25}, + {"label":"B", "x":7.75, "y":4.25}, + {"label":"N", "x":10.25, "y":4.25}, + {"label":"M", "x":11.25, "y":4.25}, + {"label":"<", "x":12.25, "y":4.25}, + {"label":">", "x":13.25, "y":4.25}, + {"label":"?", "x":14.25, "y":4.25}, + {"label":"Shift", "x":15.25, "y":4.25, "w":1.75}, + {"label":"Up", "x":18.5, "y":4.25}, + + {"label":"F17", "x":0, "y":5.25}, + {"label":"Ctrl", "x":1.5, "y":5.25, "w":1.25}, + {"label":"Win", "x":2.75, "y":5.25}, + {"label":"Alt", "x":3.75, "y":5.25, "w":1.25}, + {"label":"Fn", "x":5, "y":5.25, "w":1.25}, + {"label":"Space", "x":6.25, "y":5.25}, + {"label":"Fn", "x":7.25, "y":5.25, "w":1.25}, + {"label":"Fn", "x":10, "y":5.25, "w":1.25}, + {"label":"Space", "x":11.25, "y":5.25, "w":2.25}, + {"label":"Alt", "x":13.5, "y":5.25, "w":1.25}, + {"label":"Win", "x":14.75, "y":5.25}, + {"label":"Ctrl", "x":15.75, "y":5.25, "w":1.25}, + {"label":"Left", "x":17.5, "y":5.25}, + {"label":"Down", "x":18.5, "y":5.25}, + {"label":"Right", "x":19.5, "y":5.25} + ] + } + } +} diff --git a/keyboards/keebio/kbo5000/kbo5000.c b/keyboards/keebio/kbo5000/kbo5000.c new file mode 100644 index 000000000000..c46093537e05 --- /dev/null +++ b/keyboards/keebio/kbo5000/kbo5000.c @@ -0,0 +1 @@ +#include "kbo5000.h" diff --git a/keyboards/keebio/kbo5000/kbo5000.h b/keyboards/keebio/kbo5000/kbo5000.h new file mode 100644 index 000000000000..33f1998eb005 --- /dev/null +++ b/keyboards/keebio/kbo5000/kbo5000.h @@ -0,0 +1,7 @@ +#pragma once + +#include "quantum.h" + +#ifdef KEYBOARD_keebio_kbo5000_rev1 + #include "rev1.h" +#endif diff --git a/keyboards/keebio/kbo5000/keymaps/default/keymap.c b/keyboards/keebio/kbo5000/keymaps/default/keymap.c new file mode 100644 index 000000000000..00e2189891bd --- /dev/null +++ b/keyboards/keebio/kbo5000/keymaps/default/keymap.c @@ -0,0 +1,58 @@ +#include QMK_KEYBOARD_H + +enum encoder_names { + LEFT_HALF_ENC = 0, + RIGHT_HALF_ENC1 = 2, + RIGHT_HALF_ENC2, +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_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_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_DEL, KC_BSPC, KC_INS, KC_PGUP, + KC_F14, KC_TAB, KC_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_F15, 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_END, + KC_F16, 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_F17, KC_LCTL, KC_LALT, KC_LGUI, MO(1), KC_SPC, KC_SPC, MO(1), KC_SPC, KC_RALT, KC_RGUI, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT + ), + + [1] = LAYOUT_ansi( + BL_STEP, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, _______, _______, _______, _______, _______, _______, _______, _______, _______, + RGB_TOG, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + RGB_MOD, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + + [2] = LAYOUT_ansi( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ) +}; + +void encoder_update_user(uint8_t index, bool clockwise) { + if (index == LEFT_HALF_ENC) { + if (clockwise) { + tap_code(KC_PGDN); + } else { + tap_code(KC_PGUP); + } + } else if (index == RIGHT_HALF_ENC1) { + if (clockwise) { + tap_code(KC_VOLU); + } else { + tap_code(KC_VOLD); + } + } else if (index == RIGHT_HALF_ENC2) { + if (clockwise) { + tap_code(KC_DOWN); + } else { + tap_code(KC_UP); + } + } +} diff --git a/keyboards/keebio/kbo5000/keymaps/iso/keymap.c b/keyboards/keebio/kbo5000/keymaps/iso/keymap.c new file mode 100644 index 000000000000..e2c334672b8c --- /dev/null +++ b/keyboards/keebio/kbo5000/keymaps/iso/keymap.c @@ -0,0 +1,58 @@ +#include QMK_KEYBOARD_H + +enum encoder_names { + LEFT_HALF_ENC = 0, + RIGHT_HALF_ENC1 = 2, + RIGHT_HALF_ENC2, +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_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_PSCR, KC_SLCK, KC_PAUS, + 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_DEL, KC_BSPC, KC_INS, KC_PGUP, + KC_F14, KC_TAB, KC_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_PGDN, + KC_F15, 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_END, + KC_F16, 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_F17, KC_LCTL, KC_LALT, KC_LGUI, MO(1), KC_SPC, KC_SPC, MO(1), KC_SPC, KC_RALT, KC_RGUI, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT + ), + + [1] = LAYOUT_iso( + BL_STEP, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, _______, _______, _______, _______, _______, _______, _______, _______, _______, + RGB_TOG, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + RGB_MOD, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + + [2] = LAYOUT_iso( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ) +}; + +void encoder_update_user(uint8_t index, bool clockwise) { + if (index == LEFT_HALF_ENC) { + if (clockwise) { + tap_code(KC_PGDN); + } else { + tap_code(KC_PGUP); + } + } else if (index == RIGHT_HALF_ENC1) { + if (clockwise) { + tap_code(KC_VOLU); + } else { + tap_code(KC_VOLD); + } + } else if (index == RIGHT_HALF_ENC2) { + if (clockwise) { + tap_code(KC_DOWN); + } else { + tap_code(KC_UP); + } + } +} diff --git a/keyboards/keebio/kbo5000/keymaps/via/config.h b/keyboards/keebio/kbo5000/keymaps/via/config.h new file mode 100644 index 000000000000..a3b77a5b4d0b --- /dev/null +++ b/keyboards/keebio/kbo5000/keymaps/via/config.h @@ -0,0 +1,3 @@ +#pragma once + +#define DYNAMIC_KEYMAP_LAYER_COUNT 3 diff --git a/keyboards/keebio/kbo5000/keymaps/via/keymap.c b/keyboards/keebio/kbo5000/keymaps/via/keymap.c new file mode 100644 index 000000000000..692358c4855c --- /dev/null +++ b/keyboards/keebio/kbo5000/keymaps/via/keymap.c @@ -0,0 +1,58 @@ +#include QMK_KEYBOARD_H + +enum encoder_names { + LEFT_HALF_ENC = 0, + RIGHT_HALF_ENC1 = 2, + RIGHT_HALF_ENC2, +}; + +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_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_DEL, KC_BSPC, KC_INS, KC_PGUP, + KC_F14, KC_TAB, KC_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_F15, 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_END, + KC_F16, 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_F17, KC_LCTL, KC_LALT, KC_LGUI, MO(1), KC_SPC, KC_SPC, MO(1), KC_SPC, KC_RALT, KC_RGUI, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT + ), + + [1] = LAYOUT_all( + BL_STEP, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, _______, _______, _______, _______, _______, _______, _______, _______, _______, + RGB_TOG, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + RGB_MOD, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + + [2] = LAYOUT_all( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ) +}; + +void encoder_update_user(uint8_t index, bool clockwise) { + if (index == LEFT_HALF_ENC) { + if (clockwise) { + tap_code(KC_PGDN); + } else { + tap_code(KC_PGUP); + } + } else if (index == RIGHT_HALF_ENC1) { + if (clockwise) { + tap_code(KC_VOLU); + } else { + tap_code(KC_VOLD); + } + } else if (index == RIGHT_HALF_ENC2) { + if (clockwise) { + tap_code(KC_DOWN); + } else { + tap_code(KC_UP); + } + } +} diff --git a/keyboards/keebio/kbo5000/keymaps/via/rules.mk b/keyboards/keebio/kbo5000/keymaps/via/rules.mk new file mode 100644 index 000000000000..4b1bcabda81a --- /dev/null +++ b/keyboards/keebio/kbo5000/keymaps/via/rules.mk @@ -0,0 +1,3 @@ +VIA_ENABLE = yes +CONSOLE_ENABLE = yes +LTO_ENABLE = yes diff --git a/keyboards/keebio/kbo5000/readme.md b/keyboards/keebio/kbo5000/readme.md new file mode 100644 index 000000000000..1f1f63889e27 --- /dev/null +++ b/keyboards/keebio/kbo5000/readme.md @@ -0,0 +1,20 @@ +# KBO-5000 + +A split staggered keyboard designed to be like the G80-5000, made and sold by Keebio. [More info at Keebio](https://keeb.io). + +* Keyboard Maintainer: [Bakingpy/nooges](https://github.com/nooges) +* Hardware Availability: [Keebio](https://keeb.io/) + +Make example for this keyboard (after setting up your build environment): + + make keebio/kbo5000/rev1:default + +Example of flashing this keyboard: + + make keebio/kbo5000/rev1:default:flash + +Handedness detection is already hardwired onto the PCB, so no need to deal with `EE_HANDS` or flashing .eep files. + +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. + +A build guide for this keyboard can be found here: [Keebio Build Guides](https://docs.keeb.io) diff --git a/keyboards/keebio/kbo5000/rev1/config.h b/keyboards/keebio/kbo5000/rev1/config.h new file mode 100644 index 000000000000..085bfa47b071 --- /dev/null +++ b/keyboards/keebio/kbo5000/rev1/config.h @@ -0,0 +1,65 @@ +/* +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 0x126A +#define DEVICE_VER 0x0100 +#define MANUFACTURER Keebio +#define PRODUCT KBO-5000 Rev. 1 +#define DESCRIPTION Split staggered keyboard + +/* key matrix size */ +// Rows are doubled-up +#define MATRIX_ROWS 12 +#define MATRIX_COLS 10 + +#define DIODE_DIRECTION COL2ROW +// wiring of each half +#define MATRIX_ROW_PINS { B1, B2, C7, B4, D7, B0 } +#define MATRIX_COL_PINS { F4, NO_PIN, F0, B7, B3, D2, D3, D5, D4, NO_PIN } +#define MATRIX_ROW_PINS_RIGHT { B3, B2, B6, B4, D7, B0 } +#define MATRIX_COL_PINS_RIGHT { F1, F0, F4, F5, F6, D5, D2, D3, B7, B1 } +#define SPLIT_HAND_PIN F7 +#define ENCODERS_PAD_A { F5, NO_PIN } +#define ENCODERS_PAD_B { F6, NO_PIN } +#define ENCODERS_PAD_A_RIGHT { D6, C7 } +#define ENCODERS_PAD_B_RIGHT { D4, C6 } + +/* Set 0 if debouncing isn't needed */ +#define DEBOUNCE 5 + +#define BACKLIGHT_PIN B5 +#define CAPS_LOCK_LED_PIN B6 + +/* 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/kbo5000/rev1/rev1.c b/keyboards/keebio/kbo5000/rev1/rev1.c new file mode 100644 index 000000000000..fafad9b6ab1a --- /dev/null +++ b/keyboards/keebio/kbo5000/rev1/rev1.c @@ -0,0 +1,32 @@ +#include "kbo5000.h" +#include "split_util.h" + +void matrix_init_kb(void) { + setPinOutput(CAPS_LOCK_LED_PIN); + matrix_init_user(); +} + +bool led_update_kb(led_t led_state) { + // Only update if left half + if (isLeftHand && led_update_user(led_state)) { + writePin(CAPS_LOCK_LED_PIN, !led_state.caps_lock); + } + return true; +} + +void eeconfig_init_kb(void) { +#ifdef BACKLIGHT_ENABLE + backlight_enable(); + backlight_level(3); +#endif +#ifdef RGBLIGHT_ENABLE + rgblight_enable(); // Enable RGB by default + rgblight_sethsv(0, 255, 255); // Set default HSV - red hue, full saturation, full brightness +#ifdef RGBLIGHT_ANIMATIONS + rgblight_mode(RGBLIGHT_MODE_RAINBOW_SWIRL + 2); // set to RGB_RAINBOW_SWIRL by default +#endif +#endif + + eeconfig_update_kb(0); + eeconfig_init_user(); +} diff --git a/keyboards/keebio/kbo5000/rev1/rev1.h b/keyboards/keebio/kbo5000/rev1/rev1.h new file mode 100644 index 000000000000..63239d3463ea --- /dev/null +++ b/keyboards/keebio/kbo5000/rev1/rev1.h @@ -0,0 +1,73 @@ +#pragma once + +#include "kbo5000.h" +#include "quantum.h" + +#define LAYOUT_ansi( \ + LF1, LF4, LF5, LF6, LF7, LF8, LF9, RF1, RF2, RF4, RF5, RF6, RF7, RF8, RF9, RF10, \ + LA1, LA3, LA4, LA5, LA6, LA7, LA8, LA9, RA1, RA2, RA3, RA4, RA5, RA6, RA7, RA8, RA9, RA10, \ + LB1, LB3, LB4, LB5, LB6, LB7, LB8, RB1, RB2, RB3, RB4, RB5, RB6, RB7, RB8, RB9, RB10, \ + LC1, LC3, LC4, LC5, LC6, LC7, LC8, RC1, RC2, RC3, RC4, RC5, RC6, RC8, RC9, RC10, \ + LD1, LD3, LD5, LD6, LD7, LD8, LD9, RD1, RD2, RD3, RD4, RD5, RD7, RD9, \ + LE1, LE3, LE4, LE5, LE6, LE7, LE8, RE1, RE2, RE3, RE4, RE7, RE8, RE9, RE10 \ + ) \ + { \ + { LA1, KC_NO, LA3, LA4, LA5, LA6, LA7, LA8, LA9, KC_NO }, \ + { LB1, KC_NO, LB3, LB4, LB5, LB6, LB7, LB8, KC_NO, KC_NO }, \ + { LC1, KC_NO, LC3, LC4, LC5, LC6, LC7, LC8, KC_NO, KC_NO }, \ + { LD1, KC_NO, LD3, KC_NO, LD5, LD6, LD7, LD8, LD9, KC_NO }, \ + { LE1, KC_NO, LE3, LE4, LE5, LE6, LE7, LE8, KC_NO, KC_NO }, \ + { LF1, KC_NO, KC_NO, LF4, LF5, LF6, LF7, LF8, LF9, KC_NO }, \ + { RA1, RA2, RA3, RA4, RA5, RA6, RA7, RA8, RA9, RA10 }, \ + { RB1, RB2, RB3, RB4, RB5, RB6, RB7, RB8, RB9, RB10 }, \ + { RC1, RC2, RC3, RC4, RC5, RC6, KC_NO, RC8, RC9, RC10 }, \ + { RD1, RD2, RD3, RD4, RD5, KC_NO, RD7, KC_NO, RD9, KC_NO }, \ + { RE1, RE2, RE3, RE4, KC_NO, KC_NO, RE7, RE8, RE9, RE10 }, \ + { RF1, RF2, KC_NO, RF4, RF5, RF6, RF7, RF8, RF9, RF10 } \ + } + +#define LAYOUT_iso( \ + LF1, LF4, LF5, LF6, LF7, LF8, LF9, RF1, RF2, RF4, RF5, RF6, RF7, RF8, RF9, RF10, \ + LA1, LA3, LA4, LA5, LA6, LA7, LA8, LA9, RA1, RA2, RA3, RA4, RA5, RA6, RA7, RA8, RA9, RA10, \ + LB1, LB3, LB4, LB5, LB6, LB7, LB8, RB1, RB2, RB3, RB4, RB5, RB6, RB7, RB9, RB10, \ + LC1, LC3, LC4, LC5, LC6, LC7, LC8, RC1, RC2, RC3, RC4, RC5, RC6, RC7, RC8, RC9, RC10, \ + LD1, LD3, LD4, LD5, LD6, LD7, LD8, LD9, RD1, RD2, RD3, RD4, RD5, RD7, RD9, \ + LE1, LE3, LE4, LE5, LE6, LE7, LE8, RE1, RE2, RE3, RE4, RE7, RE8, RE9, RE10 \ + ) \ + { \ + { LA1, KC_NO, LA3, LA4, LA5, LA6, LA7, LA8, LA9, KC_NO }, \ + { LB1, KC_NO, LB3, LB4, LB5, LB6, LB7, LB8, KC_NO, KC_NO }, \ + { LC1, KC_NO, LC3, LC4, LC5, LC6, LC7, LC8, KC_NO, KC_NO }, \ + { LD1, KC_NO, LD3, LD4, LD5, LD6, LD7, LD8, LD9, KC_NO }, \ + { LE1, KC_NO, LE3, LE4, LE5, LE6, LE7, LE8, KC_NO, KC_NO }, \ + { LF1, KC_NO, KC_NO, LF4, LF5, LF6, LF7, LF8, LF9, KC_NO }, \ + { RA1, RA2, RA3, RA4, RA5, RA6, RA7, RA8, RA9, RA10 }, \ + { RB1, RB2, RB3, RB4, RB5, RB6, RB7, KC_NO, RB9, RB10 }, \ + { RC1, RC2, RC3, RC4, RC5, RC6, RC7, RC8, RC9, RC10 }, \ + { RD1, RD2, RD3, RD4, RD5, KC_NO, RD7, KC_NO, RD9, KC_NO }, \ + { RE1, RE2, RE3, RE4, KC_NO, KC_NO, RE7, RE8, RE9, RE10 }, \ + { RF1, RF2, KC_NO, RF4, RF5, RF6, RF7, RF8, RF9, RF10 } \ + } + +#define LAYOUT_all( \ + LF1, LF4, LF5, LF6, LF7, LF8, LF9, RF1, RF2, RF4, RF5, RF6, RF7, RF8, RF9, RF10, \ + LA1, LA3, LA4, LA5, LA6, LA7, LA8, LA9, RA1, RA2, RA3, RA4, RA5, RA6, RA7, RA8, RA9, RA10, \ + LB1, LB3, LB4, LB5, LB6, LB7, LB8, RB1, RB2, RB3, RB4, RB5, RB6, RB7, RB8, RB9, RB10, \ + LC1, LC3, LC4, LC5, LC6, LC7, LC8, RC1, RC2, RC3, RC4, RC5, RC6, RC7, RC8, RC9, RC10, \ + LD1, LD3, LD4, LD5, LD6, LD7, LD8, LD9, RD1, RD2, RD3, RD4, RD5, RD7, RD9, \ + LE1, LE3, LE4, LE5, LE6, LE7, LE8, RE1, RE2, RE3, RE4, RE7, RE8, RE9, RE10 \ + ) \ + { \ + { LA1, KC_NO, LA3, LA4, LA5, LA6, LA7, LA8, LA9, KC_NO }, \ + { LB1, KC_NO, LB3, LB4, LB5, LB6, LB7, LB8, KC_NO, KC_NO }, \ + { LC1, KC_NO, LC3, LC4, LC5, LC6, LC7, LC8, KC_NO, KC_NO }, \ + { LD1, KC_NO, LD3, LD4, LD5, LD6, LD7, LD8, LD9, KC_NO }, \ + { LE1, KC_NO, LE3, LE4, LE5, LE6, LE7, LE8, KC_NO, KC_NO }, \ + { LF1, KC_NO, KC_NO, LF4, LF5, LF6, LF7, LF8, LF9, KC_NO }, \ + { RA1, RA2, RA3, RA4, RA5, RA6, RA7, RA8, RA9, RA10 }, \ + { RB1, RB2, RB3, RB4, RB5, RB6, RB7, RB8, RB9, RB10 }, \ + { RC1, RC2, RC3, RC4, RC5, RC6, RC7, RC8, RC9, RC10 }, \ + { RD1, RD2, RD3, RD4, RD5, KC_NO, RD7, KC_NO, RD9, KC_NO }, \ + { RE1, RE2, RE3, RE4, KC_NO, KC_NO, RE7, RE8, RE9, RE10 }, \ + { RF1, RF2, KC_NO, RF4, RF5, RF6, RF7, RF8, RF9, RF10 } \ + } diff --git a/keyboards/keebio/kbo5000/rev1/rules.mk b/keyboards/keebio/kbo5000/rev1/rules.mk new file mode 100644 index 000000000000..32e788159916 --- /dev/null +++ b/keyboards/keebio/kbo5000/rev1/rules.mk @@ -0,0 +1,3 @@ +BACKLIGHT_ENABLE = yes +RGBLIGHT_ENABLE = yes +ENCODER_ENABLE = yes diff --git a/keyboards/keebio/kbo5000/rules.mk b/keyboards/keebio/kbo5000/rules.mk new file mode 100644 index 000000000000..5292231d581c --- /dev/null +++ b/keyboards/keebio/kbo5000/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 = 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 +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 +LTO_ENABLE = yes +SPLIT_KEYBOARD = yes + +DEFAULT_FOLDER = keebio/kbo5000/rev1 From bd1b51cbd106518882341fdde1c1e7d941840911 Mon Sep 17 00:00:00 2001 From: Keebz Dot Net <64744703+keebzdotnet@users.noreply.github.com> Date: Tue, 23 Jun 2020 02:07:15 -0700 Subject: [PATCH 246/930] Wazowski fixed keymap placement (#9408) - online configurator keys were in the wrong location and needed to be fixed - fixed a key being to high on the y position --- keyboards/keebzdotnet/wazowski/info.json | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/keyboards/keebzdotnet/wazowski/info.json b/keyboards/keebzdotnet/wazowski/info.json index 26d0da54b299..5c27a3ddca9c 100644 --- a/keyboards/keebzdotnet/wazowski/info.json +++ b/keyboards/keebzdotnet/wazowski/info.json @@ -1,25 +1,25 @@ { "keyboard_name": "wazowski", - "url": "", + "url": "https://www.keebz.net/shop/wazoski-pcb", "maintainer": "keebzdotnet", "width": 9, "height": 5, "layouts": { "LAYOUT": { "layout": [ - {"label":"k00", "x":0, "y":3}, - {"label":"k01", "x":1, "y":0}, - {"label":"k02", "x":1, "y":4}, - {"label":"k03", "x":2, "y":3}, + {"label":"k01", "x":1, "y":1}, {"label":"k04", "x":3, "y":2}, - {"label":"k05", "x":3, "y":4}, {"label":"k06", "x":4, "y":2}, - {"label":"k07", "x":4, "y":3}, {"label":"k08", "x":5, "y":2}, + {"label":"k12", "x":7, "y":3}, + {"label":"k00", "x":0, "y":3}, + {"label":"k03", "x":2, "y":3}, + {"label":"k07", "x":4, "y":3}, {"label":"k09", "x":5, "y":3}, {"label":"k10", "x":6, "y":2}, + {"label":"k02", "x":1, "y":4}, + {"label":"k05", "x":3, "y":4}, {"label":"k11", "x":7, "y":1}, - {"label":"k12", "x":7, "y":3}, {"label":"k13", "x":8, "y":2} ] } From 8d792cfb5fe671cd35f22c319d1f5b4948f0271b Mon Sep 17 00:00:00 2001 From: -k Date: Tue, 23 Jun 2020 03:28:54 -0700 Subject: [PATCH 247/930] [Keymap] Add personal keymap for Planck (#9424) * Create readme.md * Add personal keymap * Edit readme * Reorganize layouts * Update config.h * Edit beep settings * Apply suggestions from code review * More suggestions from code review --- .../planck/keymaps/charlesrocket/config.h | 38 ++++ .../planck/keymaps/charlesrocket/keymap.c | 203 ++++++++++++++++++ .../planck/keymaps/charlesrocket/readme.md | 55 +++++ .../planck/keymaps/charlesrocket/rules.mk | 8 + 4 files changed, 304 insertions(+) create mode 100644 keyboards/planck/keymaps/charlesrocket/config.h create mode 100644 keyboards/planck/keymaps/charlesrocket/keymap.c create mode 100644 keyboards/planck/keymaps/charlesrocket/readme.md create mode 100644 keyboards/planck/keymaps/charlesrocket/rules.mk diff --git a/keyboards/planck/keymaps/charlesrocket/config.h b/keyboards/planck/keymaps/charlesrocket/config.h new file mode 100644 index 000000000000..21d65d8f5dc9 --- /dev/null +++ b/keyboards/planck/keymaps/charlesrocket/config.h @@ -0,0 +1,38 @@ +#pragma once + +#ifdef AUDIO_ENABLE +#define STARTUP_SONG SONG(PLANCK_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 +#define AUDIO_CLICKY +#define AUDIO_CLICKY_FREQ_DEFAULT 2360.0f +#define AUDIO_CLICKY_FREQ_MAX 9500.0f +#define AUDIO_CLICKY_FREQ_RANDOMNESS 0.05f +#define DAC_SAMPLE_MAX 9754U + +/* 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 +#define ORYX_CONFIGURATOR \ No newline at end of file diff --git a/keyboards/planck/keymaps/charlesrocket/keymap.c b/keyboards/planck/keymaps/charlesrocket/keymap.c new file mode 100644 index 000000000000..f82819c58e23 --- /dev/null +++ b/keyboards/planck/keymaps/charlesrocket/keymap.c @@ -0,0 +1,203 @@ +#include QMK_KEYBOARD_H +#ifdef AUDIO_ENABLE +#include "muse.h" +#endif +#include "eeprom.h" + +#define KC_MAC_UNDO LGUI(KC_Z) +#define KC_MAC_CUT LGUI(KC_X) +#define KC_MAC_COPY LGUI(KC_C) +#define KC_MAC_PASTE LGUI(KC_V) +#define KC_PC_UNDO LCTL(KC_Z) +#define KC_PC_CUT LCTL(KC_X) +#define KC_PC_COPY LCTL(KC_C) +#define KC_PC_PASTE LCTL(KC_V) +#define ES_LESS_MAC KC_GRAVE +#define ES_GRTR_MAC LSFT(KC_GRAVE) +#define ES_BSLS_MAC ALGR(KC_6) +#define NO_PIPE_ALT KC_GRAVE +#define NO_BSLS_ALT KC_EQUAL +#define LSA_T(kc) MT(MOD_LSFT | MOD_LALT, kc) + +enum planck_keycodes { + RGB_SLD = EZ_SAFE_RANGE, +}; + +enum planck_layers { + _BASE, + _LOWER, + _RAISE, + _ADJUST, +}; + +#define LOWER MO(_LOWER) +#define RAISE MO(_RAISE) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_BASE] = 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_BSPACE, + KC_ESCAPE, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCOLON, KC_QUOTE, + KC_LSHIFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMMA, KC_DOT, KC_SLASH, KC_ENTER, + WEBUSB_PAIR, KC_LCTRL, KC_LALT, KC_LGUI, LOWER, KC_SPACE, KC_NO, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT + ), + + [_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_DELETE, 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_NONUS_HASH, KC_NONUS_BSLASH, KC_HOME, KC_END, _______, + KC_COMMA, _______, _______, _______, _______, _______, KC_NO, _______, KC_MEDIA_NEXT_TRACK, KC_AUDIO_VOL_DOWN, KC_AUDIO_VOL_UP, KC_MEDIA_PLAY_PAUSE + ), + + [_RAISE] = LAYOUT_planck_grid( + KC_GRAVE, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, _______, + KC_DELETE, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINUS, KC_EQUAL, KC_LBRACKET, KC_RBRACKET, KC_BSLASH, + _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_NONUS_HASH, KC_NONUS_BSLASH, KC_PGUP, KC_PGDOWN, _______, + _______, _______, _______, _______, _______, _______, KC_NO, _______, KC_MEDIA_NEXT_TRACK, KC_AUDIO_VOL_DOWN, KC_AUDIO_VOL_UP, KC_MEDIA_PLAY_PAUSE + ), + + [_ADJUST] = LAYOUT_planck_grid( + _______, CK_UP, _______, _______, _______, _______, _______, _______, _______,_______, _______, _______, + KC_DELETE, CK_TOGG, AU_ON, AU_OFF, AU_TOG, _______, _______, _______, RGB_VAI,RGB_VAD , _______, RESET, + _______, CK_DOWN, MU_ON, MU_OFF, MU_TOG, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, KC_NO, _______, _______, _______, _______, _______ + ), + +}; + +extern bool g_suspend_state; +extern rgb_config_t rgb_matrix_config; + +void keyboard_post_init_user(void) { + rgb_matrix_enable(); +} + +const uint8_t PROGMEM ledmap[][DRIVER_LED_TOTAL][3] = { + [0] = { {0,255,255}, {0,255,255}, {0,255,255}, {0,255,255}, {0,255,255}, {0,255,255}, {0,255,255}, {0,255,255}, {0,255,255}, {0,255,255}, {0,255,255}, {0,255,255}, {0,255,255}, {0,255,255}, {0,255,255}, {0,255,255}, {0,255,255}, {0,255,255}, {0,255,255}, {0,255,255}, {0,255,255}, {0,255,255}, {0,255,255}, {0,255,255}, {0,255,255}, {0,255,255}, {0,255,255}, {0,255,255}, {0,255,255}, {0,255,255}, {0,255,255}, {0,255,255}, {0,255,255}, {0,255,255}, {0,255,255}, {0,255,255}, {0,255,255}, {0,255,255}, {0,255,255}, {0,255,255}, {0,255,255}, {0,255,255}, {0,255,255}, {0,255,255}, {0,255,255}, {0,255,255}, {0,255,255} }, + + [1] = { {193,255,255}, {193,255,255}, {193,255,255}, {193,255,255}, {193,255,255}, {193,255,255}, {193,255,255}, {193,255,255}, {193,255,255}, {193,255,255}, {193,255,255}, {193,255,255}, {193,255,255}, {193,255,255}, {193,255,255}, {193,255,255}, {193,255,255}, {193,255,255}, {193,255,255}, {193,255,255}, {193,255,255}, {193,255,255}, {193,255,255}, {193,255,255}, {193,255,255}, {193,255,255}, {193,255,255}, {193,255,255}, {193,255,255}, {193,255,255}, {193,255,255}, {193,255,255}, {193,255,255}, {193,255,255}, {193,255,255}, {193,255,255}, {193,255,255}, {193,255,255}, {193,255,255}, {193,255,255}, {193,255,255}, {193,255,255}, {193,255,255}, {193,255,255}, {193,255,255}, {193,255,255}, {193,255,255} }, + + [2] = { {104,255,255}, {104,255,255}, {104,255,255}, {104,255,255}, {104,255,255}, {104,255,255}, {104,255,255}, {104,255,255}, {104,255,255}, {104,255,255}, {104,255,255}, {104,255,255}, {104,255,255}, {104,255,255}, {104,255,255}, {104,255,255}, {104,255,255}, {104,255,255}, {104,255,255}, {104,255,255}, {104,255,255}, {104,255,255}, {104,255,255}, {104,255,255}, {104,255,255}, {104,255,255}, {104,255,255}, {104,255,255}, {104,255,255}, {104,255,255}, {104,255,255}, {104,255,255}, {104,255,255}, {104,255,255}, {104,255,255}, {104,255,255}, {104,255,255}, {104,255,255}, {104,255,255}, {104,255,255}, {104,255,255}, {104,255,255}, {104,255,255}, {104,255,255}, {104,255,255}, {104,255,255}, {104,255,255} }, + + [3] = { {0,0,255}, {0,0,255}, {0,0,255}, {0,0,255}, {0,0,255}, {0,0,255}, {0,0,255}, {0,0,255}, {0,0,255}, {0,0,255}, {0,0,255}, {0,0,255}, {0,0,255}, {0,0,255}, {0,0,255}, {0,0,255}, {0,0,255}, {0,0,255}, {0,0,255}, {0,0,255}, {0,0,255}, {0,0,255}, {0,0,255}, {0,0,255}, {0,0,255}, {0,0,255}, {0,0,255}, {0,0,255}, {0,0,255}, {0,0,255}, {0,0,255}, {0,0,255}, {0,0,255}, {0,0,255}, {0,0,255}, {0,0,255}, {0,0,255}, {0,0,255}, {0,0,255}, {0,0,255}, {0,0,255}, {0,0,255}, {0,0,255}, {0,0,255}, {0,0,255}, {0,0,255}, {0,0,255} }, + +}; + +void set_layer_color(int layer) { + 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_matrix_set_color( i, 0, 0, 0 ); + } else { + 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 ); + } + } +} + +void rgb_matrix_indicators_user(void) { + if (g_suspend_state || keyboard_config.disable_layer_led) { return; } + switch (biton32(layer_state)) { + case 0: + set_layer_color(0); + break; + case 1: + set_layer_color(1); + break; + case 2: + set_layer_color(2); + break; + case 3: + set_layer_color(3); + break; + default: + if (rgb_matrix_get_flags() == LED_FLAG_NONE) + rgb_matrix_set_color_all(0, 0, 0); + break; + } +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case RGB_SLD: + if (record->event.pressed) { + rgblight_mode(1); + } + return false; + } + return true; +} + +#ifdef AUDIO_ENABLE +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 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; + } +} +#endif + +layer_state_t layer_state_set_user(layer_state_t state) { + return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST); +} diff --git a/keyboards/planck/keymaps/charlesrocket/readme.md b/keyboards/planck/keymaps/charlesrocket/readme.md new file mode 100644 index 000000000000..9e9f0d255142 --- /dev/null +++ b/keyboards/planck/keymaps/charlesrocket/readme.md @@ -0,0 +1,55 @@ +# Red Planck EZ (Glow) with beeps + +QWERTY layout with colored layers (red, purple, green and white) for Planck EZ Glow. Soft beep feedback is On by default. Sound level is hardcoded with `DAC_SAMPLE_MAX` and tone settings (`CK`) are in Adjust (WHITE) layer. + +``` +RED Base + ,-----------------------------------------------------------------------------------. + | 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 | + |------+------+------+------+------+------+------+------+------+------+------+------| + | QMK | Ctrl | Alt | OS |Lower | Space |Raise | Left | Down | Up |Right | + `-----------------------------------------------------------------------------------' +``` + +``` +PURPLE Lower + ,-----------------------------------------------------------------------------------. + | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Bksp | + |------+------+------+------+------+------+------+------+------+------+------+------| + | Del | F1 | F2 | F3 | F4 | F5 | F6 | _ | + | { | } | | | + |------+------+------+------+------+------+------+------+------+------+------+------| + | | F7 | F8 | F9 | F10 | F11 | F12 |ISO ~ |ISO | | Home | End | | + |------+------+------+------+------+------+------+------+------+------+------+------| + | | | | |Lower | |Raise | Next | Vol- | Vol+ | Play | + `-----------------------------------------------------------------------------------' +``` + +``` +GREEN 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 | | + |------+------+------+------+------+------+------+------+------+------+------+------| + | | | | |Lower | |Raise | Next | Vol- | Vol+ | Play | + `-----------------------------------------------------------------------------------' +``` + +``` +WHITE (Lower + Raise) + ,-----------------------------------------------------------------------------------. + | | CkUp | | | | | | | | | | | + |------+------+------+------+------+------+------+------+------+------+------+------| + | Del | CkTg |Aud On|AudOff|AudTog| | | |BRGTH+|BRGTH-| | Reset| + |------+------+------+------+------+------+------+------+------+------+------+------| + | | CkDn |Mus On|MusOff|MusTog| | | | | | | | + |------+------+------+------+------+------+------+------+------+------+------+------| + | | | | |Lower | |Raise | | | | | + `-----------------------------------------------------------------------------------' +``` diff --git a/keyboards/planck/keymaps/charlesrocket/rules.mk b/keyboards/planck/keymaps/charlesrocket/rules.mk new file mode 100644 index 000000000000..6e4985a8b171 --- /dev/null +++ b/keyboards/planck/keymaps/charlesrocket/rules.mk @@ -0,0 +1,8 @@ +SRC += muse.c +# 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 +COMMAND_ENABLE = no +MOUSEKEY_ENABLE = no +WEBUSB_ENABLE = yes +ORYX_ENABLE = yes From 88ebf921847e2bf744ff035d8091ad6826d59a1f Mon Sep 17 00:00:00 2001 From: Ryan Date: Wed, 24 Jun 2020 03:25:20 +1000 Subject: [PATCH 248/930] Fix info.json for Suihankey (#9490) --- keyboards/suihankey/alpha/info.json | 34 ++++++++++++++++++++ keyboards/suihankey/info.json | 12 ------- keyboards/suihankey/rev1/info.json | 34 ++++++++++++++++++++ keyboards/suihankey/split/info.json | 50 +++++++++++++++++++++++++++-- 4 files changed, 115 insertions(+), 15 deletions(-) create mode 100644 keyboards/suihankey/alpha/info.json delete mode 100644 keyboards/suihankey/info.json create mode 100644 keyboards/suihankey/rev1/info.json diff --git a/keyboards/suihankey/alpha/info.json b/keyboards/suihankey/alpha/info.json new file mode 100644 index 000000000000..3d914662ff03 --- /dev/null +++ b/keyboards/suihankey/alpha/info.json @@ -0,0 +1,34 @@ +{ + "keyboard_name": "suihankey", + "url": "https://kakunpc.booth.pm/", + "maintainer": "kakunpc", + "width": 6.4, + "height": 4.85, + "layouts": { + "LAYOUT": { + "layout": [ + {"x": 0, "y": 0.375}, + {"x": 1, "y": 0.125}, + {"x": 2, "y": 0}, + {"x": 3, "y": 0.125}, + {"x": 4, "y": 0.25}, + + {"x": 0, "y": 1.375}, + {"x": 1, "y": 1.125}, + {"x": 2, "y": 1}, + {"x": 3, "y": 1.125}, + {"x": 4, "y": 1.25}, + + {"x": 0, "y": 2.375}, + {"x": 1, "y": 2.125}, + {"x": 2, "y": 2}, + {"x": 3, "y": 2.125}, + {"x": 4, "y": 2.25}, + + {"x": 3.4, "y": 3.25}, + {"x": 4.4, "y": 3.55}, + {"x": 5.4, "y": 3.85} + ] + } + } +} diff --git a/keyboards/suihankey/info.json b/keyboards/suihankey/info.json deleted file mode 100644 index 3756e3d5fece..000000000000 --- a/keyboards/suihankey/info.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "keyboard_name": "suihankey", - "url": "https://kakunpc.booth.pm/", - "maintainer": "kakunpc", - "width": 6.4, - "height": 4.85, - "layouts": { - "LAYOUT": { - "layout": [{"label":"1", "x":0, "y":0.375}, {"label":"2", "x":1, "y":0.125}, {"label":"3", "x":2, "y":0}, {"label":"4", "x":3, "y":0.125}, {"label":"5", "x":4, "y":0.25}, {"label":"6", "x":0, "y":1.375}, {"label":"7", "x":1, "y":1.125}, {"label":"8", "x":2, "y":1}, {"label":"9", "x":3, "y":1.125}, {"label":"10", "x":4, "y":1.25}, {"label":"11", "x":0, "y":2.375}, {"label":"12", "x":1, "y":2.125}, {"label":"13", "x":2, "y":2}, {"label":"14", "x":3, "y":2.125}, {"label":"15", "x":4, "y":2.25}, {"label":"16", "x":3.4, "y":3.25}, {"label":"17", "x":4.4, "y":3.55}, {"label":"18", "x":5.4, "y":3.85}] - } - } -} diff --git a/keyboards/suihankey/rev1/info.json b/keyboards/suihankey/rev1/info.json new file mode 100644 index 000000000000..3d914662ff03 --- /dev/null +++ b/keyboards/suihankey/rev1/info.json @@ -0,0 +1,34 @@ +{ + "keyboard_name": "suihankey", + "url": "https://kakunpc.booth.pm/", + "maintainer": "kakunpc", + "width": 6.4, + "height": 4.85, + "layouts": { + "LAYOUT": { + "layout": [ + {"x": 0, "y": 0.375}, + {"x": 1, "y": 0.125}, + {"x": 2, "y": 0}, + {"x": 3, "y": 0.125}, + {"x": 4, "y": 0.25}, + + {"x": 0, "y": 1.375}, + {"x": 1, "y": 1.125}, + {"x": 2, "y": 1}, + {"x": 3, "y": 1.125}, + {"x": 4, "y": 1.25}, + + {"x": 0, "y": 2.375}, + {"x": 1, "y": 2.125}, + {"x": 2, "y": 2}, + {"x": 3, "y": 2.125}, + {"x": 4, "y": 2.25}, + + {"x": 3.4, "y": 3.25}, + {"x": 4.4, "y": 3.55}, + {"x": 5.4, "y": 3.85} + ] + } + } +} diff --git a/keyboards/suihankey/split/info.json b/keyboards/suihankey/split/info.json index c3825ac3aca9..f50012dd12dd 100644 --- a/keyboards/suihankey/split/info.json +++ b/keyboards/suihankey/split/info.json @@ -2,11 +2,55 @@ "keyboard_name": "suihankey_split", "url": "https://kakunpc.booth.pm/", "maintainer": "kakunpc", - "width": 12, - "height": 4, + "width": 13.2, + "height": 4.85, "layouts": { "LAYOUT": { - "layout": [{"label":"1", "x":0, "y":0}, {"label":"2", "x":1, "y":0}, {"label":"3", "x":2, "y":0}, {"label":"4", "x":3, "y":0}, {"label":"5", "x":4, "y":0}, {"label":"19", "x":7, "y":0}, {"label":"20", "x":8, "y":0}, {"label":"21", "x":9, "y":0}, {"label":"22", "x":10, "y":0}, {"label":"23", "x":11, "y":0}, {"label":"6", "x":0, "y":1}, {"label":"7", "x":1, "y":1}, {"label":"8", "x":2, "y":1}, {"label":"9", "x":3, "y":1}, {"label":"10", "x":4, "y":1}, {"label":"24", "x":7, "y":1}, {"label":"25", "x":8, "y":1}, {"label":"26", "x":9, "y":1}, {"label":"27", "x":10, "y":1}, {"label":"28", "x":11, "y":1}, {"label":"11", "x":0, "y":2}, {"label":"12", "x":1, "y":2}, {"label":"13", "x":2, "y":2}, {"label":"14", "x":3, "y":2}, {"label":"15", "x":4, "y":2}, {"label":"29", "x":7, "y":2}, {"label":"30", "x":8, "y":2}, {"label":"31", "x":9, "y":2}, {"label":"32", "x":10, "y":2}, {"label":"33", "x":11, "y":2}, {"label":"16", "x":2, "y":3}, {"label":"17", "x":3, "y":3}, {"label":"18", "x":4, "y":3}, {"label":"34", "x":7, "y":3}, {"label":"35", "x":8, "y":3}, {"label":"36", "x":9, "y":3}] + "layout": [ + {"x": 0, "y": 0.375}, + {"x": 1, "y": 0.125}, + {"x": 2, "y": 0}, + {"x": 3, "y": 0.125}, + {"x": 4, "y": 0.25}, + + {"x": 8.2, "y": 0.25}, + {"x": 9.2, "y": 0.125}, + {"x": 10.2, "y": 0}, + {"x": 11.2, "y": 0.125}, + {"x": 12.2, "y": 0.375}, + + {"x": 0, "y": 1.375}, + {"x": 1, "y": 1.125}, + {"x": 2, "y": 1}, + {"x": 3, "y": 1.125}, + {"x": 4, "y": 1.25}, + + {"x": 8.2, "y": 1.25}, + {"x": 9.2, "y": 1.125}, + {"x": 10.2, "y": 1}, + {"x": 11.2, "y": 1.125}, + {"x": 12.2, "y": 1.375}, + + {"x": 0, "y": 2.375}, + {"x": 1, "y": 2.125}, + {"x": 2, "y": 2}, + {"x": 3, "y": 2.125}, + {"x": 4, "y": 2.25}, + + {"x": 8.2, "y": 2.25}, + {"x": 9.2, "y": 2.125}, + {"x": 10.2, "y": 2}, + {"x": 11.2, "y": 2.125}, + {"x": 12.2, "y": 2.375}, + + {"x": 3.4, "y": 3.25}, + {"x": 4.4, "y": 3.55}, + {"x": 5.4, "y": 3.85}, + + {"x": 6.8, "y": 3.85}, + {"x": 7.8, "y": 3.55}, + {"x": 8.8, "y": 3.25} + ] } } } From 39b483ad32150dad0ffda37e1b47479dcd162995 Mon Sep 17 00:00:00 2001 From: Ryan Date: Wed, 24 Jun 2020 07:36:54 +1000 Subject: [PATCH 249/930] Fix maja info.json (#9511) --- keyboards/kbdfans/maja/info.json | 82 +++++++++++++++++++++++++++++--- 1 file changed, 75 insertions(+), 7 deletions(-) diff --git a/keyboards/kbdfans/maja/info.json b/keyboards/kbdfans/maja/info.json index 94760fb2a6ec..80526d09e122 100644 --- a/keyboards/kbdfans/maja/info.json +++ b/keyboards/kbdfans/maja/info.json @@ -1,12 +1,80 @@ { - "keyboard_name": "maja", - "url": "", - "maintainer": "KBDFANS", - "width": 16, - "height": 5, + "keyboard_name": "maja", + "url": "", + "maintainer": "KBDFANS", + "width": 18.75, + "height": 5.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}, {"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}, {"label":"Ctrl", "x":0, "y":4, "w":1.5}, {"label":"Win", "x":2.5, "y":4, "w":1.5}, {"label":"Alt", "x":4, "y":4, "w":2}, {"x":6, "y":4, "w":1.25}, {"label":"Alt", "x":7.25, "y":4, "w":2.75}, {"label":"Win", "x":10, "y":4, "w":1.5}, {"label":"Menu", "x":13, "y":4}, {"label":"Ctrl", "x":14, "y":4}, {"x":15, "y":4}] + "layout": [ + {"x": 2.75, "y": 0}, + {"x": 12.75, "y": 0}, + {"x": 0.75, "y": 0.25}, + {"x": 1.75, "y": 0.25}, + {"x": 3.75, "y": 0.25}, + {"x": 4.75, "y": 0.25}, + {"x": 5.75, "y": 0.25}, + {"x": 6.75, "y": 0.25}, + {"x": 8.75, "y": 0.25}, + {"x": 9.75, "y": 0.25}, + {"x": 10.75, "y": 0.25}, + {"x": 11.75, "y": 0.25}, + {"x": 13.75, "y": 0.25}, + {"x": 14.75, "y": 0.25, "w": 2}, + {"x": 17.75, "y": 0.25}, + {"x": 0.5, "y": 1.25, "w": 1.5}, + {"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": 8.5, "y": 1.25}, + {"x": 9.5, "y": 1.25}, + {"x": 10.5, "y": 1.25}, + {"x": 11.5, "y": 1.25}, + {"x": 12.5, "y": 1.25}, + {"x": 13.5, "y": 1.25}, + {"x": 14.5, "y": 1.25}, + {"x": 15.5, "y": 1.25, "w": 1.5}, + {"x": 17.75, "y": 1.25}, + {"x": 0.25, "y": 2.25, "w": 1.75}, + {"x": 2, "y": 2.25}, + {"x": 3, "y": 2.25}, + {"x": 4, "y": 2.25}, + {"x": 5, "y": 2.25}, + {"x": 6, "y": 2.25}, + {"x": 9, "y": 2.25}, + {"x": 10, "y": 2.25}, + {"x": 11, "y": 2.25}, + {"x": 12, "y": 2.25}, + {"x": 13, "y": 2.25}, + {"x": 14, "y": 2.25}, + {"x": 15, "y": 2.25, "w": 2.25}, + {"x": 17.75, "y": 2.25}, + {"x": 0, "y": 3.25, "w": 2.25}, + {"x": 2.25, "y": 3.25}, + {"x": 3.25, "y": 3.25}, + {"x": 4.25, "y": 3.25}, + {"x": 5.25, "y": 3.25}, + {"x": 6.25, "y": 3.25}, + {"x": 8.25, "y": 3.25}, + {"x": 9.25, "y": 3.25}, + {"x": 10.25, "y": 3.25}, + {"x": 11.25, "y": 3.25}, + {"x": 12.25, "y": 3.25}, + {"x": 13.25, "y": 3.25}, + {"x": 14.25, "y": 3.25, "w": 2.25}, + {"x": 16.75, "y": 3.5}, + {"x": 0, "y": 4.25, "w": 1.5}, + {"x": 3, "y": 4.25, "w": 1.5}, + {"x": 4.5, "y": 4.25, "w": 2}, + {"x": 6.5, "y": 4.25, "w": 1.25}, + {"x": 8.25, "y": 4.25, "w": 2.75}, + {"x": 11, "y": 4.25, "w": 1.5}, + {"x": 15.75, "y": 4.5}, + {"x": 16.75, "y": 4.5}, + {"x": 17.75, "y": 4.5} + ] } } -} +} \ No newline at end of file From c30170b868f50e74e52067ea78b184b7ee875be5 Mon Sep 17 00:00:00 2001 From: 4pplet Date: Wed, 24 Jun 2020 03:13:21 +0200 Subject: [PATCH 250/930] [Keyboard] added 4pplet keyboards (#8935) * added 4pplet keyboards added 4pplet keyboards * Update keyboards/4pplet/aekiso60_rev_a/aekiso60_rev_a.h * Update keyboards/4pplet/aekiso60_rev_a/config.h * Update keyboards/4pplet/aekiso60_rev_a/config.h * Update keyboards/4pplet/waffling60_rev_a/config.h * Update keyboards/4pplet/aekiso60_rev_a/rules.mk * Update keyboards/4pplet/aekiso60_rev_a/rules.mk * Update keyboards/4pplet/waffling60_rev_a/rules.mk * Update keyboards/4pplet/waffling60_rev_a/rules.mk * Update keyboards/4pplet/steezy60_rev_a/config.h * Delete info.json * Delete info.json * Delete info.json * removed VIA_ENABLE * Update config.h * Update rules.mk * Update steezy60_rev_a.h * Update config.h * Removed VIA_ENABLE * Update keyboards/4pplet/steezy60_rev_a/rules.mk * Removed VIA_ENABLE * Update config.h * Update config.h * Update config.h * adding fauxpark suggestion * Update keyboards/4pplet/aekiso60_rev_a/config.h * Update keyboards/4pplet/aekiso60_rev_a/rules.mk * some updates recommended by noroadsleft, still work in progress some updates recommended by noroadsleft, still work in progress * made directorys for revisions per noroadsleft suggestion made directorys for revisions per noroadsleft suggestion * renamed keyboard_pre_init_user to keyboard_pre_init_kb * Update keyboards/4pplet/aekiso60/rev_a/config.h * Update keyboards/4pplet/waffling60/rev_a/rev_a.c * Update keyboards/4pplet/waffling60/rev_a/rev_a.c * started working on refactoring led function for waffling60 * removed LED functionality * Update keyboards/wilba_tech/zeal60/rules.mk * Update keyboards/wilba_tech/zeal60/rules.mk * Update keyboards/4pplet/waffling60/rev_a/rules.mk * Update keyboards/4pplet/steezy60/rev_a/rules.mk * Update keyboards/4pplet/aekiso60/keymaps/via/keymap.c * Update keyboards/4pplet/aekiso60/rev_a/rules.mk --- keyboards/4pplet/aekiso60/README.md | 14 +++++++ .../4pplet/aekiso60/keymaps/default/keymap.c | 21 ++++++++++ .../4pplet/aekiso60/keymaps/via/keymap.c | 34 ++++++++++++++++ .../4pplet/aekiso60/keymaps/via/rules.mk | 1 + keyboards/4pplet/aekiso60/rev_a/config.h | 39 +++++++++++++++++++ keyboards/4pplet/aekiso60/rev_a/rev_a.c | 1 + keyboards/4pplet/aekiso60/rev_a/rev_a.h | 18 +++++++++ keyboards/4pplet/aekiso60/rev_a/rules.mk | 31 +++++++++++++++ keyboards/4pplet/steezy60/README.md | 14 +++++++ .../4pplet/steezy60/keymaps/4pplet/keymap.c | 27 +++++++++++++ .../4pplet/steezy60/keymaps/default/keymap.c | 18 +++++++++ .../4pplet/steezy60/keymaps/via/keymap.c | 32 +++++++++++++++ .../4pplet/steezy60/keymaps/via/rules.mk | 1 + keyboards/4pplet/steezy60/rev_a/config.h | 36 +++++++++++++++++ keyboards/4pplet/steezy60/rev_a/rev_a.c | 1 + keyboards/4pplet/steezy60/rev_a/rev_a.h | 18 +++++++++ keyboards/4pplet/steezy60/rev_a/rules.mk | 31 +++++++++++++++ keyboards/4pplet/waffling60/README.md | 14 +++++++ .../waffling60/keymaps/default/keymap.c | 18 +++++++++ .../4pplet/waffling60/keymaps/via/keymap.c | 32 +++++++++++++++ .../4pplet/waffling60/keymaps/via/rules.mk | 1 + keyboards/4pplet/waffling60/rev_a/config.h | 31 +++++++++++++++ keyboards/4pplet/waffling60/rev_a/rev_a.c | 1 + keyboards/4pplet/waffling60/rev_a/rev_a.h | 20 ++++++++++ keyboards/4pplet/waffling60/rev_a/rules.mk | 31 +++++++++++++++ 25 files changed, 485 insertions(+) create mode 100644 keyboards/4pplet/aekiso60/README.md create mode 100644 keyboards/4pplet/aekiso60/keymaps/default/keymap.c create mode 100644 keyboards/4pplet/aekiso60/keymaps/via/keymap.c create mode 100644 keyboards/4pplet/aekiso60/keymaps/via/rules.mk create mode 100644 keyboards/4pplet/aekiso60/rev_a/config.h create mode 100644 keyboards/4pplet/aekiso60/rev_a/rev_a.c create mode 100644 keyboards/4pplet/aekiso60/rev_a/rev_a.h create mode 100644 keyboards/4pplet/aekiso60/rev_a/rules.mk create mode 100644 keyboards/4pplet/steezy60/README.md create mode 100644 keyboards/4pplet/steezy60/keymaps/4pplet/keymap.c create mode 100644 keyboards/4pplet/steezy60/keymaps/default/keymap.c create mode 100644 keyboards/4pplet/steezy60/keymaps/via/keymap.c create mode 100644 keyboards/4pplet/steezy60/keymaps/via/rules.mk create mode 100644 keyboards/4pplet/steezy60/rev_a/config.h create mode 100644 keyboards/4pplet/steezy60/rev_a/rev_a.c create mode 100644 keyboards/4pplet/steezy60/rev_a/rev_a.h create mode 100644 keyboards/4pplet/steezy60/rev_a/rules.mk create mode 100644 keyboards/4pplet/waffling60/README.md create mode 100644 keyboards/4pplet/waffling60/keymaps/default/keymap.c create mode 100644 keyboards/4pplet/waffling60/keymaps/via/keymap.c create mode 100644 keyboards/4pplet/waffling60/keymaps/via/rules.mk create mode 100644 keyboards/4pplet/waffling60/rev_a/config.h create mode 100644 keyboards/4pplet/waffling60/rev_a/rev_a.c create mode 100644 keyboards/4pplet/waffling60/rev_a/rev_a.h create mode 100644 keyboards/4pplet/waffling60/rev_a/rules.mk diff --git a/keyboards/4pplet/aekiso60/README.md b/keyboards/4pplet/aekiso60/README.md new file mode 100644 index 000000000000..42c3d3421d28 --- /dev/null +++ b/keyboards/4pplet/aekiso60/README.md @@ -0,0 +1,14 @@ +# AEKISO60 + +A 60% PCB enabling use of ISO AEK keycaps and ALPS switches + +More info: https://geekhack.org/index.php?topic=103627.0 + +* Keyboard Maintainer: [4pplet](https://github.com/4pplet) +* Hardware Supported: AEKISO60 Rev A + +Make example for this keyboard (after setting up your build environment): + + make 4pplet/aekiso60/rev_a: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/4pplet/aekiso60/keymaps/default/keymap.c b/keyboards/4pplet/aekiso60/keymaps/default/keymap.c new file mode 100644 index 000000000000..4f3e895a5e1d --- /dev/null +++ b/keyboards/4pplet/aekiso60/keymaps/default/keymap.c @@ -0,0 +1,21 @@ +#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_TAB, KC_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_LCTRL, 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_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, KC_RCTL), + +[1] = LAYOUT_all( + KC_EXEC, KC_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_UP, _______, _______, _______, _______, _______, KC_PSCR, KC_SLCK, KC_PAUS, KC_UP, _______, KC_PENT, + KC_CAPS, KC_LEFT, KC_DOWN, KC_RIGHT, KC_MUTE, _______, KC_PAST, KC_PSLS, KC_HOME, KC_PGUP, KC_LEFT, KC_RIGHT, KC_INS, + _______, KC_MPRV, KC_MPLY, KC_MNXT, KC_VOLD, KC_VOLU, KC_PPLS, KC_PMNS, _______, KC_END, KC_PGDN, KC_DOWN, _______, _______, + RESET, _______, _______, _______, _______, _______, KC_BRID, KC_BRIU, _______) +}; + + diff --git a/keyboards/4pplet/aekiso60/keymaps/via/keymap.c b/keyboards/4pplet/aekiso60/keymaps/via/keymap.c new file mode 100644 index 000000000000..d2036f60bd76 --- /dev/null +++ b/keyboards/4pplet/aekiso60/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_TAB, KC_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_LCTRL, 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_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, KC_RCTL), + +[1] = LAYOUT_all( + KC_EXEC, KC_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_UP, _______, _______, _______, _______, _______, KC_PSCR, KC_SLCK, KC_PAUS, KC_UP, _______, KC_PENT, + KC_CAPS, KC_LEFT, KC_DOWN, KC_RIGHT, KC_MUTE, _______, KC_PAST, KC_PSLS, KC_HOME, KC_PGUP, KC_LEFT, KC_RIGHT, KC_INS, + _______, KC_MPRV, KC_MPLY, KC_MNXT, KC_VOLD, KC_VOLU, KC_PPLS, KC_PMNS, _______, KC_END, KC_PGDN, KC_DOWN, _______, _______, + RESET, _______, _______, _______, _______, _______, KC_BRID, KC_BRIU, _______), + +[2] = LAYOUT_all( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______), + +[3] = LAYOUT_all( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______) +}; + diff --git a/keyboards/4pplet/aekiso60/keymaps/via/rules.mk b/keyboards/4pplet/aekiso60/keymaps/via/rules.mk new file mode 100644 index 000000000000..1e5b99807cb7 --- /dev/null +++ b/keyboards/4pplet/aekiso60/keymaps/via/rules.mk @@ -0,0 +1 @@ +VIA_ENABLE = yes diff --git a/keyboards/4pplet/aekiso60/rev_a/config.h b/keyboards/4pplet/aekiso60/rev_a/config.h new file mode 100644 index 000000000000..7505bcf7b9d2 --- /dev/null +++ b/keyboards/4pplet/aekiso60/rev_a/config.h @@ -0,0 +1,39 @@ +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0x4444 +#define PRODUCT_ID 0x0001 +#define DEVICE_VER 0x0001 +#define MANUFACTURER 4pplet +#define PRODUCT AEKISO60 Rev A +#define DESCRIPTION A steezy KEEB + +/* key matrix size */ +#define MATRIX_ROWS 5 +#define MATRIX_COLS 14 +// ROWS: Top to bottom, COLS: Left to right +#define MATRIX_ROW_PINS {C2,D0,B0,C7,C5} +#define MATRIX_COL_PINS {C4,C6,B7,B6,B5,B4,B3,B2,B1,D6,D5,D4,D2,D1} + +/* 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 C4 // usually COL +#define QMK_ESC_INPUT C2 // usually ROW + +#define RGB_DI_PIN D3 +#define RGBLED_NUM 12 +#define BACKLIGHT_LEVELS 5 + +#define RGBLIGHT_HUE_STEP 8 +#define RGBLIGHT_SAT_STEP 8 +#define RGBLIGHT_VAL_STEP 8 +#define RGBLIGHT_ANIMATIONS diff --git a/keyboards/4pplet/aekiso60/rev_a/rev_a.c b/keyboards/4pplet/aekiso60/rev_a/rev_a.c new file mode 100644 index 000000000000..d3db08ad193b --- /dev/null +++ b/keyboards/4pplet/aekiso60/rev_a/rev_a.c @@ -0,0 +1 @@ +#include "rev_a.h" diff --git a/keyboards/4pplet/aekiso60/rev_a/rev_a.h b/keyboards/4pplet/aekiso60/rev_a/rev_a.h new file mode 100644 index 000000000000..f68a320b7fbc --- /dev/null +++ b/keyboards/4pplet/aekiso60/rev_a/rev_a.h @@ -0,0 +1,18 @@ +#pragma once + +#include "quantum.h" + +#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, \ + 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, k3d, \ + k40, k41, k43, k44, k45, k46, k48, 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, k1d}, \ + {k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, KC_NO},\ + {k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d}, \ + {k40, k41, KC_NO, k43, k44, k45, k46, KC_NO, k48, KC_NO, k4a, k4b, KC_NO, KC_NO} \ +} diff --git a/keyboards/4pplet/aekiso60/rev_a/rules.mk b/keyboards/4pplet/aekiso60/rev_a/rules.mk new file mode 100644 index 000000000000..494e07bc0ca6 --- /dev/null +++ b/keyboards/4pplet/aekiso60/rev_a/rules.mk @@ -0,0 +1,31 @@ +# 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 = 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 +AUDIO_ENABLE = no # Audio output on port C6 +FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches +UNICODE_ENABLE = no # Unicode diff --git a/keyboards/4pplet/steezy60/README.md b/keyboards/4pplet/steezy60/README.md new file mode 100644 index 000000000000..34245b84ef6b --- /dev/null +++ b/keyboards/4pplet/steezy60/README.md @@ -0,0 +1,14 @@ +# Steezy60 + +A 60% PCB with a ton of layout options for SMK and Alps switches + +More info: https://geekhack.org/index.php?topic=103531.0 + +* Keyboard Maintainer: [4pplet](https://github.com/4pplet) +* Hardware Supported: Steezy60 Rev A + +Make example for this keyboard (after setting up your build environment): + + make 4pplet/steezy60/rev_a: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/4pplet/steezy60/keymaps/4pplet/keymap.c b/keyboards/4pplet/steezy60/keymaps/4pplet/keymap.c new file mode 100644 index 000000000000..67820f2ac0be --- /dev/null +++ b/keyboards/4pplet/steezy60/keymaps/4pplet/keymap.c @@ -0,0 +1,27 @@ +#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_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_LGUI, 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_NO, KC_RSPC, MO(2), + KC_LCTL, KC_LGUI, KC_NO, KC_LALT, KC_RALT, MO(2), KC_SPC, KC_RALT, KC_RGUI, KC_NO, KC_APP, KC_RCTRL), + +[1] = 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_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_NO, KC_ENT, + KC_LSPO, 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_RSPC, MO(2), + KC_LCTL, KC_LGUI, KC_NO, KC_LALT, KC_RALT, MO(2), KC_SPC, KC_RALT, KC_RGUI, KC_NO, KC_APP, KC_RCTRL), + +[2] = LAYOUT_all( + KC_EXEC, KC_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_BSPC, KC_UP, KC_ENT, _______, _______, _______, _______, KC_PSCR, KC_SLCK, KC_PAUS, KC_UP, _______, KC_DEL, + KC_CAPS, KC_LEFT, KC_DOWN, KC_RIGHT, KC_MUTE, _______, KC_PAST, KC_PSLS, KC_HOME, KC_PGUP, KC_LEFT, KC_RIGHT, _______, KC_PENT, + _______, _______, KC_MPRV, KC_MPLY, KC_MNXT, KC_VOLD, KC_VOLU, KC_PPLS, KC_PMNS, KC_END, KC_PGDN, KC_DOWN, _______, _______, _______, + DF(1), DF(0), _______, _______, _______, _______, _______, KC_BRID, KC_BRIU, _______, _______, RESET ) +}; + + diff --git a/keyboards/4pplet/steezy60/keymaps/default/keymap.c b/keyboards/4pplet/steezy60/keymaps/default/keymap.c new file mode 100644 index 000000000000..6a922b0f3e0c --- /dev/null +++ b/keyboards/4pplet/steezy60/keymaps/default/keymap.c @@ -0,0 +1,18 @@ +#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_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_LCTRL, 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_NO, + KC_LCTL, KC_LGUI, KC_NO, KC_LALT, KC_NO, KC_SPC, KC_NO, KC_RALT, KC_RGUI, KC_NO, KC_APP, MO(1)), + +[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, _______, KC_DEL, + _______, KC_BSPC, KC_UP, KC_ENT, _______, _______, _______, _______, KC_PSCR, KC_SLCK, KC_PAUS, KC_UP, _______, _______, + KC_CAPS, KC_LEFT, KC_DOWN, KC_RIGHT, KC_MUTE, _______, KC_PAST, KC_PSLS, KC_HOME, KC_PGUP, KC_LEFT, KC_RIGHT, _______, _______, + _______, _______, KC_MPRV, KC_MPLY, KC_MNXT, KC_VOLD, KC_VOLU, KC_PPLS, KC_PMNS, KC_END, KC_PGDN, KC_DOWN, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, KC_BRID, KC_BRIU, _______, _______, _______ ) +}; \ No newline at end of file diff --git a/keyboards/4pplet/steezy60/keymaps/via/keymap.c b/keyboards/4pplet/steezy60/keymaps/via/keymap.c new file mode 100644 index 000000000000..603d85771da9 --- /dev/null +++ b/keyboards/4pplet/steezy60/keymaps/via/keymap.c @@ -0,0 +1,32 @@ +#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_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_LCTRL, 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_NO, + KC_LCTL, KC_LGUI, KC_NO, KC_LALT, KC_NO, KC_SPC, KC_NO, KC_RALT, KC_RGUI, KC_NO, KC_APP, MO(1)), + +[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, _______, KC_DEL, + _______, KC_BSPC, KC_UP, KC_ENT, _______, _______, _______, _______, KC_PSCR, KC_SLCK, KC_PAUS, KC_UP, _______, _______, + KC_CAPS, KC_LEFT, KC_DOWN, KC_RIGHT, KC_MUTE, _______, KC_PAST, KC_PSLS, KC_HOME, KC_PGUP, KC_LEFT, KC_RIGHT, _______, _______, + _______, _______, KC_MPRV, KC_MPLY, KC_MNXT, KC_VOLD, KC_VOLU, KC_PPLS, KC_PMNS, KC_END, KC_PGDN, KC_DOWN, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, KC_BRID, KC_BRIU, _______, _______, _______ ), + +[2] = LAYOUT_all( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ ), + +[3] = LAYOUT_all( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ ) +}; \ No newline at end of file diff --git a/keyboards/4pplet/steezy60/keymaps/via/rules.mk b/keyboards/4pplet/steezy60/keymaps/via/rules.mk new file mode 100644 index 000000000000..1e5b99807cb7 --- /dev/null +++ b/keyboards/4pplet/steezy60/keymaps/via/rules.mk @@ -0,0 +1 @@ +VIA_ENABLE = yes diff --git a/keyboards/4pplet/steezy60/rev_a/config.h b/keyboards/4pplet/steezy60/rev_a/config.h new file mode 100644 index 000000000000..654454072d41 --- /dev/null +++ b/keyboards/4pplet/steezy60/rev_a/config.h @@ -0,0 +1,36 @@ +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0x4444 +#define PRODUCT_ID 0x0002 +#define DEVICE_VER 0x0001 +#define MANUFACTURER 4pplet +#define PRODUCT Steezy60 Rev A +#define DESCRIPTION A steezy keeb + +/* key matrix size */ +#define MATRIX_ROWS 5 +#define MATRIX_COLS 15 +// ROWS: Top to bottom, COLS: Left to right +#define MATRIX_ROW_PINS {C2,D0,B0,C7,C5} +#define MATRIX_COL_PINS {C4,C6,B7,B6,B5,B4,B3,B2,B1,D6,D5,D4,D2,D1} + +/* COL2ROW or ROW2COL */ +#define DIODE_DIRECTION COL2ROW + +/* Set 0 if debouncing isn't needed */ +#define DEBOUNCE 5 + +#define QMK_ESC_OUTPUT C4 // usually COL +#define QMK_ESC_INPUT C2 // usually ROW + +#define RGB_DI_PIN D3 +#define RGBLED_NUM 12 +#define BACKLIGHT_LEVELS 5 + +#define RGBLIGHT_HUE_STEP 8 +#define RGBLIGHT_SAT_STEP 8 +#define RGBLIGHT_VAL_STEP 8 +#define RGBLIGHT_ANIMATIONS diff --git a/keyboards/4pplet/steezy60/rev_a/rev_a.c b/keyboards/4pplet/steezy60/rev_a/rev_a.c new file mode 100644 index 000000000000..d3db08ad193b --- /dev/null +++ b/keyboards/4pplet/steezy60/rev_a/rev_a.c @@ -0,0 +1 @@ +#include "rev_a.h" diff --git a/keyboards/4pplet/steezy60/rev_a/rev_a.h b/keyboards/4pplet/steezy60/rev_a/rev_a.h new file mode 100644 index 000000000000..b8c3fa6b05a3 --- /dev/null +++ b/keyboards/4pplet/steezy60/rev_a/rev_a.h @@ -0,0 +1,18 @@ +#pragma once + +#include "quantum.h" + +#define LAYOUT_all( \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, k4d, \ + 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,k4c, \ + k40, k41, k42, k43, k44, k45, k46, 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, 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} \ +} diff --git a/keyboards/4pplet/steezy60/rev_a/rules.mk b/keyboards/4pplet/steezy60/rev_a/rules.mk new file mode 100644 index 000000000000..494e07bc0ca6 --- /dev/null +++ b/keyboards/4pplet/steezy60/rev_a/rules.mk @@ -0,0 +1,31 @@ +# 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 = 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 +AUDIO_ENABLE = no # Audio output on port C6 +FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches +UNICODE_ENABLE = no # Unicode diff --git a/keyboards/4pplet/waffling60/README.md b/keyboards/4pplet/waffling60/README.md new file mode 100644 index 000000000000..6c333a5607b0 --- /dev/null +++ b/keyboards/4pplet/waffling60/README.md @@ -0,0 +1,14 @@ +# waffling60 + +A 60% PCB for MX switches, one hot swap and one solder-pcb version with decent layout support. + +More info: https://geekhack.org/index.php?topic=103531.0 + +* Keyboard Maintainer: [4pplet](https://github.com/4pplet) +* Hardware Supported: waffling60 Rev A + +Make example for this keyboard (after setting up your build environment): + + make 4pplet/steezy60/rev_a: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/4pplet/waffling60/keymaps/default/keymap.c b/keyboards/4pplet/waffling60/keymaps/default/keymap.c new file mode 100644 index 000000000000..d61c3f6c548c --- /dev/null +++ b/keyboards/4pplet/waffling60/keymaps/default/keymap.c @@ -0,0 +1,18 @@ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +// main 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_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_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_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_APP, MO(1)), +// basic function layer +[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, 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_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_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 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/4pplet/waffling60/keymaps/via/keymap.c b/keyboards/4pplet/waffling60/keymaps/via/keymap.c new file mode 100644 index 000000000000..40ca2a28fe6b --- /dev/null +++ b/keyboards/4pplet/waffling60/keymaps/via/keymap.c @@ -0,0 +1,32 @@ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +// main 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_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_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_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_APP, MO(1)), +// basic function layer +[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, 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_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_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), +// extra layer for VIA +[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), +// extra layer for VIA +[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/4pplet/waffling60/keymaps/via/rules.mk b/keyboards/4pplet/waffling60/keymaps/via/rules.mk new file mode 100644 index 000000000000..1e5b99807cb7 --- /dev/null +++ b/keyboards/4pplet/waffling60/keymaps/via/rules.mk @@ -0,0 +1 @@ +VIA_ENABLE = yes diff --git a/keyboards/4pplet/waffling60/rev_a/config.h b/keyboards/4pplet/waffling60/rev_a/config.h new file mode 100644 index 000000000000..d232d3e70a76 --- /dev/null +++ b/keyboards/4pplet/waffling60/rev_a/config.h @@ -0,0 +1,31 @@ +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0x4444 +#define PRODUCT_ID 0x0003 +#define DEVICE_VER 0x0001 +#define MANUFACTURER 4pplet +#define PRODUCT waffling60 Rev A +#define DESCRIPTION A steezy keeb + +/* key matrix size */ +#define MATRIX_ROWS 6 +#define MATRIX_COLS 11 +// ROWS: Top to bottom, COLS: Left to right + +#define MATRIX_ROW_PINS {D4,D1,C2,C4,C7,B2} +#define MATRIX_COL_PINS {D3,D0,D2,B6,B5,B4,B3,D6,D5,B0,B1} + +/* 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 0 + +#define QMK_ESC_OUTPUT D3 // usually COL +#define QMK_ESC_INPUT D4 // usually ROW diff --git a/keyboards/4pplet/waffling60/rev_a/rev_a.c b/keyboards/4pplet/waffling60/rev_a/rev_a.c new file mode 100644 index 000000000000..d3db08ad193b --- /dev/null +++ b/keyboards/4pplet/waffling60/rev_a/rev_a.c @@ -0,0 +1 @@ +#include "rev_a.h" diff --git a/keyboards/4pplet/waffling60/rev_a/rev_a.h b/keyboards/4pplet/waffling60/rev_a/rev_a.h new file mode 100644 index 000000000000..3ac296877977 --- /dev/null +++ b/keyboards/4pplet/waffling60/rev_a/rev_a.h @@ -0,0 +1,20 @@ +#pragma once + +#include "quantum.h" + +// k +#define LAYOUT_all( \ + k00, k01, k11, k02, k03, k04, k05, k15, k06, k07, k08, k18, k09, k0a, k1a, \ + k10, k21, k12, k22, k13, k14, k25, k35, k16, k17, k28, k19, k29, k2a, \ + k20, k31, k32, k23, k33, k24, k45, k26, k36, k27, k38, k39, k3a, \ + k30, k40, k41, k42, k43, k34, k44, k55, k46, k37, k47, k48, k49, k4a, \ + k50, k51, k52, k53, k54, k56, k57, k58, k59, k5a \ +) \ +{ \ + {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, k33, k34, k35, k36, k37, k38, k39, k3a}, \ + {k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, k4a}, \ + {k50, k51, k52, k53, k54, k55, k56, k57, k58, k59, k5a} \ +} diff --git a/keyboards/4pplet/waffling60/rev_a/rules.mk b/keyboards/4pplet/waffling60/rev_a/rules.mk new file mode 100644 index 000000000000..494e07bc0ca6 --- /dev/null +++ b/keyboards/4pplet/waffling60/rev_a/rules.mk @@ -0,0 +1,31 @@ +# 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 = 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 +AUDIO_ENABLE = no # Audio output on port C6 +FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches +UNICODE_ENABLE = no # Unicode From 9b398a8f31e31cd8aed60a2d90ada306213f70f5 Mon Sep 17 00:00:00 2001 From: Joshua Diamond Date: Tue, 23 Jun 2020 22:02:12 -0400 Subject: [PATCH 251/930] Partial and window screenshots (#9332) --- layouts/community/75_ansi/spidey3/keymap.c | 3 +- users/spidey3/spidey3.c | 66 ++++++++++++++++++++++ 2 files changed, 67 insertions(+), 2 deletions(-) diff --git a/layouts/community/75_ansi/spidey3/keymap.c b/layouts/community/75_ansi/spidey3/keymap.c index aaa93ee2d029..d3c4a64ea812 100644 --- a/layouts/community/75_ansi/spidey3/keymap.c +++ b/layouts/community/75_ansi/spidey3/keymap.c @@ -1,6 +1,5 @@ #include "spidey3.h" -#define OSX_PSC G(S(KC_4)) #define FN_MENU LT(_FN,KC_APP) const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { @@ -15,7 +14,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), // OSX layout [_OSX] = LAYOUT_75_ansi( - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, OSX_PSC, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, diff --git a/users/spidey3/spidey3.c b/users/spidey3/spidey3.c index 4e364628aa98..a8dafcb7b541 100644 --- a/users/spidey3/spidey3.c +++ b/users/spidey3/spidey3.c @@ -192,6 +192,72 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { spi_gflock = !spi_gflock; dprintf("spi_gflock = %u\n", spi_gflock); break; + + case KC_PSCR: { + uint8_t mods = get_mods(); +#ifndef NO_ACTION_ONESHOT + uint8_t osm = get_oneshot_mods(); +#else + uint8_t osm = 0; +#endif + + switch (get_unicode_input_mode()) { + case UC_MAC: + if ((mods | osm) & MOD_MASK_ALT) { + // Window screenshot + clear_mods(); +#ifndef NO_ACTION_ONESHOT + clear_oneshot_mods(); +#endif + tap_code16(LSFT(LGUI(KC_4))); + wait_ms(100); + tap_code(KC_SPC); + set_mods(mods); + return false; + } else if ((mods | osm) & MOD_MASK_SHIFT) { + // Partial screenshot + tap_code16(LSFT(LGUI(KC_4))); + return false; + } else { + // Full screenshot + tap_code16(LSFT(LGUI(KC_3))); + return false; + } + break; + + case UC_WIN: + case UC_WINC: + if ((mods | osm) & MOD_MASK_ALT) { + // Window screenshot + // Alt+PrintScreen should work as is + } else if ((mods | osm) & MOD_MASK_SHIFT) { + // Partial screenshot + tap_code16(LGUI(LSFT(KC_S))); + return false; + } else { + // Full screenshot + // PrintScreen should work as is + } + break; + + default: + // Note: These are specific to ChromeOS + if ((mods | osm) & MOD_MASK_ALT) { + // Window screenshot + tap_code16(LCTL(LALT(KC_F5))); + return false; + } else if ((mods | osm) & MOD_MASK_SHIFT) { + // Partial screenshot + tap_code16(LCTL(LSFT(KC_F5))); + return false; + } else { + // Full screenshot + // PrintScreen should work as is + } + break; + } + break; + } } } else { switch (keycode) { From 4b80ee46f80360f9f14ff8a88f3f610d0cf74544 Mon Sep 17 00:00:00 2001 From: Joshua Diamond Date: Wed, 24 Jun 2020 01:35:43 -0400 Subject: [PATCH 252/930] Add Hebrew keymap aliases (#9383) * Add Hebrew keymap aliases * Use NBSP for internal space in box drawings * Apply suggestions from code review * More whitespace fixes * IL_DVAV, IL_DYOD and IL_VYOD were incorrect * Add IL_DEG, IL_MUL, IL_DIV * Hebrew is now ISO (no more BAE) * Use ISO left shift * Apply suggestions from code review * DYOD and VYOD were reversed in diagram. Oops! --- docs/reference_keymap_extras.md | 1 + quantum/keymap_extras/keymap_hebrew.h | 151 ++++++++++++++++++++++++++ 2 files changed, 152 insertions(+) create mode 100644 quantum/keymap_extras/keymap_hebrew.h diff --git a/docs/reference_keymap_extras.md b/docs/reference_keymap_extras.md index fd4b8dd8534c..44b056af6511 100644 --- a/docs/reference_keymap_extras.md +++ b/docs/reference_keymap_extras.md @@ -31,6 +31,7 @@ To use these, simply `#include` the corresponding [header file](https://github.c |German (macOS) |`keymap_german_osx.h` | |German (Neo2)* |`keymap_neo2.h` | |Greek* |`keymap_greek.h` | +|Hebrew* |`keymap_hebrew.h` | |Hungarian |`keymap_hungarian.h` | |Icelandic |`keymap_icelandic.h` | |Italian |`keymap_italian.h` | diff --git a/quantum/keymap_extras/keymap_hebrew.h b/quantum/keymap_extras/keymap_hebrew.h new file mode 100644 index 000000000000..ea9ac5ed4c4c --- /dev/null +++ b/quantum/keymap_extras/keymap_hebrew.h @@ -0,0 +1,151 @@ +/* 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 "keymap.h" + +// clang-format off + +/* + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ + * │ ; │ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ - │ = │       │ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ + * │     │ / │ ' │ פ │ ם │ ן │ ו │ ט │ א │ ר │ ק │ ] │ [ │     │ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐    │ + * │      │ ף │ ך │ ל │ ח │ י │ ע │ כ │ ג │ ד │ ש │ , │ \ │    │ + * ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴────┤ + * │    │   │ ץ │ ת │ צ │ מ │ נ │ ה │ ב │ ס │ ז │ . │          │ + * ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤ + * │    │    │    │                        │    │    │    │    │ + * └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘ + */ +// Row 1 +#define IL_SCLN KC_GRV // ; +#define IL_1 KC_1 // 1 +#define IL_2 KC_2 // 2 +#define IL_3 KC_3 // 3 +#define IL_4 KC_4 // 4 +#define IL_5 KC_5 // 5 +#define IL_6 KC_6 // 6 +#define IL_7 KC_7 // 7 +#define IL_8 KC_8 // 8 +#define IL_9 KC_9 // 9 +#define IL_0 KC_0 // 0 +#define IL_MINS KC_MINS // - +#define IL_EQL KC_EQL // = +// Row 2 +#define IL_SLSH KC_Q // / +#define IL_QUOT KC_W // ' +#define IL_QOF KC_E // ק +#define IL_RESH KC_R // ר +#define IL_ALEF KC_T // א +#define IL_TET KC_Y // ט +#define IL_VAV KC_U // ו +#define IL_FNUN KC_I // ן +#define IL_FMEM KC_O // ם +#define IL_PE KC_P // פ +#define IL_RBRC KC_LBRC // ] +#define IL_LBRC KC_RBRC // [ +// Row 3 +#define IL_SHIN KC_A // ש +#define IL_DALT KC_S // ד +#define IL_GIML KC_D // ג +#define IL_KAF KC_F // כ +#define IL_AYIN KC_G // ע +#define IL_YOD KC_H // י +#define IL_HET KC_J // ח +#define IL_LAMD KC_K // ל +#define IL_FKAF KC_L // ך +#define IL_FPE KC_SCLN // ף +#define IL_COMM KC_QUOT // , +#define IL_BSLS KC_NUHS // (backslash) +// Row 4 +#define IL_ZAYN KC_Z // ז +#define IL_SMKH KC_X // ס +#define IL_BET KC_C // ב +#define IL_HE KC_V // ה +#define IL_NUN KC_B // נ +#define IL_MEM KC_N // מ +#define IL_TSDI KC_M // צ +#define IL_TAV KC_COMM // ת +#define IL_FTSD KC_DOT // ץ +#define IL_DOT KC_SLSH // . + +/* Shifted symbols + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ + * │ ~ │ ! │ @ │ # │ $ │ % │ ^ │ & │ * │ ) │ ( │ _ │ + │       │ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ + * │     │   │   │   │   │   │   │   │   │   │   │ } │ { │     │ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐    │ + * │      │   │   │   │   │   │   │   │   │   │ : │ " │ | │    │ + * ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴────┤ + * │    │   │   │   │   │   │   │   │   │ > │ < │ ? │          │ + * ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤ + * │    │    │    │                        │    │    │    │    │ + * └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘ + */ +// Row 1 +#define IL_TILD S(IL_SCLN) // ~ +#define IL_EXLM S(IL_1) // ! +#define IL_AT S(IL_2) // @ +#define IL_PND S(IL_3) // # +#define IL_DLR S(IL_4) // $ +#define IL_PERC S(IL_5) // % +#define IL_CIRC S(IL_6) // ^ +#define IL_AMPR S(IL_7) // & +#define IL_ASTR S(IL_8) // * +#define IL_RPRN S(IL_9) // ) +#define IL_LPRN S(IL_0) // ( +#define IL_UNDS S(IL_MINS) // _ +#define IL_PLUS S(IL_EQL) // + +// Row 2 +#define IL_RCBR S(IL_RBRC) // } +#define IL_LCBR S(IL_LBRC) // { +// Row 3 +#define IL_COLN S(IL_FPE) // : +#define IL_DQUO S(IL_COMM) // " +#define IL_PIPE S(IL_BSLS) // | +// Row 4 +#define IL_RABK S(IL_TAV) // > +#define IL_LABK S(IL_FTSD) // < +#define IL_QUES S(IL_DOT) // ? + +/* AltGr symbols + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ + * │   │   │   │ € │ ₪ │ ° │   │   │ × │   │   │   │   │       │ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ + * │     │   │   │   │   │   │ װ │   │   │   │   │   │   │     │ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐    │ + * │      │   │   │   │   │ ײ │ ױ │   │   │   │   │   │   │    │ + * ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴────┤ + * │    │   │   │   │   │   │   │   │   │   │   │ ÷ │          │ + * ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤ + * │    │    │    │                        │    │    │    │    │ + * └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘ + */ +// Row 1 +#define IL_EURO ALGR(IL_3) // € +#define IL_SHKL ALGR(IL_4) // ₪ +#define IL_DEG ALGR(IL_5) // ° +#define IL_MUL ALGR(IL_8) // × +// Row 2 +#define IL_DVAV ALGR(IL_TET) // װ +// Row 3 +#define IL_VYOD ALGR(IL_AYIN) // ױ +#define IL_DYOD ALGR(IL_YOD) // ײ +// Row 4 +#define IL_DIV ALGR(IL_DOT) // ÷ From a4b2baa2bac2b9cfadd0bcfb78af2a189e36a1ae Mon Sep 17 00:00:00 2001 From: Takeshi ISHII <2170248+mtei@users.noreply.github.com> Date: Wed, 24 Jun 2020 18:10:52 +0900 Subject: [PATCH 253/930] [Update] Japanese translation of docs/newbs_building_firmware_configurator.md (#9395) * update docs/ja/newbs_building_firmware_configurator.md Following the original changes, docs/ja/newbs_building_firmware_configurator.md was divided into docs/ja/configurator_step_by_step.md and docs/ja/configurator_troubleshooting.md. * Update docs/ja/configurator_step_by_step.md Co-authored-by: shela * Update docs/ja/configurator_step_by_step.md Co-authored-by: shela * Update docs/ja/configurator_step_by_step.md Co-authored-by: shela * Update docs/ja/configurator_step_by_step.md Co-authored-by: shela * Update docs/ja/configurator_step_by_step.md Co-authored-by: shela * Update docs/ja/configurator_troubleshooting.md Co-authored-by: shela * Update docs/ja/configurator_troubleshooting.md Co-authored-by: shela * Update docs/ja/configurator_step_by_step.md Co-authored-by: shela * Update docs/ja/configurator_step_by_step.md Co-authored-by: shela * Update docs/ja/configurator_step_by_step.md Co-authored-by: shela * Update docs/ja/configurator_troubleshooting.md Co-authored-by: shela * Update docs/ja/newbs_building_firmware_configurator.md Co-authored-by: shela * Update docs/ja/configurator_troubleshooting.md Co-authored-by: shela * Update docs/ja/newbs_building_firmware_configurator.md Co-authored-by: shela * Update docs/ja/configurator_step_by_step.md Co-authored-by: shela Co-authored-by: shela --- docs/ja/configurator_step_by_step.md | 67 +++++++++++ docs/ja/configurator_troubleshooting.md | 32 +++++ .../newbs_building_firmware_configurator.md | 109 ++---------------- 3 files changed, 107 insertions(+), 101 deletions(-) create mode 100644 docs/ja/configurator_step_by_step.md create mode 100644 docs/ja/configurator_troubleshooting.md diff --git a/docs/ja/configurator_step_by_step.md b/docs/ja/configurator_step_by_step.md new file mode 100644 index 000000000000..92be0f16a951 --- /dev/null +++ b/docs/ja/configurator_step_by_step.md @@ -0,0 +1,67 @@ +# QMK Configurator: ステップ・バイ・ステップ + + + +このページでは、QMK Configurator でファームウェアを構築する手順を説明します。 + +## ステップ 1: キーボードを選ぶ + +ドロップダウンボックスをクリックして、キーマップを作成するキーボードを選択します。 + +?> **キーボードに複数のバージョンがある場合は、正しいバージョンを選択してください。** + +大事なことなのでもう一度言います。 + +!> **正しいバージョンを選択してください!** + +キーボードが QMK を搭載していると宣伝されていてもリストにない場合は、開発者がまだ作業中か、私たちがまだマージするきっかけがなかった可能性があります。 +アクティブな [プルリクエスト](https://github.com/qmk/qmk_firmware/pulls?q=is%3Aopen+is%3Apr+label%3Akeyboard) がない場合、[qmk_firmware](https://github.com/qmk/qmk_firmware/issues)で報告して、その特定のキーボードのサポートをリクエストします。 +製作者自身の GitHub アカウントにある QMK 搭載キーボードもあります。 +それも再確認してください。 + +## ステップ2: キーボードのレイアウトを選択する + +作成したいと思うキーマップに最も近いレイアウトを選択します。一部のキーボードには、まだ十分なレイアウトや正しいレイアウトが定義されていません。これらは将来サポートされる予定です。 + +## ステップ3: キーマップの名前を決める + +お好みの名前をキーマップにつけます。 + +?> コンパイル時に問題が発生した場合は、もしかすると QMK ファームウェアリポジトリに既に同じ名前が存在しているのかもしれません。名前を変更してみてください。 + +## ステップ4: キーマップを定義する + +キーコードの入力は、3つの方法のいずれかで行います。 + +1. ドラッグ・アンド・ドロップ +2. レイアウト上の空の場所をクリックして、希望するキーコードをクリックします +3. レイアウト上の空の場所をクリックして、キーボードの物理キーを押します + +?> マウスをキーの上に置くと、そのキーコードの機能の短い説明文が出ます。より詳細な説明については以下を見てください: + +* [基本的なキーコードリファレンス](ja/keycodes_basic.md) +* [高度なキーコードリファレンス](ja/feature_advanced_keycodes.md) + +!> 選択したレイアウトが物理的なビルドと一致しない場合は、使用していないキーは空白のままにしておきます。どのキーが使用されているかわからない場合、例えば、バックスペースキーは1つだが `LAYOUT_all` には2つのキーがある場合は、同じキーコードを両方の場所に配置してください。 + +## ステップ5: 後日のためにキーマップを保存する + +キーマップに満足するか、または後で作業したい場合は、`Export Keymap' ボタンを押します。 +これでキーマップがあなたのコンピュータに保存されます。 +その後、`Import Keymap` ボタンを押すことで、この .json ファイルを後で読み込むことができます。 + +!> **注意:** このファイルは、kbfirmware.com またはその他のツールに使用される .json ファイルと同じ形式ではありません。これらのツールにこの .json を使用したり、QMK Configurator でこれらのツールの .json を使用しようとすると、問題が発生します。 + +## ステップ6: ファームウェアをコンパイルする + +緑色の `Compile` ボタンを押します。 + +コンパイルが完了すると、緑色の `Download Firmware` ボタンを押すことができます。 + +## 次のステップ: キーボードに書き込む(フラッシュする) + +[ファームウェアを書きこむ](ja/newbs_flashing.md) を参照してください。 diff --git a/docs/ja/configurator_troubleshooting.md b/docs/ja/configurator_troubleshooting.md new file mode 100644 index 000000000000..5979341c6e86 --- /dev/null +++ b/docs/ja/configurator_troubleshooting.md @@ -0,0 +1,32 @@ +# Configurator トラブルシューティング + + + +## 私の .json ファイルが動きません + +.json ファイルが QMK Configurator で作ったものの場合、おめでとうございます。バグに遭遇しました。 [qmk_configurator](https://github.com/qmk/qmk_configurator/issues) で報告してください。 + +そうでない場合は、... 他の .json ファイルを使用しないようにという、上に書いた注意書きを見逃してませんか? + +#### レイアウトに余分なスペースがありますか?どうすればいいですか? + +もしスペースバーが3つに分かれている場合は、全てスペースバーで埋めるのが最善の方法です。バックスペースや Shift キーについても同じことができます。 + +#### キーコードってなに? + +以下を見てください。 + +* [基本的なキーコードリファレンス](ja/keycodes_basic.md) +* [高度なキーコードリファレンス](ja/feature_advanced_keycodes.md) + +#### コンパイルできません + +キーマップの他のレイヤーを再確認して、おかしなキーが存在しないことを確認してください。 + +## 問題とバグ + +私たちは利用者の依頼やバグレポートを常に受け入れています。[qmk_configurator](https://github.com/qmk/qmk_configurator/issues) で報告してください。 diff --git a/docs/ja/newbs_building_firmware_configurator.md b/docs/ja/newbs_building_firmware_configurator.md index 419ba1416b8a..61d25ffb52c1 100644 --- a/docs/ja/newbs_building_firmware_configurator.md +++ b/docs/ja/newbs_building_firmware_configurator.md @@ -2,112 +2,19 @@ -[QMK Configurator](https://config.qmk.fm) は、QMKファームウェアの hex ファイルを生成するオンライングラフィカルユーザーインターフェイスです。 +[![QMK Configurator Screenshot](https://i.imgur.com/anw9cOL.png)](https://config.qmk.fm/) -?> **次の手順を順番に実行してください。** +[QMK Configurator](https://config.qmk.fm) は、QMKファームウェアの hex ファイルを生成するオンライングラフィカルユーザーインターフェイスです。 -[Video Tutorial](https://www.youtube.com/watch?v=-imgglzDMdY) を見てください。 +[ビデオチュートリアル](https://www.youtube.com/watch?v=-imgglzDMdY) を見てください。 +多くの人は、それが自分のキーボードのプログラミングを始めるのに十分な情報であることに気づくでしょう。 QMK Configurator は Chrome/Firefox で最適に動作します。 -!> **KLE や kbfirmware などの他のツールのファイルは、QMK Configurator と互換性がありません。それらをロードしたり、インポートしたりしないでください。QMK Configurator は異なるツールです。** - -## キーボードを選ぶ - -ドロップダウンボックスをクリックして、キーマップを作成するキーボードを選択します。 - -?> **キーボードに複数のバージョンがある場合は、正しいバージョンを選択してください。** - -大事なことなのでもう一度言います。 - -!> **正しいバージョンを選択してください!** - -キーボードが QMK を搭載していると宣伝されていてもリストにない場合は、開発者がまだ作業中か、私たちがまだマージするきっかけがなかった可能性があります。 -アクティブな [Pull Request](https://github.com/qmk/qmk_firmware/pulls?q=is%3Aopen+is%3Apr+label%3Akeyboard) がない場合、[qmk_firmware](https://github.com/qmk/qmk_firmware/issues)で報告して、その特定のキーボードのサポートをリクエストします。 -製作者自身の GitHub アカウントにある QMK 搭載キーボードもあります。 -それも再確認してください。 - -## キーボードのレイアウトを選択する - -作成したいと思うキーマップに最も近いレイアウトを選択します。一部のキーボードには、まだ十分なレイアウトまたは正しいレイアウトが定義されていません。これらは将来サポートされる予定です。 - -## キーマップの名前 - -お好みの名前をキーマップにつけます。 - -?> コンパイル時に問題が発生した場合は、もしかすると QMK ファームウェアリポジトリに既に同じ名前が存在しているのかもしれません、名前を変更してみてください。 - -## キーマップを作る - -キーコード入力は3つの方法で実行できます。 -1. ドラッグ・アンド・ドロップ -2. レイアウト上の空の場所をクリックして、希望するキーコードをクリックします -3. レイアウト上の空の場所をクリックして、キーボードの物理キーを押します - -マウスをキーの上に置くと、そのキーコードの機能の短い説明文が出ます。より詳細な説明については以下を見てください。 - -[Basic Keycode Reference](https://docs.qmk.fm/#/keycodes_basic) -[Advanced Keycode Reference](https://docs.qmk.fm/#/feature_advanced_keycodes) - -キーマップをサポートするレイアウトが見つからない場合、例えばスペースバーが3分割されていたり、バックスペースが2分割されていたり、シフトが2分割されているような場合、それらを全て埋めてください。 - -### 例: - -3分割のスペースバー: 全てスペースバーで埋めます。 - -2分割のバックスペース: 両方ともバックスペースで埋めます。 - -2分割の右シフト: 両方とも右シフトで埋めます。 - -左シフトと ISO サポート用に1つずつ: 両方とも左シフトで埋めます。 - -5分割だが4キーのみ: 以前やったことがある人を推測して確認するか尋ねてください。 - -## 後日のためにキーマップを保存する - -キーマップに満足するか、または後で作業したい場合は、`Export Keymap' ボタンを押します。上記で選択した名前に .json が追加されたキーマップが保存されます。 - -後日、`Import Keymap` ボタンを押すことで、この .json ファイルをロードできます。 - -!> **注意:** このファイルは、kbfirmware.com またはその他のツールに使用される .json ファイルと同じ形式ではありません。これらのツールにこれを使用したり、QMK Configurator でこれらのツールの .json を使用しようとすると、キーボードが **爆発** する可能性があります。 - -## ファームウェアファイルを生成する - -緑色の `Compile` ボタンを押します。 - -コンパイルが完了すると、緑色の `Download Firmware` ボタンを押すことができます。 - -## キーボードに書き込む(フラッシュする) - -[ファームウェアを書きこむ](ja/newbs_flashing.md) を参照してください。 - -## トラブルシューティング - -#### 私の .json ファイルが動きません - -.json ファイルが QMK Configurator で作ったものの場合、おめでとうございます。バグに遭遇しました。 [qmk_configurator](https://github.com/qmk/qmk_configurator/issues) で報告してください。 - -そうでない場合は、... 他の .json ファイルを使用しないようにという、上に書いた注意書きを見逃してませんか? - -#### レイアウトに余分なスペースがありますか?どうすればいいですか? - -もしスペースバーが3つに分かれている場合は、全てスペースバーで埋めるのが最善の方法です。バックスペースやシフトについても同じことができます。 - -#### キーコードってなに? - -以下を見てください。 - -[Basic Keycode Reference](https://docs.qmk.fm/#/keycodes_basic) -[Advanced Keycode Reference](https://docs.qmk.fm/#/feature_advanced_keycodes) - -#### コンパイルできません - -キーマップの他のレイヤーを再確認して、ランダムなキーが存在しないことを確認してください。 - -## 問題とバグ +!> **注意: Keyboard Layout Editor (KLE) や kbfirmware などの他のツールのファイルは、QMK Configurator と互換性がありません。それらをロードしたり、インポートしたりしないでください。QMK Configurator は異なるツールです。** -私たちは利用者の依頼やバグレポートを常に受け入れています。[qmk_configurator](https://github.com/qmk/qmk_configurator/issues) で報告してください。 +[QMK Configurator: ステップ・バイ・ステップ](ja/configurator_step_by_step.md)を参照してください。 From 4d218566ccec5b7b9499a351f3acc5442f9f2c6a Mon Sep 17 00:00:00 2001 From: Pierre Chevalier Date: Wed, 24 Jun 2020 10:42:20 +0100 Subject: [PATCH 254/930] [Keymap] Add pierrec83's gherkin keymap (#9465) * [Keymap] Add pierrec83's gherkin keymap Contribute my gherkin keymap upstream as it is semi-stable. It has grown in symbiosis with my Kyria keymap which is already upstream. Add a readme * Remove generated keymap and instructions to generate it as it is done by qmk flash --- .../gherkin/keymaps/pierrec83/config.h | 31 +++++++++++++++ .../gherkin/keymaps/pierrec83/keymap.json | 1 + .../gherkin/keymaps/pierrec83/readme.md | 38 +++++++++++++++++++ .../gherkin/keymaps/pierrec83/rules.mk | 1 + 4 files changed, 71 insertions(+) create mode 100644 keyboards/40percentclub/gherkin/keymaps/pierrec83/config.h create mode 100644 keyboards/40percentclub/gherkin/keymaps/pierrec83/keymap.json create mode 100644 keyboards/40percentclub/gherkin/keymaps/pierrec83/readme.md create mode 100644 keyboards/40percentclub/gherkin/keymaps/pierrec83/rules.mk diff --git a/keyboards/40percentclub/gherkin/keymaps/pierrec83/config.h b/keyboards/40percentclub/gherkin/keymaps/pierrec83/config.h new file mode 100644 index 000000000000..a635e944c172 --- /dev/null +++ b/keyboards/40percentclub/gherkin/keymaps/pierrec83/config.h @@ -0,0 +1,31 @@ +#pragma once + +/* Make layout the right way: + * - USB port on left side + * - Switches facing the correct way + */ +#undef MATRIX_ROW_PINS +#undef MATRIX_COL_PINS +#define MATRIX_ROW_PINS { B6, B2, B3, B1, F7 } +#define MATRIX_COL_PINS { D0, D4, C6, D7, E6, B4 } + +// Set the mouse settings to a comfortable speed/accuracy trade-off +// Assume the screen refresh rate is 60 Htz or higher +// The default is 50. This makes the mouse ~3 times faster and more accurate +#define MOUSEKEY_INTERVAL 16 +// The default is 20. Since we made the mouse about 3 times faster with the previous setting, +// give it more time to accelerate to max speed to retain precise control over short distances. +#define MOUSEKEY_TIME_TO_MAX 40 +// The default is 300. Let's try and make this as low as possible while keeping the cursor responsive +#define MOUSEKEY_DELAY 100 +// It makes sense to use the same delay for the mouseweel +#define MOUSEKEY_WHEEL_DELAY 100 +// The default is 100 +#define MOUSEKEY_WHEEL_INTERVAL 50 +// The default is 40 +#define MOUSEKEY_WHEEL_TIME_TO_MAX 100 + +#define TAPPING_TERM 200 +#define PERMISSIVE_HOLD +#define IGNORE_MOD_TAP_INTERRUPT +#define TAPPING_FORCE_HOLD diff --git a/keyboards/40percentclub/gherkin/keymaps/pierrec83/keymap.json b/keyboards/40percentclub/gherkin/keymaps/pierrec83/keymap.json new file mode 100644 index 000000000000..073eb568f048 --- /dev/null +++ b/keyboards/40percentclub/gherkin/keymaps/pierrec83/keymap.json @@ -0,0 +1 @@ +{"version":1,"notes":"My awesome keymap","documentation":"\"This file is a QMK Configurator export. You can import this at . It can also be used directly with QMK's source code.\n\nTo setup your QMK environment check out the tutorial: \n\nYou can convert this file to a keymap.c using this command: `qmk json2c {keymap}`\n\nYou can compile this keymap using this command: `qmk compile {keymap}`\"\n","keyboard":"40percentclub/gherkin","keymap":"pierrec83","layout":"LAYOUT_ortho_3x10","layers":[["KC_Q","KC_D","KC_R","KC_W","KC_B","KC_J","KC_F","KC_U","KC_P","KC_BSPC","LSFT_T(KC_A)","LT(5,KC_S)","LT(1,KC_H)","LT(3,KC_T)","KC_G","KC_Y","LT(4,KC_N)","LT(2,KC_E)","LT(6,KC_O)","LSFT_T(KC_I)","KC_Z","KC_X","KC_M","KC_C","KC_V","LT(7,KC_SPC)","KC_L","LALT_T(KC_COMM)","LCTL_T(KC_DOT)","KC_K"],["KC_TRNS","ANY(LCTL(LSFT(KC_C)))","KC_PGUP","ANY(LCTL(LSFT(KC_V)))","KC_TRNS","KC_TRNS","KC_BTN1","KC_WH_U","KC_BTN2","KC_TRNS","KC_TRNS","KC_BTN2","KC_NO","KC_BTN1","KC_TRNS","KC_TRNS","KC_MS_L","KC_MS_D","KC_MS_U","KC_MS_R","KC_TRNS","KC_TRNS","KC_PGDN","KC_TRNS","KC_TRNS","KC_TRNS","KC_MPRV","KC_WH_D","KC_MNXT","TG(1)"],["KC_TRNS","KC_TRNS","KC_PGUP","KC_TRNS","KC_TRNS","BL_BRTG","BL_INC","KC_WH_U","KC_TRNS","KC_TRNS","KC_LEFT","KC_UP","KC_DOWN","KC_RGHT","KC_TRNS","BL_TOGG","KC_LGUI","KC_NO","LCTL(KC_LALT)","LCA(KC_LSFT)","KC_TRNS","KC_HOME","KC_PGDN","KC_END","KC_TRNS","BL_STEP","BL_DEC","KC_WH_D","KC_TRNS","KC_TRNS"],["KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_UNDS","KC_PIPE","KC_QUOT","KC_TRNS","KC_CIRC","KC_ASTR","KC_AMPR","KC_NO","KC_TRNS","KC_HASH","KC_TILD","KC_SLSH","KC_DQUO","KC_DLR","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_MINS","KC_BSLS","KC_GRV","KC_TRNS"],["KC_TRNS","KC_COLN","KC_LT","KC_GT","KC_SCLN","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_LCBR","KC_RCBR","KC_LPRN","KC_RPRN","KC_AT","KC_TRNS","KC_NO","KC_EQL","KC_PLUS","KC_PERC","KC_TRNS","KC_EXLM","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_F7","KC_F8","KC_F9","KC_F10","KC_LCTL","KC_NO","KC_LALT","LCTL(KC_LALT)","KC_TRNS","KC_TRNS","KC_F4","KC_F5","KC_F6","KC_F11","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_F1","KC_F2","KC_F3","KC_F12"],["KC_PSLS","KC_7","KC_8","KC_9","KC_PPLS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_0","KC_4","KC_5","KC_6","KC_PMNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_NO","KC_TRNS","KC_PAST","KC_1","KC_2","KC_3","KC_PEQL","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS"],["LT(8,KC_TRNS)","KC_ESC","KC_COLN","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_DEL","KC_TRNS","KC_PERC","KC_SLSH","KC_ENT","KC_EXLM","KC_TRNS","KC_LGUI","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TAB","KC_TRNS","KC_TRNS","RALT(KC_TRNS)","RCTL(KC_TRNS)","TG(1)"],["KC_NO","KC_NO","KC_NO","KC_NO","KC_NO","KC_NO","KC_NO","KC_NO","KC_NO","EEP_RST","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"]],"author":"Anonymous"} \ No newline at end of file diff --git a/keyboards/40percentclub/gherkin/keymaps/pierrec83/readme.md b/keyboards/40percentclub/gherkin/keymaps/pierrec83/readme.md new file mode 100644 index 000000000000..0ade64b34634 --- /dev/null +++ b/keyboards/40percentclub/gherkin/keymaps/pierrec83/readme.md @@ -0,0 +1,38 @@ +@pierrec83's keymap for the gherkin +=== + +A usable keymap for the gherkin's 30 keys layout, somewhat in sync with my Kyria keymap. + +This keymap is more or less an adaptation of my Kyria keymap which sacrifices some convenience but retains most functionality. + +Features +--- +* Mouse keys with constants tuned so the keyboard usable for me as my sole pointing device +* Homerow layers activation +* Minimal side-index motion thanks to workman base layer and similar principles in other layers +* Two symbol layers, both activated with one homerow key and either another key on the same hand's homerow or a key from the other hand +* Mousing around, including left and right clicking can be done either one-handed or fully on the homerow with both hands +* Easy chaining of common command line or vim patterns, such as `~/`, `()`, `ESC : w ENTER` etc. +* Common OS shortcuts like switching workspaces on gnome or MacOS easily accessible (for the shortcuts I use. This may not apply to others) + +Instructions to update the keymap +--- + +For now, I am still more comfortable updating the keymap through the qmk configurator as I don't trust myself to manually keep comments describing the keymap in sync with the code itself. This means that my keymap.c is generated and not really readable. For a readble view of my keymap, one must import keymap.json into [qmk configurator](https://config.qmk.fm) and use the web UI or print it. + +To update the keymap, +* Load keymap.json into qmk configurator +* Perform any edits +* Export the keymap. This should save a json file in `~/Downloads/pierrec83.json` or equivalent for your OS +* From the root of qmk_firmware, move the keymap to its destination: +``` +mv ~/Downloads/pierrec83.json keyboards/40percentclub/gherkin/keymaps/pierrec83/keymap.json +``` +* Flash the firmware (for instance, if left hand is plugged): +``` +qmk flash -kb 40percentclub/gherkin -km pierrec83 +``` + +Author +--- +I am @pierrec83 on Twitter, @pierrechevalier83 on github. I chose the shorter nickname for my keymap. diff --git a/keyboards/40percentclub/gherkin/keymaps/pierrec83/rules.mk b/keyboards/40percentclub/gherkin/keymaps/pierrec83/rules.mk new file mode 100644 index 000000000000..bd518d8f273f --- /dev/null +++ b/keyboards/40percentclub/gherkin/keymaps/pierrec83/rules.mk @@ -0,0 +1 @@ +BACKLIGHT_ENABLE = yes From 598c392709141a8d9bff1d8ab12fd50ef4f478ae Mon Sep 17 00:00:00 2001 From: Rozakiin <6567067+Rozakiin@users.noreply.github.com> Date: Wed, 24 Jun 2020 19:34:55 +0100 Subject: [PATCH 255/930] Add VIA support to Noxary 268 (#9449) * Remove "rev1" from readme.md * Update rules.mk to enable bootmagic, mousekeys, console, command Also disable NKRO * Update USB descriptor, replace ifndef with pragma once, remove RGB * Replace ifndef with pragma once * Add commented led code * Add VIA keymap * Update keyboards/noxary/268/268.c Remove commented code * Update keyboards/noxary/268/keymaps/via/readme.md Flip layout image and title * Update keyboards/noxary/268/rules.mk Remove error in comment * Update keyboards/noxary/268/rules.mk Remove HD44780 rule option * Update keyboards/noxary/268/keymaps/via/rules.mk Replace Link_Time_Optimization with LTO * Update keyboards/noxary/268/readme.md Change Noxary link --- keyboards/noxary/268/268.c | 15 +++ keyboards/noxary/268/268.h | 29 +++++- keyboards/noxary/268/config.h | 38 ++++--- keyboards/noxary/268/keymaps/via/keymap.c | 110 +++++++++++++++++++++ keyboards/noxary/268/keymaps/via/readme.md | 3 + keyboards/noxary/268/keymaps/via/rules.mk | 5 + keyboards/noxary/268/readme.md | 3 +- keyboards/noxary/268/rules.mk | 28 +++--- 8 files changed, 193 insertions(+), 38 deletions(-) create mode 100644 keyboards/noxary/268/keymaps/via/keymap.c create mode 100644 keyboards/noxary/268/keymaps/via/readme.md create mode 100644 keyboards/noxary/268/keymaps/via/rules.mk diff --git a/keyboards/noxary/268/268.c b/keyboards/noxary/268/268.c index 9d819aa4e884..60ea6070d480 100644 --- a/keyboards/noxary/268/268.c +++ b/keyboards/noxary/268/268.c @@ -1 +1,16 @@ +/* Copyright 2019 Rozakiin + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ #include "268.h" diff --git a/keyboards/noxary/268/268.h b/keyboards/noxary/268/268.h index 28565318adb1..bef5ff5a0eda 100644 --- a/keyboards/noxary/268/268.h +++ b/keyboards/noxary/268/268.h @@ -1,11 +1,34 @@ -#ifndef noxary268_H -#define noxary268_H +/* Copyright 2020 Rozakiin + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License 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" // readability #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. + */ + /* * LAYOUT OPTIONS * @@ -79,5 +102,3 @@ { K300, ____, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, ____, K314, K315 }, \ { K400, K401, K402, ____, ____, ____, K406, ____, ____, ____, K410, K411, ____, K413, K414, K415 } \ } - -#endif diff --git a/keyboards/noxary/268/config.h b/keyboards/noxary/268/config.h index 8264b8019ee9..8038ef8bbb35 100644 --- a/keyboards/noxary/268/config.h +++ b/keyboards/noxary/268/config.h @@ -1,5 +1,5 @@ /* -Copyright 2017 Ruari Armstrong +Copyright 2020 Rozakiin This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -15,29 +15,37 @@ 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 0x4E58 -#define PRODUCT_ID 0x0044 +#define VENDOR_ID 0x4E58 //"NX" +#define PRODUCT_ID 0x010C //268 #define DEVICE_VER 0x0001 #define MANUFACTURER Noxary #define PRODUCT 268 -#define DESCRIPTION QMK keyboard firmware for 268 +#define DESCRIPTION A fully customizable 65% keyboard. /* key matrix size */ #define MATRIX_ROWS 5 #define MATRIX_COLS 16 -/* key matrix pins */ +/* + * 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, F0, F1, D0 } #define MATRIX_COL_PINS { C6, C7, F7, F6, E6, B0, D1, B2, B3, D2, D3, D5, D4, D6, D7, B4 } #define UNUSED_PINS -/* COL2ROW or ROW2COL */ +/* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW /* number of backlight levels */ @@ -53,16 +61,4 @@ along with this program. If not, see . #define LOCKING_SUPPORT_ENABLE /* Locking resynchronize hack */ -#define LOCKING_RESYNC_ENABLE - -/* ws2812b options */ -#define RGB_DI_PIN B5 -#ifdef RGB_DI_PIN -#define RGBLIGHT_ANIMATIONS -#define RGBLED_NUM 18 -#define RGBLIGHT_HUE_STEP 16 -#define RGBLIGHT_SAT_STEP 16 -#define RGBLIGHT_VAL_STEP 16 -#endif - -#endif +#define LOCKING_RESYNC_ENABLE \ No newline at end of file diff --git a/keyboards/noxary/268/keymaps/via/keymap.c b/keyboards/noxary/268/keymaps/via/keymap.c new file mode 100644 index 000000000000..431ea5bac4ca --- /dev/null +++ b/keyboards/noxary/268/keymaps/via/keymap.c @@ -0,0 +1,110 @@ +/* Copyright 2020 Rozakiin + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public 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. +enum layer_names { + _BL, + _FL1, + _FL2, + _FL3 +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* Base Layer - For ISO enter use ANSI enter + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┬───┐ + * │Esc│ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ - │ = │ \ │Bsp│ ` │ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┼───┤ + * │ Tab │ Q │ W │ E │ R │ T │ Y │ U │ I │ O │ P │ [ │ ] │ \ │Del│ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┼───┤ + * │ Caps │ A │ S │ D │ F │ G │ H │ J │ K │ L │ ; │ ' │ # │Ent │PgU│ + * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┬───┼───┤ + * │Sft │ \ │ Z │ X │ C │ V │ B │ N │ M │ , │ . │ / │Shift │ ↑ │PgD│ + * ├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┼───┴┬──┴─┬─┴──┬───┼───┼───┤ + * │Ctrl│Win │Alt │ Space │Alt │M(1)│Ctrl│ ← │ ↓ │ → │ + * └────┴────┴────┴─────────────────────┴────┴────┴────┴───┴───┴───┘ + */ + [_BL] = 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_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_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_RSFT, KC_UP, KC_PGDN, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(_FL1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT + ), + /* Function Layer 1 - For ISO enter use ANSI enter + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┬───┐ + * │ ` │F1 │F2 │F3 │F4 │F5 │F6 │F7 │F8 │F9 │F10│F11│F12│ │PSc│ │ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┼───┤ + * │ │ │ │ │RST│ │ │ │ │ │ │ │ │ │Ins│ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┼───┤ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │Hom│ + * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┬───┼───┤ + * │ │ │ │ │ │ │ │ │ │Bl-│Bl+│ │ Mute │Vl+│End│ + * ├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┼───┴┬──┴─┬─┴──┬───┼───┼───┤ + * │ │ │ │ BL_Toggle │ │ │ │ │Vl-│ │ + * └────┴────┴────┴─────────────────────┴────┴────┴────┴───┴───┴───┘ + */ + [_FL1] = 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_PSCR, _______, + _______, _______, _______, _______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_INS, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, + _______, _______, _______, _______, _______, _______, _______, _______, _______, BL_DEC, BL_INC, _______, KC_MUTE, KC_MUTE, KC_VOLU, KC_END, + _______, _______, _______, BL_TOGG, _______, _______, _______, _______, KC_VOLD, _______ + ), + /* Function Layer 2 - For ISO enter use ANSI enter + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┬───┐ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┼───┤ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┼───┤ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┬───┼───┤ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + * ├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┼───┴┬──┴─┬─┴──┬───┼───┼───┤ + * │ │ │ │ │ │ │ │ │ │ │ + * └────┴────┴────┴─────────────────────┴────┴────┴────┴───┴───┴───┘ + */ + [_FL3] = LAYOUT_all( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + /* Function Layer 3 - For ISO enter use ANSI enter + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┬───┐ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┼───┤ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┼───┤ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┬───┼───┤ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + * ├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┼───┴┬──┴─┬─┴──┬───┼───┼───┤ + * │ │ │ │ │ │ │ │ │ │ │ + * └────┴────┴────┴─────────────────────┴────┴────┴────┴───┴───┴───┘ + */ + [_FL3] = LAYOUT_all( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), +}; \ No newline at end of file diff --git a/keyboards/noxary/268/keymaps/via/readme.md b/keyboards/noxary/268/keymaps/via/readme.md new file mode 100644 index 000000000000..e2adb0eef28c --- /dev/null +++ b/keyboards/noxary/268/keymaps/via/readme.md @@ -0,0 +1,3 @@ +# The VIA keymap for Noxary 268 + +![Noxary 268 Layout Image](https://i.imgur.com/D9jQz6g.png) diff --git a/keyboards/noxary/268/keymaps/via/rules.mk b/keyboards/noxary/268/keymaps/via/rules.mk new file mode 100644 index 000000000000..c2e96d233b21 --- /dev/null +++ b/keyboards/noxary/268/keymaps/via/rules.mk @@ -0,0 +1,5 @@ +VIA_ENABLE = yes +MOUSEKEY_ENABLE = no +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = no # Commands for debug and configuration +LTO_ENABLE = yes diff --git a/keyboards/noxary/268/readme.md b/keyboards/noxary/268/readme.md index adc1add18db4..e1f3f0642660 100644 --- a/keyboards/noxary/268/readme.md +++ b/keyboards/noxary/268/readme.md @@ -6,8 +6,7 @@ A fully customizable 65% keyboard. * Keyboard Maintainer: [Rozakiin](https://github.com/rozakiin) * Hardware Supported: 268 PCB - * rev1 -* Hardware Availability: [Noxary](https://www.instagram.com/noxaryco/) +* Hardware Availability: [Noxary](https://noxary.co) Make example for this keyboard (after setting up your build environment): diff --git a/keyboards/noxary/268/rules.mk b/keyboards/noxary/268/rules.mk index f2d381510d0c..11c8a575bb88 100644 --- a/keyboards/noxary/268/rules.mk +++ b/keyboards/noxary/268/rules.mk @@ -12,15 +12,21 @@ MCU = atmega32u4 BOOTLOADER = atmel-dfu # Build Options -# comment out to disable the 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 -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 = no +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 +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 From 2521b970e5494380ccbdda922ea3f521e76ad01c Mon Sep 17 00:00:00 2001 From: jotix <47826561+jotix@users.noreply.github.com> Date: Wed, 24 Jun 2020 20:27:25 -0300 Subject: [PATCH 256/930] add_adjust_layer (#9532) --- layouts/community/ortho_4x12/jotix/keymap.c | 44 +++++++-------------- 1 file changed, 15 insertions(+), 29 deletions(-) diff --git a/layouts/community/ortho_4x12/jotix/keymap.c b/layouts/community/ortho_4x12/jotix/keymap.c index 09543090d25d..d28be78e56d0 100644 --- a/layouts/community/ortho_4x12/jotix/keymap.c +++ b/layouts/community/ortho_4x12/jotix/keymap.c @@ -4,16 +4,13 @@ enum layers { _QWERTY, _LOWER, _RAISE, + _ADJUST }; #define LOWER MO(_LOWER) #define RAISE MO(_RAISE) #define TGLOWER TG(_LOWER) -static bool is_ctl_pressed; -static bool is_esc_pressed; -static bool is_bspc_pressed; - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_QWERTY] = LAYOUT_ortho_4x12 ( @@ -52,46 +49,35 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { // └───────┴───────┴───────┴───────┴───────┴───────┴───────┴───────┴───────┴───────┴───────┴───────┘ ), +[_ADJUST] = LAYOUT_ortho_4x12 ( +// ┌───────┬───────┬───────┬───────┬───────┬───────┬───────┬───────┬───────┬───────┬───────┬───────┐ + _______,RESET, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______, +// ├───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┤ + _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, +// ├───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┤ + _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, +// ├───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┤ + _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______ +// └───────┴───────┴───────┴───────┴───────┴───────┴───────┴───────┴───────┴───────┴───────┴───────┘ +), + }; layer_state_t layer_state_set_user(layer_state_t state) { #ifdef JOTANCK_LEDS writePin(JOTANCK_LED1, (get_highest_layer(state) == _LOWER)); #endif - return state; + return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST); } bool led_update_user(led_t led_state) { - // NumLock allways on if (!led_state.num_lock) { tap_code(KC_NUMLOCK); } - #ifdef JOTANCK_LEDS // CapsLock led writePin(JOTANCK_LED2, led_state.caps_lock); #endif return true; -} - -bool process_record_user(uint16_t keycode, keyrecord_t *record) { - switch (keycode) { - case KC_LCTL: - is_ctl_pressed = record->event.pressed; - break; - case KC_ESC: - is_esc_pressed = record->event.pressed; - break; - case KC_BSPC: - is_bspc_pressed = record->event.pressed; - break; - }; - return true; -} - -void matrix_scan_user(void) { - if (is_ctl_pressed && is_esc_pressed && is_bspc_pressed) { - reset_keyboard(); - } -} +} \ No newline at end of file From ce91b36c5dd75a7e09700a2362adeb04021582c4 Mon Sep 17 00:00:00 2001 From: Takeshi ISHII <2170248+mtei@users.noreply.github.com> Date: Thu, 25 Jun 2020 14:22:17 +0900 Subject: [PATCH 257/930] [Update] Japanese Translation of docs/feature_layers.md (#9537) * update docs/ja/feature_layers.md see https://github.com/qmk/qmk_firmware/pull/9492 * update original document's TAG --- docs/ja/feature_layers.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/ja/feature_layers.md b/docs/ja/feature_layers.md index b855172094b0..6b18a30c7c4f 100644 --- a/docs/ja/feature_layers.md +++ b/docs/ja/feature_layers.md @@ -1,8 +1,8 @@ # レイヤー :id=layers QMK ファームウェアの最も強力で良く使われている機能の一つは、レイヤーを使う機能です。ほとんどの人にとって、これはラップトップやタブレットキーボードにあるのと同じように、様々なキーを可能にするファンクションキーに相当します。 @@ -24,7 +24,7 @@ QMK ファームウェアの最も強力で良く使われている機能の一 ### 注意事項 :id=caveats -現在のところ、`LT()` と `MT()` は[基本的なキーコードセット](ja/keycodes_basic.md)に制限されています。つまり、`LCTL()`、`KC_TILD` あるいは `0xFF` より大きなキーコードを使うことができません。特に、`LT` と `MT` のような二重の機能キーは16ビットキーコードを使います。4ビットは機能の識別のために使われ、次の12ビットはパラメータに分かれます。レイヤータップはレイヤーに4ビットを使います(実はレイヤータップがレイヤー 0-16 に制限されている理由です)。モッドタップも同じですが、識別子に4ビット、モッドのために4ビットが使われ、全体でキーコードに8ビットを使います。このため、使用されるキーコードは `0xFF` (0-255) に制限され、基本的なキーコードのみです。 +現在のところ、`LT()` と `MT()` は[基本的なキーコードセット](ja/keycodes_basic.md)に制限されています。つまり、`LCTL()`、`KC_TILD` あるいは `0xFF` より大きなキーコードを使うことができません。特に、`LT` と `MT` のような二重の機能キーは16ビットキーコードを使います。4ビットは機能の識別のために使われ、次の12ビットはパラメータに分かれます。レイヤータップはレイヤーに4ビットを使います(実はレイヤータップがレイヤー 0-15 に制限されている理由です)。モッドタップも同じですが、識別子に4ビット、モッドのために4ビットが使われ、全体でキーコードに8ビットを使います。このため、使用されるキーコードは `0xFF` (0-255) に制限され、基本的なキーコードのみです。 これを拡張してもせいぜい複雑になるだけでしょう。32ビットキーコードに移行すると、これの多くが解決されますが、キーマップマトリックスが使用する領域が2倍になります。また、問題が起きる可能性もあります。タップしたキーコードにモディファイアを適用する必要がある場合は、[タップダンス](ja/feature_tap_dance.md#example-5-using-tap-dance-for-advanced-mod-tap-and-layer-tap-keys)を使うことができます。 From 9b85bd68a45026fb796806342b47ac0176ab6510 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Guillaume=20G=C3=A9rard?= <1322081+GreatWizard@users.noreply.github.com> Date: Thu, 25 Jun 2020 07:52:40 +0200 Subject: [PATCH 258/930] feat: add dvorak-fr as extra keymap (#9512) --- docs/reference_keymap_extras.md | 1 + quantum/keymap_extras/keymap_dvorak_fr.h | 135 +++++++++++++++++++ quantum/keymap_extras/sendstring_dvorak_fr.h | 80 +++++++++++ 3 files changed, 216 insertions(+) create mode 100644 quantum/keymap_extras/keymap_dvorak_fr.h create mode 100644 quantum/keymap_extras/sendstring_dvorak_fr.h diff --git a/docs/reference_keymap_extras.md b/docs/reference_keymap_extras.md index 44b056af6511..a7026a0994ec 100644 --- a/docs/reference_keymap_extras.md +++ b/docs/reference_keymap_extras.md @@ -64,6 +64,7 @@ There are also a few which are not quite language-specific, but useful if you ar |-------------------|------------------------| |Colemak |`keymap_colemak.h` | |Dvorak |`keymap_dvorak.h` | +|Dvorak (French) |`keymap_dvorak_fr.h` | |Dvorak (Programmer)|`keymap_dvp.h` | |Norman |`keymap_norman.h` | |Plover* |`keymap_plover.h` | diff --git a/quantum/keymap_extras/keymap_dvorak_fr.h b/quantum/keymap_extras/keymap_dvorak_fr.h new file mode 100644 index 000000000000..7bb5893d3707 --- /dev/null +++ b/quantum/keymap_extras/keymap_dvorak_fr.h @@ -0,0 +1,135 @@ +/* Copyright 2020 Guillaume Gérard + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +/* Dvorak for the French language + * Version: 2 + * + * The layout is designed by Francis Leboutte + * + * Source: https://algo.be/ergo/dvorak-fr.html + */ + +#pragma once + +#include "keymap.h" + +// clang-format off + +/* + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ + * │ « │ » │ / │ - │ è │ \ │ ^ │ ( │ ` │ ) │ _ │ [ │ ] │       │ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ + * │     │ : │ ' │ é │ G │ . │ H │ V │ C │ M │ K │ Z │ ¨ │     │ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐    │ + * │      │ O │ A │ U │ E │ B │ F │ S │ T │ N │ D │ W │ ~ │    │ + * ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴────┤ + * │    │ à │ ; │ Q │ , │ I │ Y │ X │ R │ L │ P │ J │          │ + * ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤ + * │    │    │    │                        │    │    │    │    │ + * └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘ + */ +// Row 1 +#define DV_LDAQ KC_GRV // « +#define DV_RDAQ KC_1 // » +#define DV_SLSH KC_2 // / +#define DV_MINS KC_3 // - +#define DV_EGRV KC_4 // è +#define DV_BSLS KC_5 // (backslash) +#define DV_CIRC KC_6 // ^ (dead) +#define DV_LPRN KC_7 // ( +#define DV_GRV KC_8 // ` (dead) +#define DV_RPRN KC_9 // ) +#define DV_UNDS KC_0 // _ +#define DV_LBRC KC_MINS // [ +#define DV_RBRC KC_EQL // ] +// Row 2 +#define DV_COLN KC_Q // : +#define DV_QUOT KC_W // ' +#define DV_EACU KC_E // é +#define DV_G KC_R // G +#define DV_DOT KC_T // . +#define DV_H KC_Y // H +#define DV_V KC_U // V +#define DV_C KC_I // C +#define DV_M KC_O // M +#define DV_K KC_P // K +#define DV_Z KC_LBRC // Z +#define DV_DIAE KC_RBRC // ¨ (dead) +// Row 3 +#define DV_O KC_A // O +#define DV_A KC_S // A +#define DV_U KC_D // U +#define DV_E KC_F // E +#define DV_B KC_G // B +#define DV_F KC_H // F +#define DV_S KC_J // S +#define DV_T KC_K // T +#define DV_N KC_L // N +#define DV_D KC_SCLN // D +#define DV_W KC_QUOT // W +#define DV_TILD KC_NUHS // ~ (dead) +// Row 4 +#define DV_AGRV KC_NUBS // à +#define DV_SCLN KC_Z // ; +#define DV_Q KC_X // Q +#define DV_COMM KC_C // , +#define DV_I KC_V // I +#define DV_Y KC_B // Y +#define DV_X KC_N // X +#define DV_R KC_M // R +#define DV_L KC_COMM // L +#define DV_P KC_DOT // P +#define DV_J KC_SLSH // J + +/* Shifted symbols + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ + * │ * │ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 0 │ 0 │ + │ % │       │ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ + * │     │ ? │ < │ > │   │ ! │   │   │   │   │   │   │ = │     │ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐    │ + * │      │   │   │   │   │   │   │   │   │   │   │   │ # │    │ + * ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴────┤ + * │    │ ç │ | │   │ @ │   │   │   │   │   │   │   │          │ + * ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤ + * │    │    │    │                        │    │    │    │    │ + * └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘ + */ +// Row 1 +#define DV_ASTR S(DV_LDAQ) // * +#define DV_1 S(DV_RDAQ) // 1 +#define DV_2 S(DV_SLSH) // 2 +#define DV_3 S(DV_MINS) // 3 +#define DV_4 S(DV_EGRV) // 4 +#define DV_5 S(DV_BSLS) // 5 +#define DV_6 S(DV_CIRC) // 6 +#define DV_7 S(DV_LPRN) // 7 +#define DV_8 S(DV_GRV) // 8 +#define DV_9 S(DV_RPRN) // 9 +#define DV_0 S(DV_UNDS) // 0 +#define DV_PLUS S(DV_LBRC) // + +#define DV_PERC S(DV_RBRC) // % +// Row 2 +#define DV_QUES S(DV_COLN) // ? +#define DV_LABK S(DV_QUOT) // < +#define DV_RABK S(DV_EACU) // > +#define DV_EXLM S(DV_DOT) // ! +#define DV_EQL S(DV_DIAE) // = +// Row 3 +#define DV_HASH S(DV_TILD) // # +// Row 4 +#define DV_CCED S(DV_AGRV) // ç +#define DV_PIPE S(DV_SCLN) // | +#define DV_AT S(DV_COMM) // @ diff --git a/quantum/keymap_extras/sendstring_dvorak_fr.h b/quantum/keymap_extras/sendstring_dvorak_fr.h new file mode 100644 index 000000000000..98d0577afa72 --- /dev/null +++ b/quantum/keymap_extras/sendstring_dvorak_fr.h @@ -0,0 +1,80 @@ +/* Copyright 2020 Guillaume Gérard + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General 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 Dvorak French layouts + +#pragma once + +#include "keymap_dvorak_fr.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, 0, 1, 0, 1, 0, 0), + KCLUT_ENTRY(0, 0, 1, 1, 0, 0, 0, 0), + KCLUT_ENTRY(1, 1, 1, 1, 1, 1, 1, 1), + KCLUT_ENTRY(1, 1, 0, 0, 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, 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, 1, 0, 0, 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, DV_DOT, XXXXXXX, DV_TILD, XXXXXXX, DV_RBRC, XXXXXXX, DV_QUOT, + // ( ) * + , - . / + DV_LPRN, DV_RPRN, DV_LDAQ, DV_LBRC, DV_COMM, DV_MINS, DV_DOT, DV_SLSH, + // 0 1 2 3 4 5 6 7 + DV_UNDS, DV_RDAQ, DV_SLSH, DV_MINS, DV_EGRV, DV_BSLS, DV_CIRC, DV_LPRN, + // 8 9 : ; < = > ? + DV_GRV, DV_RPRN, DV_COLN, DV_SCLN, DV_QUOT, DV_DIAE, DV_EACU, DV_COLN, + // @ A B C D E F G + DV_COMM, DV_A, DV_B, DV_C, DV_D, DV_E, DV_F, DV_G, + // H I J K L M N O + DV_H, DV_I, DV_J, DV_K, DV_L, DV_M, DV_N, DV_O, + // P Q R S T U V W + DV_P, DV_Q, DV_R, DV_S, DV_T, DV_U, DV_V, DV_W, + // X Y Z [ \ ] ^ _ + DV_X, DV_Y, DV_Z, DV_LBRC, DV_BSLS, DV_RBRC, DV_CIRC, DV_UNDS, + // ` a b c d e f g + DV_GRV, DV_A, DV_B, DV_C, DV_D, DV_E, DV_F, DV_G, + // h i j k l m n o + DV_H, DV_I, DV_J, DV_K, DV_L, DV_M, DV_N, DV_O, + // p q r s t u v w + DV_P, DV_Q, DV_R, DV_S, DV_T, DV_U, DV_V, DV_W, + // x y z { | } ~ DEL + DV_X, DV_Y, DV_Z, XXXXXXX, DV_SCLN, XXXXXXX, DV_TILD, KC_DEL +}; From 45c73b13e1c422c11cb4a97d8b81b42b84f2eb53 Mon Sep 17 00:00:00 2001 From: Xyverz Date: Wed, 24 Jun 2020 22:57:51 -0700 Subject: [PATCH 259/930] Minor keymap fix (#9534) Changed bottom-right keys in WOW and DESTINY layers from KC_ENT to KC_RCTL. --- keyboards/atreus62/keymaps/xyverz/keymap.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/keyboards/atreus62/keymaps/xyverz/keymap.c b/keyboards/atreus62/keymaps/xyverz/keymap.c index b852d5d7b965..109d61d8f206 100644 --- a/keyboards/atreus62/keymaps/xyverz/keymap.c +++ b/keyboards/atreus62/keymaps/xyverz/keymap.c @@ -86,7 +86,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_GRV, 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, KC_RSFT, - KC_LCTL, KC_LALT, KC_LEFT, KC_RGHT, LOWER, KC_BSPC, KC_LALT, CTL_ENT, KC_SPC, RAISE, KC_UP, KC_DOWN, KC_RGUI, KC_ENT + KC_LCTL, KC_LALT, KC_LEFT, KC_RGHT, LOWER, KC_BSPC, KC_LALT, CTL_ENT, KC_SPC, RAISE, KC_UP, KC_DOWN, KC_RGUI, KC_RCTL ), [_DESTINY] = LAYOUT ( /* Dvorak with minor modifications for playing Destiny 2 and other FPS Looters */ @@ -94,7 +94,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_GRV, 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, KC_RSFT, - KC_LCTL, KC_LALT, KC_LEFT, KC_RGHT, LOWER, KC_BSPC, KC_DEL, KC_ENT, KC_SPC, RAISE, KC_UP, KC_DOWN, KC_RGUI, KC_ENT + KC_LCTL, KC_LALT, KC_LEFT, KC_RGHT, LOWER, KC_BSPC, KC_DEL, KC_ENT, KC_SPC, RAISE, KC_UP, KC_DOWN, KC_RGUI, KC_RCTL ), [_LOWER] = LAYOUT ( From 995464cb9ca587de53537aee718ff300cf69fac8 Mon Sep 17 00:00:00 2001 From: shela Date: Thu, 25 Jun 2020 14:58:36 +0900 Subject: [PATCH 260/930] [Docs] fix file path (#9540) --- docs/documentation_best_practices.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/documentation_best_practices.md b/docs/documentation_best_practices.md index 77c226117c2d..c193fed6b86e 100644 --- a/docs/documentation_best_practices.md +++ b/docs/documentation_best_practices.md @@ -61,4 +61,4 @@ This page describes my cool feature. You can use my cool feature to make coffee |KC_SUGAR||Order Sugar| ``` -Place your documentation into `docs/feature_.md`, and add that file to the appropriate place in `docs/_sidebar.md`. If you have added any keycodes be sure to add them to `docs/keycodes.md` with a link back to your feature page. +Place your documentation into `docs/feature_.md`, and add that file to the appropriate place in `docs/_summary.md`. If you have added any keycodes be sure to add them to `docs/keycodes.md` with a link back to your feature page. From c8b35b62307072072ee0ad8cbf162a09b9c74a64 Mon Sep 17 00:00:00 2001 From: jotix <47826561+jotix@users.noreply.github.com> Date: Thu, 25 Jun 2020 03:08:24 -0300 Subject: [PATCH 261/930] Jotanck (#9531) * add_adjust_layer * add_adjust_layer --- .../jotanck/keymaps/default/keymap.c | 39 +++++-------------- keyboards/handwired/jotanck/readme.md | 2 +- 2 files changed, 11 insertions(+), 30 deletions(-) diff --git a/keyboards/handwired/jotanck/keymaps/default/keymap.c b/keyboards/handwired/jotanck/keymaps/default/keymap.c index 3de30d396b7a..1524c758abe4 100644 --- a/keyboards/handwired/jotanck/keymaps/default/keymap.c +++ b/keyboards/handwired/jotanck/keymaps/default/keymap.c @@ -1,9 +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. +// This is the default layout for the handwired/jotanck keyboard #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 @@ -12,14 +10,11 @@ #define _QWERTY 0 #define _LOWER 1 #define _RAISE 2 +#define _ADJUST 3 #define LOWER MO(_LOWER) #define RAISE MO(_RAISE) -static bool is_ctl_pressed; -static bool is_esc_pressed; -static bool is_bspc_pressed; - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Qwerty @@ -75,6 +70,13 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_PGUP, KC_END ), + +[_ADJUST] = LAYOUT_ortho_4x12 ( + _______, RESET, _______, _______, _______, _______, _______, _______, KC_PSCR, KC_SLCK, KC_PAUS, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ +), }; @@ -95,26 +97,5 @@ layer_state_t layer_state_set_user(layer_state_t state) { break; }; #endif - return state; -} - -bool process_record_user(uint16_t keycode, keyrecord_t *record) { - switch (keycode) { - case KC_LCTL: - is_ctl_pressed = record->event.pressed; - break; - case KC_ESC: - is_esc_pressed = record->event.pressed; - break; - case KC_BSPC: - is_bspc_pressed = record->event.pressed; - break; - }; - return true; -} - -void matrix_scan_user(void) { - if (is_ctl_pressed && is_esc_pressed && is_bspc_pressed) { - reset_keyboard(); - } + return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST); } diff --git a/keyboards/handwired/jotanck/readme.md b/keyboards/handwired/jotanck/readme.md index 3ceea1ef4c18..4e4b71d4e8b2 100644 --- a/keyboards/handwired/jotanck/readme.md +++ b/keyboards/handwired/jotanck/readme.md @@ -35,6 +35,6 @@ Make example for this keyboard (after setting up your build environment): ![Default Keymap](https://i.imgur.com/xh7Dmd7.png) -To reset the keyboard press Ctrl+Esc+BackSpace +To reset the keyboard press Lower+Raise+Q 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 7a710fb426024d2b4591de3c375da54bb78ae363 Mon Sep 17 00:00:00 2001 From: Rossman360 <53881724+Rossman360@users.noreply.github.com> Date: Thu, 25 Jun 2020 02:09:06 -0400 Subject: [PATCH 262/930] [Keyboard] adding Rewind keyboard (#9497) * adding rewind * keymap cleanup * keymap cleanup * improve keymap * improved keymap * reduntant * deletions * typos * readme img size and default bootloader --- keyboards/montsinger/rewind/config.h | 62 +++++++++++++++++ keyboards/montsinger/rewind/info.json | 68 +++++++++++++++++++ .../rewind/keymaps/default/keymap.c | 40 +++++++++++ .../rewind/keymaps/rossman360/keymap.c | 56 +++++++++++++++ keyboards/montsinger/rewind/readme.md | 15 ++++ keyboards/montsinger/rewind/rewind.c | 1 + keyboards/montsinger/rewind/rewind.h | 41 +++++++++++ keyboards/montsinger/rewind/rules.mk | 28 ++++++++ 8 files changed, 311 insertions(+) create mode 100644 keyboards/montsinger/rewind/config.h create mode 100644 keyboards/montsinger/rewind/info.json create mode 100644 keyboards/montsinger/rewind/keymaps/default/keymap.c create mode 100644 keyboards/montsinger/rewind/keymaps/rossman360/keymap.c create mode 100755 keyboards/montsinger/rewind/readme.md create mode 100644 keyboards/montsinger/rewind/rewind.c create mode 100644 keyboards/montsinger/rewind/rewind.h create mode 100644 keyboards/montsinger/rewind/rules.mk diff --git a/keyboards/montsinger/rewind/config.h b/keyboards/montsinger/rewind/config.h new file mode 100644 index 000000000000..f27622212527 --- /dev/null +++ b/keyboards/montsinger/rewind/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 Rewind +#define DESCRIPTION "5x10 ortho that fits inside a puffy VHS case" + +/* key matrix size */ + +#define MATRIX_ROWS 5 +#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 { B5, B4, D2, D3, B2 } +#define MATRIX_COL_PINS { F6, F7, B1, B3, E6, D7, C6, D4, D0, D1 } +#define UNUSED_PINS { F4, F5, B6 } + +/* 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 \ No newline at end of file diff --git a/keyboards/montsinger/rewind/info.json b/keyboards/montsinger/rewind/info.json new file mode 100644 index 000000000000..315670994a23 --- /dev/null +++ b/keyboards/montsinger/rewind/info.json @@ -0,0 +1,68 @@ + { + "keyboard":"montsinger/rewind", + "url": "https://montsinger.net", + "maintainer": "rossman360", + "width": 10, + "height": 5, + "layouts": { + "LAYOUT_ortho_5x10": { + "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":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":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":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":0, "y":4}, + {"x":1, "y":4}, + {"x":2, "y":4}, + {"x":3, "y":4}, + {"x":4, "y":4}, + {"x":5, "y":4}, + {"x":6, "y":4}, + {"x":7, "y":4}, + {"x":8, "y":4}, + {"x":9, "y":4} + ] + } + } +} + diff --git a/keyboards/montsinger/rewind/keymaps/default/keymap.c b/keyboards/montsinger/rewind/keymaps/default/keymap.c new file mode 100644 index 000000000000..861c04faf921 --- /dev/null +++ b/keyboards/montsinger/rewind/keymaps/default/keymap.c @@ -0,0 +1,40 @@ +#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, + _FN1, + _SYM +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +[_QWERTY] = LAYOUT_ortho_5x10( + KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, + 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_QUOT, + KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, + KC_LCTL, KC_LALT, KC_LGUI, KC_LSFT, MO(_SYM),KC_ENTER,KC_SPC, MO(_FN1),KC_BSPC, KC_DEL +), + +[_FN1] = LAYOUT_ortho_5x10( + KC_ESC, 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_HOME, KC_LEFT, KC_UP, KC_RIGHT,KC_END, + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_DOWN, XXXXXXX, XXXXXXX, + RESET, XXXXXXX, XXXXXXX, _______, KC_BSPC, KC_DEL, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX +), + +[_SYM] = LAYOUT_ortho_5x10( + KC_ESC, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_MINS, KC_PLUS, + KC_TAB, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + KC_CAPS, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_SCLN, + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_BSLS, + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX +), +}; diff --git a/keyboards/montsinger/rewind/keymaps/rossman360/keymap.c b/keyboards/montsinger/rewind/keymaps/rossman360/keymap.c new file mode 100644 index 000000000000..152a30523741 --- /dev/null +++ b/keyboards/montsinger/rewind/keymaps/rossman360/keymap.c @@ -0,0 +1,56 @@ +#include QMK_KEYBOARD_H +#include "rossman360.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, + _DEL, + _FN1, + _FN2, + _NUM, +}; + +#define PGMOD LT(_NUM, KC_PGDN) +#define SPCMOD LT(_FN1, KC_SPACE) +#define ZSHIFT MT(MOD_LSFT, KC_Z) +#define TABMOD LT(_FN1, KC_TAB) +#define ESCMOD LT(_FN1, KC_1) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +[_BASE] = LAYOUT_ortho_5x10( + ESCMOD, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, + 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_QUOT, + ZSHIFT, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, + KC_BSPC, ALTDEL, KC_LCTRL,TABMOD, PGMOD , KC_ENTER,SPCMOD, MO(_DEL), KC_BSPC, KC_DEL +), + +[_FN1] = LAYOUT_ortho_5x10( + XXXXXXX, KC_ESC, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RESET, + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + JUMPBACK,XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_HOME, KC_LEFT, KC_UP, KC_RIGHT,KC_END, + _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, PMERGE, KC_DOWN, XXXXXXX, XXXXXXX, + XXXXXXX, XXXXXXX, XXXXXXX, LWORD, RWORD, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX +), + +[_DEL] = LAYOUT_ortho_5x10( + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + REMCAPS, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + XXXXXXX, XXXXXXX, BLINE , KC_BSPC, BWORD , XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX +), + +[_NUM] = LAYOUT_ortho_5x10( + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, NTAB, + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_7, KC_8, KC_9, CTAB, + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_4, KC_5, KC_6, KC_SCLN, + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_1, KC_2, KC_3, KC_MINS, + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_0, XXXXXXX, XXXXXXX +), +}; diff --git a/keyboards/montsinger/rewind/readme.md b/keyboards/montsinger/rewind/readme.md new file mode 100755 index 000000000000..d0f4a6fe73d1 --- /dev/null +++ b/keyboards/montsinger/rewind/readme.md @@ -0,0 +1,15 @@ +# Rewind + +[Rewind](https://i.imgur.com/3QZbLr0l.jpg) + +A 5x10 ortholinear keyboard that fits inside puffy VHS cases, made and sold by Montsinger. [More info on Montsinger.net](https://montsinger.net). + +* Keyboard Maintainer: [Rossman360](https://github.com/rossman360) +* Hardware Supported: Rewind; Pro Micro or Elite-C +* Hardware Availability: [Montsinger.net](https://montsinger.net) + +Make example for this keyboard (after setting up your build environment): + + make montsinger/rewind: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/montsinger/rewind/rewind.c b/keyboards/montsinger/rewind/rewind.c new file mode 100644 index 000000000000..6796ef8d2eeb --- /dev/null +++ b/keyboards/montsinger/rewind/rewind.c @@ -0,0 +1 @@ +#include "rewind.h" diff --git a/keyboards/montsinger/rewind/rewind.h b/keyboards/montsinger/rewind/rewind.h new file mode 100644 index 000000000000..3019c7c03481 --- /dev/null +++ b/keyboards/montsinger/rewind/rewind.h @@ -0,0 +1,41 @@ +/* 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_5x10( \ + 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\ + ) { \ + { 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 } \ +} + diff --git a/keyboards/montsinger/rewind/rules.mk b/keyboards/montsinger/rewind/rules.mk new file mode 100644 index 000000000000..a59793d6b42a --- /dev/null +++ b/keyboards/montsinger/rewind/rules.mk @@ -0,0 +1,28 @@ +# 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 + +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 From 6d88794960df06059dfa5805b99e271e14270cf2 Mon Sep 17 00:00:00 2001 From: TerryMathews Date: Thu, 25 Jun 2020 17:02:27 -0400 Subject: [PATCH 263/930] M0lly: add support for VIA (#9535) Co-authored-by: Ryan --- keyboards/m0lly/config.h | 6 +- keyboards/m0lly/keymaps/default/keymap.c | 2 +- keyboards/m0lly/keymaps/via/config.h | 1 + keyboards/m0lly/keymaps/via/keymap.c | 94 ++++++++++++++++++++++++ keyboards/m0lly/keymaps/via/rules.mk | 1 + keyboards/m0lly/m0lly.c | 7 ++ 6 files changed, 107 insertions(+), 4 deletions(-) create mode 100644 keyboards/m0lly/keymaps/via/config.h create mode 100644 keyboards/m0lly/keymaps/via/keymap.c create mode 100644 keyboards/m0lly/keymaps/via/rules.mk diff --git a/keyboards/m0lly/config.h b/keyboards/m0lly/config.h index 327b0f08c156..29bd8411e371 100644 --- a/keyboards/m0lly/config.h +++ b/keyboards/m0lly/config.h @@ -20,9 +20,9 @@ along with this program. If not, see . #include "config_common.h" /* USB Device descriptor parameter */ -#define VENDOR_ID 0xFEED -#define PRODUCT_ID 0x6060 -#define DEVICE_VER 0x0003 +#define VENDOR_ID 0x544B // "TK" +#define PRODUCT_ID 0x0004 +#define DEVICE_VER 0x0001 #define MANUFACTURER The Key Company #define PRODUCT M0lly #define DESCRIPTION QMK keyboard firmware for M0lly diff --git a/keyboards/m0lly/keymaps/default/keymap.c b/keyboards/m0lly/keymaps/default/keymap.c index 5f6211f0f582..27e83cd21c68 100644 --- a/keyboards/m0lly/keymaps/default/keymap.c +++ b/keyboards/m0lly/keymaps/default/keymap.c @@ -70,7 +70,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { #ifdef OLED_DRIVER_ENABLE void oled_task_user(void) { - oled_write_P(PSTR("TKC1800\n"),false); + oled_write_P(PSTR("M0lly\n"),false); // Host Keyboard Layer Status oled_write_P(PSTR("Layer: "), false); diff --git a/keyboards/m0lly/keymaps/via/config.h b/keyboards/m0lly/keymaps/via/config.h new file mode 100644 index 000000000000..579212d4a3a0 --- /dev/null +++ b/keyboards/m0lly/keymaps/via/config.h @@ -0,0 +1 @@ +#define DYNAMIC_KEYMAP_LAYER_COUNT 2 diff --git a/keyboards/m0lly/keymaps/via/keymap.c b/keyboards/m0lly/keymaps/via/keymap.c new file mode 100644 index 000000000000..2e5900f16632 --- /dev/null +++ b/keyboards/m0lly/keymaps/via/keymap.c @@ -0,0 +1,94 @@ +/* Copyright 2017 Mathias Andersson + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public 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 + +//Layers + +enum { + BASE = 0, + FUNCTION, +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* Keymap BASE: (Base Layer) Default Layer + * + * ,-----------------------------------------------------------. .-------------------. + * | ~ | 1 | 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =|Backsp | |NumL| / | * | - | + * |-----------------------------------------------------------| |-------------------| + * |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| \ | | 7 | 8 | 9 | | + * |-----------------------------------------------------------| |--------------| + | + * |CAPS | A| S| D| F| G| H| J| K| L| ;| '|Return | | 4 | 5 | 6 | | + * |-----------------------------------------------------------| |-------------------| + * |Shift | Z| X| C| V| B| N| M| ,| .| /|Shift | | 1 | 2 | 3 | Ent| + * |-----------------------------------------------------------| |--------------| | + * |Ctrl|Gui |Alt | Space | Alt | Win |FN |Ctr | | 0 | . | | + * `-----------------------------------------------------------' '-------------------' + */ + [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, XXXXXXX, 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, XXXXXXX, + 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_P4, KC_P5, KC_P6, KC_PPLS, + 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_P1, KC_P2, KC_P3, XXXXXXX, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RWIN, MO(FUNCTION), KC_RCTL, KC_P0, XXXXXXX, KC_PDOT, KC_PENT + ), + /* Keymap FUNCTION: (Function Layer) + * + * ,-----------------------------------------------------------. .-------------------. + * | | | | | | | | | | | | | | RESET | | | | | | + * |-----------------------------------------------------------| |-------------------| + * | | | | | | | | | | | | | | | | | | | | + * |-----------------------------------------------------------| |-------------------| + * | | | | | | | | | | | | | | | | | | | + * |-----------------------------------------------------------| |-------------------| + * | |Tog|Mod|Hu+|Hu-|Sa+|Sa-|Va+|Va-|Stp| | | | | | | | + * |-----------------------------------------------------------| |--------------| | + * | | | | | | | | | | | | | + * `-----------------------------------------------------------' '-------------------' + */ + [FUNCTION] = LAYOUT_all( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET, XXXXXXX, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, XXXXXXX, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, XXXXXXX, _______, _______, _______, _______, _______, + _______, XXXXXXX, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, BL_STEP, _______, _______, XXXXXXX, _______, _______, _______, XXXXXXX, + _______, _______, _______, _______, _______, _______, MO(FUNCTION), _______, _______, XXXXXXX, _______, _______ + ), +}; + +#ifdef OLED_DRIVER_ENABLE +void oled_task_user(void) { + oled_write_P(PSTR("M0lly\n"),false); + // Host Keyboard Layer Status + oled_write_P(PSTR("Layer: "), false); + + switch (get_highest_layer(layer_state)) { + case BASE: + oled_write_P(PSTR("Base\n"), false); + break; + case FUNCTION: + oled_write_P(PSTR("Function\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 + led_t led_state = host_keyboard_led_state(); + oled_write_P(led_state.num_lock ? PSTR("NUM ") : PSTR(" "), false); + oled_write_P(led_state.caps_lock ? PSTR("CAP ") : PSTR(" "), false); + oled_write_P(led_state.scroll_lock ? PSTR("SCR ") : PSTR(" "), false); +} +#endif diff --git a/keyboards/m0lly/keymaps/via/rules.mk b/keyboards/m0lly/keymaps/via/rules.mk new file mode 100644 index 000000000000..1e5b99807cb7 --- /dev/null +++ b/keyboards/m0lly/keymaps/via/rules.mk @@ -0,0 +1 @@ +VIA_ENABLE = yes diff --git a/keyboards/m0lly/m0lly.c b/keyboards/m0lly/m0lly.c index 5e1b5371a126..e47f9531e190 100644 --- a/keyboards/m0lly/m0lly.c +++ b/keyboards/m0lly/m0lly.c @@ -16,6 +16,13 @@ #include "m0lly.h" #include "led.h" +void keyboard_pre_init_kb(void) { + setPinInputHigh(D0); + setPinInputHigh(D1); + + keyboard_pre_init_user(); +} + void matrix_init_kb(void) { // put your keyboard start-up code here // runs once when the firmware starts up From c2dd19de514eda3cf00cecdee76b21cfd0d6e2e6 Mon Sep 17 00:00:00 2001 From: Ryan Date: Fri, 26 Jun 2020 07:11:39 +1000 Subject: [PATCH 264/930] Fix error_log complaint about Helix boards (#9528) --- keyboards/helix/helix.h | 4 +- keyboards/helix/info.json | 13 -- keyboards/helix/pico/info.json | 77 +++++++-- keyboards/helix/pico/pico.h | 87 +++++----- keyboards/helix/rev1/info.json | 89 ++++++++-- keyboards/helix/rev1/rev1.h | 296 ++++++++++++++++----------------- keyboards/helix/rev2/info.json | 93 +++++++++-- keyboards/helix/rev2/rev2.h | 204 +++++++++++------------ 8 files changed, 512 insertions(+), 351 deletions(-) delete mode 100644 keyboards/helix/info.json diff --git a/keyboards/helix/helix.h b/keyboards/helix/helix.h index 7dac2455deba..d3d3b04169b1 100644 --- a/keyboards/helix/helix.h +++ b/keyboards/helix/helix.h @@ -1,5 +1,7 @@ #pragma once +#include "quantum.h" + #ifdef KEYBOARD_helix_rev1 #include "rev1.h" #endif @@ -9,5 +11,3 @@ #ifdef KEYBOARD_helix_pico #include "pico.h" #endif - -#include "quantum.h" diff --git a/keyboards/helix/info.json b/keyboards/helix/info.json deleted file mode 100644 index 6cd13d98e47f..000000000000 --- a/keyboards/helix/info.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "keyboard_name": "Helix", - "url": "https://github.com/MakotoKurauchi/helix", - "maintainer": "MakotoKurauchi", - "width": 15, - "height": 5, - "layouts": { - "LAYOUT": { - "key_count": 64, - "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":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}, {"x":1, "y":1}, {"x":2, "y":1}, {"x":3, "y":1}, {"x":4, "y":1}, {"x":5, "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":0, "y":2}, {"x":1, "y":2}, {"x":2, "y":2}, {"x":3, "y":2}, {"x":4, "y":2}, {"x":5, "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":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":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":0, "y":4}, {"x":1, "y":4}, {"x":2, "y":4}, {"x":3, "y":4}, {"x":4, "y":4}, {"x":5, "y":4}, {"x":6, "y":4}, {"x":8, "y":4}, {"x":9, "y":4}, {"x":10, "y":4}, {"x":11, "y":4}, {"x":12, "y":4}, {"x":13, "y":4}, {"x":14, "y":4}] - } - } -} diff --git a/keyboards/helix/pico/info.json b/keyboards/helix/pico/info.json index f4e50b95c046..a82a8f2ec779 100644 --- a/keyboards/helix/pico/info.json +++ b/keyboards/helix/pico/info.json @@ -1,13 +1,70 @@ { - "keyboard_name": "HelixPico", - "url": "https://github.com/MakotoKurauchi/helix", - "maintainer": "MakotoKurauchi", - "width": 15, - "height": 4, - "layouts": { - "LAYOUT": { - "key_count": 50, - "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":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}, {"x":1, "y":1}, {"x":2, "y":1}, {"x":3, "y":1}, {"x":4, "y":1}, {"x":5, "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":0, "y":2}, {"x":1, "y":2}, {"x":2, "y":2}, {"x":3, "y":2}, {"x":4, "y":2}, {"x":5, "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":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":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}] + "keyboard_name": "HelixPico", + "url": "https://github.com/MakotoKurauchi/helix", + "maintainer": "MakotoKurauchi", + "width": 15, + "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": 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}, + {"x": 1, "y": 1}, + {"x": 2, "y": 1}, + {"x": 3, "y": 1}, + {"x": 4, "y": 1}, + {"x": 5, "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": 0, "y": 2}, + {"x": 1, "y": 2}, + {"x": 2, "y": 2}, + {"x": 3, "y": 2}, + {"x": 4, "y": 2}, + {"x": 5, "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": 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": 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} + ] + } } - } } diff --git a/keyboards/helix/pico/pico.h b/keyboards/helix/pico/pico.h index 303fe315ea59..60a5078ed47d 100644 --- a/keyboards/helix/pico/pico.h +++ b/keyboards/helix/pico/pico.h @@ -1,8 +1,6 @@ #pragma once -#include "../helix.h" - -#include "quantum.h" +#include "helix.h" #ifndef SPLIT_KEYBOARD extern bool is_helix_master(void); @@ -16,54 +14,51 @@ extern uint8_t is_master; // 'is_master' will be obsolete, it is recommended to #define has_usb() is_keyboard_master() #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) + // Standard Keymap + // (TRRS jack on the left half is to the right, TRRS jack on the right half is to the left) #define LAYOUT( \ - 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, L36, R36, R30, R31, R32, R33, R34, R35 \ - ) \ - { \ - { L00, L01, L02, L03, L04, L05, KC_NO }, \ - { L10, L11, L12, L13, L14, L15, KC_NO }, \ - { L20, L21, L22, L23, L24, L25, KC_NO }, \ - { L30, L31, L32, L33, L34, L35, L36 }, \ - { R05, R04, R03, R02, R01, R00, KC_NO }, \ - { R15, R14, R13, R12, R11, R10, KC_NO }, \ - { R25, R24, R23, R22, R21, R20, KC_NO }, \ - { R35, R34, R33, R32, R31, R30, R36 }, \ - } + 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, L36, R36, R30, R31, R32, R33, R34, R35 \ +) { \ + { L00, L01, L02, L03, L04, L05, KC_NO }, \ + { L10, L11, L12, L13, L14, L15, KC_NO }, \ + { L20, L21, L22, L23, L24, L25, KC_NO }, \ + { L30, L31, L32, L33, L34, L35, L36 }, \ + { R05, R04, R03, R02, R01, R00, KC_NO }, \ + { R15, R14, R13, R12, R11, R10, KC_NO }, \ + { R25, R24, R23, R22, R21, R20, KC_NO }, \ + { R35, R34, R33, R32, R31, R30, R36 }, \ +} #else -// Keymap with right side flipped -// (TRRS jack on both halves are to the right) -#define LAYOUT( \ - 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, L36, R36, R30, R31, R32, R33, R34, R35 \ - ) \ - { \ - { L00, L01, L02, L03, L04, L05, KC_NO }, \ - { L10, L11, L12, L13, L14, L15, KC_NO }, \ - { L20, L21, L22, L23, L24, L25, KC_NO }, \ - { L30, L31, L32, L33, L34, L35, L36 }, \ - { KC_NO, R00, R01, R02, R03, R04, R05 }, \ - { KC_NO, R10, R11, R12, R13, R14, R15 }, \ - { KC_NO, R20, R21, R22, R23, R24, R25 }, \ - { R36, R30, R31, R32, R33, R34, R35 }, \ - } + // Keymap with right side flipped + // (TRRS jack on both halves are to the right) + #define LAYOUT( \ + 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, L36, R36, R30, R31, R32, R33, R34, R35 \ + ) { \ + { L00, L01, L02, L03, L04, L05, KC_NO }, \ + { L10, L11, L12, L13, L14, L15, KC_NO }, \ + { L20, L21, L22, L23, L24, L25, KC_NO }, \ + { L30, L31, L32, L33, L34, L35, L36 }, \ + { KC_NO, R00, R01, R02, R03, R04, R05 }, \ + { KC_NO, R10, R11, R12, R13, R14, R15 }, \ + { KC_NO, R20, R21, R22, R23, R24, R25 }, \ + { R36, R30, R31, R32, R33, R34, R35 }, \ + } #endif -#define LAYOUT_kc( \ +#define LAYOUT_kc( \ 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, L36, R36, R30, R31, R32, R33, R34, R35 \ - ) \ - LAYOUT( \ - KC_##L00, KC_##L01, KC_##L02, KC_##L03, KC_##L04, KC_##L05, KC_##R00, KC_##R01, KC_##R02, KC_##R03, KC_##R04, KC_##R05, \ - KC_##L10, KC_##L11, KC_##L12, KC_##L13, KC_##L14, KC_##L15, KC_##R10, KC_##R11, KC_##R12, KC_##R13, KC_##R14, KC_##R15, \ - KC_##L20, KC_##L21, KC_##L22, KC_##L23, KC_##L24, KC_##L25, KC_##R20, KC_##R21, KC_##R22, KC_##R23, KC_##R24, KC_##R25, \ - KC_##L30, KC_##L31, KC_##L32, KC_##L33, KC_##L34, KC_##L35, KC_##L36, KC_##R36, KC_##R30, KC_##R31, KC_##R32, KC_##R33, KC_##R34, KC_##R35 \ - ) +) LAYOUT( \ + KC_##L00, KC_##L01, KC_##L02, KC_##L03, KC_##L04, KC_##L05, KC_##R00, KC_##R01, KC_##R02, KC_##R03, KC_##R04, KC_##R05, \ + KC_##L10, KC_##L11, KC_##L12, KC_##L13, KC_##L14, KC_##L15, KC_##R10, KC_##R11, KC_##R12, KC_##R13, KC_##R14, KC_##R15, \ + KC_##L20, KC_##L21, KC_##L22, KC_##L23, KC_##L24, KC_##L25, KC_##R20, KC_##R21, KC_##R22, KC_##R23, KC_##R24, KC_##R25, \ + KC_##L30, KC_##L31, KC_##L32, KC_##L33, KC_##L34, KC_##L35, KC_##L36, KC_##R36, KC_##R30, KC_##R31, KC_##R32, KC_##R33, KC_##R34, KC_##R35 \ +) diff --git a/keyboards/helix/rev1/info.json b/keyboards/helix/rev1/info.json index 505401cee8e5..6811e764d139 100644 --- a/keyboards/helix/rev1/info.json +++ b/keyboards/helix/rev1/info.json @@ -1,13 +1,82 @@ { - "keyboard_name": "Helix rev. 1", - "url": "https://github.com/MakotoKurauchi/helix", - "maintainer": "MakotoKurauchi", - "width": 13, - "height": 5, - "layouts": { - "LAYOUT": { - "key_count": 60, - "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":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}, {"x":0, "y":4}, {"x":1, "y":4}, {"x":2, "y":4}, {"x":3, "y":4}, {"x":4, "y":4}, {"x":5, "y":4}, {"x":7, "y":4}, {"x":8, "y":4}, {"x":9, "y":4}, {"x":10, "y":4}, {"x":11, "y":4}, {"x":12, "y":4}] + "keyboard_name": "Helix rev. 1", + "url": "https://github.com/MakotoKurauchi/helix", + "maintainer": "MakotoKurauchi", + "width": 13, + "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": 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}, + + {"x": 0, "y": 4}, + {"x": 1, "y": 4}, + {"x": 2, "y": 4}, + {"x": 3, "y": 4}, + {"x": 4, "y": 4}, + {"x": 5, "y": 4}, + + {"x": 7, "y": 4}, + {"x": 8, "y": 4}, + {"x": 9, "y": 4}, + {"x": 10, "y": 4}, + {"x": 11, "y": 4}, + {"x": 12, "y": 4} + ] + } } - } } diff --git a/keyboards/helix/rev1/rev1.h b/keyboards/helix/rev1/rev1.h index b505845ada9e..b3a525554e5e 100644 --- a/keyboards/helix/rev1/rev1.h +++ b/keyboards/helix/rev1/rev1.h @@ -1,180 +1,168 @@ #pragma once -#include "../helix.h" - -#include "quantum.h" +#include "helix.h" #ifdef USE_I2C #include #ifdef __AVR__ - #include - #include + #include + #include #endif #endif #if MATRIX_ROWS == 6 // HELIX_ROWS == 3 - #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) - #define LAYOUT( \ - 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 \ - ) \ - { \ - { L00, L01, L02, L03, L04, L05 }, \ - { L10, L11, L12, L13, L14, L15 }, \ - { L20, L21, L22, L23, L24, L25 }, \ - { R05, R04, R03, R02, R01, R00 }, \ - { R15, R14, R13, R12, R11, R10 }, \ - { R25, R24, R23, R22, R21, R20 }, \ - } - #else - // Keymap with right side flipped - // (TRRS jack on both halves are to the right) - #define LAYOUT( \ - 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 \ - ) \ - { \ - { L00, L01, L02, L03, L04, L05 }, \ - { L10, L11, L12, L13, L14, L15 }, \ - { L20, L21, L22, L23, L24, L25 }, \ - { R00, R01, R02, R03, R04, R05 }, \ - { R10, R11, R12, R13, R14, R15 }, \ - { R20, R21, R22, R23, R24, R25 }, \ - } - #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) + #define LAYOUT( \ + 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 \ + ) { \ + { L00, L01, L02, L03, L04, L05 }, \ + { L10, L11, L12, L13, L14, L15 }, \ + { L20, L21, L22, L23, L24, L25 }, \ + { R05, R04, R03, R02, R01, R00 }, \ + { R15, R14, R13, R12, R11, R10 }, \ + { R25, R24, R23, R22, R21, R20 } \ + } + #else + // Keymap with right side flipped + // (TRRS jack on both halves are to the right) + #define LAYOUT( \ + 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 \ + ) { \ + { L00, L01, L02, L03, L04, L05 }, \ + { L10, L11, L12, L13, L14, L15 }, \ + { L20, L21, L22, L23, L24, L25 }, \ + { R00, R01, R02, R03, R04, R05 }, \ + { R10, R11, R12, R13, R14, R15 }, \ + { R20, R21, R22, R23, R24, R25 } \ + } + #endif #elif MATRIX_ROWS == 8 // HELIX_ROWS == 4 - #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) - #define LAYOUT( \ - 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 \ - ) \ - { \ - { L00, L01, L02, L03, L04, L05 }, \ - { L10, L11, L12, L13, L14, L15 }, \ - { L20, L21, L22, L23, L24, L25 }, \ - { L30, L31, L32, L33, L34, L35 }, \ - { R05, R04, R03, R02, R01, R00 }, \ - { R15, R14, R13, R12, R11, R10 }, \ - { R25, R24, R23, R22, R21, R20 }, \ - { R35, R34, R33, R32, R31, R30 } \ - } - #else - // Keymap with right side flipped - // (TRRS jack on both halves are to the right) - #define LAYOUT( \ - 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 \ - ) \ - { \ - { L00, L01, L02, L03, L04, L05 }, \ - { L10, L11, L12, L13, L14, L15 }, \ - { L20, L21, L22, L23, L24, L25 }, \ - { L30, L31, L32, L33, L34, L35 }, \ - { R00, R01, R02, R03, R04, R05 }, \ - { R10, R11, R12, R13, R14, R15 }, \ - { R20, R21, R22, R23, R24, R25 }, \ - { R30, R31, R32, R33, R34, R35 } \ - } - #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) + #define LAYOUT( \ + 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 \ + ) { \ + { L00, L01, L02, L03, L04, L05 }, \ + { L10, L11, L12, L13, L14, L15 }, \ + { L20, L21, L22, L23, L24, L25 }, \ + { L30, L31, L32, L33, L34, L35 }, \ + { R05, R04, R03, R02, R01, R00 }, \ + { R15, R14, R13, R12, R11, R10 }, \ + { R25, R24, R23, R22, R21, R20 }, \ + { R35, R34, R33, R32, R31, R30 } \ + } + #else + // Keymap with right side flipped + // (TRRS jack on both halves are to the right) + #define LAYOUT( \ + 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 \ + ) { \ + { L00, L01, L02, L03, L04, L05 }, \ + { L10, L11, L12, L13, L14, L15 }, \ + { L20, L21, L22, L23, L24, L25 }, \ + { L30, L31, L32, L33, L34, L35 }, \ + { R00, R01, R02, R03, R04, R05 }, \ + { R10, R11, R12, R13, R14, R15 }, \ + { R20, R21, R22, R23, R24, R25 }, \ + { R30, R31, R32, R33, R34, R35 } \ + } + #endif #elif MATRIX_ROWS == 10 // HELIX_ROWS == 5 - #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) - #define LAYOUT( \ - 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 \ - ) \ - { \ - { 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 }, \ - { R05, R04, R03, R02, R01, R00 }, \ - { R15, R14, R13, R12, R11, R10 }, \ - { R25, R24, R23, R22, R21, R20 }, \ - { R35, R34, R33, R32, R31, R30 }, \ - { R45, R44, R43, R42, R41, R40 } \ - } - #else - // Keymap with right side flipped - // (TRRS jack on both halves are to the right) - #define LAYOUT( \ + #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) +#define LAYOUT( \ 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 \ - ) \ - { \ - { 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 }, \ - { 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 } \ - } - #endif + L40, L41, L42, L43, L44, L45, R40, R41, R42, R43, R44, R45 \ +) { \ + { 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 }, \ + { R05, R04, R03, R02, R01, R00 }, \ + { R15, R14, R13, R12, R11, R10 }, \ + { R25, R24, R23, R22, R21, R20 }, \ + { R35, R34, R33, R32, R31, R30 }, \ + { R45, R44, R43, R42, R41, R40 } \ +} + #else + // Keymap with right side flipped + // (TRRS jack on both halves are to the right) + #define LAYOUT( \ + 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 \ + ) { \ + { 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 }, \ + { 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 } \ + } + #endif #else - #error "expected HELIX_ROWS 3 or 4 or 5" + #error "expected HELIX_ROWS 3 or 4 or 5" #endif // Used to create a keymap using only KC_ prefixed keys #if MATRIX_ROWS == 6 // HELIX_ROWS == 3 - #define LAYOUT_kc( \ - 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 \ - ) \ - LAYOUT( \ - KC_##L00, KC_##L01, KC_##L02, KC_##L03, KC_##L04, KC_##L05, KC_##R00, KC_##R01, KC_##R02, KC_##R03, KC_##R04, KC_##R05, \ - KC_##L10, KC_##L11, KC_##L12, KC_##L13, KC_##L14, KC_##L15, KC_##R10, KC_##R11, KC_##R12, KC_##R13, KC_##R14, KC_##R15, \ - KC_##L20, KC_##L21, KC_##L22, KC_##L23, KC_##L24, KC_##L25, KC_##R20, KC_##R21, KC_##R22, KC_##R23, KC_##R24, KC_##R25 \ + #define LAYOUT_kc( \ + 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 \ + ) LAYOUT( \ + KC_##L00, KC_##L01, KC_##L02, KC_##L03, KC_##L04, KC_##L05, KC_##R00, KC_##R01, KC_##R02, KC_##R03, KC_##R04, KC_##R05, \ + KC_##L10, KC_##L11, KC_##L12, KC_##L13, KC_##L14, KC_##L15, KC_##R10, KC_##R11, KC_##R12, KC_##R13, KC_##R14, KC_##R15, \ + KC_##L20, KC_##L21, KC_##L22, KC_##L23, KC_##L24, KC_##L25, KC_##R20, KC_##R21, KC_##R22, KC_##R23, KC_##R24, KC_##R25 \ ) #elif MATRIX_ROWS == 8 // HELIX_ROWS == 4 - #define LAYOUT_kc( \ - 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 \ - ) \ - LAYOUT( \ - KC_##L00, KC_##L01, KC_##L02, KC_##L03, KC_##L04, KC_##L05, KC_##R00, KC_##R01, KC_##R02, KC_##R03, KC_##R04, KC_##R05, \ - KC_##L10, KC_##L11, KC_##L12, KC_##L13, KC_##L14, KC_##L15, KC_##R10, KC_##R11, KC_##R12, KC_##R13, KC_##R14, KC_##R15, \ - KC_##L20, KC_##L21, KC_##L22, KC_##L23, KC_##L24, KC_##L25, KC_##R20, KC_##R21, KC_##R22, KC_##R23, KC_##R24, KC_##R25, \ - KC_##L30, KC_##L31, KC_##L32, KC_##L33, KC_##L34, KC_##L35, KC_##R30, KC_##R31, KC_##R32, KC_##R33, KC_##R34, KC_##R35 \ + #define LAYOUT_kc( \ + 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 \ + ) LAYOUT( \ + KC_##L00, KC_##L01, KC_##L02, KC_##L03, KC_##L04, KC_##L05, KC_##R00, KC_##R01, KC_##R02, KC_##R03, KC_##R04, KC_##R05, \ + KC_##L10, KC_##L11, KC_##L12, KC_##L13, KC_##L14, KC_##L15, KC_##R10, KC_##R11, KC_##R12, KC_##R13, KC_##R14, KC_##R15, \ + KC_##L20, KC_##L21, KC_##L22, KC_##L23, KC_##L24, KC_##L25, KC_##R20, KC_##R21, KC_##R22, KC_##R23, KC_##R24, KC_##R25, \ + KC_##L30, KC_##L31, KC_##L32, KC_##L33, KC_##L34, KC_##L35, KC_##R30, KC_##R31, KC_##R32, KC_##R33, KC_##R34, KC_##R35 \ ) -#else - #define LAYOUT_kc( \ - 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 \ - ) \ - LAYOUT( \ - KC_##L00, KC_##L01, KC_##L02, KC_##L03, KC_##L04, KC_##L05, KC_##R00, KC_##R01, KC_##R02, KC_##R03, KC_##R04, KC_##R05, \ - KC_##L10, KC_##L11, KC_##L12, KC_##L13, KC_##L14, KC_##L15, KC_##R10, KC_##R11, KC_##R12, KC_##R13, KC_##R14, KC_##R15, \ - KC_##L20, KC_##L21, KC_##L22, KC_##L23, KC_##L24, KC_##L25, KC_##R20, KC_##R21, KC_##R22, KC_##R23, KC_##R24, KC_##R25, \ - KC_##L30, KC_##L31, KC_##L32, KC_##L33, KC_##L34, KC_##L35, KC_##R30, KC_##R31, KC_##R32, KC_##R33, KC_##R34, KC_##R35, \ - KC_##L40, KC_##L41, KC_##L42, KC_##L43, KC_##L44, KC_##L45, KC_##R40, KC_##R41, KC_##R42, KC_##R43, KC_##R44, KC_##R45 \ +#else // HELIX_ROWS == 5 + #define LAYOUT_kc( \ + 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 \ + ) LAYOUT( \ + KC_##L00, KC_##L01, KC_##L02, KC_##L03, KC_##L04, KC_##L05, KC_##R00, KC_##R01, KC_##R02, KC_##R03, KC_##R04, KC_##R05, \ + KC_##L10, KC_##L11, KC_##L12, KC_##L13, KC_##L14, KC_##L15, KC_##R10, KC_##R11, KC_##R12, KC_##R13, KC_##R14, KC_##R15, \ + KC_##L20, KC_##L21, KC_##L22, KC_##L23, KC_##L24, KC_##L25, KC_##R20, KC_##R21, KC_##R22, KC_##R23, KC_##R24, KC_##R25, \ + KC_##L30, KC_##L31, KC_##L32, KC_##L33, KC_##L34, KC_##L35, KC_##R30, KC_##R31, KC_##R32, KC_##R33, KC_##R34, KC_##R35, \ + KC_##L40, KC_##L41, KC_##L42, KC_##L43, KC_##L44, KC_##L45, KC_##R40, KC_##R41, KC_##R42, KC_##R43, KC_##R44, KC_##R45 \ ) #endif - diff --git a/keyboards/helix/rev2/info.json b/keyboards/helix/rev2/info.json index 236aa3688d70..7d9341c58b50 100644 --- a/keyboards/helix/rev2/info.json +++ b/keyboards/helix/rev2/info.json @@ -1,13 +1,86 @@ { - "keyboard_name": "Helix rev. 2", - "url": "https://github.com/MakotoKurauchi/helix", - "maintainer": "MakotoKurauchi", - "width": 15, - "height": 5, - "layouts": { - "LAYOUT": { - "key_count": 64, - "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":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}, {"x":1, "y":1}, {"x":2, "y":1}, {"x":3, "y":1}, {"x":4, "y":1}, {"x":5, "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":0, "y":2}, {"x":1, "y":2}, {"x":2, "y":2}, {"x":3, "y":2}, {"x":4, "y":2}, {"x":5, "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":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":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":0, "y":4}, {"x":1, "y":4}, {"x":2, "y":4}, {"x":3, "y":4}, {"x":4, "y":4}, {"x":5, "y":4}, {"x":6, "y":4}, {"x":8, "y":4}, {"x":9, "y":4}, {"x":10, "y":4}, {"x":11, "y":4}, {"x":12, "y":4}, {"x":13, "y":4}, {"x":14, "y":4}] + "keyboard_name": "Helix rev. 2", + "url": "https://github.com/MakotoKurauchi/helix", + "maintainer": "MakotoKurauchi", + "width": 15, + "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": 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}, + {"x": 1, "y": 1}, + {"x": 2, "y": 1}, + {"x": 3, "y": 1}, + {"x": 4, "y": 1}, + {"x": 5, "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": 0, "y": 2}, + {"x": 1, "y": 2}, + {"x": 2, "y": 2}, + {"x": 3, "y": 2}, + {"x": 4, "y": 2}, + {"x": 5, "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": 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": 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": 0, "y": 4}, + {"x": 1, "y": 4}, + {"x": 2, "y": 4}, + {"x": 3, "y": 4}, + {"x": 4, "y": 4}, + {"x": 5, "y": 4}, + {"x": 6, "y": 4}, + + {"x": 8, "y": 4}, + {"x": 9, "y": 4}, + {"x": 10, "y": 4}, + {"x": 11, "y": 4}, + {"x": 12, "y": 4}, + {"x": 13, "y": 4}, + {"x": 14, "y": 4} + ] + } } - } } diff --git a/keyboards/helix/rev2/rev2.h b/keyboards/helix/rev2/rev2.h index 8b82a4a6eea0..42f215fdf4ce 100644 --- a/keyboards/helix/rev2/rev2.h +++ b/keyboards/helix/rev2/rev2.h @@ -1,12 +1,10 @@ #pragma once -#include "../helix.h" - -#include "quantum.h" +#include "helix.h" #ifndef SPLIT_KEYBOARD - extern bool is_helix_master(void); - #define is_keyboard_master() is_helix_master() + extern bool is_helix_master(void); + #define is_keyboard_master() is_helix_master() #endif // Each keymap.c should use is_keyboard_master() instead of 'is_master', 'has_usb()'. @@ -16,120 +14,114 @@ extern uint8_t is_master; // 'is_master' will be obsolete, it is recommended to #define has_usb() is_keyboard_master() #if MATRIX_ROWS == 8 // HELIX_ROWS == 4 -#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) + #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) + #define LAYOUT( \ + 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, L36, R36, R30, R31, R32, R33, R34, R35 \ + ) { \ + { L00, L01, L02, L03, L04, L05, KC_NO }, \ + { L10, L11, L12, L13, L14, L15, KC_NO }, \ + { L20, L21, L22, L23, L24, L25, KC_NO }, \ + { L30, L31, L32, L33, L34, L35, L36 }, \ + { R05, R04, R03, R02, R01, R00, KC_NO }, \ + { R15, R14, R13, R12, R11, R10, KC_NO }, \ + { R25, R24, R23, R22, R21, R20, KC_NO }, \ + { R35, R34, R33, R32, R31, R30, R36 } \ + } + #else + // Keymap with right side flipped + // (TRRS jack on both halves are to the right) + #define LAYOUT( \ + 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, L36, R36, R30, R31, R32, R33, R34, R35 \ + ) { \ + { L00, L01, L02, L03, L04, L05, KC_NO }, \ + { L10, L11, L12, L13, L14, L15, KC_NO }, \ + { L20, L21, L22, L23, L24, L25, KC_NO }, \ + { L30, L31, L32, L33, L34, L35, L36 }, \ + { KC_NO, R00, R01, R02, R03, R04, R05 }, \ + { KC_NO, R10, R11, R12, R13, R14, R15 }, \ + { KC_NO, R20, R21, R22, R23, R24, R25 }, \ + { R36, R30, R31, R32, R33, R34, R35 } \ + } + #endif +#else // HELIX_ROWS == 5 + #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) #define LAYOUT( \ - 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, L36, R36, R30, R31, R32, R33, R34, R35 \ - ) \ - { \ + 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, L36, R36, R30, R31, R32, R33, R34, R35, \ + L40, L41, L42, L43, L44, L45, L46, R46, R40, R41, R42, R43, R44, R45 \ +) { \ { L00, L01, L02, L03, L04, L05, KC_NO }, \ { L10, L11, L12, L13, L14, L15, KC_NO }, \ { L20, L21, L22, L23, L24, L25, KC_NO }, \ { L30, L31, L32, L33, L34, L35, L36 }, \ + { L40, L41, L42, L43, L44, L45, L46 }, \ { R05, R04, R03, R02, R01, R00, KC_NO }, \ { R15, R14, R13, R12, R11, R10, KC_NO }, \ { R25, R24, R23, R22, R21, R20, KC_NO }, \ { R35, R34, R33, R32, R31, R30, R36 }, \ - } -#else -// Keymap with right side flipped -// (TRRS jack on both halves are to the right) -#define LAYOUT( \ - 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, L36, R36, R30, R31, R32, R33, R34, R35 \ - ) \ - { \ - { L00, L01, L02, L03, L04, L05, KC_NO }, \ - { L10, L11, L12, L13, L14, L15, KC_NO }, \ - { L20, L21, L22, L23, L24, L25, KC_NO }, \ - { L30, L31, L32, L33, L34, L35, L36 }, \ - { KC_NO, R00, R01, R02, R03, R04, R05 }, \ - { KC_NO, R10, R11, R12, R13, R14, R15 }, \ - { KC_NO, R20, R21, R22, R23, R24, R25 }, \ - { R36, R30, R31, R32, R33, R34, R35 }, \ - } -#endif -#else - #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) - #define LAYOUT( \ - 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, L36, R36, R30, R31, R32, R33, R34, R35, \ - L40, L41, L42, L43, L44, L45, L46, R46, R40, R41, R42, R43, R44, R45 \ - ) \ - { \ - { L00, L01, L02, L03, L04, L05, KC_NO }, \ - { L10, L11, L12, L13, L14, L15, KC_NO }, \ - { L20, L21, L22, L23, L24, L25, KC_NO }, \ - { L30, L31, L32, L33, L34, L35, L36 }, \ - { L40, L41, L42, L43, L44, L45, L46 }, \ - { R05, R04, R03, R02, R01, R00, KC_NO }, \ - { R15, R14, R13, R12, R11, R10, KC_NO }, \ - { R25, R24, R23, R22, R21, R20, KC_NO }, \ - { R35, R34, R33, R32, R31, R30, R36 }, \ - { R45, R44, R43, R42, R41, R40, R46 } \ - } - #else - // Keymap with right side flipped - // (TRRS jack on both halves are to the right) - #define LAYOUT( \ - 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, L36, R36, R30, R31, R32, R33, R34, R35, \ - L40, L41, L42, L43, L44, L45, L46, R46, R40, R41, R42, R43, R44, R45 \ - ) \ - { \ - { L00, L01, L02, L03, L04, L05, KC_NO }, \ - { L10, L11, L12, L13, L14, L15, KC_NO }, \ - { L20, L21, L22, L23, L24, L25, KC_NO }, \ - { L30, L31, L32, L33, L34, L35, L36 }, \ - { L40, L41, L42, L43, L44, L45, L46 }, \ - { KC_NO, R00, R01, R02, R03, R04, R05 }, \ - { KC_NO, R10, R11, R12, R13, R14, R15 }, \ - { KC_NO, R20, R21, R22, R23, R24, R25 }, \ - { R36, R30, R31, R32, R33, R34, R35 }, \ - { R46, R40, R41, R42, R43, R44, R45 } \ - } - #endif + { R45, R44, R43, R42, R41, R40, R46 } \ +} + #else + // Keymap with right side flipped + // (TRRS jack on both halves are to the right) + #define LAYOUT( \ + 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, L36, R36, R30, R31, R32, R33, R34, R35, \ + L40, L41, L42, L43, L44, L45, L46, R46, R40, R41, R42, R43, R44, R45 \ + ) { \ + { L00, L01, L02, L03, L04, L05, KC_NO }, \ + { L10, L11, L12, L13, L14, L15, KC_NO }, \ + { L20, L21, L22, L23, L24, L25, KC_NO }, \ + { L30, L31, L32, L33, L34, L35, L36 }, \ + { L40, L41, L42, L43, L44, L45, L46 }, \ + { KC_NO, R00, R01, R02, R03, R04, R05 }, \ + { KC_NO, R10, R11, R12, R13, R14, R15 }, \ + { KC_NO, R20, R21, R22, R23, R24, R25 }, \ + { R36, R30, R31, R32, R33, R34, R35 }, \ + { R46, R40, R41, R42, R43, R44, R45 } \ + } + #endif #endif // Used to create a keymap using only KC_ prefixed keys #if MATRIX_ROWS == 8 // HELIX_ROWS == 4 - #define LAYOUT_kc( \ - 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, L36, R36, R30, R31, R32, R33, R34, R35 \ - ) \ - LAYOUT( \ - KC_##L00, KC_##L01, KC_##L02, KC_##L03, KC_##L04, KC_##L05, KC_##R00, KC_##R01, KC_##R02, KC_##R03, KC_##R04, KC_##R05, \ - KC_##L10, KC_##L11, KC_##L12, KC_##L13, KC_##L14, KC_##L15, KC_##R10, KC_##R11, KC_##R12, KC_##R13, KC_##R14, KC_##R15, \ - KC_##L20, KC_##L21, KC_##L22, KC_##L23, KC_##L24, KC_##L25, KC_##R20, KC_##R21, KC_##R22, KC_##R23, KC_##R24, KC_##R25, \ - KC_##L30, KC_##L31, KC_##L32, KC_##L33, KC_##L34, KC_##L35, KC_##L36, KC_##R36, KC_##R30, KC_##R31, KC_##R32, KC_##R33, KC_##R34, KC_##R35 \ + #define LAYOUT_kc( \ + 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, L36, R36, R30, R31, R32, R33, R34, R35 \ + ) LAYOUT( \ + KC_##L00, KC_##L01, KC_##L02, KC_##L03, KC_##L04, KC_##L05, KC_##R00, KC_##R01, KC_##R02, KC_##R03, KC_##R04, KC_##R05, \ + KC_##L10, KC_##L11, KC_##L12, KC_##L13, KC_##L14, KC_##L15, KC_##R10, KC_##R11, KC_##R12, KC_##R13, KC_##R14, KC_##R15, \ + KC_##L20, KC_##L21, KC_##L22, KC_##L23, KC_##L24, KC_##L25, KC_##R20, KC_##R21, KC_##R22, KC_##R23, KC_##R24, KC_##R25, \ + KC_##L30, KC_##L31, KC_##L32, KC_##L33, KC_##L34, KC_##L35, KC_##L36, KC_##R36, KC_##R30, KC_##R31, KC_##R32, KC_##R33, KC_##R34, KC_##R35 \ ) -#else - #define LAYOUT_kc( \ - 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, L36, R36, R30, R31, R32, R33, R34, R35, \ - L40, L41, L42, L43, L44, L45, L46, R46, R40, R41, R42, R43, R44, R45 \ - ) \ - LAYOUT( \ - KC_##L00, KC_##L01, KC_##L02, KC_##L03, KC_##L04, KC_##L05, KC_##R00, KC_##R01, KC_##R02, KC_##R03, KC_##R04, KC_##R05, \ - KC_##L10, KC_##L11, KC_##L12, KC_##L13, KC_##L14, KC_##L15, KC_##R10, KC_##R11, KC_##R12, KC_##R13, KC_##R14, KC_##R15, \ - KC_##L20, KC_##L21, KC_##L22, KC_##L23, KC_##L24, KC_##L25, KC_##R20, KC_##R21, KC_##R22, KC_##R23, KC_##R24, KC_##R25, \ - KC_##L30, KC_##L31, KC_##L32, KC_##L33, KC_##L34, KC_##L35, KC_##L36, KC_##R36, KC_##R30, KC_##R31, KC_##R32, KC_##R33, KC_##R34, KC_##R35, \ - KC_##L40, KC_##L41, KC_##L42, KC_##L43, KC_##L44, KC_##L45, KC_##L46, KC_##R46, KC_##R40, KC_##R41, KC_##R42, KC_##R43, KC_##R44, KC_##R45 \ +#else // HELIX_ROWS == 5 + #define LAYOUT_kc( \ + 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, L36, R36, R30, R31, R32, R33, R34, R35, \ + L40, L41, L42, L43, L44, L45, L46, R46, R40, R41, R42, R43, R44, R45 \ + ) LAYOUT( \ + KC_##L00, KC_##L01, KC_##L02, KC_##L03, KC_##L04, KC_##L05, KC_##R00, KC_##R01, KC_##R02, KC_##R03, KC_##R04, KC_##R05, \ + KC_##L10, KC_##L11, KC_##L12, KC_##L13, KC_##L14, KC_##L15, KC_##R10, KC_##R11, KC_##R12, KC_##R13, KC_##R14, KC_##R15, \ + KC_##L20, KC_##L21, KC_##L22, KC_##L23, KC_##L24, KC_##L25, KC_##R20, KC_##R21, KC_##R22, KC_##R23, KC_##R24, KC_##R25, \ + KC_##L30, KC_##L31, KC_##L32, KC_##L33, KC_##L34, KC_##L35, KC_##L36, KC_##R36, KC_##R30, KC_##R31, KC_##R32, KC_##R33, KC_##R34, KC_##R35, \ + KC_##L40, KC_##L41, KC_##L42, KC_##L43, KC_##L44, KC_##L45, KC_##L46, KC_##R46, KC_##R40, KC_##R41, KC_##R42, KC_##R43, KC_##R44, KC_##R45 \ ) #endif From 9236c3a9d026d556ba762c5a631d1f15bc1c20a0 Mon Sep 17 00:00:00 2001 From: Adam DeHaven Date: Fri, 26 Jun 2020 06:17:31 -0400 Subject: [PATCH 265/930] [Keymap] Adding custom keymaps (#9426) * Adding custom keymaps * Update keyboards/kbdfans/kbd75/keymaps/adamdehaven/keymap.c --- .../keymaps/adamdehaven/config.h | 3 + .../keymaps/adamdehaven/keymap.c | 71 ++++++++ .../keymaps/adamdehaven/rules.mk | 1 + .../kbd75/keymaps/adamdehaven/config.h | 3 + .../kbd75/keymaps/adamdehaven/keymap.c | 168 ++++++++++++++++++ .../kbd75/keymaps/adamdehaven/rules.mk | 1 + 6 files changed, 247 insertions(+) create mode 100644 keyboards/kbdfans/kbd67/mkii_soldered/keymaps/adamdehaven/config.h create mode 100644 keyboards/kbdfans/kbd67/mkii_soldered/keymaps/adamdehaven/keymap.c create mode 100644 keyboards/kbdfans/kbd67/mkii_soldered/keymaps/adamdehaven/rules.mk create mode 100644 keyboards/kbdfans/kbd75/keymaps/adamdehaven/config.h create mode 100644 keyboards/kbdfans/kbd75/keymaps/adamdehaven/keymap.c create mode 100644 keyboards/kbdfans/kbd75/keymaps/adamdehaven/rules.mk diff --git a/keyboards/kbdfans/kbd67/mkii_soldered/keymaps/adamdehaven/config.h b/keyboards/kbdfans/kbd67/mkii_soldered/keymaps/adamdehaven/config.h new file mode 100644 index 000000000000..4fcd7735526f --- /dev/null +++ b/keyboards/kbdfans/kbd67/mkii_soldered/keymaps/adamdehaven/config.h @@ -0,0 +1,3 @@ +#pragma once + +#define TAPPING_TERM 200 diff --git a/keyboards/kbdfans/kbd67/mkii_soldered/keymaps/adamdehaven/keymap.c b/keyboards/kbdfans/kbd67/mkii_soldered/keymaps/adamdehaven/keymap.c new file mode 100644 index 000000000000..ec5c0c8a8ef2 --- /dev/null +++ b/keyboards/kbdfans/kbd67/mkii_soldered/keymaps/adamdehaven/keymap.c @@ -0,0 +1,71 @@ +#include QMK_KEYBOARD_H + +// Compile from qmk_firmware folder with the following command: +// $ make kbdfans/kbd67/mkii-soldered:adamdehaven + +// 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 _QWERTY 0 +#define _FN1 1 + +// Tap Dance Definitions +enum tapdance { + TD_HOME = 0, + TD_END +}; + +qk_tap_dance_action_t tap_dance_actions[] = { + // Tap once for Home, twice for PageUp + [TD_HOME] = ACTION_TAP_DANCE_DOUBLE(KC_HOME, KC_PGUP), + // Tap once for End, twice for PageDown + [TD_END] = ACTION_TAP_DANCE_DOUBLE(KC_END, KC_PGDOWN) +}; + +/* + * You can use _______ in place for KC_TRNS (transparent) + * Or you can use XXXXXXX for KC_NO (NOOP) + */ +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + /* 0: _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_BSPC (2) │ 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 │ TD_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 │ TD_END │ + * ├────────────────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────────────┬─────────┼─────────┤ + * │ KC_LSFT (2) │ KC_Z │ KC_X │ KC_C │ KC_V │ KC_B │ KC_N │ KC_M │ KC_COMM │ KC_DOT │ KC_SLSH │ KC_RSFT │ KC_UP │ MO(_FN1)│ + * ├───────────┬─────────┴─┬───────┴───┬─────┴─────────┴─────────┴─────────┴─────────┴─────────┴───────┬─┴───────┬┴────────┬─┴───────┬─────────┼─────────┼─────────┤ + * │ KC_LCTL │ KC_LGUI │ KC_LALT │ KC_SPC │ KC_RALT │ KC_RCTL │ │ KC_LEFT │ KC_DOWN │ KC_RGHT │ + * └───────────┴───────────┴───────────┴───────────────────────────────────────────────────────────────┴─────────┴─────────┴─────────┴─────────┴─────────┴─────────┘ + */ + [_QWERTY] = 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, TD(TD_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, TD(TD_END), + 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, MO(_FN1), + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_SPC, KC_SPC, KC_RALT, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT + ), + + /* 1: _FN1 + * ┌─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬───────────────────┬─────────┐ + * │ 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) │ KC_MUTE │ + * ├─────────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬──────────────┼─────────┤ + * │ _______ │ _______ │ _______ │ _______ │ _______ │ _______ │ _______ │ _______ │ _______ │ _______ │ KC_PSCR │ _______ │ _______ │ _______ │ KC_VOLU │ + * ├──────────────┴─┬───────┴─┬───────┴─┬───────┴─┬───────┴─┬───────┴─┬───────┴─┬───────┴─┬───────┴─┬───────┴─┬───────┴─┬───────┴─┬───────┴──────────────┼─────────┤ + * │ _______ │ _______ │ _______ │ _______ │ _______ │ _______ │ _______ │ _______ │ _______ │ _______ │ _______ │ _______ │ _______ │ KC_VOLD │ + * ├────────────────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────────────┬─────────┼─────────┤ + * │ _______ (2) │ _______ │ _______ │ _______ │ _______ │ _______ │ _______ │ _______ │ _______ │ _______ │ _______ │ _______ │ KC_MPLY │ _______ │ + * ├───────────┬─────────┴─┬───────┴───┬─────┴─────────┴─────────┴─────────┴─────────┴─────────┴───────┬─┴───────┬─┴───────┬─┴───────┬─────────┼─────────┼─────────┤ + * │ _______ │ _______ │ _______ │ _______ │ _______ │ _______ │ │ KC_MPRV │ KC_MPLY │ KC_MNXT │ + * └───────────┴───────────┴───────────┴───────────────────────────────────────────────────────────────┴─────────┴─────────┴─────────┴─────────┴─────────┴─────────┘ + */ + [_FN1] = 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_MUTE, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_PSCR, _______, _______, _______, KC_VOLU, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_VOLD, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MPLY, _______, + _______, _______, _______, _______, _______, _______, _______, _______, KC_MPRV, KC_MPLY, KC_MNXT + ) +}; diff --git a/keyboards/kbdfans/kbd67/mkii_soldered/keymaps/adamdehaven/rules.mk b/keyboards/kbdfans/kbd67/mkii_soldered/keymaps/adamdehaven/rules.mk new file mode 100644 index 000000000000..e5ddcae8d927 --- /dev/null +++ b/keyboards/kbdfans/kbd67/mkii_soldered/keymaps/adamdehaven/rules.mk @@ -0,0 +1 @@ +TAP_DANCE_ENABLE = yes diff --git a/keyboards/kbdfans/kbd75/keymaps/adamdehaven/config.h b/keyboards/kbdfans/kbd75/keymaps/adamdehaven/config.h new file mode 100644 index 000000000000..4fcd7735526f --- /dev/null +++ b/keyboards/kbdfans/kbd75/keymaps/adamdehaven/config.h @@ -0,0 +1,3 @@ +#pragma once + +#define TAPPING_TERM 200 diff --git a/keyboards/kbdfans/kbd75/keymaps/adamdehaven/keymap.c b/keyboards/kbdfans/kbd75/keymaps/adamdehaven/keymap.c new file mode 100644 index 000000000000..134cf28db797 --- /dev/null +++ b/keyboards/kbdfans/kbd75/keymaps/adamdehaven/keymap.c @@ -0,0 +1,168 @@ +#include QMK_KEYBOARD_H + +// Compile from qmk_firmware folder with the following command: +// $ make kbdfans/kbd75/rev2:adamdehaven + +// 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 _QWERTY 0 +#define _FN1 1 + +extern rgblight_config_t rgblight_config; +static bool RGB_user_wants_enabled; +uint16_t RGB_current_mode; +uint16_t RGB_current_hue; +uint16_t RGB_current_sat; +uint16_t RGB_current_val; + +// Setup RGB +void keyboard_post_init_user(void) { + RGB_user_wants_enabled = rgblight_config.enable; + RGB_current_mode = rgblight_config.mode; + RGB_current_hue = rgblight_config.hue; + RGB_current_sat = rgblight_config.sat; + RGB_current_val = rgblight_config.val; +}; + +// Restore user settings +void restore_user_rgb_settings(void) { + // First, enable RGB + if (RGB_user_wants_enabled && !rgblight_config.enable) { + rgblight_enable(); + } else if (!RGB_user_wants_enabled && rgblight_config.enable) { + rgblight_disable(); + } + + // Restore settings + rgblight_sethsv(RGB_current_hue, RGB_current_sat, RGB_current_val); // Restore underglow RGB color + rgblight_mode(RGB_current_mode); // Restore RGB mode +}; + +// Tap Dance Definitions +enum tapdance { + TD_PGUP = 0, + TD_PGDN +}; + +qk_tap_dance_action_t tap_dance_actions[] = { + // Tap once for PageUp, twice for Home + [TD_PGUP] = ACTION_TAP_DANCE_DOUBLE(KC_PGUP, KC_HOME), + // Tap once for PageDown, twice for End + [TD_PGDN] = ACTION_TAP_DANCE_DOUBLE(KC_PGDOWN, KC_END) +}; + +// Fire on keypress +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case RGB_TOG: + if (!record->event.pressed) { + // on keyup + RGB_user_wants_enabled = rgblight_config.enable; + } + break; + case RGB_MOD: + if (!record->event.pressed) { + // on keyup + RGB_current_mode = rgblight_config.mode; + } + break; + case RGB_HUI: + case RGB_HUD: + if (!record->event.pressed) { + // on keyup + RGB_current_hue = rgblight_config.hue; + } + break; + case RGB_SAI: + case RGB_SAD: + if (!record->event.pressed) { + // on keyup + RGB_current_sat = rgblight_config.sat; + } + break; + case RGB_VAI: + case RGB_VAD: + if (!record->event.pressed) { + // on keyup + RGB_current_val = rgblight_config.val; + } + break; + } + return true; +}; + + +/* + * You can use _______ in place for KC_TRNS (transparent) + * Or you can use XXXXXXX for KC_NO (NOOP) + */ +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + /* 0: _QWERTY + * ┌─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┐ + * │ 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_INSERT│ 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_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 │ TD_PGUP │ + * ├────────────────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────────────┬─────────┼─────────┤ + * │ KC_LSFT (2) │ KC_Z │ KC_X │ KC_C │ KC_V │ KC_B │ KC_N │ KC_M │ KC_COMM │ KC_DOT │ KC_SLSH │ KC_RSFT │ KC_UP │ TD_PGDN │ + * ├───────────┬─────────┴─┬───────┴───┬─────┴─────────┴─────────┴─────────┴─────────┴─────────┴───────┬─┴───────┬┴────────┬─┴───────┬─────────┼─────────┼─────────┤ + * │ KC_LCTL │ KC_LGUI │ KC_LALT │ KC_SPC │ KC_RALT │MO(_FN1) │ KC_RCTL │ KC_LEFT │ KC_DOWN │ KC_RGHT │ + * └───────────┴───────────┴───────────┴───────────────────────────────────────────────────────────────┴─────────┴─────────┴─────────┴─────────┴─────────┴─────────┘ + */ + [_QWERTY] = 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_INSERT, 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_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, TD(TD_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, TD(TD_PGDN), + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_SPC, KC_SPC, KC_RALT, MO(_FN1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT + ), + + /* 1: _FN1 + * ┌─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┐ + * │ _______ │ _______ │ _______ │ _______ │ _______ │ _______ │ _______ │ _______ │ _______ │ _______ │ _______ │ _______ │ _______ │ _______ │ _______ │ KC_MUTE │ + * ├─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┴─────────┼─────────┤ + * │ _______ │ _______ │ _______ │ _______ │ _______ │ _______ │ _______ │ _______ │ _______ │ _______ │ _______ │ _______ │ _______ │ _______ │ _______ │ + * ├─────────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬──────────────┼─────────┤ + * │ _______ │ RGB_TOG │ RGB_MOD │ RGB_HUI │ RGB_HUD │ RGB_SAI │ RGB_SAD │ RGB_VAI │ RGB_VAD │ _______ │ _______ │ _______ │ _______ │ _______ │ _______ │ + * ├──────────────┴─┬───────┴─┬───────┴─┬───────┴─┬───────┴─┬───────┴─┬───────┴─┬───────┴─┬───────┴─┬───────┴─┬───────┴─┬───────┴─┬───────┴──────────────┼─────────┤ + * │ _______ │ _______ │ _______ │ _______ │ _______ │ _______ │ _______ │ _______ │ _______ │ _______ │ _______ │ _______ │ _______ │ KC_VOLU │ + * ├────────────────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────────────┬─────────┼─────────┤ + * │ _______ (2) │ _______ │ _______ │ BL_DEC │ BL_TOGG │ BL_INC │ BL_STEP │ _______ │ _______ │ _______ │ _______ │ _______ │ KC_MPLY │ KC_VOLD │ + * ├───────────┬─────────┴─┬───────┴───┬─────┴─────────┴─────────┴─────────┴─────────┴─────────┴───────┬─┴───────┬─┴───────┬─┴───────┬─────────┼─────────┼─────────┤ + * │ _______ │ _______ │ _______ │ _______ │ _______ │ _______ │ _______ │ KC_MPRV │ KC_MPLY │ KC_MNXT │ + * └───────────┴───────────┴───────────┴───────────────────────────────────────────────────────────────┴─────────┴─────────┴─────────┴─────────┴─────────┴─────────┘ + */ + [_FN1] = LAYOUT( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MUTE, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_VOLU, + _______, _______, _______, _______, BL_DEC, BL_TOGG, BL_INC, BL_STEP, _______, _______, _______, _______, _______, KC_MPLY, KC_VOLD, + _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MPRV, KC_MPLY, KC_MNXT + ) +}; + +void toggle_rgb_caps_lock(bool isActive) { + if (isActive) { + if (!rgblight_config.enable) { + rgblight_enable(); + } + + // Set underglow color if CAPS_LOCK enabled + rgblight_sethsv(HSV_RED); + // Set to breathe + rgblight_mode(5); + } else { + restore_user_rgb_settings(); + } +}; + +bool led_update_user(led_t led_state) { + toggle_rgb_caps_lock(led_state.caps_lock); + return true; +}; diff --git a/keyboards/kbdfans/kbd75/keymaps/adamdehaven/rules.mk b/keyboards/kbdfans/kbd75/keymaps/adamdehaven/rules.mk new file mode 100644 index 000000000000..e5ddcae8d927 --- /dev/null +++ b/keyboards/kbdfans/kbd75/keymaps/adamdehaven/rules.mk @@ -0,0 +1 @@ +TAP_DANCE_ENABLE = yes From 30f4b4d76349a61173f3eda87c57a3cde1c92aab Mon Sep 17 00:00:00 2001 From: Pablo Ovelleiro Corral Date: Fri, 26 Jun 2020 13:19:19 +0200 Subject: [PATCH 266/930] [Keymap] pinpox keymap for dz60 (#9494) * pinpox keymap for dz60 * Update keyboards/dz60/keymaps/pinpox/rules.mk * Update keyboards/dz60/keymaps/pinpox/keymap.c * Update keyboards/dz60/keymaps/pinpox/rules.mk --- keyboards/dz60/keymaps/pinpox/keymap.c | 22 ++++++++++++++++++++++ keyboards/dz60/keymaps/pinpox/rules.mk | 1 + 2 files changed, 23 insertions(+) create mode 100644 keyboards/dz60/keymaps/pinpox/keymap.c create mode 100644 keyboards/dz60/keymaps/pinpox/rules.mk diff --git a/keyboards/dz60/keymaps/pinpox/keymap.c b/keyboards/dz60/keymaps/pinpox/keymap.c new file mode 100644 index 000000000000..0a6497581a81 --- /dev/null +++ b/keyboards/dz60/keymaps/pinpox/keymap.c @@ -0,0 +1,22 @@ +#include QMK_KEYBOARD_H + + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + // Qwerty + [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, + 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_LCTL, KC_LGUI, MO(1), KC_SPC, KC_ALGR, KC_RGUI, KC_LALT, KC_RCTL + ), + + // Special keys + [1] = LAYOUT_60_ansi( + KC_SLEP, KC_F1, KC_F2, KC_F3, KC_F3, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL, + KC_NO, RGB_MOD, RGB_RMOD, KC_NO, KC_NO, KC_NO, KC_DOWN, KC_RGHT, KC_NO, KC_NO, KC_NO, KC_PGUP, KC_PGDOWN,KC_NO, + KC_CAPSLOCK, BL_TOGG, RGB_TOG, KC_NO, KC_NO, KC_NO, KC_LEFT, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_MFFD, + KC_NO, BL_INC, BL_DEC, BL_BRTG, KC_NO, KC_NO, KC_UP, KC_NO, KC_HOME, KC_END, KC_NO, KC_PSCR, + KC_NO, KC_NO, KC_TRNS, KC_MPLY, KC_NO, KC_NO, KC_TRNS, KC_NO + ) +}; diff --git a/keyboards/dz60/keymaps/pinpox/rules.mk b/keyboards/dz60/keymaps/pinpox/rules.mk new file mode 100644 index 000000000000..fcf3767e1663 --- /dev/null +++ b/keyboards/dz60/keymaps/pinpox/rules.mk @@ -0,0 +1 @@ +BOOTMAGIC_ENABLE = lite From 7369e195c21588e00ed5c4d970f1170bab39ae00 Mon Sep 17 00:00:00 2001 From: jotix <47826561+jotix@users.noreply.github.com> Date: Fri, 26 Jun 2020 18:04:09 -0300 Subject: [PATCH 267/930] tap toggle to lower layer (#9542) --- layouts/community/ortho_4x12/jotix/config.h | 4 ++++ layouts/community/ortho_4x12/jotix/keymap.c | 6 +++--- 2 files changed, 7 insertions(+), 3 deletions(-) create mode 100644 layouts/community/ortho_4x12/jotix/config.h diff --git a/layouts/community/ortho_4x12/jotix/config.h b/layouts/community/ortho_4x12/jotix/config.h new file mode 100644 index 000000000000..9b2f4fb64d29 --- /dev/null +++ b/layouts/community/ortho_4x12/jotix/config.h @@ -0,0 +1,4 @@ +// jotix ortho_4x12_layout config.h + +#define TAPPING_TOGGLE 2 +#define TAPPING_TERM 175 \ No newline at end of file diff --git a/layouts/community/ortho_4x12/jotix/keymap.c b/layouts/community/ortho_4x12/jotix/keymap.c index d28be78e56d0..5c08f3a2ed08 100644 --- a/layouts/community/ortho_4x12/jotix/keymap.c +++ b/layouts/community/ortho_4x12/jotix/keymap.c @@ -9,7 +9,7 @@ enum layers { #define LOWER MO(_LOWER) #define RAISE MO(_RAISE) -#define TGLOWER TG(_LOWER) +#define TTLOWER TT(_LOWER) const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { @@ -21,7 +21,7 @@ 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_ENT, // ├───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┤ - KC_LCTL,KC_LGUI,KC_LALT,KC_RALT,LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT,KC_DOWN,KC_UP, KC_RGHT + KC_LCTL,KC_LGUI,KC_LALT,KC_RALT,TTLOWER,KC_SPC, KC_SPC, RAISE, KC_LEFT,KC_DOWN,KC_UP, KC_RGHT // └───────┴───────┴───────┴───────┴───────┴───────┴───────┴───────┴───────┴───────┴───────┴───────┘ ), @@ -45,7 +45,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { // ├───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┤ _______,KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_UNDS,KC_PLUS,KC_LCBR,KC_RCBR,KC_PIPE, // ├───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┤ - _______,_______,_______,_______,TGLOWER,_______,_______,_______,KC_HOME,KC_PGDN,KC_PGUP,KC_END + _______,_______,_______,_______,_______,_______,_______,_______,KC_HOME,KC_PGDN,KC_PGUP,KC_END // └───────┴───────┴───────┴───────┴───────┴───────┴───────┴───────┴───────┴───────┴───────┴───────┘ ), From ac7b1d0bf30395f9564a2e64b38ebae63b87b9b8 Mon Sep 17 00:00:00 2001 From: Salicylic-acid3 <46864619+Salicylic-acid3@users.noreply.github.com> Date: Sun, 28 Jun 2020 04:33:02 +0900 Subject: [PATCH 268/930] [Update]JISplite89 Readme and LED nums (#9554) 1.Update the URL and photos in the build guide. 2.Changed the number of LEDs. --- keyboards/jisplit89/readme.md | 4 ++-- keyboards/jisplit89/rev1/config.h | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/keyboards/jisplit89/readme.md b/keyboards/jisplit89/readme.md index e7472ab96663..d2228745774d 100644 --- a/keyboards/jisplit89/readme.md +++ b/keyboards/jisplit89/readme.md @@ -1,6 +1,6 @@ # JISplit89 -![jisplit89](https://s2.booth.pm/1d33594d-0c5f-4f93-baf5-2e89e0d99afc/i/1916810/82322b65-7867-4779-b7f4-9076530d9e33_base_resized.jpg) +![jisplit89](https://s2.booth.pm/1d33594d-0c5f-4f93-baf5-2e89e0d99afc/i/1916810/ee9743ff-b03d-4ab8-8130-ddaad3c1b30d_base_resized.jpg) This is 89 keys Custom keyboard. @@ -14,4 +14,4 @@ Make example for this keyboard (after setting up your build environment): 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/7skb-mx-build-guide)(See here because it is almost the same as 7sKB) +[Build guide](https://salicylic-acid3.hatenablog.com/entry/jisplit89-build-guide) diff --git a/keyboards/jisplit89/rev1/config.h b/keyboards/jisplit89/rev1/config.h index a745ec834205..a2ba9040f719 100644 --- a/keyboards/jisplit89/rev1/config.h +++ b/keyboards/jisplit89/rev1/config.h @@ -51,9 +51,9 @@ along with this program. If not, see . #define RGB_DI_PIN D3 #ifndef RGBLED_NUM - #define RGBLED_NUM 31 + #define RGBLED_NUM 32 #define RGBLIGHT_SPLIT - #define RGBLED_SPLIT { 11, 20 } + #define RGBLED_SPLIT { 11, 21 } #endif #define RGBLIGHT_ANIMATIONS From 751a1789b59546728c0987d9259b4189cd9f6fe2 Mon Sep 17 00:00:00 2001 From: myoung34 Date: Sat, 27 Jun 2020 14:36:08 -0500 Subject: [PATCH 269/930] Add JD40 keymap for myoung34 (#9545) Co-authored-by: Ryan --- keyboards/jd40/keymaps/myoung34/keymap.c | 28 ++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 keyboards/jd40/keymaps/myoung34/keymap.c diff --git a/keyboards/jd40/keymaps/myoung34/keymap.c b/keyboards/jd40/keymaps/myoung34/keymap.c new file mode 100644 index 000000000000..eb4146d1587b --- /dev/null +++ b/keyboards/jd40/keymaps/myoung34/keymap.c @@ -0,0 +1,28 @@ +#include QMK_KEYBOARD_H + +#define _BL 0 +#define _AL 1 +#define _UL 2 + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_BL] = 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_UP, KC_DOT, + _______, KC_LCTL, KC_LALT, KC_LGUI, KC_BSPC, KC_SPC, MO(_AL), KC_LEFT, KC_DOWN, KC_RGHT + ), + + [_AL] = 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_TAB, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_ENT, + _______, _______, KC_SCOLON, KC_QUOTE, KC_LBRACKET, KC_RBRACKET, KC_BSLASH, KC_MINUS, KC_EQUAL, KC_PGUP, KC_SLASH, + _______, _______, _______, _______, MO(_UL), TG(_UL), _______, KC_HOME, KC_PGDN, KC_END + ), + + [_UL] = LAYOUT( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, KC_AUDIO_VOL_DOWN, KC_AUDIO_VOL_UP, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + }; From 6574ac52ad93bdd010c323c444f26b951c9227c3 Mon Sep 17 00:00:00 2001 From: umi <57262844+umi-umi@users.noreply.github.com> Date: Sun, 28 Jun 2020 12:00:55 +0900 Subject: [PATCH 270/930] [Docs] Japanese translation of docs/documentation_best_practices.md (#9522) * add documentation_best_practices.md translation * update based on comment * update based on comment --- docs/ja/documentation_best_practices.md | 69 +++++++++++++++++++++++++ 1 file changed, 69 insertions(+) create mode 100644 docs/ja/documentation_best_practices.md diff --git a/docs/ja/documentation_best_practices.md b/docs/ja/documentation_best_practices.md new file mode 100644 index 000000000000..50ec4ea6afe0 --- /dev/null +++ b/docs/ja/documentation_best_practices.md @@ -0,0 +1,69 @@ +# ドキュメントベストプラクティス + + + +このページは QMK のためのドキュメントを作成する時のベストプラクティスを文章化するためのものです。これらのガイドラインに従うことで、一貫したトーンとスタイルを維持することでき、他の人が QMK をより理解しやすくすることができます。 + +# ページの開始 + +ドキュメントページは通常 H1 ヘッダで始まり、最初の段落を使ってこのページの内容を説明します。この見出しと段落は目次の次にあるため、見出しは短くして空白の無い長い文字列を避けるように気を付けてください。 + +例: + +``` +# My Page Title + +This page covers my super cool feature. You can use this feature to make coffee, squeeze fresh oj, and have an egg mcmuffin and hashbrowns delivered from your local macca's by drone. +``` + +# 見出し + +通常、ページには複数の "H1" 見出しが有るべきです。H1 と H2 見出しのみが目次に含まれるので、適切に計画してください。目次が広くなりすぎないように、H1 と H2 の見出しでは幅を広げないようにしてください。 + +# スタイル付きのヒントブロック + +注意を引くためにテキストの周りにスタイル付きのヒントブロックを描くことができます。 + +### 重要なもの + +``` +!> This is important +``` + +以下のように表示されます: + +!> This is important + +### 一般的なヒント + +``` +?> This is a helpful tip. +``` + +以下のように表示されます: + +?> This is a helpful tip. + + +# 機能を文章化する + +QMK のために新しい機能を作成した場合、そのドキュメントページを作成してください。長い必要は無く、機能を説明する幾つかの文と、関連するキーコードを列挙した表で十分です。以下は基本的なテンプレートです: + +```markdown +# My Cool Feature + +This page describes my cool feature. You can use my cool feature to make coffee and order cream and sugar to be delivered via drone. + +## My Cool Feature Keycodes + +|Long Name|Short Name|Description| +|---------|----------|-----------| +|KC_COFFEE||Make Coffee| +|KC_CREAM||Order Cream| +|KC_SUGAR||Order Sugar| +``` + +ドキュメントを `docs/feature_.md` に配置し、そのファイルを `docs/_summary.md` の適切な場所に追加します。キーコードを追加した場合は、機能ページに戻るリンクとともに `docs/keycodes.md` に追加するようにしてください。 From 097df6afdbacf70ee10d84639b3975e6fc0b37ec Mon Sep 17 00:00:00 2001 From: umi <57262844+umi-umi@users.noreply.github.com> Date: Sun, 28 Jun 2020 12:02:43 +0900 Subject: [PATCH 271/930] [Docs] Japanese translation of docs/documentation_templates.md (#9523) * add documentation_templates.md translation * update based on comment * update based on comment --- docs/ja/documentation_templates.md | 45 ++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 docs/ja/documentation_templates.md diff --git a/docs/ja/documentation_templates.md b/docs/ja/documentation_templates.md new file mode 100644 index 000000000000..a767c671a8bc --- /dev/null +++ b/docs/ja/documentation_templates.md @@ -0,0 +1,45 @@ +# ドキュメントテンプレート + + + +このページでは、新しいキーマップやキーボードを QMK に提出する際に使うべきテンプレートをまとめています。 + +## キーマップ `readme.md` テンプレート :id=keyboard-readmemd-template + +ほとんどのキーマップには、レイアウトを表す画像があります。画像を作成するには、[Keyboard Layout Editor](http://keyboard-layout-editor.com) を使うことができます。画像は [Imgur](http://imgur.com) や別のホスティングサービスにアップロードし、プルリクエストに画像を含めないでください。 + +画像の下には、キーマップを理解してもらうための簡単な説明文を書いてください。 + +``` +![Clueboard Layout Image](http://i.imgur.com/7Capi8W.png) + +# Default Clueboard Layout + +This is the default layout that comes flashed on every Clueboard. For the most +part it's a straightforward and easy to follow layout. The only unusual key is +the key in the upper left, which sends Escape normally, but Grave when any of +the Ctrl, Alt, or GUI modifiers are held down. +``` + +## キーボード `readme.md` テンプレート + +``` +# Planck + +![Planck](http://i.imgur.com/q2M3uEU.jpg) + +A compact 40% (12x4) ortholinear keyboard kit made and sold by OLKB and Massdrop. [More info on qmk.fm](http://qmk.fm/planck/) + +* Keyboard Maintainer: [Jack Humbert](https://github.com/jackhumbert) +* Hardware Supported: Planck PCB rev1, rev2, rev3, rev4, Teensy 2.0 +* Hardware Availability: [OLKB.com](https://olkb.com), [Massdrop](https://www.massdrop.com/buy/planck-mechanical-keyboard?mode=guest_open) + +Make example for this keyboard (after setting up your build environment): + + make planck/rev4: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 c85e010d45616e119b8a2cfe97760384f661755e Mon Sep 17 00:00:00 2001 From: Ryan Date: Sun, 28 Jun 2020 20:56:50 +1000 Subject: [PATCH 272/930] Add missing info.jsons for a few boards (#9549) --- keyboards/aeboards/aegis/info.json | 130 +++++++++++++++++ keyboards/aeboards/ext65/info.json | 110 ++++++++++++++ keyboards/cannonkeys/chimera65/info.json | 89 +++++++++++- .../converter/siemens_tastatur/info.json | 94 ++++++++++++ keyboards/kv/revt/info.json | 135 ++++++++++++++++++ keyboards/ogre/ergo_single/info.json | 94 ++++++++++++ keyboards/ogre/ergo_split/info.json | 94 ++++++++++++ keyboards/tr60w/info.json | 79 ++++++++++ keyboards/xelus/snap96/info.json | 124 ++++++++++++++++ keyboards/xiaomi/mk02/info.json | 113 +++++++++++++++ keyboards/zfrontier/big_switch/info.json | 14 ++ 11 files changed, 1074 insertions(+), 2 deletions(-) create mode 100644 keyboards/aeboards/aegis/info.json create mode 100644 keyboards/aeboards/ext65/info.json create mode 100644 keyboards/converter/siemens_tastatur/info.json create mode 100644 keyboards/kv/revt/info.json create mode 100644 keyboards/ogre/ergo_single/info.json create mode 100644 keyboards/ogre/ergo_split/info.json create mode 100644 keyboards/tr60w/info.json create mode 100644 keyboards/xelus/snap96/info.json create mode 100644 keyboards/xiaomi/mk02/info.json create mode 100644 keyboards/zfrontier/big_switch/info.json diff --git a/keyboards/aeboards/aegis/info.json b/keyboards/aeboards/aegis/info.json new file mode 100644 index 000000000000..1e83a7a9c102 --- /dev/null +++ b/keyboards/aeboards/aegis/info.json @@ -0,0 +1,130 @@ +{ + "keyboard_name": "Aegis", + "url": "", + "maintainer": "qmk", + "width": 19.5, + "height": 6.75, + "layouts": { + "LAYOUT_aegis": { + "layout": [ + {"x": 0, "y": 0}, + {"x": 1, "y": 0}, + {"x": 2, "y": 0}, + {"x": 3, "y": 0}, + + {"x": 4.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.5, "y": 0}, + {"x": 16.5, "y": 0}, + {"x": 17.5, "y": 0}, + {"x": 18.5, "y": 0}, + + {"x": 0, "y": 1.5}, + {"x": 1, "y": 1.5}, + {"x": 2, "y": 1.5}, + {"x": 3, "y": 1.5}, + + {"x": 4.5, "y": 1.5}, + {"x": 5.5, "y": 1.5}, + {"x": 6.5, "y": 1.5}, + {"x": 7.5, "y": 1.5}, + {"x": 8.5, "y": 1.5}, + {"x": 9.5, "y": 1.5}, + {"x": 10.5, "y": 1.5}, + {"x": 11.5, "y": 1.5}, + {"x": 12.5, "y": 1.5}, + {"x": 13.5, "y": 1.5}, + {"x": 14.5, "y": 1.5}, + {"x": 15.5, "y": 1.5}, + {"x": 16.5, "y": 1.5}, + {"x": 17.5, "y": 1.5}, + {"x": 18.5, "y": 1.5}, + + {"x": 0, "y": 2.5}, + {"x": 1, "y": 2.5}, + {"x": 2, "y": 2.5}, + {"x": 3, "y": 2.5}, + + {"x": 4.5, "y": 2.5, "w": 1.5}, + {"x": 6, "y": 2.5}, + {"x": 7, "y": 2.5}, + {"x": 8, "y": 2.5}, + {"x": 9, "y": 2.5}, + {"x": 10, "y": 2.5}, + {"x": 11, "y": 2.5}, + {"x": 12, "y": 2.5}, + {"x": 13, "y": 2.5}, + {"x": 14, "y": 2.5}, + {"x": 15, "y": 2.5}, + {"x": 16, "y": 2.5}, + {"x": 17, "y": 2.5}, + {"x": 18, "y": 2.5, "w": 1.5}, + + {"x": 0, "y": 3.5}, + {"x": 1, "y": 3.5}, + {"x": 2, "y": 3.5}, + {"x": 3, "y": 3.5}, + + {"x": 4.5, "y": 3.5, "w": 1.75}, + {"x": 6.25, "y": 3.5}, + {"x": 7.25, "y": 3.5}, + {"x": 8.25, "y": 3.5}, + {"x": 9.25, "y": 3.5}, + {"x": 10.25, "y": 3.5}, + {"x": 11.25, "y": 3.5}, + {"x": 12.25, "y": 3.5}, + {"x": 13.25, "y": 3.5}, + {"x": 14.25, "y": 3.5}, + {"x": 15.25, "y": 3.5}, + {"x": 16.25, "y": 3.5}, + {"x": 17.25, "y": 3.5, "w": 2.25}, + + {"x": 0, "y": 4.5}, + {"x": 1, "y": 4.5}, + {"x": 2, "y": 4.5}, + {"x": 3, "y": 4.5}, + + {"x": 5.5, "y": 4.5, "w": 1.25}, + {"x": 6.75, "y": 4.5}, + {"x": 7.75, "y": 4.5}, + {"x": 8.75, "y": 4.5}, + {"x": 9.75, "y": 4.5}, + {"x": 10.75, "y": 4.5}, + {"x": 11.75, "y": 4.5}, + {"x": 12.75, "y": 4.5}, + {"x": 13.75, "y": 4.5}, + {"x": 14.75, "y": 4.5}, + {"x": 15.75, "y": 4.5}, + {"x": 16.75, "y": 4.5, "w": 1.75}, + {"x": 18.5, "y": 4.5}, + + {"x": 4.25, "y": 4.75}, + + {"x": 0, "y": 5.5}, + {"x": 1, "y": 5.5}, + {"x": 2, "y": 5.5}, + + {"x": 6.5, "y": 5.5, "w": 1.25}, + {"x": 7.75, "y": 5.5, "w": 1.25}, + {"x": 9, "y": 5.5, "w": 6.25}, + {"x": 15.25, "y": 5.5, "w": 1.5}, + {"x": 16.75, "y": 5.5, "w": 1.25}, + {"x": 18, "y": 5.5, "w": 1.5}, + + {"x": 3.25, "y": 5.75}, + {"x": 4.25, "y": 5.75}, + {"x": 5.25, "y": 5.75} + ] + } + } +} diff --git a/keyboards/aeboards/ext65/info.json b/keyboards/aeboards/ext65/info.json new file mode 100644 index 000000000000..ff3b6fcc1020 --- /dev/null +++ b/keyboards/aeboards/ext65/info.json @@ -0,0 +1,110 @@ +{ + "keyboard_name": "Ext65", + "url": "", + "maintainer": "qmk", + "width": 20.5, + "height": 5, + "layouts": { + "LAYOUT_ext65": { + "layout": [ + {"x": 0, "y": 0}, + {"x": 1, "y": 0}, + {"x": 2, "y": 0}, + {"x": 3, "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": 17.5, "y": 0}, + {"x": 18.5, "y": 0}, + {"x": 19.5, "y": 0}, + + {"x": 0, "y": 1}, + {"x": 1, "y": 1}, + {"x": 2, "y": 1}, + {"x": 3, "y": 1}, + + {"x": 4.5, "y": 1, "w": 1.5}, + {"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}, + {"x": 17, "y": 1}, + {"x": 18, "y": 1, "w": 1.5}, + {"x": 19.5, "y": 1}, + + {"x": 0, "y": 2}, + {"x": 1, "y": 2}, + {"x": 2, "y": 2}, + {"x": 3, "y": 2}, + + {"x": 4.5, "y": 2, "w": 1.75}, + {"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}, + {"x": 17.25, "y": 2, "w": 2.25}, + {"x": 19.5, "y": 2}, + + {"x": 0, "y": 3}, + {"x": 1, "y": 3}, + {"x": 2, "y": 3}, + {"x": 3, "y": 3}, + + {"x": 4.5, "y": 3, "w": 2.25}, + {"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}, + {"x": 15.75, "y": 3}, + {"x": 16.75, "y": 3, "w": 1.75}, + {"x": 18.5, "y": 3}, + {"x": 19.5, "y": 3}, + + {"x": 0, "y": 4}, + {"x": 1, "y": 4}, + {"x": 2, "y": 4}, + {"x": 3, "y": 4}, + {"x": 4.5, "y": 4, "w": 1.5}, + {"x": 6, "y": 4}, + {"x": 7, "y": 4, "w": 1.5}, + {"x": 8.5, "y": 4, "w": 6.25}, + {"x": 14.75, "y": 4, "w": 1.25}, + {"x": 16, "y": 4}, + + {"x": 17.5, "y": 4}, + {"x": 18.5, "y": 4}, + {"x": 19.5, "y": 4} + ] + } + } +} diff --git a/keyboards/cannonkeys/chimera65/info.json b/keyboards/cannonkeys/chimera65/info.json index 75a5f293d109..4130e7a373d3 100644 --- a/keyboards/cannonkeys/chimera65/info.json +++ b/keyboards/cannonkeys/chimera65/info.json @@ -2,6 +2,91 @@ "keyboard_name": "Chimera65", "url": "https://cannonkeys.com", "maintainer": "awkannan", - "width": 16, - "height": 5 + "width": 16.5, + "height": 5.25, + "layouts": { + "LAYOUT_default": { + "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": 15.5, "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}, + {"x": 13.75, "y": 2, "w": 1.25}, + + {"x": 15.5, "y": 2}, + + {"x": 0, "y": 3, "w": 1.25}, + {"x": 1.25, "y": 3}, + {"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": 15.5, "y": 3}, + + {"x": 14.25, "y": 3.25}, + + {"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.25, "y": 4.25}, + {"x": 14.25, "y": 4.25}, + {"x": 15.25, "y": 4.25} + ] + } + } } diff --git a/keyboards/converter/siemens_tastatur/info.json b/keyboards/converter/siemens_tastatur/info.json new file mode 100644 index 000000000000..81fc47865269 --- /dev/null +++ b/keyboards/converter/siemens_tastatur/info.json @@ -0,0 +1,94 @@ +{ + "keyboard_name": "Siemens Tastatur", + "url": "", + "maintainer": "qmk", + "width": 20, + "height": 5, + "layouts": { + "LAYOUT": { + "layout": [ + {"x": 0, "y": 0, "w": 1.5}, + {"x": 1.5, "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, "h": 2}, + + {"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": 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, "w": 1.5}, + + {"x": 15, "y": 1}, + {"x": 16, "y": 1}, + {"x": 17, "y": 1}, + {"x": 18, "y": 1}, + {"x": 19, "y": 1}, + + {"x": 0, "y": 2, "w": 1.25}, + {"x": 1.25, "y": 2}, + {"x": 2.25, "y": 2}, + {"x": 3.25, "y": 2}, + {"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, "w": 1.25}, + {"x": 13.5, "y": 2, "h": 2}, + + {"x": 15, "y": 2}, + {"x": 16, "y": 2}, + {"x": 17, "y": 2}, + {"x": 18, "y": 2}, + {"x": 19, "y": 2}, + + {"x": 1.75, "y": 3}, + {"x": 2.75, "y": 3}, + {"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, "w": 1.75}, + + {"x": 15, "y": 3}, + {"x": 16, "y": 3}, + {"x": 17, "y": 3}, + {"x": 18, "y": 3}, + {"x": 19, "y": 3}, + + {"x": 3.5, "y": 4, "w": 6.5} + ] + } + } +} diff --git a/keyboards/kv/revt/info.json b/keyboards/kv/revt/info.json new file mode 100644 index 000000000000..176e4575348e --- /dev/null +++ b/keyboards/kv/revt/info.json @@ -0,0 +1,135 @@ +{ + "keyboard_name": "KVT", + "url": "", + "maintainer": "qmk", + "width": 22.5, + "height": 6, + "layouts": { + "LAYOUT_default": { + "layout": [ + {"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}, + {"x": 1, "y": 1}, + {"x": 2, "y": 1}, + {"x": 3, "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}, + {"x": 13.25, "y": 1}, + {"x": 14.25, "y": 1}, + {"x": 15.25, "y": 1}, + {"x": 16.25, "y": 1}, + {"x": 17.25, "y": 1, "w": 2}, + + {"x": 19.5, "y": 1}, + {"x": 20.5, "y": 1}, + {"x": 21.5, "y": 1}, + + {"x": 0, "y": 2}, + {"x": 1, "y": 2}, + {"x": 2, "y": 2}, + {"x": 3, "y": 2, "h": 2}, + + {"x": 4.25, "y": 2, "w": 1.5}, + {"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}, + {"x": 13.75, "y": 2}, + {"x": 14.75, "y": 2}, + {"x": 15.75, "y": 2}, + {"x": 16.75, "y": 2}, + {"x": 17.75, "y": 2, "w": 1.5}, + + {"x": 19.5, "y": 2}, + {"x": 20.5, "y": 2}, + {"x": 21.5, "y": 2}, + + {"x": 0, "y": 3}, + {"x": 1, "y": 3}, + {"x": 2, "y": 3}, + + {"x": 4.25, "y": 3, "w": 1.75}, + {"x": 6, "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": 16, "y": 3}, + {"x": 17, "y": 3, "w": 2.25}, + + {"x": 0, "y": 4}, + {"x": 1, "y": 4}, + {"x": 2, "y": 4}, + {"x": 3, "y": 4, "h": 2}, + + {"x": 4.25, "y": 4, "w": 2.25}, + {"x": 6.5, "y": 4}, + {"x": 7.5, "y": 4}, + {"x": 8.5, "y": 4}, + {"x": 9.5, "y": 4}, + {"x": 10.5, "y": 4}, + {"x": 11.5, "y": 4}, + {"x": 12.5, "y": 4}, + {"x": 13.5, "y": 4}, + {"x": 14.5, "y": 4}, + {"x": 15.5, "y": 4}, + {"x": 16.5, "y": 4, "w": 2.75}, + + {"x": 20.5, "y": 4}, + + {"x": 0, "y": 5, "w": 2}, + {"x": 2, "y": 5}, + + {"x": 4.25, "y": 5, "w": 1.25}, + {"x": 5.5, "y": 5, "w": 1.25}, + {"x": 6.75, "y": 5, "w": 1.25}, + {"x": 8, "y": 5, "w": 6.25}, + {"x": 14.25, "y": 5, "w": 1.25}, + {"x": 15.5, "y": 5, "w": 1.25}, + {"x": 16.75, "y": 5, "w": 1.25}, + {"x": 18, "y": 5, "w": 1.25}, + + {"x": 19.5, "y": 5}, + {"x": 20.5, "y": 5}, + {"x": 21.5, "y": 5} + ] + } + } +} diff --git a/keyboards/ogre/ergo_single/info.json b/keyboards/ogre/ergo_single/info.json new file mode 100644 index 000000000000..401e3f4889c9 --- /dev/null +++ b/keyboards/ogre/ergo_single/info.json @@ -0,0 +1,94 @@ +{ + "keyboard_name": "Ogre Ergo Single", + "url": "", + "maintainer": "qmk", + "width": 19.5, + "height": 6.5, + "layouts": { + "LAYOUT": { + "layout": [ + {"x": 0.25, "y": 0.5}, + {"x": 1.25, "y": 0.5}, + {"x": 2.25, "y": 0.5}, + {"x": 3.25, "y": 0.25}, + {"x": 4.25, "y": 0}, + {"x": 5.25, "y": 0.25}, + {"x": 6.25, "y": 0.5}, + {"x": 7.25, "y": 0.5}, + + {"x": 11.25, "y": 0.5}, + {"x": 12.25, "y": 0.5}, + {"x": 13.25, "y": 0.25}, + {"x": 14.25, "y": 0}, + {"x": 15.25, "y": 0.25}, + {"x": 16.25, "y": 0.5}, + {"x": 17.25, "y": 0.5}, + {"x": 18.25, "y": 0.5}, + + {"x": 0.75, "y": 1.5, "w": 1.5}, + {"x": 2.25, "y": 1.5}, + {"x": 3.25, "y": 1.25}, + {"x": 4.25, "y": 1}, + {"x": 5.25, "y": 1.25}, + {"x": 6.25, "y": 1.5}, + {"x": 7.25, "y": 1.5}, + + {"x": 11.25, "y": 1.5}, + {"x": 12.25, "y": 1.5}, + {"x": 13.25, "y": 1.25}, + {"x": 14.25, "y": 1}, + {"x": 15.25, "y": 1.25}, + {"x": 16.25, "y": 1.5}, + {"x": 17.25, "y": 1.5, "w": 1.5}, + + {"x": 0.5, "y": 2.5, "w": 1.75}, + {"x": 2.25, "y": 2.5}, + {"x": 3.25, "y": 2.25}, + {"x": 4.25, "y": 2}, + {"x": 5.25, "y": 2.25}, + {"x": 6.25, "y": 2.5}, + {"x": 7.25, "y": 2.5}, + + {"x": 11.25, "y": 2.5}, + {"x": 12.25, "y": 2.5}, + {"x": 13.25, "y": 2.25}, + {"x": 14.25, "y": 2}, + {"x": 15.25, "y": 2.25}, + {"x": 16.25, "y": 2.5}, + {"x": 17.25, "y": 2.5, "w": 1.75}, + + {"x": 0, "y": 3.5, "w": 2.25}, + {"x": 2.25, "y": 3.5}, + {"x": 3.25, "y": 3.25}, + {"x": 4.25, "y": 3}, + {"x": 5.25, "y": 3.25}, + {"x": 6.25, "y": 3.5}, + + {"x": 12.25, "y": 3.5}, + {"x": 13.25, "y": 3.25}, + {"x": 14.25, "y": 3}, + {"x": 15.25, "y": 3.25}, + {"x": 16.25, "y": 3.5}, + {"x": 17.25, "y": 3.5, "w": 2.25}, + + {"x": 1, "y": 4.5, "w": 1.25}, + {"x": 2.25, "y": 4.5}, + {"x": 3.25, "y": 4.25}, + {"x": 4.25, "y": 4}, + + {"x": 6.25, "y": 5.5, "w": 1.25}, + {"x": 7.5, "y": 3.75, "h": 2.75}, + {"x": 8.5, "y": 4.5, "h": 2}, + + {"x": 10, "y": 5, "h": 1.5}, + {"x": 11, "y": 4.5, "h": 2}, + {"x": 12, "y": 5.5, "w": 1.25}, + + {"x": 14.25, "y": 4}, + {"x": 15.25, "y": 4.25}, + {"x": 16.25, "y": 4.5}, + {"x": 17.25, "y": 4.5, "w": 1.25} + ] + } + } +} diff --git a/keyboards/ogre/ergo_split/info.json b/keyboards/ogre/ergo_split/info.json new file mode 100644 index 000000000000..ea2efaa933d5 --- /dev/null +++ b/keyboards/ogre/ergo_split/info.json @@ -0,0 +1,94 @@ +{ + "keyboard_name": "Ogre Ergo Split", + "url": "", + "maintainer": "qmk", + "width": 19.5, + "height": 6.5, + "layouts": { + "LAYOUT": { + "layout": [ + {"x": 0.25, "y": 0.5}, + {"x": 1.25, "y": 0.5}, + {"x": 2.25, "y": 0.5}, + {"x": 3.25, "y": 0.25}, + {"x": 4.25, "y": 0}, + {"x": 5.25, "y": 0.25}, + {"x": 6.25, "y": 0.5}, + {"x": 7.25, "y": 0.5}, + + {"x": 11.25, "y": 0.5}, + {"x": 12.25, "y": 0.5}, + {"x": 13.25, "y": 0.25}, + {"x": 14.25, "y": 0}, + {"x": 15.25, "y": 0.25}, + {"x": 16.25, "y": 0.5}, + {"x": 17.25, "y": 0.5}, + {"x": 18.25, "y": 0.5}, + + {"x": 0.75, "y": 1.5, "w": 1.5}, + {"x": 2.25, "y": 1.5}, + {"x": 3.25, "y": 1.25}, + {"x": 4.25, "y": 1}, + {"x": 5.25, "y": 1.25}, + {"x": 6.25, "y": 1.5}, + {"x": 7.25, "y": 1.5}, + + {"x": 11.25, "y": 1.5}, + {"x": 12.25, "y": 1.5}, + {"x": 13.25, "y": 1.25}, + {"x": 14.25, "y": 1}, + {"x": 15.25, "y": 1.25}, + {"x": 16.25, "y": 1.5}, + {"x": 17.25, "y": 1.5, "w": 1.5}, + + {"x": 0.5, "y": 2.5, "w": 1.75}, + {"x": 2.25, "y": 2.5}, + {"x": 3.25, "y": 2.25}, + {"x": 4.25, "y": 2}, + {"x": 5.25, "y": 2.25}, + {"x": 6.25, "y": 2.5}, + {"x": 7.25, "y": 2.5}, + + {"x": 11.25, "y": 2.5}, + {"x": 12.25, "y": 2.5}, + {"x": 13.25, "y": 2.25}, + {"x": 14.25, "y": 2}, + {"x": 15.25, "y": 2.25}, + {"x": 16.25, "y": 2.5}, + {"x": 17.25, "y": 2.5, "w": 1.75}, + + {"x": 0, "y": 3.5, "w": 2.25}, + {"x": 2.25, "y": 3.5}, + {"x": 3.25, "y": 3.25}, + {"x": 4.25, "y": 3}, + {"x": 5.25, "y": 3.25}, + {"x": 6.25, "y": 3.5}, + + {"x": 12.25, "y": 3.5}, + {"x": 13.25, "y": 3.25}, + {"x": 14.25, "y": 3}, + {"x": 15.25, "y": 3.25}, + {"x": 16.25, "y": 3.5}, + {"x": 17.25, "y": 3.5, "w": 2.25}, + + {"x": 1, "y": 4.5, "w": 1.25}, + {"x": 2.25, "y": 4.5}, + {"x": 3.25, "y": 4.25}, + {"x": 4.25, "y": 4}, + + {"x": 6.25, "y": 5.5, "w": 1.25}, + {"x": 7.5, "y": 3.75, "h": 2.75}, + {"x": 8.5, "y": 4.5, "h": 2}, + + {"x": 10, "y": 5, "h": 1.5}, + {"x": 11, "y": 4.5, "h": 2}, + {"x": 12, "y": 5.5, "w": 1.25}, + + {"x": 14.25, "y": 4}, + {"x": 15.25, "y": 4.25}, + {"x": 16.25, "y": 4.5}, + {"x": 17.25, "y": 4.5, "w": 1.25} + ] + } + } +} diff --git a/keyboards/tr60w/info.json b/keyboards/tr60w/info.json new file mode 100644 index 000000000000..c4dbc9085ae9 --- /dev/null +++ b/keyboards/tr60w/info.json @@ -0,0 +1,79 @@ +{ + "keyboard_name": "TR60W", + "url": "", + "maintainer": "qmk", + "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} + ] + } + } +} diff --git a/keyboards/xelus/snap96/info.json b/keyboards/xelus/snap96/info.json new file mode 100644 index 000000000000..69a66a100268 --- /dev/null +++ b/keyboards/xelus/snap96/info.json @@ -0,0 +1,124 @@ +{ + "keyboard_name": "Snap96", + "url": "", + "maintainer": "Xelus22", + "width": 19, + "height": 6, + "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": 15, "y": 0}, + {"x": 16, "y": 0}, + {"x": 17, "y": 0}, + {"x": 18, "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": 16, "y": 1}, + {"x": 17, "y": 1}, + {"x": 18, "y": 1}, + + {"x": 0, "y": 2, "w": 1.5}, + {"x": 1.5, "y": 2}, + {"x": 2.5, "y": 2}, + {"x": 3.5, "y": 2}, + {"x": 4.5, "y": 2}, + {"x": 5.5, "y": 2}, + {"x": 6.5, "y": 2}, + {"x": 7.5, "y": 2}, + {"x": 8.5, "y": 2}, + {"x": 9.5, "y": 2}, + {"x": 10.5, "y": 2}, + {"x": 11.5, "y": 2}, + {"x": 12.5, "y": 2}, + {"x": 13.5, "y": 2, "w": 1.5}, + {"x": 15, "y": 2}, + {"x": 16, "y": 2}, + {"x": 17, "y": 2}, + {"x": 18, "y": 2}, + + {"x": 0, "y": 3, "w": 1.75}, + {"x": 1.75, "y": 3}, + {"x": 2.75, "y": 3}, + {"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, "w": 2.25}, + {"x": 15, "y": 3}, + {"x": 16, "y": 3}, + {"x": 17, "y": 3}, + {"x": 18, "y": 3}, + + {"x": 0, "y": 4, "w": 1.25}, + {"x": 1.25, "y": 4}, + {"x": 2.25, "y": 4}, + {"x": 3.25, "y": 4}, + {"x": 4.25, "y": 4}, + {"x": 5.25, "y": 4}, + {"x": 6.25, "y": 4}, + {"x": 7.25, "y": 4}, + {"x": 8.25, "y": 4}, + {"x": 9.25, "y": 4}, + {"x": 10.25, "y": 4}, + {"x": 11.25, "y": 4}, + {"x": 12.25, "y": 4, "w": 1.75}, + {"x": 14, "y": 4}, + {"x": 15, "y": 4}, + {"x": 16, "y": 4}, + {"x": 17, "y": 4}, + {"x": 18, "y": 4}, + + {"x": 0, "y": 5, "w": 1.25}, + {"x": 1.25, "y": 5, "w": 1.25}, + {"x": 2.5, "y": 5, "w": 1.25}, + {"x": 3.75, "y": 5, "w": 2.25}, + {"x": 6, "y": 5}, + {"x": 7, "y": 5, "w": 2.25}, + {"x": 9.25, "y": 5, "w": 1.25}, + {"x": 10.5, "y": 5, "w": 1.25}, + {"x": 11.75, "y": 5, "w": 1.25}, + {"x": 13, "y": 5}, + {"x": 14, "y": 5}, + {"x": 15, "y": 5}, + {"x": 16, "y": 5}, + {"x": 17, "y": 5}, + {"x": 18, "y": 5} + ] + } + } +} diff --git a/keyboards/xiaomi/mk02/info.json b/keyboards/xiaomi/mk02/info.json new file mode 100644 index 000000000000..78a11334ad5f --- /dev/null +++ b/keyboards/xiaomi/mk02/info.json @@ -0,0 +1,113 @@ +{ + "keyboard_name": "Xiaomi MK02", + "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} + ] + } + } +} diff --git a/keyboards/zfrontier/big_switch/info.json b/keyboards/zfrontier/big_switch/info.json new file mode 100644 index 000000000000..92aedd35797d --- /dev/null +++ b/keyboards/zfrontier/big_switch/info.json @@ -0,0 +1,14 @@ +{ + "keyboard_name": "Red Comet Big Switch", + "url": "https://en.zfrontier.com/products/redcomet-bigswitch-combo", + "maintainer": "carlxia", + "width": 4, + "height": 4, + "layouts": { + "LAYOUT": { + "layout": [ + {"x": 0, "y": 0, "w": 4, "h": 4} + ] + } + } +} From 7baeaae9bb92b9501d4bb73149bbed28ad25446b Mon Sep 17 00:00:00 2001 From: Xelus22 <17491233+Xelus22@users.noreply.github.com> Date: Sun, 28 Jun 2020 11:04:47 +0000 Subject: [PATCH 273/930] Trinity XT tkl - New Keyboard (#9483) Co-authored-by: Ryan Co-authored-by: Erovia --- .../xelus/trinityxttkl/bootloader_defs.h | 7 + keyboards/xelus/trinityxttkl/chconf.h | 714 ++++++++++++++++++ keyboards/xelus/trinityxttkl/config.h | 45 ++ keyboards/xelus/trinityxttkl/halconf.h | 525 +++++++++++++ .../trinityxttkl/keymaps/default/keymap.c | 19 + .../xelus/trinityxttkl/keymaps/via/config.h | 2 + .../xelus/trinityxttkl/keymaps/via/keymap.c | 28 + .../xelus/trinityxttkl/keymaps/via/rules.mk | 1 + keyboards/xelus/trinityxttkl/mcuconf.h | 176 +++++ keyboards/xelus/trinityxttkl/readme.md | 12 + keyboards/xelus/trinityxttkl/rules.mk | 20 + keyboards/xelus/trinityxttkl/trinityxttkl.c | 1 + keyboards/xelus/trinityxttkl/trinityxttkl.h | 21 + 13 files changed, 1571 insertions(+) create mode 100644 keyboards/xelus/trinityxttkl/bootloader_defs.h create mode 100644 keyboards/xelus/trinityxttkl/chconf.h create mode 100644 keyboards/xelus/trinityxttkl/config.h create mode 100644 keyboards/xelus/trinityxttkl/halconf.h create mode 100644 keyboards/xelus/trinityxttkl/keymaps/default/keymap.c create mode 100644 keyboards/xelus/trinityxttkl/keymaps/via/config.h create mode 100644 keyboards/xelus/trinityxttkl/keymaps/via/keymap.c create mode 100644 keyboards/xelus/trinityxttkl/keymaps/via/rules.mk create mode 100644 keyboards/xelus/trinityxttkl/mcuconf.h create mode 100644 keyboards/xelus/trinityxttkl/readme.md create mode 100644 keyboards/xelus/trinityxttkl/rules.mk create mode 100644 keyboards/xelus/trinityxttkl/trinityxttkl.c create mode 100644 keyboards/xelus/trinityxttkl/trinityxttkl.h diff --git a/keyboards/xelus/trinityxttkl/bootloader_defs.h b/keyboards/xelus/trinityxttkl/bootloader_defs.h new file mode 100644 index 000000000000..02c48c4e6dcb --- /dev/null +++ b/keyboards/xelus/trinityxttkl/bootloader_defs.h @@ -0,0 +1,7 @@ +/* Address for jumping to bootloader on STM32 chips. */ +/* 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 + */ +#define STM32_BOOTLOADER_ADDRESS 0x1FFFC800 diff --git a/keyboards/xelus/trinityxttkl/chconf.h b/keyboards/xelus/trinityxttkl/chconf.h new file mode 100644 index 000000000000..03f63da36a88 --- /dev/null +++ b/keyboards/xelus/trinityxttkl/chconf.h @@ -0,0 +1,714 @@ +/* + 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. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +/** + * @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. + * + * @addtogroup config + * @details Kernel related settings and hooks. + * @{ + */ + +#ifndef CHCONF_H +#define CHCONF_H + +#define _CHIBIOS_RT_CONF_ +#define _CHIBIOS_RT_CONF_VER_6_0_ + +/*===========================================================================*/ +/** + * @name System timers settings + * @{ + */ +/*===========================================================================*/ + +/** + * @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. + * @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. + */ +#if !defined(CH_CFG_ST_TIMEDELTA) +#define CH_CFG_ST_TIMEDELTA 2 +#endif + +/** @} */ + +/*===========================================================================*/ +/** + * @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. + */ +#if !defined(CH_CFG_TIME_QUANTUM) +#define CH_CFG_TIME_QUANTUM 0 +#endif + +/** + * @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. + */ +#if !defined(CH_CFG_MEMCORE_SIZE) +#define CH_CFG_MEMCORE_SIZE 0 +#endif + +/** + * @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. + */ +#if !defined(CH_CFG_NO_IDLE_THREAD) +#define CH_CFG_NO_IDLE_THREAD FALSE +#endif + +/** @} */ + +/*===========================================================================*/ +/** + * @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. + */ +#if !defined(CH_CFG_OPTIMIZE_SPEED) +#define CH_CFG_OPTIMIZE_SPEED FALSE +#endif + +/** @} */ + +/*===========================================================================*/ +/** + * @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. + */ +#if !defined(CH_CFG_USE_TM) +#define CH_CFG_USE_TM FALSE +#endif + +/** + * @brief Threads registry APIs. + * @details If enabled then the registry APIs are included in the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_REGISTRY) +#define CH_CFG_USE_REGISTRY TRUE +#endif + +/** + * @brief Threads synchronization APIs. + * @details If enabled then the @p chThdWait() function is included in + * the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_WAITEXIT) +#define CH_CFG_USE_WAITEXIT TRUE +#endif + +/** + * @brief Semaphores APIs. + * @details If enabled then the Semaphores APIs are included in the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_SEMAPHORES) +#define CH_CFG_USE_SEMAPHORES TRUE +#endif + +/** + * @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. + */ +#if !defined(CH_CFG_USE_SEMAPHORES_PRIORITY) +#define CH_CFG_USE_SEMAPHORES_PRIORITY FALSE +#endif + +/** + * @brief Mutexes APIs. + * @details If enabled then the mutexes APIs are included in the kernel. + * + * @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. + * @note Recursive mutexes are heavier and have an increased + * memory footprint. + * + * @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. + * @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. + */ +#if !defined(CH_CFG_USE_CONDVARS) +#define CH_CFG_USE_CONDVARS TRUE +#endif + +/** + * @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. + */ +#if !defined(CH_CFG_USE_CONDVARS_TIMEOUT) +#define CH_CFG_USE_CONDVARS_TIMEOUT FALSE +#endif + +/** + * @brief Events Flags APIs. + * @details If enabled then the event flags APIs are included in the kernel. + * + * @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. + * @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. + */ +#if !defined(CH_CFG_USE_EVENTS_TIMEOUT) +#define CH_CFG_USE_EVENTS_TIMEOUT TRUE +#endif + +/** + * @brief Synchronous Messages APIs. + * @details If enabled then the synchronous messages APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_MESSAGES) +#define CH_CFG_USE_MESSAGES TRUE +#endif + +/** + * @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. + */ +#if !defined(CH_CFG_USE_MESSAGES_PRIORITY) +#define CH_CFG_USE_MESSAGES_PRIORITY FALSE +#endif + +/** + * @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. + */ +#if !defined(CH_CFG_USE_MAILBOXES) +#define CH_CFG_USE_MAILBOXES TRUE +#endif + +/** + * @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. + */ +#if !defined(CH_CFG_USE_MEMCORE) +#define CH_CFG_USE_MEMCORE TRUE +#endif + +/** + * @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. + */ +#if !defined(CH_CFG_USE_HEAP) +#define CH_CFG_USE_HEAP FALSE +#endif + +/** + * @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. + */ +#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. + * @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. + */ +#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 + +/** @} */ + +/*===========================================================================*/ +/** + * @name Debug options + * @{ + */ +/*===========================================================================*/ + +/** + * @brief Debug option, kernel statistics. + * + * @note The default is @p FALSE. + */ +#if !defined(CH_DBG_STATISTICS) +#define CH_DBG_STATISTICS FALSE +#endif + +/** + * @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. + */ +#if !defined(CH_DBG_SYSTEM_STATE_CHECK) +#define CH_DBG_SYSTEM_STATE_CHECK FALSE +#endif + +/** + * @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. + */ +#if !defined(CH_DBG_ENABLE_CHECKS) +#define CH_DBG_ENABLE_CHECKS FALSE +#endif + +/** + * @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. + */ +#if !defined(CH_DBG_ENABLE_ASSERTS) +#define CH_DBG_ENABLE_ASSERTS FALSE +#endif + +/** + * @brief Debug option, trace buffer. + * @details If enabled then the trace buffer is activated. + * + * @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. + * @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. + */ +#if !defined(CH_DBG_ENABLE_STACK_CHECK) +#define CH_DBG_ENABLE_STACK_CHECK FALSE +#endif + +/** + * @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. + */ +#if !defined(CH_DBG_FILL_THREADS) +#define CH_DBG_FILL_THREADS FALSE +#endif + +/** + * @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. + */ +#if !defined(CH_DBG_THREADS_PROFILING) +#define CH_DBG_THREADS_PROFILING FALSE +#endif + +/** @} */ + +/*===========================================================================*/ +/** + * @name Kernel hooks + * @{ + */ +/*===========================================================================*/ + +/** + * @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. + */ +#define CH_CFG_THREAD_EXTRA_FIELDS \ + /* Add threads custom fields here.*/ + +/** + * @brief Threads initialization hook. + * @details User initialization code added to the @p _thread_init() function. + * + * @note It is invoked from within @p _thread_init() 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/xelus/trinityxttkl/config.h b/keyboards/xelus/trinityxttkl/config.h new file mode 100644 index 000000000000..2bd64929a1d0 --- /dev/null +++ b/keyboards/xelus/trinityxttkl/config.h @@ -0,0 +1,45 @@ +/* +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 0x5845 // XE +#define PRODUCT_ID 0x5854 // XT +#define DEVICE_VER 0x0001 +#define MANUFACTURER Xelus +#define PRODUCT TrinityXTtkl +#define DESCRIPTION TrinityXTtkl + +/* key matrix size */ +#define MATRIX_ROWS 6 +#define MATRIX_COLS 19 + +#define MATRIX_COL_PINS { A9, A8, B15, B14, B13, B12, B11, B10, B2, B1, B0, A7, A6, A5, A4, A3, A10, B9, B4 } +#define MATRIX_ROW_PINS { A14, A15, B3, A2, B6, B5 } +#define DIODE_DIRECTION COL2ROW + +/* 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 diff --git a/keyboards/xelus/trinityxttkl/halconf.h b/keyboards/xelus/trinityxttkl/halconf.h new file mode 100644 index 000000000000..16f32117d51b --- /dev/null +++ b/keyboards/xelus/trinityxttkl/halconf.h @@ -0,0 +1,525 @@ +/* + 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. + 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 + +#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 +#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 cryptographic subsystem. + */ +#if !defined(HAL_USE_CRY) || defined(__DOXYGEN__) +#define HAL_USE_CRY FALSE +#endif + +/** + * @brief Enables the DAC subsystem. + */ +#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 +#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 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 +#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 +#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 + +/** + * @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. */ +/*===========================================================================*/ + +/** + * @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 + +/** + * @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. */ +/*===========================================================================*/ + +/** + * @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 the zero-copy API. + */ +#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 + +/** + * @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. */ +/*===========================================================================*/ + +/** + * @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 16 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 256 bytes for both the transmission and receive + * buffers. + */ +#if !defined(SERIAL_USB_BUFFERS_SIZE) || defined(__DOXYGEN__) +#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 + +/*===========================================================================*/ +/* 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 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 +#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. */ +/*===========================================================================*/ + +/** + * @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 + +/*===========================================================================*/ +/* 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/xelus/trinityxttkl/keymaps/default/keymap.c b/keyboards/xelus/trinityxttkl/keymaps/default/keymap.c new file mode 100644 index 000000000000..5336e3a47358 --- /dev/null +++ b/keyboards/xelus/trinityxttkl/keymaps/default/keymap.c @@ -0,0 +1,19 @@ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_all( + KC_F13, KC_F14, 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_F15, KC_F16, 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_F17, KC_F18, KC_TAB, KC_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_F19, KC_F20, 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_F21, KC_F22, 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_UP, + KC_F23, KC_F24, KC_LCTL, KC_LALT, KC_SPC, KC_SPC, KC_SPC, KC_RALT, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT), + + [1] = LAYOUT_all( + RESET , 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, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + 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/trinityxttkl/keymaps/via/config.h b/keyboards/xelus/trinityxttkl/keymaps/via/config.h new file mode 100644 index 000000000000..96c85573df1e --- /dev/null +++ b/keyboards/xelus/trinityxttkl/keymaps/via/config.h @@ -0,0 +1,2 @@ +// 3 layers or else it will not fit in EEPROM +#define DYNAMIC_KEYMAP_LAYER_COUNT 3 diff --git a/keyboards/xelus/trinityxttkl/keymaps/via/keymap.c b/keyboards/xelus/trinityxttkl/keymaps/via/keymap.c new file mode 100644 index 000000000000..e1c3d660b0ad --- /dev/null +++ b/keyboards/xelus/trinityxttkl/keymaps/via/keymap.c @@ -0,0 +1,28 @@ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_all( + KC_F13, KC_F14, 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_F15, KC_F16, 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_F17, KC_F18, KC_TAB, KC_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_F19, KC_F20, 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_F21, KC_F22, 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_UP, + KC_F23, KC_F24, KC_LCTL, 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, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + 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, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), + +}; diff --git a/keyboards/xelus/trinityxttkl/keymaps/via/rules.mk b/keyboards/xelus/trinityxttkl/keymaps/via/rules.mk new file mode 100644 index 000000000000..1e5b99807cb7 --- /dev/null +++ b/keyboards/xelus/trinityxttkl/keymaps/via/rules.mk @@ -0,0 +1 @@ +VIA_ENABLE = yes diff --git a/keyboards/xelus/trinityxttkl/mcuconf.h b/keyboards/xelus/trinityxttkl/mcuconf.h new file mode 100644 index 000000000000..0e49478c8b05 --- /dev/null +++ b/keyboards/xelus/trinityxttkl/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 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_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/xelus/trinityxttkl/readme.md b/keyboards/xelus/trinityxttkl/readme.md new file mode 100644 index 000000000000..a6e80b0cc1f6 --- /dev/null +++ b/keyboards/xelus/trinityxttkl/readme.md @@ -0,0 +1,12 @@ +# Trinity XT TKL + +Trinity XT TKL Keyboard designed by [Reconsiderit](https://switchplate.co/). + +* Keyboard Maintainer: [Xelus22](https://github.com/Xelus22) +* Hardware Supported: STM32F072CBT6 + +Make example for this keyboard (after setting up your build environment): + + make xelus/trinityxttkl: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/xelus/trinityxttkl/rules.mk b/keyboards/xelus/trinityxttkl/rules.mk new file mode 100644 index 000000000000..f3d0426d0083 --- /dev/null +++ b/keyboards/xelus/trinityxttkl/rules.mk @@ -0,0 +1,20 @@ +# MCU name +MCU = STM32F072 + +# 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 = no # Commands for debug and configuration +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +NKRO_ENABLE = yes # USB Nkey Rollover +BACKLIGHT_ENABLE = no +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/xelus/trinityxttkl/trinityxttkl.c b/keyboards/xelus/trinityxttkl/trinityxttkl.c new file mode 100644 index 000000000000..fbf38010a2cb --- /dev/null +++ b/keyboards/xelus/trinityxttkl/trinityxttkl.c @@ -0,0 +1 @@ +#include "trinityxttkl.h" diff --git a/keyboards/xelus/trinityxttkl/trinityxttkl.h b/keyboards/xelus/trinityxttkl/trinityxttkl.h new file mode 100644 index 000000000000..7cb7d590fd71 --- /dev/null +++ b/keyboards/xelus/trinityxttkl/trinityxttkl.h @@ -0,0 +1,21 @@ +#pragma once + +#include "quantum.h" + +#define ____ KC_NO + +#define LAYOUT_all( \ + K000, K001, K002, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, K015, K016, K017, K018, \ + K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, K115, K315, K116, K117, K118, \ + K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K214, K215, K216, K217, K218, \ + K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, K314, \ + K400, K401, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, K412, K414, K415, K417, \ + K500, K501, K502, K503, K504, K505, K511, K512, K515, K516, K517, K518 \ +) { \ + { K000, K001, K002, ____, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, K015, K016, K017, K018 }, \ + { K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, K115, K116, K117, K118 }, \ + { K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K214, K215, K216, K217, K218 }, \ + { K300, K301, 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, ____, K417, ____ }, \ + { K500, K501, K502, K503, K504, K505, ____, ____, ____, ____, ____, K511, K512, ____, ____, K515, K516, K517, K518 } \ +} From d36d5ecfad3ea32c11fbf4a251cea7e25caafc28 Mon Sep 17 00:00:00 2001 From: James Smith <37446827+Klackygears@users.noreply.github.com> Date: Sun, 28 Jun 2020 07:07:57 -0400 Subject: [PATCH 274/930] Klackygears add user and handwired brain (#9154) Co-authored-by: Ryan Co-authored-by: Erovia --- keyboards/handwired/brain/brain.c | 1 + keyboards/handwired/brain/brain.h | 28 +++ keyboards/handwired/brain/config.h | 111 +++++++++ .../handwired/brain/keymaps/default/keymap.c | 119 ++++++++++ .../brain/keymaps/klackygears/config.h | 43 ++++ .../brain/keymaps/klackygears/keymap.c | 99 ++++++++ .../brain/keymaps/klackygears/rules.mk | 3 + keyboards/handwired/brain/readme.md | 1 + keyboards/handwired/brain/rules.mk | 24 ++ users/klackygears/klackygears.c | 75 ++++++ users/klackygears/klackygears.h | 72 ++++++ users/klackygears/readme.md | 15 ++ users/klackygears/rules.mk | 6 + users/klackygears/tap_dances.c | 184 +++++++++++++++ users/klackygears/tap_dances.h | 37 +++ users/klackygears/wrappers.h | 220 ++++++++++++++++++ 16 files changed, 1038 insertions(+) create mode 100644 keyboards/handwired/brain/brain.c create mode 100644 keyboards/handwired/brain/brain.h create mode 100644 keyboards/handwired/brain/config.h create mode 100644 keyboards/handwired/brain/keymaps/default/keymap.c create mode 100644 keyboards/handwired/brain/keymaps/klackygears/config.h create mode 100644 keyboards/handwired/brain/keymaps/klackygears/keymap.c create mode 100644 keyboards/handwired/brain/keymaps/klackygears/rules.mk create mode 100644 keyboards/handwired/brain/readme.md create mode 100644 keyboards/handwired/brain/rules.mk create mode 100644 users/klackygears/klackygears.c create mode 100644 users/klackygears/klackygears.h create mode 100644 users/klackygears/readme.md create mode 100644 users/klackygears/rules.mk create mode 100644 users/klackygears/tap_dances.c create mode 100644 users/klackygears/tap_dances.h create mode 100644 users/klackygears/wrappers.h diff --git a/keyboards/handwired/brain/brain.c b/keyboards/handwired/brain/brain.c new file mode 100644 index 000000000000..2f792f04cfd9 --- /dev/null +++ b/keyboards/handwired/brain/brain.c @@ -0,0 +1 @@ +#include "brain.h" diff --git a/keyboards/handwired/brain/brain.h b/keyboards/handwired/brain/brain.h new file mode 100644 index 000000000000..a0f2ad6848d7 --- /dev/null +++ b/keyboards/handwired/brain/brain.h @@ -0,0 +1,28 @@ +#pragma once + +#include "quantum.h" + + + + + +#define LAYOUT( \ + L01, L02, L03, L04, L05, L06, R00, R01, R02, R03, R04, R05, \ + 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, \ + L31, L32, L33, L34, L35, R31, R32, R33, R34, R35, \ + L43, L44, L45, R41, R42, R43 \ + ) \ + { \ + { KC_NO, L01, L02, L03, L04, L05, L06}, \ + { L10, L11, L12, L13, L14, L15, L16}, \ + { L20, L21, L22, L23, L24, L25, L26}, \ + { KC_NO, L31, L32, L33, L34, L35, KC_NO}, \ + { KC_NO, KC_NO, KC_NO, L43, L44, L45, KC_NO}, \ +\ + { R00, R01, R02, R03, R04, R05, KC_NO }, \ + { R10, R11, R12, R13, R14, R15, R16 }, \ + { R20, R21, R22, R23, R24, R25, R26 }, \ + { KC_NO, R31, R32, R33, R34, R35, KC_NO }, \ + { KC_NO, R41, R42, R43, KC_NO, KC_NO, KC_NO }, \ +} diff --git a/keyboards/handwired/brain/config.h b/keyboards/handwired/brain/config.h new file mode 100644 index 000000000000..3779cfb9c179 --- /dev/null +++ b/keyboards/handwired/brain/config.h @@ -0,0 +1,111 @@ +/* +Copyright 2012 Jun Wako +Copyright 2015 Jack Humbert +Copyright 2020 James Smith @klackygears + + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License 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 0x4A53 +#define PRODUCT_ID 0x0001 +#define DEVICE_VER 0x0001 +#define MANUFACTURER klackygears +#define PRODUCT Brain +#define DESCRIPTION A split ergonomic keyboard with sculpted shell + +#define SPLIT_USB_DETECT + +/* key matrix size */ +// Rows are doubled-up +#define MATRIX_ROWS 10 +#define MATRIX_COLS 7 + +// wiring of each half + +#define MATRIX_COL_PINS \ + { D1, D4, C6, D7, E6, B4, B5 } +#define MATRIX_ROW_PINS \ + { F4, F5, F6, F7, B1 } + +#define MATRIX_COL_PINS_RIGHT \ + { B5, B4, E6, D7, C6, D4, D1 } + +#define DIODE_DIRECTION COL2ROW + +/* mouse config */ +#define MOUSEKEY_INTERVAL 20 +#define MOUSEKEY_DELAY 0 +#define MOUSEKEY_TIME_TO_MAX 60 +#define MOUSEKEY_MAX_SPEED 7 +#define MOUSEKEY_WHEEL_DELAY 0 + +/* Set 0 if debouncing isn't needed */ + + +/* serial.c configuration for split keyboard */ +#define SOFT_SERIAL_PIN D0 +#define EE_HANDS + +//#define SPLIT_HAND_PIN B7 + +/* 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 + +/* Enables This makes it easier for fast typists to use dual-function keys */ +#define PERMISSIVE_HOLD + +/* ws2812 RGB LED */ +#define RGB_DI_PIN D3 + +#define RGBLED_NUM 28 // Number of LEDs + + +#define RGBLIGHT_LIMIT_VAL 120 + +#define RGBLIGHT_SPLIT + +/* + * 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 PREVENT_STUCK_MODIFIERS +//#define TAPPING_TERM 150 +//#define IGNORE_MOD_TAP_INTERRUPT +//#define TAPPING_FORCE_HOLD + +#define BOOTMAGIC_LITE_ROW 0 +#define BOOTMAGIC_LITE_COLUMN 6 +#define BOOTMAGIC_LITE_ROW_RIGHT 5 +#define BOOTMAGIC_LITE_COLUMN_RIGHT 0 diff --git a/keyboards/handwired/brain/keymaps/default/keymap.c b/keyboards/handwired/brain/keymaps/default/keymap.c new file mode 100644 index 000000000000..a3f750542b87 --- /dev/null +++ b/keyboards/handwired/brain/keymaps/default/keymap.c @@ -0,0 +1,119 @@ +#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 { + _QWERTY, + _LOWER, + _RAISE, + _ADJUST +}; + +enum custom_keycodes { + LOWER = SAFE_RANGE, + RAISE, + ADJUST, +}; + + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + +[_QWERTY] = LAYOUT( + // |------------------------------------------. ,---------------------------------------------, + KC_Q, KC_W, KC_E, KC_R, KC_T, KC_NO, KC_NO, KC_Y, KC_U, KC_I, KC_O, KC_P, + //|------+------+------+------+------+------+-------| |------+------+------+-------+--------+-------+--------, + KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_NO, KC_NO, 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_NO, KC_NO, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ESC, + //|------+------+------+------+------+------+-------| |------+------+------+-------+-------+--------+--------| + KC_NO, KC_NO, KC_NO, LOWER, KC_SPC, KC_ENT, RAISE, KC_NO, KC_NO, KC_NO, + //|------+------| //|-------+------+-------| |------+------+------| |-------+--------| + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO + //`----------------------' `--------------------' + + ), + +[_LOWER] = LAYOUT( + // |-----------------------------------------------. ,--------------------------------------------------------, + KC_1, KC_2, KC_3, KC_3, KC_4, KC_ESC, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, + //|------+------+------+--------+-------+------+---------| |--------+--------+--------+---------+---------+---------+--------, + KC_LCTL, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT, KC_NO, KC_BSPC, + //|------+------+------+--------+-------+------+---------| |--------+--------+--------+---------+---------+---------+--------, + 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_LGUI, LOWER, KC_SPC, KC_ENT, RAISE, KC_RALT, KC_NO, KC_NO, + //|------+------| //|------+------+----------| |--------+------+----------| |---------+---------| + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO + //`------------------------' `--------------------------' + ), + +[_RAISE] = LAYOUT( + // |------------------------------------------------. ,-----------------------------------------------------, + KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_ESC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSPC, + //|------+------+------+--------+-------+------+---------| |--------+--------+--------+--------+--------+--------+--------, + KC_LCTL, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_MINS, KC_EQL, KC_LCBR, KC_RCBR, KC_PIPE, KC_GRV, + //|------+------+------+--------+-------+------+---------| |--------+--------+--------+--------+--------+--------+--------, + KC_LSFT, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_UNDS, KC_PLUS, KC_LBRC, KC_RBRC, KC_BSLS, KC_TILD, + //|------+------+------+---+----+-------+------+---------| |--------+--------+--------+--------+--------+--------+--------| + KC_NO, KC_NO, KC_LGUI, LOWER, KC_SPC, KC_ENT, RAISE, KC_RALT, KC_NO, KC_NO, + //|------+------| //|------+------+----------| |--------+------+----------| |--------+--------| + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO + //`------------------------' `--------------------------' + ), + + +[_ADJUST] = 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_LCTL, KC_NO, KC_NO, KC_NO, KC_NO, 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_LGUI, LOWER, KC_SPC, KC_ENT, RAISE, KC_RALT, 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) { + 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; + 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; + } + return true; +} diff --git a/keyboards/handwired/brain/keymaps/klackygears/config.h b/keyboards/handwired/brain/keymaps/klackygears/config.h new file mode 100644 index 000000000000..4dd99c8b3a23 --- /dev/null +++ b/keyboards/handwired/brain/keymaps/klackygears/config.h @@ -0,0 +1,43 @@ +/* +Copyright 2020 James Smith + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License 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 PERMISSIVE_HOLD +#define TAPPING_TERM 150 +#define IGNORE_MOD_TAP_INTERRUPT + +#define RGBLIGHT_EFFECT_BREATHING +#define RGBLIGHT_EFFECT_RAINBOW_MOOD +#define RGBLIGHT_EFFECT_RAINBOW_SWIRL +#undef RGBLIGHT_RAINBOW_SWIRL_RANGE +#define RGBLIGHT_RAINBOW_SWIRL_RANGE 75 +#define RGBLIGHT_EFFECT_SNAKE +#undef RGBLIGHT_EFFECT_SNAKE_LENGTH +#define RGBLIGHT_EFFECT_SNAKE_LENGTH 20 +#define RGBLIGHT_EFFECT_KNIGHT +#undef RGBLIGHT_EFFECT_KNIGHT_LENGTH +#define RGBLIGHT_EFFECT_KNIGHT_LENGTH 20 + +// #define RGBLIGHT_EFFECT_CHRISTMAS +// #define RGBLIGHT_EFFECT_STATIC_GRADIENT +// #define RGBLIGHT_EFFECT_RGB_TEST +// #define RGBLIGHT_EFFECT_ALTERNATING +#define RGBLIGHT_EFFECT_TWINKLE +#define RGBLIGHT_EFFECT_TWINKLE_PROBABILITY 1 / 127 diff --git a/keyboards/handwired/brain/keymaps/klackygears/keymap.c b/keyboards/handwired/brain/keymaps/klackygears/keymap.c new file mode 100644 index 000000000000..07185446db69 --- /dev/null +++ b/keyboards/handwired/brain/keymaps/klackygears/keymap.c @@ -0,0 +1,99 @@ +#include QMK_KEYBOARD_H +#include "klackygears.h" + +//For an explanation of what's going on here with the keymap wrappers, check out drashna's user folder. + + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [_WINBASE] = LAYOUT_wrapper( + _______________DVORAK_L1___________________, KC_ESC, KC_GAMER, _______________DVORAK_R1___________________, + RGB_TOG, _______________DVORAK_L2___________________, _______, KC_GAMR1, _______________DVORAK_R2___________________, RGB_TOG, + RGB_MOD, _______________WINDVK_L3___________________, _______, KC_GAMR2, _______________WINDVK_R3___________________, RGB_MOD, + _______, _______, __________________WIN_THUMB_CLUSTER_V2______________ , _______, _______, + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO + ), + + [_MACBASE] = LAYOUT_wrapper( + _______________DVORAK_L1___________________, KC_ESC, _______, _______________DVORAK_R1___________________, + RGB_TOG, _______________DVORAK_L2___________________, _______, _______, _______________DVORAK_R2___________________, RGB_TOG, + RGB_MOD, _______________MACDVK_L3___________________, _______, _______, _______________MACDVK_R3___________________, RGB_MOD, + _______, _______, __________________MAC_THUMB_CLUSTER_V2______________ , _______, _______, + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO + ), + + + [_QWERTY] = LAYOUT_wrapper( + _________________QWERTY_L1_________________, KC_ESC, _______, _________________QWERTY_R1_________________, + KC_CAPS, _________________QWERTY_L2_________________, _______, _______, _________________QWERTY_R2_________________, KC_ENT, + KC_LSFT, _________________QWERTY_L3_________________, _______, _______, _________________QWERTY_R3_________________, KC_RSFT, + KC_LCTL, KC_LALT, KC_LGUI, MO(_MNMB), MO(_SYMB), MO(_SYMB), MO(_MNMB), KC_RGUI, MO(_MDIA), MO(_FUNC), + KC_LSFT, KC_SPC, KC_SPC, KC_SPC, KC_SPC, KC_RSFT + ), + //Jedi - Fallen Order + [_GAMER] = LAYOUT_wrapper( + KC_R, KC_Q, KC_W, KC_E, KC_1, KC_ESC, KC_WINBASE, _________________RGB_1_____________________, + KC_TAB, KC_F, KC_A, KC_S, KC_D, KC_2, LSFT(KC_F2), KC_GAMR1, _________________RGB_2_____________________, RGB_TOG, + KC_TAB, KC_TAB, KC_X, KC_Z, KC_C, KC_3, KC_M, KC_GAMR2, _________________MEDIA_____________________, RGB_MOD, + KC_LCTL, KC_LALT, KC_LCTL, KC_LSFT, KC_SPC, _______, KC_UP, _______, _______, _______, + KC_NO, KC_LSFT, KC_LSFT, KC_LEFT, KC_DOWN, KC_RIGHT + ), + //Borderlands + [_GAMR1] = LAYOUT_wrapper( + KC_R, KC_G, KC_W, KC_E, KC_1, KC_ESC, KC_WINBASE, _________________RGB_1_____________________, + KC_TAB, KC_V, KC_A, KC_S, KC_D, KC_2, KC_L, KC_GAMR1, _________________RGB_2_____________________, RGB_TOG, + KC_T, KC_I, KC_F, KC_Q, KC_4, KC_3, KC_M, KC_GAMR2, _________________MEDIA_____________________, RGB_MOD, + KC_X, KC_K, KC_C, KC_LSFT, KC_SPC, _______, KC_UP, _______, _______, _______, + KC_Z, KC_LSFT, KC_LSFT, KC_LEFT, KC_DOWN, KC_RIGHT + ), + //Witcher + [_GAMR2] = LAYOUT_wrapper( + KC_R, KC_Q, KC_W, KC_E, KC_1, KC_ESC, KC_WINBASE, _________________RGB_1_____________________, + KC_TAB, KC_LALT, KC_A, KC_S, KC_D, KC_2, KC_J, KC_GAMR1, _________________RGB_2_____________________, RGB_TOG, + KC_X, KC_I, KC_F, KC_C, KC_V, KC_3, KC_M, KC_GAMR2, _________________MEDIA_____________________, RGB_MOD, + KC_LCTL, KC_V, KC_HOME, KC_LSFT, KC_SPC, _______, KC_UP, _______, _______, _______, + KC_ENT, KC_LCTL, KC_LSFT, KC_LEFT, KC_DOWN, KC_RIGHT + ), + + [_SYMB] = LAYOUT_wrapper( + _________________PUNC_L1_ALT_______________, _______, _______, _________________PUNC_R1___________________, + _______, _________________PUNC_L3___________________, _______, _______, _________________PUNC_R2___________________, _______, + RGB_MOD, _________________PUNC_L3_ALT_______________, _______, _______, _________________PUNC_R3___________________, _______, + _______, _______, _______, _______, KC_DEL, KC_CAPS, _______, _______, _______, _______, + _______, _______, KC_DEL, KC_CAPS, _______, _______ + ), + + [_FUNC] = LAYOUT_wrapper( + _____________FUNC_L1_______________________, _______, _______, _______, _____________FUNC_1_______________, + _______, ________MAC_MISSION_CTRL__________, LGUI(KC_L), _______, _______, _______, _____________FUNC_2_______________, _______, + RGB_MOD, _____________FUNC_L3_______________________, _______, _______, _______, _____________FUNC_3_______________, _______, + _______, _______, _______, _______, _______, KC_CAPS, _______, _______, _______, _______, + _______, _______, _______, KC_CAPS, _______, _______ + ), + + [_MNMB] = LAYOUT_wrapper( + _________________MACNAV_L1_________________, _______, _______, _________________NUMB_R1___________________, + _______, _________________MACNAV_L2_________________, _______, _______, _________________NUMB_R2___________________, _______, + RGB_MOD, _________________MACNAV_L3_________________, _______, _______, _________________NUMB_R3_MAC_______________, _______, + _______, _______, _______, _______, _______, _______, RSFT_T(KC_ENT), KC_RSFT, _______, _______, + _______, _______, _______, _______, RSFT_T(KC_ENT), KC_RSFT + ), + + + [_NUMB] = LAYOUT_wrapper( + _________________WINNAV_L1_________________, _______, _______, _________________NUMB_R1___________________, + _______, _________________WINNAV_L2_________________, _______, _______, _________________NUMB_R2___________________, _______, + RGB_MOD, _________________WINNAV_L3_________________, _______, _______, _________________NUMB_R3_WIN_______________, _______, + _______, _______, _______, _______, _______, _______, RSFT_T(KC_ENT), KC_RSFT, _______, _______, + _______, _______, _______, _______, RSFT_T(KC_ENT), KC_RSFT + ), + + [_MDIA] = LAYOUT_wrapper( + _________________LYOUT_____________________, _______, RGB_TOG, _________________RGB_1_____________________, + _______, _________________KC_BLANK__________________, _______, _______, _________________RGB_2_____________________, _______, + RGB_MOD, _________________KC_BLANK__________________, _______, _______, _________________MEDIA_____________________, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______ + ) + + }; diff --git a/keyboards/handwired/brain/keymaps/klackygears/rules.mk b/keyboards/handwired/brain/keymaps/klackygears/rules.mk new file mode 100644 index 000000000000..26c9daf6ad33 --- /dev/null +++ b/keyboards/handwired/brain/keymaps/klackygears/rules.mk @@ -0,0 +1,3 @@ + +RGBLIGHT_ENABLE = yes #Enable WS2812 RGB underlight. +TAP_DANCE_ENABLE = yes diff --git a/keyboards/handwired/brain/readme.md b/keyboards/handwired/brain/readme.md new file mode 100644 index 000000000000..4a5ad4b94d1c --- /dev/null +++ b/keyboards/handwired/brain/readme.md @@ -0,0 +1 @@ +#The Brain is a tented ergo split handwired keyboard with a sculped shell that can be changed out for other options. diff --git a/keyboards/handwired/brain/rules.mk b/keyboards/handwired/brain/rules.mk new file mode 100644 index 000000000000..2c24d019b447 --- /dev/null +++ b/keyboards/handwired/brain/rules.mk @@ -0,0 +1,24 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +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 +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 +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 + +SPLIT_KEYBOARD = yes diff --git a/users/klackygears/klackygears.c b/users/klackygears/klackygears.c new file mode 100644 index 000000000000..2e7533eb160c --- /dev/null +++ b/users/klackygears/klackygears.c @@ -0,0 +1,75 @@ +#include "klackygears.h" + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + /* + if (!process_record_dynamic_macro(keycode, record)) { + return false; + } + */ + switch (keycode) { + case KC_MACBASE: + if (record->event.pressed) { + set_single_persistent_default_layer(_MACBASE); + } + break; + + case KC_QWERTY: + if (record->event.pressed) { + set_single_persistent_default_layer(_QWERTY); + } + break; + + case KC_WINBASE: + if (record->event.pressed) { + set_single_persistent_default_layer(_WINBASE); + } + break; + + case KC_GAMER: + if (record->event.pressed) { + set_single_persistent_default_layer(_GAMER); + } + break; + + case KC_GAMR1: + if (record->event.pressed) { + set_single_persistent_default_layer(_GAMR1); + } + break; + + case KC_GAMR2: + if (record->event.pressed) { + set_single_persistent_default_layer(_GAMR2); + } + break; + case RGBRST: +#ifdef RGBLIGHT_ENABLE + if (record->event.pressed) { + eeconfig_update_rgblight_default(); + rgblight_enable(); + } +#endif + break; + + case MAKEK: + if (record->event.pressed) { + SEND_STRING("make " QMK_KEYBOARD ":" QMK_KEYMAP); + } + break; + + case MAKEKF: + if (!record->event.pressed) { + SEND_STRING("make " QMK_KEYBOARD ":" QMK_KEYMAP ":flash"); + } + + break; + + case SHRUG: + if (record->event.pressed) { + SEND_STRING(":Shrug:"); + } + break; + } + + return true; +} diff --git a/users/klackygears/klackygears.h b/users/klackygears/klackygears.h new file mode 100644 index 000000000000..69f3279e2f16 --- /dev/null +++ b/users/klackygears/klackygears.h @@ -0,0 +1,72 @@ +#pragma once + +#include QMK_KEYBOARD_H + +#include "wrappers.h" +#include "eeprom.h" +#ifdef TAP_DANCE_ENABLE + #include "tap_dances.h" +#endif // TAP_DANCE_ENABLE + +enum layer_number { + _WINBASE = 0, + _MACBASE, + _QWERTY, + _GAMER, + _GAMR1, + _GAMR2, + _NGMR, + _NUMB, + _MNMB, + _SYMB, + _FUNC, + _MDIA, + _MEME +}; + +enum userspace_custom_keycodes { + KC_MACBASE = SAFE_RANGE, + KC_QWERTY, + KC_WINBASE, + KC_GAMER, + KC_GAMR1, + KC_GAMR2, + NUMB, + MNMB, + SYMB, + FUNC, + MDIA, + RGBRST, + MAKEK, + MAKEKF, + SHRUG, + //DYNAMIC_MACRO_RANGE, + SAFE_RANGE_KEYMAP +}; + + +/* +#ifdef UNICODEMAP_ENABLE +enum unicode_names { + BANG, + IRONY, + SNEK, +}; + +const uint32_t PROGMEM unicode_map[] = { + [BANG] = 0x203D, // ‽ + [IRONY] = 0x2E2E, // ⸮ + [SNEK] = 0x1F40D, // 🐍 +}; +#endif // UNICODEMAP_ENABLE +*/ + + +//#include "dynamic_macro.h" + + + +#if RGBLIGHT_ENABLE +uint8_t RGB_current_mode; + +#endif diff --git a/users/klackygears/readme.md b/users/klackygears/readme.md new file mode 100644 index 000000000000..d00d9a17c096 --- /dev/null +++ b/users/klackygears/readme.md @@ -0,0 +1,15 @@ +Copyright<2019> @klackygears + +This program is free software : you can redistribute it and /or modify it under +the terms of the GNU General Public License as published by the Free Software Foundation, +either version 2 of the License, or (at your option) any later version. +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . + + +Most of what I have here was copied and modified from drashna. If it looks a bit messy it's because I'm a total noob and trying to push myself to learn new things. diff --git a/users/klackygears/rules.mk b/users/klackygears/rules.mk new file mode 100644 index 000000000000..82b2233f1212 --- /dev/null +++ b/users/klackygears/rules.mk @@ -0,0 +1,6 @@ +SRC += klackygears.c + + +ifeq ($(strip $(TAP_DANCE_ENABLE)), yes) + SRC += tap_dances.c +endif \ No newline at end of file diff --git a/users/klackygears/tap_dances.c b/users/klackygears/tap_dances.c new file mode 100644 index 000000000000..af4f187fccdc --- /dev/null +++ b/users/klackygears/tap_dances.c @@ -0,0 +1,184 @@ +#include "tap_dances.h" + +/* +void macroTogKey(qk_tap_dance_state_t *state, void *user_data) { + keyrecord_t kr; + + if (state->count == 1) + { + kr.event.pressed = false; + process_record_dynamic_macro( DYN_MACRO_PLAY1, &kr ); + } + else if (state->count == 2) + { + kr.event.pressed = true; + process_record_dynamic_macro( DYN_REC_STOP, &kr ); + } + else if (state->count == 3) + { + kr.event.pressed = false; + process_record_dynamic_macro( DYN_REC_START1, &kr ); + } +} + +void macroTogKey2(qk_tap_dance_state_t *state, void *user_data) { + keyrecord_t kr; + + if (state->count == 1) + { + kr.event.pressed = false; + process_record_dynamic_macro( DYN_MACRO_PLAY2, &kr ); + } + else if (state->count == 2) + { + kr.event.pressed = true; + process_record_dynamic_macro( DYN_REC_STOP, &kr ); + } + else if (state->count == 3) + { + kr.event.pressed = false; + process_record_dynamic_macro( DYN_REC_START2, &kr ); + } +} +*/ + +void pstinsrt(qk_tap_dance_state_t *state, void *user_data) { + if (state->count > 1) { + register_code(KC_LALT); + tap_code(KC_I); + tap_code(KC_E); + unregister_code(KC_LALT); + } else { + tap_code16(C(KC_V)); + } + reset_tap_dance(state); +} + +void ccopy(qk_tap_dance_state_t *state, void *user_data) { + if (state->count > 1) { + tap_code16(C(KC_X)); + + // SEND_STRING( SS_DOWN(KC_LCTL) SS_TAP(KC_X) SS_UP(KC_LCTL)); + } else { + tap_code16(C(KC_C)); + } + reset_tap_dance(state); +} + +void pstspecial(qk_tap_dance_state_t *state, void *user_data) { + if (state->count > 1) { + register_code(KC_LALT); + tap_code(KC_E); + tap_code(KC_S); + unregister_code(KC_LALT); + tap_code(KC_V); + } else { + register_code(KC_LALT); + tap_code(KC_E); + tap_code(KC_S); + unregister_code(KC_LALT); + tap_code(KC_T); + } + reset_tap_dance(state); +} + +void deldel(qk_tap_dance_state_t *state, void *user_data) { + if (state->count > 1) { + register_code(KC_LALT); + tap_code(KC_E); + tap_code(KC_D); + unregister_code(KC_LALT); + } else { + tap_code(KC_DEL); + } + reset_tap_dance(state); +} + +void findreplace(qk_tap_dance_state_t *state, void *user_data) { + if (state->count > 1) { + tap_code16(C(KC_H)); + } else { + tap_code16(C(KC_F)); + } + reset_tap_dance(state); +} + +void cyclawin(qk_tap_dance_state_t *state, void *user_data) { + if (state->count > 1) { + tap_code16(C(S(KC_F6))); + } else { + tap_code16(C(KC_F6)); + } + reset_tap_dance(state); +} + +void SCRNSNP(qk_tap_dance_state_t *state, void *user_data) { + if (state->count > 1) { + tap_code16(A(KC_PSCR)); + } else { + tap_code(KC_LGUI); + tap_code(KC_S); + tap_code(KC_N); + tap_code16(C(KC_N)); + } + reset_tap_dance(state); +} + +void mcccpy(qk_tap_dance_state_t *state, void *user_data) { + if (state->count > 1) { + tap_code16(G(KC_X)); + } else { + tap_code16(G(KC_C)); + } + reset_tap_dance(state); +} + +void mcpstin(qk_tap_dance_state_t *state, void *user_data) { + if (state->count > 1) { + tap_code16(G(KC_I)); + } else { + tap_code16(G(KC_V)); + } + reset_tap_dance(state); +} + +void enttab(qk_tap_dance_state_t *state, void *user_data) { + if (state->count > 1) { + tap_code(KC_ENT); + } else { + tap_code(KC_TAB); + } + reset_tap_dance(state); +} + +void rgb_toggle(qk_tap_dance_state_t *state, void *user_data) { +#ifdef RGBLIGHT_ENABLE + if (state->count == 1) { + rgblight_step(); + } else { + rgblight_increase_hue(); + } +#endif +} + +// Tap Dance Definitions +qk_tap_dance_action_t tap_dance_actions[] = { + [TD_PSTI] = ACTION_TAP_DANCE_FN(pstinsrt), + [TD_PTSP] = ACTION_TAP_DANCE_FN(pstspecial), + [TD_FNDR] = ACTION_TAP_DANCE_FN(findreplace), + [TD_CCPY] = ACTION_TAP_DANCE_FN(ccopy), + [TD_DDEL] = ACTION_TAP_DANCE_FN(deldel), + [TD_ACCW] = ACTION_TAP_DANCE_FN(cyclawin), + [TD_CAPESC] = ACTION_TAP_DANCE_DOUBLE(KC_ESC, KC_CAPS), + [TD_DTEX] = ACTION_TAP_DANCE_DOUBLE(KC_DOT, KC_EXLM), + [TD_COMQUES] = ACTION_TAP_DANCE_DOUBLE(KC_COMM, KC_QUES), + [TD_MINPLS] = ACTION_TAP_DANCE_DOUBLE(KC_PMNS, KC_PPLS), + [TD_DIVMLT] = ACTION_TAP_DANCE_DOUBLE(KC_PSLS, KC_PAST), + [TD_DOTEQL] = ACTION_TAP_DANCE_DOUBLE(KC_DOT, KC_EQL), + [TD_SCNSP] = ACTION_TAP_DANCE_FN(SCRNSNP), + [TD_MCCCPY] = ACTION_TAP_DANCE_FN(mcccpy), + [TD_MCPSTIN] = ACTION_TAP_DANCE_FN(mcpstin), + [TD_ENTAB] = ACTION_TAP_DANCE_FN(enttab), + [TD_XSPC] = ACTION_TAP_DANCE_DOUBLE(KC_SPACE, KC_X), + [TD_RGB] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, rgb_toggle, NULL) +}; diff --git a/users/klackygears/tap_dances.h b/users/klackygears/tap_dances.h new file mode 100644 index 000000000000..66c2c48c9140 --- /dev/null +++ b/users/klackygears/tap_dances.h @@ -0,0 +1,37 @@ +#pragma once +#include "klackygears.h" + +#ifdef TAP_DANCE_ENABLE +enum { + // TD_MCROTOG, + // TD_MCROTG2, + TD_BTK, + TD_TDE, + TD_LPRN, + TD_RPRN, + TD_MIN, + TD_USC, + TD_CMWN, + TD_ATSH, + TD_PSTI, + TD_PTSP, + TD_FNDR, + TD_CCPY, + TD_DDEL, + TD_ACCW, + TD_CAPESC, + TD_DTEX, + TD_COMQUES, + TD_MINPLS, + TD_DIVMLT, + TD_DOTEQL, + TD_LSHSYM, + TD_RSHSYM, + TD_SCNSP, + TD_MCCCPY, + TD_MCPSTIN, + TD_ENTAB, + TD_XSPC, + TD_RGB, +}; +#endif diff --git a/users/klackygears/wrappers.h b/users/klackygears/wrappers.h new file mode 100644 index 000000000000..88cbae18496d --- /dev/null +++ b/users/klackygears/wrappers.h @@ -0,0 +1,220 @@ +#pragma once +#include "klackygears.h" +/* +Most of this is copied from drashna. I added and changed a few things but, it's all based off of his user folder. +*/ +#if (!defined(LAYOUT) && defined(KEYMAP)) +#define LAYOUT KEYMAP +#endif + +//Added other layout options +#define LAYOUT_ergodox_wrapper(...) LAYOUT_ergodox(__VA_ARGS__) +#define LAYOUT_ergodox_pretty_wrapper(...) LAYOUT_ergodox_pretty(__VA_ARGS__) +#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_5x10_wrapper(...) LAYOUT_ortho_5x10(__VA_ARGS__) +#define LAYOUT_ortho_5x5_wrapper(...) LAYOUT_ortho_5x5(__VA_ARGS__) + + +/* +NOTE: If you do a search/replace + then you need to add/remove underscores to keep the + lengths consistent. +*/ +//keymaps for tap dance and without +#ifdef TAP_DANCE_ENABLE + #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, TD(TD_COMQUES), TD(TD_DTEX), LT(_MDIA,KC_SLASH) + + + #define _________________COLEMAK_L1________________ KC_Q, KC_W, KC_F, KC_P, KC_G + #define _________________COLEMAK_L2________________ KC_A, KC_R, KC_S, KC_T, KC_D + #define _________________COLEMAK_L3________________ KC_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, KC_O + #define _________________COLEMAK_R3________________ KC_K, KC_M, TD(TD_COMQUES), TD(TD_DTEX), KC_SLASH +/* + #define ______________COLEMAK_MOD_DH_L1____________ KC_Q, KC_W, KC_F, KC_P, KC_B + #define ______________COLEMAK_MOD_DH_L2____________ KC_A, KC_R, KC_S, KC_T, KC_G + #define ______________COLEMAK_MOD_DH_L3____________ KC_Z, KC_X, KC_C, KC_D, KC_V + + #define ______________COLEMAK_MOD_DH_R1____________ KC_J, KC_L, KC_U, KC_Y, KC_SCLN + #define ______________COLEMAK_MOD_DH_R2____________ KC_M, KC_N, KC_E, KC_I, KC_O + #define ______________COLEMAK_MOD_DH_R3____________ KC_K, KC_H, KC_COMM, KC_DOT, KC_SLASH +*/ + + #define _______________DVORAK_L1___________________ KC_QUOT, TD(TD_COMQUES), TD(TD_DTEX), KC_P, KC_Y + #define _______________DVORAK_L2___________________ KC_A, KC_O, KC_E, KC_U, KC_I + #define _______________MACDVK_L3___________________ MT(MOD_LCTL,KC_SCLN), MT(MOD_LALT,KC_Q), MT(MOD_LGUI, KC_J), KC_K, KC_X + #define _______________WINDVK_L3___________________ MT(MOD_LGUI,KC_SCLN), MT(MOD_LALT,KC_Q), MT(MOD_LCTL, 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 _______________MACDVK_R3___________________ KC_B, KC_M, MT(MOD_LGUI,KC_W), MT(MOD_LALT,KC_V), LT(_MDIA,KC_Z) + #define _______________WINDVK_R3___________________ KC_B, KC_M, MT(MOD_LCTL,KC_W), MT(MOD_LALT,KC_V), LT(_MDIA,KC_Z) + + #define __________c39__MACDVK_L3___________________ MT(MOD_LCTL,KC_SCLN), MT(MOD_LALT,KC_Q), MT(MOD_LGUI, KC_J), LT(_SYMB,KC_K), TD(TD_XSPC) + #define __________c39__WINDVK_L3___________________ MT(MOD_LGUI,KC_SCLN), MT(MOD_LALT,KC_Q), MT(MOD_LCTL, KC_J), LT(_SYMB,KC_K), TD(TD_XSPC) + #define __________c39__MACDVK_R3___________________ LT(_MNMB,KC_B), LT(_SYMB,KC_M), MT(MOD_LGUI,KC_W), MT(MOD_LALT,KC_V), LT(_MDIA,KC_Z) + #define __________c39__WINDVK_R3___________________ LT(_NUMB,KC_B), LT(_SYMB,KC_M), MT(MOD_LCTL,KC_W), MT(MOD_LALT,KC_V), LT(_MDIA,KC_Z) +#else + + #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, LT(_MDIA,KC_SLASH) + + + #define _________________COLEMAK_L1________________ KC_Q, KC_W, KC_F, KC_P, KC_G + #define _________________COLEMAK_L2________________ KC_A, KC_R, KC_S, KC_T, KC_D + #define _________________COLEMAK_L3________________ KC_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, KC_O + #define _________________COLEMAK_R3________________ KC_K, KC_M, 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 _______________MACDVK_L3___________________ MT(MOD_LCTL,KC_SCLN), MT(MOD_LALT,KC_Q), MT(MOD_LGUI, KC_J), KC_K, KC_X + #define _______________WINDVK_L3___________________ MT(MOD_LGUI,KC_SCLN), MT(MOD_LALT,KC_Q), MT(MOD_LCTL, 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 _______________MACDVK_R3___________________ KC_B, KC_M, MT(MOD_LGUI,KC_W), MT(MOD_LALT,KC_V), LT(_MDIA,KC_Z) + #define _______________WINDVK_R3___________________ KC_B, KC_M, MT(MOD_LCTL,KC_W), MT(MOD_LALT,KC_V), LT(_MDIA,KC_Z) +#endif + +/* +#define ________________DVORAK_AU_L1_______________ KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y +#define ________________DVORAK_AU_L2_______________ KC_O, KC_A, KC_E, KC_I, KC_U +#define ________________DVORAK_AU_L3_______________ KC_SCLN, KC_Q, KC_J, KC_K, KC_X + +#define ________________DVORAK_AU_R1_______________ KC_F, KC_G, KC_C, KC_R, KC_L +#define ________________DVORAK_AU_R2_______________ KC_D, KC_H, KC_T, KC_N, KC_S +#define ________________DVORAK_AU_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, TD(TD_COMQUES), TD(TD_DTEX), KC_SLASH + + +#define _________________NORMAN_L1_________________ KC_Q, KC_W, KC_D, KC_F, KC_K +#define _________________NORMAN_L2_________________ KC_A, KC_S, KC_E, KC_T, KC_G +#define _________________NORMAN_L3_________________ KC_Z, KC_X, KC_C, KC_V, KC_B + +#define _________________NORMAN_R1_________________ KC_J, KC_U, KC_R, KC_L, KC_SCLN +#define _________________NORMAN_R2_________________ KC_Y, KC_N, KC_I, KC_O, KC_U +#define _________________NORMAN_R3_________________ KC_P, KC_M, KC_COMM, KC_DOT, KC_SLASH +*/ + +// thumb key layouts +#define ________WIN_THUMB_CLUSTER_________ LT(_SYMB,KC_SPC), LT(_NUMB,KC_BSPC), LT(_NUMB,KC_TAB), LT(_SYMB,KC_ENT) +#define ________MAC_THUMB_CLUSTER_________ LT(_SYMB,KC_SPC), LT(_MNMB,KC_BSPC), LT(_MNMB,KC_TAB), LT(_SYMB,KC_ENT) + +#define __________________WIN_THUMB_CLUSTER_V2______________ LT(_FUNC,KC_ENT), LT(_NUMB,KC_BSPC), MT(MOD_LSFT,KC_SPC), LT(_NUMB,KC_TAB), LT(_SYMB,KC_ENT), KC_RSFT +#define __________________MAC_THUMB_CLUSTER_V2______________ LT(_FUNC,KC_ENT), LT(_MNMB,KC_BSPC), MT(MOD_LSFT,KC_SPC), LT(_MNMB,KC_TAB), LT(_SYMB,KC_ENT), KC_RSFT +#define ________MAC_THUMB_L______ LT(_FUNC,KC_ENT), LT(_MNMB,KC_BSPC), MT(MOD_LSFT,KC_SPC) +#define ________MAC_THUMB_R______ LT(_MNMB,KC_TAB), LT(_SYMB,KC_ENT), LT(_MDIA,KC_ENT) +#define ________WIN_THUMB_L______ LT(_FUNC,KC_ENT), LT(_NUMB,KC_BSPC), MT(MOD_LSFT,KC_SPC) +#define ________WIN_THUMB_R______ LT(_NUMB,KC_TAB), LT(_SYMB,KC_ENT), LT(_MDIA,KC_ENT) + +// Mission Control Commands +#define ________MAC_MISSION_CTRL__________ LCTL(KC_LEFT), LCTL(KC_UP), LCTL(KC_DOWN), LCTL(KC_RGHT) + +//Number Row +#define _________________NUMBER_L__________________ KC_1, KC_2, KC_3, KC_4, KC_5 +#define _________________NUMBER_R__________________ KC_6, KC_7, KC_8, KC_9, KC_0 + +//keymaps for tap dance and without +#ifdef TAP_DANCE_ENABLE +//Arrow keys and copy-paste shortcuts for MAC OS + #define _________________MACNAV_L1_________________ KC_PGUP, KC_PGDN, KC_HOME, KC_END, _______ + #define _________________MACNAV_L2_________________ KC_LEFT, KC_UP, KC_DOWN, KC_RIGHT, _______ + #define _________________MACNAV_L3_________________ _______, LGUI(KC_A), TD(TD_MCCCPY), TD(TD_MCPSTIN), KC_DEL + +//Arrow keys and copy-paste shortcuts for Windows and Microsoft Access & Excel + #define _________________WINNAV_L1_________________ KC_PGUP, KC_PGDN, KC_HOME, KC_END, TD(TD_FNDR) + #define _________________WINNAV_L2_________________ KC_LEFT, KC_UP, KC_DOWN, KC_RIGHT, TD(TD_PTSP) + #define _________________WINNAV_L3_________________ TD(TD_ACCW), LCTL(KC_A), TD(TD_CCPY), TD(TD_PSTI), TD(TD_DDEL) + +//Numpad layout with different mod-tap keys for MAC OS and Windows + #define _________________NUMB_R1___________________ TD(TD_MINPLS), KC_7, KC_8, KC_9, KC_COLN + #define _________________NUMB_R2___________________ TD(TD_DIVMLT), KC_4, KC_5, KC_6, C_S_T(KC_COLN) + #define _________________NUMB_R3_MAC_______________ TD(TD_DOTEQL), KC_1, MT(MOD_LGUI,KC_2), MT(MOD_LALT,KC_3), MT(MOD_LCTL,KC_0) + #define _________________NUMB_R3_WIN_______________ TD(TD_DOTEQL), KC_1, MT(MOD_LCTL,KC_2), MT(MOD_LALT,KC_3), MT(MOD_LGUI,KC_0) + #define _________________NUMB_R4___________________ KC_LSFT, KC_0, KC_0, _______, _______ +#else +//Arrow keys and copy-paste shortcuts for MAC OS + #define _________________MACNAV_L1_________________ KC_PGUP, KC_PGDN, KC_HOME, KC_END, _______ + #define _________________MACNAV_L2_________________ KC_LEFT, KC_UP, KC_DOWN, KC_RIGHT, _______ + #define _________________MACNAV_L3_________________ _______, LGUI(KC_A), _______, _______, KC_DEL + +//Arrow keys and copy-paste shortcuts for Windows and Microsoft Access & Excel + #define _________________WINNAV_L1_________________ KC_PGUP, KC_PGDN, KC_HOME, KC_END, _______ + #define _________________WINNAV_L2_________________ KC_LEFT, KC_UP, KC_DOWN, KC_RIGHT, _______ + #define _________________WINNAV_L3_________________ _______, _______, _______, _______, _______ + #define _________________NUMB_R1___________________ KC_PMNS, KC_7, KC_8, KC_9, KC_PPLS + #define _________________NUMB_R2___________________ KC_PSLS, KC_4, KC_5, KC_6, KC_PAST + #define _________________NUMB_R3_MAC_______________ KC_DOT, KC_1, MT(MOD_LGUI,KC_2), MT(MOD_LALT,KC_3), MT(MOD_LCTL,KC_0) + #define _________________NUMB_R3_WIN_______________ KC_DOT, KC_1, MT(MOD_LCTL,KC_2), MT(MOD_LALT,KC_3), MT(MOD_LGUI,KC_0) + #define _________________NUMB_R4___________________ KC_LSFT, KC_0, KC_0, _______, _______ +#endif + +//Function Row +/* +#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 +*/ + +//Function keys as macropad +#define _____________FUNC_1_______________ KC_F9, KC_F10, KC_F11, KC_F12 +#define _____________FUNC_2_______________ KC_F5, KC_F6, KC_F7, KC_F8 +#define _____________FUNC_3_______________ KC_F1, KC_F2, KC_F3, KC_F4 + +//RGB keys +#if defined RGBLIGHT_ENABLE || defined RGB_MATRIX_ENABLE +#define _________________RGB_1_____________________ RGBRST, RGB_HUI, RGB_SAI, RGB_VAI, RGB_SPI +#define _________________RGB_2_____________________ RGB_MOD, RGB_HUD, RGB_SAD, RGB_VAD, RGB_SPD +#else +#define _________________RGB_1_____________________ _______, _______, _______, _______, _______ +#define _________________RGB_2_____________________ _______, _______, _______, _______, _______ +#endif + +//Audio keys +#define _________________MEDIA_____________________ KC_MPLY, KC_MUTE, KC_VOLD, KC_VOLU, _______ +#define _________________MEDIA_V2__________________ KC_EJCT, KC_MRWD, KC_MPLY, KC_MFFD, _______ + +//Base layer keys +#define _________________LYOUT_____________________ _______, KC_QWERTY, KC_MACBASE, KC_WINBASE, _______ + +//Punctuation keys +#define _________________PUNC_L1___________________ KC_BSLS, KC_AT, KC_HASH, KC_DLR, KC_PERC +#define _________________PUNC_L1_ALT_______________ KC_DQT, KC_AT, KC_HASH, KC_DLR, KC_PERC +#define _________________PUNC_L2___________________ KC_PLUS, KC_MINS, KC_ASTR, KC_SLSH, KC_EQL +#define _________________PUNC_L3___________________ KC_LBRC, KC_RBRC, KC_LPRN, KC_RPRN, KC_AMPR +#define _________________PUNC_L3_ALT_______________ _______, _______, KC_TILD, KC_CIRC, KC_GRV +#define _________________PUNC_R1___________________ _______, KC_DQT, KC_EQL, _______, _______ +#define _________________PUNC_R2___________________ _______, KC_ASTR, KC_SLSH, KC_PLUS, KC_MINS +#define _________________PUNC_R3___________________ _______, KC_EQL, KC_BSLS, _______, _______ + +//Make Shortcuts and window switching +#define _____________FUNC_L1_______________________ MAKEKF, MAKEK, _______, KC_ESC, LCTL(LALT(KC_DEL)) +#define _____________FUNC_L3_______________________ KC_LGUI, KC_RALT, KC_LCTL, KC_TAB, _______ + + +#define _________________KC_BLANK__________________ _______, _______, _______, _______, _______ From e184da91a662b01eb824329087156bd2507bfad6 Mon Sep 17 00:00:00 2001 From: Takeshi ISHII <2170248+mtei@users.noreply.github.com> Date: Sun, 28 Jun 2020 20:27:06 +0900 Subject: [PATCH 275/930] [Update] Japanese translation of docs/cli.md and docs/cli_commands.md (#9536) * update docs/ja/cli.md * update docs/ja/cli_commands.md * Update docs/ja/cli.md Co-authored-by: shela * update docs/ja/cli_commands.md Co-authored-by: shela --- docs/ja/cli.md | 15 ++-- docs/ja/cli_commands.md | 160 +++++++++++++++++++++++++--------------- 2 files changed, 106 insertions(+), 69 deletions(-) diff --git a/docs/ja/cli.md b/docs/ja/cli.md index dc6dddc41d92..9e8169a84e07 100644 --- a/docs/ja/cli.md +++ b/docs/ja/cli.md @@ -1,8 +1,8 @@ # QMK CLI :id=qmk-cli ## 概要 :id=overview @@ -11,25 +11,24 @@ QMK CLI を使用すると QMK キーボードの構築と作業が簡単にな ### 必要事項 :id=requirements -CLI は Python 3.5 以上を必要とします。我々は必要事項の数を少なくしようとしていますが、[`requirements.txt`](https://github.com/qmk/qmk_firmware/blob/master/requirements.txt) に列挙されているパッケージもインストールする必要があります。これらは QMK CLI をインストールするときに自動的にインストールされます。 +QMK は Python 3.6 以上を必要とします。我々は必要事項の数を少なくしようとしていますが、[`requirements.txt`](https://github.com/qmk/qmk_firmware/blob/master/requirements.txt) に列挙されているパッケージもインストールする必要があります。これらは QMK CLI をインストールするときに自動的にインストールされます。 ### Homebrew を使ったインストール (macOS、いくつかの Linux) :id=install-using-homebrew [Homebrew](https://brew.sh) をインストールしている場合は、タップして QMK をインストールすることができます: ``` -brew tap qmk/qmk -brew install qmk +brew install qmk/qmk/qmk export QMK_HOME='~/qmk_firmware' # オプション、`qmk_firmware` の場所を設定します qmk setup # これは `qmk/qmk_firmware` をクローンし、オプションでビルド環境をセットアップします ``` -### easy_install あるいは pip を使ってインストール :id=install-using-easy_install-or-pip +### pip を使ってインストール :id=install-using-easy_install-or-pip -上のリストにあなたのシステムがない場合は、QMK を手動でインストールすることができます。最初に、python 3.5 (以降)をインストールしていて、pip をインストールしていることを確認してください。次に以下のコマンドを使って QMK をインストールします: +上で列挙した中にあなたのシステムがない場合は、QMK を手動でインストールすることができます。最初に、python 3.6 (以降)をインストールしていて、pip をインストールしていることを確認してください。次に以下のコマンドを使って QMK をインストールします: ``` -pip3 install qmk +python3 -m pip install qmk export QMK_HOME='~/qmk_firmware' # オプション、`qmk_firmware` の場所を設定します qmk setup # これは `qmk/qmk_firmware` をクローンし、オプションでビルド環境をセットアップします ``` diff --git a/docs/ja/cli_commands.md b/docs/ja/cli_commands.md index 013689e5e849..81cb03cfe5bb 100644 --- a/docs/ja/cli_commands.md +++ b/docs/ja/cli_commands.md @@ -1,48 +1,18 @@ # QMK CLI コマンド -# CLI コマンド - -## `qmk cformat` - -このコマンドは clang-format を使って C コードを整形します。 - -引数無しで実行すると、変更された全てのコアコードを整形します。デフォルトでは `git diff` で `origin/master` をチェックし、ブランチは `-b ` を使って変更できます。 - -`-a` で全てのコアコードを整形するか、コマンドラインでファイル名を渡して特定のファイルに対して実行します。 - -**指定したファイルに対する使い方**: - -``` -qmk cformat [file1] [file2] [...] [fileN] -``` - -**全てのコアファイルに対する使い方**: - -``` -qmk cformat -a -``` - -**origin/master で変更されたファイルのみに対する使い方**: - -``` -qmk cformat -``` - -**branch_name で変更されたファイルのみに対する使い方**: - -``` -qmk cformat -b branch_name -``` +# ユーザー用コマンド ## `qmk compile` このコマンドにより、任意のディレクトリからファームウェアをコンパイルすることができます。 からエクスポートした JSON をコンパイルするか、リポジトリ内でキーマップをコンパイルするか、現在の作業ディレクトリでキーボードをコンパイルすることができます。 +このコマンドはディレクトリを認識します。キーボードやキーマップのディレクトリにいる場合、自動的に KEYBOARD や KEYMAP を入力します。 + **Configurator Exports での使い方**: ``` @@ -113,6 +83,8 @@ $ qmk compile -kb dz60 このコマンドは `qmk compile` に似ていますが、ブートローダを対象にすることもできます。ブートローダはオプションで、デフォルトでは `:flash` に設定されています。 違うブートローダを指定するには、`-bl ` を使ってください。利用可能なブートローダの詳細については、[ファームウェアを書き込む](ja/flashing.md)を見てください。 +このコマンドはディレクトリを認識します。キーボードやキーマップのディレクトリにいる場合、自動的に KEYBOARD や KEYMAP を入力します。 + **Configurator Exports での使い方**: ``` @@ -141,16 +113,6 @@ qmk flash -b qmk config [-ro] [config_token1] [config_token2] [...] [config_tokenN] ``` -## `qmk docs` - -このコマンドは、ドキュメントを参照または改善するために使うことができるローカル HTTP サーバを起動します。デフォルトのポートは 8936 です。 - -**使用法**: - -``` -qmk docs [-p PORT] -``` - ## `qmk doctor` このコマンドは環境を調査し、潜在的なビルドあるいは書き込みの問題について警告します。必要に応じてそれらの多くを修正できます。 @@ -175,36 +137,40 @@ qmk doctor [-y] [-n] qmk doctor -n -## `qmk json2c` +## `qmk info` -QMK Configurator からエクスポートしたものから keymap.c を生成します。 +QMK のキーボードやキーマップに関する情報を表示します。キーボードに関する情報を取得したり、レイアウトを表示したり、基礎となるキーマトリックスを表示したり、JSON キーマップをきれいに印刷したりするのに使用できます。 **使用法**: ``` -qmk json2c [-o OUTPUT] filename +qmk info [-f FORMAT] [-m] [-l] [-km KEYMAP] [-kb KEYBOARD] ``` -## `qmk kle2json` +このコマンドはディレクトリを認識します。キーボードやキーマップのディレクトリにいる場合、自動的に KEYBOARD や KEYMAP を入力します。 -このコマンドにより、生の KLE データから QMK Configurator の JSON へ変換することができます。絶対パスあるいは現在のディレクトリ内のファイル名のいずれかを受け取ります。デフォルトでは、`info.json` が既に存在している場合は上書きしません。上書きするには、`-f` あるいは `--force` フラグを使ってください。 +**例**: -**使用法**: +キーボードの基本情報を表示する: -``` -qmk kle2json [-f] -``` + qmk info -kb planck/rev5 -**例**: +キーボードのマトリクスを表示する: -``` -$ qmk kle2json kle.txt -☒ File info.json already exists, use -f or --force to overwrite. -``` + qmk info -kb ergodox_ez -m + +キーボードの JSON キーマップを表示する: + + qmk info -kb clueboard/california -km default + +## `qmk json2c` + +QMK Configurator からエクスポートしたものから keymap.c を生成します。 + +**使用法**: ``` -$ qmk kle2json -f kle.txt -f -Ψ Wrote out to info.json +qmk json2c [-o OUTPUT] filename ``` ## `qmk list-keyboards` @@ -221,6 +187,8 @@ qmk list-keyboards このコマンドは指定されたキーボード(とリビジョン)の全てのキーマップを列挙します。 +このコマンドはディレクトリを認識します。キーボードのディレクトリにいる場合、自動的に KEYBOARD を入力します。 + **使用法**: ``` @@ -231,12 +199,82 @@ qmk list-keymaps -kb planck/ez このコマンドは、キーボードの既存のデフォルトのキーマップに基づいて新しいキーマップを作成します。 +このコマンドはディレクトリを認識します。キーボードやキーマップのディレクトリにいる場合、自動的に KEYBOARD や KEYMAP を入力します。 + **使用法**: ``` qmk new-keymap [-kb KEYBOARD] [-km KEYMAP] ``` +--- + +# 開発者用コマンド + +## `qmk cformat` + +このコマンドは clang-format を使って C コードを整形します。 + +引数無しで実行すると、変更された全てのコアコードを整形します。デフォルトでは `git diff` で `origin/master` をチェックし、ブランチは `-b ` を使って変更できます。 + +`-a` で全てのコアコードを整形するか、コマンドラインでファイル名を渡して特定のファイルに対して実行します。 + +**指定したファイルに対する使い方**: + +``` +qmk cformat [file1] [file2] [...] [fileN] +``` + +**全てのコアファイルに対する使い方**: + +``` +qmk cformat -a +``` + +**origin/master で変更されたファイルのみに対する使い方**: + +``` +qmk cformat +``` + +**branch_name で変更されたファイルのみに対する使い方**: + +``` +qmk cformat -b branch_name +``` + +## `qmk docs` + +このコマンドは、ドキュメントを参照または改善するために使うことができるローカル HTTP サーバを起動します。デフォルトのポートは 8936 です。 + +**使用法**: + +``` +qmk docs [-p PORT] +``` + +## `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 pyformat` このコマンドは `qmk_firmware` 内の python コードを整形します。 From 3d45861216b59490a88264188abeb33a84185766 Mon Sep 17 00:00:00 2001 From: Ryan Date: Sun, 28 Jun 2020 21:51:48 +1000 Subject: [PATCH 276/930] Fix ordering for new info.jsons (#9567) --- keyboards/aeboards/aegis/info.json | 14 +++++++------- keyboards/cannonkeys/chimera65/info.json | 4 ++-- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/keyboards/aeboards/aegis/info.json b/keyboards/aeboards/aegis/info.json index 1e83a7a9c102..90e2b16946e5 100644 --- a/keyboards/aeboards/aegis/info.json +++ b/keyboards/aeboards/aegis/info.json @@ -94,6 +94,8 @@ {"x": 2, "y": 4.5}, {"x": 3, "y": 4.5}, + {"x": 4.25, "y": 4.75}, + {"x": 5.5, "y": 4.5, "w": 1.25}, {"x": 6.75, "y": 4.5}, {"x": 7.75, "y": 4.5}, @@ -108,22 +110,20 @@ {"x": 16.75, "y": 4.5, "w": 1.75}, {"x": 18.5, "y": 4.5}, - {"x": 4.25, "y": 4.75}, - {"x": 0, "y": 5.5}, {"x": 1, "y": 5.5}, {"x": 2, "y": 5.5}, + {"x": 3.25, "y": 5.75}, + {"x": 4.25, "y": 5.75}, + {"x": 5.25, "y": 5.75}, + {"x": 6.5, "y": 5.5, "w": 1.25}, {"x": 7.75, "y": 5.5, "w": 1.25}, {"x": 9, "y": 5.5, "w": 6.25}, {"x": 15.25, "y": 5.5, "w": 1.5}, {"x": 16.75, "y": 5.5, "w": 1.25}, - {"x": 18, "y": 5.5, "w": 1.5}, - - {"x": 3.25, "y": 5.75}, - {"x": 4.25, "y": 5.75}, - {"x": 5.25, "y": 5.75} + {"x": 18, "y": 5.5, "w": 1.5} ] } } diff --git a/keyboards/cannonkeys/chimera65/info.json b/keyboards/cannonkeys/chimera65/info.json index 4130e7a373d3..f4c6046a65c8 100644 --- a/keyboards/cannonkeys/chimera65/info.json +++ b/keyboards/cannonkeys/chimera65/info.json @@ -71,10 +71,10 @@ {"x": 11.25, "y": 3}, {"x": 12.25, "y": 3, "w": 1.75}, - {"x": 15.5, "y": 3}, - {"x": 14.25, "y": 3.25}, + {"x": 15.5, "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}, From 2344b6865a26298fe8e1bc0c5ea2a6082271ebff Mon Sep 17 00:00:00 2001 From: Ryan Date: Sun, 28 Jun 2020 22:21:37 +1000 Subject: [PATCH 277/930] Fix siemens_tastatur info.json (#9568) --- keyboards/converter/siemens_tastatur/info.json | 2 +- keyboards/converter/siemens_tastatur/siemens_tastatur.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/keyboards/converter/siemens_tastatur/info.json b/keyboards/converter/siemens_tastatur/info.json index 81fc47865269..de9998cb7131 100644 --- a/keyboards/converter/siemens_tastatur/info.json +++ b/keyboards/converter/siemens_tastatur/info.json @@ -69,6 +69,7 @@ {"x": 18, "y": 2}, {"x": 19, "y": 2}, + {"x": 0, "y": 3, "w": 1.75}, {"x": 1.75, "y": 3}, {"x": 2.75, "y": 3}, {"x": 3.75, "y": 3}, @@ -79,7 +80,6 @@ {"x": 8.75, "y": 3}, {"x": 9.75, "y": 3}, {"x": 10.75, "y": 3}, - {"x": 11.75, "y": 3, "w": 1.75}, {"x": 15, "y": 3}, {"x": 16, "y": 3}, diff --git a/keyboards/converter/siemens_tastatur/siemens_tastatur.h b/keyboards/converter/siemens_tastatur/siemens_tastatur.h index 6a81b2550d76..f14cd82a8d7c 100644 --- a/keyboards/converter/siemens_tastatur/siemens_tastatur.h +++ b/keyboards/converter/siemens_tastatur/siemens_tastatur.h @@ -30,7 +30,7 @@ along with this program. If not, see . 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, k1e, k1f, k1g, k1h, k1i, \ k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2d, k2e, k2f, k2g, k2h, k2i, \ - k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3e, k3f, k3g, k3h, k3i, \ + k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3e, k3f, k3g, k3h, k3i, \ k3b \ ) \ { \ From b87895dc1246065ac05487d5715fab0e734fc5bd Mon Sep 17 00:00:00 2001 From: Ramon Imbao Date: Sun, 28 Jun 2020 22:09:14 +0800 Subject: [PATCH 278/930] Move Wete to ramonimbao folder (#9569) * [Breaking] Move Wete to ramonimbao folder * Delete files * Move files with git instead * Update readme with new directory --- keyboards/{ => ramonimbao}/wete/chconf.h | 0 keyboards/{ => ramonimbao}/wete/config.h | 0 keyboards/{ => ramonimbao}/wete/halconf.h | 0 keyboards/{ => ramonimbao}/wete/info.json | 0 keyboards/{ => ramonimbao}/wete/keymaps/default/keymap.c | 0 keyboards/{ => ramonimbao}/wete/keymaps/iso/keymap.c | 0 keyboards/{ => ramonimbao}/wete/keymaps/jis/keymap.c | 0 keyboards/{ => ramonimbao}/wete/keymaps/via/config.h | 0 keyboards/{ => ramonimbao}/wete/keymaps/via/keymap.c | 0 keyboards/{ => ramonimbao}/wete/keymaps/via/rules.mk | 0 keyboards/{ => ramonimbao}/wete/mcuconf.h | 0 keyboards/{ => ramonimbao}/wete/readme.md | 2 +- keyboards/{ => ramonimbao}/wete/rules.mk | 0 keyboards/{ => ramonimbao}/wete/wete.c | 0 keyboards/{ => ramonimbao}/wete/wete.h | 0 15 files changed, 1 insertion(+), 1 deletion(-) rename keyboards/{ => ramonimbao}/wete/chconf.h (100%) rename keyboards/{ => ramonimbao}/wete/config.h (100%) rename keyboards/{ => ramonimbao}/wete/halconf.h (100%) rename keyboards/{ => ramonimbao}/wete/info.json (100%) rename keyboards/{ => ramonimbao}/wete/keymaps/default/keymap.c (100%) rename keyboards/{ => ramonimbao}/wete/keymaps/iso/keymap.c (100%) rename keyboards/{ => ramonimbao}/wete/keymaps/jis/keymap.c (100%) rename keyboards/{ => ramonimbao}/wete/keymaps/via/config.h (100%) rename keyboards/{ => ramonimbao}/wete/keymaps/via/keymap.c (100%) rename keyboards/{ => ramonimbao}/wete/keymaps/via/rules.mk (100%) rename keyboards/{ => ramonimbao}/wete/mcuconf.h (100%) rename keyboards/{ => ramonimbao}/wete/readme.md (94%) rename keyboards/{ => ramonimbao}/wete/rules.mk (100%) rename keyboards/{ => ramonimbao}/wete/wete.c (100%) rename keyboards/{ => ramonimbao}/wete/wete.h (100%) diff --git a/keyboards/wete/chconf.h b/keyboards/ramonimbao/wete/chconf.h similarity index 100% rename from keyboards/wete/chconf.h rename to keyboards/ramonimbao/wete/chconf.h diff --git a/keyboards/wete/config.h b/keyboards/ramonimbao/wete/config.h similarity index 100% rename from keyboards/wete/config.h rename to keyboards/ramonimbao/wete/config.h diff --git a/keyboards/wete/halconf.h b/keyboards/ramonimbao/wete/halconf.h similarity index 100% rename from keyboards/wete/halconf.h rename to keyboards/ramonimbao/wete/halconf.h diff --git a/keyboards/wete/info.json b/keyboards/ramonimbao/wete/info.json similarity index 100% rename from keyboards/wete/info.json rename to keyboards/ramonimbao/wete/info.json diff --git a/keyboards/wete/keymaps/default/keymap.c b/keyboards/ramonimbao/wete/keymaps/default/keymap.c similarity index 100% rename from keyboards/wete/keymaps/default/keymap.c rename to keyboards/ramonimbao/wete/keymaps/default/keymap.c diff --git a/keyboards/wete/keymaps/iso/keymap.c b/keyboards/ramonimbao/wete/keymaps/iso/keymap.c similarity index 100% rename from keyboards/wete/keymaps/iso/keymap.c rename to keyboards/ramonimbao/wete/keymaps/iso/keymap.c diff --git a/keyboards/wete/keymaps/jis/keymap.c b/keyboards/ramonimbao/wete/keymaps/jis/keymap.c similarity index 100% rename from keyboards/wete/keymaps/jis/keymap.c rename to keyboards/ramonimbao/wete/keymaps/jis/keymap.c diff --git a/keyboards/wete/keymaps/via/config.h b/keyboards/ramonimbao/wete/keymaps/via/config.h similarity index 100% rename from keyboards/wete/keymaps/via/config.h rename to keyboards/ramonimbao/wete/keymaps/via/config.h diff --git a/keyboards/wete/keymaps/via/keymap.c b/keyboards/ramonimbao/wete/keymaps/via/keymap.c similarity index 100% rename from keyboards/wete/keymaps/via/keymap.c rename to keyboards/ramonimbao/wete/keymaps/via/keymap.c diff --git a/keyboards/wete/keymaps/via/rules.mk b/keyboards/ramonimbao/wete/keymaps/via/rules.mk similarity index 100% rename from keyboards/wete/keymaps/via/rules.mk rename to keyboards/ramonimbao/wete/keymaps/via/rules.mk diff --git a/keyboards/wete/mcuconf.h b/keyboards/ramonimbao/wete/mcuconf.h similarity index 100% rename from keyboards/wete/mcuconf.h rename to keyboards/ramonimbao/wete/mcuconf.h diff --git a/keyboards/wete/readme.md b/keyboards/ramonimbao/wete/readme.md similarity index 94% rename from keyboards/wete/readme.md rename to keyboards/ramonimbao/wete/readme.md index f632ae5f1cf9..f0f26b78bd84 100644 --- a/keyboards/wete/readme.md +++ b/keyboards/ramonimbao/wete/readme.md @@ -9,6 +9,6 @@ A southpaw full-sized keyboard. Make example for this keyboard (after setting up your build environment): - make wete:default + make ramonimbao/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/ramonimbao/wete/rules.mk similarity index 100% rename from keyboards/wete/rules.mk rename to keyboards/ramonimbao/wete/rules.mk diff --git a/keyboards/wete/wete.c b/keyboards/ramonimbao/wete/wete.c similarity index 100% rename from keyboards/wete/wete.c rename to keyboards/ramonimbao/wete/wete.c diff --git a/keyboards/wete/wete.h b/keyboards/ramonimbao/wete/wete.h similarity index 100% rename from keyboards/wete/wete.h rename to keyboards/ramonimbao/wete/wete.h From b27c20d2041a3569f126e7901b9a926c0169fbc6 Mon Sep 17 00:00:00 2001 From: Miles Goodhew Date: Mon, 29 Jun 2020 00:38:41 +1000 Subject: [PATCH 279/930] Added DFU instructions for XD004 board (#9565) --- keyboards/xd004/readme.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/keyboards/xd004/readme.md b/keyboards/xd004/readme.md index 8b32c6a48c64..8f858a84111e 100644 --- a/keyboards/xd004/readme.md +++ b/keyboards/xd004/readme.md @@ -9,6 +9,20 @@ Keyboard Maintainer: QMK Community Hardware Supported: XD004 PCB v1.0 Hardware Availability: [KPRepublic](https://kprepublic.com/products/xd004-xiudi-4-custom-mechanical-keyboard-4-keys-switch-leds-pcb-programmed-hot-swappable-macro-key-silver-case-micro-port) +To put this board in DFU (firmware update) mode, bridge the last two pins (#5 & 6) of the 6-pin "J2" header on the opposite edge of the board to the USB port" +``` +----+ + J2 | +[o] | +(o) | +(o) | +(o) | +(o)-+-\ (These +(o)-+-/ two) + | +----+ +``` + To build with a default keymap (not useful at all, have a look at other keymaps): ```make xd004/v1:default``` From 32a47e7af4a2ce21260aadde5bf7ed8f78293ff9 Mon Sep 17 00:00:00 2001 From: Ramon Imbao Date: Sun, 28 Jun 2020 23:22:11 +0800 Subject: [PATCH 280/930] Add Herringbone keyboard (#9495) Co-authored-by: Ryan Co-authored-by: Erovia --- keyboards/ramonimbao/herringbone/config.h | 218 ++++++++++++ .../ramonimbao/herringbone/herringbone.c | 17 + .../ramonimbao/herringbone/herringbone.h | 82 +++++ keyboards/ramonimbao/herringbone/info.json | 317 ++++++++++++++++++ .../herringbone/keymaps/default/keymap.c | 27 ++ .../herringbone/keymaps/iso/keymap.c | 27 ++ .../herringbone/keymaps/via/keymap.c | 51 +++ .../herringbone/keymaps/via/rules.mk | 3 + keyboards/ramonimbao/herringbone/readme.md | 14 + keyboards/ramonimbao/herringbone/rules.mk | 34 ++ 10 files changed, 790 insertions(+) create mode 100644 keyboards/ramonimbao/herringbone/config.h create mode 100644 keyboards/ramonimbao/herringbone/herringbone.c create mode 100644 keyboards/ramonimbao/herringbone/herringbone.h create mode 100644 keyboards/ramonimbao/herringbone/info.json create mode 100644 keyboards/ramonimbao/herringbone/keymaps/default/keymap.c create mode 100644 keyboards/ramonimbao/herringbone/keymaps/iso/keymap.c create mode 100644 keyboards/ramonimbao/herringbone/keymaps/via/keymap.c create mode 100644 keyboards/ramonimbao/herringbone/keymaps/via/rules.mk create mode 100644 keyboards/ramonimbao/herringbone/readme.md create mode 100644 keyboards/ramonimbao/herringbone/rules.mk diff --git a/keyboards/ramonimbao/herringbone/config.h b/keyboards/ramonimbao/herringbone/config.h new file mode 100644 index 000000000000..3dab5ddeb3a2 --- /dev/null +++ b/keyboards/ramonimbao/herringbone/config.h @@ -0,0 +1,218 @@ +/* +Copyright 2020 Ramon Imbao + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License 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 0xB16B +#define PRODUCT_ID 0x04E5 +#define DEVICE_VER 0x0012 +#define MANUFACTURER Ramon Imbao +#define PRODUCT Herringbone +#define DESCRIPTION A through hole 75% keyboard + +/* 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 { C5, C6, C7, A7, A6, A5 } +#define MATRIX_COL_PINS { A0, A1, A2, A3, A4, C4, D6, D5, D1, B0, B1, B3, B4, B7 } +#define UNUSED_PINS + +/* COL2ROW, ROW2COL*/ +#define DIODE_DIRECTION COL2ROW + +// #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 */ +#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 0 diff --git a/keyboards/ramonimbao/herringbone/herringbone.c b/keyboards/ramonimbao/herringbone/herringbone.c new file mode 100644 index 000000000000..c7087ea0ac5e --- /dev/null +++ b/keyboards/ramonimbao/herringbone/herringbone.c @@ -0,0 +1,17 @@ +/* Copyright 2020 Ramon Imbao + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#include "herringbone.h" diff --git a/keyboards/ramonimbao/herringbone/herringbone.h b/keyboards/ramonimbao/herringbone/herringbone.h new file mode 100644 index 000000000000..80c411690e73 --- /dev/null +++ b/keyboards/ramonimbao/herringbone/herringbone.h @@ -0,0 +1,82 @@ +/* Copyright 2020 Ramon Imbao + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License 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 XXX KC_NO + +#define LAYOUT_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, k2c, k2d, k2e, \ + k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3d, k3e, \ + k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, k4a, k4b, k4d, k4e, \ + k50, k52, k53, k55, k59, k5a, 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, XXX, k3d, k3e }, \ + { k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, k4a, k4b, XXX, k4d, k4e }, \ + { k50, XXX, k52, k53, XXX, k55, XXX, XXX, XXX, k59, k5a, XXX, k5c, k5d, k5e } \ +} + +#define LAYOUT_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, 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, k3d, k3e, \ + k40, k51, k41, k42, k43, k44, k45, k46, k47, k48, k49, k4a, k4b, k4d, k4e, \ + k50, k52, k53, k55, k59, k5a, 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, XXX, k3d, k3e }, \ + { k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, k4a, k4b, XXX, k4d, k4e }, \ + { k50, k51, k52, k53, XXX, k55, XXX, XXX, XXX, k59, k5a, XXX, k5c, k5d, k5e } \ +} + +// Split backspace +#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, k3c, 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, k3d, k3e, \ + k40, k51, k41, k42, k43, k44, k45, k46, k47, k48, k49, k4a, k4b, k4d, k4e, \ + k50, k52, k53, k55, k59, k5a, 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, XXX, k4d, k4e }, \ + { k50, k51, k52, k53, XXX, k55, XXX, XXX, XXX, k59, k5a, XXX, k5c, k5d, k5e } \ +} diff --git a/keyboards/ramonimbao/herringbone/info.json b/keyboards/ramonimbao/herringbone/info.json new file mode 100644 index 000000000000..5a23ec0b10fb --- /dev/null +++ b/keyboards/ramonimbao/herringbone/info.json @@ -0,0 +1,317 @@ +{ + "keyboard_name": "Herringbone", + "url": "", + "maintainer": "Ramon Imbao", + "width": 16.5, + "height": 6.5, + "layouts": { + "LAYOUT_ansi": { + "layout": [ + {"x": 0, "y": 0}, + + {"x": 1.5, "y": 0}, + {"x": 2.5, "y": 0}, + {"x": 3.5, "y": 0}, + {"x": 4.5, "y": 0}, + + {"x": 5.75, "y": 0}, + {"x": 6.75, "y": 0}, + {"x": 7.75, "y": 0}, + {"x": 8.75, "y": 0}, + + {"x": 10, "y": 0}, + {"x": 11, "y": 0}, + {"x": 12, "y": 0}, + {"x": 13, "y": 0}, + + {"x": 14.25, "y": 0}, + + {"x": 15.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, "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.5, "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.5, "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": 15.5, "y": 3.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.25, "y": 4.5}, + + {"x": 15.5, "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.5}, + {"x": 11.5, "y": 5.25, "w": 1.5}, + + {"x": 13.25, "y": 5.5}, + {"x": 14.25, "y": 5.5}, + {"x": 15.25, "y": 5.5} + ] + }, + "LAYOUT_iso": { + "layout": [ + {"x": 0, "y": 0}, + + {"x": 1.5, "y": 0}, + {"x": 2.5, "y": 0}, + {"x": 3.5, "y": 0}, + {"x": 4.5, "y": 0}, + + {"x": 5.75, "y": 0}, + {"x": 6.75, "y": 0}, + {"x": 7.75, "y": 0}, + {"x": 8.75, "y": 0}, + + {"x": 10, "y": 0}, + {"x": 11, "y": 0}, + {"x": 12, "y": 0}, + {"x": 13, "y": 0}, + + {"x": 14.25, "y": 0}, + + {"x": 15.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, "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.5, "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.75, "y": 2.25, "w": 1.25, "h": 2}, + + {"x": 15.5, "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": 15.5, "y": 3.25}, + + {"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.25, "y": 4.5}, + + {"x": 15.5, "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.5}, + {"x": 11.5, "y": 5.25, "w": 1.5}, + + {"x": 13.25, "y": 5.5}, + {"x": 14.25, "y": 5.5}, + {"x": 15.25, "y": 5.5} + ] + }, + "LAYOUT_all": { + "layout": [ + {"x": 0, "y": 0}, + + {"x": 1.5, "y": 0}, + {"x": 2.5, "y": 0}, + {"x": 3.5, "y": 0}, + {"x": 4.5, "y": 0}, + + {"x": 5.75, "y": 0}, + {"x": 6.75, "y": 0}, + {"x": 7.75, "y": 0}, + {"x": 8.75, "y": 0}, + + {"x": 10, "y": 0}, + {"x": 11, "y": 0}, + {"x": 12, "y": 0}, + {"x": 13, "y": 0}, + + {"x": 14.25, "y": 0}, + + {"x": 15.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, "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}, + {"x": 14, "y": 1.25}, + + {"x": 15.5, "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.5, "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": 15.5, "y": 3.25}, + + {"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.25, "y": 4.5}, + + {"x": 15.5, "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.5}, + {"x": 11.5, "y": 5.25, "w": 1.5}, + + {"x": 13.25, "y": 5.5}, + {"x": 14.25, "y": 5.5}, + {"x": 15.25, "y": 5.5} + ] + } + } +} diff --git a/keyboards/ramonimbao/herringbone/keymaps/default/keymap.c b/keyboards/ramonimbao/herringbone/keymaps/default/keymap.c new file mode 100644 index 000000000000..18047fbea763 --- /dev/null +++ b/keyboards/ramonimbao/herringbone/keymaps/default/keymap.c @@ -0,0 +1,27 @@ +/* Copyright 2020 Ramon Imbao + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public 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( + 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_DEL, + 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_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_RALT, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT + ), +}; diff --git a/keyboards/ramonimbao/herringbone/keymaps/iso/keymap.c b/keyboards/ramonimbao/herringbone/keymaps/iso/keymap.c new file mode 100644 index 000000000000..43255343e72b --- /dev/null +++ b/keyboards/ramonimbao/herringbone/keymaps/iso/keymap.c @@ -0,0 +1,27 @@ +/* Copyright 2020 Ramon Imbao + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public 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( + 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_DEL, + 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_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_ENT, 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_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_RALT, KC_RCTL, KC_LEFT, KC_DOWN, KC_RIGHT + ), +}; diff --git a/keyboards/ramonimbao/herringbone/keymaps/via/keymap.c b/keyboards/ramonimbao/herringbone/keymaps/via/keymap.c new file mode 100644 index 000000000000..d39f7c9ab82f --- /dev/null +++ b/keyboards/ramonimbao/herringbone/keymaps/via/keymap.c @@ -0,0 +1,51 @@ +/* Copyright 2020 Ramon Imbao + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public 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_DEL, + 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_BSPC, KC_NO, 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_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_END, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), KC_LEFT, KC_DOWN, KC_RGHT + ), + [1] = LAYOUT_all( + RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + [2] = LAYOUT_all( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + [3] = LAYOUT_all( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), +}; diff --git a/keyboards/ramonimbao/herringbone/keymaps/via/rules.mk b/keyboards/ramonimbao/herringbone/keymaps/via/rules.mk new file mode 100644 index 000000000000..930e3552ad08 --- /dev/null +++ b/keyboards/ramonimbao/herringbone/keymaps/via/rules.mk @@ -0,0 +1,3 @@ +VIA_ENABLE = yes +MOUSEKEY_ENABLE = no +EXTRAKEY_ENABLE = no diff --git a/keyboards/ramonimbao/herringbone/readme.md b/keyboards/ramonimbao/herringbone/readme.md new file mode 100644 index 000000000000..019b7da4a542 --- /dev/null +++ b/keyboards/ramonimbao/herringbone/readme.md @@ -0,0 +1,14 @@ +# Herringbone + +![Herringbone](https://i.imgur.com/SQyS0j8.png) + +A through-hole 75% keyboard. + +* Keyboard Maintainer: [Ramon Imbao](https://github.com/ramonimbao) +* Hardware Supported: ATmega32A + +Make example for this keyboard (after setting up your build environment): + + make herringbone: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/ramonimbao/herringbone/rules.mk b/keyboards/ramonimbao/herringbone/rules.mk new file mode 100644 index 000000000000..9fde8b14e305 --- /dev/null +++ b/keyboards/ramonimbao/herringbone/rules.mk @@ -0,0 +1,34 @@ +# MCU name +MCU = atmega32a + +# Processor frequency +F_CPU = 16000000 + +# 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 = 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 +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +AUDIO_ENABLE = no # Audio output on port C6 +FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches From a8904d47b745518e9bbab8f20f05828d77f7f42d Mon Sep 17 00:00:00 2001 From: Ramon Imbao Date: Mon, 29 Jun 2020 00:12:35 +0800 Subject: [PATCH 281/930] Add GHS.RAR keyboard (#9561) Co-authored-by: Ryan --- keyboards/ghs/rar/config.h | 196 ++++++++ keyboards/ghs/rar/info.json | 512 +++++++++++++++++++++ keyboards/ghs/rar/keymaps/default/keymap.c | 42 ++ keyboards/ghs/rar/keymaps/iso/keymap.c | 42 ++ keyboards/ghs/rar/keymaps/via/keymap.c | 52 +++ keyboards/ghs/rar/keymaps/via/rules.mk | 1 + keyboards/ghs/rar/rar.c | 17 + keyboards/ghs/rar/rar.h | 145 ++++++ keyboards/ghs/rar/readme.md | 15 + keyboards/ghs/rar/rules.mk | 31 ++ 10 files changed, 1053 insertions(+) create mode 100644 keyboards/ghs/rar/config.h create mode 100644 keyboards/ghs/rar/info.json create mode 100644 keyboards/ghs/rar/keymaps/default/keymap.c create mode 100644 keyboards/ghs/rar/keymaps/iso/keymap.c create mode 100644 keyboards/ghs/rar/keymaps/via/keymap.c create mode 100644 keyboards/ghs/rar/keymaps/via/rules.mk create mode 100644 keyboards/ghs/rar/rar.c create mode 100644 keyboards/ghs/rar/rar.h create mode 100644 keyboards/ghs/rar/readme.md create mode 100644 keyboards/ghs/rar/rules.mk diff --git a/keyboards/ghs/rar/config.h b/keyboards/ghs/rar/config.h new file mode 100644 index 000000000000..0e41f47b3173 --- /dev/null +++ b/keyboards/ghs/rar/config.h @@ -0,0 +1,196 @@ +/* +Copyright 2020 Gone Hacking Studio + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License 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 0x0645 +#define PRODUCT_ID 0x0001 +#define DEVICE_VER 0x0001 +#define MANUFACTURER Gone Hacking Studio +#define PRODUCT GHS.RAR +#define DESCRIPTION A 75 % keyboard + +/* key matrix size */ +#define MATRIX_ROWS 12 +#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 { B0, B7, C6, B6, B5, B4, D7, D6, D4, D5, D3, D2 } +#define MATRIX_COL_PINS { F0, F1, F4, F5, F6, F7, C7, D1 } +#define UNUSED_PINS + +/* COL2ROW, ROW2COL*/ +#define DIODE_DIRECTION COL2ROW + +// #define BACKLIGHT_PIN B7 +// #define BACKLIGHT_BREATHING +// #define BACKLIGHT_LEVELS 3 + +#define RGB_DI_PIN D0 +#ifdef RGB_DI_PIN + #define RGBLED_NUM 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 + +/* 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 */ +#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 0 diff --git a/keyboards/ghs/rar/info.json b/keyboards/ghs/rar/info.json new file mode 100644 index 000000000000..3d2ffe1a43c3 --- /dev/null +++ b/keyboards/ghs/rar/info.json @@ -0,0 +1,512 @@ +{ + "keyboard_name": "GHS.RAR", + "url": "https://gonehacking.studio/", + "maintainer": "Gone Hacking Studio", + "width": 16.5, + "height": 6.75, + "layouts": { + "LAYOUT_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.5, "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.5, "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.5, "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": 15.5, "y": 3.5}, + + {"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": 1.75}, + + {"x": 14.25, "y": 4.75}, + + {"x": 15.5, "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.5}, + {"x": 11.5, "y": 5.5, "w": 1.5}, + + {"x": 13.25, "y": 5.75}, + {"x": 14.25, "y": 5.75}, + {"x": 15.25, "y": 5.75} + ] + }, + "LAYOUT_ansi_wkl": { + "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.5, "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.5, "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.5, "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": 15.5, "y": 3.5}, + + {"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": 1.75}, + + {"x": 14.25, "y": 4.75}, + + {"x": 15.5, "y": 4.5}, + + {"x": 0, "y": 5.5, "w": 1.5}, + {"x": 1.5, "y": 5.5, "w": 1.5}, + {"x": 3, "y": 5.5, "w": 7}, + {"x": 10, "y": 5.5, "w": 1.5}, + {"x": 11.5, "y": 5.5, "w": 1.5}, + + {"x": 13.25, "y": 5.75}, + {"x": 14.25, "y": 5.75}, + {"x": 15.25, "y": 5.75} + ] + }, + "LAYOUT_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.5, "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.5, "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.75, "y": 2.5, "w": 1.25, "h": 2}, + + {"x": 15.5, "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}, + + {"x": 15.5, "y": 3.5}, + + {"x": 0, "y": 4.5, "w": 1.25}, + {"x": 1.25, "y": 4.5}, + {"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": 1.75}, + + {"x": 14.25, "y": 4.75}, + + {"x": 15.5, "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.5}, + {"x": 11.5, "y": 5.5, "w": 1.5}, + + {"x": 13.25, "y": 5.75}, + {"x": 14.25, "y": 5.75}, + {"x": 15.25, "y": 5.75} + ] + }, + "LAYOUT_iso_wkl": { + "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.5, "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.5, "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.75, "y": 2.5, "w": 1.25, "h": 2}, + + {"x": 15.5, "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}, + + {"x": 15.5, "y": 3.5}, + + {"x": 0, "y": 4.5, "w": 1.25}, + {"x": 1.25, "y": 4.5}, + {"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": 1.75}, + + {"x": 14.25, "y": 4.75}, + + {"x": 15.5, "y": 4.5}, + + {"x": 0, "y": 5.5, "w": 1.5}, + {"x": 1.5, "y": 5.5, "w": 1.5}, + {"x": 3, "y": 5.5, "w": 7}, + {"x": 10, "y": 5.5, "w": 1.5}, + {"x": 11.5, "y": 5.5, "w": 1.5}, + + {"x": 13.25, "y": 5.75}, + {"x": 14.25, "y": 5.75}, + {"x": 15.25, "y": 5.75} + ] + }, + "LAYOUT_all": { + "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.5, "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}, + {"x": 14, "y": 1.5}, + + {"x": 15.5, "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.5, "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": 15.5, "y": 3.5}, + + {"x": 0, "y": 4.5, "w": 1.25}, + {"x": 1.25, "y": 4.5}, + {"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": 1.75}, + + {"x": 14.25, "y": 4.75}, + + {"x": 15.5, "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}, + {"x": 11, "y": 5.5}, + {"x": 12, "y": 5.5}, + + {"x": 13.25, "y": 5.75}, + {"x": 14.25, "y": 5.75}, + {"x": 15.25, "y": 5.75} + ] + } + } +} diff --git a/keyboards/ghs/rar/keymaps/default/keymap.c b/keyboards/ghs/rar/keymaps/default/keymap.c new file mode 100644 index 000000000000..3c644d4a2047 --- /dev/null +++ b/keyboards/ghs/rar/keymaps/default/keymap.c @@ -0,0 +1,42 @@ +/* Copyright 2020 Gone Hacking Studio + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public 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( + 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_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_UP, KC_END, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), KC_LEFT, KC_DOWN, KC_RGHT, + ), + [_FN] = LAYOUT_ansi( + RGB_TOG, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_NO, KC_NO, 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_HUI, + KC_NO, KC_NO, 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_SAI, + KC_NO, 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_SAD, + 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_HUD, + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, _______, RGB_MOD, RGB_VAD, RGB_RMOD, + ) +}; diff --git a/keyboards/ghs/rar/keymaps/iso/keymap.c b/keyboards/ghs/rar/keymaps/iso/keymap.c new file mode 100644 index 000000000000..661159f0367d --- /dev/null +++ b/keyboards/ghs/rar/keymaps/iso/keymap.c @@ -0,0 +1,42 @@ +/* Copyright 2020 Gone Hacking Studio + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public 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_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_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_ENT, 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_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_UP, KC_END, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), KC_LEFT, KC_DOWN, KC_RGHT, + ), + [_FN] = LAYOUT_iso( + RGB_TOG, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_NO, KC_NO, 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_HUI, + KC_NO, KC_NO, 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_SAI, + KC_NO, 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_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, RGB_VAI, RGB_HUD, + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, _______, RGB_MOD, RGB_VAD, RGB_RMOD, + ) +}; diff --git a/keyboards/ghs/rar/keymaps/via/keymap.c b/keyboards/ghs/rar/keymaps/via/keymap.c new file mode 100644 index 000000000000..9700fd3bbdc4 --- /dev/null +++ b/keyboards/ghs/rar/keymaps/via/keymap.c @@ -0,0 +1,52 @@ +/* Copyright 2020 Gone Hacking Studio + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public 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] = { + /* Base */ + [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_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, 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_NO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_UP, KC_END, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), KC_NO, KC_LEFT, KC_DOWN, KC_RGHT, + ), + [1] = LAYOUT_all( + RGB_TOG, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_HUI, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_SAI, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_SAD, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_VAI, RGB_HUD, + _______, _______, _______, _______, _______, _______, _______, RGB_MOD, RGB_VAD, RGB_RMOD, + ), + [2] = LAYOUT_all( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + ), + [3] = LAYOUT_all( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + ) +}; diff --git a/keyboards/ghs/rar/keymaps/via/rules.mk b/keyboards/ghs/rar/keymaps/via/rules.mk new file mode 100644 index 000000000000..1e5b99807cb7 --- /dev/null +++ b/keyboards/ghs/rar/keymaps/via/rules.mk @@ -0,0 +1 @@ +VIA_ENABLE = yes diff --git a/keyboards/ghs/rar/rar.c b/keyboards/ghs/rar/rar.c new file mode 100644 index 000000000000..72f0654fc1e4 --- /dev/null +++ b/keyboards/ghs/rar/rar.c @@ -0,0 +1,17 @@ +/* Copyright 2020 Gone Hacking Studio + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#include "rar.h" diff --git a/keyboards/ghs/rar/rar.h b/keyboards/ghs/rar/rar.h new file mode 100644 index 000000000000..fc68f85bd4b5 --- /dev/null +++ b/keyboards/ghs/rar/rar.h @@ -0,0 +1,145 @@ +/* Copyright 2020 Gone Hacking Studio + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License 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 XXX KC_NO + +#define LAYOUT_ansi( \ + k00, k01, k11, k02, k12, k03, k13, k04, k14, k15, k06, k16, k07, k17, \ + k20, k30, k21, k31, k22, k32, k23, k33, k24, k34, k25, k35, k26, k36, k37, \ + k40, k50, k41, k51, k42, k52, k43, k53, k44, k54, k45, k55, k56, k47, k57, \ + k60, k70, k61, k71, k62, k72, k63, k73, k64, k74, k65, k75, k76, k77, \ + k80, k81, k91, k82, k92, k83, k93, k84, k94, k85, k95, k86, k87, k97, \ + ka0, kb0, ka1, ka3, ka5, ka6, kb6, ka7, kb7 \ +) \ +{ \ + { k00, k01, k02, k03, k04, XXX, k06, k07 }, \ + { XXX, k11, k12, k13, k14, k15, k16, k17 }, \ + { k20, k21, k22, k23, k24, k25, k26, XXX }, \ + { k30, k31, k32, k33, k34, k35, k36, k37 }, \ + { k40, k41, k42, k43, k44, k45, XXX, k47 }, \ + { k50, k51, k52, k53, k54, k55, k56, k57 }, \ + { k60, k61, k62, k63, k64, k65, XXX, XXX }, \ + { k70, k71, k72, k73, k74, k75, k76, k77 }, \ + { k80, k81, k82, k83, k84, k85, k86, k87 }, \ + { XXX, k91, k92, k93, k94, k95, XXX, k97 }, \ + { ka0, ka1, XXX, ka3, XXX, ka5, ka6, ka7 }, \ + { kb0, XXX, XXX, XXX, XXX, XXX, kb6, kb7 }, \ +} + +#define LAYOUT_ansi_wkl( \ + k00, k01, k11, k02, k12, k03, k13, k04, k14, k15, k06, k16, k07, k17, \ + k20, k30, k21, k31, k22, k32, k23, k33, k24, k34, k25, k35, k26, k36, k37, \ + k40, k50, k41, k51, k42, k52, k43, k53, k44, k54, k45, k55, k56, k47, k57, \ + k60, k70, k61, k71, k62, k72, k63, k73, k64, k74, k65, k75, k76, k77, \ + k80, k81, k91, k82, k92, k83, k93, k84, k94, k85, k95, k86, k87, k97, \ + ka0, kb0, ka3, ka5, ka6, kb6, ka7, kb7 \ +) \ +{ \ + { k00, k01, k02, k03, k04, XXX, k06, k07 }, \ + { XXX, k11, k12, k13, k14, k15, k16, k17 }, \ + { k20, k21, k22, k23, k24, k25, k26, XXX }, \ + { k30, k31, k32, k33, k34, k35, k36, k37 }, \ + { k40, k41, k42, k43, k44, k45, XXX, k47 }, \ + { k50, k51, k52, k53, k54, k55, k56, k57 }, \ + { k60, k61, k62, k63, k64, k65, XXX, XXX }, \ + { k70, k71, k72, k73, k74, k75, k76, k77 }, \ + { k80, k81, k82, k83, k84, k85, k86, k87 }, \ + { XXX, k91, k92, k93, k94, k95, XXX, k97 }, \ + { ka0, XXX, XXX, ka3, XXX, ka5, ka6, ka7 }, \ + { kb0, XXX, XXX, XXX, XXX, XXX, kb6, kb7 }, \ +} + +#define LAYOUT_iso( \ + k00, k01, k11, k02, k12, k03, k13, k04, k14, k15, k06, k16, k07, k17, \ + k20, k30, k21, k31, k22, k32, k23, k33, k24, k34, k25, k35, k26, k36, k37, \ + k40, k50, k41, k51, k42, k52, k43, k53, k44, k54, k45, k55, k56, k47, k57, \ + k60, k70, k61, k71, k62, k72, k63, k73, k64, k74, k65, k75, k76, k77, \ + k80, k90, k81, k91, k82, k92, k83, k93, k84, k94, k85, k95, k86, k87, k97, \ + ka0, kb0, ka1, ka3, ka5, ka6, kb6, ka7, kb7 \ +) \ +{ \ + { k00, k01, k02, k03, k04, XXX, k06, k07 }, \ + { XXX, k11, k12, k13, k14, k15, k16, k17 }, \ + { k20, k21, k22, k23, k24, k25, k26, XXX }, \ + { k30, k31, k32, k33, k34, k35, k36, k37 }, \ + { k40, k41, k42, k43, k44, k45, XXX, k47 }, \ + { k50, k51, k52, k53, k54, k55, k56, k57 }, \ + { k60, k61, k62, k63, k64, k65, XXX, XXX }, \ + { k70, k71, k72, k73, k74, k75, k76, k77 }, \ + { k80, k81, k82, k83, k84, k85, k86, k87 }, \ + { k90, k91, k92, k93, k94, k95, XXX, k97 }, \ + { ka0, ka1, XXX, ka3, XXX, ka5, ka6, ka7 }, \ + { kb0, XXX, XXX, XXX, XXX, XXX, kb6, kb7 }, \ +} + +#define LAYOUT_iso_wkl( \ + k00, k01, k11, k02, k12, k03, k13, k04, k14, k15, k06, k16, k07, k17, \ + k20, k30, k21, k31, k22, k32, k23, k33, k24, k34, k25, k35, k26, k36, k37, \ + k40, k50, k41, k51, k42, k52, k43, k53, k44, k54, k45, k55, k56, k47, k57, \ + k60, k70, k61, k71, k62, k72, k63, k73, k64, k74, k65, k75, k76, k77, \ + k80, k90, k81, k91, k82, k92, k83, k93, k84, k94, k85, k95, k86, k87, k97, \ + ka0, kb0, ka3, ka5, ka6, kb6, ka7, kb7 \ +) \ +{ \ + { k00, k01, k02, k03, k04, XXX, k06, k07 }, \ + { XXX, k11, k12, k13, k14, k15, k16, k17 }, \ + { k20, k21, k22, k23, k24, k25, k26, XXX }, \ + { k30, k31, k32, k33, k34, k35, k36, k37 }, \ + { k40, k41, k42, k43, k44, k45, XXX, k47 }, \ + { k50, k51, k52, k53, k54, k55, k56, k57 }, \ + { k60, k61, k62, k63, k64, k65, XXX, XXX }, \ + { k70, k71, k72, k73, k74, k75, k76, k77 }, \ + { k80, k81, k82, k83, k84, k85, k86, k87 }, \ + { k90, k91, k92, k93, k94, k95, XXX, k97 }, \ + { ka0, XXX, XXX, ka3, XXX, ka5, ka6, ka7 }, \ + { kb0, XXX, XXX, XXX, XXX, XXX, kb6, kb7 }, \ +} + +#define LAYOUT_all( \ + k00, k01, k11, k02, k12, k03, k13, k04, k14, k15, k06, k16, k07, k17, \ + k20, k30, k21, k31, k22, k32, k23, k33, k24, k34, k25, k35, k26, k36, k27, k37, \ + k40, k50, k41, k51, k42, k52, k43, k53, k44, k54, k45, k55, k56, k47, k57, \ + k60, k70, k61, k71, k62, k72, k63, k73, k64, k74, k65, k75, k76, k77, \ + k80, k90, k81, k91, k82, k92, k83, k93, k84, k94, k85, k95, k86, k87, k97, \ + ka0, kb0, ka1, ka3, ka5, kb5, ka6, kb6, ka7, kb7 \ +) \ +{ \ + { k00, k01, k02, k03, k04, XXX, k06, k07 }, \ + { XXX, 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, XXX, k47 }, \ + { k50, k51, k52, k53, k54, k55, k56, k57 }, \ + { k60, k61, k62, k63, k64, k65, XXX, XXX }, \ + { k70, k71, k72, k73, k74, k75, k76, k77 }, \ + { k80, k81, k82, k83, k84, k85, k86, k87 }, \ + { k90, k91, k92, k93, k94, k95, XXX, k97 }, \ + { ka0, ka1, XXX, ka3, XXX, ka5, ka6, ka7 }, \ + { kb0, XXX, XXX, XXX, XXX, kb5, kb6, kb7 }, \ +} diff --git a/keyboards/ghs/rar/readme.md b/keyboards/ghs/rar/readme.md new file mode 100644 index 000000000000..cb08e9334a13 --- /dev/null +++ b/keyboards/ghs/rar/readme.md @@ -0,0 +1,15 @@ +# GHS.RAR + +![GHS.RAR](https://i.imgur.com/5n893ul.jpg) + +A seamless screwless 75% keyboard. + +* Keyboard Maintainer: [Ramon Imbao](https://github.com/ramonimbao) +* Hardware Supported: ATmega32u4 +* Hardware Availability: [Gone Hacking Studio](https://gonehacking.studio) + +Make example for this keyboard (after setting up your build environment): + + make ghs/rar: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/ghs/rar/rules.mk b/keyboards/ghs/rar/rules.mk new file mode 100644 index 000000000000..c291ba802782 --- /dev/null +++ b/keyboards/ghs/rar/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 = 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 = 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 +FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches From 092849622017fcd32c1b3e4708030b1cf2fd6ade Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Guillaume=20G=C3=A9rard?= <1322081+GreatWizard@users.noreply.github.com> Date: Sun, 28 Jun 2020 19:45:16 +0200 Subject: [PATCH 282/930] [Keyboard] Refactor JJ50 keyboard mapping to current standard (#9415) --- keyboards/jj50/README.md | 10 +- keyboards/jj50/config.h | 13 +- keyboards/jj50/jj50.h | 8 +- keyboards/jj50/keymaps/default/README.md | 117 ++++++++++++ keyboards/jj50/keymaps/default/keymap.c | 222 +++++++++++++++-------- keyboards/jj50/rules.mk | 25 ++- keyboards/readme.md | 1 + 7 files changed, 292 insertions(+), 104 deletions(-) create mode 100644 keyboards/jj50/keymaps/default/README.md diff --git a/keyboards/jj50/README.md b/keyboards/jj50/README.md index 2d3e711becc9..9719f01ecac1 100644 --- a/keyboards/jj50/README.md +++ b/keyboards/jj50/README.md @@ -1,10 +1,12 @@ # JJ50 -A preonic-like board +![JJ50 + SA Vilebloom (w/ Sakurios) by u/rendleshift](https://i.imgur.com/SwYZ4wol.jpg) -* Keyboard Maintainer: [Wayne K. Jones](github.com/WarmCatUK) -* Hardware Supported: JJ50 with the ATmega32a chip. -* Hardware Availability: [KPrepublic on AliExpress](https://www.aliexpress.com/item/jj50-v1-0-Custom-Mechanical-Keyboard-50-PCB-programmed-50-preonic-layouts-bface-firmware-with-rgb/32848915277.html) +A compact 50% (5x12) ortholinear keyboard made and sold by KPrepublic. + +* Keyboard Maintainer: [QMK Community](https://github.com/qmk) +* Hardware Supported: Atmega32A +* Hardware Availability: [AliExpress](https://www.aliexpress.com/item/jj50-v1-0-Custom-Mechanical-Keyboard-50-PCB-programmed-50-preonic-layouts-bface-firmware-with-rgb/32848915277.html); [KPrepublic](https://kprepublic.com/collections/jj50-50/products/jj50-50-custom-keyboard-pcb-similar-with-preonic) Make example for this keyboard (after setting up your build environment): diff --git a/keyboards/jj50/config.h b/keyboards/jj50/config.h index 8453f55880f7..a1840919ee41 100644 --- a/keyboards/jj50/config.h +++ b/keyboards/jj50/config.h @@ -2,6 +2,7 @@ Base Copyright 2017 Luiz Ribeiro Modified 2017 Andrew Novak Modified 2018 Wayne Jones (WarmCatUK) +Modified 2020 Guillaume Gérard This 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,17 +18,16 @@ 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" -#define VENDOR_ID 0x20A0 -#define PRODUCT_ID 0x422D +#define VENDOR_ID 0x4B50 // "KP" +#define PRODUCT_ID 0x0050 #define DEVICE_VER 0x0200 #define MANUFACTURER KPrepublic #define PRODUCT JJ50 -#define DESCRIPTION Preonic-like clone +#define DESCRIPTION A compact 50% (5x12) ortholinear keyboard /* matrix size */ #define MATRIX_ROWS 5 @@ -38,6 +38,7 @@ along with this program. If not, see . #define BACKLIGHT_PIN D4 #define BACKLIGHT_LEVELS 12 +#define BACKLIGHT_BREATHING #define RGB_DI_PIN E2 #define RGBLED_NUM 12 @@ -45,5 +46,3 @@ along with this program. If not, see . #define RGBLIGHT_HUE_STEP 12 #define RGBLIGHT_SAT_STEP 15 #define RGBLIGHT_VAL_STEP 18 - -#endif diff --git a/keyboards/jj50/jj50.h b/keyboards/jj50/jj50.h index 6b1c7eacf3bb..59d5c6409731 100644 --- a/keyboards/jj50/jj50.h +++ b/keyboards/jj50/jj50.h @@ -17,13 +17,9 @@ 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_ortho_5x12( \ K011, K010, K009, K008, K004, K005, K006, K007, K003, K002, K201, K000, \ @@ -40,5 +36,3 @@ along with this program. If not, see . } #define LAYOUT LAYOUT_ortho_5x12 - -#endif diff --git a/keyboards/jj50/keymaps/default/README.md b/keyboards/jj50/keymaps/default/README.md new file mode 100644 index 000000000000..49622dd2957b --- /dev/null +++ b/keyboards/jj50/keymaps/default/README.md @@ -0,0 +1,117 @@ +# JJ50 default keymaps + +## Base layers + +### 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 | +|------+------+------+------+------+------+------+------+------+------+------+------| +| FN | Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | +`-----------------------------------------------------------------------------------' +``` + +### 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 | +|------+------+------+------+------+------+------+------+------+------+------+------| +| FN | Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | +`-----------------------------------------------------------------------------------' +``` + +### 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 | +|------+------+------+------+------+------+------+------+------+------+------+------| +| FN | Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | +`-----------------------------------------------------------------------------------' +``` + +## Momentarily Layers + +### Lower + +``` +,-----------------------------------------------------------------------------------. +| ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Bksp | +|------+------+------+------+------+-------------+------+------+------+------+------| +| ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Del | +|------+------+------+------+------+-------------+------+------+------+------+------| +| Del | F1 | F2 | F3 | F4 | F5 | F6 | _ | + | { | } | | | +|------+------+------+------+------+------|------+------+------+------+------+------| +| | F7 | F8 | F9 | F10 | F11 | F12 |ISO ~ |ISO | | Home | End | | +|------+------+------+------+------+------+------+------+------+------+------+------| +| | | | | | | | Next | Vol- | Vol+ | Play | +`-----------------------------------------------------------------------------------' +``` + +### 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 / |PageUp|PageDn| | +|------+------+------+------+------+------+------+------+------+------+------+------| +| | | | | | | | Next | Vol- | Vol+ | Play | +`-----------------------------------------------------------------------------------' +``` + +### Adjust (Lower + Raise) + +``` +,-----------------------------------------------------------------------------------. +| F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | +|------+------+------+------+------+------+------+------+------+------+------+------| +| | Reset| | | | | | | | | | Del | +|------+------+------+------+------+-------------+------+------+------+------+------| +| | | | | | | |Qwerty|Colemk|Dvorak| | | +|------+------+------+------+------+------|------+------+------+------+------+------| +| | | | | | | | | | | | | +|------+------+------+------+------+------+------+------+------+------+------+------| +| | | | | | | | | | | | +`-----------------------------------------------------------------------------------' +``` + +### Fn (rgblight and backlight layout) + +``` +,-----------------------------------------------------------------------------------. +| | | | | | | | | | | | | +|------+------+------+------+------+------+------+------+------+------+------+------| +| | | | | | | | | |RGBVA-|RGBVA+| | +|------+------+------+------+------+------+------+------+------+------+------+------| +| | | | | | | | | |RGBSA-|RGBSA+| | +|------+------+------+------+------+------+------+------+------+------+------+------| +| | | | | | | | |RGBTOG|RGBHU-|RGBHU+|RGBMOD| +|------+------+------+------+------+------+------+------+------+------+------+------| +| | | | | | | |BLTOGG| BL- | BL+ |BLBRTG| +`-----------------------------------------------------------------------------------' +``` diff --git a/keyboards/jj50/keymaps/default/keymap.c b/keyboards/jj50/keymaps/default/keymap.c index d5334d4956b9..29db0e265f58 100644 --- a/keyboards/jj50/keymaps/default/keymap.c +++ b/keyboards/jj50/keymaps/default/keymap.c @@ -1,7 +1,5 @@ /* -Base Copyright 2017 Luiz Ribeiro -Modified 2017 Andrew Novak -Modified 2018 Wayne Jones (WarmCatUK) +Copyright 2020 Guillaume Gérard This 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,117 +17,197 @@ along with this program. If not, see . #include QMK_KEYBOARD_H -#define ______ KC_TRNS -#define _DEFLT 0 -#define _RAISE 1 -#define _LOWER 2 -#define _FN 3 - -enum custom_keycodes { - P_MACRO = SAFE_RANGE +enum layers { + _QWERTY, + _COLEMAK, + _DVORAK, + _LOWER, + _RAISE, + _ADJUST, + _FN }; -// GBP £ Macro (sends alt 156 - windows users only) -bool process_record_user(uint16_t keycode, keyrecord_t *record) { - if (record->event.pressed) { - switch(keycode) { - case P_MACRO: - SEND_STRING(SS_DOWN(X_LALT)); - SEND_STRING(SS_TAP(X_KP_1)); - SEND_STRING(SS_TAP(X_KP_5)); - SEND_STRING(SS_TAP(X_KP_6)); - SEND_STRING(SS_UP(X_LALT)); - return false; break; - } - } - return true; +enum keycodes { + QWERTY = SAFE_RANGE, + COLEMAK, + DVORAK }; +#define FN MO(_FN) +#define LOWER MO(_LOWER) +#define RAISE MO(_RAISE) + const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Qwerty * ,-----------------------------------------------------------------------------------. - * | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | Tab | Q | W | E | R | T | Y | U | I | O | P | Bksp | + * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | * |------+------+------+------+------+------+------+------+------+------+------+------| - * | Esc | A | S | D | F | G | H | J | K | L | ; | " | + * | 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 | * |------+------+------+------+------+------+------+------+------+------+------+------| - * | Shift| Z | X | C | V | B | N | M | , | . | / |Enter | (Hold for shift / tap for enter) - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | _FN | Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | + * | FN | Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | * `-----------------------------------------------------------------------------------' */ - [_DEFLT] = LAYOUT( \ - KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, 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_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(_FN), KC_LCTL, KC_LALT, KC_LGUI, MO(_LOWER),KC_SPC,KC_SPC,MO(_RAISE),KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \ + [_QWERTY] = LAYOUT( + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, + KC_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, KC_ENT, + FN, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT ), - /* Raise + /* Colemak * ,-----------------------------------------------------------------------------------. - * | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | + * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | * |------+------+------+------+------+------+------+------+------+------+------+------| - * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Del | + * | 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 | * |------+------+------+------+------+------+------+------+------+------+------+------| - * | | | | | | | | | | [ | ] | \ | + * | FN | Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | + * `-----------------------------------------------------------------------------------' + */ + [_COLEMAK] = LAYOUT( + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, + KC_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, + FN, 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 | * |------+------+------+------+------+------+------+------+------+------+------+------| - * | | | | | | | |ISO # |ISO / | PUP | PDN | | + * | 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 | * |------+------+------+------+------+------+------+------+------+------+------+------| - * | | | | | | | | Next | Vol- | Vol+ | Play | + * | FN | Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | * `-----------------------------------------------------------------------------------' */ - - [_RAISE] = 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_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL, \ - RESET, BL_INC, RGB_SAI, _______, _______, _______, _______, _______, _______, KC_LBRC, KC_RBRC, KC_BSLS, \ - _______, BL_DEC, _______, _______, _______, _______, _______, KC_NUHS, KC_NUBS, KC_PGUP, KC_PGDN, _______, \ - RGB_TOG, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY \ + [_DVORAK] = LAYOUT( + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, + KC_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, + FN, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT ), /* Lower * ,-----------------------------------------------------------------------------------. - * | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | - * |------+------+------+------+------+------+------+------+------+------+------+------| + * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Del | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Del | F1 | F2 | F3 | F4 | F5 | F6 | _ | + | { | } | | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | F7 | F8 | F9 | F10 | F11 | F12 |ISO ~ |ISO | | 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_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 + * ,-----------------------------------------------------------------------------------. + * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | * |------+------+------+------+------+------+------+------+------+------+------+------| - * | | | | | | | |ISO ~ |ISO | | HOM | END | | + * | ` | 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 / |PageUp|PageDn| | * |------+------+------+------+------+------+------+------+------+------+------+------| * | | | | | | | | Next | Vol- | Vol+ | Play | * `-----------------------------------------------------------------------------------' */ - - [_LOWER] = 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_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_DEL, \ - RESET, _______, _______, _______, _______, _______, _______, _______, _______, KC_LCBR, KC_RCBR, KC_PIPE, \ - _______, _______, _______, _______, _______, _______, _______,S(KC_NUHS),S(KC_NUBS),KC_HOME, KC_END, _______, \ - BL_STEP, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY \ + [_RAISE] = LAYOUT( + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL, + KC_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 ), - /* Fn + /* Adjust (Lower + Raise) * ,-----------------------------------------------------------------------------------. - * | | | £ | | | | | | | | | | + * | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | Reset| | | | | | | | | | Del | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | | | | | | |Qwerty|Colemk|Dvorak| | | + * |------+------+------+------+------+------|------+------+------+------+------+------| * | | | | | | | | | | | | | * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | + * `-----------------------------------------------------------------------------------' + */ + [_ADJUST] = LAYOUT( + KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, + _______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL, + _______, _______, _______, _______, _______, _______, _______, QWERTY, COLEMAK, DVORAK, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + + /* Fn (rgblight and backlight layout) + * ,-----------------------------------------------------------------------------------. * | | | | | | | | | | | | | * |------+------+------+------+------+------+------+------+------+------+------+------| - * | | | | | | | | | | | | | + * | | | | | | | | | |RGBVA-|RGBVA+| | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | |RGBSA-|RGBSA+| | * |------+------+------+------+------+------+------+------+------+------+------+------| - * | | | | | | | | |BL_OFF|BL_DEC|BL_INC|BL_ON | + * | | | | | | | | |RGBTOG|RGBHU-|RGBHU+|RGBMOD| + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | |BLTOGG| BL- | BL+ |BLBRTG| * `-----------------------------------------------------------------------------------' */ - [_FN] = LAYOUT( \ - _______, _______, P_MACRO, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ - _______, _______, _______, _______, _______, _______, _______, _______, BL_OFF, BL_DEC, BL_INC, BL_ON \ + [_FN] = LAYOUT( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_VAD, RGB_VAI, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_SAD, RGB_SAI, _______, + _______, _______, _______, _______, _______, _______, _______, _______, RGB_TOG, RGB_HUD, RGB_HUI, RGB_MOD, + _______, _______, _______, _______, _______, _______, _______, _______, BL_TOGG, BL_DEC, BL_INC, BL_BRTG ) }; + +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/jj50/rules.mk b/keyboards/jj50/rules.mk index 73be71d35efd..8f78a7674691 100644 --- a/keyboards/jj50/rules.mk +++ b/keyboards/jj50/rules.mk @@ -12,19 +12,16 @@ MCU = atmega32a BOOTLOADER = bootloadHID # build options -BOOTMAGIC_ENABLE = yes -MOUSEKEY_ENABLE = no -EXTRAKEY_ENABLE = yes -CONSOLE_ENABLE = no -COMMAND_ENABLE = yes -BACKLIGHT_ENABLE = yes -RGBLIGHT_ENABLE = yes -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 - -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 +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 +RGBLIGHT_ENABLE = yes # Enable keyboard underlight functionality +WS2812_DRIVER = i2c # This driver powers the RGB Lighting and RGB Matrix features +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend - # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +LTO_ENABLE = yes # Enable link time optimization LAYOUTS = ortho_5x12 diff --git a/keyboards/readme.md b/keyboards/readme.md index db2a18cc9322..30f856847d22 100644 --- a/keyboards/readme.md +++ b/keyboards/readme.md @@ -45,6 +45,7 @@ These keyboards are part of the QMK repository, but their manufacturers are not * [Infinity 60%](/keyboards/infinity60) - — Compact community keyboard by Input Club. * [JD45](/keyboards/jd45) — Another Geekhack community project, designed by jdcarpe. * [JJ40](/keyboards/jj40) — ps2avrGB based ortholinear sold by KPrepublic +* [JJ50](/keyboards/jj50) — A compact 50% (5x12) ortholinear keyboard sold by KPrepublic. * [KBD75](/keyboards/kbd75) — A 75% keyboard made by made by KBDFans. * [KC60](/keyboards/kc60) — A programmable Chinese-made keyboard, lost in the mists of time. * [Kinesis Advantage](/keyboards/kinesis) — Contoured ergonomic keyboard by Kinesis Computer Ergonomics. From b215bc3aba9bb5feb7edfc7166afdc30cb1a0b1d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Guillaume=20G=C3=A9rard?= <1322081+GreatWizard@users.noreply.github.com> Date: Sun, 28 Jun 2020 23:47:33 +0200 Subject: [PATCH 283/930] Add workman layout in JJ50 default keymap (#9574) --- keyboards/jj50/keymaps/default/README.md | 26 ++++++++++--- keyboards/jj50/keymaps/default/keymap.c | 48 +++++++++++++++++++----- 2 files changed, 59 insertions(+), 15 deletions(-) diff --git a/keyboards/jj50/keymaps/default/README.md b/keyboards/jj50/keymaps/default/README.md index 49622dd2957b..15a480ae1140 100644 --- a/keyboards/jj50/keymaps/default/README.md +++ b/keyboards/jj50/keymaps/default/README.md @@ -18,6 +18,22 @@ `-----------------------------------------------------------------------------------' ``` +### Workman + +``` +,-----------------------------------------------------------------------------------. +| ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | +|------+------+------+------+------+------+------+------+------+------+------+------| +| Tab | Q | D | R | W | B | J | F | U | P | ; | Del | +|------+------+------+------+------+-------------+------+------+------+------+------| +| Esc | A | S | H | T | G | Y | N | E | O | I | ' | +|------+------+------+------+------+------|------+------+------+------+------+------| +| Shift| Z | X | M | C | V | K | L | , | . | / |Enter | +|------+------+------+------+------+------+------+------+------+------+------+------| +| Num | Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | +`-----------------------------------------------------------------------------------' +``` + ### Colemak ``` @@ -56,9 +72,9 @@ ``` ,-----------------------------------------------------------------------------------. -| ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Bksp | +| ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | | |------+------+------+------+------+-------------+------+------+------+------+------| -| ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Del | +| ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | | |------+------+------+------+------+-------------+------+------+------+------+------| | Del | F1 | F2 | F3 | F4 | F5 | F6 | _ | + | { | } | | | |------+------+------+------+------+------|------+------+------+------+------+------| @@ -72,9 +88,9 @@ ``` ,-----------------------------------------------------------------------------------. -| ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | +| ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | | |------+------+------+------+------+------+------+------+------+------+------+------| -| ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Del | +| ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | | |------+------+------+------+------+-------------+------+------+------+------+------| | Del | F1 | F2 | F3 | F4 | F5 | F6 | - | = | [ | ] | \ | |------+------+------+------+------+------|------+------+------+------+------+------| @@ -92,7 +108,7 @@ |------+------+------+------+------+------+------+------+------+------+------+------| | | Reset| | | | | | | | | | Del | |------+------+------+------+------+-------------+------+------+------+------+------| -| | | | | | | |Qwerty|Colemk|Dvorak| | | +|CPSLCK| | | | | | |Qwerty|Workmn|Colemk|Dvorak| | |------+------+------+------+------+------|------+------+------+------+------+------| | | | | | | | | | | | | | |------+------+------+------+------+------+------+------+------+------+------+------| diff --git a/keyboards/jj50/keymaps/default/keymap.c b/keyboards/jj50/keymaps/default/keymap.c index 29db0e265f58..96a308f82a5c 100644 --- a/keyboards/jj50/keymaps/default/keymap.c +++ b/keyboards/jj50/keymaps/default/keymap.c @@ -19,6 +19,7 @@ along with this program. If not, see . enum layers { _QWERTY, + _WORKMAN, _COLEMAK, _DVORAK, _LOWER, @@ -29,6 +30,7 @@ enum layers { enum keycodes { QWERTY = SAFE_RANGE, + WORKMAN, COLEMAK, DVORAK }; @@ -60,6 +62,27 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { FN, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT ), + /* Workman + * ,-----------------------------------------------------------------------------------. + * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Tab | Q | D | R | W | B | J | F | U | P | ; | Del | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Esc | A | S | H | T | G | Y | N | E | O | I | ' | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | Shift| Z | X | M | C | V | K | L | , | . | / |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Num | Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | + * `-----------------------------------------------------------------------------------' + */ + [_WORKMAN] = LAYOUT( + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, + KC_TAB, KC_Q, KC_D, KC_R, KC_W, KC_B, KC_J, KC_F, KC_U, KC_P, KC_SCLN, KC_DEL, + 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, KC_ENT, + FN, 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 | @@ -104,9 +127,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Lower * ,-----------------------------------------------------------------------------------. - * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Bksp | + * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | | * |------+------+------+------+------+-------------+------+------+------+------+------| - * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Del | + * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | | * |------+------+------+------+------+-------------+------+------+------+------+------| * | Del | F1 | F2 | F3 | F4 | F5 | F6 | _ | + | { | } | | | * |------+------+------+------+------+------|------+------+------+------+------+------| @@ -116,8 +139,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `-----------------------------------------------------------------------------------' */ [_LOWER] = LAYOUT( - KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_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_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, _______, + KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, _______, KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, _______, KC_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 @@ -125,9 +148,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Raise * ,-----------------------------------------------------------------------------------. - * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | + * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | | * |------+------+------+------+------+------+------+------+------+------+------+------| - * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Del | + * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | | * |------+------+------+------+------+-------------+------+------+------+------+------| * | Del | F1 | F2 | F3 | F4 | F5 | F6 | - | = | [ | ] | \ | * |------+------+------+------+------+------|------+------+------+------+------+------| @@ -137,8 +160,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `-----------------------------------------------------------------------------------' */ [_RAISE] = LAYOUT( - KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, - KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL, + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, _______, + 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_MNXT, KC_VOLD, KC_VOLU, KC_MPLY @@ -150,7 +173,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |------+------+------+------+------+------+------+------+------+------+------+------| * | | Reset| | | | | | | | | | Del | * |------+------+------+------+------+-------------+------+------+------+------+------| - * | | | | | | | |Qwerty|Colemk|Dvorak| | | + * |CPSLCK| | | | | | |Qwerty|Workmn|Colemk|Dvorak| | * |------+------+------+------+------+------|------+------+------+------+------+------| * | | | | | | | | | | | | | * |------+------+------+------+------+------+------+------+------+------+------+------| @@ -160,7 +183,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_ADJUST] = LAYOUT( KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL, - _______, _______, _______, _______, _______, _______, _______, QWERTY, COLEMAK, DVORAK, _______, _______, + KC_CAPS, _______, _______, _______, _______, _______, _______, QWERTY, WORKMAN, COLEMAK, DVORAK, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ ), @@ -198,6 +221,11 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { set_single_persistent_default_layer(_QWERTY); } return false; + case WORKMAN: + if (record->event.pressed) { + set_single_persistent_default_layer(_WORKMAN); + } + return false; case COLEMAK: if (record->event.pressed) { set_single_persistent_default_layer(_COLEMAK); From 51509ec07bb6e442301c5a0b07638cd52ff89e38 Mon Sep 17 00:00:00 2001 From: mcginnisa Date: Sun, 28 Jun 2020 15:26:33 -0700 Subject: [PATCH 284/930] Add DZ60 keymap lint_kid (#9477) * adding dz60 layout lint_kid * adding dz60 layout lint_kid, removed readme * removing wrong commented layout from dz60 lint_kid layout * added readme * Apply suggestions from code review Co-authored-by: Joel Challis Co-authored-by: Joel Challis --- keyboards/dz60/keymaps/lint_kid/config.h | 3 ++ keyboards/dz60/keymaps/lint_kid/keymap.c | 56 +++++++++++++++++++++++ keyboards/dz60/keymaps/lint_kid/readme.md | 11 +++++ 3 files changed, 70 insertions(+) create mode 100644 keyboards/dz60/keymaps/lint_kid/config.h create mode 100644 keyboards/dz60/keymaps/lint_kid/keymap.c create mode 100644 keyboards/dz60/keymaps/lint_kid/readme.md diff --git a/keyboards/dz60/keymaps/lint_kid/config.h b/keyboards/dz60/keymaps/lint_kid/config.h new file mode 100644 index 000000000000..090dcf747155 --- /dev/null +++ b/keyboards/dz60/keymaps/lint_kid/config.h @@ -0,0 +1,3 @@ +#pragma once + +#define GRAVE_ESC_GUI_OVERRIDE // Always send Escape if GUI is pressed diff --git a/keyboards/dz60/keymaps/lint_kid/keymap.c b/keyboards/dz60/keymaps/lint_kid/keymap.c new file mode 100644 index 000000000000..5134836a261d --- /dev/null +++ b/keyboards/dz60/keymaps/lint_kid/keymap.c @@ -0,0 +1,56 @@ +#include QMK_KEYBOARD_H +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + // layer 0 + LAYOUT_directional( + 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, KC_RSFT, KC_RSFT, + KC_LCTL, KC_LGUI, KC_LALT, LT(5,KC_SPC), LT(5,KC_SPC), LT(5,KC_SPC), LT(3,KC_LEFT), KC_DOWN, _______, KC_UP, KC_RIGHT + ), + + // layer 1 toggle hardware caps layer + LAYOUT_directional( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + LT(4,KC_ENT), _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + //layer 2 toggle space layer + LAYOUT_directional( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, KC_SPC, KC_SPC, KC_SPC, _______, _______, _______, _______, _______ + ), + + // layer 3 FN + LAYOUT_directional( + 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, + KC_TILD, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, _______, _______, _______, _______, _______, + TG(1), BL_TOGG, BL_STEP, BL_INC, BL_DEC, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, TG(2), TG(2), TG(2), _______, _______, _______, _______, _______ + ), + + // layer 4 caps + LAYOUT_directional( + 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_TILD, KC_DEL, KC_UP,LSFT(LCTL(KC_TAB)), LCTL(KC_TAB), _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, KC_LEFT, KC_DOWN, KC_RIGHT, LCTL(KC_W), _______, _______, _______, _______, _______, _______, _______, + _______, _______, KC_LPRN, KC_RPRN, KC_BSPC, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, KC_BSPC, KC_BSPC, KC_BSPC, _______, _______, _______, _______, _______ + ), + + // layer 5 space + LAYOUT_directional( + 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_TILD, KC_LCBR, KC_RCBR, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, KC_LBRC, KC_RBRC, KC_MINS, KC_EQL, KC_BSLS, _______, _______, _______, _______, _______, _______, + _______, _______, KC_LPRN, KC_RPRN, KC_UNDS, KC_PLUS, KC_PIPE, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), +}; diff --git a/keyboards/dz60/keymaps/lint_kid/readme.md b/keyboards/dz60/keymaps/lint_kid/readme.md new file mode 100644 index 000000000000..265668016d52 --- /dev/null +++ b/keyboards/dz60/keymaps/lint_kid/readme.md @@ -0,0 +1,11 @@ +# DZ60 + +![DZ60](https://i.imgur.com/8eeYOzU.jpg) + +https://kbdfans.com/products/dz60-60-pcb + +Make example for this keyboard (after setting up your build environment): + + qmk compile -kb dz60 -km lint_kid + +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 2c0201e80f7d1e477440c3a0cfcb9b90575a002a Mon Sep 17 00:00:00 2001 From: AlisGraveNil <63020540+AlisGraveNil@users.noreply.github.com> Date: Sun, 28 Jun 2020 21:37:47 -0400 Subject: [PATCH 285/930] [Keyboard] Coupe and Sedan keyboards (#9539) * Initial upload - sedan and coupe keyboards * Update coupe.h * Update coupe.h * Update coupe.h * Update sedan.h * Update keyboards/clawsome/coupe/readme.md * Update keyboards/clawsome/sedan/config.h * Update keyboards/clawsome/sedan/config.h * Update keyboards/clawsome/coupe/config.h * Update keyboards/clawsome/sedan/readme.md * Update keyboards/clawsome/sedan/info.json * Update keyboards/clawsome/sedan/readme.md * Update keyboards/clawsome/coupe/readme.md * Update keyboards/clawsome/coupe/info.json * Update keyboards/clawsome/coupe/coupe.h * Update keyboards/clawsome/coupe/info.json * Update keyboards/clawsome/coupe/info.json * Update keyboards/clawsome/coupe/keymaps/default/keymap.c * Update keyboards/clawsome/sedan/info.json * Update keyboards/clawsome/sedan/sedan.h * Update keyboards/clawsome/sedan/rules.mk * Update keyboards/clawsome/sedan/sedan.h * Update keyboards/clawsome/sedan/keymap/default/keymap.c * Update keyboards/clawsome/sedan/keymap/default/keymap.c * Update keyboards/clawsome/coupe/rules.mk * Update keyboards/clawsome/sedan/info.json * Update keyboards/clawsome/sedan/info.json * Rename keymap.c to keymaps.c * Rename keymap.c to keymaps.c * folder name updated * updated keymaps * remove erroneously added files * extend keymap functionality * Update config.h * Update config.h * added URL on line #3 for image of Coupe * Added URL to line #3 * Update keyboards/clawsome/sedan/readme.md * Update keyboards/clawsome/coupe/readme.md --- keyboards/clawsome/coupe/config.h | 47 +++++++++++ keyboards/clawsome/coupe/coupe.c | 16 ++++ keyboards/clawsome/coupe/coupe.h | 37 +++++++++ keyboards/clawsome/coupe/info.json | 74 +++++++++++++++++ .../clawsome/coupe/keymaps/default/keymap.c | 63 +++++++++++++++ keyboards/clawsome/coupe/readme.md | 15 ++++ keyboards/clawsome/coupe/rules.mk | 27 +++++++ keyboards/clawsome/sedan/config.h | 47 +++++++++++ keyboards/clawsome/sedan/info.json | 81 +++++++++++++++++++ .../clawsome/sedan/keymaps/default/keymap.c | 61 ++++++++++++++ keyboards/clawsome/sedan/readme.md | 15 ++++ keyboards/clawsome/sedan/rules.mk | 27 +++++++ keyboards/clawsome/sedan/sedan.c | 16 ++++ keyboards/clawsome/sedan/sedan.h | 32 ++++++++ 14 files changed, 558 insertions(+) create mode 100644 keyboards/clawsome/coupe/config.h create mode 100644 keyboards/clawsome/coupe/coupe.c create mode 100644 keyboards/clawsome/coupe/coupe.h create mode 100644 keyboards/clawsome/coupe/info.json create mode 100644 keyboards/clawsome/coupe/keymaps/default/keymap.c create mode 100644 keyboards/clawsome/coupe/readme.md create mode 100644 keyboards/clawsome/coupe/rules.mk create mode 100644 keyboards/clawsome/sedan/config.h create mode 100644 keyboards/clawsome/sedan/info.json create mode 100644 keyboards/clawsome/sedan/keymaps/default/keymap.c create mode 100644 keyboards/clawsome/sedan/readme.md create mode 100644 keyboards/clawsome/sedan/rules.mk create mode 100644 keyboards/clawsome/sedan/sedan.c create mode 100644 keyboards/clawsome/sedan/sedan.h diff --git a/keyboards/clawsome/coupe/config.h b/keyboards/clawsome/coupe/config.h new file mode 100644 index 000000000000..381f5cdc2b38 --- /dev/null +++ b/keyboards/clawsome/coupe/config.h @@ -0,0 +1,47 @@ +/* +Copyright 2020 AAClawson (AlisGraveNil) + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License 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 0x7767 +#define PRODUCT_ID 0x7E94 +#define DEVICE_VER 0x0001 +#define MANUFACTURER AlisGraveNil +#define PRODUCT The Coupe +#define DESCRIPTION A 61-key/60% QMK-powered custom keyboard + +/* 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 { D7, D2, C6, B5, D4, B4, D0, D3, D1, E6 } +#define MATRIX_COL_PINS { F4, F5, F6, F7, B6, B3, B2 } + +#define DIODE_DIRECTION COL2ROW diff --git a/keyboards/clawsome/coupe/coupe.c b/keyboards/clawsome/coupe/coupe.c new file mode 100644 index 000000000000..80aca53943e3 --- /dev/null +++ b/keyboards/clawsome/coupe/coupe.c @@ -0,0 +1,16 @@ +/* Copyright 2020 AAClawson (AlisGraveNil) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#include "coupe.h" \ No newline at end of file diff --git a/keyboards/clawsome/coupe/coupe.h b/keyboards/clawsome/coupe/coupe.h new file mode 100644 index 000000000000..360dbb24f291 --- /dev/null +++ b/keyboards/clawsome/coupe/coupe.h @@ -0,0 +1,37 @@ +/* Copyright 2020 AAClawson (AlisGraveNil) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License 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, 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, K76, \ + K80, K90, K81, K83, K85, K95, K86, K96 \ +) { \ + { K00, K01, K02, K03, K04, K05, K06 }, \ + { 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, KC_NO }, \ + { KC_NO, K71, K72, K73, K74, K75, K76 }, \ + { K80, K81, KC_NO, K83, KC_NO, K85, K86 }, \ + { K90, KC_NO, KC_NO, KC_NO, KC_NO, K95, K96 }, \ +} diff --git a/keyboards/clawsome/coupe/info.json b/keyboards/clawsome/coupe/info.json new file mode 100644 index 000000000000..6c930922a5cf --- /dev/null +++ b/keyboards/clawsome/coupe/info.json @@ -0,0 +1,74 @@ +{ + "keyboard_name": "Coupe", + "url": "www.clawboards.xyz", + "maintainer": "AAClawson (AlisGraveNil)", + "width": 15, + "height": 5, + "layouts": { + "LAYOUT_60_ansi": { + "layout": [ + {"label":"K00 (D7,F4)", "x":0, "y":0}, + {"label":"K10 (D2,F4)", "x":1, "y":0}, + {"label":"K01 (D7,F5)", "x":2, "y":0}, + {"label":"K11 (D2,F5)", "x":3, "y":0}, + {"label":"K02 (D7,F6)", "x":4, "y":0}, + {"label":"K12 (D2,F6)", "x":5, "y":0}, + {"label":"K03 (D7,F7)", "x":6, "y":0}, + {"label":"K13 (D2,F7)", "x":7, "y":0}, + {"label":"K04 (D7,B6)", "x":8, "y":0}, + {"label":"K14 (D2,B6)", "x":9, "y":0}, + {"label":"K05 (D7,B3)", "x":10, "y":0}, + {"label":"K15 (D2,B3)", "x":11, "y":0}, + {"label":"K06 (D7,B2)", "x":12, "y":0}, + {"label":"K16 (D2,B2)", "x":13, "y":0, "w":2}, + {"label":"K20 (C6,F4)", "x":0, "y":1, "w":1.5}, + {"label":"K30 (B5,F4)", "x":1.5, "y":1}, + {"label":"K21 (C6,F5)", "x":2.5, "y":1}, + {"label":"K31 (B5,F5)", "x":3.5, "y":1}, + {"label":"K22 (C6,F6)", "x":4.5, "y":1}, + {"label":"K32 (B5,F6)", "x":5.5, "y":1}, + {"label":"K23 (C6,F7)", "x":6.5, "y":1}, + {"label":"K33 (B5,F7)", "x":7.5, "y":1}, + {"label":"K24 (C6,B6)", "x":8.5, "y":1}, + {"label":"K34 (B5,B6)", "x":9.5, "y":1}, + {"label":"K25 (C6,B3)", "x":10.5, "y":1}, + {"label":"K35 (B5,B3)", "x":11.5, "y":1}, + {"label":"K26 (C6,B2)", "x":12.5, "y":1}, + {"label":"K36 (B5,B2)", "x":13.5, "y":1, "w":1.5}, + {"label":"K40 (D4,F4)", "x":0, "y":2, "w":1.75}, + {"label":"K50 (B4,F4)", "x":1.75, "y":2}, + {"label":"K41 (D4,F5)", "x":2.75, "y":2}, + {"label":"K51 (B4,F5)", "x":3.75, "y":2}, + {"label":"K42 (D4,F6)", "x":4.75, "y":2}, + {"label":"K52 (B4,F6)", "x":5.75, "y":2}, + {"label":"K43 (D4,F7)", "x":6.75, "y":2}, + {"label":"K53 (B4,F7)", "x":7.75, "y":2}, + {"label":"K44 (D4,B6)", "x":8.75, "y":2}, + {"label":"K54 (B4,B6)", "x":9.75, "y":2}, + {"label":"K45 (D4,B3)", "x":10.75, "y":2}, + {"label":"K55 (B4,B3)", "x":11.75, "y":2}, + {"label":"K56 (B4,B2)", "x":12.75, "y":2, "w":2.25}, + {"label":"K60 (D0,F4)", "x":0, "y":3, "w":2.25}, + {"label":"K61 (D0,F5)", "x":2.25, "y":3}, + {"label":"K71 (D3,F5)", "x":3.25, "y":3}, + {"label":"K62 (D0,F6)", "x":4.25, "y":3}, + {"label":"K72 (D3,F6)", "x":5.25, "y":3}, + {"label":"K63 (D0,F7)", "x":6.25, "y":3}, + {"label":"K73 (D3,F7)", "x":7.25, "y":3}, + {"label":"K64 (D0,B6)", "x":8.25, "y":3}, + {"label":"K74 (D3,B6)", "x":9.25, "y":3}, + {"label":"K65 (D0,B3)", "x":10.25, "y":3}, + {"label":"K75 (D3,B3)", "x":11.25, "y":3}, + {"label":"K76 (D3,B2)", "x":12.25, "y":3, "w":2.75}, + {"label":"K80 (D1,F4)", "x":0, "y":4, "w":1.25}, + {"label":"K90 (E6,F4)", "x":1.25, "y":4, "w":1.25}, + {"label":"K81 (D1,F5)", "x":2.5, "y":4, "w":1.25}, + {"label":"K83 (D1,F7)", "x":3.75, "y":4, "w":6.25}, + {"label":"K85 (D1,B3)", "x":10, "y":4, "w":1.25}, + {"label":"K95 (E6,B3)", "x":11.25, "y":4, "w":1.25}, + {"label":"K86 (D1,B2)", "x":12.5, "y":4, "w":1.25}, + {"label":"K96 (E6,B2)", "x":13.75, "y":4, "w":1.25} + ] + } + } +} diff --git a/keyboards/clawsome/coupe/keymaps/default/keymap.c b/keyboards/clawsome/coupe/keymaps/default/keymap.c new file mode 100644 index 000000000000..4c71f0b1810c --- /dev/null +++ b/keyboards/clawsome/coupe/keymaps/default/keymap.c @@ -0,0 +1,63 @@ +/* Copyright 2020 AAClawson (AlisGraveNil) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public 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 FNM LT(1, KC_APP) // MO(1) when held, KC_APP when tapped + +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 | [ | ] | \ | + *----------------------------------------------------------------------- + *|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 | FNM |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_LSFT, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_LALT, KC_LGUI, FNM, KC_LCTL + ), + + /* + *------------------------------------------------------------- + *| ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | DEL | + *------------------------------------------------------------- + *| | | ^ | | | | | | | | |PSC|SLK|PAUSE| + *------------------------------------------------------------- + *| | < | v | > | | |HOM|PGU| | | | | | + *------------------------------------------------------------- + *| | | | | | |END|PGD| | | | + *------------------------------------------------------------- + *|RST | | | | | | | | + *------------------------------------------------------------- + */ + [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_LEFT, KC_DOWN, KC_RGHT, _______, _______, KC_HOME, KC_PGUP, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, KC_END, KC_PGDN, _______, _______, _______, _______, + RESET, _______, _______, _______, _______, _______, _______, _______ + ), + +}; diff --git a/keyboards/clawsome/coupe/readme.md b/keyboards/clawsome/coupe/readme.md new file mode 100644 index 000000000000..77d5fc2f0bbb --- /dev/null +++ b/keyboards/clawsome/coupe/readme.md @@ -0,0 +1,15 @@ +# Coupe + +![Coupe](https://images.squarespace-cdn.com/content/v1/5ec961924eb3960db955f752/1591981988950-D64UDSNKPAT91WUA8RNC/ke17ZwdGBToddI8pDm48kDHPSfPanjkWqhH6pl6g5ph7gQa3H78H3Y0txjaiv_0fDoOvxcdMmMKkDsyUqMSsMWxHk725yiiHCCLfrh8O1z4YTzHvnKhyp6Da-NYroOW3ZGjoBKy3azqku80C789l0mwONMR1ELp49Lyc52iWr5dNb1QJw9casjKdtTg1_-y4jz4ptJBmI9gQmbjSQnNGng/Coupe3.jpeg?format=640w) + +This is a 5x14 keyboard in a 60% layout. + +* Keyboard Maintainer: [AAClawson](http://github.com/AlisGraveNil) +* Hardware Supported: The Coupe, Pro Micro, Elite-C +* Hardware Availability: www.clawboards.xyz + +Make example for this keyboard (after setting up your build environment): + + make clawsome/coupe: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/clawsome/coupe/rules.mk b/keyboards/clawsome/coupe/rules.mk new file mode 100644 index 000000000000..d0ec2731c5ef --- /dev/null +++ b/keyboards/clawsome/coupe/rules.mk @@ -0,0 +1,27 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +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 + +LAYOUTS = 60_ansi diff --git a/keyboards/clawsome/sedan/config.h b/keyboards/clawsome/sedan/config.h new file mode 100644 index 000000000000..20d58d366e75 --- /dev/null +++ b/keyboards/clawsome/sedan/config.h @@ -0,0 +1,47 @@ +/* +Copyright 2020 AAClawson (AlisGraveNil) + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License 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 0x7767 +#define PRODUCT_ID 0x8C78 +#define DEVICE_VER 0x0001 +#define MANUFACTURER AlisGraveNil +#define PRODUCT The Sedan +#define DESCRIPTION A QMK-powered 68% custom 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 { B0, B1, B2, B3, B4 } +#define MATRIX_COL_PINS { B5, B6, B7, C0, C1, C2, C3, C4, C5, C6, C7, D0, D1, D2, D3 } + +#define DIODE_DIRECTION COL2ROW diff --git a/keyboards/clawsome/sedan/info.json b/keyboards/clawsome/sedan/info.json new file mode 100644 index 000000000000..ecf4c7212aa4 --- /dev/null +++ b/keyboards/clawsome/sedan/info.json @@ -0,0 +1,81 @@ +{ + "keyboard_name": "sedan", + "url": "www.clawboards.xyz", + "maintainer": "AAClawson (AlisGraveNil)", + "width": 16, + "height": 5, + "layouts": { + "LAYOUT_65_ansi": { + "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, "w":2}, + {"label":"K0E (B0,D3)", "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":"K2D (B2,D2)", "x":12.75, "y":2, "w":2.25}, + {"label":"K2E (B2,D3)", "x":15, "y":2}, + {"label":"K30 (B3,B5)", "x":0, "y":3, "w":2.25}, + {"label":"K31 (B3,B6)", "x":2.25, "y":3}, + {"label":"K32 (B3,B7)", "x":3.25, "y":3}, + {"label":"K33 (B3,C0)", "x":4.25, "y":3}, + {"label":"K34 (B3,C1)", "x":5.25, "y":3}, + {"label":"K35 (B3,C2)", "x":6.25, "y":3}, + {"label":"K36 (B3,C3)", "x":7.25, "y":3}, + {"label":"K37 (B3,C4)", "x":8.25, "y":3}, + {"label":"K38 (B3,C5)", "x":9.25, "y":3}, + {"label":"K39 (B3,C6)", "x":10.25, "y":3}, + {"label":"K3A (B3,C7)", "x":11.25, "y":3}, + {"label":"K3B (B3,D0)", "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":"K45 (B4,C2)", "x":3.75, "y":4, "w":6.25}, + {"label":"K49 (B4,C6)", "x":10, "y":4}, + {"label":"K4A (B4,C7)", "x":11, "y":4}, + {"label":"K4B (B4,D0)", "x":12, "y":4}, + {"label":"K4C (B4,D1)", "x":13, "y":4}, + {"label":"K4D (B4,D2)", "x":14, "y":4}, + {"label":"K4E (B4,D3)", "x":15, "y":4} + ] + } + } +} diff --git a/keyboards/clawsome/sedan/keymaps/default/keymap.c b/keyboards/clawsome/sedan/keymaps/default/keymap.c new file mode 100644 index 000000000000..099296578978 --- /dev/null +++ b/keyboards/clawsome/sedan/keymaps/default/keymap.c @@ -0,0 +1,61 @@ +/* Copyright 2020 AAClawson (AlisGraveNil) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public 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] = { + /* + *--------------------------------------------------------------------------------- + *|ESC | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = |BSPC |HOME| + *--------------------------------------------------------------------------------- + *| TAB | Q | W | E | R | T | Y | U | I | O | P | [ | ] | \ |END | + *--------------------------------------------------------------------------------- + *| CAPS | A | S | D | F | G | H | J | K | L | ; | " | ENTER |PGUP| + *--------------------------------------------------------------------------------- + *| SHIFT | Z | X | C | V | B | N | M | , | . | ? | SHIFT | ^ |PGDN| + *--------------------------------------------------------------------------------- + *|CTRL|GUI |ALT | SPACE |ALT | FN |CTRL| < | v | > | + *--------------------------------------------------------------------------------- + */ + [0] = 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_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_LSFT, KC_UP, KC_PGDN, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT + ), + + /* + *--------------------------------------------------------------------------------- + *| ` | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 |F10 |F11 |F12 |DEL | | + *--------------------------------------------------------------------------------- + *| | | | | | | | | | | |PSCR|SLCK| PAUSE | | + *--------------------------------------------------------------------------------- + *| | | | | | | | | | | | | | | + *--------------------------------------------------------------------------------- + *| | | | | | | | | | | | | | | + *--------------------------------------------------------------------------------- + *|RST | | | | | | | | | | + *--------------------------------------------------------------------------------- + */ + [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_PSCR, KC_SLCK, KC_PAUS, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ) + +}; diff --git a/keyboards/clawsome/sedan/readme.md b/keyboards/clawsome/sedan/readme.md new file mode 100644 index 000000000000..461db121a89f --- /dev/null +++ b/keyboards/clawsome/sedan/readme.md @@ -0,0 +1,15 @@ +# Sedan + +![Sedan](https://images.squarespace-cdn.com/content/v1/5ec961924eb3960db955f752/1592952281584-LTU6E70P5WIFWPZR56SH/ke17ZwdGBToddI8pDm48kDHPSfPanjkWqhH6pl6g5ph7gQa3H78H3Y0txjaiv_0fDoOvxcdMmMKkDsyUqMSsMWxHk725yiiHCCLfrh8O1z4YTzHvnKhyp6Da-NYroOW3ZGjoBKy3azqku80C789l0mwONMR1ELp49Lyc52iWr5dNb1QJw9casjKdtTg1_-y4jz4ptJBmI9gQmbjSQnNGng/Sedan1.jpeg?format=640w) + +This is a 5x15 keyboard in a 68% layout. + +* Keyboard Maintainer: [AAClawson](http://github.com/AlisGraveNil) +* Hardware Supported: The Sedan, Pro Micro, Elite-C +* Hardware Availability: www.clawboards.xyz + +Make example for this keyboard (after setting up your build environment): + + make clawsome/sedan: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/clawsome/sedan/rules.mk b/keyboards/clawsome/sedan/rules.mk new file mode 100644 index 000000000000..c06c0806fd26 --- /dev/null +++ b/keyboards/clawsome/sedan/rules.mk @@ -0,0 +1,27 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +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 + +LAYOUTS = 65_ansi diff --git a/keyboards/clawsome/sedan/sedan.c b/keyboards/clawsome/sedan/sedan.c new file mode 100644 index 000000000000..4977bf697834 --- /dev/null +++ b/keyboards/clawsome/sedan/sedan.c @@ -0,0 +1,16 @@ +/* Copyright 2020 AAClawson (AlisGraveNil) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#include "sedan.h" \ No newline at end of file diff --git a/keyboards/clawsome/sedan/sedan.h b/keyboards/clawsome/sedan/sedan.h new file mode 100644 index 000000000000..7af9476676e6 --- /dev/null +++ b/keyboards/clawsome/sedan/sedan.h @@ -0,0 +1,32 @@ +/* Copyright 2020 AAClawson (AlisGraveNil) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License 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_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, 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, K1D, K1E }, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, KC_NO, K2D, K2E }, \ + { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, KC_NO, K3D, K3E }, \ + { K40, K41, K42, KC_NO, KC_NO, K45, KC_NO, KC_NO, KC_NO, K49, K4A, K4B, K4C, K4D, K4E }, \ +} From 62ceb46e9df0c495a6c24336425cfaaef9ceb26b Mon Sep 17 00:00:00 2001 From: Xyverz Date: Sun, 28 Jun 2020 19:52:23 -0700 Subject: [PATCH 286/930] Fixed MACLOCK key (#9555) --- layouts/community/ortho_4x12/xyverz/keymap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/layouts/community/ortho_4x12/xyverz/keymap.c b/layouts/community/ortho_4x12/xyverz/keymap.c index 727ea00806a3..19e0e291e3e9 100644 --- a/layouts/community/ortho_4x12/xyverz/keymap.c +++ b/layouts/community/ortho_4x12/xyverz/keymap.c @@ -120,7 +120,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_F11, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F12 , \ _______, RESET, RGB_M_P, RGB_M_B, RGB_M_R, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, _______, _______, \ RGB_TOG, RGB_MOD, RGB_SWR, RGB_M_K, RGB_M_G, RGB_HUI, RGB_HUD, RGB_HUI, RGB_SAD, RGB_SAI, RGB_VAD, RGB_VAI, \ - _______, _______, _______, _______, MACLOCK, _______, _______, _______, _______, _______, _______, _______ \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, MACLOCK \ ) }; // clang-format on From 7c17b872152ef0055a444eb99f770546b7bc6fec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Guillaume=20G=C3=A9rard?= <1322081+GreatWizard@users.noreply.github.com> Date: Mon, 29 Jun 2020 04:54:50 +0200 Subject: [PATCH 287/930] Fix WORKMAN layer typo in dudeofawesome planck/preonic (#9576) --- keyboards/planck/keymaps/dudeofawesome/keymap.c | 2 +- keyboards/preonic/keymaps/dudeofawesome/keymap.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/keyboards/planck/keymaps/dudeofawesome/keymap.c b/keyboards/planck/keymaps/dudeofawesome/keymap.c index c28b8dfdd29d..eac7470d257e 100644 --- a/keyboards/planck/keymaps/dudeofawesome/keymap.c +++ b/keyboards/planck/keymaps/dudeofawesome/keymap.c @@ -61,7 +61,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Workman * ,-----------------------------------------------------------------------------------. - * | Tab | Q | W | R | W | B | J | F | U | P | ; | Bksp | + * | Tab | Q | D | R | W | B | J | F | U | P | ; | Bksp | * |------+------+------+------+------+-------------+------+------+------+------+------| * | Esc | A | S | H | T | G | Y | N | E | O | I | ' | * |------+------+------+------+------+------|------+------+------+------+------+------| diff --git a/keyboards/preonic/keymaps/dudeofawesome/keymap.c b/keyboards/preonic/keymaps/dudeofawesome/keymap.c index e8b9dc9d0f23..3d1cec74b8d1 100644 --- a/keyboards/preonic/keymaps/dudeofawesome/keymap.c +++ b/keyboards/preonic/keymaps/dudeofawesome/keymap.c @@ -64,7 +64,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * ,-----------------------------------------------------------------------------------. * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Del | * |------+------+------+------+------+------+------+------+------+------+------+------| - * | Tab | Q | W | R | W | B | J | F | U | P | ; | Bksp | + * | Tab | Q | D | R | W | B | J | F | U | P | ; | Bksp | * |------+------+------+------+------+-------------+------+------+------+------+------| * | Esc | A | S | H | T | G | Y | N | E | O | I | ' | * |------+------+------+------+------+------|------+------+------+------+------+------| From 4e4a3449a731bce9f6893d18d884af365d0df407 Mon Sep 17 00:00:00 2001 From: umi <57262844+umi-umi@users.noreply.github.com> Date: Mon, 29 Jun 2020 16:30:16 +0900 Subject: [PATCH 288/930] [Docs] Japanese translation of docs/compatible_microcontrollers.md (#9518) * add compatible_microcontrollers.md translation * update based on comment * update based on comment --- docs/ja/compatible_microcontrollers.md | 42 ++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 docs/ja/compatible_microcontrollers.md diff --git a/docs/ja/compatible_microcontrollers.md b/docs/ja/compatible_microcontrollers.md new file mode 100644 index 000000000000..56f4c0297711 --- /dev/null +++ b/docs/ja/compatible_microcontrollers.md @@ -0,0 +1,42 @@ +# 互換性のあるマイクロコントローラ + + + +QMK は十分な容量のフラッシュメモリを備えた USB 対応 AVR または ARM マイクロコントローラで実行されます - 一般的に 32kB 以上ですが、ほとんどの機能を無効にすると*ほんの* 16kB に詰め込むことができます。 + +## Atmel AVR + +以下は、USB スタックとして [LUFA](https://www.fourwalledcubicle.com/LUFA.php) を使います: + +* [ATmega16U2](https://www.microchip.com/wwwproducts/en/ATmega16U2) / [ATmega32U2](https://www.microchip.com/wwwproducts/en/ATmega32U2) +* [ATmega16U4](https://www.microchip.com/wwwproducts/en/ATmega16U4) / [ATmega32U4](https://www.microchip.com/wwwproducts/en/ATmega32U4) +* [AT90USB64](https://www.microchip.com/wwwproducts/en/AT90USB646) / [AT90USB128](https://www.microchip.com/wwwproducts/en/AT90USB1286) + +組み込みの USB インターフェースを持たない、いくつかの MCU は代わりに [V-USB](https://www.obdev.at/products/vusb/index.html) を使います: + +* [ATmega32A](https://www.microchip.com/wwwproducts/en/ATmega32A) +* [ATmega328P](https://www.microchip.com/wwwproducts/en/ATmega328P) +* [ATmega328](https://www.microchip.com/wwwproducts/en/ATmega328) + +## ARM + +[ChibiOS](http://www.chibios.org) がサポートする USB 付きの ARM チップを使うこともできます。ほとんどのチップには十分な容量のフラッシュメモリがあります。動作するとわかっているのは: + +### STMicroelectronics (STM32) + +* [STM32F0x2](https://www.st.com/en/microcontrollers-microprocessors/stm32f0x2.html) +* [STM32F103](https://www.st.com/en/microcontrollers-microprocessors/stm32f103.html) +* [STM32F303](https://www.st.com/en/microcontrollers-microprocessors/stm32f303.html) + +### NXP (Kinetis) + +* [MKL26Z64](https://www.nxp.com/products/processors-and-microcontrollers/arm-microcontrollers/general-purpose-mcus/kl-series-cortex-m0-plus/kinetis-kl2x-72-96-mhz-usb-ultra-low-power-microcontrollers-mcus-based-on-arm-cortex-m0-plus-core:KL2x) +* [MK20DX128](https://www.nxp.com/products/processors-and-microcontrollers/arm-microcontrollers/general-purpose-mcus/k-series-cortex-m4/k2x-usb/kinetis-k20-50-mhz-full-speed-usb-mixed-signal-integration-microcontrollers-based-on-arm-cortex-m4-core:K20_50) +* [MK20DX256](https://www.nxp.com/products/processors-and-microcontrollers/arm-microcontrollers/general-purpose-mcus/k-series-cortex-m4/k2x-usb/kinetis-k20-72-mhz-full-speed-usb-mixed-signal-integration-microcontrollers-mcus-based-on-arm-cortex-m4-core:K20_72) + +## Atmel ATSAM + +Atmel の ATSAM マイクロコントローラの一つである、[Massdrop keyboards](https://github.com/qmk/qmk_firmware/tree/master/keyboards/massdrop) で使用されている [ATSAMD51J18A](https://www.microchip.com/wwwproducts/en/ATSAMD51J18A) には限定的なサポートがあります。 From e9e6054ee7eaca4cbd8d1c7566f394559ea8770a Mon Sep 17 00:00:00 2001 From: mechlovin <57231893+mechlovin@users.noreply.github.com> Date: Mon, 29 Jun 2020 15:19:09 +0700 Subject: [PATCH 289/930] [Keyboard] Refactor: add adelais rev.3 (#9496) * Refactor: add adelais rev.3 * update * Update keymap.c * update * update * update --- .../adelais/keymaps/default/keymap.c | 29 ++++++++++++++++++- .../mechlovin/adelais/keymaps/via/keymap.c | 29 ++++++++++++++++++- keyboards/mechlovin/adelais/readme.md | 2 +- keyboards/mechlovin/adelais/rules.mk | 2 +- .../mechlovin/adelais/standard_led/config.h | 1 - .../adelais/standard_led/rev2/config.h | 3 ++ .../adelais/standard_led/rev2/rules.mk | 0 .../adelais/standard_led/rev3/config.h | 8 +++++ .../adelais/standard_led/rev3/rules.mk | 1 + .../mechlovin/adelais/standard_led/rules.mk | 6 ++-- 10 files changed, 73 insertions(+), 8 deletions(-) create mode 100644 keyboards/mechlovin/adelais/standard_led/rev2/config.h create mode 100644 keyboards/mechlovin/adelais/standard_led/rev2/rules.mk create mode 100644 keyboards/mechlovin/adelais/standard_led/rev3/config.h create mode 100644 keyboards/mechlovin/adelais/standard_led/rev3/rules.mk diff --git a/keyboards/mechlovin/adelais/keymaps/default/keymap.c b/keyboards/mechlovin/adelais/keymaps/default/keymap.c index 7848a5709bcf..19c298d4a4c4 100644 --- a/keyboards/mechlovin/adelais/keymaps/default/keymap.c +++ b/keyboards/mechlovin/adelais/keymaps/default/keymap.c @@ -29,4 +29,31 @@ 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 ), -}; \ No newline at end of file +}; + +#ifdef ENCODER_ENABLE +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_LEFT); + } else { + tap_code(KC_RGHT); + } + } + else if (index == 2) { + if (clockwise) { + tap_code(KC_UP); + } else { + tap_code(KC_DOWN); + } + } +} + + #endif \ No newline at end of file diff --git a/keyboards/mechlovin/adelais/keymaps/via/keymap.c b/keyboards/mechlovin/adelais/keymaps/via/keymap.c index 03636d02b30b..d44a4e93829f 100644 --- a/keyboards/mechlovin/adelais/keymaps/via/keymap.c +++ b/keyboards/mechlovin/adelais/keymaps/via/keymap.c @@ -41,4 +41,31 @@ 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 ), -}; \ No newline at end of file +}; + +#ifdef ENCODER_ENABLE +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_LEFT); + } else { + tap_code(KC_RGHT); + } + } + else if (index == 2) { + if (clockwise) { + tap_code(KC_UP); + } else { + tap_code(KC_DOWN); + } + } +} + + #endif \ No newline at end of file diff --git a/keyboards/mechlovin/adelais/readme.md b/keyboards/mechlovin/adelais/readme.md index 947d5a31d982..f8b3b47ffb8a 100644 --- a/keyboards/mechlovin/adelais/readme.md +++ b/keyboards/mechlovin/adelais/readme.md @@ -3,7 +3,7 @@ ![adelais](https://i.imgur.com/6U1IfZe.png) Compatible with TGR Alice and all clone variants. -`standard_led` (Adelais) comes with backlight and RGB underglow LEDs pre-soldered. +`standard_led` (Adelais) comes with backlight and RGB underglow LEDs pre-soldered. Adelais rev.3 support 3 rotary encoder, USB TypeC both side and reset button. `rgb_led` (Adelais En Ciel) comes with per-key RGB LEDs pre-soldered. * Keyboard Maintainer: [Team Mechlovin'](https://github.com/mechlovin) diff --git a/keyboards/mechlovin/adelais/rules.mk b/keyboards/mechlovin/adelais/rules.mk index 91f87e5f39cd..75b9b6d282d0 100644 --- a/keyboards/mechlovin/adelais/rules.mk +++ b/keyboards/mechlovin/adelais/rules.mk @@ -20,4 +20,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 -DEFAULT_FOLDER = mechlovin/adelais/standard_led \ No newline at end of file +DEFAULT_FOLDER = mechlovin/adelais/standard_led/rev2 \ No newline at end of file diff --git a/keyboards/mechlovin/adelais/standard_led/config.h b/keyboards/mechlovin/adelais/standard_led/config.h index 0de6cc6b408b..6a008e2f3c38 100644 --- a/keyboards/mechlovin/adelais/standard_led/config.h +++ b/keyboards/mechlovin/adelais/standard_led/config.h @@ -1,6 +1,5 @@ #pragma once -#define PRODUCT_ID 0xAD01 #define PRODUCT Adelais #define DESCRIPTION Team.Mechlovin Adelais diff --git a/keyboards/mechlovin/adelais/standard_led/rev2/config.h b/keyboards/mechlovin/adelais/standard_led/rev2/config.h new file mode 100644 index 000000000000..7c2c63ea21c6 --- /dev/null +++ b/keyboards/mechlovin/adelais/standard_led/rev2/config.h @@ -0,0 +1,3 @@ +#pragma once + +#define PRODUCT_ID 0xAD01 \ No newline at end of file diff --git a/keyboards/mechlovin/adelais/standard_led/rev2/rules.mk b/keyboards/mechlovin/adelais/standard_led/rev2/rules.mk new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/keyboards/mechlovin/adelais/standard_led/rev3/config.h b/keyboards/mechlovin/adelais/standard_led/rev3/config.h new file mode 100644 index 000000000000..60e288296af4 --- /dev/null +++ b/keyboards/mechlovin/adelais/standard_led/rev3/config.h @@ -0,0 +1,8 @@ +#pragma once + +#define PRODUCT_ID 0xAD02 + +#define ENCODERS_PAD_A { A6, A4, B7 } +#define ENCODERS_PAD_B { A5, A3, B6 } +#define ENCODER_RESOLUTION 4 + diff --git a/keyboards/mechlovin/adelais/standard_led/rev3/rules.mk b/keyboards/mechlovin/adelais/standard_led/rev3/rules.mk new file mode 100644 index 000000000000..5af1ba85367f --- /dev/null +++ b/keyboards/mechlovin/adelais/standard_led/rev3/rules.mk @@ -0,0 +1 @@ +ENCODER_ENABLE = yes diff --git a/keyboards/mechlovin/adelais/standard_led/rules.mk b/keyboards/mechlovin/adelais/standard_led/rules.mk index 4ddc3524048c..34de30aa9710 100644 --- a/keyboards/mechlovin/adelais/standard_led/rules.mk +++ b/keyboards/mechlovin/adelais/standard_led/rules.mk @@ -1,3 +1,3 @@ -BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality -BACKLIGHT_DRIVER = pwm -RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow \ No newline at end of file + + +DEFAULT_FOLDER = mechlovin/adelais/standard_led/rev2 \ No newline at end of file From 1baa99c6473473ba3204c9861951e70c10d037cb Mon Sep 17 00:00:00 2001 From: Reed Date: Mon, 29 Jun 2020 13:23:13 -0400 Subject: [PATCH 290/930] [Keymap] Adding my keymaps for ergodox_ez and kyria (#9365) * Trying to fix problems in my kyria steez * repeating last commit..... * repeating last commit on EDIT layer but swapping direction exit * moving the reversed desktop moves to the symbol layers on the same hand, for easier activation * adding mac desktop movement keys to Kyria layout * Adding readmes to my keymaps * Removing a png... * Update keyboards/ergodox_ez/keymaps/rmw/keymap-mac.c removing EPRM case * Apply suggestions from code review Great updates to various old-school or outdated ways I was doing things, removing some commented out code, etc. * Apply suggestions from code review Additional improvements * Moving tapdances.cpp to userspace as tapdances.c * reindenting the Kyria keymap to follow four-spaces convention, turning off oled on my kyria, improving the led handling on the Ergodox. * updating led stuff on the other two versions of the keymap, removing EPRM key from main keymap * Apply suggestions from code review I'm adding these various removals to the config file because it seems that at this time those settings are in harmony with the ergodox_ez defaults. * Moving encoder functions into their own userspace file * Apply suggestions from code review Removing settings that are now defaults, clearing out placeholder custom keycodes (smh) * updating encoder functions. * Moving to LAYOUT_stack for all layers, adding end of file newlines, switching to some shorter keycode aliases * Okay, refactor is well underway. * refactored! Also improved led handling for ergodox and rgb handling for kyria * removing mac/windows swappable version because I don't feel like dealing with it when reflashing is so easy. * moving LAYOUT_stack into kyria.h * moving the alternate default layer down next to QWERTY --- keyboards/ergodox_ez/keymaps/rmw/config.h | 59 +++ keyboards/ergodox_ez/keymaps/rmw/keymap-mac.c | 188 +++++++++ keyboards/ergodox_ez/keymaps/rmw/keymap-win.c | 159 +++++++ keyboards/ergodox_ez/keymaps/rmw/keymap.c | 13 + keyboards/ergodox_ez/keymaps/rmw/readme.md | 11 + keyboards/ergodox_ez/keymaps/rmw/rules.mk | 1 + keyboards/kyria/keymaps/rmw/config.h | 36 ++ keyboards/kyria/keymaps/rmw/keymap.c | 199 +++++++++ keyboards/kyria/keymaps/rmw/readme.md | 9 + keyboards/kyria/keymaps/rmw/rules.mk | 4 + keyboards/kyria/kyria.h | 22 + users/rmw/encoder_functions.c | 53 +++ users/rmw/encoder_functions.h | 11 + users/rmw/rmw.c | 1 + users/rmw/rmw.h | 87 ++++ users/rmw/rules.mk | 9 + users/rmw/tapdances.c | 389 ++++++++++++++++++ users/rmw/tapdances.h | 46 +++ 18 files changed, 1297 insertions(+) create mode 100644 keyboards/ergodox_ez/keymaps/rmw/config.h create mode 100644 keyboards/ergodox_ez/keymaps/rmw/keymap-mac.c create mode 100644 keyboards/ergodox_ez/keymaps/rmw/keymap-win.c create mode 100644 keyboards/ergodox_ez/keymaps/rmw/keymap.c create mode 100644 keyboards/ergodox_ez/keymaps/rmw/readme.md create mode 100644 keyboards/ergodox_ez/keymaps/rmw/rules.mk create mode 100644 keyboards/kyria/keymaps/rmw/config.h create mode 100644 keyboards/kyria/keymaps/rmw/keymap.c create mode 100644 keyboards/kyria/keymaps/rmw/readme.md create mode 100644 keyboards/kyria/keymaps/rmw/rules.mk create mode 100644 users/rmw/encoder_functions.c create mode 100644 users/rmw/encoder_functions.h create mode 100644 users/rmw/rmw.c create mode 100644 users/rmw/rmw.h create mode 100644 users/rmw/rules.mk create mode 100644 users/rmw/tapdances.c create mode 100644 users/rmw/tapdances.h diff --git a/keyboards/ergodox_ez/keymaps/rmw/config.h b/keyboards/ergodox_ez/keymaps/rmw/config.h new file mode 100644 index 000000000000..7b90c2327a82 --- /dev/null +++ b/keyboards/ergodox_ez/keymaps/rmw/config.h @@ -0,0 +1,59 @@ +/* +Copyright 2012 Jun Wako +Copyright 2013 Oleg Kostyuk +Edited like hell 2017+ by Reed Williams + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License 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 MACOSX + +/* USB Device descriptor parameter */ +#ifndef DESCRIPTION +#define DESCRIPTION QMK keyboard firmware for Ergodox EZ +#endif + +#define USB_MAX_POWER_CONSUMPTION 500 + +#define QMK_KEYS_PER_SCAN 4 +/* Set 0 if debouncing isn't needed */ +#undef DEBOUNCE +#define DEBOUNCE 5 + + +#define ONESHOT_TIMEOUT 900 // how long before oneshot times out +//#define ONESHOT_TAP_TOGGLE 2 // how many taps before oneshot toggle is triggered + +#undef LOCKING_SUPPORT_ENABLE +#undef LOCKING_RESYNC_ENABLE + +#undef MOUSEKEY_DELAY +#define MOUSEKEY_DELAY 20 +#undef MOUSEKEY_MAX_SPEED +#define MOUSEKEY_MAX_SPEED 6 +#undef MOUSEKEY_TIME_TO_MAX +#define MOUSEKEY_TIME_TO_MAX 254 +#undef MOUSEKEY_WHEEL_MAX_SPEED +#define MOUSEKEY_WHEEL_MAX_SPEED 10 +#undef MOUSEKEY_WHEEL_TIME_TO_MAX +#define MOUSEKEY_WHEEL_TIME_TO_MAX 254 + +/* disable action features */ +//#define NO_ACTION_LAYER +//#define NO_ACTION_TAPPING +//#define NO_ACTION_ONESHOT +//#define NO_ACTION_MACRO +//#define NO_ACTION_FUNCTION +//#define DEBUG_MATRIX_SCAN_RATE diff --git a/keyboards/ergodox_ez/keymaps/rmw/keymap-mac.c b/keyboards/ergodox_ez/keymaps/rmw/keymap-mac.c new file mode 100644 index 000000000000..7a78ce98e790 --- /dev/null +++ b/keyboards/ergodox_ez/keymaps/rmw/keymap-mac.c @@ -0,0 +1,188 @@ +#include "rmw.h" + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [QWERTY] = LAYOUT_ergodox( + TD(FRBK2), KC_1, KC_2, KC_3, KC_4, KC_5, KC_F4, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, TO(EDIT), + OSL(EDIT), KC_A, LT(NUMPAD,KC_S), KC_D, LT(FSYM,KC_F), KC_G, + LCTL(KC_LEFT), KC_Z, KC_X, KC_C, KC_V, SFT_T(KC_B), KC_TAB, + TD(CTLALL), OSL(ADJUST), TD(GUCTL), TD(SGCA), TD(AGC), + OS_CMD, OS_CTL , + KC_ESCAPE, + KC_BSPACE, TD(SHENT), OSL(EDIT), + + KC_F5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, + TO(NUMPAD), KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS, + KC_H, LT(JSYM,KC_J), KC_K, KC_L, LT(EDIT,KC_SCLN), KC_QUOTE, + CTL_T(KC_B), KC_N, KC_M, KC_COMM, KC_DOT, LT(MEDIA,KC_SLSH), LCTL(KC_RIGHT), + TD(GCA), TD(CTLALL), KC_LBRC, KC_RBRC, KC_MS_BTN1, + OS_CALT, KC_TAB, + KC_DEL, + KC_CAPS, SFTENT, KC_SPC), + + + [MINIMAK4] = LAYOUT_ergodox( + TD(FRBK2), KC_1, KC_2, KC_3, KC_4, KC_5, KC_F4, + KC_TAB, KC_Q, KC_W, KC_D, KC_R, KC_K, TO(EDIT), + OSL(EDIT), KC_A, LT(NUMPAD,KC_S), KC_T, LT(FSYM,KC_F), KC_G, + OSM(MOD_LSFT), KC_Z, KC_X, KC_C, KC_V, SFT_T(KC_B), KC_TAB, + TD(CTLALL), OSL(ADJUST), TD(GUCTL), TD(SGCA), TD(AGC), + OS_CMD, OS_CTL , + KC_ESCAPE, + KC_BSPACE, TD(SHENT), OSL(EDIT), + KC_F5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, + TO(NUMPAD), KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS, + KC_H, LT(JSYM,KC_J), KC_E, KC_L, LT(EDIT,KC_SCLN), KC_QUOTE, + CTL_T(KC_B), KC_N, KC_M, KC_COMM, KC_DOT, LT(MEDIA,KC_SLSH), KC_MS_BTN1, + TD(GCA), TD(CTLALL), LGUI(KC_GRV), KC_RBRC, KC_MS_BTN1, + OS_ALT, KC_TAB, + KC_DEL, + KC_CAPS, SFT_T(KC_ENT), KC_SPC), + + [NUMPAD] = LAYOUT_ergodox(VRSN, KC_F11, KC_F12, KC_F1, KC_F2, KC_F3, _______, + _______, _______, KC_PGUP, KC_UP, KC_PGDOWN, _______, TO(QWERTY), + _______, _______, KC_LEFT, KC_DOWN, KC_RIGHT, _______, + _______, LGUI(KC_Z), LGUI(KC_X), LGUI(KC_C), LGUI(KC_V), LGUI(KC_Y), _______, + _______, _______, _______, _______, _______, + _______, _______, KC_PSCREEN, _______, _______, TO(QWERTY), + + _______, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, _______, + TO(EDIT), _______, KC_7, KC_8, KC_9, KC_KP_MINUS, _______, + _______, KC_4, KC_5, KC_6, KC_KP_PLUS, _______, + _______, KC_COMM, KC_1, KC_2, KC_3, KC_KP_SLASH, _______, + KC_0, KC_DOT, KC_EQUAL, KC_KP_ASTERISK, _______, + _______, _______, KC_INSERT, TO(EDIT), _______, _______), + + [EDIT] = LAYOUT_ergodox(_______, _______, KC_MS_WH_UP, KC_MS_BTN1, KC_MS_BTN2, _______, _______, + _______, LGUI(LALT(KC_ESCAPE)), KC_MS_WH_DOWN, LALT(S(KC_LEFT)), LALT(S(KC_RIGHT)), _______, TO(NUMPAD), + _______, _______, LGUI(KC_GRV), LALT(KC_LEFT), LALT(KC_RIGHT), _______, + LCTL(KC_RIGHT), LGUI(KC_Z), LGUI(KC_X), LGUI(KC_C), LGUI(KC_V), LGUI(KC_Y), _______, + _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, TO(NUMPAD), + _______, _______, _______, S(KC_UP), _______, _______, KC_DELETE, + TO(QWERTY), LGUI(KC_T), KC_PGUP, KC_UP, KC_PGDOWN, KC_PSCREEN, _______, + LGUI(KC_LEFT), KC_LEFT, KC_DOWN, KC_RIGHT, LGUI(KC_RIGHT), _______, + _______, S(LGUI(KC_LEFT)), S(KC_LEFT), S(KC_DOWN), S(KC_RIGHT), S(LGUI(KC_RIGHT)), LCTL(KC_LEFT), + _______, _______, FORM_GET, FORM_PUT, _______, + _______, _______, _______, S(KC_F10), _______, _______), + + [FSYM] = LAYOUT_ergodox(_______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, + _______, _______, KC_TILD, KC_EXLM, _______, _______, + LCTL(KC_RIGHT), _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, + _______, _______, _______, DEL_WRD, _______, _______, + _______, _______, _______, _______, _______, _______, _______, + _______, KC_CIRC, KC_AMPR , KC_ASTR, KC_GRV , _______, _______, + KC_EQUAL, KC_MINUS, KC_UNDS, KC_BSLS, KC_COLON, KC_DQT , + _______, _______, KC_PLUS , KC_SLSH, KC_PIPE, _______ , _______, + _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______), + + [JSYM] = LAYOUT_ergodox(_______, _______, _______, _______, _______, _______, _______, + _______, KC_GRV, KC_AT , KC_LCBR, KC_RCBR, _______, _______, + _______, KC_HASH, KC_DLR , KC_LPRN, KC_RPRN, KC_LEFT, + _______, KC_PERC, KC_CIRC, KC_LBRACKET, KC_RBRACKET, _______, _______, + _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, + _______, _______, KC_QUES, KC_SLSH, KC_COLON, _______, + _______, _______, _______, _______, _______, _______, LCTL(KC_LEFT), + _______, _______, _______, _______, _______, + _______, _______, _______, _______, LGUI(KC_DOWN), _______), + + [MEDIA] = LAYOUT_ergodox(_______, _______, KC_MS_BTN4, _______, KC_MS_BTN5, _______, _______, + _______, KC_MS_WH_UP, KC_MS_WH_LEFT, KC_MS_UP, KC_MS_WH_RIGHT, _______, _______, + _______, KC_MS_WH_DOWN, KC_MS_LEFT, KC_MS_DOWN, KC_MS_RIGHT, _______, + _______, _______, KC_MS_ACCEL0, KC_MS_ACCEL1, KC_MS_ACCEL2, _______, _______, + _______, _______, _______, _______, KC_MS_BTN3, + _______, _______, _______, KC_MS_BTN1, KC_MS_BTN2, _______, + _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, + _______, _______, KC_AUDIO_VOL_DOWN, KC_AUDIO_MUTE, KC_AUDIO_VOL_UP, _______, _______, + KC_MEDIA_REWIND, KC_MEDIA_FAST_FORWARD, _______, _______, _______, + _______, _______, _______, _______, KC_MS_BTN1, KC_MEDIA_PLAY_PAUSE), + + [ADJUST] = LAYOUT_ergodox(_______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, + _______, TO(EDIT), TO(NUMPAD), TO(FSYM), TO(JSYM), TO(MEDIA), + _______, _______, _______, _______, _______, _______, _______, + _______, TO(QWERTY), DF(MINIMAK4), DF(QWERTY), _______, + _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______), + +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case VRSN: + if (record->event.pressed) { + SEND_STRING (QMK_KEYBOARD "/" QMK_KEYMAP " @ " QMK_VERSION); + } + return false; + case FORM_GET: + if (record->event.pressed) { + tap_code(KC_BTN1); + tap_code16(G(KC_A)); + tap_code16(G(KC_C)); + } + return false; + case FORM_PUT: + if (record->event.pressed) { + tap_code(KC_BTN1); + tap_code16(G(KC_A)); + tap_code16(G(KC_V)); + } + return false; + } + return true; +} + +layer_state_t layer_state_set_user(layer_state_t state) { + switch (get_highest_layer(state)) { + case QWERTY: + ergodox_right_led_1_off(); + ergodox_right_led_2_off(); + ergodox_right_led_3_off(); + break; + case NUMPAD: + ergodox_right_led_1_on(); + ergodox_right_led_2_off(); + ergodox_right_led_3_off(); + break; + case EDIT: + ergodox_right_led_1_off(); + ergodox_right_led_2_on(); + ergodox_right_led_3_off(); + break; + case FSYM: + ergodox_right_led_1_on(); + ergodox_right_led_2_on(); + ergodox_right_led_3_off(); + break; + case JSYM: + ergodox_right_led_1_on(); + ergodox_right_led_2_off(); + ergodox_right_led_3_on(); + break; + case MEDIA: + ergodox_right_led_1_off(); + ergodox_right_led_2_on(); + ergodox_right_led_3_on(); + break; + case ADJUST: + ergodox_right_led_1_on(); + ergodox_right_led_2_on(); + ergodox_right_led_3_on(); + break; + } + return state; +} diff --git a/keyboards/ergodox_ez/keymaps/rmw/keymap-win.c b/keyboards/ergodox_ez/keymaps/rmw/keymap-win.c new file mode 100644 index 000000000000..9f7435c0d7ed --- /dev/null +++ b/keyboards/ergodox_ez/keymaps/rmw/keymap-win.c @@ -0,0 +1,159 @@ +#include "rmw.h" + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [QWERTY] = LAYOUT_ergodox( // LEFT HAND + TD(FRBK), KC_1, KC_2, KC_3, KC_4, KC_5, KC_F4, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, TO(EDIT), + OSL(EDIT), KC_A, LT(NUMPAD,KC_S), KC_D, LT(FSYM,KC_F), KC_G, + OSM(MOD_LSFT), KC_Z, KC_X, KC_C, KC_V, SFT_T(KC_B), KC_TAB, + TD(CTLAND), OSL(ADJUST), TD(SCAG), TD(TDGUI), TD(ACG), + OS_ALT, OS_CTL , + KC_ESCAPE, + KC_BSPACE, TD(SHENT), OSL(EDIT), + + // RIGHT HAND + KC_F5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, + TO(NUMPAD), KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS, + KC_H, LT(JSYM,KC_J), KC_K, KC_L, LT(EDIT,KC_SCLN), KC_QUOTE, + CTL_T(KC_B), KC_N, KC_M, KC_COMM, KC_DOT, LT(MEDIA,KC_SLSH), TD(SHENT), + TD(CAG), TD(TDGUI), KC_LBRC, KC_RBRC, KC_MS_BTN1, + OS_ALT, KC_TAB, + KC_DEL, + KC_CAPS, SFT_T(KC_ENT), KC_SPC), + + + [NUMPAD] = LAYOUT_ergodox(VRSN, KC_F11, KC_F12, KC_F1, KC_F2, KC_F3, _______, + _______, _______, KC_PGUP, KC_UP, KC_PGDOWN, _______, TO(0), + _______, _______, KC_LEFT, KC_DOWN, KC_RIGHT, _______, + _______, LCTL(KC_Z), LCTL(KC_X), LCTL(KC_C), LCTL(KC_V), LCTL(KC_Y), _______, + _______, _______, _______, _______, _______, + _______, _______, KC_PSCREEN, _______, _______, TO(0), + + _______, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, _______, + TO(EDIT), _______, KC_7, KC_8, KC_9, KC_KP_MINUS, _______, + _______, KC_4, KC_5, KC_6, KC_KP_PLUS, _______, + _______, KC_COMM, KC_1, KC_2, KC_3, KC_KP_SLASH, _______, + KC_0, KC_DOT, KC_EQUAL, KC_KP_ASTERISK, _______, + _______, _______, KC_INSERT, TO(EDIT), _______, _______), + + [EDIT] = LAYOUT_ergodox(KC_ESCAPE, LALT(LCTL(KC_DELETE)), KC_MS_WH_UP, KC_MS_BTN1, KC_MS_BTN2, _______, _______, + _______, LCTL(S(KC_ESCAPE)), KC_MS_WH_DOWN, LCTL(S(KC_LEFT)), LCTL(S(KC_RIGHT)), _______, TO(NUMPAD), + _______, _______, KC_LEFT, LCTL(KC_LEFT), LCTL(KC_RIGHT), _______, + _______, LCTL(KC_Z), LCTL(KC_X), LCTL(KC_C), LCTL(KC_V), LCTL(KC_Y), _______, + _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, TO(NUMPAD), + _______, _______, _______, S(KC_UP), _______, _______, KC_DELETE, + TO(0), LCTL(KC_T), KC_PGUP, KC_UP, KC_PGDOWN, KC_PSCREEN, _______, + KC_HOME, KC_LEFT, KC_DOWN, KC_RIGHT, KC_END, _______, + _______, S(KC_HOME), S(KC_LEFT), S(KC_DOWN), S(KC_RIGHT), S(KC_END), _______, + _______, _______, _______, _______, _______, + _______, _______, _______, S(KC_F10), _______, _______), + + [FSYM] = LAYOUT_ergodox(_______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, + _______, _______, KC_TILD, KC_EXLM, _______, _______, + _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, + _______, KC_CIRC, KC_AMPR , KC_ASTR, KC_GRV , _______, _______, + KC_EQUAL, KC_MINUS, KC_UNDS, KC_BSLS, KC_COLON, KC_DQT , + _______, _______, KC_PLUS , KC_SLSH, KC_PIPE, _______ , _______, + _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______), + + [JSYM] = LAYOUT_ergodox(_______, _______, _______, _______, _______, _______, _______, + _______, KC_GRV, KC_AT , KC_LCBR, KC_RCBR, _______, _______, + _______, KC_HASH, KC_DLR , KC_LPRN, KC_RPRN, KC_LEFT, + _______, KC_PERC, KC_CIRC, KC_LBRACKET, KC_RBRACKET, _______, _______, + _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, + _______, _______, KC_QUES, KC_SLSH, KC_COLON, _______, + _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______), + + [MEDIA] = LAYOUT_ergodox(_______, _______, KC_MS_BTN4, _______, KC_MS_BTN5, _______, _______, + _______, KC_MS_WH_UP, KC_MS_WH_LEFT, KC_MS_UP, KC_MS_WH_RIGHT, _______, _______, + _______, KC_MS_WH_DOWN, KC_MS_LEFT, KC_MS_DOWN, KC_MS_RIGHT, _______, + _______, _______, KC_MS_ACCEL0, KC_MS_ACCEL1, KC_MS_ACCEL2, _______, _______, + _______, _______, _______, _______, KC_MS_BTN3, + _______, _______, _______, KC_MS_BTN1, KC_MS_BTN2, _______, + _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, + _______, _______, KC_AUDIO_VOL_DOWN, KC_AUDIO_MUTE, KC_AUDIO_VOL_UP, _______, _______, + KC_MEDIA_PREV_TRACK, KC_MEDIA_NEXT_TRACK, _______, _______, _______, + _______, _______, _______, _______, KC_MS_BTN1, KC_MEDIA_PLAY_PAUSE), + + [ADJUST] = LAYOUT_ergodox(_______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, + _______, TO(EDIT), TO(NUMPAD), TO(FSYM), TO(JSYM), TO(MEDIA), + _______, _______, _______, _______, _______, _______, _______, + _______, TO(QWERTY), _______, _______, _______, + _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______), + +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + // dynamically generate these. + case VRSN: + if (record->event.pressed) { + SEND_STRING (QMK_KEYBOARD "/" QMK_KEYMAP " @ " QMK_VERSION); + } + return false; + } + return true; +} + + +layer_state_t layer_state_set_user(layer_state_t state) { + switch (get_highest_layer(state)) { + case QWERTY: + ergodox_right_led_1_off(); + ergodox_right_led_2_off(); + ergodox_right_led_3_off(); + break; + case NUMPAD: + ergodox_right_led_1_on(); + ergodox_right_led_2_off(); + ergodox_right_led_3_off(); + break; + case EDIT: + ergodox_right_led_1_off(); + ergodox_right_led_2_on(); + ergodox_right_led_3_off(); + break; + case FSYM: + ergodox_right_led_1_on(); + ergodox_right_led_2_on(); + ergodox_right_led_3_off(); + break; + case JSYM: + ergodox_right_led_1_on(); + ergodox_right_led_2_off(); + ergodox_right_led_3_on(); + break; + case MEDIA: + ergodox_right_led_1_off(); + ergodox_right_led_2_on(); + ergodox_right_led_3_on(); + break; + case ADJUST: + ergodox_right_led_1_on(); + ergodox_right_led_2_on(); + ergodox_right_led_3_on(); + break; + } + return state; +} diff --git a/keyboards/ergodox_ez/keymaps/rmw/keymap.c b/keyboards/ergodox_ez/keymaps/rmw/keymap.c new file mode 100644 index 000000000000..b0b9bf13cdd8 --- /dev/null +++ b/keyboards/ergodox_ez/keymaps/rmw/keymap.c @@ -0,0 +1,13 @@ +#include "ergodox_ez.h" +#include "version.h" + +#define LONGPRESS_DELAY 180 +#define LAYER_TOGGLE_DELAY 350 + +#ifdef MACOSX +#include "keymap-mac.c" +#endif + +#ifdef WINDOWS +#include "keymap-win.c" +#endif diff --git a/keyboards/ergodox_ez/keymaps/rmw/readme.md b/keyboards/ergodox_ez/keymaps/rmw/readme.md new file mode 100644 index 000000000000..36e0d1de00d6 --- /dev/null +++ b/keyboards/ergodox_ez/keymaps/rmw/readme.md @@ -0,0 +1,11 @@ +# RMW Ergodox_EZ Layout + +This is the keymap I use on the Ergodox_EZ I use for work. I write reports and code in a variety of languages on this board and the various layers provide plenty of flexibility for navigating, editing text, and writing code and prose. + +I switched to a Mac in the past year, so my keymap now mostly gets used in the Mac mode; simply edit the keymap.c file to uncomment \#include keymap-win.c and comment out \#include keymap-mac.c to change back to the Windows version, but I haven't been updating that map as I've made changes moving forward on the Mac version. + +## The theory of this keymap + +The base layer is either QWERTY or MINIMAK4, as desired. Overlaid on that base layer are various layers triggered by one-shots, TOs, and LTs. Tapdances are used to cram lots of mods into few keys and provide freedom to hit combinations with either hand. Mods and layer things are one-shot (where reasonable) because I prefer that. + +An EDIT layer provides text navigation, selection, and editing capabilities in home position. The EXCEL layer offers a numpad and various spreadsheet-useful navigations and operations. Holding S will put the numpad under your right hand in home position. Keys F and J offer various useful symbols (mostly) on the opposite hand when held, including \[\]\(\)\{\} under the left pointer and middle fingers on bottom, middle, and top rows respectively. The MEDIA layer provides media controls (obvs) and some mouse movement and nav, in case I don't feel like reaching for the trackball/trackpad/mouse. diff --git a/keyboards/ergodox_ez/keymaps/rmw/rules.mk b/keyboards/ergodox_ez/keymaps/rmw/rules.mk new file mode 100644 index 000000000000..31e0fcf29339 --- /dev/null +++ b/keyboards/ergodox_ez/keymaps/rmw/rules.mk @@ -0,0 +1 @@ +TAP_DANCE_ENABLE=yes diff --git a/keyboards/kyria/keymaps/rmw/config.h b/keyboards/kyria/keymaps/rmw/config.h new file mode 100644 index 000000000000..02e5087b3e90 --- /dev/null +++ b/keyboards/kyria/keymaps/rmw/config.h @@ -0,0 +1,36 @@ +/* Copyright 2019 Thomas Baart + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License 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 MACOSX + +#ifdef OLED_DRIVER_ENABLE + #define OLED_DISPLAY_128X64 +#endif + +#ifdef RGBLIGHT_ENABLE + #define RGBLIGHT_ANIMATIONS + #define RGBLIGHT_HUE_STEP 8 + #define RGBLIGHT_SAT_STEP 8 + #define RGBLIGHT_VAL_STEP 8 +#endif + +// If you are using an Elite C rev3 on the follower side, uncomment the lines below: +// #define SPLIT_USB_DETECT +// #define NO_USB_STARTUP_CHECK + + diff --git a/keyboards/kyria/keymaps/rmw/keymap.c b/keyboards/kyria/keymaps/rmw/keymap.c new file mode 100644 index 000000000000..bf04272382fa --- /dev/null +++ b/keyboards/kyria/keymaps/rmw/keymap.c @@ -0,0 +1,199 @@ +/* Copyright 2019 Thomas Baart + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public 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 "rmw.h" + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [QWERTY] = LAYOUT_stack( + KC_TAB , KC_Q, KC_W, KC_E, KC_R, KC_T, + OSL(EDIT), KC_A, LT(NUMPAD,KC_S), KC_D, LT(FSYM,KC_F), KC_G, + TD(FRBK2) , KC_Z, KC_X, KC_C, KC_V, KC_B, TO(EDIT), KC_ESCAPE, + TO(ADJUST), TD(SGCA), TD(AGC), KC_BSPACE, TD(SHNTC), + + KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS, + KC_H, LT(JSYM,KC_J), KC_K, KC_L, LT(EDIT,KC_SCLN), KC_QUOT, + KC_DEL, TO(NUMPAD), KC_N, KC_M, KC_COMM, KC_DOT, LT(MEDIA,KC_SLSH), KC_MS_BTN1, + SFTENT, KC_SPC, TD(GCA), TD(CTLALL), KC_CAPS + ), + + [MINIMAK4] = LAYOUT_stack( + KC_TAB , KC_Q, KC_W, KC_D, KC_R, KC_K, + OSL(EDIT), KC_A, LT(NUMPAD,KC_S), KC_T, LT(FSYM,KC_F), KC_G, + OSM(MOD_LSFT) , KC_Z, KC_X, KC_C, KC_V, KC_B, TO(EDIT), KC_ESCAPE, + _______, TO(ADJUST), TD(SGCA), KC_BSPACE, TD(SHNTC), + + KC_Y, KC_U, KC_I, KC_O, KC_P, KC_PIPE, + KC_H, LT(JSYM,KC_J), KC_E, KC_L, LT(EDIT,KC_SCLN), KC_QUOT, + KC_DEL, TO(NUMPAD), KC_N, KC_M, KC_COMM, KC_DOT, LT(MEDIA,KC_SLSH), KC_MINS, + SFTENT, KC_SPC, TD(GCA), TD(CTLALL), _______ + ), + + [NUMPAD] = LAYOUT_stack( + _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, TO(QWERTY), _______, + _______, _______, _______, _______ , _______, + + _______, KC_7, KC_8, KC_9, KC_KP_MINUS, _______, + _______, KC_4, KC_5, KC_6, KC_KP_PLUS , _______, + _______, TO(EDIT), _______, KC_1, KC_2, KC_3, KC_KP_SLASH, LCTL(KC_RIGHT), + _______, _______, KC_0, KC_DOT, _______ + ), + + [EDIT] = LAYOUT_stack( + _______, TASK_MAN, _______, SELW_LEFT, SELW_RIGHT, _______, + _______, _______ , LGUI(KC_GRV), MVW_LEFT, MVW_RIGHT , _______, + LCTL(KC_LEFT), R_UNDO, R_CUT , R_COPY , R_PASTE, R_REDO , TO(NUMPAD), FORM_GET, + _______, _______, _______, DEL_WRD, _______, + + NEW_TAB , KC_PGUP, KC_UP, KC_PGDOWN, KC_PSCREEN, _______, + R_HOME , KC_LEFT, KC_DOWN, KC_RIGHT, R_END, _______, + FORM_PUT, TO(QWERTY), SEL_HOME, S(KC_LEFT), S(KC_DOWN), S(KC_RIGHT), SEL_END, _______, + _______, _______, _______, _______, _______ + ), + + [ADJUST] = LAYOUT_stack( + KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, + TO(QWERTY), TO(EDIT), TO(NUMPAD), TO(JSYM), TO(FSYM), TO(MEDIA), + DF(MINIMAK4), DF(QWERTY), RGB_SAD, RGB_HUD, RGB_VAD, RGB_RMOD,_______, _______, + _______, _______, _______, _______, _______, + + KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, + _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______ + ), + + [FSYM] = LAYOUT_stack( + _______, _______, _______, _______, _______, _______, + _______, _______, KC_TILD, KC_EXLM, _______, _______, + LCTL(KC_RIGHT), _______, TO(QWERTY), _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, + + KC_CIRC, KC_AMPR , KC_ASTR, KC_GRV , _______, _______, + KC_EQUAL, KC_MINUS, KC_UNDS, KC_PIPE, KC_COLON, KC_DQT, + _______, _______, _______, KC_PLUS, KC_BSLS, KC_SLSH, _______, _______, + _______, _______, _______, _______, _______ + ), + + [JSYM] = LAYOUT_stack( + _______, KC_GRV, KC_AT , KC_LCBR, KC_RCBR, _______, + _______, KC_HASH, KC_DLR , KC_LPRN, KC_RPRN, KC_LEFT, + _______, KC_PERC, KC_CIRC, KC_LBRACKET, KC_RBRACKET, _______, _______, _______, + _______, _______, _______, _______, _______, + + _______, _______, _______, _______, _______, _______, + _______, _______, KC_QUES, KC_SLSH, KC_COLON, _______, + _______, _______, _______, _______, _______, TO(QWERTY), _______, LCTL(KC_LEFT), + _______, _______, _______, _______, _______ + ), + + [MEDIA] = LAYOUT_stack( + _______, KC_WH_U, KC_WH_L, KC_MS_UP, KC_WH_R, _______, + _______, KC_WH_D, KC_MS_LEFT, KC_MS_DOWN, KC_MS_RIGHT, _______, + _______, _______, KC_ACL0, KC_ACL1, KC_ACL2, _______, _______, _______, + _______, _______, _______, _______, _______, + + _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, KC_VOLD, KC_MUTE, KC_VOLU, _______, + KC_MS_BTN1, KC_MEDIA_PLAY_PAUSE, KC_MRWD, KC_MFFD, _______ + ) +}; + +bool process_record_keymap(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case FORM_GET: + if (record->event.pressed) { + tap_code(KC_BTN1); + tap_code16(G(KC_A)); + tap_code16(G(KC_C)); + } + return false; + case FORM_PUT: + if (record->event.pressed) { + tap_code16(KC_MS_BTN1); + tap_code16(G(KC_A)); + tap_code16(G(KC_V)); + } + return false; + } + return true; +} + +#ifdef ENCODER_ENABLE +void encoder_update_keymap(uint8_t index, bool clockwise) { + if (index == 0) { + switch (get_highest_layer(layer_state)) { + case EDIT: + enc_move_words(clockwise); + break; + case QWERTY: + enc_move_desktop(clockwise); + default: + enc_history_scrubbing(clockwise); + break; + } + } else if (index == 1) { + switch (get_highest_layer(layer_state)) { + case QWERTY: + enc_scrolling(clockwise); + break; + case FSYM: + enc_zoom(clockwise); + break; + default: + enc_volume_knob(clockwise); + break; + } + } +} +#endif + +#ifdef RGBLIGHT_ENABLE // include mods, as well as layers +layer_state_t layer_state_set_user(layer_state_t state) { + switch (get_highest_layer(state)) { + case QWERTY: + rgblight_setrgb (0x00, 0x00, 0x00); + break; + case MINIMAK4: + rgblight_setrgb (0x20, 0x20, 0x20); + break; + case NUMPAD: + rgblight_setrgb (0xFF, 0x00, 0x00); + break; + case EDIT: + rgblight_setrgb (0x00, 0xFF, 0x00); + break; + case FSYM: + rgblight_setrgb (0x7A, 0x7A, 0x00); + break; + case JSYM: + rgblight_setrgb (0x7A, 0x00, 0x7A); + break; + case MEDIA: + rgblight_setrgb (0x00, 0x7A, 0x7A); + break; + case ADJUST: + rgblight_setrgb (0x7A, 0x7A, 0x7A); + break; + default: + rgblight_setrgb (0x00, 0x00, 0x00); + } + return state; +} +#endif diff --git a/keyboards/kyria/keymaps/rmw/readme.md b/keyboards/kyria/keymaps/rmw/readme.md new file mode 100644 index 000000000000..c05ca494b799 --- /dev/null +++ b/keyboards/kyria/keymaps/rmw/readme.md @@ -0,0 +1,9 @@ +# RMW Kyria Layout + +This is a Kyria edition of the keymap I use on the Ergodox_EZ I use for work. I write reports and code in a variety of languages on that board and the various layers provide plenty of flexibility for navigating, editing text, and writing code and prose. This keymap is mostly Mac-focused in its shortcuts and tapdances. + +## The theory of this keymap + +The base layer is either QWERTY or MINIMAK4, as desired. Overlaid on that base layer are various layers triggered by one-shots, TOs, and LTs. Tapdances are used to cram lots of mods into few keys and provide freedom to hit combinations with either hand. Mods and layer things are one-shot (where reasonable) because I prefer that. + +An EDIT layer provides text navigation, selection, and editing capabilities in home position. The NUMPAD layer offers a numpad and various spreadsheet-useful navigations and operations. Holding S will put the numpad under your right hand in home position. Keys F and J offer various useful symbols (mostly) on the opposite hand when held, including \[\]\(\)\{\} under the left pointer and middle fingers on bottom, middle, and top rows respectively. The MEDIA layer provides media controls (obvs) and some mouse movement and nav, in case I don't feel like reaching for the trackball/trackpad/mouse. diff --git a/keyboards/kyria/keymaps/rmw/rules.mk b/keyboards/kyria/keymaps/rmw/rules.mk new file mode 100644 index 000000000000..d41ffaef6dfe --- /dev/null +++ b/keyboards/kyria/keymaps/rmw/rules.mk @@ -0,0 +1,4 @@ +OLED_DRIVER_ENABLE = no # Enables the use of OLED displays +ENCODER_ENABLE = yes # Enables the use of one or more encoders +RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow +TAP_DANCE_ENABLE=yes # Enables Tap Dance diff --git a/keyboards/kyria/kyria.h b/keyboards/kyria/kyria.h index a2a675e0db5a..13375ae882b1 100644 --- a/keyboards/kyria/kyria.h +++ b/keyboards/kyria/kyria.h @@ -41,3 +41,25 @@ { R32, R33, R34, R35, R36, R37, R38, R39 }, \ { R45, R46, R47, R48, R49, KC_NO, KC_NO, KC_NO }, \ } + +#define LAYOUT_stack( \ + L00, L01, L02, L03, L04, L05, \ + L12, L13, L14, L15, L16, L17, \ + L24, L25, L26, L27, L28, L29, L30, L31, \ + L40, L41, L42, L43, L44, \ + \ + R06, R07, R08, R09, R10, R11, \ + R18, R19, R20, R21, R22, R23, \ + R32, R33, R34, R35, R36, R37, R38, R39, \ + R45, R46, R47, R48, R49 \ +) \ +{ \ + { KC_NO, KC_NO, L05, L04, L03, L02, L01, L00 }, \ + { KC_NO, KC_NO, L17, L16, L15, L14, L13, L12 }, \ + { L31, L30, L29, L28, L27, L26, L25, L24 }, \ + { L44, L43, L42, L41, L40, KC_NO, KC_NO, KC_NO }, \ + { KC_NO, KC_NO, R06, R07, R08, R09, R10, R11 }, \ + { KC_NO, KC_NO, R18, R19, R20, R21, R22, R23 }, \ + { R32, R33, R34, R35, R36, R37, R38, R39 }, \ + { R45, R46, R47, R48, R49, KC_NO, KC_NO, KC_NO }, \ +} diff --git a/users/rmw/encoder_functions.c b/users/rmw/encoder_functions.c new file mode 100644 index 000000000000..39032d0eba88 --- /dev/null +++ b/users/rmw/encoder_functions.c @@ -0,0 +1,53 @@ +// Encoder functions to mix and match! + +#include "encoder_functions.h" + +void enc_move_words(bool cw){ // Move whole words. Hold shift to select while moving. + if (cw) { + tap_code16(A(KC_RGHT)); + } else { + tap_code16(A(KC_LEFT)); + } +} +void enc_history_scrubbing(bool cw){ // Undo/Redo. + if (cw) { + tap_code16(G(S(KC_Z))); + } else { + tap_code16(G(KC_Z)); + } +} +void enc_scrolling(bool cw){ // Scrolling. + if (cw) { + tap_code(KC_MS_WH_DOWN); + } else { + tap_code(KC_MS_WH_UP); + } +} +void enc_scrolling_h(bool cw){ // Scrolling. + if (cw) { + tap_code(KC_MS_WH_RIGHT); + } else { + tap_code(KC_MS_WH_LEFT); + } +} +void enc_volume_knob(bool cw){ // Volume control. + if (cw) { + tap_code(KC_VOLU); + } else { + tap_code(KC_VOLD); + } +} +void enc_move_desktop(bool cw){ // Switch Desktops (Mac). + if (cw) { + tap_code16(C(KC_RIGHT)); + } else { + tap_code16(C(KC_LEFT)); + } +} +void enc_zoom(bool cw){ // Zoom in/zoom out. + if (cw) { + tap_code16(G(KC_PLUS)); + } else { + tap_code16(G(KC_MINUS)); + } +} diff --git a/users/rmw/encoder_functions.h b/users/rmw/encoder_functions.h new file mode 100644 index 000000000000..d80a78668a4a --- /dev/null +++ b/users/rmw/encoder_functions.h @@ -0,0 +1,11 @@ +#pragma once +#include QMK_KEYBOARD_H +#include "rmw.h" + +void enc_move_words(bool cw); +void enc_history_scrubbing(bool cw); +void enc_scrolling(bool cw); +void enc_scrolling_h(bool cw); +void enc_volume_knob(bool cw); +void enc_move_desktop(bool cw); +void enc_zoom(bool cw); diff --git a/users/rmw/rmw.c b/users/rmw/rmw.c new file mode 100644 index 000000000000..bb1c1984f5bd --- /dev/null +++ b/users/rmw/rmw.c @@ -0,0 +1 @@ +#include "rmw.h" diff --git a/users/rmw/rmw.h b/users/rmw/rmw.h new file mode 100644 index 000000000000..272a400c753a --- /dev/null +++ b/users/rmw/rmw.h @@ -0,0 +1,87 @@ +#pragma once +#include QMK_KEYBOARD_H + +#include "quantum.h" +#include "action.h" +#include "version.h" + +#ifdef TAP_DANCE_ENABLE +#include "tapdances.h" +#endif + +#ifdef ENCODER_ENABLE +#include "encoder_functions.h" +#endif + +enum user_layers { + QWERTY = 0 + ,MINIMAK4 + ,NUMPAD + ,EDIT + ,FSYM + ,JSYM + ,MEDIA + ,ADJUST +}; + + +// Custom keycodes +#define SFTENT SFT_T(KC_ENT) + +enum user_custom_keycodes_universal { + VRSN = SAFE_RANGE + ,OS_CSFT = OSM(MOD_LSFT | MOD_LCTL) + ,OS_GSFT = OSM(MOD_LSFT | MOD_LGUI) + ,OS_CALT = OSM(MOD_LCTL | MOD_LALT) + ,OS_ALT = OSM(MOD_LALT) + ,OS_CTL = OSM(MOD_LCTL) + ,NEW_SAFE_RANGE +}; + +#ifdef MACOSX + enum user_custom_keycodes { + FORM_GET = NEW_SAFE_RANGE + ,FORM_PUT + ,OS_CMD = OSM(MOD_LGUI) + ,R_UNDO = LGUI(KC_Z) + ,R_REDO = LGUI(KC_Y) + ,R_CUT = LGUI(KC_X) + ,R_COPY = LGUI(KC_C) + ,R_PASTE = LGUI(KC_V) + ,DEL_WRD = LALT(KC_BSPACE) + ,MVW_LEFT = LALT(KC_LEFT) + ,MVW_RIGHT = LALT(KC_RIGHT) + ,SELW_LEFT = LALT(S(KC_LEFT)) + ,SELW_RIGHT = LALT(S(KC_RIGHT)) + ,NEW_TAB = LGUI(KC_T) + ,TASK_MAN = LGUI(LALT(KC_ESCAPE)) + ,SEL_HOME = S(LGUI(KC_LEFT)) + ,SEL_END = S(LGUI(KC_RIGHT)) + ,R_HOME = LGUI(KC_LEFT) + ,R_END = LGUI(KC_RIGHT) + }; +#endif + +#ifdef WINDOWS + enum user_custom_keycodes { + FORM_GET = NEW_SAFE_RANGE + ,FORM_PUT + ,OS_WIN = OSM(MOD_LGUI) + ,R_UNDO = LCTL(KC_Z) + ,R_REDO = LCTL(KC_Y) + ,R_CUT = LCTL(KC_X) + ,R_COPY = LCTL(KC_C) + ,R_PASTE = LCTL(KC_V) + ,DEL_WRD = LALT(KC_BSPACE) + ,MVW_LEFT = LCTL(KC_LEFT) + ,MVW_RIGHT = LCTL(KC_RIGHT) + ,SELW_LEFT = LCTL(S(KC_LEFT)) + ,SELW_RIGHT = LCTL(S(KC_RIGHT)) + ,NEW_TAB = LCTL(KC_T) + ,TASK_MAN = LCTL(LALT(KC_ESCAPE)) + ,SEL_HOME = S(KC_HOME) + ,SEL_END = S(KC_END) + ,R_HOME = KC_HOME + ,R_END = KC_END +}; +#endif diff --git a/users/rmw/rules.mk b/users/rmw/rules.mk new file mode 100644 index 000000000000..468745dbc2a8 --- /dev/null +++ b/users/rmw/rules.mk @@ -0,0 +1,9 @@ +SRC += rmw.c + +ifdef TAP_DANCE_ENABLE +SRC += tapdances.c +endif + +ifdef ENCODER_ENABLE +SRC += encoder_functions.c +endif diff --git a/users/rmw/tapdances.c b/users/rmw/tapdances.c new file mode 100644 index 000000000000..1b44a8725374 --- /dev/null +++ b/users/rmw/tapdances.c @@ -0,0 +1,389 @@ +// Useful tapdance functions! + +#include "tapdances.h" + +qk_tap_dance_action_t tap_dance_actions[] = { + [SHCAP] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, caps, shift_reset) + ,[TDGUI] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, shiftgui, gui_reset) + ,[TDGUI2] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, guictl, ubermod_reset) + ,[SHENT] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, shiftenter, shift_reset) + ,[SHNTC] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, shiftentercaps, shift_reset) + ,[GCA] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, ubermod_mac, ubermod_reset) // GUI->CTL->ALT + ,[AGC] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, ubermod2_mac, ubermod_reset) // ALT->GUI->CTL + ,[SGCA] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, shift_and_mac, CASG_reset) // SG->SC->SA + ,[GUCTL] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, guictl, ubermod_reset) + ,[CAG] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, ubermod, ubermod_reset) // CTL->ALT->GUI + ,[ACG] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, ubermod2, ubermod_reset) // ALT->GUI->CTL + ,[SCAG] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, shift_and, CASG_reset) // SG->SC->SA + ,[DLTR] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, deleter, ubermod_reset) // backspace, backspace, alt backspace, gui backspace + ,[FRBK2] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, forward_back_mac, ubermod_reset) + ,[CTLALL] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, ctrl_all_mac, ubermod_reset) // C->CG->CA->CAG + ,[CTLAND] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, ctrl_all, ubermod_reset) // C->CA->CG->CAG + ,[FRBK] = ACTION_TAP_DANCE_DOUBLE(KC_WWW_BACK,KC_WWW_FORWARD) +}; + +void caps(qk_tap_dance_state_t *state, void *user_data) // Shift, Caps +{ if (state->count >= 2) {register_code(KC_CAPS); unregister_code(KC_CAPS);} + else if (state->pressed) {register_mods(MOD_LSFT);} else {set_oneshot_mods(MOD_LSFT);} + reset_tap_dance(state); +} + +void forward_back_mac(qk_tap_dance_state_t *state, void *user_data) // G<-, then G-> +{ + if (state->count > 1) { + tap_code16(G(KC_RGHT)); + } + else { + tap_code16(G(KC_LEFT)); + } + reset_tap_dance(state); +} + +void shiftgui(qk_tap_dance_state_t *state, void *user_data) // G->SG +{ + if (state->count > 1) { + if (state->pressed) { + register_mods(MOD_LSFT | MOD_LGUI); + } + else { + set_oneshot_mods(MOD_LSFT | MOD_LGUI); + } + } + else if (state->pressed) { + register_mods(MOD_LGUI); + } + else { + set_oneshot_mods(MOD_LGUI); + } + reset_tap_dance(state); +} + +void guictl(qk_tap_dance_state_t *state, void *user_data) // G->GC +{ + if (state->count > 1) { + if (state->pressed) { + register_mods(MOD_LCTL | MOD_LGUI); + } + else { + set_oneshot_mods(MOD_LCTL | MOD_LGUI); + } + } + else if (state->pressed) { + register_mods(MOD_LGUI); + } + else { + set_oneshot_mods(MOD_LGUI); + } + reset_tap_dance(state); +} + +void deleter(qk_tap_dance_state_t *state, void *user_data) // bkspc -> delwrd -> delline +{ + if (state->count > 3) { + tap_code16(G(KC_BSPC)); + } + else if (state->count > 2) { + tap_code16(A(KC_BSPC)); + } + else { + tap_code(KC_BSPC); + } + reset_tap_dance(state); +} + +void ubermod(qk_tap_dance_state_t *state, void *user_data) // CTL->ALT->GUI +{ + if (state->count > 2) { + if (state->pressed) { + register_mods(MOD_LGUI); + } + else { + set_oneshot_mods(MOD_LGUI); + } + } + else if (state->count > 1) { + if (state->pressed) { + register_mods(MOD_LALT); + } + else { + set_oneshot_mods(MOD_LALT); + } + } + else if (state->pressed) { + register_mods(MOD_LCTL); + } + else { + set_oneshot_mods(MOD_LCTL); + } + reset_tap_dance(state); +} + +void ubermod_mac(qk_tap_dance_state_t *state, void *user_data) // GUI->CTL->ALT +{ + if (state->count > 2) { + if (state->pressed) { + register_mods(MOD_LALT); + } + else { + set_oneshot_mods(MOD_LALT); + } + } + else if (state->count > 1) { + if (state->pressed) { + register_mods(MOD_LCTL); + } + else { + set_oneshot_mods(MOD_LCTL); + } + } + else if (state->pressed) { + register_mods(MOD_LGUI); + } + else { + set_oneshot_mods(MOD_LGUI); + } + reset_tap_dance(state); +} + +void ubermod2(qk_tap_dance_state_t *state, void *user_data) // ALT->CTL->GUI +{ + if (state->count > 2) { + if (state->pressed) { + register_mods(MOD_LGUI); + } + else { + set_oneshot_mods(MOD_LGUI); + } + } + else if (state->count > 1) { + if (state->pressed) { + register_mods(MOD_LCTL); + } + else { + set_oneshot_mods(MOD_LCTL); + } + } + else if (state->pressed) { + register_mods(MOD_LALT); + } + else { + set_oneshot_mods(MOD_LALT); + } + reset_tap_dance(state); +} + +void ubermod2_mac(qk_tap_dance_state_t *state, void *user_data) // ALT->GUI->CTL +{ + if (state->count > 2) { + if (state->pressed) { + register_mods(MOD_LCTL); + } + else { + set_oneshot_mods(MOD_LCTL); + } + } + else if (state->count > 1) { + if (state->pressed) { + register_mods(MOD_LGUI); + } + else { + set_oneshot_mods(MOD_LGUI); + } + } + else if (state->pressed) { + register_mods(MOD_LALT); + } + else { + set_oneshot_mods(MOD_LALT); + } + reset_tap_dance(state); +} + +void shift_reset(qk_tap_dance_state_t *state, void *user_data) +{ + unregister_mods(MOD_LSFT); + // clear_oneshot_mods(); +} +void gui_reset(qk_tap_dance_state_t *state, void *user_data) +{ + unregister_mods(MOD_LSFT | MOD_LGUI); +} +void CAS_reset(qk_tap_dance_state_t *state, void *user_data) +{ + unregister_mods(MOD_LCTL | MOD_LSFT | MOD_LALT); +} +void CASG_reset(qk_tap_dance_state_t *state, void *user_data) +{ + unregister_mods(MOD_LCTL | MOD_LSFT | MOD_LALT | MOD_LGUI); + // clear_oneshot_mods(); +} +void ubermod_reset(qk_tap_dance_state_t *state, void *user_data) // AKA CAG_reset +{ + unregister_mods(MOD_LCTL | MOD_LALT | MOD_LGUI); +} + +void shiftenter(qk_tap_dance_state_t *state, void *user_data) +{ + if (state->count > 1) { + tap_code(KC_ENT); + } + else if (state->pressed) { + register_mods(MOD_LSFT); + } + else { + set_oneshot_mods(MOD_LSFT); + } + reset_tap_dance(state); +} + +void shiftentercaps(qk_tap_dance_state_t *state, void *user_data) +{ + if (state->count > 2) { + tap_code(KC_CAPS); + } + else if (state->count > 1) { + tap_code(KC_ENT); + } + else if (state->pressed) { + register_mods(MOD_LSFT); + } + else { + set_oneshot_mods(MOD_LSFT); + } + reset_tap_dance(state); +} + +void ctrl_all_mac(qk_tap_dance_state_t *state, void *user_data) // C->CG->CAG +{ + if (state->count > 2) { + if (state->pressed) { + register_mods(MOD_LCTL | MOD_LALT | MOD_LGUI); + } + else { + set_oneshot_mods(MOD_LCTL | MOD_LGUI | MOD_LALT); + } + } + else if (state->count > 1) { + if (state->pressed) { + register_mods(MOD_LCTL | MOD_LGUI); + } + else { + set_oneshot_mods(MOD_LCTL | MOD_LGUI); + } + } + else if (state->pressed) { + register_mods(MOD_LCTL); + } + else { + set_oneshot_mods(MOD_LCTL); + } + reset_tap_dance(state); +} + +void ctrl_all(qk_tap_dance_state_t *state, void *user_data) // C->CA->SC +{ + if (state->count > 2) { + if (state->pressed) { + register_mods(MOD_LCTL | MOD_LSFT); + } + else { + set_oneshot_mods(MOD_LCTL | MOD_LSFT); + } + } + else if (state->count > 1) { + if (state->pressed) { + register_mods(MOD_LCTL | MOD_LALT); + } + else { + set_oneshot_mods(MOD_LCTL | MOD_LALT); + } + } + else if (state->pressed) { + register_mods(MOD_LCTL); + } + else { + set_oneshot_mods(MOD_LCTL); + } + reset_tap_dance(state); +} + +void alt_all(qk_tap_dance_state_t *state, void *user_data) // A->SA->AC +{ + if (state->count > 2) { + if (state->pressed) { + register_mods(MOD_LCTL | MOD_LALT); + } + else { + set_oneshot_mods(MOD_LALT | MOD_LCTL); + } + } + else if (state->count > 1) { + if (state->pressed) { + register_mods(MOD_LSFT | MOD_LALT); + } + else { + set_oneshot_mods(MOD_LALT | MOD_LSFT); + } + } + else if (state->pressed) { + register_mods(MOD_LALT); + } + else { + set_oneshot_mods(MOD_LALT); + } + reset_tap_dance(state); +} + +void shift_and(qk_tap_dance_state_t *state, void *user_data) // SC->SA->SG +{ + if (state->count > 2) { + if (state->pressed) { + register_mods(MOD_LSFT | MOD_LGUI); + } + else { + set_oneshot_mods(MOD_LGUI | MOD_LSFT); + } + } + else if (state->count > 1) { + if (state->pressed) { + register_mods(MOD_LSFT | MOD_LALT); + } + else { + set_oneshot_mods(MOD_LALT | MOD_LSFT); + } + } + else if (state->pressed) { + register_mods(MOD_LCTL | MOD_LSFT); + } + else { + set_oneshot_mods(MOD_LSFT | MOD_LCTL); + } + reset_tap_dance(state); +} + +void shift_and_mac(qk_tap_dance_state_t *state, void *user_data) // SG->SC->SA +{ + if (state->count > 1) { + if (state->pressed) { + register_mods(MOD_LSFT | MOD_LALT); + } + else { + set_oneshot_mods(MOD_LALT | MOD_LSFT); + } + } + else if (state->count > 2) { + if (state->pressed) { + register_mods(MOD_LCTL | MOD_LSFT); + } + else { + set_oneshot_mods(MOD_LSFT | MOD_LCTL); + } + } + else if (state->pressed) { + register_mods(MOD_LSFT | MOD_LGUI); + } + else { + set_oneshot_mods(MOD_LGUI | MOD_LSFT); + } + reset_tap_dance(state); +} diff --git a/users/rmw/tapdances.h b/users/rmw/tapdances.h new file mode 100644 index 000000000000..11425011c53d --- /dev/null +++ b/users/rmw/tapdances.h @@ -0,0 +1,46 @@ +#pragma once +#include "rmw.h" +#include "process_tap_dance.h" +#include "action.h" + +void caps(qk_tap_dance_state_t *state, void *user_data); // Shift, Caps +void forward_back_mac(qk_tap_dance_state_t *state, void *user_data); // G<-, then G-> +void shiftgui(qk_tap_dance_state_t *state, void *user_data); // G->SG +void guictl(qk_tap_dance_state_t *state, void *user_data); // G->GC +void deleter(qk_tap_dance_state_t *state, void *user_data); // bkspc -> delwrd -> delline +void ubermod(qk_tap_dance_state_t *state, void *user_data); // CTL->ALT->GUI +void ubermod_mac(qk_tap_dance_state_t *state, void *user_data); // GUI->CTL->ALT +void ubermod2(qk_tap_dance_state_t *state, void *user_data); // ALT->CTL->GUI +void ubermod2_mac(qk_tap_dance_state_t *state, void *user_data); // ALT->GUI->CTL +void shift_reset(qk_tap_dance_state_t *state, void *user_data); +void gui_reset(qk_tap_dance_state_t *state, void *user_data); +void CAS_reset(qk_tap_dance_state_t *state, void *user_data); +void CASG_reset(qk_tap_dance_state_t *state, void *user_data); +void ubermod_reset(qk_tap_dance_state_t *state, void *user_data); // AKA CAG_reset +void shiftenter(qk_tap_dance_state_t *state, void *user_data); +void shiftentercaps(qk_tap_dance_state_t *state, void *user_data); +void ctrl_all_mac(qk_tap_dance_state_t *state, void *user_data); // C->CG->CAG +void ctrl_all(qk_tap_dance_state_t *state, void *user_data); // C->CA->SC +void alt_all(qk_tap_dance_state_t *state, void *user_data); // A->SA->AC +void shift_and(qk_tap_dance_state_t *state, void *user_data); // SC->SA->SG +void shift_and_mac(qk_tap_dance_state_t *state, void *user_data); // SG->SC->SA + +enum { + SHCAP = 0 + ,TDGUI + ,TDGUI2 + ,SHENT + ,SHNTC + ,GUCTL + ,FRBK + ,FRBK2 + ,GCA + ,AGC + ,SGCA + ,SCAG + ,CAG + ,ACG + ,CTLALL + ,CTLAND + ,DLTR +}; From 207b17bc4dd014ac5543546132c55be7d3d90217 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gustavs=20G=C5=ABtmanis?= Date: Mon, 29 Jun 2020 21:27:29 +0300 Subject: [PATCH 291/930] [keymap] adding a new keymap to planck and crkbd (#9374) Co-authored-by: Ryan --- keyboards/planck/keymaps/copface/config.h | 17 ++ keyboards/planck/keymaps/copface/keymap.c | 191 +++++++++++++++++++++ keyboards/planck/keymaps/copface/readme.md | 11 ++ keyboards/planck/keymaps/copface/rules.mk | 11 ++ 4 files changed, 230 insertions(+) create mode 100644 keyboards/planck/keymaps/copface/config.h create mode 100644 keyboards/planck/keymaps/copface/keymap.c create mode 100644 keyboards/planck/keymaps/copface/readme.md create mode 100644 keyboards/planck/keymaps/copface/rules.mk diff --git a/keyboards/planck/keymaps/copface/config.h b/keyboards/planck/keymaps/copface/config.h new file mode 100644 index 000000000000..da5d3858c834 --- /dev/null +++ b/keyboards/planck/keymaps/copface/config.h @@ -0,0 +1,17 @@ +#pragma once + +#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 + +#define MIDI_BASIC +#define ENCODER_RESOLUTION 4 + +#define LEADER_TIMEOUT 300 +#define TAPPING_TERM 180 diff --git a/keyboards/planck/keymaps/copface/keymap.c b/keyboards/planck/keymaps/copface/keymap.c new file mode 100644 index 000000000000..0754a0c742d3 --- /dev/null +++ b/keyboards/planck/keymaps/copface/keymap.c @@ -0,0 +1,191 @@ +#include QMK_KEYBOARD_H +#include "muse.h" + +// Custom Keycode Definitions +#define LOWER MO(_LOWER) +#define RAISE MO(_RAISE) +#define META MO(_META) + +#define KC_PRS LGUI(LALT(LCTL(KC_4))) +#define KC_EUR LALT(KC_4) +#define KC_MGRV LALT(KC_GRV) + +#define KC_FORMAT LGUI(LALT(KC_L)) +#define KC_FBSP LALT(KC_BSPC) +#define KC_FDEL LALT(KC_DEL) +#define KC_PS3 LSFT(LCTL(LGUI(KC_3))) +#define KC_PS4 LSFT(LCTL(LGUI(KC_4))) + +#define HK_TM LALT(KC_2) +#define HK_AF9 LALT(KC_F9) + +#define KC_SRC LGUI(KC_F12) +#define KC_RNME LSFT(KC_F6) + +#define M_LGSPC LGUI_T(KC_SPC) +#define M_LCENT LCTL_T(KC_ENT) +#define M_LGENT LGUI_T(KC_ENT) + +enum planck_layers { + _DEFAULT = 0, + _LOWER, + _RAISE, + _META, + _ADJUST +}; + +enum planck_keycodes { + KC_ARR = SAFE_RANGE, // -> + KC_FARR, // => + HK_CLOS, // /> + XD1, // :D + XD3, // :DDD + XD5, // :DDDDD + XD15, // :DDDDDDDDDDDDDDD +}; + +enum tapdancers { + T_BR = 0, // [, ] + T_PA, // (, ) + T_CU, // {, } + T_DL, // $, € + T_SL, // slash, backslash +}; + +//Tap Dance Definitions +qk_tap_dance_action_t tap_dance_actions[] = { + [T_BR] = ACTION_TAP_DANCE_DOUBLE(KC_LBRC, KC_RBRC), + [T_PA] = ACTION_TAP_DANCE_DOUBLE(KC_LPRN, KC_RPRN), + [T_CU] = ACTION_TAP_DANCE_DOUBLE(KC_LCBR, KC_RCBR), + [T_DL] = ACTION_TAP_DANCE_DOUBLE(KC_DLR, KC_EUR), + [T_SL] = ACTION_TAP_DANCE_DOUBLE(KC_SLSH, KC_BSLS), +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +[_DEFAULT] = 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, XXXXXXX, KC_ENT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, XXXXXXX, KC_LEAD, + KC_LGUI, KC_LCTL, KC_LALT, KC_LALT, LOWER, KC_SPC, META, RAISE, KC_RALT, KC_MPRV, KC_MPLY, KC_MNXT +), + +[_LOWER] = LAYOUT_planck_grid( + KC_F1, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, XXXXXXX, XXXXXXX, XXXXXXX, + _______, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, XXXXXXX, + _______, HK_TM, XD1, XD3, XD5, XD15, XXXXXXX, XXXXXXX, KC_ARR, KC_FARR, HK_CLOS, XXXXXXX, + _______, _______, _______, _______, _______, KC_DEL, KC_FBSP, RAISE, KC_RALT, KC_VOLD, KC_MUTE, KC_VOLU +), + +[_RAISE] = LAYOUT_planck_grid( + KC_MGRV, KC_MINUS, KC_EQL, KC_EXLM, KC_QUES, KC_PLUS, KC_PGUP, KC_HOME, KC_UP, KC_END, XXXXXXX, KC_FBSP, + KC_TILD, TD(T_BR), TD(T_CU), TD(T_PA), TD(T_DL), KC_SLSH, KC_RNME, KC_LEFT, KC_DOWN, KC_RGHT, XXXXXXX, KC_FORMAT, + _______, KC_UNDS, KC_DQUO, KC_QUOT, KC_PIPE, KC_BSLS, XXXXXXX, KC_SCLN, KC_COLN, XXXXXXX, XXXXXXX, XXXXXXX, + _______, _______, _______, _______, _______, KC_DEL, KC_FDEL, _______, XXXXXXX, KC_VOLD, KC_MUTE, KC_VOLU +), + +[_META] = LAYOUT_planck_grid( + XXXXXXX, KC_F1, KC_F2, KC_F3, KC_F4, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_SRC, XXXXXXX, + XXXXXXX, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + XXXXXXX, KC_F10, KC_F11, KC_F12, HK_AF9, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX +), + +[_ADJUST] = LAYOUT_planck_grid( + XXXXXXX, KC_F1, KC_F2, KC_F3, KC_F4, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, CG_TOGG, XXXXXXX, + XXXXXXX, KC_F5, KC_F6, KC_F7, KC_F8, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + XXXXXXX, KC_F9, KC_F10, KC_F11, KC_F12, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RESET +) +}; + +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 KC_ARR: + if (record->event.pressed) { + SEND_STRING("->"); + } + + return false; + + case KC_FARR: + if (record->event.pressed) { + SEND_STRING("=>"); + } + + return false; + + case XD1: + if (record->event.pressed) { + SEND_STRING(":D"); + } + + return false; + + case XD3: + if (record->event.pressed) { + SEND_STRING(":DDD"); + } + + return false; + + case XD5: + if (record->event.pressed) { + SEND_STRING(":DDDDD"); + } + + return false; + + case XD15: + if (record->event.pressed) { + SEND_STRING(":DDDDDDDDDDDDDDD"); + } + + return false; + + case HK_CLOS: + if (record->event.pressed) { + SEND_STRING("/>"); + } + + return false; + } + + return true; +} + +LEADER_EXTERNS(); +void matrix_scan_user(void) { + LEADER_DICTIONARY() { + leading = false; + leader_end(); + + // Screenshot + SEQ_ONE_KEY(KC_S) { + tap_code16(G(C(S(KC_4)))); + } + // 1Pass browser + SEQ_ONE_KEY(KC_A) { + tap_code16(G(A(KC_BSLS))); + } + // 1Pass mini + SEQ_TWO_KEYS(KC_A, KC_A) { + tap_code16(G(KC_BSLS)); + } + // Comment out + SEQ_ONE_KEY(KC_F) { + tap_code16(G(KC_SLSH)); + } + // Spotlight + SEQ_ONE_KEY(KC_SPC) { + tap_code16(G(KC_SPC)); + } + // Auto format + SEQ_ONE_KEY(KC_ENT) { + tap_code16(S(G(A(KC_F)))); + } + } +} diff --git a/keyboards/planck/keymaps/copface/readme.md b/keyboards/planck/keymaps/copface/readme.md new file mode 100644 index 000000000000..56a048c4a9ef --- /dev/null +++ b/keyboards/planck/keymaps/copface/readme.md @@ -0,0 +1,11 @@ +# Copface's planck keyboard layout + +This layout utilizes tapdancing and leader keys as well as 3 extra layers for maximizing the efficiancy when programming. + +Please see the keymap.c for how the keymap looks and works. +The home row is filled with everything one could need when working on web development, +It's all a layer away. + +To build and flash this keymap, use this command: + + qmk compile -kb planck/rev6 -km copface diff --git a/keyboards/planck/keymaps/copface/rules.mk b/keyboards/planck/keymaps/copface/rules.mk new file mode 100644 index 000000000000..aacc6c65a89c --- /dev/null +++ b/keyboards/planck/keymaps/copface/rules.mk @@ -0,0 +1,11 @@ +SRC += muse.c + +BOOTMAGIC_ENABLE = no +MOUSEKEY_ENABLE = no +CONSOLE_ENABLE = no +COMMAND_ENABLE = no +MIDI_ENABLE = no +AUDIO_ENABLE = yes +RGBLIGHT_ENABLE = no +TAP_DANCE_ENABLE = yes +LEADER_ENABLE = yes From cf17a8eb9550ca5d56344fd479e25112b5ad8bfe Mon Sep 17 00:00:00 2001 From: Frothy Date: Mon, 29 Jun 2020 15:58:15 -0300 Subject: [PATCH 292/930] Add Via support for Hasu FC660C controller (#9563) Co-authored-by: Ryan --- keyboards/fc660c/config.h | 8 ++--- keyboards/fc660c/fc660c.h | 8 +---- keyboards/fc660c/keymaps/via/README.md | 5 +++ keyboards/fc660c/keymaps/via/keymap.c | 46 ++++++++++++++++++++++++++ keyboards/fc660c/keymaps/via/rules.mk | 2 ++ 5 files changed, 58 insertions(+), 11 deletions(-) create mode 100644 keyboards/fc660c/keymaps/via/README.md create mode 100644 keyboards/fc660c/keymaps/via/keymap.c create mode 100644 keyboards/fc660c/keymaps/via/rules.mk diff --git a/keyboards/fc660c/config.h b/keyboards/fc660c/config.h index e55896e6c913..bba402ca48b7 100644 --- a/keyboards/fc660c/config.h +++ b/keyboards/fc660c/config.h @@ -21,15 +21,15 @@ along with this program. If not, see . #include "config_common.h" /* USB Device descriptor parameter */ -#define VENDOR_ID 0xFEED +#define VENDOR_ID 0x4853 /* HS */ #define PRODUCT_ID 0x660C #define DEVICE_VER 0x0100 -#define MANUFACTURER QMK -#define PRODUCT Leopold FC660C with QMK +#define MANUFACTURER Hasu +#define PRODUCT FC660C #define DESCRIPTION Leopold FC660C with Hasu alternative controller using QMK /* key matrix size */ -#define MATRIX_ROWS 8 +#define MATRIX_ROWS 5 #define MATRIX_COLS 16 //#define DIODE_DIRECTION diff --git a/keyboards/fc660c/fc660c.h b/keyboards/fc660c/fc660c.h index 63c4029c0ddd..e3621570dd1a 100644 --- a/keyboards/fc660c/fc660c.h +++ b/keyboards/fc660c/fc660c.h @@ -36,13 +36,7 @@ along with this program. If not, see . { KC_NO, K31, 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, KC_NO, K4E, KC_NO }, \ - { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, \ - KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, \ - { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, \ - KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, \ - { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, \ - KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO } \ + K48, K49, K4A, K4B, KC_NO, KC_NO, K4E, KC_NO } \ } /* KEYMAP( diff --git a/keyboards/fc660c/keymaps/via/README.md b/keyboards/fc660c/keymaps/via/README.md new file mode 100644 index 000000000000..c1ce51b7f3ae --- /dev/null +++ b/keyboards/fc660c/keymaps/via/README.md @@ -0,0 +1,5 @@ +# The default keymap for the FC660C with Via enabled + +Emulates original keymap. + +![](https://i.imgur.com/fg89nez.jpg) \ No newline at end of file diff --git a/keyboards/fc660c/keymaps/via/keymap.c b/keyboards/fc660c/keymaps/via/keymap.c new file mode 100644 index 000000000000..6de89329e305 --- /dev/null +++ b/keyboards/fc660c/keymaps/via/keymap.c @@ -0,0 +1,46 @@ +/* +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public 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_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_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_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_HOME,KC_PGUP,_______,_______, _______, + _______,_______,_______,_______,_______,_______,_______,_______,KC_END, KC_PGDN,_______,_______, _______, + _______,_______,_______, _______, _______,_______,_______, _______,_______,_______ + ), + [2] = LAYOUT( + _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______, + _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______, + _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______, + _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______, + _______,_______,_______, _______, _______,_______,_______, _______,_______,_______ + ), + [3] = LAYOUT( + _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______, + _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______, + _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______, + _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______, + _______,_______,_______, _______, _______,_______,_______, _______,_______,_______ + ) +}; diff --git a/keyboards/fc660c/keymaps/via/rules.mk b/keyboards/fc660c/keymaps/via/rules.mk new file mode 100644 index 000000000000..43061db1dd46 --- /dev/null +++ b/keyboards/fc660c/keymaps/via/rules.mk @@ -0,0 +1,2 @@ +VIA_ENABLE = yes +LTO_ENABLE = yes \ No newline at end of file From 4f9e5d4cdef8ee0ab5a361407ccd8c55dcc186b7 Mon Sep 17 00:00:00 2001 From: morbetter <60626808+morbetter@users.noreply.github.com> Date: Mon, 29 Jun 2020 12:16:14 -0700 Subject: [PATCH 293/930] Adding VIA support for CannonKeys/Practice60 (#8169) * 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" * Adding VIA support to cannonkeys/practice60 Adding VIA support to cannonkeys/practice60 * updated VENDOR_ID to match other CannonKeys boards * changed PRODUCT_ID to be unique * added additional notes to readme.md * keymap.c and config.h for VIA support * Update readme.md * Update keyboards/cannonkeys/practice60/readme.md * Update keyboards/cannonkeys/practice60/readme.md * Update keyboards/cannonkeys/practice60/config.h * Update rules.mk * Update keyboards/cannonkeys/practice60/config.h * Update config.h * Rebased from Master Rebased from Master --- keyboards/cannonkeys/practice60/config.h | 6 ++-- .../practice60/keymaps/via/keymap.c | 35 +++++++++++++++++++ .../practice60/keymaps/via/rules.mk | 1 + keyboards/cannonkeys/practice60/readme.md | 7 ++++ 4 files changed, 46 insertions(+), 3 deletions(-) create mode 100644 keyboards/cannonkeys/practice60/keymaps/via/keymap.c create mode 100644 keyboards/cannonkeys/practice60/keymaps/via/rules.mk diff --git a/keyboards/cannonkeys/practice60/config.h b/keyboards/cannonkeys/practice60/config.h index d17b7f04dd05..1e8e5ec7c8c8 100644 --- a/keyboards/cannonkeys/practice60/config.h +++ b/keyboards/cannonkeys/practice60/config.h @@ -18,10 +18,10 @@ along with this program. If not, see . #pragma once /* USB Device descriptor parameter */ -#define VENDOR_ID 0xFEED -#define PRODUCT_ID 0x6464 +#define VENDOR_ID 0xCA04 +#define PRODUCT_ID 0x6060 #define DEVICE_VER 0x0001 -#define MANUFACTURER QMK +#define MANUFACTURER CannonKeys #define PRODUCT Practice 60 #define DESCRIPTION Practice 60 diff --git a/keyboards/cannonkeys/practice60/keymaps/via/keymap.c b/keyboards/cannonkeys/practice60/keymaps/via/keymap.c new file mode 100644 index 000000000000..1bafdbb88f83 --- /dev/null +++ b/keyboards/cannonkeys/practice60/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_DEC, BL_INC, 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/cannonkeys/practice60/keymaps/via/rules.mk b/keyboards/cannonkeys/practice60/keymaps/via/rules.mk new file mode 100644 index 000000000000..1e5b99807cb7 --- /dev/null +++ b/keyboards/cannonkeys/practice60/keymaps/via/rules.mk @@ -0,0 +1 @@ +VIA_ENABLE = yes diff --git a/keyboards/cannonkeys/practice60/readme.md b/keyboards/cannonkeys/practice60/readme.md index 044aadf6e98d..60ce0066f987 100644 --- a/keyboards/cannonkeys/practice60/readme.md +++ b/keyboards/cannonkeys/practice60/readme.md @@ -9,4 +9,11 @@ Make example for this keyboard (after setting up your build environment): make cannonkeys/practice60:default +Flashing example for this keyboard: + + make cannonkeys/practice60: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). + +Build guide available at: https://docs.cannonkeys.com/bluepill-build/ +Blue Pill flashing guide at: https://docs.cannonkeys.com/flashing/ From 09a53d1aa302a166cadbe7c75bc6f64a30e30fe3 Mon Sep 17 00:00:00 2001 From: toraifu Date: Mon, 29 Jun 2020 16:52:17 -0400 Subject: [PATCH 294/930] [Keyboard] Fallacy (#9499) * Add Fallacy * Accept suggestions * fixed build error, renamed readme, added keymap specific config to force enable NKRO * remove FORCE_NKRO on VIA keymap, fix header * fix info.json to accurately reflect keymap * remove additional empty layers from default_split_bs keymap * Accept keymap formatting suggestions * remove empty config files at keymap level --- keyboards/fallacy/config.h | 69 ++++++++ keyboards/fallacy/fallacy.c | 40 +++++ keyboards/fallacy/fallacy.h | 54 +++++++ keyboards/fallacy/indicators.c | 61 ++++++++ keyboards/fallacy/indicators.h | 23 +++ keyboards/fallacy/info.json | 147 ++++++++++++++++++ keyboards/fallacy/keymaps/default/keymap.c | 34 ++++ .../fallacy/keymaps/default_split_bs/keymap.c | 33 ++++ keyboards/fallacy/keymaps/via/keymap.c | 47 ++++++ keyboards/fallacy/keymaps/via/rules.mk | 1 + keyboards/fallacy/readme.md | 21 +++ keyboards/fallacy/rules.mk | 29 ++++ 12 files changed, 559 insertions(+) create mode 100755 keyboards/fallacy/config.h create mode 100755 keyboards/fallacy/fallacy.c create mode 100755 keyboards/fallacy/fallacy.h create mode 100755 keyboards/fallacy/indicators.c create mode 100755 keyboards/fallacy/indicators.h create mode 100644 keyboards/fallacy/info.json create mode 100755 keyboards/fallacy/keymaps/default/keymap.c create mode 100755 keyboards/fallacy/keymaps/default_split_bs/keymap.c create mode 100755 keyboards/fallacy/keymaps/via/keymap.c create mode 100644 keyboards/fallacy/keymaps/via/rules.mk create mode 100644 keyboards/fallacy/readme.md create mode 100755 keyboards/fallacy/rules.mk diff --git a/keyboards/fallacy/config.h b/keyboards/fallacy/config.h new file mode 100755 index 000000000000..6904b419eae2 --- /dev/null +++ b/keyboards/fallacy/config.h @@ -0,0 +1,69 @@ +/* Copyright 2020 B. Fletcher (toraifu) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License 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 0xBF00 +#define PRODUCT_ID 0xBFFA +#define DEVICE_VER 0x0001 +#define MANUFACTURER SheuBox +#define PRODUCT Fallacy +#define DESCRIPTION Aluminum Alice Clone + +/* key matrix size + */ +#define MATRIX_ROWS 5 +#define MATRIX_COLS 15 + +/* key matrix pins + */ +#define MATRIX_ROW_PINS { B1, B2, B3, C6, C7 } +#define MATRIX_COL_PINS { E6, F0, F1, F4, F5, F6, F7, B6, B5, B4, D7, D6, D4, D5, D3 } +#define UNUSED_PINS { B0, B7 } + +/* COL2ROW or ROW2COL + */ +#define DIODE_DIRECTION COL2ROW + +/* IS31FL3731 driver address (for status LEDs) + * Using the default defines here, but using a custom implementation + */ +#define LED_DRIVER_ADDR_1 0b1110100 +#define LED_DRIVER_COUNT 1 +#define LED_DRIVER_LED_COUNT 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 + +/* prevent stuck modifiers + */ +#define PREVENT_STUCK_MODIFIERS + +#define RGB_DI_PIN D2 +#define RGBLIGHT_ANIMATIONS +#define RGBLED_NUM 14 diff --git a/keyboards/fallacy/fallacy.c b/keyboards/fallacy/fallacy.c new file mode 100755 index 000000000000..103860f0f819 --- /dev/null +++ b/keyboards/fallacy/fallacy.c @@ -0,0 +1,40 @@ +/* Copyright 2020 B. Fletcher (toraifu) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#include "fallacy.h" +#include "indicators.h" + +void matrix_init_kb(void) { + init_fallacy_leds(); + matrix_init_user(); +} + +void matrix_scan_kb(void) { + update_fallacy_leds(); + matrix_scan_user(); +} + +/* update LED driver with usb led_state + */ +bool led_update_kb(led_t led_state) { + bool res = led_update_user(led_state); + if(res) { + set_fallacy_led(2, led_state.caps_lock); /* caps */ + set_fallacy_led(1, led_state.num_lock); /* num lock */ + set_fallacy_led(0, led_state.scroll_lock); /* scroll lock */ + } + return res; +} diff --git a/keyboards/fallacy/fallacy.h b/keyboards/fallacy/fallacy.h new file mode 100755 index 000000000000..46480e668820 --- /dev/null +++ b/keyboards/fallacy/fallacy.h @@ -0,0 +1,54 @@ +/* Copyright 2020 B. Fletcher (toraifu) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License 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" + +/* All keys in matrix active: + * - Split Backspace + * - Split Right Shift + */ +#define LAYOUT_all( \ + K100, K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, \ + K200, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, \ + K300, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K214, \ + K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, K314, \ + K401, K403, K405, K406, K408, K410, K414 \ +) { \ + { 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, K314 }, \ + { KC_NO, K401, KC_NO, K403, KC_NO, K405, K406, KC_NO, K408, KC_NO, K410, KC_NO, KC_NO, KC_NO, K414 } \ +} + +/* Disable position 013 and 314 for: + * - Full size Backspace + * - Full size Right Shift + */ +#define LAYOUT_default( \ + K100, K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K014, \ + K200, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, \ + K300, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K214, \ + K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, K314, \ + K401, K403, K405, K406, K408, K410, K414 \ +) { \ + { K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, KC_NO, 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, K314 }, \ + { KC_NO, K401, KC_NO, K403, KC_NO, K405, K406, KC_NO, K408, KC_NO, K410, KC_NO, KC_NO, KC_NO, K414 } \ +} diff --git a/keyboards/fallacy/indicators.c b/keyboards/fallacy/indicators.c new file mode 100755 index 000000000000..deda752faab0 --- /dev/null +++ b/keyboards/fallacy/indicators.c @@ -0,0 +1,61 @@ +/* Copyright 2020 B. Fletcher (toraifu) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#include "indicators.h" +#include "drivers/issi/is31fl3731-simple.h" +#include "i2c_master.h" + +/* Set up IS31FL3731 for use in powering indicator LEDs. Absolutely overkill for this job but it was already in the design. + * init IS31FL3731 and i2c + */ +void init_fallacy_leds(void) { + i2c_init(); + IS31FL3731_init(LED_DRIVER_ADDR_1); + + for (int i = 0; i < LED_DRIVER_LED_COUNT; i++) { + IS31FL3731_set_led_control_register(i, true); + } + + IS31FL3731_update_led_control_registers(LED_DRIVER_ADDR_1, 0); +} + + +/* update the buffer + */ +void update_fallacy_leds(void) { + IS31FL3731_update_pwm_buffers(LED_DRIVER_ADDR_1, 0); +} + + +/* wrapper to actually set the LED PWM + */ +void set_fallacy_led(int index, bool state) { + if (state) { + IS31FL3731_set_value(index, 128); + } + else { + IS31FL3731_set_value(index, 0); + } +} + + +/* define LED matrix + */ +const is31_led g_is31_leds[LED_DRIVER_LED_COUNT] = { + {0, C1_1}, + {0, C2_1}, + {0, C3_1}, +}; diff --git a/keyboards/fallacy/indicators.h b/keyboards/fallacy/indicators.h new file mode 100755 index 000000000000..6de374cda8ed --- /dev/null +++ b/keyboards/fallacy/indicators.h @@ -0,0 +1,23 @@ +/* Copyright 2020 B. Fletcher (toraifu) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License 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" + + +void init_fallacy_leds(void); +void update_fallacy_leds(void); +void set_fallacy_led(int index, bool state); diff --git a/keyboards/fallacy/info.json b/keyboards/fallacy/info.json new file mode 100644 index 000000000000..fe30e1bfe269 --- /dev/null +++ b/keyboards/fallacy/info.json @@ -0,0 +1,147 @@ +{ + "keyboard_name": "Fallacy", + "maintainer": "Toraifu", + "width": 18.75, + "height": 5, + "layouts": { + "LAYOUT_all": { + "layout": [ + {"label":"Esc", "x":0.5, "y":0}, + {"label":"~", "x":1.75, "y":0}, + {"label":"!", "x":2.75, "y":0}, + {"label":"@", "x":3.75, "y":0}, + {"label":"#", "x":4.75, "y":0}, + {"label":"$", "x":5.75, "y":0}, + {"label":"%", "x":6.75, "y":0}, + {"label":"^", "x":7.75, "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":"+", "x":15, "y":0}, + {"label":"|", "x":16, "y":0}, + {"label":"~", "x":17, "y":0}, + {"label":"PgUp", "x":0.25, "y":1}, + {"label":"Tab", "x":1.5, "y":1, "w":1.5}, + {"label":"Q", "x":3, "y":1}, + {"label":"W", "x":4, "y":1}, + {"label":"E", "x":5, "y":1}, + {"label":"R", "x":6, "y":1}, + {"label":"T", "x":7, "y":1}, + {"label":"Y", "x":9.75, "y":1}, + {"label":"U", "x":10.75, "y":1}, + {"label":"I", "x":11.75, "y":1}, + {"label":"O", "x":12.75, "y":1}, + {"label":"P", "x":13.75, "y":1}, + {"label":"{", "x":14.75, "y":1}, + {"label":"}", "x":15.75, "y":1}, + {"label":"Backspace", "x":16.75, "y":1, "w":1.5}, + {"label":"PgDn", "x":0, "y":2}, + {"label":"Control", "x":1.25, "y":2, "w":1.75}, + {"label":"A", "x":3, "y":2}, + {"label":"S", "x":4, "y":2}, + {"label":"D", "x":5, "y":2}, + {"label":"F", "x":6, "y":2}, + {"label":"G", "x":7, "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":"Enter", "x":16.25, "y":2, "w":2.25}, + {"label":"Shift", "x":1, "y":3, "w":2.25}, + {"label":"Z", "x":3.25, "y":3}, + {"label":"X", "x":4.25, "y":3}, + {"label":"C", "x":5.25, "y":3}, + {"label":"V", "x":6.25, "y":3}, + {"label":"B", "x":7.25, "y":3}, + {"label":"B", "x":10, "y":3}, + {"label":"N", "x":11, "y":3}, + {"label":"M", "x":12, "y":3}, + {"label":"<", "x":13, "y":3}, + {"label":">", "x":14, "y":3}, + {"label":"?", "x":15, "y":3}, + {"label":"Shift", "x":16, "y":3, "w":1.75}, + {"label":"Fn1", "x":17.75, "y":3}, + {"label":"Ctrl", "x":1, "y":4, "w":1.5}, + {"label":"Alt", "x":4, "y":4, "w":1.5}, + {"label":"LSpace", "x":5.5, "y":4, "w":2.25}, + {"label":"Fn2", "x":7.75, "y":4}, + {"label":"RSpace", "x":10, "y":4, "w":2.75}, + {"label":"RAlt", "x":12.75, "y":4, "w":1.5}, + {"label":"RCtl", "x":17, "y":4, "w":1.5} + ] + }, + "LAYOUT_default": { + "layout": [ + {"label":"Esc", "x":0.5, "y":0}, + {"label":"~", "x":1.75, "y":0}, + {"label":"!", "x":2.75, "y":0}, + {"label":"@", "x":3.75, "y":0}, + {"label":"#", "x":4.75, "y":0}, + {"label":"$", "x":5.75, "y":0}, + {"label":"%", "x":6.75, "y":0}, + {"label":"^", "x":7.75, "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":"+", "x":15, "y":0}, + {"label":"Backspace", "x":16, "y":0, "w":2}, + {"label":"PgUp", "x":0.25, "y":1}, + {"label":"Tab", "x":1.5, "y":1, "w":1.5}, + {"label":"Q", "x":3, "y":1}, + {"label":"W", "x":4, "y":1}, + {"label":"E", "x":5, "y":1}, + {"label":"R", "x":6, "y":1}, + {"label":"T", "x":7, "y":1}, + {"label":"Y", "x":9.75, "y":1}, + {"label":"U", "x":10.75, "y":1}, + {"label":"I", "x":11.75, "y":1}, + {"label":"O", "x":12.75, "y":1}, + {"label":"P", "x":13.75, "y":1}, + {"label":"{", "x":14.75, "y":1}, + {"label":"}", "x":15.75, "y":1}, + {"label":"Backspace", "x":16.75, "y":1, "w":1.5}, + {"label":"PgDn", "x":0, "y":2}, + {"label":"Control", "x":1.25, "y":2, "w":1.75}, + {"label":"A", "x":3, "y":2}, + {"label":"S", "x":4, "y":2}, + {"label":"D", "x":5, "y":2}, + {"label":"F", "x":6, "y":2}, + {"label":"G", "x":7, "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":"Enter", "x":16.25, "y":2, "w":2.25}, + {"label":"Shift", "x":1, "y":3, "w":2.25}, + {"label":"Z", "x":3.25, "y":3}, + {"label":"X", "x":4.25, "y":3}, + {"label":"C", "x":5.25, "y":3}, + {"label":"V", "x":6.25, "y":3}, + {"label":"B", "x":7.25, "y":3}, + {"label":"B", "x":10, "y":3}, + {"label":"N", "x":11, "y":3}, + {"label":"M", "x":12, "y":3}, + {"label":"<", "x":13, "y":3}, + {"label":">", "x":14, "y":3}, + {"label":"?", "x":15, "y":3}, + {"label":"Shift", "x":16, "y":3, "w":1.75}, + {"label":"Fn1", "x":17.75, "y":3}, + {"label":"Ctrl", "x":1, "y":4, "w":1.5}, + {"label":"Alt", "x":4, "y":4, "w":1.5}, + {"label":"LSpace", "x":5.5, "y":4, "w":2.25}, + {"label":"Fn2", "x":7.75, "y":4}, + {"label":"RSpace", "x":10, "y":4, "w":2.75}, + {"label":"RAlt", "x":12.75, "y":4, "w":1.5}, + {"label":"RCtl", "x":17, "y":4, "w":1.5} + ] + } + } +} diff --git a/keyboards/fallacy/keymaps/default/keymap.c b/keyboards/fallacy/keymaps/default/keymap.c new file mode 100755 index 000000000000..d0e32c42c9cb --- /dev/null +++ b/keyboards/fallacy/keymaps/default/keymap.c @@ -0,0 +1,34 @@ +/* Copyright 2020 B. Fletcher (toraifu) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public 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_default( + 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_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_RGUI, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, MO(1), + KC_LCTL, KC_LALT, KC_SPC, KC_LGUI, KC_SPC, KC_RALT, KC_RCTL), + + [1] = LAYOUT_default( + KC_TRNS, RESET, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, 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), + +}; diff --git a/keyboards/fallacy/keymaps/default_split_bs/keymap.c b/keyboards/fallacy/keymaps/default_split_bs/keymap.c new file mode 100755 index 000000000000..957e876c4bb6 --- /dev/null +++ b/keyboards/fallacy/keymaps/default_split_bs/keymap.c @@ -0,0 +1,33 @@ +/* Copyright 2020 B. Fletcher (toraifu) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public 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_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_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_RGUI, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, MO(1), + KC_LCTL, KC_LALT, KC_SPC, KC_LGUI, KC_SPC, KC_RALT, KC_RCTL), + + [1] = LAYOUT_all( + KC_TRNS, 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_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 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/fallacy/keymaps/via/keymap.c b/keyboards/fallacy/keymaps/via/keymap.c new file mode 100755 index 000000000000..d6a7b0744d96 --- /dev/null +++ b/keyboards/fallacy/keymaps/via/keymap.c @@ -0,0 +1,47 @@ +/* Copyright 2020 B. Fletcher (toraifu) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public 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_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_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_RGUI, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, MO(1), + KC_LCTL, KC_LALT, KC_SPC, KC_LGUI, KC_SPC, KC_RALT, KC_RCTL), + + [1] = LAYOUT_all( + KC_TRNS, 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_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 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/fallacy/keymaps/via/rules.mk b/keyboards/fallacy/keymaps/via/rules.mk new file mode 100644 index 000000000000..1e5b99807cb7 --- /dev/null +++ b/keyboards/fallacy/keymaps/via/rules.mk @@ -0,0 +1 @@ +VIA_ENABLE = yes diff --git a/keyboards/fallacy/readme.md b/keyboards/fallacy/readme.md new file mode 100644 index 000000000000..e4a74de5279a --- /dev/null +++ b/keyboards/fallacy/readme.md @@ -0,0 +1,21 @@ +# Fallacy +![fallacy](https://raw.githubusercontent.com/toraifu/fallacy/master/014A1296-2.jpg) + + A PCB designed for the Fallacy custom keyboard, but fully compatible with the Alice and its clones. + +* Keyboard Maintainer: [toraifu](https://github.com/toraifu) +* Hardware: [geekhack](https://geekhack.org/index.php?topic=103728.0) +* Other general info: [fallacy](https://github.com/toraifu/fallacy) + +### Features: +* VIA support +* As minimal as possible design (no in-switch LEDs) +* Support for the use of fourteen WS2812B RGB-LEDs for keyboards for which underglow is desired. +* Misc features such as ESD protection, indicator LEDs, etc. + + +Make example for this keyboard (after setting up your build environment): + + make fallacy: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/fallacy/rules.mk b/keyboards/fallacy/rules.mk new file mode 100755 index 000000000000..1ab94f774eb2 --- /dev/null +++ b/keyboards/fallacy/rules.mk @@ -0,0 +1,29 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +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 = yes # Commands for debug and configuration +# 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 +FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches + +# project specific files +SRC += indicators.c \ + drivers/issi/is31fl3731-simple.c +QUANTUM_LIB_SRC += i2c_master.c From 67beec5e94eefade8d22be10a5308373ddb54118 Mon Sep 17 00:00:00 2001 From: kwlodarczy <64139515+kwlodarczy@users.noreply.github.com> Date: Mon, 29 Jun 2020 23:00:36 +0100 Subject: [PATCH 295/930] [Keyboard] Rotr (#9546) * Add files via upload * Add files via upload Edited code to fix the formatting so that it follows the conventions. * Create README.md * Update config.h * Update keyboards/rotr/config.h * Update keyboards/rotr/config.h * Update keyboards/rotr/config.h * Update keyboards/rotr/kb.h * Update keyboards/rotr/keymaps/default/keymap.c * Update keyboards/rotr/keymaps/default/keymap.c * Update keyboards/rotr/rules.mk * Update keyboards/rotr/keymaps/default/keymap.c * Update keyboards/rotr/kb.c * Delete Makefile * Rename kb.c to rotr.c * Rename kb.h to rotr.h * Update rules.mk * Rename README.md to readme.md * Create info.json * Update keyboards/rotr/keymaps/default/keymap.c * Update keyboards/rotr/readme.md * Update keyboards/rotr/readme.md * Update keyboards/rotr/readme.md * Update keymap.c * Update rotr.c * Update info.json * Update keyboards/rotr/readme.md --- keyboards/rotr/config.h | 46 +++++++++++++++++++++++++ keyboards/rotr/info.json | 12 +++++++ keyboards/rotr/keymaps/default/keymap.c | 7 ++++ keyboards/rotr/readme.md | 20 +++++++++++ keyboards/rotr/rotr.c | 9 +++++ keyboards/rotr/rotr.h | 9 +++++ keyboards/rotr/rules.mk | 32 +++++++++++++++++ 7 files changed, 135 insertions(+) create mode 100644 keyboards/rotr/config.h create mode 100644 keyboards/rotr/info.json create mode 100644 keyboards/rotr/keymaps/default/keymap.c create mode 100644 keyboards/rotr/readme.md create mode 100644 keyboards/rotr/rotr.c create mode 100644 keyboards/rotr/rotr.h create mode 100644 keyboards/rotr/rules.mk diff --git a/keyboards/rotr/config.h b/keyboards/rotr/config.h new file mode 100644 index 000000000000..e488a4406cec --- /dev/null +++ b/keyboards/rotr/config.h @@ -0,0 +1,46 @@ +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0x726F +#define PRODUCT_ID 0x0001 +#define DEVICE_VER 0x0001 +#define MANUFACTURER ROTR +#define PRODUCT ROTR +#define DESCRIPTION Macro Pad and Big Knob + +/* key matrix size */ +#define MATRIX_ROWS 1 +#define MATRIX_COLS 3 + +/* key matrix pins */ +#define MATRIX_ROW_PINS { E6 } +#define MATRIX_COL_PINS { D1, D0, D4 } + +/*Rotary Encoder Pins*/ +#define ENCODERS_PAD_A { C6 } +#define ENCODERS_PAD_B { D7 } + +/*Sets the number of pulses per increment*/ +#define ENCODER_RESOLUTION 2 + +#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 diff --git a/keyboards/rotr/info.json b/keyboards/rotr/info.json new file mode 100644 index 000000000000..b95e8cedeece --- /dev/null +++ b/keyboards/rotr/info.json @@ -0,0 +1,12 @@ +{ + "keyboard_name": "rotr", + "url": "https://geekhack.org/index.php?topic=107104.0", + "maintainer": "qmk", + "width": 3, + "height": 1, + "layouts": { + "LAYOUT": { + "layout": [{"x":0, "y":0}, {"x":1, "y":0}, {"x":2, "y":0}] + } + } +} diff --git a/keyboards/rotr/keymaps/default/keymap.c b/keyboards/rotr/keymaps/default/keymap.c new file mode 100644 index 000000000000..cceb126461c6 --- /dev/null +++ b/keyboards/rotr/keymaps/default/keymap.c @@ -0,0 +1,7 @@ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + LAYOUT( + KC_MPRV, KC_MPLY, KC_MNXT + ) +}; diff --git a/keyboards/rotr/readme.md b/keyboards/rotr/readme.md new file mode 100644 index 000000000000..a3e943fd3d6c --- /dev/null +++ b/keyboards/rotr/readme.md @@ -0,0 +1,20 @@ +# ROTR + +![ROTR](https://i.imgur.com/051liRCl.jpg) + +A macro pad with a multipurpose knob. + +* Keyboard Maintainer: [kwlodarczyk](https://github.com/kwlodarczy) +* Hardware: [Geekhack](https://geekhack.org/index.php?topic=107104.0) + +## Features: +* Minimal design with plug and play functionality. +* Frictionless, solid brass knob. +* Hot swappable switches. +* USB C connection. + +Make example for this keyboard (after setting up your build environment): + + make rotr: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/rotr/rotr.c b/keyboards/rotr/rotr.c new file mode 100644 index 000000000000..2097bd9c14cc --- /dev/null +++ b/keyboards/rotr/rotr.c @@ -0,0 +1,9 @@ +#include "rotr.h" + +void encoder_update_kb(uint8_t index, bool clockwise) { + if (clockwise) { + tap_code(KC_VOLU); + } else { + tap_code(KC_VOLD); + } +} diff --git a/keyboards/rotr/rotr.h b/keyboards/rotr/rotr.h new file mode 100644 index 000000000000..bf2ff12929e1 --- /dev/null +++ b/keyboards/rotr/rotr.h @@ -0,0 +1,9 @@ +#pragma once + +#include "quantum.h" + +#define LAYOUT( \ + K00, K01, K02 \ +) { \ + { K00, K01, K02 } \ +} diff --git a/keyboards/rotr/rules.mk b/keyboards/rotr/rules.mk new file mode 100644 index 000000000000..18d378ed7c68 --- /dev/null +++ b/keyboards/rotr/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 = 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 +MIDI_ENABLE = no # MIDI support +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +AUDIO_ENABLE = no # Audio output +FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches +ENCODER_ENABLE = yes # Enables Rotary Encoder support From 6d6340a82b3ed61f5dd2a40dac78712d7bd736fd Mon Sep 17 00:00:00 2001 From: Herpiko Dwi Aguno Date: Tue, 30 Jun 2020 06:32:59 +0700 Subject: [PATCH 296/930] [Keyboard] Add UNK keyboard. (#9571) * Add UNK keyboard. * Update keyboards/handwired/unk/info.json * Use KC_NO to block out nonexistent matrix positions. * Update keyboards/handwired/unk/readme.md * Update keyboards/handwired/unk/keymaps/default/keymap.c --- keyboards/handwired/unk/info.json | 92 +++++++++++++++++++ .../handwired/unk/keymaps/default/config.h | 25 +++++ .../handwired/unk/keymaps/default/keymap.c | 83 +++++++++++++++++ keyboards/handwired/unk/readme.md | 15 +++ keyboards/handwired/unk/rev1/config.h | 91 ++++++++++++++++++ keyboards/handwired/unk/rev1/rev1.c | 1 + keyboards/handwired/unk/rev1/rev1.h | 30 ++++++ keyboards/handwired/unk/rev1/rules.mk | 0 keyboards/handwired/unk/rules.mk | 35 +++++++ keyboards/handwired/unk/unk.c | 1 + keyboards/handwired/unk/unk.h | 4 + 11 files changed, 377 insertions(+) create mode 100644 keyboards/handwired/unk/info.json create mode 100644 keyboards/handwired/unk/keymaps/default/config.h create mode 100644 keyboards/handwired/unk/keymaps/default/keymap.c create mode 100644 keyboards/handwired/unk/readme.md create mode 100644 keyboards/handwired/unk/rev1/config.h create mode 100644 keyboards/handwired/unk/rev1/rev1.c create mode 100644 keyboards/handwired/unk/rev1/rev1.h create mode 100644 keyboards/handwired/unk/rev1/rules.mk create mode 100644 keyboards/handwired/unk/rules.mk create mode 100644 keyboards/handwired/unk/unk.c create mode 100644 keyboards/handwired/unk/unk.h diff --git a/keyboards/handwired/unk/info.json b/keyboards/handwired/unk/info.json new file mode 100644 index 000000000000..4e2f7e13ff63 --- /dev/null +++ b/keyboards/handwired/unk/info.json @@ -0,0 +1,92 @@ +{ + "keyboard_name": "UNK", + "url": "https://github.com/herpiko/unk", + "maintainer": "herpiko", + "width": 17, + "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": 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, "w": 2}, + + {"x": 0, "y": 1}, + {"x": 1, "y": 1, "w": 1.5}, + {"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": 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}, + {"x": 14.5, "y": 1}, + {"x": 15.5, "y": 1, "w": 1.5}, + + {"x": 0, "y": 2}, + {"x": 1, "y": 2, "w": 1.75}, + {"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": 8.75, "y": 2}, + {"x": 9.75, "y": 2}, + {"x": 10.75, "y": 2}, + {"x": 11.75, "y": 2}, + {"x": 12.75, "y": 2}, + {"x": 13.75, "y": 2}, + {"x": 14.75, "y": 2, "w": 2.25}, + + {"x": 0, "y": 3}, + {"x": 1, "y": 3, "w": 2.25}, + {"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": 9.25, "y": 3}, + {"x": 10.25, "y": 3}, + {"x": 11.25, "y": 3}, + {"x": 12.25, "y": 3}, + {"x": 13.25, "y": 3}, + {"x": 14.25, "y": 3, "w": 1.75}, + + {"x": 16, "y": 3}, + {"x": 0, "y": 4}, + {"x": 1, "y": 4, "w": 1.25}, + {"x": 2.25, "y": 4, "w": 1.25}, + {"x": 3.5, "y": 4, "w": 1.25}, + {"x": 4.75, "y": 4}, + {"x": 5.75, "y": 4, "w": 2.25}, + + {"x": 9, "y": 4, "w": 2.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}, + {"x": 15, "y": 4}, + {"x": 16, "y": 4} + ] + } + } +} diff --git a/keyboards/handwired/unk/keymaps/default/config.h b/keyboards/handwired/unk/keymaps/default/config.h new file mode 100644 index 000000000000..3d2b4c7be75d --- /dev/null +++ b/keyboards/handwired/unk/keymaps/default/config.h @@ -0,0 +1,25 @@ +/* +Copyright 2020 Herpiko Dwi Aguno + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License 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 diff --git a/keyboards/handwired/unk/keymaps/default/keymap.c b/keyboards/handwired/unk/keymaps/default/keymap.c new file mode 100644 index 000000000000..a38b1f92d8d3 --- /dev/null +++ b/keyboards/handwired/unk/keymaps/default/keymap.c @@ -0,0 +1,83 @@ +#include QMK_KEYBOARD_H + +enum layer_names { + _QWERTY = 0, + _COLEMAK, + _LOWER, + _RAISE, + _ADJUST, +}; + +enum custom_keycodes { + QWERTY = SAFE_RANGE, + COLEMAK, +}; + +#define LOWER MO(_LOWER) +#define RAISE MO(_RAISE) + +// 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. + +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_EQL, KC_BSPACE, + 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, 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_PSCREEN, 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_PGUP, + LOWER, KC_LCTL, KC_LALT, KC_LGUI, RAISE, KC_SPACE, KC_SPACE, RAISE, KC_RALT, KC_RCTL, KC_DELETE, KC_PGDOWN + ), + [_COLEMAK] = 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_BSPACE, + KC_HOME, 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_BSLASH, + KC_END, KC_BSPACE, 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_PSCREEN, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_LSFT, KC_PGUP, + LOWER, KC_LCTL, KC_LALT, KC_LGUI, RAISE, KC_SPACE, KC_SPACE, RAISE, KC_RALT, KC_RCTL, KC_DELETE, KC_PGDOWN + ), + + [_LOWER] = LAYOUT( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + QWERTY, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + COLEMAK, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + + [_RAISE] = LAYOUT( + _______, _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F9, KC_F10, KC_F11, KC_F12, + _______, _______, _______, KC_UP, _______, _______, _______, _______, _______, KC_UP, _______, _______, _______, _______, _______, + _______, _______, KC_LEFT, KC_DOWN, KC_RIGHT, _______, _______, _______, KC_LEFT, KC_DOWN, KC_RIGHT, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + + [_ADJUST] = LAYOUT( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ) +}; + +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; + } + return true; +} diff --git a/keyboards/handwired/unk/readme.md b/keyboards/handwired/unk/readme.md new file mode 100644 index 000000000000..c4fbf6f22e26 --- /dev/null +++ b/keyboards/handwired/unk/readme.md @@ -0,0 +1,15 @@ +# UNK + +A split 65% handwired keyboard made by herpiko. + +* Keyboard Maintainer: [herpiko](https://github.com/herpiko) +* Hardware Supported: Pro Micro +* Hardware Availability: https://github.com/herpiko/unk + +Make example for this keyboard (after setting up your build environment): + + make handwired/unk/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). + +Build logs and files are available here: [UNK](https://github.com/herpiko/unk) diff --git a/keyboards/handwired/unk/rev1/config.h b/keyboards/handwired/unk/rev1/config.h new file mode 100644 index 000000000000..55b03d9525fa --- /dev/null +++ b/keyboards/handwired/unk/rev1/config.h @@ -0,0 +1,91 @@ +/* +Copyright 2020 Herpiko Dwi Aguno + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License 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 0x3060 +#define DEVICE_VER 0x0001 +#define MANUFACTURER herpiko +#define PRODUCT UNK +#define DESCRIPTION 70% split keyboard + +/* key matrix size */ +// Rows are doubled-up +#define MATRIX_ROWS 10 +#define MATRIX_COLS 8 + + + +#define MASTER_LEFT // Comment this line for the right half firmware + +// wiring of each half +#define MATRIX_ROW_PINS { F5, B1, F6, B3, F7 } +#define MATRIX_COL_PINS { B2, B6, D4, C6, D7, E6, B4, B5 } +#define MATRIX_ROW_PINS_RIGHT { C6, D7, B4, E6, D4 } +#define MATRIX_COL_PINS_RIGHT { B1, B3, B2, B6, F7, B5, F6, F5 } + + +/* 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 USE_SERIAL +#define SOFT_SERIAL_PIN D0 + +/* 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 + +#define RGBLED_NUM 12 // Number of LEDs + +/* + * 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/handwired/unk/rev1/rev1.c b/keyboards/handwired/unk/rev1/rev1.c new file mode 100644 index 000000000000..520a869e57ba --- /dev/null +++ b/keyboards/handwired/unk/rev1/rev1.c @@ -0,0 +1 @@ +#include "rev1.h" diff --git a/keyboards/handwired/unk/rev1/rev1.h b/keyboards/handwired/unk/rev1/rev1.h new file mode 100644 index 000000000000..3d20e3e9fcf1 --- /dev/null +++ b/keyboards/handwired/unk/rev1/rev1.h @@ -0,0 +1,30 @@ +#pragma once + +#include "unk.h" + +#include "quantum.h" + +#define LAYOUT( \ + K00, K01, K02, K03, K04, K05, K06, K07, K71, K72, K73, K74, K75, K76, K77, \ + K10, K11, K12, K13, K14, K15, K16, K80, K81, K82, K83, K84, K85, K86, K87, \ + K20, K21, K22, K23, K24, K25, K26, K91, K92, K93, K94, K95, K96, K97, \ + K30, K31, K32, K33, K34, K35, K36, K101, K102, K103, K104, K105, K106, K107, \ + K40, K41, K42, K43, K44, K45, K112, K113, K114, K115, K116, K117 \ + ) \ + { \ + { K00, K01, K02, K03, K04, K05, K06, K07}, \ + { K10, K11, K12, K13, K14, K15, K16, KC_NO}, \ + { K20, K21, K22, K23, K24, K25, K26, KC_NO}, \ + { K30, K31, K32, K33, K34, K35, K36, KC_NO}, \ + { K40, K41, K42, K43, K44, K45, KC_NO, KC_NO}, \ +\ + { KC_NO, K71, K72, K73, K74, K75, K76, K77}, \ + { K80, K81, K82, K83, K84, K85, K86, K87}, \ + { KC_NO, K91, K92, K93, K94, K95, K96, K97}, \ + { KC_NO, K101, K102, K103, K104, K105, K106, K107}, \ + { KC_NO, KC_NO, K112, K113, K114, K115, K116, K117} \ + } + +/* +*/ + diff --git a/keyboards/handwired/unk/rev1/rules.mk b/keyboards/handwired/unk/rev1/rules.mk new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/keyboards/handwired/unk/rules.mk b/keyboards/handwired/unk/rules.mk new file mode 100644 index 000000000000..667308705f2c --- /dev/null +++ b/keyboards/handwired/unk/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 = 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 +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 +FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches + +SPLIT_KEYBOARD = yes + +DEFAULT_FOLDER = handwired/unk/rev1 diff --git a/keyboards/handwired/unk/unk.c b/keyboards/handwired/unk/unk.c new file mode 100644 index 000000000000..5764d560b6f0 --- /dev/null +++ b/keyboards/handwired/unk/unk.c @@ -0,0 +1 @@ +#include "unk.h" diff --git a/keyboards/handwired/unk/unk.h b/keyboards/handwired/unk/unk.h new file mode 100644 index 000000000000..baad77573c86 --- /dev/null +++ b/keyboards/handwired/unk/unk.h @@ -0,0 +1,4 @@ +#pragma once + +#include "quantum.h" +#include "rev1.h" From 12b43f55d64695e3cf1e9284af97a7c2fb9b77a8 Mon Sep 17 00:00:00 2001 From: Alabahuy Date: Tue, 30 Jun 2020 08:39:07 +0700 Subject: [PATCH 297/930] [Keyboard] rart67 (#9543) * Create config.h * Create info.json * Create rart67.c * Create rart67.h * Create readme.md * Create rules.mk * Create keymap.c * Update readme.md * Update info.json * Update info.json * Update config.h --- keyboards/rart/rart67/config.h | 62 +++++++++++++ keyboards/rart/rart67/info.json | 86 +++++++++++++++++++ .../rart/rart67/keymaps/default/keymap.c | 36 ++++++++ keyboards/rart/rart67/rart67.c | 17 ++++ keyboards/rart/rart67/rart67.h | 28 ++++++ keyboards/rart/rart67/readme.md | 14 +++ keyboards/rart/rart67/rules.mk | 32 +++++++ 7 files changed, 275 insertions(+) create mode 100644 keyboards/rart/rart67/config.h create mode 100644 keyboards/rart/rart67/info.json create mode 100644 keyboards/rart/rart67/keymaps/default/keymap.c create mode 100644 keyboards/rart/rart67/rart67.c create mode 100644 keyboards/rart/rart67/rart67.h create mode 100644 keyboards/rart/rart67/readme.md create mode 100644 keyboards/rart/rart67/rules.mk diff --git a/keyboards/rart/rart67/config.h b/keyboards/rart/rart67/config.h new file mode 100644 index 000000000000..63227a72af08 --- /dev/null +++ b/keyboards/rart/rart67/config.h @@ -0,0 +1,62 @@ +/* +Copyright 2020 Alabahuy + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License 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 0x414C // "AL" +#define PRODUCT_ID 0x0067 // "67" +#define DEVICE_VER 0x0001 +#define MANUFACTURER Alabahuy +#define PRODUCT RART67 +#define DESCRIPTION 65% Mechanical Keyboard + +/* key matrix size */ +#define MATRIX_ROWS 5 +#define MATRIX_COLS 16 + +#define MATRIX_ROW_PINS { D0, D1, D2, D3, B0 } +#define MATRIX_COL_PINS { B3, B2, B1, D5, D4, D6, D7, B4, B5, F0, F7, F6, F5, F4, F1, E6 } +#define UNUSED_PINS + +/* COL2ROW or ROW2COL */ +#define DIODE_DIRECTION COL2ROW + +/* number of backlight levels */ +#define BACKLIGHT_LEVELS 0 + +/* 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 B7 +#ifdef RGB_DI_PIN +#define RGBLIGHT_ANIMATIONS +#define RGBLED_NUM 11 +#define RGBLIGHT_HUE_STEP 8 +#define RGBLIGHT_SAT_STEP 8 +#define RGBLIGHT_VAL_STEP 8 +#define RGBLIGHT_LIMIT_VAL 240 +#define RGBLIGHT_SLEEP +#endif diff --git a/keyboards/rart/rart67/info.json b/keyboards/rart/rart67/info.json new file mode 100644 index 000000000000..8cd9046511ba --- /dev/null +++ b/keyboards/rart/rart67/info.json @@ -0,0 +1,86 @@ +{ + "keyboard_name": "RART67", + "url": "", + "maintainer": "Alabahuy", + "width": 16, + "height": 5, + "layouts": { + "LAYOUT_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" : "Backspace", "x":14, "y":0}, + {"label" : "Page up", "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 down", "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" : "Home", "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" : "Windows", "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, "w":1.5}, + {"label" : "Ctrl", "x":11.5, "y":4, "w":1.5}, + {"label" : "Left", "x":13, "y":4 }, + {"label" : "Down", "x":14, "y":4 }, + {"label" : "Right", "x":15, "y":4 } + ] + } + } +} diff --git a/keyboards/rart/rart67/keymaps/default/keymap.c b/keyboards/rart/rart67/keymaps/default/keymap.c new file mode 100644 index 000000000000..e1a21f89dc06 --- /dev/null +++ b/keyboards/rart/rart67/keymaps/default/keymap.c @@ -0,0 +1,36 @@ +/* +Copyright 2020 Alabahuy + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public 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_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_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_LGUI, KC_LALT, KC_SPC, MO(1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT + ), + + [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_DEL, _______, + RESET, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, KC_P7, KC_P8, KC_P9, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_P4, KC_P5, KC_P6, KC_NLCK, _______, + _______, _______, _______, _______, BL_DEC, BL_TOGG, BL_INC, BL_STEP, _______, KC_P1, KC_P2, KC_P3, KC_VOLU, _______, + _______, _______, _______, _______, _______, KC_P0, KC_MPRV, KC_VOLD, KC_MNXT + ), +}; diff --git a/keyboards/rart/rart67/rart67.c b/keyboards/rart/rart67/rart67.c new file mode 100644 index 000000000000..0ca3e00f22b1 --- /dev/null +++ b/keyboards/rart/rart67/rart67.c @@ -0,0 +1,17 @@ +/* Copyright 2020 Alabahuy + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#include "rart67.h" + + diff --git a/keyboards/rart/rart67/rart67.h b/keyboards/rart/rart67/rart67.h new file mode 100644 index 000000000000..a31b6f409038 --- /dev/null +++ b/keyboards/rart/rart67/rart67.h @@ -0,0 +1,28 @@ + +#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( \ + 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, K2E, K2F, \ + K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3E, K3F, \ + K40, K41, K42, K45, K49, K4A, K4B, K4E, K4F \ +) \ +{ \ + { 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, KC_NO, K1E, K1F }, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, KC_NO, KC_NO, K2E, K2F }, \ + { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, KC_NO, KC_NO, K3E, K3F }, \ + { K40, K41, K42, KC_NO, KC_NO, K45, KC_NO, KC_NO, KC_NO, K49, K4A, K4B, KC_NO, KC_NO, K4E, K4F }, \ +} + diff --git a/keyboards/rart/rart67/readme.md b/keyboards/rart/rart67/readme.md new file mode 100644 index 000000000000..ebf423ca5731 --- /dev/null +++ b/keyboards/rart/rart67/readme.md @@ -0,0 +1,14 @@ +# [RART 67](https://github.com/alabahuy/RART/tree/master/RART67) + +65% pcb mechanical keyboard based on [IMKG](https://www.facebook.com/groups/indomechanicalkeyboard/) (Indonesia Mechanical Keyboard Group) + +* Keyboard Maintainer: [Alabahuy](https://github.com/alabahuy) +* Hardware Supported: RART67 PCB, Mini USB, ATMega32U4, RGB underglow +* Hardware Availability: Private GB + +Make example for this keyboard (after setting up your build environment): + + make rart/rart67: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/rart/rart67/rules.mk b/keyboards/rart/rart67/rules.mk new file mode 100644 index 000000000000..abf2696c3d38 --- /dev/null +++ b/keyboards/rart/rart67/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 = 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 = 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 +FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches From 48db3ad6ef1e7c98bce592791972c7beaa2315ef Mon Sep 17 00:00:00 2001 From: Ramon Imbao Date: Tue, 30 Jun 2020 10:30:04 +0800 Subject: [PATCH 298/930] Fix Herringbone keymap typo (#9578) * Change TILD to GRV --- keyboards/ramonimbao/herringbone/keymaps/default/keymap.c | 2 +- keyboards/ramonimbao/herringbone/keymaps/iso/keymap.c | 2 +- keyboards/ramonimbao/herringbone/keymaps/via/keymap.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/keyboards/ramonimbao/herringbone/keymaps/default/keymap.c b/keyboards/ramonimbao/herringbone/keymaps/default/keymap.c index 18047fbea763..b9cf45351f29 100644 --- a/keyboards/ramonimbao/herringbone/keymaps/default/keymap.c +++ b/keyboards/ramonimbao/herringbone/keymaps/default/keymap.c @@ -18,7 +18,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [0] = LAYOUT_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_DEL, - 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_BSPC, 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_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, diff --git a/keyboards/ramonimbao/herringbone/keymaps/iso/keymap.c b/keyboards/ramonimbao/herringbone/keymaps/iso/keymap.c index 43255343e72b..d6d2b15f1971 100644 --- a/keyboards/ramonimbao/herringbone/keymaps/iso/keymap.c +++ b/keyboards/ramonimbao/herringbone/keymaps/iso/keymap.c @@ -18,7 +18,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [0] = LAYOUT_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_PSCR, 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_MINS, KC_EQL, KC_BSPC, 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_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_ENT, 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_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, diff --git a/keyboards/ramonimbao/herringbone/keymaps/via/keymap.c b/keyboards/ramonimbao/herringbone/keymaps/via/keymap.c index d39f7c9ab82f..04734d044476 100644 --- a/keyboards/ramonimbao/herringbone/keymaps/via/keymap.c +++ b/keyboards/ramonimbao/herringbone/keymaps/via/keymap.c @@ -18,7 +18,7 @@ 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_DEL, - 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_BSPC, KC_NO, 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_BSPC, KC_NO, 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_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_END, From 398a7e5b3f92f6f657093f0dcce7ac67b43a3c67 Mon Sep 17 00:00:00 2001 From: unicorn855 Date: Tue, 30 Jun 2020 13:23:31 +0200 Subject: [PATCH 299/930] re-added mouse and media keys plus slight changes (#9515) Co-authored-by: Ryan --- keyboards/hotdox/config.h | 10 +-- keyboards/hotdox/keymaps/via/keymap.c | 103 +++++++++++--------------- keyboards/hotdox/keymaps/via/rules.mk | 11 +-- 3 files changed, 49 insertions(+), 75 deletions(-) diff --git a/keyboards/hotdox/config.h b/keyboards/hotdox/config.h index db162a0f7aa4..c95096a7d382 100644 --- a/keyboards/hotdox/config.h +++ b/keyboards/hotdox/config.h @@ -3,13 +3,14 @@ #include "config_common.h" /* USB Device descriptor parameter */ -#define VENDOR_ID 0x414B // 'AK' Alpaca Keyboards + +#define VENDOR_ID 0x414B // 'AK' for Alpaca Keyboards #define PRODUCT_ID 0x0001 // sequentially numbered #define DEVICE_VER 0x0001 -#define MANUFACTURER Z.P.Z.O. -#define PRODUCT Alpaca Keyboards HotDox -#define DESCRIPTION QMK keyboard firmware for HotDox +#define MANUFACTURER Alpaca Keyboards +#define PRODUCT ErgoDox 76 "HotDox" +#define DESCRIPTION QMK FW for the "HotDox" /* key matrix size */ #define MATRIX_ROWS 6 @@ -75,4 +76,3 @@ //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION //#define DEBUG_MATRIX_SCAN_RATE - diff --git a/keyboards/hotdox/keymaps/via/keymap.c b/keyboards/hotdox/keymaps/via/keymap.c index c90e4cbef305..0a3d41cf788e 100644 --- a/keyboards/hotdox/keymaps/via/keymap.c +++ b/keyboards/hotdox/keymaps/via/keymap.c @@ -1,9 +1,9 @@ #include QMK_KEYBOARD_H #include "version.h" -//#define BASE 0 // default layer -//#define SYMB 1 // symbols -//#define MDIA 2 // media keys +#define BASE 0 // default layer +#define SYMB 1 // symbols +#define MDIA 2 // media keys enum custom_keycodes { VRSN = SAFE_RANGE, @@ -34,20 +34,21 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ // If it accepts an argument (i.e, is a function), it doesn't need KC_. // Otherwise, it needs KC_* -[0] = LAYOUT_ergodox( // layer 0 : default + +[BASE] = LAYOUT_ergodox( // layer 0 : default // left hand KC_EQL, KC_1, KC_2, KC_3, KC_4, KC_5, KC_LEFT, - KC_DEL, KC_Q, KC_W, KC_E, KC_R, KC_T, TG(1), + KC_DEL, KC_Q, KC_W, KC_E, KC_R, KC_T, TG(SYMB), KC_BSPC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_LSFT, CTL_T(KC_Z), KC_X, KC_C, KC_V, KC_B, ALL_T(KC_NO), - LT(1,KC_GRV),KC_QUOT, LALT(KC_LSFT), KC_LEFT,KC_RGHT, + LT(SYMB,KC_GRV),KC_QUOT, LALT(KC_LSFT), KC_LEFT,KC_RGHT, ALT_T(KC_APP), KC_LGUI, KC_HOME, KC_SPC,KC_BSPC,KC_END, // right hand KC_RGHT, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, - TG(1), KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS, - KC_H, KC_J, KC_K, KC_L, LT(2, KC_SCLN),GUI_T(KC_QUOT), + TG(SYMB), KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS, + KC_H, KC_J, KC_K, KC_L, LT(MDIA, KC_SCLN),GUI_T(KC_QUOT), MEH_T(KC_NO),KC_N, KC_M, KC_COMM,KC_DOT, CTL_T(KC_SLSH), KC_RSFT, KC_UP, KC_DOWN,KC_LBRC,KC_RBRC, KC_FN1, KC_LALT, CTL_T(KC_ESC), @@ -57,7 +58,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Keymap 1: Symbol Layer * * ,---------------------------------------------------. ,--------------------------------------------------. - * |Version | F1 | F2 | F3 | F4 | F5 | | | | F6 | F7 | F8 | F9 | F10 | F11 | + * | | F1 | F2 | F3 | F4 | F5 | | | | F6 | F7 | F8 | F9 | F10 | F11 | * |---------+------+------+------+------+------+------| |------+------+------+------+------+------+--------| * | | ! | @ | { | } | | | | | | Up | 7 | 8 | 9 | * | F12 | * |---------+------+------+------+------+------| | | |------+------+------+------+------+--------| @@ -65,33 +66,34 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |---------+------+------+------+------+------| | | |------+------+------+------+------+--------| * | | % | ^ | [ | ] | ~ | | | | & | 1 | 2 | 3 | \ | | * `---------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' - * | EEP_RST | | | | | | | . | 0 | = | | + * | | | | | | | . | 0 | = | | * `-----------------------------------' `----------------------------------' * ,-------------. ,-------------. - * |Animat| | |Toggle|Solid | + * | | | | | | * ,------|------|------| |------+------+------. - * |Bright|Bright| | | |Hue- |Hue+ | + * |Bright|Bright| | | | | | * |ness- |ness+ |------| |------| | | * | | | | | | | | * `--------------------' `--------------------' */ // SYMBOLS -[1] = LAYOUT_ergodox( + +[SYMB] = LAYOUT_ergodox( // left hand - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, - KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS, - KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, + KC_TRNS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_TRNS, + KC_TRNS,KC_EXLM,KC_AT, KC_LCBR,KC_RCBR,KC_PIPE,KC_TRNS, + KC_TRNS,KC_HASH,KC_DLR, KC_LPRN,KC_RPRN,KC_GRV, + KC_TRNS,KC_PERC,KC_CIRC,KC_LBRC,KC_RBRC,KC_TILD,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, + RGB_VAD,RGB_VAI,KC_TRNS, // right hand - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, + KC_TRNS, KC_UP, KC_7, KC_8, KC_9, KC_ASTR, KC_F12, + KC_DOWN, KC_4, KC_5, KC_6, KC_PLUS, KC_TRNS, + KC_TRNS, KC_AMPR, KC_1, KC_2, KC_3, KC_BSLS, KC_TRNS, + KC_TRNS,KC_DOT, KC_0, KC_EQL, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS @@ -118,45 +120,24 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `--------------------' `--------------------' */ // MEDIA AND MOUSE -[2] = LAYOUT_ergodox( - // left hand - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, - KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS, - KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, - KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, - KC_TRNS,KC_TRNS, - KC_TRNS, - KC_TRNS,KC_TRNS,KC_TRNS, - // right hand - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 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_ergodox( - // left hand - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, - KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS, - KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, - KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, - KC_TRNS,KC_TRNS, - KC_TRNS, - KC_TRNS,KC_TRNS,KC_TRNS, - // right hand - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, +[MDIA] = LAYOUT_ergodox( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_MS_UP, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_MS_LEFT, KC_MS_DOWN, KC_MS_RIGHT, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_BTN1, KC_BTN2, + KC_TRNS, KC_TRNS, + KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, + // right hand + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MPLY, + KC_TRNS, KC_TRNS, KC_TRNS, KC_MPRV, KC_MNXT, KC_TRNS, KC_TRNS, + KC_VOLU, KC_VOLD, KC_MUTE, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS + KC_TRNS, KC_TRNS, KC_WBAK ), }; diff --git a/keyboards/hotdox/keymaps/via/rules.mk b/keyboards/hotdox/keymaps/via/rules.mk index 02752039c054..a7f52bafc7d6 100644 --- a/keyboards/hotdox/keymaps/via/rules.mk +++ b/keyboards/hotdox/keymaps/via/rules.mk @@ -1,12 +1,5 @@ VIA_ENABLE = yes LTO_ENABLE = yes -MOUSEKEY_ENABLE = no # Mouse keys -EXTRAKEY_ENABLE = no # Audio control and System control - -LEADER_ENABLE = no -FAUXCLICKY_ENABLE = no -MIDI_ENABLE = no -BLUETOOTH_ENABLE = no -KEY_LOCK_ENABLE = no -TERMINAL_ENABLE = no \ No newline at end of file +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control From 24f59c2d7268c5e853d496733e844f60adf421b2 Mon Sep 17 00:00:00 2001 From: Ryan Date: Wed, 1 Jul 2020 02:53:24 +1000 Subject: [PATCH 300/930] Add more missing info.json layouts (#9595) --- keyboards/boardwalk/info.json | 798 +++++----- keyboards/dz60/info.json | 1704 +++++++++++++++++++++- keyboards/gh60/revc/info.json | 570 +++++++- keyboards/gray_studio/space65/info.json | 241 ++- keyboards/handwired/k_numpad17/info.json | 34 + keyboards/handwired/lovelive9/info.json | 28 +- keyboards/hineybush/h10/info.json | 219 ++- keyboards/hineybush/h60/info.json | 356 +++++ keyboards/maartenwut/plain60/info.json | 910 ++++++------ keyboards/smk60/info.json | 443 +++++- 10 files changed, 4464 insertions(+), 839 deletions(-) create mode 100644 keyboards/handwired/k_numpad17/info.json create mode 100644 keyboards/hineybush/h60/info.json diff --git a/keyboards/boardwalk/info.json b/keyboards/boardwalk/info.json index a287f31a44e4..dffcba6c2741 100644 --- a/keyboards/boardwalk/info.json +++ b/keyboards/boardwalk/info.json @@ -5,355 +5,451 @@ "width": 15, "height": 5, "layouts": { - "LAYOUT_ortho_5x14": { - "layout": [ - {"label":"k00", "x":0, "y":0, "w":1.5}, - {"label":"k01", "x":1.5, "y":0}, - {"label":"k02", "x":2.5, "y":0}, - {"label":"k03", "x":3.5, "y":0}, - {"label":"k04", "x":4.5, "y":0}, - {"label":"k05", "x":5.5, "y":0}, - {"label":"k06", "x":6.5, "y":0}, - {"label":"k07", "x":7.5, "y":0}, - {"label":"k08", "x":8.5, "y":0}, - {"label":"k09", "x":9.5, "y":0}, - {"label":"k010", "x":10.5, "y":0}, - {"label":"k011", "x":11.5, "y":0}, - {"label":"k012", "x":12.5, "y":0}, - {"label":"k013", "x":13.5, "y":0, "w":1.5}, - {"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":"k110", "x":10.5, "y":1}, - {"label":"k111", "x":11.5, "y":1}, - {"label":"k112", "x":12.5, "y":1}, - {"label":"k113", "x":13.5, "y":1, "w":1.5}, - {"label":"k20", "x":0, "y":2, "w":1.5}, - {"label":"k21", "x":1.5, "y":2}, - {"label":"k22", "x":2.5, "y":2}, - {"label":"k23", "x":3.5, "y":2}, - {"label":"k24", "x":4.5, "y":2}, - {"label":"k25", "x":5.5, "y":2}, - {"label":"k26", "x":6.5, "y":2}, - {"label":"k27", "x":7.5, "y":2}, - {"label":"k28", "x":8.5, "y":2}, - {"label":"k29", "x":9.5, "y":2}, - {"label":"k210", "x":10.5, "y":2}, - {"label":"k211", "x":11.5, "y":2}, - {"label":"k212", "x":12.5, "y":2}, - {"label":"k213", "x":13.5, "y":2, "w":1.5}, - {"label":"k30", "x":0, "y":3, "w":1.5}, - {"label":"k31", "x":1.5, "y":3}, - {"label":"k32", "x":2.5, "y":3}, - {"label":"k33", "x":3.5, "y":3}, - {"label":"k34", "x":4.5, "y":3}, - {"label":"k35", "x":5.5, "y":3}, - {"label":"k36", "x":6.5, "y":3}, - {"label":"k37", "x":7.5, "y":3}, - {"label":"k38", "x":8.5, "y":3}, - {"label":"k39", "x":9.5, "y":3}, - {"label":"k310", "x":10.5, "y":3}, - {"label":"k311", "x":11.5, "y":3}, - {"label":"k312", "x":12.5, "y":3}, - {"label":"k313", "x":13.5, "y":3, "w":1.5}, - {"label":"k40", "x":0, "y":4, "w":1.5}, - {"label":"k41", "x":1.5, "y":4}, - {"label":"k42", "x":2.5, "y":4}, - {"label":"k43", "x":3.5, "y":4}, - {"label":"k44", "x":4.5, "y":4}, - {"label":"k45", "x":5.5, "y":4}, - {"label":"k46", "x":6.5, "y":4}, - {"label":"k47", "x":7.5, "y":4}, - {"label":"k48", "x":8.5, "y":4}, - {"label":"k49", "x":9.5, "y":4}, - {"label":"k410", "x":10.5, "y":4}, - {"label":"k411", "x":11.5, "y":4}, - {"label":"k412", "x":12.5, "y":4}, - {"label":"k413", "x":13.5, "y":4, "w":1.5} - ] - }, - "LAYOUT_ortho_hhkb": { - "layout": [ - {"label":"k00", "x":0, "y":0, "w":1.5}, - {"label":"k01", "x":1.5, "y":0}, - {"label":"k02", "x":2.5, "y":0}, - {"label":"k03", "x":3.5, "y":0}, - {"label":"k04", "x":4.5, "y":0}, - {"label":"k05", "x":5.5, "y":0}, - {"label":"k06", "x":6.5, "y":0}, - {"label":"k07", "x":7.5, "y":0}, - {"label":"k08", "x":8.5, "y":0}, - {"label":"k09", "x":9.5, "y":0}, - {"label":"k010", "x":10.5, "y":0}, - {"label":"k011", "x":11.5, "y":0}, - {"label":"k012", "x":12.5, "y":0}, - {"label":"k013", "x":13.5, "y":0, "w":1.5}, - {"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":"k110", "x":10.5, "y":1}, - {"label":"k111", "x":11.5, "y":1}, - {"label":"k112", "x":12.5, "y":1}, - {"label":"k113", "x":13.5, "y":1, "w":1.5}, - {"label":"k20", "x":0, "y":2, "w":1.5}, - {"label":"k21", "x":1.5, "y":2}, - {"label":"k22", "x":2.5, "y":2}, - {"label":"k23", "x":3.5, "y":2}, - {"label":"k24", "x":4.5, "y":2}, - {"label":"k25", "x":5.5, "y":2}, - {"label":"k26", "x":6.5, "y":2}, - {"label":"k27", "x":7.5, "y":2}, - {"label":"k28", "x":8.5, "y":2}, - {"label":"k29", "x":9.5, "y":2}, - {"label":"k210", "x":10.5, "y":2}, - {"label":"k211", "x":11.5, "y":2}, - {"label":"k212", "x":12.5, "y":2}, - {"label":"k213", "x":13.5, "y":2, "w":1.5}, - {"label":"k30", "x":0, "y":3, "w":1.5}, - {"label":"k31", "x":1.5, "y":3}, - {"label":"k32", "x":2.5, "y":3}, - {"label":"k33", "x":3.5, "y":3}, - {"label":"k34", "x":4.5, "y":3}, - {"label":"k35", "x":5.5, "y":3}, - {"label":"k36", "x":6.5, "y":3}, - {"label":"k37", "x":7.5, "y":3}, - {"label":"k38", "x":8.5, "y":3}, - {"label":"k39", "x":9.5, "y":3}, - {"label":"k310", "x":10.5, "y":3}, - {"label":"k311", "x":11.5, "y":3}, - {"label":"k312", "x":12.5, "y":3}, - {"label":"k313", "x":13.5, "y":3, "w":1.5}, - {"label":"k41", "x":1.5, "y":4}, - {"label":"k42", "x":2.5, "y":4}, - {"label":"k43", "x":3.5, "y":4}, - {"label":"k44", "x":4.5, "y":4}, - {"label":"k45", "x":5.5, "y":4, "w":2}, - {"label":"k47", "x":7.5, "y":4, "w":2}, - {"label":"k49", "x":9.5, "y":4}, - {"label":"k410", "x":10.5, "y":4}, - {"label":"k411", "x":11.5, "y":4}, - {"label":"k412", "x":12.5, "y":4} - ] - }, - "LAYOUT_ortho_7u": { - "layout": [ - {"label":"k00", "x":0, "y":0, "w":1.5}, - {"label":"k01", "x":1.5, "y":0}, - {"label":"k02", "x":2.5, "y":0}, - {"label":"k03", "x":3.5, "y":0}, - {"label":"k04", "x":4.5, "y":0}, - {"label":"k05", "x":5.5, "y":0}, - {"label":"k06", "x":6.5, "y":0}, - {"label":"k07", "x":7.5, "y":0}, - {"label":"k08", "x":8.5, "y":0}, - {"label":"k09", "x":9.5, "y":0}, - {"label":"k010", "x":10.5, "y":0}, - {"label":"k011", "x":11.5, "y":0}, - {"label":"k012", "x":12.5, "y":0}, - {"label":"k013", "x":13.5, "y":0, "w":1.5}, - {"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":"k110", "x":10.5, "y":1}, - {"label":"k111", "x":11.5, "y":1}, - {"label":"k112", "x":12.5, "y":1}, - {"label":"k113", "x":13.5, "y":1, "w":1.5}, - {"label":"k20", "x":0, "y":2, "w":1.5}, - {"label":"k21", "x":1.5, "y":2}, - {"label":"k22", "x":2.5, "y":2}, - {"label":"k23", "x":3.5, "y":2}, - {"label":"k24", "x":4.5, "y":2}, - {"label":"k25", "x":5.5, "y":2}, - {"label":"k26", "x":6.5, "y":2}, - {"label":"k27", "x":7.5, "y":2}, - {"label":"k28", "x":8.5, "y":2}, - {"label":"k29", "x":9.5, "y":2}, - {"label":"k210", "x":10.5, "y":2}, - {"label":"k211", "x":11.5, "y":2}, - {"label":"k212", "x":12.5, "y":2}, - {"label":"k213", "x":13.5, "y":2, "w":1.5}, - {"label":"k30", "x":0, "y":3, "w":1.5}, - {"label":"k31", "x":1.5, "y":3}, - {"label":"k32", "x":2.5, "y":3}, - {"label":"k33", "x":3.5, "y":3}, - {"label":"k34", "x":4.5, "y":3}, - {"label":"k35", "x":5.5, "y":3}, - {"label":"k36", "x":6.5, "y":3}, - {"label":"k37", "x":7.5, "y":3}, - {"label":"k38", "x":8.5, "y":3}, - {"label":"k39", "x":9.5, "y":3}, - {"label":"k310", "x":10.5, "y":3}, - {"label":"k311", "x":11.5, "y":3}, - {"label":"k312", "x":12.5, "y":3}, - {"label":"k313", "x":13.5, "y":3, "w":1.5}, - {"label":"k41", "x":1.5, "y":4}, - {"label":"k42", "x":2.5, "y":4, "w":1.5}, - {"label":"k46", "x":4, "y":4, "w":7}, - {"label":"k411", "x":11, "y":4, "w":1.5}, - {"label":"k412", "x":12.5, "y":4} - ] - }, - "LAYOUT_2u_arrow": { - "layout": [ - {"label":"k00", "x":0, "y":0, "w":1.5}, - {"label":"k01", "x":1.5, "y":0}, - {"label":"k02", "x":2.5, "y":0}, - {"label":"k03", "x":3.5, "y":0}, - {"label":"k04", "x":4.5, "y":0}, - {"label":"k05", "x":5.5, "y":0}, - {"label":"k06", "x":6.5, "y":0}, - {"label":"k07", "x":7.5, "y":0}, - {"label":"k08", "x":8.5, "y":0}, - {"label":"k09", "x":9.5, "y":0}, - {"label":"k010", "x":10.5, "y":0}, - {"label":"k011", "x":11.5, "y":0}, - {"label":"k012", "x":12.5, "y":0}, - {"label":"k013", "x":13.5, "y":0, "w":1.5}, - {"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":"k110", "x":10.5, "y":1}, - {"label":"k111", "x":11.5, "y":1}, - {"label":"k112", "x":12.5, "y":1}, - {"label":"k113", "x":13.5, "y":1, "w":1.5}, - {"label":"k20", "x":0, "y":2, "w":1.5}, - {"label":"k21", "x":1.5, "y":2}, - {"label":"k22", "x":2.5, "y":2}, - {"label":"k23", "x":3.5, "y":2}, - {"label":"k24", "x":4.5, "y":2}, - {"label":"k25", "x":5.5, "y":2}, - {"label":"k26", "x":6.5, "y":2}, - {"label":"k27", "x":7.5, "y":2}, - {"label":"k28", "x":8.5, "y":2}, - {"label":"k29", "x":9.5, "y":2}, - {"label":"k210", "x":10.5, "y":2}, - {"label":"k211", "x":11.5, "y":2}, - {"label":"k212", "x":12.5, "y":2, "w":1.5}, - {"label":"k213", "x":14, "y":2}, - {"label":"k30", "x":0, "y":3, "w":1.5}, - {"label":"k31", "x":1.5, "y":3}, - {"label":"k32", "x":2.5, "y":3}, - {"label":"k33", "x":3.5, "y":3}, - {"label":"k34", "x":4.5, "y":3}, - {"label":"k35", "x":5.5, "y":3}, - {"label":"k36", "x":6.5, "y":3}, - {"label":"k37", "x":7.5, "y":3}, - {"label":"k38", "x":8.5, "y":3}, - {"label":"k39", "x":9.5, "y":3}, - {"label":"k310", "x":10.5, "y":3}, - {"label":"k311", "x":11.5, "y":3, "w":1.5}, - {"label":"k312", "x":13, "y":3}, - {"label":"k313", "x":14, "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}, - {"label":"k43", "x":3.5, "y":4}, - {"label":"k44", "x":4.5, "y":4, "w":2}, - {"label":"k46", "x":6.5, "y":4, "w":2}, - {"label":"k48", "x":8.5, "y":4}, - {"label":"k49", "x":9.5, "y":4, "w":1.25}, - {"label":"k410", "x":10.75, "y":4, "w":1.25}, - {"label":"k411", "x":12, "y":4}, - {"label":"k412", "x":13, "y":4}, - {"label":"k413", "x":14, "y":4} - ] - }, - "LAYOUT_625u_arrow": { - "layout": [ - {"label":"k00", "x":0, "y":0, "w":1.5}, - {"label":"k01", "x":1.5, "y":0}, - {"label":"k02", "x":2.5, "y":0}, - {"label":"k03", "x":3.5, "y":0}, - {"label":"k04", "x":4.5, "y":0}, - {"label":"k05", "x":5.5, "y":0}, - {"label":"k06", "x":6.5, "y":0}, - {"label":"k07", "x":7.5, "y":0}, - {"label":"k08", "x":8.5, "y":0}, - {"label":"k09", "x":9.5, "y":0}, - {"label":"k010", "x":10.5, "y":0}, - {"label":"k011", "x":11.5, "y":0}, - {"label":"k012", "x":12.5, "y":0}, - {"label":"k013", "x":13.5, "y":0, "w":1.5}, - {"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":"k110", "x":10.5, "y":1}, - {"label":"k111", "x":11.5, "y":1}, - {"label":"k112", "x":12.5, "y":1}, - {"label":"k113", "x":13.5, "y":1, "w":1.5}, - {"label":"k20", "x":0, "y":2, "w":1.5}, - {"label":"k21", "x":1.5, "y":2}, - {"label":"k22", "x":2.5, "y":2}, - {"label":"k23", "x":3.5, "y":2}, - {"label":"k24", "x":4.5, "y":2}, - {"label":"k25", "x":5.5, "y":2}, - {"label":"k26", "x":6.5, "y":2}, - {"label":"k27", "x":7.5, "y":2}, - {"label":"k28", "x":8.5, "y":2}, - {"label":"k29", "x":9.5, "y":2}, - {"label":"k210", "x":10.5, "y":2}, - {"label":"k211", "x":11.5, "y":2}, - {"label":"k212", "x":12.5, "y":2, "w":1.5}, - {"label":"k213", "x":14, "y":2}, - {"label":"k30", "x":0, "y":3, "w":1.5}, - {"label":"k31", "x":1.5, "y":3}, - {"label":"k32", "x":2.5, "y":3}, - {"label":"k33", "x":3.5, "y":3}, - {"label":"k34", "x":4.5, "y":3}, - {"label":"k35", "x":5.5, "y":3}, - {"label":"k36", "x":6.5, "y":3}, - {"label":"k37", "x":7.5, "y":3}, - {"label":"k38", "x":8.5, "y":3}, - {"label":"k39", "x":9.5, "y":3}, - {"label":"k310", "x":10.5, "y":3}, - {"label":"k311", "x":11.5, "y":3, "w":1.5}, - {"label":"k312", "x":13, "y":3}, - {"label":"k313", "x":14, "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}, - {"label":"k45", "x":3.5, "y":4, "w":6.25}, - {"label":"k49", "x":9.75, "y":4}, - {"label":"k410", "x":10.75, "y":4, "w":1.25}, - {"label":"k411", "x":12, "y":4}, - {"label":"k412", "x":13, "y":4}, - {"label":"k413", "x":14, "y":4} - ] - } + "LAYOUT_ortho_5x14": { + "layout": [ + {"x": 0, "y": 0, "w": 1.5}, + {"x": 1.5, "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, "w": 1.5}, + + {"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.5}, + {"x": 1.5, "y": 2}, + {"x": 2.5, "y": 2}, + {"x": 3.5, "y": 2}, + {"x": 4.5, "y": 2}, + {"x": 5.5, "y": 2}, + {"x": 6.5, "y": 2}, + {"x": 7.5, "y": 2}, + {"x": 8.5, "y": 2}, + {"x": 9.5, "y": 2}, + {"x": 10.5, "y": 2}, + {"x": 11.5, "y": 2}, + {"x": 12.5, "y": 2}, + {"x": 13.5, "y": 2, "w": 1.5}, + + {"x": 0, "y": 3, "w": 1.5}, + {"x": 1.5, "y": 3}, + {"x": 2.5, "y": 3}, + {"x": 3.5, "y": 3}, + {"x": 4.5, "y": 3}, + {"x": 5.5, "y": 3}, + {"x": 6.5, "y": 3}, + {"x": 7.5, "y": 3}, + {"x": 8.5, "y": 3}, + {"x": 9.5, "y": 3}, + {"x": 10.5, "y": 3}, + {"x": 11.5, "y": 3}, + {"x": 12.5, "y": 3}, + {"x": 13.5, "y": 3, "w": 1.5}, + + {"x": 0, "y": 4, "w": 1.5}, + {"x": 1.5, "y": 4}, + {"x": 2.5, "y": 4}, + {"x": 3.5, "y": 4}, + {"x": 4.5, "y": 4}, + {"x": 5.5, "y": 4}, + {"x": 6.5, "y": 4}, + {"x": 7.5, "y": 4}, + {"x": 8.5, "y": 4}, + {"x": 9.5, "y": 4}, + {"x": 10.5, "y": 4}, + {"x": 11.5, "y": 4}, + {"x": 12.5, "y": 4}, + {"x": 13.5, "y": 4, "w": 1.5} + ] + }, + "LAYOUT_ortho_hhkb": { + "layout": [ + {"x": 0, "y": 0, "w": 1.5}, + {"x": 1.5, "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, "w": 1.5}, + + {"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.5}, + {"x": 1.5, "y": 2}, + {"x": 2.5, "y": 2}, + {"x": 3.5, "y": 2}, + {"x": 4.5, "y": 2}, + {"x": 5.5, "y": 2}, + {"x": 6.5, "y": 2}, + {"x": 7.5, "y": 2}, + {"x": 8.5, "y": 2}, + {"x": 9.5, "y": 2}, + {"x": 10.5, "y": 2}, + {"x": 11.5, "y": 2}, + {"x": 12.5, "y": 2}, + {"x": 13.5, "y": 2, "w": 1.5}, + + {"x": 0, "y": 3, "w": 1.5}, + {"x": 1.5, "y": 3}, + {"x": 2.5, "y": 3}, + {"x": 3.5, "y": 3}, + {"x": 4.5, "y": 3}, + {"x": 5.5, "y": 3}, + {"x": 6.5, "y": 3}, + {"x": 7.5, "y": 3}, + {"x": 8.5, "y": 3}, + {"x": 9.5, "y": 3}, + {"x": 10.5, "y": 3}, + {"x": 11.5, "y": 3}, + {"x": 12.5, "y": 3}, + {"x": 13.5, "y": 3, "w": 1.5}, + + {"x": 1.5, "y": 4}, + {"x": 2.5, "y": 4}, + {"x": 3.5, "y": 4}, + {"x": 4.5, "y": 4}, + {"x": 5.5, "y": 4, "w": 2}, + {"x": 7.5, "y": 4, "w": 2}, + {"x": 9.5, "y": 4}, + {"x": 10.5, "y": 4}, + {"x": 11.5, "y": 4}, + {"x": 12.5, "y": 4} + ] + }, + "LAYOUT_ortho_7u": { + "layout": [ + {"x": 0, "y": 0, "w": 1.5}, + {"x": 1.5, "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, "w": 1.5}, + + {"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.5}, + {"x": 1.5, "y": 2}, + {"x": 2.5, "y": 2}, + {"x": 3.5, "y": 2}, + {"x": 4.5, "y": 2}, + {"x": 5.5, "y": 2}, + {"x": 6.5, "y": 2}, + {"x": 7.5, "y": 2}, + {"x": 8.5, "y": 2}, + {"x": 9.5, "y": 2}, + {"x": 10.5, "y": 2}, + {"x": 11.5, "y": 2}, + {"x": 12.5, "y": 2}, + {"x": 13.5, "y": 2, "w": 1.5}, + + {"x": 0, "y": 3, "w": 1.5}, + {"x": 1.5, "y": 3}, + {"x": 2.5, "y": 3}, + {"x": 3.5, "y": 3}, + {"x": 4.5, "y": 3}, + {"x": 5.5, "y": 3}, + {"x": 6.5, "y": 3}, + {"x": 7.5, "y": 3}, + {"x": 8.5, "y": 3}, + {"x": 9.5, "y": 3}, + {"x": 10.5, "y": 3}, + {"x": 11.5, "y": 3}, + {"x": 12.5, "y": 3}, + {"x": 13.5, "y": 3, "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} + ] + }, + "LAYOUT_2u_arrow": { + "layout": [ + {"x": 0, "y": 0, "w": 1.5}, + {"x": 1.5, "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, "w": 1.5}, + + {"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.5}, + {"x": 1.5, "y": 2}, + {"x": 2.5, "y": 2}, + {"x": 3.5, "y": 2}, + {"x": 4.5, "y": 2}, + {"x": 5.5, "y": 2}, + {"x": 6.5, "y": 2}, + {"x": 7.5, "y": 2}, + {"x": 8.5, "y": 2}, + {"x": 9.5, "y": 2}, + {"x": 10.5, "y": 2}, + {"x": 11.5, "y": 2}, + {"x": 12.5, "y": 2, "w": 1.5}, + {"x": 14, "y": 2}, + + {"x": 0, "y": 3, "w": 1.5}, + {"x": 1.5, "y": 3}, + {"x": 2.5, "y": 3}, + {"x": 3.5, "y": 3}, + {"x": 4.5, "y": 3}, + {"x": 5.5, "y": 3}, + {"x": 6.5, "y": 3}, + {"x": 7.5, "y": 3}, + {"x": 8.5, "y": 3}, + {"x": 9.5, "y": 3}, + {"x": 10.5, "y": 3}, + {"x": 11.5, "y": 3, "w": 1.5}, + {"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}, + {"x": 3.5, "y": 4}, + {"x": 4.5, "y": 4, "w": 2}, + {"x": 6.5, "y": 4, "w": 2}, + {"x": 8.5, "y": 4}, + {"x": 9.5, "y": 4, "w": 1.25}, + {"x": 10.75, "y": 4, "w": 1.25}, + {"x": 12, "y": 4}, + {"x": 13, "y": 4}, + {"x": 14, "y": 4} + ] + }, + "LAYOUT_625u_arrow": { + "layout": [ + {"x": 0, "y": 0, "w": 1.5}, + {"x": 1.5, "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, "w": 1.5}, + + {"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.5}, + {"x": 1.5, "y": 2}, + {"x": 2.5, "y": 2}, + {"x": 3.5, "y": 2}, + {"x": 4.5, "y": 2}, + {"x": 5.5, "y": 2}, + {"x": 6.5, "y": 2}, + {"x": 7.5, "y": 2}, + {"x": 8.5, "y": 2}, + {"x": 9.5, "y": 2}, + {"x": 10.5, "y": 2}, + {"x": 11.5, "y": 2}, + {"x": 12.5, "y": 2, "w": 1.5}, + {"x": 14, "y": 2}, + + {"x": 0, "y": 3, "w": 1.5}, + {"x": 1.5, "y": 3}, + {"x": 2.5, "y": 3}, + {"x": 3.5, "y": 3}, + {"x": 4.5, "y": 3}, + {"x": 5.5, "y": 3}, + {"x": 6.5, "y": 3}, + {"x": 7.5, "y": 3}, + {"x": 8.5, "y": 3}, + {"x": 9.5, "y": 3}, + {"x": 10.5, "y": 3}, + {"x": 11.5, "y": 3, "w": 1.5}, + {"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}, + {"x": 3.5, "y": 4, "w": 6.25}, + {"x": 9.75, "y": 4}, + {"x": 10.75, "y": 4, "w": 1.25}, + {"x": 12, "y": 4}, + {"x": 13, "y": 4}, + {"x": 14, "y": 4} + ] + }, + "LAYOUT_ortho_2x2u": { + "layout": [ + {"x": 0, "y": 0, "w": 1.5}, + {"x": 1.5, "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, "w": 1.5}, + + {"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.5}, + {"x": 1.5, "y": 2}, + {"x": 2.5, "y": 2}, + {"x": 3.5, "y": 2}, + {"x": 4.5, "y": 2}, + {"x": 5.5, "y": 2}, + {"x": 6.5, "y": 2}, + {"x": 7.5, "y": 2}, + {"x": 8.5, "y": 2}, + {"x": 9.5, "y": 2}, + {"x": 10.5, "y": 2}, + {"x": 11.5, "y": 2}, + {"x": 12.5, "y": 2}, + {"x": 13.5, "y": 2, "w": 1.5}, + + {"x": 0, "y": 3, "w": 1.5}, + {"x": 1.5, "y": 3}, + {"x": 2.5, "y": 3}, + {"x": 3.5, "y": 3}, + {"x": 4.5, "y": 3}, + {"x": 5.5, "y": 3}, + {"x": 6.5, "y": 3}, + {"x": 7.5, "y": 3}, + {"x": 8.5, "y": 3}, + {"x": 9.5, "y": 3}, + {"x": 10.5, "y": 3}, + {"x": 11.5, "y": 3}, + {"x": 12.5, "y": 3}, + {"x": 13.5, "y": 3, "w": 1.5}, + + {"x": 0, "y": 4, "w": 1.5}, + {"x": 1.5, "y": 4}, + {"x": 2.5, "y": 4}, + {"x": 3.5, "y": 4}, + {"x": 4.5, "y": 4}, + {"x": 5.5, "y": 4, "w": 2}, + {"x": 7.5, "y": 4, "w": 2}, + {"x": 9.5, "y": 4}, + {"x": 10.5, "y": 4}, + {"x": 11.5, "y": 4}, + {"x": 12.5, "y": 4}, + {"x": 13.5, "y": 4, "w": 1.5} + ] + } } - } \ No newline at end of file +} diff --git a/keyboards/dz60/info.json b/keyboards/dz60/info.json index 6415954c297a..8bd164150ece 100644 --- a/keyboards/dz60/info.json +++ b/keyboards/dz60/info.json @@ -6,73 +6,1731 @@ "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":"Del", "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":"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":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}, {"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":2.25}, {"x":6, "y":4, "w":1.25}, {"x":7.25, "y":4, "w":2.75}, {"x":10, "y":4}, {"label":"Alt", "x":11, "y":4}, {"label":"Win", "x":12, "y":4}, {"label":"Menu", "x":13, "y":4}, {"label":"Ctrl", "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}, + {"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": 1.25}, + {"x": 1.25, "y": 3}, + {"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.25}, + {"x": 1.25, "y": 4, "w": 1.25}, + {"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}, + {"x": 10, "y": 4}, + {"x": 11, "y": 4}, + {"x": 12, "y": 4}, + {"x": 13, "y": 4}, + {"x": 14, "y": 4} + ] }, "LAYOUT_true_hhkb": { - "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":"~", "x":13, "y":0}, {"label":"Del", "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":"Ctrl", "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}, {"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":"Alt", "x":1.5, "y":4}, {"x":2.5, "y":4, "w":1.5}, {"x":4, "y":4, "w":6}, {"x":10, "y":4, "w":1.5}, {"label":"Alt", "x":11.5, "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}, + {"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": 1.25}, + {"x": 1.25, "y": 3}, + {"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": 1.5, "y": 4}, + {"x": 2.5, "y": 4, "w": 1.5}, + {"x": 4, "y": 4, "w": 6}, + {"x": 10, "y": 4, "w": 1.5}, + {"x": 11.5, "y": 4} + ] }, "LAYOUT_directional": { - "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":"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}, {"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}, {"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":2.25}, {"x":6, "y":4, "w":1.25}, {"x":7.25, "y":4, "w":2.75}, {"x":10, "y":4}, {"label":"Alt", "x":11, "y":4}, {"label":"Win", "x":12, "y":4}, {"label":"Menu", "x":13, "y":4}, {"label":"Ctrl", "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}, + {"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}, + {"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}, + {"x": 12, "y": 3}, + {"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": 2.25}, + {"x": 6, "y": 4, "w": 1.25}, + {"x": 7.25, "y": 4, "w": 2.75}, + {"x": 10, "y": 4}, + {"x": 11, "y": 4}, + {"x": 12, "y": 4}, + {"x": 13, "y": 4}, + {"x": 14, "y": 4} + ] }, "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}, {"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":"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}, {"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":2.25}, {"x":6, "y":4, "w":1.25}, {"x":7.25, "y":4, "w":2.75}, {"x":10, "y":4}, {"label":"Alt", "x":11, "y":4}, {"label":"Win", "x":12, "y":4}, {"label":"Menu", "x":13, "y":4}, {"label":"Ctrl", "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}, + {"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}, + {"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}, + {"x": 12, "y": 3}, + {"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": 2.25}, + {"x": 6, "y": 4, "w": 1.25}, + {"x": 7.25, "y": 4, "w": 2.75}, + {"x": 10, "y": 4}, + {"x": 11, "y": 4}, + {"x": 12, "y": 4}, + {"x": 13, "y": 4}, + {"x": 14, "y": 4} + ] }, "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":"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":"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} + ] }, "LAYOUT_60_ansi_split": { - "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":"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":"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}, {"label":"FN", "x":6.00, "y":4, "w":1.25}, {"x":7.25, "y":4, "w":2.75}, {"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": [ + {"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": 2.25}, + {"x": 6.00, "y": 4, "w": 1.25}, + {"x": 7.25, "y": 4, "w": 2.75}, + {"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} + ] + }, + "LAYOUT_60_ansi_split_bs_rshift": { + "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.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} + ] }, "LAYOUT_60_ansi_split_space_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, "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":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":2.25}, {"label":"FN", "x":6, "y":4, "w":1.25}, {"x":7.25, "y":4, "w":2.75}, {"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": [ + {"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": 1.75}, + {"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": 2.25}, + {"x": 6, "y": 4, "w": 1.25}, + {"x": 7.25, "y": 4, "w": 2.75}, + {"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} + ] }, "LAYOUT_60_iso": { - "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": [ + {"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": 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}, + {"x": 13.75, "y": 1, "w": 1.25, "h": 2}, + + {"x": 0, "y": 3, "w": 1.25}, + {"x": 1.25, "y": 3}, + {"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} + ] }, "LAYOUT_60_hhkb": { - "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":"`", "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":"Os", "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":"Os", "x":12.5, "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}, + {"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": 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} + ] }, "LAYOUT_60_iso_5x1u": { - "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, "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":"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}] + "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": 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}, + {"x": 13.75, "y": 1, "w": 1.25, "h": 2}, + + {"x": 0, "y": 3, "w": 1.25}, + {"x": 1.25, "y": 3}, + {"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}, + {"x": 11, "y": 4}, + {"x": 12, "y": 4}, + {"x": 13, "y": 4}, + {"x": 14, "y": 4} + ] }, "LAYOUT_60_iso_5x1u_split_rshift": { - "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":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}, {"label":"\u2190", "x":11, "y":4}, {"label":"\u2193", "x":12, "y":4}, {"label":"\u2191", "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.75, "y": 1, "w": 1.25, "h": 2}, + + {"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}, + + {"x": 0, "y": 3, "w": 1.25}, + {"x": 1.25, "y": 3}, + {"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.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} + ] }, "LAYOUT_60_iso_split": { - "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":2.25}, {"label":"FN", "x":6.00, "y":4, "w":1.25}, {"x":7.25, "y":4, "w":2.75}, {"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": [ + {"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": 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}, + {"x": 13.75, "y": 1, "w": 1.25, "h": 2}, + + {"x": 0, "y": 3, "w": 1.25}, + {"x": 1.25, "y": 3}, + {"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": 2.25}, + {"x": 6.00, "y": 4, "w": 1.25}, + {"x": 7.25, "y": 4, "w": 2.75}, + {"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} + ] }, "LAYOUT_60_b_ansi": { - "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}, {"x":13, "y":0}, {"label":"Back Space", "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":"Shift", "x":11.25, "y":3, "w":1.75}, {"label":"Up", "x":13, "y":3}, {"label":"Del", "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":2.25}, {"label":"Space", "x":6, "y":4, "w":1.25}, {"label":"Space", "x":7.25, "y":4, "w":2.75}, {"label":"Alt", "x":10, "y":4}, {"label":"Fn", "x":11, "y":4}, {"label":"Left", "x":12, "y":4}, {"label":"Down", "x":13, "y":4}, {"label":"Right", "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}, + {"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, "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": 2.25}, + {"x": 6, "y": 4, "w": 1.25}, + {"x": 7.25, "y": 4, "w": 2.75}, + {"x": 10, "y": 4}, + {"x": 11, "y": 4}, + {"x": 12, "y": 4}, + {"x": 13, "y": 4}, + {"x": 14, "y": 4} + ] }, "LAYOUT_60_b_iso": { - "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}, {"x":13, "y":0}, {"label":"Back Space", "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":"Shift", "x":11.25, "y":3, "w":1.75}, {"label":"Up", "x":13, "y":3}, {"label":"Del", "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":2.25}, {"label":"Space", "x":6, "y":4, "w":1.25}, {"label":"Space", "x":7.25, "y":4, "w":2.75}, {"label":"AltGr", "x":10, "y":4}, {"label":"Fn", "x":11, "y":4}, {"label":"Left", "x":12, "y":4}, {"label":"Down", "x":13, "y":4}, {"label":"Right", "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}, + {"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": 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}, + {"x": 13.75, "y": 1, "w": 1.25, "h": 2}, + + {"x": 0, "y": 3, "w": 1.25}, + {"x": 1.25, "y": 3}, + {"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": 2.25}, + {"x": 6, "y": 4, "w": 1.25}, + {"x": 7.25, "y": 4, "w": 2.75}, + {"x": 10, "y": 4}, + {"x": 11, "y": 4}, + {"x": 12, "y": 4}, + {"x": 13, "y": 4}, + {"x": 14, "y": 4} + ] }, "LAYOUT_60_tsangan": { - "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": [ + {"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": 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_60_tsangan_hhkb": { - "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":"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":"Win", "x":11, "y":4, "w":1.5}, {"label":"Menu", "x":12.5, "y":4}, {"label":"Ctrl", "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} + ] }, "LAYOUT_60_calbatr0ss": { - "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":"Ctrl", "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.25}, {"label":"Win", "x":1.25, "y":4, "w":1.25}, {"label":"Alt", "x":2.5, "y":4, "w":1.25}, {"label":"Shift", "x":3.75, "y":4, "w":2.25}, {"label":"Fn", "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": [ + {"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.25}, + {"x": 1.25, "y": 4, "w": 1.25}, + {"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}, + {"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} + ] }, "LAYOUT_60_iso_split_space_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}, {"label":"Del", "x":13, "y":0, "w":1}, {"label":"Backspace", "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":"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}, {"label":"Print screen", "x":14, "y":3, "w":1}, {"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}, {"label":"FN", "x":6.00, "y":4, "w":1.25}, {"x":7.25, "y":4, "w":2.75}, {"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": [ + {"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": 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}, + {"x": 13.75, "y": 1, "w": 1.25, "h": 2}, + + {"x": 0, "y": 3, "w": 1.25}, + {"x": 1.25, "y": 3}, + {"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.25}, + {"x": 1.25, "y": 4, "w": 1.25}, + {"x": 2.5, "y": 4, "w": 1.25}, + {"x": 3.75, "y": 4, "w": 2.25}, + {"x": 6.00, "y": 4, "w": 1.25}, + {"x": 7.25, "y": 4, "w": 2.75}, + {"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} + ] }, "LAYOUT_60_2_function": { - "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":"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}, {"x":3.75, "y":4, "w":6.25}, {"label":"Alt", "x":10, "y":4, "w":1.5}, {"label":"Control", "x":11.5, "y":4, "w":1.5}, {"label":"GUI", "x":13, "y":4}, {"label":"Fn2", "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}, + {"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.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.5}, + {"x": 11.5, "y": 4, "w": 1.5}, + {"x": 13, "y": 4}, + {"x": 14, "y": 4} + ] }, "LAYOUT_60_iso_5x1u_split_bs_rshift_spc": { - "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":"Del", "x":13, "y":0, "w":1}, {"label":"Backspace", "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":"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}, {"label":"VolUp", "x":14, "y":3, "w":1}, {"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.00, "y":4, "w":1.25}, {"x":7.25, "y":4, "w":2.75}, {"label":"Left", "x":10, "y":4, "w":1}, {"label":"Down", "x":11, "y":4, "w":1}, {"label":"Up", "x":12, "y":4, "w":1}, {"label":"Right", "x":13, "y":4, "w":1}, {"label":"VolDown", "x":14, "y":4, "w":1}] + "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": 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}, + {"x": 13.75, "y": 1, "w": 1.25, "h": 2}, + + {"x": 0, "y": 3, "w": 1.25}, + {"x": 1.25, "y": 3}, + {"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.25}, + {"x": 1.25, "y": 4, "w": 1.25}, + {"x": 2.5, "y": 4, "w": 1.25}, + {"x": 3.75, "y": 4, "w": 2.25}, + {"x": 6.00, "y": 4, "w": 1.25}, + {"x": 7.25, "y": 4, "w": 2.75}, + {"x": 10, "y": 4}, + {"x": 11, "y": 4}, + {"x": 12, "y": 4}, + {"x": 13, "y": 4}, + {"x": 14, "y": 4} + ] }, "LAYOUT_olivierko": { - "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":"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}, {"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":"↑", "x":12, "y":3}, {"label":"Shift", "x":13, "y":3, "w":2}, {"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":"←", "x":11, "y":4}, {"label":"↓", "x":12, "y":4}, {"label":"→", "x":13, "y":4}, {"label":"Ctrl", "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}, + {"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}, + {"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}, + {"x": 12, "y": 3}, + {"x": 13, "y": 3, "w": 2}, + + {"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}, + {"x": 12, "y": 4}, + {"x": 13, "y": 4}, + {"x": 14, "y": 4} + ] }, "LAYOUT_60_abnt2": { - "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": [ + {"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": 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}, + {"x": 13.75, "y": 1, "w": 1.25, "h": 2}, + + {"x": 0, "y": 3, "w": 1.25}, + {"x": 1.25, "y": 3}, + {"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}, + {"x": 13.25, "y": 3, "w": 1.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} + ] }, "LAYOUT_60_iso_4th_row_all_1u": { - "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}] + "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": 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}, + {"x": 13.75, "y": 1, "w": 1.25, "h": 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}, + {"x": 12, "y": 3}, + {"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/gh60/revc/info.json b/keyboards/gh60/revc/info.json index 7a8a19c1eced..9d25629dae96 100644 --- a/keyboards/gh60/revc/info.json +++ b/keyboards/gh60/revc/info.json @@ -6,38 +6,574 @@ "height": 5, "layouts": { "LAYOUT_all": { - "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},{"label":"Backspace","x":13,"y":0},{"label":"Backspace Extra","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":"ISO Hash","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":"ISO Backslash","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":"HHKB 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},{"label":"Space","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}, + {"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}, + {"x": 13.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}, + {"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.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} + ] + }, "LAYOUT": { - "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},{"label":"Backspace","x":13,"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":"ISO Hash","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":"ISO Backslash","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":"HHKB 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},{"label":"Space","x":3.75,"y":4,"w":6.25},{"label":"Backspace Extra","x":14,"y":0},{"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}, + + {"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}, + {"x": 13.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}, + {"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.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": 14, "y": 0}, + {"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} + ] }, "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},{"label":"Space","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} + ] }, "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":"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": [ + {"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": 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}, + {"x": 13.75, "y": 1, "w": 1.25, "h": 2}, + + {"x": 0, "y": 3, "w": 1.25}, + {"x": 1.25, "y": 3}, + {"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} + ] }, "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},{"label":"Backspace","x":13,"y":0},{"label":"Backspace Extra","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":"HHKB 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":6},{"label":"Alt","x":10,"y":4,"w":1.5},{"label":"Win","x":11.5,"y":4},{"label":"Menu","x":12.5,"y":4},{"label":"Ctrl","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}, - "LAYOUT_60_ansi_split_rshift": { - "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":"|", "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":"HHKB 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}, {"label":"Space", "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}] + {"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": 6}, + {"x": 10, "y": 4, "w": 1.5}, + {"x": 11.5, "y": 4}, + {"x": 12.5, "y": 4}, + {"x": 13.5, "y": 4, "w": 1.5} + ] }, + "LAYOUT_60_ansi_split_rshift": { + "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": 1.75}, + {"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, "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} + ] + }, "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": [ + {"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": 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}, + {"x": 13.75, "y": 1, "w": 1.25, "h": 2}, + + {"x": 0, "y": 3, "w": 1.25}, + {"x": 1.25, "y": 3}, + {"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}, + {"x": 13.25, "y": 3, "w": 1.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} + ] + }, + "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} + ] } } } diff --git a/keyboards/gray_studio/space65/info.json b/keyboards/gray_studio/space65/info.json index 72674bdef69e..5bd848ddcc6a 100644 --- a/keyboards/gray_studio/space65/info.json +++ b/keyboards/gray_studio/space65/info.json @@ -1,16 +1,241 @@ { - "keyboard_name": "Gray Studio Space65", - "url": "", - "maintainer": "qmk", - "width": 16, - "height": 5, + "keyboard_name": "Gray Studio Space65", + "url": "", + "maintainer": "qmk", + "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, "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":1.25}, {"x":1.25, "y":3}, {"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":2.25}, {"x":6, "y":4, "w":1.25}, {"x":7.25, "y":4, "w":2.75}, {"x":10, "y":4, "w":1.25}, {"x":11.25, "y":4, "w":1.25}, {"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}, + {"x": 14, "y": 0}, + {"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": 1.25}, + {"x": 1.25, "y": 3}, + {"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": 2.25}, + {"x": 6, "y": 4, "w": 1.25}, + {"x": 7.25, "y": 4, "w": 2.75}, + {"x": 10, "y": 4, "w": 1.25}, + {"x": 11.25, "y": 4, "w": 1.25}, + + {"x": 13, "y": 4}, + {"x": 14, "y": 4}, + {"x": 15, "y": 4} + ] + }, "LAYOUT_65_ansi_blocker": { - "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, "w":1.25}, {"x":11.25, "y":4, "w":1.25}, {"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, "w": 1.25}, + {"x": 11.25, "y": 4, "w": 1.25}, + + {"x": 13, "y": 4}, + {"x": 14, "y": 4}, + {"x": 15, "y": 4} + ] + }, + "LAYOUT_65_iso_blocker": { + "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": 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}, + {"x": 13.75, "y": 1, "w": 1.25, "h": 2}, + {"x": 15, "y": 2}, + + {"x": 0, "y": 3, "w": 1.25}, + {"x": 1.25, "y": 3}, + {"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, "w": 1.25}, + {"x": 11.25, "y": 4, "w": 1.25}, + {"x": 13, "y": 4}, + {"x": 14, "y": 4}, + {"x": 15, "y": 4} + ] } } } diff --git a/keyboards/handwired/k_numpad17/info.json b/keyboards/handwired/k_numpad17/info.json new file mode 100644 index 000000000000..65bc57d7866c --- /dev/null +++ b/keyboards/handwired/k_numpad17/info.json @@ -0,0 +1,34 @@ +{ + "keyboard_name": "K-Numpad17", + "url": "", + "maintainer": "qmk", + "width": 4, + "height": 5, + "layouts": { + "LAYOUT_numpad_5x4": { + "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} + ] + } + } +} diff --git a/keyboards/handwired/lovelive9/info.json b/keyboards/handwired/lovelive9/info.json index 4f81d321d9e9..fffeb342d389 100644 --- a/keyboards/handwired/lovelive9/info.json +++ b/keyboards/handwired/lovelive9/info.json @@ -1,12 +1,22 @@ { - "keyboard_name": "lovelive9", - "url": "https://github.com/ginjake", - "maintainer": "ginjake", - "width": 9, - "height": 1, - "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}] + "keyboard_name": "lovelive9", + "url": "https://github.com/ginjake", + "maintainer": "ginjake", + "width": 9, + "height": 4.5, + "layouts": { + "LAYOUT": { + "layout": [ + {"x": 0, "y": 0}, + {"x": 0.5, "y": 1.25}, + {"x": 1.5, "y": 2.5}, + {"x": 2.75, "y": 3.25}, + {"x": 4, "y": 3.5}, + {"x": 5.25, "y": 3.25}, + {"x": 6.5, "y": 2.5}, + {"x": 7.5, "y": 1.25}, + {"x": 8, "y": 0} + ] + } } - } } diff --git a/keyboards/hineybush/h10/info.json b/keyboards/hineybush/h10/info.json index b08c407c3102..a8d160db53af 100644 --- a/keyboards/hineybush/h10/info.json +++ b/keyboards/hineybush/h10/info.json @@ -6,7 +6,224 @@ "height": 7.5, "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": [ + {"x": 0, "y": 0}, + {"x": 1, "y": 0}, + {"x": 2, "y": 0}, + {"x": 3, "y": 0}, + + {"x": 0, "y": 1.25}, + {"x": 1, "y": 1.25}, + {"x": 2, "y": 1.25}, + {"x": 3, "y": 1.25}, + + {"x": 0, "y": 2.25}, + {"x": 1, "y": 2.25}, + {"x": 2, "y": 2.25}, + {"x": 3, "y": 2.25}, + + {"x": 0, "y": 3.25}, + {"x": 1, "y": 3.25}, + {"x": 2, "y": 3.25}, + {"x": 3, "y": 3.25}, + + {"x": 0, "y": 4.25}, + {"x": 1, "y": 4.25}, + {"x": 2, "y": 4.25}, + {"x": 3, "y": 4.25}, + + {"x": 0, "y": 5.25}, + {"x": 1, "y": 5.25}, + {"x": 2, "y": 5.25}, + {"x": 3, "y": 5.25} + ] + }, + "LAYOUT_numpad_6x4": { + "layout": [ + {"x": 0, "y": 0}, + {"x": 1, "y": 0}, + {"x": 2, "y": 0}, + {"x": 3, "y": 0}, + + {"x": 0, "y": 1.25}, + {"x": 1, "y": 1.25}, + {"x": 2, "y": 1.25}, + {"x": 3, "y": 1.25}, + + {"x": 0, "y": 2.25}, + {"x": 1, "y": 2.25}, + {"x": 2, "y": 2.25}, + + {"x": 0, "y": 3.25}, + {"x": 1, "y": 3.25}, + {"x": 2, "y": 3.25}, + {"x": 3, "y": 2.25, "h": 2}, + + {"x": 0, "y": 4.25}, + {"x": 1, "y": 4.25}, + {"x": 2, "y": 4.25}, + + {"x": 0, "y": 5.25, "w": 2}, + {"x": 2, "y": 5.25}, + {"x": 3, "y": 4.25, "h": 2} + ] + }, + "LAYOUT_split_plus": { + "layout": [ + {"x": 0, "y": 0}, + {"x": 1, "y": 0}, + {"x": 2, "y": 0}, + {"x": 3, "y": 0}, + + {"x": 0, "y": 1.25}, + {"x": 1, "y": 1.25}, + {"x": 2, "y": 1.25}, + {"x": 3, "y": 1.25}, + + {"x": 0, "y": 2.25}, + {"x": 1, "y": 2.25}, + {"x": 2, "y": 2.25}, + {"x": 3, "y": 2.25}, + + {"x": 0, "y": 3.25}, + {"x": 1, "y": 3.25}, + {"x": 2, "y": 3.25}, + {"x": 3, "y": 3.25}, + + {"x": 0, "y": 4.25}, + {"x": 1, "y": 4.25}, + {"x": 2, "y": 4.25}, + + {"x": 0, "y": 5.25, "w": 2}, + {"x": 2, "y": 5.25}, + {"x": 3, "y": 4.25, "h": 2} + ] + }, + "LAYOUT_split_zero": { + "layout": [ + {"x": 0, "y": 0}, + {"x": 1, "y": 0}, + {"x": 2, "y": 0}, + {"x": 3, "y": 0}, + + {"x": 0, "y": 1.25}, + {"x": 1, "y": 1.25}, + {"x": 2, "y": 1.25}, + {"x": 3, "y": 1.25}, + + {"x": 0, "y": 2.25}, + {"x": 1, "y": 2.25}, + {"x": 2, "y": 2.25}, + + {"x": 0, "y": 3.25}, + {"x": 1, "y": 3.25}, + {"x": 2, "y": 3.25}, + {"x": 3, "y": 2.25, "h": 2}, + + {"x": 0, "y": 4.25}, + {"x": 1, "y": 4.25}, + {"x": 2, "y": 4.25}, + + {"x": 0, "y": 5.25}, + {"x": 1, "y": 5.25}, + {"x": 2, "y": 5.25}, + {"x": 3, "y": 4.25, "h": 2} + ] + }, + "LAYOUT_split_enter": { + "layout": [ + {"x": 0, "y": 0}, + {"x": 1, "y": 0}, + {"x": 2, "y": 0}, + {"x": 3, "y": 0}, + + {"x": 0, "y": 1.25}, + {"x": 1, "y": 1.25}, + {"x": 2, "y": 1.25}, + {"x": 3, "y": 1.25}, + + {"x": 0, "y": 2.25}, + {"x": 1, "y": 2.25}, + {"x": 2, "y": 2.25}, + + {"x": 0, "y": 3.25}, + {"x": 1, "y": 3.25}, + {"x": 2, "y": 3.25}, + {"x": 3, "y": 2.25, "h": 2}, + + {"x": 0, "y": 4.25}, + {"x": 1, "y": 4.25}, + {"x": 2, "y": 4.25}, + {"x": 3, "y": 4.25}, + + {"x": 0, "y": 5.25, "w": 2}, + {"x": 2, "y": 5.25}, + {"x": 3, "y": 5.25} + ] + }, + "LAYOUT_split_enter_plus": { + "layout": [ + {"x": 0, "y": 0}, + {"x": 1, "y": 0}, + {"x": 2, "y": 0}, + {"x": 3, "y": 0}, + + {"x": 0, "y": 1.25}, + {"x": 1, "y": 1.25}, + {"x": 2, "y": 1.25}, + {"x": 3, "y": 1.25}, + + {"x": 0, "y": 2.25}, + {"x": 1, "y": 2.25}, + {"x": 2, "y": 2.25}, + {"x": 3, "y": 2.25}, + + {"x": 0, "y": 3.25}, + {"x": 1, "y": 3.25}, + {"x": 2, "y": 3.25}, + {"x": 3, "y": 3.25}, + + {"x": 0, "y": 4.25}, + {"x": 1, "y": 4.25}, + {"x": 2, "y": 4.25}, + {"x": 3, "y": 4.25}, + + {"x": 0, "y": 5.25, "w": 2}, + {"x": 2, "y": 5.25}, + {"x": 3, "y": 5.25} + ] + }, + "LAYOUT_split_zero_plus": { + "layout": [ + {"x": 0, "y": 0}, + {"x": 1, "y": 0}, + {"x": 2, "y": 0}, + {"x": 3, "y": 0}, + + {"x": 0, "y": 1.25}, + {"x": 1, "y": 1.25}, + {"x": 2, "y": 1.25}, + {"x": 3, "y": 1.25}, + + {"x": 0, "y": 2.25}, + {"x": 1, "y": 2.25}, + {"x": 2, "y": 2.25}, + {"x": 3, "y": 2.25}, + + {"x": 0, "y": 3.25}, + {"x": 1, "y": 3.25}, + {"x": 2, "y": 3.25}, + {"x": 3, "y": 3.25}, + + {"x": 0, "y": 4.25}, + {"x": 1, "y": 4.25}, + {"x": 2, "y": 4.25}, + + {"x": 0, "y": 5.25}, + {"x": 1, "y": 5.25}, + {"x": 2, "y": 5.25}, + {"x": 3, "y": 4.25, "h": 2} + ] } } } diff --git a/keyboards/hineybush/h60/info.json b/keyboards/hineybush/h60/info.json new file mode 100644 index 000000000000..803541a3e9f8 --- /dev/null +++ b/keyboards/hineybush/h60/info.json @@ -0,0 +1,356 @@ +{ + "keyboard_name": "h60", + "url": "", + "maintainer": "hineybush", + "width": 15, + "height": 5, + "layouts": { + "LAYOUT_60_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": 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} + ] + }, + "LAYOUT_60_ansi_split_bs_rshift": { + "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.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} + ] + }, + "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": 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} + ] + }, + "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_60_tsangan_split_rshift": { + "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": 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/maartenwut/plain60/info.json b/keyboards/maartenwut/plain60/info.json index 91eab457a876..140858986a53 100644 --- a/keyboards/maartenwut/plain60/info.json +++ b/keyboards/maartenwut/plain60/info.json @@ -1,414 +1,502 @@ { - "keyboard_name": "Plain60", - "url": "", - "maintainer": "maartenwut", - "width": 15, - "height": 5, - "layouts": { - "LAYOUT": { - "key_count": 65, - "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}, - {"label":"k0e", "x":14, "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":"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":"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":"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":"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":"k4c", "x":12.5, "y":4, "w":1.25}, - {"label":"k4d", "x":13.75, "y":4, "w":1.25} - ] - }, - "LAYOUT_60_ansi": { - "key_count": 61, - "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":"k0e", "x":13, "y":0, "w":2}, - {"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":"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":"k2d", "x":12.75, "y":2, "w":2.25}, - {"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":2.75}, - {"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":"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":"k4c", "x":12.5, "y":4, "w":1.25}, - {"label":"k4d", "x":13.75, "y":4, "w":1.25} - ] - }, - "LAYOUT_60_ansi_split_bs_rshift": { - "key_count": 63, - "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}, - {"label":"k0e", "x":14, "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":"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":"k2d", "x":12.75, "y":2, "w":2.25}, - {"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":"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":"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":"k4c", "x":12.5, "y":4, "w":1.25}, - {"label":"k4d", "x":13.75, "y":4, "w":1.25} - ] - }, - "LAYOUT_60_hhkb": { - "key_count": 60, - "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}, - {"label":"k0e", "x":14, "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":"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":"k2d", "x":12.75, "y":2, "w":2.25}, - {"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":"k41", "x":1.5, "y":4}, - {"label":"k42", "x":2.5, "y":4, "w":1.5}, - {"label":"k46", "x":4, "y":4, "w":7}, - {"label":"k4b", "x":11, "y":4, "w":1.5}, - {"label":"k4c", "x":12.5, "y":4} - ] - }, - "LAYOUT_60_iso": { - "key_count": 62, - "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":"k0e", "x":13, "y":0, "w":2}, - {"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":"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":"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":2.75}, - {"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":"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":"k4c", "x":12.5, "y":4, "w":1.25}, - {"label":"k4d", "x":13.75, "y":4, "w":1.25} - ] - }, - "LAYOUT_60_iso_split_bs_rshift": { - "key_count": 64, - "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}, - {"label":"k0e", "x":14, "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":"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":"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":"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":"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":"k4c", "x":12.5, "y":4, "w":1.25}, - {"label":"k4d", "x":13.75, "y":4, "w":1.25} - ] + "keyboard_name": "Plain60", + "url": "", + "maintainer": "maartenwut", + "width": 15, + "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": 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}, + {"x": 13.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}, + {"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.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} + ] + }, + "LAYOUT_60_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": 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} + ] + }, + "LAYOUT_60_ansi_split_bs_rshift": { + "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.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} + ] + }, + "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": 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} + ] + }, + "LAYOUT_60_iso": { + "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": 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}, + {"x": 13.75, "y": 1, "w": 1.25, "h": 2}, + + {"x": 0, "y": 3, "w": 1.25}, + {"x": 1.25, "y": 3}, + {"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} + ] + }, + "LAYOUT_60_iso_split_bs_rshift": { + "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": 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}, + {"x": 13.75, "y": 1, "w": 1.25, "h": 2}, + + {"x": 0, "y": 3, "w": 1.25}, + {"x": 1.25, "y": 3}, + {"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.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} + ] + }, + "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} + ] + } } - } } diff --git a/keyboards/smk60/info.json b/keyboards/smk60/info.json index f4a5e42bdadb..67903a21ab15 100644 --- a/keyboards/smk60/info.json +++ b/keyboards/smk60/info.json @@ -1,21 +1,426 @@ { - "keyboard_name": "rgb60", - "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": "SMK60", + "url": "", + "maintainer": "qmk", + "width": 15, + "height": 5, + "layouts": { + "LAYOUT_60_wkl": { + "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": 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_60_wkl_split_bs": { + "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_60_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": 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} + ] + }, + "LAYOUT_60_ansi_split_bs_shift": { + "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.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} + ] + }, + "LAYOUT_60_iso": { + "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": 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}, + {"x": 13.75, "y": 1, "w": 1.25, "h": 2}, + + {"x": 0, "y": 3, "w": 1.25}, + {"x": 1.25, "y": 3}, + {"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} + ] + }, + "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": 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} + ] + } + } } From 91efcfb43a6ec2d6f79c3d1386ba8379ed4e3041 Mon Sep 17 00:00:00 2001 From: Danilo de Klerk Date: Tue, 30 Jun 2020 19:14:42 +0200 Subject: [PATCH 301/930] Add layouts for split 3x5 and 3x6 keyboards (#9562) Co-authored-by: Ryan --- .../split_3x5_3/default_split_3x5_3/keymap.c | 24 +++++++ layouts/default/split_3x5_3/info.json | 56 +++++++++++++++++ layouts/default/split_3x5_3/layout.json | 12 ++++ layouts/default/split_3x5_3/readme.md | 5 ++ .../split_3x6_3/default_split_3x6_3/keymap.c | 24 +++++++ layouts/default/split_3x6_3/info.json | 62 +++++++++++++++++++ layouts/default/split_3x6_3/layout.json | 12 ++++ layouts/default/split_3x6_3/readme.md | 5 ++ 8 files changed, 200 insertions(+) create mode 100644 layouts/default/split_3x5_3/default_split_3x5_3/keymap.c create mode 100644 layouts/default/split_3x5_3/info.json create mode 100644 layouts/default/split_3x5_3/layout.json create mode 100644 layouts/default/split_3x5_3/readme.md create mode 100644 layouts/default/split_3x6_3/default_split_3x6_3/keymap.c create mode 100644 layouts/default/split_3x6_3/info.json create mode 100644 layouts/default/split_3x6_3/layout.json create mode 100644 layouts/default/split_3x6_3/readme.md diff --git a/layouts/default/split_3x5_3/default_split_3x5_3/keymap.c b/layouts/default/split_3x5_3/default_split_3x5_3/keymap.c new file mode 100644 index 000000000000..8dca359be995 --- /dev/null +++ b/layouts/default/split_3x5_3/default_split_3x5_3/keymap.c @@ -0,0 +1,24 @@ +#include QMK_KEYBOARD_H + +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 │ , │ . │ / │ + * └───┴───┴───┴───┴───┘       └───┴───┴───┴───┴───┘ + *           ┌───┐                   ┌───┐ + *           │GUI├───┐           ┌───┤Alt│ + *           └───┤Bsp├───┐   ┌───┤Ent├───┘ + *               └───┤   │   │   ├───┘ + *                   └───┘   └───┘ + */ + [0] = LAYOUT_split_3x5_3( + 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_LGUI, KC_BSPC, KC_SPC, KC_SPC, KC_ENT, KC_RALT + ) +}; diff --git a/layouts/default/split_3x5_3/info.json b/layouts/default/split_3x5_3/info.json new file mode 100644 index 000000000000..87e5c170d1e3 --- /dev/null +++ b/layouts/default/split_3x5_3/info.json @@ -0,0 +1,56 @@ +{ + "keyboard_name": "3x5+3 split layout", + "url": "", + "maintainer": "qmk", + "width": 12, + "height": 4.75, + "layouts": { + "LAYOUT_split_3x5_3": { + "layout": [ + {"x":0, "y":0.25}, + {"x":1, "y":0.125}, + {"x":2, "y":0}, + {"x":3, "y":0.125}, + {"x":4, "y":0.25}, + + {"x":7, "y":0.25}, + {"x":8, "y":0.125}, + {"x":9, "y":0}, + {"x":10, "y":0.125}, + {"x":11, "y":0.25}, + + {"x":0, "y":1.25}, + {"x":1, "y":1.125}, + {"x":2, "y":1}, + {"x":3, "y":1.125}, + {"x":4, "y":1.25}, + + {"x":7, "y":1.25}, + {"x":8, "y":1.125}, + {"x":9, "y":1}, + {"x":10, "y":1.125}, + {"x":11, "y":1.25}, + + {"x":0, "y":2.25}, + {"x":1, "y":2.125}, + {"x":2, "y":2}, + {"x":3, "y":2.125}, + {"x":4, "y":2.25}, + + {"x":7, "y":2.25}, + {"x":8, "y":2.125}, + {"x":9, "y":2}, + {"x":10, "y":2.125}, + {"x":11, "y":2.25}, + + {"x":2.5, "y":3.25}, + {"x":3.5, "y":3.5}, + {"x":4.5, "y":3.75}, + + {"x":6.5, "y":3.75}, + {"x":7.5, "y":3.5}, + {"x":8.5, "y":3.25} + ] + } + } +} diff --git a/layouts/default/split_3x5_3/layout.json b/layouts/default/split_3x5_3/layout.json new file mode 100644 index 000000000000..42bf03fd7af4 --- /dev/null +++ b/layouts/default/split_3x5_3/layout.json @@ -0,0 +1,12 @@ +[{x:2,a:7},"",{x:6},""], +[{y:-0.875,x:1},"",{x:1},"",{x:4},"",{x:1},""], +[{y:-0.875},"",{x:3},"",{x:2},"",{x:3},""], +[{y:-0.25,x:2},"",{x:6},""], +[{y:-0.875,x:1},"",{x:1},"",{x:4},"",{x:1},""], +[{y:-0.875},"",{x:3},"",{x:2},"",{x:3},""], +[{y:-0.25,x:2},"",{x:6},""], +[{y:-0.875,x:1},"",{x:1},"",{x:4},"",{x:1},""], +[{y:-0.875},"",{x:3},"",{x:2},"",{x:3},""], +[{x:2.5},"",{x:5},""], +[{y:-0.75,x:3.5},"",{x:3},""], +[{y:-0.75,x:4.5},"",{x:1},""] diff --git a/layouts/default/split_3x5_3/readme.md b/layouts/default/split_3x5_3/readme.md new file mode 100644 index 000000000000..dd73c69867c1 --- /dev/null +++ b/layouts/default/split_3x5_3/readme.md @@ -0,0 +1,5 @@ +# split_3x5_3 + + LAYOUT_split_3x5_3 + +Layout for split keyboards with 3x5 keys and three thumb keys per hand. Examples include the Minidox, Centromere Mini, and Gergoplex. diff --git a/layouts/default/split_3x6_3/default_split_3x6_3/keymap.c b/layouts/default/split_3x6_3/default_split_3x6_3/keymap.c new file mode 100644 index 000000000000..f014d88eb3a9 --- /dev/null +++ b/layouts/default/split_3x6_3/default_split_3x6_3/keymap.c @@ -0,0 +1,24 @@ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* + * ┌───┬───┬───┬───┬───┬───┐       ┌───┬───┬───┬───┬───┬───┐ + * │Tab│ Q │ W │ E │ R │ T │       │ Y │ U │ I │ O │ P │Bsp│ + * ├───┼───┼───┼───┼───┼───┤       ├───┼───┼───┼───┼───┼───┤ + * │Ctl│ A │ S │ D │ F │ G │       │ H │ J │ K │ L │ ; │ ' │ + * ├───┼───┼───┼───┼───┼───┤       ├───┼───┼───┼───┼───┼───┤ + * │Sft│ Z │ X │ C │ V │ B │       │ N │ M │ , │ . │ / │Sft│ + * └───┴───┴───┴───┴───┴───┘       └───┴───┴───┴───┴───┴───┘ + *               ┌───┐                   ┌───┐ + *               │GUI├───┐           ┌───┤Alt│ + *               └───┤Bsp├───┐   ┌───┤Ent├───┘ + *                   └───┤   │   │   ├───┘ + *                       └───┘   └───┘ + */ + [0] = LAYOUT_split_3x6_3( + 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_LGUI, KC_BSPC, KC_SPC, KC_SPC, KC_ENT, KC_RALT + ) +}; diff --git a/layouts/default/split_3x6_3/info.json b/layouts/default/split_3x6_3/info.json new file mode 100644 index 000000000000..b1ca28168bf0 --- /dev/null +++ b/layouts/default/split_3x6_3/info.json @@ -0,0 +1,62 @@ +{ + "keyboard_name": "3x6+3 split layout", + "url": "", + "maintainer": "qmk", + "width": 14, + "height": 4.75, + "layouts": { + "LAYOUT_split_3x6_3": { + "layout": [ + {"x":0, "y":0.25}, + {"x":1, "y":0.25}, + {"x":2, "y":0.125}, + {"x":3, "y":0}, + {"x":4, "y":0.125}, + {"x":5, "y":0.25}, + + {"x":8, "y":0.25}, + {"x":9, "y":0.125}, + {"x":10, "y":0}, + {"x":11, "y":0.125}, + {"x":12, "y":0.25}, + {"x":13, "y":0.25}, + + {"x":0, "y":1.25}, + {"x":1, "y":1.25}, + {"x":2, "y":1.125}, + {"x":3, "y":1}, + {"x":4, "y":1.125}, + {"x":5, "y":1.25}, + + {"x":8, "y":1.25}, + {"x":9, "y":1.125}, + {"x":10, "y":1}, + {"x":11, "y":1.125}, + {"x":12, "y":1.25}, + {"x":13, "y":1.25}, + + {"x":0, "y":2.25}, + {"x":1, "y":2.25}, + {"x":2, "y":2.125}, + {"x":3, "y":2}, + {"x":4, "y":2.125}, + {"x":5, "y":2.25}, + + {"x":8, "y":2.25}, + {"x":9, "y":2.125}, + {"x":10, "y":2}, + {"x":11, "y":2.125}, + {"x":12, "y":2.25}, + {"x":13, "y":2.25}, + + {"x":3.5, "y":3.25}, + {"x":4.5, "y":3.5}, + {"x":5.5, "y":3.75}, + + {"x":7.5, "y":3.75}, + {"x":8.5, "y":3.5}, + {"x":9.5, "y":3.25} + ] + } + } +} diff --git a/layouts/default/split_3x6_3/layout.json b/layouts/default/split_3x6_3/layout.json new file mode 100644 index 000000000000..c1256eed98a3 --- /dev/null +++ b/layouts/default/split_3x6_3/layout.json @@ -0,0 +1,12 @@ +[{x:3,a:7},"",{x:6},""], +[{y:-0.875,x:2},"",{x:1},"",{x:4},"",{x:1},""], +[{y:-0.875},"","",{x:3},"",{x:2},"",{x:3},"",""], +[{y:-0.25,x:3},"",{x:6},""], +[{y:-0.875,x:2},"",{x:1},"",{x:4},"",{x:1},""], +[{y:-0.875},"","",{x:3},"",{x:2},"",{x:3},"",""], +[{y:-0.25,x:3},"",{x:6},""], +[{y:-0.875,x:2},"",{x:1},"",{x:4},"",{x:1},""], +[{y:-0.875},"","",{x:3},"",{x:2},"",{x:3},"",""], +[{x:3.5},"",{x:5},""], +[{y:-0.75,x:4.5},"",{x:3},""], +[{y:-0.75,x:5.5},"",{x:1},""] diff --git a/layouts/default/split_3x6_3/readme.md b/layouts/default/split_3x6_3/readme.md new file mode 100644 index 000000000000..07d302da8d7e --- /dev/null +++ b/layouts/default/split_3x6_3/readme.md @@ -0,0 +1,5 @@ +# split_3x6_3 + + LAYOUT_split_3x6_3 + +Layout for split keyboards with 3x6 keys and three thumb keys per hand. Examples include the Crkbd and Centromere. From e9fa41631c816e7236210ac9fd9359c603c5ad5e Mon Sep 17 00:00:00 2001 From: siano Date: Tue, 30 Jun 2020 19:16:22 +0200 Subject: [PATCH 302/930] XD87 qmk info fixes (#9601) * Fixed `Nested layout macro detected. Matrix data not available!` * Updated info for XD87 * Layout fixes. --- keyboards/xd87/info.json | 3 +- keyboards/xd87/keymaps/mac_underglow/keymap.c | 6 ++-- keyboards/xd87/xd87.h | 32 +++++++++---------- 3 files changed, 22 insertions(+), 19 deletions(-) diff --git a/keyboards/xd87/info.json b/keyboards/xd87/info.json index 488f31927533..59ec05107e48 100644 --- a/keyboards/xd87/info.json +++ b/keyboards/xd87/info.json @@ -1,6 +1,7 @@ { "keyboard_name": "XD87", - "url": "", + "manufacturer": "KPrepublic", + "url": "https://kprepublic.com/products/hot-swappable-xd87-hs-xd87-custom-mechanical-keyboard-kit80-supports-tkg-tools-support-underglow-rgb-pcb-programmed-gh80-kle", "maintainer": "qmk", "width": 18.25, "height": 6.25, diff --git a/keyboards/xd87/keymaps/mac_underglow/keymap.c b/keyboards/xd87/keymaps/mac_underglow/keymap.c index e5bdebab5cf9..db27e5ea3bd0 100755 --- a/keyboards/xd87/keymaps/mac_underglow/keymap.c +++ b/keyboards/xd87/keymaps/mac_underglow/keymap.c @@ -22,7 +22,9 @@ 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_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_RALT, MO(1),KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT ), + 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_ansi( RESET, EEP_RST, DEBUG, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 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, @@ -30,4 +32,4 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TRNS, KC_TRNS, RGB_VAD, RGB_RMOD,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, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 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/xd87/xd87.h b/keyboards/xd87/xd87.h index 2ed47fe97673..0dec1f6a14e3 100644 --- a/keyboards/xd87/xd87.h +++ b/keyboards/xd87/xd87.h @@ -42,14 +42,14 @@ 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, K58, K5A, K5B, K5C, K5D, K5E, K5F, K5G \ -) LAYOUT_all( \ - K00, KC_NO, 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, KC_NO, 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, \ - 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, K58, K5A, K5B, K5C, K5D, K5E, K5F, K5G \ -) +) { \ + {K00, KC_NO, 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, K4C, KC_NO, KC_NO, K4F, KC_NO }, \ + {K50, K51, K52, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, K58, KC_NO, K5A, K5B, K5C, K5D, K5E, K5F, K5G } \ +} #define LAYOUT_tkl_iso( \ K00, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, K0F, K0G, \ @@ -58,13 +58,13 @@ 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, K4F, \ K50, K51, K52, K58, K5A, K5B, K5C, K5D, K5E, K5F, K5G \ -) LAYOUT_all( \ - K00, KC_NO, 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, KC_NO, 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, \ - K40, K41, K42, K43, K44, K45, K46, K47, K48, K49, K4A, K4B, K4C, KC_NO, KC_NO, K4F, KC_NO, \ - K50, K51, K52, KC_NO, K58, K5A, K5B, K5C, K5D, K5E, K5F, K5G \ -) +) { \ + {K00, KC_NO, 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, K4C, KC_NO, KC_NO, K4F, KC_NO }, \ + {K50, K51, K52, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, K58, KC_NO, K5A, K5B, K5C, K5D, K5E, K5F, K5G } \ +} #endif From 6600f32d355b7028854f537a5e0ee9d352f539f0 Mon Sep 17 00:00:00 2001 From: Xelus22 <17491233+Xelus22@users.noreply.github.com> Date: Tue, 30 Jun 2020 17:27:24 +0000 Subject: [PATCH 303/930] Add VIA support on XiuDi (XD) keyboards (#8829) Co-authored-by: Ryan Co-authored-by: Erovia --- keyboards/xd004/v1/config.h | 4 +- keyboards/xd60/keymaps/via/keymap.c | 35 ++++++++++++ keyboards/xd60/keymaps/via/readme.md | 1 + keyboards/xd60/keymaps/via/rules.mk | 1 + keyboards/xd60/rev2/config.h | 2 +- keyboards/xd60/rev3/config.h | 2 +- keyboards/xd68/config.h | 2 +- keyboards/xd68/keymaps/via/keymap.c | 61 +++++++++++++++++++++ keyboards/xd68/keymaps/via/readme.md | 1 + keyboards/xd68/keymaps/via/rules.mk | 1 + keyboards/xd75/config.h | 7 +-- keyboards/xd75/keymaps/via/keymap.c | 79 ++++++++++++++++++++++++++++ keyboards/xd75/keymaps/via/readme.md | 1 + keyboards/xd75/keymaps/via/rules.mk | 1 + keyboards/xd84/config.h | 4 +- keyboards/xd84/keymaps/via/keymap.c | 68 ++++++++++++++++++++++++ keyboards/xd84/keymaps/via/readme.md | 1 + keyboards/xd84/keymaps/via/rules.mk | 1 + keyboards/xd87/config.h | 4 +- keyboards/xd87/keymaps/via/keymap.c | 50 ++++++++++++++++++ keyboards/xd87/keymaps/via/readme.md | 1 + keyboards/xd87/keymaps/via/rules.mk | 1 + keyboards/xd96/config.h | 4 +- keyboards/xd96/keymaps/via/keymap.c | 68 ++++++++++++++++++++++++ keyboards/xd96/keymaps/via/readme.md | 1 + keyboards/xd96/keymaps/via/rules.mk | 1 + 26 files changed, 386 insertions(+), 16 deletions(-) create mode 100644 keyboards/xd60/keymaps/via/keymap.c create mode 100644 keyboards/xd60/keymaps/via/readme.md create mode 100644 keyboards/xd60/keymaps/via/rules.mk create mode 100644 keyboards/xd68/keymaps/via/keymap.c create mode 100644 keyboards/xd68/keymaps/via/readme.md create mode 100644 keyboards/xd68/keymaps/via/rules.mk create mode 100644 keyboards/xd75/keymaps/via/keymap.c create mode 100644 keyboards/xd75/keymaps/via/readme.md create mode 100644 keyboards/xd75/keymaps/via/rules.mk create mode 100644 keyboards/xd84/keymaps/via/keymap.c create mode 100644 keyboards/xd84/keymaps/via/readme.md create mode 100644 keyboards/xd84/keymaps/via/rules.mk create mode 100644 keyboards/xd87/keymaps/via/keymap.c create mode 100644 keyboards/xd87/keymaps/via/readme.md create mode 100644 keyboards/xd87/keymaps/via/rules.mk create mode 100644 keyboards/xd96/keymaps/via/keymap.c create mode 100644 keyboards/xd96/keymaps/via/readme.md create mode 100644 keyboards/xd96/keymaps/via/rules.mk diff --git a/keyboards/xd004/v1/config.h b/keyboards/xd004/v1/config.h index a141137e98b7..f7a262d4c071 100644 --- a/keyboards/xd004/v1/config.h +++ b/keyboards/xd004/v1/config.h @@ -26,7 +26,7 @@ where some things are disabled to save space as well. #include "config_common.h" /* USB Device descriptor parameter */ -#define VENDOR_ID 0xCDCD +#define VENDOR_ID 0x7844 // "XD" #define PRODUCT_ID 0x0404 #define DEVICE_VER 0x0001 // Note: unsure about manufacturer @@ -77,4 +77,4 @@ further optimizations can be done on that side. // #define NO_ACTION_ONESHOT // 462 bytes <- this needs to be un-commented out if Link Time Optimization is disabled, otherwise file is too large // The two below are implicit since we use LINK_TIME_OPTIMIZATION_ENABLE (in rules.mk) // #define NO_ACTION_MACRO -// #define NO_ACTION_FUNCTION \ No newline at end of file +// #define NO_ACTION_FUNCTION diff --git a/keyboards/xd60/keymaps/via/keymap.c b/keyboards/xd60/keymaps/via/keymap.c new file mode 100644 index 000000000000..9685737b46d3 --- /dev/null +++ b/keyboards/xd60/keymaps/via/keymap.c @@ -0,0 +1,35 @@ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + // 0: Base 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_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_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_RSFT, KC_UP, KC_DEL, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RGUI, MO(1), KC_LEFT, KC_DOWN, KC_RIGHT), + + // 1: Function Layer + [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, KC_F13, KC_F14, + KC_NO, KC_WH_U, KC_UP, KC_WH_D, KC_BSPC,KC_HOME,KC_CALC,KC_NO, KC_INS, KC_NO, KC_PSCR, KC_SLCK, KC_PAUS, KC_DEL, + KC_NO, KC_LEFT, KC_DOWN, KC_RIGHT,KC_DEL, KC_END, KC_PGDN,KC_NO, KC_NO, KC_NO, KC_HOME, KC_PGUP, KC_NO, KC_ENT, + KC_LSFT, KC_NO, KC_NO, KC_APP, BL_STEP,KC_NO, KC_NO, KC_VOLD,KC_VOLU,KC_MUTE, KC_END, KC_PGDN, KC_RSFT, KC_PGUP, KC_INS, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RGUI, _______, KC_HOME, KC_PGDOWN,KC_END), + + [2] = LAYOUT_all( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______), + + [3] = LAYOUT_all( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______), + +}; diff --git a/keyboards/xd60/keymaps/via/readme.md b/keyboards/xd60/keymaps/via/readme.md new file mode 100644 index 000000000000..27cb965eba9e --- /dev/null +++ b/keyboards/xd60/keymaps/via/readme.md @@ -0,0 +1 @@ +# The VIA default layout diff --git a/keyboards/xd60/keymaps/via/rules.mk b/keyboards/xd60/keymaps/via/rules.mk new file mode 100644 index 000000000000..1e5b99807cb7 --- /dev/null +++ b/keyboards/xd60/keymaps/via/rules.mk @@ -0,0 +1 @@ +VIA_ENABLE = yes diff --git a/keyboards/xd60/rev2/config.h b/keyboards/xd60/rev2/config.h index 22aa95b291a8..ef16083ee6d8 100644 --- a/keyboards/xd60/rev2/config.h +++ b/keyboards/xd60/rev2/config.h @@ -20,7 +20,7 @@ along with this program. If not, see . #include "config_common.h" /* USB Device descriptor parameter */ -#define VENDOR_ID 0xFEED +#define VENDOR_ID 0x7844 // "XD" #define PRODUCT_ID 0x6060 #define DEVICE_VER 0x0001 #define MANUFACTURER XIUDI diff --git a/keyboards/xd60/rev3/config.h b/keyboards/xd60/rev3/config.h index 4628b5a0c821..1efa67cccdcd 100644 --- a/keyboards/xd60/rev3/config.h +++ b/keyboards/xd60/rev3/config.h @@ -20,7 +20,7 @@ along with this program. If not, see . #include "config_common.h" /* USB Device descriptor parameter */ -#define VENDOR_ID 0xFEED +#define VENDOR_ID 0x7844 // "XD" #define PRODUCT_ID 0x6363 #define DEVICE_VER 0x0001 #define MANUFACTURER XIUDI diff --git a/keyboards/xd68/config.h b/keyboards/xd68/config.h index c86bb56225d6..9fd4f360b68f 100644 --- a/keyboards/xd68/config.h +++ b/keyboards/xd68/config.h @@ -20,7 +20,7 @@ along with this program. If not, see . #include "config_common.h" /* USB Device descriptor parameter */ -#define VENDOR_ID 0xCDCD +#define VENDOR_ID 0x7844 // "XD" #define PRODUCT_ID 0x6868 #define DEVICE_VER 0x0001 #define MANUFACTURER xiudi diff --git a/keyboards/xd68/keymaps/via/keymap.c b/keyboards/xd68/keymaps/via/keymap.c new file mode 100644 index 000000000000..6ffed7750b46 --- /dev/null +++ b/keyboards/xd68/keymaps/via/keymap.c @@ -0,0 +1,61 @@ +#include QMK_KEYBOARD_H + +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 | + * `----------------------------------------------------------------' + */ + [0] = 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(1), 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 | | | | | + * `----------------------------------------------------------------' + */ + [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_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 + ), + + [2] = LAYOUT_65_ansi( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + + [3] = LAYOUT_65_ansi( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), +}; diff --git a/keyboards/xd68/keymaps/via/readme.md b/keyboards/xd68/keymaps/via/readme.md new file mode 100644 index 000000000000..27cb965eba9e --- /dev/null +++ b/keyboards/xd68/keymaps/via/readme.md @@ -0,0 +1 @@ +# The VIA default layout diff --git a/keyboards/xd68/keymaps/via/rules.mk b/keyboards/xd68/keymaps/via/rules.mk new file mode 100644 index 000000000000..1e5b99807cb7 --- /dev/null +++ b/keyboards/xd68/keymaps/via/rules.mk @@ -0,0 +1 @@ +VIA_ENABLE = yes diff --git a/keyboards/xd75/config.h b/keyboards/xd75/config.h index b3a1882becd1..57ca4001fff0 100644 --- a/keyboards/xd75/config.h +++ b/keyboards/xd75/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 0xCDCD +#define VENDOR_ID 0x7844 // "XD" #define PRODUCT_ID 0x7575 #define DEVICE_VER 0x0001 #define MANUFACTURER xiudi @@ -183,5 +182,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/xd75/keymaps/via/keymap.c b/keyboards/xd75/keymaps/via/keymap.c new file mode 100644 index 000000000000..32cf102d464c --- /dev/null +++ b/keyboards/xd75/keymaps/via/keymap.c @@ -0,0 +1,79 @@ +/* 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 . + */ +#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 | BACKSP | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------| + * | TAB | Q | W | E | R | T | [ | \ | ] | Y | U | I | O | P | ' | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------+--------| + * | CAP LK | A | S | D | F | G | HOME | DEL | PG UP | H | J | K | L | ; | ENTER | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------------------------+--------| + * | LSHIFT | Z | X | C | V | B | END | UP | PG DN | N | M | , | . | / | RSHIFT | + * |--------+--------+--------+--------+--------+-----------------+--------+--------+--------+--------+-----------------+--------+--------| + * | LCTRL | LGUI | LALT | FN | SPACE | SPACE | LEFT | DOWN | RIGHT | SPACE | SPACE | FN | RALT | RGUI | RCTRL | + * '--------------------------------------------------------------------------------------------------------------------------------------' + */ + + [0] = LAYOUT_ortho_5x15( /* QWERTY */ + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_MINS, KC_GRV, 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_BSLS, 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_DEL, 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_UP, KC_PGDN, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, + KC_LCTL, KC_LGUI, KC_LALT, MO(1), KC_SPC, KC_SPC, KC_LEFT, KC_DOWN, KC_RGHT, KC_SPC, KC_SPC, MO(1), KC_RALT, KC_RGUI, KC_RCTL + ), + +/* FUNCTION + * .--------------------------------------------------------------------------------------------------------------------------------------. + * | F1 | F2 | F3 | F4 | F5 | F6 | NUM LK | P/ | P* | F7 | F8 | F9 | F10 | F11 | F12 | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + * | SELECT | CALC | MYCOMP | MAIL | RGB HD | RGB HI | P7 | P8 | P9 | - | | | PR SCR | SCR LK | PAUSE | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + * | PREV | PLAY | NEXT | STOP | RGB SD | RGB SI | P4 | P5 | P6 | + | | RESET | | | | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + * | VOL- | MUTE | VOL+ | APP | RGB VD | RGB VI | P1 | P2 | P3 | PENT | | | | | | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + * | | | RGB TG | FN | RGB RMD| RGB MD | P0 | | P. | PENT | PENT | FN | | | | + * '--------------------------------------------------------------------------------------------------------------------------------------' + */ + + [1] = LAYOUT_ortho_5x15( /* FUNCTION */ + KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_NLCK, KC_SLSH, KC_ASTR, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, + KC_MSEL, KC_CALC, KC_MYCM, KC_MAIL, RGB_HUD, RGB_HUI, KC_P7, KC_P8, KC_P9, KC_MINS, _______, _______, KC_PSCR, KC_SLCK, KC_PAUS, + KC_MPRV, KC_MPLY, KC_MNXT, KC_MSTP, RGB_SAD, RGB_SAI, KC_P4, KC_P5, KC_P6, KC_PLUS, _______, RESET, _______, _______, _______, + KC_VOLD, KC_MUTE, KC_VOLU, KC_APP, RGB_VAD, RGB_VAI, KC_P1, KC_P2, KC_P3, KC_PENT, _______, _______, _______, _______, _______, + _______, _______, RGB_TOG, _______, RGB_RMOD,RGB_MOD, KC_P0, _______, KC_PDOT, KC_PENT, KC_PENT, _______, _______, _______, _______ + ), + + [2] = LAYOUT_ortho_5x15( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + + [3] = LAYOUT_ortho_5x15( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), +}; diff --git a/keyboards/xd75/keymaps/via/readme.md b/keyboards/xd75/keymaps/via/readme.md new file mode 100644 index 000000000000..27cb965eba9e --- /dev/null +++ b/keyboards/xd75/keymaps/via/readme.md @@ -0,0 +1 @@ +# The VIA default layout diff --git a/keyboards/xd75/keymaps/via/rules.mk b/keyboards/xd75/keymaps/via/rules.mk new file mode 100644 index 000000000000..1e5b99807cb7 --- /dev/null +++ b/keyboards/xd75/keymaps/via/rules.mk @@ -0,0 +1 @@ +VIA_ENABLE = yes diff --git a/keyboards/xd84/config.h b/keyboards/xd84/config.h index 1ff5e1cfd7cd..2a77db68a417 100644 --- a/keyboards/xd84/config.h +++ b/keyboards/xd84/config.h @@ -19,8 +19,8 @@ #include "config_common.h" /* USB Device descriptor parameter */ -#define VENDOR_ID 0xFEED -#define PRODUCT_ID 0x4084 +#define VENDOR_ID 0x7844 // "XD" +#define PRODUCT_ID 0x8484 #define DEVICE_VER 0x0001 #define MANUFACTURER KPrepublic #define PRODUCT XD84 diff --git a/keyboards/xd84/keymaps/via/keymap.c b/keyboards/xd84/keymaps/via/keymap.c new file mode 100644 index 000000000000..50f54500f480 --- /dev/null +++ b/keyboards/xd84/keymaps/via/keymap.c @@ -0,0 +1,68 @@ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [0] = LAYOUT_75_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_F13, 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_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT +/* └───────────┴───────────┴───────────┴───────────────────────────────────────────────────────────────┴─────────┴─────────┴─────────┴─────────┴─────────┴─────────┘ */ + ), + + [1] = LAYOUT_75_ansi( +/* ┌─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┐ */ + _______, BL_TOGG, BL_STEP, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, +/* ├─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┴─────────┼─────────┤ */ + _______, RGB_TOG, RGB_MOD, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, +/* ├─────────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬──────────────┼─────────┤ */ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, +/* ├──────────────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──────────────├─────────┤ */ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, +/* ├─────────────────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴───────────┬─────────┼─────────┤ */ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, +/* ├───────────┬─────────┴─┬───────┴───┬─────┴─────────┴─────────┴─────────┴─────────┴─────────┴───────┬─┴───────┬─┴───────┬─┴───────┬─────────┼─────────┼─────────┤ */ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ +/* └───────────┴───────────┴───────────┴───────────────────────────────────────────────────────────────┴─────────┴─────────┴─────────┴─────────┴─────────┴─────────┘ */ + ), + + [2] = LAYOUT_75_ansi( +/* ┌─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┐ */ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, +/* ├─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┴─────────┼─────────┤ */ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, +/* ├─────────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬──────────────┼─────────┤ */ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, +/* ├──────────────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──────────────├─────────┤ */ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, +/* ├─────────────────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴───────────┬─────────┼─────────┤ */ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, +/* ├───────────┬─────────┴─┬───────┴───┬─────┴─────────┴─────────┴─────────┴─────────┴─────────┴───────┬─┴───────┬─┴───────┬─┴───────┬─────────┼─────────┼─────────┤ */ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ +/* └───────────┴───────────┴───────────┴───────────────────────────────────────────────────────────────┴─────────┴─────────┴─────────┴─────────┴─────────┴─────────┘ */ + ), + + [3] = LAYOUT_75_ansi( +/* ┌─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┐ */ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, +/* ├─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┴─────────┼─────────┤ */ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, +/* ├─────────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬──────────────┼─────────┤ */ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, +/* ├──────────────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──────────────├─────────┤ */ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, +/* ├─────────────────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴───────────┬─────────┼─────────┤ */ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, +/* ├───────────┬─────────┴─┬───────┴───┬─────┴─────────┴─────────┴─────────┴─────────┴─────────┴───────┬─┴───────┬─┴───────┬─┴───────┬─────────┼─────────┼─────────┤ */ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ +/* └───────────┴───────────┴───────────┴───────────────────────────────────────────────────────────────┴─────────┴─────────┴─────────┴─────────┴─────────┴─────────┘ */ + ), +}; diff --git a/keyboards/xd84/keymaps/via/readme.md b/keyboards/xd84/keymaps/via/readme.md new file mode 100644 index 000000000000..27cb965eba9e --- /dev/null +++ b/keyboards/xd84/keymaps/via/readme.md @@ -0,0 +1 @@ +# The VIA default layout diff --git a/keyboards/xd84/keymaps/via/rules.mk b/keyboards/xd84/keymaps/via/rules.mk new file mode 100644 index 000000000000..1e5b99807cb7 --- /dev/null +++ b/keyboards/xd84/keymaps/via/rules.mk @@ -0,0 +1 @@ +VIA_ENABLE = yes diff --git a/keyboards/xd87/config.h b/keyboards/xd87/config.h index e943dcbeab5b..1caaa558444d 100644 --- a/keyboards/xd87/config.h +++ b/keyboards/xd87/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 0x7844 // "XD" +#define PRODUCT_ID 0x8787 #define DEVICE_VER 0x0001 #define MANUFACTURER KP Republic #define PRODUCT XD87 TKL diff --git a/keyboards/xd87/keymaps/via/keymap.c b/keyboards/xd87/keymaps/via/keymap.c new file mode 100644 index 000000000000..35d8da47972f --- /dev/null +++ b/keyboards/xd87/keymaps/via/keymap.c @@ -0,0 +1,50 @@ +/* Copyright 2019 Louwii + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public 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( + 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 ), + + [1] = LAYOUT_tkl_ansi( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ ), + + [2] = LAYOUT_tkl_ansi( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ ), + + [3] = LAYOUT_tkl_ansi( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ ) +}; diff --git a/keyboards/xd87/keymaps/via/readme.md b/keyboards/xd87/keymaps/via/readme.md new file mode 100644 index 000000000000..27cb965eba9e --- /dev/null +++ b/keyboards/xd87/keymaps/via/readme.md @@ -0,0 +1 @@ +# The VIA default layout diff --git a/keyboards/xd87/keymaps/via/rules.mk b/keyboards/xd87/keymaps/via/rules.mk new file mode 100644 index 000000000000..1e5b99807cb7 --- /dev/null +++ b/keyboards/xd87/keymaps/via/rules.mk @@ -0,0 +1 @@ +VIA_ENABLE = yes diff --git a/keyboards/xd96/config.h b/keyboards/xd96/config.h index b0fa47795231..799b835df037 100644 --- a/keyboards/xd96/config.h +++ b/keyboards/xd96/config.h @@ -19,8 +19,8 @@ #include "config_common.h" /* USB Device descriptor parameter */ -#define VENDOR_ID 0xFEED -#define PRODUCT_ID 0x4096 +#define VENDOR_ID 0x7844 // "XD" +#define PRODUCT_ID 0x9696 #define DEVICE_VER 0x0001 #define MANUFACTURER KPrepublic #define PRODUCT XD96 diff --git a/keyboards/xd96/keymaps/via/keymap.c b/keyboards/xd96/keymaps/via/keymap.c new file mode 100644 index 000000000000..092fc9dfea49 --- /dev/null +++ b/keyboards/xd96/keymaps/via/keymap.c @@ -0,0 +1,68 @@ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [0] = LAYOUT_96_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_INS, KC_DEL, KC_HOME, KC_END, 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_BSPC, 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_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_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_LCTL, KC_LGUI, KC_LALT, KC_SPC, MO(1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT, KC_P0, KC_PDOT, KC_PENT +/* └───────────┴───────────┴───────────┴───────────────────────────────────────────────────────────────┴──────────────┴──────────────┴─────────┴─────────┴─────────┴─────────┴─────────┴─────────┘ */ + ), + + [1] = LAYOUT_96_ansi( +/* ┌─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┐ */ + _______, BL_TOGG, BL_STEP, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, +/* ├─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┴─────────┼─────────┼─────────┼─────────┼─────────┤ */ + _______, RGB_TOG, RGB_MOD, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, +/* ├─────────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬──────────────┼─────────┼─────────┼─────────┼─────────┤ */ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, +/* ├──────────────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──────────────├─────────├─────────├─────────┼ ┤ */ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, +/* ├─────────────────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴───────────┬─────────┼─────────┼─────────┼─────────┼─────────┤ */ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, +/* ├───────────┬─────────┴─┬───────┴───┬─────┴─────────┴─────────┴─────────┴─────────┴─────────┴───────┬─┴─────────┴──┬──────┴───────┬─────────┼─────────┼─────────┼─────────┼─────────┼ ┤ */ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ +/* └───────────┴───────────┴───────────┴───────────────────────────────────────────────────────────────┴──────────────┴──────────────┴─────────┴─────────┴─────────┴─────────┴─────────┴─────────┘ */ + ), + + [2] = LAYOUT_96_ansi( +/* ┌─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┐ */ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, +/* ├─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┴─────────┼─────────┼─────────┼─────────┼─────────┤ */ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, +/* ├─────────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬──────────────┼─────────┼─────────┼─────────┼─────────┤ */ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, +/* ├──────────────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──────────────├─────────├─────────├─────────┼ ┤ */ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, +/* ├─────────────────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴───────────┬─────────┼─────────┼─────────┼─────────┼─────────┤ */ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, +/* ├───────────┬─────────┴─┬───────┴───┬─────┴─────────┴─────────┴─────────┴─────────┴─────────┴───────┬─┴─────────┴──┬──────┴───────┬─────────┼─────────┼─────────┼─────────┼─────────┼ ┤ */ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ +/* └───────────┴───────────┴───────────┴───────────────────────────────────────────────────────────────┴──────────────┴──────────────┴─────────┴─────────┴─────────┴─────────┴─────────┴─────────┘ */ + ), + + [3] = LAYOUT_96_ansi( +/* ┌─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┐ */ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, +/* ├─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┴─────────┼─────────┼─────────┼─────────┼─────────┤ */ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, +/* ├─────────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬──────────────┼─────────┼─────────┼─────────┼─────────┤ */ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, +/* ├──────────────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──────────────├─────────├─────────├─────────┼ ┤ */ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, +/* ├─────────────────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴───────────┬─────────┼─────────┼─────────┼─────────┼─────────┤ */ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, +/* ├───────────┬─────────┴─┬───────┴───┬─────┴─────────┴─────────┴─────────┴─────────┴─────────┴───────┬─┴─────────┴──┬──────┴───────┬─────────┼─────────┼─────────┼─────────┼─────────┼ ┤ */ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ +/* └───────────┴───────────┴───────────┴───────────────────────────────────────────────────────────────┴──────────────┴──────────────┴─────────┴─────────┴─────────┴─────────┴─────────┴─────────┘ */ + ), +}; diff --git a/keyboards/xd96/keymaps/via/readme.md b/keyboards/xd96/keymaps/via/readme.md new file mode 100644 index 000000000000..27cb965eba9e --- /dev/null +++ b/keyboards/xd96/keymaps/via/readme.md @@ -0,0 +1 @@ +# The VIA default layout diff --git a/keyboards/xd96/keymaps/via/rules.mk b/keyboards/xd96/keymaps/via/rules.mk new file mode 100644 index 000000000000..1e5b99807cb7 --- /dev/null +++ b/keyboards/xd96/keymaps/via/rules.mk @@ -0,0 +1 @@ +VIA_ENABLE = yes From 8b9e3e9979ffddaa91e022e8ab953be5c7c5283e Mon Sep 17 00:00:00 2001 From: kakunpc <15257475+kakunpc@users.noreply.github.com> Date: Wed, 1 Jul 2020 04:04:47 +0900 Subject: [PATCH 304/930] [Keyboard] Add "choc taro" keyboard (#9556) Co-authored-by: Ryan Co-authored-by: Erovia --- keyboards/choc_taro/choc_taro.c | 17 + keyboards/choc_taro/choc_taro.h | 342 +++++++++++ keyboards/choc_taro/config.h | 219 +++++++ keyboards/choc_taro/info.json | 558 ++++++++++++++++++ keyboards/choc_taro/keymaps/default/keymap.c | 25 + keyboards/choc_taro/keymaps/default/readme.md | 1 + keyboards/choc_taro/keymaps/via/keymap.c | 48 ++ keyboards/choc_taro/keymaps/via/readme.md | 3 + keyboards/choc_taro/keymaps/via/rules.mk | 1 + keyboards/choc_taro/matrix.c | 156 +++++ keyboards/choc_taro/readme.md | 15 + keyboards/choc_taro/rules.mk | 34 ++ 12 files changed, 1419 insertions(+) create mode 100644 keyboards/choc_taro/choc_taro.c create mode 100644 keyboards/choc_taro/choc_taro.h create mode 100644 keyboards/choc_taro/config.h create mode 100644 keyboards/choc_taro/info.json create mode 100644 keyboards/choc_taro/keymaps/default/keymap.c create mode 100644 keyboards/choc_taro/keymaps/default/readme.md create mode 100644 keyboards/choc_taro/keymaps/via/keymap.c create mode 100644 keyboards/choc_taro/keymaps/via/readme.md create mode 100644 keyboards/choc_taro/keymaps/via/rules.mk create mode 100644 keyboards/choc_taro/matrix.c create mode 100644 keyboards/choc_taro/readme.md create mode 100644 keyboards/choc_taro/rules.mk diff --git a/keyboards/choc_taro/choc_taro.c b/keyboards/choc_taro/choc_taro.c new file mode 100644 index 000000000000..2a835b2bd8c1 --- /dev/null +++ b/keyboards/choc_taro/choc_taro.c @@ -0,0 +1,17 @@ +/* Copyright 2020 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 "choc_taro.h" diff --git a/keyboards/choc_taro/choc_taro.h b/keyboards/choc_taro/choc_taro.h new file mode 100644 index 000000000000..cf07b80b5c0f --- /dev/null +++ b/keyboards/choc_taro/choc_taro.h @@ -0,0 +1,342 @@ +/* Copyright 2020 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 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. + */ + +/* LAYOUT_all + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐ + * │001│002│003│004│005│006│007│008│009│010│011│012│013│014│015│ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┤ + * │101 │102│103│104│105│106│107│108│109│110│111│112│113│114 │ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤ + * │201 │202│203│204│205│206│207│208│209│210│211│212│213 │ + * ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┬───┤ + * │301 │301│302│303│304│305│306│307│308│309│310│311│312 │313│ + * ├────┼───┴┬──┴─┬─┴───┴──┬┴───┼───┴───┴──┬┴──┬┴──┬┴──┬───┴───┤ + * │▓▓▓▓│401 │402 │403 │404 │405 │406│407│408│▓▓▓▓▓▓▓│ + * └────┴────┴────┴────────┴────┴──────────┴───┴───┴───┴───────┘ +*/ +#define LAYOUT_all( \ + k001, k002, k003, k004, k005, k006, k007, k008, k009, k010, k011, k012, k013, k014, k015, \ + k101, k102, k103, k104, k105, k106, k107, k108, k109, k110, k111, k112, k113, k114, \ + k201, k202, k203, k204, k205, k206, k207, k208, k209, k210, k211, k212, k213, \ + k301, k302, k303, k304, k305, k306, k307, k308, k309, k310, k311, k312, k313, \ + k401, k402, k403, k404, k405, k406, k407, k408 \ +) \ +{ \ + { k009, k109, k209, k309, KC_NO } , \ + { k010, k110, k210, k310, KC_NO } , \ + { k011, k111, k211, k311, KC_NO } , \ + { k012, k112, k212, k312, KC_NO } , \ + { k013, k113, k213, k313, KC_NO } , \ + { k014, k114, KC_NO, KC_NO, KC_NO } , \ + { k015, KC_NO, KC_NO, KC_NO, KC_NO } , \ + { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO } , \ + { k001, k101, k201, k301, k401 } , \ + { k002, k102, k202, k302, k402 } , \ + { k003, k103, k203, k303, k403 } , \ + { k004, k104, k204, k304, k404 } , \ + { k005, k105, k205, k305, k405 } , \ + { k006, k106, k206, k306, k406 } , \ + { k007, k107, k207, k307, k407 } , \ + { k008, k108, k208, k308, k408 } \ +} + +/* LAYOUT_ansi + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ + * │001│002│003│004│005│006│007│008│009│010│011│012│013│ 014 │ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ + * │101 │102│103│104│105│106│107│108│109│110│111│112│113│114 │ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤ + * │201 │202│203│204│205│206│207│208│209│210│211│212│213 │ + * ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────────┤ + * │301 │301│302│303│304│305│306│307│308│309│310│311│ 312 │ + * ├────┼───┴┬──┴─┬─┴───┴──┬┴───┼───┴───┴──┬┴──┬┴──┬┴──┬───────┤ + * │▓▓▓▓│401 │402 │403 │404 │405 │406│407│408│▓▓▓▓▓▓▓│ + * └────┴────┴────┴────────┴────┴──────────┴───┴───┴───┴───────┘ +*/ +#define LAYOUT_ansi( \ + k001, k002, k003, k004, k005, k006, k007, k008, k009, k010, k011, k012, k013, k014, \ + k101, k102, k103, k104, k105, k106, k107, k108, k109, k110, k111, k112, k113, k114, \ + k201, k202, k203, k204, k205, k206, k207, k208, k209, k210, k211, k212, k213, \ + k301, k302, k303, k304, k305, k306, k307, k308, k309, k310, k311, k312, \ + k401, k402, k403, k404, k405, k406, k407, k408 \ +) \ +{ \ + { k009, k109, k209, k309, KC_NO } , \ + { k010, k110, k210, k310, KC_NO } , \ + { k011, k111, k211, k311, KC_NO } , \ + { k012, k112, k212, k312, KC_NO } , \ + { k013, k113, k213, KC_NO, KC_NO } , \ + { k014, k114, KC_NO, KC_NO, KC_NO } , \ + { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO } , \ + { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO } , \ + { k001, k101, k201, k301, k401 } , \ + { k002, k102, k202, k302, k402 } , \ + { k003, k103, k203, k303, k403 } , \ + { k004, k104, k204, k304, k404 } , \ + { k005, k105, k205, k305, k405 } , \ + { k006, k106, k206, k306, k406 } , \ + { k007, k107, k207, k307, k407 } , \ + { k008, k108, k208, k308, k408 } \ +} + +/* LAYOUT_ansi_split_bs + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐ + * │001│002│003│004│005│006│007│008│009│010│011│012│013│014│015│ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┤ + * │101 │102│103│104│105│106│107│108│109│110│111│112│113│114 │ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤ + * │201 │202│203│204│205│206│207│208│209│210│211│212│213 │ + * ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────────┤ + * │301 │301│302│303│304│305│306│307│308│309│310│311│ 312 │ + * ├────┼───┴┬──┴─┬─┴───┴──┬┴───┼───┴───┴──┬┴──┬┴──┬┴──┬───────┤ + * │▓▓▓▓│401 │402 │403 │404 │405 │406│407│408│▓▓▓▓▓▓▓│ + * └────┴────┴────┴────────┴────┴──────────┴───┴───┴───┴───────┘ +*/ +#define LAYOUT_ansi_split_bs( \ + k001, k002, k003, k004, k005, k006, k007, k008, k009, k010, k011, k012, k013, k014, k015, \ + k101, k102, k103, k104, k105, k106, k107, k108, k109, k110, k111, k112, k113, k114, \ + k201, k202, k203, k204, k205, k206, k207, k208, k209, k210, k211, k212, k213, \ + k301, k302, k303, k304, k305, k306, k307, k308, k309, k310, k311, k312, \ + k401, k402, k403, k404, k405, k406, k407, k408 \ +) \ +{ \ + { k009, k109, k209, k309, KC_NO } , \ + { k010, k110, k210, k310, KC_NO } , \ + { k011, k111, k211, k311, KC_NO } , \ + { k012, k112, k212, k312, KC_NO } , \ + { k013, k113, k213, KC_NO, KC_NO } , \ + { k014, k114, KC_NO, KC_NO, KC_NO } , \ + { k015, KC_NO, KC_NO, KC_NO, KC_NO } , \ + { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO } , \ + { k001, k101, k201, k301, k401 } , \ + { k002, k102, k202, k302, k402 } , \ + { k003, k103, k203, k303, k403 } , \ + { k004, k104, k204, k304, k404 } , \ + { k005, k105, k205, k305, k405 } , \ + { k006, k106, k206, k306, k406 } , \ + { k007, k107, k207, k307, k407 } , \ + { k008, k108, k208, k308, k408 } \ +} + + +/* LAYOUT_ansi_split_rshift + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ + * │001│002│003│004│005│006│007│008│009│010│011│012│013│ 014 │ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ + * │101 │102│103│104│105│106│107│108│109│110│111│112│113│114 │ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤ + * │201 │202│203│204│205│206│207│208│209│210│211│212│213 │ + * ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┬───┤ + * │301 │301│302│303│304│305│306│307│308│309│310│311│312 │313│ + * ├────┼───┴┬──┴─┬─┴───┴──┬┴───┼───┴───┴──┬┴──┬┴──┬┴──┬───┴───┤ + * │▓▓▓▓│401 │402 │403 │404 │405 │406│407│408│▓▓▓▓▓▓▓│ + * └────┴────┴────┴────────┴────┴──────────┴───┴───┴───┴───────┘ +*/ +#define LAYOUT_ansi_split_rshift( \ + k001, k002, k003, k004, k005, k006, k007, k008, k009, k010, k011, k012, k013, k014, \ + k101, k102, k103, k104, k105, k106, k107, k108, k109, k110, k111, k112, k113, k114, \ + k201, k202, k203, k204, k205, k206, k207, k208, k209, k210, k211, k212, k213, \ + k301, k302, k303, k304, k305, k306, k307, k308, k309, k310, k311, k312, k313, \ + k401, k402, k403, k404, k405, k406, k407, k408 \ +) \ +{ \ + { k009, k109, k209, k309, KC_NO } , \ + { k010, k110, k210, k310, KC_NO } , \ + { k011, k111, k211, k311, KC_NO } , \ + { k012, k112, k212, k312, KC_NO } , \ + { k013, k113, k213, k313, KC_NO } , \ + { k014, k114, KC_NO, KC_NO, KC_NO } , \ + { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO } , \ + { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO } , \ + { k001, k101, k201, k301, k401 } , \ + { k002, k102, k202, k302, k402 } , \ + { k003, k103, k203, k303, k403 } , \ + { k004, k104, k204, k304, k404 } , \ + { k005, k105, k205, k305, k405 } , \ + { k006, k106, k206, k306, k406 } , \ + { k007, k107, k207, k307, k407 } , \ + { k008, k108, k208, k308, k408 } \ +} + + +/* LAYOUT_iso + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ + * │001│002│003│004│005│006│007│008│009│010│011│012│013│ 014 │ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ + * │101 │102│103│104│105│106│107│108│109│110│111│112│113│ │ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐114 │ + * │201 │202│203│204│205│206│207│208│209│210│211│212│213│ │ + * ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴────┤ + * │301 │301│302│303│304│305│306│307│308│309│310│311│ 312 │ + * ├────┼───┴┬──┴─┬─┴───┴──┬┴───┼───┴───┴──┬┴──┬┴──┬┴──┬───────┤ + * │▓▓▓▓│401 │402 │403 │404 │405 │406│407│408│▓▓▓▓▓▓▓│ + * └────┴────┴────┴────────┴────┴──────────┴───┴───┴───┴───────┘ +*/ +#define LAYOUT_iso( \ + k001, k002, k003, k004, k005, k006, k007, k008, k009, k010, k011, k012, k013, k014, \ + k101, k102, k103, k104, k105, k106, k107, k108, k109, k110, k111, k112, k113, k114, \ + k201, k202, k203, k204, k205, k206, k207, k208, k209, k210, k211, k212, k213, \ + k301, k302, k303, k304, k305, k306, k307, k308, k309, k310, k311, k312, \ + k401, k402, k403, k404, k405, k406, k407, k408 \ +) \ +{ \ + { k009, k109, k209, k309, KC_NO } , \ + { k010, k110, k210, k310, KC_NO } , \ + { k011, k111, k211, k311, KC_NO } , \ + { k012, k112, k212, k312, KC_NO } , \ + { k013, k113, k213, KC_NO, KC_NO } , \ + { k014, k114, KC_NO, KC_NO, KC_NO } , \ + { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO } , \ + { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO } , \ + { k001, k101, k201, k301, k401 } , \ + { k002, k102, k202, k302, k402 } , \ + { k003, k103, k203, k303, k403 } , \ + { k004, k104, k204, k304, k404 } , \ + { k005, k105, k205, k305, k405 } , \ + { k006, k106, k206, k306, k406 } , \ + { k007, k107, k207, k307, k407 } , \ + { k008, k108, k208, k308, k408 } \ +} + +/* LAYOUT_iso_split_rshift + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ + * │001│002│003│004│005│006│007│008│009│010│011│012│013│ 014 │ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ + * │101 │102│103│104│105│106│107│108│109│110│111│112│113│ │ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐114 │ + * │201 │202│203│204│205│206│207│208│209│210│211│212│213│ │ + * ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴┬───┤ + * │301 │301│302│303│304│305│306│307│308│309│310│311│312 │313│ + * ├────┼───┴┬──┴─┬─┴───┴──┬┴───┼───┴───┴──┬┴──┬┴──┬┴──┬───┴───┤ + * │▓▓▓▓│401 │402 │403 │404 │405 │406│407│408│▓▓▓▓▓▓▓│ + * └────┴────┴────┴────────┴────┴──────────┴───┴───┴───┴───────┘ +*/ +#define LAYOUT_iso_split_rshift( \ + k001, k002, k003, k004, k005, k006, k007, k008, k009, k010, k011, k012, k013, k014, \ + k101, k102, k103, k104, k105, k106, k107, k108, k109, k110, k111, k112, k113, k114, \ + k201, k202, k203, k204, k205, k206, k207, k208, k209, k210, k211, k212, k213, \ + k301, k302, k303, k304, k305, k306, k307, k308, k309, k310, k311, k312, k313, \ + k401, k402, k403, k404, k405, k406, k407, k408 \ +) \ +{ \ + { k009, k109, k209, k309, KC_NO } , \ + { k010, k110, k210, k310, KC_NO } , \ + { k011, k111, k211, k311, KC_NO } , \ + { k012, k112, k212, k312, KC_NO } , \ + { k013, k113, k213, k313, KC_NO } , \ + { k014, k114, KC_NO, KC_NO, KC_NO } , \ + { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO } , \ + { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO } , \ + { k001, k101, k201, k301, k401 } , \ + { k002, k102, k202, k302, k402 } , \ + { k003, k103, k203, k303, k403 } , \ + { k004, k104, k204, k304, k404 } , \ + { k005, k105, k205, k305, k405 } , \ + { k006, k106, k206, k306, k406 } , \ + { k007, k107, k207, k307, k407 } , \ + { k008, k108, k208, k308, k408 } \ +} + +/* LAYOUT_iso_split_bs + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐ + * │001│002│003│004│005│006│007│008│009│010│011│012│013│014│015│ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┤ + * │101 │102│103│104│105│106│107│108│109│110│111│112│113│ │ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐114 │ + * │201 │202│203│204│205│206│207│208│209│210│211│212│213│ │ + * ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴────┤ + * │301 │301│302│303│304│305│306│307│308│309│310│311│ 312 │ + * ├────┼───┴┬──┴─┬─┴───┴──┬┴───┼───┴───┴──┬┴──┬┴──┬┴──┬───────┤ + * │▓▓▓▓│401 │402 │403 │404 │405 │406│407│408│▓▓▓▓▓▓▓│ + * └────┴────┴────┴────────┴────┴──────────┴───┴───┴───┴───────┘ +*/ +#define LAYOUT_iso_split_bs( \ + k001, k002, k003, k004, k005, k006, k007, k008, k009, k010, k011, k012, k013, k014, k015, \ + k101, k102, k103, k104, k105, k106, k107, k108, k109, k110, k111, k112, k113, k114, \ + k201, k202, k203, k204, k205, k206, k207, k208, k209, k210, k211, k212, k213, \ + k301, k302, k303, k304, k305, k306, k307, k308, k309, k310, k311, k312, \ + k401, k402, k403, k404, k405, k406, k407, k408 \ +) \ +{ \ + { k009, k109, k209, k309, KC_NO } , \ + { k010, k110, k210, k310, KC_NO } , \ + { k011, k111, k211, k311, KC_NO } , \ + { k012, k112, k212, k312, KC_NO } , \ + { k013, k113, k213, KC_NO, KC_NO } , \ + { k014, k114, KC_NO, KC_NO, KC_NO } , \ + { k015, KC_NO, KC_NO, KC_NO, KC_NO } , \ + { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO } , \ + { k001, k101, k201, k301, k401 } , \ + { k002, k102, k202, k302, k402 } , \ + { k003, k103, k203, k303, k403 } , \ + { k004, k104, k204, k304, k404 } , \ + { k005, k105, k205, k305, k405 } , \ + { k006, k106, k206, k306, k406 } , \ + { k007, k107, k207, k307, k407 } , \ + { k008, k108, k208, k308, k408 } \ +} + +/* LAYOUT_iso_split_bs_rshift + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐ + * │001│002│003│004│005│006│007│008│009│010│011│012│013│014│015│ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┤ + * │101 │102│103│104│105│106│107│108│109│110│111│112│113│ │ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐114 │ + * │201 │202│203│204│205│206│207│208│209│210│211│212│213│ │ + * ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴┬───┤ + * │301 │301│302│303│304│305│306│307│308│309│310│311│312 │313│ + * ├────┼───┴┬──┴─┬─┴───┴──┬┴───┼───┴───┴──┬┴──┬┴──┬┴──┬───┴───┤ + * │▓▓▓▓│401 │402 │403 │404 │405 │406│407│408│▓▓▓▓▓▓▓│ + * └────┴────┴────┴────────┴────┴──────────┴───┴───┴───┴───────┘ +*/ +#define LAYOUT_iso_split_bs_rshift( \ + k001, k002, k003, k004, k005, k006, k007, k008, k009, k010, k011, k012, k013, k014, k015, \ + k101, k102, k103, k104, k105, k106, k107, k108, k109, k110, k111, k112, k113, k114, \ + k201, k202, k203, k204, k205, k206, k207, k208, k209, k210, k211, k212, k213, \ + k301, k302, k303, k304, k305, k306, k307, k308, k309, k310, k311, k312, k313, \ + k401, k402, k403, k404, k405, k406, k407, k408 \ +) \ +{ \ + { k009, k109, k209, k309, KC_NO } , \ + { k010, k110, k210, k310, KC_NO } , \ + { k011, k111, k211, k311, KC_NO } , \ + { k012, k112, k212, k312, KC_NO } , \ + { k013, k113, k213, k313, KC_NO } , \ + { k014, k114, KC_NO, KC_NO, KC_NO } , \ + { k015, KC_NO, KC_NO, KC_NO, KC_NO } , \ + { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO } , \ + { k001, k101, k201, k301, k401 } , \ + { k002, k102, k202, k302, k402 } , \ + { k003, k103, k203, k303, k403 } , \ + { k004, k104, k204, k304, k404 } , \ + { k005, k105, k205, k305, k405 } , \ + { k006, k106, k206, k306, k406 } , \ + { k007, k107, k207, k307, k407 } , \ + { k008, k108, k208, k308, k408 } \ +} diff --git a/keyboards/choc_taro/config.h b/keyboards/choc_taro/config.h new file mode 100644 index 000000000000..4ccc686a6624 --- /dev/null +++ b/keyboards/choc_taro/config.h @@ -0,0 +1,219 @@ +/* +Copyright 2020 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 0xDCED +#define PRODUCT_ID 0x71CC +#define DEVICE_VER 0x0001 +#define MANUFACTURER kakunpc +#define PRODUCT choc_taro +#define DESCRIPTION A custom keyboard + +/* key matrix size */ +#define MATRIX_ROWS 16 +#define MATRIX_COLS 5 +/* + * 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 } +#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 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 */ +#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 0 diff --git a/keyboards/choc_taro/info.json b/keyboards/choc_taro/info.json new file mode 100644 index 000000000000..33821afe0088 --- /dev/null +++ b/keyboards/choc_taro/info.json @@ -0,0 +1,558 @@ +{ + "keyboard_name": "choc_taro", + "url": "https://kakunpc.booth.pm/", + "maintainer": "kakunpc", + "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":1.25, "y":4, "w":1.25}, + {"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}, + {"x":10, "y":4, "w":1.25}, + {"x":11.25, "y":4, "w":1.25}, + {"x":12.5, "y":4, "w":1.25}] + }, + "LAYOUT_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":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":1.25, "y":4, "w":1.25}, + {"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}, + {"x":10, "y":4, "w":1.25}, + {"x":11.25, "y":4, "w":1.25}, + {"x":12.5, "y":4, "w":1.25}] + }, + "LAYOUT_ansi_split_bs": { + "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":2.75}, + + {"x":1.25, "y":4, "w":1.25}, + {"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}, + {"x":10, "y":4, "w":1.25}, + {"x":11.25, "y":4, "w":1.25}, + {"x":12.5, "y":4, "w":1.25}] + }, + "LAYOUT_ansi_split_rshift": { + "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":1.75}, + {"x":14, "y":3}, + + {"x":1.25, "y":4, "w":1.25}, + {"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}, + {"x":10, "y":4, "w":1.25}, + {"x":11.25, "y":4, "w":1.25}, + {"x":12.5, "y":4, "w":1.25}] + }, + "LAYOUT_iso": { + "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.75, "y":1, "w":1.25, "h":2}, + + {"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}, + + {"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":1.25, "y":4, "w":1.25}, + {"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}, + {"x":10, "y":4, "w":1.25}, + {"x":11.25, "y":4, "w":1.25}, + {"x":12.5, "y":4, "w":1.25}] + }, + "LAYOUT_iso_split_rshift": { + "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.75, "y":1, "w":1.25, "h":2}, + + {"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}, + + {"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":1.25, "y":4, "w":1.25}, + {"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}, + {"x":10, "y":4, "w":1.25}, + {"x":11.25, "y":4, "w":1.25}, + {"x":12.5, "y":4, "w":1.25}] + }, + "LAYOUT_iso_split_bs": { + "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.75, "y":1, "w":1.25, "h":2}, + + {"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}, + + {"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":1.25, "y":4, "w":1.25}, + {"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}, + {"x":10, "y":4, "w":1.25}, + {"x":11.25, "y":4, "w":1.25}, + {"x":12.5, "y":4, "w":1.25}] + }, + "LAYOUT_iso_split_bs_rshift": { + "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.75, "y":1, "w":1.25, "h":2}, + + {"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}, + + {"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":1.25, "y":4, "w":1.25}, + {"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}, + {"x":10, "y":4, "w":1.25}, + {"x":11.25, "y":4, "w":1.25}, + {"x":12.5, "y":4, "w":1.25}] + } + } +} diff --git a/keyboards/choc_taro/keymaps/default/keymap.c b/keyboards/choc_taro/keymaps/default/keymap.c new file mode 100644 index 000000000000..4de3c2d55aeb --- /dev/null +++ b/keyboards/choc_taro/keymaps/default/keymap.c @@ -0,0 +1,25 @@ +/* Copyright 2020 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( /* 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_TAB, KC_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_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, + 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_APP, KC_RCTL + ) +}; diff --git a/keyboards/choc_taro/keymaps/default/readme.md b/keyboards/choc_taro/keymaps/default/readme.md new file mode 100644 index 000000000000..a2cb119040a0 --- /dev/null +++ b/keyboards/choc_taro/keymaps/default/readme.md @@ -0,0 +1 @@ +# The default keymap for choc_taro diff --git a/keyboards/choc_taro/keymaps/via/keymap.c b/keyboards/choc_taro/keymaps/via/keymap.c new file mode 100644 index 000000000000..a1d48eb5e9fe --- /dev/null +++ b/keyboards/choc_taro/keymaps/via/keymap.c @@ -0,0 +1,48 @@ +/* Copyright 2020 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( /* 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_TAB, KC_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_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, + 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_APP, KC_RCTL + ), + [1] = LAYOUT_all( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______ + ), + [2] = LAYOUT_all( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______ + ), + [3] = LAYOUT_all( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______ + ) +}; diff --git a/keyboards/choc_taro/keymaps/via/readme.md b/keyboards/choc_taro/keymaps/via/readme.md new file mode 100644 index 000000000000..cb3af77dfab7 --- /dev/null +++ b/keyboards/choc_taro/keymaps/via/readme.md @@ -0,0 +1,3 @@ +# The default keymap for choc_taro + +This is an experimental. Use at your own risk. diff --git a/keyboards/choc_taro/keymaps/via/rules.mk b/keyboards/choc_taro/keymaps/via/rules.mk new file mode 100644 index 000000000000..1e5b99807cb7 --- /dev/null +++ b/keyboards/choc_taro/keymaps/via/rules.mk @@ -0,0 +1 @@ +VIA_ENABLE = yes diff --git a/keyboards/choc_taro/matrix.c b/keyboards/choc_taro/matrix.c new file mode 100644 index 000000000000..02421551da55 --- /dev/null +++ b/keyboards/choc_taro/matrix.c @@ -0,0 +1,156 @@ +/* +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 "matrix.h" +#include "quantum.h" + +#if (MATRIX_COLS <= 8) +# define ROW_SHIFTER ((uint8_t)1) +#elif (MATRIX_COLS <= 16) +# define ROW_SHIFTER ((uint16_t)1) +#elif (MATRIX_COLS <= 32) +# define ROW_SHIFTER ((uint32_t)1) +#endif + +static const pin_t row_pins[MATRIX_ROWS] = MATRIX_ROW_PINS; +static const pin_t col_pins[MATRIX_COLS] = MATRIX_COL_PINS; + +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 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_rows(); + unselect_cols(); + + for (uint8_t x = 0; x < MATRIX_COLS; x++) { + setPinInputHigh(col_pins[x]); + } + + for (uint8_t x = 0; x < MATRIX_ROWS; x++) { + setPinInputHigh(row_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); + matrix_io_delay(); + + // 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 : (ROW_SHIFTER << col_index); + } + + // Unselect row + unselect_row(current_row); + + return (last_row_value != current_matrix[current_row]); +} + +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); + matrix_io_delay(); + + // For each row... + for(uint8_t row_index = 0; row_index < MATRIX_ROWS / 2; row_index++) { + uint8_t tmp = row_index + MATRIX_ROWS / 2; + // Store last value of row prior to reading + matrix_row_t last_row_value = current_matrix[tmp]; + + // Check row pin state + if (readPin(row_pins[row_index]) == 0) { + // Pin LO, set col bit + current_matrix[tmp] |= (ROW_SHIFTER << current_col); + } else { + // Pin HI, clear col bit + current_matrix[tmp] &= ~(ROW_SHIFTER << current_col); + } + + // Determine if the matrix changed state + if ((last_row_value != current_matrix[tmp]) && !(matrix_changed)) { + matrix_changed = true; + } + } + + // Unselect col + unselect_col(current_col); + + return matrix_changed; +} + +void matrix_init_custom(void) { + // initialize key pins + init_pins(); +} + +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 / 2; current_row++) { + changed |= read_cols_on_row(current_matrix, current_row); + } + + // Set col, read rows + for (uint8_t current_col = 0; current_col < MATRIX_COLS; current_col++) { + changed |= read_rows_on_col(current_matrix, current_col); + } + + return changed; +} diff --git a/keyboards/choc_taro/readme.md b/keyboards/choc_taro/readme.md new file mode 100644 index 000000000000..f0900c2fe462 --- /dev/null +++ b/keyboards/choc_taro/readme.md @@ -0,0 +1,15 @@ +# choc_taro + +![choc_taro](https://i.gyazo.com/717ddeed13cd2f956ed01b71c6e96f87.jpg) + +gh60 compatible choc keyboard + +* Keyboard Maintainer: [kakunpc](https://github.com/kakunpc) +* Hardware Supported: choc taro pcb +* Hardware Availability: booth([@kakunpc](https://kakunpc.booth.pm/)) + +Make example for this keyboard (after setting up your build environment): + + make choc_taro: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/choc_taro/rules.mk b/keyboards/choc_taro/rules.mk new file mode 100644 index 000000000000..c11995e538be --- /dev/null +++ b/keyboards/choc_taro/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 = 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 +FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches + +CUSTOM_MATRIX = lite +SRC += matrix.c From 907c1c64cfd1e1c132c65a19ef30bb255255c37b Mon Sep 17 00:00:00 2001 From: Nick Blyumberg Date: Wed, 1 Jul 2020 02:49:16 -0400 Subject: [PATCH 305/930] [Keymap] AutoHotKey Companion keymap for Super16 (#9216) * Started AHK Companion Development * Updated the readme * Added AutoHotKey companion file * Updated documentation * Cleaned up the files and revised documentation * Finished the readme.md updates * Fixed the LED issue where the last LED did not reflect the right color --- .../keymaps/ahk_companion/ahk_companion.ahk | 104 ++++++++++++++ .../super16/keymaps/ahk_companion/config.h | 19 +++ .../super16/keymaps/ahk_companion/keymap.c | 136 ++++++++++++++++++ .../super16/keymaps/ahk_companion/readme.md | 58 ++++++++ .../super16/keymaps/ahk_companion/rules.mk | 2 + 5 files changed, 319 insertions(+) create mode 100644 keyboards/1upkeyboards/super16/keymaps/ahk_companion/ahk_companion.ahk create mode 100644 keyboards/1upkeyboards/super16/keymaps/ahk_companion/config.h create mode 100644 keyboards/1upkeyboards/super16/keymaps/ahk_companion/keymap.c create mode 100644 keyboards/1upkeyboards/super16/keymaps/ahk_companion/readme.md create mode 100644 keyboards/1upkeyboards/super16/keymaps/ahk_companion/rules.mk diff --git a/keyboards/1upkeyboards/super16/keymaps/ahk_companion/ahk_companion.ahk b/keyboards/1upkeyboards/super16/keymaps/ahk_companion/ahk_companion.ahk new file mode 100644 index 000000000000..becab49e5cc5 --- /dev/null +++ b/keyboards/1upkeyboards/super16/keymaps/ahk_companion/ahk_companion.ahk @@ -0,0 +1,104 @@ +#Persistent +#SingleInstance force + +;================================================================= +; Macro Pad Shortcuts ; +;================================================================= + +;================================================================= +; Layer 0 +;;================================================================= +;Row 1 + +F13::Send a +F14::Send b +F15::Send c +F16::Send d + +;Row 2 + +F17::Send e +F18::Send f +F19::Send g +F20::Send h + +;Row 3 + +F21::Send i +F22::Send j +F23::Send k +F24::Send l + + +;================================================================= +; Layer 1 +;;================================================================= +;Row 1 + +!F13::Send m +!F14::Send n +!F15::Send o +!F16::Send p + +;Row 2 + +!F17::Send q +!F18::Send r +!F19::Send s +!F20::Send t + +;Row 3 + +!F21::Send u +!F22::Send v +!F23::Send w +!F24::Send x + + +;================================================================= +; Layer 2 +;;================================================================= +;Row 1 + ++F13::Send y ++F14::Send z ++F15::Send A ++F16::Send B + +;Row 2 + ++F17::Send C ++F18::Send D ++F19::Send E ++F20::Send F + +;Row 3 + ++F21::Send G ++F22::Send H ++F23::Send I ++F24::Send J + +;================================================================= +; Layer 3 +;;================================================================= +;Row 1 + +^F13::Send K +^F14::Send L +^F15::Send M +^F16::Send N + +;Row 2 + +^F17::Send O +^F18::Send P +^F19::Send Q +^F20::Send R + +;Row 3 + +^F21::Send S +^F22::Send T +^F23::Send U +^F24::Send V diff --git a/keyboards/1upkeyboards/super16/keymaps/ahk_companion/config.h b/keyboards/1upkeyboards/super16/keymaps/ahk_companion/config.h new file mode 100644 index 000000000000..3b7fd81d698f --- /dev/null +++ b/keyboards/1upkeyboards/super16/keymaps/ahk_companion/config.h @@ -0,0 +1,19 @@ +#pragma once + +// Time out one shot layers after 3 seconds +#define ONESHOT_TIMEOUT 3000 + +#define RGBLED_NUM 16 + +// Undef and redefine default brightness to half of 255 +#undef RGBLIGHT_LIMIT_VAL +#define RGBLIGHT_LIMIT_VAL 128 + +//Define a preview timeout for RGB reviews +#define PREVIEW_TIMEOUT 5000 +#define TAPPING_TERM 200 + +// Enable Light Layers implementation +#define RGBLIGHT_LAYERS +// Allow Light Layers to override RGB off configuration +#define RGBLIGHT_LAYERS_OVERRIDE_RGB_OFF diff --git a/keyboards/1upkeyboards/super16/keymaps/ahk_companion/keymap.c b/keyboards/1upkeyboards/super16/keymaps/ahk_companion/keymap.c new file mode 100644 index 000000000000..e62f3b60951c --- /dev/null +++ b/keyboards/1upkeyboards/super16/keymaps/ahk_companion/keymap.c @@ -0,0 +1,136 @@ +#include QMK_KEYBOARD_H + +#if defined(RGBLIGHT_ENABLE) && defined(RGBLIGHT_LAYERS) +static uint32_t rgb_preview_timer = 0; +#endif +extern rgblight_config_t rgblight_config; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + //Layer 0 - Base Layer (F13 to F24, and One Shot Layer 1,2,3 or Toggle Layer 4) + [0] = LAYOUT_ortho_4x4( + KC_F13, KC_F14, KC_F15, KC_F16, + KC_F17, KC_F18, KC_F19, KC_F20, + KC_F21, KC_F22, KC_F23, KC_F24, + OSL(1), OSL(2), OSL(3), TG(4) //Transparent to let you go between layers + ), + + [1] = LAYOUT_ortho_4x4( + LALT(KC_F13), LALT(KC_F14), LALT(KC_F15), LALT(KC_F16), + LALT(KC_F17), LALT(KC_F18), LALT(KC_F19), LALT(KC_F20), + LALT(KC_F21), LALT(KC_F22), LALT(KC_F23), LALT(KC_F24), + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS //Transparent to let you go between layers + ), + + //Layer 2 - Shift + Function Key Layer + [2] = LAYOUT_ortho_4x4( + LSFT(KC_F13), LSFT(KC_F14), LSFT(KC_F15), LSFT(KC_F16), + LSFT(KC_F17), LSFT(KC_F18), LSFT(KC_F19), LSFT(KC_F20), + LSFT(KC_F21), LSFT(KC_F22), LSFT(KC_F23), LSFT(KC_F24), + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS //Transparent to let you go between layers + ), + + //Layer 3 - Control + Function Key + [3] = LAYOUT_ortho_4x4( + LCTL(KC_F13), LCTL(KC_F14), LCTL(KC_F15), LCTL(KC_F16), + LCTL(KC_F17), LCTL(KC_F18), LCTL(KC_F19), LCTL(KC_F20), + LCTL(KC_F21), LCTL(KC_F22), LCTL(KC_F23), LCTL(KC_F24), + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS //Transparent to let you go between layers + ), + + //Layer 4 - Multimedia + [4] = LAYOUT_ortho_4x4( + KC_MPRV, KC_MPLY, KC_MNXT, KC_VOLU, + KC_NO, KC_NO, KC_NO, KC_MUTE, + KC_NO, RESET, EEP_RST, KC_VOLD, + TG(5), KC_TRNS, KC_TRNS, KC_TRNS //Transparent to let you go between layers + ), + + //Layer 5 - Keyboard Lights, Programming and Special Functions + [5] = LAYOUT_ortho_4x4( + RGB_MOD, RGB_HUI, RGB_SAI, RGB_VAI, + RGB_RMOD, RGB_HUD, RGB_SAD, RGB_VAD, + RGB_TOG, EEP_RST, RESET, KC_LSHIFT, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS //Transparent to let you go between layers + ), +}; + +const rgblight_segment_t PROGMEM my_layer0_layer[] = RGBLIGHT_LAYER_SEGMENTS( + {0,16,HSV_ORANGE} + ); +const rgblight_segment_t PROGMEM my_layer1_layer[] = RGBLIGHT_LAYER_SEGMENTS( + {0,16,HSV_GREEN} + ); +const rgblight_segment_t PROGMEM my_layer2_layer[] = RGBLIGHT_LAYER_SEGMENTS( + {0,16,HSV_RED} + ); +const rgblight_segment_t PROGMEM my_layer3_layer[] = RGBLIGHT_LAYER_SEGMENTS( + {0,16,HSV_BLUE} + ); +const rgblight_segment_t PROGMEM my_layer4_layer[] = RGBLIGHT_LAYER_SEGMENTS( + {0,16,HSV_WHITE} + ); +const rgblight_segment_t PROGMEM my_layer5_layer[] = RGBLIGHT_LAYER_SEGMENTS( + {0,16,HSV_TEAL} + ); +const rgblight_segment_t* const PROGMEM my_rgb_layers[] = RGBLIGHT_LAYERS_LIST( + my_layer0_layer, + my_layer1_layer, + my_layer2_layer, + my_layer3_layer, + my_layer4_layer, + my_layer5_layer + ); + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + return true; +} + +void post_process_record_user(uint16_t keycode, keyrecord_t *record) { + // Allow for a preview of changes when modifying RGB +# if defined(RGBLIGHT_ENABLE) && defined(RGBLIGHT_LAYERS) + switch (keycode) { + case RGB_TOG ... VLK_TOG: + for (uint8_t i = 0; i < RGBLIGHT_MAX_LAYERS; i++) { + rgblight_set_layer_state(i, false); + } + rgb_preview_timer = timer_read32(); + break; + } +# endif + return; +} + +//Set the appropriate layer color +layer_state_t layer_state_set_user(layer_state_t state) { + rgblight_set_layer_state(1, layer_state_cmp(state, 1)); + rgblight_set_layer_state(2, layer_state_cmp(state, 2)); + rgblight_set_layer_state(3, layer_state_cmp(state, 3)); + rgblight_set_layer_state(4, layer_state_cmp(state, 4)); + rgblight_set_layer_state(5, layer_state_cmp(state, 5)); + return state; +} + +void keyboard_post_init_user(void) { + //Enable the LED layers + rgblight_layers = my_rgb_layers; + layer_state_set_user(layer_state); +} + +void matrix_scan_user(void) { +# if defined(RGBLIGHT_ENABLE) && defined(RGBLIGHT_LAYERS) + // Allow preview for + if (rgb_preview_timer && TIMER_DIFF_32(timer_read32(), rgb_preview_timer) > PREVIEW_TIMEOUT) { + rgb_preview_timer = 0; + default_layer_state_set_user(default_layer_state); + layer_state_set_user(layer_state); + led_update_user((led_t) host_keyboard_leds()); + } +# endif +} + +//EEPROM Reset Function +void eeconfig_init_user(void) { + rgblight_enable(); // Enable RGB by default + rgblight_sethsv_orange(); // Set it to orange by default +} + diff --git a/keyboards/1upkeyboards/super16/keymaps/ahk_companion/readme.md b/keyboards/1upkeyboards/super16/keymaps/ahk_companion/readme.md new file mode 100644 index 000000000000..7a0107c994cb --- /dev/null +++ b/keyboards/1upkeyboards/super16/keymaps/ahk_companion/readme.md @@ -0,0 +1,58 @@ +## AutoHotKey Companion ## + +### Overview ### +AutoHotKey Companion Keymap for 1upkeyboards Super16 is designed be a quick and easy way to get started with AutoHotKey and to provide a foundation for customizing your own macropad. I chose the Super16 because it provided an easy way (RGB) to identify what layer I was on with a quick glance or peripheral vision. The F13 to F24 keys were selected as they are rarely used so you won't run into conflicts with existing application shortcuts and AutoHotKey recognizes them without any issues. + +Same functionality can be accomplished with other similar applications on the host system like Keyboard Maestro, AutoIt, etc. + +* AutoHotKey(Windows) +* AutoIT (Windows) +* Keyboard Maestro(Mac) +* AutoKey(Linux) + +This keymap allows for a total of 48 Function/Macro keys that are accessible within 2 sequential key presses (or more when extended with your own code and additional layers) + +### Alternate Implementations ### +I chose to use QMK OSL (One Shot Layer) functionality to avoid having to hold a key while selecting the next key and to have my layers always go back to the default layer as the starting point. This also helps me avoid having to cognitively remember what layer I am on. + +If persistent behavior is prefered, OSL can be swapped for TG which will toggle the layer on/off with a key press instead of clearing the layer once the Function key is pressed. This is useful if a layer contains several keys that need to be used in sequence. I also added a OSL timeout of 3 seconds, so that if the key is not pressed within 3 seconds the layer will go back to default. This can be adjusted in the config.h file by increasing 3000 to a desired value: `#define ONESHOT_TIMEOUT 3000` + + + + +### Layers ### + +While the first 5 layers are accessible with only 1 key press at most, the 5th (less frequently used) layer is accessed by first going to the 4th layer, which makes the TG(5) button available on the bottom left. Space for additional 2 more layer toggles is available on the 2 middle buttons on the bottom row. Please refer to the layer diagrams. + + +* Layer 0 (Base Layer) - the default layer and functions like sending the F13 to F24 keys along with the bottom row to activate another 4 layers. + + ![Image of Base Layer ](https://i.imgur.com/0LhityX.png) + +* Layer 1 (Alt Layer) - Equivalent to Alt+Fxx key being pressed + + ![Image of Layer 1 ](https://i.imgur.com/ZblqLZt.png) + +* Layer 2 (Shift Layer) - Equivalent to Shift+Fxx key being pressed + + ![Image of Layer 2 ](https://i.imgur.com/ZQHwLC0.png) + +* Layer 3 (Control Layer) - Equivalent to Ctrl+Fxx key being pressed + + ![Image of Layer 3 ](https://i.imgur.com/JkM8bqV.png) + +* Layer 4 (Config Layer) - Layer for multimedia. You can replace the KC_TRNS on this layer in keymap.c to TG(x) to enable additional layers. + + ![Image of Layer 4 ](https://i.imgur.com/srDp5Lv.png) + +* Layer 5 (RGB Control/QMK) - RGB control layer and Quantum functions (Reset, EEPROM Reset, ) + + ![Image of Layer 5 ](https://i.imgur.com/Os3n8dx.png) + +### Host Configuration ### + +Once the keymap has been flashed to the Super16, you can download the accompanying AutoHotKey file or create your own and have it start automatically either via a Windows Task or another way. Using AutoHotKey allows adjustment of functionality of the buttons without the need to change your map and reflash the macropad every time. +Starting the AHK file can be done either by: +* Creating a Windows Task +* Adding the AHK to the startup folder +* Launch manually diff --git a/keyboards/1upkeyboards/super16/keymaps/ahk_companion/rules.mk b/keyboards/1upkeyboards/super16/keymaps/ahk_companion/rules.mk new file mode 100644 index 000000000000..b5bd51b3270e --- /dev/null +++ b/keyboards/1upkeyboards/super16/keymaps/ahk_companion/rules.mk @@ -0,0 +1,2 @@ +RGB_MATRIX_ENABLE = no +RGBLIGHT_ENABLE = yes From 92839f8a0961584bb695fc54fe157d4238a4cebe Mon Sep 17 00:00:00 2001 From: Mojitas <47667093+Mojitas@users.noreply.github.com> Date: Wed, 1 Jul 2020 22:29:06 +0200 Subject: [PATCH 306/930] Mojito-keymap (#9566) Co-authored-by: Joel Challis Co-authored-by: Ryan --- .../keebio/iris/keymaps/mojitas/config.h | 21 ++ .../keebio/iris/keymaps/mojitas/keymap.c | 217 ++++++++++++++++++ 2 files changed, 238 insertions(+) create mode 100644 keyboards/keebio/iris/keymaps/mojitas/config.h create mode 100644 keyboards/keebio/iris/keymaps/mojitas/keymap.c diff --git a/keyboards/keebio/iris/keymaps/mojitas/config.h b/keyboards/keebio/iris/keymaps/mojitas/config.h new file mode 100644 index 000000000000..149a54be7fa3 --- /dev/null +++ b/keyboards/keebio/iris/keymaps/mojitas/config.h @@ -0,0 +1,21 @@ +/* +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 diff --git a/keyboards/keebio/iris/keymaps/mojitas/keymap.c b/keyboards/keebio/iris/keymaps/mojitas/keymap.c new file mode 100644 index 000000000000..548bffc65098 --- /dev/null +++ b/keyboards/keebio/iris/keymaps/mojitas/keymap.c @@ -0,0 +1,217 @@ +#include QMK_KEYBOARD_H +#include "keymap_swedish.h" + +//Heavily modified keymap. Some features: +//Multiple layouts, I use dvorak as main. +//Nordic(swedish) signs +//Symbols, numpad, arrows/navigation reachable under the alpas via the layers +//Mirrored ctl, alt and shift to be able to use both hands when doing commands +//Gaming layer, qwerty with space on left half. + +enum layer_names { + _DVORAK, + _COLEMAK, + _QWERTY, + _WORKMAN, + _GAMING, + _NUMPAD, + _LOWER, + _RAISE, + _ADJUST +}; + +enum custom_keycodes { + QWERTY = SAFE_RANGE, + DVORAK, + COLEMAK, + WORKMAN, + GAMING, + NUMPAD, +}; + +#define KC_ KC_TRNS + +#define SE_YEN ALGR(SE_6) //isn't in the swedish_keymap.h +#define KC_CATDEL LCTL(LALT(KC_DEL)) // Ctrl alt del +#define KC_TSKMGR LCTL(S(KC_ESC)) // Ctrl shift esc +#define KC_NUMP TG(_NUMPAD) // Toggle layer NUMPAD for use in LAYOUT_kc +#define KC_Close RALT(KC_F4) // Alt F4 +#define KC_MEH1 MEH(KC_1) +#define KC_MEH2 MEH(KC_2) +#define KC_MEH3 MEH(KC_3) +#define KC_MEH4 MEH(KC_4) +#define KC_MEH5 MEH(KC_5) + +#define KC_LOWR MO(_LOWER) +#define KC_RASE MO(_RAISE) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [_QWERTY] = LAYOUT( + //,--------+--------+--------+--------+--------+--------. ,--------+--------+--------+--------+--------+--------. + KC_DEL , KC_APP , KC_VOLD, KC_MUTE, KC_VOLU, KC_LGUI, KC_GRV , KC_MPRV, KC_MPLY, KC_MNXT, KC_DOWN, KC_ESC , + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + KC_TAB , KC_Q , KC_W , KC_E , KC_ R , KC_T , KC_Y , KC_U , KC_I , KC_O , KC_P , SE_ARNG, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + KC_LCTL, KC_A , KC_S , KC_D , KC_F , KC_G , KC_H , KC_J , KC_K , KC_L , SE_ODIA, SE_ADIA, + //|--------+--------+--------+--------+--------+--------+--------. ,--------|--------+--------+--------+--------+--------+--------| + KC_LSFT, KC_Z , KC_X , KC_C , KC_V , KC_B , KC_NUMP, KC_ENT , KC_N , KC_M , KC_COMM, KC_DOT , KC_SLSH, KC_RSFT, + //`--------+--------+--------+----+---+--------+--------+--------/ \--------+--------+--------+---+----+--------+--------+--------' + KC_LALT, KC_LOWR, KC_BSPC, KC_SPC , KC_RASE, KC_LALT + // `--------+--------+--------' `--------+--------+--------' + ), + + [_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_ESC , + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + 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_LCTL, KC_A , KC_S , KC_D , KC_F , KC_G , KC_H , KC_J , KC_K , KC_L , SE_ODIA, KC_RCTL, + //|--------+--------+--------+--------+--------+--------+--------. ,--------|--------+--------+--------+--------+--------+--------| + KC_LSFT, KC_Z , KC_X , KC_C , KC_V , KC_B , KC_NUMP, KC_ENT , KC_N , KC_M , KC_COMM, KC_DOT , KC_SLSH, KC_RSFT, + //`--------+--------+--------+----+---+--------+--------+--------/ \--------+--------+--------+---+----+--------+--------+--------' + KC_LALT, KC_LOWR, KC_BSPC, KC_SPC , KC_RASE, KC_LALT + // `--------+--------+--------' `--------+--------+--------' + ), + + [_DVORAK] = LAYOUT( + //,--------+--------+--------+--------+--------+--------. ,--------+--------+--------+--------+--------+--------. + KC_DEL , KC_APP , KC_VOLD, KC_MUTE, KC_VOLU, KC_LGUI, KC_GRV , KC_MPRV, KC_MPLY, KC_MNXT, KC_DOWN, KC_ESC , + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + KC_TAB , SE_ARNG, SE_ADIA, SE_ODIA, KC_P , KC_Y , KC_F , KC_G , KC_C , KC_R , KC_L ,KC_DEL , + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + KC_LCTL, KC_A , KC_O , KC_E , KC_U , KC_I , KC_D , KC_H , KC_T , KC_N , KC_S ,KC_RCTL , + //|--------+--------+--------+--------+--------+--------+--------. ,--------|--------+--------+--------+--------+--------+--------| + KC_LSFT, KC_DOT , KC_Q , KC_J , KC_K , KC_X , KC_NUMP, KC_ENT , KC_B , KC_M , KC_W , KC_V , KC_Z ,KC_RSFT , + //`--------+--------+--------+----+---+--------+--------+--------/ \--------+--------+--------+---+----+--------+--------+--------' + KC_LALT, KC_LOWR, KC_BSPC, KC_SPC , KC_RASE, KC_LALT + // `--------+--------+--------' `--------+--------+--------' + ), + + [_COLEMAK] = LAYOUT( + //,--------+--------+--------+--------+--------+--------. ,--------+--------+--------+--------+--------+--------. + KC_DEL , KC_APP , KC_VOLD, KC_MUTE, KC_VOLU, KC_LGUI, KC_GRV , KC_MPRV, KC_MPLY, KC_MNXT, KC_DOWN, KC_ESC , + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + KC_TAB , KC_Q , KC_W , KC_F , KC_P , KC_G , KC_J , KC_L , KC_U , KC_Y , SE_ARNG, SE_ADIA, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + KC_LCTL, KC_A , KC_R , KC_S , KC_T , KC_D , KC_H , KC_N , KC_E , KC_I , KC_O , SE_ODIA, + //|--------+--------+--------+--------+--------+--------+--------. ,--------|--------+--------+--------+--------+--------+--------| + KC_LSFT, KC_Z , KC_X , KC_C , KC_V , KC_B , KC_NUMP, KC_ENT , KC_K , KC_M , KC_COMM, KC_DOT , KC_SLSH, KC_RSFT, + //`--------+--------+--------+----+---+--------+--------+--------/ \--------+--------+--------+---+----+--------+--------+--------' + KC_LALT, KC_LOWR, KC_BSPC, KC_SPC , KC_RASE, KC_LALT + // `--------+--------+--------' `--------+--------+--------' + ), + +[_WORKMAN] = LAYOUT( + //,--------+--------+--------+--------+--------+--------. ,--------+--------+--------+--------+--------+--------. + KC_DEL , KC_APP , KC_VOLD, KC_MUTE, KC_VOLU, KC_LGUI, KC_GRV , KC_MPRV, KC_MPLY, KC_MNXT, KC_DOWN, KC_ESC , + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + KC_TAB , KC_Q , KC_W , KC_R , KC_W KC_B , KC_J , KC_F , KC_U , KC_P , SE_ARNG, SE_ODIA, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + KC_LCTL, KC_A , KC_S , KC_H , KC_T , KC_G , KC_Y , KC_N , KC_E , KC_O , KC_I , KC_RCTL, + //|--------+--------+--------+--------+--------+--------+--------. ,--------|--------+--------+--------+--------+--------+--------| + KC_LSFT, KC_Z , KC_X , KC_M , KC_C , KC_V , KC_NUMP, KC_ENT , KC_K , KC_L , SE_ADIA, KC_DOT , KC_SLSH, KC_RSFT, + //`--------+--------+--------+----+---+--------+--------+--------/ \--------+--------+--------+---+----+--------+--------+--------' + KC_LALT, KC_LOWR, KC_BSPC, KC_SPC , KC_RASE, KC_LALT + // `--------+--------+--------' `--------+--------+--------' + ), + + [_NUMPAD] = 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_MEH1, KC_BTN2, KC_MS_U, KC_BTN1, KC_CATDEL, KC_PIPE, KC_P7 , KC_P8 , KC_P9 , KC_SLSH, , + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + , KC_MEH4, KC_MS_L, KC_MS_D, KC_MS_R, KC_TSKMGR, KC_COMM, KC_P4 , KC_P5 , KC_P6 , KC_MINS, , + //|--------+--------+--------+--------+--------+--------+--------. ,--------|--------+--------+--------+--------+--------+--------| + , KC_MEH5, KC_ACL0, KC_ACL1, KC_ACL2, KC_MEH3, , KC_PENT , KC_DOT , KC_P1 , KC_P2 , KC_P3 , KC_P0 , , + //`--------+--------+--------+----+---+--------+--------+--------/ \--------+--------+--------+---+----+--------+--------+--------' + KC_LALT , KC_LOWR, KC_BSPC, , KC_P0 , KC_NLCK + // `--------+--------+--------' `--------+--------+--------' + ), + + + [_LOWER] = 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_CAPS, KC_PGUP, KC_UP , KC_PGDN, KC_ESC, KC_RCBR, KC_EXLM, KC_ASTR, KC_LPRN, KC_UNDS, , + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + , KC_HOME, KC_LEFT, KC_DOWN, KC_RGHT, KC_END, KC_RPRN, KC_QUES, SE_LBRC, SE_RBRC, KC_LABK, , + //|--------+--------+--------+--------+--------+--------+--------. ,--------|--------+--------+--------+--------+--------+--------| + , KC_ENT , , , , KC_DEL , , , KC_RABK, SE_LABK, SE_LCBR, SE_RCBR, SE_RABK, , + //`--------+--------+--------+----+---+--------+--------+--------/ \--------+--------+--------+---+----+--------+--------+--------' + , , , , , + // `--------+--------+--------' `--------+--------+--------' + ), + + [_RAISE] = LAYOUT( + //,--------+--------+--------+--------+--------+--------. ,--------+--------+--------+--------+--------+--------. + SE_TILD, KC_EXLM, KC_GRV , KC_EQL , KC_DLR , KC_PERC, SE_PND , SE_EURO , SE_YEN, SE_RCBR, KC_RPRN, , + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + , SE_PIPE , SE_AT , KC_HASH, KC_DQT , KC_PERC, KC_PIPE, KC_7 , KC_8 , KC_9 , KC_PMNS, KC_PSLS, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + , SE_BSLS, SE_TILD, SE_SLSH, KC_AMPR, KC_BSLS, KC_COMM, KC_4 , KC_5 , KC_6 , KC_PPLS, KC_PAST, + //|--------+--------+--------+--------+--------+--------+--------. ,--------|--------+--------+--------+--------+--------+--------| + , KC_PIPE, SE_CURR, KC_PLUS, KC_CIRC, KC_TILD, , KC_PENT , KC_DOT , KC_1 , KC_2 , KC_3 , KC_0 , KC_PEQL, + //`--------+--------+--------+----+---+--------+--------+--------/ \--------+--------+--------+---+----+--------+--------+--------' + , , KC_DEL , , , + // `--------+--------+--------' `--------+--------+--------' + ), + + [_ADJUST] = LAYOUT( + //,--------+--------+--------+--------+--------+--------. ,--------+--------+--------+--------+--------+--------. + GAMING , DVORAK, WORKMAN, COLEMAK, QWERTY , RESET, _______, _______, _______, _______, KC_PWR, RESET, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + _______, _______, _______,LGUI(KC_UP),_______,LALT(KC_F4), _______, RGB_TOG, RGB_MOD, RGB_HUI, RGB_SAI, RGB_VAI, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + _______, _______,LGUI(KC_LEFT),LGUI(KC_DOWN),LGUI(KC_RGHT),_______, _______, DEBUG , RGB_HUD, RGB_SAD, RGB_VAD, BL_STEP, + //|--------+--------+--------+--------+--------+--------+--------. ,--------|--------+--------+--------+--------+--------+--------| + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + //`--------+--------+--------+----+---+--------+--------+--------/ \--------+--------+--------+---+----+--------+--------+--------' + _______, _______, _______, _______, _______, _______ + // `--------+--------+--------' `--------+--------+--------' + ) + +}; + +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 DVORAK: + if (record->event.pressed) { + set_single_persistent_default_layer(_DVORAK); + } + return false; + case NUMPAD: + if (record->event.pressed) { + set_single_persistent_default_layer(_NUMPAD); + } + return false; + case COLEMAK: + if (record->event.pressed) { + set_single_persistent_default_layer(_COLEMAK); + } + return false; + case WORKMAN: + if (record->event.pressed) { + set_single_persistent_default_layer(_WORKMAN); + } + return false; + case GAMING: + if (record->event.pressed) { + set_single_persistent_default_layer(_GAMING); + } + return false; + } + return true; +} From d4dc2a577fbf6de948336288c6ca12359b48e50b Mon Sep 17 00:00:00 2001 From: Sergey Vlasov Date: Wed, 1 Jul 2020 23:32:21 +0300 Subject: [PATCH 307/930] Quefrency rev1: Fix default VIA layout options (#9618) Apparently VIA allocates bits in the layout options field from the lowest bit, but starting from the **last** option defined in the JSON file. So the default value 0x06 was actually trying to set the value `3` (`0b11`) for the second-to-last option ("Right Shift"), which had only 3 values defined, and the attempt to set an undefined option value caused the VIA app to hang with a black window. Fix the default layout options so that it works as intended (the "Macropad" and "65% Column" options are set). --- keyboards/keebio/quefrency/rev1/config.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/keyboards/keebio/quefrency/rev1/config.h b/keyboards/keebio/quefrency/rev1/config.h index 815a3e197172..e9379ab2ff5f 100644 --- a/keyboards/keebio/quefrency/rev1/config.h +++ b/keyboards/keebio/quefrency/rev1/config.h @@ -57,4 +57,4 @@ along with this program. If not, see . #define RGBLED_NUM 16 // Number of LEDs // Set 65% column (option 1) and Macro (option 2) on by default -#define VIA_EEPROM_LAYOUT_OPTIONS_DEFAULT 0x06 +#define VIA_EEPROM_LAYOUT_OPTIONS_DEFAULT 0x60 From 7c57efaaf9388e003422c8b2c15e4ecd8b10053c Mon Sep 17 00:00:00 2001 From: Ryan Date: Thu, 2 Jul 2020 15:47:53 +1000 Subject: [PATCH 308/930] Fix layouts for FM2U (#9604) * Fix layouts for FM2U * Leave old layout names as deprecated aliases --- keyboards/botanicalkeyboards/fm2u/fm2u.h | 95 ++++++++++++++++--- keyboards/botanicalkeyboards/fm2u/info.json | 93 ++++++++++-------- .../fm2u/keymaps/default/keymap.c | 4 +- .../fm2u/keymaps/via/keymap.c | 11 +-- 4 files changed, 140 insertions(+), 63 deletions(-) diff --git a/keyboards/botanicalkeyboards/fm2u/fm2u.h b/keyboards/botanicalkeyboards/fm2u/fm2u.h index eb5564afc353..83168032590f 100644 --- a/keyboards/botanicalkeyboards/fm2u/fm2u.h +++ b/keyboards/botanicalkeyboards/fm2u/fm2u.h @@ -26,21 +26,88 @@ * The second converts the arguments into a two-dimensional array which * represents the switch matrix. */ -#define LAYOUT_100u( \ +#define LAYOUT_1u( \ k00 \ -) \ -{ \ +) { \ { k00 } \ } -#define LAYOUT_125u LAYOUT_100u -#define LAYOUT_150u LAYOUT_100u -#define LAYOUT_175u LAYOUT_100u -#define LAYOUT_200u LAYOUT_100u -#define LAYOUT_225u LAYOUT_100u -#define LAYOUT_275u LAYOUT_100u -#define LAYOUT_300u LAYOUT_100u -#define LAYOUT_600u LAYOUT_100u -#define LAYOUT_625u LAYOUT_100u -#define LAYOUT_700u LAYOUT_100u -#define LAYOUT_iso LAYOUT_100u +#define LAYOUT_1u25( \ + k00 \ +) { \ + { k00 } \ +} + +#define LAYOUT_1u5( \ + k00 \ +) { \ + { k00 } \ +} + +#define LAYOUT_1u75( \ + k00 \ +) { \ + { k00 } \ +} + +#define LAYOUT_2u( \ + k00 \ +) { \ + { k00 } \ +} + +#define LAYOUT_2u25( \ + k00 \ +) { \ + { k00 } \ +} + +#define LAYOUT_2u75( \ + k00 \ +) { \ + { k00 } \ +} + +#define LAYOUT_3u( \ + k00 \ +) { \ + { k00 } \ +} + +#define LAYOUT_6u( \ + k00 \ +) { \ + { k00 } \ +} + +#define LAYOUT_6u25( \ + k00 \ +) { \ + { k00 } \ +} + +#define LAYOUT_7u( \ + k00 \ +) { \ + { k00 } \ +} + +#define LAYOUT_isoenter( \ + k00 \ +) { \ + { k00 } \ +} + +// Backward compatibility TODO: remove these +#define LAYOUT_100u LAYOUT_1u +#define LAYOUT_125u LAYOUT_1u25 +#define LAYOUT_150u LAYOUT_1u5 +#define LAYOUT_175u LAYOUT_1u75 +#define LAYOUT_200u LAYOUT_2u +#define LAYOUT_225u LAYOUT_2u25 +#define LAYOUT_275u LAYOUT_2u75 +#define LAYOUT_300u LAYOUT_3u +#define LAYOUT_600u LAYOUT_6u +#define LAYOUT_625u LAYOUT_6u25 +#define LAYOUT_700u LAYOUT_7u +#define LAYOUT_iso LAYOUT_isoenter diff --git a/keyboards/botanicalkeyboards/fm2u/info.json b/keyboards/botanicalkeyboards/fm2u/info.json index 6831dad94452..1798e19435d5 100644 --- a/keyboards/botanicalkeyboards/fm2u/info.json +++ b/keyboards/botanicalkeyboards/fm2u/info.json @@ -1,56 +1,69 @@ { - "keyboard_name": "fm2u", - "url": "", - "maintainer": "qmk", - "width": 1, - "height": 1, + "keyboard_name": "Botanical Keyboards FM2U", + "url": "", + "maintainer": "qmk", + "width": 1, + "height": 1, "layouts": { - "LAYOUT_100u": { - "layout": [{"x":0, "y":0}] + "LAYOUT_1u": { + "layout": [ + {"x": 0, "y": 0} + ] }, - - "LAYOUT_125u": { - "layout": [{"x":0, "y":0, "w":1.25}] + "LAYOUT_1u25": { + "layout": [ + {"x": 0, "y": 0, "w": 1.25} + ] }, - - "LAYOUT_150u": { - "layout": [{"x":0, "y":0, "w":1.50}] + "LAYOUT_1u5": { + "layout": [ + {"x": 0, "y": 0, "w": 1.50} + ] }, - - "LAYOUT_175u": { - "layout": [{"x":0, "y":0, "w":1.75}] + "LAYOUT_1u75": { + "layout": [ + {"x": 0, "y": 0, "w": 1.75} + ] }, - - "LAYOUT_200u": { - "layout": [{"x":0, "y":0, "w":2.00}] + "LAYOUT_2u": { + "layout": [ + {"x": 0, "y": 0, "w": 2} + ] }, - - "LAYOUT_225u": { - "layout": [{"x":0, "y":0, "w":2.25}] + "LAYOUT_2u25": { + "layout": [ + {"x": 0, "y": 0, "w": 2.25} + ] }, - - "LAYOUT_275u": { - "layout": [{"x":0, "y":0, "w":2.75}] + "LAYOUT_2u75": { + "layout": [ + {"x": 0, "y": 0, "w": 2.75} + ] }, - - "LAYOUT_300u": { - "layout": [{"x":0, "y":0, "w":3.00}] + "LAYOUT_3u": { + "layout": [ + {"x": 0, "y": 0, "w": 3} + ] }, - - "LAYOUT_600u": { - "layout": [{"x":0, "y":0, "w":6.00}] + "LAYOUT_6u": { + "layout": [ + {"x": 0, "y": 0, "w": 6} + ] }, - - "LAYOUT_625u": { - "layout": [{"x":0, "y":0, "w":6.25}] + "LAYOUT_6u25": { + "layout": [ + {"x": 0, "y": 0, "w": 6.25} + ] }, - - "LAYOUT_700u": { - "layout": [{"x":0, "y":0, "w":7.00}] + "LAYOUT_7u": { + "layout": [ + {"x": 0, "y": 0, "w": 7} + ] }, - - "LAYOUT_iso": { - "layout": [{"x":0.25, "y":0, "w":1.25, "h":2}] + "LAYOUT_isoenter": { + "layout": [ + {"x": 0.25, "y": 0, "w": 1.25, "h": 2} + ] } } } diff --git a/keyboards/botanicalkeyboards/fm2u/keymaps/default/keymap.c b/keyboards/botanicalkeyboards/fm2u/keymaps/default/keymap.c index afefa35334bc..b1c7eb9d3619 100644 --- a/keyboards/botanicalkeyboards/fm2u/keymaps/default/keymap.c +++ b/keyboards/botanicalkeyboards/fm2u/keymaps/default/keymap.c @@ -15,11 +15,9 @@ */ #include QMK_KEYBOARD_H - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Base */ - [0] = LAYOUT_100u( + [0] = LAYOUT_2u( KC_B ) }; - diff --git a/keyboards/botanicalkeyboards/fm2u/keymaps/via/keymap.c b/keyboards/botanicalkeyboards/fm2u/keymaps/via/keymap.c index 01b00f187815..2adc87a13bef 100644 --- a/keyboards/botanicalkeyboards/fm2u/keymaps/via/keymap.c +++ b/keyboards/botanicalkeyboards/fm2u/keymaps/via/keymap.c @@ -18,20 +18,19 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Base */ - [0] = LAYOUT_100u( + [0] = LAYOUT_2u( KC_B ), - [1] = LAYOUT_100u( + [1] = LAYOUT_2u( KC_TRNS ), - [2] = LAYOUT_100u( + [2] = LAYOUT_2u( KC_TRNS ), - [3] = LAYOUT_100u( + [3] = LAYOUT_2u( KC_TRNS - ), + ) }; - From bd4c66a26b79a97c116a7dfa2b9351312c544dc2 Mon Sep 17 00:00:00 2001 From: Maarten Dekkers Date: Thu, 2 Jul 2020 10:19:17 +0200 Subject: [PATCH 309/930] Eon65 (#9331) Co-authored-by: Maarten Dekkers --- keyboards/maartenwut/eon65/config.h | 220 ++++++++++ keyboards/maartenwut/eon65/eon65.c | 16 + keyboards/maartenwut/eon65/eon65.h | 103 +++++ keyboards/maartenwut/eon65/info.json | 392 ++++++++++++++++++ .../maartenwut/eon65/keymaps/default/keymap.c | 32 ++ .../maartenwut/eon65/keymaps/via/keymap.c | 43 ++ .../maartenwut/eon65/keymaps/via/rules.mk | 2 + keyboards/maartenwut/eon65/readme.md | 13 + keyboards/maartenwut/eon65/rules.mk | 34 ++ 9 files changed, 855 insertions(+) create mode 100644 keyboards/maartenwut/eon65/config.h create mode 100644 keyboards/maartenwut/eon65/eon65.c create mode 100644 keyboards/maartenwut/eon65/eon65.h create mode 100644 keyboards/maartenwut/eon65/info.json create mode 100644 keyboards/maartenwut/eon65/keymaps/default/keymap.c create mode 100644 keyboards/maartenwut/eon65/keymaps/via/keymap.c create mode 100644 keyboards/maartenwut/eon65/keymaps/via/rules.mk create mode 100644 keyboards/maartenwut/eon65/readme.md create mode 100644 keyboards/maartenwut/eon65/rules.mk diff --git a/keyboards/maartenwut/eon65/config.h b/keyboards/maartenwut/eon65/config.h new file mode 100644 index 000000000000..bfb23569b400 --- /dev/null +++ b/keyboards/maartenwut/eon65/config.h @@ -0,0 +1,220 @@ +/* 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 0xAEB4 +#define DEVICE_VER 0x0001 +#define MANUFACTURER Maartenwut +#define PRODUCT Eon65 +#define DESCRIPTION A 65% PCB + +/* key matrix size */ +#define MATRIX_ROWS 5 +#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 {D3,D5,B1,B2,B3} +#define MATRIX_COL_PINS {B0,D2,D4,D6,D7,B4,B5,B6,C6,C7,F7,F6,F5,F4,F1,F0} +#define UNUSED_PINS {B7,D0,D1} + +/* 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 10 +// #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 0 diff --git a/keyboards/maartenwut/eon65/eon65.c b/keyboards/maartenwut/eon65/eon65.c new file mode 100644 index 000000000000..3571509dc9d0 --- /dev/null +++ b/keyboards/maartenwut/eon65/eon65.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 "eon65.h" diff --git a/keyboards/maartenwut/eon65/eon65.h b/keyboards/maartenwut/eon65/eon65.h new file mode 100644 index 000000000000..0593df27f774 --- /dev/null +++ b/keyboards/maartenwut/eon65/eon65.h @@ -0,0 +1,103 @@ +/* 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, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0f, 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, k46, k49, k4a, k4b, k4c, k4d, k4e \ +) \ +{ \ + { 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, k1d, k1e, XXX }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2d, k2e, XXX }, \ + { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d, k3e, XXX }, \ + { k40, k41, k42, XXX, XXX, XXX, k46, XXX, XXX, k49, k4a, k4b, k4c, k4d, k4e, XXX } \ +} + +#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, k46, k49, k4a, k4b, k4c, k4d, k4e \ +) \ +{ \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, k0e, XXX }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d, k1e, XXX }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, XXX, k2d, k2e, XXX }, \ + { k30, XXX, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d, k3e, XXX }, \ + { k40, k41, k42, XXX, XXX, XXX, k46, XXX, XXX, k49, k4a, k4b, k4c, k4d, k4e, XXX } \ +} + +#define LAYOUT_65_ansi_blocker( \ + 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, k46, k49, k4a, k4c, k4d, k4e \ +) \ +{ \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, k0e, XXX }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d, k1e, XXX }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, XXX, k2d, k2e, XXX }, \ + { k30, XXX, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d, k3e, XXX }, \ + { k40, k41, k42, XXX, XXX, XXX, k46, XXX, XXX, k49, k4a, XXX, k4c, k4d, k4e, XXX } \ +} + +#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, k46, k49, k4a, k4b, k4c, k4d, k4e \ +) \ +{ \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, k0e, XXX }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, XXX, k1e, XXX }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2d, k2e, XXX }, \ + { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d, k3e, XXX }, \ + { k40, k41, k42, XXX, XXX, XXX, k46, XXX, XXX, k49, k4a, k4b, k4c, k4d, k4e, XXX } \ +} + +#define LAYOUT_65_iso_blocker( \ + 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, k46, k49, k4a, k4c, k4d, k4e \ +) \ +{ \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, k0e, XXX }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, XXX, k1e, XXX }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2d, k2e, XXX }, \ + { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d, k3e, XXX }, \ + { k40, k41, k42, XXX, XXX, XXX, k46, XXX, XXX, k49, k4a, XXX, k4c, k4d, k4e, XXX } \ +} diff --git a/keyboards/maartenwut/eon65/info.json b/keyboards/maartenwut/eon65/info.json new file mode 100644 index 000000000000..1a9f7495762c --- /dev/null +++ b/keyboards/maartenwut/eon65/info.json @@ -0,0 +1,392 @@ +{ + "keyboard_name": "Eon65", + "url": "", + "maintainer": "qmk", + "width": 16, + "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":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}, + {"x":13.75, "y":2, "w":1.25}, + {"x":15, "y":2}, + + {"x":0, "y":3, "w":1.25}, + {"x":1.25, "y":3}, + {"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_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_65_ansi_blocker": { + "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, "w":1.25}, + {"x":11.25, "y":4, "w":1.25}, + {"x":13, "y":4}, + {"x":14, "y":4}, + {"x":15, "y":4} + ] + }, + "LAYOUT_65_iso": { + "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":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}, + {"x":13.75, "y":1, "w":1.25, "h":2}, + {"x":15, "y":2}, + + {"x":0, "y":3, "w":1.25}, + {"x":1.25, "y":3}, + {"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_65_iso_blocker": { + "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":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}, + {"x":13.75, "y":1, "w":1.25, "h":2}, + {"x":15, "y":2}, + + {"x":0, "y":3, "w":1.25}, + {"x":1.25, "y":3}, + {"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, "w":1.25}, + {"x":11.25, "y":4, "w":1.25}, + {"x":13, "y":4}, + {"x":14, "y":4}, + {"x":15, "y":4} + ] + } + } +} diff --git a/keyboards/maartenwut/eon65/keymaps/default/keymap.c b/keyboards/maartenwut/eon65/keymaps/default/keymap.c new file mode 100644 index 000000000000..e5ef976e8246 --- /dev/null +++ b/keyboards/maartenwut/eon65/keymaps/default/keymap.c @@ -0,0 +1,32 @@ +/* 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 + +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_BSLS, 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_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, KC_RGUI, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT), +[1] = LAYOUT_all( + RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______), + +}; \ No newline at end of file diff --git a/keyboards/maartenwut/eon65/keymaps/via/keymap.c b/keyboards/maartenwut/eon65/keymaps/via/keymap.c new file mode 100644 index 000000000000..52a1f94203c5 --- /dev/null +++ b/keyboards/maartenwut/eon65/keymaps/via/keymap.c @@ -0,0 +1,43 @@ +/* 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 + +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_BSLS, 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_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_RCTL, KC_LEFT, KC_DOWN, KC_RGHT), +[1] = LAYOUT_all( + RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______), +[2] = LAYOUT_all( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______), +[3] = LAYOUT_all( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______) +}; \ No newline at end of file diff --git a/keyboards/maartenwut/eon65/keymaps/via/rules.mk b/keyboards/maartenwut/eon65/keymaps/via/rules.mk new file mode 100644 index 000000000000..36b7ba9cbc98 --- /dev/null +++ b/keyboards/maartenwut/eon65/keymaps/via/rules.mk @@ -0,0 +1,2 @@ +VIA_ENABLE = yes +LTO_ENABLE = yes diff --git a/keyboards/maartenwut/eon65/readme.md b/keyboards/maartenwut/eon65/readme.md new file mode 100644 index 000000000000..e77ad6826497 --- /dev/null +++ b/keyboards/maartenwut/eon65/readme.md @@ -0,0 +1,13 @@ +# Eon65 + +## Support +* Keyboard Maintainer: [Maarten Dekkers](https://github.com/maartenwut) +* Hardware Supported: Eon65 +* Hardware Availability: None + +## Build +Make example for this keyboard (after setting up your build environment): + + make maartenwut/eon65: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/eon65/rules.mk b/keyboards/maartenwut/eon65/rules.mk new file mode 100644 index 000000000000..e34ef7475a2b --- /dev/null +++ b/keyboards/maartenwut/eon65/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 = 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 + +LAYOUTS = 65_ansi 65_ansi_blocker 65_iso 65_iso_blocker From 0e76b2766181b2c6b155b9d5bc0143233cf5cdf1 Mon Sep 17 00:00:00 2001 From: Maarten Dekkers Date: Thu, 2 Jul 2020 17:02:39 +0200 Subject: [PATCH 310/930] Add Eon95 (#9334) Co-authored-by: Drashna Jaelre Co-authored-by: Maarten Dekkers --- keyboards/maartenwut/eon95/config.h | 222 ++++++++++++ keyboards/maartenwut/eon95/eon95.c | 45 +++ keyboards/maartenwut/eon95/eon95.h | 96 +++++ keyboards/maartenwut/eon95/info.json | 338 ++++++++++++++++++ .../maartenwut/eon95/keymaps/default/keymap.c | 34 ++ .../maartenwut/eon95/keymaps/via/keymap.c | 40 +++ .../maartenwut/eon95/keymaps/via/rules.mk | 2 + keyboards/maartenwut/eon95/readme.md | 13 + keyboards/maartenwut/eon95/rules.mk | 32 ++ 9 files changed, 822 insertions(+) create mode 100644 keyboards/maartenwut/eon95/config.h create mode 100644 keyboards/maartenwut/eon95/eon95.c create mode 100644 keyboards/maartenwut/eon95/eon95.h create mode 100644 keyboards/maartenwut/eon95/info.json create mode 100644 keyboards/maartenwut/eon95/keymaps/default/keymap.c create mode 100644 keyboards/maartenwut/eon95/keymaps/via/keymap.c create mode 100644 keyboards/maartenwut/eon95/keymaps/via/rules.mk create mode 100644 keyboards/maartenwut/eon95/readme.md create mode 100644 keyboards/maartenwut/eon95/rules.mk diff --git a/keyboards/maartenwut/eon95/config.h b/keyboards/maartenwut/eon95/config.h new file mode 100644 index 000000000000..d012d47c91bc --- /dev/null +++ b/keyboards/maartenwut/eon95/config.h @@ -0,0 +1,222 @@ +/* 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 0x8A18 +#define DEVICE_VER 0x0001 +#define MANUFACTURER Maartenwut +#define PRODUCT Eon95 +#define DESCRIPTION A 95% PCB + +/* key matrix size */ +#define MATRIX_ROWS 12 +#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 {D1,D0,D3,D2,D6,D4,D7,B4,B5,B6,C6,C7} +#define MATRIX_COL_PINS {E6,F0,F1,F4,F5,F6,F7,B3,B2,B1} +#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 D0 +// #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 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 0 + +#define DYNAMIC_KEYMAP_LAYER_COUNT 3 diff --git a/keyboards/maartenwut/eon95/eon95.c b/keyboards/maartenwut/eon95/eon95.c new file mode 100644 index 000000000000..b57cb30000cf --- /dev/null +++ b/keyboards/maartenwut/eon95/eon95.c @@ -0,0 +1,45 @@ +/* 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 "eon95.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 and high + setPinOutput(D5); + writePinHigh(D5); + + setPinOutput(B7); + writePinHigh(B7); + + setPinOutput(B0); + writePinHigh(B0); +} + +bool led_update_kb(led_t led_state) { + if(led_update_user(led_state)) { + writePin(D5, !led_state.caps_lock); + writePin(B7, !led_state.num_lock); + writePin(B0, !led_state.scroll_lock); + } + + return true; +} diff --git a/keyboards/maartenwut/eon95/eon95.h b/keyboards/maartenwut/eon95/eon95.h new file mode 100644 index 000000000000..7f7c84356946 --- /dev/null +++ b/keyboards/maartenwut/eon95/eon95.h @@ -0,0 +1,96 @@ +/* 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, k03, k13, k04, k14, k05, k15, k06, k16, k07, k17, k08, k18, k09, \ + k20, k30, k21, k31, k22, k32, k23, k33, k24, k34, k25, k35, k26, k36, k27, k37, k28, k38, k29, \ + k40, k50, k41, k51, k42, k52, k43, k53, k44, k54, k45, k55, k46, k47, k57, k48, k58, k49, \ + k60, k70, k61, k71, k62, k72, k63, k73, k64, k74, k65, k75, k66, k76, k77, k68, k78, k69, \ + k80, k90, k81, k91, k82, k92, k83, k93, k84, k94, k85, k95, k86, k87, k97, k88, k98, k89, \ + ka0, kb0, ka1, kb3, ka5, kb5, ka6, kb6, ka7, kb7, ka8, kb8 \ +) \ +{ \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09 }, \ + { k10, k11, XXX, k13, k14, k15, k16, k17, k18, XXX }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29 }, \ + { k30, k31, k32, k33, k34, k35, k36, k37, k38, XXX }, \ + { k40, k41, k42, k43, k44, k45, k46, k47, k48, k49 }, \ + { k50, k51, k52, k53, k54, k55, XXX, k57, k58, XXX }, \ + { k60, k61, k62, k63, k64, k65, k66, XXX, k68, k69 }, \ + { k70, k71, k72, k73, k74, k75, k76, k77, k78, XXX }, \ + { k80, k81, k82, k83, k84, k85, k86, k87, k88, k89 }, \ + { k90, k91, k92, k93, k94, k95, XXX, k97, k98, XXX }, \ + { ka0, ka1, XXX, XXX, XXX, ka5, ka6, ka7, ka8, XXX }, \ + { kb0, XXX, XXX, kb3, XXX, kb5, kb6, kb7, kb8, XXX } \ +} + +#define LAYOUT_ansi( \ + k00, k10, k01, k11, k02, k03, k13, k04, k14, k05, k15, k06, k16, k07, k17, k08, k18, k09, \ + k20, k30, k21, k31, k22, k32, k23, k33, k24, k34, k25, k35, k26, k27, k37, k28, k38, k29, \ + k40, k50, k41, k51, k42, k52, k43, k53, k44, k54, k45, k55, k46, k47, k57, k48, k58, \ + k60, k70, k61, k71, k62, k72, k63, k73, k64, k74, k65, k75, k76, k77, k68, k78, k69, \ + k80, k81, k91, k82, k92, k83, k93, k84, k94, k85, k95, k86, k87, k97, k88, k98, k89, \ + ka0, kb0, ka1, kb3, ka5, kb5, ka6, kb6, ka7, kb7, ka8, kb8 \ +) \ +{ \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09 }, \ + { k10, k11, XXX, k13, k14, k15, k16, k17, k18, XXX }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29 }, \ + { k30, k31, k32, k33, k34, k35, XXX, k37, k38, XXX }, \ + { k40, k41, k42, k43, k44, k45, k46, k47, k48, XXX }, \ + { k50, k51, k52, k53, k54, k55, XXX, k57, k58, XXX }, \ + { k60, k61, k62, k63, k64, k65, XXX, XXX, k68, k69 }, \ + { k70, k71, k72, k73, k74, k75, k76, k77, k78, XXX }, \ + { k80, k81, k82, k83, k84, k85, k86, k87, k88, k89 }, \ + { XXX, k91, k92, k93, k94, k95, XXX, k97, k98, XXX }, \ + { ka0, ka1, XXX, XXX, XXX, ka5, ka6, ka7, ka8, XXX }, \ + { kb0, XXX, XXX, kb3, XXX, kb5, kb6, kb7, kb8, XXX } \ +} +#define LAYOUT_iso( \ + k00, k10, k01, k11, k02, k03, k13, k04, k14, k05, k15, k06, k16, k07, k17, k08, k18, k09, \ + k20, k30, k21, k31, k22, k32, k23, k33, k24, k34, k25, k35, k26, k27, k37, k28, k38, k29, \ + k40, k50, k41, k51, k42, k52, k43, k53, k44, k54, k45, k55, k46, k57, k48, k58, \ + k60, k70, k61, k71, k62, k72, k63, k73, k64, k74, k65, k75, k66, k76, k77, k68, k78, k69, \ + k80, k90, k81, k91, k82, k92, k83, k93, k84, k94, k85, k95, k86, k87, k97, k88, k98, k89, \ + ka0, kb0, ka1, kb3, ka5, kb5, ka6, kb6, ka7, kb7, ka8, kb8 \ +) \ +{ \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09 }, \ + { k10, k11, XXX, k13, k14, k15, k16, k17, k18, XXX }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29 }, \ + { k30, k31, k32, k33, k34, k35, XXX, k37, k38, XXX }, \ + { k40, k41, k42, k43, k44, k45, k46, XXX, k48, XXX }, \ + { k50, k51, k52, k53, k54, k55, XXX, k57, k58, XXX }, \ + { k60, k61, k62, k63, k64, k65, k66, XXX, k68, k69 }, \ + { k70, k71, k72, k73, k74, k75, k76, k77, k78, XXX }, \ + { k80, k81, k82, k83, k84, k85, k86, k87, k88, k89 }, \ + { k90, k91, k92, k93, k94, k95, XXX, k97, k98, XXX }, \ + { ka0, ka1, XXX, XXX, XXX, ka5, ka6, ka7, ka8, XXX }, \ + { kb0, XXX, XXX, kb3, XXX, kb5, kb6, kb7, kb8, XXX } \ +} diff --git a/keyboards/maartenwut/eon95/info.json b/keyboards/maartenwut/eon95/info.json new file mode 100644 index 000000000000..740c9bb0cbe5 --- /dev/null +++ b/keyboards/maartenwut/eon95/info.json @@ -0,0 +1,338 @@ +{ + "keyboard_name": "Eon95", + "url": "", + "maintainer": "qmk", + "width": 19.5, + "height": 6.5, + "layouts": { + "LAYOUT_all": { + "layout": [ + {"x":0, "y":0}, + {"x":1.5, "y":0}, + {"x":2.5, "y":0}, + {"x":3.5, "y":0}, + {"x":4.5, "y":0}, + {"x":5.75, "y":0}, + {"x":6.75, "y":0}, + {"x":7.75, "y":0}, + {"x":8.75, "y":0}, + {"x":10, "y":0}, + {"x":11, "y":0}, + {"x":12, "y":0}, + {"x":13, "y":0}, + {"x":14.5, "y":0}, + {"x":15.5, "y":0}, + {"x":16.5, "y":0}, + {"x":17.5, "y":0}, + {"x":18.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, "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}, + {"x":14, "y":1.25}, + {"x":15.5, "y":1.25}, + {"x":16.5, "y":1.25}, + {"x":17.5, "y":1.25}, + {"x":18.5, "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.5, "y":2.25}, + {"x":16.5, "y":2.25}, + {"x":17.5, "y":2.25}, + {"x":18.5, "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":3.25, "w":1.25}, + {"x":15.5, "y":3.25}, + {"x":16.5, "y":3.25}, + {"x":17.5, "y":3.25}, + {"x":18.5, "y":3.25}, + + {"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.25, "y":4.5}, + {"x":15.5, "y":4.25}, + {"x":16.5, "y":4.25}, + {"x":17.5, "y":4.25}, + {"x":18.5, "y":4.25, "h":2}, + + {"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}, + {"x":11, "y":5.25}, + {"x":12, "y":5.25}, + {"x":13.25, "y":5.5}, + {"x":14.25, "y":5.5}, + {"x":15.25, "y":5.5}, + {"x":16.5, "y":5.25}, + {"x":17.5, "y":5.25} + ] + }, + "LAYOUT_ansi": { + "layout": [ + {"x":0, "y":0}, + {"x":1.5, "y":0}, + {"x":2.5, "y":0}, + {"x":3.5, "y":0}, + {"x":4.5, "y":0}, + {"x":5.75, "y":0}, + {"x":6.75, "y":0}, + {"x":7.75, "y":0}, + {"x":8.75, "y":0}, + {"x":10, "y":0}, + {"x":11, "y":0}, + {"x":12, "y":0}, + {"x":13, "y":0}, + {"x":14.5, "y":0}, + {"x":15.5, "y":0}, + {"x":16.5, "y":0}, + {"x":17.5, "y":0}, + {"x":18.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, "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.5, "y":1.25}, + {"x":16.5, "y":1.25}, + {"x":17.5, "y":1.25}, + {"x":18.5, "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.5, "y":2.25}, + {"x":16.5, "y":2.25}, + {"x":17.5, "y":2.25}, + {"x":18.5, "y":2.25, "h":2}, + + {"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":15.5, "y":3.25}, + {"x":16.5, "y":3.25}, + {"x":17.5, "y":3.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.25, "y":4.5}, + {"x":15.5, "y":4.25}, + {"x":16.5, "y":4.25}, + {"x":17.5, "y":4.25}, + {"x":18.5, "y":4.25, "h":2}, + + {"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}, + {"x":11, "y":5.25}, + {"x":12, "y":5.25}, + {"x":13.25, "y":5.5}, + {"x":14.25, "y":5.5}, + {"x":15.25, "y":5.5}, + {"x":16.5, "y":5.25}, + {"x":17.5, "y":5.25} + ] + }, + "LAYOUT_iso": { + "layout": [ + {"x":0, "y":0}, + {"x":1.5, "y":0}, + {"x":2.5, "y":0}, + {"x":3.5, "y":0}, + {"x":4.5, "y":0}, + {"x":5.75, "y":0}, + {"x":6.75, "y":0}, + {"x":7.75, "y":0}, + {"x":8.75, "y":0}, + {"x":10, "y":0}, + {"x":11, "y":0}, + {"x":12, "y":0}, + {"x":13, "y":0}, + {"x":14.5, "y":0}, + {"x":15.5, "y":0}, + {"x":16.5, "y":0}, + {"x":17.5, "y":0}, + {"x":18.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, "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.5, "y":1.25}, + {"x":16.5, "y":1.25}, + {"x":17.5, "y":1.25}, + {"x":18.5, "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.5, "y":2.25}, + {"x":16.5, "y":2.25}, + {"x":17.5, "y":2.25}, + {"x":18.5, "y":2.25, "h":2}, + + {"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":15.5, "y":3.25}, + {"x":16.5, "y":3.25}, + {"x":17.5, "y":3.25}, + + {"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.25, "y":4.5}, + {"x":15.5, "y":4.25}, + {"x":16.5, "y":4.25}, + {"x":17.5, "y":4.25}, + {"x":18.5, "y":4.25, "h":2}, + + {"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}, + {"x":11, "y":5.25}, + {"x":12, "y":5.25}, + {"x":13.25, "y":5.5}, + {"x":14.25, "y":5.5}, + {"x":15.25, "y":5.5}, + {"x":16.5, "y":5.25}, + {"x":17.5, "y":5.25} + ] + } + } +} diff --git a/keyboards/maartenwut/eon95/keymaps/default/keymap.c b/keyboards/maartenwut/eon95/keymaps/default/keymap.c new file mode 100644 index 000000000000..0976b53c1e40 --- /dev/null +++ b/keyboards/maartenwut/eon95/keymaps/default/keymap.c @@ -0,0 +1,34 @@ +/* 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 + +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_INS, KC_DEL, 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_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_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_RSFT, KC_UP, KC_P1, KC_P2, KC_P3, KC_PENT, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT, KC_P0, KC_PDOT), +[1] = LAYOUT_all( + RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______), + +}; \ No newline at end of file diff --git a/keyboards/maartenwut/eon95/keymaps/via/keymap.c b/keyboards/maartenwut/eon95/keymaps/via/keymap.c new file mode 100644 index 000000000000..12c6e2eedf32 --- /dev/null +++ b/keyboards/maartenwut/eon95/keymaps/via/keymap.c @@ -0,0 +1,40 @@ +/* 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 + +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_INS, KC_DEL, 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_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_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_RSFT, KC_UP, KC_P1, KC_P2, KC_P3, KC_PENT, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT, KC_P0, KC_PDOT), +[1] = LAYOUT_all( + RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______), +[2] = LAYOUT_all( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______) +}; \ No newline at end of file diff --git a/keyboards/maartenwut/eon95/keymaps/via/rules.mk b/keyboards/maartenwut/eon95/keymaps/via/rules.mk new file mode 100644 index 000000000000..36b7ba9cbc98 --- /dev/null +++ b/keyboards/maartenwut/eon95/keymaps/via/rules.mk @@ -0,0 +1,2 @@ +VIA_ENABLE = yes +LTO_ENABLE = yes diff --git a/keyboards/maartenwut/eon95/readme.md b/keyboards/maartenwut/eon95/readme.md new file mode 100644 index 000000000000..db6bac843a3b --- /dev/null +++ b/keyboards/maartenwut/eon95/readme.md @@ -0,0 +1,13 @@ +# Eon95 + +## Support +* Keyboard Maintainer: [Maarten Dekkers](https://github.com/maartenwut) +* Hardware Supported: Eon95 +* Hardware Availability: None + +## Build +Make example for this keyboard (after setting up your build environment): + + make maartenwut/eon95: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/eon95/rules.mk b/keyboards/maartenwut/eon95/rules.mk new file mode 100644 index 000000000000..264e0ea67d2d --- /dev/null +++ b/keyboards/maartenwut/eon95/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 = 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 From 97c18bfbc41c53a7ae7c6d12a676e919fe376153 Mon Sep 17 00:00:00 2001 From: akscanb Date: Thu, 2 Jul 2020 08:09:23 -0700 Subject: [PATCH 311/930] Arisu keymapping, and corresponding via keymap (#9560) Co-authored-by: Ryan Co-authored-by: Erovia Co-authored-by: Will Co-authored-by: Andrew Koh --- keyboards/arisu/arisu.c | 16 ++ keyboards/arisu/arisu.h | 42 +++++ keyboards/arisu/config.h | 208 ++++++++++++++++++++++ keyboards/arisu/keymaps/default/keymap.c | 34 ++++ keyboards/arisu/keymaps/default/readme.md | 1 + keyboards/arisu/keymaps/fate/keymap.c | 67 +++++++ keyboards/arisu/keymaps/fate/readme.md | 1 + keyboards/arisu/keymaps/fate/rules.mk | 1 + keyboards/arisu/keymaps/kresnak/keymap.c | 39 ++++ keyboards/arisu/keymaps/via/keymap.c | 49 +++++ keyboards/arisu/keymaps/via/rules.mk | 1 + keyboards/arisu/readme.md | 17 ++ keyboards/arisu/rules.mk | 24 +++ 13 files changed, 500 insertions(+) create mode 100644 keyboards/arisu/arisu.c create mode 100644 keyboards/arisu/arisu.h create mode 100644 keyboards/arisu/config.h create mode 100644 keyboards/arisu/keymaps/default/keymap.c create mode 100644 keyboards/arisu/keymaps/default/readme.md create mode 100644 keyboards/arisu/keymaps/fate/keymap.c create mode 100644 keyboards/arisu/keymaps/fate/readme.md create mode 100644 keyboards/arisu/keymaps/fate/rules.mk create mode 100644 keyboards/arisu/keymaps/kresnak/keymap.c create mode 100644 keyboards/arisu/keymaps/via/keymap.c create mode 100644 keyboards/arisu/keymaps/via/rules.mk create mode 100644 keyboards/arisu/readme.md create mode 100644 keyboards/arisu/rules.mk diff --git a/keyboards/arisu/arisu.c b/keyboards/arisu/arisu.c new file mode 100644 index 000000000000..443b67e9bf64 --- /dev/null +++ b/keyboards/arisu/arisu.c @@ -0,0 +1,16 @@ +/* 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 . + */ +#include "arisu.h" diff --git a/keyboards/arisu/arisu.h b/keyboards/arisu/arisu.h new file mode 100644 index 000000000000..1d123502ad4a --- /dev/null +++ b/keyboards/arisu/arisu.h @@ -0,0 +1,42 @@ +/* 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 XXX KC_NO +#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, k36, k37, k38, k39, k3A, k3B, k3D, \ + k40, k42, k44, k45, k47, k49, 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, XXX, k2E }, \ + { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, XXX, k3D, k3E }, \ + { k40, XXX, k42, XXX, k44, k45, XXX, k47, XXX, k49, XXX, XXX, k4C, k4D, k4E } \ +} diff --git a/keyboards/arisu/config.h b/keyboards/arisu/config.h new file mode 100644 index 000000000000..d23cf9102bf0 --- /dev/null +++ b/keyboards/arisu/config.h @@ -0,0 +1,208 @@ +/* +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 "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFA7E +#define PRODUCT_ID 0x0000 +#define DEVICE_VER 0x0001 +#define MANUFACTURER Fate +#define PRODUCT arisu +#define DESCRIPTION alice counterpart 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, B0, B7, B5, B4, D7, D6, B3 } +#define UNUSED_PINS + +/* COL2ROW, ROW2COL*/ +#define DIODE_DIRECTION COL2ROW + +// #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 diff --git a/keyboards/arisu/keymaps/default/keymap.c b/keyboards/arisu/keymaps/default/keymap.c new file mode 100644 index 000000000000..2563a36893b2 --- /dev/null +++ b/keyboards/arisu/keymaps/default/keymap.c @@ -0,0 +1,34 @@ +/* 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 . + */ +#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_BSLS, KC_GRV, 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_ENT, MO(1), + 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_SPC, KC_LGUI, KC_SPC, KC_RALT, KC_LEFT, KC_DOWN, KC_RGHT + ), + + [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, _______, _______, _______, + _______, _______, _______, _______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______ + ) +}; diff --git a/keyboards/arisu/keymaps/default/readme.md b/keyboards/arisu/keymaps/default/readme.md new file mode 100644 index 000000000000..f6d782cd996e --- /dev/null +++ b/keyboards/arisu/keymaps/default/readme.md @@ -0,0 +1 @@ +# The default keymap for arisu \ No newline at end of file diff --git a/keyboards/arisu/keymaps/fate/keymap.c b/keyboards/arisu/keymaps/fate/keymap.c new file mode 100644 index 000000000000..f737b4d19a3b --- /dev/null +++ b/keyboards/arisu/keymaps/fate/keymap.c @@ -0,0 +1,67 @@ +/* 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 . + */ +#include QMK_KEYBOARD_H + +enum arisu_layers { + _QWERTY, + _FN, + _ADJUST +}; + +// Tap Dance Declarations +enum { + TD_LALT_LGUI = 0, + TD_RALT_RGUI +}; + +#define FN MO(_FN) +#define ADJUST MO(_ADJUST) +#define LALT_LG TD(TD_LALT_LGUI) +#define RALT_RG TD(TD_RALT_RGUI) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_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_MINS, KC_EQL, KC_BSLS, KC_GRV, 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, ADJUST, + 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, LALT_LG, KC_SPC, FN, KC_SPC, RALT_RG, KC_LEFT, KC_DOWN, KC_RGHT + ), + + [_FN] = LAYOUT( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + KC_CAPS, _______, _______, _______, _______, _______, _______, KC_PSCR, KC_SLCK, KC_PAUS, _______, _______, _______, 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, _______, _______, _______, KC_APP, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + + [_ADJUST] = LAYOUT( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, + KC_CAPS, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL, KC_END, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MPLY, _______, + _______, _______, _______, _______, _______, RESET, _______, _______, _______, _______, _______, _______, KC_VOLU, + _______, _______, _______, _______, _______, _______, KC_MPRV, KC_VOLD, KC_MNXT + ) +}; + +// Tap Dance Definitions +qk_tap_dance_action_t tap_dance_actions[] = { + // Tap once for L-Alt, twice for L-GUI + [TD_LALT_LGUI] = ACTION_TAP_DANCE_DOUBLE(KC_LALT, KC_LGUI), + // Tap once for R-Alt, twice for R-GUI + [TD_RALT_RGUI] = ACTION_TAP_DANCE_DOUBLE(KC_RALT, KC_RGUI) +}; diff --git a/keyboards/arisu/keymaps/fate/readme.md b/keyboards/arisu/keymaps/fate/readme.md new file mode 100644 index 000000000000..c1239a09ffc1 --- /dev/null +++ b/keyboards/arisu/keymaps/fate/readme.md @@ -0,0 +1 @@ +# The keymap of arisu's creator \ No newline at end of file diff --git a/keyboards/arisu/keymaps/fate/rules.mk b/keyboards/arisu/keymaps/fate/rules.mk new file mode 100644 index 000000000000..e5ddcae8d927 --- /dev/null +++ b/keyboards/arisu/keymaps/fate/rules.mk @@ -0,0 +1 @@ +TAP_DANCE_ENABLE = yes diff --git a/keyboards/arisu/keymaps/kresnak/keymap.c b/keyboards/arisu/keymaps/kresnak/keymap.c new file mode 100644 index 000000000000..0a4b88367da7 --- /dev/null +++ b/keyboards/arisu/keymaps/kresnak/keymap.c @@ -0,0 +1,39 @@ +/* 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 . + */ +#include QMK_KEYBOARD_H + + +// Defines the keycodes used by our macros in process_record_user + +#define FN MO(1) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT( /* 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_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_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_ENT, FN, + 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_SPC, KC_LGUI, KC_SPC, KC_RALT, KC_LEFT, KC_DOWN, KC_RGHT + ), + + [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_DEL, KC_HOME, + _______, _______, _______, _______, RESET, _______, _______, _______, _______, _______, KC_PSCR, _______, _______, _______, 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_BSLS, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______ + ) +}; diff --git a/keyboards/arisu/keymaps/via/keymap.c b/keyboards/arisu/keymaps/via/keymap.c new file mode 100644 index 000000000000..3549a1bdea4d --- /dev/null +++ b/keyboards/arisu/keymaps/via/keymap.c @@ -0,0 +1,49 @@ +/* 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 . + */ +#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_BSLS, KC_GRV, 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_ENT, MO(1), + 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_SPC, KC_LGUI, KC_SPC, KC_RALT, KC_LEFT, KC_DOWN, KC_RGHT + ), + + [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, _______, _______, _______, + _______, _______, _______, _______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + + [2] = LAYOUT( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + [3] = LAYOUT( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______ + ) +}; diff --git a/keyboards/arisu/keymaps/via/rules.mk b/keyboards/arisu/keymaps/via/rules.mk new file mode 100644 index 000000000000..036bd6d1c3ec --- /dev/null +++ b/keyboards/arisu/keymaps/via/rules.mk @@ -0,0 +1 @@ +VIA_ENABLE = yes \ No newline at end of file diff --git a/keyboards/arisu/readme.md b/keyboards/arisu/readme.md new file mode 100644 index 000000000000..f6eab67158ce --- /dev/null +++ b/keyboards/arisu/readme.md @@ -0,0 +1,17 @@ +# arisu + +![Arisu](https://i.imgur.com/knt518E.jpg) +![Arisu-top](https://i.imgur.com/wsqCuEu.jpg) +![アリス](https://i.redd.it/n80mvj5v7ji21.jpg) + +A keyboard inspired by Lyn's EM7 and TGR Alice. + +* Keyboard Maintainer: [Fate](https://github.com/FateNozomi) +* Hardware Supported: Arisu +* Hardware Availability: [PCB](https://github.com/FateNozomi/arisu-pcb) + [Case](https://github.com/FateNozomi/arisu-case) + +Make example for this keyboard (after setting up your build environment): + + make arisu: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/arisu/rules.mk b/keyboards/arisu/rules.mk new file mode 100644 index 000000000000..de04a1164a41 --- /dev/null +++ b/keyboards/arisu/rules.mk @@ -0,0 +1,24 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +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 = 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 +FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches From e1cdfdc0e7b177ea8b4f3626959dabf316dd3b0c Mon Sep 17 00:00:00 2001 From: Jacky Tian Date: Thu, 2 Jul 2020 08:33:57 -0700 Subject: [PATCH 312/930] Add xjtian keymap for Planck (#9502) --- keyboards/planck/keymaps/xjtian/config.h | 7 ++ keyboards/planck/keymaps/xjtian/keymap.c | 111 ++++++++++++++++++++++ keyboards/planck/keymaps/xjtian/readme.md | 12 +++ 3 files changed, 130 insertions(+) create mode 100644 keyboards/planck/keymaps/xjtian/config.h create mode 100644 keyboards/planck/keymaps/xjtian/keymap.c create mode 100644 keyboards/planck/keymaps/xjtian/readme.md diff --git a/keyboards/planck/keymaps/xjtian/config.h b/keyboards/planck/keymaps/xjtian/config.h new file mode 100644 index 000000000000..b417c13c68e6 --- /dev/null +++ b/keyboards/planck/keymaps/xjtian/config.h @@ -0,0 +1,7 @@ +#pragma once + +#ifdef AUDIO_ENABLE + #define STARTUP_SONG SONG(PLANCK_SOUND) +#endif + +#define PERMISSIVE_HOLD diff --git a/keyboards/planck/keymaps/xjtian/keymap.c b/keyboards/planck/keymaps/xjtian/keymap.c new file mode 100644 index 000000000000..f3287738d34f --- /dev/null +++ b/keyboards/planck/keymaps/xjtian/keymap.c @@ -0,0 +1,111 @@ +#include QMK_KEYBOARD_H + + +enum planck_layers { + _QWERTY, + _NUM, + _SYMBOL, + _FUNCTION, + _ADJUST +}; + +#define MON MO(_NUM) +#define MOS MO(_SYMBOL) +#define MOF MO(_FUNCTION) +#define MOA MO(_ADJUST) +#define LTS LT(_SYMBOL, KC_ESC) +#define LTN LT(_NUM, KC_ENT) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +/* Qwerty + * ,---------------------------------------------------------------------------------------------------------. + * | Tab | Q | W | E | R | T | Y | U | I | O | P | Bksp | + * |-------+------+------+-------+----------+---------+-------+----------+-------+--------+------+-----------| + * |Esc/Ctl| A | S | D | F | G | H | J | K | L | ; | " | + * |-------+------+------+-------+----------+---------+-------+----------+-------+--------+------+-----------| + * | Shift | Z | X | C | V | B | N | M | , | . | / |Enter/Shift| + * |-------+------+------+-------+----------+---------+-------+----------+-------+--------+------+-----------| + * | Ctrl |L(Fn) | Alt | OS |Esc/L(Sym)|Shft/Bksp| Space |Ent/L(Num)|OS/Left|Alt/Down|Ctl/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, + 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, RSFT_T(KC_ENT), + KC_LCTL, MOF, KC_LALT, KC_LGUI, LTS, SFT_T(KC_BSPC), KC_SPC, LTN, GUI_T(KC_LEFT), ALT_T(KC_DOWN), CTL_T(KC_UP), KC_RGHT +), + + +/* Numbers, calculator + * ,-------------------------------------------------------------------------. + * | | | | | | | | = | - | * | / | Bksp | + * |------+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+------| + * | v | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | | + * |------+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+------| + * | v | | | | | | | | , | . | | v | + * |------+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+------| + * | v | v | v | v |L(Ad)| v | v | v | OS | Alt | Ctl | | + * `-------------------------------------------------------------------------' + */ +[_NUM] = LAYOUT_ortho_4x12( + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_EQUAL, KC_MINUS, KC_PAST, KC_SLSH, KC_BSPC, + _______, 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_NO, KC_NO, KC_NO, KC_NO, KC_COMM, KC_DOT, KC_NO, _______, + _______, _______, _______, _______, MOA, _______, _______, _______, KC_RGUI, KC_RALT, KC_RCTRL, KC_NO +), + +/* Symbols + * ,------------------------------------------------------------------------. + * | ` | ! | @ | # | $ | % | ^ | & | * | - | = | Bksp | + * |-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+------| + * | v | | | | { | ( | [ | ] | ) | } | \ | ' | | + * |-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+------| + * | v | ~ | | | | | | | | _ | + | v | + * |-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+------| + * | v | v | v | v | v | v | v |L(Ad)| OS | Alt | Ctl | | + * `------------------------------------------------------------------------' + */ +[_SYMBOL] = LAYOUT_ortho_4x12( + KC_GRV, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_MINS, KC_EQL, KC_BSPC, + _______, KC_NO, KC_PIPE, KC_LCBR, KC_LPRN, KC_LBRC, KC_RBRC, KC_RPRN, KC_RCBR, KC_BSLS, KC_QUOT, KC_NO, + _______, KC_TILD, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_UNDS, KC_PLUS, _______, + _______, _______, _______, _______, _______, _______, _______, MOA, KC_RGUI, KC_RALT, KC_RCTRL, KC_NO +), + +/* Function keys + * ,------+------+------+------+------+------+------+------+------+------+------+------. + * | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | + * +------+------+------+------+------+------+------+------+------+------+------+------| + * | v | | | | Home | | | End | | | | | + * +------+------+------+------+------+------+------+------+------+------+------+------| + * | v | | | | | | | | | | | v | + * +------+------+------+------+------+------+------+------+------+------+------+------| + * | v | v | v | v | v | v | v | v | OS | Alt | Ctl | | + * .-----------------------------------------------------------------------------------' + */ +[_FUNCTION] = 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_NO, KC_NO, KC_NO, KC_HOME, KC_NO, KC_NO, 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, KC_NO, _______, + _______, _______, _______, _______, _______, _______, _______, _______, KC_RGUI, KC_RALT, KC_RCTRL, KC_NO +), + +/* Adjust (Num + Symbol) + * ,-----------------------------------------------------------------------------------. + * | | | | | | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | Left | Down | Up | Right| | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | |Rewind| Vol- | Stop | Play | Vol+ | Skip | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * |RESET | | | | | | | | | | | | + * `-----------------------------------------------------------------------------------' + */ +[_ADJUST] = LAYOUT_ortho_4x12( + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_NO, KC_NO, KC_NO, KC_MRWD, KC_VOLD, KC_MSTP, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_NO, KC_NO, + KC_NO, KC_NO, KC_NO, KC_MRWD, KC_VOLD, KC_MSTP, KC_MPLY, KC_VOLU, KC_MFFD, 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 +), +}; diff --git a/keyboards/planck/keymaps/xjtian/readme.md b/keyboards/planck/keymaps/xjtian/readme.md new file mode 100644 index 000000000000..f541f0004a85 --- /dev/null +++ b/keyboards/planck/keymaps/xjtian/readme.md @@ -0,0 +1,12 @@ +# Jacky Tian's Planck Layout + +This is a layout for a 4x12 grid layout Planck board with 3 custom layers and +a bare-bones adjust layer. I've kept the layers sparse and tried to keep +symbols close to where they would be on a standard staggered layout when +possible so I don't have to rewire my muscle memory. + +I've generally tried to avoid having to hit the shift key for symbols so +there's some duplication on the symbol layer. To me it's worth it since +I'm using grid layout so I have the extra keys to support this. I find typing +scoping delimiters like brackets and braces is much nicer only having to hit +a single thumb key instead of two thumb keys or thumb + shift. From d1819f02dfac40408ceb51a59c32eb8e898e8810 Mon Sep 17 00:00:00 2001 From: Manna Harbour <51143715+manna-harbour@users.noreply.github.com> Date: Fri, 3 Jul 2020 03:04:55 +1000 Subject: [PATCH 313/930] Fix sharing of mouse button state from mousekeys to ps2_mouse (#9124) With this change, when ps2_mouse is disabled, mousekeys works as usual. With ps2_mouse enabled, mousekeys button state is shared with ps2_mouse for clicking, dragging, and scrolling, mousekeys clicks are produced by ps2_mouse only, and mouskeys button state is transferred to mousekeys without generating clicks to enable mousekeys dragging. Co-authored-by: Drashna Jaelre Co-authored-by: Drashna Jaelre --- tmk_core/common/action.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/tmk_core/common/action.c b/tmk_core/common/action.c index 82be9cc9209c..69bcf8e56b74 100644 --- a/tmk_core/common/action.c +++ b/tmk_core/common/action.c @@ -400,7 +400,9 @@ void process_action(keyrecord_t *record, action_t action) { /* Mouse key */ case ACT_MOUSEKEY: if (event.pressed) { + mousekey_on(action.key.code); switch (action.key.code) { +# ifdef PS2_MOUSE_ENABLE case KC_MS_BTN1: tp_buttons |= (1 << 0); break; @@ -410,13 +412,15 @@ void process_action(keyrecord_t *record, action_t action) { case KC_MS_BTN3: tp_buttons |= (1 << 2); break; +# endif default: + mousekey_send(); break; } - mousekey_on(action.key.code); - mousekey_send(); } else { + mousekey_off(action.key.code); switch (action.key.code) { +# ifdef PS2_MOUSE_ENABLE case KC_MS_BTN1: tp_buttons &= ~(1 << 0); break; @@ -426,11 +430,11 @@ void process_action(keyrecord_t *record, action_t action) { case KC_MS_BTN3: tp_buttons &= ~(1 << 2); break; +# endif default: + mousekey_send(); break; } - mousekey_off(action.key.code); - mousekey_send(); } break; #endif From 65c9da5a657744578cf70b520736221209bf793b Mon Sep 17 00:00:00 2001 From: Dongfeng Yu <60870777+blockader@users.noreply.github.com> Date: Fri, 3 Jul 2020 01:05:38 +0800 Subject: [PATCH 314/930] [Keymap] Adding a Custom Keymap for Matrix Noah (#9581) Co-authored-by: Ryan --- .../matrix/noah/keymaps/blockader/config.h | 3 + .../matrix/noah/keymaps/blockader/keymap.c | 652 ++++++++++++++++++ .../matrix/noah/keymaps/blockader/rules.mk | 2 + keyboards/matrix/noah/noah.c | 2 +- 4 files changed, 658 insertions(+), 1 deletion(-) create mode 100644 keyboards/matrix/noah/keymaps/blockader/config.h create mode 100644 keyboards/matrix/noah/keymaps/blockader/keymap.c create mode 100644 keyboards/matrix/noah/keymaps/blockader/rules.mk diff --git a/keyboards/matrix/noah/keymaps/blockader/config.h b/keyboards/matrix/noah/keymaps/blockader/config.h new file mode 100644 index 000000000000..a64261ba9d1a --- /dev/null +++ b/keyboards/matrix/noah/keymaps/blockader/config.h @@ -0,0 +1,3 @@ +#pragma once + +#define TAPPING_TOGGLE 2 diff --git a/keyboards/matrix/noah/keymaps/blockader/keymap.c b/keyboards/matrix/noah/keymaps/blockader/keymap.c new file mode 100644 index 000000000000..433fa9f9efd8 --- /dev/null +++ b/keyboards/matrix/noah/keymaps/blockader/keymap.c @@ -0,0 +1,652 @@ +#include QMK_KEYBOARD_H + +enum { + LAYER_NORM_BASE, + LAYER_NORM_EXTENSION, + LAYER_RACE_BASE, + LAYER_RACE_EXTENSION, + LAYER_LEGACY_BASE, + LAYER_LEGACY_EXTENSION, + LAYER_CONTROL, + LAYER_WINDOW, + LAYER_DESKTOP, + NUMBER_OF_LAYERS, +}; + +bool temporary[NUMBER_OF_LAYERS] = { + [LAYER_NORM_BASE] = false, + [LAYER_NORM_EXTENSION] = true, + [LAYER_RACE_BASE] = false, + [LAYER_RACE_EXTENSION] = true, + [LAYER_LEGACY_BASE] = false, + [LAYER_LEGACY_EXTENSION] = true, + [LAYER_CONTROL] = false, + [LAYER_WINDOW] = true, + [LAYER_DESKTOP] = false, +}; + +#define KEY_FORWARD_LAYER(a) SAFE_RANGE + a + +enum{ + DANCE_PGDN_BOTTOM, + DANCE_PGUP_TOP, +}; + +qk_tap_dance_action_t tap_dance_actions[] = { + [DANCE_PGDN_BOTTOM] = ACTION_TAP_DANCE_DOUBLE(KC_PGDN, LGUI(KC_DOWN)), + [DANCE_PGUP_TOP] = ACTION_TAP_DANCE_DOUBLE(KC_PGUP, LGUI(KC_UP)), +}; + +#define KEY_DANCE(a) TD(a) + +enum custom_keycodes { + KEY_BACK_LAYER = SAFE_RANGE + NUMBER_OF_LAYERS, + KEY_INSERT_LINE_START, + KEY_INSERT_HERE, + KEY_INSERT_LINE_END, + KEY_CREATE_PREVIOUS_LINE, + KEY_CREATE_NEXT_LINE, + KEY_CUT_WORD, + KEY_CUT_LINE, + KEY_CUT_SELECTION, +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [LAYER_NORM_BASE] = LAYOUT_default_splitspace( + KC_GRAVE, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KEY_DANCE(DANCE_PGDN_BOTTOM), KEY_DANCE(DANCE_PGUP_TOP), KC_NO, KEY_CUT_LINE, KEY_FORWARD_LAYER(LAYER_RACE_BASE), + KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_LCBR, KC_RCBR, KC_BSLS, KEY_FORWARD_LAYER(LAYER_LEGACY_BASE), + KC_CAPS, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, KC_ENT, KEY_FORWARD_LAYER(LAYER_DESKTOP), + 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_NO, LCTL(KC_LEFT), + KC_LCTL, KC_LGUI, KC_LALT, KEY_FORWARD_LAYER(LAYER_NORM_EXTENSION), KEY_FORWARD_LAYER(LAYER_CONTROL), KC_SPC, KC_RALT, KC_RGUI, KC_NO, KC_NO, LCTL(KC_RIGHT)), + [LAYER_NORM_EXTENSION] = LAYOUT_default_splitspace( + LGUI(LSFT(KC_4)), KC_NO, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_MPLY, KC_MUTE, KC_VOLD, KC_VOLU, KC_NO, LCTL(KC_C), KEY_FORWARD_LAYER(LAYER_RACE_BASE), + KEY_FORWARD_LAYER(LAYER_WINDOW), LGUI(KC_SPC), LCTL(KC_SPC), KC_ESC, KC_TILD, KC_EXLM, KC_PEQL, KC_PLUS, KC_MINUS, KC_PIPE, KC_COLN, KC_LCBR, KC_RCBR, KEY_CREATE_PREVIOUS_LINE, KEY_FORWARD_LAYER(LAYER_LEGACY_BASE), + KEY_CUT_WORD, LALT(KC_LEFT), LALT(KC_RIGHT), KC_BSPC, LGUI(KC_LEFT), LCTL(KC_E), KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT, LGUI(KC_V), KC_DQUO, KEY_CREATE_NEXT_LINE, KEY_FORWARD_LAYER(LAYER_DESKTOP), + KC_LSFT, LGUI(KC_Z), KEY_CUT_SELECTION, KC_LPRN, KC_RPRN, KC_UNDS, KC_LBRC, KC_RBRC, KC_LT, KC_GT, KC_QUES, KC_RSFT, KC_NO, LCTL(KC_LEFT), + KC_LCTL, KC_LGUI, KC_LALT, KC_NO, KEY_FORWARD_LAYER(LAYER_CONTROL), KC_SPC, KC_RALT, KC_RGUI, KC_NO, RESET, LCTL(KC_RIGHT)), + [LAYER_RACE_BASE] = LAYOUT_default_splitspace( + KC_NO, 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, KEY_BACK_LAYER, + KC_NO, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_LCBR, KC_RCBR, KC_BSLS, KC_NO, + KC_CAPS, 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_NO, + 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_NO, KC_NO, + KC_NO, KC_NO, KC_NO, KEY_FORWARD_LAYER(LAYER_RACE_EXTENSION), KC_NO, KC_SPC, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO), + [LAYER_RACE_EXTENSION] = LAYOUT_default_splitspace( + KC_NO, KC_1, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_9, KC_0, KC_NO, KC_NO, KC_NO, KEY_CUT_LINE, KEY_BACK_LAYER, + KC_NO, KC_Q, KC_W, KC_F, KC_TILD, KC_EXLM, KC_PEQL, KC_PLUS, KC_MINUS, KC_PIPE, KC_COLN, KC_LCBR, KC_RCBR, KC_BSLS, KC_NO, + KEY_CUT_LINE, KC_A, KC_R, KC_BSPC, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_DQUO, KC_ENT, KC_NO, + KC_LSFT, KC_Z, KC_X, KC_LPRN, KC_RPRN, KC_UNDS, KC_LBRC, KC_RBRC, KC_LT, KC_GT, KC_QUES, KC_RSFT, KC_NO, KC_NO, + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_SPC, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO), + [LAYER_LEGACY_BASE] = LAYOUT_default_splitspace( + KC_GRAVE, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KEY_DANCE(DANCE_PGDN_BOTTOM), KEY_DANCE(DANCE_PGUP_TOP), KC_NO, KEY_CUT_LINE, 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_LCBR, KC_RCBR, KC_BSLS, KEY_BACK_LAYER, + 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, KEY_FORWARD_LAYER(LAYER_DESKTOP), + 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_NO, LCTL(KC_LEFT), + KC_LCTL, KC_LGUI, KC_LALT, KEY_FORWARD_LAYER(LAYER_LEGACY_EXTENSION), KEY_FORWARD_LAYER(LAYER_CONTROL), KC_SPC, KC_RALT, KC_RGUI, KC_NO, KC_NO, LCTL(KC_RIGHT)), + [LAYER_LEGACY_EXTENSION] = LAYOUT_default_splitspace( + LGUI(LSFT(KC_4)), KC_NO, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_MPLY, KC_MUTE, KC_VOLD, KC_VOLU, KC_NO, LCTL(KC_C), KC_NO, + KEY_FORWARD_LAYER(LAYER_WINDOW), LGUI(KC_SPC), LCTL(KC_SPC), KC_ESC, KC_TILD, KC_EXLM, KC_PEQL, KC_PLUS, KC_MINUS, KC_PIPE, KC_COLN, KC_LCBR, KC_RCBR, KEY_CREATE_PREVIOUS_LINE, KEY_BACK_LAYER, + KEY_CUT_WORD, LALT(KC_LEFT), LALT(KC_RIGHT), KC_BSPC, LGUI(KC_LEFT), LCTL(KC_E), KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT, LGUI(KC_V), KC_DQUO, KEY_CREATE_NEXT_LINE, KEY_FORWARD_LAYER(LAYER_DESKTOP), + KC_LSFT, LGUI(KC_Z), KEY_CUT_SELECTION, KC_LPRN, KC_RPRN, KC_UNDS, KC_LBRC, KC_RBRC, KC_LT, KC_GT, KC_QUES, KC_RSFT, KC_NO, LCTL(KC_LEFT), + KC_LCTL, KC_LGUI, KC_LALT, KC_NO, KEY_FORWARD_LAYER(LAYER_CONTROL), KC_SPC, KC_RALT, KC_RGUI, KC_NO, KC_NO, LCTL(KC_RIGHT)), + [LAYER_CONTROL] = LAYOUT_default_splitspace( + KC_NO, 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_NO, + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KEY_INSERT_LINE_START, KEY_INSERT_HERE, KEY_INSERT_LINE_END, KC_NO, KC_NO, KC_NO, KEY_CREATE_PREVIOUS_LINE, KC_NO, + KEY_CUT_WORD, LALT(KC_LEFT), LALT(KC_RIGHT), KC_BSPC, LGUI(KC_LEFT), LCTL(KC_E), KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT, LGUI(KC_V), KC_NO, KEY_CREATE_NEXT_LINE, KC_NO, + KC_LSFT, LGUI(KC_Z), KEY_CUT_SELECTION, LGUI(KC_C), LGUI(KC_V), KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_RSFT, KC_NO, KC_NO, + KC_NO, KC_NO, KC_NO, KC_NO, KEY_BACK_LAYER, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO), + [LAYER_WINDOW] = LAYOUT_default_splitspace( + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KEY_BACK_LAYER, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_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_UP, KC_RIGHT, KC_NO, KC_NO, KEY_BACK_LAYER, KC_NO, + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KEY_BACK_LAYER, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO), + [LAYER_DESKTOP] = LAYOUT_default_splitspace( + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, LCTL(KC_LEFT), KC_NO, KC_NO, LCTL(KC_RIGHT), KC_NO, KC_NO, KEY_BACK_LAYER, KEY_BACK_LAYER, + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KEY_BACK_LAYER, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO), +}; + +int layers[16]; + +struct { + bool back; +} common_layer_data; +struct { + int operator, multiplier; +} layer_control_data; + +struct { + int start_time; +} layer_window_data; + +bool handle_layer_key(uint16_t key, keyrecord_t* record) { + switch (layers[layers[0] + 1]) { + case LAYER_CONTROL: + switch (key) { + case KC_0: + if (record->event.pressed) { + layer_control_data.multiplier = layer_control_data.multiplier * 10; + if (layer_control_data.multiplier < 0) layer_control_data.multiplier = 0; + } + return false; + case KC_1: + if (record->event.pressed) { + layer_control_data.multiplier = layer_control_data.multiplier * 10 + 1; + if (layer_control_data.multiplier < 0) layer_control_data.multiplier = 0; + } + return false; + case KC_2: + if (record->event.pressed) { + layer_control_data.multiplier = layer_control_data.multiplier * 10 + 2; + if (layer_control_data.multiplier < 0) layer_control_data.multiplier = 0; + } + return false; + case KC_3: + if (record->event.pressed) { + layer_control_data.multiplier = layer_control_data.multiplier * 10 + 3; + if (layer_control_data.multiplier < 0) layer_control_data.multiplier = 0; + } + return false; + case KC_4: + if (record->event.pressed) { + layer_control_data.multiplier = layer_control_data.multiplier * 10 + 4; + if (layer_control_data.multiplier < 0) layer_control_data.multiplier = 0; + } + return false; + case KC_5: + if (record->event.pressed) { + layer_control_data.multiplier = layer_control_data.multiplier * 10 + 5; + if (layer_control_data.multiplier < 0) layer_control_data.multiplier = 0; + } + return false; + case KC_6: + if (record->event.pressed) { + layer_control_data.multiplier = layer_control_data.multiplier * 10 + 6; + if (layer_control_data.multiplier < 0) layer_control_data.multiplier = 0; + } + return false; + case KC_7: + if (record->event.pressed) { + layer_control_data.multiplier = layer_control_data.multiplier * 10 + 7; + if (layer_control_data.multiplier < 0) layer_control_data.multiplier = 0; + } + return false; + case KC_8: + if (record->event.pressed) { + layer_control_data.multiplier = layer_control_data.multiplier * 10 + 8; + if (layer_control_data.multiplier < 0) layer_control_data.multiplier = 0; + } + return false; + case KC_9: + if (record->event.pressed) { + layer_control_data.multiplier = layer_control_data.multiplier * 10 + 9; + if (layer_control_data.multiplier < 0) layer_control_data.multiplier = 0; + } + return false; + case KEY_INSERT_LINE_START: + if (record->event.pressed) common_layer_data.back = true; + return true; + case KEY_INSERT_HERE: + if (record->event.pressed) common_layer_data.back = true; + return true; + case KEY_INSERT_LINE_END: + if (record->event.pressed) common_layer_data.back = true; + return true; + case KEY_CREATE_PREVIOUS_LINE: + if (record->event.pressed) common_layer_data.back = true; + return true; + case KEY_CUT_WORD: + if (record->event.pressed) { + if (layer_control_data.operator== - 1) { + register_code(KC_LALT); + tap_code(KC_LEFT); + tap_code(KC_RIGHT); + unregister_code(KC_LALT); + for (int i = 0; i < (layer_control_data.multiplier ? layer_control_data.multiplier : 1); ++i) tap_code16(LSFT(LALT(KC_LEFT))); + tap_code16(LGUI(KC_X)); + } + layer_control_data.multiplier = 0; + layer_control_data.operator = - 1; + } + return false; + case LALT(KC_LEFT): + if (layer_control_data.operator== - 1 && layer_control_data.multiplier == 0) return true; + if (record->event.pressed) { + if (layer_control_data.operator== - 1) + for (int i = 0; i < (layer_control_data.multiplier ? layer_control_data.multiplier : 1); ++i) tap_code16(LALT(KC_LEFT)); + else if (layer_control_data.operator== KC_BSPC) { + register_code(KC_LALT); + tap_code(KC_LEFT); + tap_code(KC_RIGHT); + unregister_code(KC_LALT); + for (int i = 0; i < (layer_control_data.multiplier ? layer_control_data.multiplier : 1); ++i) tap_code16(LSFT(LALT(KC_LEFT))); + tap_code16(LGUI(KC_X)); + } else if (layer_control_data.operator== LGUI(KC_C)) { + register_code(KC_LALT); + tap_code(KC_LEFT); + tap_code(KC_RIGHT); + unregister_code(KC_LALT); + for (int i = 0; i < (layer_control_data.multiplier ? layer_control_data.multiplier : 1); ++i) tap_code16(LSFT(LALT(KC_LEFT))); + tap_code16(LGUI(KC_C)); + tap_code(KC_RIGHT); + } + layer_control_data.multiplier = 0; + layer_control_data.operator = - 1; + } + return false; + case LALT(KC_RIGHT): + if (layer_control_data.operator== - 1 && layer_control_data.multiplier == 0) return true; + if (record->event.pressed) { + if (layer_control_data.operator== - 1) + for (int i = 0; i < (layer_control_data.multiplier ? layer_control_data.multiplier : 1); ++i) tap_code16(LALT(KC_RIGHT)); + else if (layer_control_data.operator== KC_BSPC) { + register_code(KC_LALT); + tap_code(KC_RIGHT); + tap_code(KC_LEFT); + unregister_code(KC_LALT); + for (int i = 0; i < (layer_control_data.multiplier ? layer_control_data.multiplier : 1); ++i) tap_code16(LSFT(LALT(KC_RIGHT))); + tap_code16(LGUI(KC_X)); + } else if (layer_control_data.operator== LGUI(KC_C)) { + register_code(KC_LALT); + tap_code(KC_RIGHT); + tap_code(KC_LEFT); + unregister_code(KC_LALT); + for (int i = 0; i < (layer_control_data.multiplier ? layer_control_data.multiplier : 1); ++i) tap_code16(LSFT(LALT(KC_RIGHT))); + tap_code16(LGUI(KC_C)); + tap_code(KC_LEFT); + } + layer_control_data.multiplier = 0; + layer_control_data.operator = - 1; + } + return false; + case LGUI(KC_LEFT): + if (record->event.pressed) { + if (layer_control_data.operator== - 1) + tap_code16(LGUI(KC_LEFT)); + else if (layer_control_data.operator== KC_BSPC) { + tap_code16(LSFT(LGUI(KC_LEFT))); + tap_code16(LGUI(KC_X)); + } else if (layer_control_data.operator== LGUI(KC_C)) { + tap_code16(LSFT(LGUI(KC_LEFT))); + tap_code16(LGUI(KC_C)); + tap_code(KC_RIGHT); + } + layer_control_data.multiplier = 0; + layer_control_data.operator = - 1; + } + return false; + case LCTL(KC_E): + if (record->event.pressed) { + if (layer_control_data.operator== - 1) + tap_code16(LCTL(KC_E)); + else if (layer_control_data.operator== KC_BSPC) { + tap_code16(LSFT(LCTL(KC_E))); + tap_code16(LGUI(KC_X)); + } else if (layer_control_data.operator== LGUI(KC_C)) { + tap_code16(LSFT(LCTL(KC_E))); + tap_code16(LGUI(KC_C)); + tap_code(KC_LEFT); + } + layer_control_data.multiplier = 0; + layer_control_data.operator = - 1; + } + return false; + case KC_BSPC: + if (record->event.pressed) { + if (get_mods() & MOD_MASK_SHIFT) { + unregister_code(KC_LSHIFT); + tap_code16(LGUI(KC_X)); + register_code(KC_LSHIFT); + layer_control_data.multiplier = 0; + layer_control_data.operator = - 1; + } else if (layer_control_data.operator== - 1) + layer_control_data.operator= KC_BSPC; + else { + if (layer_control_data.operator== KC_BSPC) { + tap_code16(LCTL(KC_A)); + for (int i = 0; i < (layer_control_data.multiplier ? layer_control_data.multiplier : 1); ++i) tap_code16(LSFT(KC_DOWN)); + tap_code16(LGUI(KC_X)); + } + layer_control_data.multiplier = 0; + layer_control_data.operator = - 1; + } + } + return false; + case KC_LEFT: + if (layer_control_data.operator== - 1 && layer_control_data.multiplier == 0) return true; + if (record->event.pressed) { + if (layer_control_data.operator== - 1) + for (int i = 0; i < (layer_control_data.multiplier ? layer_control_data.multiplier : 1); ++i) tap_code(KC_LEFT); + else if (layer_control_data.operator== KC_BSPC) { + for (int i = 0; i < (layer_control_data.multiplier ? layer_control_data.multiplier : 1); ++i) tap_code16(LSFT(KC_LEFT)); + tap_code16(LGUI(KC_X)); + } else if (layer_control_data.operator== LGUI(KC_C)) { + for (int i = 0; i < (layer_control_data.multiplier ? layer_control_data.multiplier : 1); ++i) tap_code16(LSFT(KC_LEFT)); + tap_code16(LGUI(KC_C)); + tap_code(KC_RIGHT); + } + layer_control_data.multiplier = 0; + layer_control_data.operator = - 1; + } + return false; + case KC_DOWN: + if (layer_control_data.operator== - 1 && layer_control_data.multiplier == 0) return true; + if (record->event.pressed) { + if (layer_control_data.operator== - 1) + for (int i = 0; i < (layer_control_data.multiplier ? layer_control_data.multiplier : 1); ++i) tap_code(KC_DOWN); + else if (layer_control_data.operator== KC_BSPC) { + tap_code16(LCTL(KC_A)); + for (int i = 0; i < (layer_control_data.multiplier ? layer_control_data.multiplier : 1); ++i) tap_code16(LSFT(KC_DOWN)); + tap_code16(LGUI(KC_X)); + } else if (layer_control_data.operator== LGUI(KC_C)) { + tap_code16(LCTL(KC_A)); + for (int i = 0; i < (layer_control_data.multiplier ? layer_control_data.multiplier : 1); ++i) tap_code16(LSFT(KC_DOWN)); + tap_code16(LGUI(KC_C)); + tap_code(KC_LEFT); + } + layer_control_data.multiplier = 0; + layer_control_data.operator = - 1; + } + return false; + case KC_UP: + if (layer_control_data.operator== - 1 && layer_control_data.multiplier == 0) return true; + if (record->event.pressed) { + if (layer_control_data.operator== - 1) + for (int i = 0; i < (layer_control_data.multiplier ? layer_control_data.multiplier : 1); ++i) tap_code(KC_UP); + else if (layer_control_data.operator== KC_BSPC) { + tap_code16(LCTL(KC_E)); + for (int i = 0; i < (layer_control_data.multiplier ? layer_control_data.multiplier : 1); ++i) tap_code16(LSFT(KC_UP)); + tap_code16(LSFT(LCTL(KC_E))); + tap_code16(LGUI(KC_X)); + } else if (layer_control_data.operator== LGUI(KC_C)) { + tap_code16(LCTL(KC_E)); + for (int i = 0; i < (layer_control_data.multiplier ? layer_control_data.multiplier : 1); ++i) tap_code16(LSFT(KC_UP)); + tap_code16(LSFT(LCTL(KC_E))); + tap_code16(LGUI(KC_C)); + tap_code(KC_RIGHT); + } + layer_control_data.multiplier = 0; + layer_control_data.operator = - 1; + } + return false; + case KC_RIGHT: + if (layer_control_data.operator== - 1 && layer_control_data.multiplier == 0) return true; + if (record->event.pressed) { + if (layer_control_data.operator== - 1) + for (int i = 0; i < (layer_control_data.multiplier ? layer_control_data.multiplier : 1); ++i) tap_code(KC_RIGHT); + else if (layer_control_data.operator== KC_BSPC) { + for (int i = 0; i < (layer_control_data.multiplier ? layer_control_data.multiplier : 1); ++i) tap_code16(LSFT(KC_RIGHT)); + tap_code16(LGUI(KC_X)); + } else if (layer_control_data.operator== LGUI(KC_C)) { + for (int i = 0; i < (layer_control_data.multiplier ? layer_control_data.multiplier : 1); ++i) tap_code16(LSFT(KC_RIGHT)); + tap_code16(LGUI(KC_C)); + tap_code(KC_LEFT); + } + layer_control_data.multiplier = 0; + layer_control_data.operator = - 1; + } + return false; + case KEY_CREATE_NEXT_LINE: + if (record->event.pressed) common_layer_data.back = true; + return true; + case LGUI(KC_Z): + if (layer_control_data.operator== - 1 && layer_control_data.multiplier == 0) return true; + if (record->event.pressed) { + if (layer_control_data.operator== - 1) + for (int i = 0; i < (layer_control_data.multiplier ? layer_control_data.multiplier : 1); ++i) tap_code16(LGUI(KC_Z)); + layer_control_data.multiplier = 0; + layer_control_data.operator = - 1; + } + return false; + case LGUI(KC_C): + if (record->event.pressed) { + if (get_mods() & MOD_MASK_SHIFT) { + unregister_code(KC_LSHIFT); + tap_code16(LGUI(KC_C)); + register_code(KC_LSHIFT); + layer_control_data.multiplier = 0; + layer_control_data.operator = - 1; + } else if (layer_control_data.operator== - 1) + layer_control_data.operator= LGUI(KC_C); + else { + if (layer_control_data.operator== LGUI(KC_C)) { + tap_code16(LCTL(KC_A)); + for (int i = 0; i < (layer_control_data.multiplier ? layer_control_data.multiplier : 1); ++i) tap_code16(LSFT(KC_DOWN)); + tap_code16(LGUI(KC_C)); + tap_code(KC_LEFT); + } + layer_control_data.multiplier = 0; + layer_control_data.operator = - 1; + } + } + return false; + case LGUI(KC_V): + if (record->event.pressed) { + if (get_mods() & MOD_MASK_SHIFT) { + unregister_code(KC_LSHIFT); + for (int i = 0; i < (layer_control_data.multiplier ? layer_control_data.multiplier : 1); ++i) tap_code16(LGUI(KC_V)); + register_code(KC_LSHIFT); + layer_control_data.multiplier = 0; + layer_control_data.operator = - 1; + } else { + for (int i = 0; i < (layer_control_data.multiplier ? layer_control_data.multiplier : 1); ++i) tap_code16(LGUI(KC_V)); + layer_control_data.multiplier = 0; + layer_control_data.operator = - 1; + } + } + return false; + } + layer_control_data.multiplier = 0; + layer_control_data.operator = - 1; + return true; + case LAYER_WINDOW: + switch (key) { + case SAFE_RANGE + LAYER_WINDOW: + if (!record->event.pressed) { + if (timer_elapsed(layer_window_data.start_time) < 200) + temporary[LAYER_WINDOW] = true; + else + temporary[LAYER_WINDOW] = false; + } + return true; + case KEY_BACK_LAYER: + if (record->event.pressed) tap_code(KC_ENTER); + return true; + } + return true; + case LAYER_DESKTOP: + switch (key) { + case KEY_BACK_LAYER: + if (record->event.pressed) tap_code16(LCTL(KC_UP)); + return true; + } + return true; + } + return true; +} + +void handle_layer_start(void) { + rgblight_disable_noeeprom(); + switch (layers[layers[0] + 1]) { + case LAYER_RACE_BASE: + case LAYER_RACE_EXTENSION: + rgblight_enable_noeeprom(); + rgblight_sethsv_noeeprom(HSV_GREEN); + rgblight_mode_noeeprom(RGBLIGHT_MODE_STATIC_LIGHT); + return; + case LAYER_LEGACY_BASE: + case LAYER_LEGACY_EXTENSION: + rgblight_enable_noeeprom(); + rgblight_sethsv_noeeprom(HSV_RED); + rgblight_mode_noeeprom(RGBLIGHT_MODE_STATIC_LIGHT); + return; + case LAYER_CONTROL: + layer_control_data.operator = - 1; + layer_control_data.multiplier = 0; + rgblight_enable_noeeprom(); + rgblight_sethsv_noeeprom(HSV_BLUE); + rgblight_mode_noeeprom(RGBLIGHT_MODE_STATIC_LIGHT); + return; + case LAYER_WINDOW: + register_code(KC_LGUI); + tap_code(KC_TAB); + layer_window_data.start_time = timer_read(); + return; + case LAYER_DESKTOP: + tap_code16(LCTL(KC_UP)); + return; + } +} + +void handle_layer_return(void) { + rgblight_disable_noeeprom(); + switch (layers[layers[0] + 1]) { + case LAYER_RACE_BASE: + case LAYER_RACE_EXTENSION: + rgblight_enable_noeeprom(); + rgblight_sethsv_noeeprom(HSV_GREEN); + rgblight_mode_noeeprom(RGBLIGHT_MODE_STATIC_LIGHT); + return; + case LAYER_LEGACY_BASE: + case LAYER_LEGACY_EXTENSION: + rgblight_enable_noeeprom(); + rgblight_sethsv_noeeprom(HSV_RED); + rgblight_mode_noeeprom(RGBLIGHT_MODE_STATIC_LIGHT); + return; + case LAYER_CONTROL: + layer_control_data.operator = - 1; + layer_control_data.multiplier = 0; + rgblight_enable_noeeprom(); + rgblight_sethsv_noeeprom(HSV_BLUE); + rgblight_mode_noeeprom(RGBLIGHT_MODE_STATIC_LIGHT); + return; + } +} + +void handle_layer_end(void) { + switch (layers[layers[0] + 1]) { + case LAYER_WINDOW: + unregister_code(KC_LGUI); + return; + } +} + +void update_layer(void) { + layer_clear(); + common_layer_data.back = false; + layer_on(layers[layers[0] + 1]); +} + +bool handle_call_key(uint16_t key, keyrecord_t* record) { + switch (key) { + case KEY_BACK_LAYER: + if (record->event.pressed) { + if (layers[0]) { + handle_layer_end(); + --layers[0]; + update_layer(); + handle_layer_return(); + } + } + return false; + } + if (key >= SAFE_RANGE && key < SAFE_RANGE + NUMBER_OF_LAYERS) { + int new_layer = key - SAFE_RANGE; + if (record->event.pressed) { + if (layers[layers[0] + 1] != new_layer) { + if (temporary[layers[layers[0] + 1]]) { + handle_layer_end(); + layers[layers[0] + 1] = new_layer; + } else + layers[++layers[0] + 1] = new_layer; + update_layer(); + handle_layer_start(); + } + } else { + if (layers[layers[0] + 1] == new_layer && temporary[layers[layers[0] + 1]]) { + handle_layer_end(); + --layers[0]; + update_layer(); + handle_layer_return(); + } + } + return false; + } + if (common_layer_data.back) { + if (layers[0]) { + handle_layer_end(); + --layers[0]; + update_layer(); + handle_layer_return(); + } + } + return true; +} + +bool handle_common_key(uint16_t key, keyrecord_t* record) { + switch (key) { + case KEY_INSERT_LINE_START: + if (record->event.pressed) tap_code16(LGUI(KC_LEFT)); + return false; + case KEY_INSERT_HERE: + return false; + case KEY_INSERT_LINE_END: + if (record->event.pressed) tap_code16(LGUI(KC_RIGHT)); + return false; + case KEY_CREATE_PREVIOUS_LINE: + if (record->event.pressed) { + tap_code16(LGUI(KC_LEFT)); + tap_code(KC_ENTER); + tap_code(KC_UP); + } + return false; + case KEY_CREATE_NEXT_LINE: + if (record->event.pressed) { + tap_code16(LGUI(KC_RIGHT)); + tap_code(KC_ENTER); + } + return false; + case KEY_CUT_WORD: + if (record->event.pressed) { + register_code(KC_LALT); + tap_code(KC_LEFT); + tap_code(KC_RIGHT); + unregister_code(KC_LALT); + tap_code16(LSFT(LALT(KC_LEFT))); + tap_code16(LGUI(KC_X)); + } + return false; + case KEY_CUT_LINE: + if (record->event.pressed) { + tap_code16(LGUI(KC_RIGHT)); + tap_code16(LSFT(LGUI(KC_LEFT))); + tap_code16(LGUI(KC_X)); + } + return false; + case KEY_CUT_SELECTION: + if (record->event.pressed) { + if (get_mods() & MOD_MASK_SHIFT) { + unregister_code(KC_LSHIFT); + tap_code16(LGUI(KC_X)); + register_code(KC_LSHIFT); + } else + tap_code16(LGUI(KC_X)); + } + return false; + } + return true; +} + +bool process_record_user(uint16_t key, keyrecord_t* record) { + if (!handle_layer_key(key, record)) return false; + if (!handle_call_key(key, record)) return false; + return handle_common_key(key, record); +} + +void keyboard_post_init_user() { + rgblight_disable_noeeprom(); + rgb_matrix_disable(); + common_layer_data.back = false; +} diff --git a/keyboards/matrix/noah/keymaps/blockader/rules.mk b/keyboards/matrix/noah/keymaps/blockader/rules.mk new file mode 100644 index 000000000000..610cc234237d --- /dev/null +++ b/keyboards/matrix/noah/keymaps/blockader/rules.mk @@ -0,0 +1,2 @@ +TAP_DANCE_ENABLE = yes +DYNAMIC_MACRO_ENABLE = yes diff --git a/keyboards/matrix/noah/noah.c b/keyboards/matrix/noah/noah.c index cf33404434b6..1e2f4bb7d93f 100644 --- a/keyboards/matrix/noah/noah.c +++ b/keyboards/matrix/noah/noah.c @@ -229,5 +229,5 @@ bool process_record_kb(uint16_t keycode, keyrecord_t *record) { break; } } - return true; + return process_record_user(keycode, record); } From 00fc35539d774c43cde383a8d2cc8b254787ce6c Mon Sep 17 00:00:00 2001 From: Ryan Date: Fri, 3 Jul 2020 03:08:19 +1000 Subject: [PATCH 315/930] Make sendstring respect `TAP_CODE_DELAY` (#9623) --- quantum/quantum.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/quantum/quantum.c b/quantum/quantum.c index 75df357d3354..044a15612845 100644 --- a/quantum/quantum.c +++ b/quantum/quantum.c @@ -438,8 +438,7 @@ void send_string_with_delay(const char *str, uint8_t interval) { if (ascii_code == SS_TAP_CODE) { // tap uint8_t keycode = *(++str); - register_code(keycode); - unregister_code(keycode); + tap_code(keycode); } else if (ascii_code == SS_DOWN_CODE) { // down uint8_t keycode = *(++str); @@ -480,8 +479,7 @@ void send_string_with_delay_P(const char *str, uint8_t interval) { if (ascii_code == SS_TAP_CODE) { // tap uint8_t keycode = pgm_read_byte(++str); - register_code(keycode); - unregister_code(keycode); + tap_code(keycode); } else if (ascii_code == SS_DOWN_CODE) { // down uint8_t keycode = pgm_read_byte(++str); From b7dc2eb9ab2bb3c6ac9ac8e975728002e0e9d62d Mon Sep 17 00:00:00 2001 From: Manna Harbour <51143715+manna-harbour@users.noreply.github.com> Date: Fri, 3 Jul 2020 06:54:15 +1000 Subject: [PATCH 316/930] Add movement hook to ps2_mouse (#8805) Process mouse movement in the keymap before it is sent to the host. Example uses include filtering noise, adding acceleration, and automatically activating a layer. To use, define the following function in your keymap: void ps2_mouse_moved_user(report_mouse_t *mouse_report); --- docs/feature_ps2_mouse.md | 10 ++++++++++ tmk_core/protocol/ps2_mouse.c | 5 +++++ tmk_core/protocol/ps2_mouse.h | 3 +++ 3 files changed, 18 insertions(+) diff --git a/docs/feature_ps2_mouse.md b/docs/feature_ps2_mouse.md index c1bd8bff50a8..e549810855a6 100644 --- a/docs/feature_ps2_mouse.md +++ b/docs/feature_ps2_mouse.md @@ -294,3 +294,13 @@ To debug the mouse, add `debug_mouse = true` or enable via bootmagic. #define PS2_MOUSE_DEBUG_HID #define PS2_MOUSE_DEBUG_RAW ``` + +### Movement Hook :id=movement-hook + +Process mouse movement in the keymap before it is sent to the host. Example +uses include filtering noise, adding acceleration, and automatically activating +a layer. To use, define the following function in your keymap: + +```c +void ps2_mouse_moved_user(report_mouse_t *mouse_report); +``` diff --git a/tmk_core/protocol/ps2_mouse.c b/tmk_core/protocol/ps2_mouse.c index a0e52bc7c3a5..8df465026bff 100644 --- a/tmk_core/protocol/ps2_mouse.c +++ b/tmk_core/protocol/ps2_mouse.c @@ -68,6 +68,8 @@ void ps2_mouse_init(void) { __attribute__((weak)) void ps2_mouse_init_user(void) {} +__attribute__((weak)) void ps2_mouse_moved_user(report_mouse_t *mouse_report) {} + void ps2_mouse_task(void) { static uint8_t buttons_prev = 0; extern int tp_buttons; @@ -98,6 +100,9 @@ void ps2_mouse_task(void) { #if PS2_MOUSE_SCROLL_BTN_MASK ps2_mouse_scroll_button_task(&mouse_report); #endif + if (mouse_report.x || mouse_report.y || mouse_report.v) { + ps2_mouse_moved_user(&mouse_report); + } #ifdef PS2_MOUSE_DEBUG_HID // Used to debug the bytes sent to the host ps2_mouse_print_report(&mouse_report); diff --git a/tmk_core/protocol/ps2_mouse.h b/tmk_core/protocol/ps2_mouse.h index 30053ef18703..d743fb3d85e5 100644 --- a/tmk_core/protocol/ps2_mouse.h +++ b/tmk_core/protocol/ps2_mouse.h @@ -20,6 +20,7 @@ along with this program. If not, see . #include #include "debug.h" +#include "report.h" #define PS2_MOUSE_SEND(command, message) \ do { \ @@ -174,4 +175,6 @@ void ps2_mouse_set_resolution(ps2_mouse_resolution_t resolution); void ps2_mouse_set_sample_rate(ps2_mouse_sample_rate_t sample_rate); +void ps2_mouse_moved_user(report_mouse_t *mouse_report); + #endif From 8c66c5aa9b08d732329408847dc6cf7645e67ae1 Mon Sep 17 00:00:00 2001 From: Ramon Imbao Date: Fri, 3 Jul 2020 17:05:44 +0800 Subject: [PATCH 317/930] Fix incorrect layout for GHS.rar (#9597) Co-authored-by: Ryan --- keyboards/ghs/rar/config.h | 2 +- keyboards/ghs/rar/keymaps/default/keymap.c | 24 ++++++------- keyboards/ghs/rar/keymaps/iso/keymap.c | 24 ++++++------- keyboards/ghs/rar/keymaps/via/keymap.c | 42 +++++++++++----------- 4 files changed, 46 insertions(+), 46 deletions(-) diff --git a/keyboards/ghs/rar/config.h b/keyboards/ghs/rar/config.h index 0e41f47b3173..f3b425bc259f 100644 --- a/keyboards/ghs/rar/config.h +++ b/keyboards/ghs/rar/config.h @@ -25,7 +25,7 @@ along with this program. If not, see . #define DEVICE_VER 0x0001 #define MANUFACTURER Gone Hacking Studio #define PRODUCT GHS.RAR -#define DESCRIPTION A 75 % keyboard +#define DESCRIPTION A 75% keyboard /* key matrix size */ #define MATRIX_ROWS 12 diff --git a/keyboards/ghs/rar/keymaps/default/keymap.c b/keyboards/ghs/rar/keymaps/default/keymap.c index 3c644d4a2047..7e48f080cdea 100644 --- a/keyboards/ghs/rar/keymaps/default/keymap.c +++ b/keyboards/ghs/rar/keymaps/default/keymap.c @@ -24,19 +24,19 @@ enum layer_names { const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Base */ [_BASE] = LAYOUT_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_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_UP, KC_END, - KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), 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_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_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), KC_LEFT, KC_DOWN, KC_RGHT ), [_FN] = LAYOUT_ansi( - RGB_TOG, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, - KC_NO, KC_NO, 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_HUI, - KC_NO, KC_NO, 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_SAI, - KC_NO, 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_SAD, - 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_HUD, - KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, _______, RGB_MOD, RGB_VAD, RGB_RMOD, + RGB_TOG, XXXXXXX, XXXXXXX, XXXXXXX, 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_HUI, + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RGB_SAI, + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RGB_SAD, + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RGB_VAI, RGB_HUD, + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, RGB_MOD, RGB_VAD, RGB_RMOD ) }; diff --git a/keyboards/ghs/rar/keymaps/iso/keymap.c b/keyboards/ghs/rar/keymaps/iso/keymap.c index 661159f0367d..4af55102d38d 100644 --- a/keyboards/ghs/rar/keymaps/iso/keymap.c +++ b/keyboards/ghs/rar/keymaps/iso/keymap.c @@ -24,19 +24,19 @@ enum layer_names { const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Base */ [_BASE] = LAYOUT_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_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_ENT, 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_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_UP, KC_END, - KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), 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_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_ENT, 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_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_RALT, MO(1), KC_LEFT, KC_DOWN, KC_RGHT ), [_FN] = LAYOUT_iso( - RGB_TOG, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, - KC_NO, KC_NO, 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_HUI, - KC_NO, KC_NO, 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_SAI, - KC_NO, 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_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, RGB_VAI, RGB_HUD, - KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, _______, RGB_MOD, RGB_VAD, RGB_RMOD, + RGB_TOG, XXXXXXX, XXXXXXX, XXXXXXX, 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_HUI, + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RGB_SAI, + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RGB_SAD, + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RGB_VAI, RGB_HUD, + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, RGB_MOD, RGB_VAD, RGB_RMOD ) }; diff --git a/keyboards/ghs/rar/keymaps/via/keymap.c b/keyboards/ghs/rar/keymaps/via/keymap.c index 9700fd3bbdc4..af72c4fb7a4d 100644 --- a/keyboards/ghs/rar/keymaps/via/keymap.c +++ b/keyboards/ghs/rar/keymaps/via/keymap.c @@ -18,35 +18,35 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Base */ [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_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, 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_NO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_UP, KC_END, - KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), KC_NO, 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_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_NO, 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_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_END, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), KC_NO, KC_LEFT, KC_DOWN, KC_RGHT ), [1] = LAYOUT_all( - RGB_TOG, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET, + RGB_TOG, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_HUI, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_SAI, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_SAD, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_VAI, RGB_HUD, - _______, _______, _______, _______, _______, _______, _______, RGB_MOD, RGB_VAD, RGB_RMOD, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_SAI, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_SAD, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_VAI, RGB_HUD, + _______, _______, _______, _______, _______, _______, _______, RGB_MOD, RGB_VAD, RGB_RMOD ), [2] = LAYOUT_all( - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ ), [3] = LAYOUT_all( - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ ) }; From 2c98c4dd4e05f02a87154c914319f2b772bf81c9 Mon Sep 17 00:00:00 2001 From: Ryan Date: Fri, 3 Jul 2020 19:05:59 +1000 Subject: [PATCH 318/930] Backlight docs wordsmithing (#9631) --- docs/feature_backlight.md | 259 +++++++++++++++++--------------------- 1 file changed, 115 insertions(+), 144 deletions(-) diff --git a/docs/feature_backlight.md b/docs/feature_backlight.md index 7e4401b40fc7..9e467c708a28 100644 --- a/docs/feature_backlight.md +++ b/docs/feature_backlight.md @@ -1,4 +1,4 @@ -# Backlighting +# Backlighting :id=backlighting Many keyboards support backlit keys by way of individual LEDs placed through or underneath the keyswitches. This feature is distinct from both the [RGB underglow](feature_rgblight.md) and [RGB matrix](feature_rgb_matrix.md) features as it usually allows for only a single colour per switch, though you can obviously install multiple different single coloured LEDs on a keyboard. @@ -6,103 +6,106 @@ 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. -## 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 = yes ``` -## Keycodes -Once enabled the following keycodes below can be used to change the backlight level. - -|Key |Description | -|---------|------------------------------------------| -|`BL_TOGG`|Turn the backlight on or off | -|`BL_STEP`|Cycle through backlight levels | -|`BL_ON` |Set the backlight to max brightness | -|`BL_OFF` |Turn the backlight off | -|`BL_INC` |Increase the backlight level | -|`BL_DEC` |Decrease the backlight level | -|`BL_BRTG`|Toggle backlight breathing | - -## Backlight Functions - -|Function |Description | -|----------|-----------------------------------------------------------| -|`backlight_toggle()` |Turn the backlight on or off | -|`backlight_enable()` |Turn the backlight on | -|`backlight_disable()` |Turn the backlight off | -|`backlight_step()` |Cycle through backlight levels | -|`backlight_increase()` |Increase the backlight level | -|`backlight_decrease()` |Decrease the backlight level | -|`backlight_level(x)` |Sets the backlight level to specified level | -|`get_backlight_level()` |Return the current backlight level | -|`is_backlight_enabled()`|Return whether the backlight is currently on | - -### Backlight Breathing Functions - -|Function |Description | -|----------|---------------------------------------------------| -|`breathing_toggle()` |Turn the backlight breathing on or off | -|`breathing_enable()` |Turns on backlight breathing | -|`breathing_disable()` |Turns off backlight breathing | - -## Driver Configuration +## Keycodes :id=keycodes + +Once enabled, the following keycodes below can be used to change the backlight level. + +|Key |Description | +|---------|-----------------------------------| +|`BL_TOGG`|Turn the backlight on or off | +|`BL_STEP`|Cycle through backlight levels | +|`BL_ON` |Set the backlight to max brightness| +|`BL_OFF` |Turn the backlight off | +|`BL_INC` |Increase the backlight level | +|`BL_DEC` |Decrease the backlight level | +|`BL_BRTG`|Toggle backlight breathing | + +## Functions :id=functions + +These functions can be used to change the backlighting in custom code: + +|Function |Description | +|------------------------|--------------------------------------------| +|`backlight_toggle()` |Turn the backlight on or off | +|`backlight_enable()` |Turn the backlight on | +|`backlight_disable()` |Turn the backlight off | +|`backlight_step()` |Cycle through backlight levels | +|`backlight_increase()` |Increase the backlight level | +|`backlight_decrease()` |Decrease the backlight level | +|`backlight_level(x)` |Sets the backlight level to specified level | +|`get_backlight_level()` |Return the current backlight level | +|`is_backlight_enabled()`|Return whether the backlight is currently on| + +If backlight breathing is enabled (see below), the following functions are also available: + +|Function |Description | +|---------------------|--------------------------------------| +|`breathing_toggle()` |Turn the backlight breathing on or off| +|`breathing_enable()` |Turns on backlight breathing | +|`breathing_disable()`|Turns off backlight breathing | + +## Configuration :id=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' +BACKLIGHT_DRIVER = software ``` -See below for help on individual drivers. +Valid driver values are `pwm`, `software`, `custom` or `no`. See below for help on individual drivers. -## Common Driver Configuration +To configure the backlighting, `#define` these in your `config.h`: -To change the behavior of the backlighting, `#define` these in your `config.h`: +|Define |Default |Description | +|---------------------|-------------|-------------------------------------------------------------------------------------| +|`BACKLIGHT_PIN` |*Not defined*|The pin that controls the LED(s) | +|`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| -|Define |Default |Description | -|---------------------|-------------|--------------------------------------------------------------------------------------| -|`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` |`0` |The state of the backlight pin when the backlight is "on" - `1` for high, `0` for low | +Unless you are designing your own keyboard, you generally should not need to change the `BACKLIGHT_PIN` or `BACKLIGHT_ON_STATE`. -### Backlight On State +### Backlight On State :id=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. -## AVR driver +### AVR Driver :id=avr-driver + +The `pwm` driver is configured by default, however the equivalent setting within `rules.mk` would be: -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_DRIVER = pwm ``` -### Caveats +#### Caveats :id=avr-caveats -Hardware PWM is supported according to the following table: +On AVR boards, QMK automatically decides which driver to use according to the following table: |Backlight Pin|AT90USB64/128|ATmega16/32U4|ATmega16/32U2|ATmega32A|ATmega328/P| -|-------------|-------------|-------------|-------------|---------|----------| -|`B1` | | | | |Timer 1 | -|`B2` | | | | |Timer 1 | -|`B5` |Timer 1 |Timer 1 | | | | -|`B6` |Timer 1 |Timer 1 | | | | -|`B7` |Timer 1 |Timer 1 |Timer 1 | | | -|`C4` |Timer 3 | | | | | -|`C5` |Timer 3 | |Timer 1 | | | -|`C6` |Timer 3 |Timer 3 |Timer 1 | | | -|`D4` | | | |Timer 1 | | -|`D5` | | | |Timer 1 | | - -All other pins will use software PWM. If the [Audio](feature_audio.md) feature is disabled or only using one timer, the backlight PWM can be triggered by a hardware timer: +|-------------|-------------|-------------|-------------|---------|-----------| +|`B1` | | | | |Timer 1 | +|`B2` | | | | |Timer 1 | +|`B5` |Timer 1 |Timer 1 | | | | +|`B6` |Timer 1 |Timer 1 | | | | +|`B7` |Timer 1 |Timer 1 |Timer 1 | | | +|`C4` |Timer 3 | | | | | +|`C5` |Timer 3 | |Timer 1 | | | +|`C6` |Timer 3 |Timer 3 |Timer 1 | | | +|`D4` | | | |Timer 1 | | +|`D5` | | | |Timer 1 | | + +All other pins will use timer-assisted software PWM: |Audio Pin|Audio Timer|Software PWM Timer| |---------|-----------|------------------| @@ -113,44 +116,9 @@ All other pins will use software PWM. If the [Audio](feature_audio.md) feature i |`B6` |Timer 1 |Timer 3 | |`B7` |Timer 1 |Timer 3 | -When both timers are in use for Audio, the backlight PWM will not use a hardware timer, but will instead be triggered during the matrix scan. In this case, breathing is not supported, and the backlight might flicker, because the PWM computation may not be called with enough timing precision. - -### AVR Configuration - -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 | -|`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 - -Most keyboards have only one backlight pin which control all backlight LEDs (especially if the backlight is connected to an hardware PWM pin). -In software PWM, it is possible to define multiple backlight pins. All those pins will be turned on and off at the same time during the PWM duty cycle. -This feature allows to set for instance the Caps Lock LED (or any other controllable LED) brightness at the same level as the other LEDs of the backlight. This is useful if you have mapped LCTRL in place of Caps Lock and you need the Caps Lock LED to be part of the backlight instead of being activated when Caps Lock is on. - -To activate multiple backlight pins, you need to add something like this to your user `config.h`: - -```c -#define BACKLIGHT_LED_COUNT 2 -#undef BACKLIGHT_PIN -#define BACKLIGHT_PINS { F5, B2 } -``` +When both timers are in use for Audio, the backlight PWM cannot use a hardware timer, and will instead be triggered during the matrix scan. In this case, breathing is not supported, and the backlight might flicker, because the PWM computation may not be called with enough timing precision. -### Hardware PWM Implementation +#### Hardware PWM Implementation :id=hardware-pwm-implementation When using the supported pins for backlighting, QMK will use a hardware timer configured to output a PWM signal. This timer will count up to `ICRx` (by default `0xFFFF`) before resetting to 0. The desired brightness is calculated and stored in the `OCRxx` register. When the counter reaches this value, the backlight pin will go low, and is pulled high again when the counter resets. @@ -159,7 +127,7 @@ In this way `OCRxx` essentially controls the duty cycle of the LEDs, and thus th The breathing effect is achieved by registering an interrupt handler for `TIMER1_OVF_vect` that is called whenever the counter resets, roughly 244 times per second. In this handler, the value of an incrementing counter is mapped onto a precomputed brightness curve. To turn off breathing, the interrupt handler is simply disabled, and the brightness reset to the level stored in EEPROM. -### Timer Assisted PWM Implementation +#### Timer Assisted PWM Implementation :id=timer-assisted-implementation When `BACKLIGHT_PIN` is not set to a hardware backlight pin, QMK will use a hardware timer configured to trigger software interrupts. This time will count up to `ICRx` (by default `0xFFFF`) before resetting to 0. When resetting to 0, the CPU will fire an OVF (overflow) interrupt that will turn the LEDs on, starting the duty cycle. @@ -168,81 +136,84 @@ In this way `OCRxx` essentially controls the duty cycle of the LEDs, and thus th The breathing effect is the same as in the hardware PWM implementation. -## ARM Driver +### ARM Driver :id=arm-configuration + +While still in its early stages, ARM backlight support aims to eventually have feature parity with AVR. The `pwm` driver is configured by default, however the equivalent setting within `rules.mk` would be: -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_DRIVER = pwm ``` -### Caveats +#### ChibiOS Configuration :id=arm-configuration -Currently only hardware PWM is supported, not timer assisted, and does not provide automatic configuration. +The following `#define`s apply only to ARM-based keyboards: -?> Backlight support for STMF072 has had limited testing, YMMV. If unsure, set `BACKLIGHT_ENABLE = no` in your rules.mk. +|Define |Default|Description | +|-----------------------|-------|-----------------------------------| +|`BACKLIGHT_PWM_DRIVER` |`PWMD4`|The PWM driver to use | +|`BACKLIGHT_PWM_CHANNEL`|`3` |The PWM channel to use | +|`BACKLIGHT_PAL_MODE` |`2` |The pin alternative function to use| -### ARM Configuration +See the ST datasheet for your particular MCU to determine these values. Unless you are designing your own keyboard, you generally should not need to change them. -To change the behavior of the backlighting, `#define` these in your `config.h`: +#### Caveats :id=arm-caveats -|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_PWM_DRIVER` |`PWMD4` |The PWM driver to use, see ST datasheets for pin to PWM timer mapping. Unless you are designing your own keyboard, you shouldn't need to change this| -|`BACKLIGHT_PWM_CHANNEL` |`3` |The PWM channel to use, see ST datasheets for pin to PWM channel mapping. Unless you are designing your own keyboard, you shouldn't need to change this| -|`BACKLIGHT_PAL_MODE` |`2` |The pin alternative function to use, see ST datasheets for pin AF mapping. Unless you are designing your own keyboard, you shouldn't need to change this| +Currently only hardware PWM is supported, not timer assisted, and does not provide automatic configuration. + +?> Backlight support for STM32F072 has had limited testing, so YMMV. If unsure, set `BACKLIGHT_ENABLE = no` in your `rules.mk`. + +### Software PWM Driver :id=software-pwm-driver -## Software PWM Driver :id=software-pwm-driver +In this mode, PWM is "emulated" 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`: -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_DRIVER = software ``` -### Software PWM Configuration - -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 | - -### Multiple backlight pins +#### Multiple Backlight Pins :id=multiple-backlight-pins Most keyboards have only one backlight pin which control all backlight LEDs (especially if the backlight is connected to an hardware PWM pin). -In software PWM, it is possible to define multiple backlight pins. All those pins will be turned on and off at the same time during the PWM duty cycle. -This feature allows to set for instance the Caps Lock LED (or any other controllable LED) brightness at the same level as the other LEDs of the backlight. This is useful if you have mapped LCTRL in place of Caps Lock and you need the Caps Lock LED to be part of the backlight instead of being activated when Caps Lock is on. +In software PWM, it is possible to define multiple backlight pins, which will be turned on and off at the same time during the PWM duty cycle. + +This feature allows to set, for instance, the Caps Lock LED's (or any other controllable LED) brightness at the same level as the other LEDs of the backlight. This is useful if you have mapped Control in place of Caps Lock and you need the Caps Lock LED to be part of the backlight instead of being activated when Caps Lock is on, as it is usually wired to a separate pin from the backlight. -To activate multiple backlight pins, you need to add something like this to your user `config.h`: +To activate multiple backlight pins, add something like this to your `config.h`, instead of `BACKLIGHT_PIN`: ```c -#undef BACKLIGHT_PIN #define BACKLIGHT_PINS { F5, B2 } ``` -## Custom Driver +### Custom Driver :id=custom-driver -To enable, add this to your rules.mk: +If none of the above drivers apply to your board (for example, you are using a separate IC to control the backlight), you can implement a custom backlight driver using this simple API provided by QMK. 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: +Then implement any of these hooks: ```c void backlight_init_ports(void) { - // Optional - Run on startup - // - usually you want to configure pins here + // Optional - runs 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 + // Optional - runs 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 + // Optional - runs periodically + // Note that this is called in the main keyboard loop, + // so long running actions here can cause performance issues } ``` + +## Example Schematic + +In this typical example, the backlight LEDs are all connected in parallel towards an N-channel MOSFET. Its gate pin is wired to one of the microcontroller's GPIO pins through a 470Ω resistor to avoid ringing. +A pulldown resistor is also placed between the gate pin and ground to keep it at a defined state when it is not otherwise being driven by the MCU. +The values of these resistors are not critical - see [this Electronics StackExchange question](https://electronics.stackexchange.com/q/68748) for more information. + +![Backlight example circuit](https://i.imgur.com/BmAvoUC.png) From 3ff635b9a8285a45805d8b854a84674e74983376 Mon Sep 17 00:00:00 2001 From: moseschmiedel <58808540+moseschmiedel@users.noreply.github.com> Date: Sat, 4 Jul 2020 01:27:56 +0200 Subject: [PATCH 319/930] Add missing dependency for Void Linux to util/linux-install.sh (#9637) --- util/linux_install.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/util/linux_install.sh b/util/linux_install.sh index 43044f85cb33..0343b07e6f6f 100755 --- a/util/linux_install.sh +++ b/util/linux_install.sh @@ -220,6 +220,7 @@ elif grep ID /etc/os-release | grep -q void; then dfu-util \ gcc \ git \ + libusb-compat-devel \ make \ wget \ unzip \ From 063a74b660ee782ad4128907121ece459e417963 Mon Sep 17 00:00:00 2001 From: kwlodarczy <64139515+kwlodarczy@users.noreply.github.com> Date: Sat, 4 Jul 2020 05:48:37 +0100 Subject: [PATCH 320/930] Rotr - Updated README and default keymap (#9598) --- keyboards/rotr/keymaps/default/keymap.c | 2 +- keyboards/rotr/readme.md | 11 +++++++---- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/keyboards/rotr/keymaps/default/keymap.c b/keyboards/rotr/keymaps/default/keymap.c index cceb126461c6..c3164e861b9a 100644 --- a/keyboards/rotr/keymaps/default/keymap.c +++ b/keyboards/rotr/keymaps/default/keymap.c @@ -1,7 +1,7 @@ #include QMK_KEYBOARD_H const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - LAYOUT( + [0] = LAYOUT( KC_MPRV, KC_MPLY, KC_MNXT ) }; diff --git a/keyboards/rotr/readme.md b/keyboards/rotr/readme.md index a3e943fd3d6c..c422d0876241 100644 --- a/keyboards/rotr/readme.md +++ b/keyboards/rotr/readme.md @@ -8,10 +8,13 @@ A macro pad with a multipurpose knob. * Hardware: [Geekhack](https://geekhack.org/index.php?topic=107104.0) ## Features: -* Minimal design with plug and play functionality. -* Frictionless, solid brass knob. -* Hot swappable switches. -* USB C connection. +* Will ship pre-programmed and ready to use +* Hot swap sockets +* USB C +* RGB LEDs for switches +* CNC milled aluminium case +* Solid brass knob +* Free spinning magnetic rotary encoder Make example for this keyboard (after setting up your build environment): From b30d0361c52ac3b0c0ae2c4a6f90d1666a767a86 Mon Sep 17 00:00:00 2001 From: Olli Date: Sat, 4 Jul 2020 12:43:52 +0200 Subject: [PATCH 321/930] =?UTF-8?q?Fix=20=E2=80=9CG=E2=80=9D=20in=20Neo2?= =?UTF-8?q?=20keymap=20(#9645)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fix duplicated “NE_H” definition to use “NE_G” in Neo2 keymap, introduced with commit 44ff14f. --- quantum/keymap_extras/keymap_neo2.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/quantum/keymap_extras/keymap_neo2.h b/quantum/keymap_extras/keymap_neo2.h index 8e6e2b77a220..c34e9116bbd7 100644 --- a/quantum/keymap_extras/keymap_neo2.h +++ b/quantum/keymap_extras/keymap_neo2.h @@ -55,7 +55,7 @@ #define NE_W KC_T // W #define NE_K KC_Y // K #define NE_H KC_U // H -#define NE_H KC_I // G +#define NE_G KC_I // G #define NE_F KC_O // F #define NE_Q KC_P // Q #define NE_SS KC_LBRC // ß From 13a8d1681ca89b14931b0f9246dad4a4f60705fa Mon Sep 17 00:00:00 2001 From: Sam Gowland <10119462+SamGowland@users.noreply.github.com> Date: Sat, 4 Jul 2020 11:51:42 +0100 Subject: [PATCH 322/930] [Keyboard] Gowla Macro Board (#9643) Co-authored-by: Ryan Co-authored-by: Erovia --- keyboards/gowla/config.h | 38 ++++++++++++++++++++++++ keyboards/gowla/gowla.c | 1 + keyboards/gowla/gowla.h | 13 ++++++++ keyboards/gowla/info.json | 24 +++++++++++++++ keyboards/gowla/keymaps/default/keymap.c | 14 +++++++++ keyboards/gowla/readme.md | 15 ++++++++++ keyboards/gowla/rules.mk | 31 +++++++++++++++++++ 7 files changed, 136 insertions(+) create mode 100644 keyboards/gowla/config.h create mode 100644 keyboards/gowla/gowla.c create mode 100644 keyboards/gowla/gowla.h create mode 100644 keyboards/gowla/info.json create mode 100644 keyboards/gowla/keymaps/default/keymap.c create mode 100644 keyboards/gowla/readme.md create mode 100644 keyboards/gowla/rules.mk diff --git a/keyboards/gowla/config.h b/keyboards/gowla/config.h new file mode 100644 index 000000000000..65fd8ca1e73e --- /dev/null +++ b/keyboards/gowla/config.h @@ -0,0 +1,38 @@ +/* +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License 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 0xE9B6 +#define DEVICE_VER 0x0001 +#define MANUFACTURER Gowla +#define PRODUCT Gowla Macro Board +#define DESCRIPTION 3x3 PCB + +/* Matrix size */ +#define MATRIX_ROWS 3 +#define MATRIX_COLS 3 + +/* Pin-out */ +#define MATRIX_ROW_PINS { D1, D0, D4 } +#define MATRIX_COL_PINS { B5, B4, E6 } +#define UNUSED_PINS + +/* ROW2COL */ +#define DIODE_DIRECTION ROW2COL diff --git a/keyboards/gowla/gowla.c b/keyboards/gowla/gowla.c new file mode 100644 index 000000000000..13781bce3c42 --- /dev/null +++ b/keyboards/gowla/gowla.c @@ -0,0 +1 @@ +#include "gowla.h" diff --git a/keyboards/gowla/gowla.h b/keyboards/gowla/gowla.h new file mode 100644 index 000000000000..fa98c1f403bf --- /dev/null +++ b/keyboards/gowla/gowla.h @@ -0,0 +1,13 @@ +#pragma once + +#include "quantum.h" + +#define LAYOUT_ortho_3x3( \ + k00, k01, k02, \ + k10, k11, k12, \ + k20, k21, k22 \ +) { \ + { k00, k01, k02 }, \ + { k10, k11, k12 }, \ + { k20, k21, k22 } \ +} diff --git a/keyboards/gowla/info.json b/keyboards/gowla/info.json new file mode 100644 index 000000000000..4d1a5e1673c3 --- /dev/null +++ b/keyboards/gowla/info.json @@ -0,0 +1,24 @@ +{ + "keyboard_name": "Gowla Macro Pad", + "url": "https://github.com/SamGowland/Gowla-Macro-Board", + "maintainer": "Gowla", + "width": 3, + "height": 3, + "layouts": { + "LAYOUT_ortho_3x3": { + "layout": [ + {"x": 0, "y": 0}, + {"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/gowla/keymaps/default/keymap.c b/keyboards/gowla/keymaps/default/keymap.c new file mode 100644 index 000000000000..326c8f0e91a5 --- /dev/null +++ b/keyboards/gowla/keymaps/default/keymap.c @@ -0,0 +1,14 @@ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_ortho_3x3( + LT(1, KC_MPRV), KC_MNXT, KC_MPLY, + KC_VOLD, KC_UP, KC_VOLU, + KC_LEFT, KC_DOWN, KC_RGHT + ), + [1] = LAYOUT_ortho_3x3( + KC_ESC, KC_MPLY, RESET, + KC_P7, KC_P1, KC_F1, + KC_F2, KC_F3, KC_F4 + ) +}; diff --git a/keyboards/gowla/readme.md b/keyboards/gowla/readme.md new file mode 100644 index 000000000000..caf27c75ff91 --- /dev/null +++ b/keyboards/gowla/readme.md @@ -0,0 +1,15 @@ +# Gowla Macro Board + +![Gowla](https://github.com/SamGowland/Gowla-Macro-Board/blob/master/Images/comp.jpg) + +Simple Compact 3x3 Macro Board for use with QMK, designed and sold by Gowla. + +* Keyboard Maintainer: [Gowla](https://github.com/SamGowland/) +* Hardware Supported: Pro Micro ATmega32U4, Cherry Mount Switches +* Hardware Availability: [Repo](https://github.com/SamGowland/Gowla-Macro-Board) + +Make example for this keyboard (after setting up your build environment): + + make gowla: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/gowla/rules.mk b/keyboards/gowla/rules.mk new file mode 100644 index 000000000000..19b6f44b8f93 --- /dev/null +++ b/keyboards/gowla/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 +# 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 = no # Enable keyboard RGB underglow +MIDI_ENABLE = no # MIDI support +BLUETOOTH_ENABLE = no # Enable Bluetooth +AUDIO_ENABLE = no # Audio output +FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches From 5c8b23ccffa0083752044f0459e6ac3114ce6e52 Mon Sep 17 00:00:00 2001 From: Takeshi ISHII <2170248+mtei@users.noreply.github.com> Date: Sat, 4 Jul 2020 23:04:47 +0900 Subject: [PATCH 323/930] add SPLIT_HAND_MATRIX_GRID support (#8685) Co-authored-by: Danny --- docs/config_options.md | 5 ++++- docs/feature_split_keyboard.md | 18 ++++++++++++++++++ quantum/split_common/split_util.c | 24 ++++++++++++++++++++++++ 3 files changed, 46 insertions(+), 1 deletion(-) diff --git a/docs/config_options.md b/docs/config_options.md index ab26fd46ce1e..21c9972e0464 100644 --- a/docs/config_options.md +++ b/docs/config_options.md @@ -250,7 +250,10 @@ There are a few different ways to set handedness for split keyboards (listed in * `#define SPLIT_HAND_PIN B7` * For using high/low pin to determine handedness, low = right hand, high = left hand. Replace `B7` with the pin you are using. This is optional, and if you leave `SPLIT_HAND_PIN` undefined, then you can still use the EE_HANDS method or MASTER_LEFT / MASTER_RIGHT defines like the stock Let's Split uses. -* `#define EE_HANDS` (only works if `SPLIT_HAND_PIN` is not defined) +* `#define SPLIT_HAND_MATRIX_GRID ,` + * The handedness is determined by using the intersection of the keyswitches in the key matrix, which does not exist. Normally, when this intersection is shorted (level low), it is considered left. If you define `#define SPLIT_HAND_MATRIX_GRID_LOW_IS_RIGHT`, it is determined to be right when the level is low. + +* `#define EE_HANDS` (only works if `SPLIT_HAND_PIN` and `SPLIT_HAND_MATRIX_GRID` are not defined) * Reads the handedness value stored in the EEPROM after `eeprom-lefthand.eep`/`eeprom-righthand.eep` has been flashed to their respective halves. * `#define MASTER_RIGHT` diff --git a/docs/feature_split_keyboard.md b/docs/feature_split_keyboard.md index 63374a804e29..ce470b996470 100644 --- a/docs/feature_split_keyboard.md +++ b/docs/feature_split_keyboard.md @@ -90,6 +90,24 @@ You can configure the firmware to read a pin on the controller to determine hand This will read the specified pin. If it's high, then the controller assumes it is the left hand, and if it's low, it's assumed to be the right side. +#### Handedness by Matrix Pin + +You can configure the firmware to read key matrix pins on the controller to determine handedness. To do this, add the following to your `config.h` file: + +```c +#define SPLIT_HAND_MATRIX_GRID D0, F1 +``` + +The first pin is the output pin and the second is the input pin. + +Some keyboards have unused intersections in the key matrix. This setting uses one of these unused intersections to determine the handness. + +Normally, when a diode is connected to an intersection, it is judged to be left. If you add the following definition, it will be judged to be right. + +```c +#define SPLIT_HAND_MATRIX_GRID_LOW_IS_RIGHT +``` + #### Handedness by EEPROM This method sets the keyboard's handedness by setting a flag in the persistent storage (`EEPROM`). This is checked when the controller first starts up, and determines what half the keyboard is, and how to orient the keyboard layout. diff --git a/quantum/split_common/split_util.c b/quantum/split_common/split_util.c index afcd9d2aa586..90735eda4423 100644 --- a/quantum/split_common/split_util.c +++ b/quantum/split_common/split_util.c @@ -5,6 +5,7 @@ #include "timer.h" #include "transport.h" #include "quantum.h" +#include "wait.h" #ifdef PROTOCOL_LUFA # include @@ -82,11 +83,34 @@ static inline bool usbIsActive(void) { static inline bool usbIsActive(void) { return true; } #endif +#ifdef SPLIT_HAND_MATRIX_GRID +void matrix_io_delay(void); + +static uint8_t peek_matrix_intersection(pin_t out_pin, pin_t in_pin) { + setPinInputHigh(in_pin); + setPinOutput(out_pin); + writePinLow(out_pin); + // It's almost unnecessary, but wait until it's down to low, just in case. + wait_us(1); + uint8_t pin_state = readPin(in_pin); + // Set out_pin to a setting that is less susceptible to noise. + setPinInputHigh(out_pin); + matrix_io_delay(); // Wait for the pull-up to go HIGH. + return pin_state; +} +#endif + __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(SPLIT_HAND_MATRIX_GRID) +# ifdef SPLIT_HAND_MATRIX_GRID_LOW_IS_RIGHT + return peek_matrix_intersection(SPLIT_HAND_MATRIX_GRID); +# else + return !peek_matrix_intersection(SPLIT_HAND_MATRIX_GRID); +# endif #elif defined(EE_HANDS) return eeconfig_read_handedness(); #elif defined(MASTER_RIGHT) From c2ca57c8f4defd8fc7b7911cc1ba1e49f3d483e1 Mon Sep 17 00:00:00 2001 From: Takeshi ISHII <2170248+mtei@users.noreply.github.com> Date: Sat, 4 Jul 2020 23:20:49 +0900 Subject: [PATCH 324/930] add DIP_SWITCH_MATRIX_GRID support (#8772) * dipsw test on helix/rev2/sc/back:five_rows * add peek_matrix() to matrix_common.c * add DIP_SWITCH_MATRIX_GRID support to quantum/dip_switch.c * update docs/feature_dip_switch.md about DIP_SWITCH_MATRIX_GRID * Test end. remove test code. Revert "dipsw test on helix/rev2/sc/back:five_rows" This reverts commit 6d4304c74557597c9fb4d324f79c3ae4793ae874. --- docs/feature_dip_switch.md | 14 ++++++++++ quantum/dip_switch.c | 52 +++++++++++++++++++++++++++++++++++--- quantum/matrix_common.c | 5 ++++ 3 files changed, 67 insertions(+), 4 deletions(-) diff --git a/docs/feature_dip_switch.md b/docs/feature_dip_switch.md index bce47fed88c8..15e449c4c465 100644 --- a/docs/feature_dip_switch.md +++ b/docs/feature_dip_switch.md @@ -7,9 +7,17 @@ DIP switches are supported by adding this to your `rules.mk`: and this to your `config.h`: ```c +// Connects each switch in the dip switch to the GPIO pin of the MCU #define DIP_SWITCH_PINS { B14, A15, A10, B9 } ``` +or + +```c +// Connect each switch in the DIP switch to an unused intersections in the key matrix. +#define DIP_SWITCH_MATRIX_GRID { {0,6}, {1,6}, {2,6} } // List of row and col pairs +``` + ## Callbacks The callback functions can be inserted into your `.c`: @@ -87,4 +95,10 @@ void dip_switch_update_mask_user(uint32_t state) { ## Hardware +### Connects each switch in the dip switch to the GPIO pin of the MCU + One side of the DIP switch should be wired directly to the pin on the MCU, and the other side to ground. It should not matter which side is connected to which, as it should be functionally the same. + +### Connect each switch in the DIP switch to an unused intersections in the key matrix. + +As with the keyswitch, a diode and DIP switch connect the ROW line to the COL line. diff --git a/quantum/dip_switch.c b/quantum/dip_switch.c index 66c166ce45d2..879326d21f23 100644 --- a/quantum/dip_switch.c +++ b/quantum/dip_switch.c @@ -21,12 +21,31 @@ // for memcpy #include -#if !defined(DIP_SWITCH_PINS) -# error "No DIP switch pads defined by DIP_SWITCH_PINS" +#if !defined(DIP_SWITCH_PINS) && !defined(DIP_SWITCH_MATRIX_GRID) +# error "Either DIP_SWITCH_PINS or DIP_SWITCH_MATRIX_GRID must be defined." #endif -#define NUMBER_OF_DIP_SWITCHES (sizeof(dip_switch_pad) / sizeof(pin_t)) -static pin_t dip_switch_pad[] = DIP_SWITCH_PINS; +#if defined(DIP_SWITCH_PINS) && defined(DIP_SWITCH_MATRIX_GRID) +# error "Both DIP_SWITCH_PINS and DIP_SWITCH_MATRIX_GRID are defined." +#endif + +#ifdef DIP_SWITCH_PINS +# define NUMBER_OF_DIP_SWITCHES (sizeof(dip_switch_pad) / sizeof(pin_t)) +static pin_t dip_switch_pad[] = DIP_SWITCH_PINS; +#endif + +#ifdef DIP_SWITCH_MATRIX_GRID +typedef struct matrix_index_t { + uint8_t row; + uint8_t col; +} matrix_index_t; + +# define NUMBER_OF_DIP_SWITCHES (sizeof(dip_switch_pad) / sizeof(matrix_index_t)) +static matrix_index_t dip_switch_pad[] = DIP_SWITCH_MATRIX_GRID; +extern bool peek_matrix(uint8_t row_index, uint8_t col_index, bool read_raw); +static uint16_t scan_count; +#endif /* DIP_SWITCH_MATRIX_GRID */ + static bool dip_switch_state[NUMBER_OF_DIP_SWITCHES] = {0}; static bool last_dip_switch_state[NUMBER_OF_DIP_SWITCHES] = {0}; @@ -39,18 +58,43 @@ __attribute__((weak)) void dip_switch_update_mask_user(uint32_t state) {} __attribute__((weak)) void dip_switch_update_mask_kb(uint32_t state) { dip_switch_update_mask_user(state); } void dip_switch_init(void) { +#ifdef DIP_SWITCH_PINS for (uint8_t i = 0; i < NUMBER_OF_DIP_SWITCHES; i++) { setPinInputHigh(dip_switch_pad[i]); } dip_switch_read(true); +#endif +#ifdef DIP_SWITCH_MATRIX_GRID + scan_count = 0; +#endif } void dip_switch_read(bool forced) { bool has_dip_state_changed = false; uint32_t dip_switch_mask = 0; +#ifdef DIP_SWITCH_MATRIX_GRID + bool read_raw = false; + + if (scan_count < 500) { + scan_count ++; + if (scan_count == 10) { + read_raw = true; + forced = true; /* First reading of the dip switch */ + } else { + return; + } + } +#endif + for (uint8_t i = 0; i < NUMBER_OF_DIP_SWITCHES; i++) { +#ifdef DIP_SWITCH_PINS dip_switch_state[i] = !readPin(dip_switch_pad[i]); +#endif +#ifdef DIP_SWITCH_MATRIX_GRID + dip_switch_state[i] = peek_matrix(dip_switch_pad[i].row, dip_switch_pad[i].col, + read_raw); +#endif dip_switch_mask |= dip_switch_state[i] << i; if (last_dip_switch_state[i] != dip_switch_state[i] || forced) { has_dip_state_changed = true; diff --git a/quantum/matrix_common.c b/quantum/matrix_common.c index de62b8070565..e7d2dbb2945f 100644 --- a/quantum/matrix_common.c +++ b/quantum/matrix_common.c @@ -112,3 +112,8 @@ __attribute__((weak)) uint8_t matrix_scan(void) { matrix_scan_quantum(); return changed; } + +__attribute__((weak)) bool peek_matrix(uint8_t row_index, uint8_t col_index, bool raw) { + return 0 != ( (raw? raw_matrix[row_index]:matrix[row_index]) + & (MATRIX_ROW_SHIFTER << col_index)); +} From 355f075b5766da18129027128de9cdfbe674f6af Mon Sep 17 00:00:00 2001 From: QMK Bot Date: Sat, 4 Jul 2020 15:01:25 +0000 Subject: [PATCH 325/930] format code according to conventions [skip ci] --- quantum/dip_switch.c | 17 ++++++++--------- quantum/matrix_common.c | 5 +---- 2 files changed, 9 insertions(+), 13 deletions(-) diff --git a/quantum/dip_switch.c b/quantum/dip_switch.c index 879326d21f23..cda69bd0ef70 100644 --- a/quantum/dip_switch.c +++ b/quantum/dip_switch.c @@ -42,12 +42,12 @@ typedef struct matrix_index_t { # define NUMBER_OF_DIP_SWITCHES (sizeof(dip_switch_pad) / sizeof(matrix_index_t)) static matrix_index_t dip_switch_pad[] = DIP_SWITCH_MATRIX_GRID; -extern bool peek_matrix(uint8_t row_index, uint8_t col_index, bool read_raw); -static uint16_t scan_count; +extern bool peek_matrix(uint8_t row_index, uint8_t col_index, bool read_raw); +static uint16_t scan_count; #endif /* DIP_SWITCH_MATRIX_GRID */ -static bool dip_switch_state[NUMBER_OF_DIP_SWITCHES] = {0}; -static bool last_dip_switch_state[NUMBER_OF_DIP_SWITCHES] = {0}; +static bool dip_switch_state[NUMBER_OF_DIP_SWITCHES] = {0}; +static bool last_dip_switch_state[NUMBER_OF_DIP_SWITCHES] = {0}; __attribute__((weak)) void dip_switch_update_user(uint8_t index, bool active) {} @@ -74,13 +74,13 @@ void dip_switch_read(bool forced) { uint32_t dip_switch_mask = 0; #ifdef DIP_SWITCH_MATRIX_GRID - bool read_raw = false; + bool read_raw = false; if (scan_count < 500) { - scan_count ++; + scan_count++; if (scan_count == 10) { read_raw = true; - forced = true; /* First reading of the dip switch */ + forced = true; /* First reading of the dip switch */ } else { return; } @@ -92,8 +92,7 @@ void dip_switch_read(bool forced) { dip_switch_state[i] = !readPin(dip_switch_pad[i]); #endif #ifdef DIP_SWITCH_MATRIX_GRID - dip_switch_state[i] = peek_matrix(dip_switch_pad[i].row, dip_switch_pad[i].col, - read_raw); + dip_switch_state[i] = peek_matrix(dip_switch_pad[i].row, dip_switch_pad[i].col, read_raw); #endif dip_switch_mask |= dip_switch_state[i] << i; if (last_dip_switch_state[i] != dip_switch_state[i] || forced) { diff --git a/quantum/matrix_common.c b/quantum/matrix_common.c index e7d2dbb2945f..15f1e0e82e76 100644 --- a/quantum/matrix_common.c +++ b/quantum/matrix_common.c @@ -113,7 +113,4 @@ __attribute__((weak)) uint8_t matrix_scan(void) { return changed; } -__attribute__((weak)) bool peek_matrix(uint8_t row_index, uint8_t col_index, bool raw) { - return 0 != ( (raw? raw_matrix[row_index]:matrix[row_index]) - & (MATRIX_ROW_SHIFTER << col_index)); -} +__attribute__((weak)) bool peek_matrix(uint8_t row_index, uint8_t col_index, bool raw) { return 0 != ((raw ? raw_matrix[row_index] : matrix[row_index]) & (MATRIX_ROW_SHIFTER << col_index)); } From 29ebb99b1f5dff19a2c7dc3c93c7c95e9e9986be Mon Sep 17 00:00:00 2001 From: yanekm Date: Sat, 4 Jul 2020 18:50:01 -0400 Subject: [PATCH 326/930] fixed link to Eclipse instructions (#9647) --- docs/reference_glossary.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/reference_glossary.md b/docs/reference_glossary.md index 4cdba024e469..1da27ff24fd8 100644 --- a/docs/reference_glossary.md +++ b/docs/reference_glossary.md @@ -41,7 +41,7 @@ A macro which has been recorded on the keyboard and which will be lost when the ## Eclipse An IDE that is popular with many C developers. -* [Eclipse Setup Instructions](eclipse.md) +* [Eclipse Setup Instructions](other_eclipse.md) ## Firmware The software that controls your MCU. From 83bc0b9e80ddbc3d494fb5fa348e601e90f08f01 Mon Sep 17 00:00:00 2001 From: paulgali Date: Sun, 5 Jul 2020 06:20:22 +0400 Subject: [PATCH 327/930] [Keyboard] Updated VIA Support for DP60 (#9508) * Updated VIA Support - Added LAYOUT_all Support for VIA compatibility - Updated default dp60\layouts\via\keymap.c to mmirror changes to LAYOUT_all - Rules.mk updated in both base and via directories. Co-authored-by: Ryan Co-authored-by: Joel Challis --- keyboards/dp60/config.h | 2 +- keyboards/dp60/dp60.h | 45 +++++++++++++++++++++++++++- keyboards/dp60/keymaps/via/keymap.c | 46 ++++++++++++++--------------- keyboards/dp60/keymaps/via/rules.mk | 1 + keyboards/dp60/rules.mk | 4 +-- 5 files changed, 71 insertions(+), 27 deletions(-) diff --git a/keyboards/dp60/config.h b/keyboards/dp60/config.h index 3875d303ea49..2bedf51970ba 100644 --- a/keyboards/dp60/config.h +++ b/keyboards/dp60/config.h @@ -11,7 +11,7 @@ #define PRODUCT_ID 0x00BE #define DEVICE_VER 0x0001 #define MANUFACTURER astro -#define PRODUCT Dumplings +#define PRODUCT DP60 #define DESCRIPTION 60% rgb keyboard with ble extension /* key matrix size */ diff --git a/keyboards/dp60/dp60.h b/keyboards/dp60/dp60.h index 32bbb6dc0c6f..a197ac2fa3a0 100644 --- a/keyboards/dp60/dp60.h +++ b/keyboards/dp60/dp60.h @@ -9,6 +9,49 @@ // 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 + // Matrix layout to accomodate all layouts. Good for VIA mapping correctly, and it doesnt exist yet + // + //┌──┐┌──┐┌──┐┌──┐┌──┐┌──┐┌──┐┌──┐┌──┐┌──┐┌──┐┌──┐┌──┐┌──┐┌──┐ ┌──────┐ + //│0A││0B││0C││0D││0E││0F││0G││4H││0H││0I││0J││0K││0L││0M││0N│ │ 0N │ split backspace support + //└──┘└──┘└──┘└──┘└──┘└──┘└──┘└──┘└──┘└──┘└──┘└──┘└──┘└──┘└──┘ └──────┘ + // 00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0e + //┌────┐┌──┐┌──┐┌──┐┌──┐┌──┐┌──┐┌──┐┌──┐┌──┐┌──┐┌──┐┌──┐┌────┐ ┌────┐ + //│1A ││1B││1C││1D││1E││1F││1G││1H││1I││1J││1K││1L││1M││1N │ │ │ iso enter - see below + //└────┘└──┘└──┘└──┘└──┘└──┘└──┘└──┘└──┘└──┘└──┘└──┘└──┘└────┘ └────┘ + // 10 11 12 13 14 15 16 17 18 19 1a 1b 1c 1e + //┌─────┐┌──┐┌──┐┌──┐┌──┐┌──┐┌──┐┌──┐┌──┐┌──┐┌──┐┌──┐┌───────┐ ┌──┐┌──┐ + //│ 2A ││2B││2C││2D││2E││2F││2G││2H││2I││2J││2K││2L││ 2N │ │2M││2N│ iso enter + //└─────┘└──┘└──┘└──┘└──┘└──┘└──┘└──┘└──┘└──┘└──┘└──┘└───────┘ └──┘└──┘ + // 20 22 23 24 25 26 27 28 29 2a 2b 2c 2e 2d 2e + //┌───────┐┌──┐┌──┐┌──┐┌──┐┌──┐┌──┐┌──┐┌──┐┌──┐┌──┐┌─────────┐ + //│3A │ 3B││3C││3D││3E││3F││3G││3H││3I││3J││3K││3L││ 3M │3N│ split shifts (left and right) + //└───────┘└──┘└──┘└──┘└──┘└──┘└──┘└──┘└──┘└──┘└──┘└─────────┘ + // 30 31 32 33 34 35 36 37 38 39 3a 3b 3c 3d + //┌───┐┌───┐┌───┐┌───────────────────────┐┌───┐┌───┐┌───┐┌───┐ + //│4A ││4B ││4C ││ 4G ││4K ││4L ││4M ││4N │ wkl/hhkb use 4L (k49), 4M (k4a) , 4N (k4b) + //└───┘└───┘└───┘└───────────────────────┘└───┘└───┘└───┘└───┘ + // 40 42 43 47 48 49 4a 4b + //end of mapping +// +//added k0d +//added k2d KC_NUMS for iso +//added k31 split l-shift, k3d split r-shift + +#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, k1e, \ +k20, 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, \ +k40, k42, k43, k47, k48, k49, k4a, k4b \ +) \ +{ \ + {k00, k01, k02, k03, k04, k05, k06, 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, k2d, k2e}, \ + {k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d}, \ + {k40, k42, k43, KC_NO, KC_NO, KC_NO, k47, k07, KC_NO, KC_NO, k48, k49, k4a, k4b} \ +} + #define LAYOUT_60_ansi( \ 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, \ @@ -28,7 +71,7 @@ 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, \ k20, 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,\ + k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, \ k40, k42, k43, k47, k48, k49, k4a, k4b \ ) \ { \ diff --git a/keyboards/dp60/keymaps/via/keymap.c b/keyboards/dp60/keymaps/via/keymap.c index 8227055766eb..1742f17b50c5 100644 --- a/keyboards/dp60/keymaps/via/keymap.c +++ b/keyboards/dp60/keymaps/via/keymap.c @@ -1,31 +1,31 @@ #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_PGUP,KC_PGDN,_______, - _______, _______,_______,_______,_______,_______,KC_LEFT,KC_DOWN, KC_UP,KC_RIGHT,KC_HOME,KC_END,_______, - _______, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, - _______,_______,_______, _______, _______,_______,TG(0),_______), + [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_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_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_RGUI,KC_RALT, MO(1), KC_RCTL), - [2] = LAYOUT_60_ansi_split_bs_rshift( + [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_DEL, + RESET, _______,KC_UP,_______,_______,_______,_______,_______,KC_PAUS,KC_SLCK,KC_PSCR,KC_PGUP,_______,KC_INS, + _______, KC_LEFT,KC_DOWN,KC_RIGHT,_______,_______,_______,_______, _______,_______,KC_HOME,KC_END,_______, _______, + _______,_______, _______,_______,_______,_______,_______,_______,_______,_______,_______,KC_PGDN,_______,_______, + _______,_______,_______, _______, _______,MO(2),TG(0),_______), + + [2] = LAYOUT_all( _______, _______,_______, _______,_______, _______,_______, _______,_______, _______,_______, _______,_______,_______,_______, - _______, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, - _______, _______,_______,_______,_______,_______,_______,_______, _______,_______,_______,_______,_______, - _______, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, - _______,_______,_______, _______, _______,_______,_______,_______), + _______, _______,KC_VOLU,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, + KC_MUTE, KC_MPRV,KC_VOLD,KC_MNXT,_______,_______,_______,_______, _______,_______,_______,_______,_______, _______, + _______, _______, RGB_TOG,RGB_MOD,RGB_RMOD,RGB_VAI,RGB_VAD,RGB_HUI,RGB_HUD,RGB_SAI,RGB_SAD,_______,_______,_______, + _______,_______,_______, KC_MPLY, _______,_______,_______,_______), - [3] = LAYOUT_60_ansi_split_bs_rshift( + [3] = LAYOUT_all( _______, _______,_______, _______,_______, _______,_______, _______,_______, _______,_______, _______,_______,_______,_______, _______, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, - _______, _______,_______,_______,_______,_______,_______,_______, _______,_______,_______,_______,_______, - _______, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, - _______,_______,_______, _______, _______,_______,_______,_______) -}; \ No newline at end of file + _______, _______,_______,_______,_______,_______,_______,_______, _______,_______,_______,_______,_______,_______, + _______, _______, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, + _______,_______,_______, _______, _______,_______,_______,_______) +}; diff --git a/keyboards/dp60/keymaps/via/rules.mk b/keyboards/dp60/keymaps/via/rules.mk index 36b7ba9cbc98..e4b4d91da9ae 100644 --- a/keyboards/dp60/keymaps/via/rules.mk +++ b/keyboards/dp60/keymaps/via/rules.mk @@ -1,2 +1,3 @@ VIA_ENABLE = yes LTO_ENABLE = yes +RGBLIGHT_ENABLE = yes #enables underglow, but will not disable per key leds diff --git a/keyboards/dp60/rules.mk b/keyboards/dp60/rules.mk index 015e4fddb929..bcd6fb4c94ab 100644 --- a/keyboards/dp60/rules.mk +++ b/keyboards/dp60/rules.mk @@ -22,14 +22,14 @@ COMMAND_ENABLE = no # Commands for debug and configuration # 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 +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 = yes # Use RGB underglow light +RGBLIGHT_ENABLE = no # Use RGB underglow light RGB_MATRIX_ENABLE = yes # Use RGB matrix LAYOUTS = 60_ansi 60_hhkb 60_iso 60_ansi_split_bs_rshift From ade3bdf7e746278057b51c11b2ac8cee366c391f Mon Sep 17 00:00:00 2001 From: siano Date: Sun, 5 Jul 2020 05:31:07 +0200 Subject: [PATCH 328/930] [Keyboard] XD87 Caps Lock LED refactor (#9585) --- keyboards/xd87/xd87.c | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/keyboards/xd87/xd87.c b/keyboards/xd87/xd87.c index e14480b054ae..a41b4f2dba01 100644 --- a/keyboards/xd87/xd87.c +++ b/keyboards/xd87/xd87.c @@ -36,16 +36,14 @@ 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 +bool led_update_kb(led_t led_state) { + bool res = led_update_user(led_state); - if (IS_LED_ON(usb_led, USB_LED_CAPS_LOCK)) { - writePinLow(E2); - } else { - writePinHigh(E2); - } + if (res) { + writePin(E2, !led_state.caps_lock); + } - led_set_user(usb_led); + return res; } void led_init_ports(void) { From acb9cf12c46bfef7f542e44c06351aeced82bd89 Mon Sep 17 00:00:00 2001 From: Alabahuy Date: Sun, 5 Jul 2020 10:36:42 +0700 Subject: [PATCH 329/930] [Keyboard] RART67 : add support via (#9589) --- keyboards/rart/rart67/keymaps/via/keymap.c | 36 ++++++++++++++++++++++ keyboards/rart/rart67/keymaps/via/rules.mk | 2 ++ 2 files changed, 38 insertions(+) create mode 100644 keyboards/rart/rart67/keymaps/via/keymap.c create mode 100644 keyboards/rart/rart67/keymaps/via/rules.mk diff --git a/keyboards/rart/rart67/keymaps/via/keymap.c b/keyboards/rart/rart67/keymaps/via/keymap.c new file mode 100644 index 000000000000..cfb8e06a320e --- /dev/null +++ b/keyboards/rart/rart67/keymaps/via/keymap.c @@ -0,0 +1,36 @@ +#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_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_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_LGUI, KC_LALT, KC_SPC, MO(1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT + ), + + [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_DEL, _______, + RESET, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, KC_P7, KC_P8, KC_P9, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_P4, KC_P5, KC_P6, KC_NLCK, _______, + _______, _______, _______, _______, BL_DEC, BL_TOGG, BL_INC, BL_STEP, _______, KC_P1, KC_P2, KC_P3, KC_VOLU, _______, + _______, _______, _______, _______, _______, KC_P0, KC_MPRV, KC_VOLD, KC_MNXT + ), + + [2] = LAYOUT_all( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + + [3] = LAYOUT_all( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______ + ) +}; diff --git a/keyboards/rart/rart67/keymaps/via/rules.mk b/keyboards/rart/rart67/keymaps/via/rules.mk new file mode 100644 index 000000000000..36b7ba9cbc98 --- /dev/null +++ b/keyboards/rart/rart67/keymaps/via/rules.mk @@ -0,0 +1,2 @@ +VIA_ENABLE = yes +LTO_ENABLE = yes From da5aed6beffeaf67eb6f05bbbe4ca75ecde2ebfb Mon Sep 17 00:00:00 2001 From: stanrc85 <47038504+stanrc85@users.noreply.github.com> Date: Sat, 4 Jul 2020 23:51:37 -0400 Subject: [PATCH 330/930] [Keymap] Add Alice rev2 to my userspace (#9600) --- users/stanrc85/rules.mk | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/users/stanrc85/rules.mk b/users/stanrc85/rules.mk index 83cda852d84b..5fa3737a2530 100644 --- a/users/stanrc85/rules.mk +++ b/users/stanrc85/rules.mk @@ -25,4 +25,10 @@ ifeq ($(strip $(KEYBOARD)), projectkb/alice/rev1) VIA_ENABLE = yes LTO_ENABLE = no VELOCIKEY_ENABLE=yes +endif +ifeq ($(strip $(KEYBOARD)), projectkb/alice/rev2) + SRC += rgblight_layers.c + VIA_ENABLE = yes + LTO_ENABLE = no + VELOCIKEY_ENABLE=yes endif \ No newline at end of file From 85e20a5cf433c2164e3d0a5c8de8cbd5dfc4c6fe Mon Sep 17 00:00:00 2001 From: Brennan Vincent Date: Sun, 5 Jul 2020 12:20:46 -0400 Subject: [PATCH 331/930] Fix typo in freebsd_install.sh (#9655) --- util/freebsd_install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/util/freebsd_install.sh b/util/freebsd_install.sh index 09669024cc0c..f5c78b556fb2 100755 --- a/util/freebsd_install.sh +++ b/util/freebsd_install.sh @@ -29,7 +29,7 @@ if [ $(id -u) = 0 ]; then else if command -v sudo > /dev/null 2>&1; then sudo pkg update - sudp pkg install -y ${packages} + sudo pkg install -y ${packages} else echo "Make sure you run setup as root first to install base OS dependencies..." echo "" From fe744eb1ad2ee982dd94bd389f262a62332934d5 Mon Sep 17 00:00:00 2001 From: MelGeek <65591833+melgeek001365@users.noreply.github.com> Date: Mon, 6 Jul 2020 20:38:41 +0800 Subject: [PATCH 332/930] [Driver] bugfix reset the scaling register flag to FALSE (#9507) Co-authored-by: Ryan --- drivers/issi/is31fl3741.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/issi/is31fl3741.c b/drivers/issi/is31fl3741.c index ab4b31465b00..fc5c58835d56 100644 --- a/drivers/issi/is31fl3741.c +++ b/drivers/issi/is31fl3741.c @@ -272,6 +272,8 @@ void IS31FL3741_update_led_control_registers(uint8_t addr, uint8_t index) { for (int i = 0; i < 171; ++i) { IS31FL3741_write_register(addr, i, g_scaling_registers[0][180 + i]); } + + g_scaling_registers_update_required[index] = false; } } From 0fcefdc0136cb3f6c49a678d07d3430455a008d1 Mon Sep 17 00:00:00 2001 From: KgOfHedgehogs Date: Mon, 6 Jul 2020 14:40:23 +0200 Subject: [PATCH 333/930] Add jian qmk_via layout and LTO_ENABLE to all jian revs (#9606) --- keyboards/jian/keymaps/via/keymap.c | 28 ++++++++++++++++++++++++++++ keyboards/jian/keymaps/via/rules.mk | 3 +++ keyboards/jian/nsrev2/config.h | 3 +++ keyboards/jian/rev2/config.h | 3 +++ keyboards/jian/rules.mk | 1 + 5 files changed, 38 insertions(+) create mode 100644 keyboards/jian/keymaps/via/keymap.c create mode 100644 keyboards/jian/keymaps/via/rules.mk diff --git a/keyboards/jian/keymaps/via/keymap.c b/keyboards/jian/keymaps/via/keymap.c new file mode 100644 index 000000000000..9da0b5f4dac7 --- /dev/null +++ b/keyboards/jian/keymaps/via/keymap.c @@ -0,0 +1,28 @@ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +[0] = LAYOUT( + KC_LGUI, KC_GRV, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, RGUI_T(KC_RBRC), + KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, RCTL_T(KC_QUOT), + KC_LALT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, RALT_T(KC_BSLS), + LT(2, KC_TAB), LSFT_T(KC_SPC), LT(1, KC_ENT), LT(1, KC_ESC), RSFT_T(KC_BSPC), LT(2, KC_DEL) +), +[1] = LAYOUT( + _______, KC_UNDS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, RGUI_T(KC_F12), + LCTL_T(KC_EQL), KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, RCTL_T(KC_MINS), + LALT_T(KC_PPLS), KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, _______, + LT(3, KC_TAB), _______, _______, _______, _______, LT(3, KC_DEL) +), +[2] = LAYOUT( + _______, KC_NLCK, KC_PSLS, KC_P7, KC_P8, KC_P9, KC_PMNS, KC_VOLU, KC_HOME, KC_PSCR, KC_PGUP, KC_SLCK, KC_CAPS, _______, + LCTL_T(KC_EQL), KC_PAST, KC_P4, KC_P5, KC_P6, KC_PPLS, KC_MUTE, KC_LEFT, KC_UP, KC_RGHT, KC_INS, RCTL_T(KC_APP), + _______, KC_P0, KC_P1, KC_P2, KC_P3, KC_PCMM, KC_VOLD, KC_END, KC_DOWN, KC_PGDN, KC_PAUS, _______, + _______, _______, LT(3, KC_ENT), LT(3, KC_ESC), _______, _______ +), +[3] = LAYOUT_symmetric( + RESET, DEBUG, XXXXXXX, BL_INC, RGB_VAI, RGB_HUD, RGB_HUI, + XXXXXXX, XXXXXXX, BL_DEC, RGB_VAD, RGB_SAD, RGB_SAI, + XXXXXXX, BL_BRTG, BL_TOGG, RGB_TOG, RGB_RMOD,RGB_MOD, + _______, SH_TG, _______ +) +}; diff --git a/keyboards/jian/keymaps/via/rules.mk b/keyboards/jian/keymaps/via/rules.mk new file mode 100644 index 000000000000..aa77c05490f5 --- /dev/null +++ b/keyboards/jian/keymaps/via/rules.mk @@ -0,0 +1,3 @@ +SWAP_HANDS_ENABLE = yes +EXTRAKEY_ENABLE = yes # Audio control and System control +VIA_ENABLE = yes diff --git a/keyboards/jian/nsrev2/config.h b/keyboards/jian/nsrev2/config.h index 9277aa19afb5..2a811e75c4fc 100644 --- a/keyboards/jian/nsrev2/config.h +++ b/keyboards/jian/nsrev2/config.h @@ -41,6 +41,9 @@ along with this program. If not, see . /* Set 0 if debouncing isn't needed */ #define DEBOUNCE 5 +#define QMK_ESC_OUTPUT D3 +#define QMK_ESC_INPUT B1 + #define PHYSICAL_LEDS_ENABLE #ifdef BACKLIGHT_ENABLE diff --git a/keyboards/jian/rev2/config.h b/keyboards/jian/rev2/config.h index 760389cc6424..296e168ecda5 100644 --- a/keyboards/jian/rev2/config.h +++ b/keyboards/jian/rev2/config.h @@ -47,6 +47,9 @@ along with this program. If not, see . /* Set 0 if debouncing isn't needed */ #define DEBOUNCE 5 +#define QMK_ESC_OUTPUT D3 +#define QMK_ESC_INPUT B1 + #define PHYSICAL_LEDS_ENABLE #define IOS_DEVICE_ENABLE diff --git a/keyboards/jian/rules.mk b/keyboards/jian/rules.mk index c19fa00b5cb9..722708330567 100644 --- a/keyboards/jian/rules.mk +++ b/keyboards/jian/rules.mk @@ -1 +1,2 @@ DEFAULT_FOLDER = jian/rev2 +LTO_ENABLE = yes From 5eb4675fda13783e6d1b18b7fbbe54a90a9fe68e Mon Sep 17 00:00:00 2001 From: Joakim Tufvegren Date: Fri, 26 Jun 2020 00:32:21 +0200 Subject: [PATCH 334/930] Allow for building layouts from keymap.json files. --- build_layout.mk | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/build_layout.mk b/build_layout.mk index 6e9f97dae211..4748ad483d89 100644 --- a/build_layout.mk +++ b/build_layout.mk @@ -3,8 +3,14 @@ LAYOUTS_REPOS := $(patsubst %/,%,$(sort $(dir $(wildcard $(LAYOUTS_PATH)/*/)))) define SEARCH_LAYOUTS_REPO LAYOUT_KEYMAP_PATH := $$(LAYOUTS_REPO)/$$(LAYOUT)/$$(KEYMAP) + LAYOUT_KEYMAP_JSON := $$(LAYOUT_KEYMAP_PATH)/keymap.json LAYOUT_KEYMAP_C := $$(LAYOUT_KEYMAP_PATH)/keymap.c - ifneq ("$$(wildcard $$(LAYOUT_KEYMAP_C))","") + ifneq ("$$(wildcard $$(LAYOUT_KEYMAP_JSON))","") + -include $$(LAYOUT_KEYMAP_PATH)/rules.mk + KEYMAP_C := $(KEYBOARD_OUTPUT)/src/keymap.c + KEYMAP_JSON := $$(LAYOUT_KEYMAP_JSON) + KEYMAP_PATH := $$(LAYOUT_KEYMAP_PATH) + else ifneq ("$$(wildcard $$(LAYOUT_KEYMAP_C))","") -include $$(LAYOUT_KEYMAP_PATH)/rules.mk KEYMAP_C := $$(LAYOUT_KEYMAP_C) KEYMAP_PATH := $$(LAYOUT_KEYMAP_PATH) @@ -24,4 +30,7 @@ ifneq ($(FORCE_LAYOUT),) endif endif -$(foreach LAYOUT,$(LAYOUTS),$(eval $(call SEARCH_LAYOUTS))) \ No newline at end of file +$(foreach LAYOUT,$(LAYOUTS),$(eval $(call SEARCH_LAYOUTS))) + +# Use rule from build_json.mk, but update prerequisite in case KEYMAP_JSON was updated +$(KEYBOARD_OUTPUT)/src/keymap.c: $(KEYMAP_JSON) From e6bcc232ed04f91501ab998080b1e738ac67bc37 Mon Sep 17 00:00:00 2001 From: Erovia Date: Tue, 7 Jul 2020 19:22:38 +0100 Subject: [PATCH 335/930] Docs: update ModemManager recommendation (#9328) Instead of modifying the service file provided by the distro, use drop-in functionaly to explicitly specify the policy. --- docs/faq_build.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/faq_build.md b/docs/faq_build.md index 7cfb0040d0e3..e2d0f9b27a53 100644 --- a/docs/faq_build.md +++ b/docs/faq_build.md @@ -53,7 +53,7 @@ SUBSYSTEMS=="usb", ATTRS{idVendor}=="1b4f", ATTRS{idProduct}=="9203", TAG+="uacc **Note:** With older (before 1.12) ModemManager, filtering only works when not in strict mode, the following commands can update that settings: ```console -sudo sed -i 's/--filter-policy=strict/--filter-policy=default/' /lib/systemd/system/ModemManager.service +printf '[Service]\nExecStart=\nExecStart=/usr/sbin/ModemManager --filter-policy=default' | sudo tee /etc/systemd/system/ModemManager.service.d/policy.conf sudo systemctl daemon-reload sudo systemctl restart ModemManager ``` From 29b4f83a1fab8b0b1674ba181732790c5cc269c1 Mon Sep 17 00:00:00 2001 From: Ryan Date: Wed, 8 Jul 2020 05:31:44 +1000 Subject: [PATCH 336/930] Un-nest 1up60rgb LAYOUT macros (#9648) --- keyboards/1upkeyboards/1up60rgb/1up60rgb.h | 119 +++++++++++---------- 1 file changed, 60 insertions(+), 59 deletions(-) diff --git a/keyboards/1upkeyboards/1up60rgb/1up60rgb.h b/keyboards/1upkeyboards/1up60rgb/1up60rgb.h index 0f6818a6d861..9e866bb50f68 100644 --- a/keyboards/1upkeyboards/1up60rgb/1up60rgb.h +++ b/keyboards/1upkeyboards/1up60rgb/1up60rgb.h @@ -2,77 +2,78 @@ #include "quantum.h" +#define XXX KC_NO + #define LAYOUT_all( \ - K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, \ - K100, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, \ - K200, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K214, \ - K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K313, K314, \ - K400, K401, K403, K406, K410, K411, K413, K414 \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, 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, k2E, \ + k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3D, k3E, \ + k40, k41, k43, k46, k4A, k4B, k4D, k4E \ ) { \ - { K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014 }, \ - { K100, KC_NO, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114 }, \ - { K200, KC_NO, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K214 }, \ - { K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, KC_NO, K313, K314 }, \ - { K400, K401, KC_NO, K403, KC_NO, KC_NO, K406, KC_NO, KC_NO, KC_NO, K410, K411, KC_NO, K413, K414 } \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E }, \ + { k10, XXX, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, k1E }, \ + { k20, XXX, 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, XXX, k3D, k3E }, \ + { k40, k41, XXX, k43, XXX, XXX, k46, XXX, XXX, XXX, k4A, k4B, XXX, k4D, k4E } \ } - /* ANSI variant. No extra keys for ISO */ #define LAYOUT_60_ansi( \ - K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, \ - K100, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, \ - K200, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K214, \ - K300, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K313, \ - K400, K401, K403, K406, K410, K411, K413, K414 \ -) LAYOUT_all( \ - K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K013,\ - K100, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, \ - K200, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K214, K214, \ - K300, KC_NO,K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K313, KC_NO,\ - K400, K401, K403, K406, K410, K411, K413, K414 \ -) + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, \ + 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, k2E, \ + k30, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3D, \ + k40, k41, k43, k46, k4A, k4B, k4D, k4E \ +) { \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, XXX }, \ + { k10, XXX, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, k1E }, \ + { k20, XXX, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, XXX, k2E }, \ + { k30, XXX, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, XXX, k3D, XXX }, \ + { k40, k41, XXX, k43, XXX, XXX, k46, XXX, XXX, XXX, k4A, k4B, XXX, k4D, k4E } \ +} /* ISO variant. Remove useless ANSI keys */ #define LAYOUT_60_iso( \ - K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, \ - K100, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, \ - K200, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K214, \ - K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K313, \ - K400, K401, K403, K406, K410, K411, K413, K414 \ -) LAYOUT_all( \ - K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K013,\ - K100, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K214, \ - K200, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K214, \ - K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K313, KC_NO,\ - K400, K401, K403, K406, K410, K411, K413, K414 \ -) + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, \ + 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, k2D, k2E, \ + k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3D, \ + k40, k41, k43, k46, k4A, k4B, k4D, k4E \ +) { \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, XXX }, \ + { k10, XXX, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, XXX }, \ + { k20, XXX, 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, XXX, k3D, XXX }, \ + { k40, k41, XXX, k43, XXX, XXX, k46, XXX, XXX, XXX, k4A, k4B, XXX, k4D, k4E } \ +} /* HHKB Variant */ #define LAYOUT_60_ansi_split_bs_rshift( \ - K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, \ - K100, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, \ - K200, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K214, \ - K300, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K313, K314, \ - K400, K401, K403, K406, K410, K411, K413, K414 \ -) LAYOUT_all( \ - K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014,\ - K100, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, \ - K200, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K214, K214, \ - K300, KC_NO,K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K313, K314,\ - K400, K401, K403, K406, K410, K411, K413, K414 \ -) + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, 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, k2E, \ + 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, k0D, k0E }, \ + { k10, XXX, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, k1E }, \ + { k20, XXX, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, XXX, k2E }, \ + { k30, XXX, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, XXX, k3D, k3E }, \ + { k40, k41, XXX, k43, XXX, XXX, k46, XXX, XXX, XXX, k4A, k4B, XXX, k4D, k4E } \ +} /* HHKB Variant */ #define LAYOUT_60_hhkb( \ - K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, \ - K100, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, \ - K200, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K214, \ - K300, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K313, K314, \ - K401, K403, K406, K411, K413 \ -) LAYOUT_all( \ - K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, \ - K100, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, \ - K200, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K214, K214, \ - K300, KC_NO,K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K313, K314, \ - KC_NO,K401, K403, K406, KC_NO,K411, K413, KC_NO \ -) + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, 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, k2E, \ + k30, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3D, k3E, \ + k41, k43, k46, k4B, k4D \ +) { \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E }, \ + { k10, XXX, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, k1E }, \ + { k20, XXX, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, XXX, k2E }, \ + { k30, XXX, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, XXX, k3D, k3E }, \ + { XXX, k41, XXX, k43, XXX, XXX, k46, XXX, XXX, XXX, XXX, k4B, XXX, k4D, XXX } \ +} From 03c790a0f23fe05f0b0fde84d3a2d3e7987a7f73 Mon Sep 17 00:00:00 2001 From: Sven Grunewaldt Date: Tue, 7 Jul 2020 22:47:59 +0200 Subject: [PATCH 337/930] Add TAP_CODE_DELAY to Mod-Tap (#9422) --- tmk_core/common/action.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tmk_core/common/action.c b/tmk_core/common/action.c index 69bcf8e56b74..ee9aa0df77db 100644 --- a/tmk_core/common/action.c +++ b/tmk_core/common/action.c @@ -364,6 +364,8 @@ void process_action(keyrecord_t *record, action_t action) { dprint("MODS_TAP: Tap: unregister_code\n"); if (action.layer_tap.code == KC_CAPS) { wait_ms(TAP_HOLD_CAPS_DELAY); + } else { + wait_ms(TAP_CODE_DELAY); } unregister_code(action.key.code); } else { From 666cb44673c3db85e0141189319fc9aed394c56d Mon Sep 17 00:00:00 2001 From: Dongfeng Yu <60870777+blockader@users.noreply.github.com> Date: Wed, 8 Jul 2020 04:59:13 +0800 Subject: [PATCH 338/930] Allowing Pressing the Start Buttons Again to Stop Dynamic Macro Recording (#9446) --- docs/feature_dynamic_macros.md | 2 +- quantum/process_keycode/process_dynamic_macro.c | 8 +++++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/docs/feature_dynamic_macros.md b/docs/feature_dynamic_macros.md index b86df6c60ffe..137b0eefb949 100644 --- a/docs/feature_dynamic_macros.md +++ b/docs/feature_dynamic_macros.md @@ -18,7 +18,7 @@ That should be everything necessary. To start recording the macro, press either `DYN_REC_START1` or `DYN_REC_START2`. -To finish the recording, press the `DYN_REC_STOP` layer button. +To finish the recording, press the `DYN_REC_STOP` layer button. You can also press `DYN_REC_START1` or `DYN_REC_START2` again to stop the recording. To replay the macro, press either `DYN_MACRO_PLAY1` or `DYN_MACRO_PLAY2`. diff --git a/quantum/process_keycode/process_dynamic_macro.c b/quantum/process_keycode/process_dynamic_macro.c index 2065f242db9e..df3a8a812056 100644 --- a/quantum/process_keycode/process_dynamic_macro.c +++ b/quantum/process_keycode/process_dynamic_macro.c @@ -216,11 +216,13 @@ bool process_dynamic_macro(uint16_t keycode, keyrecord_t *record) { } else { /* A macro is being recorded right now. */ switch (keycode) { + case DYN_REC_START1: + case DYN_REC_START2: case DYN_REC_STOP: /* Stop the macro recording. */ - if (record->event.pressed) { /* Ignore the initial release - * just after the recoding - * starts. */ + if (record->event.pressed ^ (keycode != DYN_REC_STOP)) { /* Ignore the initial release + * just after the recording + * starts for DYN_REC_STOP. */ switch (macro_id) { case 1: dynamic_macro_record_end(macro_buffer, macro_pointer, +1, ¯o_end); From 9ae15e8c79375f2ca2f315d8b24e8c51a6855039 Mon Sep 17 00:00:00 2001 From: QMK Bot Date: Tue, 7 Jul 2020 21:43:51 +0000 Subject: [PATCH 339/930] format code according to conventions [skip ci] --- quantum/process_keycode/process_dynamic_macro.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/quantum/process_keycode/process_dynamic_macro.c b/quantum/process_keycode/process_dynamic_macro.c index df3a8a812056..18c8d7ca2e10 100644 --- a/quantum/process_keycode/process_dynamic_macro.c +++ b/quantum/process_keycode/process_dynamic_macro.c @@ -221,8 +221,8 @@ bool process_dynamic_macro(uint16_t keycode, keyrecord_t *record) { case DYN_REC_STOP: /* Stop the macro recording. */ if (record->event.pressed ^ (keycode != DYN_REC_STOP)) { /* Ignore the initial release - * just after the recording - * starts for DYN_REC_STOP. */ + * just after the recording + * starts for DYN_REC_STOP. */ switch (macro_id) { case 1: dynamic_macro_record_end(macro_buffer, macro_pointer, +1, ¯o_end); From 038a86a9b8bcdcc2db03240dec7d730569ff63bf Mon Sep 17 00:00:00 2001 From: Matthew Tse <1315979+m-tse@users.noreply.github.com> Date: Tue, 7 Jul 2020 23:40:13 -0400 Subject: [PATCH 340/930] Add missing bracket for Tap-Hold code sample (#9675) The `TAPPING_TERM_PER_KEY` code sample is missing a closing bracket. This adds it. --- docs/tap_hold.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/tap_hold.md b/docs/tap_hold.md index 2dc57f03c2d4..589ec3181609 100644 --- a/docs/tap_hold.md +++ b/docs/tap_hold.md @@ -32,6 +32,7 @@ uint16_t get_tapping_term(uint16_t keycode, keyrecord_t *record) { return 130; default: return TAPPING_TERM; + } } ``` From c8ab8e0babb9247b420df8b10c16fae6438c38a4 Mon Sep 17 00:00:00 2001 From: TerryMathews Date: Wed, 8 Jul 2020 09:25:30 -0400 Subject: [PATCH 341/930] [Keyboard] Add support for YDKB Chili (#9583) * Add support for YDKB Chili Co-authored-by: Ryan Co-authored-by: Joel Challis Co-authored-by: Erovia --- keyboards/chili/README.md | 15 ++ keyboards/chili/chili.c | 42 ++++++ keyboards/chili/chili.h | 39 +++++ keyboards/chili/config.h | 179 +++++++++++++++++++++++ keyboards/chili/info.json | 12 ++ keyboards/chili/keymaps/default/keymap.c | 35 +++++ keyboards/chili/keymaps/via/keymap.c | 61 ++++++++ keyboards/chili/keymaps/via/rules.mk | 1 + keyboards/chili/rules.mk | 31 ++++ 9 files changed, 415 insertions(+) create mode 100644 keyboards/chili/README.md create mode 100644 keyboards/chili/chili.c create mode 100644 keyboards/chili/chili.h create mode 100644 keyboards/chili/config.h create mode 100644 keyboards/chili/info.json create mode 100644 keyboards/chili/keymaps/default/keymap.c create mode 100644 keyboards/chili/keymaps/via/keymap.c create mode 100644 keyboards/chili/keymaps/via/rules.mk create mode 100644 keyboards/chili/rules.mk diff --git a/keyboards/chili/README.md b/keyboards/chili/README.md new file mode 100644 index 000000000000..a383f98fb0a5 --- /dev/null +++ b/keyboards/chili/README.md @@ -0,0 +1,15 @@ +# YDKB Chili + +[Chili PCB](https://i.imgur.com/fKi896a.jpg) + +The YDKB Chili is a Cherry G80-3000 replacement PCB utilizing the ATmega32U4 microcontroller. + +* Keyboard Maintainer: QMK community +* Hardware Supported: YDKB Chili +* Hardware Availability: [TaoBao](https://item.taobao.com/item.htm?id=565823984744) + +Make example for this keyboard (after setting up your build environment): + + make chili: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/chili/chili.c b/keyboards/chili/chili.c new file mode 100644 index 000000000000..40d3528b0805 --- /dev/null +++ b/keyboards/chili/chili.c @@ -0,0 +1,42 @@ +/* Copyright 2017 Mathias Andersson + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#include "chili.h" + +void matrix_init_kb(void) { + // put your keyboard start-up code here + // runs once when the firmware starts up + led_init_ports(); + matrix_init_user(); +} + +void led_init_ports(void) { + setPinOutput(B1); + writePinHigh(B1); + setPinOutput(B2); + writePinHigh(B2); + setPinOutput(B3); + writePinHigh(B3); +} + +bool led_update_kb(led_t led_state) { + bool res = led_update_user(led_state); + if(res) { + writePin(B1, !led_state.num_lock); + writePin(B2, !led_state.caps_lock); + writePin(B3, !led_state.scroll_lock); + } + return res; +} diff --git a/keyboards/chili/chili.h b/keyboards/chili/chili.h new file mode 100644 index 000000000000..f5e1444b94ba --- /dev/null +++ b/keyboards/chili/chili.h @@ -0,0 +1,39 @@ +/* Copyright 2017 Mathias Andersson + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License 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, K69, K68, K67, K66, K65, K64, \ + K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K79, K78, K77, K76, K75, K74, K73, K72, K63, K62, K61, K60, \ + K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K89, K88, K87, K86, K85, K84, K83, K82, K81, K80, K90, \ + K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K99, K98, K97, K95, K92, K71, K70, \ + K40, K41, K42, K43, K44, K45, K46, K47, K48, K49, KA9, KA8, KA6, KA7, K96, K94, K93, K91, KA0, \ + K50, K51, K52, K53, K54, K55, K56, K57, K58, K59, KA5, KA4, KA3, KA2, KA1 \ +) { \ + { 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, K79 }, \ + { K80, K81, K82, K83, K84, K85, K86, K87, K88, K89 }, \ + { K90, K91, K92, K93, K94, K95, K96, K97, K98, K99 }, \ + { KA0, KA1, KA2, KA3, KA4, KA5, KA6, KA7, KA8, KA9 } \ +} diff --git a/keyboards/chili/config.h b/keyboards/chili/config.h new file mode 100644 index 000000000000..b12b97f00935 --- /dev/null +++ b/keyboards/chili/config.h @@ -0,0 +1,179 @@ +/* +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 0x5945 // "YE" +#define PRODUCT_ID 0x0001 +#define DEVICE_VER 0x0001 +#define MANUFACTURER YDKB +#define PRODUCT Chili +#define DESCRIPTION QMK keyboard firmware for Chili, a G80-3000 replacement PCB + +/* key matrix size */ +#define MATRIX_ROWS 11 +#define MATRIX_COLS 10 + +// ROWS: Top to bottom, COLS: Left to right +/* Row pin configuration +*/ +#define MATRIX_ROW_PINS { F5, F4, F1, F0, E6, B0, D5, D3, D2, D1, D0 } +/* Column pin configuration + */ +#define MATRIX_COL_PINS { D4, F6, F7, C7, C6, B6, B5, B4, D7, D6 } +#define UNUSED_PINS + +/* COL2ROW or ROW2COL */ +#define DIODE_DIRECTION COL2ROW + +#define BACKLIGHT_PIN B7 +#define BACKLIGHT_BREATHING +#define BACKLIGHT_LEVELS 3 + +/* Underlight configuration + */ +#define RGB_DI_PIN B3 +#define RGBLIGHT_ANIMATIONS +#define RGBLED_NUM 30 // Number of LEDs +#define RGBLIGHT_HUE_STEP 5 +#define RGBLIGHT_SAT_STEP 10 +#define RGBLIGHT_VAL_STEP 10 + +/* 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 + + +/* + * 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. + * + */ + +/* 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_HELP1 H +//#define MAGIC_KEY_HELP2 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_ALT1 ESC +//#define MAGIC_KEY_LAYER0_ALT2 GRAVE +//#define MAGIC_KEY_LAYER0 0 +//#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 PAUSE +//#define MAGIC_KEY_LOCK CAPS +//#define MAGIC_KEY_EEPROM E +//#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 diff --git a/keyboards/chili/info.json b/keyboards/chili/info.json new file mode 100644 index 000000000000..414ae9b7fa4e --- /dev/null +++ b/keyboards/chili/info.json @@ -0,0 +1,12 @@ +{ + "keyboard_name": "YDKB Chili", + "url": "", + "maintainer": "qmk", + "width": 22.5, + "height": 6.5, + "layouts": { + "LAYOUT_all": { + "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":"PrtSc", "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":"!", "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":"Backsp", "x":13, "y":1.5}, {"x":14, "y":1.5}, {"label":"Insert", "x":15.25, "y":1.5}, {"label":"Home", "x":16.25, "y":1.5}, {"label":"PgUp", "x":17.25, "y":1.5}, {"label":"Num Lock", "x":18.5, "y":1.5}, {"label":"/", "x":19.5, "y":1.5}, {"label":"*", "x":20.5, "y":1.5}, {"label":"-", "x":21.5, "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":"|", "x":13.5, "y":2.5, "w":1.5}, {"label":"Delete", "x":15.25, "y":2.5}, {"label":"End", "x":16.25, "y":2.5}, {"label":"PgDn", "x":17.25, "y":2.5}, {"label":"7", "x":18.5, "y":2.5}, {"label":"8", "x":19.5, "y":2.5}, {"label":"9", "x":20.5, "y":2.5}, {"label":"+", "x":21.5, "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":"Enter", "x":12.75, "y":3.5, "w":2.25}, {"label":"4", "x":18.5, "y":3.5}, {"label":"5", "x":19.5, "y":3.5}, {"label":"6", "x":20.5, "y":3.5}, {"x":21.5, "y":3.5}, {"label":"Shift", "x":0, "y":4.5, "w":1.25}, {"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":1.75}, {"x":14, "y":4.5}, {"label":"\u2191", "x":16.25, "y":4.5}, {"label":"1", "x":18.5, "y":4.5}, {"label":"2", "x":19.5, "y":4.5}, {"label":"3", "x":20.5, "y":4.5}, {"label":"Enter", "x":21.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":3}, {"x":6.75, "y":5.5, "w":3}, {"label":"Alt", "x":9.75, "y":5.5, "w":1.5}, {"label":"Win", "x":11.25, "y":5.5, "w":1.25}, {"label":"Menu", "x":12.5, "y":5.5, "w":1.25}, {"label":"Ctrl", "x":13.75, "y":5.5, "w":1.25}, {"label":"\u2190", "x":15.25, "y":5.5}, {"label":"\u2193", "x":16.25, "y":5.5}, {"label":"\u2192", "x":17.25, "y":5.5}, {"label":"0", "x":18.5, "y":5.5}, {"x":19.5, "y":5.5}, {"label":".", "x":20.5, "y":5.5}] + } + } +} diff --git a/keyboards/chili/keymaps/default/keymap.c b/keyboards/chili/keymaps/default/keymap.c new file mode 100644 index 000000000000..32ac9a066d2c --- /dev/null +++ b/keyboards/chili/keymaps/default/keymap.c @@ -0,0 +1,35 @@ +/* Copyright 2017 Mathias Andersson + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public 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 + +//Layers + +enum { + BASE, +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [BASE] = 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_NO, KC_INS, KC_HOME, KC_PGUP, 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_DEL, KC_END, KC_PGDN, 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_NO, + 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_UP, KC_P1, KC_P2, KC_P3, KC_PENT, + KC_LCTL, KC_LGUI, KC_LALT, KC_NO, KC_SPC, KC_RALT, KC_RGUI, KC_APP, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT, KC_P0, KC_NO, KC_PDOT + ), + +}; diff --git a/keyboards/chili/keymaps/via/keymap.c b/keyboards/chili/keymaps/via/keymap.c new file mode 100644 index 000000000000..9d5cdd303ffc --- /dev/null +++ b/keyboards/chili/keymaps/via/keymap.c @@ -0,0 +1,61 @@ +/* Copyright 2017 Mathias Andersson + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public 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 + +//Layers + +enum { + BASE = 0, + FUNCTION, + ALTERNATE, + LAST, +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [BASE] = 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_NO, KC_INS, KC_HOME, KC_PGUP, 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_DEL, KC_END, KC_PGDN, 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_NO, + 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_UP, KC_P1, KC_P2, KC_P3, KC_PENT, + KC_LCTL, KC_LGUI, KC_LALT, KC_NO, KC_SPC, KC_RALT, KC_RGUI, KC_APP, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT, KC_P0, KC_NO, KC_PDOT + ), + [FUNCTION] = LAYOUT_all( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + [ALTERNATE] = LAYOUT_all( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + [LAST] = LAYOUT_all( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), +}; diff --git a/keyboards/chili/keymaps/via/rules.mk b/keyboards/chili/keymaps/via/rules.mk new file mode 100644 index 000000000000..1e5b99807cb7 --- /dev/null +++ b/keyboards/chili/keymaps/via/rules.mk @@ -0,0 +1 @@ +VIA_ENABLE = yes diff --git a/keyboards/chili/rules.mk b/keyboards/chili/rules.mk new file mode 100644 index 000000000000..a99c946d2878 --- /dev/null +++ b/keyboards/chili/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 = 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 WS2812 RGB underlight +MIDI_ENABLE = no # MIDI controls +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth +AUDIO_ENABLE = no # Audio output From 047a7f4e333454387c8f46bcee53f7a55d8c5426 Mon Sep 17 00:00:00 2001 From: boss566y <67247583+boss566y@users.noreply.github.com> Date: Wed, 8 Jul 2020 09:33:43 -0400 Subject: [PATCH 342/930] [Keyboard] Added Handwired Redragon Keyboard (#9590) * Added Handwired Redragon Keyboard as well as default and via keymaps * Update keyboards/handwired/boss566y/redragon_vara/info.json Co-authored-by: Joel Challis * Update keyboards/handwired/boss566y/redragon_vara/keymaps/default/keymap.c Co-authored-by: Joel Challis * Update keyboards/handwired/boss566y/redragon_vara/keymaps/default/keymap.c Co-authored-by: Joel Challis * Update keyboards/handwired/boss566y/redragon_vara/keymaps/via/keymap.c Co-authored-by: Joel Challis * Update keyboards/handwired/boss566y/redragon_vara/keymaps/via/keymap.c Co-authored-by: Joel Challis * Update keyboards/handwired/boss566y/redragon_vara/keymaps/via/keymap.c Co-authored-by: Joel Challis * Update keyboards/handwired/boss566y/redragon_vara/redragon_vara.c Co-authored-by: Joel Challis * Update keyboards/handwired/boss566y/redragon_vara/redragon_vara.h Co-authored-by: Joel Challis * Update keyboards/handwired/boss566y/redragon_vara/rules.mk Co-authored-by: Joel Challis * Update keyboards/handwired/boss566y/redragon_vara/keymaps/default/keymap.c Co-authored-by: Joel Challis * Update keyboards/handwired/boss566y/redragon_vara/info.json Co-authored-by: Ryan * Update keyboards/handwired/boss566y/redragon_vara/rules.mk Co-authored-by: Ryan * Update keymap.c Removed defined keycodes from via keymap * Update keymap.c replaced defined keycodes in default keymap * Update readme.md Changed image to one that matches the physical keyboard Co-authored-by: Joel Challis Co-authored-by: Ryan --- .../handwired/boss566y/redragon_vara/config.h | 51 ++++++++ .../boss566y/redragon_vara/info.json | 118 ++++++++++++++++++ .../redragon_vara/keymaps/default/keymap.c | 45 +++++++ .../redragon_vara/keymaps/default/readme.md | 11 ++ .../redragon_vara/keymaps/via/config.h | 21 ++++ .../redragon_vara/keymaps/via/keymap.c | 45 +++++++ .../redragon_vara/keymaps/via/readme.md | 12 ++ .../redragon_vara/keymaps/via/rules.mk | 2 + .../boss566y/redragon_vara/readme.md | 14 +++ .../boss566y/redragon_vara/redragon_vara.c | 16 +++ .../boss566y/redragon_vara/redragon_vara.h | 43 +++++++ .../handwired/boss566y/redragon_vara/rules.mk | 34 +++++ 12 files changed, 412 insertions(+) create mode 100644 keyboards/handwired/boss566y/redragon_vara/config.h create mode 100644 keyboards/handwired/boss566y/redragon_vara/info.json create mode 100644 keyboards/handwired/boss566y/redragon_vara/keymaps/default/keymap.c create mode 100644 keyboards/handwired/boss566y/redragon_vara/keymaps/default/readme.md create mode 100644 keyboards/handwired/boss566y/redragon_vara/keymaps/via/config.h create mode 100644 keyboards/handwired/boss566y/redragon_vara/keymaps/via/keymap.c create mode 100644 keyboards/handwired/boss566y/redragon_vara/keymaps/via/readme.md create mode 100644 keyboards/handwired/boss566y/redragon_vara/keymaps/via/rules.mk create mode 100644 keyboards/handwired/boss566y/redragon_vara/readme.md create mode 100644 keyboards/handwired/boss566y/redragon_vara/redragon_vara.c create mode 100644 keyboards/handwired/boss566y/redragon_vara/redragon_vara.h create mode 100644 keyboards/handwired/boss566y/redragon_vara/rules.mk diff --git a/keyboards/handwired/boss566y/redragon_vara/config.h b/keyboards/handwired/boss566y/redragon_vara/config.h new file mode 100644 index 000000000000..167bddd485b8 --- /dev/null +++ b/keyboards/handwired/boss566y/redragon_vara/config.h @@ -0,0 +1,51 @@ +/* +Copyright 2020 boss566y + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License 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 0x5048 //PH +#define PRODUCT_ID 0x0001 +#define DEVICE_VER 0x0001 +#define MANUFACTURER PH +#define PRODUCT Redragon Vara +#define DESCRIPTION HandWired Redragon Vara + +/* key matrix size */ +#define MATRIX_ROWS 12 +#define MATRIX_COLS 11 + +/* + * 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, B2, B3, B7, D0, F0, F1, F4, F5, F6, F7 } +#define MATRIX_COL_PINS { D1, D2, D3, C6, D5, C7, D4, D7, B4, B5, B6 } + +#define DIODE_DIRECTION COL2ROW + + +// generated by KBFirmware JSON to QMK Parser +// https://noroadsleft.github.io/kbf_qmk_converter/ \ No newline at end of file diff --git a/keyboards/handwired/boss566y/redragon_vara/info.json b/keyboards/handwired/boss566y/redragon_vara/info.json new file mode 100644 index 000000000000..d511c4ef468b --- /dev/null +++ b/keyboards/handwired/boss566y/redragon_vara/info.json @@ -0,0 +1,118 @@ +{ + "keyboard_name": "Handwired Redragon Vara", + "url": "", + "maintainer": "qmk", + "width": 22.5, + "height": 6.5, + "layouts": { + "LAYOUT_fullsize_ansi": { + "layout": [ + {"label":"K00 (B0,D1)", "x":0, "y":0}, + {"label":"K02 (B0,D3)", "x":2, "y":0}, + {"label":"K03 (B0,C6)", "x":3, "y":0}, + {"label":"K04 (B0,D5)", "x":4, "y":0}, + {"label":"K05 (B0,C7)", "x":5, "y":0}, + {"label":"K07 (B0,D7)", "x":6.5, "y":0}, + {"label":"K08 (B0,B4)", "x":7.5, "y":0}, + {"label":"K09 (B0,B5)", "x":8.5, "y":0}, + {"label":"K0A (B0,B6)", "x":9.5, "y":0}, + {"label":"K6A (F0,B6)", "x":11, "y":0}, + {"label":"K69 (F0,B5)", "x":12, "y":0}, + {"label":"K68 (F0,B4)", "x":13, "y":0}, + {"label":"K67 (F0,D7)", "x":14, "y":0}, + {"label":"K66 (F0,D4)", "x":15.25, "y":0}, + {"label":"K65 (F0,C7)", "x":16.25, "y":0}, + {"label":"K64 (F0,D5)", "x":17.25, "y":0}, + {"label":"K10 (B1,D1)", "x":0, "y":1.5}, + {"label":"K11 (B1,D2)", "x":1, "y":1.5}, + {"label":"K12 (B1,D3)", "x":2, "y":1.5}, + {"label":"K13 (B1,C6)", "x":3, "y":1.5}, + {"label":"K14 (B1,D5)", "x":4, "y":1.5}, + {"label":"K15 (B1,C7)", "x":5, "y":1.5}, + {"label":"K16 (B1,D4)", "x":6, "y":1.5}, + {"label":"K17 (B1,D7)", "x":7, "y":1.5}, + {"label":"K18 (B1,B4)", "x":8, "y":1.5}, + {"label":"K19 (B1,B5)", "x":9, "y":1.5}, + {"label":"K1A (B1,B6)", "x":10, "y":1.5}, + {"label":"K7A (F1,B6)", "x":11, "y":1.5}, + {"label":"K79 (F1,B5)", "x":12, "y":1.5}, + {"label":"K78 (F1,B4)", "x":13, "y":1.5, "w":2}, + {"label":"K76 (F1,D4)", "x":15.25, "y":1.5}, + {"label":"K75 (F1,C7)", "x":16.25, "y":1.5}, + {"label":"K74 (F1,D5)", "x":17.25, "y":1.5}, + {"label":"K73 (F1,C6)", "x":18.5, "y":1.5}, + {"label":"K72 (F1,D3)", "x":19.5, "y":1.5}, + {"label":"K71 (F1,D2)", "x":20.5, "y":1.5}, + {"label":"K70 (F1,D1)", "x":21.5, "y":1.5}, + {"label":"K20 (B2,D1)", "x":0, "y":2.5, "w":1.5}, + {"label":"K21 (B2,D2)", "x":1.5, "y":2.5}, + {"label":"K22 (B2,D3)", "x":2.5, "y":2.5}, + {"label":"K23 (B2,C6)", "x":3.5, "y":2.5}, + {"label":"K24 (B2,D5)", "x":4.5, "y":2.5}, + {"label":"K25 (B2,C7)", "x":5.5, "y":2.5}, + {"label":"K26 (B2,D4)", "x":6.5, "y":2.5}, + {"label":"K27 (B2,D7)", "x":7.5, "y":2.5}, + {"label":"K28 (B2,B4)", "x":8.5, "y":2.5}, + {"label":"K29 (B2,B5)", "x":9.5, "y":2.5}, + {"label":"K2A (B2,B6)", "x":10.5, "y":2.5}, + {"label":"K8A (F4,B6)", "x":11.5, "y":2.5}, + {"label":"K89 (F4,B5)", "x":12.5, "y":2.5}, + {"label":"K87 (F4,D7)", "x":13.5, "y":2.5, "w":1.5}, + {"label":"K86 (F4,D4)", "x":15.25, "y":2.5}, + {"label":"K85 (F4,C7)", "x":16.25, "y":2.5}, + {"label":"K84 (F4,D5)", "x":17.25, "y":2.5}, + {"label":"K83 (F4,C6)", "x":18.5, "y":2.5}, + {"label":"K82 (F4,D3)", "x":19.5, "y":2.5}, + {"label":"K81 (F4,D2)", "x":20.5, "y":2.5}, + {"label":"K90 (F5,D1)", "x":21.5, "y":2.5, "h":2}, + {"label":"K30 (B3,D1)", "x":0, "y":3.5, "w":1.75}, + {"label":"K31 (B3,D2)", "x":1.75, "y":3.5}, + {"label":"K32 (B3,D3)", "x":2.75, "y":3.5}, + {"label":"K33 (B3,C6)", "x":3.75, "y":3.5}, + {"label":"K34 (B3,D5)", "x":4.75, "y":3.5}, + {"label":"K35 (B3,C7)", "x":5.75, "y":3.5}, + {"label":"K36 (B3,D4)", "x":6.75, "y":3.5}, + {"label":"K37 (B3,D7)", "x":7.75, "y":3.5}, + {"label":"K38 (B3,B4)", "x":8.75, "y":3.5}, + {"label":"K39 (B3,B5)", "x":9.75, "y":3.5}, + {"label":"K3A (B3,B6)", "x":10.75, "y":3.5}, + {"label":"K9A (F5,B6)", "x":11.75, "y":3.5}, + {"label":"K98 (F5,B4)", "x":12.75, "y":3.5, "w":2.25}, + {"label":"K93 (F5,C6)", "x":18.5, "y":3.5}, + {"label":"K92 (F5,D3)", "x":19.5, "y":3.5}, + {"label":"K91 (F5,D2)", "x":20.5, "y":3.5}, + {"label":"K40 (B7,D1)", "x":0, "y":4.5, "w":2.25}, + {"label":"K42 (B7,D3)", "x":2.25, "y":4.5}, + {"label":"K43 (B7,C6)", "x":3.25, "y":4.5}, + {"label":"K44 (B7,D5)", "x":4.25, "y":4.5}, + {"label":"K45 (B7,C7)", "x":5.25, "y":4.5}, + {"label":"K46 (B7,D4)", "x":6.25, "y":4.5}, + {"label":"K47 (B7,D7)", "x":7.25, "y":4.5}, + {"label":"K48 (B7,B4)", "x":8.25, "y":4.5}, + {"label":"K49 (B7,B5)", "x":9.25, "y":4.5}, + {"label":"K4A (B7,B6)", "x":10.25, "y":4.5}, + {"label":"KAA (F6,B6)", "x":11.25, "y":4.5}, + {"label":"KA8 (F6,B4)", "x":12.25, "y":4.5, "w":2.75}, + {"label":"KA5 (F6,C7)", "x":16.25, "y":4.5}, + {"label":"KA3 (F6,C6)", "x":18.5, "y":4.5}, + {"label":"KA2 (F6,D3)", "x":19.5, "y":4.5}, + {"label":"KA1 (F6,D2)", "x":20.5, "y":4.5}, + {"label":"KB0 (F7,D1)", "x":21.5, "y":4.5, "h":2}, + {"label":"K50 (D0,D1)", "x":0, "y":5.5, "w":1.25}, + {"label":"K51 (D0,D2)", "x":1.25, "y":5.5, "w":1.25}, + {"label":"K53 (D0,C6)", "x":2.5, "y":5.5, "w":1.25}, + {"label":"K56 (D0,D4)", "x":3.75, "y":5.5, "w":6.25}, + {"label":"K5A (D0,B6)", "x":10, "y":5.5, "w":1.25}, + {"label":"KBA (F7,B6)", "x":11.25, "y":5.5, "w":1.25}, + {"label":"KB9 (F7,B5)", "x":12.5, "y":5.5, "w":1.25}, + {"label":"KB7 (F7,D7)", "x":13.75, "y":5.5, "w":1.25}, + {"label":"KB6 (F7,D4)", "x":15.25, "y":5.5}, + {"label":"KB5 (F7,C7)", "x":16.25, "y":5.5}, + {"label":"KB4 (F7,D5)", "x":17.25, "y":5.5}, + {"label":"KB3 (F7,C6)", "x":18.5, "y":5.5, "w":2}, + {"label":"KB1 (F7,D2)", "x":20.5, "y":5.5} + ] + } + } + ,"meta": "https://noroadsleft.github.io/kbf_qmk_converter/" +} diff --git a/keyboards/handwired/boss566y/redragon_vara/keymaps/default/keymap.c b/keyboards/handwired/boss566y/redragon_vara/keymaps/default/keymap.c new file mode 100644 index 000000000000..569ce187a434 --- /dev/null +++ b/keyboards/handwired/boss566y/redragon_vara/keymaps/default/keymap.c @@ -0,0 +1,45 @@ +/* Copyright 2020 boss566y + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public 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_fullsize_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_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_DEL, KC_END, KC_PGDN, KC_P7, KC_P8, KC_P9, KC_PPLS, + XXXXXXX, 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_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, MO(1), MO(2), RGUI_T(KC_APP), KC_LCTL, KC_LEFT, KC_DOWN, KC_RGHT, KC_P0, KC_PDOT + ), + [1] = LAYOUT_fullsize_ansi( + RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL, _______, C(KC_HOME), _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + KC_CAPS, KC_MPRV, KC_MSTP, KC_MPLY, KC_MNXT, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, KC_VOLD, KC_VOLU, KC_MUTE, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + [2] = LAYOUT_fullsize_ansi( + RESET, _______, _______, _______, _______, _______, KC_VOLD, KC_VOLU, KC_MUTE, KC_MPRV, KC_MSTP, KC_MPLY, KC_MNXT, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + + +}; diff --git a/keyboards/handwired/boss566y/redragon_vara/keymaps/default/readme.md b/keyboards/handwired/boss566y/redragon_vara/keymaps/default/readme.md new file mode 100644 index 000000000000..8836223788ef --- /dev/null +++ b/keyboards/handwired/boss566y/redragon_vara/keymaps/default/readme.md @@ -0,0 +1,11 @@ +# Default Layout + +Keymap is basic 104 qwerty layout with: + +* Caps Lock moved to Layer 1 leaving blank key on Base Layer +* Menu Key changed to mod tap for Menu and Windows Keys +* RAlt changed to M(1). Media playback on A to F, volume keys on X to V, and Delete on Backspace +* FN is M(2). Arrow keys on HJKL, media keys on F6 to F12, and RCtrl+Home on Home. +* Both M(1) and M(2) have Reset on Escape + + \ No newline at end of file diff --git a/keyboards/handwired/boss566y/redragon_vara/keymaps/via/config.h b/keyboards/handwired/boss566y/redragon_vara/keymaps/via/config.h new file mode 100644 index 000000000000..a9cb8393a8e9 --- /dev/null +++ b/keyboards/handwired/boss566y/redragon_vara/keymaps/via/config.h @@ -0,0 +1,21 @@ +/* +Copyright 2020 boss566y + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License 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 DYNAMIC_KEYMAP_LAYER_COUNT 3 + diff --git a/keyboards/handwired/boss566y/redragon_vara/keymaps/via/keymap.c b/keyboards/handwired/boss566y/redragon_vara/keymaps/via/keymap.c new file mode 100644 index 000000000000..6b10c598bf29 --- /dev/null +++ b/keyboards/handwired/boss566y/redragon_vara/keymaps/via/keymap.c @@ -0,0 +1,45 @@ +/* Copyright 2020 boss566y + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public 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_fullsize_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_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_DEL, KC_END, KC_PGDN, KC_P7, KC_P8, KC_P9, KC_PPLS, + XXXXXXX, 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_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, MO(1), MO(2), KC_RGUI, KC_LCTL, KC_LEFT, KC_DOWN, KC_RGHT, KC_P0, KC_PDOT + ), + [1] = LAYOUT_fullsize_ansi( + RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + KC_CAPS, KC_MPRV, KC_MSTP, KC_MPLY, KC_MNXT, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, KC_VOLD, KC_VOLU, KC_MUTE, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + [2] = LAYOUT_fullsize_ansi( + RESET, _______, _______, _______, _______, _______, KC_VOLD, KC_VOLU, KC_MUTE, KC_MPRV, KC_MSTP, KC_MPLY, KC_MNXT, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + +}; diff --git a/keyboards/handwired/boss566y/redragon_vara/keymaps/via/readme.md b/keyboards/handwired/boss566y/redragon_vara/keymaps/via/readme.md new file mode 100644 index 000000000000..d89cb08a805c --- /dev/null +++ b/keyboards/handwired/boss566y/redragon_vara/keymaps/via/readme.md @@ -0,0 +1,12 @@ +# Default Layout + +Keymap is basic 104 qwerty layout with: + +* Caps Lock moved to Layer 1 leaving blank key on Base Layer +* Menu Key changed to mod tap for Menu and Windows Keys +* RAlt changed to M(1). Media playback on A to F, volume keys on X to V, and Delete on Backspace +* FN is M(2). Arrow keys on HJKL, media keys on F6 to F12, and RCtrl+Home on Home. +* Both M(1) and M(2) have Reset on Escape +* VIA Enabled [VIA JSON File](https://github.com/boss566y/keyboards/blob/boss566y/src/boss566y/handwired/redragon_vara.json) + + \ No newline at end of file diff --git a/keyboards/handwired/boss566y/redragon_vara/keymaps/via/rules.mk b/keyboards/handwired/boss566y/redragon_vara/keymaps/via/rules.mk new file mode 100644 index 000000000000..43061db1dd46 --- /dev/null +++ b/keyboards/handwired/boss566y/redragon_vara/keymaps/via/rules.mk @@ -0,0 +1,2 @@ +VIA_ENABLE = yes +LTO_ENABLE = yes \ No newline at end of file diff --git a/keyboards/handwired/boss566y/redragon_vara/readme.md b/keyboards/handwired/boss566y/redragon_vara/readme.md new file mode 100644 index 000000000000..d01745051f34 --- /dev/null +++ b/keyboards/handwired/boss566y/redragon_vara/readme.md @@ -0,0 +1,14 @@ +# Handwired Redragon Vara + +![Redragon](https://imgur.com/6L35ata.jpg) + +A handwired Redragon Vara. Built using a teensy 2.0 and has a 12x11 matrix + +* Keyboard Maintainer: [boss566y](https://github.com/boss566y) +* Hardware: Redragon Vara and Teensy 2.0 + +Make example for this keyboard (after setting up your build environment): + + make handwired/boss566y/redragon_vara: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/boss566y/redragon_vara/redragon_vara.c b/keyboards/handwired/boss566y/redragon_vara/redragon_vara.c new file mode 100644 index 000000000000..18cfcfaa17e4 --- /dev/null +++ b/keyboards/handwired/boss566y/redragon_vara/redragon_vara.c @@ -0,0 +1,16 @@ +/* Copyright 2020 boss566y + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#include "redragon_vara.h" diff --git a/keyboards/handwired/boss566y/redragon_vara/redragon_vara.h b/keyboards/handwired/boss566y/redragon_vara/redragon_vara.h new file mode 100644 index 000000000000..d24231114654 --- /dev/null +++ b/keyboards/handwired/boss566y/redragon_vara/redragon_vara.h @@ -0,0 +1,43 @@ +/* Copyright 2020 boss566y + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License 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_fullsize_ansi( \ + K00, K02, K03, K04, K05, K07, K08, K09, K0A, K6A, K69, K68, K67, K66, K65, K64, \ + K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K7A, K79, K78, K76, K75, K74, K73, K72, K71, K70, \ + K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K8A, K89, K87, K86, K85, K84, K83, K82, K81, K90, \ + K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K9A, K98, K93, K92, K91, \ + K40, K42, K43, K44, K45, K46, K47, K48, K49, K4A, KAA, KA8, KA5, KA3, KA2, KA1, KB0, \ + K50, K51, K53, K56, K5A, KBA, KB9, KB7, KB6, KB5, KB4, KB3, KB1 \ +) { \ + { K00, KC_NO, K02, K03, K04, K05, KC_NO, 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, K33, K34, K35, K36, K37, K38, K39, K3A }, \ + { K40, KC_NO, K42, K43, K44, K45, K46, K47, K48, K49, K4A }, \ + { K50, K51, KC_NO, K53, KC_NO, KC_NO, K56, KC_NO, KC_NO, KC_NO, K5A }, \ + { KC_NO, KC_NO, KC_NO, KC_NO, K64, K65, K66, K67, K68, K69, K6A }, \ + { K70, K71, K72, K73, K74, K75, K76, KC_NO, K78, K79, K7A }, \ + { KC_NO, K81, K82, K83, K84, K85, K86, K87, KC_NO, K89, K8A }, \ + { K90, K91, K92, K93, KC_NO, KC_NO, KC_NO, KC_NO, K98, KC_NO, K9A }, \ + { KC_NO, KA1, KA2, KA3, KC_NO, KA5, KC_NO, KC_NO, KA8, KC_NO, KAA }, \ + { KB0, KB1, KC_NO, KB3, KB4, KB5, KB6, KB7, KC_NO, KB9, KBA }, \ +} + +// generated by KBFirmware JSON to QMK Parser +// https://noroadsleft.github.io/kbf_qmk_converter/ diff --git a/keyboards/handwired/boss566y/redragon_vara/rules.mk b/keyboards/handwired/boss566y/redragon_vara/rules.mk new file mode 100644 index 000000000000..958a948fb431 --- /dev/null +++ b/keyboards/handwired/boss566y/redragon_vara/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 = 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 +AUDIO_ENABLE = no # Audio output +FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches + +LAYOUTS = fullsize_ansi From d4917318cc11990f143f50f6233ed29240410352 Mon Sep 17 00:00:00 2001 From: James Young <18669334+noroadsleft@users.noreply.github.com> Date: Wed, 8 Jul 2020 09:18:50 -0700 Subject: [PATCH 343/930] Add layout macros to YD60MQ (#9653) - LAYOUT_60_ansi_split_bs - LAYOUT_60_ansi_split_bs_rshift - LAYOUT_60_ansi_split_rshift - LAYOUT_60_ansi_tsangan - LAYOUT_60_hhkb - LAYOUT_60_iso_split_bs - LAYOUT_60_iso_split_bs_rshift - LAYOUT_60_iso_split_rshift - LAYOUT_60_iso_tsangan --- keyboards/yd60mq/info.json | 635 ++++++++++++++++++++++++++++++++++++- keyboards/yd60mq/rules.mk | 2 +- keyboards/yd60mq/yd60mq.h | 139 +++++++- 3 files changed, 764 insertions(+), 12 deletions(-) diff --git a/keyboards/yd60mq/info.json b/keyboards/yd60mq/info.json index 60a62af7aa4a..56ddb147a039 100644 --- a/keyboards/yd60mq/info.json +++ b/keyboards/yd60mq/info.json @@ -6,7 +6,6 @@ "height": 5, "layouts": { "LAYOUT_all": { - "key_count": 69, "layout": [ {"label":"Esc", "x":0, "y":0}, {"label":"1", "x":1, "y":0}, @@ -80,7 +79,6 @@ ] }, "LAYOUT_60_ansi": { - "key_count": 61, "layout": [ {"x":0, "y":0}, {"x":1, "y":0}, @@ -145,8 +143,354 @@ {"x":13.75, "y":4, "w":1.25} ] }, + "LAYOUT_60_ansi_split_bs": { + "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":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} + ] + }, + "LAYOUT_60_ansi_split_bs_rshift": { + "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.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} + ] + }, + "LAYOUT_60_ansi_split_rshift": { + "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":1.75}, + {"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, "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} + ] + }, + "LAYOUT_60_ansi_tsangan": { + "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.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_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":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} + ] + }, "LAYOUT_60_iso": { - "key_count": 62, "layout": [ {"x":0, "y":0}, {"x":1, "y":0}, @@ -161,7 +505,78 @@ {"x":10, "y":0}, {"x":11, "y":0}, {"x":12, "y":0}, - {"x":13, "y":0, "w":2}, + {"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":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}, + {"x":13.75, "y":1, "w":1.25, "h":2}, + + {"x":0, "y":3, "w":1.25}, + {"x":1.25, "y":3}, + {"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} + ] + }, + "LAYOUT_60_iso_split_bs": { + "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}, @@ -215,6 +630,218 @@ {"x":12.5, "y":4, "w":1.25}, {"x":13.75, "y":4, "w":1.25} ] + }, + "LAYOUT_60_iso_split_bs_rshift": { + "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":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}, + {"x":13.75, "y":1, "w":1.25, "h":2}, + + {"x":0, "y":3, "w":1.25}, + {"x":1.25, "y":3}, + {"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.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} + ] + }, + "LAYOUT_60_iso_split_rshift": { + "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":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}, + {"x":13.75, "y":1, "w":1.25, "h":2}, + + {"x":0, "y":3, "w":1.25}, + {"x":1.25, "y":3}, + {"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.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} + ] + }, + "LAYOUT_60_iso_tsangan": { + "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":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}, + {"x":13.75, "y":1, "w":1.25, "h":2}, + + {"x":0, "y":3, "w":1.25}, + {"x":1.25, "y":3}, + {"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.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/yd60mq/rules.mk b/keyboards/yd60mq/rules.mk index 6619c187f4f1..3e4d8eaa0f5d 100644 --- a/keyboards/yd60mq/rules.mk +++ b/keyboards/yd60mq/rules.mk @@ -31,6 +31,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 -LAYOUTS = 60_ansi 60_iso +LAYOUTS = 60_ansi 60_ansi_split_bs_rshift 60_ansi_tsangan 60_hhkb 60_iso 60_iso_split_bs_rshift 60_iso_tsangan DEFAULT_FOLDER = yd60mq/12led diff --git a/keyboards/yd60mq/yd60mq.h b/keyboards/yd60mq/yd60mq.h index 6b3824baa370..79ff1a6c0564 100644 --- a/keyboards/yd60mq/yd60mq.h +++ b/keyboards/yd60mq/yd60mq.h @@ -30,19 +30,144 @@ { K40, K41, K42, KC_NO, KC_NO, KC_NO, KC_NO, K47, KC_NO, K49, K4A, KC_NO, K4C, K4D, KC_NO } \ } -#define LAYOUT_60_iso( \ +#define LAYOUT_60_ansi_split_bs( \ + 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, K3D, \ + K40, K41, K42, K47, K49, K4A, 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, KC_NO, K3D, KC_NO }, \ + { K40, K41, K42, KC_NO, KC_NO, KC_NO, KC_NO, K47, KC_NO, K49, K4A, KC_NO, K4C, K4D, KC_NO } \ +} + +#define LAYOUT_60_ansi_split_bs_rshift( \ + 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, K3D, K3E, \ + K40, K41, K42, K47, K49, K4A, 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, KC_NO, K3D, K3E }, \ + { K40, K41, K42, KC_NO, KC_NO, KC_NO, KC_NO, K47, KC_NO, K49, K4A, KC_NO, K4C, K4D, KC_NO } \ +} + +#define LAYOUT_60_ansi_split_rshift( \ 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, \ - K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2a, K2b, K2c, K1d, \ - K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3a, K3b, K3d, \ + 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, K3E, \ K40, K41, K42, K47, K49, K4A, K4C, K4D \ ) { \ { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, KC_NO, K0E }, \ - { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1a, K1b, K1c, KC_NO, }, \ - { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2a, K2b, K2c, K1d }, \ - { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3a, K3b, KC_NO, K3d, KC_NO }, \ + { 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, KC_NO, K3D, K3E }, \ { K40, K41, K42, KC_NO, KC_NO, KC_NO, KC_NO, K47, KC_NO, K49, K4A, KC_NO, K4C, K4D, KC_NO } \ } +#define LAYOUT_60_ansi_tsangan( \ + 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, 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, K47, K4A, K4C, K4D \ +) { \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, KC_NO, 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, KC_NO, K3D, KC_NO }, \ + { K40, K41, K42, KC_NO, KC_NO, KC_NO, KC_NO, K47, KC_NO, KC_NO, K4A, KC_NO, K4C, K4D, KC_NO } \ +} + +#define LAYOUT_60_hhkb( \ + 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, K3D, K3E, \ + K41, K42, K47, K4A, K4C \ +) { \ + { 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, KC_NO, K3D, K3E }, \ + { KC_NO, K41, K42, KC_NO, KC_NO, KC_NO, KC_NO, K47, KC_NO, KC_NO, K4A, KC_NO, K4C, KC_NO, KC_NO } \ +} + +#define LAYOUT_60_iso( \ + 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, \ + 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, K47, K49, K4A, K4C, K4D \ +) { \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, KC_NO, K0E }, \ + { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, KC_NO, KC_NO }, \ + { K20, K21, 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, KC_NO, K3D, KC_NO }, \ + { K40, K41, K42, KC_NO, KC_NO, KC_NO, KC_NO, K47, KC_NO, K49, K4A, KC_NO, K4C, K4D, KC_NO } \ +} + +#define LAYOUT_60_iso_split_bs( \ + 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, \ + 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, K47, K49, K4A, 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, KC_NO, KC_NO }, \ + { K20, K21, 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, KC_NO, K3D, KC_NO }, \ + { K40, K41, K42, KC_NO, KC_NO, KC_NO, KC_NO, K47, KC_NO, K49, K4A, KC_NO, K4C, K4D, KC_NO } \ +} + +#define LAYOUT_60_iso_split_bs_rshift( \ + 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, \ + 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, K3E, \ + K40, K41, K42, K47, K49, K4A, 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, KC_NO, KC_NO }, \ + { K20, K21, 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, KC_NO, K3D, K3E }, \ + { K40, K41, K42, KC_NO, KC_NO, KC_NO, KC_NO, K47, KC_NO, K49, K4A, KC_NO, K4C, K4D, KC_NO } \ +} + +#define LAYOUT_60_iso_split_rshift( \ + 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, \ + 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, K3E, \ + K40, K41, K42, K47, K49, K4A, K4C, K4D \ +) { \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, KC_NO, K0E }, \ + { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, KC_NO, KC_NO }, \ + { K20, K21, 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, KC_NO, K3D, K3E }, \ + { K40, K41, K42, KC_NO, KC_NO, KC_NO, KC_NO, K47, KC_NO, K49, K4A, KC_NO, K4C, K4D, KC_NO } \ +} + +#define LAYOUT_60_iso_tsangan( \ + 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, \ + 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, K47, K4A, K4C, K4D \ +) { \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, KC_NO, K0E }, \ + { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, KC_NO, KC_NO }, \ + { K20, K21, 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, KC_NO, K3D, KC_NO }, \ + { K40, K41, K42, KC_NO, KC_NO, KC_NO, KC_NO, K47, KC_NO, KC_NO, K4A, KC_NO, K4C, K4D, KC_NO } \ +} #define LAYOUT LAYOUT_all From c4960b7579a07858c5f8481b6fd9dc6363060d09 Mon Sep 17 00:00:00 2001 From: ilikepi2 Date: Wed, 8 Jul 2020 09:20:24 -0700 Subject: [PATCH 344/930] Add VIA Functionality for Keyhive Maypad (#9654) Co-authored-by: Ryan --- keyboards/keyhive/maypad/config.h | 4 +-- keyboards/keyhive/maypad/keymaps/via/keymap.c | 26 +++++++++++++++++++ .../keyhive/maypad/keymaps/via/readme.md | 6 +++++ keyboards/keyhive/maypad/keymaps/via/rules.mk | 2 ++ 4 files changed, 36 insertions(+), 2 deletions(-) create mode 100644 keyboards/keyhive/maypad/keymaps/via/keymap.c create mode 100644 keyboards/keyhive/maypad/keymaps/via/readme.md create mode 100644 keyboards/keyhive/maypad/keymaps/via/rules.mk diff --git a/keyboards/keyhive/maypad/config.h b/keyboards/keyhive/maypad/config.h index 4fce7ffa0c80..00a46dafc1c3 100644 --- a/keyboards/keyhive/maypad/config.h +++ b/keyboards/keyhive/maypad/config.h @@ -17,8 +17,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 0x4B48 //KH for Keyhive +#define PRODUCT_ID 0x4D50 // MP #define DEVICE_VER 0x0001 #define MANUFACTURER KeyHive #define PRODUCT maypad diff --git a/keyboards/keyhive/maypad/keymaps/via/keymap.c b/keyboards/keyhive/maypad/keymaps/via/keymap.c new file mode 100644 index 000000000000..04ad4501b214 --- /dev/null +++ b/keyboards/keyhive/maypad/keymaps/via/keymap.c @@ -0,0 +1,26 @@ +/* Copyright 2019 codybender + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public 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_ortho_5x4( + 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 + ) +}; diff --git a/keyboards/keyhive/maypad/keymaps/via/readme.md b/keyboards/keyhive/maypad/keymaps/via/readme.md new file mode 100644 index 000000000000..7f3b71756352 --- /dev/null +++ b/keyboards/keyhive/maypad/keymaps/via/readme.md @@ -0,0 +1,6 @@ +# VIA Support for Maypad + +This adds [VIA](https://caniusevia.com/) support for the Keyhive Maypad. + +Please note that this is a keymap for the Ortho_5x4 layout. + diff --git a/keyboards/keyhive/maypad/keymaps/via/rules.mk b/keyboards/keyhive/maypad/keymaps/via/rules.mk new file mode 100644 index 000000000000..36b7ba9cbc98 --- /dev/null +++ b/keyboards/keyhive/maypad/keymaps/via/rules.mk @@ -0,0 +1,2 @@ +VIA_ENABLE = yes +LTO_ENABLE = yes From 5f9fb01020c50e1da55e53be703d91b659e02120 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Guillaume=20G=C3=A9rard?= <1322081+GreatWizard@users.noreply.github.com> Date: Wed, 8 Jul 2020 20:55:02 +0200 Subject: [PATCH 345/930] [Keymap Extra] Add French AZERTY (AFNOR - NF Z71-300) (#9644) Co-authored-by: Ryan --- docs/reference_keymap_extras.md | 1 + quantum/keymap_extras/keymap_french_afnor.h | 253 ++++++++++++++++++ .../keymap_extras/sendstring_french_afnor.h | 100 +++++++ 3 files changed, 354 insertions(+) create mode 100644 quantum/keymap_extras/keymap_french_afnor.h create mode 100644 quantum/keymap_extras/sendstring_french_afnor.h diff --git a/docs/reference_keymap_extras.md b/docs/reference_keymap_extras.md index a7026a0994ec..7e3d9bf274f7 100644 --- a/docs/reference_keymap_extras.md +++ b/docs/reference_keymap_extras.md @@ -22,6 +22,7 @@ To use these, simply `#include` the corresponding [header file](https://github.c |Estonian |`keymap_estonian.h` | |Finnish |`keymap_finnish.h` | |French |`keymap_french.h` | +|French (AFNOR) |`keymap_french_afnor.h` | |French (BÉPO) |`keymap_bepo.h` | |French (Belgium) |`keymap_belgian.h` | |French (Switzerland) |`keymap_fr_ch.h` | diff --git a/quantum/keymap_extras/keymap_french_afnor.h b/quantum/keymap_extras/keymap_french_afnor.h new file mode 100644 index 000000000000..be67fdc95288 --- /dev/null +++ b/quantum/keymap_extras/keymap_french_afnor.h @@ -0,0 +1,253 @@ +/* Copyright 2020 Guillaume Gérard + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +/* French AZERTY - AFNOR NF Z71-300 + * + * A standard for the French keyboard + * + * The project was launched at the end of 2015 on the proposal of the General + * Delegation for the French language and the languages ​​of France (Ministry + * of Culture), starting from the observation that the current "azerty" + * keyboards constrain the writing of French, languages regional and European + * languages ​​with Latin alphabet. + * + * For the first time, a standard (NF Z71-300) defines the placement of + * characters on the French keyboard. It offers two layouts, one of which + * closely follows the QWERTY keyboard used by most people who write in French. + * + * However, it is in many ways superior to the old keyboard: + * + * - it contains all the characters required to enter text in French (for example É, œ and ") + * - it is designed to be more ergonomic and allow faster typing + * - it includes almost 60 additional characters for entering foreign languages, technical content, etc + * - however, the characters remain easy to locate thanks to intuitive groupings + * + * Source: https://norme-azerty.fr + */ + +#pragma once + +#include "keymap.h" + +// clang-format off + +/* + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ + * │ @ │ à │ é │ è │ ê │ ( │ ) │ ‘ │ ’ │ « │ » │ ' │ ^ │       │ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ + * │     │ A │ Z │ E │ R │ T │ Y │ U │ I │ O │ P │ - │ + │     │ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐    │ + * │      │ Q │ S │ D │ F │ G │ H │ J │ K │ L │ M │ / │ * │    │ + * ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴────┤ + * │    │ < │ W │ X │ C │ V │ B │ N │ . │ , │ : │ ; │          │ + * ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤ + * │    │    │    │                        │    │    │    │    │ + * └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘ + */ +// Row 1 +#define FR_AT KC_GRV // @ +#define FR_AGRV KC_1 // à +#define FR_EACU KC_2 // é +#define FR_EGRV KC_3 // è +#define FR_ECIR KC_4 // ê +#define FR_LPRN KC_5 // ( +#define FR_RPRN KC_6 // ) +#define FR_LSQU KC_7 // ‘ +#define FR_RSQU KC_8 // ’ +#define FR_LDAQ KC_9 // « +#define FR_RDAQ KC_0 // » +#define FR_QUOT KC_MINS // ' +#define FR_DCIR KC_EQL // ^ (dead) +// Row 2 +#define FR_A KC_Q // A +#define FR_Z KC_W // Z +#define FR_E KC_E // E +#define FR_R KC_R // R +#define FR_T KC_T // T +#define FR_Y KC_Y // Y +#define FR_U KC_U // U +#define FR_I KC_I // I +#define FR_O KC_O // O +#define FR_P KC_P // P +#define FR_MINS KC_LBRC // - +#define FR_PLUS KC_RBRC // + +// Row 3 +#define FR_Q KC_A // Q +#define FR_S KC_S // S +#define FR_D KC_D // D +#define FR_F KC_F // F +#define FR_G KC_G // G +#define FR_H KC_H // H +#define FR_J KC_J // J +#define FR_K KC_K // K +#define FR_L KC_L // L +#define FR_M KC_SCLN // M +#define FR_SLSH KC_QUOT // / +#define FR_ASTR KC_NUHS // * +// Row 4 +#define FR_LABK KC_NUBS // < +#define FR_W KC_Z // W +#define FR_X KC_X // X +#define FR_C KC_C // C +#define FR_V KC_V // V +#define FR_B KC_B // B +#define FR_N KC_N // N +#define FR_DOT KC_M // . +#define FR_COMM KC_COMM // , +#define FR_COLN KC_DOT // : +#define FR_SCLN KC_SLSH // ; + +/* Shifted symbols + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ + * │ # │ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ " │ ¨ │       │ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ + * │     │   │   │   │   │   │   │   │   │   │   │ – │ ± │     │ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐    │ + * │      │   │   │   │   │   │   │   │   │   │   │ \ │ ½ │    │ + * ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴────┤ + * │    │ > │   │   │   │   │   │   │ ? │ ! │ … │ = │          │ + * ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤ + * │    │    │    │                        │    │    │    │    │ + * └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘ + */ +// Row 1 +#define FR_HASH S(FR_AT) // # +#define FR_1 S(FR_AGRV) // 1 +#define FR_2 S(FR_EACU) // 2 +#define FR_3 S(FR_EGRV) // 3 +#define FR_4 S(FR_ECIR) // 4 +#define FR_5 S(FR_LPRN) // 5 +#define FR_6 S(FR_RPRN) // 6 +#define FR_7 S(FR_LSQU) // 7 +#define FR_8 S(FR_RSQU) // 8 +#define FR_9 S(FR_LDAQ) // 9 +#define FR_0 S(FR_RDAQ) // 0 +#define FR_DQUO S(FR_QUOT) // " +#define FR_DIAE S(FR_DCIR) // ¨ (dead) +// Row 2 +#define FR_NDSH S(FR_MINS) // – +#define FR_PLMN S(FR_PLUS) // ± +// Row 3 +#define FR_BSLS S(FR_SLSH) // (backslash) +#define FR_HALF S(FR_ASTR) // ½ +// Row 4 +#define FR_RABK S(FR_LABK) // > +#define FR_QUES S(FR_DOT) // ? +#define FR_EXLM S(FR_COMM) // ! +#define FR_ELLP S(FR_COLN) // … +#define FR_EQL S(FR_SCLN) // = + +/* AltGr symbols + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ + * │ ˘ │ § │ ´ │ ` │ & │ [ │ ] │ ¯ │ _ │ “ │ ” │ ° │ ˇ │       │ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ + * │     │ æ │ £ │ € │ ® │ { │ } │ ù │ ˙ │ œ │ % │ − │ † │     │ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐    │ + * │      │ θ │ ß │ $ │ ¤ │ µ │ Eu│   │ ∕ │ | │ ∞ │ ÷ │ × │    │ + * ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴────┤ + * │    │ ≤ │ ʒ │ © │ ç │ ¸ │ − │ ~ │ ¿ │ ¡ │ · │ ≃ │          │ + * ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤ + * │    │    │    │                        │    │    │    │    │ + * └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘ + */ +// Row 1 +#define FR_BREV ALGR(FR_AT) // ˘ (dead) +#define FR_SECT ALGR(FR_AGRV) // § +#define FR_ACUT ALGR(FR_EACU) // ´ (dead) +#define FR_GRV ALGR(FR_EGRV) // ` (dead) +#define FR_AMPR ALGR(FR_ECIR) // & +#define FR_LBRC ALGR(FR_LPRN) // [ +#define FR_RBRC ALGR(FR_RPRN) // ] +#define FR_MACR ALGR(FR_LSQU) // ¯ (dead) +#define FR_UNDS ALGR(FR_RSQU) // _ +#define FR_LDQU ALGR(FR_LDAQ) // “ +#define FR_RDQU ALGR(FR_RDAQ) // ” +#define FR_DEG ALGR(FR_QUOT) // ° +#define FR_CARN ALGR(FR_DCIR) // ˇ (dead) +// Row 2 +#define FR_AE ALGR(FR_A) // æ +#define FR_PND ALGR(FR_Z) // £ +#define FR_EURO ALGR(FR_E) // € +#define FR_REGD ALGR(FR_R) // ® +#define FR_LCBR ALGR(FR_T) // { +#define FR_RCBR ALGR(FR_Y) // } +#define FR_UGRV ALGR(FR_U) // ù +#define FR_DOTA ALGR(FR_I) // ˙ (dead) +#define FR_OE ALGR(FR_O) // œ +#define FR_PERC ALGR(FR_P) // % +#define FR_MMNS ALGR(FR_MINS) // − +#define FR_DAGG ALGR(FR_PLUS) // † +// Row 3 +#define FR_THET ALGR(FR_Q) // θ +#define FR_SS ALGR(FR_S) // ß +#define FR_DLR ALGR(FR_D) // $ +#define FR_CURR ALGR(FR_F) // ¤ (dead monetary key) +#define FR_DGRK ALGR(FR_G) // µ (dead Greek key) +#define FR_EU ALGR(FR_H) // Eu (dead European symbol key) +#define FR_DSLS ALGR(FR_K) // ∕ (dead) +#define FR_PIPE ALGR(FR_L) // | +#define FR_INFN ALGR(FR_M) // ∞ +#define FR_DIV ALGR(FR_SLSH) // ÷ +#define FR_MUL ALGR(FR_ASTR) // × +// Row 4 +#define FR_LEQL ALGR(FR_LABK) // ≤ +#define FR_EZH ALGR(FR_W) // ʒ +#define FR_COPY ALGR(FR_X) // © +#define FR_CCED ALGR(FR_C) // ç +#define FR_CEDL ALGR(FR_V) // ¸ (dead) +#define FR_DMNS ALGR(FR_B) // − (dead) +#define FR_DTIL ALGR(FR_N) // ~ (dead) +#define FR_IQUE ALGR(FR_DOT) // ¿ +#define FR_IEXL ALGR(FR_COMM) // ¡ +#define FR_MDDT ALGR(FR_COLN) // · +#define FR_AEQL ALGR(FR_SCLN) // ≃ + +/* Shift+AltGr symbols + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ + * │  ̑ │   │   │   │   │ ˝ │  ̏ │   │ — │ ‹ │ › │ ˚ │   │       │ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ + * │     │   │   │   │   │ ™ │   │   │  ̣ │   │ ‰ │ ‑ │ ‡ │     │ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐    │ + * │      │   │   │   │   │   │ ˍ │   │   │   │   │ √ │ ¼ │    │ + * ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴────┤ + * │    │ ≥ │   │   │   │ ˛ │   │   │   │  ̦ │   │ ≠ │          │ + * ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤ + * │    │    │    │                        │    │    │    │    │ + * └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘ + */ +// Row 1 +#define FR_IBRV S(ALGR(FR_AT)) //  ̑ (dead) +#define FR_DACU S(ALGR(FR_LPRN)) // ˝ (dead) +#define FR_DGRV S(ALGR(FR_RPRN)) //  ̏ (dead) +#define FR_MDSH S(ALGR(FR_RSQU)) // — +#define FR_LSAQ S(ALGR(FR_LDAQ)) // ‹ +#define FR_RSAQ S(ALGR(FR_RDAQ)) // › +#define FR_RNGA S(ALGR(FR_QUOT)) // ˚ (dead) +// Row 2 +#define FR_TM S(ALGR(FR_T)) // ™ +#define FR_DOTB S(ALGR(FR_I)) //  ̣ (dead) +#define FR_PERM S(ALGR(FR_P)) // ‰ +#define FR_NBHY S(ALGR(FR_MINS)) // ‑ (non-breaking hyphen) +#define FR_DDAG S(ALGR(FR_PLUS)) // ‡ +// Row 3 +#define FR_MACB S(ALGR(FR_H)) // ˍ (dead) +#define FR_SQRT S(ALGR(FR_SLSH)) // √ +#define FR_QRTR S(ALGR(FR_ASTR)) // ¼ +// Row 4 +#define FR_GEQL S(ALGR(FR_LABK)) // ≥ +#define FR_OGON S(ALGR(FR_V)) // ˛ (dead) +#define FR_DCMM S(ALGR(FR_COMM)) //  ̦ (dead) +#define FR_NEQL S(ALGR(FR_SCLN)) // ≠ diff --git a/quantum/keymap_extras/sendstring_french_afnor.h b/quantum/keymap_extras/sendstring_french_afnor.h new file mode 100644 index 000000000000..690daaaf020e --- /dev/null +++ b/quantum/keymap_extras/sendstring_french_afnor.h @@ -0,0 +1,100 @@ +/* Copyright 2020 Guillaume Gérard + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General 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 French (AZERTY - AFNOR NF Z71-300) layouts + +#pragma once + +#include "keymap_french_afnor.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, 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, 0, 0, 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, 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(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, 0, 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(0, 0, 0, 0, 0, 0, 0, 0), + KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0), + KCLUT_ENTRY(0, 0, 0, 1, 0, 1, 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 = { + // 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, FR_COMM, FR_QUOT, FR_AT, FR_D, FR_P, FR_ECIR, FR_QUOT, + // ( ) * + , - . / + FR_LPRN, FR_RPRN, FR_ASTR, FR_PLUS, FR_COMM, FR_MINS, FR_DOT, FR_SLSH, + // 0 1 2 3 4 5 6 7 + FR_RDAQ, FR_AGRV, FR_EACU, FR_EGRV, FR_ECIR, FR_LPRN, FR_RPRN, FR_LSQU, + // 8 9 : ; < = > ? + FR_RSQU, FR_LDAQ, FR_COLN, FR_SCLN, FR_LABK, FR_SCLN, FR_LABK, FR_DOT, + // @ A B C D E F G + FR_AT, FR_A, FR_B, FR_C, FR_D, FR_E, FR_F, FR_G, + // H I J K L M N O + FR_H, FR_I, FR_J, FR_K, FR_L, FR_M, FR_N, FR_O, + // P Q R S T U V W + FR_P, FR_Q, FR_R, FR_S, FR_T, FR_U, FR_V, FR_W, + // X Y Z [ \ ] ^ _ + FR_X, FR_Y, FR_Z, FR_LPRN, FR_SLSH, FR_RPRN, FR_DCIR, FR_RSQU, + // ` a b c d e f g + FR_EGRV, FR_A, FR_B, FR_C, FR_D, FR_E, FR_F, FR_G, + // h i j k l m n o + FR_H, FR_I, FR_J, FR_K, FR_L, FR_M, FR_N, FR_O, + // p q r s t u v w + FR_P, FR_Q, FR_R, FR_S, FR_T, FR_U, FR_V, FR_W, + // x y z { | } ~ DEL + FR_X, FR_Y, FR_Z, FR_T, FR_L, FR_Y, FR_N, KC_DEL +}; From 60ee8bddfcd2889c8ae040c06ae639ac6113e795 Mon Sep 17 00:00:00 2001 From: Ramon Imbao Date: Thu, 9 Jul 2020 03:03:02 +0800 Subject: [PATCH 346/930] Fix }] key in matrix for GHS.RAR (#9671) --- keyboards/ghs/rar/keymaps/via/keymap.c | 2 +- keyboards/ghs/rar/rar.h | 30 +++++++++++++------------- 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/keyboards/ghs/rar/keymaps/via/keymap.c b/keyboards/ghs/rar/keymaps/via/keymap.c index af72c4fb7a4d..991c482084bd 100644 --- a/keyboards/ghs/rar/keymaps/via/keymap.c +++ b/keyboards/ghs/rar/keymaps/via/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_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_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_END, - KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), KC_NO, KC_LEFT, KC_DOWN, KC_RGHT + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_NO, MO(1), KC_LEFT, KC_DOWN, KC_RGHT ), [1] = LAYOUT_all( RGB_TOG, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET, diff --git a/keyboards/ghs/rar/rar.h b/keyboards/ghs/rar/rar.h index fc68f85bd4b5..e4d3eb2775ca 100644 --- a/keyboards/ghs/rar/rar.h +++ b/keyboards/ghs/rar/rar.h @@ -32,7 +32,7 @@ #define LAYOUT_ansi( \ k00, k01, k11, k02, k12, k03, k13, k04, k14, k15, k06, k16, k07, k17, \ k20, k30, k21, k31, k22, k32, k23, k33, k24, k34, k25, k35, k26, k36, k37, \ - k40, k50, k41, k51, k42, k52, k43, k53, k44, k54, k45, k55, k56, k47, k57, \ + k40, k50, k41, k51, k42, k52, k43, k53, k44, k54, k45, k55, k46, k47, k57, \ k60, k70, k61, k71, k62, k72, k63, k73, k64, k74, k65, k75, k76, k77, \ k80, k81, k91, k82, k92, k83, k93, k84, k94, k85, k95, k86, k87, k97, \ ka0, kb0, ka1, ka3, ka5, ka6, kb6, ka7, kb7 \ @@ -42,8 +42,8 @@ { XXX, k11, k12, k13, k14, k15, k16, k17 }, \ { k20, k21, k22, k23, k24, k25, k26, XXX }, \ { k30, k31, k32, k33, k34, k35, k36, k37 }, \ - { k40, k41, k42, k43, k44, k45, XXX, k47 }, \ - { k50, k51, k52, k53, k54, k55, k56, k57 }, \ + { k40, k41, k42, k43, k44, k45, k46, k47 }, \ + { k50, k51, k52, k53, k54, k55, XXX, k57 }, \ { k60, k61, k62, k63, k64, k65, XXX, XXX }, \ { k70, k71, k72, k73, k74, k75, k76, k77 }, \ { k80, k81, k82, k83, k84, k85, k86, k87 }, \ @@ -55,7 +55,7 @@ #define LAYOUT_ansi_wkl( \ k00, k01, k11, k02, k12, k03, k13, k04, k14, k15, k06, k16, k07, k17, \ k20, k30, k21, k31, k22, k32, k23, k33, k24, k34, k25, k35, k26, k36, k37, \ - k40, k50, k41, k51, k42, k52, k43, k53, k44, k54, k45, k55, k56, k47, k57, \ + k40, k50, k41, k51, k42, k52, k43, k53, k44, k54, k45, k55, k46, k47, k57, \ k60, k70, k61, k71, k62, k72, k63, k73, k64, k74, k65, k75, k76, k77, \ k80, k81, k91, k82, k92, k83, k93, k84, k94, k85, k95, k86, k87, k97, \ ka0, kb0, ka3, ka5, ka6, kb6, ka7, kb7 \ @@ -65,8 +65,8 @@ { XXX, k11, k12, k13, k14, k15, k16, k17 }, \ { k20, k21, k22, k23, k24, k25, k26, XXX }, \ { k30, k31, k32, k33, k34, k35, k36, k37 }, \ - { k40, k41, k42, k43, k44, k45, XXX, k47 }, \ - { k50, k51, k52, k53, k54, k55, k56, k57 }, \ + { k40, k41, k42, k43, k44, k45, k46, k47 }, \ + { k50, k51, k52, k53, k54, k55, XXX, k57 }, \ { k60, k61, k62, k63, k64, k65, XXX, XXX }, \ { k70, k71, k72, k73, k74, k75, k76, k77 }, \ { k80, k81, k82, k83, k84, k85, k86, k87 }, \ @@ -78,7 +78,7 @@ #define LAYOUT_iso( \ k00, k01, k11, k02, k12, k03, k13, k04, k14, k15, k06, k16, k07, k17, \ k20, k30, k21, k31, k22, k32, k23, k33, k24, k34, k25, k35, k26, k36, k37, \ - k40, k50, k41, k51, k42, k52, k43, k53, k44, k54, k45, k55, k56, k47, k57, \ + k40, k50, k41, k51, k42, k52, k43, k53, k44, k54, k45, k55, k46, k47, k57, \ k60, k70, k61, k71, k62, k72, k63, k73, k64, k74, k65, k75, k76, k77, \ k80, k90, k81, k91, k82, k92, k83, k93, k84, k94, k85, k95, k86, k87, k97, \ ka0, kb0, ka1, ka3, ka5, ka6, kb6, ka7, kb7 \ @@ -88,8 +88,8 @@ { XXX, k11, k12, k13, k14, k15, k16, k17 }, \ { k20, k21, k22, k23, k24, k25, k26, XXX }, \ { k30, k31, k32, k33, k34, k35, k36, k37 }, \ - { k40, k41, k42, k43, k44, k45, XXX, k47 }, \ - { k50, k51, k52, k53, k54, k55, k56, k57 }, \ + { k40, k41, k42, k43, k44, k45, k46, k47 }, \ + { k50, k51, k52, k53, k54, k55, XXX, k57 }, \ { k60, k61, k62, k63, k64, k65, XXX, XXX }, \ { k70, k71, k72, k73, k74, k75, k76, k77 }, \ { k80, k81, k82, k83, k84, k85, k86, k87 }, \ @@ -101,7 +101,7 @@ #define LAYOUT_iso_wkl( \ k00, k01, k11, k02, k12, k03, k13, k04, k14, k15, k06, k16, k07, k17, \ k20, k30, k21, k31, k22, k32, k23, k33, k24, k34, k25, k35, k26, k36, k37, \ - k40, k50, k41, k51, k42, k52, k43, k53, k44, k54, k45, k55, k56, k47, k57, \ + k40, k50, k41, k51, k42, k52, k43, k53, k44, k54, k45, k55, k46, k47, k57, \ k60, k70, k61, k71, k62, k72, k63, k73, k64, k74, k65, k75, k76, k77, \ k80, k90, k81, k91, k82, k92, k83, k93, k84, k94, k85, k95, k86, k87, k97, \ ka0, kb0, ka3, ka5, ka6, kb6, ka7, kb7 \ @@ -111,8 +111,8 @@ { XXX, k11, k12, k13, k14, k15, k16, k17 }, \ { k20, k21, k22, k23, k24, k25, k26, XXX }, \ { k30, k31, k32, k33, k34, k35, k36, k37 }, \ - { k40, k41, k42, k43, k44, k45, XXX, k47 }, \ - { k50, k51, k52, k53, k54, k55, k56, k57 }, \ + { k40, k41, k42, k43, k44, k45, k46, k47 }, \ + { k50, k51, k52, k53, k54, k55, XXX, k57 }, \ { k60, k61, k62, k63, k64, k65, XXX, XXX }, \ { k70, k71, k72, k73, k74, k75, k76, k77 }, \ { k80, k81, k82, k83, k84, k85, k86, k87 }, \ @@ -124,7 +124,7 @@ #define LAYOUT_all( \ k00, k01, k11, k02, k12, k03, k13, k04, k14, k15, k06, k16, k07, k17, \ k20, k30, k21, k31, k22, k32, k23, k33, k24, k34, k25, k35, k26, k36, k27, k37, \ - k40, k50, k41, k51, k42, k52, k43, k53, k44, k54, k45, k55, k56, k47, k57, \ + k40, k50, k41, k51, k42, k52, k43, k53, k44, k54, k45, k55, k46, k47, k57, \ k60, k70, k61, k71, k62, k72, k63, k73, k64, k74, k65, k75, k76, k77, \ k80, k90, k81, k91, k82, k92, k83, k93, k84, k94, k85, k95, k86, k87, k97, \ ka0, kb0, ka1, ka3, ka5, kb5, ka6, kb6, ka7, kb7 \ @@ -134,8 +134,8 @@ { XXX, 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, XXX, k47 }, \ - { k50, k51, k52, k53, k54, k55, k56, k57 }, \ + { k40, k41, k42, k43, k44, k45, k46, k47 }, \ + { k50, k51, k52, k53, k54, k55, XXX, k57 }, \ { k60, k61, k62, k63, k64, k65, XXX, XXX }, \ { k70, k71, k72, k73, k74, k75, k76, k77 }, \ { k80, k81, k82, k83, k84, k85, k86, k87 }, \ From 4588c979bdd921ef536d61df44c4f5f3aa7a95c2 Mon Sep 17 00:00:00 2001 From: Rys Sommefeldt Date: Wed, 8 Jul 2020 21:43:23 +0100 Subject: [PATCH 347/930] Reduce peak LED brightness for AoS TKL (#9667) --- keyboards/aos/tkl/config.h | 1 + 1 file changed, 1 insertion(+) diff --git a/keyboards/aos/tkl/config.h b/keyboards/aos/tkl/config.h index 4e6ab3e3dc72..5a4b93f6448a 100644 --- a/keyboards/aos/tkl/config.h +++ b/keyboards/aos/tkl/config.h @@ -53,4 +53,5 @@ 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 50 #endif From ca598c3df6847256bb884479ac10e2dcff22b599 Mon Sep 17 00:00:00 2001 From: Oskar Holstensson Date: Wed, 8 Jul 2020 22:45:43 +0200 Subject: [PATCH 348/930] Changed US_RBRC to KC_RBRC instead of KC_LBRC (#9664) --- quantum/keymap_extras/keymap_us_international.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/quantum/keymap_extras/keymap_us_international.h b/quantum/keymap_extras/keymap_us_international.h index f8e470216fb4..a3bc465971ca 100644 --- a/quantum/keymap_extras/keymap_us_international.h +++ b/quantum/keymap_extras/keymap_us_international.h @@ -59,7 +59,7 @@ #define US_O KC_O // O #define US_P KC_P // P #define US_LBRC KC_LBRC // [ -#define US_RBRC KC_LBRC // ] +#define US_RBRC KC_RBRC // ] #define US_BSLS KC_BSLS // (backslash) // Row 3 #define US_A KC_A // A From 83e1b9ab6eee3ff11b58a905ea2015f92a724cf0 Mon Sep 17 00:00:00 2001 From: Brandon Date: Wed, 8 Jul 2020 15:47:35 -0500 Subject: [PATCH 349/930] Added VIA support to nightmare (#9672) Co-authored-by: Ryan --- keyboards/nightmare/config.h | 4 +-- keyboards/nightmare/keymaps/via/keymap.c | 43 +++++++++++++++++++++++ keyboards/nightmare/keymaps/via/readme.md | 3 ++ keyboards/nightmare/keymaps/via/rules.mk | 2 ++ 4 files changed, 50 insertions(+), 2 deletions(-) create mode 100644 keyboards/nightmare/keymaps/via/keymap.c create mode 100644 keyboards/nightmare/keymaps/via/readme.md create mode 100644 keyboards/nightmare/keymaps/via/rules.mk diff --git a/keyboards/nightmare/config.h b/keyboards/nightmare/config.h index fafba644dd78..29ab97c14f03 100644 --- a/keyboards/nightmare/config.h +++ b/keyboards/nightmare/config.h @@ -20,8 +20,8 @@ along with this program. If not, see . #include "config_common.h" /* USB Device descriptor parameter */ -#define VENDOR_ID 0xB00B -#define PRODUCT_ID 0x0000 +#define VENDOR_ID 0x434B // "CK" +#define PRODUCT_ID 0x4E49 // "NI" #define DEVICE_VER 0x0001 #define MANUFACTURER cfbender #define PRODUCT nightmare diff --git a/keyboards/nightmare/keymaps/via/keymap.c b/keyboards/nightmare/keymaps/via/keymap.c new file mode 100644 index 000000000000..a347e7e4dce6 --- /dev/null +++ b/keyboards/nightmare/keymaps/via/keymap.c @@ -0,0 +1,43 @@ +/* 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 + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_split(/* Base */ + KC_HOME, 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_BSPC, + KC_END, 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_QUOTE, KC_ENTER, + KC_PGUP, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMMA, KC_DOT, KC_SLSH, KC_RSFT, MO(1), + KC_PGDN, KC_LGUI, KC_LALT, KC_LALT, KC_SPACE, KC_SPACE, KC_RGUI, KC_RCTL, MO(2)), + + [1] = LAYOUT_split( + _______, _______, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINUS, KC_EQUAL, KC_DEL, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_LEFT, KC_RIGHT, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______), + + [2] = LAYOUT_split( + _______, _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_UP, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_LEFT, KC_RIGHT, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DOWN, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______), + + [3] = LAYOUT_split( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______), +}; + diff --git a/keyboards/nightmare/keymaps/via/readme.md b/keyboards/nightmare/keymaps/via/readme.md new file mode 100644 index 000000000000..b044730cf57c --- /dev/null +++ b/keyboards/nightmare/keymaps/via/readme.md @@ -0,0 +1,3 @@ +# The default keymap for nightmare + +![Default Layout](https://imgur.com/G0Hh7F3.png) \ No newline at end of file diff --git a/keyboards/nightmare/keymaps/via/rules.mk b/keyboards/nightmare/keymaps/via/rules.mk new file mode 100644 index 000000000000..43061db1dd46 --- /dev/null +++ b/keyboards/nightmare/keymaps/via/rules.mk @@ -0,0 +1,2 @@ +VIA_ENABLE = yes +LTO_ENABLE = yes \ No newline at end of file From 2b55c419ea72225030c884ce818a571ef0247b42 Mon Sep 17 00:00:00 2001 From: Steve Purcell Date: Thu, 9 Jul 2020 08:50:01 +1200 Subject: [PATCH 350/930] shell.nix improvements, and fix problems on Darwin (#9551) --- shell.nix | 48 ++++++++++++++++++++++++++++++++++-------------- 1 file changed, 34 insertions(+), 14 deletions(-) diff --git a/shell.nix b/shell.nix index 78bc005f7e57..93db7b371dbc 100644 --- a/shell.nix +++ b/shell.nix @@ -1,25 +1,40 @@ { avr ? true, arm ? true, teensy ? true }: let - overlay = self: super: - let addDarwinSupport = pkg: pkg.overrideAttrs (oldAttrs: { - meta.platforms = (oldAttrs.meta.platforms or []) ++ self.lib.platforms.darwin; - }); - in { - dfu-programmer = addDarwinSupport super.dfu-programmer; - teensy-loader-cli = addDarwinSupport super.teensy-loader-cli; - }; - nixpkgs = builtins.fetchTarball { url = "https://github.com/NixOS/nixpkgs/archive/903266491b7b9b0379e88709feca0af900def0d9.tar.gz"; sha256 = "1b5wjrfgyha6s15k1yjyx41hvrpmd5szpkpkxk6l5hyrfqsr8wip"; }; - pkgs = import nixpkgs { overlays = [ overlay ]; }; + pkgs = import nixpkgs { }; + + hjson = with pkgs.python3Packages; buildPythonPackage rec { + pname = "hjson"; + version = "3.0.1"; + + src = fetchPypi { + inherit pname version; + sha256 = "1yaimcgz8w0ps1wk28wk9g9zdidp79d14xqqj9rjkvxalvx2f5qx"; + }; + doCheck = false; + }; + + pythonEnv = pkgs.python3.withPackages (p: with p; [ + # requirements.txt + appdirs + argcomplete + colorama + hjson + # requirements-dev.txt + nose2 + flake8 + pep8-naming + yapf + ]); in with pkgs; -let +let avrlibc = pkgsCross.avr.libcCross; avr_incflags = [ @@ -32,11 +47,11 @@ let "-L${avrlibc}/avr/lib/avr51" ]; in -stdenv.mkDerivation { +mkShell { name = "qmk-firmware"; - buildInputs = [ dfu-programmer dfu-util diffutils git python3 ] - ++ lib.optional avr [ + buildInputs = [ dfu-programmer dfu-util diffutils git pythonEnv ] + ++ lib.optional avr [ pkgsCross.avr.buildPackages.binutils pkgsCross.avr.buildPackages.gcc8 avrlibc @@ -47,4 +62,9 @@ stdenv.mkDerivation { AVR_CFLAGS = lib.optional avr avr_incflags; AVR_ASFLAGS = lib.optional avr avr_incflags; + shellHook = '' + # Prevent the avr-gcc wrapper from picking up host GCC flags + # like -iframework, which is problematic on Darwin + unset NIX_TARGET_CFLAGS_COMPILE + ''; } From 071e0c2029e7923cbaa6ff721365b2f61cdd08d8 Mon Sep 17 00:00:00 2001 From: Abi Shalom Date: Wed, 8 Jul 2020 15:53:29 -0500 Subject: [PATCH 351/930] Created abishalom keymap (#9669) Co-authored-by: Ryan --- keyboards/planck/keymaps/abishalom/config.h | 35 ++ keyboards/planck/keymaps/abishalom/keymap.c | 316 +++++++++++++++++++ keyboards/planck/keymaps/abishalom/readme.md | 7 + keyboards/planck/keymaps/abishalom/rules.mk | 1 + 4 files changed, 359 insertions(+) create mode 100644 keyboards/planck/keymaps/abishalom/config.h create mode 100644 keyboards/planck/keymaps/abishalom/keymap.c create mode 100644 keyboards/planck/keymaps/abishalom/readme.md create mode 100644 keyboards/planck/keymaps/abishalom/rules.mk diff --git a/keyboards/planck/keymaps/abishalom/config.h b/keyboards/planck/keymaps/abishalom/config.h new file mode 100644 index 000000000000..672c5d570f08 --- /dev/null +++ b/keyboards/planck/keymaps/abishalom/config.h @@ -0,0 +1,35 @@ +#pragma once + +#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 diff --git a/keyboards/planck/keymaps/abishalom/keymap.c b/keyboards/planck/keymaps/abishalom/keymap.c new file mode 100644 index 000000000000..4c1185ad992c --- /dev/null +++ b/keyboards/planck/keymaps/abishalom/keymap.c @@ -0,0 +1,316 @@ +/* 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 planck_layers { + _QWERTY, + _LOWER, + _RAISE, + _NAV, + _PLOVER, + _ADJUST +}; + +enum planck_keycodes { + QWERTY = SAFE_RANGE, + PLOVER, + BACKLIT, + EXT_PLV +}; + +#define LOWER MO(_LOWER) +#define RAISE MO(_RAISE) + +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| CAPS | Alt | GUI |Lower | Space |Raise | Left | Down | Up |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, + LT(_NAV, 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_CAPS, 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 | | Home | End |Pl/Ps | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | Prev | Vol- | Vol+ | Next | + * `-----------------------------------------------------------------------------------' + */ +[_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_MPLY, + _______, _______, _______, _______, _______, _______, _______, _______, KC_MPRV, KC_VOLD, KC_VOLU, KC_MNXT +), + +/* 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 |Pl/Ps | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | Prev | Vol- | Vol+ | Next | + * `-----------------------------------------------------------------------------------' + */ +[_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_MPLY, + _______, _______, _______, _______, _______, _______, _______, _______, KC_MPRV, KC_VOLD, KC_VOLU, KC_MNXT +), + +/* Nav + * ,----------------------------------l-------------------------------------------------. + * | | | | | | | | Pg Dn| Up | Pg Up| | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | Mute | Vol-| Vol+ | Pl/Ps| | | Left | Down | Right| | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | + * `-----------------------------------------------------------------------------------' + */ +[_NAV] = LAYOUT_planck_grid( + _______, _______, _______, _______, _______, _______, _______, KC_PGDOWN, KC_UP, KC_PGUP, _______ , _______, + _______, KC_MUTE, KC_VOLD, KC_VOLU, KC_MPLY, _______, _______, KC_LEFT, KC_DOWN, KC_RIGHT, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MPLY, + _______, _______, _______, _______, _______, _______, _______, _______, KC_MPRV, KC_VOLD, KC_VOLU, KC_MNXT +), + + +/* 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) + * v------------------------RGB CONTROL--------------------v + * ,-----------------------------------------------------------------------------------. + * | | Reset|Debug | RGB |RGBMOD| HUE+ | HUE- | SAT+ | SAT- |BRGTH+|BRGTH-| Del | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | |MUSmod|Aud on|Audoff|AGnorm|AGswap|Qwerty| | |Plover| | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | |Voice-|Voice+|Mus on|Musoff|MIDIon|MIDIof|TermOn|TermOf| | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | + * `-----------------------------------------------------------------------------------' + */ +[_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, _______, _______, PLOVER, _______, + _______, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, TERM_ON, TERM_OFF, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ +) + +}; + +#ifdef AUDIO_ENABLE + float plover_song[][2] = SONG(PLOVER_SOUND); + float plover_gb_song[][2] = SONG(PLOVER_GOODBYE_SOUND); +#endif + +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) { + print("mode just switched to qwerty and this is a huge string\n"); + set_single_persistent_default_layer(_QWERTY); + } + return false; + 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; + 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; + case EXT_PLV: + if (record->event.pressed) { + #ifdef AUDIO_ENABLE + PLAY_SONG(plover_gb_song); + #endif + layer_off(_PLOVER); + } + return false; + } + 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) { + #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/abishalom/readme.md b/keyboards/planck/keymaps/abishalom/readme.md new file mode 100644 index 000000000000..9978df19bec2 --- /dev/null +++ b/keyboards/planck/keymaps/abishalom/readme.md @@ -0,0 +1,7 @@ +# Abishalom Planck Layout + +Mostly the same as default. Changes: +- Get rid of COLEMAK and DVORAK layers +- Add new layer (NAV) which is accessed by holding the ESC key. This brings up arrow keys in ijkl spots, along with handy media funcions in wasd. +- Move left control to the corner, put caps lock between LCTRL and LGUI +- Adjustments to media keys in bottom right corner \ No newline at end of file diff --git a/keyboards/planck/keymaps/abishalom/rules.mk b/keyboards/planck/keymaps/abishalom/rules.mk new file mode 100644 index 000000000000..dcf16bef3994 --- /dev/null +++ b/keyboards/planck/keymaps/abishalom/rules.mk @@ -0,0 +1 @@ +SRC += muse.c From facca2331519d5d56a926f93f0cdf925fe0857da Mon Sep 17 00:00:00 2001 From: pcoves <33952527+pcoves@users.noreply.github.com> Date: Wed, 8 Jul 2020 22:57:11 +0200 Subject: [PATCH 352/930] Add pcoves's userspace (#9354) Co-authored-by: Ryan Co-authored-by: Pablo COVES --- users/pcoves/.gitignore | 2 + users/pcoves/combo.c | 44 ++++++++++++ users/pcoves/config.h | 2 + users/pcoves/pcoves.c | 44 ++++++++++++ users/pcoves/pcoves.h | 32 +++++++++ users/pcoves/rainbowUnicorn.c | 42 +++++++++++ users/pcoves/rainbowUnicorn.h | 5 ++ users/pcoves/readme.md | 14 ++++ users/pcoves/rules.mk | 30 ++++++++ users/pcoves/tapDance.c | 127 ++++++++++++++++++++++++++++++++++ users/pcoves/tapDance.h | 8 +++ users/pcoves/unicode.c | 20 ++++++ users/pcoves/unicode.h | 5 ++ 13 files changed, 375 insertions(+) create mode 100644 users/pcoves/.gitignore create mode 100644 users/pcoves/combo.c create mode 100644 users/pcoves/config.h create mode 100644 users/pcoves/pcoves.c create mode 100644 users/pcoves/pcoves.h create mode 100644 users/pcoves/rainbowUnicorn.c create mode 100644 users/pcoves/rainbowUnicorn.h create mode 100644 users/pcoves/readme.md create mode 100644 users/pcoves/rules.mk create mode 100644 users/pcoves/tapDance.c create mode 100644 users/pcoves/tapDance.h create mode 100644 users/pcoves/unicode.c create mode 100644 users/pcoves/unicode.h diff --git a/users/pcoves/.gitignore b/users/pcoves/.gitignore new file mode 100644 index 000000000000..c0579ed3290d --- /dev/null +++ b/users/pcoves/.gitignore @@ -0,0 +1,2 @@ +secret.h +secret.c diff --git a/users/pcoves/combo.c b/users/pcoves/combo.c new file mode 100644 index 000000000000..a9a1ffe9887a --- /dev/null +++ b/users/pcoves/combo.c @@ -0,0 +1,44 @@ +#include "quantum.h" + +enum { + MIN, + EQL, + + ESC, + BSP, + DEL, + + TAB, + BSL, + + CUT, + GRA, +}; + +const uint16_t PROGMEM min[] = {KC_C, KC_V, COMBO_END}; +const uint16_t PROGMEM eql[] = {KC_M, KC_COMM, COMBO_END}; + +const uint16_t PROGMEM esc[] = {KC_D, KC_F, COMBO_END}; +const uint16_t PROGMEM bsp[] = {KC_J, KC_K, COMBO_END}; +const uint16_t PROGMEM del[] = {KC_DOWN, KC_UP, COMBO_END}; + +const uint16_t PROGMEM tab[] = {KC_S, KC_F, COMBO_END}; +const uint16_t PROGMEM bsl[] = {KC_J, KC_L, COMBO_END}; + +const uint16_t PROGMEM cut[] = {KC_K, KC_L, COMBO_END}; +const uint16_t PROGMEM gra[] = {KC_S, KC_D, COMBO_END}; + +combo_t key_combos[COMBO_COUNT] = { + [MIN] = COMBO(min, KC_MINS), + [EQL] = COMBO(eql, KC_EQL), + + [ESC] = COMBO(esc, KC_ESC), + [BSP] = COMBO(bsp, KC_BSPC), + [DEL] = COMBO(del, KC_DEL), + + [TAB] = COMBO(tab, KC_TAB), + [BSL] = COMBO(bsl, KC_BSLS), + + [CUT] = COMBO(cut, KC_QUOT), + [GRA] = COMBO(gra, KC_GRAVE), +}; diff --git a/users/pcoves/config.h b/users/pcoves/config.h new file mode 100644 index 000000000000..645dcbbf4c93 --- /dev/null +++ b/users/pcoves/config.h @@ -0,0 +1,2 @@ +#define COMBO_TERM 200 +#define COMBO_COUNT 9 diff --git a/users/pcoves/pcoves.c b/users/pcoves/pcoves.c new file mode 100644 index 000000000000..af5b987a6f3e --- /dev/null +++ b/users/pcoves/pcoves.c @@ -0,0 +1,44 @@ +#include "pcoves.h" + +#ifdef RAINBOW_UNICORN_ENABLE +#include "rainbowUnicorn.h" +#endif + +#ifdef UNICODE_ENABLE +#include "unicode.h" +#endif + +#if SECRET_ENABLE +#include "secret.h" +#endif + +__attribute__((weak)) void eeconfig_init_keymap(void) {} + +void eeconfig_init_user(void) { +#ifdef UNICODE_ENABLE + set_unicode_input_mode(UC_LNX); +#endif + eeconfig_init_keymap(); +} + +__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 AUTRUCHE: + if (record->event.pressed) SEND_STRING("Autruche"); + return true; + } + + return process_record_keymap(keycode, record) +#ifdef RAINBOW_UNICORN_ENABLE + && process_record_rainbowUnicorn(keycode, record) +#endif +#ifdef UNICODE_ENABLE + && process_record_unicode(keycode, record) +#endif +#if SECRET_ENABLE + && process_record_secret(keycode, record) +#endif + ; +} diff --git a/users/pcoves/pcoves.h b/users/pcoves/pcoves.h new file mode 100644 index 000000000000..10dfc56bd36a --- /dev/null +++ b/users/pcoves/pcoves.h @@ -0,0 +1,32 @@ +#pragma once + +#include "quantum.h" + +#define SECRET_ENABLE (__has_include("secret.h") && !defined(NO_SECRET)) + +enum { + AUTRUCHE = SAFE_RANGE, +#ifdef RAINBOW_UNICORN_ENABLE + RAINBOW_UNICORN_TOGGLE, +#endif +#ifdef UNICODE_ENABLE + EMOTE0, + EMOTE1, + EMOTE2, + EMOTE3, +#endif +#if SECRET_ENABLE + SECRET0, + SECRET1, + SECRET2, + SECRET3, + SECRET4, +#endif + PCOVES_SAFE_RANGE, +}; + +__attribute__((weak)) void eeconfig_init_keymap(void); +void eeconfig_init_user(void); + +__attribute__((weak)) bool process_record_keymap(uint16_t keycode, keyrecord_t *record); +bool process_record_user(uint16_t keycode, keyrecord_t *record); diff --git a/users/pcoves/rainbowUnicorn.c b/users/pcoves/rainbowUnicorn.c new file mode 100644 index 000000000000..9520415051e1 --- /dev/null +++ b/users/pcoves/rainbowUnicorn.c @@ -0,0 +1,42 @@ +#include "rainbowUnicorn.h" +#include "pcoves.h" + +static struct { + bool enabled; + uint8_t color; + char string[2]; + uint8_t mods; +} state = {false, 0}; + +bool process_record_rainbowUnicorn(uint16_t keycode, keyrecord_t* record) { + if (keycode == RAINBOW_UNICORN_TOGGLE) { + state.enabled ^= true; + return false; + } + + if (!state.enabled) return true; + + switch (keycode) { + case KC_A ... KC_Z: + case KC_1 ... KC_0: + case ALT_T(KC_A)... ALT_T(KC_Z): + case CTL_T(KC_A)... CTL_T(KC_Z): + case GUI_T(KC_A)... GUI_T(KC_Z): + case SFT_T(KC_A)... SFT_T(KC_Z): + if (record->event.pressed) { + state.mods = get_mods(); + clear_mods(); + + tap_code16(C(KC_C)); + + itoa(state.color + 3, state.string, 10); + send_string(state.string); + + set_mods(state.mods); + } else { + state.color = (state.color + 1) % 11; + } + } + + return true; +} diff --git a/users/pcoves/rainbowUnicorn.h b/users/pcoves/rainbowUnicorn.h new file mode 100644 index 000000000000..0c709b4b7af1 --- /dev/null +++ b/users/pcoves/rainbowUnicorn.h @@ -0,0 +1,5 @@ +#pragma once + +#include "quantum.h" + +__attribute__((weak)) bool process_record_rainbowUnicorn(uint16_t keycode, keyrecord_t* keyrecord); diff --git a/users/pcoves/readme.md b/users/pcoves/readme.md new file mode 100644 index 000000000000..1d076d92f6b1 --- /dev/null +++ b/users/pcoves/readme.md @@ -0,0 +1,14 @@ +Copyright 2020 @pcoves + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General 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/pcoves/rules.mk b/users/pcoves/rules.mk new file mode 100644 index 000000000000..400497b151a0 --- /dev/null +++ b/users/pcoves/rules.mk @@ -0,0 +1,30 @@ +SRC += pcoves.c + +RAINBOW_UNICORN_ENABLE ?= no +ifneq ($(strip $(RAINBOW_UNICORN_ENABLE)), no) + SRC += rainbowUnicorn.c + OPT_DEFS += -DRAINBOW_UNICORN_ENABLE +endif + +ifeq ($(strip $(TAP_DANCE_ENABLE)), yes) + SRC += tapDance.c +endif + +ifeq ($(strip $(COMBO_ENABLE)), yes) + SRC += combo.c +endif + +ifeq ($(strip $(UNICODE_ENABLE)), yes) + SRC += unicode.c + OPT_DEFS += -DUNICODE_ENABLE +endif + +ifneq ($(strip $(NO_SECRET)), yes) + ifneq ("$(wildcard $(USER_PATH)/secret.c)","") + SRC += secret.c + else + OPT_DEFS += -DNO_SECRET + endif +else + OPT_DEFS += -DNO_SECRET +endif diff --git a/users/pcoves/tapDance.c b/users/pcoves/tapDance.c new file mode 100644 index 000000000000..f8c9aaf4667e --- /dev/null +++ b/users/pcoves/tapDance.c @@ -0,0 +1,127 @@ +#include "tapDance.h" + +#include "quantum.h" + +void left(qk_tap_dance_state_t* state, void* user_data) { + switch (state->count) { + case 1: + if (state->pressed) + tap_code16(S(KC_LBRACKET)); + else + tap_code16(S(KC_9)); + break; + case 2: + if (state->pressed) + tap_code16(S(KC_COMM)); + else + tap_code(KC_LBRACKET); + break; + default: + reset_tap_dance(state); + } +} + +void right(qk_tap_dance_state_t* state, void* user_data) { + switch (state->count) { + case 1: + if (state->pressed) + tap_code16(S(KC_RBRACKET)); + else + tap_code16(S(KC_0)); + break; + case 2: + if (state->pressed) + tap_code16(S(KC_DOT)); + else + tap_code(KC_RBRACKET); + break; + default: + reset_tap_dance(state); + } +} + +enum { REST, HOLD1, HOLD2, HOLD3 }; + +static int Alt = REST; +void altFinish(qk_tap_dance_state_t* state, void* user_data) { + switch (state->count) { + case 1: + if (state->pressed) { + register_code(KC_LALT); + Alt = HOLD1; + } + break; + case 2: + if (state->pressed) { + register_code(KC_RALT); + Alt = HOLD2; + } + break; + case 3: + if (state->pressed) { + register_code(KC_RALT); + register_code(KC_RSHIFT); + Alt = HOLD3; + } + break; + default: + reset_tap_dance(state); + } +} + +void altReset(qk_tap_dance_state_t* state, void* user_data) { + switch (Alt) { + case HOLD1: + unregister_code(KC_LALT); + break; + case HOLD2: + unregister_code(KC_RALT); + break; + case HOLD3: + unregister_code(KC_RSHIFT); + unregister_code(KC_RALT); + break; + } + Alt = REST; +} + +static int Ctrl = REST; +void ctrlFinish(qk_tap_dance_state_t* state, void* user_data) { + switch (state->count) { + case 1: + if (state->pressed) { + register_code(KC_LCTL); + Ctrl = HOLD1; + } else { + tap_code(KC_ESC); + } + break; + case 2: + if (state->pressed) { + register_code(KC_LGUI); + Ctrl = HOLD2; + } + break; + default: + reset_tap_dance(state); + } +} + +void ctrlReset(qk_tap_dance_state_t* state, void* user_data) { + switch (Ctrl) { + case HOLD1: + unregister_code(KC_LCTL); + break; + case HOLD2: + unregister_code(KC_LGUI); + break; + } + Ctrl = REST; +} + +qk_tap_dance_action_t tap_dance_actions[] = { + [ALT] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, altFinish, altReset), + [CTRL] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, ctrlFinish, ctrlReset), + [LEFT] = ACTION_TAP_DANCE_FN(left), + [RIGHT] = ACTION_TAP_DANCE_FN(right), +}; diff --git a/users/pcoves/tapDance.h b/users/pcoves/tapDance.h new file mode 100644 index 000000000000..98fd8ae2c7ff --- /dev/null +++ b/users/pcoves/tapDance.h @@ -0,0 +1,8 @@ +#pragma once + +enum { + ALT, + CTRL, + LEFT, + RIGHT, +}; diff --git a/users/pcoves/unicode.c b/users/pcoves/unicode.c new file mode 100644 index 000000000000..966a9d3852a3 --- /dev/null +++ b/users/pcoves/unicode.c @@ -0,0 +1,20 @@ +#include "unicode.h" +#include "pcoves.h" + +bool process_record_unicode(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case EMOTE0: + if (record->event.pressed) send_unicode_string("(╯°□°)╯︵┻━┻"); + return false; + case EMOTE1: + if (record->event.pressed) send_unicode_string("(ヘ・_・)ヘ┳━┳"); + return false; + case EMOTE2: + if (record->event.pressed) send_unicode_string("¯\\_(ツ)_/¯"); + return false; + case EMOTE3: + if (record->event.pressed) send_unicode_string("ಠ_ಠ"); + return false; + } + return true; +} diff --git a/users/pcoves/unicode.h b/users/pcoves/unicode.h new file mode 100644 index 000000000000..ba8a881787da --- /dev/null +++ b/users/pcoves/unicode.h @@ -0,0 +1,5 @@ +#pragma once + +#include "quantum.h" + +__attribute__((weak)) bool process_record_unicode(uint16_t keycode, keyrecord_t *record); From bae3e03e5f5c74da05d3db71901b196004b105cc Mon Sep 17 00:00:00 2001 From: umi <57262844+umi-umi@users.noreply.github.com> Date: Thu, 9 Jul 2020 21:13:32 +0900 Subject: [PATCH 353/930] [Docs] Japanese translation of docs/coding_conventions_c.md (#9516) * add coding_conventions_c.md translation * update based on comment * update based on comment * update based on comment --- docs/ja/coding_conventions_c.md | 63 +++++++++++++++++++++++++++++++++ 1 file changed, 63 insertions(+) create mode 100644 docs/ja/coding_conventions_c.md diff --git a/docs/ja/coding_conventions_c.md b/docs/ja/coding_conventions_c.md new file mode 100644 index 000000000000..fccd44a3ae08 --- /dev/null +++ b/docs/ja/coding_conventions_c.md @@ -0,0 +1,63 @@ +# コーディング規約 (C) + + + +私たちのスタイルのほとんどはかなり理解しやすいですが、現時点では完全に一貫しているわけではありません。変更箇所周辺のコードのスタイルと一致させる必要がありますが、そのコードに一貫性が無い場合や不明瞭な場合は以下のガイドラインに従ってください: + +* 4つのスペース (ソフトタブ) を使ってインデントします。 +* 修正版 One True Brace Style を使います。 + * 開き括弧: ブロックを開始する文と同じ行の最後 + * 閉じ括弧: ブロックを開始した文と同じ字下げ + * Else If: 行の先頭に閉じ括弧を置き、次の開き括弧を同じ行の最後に置きます。 + * 省略可能な括弧: 常に括弧を付け加えます。 + * 良い: if (condition) { return false; } + * 悪い: if (condition) return false; +* C 形式のコメントの使用を推奨します: `/* */` + * コメントを機能を説明するストーリーと考えて下さい。 + * 特定の決定がなされた理由を充分なコメントで説明してください。 + * 分かり切ったコメントは書かないでください。 + * 分かり切ったコメントであるか確信できない場合は、コメントを含めてください。 +* 一般的に、行を折り返さないで、必要なだけ長くすることができます。行を折り返すことを選択した場合は、76列を超えて折り返さないでください。 +* 古い形式のインクルードガード (`#ifndef THIS_FILE_H`、`#define THIS_FILE_H`、...、`#endif`) ではなく、ヘッダファイルの先頭で `#pragma once` を使います。 +* プリプロセッサ if の両方の形式を受け付けます: `#ifdef DEFINED` と `#if defined(DEFINED)` + * どちらがいいかわからない場合は、`#if defined(DEFINED)` 形式を使ってください。 + * 複数の条件 `#if` に移行する場合を除き、既存のコードを別のスタイルに変更しないでください。 +* プリプロセッサディレクティブをインデントする方法(あるいはするかどうか)を決定する時は、以下の事に留意してください: + * 一貫性よりも読みやすさが重要です。 + * ファイルの既存のスタイルに従ってください。ファイルのスタイルが混在している場合は、修正しようとしているセクションに適したスタイルに従ってください。 + * インデントする時は、ハッシュを行の先頭に置き、`#` と `if` の間に空白を追加します。`#` の後ろに4つスペースを入れて開始します。 + * 周りの C コードのインデントレベルに従うか、プリプロセッサのディレクティブに独自のインデントレベルを設定することができます。コードの意図を最もよく伝えるスタイルを選択してください。 + +わかりやすいように例を示します: + +```c +/* Enums for foo */ +enum foo_state { + FOO_BAR, + FOO_BAZ, +}; + +/* Returns a value */ +int foo(void) { + if (some_condition) { + return FOO_BAR; + } else { + return -1; + } +} +``` + +# clang-format を使った自動整形 + +[Clang-format](https://clang.llvm.org/docs/ClangFormat.html) は LLVM の一部で、誰もが手動で整形するほど暇ではないため、コードを自動整形することができます。私たちは、上記のコーディング規約のほとんどを適用する設定ファイルを提供しています。空白と改行のみを変更するため、省略可能な括弧は自分で付け加えることを忘れないでください。 + +Windows で clang-format を入手するには [full LLVM インストーラ](http://llvm.org/builds/)を使い、Ubuntu では `sudo apt install clang-format` を使ってください。 + +コマンドラインから実行する場合、オプションとして `-style=file` を渡すと、QMK ルートディレクトリ内の .clang-format 設定ファイルを自動的に見つけます。 + +VSCode を使う場合は、標準の C/C++ プラグインが clang-format をサポートしますが、その他にも [独立した拡張機能](https://marketplace.visualstudio.com/items?itemName=LLVMExtensions.ClangFormat) があります。 + +幾つかのコード (LAYOUT マクロのような)が clang-format によって破壊されるため、これらのファイルで clang-format を実行しないか、整形したくないコードを `// clang-format off` と `// clang-format on` で囲みます。 From c5e255a4172cdd8e813fbd9a86e560dac90dee64 Mon Sep 17 00:00:00 2001 From: ajp10304 Date: Thu, 9 Jul 2020 20:18:51 +0100 Subject: [PATCH 354/930] Create ajp10304 userspace and ortho_4x12 layout. (#9304) --- .../acheron/shark/keymaps/ajp10304/readme.md | 118 ++++++ keyboards/handwired/atreus50/atreus50.h | 2 +- .../atreus50/keymaps/ajp10304/keymap.c | 236 +++--------- .../atreus50/keymaps/ajp10304/readme.md | 33 +- .../atreus50/keymaps/ajp10304/rules.mk | 5 - keyboards/jj40/keymaps/ajp10304/keymap.c | 342 ------------------ keyboards/jj40/keymaps/ajp10304/readme.md | 33 +- keyboards/planck/keymaps/ajp10304/readme.md | 33 +- keyboards/planck/keymaps/ajp10304/rules.mk | 3 - .../community/ortho_4x12}/ajp10304/keymap.c | 287 ++++----------- .../community/ortho_4x12/ajp10304/readme.md | 117 ++++++ .../community/ortho_4x12}/ajp10304/rules.mk | 2 +- users/ajp10304/ajp10304.c | 154 ++++++++ users/ajp10304/ajp10304.h | 45 +++ users/ajp10304/readme.md | 132 +++++++ users/ajp10304/rules.mk | 1 + 16 files changed, 741 insertions(+), 802 deletions(-) create mode 100644 keyboards/acheron/shark/keymaps/ajp10304/readme.md delete mode 100644 keyboards/jj40/keymaps/ajp10304/keymap.c delete mode 100644 keyboards/planck/keymaps/ajp10304/rules.mk rename {keyboards/planck/keymaps => layouts/community/ortho_4x12}/ajp10304/keymap.c (55%) create mode 100644 layouts/community/ortho_4x12/ajp10304/readme.md rename {keyboards/jj40/keymaps => layouts/community/ortho_4x12}/ajp10304/rules.mk (59%) create mode 100644 users/ajp10304/ajp10304.c create mode 100644 users/ajp10304/ajp10304.h create mode 100644 users/ajp10304/readme.md create mode 100644 users/ajp10304/rules.mk diff --git a/keyboards/acheron/shark/keymaps/ajp10304/readme.md b/keyboards/acheron/shark/keymaps/ajp10304/readme.md new file mode 100644 index 000000000000..73e5b831e01c --- /dev/null +++ b/keyboards/acheron/shark/keymaps/ajp10304/readme.md @@ -0,0 +1,118 @@ +# AJP10304 Custom Shark Layout +# Also available for the Planck, JJ40 and Atreus50 + +**Note:** In the tables below where there are two characters on a key, +the second is the output when shift is applied. + +**Note:** The below tables assume a UK layout. + +#### Flashing + +`make acheron/shark:ajp10304:flash` + +##### Main Qwerty Layer + +* Tab: when held, operates as shift. +* Enter: when held, operates as shift. +* MENU: perform right-click + +| | | | | | | | | | | | | +| ---- |:----:| :---:| :---:| :---:| :---:| :---:| :---:| :---:| :---:| :---:| ----:| +| Esc | Q | W | E | R | T | Y | U | I | O | P | Bksp | +| Tab | A | S | D | F | G | H | J | K | L | ;: | Enter| +| Shft | Z | X | C | V | B | N | M | ,< | .> | /? | Shft | +| Fn | Ctrl | Alt | GUI |Lower | Bksp |Space |Raise | Shift| MENU | Ctrl | Fn2 | + +##### Function Layer +Activated when `fn` held in the above `qwerty` layer. + +| | | | | | | | | | | | | +| :---: |:----:| :---:| :---:| :---:| :---:| :---:| :---:| :---:| :---:| :---:| :---:| +| F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | +| 1! | 2" | 3£ | 4$ | 5% | 6^ | 7& | 8* | 9( | 0) | ~ |INSERT| +| Shift | \| | `¬ | #~ | * | -_ | =+ | \| | [{ | ]} | '@ |Shift | +| Fn | Ctrl | Alt | GUI |Lower | Bksp |Space |Mouse | MENU | Alt | Ctrl | Fn2 | + +##### Lower Layer +Activated when `Lower` is held in the above `qwerty` layer. + +* Numbers are along the top row, their shifted counterparts are on row 2. +* WrdBks: `backspace` with `ctrl` applied. I.e. delete a word. +* WrdDel: `delete` with `ctrl` applied. I.e. forward delete a word. + +| | | | | | | | | | | | | +| :---: |:----:| :---:| :---:| :---:| :---:| :---:| :---:| :---:| :---:| :---:| :---:| +| 1! | 2" | 3£ | 4$ | 5% | 6^ | 7& | 8* | 9( | 0) | DEL | Bksp | +| ! | " | £ | $ | % | ^ | & | * | ( | ) |WrdDel|WrdBks| +| Shift | \| | `¬ | #~ | '@ | -_ | =+ | #~ | [{ | ]} | '@ |Shift | +| | | | |Lower | Del |Space | | Next | Vol- | Vol+ | Play | + +##### Raise Layer +Activated when `Raise` is held in the above `qwerty` layer. + +* Preferred layer for typing brackets. +* Allows for cursor navigation to be used solely with the right hand. +* WRDSEL: Select the word where the cursor is. +* |< and >|: Apply `ctrl` to `left` and `right` respectively for word jumping. + +| | | | | | | | | | | | | +| :---: |:----:| :---:| :---:| :---:| :---:| :---: | :---:| :---:| :---:| :---: | :---:| +| ` | |WRDSEL| [ | ] | | | PGUP | HOME |PGDOWN| |PRNTSC| +| ` | | | ( | ) | | | HOME | UP | END | |ZOOM +| +| | | | { | } | ||<| LEFT | DOWN |RIGHT |>||ZOOM -| +| Mouse | | | | | Alt | Enter |Raise | | | | | + +##### Lower + Raise +Activated when `Lower` and `Raise` are held together in the above `qwerty` layer. + +* Audio controls in the same position as cursor keys from the `Raise` layer. +* ????: Runs a macro for outputting a text string. Do not use this store passwords. +* Reset: Enter bootloader for flashing firmware to the keyboard. +* CAPS: Toggle caps lock. +* Macro functions: Allows recording of macros. To start recording the macro, press either REC1 or REC2. +To finish the recording, press STOP. To replay the macro, press either PLAY1 or PLAY2. +* MAC: Toggle MAC OS extensions to layers. This allows MLWR to be enabled with LOWER, +MRSE with RAISE, MFNC with FUNC and MFNC2 with FUNC2 respectively. + +| | | | | | | | | | | | | +| :---: |:----:| :---:| :---:| :---:| :---:| :---:| :---:| :---:| :---:| :---:| :---:| +| ???? | Reset|Qwerty| | | REC1 | REC2 | | | | | Del | +| CAPS | | | | | PLAY1|PLAY2 | Mute | Vol+ | Play | | | +| MAC | | | | | STOP1|STOP2 | Prev | Vol- | Next | | | +| | | | | | | | | DYN | | | | + +##### Function 2 Layer +Activated when `fn` held in the above `qwerty` layer. +* WRDSEL: Select the word where the cursor is. +* LNDEL: Delete the line where the cursor is. +* LNSEL: Select the line where the cursor is. +* DUP: Duplicate the selected text. +* LNJOIN: Join the line where the cursor is with the following line. +* MODE: Print either `PC` or `OSX` depending on what layer mode is active. + +| | | | | | | | | | | | | +| :---: | :---:| :---:| :---:| :---:| :---:| :---:| :---:| :---:| :---:| :---:| :---:| +| | |WRDSEL| | | | LNDEL| | | | | | +| | | LNSEL| DUP | | | | |LNJOIN| | | | +| | UNDO | CUT | COPY | PASTE| | | | | | | MODE | +| | | | | | | | | | | | | + +##### Mouse Layer +Activated when `fn` and `raise` held together. + +| | | | | | | | | | | | | +| :---: | :---:| :---:| :---:| :---:| :---:| :---:| :---:| :---:| :---:| :---:| :---:| +| ESC | | | | | | | | BTN3 | | | | +| ACC0 | ACC1 | ACC2 | | | | | BTN1 | UP | BTN2 | | | +| ACC0 | ACC1 | ACC2 | | | | | LEFT | DOWN | RIGHT| | | +| | | | | | | | | | | | | + +##### Number Pad Layout +Activated when holding `Esc` key. + +| | | | | | | | | | | | | +| :---: | :---:| :---:| :---:| :---:| :---:| :---:| :---:| :---:| :---:| :---:| :---:| +| | | | | | |NMLOCK| 7 | 8 | 9 | / | | +| | | | | | | | 4 | 5 | 6 | * | | +| | | | | | | | 1 | 2 | 3 | + | | +| | | | | | | | 0 | . | , | - | | diff --git a/keyboards/handwired/atreus50/atreus50.h b/keyboards/handwired/atreus50/atreus50.h index eb31ca1b8e66..e2e8510b62e2 100644 --- a/keyboards/handwired/atreus50/atreus50.h +++ b/keyboards/handwired/atreus50/atreus50.h @@ -3,7 +3,7 @@ #include "quantum.h" -// The first section contains all of the arguements +// The first section contains all of the arguments // The second converts the arguments into a two-dimensional array #define LAYOUT( \ k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, \ diff --git a/keyboards/handwired/atreus50/keymaps/ajp10304/keymap.c b/keyboards/handwired/atreus50/keymaps/ajp10304/keymap.c index 1e53d050b0bd..46a5995d0d03 100644 --- a/keyboards/handwired/atreus50/keymaps/ajp10304/keymap.c +++ b/keyboards/handwired/atreus50/keymaps/ajp10304/keymap.c @@ -1,39 +1,6 @@ #include QMK_KEYBOARD_H #include "keymap_uk.h" - -extern keymap_config_t keymap_config; - -enum planck_layers { - _QWERTY, - _MAC, - _LOWER, - _MLWR, - _RAISE, - _MRSE, - _FUNC, - _MFNC, - _FUNC2, - _MFNC2, - _ADJUST, - _MOUSE -}; - -enum planck_keycodes { - QWERTY = SAFE_RANGE, - MAC, - FUNC, - MFNC, - FUNC2, - MFNC2, - LOWER, - MLWR, - RAISE, - MRSE, - MOUSE, - DYNAMIC_MACRO_RANGE -}; - -#include "dynamic_macro.h" +#include "ajp10304.h" const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { @@ -49,7 +16,7 @@ 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 , + LT(_NUMPAD, KC_ESC), KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC , MT(MOD_LSFT, KC_TAB), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, MT(MOD_RSFT, KC_ENT) , KC_LSHIFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSHIFT , MO(_FUNC), KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_BSPC, KC_LCTL, KC_LALT, KC_SPC, RAISE, KC_LSHIFT, KC_BTN2, KC_RCTL, MO(_FUNC2) @@ -103,10 +70,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `-------------------------------------------------------------------------------------------------' */ [_RAISE] = LAYOUT( - KC_GRV, XXXXXXX, M(1), KC_LBRC, KC_RBRC, XXXXXXX, XXXXXXX, KC_PGUP, KC_HOME, KC_PGDOWN, XXXXXXX, KC_PSCREEN , - KC_GRV, XXXXXXX, XXXXXXX, LSFT(KC_9), LSFT(KC_0), XXXXXXX, XXXXXXX, KC_HOME, KC_UP, KC_END, XXXXXXX, LCTL(LSFT(KC_EQL)) , - _______, XXXXXXX, XXXXXXX, LSFT(KC_LBRC), LSFT(KC_RBRC), XXXXXXX, LCTL(KC_LEFT), KC_LEFT, KC_DOWN, KC_RIGHT, LCTL(KC_RIGHT), LCTL(KC_MINS) , - MO(_MOUSE), _______, _______, _______, _______, KC_LALT, _______, _______, KC_ENT, _______, XXXXXXX, _______, _______, _______ + KC_GRV, XXXXXXX, M_WORD_SEL, KC_LBRC, KC_RBRC, XXXXXXX, XXXXXXX, KC_PGUP, KC_HOME, KC_PGDOWN, XXXXXXX, KC_PSCREEN , + KC_GRV, XXXXXXX, XXXXXXX, LSFT(KC_9), LSFT(KC_0), XXXXXXX, XXXXXXX, KC_HOME, KC_UP, KC_END, XXXXXXX, LCTL(LSFT(KC_EQL)) , + _______, XXXXXXX, XXXXXXX, LSFT(KC_LBRC), LSFT(KC_RBRC), XXXXXXX, LCTL(KC_LEFT), KC_LEFT, KC_DOWN, KC_RIGHT, LCTL(KC_RIGHT), LCTL(KC_MINS) , + MO(_MOUSE), _______, _______, _______, _______, KC_LALT, _______, _______, KC_ENT, _______, XXXXXXX, _______, _______, _______ ), /* Adjust (Lower + Raise) @@ -121,7 +88,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `-------------------------------------------------------------------------------------------------' */ [_ADJUST] = LAYOUT( - M(0), RESET, QWERTY, _______, _______, DYN_REC_START1, DYN_REC_START2, _______, _______, _______, _______, KC_DEL , + M_CUSTOM, RESET, QWERTY, _______, _______, DYN_REC_START1, DYN_REC_START2, _______, _______, _______, _______, KC_DEL , KC_CAPS, _______, _______, _______, _______, DYN_MACRO_PLAY1, DYN_MACRO_PLAY2, KC_AUDIO_MUTE, KC_AUDIO_VOL_UP, KC_MEDIA_PLAY_PAUSE, _______, _______ , TG(_MAC), _______, _______, _______, _______, DYN_REC_STOP, DYN_REC_STOP, KC_MEDIA_PREV_TRACK, KC_AUDIO_VOL_DOWN, KC_MEDIA_NEXT_TRACK, _______, _______ , _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ @@ -129,7 +96,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Mouse * ,------------------------------------------ |-----------------------------------------. - * | ESC | | | | | | | | | | | | | + * | ESC | | | | | | | | | BTN3 | | | | * |------+------+------+------+------+------- |------+------+------+------+------+------| * | ACC0 | ACC1 | ACC2 | | | | | | BTN1 | UP | BTN2 | | | * |------+------+------+------+------+------| |------+------+------+------+------+------| @@ -139,12 +106,32 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `-------------------------------------------------------------------------------------------------' */ [_MOUSE] = LAYOUT( - KC_ESC , _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ , + KC_ESC , _______, _______, _______, _______, _______, _______, _______, KC_MS_BTN3, _______, _______, _______ , KC_MS_ACCEL0, KC_MS_ACCEL1, KC_MS_ACCEL2, _______, _______, _______, _______, KC_MS_BTN1, KC_MS_UP, KC_MS_BTN2, _______, _______ , KC_MS_ACCEL0, KC_MS_ACCEL1, KC_MS_ACCEL2, _______, _______, _______, _______, KC_MS_LEFT, KC_MS_DOWN, KC_MS_RIGHT, _______, _______ , _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ ), + +/* Num Pad + * ,------------------------------------------ |-----------------------------------------. + * | ESC | | | | | | |NMLOCK| 7 | 8 | 9 | / | | + * |------+------+------+------+------+------- |------+------+------+------+------+------| + * | | | | | | | | | 4 | 5 | 6 | * | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | | | | | | | | 1 | 2 | 3 | + | | + * |------+------+------+------+------+------|------+------+------+------+------+------+------+------| + * | | | | | | | | | | 0 | . | , | - | | + * `-------------------------------------------------------------------------------------------------' + */ +[_NUMPAD] = LAYOUT( + _______, _______, _______, _______, _______, _______, KC_NLCK, KC_KP_7, KC_KP_8, KC_KP_9, KC_KP_SLASH, _______, + _______, _______, _______, _______, _______, _______, _______, KC_KP_4, KC_KP_5, KC_KP_6, KC_KP_ASTERISK, _______, + _______, _______, _______, _______, _______, _______, _______, KC_KP_1, KC_KP_2, KC_KP_3, KC_KP_PLUS, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_KP_0, KC_KP_DOT, KC_COMM, KC_KP_MINUS, _______ +), + + /* Function 2 (Right hand side) * ,------------------------------------------ |-----------------------------------------. * | | |WRDSEL| | | | | LNDEL| | | | | | @@ -157,10 +144,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `-------------------------------------------------------------------------------------------------' */ [_FUNC2] = LAYOUT( - _______, _______, M(1), _______, _______, _______, M(5), _______, _______, _______, _______, _______, - _______, _______, M(3), M(7), _______, _______, _______, M(10), _______, _______, _______, _______, - _______, LCTL(KC_Z), LCTL(KC_X), LCTL(KC_C), LCTL(KC_V), _______, _______, _______, _______, _______, _______, M(98) , - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + _______, _______, M_WORD_SEL, _______, _______, _______, M_LINE_DEL, _______, _______, _______, _______, _______, + _______, _______, M_LINE_SEL, M_DUP, _______, _______, _______, M_JOIN, _______, _______, _______, _______, + _______, LCTL(KC_Z), LCTL(KC_X), LCTL(KC_C), LCTL(KC_V), _______, _______, _______, _______, _______, _______, M_MODE, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ ), [_MAC] = LAYOUT( @@ -178,10 +165,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), [_MRSE] = LAYOUT( - _______, _______, M(2), _______, _______, _______, _______, _______, _______, _______, _______, _______ , - _______, _______, _______, _______, _______, _______, _______, LCTL(KC_A), _______, LCTL(KC_E), _______, LGUI(KC_EQL) , - _______, _______, _______, _______, _______, _______, LALT(KC_LEFT), _______, _______, _______, LALT(KC_RIGHT), LGUI(KC_MINS) , - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + _______, _______, M_WORD_SEL_MAC, _______, _______, _______, _______, _______, _______, _______, _______, _______ , + _______, _______, _______, _______, _______, _______, _______, LCTL(KC_A), _______, LCTL(KC_E), _______, LGUI(KC_EQL) , + _______, _______, _______, _______, _______, _______, LALT(KC_LEFT), _______, _______, _______, LALT(KC_RIGHT), LGUI(KC_MINS) , + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ ), [_MFNC] = LAYOUT( @@ -192,151 +179,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), [_MFNC2] = LAYOUT( - _______, _______, M(2), _______, _______, _______, M(6), _______, _______, _______, _______, _______, - _______, _______, M(4), M(8), _______, _______, _______, M(10), _______, _______, _______, _______, - _______, LGUI(KC_Z), LGUI(KC_X), LGUI(KC_C), LGUI(KC_V), _______, _______, _______, _______, _______, _______, M(99) , - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + _______, _______, M_WORD_SEL_MAC, _______, _______, _______, M_LINE_DEL_MAC, _______, _______, _______, _______, _______, + _______, _______, M_LINE_SEL_MAC, M_DUP_MAC, _______, _______, _______, M_JOIN_MAC, _______, _______, _______, _______, + _______, LGUI(KC_Z), LGUI(KC_X), LGUI(KC_C), LGUI(KC_V), _______, _______, _______, _______, _______, _______, M_MODE_MAC, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ ) }; - -void persistant_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) { - - if (!process_record_dynamic_macro(keycode, record)) { - return false; - } - - switch (keycode) { - case QWERTY: - if (record->event.pressed) { - persistant_default_layer_set(1UL<<_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 MLWR: - if (record->event.pressed) { - layer_on(_LOWER); - layer_on(_MLWR); - update_tri_layer(_LOWER, _RAISE, _ADJUST); - } else { - layer_off(_LOWER); - layer_off(_MLWR); - update_tri_layer(_LOWER, _RAISE, _ADJUST); - } - return false; - case MRSE: - if (record->event.pressed) { - layer_on(_RAISE); - layer_on(_MRSE); - update_tri_layer(_LOWER, _RAISE, _ADJUST); - } else { - layer_off(_RAISE); - layer_off(_MRSE); - update_tri_layer(_LOWER, _RAISE, _ADJUST); - } - return false; - case MFNC: - if (record->event.pressed) { - layer_on(_FUNC); - layer_on(_MFNC); - } else { - layer_off(_FUNC); - layer_off(_MFNC); - } - return false; - case MFNC2: - if (record->event.pressed) { - layer_on(_FUNC2); - layer_on(_MFNC2); - } else { - layer_off(_FUNC2); - layer_off(_MFNC2); - } - return false; - } - return true; -} - -const macro_t *action_get_macro(keyrecord_t *record, uint8_t keycode, uint8_t opt) { - // These would trigger when you hit a key mapped as M(0) - if (record->event.pressed) { - switch(keycode) { - case 0: // Some custom string here - SEND_STRING(""); - return false; - - case 1: // Word Select - SEND_STRING(SS_DOWN(X_LCTRL) SS_TAP(X_RIGHT) SS_DOWN(X_LSHIFT) SS_TAP(X_LEFT) SS_UP(X_LSHIFT) SS_UP(X_LCTRL)); - return false; - - case 2: // Word Select Mac - SEND_STRING(SS_DOWN(X_LALT) SS_TAP(X_RIGHT) SS_DOWN(X_LSHIFT) SS_TAP(X_LEFT) SS_UP(X_LSHIFT) SS_UP(X_LALT)); - return false; - - case 3: // Line Select - SEND_STRING(SS_TAP(X_HOME) SS_DOWN(X_LSHIFT) SS_TAP(X_END) SS_UP(X_LSHIFT)); - return false; - - case 4: // Line Select Mac - SEND_STRING(SS_LCTRL("a") SS_DOWN(X_LSHIFT) SS_LCTRL("e") SS_UP(X_LSHIFT)); - return false; - - case 5: // Line Delete - SEND_STRING(SS_TAP(X_HOME) SS_DOWN(X_LSHIFT) SS_TAP(X_END) SS_UP(X_LSHIFT)); - SEND_STRING(SS_TAP(X_BSPACE)); - return false; - - case 6: // Line Delete Mac - SEND_STRING(SS_LCTRL("a") SS_DOWN(X_LSHIFT) SS_LCTRL("e") SS_UP(X_LSHIFT)); - SEND_STRING(SS_TAP(X_BSPACE)); - return false; - - case 7: // Duplicate Selection - SEND_STRING(SS_LCTRL("c") SS_TAP(X_RIGHT) SS_LCTRL("v")); - return false; - - case 8: // Duplicate Selection Mac - SEND_STRING(SS_LGUI("c") SS_TAP(X_RIGHT) SS_LGUI("v")); - return false; - - case 9: // Join line - SEND_STRING(SS_TAP(X_END) SS_TAP(X_DELETE)); - return false; - - case 10: // Join line Mac - SEND_STRING(SS_LCTRL("e") SS_TAP(X_DELETE)); - return false; - - case 98: // Print mode - SEND_STRING("PC"); - return false; - - case 99: // Print mode - SEND_STRING("OSX"); - return false; - } - } - return MACRO_NONE; -}; diff --git a/keyboards/handwired/atreus50/keymaps/ajp10304/readme.md b/keyboards/handwired/atreus50/keymaps/ajp10304/readme.md index 41ad0f5118c4..5c6a703a8ea0 100644 --- a/keyboards/handwired/atreus50/keymaps/ajp10304/readme.md +++ b/keyboards/handwired/atreus50/keymaps/ajp10304/readme.md @@ -1,11 +1,15 @@ # AJP10304 Custom Atreus50 Layout -# Also available for the Planck and JJ40 +# Also available for the Planck, Shark and JJ40 **Note:** In the tables below where there are two characters on a key, the second is the output when shift is applied. **Note:** The below tables assume a UK layout. +#### Flashing + +`make handwired/atreus50:ajp10304:flash` + ##### Main Qwerty Layer * Tab: when held, operates as shift. @@ -43,13 +47,13 @@ Activated when `Lower` is held in the above `qwerty` layer. | Shift | \| | `¬ | #~ | '@ | -_ | | | =+ | #~ | [{ | ]} | '@ |Shift | | | | | |Lower | Del | Ctrl | Alt |Space | | Next | Vol- | Vol+ | Play | - ##### Raise Layer - Activated when `Raise` is held in the above `qwerty` layer. +##### Raise Layer +Activated when `Raise` is held in the above `qwerty` layer. - * Preferred layer for typing brackets. - * Allows for cursor navigation to be used solely with the right hand. - * WRDSEL: Select the word where the cursor is. - * |< and >|: Apply `ctrl` to `left` and `right` respectively for word jumping. +* Preferred layer for typing brackets. +* Allows for cursor navigation to be used solely with the right hand. +* WRDSEL: Select the word where the cursor is. +* |< and >|: Apply `ctrl` to `left` and `right` respectively for word jumping. | | | | | | | | | | | | | | | | :---: |:----:| :---:| :---:| :---:| :---:| :---:| :---:| :---: | :---:| :---:| :---:| :---: | :---:| @@ -98,11 +102,20 @@ Activated when `fn` and `raise` held together. | | | | | | | | | | | | | | | | :---: | :---:| :---:| :---:| :---:| :---:| :---:| :---:| :---:| :---:| :---:| :---:| :---:| :---:| -| ESC | | | | | | | | | | | | | | +| ESC | | | | | | | | | | BTN3 | | | | | ACC0 | ACC1 | ACC2 | | | | | | | BTN1 | UP | BTN2 | | | | ACC0 | ACC1 | ACC2 | | | | | | | LEFT | DOWN | RIGHT| | | | | | | | | | Ctrl | Alt | | | | | | | +##### Number Pad Layout +Activated when holding `Esc` key. + +| | | | | | | | | | | | | | | +| :---: | :---:| :---:| :---:| :---:| :---:| :---:| :---:| :---:| :---:| :---:| :---:| :---:| :---:| +| | | | | | | | |NMLOCK| 7 | 8 | 9 | / | | +| | | | | | | | | | 4 | 5 | 6 | * | | +| | | | | | | | | | 1 | 2 | 3 | + | | +| | | | | | | Ctrl | Alt | | 0 | . | , | - | | + + -##Program Command -teensy_loader_cli -w -mmcu=atmega32u4 handwired_atreus50_ajp10304.hex diff --git a/keyboards/handwired/atreus50/keymaps/ajp10304/rules.mk b/keyboards/handwired/atreus50/keymaps/ajp10304/rules.mk index fc5d9ba1aa55..900dbaed11ac 100644 --- a/keyboards/handwired/atreus50/keymaps/ajp10304/rules.mk +++ b/keyboards/handwired/atreus50/keymaps/ajp10304/rules.mk @@ -1,8 +1,3 @@ AUDIO_ENABLE = no MOUSEKEY_ENABLE = yes - -TEMP := $(OPT_DEFS) -OPT_DEFS = $(filter-out -DBOOTLOADER_SIZE=4096,$(TEMP)) -OPT_DEFS += -DBOOTLOADER_SIZE=512 - BOOTLOADER = halfkay diff --git a/keyboards/jj40/keymaps/ajp10304/keymap.c b/keyboards/jj40/keymaps/ajp10304/keymap.c deleted file mode 100644 index c34a7c292999..000000000000 --- a/keyboards/jj40/keymaps/ajp10304/keymap.c +++ /dev/null @@ -1,342 +0,0 @@ -#include QMK_KEYBOARD_H -#include "keymap_uk.h" - -extern keymap_config_t keymap_config; - -enum jj40_layers { - _QWERTY, - _MAC, - _LOWER, - _MLWR, - _RAISE, - _MRSE, - _FUNC, - _MFNC, - _FUNC2, - _MFNC2, - _ADJUST, - _MOUSE -}; - -enum jj40_keycodes { - QWERTY = SAFE_RANGE, - MAC, - FUNC, - MFNC, - FUNC2, - MFNC2, - LOWER, - MLWR, - RAISE, - MRSE, - MOUSE, - DYNAMIC_MACRO_RANGE -}; - -#include "dynamic_macro.h" - -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 | ;: | Enter| - * |------+------+------+------+------+------|------+------+------+------+------+------| - * | Shft | Z | X | C | V | B | N | M | ,< | .> | /? | Shft | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | Fn | Ctrl | Alt | GUI |Lower | Bksp |Space |Raise | Shift| MENU | Ctrl | Fn2 | - * `-----------------------------------------------------------------------------------' - */ -[_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 ,\ - MT(MOD_LSFT, KC_TAB), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, MT(MOD_RSFT, KC_ENT) ,\ - KC_LSHIFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSHIFT ,\ - MO(_FUNC), KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_BSPC, KC_SPC, RAISE, KC_LSHIFT, KC_BTN2, KC_RCTL, MO(_FUNC2) \ -), - -/* Function - * ,-----------------------------------------------------------------------------------. - * | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | - * |------+------+------+------+------+-------------+------+------+------+------+------| - * | 1! | 2" | 3£ | 4$ | 5% | 6^ | 7& | 8* | 9( | 0) | ~ |INSERT| - * |------+------+------+------+------+------|------+------+------+------+------+------| - * | Shift| \| | `¬ | #~ | * | -_ | =+ | \| | [{ | ]} | '@ |Shift | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | Fn | Ctrl | Alt | GUI |Lower | Bksp |Space |Mouse | MENU | Alt | Ctrl | Fn | - * `-----------------------------------------------------------------------------------' - */ -[_FUNC] = 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, UK_TILD, KC_INSERT ,\ - KC_LSHIFT, KC_NONUS_BSLASH, KC_GRAVE, KC_NONUS_HASH, KC_PAST, KC_MINS, KC_EQL, KC_BSLASH, KC_LBRC, KC_RBRC, KC_QUOT, MT(MOD_RSFT, KC_ENT) ,\ - _______, _______, _______, _______, _______, _______, _______, MO(_MOUSE), _______, _______, _______, _______ \ -), - -/* Lower - * ,-----------------------------------------------------------------------------------. - * | 1! | 2" | 3£ | 4$ | 5% | 6^ | 7& | 8* | 9( | 0) | DEL | Bksp | - * |------+------+------+------+------+-------------+------+------+------+------+------| - * | ! | " | £ | $ | % | ^ | & | * | ( | ) |WrdDel|WrdBks| - * |------+------+------+------+------+------|------+------+------+------+------+------| - * | Shift| \| | `¬ | #~ | '@ | -_ | =+ | #~ | [{ | ]} | '@ |Shift | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | | | | |Lower | Del |Space | | Next | Vol- | Vol+ | Play | - * `-----------------------------------------------------------------------------------' - */ -[_LOWER] = LAYOUT_ortho_4x12(\ - KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL, KC_BSPC ,\ - LSFT(KC_1), LSFT(KC_2), LSFT(KC_3), LSFT(KC_4), LSFT(KC_5), LSFT(KC_6), LSFT(KC_7), LSFT(KC_8), LSFT(KC_9), LSFT(KC_0), LCTL(KC_DEL), LCTL(KC_BSPC) ,\ - KC_LSPO, KC_NONUS_BSLASH, KC_GRAVE, KC_NONUS_HASH, KC_QUOT, KC_MINS, KC_EQL, KC_NONUS_HASH, KC_LBRC, KC_RBRC, KC_QUOT, MT(MOD_RSFT, KC_ENT) ,\ - _______, _______, _______, _______, _______, KC_DEL, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY \ -), - -/* Raise - * ,-----------------------------------------------------------------------------------. - * | ` | |WRDSEL| [ | ] | | | PGUP | HOME |PGDOWN| |PRNTSC| - * |------+------+------+------+------+-------------+------+------+------+------+------| - * | ` | | | ( | ) | | | HOME | UP | END | |ZOOM +| - * |------+------+------+------+------+------|------+------+------+------+------+------| - * | | | | { | } | | |< | LEFT | DOWN |RIGHT | >| |ZOOM -| - * |------+------+------+------+------+------|------+------+------+------+------+------| - * | Mouse| | | | | Alt | Enter|Raise | | | | | - * `-----------------------------------------------------------------------------------' - */ -[_RAISE] = LAYOUT_ortho_4x12(\ - KC_GRV, XXXXXXX, M(1), KC_LBRC, KC_RBRC, XXXXXXX, XXXXXXX, KC_PGUP, KC_HOME, KC_PGDOWN, XXXXXXX, KC_PSCREEN ,\ - KC_GRV, XXXXXXX, XXXXXXX, LSFT(KC_9), LSFT(KC_0), XXXXXXX, XXXXXXX, KC_HOME, KC_UP, KC_END, XXXXXXX, LCTL(LSFT(KC_EQL)) ,\ - _______, XXXXXXX, XXXXXXX, LSFT(KC_LBRC), LSFT(KC_RBRC), XXXXXXX, LCTL(KC_LEFT), KC_LEFT, KC_DOWN, KC_RIGHT, LCTL(KC_RIGHT), LCTL(KC_MINS) ,\ - MO(_MOUSE), _______, _______, _______, _______, KC_LALT, KC_ENT, _______, XXXXXXX, _______, _______, _______ \ -), - -/* Adjust (Lower + Raise) - * ,-----------------------------------------------------------------------------------. - * | ???? | Reset|Qwerty| | | REC1 | REC2 | | | | | Del | - * |------+------+------+------+------+-------------+------+------+------+------+------| - * | CAPS | | | | | PLAY1| PLAY2| Mute | Vol+ | Play | | | - * |------+------+------+------+------+------|------+------+------+------+------+------| - * | PC/MC| | | | | STOP | STOP | Prev | Vol- | Next | | | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | | | | | | | | | | | | - * `-----------------------------------------------------------------------------------' - */ -[_ADJUST] = LAYOUT_ortho_4x12(\ - M(0), RESET, QWERTY, BL_ON, BL_OFF, DYN_REC_START1, DYN_REC_START2, _______, _______, _______, _______, KC_DEL ,\ - KC_CAPS, RGB_TOG, RGB_MOD, RGB_VAD, RGB_VAI, DYN_MACRO_PLAY1, DYN_MACRO_PLAY2, KC_AUDIO_MUTE, KC_AUDIO_VOL_UP, KC_MEDIA_PLAY_PAUSE, _______, _______ ,\ - TG(_MAC), RGB_HUD, RGB_HUI, RGB_SAD, RGB_SAI, DYN_REC_STOP, DYN_REC_STOP, KC_MEDIA_PREV_TRACK, KC_AUDIO_VOL_DOWN, KC_MEDIA_NEXT_TRACK, _______, _______ ,\ - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ -), - -/* Mouse - * ,-----------------------------------------------------------------------------------. - * | ESC | | | | | | | | | | | | - * |------+------+------+------+------+-------------+------+------+------+------+------| - * | ACC0 | ACC1 | ACC2 | | | | | BTN1 | UP | BTN2 | | | - * |------+------+------+------+------+------|------+------+------+------+------+------| - * | ACC0 | ACC1 | ACC2 | | | | | LEFT | DOWN |RIGHT | | | - * |------+------+------+------+------+------|------+------+------+------+------+------| - * | | | | | | | | | | | | | - * `-----------------------------------------------------------------------------------' - */ -[_MOUSE] = LAYOUT_ortho_4x12(\ - KC_ESC , _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,\ - KC_MS_ACCEL0, KC_MS_ACCEL1, KC_MS_ACCEL2, _______, _______, _______, _______, KC_MS_BTN1, KC_MS_UP, KC_MS_BTN2, _______, _______,\ - KC_MS_ACCEL0, KC_MS_ACCEL1, KC_MS_ACCEL2, _______, _______, _______, _______, KC_MS_LEFT, KC_MS_DOWN, KC_MS_RIGHT, _______, _______,\ - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______\ -), - -/* Function 2 (Right hand side) - * ,-----------------------------------------------------------------------------------. - * | | |WRDSEL| | | | LNDEL| | | | | | - * |------+------+------+------+------+-------------+------+------+------+------+------| - * | | | LNSEL| DUP | | | | |LNJOIN| | | | - * |------+------+------+------+------+------|------+------+------+------+------+------| - * | | UNDO | CUT | COPY | PASTE| | | | | | | MODE | - * |------+------+------+------+------+------|------+------+------+------+------+------| - * | | | | | | | | | | | | | - * `-----------------------------------------------------------------------------------' - */ -[_FUNC2] = LAYOUT_ortho_4x12(\ - _______, _______, M(1), _______, _______, _______, M(5), _______, _______, _______, _______, _______,\ - _______, _______, M(3), M(7), _______, _______, _______, M(10), _______, _______, _______, _______,\ - _______, LCTL(KC_Z), LCTL(KC_X), LCTL(KC_C), LCTL(KC_V), _______, _______, _______, _______, _______, _______, M(98), \ - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ -), - -[_MAC]= LAYOUT_ortho_4x12(\ - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,\ - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,\ - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,\ - MFNC, _______, _______, _______, MLWR, _______, _______, MRSE, _______, _______, _______, MFNC2 \ -), - -[_MLWR] = LAYOUT_ortho_4x12(\ - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,\ - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,\ - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,\ - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ -), - -[_MRSE] = LAYOUT_ortho_4x12(\ - _______, _______, M(2), _______, _______, _______, _______, _______, _______, _______, _______, _______ ,\ - _______, _______, _______, _______, _______, _______, _______, LCTL(KC_A), _______, LCTL(KC_E), _______, LGUI(KC_EQL) ,\ - _______, _______, _______, _______, _______, _______, LALT(KC_LEFT), _______, _______, _______, LALT(KC_RIGHT), LGUI(KC_MINS) ,\ - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ -), - -[_MFNC]= LAYOUT_ortho_4x12(\ - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ ,\ - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, LGUI(KC_PENT) ,\ - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ ,\ - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ -), - -[_MFNC2] = LAYOUT_ortho_4x12(\ - _______, _______, M(2), _______, _______, _______, M(6), _______, _______, _______, _______, _______,\ - _______, _______, M(4), M(8), _______, _______, _______, M(10), _______, _______, _______, _______,\ - _______, LGUI(KC_Z), LGUI(KC_X), LGUI(KC_C), LGUI(KC_V), _______, _______, _______, _______, _______, _______, M(99), \ - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ -) - -}; - -void persistant_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) { - - if (!process_record_dynamic_macro(keycode, record)) { - return false; - } - - switch (keycode) { - case QWERTY: - if (record->event.pressed) { - persistant_default_layer_set(1UL<<_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 MLWR: - if (record->event.pressed) { - layer_on(_LOWER); - layer_on(_MLWR); - update_tri_layer(_LOWER, _RAISE, _ADJUST); - } else { - layer_off(_LOWER); - layer_off(_MLWR); - update_tri_layer(_LOWER, _RAISE, _ADJUST); - } - return false; - case MRSE: - if (record->event.pressed) { - layer_on(_RAISE); - layer_on(_MRSE); - update_tri_layer(_LOWER, _RAISE, _ADJUST); - } else { - layer_off(_RAISE); - layer_off(_MRSE); - update_tri_layer(_LOWER, _RAISE, _ADJUST); - } - return false; - case MFNC: - if (record->event.pressed) { - layer_on(_FUNC); - layer_on(_MFNC); - } else { - layer_off(_FUNC); - layer_off(_MFNC); - } - return false; - case MFNC2: - if (record->event.pressed) { - layer_on(_FUNC2); - layer_on(_MFNC2); - } else { - layer_off(_FUNC2); - layer_off(_MFNC2); - } - return false; - } - return true; -} - -const macro_t *action_get_macro(keyrecord_t *record, uint8_t keycode, uint8_t opt) { - // These would trigger when you hit a key mapped as M(0) - if (record->event.pressed) { - switch(keycode) { - case 0: // Some custom string here - SEND_STRING(""); - return false; - - case 1: // Word Select - SEND_STRING(SS_DOWN(X_LCTRL) SS_TAP(X_RIGHT) SS_DOWN(X_LSHIFT) SS_TAP(X_LEFT) SS_UP(X_LSHIFT) SS_UP(X_LCTRL)); - return false; - - case 2: // Word Select Mac - SEND_STRING(SS_DOWN(X_LALT) SS_TAP(X_RIGHT) SS_DOWN(X_LSHIFT) SS_TAP(X_LEFT) SS_UP(X_LSHIFT) SS_UP(X_LALT)); - return false; - - case 3: // Line Select - SEND_STRING(SS_TAP(X_HOME) SS_DOWN(X_LSHIFT) SS_TAP(X_END) SS_UP(X_LSHIFT)); - return false; - - case 4: // Line Select Mac - SEND_STRING(SS_LCTRL("a") SS_DOWN(X_LSHIFT) SS_LCTRL("e") SS_UP(X_LSHIFT)); - return false; - - case 5: // Line Delete - SEND_STRING(SS_TAP(X_HOME) SS_DOWN(X_LSHIFT) SS_TAP(X_END) SS_UP(X_LSHIFT)); - SEND_STRING(SS_TAP(X_BSPACE)); - return false; - - case 6: // Line Delete Mac - SEND_STRING(SS_LCTRL("a") SS_DOWN(X_LSHIFT) SS_LCTRL("e") SS_UP(X_LSHIFT)); - SEND_STRING(SS_TAP(X_BSPACE)); - return false; - - case 7: // Duplicate Selection - SEND_STRING(SS_LCTRL("c") SS_TAP(X_RIGHT) SS_LCTRL("v")); - return false; - - case 8: // Duplicate Selection Mac - SEND_STRING(SS_LGUI("c") SS_TAP(X_RIGHT) SS_LGUI("v")); - return false; - - case 9: // Join line - SEND_STRING(SS_TAP(X_END) SS_TAP(X_DELETE)); - return false; - - case 10: // Join line Mac - SEND_STRING(SS_LCTRL("e") SS_TAP(X_DELETE)); - return false; - - case 98: // Print mode - SEND_STRING("PC"); - return false; - - case 99: // Print mode - SEND_STRING("OSX"); - return false; - } - } - return MACRO_NONE; -}; diff --git a/keyboards/jj40/keymaps/ajp10304/readme.md b/keyboards/jj40/keymaps/ajp10304/readme.md index 86286d1118ac..345fbccf60f1 100644 --- a/keyboards/jj40/keymaps/ajp10304/readme.md +++ b/keyboards/jj40/keymaps/ajp10304/readme.md @@ -1,11 +1,16 @@ # AJP10304 Custom JJ40 Layout -# Also available for the Atreus50 and Planck +# Also available for the Planck, Shark and Atreus50 **Note:** In the tables below where there are two characters on a key, the second is the output when shift is applied. **Note:** The below tables assume a UK layout. +#### Flashing +Use sleep to get a chance to get into boot mode. + +`make jj40:ajp10304:flash` + ##### Main Qwerty Layer * Tab: when held, operates as shift. @@ -43,13 +48,13 @@ Activated when `Lower` is held in the above `qwerty` layer. | Shift | \| | `¬ | #~ | '@ | -_ | =+ | #~ | [{ | ]} | '@ |Shift | | | | | |Lower | Del |Space | | Next | Vol- | Vol+ | Play | - ##### Raise Layer - Activated when `Raise` is held in the above `qwerty` layer. +##### Raise Layer +Activated when `Raise` is held in the above `qwerty` layer. - * Preferred layer for typing brackets. - * Allows for cursor navigation to be used solely with the right hand. - * WRDSEL: Select the word where the cursor is. - * |< and >|: Apply `ctrl` to `left` and `right` respectively for word jumping. +* Preferred layer for typing brackets. +* Allows for cursor navigation to be used solely with the right hand. +* WRDSEL: Select the word where the cursor is. +* |< and >|: Apply `ctrl` to `left` and `right` respectively for word jumping. | | | | | | | | | | | | | | :---: |:----:| :---:| :---:| :---:| :---:| :---: | :---:| :---:| :---:| :---: | :---:| @@ -98,11 +103,17 @@ Activated when `fn` and `raise` held together. | | | | | | | | | | | | | | :---: | :---:| :---:| :---:| :---:| :---:| :---:| :---:| :---:| :---:| :---:| :---:| -| ESC | | | | | | | | | | | | +| ESC | | | | | | | | BTN3 | | | | | ACC0 | ACC1 | ACC2 | | | | | BTN1 | UP | BTN2 | | | | ACC0 | ACC1 | ACC2 | | | | | LEFT | DOWN | RIGHT| | | | | | | | | | | | | | | | -####Manual Flashing of hex file -Use sleep to get a chance to get into boot mode. -`sleep 5; bootloadHID -r .build/jj40_ajp10304.hex` +##### Number Pad Layout +Activated when holding `Esc` key. + +| | | | | | | | | | | | | +| :---: | :---:| :---:| :---:| :---:| :---:| :---:| :---:| :---:| :---:| :---:| :---:| +| | | | | | |NMLOCK| 7 | 8 | 9 | / | | +| | | | | | | | 4 | 5 | 6 | * | | +| | | | | | | | 1 | 2 | 3 | + | | +| | | | | | | | 0 | . | , | - | | diff --git a/keyboards/planck/keymaps/ajp10304/readme.md b/keyboards/planck/keymaps/ajp10304/readme.md index 6573266db15e..6ea8f0061d41 100644 --- a/keyboards/planck/keymaps/ajp10304/readme.md +++ b/keyboards/planck/keymaps/ajp10304/readme.md @@ -1,14 +1,15 @@ # AJP10304 Custom Planck Layout -# Also available for the Atreus50 and JJ40 +# Also available for the Shark, JJ40 and Atreus50 **Note:** In the tables below where there are two characters on a key, the second is the output when shift is applied. **Note:** The below tables assume a UK layout. -####Flashing -Rev <=5: sudo make planck:ajp10304:dfu -Rev 6: sudo make planck/rev6:ajp10304:dfu-util +#### Flashing +Rev <=5: `make planck:ajp10304:flash` + +Rev 6: `make planck/rev6:ajp10304:flash` ##### Main Qwerty Layer @@ -47,13 +48,13 @@ Activated when `Lower` is held in the above `qwerty` layer. | Shift | \| | `¬ | #~ | '@ | -_ | =+ | #~ | [{ | ]} | '@ |Shift | | | | | |Lower | Del |Space | | Next | Vol- | Vol+ | Play | - ##### Raise Layer - Activated when `Raise` is held in the above `qwerty` layer. +##### Raise Layer +Activated when `Raise` is held in the above `qwerty` layer. - * Preferred layer for typing brackets. - * Allows for cursor navigation to be used solely with the right hand. - * WRDSEL: Select the word where the cursor is. - * |< and >|: Apply `ctrl` to `left` and `right` respectively for word jumping. +* Preferred layer for typing brackets. +* Allows for cursor navigation to be used solely with the right hand. +* WRDSEL: Select the word where the cursor is. +* |< and >|: Apply `ctrl` to `left` and `right` respectively for word jumping. | | | | | | | | | | | | | | :---: |:----:| :---:| :---:| :---:| :---:| :---: | :---:| :---:| :---:| :---: | :---:| @@ -102,7 +103,17 @@ Activated when `fn` and `raise` held together. | | | | | | | | | | | | | | :---: | :---:| :---:| :---:| :---:| :---:| :---:| :---:| :---:| :---:| :---:| :---:| -| ESC | | | | | | | | | | | | +| ESC | | | | | | | | BTN3 | | | | | ACC0 | ACC1 | ACC2 | | | | | BTN1 | UP | BTN2 | | | | ACC0 | ACC1 | ACC2 | | | | | LEFT | DOWN | RIGHT| | | | | | | | | | | | | | | | + +##### Number Pad Layout +Activated when holding `Esc` key. + +| | | | | | | | | | | | | +| :---: | :---:| :---:| :---:| :---:| :---:| :---:| :---:| :---:| :---:| :---:| :---:| +| | | | | | |NMLOCK| 7 | 8 | 9 | / | | +| | | | | | | | 4 | 5 | 6 | * | | +| | | | | | | | 1 | 2 | 3 | + | | +| | | | | | | | 0 | . | , | - | | diff --git a/keyboards/planck/keymaps/ajp10304/rules.mk b/keyboards/planck/keymaps/ajp10304/rules.mk deleted file mode 100644 index 4dee01cd5b13..000000000000 --- a/keyboards/planck/keymaps/ajp10304/rules.mk +++ /dev/null @@ -1,3 +0,0 @@ -AUDIO_ENABLE = no -MOUSEKEY_ENABLE = yes - diff --git a/keyboards/planck/keymaps/ajp10304/keymap.c b/layouts/community/ortho_4x12/ajp10304/keymap.c similarity index 55% rename from keyboards/planck/keymaps/ajp10304/keymap.c rename to layouts/community/ortho_4x12/ajp10304/keymap.c index 49346f7b958a..3badce2eafb6 100644 --- a/keyboards/planck/keymaps/ajp10304/keymap.c +++ b/layouts/community/ortho_4x12/ajp10304/keymap.c @@ -1,42 +1,6 @@ -#include "planck.h" -#include "action_layer.h" -#include "eeconfig.h" +#include "ajp10304.h" #include "keymap_uk.h" -extern keymap_config_t keymap_config; - -enum planck_layers { - _QWERTY, - _MAC, - _LOWER, - _MLWR, - _RAISE, - _MRSE, - _FUNC, - _MFNC, - _FUNC2, - _MFNC2, - _ADJUST, - _MOUSE -}; - -enum planck_keycodes { - QWERTY = SAFE_RANGE, - MAC, - FUNC, - MFNC, - FUNC2, - MFNC2, - LOWER, - MLWR, - RAISE, - MRSE, - MOUSE, - DYNAMIC_MACRO_RANGE -}; - -#include "dynamic_macro.h" - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Qwerty @@ -50,10 +14,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | Fn | Ctrl | Alt | GUI |Lower | Bksp |Space |Raise | Shift| MENU | Ctrl | Fn2 | * `-----------------------------------------------------------------------------------' */ -[_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, - MT(MOD_LSFT, KC_TAB), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, MT(MOD_RSFT, KC_ENT), - KC_LSHIFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSHIFT, +[_QWERTY] = LAYOUT_ortho_4x12( + LT(_NUMPAD, KC_ESC), KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC , + MT(MOD_LSFT, KC_TAB), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, MT(MOD_RSFT, KC_ENT) , + KC_LSHIFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSHIFT , MO(_FUNC), KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_BSPC, KC_SPC, RAISE, KC_LSHIFT, KC_BTN2, KC_RCTL, MO(_FUNC2) ), @@ -68,10 +32,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | Fn | Ctrl | Alt | GUI |Lower | Bksp |Space |Mouse | MENU | Alt | Ctrl | Fn | * `-----------------------------------------------------------------------------------' */ -[_FUNC] = 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_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, UK_TILD, KC_INSERT, - KC_LSHIFT, KC_NONUS_BSLASH, KC_GRAVE, KC_NONUS_HASH, KC_PAST, KC_MINS, KC_EQL, KC_BSLASH, KC_LBRC, KC_RBRC, KC_QUOT, MT(MOD_RSFT, KC_ENT), +[_FUNC] = 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, UK_TILD, KC_INSERT , + KC_LSHIFT, KC_NONUS_BSLASH, KC_GRAVE, KC_NONUS_HASH, KC_PAST, KC_MINS, KC_EQL, KC_BSLASH, KC_LBRC, KC_RBRC, KC_QUOT, MT(MOD_RSFT, KC_ENT) , _______, _______, _______, _______, _______, _______, _______, MO(_MOUSE), _______, _______, _______, _______ ), @@ -86,10 +50,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | |Lower | Del |Space | | Next | Vol- | Vol+ | Play | * `-----------------------------------------------------------------------------------' */ -[_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_DEL, KC_BSPC, - LSFT(KC_1), LSFT(KC_2), LSFT(KC_3), LSFT(KC_4), LSFT(KC_5), LSFT(KC_6), LSFT(KC_7), LSFT(KC_8), LSFT(KC_9), LSFT(KC_0), LCTL(KC_DEL), LCTL(KC_BSPC), - KC_LSPO, KC_NONUS_BSLASH, KC_GRAVE, KC_NONUS_HASH, KC_QUOT, KC_MINS, KC_EQL, KC_NONUS_HASH, KC_LBRC, KC_RBRC, KC_QUOT, MT(MOD_RSFT, KC_ENT), +[_LOWER] = LAYOUT_ortho_4x12( + KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL, KC_BSPC , + LSFT(KC_1), LSFT(KC_2), LSFT(KC_3), LSFT(KC_4), LSFT(KC_5), LSFT(KC_6), LSFT(KC_7), LSFT(KC_8), LSFT(KC_9), LSFT(KC_0), LCTL(KC_DEL), LCTL(KC_BSPC) , + KC_LSPO, KC_NONUS_BSLASH, KC_GRAVE, KC_NONUS_HASH, KC_QUOT, KC_MINS, KC_EQL, KC_NONUS_HASH, KC_LBRC, KC_RBRC, KC_QUOT, MT(MOD_RSFT, KC_ENT) , _______, _______, _______, _______, _______, KC_DEL, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY ), @@ -104,11 +68,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | Mouse| | | | | Alt | Enter|Raise | | | | | * `-----------------------------------------------------------------------------------' */ -[_RAISE] = LAYOUT_planck_grid( - KC_GRV, XXXXXXX, M(1), KC_LBRC, KC_RBRC, XXXXXXX, XXXXXXX, KC_PGUP, KC_HOME, KC_PGDOWN, XXXXXXX, KC_PSCREEN, - KC_GRV, XXXXXXX, XXXXXXX, LSFT(KC_9), LSFT(KC_0), XXXXXXX, XXXXXXX, KC_HOME, KC_UP, KC_END, XXXXXXX, LCTL(LSFT(KC_EQL)), - _______, XXXXXXX, XXXXXXX, LSFT(KC_LBRC), LSFT(KC_RBRC), XXXXXXX, LCTL(KC_LEFT), KC_LEFT, KC_DOWN, KC_RIGHT, LCTL(KC_RIGHT), LCTL(KC_MINS), - MO(_MOUSE), _______, _______, _______, _______, KC_LALT, KC_ENT, _______, XXXXXXX, _______, _______, _______ +[_RAISE] = LAYOUT_ortho_4x12( + KC_GRV, XXXXXXX, M_WORD_SEL, KC_LBRC, KC_RBRC, XXXXXXX, XXXXXXX, KC_PGUP, KC_HOME, KC_PGDOWN, XXXXXXX, KC_PSCREEN , + KC_GRV, XXXXXXX, XXXXXXX, LSFT(KC_9), LSFT(KC_0), XXXXXXX, XXXXXXX, KC_HOME, KC_UP, KC_END, XXXXXXX, LCTL(LSFT(KC_EQL)) , + _______, XXXXXXX, XXXXXXX, LSFT(KC_LBRC), LSFT(KC_RBRC), XXXXXXX, LCTL(KC_LEFT), KC_LEFT, KC_DOWN, KC_RIGHT, LCTL(KC_RIGHT), LCTL(KC_MINS) , + MO(_MOUSE), _______, _______, _______, _______, KC_LALT, KC_ENT, _______, XXXXXXX, _______, _______, _______ ), /* Adjust (Lower + Raise) @@ -122,16 +86,16 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | | | | | | * `-----------------------------------------------------------------------------------' */ -[_ADJUST] = LAYOUT_planck_grid( - M(0), RESET, QWERTY, _______, _______, DYN_REC_START1, DYN_REC_START2, _______, _______, _______, _______, KC_DEL, - KC_CAPS, _______, _______, _______, _______, DYN_MACRO_PLAY1, DYN_MACRO_PLAY2, KC_AUDIO_MUTE, KC_AUDIO_VOL_UP, KC_MEDIA_PLAY_PAUSE, _______, _______, - TG(_MAC), _______, _______, _______, _______, DYN_REC_STOP, DYN_REC_STOP, KC_MEDIA_PREV_TRACK, KC_AUDIO_VOL_DOWN, KC_MEDIA_NEXT_TRACK, _______, _______, +[_ADJUST] = LAYOUT_ortho_4x12( + M_CUSTOM, RESET, QWERTY, BL_ON, BL_OFF, DYN_REC_START1, DYN_REC_START2, _______, _______, _______, _______, KC_DEL , + KC_CAPS, RGB_TOG, RGB_MOD, RGB_VAD, RGB_VAI, DYN_MACRO_PLAY1, DYN_MACRO_PLAY2, KC_AUDIO_MUTE, KC_AUDIO_VOL_UP, KC_MEDIA_PLAY_PAUSE, _______, _______ , + TG(_MAC), RGB_HUD, RGB_HUI, RGB_SAD, RGB_SAI, DYN_REC_STOP, DYN_REC_STOP, KC_MEDIA_PREV_TRACK, KC_AUDIO_VOL_DOWN, KC_MEDIA_NEXT_TRACK, _______, _______ , _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ ), /* Mouse * ,-----------------------------------------------------------------------------------. - * | ESC | | | | | | | | | | | | + * | ESC | | | | | | | | BTN3 | | | | * |------+------+------+------+------+-------------+------+------+------+------+------| * | ACC0 | ACC1 | ACC2 | | | | | BTN1 | UP | BTN2 | | | * |------+------+------+------+------+------|------+------+------+------+------+------| @@ -140,13 +104,31 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | | | | | | | * `-----------------------------------------------------------------------------------' */ -[_MOUSE] = LAYOUT_planck_grid( - KC_ESC , _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, +[_MOUSE] = LAYOUT_ortho_4x12( + KC_ESC , _______, _______, _______, _______, _______, _______, _______, KC_MS_BTN3, _______, _______, _______, KC_MS_ACCEL0, KC_MS_ACCEL1, KC_MS_ACCEL2, _______, _______, _______, _______, KC_MS_BTN1, KC_MS_UP, KC_MS_BTN2, _______, _______, KC_MS_ACCEL0, KC_MS_ACCEL1, KC_MS_ACCEL2, _______, _______, _______, _______, KC_MS_LEFT, KC_MS_DOWN, KC_MS_RIGHT, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ ), +/* Num Pad + * ,-----------------------------------------------------------------------------------. + * | ESC | | | | | |NMLOCK| 7 | 8 | 9 | / | | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | | | | | | | 4 | 5 | 6 | * | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | | | | | | | 1 | 2 | 3 | + | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | | | | | | | 0 | . | , | - | | + * `-----------------------------------------------------------------------------------' + */ +[_NUMPAD] = LAYOUT_ortho_4x12( + _______, _______, _______, _______, _______, _______, KC_NLCK, KC_KP_7, KC_KP_8, KC_KP_9, KC_KP_SLASH, _______, + _______, _______, _______, _______, _______, _______, _______, KC_KP_4, KC_KP_5, KC_KP_6, KC_KP_ASTERISK, _______, + _______, _______, _______, _______, _______, _______, _______, KC_KP_1, KC_KP_2, KC_KP_3, KC_KP_PLUS, _______, + _______, _______, _______, _______, _______, _______, _______, KC_KP_0, KC_KP_DOT, KC_COMM, KC_KP_MINUS, _______ +), + /* Function 2 (Right hand side) * ,-----------------------------------------------------------------------------------. * | | |WRDSEL| | | | LNDEL| | | | | | @@ -158,187 +140,46 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | | | | | | | * `-----------------------------------------------------------------------------------' */ -[_FUNC2] = LAYOUT_planck_grid( - _______, _______, M(1), _______, _______, _______, M(5), _______, _______, _______, _______, _______, - _______, _______, M(3), M(7), _______, _______, _______, M(10), _______, _______, _______, _______, - _______, LCTL(KC_Z), LCTL(KC_X), LCTL(KC_C), LCTL(KC_V), _______, _______, _______, _______, _______, _______, M(98) , - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ +[_FUNC2] = LAYOUT_ortho_4x12( + _______, _______, M_WORD_SEL, _______, _______, _______, M_LINE_DEL, _______, _______, _______, _______, _______, + _______, _______, M_LINE_SEL, M_DUP, _______, _______, _______, M_JOIN, _______, _______, _______, _______, + _______, LCTL(KC_Z), LCTL(KC_X), LCTL(KC_C), LCTL(KC_V), _______, _______, _______, _______, _______, _______, M_MODE, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ ), -[_MAC] = LAYOUT_planck_grid( +[_MAC]= LAYOUT_ortho_4x12( _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, MFNC, _______, _______, _______, MLWR, _______, _______, MRSE, _______, _______, _______, MFNC2 ), -[_MLWR] = LAYOUT_planck_grid( +[_MLWR] = LAYOUT_ortho_4x12( _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ ), -[_MRSE] = LAYOUT_planck_grid( - _______, _______, M(2), _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, LCTL(KC_A), _______, LCTL(KC_E), _______, LGUI(KC_EQL), - _______, _______, _______, _______, _______, _______, LALT(KC_LEFT), _______, _______, _______, LALT(KC_RIGHT), LGUI(KC_MINS), - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ +[_MRSE] = LAYOUT_ortho_4x12( + _______, _______, M_WORD_SEL_MAC, _______, _______, _______, _______, _______, _______, _______, _______, _______ , + _______, _______, _______, _______, _______, _______, _______, LCTL(KC_A), _______, LCTL(KC_E), _______, LGUI(KC_EQL) , + _______, _______, _______, _______, _______, _______, LALT(KC_LEFT), _______, _______, _______, LALT(KC_RIGHT), LGUI(KC_MINS) , + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ ), -[_MFNC]= LAYOUT_planck_grid( - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, LGUI(KC_PENT), - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, +[_MFNC]= LAYOUT_ortho_4x12( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ , + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, LGUI(KC_PENT) , + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ , _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ ), -[_MFNC2] = LAYOUT_planck_grid( - _______, _______, M(2), _______, _______, _______, M(6), _______, _______, _______, _______, _______, - _______, _______, M(4), M(8), _______, _______, _______, M(10), _______, _______, _______, _______, - _______, LGUI(KC_Z), LGUI(KC_X), LGUI(KC_C), LGUI(KC_V), _______, _______, _______, _______, _______, _______, M(99) , - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ +[_MFNC2] = LAYOUT_ortho_4x12( + _______, _______, M_WORD_SEL_MAC, _______, _______, _______, M_LINE_DEL_MAC, _______, _______, _______, _______, _______, + _______, _______, M_LINE_SEL_MAC, M_DUP_MAC, _______, _______, _______, M_JOIN_MAC, _______, _______, _______, _______, + _______, LGUI(KC_Z), LGUI(KC_X), LGUI(KC_C), LGUI(KC_V), _______, _______, _______, _______, _______, _______, M_MODE_MAC, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ ) }; - -void persistant_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) { - - if (!process_record_dynamic_macro(keycode, record)) { - return false; - } - - switch (keycode) { - case QWERTY: - if (record->event.pressed) { - persistant_default_layer_set(1UL<<_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 MLWR: - if (record->event.pressed) { - layer_on(_LOWER); - layer_on(_MLWR); - update_tri_layer(_LOWER, _RAISE, _ADJUST); - } else { - layer_off(_LOWER); - layer_off(_MLWR); - update_tri_layer(_LOWER, _RAISE, _ADJUST); - } - return false; - case MRSE: - if (record->event.pressed) { - layer_on(_RAISE); - layer_on(_MRSE); - update_tri_layer(_LOWER, _RAISE, _ADJUST); - } else { - layer_off(_RAISE); - layer_off(_MRSE); - update_tri_layer(_LOWER, _RAISE, _ADJUST); - } - return false; - case MFNC: - if (record->event.pressed) { - layer_on(_FUNC); - layer_on(_MFNC); - } else { - layer_off(_FUNC); - layer_off(_MFNC); - } - return false; - case MFNC2: - if (record->event.pressed) { - layer_on(_FUNC2); - layer_on(_MFNC2); - } else { - layer_off(_FUNC2); - layer_off(_MFNC2); - } - return false; - } - return true; -} - -const macro_t *action_get_macro(keyrecord_t *record, uint8_t keycode, uint8_t opt) { - // These would trigger when you hit a key mapped as M(0) - if (record->event.pressed) { - switch(keycode) { - case 0: // Some custom string here - SEND_STRING(""); - return false; - - case 1: // Word Select - SEND_STRING(SS_DOWN(X_LCTRL) SS_TAP(X_RIGHT) SS_DOWN(X_LSHIFT) SS_TAP(X_LEFT) SS_UP(X_LSHIFT) SS_UP(X_LCTRL)); - return false; - - case 2: // Word Select Mac - SEND_STRING(SS_DOWN(X_LALT) SS_TAP(X_RIGHT) SS_DOWN(X_LSHIFT) SS_TAP(X_LEFT) SS_UP(X_LSHIFT) SS_UP(X_LALT)); - return false; - - case 3: // Line Select - SEND_STRING(SS_TAP(X_HOME) SS_DOWN(X_LSHIFT) SS_TAP(X_END) SS_UP(X_LSHIFT)); - return false; - - case 4: // Line Select Mac - SEND_STRING(SS_LCTRL("a") SS_DOWN(X_LSHIFT) SS_LCTRL("e") SS_UP(X_LSHIFT)); - return false; - - case 5: // Line Delete - SEND_STRING(SS_TAP(X_HOME) SS_DOWN(X_LSHIFT) SS_TAP(X_END) SS_UP(X_LSHIFT)); - SEND_STRING(SS_TAP(X_BSPACE)); - return false; - - case 6: // Line Delete Mac - SEND_STRING(SS_LCTRL("a") SS_DOWN(X_LSHIFT) SS_LCTRL("e") SS_UP(X_LSHIFT)); - SEND_STRING(SS_TAP(X_BSPACE)); - return false; - - case 7: // Duplicate Selection - SEND_STRING(SS_LCTRL("c") SS_TAP(X_RIGHT) SS_LCTRL("v")); - return false; - - case 8: // Duplicate Selection Mac - SEND_STRING(SS_LGUI("c") SS_TAP(X_RIGHT) SS_LGUI("v")); - return false; - - case 9: // Join line - SEND_STRING(SS_TAP(X_END) SS_TAP(X_DELETE)); - return false; - - case 10: // Join line Mac - SEND_STRING(SS_LCTRL("e") SS_TAP(X_DELETE)); - return false; - - case 98: // Print mode - SEND_STRING("PC"); - return false; - - case 99: // Print mode - SEND_STRING("OSX"); - return false; - } - } - return MACRO_NONE; -}; diff --git a/layouts/community/ortho_4x12/ajp10304/readme.md b/layouts/community/ortho_4x12/ajp10304/readme.md new file mode 100644 index 000000000000..6f2330f9437b --- /dev/null +++ b/layouts/community/ortho_4x12/ajp10304/readme.md @@ -0,0 +1,117 @@ +# AJP10304 Ortho 4x12 Layout +# For Planck, Shark, JJ40 and Atreus50 + +**Note:** In the tables below where there are two characters on a key, +the second is the output when shift is applied. + +**Note:** The below tables assume a UK layout. + +#### Flashing +Refer to the README.md of the keyboard you want to flash. + +##### Main Qwerty Layer + +* Tab: when held, operates as shift. +* Enter: when held, operates as shift. +* MENU: perform right-click + +| | | | | | | | | | | | | +| ---- |:----:| :---:| :---:| :---:| :---:| :---:| :---:| :---:| :---:| :---:| ----:| +| Esc | Q | W | E | R | T | Y | U | I | O | P | Bksp | +| Tab | A | S | D | F | G | H | J | K | L | ;: | Enter| +| Shft | Z | X | C | V | B | N | M | ,< | .> | /? | Shft | +| Fn | Ctrl | Alt | GUI |Lower | Bksp |Space |Raise | Shift| MENU | Ctrl | Fn2 | + +##### Function Layer +Activated when `fn` held in the above `qwerty` layer. + +| | | | | | | | | | | | | +| :---: |:----:| :---:| :---:| :---:| :---:| :---:| :---:| :---:| :---:| :---:| :---:| +| F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | +| 1! | 2" | 3£ | 4$ | 5% | 6^ | 7& | 8* | 9( | 0) | ~ |INSERT| +| Shift | \| | `¬ | #~ | * | -_ | =+ | \| | [{ | ]} | '@ |Shift | +| Fn | Ctrl | Alt | GUI |Lower | Bksp |Space |Mouse | MENU | Alt | Ctrl | Fn2 | + +##### Lower Layer +Activated when `Lower` is held in the above `qwerty` layer. + +* Numbers are along the top row, their shifted counterparts are on row 2. +* WrdBks: `backspace` with `ctrl` applied. I.e. delete a word. +* WrdDel: `delete` with `ctrl` applied. I.e. forward delete a word. + +| | | | | | | | | | | | | +| :---: |:----:| :---:| :---:| :---:| :---:| :---:| :---:| :---:| :---:| :---:| :---:| +| 1! | 2" | 3£ | 4$ | 5% | 6^ | 7& | 8* | 9( | 0) | DEL | Bksp | +| ! | " | £ | $ | % | ^ | & | * | ( | ) |WrdDel|WrdBks| +| Shift | \| | `¬ | #~ | '@ | -_ | =+ | #~ | [{ | ]} | '@ |Shift | +| | | | |Lower | Del |Space | | Next | Vol- | Vol+ | Play | + +##### Raise Layer +Activated when `Raise` is held in the above `qwerty` layer. + +* Preferred layer for typing brackets. +* Allows for cursor navigation to be used solely with the right hand. +* WRDSEL: Select the word where the cursor is. +* |< and >|: Apply `ctrl` to `left` and `right` respectively for word jumping. + +| | | | | | | | | | | | | +| :---: |:----:| :---:| :---:| :---:| :---:| :---: | :---:| :---:| :---:| :---: | :---:| +| ` | |WRDSEL| [ | ] | | | PGUP | HOME |PGDOWN| |PRNTSC| +| ` | | | ( | ) | | | HOME | UP | END | |ZOOM +| +| | | | { | } | ||<| LEFT | DOWN |RIGHT |>||ZOOM -| +| Mouse | | | | | Alt | Enter |Raise | | | | | + +##### Lower + Raise +Activated when `Lower` and `Raise` are held together in the above `qwerty` layer. + +* Audio controls in the same position as cursor keys from the `Raise` layer. +* ????: Runs a macro for outputting a text string. Do not use this store passwords. +* Reset: Enter bootloader for flashing firmware to the keyboard. +* CAPS: Toggle caps lock. +* Macro functions: Allows recording of macros. To start recording the macro, press either REC1 or REC2. +To finish the recording, press STOP. To replay the macro, press either PLAY1 or PLAY2. +* MAC: Toggle MAC OS extensions to layers. This allows MLWR to be enabled with LOWER, +MRSE with RAISE, MFNC with FUNC and MFNC2 with FUNC2 respectively. + +| | | | | | | | | | | | | +| :---: |:----:| :---:| :---:| :---:| :---:| :---:| :---:| :---:| :---:| :---:| :---:| +| ???? | Reset|Qwerty| | | REC1 | REC2 | | | | | Del | +| CAPS | | | | | PLAY1|PLAY2 | Mute | Vol+ | Play | | | +| MAC | | | | | STOP1|STOP2 | Prev | Vol- | Next | | | +| | | | | | | | | DYN | | | | + +##### Function 2 Layer +Activated when `fn` held in the above `qwerty` layer. +* WRDSEL: Select the word where the cursor is. +* LNDEL: Delete the line where the cursor is. +* LNSEL: Select the line where the cursor is. +* DUP: Duplicate the selected text. +* LNJOIN: Join the line where the cursor is with the following line. +* MODE: Print either `PC` or `OSX` depending on what layer mode is active. + +| | | | | | | | | | | | | +| :---: | :---:| :---:| :---:| :---:| :---:| :---:| :---:| :---:| :---:| :---:| :---:| +| | |WRDSEL| | | | LNDEL| | | | | | +| | | LNSEL| DUP | | | | |LNJOIN| | | | +| | UNDO | CUT | COPY | PASTE| | | | | | | MODE | +| | | | | | | | | | | | | + +##### Mouse Layer +Activated when `fn` and `raise` held together. + +| | | | | | | | | | | | | +| :---: | :---:| :---:| :---:| :---:| :---:| :---:| :---:| :---:| :---:| :---:| :---:| +| ESC | | | | | | | | BTN3 | | | | +| ACC0 | ACC1 | ACC2 | | | | | BTN1 | UP | BTN2 | | | +| ACC0 | ACC1 | ACC2 | | | | | LEFT | DOWN | RIGHT| | | +| | | | | | | | | | | | | + +##### Number Pad Layout +Activated when holding `Esc` key. + +| | | | | | | | | | | | | +| :---: | :---:| :---:| :---:| :---:| :---:| :---:| :---:| :---:| :---:| :---:| :---:| +| | | | | | |NMLOCK| 7 | 8 | 9 | / | | +| | | | | | | | 4 | 5 | 6 | * | | +| | | | | | | | 1 | 2 | 3 | + | | +| | | | | | | | 0 | . | , | - | | diff --git a/keyboards/jj40/keymaps/ajp10304/rules.mk b/layouts/community/ortho_4x12/ajp10304/rules.mk similarity index 59% rename from keyboards/jj40/keymaps/ajp10304/rules.mk rename to layouts/community/ortho_4x12/ajp10304/rules.mk index 4dee01cd5b13..ebe923c9b331 100644 --- a/keyboards/jj40/keymaps/ajp10304/rules.mk +++ b/layouts/community/ortho_4x12/ajp10304/rules.mk @@ -1,3 +1,3 @@ AUDIO_ENABLE = no MOUSEKEY_ENABLE = yes - +DYNAMIC_MACRO_ENABLE = yes diff --git a/users/ajp10304/ajp10304.c b/users/ajp10304/ajp10304.c new file mode 100644 index 000000000000..9cae65d5cfd3 --- /dev/null +++ b/users/ajp10304/ajp10304.c @@ -0,0 +1,154 @@ +#include "ajp10304.h" + +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 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 MLWR: + if (record->event.pressed) { + layer_on(_LOWER); + layer_on(_MLWR); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } else { + layer_off(_LOWER); + layer_off(_MLWR); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } + return false; + case MRSE: + if (record->event.pressed) { + layer_on(_RAISE); + layer_on(_MRSE); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } else { + layer_off(_RAISE); + layer_off(_MRSE); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } + return false; + case MFNC: + if (record->event.pressed) { + layer_on(_FUNC); + layer_on(_MFNC); + } else { + layer_off(_FUNC); + layer_off(_MFNC); + } + return false; + case MFNC2: + if (record->event.pressed) { + layer_on(_FUNC2); + layer_on(_MFNC2); + } else { + layer_off(_FUNC2); + layer_off(_MFNC2); + } + return false; + case M_CUSTOM: + if (record->event.pressed) { + SEND_STRING("Custom text here"); + } + break; + case M_WORD_SEL: + if (record->event.pressed) { + register_mods(MOD_LCTL); + tap_code(KC_RGHT); + tap_code16(S(KC_LEFT)); + unregister_mods(MOD_LCTL); + } + break; + case M_WORD_SEL_MAC: + if (record->event.pressed) { + register_mods(MOD_LALT); + tap_code(KC_RGHT); + tap_code16(S(KC_LEFT)); + unregister_mods(MOD_LALT); + } + break; + case M_LINE_SEL: + if (record->event.pressed) { + tap_code(KC_HOME); + tap_code16(S(KC_END)); + } + break; + case M_LINE_SEL_MAC: + if (record->event.pressed) { + tap_code16(C(KC_A)); + tap_code16(C(S(KC_E))); + } + break; + case M_LINE_DEL: + if (record->event.pressed) { + tap_code(KC_HOME); + tap_code16(S(KC_END)); + tap_code(KC_BSPC); + } + break; + case M_LINE_DEL_MAC: + if (record->event.pressed) { + tap_code16(C(KC_A)); + tap_code16(C(S(KC_E))); + tap_code(KC_BSPC); + } + break; + case M_DUP: + if (record->event.pressed) { + tap_code16(C(KC_C)); + tap_code(KC_RGHT); + tap_code16(C(KC_V)); + } + break; + case M_DUP_MAC: + if (record->event.pressed) { + tap_code16(G(KC_C)); + tap_code(KC_RGHT); + tap_code16(G(KC_V)); + } + break; + case M_JOIN: + if (record->event.pressed) { + tap_code(KC_END); + tap_code(KC_DEL); + } + break; + case M_JOIN_MAC: + if (record->event.pressed) { + tap_code16(C(KC_E)); + tap_code(KC_DEL); + } + break; + case M_MODE: + if (record->event.pressed) { + SEND_STRING("PC"); + } + break; + case M_MODE_MAC: + if (record->event.pressed) { + SEND_STRING("OSX"); + } + break; + } + return true; +} diff --git a/users/ajp10304/ajp10304.h b/users/ajp10304/ajp10304.h new file mode 100644 index 000000000000..b96e00fc4e5a --- /dev/null +++ b/users/ajp10304/ajp10304.h @@ -0,0 +1,45 @@ +#include QMK_KEYBOARD_H + +enum ajp10304_layers { + _QWERTY, + _MAC, + _LOWER, + _MLWR, + _RAISE, + _MRSE, + _FUNC, + _MFNC, + _FUNC2, + _MFNC2, + _ADJUST, + _MOUSE, + _NUMPAD +}; + +enum ajp10304_keycodes { + QWERTY = SAFE_RANGE, + MAC, + FUNC, + MFNC, + FUNC2, + MFNC2, + LOWER, + MLWR, + RAISE, + MRSE, + MOUSE, + NUMPAD, + M_CUSTOM, + M_WORD_SEL, + M_WORD_SEL_MAC, + M_LINE_SEL, + M_LINE_SEL_MAC, + M_LINE_DEL, + M_LINE_DEL_MAC, + M_DUP, + M_DUP_MAC, + M_JOIN, + M_JOIN_MAC, + M_MODE, + M_MODE_MAC +}; diff --git a/users/ajp10304/readme.md b/users/ajp10304/readme.md new file mode 100644 index 000000000000..8e1a438aa850 --- /dev/null +++ b/users/ajp10304/readme.md @@ -0,0 +1,132 @@ +Copyright 2020 Alan Pocklington @ajp10304 + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . + +# AJP10304 Custom 40% Layout +# For the Planck, Shark, JJ40 and Atreus50 + +**Note:** In the tables below where there are two characters on a key, +the second is the output when shift is applied. + +**Note:** The below tables assume a UK layout. + +#### Flashing +Refer to the README.md of the keyboard you want to flash. + +##### Main Qwerty Layer + +* Tab: when held, operates as shift. +* Enter: when held, operates as shift. +* MENU: perform right-click + +| | | | | | | | | | | | | +| ---- |:----:| :---:| :---:| :---:| :---:| :---:| :---:| :---:| :---:| :---:| ----:| +| Esc | Q | W | E | R | T | Y | U | I | O | P | Bksp | +| Tab | A | S | D | F | G | H | J | K | L | ;: | Enter| +| Shft | Z | X | C | V | B | N | M | ,< | .> | /? | Shft | +| Fn | Ctrl | Alt | GUI |Lower | Bksp |Space |Raise | Shift| MENU | Ctrl | Fn2 | + +##### Function Layer +Activated when `fn` held in the above `qwerty` layer. + +| | | | | | | | | | | | | +| :---: |:----:| :---:| :---:| :---:| :---:| :---:| :---:| :---:| :---:| :---:| :---:| +| F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | +| 1! | 2" | 3£ | 4$ | 5% | 6^ | 7& | 8* | 9( | 0) | ~ |INSERT| +| Shift | \| | `¬ | #~ | * | -_ | =+ | \| | [{ | ]} | '@ |Shift | +| Fn | Ctrl | Alt | GUI |Lower | Bksp |Space |Mouse | MENU | Alt | Ctrl | Fn2 | + +##### Lower Layer +Activated when `Lower` is held in the above `qwerty` layer. + +* Numbers are along the top row, their shifted counterparts are on row 2. +* WrdBks: `backspace` with `ctrl` applied. I.e. delete a word. +* WrdDel: `delete` with `ctrl` applied. I.e. forward delete a word. + +| | | | | | | | | | | | | +| :---: |:----:| :---:| :---:| :---:| :---:| :---:| :---:| :---:| :---:| :---:| :---:| +| 1! | 2" | 3£ | 4$ | 5% | 6^ | 7& | 8* | 9( | 0) | DEL | Bksp | +| ! | " | £ | $ | % | ^ | & | * | ( | ) |WrdDel|WrdBks| +| Shift | \| | `¬ | #~ | '@ | -_ | =+ | #~ | [{ | ]} | '@ |Shift | +| | | | |Lower | Del |Space | | Next | Vol- | Vol+ | Play | + +##### Raise Layer +Activated when `Raise` is held in the above `qwerty` layer. + +* Preferred layer for typing brackets. +* Allows for cursor navigation to be used solely with the right hand. +* WRDSEL: Select the word where the cursor is. +* |< and >|: Apply `ctrl` to `left` and `right` respectively for word jumping. + +| | | | | | | | | | | | | +| :---: |:----:| :---:| :---:| :---:| :---:| :---: | :---:| :---:| :---:| :---: | :---:| +| ` | |WRDSEL| [ | ] | | | PGUP | HOME |PGDOWN| |PRNTSC| +| ` | | | ( | ) | | | HOME | UP | END | |ZOOM +| +| | | | { | } | ||<| LEFT | DOWN |RIGHT |>||ZOOM -| +| Mouse | | | | | Alt | Enter |Raise | | | | | + +##### Lower + Raise +Activated when `Lower` and `Raise` are held together in the above `qwerty` layer. + +* Audio controls in the same position as cursor keys from the `Raise` layer. +* ????: Runs a macro for outputting a text string. Do not use this store passwords. +* Reset: Enter bootloader for flashing firmware to the keyboard. +* CAPS: Toggle caps lock. +* Macro functions: Allows recording of macros. To start recording the macro, press either REC1 or REC2. +To finish the recording, press STOP. To replay the macro, press either PLAY1 or PLAY2. +* MAC: Toggle MAC OS extensions to layers. This allows MLWR to be enabled with LOWER, +MRSE with RAISE, MFNC with FUNC and MFNC2 with FUNC2 respectively. + +| | | | | | | | | | | | | +| :---: |:----:| :---:| :---:| :---:| :---:| :---:| :---:| :---:| :---:| :---:| :---:| +| ???? | Reset|Qwerty| | | REC1 | REC2 | | | | | Del | +| CAPS | | | | | PLAY1|PLAY2 | Mute | Vol+ | Play | | | +| MAC | | | | | STOP1|STOP2 | Prev | Vol- | Next | | | +| | | | | | | | | DYN | | | | + +##### Function 2 Layer +Activated when `fn` held in the above `qwerty` layer. +* WRDSEL: Select the word where the cursor is. +* LNDEL: Delete the line where the cursor is. +* LNSEL: Select the line where the cursor is. +* DUP: Duplicate the selected text. +* LNJOIN: Join the line where the cursor is with the following line. +* MODE: Print either `PC` or `OSX` depending on what layer mode is active. + +| | | | | | | | | | | | | +| :---: | :---:| :---:| :---:| :---:| :---:| :---:| :---:| :---:| :---:| :---:| :---:| +| | |WRDSEL| | | | LNDEL| | | | | | +| | | LNSEL| DUP | | | | |LNJOIN| | | | +| | UNDO | CUT | COPY | PASTE| | | | | | | MODE | +| | | | | | | | | | | | | + +##### Mouse Layer +Activated when `fn` and `raise` held together. + +| | | | | | | | | | | | | +| :---: | :---:| :---:| :---:| :---:| :---:| :---:| :---:| :---:| :---:| :---:| :---:| +| ESC | | | | | | | | BTN3 | | | | +| ACC0 | ACC1 | ACC2 | | | | | BTN1 | UP | BTN2 | | | +| ACC0 | ACC1 | ACC2 | | | | | LEFT | DOWN | RIGHT| | | +| | | | | | | | | | | | | + +##### Number Pad Layout +Activated when holding `Esc` key. + +| | | | | | | | | | | | | +| :---: | :---:| :---:| :---:| :---:| :---:| :---:| :---:| :---:| :---:| :---:| :---:| +| | | | | | |NMLOCK| 7 | 8 | 9 | / | | +| | | | | | | | 4 | 5 | 6 | * | | +| | | | | | | | 1 | 2 | 3 | + | | +| | | | | | | | 0 | . | , | - | | diff --git a/users/ajp10304/rules.mk b/users/ajp10304/rules.mk new file mode 100644 index 000000000000..5ae7f651e8f8 --- /dev/null +++ b/users/ajp10304/rules.mk @@ -0,0 +1 @@ +SRC += ajp10304.c From 9947f1051d66fd4f6d1db290dfdca49f70ae3820 Mon Sep 17 00:00:00 2001 From: Naoto Takai Date: Fri, 10 Jul 2020 04:21:22 +0900 Subject: [PATCH 355/930] Update Nomu30 keyboard (#9599) Co-authored-by: Joel Challis Co-authored-by: Ryan Co-authored-by: Erovia --- keyboards/nomu30/config.h | 29 +++++------------ keyboards/nomu30/keymaps/via/keymap.c | 40 +++++++++++++++++++++++ keyboards/nomu30/keymaps/via/rules.mk | 2 ++ keyboards/nomu30/nomu30.h | 24 +++----------- keyboards/nomu30/rev1/config.h | 35 ++++++++++++++++++++ keyboards/nomu30/rev1/rev1.c | 17 ++++++++++ keyboards/nomu30/rev1/rev1.h | 19 +++++++++++ keyboards/nomu30/rev1/rules.mk | 32 ++++++++++++++++++ keyboards/nomu30/rev2/config.h | 47 +++++++++++++++++++++++++++ keyboards/nomu30/rev2/rev2.c | 17 ++++++++++ keyboards/nomu30/rev2/rev2.h | 19 +++++++++++ keyboards/nomu30/rev2/rules.mk | 31 ++++++++++++++++++ keyboards/nomu30/rules.mk | 34 +------------------ 13 files changed, 273 insertions(+), 73 deletions(-) create mode 100644 keyboards/nomu30/keymaps/via/keymap.c create mode 100644 keyboards/nomu30/keymaps/via/rules.mk create mode 100644 keyboards/nomu30/rev1/config.h create mode 100644 keyboards/nomu30/rev1/rev1.c create mode 100644 keyboards/nomu30/rev1/rev1.h create mode 100644 keyboards/nomu30/rev1/rules.mk create mode 100644 keyboards/nomu30/rev2/config.h create mode 100644 keyboards/nomu30/rev2/rev2.c create mode 100644 keyboards/nomu30/rev2/rev2.h create mode 100644 keyboards/nomu30/rev2/rules.mk diff --git a/keyboards/nomu30/config.h b/keyboards/nomu30/config.h index 13fae5af3aa0..bde8fa8dabe8 100644 --- a/keyboards/nomu30/config.h +++ b/keyboards/nomu30/config.h @@ -20,30 +20,17 @@ along with this program. If not, see . #include "config_common.h" /* USB Device descriptor parameter */ -#define VENDOR_ID 0xC0C0 -#define PRODUCT_ID 0x3000 +#define VENDOR_ID 0x524B // recompile keys +#define PRODUCT_ID 0x4E31 // Nomu30 #define DEVICE_VER 0x0001 -#define MANUFACTURER Naoto Takai -#define PRODUCT nomu30 -#define DESCRIPTION A 30% keyboard with ISO enter. +#define MANUFACTURER recompile keys +#define PRODUCT Nomu30 +#define DESCRIPTION recompile keys Nomu30 /* key matrix size */ #define MATRIX_ROWS 3 #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, D0, D4 } -#define MATRIX_COL_PINS { C6, D7, E6, B4, F4, F5, F6, F7, B1, B3, B2, B6 } -#define UNUSED_PINS - -/* COL2ROW, ROW2COL*/ -#define DIODE_DIRECTION COL2ROW +/* Bootmagic Lite key configuration */ +#define BOOTMAGIC_LITE_ROW 0 +#define BOOTMAGIC_LITE_COLUMN 11 diff --git a/keyboards/nomu30/keymaps/via/keymap.c b/keyboards/nomu30/keymaps/via/keymap.c new file mode 100644 index 000000000000..e732c1f63e08 --- /dev/null +++ b/keyboards/nomu30/keymaps/via/keymap.c @@ -0,0 +1,40 @@ +/* Copyright 2019 Naoto Takai + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public 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_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_SPC + ), + [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, KC_TRNS, KC_TRNS, 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 + ), + [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 + ) +}; diff --git a/keyboards/nomu30/keymaps/via/rules.mk b/keyboards/nomu30/keymaps/via/rules.mk new file mode 100644 index 000000000000..36b7ba9cbc98 --- /dev/null +++ b/keyboards/nomu30/keymaps/via/rules.mk @@ -0,0 +1,2 @@ +VIA_ENABLE = yes +LTO_ENABLE = yes diff --git a/keyboards/nomu30/nomu30.h b/keyboards/nomu30/nomu30.h index e6c553bec528..cf724ac6e4c9 100644 --- a/keyboards/nomu30/nomu30.h +++ b/keyboards/nomu30/nomu30.h @@ -16,15 +16,12 @@ #pragma once #include "quantum.h" +#ifdef KEYBOARD_nomu30_rev1 + #include "rev1.h" +#elif KEYBOARD_nomu30_rev2 + #include "rev2.h" +#endif -/* 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( \ K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, \ K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, \ @@ -35,14 +32,3 @@ { K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, KC_NO }, \ { K200, K201, K202, K203, K204, K205, K206, K207, K208, KC_NO, KC_NO, KC_NO }, \ } - -#define LAYOUT_kc( \ - K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, \ - K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, \ - K200, K201, K202, K203, K204, K205, K206, K207, K208 \ -) \ -LAYOUT( \ - KC_##K001, KC_##K002, KC_##K003, KC_##K004, KC_##K005, KC_##K006, KC_##K007, KC_##K008, KC_##K009, KC_##K010, KC_##K011, \ - KC_##K100, KC_##K101, KC_##K102, KC_##K103, KC_##K104, KC_##K105, KC_##K106, KC_##K107, KC_##K108, KC_##K109, KC_##K110, \ - KC_##K200, KC_##K201, KC_##K202, KC_##K203, KC_##K204, KC_##K205, KC_##K206, KC_##K207, KC_##K208 \ -) diff --git a/keyboards/nomu30/rev1/config.h b/keyboards/nomu30/rev1/config.h new file mode 100644 index 000000000000..718c840bd6b3 --- /dev/null +++ b/keyboards/nomu30/rev1/config.h @@ -0,0 +1,35 @@ +/* +Copyright 2019 Naoto Takai + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#pragma once + +/* + * 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, D0, D4 } +#define MATRIX_COL_PINS { C6, D7, E6, B4, F4, F5, F6, F7, B1, B3, B2, B6 } +#define UNUSED_PINS + +/* COL2ROW, ROW2COL*/ +#define DIODE_DIRECTION COL2ROW diff --git a/keyboards/nomu30/rev1/rev1.c b/keyboards/nomu30/rev1/rev1.c new file mode 100644 index 000000000000..8adf9859f89c --- /dev/null +++ b/keyboards/nomu30/rev1/rev1.c @@ -0,0 +1,17 @@ +/* Copyright 2020 Naoto Takai + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public 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/nomu30/rev1/rev1.h b/keyboards/nomu30/rev1/rev1.h new file mode 100644 index 000000000000..fa161f267e1c --- /dev/null +++ b/keyboards/nomu30/rev1/rev1.h @@ -0,0 +1,19 @@ +/* Copyright 2020 Naoto Takai + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License 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" diff --git a/keyboards/nomu30/rev1/rules.mk b/keyboards/nomu30/rev1/rules.mk new file mode 100644 index 000000000000..3c82bca2463f --- /dev/null +++ b/keyboards/nomu30/rev1/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 = 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 +AUDIO_ENABLE = no # Audio output +FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches diff --git a/keyboards/nomu30/rev2/config.h b/keyboards/nomu30/rev2/config.h new file mode 100644 index 000000000000..de9b37ec26c4 --- /dev/null +++ b/keyboards/nomu30/rev2/config.h @@ -0,0 +1,47 @@ +/* +Copyright 2020 Naoto Takai + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#pragma once + +/* + * 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 { B2, B1, B0 } +#define MATRIX_COL_PINS { C4, C5, C6, C7, B7, B6, B5, B4, B3, D5, D4, D3 } +#define UNUSED_PINS { C2, D0, D1, D2, D6 } + +/* 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 + +/* disable these deprecated features by default */ +#define NO_ACTION_MACRO +#define NO_ACTION_FUNCTION diff --git a/keyboards/nomu30/rev2/rev2.c b/keyboards/nomu30/rev2/rev2.c new file mode 100644 index 000000000000..5eabb33ac6d2 --- /dev/null +++ b/keyboards/nomu30/rev2/rev2.c @@ -0,0 +1,17 @@ +/* Copyright 2020 Naoto Takai + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#include "rev2.h" diff --git a/keyboards/nomu30/rev2/rev2.h b/keyboards/nomu30/rev2/rev2.h new file mode 100644 index 000000000000..fa161f267e1c --- /dev/null +++ b/keyboards/nomu30/rev2/rev2.h @@ -0,0 +1,19 @@ +/* Copyright 2020 Naoto Takai + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License 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" diff --git a/keyboards/nomu30/rev2/rules.mk b/keyboards/nomu30/rev2/rules.mk new file mode 100644 index 000000000000..bea3a54d18b0 --- /dev/null +++ b/keyboards/nomu30/rev2/rules.mk @@ -0,0 +1,31 @@ +# 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 +AUDIO_ENABLE = no # Audio output +FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches diff --git a/keyboards/nomu30/rules.mk b/keyboards/nomu30/rules.mk index 4b7193da4950..8a7395940705 100644 --- a/keyboards/nomu30/rules.mk +++ b/keyboards/nomu30/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 = 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 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 +DEFAULT_FOLDER = nomu30/rev1 From 823165b9b784feda7546daa83ded9afe0e35ee6f Mon Sep 17 00:00:00 2001 From: Danilo de Klerk Date: Thu, 9 Jul 2020 23:19:16 +0200 Subject: [PATCH 356/930] split_3x6_3 layout support (#9625) --- keyboards/centromere/centromere.h | 2 ++ keyboards/centromere/rules.mk | 2 ++ keyboards/crkbd/rev1/rev1.h | 2 ++ keyboards/crkbd/rev1/rules.mk | 2 ++ 4 files changed, 8 insertions(+) diff --git a/keyboards/centromere/centromere.h b/keyboards/centromere/centromere.h index 826e8dde4481..d07a53b1ac03 100644 --- a/keyboards/centromere/centromere.h +++ b/keyboards/centromere/centromere.h @@ -45,3 +45,5 @@ { 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 } \ } + +#define LAYOUT_split_3x6_3 LAYOUT diff --git a/keyboards/centromere/rules.mk b/keyboards/centromere/rules.mk index fee99d363059..866c33138c95 100644 --- a/keyboards/centromere/rules.mk +++ b/keyboards/centromere/rules.mk @@ -40,3 +40,5 @@ OPT_DEFS += -DCENTROMERE_PROMICRO # # project specific files SRC = matrix.c + +LAYOUTS = split_3x6_3 diff --git a/keyboards/crkbd/rev1/rev1.h b/keyboards/crkbd/rev1/rev1.h index 5e90de72a3a1..6580d73fe31c 100644 --- a/keyboards/crkbd/rev1/rev1.h +++ b/keyboards/crkbd/rev1/rev1.h @@ -52,3 +52,5 @@ KC_##L30, KC_##L31, KC_##L32, KC_##R30, KC_##R31, KC_##R32 \ ) // clang-format on + +#define LAYOUT_split_3x6_3 LAYOUT diff --git a/keyboards/crkbd/rev1/rules.mk b/keyboards/crkbd/rev1/rules.mk index ab9bed09c0a2..a921e60308b0 100644 --- a/keyboards/crkbd/rev1/rules.mk +++ b/keyboards/crkbd/rev1/rules.mk @@ -1,3 +1,5 @@ SRC += matrix.c \ split_util.c \ split_scomm.c + +LAYOUTS = split_3x6_3 From c50009d5d4909d55f5511378ba5bf0b4623a0a1c Mon Sep 17 00:00:00 2001 From: Callum Oakley Date: Fri, 10 Jul 2020 02:31:18 +0100 Subject: [PATCH 357/930] [keymap] curly quotes (#9662) Co-authored-by: Erovia --- keyboards/planck/keymaps/callum/config.h | 0 keyboards/planck/keymaps/callum/keymap.c | 127 ++++++++++++++-------- keyboards/planck/keymaps/callum/readme.md | 8 +- keyboards/planck/keymaps/callum/rules.mk | 26 ++--- 4 files changed, 94 insertions(+), 67 deletions(-) delete mode 100644 keyboards/planck/keymaps/callum/config.h diff --git a/keyboards/planck/keymaps/callum/config.h b/keyboards/planck/keymaps/callum/config.h deleted file mode 100644 index e69de29bb2d1..000000000000 diff --git a/keyboards/planck/keymaps/callum/keymap.c b/keyboards/planck/keymaps/callum/keymap.c index 4db54577b01a..d9fe43f00351 100644 --- a/keyboards/planck/keymaps/callum/keymap.c +++ b/keyboards/planck/keymaps/callum/keymap.c @@ -49,7 +49,7 @@ #define bspc KC_BSPC #define caps KC_CAPS #define comm KC_COMM -#define dash A(KC_MINS) +#define dash A(KC_MINS) // en-dash (–); or with shift: em-dash (—) #define scln KC_SCLN #define slsh KC_SLSH #define spc KC_SPC @@ -60,7 +60,6 @@ #define mins KC_MINS #define quot KC_QUOT #define esc KC_ESC -#define gbp A(KC_3) #define down KC_DOWN #define home G(KC_LEFT) @@ -75,8 +74,8 @@ #define tabr G(S(KC_RBRC)) #define fwd G(KC_RBRC) #define back G(KC_LBRC) -#define slup S(A(KC_UP)) -#define sldn S(A(KC_DOWN)) +#define slup S(A(KC_UP)) // Previous unread in Slack +#define sldn S(A(KC_DOWN)) // Next unread in Slack #define ctl1 C(KC_1) #define ctl2 C(KC_2) @@ -137,6 +136,7 @@ enum planck_layers { }; enum planck_keycodes { + // ASCII ampr = SAFE_RANGE, astr, at, @@ -158,6 +158,11 @@ enum planck_keycodes { rprn, tild, + // Curly quotes + lcqt, + rcqt, + + // "Smart" mods cmd, }; @@ -171,7 +176,7 @@ 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, + lcqt, at, dlr, eql, lprn, lbrc, rbrc, rprn, astr, hash, plus, rcqt, ____, grv, pipe, bsls, lcbr, tild, circ, rcbr, ampr, exlm, perc, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____ ), @@ -191,78 +196,112 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), }; -bool send_string_if_keydown(keyrecord_t *record, const char *s) { +bool send_string_if_keydown( + keyrecord_t *record, + const char *unshifted, + const char *shifted) { if (record->event.pressed) { - send_string(s); + if (shifted) { + uint8_t shifts = get_mods() & MOD_MASK_SHIFT; + if (shifts) { + del_mods(shifts); + SEND_STRING(shifted); + add_mods(shifts); + } else { + SEND_STRING(unshifted); + } + } else { + SEND_STRING(unshifted); + } } return true; } -int cmd_keys_down = 0; +// Holding both cmd keys will instead register as cmd + ctl +bool smart_cmd(keyrecord_t *record) { + static int cmd_keys_down = 0; + + if (record->event.pressed) { + if (cmd_keys_down == 0) { + register_code(KC_LCMD); + } else { + register_code(KC_LCTL); + } + cmd_keys_down++; + } else { + if (cmd_keys_down == 1) { + unregister_code(KC_LCMD); + } else { + unregister_code(KC_LCTL); + } + cmd_keys_down--; + } + return true; +} bool process_record_user(uint16_t keycode, keyrecord_t *record) { switch (keycode) { // Override the defualt auto shifted symbols to use SEND_STRING See // https://github.com/qmk/qmk_firmware/issues/4072 case ampr: - return send_string_if_keydown(record, "&"); + return send_string_if_keydown(record, "&", NULL); case astr: - return send_string_if_keydown(record, "*"); + return send_string_if_keydown(record, "*", NULL); case at: - return send_string_if_keydown(record, "@"); + return send_string_if_keydown(record, "@", NULL); case bsls: - return send_string_if_keydown(record, "\\"); + return send_string_if_keydown(record, "\\", NULL); case circ: - return send_string_if_keydown(record, "^"); + return send_string_if_keydown(record, "^", NULL); case dlr: - return send_string_if_keydown(record, "$"); + return send_string_if_keydown(record, "$", NULL); case eql: - return send_string_if_keydown(record, "="); + return send_string_if_keydown(record, "=", NULL); case exlm: - return send_string_if_keydown(record, "!"); + return send_string_if_keydown(record, "!", NULL); case grv: - return send_string_if_keydown(record, "`"); + return send_string_if_keydown(record, "`", NULL); case hash: - return send_string_if_keydown(record, "#"); + return send_string_if_keydown(record, "#", NULL); case lbrc: - return send_string_if_keydown(record, "["); + return send_string_if_keydown(record, "[", NULL); case lcbr: - return send_string_if_keydown(record, "{"); + return send_string_if_keydown(record, "{", NULL); case lprn: - return send_string_if_keydown(record, "("); + return send_string_if_keydown(record, "(", NULL); case perc: - return send_string_if_keydown(record, "%"); + return send_string_if_keydown(record, "%", NULL); case pipe: - return send_string_if_keydown(record, "|"); + return send_string_if_keydown(record, "|", NULL); case plus: - return send_string_if_keydown(record, "+"); + return send_string_if_keydown(record, "+", NULL); case rbrc: - return send_string_if_keydown(record, "]"); + return send_string_if_keydown(record, "]", NULL); case rcbr: - return send_string_if_keydown(record, "}"); + return send_string_if_keydown(record, "}", NULL); case rprn: - return send_string_if_keydown(record, ")"); + return send_string_if_keydown(record, ")", NULL); case tild: - return send_string_if_keydown(record, "~"); + return send_string_if_keydown(record, "~", NULL); + + // The macOS shortcuts for curly quotes are horrible, so this rebinds + // them so that shift toggles single–double instead of left–right, and + // then both varieties of left quote can share one key, and both + // varieties of right quote share another. + case lcqt: + return send_string_if_keydown( + record, + SS_LALT("]"), // left single quote (‘) + SS_LALT("[")); // left double quote (“) + case rcqt: + return send_string_if_keydown( + record, + SS_LALT(SS_LSFT("]")), // right single quote (’) + SS_LALT(SS_LSFT("["))); // right double quote (”) // cmd + cmd -> cmd + ctl case cmd: - if (record->event.pressed) { - if (cmd_keys_down == 0) { - register_code(KC_LCMD); - } else { - register_code(KC_LCTL); - } - cmd_keys_down++; - } else { - if (cmd_keys_down == 1) { - unregister_code(KC_LCMD); - } else { - unregister_code(KC_LCTL); - } - cmd_keys_down--; - } - return true; + return smart_cmd(record); } return true; } diff --git a/keyboards/planck/keymaps/callum/readme.md b/keyboards/planck/keymaps/callum/readme.md index 561901b48e56..471de2b741bf 100644 --- a/keyboards/planck/keymaps/callum/readme.md +++ b/keyboards/planck/keymaps/callum/readme.md @@ -1,4 +1,4 @@ -# callum's planck layout +# callum’s planck layout This is a layout for the grid planck, built with a few ideals in mind: @@ -23,8 +23,8 @@ This is a layout for the grid planck, built with a few ideals in mind: - Symbols should be arranged so that the most frequently used are easiest to reach. This includes numbers, and lower numbers are more commonly used than - higher ones. (number arrangement borrowed from [dustypomeleau's minidox - layout][]. + higher ones. (number arrangement borrowed from [dustypomeleau’s minidox + layout][]). -[dustypomeleau's minidox layout]: https://github.com/qmk/qmk_firmware/tree/master/keyboards/minidox/keymaps/dustypomerleau +[dustypomeleau’s minidox layout]: https://github.com/qmk/qmk_firmware/tree/master/keyboards/minidox/keymaps/dustypomerleau [keymap.c]: keymap.c diff --git a/keyboards/planck/keymaps/callum/rules.mk b/keyboards/planck/keymaps/callum/rules.mk index db87d5ecec7a..9615222d1bde 100644 --- a/keyboards/planck/keymaps/callum/rules.mk +++ b/keyboards/planck/keymaps/callum/rules.mk @@ -1,19 +1,7 @@ -# 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 = 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 = yes # 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 +BOOTMAGIC_ENABLE = no +MOUSEKEY_ENABLE = no +CONSOLE_ENABLE = no +COMMAND_ENABLE = yes +MIDI_ENABLE = no +AUDIO_ENABLE = yes +RGBLIGHT_ENABLE = no From c272b2422b40129e2313435618edc9dc2e81c6f1 Mon Sep 17 00:00:00 2001 From: a_p_u_r_o Date: Fri, 10 Jul 2020 10:44:03 +0900 Subject: [PATCH 358/930] [Keyboard] Fix inconsistent MATRIX_COLS: 4pplet/steezy60 (#9678) --- keyboards/4pplet/steezy60/rev_a/config.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/keyboards/4pplet/steezy60/rev_a/config.h b/keyboards/4pplet/steezy60/rev_a/config.h index 654454072d41..9aceedc66356 100644 --- a/keyboards/4pplet/steezy60/rev_a/config.h +++ b/keyboards/4pplet/steezy60/rev_a/config.h @@ -12,7 +12,7 @@ /* key matrix size */ #define MATRIX_ROWS 5 -#define MATRIX_COLS 15 +#define MATRIX_COLS 14 // ROWS: Top to bottom, COLS: Left to right #define MATRIX_ROW_PINS {C2,D0,B0,C7,C5} #define MATRIX_COL_PINS {C4,C6,B7,B6,B5,B4,B3,B2,B1,D6,D5,D4,D2,D1} From aec412598949208b734e9b592d51024b3d4c9504 Mon Sep 17 00:00:00 2001 From: Joel Challis Date: Fri, 10 Jul 2020 09:12:40 +0100 Subject: [PATCH 359/930] Refactor ARM backlight (#7959) --- quantum/backlight/backlight_chibios.c | 160 ++++++++++---------------- 1 file changed, 61 insertions(+), 99 deletions(-) diff --git a/quantum/backlight/backlight_chibios.c b/quantum/backlight/backlight_chibios.c index 723544adb934..0fe812bf27bc 100644 --- a/quantum/backlight/backlight_chibios.c +++ b/quantum/backlight/backlight_chibios.c @@ -3,27 +3,37 @@ #include #include "debug.h" -// TODO: remove short term bodge when refactoring BACKLIGHT_CUSTOM_DRIVER out -#ifdef BACKLIGHT_PIN - // GPIOV2 && GPIOV3 -# ifndef BACKLIGHT_PAL_MODE -# define BACKLIGHT_PAL_MODE 2 -# endif +#ifndef BACKLIGHT_PAL_MODE +# define BACKLIGHT_PAL_MODE 2 +#endif // GENERIC -# ifndef BACKLIGHT_PWM_DRIVER -# define BACKLIGHT_PWM_DRIVER PWMD4 +#ifndef BACKLIGHT_PWM_DRIVER +# define BACKLIGHT_PWM_DRIVER PWMD4 +#endif +#ifndef BACKLIGHT_PWM_CHANNEL +# define BACKLIGHT_PWM_CHANNEL 3 +#endif + +// Support for pins which are on TIM1_CH1N - requires STM32_PWM_USE_ADVANCED +#ifdef BACKLIGHT_PWM_COMPLEMENTARY_OUTPUT +# if BACKLIGHT_ON_STATE == 1 +# define PWM_OUTPUT_MODE PWM_COMPLEMENTARY_OUTPUT_ACTIVE_LOW; +# else +# define PWM_OUTPUT_MODE PWM_COMPLEMENTARY_OUTPUT_ACTIVE_HIGH; # endif -# ifndef BACKLIGHT_PWM_CHANNEL -# define BACKLIGHT_PWM_CHANNEL 3 +#else +# if BACKLIGHT_ON_STATE == 1 +# define PWM_OUTPUT_MODE PWM_OUTPUT_ACTIVE_HIGH; +# else +# define PWM_OUTPUT_MODE PWM_OUTPUT_ACTIVE_LOW; # endif - -static void breathing_callback(PWMDriver *pwmp); +#endif 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 */ + NULL, /* Breathing Callback */ { /* Default all channels to disabled - Channels will be configured durring init */ {PWM_OUTPUT_DISABLED, NULL}, {PWM_OUTPUT_DISABLED, NULL}, @@ -32,17 +42,6 @@ static PWMConfig pwmCFG = {0xFFFF, /* PWM clock frequency */ 0, /* HW dependent part.*/ 0}; -static PWMConfig pwmCFG_breathing = {0xFFFF, /** PWM clock frequency */ - 256, /* PWM period (in ticks) 1S (1/10kHz=0.1mS 0.1ms*10000 ticks=1S) */ - breathing_callback, /* Breathing Callback */ - { /* Default all channels to disabled - Channels will be configured durring init */ - {PWM_OUTPUT_DISABLED, NULL}, - {PWM_OUTPUT_DISABLED, NULL}, - {PWM_OUTPUT_DISABLED, NULL}, - {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 @@ -60,125 +59,88 @@ static uint16_t cie_lightness(uint16_t v) { } void backlight_init_ports(void) { - // printf("backlight_init_ports()\n"); - -# ifdef USE_GPIOV1 +#ifdef USE_GPIOV1 palSetPadMode(PAL_PORT(BACKLIGHT_PIN), PAL_PAD(BACKLIGHT_PIN), PAL_MODE_STM32_ALTERNATE_PUSHPULL); -# else +#else palSetPadMode(PAL_PORT(BACKLIGHT_PIN), PAL_PAD(BACKLIGHT_PIN), PAL_MODE_ALTERNATE(BACKLIGHT_PAL_MODE)); -# endif +#endif - pwmCFG.channels[BACKLIGHT_PWM_CHANNEL - 1].mode = PWM_OUTPUT_ACTIVE_HIGH; - pwmCFG_breathing.channels[BACKLIGHT_PWM_CHANNEL - 1].mode = PWM_OUTPUT_ACTIVE_HIGH; + pwmCFG.channels[BACKLIGHT_PWM_CHANNEL - 1].mode = PWM_OUTPUT_MODE; pwmStart(&BACKLIGHT_PWM_DRIVER, &pwmCFG); backlight_set(get_backlight_level()); + +#ifdef BACKLIGHT_BREATHING if (is_backlight_breathing()) { breathing_enable(); } +#endif } void backlight_set(uint8_t level) { - // printf("backlight_set(%d)\n", level); + if (level > BACKLIGHT_LEVELS) level = BACKLIGHT_LEVELS; + if (level == 0) { // Turn backlight off pwmDisableChannel(&BACKLIGHT_PWM_DRIVER, BACKLIGHT_PWM_CHANNEL - 1); } else { // Turn backlight on - if (!is_breathing()) { - uint32_t duty = (uint32_t)(cie_lightness(0xFFFF * (uint32_t)level / BACKLIGHT_LEVELS)); - // printf("duty: (%d)\n", duty); - pwmEnableChannel(&BACKLIGHT_PWM_DRIVER, BACKLIGHT_PWM_CHANNEL - 1, PWM_FRACTION_TO_WIDTH(&BACKLIGHT_PWM_DRIVER, 0xFFFF, duty)); - } + uint32_t duty = (uint32_t)(cie_lightness(0xFFFF * (uint32_t)level / BACKLIGHT_LEVELS)); + pwmEnableChannel(&BACKLIGHT_PWM_DRIVER, BACKLIGHT_PWM_CHANNEL - 1, PWM_FRACTION_TO_WIDTH(&BACKLIGHT_PWM_DRIVER, 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 +#ifdef BACKLIGHT_BREATHING -static uint8_t breathing_halt = BREATHING_NO_HALT; -static uint16_t breathing_counter = 0; - -bool is_breathing(void) { return BACKLIGHT_PWM_DRIVER.config == &pwmCFG_breathing; } - -static inline void breathing_min(void) { breathing_counter = 0; } +# define BREATHING_STEPS 128 -static inline void breathing_max(void) { breathing_counter = get_breathing_period() * 256 / 2; } +/* 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}; -void breathing_interrupt_enable(void) { - pwmStop(&BACKLIGHT_PWM_DRIVER); - pwmStart(&BACKLIGHT_PWM_DRIVER, &pwmCFG_breathing); - chSysLockFromISR(); - pwmEnablePeriodicNotification(&BACKLIGHT_PWM_DRIVER); - pwmEnableChannelI(&BACKLIGHT_PWM_DRIVER, BACKLIGHT_PWM_CHANNEL - 1, PWM_FRACTION_TO_WIDTH(&BACKLIGHT_PWM_DRIVER, 0xFFFF, 0xFFFF)); - chSysUnlockFromISR(); -} +void breathing_callback(PWMDriver *pwmp); -void breathing_interrupt_disable(void) { - pwmStop(&BACKLIGHT_PWM_DRIVER); - pwmStart(&BACKLIGHT_PWM_DRIVER, &pwmCFG); -} +bool is_breathing(void) { return pwmCFG.callback != NULL; } void breathing_enable(void) { - breathing_counter = 0; - breathing_halt = BREATHING_NO_HALT; - breathing_interrupt_enable(); -} - -void breathing_pulse(void) { - if (get_backlight_level() == 0) - breathing_min(); - else - breathing_max(); - breathing_halt = BREATHING_HALT_ON; - breathing_interrupt_enable(); + pwmCFG.callback = breathing_callback; + pwmEnablePeriodicNotification(&BACKLIGHT_PWM_DRIVER); } void breathing_disable(void) { - // printf("breathing_disable()\n"); - breathing_interrupt_disable(); + pwmCFG.callback = NULL; + pwmDisablePeriodicNotification(&BACKLIGHT_PWM_DRIVER); + // Restore backlight level backlight_set(get_backlight_level()); } -void breathing_self_disable(void) { - if (get_backlight_level() == 0) - breathing_halt = BREATHING_HALT_OFF; - else - breathing_halt = BREATHING_HALT_ON; -} - -/* 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 * get_backlight_level(); } -static void breathing_callback(PWMDriver *pwmp) { - (void)pwmp; +void breathing_callback(PWMDriver *pwmp) { 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; - 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)); + // resetting after one period to prevent ugly reset at overflow. + static uint16_t breathing_counter = 0; + breathing_counter = (breathing_counter + 1) % (breathing_period * 256); + uint8_t index = breathing_counter / interval % BREATHING_STEPS; + uint32_t duty = cie_lightness(scale_backlight(breathing_table[index] * 256)); chSysLockFromISR(); - pwmEnableChannelI(&BACKLIGHT_PWM_DRIVER, BACKLIGHT_PWM_CHANNEL - 1, PWM_FRACTION_TO_WIDTH(&BACKLIGHT_PWM_DRIVER, 0xFFFF, duty)); + pwmEnableChannelI(pwmp, BACKLIGHT_PWM_CHANNEL - 1, PWM_FRACTION_TO_WIDTH(&BACKLIGHT_PWM_DRIVER, 0xFFFF, duty)); chSysUnlockFromISR(); } +// TODO: integrate generic pulse solution +void breathing_pulse(void) { + backlight_set(is_backlight_enabled() ? 0 : BACKLIGHT_LEVELS); + wait_ms(10); + backlight_set(is_backlight_enabled() ? get_backlight_level() : 0); +} + #endif From bd72a577a2bec7479a909316d1729bad41c0b0e5 Mon Sep 17 00:00:00 2001 From: KgOfHedgehogs Date: Fri, 10 Jul 2020 23:56:52 +0200 Subject: [PATCH 360/930] Update Jian readme.md (#9685) --- keyboards/jian/readme.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/keyboards/jian/readme.md b/keyboards/jian/readme.md index 7afff2ab70ee..7258e31c1a27 100644 --- a/keyboards/jian/readme.md +++ b/keyboards/jian/readme.md @@ -2,7 +2,10 @@ -A 40% ergonomic keyboard kit. Jian supports cherry mx, alps, kailh choc switches PCB and plate mounted. You can assembly keyboard without mounting plate. Jian also supports rgb led strip like ws2812b and 1 color in-switch backlight. Each half can work standalone. +40% ergonomic keyboard kit. Jian supports Cherry MX, Alps, Kailh Choc switches in PCB mounted and plate mounted variants. +You can assemble the keyboard without a mounting plate. +Jian also supports RGB LED underglow (with a strip like WS2812B) and single color in-switch LED backlight. +Each half can work standalone. * Keyboard Maintainer: [KGOH](https://github.com/KGOH) * Hardware Supported: Jian PCB rev1, rev2, Pro Micro From 027570a21b44b2cba1b917c2eddb804b5dc82173 Mon Sep 17 00:00:00 2001 From: Jonathan Rascher Date: Fri, 10 Jul 2020 17:57:49 -0400 Subject: [PATCH 361/930] Rework bcat Crkbd and Lily58 modifier keys (#9692) * Re-enable mouse keys to fix Chrome OS media keys I'm not sure if there's a bug in Chrome OS, QMK, or both, but EXTRAKEY_ENABLE isn't sufficient for media keys to work on Chrome OS. Instead, MOUSEKEY_ENABLE is also required. * Remove unnecessary SPLIT_USB_DETECT for Lily58 I've since swapped my Lily58 back to Elite-C v2 controllers with working VBUS detection. * Move Crkbd Esc and Ctrl keys; add some shortcuts * Move MC_ALTT to userspace for cross-board support * Sync Lily58 keymap with Crkbd * Fix typos --- keyboards/crkbd/keymaps/bcat/keymap.c | 21 ++++++---- keyboards/crkbd/keymaps/bcat/readme.md | 53 ++++++++++++++----------- keyboards/lily58/keymaps/bcat/config.h | 3 -- keyboards/lily58/keymaps/bcat/keymap.c | 21 ++++++---- keyboards/lily58/keymaps/bcat/readme.md | 10 ++--- users/bcat/bcat.c | 39 +++++++++++++++++- users/bcat/bcat.h | 8 ++++ users/bcat/rules.mk | 5 ++- 8 files changed, 109 insertions(+), 51 deletions(-) create mode 100644 users/bcat/bcat.h diff --git a/keyboards/crkbd/keymaps/bcat/keymap.c b/keyboards/crkbd/keymaps/bcat/keymap.c index b4c347181f57..60375f6764d5 100644 --- a/keyboards/crkbd/keymaps/bcat/keymap.c +++ b/keyboards/crkbd/keymaps/bcat/keymap.c @@ -1,5 +1,7 @@ #include QMK_KEYBOARD_H +#include "bcat.h" + enum layer { LAYER_DEFAULT, LAYER_LOWER, @@ -10,28 +12,31 @@ enum layer { #define LY_LWR MO(LAYER_LOWER) #define LY_RSE MO(LAYER_RAISE) -#define KY_CESC LCTL_T(KC_ESC) +#define KY_CSPC LCTL(KC_SPC) +#define KY_LOCK LGUI(KC_L) +#define KY_WINL LGUI(KC_LEFT) +#define KY_WINR LGUI(KC_RGHT) 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_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_RSFT, - KC_LALT, LY_LWR, KC_SPC, KC_ENT, LY_RSE, KC_RGUI + KC_LCTL, LY_LWR, KC_SPC, KC_ENT, LY_RSE, KC_RALT ), /* Lower layer: http://www.keyboard-layout-editor.com/#/gists/c3fba5eaa2cd70fdfbdbc0f9e34d3bc0 */ [LAYER_LOWER] = LAYOUT( - 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_APP, KC_PSCR, KC_SLCK, KC_PAUS, _______, KC_BSLS, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_GRV, + MC_ALTT, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, _______, + KY_CSPC, KY_WINL, KY_WINR, KY_LOCK, KC_WBAK, KC_WFWD, KC_PIPE, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_TILD, + _______, KC_APP, KC_PSCR, KC_SLCK, KC_PAUS, KC_LGUI, 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_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, _______, + KC_CAPS, 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, _______, _______, _______, _______, _______, _______ @@ -46,6 +51,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), }; -layer_state_t layer_state_set_user(layer_state_t state) { +layer_state_t layer_state_set_keymap(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 index fa6b5af37fa1..21594f75c9d2 100644 --- a/keyboards/crkbd/keymaps/bcat/readme.md +++ b/keyboards/crkbd/keymaps/bcat/readme.md @@ -4,11 +4,11 @@ This is my favorite split ergo layout for typing, featuring the traditional four ortho/ergo layers (Default, Lower, Raise, Adjust). It is loosely inspired by the default Planck (numbers on Lower, symbols on Raise) and Crkbd (Space on left, Enter on right) layouts, but has since been redesigned heavily according -to the principles described below: +to the principles described below. -* 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 -activated by the right thumb. +* Since my most-frequently-used keyboard shortcuts involve Ctrl, which lives on +the left half of the keyboard, keys frequently used with it (numbers, function +keys, etc.) are on the Raise layer activated by the right thumb. * Navigation can be done on the right half alone, to enable simultaneous left-handed mousing. Additionally, Web pages can be scrolled with Space or @@ -22,7 +22,7 @@ layer-switch keys to correct mistakes. ## Default layer -![Default layer layout](https://i.imgur.com/s1LDlSQ.png) +![Default layer layout](https://i.imgur.com/g5N7g8D.png) ([KLE](http://www.keyboard-layout-editor.com/#/gists/08d9827d916662a9414f48805aa895a5)) @@ -31,29 +31,26 @@ layer-switch keys to correct mistakes. * Tab and Backspace are in familiar locations from my row-staggered boards (almost all of which use HHKB-style split backspace). +* The Esc key is next to the home row for convenience in Vim. + * Likewise, the Ctrl key is in the same place as on my row-staggered boards (where I've been remapping Caps Lock as Ctrl since before even using QMK). -* There are two Shift keys, because I do use Right Shift on occasion (even -though I'm predominately a Left Shift-er). +* There are two Shift keys, although I generally use Left Shift. (I've +considered replacing Right Shift with another key, but haven't chosen one.) -* Lower and Raise layer-switch keys are below the left and right thumb, -respectively, when resting my fingers on the home row. +* Lower and Raise layer-switch keys are in the resting position of my left and +right thumbs, respectively. * Space and Enter are on the big thumb keys so they're easy to press. -* Alt is on the left so I can navigate back (Alt+Raise+H) and forward -(Alt+Raise+L) without having to uncomfortably hit two thumb keys on the same -half. This puts Super on the right by the process of elimination. - -* Escape shares a mod-tap key with Ctrl, which is convenient for Vim, but not -something I'm totally in love with, as even after tweaking `TAPPING_TERM` I -still get occasional spurious Esc taps. (I might move Esc up a key and put Tab -on a layer, but that'd take some getting used to....) +* Ctrl is on the left for ease of chording, especially one-handed use of common +shortcuts like Ctrl+T and Ctrl+W. This puts Alt on the right by the process of +elimination. ## Lower layer -![Lower layer layout](https://i.imgur.com/SsxvCgy.png) +![Lower layer layout](https://i.imgur.com/djIkwsa.png) ([KLE](http://www.keyboard-layout-editor.com/#/gists/c3fba5eaa2cd70fdfbdbc0f9e34d3bc0)) @@ -74,17 +71,23 @@ bottom row. right half, with the same relative positions as on a row-staggered HHKB layout. And yup, the shifted versions are above the unshifted versions. -* Caps Lock is bound in the same position as on an HHKB, for lack of an obvious -better location. +* Remaining keys from a TKL are placed out of the way on the bottom row of the +left half. -* Some extra keys are placed on the bottom row of the left half, ensuring every -key on a TKL has a binding. +* The home row on the left half contains handy shortcuts for window movement, +and browser navigation, and screen lock. -* The left-half home row is reversed for future use. (It's free real estate.) +* Lower+Esc is bound to Ctrl+Space because the Ctrl and Space keys are both on +the left thumb, so this key combination (which I use for tmux prefix and editor +autocomplete) is hard to press in its natural location. + +* Lower+Tab is bound to a custom Alt+Tab macro that keeps the Alt modifier held +as long as the Lower key is held down. This means that window switching is on +Lower+Tab immediately next to browser tab switching (Ctrl+Tab). ## Raise layer -![Raise layer layout](https://i.imgur.com/cVoKygg.png) +![Raise layer layout](https://i.imgur.com/VNEiV9A.png) ([KLE](http://www.keyboard-layout-editor.com/#/gists/08b44355d4ca85d294bad9e2821f91d7)) @@ -106,6 +109,8 @@ keys (F1–F5) on the home row.) * Insert and Delete are on the rightmost column, because there didn't seem to be a better place to put them. +* Caps Lock is bound in the same position as on an HHKB, for lack of an obvious better location. + ## Adjust layer ![Adjust layer layout](https://i.imgur.com/LEHM4DU.png) diff --git a/keyboards/lily58/keymaps/bcat/config.h b/keyboards/lily58/keymaps/bcat/config.h index f7f08d076a57..180926204492 100644 --- a/keyboards/lily58/keymaps/bcat/config.h +++ b/keyboards/lily58/keymaps/bcat/config.h @@ -1,6 +1,3 @@ #pragma once #define EE_HANDS - -/* Work around Elite-C v3 with broken VBUS detection. */ -#define SPLIT_USB_DETECT diff --git a/keyboards/lily58/keymaps/bcat/keymap.c b/keyboards/lily58/keymaps/bcat/keymap.c index 7fa65b876f14..a194e1c9dc85 100644 --- a/keyboards/lily58/keymaps/bcat/keymap.c +++ b/keyboards/lily58/keymaps/bcat/keymap.c @@ -1,5 +1,7 @@ #include QMK_KEYBOARD_H +#include "bcat.h" + enum layer { LAYER_DEFAULT, LAYER_LOWER, @@ -10,31 +12,34 @@ enum layer { #define LY_LWR MO(LAYER_LOWER) #define LY_RSE MO(LAYER_RAISE) -#define KY_CESC LCTL_T(KC_ESC) +#define KY_CSPC LCTL(KC_SPC) +#define KY_LOCK LGUI(KC_L) +#define KY_WINL LGUI(KC_LEFT) +#define KY_WINR LGUI(KC_RGHT) const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Default layer: http://www.keyboard-layout-editor.com/#/gists/e0eb3af65961e9fd612dcff3ddd88e4f */ [LAYER_DEFAULT] = LAYOUT( KC_EQL, 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_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_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_WBAK, KC_WFWD, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, - KC_LCTL, KC_LALT, LY_LWR, KC_SPC, KC_ENT, LY_RSE, KC_RGUI, KC_APP + KC_LGUI, KC_LCTL, LY_LWR, KC_SPC, KC_ENT, LY_RSE, KC_RALT, KC_APP ), /* Lower layer: http://www.keyboard-layout-editor.com/#/gists/19ad0d3b5d745fbb2818db09740f5a11 */ [LAYER_LOWER] = LAYOUT( _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - 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_APP, KC_PSCR, KC_SLCK, KC_PAUS, _______, _______, _______, KC_BSLS, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_GRV, + MC_ALTT, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, _______, + KY_CSPC, KY_WINL, KY_WINR, KY_LOCK, KC_WBAK, KC_WFWD, KC_PIPE, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_TILD, + _______, KC_APP, KC_PSCR, KC_SLCK, KC_PAUS, KC_LGUI, _______, _______, 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_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, _______, + KC_CAPS, 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, _______, _______, _______, _______, _______, _______, _______, _______ @@ -50,6 +55,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), }; -layer_state_t layer_state_set_user(layer_state_t state) { +layer_state_t layer_state_set_keymap(layer_state_t state) { return update_tri_layer_state(state, LAYER_LOWER, LAYER_RAISE, LAYER_ADJUST); } diff --git a/keyboards/lily58/keymaps/bcat/readme.md b/keyboards/lily58/keymaps/bcat/readme.md index 57b7929d3bd1..270e74731133 100644 --- a/keyboards/lily58/keymaps/bcat/readme.md +++ b/keyboards/lily58/keymaps/bcat/readme.md @@ -11,24 +11,24 @@ using layers for numbers and symbols, so in practice this goes unused. placed in the same positions as on the ErgoDox EZ. (There's no real reason for this; I just had to do _something_ with those keys.) -* The extra thumb keys are used for dedicated Ctrl/Menu keys (not super useful) -and browser back/forward navigation keys (actually more useful than expected). +* The extra thumb keys are used for dedicated Super/Menu keys, as well as +browser back/forward navigation keys. ## Default layer -![Default layer layout](https://i.imgur.com/wx1brJV.png) +![Default layer layout](https://i.imgur.com/FNITWJ0.png) ([KLE](http://www.keyboard-layout-editor.com/#/gists/e0eb3af65961e9fd612dcff3ddd88e4f)) ## Lower layer -![Lower layer layout](https://i.imgur.com/9JlbNAd.png) +![Lower layer layout](https://i.imgur.com/JVF1p1Q.png) ([KLE](http://www.keyboard-layout-editor.com/#/gists/19ad0d3b5d745fbb2818db09740f5a11)) ## Raise layer -![Raise layer layout](https://i.imgur.com/Ue8tu1v.png) +![Raise layer layout](https://i.imgur.com/NaWTavA.png) ([KLE](http://www.keyboard-layout-editor.com/#/gists/912be7955f781cdaf692cc4d4c0b5823)) diff --git a/users/bcat/bcat.c b/users/bcat/bcat.c index 2b250c10f107..397d565da0cc 100644 --- a/users/bcat/bcat.c +++ b/users/bcat/bcat.c @@ -1,6 +1,43 @@ -#include "quantum.h" +#include "bcat.h" #if defined(RGBLIGHT_ENABLE) /* Adjust RGB static hue ranges for shorter gradients than default. */ const uint8_t RGBLED_GRADIENT_RANGES[] PROGMEM = {255, 127, 63, 31, 15}; #endif + +static int8_t alt_tab_layer = -1; + +__attribute__((weak)) bool process_record_keymap(uint16_t keycode, keyrecord_t *record) { return true; } + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + if (!process_record_keymap(keycode, record)) { + return false; + } + switch (keycode) { + /* Alt+Tab that holds Alt until current layer is released: */ + case MC_ALTT: + if (record->event.pressed) { + if (alt_tab_layer < 0) { + alt_tab_layer = layer_switch_get_layer(record->event.key); + register_code(KC_LALT); + } + register_code(KC_TAB); + } else { + unregister_code(KC_TAB); + } + return false; + default: + return true; + } +} + +__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 = layer_state_set_keymap(state); + if (alt_tab_layer >= 0 && !layer_state_cmp(state, alt_tab_layer)) { + unregister_code(KC_LALT); + alt_tab_layer = -1; + } + return state; +} diff --git a/users/bcat/bcat.h b/users/bcat/bcat.h new file mode 100644 index 000000000000..1ea05e5fa8af --- /dev/null +++ b/users/bcat/bcat.h @@ -0,0 +1,8 @@ +#pragma once + +#include "quantum.h" + +enum user_keycodes { + MC_ALTT = SAFE_RANGE, + KEYMAP_SAFE_RANGE, +}; diff --git a/users/bcat/rules.mk b/users/bcat/rules.mk index f3c6f9ab2778..f979c703f84f 100644 --- a/users/bcat/rules.mk +++ b/users/bcat/rules.mk @@ -3,8 +3,10 @@ SRC += bcat.c # Enable Bootmagic Lite to consistently reset to bootloader and clear EEPROM. BOOTMAGIC_ENABLE = lite -# Enable media keys on all keyboards. +# Enable media keys on all keyboards. (Even though I don't use mouse keys, they +# seem to be required for media keys to register on Chrome OS.) EXTRAKEY_ENABLE = yes +MOUSEKEY_ENABLE = yes # Enable link-time optimization to reduce binary size. LINK_TIME_OPTIMIZATION_ENABLE = yes @@ -12,7 +14,6 @@ LINK_TIME_OPTIMIZATION_ENABLE = yes # Disable unused build options on all keyboards. COMMAND_ENABLE = no CONSOLE_ENABLE = no -MOUSEKEY_ENABLE = no NKRO_ENABLE = no TERMINAL_ENABLE = no From 76b21a4b90a490c69175bef2dffc6eb6759ac26d Mon Sep 17 00:00:00 2001 From: Ramon Imbao Date: Sat, 11 Jul 2020 05:58:41 +0800 Subject: [PATCH 362/930] Fix missing column for Herringbone (#9679) * Add the missing column to the config * Fix key layout error in info.json --- keyboards/ramonimbao/herringbone/config.h | 4 +- keyboards/ramonimbao/herringbone/info.json | 78 +++++++++++----------- 2 files changed, 41 insertions(+), 41 deletions(-) diff --git a/keyboards/ramonimbao/herringbone/config.h b/keyboards/ramonimbao/herringbone/config.h index 3dab5ddeb3a2..c8aee0f6e444 100644 --- a/keyboards/ramonimbao/herringbone/config.h +++ b/keyboards/ramonimbao/herringbone/config.h @@ -41,8 +41,8 @@ along with this program. If not, see . * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) * */ -#define MATRIX_ROW_PINS { C5, C6, C7, A7, A6, A5 } -#define MATRIX_COL_PINS { A0, A1, A2, A3, A4, C4, D6, D5, D1, B0, B1, B3, B4, B7 } +#define MATRIX_ROW_PINS { C4, C5, C6, C7, A7, A6 } +#define MATRIX_COL_PINS { A0, A1, A2, A3, A4, A5, D6, D5, D1, B0, B1, B2, B3, B4, D7 } #define UNUSED_PINS /* COL2ROW, ROW2COL*/ diff --git a/keyboards/ramonimbao/herringbone/info.json b/keyboards/ramonimbao/herringbone/info.json index 5a23ec0b10fb..01f1e9e48d30 100644 --- a/keyboards/ramonimbao/herringbone/info.json +++ b/keyboards/ramonimbao/herringbone/info.json @@ -9,22 +9,22 @@ "layout": [ {"x": 0, "y": 0}, - {"x": 1.5, "y": 0}, - {"x": 2.5, "y": 0}, - {"x": 3.5, "y": 0}, - {"x": 4.5, "y": 0}, + {"x": 1.25, "y": 0}, + {"x": 2.25, "y": 0}, + {"x": 3.25, "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": 5.5, "y": 0}, + {"x": 6.5, "y": 0}, + {"x": 7.5, "y": 0}, + {"x": 8.5, "y": 0}, - {"x": 10, "y": 0}, - {"x": 11, "y": 0}, - {"x": 12, "y": 0}, - {"x": 13, "y": 0}, + {"x": 9.75, "y": 0}, + {"x": 10.75, "y": 0}, + {"x": 11.75, "y": 0}, + {"x": 12.75, "y": 0}, - {"x": 14.25, "y": 0}, + {"x": 14, "y": 0}, {"x": 15.5, "y": 0}, @@ -111,22 +111,22 @@ "layout": [ {"x": 0, "y": 0}, - {"x": 1.5, "y": 0}, - {"x": 2.5, "y": 0}, - {"x": 3.5, "y": 0}, - {"x": 4.5, "y": 0}, + {"x": 1.25, "y": 0}, + {"x": 2.25, "y": 0}, + {"x": 3.25, "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": 5.5, "y": 0}, + {"x": 6.5, "y": 0}, + {"x": 7.5, "y": 0}, + {"x": 8.5, "y": 0}, - {"x": 10, "y": 0}, - {"x": 11, "y": 0}, - {"x": 12, "y": 0}, - {"x": 13, "y": 0}, + {"x": 9.75, "y": 0}, + {"x": 10.75, "y": 0}, + {"x": 11.75, "y": 0}, + {"x": 12.75, "y": 0}, - {"x": 14.25, "y": 0}, + {"x": 14, "y": 0}, {"x": 15.5, "y": 0}, @@ -213,22 +213,22 @@ "layout": [ {"x": 0, "y": 0}, - {"x": 1.5, "y": 0}, - {"x": 2.5, "y": 0}, - {"x": 3.5, "y": 0}, - {"x": 4.5, "y": 0}, + {"x": 1.25, "y": 0}, + {"x": 2.25, "y": 0}, + {"x": 3.25, "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": 5.5, "y": 0}, + {"x": 6.5, "y": 0}, + {"x": 7.5, "y": 0}, + {"x": 8.5, "y": 0}, - {"x": 10, "y": 0}, - {"x": 11, "y": 0}, - {"x": 12, "y": 0}, - {"x": 13, "y": 0}, + {"x": 9.75, "y": 0}, + {"x": 10.75, "y": 0}, + {"x": 11.75, "y": 0}, + {"x": 12.75, "y": 0}, - {"x": 14.25, "y": 0}, + {"x": 14, "y": 0}, {"x": 15.5, "y": 0}, From bdfb1bc2b5e51e2b5f8844a0f6106162931c9ca8 Mon Sep 17 00:00:00 2001 From: ytkwong <62127507+ytkwong@users.noreply.github.com> Date: Fri, 10 Jul 2020 17:59:45 -0400 Subject: [PATCH 363/930] Added VIA compatible rules for Duck Octagon V2 PCB (#9676) * Added keymap and rules to allow VIA compatibility * Update keymap.c * Update rules.mk * Update keyboards/duck/octagon/keymaps/via/keymap.c Co-authored-by: Joel Challis * Update keymap.c * Update keyboards/duck/octagon/keymaps/via/keymap.c Co-authored-by: Ryan * Update keyboards/duck/octagon/keymaps/via/keymap.c Co-authored-by: Ryan * Update keyboards/duck/octagon/keymaps/via/keymap.c Co-authored-by: Ryan * Update keyboards/duck/octagon/keymaps/via/keymap.c Co-authored-by: Ryan Co-authored-by: Joel Challis Co-authored-by: Ryan --- keyboards/duck/octagon/keymaps/via/keymap.c | 50 +++++++++++++++++++++ keyboards/duck/octagon/keymaps/via/rules.mk | 2 + 2 files changed, 52 insertions(+) create mode 100644 keyboards/duck/octagon/keymaps/via/keymap.c create mode 100644 keyboards/duck/octagon/keymaps/via/rules.mk diff --git a/keyboards/duck/octagon/keymaps/via/keymap.c b/keyboards/duck/octagon/keymaps/via/keymap.c new file mode 100644 index 000000000000..b391d2f0ab62 --- /dev/null +++ b/keyboards/duck/octagon/keymaps/via/keymap.c @@ -0,0 +1,50 @@ +/* Copyright 2018 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_75_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_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_LGUI, KC_LALT, KC_SPC, KC_RALT, LT(1,KC_APP), LT(2,KC_RCTL), KC_LEFT, KC_DOWN, KC_RGHT), + + [1] = 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, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 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_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, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 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_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, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 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/octagon/keymaps/via/rules.mk b/keyboards/duck/octagon/keymaps/via/rules.mk new file mode 100644 index 000000000000..a2d6d0a96e85 --- /dev/null +++ b/keyboards/duck/octagon/keymaps/via/rules.mk @@ -0,0 +1,2 @@ +VIA_ENABLE = yes +LTO_ENABLE = yes From 21610d245ac0a7fe9a8fe76669bbf9b8aec78aab Mon Sep 17 00:00:00 2001 From: Fredrik Salomonsson Date: Fri, 10 Jul 2020 15:00:04 -0700 Subject: [PATCH 364/930] [Keymap] plattfot - Update and fix issue with DBL_TAP (#9666) - Fix typo in the default layout. - Move esc and del to the navi layer. - Fix issue with oneshot layers and double tap aka DBL_TAP. - Add caps lock to the raise layer. Was relying on a broken behavior for the double tap to work with oneshot keys, i.e. the oneshot layer not being cleared after a key press in `process_record_user`, which allowed me to first press an oneshot key, then double tap and then a key. With the behavior fixed, this no longer works. As the oneshot layer will be cleared when double tap is pressed. To make double tap useful again. I changed that any of the layer keys does not clear the double tap. Which allows me for example to first press double tap, then an oneshot key and then a key. So now I'm able to type my double symbols again. --- keyboards/kyria/keymaps/plattfot/README.md | 16 +++++++---- keyboards/kyria/keymaps/plattfot/keymap.c | 31 +++++++++++----------- 2 files changed, 26 insertions(+), 21 deletions(-) diff --git a/keyboards/kyria/keymaps/plattfot/README.md b/keyboards/kyria/keymaps/plattfot/README.md index b5b6ddaa2d0f..860a3b782972 100644 --- a/keyboards/kyria/keymaps/plattfot/README.md +++ b/keyboards/kyria/keymaps/plattfot/README.md @@ -21,8 +21,8 @@ thumb keys to make it work without them. // |--------+------+------+------+------+------+-------------. ,-------------+------+------+------+------+------+--------| // | LShift | Z | X | C | V | B | Lead | RAISE| | LOWER|DBLTAP| N | M | , < | . > | / ? | RShift | // `----------------------+------+------+------+------+------| |------+------+------+------+------+----------------------' - // | MPlay| GUI | LCtrl| Space| LALT | | Enter|BSpace| NAV | LAlt |Worksp| - // | | | | | | | | | | |toggle| + // | MPlay| GUI | LCtrl| Space| LALT | | Enter|BSpace| NAV | LCTL+|Worksp| + // | | | | | | | | | | LALT |toggle| // `----------------------------------' `----------------------------------' ``` @@ -103,9 +103,9 @@ programming, and it is editor agnostic. // |--------+------+------+------+------+------| |------+------+------+------+------+--------| // | | | | | | F11 | | F12 | | | | | | // |--------+------+------+------+------+------+-------------. ,-------------+------+------+------+------+------+--------| - // | | | | | | |ScLock| | | | Ins | | | | | | | + // | | | | | | |ScLock| | | | Ins | | | | | |CapsLock| // `----------------------+------+------+------+------+------| |------+------+------+------+------+----------------------' - // | | | | | | | Esc | Del | | RAlt | | + // | | | | | | | | | | RAlt | | // | | | | | | | | | | | | // `----------------------------------' `----------------------------------' ``` @@ -113,6 +113,9 @@ programming, and it is editor agnostic. Access to the functional keys, which I mostly use to run `emacs` compilation mode. +This layer also includes key that changes the state, like insert and +caps lock. + Scroll Lock is used to toggle between English and Swedish. ## Notable features on this layer @@ -130,7 +133,7 @@ Right rotary encoder // ,-------------------------------------------. ,-------------------------------------------. // | | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | | // |--------+------+------+------+------+------| |------+------+------+------+------+--------| - // | | | | | | | | | Left | Up | Down | Right| | + // | | | ESC | DEL | | | | | Left | Up | Down | Right| | // |--------+------+------+------+------+------+-------------. ,-------------+------+------+------+------+------+--------| // | | | | | | | | | | | | | | | | | | // `----------------------+------+------+------+------+------| |------+------+------+------+------+----------------------' @@ -144,6 +147,9 @@ row after using [ErgoDox](https://www.ergodox.io/) keyboards for a few years. Do not feel I need a numpad layer, which seems to be quite common with small keyboards like this. +Esc and Delete is also on this layer as they are easy to reach and they +only need to be chord with the modifiers. + # Adjust Layer: RGB ``` // diff --git a/keyboards/kyria/keymaps/plattfot/keymap.c b/keyboards/kyria/keymaps/plattfot/keymap.c index d897769898ba..3bd3489f62fe 100644 --- a/keyboards/kyria/keymaps/plattfot/keymap.c +++ b/keyboards/kyria/keymaps/plattfot/keymap.c @@ -52,8 +52,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |--------+------+------+------+------+------+-------------. ,-------------+------+------+------+------+------+--------| * | LShift | Z | X | C | V | B | Lead | RAISE| | LOWER|DBLTAP| N | M | , < | . > | / ? | RShift | * `----------------------+------+------+------+------+------| |------+------+------+------+------+----------------------' - * | MPlay| GUI | LCtrl| Space| LALT | | Enter|BSpace| NAV | LAlt |Worksp| - * | | | | | | | | | | |toggle| + * | MPlay| GUI | LCtrl| Space| LALT | | Enter|BSpace| NAV |LCTL+ |Worksp| + * | | | | | | | | | |LALT |toggle| * `----------------------------------' `----------------------------------' */ [_DEFAULT] = LAYOUT( @@ -91,26 +91,26 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |--------+------+------+------+------+------| |------+------+------+------+------+--------| * | | | | | | F11 | | F12 | | | | | | * |--------+------+------+------+------+------+-------------. ,-------------+------+------+------+------+------+--------| - * | | | | | | |ScLock| | | | Ins | | | | | | | + * | | | | | | |ScLock| | | | Ins | | | | | |CapsLock| * `----------------------+------+------+------+------+------| |------+------+------+------+------+----------------------' - * | | | | | | | Esc | Del | | RAlt | | + * | | | | | | | | | | RAlt | | * | | | | | | | | | | | | * `----------------------------------' `----------------------------------' */ [_RAISE] = 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_SLCK, _______, _______, KC_INS, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, KC_ESC, KC_DEL, _______, KC_RALT, _______ + _______, _______, _______, _______, _______, _______, KC_SLCK, _______, _______, KC_INS, _______, _______, _______, _______, _______, KC_CAPS, + _______, _______, _______, _______, _______, _______, _______, _______, KC_RALT, _______ ), /* - * Navigation Layer: Number keys, navigation + * Navigation Layer: Number keys, navigation, modification * * ,-------------------------------------------. ,-------------------------------------------. * | | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | | * |--------+------+------+------+------+------| |------+------+------+------+------+--------| - * | | | | | | | | | Left | Up | Down | Right| | + * | | | Esc | Del | | | | | Left | Up | Down | Right| | * |--------+------+------+------+------+------+-------------. ,-------------+------+------+------+------+------+--------| * | | | | | | | | | | | | | | | | | | * `----------------------+------+------+------+------+------| |------+------+------+------+------+----------------------' @@ -120,7 +120,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ [_NAV] = LAYOUT( _______, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, _______, - _______, _______, _______, _______, _______, _______, _______, KC_LEFT, KC_UP, KC_DOWN, KC_RGHT, _______, + _______, _______, KC_ESC, KC_DEL, _______, _______, _______, KC_LEFT, KC_UP, KC_DOWN, KC_RGHT, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_RCTL, _______ ), @@ -177,27 +177,22 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { // Double tap gets messed up with macros, turning it off double_tap_it = false; SEND_STRING("()" SS_TAP(X_LEFT)); - clear_oneshot_layer_state(ONESHOT_OTHER_KEY_PRESSED); return false; case M_LRCBR: double_tap_it = false; SEND_STRING("{}" SS_TAP(X_LEFT)); - clear_oneshot_layer_state(ONESHOT_OTHER_KEY_PRESSED); return false; case M_LRBRC: double_tap_it = false; SEND_STRING("[]" SS_TAP(X_LEFT)); - clear_oneshot_layer_state(ONESHOT_OTHER_KEY_PRESSED); return false; case M_LRABR: double_tap_it = false; SEND_STRING("<>" SS_TAP(X_LEFT)); - clear_oneshot_layer_state(ONESHOT_OTHER_KEY_PRESSED); return false; case M_DQUOT: double_tap_it = false; SEND_STRING("''" SS_TAP(X_LEFT)); - clear_oneshot_layer_state(ONESHOT_OTHER_KEY_PRESSED); return false; case DBL_TAP: double_tap_it = !double_tap_it; @@ -206,10 +201,14 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { double_tap_it = false; return true; } - } else if (double_tap_it && keycode != DBL_TAP) { + + } else if (double_tap_it && + keycode != DBL_TAP && + keycode != OSL(_RAISE) && + keycode != OSL(_LOWER) && + keycode != MO(_NAV)) { double_tap_it = false; tap_code16(keycode); - clear_oneshot_layer_state(ONESHOT_OTHER_KEY_PRESSED); } return true; From 421621fbf13df48a462ce33ffd7988a886f3ec06 Mon Sep 17 00:00:00 2001 From: QMK Bot Date: Fri, 10 Jul 2020 22:02:03 +0000 Subject: [PATCH 365/930] format code according to conventions [skip ci] --- keyboards/duck/octagon/keymaps/via/rules.mk | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/keyboards/duck/octagon/keymaps/via/rules.mk b/keyboards/duck/octagon/keymaps/via/rules.mk index a2d6d0a96e85..36b7ba9cbc98 100644 --- a/keyboards/duck/octagon/keymaps/via/rules.mk +++ b/keyboards/duck/octagon/keymaps/via/rules.mk @@ -1,2 +1,2 @@ -VIA_ENABLE = yes -LTO_ENABLE = yes +VIA_ENABLE = yes +LTO_ENABLE = yes From 6609197cde9420b1e9e8b2337d939df6475e8a3c Mon Sep 17 00:00:00 2001 From: ladbahuy <67696967+ladbahuy@users.noreply.github.com> Date: Sat, 11 Jul 2020 17:54:22 +0700 Subject: [PATCH 366/930] [keyboard] Add rartpad (#9614) --- keyboards/rart/rartpad/config.h | 65 +++++++++++++++++++ keyboards/rart/rartpad/info.json | 62 ++++++++++++++++++ .../rart/rartpad/keymaps/default/keymap.c | 54 +++++++++++++++ .../rart/rartpad/keymaps/numpad/keymap.c | 45 +++++++++++++ keyboards/rart/rartpad/rartpad.c | 22 +++++++ keyboards/rart/rartpad/rartpad.h | 41 ++++++++++++ keyboards/rart/rartpad/readme.md | 14 ++++ keyboards/rart/rartpad/rules.mk | 29 +++++++++ 8 files changed, 332 insertions(+) create mode 100644 keyboards/rart/rartpad/config.h create mode 100644 keyboards/rart/rartpad/info.json create mode 100644 keyboards/rart/rartpad/keymaps/default/keymap.c create mode 100644 keyboards/rart/rartpad/keymaps/numpad/keymap.c create mode 100644 keyboards/rart/rartpad/rartpad.c create mode 100644 keyboards/rart/rartpad/rartpad.h create mode 100644 keyboards/rart/rartpad/readme.md create mode 100644 keyboards/rart/rartpad/rules.mk diff --git a/keyboards/rart/rartpad/config.h b/keyboards/rart/rartpad/config.h new file mode 100644 index 000000000000..dfbefec19a51 --- /dev/null +++ b/keyboards/rart/rartpad/config.h @@ -0,0 +1,65 @@ +/* +Copyright 2020 Alabahuy + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License 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 0x414C // "AL" +#define PRODUCT_ID 0x0050 // "P" +#define DEVICE_VER 0x0001 +#define MANUFACTURER Alabahuy +#define PRODUCT RARTPAD +#define DESCRIPTION 5x4 Macropad + +/* key matrix size */ +#define MATRIX_ROWS 5 +#define MATRIX_COLS 4 + +/* key matrix pins */ +#define MATRIX_ROW_PINS { B6, F6, D0, D4, C6 } +#define MATRIX_COL_PINS { B2, D1, D2, D3 } +#define UNUSED_PINS + +/* COL2ROW or ROW2COL */ +#define DIODE_DIRECTION COL2ROW + +#define NUM_LOCK_LED_PIN D7 + +/* 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 ENCODERS_PAD_A { B3, F5 } +#define ENCODERS_PAD_B { B1, F4 } + +#define RGB_DI_PIN F7 +#ifdef RGB_DI_PIN +#define RGBLIGHT_ANIMATIONS +#define RGBLED_NUM 5 +#define RGBLIGHT_HUE_STEP 8 +#define RGBLIGHT_SAT_STEP 8 +#define RGBLIGHT_VAL_STEP 8 +#define RGBLIGHT_LIMIT_VAL 240 +#define RGBLIGHT_SLEEP +#endif diff --git a/keyboards/rart/rartpad/info.json b/keyboards/rart/rartpad/info.json new file mode 100644 index 000000000000..8ec37ece0b81 --- /dev/null +++ b/keyboards/rart/rartpad/info.json @@ -0,0 +1,62 @@ +{ + "keyboard_name": "RARTPAD", + "url": "", + "maintainer": "Alabahuy", + "width": 5, + "height": 4, + "layouts": { + "LAYOUT_ortho_5x4": { + "layout": [ + {"label": "Numlock", "x": 0, "y": 0}, + {"label": "/", "x": 1, "y": 0}, + {"label": "*", "x": 2, "y": 0}, + {"label": "-", "x": 3, "y": 0}, + + {"label": "7", "x": 0, "y": 1}, + {"label": "8", "x": 1, "y": 1}, + {"label": "9", "x": 2, "y": 1}, + {"label": "=", "x": 3, "y": 1}, + + {"label": "4", "x": 0, "y": 2}, + {"label": "5", "x": 1, "y": 2}, + {"label": "6", "x": 2, "y": 2}, + {"label": "+", "x": 3, "y": 2}, + + {"label": "1", "x": 0, "y": 3}, + {"label": "2", "x": 1, "y": 3}, + {"label": "3", "x": 2, "y": 3}, + {"label": "Esc", "x": 3, "y": 3}, + + {"label": "0", "x": 0, "y": 4}, + {"label": "00", "x": 1, "y": 4}, + {"label": ".", "x": 2, "y": 4}, + {"label": "Enter", "x": 3, "y": 4} + ] + }, + "LAYOUT_numpad_5x4": { + "layout": [ + {"label": "Numlock", "x": 0, "y": 0}, + {"label": "/", "x": 1, "y": 0}, + {"label": "*", "x": 2, "y": 0}, + {"label": "-", "x": 3, "y": 0}, + + {"label": "7", "x": 0, "y": 1}, + {"label": "8", "x": 1, "y": 1}, + {"label": "9", "x": 2, "y": 1}, + + {"label": "4", "x": 0, "y": 2}, + {"label": "5", "x": 1, "y": 2}, + {"label": "6", "x": 2, "y": 2}, + {"label": "+", "x": 3, "y": 1, "h": 2}, + + {"label": "1", "x": 0, "y": 3}, + {"label": "2", "x": 1, "y": 3}, + {"label": "3", "x": 2, "y": 3}, + + {"label": "0", "x": 0, "y": 4, "w": 2}, + {"label": ".", "x": 2, "y": 4}, + {"label": "Enter", "x": 3, "y": 3, "h": 2} + ] + } + } +} diff --git a/keyboards/rart/rartpad/keymaps/default/keymap.c b/keyboards/rart/rartpad/keymaps/default/keymap.c new file mode 100644 index 000000000000..0d7b6686ae8a --- /dev/null +++ b/keyboards/rart/rartpad/keymaps/default/keymap.c @@ -0,0 +1,54 @@ +/* +Copyright 2020 Alabahuy + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public 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_5x4( + KC_NLCK, KC_PSLS, KC_PAST, KC_INS, + KC_P7, KC_P8, KC_P9, KC_PEQL, + KC_P4, KC_P5, KC_P6, KC_PPLS, + KC_P1, KC_P2, KC_P3, KC_PMNS, + MO(1), KC_P0, KC_PDOT, KC_PENT + ), + + [1] = LAYOUT_ortho_5x4( + KC_TRNS, RGB_HUI, RGB_HUD, KC_TRNS, + RGB_SAI, RGB_SAD, KC_MNXT, KC_MPRV, + RGB_VAI, RGB_VAD, KC_MSTP, KC_MPLY, + KC_COPY, KC_PSTE, KC_MYCM, KC_CALC, + KC_TRNS, RGB_TOG, KC_TRNS, 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_WH_D); + } else { + tap_code(KC_WH_U); + } + } +} + diff --git a/keyboards/rart/rartpad/keymaps/numpad/keymap.c b/keyboards/rart/rartpad/keymaps/numpad/keymap.c new file mode 100644 index 000000000000..a3508ece9cc1 --- /dev/null +++ b/keyboards/rart/rartpad/keymaps/numpad/keymap.c @@ -0,0 +1,45 @@ +/* +Copyright 2020 Alabahuy + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public 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_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 + ) +}; + +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_PGUP); + } else { + tap_code(KC_PGDN); + } + } +} diff --git a/keyboards/rart/rartpad/rartpad.c b/keyboards/rart/rartpad/rartpad.c new file mode 100644 index 000000000000..566c3fa466b9 --- /dev/null +++ b/keyboards/rart/rartpad/rartpad.c @@ -0,0 +1,22 @@ +/* Copyright 2020 Alabahuy + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#include "rartpad.h" + +bool led_update_kb(led_t led_state) { + if (led_update_user(led_state)) { + writePin(NUM_LOCK_LED_PIN, led_state.num_lock); + } + return true; +} diff --git a/keyboards/rart/rartpad/rartpad.h b/keyboards/rart/rartpad/rartpad.h new file mode 100644 index 000000000000..2e516e2cfe85 --- /dev/null +++ b/keyboards/rart/rartpad/rartpad.h @@ -0,0 +1,41 @@ + +#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_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 }, \ +} +#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 }, \ +} diff --git a/keyboards/rart/rartpad/readme.md b/keyboards/rart/rartpad/readme.md new file mode 100644 index 000000000000..3f730c59d3e9 --- /dev/null +++ b/keyboards/rart/rartpad/readme.md @@ -0,0 +1,14 @@ +# [RARTPAD](https://github.com/alabahuy/RART/tree/master/RARTPAD) + +![rartpad](https://user-images.githubusercontent.com/67696967/86514870-3931bf00-be3f-11ea-8177-29e80add2ce4.jpeg) +5x4 Macropad pcb with double encoder, based on IMKG (Indonesia Mechanical Keyboard Group) + +* Keyboard Maintainer: [Alabahuy](https://github.com/alabahuy) +* Hardware Supported: RARTPAD PCB, Promicro, Mini USB, Encoders +* Hardware Availability: Private GB + +Make example for this keyboard (after setting up your build environment): + + make rart/rartpad: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/rart/rartpad/rules.mk b/keyboards/rart/rartpad/rules.mk new file mode 100644 index 000000000000..c05f7eb063ec --- /dev/null +++ b/keyboards/rart/rartpad/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 = 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 +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +AUDIO_ENABLE = no +RGBLIGHT_ENABLE = yes +ENCODER_ENABLE = yes + +LAYOUTS = ortho_5x4 numpad_5x4 From 817de51c12fba2f616a24dab05328f107a54536a Mon Sep 17 00:00:00 2001 From: Randall Mason Date: Sat, 11 Jul 2020 06:09:40 -0500 Subject: [PATCH 367/930] Add config for Atreus based on Adafruit Feather BLE (#9140) Co-authored-by: Joel Challis Co-authored-by: Ryan Co-authored-by: Drashna Jaelre Co-authored-by: Erovia --- keyboards/atreus/atreus.h | 2 + keyboards/atreus/feather/config.h | 40 +++++++++++++++++ keyboards/atreus/feather/feather.c | 16 +++++++ keyboards/atreus/feather/feather.h | 17 +++++++ keyboards/atreus/feather/readme.md | 60 +++++++++++++++++++++++++ keyboards/atreus/feather/rules.mk | 21 +++++++++ keyboards/atreus/keymaps/clash/keymap.c | 41 +++++++++++++++++ 7 files changed, 197 insertions(+) create mode 100644 keyboards/atreus/feather/config.h create mode 100644 keyboards/atreus/feather/feather.c create mode 100644 keyboards/atreus/feather/feather.h create mode 100644 keyboards/atreus/feather/readme.md create mode 100644 keyboards/atreus/feather/rules.mk create mode 100644 keyboards/atreus/keymaps/clash/keymap.c diff --git a/keyboards/atreus/atreus.h b/keyboards/atreus/atreus.h index a3d350775991..f4e7ba7f391f 100644 --- a/keyboards/atreus/atreus.h +++ b/keyboards/atreus/atreus.h @@ -22,6 +22,8 @@ #include "astar.h" #elif KEYBOARD_atreus_astar_mirrored #include "astar_mirrored.h" +#elif KEYBOARD_atreus_feather + #include "feather.h" #elif KEYBOARD_atreus_teensy2 #include "teensy2.h" #elif KEYBOARD_atreus_promicro diff --git a/keyboards/atreus/feather/config.h b/keyboards/atreus/feather/config.h new file mode 100644 index 000000000000..72c9cd716b15 --- /dev/null +++ b/keyboards/atreus/feather/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 { D0, D1, D3, D2 } +// #define MATRIX_COL_PINS { D7, C6, B5, B4, E6, D4, B6, F6, F7, D6, B7 } +#define MATRIX_ROW_PINS { B7, D6, C7, F5 } +#define MATRIX_COL_PINS { D7, B5, D1, D0, C6, B6, F0, D2, D3, F4, F1 } +#define UNUSED_PINS + +/* COL2ROW, ROW2COL*/ +#define DIODE_DIRECTION COL2ROW + +#define OUTPUT_AUTO_ENABLE diff --git a/keyboards/atreus/feather/feather.c b/keyboards/atreus/feather/feather.c new file mode 100644 index 000000000000..ceebc51c2327 --- /dev/null +++ b/keyboards/atreus/feather/feather.c @@ -0,0 +1,16 @@ +/* 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 "feather.h" diff --git a/keyboards/atreus/feather/feather.h b/keyboards/atreus/feather/feather.h new file mode 100644 index 000000000000..bf74ceb17f4b --- /dev/null +++ b/keyboards/atreus/feather/feather.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/feather/readme.md b/keyboards/atreus/feather/readme.md new file mode 100644 index 000000000000..f584da22c012 --- /dev/null +++ b/keyboards/atreus/feather/readme.md @@ -0,0 +1,60 @@ +# Bluetreus - a conversion of an Atreus to use a Bluetooth microcontroller + +I have created a keymap for this with Bluetooth control on layer 2 so that you +can switch the keyboard between auto, USB only, and Bluetooth only. I'm +working on fixing turning on auto by default, but have still not succeeded. + +To build it and flash it, do: + +``` +make atreus/feather:clash:flash +``` + +## Wiring it up +Physically, SDA to pin 13 on the new board are connected to what 9-1 were +connected to on the old board. Pin 0 from the old board is brought over to the +other side with a jumper wire to pin a2. TX, RX, A5, A4, A3 on the new board +connect to what a0 to 12 connected to on the old board. GND attaches to g. +You have to bend some of the pins at about a 45 degree angle to make them line up. +Here's a side view of what the most bent pins look like: +![Side View](https://i.imgur.com/S6ngibe.jpg) +Here's a top view, USB port down, wireless antenna up. Note: the USB port orientation is opposite what it used to be. +![Top View](https://i.imgur.com/DBjkxU2.jpg) + +### New board: +This is an [Adafruit Feather BLE](https://learn.adafruit.com/adafruit-feather-32u4-bluefruit-le/pinouts) + +|QMK | Screen Print | Feather |SCREEN|QMK REF | +|----|--------------|-------------|------|---------| +| D1 | SDA | RADIO | dfu | | +| D0 | SCL | | 1/TX | D3 | +| C6 | 5 | | 0/RX | D2 | +| D7 | 6 | | MISO | B3/Blue | +| B5 | 9 | | MOSI | B2/Blue | +| B6 | 10 | | SCK | B1/Blue | +| B7 | 11 | | A5 | F0 | +| D6 | 12 | | a4 | F1 | +| C7 | 13 | | a3 | F4 | +| | usb | | a2 | F5 | +| | e0 | | a1 | F6 | +| | bat | | a0 | | +| | Battery | | GND | | +| | Connector | | ARf | | +| | | | | USB PORT | 3V | | +| | v v | | RST | | + +### Old board: +This is an A Star, non-flipped + +|QMK| Scrn | A | Scrn|QMK | +|---|------|-----|-----|----| +| b5| 9 | USB | a0 | F7 | +| b4| 8 | port| a1 | F6 | +| e6| 7 | | 10 | B6 | +| d7| 6 | | 11 | B7 | +| c6| 5 | | 12 | D6 | +| d4| 4 | | rst | RST| +| d0| 3 | | 3v | x | +| d1| 2 | | 5v | x | +| d3| 1 | | g | G | +| d2| 0 | | v | x | diff --git a/keyboards/atreus/feather/rules.mk b/keyboards/atreus/feather/rules.mk new file mode 100644 index 000000000000..e40b103acb1e --- /dev/null +++ b/keyboards/atreus/feather/rules.mk @@ -0,0 +1,21 @@ +# 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 = caterina + +# Build Options +# change yes to no to disable +# +BLUETOOTH = AdafruitBLE +CONSOLE_ENABLE = no diff --git a/keyboards/atreus/keymaps/clash/keymap.c b/keyboards/atreus/keymaps/clash/keymap.c new file mode 100644 index 000000000000..3a8b5bf47930 --- /dev/null +++ b/keyboards/atreus/keymaps/clash/keymap.c @@ -0,0 +1,41 @@ +#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 _QW 0 +#define _RS 1 +#define _LW 2 + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_QW] = 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 , + KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH , + KC_ESC, KC_TAB, KC_LGUI, KC_LSFT, KC_BSPC, KC_LCTL, KC_LALT, KC_SPC, MO(_RS), KC_MINS, KC_QUOT, KC_ENT + ), + + /* + * ! @ up { } || pgup 7 8 9 * + * # left down right $ || pgdn 4 5 6 + + * [ ] ( ) & || ` 1 2 3 \ + * lower insert super shift del ctrl || alt space fn . 0 = + */ + [_RS] = LAYOUT( /* [> RAISE <] */ + KC_EXLM, KC_AT, KC_UP, KC_LCBR, KC_RCBR, KC_PGUP, KC_7, KC_8, KC_9, KC_ASTR , + KC_HASH, KC_LEFT, KC_DOWN, KC_RGHT, KC_DLR, KC_PGDN, KC_4, KC_5, KC_6, KC_PLUS , + KC_LBRC, KC_RBRC, KC_LPRN, KC_RPRN, KC_AMPR, KC_GRV, KC_1, KC_2, KC_3, KC_BSLS , + TG(_LW), KC_INS, KC_LGUI, KC_LSFT, KC_DEL, KC_LCTL, KC_LALT, KC_SPC, KC_TRNS, KC_DOT, KC_0, KC_EQL ), + /* + * insert home mup end pgup || mouse1 F7 F8 F9 F10 + * USB mlft mdwn mrght pgdn || mouse2 F4 F5 F6 F11 + * Blue volup reset || mouse3 F1 F2 F3 F12 + * auto voldn super shift bksp ctrl || alt space L0 prtsc scroll pause + */ + [_LW] = LAYOUT( /* [> LOWER <] */ + KC_INS, KC_HOME, KC_MS_U, KC_END, KC_PGUP, KC_BTN1, KC_F7, KC_F8, KC_F9, KC_F10 , + OUT_USB, KC_MS_L, KC_MS_D, KC_MS_R, KC_PGDN, KC_BTN2, KC_F4, KC_F5, KC_F6, KC_F11 , + OUT_BT, KC_VOLU, KC_NO, KC_NO, RESET, KC_BTN3, KC_F1, KC_F2, KC_F3, KC_F12 , + OUT_AUTO, KC_VOLD, KC_LGUI, KC_LSFT, KC_BSPC, KC_LCTL, KC_LALT, KC_SPC, TO(_QW), KC_PSCR, KC_SLCK, KC_PAUS ) +}; From 63fe92017ccf49739297a472ed5072a4abd7b1de Mon Sep 17 00:00:00 2001 From: Brandon Claveria <48102030+swiftrax@users.noreply.github.com> Date: Sat, 11 Jul 2020 04:28:22 -0700 Subject: [PATCH 368/930] [keyboard] added swiftrax/cowfish (#9621) Co-authored-by: Joel Challis Co-authored-by: Swiftrax --- keyboards/handwired/swiftrax/cowfish/config.h | 49 +++++++++++ .../handwired/swiftrax/cowfish/cowfish.c | 1 + .../handwired/swiftrax/cowfish/cowfish.h | 86 +++++++++++++++++++ .../handwired/swiftrax/cowfish/info.json | 21 +++++ .../swiftrax/cowfish/keymaps/default/keymap.c | 29 +++++++ .../swiftrax/cowfish/keymaps/via/keymap.c | 28 ++++++ .../swiftrax/cowfish/keymaps/via/rules.mk | 1 + .../handwired/swiftrax/cowfish/readme.md | 13 +++ keyboards/handwired/swiftrax/cowfish/rules.mk | 31 +++++++ 9 files changed, 259 insertions(+) create mode 100644 keyboards/handwired/swiftrax/cowfish/config.h create mode 100644 keyboards/handwired/swiftrax/cowfish/cowfish.c create mode 100644 keyboards/handwired/swiftrax/cowfish/cowfish.h create mode 100644 keyboards/handwired/swiftrax/cowfish/info.json create mode 100644 keyboards/handwired/swiftrax/cowfish/keymaps/default/keymap.c create mode 100644 keyboards/handwired/swiftrax/cowfish/keymaps/via/keymap.c create mode 100644 keyboards/handwired/swiftrax/cowfish/keymaps/via/rules.mk create mode 100644 keyboards/handwired/swiftrax/cowfish/readme.md create mode 100644 keyboards/handwired/swiftrax/cowfish/rules.mk diff --git a/keyboards/handwired/swiftrax/cowfish/config.h b/keyboards/handwired/swiftrax/cowfish/config.h new file mode 100644 index 000000000000..d8ee8855399f --- /dev/null +++ b/keyboards/handwired/swiftrax/cowfish/config.h @@ -0,0 +1,49 @@ +/* +Copyright 2020 Swiftrax + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License 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 0x7161 +#define PRODUCT_ID 0x5239 +#define DEVICE_VER 0x0001 +#define MANUFACTURER Swiftrax +#define PRODUCT CowFish +#define DESCRIPTION TKL with F13 + +/* key matrix size */ +#define MATRIX_ROWS 6 +#define MATRIX_COLS 18 + +// ROWS: Top to bottom, COLS: Left to right + +#define MATRIX_ROW_PINS { D0, D1, B7, E6, D4, D6 } +#define MATRIX_COL_PINS { B3, B2, B1, F0, F1, F4, F5, F6, F7, B5, B6, B4, C6, D7, C7, D2, D3, D5} + +/* 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 + +/*EEPROM for via*/ +#define DYNAMIC_KEYMAP_LAYER_COUNT 3 diff --git a/keyboards/handwired/swiftrax/cowfish/cowfish.c b/keyboards/handwired/swiftrax/cowfish/cowfish.c new file mode 100644 index 000000000000..7debc6278226 --- /dev/null +++ b/keyboards/handwired/swiftrax/cowfish/cowfish.c @@ -0,0 +1 @@ +#include "cowfish.h" diff --git a/keyboards/handwired/swiftrax/cowfish/cowfish.h b/keyboards/handwired/swiftrax/cowfish/cowfish.h new file mode 100644 index 000000000000..31165b07677a --- /dev/null +++ b/keyboards/handwired/swiftrax/cowfish/cowfish.h @@ -0,0 +1,86 @@ +#pragma once + +#include "quantum.h" + +// readability +#define XXX KC_NO + +#define LAYOUT( \ + K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K015, K016, K017, \ + K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, K115, K116, K117, \ + K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K214, K215, K216, K217, \ + K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K313, \ + K400, K401, K402, K403, K404, K405, K406, K407, K408, K409, K410, K413, K416, \ + K500, K501, K502, K505, K508, K509, K511, K513, K515, K516, K517 \ +) { \ + { K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, XXX, K015, K016, K017 }, \ + { K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, K115, K116, K117 }, \ + { K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, XXX, K214, K215, K216, K217 }, \ + { K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, XXX, K313, XXX, XXX, XXX, XXX }, \ + { K400, K401, K402, K403, K404, K405, K406, K407, K408, K409, K410, XXX, XXX, K413, XXX, XXX, K416, XXX }, \ + { K500, K501, K502, XXX, XXX, K505, XXX, XXX, K508, K509, XXX, K511, XXX, K513, XXX, K515, K516, K517 } \ +} + +#define LAYOUT_all( \ + K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K015, K016, K017, \ + K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, K115, K116, K117, \ + K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K214, K215, K216, K217, \ + K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K313, \ + K400, K401, K402, K403, K404, K405, K406, K407, K408, K409, K410, K413, K416, \ + K500, K501, K502, K505, K508, K509, K511, K513, K515, K516, K517 \ +) { \ + { K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, XXX, K015, K016, K017 }, \ + { K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, K115, K116, K117 }, \ + { K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, XXX, K214, K215, K216, K217 }, \ + { K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, XXX, K313, XXX, XXX, XXX, XXX }, \ + { K400, K401, K402, K403, K404, K405, K406, K407, K408, K409, K410, XXX, XXX, K413, XXX, XXX, K416, XXX }, \ + { K500, K501, K502, XXX, XXX, K505, XXX, XXX, K508, K509, XXX, K511, XXX, K513, XXX, K515, K516, K517 } \ +} + +#define LAYOUT_split_bs( \ + K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K015, K016, K017, \ + K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, K115, K116, K117, \ + K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K214, K215, K216, K217, \ + K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K313, \ + K400, K401, K402, K403, K404, K405, K406, K407, K408, K409, K410, K413, K416, \ + K500, K501, K502, K505, K508, K509, K511, K513, K515, K516, K517 \ +) { \ + { K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, XXX, K015, K016, K017 }, \ + { K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, K115, K116, K117 }, \ + { K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, XXX, K214, K215, K216, K217 }, \ + { K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, XXX, K313, XXX, XXX, XXX, XXX }, \ + { K400, K401, K402, K403, K404, K405, K406, K407, K408, K409, K410, XXX, XXX, K413, XXX, XXX, K416, XXX }, \ + { K500, K501, K502, XXX, XXX, K505, XXX, XXX, K508, K509, XXX, K511, XXX, K513, XXX, K515, K516, K517 } \ +} + +#define LAYOUT_split_bs_tsangan( \ + K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K015, K016, K017, \ + K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, K115, K116, K117, \ + K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K214, K215, K216, K217, \ + K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K313, \ + K400, K401, K402, K403, K404, K405, K406, K407, K408, K409, K410, K413, K416, \ + K500, K501, K502, K505, K508, K511, K513, K515, K516, K517 \ +) { \ + { K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, XXX, K015, K016, K017 }, \ + { K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, K115, K116, K117 }, \ + { K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, XXX, K214, K215, K216, K217 }, \ + { K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, XXX, K313, XXX, XXX, XXX, XXX }, \ + { K400, K401, K402, K403, K404, K405, K406, K407, K408, K409, K410, XXX, XXX, K413, XXX, XXX, K416, XXX }, \ + { K500, K501, K502, XXX, XXX, K505, XXX, XXX, K508, XXX, XXX, K511, XXX, K513, XXX, K515, K516, K517 } \ +} + +#define LAYOUT_tsangan( \ + K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K015, K016, K017, \ + K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K115, K116, K117, \ + K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K214, K215, K216, K217, \ + K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K313, \ + K400, K401, K402, K403, K404, K405, K406, K407, K408, K409, K410, K413, K416, \ + K500, K501, K502, K505, K508, K511, K513, K515, K516, K517 \ +) { \ + { K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, XXX, K015, K016, K017 }, \ + { K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, XXX, K115, K116, K117 }, \ + { K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, XXX, K214, K215, K216, K217 }, \ + { K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, XXX, K313, XXX, XXX, XXX, XXX }, \ + { K400, K401, K402, K403, K404, K405, K406, K407, K408, K409, K410, XXX, XXX, K413, XXX, XXX, K416, XXX }, \ + { K500, K501, K502, XXX, XXX, K505, XXX, XXX, K508, XXX, XXX, K511, XXX, K513, XXX, K515, K516, K517 } \ +} diff --git a/keyboards/handwired/swiftrax/cowfish/info.json b/keyboards/handwired/swiftrax/cowfish/info.json new file mode 100644 index 000000000000..e7f1523601ee --- /dev/null +++ b/keyboards/handwired/swiftrax/cowfish/info.json @@ -0,0 +1,21 @@ +{ + "keyboard_name": "CowFish", + "url": "", + "maintainer": "swiftrax", + "width": 18.25, + "height": 6.5, + "layouts": { + "LAYOUT": { + "layout": [{"x":0, "y":0}, {"x":1.25, "y":0}, {"x":2.25, "y":0}, {"x":3.25, "y":0}, {"x":4.25, "y":0}, {"x":5.5, "y":0}, {"x":6.5, "y":0}, {"x":7.5, "y":0}, {"x":8.5, "y":0}, {"x":9.75, "y":0}, {"x":10.75, "y":0}, {"x":11.75, "y":0}, {"x":12.75, "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}, {"x":14, "y":1.25}, {"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_tsangan": { + "layout": [{"x":0, "y":0}, {"x":1.25, "y":0}, {"x":2.25, "y":0}, {"x":3.25, "y":0}, {"x":4.25, "y":0}, {"x":5.5, "y":0}, {"x":6.5, "y":0}, {"x":7.5, "y":0}, {"x":8.5, "y":0}, {"x":9.75, "y":0}, {"x":10.75, "y":0}, {"x":11.75, "y":0}, {"x":12.75, "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.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_full_bs": { + "layout": [{"x":0, "y":0}, {"x":1.25, "y":0}, {"x":2.25, "y":0}, {"x":3.25, "y":0}, {"x":4.25, "y":0}, {"x":5.5, "y":0}, {"x":6.5, "y":0}, {"x":7.5, "y":0}, {"x":8.5, "y":0}, {"x":9.75, "y":0}, {"x":10.75, "y":0}, {"x":11.75, "y":0}, {"x":12.75, "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_split_bs_tsangan": { + "layout": [{"x":0, "y":0}, {"x":1.25, "y":0}, {"x":2.25, "y":0}, {"x":3.25, "y":0}, {"x":4.25, "y":0}, {"x":5.5, "y":0}, {"x":6.5, "y":0}, {"x":7.5, "y":0}, {"x":8.5, "y":0}, {"x":9.75, "y":0}, {"x":10.75, "y":0}, {"x":11.75, "y":0}, {"x":12.75, "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}, {"x":14, "y":1.25}, {"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.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}] + } + } +} \ No newline at end of file diff --git a/keyboards/handwired/swiftrax/cowfish/keymaps/default/keymap.c b/keyboards/handwired/swiftrax/cowfish/keymaps/default/keymap.c new file mode 100644 index 000000000000..7df7c1a62afd --- /dev/null +++ b/keyboards/handwired/swiftrax/cowfish/keymaps/default/keymap.c @@ -0,0 +1,29 @@ +#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 { + _MA, + _FN +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +[_MA] = 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_F13, KC_P1, 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_BSLS, 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_MENU, KC_RCTRL, KC_LEFT, KC_DOWN, KC_RGHT), + +[_FN] = 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_F13, 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_BSLS, 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_MENU, KC_RCTRL, KC_LEFT, KC_DOWN, KC_RGHT) +}; diff --git a/keyboards/handwired/swiftrax/cowfish/keymaps/via/keymap.c b/keyboards/handwired/swiftrax/cowfish/keymaps/via/keymap.c new file mode 100644 index 000000000000..74a8e0cef136 --- /dev/null +++ b/keyboards/handwired/swiftrax/cowfish/keymaps/via/keymap.c @@ -0,0 +1,28 @@ +#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_F13, 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_BSLS, 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_RCTRL, KC_LEFT, KC_DOWN, KC_RGHT), + +[1] = LAYOUT_all( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______), + +[2] = LAYOUT_all( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______) +}; diff --git a/keyboards/handwired/swiftrax/cowfish/keymaps/via/rules.mk b/keyboards/handwired/swiftrax/cowfish/keymaps/via/rules.mk new file mode 100644 index 000000000000..036bd6d1c3ec --- /dev/null +++ b/keyboards/handwired/swiftrax/cowfish/keymaps/via/rules.mk @@ -0,0 +1 @@ +VIA_ENABLE = yes \ No newline at end of file diff --git a/keyboards/handwired/swiftrax/cowfish/readme.md b/keyboards/handwired/swiftrax/cowfish/readme.md new file mode 100644 index 000000000000..78be471df4fe --- /dev/null +++ b/keyboards/handwired/swiftrax/cowfish/readme.md @@ -0,0 +1,13 @@ +# CowFish + +A TKL with F13 that uses Ai03's unified daughter board + +* Keyboard Maintainer: Swiftrax +* Hardware Supported: CowFish +* Hardware Availability: https://github.com/swiftrax + +Make example for this keyboard (after setting up your build environment): + + make handwired/swiftrax/cowfish: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/swiftrax/cowfish/rules.mk b/keyboards/handwired/swiftrax/cowfish/rules.mk new file mode 100644 index 000000000000..ad6547e1e7b1 --- /dev/null +++ b/keyboards/handwired/swiftrax/cowfish/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 = 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 +AUDIO_ENABLE = no # Audio output +FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches \ No newline at end of file From ca946f61165ba6e7cfa33bee1c5ed895c67c0e74 Mon Sep 17 00:00:00 2001 From: TerryMathews Date: Sat, 11 Jul 2020 07:28:53 -0400 Subject: [PATCH 369/930] Initial support for TKC Alice (#9640) Co-authored-by: Ryan Co-authored-by: Erovia --- keyboards/tkc/osav2/README.md | 15 ++ keyboards/tkc/osav2/config.h | 223 +++++++++++++++++++ keyboards/tkc/osav2/info.json | 21 ++ keyboards/tkc/osav2/keymaps/default/keymap.c | 33 +++ keyboards/tkc/osav2/keymaps/via/keymap.c | 49 ++++ keyboards/tkc/osav2/keymaps/via/rules.mk | 1 + keyboards/tkc/osav2/osav2.c | 33 +++ keyboards/tkc/osav2/osav2.h | 117 ++++++++++ keyboards/tkc/osav2/rules.mk | 33 +++ 9 files changed, 525 insertions(+) create mode 100644 keyboards/tkc/osav2/README.md create mode 100644 keyboards/tkc/osav2/config.h create mode 100644 keyboards/tkc/osav2/info.json create mode 100644 keyboards/tkc/osav2/keymaps/default/keymap.c create mode 100644 keyboards/tkc/osav2/keymaps/via/keymap.c create mode 100644 keyboards/tkc/osav2/keymaps/via/rules.mk create mode 100644 keyboards/tkc/osav2/osav2.c create mode 100644 keyboards/tkc/osav2/osav2.h create mode 100644 keyboards/tkc/osav2/rules.mk diff --git a/keyboards/tkc/osav2/README.md b/keyboards/tkc/osav2/README.md new file mode 100644 index 000000000000..749ffe087097 --- /dev/null +++ b/keyboards/tkc/osav2/README.md @@ -0,0 +1,15 @@ +# TKC OSA v2 (One Sweet Alice) + +![OSA v2](https://i.imgur.com/U2x7TQ8.jpg) + +The TKC OSA v2 is an ATMega32u4 powered, USB Type C, Alice compatible PCB and was created specifically for the OSA case, but with considerations to make it compatible with the Lubrigante acrylic cases (except for the Type C connector it should also be compatible with original TGR Alice cases). + +* Keyboard Maintainer: [Terry Mathews](https://github.com/TerryMathews/) +* Hardware Supported: TKC OSA v2 PCB +* Hardware Availability: https://thekey.company/collections/osav2-keyboard + +Make example for this keyboard (after setting up your build environment): + + make tkc/osav2: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/tkc/osav2/config.h b/keyboards/tkc/osav2/config.h new file mode 100644 index 000000000000..db00b02413b5 --- /dev/null +++ b/keyboards/tkc/osav2/config.h @@ -0,0 +1,223 @@ +/* +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 . +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0x544B //TK +#define PRODUCT_ID 0x0005 //Alice +#define DEVICE_VER 0x0001 +#define MANUFACTURER The Key Company +#define PRODUCT OSA v2 +#define DESCRIPTION QMK keyboard firmware for TKC OSA v2 (One Sweet Alice) + +/* 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 { F0, F1, F4, F5, F6, B0, B1, B2, B3, B7 } +#define MATRIX_COL_PINS { B4, D7, D5, D3, D2, D0, D1, 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 D6 + #define BACKLIGHT_BREATHING + #define BACKLIGHT_LEVELS 3 + + #define RGB_DI_PIN D4 + #ifdef RGB_DI_PIN + #define RGBLED_NUM 9 +// #define RGBLIGHT_HUE_STEP 10 +// #define RGBLIGHT_SAT_STEP 17 +// #define RGBLIGHT_VAL_STEP 17 +// #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 128 // 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 + +/* Bootmagic Lite key configuration */ +//#define BOOTMAGIC_LITE_ROW 0 +//#define BOOTMAGIC_LITE_COLUMN 0 diff --git a/keyboards/tkc/osav2/info.json b/keyboards/tkc/osav2/info.json new file mode 100644 index 000000000000..adbc6ee1a9ed --- /dev/null +++ b/keyboards/tkc/osav2/info.json @@ -0,0 +1,21 @@ +{ + "keyboard_name": "TKC OSA v2", + "url": "", + "maintainer": "qmk", + "width": 18.25, + "height": 5, + "layouts": { + "LAYOUT_default_ansi": { + "layout": [{"label":"Esc", "x":0, "y":0}, {"label":"~", "x":1.25, "y":0}, {"label":"!", "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":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":"+", "x":15.25, "y":0}, {"label":"Backspace", "x":16.25, "y":0, "w":2}, {"label":"Page Up", "x":0, "y":1}, {"label":"Tab", "x":1.25, "y":1, "w":1.5}, {"label":"Q", "x":2.75, "y":1}, {"label":"W", "x":3.75, "y":1}, {"label":"E", "x":4.75, "y":1}, {"label":"R", "x":5.75, "y":1}, {"label":"T", "x":6.75, "y":1}, {"label":"Y", "x":9.75, "y":1}, {"label":"U", "x":10.75, "y":1}, {"label":"I", "x":11.75, "y":1}, {"label":"O", "x":12.75, "y":1}, {"label":"P", "x":13.75, "y":1}, {"label":"{", "x":14.75, "y":1}, {"label":"}", "x":15.75, "y":1}, {"label":"|", "x":16.75, "y":1, "w":1.5}, {"label":"Page Down", "x":0, "y":2}, {"label":"Caps Lock", "x":1.25, "y":2, "w":1.75}, {"label":"A", "x":3, "y":2}, {"label":"S", "x":4, "y":2}, {"label":"D", "x":5, "y":2}, {"label":"F", "x":6, "y":2}, {"label":"G", "x":7, "y":2}, {"label":"H", "x":10, "y":2}, {"label":"J", "x":11, "y":2}, {"label":"K", "x":12, "y":2}, {"label":"L", "x":13, "y":2}, {"label":":", "x":14, "y":2}, {"label":"\"", "x":15, "y":2}, {"label":"Enter", "x":16, "y":2, "w":2.25}, {"label":"Shift", "x":1.25, "y":3, "w":2.25}, {"label":"Z", "x":3.5, "y":3}, {"label":"X", "x":4.5, "y":3}, {"label":"C", "x":5.5, "y":3}, {"label":"V", "x":6.5, "y":3}, {"label":"B", "x":7.5, "y":3}, {"label":"B", "x":9.5, "y":3}, {"label":"N", "x":10.5, "y":3}, {"label":"M", "x":11.5, "y":3}, {"label":"<", "x":12.5, "y":3}, {"label":">", "x":13.5, "y":3}, {"label":"?", "x":14.5, "y":3}, {"label":"Shift", "x":15.5, "y":3, "w":2.75}, {"label":"Ctrl", "x":1.25, "y":4, "w":1.5}, {"label":"Win", "x":4.25, "y":4, "w":1.5}, {"x":5.75, "y":4, "w":2.25}, {"label":"Fn", "x":8, "y":4}, {"x":9.5, "y":4, "w":2.75}, {"label":"Alt", "x":12.25, "y":4, "w":1.5}, {"label":"Ctrl", "x":16.75, "y":4, "w":1.5}] + }, + "LAYOUT_split_backspace": { + "layout": [{"label":"Delete", "x":0, "y":0}, {"label":"Esc", "x":1.25, "y":0}, {"label":"!", "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":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":"+", "x":15.25, "y":0}, {"label":"~", "x":16.25, "y":0}, {"label":"|", "x":17.25, "y":0}, {"label":"Page Up", "x":0, "y":1}, {"label":"Tab", "x":1.25, "y":1, "w":1.5}, {"label":"Q", "x":2.75, "y":1}, {"label":"W", "x":3.75, "y":1}, {"label":"E", "x":4.75, "y":1}, {"label":"R", "x":5.75, "y":1}, {"label":"T", "x":6.75, "y":1}, {"label":"Y", "x":9.75, "y":1}, {"label":"U", "x":10.75, "y":1}, {"label":"I", "x":11.75, "y":1}, {"label":"O", "x":12.75, "y":1}, {"label":"P", "x":13.75, "y":1}, {"label":"{", "x":14.75, "y":1}, {"label":"}", "x":15.75, "y":1}, {"label":"Backspace", "x":16.75, "y":1, "w":1.5}, {"label":"Page Down", "x":0, "y":2}, {"label":"Caps Lock", "x":1.25, "y":2, "w":1.75}, {"label":"A", "x":3, "y":2}, {"label":"S", "x":4, "y":2}, {"label":"D", "x":5, "y":2}, {"label":"F", "x":6, "y":2}, {"label":"G", "x":7, "y":2}, {"label":"H", "x":10, "y":2}, {"label":"J", "x":11, "y":2}, {"label":"K", "x":12, "y":2}, {"label":"L", "x":13, "y":2}, {"label":":", "x":14, "y":2}, {"label":"\"", "x":15, "y":2}, {"label":"Enter", "x":16, "y":2, "w":2.25}, {"label":"Shift", "x":1.25, "y":3, "w":2.25}, {"label":"Z", "x":3.5, "y":3}, {"label":"X", "x":4.5, "y":3}, {"label":"C", "x":5.5, "y":3}, {"label":"V", "x":6.5, "y":3}, {"label":"B", "x":7.5, "y":3}, {"label":"B", "x":9.5, "y":3}, {"label":"N", "x":10.5, "y":3}, {"label":"M", "x":11.5, "y":3}, {"label":"<", "x":12.5, "y":3}, {"label":">", "x":13.5, "y":3}, {"label":"?", "x":14.5, "y":3}, {"label":"Shift", "x":15.5, "y":3, "w":2.75}, {"label":"Ctrl", "x":1.25, "y":4, "w":1.5}, {"label":"Win", "x":4.25, "y":4, "w":1.5}, {"x":5.75, "y":4, "w":2.25}, {"label":"Fn", "x":8, "y":4}, {"x":9.5, "y":4, "w":2.75}, {"label":"Alt", "x":12.25, "y":4, "w":1.5}, {"label":"Ctrl", "x":16.75, "y":4, "w":1.5}] + }, + "LAYOUT_split_right_shift": { + "layout": [{"label":"Esc", "x":0, "y":0}, {"label":"~", "x":1.25, "y":0}, {"label":"!", "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":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":"+", "x":15.25, "y":0}, {"label":"Backspace", "x":16.25, "y":0, "w":2}, {"label":"Page Up", "x":0, "y":1}, {"label":"Tab", "x":1.25, "y":1, "w":1.5}, {"label":"Q", "x":2.75, "y":1}, {"label":"W", "x":3.75, "y":1}, {"label":"E", "x":4.75, "y":1}, {"label":"R", "x":5.75, "y":1}, {"label":"T", "x":6.75, "y":1}, {"label":"Y", "x":9.75, "y":1}, {"label":"U", "x":10.75, "y":1}, {"label":"I", "x":11.75, "y":1}, {"label":"O", "x":12.75, "y":1}, {"label":"P", "x":13.75, "y":1}, {"label":"{", "x":14.75, "y":1}, {"label":"}", "x":15.75, "y":1}, {"label":"|", "x":16.75, "y":1, "w":1.5}, {"label":"Page Down", "x":0, "y":2}, {"label":"Caps Lock", "x":1.25, "y":2, "w":1.75}, {"label":"A", "x":3, "y":2}, {"label":"S", "x":4, "y":2}, {"label":"D", "x":5, "y":2}, {"label":"F", "x":6, "y":2}, {"label":"G", "x":7, "y":2}, {"label":"H", "x":10, "y":2}, {"label":"J", "x":11, "y":2}, {"label":"K", "x":12, "y":2}, {"label":"L", "x":13, "y":2}, {"label":":", "x":14, "y":2}, {"label":"\"", "x":15, "y":2}, {"label":"Enter", "x":16, "y":2, "w":2.25}, {"label":"Shift", "x":1.25, "y":3, "w":2.25}, {"label":"Z", "x":3.5, "y":3}, {"label":"X", "x":4.5, "y":3}, {"label":"C", "x":5.5, "y":3}, {"label":"V", "x":6.5, "y":3}, {"label":"B", "x":7.5, "y":3}, {"label":"B", "x":9.5, "y":3}, {"label":"N", "x":10.5, "y":3}, {"label":"M", "x":11.5, "y":3}, {"label":"<", "x":12.5, "y":3}, {"label":">", "x":13.5, "y":3}, {"label":"?", "x":14.5, "y":3}, {"label":"Shift", "x":15.5, "y":3, "w":1.75}, {"label":"Fn", "x":17.25, "y":3}, {"label":"Ctrl", "x":1.25, "y":4, "w":1.5}, {"label":"Win", "x":4.25, "y":4, "w":1.5}, {"x":5.75, "y":4, "w":2.25}, {"label":"Fn", "x":8, "y":4}, {"x":9.5, "y":4, "w":2.75}, {"label":"Alt", "x":12.25, "y":4, "w":1.5}, {"label":"Ctrl", "x":16.75, "y":4, "w":1.5}] + }, + "LAYOUT_all": { + "layout": [{"label":"Delete", "x":0, "y":0}, {"label":"Esc", "x":1.25, "y":0}, {"label":"!", "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":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":"+", "x":15.25, "y":0}, {"label":"~", "x":16.25, "y":0}, {"label":"|", "x":17.25, "y":0}, {"label":"Page Up", "x":0, "y":1}, {"label":"Tab", "x":1.25, "y":1, "w":1.5}, {"label":"Q", "x":2.75, "y":1}, {"label":"W", "x":3.75, "y":1}, {"label":"E", "x":4.75, "y":1}, {"label":"R", "x":5.75, "y":1}, {"label":"T", "x":6.75, "y":1}, {"label":"Y", "x":9.75, "y":1}, {"label":"U", "x":10.75, "y":1}, {"label":"I", "x":11.75, "y":1}, {"label":"O", "x":12.75, "y":1}, {"label":"P", "x":13.75, "y":1}, {"label":"{", "x":14.75, "y":1}, {"label":"}", "x":15.75, "y":1}, {"label":"Backspace", "x":16.75, "y":1, "w":1.5}, {"label":"Page Down", "x":0, "y":2}, {"label":"Caps Lock", "x":1.25, "y":2, "w":1.75}, {"label":"A", "x":3, "y":2}, {"label":"S", "x":4, "y":2}, {"label":"D", "x":5, "y":2}, {"label":"F", "x":6, "y":2}, {"label":"G", "x":7, "y":2}, {"label":"H", "x":10, "y":2}, {"label":"J", "x":11, "y":2}, {"label":"K", "x":12, "y":2}, {"label":"L", "x":13, "y":2}, {"label":":", "x":14, "y":2}, {"label":"\"", "x":15, "y":2}, {"label":"Enter", "x":16, "y":2, "w":2.25}, {"label":"Shift", "x":1.25, "y":3, "w":2.25}, {"label":"Z", "x":3.5, "y":3}, {"label":"X", "x":4.5, "y":3}, {"label":"C", "x":5.5, "y":3}, {"label":"V", "x":6.5, "y":3}, {"label":"B", "x":7.5, "y":3}, {"label":"B", "x":9.5, "y":3}, {"label":"N", "x":10.5, "y":3}, {"label":"M", "x":11.5, "y":3}, {"label":"<", "x":12.5, "y":3}, {"label":">", "x":13.5, "y":3}, {"label":"?", "x":14.5, "y":3}, {"label":"Shift", "x":15.5, "y":3, "w":1.75}, {"label":"Fn", "x":17.25, "y":3}, {"label":"Ctrl", "x":1.25, "y":4, "w":1.5}, {"label":"Win", "x":4.25, "y":4, "w":1.5}, {"x":5.75, "y":4, "w":2.25}, {"label":"Fn", "x":8, "y":4}, {"x":9.5, "y":4, "w":2.75}, {"label":"Alt", "x":12.25, "y":4, "w":1.5}, {"label":"Ctrl", "x":16.75, "y":4, "w":1.5}] + } + } +} diff --git a/keyboards/tkc/osav2/keymaps/default/keymap.c b/keyboards/tkc/osav2/keymaps/default/keymap.c new file mode 100644 index 000000000000..6de8e527b894 --- /dev/null +++ b/keyboards/tkc/osav2/keymaps/default/keymap.c @@ -0,0 +1,33 @@ +/* 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( + BL_STEP, BL_BRTG, KC_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, + 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, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 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/tkc/osav2/keymaps/via/keymap.c b/keyboards/tkc/osav2/keymaps/via/keymap.c new file mode 100644 index 000000000000..2fdb6cbff8a7 --- /dev/null +++ b/keyboards/tkc/osav2/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( + BL_STEP, BL_BRTG, KC_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, + 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, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 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/tkc/osav2/keymaps/via/rules.mk b/keyboards/tkc/osav2/keymaps/via/rules.mk new file mode 100644 index 000000000000..1e5b99807cb7 --- /dev/null +++ b/keyboards/tkc/osav2/keymaps/via/rules.mk @@ -0,0 +1 @@ +VIA_ENABLE = yes diff --git a/keyboards/tkc/osav2/osav2.c b/keyboards/tkc/osav2/osav2.c new file mode 100644 index 000000000000..4d8b901498b7 --- /dev/null +++ b/keyboards/tkc/osav2/osav2.c @@ -0,0 +1,33 @@ +/* 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 "osav2.h" + +void keyboard_pre_init_kb(void) { + setPinOutput(C7); + setPinOutput(C6); + setPinOutput(B6); + + keyboard_pre_init_user(); +} + +bool led_update_kb(led_t led_state) { + if (led_update_user(led_state)) { + writePin(C7, led_state.num_lock); + writePin(C6, led_state.caps_lock); + writePin(B6, led_state.scroll_lock); + } + return true; +} diff --git a/keyboards/tkc/osav2/osav2.h b/keyboards/tkc/osav2/osav2.h new file mode 100644 index 000000000000..46cb3cd85fd5 --- /dev/null +++ b/keyboards/tkc/osav2/osav2.h @@ -0,0 +1,117 @@ +/* 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 . + */ +#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. + */ + +/* LAYOUT + * ┌───┐ ┌───┬───┬───┬───┬───┬───┬───┐ ┌───┬───┬───┬───┬───┬───┬───┬───┐┌────────┐ + * │10 │ │00 │01 │02 │03 │04 │05 │06 │ │56 │55 │54 │53 │52 │51 │50 │57 ││57 │ + * ├───┤ ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┘ ┌─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┤└────────┘ + * │20 │ │11 │12 │13 │14 │15 │16 │ │66 │65 │64 │63 │62 │61 │60 │67 │ + * ├───┤ ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┐ └┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤ + * │30 │ │21 │22 │23 │24 │25 │26 │ │76 │75 │74 │73 │72 │71 │77 │ + * └───┘ ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┐ ┌─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┬───┤┌──────────┐ + * │31 │32 │33 │34 │35 │36 │ │86 │85 │84 │83 │82 │81 │80 │87 ││87 │ + * ├─────┬──┴──┬┴───┴┬──┴───┴┬──┴─┐ ├───┴───┴──┬┴───┴┬──┴───┴────┬─┴───┤└──────────┘ + * │41 │ │43 │45 │46 │ │95 │93 │ │90 │ + * └─────┘ └─────┴───────┴────┘ └──────────┴─────┘ └─────┘ + */ +#define LAYOUT_default_ansi( \ + K10, K00, K01, K02, K03, K04, K05, K06, K56, K55, K54, K53, K52, K51, K57, \ + K20, K11, K12, K13, K14, K15, K16, K66, K65, K64, K63, K62, K61, K60, K67, \ + K30, K21, K22, K23, K24, K25, K26, K76, K75, K74, K73, K72, K71, K77, \ + K31, K32, K33, K34, K35, K36, K86, K85, K84, K83, K82, K81, K87, \ + K41, K43, K45, K46, K95, K93, K90 \ +) \ +{ \ + { K00, K01, K02, K03, K04, K05, K06, KC_NO }, \ + { K10, K11, K12, K13, K14, K15, K16, KC_NO }, \ + { K20, K21, K22, K23, K24, K25, K26, KC_NO }, \ + { K30, K31, K32, K33, K34, K35, K36, KC_NO }, \ + { KC_NO, K41, KC_NO, K43, KC_NO, K45, K46, KC_NO }, \ + { KC_NO, K51, K52, K53, K54, K55, K56, K57 }, \ + { K60, K61, K62, K63, K64, K65, K66, K67 }, \ + { KC_NO, K71, K72, K73, K74, K75, K76, K77 }, \ + { KC_NO, K81, K82, K83, K84, K85, K86, K87 }, \ + { K90, KC_NO, KC_NO, K93, KC_NO, K95, KC_NO, KC_NO } \ +} +#define LAYOUT_split_backspace( \ + K10, K00, K01, K02, K03, K04, K05, K06, K56, K55, K54, K53, K52, K51, K50, K57, \ + K20, K11, K12, K13, K14, K15, K16, K66, K65, K64, K63, K62, K61, K60, K67, \ + K30, K21, K22, K23, K24, K25, K26, K76, K75, K74, K73, K72, K71, K77, \ + K31, K32, K33, K34, K35, K36, K86, K85, K84, K83, K82, K81, K87, \ + K41, K43, K45, K46, K95, K93, K90 \ +) \ +{ \ + { K00, K01, K02, K03, K04, K05, K06, KC_NO }, \ + { K10, K11, K12, K13, K14, K15, K16, KC_NO }, \ + { K20, K21, K22, K23, K24, K25, K26, KC_NO }, \ + { K30, K31, K32, K33, K34, K35, K36, KC_NO }, \ + { KC_NO, K41, KC_NO, K43, KC_NO, K45, K46, KC_NO }, \ + { K50, K51, K52, K53, K54, K55, K56, K57 }, \ + { K60, K61, K62, K63, K64, K65, K66, K67 }, \ + { KC_NO, K71, K72, K73, K74, K75, K76, K77 }, \ + { KC_NO, K81, K82, K83, K84, K85, K86, K87 }, \ + { K90, KC_NO, KC_NO, K93, KC_NO, K95, KC_NO, KC_NO } \ +} +#define LAYOUT_split_right_shift( \ + K10, K00, K01, K02, K03, K04, K05, K06, K56, K55, K54, K53, K52, K51, K57, \ + K20, K11, K12, K13, K14, K15, K16, K66, K65, K64, K63, K62, K61, K60, K67, \ + K30, K21, K22, K23, K24, K25, K26, K76, K75, K74, K73, K72, K71, K77, \ + K31, K32, K33, K34, K35, K36, K86, K85, K84, K83, K82, K81, K80, K87, \ + K41, K43, K45, K46, K95, K93, K90 \ +) \ +{ \ + { K00, K01, K02, K03, K04, K05, K06, KC_NO }, \ + { K10, K11, K12, K13, K14, K15, K16, KC_NO }, \ + { K20, K21, K22, K23, K24, K25, K26, KC_NO }, \ + { K30, K31, K32, K33, K34, K35, K36, KC_NO }, \ + { KC_NO, K41, KC_NO, K43, KC_NO, K45, K46, KC_NO }, \ + { KC_NO, K51, K52, K53, K54, K55, K56, K57 }, \ + { K60, K61, K62, K63, K64, K65, K66, K67 }, \ + { KC_NO, K71, K72, K73, K74, K75, K76, K77 }, \ + { K80, K81, K82, K83, K84, K85, K86, K87 }, \ + { K90, KC_NO, KC_NO, K93, KC_NO, K95, KC_NO, KC_NO } \ +} +#define LAYOUT_all( \ + K10, K00, K01, K02, K03, K04, K05, K06, K56, K55, K54, K53, K52, K51, K50, K57, \ + K20, K11, K12, K13, K14, K15, K16, K66, K65, K64, K63, K62, K61, K60, K67, \ + K30, K21, K22, K23, K24, K25, K26, K76, K75, K74, K73, K72, K71, K77, \ + K31, K32, K33, K34, K35, K36, K86, K85, K84, K83, K82, K81, K80, K87, \ + K41, K43, K45, K46, K95, K93, K90 \ +) \ +{ \ + { K00, K01, K02, K03, K04, K05, K06, KC_NO }, \ + { K10, K11, K12, K13, K14, K15, K16, KC_NO }, \ + { K20, K21, K22, K23, K24, K25, K26, KC_NO }, \ + { K30, K31, K32, K33, K34, K35, K36, KC_NO }, \ + { KC_NO, K41, KC_NO, K43, KC_NO, K45, K46, KC_NO }, \ + { K50, K51, K52, K53, K54, K55, K56, K57 }, \ + { K60, K61, K62, K63, K64, K65, K66, K67 }, \ + { KC_NO, K71, K72, K73, K74, K75, K76, K77 }, \ + { K80, K81, K82, K83, K84, K85, K86, K87 }, \ + { K90, KC_NO, KC_NO, K93, KC_NO, K95, KC_NO, KC_NO } \ +} diff --git a/keyboards/tkc/osav2/rules.mk b/keyboards/tkc/osav2/rules.mk new file mode 100644 index 000000000000..a11aa7aeefc7 --- /dev/null +++ b/keyboards/tkc/osav2/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 = 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 = yes # Enable keyboard RGB underglow +MIDI_ENABLE = no # MIDI support +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth +AUDIO_ENABLE = no # Audio output +FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches +LTO_ENABLE = yes # Reduces compile size From 64603ab647c07f3b7574e59ebbd2f92457588152 Mon Sep 17 00:00:00 2001 From: shela Date: Sat, 11 Jul 2020 22:06:33 +0900 Subject: [PATCH 370/930] fix typo (#9695) --- docs/feature_stenography.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/feature_stenography.md b/docs/feature_stenography.md index 099993f85799..148d61b04426 100644 --- a/docs/feature_stenography.md +++ b/docs/feature_stenography.md @@ -58,7 +58,7 @@ On the display tab click 'Open stroke display'. With Plover disabled you should ## Interfacing with the code :id=interfacing-with-the-code -The steno code has three interceptible hooks. If you define these functions, they will be called at certain points in processing; if they return true, processing continues, otherwise it's assumed you handled things. +The steno code has three interceptable hooks. If you define these functions, they will be called at certain points in processing; if they return true, processing continues, otherwise it's assumed you handled things. ```c bool send_steno_chord_user(steno_mode_t mode, uint8_t chord[6]); From 78f0b5fb02c2419b2a4dd508c423701a48f43e01 Mon Sep 17 00:00:00 2001 From: Joshua Rubin Date: Sat, 11 Jul 2020 12:50:57 -0600 Subject: [PATCH 371/930] [Keyboard] Add g60ble (#8952) * add g60ble Signed-off-by: Joshua Rubin * fixes from review Signed-off-by: Joshua Rubin * bioi/g60ble better comments in rules.mk * bioi/g60ble better comments in rules.mk part 2 * Update keyboards/bioi/g60ble/readme.md * Update keyboards/bioi/g60ble/rules.mk * Update keyboards/bioi/g60ble/rules.mk --- keyboards/bioi/g60ble/config.h | 50 +++ keyboards/bioi/g60ble/g60ble.h | 89 ++++ keyboards/bioi/g60ble/info.json | 414 ++++++++++++++++++ .../bioi/g60ble/keymaps/default/keymap.c | 13 + keyboards/bioi/g60ble/keymaps/via/keymap.c | 39 ++ keyboards/bioi/g60ble/keymaps/via/rules.mk | 1 + keyboards/bioi/g60ble/readme.md | 15 + keyboards/bioi/g60ble/rules.mk | 31 ++ 8 files changed, 652 insertions(+) create mode 100644 keyboards/bioi/g60ble/config.h create mode 100644 keyboards/bioi/g60ble/g60ble.h create mode 100644 keyboards/bioi/g60ble/info.json create mode 100644 keyboards/bioi/g60ble/keymaps/default/keymap.c create mode 100644 keyboards/bioi/g60ble/keymaps/via/keymap.c create mode 100644 keyboards/bioi/g60ble/keymaps/via/rules.mk create mode 100644 keyboards/bioi/g60ble/readme.md create mode 100644 keyboards/bioi/g60ble/rules.mk diff --git a/keyboards/bioi/g60ble/config.h b/keyboards/bioi/g60ble/config.h new file mode 100644 index 000000000000..e7515ec8945f --- /dev/null +++ b/keyboards/bioi/g60ble/config.h @@ -0,0 +1,50 @@ +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0x6583 +#define PRODUCT_ID 0x6080 +#define DEVICE_VER 0x0001 +#define MANUFACTURER Basic IO Instruments +#define PRODUCT BIOI G60 BLE +#define DESCRIPTION BIOI G60 BLE + +/* key matrix size */ +#define MATRIX_ROWS 5 +#define MATRIX_COLS 14 + +/* key matrix pins */ +#define MATRIX_ROW_PINS \ + { E6, B0, F1, F5, F4 } +#define MATRIX_COL_PINS \ + { F6, F7, B3, C7, C6, B6, B5, D5, B4, D7, D6, D4, D1, D0 } +#define UNUSED_PINS + +/* COL2ROW or ROW2COL */ +#define DIODE_DIRECTION COL2ROW + +/* number of backlight levels */ +#define BACKLIGHT_PIN B7 +#ifdef BACKLIGHT_PIN +# define BACKLIGHT_LEVELS 8 +#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 +#define RGBLIGHT_ANIMATIONS +#define RGBLED_NUM 36 +#define RGBLIGHT_HUE_STEP 8 +#define RGBLIGHT_SAT_STEP 8 +#define RGBLIGHT_VAL_STEP 8 + +#define KEYBOARD_LOCK_ENABLE +#define MAGIC_KEY_LOCK L diff --git a/keyboards/bioi/g60ble/g60ble.h b/keyboards/bioi/g60ble/g60ble.h new file mode 100644 index 000000000000..f1e1699ddcf9 --- /dev/null +++ b/keyboards/bioi/g60ble/g60ble.h @@ -0,0 +1,89 @@ +#pragma once + +#include "quantum.h" + +#define XXX KC_NO + +#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, K47, K3D, K3C, \ + K40, K41, K42, K45, K4A, K4B, K48, 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, K3A, K3B, K3C, K3D }, \ + { K40, K41, K42, XXX, XXX, K45, XXX, K47, K48, K49, 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, 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, XXX, K2D }, \ + { K30, XXX, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, XXX, K3D }, \ + { K40, K41, K42, XXX, XXX, K45, XXX, XXX, XXX, XXX, 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, 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, K45, XXX, 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, 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, \ + K30, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3D, K3C, \ + K41, K42, K45, K4B, K4C \ +) { \ + { 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, XXX }, \ + { K30, XXX, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D }, \ + { XXX, K41, K42, XXX, XXX, K45, XXX, XXX, XXX, K49, XXX, K4B, K4C, XXX } \ +} + +#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 }, \ + { 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, XXX, K2D }, \ + { K30, XXX, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D }, \ + { K40, K41, K42, XXX, XXX, K45, XXX, XXX, XXX, K49, K4A, K4B, K4C, K4D } \ +} + +#define LAYOUT_60_tsangan_hhkb( \ + 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, 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, XXX, K2D }, \ + { K30, XXX, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D }, \ + { K40, K41, K42, XXX, XXX, K45, XXX, XXX, XXX, K49, XXX, K4B, K4C, K4D } \ +} diff --git a/keyboards/bioi/g60ble/info.json b/keyboards/bioi/g60ble/info.json new file mode 100644 index 000000000000..f9c7408e5f55 --- /dev/null +++ b/keyboards/bioi/g60ble/info.json @@ -0,0 +1,414 @@ +{ + "keyboard_name": "BIOI G60 BLE", + "url": "", + "maintainer": "qmk", + "width": 15, + "height": 5, + "layouts": { + "LAYOUT_all": { + "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": "~", "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": "Ctrl", "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 }, + { "label": "|", "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": "Up", "x": 12, "y": 3 }, + { "label": "Shift", "x": 13, "y": 3 }, + { "label": "Fn", "x": 14, "y": 3 }, + { "label": "Ctrl", "x": 0, "y": 4, "w": 1.25 }, + { "label": "Alt", "x": 1.25, "y": 4, "w": 1.25 }, + { "label": "OS", "x": 2.5, "y": 4, "w": 1.25 }, + { "x": 3.75, "y": 4, "w": 6.25 }, + { "label": "OS", "x": 10, "y": 4 }, + { "label": "Alt", "x": 11, "y": 4 }, + { "label": "Left", "x": 12, "y": 4 }, + { "label": "Menu", "x": 13, "y": 4 }, + { "label": "Ctrl", "x": 14, "y": 4 } + ] + }, + "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": "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": "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_hhkb": { + "key_count": 60, + "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": "`", "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": "Os", "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": "Os", "x": 12.5, "y": 4 } + ] + }, + "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_tsangan_hhkb": { + "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": "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": "Win", "x": 11, "y": 4, "w": 1.5 }, + { "label": "Menu", "x": 12.5, "y": 4 }, + { "label": "Ctrl", "x": 13.5, "y": 4, "w": 1.5 } + ] + } + } +} diff --git a/keyboards/bioi/g60ble/keymaps/default/keymap.c b/keyboards/bioi/g60ble/keymaps/default/keymap.c new file mode 100644 index 000000000000..b17bfbb12171 --- /dev/null +++ b/keyboards/bioi/g60ble/keymaps/default/keymap.c @@ -0,0 +1,13 @@ +#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, + 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, KC_APP, KC_RCTL +) + +}; diff --git a/keyboards/bioi/g60ble/keymaps/via/keymap.c b/keyboards/bioi/g60ble/keymaps/via/keymap.c new file mode 100644 index 000000000000..478d83bc5123 --- /dev/null +++ b/keyboards/bioi/g60ble/keymaps/via/keymap.c @@ -0,0 +1,39 @@ +#include QMK_KEYBOARD_H + +// clang-format off +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_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, + CTL_T(KC_ESC), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, LT(2, 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_UP, KC_RSFT, MO(1), + KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, KC_RGUI, KC_RGUI, KC_LEFT, KC_APP, KC_RCTL +), + +[1] = LAYOUT_all( + _______, KC_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, RESET, _______, _______, _______, _______, _______, _______, KC_PSCR, KC_SLCK, KC_PAUS, KC_UP, _______, _______, + _______, KC_VOLD, KC_VOLU, KC_MUTE, KC_EJCT, _______, KC_ASTR, KC_SLSH, KC_HOME, KC_PGUP, KC_LEFT, KC_RGHT, _______, _______, + RGB_MOD, _______, RGB_HUD, RGB_HUI, RGB_SAD, RGB_SAI, _______, KC_PLUS, KC_MINS, KC_END, KC_PGDN, KC_DOWN, _______, BL_STEP, _______, + RGB_TOG, RGB_VAD, RGB_VAI, _______, _______, _______, _______, _______, BL_TOGG +), + +[2] = LAYOUT_all( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, XXXXXXX, KC_HOME, KC_PGUP, KC_PGDN, KC_END, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______ +), + +[3] = LAYOUT_all( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______ +) + +}; +// clang-format on diff --git a/keyboards/bioi/g60ble/keymaps/via/rules.mk b/keyboards/bioi/g60ble/keymaps/via/rules.mk new file mode 100644 index 000000000000..1e5b99807cb7 --- /dev/null +++ b/keyboards/bioi/g60ble/keymaps/via/rules.mk @@ -0,0 +1 @@ +VIA_ENABLE = yes diff --git a/keyboards/bioi/g60ble/readme.md b/keyboards/bioi/g60ble/readme.md new file mode 100644 index 000000000000..f42d90164edd --- /dev/null +++ b/keyboards/bioi/g60ble/readme.md @@ -0,0 +1,15 @@ +# BIOI G60 BLE + +![BIOI G60 BLE](https://i.imgur.com/7Mf8L3al.png) + +A 60% keyboard with Bluetooth LE support + +* Keyboard Maintainer: [Joshua Rubin](https://github.com/joshuarubin) +* Hardware Supported: R2 both default and hotswap versions +* Hardware Availability: https://play-keyboard.store/ + +Make example for this keyboard (after setting up your build environment): + + make bioi/g60ble: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/bioi/g60ble/rules.mk b/keyboards/bioi/g60ble/rules.mk new file mode 100644 index 000000000000..464a6d136c67 --- /dev/null +++ b/keyboards/bioi/g60ble/rules.mk @@ -0,0 +1,31 @@ +# 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 = qmk-dfu + +# 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 = 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 +RGBLIGHT_ENABLE = yes +LTO_ENABLE = yes + +LAYOUTS = 60_ansi 60_iso 60_hhkb 60_ansi_split_bs_rshift 60_tsangan_hhkb From 1b960381153f69b7b0ed28db51248f674ce0fadb Mon Sep 17 00:00:00 2001 From: umi <57262844+umi-umi@users.noreply.github.com> Date: Sun, 12 Jul 2020 11:43:43 +0900 Subject: [PATCH 372/930] [Docs] Japanese translation of docs/coding_conventions_python.md (#9517) * add coding_conventions_python.md translation * update based on comment * update based on comment --- docs/ja/coding_conventions_python.md | 331 +++++++++++++++++++++++++++ 1 file changed, 331 insertions(+) create mode 100644 docs/ja/coding_conventions_python.md diff --git a/docs/ja/coding_conventions_python.md b/docs/ja/coding_conventions_python.md new file mode 100644 index 000000000000..d8d4a31503a3 --- /dev/null +++ b/docs/ja/coding_conventions_python.md @@ -0,0 +1,331 @@ +# コーディング規約 (Python) + + + +私たちのスタイルの大部分は PEP8 に従いますが、神経質にならないように幾つかのローカルな変更を加えています。 + +* サポートされる全てのプラットフォームとの互換性のために、Python 3.6 を対象にしています。 +* 4つのスペース (ソフトタブ) を使ってインデントします +* 充分なコメントを書くことを推奨します + * コメントを機能を説明するストーリーと考えて下さい + * 特定の決定がなされた理由を充分なコメントで説明してください。 + * 分かり切ったコメントは書かないでください + * 分かり切ったコメントであるか確信できない場合は、コメントを含めてください。 +* 全ての関数について、役に立つ docstring を必要とします。 +* 一般的に、行を折り返さないで、必要なだけ長くすることができます。行を折り返すことを選択した場合は、76列を超えて折り返さないでください。 +* 私たちの慣習の幾つかは、Python 使いでは無い人にコードベースをより身近にするために、python コミュニティに広まっているものとは競合しています。 + +# YAPF + +コードを整形するために [yapf](https://github.com/google/yapf) を使うことができます。[setup.cfg](setup.cfg) で設定を提供しています。 + +# インポート + +`import ...` や `from ... import ...` をいつ使うかについての厳密なルールはありません。理解しやすさと保守性が究極の目的です。 + +一般的に、コードを短く理解しやすくするためにモジュールから特定の関数とクラス名をインポートする方が望ましいです。これにより、名前が曖昧になることがあります。代わりにモジュールをインポートするようにします。互換性のあるモジュールをインポートする時を除いて、インポートする時は "as" キーワードを避けるべきです。 + +インポートは各モジュール1行にする必要があります。標準的な python ルールに従って、インポート文をシステム、サードパーティ、ローカルにグループ化します。 + +`from foo import *` を使わないでください。代わりにインポートしたいオブジェクトのリストを指定するか、モジュール全体をインポートします。 + +## インポートの例 + +良い: + +``` +from qmk import effects + +effects.echo() +``` + +悪い: + +``` +from qmk.effects import echo + +echo() # echoがどこから来たのかが不明瞭です +``` + +良い: + +``` +from qmk.keymap import compile_firmware + +compile_firmware() +``` + +良いですが、上の方がより良いです: + +``` +import qmk.keymap + +qmk.keymap.compile_firmware() +``` + +# 命令文 + +各行1文としてください。 + +可能な場合(例えば `if foo: bar`)でも、2つの文を1行にまとめないでください。 + +# 命名 + +`module_name`, `package_name`, `ClassName`, `method_name`, `ExceptionName`, `function_name`, `GLOBAL_CONSTANT_NAME`, `global_var_name`, `instance_var_name`, `function_parameter_name`, `local_var_name`. + +関数名、変数名 およびファイル名は説明的でなければなりません; 略語を避けます。特に、プロジェクト外の読み手に曖昧あるいは馴染みのない略語を使わず、単語内の文字を削除して略さないでください。 + +常に .py のファイル名の拡張子を使います。ダッシュを使わないでください。 + +## 避けるべき名前 + +* カウンタあるいはイテレータ以外の1文字の名前。try/except 文では例外の識別子として `e` を使うことができます。 +* パッケージ/モジュール名内のダッシュ (`-`) +* `__double_leading_and_trailing_underscore__` (2つのアンダースコアで始まる名前と終わる名前、Python で予約済み) + +# Docstring + +docstring の一貫性を維持するために、以下のガイドラインを設定しました。 + +* マークダウン(Markdown)形式の使用 +* 常に少なくとも1つの改行を含む3つのダブルクォートの docstring を使ってください: `"""\n"""` +* 最初の行は、関数が行うことの短い (70文字未満) 説明です。 +* docstring が更に必要な場合は、説明と残りの間に空白行を入れます。 +* 開始の3つのダブルクォートと同じインデントレベルでインデント行を始めます +* 以下で説明する形式を使って全ての関数の引数について記述します +* Args:、Returns: および Raises: が存在する場合、それらは docstring の最後の3つの要素で、それぞれ空白行で区切られなければなりません。 + +## 簡単な docstring の例 + +``` +def my_awesome_function(): + """1970 Jan 1 00:00 UTC からの秒数を返します。 + """ + return int(time.time()) +``` + +## 複雑な docstring の例 + +``` +def my_awesome_function(): + """1970 Jan 1 00:00 UTC からの秒数を返します。 + + この関数は常に整数の秒数を返します。 + """ + return int(time.time()) +``` + +## 関数の引数の docstring の例 + +``` +def my_awesome_function(start=None, offset=0): + """1970 Jan 1 00:00 UTC からの秒数を返します。 + + この関数は常に整数の秒数を返します。 + + + Args: + start + 1970 Jan 1 00:00 UTC の代わりの開始時間 + + offset + 最初の引数からこの秒数が引かれた答えを返します + + Returns: + 秒数を表す整数。 + + Raises: + ValueError + `start` あるいは `offset` が正の数ではない場合 + """ + if start < 0 or offset < 0: + raise ValueError('start and offset must be positive numbers.') + + if not start: + start = time.time() + + return int(start - offset) +``` + +# 例外 + +例外は例外的な状況を処理するために使われます。フローの制御のために使われるべきではありません。これは Python の「許しを請う」という規範からの逸脱です。例外をキャッチする場合、異常な状況を処理する必要があります。 + +何らかの理由で全ての例外のキャッチを使う場合は、cli.log を使って例外とスタックトレースを記録する必要があります。 + +try/except ブロックをできるだけ短くします。多数の try 文が必要な場合は、コードを再構成する必要があるかもしれません。 + +# タプル + +1項目のタプルを定義する場合、タプルを使用していることが明らかになるように、常に末尾のカンマを含めます。暗黙的な1項目のタプルのアンパックに頼らないでください。明確なリストを使う方が良いです。 + +これはよく使用される printf 形式の書式文字列を使う場合に、特に重要です。 + +# リストと辞書 + +シーケンス形式と末尾のカンマとを区別するように YAPF を設定しました。末尾のカンマが省略されると、YAPF はシーケンスを1つの行として整形します。末尾のカンマがある場合、YAPF はシーケンスを1行1項目で整形します。 + +一般的に1行が短い定義になるようにすべきです。読みやすさと保守性を向上させるために、後からではなく早めに複数の行を分割してください。 + +# 括弧 + +過度な括弧は避けますが、括弧を使ってコードを理解しやすくします。タプルを明示的に返すか、あるいは数式の一部である場合を除き、return 文で括弧を使わないでください。 + +# 書式文字列 + +一般的に printf 形式の書式文字列を用います。例: + +``` +name = 'World' +print('Hello, %s!' % (name,)) +``` + +このスタイルはログモジュールで使われており、私たちはそれを広範囲で利用しており、一貫性を保つために他の場所でも採用しています。これは、私たちの気まぐれな読者の大部分である C プログラマにもおなじみのスタイルです。 + +付属の CLI モジュールは、パーセント (%) 演算子を使わずにこれらを使うことをサポートしています。詳細は、`cli.echo()` と様々な `cli.log` 関数 (例えば、`cli.log.info()`) を見てください。 + +# 内包表記とジェネレータ表記 + +内包表記とジェネレータの自由な使用を推奨しますが、あまりに複雑にしないでください。複雑になる場合は、理解しやすい for ループで代替します。 + +# ラムダ + +使っても問題ありませんが、おそらく避けるべきです。内包表記とジェネレータを使えば、ラムダの必要性は以前ほど強くありません。 + +# 条件式 + +変数の割り当てでは問題ありませんが、そうでなければ避けるべきです。 + +条件式はコードに続く if 文です。例えば: + +``` +x = 1 if cond else 2 +``` + +一般にこれらを関数の引数、シーケンス項目などとして使用することはお勧めできません。見落としやすくなります。 + +# デフォルト引数 + +推奨されていますが、値は不変オブジェクトでなければなりません。 + +デフォルト値に引数リストを指定する場合は、その場で変更できないオブジェクトを指定するように常に注意してください。可変オブジェクトを使うと変更は呼び出しの間で持続しますが、これは通常あなたの望むものではありませんそれがあなたのやろうとしていることであっても、他の人にとっては混乱するもので理解を妨げます。 + +悪い: + +``` +def my_func(foo={}): + pass +``` + +良い: + +``` +def my_func(foo=None): + if not foo: + foo = {} +``` + +# プロパティ + +getter および setter 関数の代わりにプロパティを常に使います。 + +``` +class Foo(object): + def __init__(self): + self._bar = None + + @property + def bar(self): + return self._bar + + @bar.setter + def bar(self, bar): + self._bar = bar +``` + +# True/False の評価 + +一般的に、if 文で等価性を調べるのではなく、暗黙的な True/False 評価を行うべきです。 + +悪い: + +``` +if foo == True: + pass + +if bar == False: + pass +``` + +良い: + +``` +if foo: + pass + +if not bar: + pass +``` + +# デコレータ + +適切な時に使ってください。理解に役立つ時を除き、魔法の(ように見える技巧の)使いすぎは避けるようにしてください。 + +# スレッドとマルチプロセス + +避けるべきです。これが必要な場合は、私たちがコードをマージする前に十分な理由を述べる必要があります。 + +# 強力な機能 + +Python は非常に柔軟な言語で、独自のメタクラス、バイトコードへのアクセス、実行中コンパイル、動的な継承、オブジェクトの親の変更、インポートハック、リフレクション、システム内部の変更など、多くの素晴らしい機能を提供します。 + +これらを使わないでください。 + +パフォーマンスは私たちにとって重要な関心ごとではなく、コードのわかりやすさに関心があります。私たちは、コードベースを1日か2日しかいじっていない人が利用できるようにしたいです。これらの機能は一般的に理解のしやすさを犠牲にするため、より高速あるいはよりコンパクトなコードよりも、容易に理解できるコードの方が望ましいです。 + +一部の標準ライブラリモジュールはこれらの手法を使っており、これらのモジュールを利用しても問題ありません。ただし、それらを使う時には、読みやすさと理解のしやすさを忘れないでください。 + +# 型アノテーション付きコード + +今のところ型アノテーションシステムを使っていないため、コードにアノテーションをつけないようにしてください。将来的にはこれを再検討する可能性があります。 + +# 関数の長さ + +小さくて焦点のあった関数にしてください。 + +長い関数が時には適切であることを理解しているので、関数の長さには厳密な制限はありません。関数が約40行を超える場合は、プログラムの構造を損なわずに分割できるかどうかを検討してください。 + +今のところ長い関数が完全に機能するとしても、数か月でそれを変更する人が新しい挙動を追加するかもしれません。これにより見つけにくいバグが発生するかもしれません。関数を短くかつシンプルにすることで、他の人がコードを読んで修正しやすくします。 + +幾つかのコードで作業をすると、長く複雑な関数を見つけるかもしれません。既存コードを変更することを怖がらないでください: もし、難しいことが判明したり、エラーがデバッグしづらいとわかったり、いくつかの異なるコンテキストで一部を使いたいような関数を扱っている場合、関数を小さくてより扱いやすい単位に分割することを検討してください。 + +# FIXME + +FIXME をコードに残しても構いません。なぜでしょうか?このコードを文章化しないままにするよりも、少なくとも考え抜く必要がある(あるいは混乱している)コードの一部を文章化するように奨励する方が、このコードを文章化しないままにするよりも良いです。 + +全ての FIXME は以下のように書式化されるべきです: + +``` +FIXME(username): 何々機能が完了したらこのコードを再検討する。 +``` + +...username はあなたの GitHub のユーザ名です。 + +# テスト + +統合テストと単体テストの組み合わせを使ってコードが可能な限りバグが無いようにします。全てのテストは `lib/python/qmk/tests/` にあります。`qmk pytest` を使って全てのテストを実行することができます。 + +これを書いている時点では、テストは全く完全なものではありません。現在のテストを見て、テストされていない状況のための新しいテストケースを書くことは、コードベースに精通し、QMK に貢献するという両方の点で素晴らしい方法です。 + +## 統合テスト + +統合テストは `lib/python/qmk/tests/test_cli_commands.py` にあります。ここで実際に CLI コマンドが実行され、全体的な動作が検証されます。[`subprocess`](https://docs.python.org/3.6/library/subprocess.html#module-subprocess) を使って各 CLI コマンドを起動し、正しく動作するかを判断するために出力とリターンコードの組み合わせを使います。 + +## ユニットテスト + +`lib/python/qmk/tests/` 内の他の `test_*.py` ファイルはユニットテストを含みます。`lib/python/qmk/` 内の個々の関数のテストをここに書くことができます。一般的にこれらのファイルはモジュールに基づいて名前を付けられ、ドットはアンダースコアで置き換えられます。 + +これを書いている時点では、テストのためのモックを作っていません。これを変更する手伝いをしたい場合は、[issue を開く](https://github.com/qmk/qmk_firmware/issues/new?assignees=&labels=cli%2C+python&template=other_issues.md&title=) か [Discord の #cli に参加](https://discord.gg/heQPAgy)し、そこで会話を開始してください。 From 9307762d76f4b36b788daea003e07bd53af5baad Mon Sep 17 00:00:00 2001 From: ladbahuy <67696967+ladbahuy@users.noreply.github.com> Date: Tue, 14 Jul 2020 05:25:28 +0700 Subject: [PATCH 373/930] RARTPAD : add support via (#9702) * Create rules.mk * Create keymap.c * Update keymap.c * Update keymap.c * Update keymap.c * Update keymap.c * Update keymap.c --- .../rart/rartpad/keymaps/default/keymap.c | 2 +- .../rart/rartpad/keymaps/numpad/keymap.c | 9 ++++- keyboards/rart/rartpad/keymaps/via/keymap.c | 36 +++++++++++++++++++ keyboards/rart/rartpad/keymaps/via/rules.mk | 2 ++ 4 files changed, 47 insertions(+), 2 deletions(-) create mode 100644 keyboards/rart/rartpad/keymaps/via/keymap.c create mode 100644 keyboards/rart/rartpad/keymaps/via/rules.mk diff --git a/keyboards/rart/rartpad/keymaps/default/keymap.c b/keyboards/rart/rartpad/keymaps/default/keymap.c index 0d7b6686ae8a..8fd5ac248b81 100644 --- a/keyboards/rart/rartpad/keymaps/default/keymap.c +++ b/keyboards/rart/rartpad/keymaps/default/keymap.c @@ -32,7 +32,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { RGB_SAI, RGB_SAD, KC_MNXT, KC_MPRV, RGB_VAI, RGB_VAD, KC_MSTP, KC_MPLY, KC_COPY, KC_PSTE, KC_MYCM, KC_CALC, - KC_TRNS, RGB_TOG, KC_TRNS, KC_TRNS + KC_TRNS, RGB_TOG, RESET, KC_TRNS ) }; diff --git a/keyboards/rart/rartpad/keymaps/numpad/keymap.c b/keyboards/rart/rartpad/keymaps/numpad/keymap.c index a3508ece9cc1..dbeaebeca8a9 100644 --- a/keyboards/rart/rartpad/keymaps/numpad/keymap.c +++ b/keyboards/rart/rartpad/keymaps/numpad/keymap.c @@ -24,7 +24,14 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { 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 + KC_P0, MO(1), KC_PENT + ), + [1] = LAYOUT_numpad_5x4( + 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_PDOT ) }; diff --git a/keyboards/rart/rartpad/keymaps/via/keymap.c b/keyboards/rart/rartpad/keymaps/via/keymap.c new file mode 100644 index 000000000000..121eacca1660 --- /dev/null +++ b/keyboards/rart/rartpad/keymaps/via/keymap.c @@ -0,0 +1,36 @@ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [0] = LAYOUT_ortho_5x4( + KC_NLCK, KC_PSLS, KC_PAST, KC_INS, + KC_P7, KC_P8, KC_P9, KC_PEQL, + KC_P4, KC_P5, KC_P6, KC_PPLS, + KC_P1, KC_P2, KC_P3, KC_PMNS, + MO(1), KC_P0, KC_PDOT, KC_PENT + ), + + [1] = LAYOUT_ortho_5x4( + KC_TRNS, RGB_HUI, RGB_HUD, RESET, + RGB_SAI, RGB_SAD, KC_MNXT, KC_MPRV, + RGB_VAI, RGB_VAD, KC_MSTP, KC_MPLY, + KC_COPY, KC_PSTE, KC_MYCM, KC_CALC, + KC_TRNS, RGB_TOG, KC_TRNS, KC_TRNS + ), + + [2] = LAYOUT_ortho_5x4( + _______, _______, _______, _______, + _______, _______, _______, _______, + _______, _______, _______, _______, + _______, _______, _______, _______, + _______, _______, _______, _______ + ), + + [3] = LAYOUT_ortho_5x4( + _______, _______, _______, _______, + _______, _______, _______, _______, + _______, _______, _______, _______, + _______, _______, _______, _______, + _______, _______, _______, _______ + ) +}; diff --git a/keyboards/rart/rartpad/keymaps/via/rules.mk b/keyboards/rart/rartpad/keymaps/via/rules.mk new file mode 100644 index 000000000000..36b7ba9cbc98 --- /dev/null +++ b/keyboards/rart/rartpad/keymaps/via/rules.mk @@ -0,0 +1,2 @@ +VIA_ENABLE = yes +LTO_ENABLE = yes From 584d38b5f55304871bfac1eac3c8c8125d374529 Mon Sep 17 00:00:00 2001 From: Drashna Jaelre Date: Mon, 13 Jul 2020 15:28:42 -0700 Subject: [PATCH 374/930] Fix RGB Matrix using RGBW WS2812 LEDs (#9705) This should be a pointer, as that is what the function expects. --- quantum/rgb_matrix_drivers.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/quantum/rgb_matrix_drivers.c b/quantum/rgb_matrix_drivers.c index 37bc20ef5375..6084d5685c4b 100644 --- a/quantum/rgb_matrix_drivers.c +++ b/quantum/rgb_matrix_drivers.c @@ -128,7 +128,7 @@ static inline void setled(int i, uint8_t r, uint8_t g, uint8_t b) { rgb_matrix_ws2812_array[i].g = g; rgb_matrix_ws2812_array[i].b = b; # ifdef RGBW - convert_rgb_to_rgbw(rgb_matrix_ws2812_array[i]); + convert_rgb_to_rgbw(&rgb_matrix_ws2812_array[i]); # endif } From 7bdfbde35d6c6bcdd3b788636e46f75c36a72efd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ga=C3=ABtan=20Ark?= Date: Tue, 14 Jul 2020 09:42:29 +0200 Subject: [PATCH 375/930] =?UTF-8?q?[Keymap]=20Added=20B=C3=A9po=20layout?= =?UTF-8?q?=20to=20Kyria=20(#9272)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Added Ergo 42 * Added bépo layout to the Kyria keyboard * Fixed comment layout, fixed bad quotes * Fixed outdated keys --- keyboards/ergo42/keymaps/shinze/keymap.c | 4 +- keyboards/kyria/keymaps/default/keymap.c | 2 +- keyboards/kyria/keymaps/shinze/config.h | 32 +++ keyboards/kyria/keymaps/shinze/keymap.c | 247 +++++++++++++++++++++++ keyboards/kyria/keymaps/shinze/rules.mk | 3 + 5 files changed, 285 insertions(+), 3 deletions(-) create mode 100644 keyboards/kyria/keymaps/shinze/config.h create mode 100644 keyboards/kyria/keymaps/shinze/keymap.c create mode 100644 keyboards/kyria/keymaps/shinze/rules.mk diff --git a/keyboards/ergo42/keymaps/shinze/keymap.c b/keyboards/ergo42/keymaps/shinze/keymap.c index 4f4247deb6b6..e07ff9f9eb03 100644 --- a/keyboards/ergo42/keymaps/shinze/keymap.c +++ b/keyboards/ergo42/keymaps/shinze/keymap.c @@ -18,11 +18,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TAB, BP_B, BP_ECUT, BP_P, BP_O, BP_EGRV, KC_ESC, KC_BSPC, BP_DCRC, BP_V, BP_D, BP_L, BP_J, BP_Z, \ BP_W, BP_A, BP_U, BP_I, BP_E, BP_COMM, _______, _______, BP_C, BP_T, BP_S, BP_R, BP_N, BP_M, \ KC_LSFT, BP_AGRV, BP_Y, BP_X, BP_DOT, BP_K, _______, _______, BP_APOS, BP_Q, BP_G, BP_H, BP_F, BP_CCED, \ - MO(SHORT), KC_LCTL, _______, KC_LALT, KC_LGUI, KC_SPC, MO(NUMB), KC_RGUI, KC_RSFT, KC_SPC, _______, _______, _______, _______ \ + MO(SHORT), KC_LCTL, _______, KC_LALT, KC_LGUI, KC_SPC, MO(NUMB), KC_ENT , KC_RSFT, KC_SPC, _______, _______, _______, _______ \ ), [NUMB] = LAYOUT( \ - BP_HASH, BP_DQOT, BP_LDQT, BP_RDQT, BP_LPRN, BP_RPRN, BP_AT, BP_PLUS, BP_MINS, BP_SLSH, BP_ASTR, BP_EQL, BP_PERC, KC_BSPC, \ + BP_HASH, BP_DQOT, BP_LDQU, BP_RDQU, BP_LPRN, BP_RPRN, BP_AT, BP_PLUS, BP_MINS, BP_SLSH, BP_ASTR, BP_EQL, BP_PERC, KC_BSPC, \ BP_DLR, BP_1, BP_2, BP_3, BP_4, BP_5, KC_LBRC, KC_RBRC, BP_6, BP_7, BP_8, BP_9, BP_0, BP_DEGR, \ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ diff --git a/keyboards/kyria/keymaps/default/keymap.c b/keyboards/kyria/keymaps/default/keymap.c index acadb0422b1e..028d335d9cbb 100644 --- a/keyboards/kyria/keymaps/default/keymap.c +++ b/keyboards/kyria/keymaps/default/keymap.c @@ -23,7 +23,7 @@ enum layers { }; const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { -/* +/* * Base Layer: QWERTY * * ,-------------------------------------------. ,-------------------------------------------. diff --git a/keyboards/kyria/keymaps/shinze/config.h b/keyboards/kyria/keymaps/shinze/config.h new file mode 100644 index 000000000000..f00bfa8e7059 --- /dev/null +++ b/keyboards/kyria/keymaps/shinze/config.h @@ -0,0 +1,32 @@ +/* Copyright 2019 Thomas Baart + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#pragma once + +#ifdef OLED_DRIVER_ENABLE + #define OLED_DISPLAY_128X64 +#endif + +#ifdef RGBLIGHT_ENABLE + #define RGBLIGHT_ANIMATIONS + #define RGBLIGHT_HUE_STEP 8 + #define RGBLIGHT_SAT_STEP 8 + #define RGBLIGHT_VAL_STEP 8 +#endif + +// If you are using an Elite C rev3 on the slave side, uncomment the lines below: +// #define SPLIT_USB_DETECT +// #define NO_USB_STARTUP_CHECK diff --git a/keyboards/kyria/keymaps/shinze/keymap.c b/keyboards/kyria/keymaps/shinze/keymap.c new file mode 100644 index 000000000000..720ae7f8a6f9 --- /dev/null +++ b/keyboards/kyria/keymaps/shinze/keymap.c @@ -0,0 +1,247 @@ +/* Copyright 2019 Thomas Baart + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public 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_bepo.h" + +enum layers { + _BEPO = 0, + _LOWER, + _RAISE, + _ADJUST +}; + +#define RESC LT(_RAISE, KC_ESC) +#define BP_EA BP_E_ACUTE +#define BP_AG BP_AGRV +#define BP_EG BP_E_GRAVE +#define BP_DC BP_DCRC +#define BP_AP BP_APOS +#define BP_CO BP_COMM +#define BP_DT BP_DOT +#define LS KC_LSFT +#define BP_DOL BP_DOLLAR + +/* Bottom Row */ +#define BR01 KC_LCTL +#define BR02 KC_LALT +#define BR03 MT(MOD_LGUI, KC_ENT) +#define BR04 LT(_LOWER, KC_SPC) +#define BR05 LT(_RAISE, KC_ESC) +#define BR06 LT(_LOWER, KC_ENT) +#define BR07 LT(_RAISE, KC_SPC) +#define BR08 KC_TAB +#define BR09 KC_BSPC +#define BR10 KC_RALT + +/* Under the screen row */ +#define U1 KC_LSFT + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +/* + * Base Layer: BÉPO + * + * ,-------------------------------------------. ,-------------------------------------------. + * |RAIS/ESC| B | É | P | O | È | | ^ | V | D | L | J | | Z | + * |--------+------+------+------+------+------| |------+------+------+------+------+--------| + * | W | A | U | I | E | , | | C | T | S | R | N | M | + * |--------+------+------+------+------+------+-------------. ,-------------+------+------+------+------+------+--------| + * | LShift | À | Y | X | . | K | SPC |LShift| |LShift|LShift| ’ | Q | G | H | F | Ç | + * `----------------------+------+------+------+------+------| |------+------+------+------+------+----------------------' + * | CTRL | Alt | Enter| Space| Esc | | Enter| Space| Tab | Bksp | AltGr| + * | | | CMD | Lower| Raise| | Lower| Raise| | | | + * `----------------------------------' `----------------------------------' + */ + [_BEPO] = LAYOUT( + RESC, BP_B, BP_EA, BP_P, BP_O, BP_EG, BP_DC, BP_V, BP_D, BP_L, BP_J, BP_Z, + BP_W, BP_A, BP_U, BP_I, BP_E, BP_CO, BP_C, BP_T, BP_S, BP_R, BP_N, BP_M, + LS, BP_AG, BP_Y, BP_X, BP_DT, BP_K, KC_SPC, U1, U1, U1, BP_AP, BP_Q, BP_G, BP_H, BP_F, BP_CCED, + BR01, BR02, BR03, BR04, BR05, BR06, BR07, BR08, BR09, BR10 + ), +/* + * Lower Layer: Numbers and symbols ? + * + * ,-------------------------------------------. ,-------------------------------------------. + * | $ | " | « | » | ( | ) | | @ | + | - | / | * | = | + * |--------+------+------+------+------+------| |------+------+------+------+------+--------| + * | # | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | ° | + * |--------+------+------+------+------+------+-------------. ,-------------+------+------+------+------+------+--------| + * | % | | | | | | | | | | | | | | | | ` | + * `----------------------+------+------+------+------+------| |------+------+------+------+------+----------------------' + * | | | | | | | | | | | | + * | | | | | | | | | | | | + * `----------------------------------' `----------------------------------' + */ + [_LOWER] = LAYOUT( + BP_DOL , BP_DQUO, BP_LGIL, BP_RGIL, BP_LPRN, BP_RPRN, BP_AT, BP_PLUS, BP_MINS, BP_SLASH, BP_ASTR, BP_EQL, + BP_HASH, BP_1, BP_2, BP_3, BP_4, BP_5, BP_6, BP_7, BP_8, BP_9, BP_0, BP_DEGR, + BP_PERC, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, BP_GRV, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), +/* + * Raise Layer: Media + * + * ,-------------------------------------------. ,-------------------------------------------. + * | | | | | | | | | | | | | | + * |--------+------+------+------+------+------| |------+------+------+------+------+--------| + * | | | Prev | Play | Next | VolUp| | Left | Down | Up | Right| | | + * |--------+------+------+------+------+------+-------------. ,-------------+------+------+------+------+------+--------| + * | | | | | Mute | VolDn| | | | | | MLeft| Mdown| MUp |MRight| | | + * `----------------------+------+------+------+------+------| |------+------+------+------+------+----------------------' + * | | | | | | | | | | | | + * | | | | | | | | | | | | + * `----------------------------------' `----------------------------------' + */ + [_RAISE] = LAYOUT( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, KC_MPRV, KC_MPLY, KC_MNXT, KC_VOLU, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, _______, _______, + _______, _______, _______, _______, KC_MUTE, KC_VOLD, _______, _______, _______, _______, KC_MS_L, KC_MS_D, KC_MS_U, KC_MS_R, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), +/* + * Adjust Layer: Function keys, RGB + * + * ,-------------------------------------------. ,-------------------------------------------. + * | | F1 | F2 | F3 | F4 | F5 | | F6 | F7 | F8 | F9 | F10 | | + * |--------+------+------+------+------+------| |------+------+------+------+------+--------| + * | | TOG | SAI | HUI | VAI | MOD | | | | | F11 | F12 | | + * |--------+------+------+------+------+------+-------------. ,-------------+------+------+------+------+------+--------| + * | | | SAD | HUD | VAD | RMOD | | | | | | | | | | | | + * `----------------------+------+------+------+------+------| |------+------+------+------+------+----------------------' + * | | | | | | | | | | | | + * | | | | | | | | | | | | + * `----------------------------------' `----------------------------------' + */ + [_ADJUST] = LAYOUT( + _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, _______, + _______, RGB_TOG, RGB_SAI, RGB_HUI, RGB_VAI, RGB_MOD, _______, _______, _______, KC_F11, KC_F12, _______, + _______, _______, RGB_SAD, RGB_HUD, RGB_VAD, RGB_RMOD,_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), +// /* +// * Layer template +// * +// * ,-------------------------------------------. ,-------------------------------------------. +// * | | | | | | | | | | | | | | +// * |--------+------+------+------+------+------| |------+------+------+------+------+--------| +// * | | | | | | | | | | | | | | +// * |--------+------+------+------+------+------+-------------. ,-------------+------+------+------+------+------+--------| +// * | | | | | | | | | | | | | | | | | | +// * `----------------------+------+------+------+------+------| |------+------+------+------+------+----------------------' +// * | | | | | | | | | | | | +// * | | | | | | | | | | | | +// * `----------------------------------' `----------------------------------' +// */ +// [_LAYERINDEX] = LAYOUT( +// _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, +// _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, +// _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, +// _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ +// ), +}; + +layer_state_t layer_state_set_user(layer_state_t state) { + return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST); +} + +#ifdef OLED_DRIVER_ENABLE +oled_rotation_t oled_init_user(oled_rotation_t rotation) { + return OLED_ROTATION_180; +} + +static void render_kyria_logo(void) { + static const char PROGMEM kyria_logo[] = { + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128,128,192,224,240,112,120, 56, 60, 28, 30, 14, 14, 14, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 14, 14, 14, 30, 28, 60, 56,120,112,240,224,192,128,128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0,192,224,240,124, 62, 31, 15, 7, 3, 1,128,192,224,240,120, 56, 60, 28, 30, 14, 14, 7, 7,135,231,127, 31,255,255, 31,127,231,135, 7, 7, 14, 14, 30, 28, 60, 56,120,240,224,192,128, 1, 3, 7, 15, 31, 62,124,240,224,192, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0,240,252,255, 31, 7, 1, 0, 0,192,240,252,254,255,247,243,177,176, 48, 48, 48, 48, 48, 48, 48,120,254,135, 1, 0, 0,255,255, 0, 0, 1,135,254,120, 48, 48, 48, 48, 48, 48, 48,176,177,243,247,255,254,252,240,192, 0, 0, 1, 7, 31,255,252,240, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0,255,255,255, 0, 0, 0, 0, 0,254,255,255, 1, 1, 7, 30,120,225,129,131,131,134,134,140,140,152,152,177,183,254,248,224,255,255,224,248,254,183,177,152,152,140,140,134,134,131,131,129,225,120, 30, 7, 1, 1,255,255,254, 0, 0, 0, 0, 0,255,255,255, 0, 0, 0, 0,255,255, 0, 0,192,192, 48, 48, 0, 0,240,240, 0, 0, 0, 0, 0, 0,240,240, 0, 0,240,240,192,192, 48, 48, 48, 48,192,192, 0, 0, 48, 48,243,243, 0, 0, 0, 0, 0, 0, 48, 48, 48, 48, 48, 48,192,192, 0, 0, 0, 0, 0, + 0, 0, 0,255,255,255, 0, 0, 0, 0, 0,127,255,255,128,128,224,120, 30,135,129,193,193, 97, 97, 49, 49, 25, 25,141,237,127, 31, 7,255,255, 7, 31,127,237,141, 25, 25, 49, 49, 97, 97,193,193,129,135, 30,120,224,128,128,255,255,127, 0, 0, 0, 0, 0,255,255,255, 0, 0, 0, 0, 63, 63, 3, 3, 12, 12, 48, 48, 0, 0, 0, 0, 51, 51, 51, 51, 51, 51, 15, 15, 0, 0, 63, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 48, 48, 63, 63, 48, 48, 0, 0, 12, 12, 51, 51, 51, 51, 51, 51, 63, 63, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 15, 63,255,248,224,128, 0, 0, 3, 15, 63,127,255,239,207,141, 13, 12, 12, 12, 12, 12, 12, 12, 30,127,225,128, 0, 0,255,255, 0, 0,128,225,127, 30, 12, 12, 12, 12, 12, 12, 12, 13,141,207,239,255,127, 63, 15, 3, 0, 0,128,224,248,255, 63, 15, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 3, 7, 15, 62,124,248,240,224,192,128, 1, 3, 7, 15, 30, 28, 60, 56,120,112,112,224,224,225,231,254,248,255,255,248,254,231,225,224,224,112,112,120, 56, 60, 28, 30, 15, 7, 3, 1,128,192,224,240,248,124, 62, 15, 7, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 3, 7, 15, 14, 30, 28, 60, 56,120,112,112,112,224,224,224,224,224,224,224,224,224,224,224,224,224,224,224,224,112,112,112,120, 56, 60, 28, 30, 14, 15, 7, 3, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 + }; + oled_write_raw_P(kyria_logo, sizeof(kyria_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); +} + +static void render_status(void) { + // QMK Logo and version information + render_qmk_logo(); + oled_write_P(PSTR("Kyria rev1.0\n\n"), false); + + // Host Keyboard Layer Status + oled_write_P(PSTR("Layer: "), false); + switch (get_highest_layer(layer_state)) { + case _BEPO: + oled_write_P(PSTR("BEPO\n"), false); + break; + case _LOWER: + oled_write_P(PSTR("NumSym\n"), false); + break; + case _RAISE: + oled_write_P(PSTR("Media\n"), false); + break; + case _ADJUST: + oled_write_P(PSTR("Adjust\n"), false); + break; + default: + oled_write_P(PSTR("Undefined\n"), false); + } + + // Host Keyboard LED Status + uint8_t led_usb_state = host_keyboard_leds(); + oled_write_P(IS_LED_ON(led_usb_state, USB_LED_NUM_LOCK) ? PSTR("NUMLCK ") : PSTR(" "), false); + oled_write_P(IS_LED_ON(led_usb_state, USB_LED_CAPS_LOCK) ? PSTR("CAPLCK ") : PSTR(" "), false); + oled_write_P(IS_LED_ON(led_usb_state, USB_LED_SCROLL_LOCK) ? PSTR("SCRLCK ") : PSTR(" "), false); +} + +void oled_task_user(void) { + if (is_keyboard_master()) { + render_status(); // Renders the current keyboard state (layer, lock, caps, scroll, etc) + } else { + render_kyria_logo(); + } +} +#endif + +#ifdef ENCODER_ENABLE +void encoder_update_user(uint8_t index, bool clockwise) { + if (index == 0) { + // Volume control + if (clockwise) { + tap_code(KC_VOLU); + } else { + tap_code(KC_VOLD); + } + } + else if (index == 1) { + // Page up/Page down + if (clockwise) { + tap_code(KC_PGDN); + } else { + tap_code(KC_PGUP); + } + } +} +#endif diff --git a/keyboards/kyria/keymaps/shinze/rules.mk b/keyboards/kyria/keymaps/shinze/rules.mk new file mode 100644 index 000000000000..604e154650d1 --- /dev/null +++ b/keyboards/kyria/keymaps/shinze/rules.mk @@ -0,0 +1,3 @@ +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 From bc2ebef876da9b67422c493cecb267906723db4e Mon Sep 17 00:00:00 2001 From: moyi4681 Date: Wed, 15 Jul 2020 00:06:16 +0800 Subject: [PATCH 376/930] Update KBDFANS/MAJA default keymap (#9727) * Update keymap.c * Update keymap.c --- keyboards/kbdfans/maja/keymaps/default/keymap.c | 2 +- keyboards/kbdfans/maja/keymaps/via/keymap.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/keyboards/kbdfans/maja/keymaps/default/keymap.c b/keyboards/kbdfans/maja/keymaps/default/keymap.c index fa81f07b40e9..bfab84bddd57 100755 --- a/keyboards/kbdfans/maja/keymaps/default/keymap.c +++ b/keyboards/kbdfans/maja/keymaps/default/keymap.c @@ -6,7 +6,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { 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_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, MO(1), 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_RCTL, 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, RESET, KC_HOME, diff --git a/keyboards/kbdfans/maja/keymaps/via/keymap.c b/keyboards/kbdfans/maja/keymaps/via/keymap.c index 1fb8d1bce59c..3feb7e579a14 100755 --- a/keyboards/kbdfans/maja/keymaps/via/keymap.c +++ b/keyboards/kbdfans/maja/keymaps/via/keymap.c @@ -6,7 +6,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { 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_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, MO(1), 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_RCTL, 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, RESET, KC_HOME, From ceb3ef955e0a87ca599378fe3c7693667761a482 Mon Sep 17 00:00:00 2001 From: Jeong Arm Date: Wed, 15 Jul 2020 17:49:28 +0900 Subject: [PATCH 377/930] [Keyboard] Update preonic/Kjwon15 layout (#9718) --- keyboards/preonic/keymaps/kjwon15/keymap.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/keyboards/preonic/keymaps/kjwon15/keymap.c b/keyboards/preonic/keymaps/kjwon15/keymap.c index cfc89f3b66fe..11ea0e51c0a3 100644 --- a/keyboards/preonic/keymaps/kjwon15/keymap.c +++ b/keyboards/preonic/keymaps/kjwon15/keymap.c @@ -170,20 +170,20 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * ,-----------------------------------------------------------------------------------. * | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | * |------+------+------+------+------+------+------+------+------+------+------+------| - * |RGB_TO| | WHL_U|Mclick| | HU_D | HU_I | LCTL | MS_U | WHL_U| | Del | - * |------+------+------+------+------+-------------+------+------+------+------+------| - * |RGB_MO| | WHL_D|Rclick|Lclick| SA_D | SA_I | MS_L | MS_D | MS_R | | ACL0 | - * |------+------+------+------+------+------|------+------+------+------+------+------| - * |RGB_MR| | | | | VA_D | VA_I | WHL_D| WHL_L| WHL_R| | ACL1 | + * | |RGB_TO| WHL_U|Mclick| | HU_D | HU_I | LCTL | MS_U | WHL_U| | Del | + * +------|------+------+------+------+-------------+------+------+------+------+------| + * | |RGB_MO| WHL_D|Rclick|Lclick| SA_D | SA_I | MS_L | MS_D | MS_R | | ACL0 | + * +------|------+------+------+------+------|------+------+------+------+------+------| + * | |RGB_MR| | | | VA_D | VA_I | WHL_D| WHL_L| WHL_R| | ACL1 | * |------+------+------+------+------+------+------+------+------+------+------+------| * | | | | | | | | | | | ACL2 | * `-----------------------------------------------------------------------------------' */ [_MOUSE] = 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, \ - RGB_TOG, _______, KC_WH_U, KC_BTN3, _______, RGB_HUD, RGB_HUI, KC_LCTL, KC_MS_U, KC_WH_U, _______, KC_DEL, \ - RGB_MOD, _______, KC_WH_D, KC_BTN2, KC_BTN1, RGB_SAD, RGB_SAI, KC_MS_L, KC_MS_D, KC_MS_R, _______, KC_ACL0, \ - RGB_RMOD,_______, _______, _______, _______, RGB_VAD, RGB_VAI, KC_WH_D, KC_WH_L, KC_WH_R, _______, KC_ACL1, \ + _______, RGB_TOG, KC_WH_U, KC_BTN3, _______, RGB_HUD, RGB_HUI, KC_LCTL, KC_MS_U, KC_WH_U, _______, KC_DEL, \ + _______, RGB_MOD, KC_WH_D, KC_BTN2, KC_BTN1, RGB_SAD, RGB_SAI, KC_MS_L, KC_MS_D, KC_MS_R, _______, KC_ACL0, \ + _______, RGB_RMOD,_______, _______, _______, RGB_VAD, RGB_VAI, KC_WH_D, KC_WH_L, KC_WH_R, _______, KC_ACL1, \ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_ACL2 \ ) From e8d577c081469608a9c203f97aece82d4253e99e Mon Sep 17 00:00:00 2001 From: Ryan Date: Wed, 15 Jul 2020 18:52:02 +1000 Subject: [PATCH 378/930] Update new keyboard templates (#9636) * Update new keyboard templates * Switch on Bootmagic Lite by default * Remove MIDI_ENABLE and FAUXCLICKY_ENABLE --- quantum/template/avr/config.h | 186 ++++-------------- quantum/template/avr/readme.md | 10 +- quantum/template/avr/rules.mk | 18 +- quantum/template/base/info.json | 11 +- quantum/template/base/keyboard.c | 33 ---- quantum/template/base/keyboard.h | 3 +- .../template/base/keymaps/default/config.h | 19 -- .../template/base/keymaps/default/keymap.c | 14 -- quantum/template/ps2avrgb/config.h | 122 ++++++++++-- quantum/template/ps2avrgb/readme.md | 6 +- quantum/template/ps2avrgb/rules.mk | 19 +- util/new_keyboard.sh | 2 - 12 files changed, 172 insertions(+), 271 deletions(-) delete mode 100644 quantum/template/base/keymaps/default/config.h diff --git a/quantum/template/avr/config.h b/quantum/template/avr/config.h index 88402fbdd065..8b0961f24b8b 100644 --- a/quantum/template/avr/config.h +++ b/quantum/template/avr/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 DEVICE_VER 0x0001 +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x0000 +#define DEVICE_VER 0x0001 #define MANUFACTURER %YOUR_NAME% -#define PRODUCT %KEYBOARD% -#define DESCRIPTION A custom keyboard +#define PRODUCT %KEYBOARD% +#define DESCRIPTION A custom keyboard /* key matrix size */ #define MATRIX_ROWS 2 @@ -45,7 +45,7 @@ along with this program. If not, see . #define MATRIX_COL_PINS { F1, F0, B0 } #define UNUSED_PINS -/* COL2ROW, ROW2COL*/ +/* COL2ROW, ROW2COL */ #define DIODE_DIRECTION COL2ROW /* @@ -53,37 +53,37 @@ along with this program. If not, see . */ #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 +//#define BACKLIGHT_PIN B7 +//#define BACKLIGHT_LEVELS 3 +//#define BACKLIGHT_BREATHING + +//#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 @@ -97,9 +97,9 @@ along with this program. If not, see . #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). + * This is useful for the Windows task manager shortcut (ctrl+shift+esc). */ -// #define GRAVE_ESC_CTRL_OVERRIDE +//#define GRAVE_ESC_CTRL_OVERRIDE /* * Force NKRO @@ -122,59 +122,6 @@ along with this program. If not, see . */ //#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. @@ -195,57 +142,6 @@ along with this program. If not, see . #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 BOOTMAGIC_LITE_ROW 0 +//#define BOOTMAGIC_LITE_COLUMN 0 diff --git a/quantum/template/avr/readme.md b/quantum/template/avr/readme.md index 0430dd0fc931..fd145584202e 100644 --- a/quantum/template/avr/readme.md +++ b/quantum/template/avr/readme.md @@ -2,14 +2,18 @@ ![%KEYBOARD%](imgur.com image replace me!) -A short description of the keyboard/project +*A short description of the keyboard/project* * Keyboard Maintainer: [%YOUR_NAME%](https://github.com/yourusername) -* Hardware Supported: The PCBs, controllers supported -* Hardware Availability: Links to where you can find this hardware +* Hardware Supported: *The PCBs, controllers supported* +* Hardware Availability: *Links to where you can find this hardware* Make example for this keyboard (after setting up your build environment): make %KEYBOARD%:default +Flashing example for this keyboard: + + make %KEYBOARD%: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). diff --git a/quantum/template/avr/rules.mk b/quantum/template/avr/rules.mk index 2ea91a301391..5c0d8f307c54 100644 --- a/quantum/template/avr/rules.mk +++ b/quantum/template/avr/rules.mk @@ -2,31 +2,21 @@ 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 +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 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 +BLUETOOTH_ENABLE = no # Enable Bluetooth AUDIO_ENABLE = no # Audio output -FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches -HD44780_ENABLE = no # Enable support for HD44780 based LCDs diff --git a/quantum/template/base/info.json b/quantum/template/base/info.json index b8e8f1f2dbb8..af14d8799637 100644 --- a/quantum/template/base/info.json +++ b/quantum/template/base/info.json @@ -7,11 +7,12 @@ "layouts": { "LAYOUT": { "layout": [ - {"label":"k00", "x":0, "y":0}, - {"label":"k01", "x":1, "y":0}, - {"label":"k02", "x":2, "y":0}, - {"label":"k10", "x":0, "y":1, "w":1.5}, - {"label":"k12", "x":1.5, "y":1, "w":1.5} + {"label": "k00", "x": 0, "y": 0}, + {"label": "k01", "x": 1, "y": 0}, + {"label": "k02", "x": 2, "y": 0}, + + {"label": "k10", "x": 0, "y": 1, "w": 1.5}, + {"label": "k12", "x": 1.5, "y": 1, "w": 1.5} ] } } diff --git a/quantum/template/base/keyboard.c b/quantum/template/base/keyboard.c index fc31c294a2e2..f69ae16ede67 100644 --- a/quantum/template/base/keyboard.c +++ b/quantum/template/base/keyboard.c @@ -15,36 +15,3 @@ */ #include "%KEYBOARD%.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/quantum/template/base/keyboard.h b/quantum/template/base/keyboard.h index 8a21d9257831..bd2e88d12b94 100644 --- a/quantum/template/base/keyboard.h +++ b/quantum/template/base/keyboard.h @@ -29,8 +29,7 @@ #define LAYOUT( \ k00, k01, k02, \ k10, k12 \ -) \ -{ \ +) { \ { k00, k01, k02 }, \ { k10, KC_NO, k12 } \ } diff --git a/quantum/template/base/keymaps/default/config.h b/quantum/template/base/keymaps/default/config.h deleted file mode 100644 index 5b00c8956f9d..000000000000 --- a/quantum/template/base/keymaps/default/config.h +++ /dev/null @@ -1,19 +0,0 @@ -/* Copyright %YEAR% %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/quantum/template/base/keymaps/default/keymap.c b/quantum/template/base/keymaps/default/keymap.c index af35ccec15de..d8020ab3e33a 100644 --- a/quantum/template/base/keymaps/default/keymap.c +++ b/quantum/template/base/keymaps/default/keymap.c @@ -60,17 +60,3 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { } return true; } - -/* -void matrix_init_user(void) { - -} - -void matrix_scan_user(void) { - -} - -bool led_update_user(led_t led_state) { - return true; -} -*/ diff --git a/quantum/template/ps2avrgb/config.h b/quantum/template/ps2avrgb/config.h index 3f3fd5fd7676..126afbcbd72d 100644 --- a/quantum/template/ps2avrgb/config.h +++ b/quantum/template/ps2avrgb/config.h @@ -19,37 +19,121 @@ along with this program. If not, see . #include "config_common.h" -#define VENDOR_ID 0x20A0 -#define PRODUCT_ID 0x422D -#define DEVICE_VER 0x0001 +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x0000 +#define DEVICE_VER 0x0001 #define MANUFACTURER %YOUR_NAME% -#define PRODUCT %KEYBOARD% -#define DESCRIPTION A custom keyboard - -#define RGBLED_NUM 16 +#define PRODUCT %KEYBOARD% +#define DESCRIPTION A custom keyboard +/* key matrix size */ #define MATRIX_ROWS 8 -#define MATRIX_COLS 11 +#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 { B0, B1, B2, B3, B4, B5, B6, B7 } -#define MATRIX_COL_PINS { A0, A1, A2, A3, A4, A5, A6, A7, C7, C6, C5 } -// #define MATRIX_COL_PINS { A0, A1, A2, A3, A4, A5, A6, A7, C7, C6, C5, C4, C3, C2, C1, C0, D7 } -#define UNUSED_PINS {} +#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 BACKLIGHT_PIN D4 +#define BACKLIGHT_LEVELS 3 +//#define BACKLIGHT_BREATHING + +#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 + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ #define DEBOUNCE 5 -#define BACKLIGHT_LEVELS 1 -#define RGBLIGHT_ANIMATIONS +/* 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 useful 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 + +/* + * 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 */ #define NO_ACTION_MACRO #define NO_ACTION_FUNCTION -/* 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 +//#define BOOTMAGIC_LITE_ROW 0 +//#define BOOTMAGIC_LITE_COLUMN 0 diff --git a/quantum/template/ps2avrgb/readme.md b/quantum/template/ps2avrgb/readme.md index b45ef91c9dcb..f19743a16371 100644 --- a/quantum/template/ps2avrgb/readme.md +++ b/quantum/template/ps2avrgb/readme.md @@ -2,11 +2,11 @@ ![%KEYBOARD%](imgur.com image replace me!) -A short description of the keyboard/project +*A short description of the keyboard/project* * Keyboard Maintainer: [%YOUR_NAME%](https://github.com/yourusername) -* Hardware Supported: The PCBs, controllers supported -* Hardware Availability: links to where you can find this hardware +* Hardware Supported: *The PCBs, controllers supported* +* Hardware Availability: *Links to where you can find this hardware* Make example for this keyboard (after setting up your build environment): diff --git a/quantum/template/ps2avrgb/rules.mk b/quantum/template/ps2avrgb/rules.mk index 9e18b3382753..1b61e9534da1 100644 --- a/quantum/template/ps2avrgb/rules.mk +++ b/quantum/template/ps2avrgb/rules.mk @@ -2,23 +2,18 @@ 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 = no # Virtual DIP switch configuration -MOUSEKEY_ENABLE = no # Mouse keys +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 BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality -RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow WS2812_DRIVER = i2c diff --git a/util/new_keyboard.sh b/util/new_keyboard.sh index 1f08790ad427..cf3339f9a758 100755 --- a/util/new_keyboard.sh +++ b/util/new_keyboard.sh @@ -78,7 +78,6 @@ replace_year_placeholders() { "${keyboard_dir}/config.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" ) replace_placeholders "%YEAR%" "$(date +%Y)" "${replace_year_filenames[@]}" @@ -104,7 +103,6 @@ replace_name_placeholders() { "${keyboard_dir}/readme.md" "${keyboard_dir}/${keyboard_base_name}.c" "${keyboard_dir}/${keyboard_base_name}.h" - "${keyboard_dir}/keymaps/default/config.h" "${keyboard_dir}/keymaps/default/keymap.c" ) replace_placeholders "%YOUR_NAME%" "$username" "${replace_name_filenames[@]}" From 13eda1b1a28f8ae6c93e08904e3a9c996bbd1efd Mon Sep 17 00:00:00 2001 From: Riley Inman Date: Wed, 15 Jul 2020 22:28:28 -0400 Subject: [PATCH 379/930] planck/rev6: Enable WS2812 LED matrix with pwm drivers --- keyboards/planck/rev6/chconf.h | 21 +++++++++++++++++++++ keyboards/planck/rev6/config.h | 21 +++++++++++---------- keyboards/planck/rev6/mcuconf.h | 30 ++++++++++++++++++++++++++++++ keyboards/planck/rev6/rev6.c | 19 +++++++++++++++++++ keyboards/planck/rev6/rules.mk | 3 ++- 5 files changed, 83 insertions(+), 11 deletions(-) create mode 100644 keyboards/planck/rev6/chconf.h create mode 100644 keyboards/planck/rev6/mcuconf.h diff --git a/keyboards/planck/rev6/chconf.h b/keyboards/planck/rev6/chconf.h new file mode 100644 index 000000000000..0298c11c40ad --- /dev/null +++ b/keyboards/planck/rev6/chconf.h @@ -0,0 +1,21 @@ +/* Copyright 2020 QMK Contributors + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +// Need to override the SysTick timer to use TIM3 -- this is a 16-bit timer on F303 +// so we need to change resolution and frequency to match. +#define CH_CFG_ST_RESOLUTION 16 +#define CH_CFG_ST_FREQUENCY 10000 +#include_next "chconf.h" diff --git a/keyboards/planck/rev6/config.h b/keyboards/planck/rev6/config.h index 3fbbae027874..0adca592bb6a 100644 --- a/keyboards/planck/rev6/config.h +++ b/keyboards/planck/rev6/config.h @@ -126,17 +126,18 @@ /* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ //#define MIDI_TONE_KEYCODE_OCTAVES 1 -// #define WS2812_LED_N 2 -// #define RGBLED_NUM WS2812_LED_N -// #define WS2812_TIM_N 2 -// #define WS2812_TIM_CH 2 -// #define PORT_WS2812 GPIOA -// #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 7 // DMA channel for TIMx_UP -//#define WS2812_EXTERNAL_PULLUP + +/* + * WS2812 Underglow Matrix options + */ #define RGB_DI_PIN A1 #define RGBLED_NUM 9 -#define RGBLIGHT_ANIMATIONS +#define DRIVER_LED_TOTAL RGBLED_NUM + +#define WS2812_PWM_DRIVER PWMD2 +#define WS2812_PWM_CHANNEL 2 +#define WS2812_PWM_PAL_MODE 1 +#define WS2812_DMA_STREAM STM32_DMA1_STREAM2 +#define WS2812_DMA_CHANNEL 2 #endif diff --git a/keyboards/planck/rev6/mcuconf.h b/keyboards/planck/rev6/mcuconf.h new file mode 100644 index 000000000000..dde67871cdda --- /dev/null +++ b/keyboards/planck/rev6/mcuconf.h @@ -0,0 +1,30 @@ +/* Copyright 2020 QMK Contributors + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#include_next "mcuconf.h" + +// The SysTick timer from the normal quantum/stm32 uses TIM2 -- the WS2812 pin used +// on the Planck requires the use of TIM2 to run PWM -- rework which timers are +// allocated for PWM usage. +#undef STM32_PWM_USE_TIM2 +#undef STM32_PWM_USE_TIM3 +#define STM32_PWM_USE_TIM2 TRUE +#define STM32_PWM_USE_TIM3 FALSE + +// As mentioned above, we need to reallocate the SysTick timer used from +// TIM2 to TIM3. +#undef STM32_ST_USE_TIMER +#define STM32_ST_USE_TIMER 3 diff --git a/keyboards/planck/rev6/rev6.c b/keyboards/planck/rev6/rev6.c index 8f4d168bf454..6fe7772b5e2f 100644 --- a/keyboards/planck/rev6/rev6.c +++ b/keyboards/planck/rev6/rev6.c @@ -15,6 +15,25 @@ */ #include "rev6.h" +led_config_t g_led_config = { { + // Key Matrix to LED Index + { NO_LED, 6, NO_LED, NO_LED, 5, NO_LED }, + { NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED }, + { NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, 0 }, + { NO_LED, 7, NO_LED, NO_LED, 2, NO_LED }, + { NO_LED, 4, NO_LED, NO_LED, 3, NO_LED }, + { NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED }, + { NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED }, + { NO_LED, 1, NO_LED, NO_LED, 8, NO_LED }, +}, { + // LED Index to Physical Position + {112, 39}, {148, 60}, {206, 53}, {206, 3}, {150, 3}, {74, 3}, {18, 3}, {18, 54}, {77, 60} +}, { + // LED Index to Flag + LED_FLAG_ALL, LED_FLAG_ALL, LED_FLAG_ALL, LED_FLAG_ALL, LED_FLAG_ALL, + LED_FLAG_ALL, LED_FLAG_ALL, LED_FLAG_ALL, LED_FLAG_ALL +} }; + void matrix_init_kb(void) { matrix_init_user(); } diff --git a/keyboards/planck/rev6/rules.mk b/keyboards/planck/rev6/rules.mk index d101f36d655e..a1ff82b17e60 100644 --- a/keyboards/planck/rev6/rules.mk +++ b/keyboards/planck/rev6/rules.mk @@ -18,13 +18,14 @@ AUDIO_ENABLE = yes # Audio output UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. -WS2812_DRIVER = bitbang +WS2812_DRIVER = pwm API_SYSEX_ENABLE = no # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend #SLEEP_LED_ENABLE = yes # Breathing sleep LED during USB suspend +RGB_MATRIX_ENABLE = WS2812 # SERIAL_LINK_ENABLE = yes ENCODER_ENABLE = yes DIP_SWITCH_ENABLE = yes From 92d0a71af71973ac3f80398ed4f7f61dd97733b3 Mon Sep 17 00:00:00 2001 From: Gautham Yerroju Date: Wed, 15 Jul 2020 22:48:04 -0700 Subject: [PATCH 380/930] OLED driver function to set pixels (#9713) * Add a function to set individual pixels * Add documentation for oled_write_pixel * use smaller data type for oled_write_pixel * Fix boundary check edge case * Update oled_write_pixel doc Co-authored-by: Ryan Co-authored-by: Ryan --- docs/feature_oled_driver.md | 4 ++++ drivers/oled/oled_driver.c | 13 +++++++++++++ drivers/oled/oled_driver.h | 4 ++++ 3 files changed, 21 insertions(+) diff --git a/docs/feature_oled_driver.md b/docs/feature_oled_driver.md index 772ce57bdd29..5f3095198fbf 100644 --- a/docs/feature_oled_driver.md +++ b/docs/feature_oled_driver.md @@ -247,6 +247,10 @@ void oled_write_raw_byte(const char data, uint16_t index); // Writes a PROGMEM string to the buffer at current cursor position void oled_write_raw_P(const char *data, uint16_t size); +// Sets a specific pixel on or off +// Coordinates start at top-left and go right and down for positive x and y +void oled_write_pixel(uint8_t x, uint8_t y, bool on); + // Can be used to manually turn on the screen if it is off // Returns true if the screen was on or turns on bool oled_on(void); diff --git a/drivers/oled/oled_driver.c b/drivers/oled/oled_driver.c index eedaedcd3603..977b70178322 100644 --- a/drivers/oled/oled_driver.c +++ b/drivers/oled/oled_driver.c @@ -462,6 +462,19 @@ void oled_write_raw(const char *data, uint16_t size) { } } +void oled_write_pixel(uint8_t x, uint8_t y, bool on) { + if (x >= OLED_DISPLAY_WIDTH || y >= OLED_DISPLAY_HEIGHT) { + return; + } + uint16_t index = x + (y / 8) * OLED_DISPLAY_WIDTH; + if (on) { + oled_buffer[index] |= (1 << (y % 8)); + } else { + oled_buffer[index] &= ~(1 << (y % 8)); + } + oled_dirty |= (1 << (index / OLED_BLOCK_SIZE)); +} + #if defined(__AVR__) void oled_write_P(const char *data, bool invert) { uint8_t c = pgm_read_byte(data); diff --git a/drivers/oled/oled_driver.h b/drivers/oled/oled_driver.h index 3e5a5bcabe8c..af6e5a2b617d 100644 --- a/drivers/oled/oled_driver.h +++ b/drivers/oled/oled_driver.h @@ -206,6 +206,10 @@ void oled_pan(bool left); void oled_write_raw(const char *data, uint16_t size); void oled_write_raw_byte(const char data, uint16_t index); +// Sets a specific pixel on or off +// Coordinates start at top-left and go right and down for positive x and y +void oled_write_pixel(uint8_t x, uint8_t y, bool on); + #if defined(__AVR__) // Writes a PROGMEM string to the buffer at current cursor position // Advances the cursor while writing, inverts the pixels if true From 72d327054744fa142469dbb5406ad61f5ad0a302 Mon Sep 17 00:00:00 2001 From: Ryan Date: Thu, 16 Jul 2020 15:49:18 +1000 Subject: [PATCH 381/930] Remove `DESCRIPTION` (#9732) --- docs/config_options.md | 2 - docs/es/hardware_avr.md | 3 +- docs/hardware_avr.md | 3 +- docs/ja/config_options.md | 2 - docs/ja/hardware_avr.md | 3 +- lib/python/qmk/info.py | 1 - quantum/template/avr/config.h | 1 - quantum/template/ps2avrgb/config.h | 1 - tmk_core/common/command.c | 1 - tmk_core/protocol/usb_hid/test/Makefile | 126 ------------------------ tmk_core/protocol/usb_hid/test/config.h | 30 ------ tmk_core/protocol/usb_hid/test/test.cpp | 92 ----------------- tmk_core/readme.md | 1 - 13 files changed, 3 insertions(+), 263 deletions(-) delete mode 100644 tmk_core/protocol/usb_hid/test/Makefile delete mode 100644 tmk_core/protocol/usb_hid/test/config.h delete mode 100644 tmk_core/protocol/usb_hid/test/test.cpp diff --git a/docs/config_options.md b/docs/config_options.md index 21c9972e0464..81a3b4b61c94 100644 --- a/docs/config_options.md +++ b/docs/config_options.md @@ -43,8 +43,6 @@ This is a C header file that is one of the first things included, and will persi * generally who/whatever brand produced the board * `#define PRODUCT Board` * the name of the keyboard -* `#define DESCRIPTION a keyboard` - * a short description of what the keyboard is * `#define MATRIX_ROWS 5` * the number of rows in your keyboard's matrix * `#define MATRIX_COLS 15` diff --git a/docs/es/hardware_avr.md b/docs/es/hardware_avr.md index 4236292a12dc..2ecf78d662f1 100644 --- a/docs/es/hardware_avr.md +++ b/docs/es/hardware_avr.md @@ -67,7 +67,7 @@ El archivo `config.h` es donde configuras el hardware y el conjunto de caracter En la parte superior de `config.h` encontrarás ajustes relacionados con USB. Estos controlan la apariencia de tu teclado en el Sistema Operativo. Si no tienes una buena razón para cambiar debes dejar el `VENDOR_ID` como `0xFEED`. Para el `PRODUCT_ID` debes seleccionar un número que todavía no esté en uso. -Cambia las líneas de `MANUFACTURER`, `PRODUCT`, y `DESCRIPTION` para reflejar con precisión tu teclado. +Cambia las líneas de `MANUFACTURER` y `PRODUCT` para reflejar con precisión tu teclado. ```c #define VENDOR_ID 0xFEED @@ -75,7 +75,6 @@ Cambia las líneas de `MANUFACTURER`, `PRODUCT`, y `DESCRIPTION` para reflejar c #define DEVICE_VER 0x0001 #define MANUFACTURER Tú #define PRODUCT mi_teclado_fantastico -#define DESCRIPTION Un teclado personalizado ``` ?> Windows y macOS mostrarán el `MANUFACTURER` y `PRODUCT` en la lista de dispositivos USB. `lsusb` en Linux toma estos de la lista mantenida por el [Repositorio de ID USB](http://www.linux-usb.org/usb-ids.html) por defecto. `lsusb -v` mostrará los valores reportados por el dispositivo, y también están presentes en los registros del núcleo después de conectarlo. diff --git a/docs/hardware_avr.md b/docs/hardware_avr.md index 697c55d2a8b5..2c0f2e9a1ac0 100644 --- a/docs/hardware_avr.md +++ b/docs/hardware_avr.md @@ -67,7 +67,7 @@ The `config.h` file is where you configure the hardware and feature set for your At the top of the `config.h` you'll find USB related settings. These control how your keyboard appears to the Operating System. If you don't have a good reason to change you should leave the `VENDOR_ID` as `0xFEED`. For the `PRODUCT_ID` you should pick a number that is not yet in use. -Do change the `MANUFACTURER`, `PRODUCT`, and `DESCRIPTION` lines to accurately reflect your keyboard. +Do change the `MANUFACTURER` and `PRODUCT` lines to accurately reflect your keyboard. ```c #define VENDOR_ID 0xFEED @@ -75,7 +75,6 @@ Do change the `MANUFACTURER`, `PRODUCT`, and `DESCRIPTION` lines to accurately r #define DEVICE_VER 0x0001 #define MANUFACTURER You #define PRODUCT my_awesome_keyboard -#define DESCRIPTION A custom keyboard ``` ?> Windows and macOS will display the `MANUFACTURER` and `PRODUCT` in the list of USB devices. `lsusb` on Linux instead takes these from the list maintained by the [USB ID Repository](http://www.linux-usb.org/usb-ids.html) by default. `lsusb -v` will show the values reported by the device, and they are also present in kernel logs after plugging it in. diff --git a/docs/ja/config_options.md b/docs/ja/config_options.md index 9e0dd7147295..55ee2cfbe905 100644 --- a/docs/ja/config_options.md +++ b/docs/ja/config_options.md @@ -48,8 +48,6 @@ QMK での全ての利用可能な設定にはデフォルトがあります。 * 一般的に、誰もしくはどのブランドがボードを作成したか * `#define PRODUCT Board` * キーボードの名前 -* `#define DESCRIPTION a keyboard` - * キーボードの簡単な説明 * `#define MATRIX_ROWS 5` * キーボードのマトリックスの行の数 * `#define MATRIX_COLS 15` diff --git a/docs/ja/hardware_avr.md b/docs/ja/hardware_avr.md index fecbfd71ffb8..0cba943c1569 100644 --- a/docs/ja/hardware_avr.md +++ b/docs/ja/hardware_avr.md @@ -73,7 +73,7 @@ or open the directory in your favourite text editor. `config.h` の先頭には USB に関する設定があります。これらはキーボードが OS からどのように見えるかを制御しています。変更する理由がない場合は、`VENDOR_ID` を `0xFEED` のままにしておく必要があります。`PRODUCT_ID` にはまだ使用されていない番号を選ばなければいけません。 -`MANUFACTURER`、 `PRODUCT`、 `DESCRIPTION` をキーボードにあった設定に変更します。 +`MANUFACTURER`、 `PRODUCT` をキーボードにあった設定に変更します。 ```c #define VENDOR_ID 0xFEED @@ -81,7 +81,6 @@ or open the directory in your favourite text editor. #define DEVICE_VER 0x0001 #define MANUFACTURER You #define PRODUCT my_awesome_keyboard -#define DESCRIPTION A custom keyboard ``` ?> Windows や macOS では、`MANUFACTURER` と `PRODUCT` が USBデバイスのリストに表示されます。Linux 上の `lsusb` では、代わりにデフォルトで [USB ID Repository](http://www.linux-usb.org/usb-ids.html) によって維持されているリストからこれらを取得します。`lsusb -v` を使用するとデバイスから示された値を表示します。また、接続したときのカーネルログにも表示されます。 diff --git a/lib/python/qmk/info.py b/lib/python/qmk/info.py index e1ace5d51bec..de7632e3784e 100644 --- a/lib/python/qmk/info.py +++ b/lib/python/qmk/info.py @@ -77,7 +77,6 @@ def _extract_config_h(info_data): 'device_ver': config_c.get('DEVICE_VER'), 'manufacturer': config_c.get('MANUFACTURER'), 'product': config_c.get('PRODUCT'), - 'description': config_c.get('DESCRIPTION'), } return info_data diff --git a/quantum/template/avr/config.h b/quantum/template/avr/config.h index 8b0961f24b8b..5f0bc7363347 100644 --- a/quantum/template/avr/config.h +++ b/quantum/template/avr/config.h @@ -25,7 +25,6 @@ along with this program. If not, see . #define DEVICE_VER 0x0001 #define MANUFACTURER %YOUR_NAME% #define PRODUCT %KEYBOARD% -#define DESCRIPTION A custom keyboard /* key matrix size */ #define MATRIX_ROWS 2 diff --git a/quantum/template/ps2avrgb/config.h b/quantum/template/ps2avrgb/config.h index 126afbcbd72d..ef065c0f100a 100644 --- a/quantum/template/ps2avrgb/config.h +++ b/quantum/template/ps2avrgb/config.h @@ -25,7 +25,6 @@ along with this program. If not, see . #define DEVICE_VER 0x0001 #define MANUFACTURER %YOUR_NAME% #define PRODUCT %KEYBOARD% -#define DESCRIPTION A custom keyboard /* key matrix size */ #define MATRIX_ROWS 8 diff --git a/tmk_core/common/command.c b/tmk_core/common/command.c index 3cfcba3058ce..ef6a39c0fe23 100644 --- a/tmk_core/common/command.c +++ b/tmk_core/common/command.c @@ -141,7 +141,6 @@ static void command_common_help(void) { static void print_version(void) { // print version & information print("\n\t- Version -\n"); - print("DESC: " STR(DESCRIPTION) "\n"); print("VID: " STR(VENDOR_ID) "(" STR(MANUFACTURER) ") " "PID: " STR(PRODUCT_ID) "(" STR(PRODUCT) ") " "VER: " STR(DEVICE_VER) "\n"); diff --git a/tmk_core/protocol/usb_hid/test/Makefile b/tmk_core/protocol/usb_hid/test/Makefile deleted file mode 100644 index 83bf2aed67ab..000000000000 --- a/tmk_core/protocol/usb_hid/test/Makefile +++ /dev/null @@ -1,126 +0,0 @@ -#---------------------------------------------------------------------------- -# On command line: -# -# make all = Make software. -# -# make clean = Clean out built project files. -# -# make coff = Convert ELF to AVR COFF. -# -# make extcoff = Convert ELF to AVR Extended COFF. -# -# make program = Download the hex file to the device. -# Please customize your programmer settings(PROGRAM_CMD) -# -# make teensy = Download the hex file to the device, using teensy_loader_cli. -# (must have teensy_loader_cli installed). -# -# make dfu = Download the hex file to the device, using dfu-programmer (must -# have dfu-programmer installed). -# -# make flip = Download the hex file to the device, using Atmel FLIP (must -# have Atmel FLIP installed). -# -# make dfu-ee = Download the eeprom file to the device, using dfu-programmer -# (must have dfu-programmer installed). -# -# make flip-ee = Download the eeprom file to the device, using Atmel FLIP -# (must have Atmel FLIP installed). -# -# make debug = Start either simulavr or avarice as specified for debugging, -# with avr-gdb or avr-insight as the front end for debugging. -# -# make filename.s = Just compile filename.c into the assembler code only. -# -# make filename.i = Create a preprocessed source file for use in submitting -# bug reports to the GCC project. -# -# To rebuild project do "make clean" then "make all". -#---------------------------------------------------------------------------- - -# Target file name (without extension). -TARGET = usb_hid_test - -TMK_DIR = ../../.. - -# Directory keyboard dependent files exist -TARGET_DIR = . - -# 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 -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - - -# Build Options -# comment out to disable the options. -# -# Console for debug -OPT_DEFS += -DCONSOLE_ENABLE - -# Boot Section Size in bytes -# Teensy halfKay 512 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -#OPT_DEFS += -DBOOT_SIZE=4096 - - - -SRC = test.cpp -SRC += common/debug.c -SRC += common/print.c - -CONFIG_H = config.h - - - -# Search Path -VPATH += $(TARGET_DIR) -VPATH += $(TMK_DIR) -VPATH += $(TMK_DIR)/common - - - -# program Leonardo -PROGRAM_CMD = avrdude -p$(MCU) -cavr109 -P$(DEV) -b57600 -Uflash:w:$(TARGET).hex - - - -include $(TMK_DIR)/protocol/usb_hid.mk -include $(TMK_DIR)/protocol/lufa.mk -include $(TMK_DIR)/rules.mk diff --git a/tmk_core/protocol/usb_hid/test/config.h b/tmk_core/protocol/usb_hid/test/config.h deleted file mode 100644 index 71a6814fd152..000000000000 --- a/tmk_core/protocol/usb_hid/test/config.h +++ /dev/null @@ -1,30 +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 . -*/ - -#pragma once - -#define VENDOR_ID 0xFEED -#define PRODUCT_ID 0xCAFE -#define DEVICE_VER 0x0814 -#define MANUFACTURER t.m.k. -#define PRODUCT USB to USB keyboard converter - -#define DESCRIPTION Product from t.m.k. keyboard firmware project - -/* matrix size */ -#define MATRIX_ROWS 32 -#define MATRIX_COLS 8 diff --git a/tmk_core/protocol/usb_hid/test/test.cpp b/tmk_core/protocol/usb_hid/test/test.cpp deleted file mode 100644 index 4958f0c61928..000000000000 --- a/tmk_core/protocol/usb_hid/test/test.cpp +++ /dev/null @@ -1,92 +0,0 @@ -#include -#include -#include -#include -#include - -// USB HID host -#include "Usb.h" -#include "hid.h" -#include "hidboot.h" -#include "parser.h" - -// LUFA -#include "lufa.h" - -#include "debug.h" - -#include "leonardo_led.h" - - -static USB usb_host; -static HIDBoot kbd(&usb_host); -static KBDReportParser kbd_parser; - -static void LUFA_setup(void) -{ - /* Disable watchdog if enabled by bootloader/fuses */ - MCUSR &= ~(1 << WDRF); - wdt_disable(); - - /* Disable clock division */ - clock_prescale_set(clock_div_1); - - // Leonardo needs. Without this USB device is not recognized. - USB_Disable(); - - USB_Init(); - - // for Console_Task - USB_Device_EnableSOFEvents(); -} - -static void HID_setup() -{ - // Arduino Timer startup: wiring.c - init(); - - if (usb_host.Init() == -1) { - debug("HID init: failed\n"); - LED_TX_OFF; - } - - _delay_ms(200); - - kbd.SetReportParser(0, (HIDReportParser*)&kbd_parser); -} - -int main(void) -{ - // LED for debug - LED_TX_INIT; - LED_TX_ON; - - print_enable = true; - debug_enable = true; - debug_matrix = true; - debug_keyboard = true; - debug_mouse = true; - - LUFA_setup(); - sei(); - - // wait for startup of sendchar routine - while (USB_DeviceState != DEVICE_STATE_Configured) ; - if (debug_enable) { - _delay_ms(1000); - } - - HID_setup(); - - debug("init: done\n"); - for (;;) { - usb_host.Task(); - -#if !defined(INTERRUPT_CONTROL_ENDPOINT) - // LUFA Task for control request - USB_USBTask(); -#endif - } - - return 0; -} diff --git a/tmk_core/readme.md b/tmk_core/readme.md index 71b8d2e9fc48..5b719bca5d35 100644 --- a/tmk_core/readme.md +++ b/tmk_core/readme.md @@ -67,7 +67,6 @@ Start Your Own Project #define PRODUCT_ID 0xBEEF #define MANUFACTURER t.m.k. #define PRODUCT Macway mod - #define DESCRIPTION t.m.k. keyboard firmware for Macway mod #### 2. Keyboard matrix configuration #define MATRIX_ROWS 8 From fc133153007e13d0f27112cce5cfec967c1f278e Mon Sep 17 00:00:00 2001 From: Hedgestock Date: Thu, 16 Jul 2020 07:50:51 +0200 Subject: [PATCH 382/930] Fixed CA_DOTA key code (#9722) --- quantum/keymap_extras/keymap_canadian_multilingual.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/quantum/keymap_extras/keymap_canadian_multilingual.h b/quantum/keymap_extras/keymap_canadian_multilingual.h index d980dc2e417e..20333fd6da24 100644 --- a/quantum/keymap_extras/keymap_canadian_multilingual.h +++ b/quantum/keymap_extras/keymap_canadian_multilingual.h @@ -204,7 +204,7 @@ #define CA_APSN RCTL(CA_N) // ʼn #define CA_MICR RCTL(CA_M) // μ #define CA_HRZB RCTL(CA_COMM) // ― -#define CA_DOTA ALGR(CA_DOT) // ˙ (dead) +#define CA_DOTA RCTL(CA_DOT) // ˙ (dead) /* Shift+Right Ctrl symbols * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ From f11437aef392dc44573bf45a738ae758784d2f1b Mon Sep 17 00:00:00 2001 From: Drashna Jaelre Date: Wed, 15 Jul 2020 23:45:50 -0700 Subject: [PATCH 383/930] Allow for user song list (#9281) --- .gitignore | 3 + quantum/audio/song_list.h | 170 +++++++++++++++++++++++++++++--------- 2 files changed, 132 insertions(+), 41 deletions(-) diff --git a/.gitignore b/.gitignore index 20437224f184..91d283e69ba7 100644 --- a/.gitignore +++ b/.gitignore @@ -73,3 +73,6 @@ __pycache__ # prerequisites for updating ChibiOS /util/fmpp* + +# Allow to exist but don't include it in the repo +user_song_list.h diff --git a/quantum/audio/song_list.h b/quantum/audio/song_list.h index b20acd11441e..b54b397e1c4a 100644 --- a/quantum/audio/song_list.h +++ b/quantum/audio/song_list.h @@ -20,6 +20,12 @@ #include "musical_notes.h" +#if __GNUC__ > 5 // don't use for older gcc compilers since check isn't supported. +# if __has_include("user_song_list.h") +# include "user_song_list.h" +# endif // if file exists +#endif // __GNUC__ + #define NO_SOUND /* Ode to Joy @@ -146,44 +152,126 @@ * proof of permission to use them, or public domain status. */ -#define CLOSE_ENCOUNTERS_5_NOTE -#define DOE_A_DEER -#define IN_LIKE_FLINT -#define IMPERIAL_MARCH -#define BASKET_CASE -#define COIN_SOUND -#define ONE_UP_SOUND -#define SONIC_RING -#define ZELDA_PUZZLE -#define ZELDA_TREASURE -#define OVERWATCH_THEME -#define MARIO_THEME -#define MARIO_GAMEOVER -#define MARIO_MUSHROOM -#define E1M1_DOOM -#define DISNEY_SONG -#define NUMBER_ONE -#define CABBAGE_SONG -#define OLD_SPICE -#define VICTORY_FANFARE_SHORT -#define ALL_STAR -#define RICK_ROLL -#define FF_PRELUDE -#define TO_BOLDLY_GO -#define KATAWARE_DOKI -#define MEGALOVANIA -#define MICHISHIRUBE -#define LIEBESLEID -#define MELODIES_OF_LIFE -#define EYES_ON_ME -#define SONG_OF_THE_ANCIENTS -#define NIER_AMUSEMENT_PARK -#define COPIED_CITY -#define VAGUE_HOPE_COLD_RAIN -#define KAINE_SALVATION -#define WEIGHT_OF_THE_WORLD -#define ISABELLAS_LULLABY -#define TERRAS_THEME -#define RENAI_CIRCULATION -#define PLATINUM_DISCO -#define LP_NUMB +#ifndef CLOSE_ENCOUNTERS_5_NOTE +# define CLOSE_ENCOUNTERS_5_NOTE +#endif +#ifndef DOE_A_DEER +# define DOE_A_DEER +#endif +#ifndef IN_LIKE_FLINT +# define IN_LIKE_FLINT +#endif +#ifndef IMPERIAL_MARCH +# define IMPERIAL_MARCH +#endif +#ifndef BASKET_CASE +# define BASKET_CASE +#endif +#ifndef COIN_SOUND +# define COIN_SOUND +#endif +#ifndef ONE_UP_SOUND +# define ONE_UP_SOUND +#endif +#ifndef SONIC_RING +# define SONIC_RING +#endif +#ifndef ZELDA_PUZZLE +# define ZELDA_PUZZLE +#endif +#ifndef ZELDA_TREASURE +# define ZELDA_TREASURE +#endif +#ifndef OVERWATCH_THEME +# define OVERWATCH_THEME +#endif +#ifndef MARIO_THEME +# define MARIO_THEME +#endif +#ifndef MARIO_GAMEOVER +# define MARIO_GAMEOVER +#endif +#ifndef MARIO_MUSHROOM +# define MARIO_MUSHROOM +#endif +#ifndef E1M1_DOOM +# define E1M1_DOOM +#endif +#ifndef DISNEY_SONG +# define DISNEY_SONG +#endif +#ifndef NUMBER_ONE +# define NUMBER_ONE +#endif +#ifndef CABBAGE_SONG +# define CABBAGE_SONG +#endif +#ifndef OLD_SPICE +# define OLD_SPICE +#endif +#ifndef VICTORY_FANFARE_SHORT +# define VICTORY_FANFARE_SHORT +#endif +#ifndef ALL_STAR +# define ALL_STAR +#endif +#ifndef RICK_ROLL +# define RICK_ROLL +#endif +#ifndef FF_PRELUDE +# define FF_PRELUDE +#endif +#ifndef TO_BOLDLY_GO +# define TO_BOLDLY_GO +#endif +#ifndef KATAWARE_DOKI +# define KATAWARE_DOKI +#endif +#ifndef MEGALOVANIA +# define MEGALOVANIA +#endif +#ifndef MICHISHIRUBE +# define MICHISHIRUBE +#endif +#ifndef LIEBESLEID +# define LIEBESLEID +#endif +#ifndef MELODIES_OF_LIFE +# define MELODIES_OF_LIFE +#endif +#ifndef EYES_ON_ME +# define EYES_ON_ME +#endif +#ifndef SONG_OF_THE_ANCIENTS +# define SONG_OF_THE_ANCIENTS +#endif +#ifndef NIER_AMUSEMENT_PARK +# define NIER_AMUSEMENT_PARK +#endif +#ifndef COPIED_CITY +# define COPIED_CITY +#endif +#ifndef VAGUE_HOPE_COLD_RAIN +# define VAGUE_HOPE_COLD_RAIN +#endif +#ifndef KAINE_SALVATION +# define KAINE_SALVATION +#endif +#ifndef WEIGHT_OF_THE_WORLD +# define WEIGHT_OF_THE_WORLD +#endif +#ifndef ISABELLAS_LULLABY +# define ISABELLAS_LULLABY +#endif +#ifndef TERRAS_THEME +# define TERRAS_THEME +#endif +#ifndef RENAI_CIRCULATION +# define RENAI_CIRCULATION +#endif +#ifndef PLATINUM_DISCO +# define PLATINUM_DISCO +#endif +#ifndef LP_NUMB +# define LP_NUMB +#endif From 61b64bb82a93c6d1441f07655a5e20b59a15fd29 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Konstantin=20=C4=90or=C4=91evi=C4=87?= Date: Thu, 16 Jul 2020 14:27:55 +0200 Subject: [PATCH 384/930] Redefine IS_LAYER_ON/OFF() as aliases for existing layer functions (#6352) * Add IS_LAYER_ON_STATE()/IS_LAYER_OFF_STATE() macros * Add docs for IS_LAYER_ON/OFF(_STATE) macros * Remove IS_LAYER_ON/OFF_STATE redefinition in userspace * Run clang-format on quantum/quantum.h * Redefine IS_LAYER_ON/OFF(_STATE) as aliases of existing layer functions Also update relevant doc entries. Needs testing to check if this breaks existing IS_LAYER_ON/OFF usage in certain edge cases (namely calling the macros with 0). * Reformat layer check function docs --- docs/custom_quantum_functions.md | 7 ++++++- docs/feature_layers.md | 15 +++++++-------- quantum/quantum.h | 7 +++++-- users/konstantin/konstantin.h | 3 --- 4 files changed, 18 insertions(+), 14 deletions(-) diff --git a/docs/custom_quantum_functions.md b/docs/custom_quantum_functions.md index 6eb144af76b5..e15126c4204e 100644 --- a/docs/custom_quantum_functions.md +++ b/docs/custom_quantum_functions.md @@ -319,7 +319,7 @@ This runs code every time that the layers get changed. This can be useful for l ### Example `layer_state_set_*` Implementation -This example shows how to set the [RGB Underglow](feature_rgblight.md) lights based on the layer, using the Planck as an example +This example shows how to set the [RGB Underglow](feature_rgblight.md) lights based on the layer, using the Planck as an example. ```c layer_state_t layer_state_set_user(layer_state_t state) { @@ -343,6 +343,11 @@ layer_state_t layer_state_set_user(layer_state_t state) { return state; } ``` + +Use the `IS_LAYER_ON_STATE(state, layer)` and `IS_LAYER_OFF_STATE(state, layer)` macros to check the status of a particular layer. + +Outside of `layer_state_set_*` functions, you can use the `IS_LAYER_ON(layer)` and `IS_LAYER_OFF(layer)` macros to check global layer state. + ### `layer_state_set_*` Function Documentation * Keyboard/Revision: `layer_state_t layer_state_set_kb(layer_state_t state)` diff --git a/docs/feature_layers.md b/docs/feature_layers.md index d3ee747e69f6..3f62cfc805ab 100644 --- a/docs/feature_layers.md +++ b/docs/feature_layers.md @@ -74,10 +74,9 @@ There are a number of functions (and variables) related to how you can use or ma | [`update_tri_layer(x, y, z)`](ref_functions.md#update_tri_layerx-y-z) | Checks if layers `x` and `y` are both on, and sets `z` based on that (on if both on, otherwise off). | | [`update_tri_layer_state(state, x, y, z)`](ref_functions.md#update_tri_layer_statestate-x-y-z) | Does the same as `update_tri_layer(x, y, z)`, but from `layer_state_set_*` functions. | +In addition to the functions that you can call, there are a number of callback functions that get called every time the layer changes. This passes the layer state to the function, where it can be read or modified. -In additional to the functions that you can call, there are a number of callback functions that get called every time the layer changes. This passed the layer state to the function, which can be read or modified. - -|Callbacks |Description | +|Callback |Description | |-----------------------------------------------------|----------------------------------------------------------------------------------------| | `layer_state_set_kb(layer_state_t state)` | Callback for layer functions, for keyboard. | | `layer_state_set_user(layer_state_t state)` | Callback for layer functions, for users. | @@ -86,9 +85,9 @@ In additional to the functions that you can call, there are a number of callback ?> For additional details on how you can use these callbacks, check out the [Layer Change Code](custom_quantum_functions.md#layer-change-code) document. -|Check functions |Description | -|-------------------------------------------|------------------------------------------------------------------------------| -| `layer_state_cmp(cmp_layer_state, layer)` | This checks the `cmp_layer_state` to see if the specific `layer` is enabled. This is meant for use with the layer callbacks. | -| `layer_state_is(layer)` | This checks the layer state to see if the specific `layer` is enabled. (calls `layer_state_cmp` for the global layer state). | +It is also possible to check the state of a particular layer using the following functions and macros. -!> There is `IS_LAYER_ON(layer)` as well, however the `layer_state_cmp` function has some additional handling to ensure that on layer 0 that it returns the correct value. Otherwise, if you check to see if layer 0 is on, you may get an incorrect value returned. +|Function |Description |Aliases +|---------------------------------|-------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------| +| `layer_state_is(layer)` | Checks if the specified `layer` is enabled globally. | `IS_LAYER_ON(layer)`, `IS_LAYER_OFF(layer)` | +| `layer_state_cmp(state, layer)` | Checks `state` to see if the specified `layer` is enabled. Intended for use in layer callbacks. | `IS_LAYER_ON_STATE(state, layer)`, `IS_LAYER_OFF_STATE(state, layer)` | diff --git a/quantum/quantum.h b/quantum/quantum.h index 17d1d41cc9a2..51deac0cd525 100644 --- a/quantum/quantum.h +++ b/quantum/quantum.h @@ -249,8 +249,11 @@ void set_single_persistent_default_layer(uint8_t default_layer); void tap_random_base64(void); -#define IS_LAYER_ON(layer) (layer_state & (1UL << (layer))) -#define IS_LAYER_OFF(layer) (~layer_state & (1UL << (layer))) +#define IS_LAYER_ON(layer) layer_state_is(layer) +#define IS_LAYER_OFF(layer) !layer_state_is(layer) + +#define IS_LAYER_ON_STATE(state, layer) layer_state_cmp(state, layer) +#define IS_LAYER_OFF_STATE(state, layer) !layer_state_cmp(state, layer) void matrix_init_kb(void); void matrix_scan_kb(void); diff --git a/users/konstantin/konstantin.h b/users/konstantin/konstantin.h index 72a161623813..249b3fe15bf5 100644 --- a/users/konstantin/konstantin.h +++ b/users/konstantin/konstantin.h @@ -48,9 +48,6 @@ #define LCT_CPS LCTL_T(KC_CAPS) #define RSF_SLS RSFT_T(KC_SLSH) -#define IS_LAYER_ON_STATE(state, layer) ( (state) & (1UL << (layer))) -#define IS_LAYER_OFF_STATE(state, layer) (~(state) & (1UL << (layer))) - // Clear mods, perform action, restore mods #define CLEAN_MODS(action) { \ uint8_t mods = get_mods(); \ From 19b70b2737517b08beebe28ad5b2d084c9f59bf3 Mon Sep 17 00:00:00 2001 From: Ryan Date: Fri, 17 Jul 2020 03:01:34 +1000 Subject: [PATCH 385/930] MSYS2: Switch to bootloadHID package and bring back avrdude package (#9736) * MSYS2: Switch to bootloadHID package and bring back avrdude package * Update Zadig docs as well --- docs/driver_installation_zadig.md | 2 +- util/activate_msys2.sh | 1 - util/activate_wsl.sh | 1 - util/drivers.txt | 2 +- util/msys2_install.sh | 5 +---- util/win_shared_install.sh | 4 ---- 6 files changed, 3 insertions(+), 12 deletions(-) diff --git a/docs/driver_installation_zadig.md b/docs/driver_installation_zadig.md index b04a6fbef1b9..403b78da0ce0 100644 --- a/docs/driver_installation_zadig.md +++ b/docs/driver_installation_zadig.md @@ -23,7 +23,7 @@ Zadig will automatically detect the bootloader device. You may sometimes need to !> If Zadig lists one or more devices with the `HidUsb` driver, your keyboard is probably not in bootloader mode. The arrow will be colored orange and you will be asked to confirm modifying a system driver. **Do not** proceed if this is the case! -If the arrow appears green, select the driver, and click **Install Driver**. The `libusb-win32` driver will usually work for AVR, and `WinUSB` for ARM, but if you still cannot flash the board, try installing a different driver from the list. For flashing a USBaspLoader device via command line with msys2, the `libusbk` driver is recommended, otherwise `libusb-win32` will work fine if you are using QMK Toolbox for flashing. +If the arrow appears green, select the driver, and click **Install Driver**. The `libusb-win32` driver will usually work for AVR, and `WinUSB` for ARM, but if you still cannot flash the board, try installing a different driver from the list. USBAspLoader devices must use the `libusbK` driver. ![Zadig with a bootloader driver correctly installed](https://i.imgur.com/b8VgXzx.png) diff --git a/util/activate_msys2.sh b/util/activate_msys2.sh index 8741cc6b06f9..f6e19f99db12 100755 --- a/util/activate_msys2.sh +++ b/util/activate_msys2.sh @@ -5,7 +5,6 @@ function export_variables { export PATH=$PATH:$util_dir export PATH=$PATH:$util_dir/dfu-programmer export PATH=$PATH:$util_dir/dfu-util-0.9-win64 - export PATH=$PATH:$util_dir/bootloadHID.2012-12-08/commandline export PATH=$PATH:$util_dir/avr8-gnu-toolchain/bin export PATH=$PATH:$util_dir/gcc-arm-none-eabi/bin } diff --git a/util/activate_wsl.sh b/util/activate_wsl.sh index 26a47187a9c7..7f6f5473104c 100755 --- a/util/activate_wsl.sh +++ b/util/activate_wsl.sh @@ -7,7 +7,6 @@ function export_variables { export DFU_PROGRAMMER=$download_dir/dfu-programmer/dfu-programmer.exe export DFU_UTIL=$download_dir/dfu-util-0.9-win64/dfu-util.exe export TEENSY_LOADER_CLI=$download_dir/teensy_loader_cli.exe - export BOOTLOADHID_PROGRAMMER=$download_dir/bootloadHID.2012-12-08/commandline/bootloadHID.exe } export_variables diff --git a/util/drivers.txt b/util/drivers.txt index 71d99eaa903a..c3c5e286b1c0 100644 --- a/util/drivers.txt +++ b/util/drivers.txt @@ -4,7 +4,7 @@ # Driver can be one of winusb,libusb,libusbk # Use Windows Powershell and type [guid]::NewGuid() to generate guids winusb,STM32 Bootloader,0483,DF11,6d98a87f-4ecf-464d-89ed-8c684d857a75 -libusb,USBaspLoader,16C0,05DC,e69affdc-0ef0-427c-aefb-4e593c9d2724 +libusbk,USBaspLoader,16C0,05DC,e69affdc-0ef0-427c-aefb-4e593c9d2724 winusb,Kiibohd DFU Bootloader,1C11,B007,aa5a3f86-b81e-4416-89ad-0c1ea1ed63af libusb,ATmega16U2,03EB,2FEF,007274da-b75f-492e-a288-8fc0aff8339f libusb,ATmega32U2,03EB,2FF0,ddc2c572-cb6e-4f61-a6cc-1a5de941f063 diff --git a/util/msys2_install.sh b/util/msys2_install.sh index 41200dc78629..1b50bba707d9 100755 --- a/util/msys2_install.sh +++ b/util/msys2_install.sh @@ -20,10 +20,7 @@ function install_avr { rm avr8-gnu-toolchain/bin/make.exe rm avr-gcc-8.3.0-x86-mingw.zip - # FIXME: As of 2020-05-19, the MSYS2 avrdude cannot flash USBaspLoader devices, for some reason - # (warning: cannot set sck period) - # However, the avr-gcc toolchain above contains an avrdude which can, so let's just not install this for now - #pacman --needed --disable-download-timeout -S mingw-w64-x86_64-avrdude + pacman --needed --disable-download-timeout -S mingw-w64-x86_64-avrdude mingw-w64-x86_64-bootloadhid } function install_arm { diff --git a/util/win_shared_install.sh b/util/win_shared_install.sh index 072ca47c8178..17282bc94ddb 100755 --- a/util/win_shared_install.sh +++ b/util/win_shared_install.sh @@ -18,10 +18,6 @@ function install_utils { wget 'https://www.pjrc.com/teensy/teensy_loader_cli_windows.zip' unzip teensy_loader_cli_windows.zip - echo "Installing bootloadHID" - wget 'https://www.obdev.at/downloads/vusb/bootloadHID.2012-12-08.zip' - unzip bootloadHID.2012-12-08.zip - echo "Downloading the QMK driver installer" wget -qO- https://api.github.com/repos/qmk/qmk_driver_installer/releases | grep browser_download_url | head -n 1 | cut -d '"' -f 4 | wget -i - From 2773082d9d1dd3f28ae2b4e43543bd235ec6f81c Mon Sep 17 00:00:00 2001 From: Rossman360 <53881724+Rossman360@users.noreply.github.com> Date: Thu, 16 Jul 2020 16:20:02 -0400 Subject: [PATCH 386/930] add default Rebound lighting settings (#9740) * cleaning up * deleting to undelete * add rebound lighting settings --- keyboards/montsinger/rebound/rev4/config.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/keyboards/montsinger/rebound/rev4/config.h b/keyboards/montsinger/rebound/rev4/config.h index c4fc053ea9c0..9932cd2d674a 100644 --- a/keyboards/montsinger/rebound/rev4/config.h +++ b/keyboards/montsinger/rebound/rev4/config.h @@ -60,6 +60,10 @@ diode) /* Locking resynchronize hack */ #define LOCKING_RESYNC_ENABLE +/* ws2812 RGB LED */ +#define RGB_DI_PIN B6 +#define RGBLED_NUM 17 + /* Bootmagic Lite key configuration */ // #define BOOTMAGIC_LITE_ROW 0 // #define BOOTMAGIC_LITE_COLUMN 0 From 4e02253aaf79f696e3e3470e8e97a14a5722d328 Mon Sep 17 00:00:00 2001 From: Maarten Dekkers Date: Fri, 17 Jul 2020 13:53:37 +0200 Subject: [PATCH 387/930] [Keyboard] Add PocketType (#9728) * Add PocketType * Add info.json, changes readmes and other stuff * More changes Co-authored-by: Maarten Dekkers --- keyboards/maartenwut/pockettype/config.h | 220 ++++++++++++++++++ keyboards/maartenwut/pockettype/info.json | 12 + .../pockettype/keymaps/default/keymap.c | 46 ++++ .../pockettype/keymaps/default/readme.md | 1 + keyboards/maartenwut/pockettype/pockettype.c | 39 ++++ keyboards/maartenwut/pockettype/pockettype.h | 40 ++++ keyboards/maartenwut/pockettype/readme.md | 13 ++ keyboards/maartenwut/pockettype/rules.mk | 31 +++ 8 files changed, 402 insertions(+) create mode 100644 keyboards/maartenwut/pockettype/config.h create mode 100644 keyboards/maartenwut/pockettype/info.json create mode 100644 keyboards/maartenwut/pockettype/keymaps/default/keymap.c create mode 100644 keyboards/maartenwut/pockettype/keymaps/default/readme.md create mode 100644 keyboards/maartenwut/pockettype/pockettype.c create mode 100644 keyboards/maartenwut/pockettype/pockettype.h create mode 100644 keyboards/maartenwut/pockettype/readme.md create mode 100644 keyboards/maartenwut/pockettype/rules.mk diff --git a/keyboards/maartenwut/pockettype/config.h b/keyboards/maartenwut/pockettype/config.h new file mode 100644 index 000000000000..650572114d33 --- /dev/null +++ b/keyboards/maartenwut/pockettype/config.h @@ -0,0 +1,220 @@ +/* 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 0xFA7D +#define DEVICE_VER 0x0001 +#define MANUFACTURER Maartenwut +#define PRODUCT PocketType +#define DESCRIPTION A small 4x12 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,D1,D7,B5} +#define MATRIX_COL_PINS {F6,F7,B1,B3,B2,B6,B4,E6,C6,D4,D0,D2} +#define UNUSED_PINS {B1,B2,B3} + +/* 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 + +/* Bootmagic Lite key configuration */ +// #define BOOTMAGIC_LITE_ROW 0 +// #define BOOTMAGIC_LITE_COLUMN 0 diff --git a/keyboards/maartenwut/pockettype/info.json b/keyboards/maartenwut/pockettype/info.json new file mode 100644 index 000000000000..7f9df4cc6a03 --- /dev/null +++ b/keyboards/maartenwut/pockettype/info.json @@ -0,0 +1,12 @@ +{ + "keyboard_name": "PocketType", + "url": "https://mechboards.co.uk/shop/kits/pockettype/", + "maintainer": "maartenwut", + "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}] + } + } +} diff --git a/keyboards/maartenwut/pockettype/keymaps/default/keymap.c b/keyboards/maartenwut/pockettype/keymaps/default/keymap.c new file mode 100644 index 000000000000..812ced4d9147 --- /dev/null +++ b/keyboards/maartenwut/pockettype/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_MPLY), + +[_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, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______), + +}; diff --git a/keyboards/maartenwut/pockettype/keymaps/default/readme.md b/keyboards/maartenwut/pockettype/keymaps/default/readme.md new file mode 100644 index 000000000000..281fa6485d75 --- /dev/null +++ b/keyboards/maartenwut/pockettype/keymaps/default/readme.md @@ -0,0 +1 @@ +This is the default keymap for the PocketType. diff --git a/keyboards/maartenwut/pockettype/pockettype.c b/keyboards/maartenwut/pockettype/pockettype.c new file mode 100644 index 000000000000..efbd60cad2a4 --- /dev/null +++ b/keyboards/maartenwut/pockettype/pockettype.c @@ -0,0 +1,39 @@ +/* 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 "pockettype.h" + +void matrix_init_kb(void) { + led_init_ports(); + + matrix_init_user(); +}; + +void led_init_ports(void) { + // * Set our LED pins as output and high + setPinOutput(F5); + writePinHigh(F5); + + setPinOutput(F4); + writePinLow(F4); +} + +bool led_update_kb(led_t led_state) { + if(led_update_user(led_state)) { + writePin(F5, !led_state.caps_lock); + } + + return true; +} diff --git a/keyboards/maartenwut/pockettype/pockettype.h b/keyboards/maartenwut/pockettype/pockettype.h new file mode 100644 index 000000000000..583338aae917 --- /dev/null +++ b/keyboards/maartenwut/pockettype/pockettype.h @@ -0,0 +1,40 @@ +/* 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" + +/* 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 } \ +} diff --git a/keyboards/maartenwut/pockettype/readme.md b/keyboards/maartenwut/pockettype/readme.md new file mode 100644 index 000000000000..5529c2d759d4 --- /dev/null +++ b/keyboards/maartenwut/pockettype/readme.md @@ -0,0 +1,13 @@ +# PocketType + +## Support +* Keyboard Maintainer: [Maarten Dekkers](https://github.com/maartenwut) +* Hardware Supported: PocketType +* Hardware Availability: [mechboards.co.uk](https://mechboards.co.uk/shop/kits/pockettype/) + +## Build +Make example for this keyboard (after setting up your build environment): + + make maartenwut/pockettype: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/pockettype/rules.mk b/keyboards/maartenwut/pockettype/rules.mk new file mode 100644 index 000000000000..164bf9cef536 --- /dev/null +++ b/keyboards/maartenwut/pockettype/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 = 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 +BLUETOOTH_ENABLE = no # Enable Bluetooth +AUDIO_ENABLE = no # Audio output + +LAYOUTS = ortho_4x12 From 3f11f41ec7d96ae848ded3f6a41021b296c7e63a Mon Sep 17 00:00:00 2001 From: Sid Carter Date: Fri, 17 Jul 2020 08:16:09 -0400 Subject: [PATCH 388/930] Keymap addition and updates (Prime_e, ProjectKB PCB, WT60-D) (#9701) * update keymap * update ilpse template as well * fix some key items * move quote the first layer * figure out brackets * update ilpse keymap * update arrow keys on alice * change layers * update layers again * switch to vim keys * add mouse keys Co-authored-by: Khader Syed --- .../prime_e/keymaps/madhatter/keymap.c | 30 +++++++++---------- .../alice/keymaps/madhatter/keymap.c | 20 ++++++------- .../wt60_d/keymaps/madhatter/keymap.c | 29 ++++++++++++++++++ .../wt60_d/keymaps/madhatter/rules.mk | 1 + 4 files changed, 55 insertions(+), 25 deletions(-) create mode 100644 keyboards/wilba_tech/wt60_d/keymaps/madhatter/keymap.c create mode 100644 keyboards/wilba_tech/wt60_d/keymaps/madhatter/rules.mk diff --git a/keyboards/primekb/prime_e/keymaps/madhatter/keymap.c b/keyboards/primekb/prime_e/keymaps/madhatter/keymap.c index 7b08d0ecf458..0a85aee1da10 100644 --- a/keyboards/primekb/prime_e/keymaps/madhatter/keymap.c +++ b/keyboards/primekb/prime_e/keymaps/madhatter/keymap.c @@ -34,7 +34,7 @@ enum ilpse_layers { _ADJUST }; -enum skank_keycodes { +enum ilpse_keycodes { QWERTY = SAFE_RANGE, LOWER, RAISE, @@ -44,30 +44,30 @@ enum skank_keycodes { const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_QWERTY] = LAYOUT( KC_GESC, 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_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_B, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, - KC_LCTL, KC_LALT, LOWER, KC_LCMD, LT(_RAISE, KC_SPC), KC_LALT, KC_RGUI, KC_RCTL + 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_LSPO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSPC, + KC_LCTL, KC_LALT, LOWER, KC_LCMD, KC_SPC, RAISE, KC_RGUI, KC_RCTL ), [_LOWER] = 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_DEL, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 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_LBRC, KC_RBRC, KC_BSLS, KC_TRNS, - KC_TRNS, KC_TRNS, LOWER, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + KC_GRV, 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_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_SCLN, KC_QUOT, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_BSLS, KC_TRNS, + KC_TRNS, KC_TRNS, LOWER, KC_TRNS, KC_TRNS, RAISE, KC_TRNS, KC_TRNS ), [_RAISE] = LAYOUT( - 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_MINS, KC_EQL, KC_LCBR, KC_RCBR, KC_PIPE, KC_GRV, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_UNDS, KC_PLUS, KC_LBRC, KC_RBRC, KC_BSLS, KC_TILD, - KC_TRNS, KC_TRNS, LOWER, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + KC_TILD, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_TRNS, KC_DEL, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MINS, KC_EQL, KC_LCBR, KC_RCBR, KC_PIPE, KC_ENT, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_UNDS, KC_PLUS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, LOWER, KC_TRNS, KC_TRNS, RAISE, KC_TRNS, KC_TRNS ), [_ADJUST] = 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_CAPS, 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, - AG_TOGG, KC_TRNS, LOWER, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + AG_TOGG, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS ) }; diff --git a/keyboards/projectkb/alice/keymaps/madhatter/keymap.c b/keyboards/projectkb/alice/keymaps/madhatter/keymap.c index 4965947e937d..7a671402c0c7 100644 --- a/keyboards/projectkb/alice/keymaps/madhatter/keymap.c +++ b/keyboards/projectkb/alice/keymaps/madhatter/keymap.c @@ -18,8 +18,8 @@ along with this program. If not, see . enum my_layers { _QWERTY, - _FNMS, - _NAVMED + _NAVMED, + _FNMS }; #define FNMS MO(_FNMS) @@ -35,20 +35,20 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_LCTL, KC_LALT, KC_LCMD, NAVMED, KC_SPC, KC_RALT, KC_RCTL ), + [_NAVMED] = LAYOUT_default( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + KC_HOME, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET, + KC_END, _______, _______, _______, _______, _______, KC_MPLY, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, _______, _______, EEP_RST, + _______, _______, _______, _______, _______, KC_VOLD, KC_VOLU, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______ + ), + [_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, _______, _______, _______, 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_HOME, _______, _______, _______, _______, _______, _______, _______, _______, KC_UP, _______, _______, _______, _______, RESET, - KC_END, _______, _______, _______, _______, _______, KC_MPLY, _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, EEP_RST, - _______, _______, _______, _______, _______, KC_VOLD, KC_VOLU, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______ ) }; diff --git a/keyboards/wilba_tech/wt60_d/keymaps/madhatter/keymap.c b/keyboards/wilba_tech/wt60_d/keymaps/madhatter/keymap.c new file mode 100644 index 000000000000..a46c9777f0dd --- /dev/null +++ b/keyboards/wilba_tech/wt60_d/keymaps/madhatter/keymap.c @@ -0,0 +1,29 @@ +// Default layout for WT60-D +#include QMK_KEYBOARD_H + +enum my_layers { + _QWERTY, + _FNMS, +}; + +#define FNMS MO(_FNMS) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +// Default layer +[_QWERTY] = 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_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_GRV, 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, FNMS, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_SPC, KC_RGUI, FNMS, KC_RCTL), + +// Fn1 Layer +[_FNMS] = 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_BSLS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_MS_U, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_INS, KC_TRNS, KC_PSCR, KC_SLCK, KC_PAUS, RESET, + AG_TOGG, KC_MS_L, KC_MS_D, KC_MS_R, KC_TRNS, KC_TRNS, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, 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), + +}; diff --git a/keyboards/wilba_tech/wt60_d/keymaps/madhatter/rules.mk b/keyboards/wilba_tech/wt60_d/keymaps/madhatter/rules.mk new file mode 100644 index 000000000000..35591533cc6c --- /dev/null +++ b/keyboards/wilba_tech/wt60_d/keymaps/madhatter/rules.mk @@ -0,0 +1 @@ +MOUSEKEY_ENABLE = yes \ No newline at end of file From 56beaf7d3f5bb135fbb516b4824d3e8c3643978f Mon Sep 17 00:00:00 2001 From: moyi4681 Date: Fri, 17 Jul 2020 20:26:50 +0800 Subject: [PATCH 389/930] Update MAJA info.json (#9674) * Update info.json * Update keyboards/kbdfans/maja/info.json Co-authored-by: James Young <18669334+noroadsleft@users.noreply.github.com> * Update keyboards/kbdfans/maja/info.json Co-authored-by: James Young <18669334+noroadsleft@users.noreply.github.com> Co-authored-by: James Young <18669334+noroadsleft@users.noreply.github.com> --- keyboards/kbdfans/maja/info.json | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/keyboards/kbdfans/maja/info.json b/keyboards/kbdfans/maja/info.json index 80526d09e122..5427f63ffcf5 100644 --- a/keyboards/kbdfans/maja/info.json +++ b/keyboards/kbdfans/maja/info.json @@ -1,16 +1,15 @@ { - "keyboard_name": "maja", + "keyboard_name": "MAJA", "url": "", - "maintainer": "KBDFANS", + "maintainer": "DZTECH", "width": 18.75, "height": 5.5, "layouts": { "LAYOUT": { "layout": [ - {"x": 2.75, "y": 0}, - {"x": 12.75, "y": 0}, {"x": 0.75, "y": 0.25}, {"x": 1.75, "y": 0.25}, + {"x": 2.75, "y": 0}, {"x": 3.75, "y": 0.25}, {"x": 4.75, "y": 0.25}, {"x": 5.75, "y": 0.25}, @@ -19,6 +18,7 @@ {"x": 9.75, "y": 0.25}, {"x": 10.75, "y": 0.25}, {"x": 11.75, "y": 0.25}, + {"x": 12.75, "y": 0}, {"x": 13.75, "y": 0.25}, {"x": 14.75, "y": 0.25, "w": 2}, {"x": 17.75, "y": 0.25}, @@ -77,4 +77,4 @@ ] } } -} \ No newline at end of file +} From 07a817d3e5454f9dc3ecd5f7e7b49197bfb36599 Mon Sep 17 00:00:00 2001 From: Josh Johnson Date: Fri, 17 Jul 2020 22:35:44 +1000 Subject: [PATCH 390/930] [keymap] Add VIA support for Hub16 (#9638) * fix encoder switch not staying depressed * add via support * change default keymap * change VID-PID * remove LTO * fix hold bug keeping debouncing --- keyboards/hub16/config.h | 8 ++-- keyboards/hub16/keymaps/via/keymap.c | 66 ++++++++++++++++++++++++++++ keyboards/hub16/keymaps/via/rules.mk | 4 ++ keyboards/hub16/matrix.c | 30 ++++++------- 4 files changed, 87 insertions(+), 21 deletions(-) create mode 100755 keyboards/hub16/keymaps/via/keymap.c create mode 100644 keyboards/hub16/keymaps/via/rules.mk diff --git a/keyboards/hub16/config.h b/keyboards/hub16/config.h index ed14178d6011..a18e0027b1d3 100755 --- a/keyboards/hub16/config.h +++ b/keyboards/hub16/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 0x8F73 +#define VENDOR_ID 0x6A6A +#define PRODUCT_ID 0x4810 #define DEVICE_VER 0x0001 #define MANUFACTURER Josh Johnson #define PRODUCT Hub16 @@ -42,9 +42,9 @@ along with this program. If not, see . * */ #define MATRIX_ROW_PINS \ - { F0, C7, C6, B6, E6} + { F0, C7, C6, B6, E6} #define MATRIX_COL_PINS \ - { F4, F1, D5, D3 } + { F4, F1, D5, D3 } /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/hub16/keymaps/via/keymap.c b/keyboards/hub16/keymaps/via/keymap.c new file mode 100755 index 000000000000..c6f119adb7db --- /dev/null +++ b/keyboards/hub16/keymaps/via/keymap.c @@ -0,0 +1,66 @@ +/* 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 + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT( /* Base */ + KC_MUTE, KC_MPLY, + KC_7, KC_8, KC_9, KC_PAST, + KC_4, KC_5, KC_6, KC_PMNS, + KC_1, KC_2, KC_3, KC_PPLS, + MO(1), KC_0, KC_PDOT, KC_PENT + ), + + [1] = LAYOUT( /* LED Control */ + _______, _______, + _______, RGB_MOD, RGB_RMOD, RGB_TOG, + RGB_VAD, RGB_VAI, RGB_HUD, RGB_HUI, + RGB_SAD, RGB_SAI, _______, _______, + _______, _______, RESET, _______ + ), + + [2] = LAYOUT( + _______, _______, + _______, _______, _______, _______, + _______, _______, _______, _______, + _______, _______, _______, _______, + _______, _______, _______, _______ + ), + + [3] = LAYOUT( + _______, _______, + _______, _______, _______, _______, + _______, _______, _______, _______, + _______, _______, _______, _______, + _______, _______, _______, _______ + ), +}; + +void encoder_update_user(uint8_t index, bool clockwise) { + if (index == 0) { /* Left Encoder */ + if (clockwise) { + tap_code(KC_VOLD); + } else { + tap_code(KC_VOLU); + } + } else if (index == 1) { /* Right Encoder */ + if (clockwise) { + tap_code(KC_MPRV); + } else { + tap_code(KC_MNXT); + } + } +} diff --git a/keyboards/hub16/keymaps/via/rules.mk b/keyboards/hub16/keymaps/via/rules.mk new file mode 100644 index 000000000000..b1c00b69f57f --- /dev/null +++ b/keyboards/hub16/keymaps/via/rules.mk @@ -0,0 +1,4 @@ +VIA_ENABLE = yes +CONSOLE_ENABLE = no +COMMAND_ENABLE = no +TAP_DANCE_ENABLE = no diff --git a/keyboards/hub16/matrix.c b/keyboards/hub16/matrix.c index ad77c923bea6..a0d8314de610 100644 --- a/keyboards/hub16/matrix.c +++ b/keyboards/hub16/matrix.c @@ -25,7 +25,7 @@ along with this program. If not, see . // Encoder things #define SWITCH_1 F7 #define SWITCH_2 D7 -static bool read_encoder_values(matrix_row_t current_matrix[], uint8_t current_row); +static bool read_encoder_switches(matrix_row_t current_matrix[], uint8_t current_row); #ifdef MATRIX_MASKED extern const matrix_row_t matrix_mask[]; @@ -128,7 +128,7 @@ static bool read_cols_on_row(matrix_row_t current_matrix[], uint8_t current_row) } // Unselect row - unselect_row(current_row); + unselect_row(current_row); return (last_row_value != current_matrix[current_row]); } @@ -223,27 +223,23 @@ uint8_t matrix_scan(void) { debounce(raw_matrix, matrix, MATRIX_ROWS, changed); // Read encoder switches, already debounced - changed |= read_encoder_values(matrix, 4); + changed |= read_encoder_switches(matrix, 4); matrix_scan_quantum(); return (uint8_t)changed; } // Customisations for the encoders -void matrix_init_kb(void){ +void matrix_init_kb(void) { setPinInput(SWITCH_1); setPinInput(SWITCH_2); } -void matrix_scan_kb(void){ +void matrix_scan_kb(void) {} -} - -void matrix_print(void){ - -} +void matrix_print(void) {} -static bool read_encoder_values(matrix_row_t current_matrix[], uint8_t current_row) { +static bool read_encoder_switches(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]; @@ -253,18 +249,18 @@ static bool read_encoder_values(matrix_row_t current_matrix[], uint8_t current_r // 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; + bool btn_1_pressed = 0; + bool btn_2_pressed = 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); + (btn_1_array == 0b11111111) ? (btn_1_pressed = 1) : (btn_1_pressed = 0); + (btn_2_array == 0b11111111) ? (btn_2_pressed = 1) : (btn_2_pressed = 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; + current_matrix[current_row] |= btn_1_pressed ? (1 << 0) : 0; + current_matrix[current_row] |= btn_2_pressed ? (1 << 1) : 0; return (last_row_value != current_matrix[current_row]); } \ No newline at end of file From 9fddb1b5fad6b263750598131af31867e24a077f Mon Sep 17 00:00:00 2001 From: MechMerlin <30334081+mechmerlin@users.noreply.github.com> Date: Fri, 17 Jul 2020 07:41:30 -0700 Subject: [PATCH 391/930] VIA Support: Skog Lite (#9686) * via support for the skog lite * some code cleanup before submission * Update keyboards/percent/skog_lite/keymaps/via/config.h Co-authored-by: Joel Challis * Update keyboards/percent/skog_lite/keymaps/via/keymap.c Co-authored-by: Ryan Co-authored-by: Joel Challis Co-authored-by: Ryan --- .../percent/skog_lite/keymaps/via/config.h | 3 ++ .../percent/skog_lite/keymaps/via/keymap.c | 44 +++++++++++++++++++ .../percent/skog_lite/keymaps/via/rules.mk | 5 +++ 3 files changed, 52 insertions(+) create mode 100644 keyboards/percent/skog_lite/keymaps/via/config.h create mode 100644 keyboards/percent/skog_lite/keymaps/via/keymap.c create mode 100644 keyboards/percent/skog_lite/keymaps/via/rules.mk diff --git a/keyboards/percent/skog_lite/keymaps/via/config.h b/keyboards/percent/skog_lite/keymaps/via/config.h new file mode 100644 index 000000000000..a3b77a5b4d0b --- /dev/null +++ b/keyboards/percent/skog_lite/keymaps/via/config.h @@ -0,0 +1,3 @@ +#pragma once + +#define DYNAMIC_KEYMAP_LAYER_COUNT 3 diff --git a/keyboards/percent/skog_lite/keymaps/via/keymap.c b/keyboards/percent/skog_lite/keymaps/via/keymap.c new file mode 100644 index 000000000000..cfb3b61dfdbf --- /dev/null +++ b/keyboards/percent/skog_lite/keymaps/via/keymap.c @@ -0,0 +1,44 @@ +/* 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_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), + +[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, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 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_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, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 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/percent/skog_lite/keymaps/via/rules.mk b/keyboards/percent/skog_lite/keymaps/via/rules.mk new file mode 100644 index 000000000000..97010a994b6d --- /dev/null +++ b/keyboards/percent/skog_lite/keymaps/via/rules.mk @@ -0,0 +1,5 @@ +VIA_ENABLE = yes +LTO_ENABLE = yes + +MOUSEKEY_ENABLE = no +EXTRAKEY_ENABLE = no From 9aa953ecb476b952e9cb16a1812e9e1aef88b8dd Mon Sep 17 00:00:00 2001 From: Alabahuy Date: Fri, 17 Jul 2020 22:39:55 +0700 Subject: [PATCH 392/930] [Keyboard] add rart75 (#9649) * Create config.h * Create info.json * Create rart75.c * Create rart75.h * Create readme.md * Create rules.mk * Create keymap.c * Create keymap.c * Update keymap.c * Update info.json * Update info.json * Update info.json * Update readme.md * Update config.h * Update rules.mk * Update readme.md * Update readme.md --- keyboards/rart/rart75/config.h | 52 +++++ keyboards/rart/rart75/info.json | 197 ++++++++++++++++++ keyboards/rart/rart75/keymaps/ansi/keymap.c | 48 +++++ .../rart/rart75/keymaps/default/keymap.c | 48 +++++ keyboards/rart/rart75/rart75.c | 15 ++ keyboards/rart/rart75/rart75.h | 46 ++++ keyboards/rart/rart75/readme.md | 15 ++ keyboards/rart/rart75/rules.mk | 34 +++ 8 files changed, 455 insertions(+) create mode 100644 keyboards/rart/rart75/config.h create mode 100644 keyboards/rart/rart75/info.json create mode 100644 keyboards/rart/rart75/keymaps/ansi/keymap.c create mode 100644 keyboards/rart/rart75/keymaps/default/keymap.c create mode 100644 keyboards/rart/rart75/rart75.c create mode 100644 keyboards/rart/rart75/rart75.h create mode 100644 keyboards/rart/rart75/readme.md create mode 100644 keyboards/rart/rart75/rules.mk diff --git a/keyboards/rart/rart75/config.h b/keyboards/rart/rart75/config.h new file mode 100644 index 000000000000..f3d5057a1667 --- /dev/null +++ b/keyboards/rart/rart75/config.h @@ -0,0 +1,52 @@ +/* +Copyright 2020 Alabahuy + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License 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 0x414C // "AL" +#define PRODUCT_ID 0x0075 // "75" +#define DEVICE_VER 0x0001 +#define MANUFACTURER Alabahuy +#define PRODUCT RART75 +#define DESCRIPTION 75% Mechanical Keyboard + +/* key matrix size */ +#define MATRIX_ROWS 6 +#define MATRIX_COLS 16 + +/* key matrix pins */ +#define MATRIX_ROW_PINS { F1, F4, F6, C7, D4, D0 } +#define MATRIX_COL_PINS { D5, D3, D2, D1, C6, B6, B5, B4, D7, D6, B3, B1, F7, F5, B2, B7 } +#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 ENCODERS_PAD_A { E6 } +#define ENCODERS_PAD_B { B0 } diff --git a/keyboards/rart/rart75/info.json b/keyboards/rart/rart75/info.json new file mode 100644 index 000000000000..970913769424 --- /dev/null +++ b/keyboards/rart/rart75/info.json @@ -0,0 +1,197 @@ +{ + "keyboard_name": "RART75", + "url": "", + "maintainer": "Alabahuy", + "width": 16, + "height": 6, + "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" : "Delete", "x":14, "y":0}, + {"label" : "Insert", "x":15.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" : "/", "x":13, "y":1.25}, + {"label" : "Backspace", "x":14, "y":1.25}, + {"label" : "Page up", "x":15.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 down", "x":15.5, "y":2.25}, + + {"label" : "Caps lock", "x":0, "y":3.25, "w":1.75}, + {"label" : "A", "x":1.75, "y":3.25}, + {"label" : "S", "x":1.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" : "Home", "x":15.5, "y":3.25}, + + {"label" : "Shift", "x":0, "y":4.25, "w":2.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, "y":4.5}, + {"label" : "End", "x":15.5, "y":4.25}, + + {"label" : "Ctrl", "x":0, "y":5.25, "w":1.25}, + {"label" : "Windows", "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":2.25}, + {"label" : "Fn", "x":6, "y":5.25, "w":1.25}, + {"label" : "Space", "x":7.25, "y":5.25, "w":2.75}, + {"label" : "Alt", "x":10, "y":5.25 }, + {"label" : "Windows","x":11, "y":5.25 }, + {"label" : "Ctrl", "x":12, "y":5.25 }, + {"label" : "Left", "x":13.25, "y":5.5 }, + {"label" : "Down", "x":14.25, "y":5.5 }, + {"label" : "Right", "x":15.25, "y":5.5 } + ] + }, + + "LAYOUT_ansi": { + "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}, + {"label" : "Encoder", "x":15.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, "w":2}, + {"label" : "Page up", "x":15.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 down", "x":15.5, "y":2.25}, + + {"label" : "Caps lock", "x":0, "y":3.25, "w":1.75}, + {"label" : "A", "x":1.75, "y":3.25}, + {"label" : "S", "x":1.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" : "Home", "x":15.5, "y":3.25}, + + {"label" : "Shift", "x":0, "y":4.25, "w":2.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, "y":4.5}, + {"label" : "End", "x":15.5, "y":4.25}, + + {"label" : "Ctrl", "x":0, "y":5.25, "w":1.25}, + {"label" : "Windows", "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 }, + {"label" : "Windows","x":11, "y":5.25 }, + {"label" : "Ctrl", "x":12, "y":5.25 }, + {"label" : "Left", "x":13.25, "y":5.5 }, + {"label" : "Down", "x":14.25, "y":5.5 }, + {"label" : "Right", "x":15.25, "y":5.5 } + ] + } + } +} diff --git a/keyboards/rart/rart75/keymaps/ansi/keymap.c b/keyboards/rart/rart75/keymaps/ansi/keymap.c new file mode 100644 index 000000000000..71bbcb735125 --- /dev/null +++ b/keyboards/rart/rart75/keymaps/ansi/keymap.c @@ -0,0 +1,48 @@ +/* +Copyright 2020 Alabahuy + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public 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( + 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, MO(1), KC_INS, + 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_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_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_APP, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT + ), + + [1] = LAYOUT_ansi( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, 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, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), +}; + +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); + } + } +} diff --git a/keyboards/rart/rart75/keymaps/default/keymap.c b/keyboards/rart/rart75/keymaps/default/keymap.c new file mode 100644 index 000000000000..ffbd77a325b0 --- /dev/null +++ b/keyboards/rart/rart75/keymaps/default/keymap.c @@ -0,0 +1,48 @@ +/* +Copyright 2020 Alabahuy + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public 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_INS, KC_MPLY, + 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_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_LGUI, KC_LALT, KC_SPC, MO(1), KC_SPC, KC_RALT, KC_APP, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT + ), + + [1] = LAYOUT_all( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, 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, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), +}; + +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); + } + } +} diff --git a/keyboards/rart/rart75/rart75.c b/keyboards/rart/rart75/rart75.c new file mode 100644 index 000000000000..15ae54f9e871 --- /dev/null +++ b/keyboards/rart/rart75/rart75.c @@ -0,0 +1,15 @@ +/* Copyright 2020 Alabahuy + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#include "rart75.h" diff --git a/keyboards/rart/rart75/rart75.h b/keyboards/rart/rart75/rart75.h new file mode 100644 index 000000000000..13ece0e0541b --- /dev/null +++ b/keyboards/rart/rart75/rart75.h @@ -0,0 +1,46 @@ + +#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( \ + K00, K01, K02, K03, K04, K05, K06, K07, K08, K0A, K0B, K0C, K0D, K0E, K0F, \ + K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E, K1F, \ + K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, K2F, \ + K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3F, \ + K40, K41, K42, K43, K44, K45, K46, K47, K48, K49, K4A, K4B, K4E, K4F, \ + K50, K51, K52, K53, K54, K57, K58, K59, K5A, K5B, K5E, K5F \ +) \ +{ \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08, KC_NO, K0A, K0B, K0C, K0D, K0E, K0F }, \ + { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E, K1F }, \ + { K20, K21, 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, K3C, KC_NO, KC_NO, K3F }, \ + { K40, K41, K42, K43, K44, K45, K46, K47, K48, K49, K4A, K4B, KC_NO, KC_NO, K4E, K4F }, \ + { K50, K51, K52, K53, K54, KC_NO, KC_NO, K57, K58, K59, K5A, K5B, KC_NO, KC_NO, K5E, K5F }, \ +} + +#define LAYOUT_ansi( \ + K00, K01, K02, K03, K04, K05, K06, K07, K08, K0A, K0B, K0C, K0D, K0E, K0F, \ + K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1F, \ + K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, K2F, \ + K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3F, \ + K40, K41, K42, K43, K44, K45, K46, K47, K48, K49, K4A, K4B, K4E, K4F, \ + K50, K51, K52, K54, K58, K59, K5A, K5B, K5E, K5F \ +) \ +{ \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08, KC_NO, K0A, K0B, K0C, K0D, K0E, K0F }, \ + { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, KC_NO, K1F }, \ + { K20, K21, 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, K3C, KC_NO, KC_NO, K3F }, \ + { K40, K41, K42, K43, K44, K45, K46, K47, K48, K49, K4A, K4B, KC_NO, KC_NO, K4E, K4F }, \ + { K50, K51, K52, KC_NO, K54, KC_NO, KC_NO, KC_NO, K58, K59, K5A, K5B, KC_NO, KC_NO, K5E, K5F }, \ +} diff --git a/keyboards/rart/rart75/readme.md b/keyboards/rart/rart75/readme.md new file mode 100644 index 000000000000..ac13275c1c6a --- /dev/null +++ b/keyboards/rart/rart75/readme.md @@ -0,0 +1,15 @@ +# [RART 75](https://github.com/alabahuy/RART/tree/master/RART75) + +![RART 75 TOP](https://user-images.githubusercontent.com/30220306/85908009-9de88a80-b83d-11ea-84e8-d1bc07e6bf38.png) + +75% pcb with encoder, based on IMKG (Indonesia Mechanical Keyboard Group) + +* Keyboard Maintainer: [Alabahuy](https://github.com/alabahuy) +* Hardware Supported: RART75 PCB, Atmega32U4, Mini USB, Encoders +* Hardware Availability: Private GB + +Make example for this keyboard (after setting up your build environment): + + make rart/rart75: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/rart/rart75/rules.mk b/keyboards/rart/rart75/rules.mk new file mode 100644 index 000000000000..e5128449a9a0 --- /dev/null +++ b/keyboards/rart/rart75/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 = 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 = 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 +AUDIO_ENABLE = no # Audio output +FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches +ENCODER_ENABLE = yes + From 412c6bf44785e2312821a484a7cd36ce1ec6361a Mon Sep 17 00:00:00 2001 From: NightlyBoards <65656486+NightlyBoards@users.noreply.github.com> Date: Fri, 17 Jul 2020 23:46:11 +0800 Subject: [PATCH 393/930] Add Alter Keyboard (#9579) * Create Alter folder * Revert "Create Alter folder" This reverts commit 361103b821dbb22957b66cdedb0d11f996def71c. * Add Alter keyboard * Fixed keymap.c * Fixed another issue on the keymap.c * Updated the files based on the comments * Edited default keymap and enabled rgbanimations on config.h * Updated the info.json --- keyboards/nightly_boards/alter/rev1/config.h | 96 +++++++++++++++++++ keyboards/nightly_boards/alter/rev1/info.json | 82 ++++++++++++++++ .../alter/rev1/keymaps/default/keymap.c | 33 +++++++ keyboards/nightly_boards/alter/rev1/readme.md | 12 +++ keyboards/nightly_boards/alter/rev1/rev1.c | 37 +++++++ keyboards/nightly_boards/alter/rev1/rev1.h | 46 +++++++++ keyboards/nightly_boards/alter/rev1/rules.mk | 31 ++++++ 7 files changed, 337 insertions(+) create mode 100644 keyboards/nightly_boards/alter/rev1/config.h create mode 100644 keyboards/nightly_boards/alter/rev1/info.json create mode 100644 keyboards/nightly_boards/alter/rev1/keymaps/default/keymap.c create mode 100644 keyboards/nightly_boards/alter/rev1/readme.md create mode 100644 keyboards/nightly_boards/alter/rev1/rev1.c create mode 100644 keyboards/nightly_boards/alter/rev1/rev1.h create mode 100644 keyboards/nightly_boards/alter/rev1/rules.mk diff --git a/keyboards/nightly_boards/alter/rev1/config.h b/keyboards/nightly_boards/alter/rev1/config.h new file mode 100644 index 000000000000..86ebe2ad74dd --- /dev/null +++ b/keyboards/nightly_boards/alter/rev1/config.h @@ -0,0 +1,96 @@ +/* +Copyright 2020 Neil Brian Ramirez +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License 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 0x0717 +#define PRODUCT_ID 0x0002 +#define DEVICE_VER 0x0001 +#define MANUFACTURER Neil Brian Ramirez +#define PRODUCT Alter +#define DESCRIPTION An Alice layout 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 { F7, F6, F5, E6, D0, B7, D5, D3, D2, D1 } +#define MATRIX_COL_PINS { C7, C6, B6, B5, B0, B1, B2, B3 } +#define UNUSED_PINS + +/* COL2ROW, ROW2COL*/ +#define DIODE_DIRECTION COL2ROW + +// #define BACKLIGHT_PIN F1 +// #define BACKLIGHT_BREATHING +// #define BACKLIGHT_LEVELS 3 + +#define RGB_DI_PIN F1 +#ifdef RGB_DI_PIN +#define RGBLED_NUM 18 +#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 + + + +/* disable these deprecated features by default */ +#define NO_ACTION_MACRO +#define NO_ACTION_FUNCTION + diff --git a/keyboards/nightly_boards/alter/rev1/info.json b/keyboards/nightly_boards/alter/rev1/info.json new file mode 100644 index 000000000000..abf155f1c527 --- /dev/null +++ b/keyboards/nightly_boards/alter/rev1/info.json @@ -0,0 +1,82 @@ +{ + "keyboard_name": "Alter", + "url": "", + "maintainer": "Neil Brian Ramirez", + "width": 20, + "height": 5.25, + "layouts": { + "LAYOUT": { + "layout": [ + {"x":0.5, "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":11.25, "y":0}, + {"x":12.25, "y":0}, + {"x":13.25, "y":0}, + {"x":14.25, "y":0}, + {"x":15.25, "y":0}, + {"x":16.25, "y":0}, + {"x":17.25, "y":0}, + {"x":18.25, "y":0}, + + {"x":0.25, "y":1}, + {"x":1.75, "y":1, "w":1.5}, + {"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":11, "y":1}, + {"x":12, "y":1}, + {"x":13, "y":1}, + {"x":14, "y":1}, + {"x":15, "y":1}, + {"x":16, "y":1}, + {"x":17, "y":1}, + {"x":18, "y":1, "w":1.5}, + + {"x":0, "y":2}, + {"x":1.5, "y":2, "w":1.75}, + {"x":3.25, "y":2}, + {"x":4.5, "y":2}, + {"x":5.5, "y":2}, + {"x":6.5, "y":2}, + {"x":7.5, "y":2}, + {"x":11.25, "y":2}, + {"x":12.25, "y":2}, + {"x":13.25, "y":2}, + {"x":14.25, "y":2}, + {"x":15.5, "y":2}, + {"x":16.5, "y":2}, + {"x":17.5, "y":2, "w":2.25}, + + {"x":1.25, "y":3, "w":2.25}, + {"x":3.5, "y":3}, + {"x":5, "y":3}, + {"x":6, "y":3}, + {"x":7, "y":3}, + {"x":8, "y":3}, + {"x":10.75, "y":3}, + {"x":11.75, "y":3}, + {"x":12.75, "y":3}, + {"x":13.75, "y":3}, + {"x":15.25, "y":3}, + {"x":16.25, "y":3}, + {"x":17.25, "y":3, "w":1.75}, + {"x":19, "y":3}, + + {"x":1.25, "y":4, "w":1.5}, + {"x":5, "y":4, "w":1.5}, + {"x":6.5, "y":4, "w":2}, + {"x":8.5, "y":4, "w":1.25}, + {"x":10.5, "y":4, "w":2.75}, + {"x":13.25, "y":4, "w":1.5}, + {"x":18.25, "y":4, "w":1.5}] + } + } +} diff --git a/keyboards/nightly_boards/alter/rev1/keymaps/default/keymap.c b/keyboards/nightly_boards/alter/rev1/keymaps/default/keymap.c new file mode 100644 index 000000000000..cf2e561c7979 --- /dev/null +++ b/keyboards/nightly_boards/alter/rev1/keymaps/default/keymap.c @@ -0,0 +1,33 @@ +/* Copyright 2020 Neil Brian Ramirez + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public 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_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_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, MO(1), + KC_LCTL, KC_LALT, KC_SPC, MO(1), KC_SPC, KC_RGUI, 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, _______, _______, + KC_BRIU, _______, _______, KC_UP, _______, _______, _______, _______, _______, _______, _______, _______, _______ , _______, KC_DEL, + KC_BRID, _______, KC_LEFT, KC_DOWN, KC_RIGHT, _______, _______, _______, _______, _______, _______, _______, _______, _______, + RGB_TOG, RGB_MOD, RGB_RMOD,RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, _______, KC_HOME, KC_END, _______, _______, + _______, _______, _______, _______, _______, _______, _______ + ), +}; diff --git a/keyboards/nightly_boards/alter/rev1/readme.md b/keyboards/nightly_boards/alter/rev1/readme.md new file mode 100644 index 000000000000..81079f064629 --- /dev/null +++ b/keyboards/nightly_boards/alter/rev1/readme.md @@ -0,0 +1,12 @@ +# Alter + +An Alice layout keyboard + +* Keyboard Maintainer: [Neil Brian Ramirez](https://github.com/NightlyBoards) +* Hardware Supported: atmega32u4 + +Make example for this keyboard (after setting up your build environment): + + make nightly_boards/alter/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). \ No newline at end of file diff --git a/keyboards/nightly_boards/alter/rev1/rev1.c b/keyboards/nightly_boards/alter/rev1/rev1.c new file mode 100644 index 000000000000..df3dd6aed888 --- /dev/null +++ b/keyboards/nightly_boards/alter/rev1/rev1.c @@ -0,0 +1,37 @@ +/* Copyright 2020 Neil Brian Ramirez + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public 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" + +void keyboard_pre_init_kb(void) { + led_init_ports(); + keyboard_pre_init_user(); +} + +void led_init_ports(void) { + setPinOutput(D7); + setPinOutput(D6); + setPinOutput(B4); +} + +bool led_update_kb(led_t led_state) { + if (led_update_user(led_state)) { + writePin(D7, led_state.num_lock); + writePin(D6, led_state.caps_lock); + writePin(B4, led_state.scroll_lock); + } + return true; +} diff --git a/keyboards/nightly_boards/alter/rev1/rev1.h b/keyboards/nightly_boards/alter/rev1/rev1.h new file mode 100644 index 000000000000..ee919c56d4c1 --- /dev/null +++ b/keyboards/nightly_boards/alter/rev1/rev1.h @@ -0,0 +1,46 @@ +/* Copyright 2020 Neil Brian Ramirez + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License 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, K10, K01, K11, K02, K12, K03, K13, K04, K14, K05, K15, K06, K16, K17, K07, \ + K20, K30, K21, K31, K22, K32, K23, K24, K34, K25, K35, K26, K36, K27, K37, \ + K40, K50, K51, K42, K52, K43, K53, K44, K54, K45, K55, K46, K56, K47, \ + K70, K71, K62, K72, K63, K73, K64, K74, K65, K75, K66, K76, K67, K77, \ + K90, K82, K92, K83, K84, K95, 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, KC_NO, K34, K35, K36, K37 }, \ + { K40, KC_NO, K42, K43, K44, K45, K46, K47 }, \ + { K50, K51, K52, K53, K54, K55, K56, KC_NO }, \ + { KC_NO, KC_NO, K62, K63, K64, K65, K66, K67 }, \ + { K70, K71, K72, K73, K74, K75, K76, K77 }, \ + { KC_NO, KC_NO, K82, K83, K84, KC_NO, KC_NO, K87 }, \ + { K90, KC_NO, K92, KC_NO, KC_NO, K95, KC_NO, KC_NO }, \ +} diff --git a/keyboards/nightly_boards/alter/rev1/rules.mk b/keyboards/nightly_boards/alter/rev1/rules.mk new file mode 100644 index 000000000000..5dbee69a10cb --- /dev/null +++ b/keyboards/nightly_boards/alter/rev1/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 = 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 = yes # Enable keyboard RGB underglow +MIDI_ENABLE = no # MIDI support +BLUETOOTH_ENABLE = no # Enable Bluetooth +AUDIO_ENABLE = no # Audio output +FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches \ No newline at end of file From a2fa12d6313b85822113a80f23ace951b2f9af17 Mon Sep 17 00:00:00 2001 From: yinxianwei Date: Sat, 18 Jul 2020 01:46:05 +0800 Subject: [PATCH 394/930] [keyboard] Add x16 (#9709) * [keyboard] Add x16 * update x16 * Update keyboards/x16/config.h Co-authored-by: Ryan * Update keyboards/x16/readme.md Co-authored-by: Ryan * Update keyboards/x16/rules.mk Co-authored-by: Ryan * Update keyboards/x16/rules.mk Co-authored-by: Ryan * Update keyboards/x16/rules.mk Co-authored-by: Ryan Co-authored-by: Ryan --- keyboards/x16/config.h | 218 +++++++++++++++++++++++++ keyboards/x16/info.json | 33 ++++ keyboards/x16/keymaps/default/keymap.c | 27 +++ keyboards/x16/readme.md | 13 ++ keyboards/x16/rules.mk | 31 ++++ keyboards/x16/x16.c | 16 ++ keyboards/x16/x16.h | 39 +++++ 7 files changed, 377 insertions(+) create mode 100644 keyboards/x16/config.h create mode 100644 keyboards/x16/info.json create mode 100644 keyboards/x16/keymaps/default/keymap.c create mode 100644 keyboards/x16/readme.md create mode 100644 keyboards/x16/rules.mk create mode 100644 keyboards/x16/x16.c create mode 100644 keyboards/x16/x16.h diff --git a/keyboards/x16/config.h b/keyboards/x16/config.h new file mode 100644 index 000000000000..ff2e8568fe5e --- /dev/null +++ b/keyboards/x16/config.h @@ -0,0 +1,218 @@ +/* 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" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0x4B50 +#define PRODUCT_ID 0x016A +#define DEVICE_VER 0x0001 +#define MANUFACTURER yinxianwei +#define PRODUCT x16 +#define DESCRIPTION Keyboard + +/* key matrix size */ +#define MATRIX_ROWS 4 +#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 { E6, F7, D6, B6 } +#define MATRIX_COL_PINS { C7, C6, B4, D7 } +#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 B5 +// #define BACKLIGHT_BREATHING +#define BACKLIGHT_LEVELS 5 + +// #define RGB_DI_PIN E2 +// #define RGBLED_NUM 4 +// #define RGBLIGHT_ANIMATIONS +// #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 + +/* Bootmagic Lite key configuration */ +// #define BOOTMAGIC_LITE_ROW 0 +// #define BOOTMAGIC_LITE_COLUMN 0 diff --git a/keyboards/x16/info.json b/keyboards/x16/info.json new file mode 100644 index 000000000000..0d42b99ef440 --- /dev/null +++ b/keyboards/x16/info.json @@ -0,0 +1,33 @@ +{ + "keyboard_name": "x16", + "url": "", + "maintainer": "yinxianwei", + "width": 4, + "height": 4, + "layouts": { + "LAYOUT_ortho_4x4": { + "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} + ] + } + } +} + diff --git a/keyboards/x16/keymaps/default/keymap.c b/keyboards/x16/keymaps/default/keymap.c new file mode 100644 index 000000000000..ab15eb9556c6 --- /dev/null +++ b/keyboards/x16/keymaps/default/keymap.c @@ -0,0 +1,27 @@ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* + * ┌───┬───┬───┬───┐ + * │ 7 │ 8 │ 9 │BAC│ + * ├───┼───┼───┤───┤  + * │ 4 │ 5 │ 6 │VOU│ + * ├───┼───┼───┼───┤ + * │ 1 │ 2 │ 3 │VOD│ + * ├───┼───┼───┤───┤  + * │MO1│ 0 │ . │ENT│ + * └───┴───┴───┴───┘ + */ + [0] = LAYOUT_ortho_4x4( + KC_P7, KC_P8, KC_P9, KC_BSPC, + KC_P4, KC_P5, KC_P6, KC_VOLU, + KC_P1, KC_P2, KC_P3, KC_VOLD, + MO(1), KC_P0, KC_DOT, KC_ENT + ), + [1] = LAYOUT_ortho_4x4( + RESET, 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_MPLY + ) +}; diff --git a/keyboards/x16/readme.md b/keyboards/x16/readme.md new file mode 100644 index 000000000000..6434af99c7b9 --- /dev/null +++ b/keyboards/x16/readme.md @@ -0,0 +1,13 @@ +# x16 + +A 16 key macropad, with USB C + +* Keyboard Maintainer: QMK Community +* Hardware Supported: The PCBs, controllers supported +* Hardware Availability: The x16 was discontinued by [x16](https://yinxianwei.github.io/x16/) + +Make example for this keyboard (after setting up your build environment): + + make x16: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/x16/rules.mk b/keyboards/x16/rules.mk new file mode 100644 index 000000000000..23ddc43142f6 --- /dev/null +++ b/keyboards/x16/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 = 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 +AUDIO_ENABLE = no # Audio output +FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches diff --git a/keyboards/x16/x16.c b/keyboards/x16/x16.c new file mode 100644 index 000000000000..82a2f65c68e9 --- /dev/null +++ b/keyboards/x16/x16.c @@ -0,0 +1,16 @@ +/* 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 "x16.h" diff --git a/keyboards/x16/x16.h b/keyboards/x16/x16.h new file mode 100644 index 000000000000..cf8bab4730ad --- /dev/null +++ b/keyboards/x16/x16.h @@ -0,0 +1,39 @@ +/* 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" + +/* 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_4x4( \ + K01, K02, K03, K04, \ + K11, K12, K13, K14, \ + K21, K22, K23, K24, \ + K31, K32, K33, K34 \ +) \ +{ \ + { K01, K02, K03, K04 }, \ + { K11, K12, K13, K14 }, \ + { K21, K22, K23, K24 }, \ + { K31, K32, K33, K34 } \ +} From 4989af356eaa62f00b5a020d16e4e7d541b49ee1 Mon Sep 17 00:00:00 2001 From: floookay <33830863+floookay@users.noreply.github.com> Date: Fri, 17 Jul 2020 19:51:56 +0200 Subject: [PATCH 395/930] [keyboard] added Adelheid (#9734) * readded adelheid files * reworked keymaps - moved my personal keymap to a new folder - added a new default keymap * removed unnecessary backslash * reenabled command rule * bumped device number * fixed layout for configurator * applied suggestions from code review Co-authored-by: Ryan Co-authored-by: Ryan --- keyboards/adelheid/adelheid.c | 16 ++ keyboards/adelheid/adelheid.h | 45 ++++ keyboards/adelheid/config.h | 208 ++++++++++++++++++ keyboards/adelheid/info.json | 100 +++++++++ keyboards/adelheid/keymaps/default/keymap.c | 45 ++++ keyboards/adelheid/keymaps/default/readme.md | 9 + keyboards/adelheid/keymaps/floookay/keymap.c | 76 +++++++ keyboards/adelheid/keymaps/floookay/readme.md | 9 + keyboards/adelheid/keymaps/floookay/rules.mk | 1 + keyboards/adelheid/readme.md | 15 ++ keyboards/adelheid/rules.mk | 22 ++ 11 files changed, 546 insertions(+) create mode 100644 keyboards/adelheid/adelheid.c create mode 100644 keyboards/adelheid/adelheid.h create mode 100644 keyboards/adelheid/config.h create mode 100644 keyboards/adelheid/info.json create mode 100644 keyboards/adelheid/keymaps/default/keymap.c create mode 100644 keyboards/adelheid/keymaps/default/readme.md create mode 100644 keyboards/adelheid/keymaps/floookay/keymap.c create mode 100644 keyboards/adelheid/keymaps/floookay/readme.md create mode 100644 keyboards/adelheid/keymaps/floookay/rules.mk create mode 100644 keyboards/adelheid/readme.md create mode 100644 keyboards/adelheid/rules.mk diff --git a/keyboards/adelheid/adelheid.c b/keyboards/adelheid/adelheid.c new file mode 100644 index 000000000000..35fd2cd1e5ca --- /dev/null +++ b/keyboards/adelheid/adelheid.c @@ -0,0 +1,16 @@ +/* Copyright 2020 floookay + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#include "adelheid.h" diff --git a/keyboards/adelheid/adelheid.h b/keyboards/adelheid/adelheid.h new file mode 100644 index 000000000000..48d315f30f7b --- /dev/null +++ b/keyboards/adelheid/adelheid.h @@ -0,0 +1,45 @@ +/* Copyright 2020 floookay + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License 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, \ + \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, k1E, k2E, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2D, k3E, \ + k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k4E, \ + k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, k4A, k4B, k4D, \ + k50, k52, k54, k55, k57, k59, k5C, k5D, k5E \ +) \ +{ \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E }, \ + { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, \ + { 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, KC_NO, k3E }, \ + { k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, k4A, k4B, KC_NO, k4D, k4E }, \ + { k50, KC_NO, k52, KC_NO, k54, k55, KC_NO, k57, KC_NO, k59, KC_NO, KC_NO, k5C, k5D, k5E } \ +} diff --git a/keyboards/adelheid/config.h b/keyboards/adelheid/config.h new file mode 100644 index 000000000000..0da0062a748f --- /dev/null +++ b/keyboards/adelheid/config.h @@ -0,0 +1,208 @@ +/* +Copyright 2020 floookay + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License 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 0xF100 +#define PRODUCT_ID 0xAD78 +#define DEVICE_VER 0x0002 +#define MANUFACTURER floookay +#define PRODUCT adelheid +#define DESCRIPTION 75% alice-like keyboard based on the arisu + +/* key matrix size */ +#define MATRIX_ROWS 7 +#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, F4, D1, D2, D3, D5, F7 } +#define MATRIX_COL_PINS { F0, F1, E6, C7, F6, B6, D4, B1, B0, B7, B5, B4, D7, D6, B3 } +#define UNUSED_PINS + +/* COL2ROW, ROW2COL*/ +#define DIODE_DIRECTION COL2ROW + +#define BACKLIGHT_PIN C6 +// #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 diff --git a/keyboards/adelheid/info.json b/keyboards/adelheid/info.json new file mode 100644 index 000000000000..d4ae41091c38 --- /dev/null +++ b/keyboards/adelheid/info.json @@ -0,0 +1,100 @@ +{ + "keyboard_name": "Adelheid", + "url": "https://github.com/floookay/adelheid", + "maintainer": "floookay", + "width": 19.5, + "height": 6.5, + "layouts": { + "LAYOUT": { + "layout": [ + { "label": "k00", "x": 0, "y": 0 }, + { "label": "k01", "x": 1.25, "y": 0 }, + { "label": "k02", "x": 2.25, "y": 0 }, + { "label": "k03", "x": 3.5, "y": 0 }, + { "label": "k04", "x": 4.5, "y": 0 }, + { "label": "k05", "x": 5.75, "y": 0 }, + { "label": "k06", "x": 6.75, "y": 0 }, + { "label": "k07", "x": 9.75, "y": 0 }, + { "label": "k08", "x": 10.75, "y": 0 }, + { "label": "k09", "x": 12, "y": 0 }, + { "label": "k0A", "x": 13, "y": 0 }, + { "label": "k0B", "x": 14.25, "y": 0 }, + { "label": "k0C", "x": 15.25, "y": 0 }, + { "label": "k0D", "x": 16.5, "y": 0 }, + { "label": "k0E", "x": 17.75, "y": 0 }, + + { "label": "k10", "x": 0.75, "y": 1.25 }, + { "label": "k11", "x": 1.75, "y": 1.25 }, + { "label": "k12", "x": 2.75, "y": 1.25 }, + { "label": "k13", "x": 4, "y": 1.25 }, + { "label": "k14", "x": 5, "y": 1.25 }, + { "label": "k15", "x": 6, "y": 1.25 }, + { "label": "k16", "x": 7, "y": 1.25 }, + { "label": "k17", "x": 9.5, "y": 1.25 }, + { "label": "k18", "x": 10.5, "y": 1.25 }, + { "label": "k19", "x": 11.5, "y": 1.25 }, + { "label": "k1A", "x": 12.5, "y": 1.25 }, + { "label": "k1B", "x": 13.75, "y": 1.25 }, + { "label": "k1C", "x": 14.75, "y": 1.25 }, + { "label": "k1D", "x": 15.75, "y": 1.25 }, + { "label": "k1E", "x": 16.75, "y": 1.25 }, + { "label": "k2E", "x": 18, "y": 1 }, + + { "label": "k20", "x": 0.5, "y": 2.25, "w": 1.5 }, + { "label": "k21", "x": 2, "y": 2.25 }, + { "label": "k22", "x": 3.5, "y": 2.25 }, + { "label": "k23", "x": 4.5, "y": 2.25 }, + { "label": "k24", "x": 5.5, "y": 2.25 }, + { "label": "k25", "x": 6.5, "y": 2.25 }, + { "label": "k26", "x": 9, "y": 2.25 }, + { "label": "k27", "x": 10, "y": 2.25 }, + { "label": "k28", "x": 11, "y": 2.25 }, + { "label": "k29", "x": 12, "y": 2.25 }, + { "label": "k2A", "x": 13, "y": 2.25 }, + { "label": "k2B", "x": 14.5, "y": 2.25 }, + { "label": "k2C", "x": 15.5, "y": 2.25 }, + { "label": "k2D", "x": 16.5, "y": 2.25, "w": 1.5 }, + { "label": "k3E", "x": 18.25, "y": 2 }, + + { "label": "k30", "x": 0.25, "y": 3.25, "w": 1.75 }, + { "label": "k31", "x": 2, "y": 3.25 }, + { "label": "k32", "x": 3.75, "y": 3.25 }, + { "label": "k33", "x": 4.75, "y": 3.25 }, + { "label": "k34", "x": 5.75, "y": 3.25 }, + { "label": "k35", "x": 6.75, "y": 3.25 }, + { "label": "k36", "x": 9.25, "y": 3.25 }, + { "label": "k37", "x": 10.25, "y": 3.25 }, + { "label": "k38", "x": 11.25, "y": 3.25 }, + { "label": "k39", "x": 12.25, "y": 3.25 }, + { "label": "k3A", "x": 14, "y": 3.25 }, + { "label": "k3B", "x": 15, "y": 3.25 }, + { "label": "k3C", "x": 16, "y": 3.25, "w": 2.25 }, + { "label": "k4E", "x": 18.5, "y": 3 }, + + { "label": "k40", "x": 0, "y": 4.25, "w": 2.25 }, + { "label": "k41", "x": 2.25, "y": 4.25 }, + { "label": "k42", "x": 4.25, "y": 4.25 }, + { "label": "k43", "x": 5.25, "y": 4.25 }, + { "label": "k44", "x": 6.25, "y": 4.25 }, + { "label": "k45", "x": 7.25, "y": 4.25 }, + { "label": "k46", "x": 9.5, "y": 4.25 }, + { "label": "k47", "x": 10.5, "y": 4.25 }, + { "label": "k48", "x": 11.5, "y": 4.25 }, + { "label": "k49", "x": 12.5, "y": 4.25 }, + { "label": "k4A", "x": 14.5, "y": 4.25 }, + { "label": "k4B", "x": 15.5, "y": 4.25, "w": 1.75 }, + { "label": "k4D", "x": 17.5, "y": 4.5 }, + + { "label": "k50", "x": 0, "y": 5.25, "w": 1.5 }, + { "label": "k52", "x": 4.25, "y": 5.25, "w": 1.5 }, + { "label": "k54", "x": 5.75, "y": 5.25, "w": 2 }, + { "label": "k55", "x": 7.75, "y": 5.25 }, + { "label": "k57", "x": 9, "y": 5.25, "w": 2.75 }, + { "label": "k59", "x": 11.75, "y": 5.25, "w": 1.5 }, + { "label": "k5C", "x": 16.5, "y": 5.5 }, + { "label": "k5D", "x": 17.5, "y": 5.5 }, + { "label": "k5E", "x": 18.5, "y": 5.5 } + ] + } + } +} diff --git a/keyboards/adelheid/keymaps/default/keymap.c b/keyboards/adelheid/keymaps/default/keymap.c new file mode 100644 index 000000000000..d1d4b8da382a --- /dev/null +++ b/keyboards/adelheid/keymaps/default/keymap.c @@ -0,0 +1,45 @@ +/* Copyright 2020 floookay + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public 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 adelheid_layers { + _BASE, + _SECONDARY +}; + +#define MO_SEC MO(_SECONDARY) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_BASE] = 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_F13, KC_PGUP, + + 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_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_END, + 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_LCTL, KC_LALT, KC_SPC, MO_SEC, KC_SPC, KC_RALT, KC_LEFT, KC_DOWN, KC_RGHT + ), + + [_SECONDARY] = LAYOUT( + KC_SLEP, 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_PSCR, KC_VOLU, + + _______, KC_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, BL_STEP, + _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_PGUP, KC_END, _______, _______, _______, KC_DEL, KC_MUTE, + KC_LGUI, _______, _______, _______, _______, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, _______, _______, KC_MPLY, KC_VOLD, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MPLY, + _______, _______, _______, _______, _______, _______, KC_MPRV, KC_MSTP, KC_MNXT + ) +}; diff --git a/keyboards/adelheid/keymaps/default/readme.md b/keyboards/adelheid/keymaps/default/readme.md new file mode 100644 index 000000000000..34369dcc01ab --- /dev/null +++ b/keyboards/adelheid/keymaps/default/readme.md @@ -0,0 +1,9 @@ +# Default keymap for the Adelheid + +- ANSI QWERTY +- split backspace +- ctrl instead of caps lock +- lgui on fn+caps + +![adelheid_layout](https://gist.githubusercontent.com/floookay/7bf6511a8d84804d32de4d7bbe3bd0fb/raw/dffd622a762463f341466ffecefad3b31ad3ee4f/layout.png) +View in [Keyboard-Layout-Editor](http://www.keyboard-layout-editor.com/#/gists/4262535adb5ac81a913edbebc4de8226). diff --git a/keyboards/adelheid/keymaps/floookay/keymap.c b/keyboards/adelheid/keymaps/floookay/keymap.c new file mode 100644 index 000000000000..607ee58bb6c5 --- /dev/null +++ b/keyboards/adelheid/keymaps/floookay/keymap.c @@ -0,0 +1,76 @@ +/* Copyright 2020 floookay + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public 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 adelheid_layers { + _BASE, + _SECONDARY +}; + +// tap dance declarations +enum { + _TD_CTGU = 0, + _TD_PGUP = 1, + _TD_PGDN = 2, + _TD_HOME = 3, + _TD_END = 4, + _TD_RSHC = 5, + _TD_PSCR = 6 +}; + +#define MO_SEC MO(_SECONDARY) +#define TD_CTGU TD(_TD_CTGU) +#define TD_PGUP TD(_TD_PGUP) +#define TD_PGDN TD(_TD_PGDN) +#define TD_HOME TD(_TD_HOME) +#define TD_END TD(_TD_END) +#define TD_RSHC TD(_TD_RSHC) +#define TD_PSCR TD(_TD_PSCR) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_BASE] = 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_F13, TD_PGUP, + + 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, TD_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, TD_END, + TD_CTGU, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, TD_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_LCTL, KC_LALT, KC_SPC, MO_SEC, KC_SPC, KC_RALT, KC_LEFT, KC_DOWN, KC_RGHT + ), + + [_SECONDARY] = LAYOUT( + KC_SLEP, KC_F13, KC_F14, KC_F15, KC_F16, KC_F17, KC_F18, KC_F19, KC_F20, KC_F21, KC_F22, KC_F23, KC_F24, TD_PSCR, KC_VOLU, + + _______, KC_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, BL_STEP, + _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_PGUP, KC_END, _______, _______, _______, KC_DEL, KC_MUTE, + _______, _______, _______, _______, _______, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, _______, _______, KC_MPLY, KC_VOLD, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, TD_RSHC, KC_MPLY, + _______, _______, _______, _______, _______, _______, KC_MPRV, KC_MSTP, KC_MNXT + ) +}; + + +// Tap Dance Definitions +qk_tap_dance_action_t tap_dance_actions[] = { + // Tap once for first parameter, twice for second + [_TD_CTGU] = ACTION_TAP_DANCE_DOUBLE(KC_LCTL, KC_LGUI), + [_TD_PGUP] = ACTION_TAP_DANCE_DOUBLE(KC_PGUP, LCTL(KC_PGUP)), + [_TD_PGDN] = ACTION_TAP_DANCE_DOUBLE(KC_PGDN, LCTL(KC_PGDN)), + [_TD_HOME] = ACTION_TAP_DANCE_DOUBLE(KC_HOME, LCTL(KC_HOME)), + [_TD_END] = ACTION_TAP_DANCE_DOUBLE(KC_END, LCTL(KC_END)), + [_TD_RSHC] = ACTION_TAP_DANCE_DOUBLE(KC_RSFT, KC_CAPS), + [_TD_PSCR] = ACTION_TAP_DANCE_DOUBLE(KC_PSCR, LSFT(LGUI(KC_S))) // screenshot tool tap dance +}; diff --git a/keyboards/adelheid/keymaps/floookay/readme.md b/keyboards/adelheid/keymaps/floookay/readme.md new file mode 100644 index 000000000000..a9d624222ea0 --- /dev/null +++ b/keyboards/adelheid/keymaps/floookay/readme.md @@ -0,0 +1,9 @@ +# The default keymap for the Adelheid + +- ANSI QWERTY +- split backspace +- ctrl on caps lock with super on tap dance +- caps lock on fn + right shift tap dance + +![adelheid_layout](https://gist.githubusercontent.com/floookay/7bf6511a8d84804d32de4d7bbe3bd0fb/raw/dffd622a762463f341466ffecefad3b31ad3ee4f/layout.png) +View in [Keyboard-Layout-Editor](http://www.keyboard-layout-editor.com/#/gists/4262535adb5ac81a913edbebc4de8226). diff --git a/keyboards/adelheid/keymaps/floookay/rules.mk b/keyboards/adelheid/keymaps/floookay/rules.mk new file mode 100644 index 000000000000..e5ddcae8d927 --- /dev/null +++ b/keyboards/adelheid/keymaps/floookay/rules.mk @@ -0,0 +1 @@ +TAP_DANCE_ENABLE = yes diff --git a/keyboards/adelheid/readme.md b/keyboards/adelheid/readme.md new file mode 100644 index 000000000000..cf010825ffd5 --- /dev/null +++ b/keyboards/adelheid/readme.md @@ -0,0 +1,15 @@ +# 𝔄𝔡𝔢𝔩𝔥𝔢𝔦𝔡 + +![Adelheid](https://gist.githubusercontent.com/floookay/7bf6511a8d84804d32de4d7bbe3bd0fb/raw/559336bcb5f8c04bbea9ad8aab7397812ab72859/adelheid.jpg) + +The Adelheid is a 75% Alice-like keyboard. It's a fork of the [Arisu](https://github.com/FateNozomi/arisu-pcb) by FateNozomi and is open-source as well. + +* Keyboard Maintainer: [floookay](https://github.com/floookay) +* Hardware Supported: Adelheid PCB [Rev2.0] +* Hardware Availability: [PCB-, case- & wrist rest files](https://github.com/floookay/adelheid) + +Make example for this keyboard (after setting up your build environment): + + make adelheid: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/adelheid/rules.mk b/keyboards/adelheid/rules.mk new file mode 100644 index 000000000000..77a8471e9064 --- /dev/null +++ b/keyboards/adelheid/rules.mk @@ -0,0 +1,22 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +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 = yes # Commands for debug and configuration +# 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 +BLUETOOTH_ENABLE = no # Enable Bluetooth +AUDIO_ENABLE = no # Audio output From 3c84157d83ed18f6c31632a4728d6a0be5b68d59 Mon Sep 17 00:00:00 2001 From: Croktopus <39040552+Croktopus@users.noreply.github.com> Date: Fri, 17 Jul 2020 11:04:44 -0700 Subject: [PATCH 396/930] Add timber wolf keyboard (#9353) * added timber wolf keyboard * removed subfolders * fixed keymap names * fixed layout macro references * swapped c6 and c7 functions * Update keyboards/metamechs/timberwolf/config.h Co-authored-by: Erovia * Update readme.md * re-updating readme Co-authored-by: Erovia --- keyboards/metamechs/timberwolf/config.h | 174 +++++++++++++++++ keyboards/metamechs/timberwolf/info.json | 70 +++++++ .../timberwolf/keymaps/a_ansi/keymap.c | 44 +++++ .../timberwolf/keymaps/a_iso/keymap.c | 44 +++++ .../timberwolf/keymaps/b_ansi/keymap.c | 44 +++++ .../timberwolf/keymaps/b_iso/keymap.c | 44 +++++ .../timberwolf/keymaps/default/keymap.c | 44 +++++ .../timberwolf/keymaps/prime_ansi/keymap.c | 44 +++++ .../timberwolf/keymaps/prime_iso/keymap.c | 44 +++++ .../metamechs/timberwolf/keymaps/via/keymap.c | 60 ++++++ keyboards/metamechs/timberwolf/readme.md | 21 +++ keyboards/metamechs/timberwolf/rules.mk | 35 ++++ keyboards/metamechs/timberwolf/timberwolf.c | 27 +++ keyboards/metamechs/timberwolf/timberwolf.h | 175 ++++++++++++++++++ 14 files changed, 870 insertions(+) create mode 100644 keyboards/metamechs/timberwolf/config.h create mode 100644 keyboards/metamechs/timberwolf/info.json create mode 100644 keyboards/metamechs/timberwolf/keymaps/a_ansi/keymap.c create mode 100644 keyboards/metamechs/timberwolf/keymaps/a_iso/keymap.c create mode 100644 keyboards/metamechs/timberwolf/keymaps/b_ansi/keymap.c create mode 100644 keyboards/metamechs/timberwolf/keymaps/b_iso/keymap.c create mode 100644 keyboards/metamechs/timberwolf/keymaps/default/keymap.c create mode 100644 keyboards/metamechs/timberwolf/keymaps/prime_ansi/keymap.c create mode 100644 keyboards/metamechs/timberwolf/keymaps/prime_iso/keymap.c create mode 100644 keyboards/metamechs/timberwolf/keymaps/via/keymap.c create mode 100644 keyboards/metamechs/timberwolf/readme.md create mode 100644 keyboards/metamechs/timberwolf/rules.mk create mode 100644 keyboards/metamechs/timberwolf/timberwolf.c create mode 100644 keyboards/metamechs/timberwolf/timberwolf.h diff --git a/keyboards/metamechs/timberwolf/config.h b/keyboards/metamechs/timberwolf/config.h new file mode 100644 index 000000000000..b23fd2fcf722 --- /dev/null +++ b/keyboards/metamechs/timberwolf/config.h @@ -0,0 +1,174 @@ +/* +Copyright 2020 Croktopus + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License 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 0x6D6D // MetaMechs +#define PRODUCT_ID 0x5754 // TW +#define DEVICE_VER 0x0001 +#define MANUFACTURER MetaMechs +#define PRODUCT Timber Wolf +#define DESCRIPTION Timber Wolf + +/* key matrix size */ +#define MATRIX_COLS 9 +#define MATRIX_ROWS 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_COL_PINS { B2, D1, D2, C7, F5, F6, F7, F0, E6 } +#define MATRIX_ROW_PINS { B6, B5, B4, D7, D6, D4, D5, D3, F4, F1, B1, B0 } +#define UNUSED_PINS + +/* COL2ROW, ROW2COL*/ +#define DIODE_DIRECTION COL2ROW + +/* Wncoswe pins */ +#define ENCODERS_PAD_A { B7 } +#define ENCODERS_PAD_B { B3 } + +/* Encoder resolution, lower number = more sensitive */ +#define ENCODER_RESOLUTION 2 + +/* Reverse encoder direction */ +// #define ENCODER_DIRECTION_FLIP + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCE 5 + +/* Backlighting code used for caps lock indicator */ +#define BACKLIGHT_PIN C6 +#define BACKLIGHT_LEVELS 9 + +/* 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 + +/* + * MIDI options + */ + +/* Bootmagic Lite key configuration */ +#define BOOTMAGIC_LITE_ROW 0 +#define BOOTMAGIC_LITE_COLUMN 0 diff --git a/keyboards/metamechs/timberwolf/info.json b/keyboards/metamechs/timberwolf/info.json new file mode 100644 index 000000000000..b483ce31bca0 --- /dev/null +++ b/keyboards/metamechs/timberwolf/info.json @@ -0,0 +1,70 @@ +{ + "keyboard_name": "Timber Wolf", + "url": "https://geekhack.org/index.php?topic=102520.0", + "maintainer": "Croktopus", + "width": 18.75, + "height": 6.5, + "layouts": { + "LAYOUT_all": { + "layout": [ + {"label":"Mute", "x":0, "y":0}, {"label":"Esc", "x":1.25, "y":0}, {"label":"F1", "x":2.5, "y":0}, {"label":"F2", "x":3.5, "y":0}, {"label":"F3", "x":4.5, "y":0}, {"label":"F4", "x":5.5, "y":0}, {"label":"F5", "x":7, "y":0}, {"label":"F6", "x":8, "y":0}, {"label":"F7", "x":9, "y":0}, {"label":"F8", "x":10, "y":0}, {"label":"F9", "x":11.5, "y":0}, {"label":"F10", "x":12.5, "y":0}, {"label":"F11", "x":13.5, "y":0}, {"label":"F12", "x":14.5, "y":0}, {"label":"Insert", "x":15.75, "y":0}, {"label":"Home", "x":16.75, "y":0}, {"label":"PgUp", "x":17.75, "y":0}, {"label":"End", "x":16.75, "y":1}, {"label":"PgDn", "x":17.75, "y":1}, + {"label":"Fn", "x":0, "y":1.25}, {"label":"~", "x":1.25, "y":1.25}, {"label":"!", "x":2.25, "y":1.25}, {"label":"@", "x":3.25, "y":1.25}, {"label":"#", "x":4.25, "y":1.25}, {"label":"$", "x":5.25, "y":1.25}, {"label":"%", "x":6.25, "y":1.25}, {"label":"^", "x":7.25, "y":1.25}, {"label":"&", "x":8.25, "y":1.25}, {"label":"*", "x":9.25, "y":1.25}, {"label":"(", "x":10.25, "y":1.25}, {"label":")", "x":11.25, "y":1.25}, {"label":"_", "x":12.25, "y":1.25}, {"label":"+", "x":13.25, "y":1.25}, {"x":14.25, "y":1.25}, {"label":"Backspace", "x":15.25, "y":1.25}, + {"label":"Fn", "x":0, "y":2.25}, {"label":"Tab", "x":1.25, "y":2.25, "w":1.5}, {"label":"Q", "x":2.75, "y":2.25}, {"label":"W", "x":3.75, "y":2.25}, {"label":"E", "x":4.75, "y":2.25}, {"label":"R", "x":5.75, "y":2.25}, {"label":"T", "x":6.75, "y":2.25}, {"label":"Y", "x":7.75, "y":2.25}, {"label":"U", "x":8.75, "y":2.25}, {"label":"I", "x":9.75, "y":2.25}, {"label":"O", "x":10.75, "y":2.25}, {"label":"P", "x":11.75, "y":2.25}, {"label":"{", "x":12.75, "y":2.25}, {"label":"}", "x":13.75, "y":2.25}, {"label":"|", "x":14.75, "y":2.25, "w":1.5}, {"label":"Insert", "x":16.5, "y":2.25}, {"label":"PrtSc", "x":17.75, "y":2.25}, + {"label":"Fn", "x":0, "y":3.25}, {"label":"Caps Lock", "x":1.25, "y":3.25, "w":1.75}, {"label":"A", "x":3, "y":3.25}, {"label":"S", "x":4, "y":3.25}, {"label":"D", "x":5, "y":3.25}, {"label":"F", "x":6, "y":3.25}, {"label":"G", "x":7, "y":3.25}, {"label":"H", "x":8, "y":3.25}, {"label":"J", "x":9, "y":3.25}, {"label":"K", "x":10, "y":3.25}, {"label":"L", "x":11, "y":3.25}, {"label":":", "x":12, "y":3.25}, {"label":"\"", "x":13, "y":3.25}, {"x":14, "y":3.25}, {"label":"Enter", "x":15, "y":3.25, "w":1.25}, {"label":"Delete", "x":16.5, "y":3.25}, {"label":"Enter", "x":17.75, "y":3.25}, + {"label":"Fn", "x":0, "y":4.25}, {"label":"Shift", "x":1.25, "y":4.25, "w":1.25}, {"x":2.5, "y":4.25}, {"label":"Z", "x":3.5, "y":4.25}, {"label":"X", "x":4.5, "y":4.25}, {"label":"C", "x":5.5, "y":4.25}, {"label":"V", "x":6.5, "y":4.25}, {"label":"B", "x":7.5, "y":4.25}, {"label":"N", "x":8.5, "y":4.25}, {"label":"M", "x":9.5, "y":4.25}, {"label":"<", "x":10.5, "y":4.25}, {"label":">", "x":11.5, "y":4.25}, {"label":"?", "x":12.5, "y":4.25}, {"label":"Shift", "x":13.5, "y":4.25, "w":1.75}, {"label":"Fn", "x":15.25, "y":4.25}, {"label":"Enter", "x":17.75, "y":4.25}, {"label":"\u2191", "x":16.5, "y":4.5}, + {"label":"Fn", "x":0, "y":5.25}, {"label":"Ctrl", "x":1.25, "y":5.25, "w":1.5}, {"label":"Win", "x":2.75, "y":5.25}, {"label":"Alt", "x":3.75, "y":5.25, "w":1.5}, {"x":5.25, "y":5.25, "w":6}, {"label":"Alt", "x":11.25, "y":5.25, "w":1.5}, {"label":"Win", "x":12.75, "y":5.25}, {"label":"Ctrl", "x":13.75, "y":5.25, "w":1.5}, {"label":"\u2190", "x":15.5, "y":5.5}, {"label":"\u2193", "x":16.5, "y":5.5}, {"label":"\u2192", "x":17.5, "y":5.5}] + }, + "LAYOUT_prime_ansi": { + "layout": [ + {"label":"Mute", "x":0, "y":0}, {"label":"Esc", "x":1.25, "y":0}, {"label":"F1", "x":2.5, "y":0}, {"label":"F2", "x":3.5, "y":0}, {"label":"F3", "x":4.5, "y":0}, {"label":"F4", "x":5.5, "y":0}, {"label":"F5", "x":7, "y":0}, {"label":"F6", "x":8, "y":0}, {"label":"F7", "x":9, "y":0}, {"label":"F8", "x":10, "y":0}, {"label":"F9", "x":11.5, "y":0}, {"label":"F10", "x":12.5, "y":0}, {"label":"F11", "x":13.5, "y":0}, {"label":"F12", "x":14.5, "y":0}, {"label":"Insert", "x":15.75, "y":0}, {"label":"Home", "x":16.75, "y":0}, {"label":"PgUp", "x":17.75, "y":0}, {"label":"End", "x":16.75, "y":1}, {"label":"PgDn", "x":17.75, "y":1}, + {"label":"Fn", "x":0, "y":1.25}, {"label":"~", "x":1.25, "y":1.25}, {"label":"!", "x":2.25, "y":1.25}, {"label":"@", "x":3.25, "y":1.25}, {"label":"#", "x":4.25, "y":1.25}, {"label":"$", "x":5.25, "y":1.25}, {"label":"%", "x":6.25, "y":1.25}, {"label":"^", "x":7.25, "y":1.25}, {"label":"&", "x":8.25, "y":1.25}, {"label":"*", "x":9.25, "y":1.25}, {"label":"(", "x":10.25, "y":1.25}, {"label":")", "x":11.25, "y":1.25}, {"label":"_", "x":12.25, "y":1.25}, {"label":"+", "x":13.25, "y":1.25}, {"x":14.25, "y":1.25}, {"label":"Backspace", "x":15.25, "y":1.25}, + {"label":"Fn", "x":0, "y":2.25}, {"label":"Tab", "x":1.25, "y":2.25, "w":1.5}, {"label":"Q", "x":2.75, "y":2.25}, {"label":"W", "x":3.75, "y":2.25}, {"label":"E", "x":4.75, "y":2.25}, {"label":"R", "x":5.75, "y":2.25}, {"label":"T", "x":6.75, "y":2.25}, {"label":"Y", "x":7.75, "y":2.25}, {"label":"U", "x":8.75, "y":2.25}, {"label":"I", "x":9.75, "y":2.25}, {"label":"O", "x":10.75, "y":2.25}, {"label":"P", "x":11.75, "y":2.25}, {"label":"{", "x":12.75, "y":2.25}, {"label":"}", "x":13.75, "y":2.25}, {"label":"|", "x":14.75, "y":2.25, "w":1.5}, {"label":"Insert", "x":16.5, "y":2.25}, {"label":"PrtSc", "x":17.75, "y":2.25}, + {"label":"Fn", "x":0, "y":3.25}, {"label":"Caps Lock", "x":1.25, "y":3.25, "w":1.75}, {"label":"A", "x":3, "y":3.25}, {"label":"S", "x":4, "y":3.25}, {"label":"D", "x":5, "y":3.25}, {"label":"F", "x":6, "y":3.25}, {"label":"G", "x":7, "y":3.25}, {"label":"H", "x":8, "y":3.25}, {"label":"J", "x":9, "y":3.25}, {"label":"K", "x":10, "y":3.25}, {"label":"L", "x":11, "y":3.25}, {"label":":", "x":12, "y":3.25}, {"label":"\"", "x":13, "y":3.25}, {"label":"Enter", "x":14, "y":3.25, "w":2.25}, {"label":"Delete", "x":16.5, "y":3.25}, {"label":"Enter", "x":17.75, "y":3.25}, + {"label":"Fn", "x":0, "y":4.25}, {"label":"Shift", "x":1.25, "y":4.25, "w":2.25}, {"label":"Z", "x":3.5, "y":4.25}, {"label":"X", "x":4.5, "y":4.25}, {"label":"C", "x":5.5, "y":4.25}, {"label":"V", "x":6.5, "y":4.25}, {"label":"B", "x":7.5, "y":4.25}, {"label":"N", "x":8.5, "y":4.25}, {"label":"M", "x":9.5, "y":4.25}, {"label":"<", "x":10.5, "y":4.25}, {"label":">", "x":11.5, "y":4.25}, {"label":"?", "x":12.5, "y":4.25}, {"label":"Shift", "x":13.5, "y":4.25, "w":1.75}, {"label":"Fn", "x":15.25, "y":4.25}, {"label":"Enter", "x":17.75, "y":4.25}, {"label":"\u2191", "x":16.5, "y":4.5}, + {"label":"Fn", "x":0, "y":5.25}, {"label":"Ctrl", "x":1.25, "y":5.25, "w":1.5}, {"label":"Win", "x":2.75, "y":5.25}, {"label":"Alt", "x":3.75, "y":5.25, "w":1.5}, {"x":5.25, "y":5.25, "w":6}, {"label":"Alt", "x":11.25, "y":5.25, "w":1.5}, {"label":"Win", "x":12.75, "y":5.25}, {"label":"Ctrl", "x":13.75, "y":5.25, "w":1.5}, {"label":"\u2190", "x":15.5, "y":5.5}, {"label":"\u2193", "x":16.5, "y":5.5}, {"label":"\u2192", "x":17.5, "y":5.5}] + }, + "LAYOUT_prime_iso": { + "layout": [ + {"label":"Mute", "x":0, "y":0}, {"label":"Esc", "x":1.25, "y":0}, {"label":"F1", "x":2.5, "y":0}, {"label":"F2", "x":3.5, "y":0}, {"label":"F3", "x":4.5, "y":0}, {"label":"F4", "x":5.5, "y":0}, {"label":"F5", "x":7, "y":0}, {"label":"F6", "x":8, "y":0}, {"label":"F7", "x":9, "y":0}, {"label":"F8", "x":10, "y":0}, {"label":"F9", "x":11.5, "y":0}, {"label":"F10", "x":12.5, "y":0}, {"label":"F11", "x":13.5, "y":0}, {"label":"F12", "x":14.5, "y":0}, {"label":"Insert", "x":15.75, "y":0}, {"label":"Home", "x":16.75, "y":0}, {"label":"PgUp", "x":17.75, "y":0}, {"label":"End", "x":16.75, "y":1}, {"label":"PgDn", "x":17.75, "y":1}, + {"label":"Fn", "x":0, "y":1.25}, {"label":"~", "x":1.25, "y":1.25}, {"label":"!", "x":2.25, "y":1.25}, {"label":"@", "x":3.25, "y":1.25}, {"label":"#", "x":4.25, "y":1.25}, {"label":"$", "x":5.25, "y":1.25}, {"label":"%", "x":6.25, "y":1.25}, {"label":"^", "x":7.25, "y":1.25}, {"label":"&", "x":8.25, "y":1.25}, {"label":"*", "x":9.25, "y":1.25}, {"label":"(", "x":10.25, "y":1.25}, {"label":")", "x":11.25, "y":1.25}, {"label":"_", "x":12.25, "y":1.25}, {"label":"+", "x":13.25, "y":1.25}, {"x":14.25, "y":1.25}, {"label":"Backspace", "x":15.25, "y":1.25}, + {"label":"Fn", "x":0, "y":2.25}, {"label":"Tab", "x":1.25, "y":2.25, "w":1.5}, {"label":"Q", "x":2.75, "y":2.25}, {"label":"W", "x":3.75, "y":2.25}, {"label":"E", "x":4.75, "y":2.25}, {"label":"R", "x":5.75, "y":2.25}, {"label":"T", "x":6.75, "y":2.25}, {"label":"Y", "x":7.75, "y":2.25}, {"label":"U", "x":8.75, "y":2.25}, {"label":"I", "x":9.75, "y":2.25}, {"label":"O", "x":10.75, "y":2.25}, {"label":"P", "x":11.75, "y":2.25}, {"label":"{", "x":12.75, "y":2.25}, {"label":"}", "x":13.75, "y":2.25}, {"label":"Enter", "x":15, "y":2.25, "w":1.25, "h":2}, {"label":"Insert", "x":16.5, "y":2.25}, {"label":"PrtSc", "x":17.75, "y":2.25}, + {"label":"Fn", "x":0, "y":3.25}, {"label":"Caps Lock", "x":1.25, "y":3.25, "w":1.75}, {"label":"A", "x":3, "y":3.25}, {"label":"S", "x":4, "y":3.25}, {"label":"D", "x":5, "y":3.25}, {"label":"F", "x":6, "y":3.25}, {"label":"G", "x":7, "y":3.25}, {"label":"H", "x":8, "y":3.25}, {"label":"J", "x":9, "y":3.25}, {"label":"K", "x":10, "y":3.25}, {"label":"L", "x":11, "y":3.25}, {"label":":", "x":12, "y":3.25}, {"label":"\"", "x":13, "y":3.25}, {"x":14, "y":3.25}, {"label":"Delete", "x":16.5, "y":3.25}, {"label":"Enter", "x":17.75, "y":3.25}, + {"label":"Fn", "x":0, "y":4.25}, {"label":"Shift", "x":1.25, "y":4.25, "w":1.25}, {"x":2.5, "y":4.25}, {"label":"Z", "x":3.5, "y":4.25}, {"label":"X", "x":4.5, "y":4.25}, {"label":"C", "x":5.5, "y":4.25}, {"label":"V", "x":6.5, "y":4.25}, {"label":"B", "x":7.5, "y":4.25}, {"label":"N", "x":8.5, "y":4.25}, {"label":"M", "x":9.5, "y":4.25}, {"label":"<", "x":10.5, "y":4.25}, {"label":">", "x":11.5, "y":4.25}, {"label":"?", "x":12.5, "y":4.25}, {"label":"Shift", "x":13.5, "y":4.25, "w":1.75}, {"label":"Fn", "x":15.25, "y":4.25}, {"label":"Enter", "x":17.75, "y":4.25}, {"label":"\u2191", "x":16.5, "y":4.5}, + {"label":"Fn", "x":0, "y":5.25}, {"label":"Ctrl", "x":1.25, "y":5.25, "w":1.5}, {"label":"Win", "x":2.75, "y":5.25}, {"label":"Alt", "x":3.75, "y":5.25, "w":1.5}, {"x":5.25, "y":5.25, "w":6}, {"label":"Alt", "x":11.25, "y":5.25, "w":1.5}, {"label":"Win", "x":12.75, "y":5.25}, {"label":"Ctrl", "x":13.75, "y":5.25, "w":1.5}, {"label":"\u2190", "x":15.5, "y":5.5}, {"label":"\u2193", "x":16.5, "y":5.5}, {"label":"\u2192", "x":17.5, "y":5.5}] + }, + "LAYOUT_b_ansi": { + "layout": [ + {"label":"Mute", "x":0, "y":0}, {"label":"Esc", "x":1.25, "y":0}, {"label":"F1", "x":2.5, "y":0}, {"label":"F2", "x":3.5, "y":0}, {"label":"F3", "x":4.5, "y":0}, {"label":"F4", "x":5.5, "y":0}, {"label":"F5", "x":7, "y":0}, {"label":"F6", "x":8, "y":0}, {"label":"F7", "x":9, "y":0}, {"label":"F8", "x":10, "y":0}, {"label":"F9", "x":11.5, "y":0}, {"label":"F10", "x":12.5, "y":0}, {"label":"F11", "x":13.5, "y":0}, {"label":"F12", "x":14.5, "y":0}, {"label":"PrtSc", "x":15.75, "y":0}, {"label":"Scroll Lock", "x":16.75, "y":0}, {"label":"Pause", "x":17.75, "y":0}, + {"label":"Fn", "x":0, "y":1.25}, {"label":"~", "x":1.25, "y":1.25}, {"label":"!", "x":2.25, "y":1.25}, {"label":"@", "x":3.25, "y":1.25}, {"label":"#", "x":4.25, "y":1.25}, {"label":"$", "x":5.25, "y":1.25}, {"label":"%", "x":6.25, "y":1.25}, {"label":"^", "x":7.25, "y":1.25}, {"label":"&", "x":8.25, "y":1.25}, {"label":"*", "x":9.25, "y":1.25}, {"label":"(", "x":10.25, "y":1.25}, {"label":")", "x":11.25, "y":1.25}, {"label":"_", "x":12.25, "y":1.25}, {"label":"+", "x":13.25, "y":1.25}, {"x":14.25, "y":1.25}, {"label":"Backspace", "x":15.25, "y":1.25}, {"label":"Home", "x":16.75, "y":1.25}, {"label":"PgUp", "x":17.75, "y":1.25}, + {"label":"Fn", "x":0, "y":2.25}, {"label":"Tab", "x":1.25, "y":2.25, "w":1.5}, {"label":"Q", "x":2.75, "y":2.25}, {"label":"W", "x":3.75, "y":2.25}, {"label":"E", "x":4.75, "y":2.25}, {"label":"R", "x":5.75, "y":2.25}, {"label":"T", "x":6.75, "y":2.25}, {"label":"Y", "x":7.75, "y":2.25}, {"label":"U", "x":8.75, "y":2.25}, {"label":"I", "x":9.75, "y":2.25}, {"label":"O", "x":10.75, "y":2.25}, {"label":"P", "x":11.75, "y":2.25}, {"label":"{", "x":12.75, "y":2.25}, {"label":"}", "x":13.75, "y":2.25}, {"label":"|", "x":14.75, "y":2.25, "w":1.5}, {"label":"End", "x":16.75, "y":2.25}, {"label":"PgDn", "x":17.75, "y":2.25}, + {"label":"Fn", "x":0, "y":3.25}, {"label":"Caps Lock", "x":1.25, "y":3.25, "w":1.75}, {"label":"A", "x":3, "y":3.25}, {"label":"S", "x":4, "y":3.25}, {"label":"D", "x":5, "y":3.25}, {"label":"F", "x":6, "y":3.25}, {"label":"G", "x":7, "y":3.25}, {"label":"H", "x":8, "y":3.25}, {"label":"J", "x":9, "y":3.25}, {"label":"K", "x":10, "y":3.25}, {"label":"L", "x":11, "y":3.25}, {"label":":", "x":12, "y":3.25}, {"label":"\"", "x":13, "y":3.25}, {"label":"Enter", "x":14, "y":3.25, "w":2.25}, {"label":"Delete", "x":16.75, "y":3.25}, {"label":"Insert", "x":17.75, "y":3.25}, + {"label":"Fn", "x":0, "y":4.25}, {"label":"Shift", "x":1.25, "y":4.25, "w":2.25}, {"label":"Z", "x":3.5, "y":4.25}, {"label":"X", "x":4.5, "y":4.25}, {"label":"C", "x":5.5, "y":4.25}, {"label":"V", "x":6.5, "y":4.25}, {"label":"B", "x":7.5, "y":4.25}, {"label":"N", "x":8.5, "y":4.25}, {"label":"M", "x":9.5, "y":4.25}, {"label":"<", "x":10.5, "y":4.25}, {"label":">", "x":11.5, "y":4.25}, {"label":"?", "x":12.5, "y":4.25}, {"label":"Shift", "x":13.5, "y":4.25, "w":1.75}, {"label":"Fn", "x":15.25, "y":4.25}, {"label":"Enter", "x":17.75, "y":4.25}, {"label":"\u2191", "x":16.5, "y":4.5}, + {"label":"Fn", "x":0, "y":5.25}, {"label":"Ctrl", "x":1.25, "y":5.25, "w":1.5}, {"label":"Win", "x":2.75, "y":5.25}, {"label":"Alt", "x":3.75, "y":5.25, "w":1.5}, {"x":5.25, "y":5.25, "w":6}, {"label":"Alt", "x":11.25, "y":5.25, "w":1.5}, {"label":"Win", "x":12.75, "y":5.25}, {"label":"Ctrl", "x":13.75, "y":5.25, "w":1.5}, {"label":"\u2190", "x":15.5, "y":5.5}, {"label":"\u2193", "x":16.5, "y":5.5}, {"label":"\u2192", "x":17.5, "y":5.5}] + }, + "LAYOUT_b_iso": { + "layout": [ + {"label":"Mute", "x":0, "y":0}, {"label":"Esc", "x":1.25, "y":0}, {"label":"F1", "x":2.5, "y":0}, {"label":"F2", "x":3.5, "y":0}, {"label":"F3", "x":4.5, "y":0}, {"label":"F4", "x":5.5, "y":0}, {"label":"F5", "x":7, "y":0}, {"label":"F6", "x":8, "y":0}, {"label":"F7", "x":9, "y":0}, {"label":"F8", "x":10, "y":0}, {"label":"F9", "x":11.5, "y":0}, {"label":"F10", "x":12.5, "y":0}, {"label":"F11", "x":13.5, "y":0}, {"label":"F12", "x":14.5, "y":0}, {"label":"PrtSc", "x":15.75, "y":0}, {"label":"Scroll Lock", "x":16.75, "y":0}, {"label":"Pause", "x":17.75, "y":0}, + {"label":"Fn", "x":0, "y":1.25}, {"label":"~", "x":1.25, "y":1.25}, {"label":"!", "x":2.25, "y":1.25}, {"label":"@", "x":3.25, "y":1.25}, {"label":"#", "x":4.25, "y":1.25}, {"label":"$", "x":5.25, "y":1.25}, {"label":"%", "x":6.25, "y":1.25}, {"label":"^", "x":7.25, "y":1.25}, {"label":"&", "x":8.25, "y":1.25}, {"label":"*", "x":9.25, "y":1.25}, {"label":"(", "x":10.25, "y":1.25}, {"label":")", "x":11.25, "y":1.25}, {"label":"_", "x":12.25, "y":1.25}, {"label":"+", "x":13.25, "y":1.25}, {"x":14.25, "y":1.25}, {"label":"Backspace", "x":15.25, "y":1.25}, {"label":"Home", "x":16.75, "y":1.25}, {"label":"PgUp", "x":17.75, "y":1.25}, + {"label":"Fn", "x":0, "y":2.25}, {"label":"Tab", "x":1.25, "y":2.25, "w":1.5}, {"label":"Q", "x":2.75, "y":2.25}, {"label":"W", "x":3.75, "y":2.25}, {"label":"E", "x":4.75, "y":2.25}, {"label":"R", "x":5.75, "y":2.25}, {"label":"T", "x":6.75, "y":2.25}, {"label":"Y", "x":7.75, "y":2.25}, {"label":"U", "x":8.75, "y":2.25}, {"label":"I", "x":9.75, "y":2.25}, {"label":"O", "x":10.75, "y":2.25}, {"label":"P", "x":11.75, "y":2.25}, {"label":"{", "x":12.75, "y":2.25}, {"label":"}", "x":13.75, "y":2.25}, {"label":"Enter", "x":15, "y":2.25, "w":1.25, "h":2}, {"label":"End", "x":16.75, "y":2.25}, {"label":"PgDn", "x":17.75, "y":2.25}, + {"label":"Fn", "x":0, "y":3.25}, {"label":"Caps Lock", "x":1.25, "y":3.25, "w":1.75}, {"label":"A", "x":3, "y":3.25}, {"label":"S", "x":4, "y":3.25}, {"label":"D", "x":5, "y":3.25}, {"label":"F", "x":6, "y":3.25}, {"label":"G", "x":7, "y":3.25}, {"label":"H", "x":8, "y":3.25}, {"label":"J", "x":9, "y":3.25}, {"label":"K", "x":10, "y":3.25}, {"label":"L", "x":11, "y":3.25}, {"label":":", "x":12, "y":3.25}, {"label":"\"", "x":13, "y":3.25}, {"x":14, "y":3.25}, {"label":"Delete", "x":16.75, "y":3.25}, {"label":"Insert", "x":17.75, "y":3.25}, + {"label":"Fn", "x":0, "y":4.25}, {"label":"Shift", "x":1.25, "y":4.25, "w":1.25}, {"x":2.5, "y":4.25}, {"label":"Z", "x":3.5, "y":4.25}, {"label":"X", "x":4.5, "y":4.25}, {"label":"C", "x":5.5, "y":4.25}, {"label":"V", "x":6.5, "y":4.25}, {"label":"B", "x":7.5, "y":4.25}, {"label":"N", "x":8.5, "y":4.25}, {"label":"M", "x":9.5, "y":4.25}, {"label":"<", "x":10.5, "y":4.25}, {"label":">", "x":11.5, "y":4.25}, {"label":"?", "x":12.5, "y":4.25}, {"label":"Shift", "x":13.5, "y":4.25, "w":1.75}, {"label":"Fn", "x":15.25, "y":4.25}, {"label":"Enter", "x":17.75, "y":4.25}, {"label":"\u2191", "x":16.5, "y":4.5}, + {"label":"Fn", "x":0, "y":5.25}, {"label":"Ctrl", "x":1.25, "y":5.25, "w":1.5}, {"label":"Win", "x":2.75, "y":5.25}, {"label":"Alt", "x":3.75, "y":5.25, "w":1.5}, {"x":5.25, "y":5.25, "w":6}, {"label":"Alt", "x":11.25, "y":5.25, "w":1.5}, {"label":"Win", "x":12.75, "y":5.25}, {"label":"Ctrl", "x":13.75, "y":5.25, "w":1.5}, {"label":"\u2190", "x":15.5, "y":5.5}, {"label":"\u2193", "x":16.5, "y":5.5}, {"label":"\u2192", "x":17.5, "y":5.5}] + }, + "LAYOUT_a_ansi": { + "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.75, "y":0}, {"label":"F6", "x":6.75, "y":0}, {"label":"F7", "x":7.75, "y":0}, {"label":"F8", "x":8.75, "y":0}, {"label":"F9", "x":10.25, "y":0}, {"label":"F10", "x":11.25, "y":0}, {"label":"F11", "x":12.25, "y":0}, {"label":"F12", "x":13.25, "y":0}, {"label":"PrtSc", "x":14.5, "y":0}, {"label":"Insert", "x":15.75, "y":0}, {"label":"Home", "x":16.75, "y":0}, {"label":"PgUp", "x":17.75, "y":0}, {"label":"End", "x":16.75, "y":1}, {"label":"PgDn", "x":17.75, "y":1}, + {"label":"Fn", "x":0, "y":1.25}, {"label":"~", "x":1.25, "y":1.25}, {"label":"!", "x":2.25, "y":1.25}, {"label":"@", "x":3.25, "y":1.25}, {"label":"#", "x":4.25, "y":1.25}, {"label":"$", "x":5.25, "y":1.25}, {"label":"%", "x":6.25, "y":1.25}, {"label":"^", "x":7.25, "y":1.25}, {"label":"&", "x":8.25, "y":1.25}, {"label":"*", "x":9.25, "y":1.25}, {"label":"(", "x":10.25, "y":1.25}, {"label":")", "x":11.25, "y":1.25}, {"label":"_", "x":12.25, "y":1.25}, {"label":"+", "x":13.25, "y":1.25}, {"x":14.25, "y":1.25}, {"label":"Backspace", "x":15.25, "y":1.25}, + {"label":"Fn", "x":0, "y":2.25}, {"label":"Tab", "x":1.25, "y":2.25, "w":1.5}, {"label":"Q", "x":2.75, "y":2.25}, {"label":"W", "x":3.75, "y":2.25}, {"label":"E", "x":4.75, "y":2.25}, {"label":"R", "x":5.75, "y":2.25}, {"label":"T", "x":6.75, "y":2.25}, {"label":"Y", "x":7.75, "y":2.25}, {"label":"U", "x":8.75, "y":2.25}, {"label":"I", "x":9.75, "y":2.25}, {"label":"O", "x":10.75, "y":2.25}, {"label":"P", "x":11.75, "y":2.25}, {"label":"{", "x":12.75, "y":2.25}, {"label":"}", "x":13.75, "y":2.25}, {"label":"|", "x":14.75, "y":2.25, "w":1.5}, {"label":"Insert", "x":16.5, "y":2.25}, {"label":"Mute", "x":17.75, "y":2.625}, + {"label":"Fn", "x":0, "y":3.25}, {"label":"Caps Lock", "x":1.25, "y":3.25, "w":1.75}, {"label":"A", "x":3, "y":3.25}, {"label":"S", "x":4, "y":3.25}, {"label":"D", "x":5, "y":3.25}, {"label":"F", "x":6, "y":3.25}, {"label":"G", "x":7, "y":3.25}, {"label":"H", "x":8, "y":3.25}, {"label":"J", "x":9, "y":3.25}, {"label":"K", "x":10, "y":3.25}, {"label":"L", "x":11, "y":3.25}, {"label":":", "x":12, "y":3.25}, {"label":"\"", "x":13, "y":3.25}, {"label":"Enter", "x":14, "y":3.25, "w":2.25}, {"label":"Delete", "x":16.5, "y":3.25}, + {"label":"Fn", "x":0, "y":4.25}, {"label":"Shift", "x":1.25, "y":4.25, "w":2.25}, {"label":"Z", "x":3.5, "y":4.25}, {"label":"X", "x":4.5, "y":4.25}, {"label":"C", "x":5.5, "y":4.25}, {"label":"V", "x":6.5, "y":4.25}, {"label":"B", "x":7.5, "y":4.25}, {"label":"N", "x":8.5, "y":4.25}, {"label":"M", "x":9.5, "y":4.25}, {"label":"<", "x":10.5, "y":4.25}, {"label":">", "x":11.5, "y":4.25}, {"label":"?", "x":12.5, "y":4.25}, {"label":"Shift", "x":13.5, "y":4.25, "w":1.75}, {"label":"Enter", "x":17.75, "y":4.25}, {"label":"\u2191", "x":15.5, "y":4.5}, + {"label":"Fn", "x":0, "y":5.25}, {"label":"Ctrl", "x":1.25, "y":5.25, "w":1.25}, {"label":"Win", "x":2.5, "y":5.25, "w":1.25}, {"label":"Alt", "x":3.75, "y":5.25, "w":1.25}, {"x":5, "y":5.25, "w":6.25}, {"label":"Alt", "x":11.25, "y":5.25, "w":1.5}, {"label":"Ctrl", "x":12.75, "y":5.25, "w":1.5}, {"label":"Enter", "x":17.75, "y":5.25}, {"label":"\u2190", "x":14.5, "y":5.5}, {"label":"\u2193", "x":15.5, "y":5.5}, {"label":"\u2192", "x":16.5, "y":5.5}] + }, + "LAYOUT_a_iso": { + "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.75, "y":0}, {"label":"F6", "x":6.75, "y":0}, {"label":"F7", "x":7.75, "y":0}, {"label":"F8", "x":8.75, "y":0}, {"label":"F9", "x":10.25, "y":0}, {"label":"F10", "x":11.25, "y":0}, {"label":"F11", "x":12.25, "y":0}, {"label":"F12", "x":13.25, "y":0}, {"label":"PrtSc", "x":14.5, "y":0}, {"label":"Insert", "x":15.75, "y":0}, {"label":"Home", "x":16.75, "y":0}, {"label":"PgUp", "x":17.75, "y":0}, {"label":"End", "x":16.75, "y":1}, {"label":"PgDn", "x":17.75, "y":1}, + {"label":"Fn", "x":0, "y":1.25}, {"label":"~", "x":1.25, "y":1.25}, {"label":"!", "x":2.25, "y":1.25}, {"label":"@", "x":3.25, "y":1.25}, {"label":"#", "x":4.25, "y":1.25}, {"label":"$", "x":5.25, "y":1.25}, {"label":"%", "x":6.25, "y":1.25}, {"label":"^", "x":7.25, "y":1.25}, {"label":"&", "x":8.25, "y":1.25}, {"label":"*", "x":9.25, "y":1.25}, {"label":"(", "x":10.25, "y":1.25}, {"label":")", "x":11.25, "y":1.25}, {"label":"_", "x":12.25, "y":1.25}, {"label":"+", "x":13.25, "y":1.25}, {"x":14.25, "y":1.25}, {"label":"Backspace", "x":15.25, "y":1.25}, + {"label":"Fn", "x":0, "y":2.25}, {"label":"Tab", "x":1.25, "y":2.25, "w":1.5}, {"label":"Q", "x":2.75, "y":2.25}, {"label":"W", "x":3.75, "y":2.25}, {"label":"E", "x":4.75, "y":2.25}, {"label":"R", "x":5.75, "y":2.25}, {"label":"T", "x":6.75, "y":2.25}, {"label":"Y", "x":7.75, "y":2.25}, {"label":"U", "x":8.75, "y":2.25}, {"label":"I", "x":9.75, "y":2.25}, {"label":"O", "x":10.75, "y":2.25}, {"label":"P", "x":11.75, "y":2.25}, {"label":"{", "x":12.75, "y":2.25}, {"label":"}", "x":13.75, "y":2.25}, {"label":"Enter", "x":15, "y":2.25, "w":1.25, "h":2}, {"label":"Insert", "x":16.5, "y":2.25}, {"label":"Mute", "x":17.75, "y":2.625}, + {"label":"Fn", "x":0, "y":3.25}, {"label":"Caps Lock", "x":1.25, "y":3.25, "w":1.75}, {"label":"A", "x":3, "y":3.25}, {"label":"S", "x":4, "y":3.25}, {"label":"D", "x":5, "y":3.25}, {"label":"F", "x":6, "y":3.25}, {"label":"G", "x":7, "y":3.25}, {"label":"H", "x":8, "y":3.25}, {"label":"J", "x":9, "y":3.25}, {"label":"K", "x":10, "y":3.25}, {"label":"L", "x":11, "y":3.25}, {"label":":", "x":12, "y":3.25}, {"label":"\"", "x":13, "y":3.25}, {"x":14, "y":3.25}, {"label":"Delete", "x":16.5, "y":3.25}, + {"label":"Fn", "x":0, "y":4.25}, {"label":"Shift", "x":1.25, "y":4.25, "w":1.25}, {"x":2.5, "y":4.25}, {"label":"Z", "x":3.5, "y":4.25}, {"label":"X", "x":4.5, "y":4.25}, {"label":"C", "x":5.5, "y":4.25}, {"label":"V", "x":6.5, "y":4.25}, {"label":"B", "x":7.5, "y":4.25}, {"label":"N", "x":8.5, "y":4.25}, {"label":"M", "x":9.5, "y":4.25}, {"label":"<", "x":10.5, "y":4.25}, {"label":">", "x":11.5, "y":4.25}, {"label":"?", "x":12.5, "y":4.25}, {"label":"Shift", "x":13.5, "y":4.25, "w":1.75}, {"label":"Enter", "x":17.75, "y":4.25}, {"label":"\u2191", "x":15.5, "y":4.5}, + {"label":"Fn", "x":0, "y":5.25}, {"label":"Ctrl", "x":1.25, "y":5.25, "w":1.25}, {"label":"Win", "x":2.5, "y":5.25, "w":1.25}, {"label":"Alt", "x":3.75, "y":5.25, "w":1.25}, {"x":5, "y":5.25, "w":6.25}, {"label":"Alt", "x":11.25, "y":5.25, "w":1.5}, {"label":"Ctrl", "x":12.75, "y":5.25, "w":1.5}, {"label":"Enter", "x":17.75, "y":5.25}, {"label":"\u2190", "x":14.5, "y":5.5}, {"label":"\u2193", "x":15.5, "y":5.5}, {"label":"\u2192", "x":16.5, "y":5.5}] + } + } +} \ No newline at end of file diff --git a/keyboards/metamechs/timberwolf/keymaps/a_ansi/keymap.c b/keyboards/metamechs/timberwolf/keymaps/a_ansi/keymap.c new file mode 100644 index 000000000000..73c5ca57614d --- /dev/null +++ b/keyboards/metamechs/timberwolf/keymaps/a_ansi/keymap.c @@ -0,0 +1,44 @@ +/* Copyright 2020 Croktopus + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public 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] = { + /* Base */ + [0] = LAYOUT_a_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_INS ,KC_HOME,KC_PGUP, + RESET ,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_END ,KC_PGDN, + BL_STEP,KC_TAB ,KC_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_MUTE, + MO(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_DEL , + MO(1) ,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_PENT, + MO(1) ,KC_LCTL,KC_LGUI,KC_LALT ,KC_SPC ,KC_RALT,KC_RCTL ,KC_LEFT,KC_DOWN,KC_RGHT,KC_PENT + ), + [1] = LAYOUT_a_ansi( + RESET ,RESET ,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______ ,_______,_______,_______, + MO(1) ,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, + MO(1) ,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______ ,_______,_______, + MO(1) ,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______ ,_______ ,_______ , + MO(1) ,_______ ,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______, _______, + MO(1) ,_______,_______,_______ ,_______ ,_______,_______, _______,_______,_______,_______ + ) +}; + +void encoder_update_user(uint8_t index, bool clockwise) { + if (clockwise) { + tap_code(KC_VOLU); + } else { + tap_code(KC_VOLD); + } +} \ No newline at end of file diff --git a/keyboards/metamechs/timberwolf/keymaps/a_iso/keymap.c b/keyboards/metamechs/timberwolf/keymaps/a_iso/keymap.c new file mode 100644 index 000000000000..9dd448ff6a21 --- /dev/null +++ b/keyboards/metamechs/timberwolf/keymaps/a_iso/keymap.c @@ -0,0 +1,44 @@ +/* Copyright 2020 Croktopus + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public 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] = { + /* Base */ + [0] = LAYOUT_a_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_PSCR,KC_INS ,KC_HOME,KC_PGUP, + RESET ,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_END ,KC_PGDN, + BL_STEP,KC_TAB ,KC_Q ,KC_W ,KC_E ,KC_R ,KC_T ,KC_Y ,KC_U ,KC_I ,KC_O ,KC_P ,KC_LBRC,KC_RBRC ,KC_INS ,KC_MUTE, + MO(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_DEL , + MO(1) ,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_PENT, + MO(1) ,KC_LCTL,KC_LGUI,KC_LALT ,KC_SPC ,KC_RALT,KC_RCTL ,KC_LEFT,KC_DOWN,KC_RGHT,KC_PENT + ), + [1] = LAYOUT_a_iso( + RESET ,RESET ,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______ ,_______,_______,_______, + MO(1) ,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, + MO(1) ,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______ ,_______,_______, + MO(1) ,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______ ,_______ , + MO(1) ,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______, _______, + MO(1) ,_______,_______,_______ ,_______ ,_______,_______, _______,_______,_______,_______ + ) +}; + +void encoder_update_user(uint8_t index, bool clockwise) { + if (clockwise) { + tap_code(KC_VOLU); + } else { + tap_code(KC_VOLD); + } +} \ No newline at end of file diff --git a/keyboards/metamechs/timberwolf/keymaps/b_ansi/keymap.c b/keyboards/metamechs/timberwolf/keymaps/b_ansi/keymap.c new file mode 100644 index 000000000000..2500894f9867 --- /dev/null +++ b/keyboards/metamechs/timberwolf/keymaps/b_ansi/keymap.c @@ -0,0 +1,44 @@ +/* Copyright 2020 Croktopus + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public 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] = { + /* Base */ + [0] = LAYOUT_b_ansi( + KC_MUTE,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, + RESET ,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_HOME,KC_PGUP, + BL_STEP,KC_TAB ,KC_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_PGDN, + MO(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_DEL ,KC_INS , + MO(1) ,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_UP ,KC_PENT, + MO(1) ,KC_LCTL,KC_LGUI,KC_LALT ,KC_SPC ,KC_RALT,KC_RGUI,KC_RCTL ,KC_LEFT,KC_DOWN,KC_RGHT + ), + [1] = LAYOUT_b_ansi( + RESET ,RESET ,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______ ,_______,_______,_______, + MO(1) ,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, + MO(1) ,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______ ,_______,_______, + MO(1) ,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______ ,_______ ,_______,_______, + MO(1) ,_______ ,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______ ,_______, + MO(1) ,_______,_______,_______ ,_______ ,_______,_______,_______ ,_______,_______,_______ + ) +}; + +void encoder_update_user(uint8_t index, bool clockwise) { + if (clockwise) { + tap_code(KC_VOLU); + } else { + tap_code(KC_VOLD); + } +} \ No newline at end of file diff --git a/keyboards/metamechs/timberwolf/keymaps/b_iso/keymap.c b/keyboards/metamechs/timberwolf/keymaps/b_iso/keymap.c new file mode 100644 index 000000000000..cfc5757adc42 --- /dev/null +++ b/keyboards/metamechs/timberwolf/keymaps/b_iso/keymap.c @@ -0,0 +1,44 @@ +/* Copyright 2020 Croktopus + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public 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] = { + /* Base */ + [0] = LAYOUT_b_iso( + KC_MUTE,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, + RESET ,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_HOME,KC_PGUP, + BL_STEP,KC_TAB ,KC_Q ,KC_W ,KC_E ,KC_R ,KC_T ,KC_Y ,KC_U ,KC_I ,KC_O ,KC_P ,KC_LBRC,KC_RBRC ,KC_END ,KC_PGDN, + MO(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_DEL ,KC_INS , + MO(1) ,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_PENT, + MO(1) ,KC_LCTL,KC_LGUI,KC_LALT ,KC_SPC ,KC_RALT,KC_RGUI,KC_RCTL ,KC_LEFT,KC_DOWN,KC_RGHT + ), + [1] = LAYOUT_b_iso( + RESET ,RESET ,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______ ,_______,_______,_______, + MO(1) ,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, + MO(1) ,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______ ,_______,_______, + MO(1) ,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______ ,_______,_______, + MO(1) ,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______, + MO(1) ,_______,_______,_______ ,_______ ,_______,_______,_______ ,_______,_______,_______ + ) +}; + +void encoder_update_user(uint8_t index, bool clockwise) { + if (clockwise) { + tap_code(KC_VOLU); + } else { + tap_code(KC_VOLD); + } +} \ No newline at end of file diff --git a/keyboards/metamechs/timberwolf/keymaps/default/keymap.c b/keyboards/metamechs/timberwolf/keymaps/default/keymap.c new file mode 100644 index 000000000000..8663eca738e9 --- /dev/null +++ b/keyboards/metamechs/timberwolf/keymaps/default/keymap.c @@ -0,0 +1,44 @@ +/* Copyright 2020 Croktopus + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public 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] = { + /* Base */ + [0] = LAYOUT_all( + KC_MUTE,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_PGUP, + RESET ,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_END ,KC_PGDN, + BL_STEP,KC_TAB ,KC_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_PSCR,KC_SLCK, + MO(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_DEL ,KC_INS , + MO(1) ,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_NO ,KC_UP ,KC_PENT, + MO(1) ,KC_LCTL,KC_LGUI,KC_LALT ,KC_SPC ,KC_RALT,KC_RGUI,KC_RCTL,KC_LEFT,KC_LEFT,KC_DOWN,KC_RGHT,KC_NO + ), + [1] = LAYOUT_all( + RESET ,RESET ,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______ ,_______,_______,_______, + MO(1) ,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, + MO(1) ,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______ ,_______,_______, + MO(1) ,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______ ,_______,_______, + MO(1) ,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, + MO(1) ,_______,_______,_______ ,_______ ,_______,_______,_______,_______,_______,_______,_______,_______ + ) +}; + +void encoder_update_user(uint8_t index, bool clockwise) { + if (clockwise) { + tap_code(KC_VOLU); + } else { + tap_code(KC_VOLD); + } +} \ No newline at end of file diff --git a/keyboards/metamechs/timberwolf/keymaps/prime_ansi/keymap.c b/keyboards/metamechs/timberwolf/keymaps/prime_ansi/keymap.c new file mode 100644 index 000000000000..e0436dee9e51 --- /dev/null +++ b/keyboards/metamechs/timberwolf/keymaps/prime_ansi/keymap.c @@ -0,0 +1,44 @@ +/* Copyright 2020 Croktopus + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public 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] = { + /* Base */ + [0] = LAYOUT_prime_ansi( + KC_MUTE,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_PGUP, + RESET ,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_END ,KC_PGDN, + BL_STEP,KC_TAB ,KC_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_PSCR,KC_SLCK, + MO(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_DEL ,KC_INS , + MO(1) ,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_UP ,KC_PENT, + MO(1) ,KC_LCTL,KC_LGUI,KC_LALT ,KC_SPC ,KC_RALT,KC_RGUI,KC_RCTL ,KC_LEFT,KC_DOWN,KC_RGHT + ), + [1] = LAYOUT_prime_ansi( + RESET ,RESET ,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______ ,_______,_______,_______, + MO(1) ,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, + MO(1) ,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______ ,_______,_______, + MO(1) ,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______ ,_______ ,_______,_______, + MO(1) ,_______ ,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______ ,_______, + MO(1) ,_______,_______,_______ ,_______ ,_______,_______,_______ ,_______,_______,_______ + ) +}; + +void encoder_update_user(uint8_t index, bool clockwise) { + if (clockwise) { + tap_code(KC_VOLU); + } else { + tap_code(KC_VOLD); + } +} \ No newline at end of file diff --git a/keyboards/metamechs/timberwolf/keymaps/prime_iso/keymap.c b/keyboards/metamechs/timberwolf/keymaps/prime_iso/keymap.c new file mode 100644 index 000000000000..bffc019c3c43 --- /dev/null +++ b/keyboards/metamechs/timberwolf/keymaps/prime_iso/keymap.c @@ -0,0 +1,44 @@ +/* Copyright 2020 Croktopus + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public 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] = { + /* Base */ + [0] = LAYOUT_prime_iso( + KC_MUTE,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_PGUP, + RESET ,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_END ,KC_PGDN, + BL_STEP,KC_TAB ,KC_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,KC_SLCK, + MO(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_DEL ,KC_INS , + MO(1) ,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_PENT, + MO(1) ,KC_LCTL,KC_LGUI,KC_LALT ,KC_SPC ,KC_RALT,KC_RGUI,KC_RCTL ,KC_LEFT,KC_DOWN,KC_RGHT + ), + [1] = LAYOUT_prime_iso( + RESET ,RESET ,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______ ,_______,_______,_______, + MO(1) ,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, + MO(1) ,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______ ,_______,_______, + MO(1) ,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______ ,_______,_______, + MO(1) ,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______, + MO(1) ,_______,_______,_______ ,_______ ,_______,_______,_______ ,_______,_______,_______ + ) +}; + +void encoder_update_user(uint8_t index, bool clockwise) { + if (clockwise) { + tap_code(KC_VOLU); + } else { + tap_code(KC_VOLD); + } +} \ No newline at end of file diff --git a/keyboards/metamechs/timberwolf/keymaps/via/keymap.c b/keyboards/metamechs/timberwolf/keymaps/via/keymap.c new file mode 100644 index 000000000000..a6c5b6628b0c --- /dev/null +++ b/keyboards/metamechs/timberwolf/keymaps/via/keymap.c @@ -0,0 +1,60 @@ +/* Copyright 2020 Croktopus + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public 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] = { + /* Base */ + [0] = LAYOUT_all( + KC_MUTE,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_PGUP, + RESET ,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_END ,KC_PGDN, + BL_STEP,KC_TAB ,KC_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_PSCR,KC_SLCK, + MO(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_DEL ,KC_INS , + MO(1) ,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_NO ,KC_PENT, + MO(1) ,KC_LCTL,KC_LGUI,KC_LALT ,KC_SPC ,KC_RALT,KC_RGUI,KC_RCTL,KC_LEFT,KC_LEFT,KC_DOWN,KC_RGHT,KC_NO + ), + [1] = LAYOUT_all( + RESET ,RESET ,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______ ,_______,_______,_______, + MO(1) ,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, + MO(1) ,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______ ,_______,_______, + MO(1) ,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______ ,_______,_______, + MO(1) ,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, + MO(1) ,_______,_______,_______ ,_______ ,_______,_______,_______,_______,_______,_______,_______,_______ + ), + [2] = LAYOUT_all( + _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______ ,_______,_______,_______, + _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, + _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______ ,_______,_______, + _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______ ,_______,_______, + _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, + _______,_______,_______,_______ ,_______ ,_______,_______,_______,_______,_______,_______,_______,_______ + ), + [3] = LAYOUT_all( + _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______ ,_______,_______,_______, + _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, + _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______ ,_______,_______, + _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______ ,_______,_______, + _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, + _______,_______,_______,_______ ,_______ ,_______,_______,_______,_______,_______,_______,_______,_______ + ) +}; + +void encoder_update_user(uint8_t index, bool clockwise) { + if (clockwise) { + tap_code(KC_VOLU); + } else { + tap_code(KC_VOLD); + } +} \ No newline at end of file diff --git a/keyboards/metamechs/timberwolf/readme.md b/keyboards/metamechs/timberwolf/readme.md new file mode 100644 index 000000000000..fbea1acf9712 --- /dev/null +++ b/keyboards/metamechs/timberwolf/readme.md @@ -0,0 +1,21 @@ +# Timber Wolf + +![Timber Wolf](https://i.imgur.com/Kz9fV6t.jpg) + +A compact TKL/XL 75% with rotary encoder and macro column. + +* Keyboard Maintainer: [Croktopus](https://github.com/Croktopus) +* Hardware Supported: Timber Wolf PCB using ATmega32u4 +* Hardware Availability: [GB ended October 2019](https://geekhack.org/index.php?topic=102520.0) + +Make command depends on the physical layout you purchased - for example, if you purchased a TBR-Prime and want to use an ANSI layout, you would use: + + make metamechs/timberwolf:prime_ansi + +or for a TBR-B with ISO you would use: + + make metamechs/timberwolf:b_iso + +etc. + +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/metamechs/timberwolf/rules.mk b/keyboards/metamechs/timberwolf/rules.mk new file mode 100644 index 000000000000..a1275c2d66e2 --- /dev/null +++ b/keyboards/metamechs/timberwolf/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 = 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 = 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 +ENCODER_ENABLE = yes # Enable encoder support + +BACKLIGHT_DRIVER = software \ No newline at end of file diff --git a/keyboards/metamechs/timberwolf/timberwolf.c b/keyboards/metamechs/timberwolf/timberwolf.c new file mode 100644 index 000000000000..c3fb24924bae --- /dev/null +++ b/keyboards/metamechs/timberwolf/timberwolf.c @@ -0,0 +1,27 @@ +/* Copyright 2020 Croktopus + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#include "timberwolf.h" + +bool led_update_kb(led_t led_state) { + bool runDefault = led_update_user(led_state); + if (led_state.caps_lock) { + backlight_enable(); + } else { + backlight_disable(); + } + return runDefault; +} \ No newline at end of file diff --git a/keyboards/metamechs/timberwolf/timberwolf.h b/keyboards/metamechs/timberwolf/timberwolf.h new file mode 100644 index 000000000000..1f19c6019986 --- /dev/null +++ b/keyboards/metamechs/timberwolf/timberwolf.h @@ -0,0 +1,175 @@ +/* Copyright 2020 Croktopus + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License 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 + +#define LAYOUT_all( \ + K000, K010, K001, K011, K002, K012, K003, K013, K004, K014, K005, K015, K006, K016, K017, K008, K018, \ + K020, K030, K021, K031, K022, K032, K023, K033, K024, K034, K025, K035, K026, K036, K027, K037, K028, K038, \ + K040, K050, K041, K051, K042, K052, K043, K053, K044, K054, K045, K055, K046, K056, K047, K048, K058, \ + K060, K070, K061, K071, K062, K072, K063, K073, K064, K074, K065, K075, K066, K076, K067, K068, K078, \ + K080, K090, K081, K091, K082, K092, K083, K093, K084, K094, K085, K095, K086, K096, K087, K097, K088, K098, \ + K100, K110, K101, K111, K113, K105, K115, K106, K116, K107, K117, K108, K118 \ +) { \ + { K000, K001, K002, K003, K004, K005, K006, ____, K008 }, \ + { K010, K011, K012, K013, K014, K015, K016, K017, K018 }, \ + { K020, K021, K022, K023, K024, K025, K026, K027, K028 }, \ + { K030, K031, K032, K033, K034, K035, K036, K037, K038 }, \ + { K040, K041, K042, K043, K044, K045, K046, K047, K048 }, \ + { K050, K051, K052, K053, K054, K055, K056, ____, K058 }, \ + { K060, K061, K062, K063, K064, K065, K066, K067, K068 }, \ + { K070, K071, K072, K073, K074, K075, K076, ____, K078 }, \ + { K080, K081, K082, K083, K084, K085, K086, K087, K088 }, \ + { K090, K091, K092, K093, K094, K095, K096, K097, K098 }, \ + { K100, K101, ____, ____, ____, K105, K106, K107, K108 }, \ + { K110, K111, ____, K113, ____, K115, K116, K117, K118 } \ +} + +#define LAYOUT_prime_ansi( \ + K000, K010, K001, K011, K002, K012, K003, K013, K004, K014, K005, K015, K006, K016, K017, K008, K018, \ + K020, K030, K021, K031, K022, K032, K023, K033, K024, K034, K025, K035, K026, K036, K027, K037, K028, K038, \ + K040, K050, K041, K051, K042, K052, K043, K053, K044, K054, K045, K055, K046, K056, K047, K048, K058, \ + K060, K070, K061, K071, K062, K072, K063, K073, K064, K074, K065, K075, K066, K067, K068, K078, \ + K080, K090, K091, K082, K092, K083, K093, K084, K094, K085, K095, K086, K096, K087, K088, K098, \ + K100, K110, K101, K111, K113, K105, K115, K106, K107, K117, K108 \ +) { \ + { K000, K001, K002, K003, K004, K005, K006, ____, K008 }, \ + { K010, K011, K012, K013, K014, K015, K016, K017, K018 }, \ + { K020, K021, K022, K023, K024, K025, K026, K027, K028 }, \ + { K030, K031, K032, K033, K034, K035, K036, K037, K038 }, \ + { K040, K041, K042, K043, K044, K045, K046, K047, K048 }, \ + { K050, K051, K052, K053, K054, K055, K056, ____, K058 }, \ + { K060, K061, K062, K063, K064, K065, K066, K067, K068 }, \ + { K070, K071, K072, K073, K074, K075, ____, ____, K078 }, \ + { K080, ____, K082, K083, K084, K085, K086, K087, K088 }, \ + { K090, K091, K092, K093, K094, K095, K096, ____, K098 }, \ + { K100, K101, ____, ____, ____, K105, K106, K107, K108 }, \ + { K110, K111, ____, K113, ____, K115, ____, K117, ____ } \ +} + +#define LAYOUT_prime_iso( \ + K000, K010, K001, K011, K002, K012, K003, K013, K004, K014, K005, K015, K006, K016, K017, K008, K018, \ + K020, K030, K021, K031, K022, K032, K023, K033, K024, K034, K025, K035, K026, K036, K027, K037, K028, K038, \ + K040, K050, K041, K051, K042, K052, K043, K053, K044, K054, K045, K055, K046, K056, K048, K058, \ + K060, K070, K061, K071, K062, K072, K063, K073, K064, K074, K065, K075, K066, K076, K067, K068, K078, \ + K080, K090, K081, K091, K082, K092, K083, K093, K084, K094, K085, K095, K086, K096, K087, K097, K098, \ + K100, K110, K101, K111, K113, K105, K115, K106, K107, K117, K108 \ +) { \ + { K000, K001, K002, K003, K004, K005, K006, ____, K008 }, \ + { K010, K011, K012, K013, K014, K015, K016, K017, K018 }, \ + { K020, K021, K022, K023, K024, K025, K026, K027, K028 }, \ + { K030, K031, K032, K033, K034, K035, K036, K037, K038 }, \ + { K040, K041, K042, K043, K044, K045, K046, ____, K048 }, \ + { K050, K051, K052, K053, K054, K055, K056, ____, K058 }, \ + { K060, K061, K062, K063, K064, K065, K066, K067, K068 }, \ + { K070, K071, K072, K073, K074, K075, K076, ____, K078 }, \ + { K080, K081, K082, K083, K084, K085, K086, K087, ____ }, \ + { K090, K091, K092, K093, K094, K095, K096, K097, K098 }, \ + { K100, K101, ____, ____, ____, K105, K106, K107, K108 }, \ + { K110, K111, ____, K113, ____, K115, ____, K117, ____ } \ +} + +#define LAYOUT_b_ansi( \ + K000, K010, K001, K011, K002, K012, K003, K013, K004, K014, K005, K015, K006, K016, K017, K008, K018, \ + K020, K030, K021, K031, K022, K032, K023, K033, K024, K034, K025, K035, K026, K036, K027, K037, K028, K038, \ + K040, K050, K041, K051, K042, K052, K043, K053, K044, K054, K045, K055, K046, K056, K047, K048, K058, \ + K060, K070, K061, K071, K062, K072, K063, K073, K064, K074, K065, K075, K066, K067, K068, K078, \ + K080, K090, K091, K082, K092, K083, K093, K084, K094, K085, K095, K086, K096, K087, K088, K098, \ + K100, K110, K101, K111, K113, K105, K115, K106, K107, K117, K108 \ +) { \ + { K000, K001, K002, K003, K004, K005, K006, ____, K008 }, \ + { K010, K011, K012, K013, K014, K015, K016, K017, K018 }, \ + { K020, K021, K022, K023, K024, K025, K026, K027, K028 }, \ + { K030, K031, K032, K033, K034, K035, K036, K037, K038 }, \ + { K040, K041, K042, K043, K044, K045, K046, K047, K048 }, \ + { K050, K051, K052, K053, K054, K055, K056, ____, K058 }, \ + { K060, K061, K062, K063, K064, K065, K066, K067, K068 }, \ + { K070, K071, K072, K073, K074, K075, ____, ____, K078 }, \ + { K080, ____, K082, K083, K084, K085, K086, K087, K088 }, \ + { K090, K091, K092, K093, K094, K095, K096, ____, K098 }, \ + { K100, K101, ____, ____, ____, K105, K106, K107, K108 }, \ + { K110, K111, ____, K113, ____, K115, ____, K117, ____ } \ +} + +#define LAYOUT_b_iso( \ + K000, K010, K001, K011, K002, K012, K003, K013, K004, K014, K005, K015, K006, K016, K017, K008, K018, \ + K020, K030, K021, K031, K022, K032, K023, K033, K024, K034, K025, K035, K026, K036, K027, K037, K028, K038, \ + K040, K050, K041, K051, K042, K052, K043, K053, K044, K054, K045, K055, K046, K056, K048, K058, \ + K060, K070, K061, K071, K062, K072, K063, K073, K064, K074, K065, K075, K066, K076, K067, K068, K078, \ + K080, K090, K081, K091, K082, K092, K083, K093, K084, K094, K085, K095, K086, K096, K087, K097, K098, \ + K100, K110, K101, K111, K113, K105, K115, K106, K107, K117, K108 \ +) { \ + { K000, K001, K002, K003, K004, K005, K006, ____, K008 }, \ + { K010, K011, K012, K013, K014, K015, K016, K017, K018 }, \ + { K020, K021, K022, K023, K024, K025, K026, K027, K028 }, \ + { K030, K031, K032, K033, K034, K035, K036, K037, K038 }, \ + { K040, K041, K042, K043, K044, K045, K046, ____, K048 }, \ + { K050, K051, K052, K053, K054, K055, K056, ____, K058 }, \ + { K060, K061, K062, K063, K064, K065, K066, K067, K068 }, \ + { K070, K071, K072, K073, K074, K075, K076, ____, K078 }, \ + { K080, K081, K082, K083, K084, K085, K086, K087, ____ }, \ + { K090, K091, K092, K093, K094, K095, K096, K097, K098 }, \ + { K100, K101, ____, ____, ____, K105, K106, K107, K108 }, \ + { K110, K111, ____, K113, ____, K115, ____, K117, ____ } \ +} + +#define LAYOUT_a_ansi( \ + K000, K010, K001, K011, K002, K012, K003, K013, K004, K014, K005, K015, K006, K016, K017, K008, K018, \ + K020, K030, K021, K031, K022, K032, K023, K033, K024, K034, K025, K035, K026, K036, K027, K037, K028, K038, \ + K040, K050, K041, K051, K042, K052, K043, K053, K044, K054, K045, K055, K046, K056, K047, K048, K058, \ + K060, K070, K061, K071, K062, K072, K063, K073, K064, K074, K065, K075, K066, K067, K068, \ + K080, K090, K091, K082, K092, K083, K093, K084, K094, K085, K095, K086, K096, K097, K098, \ + K100, K110, K101, K111, K113, K105, K115, K116, K107, K117, K118 \ +) { \ + { K000, K001, K002, K003, K004, K005, K006, ____, K008 }, \ + { K010, K011, K012, K013, K014, K015, K016, K017, K018 }, \ + { K020, K021, K022, K023, K024, K025, K026, K027, K028 }, \ + { K030, K031, K032, K033, K034, K035, K036, K037, K038 }, \ + { K040, K041, K042, K043, K044, K045, K046, K047, K048 }, \ + { K050, K051, K052, K053, K054, K055, K056, ____, K058 }, \ + { K060, K061, K062, K063, K064, K065, K066, K067, K068 }, \ + { K070, K071, K072, K073, K074, K075, ____, ____, ____ }, \ + { K080, ____, K082, K083, K084, K085, K086, ____, ____ }, \ + { K090, K091, K092, K093, K094, K095, K096, K097, K098 }, \ + { K100, K101, ____, ____, ____, K105, ____, K107, ____ }, \ + { K110, K111, ____, K113, ____, K115, K116, K117, K118 } \ +} + +#define LAYOUT_a_iso( \ + K000, K010, K001, K011, K002, K012, K003, K013, K004, K014, K005, K015, K006, K016, K017, K008, K018, \ + K020, K030, K021, K031, K022, K032, K023, K033, K024, K034, K025, K035, K026, K036, K027, K037, K028, K038, \ + K040, K050, K041, K051, K042, K052, K043, K053, K044, K054, K045, K055, K046, K056, K048, K058, \ + K060, K070, K061, K071, K062, K072, K063, K073, K064, K074, K065, K075, K066, K076, K067, K068, \ + K080, K090, K081, K091, K082, K092, K083, K093, K084, K094, K085, K095, K086, K096, K097, K098, \ + K100, K110, K101, K111, K113, K105, K115, K116, K107, K117, K118 \ +) { \ + { K000, K001, K002, K003, K004, K005, K006, ____, K008 }, \ + { K010, K011, K012, K013, K014, K015, K016, K017, K018 }, \ + { K020, K021, K022, K023, K024, K025, K026, K027, K028 }, \ + { K030, K031, K032, K033, K034, K035, K036, K037, K038 }, \ + { K040, K041, K042, K043, K044, K045, K046, ____, K048 }, \ + { K050, K051, K052, K053, K054, K055, K056, ____, K058 }, \ + { K060, K061, K062, K063, K064, K065, K066, K067, K068 }, \ + { K070, K071, K072, K073, K074, K075, K076, ____, ____ }, \ + { K080, K081, K082, K083, K084, K085, K086, ____, ____ }, \ + { K090, K091, K092, K093, K094, K095, K096, K097, K098 }, \ + { K100, K101, ____, ____, ____, K105, ____, K107, ____ }, \ + { K110, K111, ____, K113, ____, K115, K116, K117, K118 } \ +} From a8c230743ae3a5721b291558e6fa0e4aac2bc564 Mon Sep 17 00:00:00 2001 From: Pierre Chevalier Date: Sat, 18 Jul 2020 04:57:33 +0100 Subject: [PATCH 397/930] Write firmware for the Ferris keyboard (#9634) * Write firmware for the Ferris keyboard Took inspiration from the gergoplex and the ergodox_ez firmware for the split matrix with io_expander on the right hand. Cleaned up a lot of bit fiddling on the mcu side by taking inspiration from the `split_custom` in quantum. Still bit fiddling on the mcp side as it is particularly natural to do so with the abstractions provided by the i2c protocol. Would be good to clean that up and abstract away the wiring from the generic i2c code in a similar fashion as quantum and the mcp side behave. One improvement over the ergodox_ez and the gergoplex firmwares is that the wiring is straight forward as opposed to swapping rows and columns in two different places that end up cancelling out for some reason. At this stage, I have flashed this firmware to a board and have verified that all keys are behaving as intended by shorting pins. I still have to solder in some switches and test that everything works correctly at normal typing speeds, but I don't expect any major issues given I'm building up on previous effort, including the debouncing code from the ergodox_ez. * Remove rotation from info.json and label the keys as per default keymap * Comply with minor review feedback points * Use CUSTOM_MATRIX=lite to remove boilerplate * Update keyboards/handwired/ferris/info.json Didn't play nicely in the configurator Co-authored-by: Ryan * Remove MIDI_ENABLE from rules.mk Co-authored-by: Ryan * Remove FAUXCLICKY_ENABLE from rules.mk Co-authored-by: Ryan * Prefer wait_ms over _delay_ms Co-authored-by: Ryan * Remove unused include Co-authored-by: Ryan * Remove unused include Co-authored-by: Ryan * Remove unused include Co-authored-by: Ryan * Remove unused includeh Co-authored-by: Ryan * Use dprint over print and remove include for print.h * Remove all unused includes * Remove unused code * Cleanups thanks to code review * Move more personal settings from the ferris config to the default keymap config These setting happen to be unused in the default keymap at the moment, as it has only one layer with no homerow modifiers and no mouse key; but I would like to keep it there for two reasons: * It can serve as an example to people creating their own keymap * I plan to design a more usable default keymap that uses these features once this PR which adds the Ferris keyboard is merged. * Consolidate mcp logic inside matrix.c Co-authored-by: Ryan --- keyboards/handwired/ferris/config.h | 60 ++++ keyboards/handwired/ferris/ferris.c | 17 ++ keyboards/handwired/ferris/ferris.h | 43 +++ keyboards/handwired/ferris/info.json | 54 ++++ .../handwired/ferris/keymaps/default/config.h | 39 +++ .../handwired/ferris/keymaps/default/keymap.c | 39 +++ keyboards/handwired/ferris/matrix.c | 282 ++++++++++++++++++ keyboards/handwired/ferris/readme.md | 16 + keyboards/handwired/ferris/rules.mk | 28 ++ 9 files changed, 578 insertions(+) create mode 100644 keyboards/handwired/ferris/config.h create mode 100644 keyboards/handwired/ferris/ferris.c create mode 100644 keyboards/handwired/ferris/ferris.h create mode 100644 keyboards/handwired/ferris/info.json create mode 100644 keyboards/handwired/ferris/keymaps/default/config.h create mode 100644 keyboards/handwired/ferris/keymaps/default/keymap.c create mode 100644 keyboards/handwired/ferris/matrix.c create mode 100644 keyboards/handwired/ferris/readme.md create mode 100644 keyboards/handwired/ferris/rules.mk diff --git a/keyboards/handwired/ferris/config.h b/keyboards/handwired/ferris/config.h new file mode 100644 index 000000000000..33494d9273cb --- /dev/null +++ b/keyboards/handwired/ferris/config.h @@ -0,0 +1,60 @@ +/* +Copyright 2020 Pierre Chevalier + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License 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 0xC2AB +#define PRODUCT_ID 0x0000 +#define DEVICE_VER 0x0001 +#define MANUFACTURER Pierre +#define PRODUCT Ferris the keeb +#define DESCRIPTION A minimalistic 34 - keys split keyboard + +/* key matrix size */ +#define MATRIX_ROWS 8 +#define MATRIX_COLS 10 + +#define MATRIX_ROWS_PER_SIDE (MATRIX_ROWS / 2) +#define MATRIX_COLS_PER_SIDE (MATRIX_COLS / 2) + +#define UNUSED_MCU 14 +#define UNUSED_MCP 7 + +// wiring +#define MATRIX_ROW_PINS_MCU \ + { B3, B2, B1, F0 } +#define MATRIX_COL_PINS_MCU \ + { D6, D7, B4, B5, B6 } +#define UNUSED_PINS_MCU \ + { B0, B7, C6, C7, D2, D3, D4, D5, E6, F1, F4, F5, F6, F7 } +#define MATRIX_ROW_PINS_MCP \ + { B0, B1, B2, B3 } +#define MATRIX_COL_PINS_MCP \ + { A0, A1, A2, A3, A4 } +#define UNUSED_PINS_MCP \ + { B4, B5, B6, B7, A5, A6, A7 } + +/* COL2ROW, ROW2COL*/ +#define DIODE_DIRECTION COL2ROW + +/* define if matrix has ghost (lacks anti-ghosting diodes) */ +//#define MATRIX_HAS_GHOST + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCE 5 + diff --git a/keyboards/handwired/ferris/ferris.c b/keyboards/handwired/ferris/ferris.c new file mode 100644 index 000000000000..0e132fa9844e --- /dev/null +++ b/keyboards/handwired/ferris/ferris.c @@ -0,0 +1,17 @@ +/* +Copyright 2020 Pierre Chevalier + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ +#include "ferris.h" diff --git a/keyboards/handwired/ferris/ferris.h b/keyboards/handwired/ferris/ferris.h new file mode 100644 index 000000000000..4602637ca63c --- /dev/null +++ b/keyboards/handwired/ferris/ferris.h @@ -0,0 +1,43 @@ +/* +Copyright 2020 Pierre Chevalier + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License 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 + +/* left hand right hand */ +#define LAYOUT(\ + K0_0, K0_1, K0_2, K0_3, K0_4, K0_5, K0_6, K0_7, K0_8, K0_9,\ + K1_0, K1_1, K1_2, K1_3, K1_4, K1_5, K1_6, K1_7, K1_8, K1_9,\ + K2_0, K2_1, K2_2, K2_3, K2_4, K2_5, K2_6, K2_7, K2_8, K2_9,\ + K3_3, K3_4, K3_5, K3_6)\ +/* matrix positions */\ +{\ + {K0_0, K0_1, K0_2, K0_3, K0_4},\ + {K1_0, K1_1, K1_2, K1_3, K1_4},\ + {K2_0, K2_1, K2_2, K2_3, K2_4},\ + {KC_NO, KC_NO, KC_NO, K3_3, K3_4},\ + \ + {K0_5, K0_6, K0_7, K0_8, K0_9},\ + {K1_5, K1_6, K1_7, K1_8, K1_9},\ + {K2_5, K2_6, K2_7, K2_8, K2_9},\ + {K3_5, K3_6, KC_NO, KC_NO, KC_NO}\ +} + +// clang-format on diff --git a/keyboards/handwired/ferris/info.json b/keyboards/handwired/ferris/info.json new file mode 100644 index 000000000000..ffffb58ecf11 --- /dev/null +++ b/keyboards/handwired/ferris/info.json @@ -0,0 +1,54 @@ +{ + "keyboard_name": "Ferris", + "url": "https://github.com/pierrechevalier83/ferris/", + "maintainer": "@pierrec83", + "width": 12, + "height": 4.75, + "layouts": { + "LAYOUT": { + "layout": [ + {"x": 0, "y": 0.93}, + {"x": 1, "y": 0.31}, + {"x": 2, "y": 0}, + {"x": 3, "y": 0.28}, + {"x": 4, "y": 0.42}, + + {"x": 7, "y": 0.42}, + {"x": 8, "y": 0.28}, + {"x": 9, "y": 0}, + {"x": 10, "y": 0.31}, + {"x": 11, "y": 0.93}, + + {"x": 0, "y": 1.93}, + {"x": 1, "y": 1.31}, + {"x": 2, "y": 1}, + {"x": 3, "y": 1.28}, + {"x": 4, "y": 1.42}, + + {"x": 7, "y": 1.42}, + {"x": 8, "y": 1.28}, + {"x": 9, "y": 1}, + {"x": 10, "y": 1.31}, + {"x": 11, "y": 1.93}, + + {"x": 0, "y": 2.93}, + {"x": 1, "y": 2.31}, + {"x": 2, "y": 2}, + {"x": 3, "y": 2.28}, + {"x": 4, "y": 2.42}, + + {"x": 7, "y": 2.42}, + {"x": 8, "y": 2.28}, + {"x": 9, "y": 2}, + {"x": 10, "y": 2.31}, + {"x": 11, "y": 2.93}, + + {"x": 3.5, "y": 3.75}, + {"x": 4.5, "y": 4}, + + {"x": 6.5, "y": 4}, + {"x": 7.5, "y": 3.75} + ] + } + } +} diff --git a/keyboards/handwired/ferris/keymaps/default/config.h b/keyboards/handwired/ferris/keymaps/default/config.h new file mode 100644 index 000000000000..cf0fb7478ef0 --- /dev/null +++ b/keyboards/handwired/ferris/keymaps/default/config.h @@ -0,0 +1,39 @@ +/* +Copyright 2020 Pierre Chevalier + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#pragma once +// Set the mouse settings to a comfortable speed/accuracy trade-off, +// assuming a screen refresh rate of 60 Htz or higher +// The default is 50. This makes the mouse ~3 times faster and more accurate +#define MOUSEKEY_INTERVAL 16 +// The default is 20. Since we made the mouse about 3 times faster with the previous setting, +// give it more time to accelerate to max speed to retain precise control over short distances. +#define MOUSEKEY_TIME_TO_MAX 40 +// The default is 300. Let's try and make this as low as possible while keeping the cursor responsive +#define MOUSEKEY_DELAY 100 +// It makes sense to use the same delay for the mouseweel +#define MOUSEKEY_WHEEL_DELAY 100 +// The default is 100 +#define MOUSEKEY_WHEEL_INTERVAL 50 +// The default is 40 +#define MOUSEKEY_WHEEL_TIME_TO_MAX 100 + +// Pick good defaults for enabling homerow modifiers +#define TAPPING_TERM 200 +#define PERMISSIVE_HOLD +#define IGNORE_MOD_TAP_INTERRUPT +#define TAPPING_FORCE_HOLD diff --git a/keyboards/handwired/ferris/keymaps/default/keymap.c b/keyboards/handwired/ferris/keymaps/default/keymap.c new file mode 100644 index 000000000000..faf5203e7d50 --- /dev/null +++ b/keyboards/handwired/ferris/keymaps/default/keymap.c @@ -0,0 +1,39 @@ +/* +Copyright 2020 Pierre Chevalier + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public 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 template at the bottom +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +/* Keymap 0: 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 | < | > | ? | + * `-----+-----+-----+-----+-----+--. ,-+-----------------------------' + * | BSPC | SPC | | SPC | ENT | + * '------------' '-----------' + */ +[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, KC_SCLN, + KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, + KC_BSPC, KC_SPC, KC_SPC, KC_ENT) +}; diff --git a/keyboards/handwired/ferris/matrix.c b/keyboards/handwired/ferris/matrix.c new file mode 100644 index 000000000000..e13c35d358b9 --- /dev/null +++ b/keyboards/handwired/ferris/matrix.c @@ -0,0 +1,282 @@ +/* +Copyright 2013 Oleg Kostyuk + 2020 Pierre Chevalier + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +/* + * This code was heavily inspired by the ergodox_ez keymap, and modernized + * to take advantage of the quantum.h microcontroller agnostics gpio control + * abstractions and use the macros defined in config.h for the wiring as opposed + * to repeating that information all over the place. + */ + +#include QMK_KEYBOARD_H +#include "i2c_master.h" + +extern i2c_status_t mcp23017_status; +#define I2C_TIMEOUT 1000 + +// For a better understanding of the i2c protocol, this is a good read: +// https://www.robot-electronics.co.uk/i2c-tutorial + +// I2C address: +// See the datasheet, section 3.3.1 on addressing I2C devices and figure 3-6 for an +// illustration +// http://ww1.microchip.com/downloads/en/devicedoc/20001952c.pdf +// All address pins of the mcp23017 are connected to the ground on the ferris +// | 0 | 1 | 0 | 0 | A2 | A1 | A0 | +// | 0 | 1 | 0 | 0 | 0 | 0 | 0 | +#define I2C_ADDR 0b0100000 +#define I2C_ADDR_WRITE ((I2C_ADDR << 1) | I2C_WRITE) +#define I2C_ADDR_READ ((I2C_ADDR << 1) | I2C_READ) + +// Register addresses +// See https://github.com/adafruit/Adafruit-MCP23017-Arduino-Library/blob/master/Adafruit_MCP23017.h +#define IODIRA 0x00 // i/o direction register +#define IODIRB 0x01 +#define GPPUA 0x0C // GPIO pull-up resistor register +#define GPPUB 0x0D +#define GPIOA 0x12 // general purpose i/o port register (write modifies OLAT) +#define GPIOB 0x13 +#define OLATA 0x14 // output latch register +#define OLATB 0x15 + +bool i2c_initialized = 0; +i2c_status_t mcp23017_status = I2C_ADDR; + +uint8_t init_mcp23017(void) { + print("starting init"); + mcp23017_status = I2C_ADDR; + + // I2C subsystem + if (i2c_initialized == 0) { + i2c_init(); // on pins D(1,0) + i2c_initialized = true; + wait_ms(I2C_TIMEOUT); + } + + // set pin direction + // - unused : input : 1 + // - input : input : 1 + // - driving : output : 0 + mcp23017_status = i2c_start(I2C_ADDR_WRITE, I2C_TIMEOUT); + if (mcp23017_status) goto out; + mcp23017_status = i2c_write(IODIRA, I2C_TIMEOUT); + if (mcp23017_status) goto out; + // This means: we will read all the bits on GPIOA + mcp23017_status = i2c_write(0b11111111, I2C_TIMEOUT); + if (mcp23017_status) goto out; + // This means: we will write to the pins 0-4 on GPIOB (in select_rows) + mcp23017_status = i2c_write(0b11110000, I2C_TIMEOUT); + if (mcp23017_status) goto out; + i2c_stop(); + + // set pull-up + // - unused : on : 1 + // - input : on : 1 + // - driving : off : 0 + mcp23017_status = i2c_start(I2C_ADDR_WRITE, I2C_TIMEOUT); + if (mcp23017_status) goto out; + mcp23017_status = i2c_write(GPPUA, I2C_TIMEOUT); + if (mcp23017_status) goto out; + // This means: we will read all the bits on GPIOA + mcp23017_status = i2c_write(0b11111111, I2C_TIMEOUT); + if (mcp23017_status) goto out; + // This means: we will write to the pins 0-4 on GPIOB (in select_rows) + mcp23017_status = i2c_write(0b11110000, I2C_TIMEOUT); + if (mcp23017_status) goto out; + +out: + i2c_stop(); + return mcp23017_status; +} + +/* matrix state(1:on, 0:off) */ +static matrix_row_t matrix[MATRIX_ROWS]; // debounced values + +static matrix_row_t read_cols(uint8_t row); +static void init_cols(void); +static void unselect_rows(void); +static void select_row(uint8_t row); + +static uint8_t mcp23017_reset_loop; + +void matrix_init_custom(void) { + // initialize row and col + + mcp23017_status = init_mcp23017(); + + unselect_rows(); + init_cols(); + + // initialize matrix state: all keys off + for (uint8_t i = 0; i < MATRIX_ROWS; i++) { + matrix[i] = 0; + } +} + +void matrix_power_up(void) { + mcp23017_status = init_mcp23017(); + + unselect_rows(); + init_cols(); + + // initialize matrix state: all keys off + for (uint8_t i = 0; i < MATRIX_ROWS; i++) { + matrix[i] = 0; + } +} + +// Reads and stores a row, returning +// whether a change occurred. +static inline bool store_matrix_row(matrix_row_t current_matrix[], uint8_t index) { + matrix_row_t temp = read_cols(index); + if (current_matrix[index] != temp) { + current_matrix[index] = temp; + return true; + } + return false; +} + +bool matrix_scan_custom(matrix_row_t current_matrix[]) { + if (mcp23017_status) { // if there was an error + if (++mcp23017_reset_loop == 0) { + // if (++mcp23017_reset_loop >= 1300) { + // since mcp23017_reset_loop is 8 bit - we'll try to reset once in 255 matrix scans + // this will be approx bit more frequent than once per second + dprint("trying to reset mcp23017\n"); + mcp23017_status = init_mcp23017(); + if (mcp23017_status) { + dprint("right side not responding\n"); + } else { + dprint("right side attached\n"); + } + } + } + + bool changed = false; + for (uint8_t i = 0; i < MATRIX_ROWS_PER_SIDE; i++) { + // select rows from left and right hands + uint8_t left_index = i; + uint8_t right_index = i + MATRIX_ROWS_PER_SIDE; + select_row(left_index); + select_row(right_index); + + // we don't need a 30us delay anymore, because selecting a + // left-hand row requires more than 30us for i2c. + + changed |= store_matrix_row(current_matrix, left_index); + changed |= store_matrix_row(current_matrix, right_index); + + unselect_rows(); + } + + return changed; +} + +static void init_cols(void) { + // init on mcp23017 + // not needed, already done as part of init_mcp23017() + + // init on mcu + pin_t matrix_col_pins_mcu[MATRIX_COLS_PER_SIDE] = MATRIX_COL_PINS_MCU; + for (int pin_index = 0; pin_index < MATRIX_COLS_PER_SIDE; pin_index++) { + pin_t pin = matrix_col_pins_mcu[pin_index]; + setPinInput(pin); + writePinHigh(pin); + } +} + +static matrix_row_t read_cols(uint8_t row) { + if (row < MATRIX_ROWS_PER_SIDE) { + pin_t matrix_col_pins_mcu[MATRIX_COLS_PER_SIDE] = MATRIX_COL_PINS_MCU; + matrix_row_t current_row_value = 0; + // For each col... + for (uint8_t col_index = 0; col_index < MATRIX_COLS_PER_SIDE; col_index++) { + // Select the col pin to read (active low) + uint8_t pin_state = readPin(matrix_col_pins_mcu[col_index]); + + // Populate the matrix row with the state of the col pin + current_row_value |= pin_state ? 0 : (MATRIX_ROW_SHIFTER << col_index); + } + return current_row_value; + } else { + if (mcp23017_status) { // if there was an error + return 0; + } else { + uint8_t data = 0; + mcp23017_status = i2c_start(I2C_ADDR_WRITE, I2C_TIMEOUT); + if (mcp23017_status) goto out; + mcp23017_status = i2c_write(GPIOA, I2C_TIMEOUT); + if (mcp23017_status) goto out; + mcp23017_status = i2c_start(I2C_ADDR_READ, I2C_TIMEOUT); + if (mcp23017_status) goto out; + mcp23017_status = i2c_read_nack(I2C_TIMEOUT); + if (mcp23017_status < 0) goto out; + // We read all the pins on GPIOA. + // The initial state was all ones and any depressed key at a given column for the currently selected row will have its bit flipped to zero. + // The return value is a row as represented in the generic matrix code were the rightmost bits represent the lower columns and zeroes represent non-depressed keys while ones represent depressed keys. + // Since the pins connected to eact columns are sequential, and counting from zero up (col 5 -> GPIOA0, col 6 -> GPIOA1 and so on), the only transformation needed is a bitwise not to swap all zeroes and ones. + data = ~((uint8_t)mcp23017_status); + mcp23017_status = I2C_STATUS_SUCCESS; + out: + i2c_stop(); + // return reverse_bits(data, MATRIX_COLS_PER_SIDE); + return data; + } + } +} + +static void unselect_rows(void) { + // no need to unselect on mcp23017, because the select step sets all + // the other row bits high, and it's not changing to a different + // direction + + // unselect rows on microcontroller + pin_t matrix_row_pins_mcu[MATRIX_ROWS_PER_SIDE] = MATRIX_ROW_PINS_MCU; + for (int pin_index = 0; pin_index < MATRIX_ROWS_PER_SIDE; pin_index++) { + pin_t pin = matrix_row_pins_mcu[pin_index]; + setPinInput(pin); + writePinLow(pin); + } +} + +static void select_row(uint8_t row) { + if (row < MATRIX_ROWS_PER_SIDE) { + // select on atmega32u4 + pin_t matrix_row_pins_mcu[MATRIX_ROWS_PER_SIDE] = MATRIX_ROW_PINS_MCU; + pin_t pin = matrix_row_pins_mcu[row]; + setPinOutput(pin); + writePinLow(pin); + } else { + // select on mcp23017 + if (mcp23017_status) { // if there was an error + // do nothing + } else { + mcp23017_status = i2c_start(I2C_ADDR_WRITE, I2C_TIMEOUT); + if (mcp23017_status) goto out; + mcp23017_status = i2c_write(GPIOB, I2C_TIMEOUT); + if (mcp23017_status) goto out; + // Select the desired row by writing a byte for the entire GPIOB bus where only the bit representing the row we want to select is a zero (write instruction) and every other bit is a one. + // Note that the row - MATRIX_ROWS_PER_SIDE reflects the fact that being on the right hand, the columns are numbered from MATRIX_ROWS_PER_SIDE to MATRIX_ROWS, but the pins we want to write to are indexed from zero up on the GPIOB bus. + mcp23017_status = i2c_write(0xFF & ~(1 << (row - MATRIX_ROWS_PER_SIDE)), I2C_TIMEOUT); + + if (mcp23017_status) goto out; + out: + i2c_stop(); + } + } +} diff --git a/keyboards/handwired/ferris/readme.md b/keyboards/handwired/ferris/readme.md new file mode 100644 index 000000000000..23aeca874c54 --- /dev/null +++ b/keyboards/handwired/ferris/readme.md @@ -0,0 +1,16 @@ +# Ferris + +![Ferris, top view](https://imgur.com/V4QuaGs.jpg) +![Ferris, bottom view](https://i.imgur.com/7DJYME8.jpg) + +A split 34 keys column staggered keyboard named and decorated after the rustlang mascott. All PCB files and some thoughts on the design are available on the [project's github page](https://github.com/pierrechevalier83/ferris) + +* Keyboard Maintainer: [Pierre Chevalier](https://github.com/pierrechevalier83) +* Hardware Supported: Ferris PCB +* Hardware Availability: Still in prototype stage + +Make example for this keyboard (after setting up your build environment): + + make handwired/ferris: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/ferris/rules.mk b/keyboards/handwired/ferris/rules.mk new file mode 100644 index 000000000000..8645dbba0dc7 --- /dev/null +++ b/keyboards/handwired/ferris/rules.mk @@ -0,0 +1,28 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +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 +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = no # Commands for debug and configuration +# 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 +BLUETOOTH_ENABLE = no # Enable Bluetooth +AUDIO_ENABLE = no # Audio output +UNICODE_ENABLE = yes +CUSTOM_MATRIX = lite +NO_USB_STARTUP_CHECK = yes +LTO_ENABLE = yes + +SRC += matrix.c +QUANTUM_LIB_SRC += i2c_master.c From 82dcb173386be1a5dc867401dca63cde6d0e8121 Mon Sep 17 00:00:00 2001 From: umi <57262844+umi-umi@users.noreply.github.com> Date: Sat, 18 Jul 2020 17:47:12 +0900 Subject: [PATCH 398/930] [Docs] Japanese translation of docs/feature_debounce_type.md (#9524) * add feature_debounce_type.md translation * update based on comment * update based on comment --- docs/ja/feature_debounce_type.md | 47 ++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 docs/ja/feature_debounce_type.md diff --git a/docs/ja/feature_debounce_type.md b/docs/ja/feature_debounce_type.md new file mode 100644 index 000000000000..2d874b7565cd --- /dev/null +++ b/docs/ja/feature_debounce_type.md @@ -0,0 +1,47 @@ +# デバウンスアルゴリズム + + + +QMK はデバウンス API を介して複数のデバウンスアルゴリズムをサポートします。 + +どのデバウンスメソッドが呼ばれるかのロジックは下記のとおりです。rules.mk で設定された様々な定義をチェックします。 + +``` +DEBOUNCE_DIR:= $(QUANTUM_DIR)/debounce +DEBOUNCE_TYPE?= sym_g +ifneq ($(strip $(DEBOUNCE_TYPE)), custom) + QUANTUM_SRC += $(DEBOUNCE_DIR)/$(strip $(DEBOUNCE_TYPE)).c +endif +``` + +# デバウンスの選択 + +| DEBOUNCE_TYPE | 説明 | 他に必要なもの | +| ------------- | --------------------------------------------------- | ----------------------------- | +| 未定義 | デフォルトのアルゴリズム、現在のところ sym_g を使います | 無し | +| custom | 独自のデバウンスコードを使います | ```SRC += debounce.c``` で独自の debounce.c を追加し、必要な関数を実装します | +| anything_else | quantum/debounce/* から他のアルゴリズムを使います | 無し | + +**分割キーボードについて**: +デバウンスコードは分割キーボードと互換性があります。 + +# 独自のデバウンスコードの使用 +* ```DEBOUNCE_TYPE = custom``` を設定します。 +* ```SRC += debounce.c``` を追加します。 +* 独自の ```debounce.c``` を追加します。例については、```quantum/debounce``` にある現在の実装をみてください。 +* 毎回のマトリクススキャンの結果はその度デバウンスによって処理されます。 +* MATRIX_ROWS ではなく num_rows を使って、分割キーボードが正しくサポートされるようにします。 + +# インクルードされているデバウンスメソッド間での切り替え +独自の debounce.c をインクルードすることで独自のコードを使うか、またはインクルードされている他のコードに切り替えることができます。 +含まれるデバウンスメソッドは以下の通りです: +* eager_pr - 行ごとにデバウンスします。状態が変化すると、応答は即座に行われ、その後その行は ```DEBOUNCE``` ミリ秒の間入力されません。 +```NUM_KEYS``` の 8ビットカウンタの更新に高い計算コストがかかる、もしくは低スキャンレートのキーボード用で、各指は通常一度に1行しか叩かないようになっています。これは ErgoDox モデルに適しています; マトリックスは90度回転しているため、その「行」は実際には「列」であり、通常の使用では各指は一度に1つの「行」にしか当たりません。 +* eager_pk - キーごとにデバウンスします。状態が変化すると、応答は即座に行われ、その後そのキーは ```DEBOUNCE``` ミリ秒の間入力されません。 +* sym_g - キーボードごとにデバウンスします。状態が変化すると、グローバルタイマが設定されます。```DEBOUNCE``` ミリ秒の間何も変化がなければ、全ての入力の変更がプッシュされます。 +* sym_pk - キーごとにデバウンスします。状態が変化すると、キーごとのタイマーが設定されます。```DEBOUNCE``` ミリ秒の間そのキーに変化がなければ、キーの状態の変更がプッシュされます。 + + From c4d778a302462929ba71a4746afa1f21f10922c2 Mon Sep 17 00:00:00 2001 From: Drashna Jaelre Date: Sat, 18 Jul 2020 13:24:23 -0700 Subject: [PATCH 399/930] [Docs] Update ISP Guide (#9748) * [Doc] Update ISP Guide Correct the fuses for Caterina, and make the `:production` command more obvious. * fix casing before fauxpark catches it --- docs/isp_flashing_guide.md | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/docs/isp_flashing_guide.md b/docs/isp_flashing_guide.md index 8ee5a40d9e8d..9a65fe1154d7 100644 --- a/docs/isp_flashing_guide.md +++ b/docs/isp_flashing_guide.md @@ -141,7 +141,9 @@ To do this manually: ?> 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: +#### Create QMK DFU Bootloader and Production images + +You can create the firmware, the QMK DFU Bootloader and the production firmware images for the board using the `:production` target when compiling. Once this is done, you'll see three files: * `_.hex` * `__bootloader.hex` * `__production.hex` @@ -236,12 +238,12 @@ For Caterina on the `atmega32u4`, these are the fuse settings that you want: | Fuse | Setting| |----------|--------| | Low | `0xFF` | -| High | `0xD9` | -| Extended | `0xC3` | +| High | `0xD8` | +| Extended | `0xCB` | -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: +To set this add `-U lfuse:w:0xFF:m -U hfuse:w:0xD8:m -U efuse:w:0xCB: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 + 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:0xCB: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. From 57f408cff59435381f57900c054ba96710a30b3a Mon Sep 17 00:00:00 2001 From: Joshua Rubin Date: Sun, 19 Jul 2020 20:25:30 -0600 Subject: [PATCH 400/930] ensure hhkb runs matrix_init_quantum (#9629) --- keyboards/hhkb/ansi/matrix.c | 14 ++++++++------ keyboards/hhkb/jp/matrix.c | 14 ++++++++------ 2 files changed, 16 insertions(+), 12 deletions(-) diff --git a/keyboards/hhkb/ansi/matrix.c b/keyboards/hhkb/ansi/matrix.c index f22e69f6b024..879eb337cfaa 100644 --- a/keyboards/hhkb/ansi/matrix.c +++ b/keyboards/hhkb/ansi/matrix.c @@ -69,15 +69,17 @@ void matrix_init(void) for (uint8_t i=0; i < MATRIX_ROWS; i++) _matrix1[i] = 0x00; matrix = _matrix0; matrix_prev = _matrix1; -} -__attribute__ ((weak)) -void matrix_scan_user(void) { + matrix_init_quantum(); } -void matrix_scan_kb(void) { - matrix_scan_user(); -} +__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) {} uint8_t matrix_scan(void) { diff --git a/keyboards/hhkb/jp/matrix.c b/keyboards/hhkb/jp/matrix.c index 437356af6d26..fed2b3c3a92e 100644 --- a/keyboards/hhkb/jp/matrix.c +++ b/keyboards/hhkb/jp/matrix.c @@ -69,15 +69,17 @@ void matrix_init(void) for (uint8_t i=0; i < MATRIX_ROWS; i++) _matrix1[i] = 0x00; matrix = _matrix0; matrix_prev = _matrix1; -} -__attribute__ ((weak)) -void matrix_scan_user(void) { + matrix_init_quantum(); } -void matrix_scan_kb(void) { - matrix_scan_user(); -} +__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) {} uint8_t matrix_scan(void) { From 2e08c72e956748996544a0c3071632427994ed67 Mon Sep 17 00:00:00 2001 From: Nico Cesar Date: Mon, 20 Jul 2020 10:41:21 -0400 Subject: [PATCH 401/930] Update onekey proton_c readme (#9758) A3 won't work. The code says A1 and A2 and it works. prints out an "a" --- keyboards/handwired/onekey/proton_c/readme.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/keyboards/handwired/onekey/proton_c/readme.md b/keyboards/handwired/onekey/proton_c/readme.md index 0feedbbd46a2..be5a2871ca20 100644 --- a/keyboards/handwired/onekey/proton_c/readme.md +++ b/keyboards/handwired/onekey/proton_c/readme.md @@ -1,3 +1,3 @@ # Proton C onekey -To trigger keypress, short together pins *A3* and *A2*. +To trigger keypress, short together pins *A1* and *A2*. From 19006c9753e490bf5e0136e59476530e345c4a8a Mon Sep 17 00:00:00 2001 From: nathanvercaemert <50712356+nathanvercaemert@users.noreply.github.com> Date: Mon, 20 Jul 2020 19:28:38 -0400 Subject: [PATCH 402/930] Implemented New MK_COMBINED Functionality (#9557) * implemented new mousekey_combined functionality * minor formatting change to documentation * Update tmk_core/common/mousekey.c Co-authored-by: Ryan * Update tmk_core/common/mousekey.c Co-authored-by: Ryan * Update tmk_core/common/mousekey.c Co-authored-by: Ryan * Update tmk_core/common/mousekey.c Co-authored-by: Ryan * Update docs/feature_mouse_keys.md Co-authored-by: Nick Brassel * Update docs/feature_mouse_keys.md Co-authored-by: Nick Brassel * Update docs/feature_mouse_keys.md Co-authored-by: Nick Brassel * Update docs/feature_mouse_keys.md Co-authored-by: Nick Brassel Co-authored-by: Nathan Vercaemert Co-authored-by: Ryan Co-authored-by: Nick Brassel --- docs/feature_mouse_keys.md | 22 +++++++++++- tmk_core/common/mousekey.c | 72 ++++++++++++++++++++++++++++++-------- 2 files changed, 78 insertions(+), 16 deletions(-) diff --git a/docs/feature_mouse_keys.md b/docs/feature_mouse_keys.md index 88a2c7c05e54..a6b46bc151f3 100644 --- a/docs/feature_mouse_keys.md +++ b/docs/feature_mouse_keys.md @@ -39,10 +39,11 @@ In your keymap you can use the following keycodes to map key presses to mouse ac ## Configuring mouse keys -Mouse keys supports two different modes to move the cursor: +Mouse keys supports three different modes to move the cursor: * **Accelerated (default):** Holding movement keys accelerates the cursor until it reaches its maximum speed. * **Constant:** Holding movement keys moves the cursor at constant speeds. +* **Combined:** Holding movement keys accelerates the cursor until it reaches its maximum speed, but holding acceleration and movement keys simultaneously moves the cursor at constant speeds. The same principle applies to scrolling. @@ -120,3 +121,22 @@ Use the following settings if you want to adjust cursor movement or scrolling: |`MK_W_INTERVAL_1` |120 |Time between scroll steps (`KC_ACL1`) | |`MK_W_OFFSET_2` |1 |Scroll steps per scroll action (`KC_ACL2`) | |`MK_W_INTERVAL_2` |20 |Time between scroll steps (`KC_ACL2`) | + +### Combined mode + +This mode functions like **Accelerated** mode, however, you can hold `KC_ACL0`, `KC_ACL1` and `KC_ACL2` +to momentarily (while held) set the cursor and scroll speeds to constant speeds. When no acceleration +keys are held, this mode is identical to **Accelerated** mode, and can be modified using all of the +relevant settings. + +* **KC_ACL0:** This acceleration sets your cursor to the slowest possible speed. This is useful for very +small and detailed movements of the cursor. +* **KC_ACL1:** This acceleration sets your cursor to half the maximum (user defined) speed. +* **KC_ACL2:** This acceleration sets your cursor to the maximum (computer defined) speed. This is +useful for moving the cursor large distances without much accuracy. + +To use constant speed mode, you must at least define `MK_COMBINED` in your keymap’s `config.h` file: + +```c +#define MK_COMBINED +``` diff --git a/tmk_core/common/mousekey.c b/tmk_core/common/mousekey.c index 74fa88abdddc..661384d65198 100644 --- a/tmk_core/common/mousekey.c +++ b/tmk_core/common/mousekey.c @@ -1,19 +1,19 @@ /* -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 . -*/ + * 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 "keycode.h" @@ -66,6 +66,8 @@ uint8_t mk_wheel_interval = MOUSEKEY_WHEEL_INTERVAL; uint8_t mk_wheel_max_speed = MOUSEKEY_WHEEL_MAX_SPEED; uint8_t mk_wheel_time_to_max = MOUSEKEY_WHEEL_TIME_TO_MAX; +#ifndef MK_COMBINED + static uint8_t move_unit(void) { uint16_t unit; if (mousekey_accel & (1 << 0)) { @@ -102,6 +104,46 @@ static uint8_t wheel_unit(void) { return (unit > MOUSEKEY_WHEEL_MAX ? MOUSEKEY_WHEEL_MAX : (unit == 0 ? 1 : unit)); } +#else /* #ifndef MK_COMBINED */ + +static uint8_t move_unit(void) { + uint16_t unit; + if (mousekey_accel & (1 << 0)) { + unit = 1; + } else if (mousekey_accel & (1 << 1)) { + unit = (MOUSEKEY_MOVE_DELTA * mk_max_speed) / 2; + } else if (mousekey_accel & (1 << 2)) { + unit = MOUSEKEY_MOVE_MAX; + } else if (mousekey_repeat == 0) { + unit = MOUSEKEY_MOVE_DELTA; + } else if (mousekey_repeat >= mk_time_to_max) { + unit = MOUSEKEY_MOVE_DELTA * mk_max_speed; + } else { + unit = (MOUSEKEY_MOVE_DELTA * mk_max_speed * mousekey_repeat) / mk_time_to_max; + } + return (unit > MOUSEKEY_MOVE_MAX ? MOUSEKEY_MOVE_MAX : (unit == 0 ? 1 : unit)); +} + +static uint8_t wheel_unit(void) { + uint16_t unit; + if (mousekey_accel & (1 << 0)) { + unit = 1; + } else if (mousekey_accel & (1 << 1)) { + unit = (MOUSEKEY_WHEEL_DELTA * mk_wheel_max_speed) / 2; + } else if (mousekey_accel & (1 << 2)) { + unit = MOUSEKEY_WHEEL_MAX; + } else if (mousekey_repeat == 0) { + unit = MOUSEKEY_WHEEL_DELTA; + } else if (mousekey_repeat >= mk_wheel_time_to_max) { + unit = MOUSEKEY_WHEEL_DELTA * mk_wheel_max_speed; + } else { + unit = (MOUSEKEY_WHEEL_DELTA * mk_wheel_max_speed * mousekey_repeat) / mk_wheel_time_to_max; + } + return (unit > MOUSEKEY_WHEEL_MAX ? MOUSEKEY_WHEEL_MAX : (unit == 0 ? 1 : unit)); +} + +#endif /* #ifndef MK_COMBINED */ + void mousekey_task(void) { // report cursor and scroll movement independently report_mouse_t const tmpmr = mouse_report; From 1778858e24ddf7527ba37014e991fb95eb9689a3 Mon Sep 17 00:00:00 2001 From: QMK Bot Date: Tue, 21 Jul 2020 00:09:52 +0000 Subject: [PATCH 403/930] format code according to conventions [skip ci] --- tmk_core/common/mousekey.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tmk_core/common/mousekey.c b/tmk_core/common/mousekey.c index 661384d65198..42bf231f4c19 100644 --- a/tmk_core/common/mousekey.c +++ b/tmk_core/common/mousekey.c @@ -66,7 +66,7 @@ uint8_t mk_wheel_interval = MOUSEKEY_WHEEL_INTERVAL; uint8_t mk_wheel_max_speed = MOUSEKEY_WHEEL_MAX_SPEED; uint8_t mk_wheel_time_to_max = MOUSEKEY_WHEEL_TIME_TO_MAX; -#ifndef MK_COMBINED +# ifndef MK_COMBINED static uint8_t move_unit(void) { uint16_t unit; @@ -104,7 +104,7 @@ static uint8_t wheel_unit(void) { return (unit > MOUSEKEY_WHEEL_MAX ? MOUSEKEY_WHEEL_MAX : (unit == 0 ? 1 : unit)); } -#else /* #ifndef MK_COMBINED */ +# else /* #ifndef MK_COMBINED */ static uint8_t move_unit(void) { uint16_t unit; @@ -142,7 +142,7 @@ static uint8_t wheel_unit(void) { return (unit > MOUSEKEY_WHEEL_MAX ? MOUSEKEY_WHEEL_MAX : (unit == 0 ? 1 : unit)); } -#endif /* #ifndef MK_COMBINED */ +# endif /* #ifndef MK_COMBINED */ void mousekey_task(void) { // report cursor and scroll movement independently From 58c31f563236bb594b17c07b382ee51d3315237a Mon Sep 17 00:00:00 2001 From: shela Date: Wed, 22 Jul 2020 01:30:33 +0900 Subject: [PATCH 404/930] fixed alt text for images. (#9781) --- docs/ja/getting_started_github.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/ja/getting_started_github.md b/docs/ja/getting_started_github.md index 24a217c74598..d0148a3ceec9 100644 --- a/docs/ja/getting_started_github.md +++ b/docs/ja/getting_started_github.md @@ -2,7 +2,7 @@ GitHub は慣れていない人には少し注意が必要です - このガイドは、QMK におけるフォーク、クローン、プルリクエストのサブミットの各ステップについて説明します。 @@ -11,11 +11,11 @@ GitHub は慣れていない人には少し注意が必要です - このガイ [QMK GitHub ページ](https://github.com/qmk/qmk_firmware)を開くと、右上に "Fork" というボタンが見えます: -![Git でのフォーク](http://i.imgur.com/8Toomz4.jpg) +![GitHub でのフォーク](http://i.imgur.com/8Toomz4.jpg) あなたが組織の一員である場合は、どのアカウントにフォークするかを選択する必要があります。ほとんどの場合、あなたの個人のアカウントにフォークしたいでしょう。フォークが完了したら(しばらく時間が掛かる場合があります)、"Clone or Download" ボタンをクリックします: -![Git からダウンロード](http://i.imgur.com/N1NYcSz.jpg) +![GitHub からダウンロード](http://i.imgur.com/N1NYcSz.jpg) 必ず "HTTPS" を選択し、リンクを選択してコピーします: From 43b21cffe068f0591b9c9ecbf677a463a93747a7 Mon Sep 17 00:00:00 2001 From: ladbahuy <67696967+ladbahuy@users.noreply.github.com> Date: Wed, 22 Jul 2020 04:30:20 +0700 Subject: [PATCH 405/930] Update rartpad via keymap (#9747) --- keyboards/rart/rartpad/keymaps/via/keymap.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/keyboards/rart/rartpad/keymaps/via/keymap.c b/keyboards/rart/rartpad/keymaps/via/keymap.c index 121eacca1660..986ba68137e8 100644 --- a/keyboards/rart/rartpad/keymaps/via/keymap.c +++ b/keyboards/rart/rartpad/keymaps/via/keymap.c @@ -34,3 +34,19 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { _______, _______, _______, _______ ) }; + +void encoder_update_user(uint8_t index, bool clockwise) { + if (index == 0) { /* First encoder */ + if (clockwise) { + tap_code(KC_WH_U); + } else { + tap_code(KC_WH_D); + } + } else if (index == 1) { /* Second encoder */ + if (clockwise) { + tap_code(KC_VOLU); + } else { + tap_code(KC_VOLD); + } + } +} From 8c8a320e9251b6f306ab473377280bc23e64b9c0 Mon Sep 17 00:00:00 2001 From: Alabahuy Date: Wed, 22 Jul 2020 04:31:16 +0700 Subject: [PATCH 406/930] Add via support for rart75 (#9746) * Update info.json * Create rules.mk * Create keymap.c --- keyboards/rart/rart75/info.json | 8 ++-- keyboards/rart/rart75/keymaps/via/keymap.c | 51 ++++++++++++++++++++++ keyboards/rart/rart75/keymaps/via/rules.mk | 2 + 3 files changed, 57 insertions(+), 4 deletions(-) create mode 100644 keyboards/rart/rart75/keymaps/via/keymap.c create mode 100644 keyboards/rart/rart75/keymaps/via/rules.mk diff --git a/keyboards/rart/rart75/info.json b/keyboards/rart/rart75/info.json index 970913769424..9bf7f8d86022 100644 --- a/keyboards/rart/rart75/info.json +++ b/keyboards/rart/rart75/info.json @@ -58,7 +58,7 @@ {"label" : "Caps lock", "x":0, "y":3.25, "w":1.75}, {"label" : "A", "x":1.75, "y":3.25}, - {"label" : "S", "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}, @@ -83,7 +83,7 @@ {"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, "y":4.5}, + {"label" : "Up", "x":14.25, "y":4.5}, {"label" : "End", "x":15.5, "y":4.25}, {"label" : "Ctrl", "x":0, "y":5.25, "w":1.25}, @@ -153,7 +153,7 @@ {"label" : "Caps lock", "x":0, "y":3.25, "w":1.75}, {"label" : "A", "x":1.75, "y":3.25}, - {"label" : "S", "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}, @@ -178,7 +178,7 @@ {"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, "y":4.5}, + {"label" : "Up", "x":14.25, "y":4.5}, {"label" : "End", "x":15.5, "y":4.25}, {"label" : "Ctrl", "x":0, "y":5.25, "w":1.25}, diff --git a/keyboards/rart/rart75/keymaps/via/keymap.c b/keyboards/rart/rart75/keymaps/via/keymap.c new file mode 100644 index 000000000000..aad420e7251f --- /dev/null +++ b/keyboards/rart/rart75/keymaps/via/keymap.c @@ -0,0 +1,51 @@ +#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_INS, KC_MPLY, + 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_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_LGUI, KC_LALT, KC_SPC, KC_SPC, KC_SPC, KC_RALT, MO(1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT + ), + + [1] = LAYOUT_all( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, 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_all( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + + [3] = LAYOUT_all( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ) + +}; + +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); + } + } +} diff --git a/keyboards/rart/rart75/keymaps/via/rules.mk b/keyboards/rart/rart75/keymaps/via/rules.mk new file mode 100644 index 000000000000..36b7ba9cbc98 --- /dev/null +++ b/keyboards/rart/rart75/keymaps/via/rules.mk @@ -0,0 +1,2 @@ +VIA_ENABLE = yes +LTO_ENABLE = yes From 5e812cc4bea41688a7dd7cfc228cc5bc0cf23617 Mon Sep 17 00:00:00 2001 From: dsanchezseco Date: Tue, 21 Jul 2020 23:45:21 +0200 Subject: [PATCH 407/930] Add keyboard Punk75 (#9731) * start of punk75 keyboard * preliminary code for the punk75 keyboard * readme * changes to work with USBasp * changed cols and added configurable led * set LED's pin as output * changed led to new port and added rotary encoders * added code for rotary encoders * fixed col pins * fixed encoder orientation * added delay for tap_code so encoder works as intended * added preliminary keymap for mine * personal keymap for punk75 * personal keymap for punk75 * Apply suggestions from code review Co-authored-by: Joel Challis * Apply suggestions from code review Co-authored-by: Ryan * fixed image * Apply suggestions from code review Co-authored-by: Ryan Co-authored-by: Joel Challis Co-authored-by: Ryan --- keyboards/punk75/config.h | 72 ++++++++++++++ keyboards/punk75/info.json | 92 ++++++++++++++++++ keyboards/punk75/keymaps/default/config.h | 20 ++++ keyboards/punk75/keymaps/default/keymap.c | 95 +++++++++++++++++++ keyboards/punk75/keymaps/default/readme.md | 1 + .../punk75/keymaps/dsanchezseco/config.h | 20 ++++ .../punk75/keymaps/dsanchezseco/keymap.c | 85 +++++++++++++++++ .../punk75/keymaps/dsanchezseco/readme.md | 1 + keyboards/punk75/punk75.c | 32 +++++++ keyboards/punk75/punk75.h | 43 +++++++++ keyboards/punk75/readme.md | 21 ++++ keyboards/punk75/rules.mk | 28 ++++++ 12 files changed, 510 insertions(+) create mode 100644 keyboards/punk75/config.h create mode 100644 keyboards/punk75/info.json create mode 100644 keyboards/punk75/keymaps/default/config.h create mode 100644 keyboards/punk75/keymaps/default/keymap.c create mode 100644 keyboards/punk75/keymaps/default/readme.md create mode 100644 keyboards/punk75/keymaps/dsanchezseco/config.h create mode 100644 keyboards/punk75/keymaps/dsanchezseco/keymap.c create mode 100644 keyboards/punk75/keymaps/dsanchezseco/readme.md create mode 100644 keyboards/punk75/punk75.c create mode 100644 keyboards/punk75/punk75.h create mode 100644 keyboards/punk75/readme.md create mode 100644 keyboards/punk75/rules.mk diff --git a/keyboards/punk75/config.h b/keyboards/punk75/config.h new file mode 100644 index 000000000000..76d620b2223e --- /dev/null +++ b/keyboards/punk75/config.h @@ -0,0 +1,72 @@ +/* +Copyright 2020 dsanchezseco + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License 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 0xDEED +#define PRODUCT_ID 0x0001 +#define DEVICE_VER 0x0001 +#define MANUFACTURER dsanchezseco +#define PRODUCT punk75 + +/* 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 { D6, D5, C1, C0, D7 } +#define MATRIX_COL_PINS { C2, C3, C6, C5, C4, A7, A6, A5, A4, B4, A3, B3, A2, B2, A1 } +#define LED A0 + +#define ENCODERS_PAD_A { D0, B1} +#define ENCODERS_PAD_B { D1, B0 } + +#define UNUSED_PINS { C7 } + +/* COL2ROW, ROW2COL*/ +#define DIODE_DIRECTION COL2ROW + +#define USB_MAX_POWER_CONSUMPTION 500 + +/* 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 + +/* disable these deprecated features by default */ +#define NO_ACTION_MACRO +#define NO_ACTION_FUNCTION diff --git a/keyboards/punk75/info.json b/keyboards/punk75/info.json new file mode 100644 index 000000000000..61af224316f4 --- /dev/null +++ b/keyboards/punk75/info.json @@ -0,0 +1,92 @@ +{ + "keyboard_name": "punk75", + "url": "", + "maintainer": "dsanchezseco", + "width": 15, + "height": 5, + "layouts": { + "LAYOUT_ortho_5x15": { + "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}, + {"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":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":12, "y":2}, + {"x":13, "y":2}, + {"x":14, "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}, + {"x":12, "y":3}, + {"x":13, "y":3}, + {"x":14, "y":3}, + + {"x":0, "y":4}, + {"x":1, "y":4}, + {"x":2, "y":4}, + {"x":3, "y":4}, + {"x":4, "y":4}, + {"x":5, "y":4}, + {"x":6, "y":4}, + {"x":7, "y":4}, + {"x":8, "y":4}, + {"x":9, "y":4}, + {"x":10, "y":4}, + {"x":11, "y":4}, + {"x":12, "y":4}, + {"x":13, "y":4}, + {"x":14, "y":4} + ] + } + } +} diff --git a/keyboards/punk75/keymaps/default/config.h b/keyboards/punk75/keymaps/default/config.h new file mode 100644 index 000000000000..3c0a98d4cc01 --- /dev/null +++ b/keyboards/punk75/keymaps/default/config.h @@ -0,0 +1,20 @@ +/* Copyright 2020 dsanchezseco + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License 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 TAP_CODE_DELAY 10 diff --git a/keyboards/punk75/keymaps/default/keymap.c b/keyboards/punk75/keymaps/default/keymap.c new file mode 100644 index 000000000000..fe4e87ccec1b --- /dev/null +++ b/keyboards/punk75/keymaps/default/keymap.c @@ -0,0 +1,95 @@ +/* Copyright 2020 dsanchezseco + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public 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] = { +/* QWERTY + * .--------------------------------------------------------------------------------------------------------------------------------------. + * | 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 | DEL | PG UP | H | J | K | L | ; | ENTER | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------------------------+--------| + * | LSHIFT | Z | X | C | V | B | END | UP | PG DN | N | M | , | . | / | RSHIFT | + * |--------+--------+--------+--------+--------+-----------------+--------+--------+--------+--------+-----------------+--------+--------| + * | LCTRL | LGUI | LALT | FN | SPACE | SPACE | LEFT | DOWN | RIGHT | SPACE | SPACE | FN | RALT | RGUI | RCTRL | + * '--------------------------------------------------------------------------------------------------------------------------------------' + */ + + [_BASE] = LAYOUT_ortho_5x15( /* QWERTY */ + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_MINS, KC_GRV, 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_BSLS, 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_DEL, 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_UP, KC_PGDN, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, + KC_LCTL, KC_LGUI, KC_LALT, MO(_FN), KC_SPC, KC_SPC, KC_LEFT, KC_DOWN, KC_RGHT, KC_SPC, KC_SPC, MO(_FN), KC_RALT, KC_RGUI, KC_RCTL + ), + +/* FUNCTION + * .--------------------------------------------------------------------------------------------------------------------------------------. + * | F1 | F2 | F3 | F4 | F5 | F6 | NUM LK | P/ | P* | F7 | F8 | F9 | F10 | F11 | F12 | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + * | SELECT | CALC | MYCOMP | MAIL | RGB HD | RGB HI | P7 | P8 | P9 | - | | | PR SCR | SCR LK | PAUSE | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + * | PREV | PLAY | NEXT | STOP | RGB SD | RGB SI | P4 | P5 | P6 | + | | RESET | | | | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + * | VOL- | MUTE | VOL+ | APP | RGB VD | RGB VI | P1 | P2 | P3 | PENT | | | | | | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + * | | | RGB TG | FN | RGB RMD| RGB MD | P0 | | P. | PENT | PENT | FN | | | | + * '--------------------------------------------------------------------------------------------------------------------------------------' + */ + + [_FN] = LAYOUT_ortho_5x15( /* FUNCTION */ + KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_NLCK, KC_SLSH, KC_ASTR, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, + KC_MSEL, KC_CALC, KC_MYCM, KC_MAIL, RGB_HUD, RGB_HUI, KC_P7, KC_P8, KC_P9, KC_MINS, _______, _______, KC_PSCR, KC_SLCK, KC_PAUS, + KC_MPRV, KC_MPLY, KC_MNXT, KC_MSTP, RGB_SAD, RGB_SAI, KC_P4, KC_P5, KC_P6, KC_PLUS, _______, RESET, _______, _______, _______, + KC_VOLD, KC_MUTE, KC_VOLU, KC_APP, RGB_VAD, RGB_VAI, KC_P1, KC_P2, KC_P3, KC_PENT, _______, _______, _______, _______, _______, + _______, _______, RGB_TOG, MO(_FN), RGB_RMOD,RGB_MOD, KC_P0, _______, KC_PDOT, KC_PENT, KC_PENT, MO(_FN), _______, _______, _______ + ) +}; + +void led_keypress_update(pin_t led_pin, uint16_t keycode, keyrecord_t *record) { + // When a key is pressed turn on the LED, when released turn it off + writePin(led_pin, record->event.pressed); +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + // Update LED state + led_keypress_update(LED, keycode, record); + return true; +} + +void encoder_update_user(uint8_t index, bool clockwise) { + if (index == 0) { /* Encoder on the LEFT */ + if (clockwise) { + tap_code(KC_VOLU); + } else { + tap_code(KC_VOLD); + } + } else if (index == 1) { /* Encoder on the RIGHT */ + if (clockwise) { + tap_code(KC_VOLU); + } else { + tap_code(KC_VOLD); + } + } +} diff --git a/keyboards/punk75/keymaps/default/readme.md b/keyboards/punk75/keymaps/default/readme.md new file mode 100644 index 000000000000..963571e93549 --- /dev/null +++ b/keyboards/punk75/keymaps/default/readme.md @@ -0,0 +1 @@ +# The default keymap for punk75 diff --git a/keyboards/punk75/keymaps/dsanchezseco/config.h b/keyboards/punk75/keymaps/dsanchezseco/config.h new file mode 100644 index 000000000000..3c0a98d4cc01 --- /dev/null +++ b/keyboards/punk75/keymaps/dsanchezseco/config.h @@ -0,0 +1,20 @@ +/* Copyright 2020 dsanchezseco + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License 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 TAP_CODE_DELAY 10 diff --git a/keyboards/punk75/keymaps/dsanchezseco/keymap.c b/keyboards/punk75/keymaps/dsanchezseco/keymap.c new file mode 100644 index 000000000000..3c224b162817 --- /dev/null +++ b/keyboards/punk75/keymaps/dsanchezseco/keymap.c @@ -0,0 +1,85 @@ +/* Copyright 2020 dsanchezseco + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public 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 ESC_CTL LCTL_T(KC_ESC) + +// Defines names for use in layer keycodes and the keymap +enum layer_names { + _DVORAK, + _QWERTY, + _FN +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [_DVORAK] = LAYOUT_ortho_5x15( /* DVORAK */ + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_GRV, KC_BSLS, KC_EQL, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MUTE, + KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_LBRC, KC_PSCR, KC_RBRC, KC_F, KC_G, KC_C, KC_R, KC_L, KC_SLSH, + ESC_CTL, KC_A, KC_O, KC_E, KC_U, KC_I, KC_HOME, KC_MNXT, KC_PGUP, 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_END, KC_MPLY, KC_PGDN, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_SFTENT, + KC_LCTL, KC_LGUI, KC_LALT, _______, MO(_FN), KC_SPC, KC_SPC, KC_MPRV, KC_BSPC, KC_BSPC, MO(_FN), _______, KC_RALT, KC_RGUI, KC_RCTL + ), + + [_QWERTY] = LAYOUT_ortho_5x15( /* QWERTY */ + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_GRV, KC_BSLS, KC_EQL, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MUTE, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_LBRC, KC_PSCR, KC_RBRC, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_SLSH, + ESC_CTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_HOME, KC_MNXT, KC_PGUP, 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_END, KC_MPLY, KC_PGDN, KC_N, KC_M, KC_COMM, KC_DOT, KC_MINS, KC_SFTENT, + KC_LCTL, KC_LGUI, KC_LALT, _______, MO(_FN), KC_SPC, KC_SPC, KC_MPRV, KC_BSPC, KC_BSPC, MO(_FN), _______, KC_RALT, KC_RGUI, KC_RCTL + ), + + [_FN] = LAYOUT_ortho_5x15( /* FUNCTION */ + KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, DF(_QWERTY), _______, DF(_DVORAK), KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_RIGHT, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_LEFT, _______, _______, _______, _______, + _______, _______, _______, KC_DOWN, KC_UP, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, MO(_FN), _______, _______, _______, KC_DEL, KC_DEL, MO(_FN), _______, _______, _______, _______ + ) + +}; + +bool led_update_user(led_t led_state) { + // disable keyboard level handling + return false; +} + +void led_keypress_update(pin_t led_pin, uint16_t keycode, keyrecord_t *record) { + // When a key is pressed turn on the LED, when released turn it off + writePin(led_pin, record->event.pressed); +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + // Update LED state + led_keypress_update(LED, keycode, record); + return true; +} + +void encoder_update_user(uint8_t index, bool clockwise) { + if (index == 0) { /* Encoder on the LEFT */ + if (clockwise) { + tap_code(KC_VOLU); + } else { + tap_code(KC_VOLD); + } + } else if (index == 1) { /* Encoder on the RIGHT */ + if (clockwise) { + tap_code(KC_VOLU); + } else { + tap_code(KC_VOLD); + } + } +} diff --git a/keyboards/punk75/keymaps/dsanchezseco/readme.md b/keyboards/punk75/keymaps/dsanchezseco/readme.md new file mode 100644 index 000000000000..cb3c40fa0823 --- /dev/null +++ b/keyboards/punk75/keymaps/dsanchezseco/readme.md @@ -0,0 +1 @@ +# dsanchezseco keymap for punk75 diff --git a/keyboards/punk75/punk75.c b/keyboards/punk75/punk75.c new file mode 100644 index 000000000000..045e3c26695e --- /dev/null +++ b/keyboards/punk75/punk75.c @@ -0,0 +1,32 @@ +/* Copyright 2020 dsanchezseco + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#include "punk75.h" + +void matrix_init_kb(void) { + // Set our LED pin as output + setPinOutput(LED); + + matrix_init_user(); +} + +bool led_update_kb(led_t led_state) { + bool res = led_update_user(led_state); + if(res) { + writePin(LED, !led_state.caps_lock); + } + return res; +} diff --git a/keyboards/punk75/punk75.h b/keyboards/punk75/punk75.h new file mode 100644 index 000000000000..6e89e5d2a7ef --- /dev/null +++ b/keyboards/punk75/punk75.h @@ -0,0 +1,43 @@ +/* Copyright 2020 dsanchezseco + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License 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_5x15( \ + k01, k06, k11, k16, k21, k26, k31, k36, k41, k46, k51, k56, k61, k66, k71, \ + k02, k07, k12, k17, k22, k27, k32, k37, k42, k47, k52, k57, k62, k67, k72, \ + k03, k08, k13, k18, k23, k28, k33, k38, k43, k48, k53, k58, k63, k68, k73, \ + k04, k09, k14, k19, k24, k29, k34, k39, k44, k49, k54, k59, k64, k69, k74, \ + k05, k10, k15, k20, k25, k30, k35, k40, k45, k50, k55, k60, k65, k70, k75 \ +) { \ + { k01, k06, k11, k16, k21, k26, k31, k36, k41, k46, k51, k56, k61, k66, k71 }, \ + { k02, k07, k12, k17, k22, k27, k32, k37, k42, k47, k52, k57, k62, k67, k72 }, \ + { k03, k08, k13, k18, k23, k28, k33, k38, k43, k48, k53, k58, k63, k68, k73 }, \ + { k04, k09, k14, k19, k24, k29, k34, k39, k44, k49, k54, k59, k64, k69, k74 }, \ + { k05, k10, k15, k20, k25, k30, k35, k40, k45, k50, k55, k60, k65, k70, k75 } \ +} + +//TODO: other layouts with the 2u keys diff --git a/keyboards/punk75/readme.md b/keyboards/punk75/readme.md new file mode 100644 index 000000000000..31fe45fb61a2 --- /dev/null +++ b/keyboards/punk75/readme.md @@ -0,0 +1,21 @@ +# punk75 + +![punk75](https://github.com/dsanchezseco/punk75/raw/master/generated/images/punk75_front.jpg) + +[Punk75](https://github.com/dsanchezseco/punk75) is an 75-key ortho keyboard with all its components being hand-solderable (through hole). + +More info, BOM list and build guide [here](https://github.com/dsanchezseco/punk75) + +* Keyboard Maintainer: [dsanchezseco](https://github.com/dsanchezseco) +* Hardware Supported: ATmega32A-PU +* Hardware Availability: None (yet) source it yourself ;) + +Make example for this keyboard (after setting up your build environment): + + make punk75:default + +Flashing example for this keyboard: + + make punk75: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). diff --git a/keyboards/punk75/rules.mk b/keyboards/punk75/rules.mk new file mode 100644 index 000000000000..b9084ba5e2cd --- /dev/null +++ b/keyboards/punk75/rules.mk @@ -0,0 +1,28 @@ +# MCU name +MCU = atmega32a + +# Processor frequency +F_CPU = 16000000 + +# Bootloader selection +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 +BLUETOOTH_ENABLE = no # Enable Bluetooth +AUDIO_ENABLE = no # Audio output +ENCODER_ENABLE = yes # Enable rotary encoders support + +LAYOUTS = ortho_5x15 From 3f96b88e73ea72474d841c1318c62b570f4aaf34 Mon Sep 17 00:00:00 2001 From: Matthew Lyon Date: Tue, 21 Jul 2020 17:08:56 -0700 Subject: [PATCH 408/930] mattly goes windows (#9677) * mattly's userspace and iris * [Keymap] mattly's windows overlays * biton32->get_highest_layer * few more small tweaks --- keyboards/keebio/iris/keymaps/mattly/keymap.c | 52 ++++++++------ users/mattly/config.h | 3 - users/mattly/mattly.c | 31 ++++---- users/mattly/mattly.h | 72 +++++++++++-------- users/mattly/rules.mk | 3 +- 5 files changed, 96 insertions(+), 65 deletions(-) diff --git a/keyboards/keebio/iris/keymaps/mattly/keymap.c b/keyboards/keebio/iris/keymaps/mattly/keymap.c index b7713a014647..4c1057062f5b 100644 --- a/keyboards/keebio/iris/keymaps/mattly/keymap.c +++ b/keyboards/keebio/iris/keymaps/mattly/keymap.c @@ -5,14 +5,22 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [_QWERTY] = LAYOUT( + [_BASE_MAC] = LAYOUT( KC_DEL, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_ESC, - KC_BSPC, KC_Q, W_CTRL, E_ALT, R_GUI, KC_T, KC_Y, U_GUI, I_ALT, O_CTRL, KC_P, KC_SCLN, - KC_CAPS, A_CTRL, S_ALT, D_GUI, F_SHFT, KC_G, KC_H, J_SHFT, K_GUI, L_ALT, MINSCTL, KC_QUOT, + KC_BSPC, KC_Q, W_CTL, E_ALT, R_GUI, KC_T, KC_Y, U_GUI, I_ALT, O_CTL, KC_P, KC_SCLN, + KC_CAPS, A_CTL, S_ALT, D_GUI, F_SFT, KC_G, KC_H, J_SFT, K_GUI, L_ALT, MINSCTL, KC_QUOT, NAVLOCK, KC_Z, KC_X, KC_C, KC_V, KC_B, ENT_SYM, TAB_NUM, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT, ESC_HYP, TAB_NUM, SPC_SFT, SPC_SFT, BSP_SYM, DEL_WRP ), + [_OVER_WIN] = LAYOUT( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, W_GUI, _______, R_CTL, _______, _______, U_CTL, _______, O_GUI, _______, _______, + _______, A_GUI, _______, D_CTL, _______, _______, _______, _______, K_CTL, _______, MINSGUI, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______ + ), + [_SYMBOL] = LAYOUT( _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_AMPR, KC_GRV, KC_TILD, KC_LBRC, KC_RBRC, KC_LABK, KC_RABK, KC_PLUS, KC_ASTR, XXXXXXX, _______, @@ -22,29 +30,33 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), [_NAVNUM] = LAYOUT( - XNOTIFY, XXXXXXX, XPRVSPC, NWIN, XNXTSPC, XXXXXXX, XXXXXXX, KC_SLSH, KC_ASTR, KC_MINS, KC_PLUS, XXXXXXX, - XALLWIN, NAVFWD, BWORD, KC_UP, FWORD, KC_PGUP, KC_DLR, KC_P7, KC_P8, KC_P9, KC_DOT, XXXXXXX, - XDESKTP, NAVBACK, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGDN, KC_PERC, KC_P4, KC_P5, KC_P6, KC_EQL, XXXXXXX, - _______, PTAB, KC_HOME, PWIN, KC_END, NTAB, _______, _______, KC_P0, KC_P1, KC_P2, KC_P3, KC_COMM, _______, + XXXXXXX, XXXXXXX, XXXXXXX, M_NXWIN, XXXXXXX, XXXXXXX, XXXXXXX, KC_SLSH, KC_ASTR, KC_MINS, KC_PLUS, XXXXXXX, + XXXXXXX, M_NAVFW, M_BWORD, KC_UP, M_FWORD, KC_PGUP, KC_DLR, KC_P7, KC_P8, KC_P9, KC_DOT, XXXXXXX, + XXXXXXX, M_NAVBK, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGDN, KC_PERC, KC_P4, KC_P5, KC_P6, KC_EQL, XXXXXXX, + _______, M_PVTAB, KC_HOME, M_PVWIN, KC_END, M_NXTAB, _______, _______, KC_P0, KC_P1, KC_P2, KC_P3, KC_COMM, _______, _______, _______, _______, _______, _______, KC_P0 ), + [_NAVNUM_WIN] = LAYOUT( + _______, _______, _______, W_NXWIN, _______, _______, _______, _______, _______, _______, _______, _______, + _______, W_NAVFW, W_BWORD, _______, W_FWORD, _______, _______, _______, _______, _______, _______, _______, + _______, W_NAVBK, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, W_PVTAB, _______, W_PVWIN, _______, W_NXTAB, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______ + ), [_FUNCT] = LAYOUT( 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, XALLWIN, XPRVSPC, NWIN, XNXTSPC, XDESKTP, XXXXXXX, RGB_TOG, RGB_M_P, RGB_M_B, RGB_M_K, RESET, - DEBUG, XNOTIFY, PTAB, PWIN, NTAB, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + RESET, XXXXXXX, XXXXXXX, M_NXWIN, XXXXXXX, XXXXXXX, XXXXXXX, RGB_TOG, RGB_M_P, RGB_M_B, RGB_M_K, RESET, + DEBUG, XXXXXXX, M_PVTAB, M_PVWIN, M_NXTAB, XXXXXXX, XXXXXXX, TOG_WIN, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_MUTE, KC_VOLD, KC_VOLU, KC_MRWD, KC_MFFD, KC_MPLY, _______, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, _______, _______, _______, _______, _______ - ) + ), +[_FUNCT_WIN] = LAYOUT( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, W_NXWIN, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, W_PVTAB, W_PVWIN, W_NXTAB, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______ + ), }; -void encoder_update_user(uint8_t index, bool clockwise) { - if (index == 0) { - if (clockwise) { - tap_code(KC_MS_WH_UP); - } else { - tap_code(KC_MS_WH_DOWN); - } - } -} - diff --git a/users/mattly/config.h b/users/mattly/config.h index 25d379801126..0f7ce4a64bab 100644 --- a/users/mattly/config.h +++ b/users/mattly/config.h @@ -1,8 +1,5 @@ #pragma once -// Most tactile encoders have detents every 4 stages -#define ENCODER_RESOLUTION 4 - #define IGNORE_MOD_TAP_INTERRUPT #define PERMISSIVE_HOLD #define TAPPING_TOGGLE 2 diff --git a/users/mattly/mattly.c b/users/mattly/mattly.c index 1e61e01265d0..d097c8cd7b02 100644 --- a/users/mattly/mattly.c +++ b/users/mattly/mattly.c @@ -5,48 +5,51 @@ layer_state_t layer_state_set_keymap (layer_state_t state) { return state; } +static uint16_t current_state = 0; + void set_lights_default(void) { #ifdef RGBLIGHT_ENABLE if (IS_HOST_LED_ON(USB_LED_CAPS_LOCK)) { rgblight_sethsv_noeeprom(HSV_CAPS); } else { - rgblight_sethsv_noeeprom(HSV_DEFAULT); + if (current_state == _BASE_MAC) { + rgblight_sethsv_noeeprom(HSV_MAC); + } else if (current_state == _OVER_WIN) { + rgblight_sethsv_noeeprom(HSV_WIN); + } } #endif } void layer_state_set_rgb(layer_state_t state) { #ifdef RGBLIGHT_ENABLE - switch (biton32(state)) { - case _QWERTY: - set_lights_default(); - break; + switch (get_highest_layer(state)) { case _SYMBOL: rgblight_sethsv_noeeprom(HSV_SYMBOL); break; case _NAVNUM: + case _NAVNUM_WIN: rgblight_sethsv_noeeprom(HSV_NAVNUM); break; case _FUNCT: + case _FUNCT_WIN: rgblight_sethsv_noeeprom(HSV_FUNCT); break; + default: + set_lights_default(); } #endif } - layer_state_t layer_state_set_user (layer_state_t state) { state = update_tri_layer_state(state, _SYMBOL, _NAVNUM, _FUNCT); + state = update_tri_layer_state(state, _OVER_WIN, _NAVNUM, _NAVNUM_WIN); + state = update_tri_layer_state(state, _OVER_WIN, _FUNCT, _FUNCT_WIN); + current_state = get_highest_layer(state); layer_state_set_rgb(state); return layer_state_set_keymap (state); } -void on_reset(void) { - #ifdef RGBLIGHT_ENABLE - rgblight_sethsv_noeeprom(HSV_RESET); - #endif -} - bool process_record_user(uint16_t keycode, keyrecord_t *record) { switch (keycode) { case KC_CAPS: @@ -55,7 +58,9 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { #endif return true; case RESET: - on_reset(); + #ifdef RGBLIGHT_ENABLE + rgblight_sethsv_noeeprom(HSV_RESET); + #endif return true; default: return true; diff --git a/users/mattly/mattly.h b/users/mattly/mattly.h index da09ddcdb268..5f6b7c5f0926 100644 --- a/users/mattly/mattly.h +++ b/users/mattly/mattly.h @@ -20,12 +20,18 @@ #include "quantum.h" enum { - _QWERTY, + _BASE_MAC, + _OVER_WIN, _NAVNUM, + _NAVNUM_WIN, _SYMBOL, _FUNCT, + _FUNCT_WIN, }; +// == System +#define TOG_WIN TG(_OVER_WIN) + // == Thumbs // left hand #define ESC_HYP MT(MOD_HYPR, KC_ESC) @@ -33,7 +39,6 @@ enum { #define SPC_SFT MT(MOD_LSFT, KC_SPC) #define ENT_SYM LT(_SYMBOL, KC_ENT) - // right hand #define SPC_SFT MT(MOD_LSFT, KC_SPC) #define BSP_SYM LT(_SYMBOL, KC_BSPC) @@ -45,52 +50,63 @@ enum { // == QWERTY // left hand home row -#define A_CTRL MT(MOD_LCTL, KC_A) -#define S_ALT MT(MOD_LALT, KC_S) -#define D_GUI MT(MOD_LGUI, KC_D) -#define F_SHFT MT(MOD_LSFT, KC_F) +#define A_CTL MT(MOD_LCTL, KC_A) +#define A_GUI MT(MOD_LGUI, KC_A) +#define S_ALT MT(MOD_LALT, KC_S) +#define D_GUI MT(MOD_LGUI, KC_D) +#define D_CTL MT(MOD_LCTL, KC_D) +#define F_SFT MT(MOD_LSFT, KC_F) // left hand aux -#define W_CTRL MT(MOD_LCTL, KC_W) +#define W_CTL MT(MOD_LCTL, KC_W) +#define W_GUI MT(MOD_LGUI, KC_W) #define E_ALT MT(MOD_LALT, KC_E) #define R_GUI MT(MOD_LGUI, KC_R) +#define R_CTL MT(MOD_LCTL, KC_R) // right hand home row -#define J_SHFT MT(MOD_RSFT, KC_J) +#define J_SFT MT(MOD_RSFT, KC_J) #define K_GUI MT(MOD_RGUI, KC_K) +#define K_CTL MT(MOD_RCTL, KC_K) #define L_ALT MT(MOD_RALT, KC_L) #define MINSCTL MT(MOD_RCTL, KC_MINS) +#define MINSGUI MT(MOD_RGUI, KC_MINS) // right hand aux #define U_GUI MT(MOD_RGUI, KC_U) +#define U_CTL MT(MOD_RCTL, KC_U) #define I_ALT MT(MOD_RALT, KC_I) -#define O_CTRL MT(MOD_RCTL, KC_O) +#define O_CTL MT(MOD_RCTL, KC_O) +#define O_GUI MT(MOD_RGUI, KC_O) // == OS X default keys // movement by word -#define BWORD LALT(KC_LEFT) -#define FWORD LALT(KC_RIGHT) +#define M_BWORD LALT(KC_LEFT) +#define W_BWORD LCTL(KC_LEFT) +#define M_FWORD LALT(KC_RIGHT) +#define W_FWORD LCTL(KC_RIGHT) // gui navigation -#define NWIN LGUI(KC_GRV) // Next Window -#define PWIN LGUI(LSFT(KC_GRV)) // Prev Window -#define NTAB LGUI(LSFT(KC_RBRC)) // Next Tab -#define PTAB LGUI(LSFT(KC_LBRC)) // Prev Tab -#define NAVBACK LGUI(KC_LBRC) // Navigate Forward -#define NAVFWD LGUI(KC_RBRC) // Navigate Back - -// my personal mappings to window manager commands -#define XALLWIN HYPR(KC_F14) -#define XDESKTP HYPR(KC_F15) -#define XNXTSPC HYPR(KC_F16) -#define XPRVSPC HYPR(KC_F17) -#define XNOTIFY HYPR(KC_F18) +#define M_NXWIN LGUI(KC_GRV) // Next Window +#define W_NXWIN LALT(KC_TAB) +#define M_PVWIN LGUI(LSFT(KC_GRV)) // Prev Window +#define W_PVWIN LALT(LSFT(KC_TAB)) +#define M_NXTAB LGUI(LSFT(KC_RBRC)) // Next Tab +#define W_NXTAB LCTL(KC_PGDN) +#define M_PVTAB LGUI(LSFT(KC_LBRC)) // Prev Tab +#define W_PVTAB LCTL(KC_PGUP) +#define M_NAVBK LGUI(KC_LBRC) // Navigate Forward +#define W_NAVBK LALT(KC_LEFT) +#define M_NAVFW LGUI(KC_RBRC) // Navigate Back +#define W_NAVFW LALT(KC_RIGHT) // == UNDERGLOW #ifdef RGBLIGHT_ENABLE -#define HSV_CAPS 60, 255, 255 -#define HSV_DEFAULT 30, 255, 255 -#define HSV_SYMBOL 18, 255, 255 +#define HSV_CAPS 55, 255, 255 +#define HSV_ERR 30, 196, 196 +#define HSV_MAC 20, 255, 128 +#define HSV_WIN 10, 255, 128 +#define HSV_SYMBOL 235, 255, 255 #define HSV_NAVNUM 250, 255, 255 -#define HSV_FUNCT 238, 255, 255 +#define HSV_FUNCT 210, 255, 255 #define HSV_RESET 180, 255, 255 #endif diff --git a/users/mattly/rules.mk b/users/mattly/rules.mk index 6803d361d858..85cdcc91f003 100644 --- a/users/mattly/rules.mk +++ b/users/mattly/rules.mk @@ -1,2 +1,3 @@ SRC += mattly.c -MOUSEKEY_ENABLE = yes +LTO_ENABLE = yes +CONSOLE_ENABLE = yes From 3f0292d726c08d428ce9a16298739f4d2ced1b9f Mon Sep 17 00:00:00 2001 From: umi <57262844+umi-umi@users.noreply.github.com> Date: Wed, 22 Jul 2020 11:06:27 +0900 Subject: [PATCH 409/930] [Docs] Japanese translation of docs/cli_development.md (#9699) * add cli_development.md translation * update based on comment * update based on comment * update based on comment --- docs/ja/cli_development.md | 223 +++++++++++++++++++++++++++++++++++++ 1 file changed, 223 insertions(+) create mode 100644 docs/ja/cli_development.md diff --git a/docs/ja/cli_development.md b/docs/ja/cli_development.md new file mode 100644 index 000000000000..47262213aea6 --- /dev/null +++ b/docs/ja/cli_development.md @@ -0,0 +1,223 @@ +# QMK CLI 開発 + + + +このドキュメントは、新しい `qmk` サブコマンドを書きたい開発者に役立つ情報が含まれています。 + +# 概要 + +QMK CLI は git で有名になったサブコマンドパターンを使って動作します。メインの `qmk` スクリプトは単に環境をセットアップし、実行する正しいエントリポイントを選択するためにあります。各サブコマンドは、何らかのアクションを実行しシェルのリターンコード、または None を返すエントリーポイント (`@cli.subcommand()` で修飾されます)を備えた自己完結型のモジュールです。 + +## 開発者モード: + +キーボードを保守、あるいは QMK に貢献したい場合は、CLI の「開発者」モードを有効にすることができます: + +`qmk config user.developer=True` + +これにより利用可能な全てのサブコマンドが表示されます。 +**注意:** 追加で必要なものをインストールする必要があります: +```bash +python3 -m pip install -r requirements-dev.txt +``` + +# サブコマンド + +[MILC](https://github.com/clueboard/milc) は、`qmk` が引数の解析、設定、ログ、およびほかの多くの機能を処理するために使用する CLI フレームワークです。グルーコードを書くために時間を無駄にすることなく、ツールの作成に集中できます。 + +ローカル CLI 内のサブコマンドは、常に `qmk_firmware/lib/python/qmk/cli` で見つかります。 + +サブコマンドの例を見てみましょう。これは `lib/python/qmk/cli/hello.py` です: + +```python +"""QMK Python Hello World + +This is an example QMK CLI script. +""" +from milc import cli + + +@cli.argument('-n', '--name', default='World', help='Name to greet.') +@cli.subcommand('QMK Hello World.') +def hello(cli): + """Log a friendly greeting. + """ + cli.log.info('Hello, %s!', cli.config.hello.name) +``` + +最初に `milc` から `cli` をインポートします。これが、ユーザとやり取りをし、スクリプトの挙動を制御する方法です。`@cli.argument()` を使って、コマンドラインフラグ `--name` を定義します。これは、ユーザが設定できる `hello.name` (そして対応する `user.name`) という名前の設定変数も作成し、引数を指定する必要が無くなります。`cli.subcommand()` デコレータは、この関数をサブコマンドとして指定します。サブコマンドの名前は関数の名前から取られます。 + +関数の中に入ると、典型的な "Hello, World!" プログラムが見つかります。`cli.log` を使って、基礎となる [ロガーオブジェクト](https://docs.python.org/3.6/library/logging.html#logger-objects) にアクセスし、その挙動はユーザが制御できます。またユーザが指定した名前の値に `cli.config.hello.name` でアクセスします。`cli.config.hello.name` の値は、ユーザが指定した `--name` 引数を調べることで決定されます。指定されていない場合、`qmk.ini` 設定ファイルの中の値が使われ、どちらも指定されていない場合は `cli.argument()` デコレータで指定されたデフォルトが代用されます。 + +# ユーザとの対話処理 + +MILC と QMK CLI にはユーザとやり取りするための幾つかの便利なツールがあります。これらの標準ツールを使うと、テキストに色を付けて対話し易くし、ユーザはその情報をいつどのように表示および保存するかを制御することができます。 + +## テキストの表示 + +サブコマンド内でテキストを出力するための2つの主な方法があります- `cli.log` と `cli.echo()`。それらは似た方法で動作しますが、ほとんどの一般的な目的の出力には `cli.log.info()` を使うことをお勧めします。 + +特別なトークンを使用してテキストを色付けし、プログラムの出力を理解しやすくすることができます。以下の[テキストの色付け](#colorizing-text)を見てください。 + +これらの両方の方法は python の [printf 形式の文字列書式化](https://docs.python.org/3.6/library/stdtypes.html#old-string-formatting) を使った組み込みの文字列書式化をサポートします。テキスト文字列内で`%s` と `%d` のようなトークンを使い、引数で値を渡すことができます。例として、上記の Hello、World プログラムを見てください。 + +書式演算子 (`%`) を直接使わないでください、常に引数で値を渡します。 + +### ログ (`cli.log`) + +`cli.log` オブジェクトは[ロガーオブジェクト](https://docs.python.org/3.6/library/logging.html#logger-objects)へのアクセスを与えます。ログ出力を設定し、ユーザに各ログレベルの素敵な絵文字(またはターミナルが unicode をサポートしない場合はログレベル名)を表示します。このようにして、ユーザは何か問題が発生した時に最も重要なメッセージを一目で確認することができます。 + +デフォルトのログレベルは `INFO` です。ユーザが `qmk -v ` を実行すると、デフォルトのログレベルは `DEBUG` に設定されます。 + +| 関数 | 絵文字 | +|----------|-------| +| cli.log.critical | `{bg_red}{fg_white}¬_¬{style_reset_all}` | +| cli.log.error | `{fg_red}☒{style_reset_all}` | +| cli.log.warning | `{fg_yellow}⚠{style_reset_all}` | +| cli.log.info | `{fg_blue}Ψ{style_reset_all}` | +| cli.log.debug | `{fg_cyan}☐{style_reset_all}` | +| cli.log.notset | `{style_reset_all}¯\\_(o_o)_/¯` | + +### 出力 (`cli.echo`) + +場合によっては単にログシステムの外部でテキストを出力する必要があります。これは、固定データを出力したり、ログに記録してはいけない何かを書きだす場合に適しています。ほとんどの場合、`cli.echo` よりも `cli.log.info()` を選ぶべきです。 + +### テキストの色付け + +テキスト内に色トークンを含めることで、テキストの出力を色付けすることができます。情報を伝えるためではなく、強調するために色を使います。ユーザは色を無効にできることを覚えておいてください。色を無効にした場合でもサブコマンドは引き続き使えるようにしてください。 + +背景色を設定するのは、あなたがやっていることに不可欠ではない限り、通常は避けるべきです。ユーザは、ターミナルの色に関しては多くの好みを持つため、あなたは黒と白のどちらの背景に対してもうまく機能する色を選択する必要があることを覚えておいてください。 + +'fg' という接頭辞の付いた色は、前景(テキスト)色に影響します。'bg' という接頭辞の付いた色は、背景色に影響します。 + +| 色 | 背景 | 拡張背景 | 前景 | 拡張前景 | +|-------|------------|---------------------|------------|--------------------| +| 黒 | {bg_black} | {bg_lightblack_ex} | {fg_black} | {fg_lightblack_ex} | +| 青 | {bg_blue} | {bg_lightblue_ex} | {fg_blue} | {fg_lightblue_ex} | +| シアン | {bg_cyan} | {bg_lightcyan_ex} | {fg_cyan} | {fg_lightcyan_ex} | +| 緑 | {bg_green} | {bg_lightgreen_ex} | {fg_green} | {fg_lightgreen_ex} | +| マゼンタ | {bg_magenta} | {bg_lightmagenta_ex} | {fg_magenta} | {fg_lightmagenta_ex} | +| 赤 | {bg_red} | {bg_lightred_ex} | {fg_red} | {fg_lightred_ex} | +| 白 | {bg_white} | {bg_lightwhite_ex} | {fg_white} | {fg_lightwhite_ex} | +| 黄 | {bg_yellow} | {bg_lightyellow_ex} | {fg_yellow} | {fg_lightyellow_ex} | + +ANSI 出力の挙動を変更するために使うことができる制御シーケンスもあります。 + +| 制御シーケンス | 説明 | +|-------------------|-------------| +| {style_bright} | テキストを明るくする | +| {style_dim} | テキストを暗くする | +| {style_normal} | テキストを通常にする (`{style_bright}` または `{style_dim}` のどちらでもない) | +| {style_reset_all} | 全てのテキストの属性をデフォルトに再設定する(これは自動的に全ての文字列の最後に自動的に追加されます。) | +| {bg_reset} | 背景色をユーザのデフォルトに再設定します。 | +| {fg_reset} | 背景色をユーザのデフォルトに再設定します。 | + +# 引数と設定 + +QMK は引数の解析と設定の詳細をあなたの代わりに処理します。新しい引数を追加すると、サブコマンドの名前と引数の長い名前に基づいて設定ツリーに自動的に組み込まれます。属性形式のアクセス (`cli.config..`) あるいは辞書形式のアクセス (`cli.config['']['']`) を使って、`cli.config` 内のこの設定にアクセスすることができます。 + +内部では、QMK は [設定ファイルのパーサ](https://docs.python.org/3/library/configparser.html) を使って設定を格納します。これにより、人間が編集可能な方法で設定を表す簡単で分かり易い方法を提供します。この設定へのアクセスをラップして、設定ファイルのパーサーが通常持たない幾つかの機能を提供しています。 + +## 設定値の読み込み + +通常期待される全ての方法で `cli.config` とやり取りすることができます。例えば、`qmk compile` コマンドは `cli.config.compile.keyboard` からキーボード名を取得します。値がコマンドライン、環境変数あるいは設定ファイルからきたものであるかどうかを知る必要はありません。 + +繰り返しもサポートされます: + +``` +for section in cli.config: + for key in cli.config[section]: + cli.log.info('%s.%s: %s', section, key, cli.config[section][key]) +``` + +## 設定値の設定 + +通常の方法で設定値を設定することができます。 + +辞書形式: + +``` +cli.config['
'][''] = +``` + +属性形式: + +``` +cli.config.
. = +``` + +## 設定値の削除 + +通常の方法で設定値を削除することができます。 + +辞書形式: + +``` +del(cli.config['
']['']) +``` + +属性形式: + +``` +del(cli.config.
.) +``` + +## 設定ファイルの書き方 + +設定は変更しても書き出されません。ほとんどのコマンドでこれをする必要はありません。ユーザに `qmk config` を使って設定を慎重に変更させることをお勧めします。 + +設定を書き出すために `cli.save_config()` を使うことができます。 + +## 設定からの引数の除外 + +一部の引数は設定ファイルに反映すべきではありません。これらは引数を作成する時に `arg_only=True` を追加することで除外することができます。 + +例: + +``` +@cli.argument('-o', '--output', arg_only=True, help='File to write to') +@cli.argument('filename', arg_only=True, help='Configurator JSON file') +@cli.subcommand('Create a keymap.c from a QMK Configurator export.') +def json_keymap(cli): + pass +``` + +`cli.args` を使ってのみこれらの引数にアクセスすることができます。例えば: + +``` +cli.log.info('Reading from %s and writing to %s', cli.args.filename, cli.args.output) +``` + +# テスト、リントおよびフォーマット + +nose2、flake8 および yapf を使ってコードをテスト、リントおよびフォーマットします。これらのテストを実行するために `pytest` と `pyformat` サブコマンドを使うことができます。 + +### テストとリント + + qmk pytest + +### フォーマット + + qmk pyformat + +## フォーマットの詳細 + +[yapf](https://github.com/google/yapf) を使ってコードを自動的にフォーマットします。フォーマットの設定は `setup.cfg` の `[yapf]` セクションにあります。 + +?> ヒント- 多くのエディタは yapf をプラグインとして使って、入力したコードを自動的にフォーマットすることができます。 + +## テストの詳細 + +テストは `lib/python/qmk/tests/` にあります。このディレクトリに単体テストと統合テストの両方があります。コードの単体テストと統合テストの両方を書いてほしいですが、一方のみ書く場合は統合テストを優先してください。 + +PR にテストの包括的なセットが含まれない場合は、次のようなコメントをコードに追加して、他の人が手助けできるようにしてください: + + # TODO(unassigned/): Write tests + +[nose2](https://nose2.readthedocs.io/en/latest/getting_started.html) を使ってテストを実行します。テスト関数でできることの詳細については、nose2 のドキュメントを参照してください。 + +## リントの詳細 + +flake8 を使ってコードをリントします。PR を開く前に、コードは flake8 をパスしなければなりません。これは `qmk pytest` を実行するときにチェックされ、PR を登録したときに CI によってチェックされます。 From 74d3223fb5fdbbc43f65f5a5a9e2bb4b2c52fec6 Mon Sep 17 00:00:00 2001 From: Sergey Vlasov Date: Wed, 22 Jul 2020 08:49:01 +0300 Subject: [PATCH 410/930] Update handwired/onekey/teensy_2pp readme (#9784) In commit 297aad6ebd85 pins for handwired/onekey/teensy_2pp were changed from B2/B1 to F4/F5; update readme.md to match that change. --- keyboards/handwired/onekey/teensy_2pp/readme.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/keyboards/handwired/onekey/teensy_2pp/readme.md b/keyboards/handwired/onekey/teensy_2pp/readme.md index 9cb99e118154..243b08df174e 100644 --- a/keyboards/handwired/onekey/teensy_2pp/readme.md +++ b/keyboards/handwired/onekey/teensy_2pp/readme.md @@ -1,3 +1,3 @@ # Teensy++ 2.0 onekey -To trigger keypress, short together pins *B2* and *B1* +To trigger keypress, short together pins *F4* and *F5* From d7a4b14bc6536cdd4d6317d98eb69993a1ad13ef Mon Sep 17 00:00:00 2001 From: Michael Krasnitski <42564254+mkrasnitski@users.noreply.github.com> Date: Wed, 22 Jul 2020 01:55:35 -0400 Subject: [PATCH 411/930] Fix compilation warning for the DZ60RGB/DZ65RGB when RGB matrix is disabled (#9791) --- keyboards/dztech/dz60rgb/dz60rgb.c | 2 +- keyboards/dztech/dz60rgb_ansi/dz60rgb_ansi.c | 2 +- keyboards/dztech/dz60rgb_wkl/dz60rgb_wkl.c | 2 +- keyboards/dztech/dz65rgb/dz65rgb.c | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/keyboards/dztech/dz60rgb/dz60rgb.c b/keyboards/dztech/dz60rgb/dz60rgb.c index 747b8854d479..aa02fb902d01 100644 --- a/keyboards/dztech/dz60rgb/dz60rgb.c +++ b/keyboards/dztech/dz60rgb/dz60rgb.c @@ -92,7 +92,6 @@ led_config_t g_led_config = { 1, 1, 1, 1, 1, 4, 1, 1, 1 } }; -#endif void suspend_power_down_kb(void) { rgb_matrix_set_suspend_state(true); @@ -110,3 +109,4 @@ void rgb_matrix_indicators_user(void) { rgb_matrix_set_color(40, 0xFF, 0xFF, 0xFF); } } +#endif diff --git a/keyboards/dztech/dz60rgb_ansi/dz60rgb_ansi.c b/keyboards/dztech/dz60rgb_ansi/dz60rgb_ansi.c index 910797120b74..4bb5938b66ed 100644 --- a/keyboards/dztech/dz60rgb_ansi/dz60rgb_ansi.c +++ b/keyboards/dztech/dz60rgb_ansi/dz60rgb_ansi.c @@ -90,7 +90,6 @@ led_config_t g_led_config = { 1, 1, 1, 1, 4, 1, 1, 1 } }; -#endif void suspend_power_down_kb(void) { rgb_matrix_set_suspend_state(true); @@ -108,3 +107,4 @@ void rgb_matrix_indicators_user(void) { rgb_matrix_set_color(40, 0xFF, 0xFF, 0xFF); } } +#endif diff --git a/keyboards/dztech/dz60rgb_wkl/dz60rgb_wkl.c b/keyboards/dztech/dz60rgb_wkl/dz60rgb_wkl.c index 482e98fa4309..b57560bacd74 100644 --- a/keyboards/dztech/dz60rgb_wkl/dz60rgb_wkl.c +++ b/keyboards/dztech/dz60rgb_wkl/dz60rgb_wkl.c @@ -91,7 +91,6 @@ led_config_t g_led_config = { 1, 1, 1, 4, 1, 1, 1 } }; -#endif void suspend_power_down_kb(void) { rgb_matrix_set_suspend_state(true); @@ -109,3 +108,4 @@ void rgb_matrix_indicators_user(void) { rgb_matrix_set_color(41, 0xFF, 0xFF, 0xFF); } } +#endif diff --git a/keyboards/dztech/dz65rgb/dz65rgb.c b/keyboards/dztech/dz65rgb/dz65rgb.c index 43d8f3494b6a..aa5bf6601cde 100644 --- a/keyboards/dztech/dz65rgb/dz65rgb.c +++ b/keyboards/dztech/dz65rgb/dz65rgb.c @@ -97,7 +97,6 @@ led_config_t g_led_config = { 1, 1, 1, 4, 1, 1, 1, 1, 1, 1 } }; -#endif void suspend_power_down_kb(void) { rgb_matrix_set_suspend_state(true); @@ -115,3 +114,4 @@ void rgb_matrix_indicators_user(void) { rgb_matrix_set_color(30, 0xFF, 0xFF, 0xFF); } } +#endif From d48e3053b992549edac03d7ae7be011b4d590136 Mon Sep 17 00:00:00 2001 From: Mark Sherman Date: Thu, 23 Jul 2020 00:18:21 -0400 Subject: [PATCH 412/930] Updating comment diagram to match code in lets_split_eh/doxish_dvorak (#9785) --- keyboards/lets_split_eh/keymaps/doxish_dvorak/keymap.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/keyboards/lets_split_eh/keymaps/doxish_dvorak/keymap.c b/keyboards/lets_split_eh/keymaps/doxish_dvorak/keymap.c index 721312623e30..06ddace84c21 100644 --- a/keyboards/lets_split_eh/keymaps/doxish_dvorak/keymap.c +++ b/keyboards/lets_split_eh/keymaps/doxish_dvorak/keymap.c @@ -24,15 +24,15 @@ enum custom_keycodes { const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { -/* Qwerty +/* Dvorak * ,-----------------------------------------------------------------------------------. - * | Tab | Q | W | E | R | T | Y | U | I | O | P | Bksp | + * | ' | , | . | P | Y | Tab | Bksp | F | G | C | R | L | * |------+------+------+------+------+-------------+------+------+------+------+------| - * | Func | A | S | D | F | G | H | J | K | L | ; | Enter| + * | A | O | E | U | I | Enter| Enter| D | H | T | N | S | * |------+------+------+------+------+------|------+------+------+------+------+------| - * | Shift| Z | X | C | V | B | N | M | , | . | / | ' | + * | ; | Q | J | K | X | Shift| Shift| B | M | W | V | Z | * |------+------+------+------+------+------+------+------+------+------+------+------| - * | Ctrl | ` | GUI | Alt |Lower | Space |Raise | Left | Down | Up |Right | + * | Ctrl | GUI | Alt | Shift|Space |Lower |Raise |Space | Left | Down | Up |Right | * `-----------------------------------------------------------------------------------' */ [_DVORAK] = LAYOUT( \ From 841a2721bc312cebe4a9422a9c55ef435b5e723b Mon Sep 17 00:00:00 2001 From: shela Date: Thu, 23 Jul 2020 17:22:10 +0900 Subject: [PATCH 413/930] Update Japanese translation of config_options.md. (#9759) --- docs/ja/config_options.md | 23 +++++++++++++++++------ 1 file changed, 17 insertions(+), 6 deletions(-) diff --git a/docs/ja/config_options.md b/docs/ja/config_options.md index 55ee2cfbe905..1f4173da1c8d 100644 --- a/docs/ja/config_options.md +++ b/docs/ja/config_options.md @@ -2,7 +2,7 @@ QMK はほぼ無制限に設定可能です。可能なところはいかなるところでも、やりすぎな程、ユーザーがコードサイズを犠牲にしてでも彼らのキーボードをカスタマイズをすることを許しています。ただし、このレベルの柔軟性により設定が困難になります。 @@ -118,9 +118,9 @@ QMK での全ての利用可能な設定にはデフォルトがあります。 * `#define NO_ACTION_ONESHOT` * ワンショットモディファイアを無効にします * `#define NO_ACTION_MACRO` - * 古い形式のマクロ処理を無効にします: MACRO() & action_get_macro + * `MACRO()`、`action_get_macro()` _(非推奨)_ を使う古い形式のマクロ処理を無効にします * `#define NO_ACTION_FUNCTION` - * fn_actions 配列(非推奨)からの action_function() の呼び出しを無効にします + * `fn_actions`、`action_function()` _(非推奨)_ を使う古い形式の関数処理を無効にします ## 有効にできる機能 @@ -187,7 +187,14 @@ QMK での全ての利用可能な設定にはデフォルトがあります。 * `#define RGBLIGHT_ANIMATIONS` * RGB アニメーションを実行します * `#define RGBLIGHT_LAYERS` - * オンとオフを切り替えることができる [ライトレイヤー](ja/feature_rgblight.md) を定義できます。現在のキーボードレイヤーまたは Caps Lock 状態を表示するのに最適です。 + * オンとオフを切り替えることができる [ライトレイヤー](ja/feature_rgblight.md?id=lighting-layers) を定義できます。現在のキーボードレイヤーまたは Caps Lock 状態を表示するのに最適です。 +* `#define RGBLIGHT_MAX_LAYERS` + * デフォルトは8です。もしさらに [ライトレイヤー](ja/feature_rgblight.md?id=lighting-layers) が必要であれば、32まで拡張できます。 + * メモ: 最大値を大きくするとファームウェアサイズが大きくなり、分割キーボードで同期が遅くなります。 +* `#define RGBLIGHT_LAYER_BLINK` + * 指定されたミリ秒の間、ライトレイヤーを [点滅](ja/feature_rgblight.md?id=lighting-layer-blink) する機能を追加します(例えば、アクションを確認するため)。 +* `#define RGBLIGHT_LAYERS_OVERRIDE_RGB_OFF` + * 定義されている場合、RGB ライトがオフになっている場合でも [ライトレイヤー](ja/feature_rgblight?id=overriding-rgb-lighting-onoff-status) が表示されます。 * `#define RGBLED_NUM 12` * LED の数 * `#define RGBLIGHT_SPLIT` @@ -239,7 +246,10 @@ QMK での全ての利用可能な設定にはデフォルトがあります。 * `#define SPLIT_HAND_PIN B7` * high/low ピンを使って左右を決定します。low = 右手、high = 左手。`B7` を使っているピンに置き換えます。これはオプションで、`SPLIT_HAND_PIN` が未定義のままである場合、EE_HANDS メソッドまたは標準の Let's Splitが使っている MASTER_LEFT / MASTER_RIGHT 定義をまだ使うことができます。 -* `#define EE_HANDS` (`SPLIT_HAND_PIN` が定義されていない場合のみ動作します) +* `#define SPLIT_HAND_MATRIX_GRID ,` + * 左右はキーマトリックスのキースイッチが存在しない交点を使って決定されます。通常、この交点が短絡している(ローレベル)のときに左側と見なされます。もし `#define SPLIT_HAND_MATRIX_GRID_LOW_IS_RIGHT` が定義されている場合は、ローレベルの時に右側と決定されます。 + +* `#define EE_HANDS` (`SPLIT_HAND_PIN` と `SPLIT_HAND_MATRIX_GRID` が定義されていない場合のみ動作します) * `eeprom-lefthand.eep`/`eeprom-righthand.eep` がそれぞれの半分に書き込まれた後で、EEPROM 内に格納されている左右の設定の値を読み込みます。 * `#define MASTER_RIGHT` @@ -313,7 +323,8 @@ QMK での全ての利用可能な設定にはデフォルトがあります。 * `LAYOUTS` * このキーボードがサポートする[レイアウト](ja/feature_layouts.md)のリスト * `LINK_TIME_OPTIMIZATION_ENABLE` - * キーボードをコンパイルする時に、Link Time Optimization (`LTO`) を有効にします。これは処理に時間が掛かりますが、コンパイルされたサイズを大幅に減らします (そして、ファームウェアが小さいため、追加の時間は分からないくらいです)。ただし、`LTO` が有効な場合、古いマクロと関数の機能が壊れるため、自動的にこれらの機能を無効にします。これは `NO_ACTION_MACRO` と `NO_ACTION_FUNCTION` を自動的に定義することで行われます。 + * キーボードをコンパイルする時に、Link Time Optimization (LTO) を有効にします。これは処理に時間が掛かりますが、コンパイルされたサイズを大幅に減らします (そして、ファームウェアが小さいため、追加の時間は分からないくらいです)。 +ただし、LTO が有効な場合、古い TMK のマクロと関数の機能が壊れるため、自動的にこれらの機能を無効にします。これは `NO_ACTION_MACRO` と `NO_ACTION_FUNCTION` を自動的に定義することで行われます。(メモ: これは QMK の [マクロ](ja/feature_macros.md) と [レイヤー](ja/feature_layers.md) には影響を与えません。) * `LTO_ENABLE` * LINK_TIME_OPTIMIZATION_ENABLE と同じ意味です。`LINK_TIME_OPTIMIZATION_ENABLE` の代わりに `LTO_ENABLE` を使うことができます。 From 706f1b433cbe32dd094fabffe25caca08f14b481 Mon Sep 17 00:00:00 2001 From: shela Date: Thu, 23 Jul 2020 17:23:56 +0900 Subject: [PATCH 414/930] Update Japanese translation of driver_installation_zadig.md. (#9761) --- docs/ja/driver_installation_zadig.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/ja/driver_installation_zadig.md b/docs/ja/driver_installation_zadig.md index 1d5e8552a486..ba5438dbff3e 100644 --- a/docs/ja/driver_installation_zadig.md +++ b/docs/ja/driver_installation_zadig.md @@ -2,7 +2,7 @@ QMK はホストにたいして通常の HID キーボードデバイスとして振る舞うため特別なドライバは必要ありません。しかし、Windows でのキーボードへの書き込みは、多くの場合、キーボードをリセットした時に現れるブートローダデバイスで*行います*。 @@ -28,7 +28,7 @@ Zadig は自動的にブートローダデバイスを検知します。**Option !> Zadig が `HidUsb` ドライバを使用する1つ以上のデバイスを表示する場合、キーボードはおそらくブートローダモードではありません。矢印はオレンジ色になり、システムドライバの変更を確認するように求められます。この場合、続行**しないでください**! -矢印が緑色で表示されたら、ドライバを選択し、**Install Driver** をクリックします。`libusb-win32` ドライバは通常 AVR で動作し、`WinUSB`は ARM で動作しますが、それでもキーボードに書き込みできない場合は、リストから異なるドライバをインストールしてみてください。msys2 を使ってコマンドライン経由で USBaspLoader デバイスに書き込むには、`libusbk` ドライバがお勧めです。そうではなく書き込みに QMK Toolbox を使っている場合は `libusb-win32` がうまく動作します。 +矢印が緑色で表示されたら、ドライバを選択し、**Install Driver** をクリックします。`libusb-win32` ドライバは通常 AVR で動作し、`WinUSB`は ARM で動作しますが、それでもキーボードに書き込みできない場合は、リストから異なるドライバをインストールしてみてください。USBAspLoader デバイスは `libusbK` ドライバを使わなければなりません。 ![ブートローダドライバが正常にインストールされた Zadig](https://i.imgur.com/b8VgXzx.png) From 65f803a1de99d863bdbd92583595368d07aa9b79 Mon Sep 17 00:00:00 2001 From: shela Date: Thu, 23 Jul 2020 17:26:12 +0900 Subject: [PATCH 415/930] Update Japanese translation of feature_dip_switch.md. (#9763) --- docs/ja/feature_dip_switch.md | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/docs/ja/feature_dip_switch.md b/docs/ja/feature_dip_switch.md index 1403485cadd4..2a418d5f5d9a 100644 --- a/docs/ja/feature_dip_switch.md +++ b/docs/ja/feature_dip_switch.md @@ -2,7 +2,7 @@ DIP スイッチは、以下を `rules.mk` に追加することでサポートされます: @@ -12,9 +12,17 @@ DIP スイッチは、以下を `rules.mk` に追加することでサポート さらに、以下を `config.h` に追加します: ```c +// Connects each switch in the dip switch to the GPIO pin of the MCU #define DIP_SWITCH_PINS { B14, A15, A10, B9 } ``` +あるいは + +```c +// Connect each switch in the DIP switch to an unused intersections in the key matrix. +#define DIP_SWITCH_MATRIX_GRID { {0,6}, {1,6}, {2,6} } // List of row and col pairs +``` + ## コールバック コールバック関数を `.c` に記述することができます: @@ -92,4 +100,10 @@ void dip_switch_update_mask_user(uint32_t state) { ## ハードウェア +### DIP スイッチの各スイッチを MCU の GPIO ピンに接続する + DIP スイッチの片側は MCU のピンへ直接配線し、もう一方の側はグラウンドに配線する必要があります。機能的に同じであるため、どちら側がどちらに接続されているかは問題にはならないはずです。 + +### DIP スイッチの各スイッチをキーマトリクスの未使用の交点に接続する + +キースイッチと同じように、ダイオードと DIP スイッチが ROW 線と COL 線に接続します。 From e1f1e1582e4152c1df051bf3159f67a5d2dca596 Mon Sep 17 00:00:00 2001 From: shela Date: Thu, 23 Jul 2020 17:27:40 +0900 Subject: [PATCH 416/930] Update Japanese translation of feature_dynamic_macros.md. (#9764) --- docs/ja/feature_dynamic_macros.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/ja/feature_dynamic_macros.md b/docs/ja/feature_dynamic_macros.md index ab8ec371374e..533c1c548fb7 100644 --- a/docs/ja/feature_dynamic_macros.md +++ b/docs/ja/feature_dynamic_macros.md @@ -2,7 +2,7 @@ QMK はその場で作られた一時的なマクロをサポートします。これらを動的マクロと呼びます。それらはユーザがキーボードから定義し、キーボードのプラグを抜くか再起動すると失われます。 @@ -23,7 +23,7 @@ QMK はその場で作られた一時的なマクロをサポートします。 マクロの記録を開始するには、`DYN_REC_START1` または `DYN_REC_START2` のどちらかを押します。 -記録を終了するには、`DYN_REC_STOP` レイヤーボタンを押します。 +記録を終了するには、`DYN_REC_STOP` レイヤーボタンを押します。`DYN_REC_START1` または `DYN_REC_START2` をもう一度押すことでも記録を終了することができます。 マクロを再生するには、`DYN_MACRO_PLAY1` あるいは `DYN_MACRO_PLAY2` のどちらかを押します。 From a9cb3835ca12ab7dc42b4001b862c582a7a6364e Mon Sep 17 00:00:00 2001 From: shela Date: Thu, 23 Jul 2020 17:29:02 +0900 Subject: [PATCH 417/930] Update Japanese translation of feature_encoders.md. (#9765) --- docs/ja/feature_encoders.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/ja/feature_encoders.md b/docs/ja/feature_encoders.md index 7f8922652dbc..66f7fd5dc3d7 100644 --- a/docs/ja/feature_encoders.md +++ b/docs/ja/feature_encoders.md @@ -2,7 +2,7 @@ 以下を `rules.mk` に追加することで基本的なエンコーダがサポートされます: @@ -31,7 +31,7 @@ ENCODER_ENABLE = yes #define ENCODER_DIRECTION_FLIP ``` -さらに、解像度を同じファイルで指定することができます (デフォルトかつお勧めは4): +さらに、エンコーダが各戻り止め(デテント)間に登録するパルス数を定義する解像度は、次のように定義できます: ```c #define ENCODER_RESOLUTION 4 From 69abe5b405c917ba0947cdac605bfb6409086365 Mon Sep 17 00:00:00 2001 From: shela Date: Thu, 23 Jul 2020 17:30:59 +0900 Subject: [PATCH 418/930] Update Japanese translation of feature_layers.md. (#9769) --- docs/ja/feature_layers.md | 64 +++++++++++++++++++-------------------- 1 file changed, 32 insertions(+), 32 deletions(-) diff --git a/docs/ja/feature_layers.md b/docs/ja/feature_layers.md index 6b18a30c7c4f..d6e77ffe419d 100644 --- a/docs/ja/feature_layers.md +++ b/docs/ja/feature_layers.md @@ -2,7 +2,7 @@ QMK ファームウェアの最も強力で良く使われている機能の一つは、レイヤーを使う機能です。ほとんどの人にとって、これはラップトップやタブレットキーボードにあるのと同じように、様々なキーを可能にするファンクションキーに相当します。 @@ -58,42 +58,42 @@ QMK を使い始めたばかりの場合は、全てを単純にしたいでし レイヤーの使用あるいは操作に関係する多くの関数(と変数)があります。 -| 関数 | 説明 | -|----------------------------------------------|---------------------------------------------------------------------------------------------------------| -| `layer_state_set(layer_mask)` | 直接レイヤーの状態を設定する (推奨。何をしているのか分かっていない場合は使わないでください)。 | -| `layer_clear()` | 全てのレイヤーを消去する (全てをオフにします)。 | -| `layer_move(layer)` | 指定されたレイヤーをオンにし、それ以外をオフにする。 | -| `layer_on(layer)` | 指定されたレイヤーをオンにし、それ以外を既存の状態のままにする。 | -| `layer_off(layer)` | 指定されたレイヤーをオフにし、それ以外を既存の状態のままにする。 | -| `layer_invert(layer)` | 指定されたレイヤーの状態を反転/トグルする。 | -| `layer_or(layer_mask)` | 指定されたレイヤーと既存のレイヤー状態の間で一致するビットに基づいてレイヤーをオンにする。 | -| `layer_and(layer_mask)` | 指定されたレイヤーと既存のレイヤー状態の間で有効なビットに基づいてレイヤーをオンにする。 | -| `layer_xor(layer_mask)` | 指定されたレイヤーと既存のレイヤー状態の間で一致しないビットに基づいてレイヤーをオンにする。 | -| `layer_debug(layer_mask)` | デバッガのコンソールに現在のビットマスクと最も高いレイヤーを出力する。 | -| `default_layer_set(layer_mask)` | 直接デフォルトレイヤーの状態を設定する (推奨。何をしているのか分かっていない場合は使わないでください)。 | -| `default_layer_or(layer_mask)` | 指定されたレイヤーと既存のデフォルトレイヤー状態の間で一致するビットに基づいてレイヤーをオンにする。 | -| `default_layer_and(layer_mask)` | 指定されたレイヤーと既存のデフォルトレイヤー状態の間で一致する有効なビットに基づいてレイヤーをオンにする。 | -| `default_layer_xor(layer_mask)` | 指定されたレイヤーと既存のデフォルトレイヤー状態の間で一致しないビットに基づいてレイヤーをオンにする。 | -| `default_layer_debug(layer_mask)` | デバッガのコンソールに現在のビットマスクと最も高いアクティブなレイヤーを出力する。 | -| [`set_single_persistent_default_layer(layer)`](ja/ref_functions.md#setting-the-persistent-default-layer) | デフォルトレイヤーを設定し、それを永続化メモリ (EEPROM) に書き込む。 | -| [`update_tri_layer(x, y, z)`](ja/ref_functions.md#update_tri_layerx-y-z) | レイヤー `x` と `y` の両方がオンであるかを調べ、それに基づいて `z` を設定する(両方がオンの場合オン、そうでなければオフ)。 | -| [`update_tri_layer_state(state, x, y, z)`](ja/ref_functions.md#update_tri_layer_statestate-x-y-z) | `update_tri_layer(x, y, z)` と同じことをするが、`layer_state_set_*` 関数から呼ばれる。 | +| 関数 | 説明 | +| -------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | +| `layer_state_set(layer_mask)` | 直接レイヤーの状態を設定する (推奨。何をしているのか分かっていない場合は使わないでください)。 | +| `layer_clear()` | 全てのレイヤーを消去する (全てをオフにします)。 | +| `layer_move(layer)` | 指定されたレイヤーをオンにし、それ以外をオフにする。 | +| `layer_on(layer)` | 指定されたレイヤーをオンにし、それ以外を既存の状態のままにする。 | +| `layer_off(layer)` | 指定されたレイヤーをオフにし、それ以外を既存の状態のままにする。 | +| `layer_invert(layer)` | 指定されたレイヤーの状態を反転/トグルする。 | +| `layer_or(layer_mask)` | 指定されたレイヤーと既存のレイヤー状態の間で一致するビットに基づいてレイヤーをオンにする。 | +| `layer_and(layer_mask)` | 指定されたレイヤーと既存のレイヤー状態の間で有効なビットに基づいてレイヤーをオンにする。 | +| `layer_xor(layer_mask)` | 指定されたレイヤーと既存のレイヤー状態の間で一致しないビットに基づいてレイヤーをオンにする。 | +| `layer_debug(layer_mask)` | デバッガのコンソールに現在のビットマスクと最も高いレイヤーを出力する。 | +| `default_layer_set(layer_mask)` | 直接デフォルトレイヤーの状態を設定する (推奨。何をしているのか分かっていない場合は使わないでください)。 | +| `default_layer_or(layer_mask)` | 指定されたレイヤーと既存のデフォルトレイヤー状態の間で一致するビットに基づいてレイヤーをオンにする。 | +| `default_layer_and(layer_mask)` | 指定されたレイヤーと既存のデフォルトレイヤー状態の間で一致する有効なビットに基づいてレイヤーをオンにする。 | +| `default_layer_xor(layer_mask)` | 指定されたレイヤーと既存のデフォルトレイヤー状態の間で一致しないビットに基づいてレイヤーをオンにする。 | +| `default_layer_debug(layer_mask)` | デバッガのコンソールに現在のビットマスクと最も高いアクティブなレイヤーを出力する。 | +| [`set_single_persistent_default_layer(layer)`](ja/ref_functions.md#setting-the-persistent-default-layer) | デフォルトレイヤーを設定し、それを永続化メモリ (EEPROM) に書き込む。 | +| [`update_tri_layer(x, y, z)`](ja/ref_functions.md#update_tri_layerx-y-z) | レイヤー `x` と `y` の両方がオンであるかを調べ、それに基づいて `z` を設定する(両方がオンの場合オン、そうでなければオフ)。 | +| [`update_tri_layer_state(state, x, y, z)`](ja/ref_functions.md#update_tri_layer_statestate-x-y-z) | `update_tri_layer(x, y, z)` と同じことをするが、`layer_state_set_*` 関数から呼ばれる。 | 呼び出すことができる関数に加えて、レイヤーが変更されるたびに呼び出されるコールバック関数が幾つかあります。これはレイヤー状態を関数に渡し、読み取りや変更することができます。 -| コールバック | 説明 | -|-----------------------------------------------------|----------------------------------------------------------------------------------------| -| `layer_state_set_kb(layer_state_t state)` | キーボードレベルのレイヤー関数のためのコールバック。 | -| `layer_state_set_user(layer_state_t state)` | ユーザレベルのレイヤー関数のためのコールバック。 | -| `default_layer_state_set_kb(layer_state_t state)` | キーボードレベルのデフォルトレイヤー関数のためのコールバック。キーボードの初期化時に呼ばれます。 | -| `default_layer_state_set_user(layer_state_t state)` | ユーザレベルのデフォルトレイヤー関数のためのコールバック。キーボードの初期化時に呼ばれます。 | +| コールバック | 説明 | +| --------------------------------------------------- | ------------------------------------------------------------------------------------------------ | +| `layer_state_set_kb(layer_state_t state)` | キーボードレベルのレイヤー関数のためのコールバック。 | +| `layer_state_set_user(layer_state_t state)` | ユーザレベルのレイヤー関数のためのコールバック。 | +| `default_layer_state_set_kb(layer_state_t state)` | キーボードレベルのデフォルトレイヤー関数のためのコールバック。キーボードの初期化時に呼ばれます。 | +| `default_layer_state_set_user(layer_state_t state)` | ユーザレベルのデフォルトレイヤー関数のためのコールバック。キーボードの初期化時に呼ばれます。 | ?> これらのコールバックを使うための追加の情報については、[レイヤー変換コード](ja/custom_quantum_functions.md#layer-change-code)のドキュメントを調べてください。 -| チェック関数 | 説明 | -|-------------------------------------------|------------------------------------------------------------------------------| -| `layer_state_cmp(cmp_layer_state, layer)` | これは `cmp_layer_state` を調べて、指定された `layer` が有効かどうかを確認します。これは、レイヤーコールバックで使うためのものです。 | -| `layer_state_is(layer)` | これはレイヤーの状態を調べて、指定された `layer` が有効かどうかを確認します。(グローバルレイヤー状態については、`layer_state_cmp` を呼びます)。 | +次の関数やマクロを使って、特定のレイヤーの状態を確認することもできます。 -!> `IS_LAYER_ON(layer)` もありますが、`layer_state_cmp` 関数には、レイヤー0で正しい値を返すようにするために追加の処理があります。さもないと、レイヤー0がオンになっているかどうかを確認する時に誤った値が返されることがあります。 +| 関数 | 説明 | 別名 | +| ------------------------------- | ------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------- | +| `layer_state_is(layer)` | 指定された `layer` がグローバルに有効かどうかを確認する。 | `IS_LAYER_ON(layer)`, `IS_LAYER_OFF(layer)` | +| `layer_state_cmp(state, layer)` | `state` を確認して指定された `layer` が有効かどうかを確認する。レイヤーのコールバックで使うことを目的とする。 | `IS_LAYER_ON_STATE(state, layer)`, `IS_LAYER_OFF_STATE(state, layer)` | From 562b853a8f4a6d0d4e3343a6ab7ba85e7740e3c0 Mon Sep 17 00:00:00 2001 From: shela Date: Thu, 23 Jul 2020 17:32:57 +0900 Subject: [PATCH 419/930] [Docs] Update Japanese translation of feature_split_keyboard.md. (#9780) * Update Japanese translation of feature_split_keyboard.md. * Update docs/ja/feature_split_keyboard.md Co-authored-by: Takeshi ISHII <2170248+mtei@users.noreply.github.com> Co-authored-by: Takeshi ISHII <2170248+mtei@users.noreply.github.com> --- docs/ja/feature_split_keyboard.md | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/docs/ja/feature_split_keyboard.md b/docs/ja/feature_split_keyboard.md index 275647b8033b..2dcfc366df59 100644 --- a/docs/ja/feature_split_keyboard.md +++ b/docs/ja/feature_split_keyboard.md @@ -2,7 +2,7 @@ QMK ファームウェアリポジトリの多くのキーボードは、"分割"キーボードです。それらは2つのコントローラを使います — 1つは USB に接続し、もう1つは TRRS または同様のケーブルを介してシリアルまたは I2C 接続で接続します。 @@ -95,6 +95,24 @@ SPLIT_TRANSPORT = custom これは指定されたピンを読み込みます。high の場合、コントローラはそれを左側だと仮定し、low の場合、それは右側であると仮定します。 +#### マトリックスピンによる左右の設定 + +左右を決定するためにコントローラのキーマトリックスピンを読むようにファームウェアを設定することができます。これを行うには、以下を `config.h` ファイルに追加します: + +```c +#define SPLIT_HAND_MATRIX_GRID D0, F1 +``` + +最初のピンは出力ピンで、2つ目は入力ピンです。 + +キーマトリックスに未使用の交点があるキーボードがあります。この設定は、左右の決定にこれらの未使用の交点の1つを使用します。 + +通常、ダイオードが交点に接続されている場合、左側と判断されます。次の定義を追加すると、右側と判断されます。 + +```c +#define SPLIT_HAND_MATRIX_GRID_LOW_IS_RIGHT +``` + #### EEPROM による左右の設定 このメソッドは永続ストレージ(`EEPROM`)のフラグを設定することで、キーボードの左右を設定します。これはコントローラが最初に起動する時にチェックされ、キーボードのどちら側であるかとキーボードのレイアウトの向きを決定します。 From e85ec9a09a79bc1882d7b6ef4f3f9f0aa6c8b295 Mon Sep 17 00:00:00 2001 From: shela Date: Thu, 23 Jul 2020 17:34:42 +0900 Subject: [PATCH 420/930] Update Japanese translation of _summary.md. (#9777) --- docs/ja/_summary.md | 24 ++++++++++++++++++------ 1 file changed, 18 insertions(+), 6 deletions(-) diff --git a/docs/ja/_summary.md b/docs/ja/_summary.md index 987df23d76db..a4cb75c5ea64 100644 --- a/docs/ja/_summary.md +++ b/docs/ja/_summary.md @@ -6,6 +6,7 @@ * [テストとデバッグ](ja/newbs_testing_debugging.md) * [手助けを得る/サポート](ja/support.md) * [他のリソース](ja/newbs_learn_more_resources.md) + * [シラバス](ja/syllabus.md) * FAQ * [一般的な FAQ](ja/faq_general.md) @@ -33,7 +34,9 @@ * [機能のカスタマイズ](ja/custom_quantum_functions.md) * [Zadig を使ったドライバのインストール](ja/driver_installation_zadig.md) * [キーマップの概要](ja/keymap.md) - * [Vagrant のガイド](ja/getting_started_vagrant.md) + * 開発環境 + * [Docker のガイド](ja/getting_started_docker.md) + * [Vagrant のガイド](ja/getting_started_vagrant.md) * 書き込み * [書き込み](ja/flashing.md) * [ATmega32A の書き込み (ps2avrgb)](ja/flashing_bootloadhid.md) @@ -52,6 +55,7 @@ * 単純なキーコード * [完全なリスト](ja/keycodes.md) * [基本的なキーコード](ja/keycodes_basic.md) + * [言語固有のキーコード](ja/reference_keymap_extras.md) * [修飾キー](ja/feature_advanced_keycodes.md) * [Quantum キーコード](ja/quantum_keycodes.md) @@ -72,9 +76,10 @@ * [デバウンス API](ja/feature_debounce_type.md) * [キーロック](ja/feature_key_lock.md) * [レイヤー](ja/feature_layers.md) - * [One Shot Keys](ja/one_shot_keys.md) + * [ワンショットキー](ja/one_shot_keys.md) * [ポインティング デバイス](ja/feature_pointing_device.md) - * [Swap Hands](ja/feature_swap_hands.md) + * [ロー HID](ja/feature_rawhid.md) + * [スワップハンド](ja/feature_swap_hands.md) * [タップダンス](ja/feature_tap_dance.md) * [タップホールド設定](ja/tap_hold.md) * [ターミナル](ja/feature_terminal.md) @@ -101,7 +106,7 @@ * [Proton C 規約](ja/proton_c_conversion.md) * [PS/2 マウス](ja/feature_ps2_mouse.md) * [分割キーボード](ja/feature_split_keyboard.md) - * [Stenography](ja/feature_stenography.md) + * [速記](ja/feature_stenography.md) * [感熱式プリンタ](ja/feature_thermal_printer.md) * [Velocikey](ja/feature_velocikey.md) @@ -110,6 +115,7 @@ * [概要](ja/breaking_changes.md) * [プルリクエストにフラグが付けられた](ja/breaking_changes_instructions.md) * 履歴 + * [2020年5月30日](ja/ChangeLog/20200530.md) * [2020年2月29日](ja/ChangeLog/20200229.md) * [2019年8月30日](ja/ChangeLog/20190830.md) @@ -124,6 +130,7 @@ * [SPI ドライバ](ja/spi_driver.md) * [WS2812 ドライバ](ja/ws2812_driver.md) * [EEPROM ドライバ](ja/eeprom_driver.md) + * [シリアル ドライバ](ja/serial_driver.md) * [GPIO コントロール](ja/internals_gpio_control.md) * [キーボード ガイドライン](ja/hardware_keyboard_guidelines.md) @@ -136,6 +143,11 @@ * [開発環境](ja/api_development_environment.md) * [アーキテクチャの概要](ja/api_development_overview.md) + * ハードウェアプラットフォーム開発 + * Arm/ChibiOS + * [MCU の選択](ja/platformdev_selecting_arm_mcu.md) + * [早期初期化](ja/platformdev_chibios_earlyinit.md) + * QMK Reference * [QMK への貢献](ja/contributing.md) * [QMK ドキュメントの翻訳](ja/translating.md) @@ -155,9 +167,9 @@ * QMK の内部詳細(作成中) * [定義](ja/internals_defines.md) - * [Input Callback Reg](ja/internals_input_callback_reg.md) + * [入力コールバック登録](ja/internals_input_callback_reg.md) * [Midi デバイス](ja/internals_midi_device.md) * [Midi デバイスのセットアップ手順](ja/internals_midi_device_setup_process.md) * [Midi ユーティリティ](ja/internals_midi_util.md) - * [Send Functions](ja/internals_send_functions.md) + * [Midi 送信関数](ja/internals_send_functions.md) * [Sysex Tools](ja/internals_sysex_tools.md) From e38331d94cff278e193f12a9dfab3da956e1daf8 Mon Sep 17 00:00:00 2001 From: Jonathan Wakely Date: Thu, 23 Jul 2020 15:25:01 +0100 Subject: [PATCH 421/930] Update readme.md for cu80 (#9798) --- keyboards/cu80/readme.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/keyboards/cu80/readme.md b/keyboards/cu80/readme.md index 16276fbc208f..cb48c875b99f 100644 --- a/keyboards/cu80/readme.md +++ b/keyboards/cu80/readme.md @@ -2,7 +2,7 @@ ![cu80](https://cdn11.bigcommerce.com/s-vdedjo0w46/images/stencil/900x900/products/287/2336/DSCF3583__16019.1567722956.png?c=2) -A customizable 60% keyboard. +A customizable 80% keyboard. * Keyboard Maintainer: [aHolland909](https://github.com/aholland909) * Hardware Supported: CU80 From d699fd1fb4127c9a0c13eaa1348b934ccd639627 Mon Sep 17 00:00:00 2001 From: Jonathan Rascher Date: Thu, 23 Jul 2020 10:27:01 -0400 Subject: [PATCH 422/930] Switch bcat Chrome OS media keys workaround from mouse keys to NKRO (#9790) * Switch Chrome OS mouse keys workaround to NKRO * Add NKRO toggle to keymaps * USE NK_TOGG keycode instead of defining my own --- keyboards/crkbd/keymaps/bcat/keymap.c | 2 +- keyboards/crkbd/keymaps/bcat/readme.md | 2 +- keyboards/keebio/quefrency/keymaps/bcat/keymap.c | 2 +- keyboards/keebio/quefrency/keymaps/bcat/readme.md | 2 +- keyboards/lily58/keymaps/bcat/keymap.c | 2 +- keyboards/lily58/keymaps/bcat/readme.md | 2 +- .../60_ansi_split_bs_rshift/bcat/keymap.c | 2 +- .../60_ansi_split_bs_rshift/bcat/readme.md | 2 +- layouts/community/60_tsangan_hhkb/bcat/keymap.c | 2 +- layouts/community/60_tsangan_hhkb/bcat/readme.md | 2 +- .../65_ansi_blocker_split_bs/bcat/keymap.c | 2 +- .../65_ansi_blocker_split_bs/bcat/readme.md | 2 +- users/bcat/rules.mk | 15 ++++++++++----- 13 files changed, 22 insertions(+), 17 deletions(-) diff --git a/keyboards/crkbd/keymaps/bcat/keymap.c b/keyboards/crkbd/keymaps/bcat/keymap.c index 60375f6764d5..6018835c247f 100644 --- a/keyboards/crkbd/keymaps/bcat/keymap.c +++ b/keyboards/crkbd/keymaps/bcat/keymap.c @@ -44,7 +44,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Adjust layer: http://www.keyboard-layout-editor.com/#/gists/77e7572e077b36a23eb2086017e16fee */ [LAYER_ADJUST] = LAYOUT( - _______, _______, KC_MPLY, KC_VOLU, KC_MSTP, _______, EEP_RST, RESET, _______, _______, _______, _______, + _______, NK_TOGG, 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 21594f75c9d2..743a6572d26a 100644 --- a/keyboards/crkbd/keymaps/bcat/readme.md +++ b/keyboards/crkbd/keymaps/bcat/readme.md @@ -113,7 +113,7 @@ be a better place to put them. ## Adjust layer -![Adjust layer layout](https://i.imgur.com/LEHM4DU.png) +![Adjust layer layout](https://i.imgur.com/fZouko5.png) ([KLE](http://www.keyboard-layout-editor.com/#/gists/77e7572e077b36a23eb2086017e16fee)) diff --git a/keyboards/keebio/quefrency/keymaps/bcat/keymap.c b/keyboards/keebio/quefrency/keymaps/bcat/keymap.c index 8ccfa879fb5c..e73022d9b606 100644 --- a/keyboards/keebio/quefrency/keymaps/bcat/keymap.c +++ b/keyboards/keebio/quefrency/keymaps/bcat/keymap.c @@ -20,7 +20,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Function layer: http://www.keyboard-layout-editor.com/#/gists/59636898946da51f91fb290f8e078b4d */ [LAYER_FUNCTION] = LAYOUT_65( _______, KC_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_HUI, - KC_CAPS, _______, KC_MPLY, KC_VOLU, KC_MSTP, _______, EEP_RST, RESET, KC_PSCR, KC_SLCK, KC_PAUS, _______, _______, _______, RGB_SAI, + KC_CAPS, NK_TOGG, KC_MPLY, KC_VOLU, KC_MSTP, _______, EEP_RST, RESET, KC_PSCR, KC_SLCK, KC_PAUS, _______, _______, _______, RGB_SAI, _______, _______, KC_MPRV, KC_VOLD, KC_MNXT, _______, _______, _______, _______, _______, _______, _______, RGB_TOG, RGB_SAD, _______, KC_APP, _______, KC_MUTE, _______, _______, _______, _______, _______, _______, _______, _______, RGB_VAI, RGB_HUD, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_RMOD, RGB_VAD, RGB_MOD diff --git a/keyboards/keebio/quefrency/keymaps/bcat/readme.md b/keyboards/keebio/quefrency/keymaps/bcat/readme.md index 9499d7175924..914aa84b6b10 100644 --- a/keyboards/keebio/quefrency/keymaps/bcat/readme.md +++ b/keyboards/keebio/quefrency/keymaps/bcat/readme.md @@ -12,6 +12,6 @@ ESDF cluster), and RGB controls in the function layer (on the arrow/nav keys). ## Function layer -![Function layer layout](https://i.imgur.com/Wmx1hfx.png) +![Function layer layout](https://i.imgur.com/Fzshl0F.png) ([KLE](http://www.keyboard-layout-editor.com/#/gists/59636898946da51f91fb290f8e078b4d)) diff --git a/keyboards/lily58/keymaps/bcat/keymap.c b/keyboards/lily58/keymaps/bcat/keymap.c index a194e1c9dc85..294f9e6c5a30 100644 --- a/keyboards/lily58/keymaps/bcat/keymap.c +++ b/keyboards/lily58/keymaps/bcat/keymap.c @@ -48,7 +48,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Adjust layer: http://www.keyboard-layout-editor.com/#/gists/8f6a3f08350a9bbe1d414b22bca4e6c7 */ [LAYER_ADJUST] = LAYOUT( _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, KC_MPLY, KC_VOLU, KC_MSTP, _______, EEP_RST, RESET, _______, _______, _______, _______, + _______, NK_TOGG, 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 270e74731133..6235ff13fcdf 100644 --- a/keyboards/lily58/keymaps/bcat/readme.md +++ b/keyboards/lily58/keymaps/bcat/readme.md @@ -34,6 +34,6 @@ browser back/forward navigation keys. ## Adjust layer -![Adjust layer layout](https://i.imgur.com/Rv6jQtC.png) +![Adjust layer layout](https://i.imgur.com/Q3PGsiK.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 c52302aeca6f..adb31525a899 100644 --- a/layouts/community/60_ansi_split_bs_rshift/bcat/keymap.c +++ b/layouts/community/60_ansi_split_bs_rshift/bcat/keymap.c @@ -31,7 +31,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Function 2 layer: http://www.keyboard-layout-editor.com/#/gists/6e1068e4f91bbacccaf5ac0acbeec79c */ [LAYER_FUNCTION_2] = 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_MPLY, KC_VOLU, KC_MSTP, BL_BRTG, EEP_RST, RESET, _______, _______, _______, RGB_VAI, _______, _______, + _______, NK_TOGG, KC_MPLY, KC_VOLU, KC_MSTP, BL_BRTG, EEP_RST, RESET, _______, _______, _______, RGB_VAI, _______, _______, _______, _______, KC_MPRV, KC_VOLD, KC_MNXT, BL_INC, _______, RGB_SPI, RGB_HUI, RGB_SAI, RGB_RMOD, RGB_MOD, RGB_TOG, _______, _______, _______, KC_MUTE, _______, BL_DEC, _______, 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 645da6cd0bba..2d578aa3d3ed 100644 --- a/layouts/community/60_ansi_split_bs_rshift/bcat/readme.md +++ b/layouts/community/60_ansi_split_bs_rshift/bcat/readme.md @@ -19,6 +19,6 @@ layout](https://github.com/qmk/qmk_firmware/tree/master/layouts/community/60_tsa ## Function 2 layer -![Function 2 layer layout](https://i.imgur.com/WRvsEuZ.png) +![Function 2 layer layout](https://i.imgur.com/vJaCzVo.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 aa70c913295f..2079adb93cb7 100644 --- a/layouts/community/60_tsangan_hhkb/bcat/keymap.c +++ b/layouts/community/60_tsangan_hhkb/bcat/keymap.c @@ -31,7 +31,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Function 2 layer: http://www.keyboard-layout-editor.com/#/gists/65ac939caec878401603bc36290852d4 */ [LAYER_FUNCTION_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_INS, KC_DEL, - _______, _______, KC_MPLY, KC_VOLU, KC_MSTP, BL_BRTG, EEP_RST, RESET, _______, _______, _______, RGB_VAI, _______, _______, + _______, NK_TOGG, KC_MPLY, KC_VOLU, KC_MSTP, BL_BRTG, EEP_RST, RESET, _______, _______, _______, RGB_VAI, _______, _______, _______, _______, KC_MPRV, KC_VOLD, KC_MNXT, BL_INC, _______, RGB_SPI, RGB_HUI, RGB_SAI, RGB_RMOD, RGB_MOD, RGB_TOG, _______, _______, _______, KC_MUTE, _______, BL_DEC, _______, 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 b4eddfcf0450..b7a3cde5d290 100644 --- a/layouts/community/60_tsangan_hhkb/bcat/readme.md +++ b/layouts/community/60_tsangan_hhkb/bcat/readme.md @@ -39,6 +39,6 @@ and/or blockers, so there aren't switches installed in those positions. ## Function 2 layer -![Function 2 layer layout](https://i.imgur.com/37APm7c.png) +![Function 2 layer layout](https://i.imgur.com/vdNpFae.png) ([KLE](http://www.keyboard-layout-editor.com/#/gists/65ac939caec878401603bc36290852d4)) diff --git a/layouts/community/65_ansi_blocker_split_bs/bcat/keymap.c b/layouts/community/65_ansi_blocker_split_bs/bcat/keymap.c index 221fcfba5986..75b891cda0ce 100644 --- a/layouts/community/65_ansi_blocker_split_bs/bcat/keymap.c +++ b/layouts/community/65_ansi_blocker_split_bs/bcat/keymap.c @@ -20,7 +20,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Function layer: http://www.keyboard-layout-editor.com/#/gists/f29128427f674c43777f045e363d1b44 */ [LAYER_FUNCTION] = LAYOUT_65_ansi_blocker_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_INS, KC_DEL, _______, - KC_CAPS, _______, KC_MPLY, KC_VOLU, KC_MSTP, _______, EEP_RST, RESET, KC_PSCR, KC_SLCK, KC_PAUS, _______, _______, _______, _______, + KC_CAPS, NK_TOGG, KC_MPLY, KC_VOLU, KC_MSTP, _______, EEP_RST, RESET, KC_PSCR, KC_SLCK, KC_PAUS, _______, _______, _______, _______, _______, _______, KC_MPRV, KC_VOLD, KC_MNXT, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_APP, _______, KC_MUTE, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ diff --git a/layouts/community/65_ansi_blocker_split_bs/bcat/readme.md b/layouts/community/65_ansi_blocker_split_bs/bcat/readme.md index c7ea966d8d43..0726cbecee26 100644 --- a/layouts/community/65_ansi_blocker_split_bs/bcat/readme.md +++ b/layouts/community/65_ansi_blocker_split_bs/bcat/readme.md @@ -12,6 +12,6 @@ keys, an HHKB-style (split) backspace, and media controls in the function layer ## Function layer -![Function layer layout](https://i.imgur.com/Q304GlI.png) +![Function layer layout](https://i.imgur.com/CsxfVfd.png) ([KLE](http://www.keyboard-layout-editor.com/#/gists/f29128427f674c43777f045e363d1b44)) diff --git a/users/bcat/rules.mk b/users/bcat/rules.mk index f979c703f84f..a595d1f588e8 100644 --- a/users/bcat/rules.mk +++ b/users/bcat/rules.mk @@ -3,10 +3,15 @@ SRC += bcat.c # Enable Bootmagic Lite to consistently reset to bootloader and clear EEPROM. BOOTMAGIC_ENABLE = lite -# Enable media keys on all keyboards. (Even though I don't use mouse keys, they -# seem to be required for media keys to register on Chrome OS.) +# Enable media keys on all keyboards. EXTRAKEY_ENABLE = yes -MOUSEKEY_ENABLE = yes + +# Enable N-key rollover on all keyboards. In addition to its intended +# functionality, as of July 2020, this is required for Chrome OS to process +# media keys. (It appears that Chrome OS filters out key events from the second +# USB endpoint's consumer and system control devices unless that endpoint also +# reports a keyboard or mouse device.) +NKRO_ENABLE = yes # Enable link-time optimization to reduce binary size. LINK_TIME_OPTIMIZATION_ENABLE = yes @@ -14,7 +19,7 @@ LINK_TIME_OPTIMIZATION_ENABLE = yes # Disable unused build options on all keyboards. COMMAND_ENABLE = no CONSOLE_ENABLE = no -NKRO_ENABLE = no +MOUSEKEY_ENABLE = no TERMINAL_ENABLE = no # Disable unused hardware options on all keyboards. @@ -22,7 +27,7 @@ FAUXCLICKY_ENABLE = no MIDI_ENABLE = no SLEEP_LED_ENABLE = no -# Disable unused other options. +# Disable other unused options on all keyboards. API_SYSEX_ENABLE = no AUTO_SHIFT_ENABLE = no COMBO_ENABLE = no From e620a7beb2beebee3881f7061eac218beb668e26 Mon Sep 17 00:00:00 2001 From: Matthew Weldon Date: Thu, 23 Jul 2020 22:42:56 -0400 Subject: [PATCH 423/930] [Keyboard] add encoder support to PlaidPad default mappings (#9396) * Add flipped and discrete encoder support default mappings * Fixed typo in readme * Removed flipped layout, fix config.h encoder pin mapping, update readme Co-authored-by: matt --- keyboards/keycapsss/plaid_pad/config.h | 6 ++++-- keyboards/keycapsss/plaid_pad/keymaps/default/keymap.c | 4 ++-- keyboards/keycapsss/plaid_pad/keymaps/default/readme.md | 8 +++++--- 3 files changed, 11 insertions(+), 7 deletions(-) diff --git a/keyboards/keycapsss/plaid_pad/config.h b/keyboards/keycapsss/plaid_pad/config.h index 1d0b31a40146..f456bf84410d 100644 --- a/keyboards/keycapsss/plaid_pad/config.h +++ b/keyboards/keycapsss/plaid_pad/config.h @@ -18,8 +18,10 @@ #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 ENCODERS_PAD_A { D1, B2 } +#define ENCODERS_PAD_B { D0, B1 } + + #define ENCODER_RESOLUTION 4 /* COL2ROW, ROW2COL*/ diff --git a/keyboards/keycapsss/plaid_pad/keymaps/default/keymap.c b/keyboards/keycapsss/plaid_pad/keymaps/default/keymap.c index bdfd7fb780bc..7de3be5bd3d5 100644 --- a/keyboards/keycapsss/plaid_pad/keymaps/default/keymap.c +++ b/keyboards/keycapsss/plaid_pad/keymaps/default/keymap.c @@ -30,9 +30,9 @@ void keyboard_post_init_user(void) { void encoder_update_user(uint8_t index, bool clockwise) { if (index == 0) { // First encoder - top left if (clockwise) { - tap_code(KC_UP); + tap_code(KC_RIGHT); } else { - tap_code(KC_DOWN); + tap_code(KC_LEFT); } } else if (index == 1) { // Second encoder - top right if (clockwise) { diff --git a/keyboards/keycapsss/plaid_pad/keymaps/default/readme.md b/keyboards/keycapsss/plaid_pad/keymaps/default/readme.md index 1c1b1513dd1a..ccbea5f86521 100644 --- a/keyboards/keycapsss/plaid_pad/keymaps/default/readme.md +++ b/keyboards/keycapsss/plaid_pad/keymaps/default/readme.md @@ -3,9 +3,11 @@ # Default Plaid-Pad Layout -This is the default layout that comes flashed on every Plaid-Pad. +This is the default layout for the 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. +Encoders with built-in switch are supported and map to the original keys (7) and (/). +The upper left encoder performs a tap on "Right Arrow" (KC_RIGHT) and "Left Arrow" (KC_LEFT) when rotated clockwise and counter-clockwise in the respective direction for each step of the encoder. + +The upper right encoder performs a tap on "Up Arrow" (KC_UP) and "Down Arrow" (KC_DOWN) when rotated clockwise and counter-clockwise in the respective direction for each step of the encoder. From a50c0049f68f666d1fe49d895743b27d1036ccb3 Mon Sep 17 00:00:00 2001 From: Koobaczech <67293963+Koobaczech@users.noreply.github.com> Date: Thu, 23 Jul 2020 23:01:39 -0400 Subject: [PATCH 424/930] [Keyboard] Add Pandora keyboard (#9592) * Pandora Co-authored-by: Ryan Co-authored-by: Ethan Madden Co-authored-by: Erovia Co-authored-by: Ryan --- keyboards/pandora/config.h | 81 ++++++++++++++++++++++ keyboards/pandora/info.json | 12 ++++ keyboards/pandora/keymaps/default/keymap.c | 41 +++++++++++ keyboards/pandora/keymaps/via/keymap.c | 56 +++++++++++++++ keyboards/pandora/keymaps/via/rules.mk | 1 + keyboards/pandora/pandora.c | 35 ++++++++++ keyboards/pandora/pandora.h | 38 ++++++++++ keyboards/pandora/readme.md | 21 ++++++ keyboards/pandora/rules.mk | 25 +++++++ 9 files changed, 310 insertions(+) create mode 100644 keyboards/pandora/config.h create mode 100644 keyboards/pandora/info.json create mode 100644 keyboards/pandora/keymaps/default/keymap.c create mode 100644 keyboards/pandora/keymaps/via/keymap.c create mode 100644 keyboards/pandora/keymaps/via/rules.mk create mode 100644 keyboards/pandora/pandora.c create mode 100644 keyboards/pandora/pandora.h create mode 100644 keyboards/pandora/readme.md create mode 100644 keyboards/pandora/rules.mk diff --git a/keyboards/pandora/config.h b/keyboards/pandora/config.h new file mode 100644 index 000000000000..c076301b98db --- /dev/null +++ b/keyboards/pandora/config.h @@ -0,0 +1,81 @@ +/* +Copyright 2020 Koobaczech + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License 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 0x6963 +#define PRODUCT_ID 0x6963 +#define DEVICE_VER 0x0002 +#define MANUFACTURER Koobaczech +#define PRODUCT Pandora +#define DESCRIPTION Premium 60% with cool ass shiz developed by Koobae + +/* 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 { B4, D7, D6, B3, B0 } +#define MATRIX_COL_PINS { D2, D1, D0, D3, D5, B5, B6, B7, D4, C6, C7, F0, F1, F4, F7 } +#define UNUSED_PINS + +/* COL2ROW, ROW2COL*/ +#define DIODE_DIRECTION COL2ROW + +/* Encoder Function */ +#define ENCODERS_PAD_A { F6 } +#define ENCODERS_PAD_B { F5 } +//#define ENCODER_DIRECTION_FLIP +#define ENCODER_RESOLUTION 1 +#define DIP_SWITCH_PINS { B2, B5 } + +//#define BACKLIGHT_PIN +//#define BACKLIGHT_LEVELS 5 +// #define BACKLIGHT_BREATHING + +/*== all animations enabled ==*/ +/* If RGBLIGHT_SLEEP defined, the RGB lighting will be switched off when the host goes to sleep */ +#define RGB_DI_PIN B1 +#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 +# define RGBLIGHT_SLEEP +#endif + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCE 0 + +/* 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/pandora/info.json b/keyboards/pandora/info.json new file mode 100644 index 000000000000..03b75b361728 --- /dev/null +++ b/keyboards/pandora/info.json @@ -0,0 +1,12 @@ +{ + "keyboard_name": "Pandora", + "url": "", + "maintainer": "Koobaczech", + "width": 15, + "height": 5, + "layouts": { + "LAYOUT": { + "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":"0,4", "x":4, "y":0}, {"label":"0,5", "x":5, "y":0}, {"label":"0,6", "x":6, "y":0}, {"label":"0,7", "x":7, "y":0}, {"label":"0,8", "x":8, "y":0}, {"label":"0,9", "x":9, "y":0}, {"label":"0,10", "x":10, "y":0}, {"label":"0,11", "x":11, "y":0}, {"label":"0,12", "x":12, "y":0}, {"label":"0,13", "x":13, "y":0}, {"label":"0,14", "x":14, "y":0}, {"label":"1,0", "x":0, "y":1, "w":1.5}, {"label":"1,1", "x":1.5, "y":1}, {"label":"1,2", "x":2.5, "y":1}, {"label":"1,3", "x":3.5, "y":1}, {"label":"1,4", "x":4.5, "y":1}, {"label":"1,5", "x":5.5, "y":1}, {"label":"1,6", "x":6.5, "y":1}, {"label":"1,7", "x":7.5, "y":1}, {"label":"1,8", "x":8.5, "y":1}, {"label":"1,9", "x":9.5, "y":1}, {"label":"1,10", "x":10.5, "y":1}, {"label":"1,11", "x":11.5, "y":1}, {"label":"1,12", "x":12.5, "y":1}, {"label":"1,13", "x":13.5, "y":1, "w":1.5}, {"label":"2,0", "x":0, "y":2, "w":1.75}, {"label":"2,1", "x":1.75, "y":2}, {"label":"2,2", "x":2.75, "y":2}, {"label":"2,3", "x":3.75, "y":2}, {"label":"2,4", "x":4.75, "y":2}, {"label":"2,5", "x":5.75, "y":2}, {"label":"2,6", "x":6.75, "y":2}, {"label":"2,7", "x":7.75, "y":2}, {"label":"2,8", "x":8.75, "y":2}, {"label":"2,9", "x":9.75, "y":2}, {"label":"2,10", "x":10.75, "y":2}, {"label":"2,11", "x":11.75, "y":2}, {"label":"2,12", "x":12.75, "y":2}, {"label":"2,13", "x":13.75, "y":2, "w":1.25}, {"label":"3,0", "x":0, "y":3, "w":1.25}, {"label":"3,1", "x":1.25, "y":3}, {"label":"3,2", "x":2.25, "y":3}, {"label":"3,3", "x":3.25, "y":3}, {"label":"3,4", "x":4.25, "y":3}, {"label":"3,5", "x":5.25, "y":3}, {"label":"3,6", "x":6.25, "y":3}, {"label":"3,7", "x":7.25, "y":3}, {"label":"3,8", "x":8.25, "y":3}, {"label":"3,9", "x":9.25, "y":3}, {"label":"3,10", "x":10.25, "y":3}, {"label":"3,11", "x":11.25, "y":3}, {"label":"3,12", "x":12.25, "y":3, "w":1.75}, {"label":"3,13", "x":14, "y":3}, {"label":"4,0", "x":0, "y":4, "w":1.25}, {"label":"4,1", "x":1.25, "y":4, "w":1.25}, {"label":"4,2", "x":2.5, "y":4, "w":1.25}, {"label":"4,6", "x":3.75, "y":4, "w":6.25}, {"label":"4,10", "x":10, "y":4, "w":1.25}, {"label":"4,11", "x":11.25, "y":4, "w":1.25}, {"label":"4,12", "x":12.5, "y":4, "w":1.25}, {"label":"4,13", "x":13.75, "y":4, "w":1.25}] + } + } +} diff --git a/keyboards/pandora/keymaps/default/keymap.c b/keyboards/pandora/keymaps/default/keymap.c new file mode 100644 index 000000000000..2ab65a78c177 --- /dev/null +++ b/keyboards/pandora/keymaps/default/keymap.c @@ -0,0 +1,41 @@ +#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_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_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, KC_APP, KC_RCTL), + + [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_TRNS, KC_DEL, + 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_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_INS, KC_HOME, KC_PGUP, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, BL_DEC, BL_TOGG, BL_INC, BL_STEP, KC_TRNS, KC_DEL, KC_END, KC_PGDN, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS) +}; + +// Encoder rotate function +void encoder_update_user(uint8_t index, bool clockwise) { + /* First encoder */ + if (index == 0) { + if (clockwise) { + tap_code(KC_AUDIO_VOL_UP); + } else { + tap_code(KC_AUDIO_VOL_DOWN); + } + } +} + +// Encoder click function +void dip_switch_update_user(uint8_t index, bool active) { + switch (index) { + /* First encoder */ + case 0: + if (active) { + tap_code(KC_MUTE); + } + break; + } +} diff --git a/keyboards/pandora/keymaps/via/keymap.c b/keyboards/pandora/keymaps/via/keymap.c new file mode 100644 index 000000000000..f89d66ec57e2 --- /dev/null +++ b/keyboards/pandora/keymaps/via/keymap.c @@ -0,0 +1,56 @@ +#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_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_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, KC_APP, KC_RCTL), + + [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_TRNS, KC_DEL, + 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_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_INS, KC_HOME, KC_PGUP, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, BL_DEC, BL_TOGG, BL_INC, BL_STEP, KC_TRNS, KC_DEL, KC_END, KC_PGDN, 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) +}; + +// Encoder rotate function +void encoder_update_user(uint8_t index, bool clockwise) { + /* First encoder */ + if (index == 0) { + if (clockwise) { + tap_code(KC_AUDIO_VOL_UP); + } else { + tap_code(KC_AUDIO_VOL_DOWN); + } + } +} + +// Encoder click function +void dip_switch_update_user(uint8_t index, bool active) { + switch (index) { + /* First encoder */ + case 0: + if (active) { + tap_code(KC_MUTE); + } + break; + } +} diff --git a/keyboards/pandora/keymaps/via/rules.mk b/keyboards/pandora/keymaps/via/rules.mk new file mode 100644 index 000000000000..1e5b99807cb7 --- /dev/null +++ b/keyboards/pandora/keymaps/via/rules.mk @@ -0,0 +1 @@ +VIA_ENABLE = yes diff --git a/keyboards/pandora/pandora.c b/keyboards/pandora/pandora.c new file mode 100644 index 000000000000..6c5d8a166fd2 --- /dev/null +++ b/keyboards/pandora/pandora.c @@ -0,0 +1,35 @@ +/* Copyright 2020 Koobaczech + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#include "pandora.h" + +void matrix_init_kb(void) { + matrix_init_user(); + led_init_ports(); +}; + +void led_init_ports(void) { + setPinOutput(E6); + writePinHigh(E6); +} + +bool led_update_kb(led_t led_state) { + bool res = led_update_user(led_state); + if(res) { + writePin(E6, !led_state.caps_lock); + } + return res; +} diff --git a/keyboards/pandora/pandora.h b/keyboards/pandora/pandora.h new file mode 100644 index 000000000000..d73ae8447380 --- /dev/null +++ b/keyboards/pandora/pandora.h @@ -0,0 +1,38 @@ +/* Copyright 2020 Koobaczech + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +/* + * This layout covers all of the possible build layouts. Also, any + * built layouts will work without having to change anything. +*/ + +#pragma once + +#include "quantum.h" + +#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, \ + 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, 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, KC_NO }, \ + { k20, k21, 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, KC_NO }, \ + { k40, k41, k42, KC_NO, KC_NO, KC_NO, k46, KC_NO, KC_NO, KC_NO, k4a, k4b, k4c, k4d, KC_NO } \ +} diff --git a/keyboards/pandora/readme.md b/keyboards/pandora/readme.md new file mode 100644 index 000000000000..4870c9981c93 --- /dev/null +++ b/keyboards/pandora/readme.md @@ -0,0 +1,21 @@ +# Pandora + +![Pandora](https://i.imgur.com/fQRmwfO.jpg) + +Pandora is an ultra premium 60 percent keyboard. The construction uses 6063 alu, +pvd coated brass/stainless steel and dyed polycarbonate. The finishes include +e-coating, anodizing, micro arc anodization, metal polish and fine beadblasting. +Layouts are limited to a few ANSI variations such as tsangan/wkl and ISO. The +keyboard also has a usb-c daugtherboard, an integrated usb hub and rotary +encoder. The case has indicator lights for caps and is gasket mounted. The pcb +is designed by me in house and has some super cool tricks up its sleeve as well. + +* Keyboard Maintainer: Koobaczech +* Hardware Supported: Pandora +* Availability: Link to come + +Make example for this keyboard (after setting up your build environment): + + make pandora: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/pandora/rules.mk b/keyboards/pandora/rules.mk new file mode 100644 index 000000000000..3d5f2f0bda53 --- /dev/null +++ b/keyboards/pandora/rules.mk @@ -0,0 +1,25 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +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 = yes # Enable keyboard RGB underglow +BLUETOOTH_ENABLE = no # Enable Bluetooth +AUDIO_ENABLE = no # Audio output +DIP_SWITCH_ENABLE = yes +ENCODER_ENABLE = yes +OLED_DRIVER_ENABLE = no # Future release From 2cebac6f2f7f5a49adf7f2ce8a94c8ba1dbef707 Mon Sep 17 00:00:00 2001 From: MechMerlin <30334081+mechmerlin@users.noreply.github.com> Date: Thu, 23 Jul 2020 20:17:38 -0700 Subject: [PATCH 425/930] [Keyboard] VIA Support: DO60 (#9622) * fix up that vendor ID * add a VIA enabled keymap * use pragma once * clean up indicator leds code * remove unused header --- keyboards/do60/config.h | 2 +- keyboards/do60/do60.c | 37 +++++-------------------- keyboards/do60/do60.h | 5 +--- keyboards/do60/keymaps/default/keymap.c | 5 ---- keyboards/do60/keymaps/via/keymap.c | 35 +++++++++++++++++++++++ keyboards/do60/keymaps/via/readme.md | 5 ++++ keyboards/do60/keymaps/via/rules.mk | 2 ++ 7 files changed, 51 insertions(+), 40 deletions(-) create mode 100644 keyboards/do60/keymaps/via/keymap.c create mode 100644 keyboards/do60/keymaps/via/readme.md create mode 100644 keyboards/do60/keymaps/via/rules.mk diff --git a/keyboards/do60/config.h b/keyboards/do60/config.h index 82e818328c29..acaa64646f43 100644 --- a/keyboards/do60/config.h +++ b/keyboards/do60/config.h @@ -21,7 +21,7 @@ along with this program. If not, see . #include "config_common.h" /* USB Device descriptor parameter */ -#define VENDOR_ID 0xFEED +#define VENDOR_ID 0x4453 // DS for Doyu Studios #define PRODUCT_ID 0x6060 #define DEVICE_VER 0x0001 #define MANUFACTURER Shopkey by Doyu Studio diff --git a/keyboards/do60/do60.c b/keyboards/do60/do60.c index c1e509c5db74..3dba9b53593a 100644 --- a/keyboards/do60/do60.c +++ b/keyboards/do60/do60.c @@ -1,11 +1,4 @@ #include "do60.h" -#include "led.h" - -//extern inline void do60_caps_led_on(void); -//extern inline void do60_bl_led_on(void); - -//extern inline void do60_caps_led_off(void); -//extern inline void do60_bl_led_off(void); extern inline void setdefaultrgb(void); @@ -18,33 +11,17 @@ void matrix_init_kb(void) { setdefaultrgb(); }; -void matrix_scan_kb(void) { - // Looping keyboard code goes here - // This runs every cycle (a lot) - matrix_scan_user(); -}; - void led_init_ports(void) { // Set caps lock LED pin as output - DDRB |= (1 << 2); + setPinOutput(B2); // Default to off - PORTB |= (1 << 2); + writePinHigh(B2); } -void led_set_kb(uint8_t usb_led) { - //if (usb_led & (1< Date: Fri, 24 Jul 2020 14:51:54 +0800 Subject: [PATCH 426/930] [Keyboard] Add N87 Keyboard (#9663) * Add new keyboard, the N87 * Deleted config.h and readme.md on tsangan keymap folder * Edited layout names on keymap.c and n87.h. Disabled audio * Edited files based on requested changes, re-enabled audio on extra data pin B7, enabled audio click, disabled music mode * Updated the wiring matrix for symmetric_standard layout --- keyboards/nightly_boards/n87/config.h | 229 ++++++++++++++ keyboards/nightly_boards/n87/info.json | 286 ++++++++++++++++++ .../n87/keymaps/default/keymap.c | 36 +++ .../n87/keymaps/symmetric_standard/keymap.c | 36 +++ .../n87/keymaps/tsangan/keymap.c | 36 +++ keyboards/nightly_boards/n87/n87.c | 17 ++ keyboards/nightly_boards/n87/n87.h | 93 ++++++ keyboards/nightly_boards/n87/readme.md | 14 + keyboards/nightly_boards/n87/rules.mk | 32 ++ 9 files changed, 779 insertions(+) create mode 100644 keyboards/nightly_boards/n87/config.h create mode 100644 keyboards/nightly_boards/n87/info.json create mode 100644 keyboards/nightly_boards/n87/keymaps/default/keymap.c create mode 100644 keyboards/nightly_boards/n87/keymaps/symmetric_standard/keymap.c create mode 100644 keyboards/nightly_boards/n87/keymaps/tsangan/keymap.c create mode 100644 keyboards/nightly_boards/n87/n87.c create mode 100644 keyboards/nightly_boards/n87/n87.h create mode 100644 keyboards/nightly_boards/n87/readme.md create mode 100644 keyboards/nightly_boards/n87/rules.mk diff --git a/keyboards/nightly_boards/n87/config.h b/keyboards/nightly_boards/n87/config.h new file mode 100644 index 000000000000..bb0e7b4f56c7 --- /dev/null +++ b/keyboards/nightly_boards/n87/config.h @@ -0,0 +1,229 @@ +/* +Copyright 2020 Neil Brian Ramirez + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License 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 0x0717 +#define PRODUCT_ID 0x0001 +#define DEVICE_VER 0x0001 +#define MANUFACTURER Neil Brian Ramirez +#define PRODUCT [n]87 +#define DESCRIPTION A TKL pcb that supports standard, tsangan and symmetrical standard bottom row + +/* key matrix size */ +#define MATRIX_ROWS 12 +#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 MATRIX_ROW_PINS { B0, B1, B2, B3, F1, F0, D7, B4, D1, D2, D3, D5 } +#define MATRIX_COL_PINS { F7, F6, F5, F4, C7, C6, B6, B5, 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 // or D1, D2, D3, E6 + +// #define BACKLIGHT_PIN B7 +// #define BACKLIGHT_BREATHING +// #define BACKLIGHT_LEVELS 3 + +#define RGB_DI_PIN D0 +#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 + +#define B7_AUDIO + +#define AUDIO_CLICKY + +#define NO_MUSIC_MODE + +/* 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 */ +#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 0 diff --git a/keyboards/nightly_boards/n87/info.json b/keyboards/nightly_boards/n87/info.json new file mode 100644 index 000000000000..e704caed6791 --- /dev/null +++ b/keyboards/nightly_boards/n87/info.json @@ -0,0 +1,286 @@ +{ + "keyboard_name": "[n]87", + "url": "", + "maintainer": "Neil Brian Ramirez", + "width": 18.25, + "height": 6.25, + "layouts": { + "LAYOUT_tkl_ansi_split_bs_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}, + {"x": 14, "y": 1.25}, + {"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_ansi_split_bs_rshift_tsangan": { + "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}, + {"x": 14, "y": 1.25}, + {"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.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_ansi_split_bs_rshift_symmetric": { + "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}, + {"x": 14, "y": 1.25}, + {"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.875, "y": 5.25, "w": 1.25}, + {"x": 3.125, "y": 5.25, "w": 1.25}, + {"x": 4.375, "y": 5.25, "w": 6.25}, + {"x": 10.625, "y": 5.25, "w": 1.25}, + {"x": 11.875, "y": 5.25, "w": 1.25}, + {"x": 13.755, "y": 5.25, "w": 1.25}, + {"x": 15.25, "y": 5.25}, + {"x": 16.25, "y": 5.25}, + {"x": 17.25, "y": 5.25} + ] + } + } +} \ No newline at end of file diff --git a/keyboards/nightly_boards/n87/keymaps/default/keymap.c b/keyboards/nightly_boards/n87/keymaps/default/keymap.c new file mode 100644 index 000000000000..70484db21012 --- /dev/null +++ b/keyboards/nightly_boards/n87/keymaps/default/keymap.c @@ -0,0 +1,36 @@ +/* Copyright 2020 Neil Brian Ramirez + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public 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] = { + /* Base */ + [0] = LAYOUT_tkl_ansi_split_bs_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_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_LSFT, MO(1), KC_UP, + KC_LCTL, MO(1), KC_LALT, KC_SPC, KC_LALT, KC_LGUI, KC_MENU, KC_LCTL, KC_LEFT, KC_DOWN, KC_RGHT + ), + [1] = LAYOUT_tkl_ansi_split_bs_rshift( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, CLICKY_UP, CLICKY_RESET, RESET, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, CLICKY_DOWN, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, CLICKY_TOGGLE, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, _______, _______, _______, _______, KC_VOLU, + _______, _______, _______, _______, _______, _______, _______, _______, KC_BRID, KC_VOLD, KC_BRIU + ) +}; diff --git a/keyboards/nightly_boards/n87/keymaps/symmetric_standard/keymap.c b/keyboards/nightly_boards/n87/keymaps/symmetric_standard/keymap.c new file mode 100644 index 000000000000..c8b2da0f9e9e --- /dev/null +++ b/keyboards/nightly_boards/n87/keymaps/symmetric_standard/keymap.c @@ -0,0 +1,36 @@ +/* Copyright 2020 Neil Brian Ramirez + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public 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] = { + /* Base */ + [0] = LAYOUT_tkl_ansi_split_bs_rshift_symmetric( + 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_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_LSFT, MO(1), KC_UP, + KC_LCTL, MO(1), KC_LALT, KC_SPC, KC_LALT, KC_LGUI, KC_LCTL, KC_LEFT, KC_DOWN, KC_RGHT + ), + [1] = LAYOUT_tkl_ansi_split_bs_rshift_symmetric( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, CLICKY_UP, CLICKY_RESET, RESET, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, CLICKY_DOWN, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, CLICKY_TOGGLE, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, _______, _______, _______, _______, KC_VOLU, + _______, _______, _______, _______, _______, _______, _______, KC_BRID, KC_VOLD, KC_BRIU + ) +}; diff --git a/keyboards/nightly_boards/n87/keymaps/tsangan/keymap.c b/keyboards/nightly_boards/n87/keymaps/tsangan/keymap.c new file mode 100644 index 000000000000..05e63a615856 --- /dev/null +++ b/keyboards/nightly_boards/n87/keymaps/tsangan/keymap.c @@ -0,0 +1,36 @@ +/* Copyright 2020 Neil Brian Ramirez + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public 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] = { + /* Base */ + [0] = LAYOUT_tkl_ansi_split_bs_rshift_tsangan( + 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_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_LSFT, MO(1), KC_UP, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_LALT, KC_LGUI, KC_LCTL, KC_LEFT, KC_DOWN, KC_RGHT + ), + [1] = LAYOUT_tkl_ansi_split_bs_rshift_tsangan( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, CLICKY_UP, CLICKY_RESET, RESET, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, CLICKY_DOWN, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, CLICKY_TOGGLE, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, _______, _______, _______, _______, KC_VOLU, + _______, _______, _______, _______, _______, _______, _______, KC_BRID, KC_VOLD, KC_BRIU + ) +}; diff --git a/keyboards/nightly_boards/n87/n87.c b/keyboards/nightly_boards/n87/n87.c new file mode 100644 index 000000000000..a9cf87a1b6f8 --- /dev/null +++ b/keyboards/nightly_boards/n87/n87.c @@ -0,0 +1,17 @@ +/* Copyright 2020 Neil Brian Ramirez + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#include "n87.h" diff --git a/keyboards/nightly_boards/n87/n87.h b/keyboards/nightly_boards/n87/n87.h new file mode 100644 index 000000000000..31ab83e5ca2f --- /dev/null +++ b/keyboards/nightly_boards/n87/n87.h @@ -0,0 +1,93 @@ +/* Copyright 2020 Neil Brian Ramirez + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License 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_split_bs_rshift( \ + K00, K10, K01, K11, K02, K03, K13, K04, K14, K05, K15, K06, K16, K17, K08, K18, \ + K20, K30, K21, K31, K22, K32, K23, K33, K24, K34, K25, K35, K26, K36, K27, K37, K28, K38, \ + K40, K50, K41, K51, K42, K52, K43, K53, K44, K54, K45, K55, K46, K56, K57, K48, K58, \ + K60, K61, K71, K62, K72, K63, K73, K64, K74, K65, K75, K66, K76, \ + K80, K81, K91, K82, K92, K83, K93, K84, K94, K85, K95, K86, K96, K88, \ + KA0, KB0, KA1, KA3, KA5, KB5, KA6, KB6, KB7, KA8, KB8 \ +) { \ + { K00, K01, K02, K03, K04, K05, K06, KC_NO, K08 }, \ + { K10, K11, KC_NO, 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, KC_NO, K48 }, \ + { K50, K51, K52, K53, K54, K55, K56, K57, K58 }, \ + { K60, K61, K62, K63, K64, K65, K66, KC_NO, KC_NO }, \ + { KC_NO, K71, K72, K73, K74, K75, K76, KC_NO, KC_NO }, \ + { K80, K81, K82, K83, K84, K85, K86, KC_NO, K88 }, \ + { KC_NO, K91, K92, K93, K94, K95, K96, KC_NO, KC_NO }, \ + { KA0, KA1, KC_NO, KA3, KC_NO, KA5, KA6, KC_NO, KA8 }, \ + { KB0, KC_NO, KC_NO, KC_NO, KC_NO, KB5, KB6, KB7, KB8 }, \ +} + +#define LAYOUT_tkl_ansi_split_bs_rshift_tsangan( \ + K00, K10, K01, K11, K02, K03, K13, K04, K14, K05, K15, K06, K16, K17, K08, K18, \ + K20, K30, K21, K31, K22, K32, K23, K33, K24, K34, K25, K35, K26, K36, K27, K37, K28, K38, \ + K40, K50, K41, K51, K42, K52, K43, K53, K44, K54, K45, K55, K46, K56, K57, K48, K58, \ + K60, K61, K71, K62, K72, K63, K73, K64, K74, K65, K75, K66, K76, \ + K80, K81, K91, K82, K92, K83, K93, K84, K94, K85, K95, K86, K96, K88, \ + KA0, KB0, KA1, KA3, KB5, KA6, KB6, KB7, KA8, KB8 \ +) { \ + { K00, K01, K02, K03, K04, K05, K06, KC_NO, K08 }, \ + { K10, K11, KC_NO, 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, KC_NO, K48 }, \ + { K50, K51, K52, K53, K54, K55, K56, K57, K58 }, \ + { K60, K61, K62, K63, K64, K65, K66, KC_NO, KC_NO }, \ + { KC_NO, K71, K72, K73, K74, K75, K76, KC_NO, KC_NO }, \ + { K80, K81, K82, K83, K84, K85, K86, KC_NO, K88 }, \ + { KC_NO, K91, K92, K93, K94, K95, K96, KC_NO, KC_NO }, \ + { KA0, KA1, KC_NO, KA3, KC_NO, KC_NO, KA6, KC_NO, KA8 }, \ + { KB0, KC_NO, KC_NO, KC_NO, KC_NO, KB5, KB6, KB7, KB8 }, \ +} + +#define LAYOUT_tkl_ansi_split_bs_rshift_symmetric( \ + K00, K10, K01, K11, K02, K03, K13, K04, K14, K05, K15, K06, K16, K17, K08, K18, \ + K20, K30, K21, K31, K22, K32, K23, K33, K24, K34, K25, K35, K26, K36, K27, K37, K28, K38, \ + K40, K50, K41, K51, K42, K52, K43, K53, K44, K54, K45, K55, K46, K56, K57, K48, K58, \ + K60, K61, K71, K62, K72, K63, K73, K64, K74, K65, K75, K66, K76, \ + K80, K81, K91, K82, K92, K83, K93, K84, K94, K85, K95, K86, K96, K88, \ + KA0, KB0, KA1, KA3, KA5, KB5, KB6, KB7, KA8, KB8 \ +) { \ + { K00, K01, K02, K03, K04, K05, K06, KC_NO, K08 }, \ + { K10, K11, KC_NO, 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, KC_NO, K48 }, \ + { K50, K51, K52, K53, K54, K55, K56, K57, K58 }, \ + { K60, K61, K62, K63, K64, K65, K66, KC_NO, KC_NO }, \ + { KC_NO, K71, K72, K73, K74, K75, K76, KC_NO, KC_NO }, \ + { K80, K81, K82, K83, K84, K85, K86, KC_NO, K88 }, \ + { KC_NO, K91, K92, K93, K94, K95, K96, KC_NO, KC_NO }, \ + { KA0, KA1, KC_NO, KA3, KC_NO, KA5, KC_NO, KC_NO, KA8 }, \ + { KB0, KC_NO, KC_NO, KC_NO, KC_NO, KB5, KB6, KB7, KB8 }, \ +} diff --git a/keyboards/nightly_boards/n87/readme.md b/keyboards/nightly_boards/n87/readme.md new file mode 100644 index 000000000000..3cc08af5ae5c --- /dev/null +++ b/keyboards/nightly_boards/n87/readme.md @@ -0,0 +1,14 @@ +# [n]87 + +![n87](https://i.imgur.com/EAIGP1r.jpg) + +A TKL pcb that supports standard, tsangan and symmetrical standard bottom row + +* Keyboard Maintainer: [Neil Brian Ramirez](https://github.com/NightlyBoards) +* Hardware Supported: atmega32u4 + +Make example for this keyboard (after setting up your build environment): + + make nightly_boards/n87: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/nightly_boards/n87/rules.mk b/keyboards/nightly_boards/n87/rules.mk new file mode 100644 index 000000000000..e782e59186c5 --- /dev/null +++ b/keyboards/nightly_boards/n87/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 = 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 +AUDIO_ENABLE = yes # Audio output +FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches + From 0a5997b0afaced65ffd4f640c28558792b16ba73 Mon Sep 17 00:00:00 2001 From: shela Date: Fri, 24 Jul 2020 17:45:30 +0900 Subject: [PATCH 427/930] [Docs] Update Japanese translation of faq_build.md. (#9762) --- docs/ja/faq_build.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/ja/faq_build.md b/docs/ja/faq_build.md index 2b63cef85a9b..bbfec9bfac19 100644 --- a/docs/ja/faq_build.md +++ b/docs/ja/faq_build.md @@ -2,7 +2,7 @@ このページは QMK のビルドに関する質問を説明します。まだビルドをしていない場合は、[ビルド環境のセットアップ](ja/getting_started_build_tools.md) および [Make 手順](ja/getting_started_make_guide.md)ガイドを読むべきです。 @@ -57,7 +57,7 @@ SUBSYSTEMS=="usb", ATTRS{idVendor}=="1b4f", ATTRS{idProduct}=="9203", TAG+="uacc **注意:** 古い(1.12以前の) ModemManager では、フィルタリングは厳密なモードではない場合にのみ動作し、以下のコマンドはその設定を更新することができます。 ```console -sudo sed -i 's/--filter-policy=strict/--filter-policy=default/' /lib/systemd/system/ModemManager.service +printf '[Service]\nExecStart=\nExecStart=/usr/sbin/ModemManager --filter-policy=default' | sudo tee /etc/systemd/system/ModemManager.service.d/policy.conf sudo systemctl daemon-reload sudo systemctl restart ModemManager ``` From 955047dd7dc13f18f0749efc7c31844cbc210153 Mon Sep 17 00:00:00 2001 From: shela Date: Fri, 24 Jul 2020 17:54:34 +0900 Subject: [PATCH 428/930] [Docs] Update Japanese translation of feature_hd44780.md. (#9766) --- docs/ja/feature_hd44780.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/ja/feature_hd44780.md b/docs/ja/feature_hd44780.md index 5ca4aade1e41..6f24d72d7d74 100644 --- a/docs/ja/feature_hd44780.md +++ b/docs/ja/feature_hd44780.md @@ -2,10 +2,10 @@ -これは Peter Fleury の LCD ライブラリの統合です。このページは基本について説明します。[詳細なドキュメントについてはこのページをご覧ください](http://homepage.hispeed.ch/peterfleury/doxygen/avr-gcc-libraries/group__pfleury__lcd.html) (訳注)原文のリンク先のページは、サービスの終了に伴って削除されています。移行先は (http://www.peterfleury.epizy.com/doxygen/avr-gcc-libraries/group__pfleury__lcd.html) と思われます。 +これは Peter Fleury の LCD ライブラリの統合です。このページは基本について説明します。[詳細なドキュメントについてはこのページをご覧ください](http://www.peterfleury.epizy.com/doxygen/avr-gcc-libraries/group__pfleury__lcd.html) HD44780 ディスプレイのサポートを有効にするには、キーボードの `rules.mk` の `HD44780_ENABLE` フラグを yes に設定します。 @@ -59,4 +59,4 @@ LCD_DISP_ON_CURSOR_BLINK : ディスプレイオン、点滅カーソル ディスプレイに何かを表示するには、最初に `lcd_gotoxy(column, line)` を呼びます。最初の行の先頭に移動するには、`lcd_gotoxy(0, 0)` を呼び出し、その後 `lcd_puts("example string")` を使って文字列を出力します。 -ディスプレイを制御することができる、より多くのメソッドがあります。[詳細なドキュメントについてはリンクされたページをご覧ください](http://homepage.hispeed.ch/peterfleury/doxygen/avr-gcc-libraries/group__pfleury__lcd.html) (訳注)原文のリンク先のページは、サービスの終了に伴って削除されています。移行先は (http://www.peterfleury.epizy.com/doxygen/avr-gcc-libraries/group__pfleury__lcd.html) と思われます。 +ディスプレイを制御することができる、より多くのメソッドがあります。[詳細なドキュメントについてはリンクされたページをご覧ください](http://www.peterfleury.epizy.com/doxygen/avr-gcc-libraries/group__pfleury__lcd.html) From 2b960b8bd7d529f135018827c38a0bccea9b1315 Mon Sep 17 00:00:00 2001 From: shela Date: Fri, 24 Jul 2020 18:49:36 +0900 Subject: [PATCH 429/930] [Docs] Update Japanese translation of feature_userspace.md. (#9775) --- docs/ja/feature_userspace.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/ja/feature_userspace.md b/docs/ja/feature_userspace.md index 69381324717e..34e42100766b 100644 --- a/docs/ja/feature_userspace.md +++ b/docs/ja/feature_userspace.md @@ -2,7 +2,7 @@ 似たキーマップを複数のキーボードで使う場合、それらの間でコードを共有できるという利点が得られることがあります。`users/`に以下の構造でキーマップ(理想的には GitHub のユーザ名、``)と同じ名前の独自のフォルダを作成します: @@ -116,7 +116,7 @@ along with this program. If not, see . ## 例 -簡単な例については、[`/users/_example/`](https://github.com/qmk/qmk_firmware/tree/master/users/drashna) を調べてください。 +簡単な例については、[`/users/_example/`](https://github.com/qmk/qmk_firmware/tree/master/users/_example) を調べてください。 より複雑な例については、[`/users/drashna/`](https://github.com/qmk/qmk_firmware/tree/master/users/drashna) のユーザスペースを調べてください。 From 7675e80f5c3e161021388832a4202652c423de5d Mon Sep 17 00:00:00 2001 From: shela Date: Sat, 25 Jul 2020 03:19:46 +0900 Subject: [PATCH 430/930] [Docs] Update Japanese translation of feature_pointing_device.md. (#9771) * Update Japanese translation of feature_pointing_device.md. * Update docs/ja/feature_pointing_device.md * Update feature_pointing_device.md fix original document version. --- docs/ja/feature_pointing_device.md | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/docs/ja/feature_pointing_device.md b/docs/ja/feature_pointing_device.md index 1d655627dde3..f606036d149c 100644 --- a/docs/ja/feature_pointing_device.md +++ b/docs/ja/feature_pointing_device.md @@ -1,8 +1,8 @@ # ポインティングデバイス :id=pointing-device ポインティングデバイスは汎用的な機能の総称です: システムポインタを移動します。マウスキーのような他のオプションも確かにありますが、これは簡単に変更可能で軽量であることを目指しています。機能を制御するためにカスタムキーを実装したり、他の周辺機器から情報を収集してここに直接挿入したりできます - QMK に処理を任せてください。 @@ -26,7 +26,11 @@ report_mouse_t (ここでは "mouseReport") が以下のプロパティを持つ * `mouseReport.h` - これは、水平スクロール(+ 右へ、- 左へ)を表す -127 から 127 (128ではなく、USB HID 仕様で定義されています)の符号付き整数です。 * `mouseReport.buttons` - これは uint8_t で、上位の5ビットを使っています。これらのビットはマウスボタンの状態を表します - ビット 3 はマウスボタン 5、ビット 7 はマウスボタン 1 です。 -マウスレポートが送信されると、x、y、v、h のいずれの値も 0 に設定されます (これは "pointing_device_send()" で行われます。この挙動を回避するためにオーバーライドすることができます)。このように、ボタンの状態は持続しますが、動きは1度だけ起こります。さらにカスタマイズするために、`pointing_device_init` と `pointing_device_task` のどちらもオーバーライドすることができます。 +マウスレポートに必要な変更を行ったら、それを送信する必要があります: + +* `pointing_device_send()` - マウスレポートをホストに送信し、レポートをゼロにします。 + +マウスレポートが送信されると、x、y、v、h のいずれの値も 0 に設定されます (これは `pointing_device_send()` で行われます。この挙動を回避するためにオーバーライドすることができます)。このように、ボタンの状態は持続しますが、動きは1度だけ起こります。さらにカスタマイズするために、`pointing_device_init` と `pointing_device_task` のどちらもオーバーライドすることができます。 以下の例では、カスタムキーを使ってマウスをクリックし垂直および水平方向に127単位スクロールし、リリースされた時にそれを全て元に戻します - なぜならこれは完全に便利な機能だからです。いいですか、以下はひとつの例です: @@ -43,6 +47,7 @@ case MS_SPECIAL: currentReport.buttons &= ~MOUSE_BTN1; } pointing_device_set_report(currentReport); + pointing_device_send(); break; ``` From 7fe491bb54884fdc52160cb7b64f96083ee44d85 Mon Sep 17 00:00:00 2001 From: sotoba Date: Sat, 25 Jul 2020 05:24:58 +0900 Subject: [PATCH 431/930] [Keyboard] Add "craftWalk" keyboard (#9689) * Add craftWalk keyboard * remove config.h * Update keyboards/craftwalk/config.h * Update keyboards/craftwalk/rules.mk * Update keyboards/craftwalk/rules.mk * Update keyboards/craftwalk/info.json * Update keyboards/craftwalk/rules.mk * Update keyboards/craftwalk/config.h * fix bootloader * Update keyboards/craftwalk/rules.mk * Update keyboards/craftwalk/info.json * Update keyboards/craftwalk/config.h * Update keyboards/craftwalk/config.h * Update keyboards/craftwalk/rules.mk * Update keyboards/craftwalk/rules.mk --- keyboards/craftwalk/config.h | 198 ++++++++++++++++++ keyboards/craftwalk/craftwalk.c | 17 ++ keyboards/craftwalk/craftwalk.h | 38 ++++ keyboards/craftwalk/info.json | 27 +++ keyboards/craftwalk/keymaps/default/keymap.c | 47 +++++ keyboards/craftwalk/keymaps/default/readme.md | 1 + keyboards/craftwalk/readme.md | 15 ++ keyboards/craftwalk/rules.mk | 22 ++ 8 files changed, 365 insertions(+) create mode 100644 keyboards/craftwalk/config.h create mode 100644 keyboards/craftwalk/craftwalk.c create mode 100644 keyboards/craftwalk/craftwalk.h create mode 100644 keyboards/craftwalk/info.json create mode 100644 keyboards/craftwalk/keymaps/default/keymap.c create mode 100644 keyboards/craftwalk/keymaps/default/readme.md create mode 100644 keyboards/craftwalk/readme.md create mode 100644 keyboards/craftwalk/rules.mk diff --git a/keyboards/craftwalk/config.h b/keyboards/craftwalk/config.h new file mode 100644 index 000000000000..d7f9f8a309df --- /dev/null +++ b/keyboards/craftwalk/config.h @@ -0,0 +1,198 @@ +/* +Copyright 2020 sotoba + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License 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 0x2E8F +#define DEVICE_VER 0x0001 +#define MANUFACTURER sotoba +#define PRODUCT craftwalk + +/* key matrix size */ +#define MATRIX_ROWS 3 +#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 { F6, B3, B5 } +#define MATRIX_COL_PINS { B1, F7, F5, F4, B2, E6, B4 } +#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 19 + #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 */ +#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/craftwalk/craftwalk.c b/keyboards/craftwalk/craftwalk.c new file mode 100644 index 000000000000..9b1ea8e2e42f --- /dev/null +++ b/keyboards/craftwalk/craftwalk.c @@ -0,0 +1,17 @@ +/* Copyright 2020 sotoba + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#include "craftwalk.h" diff --git a/keyboards/craftwalk/craftwalk.h b/keyboards/craftwalk/craftwalk.h new file mode 100644 index 000000000000..80c32ef05ea6 --- /dev/null +++ b/keyboards/craftwalk/craftwalk.h @@ -0,0 +1,38 @@ +/* Copyright 2020 sotoba + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License 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, \ + k10, k11, k12, k13, \ + k20, k21, k22, k23, k24, k25, k26 \ +) \ +{ \ + { KC_NO, k00, k01, k02, KC_NO, KC_NO, KC_NO }, \ + { k10, k11, k12, k13, KC_NO, KC_NO, KC_NO }, \ + { k20, k21, k22, k23, k24, k25, k26 } \ +} diff --git a/keyboards/craftwalk/info.json b/keyboards/craftwalk/info.json new file mode 100644 index 000000000000..764af5b6485d --- /dev/null +++ b/keyboards/craftwalk/info.json @@ -0,0 +1,27 @@ +{ + "keyboard_name": "craftwalk", + "url": "https://github.com/sotoba/craftwalk", + "maintainer": "sotoba", + "width": 7.25, + "height": 4.5, + "layouts": { + "LAYOUT": { + "layout": [ + {"label":"Q", "x":1.25, "y":0.25}, + {"label":"W", "x":2.25, "y":0}, + {"label":"E", "x":3.25, "y":0.25}, + {"label":"Ctrl", "x":0, "y":1}, + {"label":"A", "x":1.25, "y":1.25}, + {"label":"S", "x":2.25, "y":1}, + {"label":"D", "x":3.25, "y":1.25}, + {"label":"Shift", "x":0, "y":2}, + {"label":"Adjust", "x":1.25, "y":2.25}, + {"label":"Mouse", "x":2.25, "y":2}, + {"label":"Mouse", "x":3.25, "y":2.25}, + {"label":"F", "x":4.25, "y":2}, + {"label":"Num", "x":5.25, "y":3, "h":1.5}, + {"label":"Space", "x":6.25, "y":3, "h":1.5} + ] + } + } +} diff --git a/keyboards/craftwalk/keymaps/default/keymap.c b/keyboards/craftwalk/keymaps/default/keymap.c new file mode 100644 index 000000000000..9acd46d9be2f --- /dev/null +++ b/keyboards/craftwalk/keymaps/default/keymap.c @@ -0,0 +1,47 @@ +/* Copyright 2020 sotoba + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public 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, + _NUM, + _ADJUST +}; + +#define KC_NUM MO(_NUM) +#define KC_ADJ MO(_ADJUST) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* Base */ + [_BASE] = LAYOUT( + KC_Q, KC_W, KC_E, + KC_LCTL, KC_A, KC_S, KC_D, + KC_LSFT, KC_ADJ, KC_WH_U, KC_WH_D, KC_F, KC_NUM, KC_SPC + ), + /* Number */ + [_NUM] = LAYOUT( + KC_1, KC_2, KC_3, + KC_TRNS, KC_4, KC_5, KC_6, + KC_TRNS, KC_7, KC_8, KC_9, KC_F3, KC_TRNS, KC_TRNS + ), + /* Adjust */ + [_ADJUST] = LAYOUT( + RGB_HUI, RGB_SAI, RGB_VAI, + RESET, RGB_HUD, RGB_SAD, RGB_VAD, + RGB_M_T, KC_TRNS, RGB_MOD, RGB_RMOD,RGB_TOG, KC_TRNS, KC_TRNS + ) +}; diff --git a/keyboards/craftwalk/keymaps/default/readme.md b/keyboards/craftwalk/keymaps/default/readme.md new file mode 100644 index 000000000000..7d51f51adf70 --- /dev/null +++ b/keyboards/craftwalk/keymaps/default/readme.md @@ -0,0 +1 @@ +# The default keymap for craftwalk diff --git a/keyboards/craftwalk/readme.md b/keyboards/craftwalk/readme.md new file mode 100644 index 000000000000..183dc12d180f --- /dev/null +++ b/keyboards/craftwalk/readme.md @@ -0,0 +1,15 @@ +# craftWalk + + + +A macro pad for (mine)crafters. + +* Keyboard Maintainer: [sotoba](https://github.com/sotoba) +* Hardware Supported: The craftWalk PCBs, Pro Micro supported +* Hardware Availability: [BOOTH: stupa-devices](https://stupa-devices.booth.pm/) + +Make example for this keyboard (after setting up your build environment): + + make craftwalk: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/craftwalk/rules.mk b/keyboards/craftwalk/rules.mk new file mode 100644 index 000000000000..f5b6bc72c0c8 --- /dev/null +++ b/keyboards/craftwalk/rules.mk @@ -0,0 +1,22 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +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 = 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 +BLUETOOTH_ENABLE = no # Enable Bluetooth +AUDIO_ENABLE = no # Audio output From 1fed91f272bc12d8f033156700cff331143dc530 Mon Sep 17 00:00:00 2001 From: Takeshi ISHII <2170248+mtei@users.noreply.github.com> Date: Sat, 25 Jul 2020 08:38:13 +0900 Subject: [PATCH 432/930] Japanese documents 'original document' comment fix (#9816) --- docs/ja/config_options.md | 2 +- docs/ja/driver_installation_zadig.md | 2 +- docs/ja/faq_build.md | 2 +- docs/ja/feature_dip_switch.md | 2 +- docs/ja/feature_dynamic_macros.md | 2 +- docs/ja/feature_encoders.md | 2 +- docs/ja/feature_hd44780.md | 2 +- docs/ja/feature_layers.md | 2 +- docs/ja/feature_split_keyboard.md | 2 +- docs/ja/feature_userspace.md | 2 +- docs/ja/getting_started_github.md | 2 +- 11 files changed, 11 insertions(+), 11 deletions(-) diff --git a/docs/ja/config_options.md b/docs/ja/config_options.md index 1f4173da1c8d..b4cf3c888ca7 100644 --- a/docs/ja/config_options.md +++ b/docs/ja/config_options.md @@ -1,7 +1,7 @@ # QMK の設定 diff --git a/docs/ja/driver_installation_zadig.md b/docs/ja/driver_installation_zadig.md index ba5438dbff3e..bd794b40763a 100644 --- a/docs/ja/driver_installation_zadig.md +++ b/docs/ja/driver_installation_zadig.md @@ -1,7 +1,7 @@ # Zadig を使ったブートローダドライバのインストール diff --git a/docs/ja/faq_build.md b/docs/ja/faq_build.md index bbfec9bfac19..97e1bd8cf7ca 100644 --- a/docs/ja/faq_build.md +++ b/docs/ja/faq_build.md @@ -1,7 +1,7 @@ # よくあるビルドの質問 diff --git a/docs/ja/feature_dip_switch.md b/docs/ja/feature_dip_switch.md index 2a418d5f5d9a..a0f6aeb0035f 100644 --- a/docs/ja/feature_dip_switch.md +++ b/docs/ja/feature_dip_switch.md @@ -1,7 +1,7 @@ # DIP スイッチ diff --git a/docs/ja/feature_dynamic_macros.md b/docs/ja/feature_dynamic_macros.md index 533c1c548fb7..f3e587136740 100644 --- a/docs/ja/feature_dynamic_macros.md +++ b/docs/ja/feature_dynamic_macros.md @@ -1,7 +1,7 @@ # 動的マクロ: ランタイムでのマクロの記録および再生 diff --git a/docs/ja/feature_encoders.md b/docs/ja/feature_encoders.md index 66f7fd5dc3d7..7b7f394c83fe 100644 --- a/docs/ja/feature_encoders.md +++ b/docs/ja/feature_encoders.md @@ -1,7 +1,7 @@ # エンコーダ diff --git a/docs/ja/feature_hd44780.md b/docs/ja/feature_hd44780.md index 6f24d72d7d74..b4e1ef03ab37 100644 --- a/docs/ja/feature_hd44780.md +++ b/docs/ja/feature_hd44780.md @@ -1,7 +1,7 @@ # HD44780 LCD ディスプレイ diff --git a/docs/ja/feature_layers.md b/docs/ja/feature_layers.md index d6e77ffe419d..d27251f7e3b3 100644 --- a/docs/ja/feature_layers.md +++ b/docs/ja/feature_layers.md @@ -1,7 +1,7 @@ # レイヤー :id=layers diff --git a/docs/ja/feature_split_keyboard.md b/docs/ja/feature_split_keyboard.md index 2dcfc366df59..74b62310fbf1 100644 --- a/docs/ja/feature_split_keyboard.md +++ b/docs/ja/feature_split_keyboard.md @@ -1,7 +1,7 @@ # 分割キーボード diff --git a/docs/ja/feature_userspace.md b/docs/ja/feature_userspace.md index 34e42100766b..d0d46f63f87e 100644 --- a/docs/ja/feature_userspace.md +++ b/docs/ja/feature_userspace.md @@ -1,7 +1,7 @@ # ユーザスペース: キーマップ間でのコードの共有 diff --git a/docs/ja/getting_started_github.md b/docs/ja/getting_started_github.md index d0148a3ceec9..a768f8926a98 100644 --- a/docs/ja/getting_started_github.md +++ b/docs/ja/getting_started_github.md @@ -1,7 +1,7 @@ # QMK で GitHub を使う方法 From 656a8327f467fc47994afe8174bba417806acd25 Mon Sep 17 00:00:00 2001 From: umi <57262844+umi-umi@users.noreply.github.com> Date: Sat, 25 Jul 2020 09:33:20 +0900 Subject: [PATCH 433/930] [Docs] Japanese translation of docs/flashing_bootloadhid.md (#9680) * add flashing_bootloadhid.md translation * update based on comment --- docs/ja/flashing_bootloadhid.md | 75 +++++++++++++++++++++++++++++++++ 1 file changed, 75 insertions(+) create mode 100644 docs/ja/flashing_bootloadhid.md diff --git a/docs/ja/flashing_bootloadhid.md b/docs/ja/flashing_bootloadhid.md new file mode 100644 index 000000000000..ddcd776c240d --- /dev/null +++ b/docs/ja/flashing_bootloadhid.md @@ -0,0 +1,75 @@ +# BootloadHID の書き込み手順とブートローダの情報 + + + +ps2avr(GB) キーボードは ATmega32A マイクロコントローラを使い、異なるブートローダを使います。それは通常の QMK の方法を使って書き込むことができません。 + +一般的な書き込みシーケンス: + +1. 以下のいずれかの方法を使ってブートローダに入ります: + * `RESET` キーコードをタップします (全てのデバイスでは動作しないかもしれません) + * ソルトキーを押し続けながらキーボードを接続します (通常はキーボードの readme に書かれています) +2. OS がデバイスを検知するのを待ちます。 +3. .hex ファイルを書き込みます +4. デバイスをアプリケーションモードにリセットします(自動的に実行されるかもしれません) + +## bootloadHID の書き込みターゲット + +?> [こちら](ja/newbs_getting_started.md)で詳しく説明されている QMK インストールスクリプトを使うと、必要な bootloadHID ツールが自動的にインストールされます。 + +コマンドライン経由で書き込むには、以下のコマンドを実行してターゲット `:bootloadHID` を使います: + + make ::bootloadHID + +## GUI 書き込み + +### Windows +1. [HIDBootFlash](http://vusb.wikidot.com/project:hidbootflash) をダウンロードします。 +2. キーボードをリセットします。 +3. 設定された VendorID が `16c0` で、ProductID が `05df` であることを確認します +4. `Find Device` ボタンを押し、キーボードが見つかることを確認します。 +5. `Open .hex File` ボタンを押し、作成した `.hex` ファイルを見つけます。 +6. `Flash Device` ボタンを押し、処理が完了するまで待ちます。 + +## コマンドライン書き込み + +1. キーボードをリセットします。 +2. `bootloadHID -r` に続けて `.hex` ファイルへのパスを入力し、キーボードに書き込みます。 + +### Windows 手動インストール +MSYS2の場合: +1. https://www.obdev.at/downloads/vusb/bootloadHID.2012-12-08.tar.gz から BootloadHID ファームウェアパッケージをダウンロードします。 +2. 互換性のあるツール、例えば 7-Zip を使って内容を抽出します。 +3. 解凍された書庫から MSYS2 インストール先、通常 `C:\msys64\usr\bin` に `commandline/bootloadHID.exe` をコピーして、MSYS パスに追加します。 + +ネイティブの Windows 書き込みの場合、MSYS2 環境の外部で `bootloadHID.exe` を使うことができます。 + +### Linux 手動インストール +1. libusb development の依存関係をインストールします: + ```bash + # これは OS に依存します - Debian については以下で動作します +sudo apt-get install libusb-dev + ``` +2. BootloadHID ファームウェアパッケージをダウンロードします: + ``` + wget https://www.obdev.at/downloads/vusb/bootloadHID.2012-12-08.tar.gz -O - | tar -xz -C /tmp + ``` +3. bootloadHID 実行可能ファイルをビルドします: + ``` + cd /tmp/bootloadHID.2012-12-08/commandline/ +make +sudo cp bootloadHID /usr/local/bin + ``` + +### MacOS 手動インストール +1. 以下を入力して Homebrew をインストールします: + ``` + /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" + ``` +2. 以下のパッケージをインストールします: + ``` + brew install --HEAD https://raw.githubusercontent.com/robertgzr/homebrew-tap/master/bootloadhid.rb + ``` From 0e30266711719c0f62aa229606d361601f6898e4 Mon Sep 17 00:00:00 2001 From: umi <57262844+umi-umi@users.noreply.github.com> Date: Sat, 25 Jul 2020 09:34:07 +0900 Subject: [PATCH 434/930] [Docs] Japanese translation of docs/getting_started_docker.md (#9681) * add getting_started_docker.md translation * fix some typo * update based on comment --- docs/ja/getting_started_docker.md | 52 +++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 docs/ja/getting_started_docker.md diff --git a/docs/ja/getting_started_docker.md b/docs/ja/getting_started_docker.md new file mode 100644 index 000000000000..6498d727b4df --- /dev/null +++ b/docs/ja/getting_started_docker.md @@ -0,0 +1,52 @@ +# Docker クイックスタート + + + +このプロジェクトは、プライマリオペレーティングシステムに大きな変更を加えることなくキーボードの新しいファームウェアを非常に簡単に構築することができる Docker ワークフローを含みます。これは、あなたがプロジェクトをクローンしビルドを実行した時に、他の人とまったく同じ環境と QMK ビルド基盤を持つことも保証します。これにより、人々はあなたが遭遇した問題の解決をより簡単に行えるようになります。 + +## 必要事項 + +主な前提条件は動作する `docker` がインストールされていることです。 +* [Docker CE](https://docs.docker.com/install/#supported-platforms) + +## 使い方 + +(サブモジュールを含む) QMK のレポジトリのローカルコピーを取得する: + +```bash +git clone --recurse-submodules https://github.com/qmk/qmk_firmware.git +cd qmk_firmware +``` + +キーマップをビルドするために以下のコマンドを実行します: +```bash +util/docker_build.sh : +# 例えば: util/docker_build.sh planck/rev6:default +``` + +これは目的のキーボード/キーマップをコンパイルし、結果として書き込み用に `.hex` あるいは `.bin` ファイルを QMK ディレクトリの中に残します。`:keymap` が省略された場合は全てのキーマップが使われます。パラメータの形式は、`make` を使ってビルドする時と同じであることに注意してください。 + +`target` を指定して Docker から直接キーボードをビルドし、_かつ_書き込むためのサポートもあります。 + +```bash +util/docker_build.sh keyboard:keymap:target +# 例えば: util/docker_build.sh planck/rev6:default:flash +``` + +スクリプトをパラメータ無しで開始することもできます。この場合、1つずつビルドパラメータを入力するように求められます。これが使いやすいと思うかもしれません: + +```bash +util/docker_build.sh +# パラメータを入力として読み込みます (空白にすると全てのキーボード/キーマップ) +``` + +## FAQ + +### なぜ Windows/macOS 上で書き込めないのですか? + +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 のバージョンでは機能しないことを意味します。 From f5c2cd2eb7415418f4d7f87f732b0c6e07afade7 Mon Sep 17 00:00:00 2001 From: shela Date: Sat, 25 Jul 2020 09:36:48 +0900 Subject: [PATCH 435/930] [Docs] Update Japanese translation of custom_quantum_functions.md. (#9760) * Update Japanese translation of custom_quantum_functions.md. * Update custom_quantum_functions.md fix original document version. --- docs/ja/custom_quantum_functions.md | 62 ++++------------------------- 1 file changed, 7 insertions(+), 55 deletions(-) diff --git a/docs/ja/custom_quantum_functions.md b/docs/ja/custom_quantum_functions.md index 1524717c8e32..96e2a4ab3d7d 100644 --- a/docs/ja/custom_quantum_functions.md +++ b/docs/ja/custom_quantum_functions.md @@ -1,8 +1,8 @@ # キーボードの挙動をカスタマイズする方法 多くの人にとって、カスタムキーボードはボタンの押下をコンピュータに送信するだけではありません。単純なボタンの押下やマクロよりも複雑なことを実行できるようにしたいでしょう。QMK にはコードを挿入したり、機能を上書きしたり、様々な状況でキーボードの挙動をカスタマイズできるフックがあります。 @@ -346,6 +346,11 @@ layer_state_t layer_state_set_user(layer_state_t state) { return state; } ``` + +特定のレイヤーの状態を確認するには、 `IS_LAYER_ON_STATE(state, layer)` と `IS_LAYER_OFF_STATE(state, layer)` マクロを使います。 + +`layer_state_set_*` 関数の外では、グローバルなレイヤー状態を確認するために `IS_LAYER_ON(layer)` と `IS_LAYER_OFF(layer)` マクロを使えます。 + ### `layer_state_set_*` 関数のドキュメント * キーボード/リビジョン: `layer_state_t layer_state_set_kb(layer_state_t state)` @@ -488,56 +493,3 @@ void eeconfig_init_user(void) { // EEPROM がリセットされます! * キーマップ: `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) 値を返します。 - -# カスタムタッピング期間 - -デフォルトでは、タッピング期間と(`IGNORE_MOD_TAP_INTERRUPT` のような)関連オプションはグローバルに設定されていて、キーでは設定することができません。ほとんどのユーザにとって、これは全然問題ありません。しかし、場合によっては、`LT` キーとは異なるタイムアウトによって、デュアルファンクションキーが大幅に改善されます。なぜなら、一部のキーは他のキーよりも押し続けやすいためです。それぞれにカスタムキーコードを使う代わりに、キーごとに設定可能なタイムアウトの挙動を設定できます。 - -キーごとのタイムアウトの挙動を制御するための2つの設定可能なオプションがあります: - -- `TAPPING_TERM_PER_KEY` -- `IGNORE_MOD_TAP_INTERRUPT_PER_KEY` - -必要な機能ごとに、`config.h` に `#define` 行を追加する必要があります。 - -``` -#define TAPPING_TERM_PER_KEY -#define IGNORE_MOD_TAP_INTERRUPT_PER_KEY -``` - - -## `get_tapping_term` の実装例 - -キーコードに基づいて `TAPPING_TERM` を変更するには、次のようなものを `keymap.c` ファイルに追加します: - -```c -uint16_t get_tapping_term(uint16_t keycode, keyrecord_t *record) { - switch (keycode) { - case SFT_T(KC_SPC): - return TAPPING_TERM + 1250; - case LT(1, KC_GRV): - return 130; - default: - return TAPPING_TERM; - } -} -``` - -## `get_ignore_mod_tap_interrupt` の実装例 - -キーコードに基づいて `IGNORE_MOD_TAP_INTERRUPT` の値を変更するには、次のようなものを `keymap.c` ファイルに追加します: - -```c -bool get_ignore_mod_tap_interrupt(uint16_t keycode, keyrecord_t *record) { - switch (keycode) { - case SFT_T(KC_SPC): - return true; - default: - return false; - } -} -``` - -## `get_tapping_term` / `get_ignore_mod_tap_interrupt` 関数のドキュメント - -ここにある他の多くの関数とは異なり、quantum あるいはキーボードレベルの関数を持つ必要はありません (または理由さえありません)。ここではユーザレベルの関数だけが有用なため、そのようにマークする必要はありません。 From 054021e8757a72de4d3fae1f58944e9c922d22d1 Mon Sep 17 00:00:00 2001 From: Ibnu Daru Aji Date: Sat, 25 Jul 2020 16:15:35 +0700 Subject: [PATCH 436/930] [Keyboard] Squiggle (#9387) * new keyboard for squiggle. * added pic and other layout. * updated readme. * following drashna's suggestions. * removed an empty line and right hand as master. * following fauxpark's suggestions. * following manna-harbour's suggestions. * trying to satisfy PR Lint keyboards * manna-harbour forgot to add it. * following fauxparx's suggestions. * following fauxpark's suggestions. * following fauxpark's suggestions.' ' * following fauxpark's suggestions. * following fauxpark''s suggestions. * upated info.json to represent the actual layouts. * following noroadsleft's suggestions. --- keyboards/squiggle/config.h | 44 +++++ keyboards/squiggle/keymaps/default/config.h | 6 + keyboards/squiggle/keymaps/default/keymap.c | 157 +++++++++++++++ keyboards/squiggle/keymaps/default/readme.md | 6 + keyboards/squiggle/keymaps/default/rules.mk | 1 + .../squiggle/keymaps/defaultminidox/config.h | 6 + .../squiggle/keymaps/defaultminidox/keymap.c | 157 +++++++++++++++ .../squiggle/keymaps/defaultminidox/readme.md | 6 + .../squiggle/keymaps/defaultminidox/rules.mk | 1 + keyboards/squiggle/keymaps/rick/config.h | 6 + keyboards/squiggle/keymaps/rick/keymap.c | 178 ++++++++++++++++++ keyboards/squiggle/keymaps/rick/readme.md | 3 + keyboards/squiggle/keymaps/rick/rules.mk | 1 + keyboards/squiggle/readme.md | 21 +++ keyboards/squiggle/rev1/config.h | 25 +++ keyboards/squiggle/rev1/info.json | 150 +++++++++++++++ keyboards/squiggle/rev1/rev1.c | 1 + keyboards/squiggle/rev1/rev1.h | 84 +++++++++ keyboards/squiggle/rules.mk | 26 +++ keyboards/squiggle/squiggle.c | 17 ++ keyboards/squiggle/squiggle.h | 23 +++ 21 files changed, 919 insertions(+) create mode 100644 keyboards/squiggle/config.h create mode 100644 keyboards/squiggle/keymaps/default/config.h create mode 100644 keyboards/squiggle/keymaps/default/keymap.c create mode 100644 keyboards/squiggle/keymaps/default/readme.md create mode 100644 keyboards/squiggle/keymaps/default/rules.mk create mode 100644 keyboards/squiggle/keymaps/defaultminidox/config.h create mode 100644 keyboards/squiggle/keymaps/defaultminidox/keymap.c create mode 100644 keyboards/squiggle/keymaps/defaultminidox/readme.md create mode 100644 keyboards/squiggle/keymaps/defaultminidox/rules.mk create mode 100644 keyboards/squiggle/keymaps/rick/config.h create mode 100644 keyboards/squiggle/keymaps/rick/keymap.c create mode 100644 keyboards/squiggle/keymaps/rick/readme.md create mode 100644 keyboards/squiggle/keymaps/rick/rules.mk create mode 100644 keyboards/squiggle/readme.md create mode 100644 keyboards/squiggle/rev1/config.h create mode 100644 keyboards/squiggle/rev1/info.json create mode 100644 keyboards/squiggle/rev1/rev1.c create mode 100644 keyboards/squiggle/rev1/rev1.h create mode 100644 keyboards/squiggle/rules.mk create mode 100644 keyboards/squiggle/squiggle.c create mode 100644 keyboards/squiggle/squiggle.h diff --git a/keyboards/squiggle/config.h b/keyboards/squiggle/config.h new file mode 100644 index 000000000000..85bf32d9a9d3 --- /dev/null +++ b/keyboards/squiggle/config.h @@ -0,0 +1,44 @@ +/* +Copyright 2020 Ibnu D. Aji + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License 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 0x6955 +#define PRODUCT_ID 0x2073 +#define MANUFACTURER ibnuda +#define PRODUCT squiggle + +#define USE_SERIAL + +/* + * 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 + +/* 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 + + +/* disable these deprecated features by default */ +#define NO_ACTION_MACRO +#define NO_ACTION_FUNCTION diff --git a/keyboards/squiggle/keymaps/default/config.h b/keyboards/squiggle/keymaps/default/config.h new file mode 100644 index 000000000000..88c4203d8b87 --- /dev/null +++ b/keyboards/squiggle/keymaps/default/config.h @@ -0,0 +1,6 @@ +#pragma once + +#define COMBO_TERM 100 +#define COMBO_COUNT 38 +#define IGNORE_MOD_TAP_INTERRUPT +#define PERMISSIVE_HOLD diff --git a/keyboards/squiggle/keymaps/default/keymap.c b/keyboards/squiggle/keymaps/default/keymap.c new file mode 100644 index 000000000000..68ef0ed2103b --- /dev/null +++ b/keyboards/squiggle/keymaps/default/keymap.c @@ -0,0 +1,157 @@ +/* Copyright 2020 Ibnu D. Aji + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public 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 for combos. +enum combos { + // left hand combinations. + Q_W, + W_E, + E_R, + Z_X, + C_X, + C_V, + + // right hand combinations. + P_O, + O_U, + U_I, + SLASH_DOT, + DOT_COMMA, + COMMA_M, + + // both hands combinations. + SLASH_Z, + COMMA_X, + J_F, +}; + +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_S RCTL_T(KC_S) +#define CT_L RCTL_T(KC_L) +#define SH_A RSFT_T(KC_A) +#define SH_SCLN RSFT_T(KC_SCLN) +#define AL_D RALT_T(KC_D) +#define AL_K RALT_T(KC_K) +#define GU_G RGUI_T(KC_G) +#define GU_H RGUI_T(KC_H) + +// layer toggle. +#define LW_BSPC LT(_LOWER, KC_BSPC) +#define RS_SPC LT(_RAISE, KC_SPC) + +// 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) + +// left hand combinations. +const uint16_t PROGMEM q_w_combo[] = {KC_Q, KC_W, COMBO_END}; +const uint16_t PROGMEM w_e_combo[] = {KC_W, KC_E, COMBO_END}; +const uint16_t PROGMEM e_r_combo[] = {KC_E, KC_R, COMBO_END}; +const uint16_t PROGMEM z_x_combo[] = {KC_Z, KC_X, COMBO_END}; +const uint16_t PROGMEM x_c_combo[] = {KC_X, KC_C, COMBO_END}; +const uint16_t PROGMEM c_v_combo[] = {KC_C, KC_V, COMBO_END}; + +// right hand combinations. +const uint16_t PROGMEM p_o_combo[] = {KC_P, KC_O, COMBO_END}; +const uint16_t PROGMEM o_u_combo[] = {KC_O, KC_U, COMBO_END}; +const uint16_t PROGMEM u_i_combo[] = {KC_U, KC_I, COMBO_END}; +const uint16_t PROGMEM slash_dot_combo[] = {KC_SLSH, KC_DOT, COMBO_END}; +const uint16_t PROGMEM dot_comma_combo[] = {KC_DOT, KC_COMM,COMBO_END}; +const uint16_t PROGMEM comma_m_combo[] = {KC_COMM, KC_M, COMBO_END}; + +// both hand combinations. +const uint16_t PROGMEM z_slash_combo[] = {KC_Z, KC_SLSH, COMBO_END}; +const uint16_t PROGMEM x_comma_combo[] = {KC_X, KC_COMM, COMBO_END}; +const uint16_t PROGMEM j_f_combo[] = {KC_F, KC_J, COMBO_END}; + +combo_t key_combos[COMBO_COUNT] = { + // left hand combinations. + [Q_W] = COMBO(q_w_combo, KC_TAB), + [W_E] = COMBO(w_e_combo, KC_DQT), + [E_R] = COMBO(e_r_combo, KC_UNDS), + [Z_X] = COMBO(z_x_combo, KC_ENT), + [C_X] = COMBO(x_c_combo, LCTL(KC_W)), + [C_V] = COMBO(c_v_combo, KC_DELT), + + // right hand combinations. + [P_O] = COMBO(p_o_combo, KC_BSPC), + [O_U] = COMBO(o_u_combo, KC_QUOT), + [U_I] = COMBO(u_i_combo, KC_MINS), + [SLASH_DOT] = COMBO(slash_dot_combo, KC_PIPE), + [DOT_COMMA] = COMBO(dot_comma_combo, KC_APP), + [COMMA_M] = COMBO(comma_m_combo, KC_DELT), + + // both hand combinations. + [SLASH_Z] = COMBO(z_slash_combo, KC_HOME), + [COMMA_X] = COMBO(x_comma_combo, KC_END), + [J_F] = COMBO(j_f_combo, KC_ENT), +}; + +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, + SH_A, CT_S, AL_D, KC_F, GU_G, GU_H, KC_J, AL_K, CT_L, SH_SCLN, + KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM,KC_DOT, KC_SLSH, + 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_0 , + 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 +), +[_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, _______,_______,_______,_______,_______, + _______,_______, _______,_______ +), +}; diff --git a/keyboards/squiggle/keymaps/default/readme.md b/keyboards/squiggle/keymaps/default/readme.md new file mode 100644 index 000000000000..41e1ef7b1c43 --- /dev/null +++ b/keyboards/squiggle/keymaps/default/readme.md @@ -0,0 +1,6 @@ +# The default keymap for squiggle + +Because of the key count in this board is less than 40, it uses combo +extensively. +For example, to input `KC_TAB`, you have to press `KC_Q` and `KC_W` +simultaneously. diff --git a/keyboards/squiggle/keymaps/default/rules.mk b/keyboards/squiggle/keymaps/default/rules.mk new file mode 100644 index 000000000000..ab1e438182a3 --- /dev/null +++ b/keyboards/squiggle/keymaps/default/rules.mk @@ -0,0 +1 @@ +COMBO_ENABLE = yes diff --git a/keyboards/squiggle/keymaps/defaultminidox/config.h b/keyboards/squiggle/keymaps/defaultminidox/config.h new file mode 100644 index 000000000000..88c4203d8b87 --- /dev/null +++ b/keyboards/squiggle/keymaps/defaultminidox/config.h @@ -0,0 +1,6 @@ +#pragma once + +#define COMBO_TERM 100 +#define COMBO_COUNT 38 +#define IGNORE_MOD_TAP_INTERRUPT +#define PERMISSIVE_HOLD diff --git a/keyboards/squiggle/keymaps/defaultminidox/keymap.c b/keyboards/squiggle/keymaps/defaultminidox/keymap.c new file mode 100644 index 000000000000..3c19f3881842 --- /dev/null +++ b/keyboards/squiggle/keymaps/defaultminidox/keymap.c @@ -0,0 +1,157 @@ +/* Copyright 2020 Ibnu D. Aji + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public 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 for combos. +enum combos { + // left hand combinations. + Q_W, + W_E, + E_R, + Z_X, + C_X, + C_V, + + // right hand combinations. + P_O, + O_U, + U_I, + SLASH_DOT, + DOT_COMMA, + COMMA_M, + + // both hands combinations. + SLASH_Z, + COMMA_X, + J_F, +}; + +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_S RCTL_T(KC_S) +#define CT_L RCTL_T(KC_L) +#define SH_A RSFT_T(KC_A) +#define SH_SCLN RSFT_T(KC_SCLN) +#define AL_D RALT_T(KC_D) +#define AL_K RALT_T(KC_K) +#define GU_G RGUI_T(KC_G) +#define GU_H RGUI_T(KC_H) + +// layer toggle. +#define LW_BSPC LT(_LOWER, KC_BSPC) +#define RS_SPC LT(_RAISE, KC_SPC) + +// 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) + +// left hand combinations. +const uint16_t PROGMEM q_w_combo[] = {KC_Q, KC_W, COMBO_END}; +const uint16_t PROGMEM w_e_combo[] = {KC_W, KC_E, COMBO_END}; +const uint16_t PROGMEM e_r_combo[] = {KC_E, KC_R, COMBO_END}; +const uint16_t PROGMEM z_x_combo[] = {KC_Z, KC_X, COMBO_END}; +const uint16_t PROGMEM x_c_combo[] = {KC_X, KC_C, COMBO_END}; +const uint16_t PROGMEM c_v_combo[] = {KC_C, KC_V, COMBO_END}; + +// right hand combinations. +const uint16_t PROGMEM p_o_combo[] = {KC_P, KC_O, COMBO_END}; +const uint16_t PROGMEM o_u_combo[] = {KC_O, KC_U, COMBO_END}; +const uint16_t PROGMEM u_i_combo[] = {KC_U, KC_I, COMBO_END}; +const uint16_t PROGMEM slash_dot_combo[] = {KC_SLSH, KC_DOT, COMBO_END}; +const uint16_t PROGMEM dot_comma_combo[] = {KC_DOT, KC_COMM,COMBO_END}; +const uint16_t PROGMEM comma_m_combo[] = {KC_COMM, KC_M, COMBO_END}; + +// both hand combinations. +const uint16_t PROGMEM z_slash_combo[] = {KC_Z, KC_SLSH, COMBO_END}; +const uint16_t PROGMEM x_comma_combo[] = {KC_X, KC_COMM, COMBO_END}; +const uint16_t PROGMEM j_f_combo[] = {KC_F, KC_J, COMBO_END}; + +combo_t key_combos[COMBO_COUNT] = { + // left hand combinations. + [Q_W] = COMBO(q_w_combo, KC_TAB), + [W_E] = COMBO(w_e_combo, KC_DQT), + [E_R] = COMBO(e_r_combo, KC_UNDS), + [Z_X] = COMBO(z_x_combo, KC_ENT), + [C_X] = COMBO(x_c_combo, LCTL(KC_W)), + [C_V] = COMBO(c_v_combo, KC_DELT), + + // right hand combinations. + [P_O] = COMBO(p_o_combo, KC_BSPC), + [O_U] = COMBO(o_u_combo, KC_QUOT), + [U_I] = COMBO(u_i_combo, KC_MINS), + [SLASH_DOT] = COMBO(slash_dot_combo, KC_PIPE), + [DOT_COMMA] = COMBO(dot_comma_combo, KC_APP), + [COMMA_M] = COMBO(comma_m_combo, KC_DELT), + + // both hand combinations. + [SLASH_Z] = COMBO(z_slash_combo, KC_HOME), + [COMMA_X] = COMBO(x_comma_combo, KC_END), + [J_F] = COMBO(j_f_combo, KC_ENT), +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +[_BASE] = LAYOUT_split_3x5_3( + KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, + SH_A, CT_S, AL_D, KC_F, GU_G, GU_H, KC_J, AL_K, CT_L, SH_SCLN, + KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM,KC_DOT, KC_SLSH, + LOWER, KC_BSPC,SFT_ESC, ALT_ENT,KC_SPC, RAISE +), + +[_RAISE] = LAYOUT_split_3x5_3( + 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_0 , + KC_LBRC,KC_RBRC,KC_LPRN,KC_RPRN,KC_AMPR, KC_GRV, KC_1, KC_2, KC_3, KC_PLUS , + LOWER, ADDDD, _______, ALT_ENT,RS_SPC, RAISE +), +[_LOWER] = LAYOUT_split_3x5_3( + 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 , + LOWER, _______,_______, _______,ADDDD, RAISE +), +[_ADJUST] = LAYOUT_split_3x5_3( + _______,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, _______,_______,_______,_______,_______, + _______,_______,_______, _______,_______,_______ +), +}; diff --git a/keyboards/squiggle/keymaps/defaultminidox/readme.md b/keyboards/squiggle/keymaps/defaultminidox/readme.md new file mode 100644 index 000000000000..41e1ef7b1c43 --- /dev/null +++ b/keyboards/squiggle/keymaps/defaultminidox/readme.md @@ -0,0 +1,6 @@ +# The default keymap for squiggle + +Because of the key count in this board is less than 40, it uses combo +extensively. +For example, to input `KC_TAB`, you have to press `KC_Q` and `KC_W` +simultaneously. diff --git a/keyboards/squiggle/keymaps/defaultminidox/rules.mk b/keyboards/squiggle/keymaps/defaultminidox/rules.mk new file mode 100644 index 000000000000..ab1e438182a3 --- /dev/null +++ b/keyboards/squiggle/keymaps/defaultminidox/rules.mk @@ -0,0 +1 @@ +COMBO_ENABLE = yes diff --git a/keyboards/squiggle/keymaps/rick/config.h b/keyboards/squiggle/keymaps/rick/config.h new file mode 100644 index 000000000000..88c4203d8b87 --- /dev/null +++ b/keyboards/squiggle/keymaps/rick/config.h @@ -0,0 +1,6 @@ +#pragma once + +#define COMBO_TERM 100 +#define COMBO_COUNT 38 +#define IGNORE_MOD_TAP_INTERRUPT +#define PERMISSIVE_HOLD diff --git a/keyboards/squiggle/keymaps/rick/keymap.c b/keyboards/squiggle/keymaps/rick/keymap.c new file mode 100644 index 000000000000..7dddeb408915 --- /dev/null +++ b/keyboards/squiggle/keymaps/rick/keymap.c @@ -0,0 +1,178 @@ +/* Copyright 2020 Ibnu D. Aji + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public 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 for combos. +enum combos { + // left hand combinations. + COLON_COMMA, + COMMA_DOT, + DOT_P, + P_Y, + COMMA_P, + QUOT_Q, + Q_J, + J_K, + Q_K, + K_X, + + // right hand combinations. + L_R, + R_C, + C_G, + R_G, + G_F, + V_W, + W_M, + V_M, + M_B, + + // both hands combinations. + J_W, +}; + +enum { + _BASE, + _LOWER, + _RAISE, + _ADJUST, +}; + +enum custom_keycodes { + BASE = SAFE_RANGE, + 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_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) + +// 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) + +// 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 p_y_combo[] = {KC_P, KC_Y, COMBO_END}; +const uint16_t PROGMEM comma_p_combo[] = {KC_COMM, 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}; +const uint16_t PROGMEM q_k_combo[] = {KC_Q, KC_K, COMBO_END}; +const uint16_t PROGMEM k_x_combo[] = {KC_K, KC_X, 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 r_g_combo[] = {KC_R, KC_G, COMBO_END}; +const uint16_t PROGMEM g_f_combo[] = {KC_G, KC_F, 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}; +const uint16_t PROGMEM v_m_combo[] = {KC_V, KC_M, COMBO_END}; +const uint16_t PROGMEM m_b_combo[] = {KC_M, KC_B, 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), + [P_Y] = COMBO(p_y_combo, KC_PIPE), + [COMMA_P] = COMBO(comma_p_combo, PRVTAB), + [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), + [Q_K] = COMBO(q_k_combo, KC_TAB), + [K_X] = COMBO(k_x_combo, KC_TILD), + + // 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), + [R_G] = COMBO(r_g_combo, NXTTAB), + [G_F] = COMBO(g_f_combo, KC_BSLS), + [V_W] = COMBO(v_w_combo, KC_APP), + [W_M] = COMBO(w_m_combo, KC_DELT), + [V_M] = COMBO(v_m_combo, LSFT(KC_TAB)), + [M_B] = COMBO(m_b_combo, KC_GRV), + + // both hand combinations. + [J_W] = COMBO(j_w_combo, KC_ENT), +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +[_BASE] = LAYOUT( + KC_SCLN,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, + KC_QUOT,KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_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_0 , + KC_LBRC,KC_RBRC,KC_LPRN,KC_RPRN,KC_AMPR, KC_GRV, KC_1, KC_2, KC_3, KC_PLUS , + ADDDD ,_______, _______,_______ +), +[_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 +), +[_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, _______,_______,_______,_______,_______, + _______,_______, _______,_______ +), +}; diff --git a/keyboards/squiggle/keymaps/rick/readme.md b/keyboards/squiggle/keymaps/rick/readme.md new file mode 100644 index 000000000000..aaff442b905a --- /dev/null +++ b/keyboards/squiggle/keymaps/rick/readme.md @@ -0,0 +1,3 @@ +# water + +ricky rick's keymap. ayyy. diff --git a/keyboards/squiggle/keymaps/rick/rules.mk b/keyboards/squiggle/keymaps/rick/rules.mk new file mode 100644 index 000000000000..ab1e438182a3 --- /dev/null +++ b/keyboards/squiggle/keymaps/rick/rules.mk @@ -0,0 +1 @@ +COMBO_ENABLE = yes diff --git a/keyboards/squiggle/readme.md b/keyboards/squiggle/readme.md new file mode 100644 index 000000000000..dd1256e74a3e --- /dev/null +++ b/keyboards/squiggle/readme.md @@ -0,0 +1,21 @@ +# squiggle + +![squiggle](https://i.imgur.com/5UhvDsjl.jpg) + +It's a keyboard family which has the following requirements: + +- 5 columns per hand. +- At most 3 keys for each side's thumb row. +- No numrow. +- Split. +- Symmetric. + +* Keyboard Maintainer: [ibnuda](https://github.com/ibnuda) +* Hardware Supported: Atmega32u4. +* Hardware Availability: [shop](https://dactyl.bigcartel.com/product/squiggle-keyboard-kit) or [repo](https://github.com/ibnuda/squiggle). + +Make example for this keyboard (after setting up your build environment): + + make squiggle: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/squiggle/rev1/config.h b/keyboards/squiggle/rev1/config.h new file mode 100644 index 000000000000..9dec7e30f5bc --- /dev/null +++ b/keyboards/squiggle/rev1/config.h @@ -0,0 +1,25 @@ +#pragma once + +#define DEVICE_VER 0x0001 + +/* key matrix size */ +#define MATRIX_ROWS 8 +#define MATRIX_COLS 5 + +/* + * 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, B2, B6 } +#define MATRIX_COL_PINS { C6, D7, E6, B4, B5 } + +/* COL2ROW, ROW2COL*/ +#define DIODE_DIRECTION COL2ROW + +#define MASTER_LEFT diff --git a/keyboards/squiggle/rev1/info.json b/keyboards/squiggle/rev1/info.json new file mode 100644 index 000000000000..76f2c0af2714 --- /dev/null +++ b/keyboards/squiggle/rev1/info.json @@ -0,0 +1,150 @@ +{ + "keyboard_name": "squiggle", + "url": "https://github.com/ibnuda/squiggle", + "maintainer": "Ibnu D. Aji", + "width": 10, + "height": 6, + "layouts": { + "LAYOUT": { + "layout": [ + {"label":"q", "x":0, "y":0.9}, + {"label":"w", "x":1, "y":0.2}, + {"label":"e", "x":2, "y":0}, + {"label":"r", "x":3, "y":0.1}, + {"label":"t", "x":4, "y":0.15}, + + {"label":"a", "x":0, "y":1.9}, + {"label":"s", "x":1, "y":1.2}, + {"label":"d", "x":2, "y":1}, + {"label":"f", "x":3, "y":1.1}, + {"label":"g", "x":4, "y":1.15}, + + {"label":"z", "x":0, "y":2.9}, + {"label":"x", "x":1, "y":2.2}, + {"label":"c", "x":2, "y":2}, + {"label":"v", "x":3, "y":2.1}, + {"label":"b", "x":4, "y":2.15}, + + {"label":"bspc/lwr", "x":3, "y":3.6, "h":2}, + {"label":"esc/sft", "x":4, "y":3.65, "h":2}, + + {"label":"y", "x":5, "y":0.15}, + {"label":"u", "x":6, "y":0.1}, + {"label":"i", "x":7, "y":0}, + {"label":"o", "x":8, "y":0.2}, + {"label":"p", "x":9, "y":0.9}, + + {"label":"h", "x":5, "y":1.15}, + {"label":"j", "x":6, "y":1.1}, + {"label":"k", "x":7, "y":1}, + {"label":"l", "x":8, "y":1.2}, + {"label":"'", "x":9, "y":1.9}, + + {"label":"n", "x":5, "y":2.15}, + {"label":"m", "x":6, "y":2.1}, + {"label":",", "x":7, "y":2}, + {"label":".", "x":8, "y":2.2}, + {"label":"/", "x":9, "y":2.9}, + + {"label":"ent/alt", "x":5, "y":3.65, "h":2}, + {"label":"spc/ris", "x":6, "y":3.6, "h":2} + ] + }, + "LAYOUT_split_3x5_3": { + "layout": [ + {"label":"q", "x":0, "y":0.9}, + {"label":"w", "x":1, "y":0.2}, + {"label":"e", "x":2, "y":0}, + {"label":"r", "x":3, "y":0.1}, + {"label":"t", "x":4, "y":0.15}, + + {"label":"a", "x":0, "y":1.9}, + {"label":"s", "x":1, "y":1.2}, + {"label":"d", "x":2, "y":1}, + {"label":"f", "x":3, "y":1.1}, + {"label":"g", "x":4, "y":1.15}, + + {"label":"z", "x":0, "y":2.9}, + {"label":"x", "x":1, "y":2.2}, + {"label":"c", "x":2, "y":2}, + {"label":"v", "x":3, "y":2.1}, + {"label":"b", "x":4, "y":2.15}, + + {"label":"lower", "x":2, "y":3.6, "h":2}, + {"label":"bspc", "x":3, "y":3.6, "h":2}, + {"label":"esc/sft", "x":4, "y":3.65, "h":2}, + + {"label":"y", "x":5, "y":0.15}, + {"label":"u", "x":6, "y":0.1}, + {"label":"i", "x":7, "y":0}, + {"label":"o", "x":8, "y":0.2}, + {"label":"p", "x":9, "y":0.9}, + + {"label":"h", "x":5, "y":1.15}, + {"label":"j", "x":6, "y":1.1}, + {"label":"k", "x":7, "y":1}, + {"label":"l", "x":8, "y":1.2}, + {"label":"'", "x":9, "y":1.9}, + + {"label":"n", "x":5, "y":2.15}, + {"label":"m", "x":6, "y":2.1}, + {"label":",", "x":7, "y":2}, + {"label":".", "x":8, "y":2.2}, + {"label":"/", "x":9, "y":2.9}, + + {"label":"ent/alt", "x":5, "y":3.65, "h":2}, + {"label":"spc", "x":6, "y":3.6, "h":2} + {"label":"raise", "x":7, "y":3.6, "h":2} + ] + }, + "LAYOUT_complicated": { + "layout": [ + {"label":"q", "x":0, "y":0.9}, + {"label":"w", "x":1, "y":0.2}, + {"label":"e", "x":2, "y":0}, + {"label":"r", "x":3, "y":0.1}, + {"label":"t", "x":4, "y":0.15}, + + {"label":"a", "x":0, "y":1.9}, + {"label":"s", "x":1, "y":1.2}, + {"label":"d", "x":2, "y":1}, + {"label":"f", "x":3, "y":1.1}, + {"label":"g", "x":4, "y":1.15}, + + {"label":"z", "x":0, "y":2.9}, + {"label":"x", "x":1, "y":2.2}, + {"label":"c", "x":2, "y":2}, + {"label":"v", "x":3, "y":2.1}, + {"label":"b", "x":4, "y":2.15}, + + {"label":"bspc", "x":3, "y":3.6, "h":2}, + {"label":"esc/sft", "x":4, "y":3.65, "h":2}, + {"label":"lower", "x":3, "y":4.6, "h":2}, + {"label":"gui", "x":4, "y":4.65, "h":2}, + + {"label":"y", "x":5, "y":0.15}, + {"label":"u", "x":6, "y":0.1}, + {"label":"i", "x":7, "y":0}, + {"label":"o", "x":8, "y":0.2}, + {"label":"p", "x":9, "y":0.9}, + + {"label":"h", "x":5, "y":1.15}, + {"label":"j", "x":6, "y":1.1}, + {"label":"k", "x":7, "y":1}, + {"label":"l", "x":8, "y":1.2}, + {"label":"'", "x":9, "y":1.9}, + + {"label":"n", "x":5, "y":2.15}, + {"label":"m", "x":6, "y":2.1}, + {"label":",", "x":7, "y":2}, + {"label":".", "x":8, "y":2.2}, + {"label":"/", "x":9, "y":2.9}, + + {"label":"ent/alt", "x":5, "y":3.65, "h":2}, + {"label":"spc", "x":6, "y":3.6, "h":2} + {"label":"tab", "x":5, "y":4.65, "h":2}, + {"label":"raise", "x":6, "y":4.6, "h":2} + ] + } + } +} diff --git a/keyboards/squiggle/rev1/rev1.c b/keyboards/squiggle/rev1/rev1.c new file mode 100644 index 000000000000..520a869e57ba --- /dev/null +++ b/keyboards/squiggle/rev1/rev1.c @@ -0,0 +1 @@ +#include "rev1.h" diff --git a/keyboards/squiggle/rev1/rev1.h b/keyboards/squiggle/rev1/rev1.h new file mode 100644 index 000000000000..f2751ab78a15 --- /dev/null +++ b/keyboards/squiggle/rev1/rev1.h @@ -0,0 +1,84 @@ +#pragma once + +#include "squiggle.h" + +#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( \ + L00, L01, L02, L03, L04, R00, R01, R02, R03, R04, \ + L10, L11, L12, L13, L14, R10, R11, R12, R13, R14, \ + L20, L21, L22, L23, L24, R20, R21, R22, R23, R24, \ + L33, L34, R30, R31 \ +) \ +{ \ + { L00, L01, L02, L03, L04 }, \ + { L10, L11, L12, L13, L14 }, \ + { L20, L21, L22, L23, L24 }, \ + { ___, ___, ___, L33, L34 }, \ + { R04, R03, R02, R01, R00 }, \ + { R14, R13, R12, R11, R10 }, \ + { R24, R23, R22, R21, R20 }, \ + { ___, ___, ___, R31, R30 }, \ +} + +#define LAYOUT_reversed( \ + R04, R03, R02, R01, R00, L04, L03, L02, L01, L00, \ + R14, R13, R12, R11, R10, L14, L13, L12, L11, L10, \ + R24, R23, R22, R21, R20, L24, L23, L22, L21, L20, \ + R31, R30, L34, L33 \ +) \ +{ \ + { L00, L01, L02, L03, L04 }, \ + { L10, L11, L12, L13, L14 }, \ + { L20, L21, L22, L23, L24 }, \ + { ___, ___, ___, L33, L34 }, \ + { R04, R03, R02, R01, R00 }, \ + { R14, R13, R12, R11, R10 }, \ + { R24, R23, R22, R21, R20 }, \ + { ___, ___, ___, R31, R30 }, \ +} + +#define LAYOUT_split_3x5_3(\ + L00, L01, L02, L03, L04, R00, R01, R02, R03, R04, \ + L10, L11, L12, L13, L14, R10, R11, R12, R13, R14, \ + L20, L21, L22, L23, L24, R20, R21, R22, R23, R24, \ + L32, L33, L34, R30, R31, R32 \ +) \ +{ \ + { L00, L01, L02, L03, L04 }, \ + { L10, L11, L12, L13, L14 }, \ + { L20, L21, L22, L23, L24 }, \ + { ___, ___, L32, L33, L34 }, \ + { R04, R03, R02, R01, R00 }, \ + { R14, R13, R12, R11, R10 }, \ + { R24, R23, R22, R21, R20 }, \ + { ___, ___, R32, R31, R30 }, \ +} + +#define LAYOUT_complicated(\ + L00, L01, L02, L03, L04, R00, R01, R02, R03, R04, \ + L10, L11, L12, L13, L14, R10, R11, R12, R13, R14, \ + L20, L21, L22, L23, L24, R20, R21, R22, R23, R24, \ + L33, L34, R30, R31, \ + L31, L32, R32, R33 \ +) \ +{ \ + { L00, L01, L02, L03, L04 }, \ + { L10, L11, L12, L13, L14 }, \ + { L20, L21, L22, L23, L24 }, \ + { ___, L31, L32, L33, L34 }, \ + { R04, R03, R02, R01, R00 }, \ + { R14, R13, R12, R11, R10 }, \ + { R24, R23, R22, R21, R20 }, \ + { ___, R33, R32, R31, R30 }, \ +} diff --git a/keyboards/squiggle/rules.mk b/keyboards/squiggle/rules.mk new file mode 100644 index 000000000000..aea3a1b4fa9e --- /dev/null +++ b/keyboards/squiggle/rules.mk @@ -0,0 +1,26 @@ +# MCU name +MCU = atmega32u4 + +BOOTLOADER = caterina + +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 = no # Enable keyboard RGB underglow +MIDI_ENABLE = no # MIDI support +BLUETOOTH_ENABLE = no # Enable Bluetooth +AUDIO_ENABLE = no # Audio output +FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches + +SPLIT_KEYBOARD = yes + +DEFAULT_FOLDER = squiggle/rev1 + +LAYOUTS = split_3x5_3 diff --git a/keyboards/squiggle/squiggle.c b/keyboards/squiggle/squiggle.c new file mode 100644 index 000000000000..7c73aabf51da --- /dev/null +++ b/keyboards/squiggle/squiggle.c @@ -0,0 +1,17 @@ +/* Copyright 2020 Ibnu D. Aji + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#include "squiggle.h" diff --git a/keyboards/squiggle/squiggle.h b/keyboards/squiggle/squiggle.h new file mode 100644 index 000000000000..1f3e48552fc1 --- /dev/null +++ b/keyboards/squiggle/squiggle.h @@ -0,0 +1,23 @@ +/* Copyright 2020 Ibnu D. Aji + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#pragma once + +#ifdef KEYBOARD_squiggle_rev1 + #include "rev1.h" +#endif + +#include "quantum.h" From 21976f47d86e6ef01a2ec097ad1e36f5aada671b Mon Sep 17 00:00:00 2001 From: Eric Brooks Date: Sat, 25 Jul 2020 04:41:58 -0500 Subject: [PATCH 437/930] Added via support for ut472 (#9757) * Added via support for ut472 * removed needless config file updated vendor and product id for ut472 * corrected VENDOR_ID casing for ut472 --- keyboards/ut472/config.h | 6 ++--- keyboards/ut472/keymaps/via/keymap.c | 34 ++++++++++++++++++++++++++++ keyboards/ut472/keymaps/via/rules.mk | 2 ++ 3 files changed, 39 insertions(+), 3 deletions(-) create mode 100644 keyboards/ut472/keymaps/via/keymap.c create mode 100644 keyboards/ut472/keymaps/via/rules.mk diff --git a/keyboards/ut472/config.h b/keyboards/ut472/config.h index c71995ec7dd7..d2aed380610f 100644 --- a/keyboards/ut472/config.h +++ b/keyboards/ut472/config.h @@ -19,9 +19,9 @@ 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 VENDOR_ID 0xA103 +#define PRODUCT_ID 0x0472 +#define DEVICE_VER 0x0002 #define MANUFACTURER Keyhive #define PRODUCT UT47.2 #define DESCRIPTION An awesome 40% keyboard diff --git a/keyboards/ut472/keymaps/via/keymap.c b/keyboards/ut472/keymaps/via/keymap.c new file mode 100644 index 000000000000..fe3eff802ef8 --- /dev/null +++ b/keyboards/ut472/keymaps/via/keymap.c @@ -0,0 +1,34 @@ +#include QMK_KEYBOARD_H + +#define LT3_TAB LT(3, KC_TAB) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +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, + LT3_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_SFTENT, + KC_LCTL, KC_LALT, KC_LGUI, KC_APP, MO(2), KC_SPC, MO(1), 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_DELETE, + _______, RGB_TOG, RGB_MOD, RGB_VAI, RGB_VAD, _______, _______, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, + _______, KC_F11, KC_F12, KC_F13, KC_F14, KC_F15, KC_F16, KC_F17, KC_F18, KC_F19, KC_F20, _______, + RESET, _______, _______, KC_CAPS, _______, _______, _______, KC_HOME, KC_PGDN, KC_PGUP, KC_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_DELETE, + _______, _______, _______, _______, _______, _______, _______, KC_UNDERSCORE, KC_PLUS, KC_LEFT_CURLY_BRACE, KC_RIGHT_CURLY_BRACE, KC_PIPE, + _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, _______, + _______, _______, _______, KC_CAPS, _______, _______, _______, KC_HOME, KC_PGDN, KC_PGUP, KC_END +), + +LAYOUT( + KC_ESC, KC_CALC, KC_WHOM, KC_MAIL, KC_MYCM, _______, _______, _______, _______, _______, KC_PSCR, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, KC_MS_L, KC_MS_D, KC_MS_U, KC_MS_R +), +}; diff --git a/keyboards/ut472/keymaps/via/rules.mk b/keyboards/ut472/keymaps/via/rules.mk new file mode 100644 index 000000000000..36b7ba9cbc98 --- /dev/null +++ b/keyboards/ut472/keymaps/via/rules.mk @@ -0,0 +1,2 @@ +VIA_ENABLE = yes +LTO_ENABLE = yes From 208fbce9a79ea1775a0367a0075a680b71928b1e Mon Sep 17 00:00:00 2001 From: stanrc85 <47038504+stanrc85@users.noreply.github.com> Date: Sat, 25 Jul 2020 06:10:00 -0400 Subject: [PATCH 438/930] Keymap for OSAv2 (#9773) * Add OSAv2 keymap * OSAv2 configs and rules * OSAv2 lighting layers * OSAv2 lighting layers * Fix colors after copy/paste * Use LED indicators instead of RGB --- keyboards/tkc/osav2/keymaps/stanrc85/keymap.c | 58 +++++++++++++++++++ users/stanrc85/config.h | 1 - users/stanrc85/rgblight_layers_osa.c | 50 ++++++++++++++++ users/stanrc85/rules.mk | 6 ++ 4 files changed, 114 insertions(+), 1 deletion(-) create mode 100644 keyboards/tkc/osav2/keymaps/stanrc85/keymap.c create mode 100644 users/stanrc85/rgblight_layers_osa.c diff --git a/keyboards/tkc/osav2/keymaps/stanrc85/keymap.c b/keyboards/tkc/osav2/keymaps/stanrc85/keymap.c new file mode 100644 index 000000000000..0dfd0d54af7b --- /dev/null +++ b/keyboards/tkc/osav2/keymaps/stanrc85/keymap.c @@ -0,0 +1,58 @@ +/* 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 +#include "stanrc85.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. + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_QWERTY] = LAYOUT_all( + 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_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_CTLE, 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(_FN2_60), + KC_LCTL, KC_LALT, LT_BPCF, KC_LGUI, LT_SPCF, TD_TWIN, TD_TCTL + ), + + [_DEFAULT] = LAYOUT_all( + 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_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, MO(_FN2_60), + KC_LCTL, KC_LALT, KC_SPC, MO(_FN1_60), KC_SPC, KC_RALT, KC_RCTL + ), + + [_FN1_60] = LAYOUT_all( + _______, 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, _______, _______, _______, + _______, KC_RDP, _______, _______, _______, _______, _______, _______, KC_WBAK, KC_WFWD, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______ + ), + + [_FN2_60] = LAYOUT_all( + BL_TOGG, RGB_TOG, RGB_MOD, RGB_VAD, RGB_VAI, RGB_SAI, RGB_HUD, RGB_HUI, _______, _______, _______, _______, _______, _______, _______, _______, + BL_INC, VLK_TOG, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET, + BL_DEC, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MAKE, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, TG(_DEFAULT) + ) +}; \ No newline at end of file diff --git a/users/stanrc85/config.h b/users/stanrc85/config.h index fba488e1c3f3..71b915e488a0 100644 --- a/users/stanrc85/config.h +++ b/users/stanrc85/config.h @@ -5,6 +5,5 @@ #ifdef RGBLIGHT_ENABLE #define RGBLIGHT_LAYERS - #define RGBLIGHT_LIMIT_VAL 175 #define RGBLIGHT_SLEEP #endif diff --git a/users/stanrc85/rgblight_layers_osa.c b/users/stanrc85/rgblight_layers_osa.c new file mode 100644 index 000000000000..8bd7137e4314 --- /dev/null +++ b/users/stanrc85/rgblight_layers_osa.c @@ -0,0 +1,50 @@ +#include "stanrc85.h" + +const rgblight_segment_t PROGMEM my_capslock_layer[] = RGBLIGHT_LAYER_SEGMENTS( + {2, 2, HSV_RED}, + {6, 2, HSV_RED} +); + +const rgblight_segment_t PROGMEM my_layer1_layer[] = RGBLIGHT_LAYER_SEGMENTS( + {2, 2, HSV_GREEN}, + {6, 2, HSV_GREEN} +); + +const rgblight_segment_t PROGMEM my_layer2_layer[] = RGBLIGHT_LAYER_SEGMENTS( + {2, 2, HSV_BLUE}, + {6, 2, HSV_BLUE} +); + +const rgblight_segment_t PROGMEM my_layer3_layer[] = RGBLIGHT_LAYER_SEGMENTS( + {2, 2, HSV_WHITE}, + {6, 2, HSV_WHITE} +); + +// Now define the array of layers. Later layers take precedence +const rgblight_segment_t* const PROGMEM my_rgb_layers[] = RGBLIGHT_LAYERS_LIST( + my_capslock_layer, + my_layer1_layer, + my_layer2_layer, + my_layer3_layer +); + +void keyboard_post_init_user(void) { + // Enable the LED layers + rgblight_layers = my_rgb_layers; +} + +layer_state_t layer_state_set_user(layer_state_t state) { + // Both layers will light up if both kb layers are active + rgblight_set_layer_state(1, layer_state_cmp(state, 1)); + rgblight_set_layer_state(2, layer_state_cmp(state, 2)); + rgblight_set_layer_state(3, layer_state_cmp(state, 3)); + return state; +} + +bool led_update_user(led_t led_state) { + //rgblight_set_layer_state(0, led_state.caps_lock); + writePin(C7, led_state.caps_lock); + writePin(C6, led_state.num_lock); + writePin(B6, led_state.scroll_lock); + return false; +} \ No newline at end of file diff --git a/users/stanrc85/rules.mk b/users/stanrc85/rules.mk index 5fa3737a2530..5c572c0af384 100644 --- a/users/stanrc85/rules.mk +++ b/users/stanrc85/rules.mk @@ -31,4 +31,10 @@ ifeq ($(strip $(KEYBOARD)), projectkb/alice/rev2) VIA_ENABLE = yes LTO_ENABLE = no VELOCIKEY_ENABLE=yes +endif +ifeq ($(strip $(KEYBOARD)), tkc/osav2) + SRC += rgblight_layers_osa.c + VIA_ENABLE = yes + LTO_ENABLE = no + VELOCIKEY_ENABLE=yes endif \ No newline at end of file From 70a37b9cf5a52fe2d606157c916a561ed954cfc2 Mon Sep 17 00:00:00 2001 From: gtips <51393966+gtips@users.noreply.github.com> Date: Sat, 25 Jul 2020 19:35:47 +0900 Subject: [PATCH 439/930] [Keyboard] Add keyboard Reviung61 (#9737) * [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 * Update readme.md Change the image photo of readme.md. * [Keyboard] Add reviung61 * Update readme.md * fix keyboards/reviung61/ and add keymap default_rgb * fix keyboards/reviung61/info.json * fix keyboards/reviung61/info.json * remove keyboards/reviung61/keymaps/default/config.h --- keyboards/reviung61/config.h | 64 ++++++++++++++++ keyboards/reviung61/info.json | 74 +++++++++++++++++++ keyboards/reviung61/keymaps/default/keymap.c | 41 ++++++++++ keyboards/reviung61/keymaps/default/readme.md | 1 + .../reviung61/keymaps/default_rgb/config.h | 31 ++++++++ .../reviung61/keymaps/default_rgb/keymap.c | 41 ++++++++++ .../reviung61/keymaps/default_rgb/readme.md | 3 + .../reviung61/keymaps/default_rgb/rules.mk | 1 + keyboards/reviung61/readme.md | 15 ++++ keyboards/reviung61/reviung61.c | 17 +++++ keyboards/reviung61/reviung61.h | 58 +++++++++++++++ keyboards/reviung61/rules.mk | 24 ++++++ 12 files changed, 370 insertions(+) create mode 100644 keyboards/reviung61/config.h create mode 100644 keyboards/reviung61/info.json create mode 100644 keyboards/reviung61/keymaps/default/keymap.c create mode 100644 keyboards/reviung61/keymaps/default/readme.md create mode 100644 keyboards/reviung61/keymaps/default_rgb/config.h create mode 100644 keyboards/reviung61/keymaps/default_rgb/keymap.c create mode 100644 keyboards/reviung61/keymaps/default_rgb/readme.md create mode 100644 keyboards/reviung61/keymaps/default_rgb/rules.mk create mode 100644 keyboards/reviung61/readme.md create mode 100644 keyboards/reviung61/reviung61.c create mode 100644 keyboards/reviung61/reviung61.h create mode 100644 keyboards/reviung61/rules.mk diff --git a/keyboards/reviung61/config.h b/keyboards/reviung61/config.h new file mode 100644 index 000000000000..5648687064d4 --- /dev/null +++ b/keyboards/reviung61/config.h @@ -0,0 +1,64 @@ +/* +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 0x7C1A +#define DEVICE_VER 0x0001 +#define MANUFACTURER gtips +#define PRODUCT reviung61 +#define DESCRIPTION A 61-key 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 { D0, D1, D2, D3, D5 } +#define MATRIX_COL_PINS { F0, F1, F4, F5, F6, F7, C7, C6, B6, B5, B4, D7, D6, D4 } +#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 + +/* disable these deprecated features by default */ +#define NO_ACTION_MACRO +#define NO_ACTION_FUNCTION diff --git a/keyboards/reviung61/info.json b/keyboards/reviung61/info.json new file mode 100644 index 000000000000..0b038196c9ce --- /dev/null +++ b/keyboards/reviung61/info.json @@ -0,0 +1,74 @@ +{ + "keyboard_name": "reviung61", + "url": "", + "maintainer": "gtips", + "width": 15, + "height": 5, + "layouts": { + "LAYOUT_60_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":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/reviung61/keymaps/default/keymap.c b/keyboards/reviung61/keymaps/default/keymap.c new file mode 100644 index 000000000000..ef24d4be2732 --- /dev/null +++ b/keyboards/reviung61/keymaps/default/keymap.c @@ -0,0 +1,41 @@ +/* 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 + +// 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_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_RGUI, MO(_FN), KC_RCTL + + ), + [_FN] = 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, + _______, XXXXXXX, KC_UP, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RGB_VAI, RGB_SAI, RGB_HUI, RGB_MOD, RGB_TOG, + _______, KC_LEFT, KC_DOWN, KC_RGHT, XXXXXXX, XXXXXXX, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, XXXXXXX, XXXXXXX, _______, + _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_HOME, KC_END, KC_PGUP, KC_PGDN, KC_PSCR, KC_INS, _______, + _______, _______, _______, _______, RESET, _______, _______, _______ + ) +}; diff --git a/keyboards/reviung61/keymaps/default/readme.md b/keyboards/reviung61/keymaps/default/readme.md new file mode 100644 index 000000000000..43446daa89a2 --- /dev/null +++ b/keyboards/reviung61/keymaps/default/readme.md @@ -0,0 +1 @@ +# The default keymap for reviung61 diff --git a/keyboards/reviung61/keymaps/default_rgb/config.h b/keyboards/reviung61/keymaps/default_rgb/config.h new file mode 100644 index 000000000000..619060d0bc86 --- /dev/null +++ b/keyboards/reviung61/keymaps/default_rgb/config.h @@ -0,0 +1,31 @@ +/* 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 + +// place overrides here + +// --- RGB underglow --- +#define RGB_DI_PIN B7 +#ifdef RGB_DI_PIN + #define RGBLED_NUM 12 + #define RGBLIGHT_HUE_STEP 16 + #define RGBLIGHT_SAT_STEP 16 + #define RGBLIGHT_VAL_STEP 16 + #define RGBLIGHT_LIMIT_VAL 255 + #define RGBLIGHT_SLEEP + #define RGBLIGHT_ANIMATIONS +#endif diff --git a/keyboards/reviung61/keymaps/default_rgb/keymap.c b/keyboards/reviung61/keymaps/default_rgb/keymap.c new file mode 100644 index 000000000000..ef24d4be2732 --- /dev/null +++ b/keyboards/reviung61/keymaps/default_rgb/keymap.c @@ -0,0 +1,41 @@ +/* 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 + +// 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_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_RGUI, MO(_FN), KC_RCTL + + ), + [_FN] = 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, + _______, XXXXXXX, KC_UP, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RGB_VAI, RGB_SAI, RGB_HUI, RGB_MOD, RGB_TOG, + _______, KC_LEFT, KC_DOWN, KC_RGHT, XXXXXXX, XXXXXXX, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, XXXXXXX, XXXXXXX, _______, + _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_HOME, KC_END, KC_PGUP, KC_PGDN, KC_PSCR, KC_INS, _______, + _______, _______, _______, _______, RESET, _______, _______, _______ + ) +}; diff --git a/keyboards/reviung61/keymaps/default_rgb/readme.md b/keyboards/reviung61/keymaps/default_rgb/readme.md new file mode 100644 index 000000000000..741e91270520 --- /dev/null +++ b/keyboards/reviung61/keymaps/default_rgb/readme.md @@ -0,0 +1,3 @@ +# The default_rgb keymap for reviung61 + +Use LED STRIP SERIAL RGB for RGB underglow. diff --git a/keyboards/reviung61/keymaps/default_rgb/rules.mk b/keyboards/reviung61/keymaps/default_rgb/rules.mk new file mode 100644 index 000000000000..7ad666d1a383 --- /dev/null +++ b/keyboards/reviung61/keymaps/default_rgb/rules.mk @@ -0,0 +1 @@ +RGBLIGHT_ENABLE = yes \ No newline at end of file diff --git a/keyboards/reviung61/readme.md b/keyboards/reviung61/readme.md new file mode 100644 index 000000000000..ed01d368d7c8 --- /dev/null +++ b/keyboards/reviung61/readme.md @@ -0,0 +1,15 @@ +# reviung61 + +![REVIUNG61](https://github.com/gtips/reviung/blob/master/reviung61/image/reviung61-pcb.jpg) + +The REVIUNG41 is 61-key Standard ANSI 60% keyboard. And compatible with MX and ALPS. + +* Keyboard Maintainer: [gtips](https://github.com/gtips) +* Hardware Supported: REVIUNG61 +* Hardware Availability: [PCB & Case Data](https://github.com/gtips/reviung/tree/master/reviung61) + +Make example for this keyboard (after setting up your build environment): + + make reviung61: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/reviung61/reviung61.c b/keyboards/reviung61/reviung61.c new file mode 100644 index 000000000000..3cd69bf27ffa --- /dev/null +++ b/keyboards/reviung61/reviung61.c @@ -0,0 +1,17 @@ +/* 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 "reviung61.h" diff --git a/keyboards/reviung61/reviung61.h b/keyboards/reviung61/reviung61.h new file mode 100644 index 000000000000..bae0cd2155a5 --- /dev/null +++ b/keyboards/reviung61/reviung61.h @@ -0,0 +1,58 @@ +/* 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 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. + */ + +/* ANSI + * ,-----------------------------------------------------------. + * | 00| 01| 02| 03| 04| 05| 06| 07| 08| 09| 0a| 0b| 0c| 0d | + * |-----------------------------------------------------------| + * | 10 | 11| 12| 13| 14| 15| 16| 17| 18| 19| 1a| 1b| 1c| 1d | + * |-----------------------------------------------------------| + * | 20 | 21| 22| 23| 24| 25| 26| 27| 28| 29| 2a| 2b| 2c | + * |-----------------------------------------------------------| + * | 30 | 31| 32| 33| 34| 35| 36| 37| 38| 39| 3a| 3b | + * |-----------------------------------------------------------| + * | 40 | 41 | 42 | 45 | 48 | 49 | 4a | 4b | + * `-----------------------------------------------------------' + */ + + +#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, k2c, \ + k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, \ + k40, k41, k42, k45, 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, k1d }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, KC_NO }, \ + { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, KC_NO, KC_NO }, \ + { k40, k41, k42, KC_NO, KC_NO, k45, KC_NO, KC_NO, k48, k49, k4a, k4b, KC_NO, KC_NO } \ +} diff --git a/keyboards/reviung61/rules.mk b/keyboards/reviung61/rules.mk new file mode 100644 index 000000000000..fc546a76d314 --- /dev/null +++ b/keyboards/reviung61/rules.mk @@ -0,0 +1,24 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +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 = no # Console for debug +COMMAND_ENABLE = no # Commands for debug and configuration +# 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 +BLUETOOTH_ENABLE = no # Enable Bluetooth +AUDIO_ENABLE = no # Audio output + +LAYOUTS = 60_ansi From 65f4b94cda57a6118b99d36ea0b0ca462e56de5e Mon Sep 17 00:00:00 2001 From: Ingar Almklov Date: Sat, 25 Jul 2020 18:42:50 +0200 Subject: [PATCH 440/930] Pinky4: add via support (#9711) * Pinky4: add via support * Pinky4/via: simplify rules.mk * Pinky4/via: use built-in for KC_TRANS, enum for layer _names * Pinky4/via: remove redundant rules * Pinky4/via: remove unnecessary slashes * Pinky4/via: don't override default bootloader --- keyboards/pinky/4/config.h | 6 +- keyboards/pinky/4/keymaps/via/config.h | 31 +++++++++ keyboards/pinky/4/keymaps/via/keymap.c | 87 ++++++++++++++++++++++++++ keyboards/pinky/4/keymaps/via/rules.mk | 5 ++ 4 files changed, 126 insertions(+), 3 deletions(-) create mode 100644 keyboards/pinky/4/keymaps/via/config.h create mode 100644 keyboards/pinky/4/keymaps/via/keymap.c create mode 100644 keyboards/pinky/4/keymaps/via/rules.mk diff --git a/keyboards/pinky/4/config.h b/keyboards/pinky/4/config.h index a1544bc48693..4c44b0abcbdf 100644 --- a/keyboards/pinky/4/config.h +++ b/keyboards/pinky/4/config.h @@ -17,11 +17,11 @@ #pragma once /* USB Device descriptor parameter */ -#define VENDOR_ID 0xFEED -#define PRODUCT_ID 0x3060 +#define VENDOR_ID 0x544E +#define PRODUCT_ID 0x7034 #define DEVICE_VER 0x0001 #define MANUFACTURER tamanishi -#define PRODUCT Pinky +#define PRODUCT Pinky4 #define DESCRIPTION A split keyboard with 3 or 4 x7 vertically staggered keys and 4 thumb keys /* key matrix size */ diff --git a/keyboards/pinky/4/keymaps/via/config.h b/keyboards/pinky/4/keymaps/via/config.h new file mode 100644 index 000000000000..db797767299f --- /dev/null +++ b/keyboards/pinky/4/keymaps/via/config.h @@ -0,0 +1,31 @@ +/* Copyright 2018 'Masayuki Sunahara' + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License 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 USE_SERIAL_PD2 + +#define TAPPING_FORCE_HOLD +#define TAPPING_TERM 200 +#define RETRO_TAPPPING diff --git a/keyboards/pinky/4/keymaps/via/keymap.c b/keyboards/pinky/4/keymaps/via/keymap.c new file mode 100644 index 000000000000..e5f8b65c07b9 --- /dev/null +++ b/keyboards/pinky/4/keymaps/via/keymap.c @@ -0,0 +1,87 @@ +/* Copyright 2018 'Masayuki Sunahara' + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public 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 { + _QWERTY, + _LOWER, + _RAISE, + _ADJUST +}; + +#define KC_LOWER MO(_LOWER) +#define KC_RAISE MO(_RAISE) +#define KC_ADJ MO(_ADJUST) +#define KC_CTLTB CTL_T(KC_TAB) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_QWERTY] = LAYOUT( + //,---------------------------------------------------------------------. ,---------------------------------------------------------------------. + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_LPRN, KC_RPRN, 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_BSLS, + //|---------+---------+---------+---------+---------+---------+---------| |---------+---------+---------+---------+---------+---------+---------| + KC_CTLTB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_LCBR, KC_RCBR, 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_ADJ, KC_ADJ, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT, + //|---------+---------+---------+---------+---------+---------+---------| |---------+---------+---------+---------+---------+---------+---------| + KC_LALT, KC_LOWER, KC_LGUI, KC_SPC, KC_SPC, KC_RGUI, KC_RAISE, KC_RALT + //`---------------------------------------' `---------------------------------------' + ), + + [_LOWER] = LAYOUT( + //,---------------------------------------------------------------------. ,---------------------------------------------------------------------. + KC_GRV, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MINS, KC_EQL, _______, + //|---------+---------+---------+---------+---------+---------+---------| |---------+---------+---------+---------+---------+---------+---------| + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + //|---------+---------+---------+---------+---------+---------+---------| |---------+---------+---------+---------+---------+---------+---------| + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + //|---------+---------+---------+---------+---------+---------+---------| |---------+---------+---------+---------+---------+---------+---------| + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + //|---------+---------+---------+---------+---------+---------+---------| |---------+---------+---------+---------+---------+---------+---------| + _______, _______, _______, _______, _______, _______, _______, _______ + //`---------------------------------------' `---------------------------------------' + ), + + [_RAISE] = LAYOUT( + //,---------------------------------------------------------------------. ,---------------------------------------------------------------------. + KC_GRV, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MINS, KC_EQL, _______, + //|---------+---------+---------+---------+---------+---------+---------| |---------+---------+---------+---------+---------+---------+---------| + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + //|---------+---------+---------+---------+---------+---------+---------| |---------+---------+---------+---------+---------+---------+---------| + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + //|---------+---------+---------+---------+---------+---------+---------| |---------+---------+---------+---------+---------+---------+---------| + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + //|---------+---------+---------+---------+---------+---------+---------| |---------+---------+---------+---------+---------+---------+---------| + _______, _______, _______, _______, _______, _______, _______, _______ + //`---------------------------------------' `---------------------------------------' + ), + + [_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_HOME, KC_PGDN, KC_PGUP, KC_END, _______, _______, + //|---------+---------+---------+---------+---------+---------+---------| |---------+---------+---------+---------+---------+---------+---------| + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + //|---------+---------+---------+---------+---------+---------+---------| |---------+---------+---------+---------+---------+---------+---------| + _______, _______, _______, _______, _______, _______, _______, _______ + //`---------------------------------------' `---------------------------------------' + ) +}; diff --git a/keyboards/pinky/4/keymaps/via/rules.mk b/keyboards/pinky/4/keymaps/via/rules.mk new file mode 100644 index 000000000000..645d8584d45f --- /dev/null +++ b/keyboards/pinky/4/keymaps/via/rules.mk @@ -0,0 +1,5 @@ + +VIA_ENABLE = yes +MOUSEKEY_ENABLE = yes +EXTRAKEY_ENABLE = yes +LTO_ENABLE = yes From a0b10593dff4b983ce36b7ff9ecb4f8682c592c5 Mon Sep 17 00:00:00 2001 From: Yoonbae Cho Date: Sun, 26 Jul 2020 01:44:45 +0900 Subject: [PATCH 441/930] Keymap for keebio/iris rev.4 supporting VIA (#9749) * Create keymap.c * Create config.h * Update first revision * Enhance keymap * Enhance keymap * Update keymap * Make Via compatable * Support mouse key * Apply reviewer's change requests * Adjust mouse factors * Update config.h --- .../keebio/iris/keymaps/yoonbae81/config.h | 6 ++ .../keebio/iris/keymaps/yoonbae81/keymap.c | 67 +++++++++++++++++++ .../keebio/iris/keymaps/yoonbae81/rules.mk | 4 ++ 3 files changed, 77 insertions(+) create mode 100644 keyboards/keebio/iris/keymaps/yoonbae81/config.h create mode 100644 keyboards/keebio/iris/keymaps/yoonbae81/keymap.c create mode 100644 keyboards/keebio/iris/keymaps/yoonbae81/rules.mk diff --git a/keyboards/keebio/iris/keymaps/yoonbae81/config.h b/keyboards/keebio/iris/keymaps/yoonbae81/config.h new file mode 100644 index 000000000000..f91326ca266a --- /dev/null +++ b/keyboards/keebio/iris/keymaps/yoonbae81/config.h @@ -0,0 +1,6 @@ +#pragma once + +#define MOUSEKEY_DELAY 100 +#define MOUSEKEY_INTERVAL 25 +#define MOUSEKEY_MAX_SPEED 7 +#define MOUSEKEY_TIME_TO_MAX 30 \ No newline at end of file diff --git a/keyboards/keebio/iris/keymaps/yoonbae81/keymap.c b/keyboards/keebio/iris/keymaps/yoonbae81/keymap.c new file mode 100644 index 000000000000..88421aeadf7a --- /dev/null +++ b/keyboards/keebio/iris/keymaps/yoonbae81/keymap.c @@ -0,0 +1,67 @@ +#include QMK_KEYBOARD_H + +enum layer_names { + _MAIN, + _FN1, + _FN2, + _FN3 +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [_MAIN] = LAYOUT( + //┌────────┬────────┬────────┬────────┬────────┬────────┐ ┌────────┬────────┬────────┬────────┬────────┬────────┐ + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, 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_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_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, LT(2,KC_SPC), KC_NO, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_BSPC, + //└────────┴────────┴────────┴───┬────┴───┬────┴───┬────┴───┬────┘ └───┬────┴───┬────┴───┬────┴───┬────┴────────┴────────┴────────┘ + KC_LGUI, KC_LALT, LT(1,KC_ENT), KC_SPC,LT(1,KC_RALT),LT(2,KC_RCTL) + // └────────┴────────┴────────┘ └────────┴────────┴────────┘ + ), + + [_FN1] = LAYOUT( + //┌────────┬────────┬────────┬────────┬────────┬────────┐ ┌────────┬────────┬────────┬────────┬────────┬────────┐ + 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_LCBR, KC_PGUP, KC_UP, KC_HOME, KC_RCBR, KC_NO, KC_HOME, KC_PGUP, KC_NO, KC_NO, KC_NO, + //├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤ + _______, KC_LPRN, KC_LEFT, KC_DOWN, KC_RGHT, KC_RPRN, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_MINS, KC_EQL, + //├────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┤ + _______, KC_LBRC, KC_END, KC_NO, KC_PGDN, KC_RBRC, TO(2), _______, KC_NO, KC_PGDN, KC_END, KC_ENT, KC_INS, KC_DEL, + //└────────┴────────┴────────┴───┬────┴───┬────┴───┬────┴───┬────┘ └───┬────┴───┬────┴───┬────┴───┬────┴────────┴────────┴────────┘ + _______, _______, _______, KC_BSPC, _______, _______ + // └────────┴────────┴────────┘ └────────┴────────┴────────┘ + ), + + [_FN2] = LAYOUT( + //┌────────┬────────┬────────┬────────┬────────┬────────┐ ┌────────┬────────┬────────┬────────┬────────┬────────┐ + TO(0), KC_1, KC_2, KC_SLCK, KC_PAUS, KC_PSCR, KC_CALC, KC_ESC, KC_PMNS, KC_PERC, KC_PSLS, MO(3), + //├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤ + _______, KC_NO, KC_WH_U, KC_MS_U, KC_NO, KC_NO, KC_F2, KC_7, KC_8, KC_9, KC_PAST, KC_NO, + //├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤ + _______, KC_NO, KC_MS_L, KC_MS_D, KC_MS_R, KC_NO, KC_ENT, KC_4, KC_5, KC_6, KC_MINS, KC_EQL, + //├────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┤ + _______, KC_NO, KC_NO, KC_NO, KC_WH_D, KC_NO, TO(0), _______, KC_0, KC_1, KC_2, KC_3, KC_PPLS, KC_BSPC, + //└────────┴────────┴────────┴───┬────┴───┬────┴───┬────┴───┬────┘ └───┬────┴───┬────┴───┬────┴───┬────┴────────┴────────┴────────┘ + KC_BTN2, KC_BTN1, KC_ACL2, _______, KC_PDOT, _______ + // └────────┴────────┴────────┘ └────────┴────────┴────────┘ + ), + + [_FN3] = LAYOUT( + //┌────────┬────────┬────────┬────────┬────────┬────────┐ ┌────────┬────────┬────────┬────────┬────────┬────────┐ + RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + //├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + //├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤ + _______, KC_MPRV, KC_MRWD, KC_MFFD, KC_MNXT, _______, _______, _______, _______, _______, _______, _______, + //├────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┤ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + //└────────┴────────┴────────┴───┬────┴───┬────┴───┬────┴───┬────┘ └───┬────┴───┬────┴───┬────┴───┬────┴────────┴────────┴────────┘ + KC_VOLD, KC_VOLU, KC_MPLY, _______, _______, _______ + // └────────┴────────┴────────┘ └────────┴────────┴────────┘ + ) +}; \ No newline at end of file diff --git a/keyboards/keebio/iris/keymaps/yoonbae81/rules.mk b/keyboards/keebio/iris/keymaps/yoonbae81/rules.mk new file mode 100644 index 000000000000..cbf383fc6979 --- /dev/null +++ b/keyboards/keebio/iris/keymaps/yoonbae81/rules.mk @@ -0,0 +1,4 @@ +VIA_ENABLE = yes +LTO_ENABLE = yes +ENCODER_ENABLE = no +MOUSEKEY_ENABLE = yes From db540e2832b0d3bed6ae2ca3a2c893d9c79a7f5d Mon Sep 17 00:00:00 2001 From: RJ Bernau Date: Sat, 25 Jul 2020 22:36:39 +0100 Subject: [PATCH 442/930] Adding VIA support for Dactyl Manuform 5x7 (#9462) * adding via support for Dactyl Manuform 5x7 * Changing Vendor ID from FEED to 444D (DM) * Update keyboards/handwired/dactyl_manuform/4x6/config.h Fixing typo in Dactyl Manuform 4x6 Product Id Co-authored-by: Joel Challis * Update keyboards/handwired/dactyl_manuform/4x5/config.h Fixing typo in Dactyl Manuform 4x5 Product Id Co-authored-by: Joel Challis Co-authored-by: Roland Bernau Co-authored-by: Joel Challis --- .../handwired/dactyl_manuform/4x5/config.h | 4 +- .../handwired/dactyl_manuform/4x6/config.h | 4 +- .../handwired/dactyl_manuform/5x6/config.h | 3 +- keyboards/handwired/dactyl_manuform/5x7/5x7.h | 4 +- .../handwired/dactyl_manuform/5x7/config.h | 5 +- .../dactyl_manuform/5x7/keymaps/via/config.h | 27 ++++ .../dactyl_manuform/5x7/keymaps/via/keymap.c | 123 ++++++++++++++++++ .../dactyl_manuform/5x7/keymaps/via/rules.mk | 1 + .../handwired/dactyl_manuform/6x6/config.h | 3 +- keyboards/handwired/dactyl_manuform/config.h | 4 +- .../dactyl_manuform/dmote/62key/config.h | 3 +- 11 files changed, 166 insertions(+), 15 deletions(-) create mode 100644 keyboards/handwired/dactyl_manuform/5x7/keymaps/via/config.h create mode 100644 keyboards/handwired/dactyl_manuform/5x7/keymaps/via/keymap.c create mode 100644 keyboards/handwired/dactyl_manuform/5x7/keymaps/via/rules.mk diff --git a/keyboards/handwired/dactyl_manuform/4x5/config.h b/keyboards/handwired/dactyl_manuform/4x5/config.h index 698418fb73c9..3b33441ca770 100644 --- a/keyboards/handwired/dactyl_manuform/4x5/config.h +++ b/keyboards/handwired/dactyl_manuform/4x5/config.h @@ -21,9 +21,9 @@ along with this program. If not, see . #include "config_common.h" /* USB Device descriptor parameter */ -#define VENDOR_ID 0xFEED -#define PRODUCT_ID 0x3060 +#define PRODUCT_ID 0x3435 #define DEVICE_VER 0x0001 + #define MANUFACTURER tshort #define DESCRIPTION A split keyboard for the cheap makers diff --git a/keyboards/handwired/dactyl_manuform/4x6/config.h b/keyboards/handwired/dactyl_manuform/4x6/config.h index a9ad1a36d706..20b8952b558b 100644 --- a/keyboards/handwired/dactyl_manuform/4x6/config.h +++ b/keyboards/handwired/dactyl_manuform/4x6/config.h @@ -21,10 +21,8 @@ along with this program. If not, see . #include "config_common.h" /* USB Device descriptor parameter */ -#define VENDOR_ID 0xFEED -#define PRODUCT_ID 0x3060 +#define PRODUCT_ID 0x3436 #define DEVICE_VER 0x0001 -#define MANUFACTURER tshort #define DESCRIPTION A split keyboard for the cheap makers /* key matrix size */ diff --git a/keyboards/handwired/dactyl_manuform/5x6/config.h b/keyboards/handwired/dactyl_manuform/5x6/config.h index fd0c23961c12..dc395d868a1b 100644 --- a/keyboards/handwired/dactyl_manuform/5x6/config.h +++ b/keyboards/handwired/dactyl_manuform/5x6/config.h @@ -20,7 +20,8 @@ along with this program. If not, see . #include "config_common.h" - +#define PRODUCT_ID 0x3536 +#define DEVICE_VER 0x0001 #define PRODUCT Dactyl-Manuform (5x6) /* key matrix size */ diff --git a/keyboards/handwired/dactyl_manuform/5x7/5x7.h b/keyboards/handwired/dactyl_manuform/5x7/5x7.h index 88b68b31e660..c01fce957c88 100644 --- a/keyboards/handwired/dactyl_manuform/5x7/5x7.h +++ b/keyboards/handwired/dactyl_manuform/5x7/5x7.h @@ -6,8 +6,8 @@ #ifdef USE_I2C #include #ifdef __AVR__ - #include - #include + #include + #include #endif #endif diff --git a/keyboards/handwired/dactyl_manuform/5x7/config.h b/keyboards/handwired/dactyl_manuform/5x7/config.h index bf56d0825126..32c351a47289 100644 --- a/keyboards/handwired/dactyl_manuform/5x7/config.h +++ b/keyboards/handwired/dactyl_manuform/5x7/config.h @@ -20,8 +20,9 @@ along with this program. If not, see . #include "config_common.h" - -#define PRODUCT Dactyl-Manuform (Ergodox) +#define PRODUCT_ID 0x3537 +#define DEVICE_VER 0x0001 +#define PRODUCT Dactyl-Manuform (5x7) /* key matrix size */ // Rows are doubled-up diff --git a/keyboards/handwired/dactyl_manuform/5x7/keymaps/via/config.h b/keyboards/handwired/dactyl_manuform/5x7/keymaps/via/config.h new file mode 100644 index 000000000000..29ab59ad66b4 --- /dev/null +++ b/keyboards/handwired/dactyl_manuform/5x7/keymaps/via/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/5x7/keymaps/via/keymap.c b/keyboards/handwired/dactyl_manuform/5x7/keymaps/via/keymap.c new file mode 100644 index 000000000000..07c5ec9ba386 --- /dev/null +++ b/keyboards/handwired/dactyl_manuform/5x7/keymaps/via/keymap.c @@ -0,0 +1,123 @@ +#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 _FN 1 +#define _NUMPAD 2 +#define _BLANK 3 + +// Some basic macros +#define TASK LCTL(LSFT(KC_ESC)) +#define TAB_R LCTL(KC_TAB) +#define TAB_L LCTL(LSFT(KC_TAB)) +#define TAB_RO LCTL(LSFT(KC_T)) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +[_QWERTY] = LAYOUT_5x7( + // left hand + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_LBRC, + KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, TAB_RO, + OSM(MOD_LSFT), KC_Z, KC_X, KC_C, KC_V, KC_B, + KC_CAPS, KC_LGUI, TAB_L, TAB_R, + TT(_FN), KC_SPC, + KC_END, KC_HOME, + KC_PSCR, TASK, + // right hand + KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_GRV, + KC_RBRC, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS, + TG(_NUMPAD), KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, + KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, OSM(MOD_RSFT), + KC_LEFT, KC_UP, KC_DOWN, KC_RGHT, + KC_BSPC, KC_ENT, + KC_PGUP, KC_PGDN, + KC_LCTL, KC_LALT), + +[_FN] = LAYOUT_5x7( + // left hand + _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, + _______, _______, _______, KC_UP, _______, _______, _______, + _______, _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, RESET, + _______, _______, _______, _______, _______, _______, + KC_MSTP, KC_MPLY, KC_MPRV, KC_MNXT, + _______, _______, + _______, _______, + _______, _______, + // right hand + KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, + _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, + KC_DEL, _______, + _______, _______, + _______, _______), + +[_NUMPAD] = LAYOUT_5x7( + // left hand + _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, + _______, _______, + _______, _______, + _______, _______, + // right hand + _______, _______, KC_NLCK, _______, KC_PMNS, KC_PPLS, _______, + _______, _______, KC_P7, KC_P8, KC_P9, _______, _______, + _______, _______, KC_P4, KC_P5, KC_P6, KC_PAST, _______, + _______, KC_P1, KC_P2, KC_P3, KC_PSLS, _______, + KC_P0, KC_PDOT, _______, _______, + _______, KC_PENT, + _______, _______, + _______, _______), + + +[_NUMPAD] = LAYOUT_5x7( + // left hand + _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, + _______, _______, + _______, _______, + _______, _______, + // right hand + _______, _______, KC_NLCK, _______, KC_PMNS, KC_PPLS, _______, + _______, _______, KC_P7, KC_P8, KC_P9, _______, _______, + _______, _______, KC_P4, KC_P5, KC_P6, KC_PAST, _______, + _______, KC_P1, KC_P2, KC_P3, KC_PSLS, _______, + KC_P0, KC_PDOT, _______, _______, + _______, KC_PENT, + _______, _______, + _______, _______), + +[_BLANK] = LAYOUT_5x7( + // left hand + _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, + _______, _______, + _______, _______, + _______, _______, + // right hand + _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, + _______, _______, + _______, _______, + _______, _______), + + +}; diff --git a/keyboards/handwired/dactyl_manuform/5x7/keymaps/via/rules.mk b/keyboards/handwired/dactyl_manuform/5x7/keymaps/via/rules.mk new file mode 100644 index 000000000000..1e5b99807cb7 --- /dev/null +++ b/keyboards/handwired/dactyl_manuform/5x7/keymaps/via/rules.mk @@ -0,0 +1 @@ +VIA_ENABLE = yes diff --git a/keyboards/handwired/dactyl_manuform/6x6/config.h b/keyboards/handwired/dactyl_manuform/6x6/config.h index 522e98b6873d..dd47f44c915c 100644 --- a/keyboards/handwired/dactyl_manuform/6x6/config.h +++ b/keyboards/handwired/dactyl_manuform/6x6/config.h @@ -20,7 +20,8 @@ along with this program. If not, see . #include "config_common.h" - +#define PRODUCT_ID 0x3636 +#define DEVICE_VER 0x0001 #define PRODUCT Dactyl-Manuform (6x6) /* key matrix size */ diff --git a/keyboards/handwired/dactyl_manuform/config.h b/keyboards/handwired/dactyl_manuform/config.h index 7c95f7058538..5a5664e38181 100644 --- a/keyboards/handwired/dactyl_manuform/config.h +++ b/keyboards/handwired/dactyl_manuform/config.h @@ -21,9 +21,7 @@ along with this program. If not, see . #include "config_common.h" /* USB Device descriptor parameter */ -#define VENDOR_ID 0xFEED -#define PRODUCT_ID 0x3060 -#define DEVICE_VER 0x0001 +#define VENDOR_ID 0x444D #define MANUFACTURER tshort // defined in subfolder #define DESCRIPTION A split keyboard for the cheap makers diff --git a/keyboards/handwired/dactyl_manuform/dmote/62key/config.h b/keyboards/handwired/dactyl_manuform/dmote/62key/config.h index d315cb180dd2..cb213270703b 100644 --- a/keyboards/handwired/dactyl_manuform/dmote/62key/config.h +++ b/keyboards/handwired/dactyl_manuform/dmote/62key/config.h @@ -1,7 +1,8 @@ #pragma once #include "config_common.h" - +#define PRODUCT_ID 0x3632 +#define DEVICE_VER 0x0001 #define PRODUCT DMOTE (62-key) #define MATRIX_ROWS 12 #define MATRIX_COLS 6 From d91987ab9adbf7bba9f47deb6b30a02d28e7195d Mon Sep 17 00:00:00 2001 From: Joel Challis Date: Sat, 25 Jul 2020 22:50:56 +0100 Subject: [PATCH 443/930] Enable OLED support for Teensy 3.2/LC (#7591) * I2C_TIMEOUT is not defined on arm teensy * Work round teensy having different ChibiOS config options * Stash OLED conf files * update comment * update comment * Remove stm32 alias to allow teensy alt mode --- drivers/chibios/i2c_master.c | 8 +++++--- drivers/chibios/i2c_master.h | 9 ++++++++- drivers/oled/oled_driver.c | 10 ++++------ drivers/oled/oled_driver.h | 4 ++++ keyboards/handwired/onekey/teensy_32/config.h | 6 ++++++ keyboards/handwired/onekey/teensy_32/halconf.h | 2 +- keyboards/handwired/onekey/teensy_32/mcuconf.h | 6 ++++++ keyboards/handwired/onekey/teensy_lc/config.h | 6 ++++++ keyboards/handwired/onekey/teensy_lc/halconf.h | 2 +- keyboards/handwired/onekey/teensy_lc/mcuconf.h | 6 ++++++ tmk_core/common/chibios/chibios_config.h | 7 +++++++ 11 files changed, 54 insertions(+), 12 deletions(-) diff --git a/drivers/chibios/i2c_master.c b/drivers/chibios/i2c_master.c index ede915fa4ab4..4bd8e2af7624 100644 --- a/drivers/chibios/i2c_master.c +++ b/drivers/chibios/i2c_master.c @@ -32,7 +32,9 @@ static uint8_t i2c_address; static const I2CConfig i2cconfig = { -#ifdef USE_I2CV1 +#if defined(USE_I2CV1_CONTRIB) + I2C1_CLOCK_SPEED, +#elif defined(USE_I2CV1) I2C1_OPMODE, I2C1_CLOCK_SPEED, I2C1_DUTY_CYCLE, @@ -62,8 +64,8 @@ __attribute__((weak)) void i2c_init(void) { chThdSleepMilliseconds(10); #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); + palSetPadMode(I2C1_SCL_BANK, I2C1_SCL, I2C1_SCL_PAL_MODE); + palSetPadMode(I2C1_SDA_BANK, I2C1_SDA, I2C1_SDA_PAL_MODE); #else palSetPadMode(I2C1_SCL_BANK, I2C1_SCL, PAL_MODE_ALTERNATE(I2C1_SCL_PAL_MODE) | PAL_STM32_OTYPE_OPENDRAIN); palSetPadMode(I2C1_SDA_BANK, I2C1_SDA, PAL_MODE_ALTERNATE(I2C1_SDA_PAL_MODE) | PAL_STM32_OTYPE_OPENDRAIN); diff --git a/drivers/chibios/i2c_master.h b/drivers/chibios/i2c_master.h index 3d3891289faa..b3e234e16187 100644 --- a/drivers/chibios/i2c_master.h +++ b/drivers/chibios/i2c_master.h @@ -81,7 +81,14 @@ # define I2C_DRIVER I2CD1 #endif -#ifndef USE_GPIOV1 +#ifdef USE_GPIOV1 +# ifndef I2C1_SCL_PAL_MODE +# define I2C1_SCL_PAL_MODE PAL_MODE_STM32_ALTERNATE_OPENDRAIN +# endif +# ifndef I2C1_SDA_PAL_MODE +# define I2C1_SDA_PAL_MODE PAL_MODE_STM32_ALTERNATE_OPENDRAIN +# 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 diff --git a/drivers/oled/oled_driver.c b/drivers/oled/oled_driver.c index 977b70178322..f1990567f784 100644 --- a/drivers/oled/oled_driver.c +++ b/drivers/oled/oled_driver.c @@ -82,14 +82,12 @@ along with this program. If not, see . #define I2C_CMD 0x00 #define I2C_DATA 0x40 #if defined(__AVR__) -// already defined on ARM -# define I2C_TIMEOUT 100 -# define I2C_TRANSMIT_P(data) i2c_transmit_P((OLED_DISPLAY_ADDRESS << 1), &data[0], sizeof(data), I2C_TIMEOUT) +# define I2C_TRANSMIT_P(data) i2c_transmit_P((OLED_DISPLAY_ADDRESS << 1), &data[0], sizeof(data), OLED_I2C_TIMEOUT) #else // defined(__AVR__) -# define I2C_TRANSMIT_P(data) i2c_transmit((OLED_DISPLAY_ADDRESS << 1), &data[0], sizeof(data), I2C_TIMEOUT) +# define I2C_TRANSMIT_P(data) i2c_transmit((OLED_DISPLAY_ADDRESS << 1), &data[0], sizeof(data), OLED_I2C_TIMEOUT) #endif // defined(__AVR__) -#define I2C_TRANSMIT(data) i2c_transmit((OLED_DISPLAY_ADDRESS << 1), &data[0], sizeof(data), I2C_TIMEOUT) -#define I2C_WRITE_REG(mode, data, size) i2c_writeReg((OLED_DISPLAY_ADDRESS << 1), mode, data, size, I2C_TIMEOUT) +#define I2C_TRANSMIT(data) i2c_transmit((OLED_DISPLAY_ADDRESS << 1), &data[0], sizeof(data), OLED_I2C_TIMEOUT) +#define I2C_WRITE_REG(mode, data, size) i2c_writeReg((OLED_DISPLAY_ADDRESS << 1), mode, data, size, OLED_I2C_TIMEOUT) #define HAS_FLAGS(bits, flags) ((bits & flags) == flags) diff --git a/drivers/oled/oled_driver.h b/drivers/oled/oled_driver.h index af6e5a2b617d..5c21c0cc8e9d 100644 --- a/drivers/oled/oled_driver.h +++ b/drivers/oled/oled_driver.h @@ -150,6 +150,10 @@ along with this program. If not, see . # endif #endif +#if !defined(OLED_I2C_TIMEOUT) +# define OLED_I2C_TIMEOUT 100 +#endif + // OLED Rotation enum values are flags typedef enum { OLED_ROTATION_0 = 0, diff --git a/keyboards/handwired/onekey/teensy_32/config.h b/keyboards/handwired/onekey/teensy_32/config.h index 0d82a0578694..a4839135a03c 100644 --- a/keyboards/handwired/onekey/teensy_32/config.h +++ b/keyboards/handwired/onekey/teensy_32/config.h @@ -22,3 +22,9 @@ #define MATRIX_COL_PINS { D5 } #define MATRIX_ROW_PINS { B2 } #define UNUSED_PINS + +// i2c_master defines +#define I2C1_SCL 0 // A2 on pinout = B0 +#define I2C1_SDA 1 // A3 on pinout = B1 +#define I2C1_SCL_PAL_MODE PAL_MODE_ALTERNATIVE_2 +#define I2C1_SDA_PAL_MODE PAL_MODE_ALTERNATIVE_2 diff --git a/keyboards/handwired/onekey/teensy_32/halconf.h b/keyboards/handwired/onekey/teensy_32/halconf.h index 16f32117d51b..de0f29ce6ed0 100644 --- a/keyboards/handwired/onekey/teensy_32/halconf.h +++ b/keyboards/handwired/onekey/teensy_32/halconf.h @@ -79,7 +79,7 @@ * @brief Enables the I2C subsystem. */ #if !defined(HAL_USE_I2C) || defined(__DOXYGEN__) -#define HAL_USE_I2C FALSE +#define HAL_USE_I2C TRUE #endif /** diff --git a/keyboards/handwired/onekey/teensy_32/mcuconf.h b/keyboards/handwired/onekey/teensy_32/mcuconf.h index 13a9e3333f28..327f5c9aa3b5 100644 --- a/keyboards/handwired/onekey/teensy_32/mcuconf.h +++ b/keyboards/handwired/onekey/teensy_32/mcuconf.h @@ -42,4 +42,10 @@ * 5 for Teensy 3.x */ #define KINETIS_USB_USB0_IRQ_PRIORITY 5 +/* + * I2C driver settings + */ +#define KINETIS_I2C_USE_I2C0 TRUE +#define KINETIS_I2C_I2C0_PRIORITY 4 + #endif /* _MCUCONF_H_ */ diff --git a/keyboards/handwired/onekey/teensy_lc/config.h b/keyboards/handwired/onekey/teensy_lc/config.h index 0d82a0578694..a4839135a03c 100644 --- a/keyboards/handwired/onekey/teensy_lc/config.h +++ b/keyboards/handwired/onekey/teensy_lc/config.h @@ -22,3 +22,9 @@ #define MATRIX_COL_PINS { D5 } #define MATRIX_ROW_PINS { B2 } #define UNUSED_PINS + +// i2c_master defines +#define I2C1_SCL 0 // A2 on pinout = B0 +#define I2C1_SDA 1 // A3 on pinout = B1 +#define I2C1_SCL_PAL_MODE PAL_MODE_ALTERNATIVE_2 +#define I2C1_SDA_PAL_MODE PAL_MODE_ALTERNATIVE_2 diff --git a/keyboards/handwired/onekey/teensy_lc/halconf.h b/keyboards/handwired/onekey/teensy_lc/halconf.h index 16f32117d51b..de0f29ce6ed0 100644 --- a/keyboards/handwired/onekey/teensy_lc/halconf.h +++ b/keyboards/handwired/onekey/teensy_lc/halconf.h @@ -79,7 +79,7 @@ * @brief Enables the I2C subsystem. */ #if !defined(HAL_USE_I2C) || defined(__DOXYGEN__) -#define HAL_USE_I2C FALSE +#define HAL_USE_I2C TRUE #endif /** diff --git a/keyboards/handwired/onekey/teensy_lc/mcuconf.h b/keyboards/handwired/onekey/teensy_lc/mcuconf.h index ea576df5bc6f..f73bec3dc3a8 100644 --- a/keyboards/handwired/onekey/teensy_lc/mcuconf.h +++ b/keyboards/handwired/onekey/teensy_lc/mcuconf.h @@ -42,4 +42,10 @@ * 5 for Teensy 3.x */ #define KINETIS_USB_USB0_IRQ_PRIORITY 2 +/* + * I2C driver settings + */ +#define KINETIS_I2C_USE_I2C0 TRUE +#define KINETIS_I2C_I2C0_PRIORITY 4 + #endif /* _MCUCONF_H_ */ diff --git a/tmk_core/common/chibios/chibios_config.h b/tmk_core/common/chibios/chibios_config.h index 272529608343..1dd979f6ac2c 100644 --- a/tmk_core/common/chibios/chibios_config.h +++ b/tmk_core/common/chibios/chibios_config.h @@ -22,3 +22,10 @@ #if defined(STM32F1XX) || defined(STM32F2XX) || defined(STM32F4XX) || defined(STM32L1XX) # define USE_I2CV1 #endif + +// teensy +#if defined(K20x) || defined(KL2x) +# define USE_I2CV1 +# define USE_I2CV1_CONTRIB // for some reason a bunch of ChibiOS-Contrib boards only have clock_speed +# define USE_GPIOV1 +#endif From 95c742ec276c7ebf2cd996cc3889d3e2d0a2874e Mon Sep 17 00:00:00 2001 From: QMK Bot Date: Sat, 25 Jul 2020 22:33:55 +0000 Subject: [PATCH 444/930] format code according to conventions [skip ci] --- tmk_core/common/chibios/chibios_config.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tmk_core/common/chibios/chibios_config.h b/tmk_core/common/chibios/chibios_config.h index 1dd979f6ac2c..b4d96465d16c 100644 --- a/tmk_core/common/chibios/chibios_config.h +++ b/tmk_core/common/chibios/chibios_config.h @@ -24,8 +24,8 @@ #endif // teensy -#if defined(K20x) || defined(KL2x) +#if defined(K20x) || defined(KL2x) # define USE_I2CV1 -# define USE_I2CV1_CONTRIB // for some reason a bunch of ChibiOS-Contrib boards only have clock_speed +# define USE_I2CV1_CONTRIB // for some reason a bunch of ChibiOS-Contrib boards only have clock_speed # define USE_GPIOV1 #endif From 12946d056566b2e7915350c52d07540d0e1c973f Mon Sep 17 00:00:00 2001 From: Valen Cheung Date: Sun, 26 Jul 2020 07:45:35 +0800 Subject: [PATCH 445/930] Keymap update - massdrop/ctrl/responsive_pattern (#8730) * rewrite keyboards/massdrop/ctrl/keymaps/responsive_pattern/keymap.c in respopnse to the last update (#5328) * remove print.h * changed default parameters, modified readme --- .../ctrl/keymaps/responsive_pattern/README.md | 20 +- .../ctrl/keymaps/responsive_pattern/keymap.c | 1085 +++++++---------- 2 files changed, 474 insertions(+), 631 deletions(-) diff --git a/keyboards/massdrop/ctrl/keymaps/responsive_pattern/README.md b/keyboards/massdrop/ctrl/keymaps/responsive_pattern/README.md index 5ee630dfb803..60c2d1f91f36 100644 --- a/keyboards/massdrop/ctrl/keymaps/responsive_pattern/README.md +++ b/keyboards/massdrop/ctrl/keymaps/responsive_pattern/README.md @@ -1,5 +1,17 @@ -# THIS KEYMAP IS BROKEN -The CTRL and ALT have both been switched to using the QMK RGB Matrix system, -rendering any custom effects that used the old, custom Massdrop lighting system, -BROKEN. + +Fn + P + Esc, Fn + P + `: reset effect to default + +Fn + P + Tab, Fn + P + Y: select previous color pattern +Fn + P + Caps, Fn + P + H: select next color pattern + +Fn + P + A, Fn + P + J: (no effect for now) +Fn + P + D, Fn + P + L: (no effect for now) + + +Fn + P + Q, Fn + P + U: wave travel faster +Fn + P + E, Fn + P + O: wave travel slower + + +Fn + P + W, Fn + P + I: increase wave width +Fn + P + S, Fn + P + K: decrease wave width diff --git a/keyboards/massdrop/ctrl/keymaps/responsive_pattern/keymap.c b/keyboards/massdrop/ctrl/keymaps/responsive_pattern/keymap.c index 58911aa75741..dbf90b50a1f7 100644 --- a/keyboards/massdrop/ctrl/keymaps/responsive_pattern/keymap.c +++ b/keyboards/massdrop/ctrl/keymaps/responsive_pattern/keymap.c @@ -1,41 +1,33 @@ #include QMK_KEYBOARD_H -// uint8_t keyboard_leds(void) -#include +#include // sqrtf, powf +#ifdef CONSOLE_ENABLE -#if ISSI3733_LED_COUNT == 119 -# define KEY_LED_COUNT 87 -#elif ISSI3733_LED_COUNT == 105 -# define KEY_LED_COUNT 67 -#endif - -#define min(x, y) (x < y ? x : y) - +#include -extern issi3733_led_t *lede; -extern issi3733_led_t led_map[]; +#endif enum ctrl_keycodes { - L_BRI = SAFE_RANGE, //LED Brightness Increase - L_BRD, //LED Brightness Decrease - L_PTN, //LED Pattern Select Next - L_PTP, //LED Pattern Select Previous - L_PSI, //LED Pattern Speed Increase - L_PSD, //LED Pattern Speed Decrease - L_T_MD, //LED Toggle Mode - L_T_ONF, //LED Toggle On / Off - L_ON, //LED On - L_OFF, //LED Off - L_T_BR, //LED Toggle Breath Effect - L_T_PTD, //LED Toggle Scrolling Pattern Direction - U_T_AUTO, //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 + L_BRI = SAFE_RANGE, //LED Brightness Increase //Working + L_BRD, //LED Brightness Decrease //Working + L_PTN, //LED Pattern Select Next //Working + L_PTP, //LED Pattern Select Previous //Working + L_PSI, //LED Pattern Speed Increase //Working + L_PSD, //LED Pattern Speed Decrease //Working + L_T_MD, //LED Toggle Mode //Working + L_T_ONF, //LED Toggle On / Off //Broken + L_ON, //LED On //Broken + L_OFF, //LED Off //Broken + L_T_BR, //LED Toggle Breath Effect //Working + L_T_PTD, //LED Toggle Scrolling Pattern Direction //Working + U_T_AGCR, //USB Toggle Automatic GCR control //Working + 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 //Working + L_SP_PR, //LED Splash Pattern Select Previous L_SP_NE, //LED Splash Pattern Select Next @@ -48,10 +40,9 @@ enum ctrl_keycodes { L_CP_PR, //LED Color Pattern Select Previous L_CP_NX, //LEB Color Pattern Select Next -}; -#define TG_NKRO MAGIC_TOGGLE_NKRO //Toggle 6KRO / NKRO mode -#define ______ KC_TRNS + S_RESET // reset all parameters +}; keymap_config_t keymap_config; @@ -67,418 +58,46 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [1] = LAYOUT( _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MUTE, _______, _______, \ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MPLY, KC_MSTP, KC_VOLU, \ - L_T_BR, L_PSD, L_BRI, L_PSI, _______, _______, _______, U_T_AUTO,U_T_AGCR,_______, MO(2), _______, _______, _______, KC_MPRV, KC_MNXT, KC_VOLD, \ + L_T_BR, L_PSD, L_BRI, L_PSI, _______, _______, _______, _______, U_T_AGCR,_______, MO(2), _______, _______, _______, KC_MPRV, KC_MNXT, KC_VOLD, \ L_T_PTD, L_PTP, L_BRD, L_PTN, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ - _______, L_T_MD, L_T_ONF, _______, _______, MD_BOOT, TG_NKRO, _______, _______, _______, _______, _______, _______, \ + _______, L_T_MD, L_T_ONF, _______, _______, MD_BOOT, NK_TOGG, _______, _______, _______, _______, _______, _______, \ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ ), [2] = LAYOUT( - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + S_RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + S_RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ L_CP_NX, L_SP_SL, L_SP_WD, L_SP_FA, _______, _______, L_CP_NX, L_SP_SL, L_SP_WD, L_SP_FA, _______, _______, _______, _______, _______, _______, _______, \ L_CP_PR, L_SP_PR, L_SP_NW, L_SP_NE, _______, _______, L_CP_PR, L_SP_PR, L_SP_NW, L_SP_NE, _______, _______, _______, \ - _______, _______, _______, _______, _______, _______, TG_NKRO, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ - ), + ) /* [X] = LAYOUT( _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ - _______, _______, _______, _______, _______, _______, TG_NKRO, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, NK_TOGG, _______, _______, _______, _______, _______, _______, \ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ ), */ }; -// see: /tmk_core/common/keycode.h -uint8_t KEYCODE_TO_LED_ID[256]; -uint8_t DISTANCE_MAP[KEY_LED_COUNT+1][KEY_LED_COUNT+1]; -struct user_led_t { - uint8_t state; - uint8_t r; - uint8_t g; - uint8_t b; -} USER_LED[KEY_LED_COUNT] = { - -}; - +#define DISTANCE_NORAMLIZING_PARAMETER 3 struct { uint8_t PATTERN_INDEX; - uint8_t WAVE_FRONT_WIDTH; - uint16_t WAVE_PERIOD; - uint8_t COLOR_PATTERN_INDEX; - uint8_t TRAVEL_DISTANCE; + float WAVE_WIDTH; + float WAVE_SPEED; + int COLOR_PATTERN_INDEX; + float TRAVEL_DISTANCE; } USER_CONFIG = { .PATTERN_INDEX = 1, - .WAVE_FRONT_WIDTH = 3, - .WAVE_PERIOD = 50, + .WAVE_WIDTH = 10, // width of the wave in keycaps + .WAVE_SPEED = 15, // travel how many keycaps per second .COLOR_PATTERN_INDEX = 0, .TRAVEL_DISTANCE = 25, }; -uint8_t ktli(uint16_t keycode){ - if(keycode < 256){ - // the array is initialized in `matrix_init_user()` - return KEYCODE_TO_LED_ID[keycode]; - } - switch(keycode){ - // definition of MO(layer): quantum/quantum_keycodes.h: line 614 - case MO(1): return 82; - } - return 0; -}; - -// Runs just one time when the keyboard initializes. -static void init_keycode_to_led_map(void){ - uint16_t LED_MAP[MATRIX_ROWS][MATRIX_COLS] = LAYOUT( - 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,42,43,44,45,46,47,48,49,50,51, - 52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67, -#if KEY_LED_COUNT >= 87 - 68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87 -#endif - ); - - uint16_t key = 0; - for(uint8_t y = 0; y < MATRIX_ROWS; ++y){ - for(uint8_t x = 0; x < MATRIX_COLS; ++x){ - key = keymaps[0][y][x]; - if(key < 256){ - KEYCODE_TO_LED_ID[key] = LED_MAP[y][x]; - } - } - } -} -// https://docs.qmk.fm/#/feature_terminal -#define KEY_POSITION_MAP_ROWS 6 -#define KEY_POSITION_MAP_COLUMNS 20 -static void init_distance_map(void){ - uint16_t KEY_POSITION_MAP[KEY_POSITION_MAP_ROWS][KEY_POSITION_MAP_COLUMNS] = { - { KC_NO, KC_ESC, KC_NO, KC_F1, KC_F2, KC_F3, KC_F4, KC_NO, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_NO, KC_PSCR, KC_SLCK, KC_PAUS, }, - // { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_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_MINS, KC_EQL, KC_BSPC, KC_BSPC, KC_NO, KC_INS, KC_HOME, KC_PGUP, }, - { 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_BSLS, KC_NO, KC_DEL, KC_END, KC_PGDN, }, - { 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_ENT, KC_ENT, KC_ENT, KC_NO, KC_NO, KC_NO, KC_NO, }, - { 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_RSFT, KC_RSFT, KC_RSFT, KC_RSFT, KC_NO, KC_NO, KC_UP, KC_NO, }, - { KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_SPC, KC_SPC, KC_SPC, KC_SPC, KC_SPC, KC_RALT, KC_NO, MO(1), KC_APP, KC_RCTL, KC_RCTL, KC_RCTL, KC_NO, KC_LEFT, KC_DOWN, KC_RIGHT, }, - }; - uint8_t columns = KEY_POSITION_MAP_COLUMNS; - uint8_t rows = KEY_POSITION_MAP_ROWS; - - for(uint8_t y = 0; y < rows; ++y){ - for(uint8_t x = 0; x < columns; ++x){ - uint8_t id1 = ktli(KEY_POSITION_MAP[y][x]); - - for(uint8_t j = y; j < rows; ++j){ - for(uint8_t i = 0; i < columns; ++i){ - uint8_t id2 = ktli(KEY_POSITION_MAP[j][i]); - - if(id1 == id2) continue; - - uint8_t dx = abs(i - x); - uint8_t dy = abs(j - y); - uint8_t dis = dx + dy; - if(i < x && j > y){ - dis -= min(dx, dy); - } - - uint8_t _dis = DISTANCE_MAP[id1][id2]; - if(_dis && _dis <= dis) continue; - DISTANCE_MAP[id1][id2] = dis; - DISTANCE_MAP[id2][id1] = dis; - } - } - } - } -} -void matrix_init_user(void) { - init_keycode_to_led_map(); - init_distance_map(); -}; - -// /tmk_core/protocol/arm_atsam/led_matrix.c: line 244 -uint8_t led_enabled; -float led_animation_speed; -uint8_t led_animation_direction; -uint8_t led_animation_orientation; -uint8_t led_animation_breathing; -uint8_t led_animation_breathe_cur; -uint8_t breathe_step; -uint8_t breathe_dir; -uint64_t led_next_run; - -uint8_t led_animation_id; -uint8_t led_lighting_mode; - -issi3733_led_t *led_cur; -uint8_t led_per_run; -float breathe_mult; - -// overrided /tmk_core/protocol/arm_atsam/led_matrix.c: line 484 -void rgb_matrix_init_user(void){ - led_animation_speed = ANIMATION_SPEED_STEP * 15; - led_per_run = 15; -} - -// overrided /tmk_core/protocol/arm_atsam/led_matrix.c: line 262 -void led_matrix_run(void) -{ - float ro; - float go; - float bo; - float po; - uint8_t led_this_run = 0; - led_setup_t *f = (led_setup_t*)led_setups[led_animation_id]; - - if (led_cur == 0) //Denotes start of new processing cycle in the case of chunked processing - { - led_cur = led_map; - - breathe_mult = 1; - - if (led_animation_breathing) - { - led_animation_breathe_cur += breathe_step * breathe_dir; - - if (led_animation_breathe_cur >= BREATHE_MAX_STEP) - breathe_dir = -1; - else if (led_animation_breathe_cur <= BREATHE_MIN_STEP) - breathe_dir = 1; - - //Brightness curve created for 256 steps, 0 - ~98% - breathe_mult = 0.000015 * led_animation_breathe_cur * led_animation_breathe_cur; - if (breathe_mult > 1) breathe_mult = 1; - else if (breathe_mult < 0) breathe_mult = 0; - } - } - - uint8_t fcur = 0; - uint8_t fmax = 0; - - //Frames setup - while (f[fcur].end != 1) - { - fcur++; //Count frames - } - - fmax = fcur; //Store total frames count - - struct user_led_t user_led_cur; - while (led_cur < lede && led_this_run < led_per_run) - { - ro = 0; - go = 0; - bo = 0; - - uint8_t led_index = led_cur - led_map; // only this part differs from the original function. - if(led_index < KEY_LED_COUNT){ // - user_led_cur = USER_LED[led_index]; // `struct user_led_t USER_LED[]` is stored globally. - } // - // - if(led_index < KEY_LED_COUNT && user_led_cur.state){ // `user_led_cur` is just for convenience - ro = user_led_cur.r; // - go = user_led_cur.g; // - bo = user_led_cur.b; // - } // - else if (led_lighting_mode == LED_MODE_KEYS_ONLY && led_cur->scan == 255) - { - //Do not act on this LED - } - else if (led_lighting_mode == LED_MODE_NON_KEYS_ONLY && led_cur->scan != 255) - { - //Do not act on this LED - } - else if (led_lighting_mode == LED_MODE_INDICATORS_ONLY) - { - //Do not act on this LED (Only show indicators) - } - else - { - //Act on LED - for (fcur = 0; fcur < fmax; fcur++) - { - - if (led_animation_orientation) - { - po = led_cur->py; - } - else - { - po = led_cur->px; - } - - float pomod; - pomod = (float)(g_tick % (uint32_t)(1000.0f / led_animation_speed)) / 10.0f * led_animation_speed; - - //Add in any moving effects - if ((!led_animation_direction && f[fcur].ef & EF_SCR_R) || (led_animation_direction && (f[fcur].ef & EF_SCR_L))) - { - pomod *= 100.0f; - pomod = (uint32_t)pomod % 10000; - pomod /= 100.0f; - - po -= pomod; - - if (po > 100) po -= 100; - else if (po < 0) po += 100; - } - else if ((!led_animation_direction && f[fcur].ef & EF_SCR_L) || (led_animation_direction && (f[fcur].ef & EF_SCR_R))) - { - pomod *= 100.0f; - pomod = (uint32_t)pomod % 10000; - pomod /= 100.0f; - po += pomod; - - if (po > 100) po -= 100; - else if (po < 0) po += 100; - } - - //Check if LED's po is in current frame - if (po < f[fcur].hs) continue; - if (po > f[fcur].he) continue; - //note: < 0 or > 100 continue - - //Calculate the po within the start-stop percentage for color blending - po = (po - f[fcur].hs) / (f[fcur].he - f[fcur].hs); - - //Add in any color effects - if (f[fcur].ef & EF_OVER) - { - ro = (po * (f[fcur].re - f[fcur].rs)) + f[fcur].rs;// + 0.5; - go = (po * (f[fcur].ge - f[fcur].gs)) + f[fcur].gs;// + 0.5; - bo = (po * (f[fcur].be - f[fcur].bs)) + f[fcur].bs;// + 0.5; - } - else if (f[fcur].ef & EF_SUBTRACT) - { - ro -= (po * (f[fcur].re - f[fcur].rs)) + f[fcur].rs;// + 0.5; - go -= (po * (f[fcur].ge - f[fcur].gs)) + f[fcur].gs;// + 0.5; - bo -= (po * (f[fcur].be - f[fcur].bs)) + f[fcur].bs;// + 0.5; - } - else - { - ro += (po * (f[fcur].re - f[fcur].rs)) + f[fcur].rs;// + 0.5; - go += (po * (f[fcur].ge - f[fcur].gs)) + f[fcur].gs;// + 0.5; - bo += (po * (f[fcur].be - f[fcur].bs)) + f[fcur].bs;// + 0.5; - } - } - } - - //Clamp values 0-255 - if (ro > 255) ro = 255; else if (ro < 0) ro = 0; - if (go > 255) go = 255; else if (go < 0) go = 0; - if (bo > 255) bo = 255; else if (bo < 0) bo = 0; - - if (led_animation_breathing) - { - ro *= breathe_mult; - go *= breathe_mult; - bo *= breathe_mult; - } - - *led_cur->rgb.r = (uint8_t)ro; - *led_cur->rgb.g = (uint8_t)go; - *led_cur->rgb.b = (uint8_t)bo; - -#ifdef USB_LED_INDICATOR_ENABLE - if (keyboard_leds()) - { - uint8_t kbled = keyboard_leds(); - if ( - #if USB_LED_NUM_LOCK_SCANCODE != 255 - (led_cur->scan == USB_LED_NUM_LOCK_SCANCODE && kbled & (1<scan == USB_LED_CAPS_LOCK_SCANCODE && kbled & (1<scan == USB_LED_SCROLL_LOCK_SCANCODE && kbled & (1<scan == USB_LED_COMPOSE_SCANCODE && kbled & (1<scan == USB_LED_KANA_SCANCODE && kbled & (1<rgb.r > 127) *led_cur->rgb.r = 0; - else *led_cur->rgb.r = 255; - if (*led_cur->rgb.g > 127) *led_cur->rgb.g = 0; - else *led_cur->rgb.g = 255; - if (*led_cur->rgb.b > 127) *led_cur->rgb.b = 0; - else *led_cur->rgb.b = 255; - } - } -#endif //USB_LED_INDICATOR_ENABLE - - led_cur++; - led_this_run++; - } -} - -#define KEY_STROKES_LENGTH 20 -struct { - bool alive; - uint8_t led_id; - uint32_t time; -} KEY_STROKES[KEY_STROKES_LENGTH] = {{}}; - - - - -void set_led_rgb(uint8_t led_id, uint8_t r, uint8_t g, uint8_t b){ - issi3733_led_t *target_led = (led_map + led_id); - *target_led->rgb.r = r; - *target_led->rgb.g = g; - *target_led->rgb.b = b; -} - - -uint8_t DISTANCE_FROM_LAST_KEYSTROKE[KEY_LED_COUNT+1]; -void calculate_keystroke_distance(void){ - bool alive; - uint8_t led_id, period_passed; - uint32_t t; - - - for(uint8_t i = 0; i <= KEY_LED_COUNT; ++i){ - DISTANCE_FROM_LAST_KEYSTROKE[i] = 0; - } - - for(uint8_t i = 0; i < KEY_STROKES_LENGTH; ++i){ - if(KEY_STROKES[i].alive){ - t = timer_elapsed32(KEY_STROKES[i].time); - alive = 0; - led_id = KEY_STROKES[i].led_id; - period_passed = t / USER_CONFIG.WAVE_PERIOD; - - uint8_t delta_period; - for(uint8_t j = 1; j <= KEY_LED_COUNT; ++j){ - delta_period = period_passed - DISTANCE_MAP[led_id][j]; - if(( delta_period < USER_CONFIG.WAVE_FRONT_WIDTH) && ( - DISTANCE_MAP[led_id][j] <= USER_CONFIG.TRAVEL_DISTANCE - )){ - switch(USER_CONFIG.PATTERN_INDEX){ - case 3: - case 4: - case 5: - case 6: - DISTANCE_FROM_LAST_KEYSTROKE[j] += delta_period; - break; - default: - DISTANCE_FROM_LAST_KEYSTROKE[j] = 1; - break; - } - alive = 1; - } - } - KEY_STROKES[i].alive = alive; - } - } -} #define COLOR_PATTERN_RGB_COUNT 18 static uint8_t COLOR_PATTERNS[][COLOR_PATTERN_RGB_COUNT][3] = { @@ -515,191 +134,300 @@ static uint8_t COLOR_PATTERNS[][COLOR_PATTERN_RGB_COUNT][3] = { static const uint8_t COLOR_PATTERNS_COUNT = ( sizeof(COLOR_PATTERNS) / sizeof(COLOR_PATTERNS[0])); -void set_user_led_rgb(uint8_t i, uint8_t r, uint8_t g, uint8_t b){ - USER_LED[i-1].state = 1; - USER_LED[i-1].r = r; - USER_LED[i-1].g = g; - USER_LED[i-1].b = b; -} -void unset_user_led_rgb(uint8_t i){ - USER_LED[i-1].state = 0; -} -void set_indicator_led_rgb(uint8_t i, - uint8_t layer, uint8_t r, uint8_t g, uint8_t b){ - USER_LED[i-1].state |= 1 << layer; - USER_LED[i-1].r = r; - USER_LED[i-1].g = g; - USER_LED[i-1].b = b; -} -void unset_indicator_led_rgb(uint8_t i, uint8_t layer){ - USER_LED[i-1].state &= ~(1 << layer); -} +/** + * trimed down version of `ISSI3733_LED_MAP`: + * + * `ISSI3733_LED_MAP` is defined in keyboards/massdrop/ctrl/config_led.h is not directly usable, + * the numbers inside this map could probably be related to the PCB layout instead of + * the actual physical layout, + * + * this `ISSI3733_LED_MAP` is used somewhere in protocol/ but is not globally accessible + * so one is created here + * + * x and y are coordinates of the physical layout + * KC_ESC is (0, 0), gap between function keys and number rows is 1.5 + * +y is downwards + * 1 unit is width/height of 1 standard keycap + */ +#define MAX_LED_ID ISSI3733_LED_COUNT +typedef struct led_info_s { + uint16_t id; + uint16_t scan; + float x; + float y; + uint8_t distance_to[MAX_LED_ID + 1]; +} led_info_t; +led_info_t led_info[MAX_LED_ID + 1] = { + { .id = 0 }, + { .id = 1, .x = 0.0, .y = 0.0, .scan = 41 }, // ESC + { .id = 2, .x = 2.0, .y = 0.0, .scan = 58 }, // F1 + { .id = 3, .x = 3.0, .y = 0.0, .scan = 59 }, // F2 + { .id = 4, .x = 3.5, .y = 0.0, .scan = 60 }, // F3 + { .id = 5, .x = 5.0, .y = 0.0, .scan = 61 }, // F4 + { .id = 6, .x = 6.5, .y = 0.0, .scan = 62 }, // F5 + { .id = 7, .x = 7.5, .y = 0.0, .scan = 63 }, // F6 + { .id = 8, .x = 8.5, .y = 0.0, .scan = 64 }, // F7 + { .id = 9, .x = 9.5, .y = 0.0, .scan = 65 }, // F8 + { .id = 10, .x = 11, .y = 0.0, .scan = 66 }, // F9 + { .id = 11, .x = 12, .y = 0.0, .scan = 67 }, // F10 + { .id = 12, .x = 13, .y = 0.0, .scan = 68 }, // F11 + { .id = 13, .x = 14, .y = 0.0, .scan = 69 }, // F12 + { .id = 14, .x = 15.5, .y = 0.0, .scan = 70 }, // Print + { .id = 15, .x = 16.5, .y = 0.0, .scan = 71 }, // Scoll Lock + { .id = 16, .x = 17.5, .y = 0.0, .scan = 72 }, // Pause + { .id = 17, .x = 0.0, .y = 1.5, .scan = 53 }, // ` + { .id = 18, .x = 1.0, .y = 1.5, .scan = 30 }, // 1 + { .id = 19, .x = 2.0, .y = 1.5, .scan = 31 }, // 2 + { .id = 20, .x = 3.0, .y = 1.5, .scan = 32 }, // 3 + { .id = 21, .x = 3.5, .y = 1.5, .scan = 33 }, // 4 + { .id = 22, .x = 5.0, .y = 1.5, .scan = 34 }, // 5 + { .id = 23, .x = 6.0, .y = 1.5, .scan = 35 }, // 6 + { .id = 24, .x = 7.0, .y = 1.5, .scan = 36 }, // 7 + { .id = 25, .x = 8.0, .y = 1.5, .scan = 37 }, // 8 + { .id = 26, .x = 9.0, .y = 1.5, .scan = 38 }, // 9 + { .id = 27, .x = 10.0, .y = 1.5, .scan = 39 }, // 0 + { .id = 28, .x = 11.0, .y = 1.5, .scan = 45 }, // - + { .id = 29, .x = 12.0, .y = 1.5, .scan = 46 }, // = + { .id = 30, .x = 13.5, .y = 1.5, .scan = 42 }, // Backspace + { .id = 31, .x = 15.5, .y = 1.5, .scan = 73 }, // Insert + { .id = 32, .x = 16.6, .y = 1.5, .scan = 74 }, // Home + { .id = 33, .x = 17.5, .y = 1.5, .scan = 75 }, // Page Up + { .id = 34, .x = 0.2, .y = 2.5, .scan = 43 }, // Tab + { .id = 35, .x = 1.5, .y = 2.5, .scan = 20 }, // Q + { .id = 36, .x = 2.5, .y = 2.5, .scan = 26 }, // W + { .id = 37, .x = 3.5, .y = 2.5, .scan = 8 }, // E + { .id = 38, .x = 4.5, .y = 2.5, .scan = 21 }, // R + { .id = 39, .x = 5.5, .y = 2.5, .scan = 23 }, // T + { .id = 40, .x = 6.5, .y = 2.5, .scan = 28 }, // Y + { .id = 41, .x = 7.5, .y = 2.5, .scan = 24 }, // U + { .id = 42, .x = 8.5, .y = 2.5, .scan = 12 }, // I + { .id = 43, .x = 9.5, .y = 2.5, .scan = 18 }, // O + { .id = 44, .x = 10.5, .y = 2.5, .scan = 19 }, // P + { .id = 45, .x = 11.5, .y = 2.5, .scan = 47 }, // [ + { .id = 46, .x = 12.5, .y = 2.5, .scan = 48 }, // ] + { .id = 47, .x = 13.75, .y = 2.5, .scan = 49 }, /* \ */ + { .id = 48, .x = 15.5, .y = 2.5, .scan = 76 }, // Delete + { .id = 49, .x = 16.5, .y = 2.5, .scan = 77 }, // End + { .id = 50, .x = 17.5, .y = 2.5, .scan = 78 }, // Page Down + { .id = 51, .x = 0.4, .y = 3.5, .scan = 57 }, // Caps Lock + { .id = 52, .x = 2.5, .y = 3.5, .scan = 4 }, // A + { .id = 53, .x = 3.5, .y = 3.5, .scan = 22 }, // S + { .id = 54, .x = 4.5, .y = 3.5, .scan = 7 }, // D + { .id = 55, .x = 5.5, .y = 3.5, .scan = 9 }, // F + { .id = 56, .x = 6.5, .y = 3.5, .scan = 10 }, // G + { .id = 57, .x = 7.5, .y = 3.5, .scan = 11 }, // H + { .id = 58, .x = 8.5, .y = 3.5, .scan = 13 }, // J + { .id = 59, .x = 9.5, .y = 3.5, .scan = 14 }, // K + { .id = 60, .x = 10.5, .y = 3.5, .scan = 15 }, // L + { .id = 61, .x = 11.5, .y = 3.5, .scan = 51 }, // ; + { .id = 62, .x = 12.5, .y = 3.5, .scan = 52 }, // ' + { .id = 63, .x = 13.5, .y = 3.5, .scan = 40 }, // Enter + { .id = 64, .x = 0.5, .y = 4.5, .scan = 225 }, // LSHIFT + { .id = 65, .x = 2.25, .y = 4.5, .scan = 29 }, // Z + { .id = 66, .x = 3.25, .y = 4.5, .scan = 27 }, // X + { .id = 67, .x = 4.25, .y = 4.5, .scan = 6 }, // C + { .id = 68, .x = 5.25, .y = 4.5, .scan = 25 }, // V + { .id = 69, .x = 6.25, .y = 4.5, .scan = 5 }, // B + { .id = 70, .x = 7.25, .y = 4.5, .scan = 17 }, // N + { .id = 71, .x = 8.25, .y = 4.5, .scan = 16 }, // M + { .id = 72, .x = 9.25, .y = 4.5, .scan = 54 }, // COMMA + { .id = 73, .x = 10.25, .y = 4.5, .scan = 55 }, // DOT + { .id = 74, .x = 11.25, .y = 4.5, .scan = 56 }, // SLASH + { .id = 75, .x = 13.2, .y = 4.5, .scan = 229 }, // RSHIFT + { .id = 76, .x = 16.5, .y = 4.5, .scan = 82 }, // UP + { .id = 77, .x = 0.1, .y = 5.5, .scan = 224 }, // LCTRL + { .id = 78, .x = 1.25, .y = 5.5, .scan = 227 }, // WIN + { .id = 79, .x = 2.5, .y = 5.5, .scan = 226 }, // LALT + { .id = 80, .x = 6.25, .y = 5.5, .scan = 44 }, // SPACE + +#define MAX_CACHED_SCAN_CODE 231 + { .id = 81, .x = 10.25, .y = 5.5, .scan = 230 }, // RALT + +#define FN_KEY_LED_ID 82 +#define FN_KEY_SCAN_CODE 20737 + { .id = 82, .x = 11.5, .y = 5.5, .scan = 20737 }, // FN + { .id = 83, .x = 12.7, .y = 5.5, .scan = 101 }, // APP + { .id = 84, .x = 13.75, .y = 5.5, .scan = 228 }, // RCTRL + { .id = 85, .x = 15.5, .y = 5.5, .scan = 80 }, // LEFT + { .id = 86, .x = 16.5, .y = 5.5, .scan = 81 }, // DOWN + { .id = 87, .x = 17.5, .y = 5.5, .scan = 79 }, // RIGHT + +#define MAX_LED_ID_WITH_SCANCODE 87 + + { .id = 88, .x = 18.5, .y = 6.5, .scan = 255 }, + { .id = 89, .x = 16.917, .y = 6.5, .scan = 255 }, + { .id = 90, .x = 15.333, .y = 6.5, .scan = 255 }, + { .id = 91, .x = 13.75, .y = 6.5, .scan = 255 }, + { .id = 92, .x = 12.167, .y = 6.5, .scan = 255 }, + { .id = 93, .x = 10.583, .y = 6.5, .scan = 255 }, + { .id = 94, .x = 9, .y = 6.5, .scan = 255 }, + { .id = 95, .x = 7.417, .y = 6.5, .scan = 255 }, + { .id = 96, .x = 5.833, .y = 6.5, .scan = 255 }, + { .id = 97, .x = 4.25, .y = 6.5, .scan = 255 }, + { .id = 98, .x = 2.667, .y = 6.5, .scan = 255 }, + { .id = 99, .x = 1.083, .y = 6.5, .scan = 255 }, + { .id = 100, .x = -0.5, .y = 6.5, .scan = 255 }, + { .id = 101, .x = -0.5, .y = 4.75, .scan = 255 }, + { .id = 102, .x = -0.5, .y = 3, .scan = 255 }, + { .id = 103, .x = -0.5, .y = 1.25, .scan = 255 }, + { .id = 104, .x = -0.5, .y = -0.5, .scan = 255 }, + { .id = 105, .x = 1.083, .y = -0.5, .scan = 255 }, + { .id = 106, .x = 2.667, .y = -0.5, .scan = 255 }, + { .id = 107, .x = 4.25, .y = -0.5, .scan = 255 }, + { .id = 108, .x = 5.833, .y = -0.5, .scan = 255 }, + { .id = 109, .x = 7.417, .y = -0.5, .scan = 255 }, + { .id = 110, .x = 9, .y = -0.5, .scan = 255 }, + { .id = 111, .x = 10.583, .y = -0.5, .scan = 255 }, + { .id = 112, .x = 12.167, .y = -0.5, .scan = 255 }, + { .id = 113, .x = 13.75, .y = -0.5, .scan = 255 }, + { .id = 114, .x = 15.333, .y = -0.5, .scan = 255 }, + { .id = 115, .x = 16.917, .y = -0.5, .scan = 255 }, + { .id = 116, .x = 18.5, .y = 1.25, .scan = 255 }, + { .id = 117, .x = 18.5, .y = 3, .scan = 255 }, + { .id = 118, .x = 18.5, .y = 4.75, .scan = 255 }, + { .id = 119, .x = 18.5, .y = 6.5, .scan = 255 }, +}; -void refresh_pattern_indicators(void){ - static uint8_t GRV_123456[] = { - KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, - }; - - if(layer_state >= 0x04){ - for(uint8_t i = 0; i < 7; ++i){ - if(i == USER_CONFIG.PATTERN_INDEX){ - set_indicator_led_rgb(ktli(GRV_123456[i]), 2, 0, 0, 255); - } else{ - set_indicator_led_rgb(ktli(GRV_123456[i]), 2, 0, 255, 0); +/** + * there are a few variables are used here + * keycode, scancode, led id + * + * scancode relates to actual physical key press + * + * keycode is software key press, or scancode with modifiers (shift, ctrl, alt, etc.), + * keycode with the value less than 255 are usually the same with scan code (I hope so) + * + * the led pattern are running based on led id, because led on the keyboard + * are not limited to keys only + */ +led_info_t* get_led_info_by_scancode(uint16_t scancode){ + static bool init = false; + static led_info_t* scancode_to_led_info[MAX_CACHED_SCAN_CODE + 1]; + if(!init){ + for(int i = 1; i <= MAX_LED_ID_WITH_SCANCODE; ++i){ + uint16_t scan = led_info[i].scan; + if(scan <= MAX_CACHED_SCAN_CODE){ + scancode_to_led_info[scan] = (led_info + i); } } - } else{ - for(uint8_t i = 0; i < 7; ++i){ - unset_indicator_led_rgb(ktli(GRV_123456[i]), 2); - } + init = true; } -} -void refresh_color_pattern_indicators(void){ - static uint8_t ZXCVBNM_COMM_DOT[] = { - KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, - }; - - if(layer_state >= 0x04){ - uint8_t (*c)[3] = &COLOR_PATTERNS[USER_CONFIG.COLOR_PATTERN_INDEX][0]; - for(uint8_t i = 0; i < 9; ++i){ - set_indicator_led_rgb(ktli(ZXCVBNM_COMM_DOT[i]), - 2, c[i][0], c[i][1], c[i][2]); - } - } else{ - for(uint8_t i = 0; i < 9; ++i){ - unset_indicator_led_rgb(ktli(ZXCVBNM_COMM_DOT[i]), 2); - } + + if(scancode <= MAX_CACHED_SCAN_CODE){ + return scancode_to_led_info[scancode]; + } else if(scancode == FN_KEY_SCAN_CODE){ // FN + return (led_info + FN_KEY_LED_ID); } + return led_info; } -// Runs constantly in the background, in a loop. -void matrix_scan_user(void) { - static uint32_t scan_timer = 0; - static uint8_t last_layer = 0; - - uint8_t layer = 0; - if(layer_state >= 0x04){ - layer = 2; - } else if(layer_state >= 0x02){ - layer = 1; - } - calculate_keystroke_distance(); - - - #define USE_PATTERN 0 - #define BLACK_RGB 1 - #define COLOR_RGB 2 - uint8_t ci; // color index - uint8_t *rgb; - uint8_t handle_type; - uint8_t distance; - for(uint8_t i = 1; i <= KEY_LED_COUNT; ++i){ - if(USER_LED[i-1].state >= 2) continue; - - handle_type = USE_PATTERN; - distance = DISTANCE_FROM_LAST_KEYSTROKE[i]; - - switch(USER_CONFIG.PATTERN_INDEX){ - case 0: handle_type = USE_PATTERN; break; - case 1: handle_type = distance ? USE_PATTERN : BLACK_RGB; break; - case 2: handle_type = distance ? BLACK_RGB : USE_PATTERN; break; - case 3: handle_type = distance ? COLOR_RGB : BLACK_RGB; break; - case 4: handle_type = distance ? COLOR_RGB : USE_PATTERN; break; - case 5: - case 6: handle_type = distance ? COLOR_RGB : USE_PATTERN; break; - } - switch(handle_type){ - case USE_PATTERN: unset_user_led_rgb(i); break; - case BLACK_RGB: set_user_led_rgb(i, 0, 0, 0); break; - case COLOR_RGB: - ci = (DISTANCE_FROM_LAST_KEYSTROKE[i] * COLOR_PATTERN_RGB_COUNT / - USER_CONFIG.WAVE_FRONT_WIDTH) % COLOR_PATTERN_RGB_COUNT; - rgb = &COLOR_PATTERNS[USER_CONFIG.COLOR_PATTERN_INDEX][ci][0]; - - set_user_led_rgb(i, rgb[0], rgb[1], rgb[2]); - break; + +void init_led_info(void){ + for(int i = 1; i <= MAX_LED_ID; ++i){ + led_info_t *entry1 = led_info + i; + for(int j = i; j <= MAX_LED_ID; ++j){ + led_info_t *entry2 = led_info + j; + /** + * distance is tripled because + * convertion from float to int reduces accuracy + * + */ + uint8_t distance = (uint8_t)sqrtf( + powf(entry1->x - entry2->x, 2.0) + + powf(entry1->y - entry2->y, 2.0)) * + DISTANCE_NORAMLIZING_PARAMETER; + entry1->distance_to[j] = distance; + entry2->distance_to[i] = distance; } } +}; - // could be moved to process_record_user() - if(layer != last_layer){ - - static uint8_t QWEASDP[] = { - KC_Q, KC_W, KC_E, KC_A, KC_S, KC_D, KC_P, - }; - static uint8_t YUIOHJKL[] = { - KC_Y, KC_U, KC_I, KC_O, KC_H, KC_J, KC_K, KC_L, - }; - - switch(last_layer){ - case 1: - for(uint8_t i = 0; i < 7; ++i){ - unset_indicator_led_rgb(ktli(QWEASDP[i]), 1); - } - break; - case 2: - for(uint8_t i = 0; i < 6; ++i){ - unset_indicator_led_rgb(ktli(QWEASDP[i]), 2); - } - for(uint8_t i = 0; i < 8; ++i){ - unset_indicator_led_rgb(ktli(YUIOHJKL[i]), 2); - } - unset_indicator_led_rgb(ktli(KC_TAB), 2); - unset_indicator_led_rgb(ktli(KC_CAPS), 2); - break; - } +// Runs just one time when the keyboard initializes. +void matrix_init_user(void) { + init_led_info(); +}; +typedef struct keystroke_s { + uint16_t scancode; + uint32_t timer; + bool active; +} keystroke_t; - switch(layer){ - case 1: - for(uint8_t i = 0; i < 7; ++i){ - set_indicator_led_rgb(ktli(QWEASDP[i]), 1, 255, 0, 0); - } - break; - case 2: - for(uint8_t i = 0; i < 6; ++i){ - set_indicator_led_rgb(ktli(QWEASDP[i]), 2, 0, 255, 0); - } - for(uint8_t i = 0; i < 8; ++i){ - set_indicator_led_rgb(ktli(YUIOHJKL[i]), 2, 0, 255, 0); - } - set_indicator_led_rgb(ktli(KC_TAB), 2, 0, 255, 0); - set_indicator_led_rgb(ktli(KC_CAPS), 2, 0, 255, 0); - break; - } +#define MAX_ACTIVE_KEYSTORKES 10 +keystroke_t ACTIVE_KEYSTROKES[MAX_ACTIVE_KEYSTORKES]; - refresh_pattern_indicators(); - refresh_color_pattern_indicators(); - last_layer = layer; +void reset_led_for_instruction(int led_instruction_index){ + led_instructions[led_instruction_index].id0 = 0; + led_instructions[led_instruction_index].id1 = 0; + led_instructions[led_instruction_index].id2 = 0; + led_instructions[led_instruction_index].id3 = 0; +}; +void add_led_to_instruction(int led_instruction_index, int led_id){ + if(32 >= led_id && led_id >= 1){ + led_instructions[led_instruction_index].id0 += ( 1 << (led_id - 1) ); + } else if(64 >= led_id){ + led_instructions[led_instruction_index].id1 += ( 1 << (led_id - 33) ); + } else if(96 >= led_id){ + led_instructions[led_instruction_index].id2 += ( 1 << (led_id - 65) ); + } else if(128 >= led_id){ + led_instructions[led_instruction_index].id3 += ( 1 << (led_id - 97) ); } +}; - switch(layer){ - case 0: - if(timer_elapsed32(scan_timer) > 2000){ - scan_timer = timer_read32(); - } else if(timer_elapsed32(scan_timer) > 1000){ - // set_user_led_rgb(ktli(KC_F5), 255, 255, 255); - } - break; - case 1: - break; - case 2: - break; - } - +void wave_effect(void); +void set_wave_color(int); +// Runs constantly in the background, in a loop. +void matrix_scan_user(void) { + wave_effect(); + set_wave_color(USER_CONFIG.PATTERN_INDEX); }; + #define MODS_SHIFT (get_mods() & MOD_BIT(KC_LSHIFT) || get_mods() & MOD_BIT(KC_RSHIFT)) #define MODS_CTRL (get_mods() & MOD_BIT(KC_LCTL) || get_mods() & MOD_BIT(KC_RCTRL)) #define MODS_ALT (get_mods() & MOD_BIT(KC_LALT) || get_mods() & MOD_BIT(KC_RALT)) +void register_keystroke(uint16_t keycode){ + if(get_led_info_by_scancode(keycode)->id){ + uint32_t oldest_keystroke_lifespan = 0; + int8_t oldest_keystroke_index = -1; + bool registered = false; + + keystroke_t *keystroke = ACTIVE_KEYSTROKES; + for(int i = 0; i < MAX_ACTIVE_KEYSTORKES; ++i){ + if(!keystroke->active){ + keystroke->scancode = keycode; + keystroke->timer = timer_read32(); + keystroke->active = true; + registered = true; + break; + } + + uint32_t lifespan = timer_elapsed32(keystroke->timer); + if(lifespan > oldest_keystroke_lifespan){ + oldest_keystroke_index = i; + oldest_keystroke_lifespan = lifespan; + } + + ++keystroke; + } + + // override the oldest keystroke + if(!registered){ + keystroke = ACTIVE_KEYSTROKES + oldest_keystroke_index; + keystroke->scancode = keycode; + keystroke->timer = timer_read32(); + keystroke->active = true; // presumably active already + } + } +} + bool process_record_user(uint16_t keycode, keyrecord_t *record) { static uint32_t key_timer; - switch (keycode) { case L_BRI: if (record->event.pressed) { @@ -777,11 +505,6 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { led_animation_direction = !led_animation_direction; } return false; - case U_T_AUTO: - if (record->event.pressed && MODS_SHIFT && MODS_CTRL) { - TOGGLE_FLAG_AND_PRINT(usb_extra_manual, "USB extra port manual mode"); - } - return false; case U_T_AGCR: if (record->event.pressed && MODS_SHIFT && MODS_CTRL) { TOGGLE_FLAG_AND_PRINT(usb_gcr_auto, "USB GCR auto mode"); @@ -819,20 +542,16 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { + case S_RESET: + // reset all parameters + USER_CONFIG.PATTERN_INDEX = 1; + USER_CONFIG.WAVE_WIDTH = 10; + USER_CONFIG.WAVE_SPEED = 15; + USER_CONFIG.COLOR_PATTERN_INDEX = 0; + USER_CONFIG.TRAVEL_DISTANCE = 25; - - - - - - - - - - - - + return false; case L_SP_PR: // previous dripple pattern case L_SP_NE: // next dripple pattern if (record->event.pressed) { @@ -844,55 +563,53 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { if(USER_CONFIG.PATTERN_INDEX <= 4){ USER_CONFIG.TRAVEL_DISTANCE = 25; USER_CONFIG.COLOR_PATTERN_INDEX = 0; - USER_CONFIG.WAVE_PERIOD = 50; + USER_CONFIG.WAVE_SPEED = 10; } switch(USER_CONFIG.PATTERN_INDEX){ case 0: // None break; case 1: // background off, wave on - USER_CONFIG.WAVE_FRONT_WIDTH = 2; + USER_CONFIG.WAVE_WIDTH = 2; break; case 2: // background on, wave off - USER_CONFIG.WAVE_FRONT_WIDTH = 5; + USER_CONFIG.WAVE_WIDTH = 5; break; case 3: // background off, rainbow wave - USER_CONFIG.WAVE_FRONT_WIDTH = 10; + USER_CONFIG.WAVE_WIDTH = 10; break; case 4: // background on, rainbow wave - USER_CONFIG.WAVE_FRONT_WIDTH = 10; + USER_CONFIG.WAVE_WIDTH = 10; break; case 5: - USER_CONFIG.WAVE_FRONT_WIDTH = 10; + USER_CONFIG.WAVE_WIDTH = 10; USER_CONFIG.COLOR_PATTERN_INDEX = 2; USER_CONFIG.TRAVEL_DISTANCE = 0; - USER_CONFIG.WAVE_PERIOD = 100; + USER_CONFIG.WAVE_SPEED = 10; break; case 6: - USER_CONFIG.WAVE_FRONT_WIDTH = 25; + USER_CONFIG.WAVE_WIDTH = 10; USER_CONFIG.COLOR_PATTERN_INDEX = 3; USER_CONFIG.TRAVEL_DISTANCE = 2; - USER_CONFIG.WAVE_PERIOD = 10; + USER_CONFIG.WAVE_SPEED = 10; break; } // remove effect after changing pattern - for(int i = 0; i < KEY_STROKES_LENGTH; ++i){ - KEY_STROKES[i].alive = 0; + for(int i = 0; i < MAX_ACTIVE_KEYSTORKES; ++i){ + ACTIVE_KEYSTROKES[i].active = 0; } - refresh_pattern_indicators(); - refresh_color_pattern_indicators(); } return false; case L_SP_WD: case L_SP_NW: if(record->event.pressed){ short incre = keycode == L_SP_WD ? 1 : -1; - USER_CONFIG.WAVE_FRONT_WIDTH += incre; - if(USER_CONFIG.WAVE_FRONT_WIDTH < 1){ - USER_CONFIG.WAVE_FRONT_WIDTH = 1; + USER_CONFIG.WAVE_WIDTH += incre; + if(USER_CONFIG.WAVE_WIDTH < 1){ + USER_CONFIG.WAVE_WIDTH = 1; } } return false; @@ -901,9 +618,11 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { if(record->event.pressed){ short incre = keycode == L_SP_FA ? -1 : 1; - USER_CONFIG.WAVE_PERIOD += 10 * incre; - if(USER_CONFIG.WAVE_PERIOD < 10){ - USER_CONFIG.WAVE_PERIOD = 10; + USER_CONFIG.WAVE_SPEED += incre; + if(USER_CONFIG.WAVE_SPEED > 50){ + USER_CONFIG.WAVE_SPEED = 50; + } else if(USER_CONFIG.WAVE_SPEED < 1){ + USER_CONFIG.WAVE_SPEED = 1; } } return false; @@ -914,23 +633,135 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { uint8_t incre = keycode == L_CP_PR ? COLOR_PATTERNS_COUNT - 1 : 1; USER_CONFIG.COLOR_PATTERN_INDEX += incre; USER_CONFIG.COLOR_PATTERN_INDEX %= COLOR_PATTERNS_COUNT; - refresh_color_pattern_indicators(); + set_wave_color(USER_CONFIG.COLOR_PATTERN_INDEX); } return false; + default: - if (record->event.pressed){ - uint8_t led_id = ktli(keycode); - if(led_id){ - for(int i = 0; i < KEY_STROKES_LENGTH; ++i){ - if(!KEY_STROKES[i].alive){ - KEY_STROKES[i].alive = 1; - KEY_STROKES[i].led_id = led_id; - KEY_STROKES[i].time = timer_read32(); - break; - } - } - } + + + if(record->event.pressed){ + register_keystroke(keycode); + +#ifdef CONSOLE_ENABLE + led_info_t *entry = get_led_info_by_scancode(keycode); + uprintf(("KL: kc: %u, led id: %u, x: %f, y: %f, " + "col: %u, row: %u, pressed: %u, time: %u\n"), + keycode, entry->id, entry->x, entry->y, + record->event.key.col, record->event.key.row, + record->event.pressed, record->event.time); +#endif } return true; //Process all other keycodes normally } } + +led_instruction_t led_instructions[] = { + //LEDs are normally inactive, no processing is performed on them + //Flags are used in matching criteria for an LED to be active and indicate how to color it + //Flags can be found in tmk_core/protocol/arm_atsam/led_matrix.h (prefixed with LED_FLAG_) + //LED IDs can be found in config_led.h in the keyboard's directory + //Examples are below + + //All LEDs use the user's selected pattern (this is the factory default) + { .flags = LED_FLAG_USE_ROTATE_PATTERN }, + + //Specific LEDs use the user's selected pattern while all others are off + // { .flags = LED_FLAG_MATCH_ID | LED_FLAG_USE_ROTATE_PATTERN, .id0 = 0xFFFFFFFF, .id1 = 0xAAAAAAAA, .id2 = 0x55555555, .id3 = 0x11111111 }, + + //Specific LEDs use specified RGB values while all others are off + // { .flags = LED_FLAG_MATCH_ID | LED_FLAG_USE_RGB, .id0 = 0xFF, .id1 = 0x00FF, .id2 = 0x0000FF00, .id3 = 0xFF000000, .r = 75, .g = 150, .b = 225 }, + + //All LEDs use the user's selected pattern + //On layer 1, all key LEDs (except the top row which keeps active pattern) are red while all edge LEDs are green + //When layer 1 is active, key LEDs use red (id0 32 - 17: 1111 1111 1111 1111 0000 0000 0000 0000 = 0xFFFF0000) (except top row 16 - 1) + //When layer 1 is active, key LEDs use red (id1 64 - 33: 1111 1111 1111 1111 1111 1111 1111 1111 = 0xFFFFFFFF) + //When layer 1 is active, key LEDs use red (id2 87 - 65: 0000 0000 0111 1111 1111 1111 1111 1111 = 0x007FFFFF) + //When layer 1 is active, edge LEDs use green (id2 95 - 88: 1111 1111 1000 0000 0000 0000 0000 0000 = 0xFF800000) + //When layer 1 is active, edge LEDs use green (id3 119 - 96: 0000 0000 1111 1111 1111 1111 1111 1111 = 0x00FFFFFF) + // { .flags = LED_FLAG_USE_ROTATE_PATTERN }, + + #define WAVE_LED_INSTRUCTION_START 1 + { .flags = LED_FLAG_MATCH_ID | LED_FLAG_USE_RGB, .id0 = 0, .id1 = 0, .id2 = 0, .g = 255 }, + { .flags = LED_FLAG_MATCH_ID | LED_FLAG_USE_RGB, .id0 = 0, .id1 = 0, .id2 = 0, .g = 255 }, + { .flags = LED_FLAG_MATCH_ID | LED_FLAG_USE_RGB, .id0 = 0, .id1 = 0, .id2 = 0, .g = 255 }, + { .flags = LED_FLAG_MATCH_ID | LED_FLAG_USE_RGB, .id0 = 0, .id1 = 0, .id2 = 0, .g = 255 }, + { .flags = LED_FLAG_MATCH_ID | LED_FLAG_USE_RGB, .id0 = 0, .id1 = 0, .id2 = 0, .g = 255 }, + { .flags = LED_FLAG_MATCH_ID | LED_FLAG_USE_RGB, .id0 = 0, .id1 = 0, .id2 = 0, .g = 255 }, + { .flags = LED_FLAG_MATCH_ID | LED_FLAG_USE_RGB, .id0 = 0, .id1 = 0, .id2 = 0, .g = 255 }, + { .flags = LED_FLAG_MATCH_ID | LED_FLAG_USE_RGB, .id0 = 0, .id1 = 0, .id2 = 0, .g = 255 }, + { .flags = LED_FLAG_MATCH_ID | LED_FLAG_USE_RGB, .id0 = 0, .id1 = 0, .id2 = 0, .g = 255 }, + { .flags = LED_FLAG_MATCH_ID | LED_FLAG_USE_RGB, .id0 = 0, .id1 = 0, .id2 = 0, .g = 255 }, + { .flags = LED_FLAG_MATCH_ID | LED_FLAG_USE_RGB, .id0 = 0, .id1 = 0, .id2 = 0, .g = 255 }, + { .flags = LED_FLAG_MATCH_ID | LED_FLAG_USE_RGB, .id0 = 0, .id1 = 0, .id2 = 0, .g = 255 }, + { .flags = LED_FLAG_MATCH_ID | LED_FLAG_USE_RGB, .id0 = 0, .id1 = 0, .id2 = 0, .g = 255 }, + { .flags = LED_FLAG_MATCH_ID | LED_FLAG_USE_RGB, .id0 = 0, .id1 = 0, .id2 = 0, .g = 255 }, + { .flags = LED_FLAG_MATCH_ID | LED_FLAG_USE_RGB, .id0 = 0, .id1 = 0, .id2 = 0, .g = 255 }, + { .flags = LED_FLAG_MATCH_ID | LED_FLAG_USE_RGB, .id0 = 0, .id1 = 0, .id2 = 0, .g = 255 }, + { .flags = LED_FLAG_MATCH_ID | LED_FLAG_USE_RGB, .id0 = 0, .id1 = 0, .id2 = 0, .g = 255 }, + { .flags = LED_FLAG_MATCH_ID | LED_FLAG_USE_RGB, .id0 = 0, .id1 = 0, .id2 = 0, .g = 255 }, + #define WAVE_LED_INSTRUCTION_END 18 + + //All key LEDs use red while edge LEDs use the active pattern + //All key LEDs use red (id0 32 - 1: 1111 1111 1111 1111 1111 1111 1111 1111 = 0xFFFFFFFF) + //All key LEDs use red (id1 64 - 33: 1111 1111 1111 1111 1111 1111 1111 1111 = 0xFFFFFFFF) + //All key LEDs use red (id2 87 - 65: 0000 0000 0111 1111 1111 1111 1111 1111 = 0x007FFFFF) + //Edge uses active pattern (id2 95 - 88: 1111 1111 1000 0000 0000 0000 0000 0000 = 0xFF800000) + //Edge uses active pattern (id3 119 - 96: 0000 0000 1111 1111 1111 1111 1111 1111 = 0x00FFFFFF) + // { .flags = LED_FLAG_MATCH_ID | LED_FLAG_USE_RGB, .id0 = 0xFFFFFFFF, .id1 = 0xFFFFFFFF, .id2 = 0x007FFFFF, .r = 255 }, + // { .flags = LED_FLAG_MATCH_ID | LED_FLAG_USE_ROTATE_PATTERN , .id2 = 0xFF800000, .id3 = 0x00FFFFFF }, + + { .flags = LED_FLAG_MATCH_ID | LED_FLAG_USE_RGB | LED_FLAG_MATCH_LAYER, + .id1 = 0b00001111001111000000011110011110, + .r = 0, .g = 255, .b = 60, .layer = 2 }, + + //end must be set to 1 to indicate end of instruction set + { .end = 1 } +}; + + +void set_wave_color(int color_pattern_index){ + for(int i = WAVE_LED_INSTRUCTION_START; i < WAVE_LED_INSTRUCTION_END; ++i){ + for(int j = 0; j < COLOR_PATTERN_RGB_COUNT; ++j){ + led_instructions[i].r = COLOR_PATTERNS[color_pattern_index][i][0]; + led_instructions[i].g = COLOR_PATTERNS[color_pattern_index][i][1]; + led_instructions[i].b = COLOR_PATTERNS[color_pattern_index][i][2]; + } + } +}; + +void wave_effect(void){ + for(int i = WAVE_LED_INSTRUCTION_START; i < WAVE_LED_INSTRUCTION_END; ++i){ + reset_led_for_instruction(i); + } + int wave_led_instruction_span = WAVE_LED_INSTRUCTION_END - WAVE_LED_INSTRUCTION_START; + + + keystroke_t *keystroke = ACTIVE_KEYSTROKES; + for(int i = 0; i < MAX_ACTIVE_KEYSTORKES; ++i, ++keystroke){ + if(!keystroke->active) continue; + bool active = false; + + uint16_t keystroke_led_id = get_led_info_by_scancode(keystroke->scancode)->id; + + float elapsed_s = timer_elapsed32(keystroke->timer) / 1000.0f; + float travel = elapsed_s * USER_CONFIG.WAVE_SPEED; + + for(uint16_t id = 1; id <= MAX_LED_ID; ++id){ + float normalized_distance = + led_info[id].distance_to[keystroke_led_id] / + (float)DISTANCE_NORAMLIZING_PARAMETER; + + if(travel >= normalized_distance && travel - normalized_distance >= 0 && + normalized_distance >= travel - USER_CONFIG.WAVE_WIDTH){ + int portion = (travel - normalized_distance) * + wave_led_instruction_span / USER_CONFIG.WAVE_WIDTH; + add_led_to_instruction(portion, id); + + active = true; + } + } + + keystroke->active = active; + } +}; From aaf58155c7c9d8cf5235dd787530873a9c1f87cb Mon Sep 17 00:00:00 2001 From: James Young <18669334+noroadsleft@users.noreply.github.com> Date: Sun, 26 Jul 2020 13:11:16 -0700 Subject: [PATCH 446/930] Remove HD44780 References, Part 1 (#9052) * remove HD44780_ENABLE rules: 0-9, A-B * remove HD44780_ENABLE config: 0-9, A-B --- keyboards/1upkeyboards/1up60hse/config.h | 28 ------------------- keyboards/1upkeyboards/1up60hse/rules.mk | 1 - keyboards/1upkeyboards/super16/config.h | 28 ------------------- keyboards/1upkeyboards/super16/rules.mk | 1 - keyboards/40percentclub/25/config.h | 28 ------------------- keyboards/40percentclub/25/rules.mk | 1 - keyboards/40percentclub/4pack/config.h | 28 ------------------- keyboards/40percentclub/4pack/rules.mk | 1 - keyboards/40percentclub/4x4/config.h | 28 ------------------- keyboards/40percentclub/4x4/rules.mk | 1 - keyboards/40percentclub/5x5/config.h | 28 ------------------- keyboards/40percentclub/5x5/rules.mk | 1 - keyboards/40percentclub/6lit/config.h | 28 ------------------- keyboards/40percentclub/6lit/rules.mk | 1 - keyboards/40percentclub/foobar/config.h | 28 ------------------- keyboards/40percentclub/foobar/rules.mk | 1 - .../gherkin/keymaps/stevexyz/rules.mk | 1 - keyboards/40percentclub/half_n_half/config.h | 28 ------------------- keyboards/40percentclub/half_n_half/rules.mk | 1 - keyboards/40percentclub/i75/config.h | 28 ------------------- keyboards/40percentclub/i75/rules.mk | 1 - keyboards/40percentclub/nein/config.h | 26 ----------------- keyboards/40percentclub/nein/rules.mk | 1 - keyboards/40percentclub/nori/config.h | 28 ------------------- keyboards/40percentclub/nori/rules.mk | 1 - keyboards/abacus/rules.mk | 1 - keyboards/abstract/ellipse/rev1/config.h | 28 ------------------- keyboards/abstract/ellipse/rev1/rules.mk | 1 - keyboards/acheron/austin/rules.mk | 1 - keyboards/acheron/elongate/config.h | 28 ------------------- keyboards/acheron/elongate/rules.mk | 1 - keyboards/acheron/keebspcb/rules.mk | 1 - keyboards/acheron/shark/config.h | 28 ------------------- keyboards/acheron/shark/rules.mk | 1 - keyboards/ai03/equinox/rev0/rules.mk | 1 - keyboards/ai03/equinox/rev1/rules.mk | 1 - keyboards/ai03/lunar/config.h | 28 ------------------- keyboards/ai03/lunar/rules.mk | 1 - keyboards/ai03/orbit/config.h | 28 ------------------- keyboards/ai03/orbit/rules.mk | 1 - keyboards/ai03/orbit_x/rules.mk | 1 - keyboards/ai03/polaris/rules.mk | 1 - keyboards/ai03/quasar/config.h | 28 ------------------- keyboards/ai03/quasar/rules.mk | 1 - keyboards/ai03/soyuz/config.h | 28 ------------------- keyboards/ai03/soyuz/rules.mk | 1 - keyboards/akb/eb46/rules.mk | 1 - keyboards/akb/raine/rules.mk | 1 - keyboards/alf/dc60/config.h | 28 ------------------- keyboards/alf/dc60/rules.mk | 1 - keyboards/alf/x11/config.h | 28 ------------------- keyboards/alf/x11/rules.mk | 1 - keyboards/allison/config.h | 28 ------------------- keyboards/allison/rules.mk | 1 - keyboards/allison_numpad/config.h | 28 ------------------- keyboards/allison_numpad/rules.mk | 1 - keyboards/angel17/alpha/config.h | 28 ------------------- keyboards/angel17/alpha/rules.mk | 1 - keyboards/angel17/rev1/config.h | 28 ------------------- keyboards/angel17/rev1/rules.mk | 1 - keyboards/angel17/rules.mk | 1 - keyboards/angel64/alpha/config.h | 28 ------------------- keyboards/angel64/rev1/config.h | 28 ------------------- keyboards/angel64/rules.mk | 1 - keyboards/aplx6/rules.mk | 1 - keyboards/arabica37/rev1/rules.mk | 1 - keyboards/ash1800/config.h | 28 ------------------- keyboards/ash1800/rules.mk | 1 - keyboards/ashpil/modelm_usbc/rules.mk | 1 - keyboards/atreus/rules.mk | 1 - keyboards/aves65/rules.mk | 1 - keyboards/baguette/config.h | 28 ------------------- keyboards/baguette/rules.mk | 1 - keyboards/bakeneko80/config.h | 28 ------------------- keyboards/bakeneko80/rules.mk | 1 - keyboards/bat43/config.h | 28 ------------------- keyboards/bat43/rules.mk | 1 - keyboards/bigswitch/keymaps/wanleg/rules.mk | 1 - keyboards/bm16a/config.h | 28 ------------------- keyboards/bm16a/rules.mk | 1 - keyboards/bm43a/rules.mk | 1 - keyboards/bm60rgb/rules.mk | 1 - keyboards/botanicalkeyboards/fm2u/rules.mk | 1 - keyboards/bthlabs/geekpad/config.h | 28 ------------------- keyboards/bthlabs/geekpad/rules.mk | 1 - keyboards/business_card/alpha/config.h | 28 ------------------- keyboards/business_card/alpha/rules.mk | 1 - keyboards/business_card/beta/config.h | 28 ------------------- keyboards/business_card/beta/rules.mk | 1 - keyboards/business_card/rules.mk | 1 - 90 files changed, 1033 deletions(-) diff --git a/keyboards/1upkeyboards/1up60hse/config.h b/keyboards/1upkeyboards/1up60hse/config.h index e2de955c4557..7fc55b04db94 100644 --- a/keyboards/1upkeyboards/1up60hse/config.h +++ b/keyboards/1upkeyboards/1up60hse/config.h @@ -189,31 +189,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 - -/* - * 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 -*/ diff --git a/keyboards/1upkeyboards/1up60hse/rules.mk b/keyboards/1upkeyboards/1up60hse/rules.mk index 2ba1f9ef506f..3dc6c04c8a1e 100644 --- a/keyboards/1upkeyboards/1up60hse/rules.mk +++ b/keyboards/1upkeyboards/1up60hse/rules.mk @@ -30,7 +30,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 EXTRAFLAGS += -flto LAYOUTS = 60_ansi diff --git a/keyboards/1upkeyboards/super16/config.h b/keyboards/1upkeyboards/super16/config.h index ddd0233f92b0..f5cc77159fc1 100644 --- a/keyboards/1upkeyboards/super16/config.h +++ b/keyboards/1upkeyboards/super16/config.h @@ -219,34 +219,6 @@ 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 -/* - * 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/1upkeyboards/super16/rules.mk b/keyboards/1upkeyboards/super16/rules.mk index 9319e7579b76..2ef04cd5855a 100644 --- a/keyboards/1upkeyboards/super16/rules.mk +++ b/keyboards/1upkeyboards/super16/rules.mk @@ -31,6 +31,5 @@ UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = 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_4x4 numpad_4x4 diff --git a/keyboards/40percentclub/25/config.h b/keyboards/40percentclub/25/config.h index c9c02b47e255..01ca061a1623 100644 --- a/keyboards/40percentclub/25/config.h +++ b/keyboards/40percentclub/25/config.h @@ -197,31 +197,3 @@ /* 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 -*/ diff --git a/keyboards/40percentclub/25/rules.mk b/keyboards/40percentclub/25/rules.mk index 483619f18926..3c263d5bf615 100644 --- a/keyboards/40percentclub/25/rules.mk +++ b/keyboards/40percentclub/25/rules.mk @@ -30,7 +30,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 # Enable generic behavior for split boards SPLIT_KEYBOARD = yes diff --git a/keyboards/40percentclub/4pack/config.h b/keyboards/40percentclub/4pack/config.h index 33b5df6d5874..7ccf21ef80fc 100644 --- a/keyboards/40percentclub/4pack/config.h +++ b/keyboards/40percentclub/4pack/config.h @@ -224,34 +224,6 @@ 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 -/* - * 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/40percentclub/4pack/rules.mk b/keyboards/40percentclub/4pack/rules.mk index a0c9d34f5487..94ad9cb6fd17 100644 --- a/keyboards/40percentclub/4pack/rules.mk +++ b/keyboards/40percentclub/4pack/rules.mk @@ -30,4 +30,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 -HD44780_ENABLE = no # Enable support for HD44780 based LCDs diff --git a/keyboards/40percentclub/4x4/config.h b/keyboards/40percentclub/4x4/config.h index 09ec5a4ec908..810f3cf29503 100644 --- a/keyboards/40percentclub/4x4/config.h +++ b/keyboards/40percentclub/4x4/config.h @@ -164,31 +164,3 @@ /* 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 -*/ diff --git a/keyboards/40percentclub/4x4/rules.mk b/keyboards/40percentclub/4x4/rules.mk index c4257a070d71..08d4b4a40c9f 100644 --- a/keyboards/40percentclub/4x4/rules.mk +++ b/keyboards/40percentclub/4x4/rules.mk @@ -29,6 +29,5 @@ UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = 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_4x4 ortho_4x8 ortho_4x12 ortho_4x16 diff --git a/keyboards/40percentclub/5x5/config.h b/keyboards/40percentclub/5x5/config.h index a9d294bc94cd..54515583af79 100644 --- a/keyboards/40percentclub/5x5/config.h +++ b/keyboards/40percentclub/5x5/config.h @@ -173,31 +173,3 @@ /* 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 -*/ diff --git a/keyboards/40percentclub/5x5/rules.mk b/keyboards/40percentclub/5x5/rules.mk index ec0f656d085c..e0236aa26bf1 100644 --- a/keyboards/40percentclub/5x5/rules.mk +++ b/keyboards/40percentclub/5x5/rules.mk @@ -29,6 +29,5 @@ UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = 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_5x5 ortho_5x10 ortho_5x15 diff --git a/keyboards/40percentclub/6lit/config.h b/keyboards/40percentclub/6lit/config.h index 110362a62871..4efa4c99bc22 100644 --- a/keyboards/40percentclub/6lit/config.h +++ b/keyboards/40percentclub/6lit/config.h @@ -198,31 +198,3 @@ /* 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 -*/ diff --git a/keyboards/40percentclub/6lit/rules.mk b/keyboards/40percentclub/6lit/rules.mk index 4faa9610b89a..f1b426d062fa 100644 --- a/keyboards/40percentclub/6lit/rules.mk +++ b/keyboards/40percentclub/6lit/rules.mk @@ -30,7 +30,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 # Enable generic behavior for split boards SPLIT_KEYBOARD = yes diff --git a/keyboards/40percentclub/foobar/config.h b/keyboards/40percentclub/foobar/config.h index 15af4ad5bd0a..e501259830c0 100644 --- a/keyboards/40percentclub/foobar/config.h +++ b/keyboards/40percentclub/foobar/config.h @@ -198,31 +198,3 @@ /* 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 -*/ diff --git a/keyboards/40percentclub/foobar/rules.mk b/keyboards/40percentclub/foobar/rules.mk index f378e39b6e32..3c80be1a9335 100644 --- a/keyboards/40percentclub/foobar/rules.mk +++ b/keyboards/40percentclub/foobar/rules.mk @@ -30,7 +30,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 # Enable generic behavior for split boards SPLIT_KEYBOARD = yes diff --git a/keyboards/40percentclub/gherkin/keymaps/stevexyz/rules.mk b/keyboards/40percentclub/gherkin/keymaps/stevexyz/rules.mk index 2c5a23df3d7f..a36a4fdad227 100644 --- a/keyboards/40percentclub/gherkin/keymaps/stevexyz/rules.mk +++ b/keyboards/40percentclub/gherkin/keymaps/stevexyz/rules.mk @@ -11,7 +11,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 TAP_DANCE_ENABLE = no SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend (it uses the same timer as BACKLIGHT_ENABLE) diff --git a/keyboards/40percentclub/half_n_half/config.h b/keyboards/40percentclub/half_n_half/config.h index cd7515f0bac4..e5ea48dd82d4 100644 --- a/keyboards/40percentclub/half_n_half/config.h +++ b/keyboards/40percentclub/half_n_half/config.h @@ -212,34 +212,6 @@ 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 -/* - * 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/40percentclub/half_n_half/rules.mk b/keyboards/40percentclub/half_n_half/rules.mk index 98b292470750..23058393bb08 100644 --- a/keyboards/40percentclub/half_n_half/rules.mk +++ b/keyboards/40percentclub/half_n_half/rules.mk @@ -30,7 +30,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 # Enable generic behavior for split boards SPLIT_KEYBOARD = yes diff --git a/keyboards/40percentclub/i75/config.h b/keyboards/40percentclub/i75/config.h index f9b5d57ddf08..69124bc7a33d 100644 --- a/keyboards/40percentclub/i75/config.h +++ b/keyboards/40percentclub/i75/config.h @@ -154,34 +154,6 @@ /* 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/40percentclub/i75/rules.mk b/keyboards/40percentclub/i75/rules.mk index e99830b85320..98dc54b75a8a 100644 --- a/keyboards/40percentclub/i75/rules.mk +++ b/keyboards/40percentclub/i75/rules.mk @@ -17,7 +17,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 LAYOUTS = ortho_5x15 DEFAULT_FOLDER = 40percentclub/i75/promicro diff --git a/keyboards/40percentclub/nein/config.h b/keyboards/40percentclub/nein/config.h index da1bc91dd123..e053b487fd4a 100644 --- a/keyboards/40percentclub/nein/config.h +++ b/keyboards/40percentclub/nein/config.h @@ -208,32 +208,6 @@ /* 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/40percentclub/nein/rules.mk b/keyboards/40percentclub/nein/rules.mk index 47742c4b46e0..eed880ead524 100644 --- a/keyboards/40percentclub/nein/rules.mk +++ b/keyboards/40percentclub/nein/rules.mk @@ -30,4 +30,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 -HD44780_ENABLE = no # Enable support for HD44780 based LCDs diff --git a/keyboards/40percentclub/nori/config.h b/keyboards/40percentclub/nori/config.h index ecaa68ada0bf..8e24ef88e125 100644 --- a/keyboards/40percentclub/nori/config.h +++ b/keyboards/40percentclub/nori/config.h @@ -186,31 +186,3 @@ /* 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 -*/ diff --git a/keyboards/40percentclub/nori/rules.mk b/keyboards/40percentclub/nori/rules.mk index e9b24fc92ad8..5fbdb3ac0b0e 100644 --- a/keyboards/40percentclub/nori/rules.mk +++ b/keyboards/40percentclub/nori/rules.mk @@ -30,6 +30,5 @@ UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = 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_4x4 ortho_4x8 ortho_4x12 diff --git a/keyboards/abacus/rules.mk b/keyboards/abacus/rules.mk index d31121669617..8d6add27d193 100644 --- a/keyboards/abacus/rules.mk +++ b/keyboards/abacus/rules.mk @@ -29,7 +29,6 @@ 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 UNICODEMAP_ENABLE = yes ENCODER_ENABLE = yes DIP_SWITCH_ENABLE = yes diff --git a/keyboards/abstract/ellipse/rev1/config.h b/keyboards/abstract/ellipse/rev1/config.h index 15606f3d44ce..a92dd1b0e987 100644 --- a/keyboards/abstract/ellipse/rev1/config.h +++ b/keyboards/abstract/ellipse/rev1/config.h @@ -202,34 +202,6 @@ 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 -/* - * 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/abstract/ellipse/rev1/rules.mk b/keyboards/abstract/ellipse/rev1/rules.mk index 214b0a39756c..7ee34b10712b 100644 --- a/keyboards/abstract/ellipse/rev1/rules.mk +++ b/keyboards/abstract/ellipse/rev1/rules.mk @@ -30,5 +30,4 @@ UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = 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 rotary encoders diff --git a/keyboards/acheron/austin/rules.mk b/keyboards/acheron/austin/rules.mk index 17e589ad7cf0..a627eed8a027 100644 --- a/keyboards/acheron/austin/rules.mk +++ b/keyboards/acheron/austin/rules.mk @@ -19,7 +19,6 @@ 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 diff --git a/keyboards/acheron/elongate/config.h b/keyboards/acheron/elongate/config.h index df8c1a831496..dfba6728dbe7 100644 --- a/keyboards/acheron/elongate/config.h +++ b/keyboards/acheron/elongate/config.h @@ -217,34 +217,6 @@ 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 -/* - * 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/acheron/elongate/rules.mk b/keyboards/acheron/elongate/rules.mk index 0f0ca33e9c6c..c0e8f35ac5eb 100644 --- a/keyboards/acheron/elongate/rules.mk +++ b/keyboards/acheron/elongate/rules.mk @@ -29,6 +29,5 @@ 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 LTO_ENABLE = yes diff --git a/keyboards/acheron/keebspcb/rules.mk b/keyboards/acheron/keebspcb/rules.mk index 3f2f03188a0b..3912bcbc7dff 100644 --- a/keyboards/acheron/keebspcb/rules.mk +++ b/keyboards/acheron/keebspcb/rules.mk @@ -19,7 +19,6 @@ 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 diff --git a/keyboards/acheron/shark/config.h b/keyboards/acheron/shark/config.h index ac6df142447a..bb3df3381884 100644 --- a/keyboards/acheron/shark/config.h +++ b/keyboards/acheron/shark/config.h @@ -228,34 +228,6 @@ B0, which is unconnected on the PCB /* 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/acheron/shark/rules.mk b/keyboards/acheron/shark/rules.mk index 30c4593db226..1bd963c81727 100644 --- a/keyboards/acheron/shark/rules.mk +++ b/keyboards/acheron/shark/rules.mk @@ -20,6 +20,5 @@ UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = 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 diff --git a/keyboards/ai03/equinox/rev0/rules.mk b/keyboards/ai03/equinox/rev0/rules.mk index c1de62029602..28cb40d4cb92 100644 --- a/keyboards/ai03/equinox/rev0/rules.mk +++ b/keyboards/ai03/equinox/rev0/rules.mk @@ -30,4 +30,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 -HD44780_ENABLE = no # Enable support for HD44780 based LCDs diff --git a/keyboards/ai03/equinox/rev1/rules.mk b/keyboards/ai03/equinox/rev1/rules.mk index c1de62029602..28cb40d4cb92 100644 --- a/keyboards/ai03/equinox/rev1/rules.mk +++ b/keyboards/ai03/equinox/rev1/rules.mk @@ -30,4 +30,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 -HD44780_ENABLE = no # Enable support for HD44780 based LCDs diff --git a/keyboards/ai03/lunar/config.h b/keyboards/ai03/lunar/config.h index 5bc0a0c49b0c..5e23ec55af82 100644 --- a/keyboards/ai03/lunar/config.h +++ b/keyboards/ai03/lunar/config.h @@ -211,34 +211,6 @@ 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 -/* - * 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/ai03/lunar/rules.mk b/keyboards/ai03/lunar/rules.mk index 62da535e1f2b..afce159bf70b 100644 --- a/keyboards/ai03/lunar/rules.mk +++ b/keyboards/ai03/lunar/rules.mk @@ -30,4 +30,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 -HD44780_ENABLE = no # Enable support for HD44780 based LCDs diff --git a/keyboards/ai03/orbit/config.h b/keyboards/ai03/orbit/config.h index 051b924b8777..be209f83d446 100644 --- a/keyboards/ai03/orbit/config.h +++ b/keyboards/ai03/orbit/config.h @@ -216,34 +216,6 @@ 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 -/* - * 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/ai03/orbit/rules.mk b/keyboards/ai03/orbit/rules.mk index 706ba9b06510..4d18021dc623 100644 --- a/keyboards/ai03/orbit/rules.mk +++ b/keyboards/ai03/orbit/rules.mk @@ -30,7 +30,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 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/orbit_x/rules.mk b/keyboards/ai03/orbit_x/rules.mk index 111ca910a9c2..f401a9d0b2c2 100644 --- a/keyboards/ai03/orbit_x/rules.mk +++ b/keyboards/ai03/orbit_x/rules.mk @@ -29,5 +29,4 @@ 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 # Split keyboard \ No newline at end of file diff --git a/keyboards/ai03/polaris/rules.mk b/keyboards/ai03/polaris/rules.mk index 8f94582a8634..56e1ed8e0c46 100644 --- a/keyboards/ai03/polaris/rules.mk +++ b/keyboards/ai03/polaris/rules.mk @@ -29,6 +29,5 @@ 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 = 60_ansi 60_ansi_split_bs_rshift 60_tsangan_hhkb diff --git a/keyboards/ai03/quasar/config.h b/keyboards/ai03/quasar/config.h index 7c02f91d0424..077ca3a9faaf 100644 --- a/keyboards/ai03/quasar/config.h +++ b/keyboards/ai03/quasar/config.h @@ -218,34 +218,6 @@ 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 -/* - * 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/ai03/quasar/rules.mk b/keyboards/ai03/quasar/rules.mk index 3cb2d3ab70e0..58c7454420b5 100644 --- a/keyboards/ai03/quasar/rules.mk +++ b/keyboards/ai03/quasar/rules.mk @@ -30,4 +30,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 -HD44780_ENABLE = no # Enable support for HD44780 based LCDs diff --git a/keyboards/ai03/soyuz/config.h b/keyboards/ai03/soyuz/config.h index 299e5999d603..213b6509b4d4 100644 --- a/keyboards/ai03/soyuz/config.h +++ b/keyboards/ai03/soyuz/config.h @@ -212,34 +212,6 @@ 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 -/* - * 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/ai03/soyuz/rules.mk b/keyboards/ai03/soyuz/rules.mk index bcf4f80bb819..d75ca6435b70 100644 --- a/keyboards/ai03/soyuz/rules.mk +++ b/keyboards/ai03/soyuz/rules.mk @@ -30,6 +30,5 @@ UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = 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_5x4 diff --git a/keyboards/akb/eb46/rules.mk b/keyboards/akb/eb46/rules.mk index bd3cd09a9fd2..46d5a4193be6 100644 --- a/keyboards/akb/eb46/rules.mk +++ b/keyboards/akb/eb46/rules.mk @@ -30,4 +30,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 -HD44780_ENABLE = no # Enable support for HD44780 based LCDs diff --git a/keyboards/akb/raine/rules.mk b/keyboards/akb/raine/rules.mk index bd3cd09a9fd2..46d5a4193be6 100644 --- a/keyboards/akb/raine/rules.mk +++ b/keyboards/akb/raine/rules.mk @@ -30,4 +30,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 -HD44780_ENABLE = no # Enable support for HD44780 based LCDs diff --git a/keyboards/alf/dc60/config.h b/keyboards/alf/dc60/config.h index bbdac062c74f..b4cff82d4117 100644 --- a/keyboards/alf/dc60/config.h +++ b/keyboards/alf/dc60/config.h @@ -188,31 +188,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 - -/* - * 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 -*/ diff --git a/keyboards/alf/dc60/rules.mk b/keyboards/alf/dc60/rules.mk index 7c87642acc64..8d93d390d2ac 100644 --- a/keyboards/alf/dc60/rules.mk +++ b/keyboards/alf/dc60/rules.mk @@ -30,4 +30,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 -HD44780_ENABLE = no # Enable support for HD44780 based LCDs diff --git a/keyboards/alf/x11/config.h b/keyboards/alf/x11/config.h index 587e97cd87f5..fcf4e85a9f89 100644 --- a/keyboards/alf/x11/config.h +++ b/keyboards/alf/x11/config.h @@ -212,34 +212,6 @@ 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 -/* - * 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/alf/x11/rules.mk b/keyboards/alf/x11/rules.mk index decff4f79143..6c2b8080c5f7 100644 --- a/keyboards/alf/x11/rules.mk +++ b/keyboards/alf/x11/rules.mk @@ -30,5 +30,4 @@ UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches -HD44780_ENABLE = no # Enable support for HD44780 based LCDs EXTRAFLAGS += -flto diff --git a/keyboards/allison/config.h b/keyboards/allison/config.h index e2e032442d73..34e3989805b8 100644 --- a/keyboards/allison/config.h +++ b/keyboards/allison/config.h @@ -218,34 +218,6 @@ 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 -/* - * 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/rules.mk b/keyboards/allison/rules.mk index 3d524e478fb9..11ee9baaacb4 100644 --- a/keyboards/allison/rules.mk +++ b/keyboards/allison/rules.mk @@ -29,4 +29,3 @@ 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/allison_numpad/config.h b/keyboards/allison_numpad/config.h index 0e04a8722a1e..624b96471b3d 100644 --- a/keyboards/allison_numpad/config.h +++ b/keyboards/allison_numpad/config.h @@ -218,34 +218,6 @@ 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 -/* - * 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/rules.mk b/keyboards/allison_numpad/rules.mk index 19e21ec9ec63..9b102bddccf0 100644 --- a/keyboards/allison_numpad/rules.mk +++ b/keyboards/allison_numpad/rules.mk @@ -29,6 +29,5 @@ 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 diff --git a/keyboards/angel17/alpha/config.h b/keyboards/angel17/alpha/config.h index 2bb74acc8979..abc42d0d2770 100644 --- a/keyboards/angel17/alpha/config.h +++ b/keyboards/angel17/alpha/config.h @@ -216,34 +216,6 @@ 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 -/* - * 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/angel17/alpha/rules.mk b/keyboards/angel17/alpha/rules.mk index 51660ce5fc95..931a6412cb91 100644 --- a/keyboards/angel17/alpha/rules.mk +++ b/keyboards/angel17/alpha/rules.mk @@ -30,6 +30,5 @@ UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = 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 = numpad_5x4 diff --git a/keyboards/angel17/rev1/config.h b/keyboards/angel17/rev1/config.h index 3e5af362abb2..711790ab0839 100644 --- a/keyboards/angel17/rev1/config.h +++ b/keyboards/angel17/rev1/config.h @@ -211,34 +211,6 @@ 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 -/* - * 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/angel17/rev1/rules.mk b/keyboards/angel17/rev1/rules.mk index 7384c23de119..d2c2b8f9222c 100644 --- a/keyboards/angel17/rev1/rules.mk +++ b/keyboards/angel17/rev1/rules.mk @@ -30,6 +30,5 @@ UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = 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 = numpad_5x4 diff --git a/keyboards/angel17/rules.mk b/keyboards/angel17/rules.mk index bd5ae48de9f5..8106f4651ef1 100644 --- a/keyboards/angel17/rules.mk +++ b/keyboards/angel17/rules.mk @@ -30,7 +30,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 LAYOUTS = numpad_5x4 diff --git a/keyboards/angel64/alpha/config.h b/keyboards/angel64/alpha/config.h index f10f9b0910c6..07dae8952dfc 100644 --- a/keyboards/angel64/alpha/config.h +++ b/keyboards/angel64/alpha/config.h @@ -209,34 +209,6 @@ 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 -/* - * 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/config.h b/keyboards/angel64/rev1/config.h index f10f9b0910c6..07dae8952dfc 100644 --- a/keyboards/angel64/rev1/config.h +++ b/keyboards/angel64/rev1/config.h @@ -209,34 +209,6 @@ 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 -/* - * 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/rules.mk b/keyboards/angel64/rules.mk index 1c44782e2cd7..7da4be679890 100644 --- a/keyboards/angel64/rules.mk +++ b/keyboards/angel64/rules.mk @@ -30,7 +30,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 OLED_DRIVER_ENABLE = yes CUSTOM_MATRIX = yes diff --git a/keyboards/aplx6/rules.mk b/keyboards/aplx6/rules.mk index d2d1078d3229..15167ce88f46 100644 --- a/keyboards/aplx6/rules.mk +++ b/keyboards/aplx6/rules.mk @@ -29,5 +29,4 @@ 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 = yes # Unicode diff --git a/keyboards/arabica37/rev1/rules.mk b/keyboards/arabica37/rev1/rules.mk index 10c5ab28bb94..7b230343f182 100644 --- a/keyboards/arabica37/rev1/rules.mk +++ b/keyboards/arabica37/rev1/rules.mk @@ -28,6 +28,5 @@ 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 diff --git a/keyboards/ash1800/config.h b/keyboards/ash1800/config.h index 9f25a0f11641..b46a966c80d4 100644 --- a/keyboards/ash1800/config.h +++ b/keyboards/ash1800/config.h @@ -220,34 +220,6 @@ 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 -/* - * 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/ash1800/rules.mk b/keyboards/ash1800/rules.mk index b4f1dacac836..36606ade233c 100644 --- a/keyboards/ash1800/rules.mk +++ b/keyboards/ash1800/rules.mk @@ -30,4 +30,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 -HD44780_ENABLE = no # Enable support for HD44780 based LCDs diff --git a/keyboards/ashpil/modelm_usbc/rules.mk b/keyboards/ashpil/modelm_usbc/rules.mk index 2b2e83c65d06..fbb929ed8966 100644 --- a/keyboards/ashpil/modelm_usbc/rules.mk +++ b/keyboards/ashpil/modelm_usbc/rules.mk @@ -30,4 +30,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 -HD44780_ENABLE = no # Enable support for HD44780 based LCDs \ No newline at end of file diff --git a/keyboards/atreus/rules.mk b/keyboards/atreus/rules.mk index eb16f2f46e29..cc8f0c91125d 100644 --- a/keyboards/atreus/rules.mk +++ b/keyboards/atreus/rules.mk @@ -17,6 +17,5 @@ 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 DEFAULT_FOLDER = atreus/astar diff --git a/keyboards/aves65/rules.mk b/keyboards/aves65/rules.mk index 911c1d95ab5b..e89014466ea3 100644 --- a/keyboards/aves65/rules.mk +++ b/keyboards/aves65/rules.mk @@ -29,6 +29,5 @@ 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 = 65_iso_blocker diff --git a/keyboards/baguette/config.h b/keyboards/baguette/config.h index 9aa525cfd5ce..6e3b00ac3687 100644 --- a/keyboards/baguette/config.h +++ b/keyboards/baguette/config.h @@ -188,31 +188,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 - -/* - * 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 -*/ diff --git a/keyboards/baguette/rules.mk b/keyboards/baguette/rules.mk index f911fb5d3763..a26ad25f89ef 100644 --- a/keyboards/baguette/rules.mk +++ b/keyboards/baguette/rules.mk @@ -30,4 +30,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 -HD44780_ENABLE = no # Enable support for HD44780 based LCDs diff --git a/keyboards/bakeneko80/config.h b/keyboards/bakeneko80/config.h index 04b2569e2812..39d388a41b15 100644 --- a/keyboards/bakeneko80/config.h +++ b/keyboards/bakeneko80/config.h @@ -217,34 +217,6 @@ 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 -/* - * 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/bakeneko80/rules.mk b/keyboards/bakeneko80/rules.mk index 1f9b6d4daad9..1cec2845622a 100644 --- a/keyboards/bakeneko80/rules.mk +++ b/keyboards/bakeneko80/rules.mk @@ -29,6 +29,5 @@ 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/bat43/config.h b/keyboards/bat43/config.h index eb1c1a05cf01..aa8dc493e2bc 100644 --- a/keyboards/bat43/config.h +++ b/keyboards/bat43/config.h @@ -218,34 +218,6 @@ 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 -/* - * 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/bat43/rules.mk b/keyboards/bat43/rules.mk index cc29455e3f30..c35119993a06 100644 --- a/keyboards/bat43/rules.mk +++ b/keyboards/bat43/rules.mk @@ -29,6 +29,5 @@ 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 DEFAULT_FOLDER = bat43/rev2 diff --git a/keyboards/bigswitch/keymaps/wanleg/rules.mk b/keyboards/bigswitch/keymaps/wanleg/rules.mk index a6c7d1d3f0e6..75da67fa47ad 100644 --- a/keyboards/bigswitch/keymaps/wanleg/rules.mk +++ b/keyboards/bigswitch/keymaps/wanleg/rules.mk @@ -13,4 +13,3 @@ 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 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 diff --git a/keyboards/bm16a/config.h b/keyboards/bm16a/config.h index 249b57c35a64..9d0812af2922 100644 --- a/keyboards/bm16a/config.h +++ b/keyboards/bm16a/config.h @@ -213,34 +213,6 @@ /* 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/bm16a/rules.mk b/keyboards/bm16a/rules.mk index 3e994588f5e3..b4b9ee049f1c 100644 --- a/keyboards/bm16a/rules.mk +++ b/keyboards/bm16a/rules.mk @@ -30,6 +30,5 @@ UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = 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_4x4 diff --git a/keyboards/bm43a/rules.mk b/keyboards/bm43a/rules.mk index 5fa842c8bb10..dfc402a39fed 100644 --- a/keyboards/bm43a/rules.mk +++ b/keyboards/bm43a/rules.mk @@ -30,4 +30,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 -HD44780_ENABLE = no # Enable support for HD44780 based LCDs diff --git a/keyboards/bm60rgb/rules.mk b/keyboards/bm60rgb/rules.mk index 4372a6306885..72bfd539da85 100644 --- a/keyboards/bm60rgb/rules.mk +++ b/keyboards/bm60rgb/rules.mk @@ -30,7 +30,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 RGB_MATRIX_ENABLE = WS2812 LINK_TIME_OPTIMIZATION_ENABLE = yes diff --git a/keyboards/botanicalkeyboards/fm2u/rules.mk b/keyboards/botanicalkeyboards/fm2u/rules.mk index 4f7f9b286426..14d4b348dec1 100644 --- a/keyboards/botanicalkeyboards/fm2u/rules.mk +++ b/keyboards/botanicalkeyboards/fm2u/rules.mk @@ -29,4 +29,3 @@ 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/bthlabs/geekpad/config.h b/keyboards/bthlabs/geekpad/config.h index c2b3dd3039f9..0d33bb89a3b5 100644 --- a/keyboards/bthlabs/geekpad/config.h +++ b/keyboards/bthlabs/geekpad/config.h @@ -189,34 +189,6 @@ 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 -/* - * 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/bthlabs/geekpad/rules.mk b/keyboards/bthlabs/geekpad/rules.mk index 4b7193da4950..524144836d6e 100644 --- a/keyboards/bthlabs/geekpad/rules.mk +++ b/keyboards/bthlabs/geekpad/rules.mk @@ -30,4 +30,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 -HD44780_ENABLE = no # Enable support for HD44780 based LCDs diff --git a/keyboards/business_card/alpha/config.h b/keyboards/business_card/alpha/config.h index e0324d65448f..fbb4054ecd7b 100644 --- a/keyboards/business_card/alpha/config.h +++ b/keyboards/business_card/alpha/config.h @@ -210,34 +210,6 @@ 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 -/* - * 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/business_card/alpha/rules.mk b/keyboards/business_card/alpha/rules.mk index 13cbddc3c8fa..281a60bac1b5 100644 --- a/keyboards/business_card/alpha/rules.mk +++ b/keyboards/business_card/alpha/rules.mk @@ -30,5 +30,4 @@ UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches -HD44780_ENABLE = no # Enable support for HD44780 based LCDs OLED_DRIVER_ENABLE = yes diff --git a/keyboards/business_card/beta/config.h b/keyboards/business_card/beta/config.h index fc6514982f1b..b9e0120f318a 100644 --- a/keyboards/business_card/beta/config.h +++ b/keyboards/business_card/beta/config.h @@ -210,34 +210,6 @@ 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 -/* - * 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/business_card/beta/rules.mk b/keyboards/business_card/beta/rules.mk index 13cbddc3c8fa..281a60bac1b5 100644 --- a/keyboards/business_card/beta/rules.mk +++ b/keyboards/business_card/beta/rules.mk @@ -30,5 +30,4 @@ UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches -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 591261d28686..7b58e035f917 100644 --- a/keyboards/business_card/rules.mk +++ b/keyboards/business_card/rules.mk @@ -30,6 +30,5 @@ UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = 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 = business_card/beta From d2be3a7339fe42629f3616a00708c5e74d84fe61 Mon Sep 17 00:00:00 2001 From: Drashna Jaelre Date: Sun, 26 Jul 2020 13:57:37 -0700 Subject: [PATCH 447/930] Fix Variable Trace handling (#9831) It wants a number, but a number of files have it set to "no", even though it's commented out. This means that if you set it to no, it will cause a compiler error. This sets the default to "no", and checks to make sure it's not set to "no" before processing it, and striping the value from it. --- common_features.mk | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/common_features.mk b/common_features.mk index e23de553b379..8443a759b3a7 100644 --- a/common_features.mk +++ b/common_features.mk @@ -246,12 +246,13 @@ ifeq ($(strip $(SERIAL_LINK_ENABLE)), yes) VAPTH += $(SERIAL_PATH) endif -ifneq ($(strip $(VARIABLE_TRACE)),) +VARIABLE_TRACE ?= no +ifneq ($(strip $(VARIABLE_TRACE)),no) SRC += $(QUANTUM_DIR)/variable_trace.c OPT_DEFS += -DNUM_TRACED_VARIABLES=$(strip $(VARIABLE_TRACE)) -ifneq ($(strip $(MAX_VARIABLE_TRACE_SIZE)),) - OPT_DEFS += -DMAX_VARIABLE_TRACE_SIZE=$(strip $(MAX_VARIABLE_TRACE_SIZE)) -endif + ifneq ($(strip $(MAX_VARIABLE_TRACE_SIZE)),) + OPT_DEFS += -DMAX_VARIABLE_TRACE_SIZE=$(strip $(MAX_VARIABLE_TRACE_SIZE)) + endif endif ifeq ($(strip $(LCD_ENABLE)), yes) From a6a13f96262ef1e8c91546f24cff5067f8026c23 Mon Sep 17 00:00:00 2001 From: Brandon Schlack Date: Sun, 26 Jul 2020 14:32:04 -0700 Subject: [PATCH 448/930] [Keyboard] Add Keybage folder for RadPad (#9745) * [Keyboard] Initial Keybage/RadPad firmware * [Keyboard] RadPad apply pull request feedback - Change `LAYOUT_***_Encoders` to `LAYOUT_***_encoders` in .h - Remove bootloader comments and unnecessary build options from rules.mk - Use `LTO_ENABLE` - Remove empty config.h from default keymap - Remove trailing ` \` from keymap * [Keyboard] RadPad fix info.json - Change `LAYOUT_***_Encoders` to `LAYOUT_***_encoders` in info.json * [Keyboard] Add host LED status to OLED display * [Keyboard] Use LAYOUT_4x4_encoders, not LAYOUT * [Keyboard] Use LAYOUT_4x4_encoders, not LAYOUT * [Keyboard] Remove DESCRIPTION from config.h --- keyboards/keybage/radpad/config.h | 67 +++++++++ keyboards/keybage/radpad/info.json | 82 ++++++++++ .../keybage/radpad/keymaps/default/keymap.c | 141 ++++++++++++++++++ .../keybage/radpad/keymaps/default/readme.md | 1 + keyboards/keybage/radpad/radpad.c | 17 +++ keyboards/keybage/radpad/radpad.h | 87 +++++++++++ keyboards/keybage/radpad/readme.md | 15 ++ keyboards/keybage/radpad/rules.mk | 25 ++++ 8 files changed, 435 insertions(+) create mode 100644 keyboards/keybage/radpad/config.h create mode 100644 keyboards/keybage/radpad/info.json create mode 100644 keyboards/keybage/radpad/keymaps/default/keymap.c create mode 100644 keyboards/keybage/radpad/keymaps/default/readme.md create mode 100644 keyboards/keybage/radpad/radpad.c create mode 100644 keyboards/keybage/radpad/radpad.h create mode 100644 keyboards/keybage/radpad/readme.md create mode 100644 keyboards/keybage/radpad/rules.mk diff --git a/keyboards/keybage/radpad/config.h b/keyboards/keybage/radpad/config.h new file mode 100644 index 000000000000..4692b38180ae --- /dev/null +++ b/keyboards/keybage/radpad/config.h @@ -0,0 +1,67 @@ +/* +Copyright 2020 Keybage + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License 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 0x4253 // "BS" +#define PRODUCT_ID 0x5250 // "RP" +#define DEVICE_VER 0x0001 +#define MANUFACTURER Keybage +#define PRODUCT RadPad + +/* key matrix size */ +#define MATRIX_ROWS 5 +#define MATRIX_COLS 4 + +#define MATRIX_ROW_PINS { F5, B5, B6, B2, B3 } +#define MATRIX_COL_PINS { E6, B4, D7, B1 } +#define UNUSED_PINS { B0, B7, C7, D2, D3, D5, F0 } + +#define DIODE_DIRECTION COL2ROW + +#define ENCODERS_PAD_A { D4, F6 } +#define ENCODERS_PAD_B { C6, F7 } + +#define ENCODER_RESOLUTION 2 + +#define RGB_DI_PIN F4 +#ifdef RGB_DI_PIN + #define RGBLED_NUM 16 + #define RGBLIGHT_SLEEP +/*== all animations disable ==*/ + #undef RGBLIGHT_ANIMATIONS +#endif + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCE 5 + +/* disable these deprecated features by default */ +#define NO_ACTION_MACRO +#define NO_ACTION_FUNCTION + +/* Bootmagic Lite key configuration */ +#define BOOTMAGIC_LITE_ROW 1 +#define BOOTMAGIC_LITE_COLUMN 3 + +/* OLED Configuration */ +#ifdef OLED_DRIVER_ENABLE + #define OLED_TIMEOUT 60000 + #define OLED_LOGO_TIMEOUT 3000 // How long (in ms) the logo appears at start up +#endif diff --git a/keyboards/keybage/radpad/info.json b/keyboards/keybage/radpad/info.json new file mode 100644 index 000000000000..b8f2306e18e0 --- /dev/null +++ b/keyboards/keybage/radpad/info.json @@ -0,0 +1,82 @@ +{ + "keyboard_name": "radpad", + "url": "", + "maintainer": "Brandon Schlack", + "width": 4, + "height": 5, + "layouts": { + "LAYOUT_4x4_encoders": { + "layout": [ + {"x":0, "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_4x3_encoders": { + "layout": [ + {"x":0, "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} + ] + }, + "LAYOUT_3x4_encoders": { + "layout": [ + {"x":1, "y":0}, + {"x":3, "y":0}, + {"x":1, "y":1}, + {"x":2, "y":1}, + {"x":3, "y":1}, + {"x":1, "y":2}, + {"x":2, "y":2}, + {"x":3, "y":2}, + {"x":1, "y":3}, + {"x":2, "y":3}, + {"x":3, "y":3}, + {"x":1, "y":4}, + {"x":2, "y":4}, + {"x":3, "y":4} + ] + }, + "LAYOUT_3x3_encoders": { + "layout": [ + {"x":1, "y":0}, + {"x":3, "y":0}, + {"x":1, "y":1}, + {"x":2, "y":1}, + {"x":3, "y":1}, + {"x":1, "y":2}, + {"x":2, "y":2}, + {"x":3, "y":2}, + {"x":1, "y":3}, + {"x":2, "y":3}, + {"x":3, "y":3} + ] + } + } +} diff --git a/keyboards/keybage/radpad/keymaps/default/keymap.c b/keyboards/keybage/radpad/keymaps/default/keymap.c new file mode 100644 index 000000000000..f5904150e690 --- /dev/null +++ b/keyboards/keybage/radpad/keymaps/default/keymap.c @@ -0,0 +1,141 @@ +/* Copyright 2020 Brandon Schlack + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public 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 = 0, + _FN +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_BASE] = LAYOUT_4x4_encoders( + KC_MUTE, KC_MPLY, + KC_PMNS, KC_P7, KC_P8, KC_P9, + KC_PPLS, KC_P4, KC_P5, KC_P6, + KC_BSPC, KC_P1, KC_P2, KC_P3, + KC_PENT, MO(_FN), KC_P0, KC_PDOT + ), + [_FN] = LAYOUT_4x4_encoders( + _______, _______, + KC_PSLS, KC_F21, KC_F22, KC_F23, + KC_PAST, KC_F18, KC_F19, KC_F20, + KC_NLCK, KC_F15, KC_F16, KC_F17, + RESET, _______, KC_F13, KC_F14 + ) +}; + +void encoder_update_user(uint8_t index, bool clockwise) { + if (index == 0) { /* Left encoder */ + if (clockwise) { + tap_code16(KC_VOLU); + } else { + tap_code16(KC_VOLD); + } + } else if (index == 1) { /* Right encoder */ + if (clockwise) { + tap_code16(KC_MNXT); + } else { + tap_code16(KC_MPRV); + } + } +} + +#ifdef OLED_DRIVER_ENABLE +static uint32_t oled_logo_timer = 0; +bool oled_logo_cleared = false; // Set to true if you don't want a logo at all + +static void render_status(void) { + // Host Keyboard Layer Status + oled_write_P(PSTR("Layer: "), false); + + switch (get_highest_layer(layer_state)) { + case _BASE: + oled_write_P(PSTR("Numpad\n"), false); + break; + case _FN: + oled_write_P(PSTR("Macropad\n"), false); + break; + default: + // Or use the write_ln shortcut over adding '\n' to the end of your string + oled_write_ln_P(PSTR("Some Other Layer"), false); + } + + // Empty Line + oled_write_ln_P(PSTR(" "), false); + + // Host Keyboard LED Status + led_t led_state = host_keyboard_led_state(); + oled_write_P(led_state.num_lock ? PSTR(" NUM ") : PSTR(" "), led_state.num_lock); + oled_write_P(led_state.caps_lock ? PSTR(" CAP ") : PSTR(" "), led_state.caps_lock); + oled_write_P(led_state.scroll_lock ? PSTR(" SCR ") : PSTR(" "), led_state.scroll_lock); +} + +/* + How to convert your own image: + https://docs.splitkb.com/hc/en-us/articles/360013811280 +*/ +static void render_logo(void) { + static const char radpad_logo [] PROGMEM = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0xe0, 0xe0, 0xf0, 0xf0, 0xf0, 0xf8, 0xf8, + 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf0, 0xf0, 0xf0, 0xe0, 0xc0, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0xe0, 0xf0, 0xf0, 0xf0, 0xe0, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x60, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xe0, 0xe0, 0xe0, 0xe0, 0xc0, + 0xc0, 0xc0, 0xe0, 0xe0, 0xe0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf8, 0xf8, 0xf8, 0xf8, + 0xf8, 0xf0, 0xf0, 0xe0, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0xf0, 0xf0, 0xf0, 0xe0, + 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xf0, 0xf0, + 0xf0, 0xf0, 0xf0, 0xe0, 0xe0, 0xe0, 0xe0, 0xc0, 0xc0, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0xf9, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf7, + 0xf1, 0xf8, 0xf8, 0xfc, 0xfc, 0xfe, 0x7f, 0x3f, 0x1f, 0x1f, 0x0f, 0x0f, 0x07, 0x00, 0x80, 0xe0, + 0xf8, 0xfc, 0xff, 0xff, 0xff, 0xbf, 0xff, 0xff, 0xff, 0xfe, 0xc0, 0xc0, 0xe0, 0xe0, 0xe0, 0xc0, + 0xc0, 0xf0, 0xfd, 0xff, 0xff, 0xff, 0x3f, 0x0f, 0x01, 0x00, 0x00, 0x81, 0xc1, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf7, 0xf9, 0xf8, 0xfc, 0x7e, 0x7e, 0x3f, + 0x3f, 0x1f, 0x1f, 0x0f, 0x07, 0x03, 0x80, 0xc0, 0xf0, 0xfc, 0xff, 0xff, 0xff, 0xbf, 0xff, 0xff, + 0xff, 0xff, 0xe0, 0xc0, 0xc0, 0xe0, 0xe0, 0xc0, 0x80, 0xe0, 0xfd, 0xff, 0xff, 0xff, 0x7f, 0x0f, + 0x03, 0x00, 0x00, 0x81, 0xc1, 0xf3, 0xff, 0xff, 0xff, 0x7f, 0x3f, 0x0f, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x80, 0xf0, 0xfc, 0xff, 0xff, 0x7f, 0x1f, 0x0f, 0x03, 0x03, 0x03, 0x01, + 0x01, 0x01, 0x0f, 0x7f, 0xff, 0xff, 0xfe, 0x80, 0x00, 0xe0, 0xf0, 0xf8, 0xfc, 0xff, 0xff, 0x3f, + 0x3f, 0x1f, 0x1f, 0x0f, 0x0f, 0x0f, 0x07, 0x3f, 0xff, 0xff, 0xff, 0xff, 0xc3, 0xe3, 0xf9, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xf8, 0xfc, 0xfc, 0x7e, 0x3e, 0x3f, 0x1f, 0x1f, 0x8f, 0xe7, 0xff, + 0xff, 0xff, 0x7f, 0x3f, 0x1f, 0x0f, 0x07, 0x07, 0x03, 0x03, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0xc0, 0xf0, 0xf8, 0xfc, 0xff, 0xff, 0x7f, 0x3f, 0x1f, 0x1f, 0x0f, 0x0f, 0x0f, 0x07, 0x1f, + 0xff, 0xff, 0xff, 0xff, 0xc3, 0xe3, 0xf9, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf9, 0xf8, 0xfc, + 0x7e, 0x3e, 0x3f, 0x1f, 0x1f, 0x0f, 0x07, 0x03, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x03, 0x07, 0x07, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x03, 0x07, 0x07, 0x07, 0x00, 0x01, 0x01, 0x03, 0x03, 0x01, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x07, 0x03, 0x07, 0x07, 0x07, 0x07, 0x03, + 0x07, 0x03, 0x03, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x1f, 0x1f, 0x0f, + 0x07, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x01, 0x03, 0x03, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x01, 0x03, 0x03, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x03, 0x03, 0x03, 0x01, 0x01, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }; + oled_write_raw_P(radpad_logo, sizeof(radpad_logo)); +} + +void oled_task_user(void) { + if (oled_logo_cleared) { + render_status(); + } else { + if (timer_elapsed32(oled_logo_timer) > OLED_LOGO_TIMEOUT) { + oled_clear(); + oled_logo_cleared = true; + render_status(); + } else { + render_logo(); + } + } +} +#endif diff --git a/keyboards/keybage/radpad/keymaps/default/readme.md b/keyboards/keybage/radpad/keymaps/default/readme.md new file mode 100644 index 000000000000..053bf297b7a2 --- /dev/null +++ b/keyboards/keybage/radpad/keymaps/default/readme.md @@ -0,0 +1 @@ +# The default keymap for radpad diff --git a/keyboards/keybage/radpad/radpad.c b/keyboards/keybage/radpad/radpad.c new file mode 100644 index 000000000000..4a31d8f57343 --- /dev/null +++ b/keyboards/keybage/radpad/radpad.c @@ -0,0 +1,17 @@ +/* Copyright 2020 Brandon Schlack + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#include "radpad.h" diff --git a/keyboards/keybage/radpad/radpad.h b/keyboards/keybage/radpad/radpad.h new file mode 100644 index 000000000000..be6583bb8e72 --- /dev/null +++ b/keyboards/keybage/radpad/radpad.h @@ -0,0 +1,87 @@ +/* Copyright 2020 Brandon Schlack + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License 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 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_4x4_encoders( \ + k00, k03, \ + k10, k11, k12, k13, \ + k20, k21, k22, k23, \ + k30, k31, k32, k33, \ + k40, k41, k42, k43 \ +) \ +{ \ + { k00, XXX, XXX, k03 }, \ + { k10, k11, k12, k13 }, \ + { k20, k21, k22, k23 }, \ + { k30, k31, k32, k33 }, \ + { k40, k41, k42, k43 } \ +} + +#define LAYOUT_4x3_encoders( \ + k00, k03, \ + k10, k11, k12, k13, \ + k20, k21, k22, k23, \ + k30, k31, k32, k33 \ +) \ +{ \ + { k00, XXX, XXX, k03 }, \ + { k10, k11, k12, k13 }, \ + { k20, k21, k22, k23 }, \ + { k30, k31, k32, k33 }, \ + { XXX, XXX, XXX, XXX } \ +} + +#define LAYOUT_3x4_encoders( \ + k01, k03, \ + k11, k12, k13, \ + k21, k22, k23, \ + k31, k32, k33, \ + k41, k42, k43 \ +) \ +{ \ + { XXX, k01, XXX, k03 }, \ + { XXX, k11, k12, k13 }, \ + { XXX, k21, k22, k23 }, \ + { XXX, k31, k32, k33 }, \ + { XXX, k41, k42, k43 } \ +} + +#define LAYOUT_3x3_encoders( \ + k01, k03, \ + k11, k12, k13, \ + k21, k22, k23, \ + k31, k32, k33 \ +) \ +{ \ + { XXX, k01, XXX, k03 }, \ + { XXX, k11, k12, k13 }, \ + { XXX, k21, k22, k23 }, \ + { XXX, k31, k32, k33 }, \ + { XXX, XXX, XXX, XXX } \ +} diff --git a/keyboards/keybage/radpad/readme.md b/keyboards/keybage/radpad/readme.md new file mode 100644 index 000000000000..d414578c0829 --- /dev/null +++ b/keyboards/keybage/radpad/readme.md @@ -0,0 +1,15 @@ +# RadPad + +![RadPad](https://i.imgur.com/a4UmOuW.jpg) + +A DIY-focused 4x4 numpad that supports up to 2 Rotary Encoders and an OLED screen. + +* Keyboard Maintainer: [Brandon Schlack](https://github.com/brandonschlack) +* Hardware Supported: Pro Micro, Elite-C, Proton C +* Hardware Availability: TBD, awaiting final protos + +Make example for this keyboard (after setting up your build environment): + + make keybage/radpad: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/keybage/radpad/rules.mk b/keyboards/keybage/radpad/rules.mk new file mode 100644 index 000000000000..74f4c487487c --- /dev/null +++ b/keyboards/keybage/radpad/rules.mk @@ -0,0 +1,25 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +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 = no # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow +BLUETOOTH_ENABLE = no # Enable Bluetooth +AUDIO_ENABLE = no # Audio output +ENCODER_ENABLE = yes +OLED_DRIVER_ENABLE = yes +LTO_ENABLE = yes From 688426b50225b1d5b44f3eeaa9b26816d28ba16e Mon Sep 17 00:00:00 2001 From: John Helveston Date: Sun, 26 Jul 2020 17:35:46 -0400 Subject: [PATCH 449/930] Adding keymaps for iris and kyria keyboards (#9783) * updated iris and kyria keymaps * added symbols I forgot to add to keymap * Update keyboards/keebio/iris/keymaps/jhelvy/keymap.c Co-authored-by: Ryan * condense code Co-authored-by: Ryan * condense code Co-authored-by: Ryan * made another small fix to a missing symbol in my iris keymap Co-authored-by: Ryan --- .../keebio/iris/keymaps/jhelvy/README.md | 8 +- keyboards/keebio/iris/keymaps/jhelvy/config.h | 21 +- keyboards/keebio/iris/keymaps/jhelvy/keymap.c | 144 ++++++++++--- keyboards/keebio/iris/keymaps/jhelvy/rules.mk | 9 +- keyboards/kyria/keymaps/jhelvy/config.h | 33 +++ keyboards/kyria/keymaps/jhelvy/keymap.c | 201 ++++++++++++++++++ keyboards/kyria/keymaps/jhelvy/rules.mk | 8 + 7 files changed, 373 insertions(+), 51 deletions(-) create mode 100644 keyboards/kyria/keymaps/jhelvy/config.h create mode 100644 keyboards/kyria/keymaps/jhelvy/keymap.c create mode 100644 keyboards/kyria/keymaps/jhelvy/rules.mk diff --git a/keyboards/keebio/iris/keymaps/jhelvy/README.md b/keyboards/keebio/iris/keymaps/jhelvy/README.md index 5d5ff12471e8..84b924c37968 100644 --- a/keyboards/keebio/iris/keymaps/jhelvy/README.md +++ b/keyboards/keebio/iris/keymaps/jhelvy/README.md @@ -1,7 +1 @@ -# jhelvy Keymap for [Iris Rev 2](https://docs.keeb.io/iris-build-guide/) - -## Keymap - -This is a custom keymap with the following layout: - - +Keymap for jhelvy's [Iris Rev 2](https://github.com/jhelvy/iris-rev2) diff --git a/keyboards/keebio/iris/keymaps/jhelvy/config.h b/keyboards/keebio/iris/keymaps/jhelvy/config.h index 2285c3f9affc..c0192347324a 100644 --- a/keyboards/keebio/iris/keymaps/jhelvy/config.h +++ b/keyboards/keebio/iris/keymaps/jhelvy/config.h @@ -17,17 +17,20 @@ 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 +// Had to swap the master to get the right-side rotary encoder supported +#define MASTER_RIGHT #define TAPPING_FORCE_HOLD #undef TAPPING_TERM #define TAPPING_TERM 200 #define AUTO_SHIFT_TIMEOUT 150 + +#define MOUSEKEY_DELAY 100 +#define MOUSEKEY_INTERVAL 16 +#define MOUSEKEY_MAX_SPEED 2 +#define MOUSEKEY_WHEEL_MAX_SPEED 42 +#define MOUSEKEY_WHEEL_TIME_TO_MAX 15 + +#define ENCODERS_PAD_A { F4 } +#define ENCODERS_PAD_B { F5 } +#define ENCODER_RESOLUTION 4 diff --git a/keyboards/keebio/iris/keymaps/jhelvy/keymap.c b/keyboards/keebio/iris/keymaps/jhelvy/keymap.c index 58ce3206ddd0..a3d20bed5918 100644 --- a/keyboards/keebio/iris/keymaps/jhelvy/keymap.c +++ b/keyboards/keebio/iris/keymaps/jhelvy/keymap.c @@ -1,54 +1,134 @@ #include QMK_KEYBOARD_H - -#define _QWERTY 0 -#define _LOWER 1 -#define _RAISE 2 +enum layers { + QWERTY = 0, + HOTKEYS, + TEXT, + SELECT, + MOUSE, +}; enum custom_keycodes { - QWERTY = SAFE_RANGE, - LOWER, - RAISE, + SIG_PROF = SAFE_RANGE, + SIG_JOHN, + R_PIPE, + R_ASSIGN, + R_COLS, + R_IN, + TEX, + E_GMAIL, + E_GWU, }; const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { -[_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_BSPC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_QUOT, KC_ENT, \ - KC_LSPO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_NO, KC_NO, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSPC, \ - LALT(KC_A),KC_LGUI, MO(1), KC_SPC, MO(2), KC_PGDN), - -[_LOWER] = LAYOUT( \ - KC_ESC,LGUI(KC_1),LGUI(KC_2),LGUI(KC_3),LGUI(KC_4),LGUI(KC_5), KC_SCLN, KC_PIPE, KC_COLN,LCTL(KC_9),LCTL(KC_0), KC_F12, \ - LCTL(KC_TAB),LGUI(KC_Q),LGUI(KC_W), KC_ESC,LGUI(KC_R),LGUI(KC_T), LCTL(KC_Y),LGUI(KC_LEFT), KC_UP,LGUI(KC_RGHT), KC_TILD, KC_F11, \ - LGUI(KC_BSPC),MO(2),LGUI(KC_S),LGUI(KC_C),LGUI(KC_V),LGUI(KC_X), KC_DEL, KC_LEFT, KC_DOWN, KC_RGHT, KC_GRV, KC_ENT, \ - KC_F15,LGUI(KC_A),LGUI(KC_D), KC_F13,LGUI(KC_Z),LGUI(KC_Y), KC_NO, KC_NO,KC_BSPC,LGUI(KC_F), SGUI(KC_G),LGUI(KC_G), KC_BSLS, KC_F23, \ - KC_LALT,KC_LGUI, KC_TRNS, KC_SPC,KC_RGUI, KC_PGUP), - -[_RAISE] = LAYOUT( \ - KC_VOLU,LGUI(LALT(KC_1)),LGUI(LALT(KC_2)), KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_PLUS, \ - KC_VOLD, KC_NO, KC_NO, KC_NO,SGUI(KC_R), KC_F14, SGUI(KC_K),SGUI(KC_LEFT),LSFT(KC_UP),SGUI(KC_RGHT), KC_F18, KC_UNDS, \ - KC_MUTE,KC_TRNS, KC_NO, KC_LBRC, KC_RBRC, KC_TAB, KC_F21,LSFT(KC_LEFT),LSFT(KC_DOWN),LSFT(KC_RGHT), KC_F20, KC_F16, \ - KC_LSPO,KC_ASTG, KC_NO, KC_LCBR, KC_RCBR,LCTL(KC_U), KC_NO, KC_NO,KC_F22,LCTL(LGUI(KC_A)),LALT(LSFT(KC_LEFT)),LALT(LSFT(KC_RIGHT)), KC_F17, KC_F19, \ - KC_CAPS,LALT(KC_SPC), KC_LGUI, KC_SPC,KC_TRNS, KC_NO) + +[QWERTY] = LAYOUT(LALT(KC_A), KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_EQL, KC_EQL, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_MINS, 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_LSPO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_NO, KC_NO, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSPC, MO(4), KC_LGUI, MO(2), KC_SPC, MO(1), TG(1)), + +[HOTKEYS] = LAYOUT(KC_F5, LGUI(LALT(KC_1)), LGUI(LALT(KC_2)), KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_F14, KC_F6, KC_NO, KC_NO, LCTL(KC_U), SGUI(KC_R), KC_F2, SGUI(KC_K), LCTL(KC_9), LCTL(KC_0), KC_NO, KC_F11, KC_F15, KC_F7, LGUI(LCTL(KC_A)), KC_F10, KC_LBRC, KC_RBRC, KC_F9, SIG_JOHN, LSFT(KC_TAB), KC_TAB, E_GMAIL, KC_F12, KC_F16, KC_F8, KC_ASTG, KC_NO, KC_LCBR, KC_RCBR, KC_NO, KC_NO, KC_NO, SIG_PROF, KC_F3, KC_F4, E_GWU, KC_F13, KC_F17, LALT(KC_SPC), KC_LGUI, KC_LCTL, KC_SPC, KC_TRNS, KC_TRNS), + +[TEXT] = LAYOUT(KC_ESC, LGUI(KC_1), LGUI(KC_2), LGUI(KC_3), LGUI(KC_4), LGUI(KC_5), KC_SCLN, KC_PIPE, KC_COLN, KC_NO, KC_UNDS, KC_PLUS, LGUI(KC_BSPC), LGUI(KC_Q), LGUI(KC_W), KC_ESC, LGUI(KC_R), LGUI(KC_T), LCTL(KC_Y), LGUI(KC_LEFT), KC_UP, LGUI(KC_RGHT), KC_TILD, R_PIPE, KC_BSPC, MO(3), LGUI(KC_S), LGUI(KC_C), LGUI(KC_V), LGUI(KC_X), KC_DEL, KC_LEFT, KC_DOWN, KC_RGHT, KC_GRV, KC_ENT, KC_F18, LGUI(KC_A), LGUI(KC_D), KC_F1, LGUI(KC_Z), LGUI(KC_Y), KC_NO, KC_NO, KC_BSPC, LGUI(KC_F), SGUI(KC_G), LGUI(KC_G), KC_BSLS, R_ASSIGN, KC_LALT, KC_LGUI, KC_TRNS, KC_SPC, KC_RGUI, KC_NO), + +[SELECT] = 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, KC_NO, KC_NO, KC_NO, SGUI(KC_LEFT), LSFT(KC_UP), SGUI(KC_RGHT), KC_NO, R_COLS, KC_NO, KC_TRNS, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, LSFT(KC_LEFT), LSFT(KC_DOWN), LSFT(KC_RGHT), KC_NO, R_IN, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, LALT(LSFT(KC_LEFT)), LALT(LSFT(KC_RIGHT)), KC_NO, TEX, KC_NO, KC_NO, KC_NO, KC_SPC, KC_TRNS, KC_TRNS), + +[MOUSE] = 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, KC_LGUI, KC_NO, KC_NO, LGUI(KC_LBRC), KC_MS_U, LGUI(KC_RBRC), KC_NO, KC_NO, LCTL(KC_TAB), 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_TRNS, KC_NO, KC_NO, KC_BTN1, KC_BTN2, KC_NO) }; +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case SIG_PROF: + if (record->event.pressed) { + SEND_STRING("Cheers,\nProfessor Helveston"); + } else { + } + break; + + case SIG_JOHN: + if (record->event.pressed) { + SEND_STRING("Cheers,\nJohn"); + } else { + } + break; + + case R_PIPE: + if (record->event.pressed) { + SEND_STRING(" %>% "); + } else { + } + break; + + case R_ASSIGN: + if (record->event.pressed) { + SEND_STRING(" <- "); + } else { + } + break; + + case R_COLS: + if (record->event.pressed) { + SEND_STRING(".leftcol[\n]\n.rightcol[\n]\n"); + } else { + } + break; + + case R_IN: + if (record->event.pressed) { + SEND_STRING(" %in% "); + } else { + } + break; + + case TEX: + if (record->event.pressed) { + SEND_STRING("\\text{}"); + } else { + } + break; + + case E_GMAIL: + if (record->event.pressed) { + SEND_STRING("john.helveston@gmail.com"); + } else { + } + break; + + case E_GWU: + if (record->event.pressed) { + SEND_STRING("jph@gwu.edu"); + } else { + } + break; + + } + + return true; +}; + void encoder_update_user(uint8_t index, bool clockwise) { - if (index == 0) { + if (IS_LAYER_ON(HOTKEYS)) { if (clockwise) { tap_code(KC_VOLU); } else { tap_code(KC_VOLD); } - } - else if (index == 1) { + } else if (IS_LAYER_ON(TEXT)) { + if (clockwise) { + tap_code(KC_MS_WH_RIGHT); + } else { + tap_code(KC_MS_WH_LEFT); + } + } else if (IS_LAYER_ON(MOUSE)) { + if (clockwise) { + tap_code16(G(KC_EQL)); + } else { + tap_code16(G(KC_MINS)); + } + } else { if (clockwise) { - tap_code(KC_PGDN); + tap_code(KC_MS_WH_DOWN); } else { - tap_code(KC_PGUP); + tap_code(KC_MS_WH_UP); } } } diff --git a/keyboards/keebio/iris/keymaps/jhelvy/rules.mk b/keyboards/keebio/iris/keymaps/jhelvy/rules.mk index c34fd4b1fa43..64d3eb2f184c 100644 --- a/keyboards/keebio/iris/keymaps/jhelvy/rules.mk +++ b/keyboards/keebio/iris/keymaps/jhelvy/rules.mk @@ -1,3 +1,6 @@ -AUTO_SHIFT_ENABLE = yes # Autoshift by holding down a key -RGBLIGHT_ENABLE = yes -BACKLIGHT_ENABLE = yes +AUTO_SHIFT_ENABLE = yes # Autoshift by holding down a key +MOUSEKEY_ENABLE = yes +ENCODER_ENABLE = yes +EXTRAKEY_ENABLE = yes +RGBLIGHT_ENABLE = no +BACKLIGHT_ENABLE = no diff --git a/keyboards/kyria/keymaps/jhelvy/config.h b/keyboards/kyria/keymaps/jhelvy/config.h new file mode 100644 index 000000000000..6dbc0dc1d24c --- /dev/null +++ b/keyboards/kyria/keymaps/jhelvy/config.h @@ -0,0 +1,33 @@ +/* Copyright 2019 Thomas Baart + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#pragma once + +#ifdef OLED_DRIVER_ENABLE + #define OLED_DISPLAY_128X64 +#endif + +#define ENCODER_RESOLUTION 2 + +#define TAPPING_FORCE_HOLD +#define TAPPING_TERM 200 +#define AUTO_SHIFT_TIMEOUT 150 + +#define MOUSEKEY_DELAY 100 +#define MOUSEKEY_INTERVAL 16 +#define MOUSEKEY_MAX_SPEED 2 +#define MOUSEKEY_WHEEL_MAX_SPEED 42 +#define MOUSEKEY_WHEEL_TIME_TO_MAX 15 diff --git a/keyboards/kyria/keymaps/jhelvy/keymap.c b/keyboards/kyria/keymaps/jhelvy/keymap.c new file mode 100644 index 000000000000..e0800dd5eda9 --- /dev/null +++ b/keyboards/kyria/keymaps/jhelvy/keymap.c @@ -0,0 +1,201 @@ +#include QMK_KEYBOARD_H + +enum layers { + QWERTY = 0, + HOTKEYS, + TEXT, + SELECT, + NUMBERS, +}; + +enum custom_keycodes { + SIG_PROF = SAFE_RANGE, + SIG_JOHN, + R_PIPE, + R_ASSIGN, + R_COLS, + R_IN, + TEX, + E_GMAIL, + E_GWU, +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +[QWERTY] = LAYOUT(LALT(KC_A), KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_MINS, 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_LSPO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_NO, KC_NO, KC_NO, KC_NO, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSPC, KC_LALT, KC_LCTL, KC_LGUI, MO(2), MO(4), KC_BSPC, KC_SPC, MO(1), KC_PGDN, TG(1)), + +[HOTKEYS] = LAYOUT(KC_F6, LGUI(LALT(KC_1)), LGUI(LALT(KC_2)), LCTL(KC_U), SGUI(KC_R), KC_F2, SGUI(KC_K), LCTL(KC_9), LCTL(KC_0), KC_F14, KC_F11, KC_F15, KC_F7, LGUI(LCTL(KC_A)), KC_F10, KC_LBRC, KC_RBRC, KC_F9, SIG_JOHN, LSFT(KC_TAB), KC_TAB, E_GMAIL, KC_F12, KC_F16, KC_F8, KC_ASTG, KC_NO, KC_LCBR, KC_RCBR, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, SIG_PROF, KC_F3, KC_F4, E_GWU, KC_F13, KC_F17, KC_F5, KC_NO, KC_LGUI, KC_LGUI, KC_LCTL, KC_BSPC, KC_SPC, KC_TRNS, KC_NO, KC_TRNS), + +[TEXT] = LAYOUT(LGUI(KC_BSPC), LGUI(KC_Q), LGUI(KC_W), KC_ESC, LGUI(KC_R), LGUI(KC_T), LCTL(KC_Y), LGUI(KC_LEFT), KC_UP, LGUI(KC_RGHT), KC_SCLN, R_PIPE, KC_BSPC, MO(3), LGUI(KC_S), LGUI(KC_C), LGUI(KC_V), LGUI(KC_X), KC_DEL, KC_LEFT, KC_DOWN, KC_RGHT, KC_GRV, KC_ENT, KC_F18, LGUI(KC_A), LGUI(KC_D), KC_F1, LGUI(KC_Z), LGUI(KC_Y), KC_NO, KC_NO, KC_NO, KC_NO, KC_BSPC, LGUI(KC_F), SGUI(KC_G), LGUI(KC_G), KC_BSLS, R_ASSIGN, KC_LALT, KC_LCTL, KC_LGUI, KC_TRNS, KC_NO, KC_BSPC, KC_SPC, KC_LGUI, KC_PGUP, KC_NO), + +[SELECT] = LAYOUT(KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, SGUI(KC_LEFT), LSFT(KC_UP), SGUI(KC_RGHT), KC_NO, R_COLS, KC_NO, KC_TRNS, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, LSFT(KC_LEFT), LSFT(KC_DOWN), LSFT(KC_RGHT), KC_NO, R_IN, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, LALT(LSFT(KC_LEFT)), LALT(LSFT(KC_RIGHT)), KC_NO, TEX, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_BSPC, KC_SPC, KC_LGUI, KC_NO, KC_NO), + +[NUMBERS] = LAYOUT(KC_NO, LGUI(KC_1), LGUI(KC_2), LGUI(KC_3), LGUI(KC_4), LGUI(KC_5), KC_EQL, KC_7, KC_8, KC_9, KC_TILD, KC_MINS, KC_NO, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_PLUS, KC_4, KC_5, KC_6, KC_COLN, KC_ENT, KC_LSPO, KC_NO, KC_NO, KC_CIRC, KC_AMPR, KC_ASTR, KC_NO, KC_NO, KC_NO, KC_NO, KC_MINS, KC_1, KC_2, KC_3, KC_SLSH, KC_PIPE, KC_NO, KC_NO, KC_NO, KC_NO, KC_TRNS, KC_BSPC, KC_SPC, KC_0, KC_DOT, KC_COMM) + +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case SIG_PROF: + if (record->event.pressed) { + SEND_STRING("Cheers,\nProfessor Helveston"); + } else { + } + break; + + case SIG_JOHN: + if (record->event.pressed) { + SEND_STRING("Cheers,\nJohn"); + } else { + } + break; + + case R_PIPE: + if (record->event.pressed) { + SEND_STRING(" %>% "); + } else { + } + break; + + case R_ASSIGN: + if (record->event.pressed) { + SEND_STRING(" <- "); + } else { + } + break; + + case R_COLS: + if (record->event.pressed) { + SEND_STRING(".leftcol[\n]\n.rightcol[\n]\n"); + } else { + } + break; + + case R_IN: + if (record->event.pressed) { + SEND_STRING(" %in% "); + } else { + } + break; + + case TEX: + if (record->event.pressed) { + SEND_STRING("\\text{}"); + } else { + } + break; + + case E_GMAIL: + if (record->event.pressed) { + SEND_STRING("john.helveston@gmail.com"); + } else { + } + break; + + case E_GWU: + if (record->event.pressed) { + SEND_STRING("jph@gwu.edu"); + } else { + } + break; + + } + + return true; +}; + +#ifdef OLED_DRIVER_ENABLE +oled_rotation_t oled_init_user(oled_rotation_t rotation) { + return OLED_ROTATION_180; +} + +static void render_kyria_logo(void) { + static const char PROGMEM kyria_logo[] = { + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128,128,192,224,240,112,120, 56, 60, 28, 30, 14, 14, 14, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 14, 14, 14, 30, 28, 60, 56,120,112,240,224,192,128,128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0,192,224,240,124, 62, 31, 15, 7, 3, 1,128,192,224,240,120, 56, 60, 28, 30, 14, 14, 7, 7,135,231,127, 31,255,255, 31,127,231,135, 7, 7, 14, 14, 30, 28, 60, 56,120,240,224,192,128, 1, 3, 7, 15, 31, 62,124,240,224,192, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0,240,252,255, 31, 7, 1, 0, 0,192,240,252,254,255,247,243,177,176, 48, 48, 48, 48, 48, 48, 48,120,254,135, 1, 0, 0,255,255, 0, 0, 1,135,254,120, 48, 48, 48, 48, 48, 48, 48,176,177,243,247,255,254,252,240,192, 0, 0, 1, 7, 31,255,252,240, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0,255,255,255, 0, 0, 0, 0, 0,254,255,255, 1, 1, 7, 30,120,225,129,131,131,134,134,140,140,152,152,177,183,254,248,224,255,255,224,248,254,183,177,152,152,140,140,134,134,131,131,129,225,120, 30, 7, 1, 1,255,255,254, 0, 0, 0, 0, 0,255,255,255, 0, 0, 0, 0,255,255, 0, 0,192,192, 48, 48, 0, 0,240,240, 0, 0, 0, 0, 0, 0,240,240, 0, 0,240,240,192,192, 48, 48, 48, 48,192,192, 0, 0, 48, 48,243,243, 0, 0, 0, 0, 0, 0, 48, 48, 48, 48, 48, 48,192,192, 0, 0, 0, 0, 0, + 0, 0, 0,255,255,255, 0, 0, 0, 0, 0,127,255,255,128,128,224,120, 30,135,129,193,193, 97, 97, 49, 49, 25, 25,141,237,127, 31, 7,255,255, 7, 31,127,237,141, 25, 25, 49, 49, 97, 97,193,193,129,135, 30,120,224,128,128,255,255,127, 0, 0, 0, 0, 0,255,255,255, 0, 0, 0, 0, 63, 63, 3, 3, 12, 12, 48, 48, 0, 0, 0, 0, 51, 51, 51, 51, 51, 51, 15, 15, 0, 0, 63, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 48, 48, 63, 63, 48, 48, 0, 0, 12, 12, 51, 51, 51, 51, 51, 51, 63, 63, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 15, 63,255,248,224,128, 0, 0, 3, 15, 63,127,255,239,207,141, 13, 12, 12, 12, 12, 12, 12, 12, 30,127,225,128, 0, 0,255,255, 0, 0,128,225,127, 30, 12, 12, 12, 12, 12, 12, 12, 13,141,207,239,255,127, 63, 15, 3, 0, 0,128,224,248,255, 63, 15, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 3, 7, 15, 62,124,248,240,224,192,128, 1, 3, 7, 15, 30, 28, 60, 56,120,112,112,224,224,225,231,254,248,255,255,248,254,231,225,224,224,112,112,120, 56, 60, 28, 30, 15, 7, 3, 1,128,192,224,240,248,124, 62, 15, 7, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 3, 7, 15, 14, 30, 28, 60, 56,120,112,112,112,224,224,224,224,224,224,224,224,224,224,224,224,224,224,224,224,112,112,112,120, 56, 60, 28, 30, 14, 15, 7, 3, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 + }; + oled_write_raw_P(kyria_logo, sizeof(kyria_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); +} + +static void render_status(void) { + // QMK Logo and version information + render_qmk_logo(); + oled_write_P(PSTR(" Kyria rev1.0\n\n"), false); + + // Host Keyboard Layer Status + oled_write_P(PSTR("Layer: "), false); + switch (get_highest_layer(layer_state)) { + case QWERTY: + oled_write_P(PSTR("QWERTY\n"), false); + break; + case HOTKEYS: + oled_write_P(PSTR("HOTKEYS\n"), false); + break; + case TEXT: + oled_write_P(PSTR("TEXT\n"), false); + break; + case SELECT: + oled_write_P(PSTR("SELECT\n"), false); + break; + case NUMBERS: + oled_write_P(PSTR("NUMBERS\n"), false); + break; + default: + oled_write_P(PSTR("Undefined\n"), false); + } + +} + +void oled_task_user(void) { + if (is_keyboard_master()) { + render_status(); // Renders the current keyboard state (layer, lock, caps, scroll, etc) + } else { + render_kyria_logo(); + } +} +#endif + +void encoder_update_user(uint8_t index, bool clockwise) { + if (IS_LAYER_ON(HOTKEYS)) { + if (clockwise) { + tap_code(KC_VOLD); + } else { + tap_code(KC_VOLU); + } + } else if (IS_LAYER_ON(TEXT)) { + if (clockwise) { + tap_code(KC_MS_WH_LEFT); + } else { + tap_code(KC_MS_WH_RIGHT); + } + } else if (IS_LAYER_ON(NUMBERS)) { + if (clockwise) { + tap_code16(G(KC_MINS)); + } else { + register_code(KC_LGUI); + tap_code(KC_EQL); + unregister_code(KC_LGUI); + } + } else { + if (clockwise) { + tap_code(KC_MS_WH_UP); + } else { + tap_code(KC_MS_WH_DOWN); + } + } +} diff --git a/keyboards/kyria/keymaps/jhelvy/rules.mk b/keyboards/kyria/keymaps/jhelvy/rules.mk new file mode 100644 index 000000000000..ec4c65f706b0 --- /dev/null +++ b/keyboards/kyria/keymaps/jhelvy/rules.mk @@ -0,0 +1,8 @@ +AUTO_SHIFT_ENABLE = yes # Autoshift by holding down a key +OLED_DRIVER_ENABLE = yes # Enables the use of OLED displays +ENCODER_ENABLE = yes # Enables the use of one or more encoders +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +LEADER_ENABLE = no # Enable the Leader Key feature +MOUSEKEY_ENABLE = yes +EXTRAKEY_ENABLE = yes +BACKLIGHT_ENABLE = no From b49c5a562d84aeefa331e450419a21bf9b61ea89 Mon Sep 17 00:00:00 2001 From: Salicylic-acid3 <46864619+Salicylic-acid3@users.noreply.github.com> Date: Mon, 27 Jul 2020 06:42:36 +0900 Subject: [PATCH 450/930] Added via support for 7sKB (#9799) * Added via support for 7sKB -Changing the VID -Add a keymap via * Update keyboards/7skb/keymaps/via/keymap.c Co-authored-by: Joel Challis * Update keyboards/7skb/rev1/config.h Co-authored-by: Ryan * Change of VID I got a new VID and I'm changing the VID. Co-authored-by: Joel Challis Co-authored-by: Ryan --- keyboards/7skb/keymaps/via/keymap.c | 92 ++++++++++++++++++++++++++++ keyboards/7skb/keymaps/via/readme.md | 3 + keyboards/7skb/keymaps/via/rules.mk | 1 + keyboards/7skb/rev1/config.h | 4 +- 4 files changed, 98 insertions(+), 2 deletions(-) create mode 100644 keyboards/7skb/keymaps/via/keymap.c create mode 100644 keyboards/7skb/keymaps/via/readme.md create mode 100644 keyboards/7skb/keymaps/via/rules.mk diff --git a/keyboards/7skb/keymaps/via/keymap.c b/keyboards/7skb/keymaps/via/keymap.c new file mode 100644 index 000000000000..7b0b76c76a50 --- /dev/null +++ b/keyboards/7skb/keymaps/via/keymap.c @@ -0,0 +1,92 @@ +#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 = 0, + _L1, + _L2, + _L3, +}; + +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_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, MO(_L1), + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| + KC_LALT, KC_LGUI, KC_SPC, KC_SPC, KC_SPC, KC_SPC, KC_RGUI, KC_RALT + //`---------------------------------------------| |--------------------------------------------' + ), + + [_L1] = LAYOUT( + //,-----------------------------------------------------| |--------------------------------------------------------------------------------. + TG(_L2), KC_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_PSCR, KC_SLCK,KC_PAUSE, KC_UP, _______, KC_BSPC, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------+--------| + _______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGUP, KC_LEFT,KC_RIGHT, _______, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| + _______, _______, _______, _______, _______, _______, _______, _______, KC_END, KC_PGDN, KC_DOWN, _______, _______, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| + _______, _______, _______, _______, _______, _______, KC_STOP, _______ + //`---------------------------------------------| |--------------------------------------------' + ), + + [_L2] = LAYOUT( /* Base */ + //,-----------------------------------------------------| |--------------------------------------------------------------------------------. + TG(_L2), 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, XXXXXXX, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------+--------| + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RGB_TOG, RGB_MOD, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RGB_VAD, RGB_VAI, RGB_HUD, RGB_HUI, RGB_SAD, RGB_SAI, XXXXXXX, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_STOP, XXXXXXX + //`---------------------------------------------| |--------------------------------------------' + ), + + [_L3] = LAYOUT( /* Base */ + //,-----------------------------------------------------| |--------------------------------------------------------------------------------. + XXXXXXX, 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, XXXXXXX, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------+--------| + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX + //`---------------------------------------------| |--------------------------------------------' + ) +}; + + +//A description for expressing the layer position in LED mode. +layer_state_t layer_state_set_user(layer_state_t state) { +#ifdef RGBLIGHT_ENABLE + switch (get_highest_layer(state)) { + case _L1: + rgblight_sethsv_at(HSV_BLUE, 0); + break; + case _L2: + rgblight_sethsv_at(HSV_RED, 0); + break; + case _L3: + rgblight_sethsv_at(HSV_PURPLE, 0); + break; + default: // for any other layers, or the default layer + rgblight_sethsv_at( 0, 0, 0, 0); + break; + } + rgblight_set_effect_range( 1, 5); +#endif +return state; +} diff --git a/keyboards/7skb/keymaps/via/readme.md b/keyboards/7skb/keymaps/via/readme.md new file mode 100644 index 000000000000..67c31de5c0ba --- /dev/null +++ b/keyboards/7skb/keymaps/via/readme.md @@ -0,0 +1,3 @@ +# The via keymap for 7sKB + +The basic keymap with full support for VIA Configurator diff --git a/keyboards/7skb/keymaps/via/rules.mk b/keyboards/7skb/keymaps/via/rules.mk new file mode 100644 index 000000000000..036bd6d1c3ec --- /dev/null +++ b/keyboards/7skb/keymaps/via/rules.mk @@ -0,0 +1 @@ +VIA_ENABLE = yes \ No newline at end of file diff --git a/keyboards/7skb/rev1/config.h b/keyboards/7skb/rev1/config.h index 808ec282ea59..f1e8b9dafd0f 100644 --- a/keyboards/7skb/rev1/config.h +++ b/keyboards/7skb/rev1/config.h @@ -19,8 +19,8 @@ along with this program. If not, see . #pragma once /* USB Device descriptor parameter */ -#define VENDOR_ID 0xFEED -#define PRODUCT_ID 0x36E1 +#define VENDOR_ID 0x04D8 +#define PRODUCT_ID 0xEB5F #define DEVICE_VER 0x0007 #define MANUFACTURER Salicylic_Acid #define PRODUCT 7skb From dfa3017c92db3f9eef240fbc8f06150a8c35c9c9 Mon Sep 17 00:00:00 2001 From: Dmitry Nosachev Date: Mon, 27 Jul 2020 00:44:50 +0300 Subject: [PATCH 451/930] [Keyboard] Add keyboard Zenith Z-150 (#9811) * z150 black pill * z150 docs * z150: json layout * Update keyboards/handwired/z150/keymaps/zyxx/keymap.c Co-authored-by: Joel Challis * Update keyboards/handwired/z150/rules.mk Co-authored-by: Joel Challis * Update keyboards/handwired/z150/rules.mk Co-authored-by: Joel Challis * Update keyboards/handwired/z150/z150.c Co-authored-by: Joel Challis * Update keyboards/handwired/z150/config.h Co-authored-by: Joel Challis * Delete bootloader_defs.h Useless file * Update keyboards/handwired/z150/readme.md Co-authored-by: Joel Challis Co-authored-by: Joel Challis --- keyboards/handwired/z150/chconf.h | 714 ++++++++++++++++++ keyboards/handwired/z150/config.h | 92 +++ keyboards/handwired/z150/halconf.h | 525 +++++++++++++ keyboards/handwired/z150/info.json | 12 + .../handwired/z150/keymaps/default/keymap.c | 39 + .../handwired/z150/keymaps/zyxx/keymap.c | 65 ++ keyboards/handwired/z150/mcuconf.h | 209 +++++ keyboards/handwired/z150/readme.md | 62 ++ keyboards/handwired/z150/rules.mk | 30 + keyboards/handwired/z150/z150.c | 39 + keyboards/handwired/z150/z150.h | 54 ++ 11 files changed, 1841 insertions(+) create mode 100644 keyboards/handwired/z150/chconf.h create mode 100644 keyboards/handwired/z150/config.h create mode 100644 keyboards/handwired/z150/halconf.h create mode 100644 keyboards/handwired/z150/info.json create mode 100644 keyboards/handwired/z150/keymaps/default/keymap.c create mode 100644 keyboards/handwired/z150/keymaps/zyxx/keymap.c create mode 100644 keyboards/handwired/z150/mcuconf.h create mode 100644 keyboards/handwired/z150/readme.md create mode 100644 keyboards/handwired/z150/rules.mk create mode 100644 keyboards/handwired/z150/z150.c create mode 100644 keyboards/handwired/z150/z150.h diff --git a/keyboards/handwired/z150/chconf.h b/keyboards/handwired/z150/chconf.h new file mode 100644 index 000000000000..f5e471640c56 --- /dev/null +++ b/keyboards/handwired/z150/chconf.h @@ -0,0 +1,714 @@ +/* + 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. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +/** + * @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. + * + * @addtogroup config + * @details Kernel related settings and hooks. + * @{ + */ + +#ifndef CHCONF_H +#define CHCONF_H + +#define _CHIBIOS_RT_CONF_ +#define _CHIBIOS_RT_CONF_VER_6_0_ + +/*===========================================================================*/ +/** + * @name System timers settings + * @{ + */ +/*===========================================================================*/ + +/** + * @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. + * @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. + */ +#if !defined(CH_CFG_ST_TIMEDELTA) +#define CH_CFG_ST_TIMEDELTA 0 +#endif + +/** @} */ + +/*===========================================================================*/ +/** + * @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. + */ +#if !defined(CH_CFG_TIME_QUANTUM) +#define CH_CFG_TIME_QUANTUM 0 +#endif + +/** + * @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. + */ +#if !defined(CH_CFG_MEMCORE_SIZE) +#define CH_CFG_MEMCORE_SIZE 0 +#endif + +/** + * @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. + */ +#if !defined(CH_CFG_NO_IDLE_THREAD) +#define CH_CFG_NO_IDLE_THREAD FALSE +#endif + +/** @} */ + +/*===========================================================================*/ +/** + * @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. + */ +#if !defined(CH_CFG_OPTIMIZE_SPEED) +#define CH_CFG_OPTIMIZE_SPEED TRUE +#endif + +/** @} */ + +/*===========================================================================*/ +/** + * @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. + */ +#if !defined(CH_CFG_USE_TM) +#define CH_CFG_USE_TM FALSE +#endif + +/** + * @brief Threads registry APIs. + * @details If enabled then the registry APIs are included in the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_REGISTRY) +#define CH_CFG_USE_REGISTRY TRUE +#endif + +/** + * @brief Threads synchronization APIs. + * @details If enabled then the @p chThdWait() function is included in + * the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_WAITEXIT) +#define CH_CFG_USE_WAITEXIT TRUE +#endif + +/** + * @brief Semaphores APIs. + * @details If enabled then the Semaphores APIs are included in the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_SEMAPHORES) +#define CH_CFG_USE_SEMAPHORES TRUE +#endif + +/** + * @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. + */ +#if !defined(CH_CFG_USE_SEMAPHORES_PRIORITY) +#define CH_CFG_USE_SEMAPHORES_PRIORITY FALSE +#endif + +/** + * @brief Mutexes APIs. + * @details If enabled then the mutexes APIs are included in the kernel. + * + * @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. + * @note Recursive mutexes are heavier and have an increased + * memory footprint. + * + * @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. + * @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. + */ +#if !defined(CH_CFG_USE_CONDVARS) +#define CH_CFG_USE_CONDVARS TRUE +#endif + +/** + * @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. + */ +#if !defined(CH_CFG_USE_CONDVARS_TIMEOUT) +#define CH_CFG_USE_CONDVARS_TIMEOUT FALSE +#endif + +/** + * @brief Events Flags APIs. + * @details If enabled then the event flags APIs are included in the kernel. + * + * @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. + * @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. + */ +#if !defined(CH_CFG_USE_EVENTS_TIMEOUT) +#define CH_CFG_USE_EVENTS_TIMEOUT TRUE +#endif + +/** + * @brief Synchronous Messages APIs. + * @details If enabled then the synchronous messages APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_MESSAGES) +#define CH_CFG_USE_MESSAGES TRUE +#endif + +/** + * @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. + */ +#if !defined(CH_CFG_USE_MESSAGES_PRIORITY) +#define CH_CFG_USE_MESSAGES_PRIORITY FALSE +#endif + +/** + * @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. + */ +#if !defined(CH_CFG_USE_MAILBOXES) +#define CH_CFG_USE_MAILBOXES TRUE +#endif + +/** + * @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. + */ +#if !defined(CH_CFG_USE_MEMCORE) +#define CH_CFG_USE_MEMCORE TRUE +#endif + +/** + * @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. + */ +#if !defined(CH_CFG_USE_HEAP) +#define CH_CFG_USE_HEAP TRUE +#endif + +/** + * @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. + */ +#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. + * @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. + */ +#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 + +/** @} */ + +/*===========================================================================*/ +/** + * @name Debug options + * @{ + */ +/*===========================================================================*/ + +/** + * @brief Debug option, kernel statistics. + * + * @note The default is @p FALSE. + */ +#if !defined(CH_DBG_STATISTICS) +#define CH_DBG_STATISTICS FALSE +#endif + +/** + * @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. + */ +#if !defined(CH_DBG_SYSTEM_STATE_CHECK) +#define CH_DBG_SYSTEM_STATE_CHECK FALSE +#endif + +/** + * @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. + */ +#if !defined(CH_DBG_ENABLE_CHECKS) +#define CH_DBG_ENABLE_CHECKS FALSE +#endif + +/** + * @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. + */ +#if !defined(CH_DBG_ENABLE_ASSERTS) +#define CH_DBG_ENABLE_ASSERTS FALSE +#endif + +/** + * @brief Debug option, trace buffer. + * @details If enabled then the trace buffer is activated. + * + * @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. + * @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. + */ +#if !defined(CH_DBG_ENABLE_STACK_CHECK) +#define CH_DBG_ENABLE_STACK_CHECK FALSE +#endif + +/** + * @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. + */ +#if !defined(CH_DBG_FILL_THREADS) +#define CH_DBG_FILL_THREADS FALSE +#endif + +/** + * @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. + */ +#if !defined(CH_DBG_THREADS_PROFILING) +#define CH_DBG_THREADS_PROFILING FALSE +#endif + +/** @} */ + +/*===========================================================================*/ +/** + * @name Kernel hooks + * @{ + */ +/*===========================================================================*/ + +/** + * @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. + */ +#define CH_CFG_THREAD_EXTRA_FIELDS \ + /* Add threads custom fields here.*/ + +/** + * @brief Threads initialization hook. + * @details User initialization code added to the @p _thread_init() function. + * + * @note It is invoked from within @p _thread_init() 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/handwired/z150/config.h b/keyboards/handwired/z150/config.h new file mode 100644 index 000000000000..ecdb7395447f --- /dev/null +++ b/keyboards/handwired/z150/config.h @@ -0,0 +1,92 @@ +/* +Copyright 2020 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 ALPS +#define PRODUCT Z150 +/* key matrix size */ +#define MATRIX_ROWS 11 +#define MATRIX_COLS 8 + +#define MATRIX_ROW_PINS { B13, B14, B15, A8, A9, A3, A10, A1, A2, A15, A0 } +#define MATRIX_COL_PINS { B11, B10, B1, B0, A7, A6, A5, A4 } +#define UNUSED_PINS + +#define NUM_LOCK_LED_PIN B5 +#define SCROLL_LOCK_LED_PIN B4 +#define CAPS_LOCK_LED_PIN B3 + +/* 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 + +/* + * 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 + +/* disable these deprecated features by default */ +#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/handwired/z150/halconf.h b/keyboards/handwired/z150/halconf.h new file mode 100644 index 000000000000..ff5ae7e8a5f6 --- /dev/null +++ b/keyboards/handwired/z150/halconf.h @@ -0,0 +1,525 @@ +/* + 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. + 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 + +#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 +#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 cryptographic subsystem. + */ +#if !defined(HAL_USE_CRY) || defined(__DOXYGEN__) +#define HAL_USE_CRY FALSE +#endif + +/** + * @brief Enables the DAC subsystem. + */ +#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 +#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 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 +#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 +#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 + +/** + * @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. */ +/*===========================================================================*/ + +/** + * @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 + +/** + * @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. */ +/*===========================================================================*/ + +/** + * @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 the zero-copy API. + */ +#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 + +/** + * @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. */ +/*===========================================================================*/ + +/** + * @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 16 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 256 bytes for both the transmission and receive + * buffers. + */ +#if !defined(SERIAL_USB_BUFFERS_SIZE) || defined(__DOXYGEN__) +#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 + +/*===========================================================================*/ +/* 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 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 +#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. */ +/*===========================================================================*/ + +/** + * @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 + +/*===========================================================================*/ +/* 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/z150/info.json b/keyboards/handwired/z150/info.json new file mode 100644 index 000000000000..d61908022252 --- /dev/null +++ b/keyboards/handwired/z150/info.json @@ -0,0 +1,12 @@ +{ + "keyboard_name": "z150", + "url": "", + "maintainer": "DmNosachev", + "width": 21.25, + "height": 5, + "layouts": { + "LAYOUT": { + "layout": [{"label":"F1", "x":0, "y":0}, {"label":"F2", "x":1, "y":0}, {"label":"Esc", "x":2.5, "y":0}, {"label":"!", "x":3.5, "y":0}, {"label":"@", "x":4.5, "y":0}, {"label":"#", "x":5.5, "y":0}, {"label":"$", "x":6.5, "y":0}, {"label":"%", "x":7.5, "y":0}, {"label":"^", "x":8.5, "y":0}, {"label":"&", "x":9.5, "y":0}, {"label":"*", "x":10.5, "y":0}, {"label":"(", "x":11.5, "y":0}, {"label":")", "x":12.5, "y":0}, {"label":"_", "x":13.5, "y":0}, {"label":"+", "x":14.5, "y":0}, {"label":"Backspace", "x":15.5, "y":0, "w":1.75}, {"label":"", "x":17.25, "y":0}, {"label":"", "x":18.25, "y":0, "w":1.5}, {"label":"", "x":19.75, "y":0, "w":1.5}, {"label":"F3", "x":0, "y":1}, {"label":"F4", "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":9, "y":1}, {"label":"U", "x":10, "y":1}, {"label":"I", "x":11, "y":1}, {"label":"O", "x":12, "y":1}, {"label":"P", "x":13, "y":1}, {"label":"{", "x":14, "y":1}, {"label":"}", "x":15, "y":1, "w":1.25}, {"label":"7", "x":17.25, "y":1}, {"label":"8", "x":18.25, "y":1}, {"label":"9", "x":19.25, "y":1}, {"label":"PrtSc", "x":20.25, "y":1}, {"label":"F5", "x":0, "y":2}, {"label":"F6", "x":1, "y":2}, {"label":"Ctrl", "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":9.25, "y":2}, {"label":"J", "x":10.25, "y":2}, {"label":"K", "x":11.25, "y":2}, {"label":"L", "x":12.25, "y":2}, {"label":":", "x":13.25, "y":2}, {"label":"\"", "x":14.25, "y":2}, {"label":"Enter", "x":15.25, "y":2, "w":2}, {"label":"4", "x":17.25, "y":2}, {"label":"5", "x":18.25, "y":2}, {"label":"6", "x":19.25, "y":2}, {"label":"\u0432\u0402\u201c", "x":20.25, "y":2}, {"label":"F7", "x":0, "y":3}, {"label":"F8", "x":1, "y":3}, {"label":"Shift", "x":2.5, "y":3, "w":2.25}, {"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":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":"Shift", "x":14.75, "y":3, "w":1.5}, {"label":"|", "x":16.25, "y":3}, {"label":"1", "x":17.25, "y":3}, {"label":"2", "x":18.25, "y":3}, {"label":"6", "x":19.25, "y":3}, {"label":"+", "x":20.25, "y":3, "h":2}, {"label":"F9", "x":0, "y":4}, {"label":"F10", "x":1, "y":4}, {"label":"Alt", "x":2.5, "y":4, "w":1.75}, {"label":"~", "x":4.25, "y":4}, {"x":5.25, "y":4, "w":9}, {"label":"CapsLock", "x":14.25, "y":4, "w":2}, {"label":"0", "x":16.25, "y":4, "w":2}, {"label":".", "x":18.25, "y":4, "w":2}] + } + } +} \ No newline at end of file diff --git a/keyboards/handwired/z150/keymaps/default/keymap.c b/keyboards/handwired/z150/keymaps/default/keymap.c new file mode 100644 index 000000000000..4df676185921 --- /dev/null +++ b/keyboards/handwired/z150/keymaps/default/keymap.c @@ -0,0 +1,39 @@ +/* Copyright 2020 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 + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +/* + * ,---------------------------------------------------------------------------------------------------------------------------. + * | F1 | F2 | Esc | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = |Backspace|NumLk| ScrLk | SysRQ | + * |---------------------------------------------------------------------------------------------------------------------------| + * | F3 | F4 | Tab | Q | W | E | R | T | Y | U | I | O | P | [ | ] | | 7 | 8 | 9 |PrnSc| + * |--------------------------------------------------------------------------------------------- ------------------------| + * | F5 | F6 | Ctrl | A | S | D | F | G | H | J | K | L | ;: | '" | Enter | 4 | 5 | 6 | - | + * |---------------------------------------------------------------------------------------------------------------------------| + * | F7 | F8 | Shift | Z | X | C | V | B | N | M | , | . | /? | Shift | |\ | 1 | 2 | 3 | + | + * |---------------------------------------------------------------------------------------------------------------------- | + * | F9 | F10 | Alt | ~` | Space | CapsLk | 0 Ins | . Del | | + * `---------------------------------------------------------------------------------------------------------------------------' +*/ + [0] = LAYOUT( + 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_SLCK, KC_PAUS, + 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_P7, KC_P8, KC_P9, KC_PSCR, + KC_F5, KC_F6, 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_P4, KC_P5, KC_P6, KC_PMNS, + 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_BSLS, KC_P1, KC_P2, KC_P3, KC_PPLS, + KC_F9, KC_F10,KC_LALT, KC_GRV, KC_SPC, KC_CAPS, KC_P0, KC_PDOT + ) +}; \ No newline at end of file diff --git a/keyboards/handwired/z150/keymaps/zyxx/keymap.c b/keyboards/handwired/z150/keymaps/zyxx/keymap.c new file mode 100644 index 000000000000..446f392203db --- /dev/null +++ b/keyboards/handwired/z150/keymaps/zyxx/keymap.c @@ -0,0 +1,65 @@ +/* Copyright 2020 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 +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +/* + * ,---------------------------------------------------------------------------------------------------------------------------. + * | F1 | F2 | Esc | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = |Backspace| ~` | ScrLk | FN1 | + * |---------------------------------------------------------------------------------------------------------------------------| + * | F3 | F4 | Tab | Q | W | E | R | T | Y | U | I | O | P | [ | ] | |Home | ↑ |PgUp |PrnSc| + * |--------------------------------------------------------------------------------------------- ------------------------| + * | F5 | F6 | Ctrl | A | S | D | F | G | H | J | K | L | ;: | '" | Enter | ← | ↓ | → | wh+ | + * |---------------------------------------------------------------------------------------------------------------------------| + * | F7 | F8 | Shift | Z | X | C | V | B | N | M | , | . | /? | Shift | |\ |End | |PgDn | wh- | + * |---------------------------------------------------------------------------------------------------------------------- | + * | F9 | F10 | Alt |FN1 | Space | Alt | Ins | Del | | + * `---------------------------------------------------------------------------------------------------------------------------' +*/ + [_BASE] = LAYOUT( + 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_GRV, KC_SLCK, MO(_FN1), + 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_HOME, KC_UP, KC_PGUP, KC_PSCR, + KC_F5, KC_F6, 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_LEFT, KC_DOWN, KC_RGHT, KC_WH_U, + 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_BSLS, KC_END, KC_NO, KC_PGDN, KC_WH_D, + KC_F9, KC_F10,KC_LALT, MO(_FN1), KC_SPC, KC_RALT, KC_INS, KC_DEL + ), +/* + * ,---------------------------------------------------------------------------------------------------------------------------. + * |reset| | | F11 | F12 | au+ | au- | clk | clk+| clk-| clkr| | | | | Delete |NumLk| / | FN1 | + * |---------------------------------------------------------------------------------------------------------------------------| + * | | | | | mlb | m↑ | mrb | | | | | | | | | | 7 | 8 | 9 | * | + * |--------------------------------------------------------------------------------------------- ------------------------| + * | | | | | m← | m↓ | m→ | | | | | | | | | 4 | 5 | 6 | - | + * |---------------------------------------------------------------------------------------------------------------------------| + * | | | | | | | | | | | | | | | | 1 | 2 | 3 | + | + * |---------------------------------------------------------------------------------------------------------------------- | + * | | | |FN1 | | CapsLock| 0 Ins | . Del | | + * `---------------------------------------------------------------------------------------------------------------------------' +*/ + [_FN1] = LAYOUT( + RESET, _______, _______, KC_F11, KC_F12, AU_ON, AU_OFF, CK_TOGG, CK_UP, CK_DOWN, CK_RST, _______, _______, _______, _______, KC_DEL, KC_NLCK, KC_PSLS, _______, + _______, _______, _______, _______, KC_BTN1, KC_MS_U, KC_BTN2, _______, _______, _______, _______, _______, _______, _______, _______, KC_P7, KC_P8, KC_P9, KC_PAST, + _______, _______, _______ , _______, KC_MS_L, KC_MS_D, KC_MS_R, _______, _______, _______, _______, _______, _______, _______, _______, KC_P4, KC_P5, KC_P6, KC_PMNS, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_P1, KC_P2, KC_P3, KC_PPLS, + _______, _______, _______, _______, _______, KC_CAPS, KC_P0, KC_PDOT + ) +}; diff --git a/keyboards/handwired/z150/mcuconf.h b/keyboards/handwired/z150/mcuconf.h new file mode 100644 index 000000000000..60d9931c3536 --- /dev/null +++ b/keyboards/handwired/z150/mcuconf.h @@ -0,0 +1,209 @@ +/* + 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_ + +#define STM32F103_MCUCONF + +/* + * STM32F103 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: + * 15...0 Lowest...Highest. + * + * DMA priorities: + * 0...3 Lowest...Highest. + */ + +/* + * HAL driver system settings. + */ +#define STM32_NO_INIT FALSE +#define STM32_HSI_ENABLED TRUE +#define STM32_LSI_ENABLED FALSE +#define STM32_HSE_ENABLED TRUE +#define STM32_LSE_ENABLED FALSE +#define STM32_SW STM32_SW_PLL +#define STM32_PLLSRC STM32_PLLSRC_HSE +#define STM32_PLLXTPRE STM32_PLLXTPRE_DIV1 +#define STM32_PLLMUL_VALUE 9 +#define STM32_HPRE STM32_HPRE_DIV1 +#define STM32_PPRE1 STM32_PPRE1_DIV2 +#define STM32_PPRE2 STM32_PPRE2_DIV2 +#define STM32_ADCPRE STM32_ADCPRE_DIV4 +#define STM32_USB_CLOCK_REQUIRED TRUE +#define STM32_USBPRE STM32_USBPRE_DIV1P5 +#define STM32_MCOSEL STM32_MCOSEL_NOCLOCK +#define STM32_RTCSEL STM32_RTCSEL_HSEDIV +#define STM32_PVD_ENABLE FALSE +#define STM32_PLS STM32_PLS_LEV0 + +/* + * ADC driver system settings. + */ +#define STM32_ADC_USE_ADC1 FALSE +#define STM32_ADC_ADC1_DMA_PRIORITY 2 +#define STM32_ADC_ADC1_IRQ_PRIORITY 6 + +/* + * CAN driver system settings. + */ +#define STM32_CAN_USE_CAN1 FALSE +#define STM32_CAN_CAN1_IRQ_PRIORITY 11 + +/* + * 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 + +/* + * 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_TIM4 FALSE +#define STM32_GPT_USE_TIM5 FALSE +#define STM32_GPT_USE_TIM8 FALSE +#define STM32_GPT_TIM1_IRQ_PRIORITY 7 +#define STM32_GPT_TIM2_IRQ_PRIORITY 7 +#define STM32_GPT_TIM3_IRQ_PRIORITY 7 +#define STM32_GPT_TIM4_IRQ_PRIORITY 7 +#define STM32_GPT_TIM5_IRQ_PRIORITY 7 +#define STM32_GPT_TIM8_IRQ_PRIORITY 7 + +/* + * 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 5 +#define STM32_I2C_I2C2_IRQ_PRIORITY 5 +#define STM32_I2C_I2C1_DMA_PRIORITY 3 +#define STM32_I2C_I2C2_DMA_PRIORITY 3 +#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_USE_TIM4 FALSE +#define STM32_ICU_USE_TIM5 FALSE +#define STM32_ICU_USE_TIM8 FALSE +#define STM32_ICU_TIM1_IRQ_PRIORITY 7 +#define STM32_ICU_TIM2_IRQ_PRIORITY 7 +#define STM32_ICU_TIM3_IRQ_PRIORITY 7 +#define STM32_ICU_TIM4_IRQ_PRIORITY 7 +#define STM32_ICU_TIM5_IRQ_PRIORITY 7 +#define STM32_ICU_TIM8_IRQ_PRIORITY 7 + +/* + * 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_USE_TIM4 TRUE +#define STM32_PWM_USE_TIM5 FALSE +#define STM32_PWM_USE_TIM8 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_TIM5_IRQ_PRIORITY 7 +#define STM32_PWM_TIM8_IRQ_PRIORITY 7 + +/* + * RTC driver system settings. + */ +#define STM32_RTC_IRQ_PRIORITY 15 + +/* + * SERIAL driver system settings. + */ +#define STM32_SERIAL_USE_USART1 FALSE +#define STM32_SERIAL_USE_USART2 FALSE +#define STM32_SERIAL_USE_USART3 FALSE +#define STM32_SERIAL_USE_UART4 FALSE +#define STM32_SERIAL_USE_UART5 FALSE +#define STM32_SERIAL_USART1_PRIORITY 12 +#define STM32_SERIAL_USART2_PRIORITY 12 +#define STM32_SERIAL_USART3_PRIORITY 12 +#define STM32_SERIAL_UART4_PRIORITY 12 +#define STM32_SERIAL_UART5_PRIORITY 12 + +/* + * SPI driver system settings. + */ +#define STM32_SPI_USE_SPI1 FALSE +#define STM32_SPI_USE_SPI2 FALSE +#define STM32_SPI_USE_SPI3 FALSE +#define STM32_SPI_SPI1_DMA_PRIORITY 1 +#define STM32_SPI_SPI2_DMA_PRIORITY 1 +#define STM32_SPI_SPI3_DMA_PRIORITY 1 +#define STM32_SPI_SPI1_IRQ_PRIORITY 10 +#define STM32_SPI_SPI2_IRQ_PRIORITY 10 +#define STM32_SPI_SPI3_IRQ_PRIORITY 10 +#define STM32_SPI_DMA_ERROR_HOOK(spip) osalSysHalt("DMA failure") + +/* + * ST driver system settings. + */ +#define STM32_ST_IRQ_PRIORITY 8 +#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_USE_USART3 FALSE +#define STM32_UART_USART1_IRQ_PRIORITY 12 +#define STM32_UART_USART2_IRQ_PRIORITY 12 +#define STM32_UART_USART3_IRQ_PRIORITY 12 +#define STM32_UART_USART1_DMA_PRIORITY 0 +#define STM32_UART_USART2_DMA_PRIORITY 0 +#define STM32_UART_USART3_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_HP_IRQ_PRIORITY 13 +#define STM32_USB_USB1_LP_IRQ_PRIORITY 14 + +#endif /* _MCUCONF_H_ */ \ No newline at end of file diff --git a/keyboards/handwired/z150/readme.md b/keyboards/handwired/z150/readme.md new file mode 100644 index 000000000000..a1f0bef8f72c --- /dev/null +++ b/keyboards/handwired/z150/readme.md @@ -0,0 +1,62 @@ +# QMK-based firmware for Zenith Z-150 keyboard + +![Z-150](https://imgur.com/jayyyvJ.jpg) + +Zenith Z-150 keyboard conversion project: direct connection of Black Pill to the matrix. + +* Keyboard Maintainer: [DmNosachev](https://github.com/DmNosachev) +* Hardware Supported: [Zenith Z-150 keyboard, 100-1860 version with white logo](https://deskthority.net/wiki/Zenith_Z-150), Black Pill STM32F103C8T6 MCU board. Alternatevely you can use any MCU which is supported by QMK and has 22 or more IO pins: Arduino Micro, Teensy 2.0, Teensy 2.0++, Blue Pill, etc. + +Earlier 100-1886 version with black logo has different PCB. + +Make example for this keyboard (after setting up your build environment): + + make handwired/z150: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 + +Z-150 has 11x8 matrix. It's ghost-free thanks to the diodes. + +Columns are located under NEC D8049HC MCU IC: +![Z-150 columns](https://imgur.com/XiOsrnh.jpg) + +Rows are connected to unmarked 24-pin MUX IC: +![Z-150 rows](https://imgur.com/Wu8rHY0.jpg) + +## LEDs + +LEDs (from left to right): NumLock, CapsLock, ScrollLock: +![Z-150 LED cathodes](https://imgur.com/MO5NLlZ.jpg) + +Their anodes are connected to VCC through 220Ω resistors. +![Z-150 LED anodes](https://imgur.com/w1MfjRN.jpg) + +You can keep the original resistors, but with Black Pill or any other 3.3V controller the LEDs may seem a little dim. Try 150Ω or close value if you want to fix that. + + +## Black Pill +Suggested mount position for the Black Pill (view from the bottom side of the PCB): + +``` + R0 R1 R2 R3 R4 R6 R9 LC LN LS +,--------------------------------------------------------------------, +|B12 B13 B14 B15 A8 A9 A10 A11 A12 A15 B3 B4 B5 B6 B7 3V3 GND |---, +| |USB| +|B11 B10 B1 B0 A7 A6 A5 A4 A3 A2 A1 A0 RST C13 B9 B8 GND |---' +'--------------------------------------------------------------------' + C0 C1 C2 C3 C4 C5 C6 C7 R5 R8 R7 RA +``` + + +1. Desolder all ICs, crystal oscillator, capacitors and resistors except R0–R2 (they connect LEDs to VCC). +1. Solder 12-pin header to the Black Pill (pins B11–A0 on the left side). +2. Solder two 3-pin headers for boot jumpers. +3. Solder 4-pin SWD header. +4. Burn [STM32duino bootloader](https://github.com/rogerclarkmelbourne/STM32duino-bootloader/blob/master/bootloader_only_binaries/generic_boot20_pb12.bin) to Black Pill. +5. Compile and flash the firmware: `make handwired/z150:default:flash` +5. Align Black Pill pins B11–A4 with columns 0–7 and solder them. +6. Connect rows, LEDs, ground and VCC traces to the corresponding pins of the BlackPill using additional wires. diff --git a/keyboards/handwired/z150/rules.mk b/keyboards/handwired/z150/rules.mk new file mode 100644 index 000000000000..08bd7908eb5d --- /dev/null +++ b/keyboards/handwired/z150/rules.mk @@ -0,0 +1,30 @@ +MCU = STM32F103 + +# GENERIC STM32F103C8T6 board - stm32duino bootloader +OPT_DEFS = -DCORTEX_VTOR_INIT=0x2000 +MCU_LDSCRIPT = STM32F103x8_stm32duino_bootloader +BOARD = STM32_F103_STM32DUINO +STM32_BOOTLOADER_ADDRESS = 0x80000000 + +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 + +# 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 +BLUETOOTH_ENABLE = no # Enable Bluetooth +AUDIO_ENABLE = no # Audio output diff --git a/keyboards/handwired/z150/z150.c b/keyboards/handwired/z150/z150.c new file mode 100644 index 000000000000..cf49c87ef052 --- /dev/null +++ b/keyboards/handwired/z150/z150.c @@ -0,0 +1,39 @@ +/* Copyright 2020 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 "z150.h" + +void matrix_init_kb(void) { + setPinOutput(NUM_LOCK_LED_PIN); + setPinOutput(CAPS_LOCK_LED_PIN); + setPinOutput(SCROLL_LOCK_LED_PIN); + + writePinLow(NUM_LOCK_LED_PIN); + writePinLow(CAPS_LOCK_LED_PIN); + writePinLow(SCROLL_LOCK_LED_PIN); + + matrix_init_user(); +} + +bool led_update_kb(led_t led_state) { + bool res = led_update_user(led_state); + if(res) { + writePin(NUM_LOCK_LED_PIN, !led_state.num_lock); + writePin(CAPS_LOCK_LED_PIN, !led_state.caps_lock); + writePin(SCROLL_LOCK_LED_PIN, !led_state.scroll_lock); + } + return res; +} diff --git a/keyboards/handwired/z150/z150.h b/keyboards/handwired/z150/z150.h new file mode 100644 index 000000000000..1a1c89f32b81 --- /dev/null +++ b/keyboards/handwired/z150/z150.h @@ -0,0 +1,54 @@ +/* Copyright 2020 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" + +/* readability */ +#define XXX 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( \ + K35, K34, KA7, KA6, KA5, KA4, KA3, KA2, KA1, KA0, K97, K96, K95, K94, K93, K92, K57, K23, K22, \ + K33, K32, K91, K90, K87, K86, K85, K84, K83, K82, K81, K80, K77, K76, K75, K21, K20, K17, K16, \ + K31, K30, K73, K72, K71, K70, K67, K66, K65, K64, K63, K62, K61, K60, K74, K15, K14, K13, K12, \ + K26, K27, K56, K54, K53, K52, K51, K50, K47, K46, K45, K44, K43, K42, K41, K11, K10, K07, K04, \ + K24, K25, K40, K55, K37, K36, K06, K05 \ +) \ +{ \ +/* 0 */ { XXX, XXX, XXX, XXX, K04, K05, K06, K07 }, \ +/* 1 */ { K10, K11, K12, K13, K14, K15, K16, K17 }, \ +/* 2 */ { K20, K21, K22, K23, K24, K25, K26, K27 }, \ +/* 3 */ { K30, K31, K32, K33, K34, K35, K36, K37 }, \ +/* 4 */ { K40, K41, K42, K43, K44, K45, K46, K47 }, \ +/* 5 */ { K50, K51, K52, K53, K54, K55, K56, K57 }, \ +/* 6 */ { K60, K61, K62, K63, K64, K65, K66, K67 }, \ +/* 7 */ { K70, K71, K72, K73, K74, K75, K76, K77 }, \ +/* 8 */ { K80, K81, K82, K83, K84, K85, K86, K87 }, \ +/* 9 */ { K90, K91, K92, K93, K94, K95, K96, K97 }, \ +/* A */ { KA0, KA1, KA2, KA3, KA4, KA5, KA6, KA7 } \ +} +/* 0 1 2 3 4 5 6 7 */ + From d939f1041bc0b703ecb8afc6872523d5394b5463 Mon Sep 17 00:00:00 2001 From: CalciumNitride <46911478+CalciumNitride@users.noreply.github.com> Date: Mon, 27 Jul 2020 17:15:49 +0800 Subject: [PATCH 452/930] Fix Arabica37's default RGBLED NUM (#9797) * adding arabica37 * jp_keymap * update * try refactor to use split_common * fix and update to use split_common * update and adjust * clean up * update * update * fix keymap.c * update * oled logo * fix info.json * remove pro_micro.h * remove KC_ macro * move font file * fix led num --- keyboards/arabica37/keymaps/default/config.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/keyboards/arabica37/keymaps/default/config.h b/keyboards/arabica37/keymaps/default/config.h index f12534c90271..d3b1aef4c635 100644 --- a/keyboards/arabica37/keymaps/default/config.h +++ b/keyboards/arabica37/keymaps/default/config.h @@ -33,7 +33,7 @@ along with this program. If not, see . #undef RGBLED_NUM #define RGBLIGHT_ANIMATIONS -#define RGBLED_NUM 27 +#define RGBLED_NUM 50 #define RGBLIGHT_LIMIT_VAL 120 #define RGBLIGHT_HUE_STEP 10 #define RGBLIGHT_SAT_STEP 17 From 1ef5c639ceac5062b174f2b43225749b0123ca8b Mon Sep 17 00:00:00 2001 From: kakunpc <15257475+kakunpc@users.noreply.github.com> Date: Mon, 27 Jul 2020 18:37:00 +0900 Subject: [PATCH 453/930] Changed the VID/PID for choc_taro keyboards. (#9800) --- keyboards/choc_taro/config.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/keyboards/choc_taro/config.h b/keyboards/choc_taro/config.h index 4ccc686a6624..acd11bf3bd51 100644 --- a/keyboards/choc_taro/config.h +++ b/keyboards/choc_taro/config.h @@ -19,9 +19,10 @@ along with this program. If not, see . #include "config_common.h" -/* USB Device descriptor parameter */ -#define VENDOR_ID 0xDCED -#define PRODUCT_ID 0x71CC +/* USB Device descriptor parameter + VID & PID are lisenced from microchip sublisence program, Don't use other project! */ +#define VENDOR_ID 0x04D8 +#define PRODUCT_ID 0xEB60 #define DEVICE_VER 0x0001 #define MANUFACTURER kakunpc #define PRODUCT choc_taro From c3a9c8c177b0739bd108f0b2079ee87b8cad27ab Mon Sep 17 00:00:00 2001 From: Josh Hinnebusch Date: Mon, 27 Jul 2020 05:57:57 -0400 Subject: [PATCH 454/930] update sm68 matrix, add via support (#9741) Co-authored-by: Ryan Co-authored-by: hineybush --- .../hineybush/sm68/keymaps/default/config.h | 19 -------- .../hineybush/sm68/keymaps/default/keymap.c | 2 +- keyboards/hineybush/sm68/keymaps/via/keymap.c | 47 +++++++++++++++++++ .../hineybush/sm68/keymaps/via/readme.md | 1 + keyboards/hineybush/sm68/keymaps/via/rules.mk | 1 + keyboards/hineybush/sm68/sm68.h | 12 ++--- 6 files changed, 56 insertions(+), 26 deletions(-) delete mode 100644 keyboards/hineybush/sm68/keymaps/default/config.h create mode 100644 keyboards/hineybush/sm68/keymaps/via/keymap.c create mode 100644 keyboards/hineybush/sm68/keymaps/via/readme.md create mode 100644 keyboards/hineybush/sm68/keymaps/via/rules.mk diff --git a/keyboards/hineybush/sm68/keymaps/default/config.h b/keyboards/hineybush/sm68/keymaps/default/config.h deleted file mode 100644 index 89865cef3527..000000000000 --- a/keyboards/hineybush/sm68/keymaps/default/config.h +++ /dev/null @@ -1,19 +0,0 @@ -/* 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 - -// place overrides here diff --git a/keyboards/hineybush/sm68/keymaps/default/keymap.c b/keyboards/hineybush/sm68/keymaps/default/keymap.c index 3d0a1a4e9711..d7b3261775f2 100644 --- a/keyboards/hineybush/sm68/keymaps/default/keymap.c +++ b/keyboards/hineybush/sm68/keymaps/default/keymap.c @@ -30,7 +30,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT ), [_FN] = LAYOUT_68_ansi_split_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, RGB_TOG, RGB_MOD, + 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, RGB_TOG, RGB_MOD, 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_CAPS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 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/sm68/keymaps/via/keymap.c b/keyboards/hineybush/sm68/keymaps/via/keymap.c new file mode 100644 index 000000000000..cbfaae4d9cb7 --- /dev/null +++ b/keyboards/hineybush/sm68/keymaps/via/keymap.c @@ -0,0 +1,47 @@ +/* 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, + _FN2 +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_BASE] = LAYOUT_68_ansi_split_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_BSPC, 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_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(1), KC_UP, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT + ), + [_FN] = LAYOUT_68_ansi_split_rshift( + 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, RGB_TOG, RGB_MOD, + 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_CAPS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 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_68_ansi_split_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, KC_TRNS, KC_TRNS + ) +}; diff --git a/keyboards/hineybush/sm68/keymaps/via/readme.md b/keyboards/hineybush/sm68/keymaps/via/readme.md new file mode 100644 index 000000000000..93e99290dfed --- /dev/null +++ b/keyboards/hineybush/sm68/keymaps/via/readme.md @@ -0,0 +1 @@ +# The via keymap for sm68 diff --git a/keyboards/hineybush/sm68/keymaps/via/rules.mk b/keyboards/hineybush/sm68/keymaps/via/rules.mk new file mode 100644 index 000000000000..1e5b99807cb7 --- /dev/null +++ b/keyboards/hineybush/sm68/keymaps/via/rules.mk @@ -0,0 +1 @@ +VIA_ENABLE = yes diff --git a/keyboards/hineybush/sm68/sm68.h b/keyboards/hineybush/sm68/sm68.h index 81d25c12fa5d..23270d4a3bd4 100644 --- a/keyboards/hineybush/sm68/sm68.h +++ b/keyboards/hineybush/sm68/sm68.h @@ -37,9 +37,9 @@ { \ { 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, KC_NO}, \ - { k300, k301, k302, k303, k304, k305, k306, k307, k308, k309, k310, k311, k312, KC_NO, k314, KC_NO}, \ - { k400, k401, k402, KC_NO,k404,KC_NO, KC_NO,k408, k409, k410, KC_NO, KC_NO, KC_NO,k413, k414, k415} \ + { k200, k201, k202, k203, k204, k205, k206, k207, k208, k209, k210, k211, k212, k213, KC_NO,KC_NO}, \ + { k300, k301, k302, k303, k304, k305, k306, k307, k308, k309, k310, k311, k312, KC_NO,k314, KC_NO}, \ + { k400, k401, k402, KC_NO,k404,KC_NO, KC_NO,KC_NO,k408, k409, k410, KC_NO, KC_NO,k413,k414, k415} \ } // full backspace @@ -53,7 +53,7 @@ { \ { k000, k001, k002, k003, k004, k005, k006, k007, k008, k009, k010, k011, k012,KC_NO, 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, KC_NO}, \ - { k300, k301, k302, k303, k304, k305, k306, k307, k308, k309, k310, k311, k312, KC_NO, k314, KC_NO}, \ - { k400, k401, k402, KC_NO,k404,KC_NO, KC_NO,k408, k409, k410, KC_NO, KC_NO, KC_NO,k413, k414, k415} \ + { k200, k201, k202, k203, k204, k205, k206, k207, k208, k209, k210, k211, k212, k213, KC_NO,KC_NO}, \ + { k300, k301, k302, k303, k304, k305, k306, k307, k308, k309, k310, k311, k312, KC_NO,k314, KC_NO}, \ + { k400, k401, k402, KC_NO,k404,KC_NO, KC_NO,KC_NO,k408, k409, k410, KC_NO,KC_NO,k413, k414, k415} \ } From 245d355176d6e10b448e14de495d1418e7ddb8de Mon Sep 17 00:00:00 2001 From: kaylanm <1063516+kaylanm@users.noreply.github.com> Date: Mon, 27 Jul 2020 05:58:43 -0400 Subject: [PATCH 455/930] Add via keymap for kbdfans/kbdpad_mk2. (#9829) --- .../kbdfans/kbdpad_mk2/keymaps/via/keymap.c | 52 +++++++++++++++++++ .../kbdfans/kbdpad_mk2/keymaps/via/rules.mk | 2 + 2 files changed, 54 insertions(+) create mode 100644 keyboards/kbdfans/kbdpad_mk2/keymaps/via/keymap.c create mode 100644 keyboards/kbdfans/kbdpad_mk2/keymaps/via/rules.mk diff --git a/keyboards/kbdfans/kbdpad_mk2/keymaps/via/keymap.c b/keyboards/kbdfans/kbdpad_mk2/keymaps/via/keymap.c new file mode 100644 index 000000000000..20c048c11135 --- /dev/null +++ b/keyboards/kbdfans/kbdpad_mk2/keymaps/via/keymap.c @@ -0,0 +1,52 @@ +/* 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_ortho_6x4( /* Base */ + KC_ESC, KC_LCTL, KC_LALT, KC_BSPC, + 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( + _______, _______, _______, _______, + _______, _______, _______, _______, + _______, _______, _______, _______, + _______, _______, _______, _______, + _______, _______, _______, _______, + _______, _______, _______, _______ + ), + [2] = LAYOUT_ortho_6x4( + _______, _______, _______, _______, + _______, _______, _______, _______, + _______, _______, _______, _______, + _______, _______, _______, _______, + _______, _______, _______, _______, + _______, _______, _______, _______ + ), + [3] = LAYOUT_ortho_6x4( + _______, _______, _______, _______, + _______, _______, _______, _______, + _______, _______, _______, _______, + _______, _______, _______, _______, + _______, _______, _______, _______, + _______, _______, _______, _______ + ), +}; diff --git a/keyboards/kbdfans/kbdpad_mk2/keymaps/via/rules.mk b/keyboards/kbdfans/kbdpad_mk2/keymaps/via/rules.mk new file mode 100644 index 000000000000..36b7ba9cbc98 --- /dev/null +++ b/keyboards/kbdfans/kbdpad_mk2/keymaps/via/rules.mk @@ -0,0 +1,2 @@ +VIA_ENABLE = yes +LTO_ENABLE = yes From f0926f6c2adfc513d3f5c58557827d57d92c9371 Mon Sep 17 00:00:00 2001 From: Rys Sommefeldt Date: Mon, 27 Jul 2020 10:59:36 +0100 Subject: [PATCH 456/930] [keymap] Update rys keymap with 5th semi-secure token and remap layer 1 (#9822) --- keyboards/wilba_tech/wt8_a/keymaps/rys/keymap.c | 16 +++++++++++----- keyboards/wilba_tech/wt8_a/keymaps/rys/rules.mk | 2 ++ 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/keyboards/wilba_tech/wt8_a/keymaps/rys/keymap.c b/keyboards/wilba_tech/wt8_a/keymaps/rys/keymap.c index bf0dda0fa8dc..f0a6edc0b805 100644 --- a/keyboards/wilba_tech/wt8_a/keymaps/rys/keymap.c +++ b/keyboards/wilba_tech/wt8_a/keymaps/rys/keymap.c @@ -11,7 +11,8 @@ enum rys_keycodes { STOKEN1 = SAFE_RANGE, STOKEN2, STOKEN3, - STOKEN4 + STOKEN4, + STOKEN5, }; bool process_record_user(uint16_t keycode, keyrecord_t *record) { @@ -36,6 +37,11 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { SEND_STRING(RYS_STOKEN4); } break; + case STOKEN5: + if (record->event.pressed) { + SEND_STRING(RYS_STOKEN5); + } + break; } return true; }; @@ -45,22 +51,22 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * ,---------------------------. * | ST1 | ST2 | ST3 | ST4 | * |---------------------------| - * | | LOCK | VOL- | VOL+ | + * |MO(1) | LOCK | VOL- | VOL+ | * `---------------------------' */ [_BL0] = LAYOUT( STOKEN1, STOKEN2, STOKEN3, STOKEN4, - _______, MACOSLK, KC__VOLDOWN, KC__VOLUP), + MO(_FL1), MACOSLK, KC__VOLDOWN, KC__VOLUP), /* Keymap base layer (_FL1) - function layer 1 * ,---------------------------. * | | | | | * |---------------------------| - * | | | | | + * | | ST5 | \ | RST | * `---------------------------' */ [_FL1] = LAYOUT( _______, _______, _______, _______, - _______, _______, _______, _______), + _______, STOKEN5, KC_NUBS, RESET), /* Keymap base layer (_FL2) - function layer 2 * ,---------------------------. * | | | | | diff --git a/keyboards/wilba_tech/wt8_a/keymaps/rys/rules.mk b/keyboards/wilba_tech/wt8_a/keymaps/rys/rules.mk index 60cbf8bfc4b6..ea22dca6cb6e 100644 --- a/keyboards/wilba_tech/wt8_a/keymaps/rys/rules.mk +++ b/keyboards/wilba_tech/wt8_a/keymaps/rys/rules.mk @@ -2,8 +2,10 @@ RYS_STOKEN1 = "$(shell security find-generic-password -a qmk -s wt8a-1 -w)" RYS_STOKEN2 = "$(shell security find-generic-password -a qmk -s wt8a-2 -w)" RYS_STOKEN3 = "$(shell security find-generic-password -a qmk -s wt8a-3 -w)" RYS_STOKEN4 = "$(shell security find-generic-password -a qmk -s wt8a-4 -w)" +RYS_STOKEN5 = "$(shell security find-generic-password -a qmk -s wt8a-5 -w)" CFLAGS += -DRYS_STOKEN1=\"$(RYS_STOKEN1)\" CFLAGS += -DRYS_STOKEN2=\"$(RYS_STOKEN2)\" CFLAGS += -DRYS_STOKEN3=\"$(RYS_STOKEN3)\" CFLAGS += -DRYS_STOKEN4=\"$(RYS_STOKEN4)\" +CFLAGS += -DRYS_STOKEN5=\"$(RYS_STOKEN5)\" \ No newline at end of file From 776b0bd2c921b4e479f48c6f83b1e697269355ac Mon Sep 17 00:00:00 2001 From: codecoffeecode Date: Mon, 27 Jul 2020 03:00:10 -0700 Subject: [PATCH 457/930] [keymap] Adding personal keymap for Gingham (#9828) --- .../gingham/keymaps/codecoffeecode/keymap.c | 48 +++++++++++++++++++ .../gingham/keymaps/codecoffeecode/readme.md | 1 + 2 files changed, 49 insertions(+) create mode 100644 keyboards/gingham/keymaps/codecoffeecode/keymap.c create mode 100644 keyboards/gingham/keymaps/codecoffeecode/readme.md diff --git a/keyboards/gingham/keymaps/codecoffeecode/keymap.c b/keyboards/gingham/keymaps/codecoffeecode/keymap.c new file mode 100644 index 000000000000..ef9ec2f875a0 --- /dev/null +++ b/keyboards/gingham/keymaps/codecoffeecode/keymap.c @@ -0,0 +1,48 @@ +/* Copyright codecoffeecode + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public 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 + +//This is the ANSI version of the PCB + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +[0] = LAYOUT_60_ansi_split_bs_rshift( /* 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_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(2), + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1) , KC_APP, KC_RCTL), + +[1] = LAYOUT_60_ansi_split_bs_rshift( /* 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_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, RESET, 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, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_VOLU, KC_VOLD, KC_MUTE, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), + +[2] = LAYOUT_60_ansi_split_bs_rshift( /* 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), + +[3] = LAYOUT_60_ansi_split_bs_rshift( /* 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), +}; diff --git a/keyboards/gingham/keymaps/codecoffeecode/readme.md b/keyboards/gingham/keymaps/codecoffeecode/readme.md new file mode 100644 index 000000000000..6f6dbfc859a4 --- /dev/null +++ b/keyboards/gingham/keymaps/codecoffeecode/readme.md @@ -0,0 +1 @@ +### Single backspace with a short right shift. \ No newline at end of file From 98f4cb4f87b1c026713015142c686ebd78fea08f Mon Sep 17 00:00:00 2001 From: Ryan Date: Mon, 27 Jul 2020 21:22:14 +1000 Subject: [PATCH 458/930] Fix Squiggle info.json (#9841) --- keyboards/squiggle/rev1/info.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/keyboards/squiggle/rev1/info.json b/keyboards/squiggle/rev1/info.json index 76f2c0af2714..2bb974c7ad27 100644 --- a/keyboards/squiggle/rev1/info.json +++ b/keyboards/squiggle/rev1/info.json @@ -93,7 +93,7 @@ {"label":"/", "x":9, "y":2.9}, {"label":"ent/alt", "x":5, "y":3.65, "h":2}, - {"label":"spc", "x":6, "y":3.6, "h":2} + {"label":"spc", "x":6, "y":3.6, "h":2}, {"label":"raise", "x":7, "y":3.6, "h":2} ] }, @@ -141,7 +141,7 @@ {"label":"/", "x":9, "y":2.9}, {"label":"ent/alt", "x":5, "y":3.65, "h":2}, - {"label":"spc", "x":6, "y":3.6, "h":2} + {"label":"spc", "x":6, "y":3.6, "h":2}, {"label":"tab", "x":5, "y":4.65, "h":2}, {"label":"raise", "x":6, "y":4.6, "h":2} ] From 463c97f4c690ae3c0463965648fb4f565305ef74 Mon Sep 17 00:00:00 2001 From: umi <57262844+umi-umi@users.noreply.github.com> Date: Mon, 27 Jul 2020 20:31:19 +0900 Subject: [PATCH 459/930] [Docs] Japanese translation of docs/feature_stenography.md (#9525) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * add feature_stenography.md translation * update based on comment * Update docs/ja/feature_stenography.md Co-authored-by: shela * Update docs/ja/feature_stenography.md ご指摘ありがとうございます。 「速記プロトコル」で更新しました。 Co-authored-by: s-show Co-authored-by: shela Co-authored-by: s-show --- docs/ja/feature_stenography.md | 136 +++++++++++++++++++++++++++++++++ 1 file changed, 136 insertions(+) create mode 100644 docs/ja/feature_stenography.md diff --git a/docs/ja/feature_stenography.md b/docs/ja/feature_stenography.md new file mode 100644 index 000000000000..faed0ee1bb39 --- /dev/null +++ b/docs/ja/feature_stenography.md @@ -0,0 +1,136 @@ +# QMK での速記 :id=stenography-in-qmk + + + +[速記](https://en.wikipedia.org/wiki/Stenotype)は裁判所のレポート、字幕および耳が不自由な人のためのリアルタイムの文字起こしで最もよく使われる記述方法です。速記では単語はスペル、音声およびショートカット(短い)ストロークが混在する音節ごとに音節化されます。プロの速記者は、標準的なタイピングで通常見られる負担を掛けずに、はるかに少ないエラー(99.9%より高い精度)で、200-300 WPM に到達できます。 + +[Open Steno Project](http://www.openstenoproject.org/)は、速記ストロークを単語とコマンドにリアルタイムに変換する Plover と呼ばれるオープンソースプログラムを構築しました。確立された辞書とサポートがあります。 + +## QWERTY キーボードを使った Plover :id=plover-with-qwerty-keyboard + +Plover は全ての標準的な QWERTY キーボードで動作しますが、キーボードが NKRO (n-キーロールオーバー)をサポートする場合は Plover は一度に押された全てのキーが分かるためより効率的です。Plover 用のキーマップの例は `planck/keymaps/default` で見つかります。`PLOVER` レイヤーに切り替えると、数字バーをサポートするためにキーボードの位置が調整されます。 + +QMK で Plover を使うには、NKRO を有効にし、標準レイアウト以外のレイアウトの場合はオプションでレイアウトを調整します。複数のキーを押しやすくするために、なんらかの速記フレンドリなキーキャップを購入することもできます。 + +## 速記プロトコルを使った Plover :id=plover-with-steno-protocol + +Plover は幾つかの速記マシンの言語も理解します。QMK はこれらの言語の内2つの言語、TX Bolt と GeminiPR を話すことができます。レイアウトの例は `planck/keymaps/steno` で見つけることができます。 + +QMKが steno プロトコルを使って Plover と話す場合は、Plover は入力としてキーボードを使いません。標準のキーボードと速記キーボードを行き来したり、あるいは Plover をアクティブ/非アクティブにする必要なく Plover と標準のレイヤーを行き来することができることを意味します。 + +このモードでは、Plover はシリアルポートを介して速記マシンと通信すると想定しているため、QMK はオペレーティングシステムに対してキーボードに加えて仮想シリアルポートとして存在しています。デフォルトでは、QMK は TX Bolt プロトコルを話しますが、GeminiPR に切り替えることができます; 最後に使われたプロトコルが不揮発性メモリに格納されるため QMK は再起動時に同じプロトコルを使います。 + +> 注意: ハードウェアの制限により、仮想シリアルポートとマウスエミュレーションの両方を同時に実行することができないかもしれません。 + +### TX Bolt :id=tx-bolt + +TX Bolt は可変サイズ(1-5バイト)のパケットで非常に単純なプロトコルを介して24個のキーのステータスを通信します。 + +### GeminiPR :id=geminipr + +GeminiPR は42個のキーを6バイトのパケットにエンコードします。TX Bolt は標準的な速記に必要な全てを含んでいますが、GeminiPR は英語以外の速記法のサポートを含む、より多くのオプションにも開け放たれています。 + +## 速記のための QMK の設定 :id=configuring-qmk-for-steno + +最初にキーマップの Makefile で速記を有効にします。競合を避けるために、マウスキー、追加キーあるいはその他の USB エンドポイントを無効にする必要もあります。幾つかのプロセッサの内蔵の USB スタックは一定数の USB エンドポイントと仮想シリアルポートのみをサポートし、速記はそれらのうちの3つを使います。 + +```makefile +STENO_ENABLE = yes +MOUSEKEY_ENABLE = no +``` + +キーマップで Plover 用の新しいレイヤーを作成します。`keymap_steno.h` をインクルードする必要があります。例については `planck/keymaps/steno/keymap.c` を見てください。レイヤーに切り替えるためのキーとレイヤーから抜けるためのキーを作成することを忘れないでください。その場でモードを切り替えたい場合は、キーコード `QK_STENO_BOLT` および `QK_STENO_GEMINI` を使うことができます。プロトコルのうちの1つのみを使う場合は、初期化関数の中でそれをセットアップすることができます: + +```c +void matrix_init_user() { + steno_set_mode(STENO_MODE_GEMINI); // あるいは STENO_MODE_BOLT +} +``` + +キーボードを書き込んだら、Plover を起動します。'Configure...' ボタンをクリックします。'Machine' タブの中で目的のプロトコルに対応する速記マシンを選択します。このタブの 'Configure...' ボタンをクリックし、シリアルポートを入力するか 'Scan' をクリックします。ボーレートは 9600 で問題ありません (ただし、115200まで問題無く設定することができるはずです)。それ以外はデフォルトの設定(データビット長: 8、ストップビット長: 1、パリティチェック: なし、フロー制御なし)を使います。 + +ディスプレイタブで 'Open stroke display' をクリックします。Plover を無効にすると、キーボードのキーを押すとストローク表示ウィンドウにそれらが表示されるはずです。これを使ってキーマップが正しくセットアップされたことを確認してください。これで速記をする準備ができました! + +## 速記の学習 :id=learning-stenography + +* [Learn Plover!](https://sites.google.com/site/learnplover/) +* [QWERTY Steno](http://qwertysteno.com/Home/) +* [Steno Jig](https://joshuagrams.github.io/steno-jig/) +* Plover [Learning Stenography](https://github.com/openstenoproject/plover/wiki/Learning-Stenography) wiki のより多くのリソース + +## コードとのインターフェイス :id=interfacing-with-the-code + +速記コードには3つの捕捉可能なフックがあります。これらの関数を定義した場合、処理の特定のポイントでそれらが呼び出されます; それらが true を返す場合処理が継続され、そうでなければあなたが物事を処理すると想定します。 + +```c +bool send_steno_chord_user(steno_mode_t mode, uint8_t chord[6]); +``` + +この関数はコードが送信されようとしている時に呼ばれます。モードは `STENO_MODE_BOLT` あるいは `STENO_MODE_GEMINI` のいずれかです。これはいずれかのプロトコルを介して送信される実際のコードを表します。提供されるコードを修正して送信されるものを変更することができます。通常の送信プロセスにしたい場合は true を返すのを忘れないでください。 + +```c +bool process_steno_user(uint16_t keycode, keyrecord_t *record) { return true; } +``` + +この関数はキーが押されるとキーが処理される前に呼び出されます。キーコードは `QK_STENO_BOLT`、`QK_STENO_GEMINI` あるいは `STN_*` キー値のいずれかでなければなりません。 + +```c +bool postprocess_steno_user(uint16_t keycode, keyrecord_t *record, steno_mode_t mode, uint8_t chord[6], int8_t pressed); +``` + +この関数はキーが処理された後、ただしコードを送信するかどうかを決める前に呼び出されます。`IS_PRESSED(record->event)` が false で、`pressed` が 0 または 1 の場合は、コードはまもなく送信されますが、まだ送信されてはいません。ここが速記コードあるいはキーのライブ表示などのフックを配置する場所です。 + + +## キーコードリファレンス :id=keycode-reference + +`keymap_steno.h` で定義されています。 + +> 注意: TX Bolt はキーの完全なセットをサポートしません。QMK での TX Bolt の実装は、GeminiPR キーを最も近い TX Bolt キーにマップします。そのため1つのキーマップが両方で動作します。 + +| GeminiPR | TX Bolt | Steno Key | +|--------|-------|-----------| +| `STN_N1` | `STN_NUM` | Number bar #1 | +| `STN_N2` | `STN_NUM` | Number bar #2 | +| `STN_N3` | `STN_NUM` | Number bar #3 | +| `STN_N4` | `STN_NUM` | Number bar #4 | +| `STN_N5` | `STN_NUM` | Number bar #5 | +| `STN_N6` | `STN_NUM` | Number bar #6 | +| `STN_N7` | `STN_NUM` | Number bar #7 | +| `STN_N8` | `STN_NUM` | Number bar #8 | +| `STN_N9` | `STN_NUM` | Number bar #9 | +| `STN_NA` | `STN_NUM` | Number bar #A | +| `STN_NB` | `STN_NUM` | Number bar #B | +| `STN_NC` | `STN_NUM` | Number bar #C | +| `STN_S1` | `STN_SL` | `S-` upper | +| `STN_S2` | `STN_SL` | `S-` lower | +| `STN_TL` | `STN_TL` | `T-` | +| `STN_KL` | `STN_KL` | `K-` | +| `STN_PL` | `STN_PL` | `P-` | +| `STN_WL` | `STN_WL` | `W-` | +| `STN_HL` | `STN_HL` | `H-` | +| `STN_RL` | `STN_RL` | `R-` | +| `STN_A` | `STN_A` | `A` vowel | +| `STN_O` | `STN_O` | `O` vowel | +| `STN_ST1` | `STN_STR` | `*` upper-left | +| `STN_ST2` | `STN_STR` | `*` lower-left | +| `STN_ST3` | `STN_STR` | `*` upper-right | +| `STN_ST4` | `STN_STR` | `*` lower-right | +| `STN_E` | `STN_E` | `E` vowel | +| `STN_U` | `STN_U` | `U` vowel | +| `STN_FR` | `STN_FR` | `-F` | +| `STN_PR` | `STN_PR` | `-P` | +| `STN_RR` | `STN_RR` | `-R` | +| `STN_BR` | `STN_BR` | `-B` | +| `STN_LR` | `STN_LR` | `-L` | +| `STN_GR` | `STN_GR` | `-G` | +| `STN_TR` | `STN_TR` | `-T` | +| `STN_SR` | `STN_SR` | `-S` | +| `STN_DR` | `STN_DR` | `-D` | +| `STN_ZR` | `STN_ZR` | `-Z` | +| `STN_FN` | (GeminiPR のみ) | +| `STN_RES1` | (GeminiPR のみ) | +| `STN_RES2` | (GeminiPR のみ) | +| `STN_PWR` | (GeminiPR のみ) | From b0e99c803dba3f8768ad8f0c8df8ce0b3183794a Mon Sep 17 00:00:00 2001 From: Andrew Kannan Date: Mon, 27 Jul 2020 12:16:21 -0400 Subject: [PATCH 460/930] Atlas Updates (#9343) * Update atlas keyboard files and default keyboard layout * Remove wierd LT things * Update keyboards/cannonkeys/atlas/keymaps/via/keymap.c Co-authored-by: Joel Challis Co-authored-by: Joel Challis --- keyboards/cannonkeys/atlas/config.h | 2 +- keyboards/cannonkeys/atlas/keymaps/default/keymap.c | 11 ++++++----- keyboards/cannonkeys/atlas/keymaps/via/keymap.c | 4 ++-- 3 files changed, 9 insertions(+), 8 deletions(-) diff --git a/keyboards/cannonkeys/atlas/config.h b/keyboards/cannonkeys/atlas/config.h index 6cd1d1b6e87d..4dfd445c8745 100644 --- a/keyboards/cannonkeys/atlas/config.h +++ b/keyboards/cannonkeys/atlas/config.h @@ -29,7 +29,7 @@ along with this program. If not, see . #define MATRIX_ROWS 5 #define MATRIX_COLS 12 -#define MATRIX_COL_PINS { A9, A10, A15, B9, C13, C14, C15, F0, F1, A0, A1, A2 } +#define MATRIX_COL_PINS { A2, A1, A0, F1, F0, C15, C14, C13, B9, A15, A10, A9 } #define MATRIX_ROW_PINS { A8, B14, B12, B4, B3 } #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/cannonkeys/atlas/keymaps/default/keymap.c b/keyboards/cannonkeys/atlas/keymaps/default/keymap.c index 705d31a405fd..a57e66e31ca3 100644 --- a/keyboards/cannonkeys/atlas/keymaps/default/keymap.c +++ b/keyboards/cannonkeys/atlas/keymaps/default/keymap.c @@ -47,7 +47,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_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, KC_ENT, \ - BL_TOGG, KC_LCTL, KC_LALT, KC_LGUI, MO(_LOWER), KC_SPC, KC_SPC, MO(_RAISE), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \ + RGB_MOD, KC_LCTL, KC_LALT, KC_LGUI, MO(_LOWER), KC_SPC, KC_SPC, MO(_RAISE), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \ ), /* Lower * ,-----------------------------------------------------------------------------------. @@ -84,10 +84,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `-----------------------------------------------------------------------------------' */ [_RAISE] = LAYOUT_ortho_5x12( \ - 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_GRV, KC_1, RGB_SAI, RGB_VAI, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, \ + KC_GRV, KC_1, RGB_SAD, RGB_VAD, 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, _______, \ - RGB_TOG, RGB_MOD, BL_INC, BL_DEC, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY \ + RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY \ ) -}; +} +; diff --git a/keyboards/cannonkeys/atlas/keymaps/via/keymap.c b/keyboards/cannonkeys/atlas/keymaps/via/keymap.c index 2e72c8f9dc2c..43a3b01a2b41 100644 --- a/keyboards/cannonkeys/atlas/keymaps/via/keymap.c +++ b/keyboards/cannonkeys/atlas/keymaps/via/keymap.c @@ -48,11 +48,11 @@ 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_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, KC_ENT, \ - BL_TOGG, KC_LCTL, KC_LALT, KC_LGUI, MO(_LOWER), KC_SPC, KC_SPC, MO(_RAISE), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \ + RGB_MOD, KC_LCTL, KC_LALT, KC_LGUI, MO(_LOWER), KC_SPC, KC_SPC, MO(_RAISE), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \ ), /* Lower * ,-----------------------------------------------------------------------------------. - * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Bksp | + * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Bksp |n * |------+------+------+------+------+-------------+------+------+------+------+------| * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Del | * |------+------+------+------+------+-------------+------+------+------+------+------| From e937fc451379d773184068fd07b9f0a2aaaa6784 Mon Sep 17 00:00:00 2001 From: Andrew Kannan Date: Mon, 27 Jul 2020 14:29:09 -0400 Subject: [PATCH 461/930] Add Instant65 to QMK (#9804) * Add Instant65 to QMK * Fix via map * Apply suggestions from code review Co-authored-by: Ryan Co-authored-by: Ryan --- keyboards/cannonkeys/instant65/chconf.h | 714 ++++++++++++++++++ keyboards/cannonkeys/instant65/config.h | 77 ++ keyboards/cannonkeys/instant65/halconf.h | 525 +++++++++++++ keyboards/cannonkeys/instant65/info.json | 12 + keyboards/cannonkeys/instant65/instant65.c | 1 + keyboards/cannonkeys/instant65/instant65.h | 17 + .../instant65/keymaps/default/keymap.c | 46 ++ .../cannonkeys/instant65/keymaps/via/keymap.c | 65 ++ .../cannonkeys/instant65/keymaps/via/rules.mk | 1 + keyboards/cannonkeys/instant65/mcuconf.h | 176 +++++ keyboards/cannonkeys/instant65/readme.md | 12 + keyboards/cannonkeys/instant65/rules.mk | 23 + 12 files changed, 1669 insertions(+) create mode 100644 keyboards/cannonkeys/instant65/chconf.h create mode 100644 keyboards/cannonkeys/instant65/config.h create mode 100644 keyboards/cannonkeys/instant65/halconf.h create mode 100644 keyboards/cannonkeys/instant65/info.json create mode 100644 keyboards/cannonkeys/instant65/instant65.c create mode 100644 keyboards/cannonkeys/instant65/instant65.h create mode 100644 keyboards/cannonkeys/instant65/keymaps/default/keymap.c create mode 100644 keyboards/cannonkeys/instant65/keymaps/via/keymap.c create mode 100644 keyboards/cannonkeys/instant65/keymaps/via/rules.mk create mode 100644 keyboards/cannonkeys/instant65/mcuconf.h create mode 100644 keyboards/cannonkeys/instant65/readme.md create mode 100644 keyboards/cannonkeys/instant65/rules.mk diff --git a/keyboards/cannonkeys/instant65/chconf.h b/keyboards/cannonkeys/instant65/chconf.h new file mode 100644 index 000000000000..03f63da36a88 --- /dev/null +++ b/keyboards/cannonkeys/instant65/chconf.h @@ -0,0 +1,714 @@ +/* + 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. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +/** + * @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. + * + * @addtogroup config + * @details Kernel related settings and hooks. + * @{ + */ + +#ifndef CHCONF_H +#define CHCONF_H + +#define _CHIBIOS_RT_CONF_ +#define _CHIBIOS_RT_CONF_VER_6_0_ + +/*===========================================================================*/ +/** + * @name System timers settings + * @{ + */ +/*===========================================================================*/ + +/** + * @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. + * @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. + */ +#if !defined(CH_CFG_ST_TIMEDELTA) +#define CH_CFG_ST_TIMEDELTA 2 +#endif + +/** @} */ + +/*===========================================================================*/ +/** + * @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. + */ +#if !defined(CH_CFG_TIME_QUANTUM) +#define CH_CFG_TIME_QUANTUM 0 +#endif + +/** + * @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. + */ +#if !defined(CH_CFG_MEMCORE_SIZE) +#define CH_CFG_MEMCORE_SIZE 0 +#endif + +/** + * @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. + */ +#if !defined(CH_CFG_NO_IDLE_THREAD) +#define CH_CFG_NO_IDLE_THREAD FALSE +#endif + +/** @} */ + +/*===========================================================================*/ +/** + * @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. + */ +#if !defined(CH_CFG_OPTIMIZE_SPEED) +#define CH_CFG_OPTIMIZE_SPEED FALSE +#endif + +/** @} */ + +/*===========================================================================*/ +/** + * @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. + */ +#if !defined(CH_CFG_USE_TM) +#define CH_CFG_USE_TM FALSE +#endif + +/** + * @brief Threads registry APIs. + * @details If enabled then the registry APIs are included in the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_REGISTRY) +#define CH_CFG_USE_REGISTRY TRUE +#endif + +/** + * @brief Threads synchronization APIs. + * @details If enabled then the @p chThdWait() function is included in + * the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_WAITEXIT) +#define CH_CFG_USE_WAITEXIT TRUE +#endif + +/** + * @brief Semaphores APIs. + * @details If enabled then the Semaphores APIs are included in the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_SEMAPHORES) +#define CH_CFG_USE_SEMAPHORES TRUE +#endif + +/** + * @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. + */ +#if !defined(CH_CFG_USE_SEMAPHORES_PRIORITY) +#define CH_CFG_USE_SEMAPHORES_PRIORITY FALSE +#endif + +/** + * @brief Mutexes APIs. + * @details If enabled then the mutexes APIs are included in the kernel. + * + * @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. + * @note Recursive mutexes are heavier and have an increased + * memory footprint. + * + * @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. + * @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. + */ +#if !defined(CH_CFG_USE_CONDVARS) +#define CH_CFG_USE_CONDVARS TRUE +#endif + +/** + * @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. + */ +#if !defined(CH_CFG_USE_CONDVARS_TIMEOUT) +#define CH_CFG_USE_CONDVARS_TIMEOUT FALSE +#endif + +/** + * @brief Events Flags APIs. + * @details If enabled then the event flags APIs are included in the kernel. + * + * @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. + * @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. + */ +#if !defined(CH_CFG_USE_EVENTS_TIMEOUT) +#define CH_CFG_USE_EVENTS_TIMEOUT TRUE +#endif + +/** + * @brief Synchronous Messages APIs. + * @details If enabled then the synchronous messages APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_MESSAGES) +#define CH_CFG_USE_MESSAGES TRUE +#endif + +/** + * @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. + */ +#if !defined(CH_CFG_USE_MESSAGES_PRIORITY) +#define CH_CFG_USE_MESSAGES_PRIORITY FALSE +#endif + +/** + * @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. + */ +#if !defined(CH_CFG_USE_MAILBOXES) +#define CH_CFG_USE_MAILBOXES TRUE +#endif + +/** + * @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. + */ +#if !defined(CH_CFG_USE_MEMCORE) +#define CH_CFG_USE_MEMCORE TRUE +#endif + +/** + * @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. + */ +#if !defined(CH_CFG_USE_HEAP) +#define CH_CFG_USE_HEAP FALSE +#endif + +/** + * @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. + */ +#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. + * @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. + */ +#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 + +/** @} */ + +/*===========================================================================*/ +/** + * @name Debug options + * @{ + */ +/*===========================================================================*/ + +/** + * @brief Debug option, kernel statistics. + * + * @note The default is @p FALSE. + */ +#if !defined(CH_DBG_STATISTICS) +#define CH_DBG_STATISTICS FALSE +#endif + +/** + * @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. + */ +#if !defined(CH_DBG_SYSTEM_STATE_CHECK) +#define CH_DBG_SYSTEM_STATE_CHECK FALSE +#endif + +/** + * @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. + */ +#if !defined(CH_DBG_ENABLE_CHECKS) +#define CH_DBG_ENABLE_CHECKS FALSE +#endif + +/** + * @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. + */ +#if !defined(CH_DBG_ENABLE_ASSERTS) +#define CH_DBG_ENABLE_ASSERTS FALSE +#endif + +/** + * @brief Debug option, trace buffer. + * @details If enabled then the trace buffer is activated. + * + * @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. + * @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. + */ +#if !defined(CH_DBG_ENABLE_STACK_CHECK) +#define CH_DBG_ENABLE_STACK_CHECK FALSE +#endif + +/** + * @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. + */ +#if !defined(CH_DBG_FILL_THREADS) +#define CH_DBG_FILL_THREADS FALSE +#endif + +/** + * @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. + */ +#if !defined(CH_DBG_THREADS_PROFILING) +#define CH_DBG_THREADS_PROFILING FALSE +#endif + +/** @} */ + +/*===========================================================================*/ +/** + * @name Kernel hooks + * @{ + */ +/*===========================================================================*/ + +/** + * @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. + */ +#define CH_CFG_THREAD_EXTRA_FIELDS \ + /* Add threads custom fields here.*/ + +/** + * @brief Threads initialization hook. + * @details User initialization code added to the @p _thread_init() function. + * + * @note It is invoked from within @p _thread_init() 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/cannonkeys/instant65/config.h b/keyboards/cannonkeys/instant65/config.h new file mode 100644 index 000000000000..ecfb55fe006a --- /dev/null +++ b/keyboards/cannonkeys/instant65/config.h @@ -0,0 +1,77 @@ +/* +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 0xCA04 +#define PRODUCT_ID 0x1565 +#define DEVICE_VER 0x0001 +#define MANUFACTURER CannonKeys +#define PRODUCT Instant65 + +/* key matrix size */ +#define MATRIX_ROWS 5 +#define MATRIX_COLS 15 + +#define MATRIX_COL_PINS { A8, C13, B9, B8, B7, B6, B5, B4, B3, A7, A5, A4, A3, A2, A1 } +#define MATRIX_ROW_PINS { A14, A15, A0, B1, B0 } +#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 + +#define RGBLIGHT_ANIMATIONS +#define RGB_DI_PIN B15 +#define RGBLED_NUM 20 +#define WS2812_SPI SPID2 +#define WS2812_SPI_MOSI_PAL_MODE 0 + + +/* + * 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/cannonkeys/instant65/halconf.h b/keyboards/cannonkeys/instant65/halconf.h new file mode 100644 index 000000000000..921803762eaf --- /dev/null +++ b/keyboards/cannonkeys/instant65/halconf.h @@ -0,0 +1,525 @@ +/* + 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. + 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 + +#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 +#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 cryptographic subsystem. + */ +#if !defined(HAL_USE_CRY) || defined(__DOXYGEN__) +#define HAL_USE_CRY FALSE +#endif + +/** + * @brief Enables the DAC subsystem. + */ +#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 +#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 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 +#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 +#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 + +/** + * @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. */ +/*===========================================================================*/ + +/** + * @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 + +/** + * @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. */ +/*===========================================================================*/ + +/** + * @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 the zero-copy API. + */ +#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 + +/** + * @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. */ +/*===========================================================================*/ + +/** + * @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 16 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 256 bytes for both the transmission and receive + * buffers. + */ +#if !defined(SERIAL_USB_BUFFERS_SIZE) || defined(__DOXYGEN__) +#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 + +/*===========================================================================*/ +/* 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 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 +#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. */ +/*===========================================================================*/ + +/** + * @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 + +/*===========================================================================*/ +/* 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/cannonkeys/instant65/info.json b/keyboards/cannonkeys/instant65/info.json new file mode 100644 index 000000000000..5a9da70837de --- /dev/null +++ b/keyboards/cannonkeys/instant65/info.json @@ -0,0 +1,12 @@ +{ + "keyboard_name": "Instant65", + "url": "https://cannonkeys.com", + "maintainer": "awkannan", + "width": 16, + "height": 5, + "layouts": { + "LAYOUT_default": { + "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":"Ctrl", "x":11.25, "y":4, "w":1.25}, {"x":13, "y":4}, {"x":14, "y":4}, {"x":15, "y":4}] + } + } +} diff --git a/keyboards/cannonkeys/instant65/instant65.c b/keyboards/cannonkeys/instant65/instant65.c new file mode 100644 index 000000000000..5efbf8226cee --- /dev/null +++ b/keyboards/cannonkeys/instant65/instant65.c @@ -0,0 +1 @@ +#include "instant65.h" diff --git a/keyboards/cannonkeys/instant65/instant65.h b/keyboards/cannonkeys/instant65/instant65.h new file mode 100644 index 000000000000..0e2d4ae37283 --- /dev/null +++ b/keyboards/cannonkeys/instant65/instant65.h @@ -0,0 +1,17 @@ +#pragma once + +#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, K114, \ + K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K213, K214, \ + K300, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, K314, \ + K400, K401, K402, K406, K410, K411, K412, K413, K414 \ +) { \ + { 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, KC_NO, K213, K214 }, \ + { K300, KC_NO, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, K314 }, \ + { K400, K401, K402, KC_NO, KC_NO, KC_NO, K406, KC_NO, KC_NO, KC_NO, K410, K411, K412, K413, K414 } \ +} diff --git a/keyboards/cannonkeys/instant65/keymaps/default/keymap.c b/keyboards/cannonkeys/instant65/keymaps/default/keymap.c new file mode 100644 index 000000000000..a7c125b45bb1 --- /dev/null +++ b/keyboards/cannonkeys/instant65/keymaps/default/keymap.c @@ -0,0 +1,46 @@ +/* +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 + + +// 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, + _FN1, +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [_BASE] = 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_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_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(_FN1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT + ), + + [_FN1] = LAYOUT_default( + 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, RGB_TOG, + 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, RGB_MOD, + BL_BRTG, 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, + BL_INC, BL_TOGG, 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, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RESET, KC_TRNS, KC_TRNS + ) +}; diff --git a/keyboards/cannonkeys/instant65/keymaps/via/keymap.c b/keyboards/cannonkeys/instant65/keymaps/via/keymap.c new file mode 100644 index 000000000000..8fb2eacee4e4 --- /dev/null +++ b/keyboards/cannonkeys/instant65/keymaps/via/keymap.c @@ -0,0 +1,65 @@ +/* +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 + + +// 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, + _FN1, + _FN2, + _FN3 +}; + + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [_BASE] = 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_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_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_NUBS, KC_ENT, KC_PGUP, + 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_PGDN, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, MO(_FN1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT + ), + + [_FN1] = LAYOUT_default( + 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, RGB_TOG, + 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, RGB_MOD, + BL_BRTG, 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, + BL_INC, BL_DEC, BL_TOGG, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_GRV, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RESET, KC_TRNS, KC_TRNS + ), + + [_FN2] = LAYOUT_default( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 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( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 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/instant65/keymaps/via/rules.mk b/keyboards/cannonkeys/instant65/keymaps/via/rules.mk new file mode 100644 index 000000000000..1e5b99807cb7 --- /dev/null +++ b/keyboards/cannonkeys/instant65/keymaps/via/rules.mk @@ -0,0 +1 @@ +VIA_ENABLE = yes diff --git a/keyboards/cannonkeys/instant65/mcuconf.h b/keyboards/cannonkeys/instant65/mcuconf.h new file mode 100644 index 000000000000..43fe0a462ef1 --- /dev/null +++ b/keyboards/cannonkeys/instant65/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/cannonkeys/instant65/readme.md b/keyboards/cannonkeys/instant65/readme.md new file mode 100644 index 000000000000..504f7c6ef87b --- /dev/null +++ b/keyboards/cannonkeys/instant65/readme.md @@ -0,0 +1,12 @@ +# CannonKeys Instant65 + +Instant65 Keyboard + +* Keyboard Maintainer: [Andrew Kannan](https://github.com/awkannan) +* Hardware Supported: STM32F072CBT6 + +Make example for this keyboard (after setting up your build environment): + + make cannonkeys/instant65: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/cannonkeys/instant65/rules.mk b/keyboards/cannonkeys/instant65/rules.mk new file mode 100644 index 000000000000..33c186b2162f --- /dev/null +++ b/keyboards/cannonkeys/instant65/rules.mk @@ -0,0 +1,23 @@ +# 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 = 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 = yes # Enable keyboard RGB underglow +BLUETOOTH_ENABLE = no # Enable Bluetooth +AUDIO_ENABLE = no # Audio output +WS2812_DRIVER = spi + +# Enter lower-power sleep mode when on the ChibiOS idle thread +OPT_DEFS += -DCORTEX_ENABLE_WFI_IDLE=TRUE From 5cbac94d08257a6149c5717d7f25efab7af9c0fa Mon Sep 17 00:00:00 2001 From: Michael Stapelberg Date: Mon, 27 Jul 2020 20:44:05 +0200 Subject: [PATCH 462/930] [Keyboard] add support for the kinT kinesis keyboard controller (kint2pp variant) (#9687) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * branch keyboards/kinesis/kint2pp from keyboards/kinesis/stapelberg Changes will be made in the next commit * [Keyboard] update wiring for kinT (kint2pp variant) * add QMK plumbing * Apply zvecr’s suggestions from code review * Update keyboards/kinesis/kint2pp/config.h * Update keyboards/kinesis/kint2pp/config.h * remove superfluous config.h include --- keyboards/kinesis/config.h | 3 + keyboards/kinesis/kinesis.h | 3 + keyboards/kinesis/kint2pp/config.h | 33 ++++++++++ keyboards/kinesis/kint2pp/kint2pp.c | 26 ++++++++ keyboards/kinesis/kint2pp/kint2pp.h | 99 +++++++++++++++++++++++++++++ keyboards/kinesis/kint2pp/readme.md | 3 + keyboards/kinesis/kint2pp/rules.mk | 0 7 files changed, 167 insertions(+) create mode 100644 keyboards/kinesis/kint2pp/config.h create mode 100644 keyboards/kinesis/kint2pp/kint2pp.c create mode 100644 keyboards/kinesis/kint2pp/kint2pp.h create mode 100644 keyboards/kinesis/kint2pp/readme.md create mode 100644 keyboards/kinesis/kint2pp/rules.mk diff --git a/keyboards/kinesis/config.h b/keyboards/kinesis/config.h index 368037d8b2b2..db5c458bba56 100644 --- a/keyboards/kinesis/config.h +++ b/keyboards/kinesis/config.h @@ -136,5 +136,8 @@ along with this program. If not, see . #ifdef SUBPROJECT_stapelberg #include "stapelberg/config.h" #endif +#ifdef SUBPROJECT_kint2pp + #include "kint2pp/config.h" +#endif #endif diff --git a/keyboards/kinesis/kinesis.h b/keyboards/kinesis/kinesis.h index 94e913ebd9fc..42df64bf3b84 100644 --- a/keyboards/kinesis/kinesis.h +++ b/keyboards/kinesis/kinesis.h @@ -7,6 +7,9 @@ #ifdef KEYBOARD_kinesis_stapelberg #include "stapelberg.h" #endif +#ifdef KEYBOARD_kinesis_kint2pp + #include "kint2pp.h" +#endif #include "quantum.h" diff --git a/keyboards/kinesis/kint2pp/config.h b/keyboards/kinesis/kint2pp/config.h new file mode 100644 index 000000000000..2acaf9be6e51 --- /dev/null +++ b/keyboards/kinesis/kint2pp/config.h @@ -0,0 +1,33 @@ +#pragma once + +/* USB Device descriptor parameter */ +#define PRODUCT_ID 0x6060 +#define DEVICE_VER 0x0002 + +/* key matrix size */ +#define MATRIX_ROWS 15 +#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 { D7, E0, E1, C0, C6, F6, D4, D2, D3, D0, B7, D1, E6, B4, B2 } +#define MATRIX_COL_PINS { E7, F0, F7, B1, B3, B0, 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 + +#define IGNORE_MOD_TAP_INTERRUPT diff --git a/keyboards/kinesis/kint2pp/kint2pp.c b/keyboards/kinesis/kint2pp/kint2pp.c new file mode 100644 index 000000000000..7e2b4348c55f --- /dev/null +++ b/keyboards/kinesis/kint2pp/kint2pp.c @@ -0,0 +1,26 @@ +#include "kint2pp.h" + +void matrix_init_kb(void) { + led_init_ports(); + + + matrix_init_user(); +} +void led_init_ports() { + // * Set our LED pins as output + setPinOutput(C3); // Keypad LED + setPinOutput(C4); // ScrLock LED + setPinOutput(C5); // NumLock LED + setPinOutput(C1); // CapsLock LED +} + +bool led_update_kb(led_t led_state) { + bool res = led_update_user(led_state); + if(res) { + writePin(C3, !led_state.compose); + writePin(C4, !led_state.scroll_lock); + writePin(C5, !led_state.num_lock); + writePin(C1, !led_state.caps_lock); + } + return res; +} diff --git a/keyboards/kinesis/kint2pp/kint2pp.h b/keyboards/kinesis/kint2pp/kint2pp.h new file mode 100644 index 000000000000..57265d731301 --- /dev/null +++ b/keyboards/kinesis/kint2pp/kint2pp.h @@ -0,0 +1,99 @@ +#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 as on the physical keyboard +// The second converts the arguments into the 2-D scanned array + +#define LAYOUT( \ + kC0, kD0, kE0, kC1, kD1, kE1, kC2, kD2, kE2, \ + k00, k10, k20, k30, k40, k50, \ + k01, k11, k21, k31, k41, k51, \ + k02, k12, k22, k32, k42, k52, \ + k03, k13, k23, k33, k43, k53, \ + k14, k24, k34, k54, \ + k56, k55, \ + k35, \ + k36, k46, k25, \ + \ + kC3, kD3, kE3, kC4, kD4, kE4, kC5, kE5, kD5, \ + k60, k70, k80, k90, kA0, kB0, \ + k61, k71, k81, k91, kA1, kB1, \ + k62, k72, k82, k92, kA2, kB2, \ + k63, k73, k83, k93, kA3, kB3, \ + k64, k84, k94, kA4, \ + k96, k85, \ + k86, \ + k66, k75, k65 \ +) { \ + { k00, k01, k02, k03, ___, ___, ___ }, \ + { k10, k11, k12, k13, k14, ___, ___ }, \ + { k20, k21, k22, k23, k24, k25, ___ }, \ + { k30, k31, k32, k33, k34, k35, k36 }, \ + { k40, k41, k42, k43, ___, ___, k46 }, \ + { k50, k51, k52, k53, k54, k55, k56 }, \ + { k60, k61, k62, k63, k64, k65, k66 }, \ + { k70, k71, k72, k73, ___, k75, ___ }, \ + { k80, k81, k82, k83, k84, k85, k86 }, \ + { k90, k91, k92, k93, k94, ___, k96 }, \ + { kA0, kA1, kA2, kA3, kA4, ___, ___ }, \ + { kB0, kB1, kB2, kB3, ___, ___, ___ }, \ + { kC0, kC1, kC2, kC3, kC4, kC5, ___ }, \ + { kD0, kD1, kD2, kD3, kD4, kD5, ___ }, \ + { kE0, kE1, kE2, kE3, kE4, kE5, ___ } \ +} + +/* ---------------- LEFT HAND ----------------- ---------------- RIGHT HAND ---------------- */ +#define LAYOUT_pretty( \ + kC0, kD0, kE0, kC1, kD1, kE1, kC2, kD2, kE2, kC3, kD3, kE3, kC4, kD4, kE4, kC5, kE5, kD5, \ + k00, k10, k20, k30, k40, k50, k60, k70, k80, k90, kA0, kB0, \ + k01, k11, k21, k31, k41, k51, k61, k71, k81, k91, kA1, kB1, \ + k02, k12, k22, k32, k42, k52, k62, k72, k82, k92, kA2, kB2, \ + k03, k13, k23, k33, k43, k53, k63, k73, k83, k93, kA3, kB3, \ + k14, k24, k34, k54, k64, k84, k94, kA4, \ + k56, k55, k96, k85, \ + k35, k86, \ + k36, k46, k25, k66, k75, k65 \ +) { \ + { k00, k01, k02, k03, ___, ___, ___ }, \ + { k10, k11, k12, k13, k14, ___, ___ }, \ + { k20, k21, k22, k23, k24, k25, ___ }, \ + { k30, k31, k32, k33, k34, k35, k36 }, \ + { k40, k41, k42, k43, ___, ___, k46 }, \ + { k50, k51, k52, k53, k54, k55, k56 }, \ + { k60, k61, k62, k63, k64, k65, k66 }, \ + { k70, k71, k72, k73, ___, k75, ___ }, \ + { k80, k81, k82, k83, k84, k85, k86 }, \ + { k90, k91, k92, k93, k94, ___, k96 }, \ + { kA0, kA1, kA2, kA3, kA4, ___, ___ }, \ + { kB0, kB1, kB2, kB3, ___, ___, ___ }, \ + { kC0, kC1, kC2, kC3, kC4, kC5, ___ }, \ + { kD0, kD1, kD2, kD3, kD4, kD5, ___ }, \ + { kE0, kE1, kE2, kE3, kE4, kE5, ___ } \ +} + +/* +This is the Stapelberg matrix as published at +https://github.com/stapelberg/kinesis-firmware/blob/master/kb_kinesis/config.kspec +Along with the pins for each row and column + PB0 PB1 PB2 PB3 PB4 PB5 PB6 + kx0 kx1 kx2 kx3 kx4 kx5 kx6 +PD0 k0x Row: EQL TAB CAP LSH X2 -- -- +PD1 k1x Row: 1 Q A Z BQ -- -- +PD2 k2x Row: 2 W S X INS END -- +PD3 k3x Row: 3 E D C LFT HOM BAK +PD4 k4x Row: 4 R F V -- -- DEL +PD5 k5x Row: 5 T G B RT LAL LCT +PD6 k6x Row: 6 Y H N UP SPC PGD +PD7 k7x Row: 7 U J M -- RET -- +PC0 k8x Row: 8 I K COM DWN RCT PGU +PC1 k9x Row: 9 O L PER LBR -- RAL +PC2 kAx Row: 0 P SEM SLA RBR -- -- +PC3 kBx Row: MIN BSL APO RSH X1 -- -- +PC4 kCx Row: ESC F3 F6 F9 F12 PAU -- +PC5 kDx Row: F1 F4 F7 F10 PRT PRG -- +PC6 kEx Row: F2 F5 F8 F11 SLK KEY -- +*/ diff --git a/keyboards/kinesis/kint2pp/readme.md b/keyboards/kinesis/kint2pp/readme.md new file mode 100644 index 000000000000..97f67abb5941 --- /dev/null +++ b/keyboards/kinesis/kint2pp/readme.md @@ -0,0 +1,3 @@ +# kinesis_kint2pp keyboard firmware + +Please see https://github.com/kinx-project/kint for details. diff --git a/keyboards/kinesis/kint2pp/rules.mk b/keyboards/kinesis/kint2pp/rules.mk new file mode 100644 index 000000000000..e69de29bb2d1 From 6104609afa666750be49ccfa8df8d3ad87fb4f32 Mon Sep 17 00:00:00 2001 From: tominabox1 Date: Mon, 27 Jul 2020 17:10:40 -0500 Subject: [PATCH 463/930] QAZ Keyboard (#9714) * Initial qaz commit * Enable combos * Improved default keymaps * Fixed configurator json * Via initial * Corrected VIA json * touch * Via fixes * Fixed via matrix * Formatting * Add lighting to qaz * Add rgb animations, add rgb to l2, fix error in via json, enable rgblight by default * Update QAZ readme * Remove VIA json, prep for PR * Correct default bootloader for pro-micro * Remove accidentally added submodules * Change names of layout macros * Move combo defs to keymap folders, fix layout names in info.json * Fixes transposition of comma and dot keys on default keymaps * Update keyboards/qaz/keymaps/default/config.h Co-authored-by: Joel Challis * Update keyboards/qaz/keymaps/default_big_space/config.h Co-authored-by: Joel Challis * Update keyboards/qaz/rules.mk Co-authored-by: Joel Challis * Update keyboards/qaz/readme.md Co-authored-by: James Young <18669334+noroadsleft@users.noreply.github.com> * Update keyboards/qaz/rules.mk Co-authored-by: James Young <18669334+noroadsleft@users.noreply.github.com> Co-authored-by: Joel Challis Co-authored-by: James Young <18669334+noroadsleft@users.noreply.github.com> --- keyboards/qaz/config.h | 49 ++++++++++++++++ keyboards/qaz/info.json | 15 +++++ keyboards/qaz/keymaps/default/config.h | 6 ++ keyboards/qaz/keymaps/default/keymap.c | 57 +++++++++++++++++++ keyboards/qaz/keymaps/default/readme.md | 1 + keyboards/qaz/keymaps/default/rules.mk | 1 + .../qaz/keymaps/default_big_space/config.h | 6 ++ .../qaz/keymaps/default_big_space/keymap.c | 57 +++++++++++++++++++ .../qaz/keymaps/default_big_space/readme.md | 1 + .../qaz/keymaps/default_big_space/rules.mk | 1 + keyboards/qaz/keymaps/via/keymap.c | 29 ++++++++++ keyboards/qaz/keymaps/via/rules.mk | 1 + keyboards/qaz/qaz.c | 1 + keyboards/qaz/qaz.h | 33 +++++++++++ keyboards/qaz/readme.md | 15 +++++ keyboards/qaz/rules.mk | 22 +++++++ 16 files changed, 295 insertions(+) create mode 100644 keyboards/qaz/config.h create mode 100644 keyboards/qaz/info.json create mode 100644 keyboards/qaz/keymaps/default/config.h create mode 100644 keyboards/qaz/keymaps/default/keymap.c create mode 100644 keyboards/qaz/keymaps/default/readme.md create mode 100644 keyboards/qaz/keymaps/default/rules.mk create mode 100644 keyboards/qaz/keymaps/default_big_space/config.h create mode 100644 keyboards/qaz/keymaps/default_big_space/keymap.c create mode 100644 keyboards/qaz/keymaps/default_big_space/readme.md create mode 100644 keyboards/qaz/keymaps/default_big_space/rules.mk create mode 100644 keyboards/qaz/keymaps/via/keymap.c create mode 100644 keyboards/qaz/keymaps/via/rules.mk create mode 100644 keyboards/qaz/qaz.c create mode 100644 keyboards/qaz/qaz.h create mode 100644 keyboards/qaz/readme.md create mode 100644 keyboards/qaz/rules.mk diff --git a/keyboards/qaz/config.h b/keyboards/qaz/config.h new file mode 100644 index 000000000000..1dbaaa0fc428 --- /dev/null +++ b/keyboards/qaz/config.h @@ -0,0 +1,49 @@ +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0x7431 +#define PRODUCT_ID 0x0001 +#define DEVICE_VER 0x0001 +#define MANUFACTURER whydobearsexplod +#define PRODUCT qaz keyboard + +/* key matrix size */ +#define MATRIX_ROWS 6 +#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 { F4, D4, C6, E6, D1, D0 } +#define MATRIX_COL_PINS { B4, D3, D2, F5, B5, F6, D7 } +#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 RGB_DI_PIN F7 + +#ifdef RGB_DI_PIN +#define RGBLIGHT_ANIMATIONS +#define RGBLED_NUM 21 +#define RGBLIGHT_HUE_STEP 8 +#define RGBLIGHT_SAT_STEP 8 +#define RGBLIGHT_VAL_STEP 8 +#endif diff --git a/keyboards/qaz/info.json b/keyboards/qaz/info.json new file mode 100644 index 000000000000..c8993d57eed7 --- /dev/null +++ b/keyboards/qaz/info.json @@ -0,0 +1,15 @@ +{ + "keyboard_name": "qaz", + "url": "", + "maintainer": "tominabox1", + "width": 10.25, + "height": 4, + "layouts": { + "LAYOUT_split_space": { + "layout": [{"label":"Q", "x":0, "y":0}, {"label":"W", "x":1, "y":0}, {"label":"E", "x":2, "y":0}, {"label":"R", "x":3, "y":0}, {"label":"T", "x":4, "y":0}, {"label":"Y", "x":5, "y":0}, {"label":"U", "x":6, "y":0}, {"label":"I", "x":7, "y":0}, {"label":"O", "x":8, "y":0}, {"label":"P", "x":9, "y":0, "w":1.25}, {"label":"A", "x":0, "y":1, "w":1.25}, {"label":"S", "x":1.25, "y":1}, {"label":"D", "x":2.25, "y":1}, {"label":"F", "x":3.25, "y":1}, {"label":"G", "x":4.25, "y":1}, {"label":"H", "x":5.25, "y":1}, {"label":"J", "x":6.25, "y":1}, {"label":"K", "x":7.25, "y":1}, {"label":"L", "x":8.25, "y":1}, {"label":"Ent", "x":9.25, "y":1}, {"label":"Z", "x":0, "y":2, "w":1.75}, {"label":"X", "x":1.75, "y":2}, {"label":"C", "x":2.75, "y":2}, {"label":"V", "x":3.75, "y":2}, {"label":"B", "x":4.75, "y":2}, {"label":"N", "x":5.75, "y":2}, {"label":"M", "x":6.75, "y":2}, {"label":".", "x":7.75, "y":2}, {"label":"Shift","x":8.75, "y":2, "w":1.5},{"label":"Super", "x":0, "y":3}, {"label":"Meta", "x":1, "y":3}, {"label":"Alt", "x":2, "y":3}, {"label":"", "x":3, "y":3, "w":2.25}, {"label":"", "x":5.25, "y":3, "w":2}, {"label":"AltGr", "x":7.25, "y":3},{"label":"Meta", "x":8.25, "y":3},{"label":"Super", "x":9.25, "y":3}] + }, + "LAYOUT": { + "layout": [{"label":"Q", "x":0, "y":0}, {"label":"W", "x":1, "y":0}, {"label":"E", "x":2, "y":0}, {"label":"R", "x":3, "y":0}, {"label":"T", "x":4, "y":0}, {"label":"Y", "x":5, "y":0}, {"label":"U", "x":6, "y":0}, {"label":"I", "x":7, "y":0}, {"label":"O", "x":8, "y":0}, {"label":"P", "x":9, "y":0, "w":1.25}, {"label":"A", "x":0, "y":1, "w":1.25}, {"label":"S", "x":1.25, "y":1}, {"label":"D", "x":2.25, "y":1}, {"label":"F", "x":3.25, "y":1}, {"label":"G", "x":4.25, "y":1}, {"label":"H", "x":5.25, "y":1}, {"label":"J", "x":6.25, "y":1}, {"label":"K", "x":7.25, "y":1}, {"label":"L", "x":8.25, "y":1}, {"label":"Ent", "x":9.25, "y":1}, {"label":"Z", "x":0, "y":2, "w":1.75}, {"label":"X", "x":1.75, "y":2}, {"label":"C", "x":2.75, "y":2}, {"label":"V", "x":3.75, "y":2}, {"label":"B", "x":4.75, "y":2}, {"label":"N", "x":5.75, "y":2}, {"label":"M", "x":6.75, "y":2}, {"label":".", "x":7.75, "y":2}, {"label":"Shift","x":8.75, "y":2, "w":1.5},{"label":"Super", "x":0, "y":3}, {"label":"Meta", "x":1, "y":3}, {"label":"", "x":2, "y":3, "w":6.25}, {"label":"Meta", "x":8.25, "y":3},{"label":"Super", "x":9.25, "y":3}] + } + } +} diff --git a/keyboards/qaz/keymaps/default/config.h b/keyboards/qaz/keymaps/default/config.h new file mode 100644 index 000000000000..12482ff6fef5 --- /dev/null +++ b/keyboards/qaz/keymaps/default/config.h @@ -0,0 +1,6 @@ +#pragma once + +#ifdef COMBO_ENABLE +# define COMBO_COUNT 5 +# define COMBO_TERM 200 +#endif diff --git a/keyboards/qaz/keymaps/default/keymap.c b/keyboards/qaz/keymaps/default/keymap.c new file mode 100644 index 000000000000..cf721292a6af --- /dev/null +++ b/keyboards/qaz/keymaps/default/keymap.c @@ -0,0 +1,57 @@ +#include QMK_KEYBOARD_H + +enum layers{ + _BASE, + _NUM_SYM, + _NAV +}; +enum combo_events { + COMBO_BSPC, + COMBO_NUMBAK, + COMBO_TAB, + COMBO_ESC, + COMBO_DEL, +}; + +#define KC_NUM_SPC LT(_NUM_SYM, KC_SPC) +#define KC_GA LGUI_T(KC_A) +#define KC_AS LALT_T(KC_S) +#define KC_CD LCTL_T(KC_D) +#define KC_SF LSFT_T(KC_F) +#define KC_SJ RSFT_T(KC_J) +#define KC_CK RCTL_T(KC_K) +#define KC_AL RALT_T(KC_L) +#define KC_GSCLN RGUI_T(KC_SCLN) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_BASE] = LAYOUT_split_space( + KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, + KC_GA, KC_AS, KC_CD, KC_SF, KC_G, KC_H, KC_SJ, KC_CK, KC_AL, KC_ENT, + KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, + KC_LCTL, KC_LALT, KC_LGUI, KC_BSPC, LT(_NUM_SYM,KC_SPACE), KC_RALT, KC_RGUI, KC_RCTL + ), + + [_NUM_SYM] = LAYOUT_split_space( + KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, + KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_EQUAL, KC_MINS, + KC_LCBR, KC_LBRC, KC_LPRN, KC_UNDS, KC_RPRN, KC_RBRC, KC_RCBR, KC_SCLN, KC_QUOTE, + RGB_TOG, RGB_MOD, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ) +}; + +#ifdef COMBO_ENABLE +const uint16_t PROGMEM combo_bspc[] = {KC_O, KC_P, COMBO_END}; +const uint16_t PROGMEM combo_numbak[] = {KC_0, KC_9, COMBO_END}; +const uint16_t PROGMEM combo_tab[] = {KC_Q, KC_W, COMBO_END}; +const uint16_t PROGMEM combo_esc[] = {KC_E, KC_W, COMBO_END}; +const uint16_t PROGMEM combo_del[] = {KC_MINS, KC_EQL, COMBO_END}; + +combo_t key_combos[COMBO_COUNT] = { + [COMBO_BSPC] = COMBO(combo_bspc,KC_BSPC), + [COMBO_NUMBAK] = COMBO(combo_numbak,KC_BSPC), + [COMBO_TAB] = COMBO(combo_tab,KC_TAB), + [COMBO_ESC] = COMBO(combo_esc,KC_ESC), + [COMBO_DEL] = COMBO(combo_del,KC_DEL), + +}; +#endif diff --git a/keyboards/qaz/keymaps/default/readme.md b/keyboards/qaz/keymaps/default/readme.md new file mode 100644 index 000000000000..fb85d36e287e --- /dev/null +++ b/keyboards/qaz/keymaps/default/readme.md @@ -0,0 +1 @@ +# Default QAZ Layout diff --git a/keyboards/qaz/keymaps/default/rules.mk b/keyboards/qaz/keymaps/default/rules.mk new file mode 100644 index 000000000000..ab1e438182a3 --- /dev/null +++ b/keyboards/qaz/keymaps/default/rules.mk @@ -0,0 +1 @@ +COMBO_ENABLE = yes diff --git a/keyboards/qaz/keymaps/default_big_space/config.h b/keyboards/qaz/keymaps/default_big_space/config.h new file mode 100644 index 000000000000..12482ff6fef5 --- /dev/null +++ b/keyboards/qaz/keymaps/default_big_space/config.h @@ -0,0 +1,6 @@ +#pragma once + +#ifdef COMBO_ENABLE +# define COMBO_COUNT 5 +# define COMBO_TERM 200 +#endif diff --git a/keyboards/qaz/keymaps/default_big_space/keymap.c b/keyboards/qaz/keymaps/default_big_space/keymap.c new file mode 100644 index 000000000000..13f105add012 --- /dev/null +++ b/keyboards/qaz/keymaps/default_big_space/keymap.c @@ -0,0 +1,57 @@ +#include QMK_KEYBOARD_H + +enum layers{ + _BASE, + _NUM_SYM, + _NAV +}; +enum combo_events { + COMBO_BSPC, + COMBO_NUMBAK, + COMBO_TAB, + COMBO_ESC, + COMBO_DEL, +}; + +#define KC_NUM_SPC LT(_NUM_SYM, KC_SPC) +#define KC_GA LGUI_T(KC_A) +#define KC_AS LALT_T(KC_S) +#define KC_CD LCTL_T(KC_D) +#define KC_SF LSFT_T(KC_F) +#define KC_SJ RSFT_T(KC_J) +#define KC_CK RCTL_T(KC_K) +#define KC_AL RALT_T(KC_L) +#define KC_GSCLN RGUI_T(KC_SCLN) + +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_GA, KC_AS, KC_CD, KC_SF, KC_G, KC_H, KC_SJ, KC_CK, KC_AL, KC_ENT, + KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, + KC_LCTL, KC_LALT, LT(_NUM_SYM,KC_SPACE), KC_RGUI, KC_RCTL + ), + + [_NUM_SYM] = LAYOUT( + KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, + KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_EQUAL, KC_MINS, + KC_LCBR, KC_LBRC, KC_LPRN, KC_UNDS, KC_RPRN, KC_RBRC, KC_RCBR, KC_SCLN, KC_QUOTE, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ) +}; + +#ifdef COMBO_ENABLE +const uint16_t PROGMEM combo_bspc[] = {KC_O, KC_P, COMBO_END}; +const uint16_t PROGMEM combo_numbak[] = {KC_0, KC_9, COMBO_END}; +const uint16_t PROGMEM combo_tab[] = {KC_Q, KC_W, COMBO_END}; +const uint16_t PROGMEM combo_esc[] = {KC_E, KC_W, COMBO_END}; +const uint16_t PROGMEM combo_del[] = {KC_MINS, KC_EQL, COMBO_END}; + +combo_t key_combos[COMBO_COUNT] = { + [COMBO_BSPC] = COMBO(combo_bspc,KC_BSPC), + [COMBO_NUMBAK] = COMBO(combo_numbak,KC_BSPC), + [COMBO_TAB] = COMBO(combo_tab,KC_TAB), + [COMBO_ESC] = COMBO(combo_esc,KC_ESC), + [COMBO_DEL] = COMBO(combo_del,KC_DEL), + +}; +#endif diff --git a/keyboards/qaz/keymaps/default_big_space/readme.md b/keyboards/qaz/keymaps/default_big_space/readme.md new file mode 100644 index 000000000000..f1fc30c211f1 --- /dev/null +++ b/keyboards/qaz/keymaps/default_big_space/readme.md @@ -0,0 +1 @@ +# Default QAZ Layout full size spacebar diff --git a/keyboards/qaz/keymaps/default_big_space/rules.mk b/keyboards/qaz/keymaps/default_big_space/rules.mk new file mode 100644 index 000000000000..ab1e438182a3 --- /dev/null +++ b/keyboards/qaz/keymaps/default_big_space/rules.mk @@ -0,0 +1 @@ +COMBO_ENABLE = yes diff --git a/keyboards/qaz/keymaps/via/keymap.c b/keyboards/qaz/keymaps/via/keymap.c new file mode 100644 index 000000000000..92556c330e86 --- /dev/null +++ b/keyboards/qaz/keymaps/via/keymap.c @@ -0,0 +1,29 @@ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_split_space( + 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_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, + KC_LCTL, KC_LALT, KC_LGUI, KC_BSPC, KC_SPACE, KC_RALT, KC_RGUI, KC_RCTL + ), + + [1] = LAYOUT_split_space( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 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_split_space( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 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_split_space( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 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/qaz/keymaps/via/rules.mk b/keyboards/qaz/keymaps/via/rules.mk new file mode 100644 index 000000000000..74d66eb22cab --- /dev/null +++ b/keyboards/qaz/keymaps/via/rules.mk @@ -0,0 +1 @@ +VIA_ENABLE = yes diff --git a/keyboards/qaz/qaz.c b/keyboards/qaz/qaz.c new file mode 100644 index 000000000000..a9e72fa610f8 --- /dev/null +++ b/keyboards/qaz/qaz.c @@ -0,0 +1 @@ +#include "qaz.h" diff --git a/keyboards/qaz/qaz.h b/keyboards/qaz/qaz.h new file mode 100644 index 000000000000..aba68d3d2704 --- /dev/null +++ b/keyboards/qaz/qaz.h @@ -0,0 +1,33 @@ +#pragma once + +#include "quantum.h" + +#define XXX KC_NO + +#define LAYOUT_split_space( \ + K00, K01, K02, K03, K04, K05, K06, K40, K41, K42, \ + K10, K11, K12, K13, K14, K15, K16, K50, K51, K52, \ + K20, K21, K22, K23, K24, K25, K26, K43, K53, \ + K30, K31, K32, K33, K34, K35, K36, K44 \ +) { \ +{ K00, K01, K02, K03, K04, K05, K06 }, \ +{ 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, XXX, XXX }, \ +{ K50, K51, K52, K53, XXX, XXX, XXX } \ +} + +#define LAYOUT( \ + K00, K01, K02, K03, K04, K05, K06, K40, K41, K42, \ + K10, K11, K12, K13, K14, K15, K16, K50, K51, K52, \ + K20, K21, K22, K23, K24, K25, K26, K43, K53, \ + K30, K31, K34, K36, K44 \ +) { \ +{ K00, K01, K02, K03, K04, K05, K06 }, \ +{ K10, K11, K12, K13, K14, K15, K16 }, \ +{ K20, K21, K22, K23, K24, K25, K26 }, \ +{ K30, K31, XXX, XXX, K34, XXX, K36 }, \ +{ K40, K41, K42, K43, K44, XXX, XXX }, \ +{ K50, K51, K52, K53, XXX, XXX, XXX } \ +} diff --git a/keyboards/qaz/readme.md b/keyboards/qaz/readme.md new file mode 100644 index 000000000000..2f1e7fcc9a98 --- /dev/null +++ b/keyboards/qaz/readme.md @@ -0,0 +1,15 @@ +# QAZ + +![QAZ](https://i.imgur.com/kmxDneol.png) + +QAZ is a careful exercise in minimalism, leveraging advanced QMK magic like combos, tapdances and mod layers to unlock complete functionality while remaining oddly familiar. +Throw it in your fanny pack and hop on your fixed gear and away you go. QAZ is cheap, hip, and effective with all the keyboardy features you expect, including the ability to type numbers- should you choose to add them to your layout. + +* Keyboard Maintainer: [TJ Campie](https://github.com/tominabox1) +* Hardware Availability: 40s Discord Mini Group Buy + +Make example for this keyboard (after setting up your build environment): + + qmk compile -kb qaz -km 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/qaz/rules.mk b/keyboards/qaz/rules.mk new file mode 100644 index 000000000000..760e96e1c938 --- /dev/null +++ b/keyboards/qaz/rules.mk @@ -0,0 +1,22 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +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 = yes # Enable keyboard RGB underglow +BLUETOOTH_ENABLE = no # Enable Bluetooth +AUDIO_ENABLE = no # Audio output From 84cd07b0d3409d1bbb72691fd79c8a9a885363a0 Mon Sep 17 00:00:00 2001 From: Ladniy <32298096+Ladniy@users.noreply.github.com> Date: Tue, 28 Jul 2020 08:48:48 +0800 Subject: [PATCH 464/930] [Keyboard] Jiran keyboard (#9628) * Add jirand folder from local catalog * Add controller into readme * Replace image of PCB * Create rev2 folder for RGB version * Rename keymap folder * Add new rev for RGB light version * Change some keycodes for RGB light * Remove some unnecessary code * Add via keymap * Activate RBG light support * Update some info * Update layout image link * Update keyboards/jiran/config.h * Update keyboards/jiran/keymaps/via/config.h * Update keyboards/jiran/keymaps/default/rules.mk * Update keyboards/jiran/keymaps/default/readme.md * Update keyboards/jiran/keymaps/default/keymap.c * Update keyboards/jiran/rev1/config.h * Update keyboards/jiran/rev1/config.h * Update keyboards/jiran/rules.mk * Update keyboards/jiran/rules.mk * Update keyboards/jiran/rules.mk * Update keyboards/jiran/rev2/config.h * Update keyboards/jiran/rev2/config.h * Update keyboards/jiran/rules.mk * Update keyboards/jiran/rev2/rev1.c * Update keyboards/jiran/rules.mk * Update keyboards/jiran/rules.mk * Update keyboards/jiran/rules.mk * Some fix * Update keyboards/jiran/keymaps/default/keymap.c * Update keyboards/jiran/rev1/config.h * Update keyboards/jiran/rev1/config.h * Update keyboards/jiran/rev2/config.h * Fix default keymap error * Update keyboards/jiran/rules.mk * Update keyboards/jiran/rev2/rules.mk * Update keyboards/jiran/rev1/rules.mk * Update keyboards/jiran/config.h * Update keyboards/jiran/rev1/config.h * Update keyboards/jiran/rev2/config.h * Delete by request * Update keyboards/jiran/config.h * Update keyboards/jiran/keymaps/via/keymap.c * Update keyboards/jiran/rules.mk * Update keyboards/jiran/rules.mk * Update keyboards/jiran/rules.mk * Change some info by request * Update keyboards/jiran/rev1/rev1.h * Remove by request --- keyboards/jiran/config.h | 47 +++++++++++++++++ keyboards/jiran/jiran.c | 1 + keyboards/jiran/jiran.h | 11 ++++ keyboards/jiran/keymaps/default/config.h | 21 ++++++++ keyboards/jiran/keymaps/default/keymap.c | 47 +++++++++++++++++ keyboards/jiran/keymaps/default/readme.md | 6 +++ keyboards/jiran/keymaps/via/keymap.c | 61 +++++++++++++++++++++++ keyboards/jiran/keymaps/via/rules.mk | 2 + keyboards/jiran/readme.md | 15 ++++++ keyboards/jiran/rev1/config.h | 20 ++++++++ keyboards/jiran/rev1/rev1.c | 1 + keyboards/jiran/rev1/rev1.h | 26 ++++++++++ keyboards/jiran/rev1/rules.mk | 1 + keyboards/jiran/rev2/config.h | 28 +++++++++++ keyboards/jiran/rev2/rev2.c | 1 + keyboards/jiran/rev2/rev2.h | 24 +++++++++ keyboards/jiran/rev2/rules.mk | 1 + keyboards/jiran/rules.mk | 25 ++++++++++ 18 files changed, 338 insertions(+) create mode 100644 keyboards/jiran/config.h create mode 100644 keyboards/jiran/jiran.c create mode 100644 keyboards/jiran/jiran.h create mode 100644 keyboards/jiran/keymaps/default/config.h create mode 100644 keyboards/jiran/keymaps/default/keymap.c create mode 100644 keyboards/jiran/keymaps/default/readme.md create mode 100644 keyboards/jiran/keymaps/via/keymap.c create mode 100644 keyboards/jiran/keymaps/via/rules.mk create mode 100644 keyboards/jiran/readme.md create mode 100644 keyboards/jiran/rev1/config.h create mode 100644 keyboards/jiran/rev1/rev1.c create mode 100644 keyboards/jiran/rev1/rev1.h create mode 100644 keyboards/jiran/rev1/rules.mk create mode 100644 keyboards/jiran/rev2/config.h create mode 100644 keyboards/jiran/rev2/rev2.c create mode 100644 keyboards/jiran/rev2/rev2.h create mode 100644 keyboards/jiran/rev2/rules.mk create mode 100644 keyboards/jiran/rules.mk diff --git a/keyboards/jiran/config.h b/keyboards/jiran/config.h new file mode 100644 index 000000000000..da100292e2f4 --- /dev/null +++ b/keyboards/jiran/config.h @@ -0,0 +1,47 @@ +/* +Copyright 2020 Vladislav Morozov + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License 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 0x3735 +#define DEVICE_VER 0x0300 +#define MANUFACTURER Ladniy +#define PRODUCT Jiran + +/* key matrix size */ +// Rows are doubled-up +#define MATRIX_ROWS 10 +#define MATRIX_COLS 6 + +// wiring of each half +#define MATRIX_ROW_PINS { B4, B5, F4, F5, F6 } +#define MATRIX_COL_PINS { D3, D2, D4, C6, D7, E6 } + + +/* 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 D1 +#define MASTER_LEFT diff --git a/keyboards/jiran/jiran.c b/keyboards/jiran/jiran.c new file mode 100644 index 000000000000..71a8504c5ba8 --- /dev/null +++ b/keyboards/jiran/jiran.c @@ -0,0 +1 @@ +#include "jiran.h" diff --git a/keyboards/jiran/jiran.h b/keyboards/jiran/jiran.h new file mode 100644 index 000000000000..c8ae32b13502 --- /dev/null +++ b/keyboards/jiran/jiran.h @@ -0,0 +1,11 @@ +#pragma once + +#include "quantum.h" + +#ifdef KEYBOARD_jiran_rev1 + #include "rev1.h" +#endif + +#ifdef KEYBOARD_jiran_rev2 +#include "rev2.h" +#endif diff --git a/keyboards/jiran/keymaps/default/config.h b/keyboards/jiran/keymaps/default/config.h new file mode 100644 index 000000000000..b1020ed78c22 --- /dev/null +++ b/keyboards/jiran/keymaps/default/config.h @@ -0,0 +1,21 @@ +/* +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 \ No newline at end of file diff --git a/keyboards/jiran/keymaps/default/keymap.c b/keyboards/jiran/keymaps/default/keymap.c new file mode 100644 index 000000000000..586cd67a9396 --- /dev/null +++ b/keyboards/jiran/keymaps/default/keymap.c @@ -0,0 +1,47 @@ +#include QMK_KEYBOARD_H + +// Defines names for use in layer keycodes and the keymap +enum jiran_layers { + _QWERTY, + _LOWER +}; + +#define KC_RBGI RGUI_T(KC_RBRC) +#define KC_BSCT RCTL_T(KC_BSLS) +#define KC_QTSH RSFT_T(KC_QUOT) +#define KC_SLSF RSFT_T(KC_LSCR) +#define KC_NLCT RCTL_T(KC_LNUM) +#define KC_ETAL RALT_T(KC_ENT) +#define LOWER MO(_LOWER) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [_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_MINS, + // ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┼────────┐ + KC_LGUI, KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBGI, + // └────────┼────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┼────────┘ + KC_LSFT, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QTSH, + // ├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤ + KC_LCTL, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_BSCT, + // └────────┴────────┴────────┴────────┼────────┼────────┤ ├────────┼────────┼────────┴────────┴────────┴────────┘ + LOWER, KC_SPC, KC_LALT, KC_ETAL, KC_BSPC, LOWER + // └────────┴────────┴────────┘ └────────┴────────┴────────┘ + ), + + [_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_EQL, + // ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┼────────┐ + KC_F11, KC_TAB, RGB_HUI, KC_HOME, RESET, RGB_SAI, RGB_VAI, KC_VOLU, KC_PGUP, RESET, KC_HOME, KC_INS, KC_DEL, KC_F12, + // └────────┼────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┼────────┘ + KC_LSFT, RGB_HUD, KC_LEFT, KC_UP, KC_RGHT, RGB_VAD, KC_MUTE, KC_LEFT, KC_UP, KC_RGHT, KC_PSCR, KC_SLSF, + // ├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤ + KC_LCTL, RGB_M_B, KC_END, KC_DOWN, RGB_SAD, RGB_TOG, KC_VOLD, KC_PGDN, KC_DOWN, KC_END, KC_PAUS, KC_NLCT, + // └────────┴────────┴────────┴────────┼────────┼────────┤ ├────────┼────────┴────────┴────────┴────────┴────────┘ + KC_TRNS, KC_SPC, KC_LALT, KC_ETAL, KC_BSPC, KC_TRNS + // └────────┴────────┴────────┘ └────────┴────────┴────────┘ + ), + +}; diff --git a/keyboards/jiran/keymaps/default/readme.md b/keyboards/jiran/keymaps/default/readme.md new file mode 100644 index 000000000000..8c6bdb272b04 --- /dev/null +++ b/keyboards/jiran/keymaps/default/readme.md @@ -0,0 +1,6 @@ +# Default Jiran Layout + +![Jiran layout Image](https://i.imgur.com/xxmekHU.png) + +This is the default layout that comes with every Jiran from the buy groups. +Layout contains all the keys with a standard 104 keys keyboard. diff --git a/keyboards/jiran/keymaps/via/keymap.c b/keyboards/jiran/keymaps/via/keymap.c new file mode 100644 index 000000000000..710cb81ec4b1 --- /dev/null +++ b/keyboards/jiran/keymaps/via/keymap.c @@ -0,0 +1,61 @@ +#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_LGUI, KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, RGUI_T(KC_RBRC), + // └────────┼────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┼────────┘ + KC_LSFT, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, RSFT_T(KC_QUOT), + // ├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤ + KC_LCTL, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, RCTL_T(KC_BSLS), + // └────────┴────────┴────────┴────────┼────────┼────────┤ ├────────┼────────┼────────┴────────┴────────┴────────┘ + MO(1), KC_SPC, KC_LALT, RALT_T(KC_ENT), KC_BSPC, MO(1) + // └────────┴────────┴────────┘ └────────┴────────┴────────┘ + ), + + [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_EQL, + // ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┼────────┐ + KC_F11, KC_TAB, RGB_HUI, KC_HOME, RESET, RGB_SAI, RGB_VAI, KC_VOLU, KC_PGUP, RESET, KC_HOME, KC_INS, KC_DEL, KC_F12, + // └────────┼────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┼────────┘ + KC_LSFT, RGB_HUD, KC_LEFT, KC_UP, KC_RGHT, RGB_VAD, KC_MUTE, KC_LEFT, KC_UP, KC_RGHT, KC_PSCR, RSFT_T(KC_LSCR), + // ├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤ + KC_LCTL, RGB_M_B, KC_END, KC_DOWN, RGB_SAD, RGB_TOG, KC_VOLD, KC_PGDN, KC_DOWN, KC_END, KC_PAUS, RCTL_T(KC_LNUM), + // └────────┴────────┴────────┴────────┼────────┼────────┤ ├────────┼────────┴────────┴────────┴────────┴────────┘ + KC_TRNS, KC_SPC, KC_LALT, RALT_T(KC_ENT), KC_BSPC, KC_TRNS + // └────────┴────────┴────────┘ └────────┴────────┴────────┘ + ), + + [2] = LAYOUT( + // ┌────────┬────────┬────────┬────────┬────────┬────────┐ ┌────────┬────────┬────────┬────────┬────────┬────────┐ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + // ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┼────────┐ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + // └────────┼────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┼────────┘ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + // ├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + // └────────┴────────┴────────┴────────┼────────┼────────┤ ├────────┼────────┴────────┴────────┴────────┴────────┘ + _______, _______, _______, _______, _______, _______ + // └────────┴────────┴────────┘ └────────┴────────┴────────┘ + ), + + [3] = LAYOUT( + // ┌────────┬────────┬────────┬────────┬────────┬────────┐ ┌────────┬────────┬────────┬────────┬────────┬────────┐ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + // ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┼────────┐ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + // └────────┼────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┼────────┘ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + // ├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + // └────────┴────────┴────────┴────────┼────────┼────────┤ ├────────┼────────┴────────┴────────┴────────┴────────┘ + _______, _______, _______, _______, _______, _______ + // └────────┴────────┴────────┘ └────────┴────────┴────────┘ + ), + +}; diff --git a/keyboards/jiran/keymaps/via/rules.mk b/keyboards/jiran/keymaps/via/rules.mk new file mode 100644 index 000000000000..fa239f1d5421 --- /dev/null +++ b/keyboards/jiran/keymaps/via/rules.mk @@ -0,0 +1,2 @@ +VIA_ENABLE = yes +EXTRAKEY_ENABLE = yes \ No newline at end of file diff --git a/keyboards/jiran/readme.md b/keyboards/jiran/readme.md new file mode 100644 index 000000000000..13dc8963df9b --- /dev/null +++ b/keyboards/jiran/readme.md @@ -0,0 +1,15 @@ +# Jiran + +![Jiran](https://i.imgur.com/HnA2Onc.png) + +A 6x4 matrix ergo keyboard with additional 3 thumb and 1 pinky keys for full cyrillic layout. [More info on GitHub](https://github.com/Ladniy/jiran-breakoff) + +* Keyboard Maintainer: [Ladniy](https://github.com/Ladniy) +* Hardware Supported: Jiran PCB rev1, rev2, Pro Micro +* Hardware Availability: [Open Source](https://github.com/Ladniy/jiran-breakoff) + +Make example for this keyboard (after setting up your build environment): + + make jiran: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/jiran/rev1/config.h b/keyboards/jiran/rev1/config.h new file mode 100644 index 000000000000..d676c4b6b00d --- /dev/null +++ b/keyboards/jiran/rev1/config.h @@ -0,0 +1,20 @@ +/* +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 BACKLIGHT_PIN B6 +#define BACKLIGHT_LEVELS 5 diff --git a/keyboards/jiran/rev1/rev1.c b/keyboards/jiran/rev1/rev1.c new file mode 100644 index 000000000000..9aedcc130ac3 --- /dev/null +++ b/keyboards/jiran/rev1/rev1.c @@ -0,0 +1 @@ +#include "rev1.h" \ No newline at end of file diff --git a/keyboards/jiran/rev1/rev1.h b/keyboards/jiran/rev1/rev1.h new file mode 100644 index 000000000000..6d5ea99dac76 --- /dev/null +++ b/keyboards/jiran/rev1/rev1.h @@ -0,0 +1,26 @@ +#pragma once + +#include "jiran.h" +#include "quantum.h" + + + +#define LAYOUT( \ + L00, L01, L02, L03, L04, L05, R00, R01, R02, R03, R04, R05, \ + L40, L10, L11, L12, L13, L14, L15, R10, R11, R12, R13, R14, R15, R45, \ + L20, L21, L22, L23, L24, L25, R20, R21, R22, R23, R24, R25, \ + L30, L31, L32, L33, L34, L35, R30, R31, R32, R33, R34, R35, \ + L43, L44, L45, R40, R41, R42 \ + ) \ + { \ + { 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, KC_NO, KC_NO, L43, L44, L45, }, \ + { R05, R04, R03, R02, R01, R00 }, \ + { R15, R14, R13, R12, R11, R10 }, \ + { R25, R24, R23, R22, R21, R20 }, \ + { R35, R34, R33, R32, R31, R30 }, \ + { R45, KC_NO, KC_NO, R42, R41, R40 } \ + } diff --git a/keyboards/jiran/rev1/rules.mk b/keyboards/jiran/rev1/rules.mk new file mode 100644 index 000000000000..bd518d8f273f --- /dev/null +++ b/keyboards/jiran/rev1/rules.mk @@ -0,0 +1 @@ +BACKLIGHT_ENABLE = yes diff --git a/keyboards/jiran/rev2/config.h b/keyboards/jiran/rev2/config.h new file mode 100644 index 000000000000..bc216be495cb --- /dev/null +++ b/keyboards/jiran/rev2/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 RGB_DI_PIN B6 +#define RGBLIGHT_ANIMATIONS +#define RGBLED_NUM 56 +#define RGBLIGHT_SPLIT +#define RGBLED_SPLIT { 28, 28 } +#define RGBLIGHT_HUE_STEP 10 +#define RGBLIGHT_SAT_STEP 17 +#define RGBLIGHT_VAL_STEP 17 +#define RGBLIGHT_LIMIT_VAL 255 diff --git a/keyboards/jiran/rev2/rev2.c b/keyboards/jiran/rev2/rev2.c new file mode 100644 index 000000000000..b1af81707d29 --- /dev/null +++ b/keyboards/jiran/rev2/rev2.c @@ -0,0 +1 @@ +#include "rev2.h" diff --git a/keyboards/jiran/rev2/rev2.h b/keyboards/jiran/rev2/rev2.h new file mode 100644 index 000000000000..616497b3ca18 --- /dev/null +++ b/keyboards/jiran/rev2/rev2.h @@ -0,0 +1,24 @@ +#pragma once + +#include "jiran.h" +#include "quantum.h" + +#define LAYOUT( \ + L00, L01, L02, L03, L04, L05, R00, R01, R02, R03, R04, R05, \ + L40, L10, L11, L12, L13, L14, L15, R10, R11, R12, R13, R14, R15, R45, \ + L20, L21, L22, L23, L24, L25, R20, R21, R22, R23, R24, R25, \ + L30, L31, L32, L33, L34, L35, R30, R31, R32, R33, R34, R35, \ + L43, L44, L45, R40, R41, R42 \ + ) \ + { \ + { 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, KC_NO, KC_NO, L43, L44, L45, }, \ + { R05, R04, R03, R02, R01, R00 }, \ + { R15, R14, R13, R12, R11, R10 }, \ + { R25, R24, R23, R22, R21, R20 }, \ + { R35, R34, R33, R32, R31, R30 }, \ + { R45, KC_NO, KC_NO, R42, R41, R40 } \ + } diff --git a/keyboards/jiran/rev2/rules.mk b/keyboards/jiran/rev2/rules.mk new file mode 100644 index 000000000000..1e3cebb14515 --- /dev/null +++ b/keyboards/jiran/rev2/rules.mk @@ -0,0 +1 @@ +RGBLIGHT_ENABLE = yes diff --git a/keyboards/jiran/rules.mk b/keyboards/jiran/rules.mk new file mode 100644 index 000000000000..9156f166f737 --- /dev/null +++ b/keyboards/jiran/rules.mk @@ -0,0 +1,25 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +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 = no # Enable keyboard RGB underglow +BLUETOOTH_ENABLE = no # Enable Bluetooth +AUDIO_ENABLE = no # Audio output +SPLIT_KEYBOARD = yes + +DEFAULT_FOLDER = jiran/rev1 From f5fe6fe5cc352760971c374ed097f2fe4ad2427e Mon Sep 17 00:00:00 2001 From: Krishna Mani <34562820+kmani314@users.noreply.github.com> Date: Mon, 27 Jul 2020 18:40:57 -0700 Subject: [PATCH 465/930] [Keyboard] Add akegata denki device one (#9690) * add device one * fix layouts * add other layouts * column fixes, device id changes * layouts cleanup, add readme * add info.json, fix readme * add template readme * add smaller image * fix image links, address requested changes * Apply suggestions from code review * Update keyboards/device_one/keymaps/ansi_split_backspace/keymap.c * add akegata vendor folder * Apply suggestions from code review --- .../device_one/boards/DEVICE_ONE/board.c | 263 +++++ .../device_one/boards/DEVICE_ONE/board.h | 950 ++++++++++++++++++ .../device_one/boards/DEVICE_ONE/board.mk | 5 + keyboards/akegata_denki/device_one/chconf.h | 711 +++++++++++++ keyboards/akegata_denki/device_one/config.h | 18 + .../akegata_denki/device_one/device_one.c | 1 + .../akegata_denki/device_one/device_one.h | 59 ++ keyboards/akegata_denki/device_one/halconf.h | 525 ++++++++++ keyboards/akegata_denki/device_one/info.json | 21 + .../keymaps/ansi_arrow_keys/keymap.c | 19 + .../keymaps/ansi_split_backspace/keymap.c | 19 + .../device_one/keymaps/default/keymap.c | 20 + .../device_one/keymaps/iso/keymap.c | 18 + keyboards/akegata_denki/device_one/mcuconf.h | 187 ++++ keyboards/akegata_denki/device_one/readme.md | 15 + keyboards/akegata_denki/device_one/rules.mk | 21 + keyboards/hs60/v1/keymaps/default/keymap.c | 2 +- keyboards/vinta/vinta.c | 2 +- 18 files changed, 2854 insertions(+), 2 deletions(-) create mode 100644 keyboards/akegata_denki/device_one/boards/DEVICE_ONE/board.c create mode 100644 keyboards/akegata_denki/device_one/boards/DEVICE_ONE/board.h create mode 100644 keyboards/akegata_denki/device_one/boards/DEVICE_ONE/board.mk create mode 100644 keyboards/akegata_denki/device_one/chconf.h create mode 100644 keyboards/akegata_denki/device_one/config.h create mode 100644 keyboards/akegata_denki/device_one/device_one.c create mode 100644 keyboards/akegata_denki/device_one/device_one.h create mode 100644 keyboards/akegata_denki/device_one/halconf.h create mode 100644 keyboards/akegata_denki/device_one/info.json create mode 100644 keyboards/akegata_denki/device_one/keymaps/ansi_arrow_keys/keymap.c create mode 100644 keyboards/akegata_denki/device_one/keymaps/ansi_split_backspace/keymap.c create mode 100644 keyboards/akegata_denki/device_one/keymaps/default/keymap.c create mode 100644 keyboards/akegata_denki/device_one/keymaps/iso/keymap.c create mode 100644 keyboards/akegata_denki/device_one/mcuconf.h create mode 100644 keyboards/akegata_denki/device_one/readme.md create mode 100644 keyboards/akegata_denki/device_one/rules.mk diff --git a/keyboards/akegata_denki/device_one/boards/DEVICE_ONE/board.c b/keyboards/akegata_denki/device_one/boards/DEVICE_ONE/board.c new file mode 100644 index 000000000000..8e0303523a02 --- /dev/null +++ b/keyboards/akegata_denki/device_one/boards/DEVICE_ONE/board.c @@ -0,0 +1,263 @@ +/* + 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. + 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" +#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; + +/** + * @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 + {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_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. */ +/*===========================================================================*/ + +/** + * @brief Early initialization code. + * @details GPIO ports and system clocks are initialized before everything + * else. + */ +void __early_init(void) { + + 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. + */ +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/keyboards/akegata_denki/device_one/boards/DEVICE_ONE/board.h b/keyboards/akegata_denki/device_one/boards/DEVICE_ONE/board.h new file mode 100644 index 000000000000..3c4f3f2e82b4 --- /dev/null +++ b/keyboards/akegata_denki/device_one/boards/DEVICE_ONE/board.h @@ -0,0 +1,950 @@ +/* + 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. + 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 + +/*===========================================================================*/ +/* Driver constants. */ +/*===========================================================================*/ + +/* + * Setup for STMicroelectronics STM32 Nucleo32-F042K6 board. + */ + +/* + * Board identifier. + */ +#define BOARD_ST_NUCLEO32_F042K6 +#define BOARD_NAME "STMicroelectronics STM32 Nucleo32-F042K6" + +/* + * 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 + +/* + * MCU type as defined in the ST header. + */ +#define STM32F042x6 + +/* + * IO pins assignments. + */ +#define GPIOA_ARD_A0 0U +#define GPIOA_ARD_A1 1U +#define GPIOA_VCP_TX 2U +#define GPIOA_ARD_A2 3U +#define GPIOA_ARD_A3 4U +#define GPIOA_ARD_A4 5U +#define GPIOA_ARD_A5 6U +#define GPIOA_ARD_A6 7U +#define GPIOA_ARD_D9 8U +#define GPIOA_ARD_D1 9U +#define GPIOA_ARD_D0 10U +#define GPIOA_ARD_D10 11U +#define GPIOA_ARD_D2 12U +#define GPIOA_SWDIO 13U +#define GPIOA_SWCLK 14U +#define GPIOA_VCP_RX 15U + +#define GPIOB_ARD_D3 0U +#define GPIOB_ARD_D6 1U +#define GPIOB_PIN2 2U +#define GPIOB_ARD_D13 3U +#define GPIOB_LED_GREEN 3U +#define GPIOB_ARD_D12 4U +#define GPIOB_ARD_D11 5U +#define GPIOB_ARD_D5 6U +#define GPIOB_ARD_A5_ALT 6U +#define GPIOB_ARD_D4 7U +#define GPIOB_ARD_A4_ALT 7U +#define GPIOB_PIN8 8U +#define GPIOB_PIN9 9U +#define GPIOB_PIN10 10U +#define GPIOB_PIN11 11U +#define GPIOB_PIN12 12U +#define GPIOB_PIN13 13U +#define GPIOB_PIN14 14U +#define GPIOB_PIN15 15U + +#define GPIOC_PIN0 0U +#define GPIOC_PIN1 1U +#define GPIOC_PIN2 2U +#define GPIOC_PIN3 3U +#define GPIOC_PIN4 4U +#define GPIOC_PIN5 5U +#define GPIOC_PIN6 6U +#define GPIOC_PIN7 7U +#define GPIOC_PIN8 8U +#define GPIOC_PIN9 9U +#define GPIOC_PIN10 10U +#define GPIOC_PIN11 11U +#define GPIOC_PIN12 12U +#define GPIOC_PIN13 13U +#define GPIOC_PIN14 14U +#define GPIOC_PIN15 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_ARD_D7 0U +#define GPIOF_ARD_D8 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_ARD_A0 PAL_LINE(GPIOA, 0U) +#define LINE_ARD_A1 PAL_LINE(GPIOA, 1U) +#define LINE_VCP_TX PAL_LINE(GPIOA, 2U) +#define LINE_ARD_A2 PAL_LINE(GPIOA, 3U) +#define LINE_ARD_A3 PAL_LINE(GPIOA, 4U) +#define LINE_ARD_A4 PAL_LINE(GPIOA, 5U) +#define LINE_ARD_A5 PAL_LINE(GPIOA, 6U) +#define LINE_ARD_A6 PAL_LINE(GPIOA, 7U) +#define LINE_ARD_D9 PAL_LINE(GPIOA, 8U) +#define LINE_ARD_D1 PAL_LINE(GPIOA, 9U) +#define LINE_ARD_D0 PAL_LINE(GPIOA, 10U) +#define LINE_ARD_D10 PAL_LINE(GPIOA, 11U) +#define LINE_ARD_D2 PAL_LINE(GPIOA, 12U) +#define LINE_SWDIO PAL_LINE(GPIOA, 13U) +#define LINE_SWCLK PAL_LINE(GPIOA, 14U) +#define LINE_VCP_RX PAL_LINE(GPIOA, 15U) +#define LINE_ARD_D3 PAL_LINE(GPIOB, 0U) +#define LINE_ARD_D6 PAL_LINE(GPIOB, 1U) +#define LINE_ARD_D13 PAL_LINE(GPIOB, 3U) +#define LINE_LED_GREEN PAL_LINE(GPIOB, 3U) +#define LINE_ARD_D12 PAL_LINE(GPIOB, 4U) +#define LINE_ARD_D11 PAL_LINE(GPIOB, 5U) +#define LINE_ARD_D5 PAL_LINE(GPIOB, 6U) +#define LINE_ARD_A5_ALT PAL_LINE(GPIOB, 6U) +#define LINE_ARD_D4 PAL_LINE(GPIOB, 7U) +#define LINE_ARD_A4_ALT PAL_LINE(GPIOB, 7U) +#define LINE_ARD_D7 PAL_LINE(GPIOF, 0U) +#define LINE_ARD_D8 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. + * 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 - ARD_A0 (input pullup). + * PA1 - ARD_A1 (input pullup). + * PA2 - VCP_TX (alternate 1). + * PA3 - ARD_A2 (input pullup). + * PA4 - ARD_A3 (input pullup). + * PA5 - ARD_A4 (input pullup). + * PA6 - ARD_A5 (input pullup). + * PA7 - ARD_A6 (input pullup). + * PA8 - ARD_D9 (input pullup). + * PA9 - ARD_D1 (input pullup). + * PA10 - ARD_D0 (input pullup). + * PA11 - ARD_D10 (input pullup). + * PA12 - ARD_D2 (input pullup). + * PA13 - SWDIO (alternate 0). + * PA14 - SWCLK (alternate 0). + * PA15 - VCP_RX (alternate 1). + */ +#define VAL_GPIOA_MODER (PIN_MODE_INPUT(GPIOA_ARD_A0) | \ + PIN_MODE_INPUT(GPIOA_ARD_A1) | \ + PIN_MODE_ALTERNATE(GPIOA_VCP_TX) | \ + PIN_MODE_INPUT(GPIOA_ARD_A2) | \ + PIN_MODE_INPUT(GPIOA_ARD_A3) | \ + PIN_MODE_INPUT(GPIOA_ARD_A4) | \ + PIN_MODE_INPUT(GPIOA_ARD_A5) | \ + PIN_MODE_INPUT(GPIOA_ARD_A6) | \ + PIN_MODE_INPUT(GPIOA_ARD_D9) | \ + PIN_MODE_INPUT(GPIOA_ARD_D1) | \ + PIN_MODE_INPUT(GPIOA_ARD_D0) | \ + PIN_MODE_INPUT(GPIOA_ARD_D10) | \ + PIN_MODE_INPUT(GPIOA_ARD_D2) | \ + PIN_MODE_ALTERNATE(GPIOA_SWDIO) | \ + PIN_MODE_ALTERNATE(GPIOA_SWCLK) | \ + PIN_MODE_ALTERNATE(GPIOA_VCP_RX)) +#define VAL_GPIOA_OTYPER (PIN_OTYPE_PUSHPULL(GPIOA_ARD_A0) | \ + PIN_OTYPE_PUSHPULL(GPIOA_ARD_A1) | \ + PIN_OTYPE_PUSHPULL(GPIOA_VCP_TX) | \ + PIN_OTYPE_PUSHPULL(GPIOA_ARD_A2) | \ + PIN_OTYPE_PUSHPULL(GPIOA_ARD_A3) | \ + PIN_OTYPE_PUSHPULL(GPIOA_ARD_A4) | \ + PIN_OTYPE_PUSHPULL(GPIOA_ARD_A5) | \ + PIN_OTYPE_PUSHPULL(GPIOA_ARD_A6) | \ + PIN_OTYPE_PUSHPULL(GPIOA_ARD_D9) | \ + PIN_OTYPE_PUSHPULL(GPIOA_ARD_D1) | \ + PIN_OTYPE_PUSHPULL(GPIOA_ARD_D0) | \ + PIN_OTYPE_PUSHPULL(GPIOA_ARD_D10) | \ + PIN_OTYPE_PUSHPULL(GPIOA_ARD_D2) | \ + PIN_OTYPE_PUSHPULL(GPIOA_SWDIO) | \ + PIN_OTYPE_PUSHPULL(GPIOA_SWCLK) | \ + PIN_OTYPE_PUSHPULL(GPIOA_VCP_RX)) +#define VAL_GPIOA_OSPEEDR (PIN_OSPEED_HIGH(GPIOA_ARD_A0) | \ + PIN_OSPEED_HIGH(GPIOA_ARD_A1) | \ + PIN_OSPEED_LOW(GPIOA_VCP_TX) | \ + PIN_OSPEED_LOW(GPIOA_ARD_A2) | \ + PIN_OSPEED_HIGH(GPIOA_ARD_A3) | \ + PIN_OSPEED_LOW(GPIOA_ARD_A4) | \ + PIN_OSPEED_HIGH(GPIOA_ARD_A5) | \ + PIN_OSPEED_HIGH(GPIOA_ARD_A6) | \ + PIN_OSPEED_HIGH(GPIOA_ARD_D9) | \ + PIN_OSPEED_HIGH(GPIOA_ARD_D1) | \ + PIN_OSPEED_HIGH(GPIOA_ARD_D0) | \ + PIN_OSPEED_HIGH(GPIOA_ARD_D10) | \ + PIN_OSPEED_HIGH(GPIOA_ARD_D2) | \ + PIN_OSPEED_HIGH(GPIOA_SWDIO) | \ + PIN_OSPEED_HIGH(GPIOA_SWCLK) | \ + PIN_OSPEED_HIGH(GPIOA_VCP_RX)) +#define VAL_GPIOA_PUPDR (PIN_PUPDR_PULLUP(GPIOA_ARD_A0) | \ + PIN_PUPDR_PULLUP(GPIOA_ARD_A1) | \ + PIN_PUPDR_FLOATING(GPIOA_VCP_TX) | \ + PIN_PUPDR_PULLUP(GPIOA_ARD_A2) | \ + PIN_PUPDR_PULLUP(GPIOA_ARD_A3) | \ + PIN_PUPDR_PULLUP(GPIOA_ARD_A4) | \ + PIN_PUPDR_PULLUP(GPIOA_ARD_A5) | \ + PIN_PUPDR_PULLUP(GPIOA_ARD_A6) | \ + PIN_PUPDR_PULLUP(GPIOA_ARD_D9) | \ + PIN_PUPDR_PULLUP(GPIOA_ARD_D1) | \ + PIN_PUPDR_PULLUP(GPIOA_ARD_D0) | \ + PIN_PUPDR_PULLUP(GPIOA_ARD_D10) | \ + PIN_PUPDR_PULLUP(GPIOA_ARD_D2) | \ + PIN_PUPDR_PULLUP(GPIOA_SWDIO) | \ + PIN_PUPDR_PULLDOWN(GPIOA_SWCLK) | \ + PIN_PUPDR_FLOATING(GPIOA_VCP_RX)) +#define VAL_GPIOA_ODR (PIN_ODR_HIGH(GPIOA_ARD_A0) | \ + PIN_ODR_HIGH(GPIOA_ARD_A1) | \ + PIN_ODR_HIGH(GPIOA_VCP_TX) | \ + PIN_ODR_HIGH(GPIOA_ARD_A2) | \ + PIN_ODR_HIGH(GPIOA_ARD_A3) | \ + PIN_ODR_LOW(GPIOA_ARD_A4) | \ + PIN_ODR_HIGH(GPIOA_ARD_A5) | \ + PIN_ODR_HIGH(GPIOA_ARD_A6) | \ + PIN_ODR_HIGH(GPIOA_ARD_D9) | \ + PIN_ODR_HIGH(GPIOA_ARD_D1) | \ + PIN_ODR_HIGH(GPIOA_ARD_D0) | \ + PIN_ODR_HIGH(GPIOA_ARD_D10) | \ + PIN_ODR_HIGH(GPIOA_ARD_D2) | \ + PIN_ODR_HIGH(GPIOA_SWDIO) | \ + PIN_ODR_HIGH(GPIOA_SWCLK) | \ + PIN_ODR_HIGH(GPIOA_VCP_RX)) +#define VAL_GPIOA_AFRL (PIN_AFIO_AF(GPIOA_ARD_A0, 0U) | \ + PIN_AFIO_AF(GPIOA_ARD_A1, 0U) | \ + PIN_AFIO_AF(GPIOA_VCP_TX, 1U) | \ + PIN_AFIO_AF(GPIOA_ARD_A2, 0U) | \ + PIN_AFIO_AF(GPIOA_ARD_A3, 0U) | \ + PIN_AFIO_AF(GPIOA_ARD_A4, 0U) | \ + PIN_AFIO_AF(GPIOA_ARD_A5, 0U) | \ + PIN_AFIO_AF(GPIOA_ARD_A6, 0U)) +#define VAL_GPIOA_AFRH (PIN_AFIO_AF(GPIOA_ARD_D9, 0U) | \ + PIN_AFIO_AF(GPIOA_ARD_D1, 0U) | \ + PIN_AFIO_AF(GPIOA_ARD_D0, 0U) | \ + PIN_AFIO_AF(GPIOA_ARD_D10, 0U) | \ + PIN_AFIO_AF(GPIOA_ARD_D2, 0U) | \ + PIN_AFIO_AF(GPIOA_SWDIO, 0U) | \ + PIN_AFIO_AF(GPIOA_SWCLK, 0U) | \ + PIN_AFIO_AF(GPIOA_VCP_RX, 1U)) + +/* + * GPIOB setup: + * + * PB0 - ARD_D3 (input pullup). + * PB1 - ARD_D6 (input pullup). + * PB2 - PIN2 (input pullup). + * PB3 - ARD_D13 LED_GREEN (output pushpull maximum). + * PB4 - ARD_D12 (input pullup). + * PB5 - ARD_D11 (input pullup). + * PB6 - ARD_D5 ARD_A5_ALT (input pullup). + * PB7 - ARD_D4 ARD_A4_ALT (input pullup). + * PB8 - PIN8 (input pullup). + * PB9 - PIN9 (input pullup). + * PB10 - PIN10 (input pullup). + * PB11 - PIN11 (input pullup). + * PB12 - PIN12 (input pullup). + * PB13 - PIN13 (input pullup). + * PB14 - PIN14 (input pullup). + * PB15 - PIN15 (input pullup). + */ +#define VAL_GPIOB_MODER (PIN_MODE_INPUT(GPIOB_ARD_D3) | \ + PIN_MODE_INPUT(GPIOB_ARD_D6) | \ + PIN_MODE_INPUT(GPIOB_PIN2) | \ + PIN_MODE_OUTPUT(GPIOB_ARD_D13) | \ + PIN_MODE_INPUT(GPIOB_ARD_D12) | \ + PIN_MODE_INPUT(GPIOB_ARD_D11) | \ + PIN_MODE_INPUT(GPIOB_ARD_D5) | \ + PIN_MODE_INPUT(GPIOB_ARD_D4) | \ + 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_INPUT(GPIOB_PIN13) | \ + PIN_MODE_INPUT(GPIOB_PIN14) | \ + PIN_MODE_INPUT(GPIOB_PIN15)) +#define VAL_GPIOB_OTYPER (PIN_OTYPE_PUSHPULL(GPIOB_ARD_D3) | \ + PIN_OTYPE_PUSHPULL(GPIOB_ARD_D6) | \ + PIN_OTYPE_PUSHPULL(GPIOB_PIN2) | \ + PIN_OTYPE_PUSHPULL(GPIOB_ARD_D13) | \ + PIN_OTYPE_PUSHPULL(GPIOB_ARD_D12) | \ + PIN_OTYPE_PUSHPULL(GPIOB_ARD_D11) | \ + PIN_OTYPE_PUSHPULL(GPIOB_ARD_D5) | \ + PIN_OTYPE_PUSHPULL(GPIOB_ARD_D4) | \ + 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_PIN13) | \ + PIN_OTYPE_PUSHPULL(GPIOB_PIN14) | \ + PIN_OTYPE_PUSHPULL(GPIOB_PIN15)) +#define VAL_GPIOB_OSPEEDR (PIN_OSPEED_HIGH(GPIOB_ARD_D3) | \ + PIN_OSPEED_HIGH(GPIOB_ARD_D6) | \ + PIN_OSPEED_HIGH(GPIOB_PIN2) | \ + PIN_OSPEED_HIGH(GPIOB_ARD_D13) | \ + PIN_OSPEED_HIGH(GPIOB_ARD_D12) | \ + PIN_OSPEED_HIGH(GPIOB_ARD_D11) | \ + PIN_OSPEED_HIGH(GPIOB_ARD_D5) | \ + PIN_OSPEED_HIGH(GPIOB_ARD_D4) | \ + PIN_OSPEED_HIGH(GPIOB_PIN8) | \ + PIN_OSPEED_HIGH(GPIOB_PIN9) | \ + PIN_OSPEED_HIGH(GPIOB_PIN10) | \ + PIN_OSPEED_HIGH(GPIOB_PIN11) | \ + PIN_OSPEED_HIGH(GPIOB_PIN12) | \ + PIN_OSPEED_HIGH(GPIOB_PIN13) | \ + PIN_OSPEED_HIGH(GPIOB_PIN14) | \ + PIN_OSPEED_HIGH(GPIOB_PIN15)) +#define VAL_GPIOB_PUPDR (PIN_PUPDR_PULLUP(GPIOB_ARD_D3) | \ + PIN_PUPDR_PULLUP(GPIOB_ARD_D6) | \ + PIN_PUPDR_PULLUP(GPIOB_PIN2) | \ + PIN_PUPDR_FLOATING(GPIOB_ARD_D13) | \ + PIN_PUPDR_PULLUP(GPIOB_ARD_D12) | \ + PIN_PUPDR_PULLUP(GPIOB_ARD_D11) | \ + PIN_PUPDR_PULLUP(GPIOB_ARD_D5) | \ + PIN_PUPDR_PULLUP(GPIOB_ARD_D4) | \ + 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_PULLUP(GPIOB_PIN13) | \ + PIN_PUPDR_PULLUP(GPIOB_PIN14) | \ + PIN_PUPDR_PULLUP(GPIOB_PIN15)) +#define VAL_GPIOB_ODR (PIN_ODR_HIGH(GPIOB_ARD_D3) | \ + PIN_ODR_HIGH(GPIOB_ARD_D6) | \ + PIN_ODR_HIGH(GPIOB_PIN2) | \ + PIN_ODR_LOW(GPIOB_ARD_D13) | \ + PIN_ODR_HIGH(GPIOB_ARD_D12) | \ + PIN_ODR_HIGH(GPIOB_ARD_D11) | \ + PIN_ODR_HIGH(GPIOB_ARD_D5) | \ + PIN_ODR_HIGH(GPIOB_ARD_D4) | \ + 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_PIN13) | \ + PIN_ODR_HIGH(GPIOB_PIN14) | \ + PIN_ODR_HIGH(GPIOB_PIN15)) +#define VAL_GPIOB_AFRL (PIN_AFIO_AF(GPIOB_ARD_D3, 0U) | \ + PIN_AFIO_AF(GPIOB_ARD_D6, 0U) | \ + PIN_AFIO_AF(GPIOB_PIN2, 0U) | \ + PIN_AFIO_AF(GPIOB_ARD_D13, 0U) | \ + PIN_AFIO_AF(GPIOB_ARD_D12, 0U) | \ + PIN_AFIO_AF(GPIOB_ARD_D11, 0U) | \ + PIN_AFIO_AF(GPIOB_ARD_D5, 0U) | \ + PIN_AFIO_AF(GPIOB_ARD_D4, 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_PIN13, 0U) | \ + PIN_AFIO_AF(GPIOB_PIN14, 0U) | \ + PIN_AFIO_AF(GPIOB_PIN15, 0U)) + +/* + * GPIOC setup: + * + * PC0 - PIN0 (input pullup). + * PC1 - PIN1 (input pullup). + * PC2 - PIN2 (input pullup). + * PC3 - PIN3 (input pullup). + * PC4 - PIN4 (input pullup). + * PC5 - PIN5 (input pullup). + * PC6 - PIN6 (input pullup). + * PC7 - PIN7 (input pullup). + * PC8 - PIN8 (input pullup). + * PC9 - PIN9 (input pullup). + * PC10 - PIN10 (input pullup). + * PC11 - PIN11 (input pullup). + * PC12 - PIN12 (input pullup). + * PC13 - PIN13 (input pullup). + * PC14 - PIN14 (input pullup). + * PC15 - PIN15 (input pullup). + */ +#define VAL_GPIOC_MODER (PIN_MODE_INPUT(GPIOC_PIN0) | \ + 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_INPUT(GPIOC_PIN6) | \ + PIN_MODE_INPUT(GPIOC_PIN7) | \ + PIN_MODE_INPUT(GPIOC_PIN8) | \ + PIN_MODE_INPUT(GPIOC_PIN9) | \ + PIN_MODE_INPUT(GPIOC_PIN10) | \ + PIN_MODE_INPUT(GPIOC_PIN11) | \ + PIN_MODE_INPUT(GPIOC_PIN12) | \ + PIN_MODE_INPUT(GPIOC_PIN13) | \ + PIN_MODE_INPUT(GPIOC_PIN14) | \ + PIN_MODE_INPUT(GPIOC_PIN15)) +#define VAL_GPIOC_OTYPER (PIN_OTYPE_PUSHPULL(GPIOC_PIN0) | \ + 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_PIN6) | \ + PIN_OTYPE_PUSHPULL(GPIOC_PIN7) | \ + PIN_OTYPE_PUSHPULL(GPIOC_PIN8) | \ + PIN_OTYPE_PUSHPULL(GPIOC_PIN9) | \ + PIN_OTYPE_PUSHPULL(GPIOC_PIN10) | \ + PIN_OTYPE_PUSHPULL(GPIOC_PIN11) | \ + PIN_OTYPE_PUSHPULL(GPIOC_PIN12) | \ + PIN_OTYPE_PUSHPULL(GPIOC_PIN13) | \ + PIN_OTYPE_PUSHPULL(GPIOC_PIN14) | \ + PIN_OTYPE_PUSHPULL(GPIOC_PIN15)) +#define VAL_GPIOC_OSPEEDR (PIN_OSPEED_HIGH(GPIOC_PIN0) | \ + PIN_OSPEED_HIGH(GPIOC_PIN1) | \ + PIN_OSPEED_HIGH(GPIOC_PIN2) | \ + PIN_OSPEED_HIGH(GPIOC_PIN3) | \ + PIN_OSPEED_HIGH(GPIOC_PIN4) | \ + PIN_OSPEED_HIGH(GPIOC_PIN5) | \ + PIN_OSPEED_HIGH(GPIOC_PIN6) | \ + PIN_OSPEED_HIGH(GPIOC_PIN7) | \ + PIN_OSPEED_HIGH(GPIOC_PIN8) | \ + PIN_OSPEED_HIGH(GPIOC_PIN9) | \ + PIN_OSPEED_HIGH(GPIOC_PIN10) | \ + PIN_OSPEED_HIGH(GPIOC_PIN11) | \ + PIN_OSPEED_HIGH(GPIOC_PIN12) | \ + PIN_OSPEED_HIGH(GPIOC_PIN13) | \ + PIN_OSPEED_HIGH(GPIOC_PIN14) | \ + PIN_OSPEED_HIGH(GPIOC_PIN15)) +#define VAL_GPIOC_PUPDR (PIN_PUPDR_PULLUP(GPIOC_PIN0) | \ + 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_PULLUP(GPIOC_PIN6) | \ + PIN_PUPDR_PULLUP(GPIOC_PIN7) | \ + PIN_PUPDR_PULLUP(GPIOC_PIN8) | \ + PIN_PUPDR_PULLUP(GPIOC_PIN9) | \ + PIN_PUPDR_PULLUP(GPIOC_PIN10) | \ + PIN_PUPDR_PULLUP(GPIOC_PIN11) | \ + PIN_PUPDR_PULLUP(GPIOC_PIN12) | \ + PIN_PUPDR_PULLUP(GPIOC_PIN13) | \ + PIN_PUPDR_PULLUP(GPIOC_PIN14) | \ + PIN_PUPDR_PULLUP(GPIOC_PIN15)) +#define VAL_GPIOC_ODR (PIN_ODR_HIGH(GPIOC_PIN0) | \ + 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_HIGH(GPIOC_PIN6) | \ + PIN_ODR_HIGH(GPIOC_PIN7) | \ + PIN_ODR_HIGH(GPIOC_PIN8) | \ + PIN_ODR_HIGH(GPIOC_PIN9) | \ + PIN_ODR_HIGH(GPIOC_PIN10) | \ + PIN_ODR_HIGH(GPIOC_PIN11) | \ + PIN_ODR_HIGH(GPIOC_PIN12) | \ + PIN_ODR_HIGH(GPIOC_PIN13) | \ + PIN_ODR_HIGH(GPIOC_PIN14) | \ + PIN_ODR_HIGH(GPIOC_PIN15)) +#define VAL_GPIOC_AFRL (PIN_AFIO_AF(GPIOC_PIN0, 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_PIN6, 0U) | \ + PIN_AFIO_AF(GPIOC_PIN7, 0U)) +#define VAL_GPIOC_AFRH (PIN_AFIO_AF(GPIOC_PIN8, 0U) | \ + PIN_AFIO_AF(GPIOC_PIN9, 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_PIN14, 0U) | \ + PIN_AFIO_AF(GPIOC_PIN15, 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_HIGH(GPIOD_PIN0) | \ + PIN_OSPEED_HIGH(GPIOD_PIN1) | \ + PIN_OSPEED_HIGH(GPIOD_PIN2) | \ + PIN_OSPEED_HIGH(GPIOD_PIN3) | \ + PIN_OSPEED_HIGH(GPIOD_PIN4) | \ + PIN_OSPEED_HIGH(GPIOD_PIN5) | \ + PIN_OSPEED_HIGH(GPIOD_PIN6) | \ + PIN_OSPEED_HIGH(GPIOD_PIN7) | \ + PIN_OSPEED_HIGH(GPIOD_PIN8) | \ + PIN_OSPEED_HIGH(GPIOD_PIN9) | \ + PIN_OSPEED_HIGH(GPIOD_PIN10) | \ + PIN_OSPEED_HIGH(GPIOD_PIN11) | \ + PIN_OSPEED_HIGH(GPIOD_PIN12) | \ + PIN_OSPEED_HIGH(GPIOD_PIN13) | \ + PIN_OSPEED_HIGH(GPIOD_PIN14) | \ + PIN_OSPEED_HIGH(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_HIGH(GPIOE_PIN0) | \ + PIN_OSPEED_HIGH(GPIOE_PIN1) | \ + PIN_OSPEED_HIGH(GPIOE_PIN2) | \ + PIN_OSPEED_HIGH(GPIOE_PIN3) | \ + PIN_OSPEED_HIGH(GPIOE_PIN4) | \ + PIN_OSPEED_HIGH(GPIOE_PIN5) | \ + PIN_OSPEED_HIGH(GPIOE_PIN6) | \ + PIN_OSPEED_HIGH(GPIOE_PIN7) | \ + PIN_OSPEED_HIGH(GPIOE_PIN8) | \ + PIN_OSPEED_HIGH(GPIOE_PIN9) | \ + PIN_OSPEED_HIGH(GPIOE_PIN10) | \ + PIN_OSPEED_HIGH(GPIOE_PIN11) | \ + PIN_OSPEED_HIGH(GPIOE_PIN12) | \ + PIN_OSPEED_HIGH(GPIOE_PIN13) | \ + PIN_OSPEED_HIGH(GPIOE_PIN14) | \ + PIN_OSPEED_HIGH(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 - ARD_D7 (input pullup). + * PF1 - ARD_D8 (input pullup). + * 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_ARD_D7) | \ + PIN_MODE_INPUT(GPIOF_ARD_D8) | \ + 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_ARD_D7) | \ + PIN_OTYPE_PUSHPULL(GPIOF_ARD_D8) | \ + 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_HIGH(GPIOF_ARD_D7) | \ + PIN_OSPEED_HIGH(GPIOF_ARD_D8) | \ + PIN_OSPEED_HIGH(GPIOF_PIN2) | \ + PIN_OSPEED_HIGH(GPIOF_PIN3) | \ + PIN_OSPEED_HIGH(GPIOF_PIN4) | \ + PIN_OSPEED_HIGH(GPIOF_PIN5) | \ + PIN_OSPEED_HIGH(GPIOF_PIN6) | \ + PIN_OSPEED_HIGH(GPIOF_PIN7) | \ + PIN_OSPEED_HIGH(GPIOF_PIN8) | \ + PIN_OSPEED_HIGH(GPIOF_PIN9) | \ + PIN_OSPEED_HIGH(GPIOF_PIN10) | \ + PIN_OSPEED_HIGH(GPIOF_PIN11) | \ + PIN_OSPEED_HIGH(GPIOF_PIN12) | \ + PIN_OSPEED_HIGH(GPIOF_PIN13) | \ + PIN_OSPEED_HIGH(GPIOF_PIN14) | \ + PIN_OSPEED_HIGH(GPIOF_PIN15)) +#define VAL_GPIOF_PUPDR (PIN_PUPDR_PULLUP(GPIOF_ARD_D7) | \ + PIN_PUPDR_PULLUP(GPIOF_ARD_D8) | \ + 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_ARD_D7) | \ + PIN_ODR_HIGH(GPIOF_ARD_D8) | \ + 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_ARD_D7, 0U) | \ + PIN_AFIO_AF(GPIOF_ARD_D8, 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" { +#endif + void boardInit(void); +#ifdef __cplusplus +} +#endif +#endif /* _FROM_ASM_ */ + +#endif /* BOARD_H */ diff --git a/keyboards/akegata_denki/device_one/boards/DEVICE_ONE/board.mk b/keyboards/akegata_denki/device_one/boards/DEVICE_ONE/board.mk new file mode 100644 index 000000000000..a830697a993a --- /dev/null +++ b/keyboards/akegata_denki/device_one/boards/DEVICE_ONE/board.mk @@ -0,0 +1,5 @@ +# List of all the board related files. +BOARDSRC = $(BOARD_PATH)/boards/DEVICE_ONE/board.c + +# Required include directories +BOARDINC = $(BOARD_PATH)/boards/DEVICE_ONE diff --git a/keyboards/akegata_denki/device_one/chconf.h b/keyboards/akegata_denki/device_one/chconf.h new file mode 100644 index 000000000000..c618ebe12086 --- /dev/null +++ b/keyboards/akegata_denki/device_one/chconf.h @@ -0,0 +1,711 @@ +/* + 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. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +/** + * @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. + * + * @addtogroup config + * @details Kernel related settings and hooks. + * @{ + */ + +#ifndef CHCONF_H +#define CHCONF_H + +#define _CHIBIOS_RT_CONF_ +#define _CHIBIOS_RT_CONF_VER_6_0_ + +/*===========================================================================*/ +/** + * @name System timers settings + * @{ + */ +/*===========================================================================*/ + +/** + * @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. + * @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. + */ +#if !defined(CH_CFG_ST_TIMEDELTA) +#define CH_CFG_ST_TIMEDELTA 2 +#endif + +/** @} */ + +/*===========================================================================*/ +/** + * @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. + */ +#if !defined(CH_CFG_TIME_QUANTUM) +#define CH_CFG_TIME_QUANTUM 0 +#endif + +/** + * @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. + */ +#if !defined(CH_CFG_MEMCORE_SIZE) +#define CH_CFG_MEMCORE_SIZE 0 +#endif + +/** + * @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. + */ +#if !defined(CH_CFG_NO_IDLE_THREAD) +#define CH_CFG_NO_IDLE_THREAD FALSE +#endif + +/** @} */ + +/*===========================================================================*/ +/** + * @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. + */ +#if !defined(CH_CFG_OPTIMIZE_SPEED) +#define CH_CFG_OPTIMIZE_SPEED TRUE +#endif + +/** @} */ + +/*===========================================================================*/ +/** + * @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. + */ +#if !defined(CH_CFG_USE_TM) +#define CH_CFG_USE_TM FALSE +#endif + +/** + * @brief Threads registry APIs. + * @details If enabled then the registry APIs are included in the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_REGISTRY) +#define CH_CFG_USE_REGISTRY TRUE +#endif + +/** + * @brief Threads synchronization APIs. + * @details If enabled then the @p chThdWait() function is included in + * the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_WAITEXIT) +#define CH_CFG_USE_WAITEXIT TRUE +#endif + +/** + * @brief Semaphores APIs. + * @details If enabled then the Semaphores APIs are included in the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_SEMAPHORES) +#define CH_CFG_USE_SEMAPHORES TRUE +#endif + +/** + * @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. + */ +#if !defined(CH_CFG_USE_SEMAPHORES_PRIORITY) +#define CH_CFG_USE_SEMAPHORES_PRIORITY FALSE +#endif + +/** + * @brief Mutexes APIs. + * @details If enabled then the mutexes APIs are included in the kernel. + * + * @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. + * @note Recursive mutexes are heavier and have an increased + * memory footprint. + * + * @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. + * @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. + */ +#if !defined(CH_CFG_USE_CONDVARS) +#define CH_CFG_USE_CONDVARS TRUE +#endif + +/** + * @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. + */ +#if !defined(CH_CFG_USE_CONDVARS_TIMEOUT) +#define CH_CFG_USE_CONDVARS_TIMEOUT TRUE +#endif + +/** + * @brief Events Flags APIs. + * @details If enabled then the event flags APIs are included in the kernel. + * + * @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. + * @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. + */ +#if !defined(CH_CFG_USE_EVENTS_TIMEOUT) +#define CH_CFG_USE_EVENTS_TIMEOUT TRUE +#endif + +/** + * @brief Synchronous Messages APIs. + * @details If enabled then the synchronous messages APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_MESSAGES) +#define CH_CFG_USE_MESSAGES TRUE +#endif + +/** + * @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. + */ +#if !defined(CH_CFG_USE_MESSAGES_PRIORITY) +#define CH_CFG_USE_MESSAGES_PRIORITY FALSE +#endif + +/** + * @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. + */ +#if !defined(CH_CFG_USE_MAILBOXES) +#define CH_CFG_USE_MAILBOXES TRUE +#endif + +/** + * @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. + */ +#if !defined(CH_CFG_USE_MEMCORE) +#define CH_CFG_USE_MEMCORE TRUE +#endif + +/** + * @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. + */ +#if !defined(CH_CFG_USE_HEAP) +#define CH_CFG_USE_HEAP TRUE +#endif + +/** + * @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. + */ +#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. + * @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. + */ +#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 + +/** @} */ + +/*===========================================================================*/ +/** + * @name Debug options + * @{ + */ +/*===========================================================================*/ + +/** + * @brief Debug option, kernel statistics. + * + * @note The default is @p FALSE. + */ +#if !defined(CH_DBG_STATISTICS) +#define CH_DBG_STATISTICS FALSE +#endif + +/** + * @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. + */ +#if !defined(CH_DBG_SYSTEM_STATE_CHECK) +#define CH_DBG_SYSTEM_STATE_CHECK FALSE +#endif + +/** + * @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. + */ +#if !defined(CH_DBG_ENABLE_CHECKS) +#define CH_DBG_ENABLE_CHECKS FALSE +#endif + +/** + * @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. + */ +#if !defined(CH_DBG_ENABLE_ASSERTS) +#define CH_DBG_ENABLE_ASSERTS FALSE +#endif + +/** + * @brief Debug option, trace buffer. + * @details If enabled then the trace buffer is activated. + * + * @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. + * @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. + */ +#if !defined(CH_DBG_ENABLE_STACK_CHECK) +#define CH_DBG_ENABLE_STACK_CHECK FALSE +#endif + +/** + * @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. + */ +#if !defined(CH_DBG_FILL_THREADS) +#define CH_DBG_FILL_THREADS FALSE +#endif + +/** + * @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. + */ +#if !defined(CH_DBG_THREADS_PROFILING) +#define CH_DBG_THREADS_PROFILING FALSE +#endif + +/** @} */ + +/*===========================================================================*/ +/** + * @name Kernel hooks + * @{ + */ +/*===========================================================================*/ + +/** + * @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. + */ +#define CH_CFG_THREAD_EXTRA_FIELDS \ + /* Add threads custom fields here.*/ + +/** + * @brief Threads initialization hook. + * @details User initialization code added to the @p _thread_init() function. + * + * @note It is invoked from within @p _thread_init() 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/akegata_denki/device_one/config.h b/keyboards/akegata_denki/device_one/config.h new file mode 100644 index 000000000000..cae2c60c04e6 --- /dev/null +++ b/keyboards/akegata_denki/device_one/config.h @@ -0,0 +1,18 @@ +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0xADD0 +#define DEVICE_VER 0x0001 +#define MANUFACTURER akegata denki +#define PRODUCT device one mechanical keyboard + +#define MATRIX_ROWS 5 +#define MATRIX_COLS 15 + +#define MATRIX_ROW_PINS { B1, B0, A9, A8, A0 } +#define MATRIX_COL_PINS { A2, A3, A4, A5, A6, A7, A1, A10, A15, B3, B4, B5, B6, B7, B8} + +#define DIODE_DIRECTION COL2ROW diff --git a/keyboards/akegata_denki/device_one/device_one.c b/keyboards/akegata_denki/device_one/device_one.c new file mode 100644 index 000000000000..06e03ee893a9 --- /dev/null +++ b/keyboards/akegata_denki/device_one/device_one.c @@ -0,0 +1 @@ +#include "device_one.h" diff --git a/keyboards/akegata_denki/device_one/device_one.h b/keyboards/akegata_denki/device_one/device_one.h new file mode 100644 index 000000000000..58986dea9028 --- /dev/null +++ b/keyboards/akegata_denki/device_one/device_one.h @@ -0,0 +1,59 @@ +#pragma once + +#include "quantum.h" + +#define LAYOUT_60_ansi(\ + 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, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2e, \ + k30, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, \ + k40, k41, k42, k47, k4a, k4b, k4c, k4e \ +) { \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0e, KC_NO }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1e, KC_NO }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, KC_NO, k2e, }, \ + { k30, KC_NO, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, KC_NO, k3c, KC_NO, }, \ + { k40, k41, k42, KC_NO, KC_NO, KC_NO, k47, KC_NO, KC_NO, k4a, k4b, k4c, KC_NO, KC_NO, k4e }, \ +} + +#define LAYOUT_60_iso(\ + 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, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2e, k1e, \ + k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, \ + k40, k41, k42, k47, k4a, k4b, k4c, k4e \ +) { \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0e, KC_NO }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1e, KC_NO }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, KC_NO, k2e, }, \ + { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, KC_NO, KC_NO, k3c, }, \ + { k40, k41, k42, KC_NO, KC_NO, KC_NO, k47, KC_NO, KC_NO, k4a, k4b, k4c, KC_NO, KC_NO, k4e }, \ +} + +#define LAYOUT_60_ansi_arrow(\ + 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, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2e, \ + k30, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d, \ + k40, k41, k42, k47, k4a, k4b, k4c, k4e, k4f \ +) { \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0e, KC_NO }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1e, KC_NO }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, KC_NO, k2e, }, \ + { k30, KC_NO, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, KC_NO, k3c, k3d, }, \ + { k40, k41, k42, KC_NO, KC_NO, KC_NO, k47, KC_NO, KC_NO, k4a, k4b, k4c, KC_NO, k4e, k4f, }, \ +} + +#define LAYOUT_60_ansi_split_bs(\ + 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, k1e, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2e, \ + k30, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, \ + k40, k41, k42, k47, k4a, k4b, k4c, k4e \ +) { \ + { 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, k1e, KC_NO }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, KC_NO, k2e, }, \ + { k30, KC_NO, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, KC_NO, k3c, KC_NO }, \ + { k40, k41, k42, KC_NO, KC_NO, KC_NO, k47, KC_NO, KC_NO, k4a, k4b, k4c, KC_NO, KC_NO, k4e, }, \ +} diff --git a/keyboards/akegata_denki/device_one/halconf.h b/keyboards/akegata_denki/device_one/halconf.h new file mode 100644 index 000000000000..25f3fe5edf08 --- /dev/null +++ b/keyboards/akegata_denki/device_one/halconf.h @@ -0,0 +1,525 @@ +/* + 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. + 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 + +#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 +#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 cryptographic subsystem. + */ +#if !defined(HAL_USE_CRY) || defined(__DOXYGEN__) +#define HAL_USE_CRY FALSE +#endif + +/** + * @brief Enables the DAC subsystem. + */ +#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 +#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 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 +#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 +#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 + +/** + * @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. */ +/*===========================================================================*/ + +/** + * @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 FALSE +#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 FALSE +#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 + +/** + * @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. */ +/*===========================================================================*/ + +/** + * @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 the zero-copy API. + */ +#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 + +/** + * @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. */ +/*===========================================================================*/ + +/** + * @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 16 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 256 bytes for both the transmission and receive + * buffers. + */ +#if !defined(SERIAL_USB_BUFFERS_SIZE) || defined(__DOXYGEN__) +#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 + +/*===========================================================================*/ +/* 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 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 +#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. */ +/*===========================================================================*/ + +/** + * @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 + +/*===========================================================================*/ +/* 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/akegata_denki/device_one/info.json b/keyboards/akegata_denki/device_one/info.json new file mode 100644 index 000000000000..50e8c2a9004e --- /dev/null +++ b/keyboards/akegata_denki/device_one/info.json @@ -0,0 +1,21 @@ +{ + "keyboard_name": "device one", + "url": "https://akegata.co", + "maintainer": "qmk", + "width": 15, + "height": 5, + "layouts": { + "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":"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":"meta", "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":"meta", "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": { + "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}, {"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": { + "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":"|", "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":"enter", "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":"meta", "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":"meta", "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_arrow": { + "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":"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":"shift", "x":11.25, "y":3, "w":1.75}, {"label":"up", "x":13, "y":3}, {"label":"/", "x":14, "y":3}, {"label":"ctrl", "x":0, "y":4, "w":1.25}, {"label":"meta", "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":"meta", "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/akegata_denki/device_one/keymaps/ansi_arrow_keys/keymap.c b/keyboards/akegata_denki/device_one/keymaps/ansi_arrow_keys/keymap.c new file mode 100644 index 000000000000..15eadcbbd945 --- /dev/null +++ b/keyboards/akegata_denki/device_one/keymaps/ansi_arrow_keys/keymap.c @@ -0,0 +1,19 @@ +/* Device One 60% ANSI layout */ + +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +[0] = LAYOUT_60_ansi_arrow( + 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_RSFT, KC_UP, KC_SLSH, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, MO(1), KC_RGUI, KC_LEFT, KC_DOWN, KC_RIGHT), +[1] = LAYOUT_60_ansi_arrow( + 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_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS,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(1), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), + +}; diff --git a/keyboards/akegata_denki/device_one/keymaps/ansi_split_backspace/keymap.c b/keyboards/akegata_denki/device_one/keymaps/ansi_split_backspace/keymap.c new file mode 100644 index 000000000000..f602c19b73df --- /dev/null +++ b/keyboards/akegata_denki/device_one/keymaps/ansi_split_backspace/keymap.c @@ -0,0 +1,19 @@ +/* Device One 60% ANSI layout */ + +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +[0] = LAYOUT_60_ansi_split_bs( + 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_GRAVE, + KC_TAB, KC_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_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_split_bs( + 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_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 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(1), KC_TRNS), + +}; diff --git a/keyboards/akegata_denki/device_one/keymaps/default/keymap.c b/keyboards/akegata_denki/device_one/keymaps/default/keymap.c new file mode 100644 index 000000000000..1d0b919cb801 --- /dev/null +++ b/keyboards/akegata_denki/device_one/keymaps/default/keymap.c @@ -0,0 +1,20 @@ +/* Device One 60% ANSI layout */ + +#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, + 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_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_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 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(1), KC_TRNS), + +}; diff --git a/keyboards/akegata_denki/device_one/keymaps/iso/keymap.c b/keyboards/akegata_denki/device_one/keymaps/iso/keymap.c new file mode 100644 index 000000000000..720f10e13ad1 --- /dev/null +++ b/keyboards/akegata_denki/device_one/keymaps/iso/keymap.c @@ -0,0 +1,18 @@ +/* Device One 60% ANSI layout */ + +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +[0] = LAYOUT_60_iso( + 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_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_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, MO(1), KC_RCTL), +[1] = LAYOUT_60_iso( + 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_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 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(1), KC_TRNS), +}; diff --git a/keyboards/akegata_denki/device_one/mcuconf.h b/keyboards/akegata_denki/device_one/mcuconf.h new file mode 100644 index 000000000000..924ccb9e0733 --- /dev/null +++ b/keyboards/akegata_denki/device_one/mcuconf.h @@ -0,0 +1,187 @@ +/* + 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. + 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_MCOSEL STM32_MCOSEL_NOCLOCK +#define STM32_MCOPRE STM32_MCOPRE_DIV1 +#define STM32_PLLNODIV STM32_PLLNODIV_DIV2 +#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 + +/* + * IRQ system settings. + */ +#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 + +/* + * ADC driver system settings. + */ +#define STM32_ADC_USE_ADC1 FALSE +#define STM32_ADC_ADC1_CKMODE STM32_ADC_CKMODE_ADCCLK +#define STM32_ADC_ADC1_DMA_PRIORITY 2 +#define STM32_ADC_ADC1_DMA_IRQ_PRIORITY 2 +#define STM32_ADC_ADC1_DMA_STREAM STM32_DMA_STREAM_ID(1, 1) + +/* + * 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_BUSY_TIMEOUT 50 +#define STM32_I2C_I2C1_IRQ_PRIORITY 3 +#define STM32_I2C_USE_DMA TRUE +#define STM32_I2C_I2C1_DMA_PRIORITY 1 +#define STM32_I2C_I2C1_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 3) +#define STM32_I2C_I2C1_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 2) +#define STM32_I2C_DMA_ERROR_HOOK(i2cp) osalSysHalt("DMA failure") + +/* + * I2S driver system settings. + */ +#define STM32_I2S_USE_SPI1 FALSE +#define STM32_I2S_SPI1_MODE (STM32_I2S_MODE_MASTER | \ + STM32_I2S_MODE_RX) +#define STM32_I2S_SPI1_IRQ_PRIORITY 2 +#define STM32_I2S_SPI1_DMA_PRIORITY 1 +#define STM32_I2S_SPI1_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 2) +#define STM32_I2S_SPI1_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 3) +#define STM32_I2S_DMA_ERROR_HOOK(i2sp) 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 TRUE +#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_SPI1_DMA_PRIORITY 1 +#define STM32_SPI_SPI1_IRQ_PRIORITY 2 +#define STM32_SPI_SPI1_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 2) +#define STM32_SPI_SPI1_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 3) +#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_USART1_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 3) +#define STM32_UART_USART1_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 2) +#define STM32_UART_USART2_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 5) +#define STM32_UART_USART2_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 4) +#define STM32_UART_DMA_ERROR_HOOK(uartp) osalSysHalt("DMA failure") + +/* + * WDG driver system settings. + */ +#define STM32_WDG_USE_IWDG FALSE + +/* + * 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/akegata_denki/device_one/readme.md b/keyboards/akegata_denki/device_one/readme.md new file mode 100644 index 000000000000..75e56399b935 --- /dev/null +++ b/keyboards/akegata_denki/device_one/readme.md @@ -0,0 +1,15 @@ +# 明け方電気 (akegata denki) device one + +![device one](https://cdn.shopify.com/s/files/1/0428/0624/7583/products/keyboard_300x300.png?v=1594330016) + +A caseless 60% mechanical keyboard that strikes the right balance between affordability and function. + +* Keyboard Maintainer: [Krishna Mani](https://github.com/kmani314) +* Hardware Supported: Device one PCB +* Hardware Availability: [akegata.co](https://akegata.co) + +Make example for this keyboard (after setting up your build environment): + + make akegata_denki/device_one: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/akegata_denki/device_one/rules.mk b/keyboards/akegata_denki/device_one/rules.mk new file mode 100644 index 000000000000..9519995cddf4 --- /dev/null +++ b/keyboards/akegata_denki/device_one/rules.mk @@ -0,0 +1,21 @@ +# MCU name +MCU = STM32F042 + +BOARD = DEVICE_ONE + +# Build Options +# comment out to disable the options. +# +BACKLIGHT_ENABLE = no +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 # USB Nkey Rollover +NO_USB_STARTUP_CHECK = no # Disable initialization only when usb is plugged in + +LAYOUTS = 60_ansi 60_iso + +# Enter lower-power sleep mode when on the ChibiOS idle thread +OPT_DEFS += -DCORTEX_ENABLE_WFI_IDLE=TRUE diff --git a/keyboards/hs60/v1/keymaps/default/keymap.c b/keyboards/hs60/v1/keymaps/default/keymap.c index 2a5e823618c8..953172c7391f 100644 --- a/keyboards/hs60/v1/keymaps/default/keymap.c +++ b/keyboards/hs60/v1/keymaps/default/keymap.c @@ -43,4 +43,4 @@ void matrix_scan_user(void) { bool process_record_user(uint16_t keycode, keyrecord_t *record) { return true; -} \ No newline at end of file +} diff --git a/keyboards/vinta/vinta.c b/keyboards/vinta/vinta.c index b5d40a160924..112e44fb8e6e 100644 --- a/keyboards/vinta/vinta.c +++ b/keyboards/vinta/vinta.c @@ -15,4 +15,4 @@ void matrix_scan_kb(void) { bool process_record_kb(uint16_t keycode, keyrecord_t *record) { return process_record_user(keycode, record); -} \ No newline at end of file +} From e999ade1003359d7b2a2d95036cd8de848726047 Mon Sep 17 00:00:00 2001 From: AlisGraveNil <63020540+AlisGraveNil@users.noreply.github.com> Date: Mon, 27 Jul 2020 22:03:54 -0400 Subject: [PATCH 466/930] [Keyboard] Numeros macropad (#9725) * First Push * Update config.h * Update numeros.c * Update numeros.h * Update rules.mk * Update keyboards/clawsome/numeros/keymaps/default/keymap.c * Update keyboards/clawsome/numeros/readme.md * Update keyboards/clawsome/numeros/rules.mk * Update keyboards/clawsome/numeros/info.json * Update keyboards/clawsome/numeros/info.json * Update keyboards/clawsome/numeros/rules.mk * Update keyboards/clawsome/numeros/numeros.h * Update keyboards/clawsome/numeros/info.json * Update keyboards/clawsome/numeros/keymaps/default/keymap.c * Update keyboards/clawsome/numeros/numeros.h * Update keyboards/clawsome/numeros/keymaps/default/keymap.c * Update keyboards/clawsome/numeros/numeros.c * Update keyboards/clawsome/numeros/config.h * Update keyboards/clawsome/numeros/rules.mk * Update keyboards/clawsome/numeros/readme.md * Update keyboards/clawsome/numeros/readme.md --- keyboards/clawsome/numeros/config.h | 46 +++++++++++++++++++ keyboards/clawsome/numeros/info.json | 35 ++++++++++++++ .../clawsome/numeros/keymaps/default/keymap.c | 40 ++++++++++++++++ keyboards/clawsome/numeros/numeros.c | 16 +++++++ keyboards/clawsome/numeros/numeros.h | 32 +++++++++++++ keyboards/clawsome/numeros/readme.md | 13 ++++++ keyboards/clawsome/numeros/rules.mk | 24 ++++++++++ 7 files changed, 206 insertions(+) create mode 100644 keyboards/clawsome/numeros/config.h create mode 100644 keyboards/clawsome/numeros/info.json create mode 100644 keyboards/clawsome/numeros/keymaps/default/keymap.c create mode 100644 keyboards/clawsome/numeros/numeros.c create mode 100644 keyboards/clawsome/numeros/numeros.h create mode 100644 keyboards/clawsome/numeros/readme.md create mode 100644 keyboards/clawsome/numeros/rules.mk diff --git a/keyboards/clawsome/numeros/config.h b/keyboards/clawsome/numeros/config.h new file mode 100644 index 000000000000..4c873ffb8d0b --- /dev/null +++ b/keyboards/clawsome/numeros/config.h @@ -0,0 +1,46 @@ +/* +Copyright 2020 AAClawson (AlisGraveNil) + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License 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 0x7767 +#define PRODUCT_ID 0x0000 +#define DEVICE_VER 0x0001 +#define MANUFACTURER AlisGraveNil +#define PRODUCT Los Numeros + +/* 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 { D0, C6, B2, B6, B5 } +#define MATRIX_COL_PINS { B3, E6, D7, D4 } + +#define DIODE_DIRECTION COL2ROW diff --git a/keyboards/clawsome/numeros/info.json b/keyboards/clawsome/numeros/info.json new file mode 100644 index 000000000000..9576e6221865 --- /dev/null +++ b/keyboards/clawsome/numeros/info.json @@ -0,0 +1,35 @@ +{ + "keyboard_name": "numeros", + "url": "www.clawboards.xyz", + "maintainer": "AAClawson (AlisGraveNil)", + "width": 4, + "height": 5, + "layouts": { + "LAYOUT_numpad_5x4": { + "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} + ] + } + } + ,"meta": "https://noroadsleft.github.io/kbf_qmk_converter/" +} diff --git a/keyboards/clawsome/numeros/keymaps/default/keymap.c b/keyboards/clawsome/numeros/keymaps/default/keymap.c new file mode 100644 index 000000000000..6862913ca045 --- /dev/null +++ b/keyboards/clawsome/numeros/keymaps/default/keymap.c @@ -0,0 +1,40 @@ +/* Copyright 2020 AAClawson (AlisGraveNil) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public 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] = { + /* + * --------------------- + * |NUM | / | * | - | + * --------------------- + * | 7 | 8 | 9 | + | + * ---------------| | + * | 4 | 5 | 6 | | + * --------------------- + * | 1 | 2 | 3 |ENT | + * ---------------| | + * | 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/clawsome/numeros/numeros.c b/keyboards/clawsome/numeros/numeros.c new file mode 100644 index 000000000000..daa7fb1b8dc0 --- /dev/null +++ b/keyboards/clawsome/numeros/numeros.c @@ -0,0 +1,16 @@ +/* Copyright 2020 AAClawson (AlisGraveNil) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#include "numeros.h" diff --git a/keyboards/clawsome/numeros/numeros.h b/keyboards/clawsome/numeros/numeros.h new file mode 100644 index 000000000000..a7a8ee1e099c --- /dev/null +++ b/keyboards/clawsome/numeros/numeros.h @@ -0,0 +1,32 @@ +/* Copyright 2020 AAClawson (AlisGraveNil) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License 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_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 }, \ +} diff --git a/keyboards/clawsome/numeros/readme.md b/keyboards/clawsome/numeros/readme.md new file mode 100644 index 000000000000..897f01304339 --- /dev/null +++ b/keyboards/clawsome/numeros/readme.md @@ -0,0 +1,13 @@ +# Numeros + +This is a 5x4 numberpad. + +* Keyboard Maintainer: [AAClawson](https://github.com/AlisGraveNil) +* Hardware Supported: Los Numeros, Pro Micro, Elite-C +* Hardware Availability: www.clawboards.xyz + +Make example for this keyboard (after setting up your build environment): + + make clawsome/numeros: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/clawsome/numeros/rules.mk b/keyboards/clawsome/numeros/rules.mk new file mode 100644 index 000000000000..c0d663b11347 --- /dev/null +++ b/keyboards/clawsome/numeros/rules.mk @@ -0,0 +1,24 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +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 +BLUETOOTH_ENABLE = no # Enable Bluetooth +AUDIO_ENABLE = no # Audio output + +LAYOUTS = numpad_5x4 From 14efd8aa4187406f3323385d0bdabbcb466210e4 Mon Sep 17 00:00:00 2001 From: TerryMathews Date: Mon, 27 Jul 2020 22:34:33 -0400 Subject: [PATCH 467/930] [Keyboard] Initial support for TKC GodSpeed75 (#9723) * Initial support for TKC GodSpeed75 * Correct compile error * Update keyboards/tkc/godspeed75/rules.mk * Update keyboards/tkc/godspeed75/readme.md * Delete bootloader_defs.h * Update keyboards/tkc/godspeed75/keymaps/via/keymap.c * Update keyboards/tkc/godspeed75/readme.md * Update keyboards/tkc/godspeed75/config.h * Update keyboards/tkc/godspeed75/readme.md --- keyboards/tkc/godspeed75/chconf.h | 714 ++++++++++++++++++ keyboards/tkc/godspeed75/config.h | 114 +++ keyboards/tkc/godspeed75/godspeed75.c | 17 + keyboards/tkc/godspeed75/godspeed75.h | 40 + keyboards/tkc/godspeed75/halconf.h | 525 +++++++++++++ keyboards/tkc/godspeed75/info.json | 12 + .../tkc/godspeed75/keymaps/default/keymap.c | 42 ++ keyboards/tkc/godspeed75/keymaps/via/keymap.c | 59 ++ keyboards/tkc/godspeed75/keymaps/via/rules.mk | 1 + keyboards/tkc/godspeed75/mcuconf.h | 171 +++++ keyboards/tkc/godspeed75/readme.md | 15 + keyboards/tkc/godspeed75/rules.mk | 22 + 12 files changed, 1732 insertions(+) create mode 100644 keyboards/tkc/godspeed75/chconf.h create mode 100644 keyboards/tkc/godspeed75/config.h create mode 100644 keyboards/tkc/godspeed75/godspeed75.c create mode 100644 keyboards/tkc/godspeed75/godspeed75.h create mode 100644 keyboards/tkc/godspeed75/halconf.h create mode 100644 keyboards/tkc/godspeed75/info.json create mode 100644 keyboards/tkc/godspeed75/keymaps/default/keymap.c create mode 100644 keyboards/tkc/godspeed75/keymaps/via/keymap.c create mode 100644 keyboards/tkc/godspeed75/keymaps/via/rules.mk create mode 100644 keyboards/tkc/godspeed75/mcuconf.h create mode 100644 keyboards/tkc/godspeed75/readme.md create mode 100644 keyboards/tkc/godspeed75/rules.mk diff --git a/keyboards/tkc/godspeed75/chconf.h b/keyboards/tkc/godspeed75/chconf.h new file mode 100644 index 000000000000..03f63da36a88 --- /dev/null +++ b/keyboards/tkc/godspeed75/chconf.h @@ -0,0 +1,714 @@ +/* + 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. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +/** + * @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. + * + * @addtogroup config + * @details Kernel related settings and hooks. + * @{ + */ + +#ifndef CHCONF_H +#define CHCONF_H + +#define _CHIBIOS_RT_CONF_ +#define _CHIBIOS_RT_CONF_VER_6_0_ + +/*===========================================================================*/ +/** + * @name System timers settings + * @{ + */ +/*===========================================================================*/ + +/** + * @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. + * @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. + */ +#if !defined(CH_CFG_ST_TIMEDELTA) +#define CH_CFG_ST_TIMEDELTA 2 +#endif + +/** @} */ + +/*===========================================================================*/ +/** + * @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. + */ +#if !defined(CH_CFG_TIME_QUANTUM) +#define CH_CFG_TIME_QUANTUM 0 +#endif + +/** + * @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. + */ +#if !defined(CH_CFG_MEMCORE_SIZE) +#define CH_CFG_MEMCORE_SIZE 0 +#endif + +/** + * @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. + */ +#if !defined(CH_CFG_NO_IDLE_THREAD) +#define CH_CFG_NO_IDLE_THREAD FALSE +#endif + +/** @} */ + +/*===========================================================================*/ +/** + * @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. + */ +#if !defined(CH_CFG_OPTIMIZE_SPEED) +#define CH_CFG_OPTIMIZE_SPEED FALSE +#endif + +/** @} */ + +/*===========================================================================*/ +/** + * @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. + */ +#if !defined(CH_CFG_USE_TM) +#define CH_CFG_USE_TM FALSE +#endif + +/** + * @brief Threads registry APIs. + * @details If enabled then the registry APIs are included in the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_REGISTRY) +#define CH_CFG_USE_REGISTRY TRUE +#endif + +/** + * @brief Threads synchronization APIs. + * @details If enabled then the @p chThdWait() function is included in + * the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_WAITEXIT) +#define CH_CFG_USE_WAITEXIT TRUE +#endif + +/** + * @brief Semaphores APIs. + * @details If enabled then the Semaphores APIs are included in the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_SEMAPHORES) +#define CH_CFG_USE_SEMAPHORES TRUE +#endif + +/** + * @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. + */ +#if !defined(CH_CFG_USE_SEMAPHORES_PRIORITY) +#define CH_CFG_USE_SEMAPHORES_PRIORITY FALSE +#endif + +/** + * @brief Mutexes APIs. + * @details If enabled then the mutexes APIs are included in the kernel. + * + * @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. + * @note Recursive mutexes are heavier and have an increased + * memory footprint. + * + * @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. + * @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. + */ +#if !defined(CH_CFG_USE_CONDVARS) +#define CH_CFG_USE_CONDVARS TRUE +#endif + +/** + * @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. + */ +#if !defined(CH_CFG_USE_CONDVARS_TIMEOUT) +#define CH_CFG_USE_CONDVARS_TIMEOUT FALSE +#endif + +/** + * @brief Events Flags APIs. + * @details If enabled then the event flags APIs are included in the kernel. + * + * @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. + * @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. + */ +#if !defined(CH_CFG_USE_EVENTS_TIMEOUT) +#define CH_CFG_USE_EVENTS_TIMEOUT TRUE +#endif + +/** + * @brief Synchronous Messages APIs. + * @details If enabled then the synchronous messages APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_MESSAGES) +#define CH_CFG_USE_MESSAGES TRUE +#endif + +/** + * @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. + */ +#if !defined(CH_CFG_USE_MESSAGES_PRIORITY) +#define CH_CFG_USE_MESSAGES_PRIORITY FALSE +#endif + +/** + * @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. + */ +#if !defined(CH_CFG_USE_MAILBOXES) +#define CH_CFG_USE_MAILBOXES TRUE +#endif + +/** + * @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. + */ +#if !defined(CH_CFG_USE_MEMCORE) +#define CH_CFG_USE_MEMCORE TRUE +#endif + +/** + * @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. + */ +#if !defined(CH_CFG_USE_HEAP) +#define CH_CFG_USE_HEAP FALSE +#endif + +/** + * @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. + */ +#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. + * @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. + */ +#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 + +/** @} */ + +/*===========================================================================*/ +/** + * @name Debug options + * @{ + */ +/*===========================================================================*/ + +/** + * @brief Debug option, kernel statistics. + * + * @note The default is @p FALSE. + */ +#if !defined(CH_DBG_STATISTICS) +#define CH_DBG_STATISTICS FALSE +#endif + +/** + * @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. + */ +#if !defined(CH_DBG_SYSTEM_STATE_CHECK) +#define CH_DBG_SYSTEM_STATE_CHECK FALSE +#endif + +/** + * @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. + */ +#if !defined(CH_DBG_ENABLE_CHECKS) +#define CH_DBG_ENABLE_CHECKS FALSE +#endif + +/** + * @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. + */ +#if !defined(CH_DBG_ENABLE_ASSERTS) +#define CH_DBG_ENABLE_ASSERTS FALSE +#endif + +/** + * @brief Debug option, trace buffer. + * @details If enabled then the trace buffer is activated. + * + * @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. + * @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. + */ +#if !defined(CH_DBG_ENABLE_STACK_CHECK) +#define CH_DBG_ENABLE_STACK_CHECK FALSE +#endif + +/** + * @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. + */ +#if !defined(CH_DBG_FILL_THREADS) +#define CH_DBG_FILL_THREADS FALSE +#endif + +/** + * @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. + */ +#if !defined(CH_DBG_THREADS_PROFILING) +#define CH_DBG_THREADS_PROFILING FALSE +#endif + +/** @} */ + +/*===========================================================================*/ +/** + * @name Kernel hooks + * @{ + */ +/*===========================================================================*/ + +/** + * @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. + */ +#define CH_CFG_THREAD_EXTRA_FIELDS \ + /* Add threads custom fields here.*/ + +/** + * @brief Threads initialization hook. + * @details User initialization code added to the @p _thread_init() function. + * + * @note It is invoked from within @p _thread_init() 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/tkc/godspeed75/config.h b/keyboards/tkc/godspeed75/config.h new file mode 100644 index 000000000000..3cae792006b1 --- /dev/null +++ b/keyboards/tkc/godspeed75/config.h @@ -0,0 +1,114 @@ +/* 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 . + */ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0x544B //TK +#define PRODUCT_ID 0x0006 //GodSpeed75 +#define DEVICE_VER 0x0001 +#define MANUFACTURER The Key Company +#define PRODUCT GodSpeed75 + +/* key matrix size */ +#define MATRIX_ROWS 12 +#define MATRIX_COLS 8 +#define DIODE_DIRECTION COL2ROW +#define MATRIX_ROW_PINS { A3, A4, A5, A6, A7, B0, B1, B2, B10, B11, A9, A10 } +#define MATRIX_COL_PINS { A0, A1, A2, B12, B13, B14, B15, A8 } + + +/* 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 + +/* + * 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 + +/* + * 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 + +// #define WS2812_LED_N 2 +// #define RGBLED_NUM WS2812_LED_N +// #define WS2812_TIM_N 2 +// #define WS2812_TIM_CH 2 +// #define PORT_WS2812 GPIOA +// #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 7 // DMA channel for TIMx_UP +//#define WS2812_EXTERNAL_PULLUP diff --git a/keyboards/tkc/godspeed75/godspeed75.c b/keyboards/tkc/godspeed75/godspeed75.c new file mode 100644 index 000000000000..e440ada48d3b --- /dev/null +++ b/keyboards/tkc/godspeed75/godspeed75.c @@ -0,0 +1,17 @@ +/* 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 "godspeed75.h" diff --git a/keyboards/tkc/godspeed75/godspeed75.h b/keyboards/tkc/godspeed75/godspeed75.h new file mode 100644 index 000000000000..b2db7c876af3 --- /dev/null +++ b/keyboards/tkc/godspeed75/godspeed75.h @@ -0,0 +1,40 @@ +/* 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 . + */ + +#pragma once +#include "quantum.h" + +#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, k37, \ + k40, k50, k41, k51, k42, k52, k43, k53, k44, k54, k45, k55, k46, k47, k57, \ + k60, k70, k61, k71, k62, k72, k63, k73, k64, k74, k65, k75, k67, k77, \ + k80, k81, k91, k82, k92, k83, k93, k84, k94, k85, k95, k96, k87, k97, \ + ka0, ka1, ka3, ka5, kb5, kb6, ka7, kb7 \ +) { \ + { 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, k37 } , \ + { k40, k41, k42, k43, k44, k45, k46, k47 } , \ + { k50, k51, k52, k53, k54, k55, KC_NO, k57 } , \ + { k60, k61, k62, k63, k64, k65, KC_NO, k67 } , \ + { k70, k71, k72, k73, k74, k75, KC_NO, k77 } , \ + { k80, k81, k82, k83, k84, k85, KC_NO, k87 } , \ + { KC_NO,k91, k92, k93, k94, k95, k96, k97 } , \ + { ka0, ka1, KC_NO, ka3, KC_NO, ka5, KC_NO, ka7 } , \ + { KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,kb5, kb6, kb7 } \ +} diff --git a/keyboards/tkc/godspeed75/halconf.h b/keyboards/tkc/godspeed75/halconf.h new file mode 100644 index 000000000000..16f32117d51b --- /dev/null +++ b/keyboards/tkc/godspeed75/halconf.h @@ -0,0 +1,525 @@ +/* + 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. + 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 + +#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 +#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 cryptographic subsystem. + */ +#if !defined(HAL_USE_CRY) || defined(__DOXYGEN__) +#define HAL_USE_CRY FALSE +#endif + +/** + * @brief Enables the DAC subsystem. + */ +#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 +#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 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 +#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 +#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 + +/** + * @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. */ +/*===========================================================================*/ + +/** + * @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 + +/** + * @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. */ +/*===========================================================================*/ + +/** + * @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 the zero-copy API. + */ +#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 + +/** + * @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. */ +/*===========================================================================*/ + +/** + * @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 16 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 256 bytes for both the transmission and receive + * buffers. + */ +#if !defined(SERIAL_USB_BUFFERS_SIZE) || defined(__DOXYGEN__) +#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 + +/*===========================================================================*/ +/* 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 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 +#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. */ +/*===========================================================================*/ + +/** + * @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 + +/*===========================================================================*/ +/* 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/tkc/godspeed75/info.json b/keyboards/tkc/godspeed75/info.json new file mode 100644 index 000000000000..84c9df16431c --- /dev/null +++ b/keyboards/tkc/godspeed75/info.json @@ -0,0 +1,12 @@ +{ + "keyboard_name": "TKC GodSpeed75", + "url": "", + "maintainer": "terrymathews", + "width": 16, + "height": 6, + "layouts": { + "LAYOUT": { + "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":"Scroll Lock", "x":14, "y":0}, {"label":"Pause", "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}, {"x":13, "y":1}, {"label":"BkSp", "x":14, "y":1}, {"label":"PgUp", "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":"PgDn", "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":"Insert", "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":"Delete", "x":15, "y":4}, {"label":"Ctrl", "x":0, "y":5, "w":1.5}, {"label":"Alt", "x":2.25, "y":5, "w":1.25}, {"x":3.5, "y":5, "w":6.25}, {"label":"MO(1)", "x":9.75, "y":5, "w":1.25}, {"label":"Ctrl", "x":11, "y":5, "w":1.25}, {"label":"\u2190", "x":13, "y":5}, {"label":"\u2193", "x":14, "y":5}, {"label":"\u2192", "x":15, "y":5}] + } + } +} \ No newline at end of file diff --git a/keyboards/tkc/godspeed75/keymaps/default/keymap.c b/keyboards/tkc/godspeed75/keymaps/default/keymap.c new file mode 100644 index 000000000000..92ed5220b8cb --- /dev/null +++ b/keyboards/tkc/godspeed75/keymaps/default/keymap.c @@ -0,0 +1,42 @@ +/* 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 + +#define _BL 0 +#define _FL 1 + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* Keymap _BL: Base Layer (Default Layer) + */ +[_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_NO, 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_INS, + 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, MO(1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT), + + /* Keymap _FL: Function Layer + */ +[_FL] = 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_NO, RESET, 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_INS, + 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_TRNS, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT), +}; diff --git a/keyboards/tkc/godspeed75/keymaps/via/keymap.c b/keyboards/tkc/godspeed75/keymaps/via/keymap.c new file mode 100644 index 000000000000..3dfed700b0ee --- /dev/null +++ b/keyboards/tkc/godspeed75/keymaps/via/keymap.c @@ -0,0 +1,59 @@ +/* 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 + +enum layer_names { + _BL, + _FL, + _AL, + _LL +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +[_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_NO, 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_INS, + 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, MO(1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT), + +[_FL] = 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_NO, RESET, 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_INS, + 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_TRNS, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT), + +[_AL] = 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_NO, RESET, 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_INS, + 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_TRNS, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT), + +[_LL] = 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_NO, RESET, 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_INS, + 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_TRNS, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT), +}; diff --git a/keyboards/tkc/godspeed75/keymaps/via/rules.mk b/keyboards/tkc/godspeed75/keymaps/via/rules.mk new file mode 100644 index 000000000000..036bd6d1c3ec --- /dev/null +++ b/keyboards/tkc/godspeed75/keymaps/via/rules.mk @@ -0,0 +1 @@ +VIA_ENABLE = yes \ No newline at end of file diff --git a/keyboards/tkc/godspeed75/mcuconf.h b/keyboards/tkc/godspeed75/mcuconf.h new file mode 100644 index 000000000000..faca3defdf0e --- /dev/null +++ b/keyboards/tkc/godspeed75/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/tkc/godspeed75/readme.md b/keyboards/tkc/godspeed75/readme.md new file mode 100644 index 000000000000..9cf0776b1801 --- /dev/null +++ b/keyboards/tkc/godspeed75/readme.md @@ -0,0 +1,15 @@ +# The Key Company GodSpeed75 + +![GodSpeed75](https://cdn.shopify.com/s/files/1/1679/2319/products/Godspeed75_white_infinikey-bow_720x.jpg?v=1580230323) + +The Key Company GodSpeed75 is a is a 75% top mount keyboard featuring a USB-C daughterboard and USB-A hub utilizing the STM32F072 microcontroller. + +* Keyboard Maintainer: [Terry Mathews](https://github.com/TerryMathews/) +* Hardware Supported: TKC GodSpeed75 +* Hardware Availability: [TheKey.Company](https://thekey.company/products/godspeed75) + +Make example for this keyboard (after setting up your build environment): + + make tkc/godspeed75: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/tkc/godspeed75/rules.mk b/keyboards/tkc/godspeed75/rules.mk new file mode 100644 index 000000000000..69071e042f0c --- /dev/null +++ b/keyboards/tkc/godspeed75/rules.mk @@ -0,0 +1,22 @@ +# 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 = yes # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +BLUETOOTH_ENABLE = no # Enable Bluetooth +AUDIO_ENABLE = no # Audio output + +# Enter lower-power sleep mode when on the ChibiOS idle thread +OPT_DEFS += -DCORTEX_ENABLE_WFI_IDLE=TRUE From 296f267f2b8a0436282aa75b2930ca88456d5a89 Mon Sep 17 00:00:00 2001 From: Croktopus <39040552+Croktopus@users.noreply.github.com> Date: Mon, 27 Jul 2020 19:35:59 -0700 Subject: [PATCH 468/930] Timber Wolf - updated keymaps, fixed info.json (#9787) * updated keymaps, fixed info.json * fixed info.json overlaps * Update keyboards/metamechs/timberwolf/config.h --- keyboards/metamechs/timberwolf/config.h | 1 - keyboards/metamechs/timberwolf/info.json | 82 ++++++++++--------- .../timberwolf/keymaps/a_ansi/keymap.c | 16 ++-- .../timberwolf/keymaps/a_iso/keymap.c | 16 ++-- .../timberwolf/keymaps/b_ansi/keymap.c | 16 ++-- .../timberwolf/keymaps/b_iso/keymap.c | 16 ++-- .../timberwolf/keymaps/default/keymap.c | 16 ++-- .../timberwolf/keymaps/prime_ansi/keymap.c | 16 ++-- .../timberwolf/keymaps/prime_iso/keymap.c | 16 ++-- .../metamechs/timberwolf/keymaps/via/keymap.c | 16 ++-- .../metamechs/timberwolf/keymaps/via/rules.mk | 1 + keyboards/metamechs/timberwolf/rules.mk | 2 +- 12 files changed, 108 insertions(+), 106 deletions(-) create mode 100644 keyboards/metamechs/timberwolf/keymaps/via/rules.mk diff --git a/keyboards/metamechs/timberwolf/config.h b/keyboards/metamechs/timberwolf/config.h index b23fd2fcf722..8c92e2283d12 100644 --- a/keyboards/metamechs/timberwolf/config.h +++ b/keyboards/metamechs/timberwolf/config.h @@ -25,7 +25,6 @@ along with this program. If not, see . #define DEVICE_VER 0x0001 #define MANUFACTURER MetaMechs #define PRODUCT Timber Wolf -#define DESCRIPTION Timber Wolf /* key matrix size */ #define MATRIX_COLS 9 diff --git a/keyboards/metamechs/timberwolf/info.json b/keyboards/metamechs/timberwolf/info.json index b483ce31bca0..4c099e50394d 100644 --- a/keyboards/metamechs/timberwolf/info.json +++ b/keyboards/metamechs/timberwolf/info.json @@ -7,64 +7,66 @@ "layouts": { "LAYOUT_all": { "layout": [ - {"label":"Mute", "x":0, "y":0}, {"label":"Esc", "x":1.25, "y":0}, {"label":"F1", "x":2.5, "y":0}, {"label":"F2", "x":3.5, "y":0}, {"label":"F3", "x":4.5, "y":0}, {"label":"F4", "x":5.5, "y":0}, {"label":"F5", "x":7, "y":0}, {"label":"F6", "x":8, "y":0}, {"label":"F7", "x":9, "y":0}, {"label":"F8", "x":10, "y":0}, {"label":"F9", "x":11.5, "y":0}, {"label":"F10", "x":12.5, "y":0}, {"label":"F11", "x":13.5, "y":0}, {"label":"F12", "x":14.5, "y":0}, {"label":"Insert", "x":15.75, "y":0}, {"label":"Home", "x":16.75, "y":0}, {"label":"PgUp", "x":17.75, "y":0}, {"label":"End", "x":16.75, "y":1}, {"label":"PgDn", "x":17.75, "y":1}, - {"label":"Fn", "x":0, "y":1.25}, {"label":"~", "x":1.25, "y":1.25}, {"label":"!", "x":2.25, "y":1.25}, {"label":"@", "x":3.25, "y":1.25}, {"label":"#", "x":4.25, "y":1.25}, {"label":"$", "x":5.25, "y":1.25}, {"label":"%", "x":6.25, "y":1.25}, {"label":"^", "x":7.25, "y":1.25}, {"label":"&", "x":8.25, "y":1.25}, {"label":"*", "x":9.25, "y":1.25}, {"label":"(", "x":10.25, "y":1.25}, {"label":")", "x":11.25, "y":1.25}, {"label":"_", "x":12.25, "y":1.25}, {"label":"+", "x":13.25, "y":1.25}, {"x":14.25, "y":1.25}, {"label":"Backspace", "x":15.25, "y":1.25}, - {"label":"Fn", "x":0, "y":2.25}, {"label":"Tab", "x":1.25, "y":2.25, "w":1.5}, {"label":"Q", "x":2.75, "y":2.25}, {"label":"W", "x":3.75, "y":2.25}, {"label":"E", "x":4.75, "y":2.25}, {"label":"R", "x":5.75, "y":2.25}, {"label":"T", "x":6.75, "y":2.25}, {"label":"Y", "x":7.75, "y":2.25}, {"label":"U", "x":8.75, "y":2.25}, {"label":"I", "x":9.75, "y":2.25}, {"label":"O", "x":10.75, "y":2.25}, {"label":"P", "x":11.75, "y":2.25}, {"label":"{", "x":12.75, "y":2.25}, {"label":"}", "x":13.75, "y":2.25}, {"label":"|", "x":14.75, "y":2.25, "w":1.5}, {"label":"Insert", "x":16.5, "y":2.25}, {"label":"PrtSc", "x":17.75, "y":2.25}, - {"label":"Fn", "x":0, "y":3.25}, {"label":"Caps Lock", "x":1.25, "y":3.25, "w":1.75}, {"label":"A", "x":3, "y":3.25}, {"label":"S", "x":4, "y":3.25}, {"label":"D", "x":5, "y":3.25}, {"label":"F", "x":6, "y":3.25}, {"label":"G", "x":7, "y":3.25}, {"label":"H", "x":8, "y":3.25}, {"label":"J", "x":9, "y":3.25}, {"label":"K", "x":10, "y":3.25}, {"label":"L", "x":11, "y":3.25}, {"label":":", "x":12, "y":3.25}, {"label":"\"", "x":13, "y":3.25}, {"x":14, "y":3.25}, {"label":"Enter", "x":15, "y":3.25, "w":1.25}, {"label":"Delete", "x":16.5, "y":3.25}, {"label":"Enter", "x":17.75, "y":3.25}, - {"label":"Fn", "x":0, "y":4.25}, {"label":"Shift", "x":1.25, "y":4.25, "w":1.25}, {"x":2.5, "y":4.25}, {"label":"Z", "x":3.5, "y":4.25}, {"label":"X", "x":4.5, "y":4.25}, {"label":"C", "x":5.5, "y":4.25}, {"label":"V", "x":6.5, "y":4.25}, {"label":"B", "x":7.5, "y":4.25}, {"label":"N", "x":8.5, "y":4.25}, {"label":"M", "x":9.5, "y":4.25}, {"label":"<", "x":10.5, "y":4.25}, {"label":">", "x":11.5, "y":4.25}, {"label":"?", "x":12.5, "y":4.25}, {"label":"Shift", "x":13.5, "y":4.25, "w":1.75}, {"label":"Fn", "x":15.25, "y":4.25}, {"label":"Enter", "x":17.75, "y":4.25}, {"label":"\u2191", "x":16.5, "y":4.5}, - {"label":"Fn", "x":0, "y":5.25}, {"label":"Ctrl", "x":1.25, "y":5.25, "w":1.5}, {"label":"Win", "x":2.75, "y":5.25}, {"label":"Alt", "x":3.75, "y":5.25, "w":1.5}, {"x":5.25, "y":5.25, "w":6}, {"label":"Alt", "x":11.25, "y":5.25, "w":1.5}, {"label":"Win", "x":12.75, "y":5.25}, {"label":"Ctrl", "x":13.75, "y":5.25, "w":1.5}, {"label":"\u2190", "x":15.5, "y":5.5}, {"label":"\u2193", "x":16.5, "y":5.5}, {"label":"\u2192", "x":17.5, "y":5.5}] + {"label":"Mute", "x":0, "y":0}, {"label":"Esc", "x":1.25, "y":0}, {"label":"F1", "x":2.5, "y":0}, {"label":"F2", "x":3.5, "y":0}, {"label":"F3", "x":4.5, "y":0}, {"label":"F4", "x":5.5, "y":0}, {"label":"F5", "x":7, "y":0}, {"label":"F6", "x":8, "y":0}, {"label":"F7", "x":9, "y":0}, {"label":"F8", "x":10, "y":0}, {"label":"F9", "x":11.5, "y":0}, {"label":"F10", "x":12.5, "y":0}, {"label":"F11", "x":13.5, "y":0}, {"label":"F12", "x":14.5, "y":0}, {"label":"Insert", "x":15.75, "y":0}, {"label":"Home", "x":16.75, "y":0}, {"label":"PgUp", "x":17.75, "y":0}, + {"label":"F13", "x":0, "y":1.25}, {"label":"~", "x":1.25, "y":1.25}, {"label":"!", "x":2.25, "y":1.25}, {"label":"@", "x":3.25, "y":1.25}, {"label":"#", "x":4.25, "y":1.25}, {"label":"$", "x":5.25, "y":1.25}, {"label":"%", "x":6.25, "y":1.25}, {"label":"^", "x":7.25, "y":1.25}, {"label":"&", "x":8.25, "y":1.25}, {"label":"*", "x":9.25, "y":1.25}, {"label":"(", "x":10.25, "y":1.25}, {"label":")", "x":11.25, "y":1.25}, {"label":"_", "x":12.25, "y":1.25}, {"label":"+", "x":13.25, "y":1.25}, {"x":14.25, "y":1.25}, {"label":"Backspace", "x":15.25, "y":1.25}, {"label":"End", "x":16.75, "y":1}, {"label":"PgDn", "x":17.75, "y":1}, + {"label":"F14", "x":0, "y":2.25}, {"label":"Tab", "x":1.25, "y":2.25, "w":1.5}, {"label":"Q", "x":2.75, "y":2.25}, {"label":"W", "x":3.75, "y":2.25}, {"label":"E", "x":4.75, "y":2.25}, {"label":"R", "x":5.75, "y":2.25}, {"label":"T", "x":6.75, "y":2.25}, {"label":"Y", "x":7.75, "y":2.25}, {"label":"U", "x":8.75, "y":2.25}, {"label":"I", "x":9.75, "y":2.25}, {"label":"O", "x":10.75, "y":2.25}, {"label":"P", "x":11.75, "y":2.25}, {"label":"{", "x":12.75, "y":2.25}, {"label":"}", "x":13.75, "y":2.25}, {"label":"|", "x":14.75, "y":2.25, "w":1.5}, {"label":"Insert", "x":16.5, "y":2.25}, {"label":"PrtSc", "x":17.75, "y":2.25}, + {"label":"F15", "x":0, "y":3.25}, {"label":"Caps Lock", "x":1.25, "y":3.25, "w":1.75}, {"label":"A", "x":3, "y":3.25}, {"label":"S", "x":4, "y":3.25}, {"label":"D", "x":5, "y":3.25}, {"label":"F", "x":6, "y":3.25}, {"label":"G", "x":7, "y":3.25}, {"label":"H", "x":8, "y":3.25}, {"label":"J", "x":9, "y":3.25}, {"label":"K", "x":10, "y":3.25}, {"label":"L", "x":11, "y":3.25}, {"label":":", "x":12, "y":3.25}, {"label":"\"", "x":13, "y":3.25}, {"x":14, "y":3.25}, {"label":"Enter", "x":15, "y":3.25, "w":1.25}, {"label":"Delete", "x":16.5, "y":3.25}, {"label":"Enter", "x":17.75, "y":3.25}, + {"label":"F16", "x":0, "y":4.25}, {"label":"Shift", "x":1.25, "y":4.25, "w":1.25}, {"x":2.5, "y":4.25}, {"label":"Z", "x":3.5, "y":4.25}, {"label":"X", "x":4.5, "y":4.25}, {"label":"C", "x":5.5, "y":4.25}, {"label":"V", "x":6.5, "y":4.25}, {"label":"B", "x":7.5, "y":4.25}, {"label":"N", "x":8.5, "y":4.25}, {"label":"M", "x":9.5, "y":4.25}, {"label":"<", "x":10.5, "y":4.25}, {"label":">", "x":11.5, "y":4.25}, {"label":"?", "x":12.5, "y":4.25}, {"label":"Shift", "x":13.5, "y":4.25, "w":1.25}, {"label":"Fn", "x":14.75, "y":4.25}, {"label":"Up", "x":15.75, "y":4.5}, {"label":"Up", "x":16.75, "y":4.5}, {"label":"Enter", "x":17.75, "y":4.25}, + {"label":"F17", "x":0, "y":5.25}, {"label":"Ctrl", "x":1.25, "y":5.25, "w":1.5}, {"label":"Win", "x":2.75, "y":5.25}, {"label":"Alt", "x":3.75, "y":5.25, "w":1.5}, {"x":5.25, "y":5.25, "w":5.5}, {"label":"Alt", "x":10.75, "y":5.25, "w":1}, {"label":"Win", "x":11.75, "y":5.25}, {"label":"Ctrl", "x":12.75, "y":5.25, "w":1}, {"label":"Left", "x":13.75, "y":5.5}, {"label":"Left", "x":14.75, "y":5.5}, {"label":"Down", "x":15.75, "y":5.5}, {"label":"Right", "x":16.75, "y":5.5}, {"label":"Enter", "x":17.75, "y":5.25}] }, "LAYOUT_prime_ansi": { "layout": [ - {"label":"Mute", "x":0, "y":0}, {"label":"Esc", "x":1.25, "y":0}, {"label":"F1", "x":2.5, "y":0}, {"label":"F2", "x":3.5, "y":0}, {"label":"F3", "x":4.5, "y":0}, {"label":"F4", "x":5.5, "y":0}, {"label":"F5", "x":7, "y":0}, {"label":"F6", "x":8, "y":0}, {"label":"F7", "x":9, "y":0}, {"label":"F8", "x":10, "y":0}, {"label":"F9", "x":11.5, "y":0}, {"label":"F10", "x":12.5, "y":0}, {"label":"F11", "x":13.5, "y":0}, {"label":"F12", "x":14.5, "y":0}, {"label":"Insert", "x":15.75, "y":0}, {"label":"Home", "x":16.75, "y":0}, {"label":"PgUp", "x":17.75, "y":0}, {"label":"End", "x":16.75, "y":1}, {"label":"PgDn", "x":17.75, "y":1}, - {"label":"Fn", "x":0, "y":1.25}, {"label":"~", "x":1.25, "y":1.25}, {"label":"!", "x":2.25, "y":1.25}, {"label":"@", "x":3.25, "y":1.25}, {"label":"#", "x":4.25, "y":1.25}, {"label":"$", "x":5.25, "y":1.25}, {"label":"%", "x":6.25, "y":1.25}, {"label":"^", "x":7.25, "y":1.25}, {"label":"&", "x":8.25, "y":1.25}, {"label":"*", "x":9.25, "y":1.25}, {"label":"(", "x":10.25, "y":1.25}, {"label":")", "x":11.25, "y":1.25}, {"label":"_", "x":12.25, "y":1.25}, {"label":"+", "x":13.25, "y":1.25}, {"x":14.25, "y":1.25}, {"label":"Backspace", "x":15.25, "y":1.25}, - {"label":"Fn", "x":0, "y":2.25}, {"label":"Tab", "x":1.25, "y":2.25, "w":1.5}, {"label":"Q", "x":2.75, "y":2.25}, {"label":"W", "x":3.75, "y":2.25}, {"label":"E", "x":4.75, "y":2.25}, {"label":"R", "x":5.75, "y":2.25}, {"label":"T", "x":6.75, "y":2.25}, {"label":"Y", "x":7.75, "y":2.25}, {"label":"U", "x":8.75, "y":2.25}, {"label":"I", "x":9.75, "y":2.25}, {"label":"O", "x":10.75, "y":2.25}, {"label":"P", "x":11.75, "y":2.25}, {"label":"{", "x":12.75, "y":2.25}, {"label":"}", "x":13.75, "y":2.25}, {"label":"|", "x":14.75, "y":2.25, "w":1.5}, {"label":"Insert", "x":16.5, "y":2.25}, {"label":"PrtSc", "x":17.75, "y":2.25}, - {"label":"Fn", "x":0, "y":3.25}, {"label":"Caps Lock", "x":1.25, "y":3.25, "w":1.75}, {"label":"A", "x":3, "y":3.25}, {"label":"S", "x":4, "y":3.25}, {"label":"D", "x":5, "y":3.25}, {"label":"F", "x":6, "y":3.25}, {"label":"G", "x":7, "y":3.25}, {"label":"H", "x":8, "y":3.25}, {"label":"J", "x":9, "y":3.25}, {"label":"K", "x":10, "y":3.25}, {"label":"L", "x":11, "y":3.25}, {"label":":", "x":12, "y":3.25}, {"label":"\"", "x":13, "y":3.25}, {"label":"Enter", "x":14, "y":3.25, "w":2.25}, {"label":"Delete", "x":16.5, "y":3.25}, {"label":"Enter", "x":17.75, "y":3.25}, - {"label":"Fn", "x":0, "y":4.25}, {"label":"Shift", "x":1.25, "y":4.25, "w":2.25}, {"label":"Z", "x":3.5, "y":4.25}, {"label":"X", "x":4.5, "y":4.25}, {"label":"C", "x":5.5, "y":4.25}, {"label":"V", "x":6.5, "y":4.25}, {"label":"B", "x":7.5, "y":4.25}, {"label":"N", "x":8.5, "y":4.25}, {"label":"M", "x":9.5, "y":4.25}, {"label":"<", "x":10.5, "y":4.25}, {"label":">", "x":11.5, "y":4.25}, {"label":"?", "x":12.5, "y":4.25}, {"label":"Shift", "x":13.5, "y":4.25, "w":1.75}, {"label":"Fn", "x":15.25, "y":4.25}, {"label":"Enter", "x":17.75, "y":4.25}, {"label":"\u2191", "x":16.5, "y":4.5}, - {"label":"Fn", "x":0, "y":5.25}, {"label":"Ctrl", "x":1.25, "y":5.25, "w":1.5}, {"label":"Win", "x":2.75, "y":5.25}, {"label":"Alt", "x":3.75, "y":5.25, "w":1.5}, {"x":5.25, "y":5.25, "w":6}, {"label":"Alt", "x":11.25, "y":5.25, "w":1.5}, {"label":"Win", "x":12.75, "y":5.25}, {"label":"Ctrl", "x":13.75, "y":5.25, "w":1.5}, {"label":"\u2190", "x":15.5, "y":5.5}, {"label":"\u2193", "x":16.5, "y":5.5}, {"label":"\u2192", "x":17.5, "y":5.5}] + {"label":"Mute", "x":0, "y":0}, {"label":"Esc", "x":1.25, "y":0}, {"label":"F1", "x":2.5, "y":0}, {"label":"F2", "x":3.5, "y":0}, {"label":"F3", "x":4.5, "y":0}, {"label":"F4", "x":5.5, "y":0}, {"label":"F5", "x":7, "y":0}, {"label":"F6", "x":8, "y":0}, {"label":"F7", "x":9, "y":0}, {"label":"F8", "x":10, "y":0}, {"label":"F9", "x":11.5, "y":0}, {"label":"F10", "x":12.5, "y":0}, {"label":"F11", "x":13.5, "y":0}, {"label":"F12", "x":14.5, "y":0}, {"label":"Insert", "x":15.75, "y":0}, {"label":"Home", "x":16.75, "y":0}, {"label":"PgUp", "x":17.75, "y":0}, + {"label":"F13", "x":0, "y":1.25}, {"label":"~", "x":1.25, "y":1.25}, {"label":"!", "x":2.25, "y":1.25}, {"label":"@", "x":3.25, "y":1.25}, {"label":"#", "x":4.25, "y":1.25}, {"label":"$", "x":5.25, "y":1.25}, {"label":"%", "x":6.25, "y":1.25}, {"label":"^", "x":7.25, "y":1.25}, {"label":"&", "x":8.25, "y":1.25}, {"label":"*", "x":9.25, "y":1.25}, {"label":"(", "x":10.25, "y":1.25}, {"label":")", "x":11.25, "y":1.25}, {"label":"_", "x":12.25, "y":1.25}, {"label":"+", "x":13.25, "y":1.25}, {"x":14.25, "y":1.25}, {"label":"Backspace", "x":15.25, "y":1.25}, {"label":"End", "x":16.75, "y":1}, {"label":"PgDn", "x":17.75, "y":1}, + {"label":"F14", "x":0, "y":2.25}, {"label":"Tab", "x":1.25, "y":2.25, "w":1.5}, {"label":"Q", "x":2.75, "y":2.25}, {"label":"W", "x":3.75, "y":2.25}, {"label":"E", "x":4.75, "y":2.25}, {"label":"R", "x":5.75, "y":2.25}, {"label":"T", "x":6.75, "y":2.25}, {"label":"Y", "x":7.75, "y":2.25}, {"label":"U", "x":8.75, "y":2.25}, {"label":"I", "x":9.75, "y":2.25}, {"label":"O", "x":10.75, "y":2.25}, {"label":"P", "x":11.75, "y":2.25}, {"label":"{", "x":12.75, "y":2.25}, {"label":"}", "x":13.75, "y":2.25}, {"label":"|", "x":14.75, "y":2.25, "w":1.5}, {"label":"Insert", "x":16.5, "y":2.25}, {"label":"PrtSc", "x":17.75, "y":2.25}, + {"label":"F15", "x":0, "y":3.25}, {"label":"Caps Lock", "x":1.25, "y":3.25, "w":1.75}, {"label":"A", "x":3, "y":3.25}, {"label":"S", "x":4, "y":3.25}, {"label":"D", "x":5, "y":3.25}, {"label":"F", "x":6, "y":3.25}, {"label":"G", "x":7, "y":3.25}, {"label":"H", "x":8, "y":3.25}, {"label":"J", "x":9, "y":3.25}, {"label":"K", "x":10, "y":3.25}, {"label":"L", "x":11, "y":3.25}, {"label":":", "x":12, "y":3.25}, {"label":"\"", "x":13, "y":3.25}, {"label":"Enter", "x":14, "y":3.25, "w":2.25}, {"label":"Delete", "x":16.5, "y":3.25}, {"label":"Enter", "x":17.75, "y":3.25}, + {"label":"F16", "x":0, "y":4.25}, {"label":"Shift", "x":1.25, "y":4.25, "w":2.25}, {"label":"Z", "x":3.5, "y":4.25}, {"label":"X", "x":4.5, "y":4.25}, {"label":"C", "x":5.5, "y":4.25}, {"label":"V", "x":6.5, "y":4.25}, {"label":"B", "x":7.5, "y":4.25}, {"label":"N", "x":8.5, "y":4.25}, {"label":"M", "x":9.5, "y":4.25}, {"label":"<", "x":10.5, "y":4.25}, {"label":">", "x":11.5, "y":4.25}, {"label":"?", "x":12.5, "y":4.25}, {"label":"Shift", "x":13.5, "y":4.25, "w":1.75}, {"label":"Fn", "x":15.25, "y":4.25}, {"label":"Up", "x":16.5, "y":4.5}, {"label":"Enter", "x":17.75, "y":4.25}, + {"label":"F17", "x":0, "y":5.25}, {"label":"Ctrl", "x":1.25, "y":5.25, "w":1.5}, {"label":"Win", "x":2.75, "y":5.25}, {"label":"Alt", "x":3.75, "y":5.25, "w":1.5}, {"x":5.25, "y":5.25, "w":6}, {"label":"Alt", "x":11.25, "y":5.25, "w":1.5}, {"label":"Win", "x":12.75, "y":5.25}, {"label":"Ctrl", "x":13.75, "y":5.25, "w":1.5}, {"label":"Left", "x":15.5, "y":5.5}, {"label":"Down", "x":16.5, "y":5.5}, {"label":"Right", "x":17.5, "y":5.5}] }, "LAYOUT_prime_iso": { "layout": [ - {"label":"Mute", "x":0, "y":0}, {"label":"Esc", "x":1.25, "y":0}, {"label":"F1", "x":2.5, "y":0}, {"label":"F2", "x":3.5, "y":0}, {"label":"F3", "x":4.5, "y":0}, {"label":"F4", "x":5.5, "y":0}, {"label":"F5", "x":7, "y":0}, {"label":"F6", "x":8, "y":0}, {"label":"F7", "x":9, "y":0}, {"label":"F8", "x":10, "y":0}, {"label":"F9", "x":11.5, "y":0}, {"label":"F10", "x":12.5, "y":0}, {"label":"F11", "x":13.5, "y":0}, {"label":"F12", "x":14.5, "y":0}, {"label":"Insert", "x":15.75, "y":0}, {"label":"Home", "x":16.75, "y":0}, {"label":"PgUp", "x":17.75, "y":0}, {"label":"End", "x":16.75, "y":1}, {"label":"PgDn", "x":17.75, "y":1}, - {"label":"Fn", "x":0, "y":1.25}, {"label":"~", "x":1.25, "y":1.25}, {"label":"!", "x":2.25, "y":1.25}, {"label":"@", "x":3.25, "y":1.25}, {"label":"#", "x":4.25, "y":1.25}, {"label":"$", "x":5.25, "y":1.25}, {"label":"%", "x":6.25, "y":1.25}, {"label":"^", "x":7.25, "y":1.25}, {"label":"&", "x":8.25, "y":1.25}, {"label":"*", "x":9.25, "y":1.25}, {"label":"(", "x":10.25, "y":1.25}, {"label":")", "x":11.25, "y":1.25}, {"label":"_", "x":12.25, "y":1.25}, {"label":"+", "x":13.25, "y":1.25}, {"x":14.25, "y":1.25}, {"label":"Backspace", "x":15.25, "y":1.25}, - {"label":"Fn", "x":0, "y":2.25}, {"label":"Tab", "x":1.25, "y":2.25, "w":1.5}, {"label":"Q", "x":2.75, "y":2.25}, {"label":"W", "x":3.75, "y":2.25}, {"label":"E", "x":4.75, "y":2.25}, {"label":"R", "x":5.75, "y":2.25}, {"label":"T", "x":6.75, "y":2.25}, {"label":"Y", "x":7.75, "y":2.25}, {"label":"U", "x":8.75, "y":2.25}, {"label":"I", "x":9.75, "y":2.25}, {"label":"O", "x":10.75, "y":2.25}, {"label":"P", "x":11.75, "y":2.25}, {"label":"{", "x":12.75, "y":2.25}, {"label":"}", "x":13.75, "y":2.25}, {"label":"Enter", "x":15, "y":2.25, "w":1.25, "h":2}, {"label":"Insert", "x":16.5, "y":2.25}, {"label":"PrtSc", "x":17.75, "y":2.25}, - {"label":"Fn", "x":0, "y":3.25}, {"label":"Caps Lock", "x":1.25, "y":3.25, "w":1.75}, {"label":"A", "x":3, "y":3.25}, {"label":"S", "x":4, "y":3.25}, {"label":"D", "x":5, "y":3.25}, {"label":"F", "x":6, "y":3.25}, {"label":"G", "x":7, "y":3.25}, {"label":"H", "x":8, "y":3.25}, {"label":"J", "x":9, "y":3.25}, {"label":"K", "x":10, "y":3.25}, {"label":"L", "x":11, "y":3.25}, {"label":":", "x":12, "y":3.25}, {"label":"\"", "x":13, "y":3.25}, {"x":14, "y":3.25}, {"label":"Delete", "x":16.5, "y":3.25}, {"label":"Enter", "x":17.75, "y":3.25}, - {"label":"Fn", "x":0, "y":4.25}, {"label":"Shift", "x":1.25, "y":4.25, "w":1.25}, {"x":2.5, "y":4.25}, {"label":"Z", "x":3.5, "y":4.25}, {"label":"X", "x":4.5, "y":4.25}, {"label":"C", "x":5.5, "y":4.25}, {"label":"V", "x":6.5, "y":4.25}, {"label":"B", "x":7.5, "y":4.25}, {"label":"N", "x":8.5, "y":4.25}, {"label":"M", "x":9.5, "y":4.25}, {"label":"<", "x":10.5, "y":4.25}, {"label":">", "x":11.5, "y":4.25}, {"label":"?", "x":12.5, "y":4.25}, {"label":"Shift", "x":13.5, "y":4.25, "w":1.75}, {"label":"Fn", "x":15.25, "y":4.25}, {"label":"Enter", "x":17.75, "y":4.25}, {"label":"\u2191", "x":16.5, "y":4.5}, - {"label":"Fn", "x":0, "y":5.25}, {"label":"Ctrl", "x":1.25, "y":5.25, "w":1.5}, {"label":"Win", "x":2.75, "y":5.25}, {"label":"Alt", "x":3.75, "y":5.25, "w":1.5}, {"x":5.25, "y":5.25, "w":6}, {"label":"Alt", "x":11.25, "y":5.25, "w":1.5}, {"label":"Win", "x":12.75, "y":5.25}, {"label":"Ctrl", "x":13.75, "y":5.25, "w":1.5}, {"label":"\u2190", "x":15.5, "y":5.5}, {"label":"\u2193", "x":16.5, "y":5.5}, {"label":"\u2192", "x":17.5, "y":5.5}] + {"label":"Mute", "x":0, "y":0}, {"label":"Esc", "x":1.25, "y":0}, {"label":"F1", "x":2.5, "y":0}, {"label":"F2", "x":3.5, "y":0}, {"label":"F3", "x":4.5, "y":0}, {"label":"F4", "x":5.5, "y":0}, {"label":"F5", "x":7, "y":0}, {"label":"F6", "x":8, "y":0}, {"label":"F7", "x":9, "y":0}, {"label":"F8", "x":10, "y":0}, {"label":"F9", "x":11.5, "y":0}, {"label":"F10", "x":12.5, "y":0}, {"label":"F11", "x":13.5, "y":0}, {"label":"F12", "x":14.5, "y":0}, {"label":"Insert", "x":15.75, "y":0}, {"label":"Home", "x":16.75, "y":0}, {"label":"PgUp", "x":17.75, "y":0}, + {"label":"F13", "x":0, "y":1.25}, {"label":"~", "x":1.25, "y":1.25}, {"label":"!", "x":2.25, "y":1.25}, {"label":"@", "x":3.25, "y":1.25}, {"label":"#", "x":4.25, "y":1.25}, {"label":"$", "x":5.25, "y":1.25}, {"label":"%", "x":6.25, "y":1.25}, {"label":"^", "x":7.25, "y":1.25}, {"label":"&", "x":8.25, "y":1.25}, {"label":"*", "x":9.25, "y":1.25}, {"label":"(", "x":10.25, "y":1.25}, {"label":")", "x":11.25, "y":1.25}, {"label":"_", "x":12.25, "y":1.25}, {"label":"+", "x":13.25, "y":1.25}, {"x":14.25, "y":1.25}, {"label":"Backspace", "x":15.25, "y":1.25}, {"label":"End", "x":16.75, "y":1}, {"label":"PgDn", "x":17.75, "y":1}, + {"label":"F14", "x":0, "y":2.25}, {"label":"Tab", "x":1.25, "y":2.25, "w":1.5}, {"label":"Q", "x":2.75, "y":2.25}, {"label":"W", "x":3.75, "y":2.25}, {"label":"E", "x":4.75, "y":2.25}, {"label":"R", "x":5.75, "y":2.25}, {"label":"T", "x":6.75, "y":2.25}, {"label":"Y", "x":7.75, "y":2.25}, {"label":"U", "x":8.75, "y":2.25}, {"label":"I", "x":9.75, "y":2.25}, {"label":"O", "x":10.75, "y":2.25}, {"label":"P", "x":11.75, "y":2.25}, {"label":"{", "x":12.75, "y":2.25}, {"label":"}", "x":13.75, "y":2.25}, {"label":"Enter", "x":15, "y":2.25, "w":1.25, "h":2}, {"label":"Insert", "x":16.5, "y":2.25}, {"label":"PrtSc", "x":17.75, "y":2.25}, + {"label":"F15", "x":0, "y":3.25}, {"label":"Caps Lock", "x":1.25, "y":3.25, "w":1.75}, {"label":"A", "x":3, "y":3.25}, {"label":"S", "x":4, "y":3.25}, {"label":"D", "x":5, "y":3.25}, {"label":"F", "x":6, "y":3.25}, {"label":"G", "x":7, "y":3.25}, {"label":"H", "x":8, "y":3.25}, {"label":"J", "x":9, "y":3.25}, {"label":"K", "x":10, "y":3.25}, {"label":"L", "x":11, "y":3.25}, {"label":":", "x":12, "y":3.25}, {"label":"\"", "x":13, "y":3.25}, {"x":14, "y":3.25}, {"label":"Delete", "x":16.5, "y":3.25}, {"label":"Enter", "x":17.75, "y":3.25}, + {"label":"F16", "x":0, "y":4.25}, {"label":"Shift", "x":1.25, "y":4.25, "w":1.25}, {"x":2.5, "y":4.25}, {"label":"Z", "x":3.5, "y":4.25}, {"label":"X", "x":4.5, "y":4.25}, {"label":"C", "x":5.5, "y":4.25}, {"label":"V", "x":6.5, "y":4.25}, {"label":"B", "x":7.5, "y":4.25}, {"label":"N", "x":8.5, "y":4.25}, {"label":"M", "x":9.5, "y":4.25}, {"label":"<", "x":10.5, "y":4.25}, {"label":">", "x":11.5, "y":4.25}, {"label":"?", "x":12.5, "y":4.25}, {"label":"Shift", "x":13.5, "y":4.25, "w":1.75}, {"label":"Fn", "x":15.25, "y":4.25}, {"label":"Up", "x":16.5, "y":4.5}, {"label":"Enter", "x":17.75, "y":4.25}, + {"label":"F17", "x":0, "y":5.25}, {"label":"Ctrl", "x":1.25, "y":5.25, "w":1.5}, {"label":"Win", "x":2.75, "y":5.25}, {"label":"Alt", "x":3.75, "y":5.25, "w":1.5}, {"x":5.25, "y":5.25, "w":6}, {"label":"Alt", "x":11.25, "y":5.25, "w":1.5}, {"label":"Win", "x":12.75, "y":5.25}, {"label":"Ctrl", "x":13.75, "y":5.25, "w":1.5}, {"label":"Left", "x":15.5, "y":5.5}, {"label":"Down", "x":16.5, "y":5.5}, {"label":"Right", "x":17.5, "y":5.5}] }, "LAYOUT_b_ansi": { "layout": [ {"label":"Mute", "x":0, "y":0}, {"label":"Esc", "x":1.25, "y":0}, {"label":"F1", "x":2.5, "y":0}, {"label":"F2", "x":3.5, "y":0}, {"label":"F3", "x":4.5, "y":0}, {"label":"F4", "x":5.5, "y":0}, {"label":"F5", "x":7, "y":0}, {"label":"F6", "x":8, "y":0}, {"label":"F7", "x":9, "y":0}, {"label":"F8", "x":10, "y":0}, {"label":"F9", "x":11.5, "y":0}, {"label":"F10", "x":12.5, "y":0}, {"label":"F11", "x":13.5, "y":0}, {"label":"F12", "x":14.5, "y":0}, {"label":"PrtSc", "x":15.75, "y":0}, {"label":"Scroll Lock", "x":16.75, "y":0}, {"label":"Pause", "x":17.75, "y":0}, - {"label":"Fn", "x":0, "y":1.25}, {"label":"~", "x":1.25, "y":1.25}, {"label":"!", "x":2.25, "y":1.25}, {"label":"@", "x":3.25, "y":1.25}, {"label":"#", "x":4.25, "y":1.25}, {"label":"$", "x":5.25, "y":1.25}, {"label":"%", "x":6.25, "y":1.25}, {"label":"^", "x":7.25, "y":1.25}, {"label":"&", "x":8.25, "y":1.25}, {"label":"*", "x":9.25, "y":1.25}, {"label":"(", "x":10.25, "y":1.25}, {"label":")", "x":11.25, "y":1.25}, {"label":"_", "x":12.25, "y":1.25}, {"label":"+", "x":13.25, "y":1.25}, {"x":14.25, "y":1.25}, {"label":"Backspace", "x":15.25, "y":1.25}, {"label":"Home", "x":16.75, "y":1.25}, {"label":"PgUp", "x":17.75, "y":1.25}, - {"label":"Fn", "x":0, "y":2.25}, {"label":"Tab", "x":1.25, "y":2.25, "w":1.5}, {"label":"Q", "x":2.75, "y":2.25}, {"label":"W", "x":3.75, "y":2.25}, {"label":"E", "x":4.75, "y":2.25}, {"label":"R", "x":5.75, "y":2.25}, {"label":"T", "x":6.75, "y":2.25}, {"label":"Y", "x":7.75, "y":2.25}, {"label":"U", "x":8.75, "y":2.25}, {"label":"I", "x":9.75, "y":2.25}, {"label":"O", "x":10.75, "y":2.25}, {"label":"P", "x":11.75, "y":2.25}, {"label":"{", "x":12.75, "y":2.25}, {"label":"}", "x":13.75, "y":2.25}, {"label":"|", "x":14.75, "y":2.25, "w":1.5}, {"label":"End", "x":16.75, "y":2.25}, {"label":"PgDn", "x":17.75, "y":2.25}, - {"label":"Fn", "x":0, "y":3.25}, {"label":"Caps Lock", "x":1.25, "y":3.25, "w":1.75}, {"label":"A", "x":3, "y":3.25}, {"label":"S", "x":4, "y":3.25}, {"label":"D", "x":5, "y":3.25}, {"label":"F", "x":6, "y":3.25}, {"label":"G", "x":7, "y":3.25}, {"label":"H", "x":8, "y":3.25}, {"label":"J", "x":9, "y":3.25}, {"label":"K", "x":10, "y":3.25}, {"label":"L", "x":11, "y":3.25}, {"label":":", "x":12, "y":3.25}, {"label":"\"", "x":13, "y":3.25}, {"label":"Enter", "x":14, "y":3.25, "w":2.25}, {"label":"Delete", "x":16.75, "y":3.25}, {"label":"Insert", "x":17.75, "y":3.25}, - {"label":"Fn", "x":0, "y":4.25}, {"label":"Shift", "x":1.25, "y":4.25, "w":2.25}, {"label":"Z", "x":3.5, "y":4.25}, {"label":"X", "x":4.5, "y":4.25}, {"label":"C", "x":5.5, "y":4.25}, {"label":"V", "x":6.5, "y":4.25}, {"label":"B", "x":7.5, "y":4.25}, {"label":"N", "x":8.5, "y":4.25}, {"label":"M", "x":9.5, "y":4.25}, {"label":"<", "x":10.5, "y":4.25}, {"label":">", "x":11.5, "y":4.25}, {"label":"?", "x":12.5, "y":4.25}, {"label":"Shift", "x":13.5, "y":4.25, "w":1.75}, {"label":"Fn", "x":15.25, "y":4.25}, {"label":"Enter", "x":17.75, "y":4.25}, {"label":"\u2191", "x":16.5, "y":4.5}, - {"label":"Fn", "x":0, "y":5.25}, {"label":"Ctrl", "x":1.25, "y":5.25, "w":1.5}, {"label":"Win", "x":2.75, "y":5.25}, {"label":"Alt", "x":3.75, "y":5.25, "w":1.5}, {"x":5.25, "y":5.25, "w":6}, {"label":"Alt", "x":11.25, "y":5.25, "w":1.5}, {"label":"Win", "x":12.75, "y":5.25}, {"label":"Ctrl", "x":13.75, "y":5.25, "w":1.5}, {"label":"\u2190", "x":15.5, "y":5.5}, {"label":"\u2193", "x":16.5, "y":5.5}, {"label":"\u2192", "x":17.5, "y":5.5}] + {"label":"F13", "x":0, "y":1.25}, {"label":"~", "x":1.25, "y":1.25}, {"label":"!", "x":2.25, "y":1.25}, {"label":"@", "x":3.25, "y":1.25}, {"label":"#", "x":4.25, "y":1.25}, {"label":"$", "x":5.25, "y":1.25}, {"label":"%", "x":6.25, "y":1.25}, {"label":"^", "x":7.25, "y":1.25}, {"label":"&", "x":8.25, "y":1.25}, {"label":"*", "x":9.25, "y":1.25}, {"label":"(", "x":10.25, "y":1.25}, {"label":")", "x":11.25, "y":1.25}, {"label":"_", "x":12.25, "y":1.25}, {"label":"+", "x":13.25, "y":1.25}, {"x":14.25, "y":1.25}, {"label":"Backspace", "x":15.25, "y":1.25}, {"label":"Home", "x":16.75, "y":1.25}, {"label":"PgUp", "x":17.75, "y":1.25}, + {"label":"F14", "x":0, "y":2.25}, {"label":"Tab", "x":1.25, "y":2.25, "w":1.5}, {"label":"Q", "x":2.75, "y":2.25}, {"label":"W", "x":3.75, "y":2.25}, {"label":"E", "x":4.75, "y":2.25}, {"label":"R", "x":5.75, "y":2.25}, {"label":"T", "x":6.75, "y":2.25}, {"label":"Y", "x":7.75, "y":2.25}, {"label":"U", "x":8.75, "y":2.25}, {"label":"I", "x":9.75, "y":2.25}, {"label":"O", "x":10.75, "y":2.25}, {"label":"P", "x":11.75, "y":2.25}, {"label":"{", "x":12.75, "y":2.25}, {"label":"}", "x":13.75, "y":2.25}, {"label":"|", "x":14.75, "y":2.25, "w":1.5}, {"label":"End", "x":16.75, "y":2.25}, {"label":"PgDn", "x":17.75, "y":2.25}, + {"label":"F15", "x":0, "y":3.25}, {"label":"Caps Lock", "x":1.25, "y":3.25, "w":1.75}, {"label":"A", "x":3, "y":3.25}, {"label":"S", "x":4, "y":3.25}, {"label":"D", "x":5, "y":3.25}, {"label":"F", "x":6, "y":3.25}, {"label":"G", "x":7, "y":3.25}, {"label":"H", "x":8, "y":3.25}, {"label":"J", "x":9, "y":3.25}, {"label":"K", "x":10, "y":3.25}, {"label":"L", "x":11, "y":3.25}, {"label":":", "x":12, "y":3.25}, {"label":"\"", "x":13, "y":3.25}, {"label":"Enter", "x":14, "y":3.25, "w":2.25}, {"label":"Delete", "x":16.75, "y":3.25}, {"label":"Insert", "x":17.75, "y":3.25}, + {"label":"F16", "x":0, "y":4.25}, {"label":"Shift", "x":1.25, "y":4.25, "w":2.25}, {"label":"Z", "x":3.5, "y":4.25}, {"label":"X", "x":4.5, "y":4.25}, {"label":"C", "x":5.5, "y":4.25}, {"label":"V", "x":6.5, "y":4.25}, {"label":"B", "x":7.5, "y":4.25}, {"label":"N", "x":8.5, "y":4.25}, {"label":"M", "x":9.5, "y":4.25}, {"label":"<", "x":10.5, "y":4.25}, {"label":">", "x":11.5, "y":4.25}, {"label":"?", "x":12.5, "y":4.25}, {"label":"Shift", "x":13.5, "y":4.25, "w":1.75}, {"label":"Fn", "x":15.25, "y":4.25}, {"label":"Up", "x":16.5, "y":4.5}, {"label":"Enter", "x":17.75, "y":4.25}, + {"label":"F17", "x":0, "y":5.25}, {"label":"Ctrl", "x":1.25, "y":5.25, "w":1.5}, {"label":"Win", "x":2.75, "y":5.25}, {"label":"Alt", "x":3.75, "y":5.25, "w":1.5}, {"x":5.25, "y":5.25, "w":6}, {"label":"Alt", "x":11.25, "y":5.25, "w":1.5}, {"label":"Win", "x":12.75, "y":5.25}, {"label":"Ctrl", "x":13.75, "y":5.25, "w":1.5}, {"label":"Left", "x":15.5, "y":5.5}, {"label":"Down", "x":16.5, "y":5.5}, {"label":"Right", "x":17.5, "y":5.5}] }, "LAYOUT_b_iso": { "layout": [ {"label":"Mute", "x":0, "y":0}, {"label":"Esc", "x":1.25, "y":0}, {"label":"F1", "x":2.5, "y":0}, {"label":"F2", "x":3.5, "y":0}, {"label":"F3", "x":4.5, "y":0}, {"label":"F4", "x":5.5, "y":0}, {"label":"F5", "x":7, "y":0}, {"label":"F6", "x":8, "y":0}, {"label":"F7", "x":9, "y":0}, {"label":"F8", "x":10, "y":0}, {"label":"F9", "x":11.5, "y":0}, {"label":"F10", "x":12.5, "y":0}, {"label":"F11", "x":13.5, "y":0}, {"label":"F12", "x":14.5, "y":0}, {"label":"PrtSc", "x":15.75, "y":0}, {"label":"Scroll Lock", "x":16.75, "y":0}, {"label":"Pause", "x":17.75, "y":0}, - {"label":"Fn", "x":0, "y":1.25}, {"label":"~", "x":1.25, "y":1.25}, {"label":"!", "x":2.25, "y":1.25}, {"label":"@", "x":3.25, "y":1.25}, {"label":"#", "x":4.25, "y":1.25}, {"label":"$", "x":5.25, "y":1.25}, {"label":"%", "x":6.25, "y":1.25}, {"label":"^", "x":7.25, "y":1.25}, {"label":"&", "x":8.25, "y":1.25}, {"label":"*", "x":9.25, "y":1.25}, {"label":"(", "x":10.25, "y":1.25}, {"label":")", "x":11.25, "y":1.25}, {"label":"_", "x":12.25, "y":1.25}, {"label":"+", "x":13.25, "y":1.25}, {"x":14.25, "y":1.25}, {"label":"Backspace", "x":15.25, "y":1.25}, {"label":"Home", "x":16.75, "y":1.25}, {"label":"PgUp", "x":17.75, "y":1.25}, - {"label":"Fn", "x":0, "y":2.25}, {"label":"Tab", "x":1.25, "y":2.25, "w":1.5}, {"label":"Q", "x":2.75, "y":2.25}, {"label":"W", "x":3.75, "y":2.25}, {"label":"E", "x":4.75, "y":2.25}, {"label":"R", "x":5.75, "y":2.25}, {"label":"T", "x":6.75, "y":2.25}, {"label":"Y", "x":7.75, "y":2.25}, {"label":"U", "x":8.75, "y":2.25}, {"label":"I", "x":9.75, "y":2.25}, {"label":"O", "x":10.75, "y":2.25}, {"label":"P", "x":11.75, "y":2.25}, {"label":"{", "x":12.75, "y":2.25}, {"label":"}", "x":13.75, "y":2.25}, {"label":"Enter", "x":15, "y":2.25, "w":1.25, "h":2}, {"label":"End", "x":16.75, "y":2.25}, {"label":"PgDn", "x":17.75, "y":2.25}, - {"label":"Fn", "x":0, "y":3.25}, {"label":"Caps Lock", "x":1.25, "y":3.25, "w":1.75}, {"label":"A", "x":3, "y":3.25}, {"label":"S", "x":4, "y":3.25}, {"label":"D", "x":5, "y":3.25}, {"label":"F", "x":6, "y":3.25}, {"label":"G", "x":7, "y":3.25}, {"label":"H", "x":8, "y":3.25}, {"label":"J", "x":9, "y":3.25}, {"label":"K", "x":10, "y":3.25}, {"label":"L", "x":11, "y":3.25}, {"label":":", "x":12, "y":3.25}, {"label":"\"", "x":13, "y":3.25}, {"x":14, "y":3.25}, {"label":"Delete", "x":16.75, "y":3.25}, {"label":"Insert", "x":17.75, "y":3.25}, - {"label":"Fn", "x":0, "y":4.25}, {"label":"Shift", "x":1.25, "y":4.25, "w":1.25}, {"x":2.5, "y":4.25}, {"label":"Z", "x":3.5, "y":4.25}, {"label":"X", "x":4.5, "y":4.25}, {"label":"C", "x":5.5, "y":4.25}, {"label":"V", "x":6.5, "y":4.25}, {"label":"B", "x":7.5, "y":4.25}, {"label":"N", "x":8.5, "y":4.25}, {"label":"M", "x":9.5, "y":4.25}, {"label":"<", "x":10.5, "y":4.25}, {"label":">", "x":11.5, "y":4.25}, {"label":"?", "x":12.5, "y":4.25}, {"label":"Shift", "x":13.5, "y":4.25, "w":1.75}, {"label":"Fn", "x":15.25, "y":4.25}, {"label":"Enter", "x":17.75, "y":4.25}, {"label":"\u2191", "x":16.5, "y":4.5}, - {"label":"Fn", "x":0, "y":5.25}, {"label":"Ctrl", "x":1.25, "y":5.25, "w":1.5}, {"label":"Win", "x":2.75, "y":5.25}, {"label":"Alt", "x":3.75, "y":5.25, "w":1.5}, {"x":5.25, "y":5.25, "w":6}, {"label":"Alt", "x":11.25, "y":5.25, "w":1.5}, {"label":"Win", "x":12.75, "y":5.25}, {"label":"Ctrl", "x":13.75, "y":5.25, "w":1.5}, {"label":"\u2190", "x":15.5, "y":5.5}, {"label":"\u2193", "x":16.5, "y":5.5}, {"label":"\u2192", "x":17.5, "y":5.5}] + {"label":"F13", "x":0, "y":1.25}, {"label":"~", "x":1.25, "y":1.25}, {"label":"!", "x":2.25, "y":1.25}, {"label":"@", "x":3.25, "y":1.25}, {"label":"#", "x":4.25, "y":1.25}, {"label":"$", "x":5.25, "y":1.25}, {"label":"%", "x":6.25, "y":1.25}, {"label":"^", "x":7.25, "y":1.25}, {"label":"&", "x":8.25, "y":1.25}, {"label":"*", "x":9.25, "y":1.25}, {"label":"(", "x":10.25, "y":1.25}, {"label":")", "x":11.25, "y":1.25}, {"label":"_", "x":12.25, "y":1.25}, {"label":"+", "x":13.25, "y":1.25}, {"x":14.25, "y":1.25}, {"label":"Backspace", "x":15.25, "y":1.25}, {"label":"Home", "x":16.75, "y":1.25}, {"label":"PgUp", "x":17.75, "y":1.25}, + {"label":"F14", "x":0, "y":2.25}, {"label":"Tab", "x":1.25, "y":2.25, "w":1.5}, {"label":"Q", "x":2.75, "y":2.25}, {"label":"W", "x":3.75, "y":2.25}, {"label":"E", "x":4.75, "y":2.25}, {"label":"R", "x":5.75, "y":2.25}, {"label":"T", "x":6.75, "y":2.25}, {"label":"Y", "x":7.75, "y":2.25}, {"label":"U", "x":8.75, "y":2.25}, {"label":"I", "x":9.75, "y":2.25}, {"label":"O", "x":10.75, "y":2.25}, {"label":"P", "x":11.75, "y":2.25}, {"label":"{", "x":12.75, "y":2.25}, {"label":"}", "x":13.75, "y":2.25}, {"label":"Enter", "x":15, "y":2.25, "w":1.25, "h":2}, {"label":"End", "x":16.75, "y":2.25}, {"label":"PgDn", "x":17.75, "y":2.25}, + {"label":"F15", "x":0, "y":3.25}, {"label":"Caps Lock", "x":1.25, "y":3.25, "w":1.75}, {"label":"A", "x":3, "y":3.25}, {"label":"S", "x":4, "y":3.25}, {"label":"D", "x":5, "y":3.25}, {"label":"F", "x":6, "y":3.25}, {"label":"G", "x":7, "y":3.25}, {"label":"H", "x":8, "y":3.25}, {"label":"J", "x":9, "y":3.25}, {"label":"K", "x":10, "y":3.25}, {"label":"L", "x":11, "y":3.25}, {"label":":", "x":12, "y":3.25}, {"label":"\"", "x":13, "y":3.25}, {"x":14, "y":3.25}, {"label":"Delete", "x":16.75, "y":3.25}, {"label":"Insert", "x":17.75, "y":3.25}, + {"label":"F16", "x":0, "y":4.25}, {"label":"Shift", "x":1.25, "y":4.25, "w":1.25}, {"x":2.5, "y":4.25}, {"label":"Z", "x":3.5, "y":4.25}, {"label":"X", "x":4.5, "y":4.25}, {"label":"C", "x":5.5, "y":4.25}, {"label":"V", "x":6.5, "y":4.25}, {"label":"B", "x":7.5, "y":4.25}, {"label":"N", "x":8.5, "y":4.25}, {"label":"M", "x":9.5, "y":4.25}, {"label":"<", "x":10.5, "y":4.25}, {"label":">", "x":11.5, "y":4.25}, {"label":"?", "x":12.5, "y":4.25}, {"label":"Shift", "x":13.5, "y":4.25, "w":1.75}, {"label":"Fn", "x":15.25, "y":4.25}, {"label":"Up", "x":16.5, "y":4.5}, {"label":"Enter", "x":17.75, "y":4.25}, + {"label":"F17", "x":0, "y":5.25}, {"label":"Ctrl", "x":1.25, "y":5.25, "w":1.5}, {"label":"Win", "x":2.75, "y":5.25}, {"label":"Alt", "x":3.75, "y":5.25, "w":1.5}, {"x":5.25, "y":5.25, "w":6}, {"label":"Alt", "x":11.25, "y":5.25, "w":1.5}, {"label":"Win", "x":12.75, "y":5.25}, {"label":"Ctrl", "x":13.75, "y":5.25, "w":1.5}, {"label":"Left", "x":15.5, "y":5.5}, {"label":"Down", "x":16.5, "y":5.5}, {"label":"Right", "x":17.5, "y":5.5}] }, "LAYOUT_a_ansi": { - "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.75, "y":0}, {"label":"F6", "x":6.75, "y":0}, {"label":"F7", "x":7.75, "y":0}, {"label":"F8", "x":8.75, "y":0}, {"label":"F9", "x":10.25, "y":0}, {"label":"F10", "x":11.25, "y":0}, {"label":"F11", "x":12.25, "y":0}, {"label":"F12", "x":13.25, "y":0}, {"label":"PrtSc", "x":14.5, "y":0}, {"label":"Insert", "x":15.75, "y":0}, {"label":"Home", "x":16.75, "y":0}, {"label":"PgUp", "x":17.75, "y":0}, {"label":"End", "x":16.75, "y":1}, {"label":"PgDn", "x":17.75, "y":1}, - {"label":"Fn", "x":0, "y":1.25}, {"label":"~", "x":1.25, "y":1.25}, {"label":"!", "x":2.25, "y":1.25}, {"label":"@", "x":3.25, "y":1.25}, {"label":"#", "x":4.25, "y":1.25}, {"label":"$", "x":5.25, "y":1.25}, {"label":"%", "x":6.25, "y":1.25}, {"label":"^", "x":7.25, "y":1.25}, {"label":"&", "x":8.25, "y":1.25}, {"label":"*", "x":9.25, "y":1.25}, {"label":"(", "x":10.25, "y":1.25}, {"label":")", "x":11.25, "y":1.25}, {"label":"_", "x":12.25, "y":1.25}, {"label":"+", "x":13.25, "y":1.25}, {"x":14.25, "y":1.25}, {"label":"Backspace", "x":15.25, "y":1.25}, - {"label":"Fn", "x":0, "y":2.25}, {"label":"Tab", "x":1.25, "y":2.25, "w":1.5}, {"label":"Q", "x":2.75, "y":2.25}, {"label":"W", "x":3.75, "y":2.25}, {"label":"E", "x":4.75, "y":2.25}, {"label":"R", "x":5.75, "y":2.25}, {"label":"T", "x":6.75, "y":2.25}, {"label":"Y", "x":7.75, "y":2.25}, {"label":"U", "x":8.75, "y":2.25}, {"label":"I", "x":9.75, "y":2.25}, {"label":"O", "x":10.75, "y":2.25}, {"label":"P", "x":11.75, "y":2.25}, {"label":"{", "x":12.75, "y":2.25}, {"label":"}", "x":13.75, "y":2.25}, {"label":"|", "x":14.75, "y":2.25, "w":1.5}, {"label":"Insert", "x":16.5, "y":2.25}, {"label":"Mute", "x":17.75, "y":2.625}, - {"label":"Fn", "x":0, "y":3.25}, {"label":"Caps Lock", "x":1.25, "y":3.25, "w":1.75}, {"label":"A", "x":3, "y":3.25}, {"label":"S", "x":4, "y":3.25}, {"label":"D", "x":5, "y":3.25}, {"label":"F", "x":6, "y":3.25}, {"label":"G", "x":7, "y":3.25}, {"label":"H", "x":8, "y":3.25}, {"label":"J", "x":9, "y":3.25}, {"label":"K", "x":10, "y":3.25}, {"label":"L", "x":11, "y":3.25}, {"label":":", "x":12, "y":3.25}, {"label":"\"", "x":13, "y":3.25}, {"label":"Enter", "x":14, "y":3.25, "w":2.25}, {"label":"Delete", "x":16.5, "y":3.25}, - {"label":"Fn", "x":0, "y":4.25}, {"label":"Shift", "x":1.25, "y":4.25, "w":2.25}, {"label":"Z", "x":3.5, "y":4.25}, {"label":"X", "x":4.5, "y":4.25}, {"label":"C", "x":5.5, "y":4.25}, {"label":"V", "x":6.5, "y":4.25}, {"label":"B", "x":7.5, "y":4.25}, {"label":"N", "x":8.5, "y":4.25}, {"label":"M", "x":9.5, "y":4.25}, {"label":"<", "x":10.5, "y":4.25}, {"label":">", "x":11.5, "y":4.25}, {"label":"?", "x":12.5, "y":4.25}, {"label":"Shift", "x":13.5, "y":4.25, "w":1.75}, {"label":"Enter", "x":17.75, "y":4.25}, {"label":"\u2191", "x":15.5, "y":4.5}, - {"label":"Fn", "x":0, "y":5.25}, {"label":"Ctrl", "x":1.25, "y":5.25, "w":1.25}, {"label":"Win", "x":2.5, "y":5.25, "w":1.25}, {"label":"Alt", "x":3.75, "y":5.25, "w":1.25}, {"x":5, "y":5.25, "w":6.25}, {"label":"Alt", "x":11.25, "y":5.25, "w":1.5}, {"label":"Ctrl", "x":12.75, "y":5.25, "w":1.5}, {"label":"Enter", "x":17.75, "y":5.25}, {"label":"\u2190", "x":14.5, "y":5.5}, {"label":"\u2193", "x":15.5, "y":5.5}, {"label":"\u2192", "x":16.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.75, "y":0}, {"label":"F6", "x":6.75, "y":0}, {"label":"F7", "x":7.75, "y":0}, {"label":"F8", "x":8.75, "y":0}, {"label":"F9", "x":10.25, "y":0}, {"label":"F10", "x":11.25, "y":0}, {"label":"F11", "x":12.25, "y":0}, {"label":"F12", "x":13.25, "y":0}, {"label":"PrtSc", "x":14.5, "y":0}, {"label":"Insert", "x":15.75, "y":0}, {"label":"Home", "x":16.75, "y":0}, {"label":"PgUp", "x":17.75, "y":0}, + {"label":"F13", "x":0, "y":1.25}, {"label":"~", "x":1.25, "y":1.25}, {"label":"!", "x":2.25, "y":1.25}, {"label":"@", "x":3.25, "y":1.25}, {"label":"#", "x":4.25, "y":1.25}, {"label":"$", "x":5.25, "y":1.25}, {"label":"%", "x":6.25, "y":1.25}, {"label":"^", "x":7.25, "y":1.25}, {"label":"&", "x":8.25, "y":1.25}, {"label":"*", "x":9.25, "y":1.25}, {"label":"(", "x":10.25, "y":1.25}, {"label":")", "x":11.25, "y":1.25}, {"label":"_", "x":12.25, "y":1.25}, {"label":"+", "x":13.25, "y":1.25}, {"x":14.25, "y":1.25}, {"label":"Backspace", "x":15.25, "y":1.25}, {"label":"End", "x":16.75, "y":1}, {"label":"PgDn", "x":17.75, "y":1}, + {"label":"F14", "x":0, "y":2.25}, {"label":"Tab", "x":1.25, "y":2.25, "w":1.5}, {"label":"Q", "x":2.75, "y":2.25}, {"label":"W", "x":3.75, "y":2.25}, {"label":"E", "x":4.75, "y":2.25}, {"label":"R", "x":5.75, "y":2.25}, {"label":"T", "x":6.75, "y":2.25}, {"label":"Y", "x":7.75, "y":2.25}, {"label":"U", "x":8.75, "y":2.25}, {"label":"I", "x":9.75, "y":2.25}, {"label":"O", "x":10.75, "y":2.25}, {"label":"P", "x":11.75, "y":2.25}, {"label":"{", "x":12.75, "y":2.25}, {"label":"}", "x":13.75, "y":2.25}, {"label":"|", "x":14.75, "y":2.25, "w":1.5}, {"label":"Insert", "x":16.5, "y":2.25}, {"label":"Mute", "x":17.75, "y":2.625}, + {"label":"F15", "x":0, "y":3.25}, {"label":"Caps Lock", "x":1.25, "y":3.25, "w":1.75}, {"label":"A", "x":3, "y":3.25}, {"label":"S", "x":4, "y":3.25}, {"label":"D", "x":5, "y":3.25}, {"label":"F", "x":6, "y":3.25}, {"label":"G", "x":7, "y":3.25}, {"label":"H", "x":8, "y":3.25}, {"label":"J", "x":9, "y":3.25}, {"label":"K", "x":10, "y":3.25}, {"label":"L", "x":11, "y":3.25}, {"label":":", "x":12, "y":3.25}, {"label":"\"", "x":13, "y":3.25}, {"label":"Enter", "x":14, "y":3.25, "w":2.25}, {"label":"Delete", "x":16.5, "y":3.25}, + {"label":"F16", "x":0, "y":4.25}, {"label":"Shift", "x":1.25, "y":4.25, "w":2.25}, {"label":"Z", "x":3.5, "y":4.25}, {"label":"X", "x":4.5, "y":4.25}, {"label":"C", "x":5.5, "y":4.25}, {"label":"V", "x":6.5, "y":4.25}, {"label":"B", "x":7.5, "y":4.25}, {"label":"N", "x":8.5, "y":4.25}, {"label":"M", "x":9.5, "y":4.25}, {"label":"<", "x":10.5, "y":4.25}, {"label":">", "x":11.5, "y":4.25}, {"label":"?", "x":12.5, "y":4.25}, {"label":"Shift", "x":13.5, "y":4.25, "w":1.75}, {"label":"Up", "x":15.5, "y":4.5}, {"label":"Enter", "x":17.75, "y":4.25}, + {"label":"F17", "x":0, "y":5.25}, {"label":"Ctrl", "x":1.25, "y":5.25, "w":1.25}, {"label":"Win", "x":2.5, "y":5.25, "w":1.25}, {"label":"Alt", "x":3.75, "y":5.25, "w":1.25}, {"x":5, "y":5.25, "w":6.25}, {"label":"Alt", "x":11.25, "y":5.25, "w":1.5}, {"label":"Ctrl", "x":12.75, "y":5.25, "w":1.5}, {"label":"Left", "x":14.5, "y":5.5}, {"label":"Down", "x":15.5, "y":5.5}, {"label":"Right", "x":16.5, "y":5.5}, {"label":"Enter", "x":17.75, "y":5.25}] }, "LAYOUT_a_iso": { - "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.75, "y":0}, {"label":"F6", "x":6.75, "y":0}, {"label":"F7", "x":7.75, "y":0}, {"label":"F8", "x":8.75, "y":0}, {"label":"F9", "x":10.25, "y":0}, {"label":"F10", "x":11.25, "y":0}, {"label":"F11", "x":12.25, "y":0}, {"label":"F12", "x":13.25, "y":0}, {"label":"PrtSc", "x":14.5, "y":0}, {"label":"Insert", "x":15.75, "y":0}, {"label":"Home", "x":16.75, "y":0}, {"label":"PgUp", "x":17.75, "y":0}, {"label":"End", "x":16.75, "y":1}, {"label":"PgDn", "x":17.75, "y":1}, - {"label":"Fn", "x":0, "y":1.25}, {"label":"~", "x":1.25, "y":1.25}, {"label":"!", "x":2.25, "y":1.25}, {"label":"@", "x":3.25, "y":1.25}, {"label":"#", "x":4.25, "y":1.25}, {"label":"$", "x":5.25, "y":1.25}, {"label":"%", "x":6.25, "y":1.25}, {"label":"^", "x":7.25, "y":1.25}, {"label":"&", "x":8.25, "y":1.25}, {"label":"*", "x":9.25, "y":1.25}, {"label":"(", "x":10.25, "y":1.25}, {"label":")", "x":11.25, "y":1.25}, {"label":"_", "x":12.25, "y":1.25}, {"label":"+", "x":13.25, "y":1.25}, {"x":14.25, "y":1.25}, {"label":"Backspace", "x":15.25, "y":1.25}, - {"label":"Fn", "x":0, "y":2.25}, {"label":"Tab", "x":1.25, "y":2.25, "w":1.5}, {"label":"Q", "x":2.75, "y":2.25}, {"label":"W", "x":3.75, "y":2.25}, {"label":"E", "x":4.75, "y":2.25}, {"label":"R", "x":5.75, "y":2.25}, {"label":"T", "x":6.75, "y":2.25}, {"label":"Y", "x":7.75, "y":2.25}, {"label":"U", "x":8.75, "y":2.25}, {"label":"I", "x":9.75, "y":2.25}, {"label":"O", "x":10.75, "y":2.25}, {"label":"P", "x":11.75, "y":2.25}, {"label":"{", "x":12.75, "y":2.25}, {"label":"}", "x":13.75, "y":2.25}, {"label":"Enter", "x":15, "y":2.25, "w":1.25, "h":2}, {"label":"Insert", "x":16.5, "y":2.25}, {"label":"Mute", "x":17.75, "y":2.625}, - {"label":"Fn", "x":0, "y":3.25}, {"label":"Caps Lock", "x":1.25, "y":3.25, "w":1.75}, {"label":"A", "x":3, "y":3.25}, {"label":"S", "x":4, "y":3.25}, {"label":"D", "x":5, "y":3.25}, {"label":"F", "x":6, "y":3.25}, {"label":"G", "x":7, "y":3.25}, {"label":"H", "x":8, "y":3.25}, {"label":"J", "x":9, "y":3.25}, {"label":"K", "x":10, "y":3.25}, {"label":"L", "x":11, "y":3.25}, {"label":":", "x":12, "y":3.25}, {"label":"\"", "x":13, "y":3.25}, {"x":14, "y":3.25}, {"label":"Delete", "x":16.5, "y":3.25}, - {"label":"Fn", "x":0, "y":4.25}, {"label":"Shift", "x":1.25, "y":4.25, "w":1.25}, {"x":2.5, "y":4.25}, {"label":"Z", "x":3.5, "y":4.25}, {"label":"X", "x":4.5, "y":4.25}, {"label":"C", "x":5.5, "y":4.25}, {"label":"V", "x":6.5, "y":4.25}, {"label":"B", "x":7.5, "y":4.25}, {"label":"N", "x":8.5, "y":4.25}, {"label":"M", "x":9.5, "y":4.25}, {"label":"<", "x":10.5, "y":4.25}, {"label":">", "x":11.5, "y":4.25}, {"label":"?", "x":12.5, "y":4.25}, {"label":"Shift", "x":13.5, "y":4.25, "w":1.75}, {"label":"Enter", "x":17.75, "y":4.25}, {"label":"\u2191", "x":15.5, "y":4.5}, - {"label":"Fn", "x":0, "y":5.25}, {"label":"Ctrl", "x":1.25, "y":5.25, "w":1.25}, {"label":"Win", "x":2.5, "y":5.25, "w":1.25}, {"label":"Alt", "x":3.75, "y":5.25, "w":1.25}, {"x":5, "y":5.25, "w":6.25}, {"label":"Alt", "x":11.25, "y":5.25, "w":1.5}, {"label":"Ctrl", "x":12.75, "y":5.25, "w":1.5}, {"label":"Enter", "x":17.75, "y":5.25}, {"label":"\u2190", "x":14.5, "y":5.5}, {"label":"\u2193", "x":15.5, "y":5.5}, {"label":"\u2192", "x":16.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.75, "y":0}, {"label":"F6", "x":6.75, "y":0}, {"label":"F7", "x":7.75, "y":0}, {"label":"F8", "x":8.75, "y":0}, {"label":"F9", "x":10.25, "y":0}, {"label":"F10", "x":11.25, "y":0}, {"label":"F11", "x":12.25, "y":0}, {"label":"F12", "x":13.25, "y":0}, {"label":"PrtSc", "x":14.5, "y":0}, {"label":"Insert", "x":15.75, "y":0}, {"label":"Home", "x":16.75, "y":0}, {"label":"PgUp", "x":17.75, "y":0}, + {"label":"F13", "x":0, "y":1.25}, {"label":"~", "x":1.25, "y":1.25}, {"label":"!", "x":2.25, "y":1.25}, {"label":"@", "x":3.25, "y":1.25}, {"label":"#", "x":4.25, "y":1.25}, {"label":"$", "x":5.25, "y":1.25}, {"label":"%", "x":6.25, "y":1.25}, {"label":"^", "x":7.25, "y":1.25}, {"label":"&", "x":8.25, "y":1.25}, {"label":"*", "x":9.25, "y":1.25}, {"label":"(", "x":10.25, "y":1.25}, {"label":")", "x":11.25, "y":1.25}, {"label":"_", "x":12.25, "y":1.25}, {"label":"+", "x":13.25, "y":1.25}, {"x":14.25, "y":1.25}, {"label":"Backspace", "x":15.25, "y":1.25}, {"label":"End", "x":16.75, "y":1}, {"label":"PgDn", "x":17.75, "y":1}, + {"label":"F14", "x":0, "y":2.25}, {"label":"Tab", "x":1.25, "y":2.25, "w":1.5}, {"label":"Q", "x":2.75, "y":2.25}, {"label":"W", "x":3.75, "y":2.25}, {"label":"E", "x":4.75, "y":2.25}, {"label":"R", "x":5.75, "y":2.25}, {"label":"T", "x":6.75, "y":2.25}, {"label":"Y", "x":7.75, "y":2.25}, {"label":"U", "x":8.75, "y":2.25}, {"label":"I", "x":9.75, "y":2.25}, {"label":"O", "x":10.75, "y":2.25}, {"label":"P", "x":11.75, "y":2.25}, {"label":"{", "x":12.75, "y":2.25}, {"label":"}", "x":13.75, "y":2.25}, {"label":"Enter", "x":15, "y":2.25, "w":1.25, "h":2}, {"label":"Insert", "x":16.5, "y":2.25}, {"label":"Mute", "x":17.75, "y":2.625}, + {"label":"F15", "x":0, "y":3.25}, {"label":"Caps Lock", "x":1.25, "y":3.25, "w":1.75}, {"label":"A", "x":3, "y":3.25}, {"label":"S", "x":4, "y":3.25}, {"label":"D", "x":5, "y":3.25}, {"label":"F", "x":6, "y":3.25}, {"label":"G", "x":7, "y":3.25}, {"label":"H", "x":8, "y":3.25}, {"label":"J", "x":9, "y":3.25}, {"label":"K", "x":10, "y":3.25}, {"label":"L", "x":11, "y":3.25}, {"label":":", "x":12, "y":3.25}, {"label":"\"", "x":13, "y":3.25}, {"x":14, "y":3.25}, {"label":"Delete", "x":16.5, "y":3.25}, + {"label":"F16", "x":0, "y":4.25}, {"label":"Shift", "x":1.25, "y":4.25, "w":1.25}, {"x":2.5, "y":4.25}, {"label":"Z", "x":3.5, "y":4.25}, {"label":"X", "x":4.5, "y":4.25}, {"label":"C", "x":5.5, "y":4.25}, {"label":"V", "x":6.5, "y":4.25}, {"label":"B", "x":7.5, "y":4.25}, {"label":"N", "x":8.5, "y":4.25}, {"label":"M", "x":9.5, "y":4.25}, {"label":"<", "x":10.5, "y":4.25}, {"label":">", "x":11.5, "y":4.25}, {"label":"?", "x":12.5, "y":4.25}, {"label":"Shift", "x":13.5, "y":4.25, "w":1.75}, {"label":"Up", "x":15.5, "y":4.5}, {"label":"Enter", "x":17.75, "y":4.25}, + {"label":"F17", "x":0, "y":5.25}, {"label":"Ctrl", "x":1.25, "y":5.25, "w":1.25}, {"label":"Win", "x":2.5, "y":5.25, "w":1.25}, {"label":"Alt", "x":3.75, "y":5.25, "w":1.25}, {"x":5, "y":5.25, "w":6.25}, {"label":"Alt", "x":11.25, "y":5.25, "w":1.5}, {"label":"Ctrl", "x":12.75, "y":5.25, "w":1.5}, {"label":"Left", "x":14.5, "y":5.5}, {"label":"Down", "x":15.5, "y":5.5}, {"label":"Right", "x":16.5, "y":5.5}, {"label":"Enter", "x":17.75, "y":5.25}] } } } \ No newline at end of file diff --git a/keyboards/metamechs/timberwolf/keymaps/a_ansi/keymap.c b/keyboards/metamechs/timberwolf/keymaps/a_ansi/keymap.c index 73c5ca57614d..0e4f99442d37 100644 --- a/keyboards/metamechs/timberwolf/keymaps/a_ansi/keymap.c +++ b/keyboards/metamechs/timberwolf/keymaps/a_ansi/keymap.c @@ -19,18 +19,18 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Base */ [0] = LAYOUT_a_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_INS ,KC_HOME,KC_PGUP, - RESET ,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_END ,KC_PGDN, - BL_STEP,KC_TAB ,KC_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_MUTE, - MO(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_DEL , - MO(1) ,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_PENT, + BL_INC ,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_END ,KC_PGDN, + BL_DEC ,KC_TAB ,KC_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_MUTE, + KC_F13 ,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_F14 ,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_PENT, MO(1) ,KC_LCTL,KC_LGUI,KC_LALT ,KC_SPC ,KC_RALT,KC_RCTL ,KC_LEFT,KC_DOWN,KC_RGHT,KC_PENT ), [1] = LAYOUT_a_ansi( RESET ,RESET ,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______ ,_______,_______,_______, - MO(1) ,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, - MO(1) ,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______ ,_______,_______, - MO(1) ,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______ ,_______ ,_______ , - MO(1) ,_______ ,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______, _______, + _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, + _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______ ,_______,_______, + _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______ ,_______ ,_______ , + _______,_______ ,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______, _______, MO(1) ,_______,_______,_______ ,_______ ,_______,_______, _______,_______,_______,_______ ) }; diff --git a/keyboards/metamechs/timberwolf/keymaps/a_iso/keymap.c b/keyboards/metamechs/timberwolf/keymaps/a_iso/keymap.c index 9dd448ff6a21..91d38316280a 100644 --- a/keyboards/metamechs/timberwolf/keymaps/a_iso/keymap.c +++ b/keyboards/metamechs/timberwolf/keymaps/a_iso/keymap.c @@ -19,18 +19,18 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Base */ [0] = LAYOUT_a_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_PSCR,KC_INS ,KC_HOME,KC_PGUP, - RESET ,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_END ,KC_PGDN, - BL_STEP,KC_TAB ,KC_Q ,KC_W ,KC_E ,KC_R ,KC_T ,KC_Y ,KC_U ,KC_I ,KC_O ,KC_P ,KC_LBRC,KC_RBRC ,KC_INS ,KC_MUTE, - MO(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_DEL , - MO(1) ,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_PENT, + BL_INC ,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_END ,KC_PGDN, + BL_DEC ,KC_TAB ,KC_Q ,KC_W ,KC_E ,KC_R ,KC_T ,KC_Y ,KC_U ,KC_I ,KC_O ,KC_P ,KC_LBRC,KC_RBRC ,KC_INS ,KC_MUTE, + KC_F13 ,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_DEL , + KC_F14 ,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_PENT, MO(1) ,KC_LCTL,KC_LGUI,KC_LALT ,KC_SPC ,KC_RALT,KC_RCTL ,KC_LEFT,KC_DOWN,KC_RGHT,KC_PENT ), [1] = LAYOUT_a_iso( RESET ,RESET ,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______ ,_______,_______,_______, - MO(1) ,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, - MO(1) ,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______ ,_______,_______, - MO(1) ,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______ ,_______ , - MO(1) ,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______, _______, + _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, + _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______ ,_______,_______, + _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______ ,_______ , + _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______, _______, MO(1) ,_______,_______,_______ ,_______ ,_______,_______, _______,_______,_______,_______ ) }; diff --git a/keyboards/metamechs/timberwolf/keymaps/b_ansi/keymap.c b/keyboards/metamechs/timberwolf/keymaps/b_ansi/keymap.c index 2500894f9867..0b33e2e480b0 100644 --- a/keyboards/metamechs/timberwolf/keymaps/b_ansi/keymap.c +++ b/keyboards/metamechs/timberwolf/keymaps/b_ansi/keymap.c @@ -19,18 +19,18 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Base */ [0] = LAYOUT_b_ansi( KC_MUTE,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, - RESET ,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_HOME,KC_PGUP, - BL_STEP,KC_TAB ,KC_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_PGDN, - MO(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_DEL ,KC_INS , - MO(1) ,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_UP ,KC_PENT, + BL_INC ,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_HOME,KC_PGUP, + BL_DEC ,KC_TAB ,KC_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_PGDN, + KC_F13 ,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_INS , + KC_F14 ,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_UP ,KC_PENT, MO(1) ,KC_LCTL,KC_LGUI,KC_LALT ,KC_SPC ,KC_RALT,KC_RGUI,KC_RCTL ,KC_LEFT,KC_DOWN,KC_RGHT ), [1] = LAYOUT_b_ansi( RESET ,RESET ,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______ ,_______,_______,_______, - MO(1) ,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, - MO(1) ,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______ ,_______,_______, - MO(1) ,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______ ,_______ ,_______,_______, - MO(1) ,_______ ,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______ ,_______, + _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, + _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______ ,_______,_______, + _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______ ,_______ ,_______,_______, + _______,_______ ,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______ ,_______, MO(1) ,_______,_______,_______ ,_______ ,_______,_______,_______ ,_______,_______,_______ ) }; diff --git a/keyboards/metamechs/timberwolf/keymaps/b_iso/keymap.c b/keyboards/metamechs/timberwolf/keymaps/b_iso/keymap.c index cfc5757adc42..137fa4a50750 100644 --- a/keyboards/metamechs/timberwolf/keymaps/b_iso/keymap.c +++ b/keyboards/metamechs/timberwolf/keymaps/b_iso/keymap.c @@ -19,18 +19,18 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Base */ [0] = LAYOUT_b_iso( KC_MUTE,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, - RESET ,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_HOME,KC_PGUP, - BL_STEP,KC_TAB ,KC_Q ,KC_W ,KC_E ,KC_R ,KC_T ,KC_Y ,KC_U ,KC_I ,KC_O ,KC_P ,KC_LBRC,KC_RBRC ,KC_END ,KC_PGDN, - MO(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_DEL ,KC_INS , - MO(1) ,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_PENT, + BL_INC ,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_HOME,KC_PGUP, + BL_DEC ,KC_TAB ,KC_Q ,KC_W ,KC_E ,KC_R ,KC_T ,KC_Y ,KC_U ,KC_I ,KC_O ,KC_P ,KC_LBRC,KC_RBRC ,KC_END ,KC_PGDN, + KC_F13 ,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_DEL ,KC_INS , + KC_F14 ,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_PENT, MO(1) ,KC_LCTL,KC_LGUI,KC_LALT ,KC_SPC ,KC_RALT,KC_RGUI,KC_RCTL ,KC_LEFT,KC_DOWN,KC_RGHT ), [1] = LAYOUT_b_iso( RESET ,RESET ,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______ ,_______,_______,_______, - MO(1) ,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, - MO(1) ,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______ ,_______,_______, - MO(1) ,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______ ,_______,_______, - MO(1) ,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______, + _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, + _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______ ,_______,_______, + _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______ ,_______,_______, + _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______, MO(1) ,_______,_______,_______ ,_______ ,_______,_______,_______ ,_______,_______,_______ ) }; diff --git a/keyboards/metamechs/timberwolf/keymaps/default/keymap.c b/keyboards/metamechs/timberwolf/keymaps/default/keymap.c index 8663eca738e9..4870eaa3f51b 100644 --- a/keyboards/metamechs/timberwolf/keymaps/default/keymap.c +++ b/keyboards/metamechs/timberwolf/keymaps/default/keymap.c @@ -20,17 +20,17 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [0] = LAYOUT_all( KC_MUTE,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_PGUP, RESET ,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_END ,KC_PGDN, - BL_STEP,KC_TAB ,KC_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_PSCR,KC_SLCK, - MO(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_DEL ,KC_INS , - MO(1) ,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_NO ,KC_UP ,KC_PENT, - MO(1) ,KC_LCTL,KC_LGUI,KC_LALT ,KC_SPC ,KC_RALT,KC_RGUI,KC_RCTL,KC_LEFT,KC_LEFT,KC_DOWN,KC_RGHT,KC_NO + 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 ,KC_PSCR,KC_SLCK, + BL_DEC ,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_DEL ,KC_INS , + KC_F13 ,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_UP ,KC_PENT, + MO(1) ,KC_LCTL,KC_LGUI,KC_LALT ,KC_SPC ,KC_RALT,KC_RGUI,KC_RCTL,KC_LEFT,KC_LEFT,KC_DOWN,KC_RGHT,KC_PENT ), [1] = LAYOUT_all( RESET ,RESET ,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______ ,_______,_______,_______, - MO(1) ,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, - MO(1) ,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______ ,_______,_______, - MO(1) ,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______ ,_______,_______, - MO(1) ,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, + _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, + _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______ ,_______,_______, + _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______ ,_______,_______, + _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, MO(1) ,_______,_______,_______ ,_______ ,_______,_______,_______,_______,_______,_______,_______,_______ ) }; diff --git a/keyboards/metamechs/timberwolf/keymaps/prime_ansi/keymap.c b/keyboards/metamechs/timberwolf/keymaps/prime_ansi/keymap.c index e0436dee9e51..89c1db021db6 100644 --- a/keyboards/metamechs/timberwolf/keymaps/prime_ansi/keymap.c +++ b/keyboards/metamechs/timberwolf/keymaps/prime_ansi/keymap.c @@ -19,18 +19,18 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Base */ [0] = LAYOUT_prime_ansi( KC_MUTE,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_PGUP, - RESET ,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_END ,KC_PGDN, - BL_STEP,KC_TAB ,KC_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_PSCR,KC_SLCK, - MO(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_DEL ,KC_INS , - MO(1) ,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_UP ,KC_PENT, + BL_INC ,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_END ,KC_PGDN, + BL_DEC ,KC_TAB ,KC_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_PSCR,KC_SLCK, + KC_F13 ,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_INS , + KC_F14 ,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_UP ,KC_PENT, MO(1) ,KC_LCTL,KC_LGUI,KC_LALT ,KC_SPC ,KC_RALT,KC_RGUI,KC_RCTL ,KC_LEFT,KC_DOWN,KC_RGHT ), [1] = LAYOUT_prime_ansi( RESET ,RESET ,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______ ,_______,_______,_______, - MO(1) ,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, - MO(1) ,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______ ,_______,_______, - MO(1) ,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______ ,_______ ,_______,_______, - MO(1) ,_______ ,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______ ,_______, + _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, + _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______ ,_______,_______, + _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______ ,_______ ,_______,_______, + _______,_______ ,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______ ,_______, MO(1) ,_______,_______,_______ ,_______ ,_______,_______,_______ ,_______,_______,_______ ) }; diff --git a/keyboards/metamechs/timberwolf/keymaps/prime_iso/keymap.c b/keyboards/metamechs/timberwolf/keymaps/prime_iso/keymap.c index bffc019c3c43..5716cdacc710 100644 --- a/keyboards/metamechs/timberwolf/keymaps/prime_iso/keymap.c +++ b/keyboards/metamechs/timberwolf/keymaps/prime_iso/keymap.c @@ -19,18 +19,18 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Base */ [0] = LAYOUT_prime_iso( KC_MUTE,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_PGUP, - RESET ,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_END ,KC_PGDN, - BL_STEP,KC_TAB ,KC_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,KC_SLCK, - MO(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_DEL ,KC_INS , - MO(1) ,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_PENT, + BL_INC ,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_END ,KC_PGDN, + BL_DEC ,KC_TAB ,KC_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,KC_SLCK, + KC_F13 ,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_DEL ,KC_INS , + KC_F14 ,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_PENT, MO(1) ,KC_LCTL,KC_LGUI,KC_LALT ,KC_SPC ,KC_RALT,KC_RGUI,KC_RCTL ,KC_LEFT,KC_DOWN,KC_RGHT ), [1] = LAYOUT_prime_iso( RESET ,RESET ,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______ ,_______,_______,_______, - MO(1) ,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, - MO(1) ,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______ ,_______,_______, - MO(1) ,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______ ,_______,_______, - MO(1) ,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______, + _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, + _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______ ,_______,_______, + _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______ ,_______,_______, + _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______, MO(1) ,_______,_______,_______ ,_______ ,_______,_______,_______ ,_______,_______,_______ ) }; diff --git a/keyboards/metamechs/timberwolf/keymaps/via/keymap.c b/keyboards/metamechs/timberwolf/keymaps/via/keymap.c index a6c5b6628b0c..57614bd7a7b1 100644 --- a/keyboards/metamechs/timberwolf/keymaps/via/keymap.c +++ b/keyboards/metamechs/timberwolf/keymaps/via/keymap.c @@ -20,17 +20,17 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [0] = LAYOUT_all( KC_MUTE,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_PGUP, RESET ,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_END ,KC_PGDN, - BL_STEP,KC_TAB ,KC_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_PSCR,KC_SLCK, - MO(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_DEL ,KC_INS , - MO(1) ,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_NO ,KC_PENT, - MO(1) ,KC_LCTL,KC_LGUI,KC_LALT ,KC_SPC ,KC_RALT,KC_RGUI,KC_RCTL,KC_LEFT,KC_LEFT,KC_DOWN,KC_RGHT,KC_NO + 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 ,KC_PSCR,KC_SLCK, + BL_DEC ,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_DEL ,KC_INS , + KC_F13 ,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_UP ,KC_PENT, + MO(1) ,KC_LCTL,KC_LGUI,KC_LALT ,KC_SPC ,KC_RALT,KC_RGUI,KC_RCTL,KC_LEFT,KC_LEFT,KC_DOWN,KC_RGHT,KC_PENT ), [1] = LAYOUT_all( RESET ,RESET ,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______ ,_______,_______,_______, - MO(1) ,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, - MO(1) ,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______ ,_______,_______, - MO(1) ,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______ ,_______,_______, - MO(1) ,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, + _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, + _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______ ,_______,_______, + _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______ ,_______,_______, + _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, MO(1) ,_______,_______,_______ ,_______ ,_______,_______,_______,_______,_______,_______,_______,_______ ), [2] = LAYOUT_all( diff --git a/keyboards/metamechs/timberwolf/keymaps/via/rules.mk b/keyboards/metamechs/timberwolf/keymaps/via/rules.mk new file mode 100644 index 000000000000..036bd6d1c3ec --- /dev/null +++ b/keyboards/metamechs/timberwolf/keymaps/via/rules.mk @@ -0,0 +1 @@ +VIA_ENABLE = yes \ No newline at end of file diff --git a/keyboards/metamechs/timberwolf/rules.mk b/keyboards/metamechs/timberwolf/rules.mk index a1275c2d66e2..240f806a6d9a 100644 --- a/keyboards/metamechs/timberwolf/rules.mk +++ b/keyboards/metamechs/timberwolf/rules.mk @@ -32,4 +32,4 @@ FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches HD44780_ENABLE = no # Enable support for HD44780 based LCDs ENCODER_ENABLE = yes # Enable encoder support -BACKLIGHT_DRIVER = software \ No newline at end of file +BACKLIGHT_DRIVER = pwm \ No newline at end of file From bcfb70a4cb943fa17c221db55b155abc3598fbdd Mon Sep 17 00:00:00 2001 From: Leivince John Marte Date: Tue, 28 Jul 2020 13:39:31 +0800 Subject: [PATCH 469/930] [Keyboard] PH Arisu (#9612) * Port Arisu to QMK * Update Change name to PH Arisu * Update PH Arisu for PR * Update Bootloader * Using Pro Micro * Update Manufacturer Name * Clean rules.mk * Update keyboards/ph_arisu/config.h * Update keyboards/ph_arisu/config.h * Update keyboards/ph_arisu/config.h * Update keyboards/ph_arisu/config.h * Update keyboards/ph_arisu/keymaps/default/keymap.c * Update keyboards/ph_arisu/keymaps/default/keymap.c * Update keyboards/ph_arisu/keymaps/via/keymap.c * Update keyboards/ph_arisu/rules.mk * https://github.com/qmk/qmk_firmware/pull/9612#discussion_r451659279 Update info.json using converter * Fixed Clean endif * LAYOUT not defined Error on Compile fix * Fix implicit declaration of function 'LAYOUT' * Update VIA keymap change KEYMAP to new LAYOUT method * Update keyboards/ph_arisu/config.h * Update Remove RGB_DI_PIN * Update keyboards/ph_arisu/config.h * Update keyboards/ph_arisu/readme.md * Update keyboards/ph_arisu/readme.md * Update keyboards/ph_arisu/ph_arisu.h * Update keyboards/ph_arisu/ph_arisu.h * Update keyboards/ph_arisu/keymaps/via/keymap.c * Update keyboards/ph_arisu/readme.md * Update keyboards/ph_arisu/config.h * Add MO(1) on Keymaps * Update info.json for QMK configurator support * Add PH Arisu Image * Use Smaller Size Image for Keyboard * Change Image Host to Imgur * Fix Imgur url * Fix Imgur url * Update Change Keyboard Maintainer * Update Change Hardware Support to Pro Micro ATmega32U4 * Update keyboards/ph_arisu/config.h * Update keyboards/ph_arisu/ph_arisu.h * Update keyboards/ph_arisu/keymaps/default/keymap.c * Update keyboards/ph_arisu/keymaps/via/keymap.c * Update keyboards/ph_arisu/readme.md * Update keyboards/ph_arisu/rules.mk * Update Move ph_arisu to nightly_boards directory * Update Readme make command * Update keyboards/nightly_boards/ph_arisu/rules.mk --- keyboards/nightly_boards/ph_arisu/config.h | 31 ++++++++++++++++ keyboards/nightly_boards/ph_arisu/info.json | 12 +++++++ .../ph_arisu/keymaps/default/keymap.c | 18 ++++++++++ .../ph_arisu/keymaps/via/keymap.c | 36 +++++++++++++++++++ .../ph_arisu/keymaps/via/rules.mk | 2 ++ keyboards/nightly_boards/ph_arisu/ph_arisu.c | 1 + keyboards/nightly_boards/ph_arisu/ph_arisu.h | 22 ++++++++++++ keyboards/nightly_boards/ph_arisu/readme.md | 16 +++++++++ keyboards/nightly_boards/ph_arisu/rules.mk | 22 ++++++++++++ 9 files changed, 160 insertions(+) create mode 100644 keyboards/nightly_boards/ph_arisu/config.h create mode 100644 keyboards/nightly_boards/ph_arisu/info.json create mode 100644 keyboards/nightly_boards/ph_arisu/keymaps/default/keymap.c create mode 100644 keyboards/nightly_boards/ph_arisu/keymaps/via/keymap.c create mode 100644 keyboards/nightly_boards/ph_arisu/keymaps/via/rules.mk create mode 100644 keyboards/nightly_boards/ph_arisu/ph_arisu.c create mode 100644 keyboards/nightly_boards/ph_arisu/ph_arisu.h create mode 100644 keyboards/nightly_boards/ph_arisu/readme.md create mode 100644 keyboards/nightly_boards/ph_arisu/rules.mk diff --git a/keyboards/nightly_boards/ph_arisu/config.h b/keyboards/nightly_boards/ph_arisu/config.h new file mode 100644 index 000000000000..57df486e7222 --- /dev/null +++ b/keyboards/nightly_boards/ph_arisu/config.h @@ -0,0 +1,31 @@ +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0x6172 +#define PRODUCT_ID 0x6060 +#define DEVICE_VER 0x0001 +#define MANUFACTURER PH +#define PRODUCT Arisu + +/* key matrix size */ +#define MATRIX_ROWS 10 +#define MATRIX_COLS 8 + +/* key matrix pins */ +#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, B6 } +#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/nightly_boards/ph_arisu/info.json b/keyboards/nightly_boards/ph_arisu/info.json new file mode 100644 index 000000000000..62ea91fa6ba0 --- /dev/null +++ b/keyboards/nightly_boards/ph_arisu/info.json @@ -0,0 +1,12 @@ +{ + "keyboard_name": "PH Arisu", + "url": "https://github.com/FateNozomi/arisu-pcb", + "maintainer": "qmk", + "width": 17.8, + "height": 5.25, + "layouts": { + "LAYOUT": { + "layout": [{"label":"0,0", "x":0, "y":0}, {"label":"1,0", "x":1, "y":0}, {"label":"0,1", "x":2, "y":0}, {"label":"1,1", "x":3, "y":0}, {"label":"0,2", "x":4, "y":0}, {"label":"1,2", "x":5, "y":0}, {"label":"0,3", "x":6, "y":0}, {"label":"1,3", "x":8.5, "y":0}, {"label":"0,4", "x":9.5, "y":0}, {"label":"1,4", "x":10.5, "y":0}, {"label":"0,5", "x":11.5, "y":0}, {"label":"1,5", "x":12.5, "y":0}, {"label":"0,6", "x":13.5, "y":0}, {"label":"1,6", "x":14.5, "y":0}, {"label":"0,7", "x":15.5, "y":0}, {"label":"2,7", "x":16.8, "y":0}, {"label":"2,0", "x":0, "y":1, "w":1.5}, {"label":"3,0", "x":1.5, "y":1}, {"label":"2,1", "x":2.5, "y":1}, {"label":"3,1", "x":3.5, "y":1}, {"label":"2,2", "x":4.5, "y":1}, {"label":"3,2", "x":5.5, "y":1}, {"label":"2,3", "x":8, "y":1}, {"label":"3,3", "x":9, "y":1}, {"label":"2,4", "x":10, "y":1}, {"label":"3,4", "x":11, "y":1}, {"label":"2,5", "x":12, "y":1}, {"label":"3,5", "x":13, "y":1}, {"label":"2,6", "x":14, "y":1}, {"label":"3,6", "x":15, "y":1, "w":1.5}, {"label":"4,7", "x":16.8, "y":1}, {"label":"4,0", "x":0, "y":2, "w":1.75}, {"label":"5,0", "x":1.75, "y":2}, {"label":"4,1", "x":2.75, "y":2}, {"label":"5,1", "x":3.75, "y":2}, {"label":"4,2", "x":4.75, "y":2}, {"label":"5,2", "x":5.75, "y":2}, {"label":"4,3", "x":8.25, "y":2}, {"label":"5,3", "x":9.25, "y":2}, {"label":"4,4", "x":10.25, "y":2}, {"label":"5,4", "x":11.25, "y":2}, {"label":"4,5", "x":12.25, "y":2}, {"label":"5,5", "x":13.25, "y":2}, {"label":"4,6", "x":14.25, "y":2, "w":2.25}, {"label":"6,7", "x":16.8, "y":2}, {"label":"6,0", "x":0, "y":3, "w":2.25}, {"label":"7,0", "x":2.25, "y":3}, {"label":"6,1", "x":3.25, "y":3}, {"label":"7,1", "x":4.25, "y":3}, {"label":"6,2", "x":5.25, "y":3}, {"label":"7,2", "x":6.25, "y":3}, {"label":"6,3", "x":8.75, "y":3}, {"label":"7,3", "x":9.75, "y":3}, {"label":"6,4", "x":10.75, "y":3}, {"label":"7,4", "x":11.75, "y":3}, {"label":"6,5", "x":12.75, "y":3}, {"label":"7,5", "x":13.75, "y":3, "w":1.75}, {"label":"7,6", "x":15.75, "y":3.25}, {"label":"8,0", "x":0, "y":4, "w":1.5}, {"label":"8,1", "x":2.75, "y":4, "w":1.5}, {"label":"8,2", "x":4.25, "y":4, "w":2}, {"label":"9,2", "x":6.25, "y":4, "w":1.25}, {"label":"9,3", "x":8.25, "y":4, "w":2.75}, {"label":"9,4", "x":11, "y":4, "w":1.5}, {"label":"8,6", "x":14.75, "y":4.25}, {"label":"9,6", "x":15.75, "y":4.25}, {"label":"8,7", "x":16.75, "y":4.25}] + } + } +} diff --git a/keyboards/nightly_boards/ph_arisu/keymaps/default/keymap.c b/keyboards/nightly_boards/ph_arisu/keymaps/default/keymap.c new file mode 100644 index 000000000000..7fc5fd8e70e0 --- /dev/null +++ b/keyboards/nightly_boards/ph_arisu/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_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_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, + 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_LSFT, KC_UP, + MO(1), KC_LALT, KC_SPC, KC_SPC, KC_SPC, KC_LALT, KC_LEFT, KC_DOWN, KC_RGHT + ), + [1] = LAYOUT( + RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______ + ) +}; diff --git a/keyboards/nightly_boards/ph_arisu/keymaps/via/keymap.c b/keyboards/nightly_boards/ph_arisu/keymaps/via/keymap.c new file mode 100644 index 000000000000..c70603ef40dc --- /dev/null +++ b/keyboards/nightly_boards/ph_arisu/keymaps/via/keymap.c @@ -0,0 +1,36 @@ +#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_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, + 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_LSFT, KC_UP, + MO(1), KC_LALT, KC_SPC, KC_SPC, KC_SPC, KC_LALT, KC_LEFT, KC_DOWN, KC_RGHT + ), + + [1] = LAYOUT( + RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + + [2] = LAYOUT( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + + [3] = LAYOUT( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______ + ) + +}; diff --git a/keyboards/nightly_boards/ph_arisu/keymaps/via/rules.mk b/keyboards/nightly_boards/ph_arisu/keymaps/via/rules.mk new file mode 100644 index 000000000000..36b7ba9cbc98 --- /dev/null +++ b/keyboards/nightly_boards/ph_arisu/keymaps/via/rules.mk @@ -0,0 +1,2 @@ +VIA_ENABLE = yes +LTO_ENABLE = yes diff --git a/keyboards/nightly_boards/ph_arisu/ph_arisu.c b/keyboards/nightly_boards/ph_arisu/ph_arisu.c new file mode 100644 index 000000000000..e1cd5d3a0464 --- /dev/null +++ b/keyboards/nightly_boards/ph_arisu/ph_arisu.c @@ -0,0 +1 @@ +#include "ph_arisu.h" diff --git a/keyboards/nightly_boards/ph_arisu/ph_arisu.h b/keyboards/nightly_boards/ph_arisu/ph_arisu.h new file mode 100644 index 000000000000..85e5a9381065 --- /dev/null +++ b/keyboards/nightly_boards/ph_arisu/ph_arisu.h @@ -0,0 +1,22 @@ +#pragma once + +#include "quantum.h" + +#define LAYOUT( \ + K000, K010, K001, K011, K002, K012, K003, K013, K004, K014, K005, K015, K006, K016, K007, K027, \ + K020, K030, K021, K031, K022, K032, K023, K033, K024, K034, K025, K035, K026, K036, K047, \ + K040, K050, K041, K051, K042, K052, K043, K053, K044, K054, K045, K055, K046, K067, \ + K060, K070, K061, K071, K062, K072, K063, K073, K064, K074, K065, K075, K076, \ + K080, K081, K082, K092, K093, K094, K086, K096, K087 \ +) { \ + { K000, K001, K002, K003, K004, K005, K006, K007 }, \ + { K010, K011, K012, K013, K014, K015, K016, KC_NO }, \ + { K020, K021, K022, K023, K024, K025, K026, K027 }, \ + { K030, K031, K032, K033, K034, K035, K036, KC_NO }, \ + { K040, K041, K042, K043, K044, K045, K046, K047 }, \ + { K050, K051, K052, K053, K054, K055, KC_NO, KC_NO }, \ + { K060, K061, K062, K063, K064, K065, KC_NO, K067 }, \ + { K070, K071, K072, K073, K074, K075, K076, KC_NO }, \ + { K080, K081, K082, KC_NO, KC_NO, KC_NO, K086, K087 }, \ + { KC_NO, KC_NO, K092, K093, K094, KC_NO, K096, KC_NO } \ +} diff --git a/keyboards/nightly_boards/ph_arisu/readme.md b/keyboards/nightly_boards/ph_arisu/readme.md new file mode 100644 index 000000000000..360ccae579b5 --- /dev/null +++ b/keyboards/nightly_boards/ph_arisu/readme.md @@ -0,0 +1,16 @@ +# PH ARISU + +![PH_ARISU](https://i.imgur.com/qr2Tn2Xl.jpg) + +PCB is base on https://github.com/FateNozomi/arisu-pcb +and used for a local groupbuy in the Philippines. + +* Keyboard Maintainer: [Neil Brian Ramirez](https://github.com/NightlyBoards) +* Hardware Supported: Pro Micro ATmega32U4 +* Hardware Availability: Base on [ARISU](https://github.com/FateNozomi/arisu-pcb) + +Make example for this keyboard (after setting up your build environment): + + make nightly_boards/ph_arisu: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/nightly_boards/ph_arisu/rules.mk b/keyboards/nightly_boards/ph_arisu/rules.mk new file mode 100644 index 000000000000..e70a8a7d6044 --- /dev/null +++ b/keyboards/nightly_boards/ph_arisu/rules.mk @@ -0,0 +1,22 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +BOOTLOADER = caterina + +# 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 +BLUETOOTH_ENABLE = no # Enable Bluetooth +AUDIO_ENABLE = no # Audio output From 51dbca2332609ee08b98c1c0ab729b0f08f144f1 Mon Sep 17 00:00:00 2001 From: chemicalwill <36576135+chemicalwill@users.noreply.github.com> Date: Tue, 28 Jul 2020 00:42:32 -0500 Subject: [PATCH 470/930] [Keyboard] add bear_face/v2 (#9642) * [keyboard] bear_face/v2 initial commit * restructured keyboard dir for multiple versions * fixed .json layouts for ISO * reformatted hard tabs to soft tabs * updated readmes * [keyboard] removed top-level info.json, keymaps * [bear_face/v2] changed matrix height, arrow key labels * fixed height 6 instead of 5 * symbols for arrows now directions (i.e. "Left" etc.) * [bear_face/v2] fixed ISO enter in .json * corrected placement for ISO enter * Update rules.mk * DEFAULT_FOLDER = bear_face/v1 * [bear_face] fixed matrix width in info.json * true matrix width is 15 * updated for v1 and v2 info.json * Update keyboards/bear_face/config.h * Update keyboards/bear_face/v1/info.json * Update keyboards/bear_face/v2/info.json * Update keyboards/bear_face/v2/info.json * Update keyboards/bear_face/rules.mk * Fixed default keymap tabs * changed from tabs to spaces --- keyboards/bear_face/bear_face.c | 16 -- keyboards/bear_face/bear_face.h | 20 +- keyboards/bear_face/config.h | 80 +------ keyboards/bear_face/info.json | 19 -- keyboards/bear_face/keymaps/default/keymap.c | 117 ----------- keyboards/bear_face/readme.md | 13 +- keyboards/bear_face/rules.mk | 17 +- keyboards/bear_face/v1/config.h | 19 ++ keyboards/bear_face/v1/info.json | 101 +++++++++ .../bear_face/v1/keymaps/default/keymap.c | 117 +++++++++++ .../{ => v1}/keymaps/default/readme.md | 9 +- keyboards/bear_face/v1/rules.mk | 0 keyboards/bear_face/v1/v1.c | 34 +++ keyboards/bear_face/v1/v1.h | 36 ++++ keyboards/bear_face/v2/config.h | 19 ++ keyboards/bear_face/v2/info.json | 195 ++++++++++++++++++ .../bear_face/v2/keymaps/default/keymap.c | 117 +++++++++++ .../bear_face/v2/keymaps/default/readme.md | 15 ++ .../bear_face/v2/keymaps/default_iso/keymap.c | 117 +++++++++++ .../v2/keymaps/default_iso/readme.md | 19 ++ keyboards/bear_face/v2/rules.mk | 0 keyboards/bear_face/v2/v2.c | 34 +++ keyboards/bear_face/v2/v2.h | 52 +++++ 23 files changed, 899 insertions(+), 267 deletions(-) delete mode 100644 keyboards/bear_face/info.json delete mode 100644 keyboards/bear_face/keymaps/default/keymap.c create mode 100644 keyboards/bear_face/v1/config.h create mode 100644 keyboards/bear_face/v1/info.json create mode 100644 keyboards/bear_face/v1/keymaps/default/keymap.c rename keyboards/bear_face/{ => v1}/keymaps/default/readme.md (62%) create mode 100644 keyboards/bear_face/v1/rules.mk create mode 100644 keyboards/bear_face/v1/v1.c create mode 100644 keyboards/bear_face/v1/v1.h create mode 100644 keyboards/bear_face/v2/config.h create mode 100644 keyboards/bear_face/v2/info.json create mode 100644 keyboards/bear_face/v2/keymaps/default/keymap.c create mode 100644 keyboards/bear_face/v2/keymaps/default/readme.md create mode 100644 keyboards/bear_face/v2/keymaps/default_iso/keymap.c create mode 100644 keyboards/bear_face/v2/keymaps/default_iso/readme.md create mode 100644 keyboards/bear_face/v2/rules.mk create mode 100644 keyboards/bear_face/v2/v2.c create mode 100644 keyboards/bear_face/v2/v2.h diff --git a/keyboards/bear_face/bear_face.c b/keyboards/bear_face/bear_face.c index 443b3016d7b4..30aa5140d413 100644 --- a/keyboards/bear_face/bear_face.c +++ b/keyboards/bear_face/bear_face.c @@ -16,19 +16,3 @@ along with this program. If not, see . */ #include "bear_face.h" - -void keyboard_pre_init_kb(void) { - //Sets LED pin as output - setPinOutput(F7); - - keyboard_pre_init_user(); -} - -bool led_update_kb(led_t led_state) { - // Caps Lock LED indicator toggling code here - bool res = led_update_user(led_state); - if(res) { - writePin(F7, led_state.caps_lock); - } - return res; -} diff --git a/keyboards/bear_face/bear_face.h b/keyboards/bear_face/bear_face.h index 2337a4f731d4..c63b2bd01212 100644 --- a/keyboards/bear_face/bear_face.h +++ b/keyboards/bear_face/bear_face.h @@ -19,18 +19,8 @@ along with this program. If not, see . #include "quantum.h" -#define LAYOUT_83_ansi( \ - 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, K213, K214, \ - K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K313, K314, \ - K400, K401, K402, K403, K404, K405, K406, K407, K408, K409, K410, K412, K413, K414, \ - K500, K501, K502, K505, K509, K510, K511, K512, K513, K514 \ -) { \ - { 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, K213, K214 }, \ - { K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, KC_NO, K313, K314 }, \ - { K400, K401, K402, K403, K404, K405, K406, K407, K408, K409, K410, KC_NO, K412, K413, K414 }, \ - { K500, K501, K502, KC_NO, KC_NO, K505, KC_NO, KC_NO, KC_NO, K509, K510, K511, K512, K513, K514 } \ -} +#if defined(KEYBOARD_bear_face_v1) +# include "v1.h" +#elif defined(KEYBOARD_bear_face_v2) +# include "v2.h" +#endif diff --git a/keyboards/bear_face/config.h b/keyboards/bear_face/config.h index 0b7aa62836e8..9b389f127ad3 100644 --- a/keyboards/bear_face/config.h +++ b/keyboards/bear_face/config.h @@ -20,27 +20,16 @@ along with this program. If not, see . #include "config_common.h" /* USB Device descriptor parameter */ -#define VENDOR_ID 0xCEEB +#define VENDOR_ID 0xFEED #define PRODUCT_ID 0x09f5 -#define DEVICE_VER 0x0001 #define MANUFACTURER chemicalwill #define PRODUCT bear_face -#define DESCRIPTION Vortex Race 3 programmable PCB replacement /* 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) - * -*/ +/* bear_face matrix pinout */ #define MATRIX_ROW_PINS { F5, F6, F4, F1, B0, B6 } #define MATRIX_COL_PINS { B5, C7, C6, F0, E6, B7, D0, D1, D2, D3, D5, D4, D6, D7, B4 } #define UNUSED_PINS @@ -49,39 +38,10 @@ along with this program. If not, see . #define DIODE_DIRECTION COL2ROW #define BACKLIGHT_PIN F7 -//#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 6 -/* 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 */ @@ -120,42 +80,6 @@ along with this program. If not, see . * */ -/* 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_HELP1 H -//#define MAGIC_KEY_HELP2 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_ALT1 ESC -//#define MAGIC_KEY_LAYER0_ALT2 GRAVE -//#define MAGIC_KEY_LAYER0 0 -//#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 PAUSE -//#define MAGIC_KEY_LOCK CAPS -//#define MAGIC_KEY_EEPROM E -//#define MAGIC_KEY_NKRO N -//#define MAGIC_KEY_SLEEP_LED Z - /* * Feature disable options * These options are also useful to firmware size reduction. diff --git a/keyboards/bear_face/info.json b/keyboards/bear_face/info.json deleted file mode 100644 index 61cab52cfd87..000000000000 --- a/keyboards/bear_face/info.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "keyboard_name": "bear_face", - "url": "https://github.com/chemicalwill/bear_face_pcb", - "maintainer": "chemicalwill", - "width": 16, - "height": 5, - "layouts": { - "LAYOUT_83_ansi": { - "layout": [ - {"label":"Esc", "x":0, "y":0, "w":1.5}, {"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":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.5, "y":0}, {"label":"F10", "x":10.5, "y":0}, {"label":"F11", "x":11.5, "y":0}, {"label":"F12", "x":12.5, "y":0}, {"label":"Pn", "x":13.5, "y":0}, {"label":"Delete", "x":14.5, "y":0, "w":1.5}, - {"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":"Pg 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":"Pg Dn", "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}, {"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} - ] - } - } -} diff --git a/keyboards/bear_face/keymaps/default/keymap.c b/keyboards/bear_face/keymaps/default/keymap.c deleted file mode 100644 index 774f32190a54..000000000000 --- a/keyboards/bear_face/keymaps/default/keymap.c +++ /dev/null @@ -1,117 +0,0 @@ -/* -Copyright 2020 chemicalwill - -This program is free software: you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation, either version 2 of the License, or -(at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public 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 { - _QWER, - _COLE, - _DVOR, - _FN1, -}; - -#define FN1_CAPS LT(_FN1, KC_CAPS) - -//custom keycode enums -enum custom_keycodes { - BASE_QWER = SAFE_RANGE, - BASE_COLE, - BASE_DVOR -}; - -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [_QWER] = LAYOUT_83_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_NO, 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, - FN1_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(_FN1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT - ), - - [_COLE] = LAYOUT_83_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_NO, 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_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_LBRC, KC_RBRC, KC_BSLS, KC_PGUP, - 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_PGDN, - 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_END, - KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(_FN1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT - ), - - [_DVOR] = LAYOUT_83_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_NO, 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_LBRC, KC_RBRC, KC_BSPC, KC_HOME, - 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_PGUP, - FN1_CAPS, 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_PGDN, - 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_END, - KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(_FN1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT - ), - - [_FN1] = LAYOUT_83_ansi( - _______, KC_MUTE, KC_VOLD, KC_VOLU, KC_MPRV, KC_MPLY, KC_MNXT, _______, _______, KC_PSCR, KC_SLCK, KC_PAUS, _______, _______, KC_INS, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_CALC, BASE_QWER, - _______, _______, _______, _______, RESET, _______, _______, _______, _______, RESET, _______, _______, _______, _______, BASE_COLE, - _______, _______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, BASE_DVOR, - _______, KC_APP, _______, _______, _______, _______, _______, _______, _______, _______, KC_APP, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ - ), - - /* - [_BLANK] = LAYOUT_83_ansi( - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ - ), - */ -}; - -//macros to allow the user to set whatever default layer they want, even after reboot - -bool process_record_user(uint16_t keycode, keyrecord_t *record) { - switch (keycode) { - case BASE_QWER: - if (record->event.pressed) { - // when keycode BASE_QWER is pressed - set_single_persistent_default_layer(_QWER); - } else { - // when keycode BASE_QWER is released - } - break; - - case BASE_COLE: - if (record->event.pressed) { - // when keycode BASE_COLE is pressed - set_single_persistent_default_layer(_COLE); - } else { - // when keycode BASE_COLE is released - } - break; - - case BASE_DVOR: - if (record->event.pressed) { - // when keycode BASE_DVOR is pressed - set_single_persistent_default_layer(_DVOR); - } else { - // when keycode BASE_DVOR is released - } - break; - } - return true; -}; diff --git a/keyboards/bear_face/readme.md b/keyboards/bear_face/readme.md index f81214ce8256..212418e374cd 100644 --- a/keyboards/bear_face/readme.md +++ b/keyboards/bear_face/readme.md @@ -1,15 +1,16 @@ # bear_face -![bear_face](https://i.imgur.com/nQIyP6w.png) +![bear_face](https://i.imgur.com/SALKmdP.png) -Vortex Race 3 with replacement QMK-compatible PCB designed by [chemicalwill](https://github.com/chemicalwill) +QMK-compatible replacement PCB for the Vortex Race 3 designed by [chemicalwill](https://github.com/chemicalwill) -* Keyboard Maintainer: [Will Hedges](https://github.com/chemicalwill) -* Hardware Supported: bear_face v1.0, atmega32u4 -* Hardware Availability: [PCB files](https://github.com/chemicalwill/bear_face) +* Keyboard Maintainer: [chemicalwill](https://github.com/chemicalwill) +* Hardware Supported: bear_face v1, v2; atmega32u4 +* Hardware Availability: [currently by request](https://www.reddit.com/message/compose?to=chemicalwill&subject=bear_face%20v2) Make example for this keyboard (after setting up your build environment): - make bear_face:default + make bear_face/v1:default + make bear_face/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/bear_face/rules.mk b/keyboards/bear_face/rules.mk index fafe7ebd12fb..499388ed18f3 100644 --- a/keyboards/bear_face/rules.mk +++ b/keyboards/bear_face/rules.mk @@ -2,20 +2,12 @@ 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 +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 @@ -26,6 +18,7 @@ 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 -UNICODE_ENABLE = no # Unicode -BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID -AUDIO_ENABLE = no # Audio output on port C6 +BLUETOOTH_ENABLE = no # Enable Bluetooth +AUDIO_ENABLE = no # Audio output6 + +DEFAULT_FOLDER = bear_face/v1 diff --git a/keyboards/bear_face/v1/config.h b/keyboards/bear_face/v1/config.h new file mode 100644 index 000000000000..cf1de932c1e6 --- /dev/null +++ b/keyboards/bear_face/v1/config.h @@ -0,0 +1,19 @@ +/* +Copyright 2020 chemicalwill + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +/* USB Device descriptor parameter */ +#define DEVICE_VER 0x0100 diff --git a/keyboards/bear_face/v1/info.json b/keyboards/bear_face/v1/info.json new file mode 100644 index 000000000000..6fbc4229b82a --- /dev/null +++ b/keyboards/bear_face/v1/info.json @@ -0,0 +1,101 @@ +{ + "keyboard_name": "bear_face", + "url": "https://github.com/chemicalwill/bear_face_pcb", + "maintainer": "chemicalwill", + "width": 15, + "height": 6, + "layouts": { + "LAYOUT_83_ansi": { + "layout": [ + {"label":"Esc", "x":0, "y":0, "w":1.5}, + {"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":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.5, "y":0}, + {"label":"F10", "x":10.5, "y":0}, + {"label":"F11", "x":11.5, "y":0}, + {"label":"F12", "x":12.5, "y":0}, + {"label":"Pn", "x":13.5, "y":0}, + {"label":"Delete", "x":14.5, "y":0, "w":1.5}, + + {"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":"Pg 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":"Pg Dn", "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}, + {"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} + ] + } + } +} diff --git a/keyboards/bear_face/v1/keymaps/default/keymap.c b/keyboards/bear_face/v1/keymaps/default/keymap.c new file mode 100644 index 000000000000..527b041929c1 --- /dev/null +++ b/keyboards/bear_face/v1/keymaps/default/keymap.c @@ -0,0 +1,117 @@ +/* +Copyright 2020 chemicalwill + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public 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 { + _QWER, + _COLE, + _DVOR, + _FN1, +}; + +#define FN1_CAPS LT(_FN1, KC_CAPS) + +//custom keycode enums +enum custom_keycodes { + BASE_QWER = SAFE_RANGE, + BASE_COLE, + BASE_DVOR +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_QWER] = LAYOUT_83_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_NO, 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, + FN1_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(_FN1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT + ), + + [_COLE] = LAYOUT_83_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_NO, 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_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_LBRC, KC_RBRC, KC_BSLS, KC_PGUP, + 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_PGDN, + 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_END, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(_FN1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT + ), + + [_DVOR] = LAYOUT_83_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_NO, 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_LBRC, KC_RBRC, KC_BSPC, KC_HOME, + 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_PGUP, + FN1_CAPS, 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_PGDN, + 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_END, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(_FN1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT + ), + + [_FN1] = LAYOUT_83_ansi( + _______, KC_MUTE, KC_VOLD, KC_VOLU, KC_MPRV, KC_MPLY, KC_MNXT, _______, _______, KC_PSCR, KC_SLCK, KC_PAUS, _______, _______, KC_INS, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_CALC, BASE_QWER, + _______, _______, _______, _______, RESET, _______, _______, _______, _______, RESET, _______, _______, _______, _______, BASE_COLE, + _______, _______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, BASE_DVOR, + _______, KC_APP, _______, _______, _______, _______, _______, _______, _______, _______, KC_APP, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + +/* + [_BLANK] = LAYOUT_83_ansi( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), +*/ +}; + +//macros to allow the user to set whatever default layer they want, even after reboot + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case BASE_QWER: + if (record->event.pressed) { + // when keycode BASE_QWER is pressed + set_single_persistent_default_layer(_QWER); + } else { + // when keycode BASE_QWER is released + } + break; + + case BASE_COLE: + if (record->event.pressed) { + // when keycode BASE_COLE is pressed + set_single_persistent_default_layer(_COLE); + } else { + // when keycode BASE_COLE is released + } + break; + + case BASE_DVOR: + if (record->event.pressed) { + // when keycode BASE_DVOR is pressed + set_single_persistent_default_layer(_DVOR); + } else { + // when keycode BASE_DVOR is released + } + break; + } + return true; +}; diff --git a/keyboards/bear_face/keymaps/default/readme.md b/keyboards/bear_face/v1/keymaps/default/readme.md similarity index 62% rename from keyboards/bear_face/keymaps/default/readme.md rename to keyboards/bear_face/v1/keymaps/default/readme.md index 3b2e8380f72d..5f9e635dfec2 100644 --- a/keyboards/bear_face/keymaps/default/readme.md +++ b/keyboards/bear_face/v1/keymaps/default/readme.md @@ -5,10 +5,11 @@ This layout replaces the stock layout on the Vortex Race 3. - Caps Lock indicator LED is enabled by default - Layer Tap on Caps Lock (tap for Caps Lock, hold for _FN1) - FORCE_NKRO enabled by default + - Pn key is set to 'KC_NO' by default - * might be a good place for a macro, or to put your PC to sleep, etc. -- a combined function layer that mimics the sublegends on the stock caps (regardless of layout) + * Might be a good place for a macro, or to put your PC to sleep, etc. + +- A combined function layer that mimics the sublegends on the stock caps (regardless of layout) * 'Reset' will put the keyboard into DFU mode * 'APP' sends 'KC_APP' - * set base layer toggles for QWERTY, COLEMAK, and DVORAK layouts (will persist after reboot) - \ No newline at end of file + * Base layer toggles for QWERTY, COLEMAK, and DVORAK layouts (will persist after reboot) diff --git a/keyboards/bear_face/v1/rules.mk b/keyboards/bear_face/v1/rules.mk new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/keyboards/bear_face/v1/v1.c b/keyboards/bear_face/v1/v1.c new file mode 100644 index 000000000000..443b3016d7b4 --- /dev/null +++ b/keyboards/bear_face/v1/v1.c @@ -0,0 +1,34 @@ +/* +Copyright 2020 chemicalwill + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#include "bear_face.h" + +void keyboard_pre_init_kb(void) { + //Sets LED pin as output + setPinOutput(F7); + + keyboard_pre_init_user(); +} + +bool led_update_kb(led_t led_state) { + // Caps Lock LED indicator toggling code here + bool res = led_update_user(led_state); + if(res) { + writePin(F7, led_state.caps_lock); + } + return res; +} diff --git a/keyboards/bear_face/v1/v1.h b/keyboards/bear_face/v1/v1.h new file mode 100644 index 000000000000..2337a4f731d4 --- /dev/null +++ b/keyboards/bear_face/v1/v1.h @@ -0,0 +1,36 @@ +/* +Copyright 2020 chemicalwill + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License 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_83_ansi( \ + 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, K213, K214, \ + K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K313, K314, \ + K400, K401, K402, K403, K404, K405, K406, K407, K408, K409, K410, K412, K413, K414, \ + K500, K501, K502, K505, K509, K510, K511, K512, K513, K514 \ +) { \ + { 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, K213, K214 }, \ + { K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, KC_NO, K313, K314 }, \ + { K400, K401, K402, K403, K404, K405, K406, K407, K408, K409, K410, KC_NO, K412, K413, K414 }, \ + { K500, K501, K502, KC_NO, KC_NO, K505, KC_NO, KC_NO, KC_NO, K509, K510, K511, K512, K513, K514 } \ +} diff --git a/keyboards/bear_face/v2/config.h b/keyboards/bear_face/v2/config.h new file mode 100644 index 000000000000..6a7c8c6fb008 --- /dev/null +++ b/keyboards/bear_face/v2/config.h @@ -0,0 +1,19 @@ +/* +Copyright 2020 chemicalwill + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +/* USB Device descriptor parameter */ +#define DEVICE_VER 0x0200 diff --git a/keyboards/bear_face/v2/info.json b/keyboards/bear_face/v2/info.json new file mode 100644 index 000000000000..552c88defbc8 --- /dev/null +++ b/keyboards/bear_face/v2/info.json @@ -0,0 +1,195 @@ +{ + "keyboard_name": "bear_face", + "url": "https://github.com/chemicalwill/bear_face_pcb", + "maintainer": "chemicalwill", + "width": 15, + "height": 6, + "layouts": { + "LAYOUT_83_ansi": { + "layout": [ + {"label":"Esc", "x":0, "y":0, "w":1.5}, + {"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":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.5, "y":0}, + {"label":"F10", "x":10.5, "y":0}, + {"label":"F11", "x":11.5, "y":0}, + {"label":"F12", "x":12.5, "y":0}, + {"label":"Pn", "x":13.5, "y":0}, + {"label":"Delete", "x":14.5, "y":0, "w":1.5}, + + {"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":"Pg 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":"Pg Dn", "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}, + {"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_84_iso": { + "layout": [ + {"label":"Esc", "x":0, "y":0, "w":1.5}, + {"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":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.5, "y":0}, + {"label":"F10", "x":10.5, "y":0}, + {"label":"F11", "x":11.5, "y":0}, + {"label":"F12", "x":12.5, "y":0}, + {"label":"Pn", "x":13.5, "y":0}, + {"label":"Delete", "x":14.5, "y":0, "w":1.5}, + + {"label":"\u00ac", "x":0, "y":1}, + {"label":"!", "x":1, "y":1}, + {"label":"@", "x":2, "y":1}, + {"label":"\u00a3", "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":"Pg 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":"Pg Dn", "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}, + {"x":3.75, "y":5, "w":6.25}, + {"label":"Alt Gr", "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} + ] + } + } +} diff --git a/keyboards/bear_face/v2/keymaps/default/keymap.c b/keyboards/bear_face/v2/keymaps/default/keymap.c new file mode 100644 index 000000000000..527b041929c1 --- /dev/null +++ b/keyboards/bear_face/v2/keymaps/default/keymap.c @@ -0,0 +1,117 @@ +/* +Copyright 2020 chemicalwill + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public 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 { + _QWER, + _COLE, + _DVOR, + _FN1, +}; + +#define FN1_CAPS LT(_FN1, KC_CAPS) + +//custom keycode enums +enum custom_keycodes { + BASE_QWER = SAFE_RANGE, + BASE_COLE, + BASE_DVOR +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_QWER] = LAYOUT_83_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_NO, 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, + FN1_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(_FN1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT + ), + + [_COLE] = LAYOUT_83_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_NO, 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_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_LBRC, KC_RBRC, KC_BSLS, KC_PGUP, + 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_PGDN, + 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_END, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(_FN1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT + ), + + [_DVOR] = LAYOUT_83_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_NO, 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_LBRC, KC_RBRC, KC_BSPC, KC_HOME, + 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_PGUP, + FN1_CAPS, 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_PGDN, + 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_END, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(_FN1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT + ), + + [_FN1] = LAYOUT_83_ansi( + _______, KC_MUTE, KC_VOLD, KC_VOLU, KC_MPRV, KC_MPLY, KC_MNXT, _______, _______, KC_PSCR, KC_SLCK, KC_PAUS, _______, _______, KC_INS, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_CALC, BASE_QWER, + _______, _______, _______, _______, RESET, _______, _______, _______, _______, RESET, _______, _______, _______, _______, BASE_COLE, + _______, _______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, BASE_DVOR, + _______, KC_APP, _______, _______, _______, _______, _______, _______, _______, _______, KC_APP, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + +/* + [_BLANK] = LAYOUT_83_ansi( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), +*/ +}; + +//macros to allow the user to set whatever default layer they want, even after reboot + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case BASE_QWER: + if (record->event.pressed) { + // when keycode BASE_QWER is pressed + set_single_persistent_default_layer(_QWER); + } else { + // when keycode BASE_QWER is released + } + break; + + case BASE_COLE: + if (record->event.pressed) { + // when keycode BASE_COLE is pressed + set_single_persistent_default_layer(_COLE); + } else { + // when keycode BASE_COLE is released + } + break; + + case BASE_DVOR: + if (record->event.pressed) { + // when keycode BASE_DVOR is pressed + set_single_persistent_default_layer(_DVOR); + } else { + // when keycode BASE_DVOR is released + } + break; + } + return true; +}; diff --git a/keyboards/bear_face/v2/keymaps/default/readme.md b/keyboards/bear_face/v2/keymaps/default/readme.md new file mode 100644 index 000000000000..5f9e635dfec2 --- /dev/null +++ b/keyboards/bear_face/v2/keymaps/default/readme.md @@ -0,0 +1,15 @@ +# default bear_face layout + +This layout replaces the stock layout on the Vortex Race 3. + +- Caps Lock indicator LED is enabled by default +- Layer Tap on Caps Lock (tap for Caps Lock, hold for _FN1) +- FORCE_NKRO enabled by default + +- Pn key is set to 'KC_NO' by default + * Might be a good place for a macro, or to put your PC to sleep, etc. + +- A combined function layer that mimics the sublegends on the stock caps (regardless of layout) + * 'Reset' will put the keyboard into DFU mode + * 'APP' sends 'KC_APP' + * Base layer toggles for QWERTY, COLEMAK, and DVORAK layouts (will persist after reboot) diff --git a/keyboards/bear_face/v2/keymaps/default_iso/keymap.c b/keyboards/bear_face/v2/keymaps/default_iso/keymap.c new file mode 100644 index 000000000000..132c05c4a606 --- /dev/null +++ b/keyboards/bear_face/v2/keymaps/default_iso/keymap.c @@ -0,0 +1,117 @@ +/* +Copyright 2020 chemicalwill + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public 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 { + _QWER, + _COLE, + _DVOR, + _FN1, +}; + +#define FN1_CAPS LT(_FN1, KC_CAPS) + +//custom keycode enums +enum custom_keycodes { + BASE_QWER = SAFE_RANGE, + BASE_COLE, + BASE_DVOR +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_QWER] = LAYOUT_84_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_NO, 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_PGUP, + FN1_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_RALT, MO(_FN1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT + ), + + [_COLE] = LAYOUT_84_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_NO, 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_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_LBRC, KC_RBRC, KC_PGUP, + 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_NUHS, KC_ENT, KC_PGDN, + KC_LSFT, KC_NUBS, 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_END, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(_FN1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT + ), + + [_DVOR] = LAYOUT_84_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_NO, 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_LBRC, KC_RBRC, KC_BSPC, KC_HOME, + 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_PGUP, + FN1_CAPS, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_MINS, KC_NUHS, KC_ENT, KC_PGDN, + KC_LSFT, KC_NUBS, 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_END, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(_FN1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT + ), + + [_FN1] = LAYOUT_84_iso( + _______, KC_MUTE, KC_VOLD, KC_VOLU, KC_MPRV, KC_MPLY, KC_MNXT, _______, _______, KC_PSCR, KC_SLCK, KC_PAUS, _______, _______, KC_INS, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_CALC, BASE_QWER, + _______, _______, _______, _______, RESET, _______, _______, _______, _______, RESET, _______, _______, _______, BASE_COLE, + _______, _______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, BASE_DVOR, + _______, KC_APP, _______, _______, _______, _______, _______, _______, _______, _______, KC_APP, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + +/* + [_BLANK] = LAYOUT_84_iso( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), +*/ +}; + +//macros to allow the user to set whatever default layer they want, even after reboot + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case BASE_QWER: + if (record->event.pressed) { + // when keycode BASE_QWER is pressed + set_single_persistent_default_layer(_QWER); + } else { + // when keycode BASE_QWER is released + } + break; + + case BASE_COLE: + if (record->event.pressed) { + // when keycode BASE_COLE is pressed + set_single_persistent_default_layer(_COLE); + } else { + // when keycode BASE_COLE is released + } + break; + + case BASE_DVOR: + if (record->event.pressed) { + // when keycode BASE_DVOR is pressed + set_single_persistent_default_layer(_DVOR); + } else { + // when keycode BASE_DVOR is released + } + break; + } + return true; +}; diff --git a/keyboards/bear_face/v2/keymaps/default_iso/readme.md b/keyboards/bear_face/v2/keymaps/default_iso/readme.md new file mode 100644 index 000000000000..517baa5726c8 --- /dev/null +++ b/keyboards/bear_face/v2/keymaps/default_iso/readme.md @@ -0,0 +1,19 @@ +# default bear_face layout + +This layout replaces the stock layout on the Vortex Race 3. + +- Caps Lock indicator LED is enabled by default +- Layer Tap on Caps Lock (tap for Caps Lock, hold for _FN1) +- FORCE_NKRO enabled by default + +- Pn key is set to 'KC_NO' by default + * Might be a good place for a macro, or to put your PC to sleep, etc. + +- A combined function layer that mimics the sublegends on the stock caps (regardless of layout) + * 'Reset' will put the keyboard into DFU mode + * 'APP' sends 'KC_APP' + * Base layer toggles for QWERTY, COLEMAK, and DVORAK layouts (will persist after reboot) + +- New things in v2: + * Option of ANSI or ISO layout + * Optional stepped caps (will require compatible plate) diff --git a/keyboards/bear_face/v2/rules.mk b/keyboards/bear_face/v2/rules.mk new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/keyboards/bear_face/v2/v2.c b/keyboards/bear_face/v2/v2.c new file mode 100644 index 000000000000..443b3016d7b4 --- /dev/null +++ b/keyboards/bear_face/v2/v2.c @@ -0,0 +1,34 @@ +/* +Copyright 2020 chemicalwill + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#include "bear_face.h" + +void keyboard_pre_init_kb(void) { + //Sets LED pin as output + setPinOutput(F7); + + keyboard_pre_init_user(); +} + +bool led_update_kb(led_t led_state) { + // Caps Lock LED indicator toggling code here + bool res = led_update_user(led_state); + if(res) { + writePin(F7, led_state.caps_lock); + } + return res; +} diff --git a/keyboards/bear_face/v2/v2.h b/keyboards/bear_face/v2/v2.h new file mode 100644 index 000000000000..57004e56b57a --- /dev/null +++ b/keyboards/bear_face/v2/v2.h @@ -0,0 +1,52 @@ +/* +Copyright 2020 chemicalwill + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License 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_83_ansi( \ + 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, K213, K214, \ + K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K313, K314, \ + K400, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, K412, K413, K414, \ + K500, K501, K502, K505, K509, K510, K511, K512, K513, K514 \ +) { \ + { 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, K213, K214 }, \ + { K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, KC_NO, K313, K314 }, \ + { K400, KC_NO, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, K412, K413, K414 }, \ + { K500, K501, K502, KC_NO, KC_NO, K505, KC_NO, KC_NO, KC_NO, K509, K510, K511, K512, K513, K514 } \ +} + +#define LAYOUT_84_iso( \ + 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, K214, \ + K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, K314, \ + K400, K401, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, K412, K413, K414, \ + K500, K501, K502, K505, K509, K510, K511, K512, K513, K514 \ +) { \ + { 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, K314 }, \ + { K400, K401, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, K412, K413, K414 }, \ + { K500, K501, K502, KC_NO, KC_NO, K505, KC_NO, KC_NO, KC_NO, K509, K510, K511, K512, K513, K514 } \ +} From 7c7a2be4b0d40cbfb4290d76ead1d80610827939 Mon Sep 17 00:00:00 2001 From: umi <57262844+umi-umi@users.noreply.github.com> Date: Wed, 29 Jul 2020 18:59:44 +0900 Subject: [PATCH 471/930] [Docs] Japanese translation of docs/how_a_matrix_works.md (#9682) * add how_a_matrix_works.md translation * update based on comment * update based on comment --- docs/ja/how_a_matrix_works.md | 104 ++++++++++++++++++++++++++++++++++ 1 file changed, 104 insertions(+) create mode 100644 docs/ja/how_a_matrix_works.md diff --git a/docs/ja/how_a_matrix_works.md b/docs/ja/how_a_matrix_works.md new file mode 100644 index 000000000000..ff4fbb115df7 --- /dev/null +++ b/docs/ja/how_a_matrix_works.md @@ -0,0 +1,104 @@ +# キーボードマトリックスの仕組み + + + +キーボードスイッチのマトリックスは行と列に配置されます。マトリックス回路がなければ、各スイッチはコントローラに直接配線する必要があります。 + +回路が行と列に配置されている場合、キーが押されると、列ワイヤが行ワイヤと接触し、回路が完成します。キーボードコントローラはこの閉回路を検知し、キー押下として登録します。 + +マイクロコントローラはファームウェアを介してセットアップされ、論理1を一度に1つずつ列に送信し、行から一度に全てを読み取ります - このプロセスはマトリックススキャンと呼ばれます。マトリックスはデフォルトでは電流の通過を許可しないたくさんの開いたスイッチです - ファームウェアはキーが押されていないものとしてこれを読み取ります。1つのキーを押すとすぐに、キースイッチが接続されている列から来ていた論理1がスイッチを通過して対応する行に渡されます - 以下の 2x2 の例を確認してください: + + Column 0 being scanned Column 1 being scanned + x x + col0 col1 col0 col1 + | | | | + row0 ---(key0)---(key1) row0 ---(key0)---(key1) + | | | | + row1 ---(key2)---(key3) row1 ---(key2)---(key3) + +`x` は関連付けられた列と行の値が1であるか、HIGH であることを表します。ここでは、キーが押されていないことが分かります。そのため `x` を取得する行はありません。1つのキースイッチの二つの接点はそのスイッチのある行と列にそれぞれ接続されていることに注意してください。 + +`key0` を押すと、`col0` は `row0` に接続されるため、ファームウェアがその行に対して受け取る値は `0b01` です (ここで `0b` はこれがビット値であることを意味します。つまり次の数字は全てビット(0または1)であり、その列のキーを表します)。この表記を使用して、キースイッチが押されたことを示し、列と行が接続されていることを示します: + + Column 0 being scanned Column 1 being scanned + x x + col0 col1 col0 col1 + | | | | + x row0 ---(-+-0)---(key1) row0 ---(-+-0)---(key1) + | | | | + row1 ---(key2)---(key3) row1 ---(key2)---(key3) + +`row0` には `x` があるため、値が1であることがわかります。全体として、`key0` が押された時にファームウェアが受信するデータは、 + + col0: 0b01 + col1: 0b00 + │└row0 + └row1 + +一度に複数のキーを押し始めると問題が発生します。マトリックスをもう一度見ると、かなり明白になっているはずです: + + Column 0 being scanned Column 1 being scanned + x x + col0 col1 col0 col1 + | | | | + x row0 ---(-+-0)---(-+-1) x row0 ---(-+-0)---(-+-1) + | | | | + x row1 ---(key2)---(-+-3) x row1 ---(key2)---(-+-3) + + Remember that this ^ is still connected to row1 + +これから取得されるデータは以下の通りです: + + col0: 0b11 + col1: 0b11 + │└row0 + └row1 + +4つ全てではなく、3つのキーしか押されていないため、これは正確ではありません。この挙動はゴーストと呼ばれ、このような奇妙なシナリオでのみ発生しますが、より大きなキーボードではより一般的です。これを回避する方法は、キースイッチの後に、行に接続する前にダイオードを配置することです。ダイオードは、電流が一方向にのみ流れるようにします。これにより、前の例で他の列と行がアクティブにならないようにします。ダイオードマトリックスをこのように表します; + + Column 0 being scanned Column 1 being scanned + x x + col0 col1 col0 col1 + │ │ | │ + (key0) (key1) (key0) (key1) + ! │ ! │ ! | ! │ + row0 ─────┴────────┘ │ row0 ─────┴────────┘ │ + │ │ | │ + (key2) (key3) (key2) (key3) + ! ! ! ! + row1 ─────┴────────┘ row1 ─────┴────────┘ + +実際の用途では、ダイオードの黒い線が行に面するように、キースイッチから離れるように配置されます - この場合の `!` はダイオードで、隙間は黒い線を表します。これを覚える良い方法は、以下のシンボルを考えることです: `>|` + +次に、3つのキーを押して、ゴーストシナリオとなるものを実施します: + + Column 0 being scanned Column 1 being scanned + x x + col0 col1 col0 col1 + │ │ │ │ + (┌─┤0) (┌─┤1) (┌─┤0) (┌─┤1) + ! │ ! │ ! │ ! │ + x row0 ─────┴────────┘ │ x row0 ─────┴────────┘ │ + │ │ │ │ + (key2) (┌─┘3) (key2) (┌─┘3) + ! ! ! ! + row1 ─────┴────────┘ x row1 ─────┴────────┘ + +全てが期待通りに動きます!これにより、以下のデータが取得されます: + + col0: 0b01 + col1: 0b11 + │└row0 + └row1 + +ファームウェアはこの正しいデータを使って、何をすべきかを、最終的には OS に送信する必要のある信号を検出できます。 + +参考文献: +- [Wikipedia の記事](https://en.wikipedia.org/wiki/Keyboard_matrix_circuit) +- [Deskthority の記事](https://deskthority.net/wiki/Keyboard_matrix) +- [Dave Dribin による Keyboard Matrix Help (2000)](https://www.dribin.org/dave/keyboard/one_html/) +- [PCBheaven による How Key Matrices Works](http://pcbheaven.com/wikipages/How_Key_Matrices_Works/) (アニメーションの例) +- [キーボードの仕組み - QMK ドキュメント](how_keyboards_work.md) From 7ff85e241b8f30c94441316bdd1a0f8594fe839d Mon Sep 17 00:00:00 2001 From: umi <57262844+umi-umi@users.noreply.github.com> Date: Wed, 29 Jul 2020 19:00:26 +0900 Subject: [PATCH 472/930] [Docs] Japanese translation of docs/how_keyboards_work.md (#9683) * add how_keyboards_work.md translation * update based on comment * update based on comment * update based on comment --- docs/ja/how_keyboards_work.md | 74 +++++++++++++++++++++++++++++++++++ 1 file changed, 74 insertions(+) create mode 100644 docs/ja/how_keyboards_work.md diff --git a/docs/ja/how_keyboards_work.md b/docs/ja/how_keyboards_work.md new file mode 100644 index 000000000000..5c54e5ff73cd --- /dev/null +++ b/docs/ja/how_keyboards_work.md @@ -0,0 +1,74 @@ +# キーが登録され、コンピュータで解釈される仕組み + + + +このファイルでは、USB を介してキーボードがどのように動作するかの概念を学習できます。ファームウェアを直接変更することで何が期待できるかをより良く理解することができます。 + +## 概略図 + +特定のキーを1つ入力するたびに、このような一連のアクションが発生します: + +```text ++------+ +-----+ +----------+ +----------+ +----+ +| User |-------->| Key |------>| Firmware |----->| USB wire |---->| OS | ++------+ +-----+ +----------+ +----------+ +----+ +``` + +この図は何が起こっているかを非常に単純に示したものです。詳細については次のセクションで説明します。 + +## 1. キーを押す + +キーを押すたびに、キーボードのファームウェアはこのイベントを登録することができます。 +キーが押され、保持され、放された時に登録することができます。 + +これは通常キー押下の定期的な走査で発生します。多くの場合、キーの機械的な応答時間、キー押下情報を転送するプロトコル(ここでは USB HID)、あるいは使用されるソフトウェアによって、この速度は制限されます。 + +## 2. ファームウェアが送信するもの + +[HID 仕様](https://www.usb.org/sites/default/files/documents/hut1_12v2.pdf)では、適切に認識されるためにキーボードが USB 経由で実際に送信できるものを規定しています。これには、`0x00` から `0xE7` までの単純な数字であるスキャンコードの定義済リストが含まれます。ファームウェアはスキャンコードをキーボードのそれぞれのキーに割り当てます。 + +ファームウェアは実際の文字を送信せず、スキャンコードだけを送信します。 +従って、ファームウェアを変更することで、特定のキーにたいして USB を介してどのスキャンコードが送信されるかだけを変更することができます。 + +## 3. イベント入力やカーネルが行うこと + +*スキャンコード*は、[マスターブランチの 60-keyboard.hwdb](https://github.com/systemd/systemd/blob/master/hwdb.d/60-keyboard.hwdb) キーボードに依存する*キーコード*にマップされます。このマッピングが無いと、オペレーティングシステムは有効なキーコードを受信せず、キー押下で何も有用なことができません。 + +## 4. オペレーティングシステムがすること + +キーコードがオペレーティングシステムに到達すると、ソフトウェアの一部はキーボードのレイアウトによって、実際の文字と照合しなければなりません。例えば、レイアウトが QWERTY に設定されている場合、照合テーブルの例は以下の通りです: + +| キーコード | 文字 | +|---------|-----------| +| 0x04 | a/A | +| 0x05 | b/B | +| 0x06 | c/C | +| ... | ... | +| 0x1C | y/Y | +| 0x1D | z/Z | +| ... | ... | + +## 説明をファームウェアに戻して + +(独自のものを作成していない限り)レイアウトは一般的に固定されているため、ファームウェアは実際には作業を簡単するためレイアウト名で直接キーコードを記述できます。これが、`KC_A` が実際に QWERTY で `0x04` を表す場合に行われることです。完全なリストは[キーコード](ja/keycodes.md)にあります。 + +## 送信できる文字のリスト + +ショートカットを別として、限られたキーコードのセットが限られたレイアウトにマップされていることは、**指定されたキーに割り当てることができる文字のリストは、レイアウト内に存在するものだけである**ことを意味します。 + +例えば、QWERTY US レイアウトがあり、1つのキーを `€` (ユーロ通貨記号)を生成するように割り当てたい場合、そうすることができないことを意味します。なぜなら、QWERTY US レイアウトはそのようなマッピングを持たないためです。QWERTY UK レイアウト、あるいは QWERTY US International を使うことでそれを修正することができます。 + +全ての Unicode を含むキーボードレイアウトがなぜ考案されていないのか疑問に思うかもしれません。USB を介して利用可能なキーコードの数の制限により、このようなことは許可されません。 + +## (おそらく) Unicode 文字を入力する方法 + +ファームウェアに *一連のキー* を送信させて、目的のオペレーティングシステムの[ソフトウェア Unicode インプットメソッド](https://en.wikipedia.org/wiki/Unicode_input#Hexadecimal_input)を使うことができます。このようにして、OS で定義されたレイアウトとは無関係に文字を効率的に入力することができます。 + +ただし、以下のような複数の欠点があります: + +- 一度に、一つの特定の OS に縛られます (OS を変更する時に再コンパイルする必要があります); +- 特定の OS では、全てのソフトウェアが動作するわけではありません; +- 一部のシステムでは Unicode のサブセットに制限されます。 From a57b3131534a5b4107cff94e18475019be34c9af Mon Sep 17 00:00:00 2001 From: umi <57262844+umi-umi@users.noreply.github.com> Date: Wed, 29 Jul 2020 19:01:42 +0900 Subject: [PATCH 473/930] [Docs] Japanese translation of docs/mod_tap.md (#9753) * add mod_tap.md translation * update based on comment * update based on comment --- docs/ja/mod_tap.md | 59 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 59 insertions(+) create mode 100644 docs/ja/mod_tap.md diff --git a/docs/ja/mod_tap.md b/docs/ja/mod_tap.md new file mode 100644 index 000000000000..ca74ba2ebf00 --- /dev/null +++ b/docs/ja/mod_tap.md @@ -0,0 +1,59 @@ +# モッドタップ + + + +モッドタップキー `MT(mod, kc)` は、押したままの時にモディファイアのように機能し、タップされた時に通常のキーのように振舞います。別の言い方をすると、タップした時に Escape を送信しますが、押したままの時に Control あるいは Shift キーとして機能するキーを持つことができます。 + +このキーコードと `OSM()` が受け付けるモディファイアは、`KC_` ではなく、`MOD_` の接頭辞が付いています: + +| モディファイア | 説明 | +|----------------|----------------------------------------------| +| `MOD_LCTL` | 左 Control | +| `MOD_LSFT` | 左 Shift | +| `MOD_LALT` | 左 Alt | +| `MOD_LGUI` | 左 GUI (Windows/Command/Meta キー) | +| `MOD_RCTL` | 右 Control | +| `MOD_RSFT` | 右 Shift | +| `MOD_RALT` | 右 Alt (AltGr) | +| `MOD_RGUI` | 右 GUI (Windows/Command/Meta キー) | +| `MOD_HYPR` | Hyper (左 Control、左 Shift、左 Alt、左 GUI) | +| `MOD_MEH` | Meh (左 Control、左 Shift、左 Alt) | + +以下のようにそれらを OR することで、これらを組み合わせることができます: + +```c +MT(MOD_LCTL | MOD_LSFT, KC_ESC) +``` + +押したままの時にこのキーは左 Control および左 Shift をアクティブにし、タップされた時に Escape を送信します。 + +便利なように、QMK はキーマップで一般的な組み合わせをよりコンパクトにするためのモッドタップショートカットを含んでいます: + +| キー | エイリアス | 説明 | +|--------------|-----------------------------|-------------------------------------------------------------| +| `LCTL_T(kc)` | `CTL_T(kc)` | 押したままの場合は左 Control、タップした場合は `kc` | +| `LSFT_T(kc)` | `SFT_T(kc)` | 押したままの場合は左 Shift、タップした場合は `kc` | +| `LALT_T(kc)` | `LOPT_T(kc)`, `ALT_T(kc)`, `OPT_T(kc)` | 押したままの場合は左 Alt、タップした場合は `kc` | +| `LGUI_T(kc)` | `LCMD_T(kc)`, `LWIN_T(kc)`, `GUI_T(kc)`, `CMD_T(kc)`, `WIN_T(kc)` | 押したままの場合は左 GUI、タップした場合は `kc` | +| `RCTL_T(kc)` | | 押したままの場合は右 Control、タップした場合は `kc` | +| `RSFT_T(kc)` | | 押したままの場合は右 Shift、タップした場合は `kc` | +| `RALT_T(kc)` | `ROPT_T(kc)`, `ALGR_T(kc)` | 押したままの場合は右 Alt、タップした場合は `kc` | +| `RGUI_T(kc)` | `RCMD_T(kc)`, `RWIN_T(kc)` | 押したままの場合は右 GUI、タップした場合は `kc` | +| `SGUI_T(kc)` | `SCMD_T(kc)`, `SWIN_T(kc)` | 押したままの場合は左 Shift と左 GUI、タップした場合は `kc` | +| `LCA_T(kc)` | | 押したままの場合は左 Control と左 Alt、タップした場合は `kc` | +| `LCAG_T(kc)` | | 押したままの場合は左 Control、左 Alt と左 GUI、タップした場合は `kc` | +| `RCAG_T(kc)` | | 押したままの場合は右 Control、右 Alt と右 GUI、タップした場合は `kc` | +| `C_S_T(kc)` | | 押したままの場合は左 Control と左 Shift、タップした場合は `kc` | +| `MEH_T(kc)` | | 押したままの場合は左 Control、左 Shift と左 Alt、タップした場合は `kc` | +| `HYPR_T(kc)` | `ALL_T(kc)` | 押したままの場合は左 Control、左 Shift、左 Alt と左 GUI、タップした場合は `kc` - より詳しくは[ここ](http://brettterpstra.com/2012/12/08/a-useful-caps-lock-key/)を見てください | + +## 注意事項 + +残念ながら、キーコードで指定されたモディファイアは無視されるため、これらのキーコードはモッドタップまたはレイヤータップで使うことができません。 + +さらに、Windows でリモートデスクトップ接続を使う場合に、問題が発生する場合があります。これらのコードはシフトを非常に高速に送信するため、リモートデスクトップはコードを見逃すかもしれません。 + +これを修正するには、リモートデスクトップ接続を開き、「オプションの表示」を開き、「ローカル リソース」タブを開きます。キーボードセクションで、ドロップダウンを「このコンピューター」に変更します。これにより問題が修正され、キャラクタが正しく動作するようになります。 From ea1c7f185685b2b70dd9930a08b0935ed074984b Mon Sep 17 00:00:00 2001 From: umi <57262844+umi-umi@users.noreply.github.com> Date: Wed, 29 Jul 2020 19:02:37 +0900 Subject: [PATCH 474/930] [Docs] Japanese translation of docs/one_shot_keys.md (#9754) * add one_shot_keys.md translation * update based on comment * update based on comment --- docs/ja/one_shot_keys.md | 107 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 107 insertions(+) create mode 100644 docs/ja/one_shot_keys.md diff --git a/docs/ja/one_shot_keys.md b/docs/ja/one_shot_keys.md new file mode 100644 index 000000000000..61cf31beffd9 --- /dev/null +++ b/docs/ja/one_shot_keys.md @@ -0,0 +1,107 @@ +# ワンショットキー + + + +ワンショットキーは次のキーが押されるまでアクティブのままになり、そのあと放されるキーです。これにより一度に1つ以上のキーを押すことなく、キーボードの組み合わせを入力することができます。これらのキーは通常「スティッキーキー」あるいは「デッドキー」と呼ばれます。 + +例えば、キーを `OSM(MOD_LSFT)` と定義する場合、最初にシフトを押して放し、続いて A を押して放すことで、大文字の A キャラクタを入力することができます。コンピュータには、シフトが押された瞬間にシフトが押し続けられ、A が放された後ですぐにシフトキーが放されるように見えます。 + +ワンショットキーは通常のモディファイアのようにも動作します。ワンショットキーを押しながら他のキーを入力すると、キーを放した直後にワンショットキーが解除されます。 + +さらに、短時間でキーを5回押すと、そのキーをロックします。これはワンショットモディファイアとワンショットレイヤーに適用され、`ONESHOT_TAP_TOGGLE` 定義によって制御されます。 + +`config.h` でこれらを定義することでワンショットキーの挙動を制御することができます: + +```c +#define ONESHOT_TAP_TOGGLE 5 /* この回数をタップすると、もう一度タップするまでキーが押されたままになります。*/ +#define ONESHOT_TIMEOUT 5000 /* ワンショットキーが解除されるまでの時間 (ms) */ +``` + +* `OSM(mod)` - *mod*を一時的に押し続けます。[モッドタップ](ja/mod_tap.md)で示したように、`KC_*` コードでは無く、`MOD_*` キーコードを使わなければなりません。 +* `OSL(layer)` - 一時的に*レイヤー*に切り替えます。 + +ワンショットキーをマクロあるいはタップダンスルーチンの一部として有効にしたい場合があります。 + +ワンショットレイヤーについては、キーを押した時に `set_oneshot_layer(LAYER, ONESHOT_START)` を呼び出し、キーを放した時に `clear_oneshot_layer_state(ONESHOT_OTHER_KEY_PRESSED)` を呼び出す必要があります。ワンショットをキャンセルする場合は、`reset_oneshot_layer()` を呼び出してください。 + +ワンショットモッドについては、設定するためには `set_oneshot_mods(MOD)` を呼び出し、キャンセルするためには `clear_oneshot_mods()` を呼び出す必要があります。 + +!> リモートデスクトップ接続で OSM 変換に問題がある場合は、設定を開いて「ローカル リソース」タブに移動し、キーボードセクションでドロップダウンを「このコンピューター」に変更することで修正することができます。これにより問題が修正され、OSM がリモートデスクトップ上で適切に動作するようになります。 + +## コールバック + +ワンショットキーを押す時にカスタムロジックを実行したい場合、実装を選択できる幾つかのコールバックがあります。例えば、LED を点滅させたり、音を鳴らしたりして、ワンショットキーの変化を示すことができます。 + +`OSM(mod)` のためのコールバックがあります。ワンショット修飾キーの状態が変更されるたびに呼び出されます: オンに切り替わる時だけでなく、オフに切り替わる時にも呼び出されます。以下のように使うことができます: + +```c +void oneshot_mods_changed_user(uint8_t mods) { + if (mods & MOD_MASK_SHIFT) { + println("Oneshot mods SHIFT"); + } + if (mods & MOD_MASK_CTRL) { + println("Oneshot mods CTRL"); + } + if (mods & MOD_MASK_ALT) { + println("Oneshot mods ALT"); + } + if (mods & MOD_MASK_GUI) { + println("Oneshot mods GUI"); + } + if (!mods) { + println("Oneshot mods off"); + } +} +``` + +`mods` 引数は変更後のアクティブな mod が含まれるため、現在の状態が反映されます。 + +(`config.h` に `#define ONESHOT_TAP_TOGGLE 2` を追加して) ワンショットタップトグルを使う場合、指定された回数だけ修飾キーを押してロックすることができます。そのためのコールバックもあります: + +```c +void oneshot_locked_mods_changed_user(uint8_t mods) { + if (mods & MOD_MASK_SHIFT) { + println("Oneshot locked mods SHIFT"); + } + if (mods & MOD_MASK_CTRL) { + println("Oneshot locked mods CTRL"); + } + if (mods & MOD_MASK_ALT) { + println("Oneshot locked mods ALT"); + } + if (mods & MOD_MASK_GUI) { + println("Oneshot locked mods GUI"); + } + if (!mods) { + println("Oneshot locked mods off"); + } +} +``` + +最後に、`OSL(layer)` ワンショットキーのためのコールバックもあります: + +```c +void oneshot_layer_changed_user(uint8_t layer) { + if (layer == 1) { + println("Oneshot layer 1 on"); + } + if (!layer) { + println("Oneshot layer off"); + } +} +``` + +いずれかのワンショットレイヤーがオフの場合、`layer` は 0 になります。ワンショットレイヤーの変更では無く、レイヤーの変更で何かを実行したい場合は、`layer_state_set_user` は使用するのに良いコールバックです。 + +独自のキーボードを作成している場合、`_kb` と同等の機能もあります: + +```c +void oneshot_locked_mods_changed_kb(uint8_t mods); +void oneshot_mods_changed_kb(uint8_t mods); +void oneshot_layer_changed_kb(uint8_t layer); +``` + +他のコールバックと同様に、更にカスタマイズを可能にするために `_user` バージョンを呼ぶようにしてください。 From 758bf2070687916e6e653d543974cdd2f753fc0a Mon Sep 17 00:00:00 2001 From: Frothy Date: Wed, 29 Jul 2020 14:32:48 -0300 Subject: [PATCH 475/930] Added Via-enabled keymap for Physix (#9825) * Added Via-enabled keymap for Physix * Update keyboards/hineybush/physix/keymaps/via/keymap.c --- .../hineybush/physix/keymaps/via/keymap.c | 48 +++++++++++++++++++ .../hineybush/physix/keymaps/via/readme.md | 1 + .../hineybush/physix/keymaps/via/rules.mk | 1 + 3 files changed, 50 insertions(+) create mode 100644 keyboards/hineybush/physix/keymaps/via/keymap.c create mode 100644 keyboards/hineybush/physix/keymaps/via/readme.md create mode 100644 keyboards/hineybush/physix/keymaps/via/rules.mk diff --git a/keyboards/hineybush/physix/keymaps/via/keymap.c b/keyboards/hineybush/physix/keymaps/via/keymap.c new file mode 100644 index 000000000000..884147f14123 --- /dev/null +++ b/keyboards/hineybush/physix/keymaps/via/keymap.c @@ -0,0 +1,48 @@ +/* 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_split_bksp_275_rspace( + 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_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(1), KC_SPC, KC_RALT, KC_RGUI, KC_LEFT, KC_DOWN, KC_RGHT + ), + [1] = LAYOUT_split_bksp_275_rspace( + 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_INS, + KC_TRNS, RGB_TOG, RGB_MOD, 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, BL_BRTG, BL_TOGG, BL_INC, BL_DEC, 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 + ), + [2] = LAYOUT_split_bksp_275_rspace( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 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_split_bksp_275_rspace( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 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/via/readme.md b/keyboards/hineybush/physix/keymaps/via/readme.md new file mode 100644 index 000000000000..a976ffd0c9b3 --- /dev/null +++ b/keyboards/hineybush/physix/keymaps/via/readme.md @@ -0,0 +1 @@ +# A VIA-enabled keymap for physix diff --git a/keyboards/hineybush/physix/keymaps/via/rules.mk b/keyboards/hineybush/physix/keymaps/via/rules.mk new file mode 100644 index 000000000000..036bd6d1c3ec --- /dev/null +++ b/keyboards/hineybush/physix/keymaps/via/rules.mk @@ -0,0 +1 @@ +VIA_ENABLE = yes \ No newline at end of file From 0091897cc88caa0f7241def0e5d44539162cf634 Mon Sep 17 00:00:00 2001 From: kaylanm <1063516+kaylanm@users.noreply.github.com> Date: Wed, 29 Jul 2020 13:42:40 -0400 Subject: [PATCH 476/930] Add via configuration for adelheid. (#9830) * Add via configuration for adelheid. * Reformat adelheid VIA keymap. --- keyboards/adelheid/keymaps/via/keymap.c | 54 +++++++++++++++++++++++++ keyboards/adelheid/keymaps/via/rules.mk | 2 + 2 files changed, 56 insertions(+) create mode 100644 keyboards/adelheid/keymaps/via/keymap.c create mode 100644 keyboards/adelheid/keymaps/via/rules.mk diff --git a/keyboards/adelheid/keymaps/via/keymap.c b/keyboards/adelheid/keymaps/via/keymap.c new file mode 100644 index 000000000000..4341dc543000 --- /dev/null +++ b/keyboards/adelheid/keymaps/via/keymap.c @@ -0,0 +1,54 @@ +/* Copyright 2020 floookay + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public 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_F13, KC_PGUP, + 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_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_END, + 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_LCTL, KC_LALT, KC_SPC, MO(1), KC_SPC, KC_RALT, KC_LEFT, KC_DOWN, KC_RGHT + ), + + [1] = LAYOUT( + KC_SLEP, 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_PSCR, KC_VOLU, + _______, KC_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, BL_STEP, + _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_PGUP, KC_END, _______, _______, _______, KC_DEL, KC_MUTE, + KC_LGUI, _______, _______, _______, _______, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, _______, _______, KC_MPLY, KC_VOLD, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MPLY, + _______, _______, _______, _______, _______, _______, KC_MPRV, KC_MSTP, KC_MNXT + ), + + [2] = LAYOUT( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + + [3] = LAYOUT( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______ + ) +}; diff --git a/keyboards/adelheid/keymaps/via/rules.mk b/keyboards/adelheid/keymaps/via/rules.mk new file mode 100644 index 000000000000..36b7ba9cbc98 --- /dev/null +++ b/keyboards/adelheid/keymaps/via/rules.mk @@ -0,0 +1,2 @@ +VIA_ENABLE = yes +LTO_ENABLE = yes From b3e7a4e798080563d64527e3fe9d6475ba375d94 Mon Sep 17 00:00:00 2001 From: Yu Hao Wong <54234367+wongyuhao@users.noreply.github.com> Date: Thu, 30 Jul 2020 06:15:53 +0800 Subject: [PATCH 477/930] Added Via keymap to Spaceman 2% Milk (#9484) * added via support to spaceman 2% milk * changed kc trns in layers 1-3 * changed vendor and product ID per creator suggestion --- keyboards/spaceman/2_milk/config.h | 4 ++-- .../spaceman/2_milk/keymaps/via/keymap.c | 20 +++++++++++++++++++ .../spaceman/2_milk/keymaps/via/readme.md | 2 ++ .../spaceman/2_milk/keymaps/via/rules.mk | 2 ++ 4 files changed, 26 insertions(+), 2 deletions(-) create mode 100644 keyboards/spaceman/2_milk/keymaps/via/keymap.c create mode 100644 keyboards/spaceman/2_milk/keymaps/via/readme.md create mode 100644 keyboards/spaceman/2_milk/keymaps/via/rules.mk diff --git a/keyboards/spaceman/2_milk/config.h b/keyboards/spaceman/2_milk/config.h index 49211535d02a..e30243ae1e85 100644 --- a/keyboards/spaceman/2_milk/config.h +++ b/keyboards/spaceman/2_milk/config.h @@ -17,8 +17,8 @@ #include "config_common.h" /* USB Device descriptor parameter */ -#define VENDOR_ID 0xFEED -#define PRODUCT_ID 0xB195 +#define VENDOR_ID 0x5342 // "SB" +#define PRODUCT_ID 0x3225 // "2%" #define DEVICE_VER 0x0001 #define MANUFACTURER Spaceman #define PRODUCT 2% Milk diff --git a/keyboards/spaceman/2_milk/keymaps/via/keymap.c b/keyboards/spaceman/2_milk/keymaps/via/keymap.c new file mode 100644 index 000000000000..c848d9cb5aa2 --- /dev/null +++ b/keyboards/spaceman/2_milk/keymaps/via/keymap.c @@ -0,0 +1,20 @@ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT( + KC_Z, + KC_X + ), + [1] = LAYOUT( + _______, + _______ + ), + [2] = LAYOUT( + _______, + _______ + ), + [3] = LAYOUT( + _______, + _______ + ) +}; diff --git a/keyboards/spaceman/2_milk/keymaps/via/readme.md b/keyboards/spaceman/2_milk/keymaps/via/readme.md new file mode 100644 index 000000000000..4482bce34a0b --- /dev/null +++ b/keyboards/spaceman/2_milk/keymaps/via/readme.md @@ -0,0 +1,2 @@ +# Default keymap for 2% Milk +![Picture](https://i.imgur.com/9PsZ6wa.png) diff --git a/keyboards/spaceman/2_milk/keymaps/via/rules.mk b/keyboards/spaceman/2_milk/keymaps/via/rules.mk new file mode 100644 index 000000000000..43061db1dd46 --- /dev/null +++ b/keyboards/spaceman/2_milk/keymaps/via/rules.mk @@ -0,0 +1,2 @@ +VIA_ENABLE = yes +LTO_ENABLE = yes \ No newline at end of file From de7da0b48f0e3c2fe6e8be914c871f37cd95b1bb Mon Sep 17 00:00:00 2001 From: umi <57262844+umi-umi@users.noreply.github.com> Date: Thu, 30 Jul 2020 09:01:34 +0900 Subject: [PATCH 478/930] [Docs] Japanese translation of docs/other_eclipse.md (#9755) * add other_eclipse.md translation * update based on comment * update based on comment --- docs/ja/other_eclipse.md | 93 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 93 insertions(+) create mode 100644 docs/ja/other_eclipse.md diff --git a/docs/ja/other_eclipse.md b/docs/ja/other_eclipse.md new file mode 100644 index 000000000000..bb6902253bcd --- /dev/null +++ b/docs/ja/other_eclipse.md @@ -0,0 +1,93 @@ +# QMK 開発のための Eclipse セットアップ + + + +[Eclipse][1]は Java 開発のために広く使われているオープンソースの [統合開発環境](https://en.wikipedia.org/wiki/Integrated_development_environment) (IDE) ですが、他の言語および用途のためにカスタマイズできる拡張可能なプラグインシステムがあります。 + +Eclipse のような IDE の使用は、プレーンテキストエディタの使用よりも多くの利点をもたらします。例えば、次のような利点です。 +* インテリジェントなコード補完 +* コード内の便利なナビゲーション +* リファクタリングツール +* 自動ビルド (コマンドラインは不要) +* Git 用の GUI +* 静的なコード解析 +* デバッグ、コードフォーマット、呼び出し階層の表示などの多くのツール。 + +このページの目的は、AVR ソフトウェアの開発および QMK コードベースで作業するために、Eclipse をセットアップする方法を文章化することです。 + +このセットアップは現時点では Ubuntu 16.04 でのみテストされていることに注意してください。 + +# 前提条件 +## ビルド環境 +始める前に、チュートリアルの[セットアップ](ja/newbs_getting_started.md)のセクションに従う必要があります。特に、[`qmk compile` コマンド](ja/newbs_building_firmware.md#build-your-firmware)でファームウェアをビルドできなければなりません。 + +## Java +Eclipse は Java アプリケーションであるため、実行するには Java 8 以降をインストールする必要があります。JRE または JDK を選択できますが、Java 開発を行う場合は後者が役に立ちます。 + +# Eclipse とプラグインのインストール +Eclipse は用途に応じて[いくつかのフレーバー](http://www.eclipse.org/downloads/eclipse-packages/)で提供されます。AVR スタックを構成するパッケージは無いため、Eclipse CDT (C/C++ 開発ツール)から始め、必要なプラグインをインストールする必要があります。 + +## Eclipse CDT のダウンロードとインストール +システムに既に Eclipse CDT がある場合は、この手順をスキップできます。ただし、より良いサポートのために最新の状態に保つことをお勧めします。 + +別の Eclipse パッケージをインストールしている場合は、通常は[その上に CDT プラグインをインストール](https://eclipse.org/cdt/downloads.php)することができます。しかし、軽くして、作業中のプロジェクトに必要のないツールが乱雑にならないように、ゼロから再インストールすることをお勧めします。 + +インストールは非常に簡単です: [5 Steps to install Eclipse](https://eclipse.org/downloads/eclipse-packages/?show_instructions=TRUE) に従い、ステップ3で **Eclipse IDE for C/C++ Developers** を選択します。 + +あるいは、直接 [Eclipse IDE for C/C++ Developers をダウンロード](http://www.eclipse.org/downloads/eclipse-packages/)([現在のバージョンへの直接リンク](http://www.eclipse.org/downloads/packages/eclipse-ide-cc-developers/neonr))し、選択した場所にパッケージを解凍することもできます (これにより `eclipse` フォルダが作成されます)。 + +## 最初の起動 +インストールが完了したら、Launch ボタンをクリックします。(パッケージを手動で解凍した場合は、Eclipse をインストールしたフォルダを開き、`eclipse` 実行可能ファイルをダブルクリックします) + +Workspace 選択で入力を促された場合は、Eclipse メタデータと通常のプロジェクトを保持するディレクトリを選択します。**`qmk_firmware` ディレクトリを選択しないでください**。これはプロジェクトディレクトリになります。代わりに親フォルダを選択するか、(できれば空の)他のフォルダを選択します(まだ使用していない場合は、デフォルトで問題ありません)。 + +開始したら、右上の Workbench ボタンをクリックし、workbench ビューに切り替えます (下部に開始時のようこそ画面をスキップするためのチェックボックスもあります)。 + +## 必要なプラグインをインストール +注意: プラグインをインストールするごとに、Eclipse を再起動する必要はありません。全てのプラグインがインストールされたら単に1回再起動します。 + +### [The AVR Plugin](http://avr-eclipse.sourceforge.net/) +これは最も重要なプラグインで、Eclipse が AVR C コードを_理解_できるようになります。[更新サイトを使うための指示](http://avr-eclipse.sourceforge.net/wiki/index.php/Plugin_Download#Update_Site)に従い、未署名コンテンツのセキュリティ警告に同意します。 + +### [ANSI Escape in Console](https://marketplace.eclipse.org/content/ansi-escape-console) +このプラグインは QMK makefile によって生成された色付きビルド出力を適切に表示するために必要です。 + +1. Help > Eclipse Marketplace… を開きます +2. _ANSI Escape in Console_ を検索します +3. プラグインの Install ボタンをクリックします +4. 指示に従い、未署名コンテンツのセキュリティ警告に再度同意します。 + +両方のプラグインがインストールされたら、プロンプトに従って Eclipse を再起動します。 + +# QMK 用の Eclipse の設定 +## プロジェクトのインポート +1. File > New > Makefile Project with Existing Code をクリックします +2. 次の画面で: +* _Existing Code Location_ としてリポジトリをクローンしたディレクトリを選択します。 +* (オプション) プロジェクトに別の名前を付けます¹ 例えば _QMK_ あるいは _Quantum_; +* _AVR-GCC Toolchain_ を選択します; +* 残りをそのままにして、Finish をクリックします + +![Eclipse での QMK のインポート](http://i.imgur.com/oHYR1yW.png) + +3. これでプロジェクトがロードされインデックスされます。左側の _Project Explorer_ から、簡単にファイルを参照できます。 + +¹ カスタム名でプロジェクトをインポートすると問題が発生するかもしれません。正しく動作しない場合は、デフォルトのプロジェクト名 (つまり、ディレクトリの名前、おそらく `qmk_firmware`) のままにしてみてください。 + +## キーボードのビルド +ここで、プロジェクトをクリーンし、選択したキーマップをビルドする make target を設定します。 + +1. 画面の右側で、Make Target タブを選択します +2. フォルダツリーを選択したキーボードまで展開します。例えば、`qmk_firmware/keyboards/ergodox` +3. キーボードフォルダを右クリックして、New… を選択します (あるいはフォルダを選択し、ツリーの上にある New Make Target アイコンをクリックします) +4. ビルド target の名前を選択します。例えば、_clean \_ +5. Make Target: これはコマンドラインからビルドする時に `make` に渡す引数です。target 名がこれらの引数と一致しない場合は、Same as target name のチェックを外し、正しい引数を入力します。例えば、`clean ` +6. 他のオプションはチェックしたままにして、OK をクリックします。これで、選択されたキーボードの下に、make target が表示されます。 +7. (オプション) target ツリーの上にある Hide Empty Folders アイコンボタンを、ビルド target だけが表示されるように切り替えます。 +8. 作成したビルド target をダブルクリックし、ビルドを起動します。 +9. 下部の Console ビューを選択し、実行中のビルドを眺めます。 + +[1]: https://en.wikipedia.org/wiki/Eclipse_(software) From bf05f773bd53f7bed9ae19eba691b7e7546eef71 Mon Sep 17 00:00:00 2001 From: umi <57262844+umi-umi@users.noreply.github.com> Date: Thu, 30 Jul 2020 11:44:23 +0900 Subject: [PATCH 479/930] [Docs] Japanese translation of docs/internals_gpio_control.md (#9751) * add internals_gpio_control.md translation * update based on comment * update based on comment * update based on comment --- docs/ja/internals_gpio_control.md | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 docs/ja/internals_gpio_control.md diff --git a/docs/ja/internals_gpio_control.md b/docs/ja/internals_gpio_control.md new file mode 100644 index 000000000000..5f39e23e4fb2 --- /dev/null +++ b/docs/ja/internals_gpio_control.md @@ -0,0 +1,28 @@ +# GPIO 制御 :id=gpio-control + + + +QMK には、マイクロコントローラに依存しない GPIO 制御抽象レイヤーがあります。これは異なるプラットフォーム間でピン制御に簡単にアクセスできるようにするためのものです。 + +## 関数 :id=functions + +以下の関数は GPIO の基本的な制御を提供し、`quantum/quantum.h` にあります。 + +| 関数 | 説明 | 古い AVR の例 | 古い ChibiOS/ARM の例 | +|------------------------|--------------------------------------------------|-------------------------------------------------|-------------------------------------------------| +| `setPinInput(pin)` | ピンを高インピーダンス(High-Z)の入力として設定 | `DDRB &= ~(1<<2)` | `palSetLineMode(pin, PAL_MODE_INPUT)` | +| `setPinInputHigh(pin)` | ピンを組み込みのプルアップ抵抗付きの入力として設定 | `DDRB &= ~(1<<2); PORTB \|= (1<<2)` | `palSetLineMode(pin, PAL_MODE_INPUT_PULLUP)` | +| `setPinInputLow(pin)` | ピンを組み込みのプルダウン抵抗付きの入力として設定 | N/A (AVR ではサポートされません) | `palSetLineMode(pin, PAL_MODE_INPUT_PULLDOWN)` | +| `setPinOutput(pin)` | ピンを出力として設定 | `DDRB \|= (1<<2)` | `palSetLineMode(pin, PAL_MODE_OUTPUT_PUSHPULL)` | +| `writePinHigh(pin)` | ピンレベルを high に設定 (ピンを出力として設定してあると仮定) | `PORTB \|= (1<<2)` | `palSetLine(pin)` | +| `writePinLow(pin)` | ピンレベルを low に設定 (ピンを出力として設定してあると仮定) | `PORTB &= ~(1<<2)` | `palClearLine(pin)` | +| `writePin(pin, level)` | ピンレベルを設定 (ピンを出力として設定してあると仮定) | `(level) ? PORTB \|= (1<<2) : PORTB &= ~(1<<2)` | `(level) ? palSetLine(pin) : palClearLine(pin)` | +| `readPin(pin)` | ピンのレベルを返す | `_SFR_IO8(pin >> 4) & _BV(pin & 0xF)` | `palReadLine(pin)` | +| `togglePin(pin)` | ピンレベルを反転 (ピンを出力として設定してあると仮定) | `PORTB ^= (1<<2)` | `palToggleLine(pin)` | + +## 高度な設定 :id=advanced-settings + +各マイクロコントローラは GPIO に関して複数の高度な設定を持つことができます。この抽象レイヤーは、アーキテクチャー固有の機能の使用法を制限しません。上級ユーザは、目的のデバイスのデータシートを参照し、必要なライブラリを含めてください。AVR については、標準 avr/io.h ライブラリが使われます; STM32 については ChibiOS [PAL ライブラリ](http://chibios.sourceforge.net/docs3/hal/group___p_a_l.html)が使われます。 From 4f7cd5699e686053620127fefc3b30e237d4aa40 Mon Sep 17 00:00:00 2001 From: tominabox1 Date: Wed, 29 Jul 2020 22:25:20 -0500 Subject: [PATCH 480/930] [Keyboard] Add KPRepublic BM40HSRGB keyboard (#9860) * Initial Commit * Add readme.md's * Add license statements, cleaned up config, readme, and rules. Removed unused features from keymap and added ascii for Adjust layer * Update keyboards/bm40hsrgb/info.json * Update keyboards/bm40hsrgb/config.h --- keyboards/bm40hsrgb/bm40hsrgb.c | 16 +++ keyboards/bm40hsrgb/bm40hsrgb.h | 30 +++++ keyboards/bm40hsrgb/config.h | 55 +++++++++ keyboards/bm40hsrgb/info.json | 60 ++++++++++ keyboards/bm40hsrgb/keymaps/default/keymap.c | 108 ++++++++++++++++++ keyboards/bm40hsrgb/keymaps/default/readme.md | 1 + keyboards/bm40hsrgb/readme.md | 20 ++++ keyboards/bm40hsrgb/rules.mk | 24 ++++ 8 files changed, 314 insertions(+) create mode 100755 keyboards/bm40hsrgb/bm40hsrgb.c create mode 100755 keyboards/bm40hsrgb/bm40hsrgb.h create mode 100755 keyboards/bm40hsrgb/config.h create mode 100644 keyboards/bm40hsrgb/info.json create mode 100755 keyboards/bm40hsrgb/keymaps/default/keymap.c create mode 100644 keyboards/bm40hsrgb/keymaps/default/readme.md create mode 100644 keyboards/bm40hsrgb/readme.md create mode 100755 keyboards/bm40hsrgb/rules.mk diff --git a/keyboards/bm40hsrgb/bm40hsrgb.c b/keyboards/bm40hsrgb/bm40hsrgb.c new file mode 100755 index 000000000000..aa7218b56148 --- /dev/null +++ b/keyboards/bm40hsrgb/bm40hsrgb.c @@ -0,0 +1,16 @@ +/* Copyright 2020 tominabox1 + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#include "bm40hsrgb.h" diff --git a/keyboards/bm40hsrgb/bm40hsrgb.h b/keyboards/bm40hsrgb/bm40hsrgb.h new file mode 100755 index 000000000000..5bde6ec9c51b --- /dev/null +++ b/keyboards/bm40hsrgb/bm40hsrgb.h @@ -0,0 +1,30 @@ +/* Copyright 2020 tominabox1 + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License 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_planck_mit( \ + 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, K303, K304, K305, K307, 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, K303, K304, K305, KC_NO, K307, K308, K309, K310, K311 } \ +} + diff --git a/keyboards/bm40hsrgb/config.h b/keyboards/bm40hsrgb/config.h new file mode 100755 index 000000000000..c2acf30c7c87 --- /dev/null +++ b/keyboards/bm40hsrgb/config.h @@ -0,0 +1,55 @@ +/* Copyright 2020 tominabox1 + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License 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 KPRepublic +#define PRODUCT BM40 Hotswap RGB + +/* key matrix size */ +#define MATRIX_ROWS 4 +#define MATRIX_COLS 12 + +/* key matrix pins */ +#define MATRIX_ROW_PINS { B3, B2, E6, B5 } +#define MATRIX_COL_PINS { B6, C6, B4, D7, D4, D6, C7, F6, F5, F4, F1, F0 } +#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 + +#define RGB_DI_PIN E2 +#ifdef RGB_DI_PIN +#define RGBLIGHT_ANIMATIONS +#define RGBLED_NUM 54 +#define RGBLIGHT_HUE_STEP 8 +#define RGBLIGHT_SAT_STEP 8 +#define RGBLIGHT_VAL_STEP 8 +#endif diff --git a/keyboards/bm40hsrgb/info.json b/keyboards/bm40hsrgb/info.json new file mode 100644 index 000000000000..85fb0d25a102 --- /dev/null +++ b/keyboards/bm40hsrgb/info.json @@ -0,0 +1,60 @@ +{ + "keyboard_name": "BM40HSRGB", + "url": "", + "maintainer": "qmk", + "width": 12, + "height": 4, + "layouts": { + "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} + ] + } + } +} diff --git a/keyboards/bm40hsrgb/keymaps/default/keymap.c b/keyboards/bm40hsrgb/keymaps/default/keymap.c new file mode 100755 index 000000000000..60faf17e1cef --- /dev/null +++ b/keyboards/bm40hsrgb/keymaps/default/keymap.c @@ -0,0 +1,108 @@ +/* Copyright 2020 tominabox1 + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public 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, + _LOWER, + _RAISE, + _ADJUST +}; + +#define LOWER MO(_LOWER) +#define RAISE MO(_RAISE) + +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 | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | BLTog| 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, + 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 , + RGB_TOG, KC_LCTL, KC_LALT, KC_LGUI, LOWER, 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 | | 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 +), + +/* Adjust (Lower + Raise) + * v------------------------RGB CONTROL--------------------v + * ,-----------------------------------------------------------------------------------. + * | | Reset|Debug | RGB |RGBMOD| HUE+ | HUE- | SAT+ | SAT- |BRGTH+|BRGTH-| Del | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | + * `-----------------------------------------------------------------------------------' + */ +[_ADJUST] = LAYOUT_planck_mit( + _______, RESET, DEBUG, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, KC_DEL , + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ +) + +}; + +layer_state_t layer_state_set_user(layer_state_t state) { + return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST); +} + diff --git a/keyboards/bm40hsrgb/keymaps/default/readme.md b/keyboards/bm40hsrgb/keymaps/default/readme.md new file mode 100644 index 000000000000..7fc64a7a0575 --- /dev/null +++ b/keyboards/bm40hsrgb/keymaps/default/readme.md @@ -0,0 +1 @@ +# The default keymap for bm40hsrgb diff --git a/keyboards/bm40hsrgb/readme.md b/keyboards/bm40hsrgb/readme.md new file mode 100644 index 000000000000..766c8e4e8a73 --- /dev/null +++ b/keyboards/bm40hsrgb/readme.md @@ -0,0 +1,20 @@ +# bm40hsrgb + +A 40% mechanical keyboard. + +This firmware was originally taken from a kbfirmware.json and manually converted. You may find the original `.json` files [here](https://drive.google.com/drive/folders/1tlTHQIFcluK2mjZ4UbbKCsdRLgSRSPw6). + + +* Keyboard Maintainer: [tominabox1](https://github.com/tominabox1) +* Hardware Supported: bm40hsrgb PCB +* Hardware Availability: [KPRepublic](https://www.aliexpress.com/item/4001147779116.html) + +Make example for this keyboard (after setting up your build environment): + + make bm40hsrgb:default + +Flashing example for this keyboard: + + make bm40hsrgb: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). diff --git a/keyboards/bm40hsrgb/rules.mk b/keyboards/bm40hsrgb/rules.mk new file mode 100755 index 000000000000..e4203bc4df07 --- /dev/null +++ b/keyboards/bm40hsrgb/rules.mk @@ -0,0 +1,24 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +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 +BLUETOOTH_ENABLE = no # Enable Bluetooth +AUDIO_ENABLE = no # Audio output + +LAYOUTS = planck_mit From 9758bcb28b8d5b7915384844bb8b7c2e3e15c8e0 Mon Sep 17 00:00:00 2001 From: shela Date: Thu, 30 Jul 2020 16:35:45 +0900 Subject: [PATCH 481/930] [Docs] Update Japanese translation of feature_macros.md. (#9767) * Update Japanese translation of feature_macros.md. * Update feature_macros.md fix original document version. --- docs/ja/feature_macros.md | 93 ++++++++++++++++++++------------------- 1 file changed, 48 insertions(+), 45 deletions(-) diff --git a/docs/ja/feature_macros.md b/docs/ja/feature_macros.md index 1204fa8ff2ea..5fbe36726ad3 100644 --- a/docs/ja/feature_macros.md +++ b/docs/ja/feature_macros.md @@ -1,8 +1,8 @@ # マクロ マクロにより、1つのキーを押すだけで複数のキーストロークを送信することができます。QMK にはマクロを定義し使う方法が幾つかあります。これらはなんでもすることができます: よく使うフレーズの入力、コピーペースト、反復的なゲームの動き、あるいはコードを書くことさえ手助けします。 @@ -11,34 +11,34 @@ ## 新しい方法: `SEND_STRING()` と `process_record_user` -単語またはフレーズを入力するキーが欲しい時があります。最も一般的な状況のために `SEND_STRING()` を提供しています。これは文字列(つまり、文字のシーケンス)を入力します。簡単にキーコードに変換することができる全ての ASCII 文字がサポートされています (例えば、`\n\t`)。 +単語またはフレーズを入力するキーが欲しい時があります。最も一般的な状況のために `SEND_STRING()` を提供しています。これは文字列(つまり、文字のシーケンス)を入力します。簡単にキーコードに変換することができる全ての ASCII 文字がサポートされています (例えば、`qmk 123\n\t`)。 以下は2キーのキーボードのための `keymap.c` の例です: ```c enum custom_keycodes { - QMKBEST = SAFE_RANGE, + QMKBEST = SAFE_RANGE, }; bool process_record_user(uint16_t keycode, keyrecord_t *record) { - switch (keycode) { + switch (keycode) { case QMKBEST: - if (record->event.pressed) { - // キーコード QMKBEST が押された時 - SEND_STRING("QMK is the best thing ever!"); - } else { - // キーコード QMKBEST が放された時 - } - break; - - } - return true; + if (record->event.pressed) { + // キーコード QMKBEST が押された時 + SEND_STRING("QMK is the best thing ever!"); + } else { + // キーコード QMKBEST が放された時 + } + break; + } + return true; }; const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [0] = { - {QMKBEST, KC_ESC} - } + [0] = { + {QMKBEST, KC_ESC}, + // ... + }, }; ``` @@ -54,42 +54,45 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ```c enum custom_keycodes { - QMKBEST = SAFE_RANGE, - QMKURL, - MY_OTHER_MACRO + QMKBEST = SAFE_RANGE, + QMKURL, + MY_OTHER_MACRO, }; bool process_record_user(uint16_t keycode, keyrecord_t *record) { - switch (keycode) { + switch (keycode) { case QMKBEST: - if (record->event.pressed) { - // キーコード QMKBEST が押された時 - SEND_STRING("QMK is the best thing ever!"); - } else { - // キーコード QMKBEST が放された時 - } - break; + if (record->event.pressed) { + // キーコード QMKBEST が押された時 + SEND_STRING("QMK is the best thing ever!"); + } else { + // キーコード QMKBEST が放された時 + } + break; + case QMKURL: - if (record->event.pressed) { - // キーコード QMKURL が押された場合 - SEND_STRING("https://qmk.fm/\n"); - } else { - // キーコード QMKURL が放された場合 - } - break; + if (record->event.pressed) { + // キーコード QMKURL が押された場合 + SEND_STRING("https://qmk.fm/\n"); + } else { + // キーコード QMKURL が放された場合 + } + break; + case MY_OTHER_MACRO: - if (record->event.pressed) { - SEND_STRING(SS_LCTL("ac")); // 全てを選択しコピーします - } - break; - } - return true; + if (record->event.pressed) { + SEND_STRING(SS_LCTL("ac")); // 全てを選択しコピーします + } + break; + } + return true; }; const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [0] = { - {MY_CUSTOM_MACRO, MY_OTHER_MACRO} - } + [0] = { + {MY_CUSTOM_MACRO, MY_OTHER_MACRO}, + // ... + }, }; ``` From 08f31f664a9011aa28f8da3de300db475ce3aba7 Mon Sep 17 00:00:00 2001 From: Croktopus <39040552+Croktopus@users.noreply.github.com> Date: Thu, 30 Jul 2020 07:52:54 -0700 Subject: [PATCH 482/930] Timber Wolf - updated via keymap, reduced eeprom writing from backlight code (#9876) Co-authored-by: Ryan --- keyboards/metamechs/timberwolf/config.h | 2 +- .../metamechs/timberwolf/keymaps/via/keymap.c | 10 +++++----- keyboards/metamechs/timberwolf/rules.mk | 10 ++++------ keyboards/metamechs/timberwolf/timberwolf.c | 14 ++++++++------ 4 files changed, 18 insertions(+), 18 deletions(-) diff --git a/keyboards/metamechs/timberwolf/config.h b/keyboards/metamechs/timberwolf/config.h index 8c92e2283d12..c6e0a8fe3d8d 100644 --- a/keyboards/metamechs/timberwolf/config.h +++ b/keyboards/metamechs/timberwolf/config.h @@ -62,7 +62,7 @@ along with this program. If not, see . /* Backlighting code used for caps lock indicator */ #define BACKLIGHT_PIN C6 -#define BACKLIGHT_LEVELS 9 +#define BACKLIGHT_LEVELS 16 /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ // #define LOCKING_SUPPORT_ENABLE diff --git a/keyboards/metamechs/timberwolf/keymaps/via/keymap.c b/keyboards/metamechs/timberwolf/keymaps/via/keymap.c index 57614bd7a7b1..e19d3bbae777 100644 --- a/keyboards/metamechs/timberwolf/keymaps/via/keymap.c +++ b/keyboards/metamechs/timberwolf/keymaps/via/keymap.c @@ -19,10 +19,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Base */ [0] = LAYOUT_all( KC_MUTE,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_PGUP, - RESET ,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_END ,KC_PGDN, - 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 ,KC_PSCR,KC_SLCK, - BL_DEC ,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_DEL ,KC_INS , - KC_F13 ,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_UP ,KC_PENT, + 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_BSPC,KC_DEL ,KC_END ,KC_PGDN, + KC_F14 ,KC_TAB ,KC_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_PSCR, + KC_F15 ,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_DEL ,KC_PENT, + KC_F16 ,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_UP ,KC_PENT, MO(1) ,KC_LCTL,KC_LGUI,KC_LALT ,KC_SPC ,KC_RALT,KC_RGUI,KC_RCTL,KC_LEFT,KC_LEFT,KC_DOWN,KC_RGHT,KC_PENT ), [1] = LAYOUT_all( @@ -31,7 +31,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______ ,_______,_______, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______ ,_______,_______, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, - MO(1) ,_______,_______,_______ ,_______ ,_______,_______,_______,_______,_______,_______,_______,_______ + _______,_______,_______,_______ ,_______ ,_______,_______,_______,_______,_______,_______,_______,_______ ), [2] = LAYOUT_all( _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______ ,_______,_______,_______, diff --git a/keyboards/metamechs/timberwolf/rules.mk b/keyboards/metamechs/timberwolf/rules.mk index 240f806a6d9a..d6da3177415e 100644 --- a/keyboards/metamechs/timberwolf/rules.mk +++ b/keyboards/metamechs/timberwolf/rules.mk @@ -25,11 +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 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 +BLUETOOTH_ENABLE = no # Enable Bluetooth +AUDIO_ENABLE = no # Audio output ENCODER_ENABLE = yes # Enable encoder support +LTO_ENABLE = yes -BACKLIGHT_DRIVER = pwm \ No newline at end of file +BACKLIGHT_DRIVER = pwm diff --git a/keyboards/metamechs/timberwolf/timberwolf.c b/keyboards/metamechs/timberwolf/timberwolf.c index c3fb24924bae..c9a750f45c9e 100644 --- a/keyboards/metamechs/timberwolf/timberwolf.c +++ b/keyboards/metamechs/timberwolf/timberwolf.c @@ -18,10 +18,12 @@ bool led_update_kb(led_t led_state) { bool runDefault = led_update_user(led_state); - if (led_state.caps_lock) { - backlight_enable(); - } else { - backlight_disable(); - } + if(runDefault) { + if (led_state.caps_lock) { + backlight_level_noeeprom(get_backlight_level()); + } else { + backlight_set(0); + } + } return runDefault; -} \ No newline at end of file +} From 83c12a516b3d0c1b603bce28a55bdeba476311df Mon Sep 17 00:00:00 2001 From: NightlyBoards <65656486+NightlyBoards@users.noreply.github.com> Date: Fri, 31 Jul 2020 00:44:29 +0800 Subject: [PATCH 483/930] [keyboard] Add [n]2 support (#9862) * Create Alter folder * Revert "Create Alter folder" This reverts commit 361103b821dbb22957b66cdedb0d11f996def71c. * Add n2 keyboard * Apply suggestions from code review Edited config.h, keymap.c, readme.md, and rules.mk Co-authored-by: Ryan * Update readme.md Co-authored-by: Ryan --- keyboards/nightly_boards/n2/config.h | 93 +++++++++++++++++++ keyboards/nightly_boards/n2/info.json | 12 +++ .../n2/keymaps/default/keymap.c | 23 +++++ keyboards/nightly_boards/n2/n2.c | 18 ++++ keyboards/nightly_boards/n2/n2.h | 27 ++++++ keyboards/nightly_boards/n2/readme.md | 18 ++++ keyboards/nightly_boards/n2/rules.mk | 22 +++++ 7 files changed, 213 insertions(+) create mode 100644 keyboards/nightly_boards/n2/config.h create mode 100644 keyboards/nightly_boards/n2/info.json create mode 100644 keyboards/nightly_boards/n2/keymaps/default/keymap.c create mode 100644 keyboards/nightly_boards/n2/n2.c create mode 100644 keyboards/nightly_boards/n2/n2.h create mode 100644 keyboards/nightly_boards/n2/readme.md create mode 100644 keyboards/nightly_boards/n2/rules.mk diff --git a/keyboards/nightly_boards/n2/config.h b/keyboards/nightly_boards/n2/config.h new file mode 100644 index 000000000000..5ffa15f08485 --- /dev/null +++ b/keyboards/nightly_boards/n2/config.h @@ -0,0 +1,93 @@ +/* +Copyright 2020 Neil Brian Ramirez +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License 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 0x0717 +#define PRODUCT_ID 0x0003 +#define DEVICE_VER 0x0001 +#define MANUFACTURER Neil Brian Ramirez +#define PRODUCT [n]2 + +/* key matrix size */ +#define MATRIX_ROWS 2 +#define MATRIX_COLS 2 + +/* + * 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 { F1, C7 } +#define MATRIX_COL_PINS { F0, C6 } +#define UNUSED_PINS + +/* COL2ROW, ROW2COL*/ +#define DIODE_DIRECTION COL2ROW + +// #define BACKLIGHT_PIN F1 +// #define BACKLIGHT_BREATHING +// #define BACKLIGHT_LEVELS 3 + +#define RGB_DI_PIN D4 +#ifdef RGB_DI_PIN +#define RGBLED_NUM 2 +#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 + + +/* disable these deprecated features by default */ +#define NO_ACTION_MACRO +#define NO_ACTION_FUNCTION diff --git a/keyboards/nightly_boards/n2/info.json b/keyboards/nightly_boards/n2/info.json new file mode 100644 index 000000000000..fe2faa8c7e0f --- /dev/null +++ b/keyboards/nightly_boards/n2/info.json @@ -0,0 +1,12 @@ +{ + "keyboard_name": "[n]2", + "url": "", + "maintainer": "Neil Brian Ramirez", + "width": 1, + "height": 2, + "layouts": { + "LAYOUT": { + "layout": [{"x":0, "y":0}, {"x":0, "y":1}] + } + } +} diff --git a/keyboards/nightly_boards/n2/keymaps/default/keymap.c b/keyboards/nightly_boards/n2/keymaps/default/keymap.c new file mode 100644 index 000000000000..ec60b19a692b --- /dev/null +++ b/keyboards/nightly_boards/n2/keymaps/default/keymap.c @@ -0,0 +1,23 @@ +/* Copyright 2020 Neil Brian Ramirez + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public 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_L, + KC_O + ) +}; diff --git a/keyboards/nightly_boards/n2/n2.c b/keyboards/nightly_boards/n2/n2.c new file mode 100644 index 000000000000..d5daa06a641a --- /dev/null +++ b/keyboards/nightly_boards/n2/n2.c @@ -0,0 +1,18 @@ +/* Copyright 2020 Neil Brian Ramirez + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#include "n2.h" + diff --git a/keyboards/nightly_boards/n2/n2.h b/keyboards/nightly_boards/n2/n2.h new file mode 100644 index 000000000000..10242e41d7b3 --- /dev/null +++ b/keyboards/nightly_boards/n2/n2.h @@ -0,0 +1,27 @@ +/* Copyright 2020 Neil Brian Ramirez + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License 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, \ + K11 \ +) { \ + { K00, KC_NO }, \ + { KC_NO, K11 }, \ +} diff --git a/keyboards/nightly_boards/n2/readme.md b/keyboards/nightly_boards/n2/readme.md new file mode 100644 index 000000000000..fc1ae5a93a1c --- /dev/null +++ b/keyboards/nightly_boards/n2/readme.md @@ -0,0 +1,18 @@ +# [n]2 + +![n2](https://i.imgur.com/iHOxmHil.png) + +A 2 key pcb + +* Keyboard Maintainer: [Neil Brian Ramirez](https://github.com/NightlyBoards) +* Hardware Supported: atmega32u4 + +Make example for this keyboard (after setting up your build environment): + + make nightly_boards/n2:default + +Flashing example for this keyboard: + + make nightly_boards/n2: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). diff --git a/keyboards/nightly_boards/n2/rules.mk b/keyboards/nightly_boards/n2/rules.mk new file mode 100644 index 000000000000..62427c9174aa --- /dev/null +++ b/keyboards/nightly_boards/n2/rules.mk @@ -0,0 +1,22 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +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 = yes # Enable keyboard RGB underglow +BLUETOOTH_ENABLE = no # Enable Bluetooth +AUDIO_ENABLE = no # Audio output From 5d0c38794f6c9b15f457127437360e5fc56e0a97 Mon Sep 17 00:00:00 2001 From: Klesh Wong Date: Fri, 31 Jul 2020 02:08:17 +0800 Subject: [PATCH 484/930] [Keyboard] Add new keyboard ks63 handwired (#9712) * [feature] add ks63 split keyboard * [bugfix] unable to compile and some rows are not working * [feature] add info.json / update keymap * [bugfix] keymap and fix slave not working issue * [bugfix] keyboard unaviable on cold boot / unable to reset the board * [misc] fine tune keymap * [misc] fine tune keymap * ... * ... * ... * [misc] adjust brackets position * [misc] add readme link * [misc] comply to coding convention * [misc] add default keymap readme file * Update keyboards/handwired/ks63/README.md * Update keyboards/handwired/ks63/ks63.h * Update keyboards/handwired/ks63/keymaps/default/keymap.c * Update keyboards/handwired/ks63/keymaps/default/keymap.c * Update keyboards/handwired/ks63/keymaps/default/keymap.c * Update keyboards/handwired/ks63/keymaps/default/keymap.c * Update keyboards/handwired/ks63/keymaps/default/keymap.c * Update keyboards/handwired/ks63/keymaps/default/keymap.c * Update keyboards/handwired/ks63/rules.mk * Update keyboards/handwired/ks63/README.md * Update keyboards/handwired/ks63/keymaps/default/keymap.c * [misc] to lowercase filename * Update keyboards/handwired/ks63/rules.mk * Update keyboards/handwired/ks63/rules.mk * Update keyboards/handwired/ks63/config.h --- keyboards/handwired/ks63/config.h | 81 ++++ keyboards/handwired/ks63/info.json | 345 ++++++++++++++++++ .../handwired/ks63/keymaps/default/keymap.c | 40 ++ .../handwired/ks63/keymaps/default/readme.md | 5 + keyboards/handwired/ks63/ks63.c | 1 + keyboards/handwired/ks63/ks63.h | 23 ++ keyboards/handwired/ks63/readme.md | 15 + keyboards/handwired/ks63/rules.mk | 24 ++ 8 files changed, 534 insertions(+) create mode 100644 keyboards/handwired/ks63/config.h create mode 100644 keyboards/handwired/ks63/info.json create mode 100644 keyboards/handwired/ks63/keymaps/default/keymap.c create mode 100644 keyboards/handwired/ks63/keymaps/default/readme.md create mode 100644 keyboards/handwired/ks63/ks63.c create mode 100644 keyboards/handwired/ks63/ks63.h create mode 100644 keyboards/handwired/ks63/readme.md create mode 100644 keyboards/handwired/ks63/rules.mk diff --git a/keyboards/handwired/ks63/config.h b/keyboards/handwired/ks63/config.h new file mode 100644 index 000000000000..e49d09067839 --- /dev/null +++ b/keyboards/handwired/ks63/config.h @@ -0,0 +1,81 @@ +/* +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" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x3061 +#define DEVICE_VER 0x0001 +#define MANUFACTURER kleshwong +#define PRODUCT ks63 + +/* key matrix size */ +#define MATRIX_ROWS 10 +#define MATRIX_COLS 8 + +/* key matrix pins */ +#define MATRIX_ROW_PINS { B5, B4, E6, D7, C6 } +#define MATRIX_COL_PINS { B6, B2, B3, B1, F7, F6, F5, F4 } + +#define DIODE_DIRECTION COL2ROW + +/* mouse config */ +#define MOUSEKEY_INTERVAL 20 +#define MOUSEKEY_DELAY 0 +#define MOUSEKEY_TIME_TO_MAX 60 +#define MOUSEKEY_MAX_SPEED 7 +#define MOUSEKEY_WHEEL_DELAY 0 + +/* 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 + +/* Enables This makes it easier for fast typists to use dual-function keys */ +#define PERMISSIVE_HOLD + +/* + * 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 MASTER_LEFT +#define USE_SERIAL + diff --git a/keyboards/handwired/ks63/info.json b/keyboards/handwired/ks63/info.json new file mode 100644 index 000000000000..349cfaa677a6 --- /dev/null +++ b/keyboards/handwired/ks63/info.json @@ -0,0 +1,345 @@ +{ + "keyboard_name": "ks60", + "url": "", + "maintainer": "Klesh Wong", + "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": 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 + }, + { + "label": "Space", + "x": 3.75, + "y": 4, + "w": 2.25 + }, + { + "label": "Esc", + "x": 6, + "y": 4, + "w": 1.25 + }, + { + "label": "Space", + "x": 7.25, + "y": 4, + "w": 2.75 + }, + { + "label": "\u2190", + "x": 10, + "y": 4, + "w": 1.25 + }, + { + "label": "\u2193", + "x": 11.25, + "y": 4, + "w": 1.25 + }, + { + "label": "\u2191", + "x": 12.5, + "y": 4, + "w": 1.25 + }, + { + "label": "\u2192", + "x": 13.75, + "y": 4, + "w": 1.25 + } + ] + } + } +} diff --git a/keyboards/handwired/ks63/keymaps/default/keymap.c b/keyboards/handwired/ks63/keymaps/default/keymap.c new file mode 100644 index 000000000000..6727e96f8683 --- /dev/null +++ b/keyboards/handwired/ks63/keymaps/default/keymap.c @@ -0,0 +1,40 @@ +#include QMK_KEYBOARD_H + +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, + LT(3, KC_TAB) , KC_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(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_ENT, + LSFT_T(KC_GRV), KC_Z , KC_X , KC_C , KC_V , KC_B, KC_N , KC_M , KC_COMM, KC_DOT , KC_SLSH, RSFT_T(KC_BSPC), + LCTL_T(KC_MINS), KC_LGUI, LALT_T(KC_EQL) , KC_SPC , LT(4, KC_ESC), LT(1, KC_SPC) , KC_LEFT, KC_DOWN, KC_UP , 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, KC_TRNS, KC_TRNS, KC_TRNS, KC_PSCR, KC_F7 , KC_F8 , KC_F9 , KC_F12 , KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PAUS, 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_INS , KC_F1 , KC_F2 , KC_F3 , KC_F10 , 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_7 , KC_8 , KC_9 , KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PMNS, KC_4 , KC_5 , KC_6 , KC_PLUS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PAST, KC_1 , KC_2 , KC_3 , KC_PSLS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_0 , 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_LCBR, S(KC_7), S(KC_8), S(KC_9), KC_RCBR, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_LPRN, S(KC_4), S(KC_5), S(KC_6), KC_RPRN, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_LBRC, S(KC_1), S(KC_2), S(KC_3), KC_RBRC, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, S(KC_0), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), + + [4] = 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_DEL, + KC_TRNS, A(KC_F4),C(KC_EQL), KC_END, C(KC_0), LCA(KC_DEL), KC_WBAK, C(KC_PGUP), C(KC_PGDN), KC_WFWD, C(KC_P), KC_TRNS, KC_TRNS, KC_MPLY, + KC_TRNS, KC_HOME, C(KC_MINS), KC_DEL , KC_RGHT, KC_TRNS, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_VOLU, KC_TRNS, KC_TRNS, + KC_TRNS, KC_SLEP, KC_TRNS, KC_SYSTEM_POWER, KC_TRNS, KC_LEFT, KC_MNXT, KC_MPRV, KC_PGUP, KC_PGDN, KC_VOLD, 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/ks63/keymaps/default/readme.md b/keyboards/handwired/ks63/keymaps/default/readme.md new file mode 100644 index 000000000000..26537fb51163 --- /dev/null +++ b/keyboards/handwired/ks63/keymaps/default/readme.md @@ -0,0 +1,5 @@ +# The default keymap for ks63 + +This is the default keymap for kb63, + +it consists of a base layer with QWERTY layout, a momentary function-keys-layer, a number-keys layer, a symbol-keys-layer and a hotkeys-multimediakeys-combo layer. diff --git a/keyboards/handwired/ks63/ks63.c b/keyboards/handwired/ks63/ks63.c new file mode 100644 index 000000000000..bd48359a8183 --- /dev/null +++ b/keyboards/handwired/ks63/ks63.c @@ -0,0 +1 @@ +#include "ks63.h" diff --git a/keyboards/handwired/ks63/ks63.h b/keyboards/handwired/ks63/ks63.h new file mode 100644 index 000000000000..05006f593d57 --- /dev/null +++ b/keyboards/handwired/ks63/ks63.h @@ -0,0 +1,23 @@ +#pragma once + +#include "quantum.h" + +#define LAYOUT( \ + K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K014, \ + K100, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, \ + K200, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, \ + K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K313, \ + K400, K401, K403, K404, K406, K408, K410, K411, K413, K414 \ +) { \ + { K000, K001, K002, K003, K004, K005, K006 }, \ + { K100, KC_NO, K102, K103, K104, K105, K106 }, \ + { K200, KC_NO, K202, K203, K204, K205, K206 }, \ + { KC_NO, K301, K302, K303, K304, K305, K306 }, \ + { K400, K401, KC_NO, K403, K404, KC_NO, K406 }, \ + \ + { K007, K008, K009, K010, K011, K012, KC_NO, K014 }, \ + { K107, K108, K109, K110, K111, K112, K113, K114 }, \ + { K207, K208, K209, K210, K211, K212, K213, KC_NO }, \ + { K307, K308, K309, K310, K311, KC_NO, K313, KC_NO }, \ + { KC_NO, K408, KC_NO, K410, K411, KC_NO, K413, K414 } \ +} diff --git a/keyboards/handwired/ks63/readme.md b/keyboards/handwired/ks63/readme.md new file mode 100644 index 000000000000..2bbd9fa69435 --- /dev/null +++ b/keyboards/handwired/ks63/readme.md @@ -0,0 +1,15 @@ +# ks63 + +![ks63](https://github.com/klesh/ks63/raw/master/images/ks63-finish-02.jpg) + +A handwired 63 keys split keyboard compatible with Default 60% layout. Let you keep your magic power while muggles can still use it as an ordinary keyboard + +* Keyboard Maintainer: [Klesh Wong](https://github.com/klesh) +* Hardware Supported: Arduino ProMicro +* Assembling Guide: [ks63](https://github.com/klesh/ks63) + +Make example for this keyboard (after setting up your build environment): + + make handwired/ks63: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/ks63/rules.mk b/keyboards/handwired/ks63/rules.mk new file mode 100644 index 000000000000..a97b8ea70884 --- /dev/null +++ b/keyboards/handwired/ks63/rules.mk @@ -0,0 +1,24 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +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 = 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 = no # Enable keyboard RGB underglow +BLUETOOTH_ENABLE = no # Enable Bluetooth +AUDIO_ENABLE = no # Audio output + +SPLIT_KEYBOARD = yes From 1ca7dcb0b244b1074bf341b11f61440df37913fc Mon Sep 17 00:00:00 2001 From: shela Date: Fri, 31 Jul 2020 07:22:22 +0900 Subject: [PATCH 485/930] [Docs] Update Japanese translation of feature_mouse_keys.md. (#9809) * Update Japanese translation of feature_mouse_keys.md. * fix original document version. * Update docs/ja/feature_mouse_keys.md * update based on comment --- docs/ja/feature_mouse_keys.md | 23 ++++++++++++++++++++--- 1 file changed, 20 insertions(+), 3 deletions(-) diff --git a/docs/ja/feature_mouse_keys.md b/docs/ja/feature_mouse_keys.md index 43ca8bb08b2b..74b09e939b73 100644 --- a/docs/ja/feature_mouse_keys.md +++ b/docs/ja/feature_mouse_keys.md @@ -1,8 +1,8 @@ # マウスキー マウスキーは、キーボードを使ってマウスをエミュレートできる機能です。様々な速度でポインタを移動し、5つのボタンを押し、8方向にスクロールすることができます。 @@ -44,10 +44,11 @@ MOUSEKEY_ENABLE = yes ## マウスキーの設定 -マウスキーはカーソルを移動するための2つの異なるモードをサポートします: +マウスキーはカーソルを移動するための3つの異なるモードをサポートします: * **加速 (デフォルト):** 移動キーを押したままにすると、カーソルが最大速度に達するまでカーソルを加速します。 * **定速:** 移動キーを押したままにすると、カーソルを一定の速度で移動します。 +* **混合:** 移動キーを押したままにすると、カーソルが最大速度に達するまでカーソルを加速し、加速キーと移動キーを同時に押すとカーソルは一定の速度で移動します。 同じ原則がスクロールにも適用されます。 @@ -125,3 +126,19 @@ MOUSEKEY_ENABLE = yes | `MK_W_INTERVAL_1` | 120 | スクロールステップ間の時間 (`KC_ACL1`) | | `MK_W_OFFSET_2` | 1 | スクロールアクションごとのスクロールステップ (`KC_ACL2`) | | `MK_W_INTERVAL_2` | 20 | スクロールステップ間の時間 (`KC_ACL2`) | + +### 混合モード + +このモードは **加速** モードのように機能しますが、`KC_ACL0`、`KC_ACL1`、`KC_ACL2` を押したままにすることで +一時的(押している間)にカーソルとスクロール速度を定速に設定できます。 +加速キーが押されていない場合、このモードは **加速** モードと同じで、関連する全ての設定を使って変更できます。 + +* **KC_ACL0:** この加速はカーソルをできるだけ遅い速度に設定します。これはカーソルを非常に小さく詳細に移動する場合に便利です。 +* **KC_ACL1:** この加速はカーソルを最大(ユーザ定義)速度の半分に設定します。 +* **KC_ACL2:** この加速はカーソルを最大(コンピュータ定義)速度に設定します。これは、正確性を多少犠牲にしてカーソルを大きく移動する場合に便利です。 + +混合モードを使うには、キーマップの `config.h` ファイルに少なくとも `MK_COMBINED` を定義しなければなりません: + +```c +#define MK_COMBINED +``` From 06cf6982bbac00388a7dafb8db105f9d851e6170 Mon Sep 17 00:00:00 2001 From: shela Date: Fri, 31 Jul 2020 08:10:44 +0900 Subject: [PATCH 486/930] [Docs] Update Japanese translation of feature_ps2_mouse.md. (#9815) --- docs/ja/feature_ps2_mouse.md | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/docs/ja/feature_ps2_mouse.md b/docs/ja/feature_ps2_mouse.md index aae6d947bfae..0351768b33da 100644 --- a/docs/ja/feature_ps2_mouse.md +++ b/docs/ja/feature_ps2_mouse.md @@ -1,8 +1,8 @@ # PS/2 マウスサポート :id=ps2-mouse-support PS/2 マウス (例えばタッチパッドあるいはトラックポイント)を複合デバイスとしてキーボードに接続することができます。 @@ -291,3 +291,13 @@ X 軸と Y 軸を反転するには、以下を config.h に配置します: #define PS2_MOUSE_DEBUG_HID #define PS2_MOUSE_DEBUG_RAW ``` + +### 動作フック :id=movement-hook + +ホストに送信される前にキーマップでマウスの動作を処理します。使用例として、 +ノイズのフィルタリング、加速の追加、レイヤーの自動アクティブ化が含まれます。 +使用するには、キーマップで次の関数を定義します: + +```c +void ps2_mouse_moved_user(report_mouse_t *mouse_report); +``` From 6ff08202a5183733b51b35530b65dc6ad11f3824 Mon Sep 17 00:00:00 2001 From: Ladniy <32298096+Ladniy@users.noreply.github.com> Date: Fri, 31 Jul 2020 10:59:32 +0800 Subject: [PATCH 487/930] Add info.json for Jiran keyboard (#9857) Co-authored-by: Joel Challis --- keyboards/jiran/info.json | 69 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 69 insertions(+) create mode 100644 keyboards/jiran/info.json diff --git a/keyboards/jiran/info.json b/keyboards/jiran/info.json new file mode 100644 index 000000000000..774e70f7f6fb --- /dev/null +++ b/keyboards/jiran/info.json @@ -0,0 +1,69 @@ +{ + "keyboard_name": "jiran", + "url": "t.me/s/ladniys", + "maintainer": "Ladniy", + "width": 18.75, + "height": 5.63, + "layouts": { + "LAYOUT": { + "layout": [ + {"label":"Esc", "x":1, "y":0.88}, + {"label":"1", "x":2, "y":0.75}, + {"label":"2", "x":3, "y":0.38}, + {"label":"3", "x":4, "y":0.13}, + {"label":"4", "x":5, "y":0.38}, + {"label":"5", "x":6, "y":0.5}, + {"label":"6", "x":11.75, "y":0.5}, + {"label":"7", "x":12.75, "y":0.38}, + {"label":"8", "x":13.75, "y":0.13}, + {"label":"9", "x":14.75, "y":0.38}, + {"label":"0", "x":15.75, "y":0.75}, + {"label":"_", "x":16.75, "y":0.88}, + {"label":"Win", "x":0, "y":2.63}, + {"label":"Tab", "x":1, "y":1.88}, + {"label":"Q", "x":2, "y":1.75}, + {"label":"W", "x":3, "y":1.38}, + {"label":"E", "x":4, "y":1.13}, + {"label":"R", "x":5, "y":1.38}, + {"label":"T", "x":6, "y":1.5}, + {"label":"Y", "x":11.75, "y":1.5}, + {"label":"U", "x":12.75, "y":1.38}, + {"label":"I", "x":13.75, "y":1.13}, + {"label":"O", "x":14.75, "y":1.38}, + {"label":"P", "x":15.75, "y":1.75}, + {"label":"{", "x":16.75, "y":1.88}, + {"label":"}", "x":17.75, "y":2.63}, + {"label":"Shift", "x":1, "y":2.88}, + {"label":"A", "x":2, "y":2.75}, + {"label":"S", "x":3, "y":2.38}, + {"label":"D", "x":4, "y":2.13}, + {"label":"F", "x":5, "y":2.38}, + {"label":"G", "x":6, "y":2.5}, + {"label":"H", "x":11.75, "y":2.5}, + {"label":"J", "x":12.75, "y":2.38}, + {"label":"K", "x":13.75, "y":2.13}, + {"label":"L", "x":14.75, "y":2.38}, + {"label":":", "x":15.75, "y":2.75}, + {"label":"\"", "x":16.75, "y":2.88}, + {"label":"Ctrl", "x":1, "y":3.88}, + {"label":"Z", "x":2, "y":3.75}, + {"label":"X", "x":3, "y":3.38}, + {"label":"C", "x":4, "y":3.13}, + {"label":"V", "x":5, "y":3.38}, + {"label":"B", "x":6, "y":3.5}, + {"label":"N", "x":11.75, "y":3.5}, + {"label":"M", "x":12.75, "y":3.38}, + {"label":"<", "x":13.75, "y":3.13}, + {"label":">", "x":14.75, "y":3.38}, + {"label":"?", "x":15.75, "y":3.75}, + {"label":"|", "x":16.75, "y":3.88}, + {"label":"Fn", "x":5, "y":4.38}, + {"label":"Space", "x":6, "y":4.5}, + {"label":"Alt", "x":7, "y":4.63}, + {"label":"Enter", "x":10.75, "y":4.63}, + {"label":"Back", "x":11.75, "y":4.5}, + {"label":"Fn", "x":12.75, "y":4.38} + ] + } + } +} From 2ec2f80bfce352e60d58dd5248ab347f7272c5b3 Mon Sep 17 00:00:00 2001 From: gadzkun Date: Fri, 31 Jul 2020 11:23:06 +0700 Subject: [PATCH 488/930] [Keyboard] Add otd_plus keyboard (#9726) --- keyboards/hardlineworks/otd_plus/config.h | 33 ++++++ keyboards/hardlineworks/otd_plus/info.json | 103 ++++++++++++++++++ .../otd_plus/keymaps/default/keymap.c | 22 ++++ keyboards/hardlineworks/otd_plus/otd_plus.c | 12 ++ keyboards/hardlineworks/otd_plus/otd_plus.h | 35 ++++++ keyboards/hardlineworks/otd_plus/readme.md | 16 +++ keyboards/hardlineworks/otd_plus/rules.mk | 22 ++++ 7 files changed, 243 insertions(+) create mode 100644 keyboards/hardlineworks/otd_plus/config.h create mode 100644 keyboards/hardlineworks/otd_plus/info.json create mode 100644 keyboards/hardlineworks/otd_plus/keymaps/default/keymap.c create mode 100644 keyboards/hardlineworks/otd_plus/otd_plus.c create mode 100644 keyboards/hardlineworks/otd_plus/otd_plus.h create mode 100644 keyboards/hardlineworks/otd_plus/readme.md create mode 100644 keyboards/hardlineworks/otd_plus/rules.mk diff --git a/keyboards/hardlineworks/otd_plus/config.h b/keyboards/hardlineworks/otd_plus/config.h new file mode 100644 index 000000000000..5474dbfee92f --- /dev/null +++ b/keyboards/hardlineworks/otd_plus/config.h @@ -0,0 +1,33 @@ +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0x484C // "HL" +#define PRODUCT_ID 0x0087 // "TKL" +#define DEVICE_VER 0x0001 +#define MANUFACTURER Hardlineworks +#define PRODUCT OTD-PLUS + +/* key matrix size */ +#define MATRIX_ROWS 12 +#define MATRIX_COLS 9 + +#define MATRIX_ROW_PINS { D2, D4, D1, E6, F5, C6, B6, F6, F0, D0, D6, D3 } +#define MATRIX_COL_PINS { B3, B2, B1, B7, B0, F1, D7, F7, C7 } +#define UNUSED_PINS + +/* COL2ROW or ROW2COL */ +#define DIODE_DIRECTION COL2ROW + +#define CAPS_LOCK_LED_PIN F4 +#define SCROLL_LOCK_LED_PIN D5 + +/* 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/hardlineworks/otd_plus/info.json b/keyboards/hardlineworks/otd_plus/info.json new file mode 100644 index 000000000000..c6ba4f256a60 --- /dev/null +++ b/keyboards/hardlineworks/otd_plus/info.json @@ -0,0 +1,103 @@ +{ + "keyboard_name": "OTD-PLUS", + "url": "", + "maintainer": "Hardlineworks", + "width": 18.25, + "height": 6.25, + "layouts": { + "LAYOUT_tkl_ansi_wkl": { + "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.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, "w":2}, + {"label" : "Insert", "x":15.25, "y":1.25}, + {"label" : "Home", "x":16.25, "y":1.25}, + {"label" : "Page up", "x":17.25, "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" : "Delete", "x":15.25, "y":2.25}, + {"label" : "End", "x":16.25, "y":2.25}, + {"label" : "Page down", "x":17.25, "y":2.25}, + + {"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" : "Shift", "x":0, "y":4.25, "w":2.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":2.75}, + {"label" : "Up", "x":16.25, "y":4.25}, + + {"label" : "Ctrl", "x":0, "y":5.25, "w":1.5}, + {"label" : "Alt", "x":2.5, "y":5.25, "w":1.5}, + {"label" : "Space", "x":4, "y":5.25, "w":7}, + {"label" : "Alt", "x":11, "y":5.25, "w":1.5}, + {"label" : "Ctrl", "x":13.5, "y":5.25, "w":1.5}, + {"label" : "Left", "x":15.25, "y":5.25 }, + {"label" : "Down", "x":16.25, "y":5.25 }, + {"label" : "Right", "x":17.25, "y":5.25 } + ] + } + } +} diff --git a/keyboards/hardlineworks/otd_plus/keymaps/default/keymap.c b/keyboards/hardlineworks/otd_plus/keymaps/default/keymap.c new file mode 100644 index 000000000000..397b815bd105 --- /dev/null +++ b/keyboards/hardlineworks/otd_plus/keymaps/default/keymap.c @@ -0,0 +1,22 @@ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [0] = LAYOUT_tkl_ansi_wkl( + 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_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_LALT, KC_SPC, MO(1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT + ), + + [1] = LAYOUT_tkl_ansi_wkl( + RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______ + ), +}; diff --git a/keyboards/hardlineworks/otd_plus/otd_plus.c b/keyboards/hardlineworks/otd_plus/otd_plus.c new file mode 100644 index 000000000000..f7f96800d049 --- /dev/null +++ b/keyboards/hardlineworks/otd_plus/otd_plus.c @@ -0,0 +1,12 @@ +#include "otd_plus.h" + +void keyboard_pre_init_kb(void) { + led_init_ports(); + keyboard_pre_init_user(); +} +void led_init_ports(void) { + setPinOutput(CAPS_LOCK_LED_PIN); + setPinOutput(SCROLL_LOCK_LED_PIN); +} + + diff --git a/keyboards/hardlineworks/otd_plus/otd_plus.h b/keyboards/hardlineworks/otd_plus/otd_plus.h new file mode 100644 index 000000000000..f523cfff298d --- /dev/null +++ b/keyboards/hardlineworks/otd_plus/otd_plus.h @@ -0,0 +1,35 @@ + +#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_tkl_ansi_wkl( \ + K00, K01, KB1, K02, KB2, K03, KB3, K04, KB4, KB5, K06, KB6, K07, KB7, K08, KB8, \ + K10, KA0, K11, KA1, K12, KA2, K13, KA3, K14, KA4, K15, KA5, K16, KA6, KA7, K18, KA8, \ + K20, K90, K21, K91, K22, K92, K23, K93, K24, K94, K25, K95, K26, K96, K97, K28, K98, \ + K30, K80, K31, K81, K32, K82, K33, K83, K34, K84, K35, K85, K86, \ + K40, K70, K41, K71, K42, K72, K43, K73, K44, K74, K45, K46, K48, \ + K50, K51, K62, K55, K56, K67, K58, K68 \ +) \ +{ \ + { K00, K01, K02, K03, K04, KC_NO, K06, K07, K08, }, \ + { K10, K11, K12, K13, K14, K15, K16, KC_NO, K18, }, \ + { K20, K21, K22, K23, K24, K25, K26, KC_NO, K28, }, \ + { K30, K31, K32, K33, K34, K35, KC_NO, KC_NO, KC_NO, }, \ + { K40, K41, K42, K43, K44, K45, K46, KC_NO, K48, }, \ + { K50, K51, KC_NO, KC_NO, KC_NO, K55, K56, KC_NO, K58, }, \ + { KC_NO, KC_NO, K62, KC_NO, KC_NO, KC_NO, KC_NO, K67, K68, }, \ + { K70, K71, K72, K73, K74, KC_NO, KC_NO, KC_NO, KC_NO, }, \ + { K80, K81, K82, K83, K84, K85, K86, KC_NO, KC_NO, }, \ + { K90, K91, K92, K93, K94, K95, K96, K97, K98, }, \ + { KA0, KA1, KA2, KA3, KA4, KA5, KA6, KA7, KA8, }, \ + { KC_NO, KB1, KB2, KB3, KB4, KB5, KB6, KB7, KB8, }, \ +} diff --git a/keyboards/hardlineworks/otd_plus/readme.md b/keyboards/hardlineworks/otd_plus/readme.md new file mode 100644 index 000000000000..7e2687e06122 --- /dev/null +++ b/keyboards/hardlineworks/otd_plus/readme.md @@ -0,0 +1,16 @@ +# [OTD PLUS](https://github.com/gadzkun/Hardlineworks/tree/master/otd%20plus) + +![TKL top](https://user-images.githubusercontent.com/67696967/87272049-54679300-c4ff-11ea-8f5a-4f7c2825b85c.png) + +A modern PCB replacement for OTD keyboards, powered by HardLineWorks + +* Keyboard Maintainer : [Hardlineworks](https://github.com/gadzkun/Hardlineworks) +* Hardware Supported : otd plus pcb +* Hardware Availability : Private GB + +Make example for this keyboard (after setting up your build environment): + + make hardlineworks/otd_plus: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/hardlineworks/otd_plus/rules.mk b/keyboards/hardlineworks/otd_plus/rules.mk new file mode 100644 index 000000000000..e07b7a000b20 --- /dev/null +++ b/keyboards/hardlineworks/otd_plus/rules.mk @@ -0,0 +1,22 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +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 = no # Enable keyboard RGB underglow +BLUETOOTH_ENABLE = no # Enable Bluetooth +AUDIO_ENABLE = no # Audio output From 3c7fc3c82ee943638fc978a03f038249d33c25cf Mon Sep 17 00:00:00 2001 From: shela Date: Fri, 31 Jul 2020 14:31:34 +0900 Subject: [PATCH 489/930] [Docs] Update Japanese translation of feature_tap_dance.md. (#9808) * Update Japanese translation of feature_tap_dance.md. * fix original document version. * Update docs/ja/feature_tap_dance.md --- docs/ja/feature_tap_dance.md | 512 +++++++++++++++++------------------ 1 file changed, 245 insertions(+), 267 deletions(-) diff --git a/docs/ja/feature_tap_dance.md b/docs/ja/feature_tap_dance.md index 5425b2a4208e..01d0607574f3 100644 --- a/docs/ja/feature_tap_dance.md +++ b/docs/ja/feature_tap_dance.md @@ -1,39 +1,28 @@ # タップダンス: 1つのキーが3つ、5つまたは100の異なる動作をします -## イントロダクション +## イントロダクション :id=introduction セミコロンキーを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キロバイトほど増加します。 +## タップダンスの使い方 :id=how-to-use +最初に、あなたの `rules.mk` ファイルで `TAP_DANCE_ENABLE = yes` と設定する必要があります。なぜならば、デフォルトでは無効になっているからです。これでファームウェアのサイズが1キロバイトほど増加します。 オプションで、あなたの `config.h` ファイルに次のような設定を追加して、`TAPPING_TERM` の時間をカスタマイズしたほうが良いです。 -``` +```c #define TAPPING_TERM 175 ``` `TAPPING_TERM` の時間は、あなたのタップダンスのキーのタップとタップの間の時間として許可された最大の時間で、ミリ秒単位で計測されます。例えば、もし、あなたがこの上にある `#define` ステートメントを使い、1回タップすると `Space` が送信され、2回タップすると `Enter` が送信されるタップダンスキーをセットアップした場合、175ミリ秒以内に2回キーをタップすれば `ENT` だけが送信されるでしょう。もし、1回タップしてから175ミリ秒以上待ってからもう一度タップすると、`SPC SPC` が送信されます。 -次に、いくつかのタップダンスのキーを定義するためには、`TD()` マクロ — `F()` マクロに似ています — を使うのが最も簡単です。これは数字を受け取り、この数字は後で `tap_dance-actions` 配列のインデックスとして使われます。 +次に、いくつかのタップダンスのキーを定義するためには、`TD()` マクロを使うのが最も簡単です。これは数字を受け取り、この数字は後で `tap_dance-actions` 配列のインデックスとして使われます。 その後、`tap_dance_actions` 配列を使って、タップダンスキーを押した時のアクションを定義します。現在は、5つの可能なオプションがあります: @@ -56,7 +45,7 @@ 最後に、5番目のオプションは、もし、タップダンスキーをコードに追加した後、非タップダンスキーが奇妙な振る舞いを始めた時に特に役に立ちます。ありうる問題は、あなたがタップダンスキーを使いやすくするために `TAPPING_TERM` の時間を変更した結果、その他のキーが割り込みを処理する方法が変わってしまったというものです。 -## 実装の詳細 +## 実装の詳細 :id=implementation さて、説明の大部分はここまでです! 以下に挙げているいくつかの例に取り組むことができるようになり、あなた自身のタップダンスの機能を開発できるようになります。しかし、もし、あなたが裏側で起きていることをより深く理解したいのであれば、続けてそれが全てどのように機能するかの説明を読みましょう! @@ -72,9 +61,9 @@ 柔軟性のために、タップダンスは、キーコードの組み合わせにも、ユーザー関数にもなることができます。後者は、より高度なタップ回数の制御や、LED を点滅させたり、バックライトをいじったり、等々の制御を可能にします。これは、1つの共用体と、いくつかの賢いマクロによって成し遂げられています。 -# 実装例 +## 実装例 :id=examples -## シンプルな実装例 +### シンプルな実装例 :id=simple-example ここに1つの定義のための簡単な例があります。 @@ -85,21 +74,24 @@ ```c // タップダンスの宣言 enum { - TD_ESC_CAPS = 0 + TD_ESC_CAPS, }; // タップダンスの定義 qk_tap_dance_action_t tap_dance_actions[] = { - // 1回タップすると Escape キー、2回タップすると Caps Lock。 - [TD_ESC_CAPS] = ACTION_TAP_DANCE_DOUBLE(KC_ESC, KC_CAPS) -// ほかの宣言もカンマで区切ってここに記述します + // 1回タップすると Escape キー、2回タップすると Caps Lock。 + [TD_ESC_CAPS] = ACTION_TAP_DANCE_DOUBLE(KC_ESC, KC_CAPS), }; -// レイヤー定義で、キーコードの代わりにタップダンスキーを追加します -TD(TD_ESC_CAPS) +// キーコードの代わりにタップダンスキーを追加します +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + // ... + TD(TD_ESC_CAPS) + // ... +}; ``` -## 複雑な実装例 +### 複雑な実装例 :id=complex-examples このセクションでは、いくつかの複雑なタップダンスの例を詳しく説明します。 例で使われている全ての列挙型はこのように宣言します。 @@ -107,107 +99,104 @@ TD(TD_ESC_CAPS) ```c // 全ての例のための列挙型定義 enum { - CT_SE = 0, - CT_CLN, - CT_EGG, - CT_FLSH, - X_TAP_DANCE + CT_SE, + CT_CLN, + CT_EGG, + CT_FLSH, + X_TAP_DANCE }; ``` -### 例1: 1回タップすると `:` を送信し、2回タップすると `;` を送信する +#### 例1: 1回タップすると `:` を送信し、2回タップすると `;` を送信する :id=example-1 ```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_finished(qk_tap_dance_state_t *state, void *user_data) { + if (state->count == 1) { + register_code16(KC_COLN); + } 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); - } +void dance_cln_reset(qk_tap_dance_state_t *state, void *user_data) { + if (state->count == 1) { + unregister_code16(KC_COLN); + } 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) + [CT_CLN] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, dance_cln_finished, dance_cln_reset), }; ``` -### 例2: 100回タップした後に "Safety Dance!" を送信します +#### 例2: 100回タップした後に "Safety Dance!" を送信します :id=example-2 ```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); - } +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) + [CT_EGG] = ACTION_TAP_DANCE_FN(dance_egg), }; ``` -### 例3: 1つずつ LED を点灯させてから消灯する +#### 例3: 1つずつ LED を点灯させてから消灯する :id=example-3 ```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(); - } + 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(); + wait_ms(50); + ergodox_right_led_2_off(); + wait_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); - } + if (state->count >= 4) { + reset_keyboard(); + } } // もしフラッシュ状態にならない場合、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(); + ergodox_right_led_1_off(); + wait_ms(50); + ergodox_right_led_2_off(); + wait_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) + [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: クアッドファンクションのタップダンス +#### 例4: クアッドファンクションのタップダンス :id=example-4 [DanielGGordon](https://github.com/danielggordon) によるもの @@ -219,40 +208,37 @@ qk_tap_dance_action_t tap_dance_actions[] = { * 2回タップ = `Escape` を送信 * 2回タップして押し続ける = `Alt` を送信 -## 準備 - 'クアッドファンクションのタップダンス' を利用できるようにするには、いくつかのものが必要になります。 `keymap.c` ファイルの先頭、つまりキーマップの前に、以下のコードを追加します。 ```c typedef struct { - bool is_press_action; - int state; + bool is_press_action; + uint8_t 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 + SINGLE_TAP = 1, + SINGLE_HOLD, + DOUBLE_TAP, + DOUBLE_HOLD, + DOUBLE_SINGLE_TAP, // シングルタップを2回送信 + TRIPLE_TAP, + TRIPLE_HOLD }; // タップダンスの列挙型 enum { - X_CTL = 0, - SOME_OTHER_DANCE + X_CTL, + 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); +uint8_t 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` ファイルの末尾に、次のコードを追加する必要があります。 @@ -288,68 +274,64 @@ void x_reset (qk_tap_dance_state_t *state, void *user_data); * 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; //マジックナンバー。いつかこのメソッドはより多くの押下に対して機能するよう拡張されるでしょう +uint8_t 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' のインスタンスをインスタンス化します +//'x' タップダンスの 'tap' のインスタンスを生成します。 static tap xtap_state = { - .is_press_action = true, - .state = 0 + .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_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 は高速入力用です。キーが `f` であると仮定します: + // 例えば、`buffer` という単語を入力するとき、`Esc` ではなく `ff` を送信するようにします。 + // 高速入力時に `ff` と入力するには、次の文字は `TAPPING_TERM` 以内に入力する必要があります。 + // `TAPPING_TERM` はデフォルトでは 200ms です。 + case DOUBLE_SINGLE_TAP: tap_code(KC_X); register_code(KC_X); + } } -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; +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) + [X_CTL] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, x_finished, x_reset) }; ``` @@ -359,90 +341,91 @@ qk_tap_dance_action_t tap_dance_actions[] = { > この設定の "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 +#### 例5: タップダンスを高度なモッドタップとレイヤータップキーに使う :id=example-5 タップダンスは、タップされたコードが基本的なキーコード以外の場合に、 `MT()` と `LT()` マクロをエミュレートするのに利用できます。これは、通常 `Shift` を必要とする '(' や '{' のようなキーや、`Control + X` のように他の修飾されたキーコードをタップされたキーコードとして送信することに役立ちます。 あなたのレイヤーとカスタムキーコードの下に、以下のコードを追加します。 ```c -//タップダンスのキーコード -enum td_keycodes { - ALT_LP //例: 押していると `LALT`、タップすると `(`。それぞれのタップダンスの追加のキーコードを追加します +// タップダンスのキーコード +enum td_keycodes { + ALT_LP // 例: 押していると `LALT`、タップすると `(`。それぞれのタップダンスの追加のキーコードを追加します }; -//必要な数のタップダンス状態を含むタイプを定義します +// 必要な数のタップダンス状態を含むタイプを定義します typedef enum { - SINGLE_TAP, - SINGLE_HOLD, - DOUBLE_SINGLE_TAP + 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); +// 現在のタップダンスの状態を特定するための関数 +uint8_t 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); +// それぞれのタップダンスキーコードに適用する `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; } // 上記で返却する最大の状態の値より大きい任意の数 +uint8_t 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_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); - } +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) + [ALT_LP] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, altlp_finished, altlp_reset) }; ``` それぞれのタップダンスキーコードをキーマップに含めるときは、`TD()` マクロでキーコードをラップします。例: `TD(ALT_LP)` -### 例6: タップダンスを一時的なレイヤー切り替えとレイヤートグルキーに使う +#### 例6: タップダンスを一時的なレイヤー切り替えとレイヤートグルキーに使う :id=example-6 タップダンスは、MO(layer) と TG(layer) 機能を模倣することにも使用できます。この例では、1回タップすると `KC_QUOT` 、1回押してそのまま押し続けたら `MO(_MY_LAYER)` 、2回タップしたときは `TG(_MY_LAYER)` として機能するキーを設定します。 @@ -450,98 +433,93 @@ qk_tap_dance_action_t tap_dance_actions[] = { ```c typedef struct { - bool is_press_action; - int state; + bool is_press_action; + uint8_t state; } tap; -//必要な数のタップダンス状態のタイプを定義します +// 必要な数のタップダンス状態のタイプを定義します enum { - SINGLE_TAP = 1, - SINGLE_HOLD = 2, - DOUBLE_TAP = 3 + SINGLE_TAP = 1, + SINGLE_HOLD, + DOUBLE_TAP }; enum { - QUOT_LAYR = 0 //カスタムタップダンスキー。他のタップダンスキーはこの列挙型に追加します + QUOT_LAYR, // カスタムタップダンスキー。他のタップダンスキーはこの列挙型に追加します }; -//タップダンスキーで使われる関数を宣言します +// タップダンスキーで使われる関数を宣言します -//全てのタップダンスに関連する関数 -int cur_dance (qk_tap_dance_state_t *state); +// 全てのタップダンスに関連する関数 +uint8_t 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); +// 個別のタップダンスに関連する関数 +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; +// 現在のタップダンスの状態を決定します +uint8_t 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" 構造体を初期化します +// この例のタップダンスキーに関連付けられた "tap" 構造体を初期化します static tap ql_tap_state = { - .is_press_action = true, - .state = 0 + .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_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; +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) + [QUOT_LAYR] = ACTION_TAP_DANCE_FN_ADVANCED_TIME(NULL, ql_finished, ql_reset, 275) }; ``` -上記のコードは、前の例で使われたコードに似ています。注意する1つのポイントは、必要に応じてレイヤーを切り替えられるように、どのレイヤーがアクティブになっているかいつでも確認できる必要があることです。これを実現するために、引数で与えられた `layer` がアクティブなら `true` を返す `layer_state_is( layer )` を使います。 +上記のコードは、前の例で使われたコードに似ています。注意する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)` に似ています。 +`ql_finished` 関数における `case:SINGLE_TAP` は、上の例と似ています。`SINGLE_HOLD` の case では、`ql_reset()` と連動してタップダンスキーを押している間 `_MY_LAYER` に切り替わり、キーを離した時に `_MY_LAYER` から離れます。これは、`MO(_MY_LAYER)` に似ています。`DOUBLE_TAP` の case では、`_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[]` に加えてください。 +最後に、このタップダンスキーを動かすため、忘れずに `TD(QUOT_LAYR)` を `keymaps[]` に加えてください。 From 3d2e5bfe6334844176dbcf57c6c84c5ede0952e4 Mon Sep 17 00:00:00 2001 From: moyi4681 Date: Fri, 31 Jul 2020 19:20:14 +0800 Subject: [PATCH 490/930] add kbd67 capslock indicator (#9839) --- keyboards/kbdfans/kbd67/rev2/rev2.c | 48 ++++++----------------------- 1 file changed, 9 insertions(+), 39 deletions(-) diff --git a/keyboards/kbdfans/kbd67/rev2/rev2.c b/keyboards/kbdfans/kbd67/rev2/rev2.c index 8aa83f58614d..10f848d2f94c 100644 --- a/keyboards/kbdfans/kbd67/rev2/rev2.c +++ b/keyboards/kbdfans/kbd67/rev2/rev2.c @@ -1,42 +1,12 @@ -/* Copyright 2019 Vorror - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ #include "rev2.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); + setPinOutput(D4); + matrix_init_user(); +} +bool led_update_kb(led_t led_state) { + bool res = led_update_user(led_state); + if(res) { + writePin(D4, !led_state.caps_lock); + } + return res; } From 53b0ee3f7ee2dba467c1d7066f4e22bf77ae20bc Mon Sep 17 00:00:00 2001 From: Brandon Schlack Date: Fri, 31 Jul 2020 04:37:17 -0700 Subject: [PATCH 491/930] [Keyboard] Add community layouts to Savage65 (#9854) --- keyboards/cannonkeys/savage65/info.json | 12 +++++ keyboards/cannonkeys/savage65/rules.mk | 2 + keyboards/cannonkeys/savage65/savage65.h | 56 ++++++++++++++++++++++++ 3 files changed, 70 insertions(+) diff --git a/keyboards/cannonkeys/savage65/info.json b/keyboards/cannonkeys/savage65/info.json index 3a0f0c38549d..f85172d1a5e3 100644 --- a/keyboards/cannonkeys/savage65/info.json +++ b/keyboards/cannonkeys/savage65/info.json @@ -7,6 +7,18 @@ "layouts": { "LAYOUT_default": { "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}, {"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}, {"x":12.75, "y":2}, {"label":"Enter", "x":13.75, "y":2, "w":1.25}, {"x":15, "y":2}, {"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}, {"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":"Ctrl", "x":11.25, "y":4, "w":1.25}, {"x":13, "y":4}, {"x":14, "y":4}, {"x":15, "y":4}] + }, + "LAYOUT_65_ansi_blocker": { + "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, "w":1.25}, {"x":11.25, "y":4, "w":1.25}, {"x":13, "y":4}, {"x":14, "y":4}, {"x":15, "y":4}] + }, + "LAYOUT_65_ansi_blocker_split_bs": { + "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, "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, "w":1.25}, {"x":11.25, "y":4, "w":1.25}, {"x":13, "y":4}, {"x":14, "y":4}, {"x":15, "y":4}] + }, + "LAYOUT_65_ansi_blocker_tsangan": { + "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.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":13, "y":4}, {"x":14, "y":4}, {"x":15, "y":4}] + }, + "LAYOUT_65_iso_blocker": { + "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":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}, {"x":13.75, "y":1, "w":1.25, "h":2}, {"x":15, "y":2}, {"x":0, "y":3, "w":1.25}, {"x":1.25, "y":3}, {"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, "w":1.25}, {"x":11.25, "y":4, "w":1.25}, {"x":13, "y":4}, {"x":14, "y":4}, {"x":15, "y":4}] } } diff --git a/keyboards/cannonkeys/savage65/rules.mk b/keyboards/cannonkeys/savage65/rules.mk index dc7f59ae4ae6..577c578ddb58 100644 --- a/keyboards/cannonkeys/savage65/rules.mk +++ b/keyboards/cannonkeys/savage65/rules.mk @@ -20,3 +20,5 @@ WS2812_DRIVER = spi # Enter lower-power sleep mode when on the ChibiOS idle thread OPT_DEFS += -DCORTEX_ENABLE_WFI_IDLE=TRUE + +LAYOUTS = 65_ansi_blocker 65_ansi_blocker_split_bs 65_ansi_blocker_tsangan 65_iso_blocker diff --git a/keyboards/cannonkeys/savage65/savage65.h b/keyboards/cannonkeys/savage65/savage65.h index e9109cf7a608..8f9642ad0e53 100644 --- a/keyboards/cannonkeys/savage65/savage65.h +++ b/keyboards/cannonkeys/savage65/savage65.h @@ -15,3 +15,59 @@ { K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, KC_NO, K315 }, \ { K400, K401, K402, KC_NO, KC_NO, KC_NO, K406, KC_NO, KC_NO, KC_NO, K410, K411, K412, K413, KC_NO, K415 } \ } + +#define LAYOUT_65_ansi_blocker( \ + K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K015, \ + K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K115, \ + K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K213, K215, \ + K300, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, K315, \ + K400, K401, K402, K406, K410, K411, K412, K413, K415 \ +) { \ + { K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, KC_NO, K015 }, \ + { K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, KC_NO, K115 }, \ + { K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, KC_NO, K213, KC_NO, K215 }, \ + { K300, KC_NO, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, KC_NO, K315 }, \ + { K400, K401, K402, KC_NO, KC_NO, KC_NO, K406, KC_NO, KC_NO, KC_NO, K410, K411, K412, K413, KC_NO, K415 } \ +} + +#define LAYOUT_65_ansi_blocker_split_bs( \ + 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, K115, \ + K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K213, K215, \ + K300, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, K315, \ + K400, K401, K402, K406, K410, K411, K412, K413, 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, KC_NO, K115 }, \ + { K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, KC_NO, K213, KC_NO, K215 }, \ + { K300, KC_NO, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, KC_NO, K315 }, \ + { K400, K401, K402, KC_NO, KC_NO, KC_NO, K406, KC_NO, KC_NO, KC_NO, K410, K411, K412, K413, KC_NO, K415 } \ +} + +#define LAYOUT_65_ansi_blocker_tsangan( \ + K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K015, \ + K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K115, \ + K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K213, K215, \ + K300, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, K315, \ + K400, K401, K402, K406, K411, K412, K413, K415 \ +) { \ + { K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, KC_NO, K015 }, \ + { K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, KC_NO, K115 }, \ + { K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, KC_NO, K213, KC_NO, K215 }, \ + { K300, KC_NO, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, KC_NO, K315 }, \ + { K400, K401, K402, KC_NO, KC_NO, KC_NO, K406, KC_NO, KC_NO, KC_NO, KC_NO, K411, K412, K413, KC_NO, K415 } \ +} + +#define LAYOUT_65_iso_blocker( \ + K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K015, \ + K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, 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, K406, K410, K411, K412, K413, K415 \ +) { \ + { K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, KC_NO, K015 }, \ + { K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, KC_NO, KC_NO, 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, KC_NO, KC_NO, KC_NO, K406, KC_NO, KC_NO, KC_NO, K410, K411, K412, K413, KC_NO, K415 } \ +} From 5bd239e1c0db98a51ed04b86fa5b1abf2b276bfb Mon Sep 17 00:00:00 2001 From: Rustam Zagirov Date: Fri, 31 Jul 2020 17:58:55 +0300 Subject: [PATCH 492/930] Remove unnecessary break after return from documentation (#9892) --- docs/custom_quantum_functions.md | 2 +- docs/ja/custom_quantum_functions.md | 2 +- docs/ref_functions.md | 2 -- docs/zh-cn/custom_quantum_functions.md | 2 +- 4 files changed, 3 insertions(+), 5 deletions(-) diff --git a/docs/custom_quantum_functions.md b/docs/custom_quantum_functions.md index e15126c4204e..bf3a60377cdd 100644 --- a/docs/custom_quantum_functions.md +++ b/docs/custom_quantum_functions.md @@ -454,7 +454,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { layer_state_set(layer_state); // then immediately update the layer color } } - return false; break; + return false; case RGB_MODE_FORWARD ... RGB_MODE_GRADIENT: // For any of the RGB codes (see quantum_keycodes.h, L400 for reference) if (record->event.pressed) { //This disables layer indication, as it's assumed that if you're changing this ... you want that disabled if (user_config.rgb_layer_change) { // only if this is enabled diff --git a/docs/ja/custom_quantum_functions.md b/docs/ja/custom_quantum_functions.md index 96e2a4ab3d7d..161d7e4b565a 100644 --- a/docs/ja/custom_quantum_functions.md +++ b/docs/ja/custom_quantum_functions.md @@ -456,7 +456,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { layer_state_set(layer_state); // すぐにレイヤーの色を更新します } } - return false; break; + return false; case RGB_MODE_FORWARD ... RGB_MODE_GRADIENT: // 任意の RGB コード に対して(quantum_keycodes.h を見てください。400行目参照) if (record->event.pressed) { // これはレイヤー表示を無効にします。これを変更する場合は、無効にしたいだろうため。 if (user_config.rgb_layer_change) { // 有効な場合のみ diff --git a/docs/ref_functions.md b/docs/ref_functions.md index 57f701d790dd..997c3fa2ee37 100644 --- a/docs/ref_functions.md +++ b/docs/ref_functions.md @@ -26,7 +26,6 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { update_tri_layer(_LOWER, _RAISE, _ADJUST); } return false; - break; case RAISE: if (record->event.pressed) { layer_on(_RAISE); @@ -36,7 +35,6 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { update_tri_layer(_LOWER, _RAISE, _ADJUST); } return false; - break; } return true; } diff --git a/docs/zh-cn/custom_quantum_functions.md b/docs/zh-cn/custom_quantum_functions.md index 95b2084dbf42..27b2edf38f90 100644 --- a/docs/zh-cn/custom_quantum_functions.md +++ b/docs/zh-cn/custom_quantum_functions.md @@ -424,7 +424,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { layer_state_set(layer_state); // 那么立刻更新层颜色 } } - return false; break; + return false; case RGB_MODE_FORWARD ... RGB_MODE_GRADIENT: // 对于所有的RGB代码 (see quantum_keycodes.h, L400 可以参考) if (record->event.pressed) { //本句失能层指示,假设你改变了这个…你要把它禁用 if (user_config.rgb_layer_change) { // 仅当使能时 From 1a49eb5be12fd5a32d59103427c71ee4869eea49 Mon Sep 17 00:00:00 2001 From: Jan Christoph Ebersbach Date: Fri, 31 Jul 2020 22:03:44 +0200 Subject: [PATCH 493/930] [Keyboard] Add Dactyl Manuform 5x6 with 5 thumb keys (#9659) * [Keyboard] Add Dactyl Manuform 5x6 with 5 thumb keys * fix: remove unused code block * fix: remove unused code block * Remove unused build options --- .../handwired/dactyl_manuform/5x6_5/5x6_5.c | 2 + .../handwired/dactyl_manuform/5x6_5/5x6_5.h | 27 + .../handwired/dactyl_manuform/5x6_5/config.h | 52 ++ .../handwired/dactyl_manuform/5x6_5/info.json | 82 +++ .../5x6_5/keymaps/default/config.h | 24 + .../5x6_5/keymaps/default/keymap.json | 507 ++++++++++++++++++ .../handwired/dactyl_manuform/5x6_5/rules.mk | 3 + .../dactyl_manuform/dactyl_manuform.h | 2 + 8 files changed, 699 insertions(+) create mode 100644 keyboards/handwired/dactyl_manuform/5x6_5/5x6_5.c create mode 100644 keyboards/handwired/dactyl_manuform/5x6_5/5x6_5.h create mode 100644 keyboards/handwired/dactyl_manuform/5x6_5/config.h create mode 100644 keyboards/handwired/dactyl_manuform/5x6_5/info.json create mode 100644 keyboards/handwired/dactyl_manuform/5x6_5/keymaps/default/config.h create mode 100644 keyboards/handwired/dactyl_manuform/5x6_5/keymaps/default/keymap.json create mode 100644 keyboards/handwired/dactyl_manuform/5x6_5/rules.mk diff --git a/keyboards/handwired/dactyl_manuform/5x6_5/5x6_5.c b/keyboards/handwired/dactyl_manuform/5x6_5/5x6_5.c new file mode 100644 index 000000000000..bacda3640e0b --- /dev/null +++ b/keyboards/handwired/dactyl_manuform/5x6_5/5x6_5.c @@ -0,0 +1,2 @@ +#include "5x6_5.h" + diff --git a/keyboards/handwired/dactyl_manuform/5x6_5/5x6_5.h b/keyboards/handwired/dactyl_manuform/5x6_5/5x6_5.h new file mode 100644 index 000000000000..deb288a1f96d --- /dev/null +++ b/keyboards/handwired/dactyl_manuform/5x6_5/5x6_5.h @@ -0,0 +1,27 @@ +#pragma once + +#include "dactyl_manuform.h" + +#define LAYOUT_5x6_5(\ + 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, \ + L42, L43, L44, L55, L53, R52, R50, R41, R42, R43, \ + L54, L52, R53, 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 }, \ + { KC_NO, KC_NO, L42, L43, L44, KC_NO }, \ + { KC_NO, KC_NO, 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 }, \ + { KC_NO, R41, R42, R43, KC_NO, KC_NO }, \ + { R50, R51, R52, R53, KC_NO, KC_NO } \ +} diff --git a/keyboards/handwired/dactyl_manuform/5x6_5/config.h b/keyboards/handwired/dactyl_manuform/5x6_5/config.h new file mode 100644 index 000000000000..b5195abbc692 --- /dev/null +++ b/keyboards/handwired/dactyl_manuform/5x6_5/config.h @@ -0,0 +1,52 @@ +/* +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" + + +#define PRODUCT Dactyl-Manuform (5x6) + +/* key matrix size */ +// Rows are doubled-up +#define MATRIX_ROWS 12 +#define MATRIX_COLS 6 + +// wiring of each half +// ../../../../docs/proton_c_conversion.md +#define MATRIX_COL_PINS { D4, C6, D7, E6, B4, B5 } +#define MATRIX_ROW_PINS { F6, F7, B1, B3, B2, B6 } + +#define DIODE_DIRECTION COL2ROW + +#define BOOTMAGIC_LITE_ROW 0 +#define BOOTMAGIC_LITE_COLUMN 0 + +#define BOOTMAGIC_LITE_ROW_RIGHT 6 +#define BOOTMAGIC_LITE_COLUMN_RIGHT 5 + +// WS2812 RGB LED strip input and number of LEDs +// #define RGB_DI_PIN D3 +// #define RGBLED_NUM 12 + +/* define if matrix has ghost */ +//#define MATRIX_HAS_GHOST + +/* number of backlight levels */ +// #define BACKLIGHT_LEVELS 3 diff --git a/keyboards/handwired/dactyl_manuform/5x6_5/info.json b/keyboards/handwired/dactyl_manuform/5x6_5/info.json new file mode 100644 index 000000000000..3e9b66a6a97e --- /dev/null +++ b/keyboards/handwired/dactyl_manuform/5x6_5/info.json @@ -0,0 +1,82 @@ +{ + "keyboard_name": "Dactyl Manuform 5x6 5 thumb keys", + "url": "", + "maintainer": "jceb", + "width": 17, + "height": 6, + "layouts": { + "LAYOUT_5x6_5": { + "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":"L42", "x":2, "y":4}, + {"label":"L43", "x":3, "y":4}, + {"label":"L44", "x":5, "y":4}, + {"label":"L45", "x":6, "y":4}, + {"label":"L53", "x":7, "y":4}, + + {"label":"R52", "x":9, "y":4}, + {"label":"R40", "x":10, "y":4}, + {"label":"R41", "x":11, "y":4}, + {"label":"R42", "x":13, "y":4}, + {"label":"R43", "x":14, "y":4}, + + {"label":"L54", "x":6, "y":5}, + {"label":"L52", "x":7, "y":5}, + + {"label":"R53", "x":9, "y":5}, + {"label":"R51", "x":10, "y":5} + ] + } + } +} diff --git a/keyboards/handwired/dactyl_manuform/5x6_5/keymaps/default/config.h b/keyboards/handwired/dactyl_manuform/5x6_5/keymaps/default/config.h new file mode 100644 index 000000000000..c4fb3742d96f --- /dev/null +++ b/keyboards/handwired/dactyl_manuform/5x6_5/keymaps/default/config.h @@ -0,0 +1,24 @@ +/* +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 EE_HANDS + +#define KINETIC_SPEED diff --git a/keyboards/handwired/dactyl_manuform/5x6_5/keymaps/default/keymap.json b/keyboards/handwired/dactyl_manuform/5x6_5/keymaps/default/keymap.json new file mode 100644 index 000000000000..901a707ad41a --- /dev/null +++ b/keyboards/handwired/dactyl_manuform/5x6_5/keymaps/default/keymap.json @@ -0,0 +1,507 @@ +{ + "version": 1, + "notes": "", + "author": "Jan Christoph Ebersbach", + "keyboard": "dactyl_manuform/5x6_5/default", + "keymap": "dactyl_manuform_5x6_5_default", + "layout": "LAYOUT_5x6_5", + "layers": [ + [ + "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_TAB", + "KC_Q", + "KC_W", + "KC_E", + "KC_R", + "KC_T", + "KC_Y", + "KC_U", + "KC_I", + "KC_O", + "KC_P", + "KC_LBRC", + + "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_LSPO", + "KC_Z", + "KC_X", + "KC_C", + "KC_V", + "KC_B", + "KC_N", + "KC_M", + "KC_COMM", + "KC_DOT", + "KC_SLSH", + "KC_RSPC", + + "KC_LGUI", + "KC_LALT", + "TT(2)", + "LT(6,KC_SPC)", + "LT(4,KC_DEL)", + + "LT(4,KC_ENT)", + "KC_SPC", + "LT(2,KC_BSPC)", + "LALT_T(KC_RALT)", + "KC_RGUI", + + "LCTL_T(KC_LBRC)", + "LCTL_T(KC_LBRC)", + + "LT(4,KC_ENT)", + "RCTL_T(KC_RBRC)" + ], + [ + "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_TAB", + "KC_Q", + "KC_W", + "KC_F", + "KC_P", + "KC_G", + "KC_J", + "KC_L", + "KC_U", + "KC_Y", + "KC_SCLN", + "KC_LBRC", + + "LCTL_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_LSPO", + "KC_Z", + "KC_X", + "KC_C", + "KC_V", + "KC_B", + "KC_K", + "KC_M", + "KC_COMM", + "KC_DOT", + "KC_SLSH", + "KC_RSPC", + + "KC_LGUI", + "KC_LALT", + "TT(2)", + "LT(6,KC_SPC)", + "LT(4,KC_DEL)", + + "LT(4,KC_ENT)", + "KC_SPC", + "LT(2,KC_BSPC)", + "LALT_T(KC_RALT)", + "KC_RGUI", + + "LCTL_T(KC_LBRC)", + "LCTL_T(KC_LBRC)", + + "LT(4,KC_ENT)", + "RCTL_T(KC_RBRC)" + ], + [ + "RESET", + "KC_PWR", + "KC_TRNS", + "KC_TRNS", + "KC_TRNS", + "KC_TRNS", + "KC_TRNS", + "KC_TRNS", + "KC_TRNS", + "KC_TRNS", + "KC_PWR", + "RESET", + + "KC_TRNS", + "KC_TRNS", + "KC_TRNS", + "KC_TRNS", + "KC_TRNS", + "KC_TRNS", + "KC_7", + "KC_7", + "KC_8", + "KC_9", + "KC_TRNS", + "KC_RBRC", + + "KC_TRNS", + "DF(0)", + "DF(1)", + "KC_NO", + "MO(3)", + "MO(3)", + "KC_4", + "KC_4", + "KC_5", + "KC_6", + "KC_MINS", + "KC_EQL", + + "KC_TRNS", + "MO(5)", + "KC_NO", + "KC_NO", + "KC_NO", + "KC_NO", + "KC_1", + "KC_1", + "KC_2", + "KC_3", + "KC_BSLS", + "KC_TRNS", + + "KC_TRNS", + "KC_TRNS", + "KC_TRNS", + "KC_SPC", + "KC_DEL", + + "KC_ENT", + "KC_0", + "KC_BSPC", + "KC_TRNS", + "KC_TRNS", + + "TG(2)", + "KC_TRNS", + + "KC_ENT", + "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_TRNS", + "KC_NO", + "KC_NO", + "KC_NO", + "KC_NO", + "KC_NO", + "KC_F7", + "KC_F7", + "KC_F8", + "KC_F9", + "KC_F10", + "KC_NO", + + "KC_TRNS", + "KC_NO", + "KC_NO", + "KC_NO", + "MO(3)", + "MO(3)", + "KC_F4", + "KC_F4", + "KC_F5", + "KC_F6", + "KC_F11", + "KC_NO", + + "KC_TRNS", + "KC_NO", + "KC_NO", + "KC_NO", + "KC_NO", + "KC_NO", + "KC_F1", + "KC_F1", + "KC_F2", + "KC_F3", + "KC_F12", + "KC_TRNS", + + "KC_TRNS", + "KC_TRNS", + "KC_TRNS", + "KC_SPC", + "KC_DEL", + + "KC_ENT", + "KC_SPC", + "KC_BSPC", + "KC_TRNS", + "KC_TRNS", + + "TG(3)", + "KC_TRNS", + + "KC_ENT", + "KC_TRNS" + ], + [ + "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_ESC", + "KC_ESC", + "LCTL(KC_W)", + "LCTL(KC_T)", + "LCTL(KC_PGDN)", + "LCTL(KC_PGDN)", + "KC_PGDN", + "KC_HOME", + "KC_UP", + "KC_INS", + "LSFT(KC_INS)", + "KC_ESC", + + "KC_TRNS", + "KC_CAPS", + "LGUI(KC_LEFT)", + "LGUI(KC_TAB)", + "LGUI(KC_RGHT)", + "LGUI(KC_RGHT)", + "KC_LEFT", + "KC_LEFT", + "KC_DOWN", + "KC_RGHT", + "KC_END", + "KC_PSCR", + + "KC_TRNS", + "KC_NO", + "KC_NO", + "KC_NO", + "LCTL(KC_PGUP)", + "LCTL(KC_PGUP)", + "KC_PGUP", + "KC_TRNS", + "KC_DOWN", + "KC_NO", + "KC_APP", + "KC_TRNS", + + "KC_TRNS", + "KC_TRNS", + "KC_TRNS", + "KC_SPC", + "KC_DEL", + + "KC_ENT", + "KC_SPC", + "KC_BSPC", + "KC_TRNS", + "KC_TRNS", + + "TG(4)", + "KC_TRNS", + + "KC_ENT", + "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_TRNS", + "KC_NO", + "KC_MPLY", + "KC_VOLU", + "KC_VOLU", + "KC_NO", + "KC_NO", + "KC_NO", + "KC_NO", + "KC_NO", + "RESET", + "KC_PWR", + + "KC_TRNS", + "KC_NO", + "KC_MPRV", + "KC_MUTE", + "KC_MNXT", + "KC_NO", + "KC_NO", + "KC_NO", + "KC_NO", + "KC_NO", + "KC_NO", + "KC_SLEP", + + "KC_TRNS", + "MO(5)", + "KC_NO", + "KC_VOLD", + "KC_VOLD", + "KC_NO", + "KC_NO", + "KC_NO", + "KC_NO", + "KC_NO", + "KC_NO", + "KC_NO", + + "KC_TRNS", + "KC_TRNS", + "KC_TRNS", + "KC_SPC", + "KC_DEL", + + "KC_ENT", + "KC_SPC", + "KC_BSPC", + "KC_TRNS", + "KC_TRNS", + + "TG(5)", + "TG(5)", + + "KC_ENT", + "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_TRNS", + "KC_ACL1", + "KC_NO", + "KC_NO", + "KC_NO", + "KC_NO", + "KC_WH_U", + "KC_WH_L", + "KC_MS_U", + "KC_WH_R", + "KC_NO", + "KC_NO", + + "KC_TRNS", + "KC_ACL2", + "KC_BTN2", + "KC_BTN3", + "KC_BTN1", + "KC_BTN1", + "KC_MS_L", + "KC_MS_L", + "KC_MS_D", + "KC_MS_R", + "KC_NO", + "KC_NO", + + "KC_TRNS", + "KC_ACL0", + "KC_NO", + "KC_NO", + "KC_NO", + "KC_NO", + "KC_WH_D", + "KC_NO", + "KC_MS_D", + "KC_NO", + "KC_NO", + "KC_TRNS", + + "KC_TRNS", + "KC_TRNS", + "KC_TRNS", + "KC_SPC", + "KC_DEL", + + "KC_ENT", + "KC_SPC", + "KC_BSPC", + "KC_TRNS", + "KC_TRNS", + + "TG(6)", + "KC_TRNS", + + "KC_ENT", + "KC_TRNS" + ] + ] +} diff --git a/keyboards/handwired/dactyl_manuform/5x6_5/rules.mk b/keyboards/handwired/dactyl_manuform/5x6_5/rules.mk new file mode 100644 index 000000000000..a20a3e7bd7ba --- /dev/null +++ b/keyboards/handwired/dactyl_manuform/5x6_5/rules.mk @@ -0,0 +1,3 @@ +BOOTMAGIC_ENABLE = lite +COMMAND_ENABLE = no +NKRO_ENABLE = yes diff --git a/keyboards/handwired/dactyl_manuform/dactyl_manuform.h b/keyboards/handwired/dactyl_manuform/dactyl_manuform.h index d8f27f729cf9..c91b247f163d 100644 --- a/keyboards/handwired/dactyl_manuform/dactyl_manuform.h +++ b/keyboards/handwired/dactyl_manuform/dactyl_manuform.h @@ -6,6 +6,8 @@ #include "4x6.h" #elif KEYBOARD_handwired_dactyl_manuform_5x6 #include "5x6.h" +#elif KEYBOARD_handwired_dactyl_manuform_5x6_5 + #include "5x6_5.h" #elif KEYBOARD_handwired_dactyl_manuform_5x7 #include "5x7.h" #elif KEYBOARD_handwired_dactyl_manuform_6x6 From a1c89fec72fd448aee5991da1a537aa235878f15 Mon Sep 17 00:00:00 2001 From: mechlovin <57231893+mechlovin@users.noreply.github.com> Date: Sat, 1 Aug 2020 03:19:47 +0700 Subject: [PATCH 494/930] [Keyboard] Kanu PCB (#9729) * add Kanu PCB * update * update * update * Update info.json * Update config.h * Update info.json * Update info.json * update * Update rules.mk --- keyboards/mechlovin/kanu/config.h | 57 +++++ keyboards/mechlovin/kanu/info.json | 230 ++++++++++++++++++ keyboards/mechlovin/kanu/kanu.c | 46 ++++ keyboards/mechlovin/kanu/kanu.h | 65 +++++ .../mechlovin/kanu/keymaps/ansi/keymap.c | 47 ++++ .../mechlovin/kanu/keymaps/ansi/readme.md | 1 + .../mechlovin/kanu/keymaps/default/keymap.c | 48 ++++ .../mechlovin/kanu/keymaps/default/readme.md | 1 + keyboards/mechlovin/kanu/keymaps/via/keymap.c | 48 ++++ .../mechlovin/kanu/keymaps/via/readme.md | 1 + keyboards/mechlovin/kanu/readme.md | 18 ++ keyboards/mechlovin/kanu/rules.mk | 24 ++ 12 files changed, 586 insertions(+) create mode 100644 keyboards/mechlovin/kanu/config.h create mode 100644 keyboards/mechlovin/kanu/info.json create mode 100644 keyboards/mechlovin/kanu/kanu.c create mode 100644 keyboards/mechlovin/kanu/kanu.h create mode 100644 keyboards/mechlovin/kanu/keymaps/ansi/keymap.c create mode 100644 keyboards/mechlovin/kanu/keymaps/ansi/readme.md create mode 100644 keyboards/mechlovin/kanu/keymaps/default/keymap.c create mode 100644 keyboards/mechlovin/kanu/keymaps/default/readme.md create mode 100644 keyboards/mechlovin/kanu/keymaps/via/keymap.c create mode 100644 keyboards/mechlovin/kanu/keymaps/via/readme.md create mode 100644 keyboards/mechlovin/kanu/readme.md create mode 100644 keyboards/mechlovin/kanu/rules.mk diff --git a/keyboards/mechlovin/kanu/config.h b/keyboards/mechlovin/kanu/config.h new file mode 100644 index 000000000000..3e5c0ee6766f --- /dev/null +++ b/keyboards/mechlovin/kanu/config.h @@ -0,0 +1,57 @@ +/* +Copyright 2020 Team 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 0x4B4E // KN-Kanu +#define DEVICE_VER 0x0001 +#define MANUFACTURER Mechlovin +#define PRODUCT Kanu + +/* 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 { B5, B6, D3, C6, C7 } +#define MATRIX_COL_PINS { E6, B1, B3, F0, F1, F4, F5, F6, F7, D5, D4, B4, D6, D7, B0 } +#define UNUSED_PINS + +/* COL2ROW, ROW2COL*/ +#define DIODE_DIRECTION COL2ROW + + +#define BACKLIGHT_PIN B7 +#define BACKLIGHT_BREATHING +#define BACKLIGHT_LEVELS 3 + +#define RGB_DI_PIN E2 +#define RGBLED_NUM 6 +#define RGBLIGHT_ANIMATIONS diff --git a/keyboards/mechlovin/kanu/info.json b/keyboards/mechlovin/kanu/info.json new file mode 100644 index 000000000000..3369ac476478 --- /dev/null +++ b/keyboards/mechlovin/kanu/info.json @@ -0,0 +1,230 @@ +{ + "keyboard_name": "Kanu", + "url": "", + "maintainer": "Team Mechlovin'", + "width": 16, + "height": 5, + "layouts": { + "LAYOUT_all": { + "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} + ] + }, + "LAYOUT_65_iso_blocker_split_bs": { + "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":"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":1, "w":1.25, "h":2}, + {"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":"K46 (B4,C3)", "x":3.75, "y":4, "w":6.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} + ] + }, + "LAYOUT_65_ansi_blocker": { + "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, "w":2}, + {"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":"K2D (B2,D2)", "x":12.75, "y":2, "w":2.25}, + {"label":"K2E (B2,D3)", "x":15, "y":2}, + {"label":"K30 (B3,B5)", "x":0, "y":3, "w":2.25}, + {"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":"K46 (B4,C3)", "x":3.75, "y":4, "w":6.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/kanu/kanu.c b/keyboards/mechlovin/kanu/kanu.c new file mode 100644 index 000000000000..991778516114 --- /dev/null +++ b/keyboards/mechlovin/kanu/kanu.c @@ -0,0 +1,46 @@ +/* Copyright 2020 Team 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 "kanu.h" + +void matrix_init_kb(void) { + matrix_init_user(); + led_init_ports(); +}; +void led_init_ports(void) { + setPinOutput(B2); + setPinOutput(D0); + setPinOutput(D1); + setPinOutput(D2); + +} +bool led_update_kb(led_t led_state) { + if(led_update_user(led_state)) { + writePin(B2, led_state.caps_lock); + } + + return true; +} + +layer_state_t layer_state_set_kb(layer_state_t state) { + // if on layer 1, turn on D2 LED, otherwise off. + writePin(D2, get_highest_layer(state) == 1); + // if on layer 2, turn on D1 LED, otherwise off. + writePin(D1, get_highest_layer(state) == 2); + // if on layer 3, turn on D0 LED, otherwise off. + writePin(D0, get_highest_layer(state) == 3); + return state; +} \ No newline at end of file diff --git a/keyboards/mechlovin/kanu/kanu.h b/keyboards/mechlovin/kanu/kanu.h new file mode 100644 index 000000000000..be8f400a0fe0 --- /dev/null +++ b/keyboards/mechlovin/kanu/kanu.h @@ -0,0 +1,65 @@ +/* Copyright 2020 Team 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, 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_65_iso_blocker_split_bs( \ + 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_65_ansi_blocker( \ + 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/kanu/keymaps/ansi/keymap.c b/keyboards/mechlovin/kanu/keymaps/ansi/keymap.c new file mode 100644 index 000000000000..cc8a3b510985 --- /dev/null +++ b/keyboards/mechlovin/kanu/keymaps/ansi/keymap.c @@ -0,0 +1,47 @@ +/* Copyright 2020 Team 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_65_ansi_blocker( /* 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_65_ansi_blocker( /* Layer1 */ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 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_65_ansi_blocker( /* 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_65_ansi_blocker( /* Layer3 */ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 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/kanu/keymaps/ansi/readme.md b/keyboards/mechlovin/kanu/keymaps/ansi/readme.md new file mode 100644 index 000000000000..b5ae1d393a41 --- /dev/null +++ b/keyboards/mechlovin/kanu/keymaps/ansi/readme.md @@ -0,0 +1 @@ +# The ansi keymap for kanu diff --git a/keyboards/mechlovin/kanu/keymaps/default/keymap.c b/keyboards/mechlovin/kanu/keymaps/default/keymap.c new file mode 100644 index 000000000000..30db14c79eaa --- /dev/null +++ b/keyboards/mechlovin/kanu/keymaps/default/keymap.c @@ -0,0 +1,48 @@ +/* Copyright 2020 Team 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/kanu/keymaps/default/readme.md b/keyboards/mechlovin/kanu/keymaps/default/readme.md new file mode 100644 index 000000000000..baed249ecee9 --- /dev/null +++ b/keyboards/mechlovin/kanu/keymaps/default/readme.md @@ -0,0 +1 @@ +# The default keymap (full layout) for kanu diff --git a/keyboards/mechlovin/kanu/keymaps/via/keymap.c b/keyboards/mechlovin/kanu/keymaps/via/keymap.c new file mode 100644 index 000000000000..30db14c79eaa --- /dev/null +++ b/keyboards/mechlovin/kanu/keymaps/via/keymap.c @@ -0,0 +1,48 @@ +/* Copyright 2020 Team 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/kanu/keymaps/via/readme.md b/keyboards/mechlovin/kanu/keymaps/via/readme.md new file mode 100644 index 000000000000..2f28c723f961 --- /dev/null +++ b/keyboards/mechlovin/kanu/keymaps/via/readme.md @@ -0,0 +1 @@ +# The via keymap for kanu diff --git a/keyboards/mechlovin/kanu/readme.md b/keyboards/mechlovin/kanu/readme.md new file mode 100644 index 000000000000..940c63bc32b5 --- /dev/null +++ b/keyboards/mechlovin/kanu/readme.md @@ -0,0 +1,18 @@ +# kanu + +![kanu](https://i.imgur.com/8JoH7wAl.jpg) + +Kanu PCB, compatible Canoe keyboard V1. + +* Keyboard Maintainer: [Team Mechlovin'](https://github.com/mechlovin) +* Hardware Supported: Canoe V1 +* Hardware Availability: [Geekhack GB](https://geekhack.org/index.php?topic=106810.0), [Reddit GB](https://www.reddit.com/r/mechmarket/comments/gxtgio/gb_mechlovin_kanu_canoe_v1_compatible_pcb_plates/) + + +Make example for this keyboard (after setting up your build environment): + + make mechlovin/kanu: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). + +**Reset Key:** To put the Kanu into bootloader, hold esc key while plugging in. diff --git a/keyboards/mechlovin/kanu/rules.mk b/keyboards/mechlovin/kanu/rules.mk new file mode 100644 index 000000000000..47edeec7cbf4 --- /dev/null +++ b/keyboards/mechlovin/kanu/rules.mk @@ -0,0 +1,24 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +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 = yes # Enable keyboard RGB underglow +BLUETOOTH_ENABLE = no # Enable Bluetooth +AUDIO_ENABLE = no # Audio output + +LAYOUTS = 65_ansi_blocker From b70ac594c6c342357780ffa77f78f4ac67e25c2e Mon Sep 17 00:00:00 2001 From: eniigmakeyboards Date: Fri, 31 Jul 2020 17:38:21 -0400 Subject: [PATCH 495/930] [Keyboard] Eniigma Keyboards ek65 PCB (#9836) * Added initial files * Update readme.md * Update readme.md * Update readme.md * Update readme.md * Update readme.md * Reverted image file to imgur link * Update keyboards/eniigmakeyboards/ek65/rules.mk * Update keyboards/eniigmakeyboards/ek65/config.h * Update keyboards/eniigmakeyboards/ek65/config.h * Update keyboards/eniigmakeyboards/ek65/ek65.h * Update keyboards/eniigmakeyboards/ek65/info.json * Fixed image link in Readme * Update keyboards/eniigmakeyboards/ek65/readme.md to remove duplicated image --- keyboards/eniigmakeyboards/ek65/config.h | 200 ++++++++++++++++++ keyboards/eniigmakeyboards/ek65/ek65.c | 18 ++ keyboards/eniigmakeyboards/ek65/ek65.h | 74 +++++++ keyboards/eniigmakeyboards/ek65/info.json | 36 ++++ .../ek65/keymaps/default/keymap.c | 18 ++ .../ek65/keymaps/via/keymap.c | 32 +++ .../ek65/keymaps/via/rules.mk | 1 + keyboards/eniigmakeyboards/ek65/readme.md | 15 ++ keyboards/eniigmakeyboards/ek65/rules.mk | 22 ++ 9 files changed, 416 insertions(+) create mode 100644 keyboards/eniigmakeyboards/ek65/config.h create mode 100644 keyboards/eniigmakeyboards/ek65/ek65.c create mode 100644 keyboards/eniigmakeyboards/ek65/ek65.h create mode 100644 keyboards/eniigmakeyboards/ek65/info.json create mode 100644 keyboards/eniigmakeyboards/ek65/keymaps/default/keymap.c create mode 100644 keyboards/eniigmakeyboards/ek65/keymaps/via/keymap.c create mode 100644 keyboards/eniigmakeyboards/ek65/keymaps/via/rules.mk create mode 100644 keyboards/eniigmakeyboards/ek65/readme.md create mode 100644 keyboards/eniigmakeyboards/ek65/rules.mk diff --git a/keyboards/eniigmakeyboards/ek65/config.h b/keyboards/eniigmakeyboards/ek65/config.h new file mode 100644 index 000000000000..e1b86dfa1d5b --- /dev/null +++ b/keyboards/eniigmakeyboards/ek65/config.h @@ -0,0 +1,200 @@ +/* +Copyright 2020 adamws + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License 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 0x454B +#define PRODUCT_ID 0x0002 +#define DEVICE_VER 0x0001 +#define MANUFACTURER Eniigma Keyboards +#define PRODUCT ek65 + +/* key matrix size */ +#define MATRIX_ROWS 5 +#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 { D0, D1, D2, D3, D5 } +#define MATRIX_COL_PINS { F0, F1, F4, F5, F6, F7, C7, C6, B6, B5, B4, D7, E6, B2, B1, B0 } +#define UNUSED_PINS { B3, B7, D4, D6 } + +/* 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 */ +#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/eniigmakeyboards/ek65/ek65.c b/keyboards/eniigmakeyboards/ek65/ek65.c new file mode 100644 index 000000000000..5fbb75dc822f --- /dev/null +++ b/keyboards/eniigmakeyboards/ek65/ek65.c @@ -0,0 +1,18 @@ +/* Copyright 2020 adamws + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#include "ek65.h" + diff --git a/keyboards/eniigmakeyboards/ek65/ek65.h b/keyboards/eniigmakeyboards/ek65/ek65.h new file mode 100644 index 000000000000..53d6f4d62e5c --- /dev/null +++ b/keyboards/eniigmakeyboards/ek65/ek65.h @@ -0,0 +1,74 @@ +/* Copyright 2020 adamws + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License 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 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, k0e, 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, \ + k40, k43, k47, k4b, k4d, k4e, k4f \ +) \ +{ \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, k0e, k0f }, \ + { k10, XXX, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d, k1e, k1f }, \ + { k20, XXX, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2d, XXX, k2f }, \ + { XXX, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, XXX, k3d, k3e, k3f }, \ + { k40, XXX, XXX, k43, XXX, XXX, XXX, k47, XXX, XXX, XXX, k4b, XXX, k4d, k4e, k4f } \ +} + +#define LAYOUT_ansi( \ + 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, \ + k40, k43, k47, k4b, k4d, k4e, k4f \ +) \ +{ \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, XXX, k0f }, \ + { k10, XXX, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d, k1e, k1f }, \ + { k20, XXX, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2d, XXX, k2f }, \ + { XXX, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, XXX, k3d, k3e, k3f }, \ + { k40, XXX, XXX, k43, XXX, XXX, XXX, k47, XXX, XXX, XXX, k4b, XXX, k4d, k4e, k4f } \ +} + +#define LAYOUT_iso( \ + 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, k2d, k1e, k2f, \ + k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3d, k3e, k3f, \ + k40, k43, k47, k4b, k4d, k4e, k4f \ +) \ +{ \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, XXX, k0f }, \ + { k10, XXX, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d, k1e, k1f }, \ + { k20, XXX, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2d, XXX, k2f }, \ + { XXX, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, XXX, k3d, k3e, k3f }, \ + { k40, XXX, XXX, k43, XXX, XXX, XXX, k47, XXX, XXX, XXX, k4b, XXX, k4d, k4e, k4f } \ +} diff --git a/keyboards/eniigmakeyboards/ek65/info.json b/keyboards/eniigmakeyboards/ek65/info.json new file mode 100644 index 000000000000..6de239e7c620 --- /dev/null +++ b/keyboards/eniigmakeyboards/ek65/info.json @@ -0,0 +1,36 @@ +{ + "keyboard_name": "ek65", + "url": "", + "maintainer": "adamws", + "width": 16, + "height": 5, + "layouts": { + "LAYOUT_all": { + "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},{"label":"k0e","x":14,"y":0},{"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":"k1e","x":13.5,"y":1,"w":1.5},{"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":"k2d","x":12.75,"y":2,"w":2.25},{"label":"k2f","x":15,"y":2}, + {"label":"k31","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":"k3d","x":12.25,"y":3,"w":1.75},{"label":"k3e","x":14,"y":3},{"label":"k3f","x":15,"y":3}, + {"label":"k40","x":0,"y":4,"w":1.5},{"label":"k43","x":2.25,"y":4,"w":1.5},{"label":"k47","x":3.75,"y":4,"w":7},{"label":"k4b","x":10.75,"y":4,"w":1.5},{"label":"k4d","x":13,"y":4},{"label":"k4e","x":14,"y":4},{"label":"k4f","x":15,"y":4} + ] + }, + "LAYOUT_ansi": { + "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":"k1e","x":13.5,"y":1,"w":1.5},{"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":"k2d","x":12.75,"y":2,"w":2.25},{"label":"k2f","x":15,"y":2}, + {"label":"k31","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":"k3d","x":12.25,"y":3,"w":1.75},{"label":"k3e","x":14,"y":3},{"label":"k3f","x":15,"y":3}, + {"label":"k40","x":0,"y":4,"w":1.5},{"label":"k43","x":2.25,"y":4,"w":1.5},{"label":"k47","x":3.75,"y":4,"w":7},{"label":"k4b","x":10.75,"y":4,"w":1.5},{"label":"k4d","x":13,"y":4},{"label":"k4e","x":14,"y":4},{"label":"k4f","x":15,"y":4} + ] + }, + "LAYOUT_iso": { + "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":"k2d","x":12.75,"y":2},{"label":"k1e","x":13.75,"y":1,"w":1.25,"h":2},{"label":"k2f","x":15,"y":2}, + {"label":"k31","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":"k3d","x":12.25,"y":3,"w":1.75},{"label":"k3e","x":14,"y":3},{"label":"k3f","x":15,"y":3}, + {"label":"k40","x":0,"y":4,"w":1.5},{"label":"k43","x":2.25,"y":4,"w":1.5},{"label":"k47","x":3.75,"y":4,"w":7},{"label":"k4b","x":10.75,"y":4,"w":1.5},{"label":"k4d","x":13,"y":4},{"label":"k4e","x":14,"y":4},{"label":"k4f","x":15,"y":4} + ] + } + } +} diff --git a/keyboards/eniigmakeyboards/ek65/keymaps/default/keymap.c b/keyboards/eniigmakeyboards/ek65/keymaps/default/keymap.c new file mode 100644 index 000000000000..a6a8bf828ed9 --- /dev/null +++ b/keyboards/eniigmakeyboards/ek65/keymaps/default/keymap.c @@ -0,0 +1,18 @@ +#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_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_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, MO(1), + KC_LCTL, KC_LALT, KC_SPC, KC_RALT, KC_LEFT, KC_DOWN, KC_RGHT + ), + [1] = LAYOUT_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_NO, KC_NO, + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_NO, KC_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 + ) +}; diff --git a/keyboards/eniigmakeyboards/ek65/keymaps/via/keymap.c b/keyboards/eniigmakeyboards/ek65/keymaps/via/keymap.c new file mode 100644 index 000000000000..9756a0bf00a9 --- /dev/null +++ b/keyboards/eniigmakeyboards/ek65/keymaps/via/keymap.c @@ -0,0 +1,32 @@ +#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_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_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, MO(1), + KC_LCTL, KC_LALT, KC_SPC, KC_RALT, KC_LEFT, KC_DOWN, KC_RGHT + ), + [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_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 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/eniigmakeyboards/ek65/keymaps/via/rules.mk b/keyboards/eniigmakeyboards/ek65/keymaps/via/rules.mk new file mode 100644 index 000000000000..1e5b99807cb7 --- /dev/null +++ b/keyboards/eniigmakeyboards/ek65/keymaps/via/rules.mk @@ -0,0 +1 @@ +VIA_ENABLE = yes diff --git a/keyboards/eniigmakeyboards/ek65/readme.md b/keyboards/eniigmakeyboards/ek65/readme.md new file mode 100644 index 000000000000..aec1af67e457 --- /dev/null +++ b/keyboards/eniigmakeyboards/ek65/readme.md @@ -0,0 +1,15 @@ +# Eniigma Keyboards ek65 + +![ek65](https://i.imgur.com/s6DI5vu.png) + +A 65% PCB with symmetrical bottom row layout, JST daughterboard support, designed for use with Eniigma Keyboards products. + +* Keyboard Maintainer: [eniigmakeyboards](https://github.com/eniigmakeyboards) and [adamws](https://github.com/adamws) +* Hardware Supported: Vertigo PCB/case +* Hardware Availability: On the [Eniigma Keyboards website](https://eniigmakeyboards.com) + +Make example for this keyboard (after setting up your build environment): + + make eniigmakeyboards/ek65: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/eniigmakeyboards/ek65/rules.mk b/keyboards/eniigmakeyboards/ek65/rules.mk new file mode 100644 index 000000000000..5c0d8f307c54 --- /dev/null +++ b/keyboards/eniigmakeyboards/ek65/rules.mk @@ -0,0 +1,22 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +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 +BLUETOOTH_ENABLE = no # Enable Bluetooth +AUDIO_ENABLE = no # Audio output From f3b518ae4082bd49335c1b60d2cfe89a500ad878 Mon Sep 17 00:00:00 2001 From: Kyle <12398294+hartk1213@users.noreply.github.com> Date: Fri, 31 Jul 2020 16:18:06 -0700 Subject: [PATCH 496/930] [Keyboard] Added a new handwired 2x3,2x4,2x5 keyboard called the Stream_cheap (#9871) * Added a new handwired 2x3,2x4,2x5 keyboard called the Stream_cheap stream cheap is a diy version of the El Gato Stream deck minus the LCD keys but you can always get relegendable keycaps to change the icon if you want * added missing commas in info.json files * update config to change pin definition * changed keymap.c for 2x4 was trying to add macros and multi key commands to the keymap, i added 2 ctrl commands that have more than one key i.e. ctrl-k-c (visual studio comment hot key) and i added a test string to see how type out a string with the press of a button * testing more changes to the keymap to the 2x5 * Update keyboards/handwired/stream_cheap/2x3/2x3.c * Update keyboards/handwired/stream_cheap/2x3/config.h * Update keyboards/handwired/stream_cheap/2x3/rules.mk * Update keyboards/handwired/stream_cheap/2x5/config.h * Update keyboards/handwired/stream_cheap/2x5/info.json * Update keyboards/handwired/stream_cheap/2x3/config.h * Update keyboards/handwired/stream_cheap/2x3/info.json * Update keyboards/handwired/stream_cheap/2x4/config.h * Update keyboards/handwired/stream_cheap/2x4/info.json * Update keyboards/handwired/stream_cheap/2x4/keymaps/default/keymap.c * Update keyboards/handwired/stream_cheap/2x5/info.json * Update keyboards/handwired/stream_cheap/2x5/config.h * Update keyboards/handwired/stream_cheap/2x5/rules.mk * Update keyboards/handwired/stream_cheap/2x4/2x4.c * Update keyboards/handwired/stream_cheap/2x4/config.h * Update keyboards/handwired/stream_cheap/2x4/info.json * Update keyboards/handwired/stream_cheap/2x5/2x5.c * Update keyboards/handwired/stream_cheap/2x4/rules.mk * removed file as per request of user zvecr * removed line in rules.mk for 2x5 * Update keyboards/handwired/stream_cheap/2x5/keymaps/default/keymap.c * Apply suggestions from code review changes suggested in code review --- keyboards/handwired/stream_cheap/2x3/2x3.c | 1 + keyboards/handwired/stream_cheap/2x3/2x3.h | 11 ++++ keyboards/handwired/stream_cheap/2x3/config.h | 27 +++++++++ .../handwired/stream_cheap/2x3/info.json | 19 ++++++ .../stream_cheap/2x3/keymaps/default/keymap.c | 21 +++++++ keyboards/handwired/stream_cheap/2x3/rules.mk | 22 +++++++ keyboards/handwired/stream_cheap/2x4/2x4.c | 1 + keyboards/handwired/stream_cheap/2x4/2x4.h | 12 ++++ keyboards/handwired/stream_cheap/2x4/config.h | 27 +++++++++ .../handwired/stream_cheap/2x4/info.json | 21 +++++++ .../stream_cheap/2x4/keymaps/default/keymap.c | 46 ++++++++++++++ keyboards/handwired/stream_cheap/2x4/rules.mk | 22 +++++++ keyboards/handwired/stream_cheap/2x5/2x5.c | 1 + keyboards/handwired/stream_cheap/2x5/2x5.h | 11 ++++ keyboards/handwired/stream_cheap/2x5/config.h | 26 ++++++++ .../handwired/stream_cheap/2x5/info.json | 23 +++++++ .../stream_cheap/2x5/keymaps/default/keymap.c | 60 +++++++++++++++++++ keyboards/handwired/stream_cheap/2x5/rules.mk | 22 +++++++ keyboards/handwired/stream_cheap/readme.md | 23 +++++++ 19 files changed, 396 insertions(+) create mode 100644 keyboards/handwired/stream_cheap/2x3/2x3.c create mode 100644 keyboards/handwired/stream_cheap/2x3/2x3.h create mode 100644 keyboards/handwired/stream_cheap/2x3/config.h create mode 100644 keyboards/handwired/stream_cheap/2x3/info.json create mode 100644 keyboards/handwired/stream_cheap/2x3/keymaps/default/keymap.c create mode 100644 keyboards/handwired/stream_cheap/2x3/rules.mk create mode 100644 keyboards/handwired/stream_cheap/2x4/2x4.c create mode 100644 keyboards/handwired/stream_cheap/2x4/2x4.h create mode 100644 keyboards/handwired/stream_cheap/2x4/config.h create mode 100644 keyboards/handwired/stream_cheap/2x4/info.json create mode 100644 keyboards/handwired/stream_cheap/2x4/keymaps/default/keymap.c create mode 100644 keyboards/handwired/stream_cheap/2x4/rules.mk create mode 100644 keyboards/handwired/stream_cheap/2x5/2x5.c create mode 100644 keyboards/handwired/stream_cheap/2x5/2x5.h create mode 100644 keyboards/handwired/stream_cheap/2x5/config.h create mode 100644 keyboards/handwired/stream_cheap/2x5/info.json create mode 100644 keyboards/handwired/stream_cheap/2x5/keymaps/default/keymap.c create mode 100644 keyboards/handwired/stream_cheap/2x5/rules.mk create mode 100644 keyboards/handwired/stream_cheap/readme.md diff --git a/keyboards/handwired/stream_cheap/2x3/2x3.c b/keyboards/handwired/stream_cheap/2x3/2x3.c new file mode 100644 index 000000000000..688974787395 --- /dev/null +++ b/keyboards/handwired/stream_cheap/2x3/2x3.c @@ -0,0 +1 @@ +#include "2x3.h" diff --git a/keyboards/handwired/stream_cheap/2x3/2x3.h b/keyboards/handwired/stream_cheap/2x3/2x3.h new file mode 100644 index 000000000000..12e9a460966a --- /dev/null +++ b/keyboards/handwired/stream_cheap/2x3/2x3.h @@ -0,0 +1,11 @@ +#pragma once + +#include "quantum.h" + +#define LAYOUT_ortho_2x3( \ + K00, K01, K02, \ + K03, K04, K05 \ +) { \ + { K00, K01, K02}, \ + { K03, K04, K05} \ +} diff --git a/keyboards/handwired/stream_cheap/2x3/config.h b/keyboards/handwired/stream_cheap/2x3/config.h new file mode 100644 index 000000000000..a142ec4a4e1e --- /dev/null +++ b/keyboards/handwired/stream_cheap/2x3/config.h @@ -0,0 +1,27 @@ +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x1213 +#define DEVICE_VER 0x0001 +#define MANUFACTURER Kyle Hart +#define PRODUCT Stream Cheap 2x3 + +/* key matrix size */ +#define MATRIX_ROWS 2 +#define MATRIX_COLS 3 + +/* define direct pins used */ +#define DIRECT_PINS { { D1,C6,B4}, { D0,D4,D7} } + + +/* 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/stream_cheap/2x3/info.json b/keyboards/handwired/stream_cheap/2x3/info.json new file mode 100644 index 000000000000..cdf5e1392fba --- /dev/null +++ b/keyboards/handwired/stream_cheap/2x3/info.json @@ -0,0 +1,19 @@ +{ + "keyboard_name": "Stream Cheap 2x3", + "url": "https://www.thingiverse.com/thing:4497991", + "maintainer": "qmk", + "width": 3, + "height": 2, + "layouts": { + "LAYOUT_ortho_2x3": { + "layout": [ + {"label":"K00", "x":0, "y":0}, + {"label":"K01", "x":1, "y":0}, + {"label":"K02", "x":2, "y":0}, + {"label":"K03", "x":0, "y":1}, + {"label":"K04", "x":1, "y":1}, + {"label":"K05", "x":2, "y":1} + ] + } + } +} diff --git a/keyboards/handwired/stream_cheap/2x3/keymaps/default/keymap.c b/keyboards/handwired/stream_cheap/2x3/keymaps/default/keymap.c new file mode 100644 index 000000000000..5ef589f6a320 --- /dev/null +++ b/keyboards/handwired/stream_cheap/2x3/keymaps/default/keymap.c @@ -0,0 +1,21 @@ +#include QMK_KEYBOARD_H + +enum layers { + NORMAL_LAYER = 0, + SECOND_LAYER +}; + + + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [NORMAL_LAYER] = LAYOUT_ortho_2x3( + KC_1, KC_2, KC_3, + KC_4, KC_5, TO(1) + ), + [SECOND_LAYER] = LAYOUT_ortho_2x3( + KC_A, KC_B, KC_C, + KC_D, KC_E, TO(0) + ) +}; + diff --git a/keyboards/handwired/stream_cheap/2x3/rules.mk b/keyboards/handwired/stream_cheap/2x3/rules.mk new file mode 100644 index 000000000000..e4ffb10d0494 --- /dev/null +++ b/keyboards/handwired/stream_cheap/2x3/rules.mk @@ -0,0 +1,22 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +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 +BLUETOOTH_ENABLE = no # Enable Bluetooth +AUDIO_ENABLE = no # Audio output diff --git a/keyboards/handwired/stream_cheap/2x4/2x4.c b/keyboards/handwired/stream_cheap/2x4/2x4.c new file mode 100644 index 000000000000..a0519d21b761 --- /dev/null +++ b/keyboards/handwired/stream_cheap/2x4/2x4.c @@ -0,0 +1 @@ +#include "2x4.h" diff --git a/keyboards/handwired/stream_cheap/2x4/2x4.h b/keyboards/handwired/stream_cheap/2x4/2x4.h new file mode 100644 index 000000000000..07856044f24b --- /dev/null +++ b/keyboards/handwired/stream_cheap/2x4/2x4.h @@ -0,0 +1,12 @@ +#pragma once + +#include "quantum.h" + +#define LAYOUT_ortho_2x4(\ + K00, K01, K02,K03, \ + K04, K05, K06,K07 \ +) \ + { \ + { K00,K01,K02,K03}, \ + { K04,K05,K06,K07} \ +} diff --git a/keyboards/handwired/stream_cheap/2x4/config.h b/keyboards/handwired/stream_cheap/2x4/config.h new file mode 100644 index 000000000000..14b4d9e36845 --- /dev/null +++ b/keyboards/handwired/stream_cheap/2x4/config.h @@ -0,0 +1,27 @@ +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x1214 +#define DEVICE_VER 0x0001 +#define MANUFACTURER Kyle Hart +#define PRODUCT Stream Cheap 2x4 + +/* key matrix size */ +#define MATRIX_ROWS 2 +#define MATRIX_COLS 4 + +/* define direct pins used */ +#define DIRECT_PINS { { B5,D7,C6,D1}, { B4,E6,D4,D0} } + + +/* 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/stream_cheap/2x4/info.json b/keyboards/handwired/stream_cheap/2x4/info.json new file mode 100644 index 000000000000..ef495dbf6feb --- /dev/null +++ b/keyboards/handwired/stream_cheap/2x4/info.json @@ -0,0 +1,21 @@ +{ + "keyboard_name": "Stream Cheap 2x4", + "url": "https://www.thingiverse.com/thing:4497991", + "maintainer": "qmk", + "width": 4, + "height": 2, + "layouts": { + "LAYOUT_ortho_2x4": { + "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":0, "y":1}, + {"label":"K05", "x":1, "y":1}, + {"label":"K06", "x":2, "y":1}, + {"label":"K07", "x":3, "y":1} + ] + } + } +} diff --git a/keyboards/handwired/stream_cheap/2x4/keymaps/default/keymap.c b/keyboards/handwired/stream_cheap/2x4/keymaps/default/keymap.c new file mode 100644 index 000000000000..541642f9594a --- /dev/null +++ b/keyboards/handwired/stream_cheap/2x4/keymaps/default/keymap.c @@ -0,0 +1,46 @@ +#include QMK_KEYBOARD_H + + +enum layers { + NORMAL_LAYER = 0, + SECOND_LAYER +}; + +enum custom_keycode { + VS_COMMENT = SAFE_RANGE, + VS_UNCOMMENT, + TST_STRING +}; + + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case VS_COMMENT: + if (record->event.pressed) { + SEND_STRING(SS_LCTL("kc")); + } + break; + case VS_UNCOMMENT: + if (record->event.pressed) { + SEND_STRING(SS_LCTL("ku")); + } + break; + case TST_STRING: + if (record->event.pressed) { + SEND_STRING("12345\n"); + } + break; + + } + return true; +} +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [NORMAL_LAYER] = LAYOUT_ortho_2x4( + VS_COMMENT, VS_UNCOMMENT, TST_STRING, KC_4, + KC_5, KC_6, KC_7, TO(1) + ), + [SECOND_LAYER] = LAYOUT_ortho_2x4( + KC_A, KC_B, KC_C, KC_D, + KC_E, KC_F, KC_G, TO(0) + ) +}; diff --git a/keyboards/handwired/stream_cheap/2x4/rules.mk b/keyboards/handwired/stream_cheap/2x4/rules.mk new file mode 100644 index 000000000000..e4ffb10d0494 --- /dev/null +++ b/keyboards/handwired/stream_cheap/2x4/rules.mk @@ -0,0 +1,22 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +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 +BLUETOOTH_ENABLE = no # Enable Bluetooth +AUDIO_ENABLE = no # Audio output diff --git a/keyboards/handwired/stream_cheap/2x5/2x5.c b/keyboards/handwired/stream_cheap/2x5/2x5.c new file mode 100644 index 000000000000..70969a316afe --- /dev/null +++ b/keyboards/handwired/stream_cheap/2x5/2x5.c @@ -0,0 +1 @@ +#include "2x5.h" diff --git a/keyboards/handwired/stream_cheap/2x5/2x5.h b/keyboards/handwired/stream_cheap/2x5/2x5.h new file mode 100644 index 000000000000..f01c8302a25c --- /dev/null +++ b/keyboards/handwired/stream_cheap/2x5/2x5.h @@ -0,0 +1,11 @@ +#pragma once + +#include "quantum.h" + +#define LAYOUT_ortho_2x5( \ + K00, K01, K02, K03, K04, \ + K10, K11, K12, K13, K14 \ +) { \ + { K00, K01, K02, K03, K04 }, \ + { K10, K11, K12, K13, K14 } \ +} diff --git a/keyboards/handwired/stream_cheap/2x5/config.h b/keyboards/handwired/stream_cheap/2x5/config.h new file mode 100644 index 000000000000..cd69c632f1fb --- /dev/null +++ b/keyboards/handwired/stream_cheap/2x5/config.h @@ -0,0 +1,26 @@ +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x1215 +#define DEVICE_VER 0x0001 +#define MANUFACTURER Kyle Hart +#define PRODUCT Stream Cheap 2x5 + +/* key matrix size */ +#define MATRIX_ROWS 2 +#define MATRIX_COLS 5 + +/* define direct pins used */ +#define DIRECT_PINS { { D1,C6,B4,B5,B2}, { D0,D4,D7,E6,B6} } +//#define DIRECT_PINS { { D1, C6, B4, B6, D0}, { D7, D4, B2, B5, E6} } +/* 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/stream_cheap/2x5/info.json b/keyboards/handwired/stream_cheap/2x5/info.json new file mode 100644 index 000000000000..9fd4b054fdb0 --- /dev/null +++ b/keyboards/handwired/stream_cheap/2x5/info.json @@ -0,0 +1,23 @@ +{ + "keyboard_name": "Stream Cheap 2x5", + "url": "https://www.thingiverse.com/thing:4497991", + "maintainer": "qmk", + "width": 5, + "height": 2, + "layouts": { + "LAYOUT_ortho_2x5": { + "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":"K10", "x":0, "y":1}, + {"label":"K11", "x":1, "y":1}, + {"label":"K12", "x":2, "y":1}, + {"label":"K13", "x":3, "y":1}, + {"label":"K14", "x":4, "y":1} + ] + } + } +} diff --git a/keyboards/handwired/stream_cheap/2x5/keymaps/default/keymap.c b/keyboards/handwired/stream_cheap/2x5/keymaps/default/keymap.c new file mode 100644 index 000000000000..6d140a87800d --- /dev/null +++ b/keyboards/handwired/stream_cheap/2x5/keymaps/default/keymap.c @@ -0,0 +1,60 @@ +#include QMK_KEYBOARD_H + + +enum custom_keycode { + VS_COMMENT = SAFE_RANGE, + VS_UNCOMMENT, + TST_STRING +}; + + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case VS_COMMENT: + if (record->event.pressed) { + SEND_STRING(SS_LCTL("kc")); + } + break; + case VS_UNCOMMENT: + if (record->event.pressed) { + SEND_STRING(SS_LCTL("ku")); + } + break; + case TST_STRING: + if (record->event.pressed) { + SEND_STRING("12345\n"); + } + break; + + } + return true; +} + +#define LOCK LGUI(KC_L) +#define CUT LCTL(KC_X) +#define COPY LCTL(KC_C) +#define PASTE LCTL(KC_V) +#define FIND LCTL(KC_F) + +enum layers { + NORMAL_LAYER = 0, + SECOND_LAYER + // , + // THIRD_LAYER +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [NORMAL_LAYER] = LAYOUT_ortho_2x5( + VS_COMMENT, VS_UNCOMMENT, LOCK, TST_STRING, KC_F5, + KC_F9, KC_F10, KC_F11, KC_F12, TO(1) + ), + [SECOND_LAYER] = LAYOUT_ortho_2x5( + KC_MUTE, KC_VOLD, KC_VOLU, KC_MPLY, KC_MSTP, + CUT, COPY, PASTE, FIND, TO(0) + ) + // , + // [THIRD_LAYER] = LAYOUT_ortho_2x5( + // KC_Q, KC_W, KC_E, KC_R, KC_T, + // KC_Y, KC_U, KC_L, KC_P, TO(0) + // ) +}; diff --git a/keyboards/handwired/stream_cheap/2x5/rules.mk b/keyboards/handwired/stream_cheap/2x5/rules.mk new file mode 100644 index 000000000000..e4ffb10d0494 --- /dev/null +++ b/keyboards/handwired/stream_cheap/2x5/rules.mk @@ -0,0 +1,22 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +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 +BLUETOOTH_ENABLE = no # Enable Bluetooth +AUDIO_ENABLE = no # Audio output diff --git a/keyboards/handwired/stream_cheap/readme.md b/keyboards/handwired/stream_cheap/readme.md new file mode 100644 index 000000000000..1b4d77ea9f4a --- /dev/null +++ b/keyboards/handwired/stream_cheap/readme.md @@ -0,0 +1,23 @@ +# Stream Cheap + +An ortholinear macropad, available in 2x3, 2x4, and 2x5 sizes. + +Hardware: + * 3d printed switch plate + * 6-10 key switches + * 3d printed case + * Handwired in Direct Pins mode (i.e. all switches share a common GND and are wired to their own pin) + * Uses a Pro Micro + * Includes a reset switch accessible by a hole on the bottom + +* Keyboard Maintainer: [hartk1213](https://github.com/hartk1213) +* Hardware Supported: Pro Micro +* Hardware Availability: [Thingiverse](https://www.thingiverse.com/thing:4497991) + +Make example for this keyboard (after setting up your build environment): + + make handwired/stream_cheap/2x3:default + make handwired/stream_cheap/2x4:default + make handwired/stream_cheap/2x5: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 0f3e933db98a93afae075ba4150472d5db7e591d Mon Sep 17 00:00:00 2001 From: shela Date: Sat, 1 Aug 2020 08:28:29 +0900 Subject: [PATCH 497/930] [Docs] Update Japanese translation of feature_backlight.md. (#9803) * Update Japanese translation of feature_backlight.md. * fix original document version. * Apply suggestions from code review --- docs/ja/feature_backlight.md | 277 ++++++++++++++++------------------- 1 file changed, 124 insertions(+), 153 deletions(-) diff --git a/docs/ja/feature_backlight.md b/docs/ja/feature_backlight.md index 760c6444c235..9647f215d3ba 100644 --- a/docs/ja/feature_backlight.md +++ b/docs/ja/feature_backlight.md @@ -1,253 +1,224 @@ -# バックライト +# バックライト :id=backlighting 多くのキーボードは、キースイッチを貫通して配置されたり、キースイッチの下に配置された個々の LED によって、バックライトキーをサポートします。この機能は通常スイッチごとに単一の色しか使用できないため、[RGB アンダーグロー](ja/feature_rgblight.md)および [RGB マトリックス](ja/feature_rgb_matrix.md)機能のどちらとも異なりますが、キーボードに複数の異なる単一色の LED を取り付けることは当然可能です。 -QMK は *パルス幅変調*(*Pulse Width Modulation*) すなわち PWM として知られている技術で急速にオンおよびオフを切り替えることで、これらの LED の輝度を制御できます。PWM 信号のデューティサイクルを変えることで、調光の錯覚を起こすことができます。 +QMK は *パルス幅変調* (*Pulse Width Modulation*) すなわち PWM として知られている技術で、一定の比率で素早くオンおよびオフを切り替えることで、これらの LED の輝度を制御できます。PWM 信号のデューティサイクルを変えることで、調光の錯覚を起こすことができます。 MCU は、GPIO ピンにはそんなに電流を供給できません。MCU から直接バックライトに給電せずに、バックライトピンは LED への電力を切り替えるトランジスタあるいは MOSFET に接続されます。 -## 機能の設定 - ほとんどのキーボードではバックライトをサポートしている場合にデフォルトで有効になっていますが、もし機能しない場合は `rules.mk` が以下を含んでいることを確認してください: ```makefile BACKLIGHT_ENABLE = yes ``` -## キーコード +## キーコード :id=keycodes + 有効にすると、以下のキーコードを使ってバックライトレベルを変更することができます。 -| キー | 説明 | -|---------|------------------------------------------| +| キー | 説明 | +| --------- | ------------------------------------ | | `BL_TOGG` | バックライトをオンあるいはオフにする | -| `BL_STEP` | バックライトレベルを循環する | -| `BL_ON` | バックライトを最大輝度に設定する | -| `BL_OFF` | バックライトをオフにする | -| `BL_INC` | バックライトレベルを上げる | -| `BL_DEC` | バックライトレベルを下げる | -| `BL_BRTG` | バックライトの明滅動作を切り替える | - -## バックライト関数群 - -| 関数 | 説明 | -|----------|-----------------------------------------------------------| -| `backlight_toggle()` | バックライトをオンあるいはオフにする | -| `backlight_enable()` | バックライトをオンにする | -| `backlight_disable()` | バックライトをオフにする | -| `backlight_step()` | バックライトレベルを循環する | -| `backlight_increase()` | バックライトレベルを上げる | -| `backlight_decrease()` | バックライトレベルを下げる | -| `backlight_level(x)` | バックライトのレベルを特定のレベルに設定する | -| `get_backlight_level()` | 現在のバックライトレベルを返す | -| `is_backlight_enabled()` | バックライトが現在オンかどうかを返す | - -### バックライトの明滅動作の関数群 - -| 関数 | 説明 | -|----------|---------------------------------------------------| -| `breathing_toggle()` | バックライトの明滅動作をオンまたはオフにする | -| `breathing_enable()` | バックライトの明滅動作をオンにする | -| `breathing_disable()` | バックライトの明滅動作をオフにする | - -## ドライバの設定 +| `BL_STEP` | バックライトレベルを循環する | +| `BL_ON` | バックライトを最大輝度に設定する | +| `BL_OFF` | バックライトをオフにする | +| `BL_INC` | バックライトレベルを上げる | +| `BL_DEC` | バックライトレベルを下げる | +| `BL_BRTG` | バックライトの明滅動作を切り替える | + +## 関数群 :id=functions + +次の関数を使って、カスタムコードでバックライトを変更することができます: + +| 関数 | 説明 | +| ------------------------ | -------------------------------------------- | +| `backlight_toggle()` | バックライトをオンあるいはオフにする | +| `backlight_enable()` | バックライトをオンにする | +| `backlight_disable()` | バックライトをオフにする | +| `backlight_step()` | バックライトレベルを循環する | +| `backlight_increase()` | バックライトレベルを上げる | +| `backlight_decrease()` | バックライトレベルを下げる | +| `backlight_level(x)` | バックライトのレベルを特定のレベルに設定する | +| `get_backlight_level()` | 現在のバックライトレベルを返す | +| `is_backlight_enabled()` | バックライトが現在オンかどうかを返す | + +バックライトの明滅が有効の場合(以下を参照)、以下の関数も利用できます: + +| 関数 | 説明 | +|-----------------------|----------------------------------------------| +| `breathing_toggle()` | バックライトの明滅動作をオンまたはオフにする | +| `breathing_enable()` | バックライトの明滅動作をオンにする | +| `breathing_disable()` | バックライトの明滅動作をオフにする | + +## 設定 :id=configuration どのドライバを使うかを選択するには、以下を使って `rules.mk` を設定します: ```makefile -BACKLIGHT_DRIVER = software # 有効なドライバの値は 'pwm,software,no' です +BACKLIGHT_DRIVER = software ``` -各ドライバについてのヘルプは以下を見てください。 - -## 共通のドライバ設定 +有効なドライバの値は `pwm`, `software`, `custom`, `no` です。各ドライバについてのヘルプは以下を見てください。 -バックライトの挙動を変更するには、`config.h` の中で以下の `#define` をします: +バックライトを設定するには、`config.h` の中で以下の `#define` をします: -| 定義 | デフォルト | 説明 | -|---------------------|-------------|--------------------------------------------------------------------------------------| -| `BACKLIGHT_LEVELS` | `3` | 輝度のレベルの数 (オフを除いて最大 31) | +| 定義 | デフォルト | 説明 | +| --------------------- | ---------- | ------------------------------------------------------------------------------------------- | +| `BACKLIGHT_PIN` | *定義なし* | LED を制御するピン | +| `BACKLIGHT_LEVELS` | `3` | 輝度のレベルの数 (オフを除いて最大 31) | | `BACKLIGHT_CAPS_LOCK` | *定義なし* | バックライトを使って Caps Lock のインジケータを有効にする (専用 LED の無いキーボードのため) | -| `BACKLIGHT_BREATHING` | *定義なし* | サポートされる場合は、バックライトの明滅動作を有効にする | -| `BREATHING_PERIOD` | `6` | 各バックライトの "明滅" の長さ(秒) | -| `BACKLIGHT_ON_STATE` | `0` | バックライトが "オン" の時のバックライトピンの状態 - high の場合は `1`、low の場合は `0` | +| `BACKLIGHT_BREATHING` | *定義なし* | サポートされる場合は、バックライトの明滅動作を有効にする | +| `BREATHING_PERIOD` | `6` | 各バックライトの "明滅" の長さ(秒) | +| `BACKLIGHT_ON_STATE` | `1` | バックライトが "オン" の時のバックライトピンの状態 - high の場合は `1`、low の場合は `0` | -### バックライトオン状態 +独自のキーボードを設計しているわけではない限り、通常は `BACKLIGHT_PIN` または `BACKLIGHT_ON_STATE` を変更する必要はありません。 -ほとんどのバックライトの回路は N チャンネルの MOSFET あるいは NPN トランジスタによって駆動されます。これは、トランジスタを*オン*にして LED を点灯させるには、ゲートまたはベースに接続されているバックライトピンを *high* に駆動する必要があることを意味します。 +### バックライトオン状態 :id=backlight-on-state + +ほとんどのバックライトの回路は N チャンネルの MOSFET あるいは NPN トランジスタによって駆動されます。これは、トランジスタを *オン* にして LED を点灯させるには、ゲートまたはベースに接続されているバックライトピンを *high* に駆動する必要があることを意味します。 ただし、P チャンネルの MOSFET あるいは PNP トランジスタが使われる場合があります。この場合、トランジスタがオンの時、ピンは代わりに *low* で駆動されます。 -この機能は `BACKLIGHT_ON_STATE` 定義することでキーボードレベルで設定されます。 +この機能は `BACKLIGHT_ON_STATE` を定義することでキーボードレベルで設定されます。 + +### AVR ドライバ :id=avr-driver -## AVR ドライバ +`pwm` ドライバはデフォルトで設定されますが、`rules.mk` 内での同等の設定は以下の通りです: -AVR ボードでは、デフォルトのドライバは現在のところ最善のシナリオを選択するために構成を探っています。ドライバはデフォルトで設定されますが、rules.mk 内の同等の設定は以下の通りです: ```makefile BACKLIGHT_DRIVER = pwm ``` -### 注意事項 +#### 注意事項 :id=avr-caveats -ハードウェア PWM は以下の表に従ってサポートされます: +AVR ボードでは、QMK はどのドライバを使うかを以下の表に従って自動的に決定します: | バックライトピン | AT90USB64/128 | ATmega16/32U4 | ATmega16/32U2 | ATmega32A | ATmega328/P | -|-------------|-------------|-------------|-------------|---------|----------| -| `B1` | | | | | Timer 1 | -| `B2` | | | | | Timer 1 | -| `B5` | Timer 1 | Timer 1 | | | | -| `B6` | Timer 1 | Timer 1 | | | | -| `B7` | Timer 1 | Timer 1 | Timer 1 | | | -| `C4` | Timer 3 | | | | | -| `C5` | Timer 3 | | Timer 1 | | | -| `C6` | Timer 3 | Timer 3 | Timer 1 | | | -| `D4` | | | | Timer 1 | | -| `D5` | | | | Timer 1 | | - -他の全てのピンはソフトウェア PWM を使います。[オーディオ](ja/feature_audio.md)機能が無効あるいは1つのタイマだけを使っている場合は、ハードウェアタイマによってバックライト PWM を引き起こすことができます: +| ---------------- | ------------- | ------------- | ------------- | --------- | ----------- | +| `B1` | | | | | Timer 1 | +| `B2` | | | | | Timer 1 | +| `B5` | Timer 1 | Timer 1 | | | | +| `B6` | Timer 1 | Timer 1 | | | | +| `B7` | Timer 1 | Timer 1 | Timer 1 | | | +| `C4` | Timer 3 | | | | | +| `C5` | Timer 3 | | Timer 1 | | | +| `C6` | Timer 3 | Timer 3 | Timer 1 | | | +| `D4` | | | | Timer 1 | | +| `D5` | | | | Timer 1 | | + +他の全てのピンはタイマー支援ソフトウェア PWM を使います。 | オーディオピン | オーディオタイマ | ソフトウェア PWM タイマ | -|---------|-----------|------------------| -| `C4` | Timer 3 | Timer 1 | -| `C5` | Timer 3 | Timer 1 | -| `C6` | Timer 3 | Timer 1 | -| `B5` | Timer 1 | Timer 3 | -| `B6` | Timer 1 | Timer 3 | -| `B7` | Timer 1 | Timer 3 | - -両方のタイマーがオーディオのために使われている場合、バックライト PWM はハードウェアタイマを使いませんが、代わりにマトリックススキャンの間に引き起こされます。この場合、PWM の計算は十分なタイミングの精度で呼ばれないかもしれないため、バックライトの明滅はサポートされず、バックライトもちらつくかもしれません。 - -### AVR 設定 - -バックライトの挙動を変更するには、`config.h` の中で以下の `#define` をします: - -| 定義 | デフォルト | 説明 | -|---------------------|-------------|--------------------------------------------------------------------------------------------------------------| -| `BACKLIGHT_PIN` | `B7` | LED を制御するピン。自身のキーボードを設計している場合を除き、これを変更する必要はないはずです | -| `BACKLIGHT_PINS` | *定義なし* | 実験的: 詳細は以下を見てください | -| `BACKLIGHT_LEVELS` | `3` | 輝度のレベルの数 (オフを除いて最大 31) | -| `BACKLIGHT_CAPS_LOCK` | *定義なし* | バックライトを使って Caps Lock のインジケータを有効にする (専用 LED の無いキーボードのため) | -| `BACKLIGHT_BREATHING` | *定義なし* | サポートされる場合は、バックライトの明滅動作を有効にする | -| `BREATHING_PERIOD` | `6` | 各バックライトの "明滅" の長さ(秒) | -| `BACKLIGHT_ON_STATE` | `1` | バックライトが "オン" の時のバックライトピンの状態 - high の場合は `1`、low の場合は `0` | - -### バックライトオン状態 - -ほとんどのバックライトの回路は N チャンネルの MOSFET あるいは NPN トランジスタによって駆動されます。これは、トランジスタを*オン*にして LED を点灯させるには、ゲートまたはベースに接続されているバックライトピンを *high* に駆動する必要があることを意味します。 -ただし、P チャンネルの MOSFET あるいは PNP トランジスタが使われる場合があります。この場合、トランジスタがオンの時、ピンは代わりに *low* で駆動されます。 - -この機能は `BACKLIGHT_ON_STATE` 定義することでキーボードレベルで設定されます。 - -### 複数のバックライトピン +| -------------- | ---------------- | ----------------------- | +| `C4` | Timer 3 | Timer 1 | +| `C5` | Timer 3 | Timer 1 | +| `C6` | Timer 3 | Timer 1 | +| `B5` | Timer 1 | Timer 3 | +| `B6` | Timer 1 | Timer 3 | +| `B7` | Timer 1 | Timer 3 | -ほとんどのキーボードは、全てのバックライト LED を制御するたった1つのバックライトピンを持ちます (特にバックライトがハードウェア PWM ピンに接続されている場合)。 -ソフトウェア PWM では、複数のバックライトピンを定義することができます。これらすべてのピンは PWM デューティサイクル時に同時にオンおよびオフになります。 -この機能により、例えば Caps Lock LED (またはその他の制御可能な LED) の輝度を、バックライトの他の LED と同じレベルに設定することができます。Caps Lock の代わりに LCTRL をマップしていて、Caps Lock がオンの時に Caps Lock LED をアクティブにする代わりにバックライトの一部にする必要がある場合に便利です。 - -複数のバックライトピンをアクティブにするには、`config.h` に次のようなものを追加する必要があります: - -```c -#define BACKLIGHT_LED_COUNT 2 -#undef BACKLIGHT_PIN -#define BACKLIGHT_PINS { F5, B2 } -``` +両方のタイマーがオーディオのために使われている場合、バックライト PWM はハードウェアタイマを使うことができず、代わりにマトリックススキャンの間に引き起こされます。この場合、PWM の計算は十分なタイミングの精度で呼ばれない可能性があるため、バックライトの明滅はサポートされず、バックライトもちらつくかもしれません。 -### ハードウェア PWM 実装 +#### ハードウェア PWM 実装 :id=hardware-pwm-implementation バックライト用にサポートされているピンを使う場合、QMK は PWM 信号を出力するように設定されたハードウェアタイマを使います。タイマーは 0 にリセットする前に `ICRx` (デフォルトでは `0xFFFF`) までカウントします。 -希望の輝度が計算され、`OCRxx` レジスタ内に格納されます。カウンタがこの値まで達すると、バックライトピンは low になり、カウンタがリセットされると再び high になります。 +希望の輝度が計算され、`OCRxx` レジスタに格納されます。カウンタがこの値まで達すると、バックライトピンは low になり、カウンタがリセットされると再び high になります。 このように `OCRxx` は基本的に LED のデューティサイクル、従って輝度を制御します。`0x0000` は完全にオフで、 `0xFFFF` は完全にオンです。 明滅動作の効果はカウンタがリセットされる(秒間あたりおよそ244回)たびに呼び出される `TIMER1_OVF_vect` の割り込みハンドラを登録することで可能になります。 -このハンドラ内で、増分カウンタの値が事前に計算された輝度曲線にマップされます。明滅動作をオフにするには、割り込みを単純に禁止し、輝度を EEPROM に格納されているレベルに再設定します。 +このハンドラで、増分カウンタの値が事前に計算された輝度曲線にマップされます。明滅動作をオフにするには、割り込みを単純に禁止し、輝度を EEPROM に格納されているレベルに再設定します。 -### タイマーにアシストされた PWM 実装 +#### タイマー支援 PWM 実装 :id=timer-assisted-implementation `BACKLIGHT_PIN` がハードウェアバックライトピンに設定されていない場合、QMK はソフトウェア割り込みを引き起こすように設定されているハードウェアタイマを使います。タイマーは 0 にリセットする前に `ICRx` (デフォルトでは `0xFFFF`) までカウントします。 0 に再設定すると、CPU は LED をオンにする OVF (オーバーフロー)割り込みを発火し、デューティサイクルを開始します。 -希望の輝度が計算され、`OCRxx` レジスタ内に格納されます。カウンタがこの値に達すると、CPU は比較出力一致割り込みを発火し、LED をオフにします。 +希望の輝度が計算され、`OCRxx` レジスタに格納されます。カウンタがこの値に達すると、CPU は比較出力一致割り込みを発火し、LED をオフにします。 このように `OCRxx` は基本的に LED のデューティサイクル、従って輝度を制御します。 `0x0000` は完全にオフで、 `0xFFFF` は完全にオンです。 明滅の効果はハードウェア PWM 実装と同じです。 -## ARM ドライバ +### ARM ドライバ :id=arm-configuration + +まだ初期段階ですが、ARM バックライトサポートは最終的に AVR と同等の機能を持つことを目指しています。`pwm` ドライバはデフォルトで設定されますが、`rules.mk` 内での同等の設定は以下の通りです: -まだ初期段階ですが、ARM バックライトサポートは最終的に AVR と同等の機能を持つことを目指しています。ドライバはデフォルトで設定されますが、rules.mk 内の同等の設定は以下の通りです: ```makefile BACKLIGHT_DRIVER = pwm ``` -### 注意事項 +#### ChibiOS の設定 :id=arm-configuration + +以下の `#define` は ARM ベースのキーボードにのみ適用されます: -現在のところ、ハードウェア PWM のみがサポートされ、タイマーはアシストされず、自動設定は提供されません。 +| 定義 | デフォルト | 説明 | +| ----------------------- | ---------- | ----------------------- | +| `BACKLIGHT_PWM_DRIVER` | `PWMD4` | 使用する PWM ドライバ | +| `BACKLIGHT_PWM_CHANNEL` | `3` | 使用する PWM チャンネル | +| `BACKLIGHT_PAL_MODE` | `2` | 使用するピン代替関数 | -?> STMF072 のバックライトサポートのテストは制限されています。人によって違うかもしれません。不明な場合は、rules.mk で `BACKLIGHT_ENABLE = no` を設定します。 +これらの値を決定するには、特定の MCU の ST データシートを参照してください。独自のキーボードを設計しているわけではない場合、通常はこれらを変更する必要はありません。 -### ARM 設定 +#### 注意事項 :id=arm-caveats -バックライトの挙動を変更するには、`config.h` の中で以下の `#define` をします: +現在のところ、ハードウェア PWM のみがサポートされ、タイマー支援はなく、自動設定は提供されません。 -| 定義 | デフォルト | 説明 | -|------------------------|-------------|-------------------------------------------------------------------------------------------------------------| -| `BACKLIGHT_PIN` | `B7` | LED を制御するピン。自身のキーボードを設計している場合を除き、これを変更する必要はないはずです | -| `BACKLIGHT_PWM_DRIVER` | `PWMD4` | 使用する PWM ドライバ。ピンから PWM タイマへのマッピングについては、ST データシートを見てください。自身のキーボードを設計している場合を除き、これを変更する必要はないはずです | -| `BACKLIGHT_PWM_CHANNEL` | `3` | 使用する PWM チャンネル。ピンから PWM チャンネルへのマッピングについては、ST データシートを見てください。自身のキーボードを設計している場合を除き、これを変更する必要はないはずです | -| `BACKLIGHT_PAL_MODE` | `2` | 使用するピンの代替機能。ピンの AF マッピングについては ST データシートを見てください。自身のキーボードを設計している場合を除き、これを変更する必要はないはずです | +?> STM32F072 のバックライトサポートのテストは制限されています。人によって違うかもしれません。不明な場合は、`rules.mk` で `BACKLIGHT_ENABLE = no` を設定します。 -## Software PWM Driver :id=software-pwm-driver +### ソフトウェア PWM ドライバ :id=software-pwm-driver + +このモードでは、他のキーボードのタスクを実行中に PWM は「エミュレート」されます。追加のプラットフォーム設定なしで最大のハードウェア互換性を提供します。トレードオフは、キーボードが忙しい時にバックライトが揺れる可能性があることです。有効にするには、`rules.mk` に以下を追加します: -他のキーボードのタスクを実行中に PWM をエミュレートすることにより、追加のプラットフォーム設定なしで最大のハードウェア互換性を提供します。トレードオフは、キーボードが忙しい時にバックライトが揺れる可能性があることです。有効にするには、rules.mk に以下を追加します: ```makefile BACKLIGHT_DRIVER = software ``` -### ソフトウェア PWM 設定 - -バックライトの挙動を変更するには、`config.h` の中で以下の `#define` をします: - -| 定義 | デフォルト | 説明 | -|-----------------|-------------|-------------------------------------------------------------------------------------------------------------| -| `BACKLIGHT_PIN` | `B7` | LED を制御するピン。自身のキーボードを設計している場合を除き、これを変更する必要はないはずです | -| `BACKLIGHT_PINS` | *定義なし* | 実験的: 詳細は以下を見てください | - -### 複数のバックライトピン +#### 複数のバックライトピン :id=multiple-backlight-pins ほとんどのキーボードは、全てのバックライト LED を制御するたった1つのバックライトピンを持ちます (特にバックライトがハードウェア PWM ピンに接続されている場合)。 -ソフトウェア PWM では、複数のバックライトピンを定義することができます。これらすべてのピンは PWM デューティサイクル時に同時にオンおよびオフになります。 -この機能により、例えば Caps Lock LED (またはその他の制御可能な LED) の輝度を、バックライトの他の LED と同じレベルに設定することができます。Caps Lock の代わりに LCTRL をマップしていて、Caps Lock がオンの時に Caps Lock LED をアクティブにする代わりにバックライトの一部にする必要がある場合に便利です。 +ソフトウェア PWM では、複数のバックライトピンを定義することができます。これらのピンは PWM デューティサイクル時に同時にオンおよびオフになります。 -複数のバックライトピンをアクティブにするには、`config.h` に次のようなものを追加する必要があります: +この機能により、例えば Caps Lock LED (またはその他の制御可能な LED) の輝度を、バックライトの他の LED と同じレベルに設定することができます。Caps Lock LED は通常バックライトとは別のピンに配線されるため、Caps Lock の代わりに Control をマップしていて、Caps Lock がオンの時に Caps Lock LED ではなくバックライトの一部をアクティブにする必要がある場合に便利です。 + +複数のバックライトピンをアクティブにするには、`config.h` に `BACKLIGHT_PIN` の代わりに次のようなものを追加します: ```c -#undef BACKLIGHT_PIN #define BACKLIGHT_PINS { F5, B2 } ``` -## カスタムドライバ +### カスタムドライバ :id=custom-driver -有効にするには、rules.mk に以下を追加します: +上記ドライバのいずれもキーボードに適用されていない場合(例えば、バックライトを制御するのに別の IC を使用している場合)、QMK が提供しているこの簡単な API を使ってカスタムバックライトドライバを実装することができます。有効にするには、`rules.mk` に以下を追加します: ```makefile BACKLIGHT_DRIVER = custom ``` -カスタムドライバ API を実装する場合、提供されるキーボードフックは以下の通りです: +それから次のフックのいずれかを実装します: ```c void backlight_init_ports(void) { // オプション - 起動時に実行されます - // - 通常、ここでピンを設定します + // 通常、ここでピンを設定します } void backlight_set(uint8_t level) { // オプション - レベルの変更時に実行されます - // - 通常、ここで新しい値に応答します + // 通常、ここで新しい値に応答します } void backlight_task(void) { // オプション - 定期的に実行されます - // - ここで長時間実行されるアクションはパフォーマンスの問題を引き起こします + // これはメインキーボードループで呼び出されることに注意してください + // そのため、ここで長時間実行されるアクションはパフォーマンスの問題を引き起こします } ``` + +## 回路図の例 + +この一般的な例では、バックライト LED は全て N チャンネル MOSFET に向かって並列に接続されています。そのゲートピンは、リンギングを回避するため 470Ωの抵抗を介してマイクロコントローラの GPIO ピンの1つに接続されています。 +プルダウン抵抗もゲートピンとグランドの間に配置されており、MCU によって駆動されていない場合にプルダウン抵抗を定義された状態に保ちます。 +これらの抵抗値は重要ではありません。詳細については、[this Electronics StackExchange question](https://electronics.stackexchange.com/q/68748) を参照してください。 + +![バックライトの回路例](https://i.imgur.com/BmAvoUC.png) From a88e6903516d69dedf3d86b0d96128b4bcb09140 Mon Sep 17 00:00:00 2001 From: shela Date: Sat, 1 Aug 2020 09:25:20 +0900 Subject: [PATCH 498/930] [Docs] Update Japanese translation of keymap.md. (#9807) * Update Japanese translation of keymap.md. * fix original document version. * Apply suggestions from code review * Update translation --- docs/ja/keymap.md | 22 +++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) diff --git a/docs/ja/keymap.md b/docs/ja/keymap.md index 48b2a5cd572c..7614e52433fb 100644 --- a/docs/ja/keymap.md +++ b/docs/ja/keymap.md @@ -1,8 +1,8 @@ # キーマップの概要 QMK のキーマップは C のソースファイルの中で定義されます。そのデータ構造は配列の配列です。外側はレイヤーを要素とする配列で、レイヤーはキーを要素とする配列。ほとんどのキーボードは `LAYOUT()` マクロを定義して、この配列の配列を作成しやすくしています。 @@ -76,10 +76,22 @@ TMK の歴史的経緯から、キーマップに保存されたアクション ### レイヤーの優先順位と透過性 -***上位のレイヤーはレイヤーのスタックでより高い優先順位を持つ***ことに注意してください。つまり、ファームウェアはキーコードを最上位から最下位まで検索します。レイヤーで **`KC_TRNS`**(透過)以外のキーコードを見つけると、検索を中止し、下位レイヤーは参照されません。 +***上位のレイヤーはレイヤーのスタックでより高い優先順位を持つ***ことに注意してください。ファームウェアは最上位のアクティブレイヤーから下に向かってキーコードを検索します。ファームウェアがアクティブなレイヤーで `KC_TRNS` (透過)以外のキーコードを見つけると、検索を停止し、下位レイヤーは参照されません。 -オーバーレイレイヤーに `KC_TRANS` を配置して、レイアウトの一部だけを変更して下位レイヤーまたは基本レイヤーにフォールバックすることができます。 -`KC_TRANS` (`KC_TRNS` と `_______` はエイリアス) のキーには独自のキーコードがなく、キーコードの有効な下位レイヤーを参照します。 + ____________ + / / <--- Higher layer + / KC_TRNS // + /___________// <--- Lower layer (KC_A) + /___________/ + + 上記シナリオでは、上位レイヤーに非透過のキーが定義されているとそのキーが使われますが、`KC_TRNS` (または同等のキーコード)が定義されている場合は常に下位レベルのキーコード(`KC_A`)が使われます。 + +**メモ:** 特定のレイヤーの透過性を示す有効な方法: +* `KC_TRANSPARENT` +* `KC_TRNS` (別名) +* `_______` (別名) + +これらのキーコードは、処理する非透過のキーコードを探すときに、下位レイヤーを検索させることができます。 ## `keymap.c` の分析 From ea3f74874fd1d1140223864d861a6b824c3e4eee Mon Sep 17 00:00:00 2001 From: umi <57262844+umi-umi@users.noreply.github.com> Date: Sat, 1 Aug 2020 09:49:25 +0900 Subject: [PATCH 499/930] [Docs] Japanese translation of docs/other_vscode.md (#9756) * add other_vscode.md translation * update based on comment * update based on comment * update based on comment --- docs/ja/other_vscode.md | 122 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 122 insertions(+) create mode 100644 docs/ja/other_vscode.md diff --git a/docs/ja/other_vscode.md b/docs/ja/other_vscode.md new file mode 100644 index 000000000000..d4137ca46d48 --- /dev/null +++ b/docs/ja/other_vscode.md @@ -0,0 +1,122 @@ +# QMK 開発用の Visual Studio Code のセットアップ + + + +[Visual Studio Code](https://code.visualstudio.com/) (VS Code) は多くの異なるプログラミング言語をサポートするオープンソースのコードエディタです。 + +VS Code のようなフル機能のエディタの使用は、プレーンテキストエディタの使用よりも多くの利点をもたらします。例えば、次のような利点です。: +* インテリジェントなコード補完 +* コード内の便利なナビゲーション +* リファクタリングツール +* 自動ビルド (コマンドラインは不要) +* Git 用のグラフィカルなフロントエンド +* デバッグ、コードフォーマット、呼び出し階層の表示などの多くのツール + +このページの目的は、QMK ファームウェアを開発するために VS Code をセットアップする方法を文章化することです。 + +このガイドは Windows および Ubuntu 18.04 で必要な全てを構成する方法を説明します。 + +# VS Code のセットアップ +はじめに、全てのビルドツールをセットアップし、QMK ファームウェアをクローンする必要があります。まだ設定していない場合は、[セットアップ](ja/newbs_getting_started.md)に進んでください。 + +## Windows + +### 前提条件 + +* [Git for Windows](https://git-scm.com/download/win) (このリンクはインストーラを保存あるいは実行するように促します) + + 1. `Git LFS (Large File Support)` および `Check daily for Git for Windows updates` 以外の全てのオプションを無効にします。 + 2. デフォルトのエディタを `Use Visual Studio Code as Git's default editor` に設定します。 + 3. ここで使用すべきオプションなので、`Use Git from Git Bash only` オプションを選択します。 + 4. `Choosing HTTPS transport backend` については、どちらのオプションでも問題ありません。 + 5. `Checkout as-is, commit Unix-style line endings` オプションを選択します。QMK ファームウェアは Unix スタイルのコミットを使います。 + 6. 追加のオプションについては、デフォルトのオプションをそのままにします。 + + このソフトウェアは、VS Code での Git サポートに必要です。これを含めないことも可能ですが、これを使う方が簡単です。 + +* [Git Credential Manager for Windows](https://github.com/Microsoft/Git-Credential-Manager-for-Windows/releases) (オプション) + + このソフトウェアは、git 証明書、MFA、パーソナルアクセストークン生成のためのセキュアストレージを提供することで、Git のより良いサポートを提供します。 + + これは厳密には必要ありませんが、お勧めします。 + + +### VS Code のインストール + +1. [VS Code](https://code.visualstudio.com/) に進み、インストーラをダウンロードします +2. インストーラを実行します + +この項は非常に簡単です。ただし、正しく構成されていることを確認するために、しなければならない幾つかの設定があります。 + +### VS Code の設定 + +最初に、IntelliSense をセットアップする必要があります。これは厳密には必要ではありませんが、あなたの人生をずっと楽にします。これを行うには、QMK ファームウェアフォルダに `.vscode/c_cpp_properies.json` ファイルを作成する必要があります。これは全て手動で行うことができますが、ほとんどの作業は既に完了しています。 + +[このファイル](https://gist.github.com/drashna/48e2c49ce877be592a1650f91f8473e8) を取得して保存します。MSYS2 をデフォルトの場所にインストールしなかった、または WSL か LxSS を使っている場合、このファイルを編集する必要があります。 + +このファイルを保存したら、VS Code が既に実行中の場合はリロードする必要があります。 + +?> また、`.vscode` フォルダ に `extensions.json` および `settings.json` ファイルがあるはずです。 + + +次に、VSCode に統合ターミナルとして表示されるように、MSYS2 ウィンドウを設定します。これには多くの利点があります。ほとんどの場合で、エラー上で Ctrl + クリックするとこれらのファイルにジャンプできます。これによりデバッグがはるかに簡単になります。また、他のウィンドウへジャンプする必要が無いという点でも優れています。 + +1. File > Preferences > > Settings をクリックします。 +2. 右上の {} ボタンをクリックし、`settings.json` ファイルを開きます。 +3. ファイルの内容を以下のように設定します: + + ```json + { + "terminal.integrated.shell.windows": "C:\\msys64\\usr\\bin\\bash.exe", + "terminal.integrated.env.windows": { + "MSYSTEM": "MINGW64", + "CHERE_INVOKING": "1" + }, + "terminal.integrated.shellArgs.windows": [ + "--login" + ], + "terminal.integrated.cursorStyle": "line" + } + ``` + + ここに既に設定がある場合は、最初と最後の波括弧の間に全てを追加します。 + +?> MSYS2 を別のフォルダにインストールした場合は、`terminal.integrated.shell.windows` のパスをシステムの正しいパスに変更する必要があります。 + +4. Ctrl-` (grave) を押して、ターミナルを起動します。 + + これにより、ワークスペースフォルダ(つまり `qmk_firmware` フォルダ)でターミナルが起動し、キーボードをコンパイルすることができます。 + + +## 他の全てのオペレーティングシステム + +1. [VS Code](https://code.visualstudio.com/) に進み、インストーラをダウンロードします +2. インストーラを実行します +3. 以上です + +いいえ、本当に以上です。必要なパスはパッケージのインストール時に既に含まれています。現在のワークスペースのファイルを検出し、IntelliSense 用に解析する方がより良いです。 + +## プラグイン + +インストールした方が良い拡張が幾つかあります。 + +* [Git Extension Pack](https://marketplace.visualstudio.com/items?itemName=donjayamanne.git-extension-pack) - +これは QMK ファームウェアで Git を簡単に使用できる Git 関連ツールを多数インスールします。 +* [EditorConfig for VS Code](https://marketplace.visualstudio.com/items?itemName=EditorConfig.EditorConfig) - _[オプション]_ - QMK コーディング規約にコードを準拠させるのに役立ちます。 +* [Bracket Pair Colorizer 2](https://marketplace.visualstudio.com/items?itemName=CoenraadS.bracket-pair-colorizer-2) - _[オプション]_ - これはネストされたコードを参照しやすくするために、コード内の括弧を色分けします。 +* [GitHub Markdown Preview](https://marketplace.visualstudio.com/items?itemName=bierner.github-markdown-preview) - _[オプション]_ - VS Code の markdown プレビューを GithHub のようにします。 +* [VS Live Share Extension Pack](https://marketplace.visualstudio.com/items?itemName=MS-vsliveshare.vsliveshare-pack) - _[オプション]_ - この拡張により、他の誰かがあなたのワークスペースにアクセスし(あるいは、あなたが他の誰かのワークスペースにアクセスし)、手伝うことができます。あなたが問題を抱えており、他の誰かの助けが必要な場合に便利です。 +* [VIM Keymap](https://marketplace.visualstudio.com/items?itemName=GiuseppeCesarano.vim-keymap) - _[オプション]_ - VIM スタイルのキーバインドを好む人向け。これには他のオプションもあります。 +* [Travis CI Status](https://marketplace.visualstudio.com/items?itemName=felixrieseberg.vsc-travis-ci-status) - _[オプション]_ - セットアップした場合、現在の Travis CI の状態を表示します。 + +いずれかの拡張機能をインストールしたら、再起動します。 + +# QMK 用の VS Code の設定 +1. File > Open Folder をクリックします +2. GitHub からクローンした QMK ファームウェアフォルダを開きます。 +3. File > Save Workspace As... をクリックします + +これで、VS Code で QMK ファームウェアをコーディングする準備ができました。 From 28c78023c5076923043b8ac273e75499909bb94b Mon Sep 17 00:00:00 2001 From: shela Date: Sat, 1 Aug 2020 09:57:31 +0900 Subject: [PATCH 500/930] [Docs] Update Japanese translation of newbs_building_firmware.md. (#9810) * Update Japanese translation of newbs_building_firmware.md. * fix original document version. * Apply suggestions from code review --- docs/ja/newbs_building_firmware.md | 78 ++++++++++++------------------ 1 file changed, 30 insertions(+), 48 deletions(-) diff --git a/docs/ja/newbs_building_firmware.md b/docs/ja/newbs_building_firmware.md index bcbc64a2184f..563efa71633d 100644 --- a/docs/ja/newbs_building_firmware.md +++ b/docs/ja/newbs_building_firmware.md @@ -2,60 +2,41 @@ ビルド環境をセットアップしたので、カスタムファームウェアのビルドを開始する準備ができました。 ガイドのこのセクションでは、ファイルマネージャ、テキストエディタ、ターミナルウィンドウの3つのプログラム間を行き来します。 キーボードファームウェアが完成して満足するまで、この3つすべてを開いたままにします。 -ガイドの最初の部分を読んだ後でターミナルウィンドウを閉じて再度開いていた場合は、ターミナルが正しいディレクトリにあるように `cd qmk_firmware` を忘れないでください。 +## 新しいキーマップを作成する -## キーマップフォルダに移動する +独自のキーマップを作成するには、`default` キーマップのコピーを作成する必要があります。最後のステップでビルド環境を設定した場合は、QMK CLI を使って簡単に行うことができます: -あなたのキーボードの `keymaps`フォルダに移動することから始めます。 + qmk new-keymap -macOS または Windows を使用している場合は、キーマップフォルダを簡単に開くために使用できるコマンドがあります。 +もし環境が設定されていない場合や、複数のキーボードを所持している場合は、キーボード名を指定することができます: -### macOS: + qmk new-keymap -kb -``` open keyboards//keymaps ``` +そのコマンドの出力を見ると、次のようになっているはずです: -### Windows: + Ψ keymap directory created in: /home/me/qmk_firmware/keyboards/clueboard/66/rev3/keymaps/ -``` start .\\keyboards\\\\keymaps ``` - -## `default` キーマップのコピーを作成する - -`keymaps` フォルダを開いたら、`default`フォルダのコピーを作成します。 -フォルダには、あなたの GitHub でのユーザー名と同じ名前を付けることを強くお勧めしますが、小文字、数字、アンダースコアのみが含まれている限り、任意の名前を使用できます。 - -この手順を自動化するために、`new_keymap.sh`スクリプトを実行する方法もあります。 - -`qmk_firmware/util` ディレクトリに移動して、次を入力します。 - -``` -./new_keymap.sh -``` - -たとえば、John という名前のユーザーが 1up60hse の新しいキーマップを作成しようとするには、次のように入力します。 - -``` -./new_keymap.sh 1upkeyboards/1up60hse john -``` +これがあなたの新しい `keymap.c` ファイルの場所です。 ## あなたの好みのテキストエディタで `keymap.c` を開く -`keymap.c`を開きます。 +テキストエディタで `keymap.c` ファイルを開きます。 このファイル内には、キーボードの動作を制御する構造があります。 -`keymap.c`の上部には、キーマップを読みやすくする `define` と `enum` があります。 -さらに下には、次のような行があります。 +`keymap.c`の上部には、キーマップを読みやすくする定義と列挙型があります。 +さらに下には、次のような行があります: const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { この行はレイヤーのリストの開始を表わしています。 -その下には、`LAYOUT` または `KEYMAP` のいずれかを含む行があり、これらの行はレイヤーの開始を表わしています。 +その下には、`LAYOUT` を含む行があり、これらの行はレイヤーの開始を表わしています。 その行の下には、そのレイヤーを構成するキーのリストがあります。 !> キーマップファイルを編集するときは、カンマを追加したり削除したりしないように注意してください。そうするとファームウェアのコンパイルができなくなり、余分であったり欠落していたりするカンマがどこにあるのかを容易に把握できない場合があります。 @@ -65,33 +46,34 @@ macOS または Windows を使用している場合は、キーマップフォ 納得のいくまでこのステップを繰り返します。 気になる点をひとつづつ変更して試すのもよし、全部作りなおすのもよし。 あるレイヤー全体が必要ない場合はレイヤーを削除することもでき、必要があれば、合計 32 個までレイヤーを追加することもできます。 -ここで定義できる内容については、次のドキュメントを参照してください。 +QMK にはたくさんの機能があり、完全なリストは左側のサイドバーの「QMK を使う」の下を調べてください。ここから始めるために、簡単に使える機能をいくつか紹介します: -* [キーコード](ja/keycodes.md) -* [機能](ja/features.md) -* [FAQ](ja/faq.md) +* [基本的なキーコード](ja/keycodes_basic.md) +* [Quantum キーコード](ja/quantum_keycodes.md) +* [グレイブ エスケープ](ja/feature_grave_esc.md) +* [マウスキー](ja/feature_mouse_keys.md) ?> キーマップがどのように機能するかを感じながら、各変更を小さくしてください。大きな変更は、発生する問題のデバッグを困難にします。 -## ファームウェアをビルドする +## ファームウェアをビルドする :id=build-your-firmware -キーマップの変更が完了したら、ファームウェアをビルドする必要があります。これを行うには、ターミナルウィンドウに戻り、ビルドコマンドを実行します: +キーマップの変更が完了したら、ファームウェアをビルドする必要があります。これを行うには、ターミナルウィンドウに戻り、コンパイルコマンドを実行します: - make : + qmk compile -たとえば、キーマップの名前が "xyverz" で、rev5 planck のキーマップを作成している場合、次のコマンドを使用します: +もし環境が設定されていない場合や、複数のキーボードを所持している場合は、キーボードやキーマップを指定することができます: - make planck/rev5:xyverz + qmk compile -kb -km これがコンパイルされる間、どのファイルがコンパイルされているかを知らせる多くの出力が画面に表示されます。 -次のような出力で終わるはずです。 +次のような出力で終わるはずです: ``` -Linking: .build/planck_rev5_xyverz.elf [OK] -Creating load file for flashing: .build/planck_rev5_xyverz.hex [OK] -Copying planck_rev5_xyverz.hex to qmk_firmware folder [OK] -Checking file size of planck_rev5_xyverz.hex [OK] - * File size is fine - 18392/28672 +Linking: .build/planck_rev5_default.elf [OK] +Creating load file for flashing: .build/planck_rev5_default.hex [OK] +Copying planck_rev5_default.hex to qmk_firmware folder [OK] +Checking file size of planck_rev5_default.hex [OK] + * The firmware size is fine - 27312/28672 (95%, 1360 bytes free) ``` ## ファームウェアを書きこむ From 0d405ad38e25641fbdbbeedbc411c1d69a8980b8 Mon Sep 17 00:00:00 2001 From: umi <57262844+umi-umi@users.noreply.github.com> Date: Sat, 1 Aug 2020 10:40:17 +0900 Subject: [PATCH 501/930] [Docs] Japanese translation of docs/internals_input_callback_reg.md (#9752) * add internals_input_callback_reg.md translation * update based on comment --- docs/ja/internals_input_callback_reg.md | 174 ++++++++++++++++++++++++ 1 file changed, 174 insertions(+) create mode 100644 docs/ja/internals_input_callback_reg.md diff --git a/docs/ja/internals_input_callback_reg.md b/docs/ja/internals_input_callback_reg.md new file mode 100644 index 000000000000..517873b7cafd --- /dev/null +++ b/docs/ja/internals_input_callback_reg.md @@ -0,0 +1,174 @@ +# group `input_callback_reg` {#group__input__callback__reg} + + + +これらは受信コールバックを登録するために使用する関数です。 + +関数は、適切な midi メッセージが関連するデバイスの入力と一致した場合に呼び出されます。 + +## 概要 + +| メンバー | 説明 | +--------------------------------|--------------------------------------------- +| `public void `[`midi_register_cc_callback`](#group__input__callback__reg_1ga64ab672abbbe393c9c4a83110c8df718)`(`[`MidiDevice`](#struct__midi__device)` * device,midi_three_byte_func_t func)` | コントロールチェンジメッセージ受信コールバックを登録する。 | +| `public void `[`midi_register_noteon_callback`](#group__input__callback__reg_1ga3962f276c17618923f1152779552103e)`(`[`MidiDevice`](#struct__midi__device)` * device,midi_three_byte_func_t func)` | ノートオン受信コールバックを登録する。 | +| `public void `[`midi_register_noteoff_callback`](#group__input__callback__reg_1gac847b66051bd6d53b762958be0ec4c6d)`(`[`MidiDevice`](#struct__midi__device)` * device,midi_three_byte_func_t func)` | ノートオフ受信コールバックを登録する。 | +| `public void `[`midi_register_aftertouch_callback`](#group__input__callback__reg_1gaa95bc901bd9edff956a667c9a69dd01f)`(`[`MidiDevice`](#struct__midi__device)` * device,midi_three_byte_func_t func)` | アフタータッチ受信コールバックを登録する。 | +| `public void `[`midi_register_pitchbend_callback`](#group__input__callback__reg_1ga071a28f02ba14f53de219be70ebd9a48)`(`[`MidiDevice`](#struct__midi__device)` * device,midi_three_byte_func_t func)` | ピッチベンド受信コールバックを登録する。 | +| `public void `[`midi_register_songposition_callback`](#group__input__callback__reg_1gaf2adfd79637f3553d8f26deb1ca22ed6)`(`[`MidiDevice`](#struct__midi__device)` * device,midi_three_byte_func_t func)` | ソングポジション受信コールバックを登録する。 | +| `public void `[`midi_register_progchange_callback`](#group__input__callback__reg_1gae6ba1a35a4cde9bd15dd42f87401d127)`(`[`MidiDevice`](#struct__midi__device)` * device,midi_two_byte_func_t func)` | プログラムチェンジ受信コールバックを登録する。 | +| `public void `[`midi_register_chanpressure_callback`](#group__input__callback__reg_1ga39b31f1f4fb93917ce039b958f21b4f5)`(`[`MidiDevice`](#struct__midi__device)` * device,midi_two_byte_func_t func)` | チャンネルプレッシャー受信コールバックを登録する。 | +| `public void `[`midi_register_songselect_callback`](#group__input__callback__reg_1gaf9aafc76a2dc4b9fdbb4106cbda6ce72)`(`[`MidiDevice`](#struct__midi__device)` * device,midi_two_byte_func_t func)` | ソングセレクト受信コールバックを登録する。 | +| `public void `[`midi_register_tc_quarterframe_callback`](#group__input__callback__reg_1ga0a119fada2becc628cb15d753b257e6e)`(`[`MidiDevice`](#struct__midi__device)` * device,midi_two_byte_func_t func)` | タイムコードクォータフレーム受信コールバックを登録する。 | +| `public void `[`midi_register_realtime_callback`](#group__input__callback__reg_1ga764f440e857b89084b1a07f9da2ff93a)`(`[`MidiDevice`](#struct__midi__device)` * device,midi_one_byte_func_t func)` | リアルタイム受信コールバックを登録する。 | +| `public void `[`midi_register_tunerequest_callback`](#group__input__callback__reg_1gae40ff3ce20bda79fef87da24b8321cb1)`(`[`MidiDevice`](#struct__midi__device)` * device,midi_one_byte_func_t func)` | チューンリクエスト受信コールバックを登録する。 | +| `public void `[`midi_register_sysex_callback`](#group__input__callback__reg_1ga63ce9631b025785c1848d0122d4c4c48)`(`[`MidiDevice`](#struct__midi__device)` * device,midi_sysex_func_t func)` | システムエクスクルーシブ受信コールバックを登録する。 | +| `public void `[`midi_register_fallthrough_callback`](#group__input__callback__reg_1ga7ed189164aa9682862b3181153afbd94)`(`[`MidiDevice`](#struct__midi__device)` * device,midi_var_byte_func_t func)` | フォールスルー受信コールバックを登録する。 | +| `public void `[`midi_register_catchall_callback`](#group__input__callback__reg_1ga9dbfed568d047a6cd05708f11fe39e99)`(`[`MidiDevice`](#struct__midi__device)` * device,midi_var_byte_func_t func)` | キャッチオール受信コールバックを登録する。 | + +## メンバー + +#### `public void `[`midi_register_cc_callback`](#group__input__callback__reg_1ga64ab672abbbe393c9c4a83110c8df718)`(`[`MidiDevice`](#struct__midi__device)` * device,midi_three_byte_func_t func)` {#group__input__callback__reg_1ga64ab672abbbe393c9c4a83110c8df718} + +コントロールチェンジメッセージ受信コールバックを登録する。 + +#### パラメータ +* `device` 関連するデバイス + +* `func` 登録するコールバック関数 + +#### `public void `[`midi_register_noteon_callback`](#group__input__callback__reg_1ga3962f276c17618923f1152779552103e)`(`[`MidiDevice`](#struct__midi__device)` * device,midi_three_byte_func_t func)` {#group__input__callback__reg_1ga3962f276c17618923f1152779552103e} + +ノートオン受信コールバックを登録する。 + +#### パラメータ +* `device` 関連するデバイス + +* `func` 登録するコールバック関数 + +#### `public void `[`midi_register_noteoff_callback`](#group__input__callback__reg_1gac847b66051bd6d53b762958be0ec4c6d)`(`[`MidiDevice`](#struct__midi__device)` * device,midi_three_byte_func_t func)` {#group__input__callback__reg_1gac847b66051bd6d53b762958be0ec4c6d} + +ノートオフ受信コールバックを登録する。 + +#### パラメータ +* `device` 関連するデバイス + +* `func` 登録するコールバック関数 + +#### `public void `[`midi_register_aftertouch_callback`](#group__input__callback__reg_1gaa95bc901bd9edff956a667c9a69dd01f)`(`[`MidiDevice`](#struct__midi__device)` * device,midi_three_byte_func_t func)` {#group__input__callback__reg_1gaa95bc901bd9edff956a667c9a69dd01f} + +アフタータッチ受信コールバックを登録する。 + +#### パラメータ +* `device` 関連するデバイス + +* `func` 登録するコールバック関数 + +#### `public void `[`midi_register_pitchbend_callback`](#group__input__callback__reg_1ga071a28f02ba14f53de219be70ebd9a48)`(`[`MidiDevice`](#struct__midi__device)` * device,midi_three_byte_func_t func)` {#group__input__callback__reg_1ga071a28f02ba14f53de219be70ebd9a48} + +ピッチベンド受信コールバックを登録する。 + +#### パラメータ +* `device` 関連するデバイス + +* `func` 登録するコールバック関数 + +#### `public void `[`midi_register_songposition_callback`](#group__input__callback__reg_1gaf2adfd79637f3553d8f26deb1ca22ed6)`(`[`MidiDevice`](#struct__midi__device)` * device,midi_three_byte_func_t func)` {#group__input__callback__reg_1gaf2adfd79637f3553d8f26deb1ca22ed6} + +ソングポジション受信コールバックを登録する。 + +#### パラメータ +* `device` 関連するデバイス + +* `func` 登録するコールバック関数 + +#### `public void `[`midi_register_progchange_callback`](#group__input__callback__reg_1gae6ba1a35a4cde9bd15dd42f87401d127)`(`[`MidiDevice`](#struct__midi__device)` * device,midi_two_byte_func_t func)` {#group__input__callback__reg_1gae6ba1a35a4cde9bd15dd42f87401d127} + +プログラムチェンジ受信コールバックを登録する。 + +#### パラメータ +* `device` 関連するデバイス + +* `func` 登録するコールバック関数 + +#### `public void `[`midi_register_chanpressure_callback`](#group__input__callback__reg_1ga39b31f1f4fb93917ce039b958f21b4f5)`(`[`MidiDevice`](#struct__midi__device)` * device,midi_two_byte_func_t func)` {#group__input__callback__reg_1ga39b31f1f4fb93917ce039b958f21b4f5} + +チャンネルプレッシャー受信コールバックを登録する。 + +#### パラメータ +* `device` 関連するデバイス + +* `func` 登録するコールバック関数 + +#### `public void `[`midi_register_songselect_callback`](#group__input__callback__reg_1gaf9aafc76a2dc4b9fdbb4106cbda6ce72)`(`[`MidiDevice`](#struct__midi__device)` * device,midi_two_byte_func_t func)` {#group__input__callback__reg_1gaf9aafc76a2dc4b9fdbb4106cbda6ce72} + +ソングセレクト受信コールバックを登録する。 + +#### パラメータ +* `device` 関連するデバイス + +* `func` 登録するコールバック関数 + +#### `public void `[`midi_register_tc_quarterframe_callback`](#group__input__callback__reg_1ga0a119fada2becc628cb15d753b257e6e)`(`[`MidiDevice`](#struct__midi__device)` * device,midi_two_byte_func_t func)` {#group__input__callback__reg_1ga0a119fada2becc628cb15d753b257e6e} + +タイムコードクォータフレーム受信コールバックを登録する。 + +#### パラメータ +* `device` 関連するデバイス + +* `func` 登録するコールバック関数 + +#### `public void `[`midi_register_realtime_callback`](#group__input__callback__reg_1ga764f440e857b89084b1a07f9da2ff93a)`(`[`MidiDevice`](#struct__midi__device)` * device,midi_one_byte_func_t func)` {#group__input__callback__reg_1ga764f440e857b89084b1a07f9da2ff93a} + +リアルタイム受信コールバックを登録する。 + +全てのリアルタイムメッセージ型に対してコールバックが呼ばれます。 + +#### パラメータ +* `device` 関連するデバイス + +* `func` 登録するコールバック関数 + +#### `public void `[`midi_register_tunerequest_callback`](#group__input__callback__reg_1gae40ff3ce20bda79fef87da24b8321cb1)`(`[`MidiDevice`](#struct__midi__device)` * device,midi_one_byte_func_t func)` {#group__input__callback__reg_1gae40ff3ce20bda79fef87da24b8321cb1} + +チューンリクエスト受信コールバックを登録する。 + +#### パラメータ +* `device` 関連するデバイス + +* `func` 登録するコールバック関数 + +#### `public void `[`midi_register_sysex_callback`](#group__input__callback__reg_1ga63ce9631b025785c1848d0122d4c4c48)`(`[`MidiDevice`](#struct__midi__device)` * device,midi_sysex_func_t func)` {#group__input__callback__reg_1ga63ce9631b025785c1848d0122d4c4c48} + +システムエクスクルーシブ受信コールバックを登録する。 + +#### パラメータ +* `device` 関連するデバイス + +* `func` 登録するコールバック関数 + +#### `public void `[`midi_register_fallthrough_callback`](#group__input__callback__reg_1ga7ed189164aa9682862b3181153afbd94)`(`[`MidiDevice`](#struct__midi__device)` * device,midi_var_byte_func_t func)` {#group__input__callback__reg_1ga7ed189164aa9682862b3181153afbd94} + +フォールスルー受信コールバックを登録する。 + +より具体的なコールバックが見つからない場合にのみ呼ばれます。例えば、ノートオン受信コールバックを登録していないがノートオンメッセージを受け取った場合、フォールスルー受信コールバックが登録されている場合はそれが呼ばれます。 + +#### パラメータ +* `device` 関連するデバイス + +* `func` 登録するコールバック関数 + +#### `public void `[`midi_register_catchall_callback`](#group__input__callback__reg_1ga9dbfed568d047a6cd05708f11fe39e99)`(`[`MidiDevice`](#struct__midi__device)` * device,midi_var_byte_func_t func)` {#group__input__callback__reg_1ga9dbfed568d047a6cd05708f11fe39e99} + +キャッチオール受信コールバックを登録する。 + +登録されている場合は、より具体的なコールバックあるいはフォールスルー受信コールバックが登録されている場合でも、一致する全てのメッセージに対してキャッチオール受信コールバックが呼ばれます。 + +#### パラメータ +* `device` 関連するデバイス + +* `func` 登録するコールバック関数 + From 3f2521115d7d6e2bb5e221c34a636f9e5af80358 Mon Sep 17 00:00:00 2001 From: shela Date: Sat, 1 Aug 2020 10:53:35 +0900 Subject: [PATCH 502/930] [Docs] Update Japanese translation of newbs_getting_started.md. (#9813) --- docs/ja/newbs_getting_started.md | 142 +++++++++++++++++++------------ 1 file changed, 88 insertions(+), 54 deletions(-) diff --git a/docs/ja/newbs_getting_started.md b/docs/ja/newbs_getting_started.md index 2e283840ca44..05608bf874cc 100644 --- a/docs/ja/newbs_getting_started.md +++ b/docs/ja/newbs_getting_started.md @@ -1,34 +1,22 @@ -# イントロダクション +# QMK 環境の構築 -キーボードにはプロセッサが入っており、それはコンピュータに入っているものと大して違わないものです。 -このプロセッサでは、キーボードのボタンの押し下げの検出を担当しキーボードのどのボタンが押されている/離されているかのレポートをコンピュータに送信するソフトウェアが動作しています。 -QMK は、そのソフトウェアの役割を果たし、ボタンの押下を検出しその情報をホストコンピュータに渡します。 -カスタムキーマップを作るということは、キーボード上で動くプログラムを作るということなのです。 - -QMK は、簡単なことは簡単に、そして、難しいことを可能なことにすることで、あなたの手にたくさんのパワーをもたらします。 -パワフルなキーマップを作るためにプログラムを作成する方法を知る必要はありません。いくつかのシンプルな文法に従うだけで OK です。 - -# はじめに - キーマップをビルドする前に、いくつかのソフトウェアをインストールしてビルド環境を構築する必要があります。 ファームウェアをコンパイルするキーボードの数に関わらず、この作業を一度だけ実行する必要があります。 -もし、GUI で作業をしたい場合、オンラインで作業できる [QMK Configurator](https://config.qmk.fm) を使ってください。 -使い方は [オンライン GUI を使用して初めてのファームウェアを構築する](ja/newbs_building_firmware_configurator.md) を参照してください。 +## 1. ソフトウェアのダウンロード -## ソフトウェアのダウンロード +始めるために必要なソフトウェアがいくつかあります。 ### テキストエディタ -GUI を使わない場合、プレーンテキストを編集・保存できるエディタが必要です。 -Windows の場合、メモ帳が使えます。Linux の場合、gedit が使えます。 -どちらもシンプルですが機能的なテキストエディタです。 +**プレーンテキスト** ファイルを編集して保存できるプログラムが必要です。 +Windows の場合、メモ帳が使えます。Linux の場合、gedit が使えます。どちらもシンプルですが機能的なテキストエディタです。 macOS では、デフォルトのテキストエディットアプリに注意してください。_フォーマット_ メニューから _標準テキストにする_ を選択しない限り、プレーンテキストとして保存されません。 [Sublime Text](https://www.sublimetext.com/) や [VS Code](https://code.visualstudio.com/) のような専用のテキストエディタをダウンロードしてインストールすることもできます。これらのプログラムはコードを編集するために特別に作成されているため、これはプラットフォームに関係なくベストな方法です。 @@ -45,78 +33,124 @@ QMK Toolbox は、Windows と macOS で使える GUI を備えたプログラム * Windows 版: `qmk_toolbox.exe` (portable) または `qmk_toolbox_install.exe` (installer) * macOS 版: `QMK.Toolbox.app.zip` (portable) または `QMK.Toolbox.pkg` (installer) -## 環境構築 :id=set-up-your-environment +### Unix ライクな環境 + +Linux や macOS には既に実行可能な unix シェルが付属しています。ビルド環境を構築するだけで済みます。 + +Windows では、MSYS2 や WSL をインストールして、これらの環境を使う必要があります。MSYS2 の構築手順を以下に示します。 + +## 2. ビルド環境を準備する :id=set-up-your-environment 私たちは、QMK を可能な限り簡単に構築できるように努力しています。 Linux か Unix 環境を用意するだけで、QMK に残りをインストールさせることができます。 -?> もし、Linux か Unix のコマンドを使ったことがない場合、こちらで基本的な概念や各種コマンドを学んでください。これらの教材で QMK を使うのに必要なことを学ぶことができます。 - +?> もし、Linux か Unix のコマンドを使ったことがない場合、こちらで基本的な概念や各種コマンドを学んでください。これらの教材で QMK を使うのに必要なことを学ぶことができます:
[Must Know Linux Commands](https://www.guru99.com/must-know-linux-commands.html)
[Some Basic Unix Commands](https://www.tjhsst.edu/~dhyatt/superap/unixcmd.html) ### Windows -MSYS2 と Git のインストールが必要です。 +MSYS2 と Git と QMK CLI のインストールが必要です。 -* [MSYS2 homepage](http://www.msys2.org) の手順に従って MSYS2 をインストールします。 -* 開いている MSYS2 の全ターミナル画面を閉じて、新しい MSYS2 MinGW 64-bit のターミナル画面を開きます。 -* `pacman -S git` を実行して Git をインストールします。 +[MSYS2 homepage](http://www.msys2.org) のインストール手順に従ってください。開いている MSYS2 の全ターミナル画面を閉じて、新しい MinGW 64-bit ターミナル画面を開きます。**注意: これはインストールが完了した時に開く MSYS ターミナルと同じ *ではありません*。** + +それから、次のように実行します: + + pacman --needed --noconfirm --disable-download-timeout -S git mingw-w64-x86_64-toolchain mingw-w64-x86_64-python3-pip + python3 -m pip install qmk ### macOS -[Homebrew homepage](https://brew.sh) の手順に従って Homebrew をインストールしてください。 +Homebrew のインストールが必要です。[Homebrew homepage](https://brew.sh) の手順に従ってください。 -Homebrew をインストールしたら、以下の _QMK の設定_ に進んでください。そのステップでは、他のパッケージをインストールするスクリプトを実行します。 +Homebrew をインストールした後で、以下のコマンドを実行します: + + brew install qmk/qmk/qmk ### Linux -Git のインストールが必要です。既にインストールされている可能性は高いですが、そうでない場合、次のコマンドでインストールできます。 +Git と Python をインストールする必要があります。両方とも既にインストールされている可能性は高いですが、そうでない場合、次のコマンドのいずれかでそれらをインストールできます: -* Debian / Ubuntu / Devuan: `apt-get install git` -* Fedora / Red Hat / CentOS: `yum install git` -* Arch: `pacman -S git` +* Debian / Ubuntu / Devuan: `sudo apt install git python3 python3-pip` +* Fedora / Red Hat / CentOS: `sudo yum install git python3 python3-pip` +* Arch / Manjaro: `sudo pacman -S git python python-pip python-setuptools libffi` -?> 全てのプラットフォームにおいて、Docker を使うことも可能です。[詳細はこちらをクリックしてください](ja/getting_started_build_tools.md#docker)。 +グローバル CLI をインストールして、システムをブートストラップします: -## QMK の設定 :id=set-up-qmk +`python3 -m pip install --user qmk` (Arch ベースのディストリビューションでは AUR から `qmk` パッケージを試すこともできます(**メモ**: コミュニティメンバーによって保守されています): `yay -S qmk`) -Linux/Unix 環境が準備できたら QMK のダウンロードの準備は完了です。Git を使用して QMK のリポジトリを「クローン」することで QMK をダウンロードします。ターミナルか MSYS2 MinGW ウィンドウを開いて、このガイドの残りの部分では開いたままにします。そのウィンドウ内で、次の2つのコマンドを実行します。 +### FreeBSD -```shell -git clone --recurse-submodules https://github.com/qmk/qmk_firmware.git -cd qmk_firmware -``` +Git と Python をインストールする必要があります。両方とも既にインストールされている可能性は高いですが、そうでない場合、次のコマンドを実行してそれらをインストールします: + + pkg install git python3 + +ローカルにインストールした Python パッケージが利用できるように、`$HOME/.local/bin` が `$PATH` に追加されていることを確認してください。 + +インストール完了後、QMK CLI をインストールできます: -?> 既に [GitHub の使いかた](ja/getting_started_github.md)を知っているなら、clone ではなく fork を勧めます。この一文の意味が分からない場合、このメッセージは無視してかまいません。 + python3 -m pip install --user qmk -QMK には、必要な残りの設定を手助けするスクリプトが含まれています。 -セットアップ作業を完了させるため、次のコマンドを実行します。 +## 3. QMK の設定を行う :id=set-up-qmk - util/qmk_install.sh +QMK のインストール後に、このコマンドで設定できます: -## ビルド環境の確認 + qmk setup -これで QMK のビルド環境が用意できましたので、キーボードのファームウェアをビルドできます。 +ほとんどの場合、全てのプロンプトに Yes と答えます。 + +?>**Debian、Ubuntu、それらの派生に関する注意**: +次のようなエラーが表示される可能性があります: `bash: qmk: command not found`. +これは Debian の Bash 4.4 リリースで導入された [バグ](https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=839155) で、`$HOME/.local/bin` が PATH から削除されました。このバグは後に Debian や Ubuntu で修正されました。 +残念なことに、Ubuntu はこのバグを再導入し、[まだ修正していません](https://bugs.launchpad.net/ubuntu/+source/bash/+bug/1588562)。 +幸い、修正は簡単です。これをあなたのユーザで実行します: `echo 'PATH="$HOME/.local/bin:$PATH"' >> $HOME/.bashrc && source $HOME/.bashrc` + +?>**FreeBSD に関する注意**: +まず、`root` 以外のユーザで `qmk setup` を実行することをお勧めしますが、これはおそらく `pkg` を使って基本システムにインストールする必要があるパッケージを識別します。 +しかし、特権のないユーザで実行すると、インストールはおそらく失敗します。 +基本的な依存関係を手動でインストールするには、`./util/qmk_install.sh` を `root` として実行するか、`sudo` をつけて実行します。 +それが完了したら、`qmk setup` を再実行して設定と確認を完了させます。 + +?> 既に [GitHub の使いかた](ja/getting_started_github.md)を知っているなら、fork を作成し、`qmk setup /qmk_firmware` を使って個人用の fork から clone することをお勧めします。この一文の意味が分からない場合、このメッセージは無視してかまいません。 + +## 4. ビルド環境の確認 + +これで QMK のビルド環境が用意できたので、キーボードのファームウェアをビルドできます。 キーボードのデフォルトキーマップをビルドすることから始めます。次の形式のコマンドでビルドできるはずです。 - make :default + qmk compile -kb -km default -例)Clueboard 66% のファームウェアをビルドする +例えば、Clueboard 66% のファームウェアをビルドする場合: - make clueboard/66/rev3:default + qmk compile -kb clueboard/66/rev3 -km default -大量の出力の最後に次のように出力されると完了です。 +大量の出力の最後に次のように出力されると完了です: ``` -Linking: .build/clueboard_66_rev3_default.elf [OK] -Creating load file for flashing: .build/clueboard_66_rev3_default.hex [OK] -Copying clueboard_66_rev3_default.hex to qmk_firmware folder [OK] -Checking file size of clueboard_66_rev3_default.hex [OK] +Linking: .build/clueboard_66_rev3_default.elf [OK] +Creating load file for flashing: .build/clueboard_66_rev3_default.hex [OK] +Copying clueboard_66_rev3_default.hex to qmk_firmware folder [OK] +Checking file size of clueboard_66_rev3_default.hex [OK] * The firmware size is fine - 26356/28672 (2316 bytes free) ``` +## 5. ビルド環境の設定(オプション) + +ビルド環境を設定してデフォルトを設定することで、QMK での作業をあまり面倒くさくないようにすることができます。今からやりましょう! + +QMK を初めて使うほとんどの人は、キーボードを1つしか持っていません。`qmk config` コマンドでこのキーボードをデフォルトとして設定できます。例えば、デフォルトのキーボードを `clueboard/66/rev4` に設定するには: + + qmk config user.keyboard=clueboard/66/rev4 + +デフォルトキーマップ名を設定することもできます。ほとんどの人はここで GitHub ユーザ名を使いますが、そうすることをお勧めします。 + + qmk config user.keymap= + +この後、これらの引数をオフにして、次のようにキーボードをコンパイルできます: + + qmk compile + # キーマップの作成 これであなた専用のキーマップを作成する準備ができました! -次は [Building Your First Firmware](ja/newbs_building_firmware.md) で専用のキーマップを作成します。 +次は [初めてのファームウェアの構築](ja/newbs_building_firmware.md) で専用のキーマップを作成します。 From f8a24013700d58c1818e9bec7dd6195d0225a474 Mon Sep 17 00:00:00 2001 From: shela Date: Sat, 1 Aug 2020 11:08:43 +0900 Subject: [PATCH 503/930] [Docs] Update Japanese translation of newbs_flashing.md. (#9819) * Update Japanese translation of newbs_flashing.md. * Update docs/ja/newbs_flashing.md --- docs/ja/newbs_flashing.md | 375 ++++++-------------------------------- 1 file changed, 51 insertions(+), 324 deletions(-) diff --git a/docs/ja/newbs_flashing.md b/docs/ja/newbs_flashing.md index a407066a54ca..3e1529706e63 100644 --- a/docs/ja/newbs_flashing.md +++ b/docs/ja/newbs_flashing.md @@ -2,27 +2,53 @@ カスタムファームウェアは出来たので、キーボードに書き込みたくなるでしょう/フラッシュしたくなるでしょう。 +## キーボードを DFU (Bootloader) モードにする + +カスタムファームウェアを書き込むには、最初にキーボードを普段とは違う特別な状態、フラッシュモードにする必要があります。 +このモードでは、キーボードはキーボードとしての機能を果たしません。 +ファームウェアの書き込み中にキーボードのケーブルを抜いたり、書き込みプロセスを中断したりしないことが非常に重要です。 + +キーボードによって、この特別なモードに入る方法は異なります。 +PCB が現在 QMK、TMK、PS2AVRGB (Bootmapper Client) を実行しており、キーボードメーカーから具体的な指示が与えられていない場合は、次を順番に試してください。 + +* 両方のシフトキーを押しながら、`Pause` キーを押す +* 両方のシフトキーを押しながら、`B` キーを押す +* キーボードのケーブルを抜いて、スペースバーと `B` を同時に押しながら、キーボードを再び接続し、1秒待ってからキーを放す +* キーボードのケーブルを抜いて、左上か左下のキー(通常は Escape か左 Control)を押しながらキーボードを接続する +* 通常、PCB の裏側に付けられている物理的な `RESET` ボタンを押す +* PCB 上の `RESET` か `GND` のラベルの付いたヘッダピンを探し、PCB 接続中にそれらを互いにショートする + +上記を全て試してもうまくいかず、基板のメインチップに `STM32` と表示されている場合、これは少し複雑になる可能性があります。通常、最善の方法は [Discord](https://discord.gg/Uq7gcHh) で助けを求めることです。おそらく基板の写真をいくつか求められるでしょう。あらかじめそれらを準備することができれば物事を進めるのに役立ちます! + +それ以外の場合は、QMK Toolbox で次のような黄色のメッセージが表示されます: + +``` +*** DFU device connected: Atmel Corp. ATmega32U4 (03EB:2FF4:0000) +``` + +そして、このブートローダデバイスはデバイスマネージャーやシステム情報.app、`lsusb` にも表示されます。 + ## QMK Toolbox を使ってキーボードに書き込む キーボードに書き込む最も簡単な方法は [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 を使用している場合(および、コマンドラインでファームウェアを書き込みたい場合)は、[コマンドラインからキーボードを書き込む](#flash-your-keyboard-from-the-command-line)節まで進んでください。 ### QMK Toolbox にファイルをロードする まず QMK Toolbox アプリケーションを起動します。 Finder またはエクスプローラーでファームウェアのファイルを探します。 -ファイル名は `.hex` または `.bin` のどちらかの形式です。 +キーボードのファームウェアは `.hex` または `.bin` のどちらかの形式です。 ビルド時に QMK は、キーボードに適した形式のものを `qmk_firmware` のトップフォルダにコピーしているはずです。 -Windows か macOS を使用しているときは現在のファームウェアフォルダをエクスプローラーか Finder で簡単に開くためのコマンドがあります。 +Windows か macOS を使用している場合、現在のフォルダをエクスプローラーか Finder で簡単に開くためのコマンドがあります。 #### Windows @@ -36,365 +62,66 @@ start . open . ``` -ファームウェアファイルは常に以下の命名形式に従っています。 +ファームウェアファイルは常に以下の命名形式に従っています: ``` _.{bin,hex} ``` -例えば、`plank/rev5` の `default` キーマップのファイル名は以下のようになります。 +例えば、`plank/rev5` の `default` キーマップのファイル名は以下のようになります: ``` planck_rev5_default.hex ``` -ファームウェアファイルを見つけたら、QMK Toolbox の "Local file" ボックスにドラッグするか、"Open" をクリックしてファームウェアファイルを指定します。 - -### キーボードを DFU (Bootloader) モードにする - -ファームウェアを書き込むには、キーボードを普段とは違う特別な状態、フラッシュモードにする必要があります。 -このモードでは、キーボードはキーボードとしての機能をはたしません。 -ファームウェアの書き込み中にキーボードのケーブルを抜いたり、書き込みプロセスを中断したりしないことが非常に重要です。 - -キーボードによって、この特別なモードに入る方法は異なります。 -キーボードが現在 QMK または TMK を実行しており、キーボードメーカーから具体的な指示が与えられていない場合は、次を順番に試してください。 - -* 両方のシフトキーを押しながら、`Pause` キーを押す -* 両方のシフトキーを押しながら、`B` キーを押す -* キーボードのケーブルを抜いて、スペースバーとBを同時に押しながら、キーボードを再び接続し、1秒待ってからキーを放す -* 基板(PCB)に付けられている物理的な `RESET` ボタンを押す -* PCB 上の `BOOT0` か `RESET` のラベルの付いたヘッダピンを探し、PCB 接続中にそれらを互いにショートする - -うまくいけば、QMK Toolbox に次のようなメッセージが表示されます。 - -``` -*** Clueboard - Clueboard 66% HotSwap disconnected -- 0xC1ED:0x2390 -*** DFU device connected -``` +ファームウェアファイルを見つけたら、QMK Toolbox の "Local file" ボックスにドラッグするか、"Open" をクリックしてファームウェアファイルが格納されている場所を指定します。 ### キーボードへの書き込み -QMK Toolbox の `Flash` ボタンをクリックします。 -次のような出力が表示されます。 +QMK Toolbox の `Flash` ボタンをクリックします。次のような出力が表示されます。 ``` -*** Clueboard - Clueboard 66% HotSwap disconnected -- 0xC1ED:0x2390 -*** DFU device connected +*** DFU device connected: Atmel Corp. ATmega32U4 (03EB:2FF4:0000) *** Attempting to flash, please don't remove device ->>> dfu-programmer atmega32u4 erase --force +>>> dfu-programmer.exe atmega32u4 erase --force Erasing flash... Success Checking memory from 0x0 to 0x6FFF... Empty. ->>> dfu-programmer atmega32u4 flash /Users/skully/qmk_firmware/clueboard_66_hotswap_gen1_skully.hex - Checking memory from 0x0 to 0x55FF... Empty. - 0% 100% Programming 0x5600 bytes... +>>> dfu-programmer.exe atmega32u4 flash "D:\Git\qmk_firmware\gh60_satan_default.hex" + Checking memory from 0x0 to 0x3F7F... Empty. + 0% 100% Programming 0x3F80 bytes... [>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>] Success 0% 100% Reading 0x7000 bytes... [>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>] Success Validating... Success - 0x5600 bytes written into 0x7000 bytes memory (76.79%). ->>> dfu-programmer atmega32u4 reset + 0x3F80 bytes written into 0x7000 bytes memory (56.70%). +>>> dfu-programmer.exe atmega32u4 reset -*** DFU device disconnected -*** Clueboard - Clueboard 66% HotSwap connected -- 0xC1ED:0x2390 +*** DFU device disconnected: Atmel Corp: ATmega32U4 (03EB:2FF4:0000) ``` ## コマンドラインでファームウェアを書き込む :id=flash-your-keyboard-from-the-command-line これは、以前のものと比較して非常に単純になりました。 -ファームウェアをコンパイルして書き込む準備ができたら、ターミナルウィンドウを開いてビルドコマンドを実行します。 +ファームウェアをコンパイルして書き込む準備ができたら、ターミナルウィンドウを開いて書き込みコマンドを実行します: - make ::flash + qmk flash -たとえば、キーマップの名前が xyverz で、rev5 planck のキーマップを作成している場合、次のコマンドを使用します。 +もし CLI でキーボードやキーマップ名を設定していない場合や、複数のキーボードを持っている場合、キーボードとキーマップを指定することができます: - make planck/rev5:xyverz:flash + qmk flash -kb -km -これにより、キーボードの構成が確認され、指定されたブートローダに基づいてキーボードへの書き込みが試行されます。 -これはあなたがキーボードが使用するブートローダを知る必要がないことを意味します。 -コマンドをただ実行して、コマンド自身に難しい処理を任せます。 +これはキーボードの設定を確認し、指定されたブートローダに基づいて書き込もうとします。これはどのブートローダをキーボードが使っているか知る必要がないことを意味します。単にコマンドを実行し、コマンドに重い仕事をさせましょう。 ただし、これはキーボードごとに設定されているブートローダに依存します。 -もしこの情報が設定されていない場合、または使用しているキーボードのファームウェアの書き込みにサポートしていないターゲットが設定されている場合、次のエラーが表示されます。 +もし、この情報が設定されていない場合、または、使用しているキーボードが、ファームウェア書き込みでサポートされているターゲットを持っていない場合、次のエラーが表示されます: WARNING: This board's bootloader is not specified or is not supported by the ":flash" target at this time. -この場合、あなたは明示的にブートローダを指定する方法を使わなければなりません。 - -ブートローダは主に 5 種類のものが使われています。 -Pro Micro とそのクローンは Caterina を、Teensy は HalfKay を、OLKB の AVR ボードは QMK-DFU を、その他の ATmega32U4 ボードは DFU を、そして多くの ARM ボードは ARM DFU を使います。 - -より詳しいブートローダの情報は、[Flashing Instructions and Bootloader Information](ja/flashing.md) にあります。 - -使用しているブートローダがわかっているならば、ファームウェアをコンパイルするときに、実は `make` コマンドにブートローダを指定するテキストを追加して、書き込みプロセスを自動化できます。 - -### DFU - -DFU ブートローダの場合、ファームウェアをコンパイルして書き込む準備ができたら、ターミナルウィンドウを開いてビルドコマンドを実行します。 - - make ::dfu - -たとえば、キーマップの名前が xyverz で、rev5 planck のキーマップを作成している場合、次のコマンドを使用します。 - - make planck/rev5:xyverz:dfu - -コンパイルが終了すると、以下の出力になるはずです。 - -``` -Linking: .build/planck_rev5_xyverz.elf [OK] -Creating load file for flashing: .build/planck_rev5_xyverz.hex [OK] -Copying planck_rev5_xyverz.hex to qmk_firmware folder [OK] -Checking file size of planck_rev5_xyverz.hex - * File size is fine - 18574/28672 - ``` - -ここまでくると、ビルドスクリプトは5秒ごとに DFU ブートローダを探します。 -デバイスが見つかるか、あなたがキャンセルするまで、以下を繰り返します。 - - dfu-programmer: no device present. - Error: Bootloader not found. Trying again in 5s. - -これを実行したら、コントローラーをリセットする必要があります。 -そして下のような出力が表示されます。 - -``` -*** Attempting to flash, please don't remove device ->>> dfu-programmer atmega32u4 erase --force - Erasing flash... Success - Checking memory from 0x0 to 0x6FFF... Empty. ->>> dfu-programmer atmega32u4 flash /Users/skully/qmk_firmware/clueboard_66_hotswap_gen1_skully.hex - Checking memory from 0x0 to 0x55FF... Empty. - 0% 100% Programming 0x5600 bytes... - [>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>] Success - 0% 100% Reading 0x7000 bytes... - [>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>] Success - Validating... Success - 0x5600 bytes written into 0x7000 bytes memory (76.79%). ->>> dfu-programmer atmega32u4 reset -``` - -?> `dfu-programmer:no device present` など、これに関する問題がある場合は、[よくある質問](ja/faq_build.md) を参照してください。 - -#### 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 ボードとそれらのクローンの場合(たとえば SparkFun ProMicro)、ファームウェアをコンパイルして書き込む準備ができたら、ターミナルウィンドウを開いてビルドコマンドを実行します。 - - make ::avrdude - -たとえば、キーマップの名前が xyverz で、rev2 Lets Split のキーマップを作成している場合、次のコマンドを使用します。 - - make lets_split/rev2:xyverz:avrdude - -ファームウェアのコンパイルが完了すると、以下のように出力されます。 - -``` -Linking: .build/lets_split_rev2_xyverz.elf [OK] -Creating load file for flashing: .build/lets_split_rev2_xyverz.hex [OK] -Checking file size of lets_split_rev2_xyverz.hex [OK] - * File size is fine - 27938/28672 -Detecting USB port, reset your controller now.............. -``` - -この時点で、キーボードをリセットすると、スクリプトがブートローダを検出し、キーボードに書き込みます。出力は次のようになります。 - -``` -Detected controller on USB port at /dev/ttyS15 - -Connecting to programmer: . -Found programmer: Id = "CATERIN"; type = S - Software Version = 1.0; No Hardware Version given. -Programmer supports auto addr increment. -Programmer supports buffered memory access with buffersize=128 bytes. - -Programmer supports the following devices: - Device code: 0x44 - -avrdude.exe: AVR device initialized and ready to accept instructions - -Reading | ################################################## | 100% 0.00s - -avrdude.exe: Device signature = 0x1e9587 (probably m32u4) -avrdude.exe: NOTE: "flash" memory has been specified, an erase cycle will be performed - To disable this feature, specify the -D option. -avrdude.exe: erasing chip -avrdude.exe: reading input file "./.build/lets_split_rev2_xyverz.hex" -avrdude.exe: input file ./.build/lets_split_rev2_xyverz.hex auto detected as Intel Hex -avrdude.exe: writing flash (27938 bytes): - -Writing | ################################################## | 100% 2.40s - -avrdude.exe: 27938 bytes of flash written -avrdude.exe: verifying flash memory against ./.build/lets_split_rev2_xyverz.hex: -avrdude.exe: load data flash data from input file ./.build/lets_split_rev2_xyverz.hex: -avrdude.exe: input file ./.build/lets_split_rev2_xyverz.hex auto detected as Intel Hex -avrdude.exe: input file ./.build/lets_split_rev2_xyverz.hex contains 27938 bytes -avrdude.exe: reading on-chip flash data: - -Reading | ################################################## | 100% 0.43s - -avrdude.exe: verifying ... -avrdude.exe: 27938 bytes of flash verified - -avrdude.exe: safemode: Fuses OK (E:CB, H:D8, L:FF) - -avrdude.exe done. Thank you. -``` -うまくいかない時は、以下のようにする必要があるかもしれません。 - - sudo make ::avrdude - - -#### Caterina コマンド - -ファームウェアを DFU デバイスに書き込むために使用できる DFU コマンドがいくつかあります。 - -* `:avrdude` - これが通常のオプションで、Caterina デバイスが(新しい COM ポートを検出して)使用可能になるまで待機し、ファームウェアを書き込みます。 -* `:avrdude-loop` - これは `:avrdude` と同じです。ただし書き込みが終了すると再び Caterina デバイスの書き込み待ちに戻ります。これは何台ものデバイスへの書き込みに便利です。_Control+C を押して、手動でこの繰り返しを終了させる必要があります。_ -* `:avrdude-split-left` - デフォルトオプション(`:avrdude`)と同様に通常のファームウェアが書き込まれます。ただし、分割キーボードの「左側の」EEPROM ファイルもフラッシュされます。 _これは、Pro Micro ベースの分割キーボードに最適です。_ -* `:avrdude-split-right` - デフォルトオプション(`:avrdude`)と同様に通常のファームウェアが書き込まれます。ただし、分割キーボードの「右側の」EEPROM ファイルもフラッシュされます。 _これは、Pro Micro ベースの分割キーボードに最適です。_ - -### HalfKay - -PJRC デバイス(Teensy シリーズ)の場合、ファームウェアをコンパイルして書き込む準備ができたら、ターミナルウィンドウを開いてビルドコマンドを実行します。 - - make ::teensy - -たとえば、キーマップの名前が xyverz で、Ergodox または Ergodox EZ のキーマップを作成している場合、次のコマンドを使用します。 - - make ergodox_ez:xyverz:teensy - -ファームウェアのコンパイルが完了すると、以下のように出力されます。 - -``` -Linking: .build/ergodox_ez_xyverz.elf [OK] -Creating load file for flashing: .build/ergodox_ez_xyverz.hex [OK] -Checking file size of ergodox_ez_xyverz.hex [OK] - * File size is fine - 25584/32256 - Teensy Loader, Command Line, Version 2.1 -Read "./.build/ergodox_ez_xyverz.hex": 25584 bytes, 79.3% usage -Waiting for Teensy device... - (hint: press the reset button) - ``` - -この時点で、キーボードをリセットします。すると、次のような出力が表示されます。 - - ``` - Found HalfKay Bootloader -Read "./.build/ergodox_ez_xyverz.hex": 28532 bytes, 88.5% usage -Programming............................................................................................................................................................................ -................................................... -Booting -``` - -### STM32 (ARM) - -主な ARM ボード (Proton C, Planck Rev 6, Preonic Rev 3 を含む)の場合、ファームウェアをコンパイルして書き込む準備ができたら、ターミナルウィンドウを開いてビルドコマンドを実行します。 - - make ::dfu-util - -たとえば、キーマップの名前が xyverz で、Planck Revision 6 のキーマップを作成している場合、次のコマンドを使用し、(コンパイルが終わる前に)キーボードを再起動してブートローダを起動します: - - make planck/rev6:xyverz:dfu-util - -ファームウェアのコンパイルが完了すると、以下のように出力されます。 - -``` -Linking: .build/planck_rev6_xyverz.elf [OK] -Creating binary load file for flashing: .build/planck_rev6_xyverz.bin [OK] -Creating load file for flashing: .build/planck_rev6_xyverz.hex [OK] - -Size after: - text data bss dec hex filename - 0 41820 0 41820 a35c .build/planck_rev6_xyverz.hex - -Copying planck_rev6_xyverz.bin to qmk_firmware folder [OK] -dfu-util 0.9 - -Copyright 2005-2009 Weston Schmidt, Harald Welte and OpenMoko Inc. -Copyright 2010-2016 Tormod Volden and Stefan Schmidt -This program is Free Software and has ABSOLUTELY NO WARRANTY -Please report bugs to http://sourceforge.net/p/dfu-util/tickets/ - -Invalid DFU suffix signature -A valid DFU suffix will be required in a future dfu-util release!!! -Opening DFU capable USB device... -ID 0483:df11 -Run-time device DFU version 011a -Claiming USB DFU Interface... -Setting Alternate Setting #0 ... -Determining device status: state = dfuERROR, status = 10 -dfuERROR, clearing status -Determining device status: state = dfuIDLE, status = 0 -dfuIDLE, continuing -DFU mode device DFU version 011a -Device returned transfer size 2048 -DfuSe interface name: "Internal Flash " -Downloading to address = 0x08000000, size = 41824 -Download [=========================] 100% 41824 bytes -Download done. -File downloaded successfully -Transitioning to dfuMANIFEST state -``` - -#### 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 ユーティリティを介してファームウェアを書き込めます。 - -### BootloadHID - -Bootmapper Client(BMC)/bootloadHID/ATmega32A ベースのキーボードの場合、ファームウェアをコンパイルして書き込む準備ができたら、ターミナルウィンドウを開いてビルドコマンドを実行します。 - - make ::bootloaderHID - -たとえば、キーマップの名前が xyverz で、jj40 のキーマップを作成している場合、次のコマンドを使用します。 - - make jj40:xyverz:bootloaderHID - -ファームウェアのコンパイルが完了すると、以下のように出力されます。 - -``` -Linking: .build/jj40_default.elf [OK] -Creating load file for flashing: .build/jj40_default.hex [OK] -Copying jj40_default.hex to qmk_firmware folder [OK] -Checking file size of jj40_default.hex [OK] - * The firmware size is fine - 21920/28672 (6752 bytes free) -``` - -ここまでくると、ビルドスクリプトは5秒ごとに DFU ブートローダを探します。 -デバイスが見つかるか、あなたがキャンセルするまで、以下を繰り返します。 - -``` -Error opening HIDBoot device: The specified device was not found -Trying again in 5s. -``` - -これを実行したら、コントローラーをリセットする必要があります。 -そして下のような出力が表示されます。 - -``` -Page size = 128 (0x80) -Device size = 32768 (0x8000); 30720 bytes remaining -Uploading 22016 (0x5600) bytes starting at 0 (0x0) -0x05580 ... 0x05600 -``` +この場合、あなたは明示的にブートローダを指定する方法を使わなければなりません。詳細は、[ファームウェアのフラッシュ](ja/flashing.md) ガイドを参照してください。 ## テストしましょう! おめでとうございます! カスタムファームウェアがキーボードにプログラムされました! 使ってみて、すべてがあなたの望むように動作するかどうか確認してください。 -この初心者ガイドを完全なものにするために [テストとデバッグ](ja/newbs_testing_debugging.md) を書いたので、カスタム機能のトラブルシューティング方法については、こちらをご覧ください。 +この初心者ガイドを完全なものにするために [テストとデバッグ](ja/newbs_testing_debugging.md) を書いたので、ファームウェアの検証とカスタム機能のトラブルシューティング方法について学ぶには、こちらをご覧ください。 From 00b8a12d065cc7b94b908f67c37151939495569a Mon Sep 17 00:00:00 2001 From: Nguyen Minh Hoang Date: Sat, 1 Aug 2020 14:05:35 +0700 Subject: [PATCH 504/930] [Keyboard] POM Keyboards TNLN95 (#9788) * add keyboard tnln95 * keyboard tnln95, fix info * Apply suggestions from code review * keyboard tnln95, fix info (2) * keyboard tnln95, move folder, fix info * keyboard tnln95, fix keymap * Apply suggestions from code review * Apply suggestions from code review * Apply suggestions from code review * keyboard tnln95, fix link, comment currently not used pin * Apply suggestions from code review --- keyboards/pom_keyboards/tnln95/config.h | 81 +++++++++++++++++++ keyboards/pom_keyboards/tnln95/info.json | 18 +++++ .../tnln95/keymaps/default/keymap.c | 42 ++++++++++ keyboards/pom_keyboards/tnln95/readme.md | 20 +++++ keyboards/pom_keyboards/tnln95/rules.mk | 23 ++++++ keyboards/pom_keyboards/tnln95/tnln95.c | 35 ++++++++ keyboards/pom_keyboards/tnln95/tnln95.h | 60 ++++++++++++++ 7 files changed, 279 insertions(+) create mode 100644 keyboards/pom_keyboards/tnln95/config.h create mode 100644 keyboards/pom_keyboards/tnln95/info.json create mode 100644 keyboards/pom_keyboards/tnln95/keymaps/default/keymap.c create mode 100644 keyboards/pom_keyboards/tnln95/readme.md create mode 100644 keyboards/pom_keyboards/tnln95/rules.mk create mode 100644 keyboards/pom_keyboards/tnln95/tnln95.c create mode 100644 keyboards/pom_keyboards/tnln95/tnln95.h diff --git a/keyboards/pom_keyboards/tnln95/config.h b/keyboards/pom_keyboards/tnln95/config.h new file mode 100644 index 000000000000..78d2d805e19f --- /dev/null +++ b/keyboards/pom_keyboards/tnln95/config.h @@ -0,0 +1,81 @@ +/* +Copyright 2020 Nguyen Minh Hoang + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License 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 0x544E +#define PRODUCT_ID 0x3931 +#define DEVICE_VER 0x0001 +#define MANUFACTURER POM_keyboard +#define PRODUCT tnln95 + +/* 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 { B6, B4, B0, D7, E6, D4, F5, D6, C6, B5 } +#define MATRIX_COL_PINS { F4, F1, F0, F6, F7, D0, D1, D2, D3, D5 } +#define UNUSED_PINS + +/* COL2ROW, ROW2COL*/ +#define DIODE_DIRECTION ROW2COL + +#define BACKLIGHT_PIN B7 +#define BACKLIGHT_BREATHING +#define BACKLIGHT_LEVELS 10 + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCE 8 + +/* Bootmagic lite */ +#define BOOTMAGIC_LITE_ROW 0 +#define BOOTMAGIC_LITE_COLUMN 4 + +/* 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 + +/* RGB Configs */ +#define RGB_DI_PIN C7 +#ifdef RGB_DI_PIN + #define RGBLED_NUM 14 + #define RGBLIGHT_ANIMATIONS + #define RGBLIGHT_HUE_STEP 8 + #define RGBLIGHT_SAT_STEP 8 + #define RGBLIGHT_VAL_STEP 8 + #define RGBLIGHT_SLEEP // RGB will turn off when PC is put to sleep +// #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 225 // 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_SOLID_COLOR // Sets the default mode, if none has been set +#endif diff --git a/keyboards/pom_keyboards/tnln95/info.json b/keyboards/pom_keyboards/tnln95/info.json new file mode 100644 index 000000000000..d72a0fe1dcd3 --- /dev/null +++ b/keyboards/pom_keyboards/tnln95/info.json @@ -0,0 +1,18 @@ +{ + "keyboard_name": "tnln95", + "url": "http://www.keyboard-layout-editor.com/#/gists/45aee74c726e32a063130a715fc494d3", + "maintainer": "HoangNM", + "width": 21.25, + "height": 5, + "layouts": { + "LAYOUT_ansi": { + "layout": [ + { "label": "-", "x": 0, "y": 0 },{ "label": "/", "x": 1, "y": 0 },{ "label": "*", "x": 2, "y": 0 },{ "label": "Bksp", "x": 3, "y": 0 },{ "label": "Esc", "x": 4, "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": ")", "x": 15.25, "y": 0 },{ "label": "_", "x": 16.25, "y": 0 },{ "label": "+", "x": 17.25, "y": 0 },{ "label": "Backspace", "x": 18.25, "y": 0, "w": 2 },{ "label": "Home", "x": 20.25, "y": 0 }, + { "label": "7", "x": 1, "y": 1 }, { "label": "8", "x": 2, "y": 1 }, { "label": "9", "x": 3, "y": 1 }, { "label": "Num Lock", "x": 4, "y": 1 }, { "label": "Tab", "x": 5.25, "y": 1, "w": 1.5 }, { "label": "Q", "x": 6.25, "y": 1 }, { "label": "W", "x": 7.25, "y": 1 }, { "label": "E", "x": 8.25, "y": 1 }, { "label": "R", "x": 9.25, "y": 1 }, { "label": "T", "x": 10.25, "y": 1 }, { "label": "Y", "x": 11.25, "y": 1 }, { "label": "U", "x": 12.25, "y": 1 }, { "label": "I", "x": 13.25, "y": 1 }, { "label": "O", "x": 14.25, "y": 1 }, { "label": "P", "x": 15.25, "y": 1 }, { "label": "{", "x": 16.25, "y": 1 }, { "label": "}", "x": 17.25, "y": 1 }, { "label": "|", "x": 18.75, "y": 1, "w": 1.5 }, { "label": "Delete", "x": 20.25, "y": 1 }, + { "label": "+", "x": 0, "y": 2, "h": 2 }, { "label": "4", "x": 1, "y": 2 }, { "label": "5", "x": 2, "y": 2 }, { "label": "6", "x": 3, "y": 2 }, { "label": "Copy", "x": 4, "y": 2 },{ "label": "Capslock", "x": 5.25, "y": 3, "w": 1.75 }, { "label": "A", "x": 7, "y": 3 }, { "label": "S", "x": 8, "y": 3 }, { "label": "D", "x": 9, "y": 3 }, { "label": "F", "x": 10, "y": 3 }, { "label": "G", "x": 11, "y": 3 }, { "label": "H", "x": 12, "y": 3 }, { "label": "J", "x": 13, "y": 3 }, { "label": "K", "x": 14, "y": 3 }, { "label": "L", "x": 15, "y": 3 }, { "label": ":", "x": 16, "y": 3 }, { "label": "\"", "x": 17, "y": 3 }, { "label": "Enter", "x": 18, "y": 1, "w": 2.25 }, { "label": "PageUp", "x": 20.25, "y": 1 }, + { "label": "1", "x": 1, "y": 4 }, { "label": "2", "x": 2, "y": 4 }, { "label": "3", "x": 3, "y": 4 }, { "label": "Paste", "x": 4, "y": 4 },{ "label": "Shift", "x": 5.25, "y": 4, "w": 2.25 },{ "label": "Z", "x": 7.5, "y": 4 },{ "label": "X", "x": 8.5, "y": 4 },{ "label": "C", "x": 9.5, "y": 4 },{ "label": "V", "x": 10.5, "y": 4 },{ "label": "B", "x": 11.5, "y": 4 },{ "label": "N", "x": 12.5, "y": 4 },{ "label": "M", "x": 13.5, "y": 4 },{ "label": "<", "x": 14.5, "y": 4 },{ "label": ">", "x": 15.5, "y": 4 },{ "label": "?", "x": 16.5, "y": 4 },{ "label": "Shift", "x": 17.5, "y": 4, "w": 1.75 },{ "label": "Up", "x": 19.25, "y": 4 },{ "label": "PageDown", "x": 20.25, "y": 4 }, + { "label": "Enter", "x": 0, "y": 5, "h": 2 }, { "label": ".", "x": 1, "y": 5 }, { "label": "0", "x": 2, "y": 5, "w": 2 }, { "label": ",", "x": 4, "y": 5 },{ "label": "Ctrl", "x": 5.25, "y": 5, "w": 1.25 },{ "label": "Win", "x": 6.5, "y": 5, "w": 1.25 },{ "label": "Alt", "x": 7.75, "y": 5, "w": 1.25 },{ "label": "Space", "x": 9, "y": 5, "w": 6.25 },{ "label": "Alt", "x": 15.25, "y": 5, "w": 1.5 },{ "label": "Fn", "x": 16.75, "y": 5, "w": 1.5 },{ "label": "Left", "x": 18.25, "y": 5 },{ "label": "Down", "x": 19.25, "y": 5 },{ "label": "Right", "x": 20.25, "y": 5 } + ] + } + } +} diff --git a/keyboards/pom_keyboards/tnln95/keymaps/default/keymap.c b/keyboards/pom_keyboards/tnln95/keymaps/default/keymap.c new file mode 100644 index 000000000000..066961daad03 --- /dev/null +++ b/keyboards/pom_keyboards/tnln95/keymaps/default/keymap.c @@ -0,0 +1,42 @@ +/* Copyright 2020 Nguyen Minh HOang + + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public 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 { + _DEF, + _FNC +}; + +#define CMD_COPY LCTL(KC_INS) +#define CMD_PASTE LSFT(KC_INS) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_DEF] = LAYOUT_ansi( + KC_PMNS, KC_PAST, KC_PSLS, KC_BSPACE, KC_ESC, KC_GRAVE, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINUS, KC_EQUAL, KC_BSPACE, KC_HOME, + KC_P7, KC_P8, KC_P9, KC_NUMLOCK, KC_TAB, KC_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_PPLS, KC_P4, KC_P5, KC_P6, CMD_COPY, KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCOLON, KC_QUOTE, KC_ENTER, KC_PGDN, + KC_P1, KC_P2, KC_P3, CMD_PASTE, KC_LSHIFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMMA, KC_DOT, KC_SLASH, KC_RSHIFT, KC_UP, KC_END, + KC_PENT, KC_PDOT, KC_P0, KC_COMMA , KC_LCTRL, KC_LGUI, KC_LALT, KC_SPACE, KC_RALT, MO(_FNC), KC_LEFT, KC_DOWN, KC_RIGHT + ), + [_FNC] = 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_PSCR, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_TOG, RGB_RMOD, RGB_MOD, KC_INS, KC_VOLU, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, BL_TOGG, KC_VOLD, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, BL_DEC, BL_INC, BL_BRTG, _______, _______, KC_MUTE, + _______, _______, _______, _______ , _______, _______, _______, _______, _______, MO(_FNC), _______, _______, _______ + ) +}; diff --git a/keyboards/pom_keyboards/tnln95/readme.md b/keyboards/pom_keyboards/tnln95/readme.md new file mode 100644 index 000000000000..8ad05bddb3b4 --- /dev/null +++ b/keyboards/pom_keyboards/tnln95/readme.md @@ -0,0 +1,20 @@ +# POM Keyboards - TNLN95 + +![TNLN95 Layout Image](https://i.imgur.com/nIefJ0m.png) + +### Default TNLN95 Layout + +This is the default layout that comes flashed on every TNLN95. + +* Keyboard Maintainer: [Hoang Nguyen Minh](https://github.com/NMHoang05/) +* Hardware Supported: TNLN95 +* Hardware Availability: (soon!) + +Make example for this keyboard (after setting up your build environment): + + make pom_keyboards/tnln95: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). + +--- +Alternate layout will be updated soon! diff --git a/keyboards/pom_keyboards/tnln95/rules.mk b/keyboards/pom_keyboards/tnln95/rules.mk new file mode 100644 index 000000000000..8d25f09aca26 --- /dev/null +++ b/keyboards/pom_keyboards/tnln95/rules.mk @@ -0,0 +1,23 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +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 = yes # USB Nkey Rollover +BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = yes # Enable RGB underglow +BLUETOOTH_ENABLE = no # Enable Bluetooth +AUDIO_ENABLE = no # Audio output +LTO_ENABLE = yes diff --git a/keyboards/pom_keyboards/tnln95/tnln95.c b/keyboards/pom_keyboards/tnln95/tnln95.c new file mode 100644 index 000000000000..14b851163f3a --- /dev/null +++ b/keyboards/pom_keyboards/tnln95/tnln95.c @@ -0,0 +1,35 @@ +/* Copyright 2020 Nguyen Minh Hoang + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#include "tnln95.h" + +void keyboard_pre_init_kb(void) { + setPinOutput(B1); + setPinOutput(B2); + /* I will add function to these later */ + // setPinOutput(B3); + // setPinOutput(E2); + + keyboard_pre_init_user(); +} + +bool led_update_kb(led_t led_state) { + bool res = led_update_user(led_state); + if(res) { + writePin(B1, led_state.num_lock); + writePin(B2, led_state.caps_lock); + } + return res; +} diff --git a/keyboards/pom_keyboards/tnln95/tnln95.h b/keyboards/pom_keyboards/tnln95/tnln95.h new file mode 100644 index 000000000000..ee88d9aac49d --- /dev/null +++ b/keyboards/pom_keyboards/tnln95/tnln95.h @@ -0,0 +1,60 @@ +/* Copyright 2020 Nguyen Minh Hoang + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License 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 +// The second converts the arguments into a two-dimensional array + +#define LAYOUT_all(\ + K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K96, \ + 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, K58, K59, \ + K60, K61, K62, K63, K64, K65, K66, K67, K68, K69, K70, K71, K72, K73, K74, K75, K77, K78, K79, \ + K80, K81, K82, K83, K84, K85, K86, K87, K88, K89, K92, K93, K94, K95, K97, K98, 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, KC_NO, K58, K59 },\ + { K60, K61, K62, K63, K64, K65, K66, K67, K68, K69 },\ + { K70, K71, K72, K73, K74, K75, KC_NO, K77, K78, K79 },\ + { K80, K81, K82, K83, K84, K85, K86, K87, K88, K89 },\ + { KC_NO, KC_NO, K92, K93, K94, K95, K96, K97, K98, K99 } \ +} + +#define LAYOUT_ansi(\ + K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K10, K11, K12, K13, K14, K15, K16, K17, K19, K96, \ + 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, K58, K59, \ + K61, K62, K63, K64, K65, K66, K67, K68, K69, K70, K71, K72, K73, K74, K75, K77, K78, K79, \ + K80, K81, K83, K84, K85, K86, K87, K89, K93, K95, K97, K98, K99 \ +) {\ + { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09 },\ + { K10, K11, K12, K13, K14, K15, K16, K17, KC_NO, K19 },\ + { KC_NO, 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, KC_NO, K58, K59 },\ + { KC_NO, K61, K62, K63, K64, K65, K66, K67, K68, K69 },\ + { K70, K71, K72, K73, K74, K75, KC_NO, K77, K78, K79 },\ + { K80, K81, KC_NO, K83, K84, K85, K86, K87, KC_NO, K89 },\ + { KC_NO, KC_NO, KC_NO, K93, KC_NO, K95, K96, K97, K98, K99 } \ +} From 12fce9b88d8d70463ec32dc94e0abaa987bf389c Mon Sep 17 00:00:00 2001 From: James Young <18669334+noroadsleft@users.noreply.github.com> Date: Sun, 2 Aug 2020 16:43:27 -0700 Subject: [PATCH 505/930] fix Dactyl-Manuform 5x6_5 compilation (#9902) --- keyboards/handwired/dactyl_manuform/5x6_5/config.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/keyboards/handwired/dactyl_manuform/5x6_5/config.h b/keyboards/handwired/dactyl_manuform/5x6_5/config.h index b5195abbc692..1e68b6df0163 100644 --- a/keyboards/handwired/dactyl_manuform/5x6_5/config.h +++ b/keyboards/handwired/dactyl_manuform/5x6_5/config.h @@ -20,7 +20,8 @@ along with this program. If not, see . #include "config_common.h" - +#define PRODUCT_ID 0x3536 +#define DEVICE_VER 0x0002 #define PRODUCT Dactyl-Manuform (5x6) /* key matrix size */ From 2c9e210c36a7d145b21bc59350b76b3bacbc3beb Mon Sep 17 00:00:00 2001 From: mechlovin <57231893+mechlovin@users.noreply.github.com> Date: Tue, 4 Aug 2020 09:46:55 +0700 Subject: [PATCH 506/930] [Keyboard] add Hannah910 rev3 (#9710) --- keyboards/mechlovin/hannah910/hannah910.h | 2 + keyboards/mechlovin/hannah910/readme.md | 6 +- keyboards/mechlovin/hannah910/rev3/config.h | 6 + keyboards/mechlovin/hannah910/rev3/info.json | 159 ++++++++++++++++++ .../hannah910/rev3/keymaps/ansi/keymap.c | 47 ++++++ .../hannah910/rev3/keymaps/ansi/readme.md | 1 + .../hannah910/rev3/keymaps/default/keymap.c | 27 +++ .../hannah910/rev3/keymaps/default/readme.md | 1 + .../hannah910/rev3/keymaps/via/keymap.c | 48 ++++++ .../hannah910/rev3/keymaps/via/readme.md | 1 + .../hannah910/rev3/keymaps/via/rules.mk | 1 + keyboards/mechlovin/hannah910/rev3/readme.md | 19 +++ keyboards/mechlovin/hannah910/rev3/rev3.h | 34 ++++ keyboards/mechlovin/hannah910/rev3/rules.mk | 24 +++ 14 files changed, 374 insertions(+), 2 deletions(-) create mode 100644 keyboards/mechlovin/hannah910/rev3/config.h create mode 100644 keyboards/mechlovin/hannah910/rev3/info.json create mode 100644 keyboards/mechlovin/hannah910/rev3/keymaps/ansi/keymap.c create mode 100644 keyboards/mechlovin/hannah910/rev3/keymaps/ansi/readme.md create mode 100644 keyboards/mechlovin/hannah910/rev3/keymaps/default/keymap.c create mode 100644 keyboards/mechlovin/hannah910/rev3/keymaps/default/readme.md create mode 100644 keyboards/mechlovin/hannah910/rev3/keymaps/via/keymap.c create mode 100644 keyboards/mechlovin/hannah910/rev3/keymaps/via/readme.md create mode 100644 keyboards/mechlovin/hannah910/rev3/keymaps/via/rules.mk create mode 100644 keyboards/mechlovin/hannah910/rev3/readme.md create mode 100644 keyboards/mechlovin/hannah910/rev3/rev3.h create mode 100644 keyboards/mechlovin/hannah910/rev3/rules.mk diff --git a/keyboards/mechlovin/hannah910/hannah910.h b/keyboards/mechlovin/hannah910/hannah910.h index de9929bd12ab..2cc38d069030 100644 --- a/keyboards/mechlovin/hannah910/hannah910.h +++ b/keyboards/mechlovin/hannah910/hannah910.h @@ -21,4 +21,6 @@ #include "rev1.h" #elif KEYBOARD_mechlovin_hannah910_rev2 #include "rev2.h" +#elif KEYBOARD_mechlovin_hannah910_rev3 + #include "rev3.h" #endif diff --git a/keyboards/mechlovin/hannah910/readme.md b/keyboards/mechlovin/hannah910/readme.md index b16b294a5c1b..4f95938b588f 100644 --- a/keyboards/mechlovin/hannah910/readme.md +++ b/keyboards/mechlovin/hannah910/readme.md @@ -2,20 +2,22 @@ ![hannah910](https://i.imgur.com/n8WN5Z7.jpg) -Replacement PCB and plate for TGR 910 keyboard +Replacement PCB and plate for TGR 910 keyboard, Kyuu Keyboard (TypeC version) * Keyboard Maintainer: [Mechlovin'](https://github.com/mechlovin) -* Hardware Supported: TGR910 CE, TGR910 SE +* Hardware Supported: TGR910 CE, TGR910 SE, Kyuu (TypeC version) * 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 make mechlovin/hannah910/rev2:default + make mechlovin/hannah910/rev3:default Make firmware for keymap with VIA: make mechlovin/hannah910/rev1:via make mechlovin/hannah910/rev2:via + make mechlovin/hannah910/rev3: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/rev3/config.h b/keyboards/mechlovin/hannah910/rev3/config.h new file mode 100644 index 000000000000..b6e539d67448 --- /dev/null +++ b/keyboards/mechlovin/hannah910/rev3/config.h @@ -0,0 +1,6 @@ +#pragma once + +#define PRODUCT_ID 0x9103 +#define DEVICE_VER 0x0002 + +#define RGBLED_NUM 28 \ No newline at end of file diff --git a/keyboards/mechlovin/hannah910/rev3/info.json b/keyboards/mechlovin/hannah910/rev3/info.json new file mode 100644 index 000000000000..8cde5d253ce0 --- /dev/null +++ b/keyboards/mechlovin/hannah910/rev3/info.json @@ -0,0 +1,159 @@ +{ + "keyboard_name": "hannah910-rev3", + "url": "", + "maintainer": "Team Mechlovin'", + "width": 16, + "height": 5, + "layouts": { + "LAYOUT_all": { + "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":"K48 (B4,C5)", "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":"K43 (B4,C0)", "x":3.75, "y":4, "w":2.75}, + {"label":"K46 (B4,C3)", "x":6.5, "y":4, "w":1.25}, + {"label":"K47 (B4,C4)", "x":7.75, "y":4, "w":2.25}, + {"label":"K49 (B4,C6)", "x":10, "y":4}, + {"label":"K4A (B4,C7)", "x":11, "y":4}, + {"label":"K4B (B4,D0)", "x":12, "y":4}, + {"label":"K4C (B4,D1)", "x":13, "y":4}, + {"label":"K4D (B4,D2)", "x":14, "y":4}, + {"label":"K4E (B4,D3)", "x":15, "y":4} + ] + }, + "LAYOUT_65_ansi": { + "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, "w":2}, + {"label":"K48 (B4,C5)", "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":"K2D (B2,D2)", "x":12.75, "y":2, "w":2.25}, + {"label":"K2E (B2,D3)", "x":15, "y":2}, + {"label":"K30 (B3,B5)", "x":0, "y":3, "w":2.25}, + {"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":"K46 (B4,C3)", "x":3.75, "y":4, "w":6.25}, + {"label":"K49 (B4,C6)", "x":10, "y":4}, + {"label":"K4A (B4,C7)", "x":11, "y":4}, + {"label":"K4B (B4,D0)", "x":12, "y":4}, + {"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/rev3/keymaps/ansi/keymap.c b/keyboards/mechlovin/hannah910/rev3/keymaps/ansi/keymap.c new file mode 100644 index 000000000000..70ba2431bd5b --- /dev/null +++ b/keyboards/mechlovin/hannah910/rev3/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_65_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_RGUI, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT + ), + [1] = LAYOUT_65_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, KC_TRNS, KC_TRNS + ), + [2] = LAYOUT_65_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, KC_TRNS, KC_TRNS + ), + [3] = LAYOUT_65_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, KC_TRNS, KC_TRNS + ), +}; \ No newline at end of file diff --git a/keyboards/mechlovin/hannah910/rev3/keymaps/ansi/readme.md b/keyboards/mechlovin/hannah910/rev3/keymaps/ansi/readme.md new file mode 100644 index 000000000000..f1f3ec9015b9 --- /dev/null +++ b/keyboards/mechlovin/hannah910/rev3/keymaps/ansi/readme.md @@ -0,0 +1 @@ +# The ansi keymap for hannah910v2 \ No newline at end of file diff --git a/keyboards/mechlovin/hannah910/rev3/keymaps/default/keymap.c b/keyboards/mechlovin/hannah910/rev3/keymaps/default/keymap.c new file mode 100644 index 000000000000..59f46dfbaa75 --- /dev/null +++ b/keyboards/mechlovin/hannah910/rev3/keymaps/default/keymap.c @@ -0,0 +1,27 @@ +/* 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( /* 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_RGUI, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT + ), +}; \ No newline at end of file diff --git a/keyboards/mechlovin/hannah910/rev3/keymaps/default/readme.md b/keyboards/mechlovin/hannah910/rev3/keymaps/default/readme.md new file mode 100644 index 000000000000..f073d24c2c66 --- /dev/null +++ b/keyboards/mechlovin/hannah910/rev3/keymaps/default/readme.md @@ -0,0 +1 @@ +# The full keymap for hannah910v2 \ No newline at end of file diff --git a/keyboards/mechlovin/hannah910/rev3/keymaps/via/keymap.c b/keyboards/mechlovin/hannah910/rev3/keymaps/via/keymap.c new file mode 100644 index 000000000000..4bef3d0f48da --- /dev/null +++ b/keyboards/mechlovin/hannah910/rev3/keymaps/via/keymap.c @@ -0,0 +1,48 @@ +/* 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( /* 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_RGUI, 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 + ), + [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 + ), + [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 + ), +}; \ No newline at end of file diff --git a/keyboards/mechlovin/hannah910/rev3/keymaps/via/readme.md b/keyboards/mechlovin/hannah910/rev3/keymaps/via/readme.md new file mode 100644 index 000000000000..8dac1d9122d8 --- /dev/null +++ b/keyboards/mechlovin/hannah910/rev3/keymaps/via/readme.md @@ -0,0 +1 @@ +# The via keymap for hannah910v3 \ No newline at end of file diff --git a/keyboards/mechlovin/hannah910/rev3/keymaps/via/rules.mk b/keyboards/mechlovin/hannah910/rev3/keymaps/via/rules.mk new file mode 100644 index 000000000000..1e5b99807cb7 --- /dev/null +++ b/keyboards/mechlovin/hannah910/rev3/keymaps/via/rules.mk @@ -0,0 +1 @@ +VIA_ENABLE = yes diff --git a/keyboards/mechlovin/hannah910/rev3/readme.md b/keyboards/mechlovin/hannah910/rev3/readme.md new file mode 100644 index 000000000000..5e5339693133 --- /dev/null +++ b/keyboards/mechlovin/hannah910/rev3/readme.md @@ -0,0 +1,19 @@ +# hannah910 + +![hannah910](https://i.imgur.com/WX86LCp.png) + +Replacement PCB and plate for TGR 910 keyboard, Kyuu Keyboard (TypeC version) + +* Keyboard Maintainer: [Mechlovin'](https://github.com/mechlovin) +* Hardware Supported: TGR910 CE, TGR910 SE, Kyuu (TypeC version) +* 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/rev3:default + +Make firmware for keymap with VIA: + + make mechlovin/hannah910/rev3: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/rev3/rev3.h b/keyboards/mechlovin/hannah910/rev3/rev3.h new file mode 100644 index 000000000000..2a987538d7ab --- /dev/null +++ b/keyboards/mechlovin/hannah910/rev3/rev3.h @@ -0,0 +1,34 @@ +#pragma once + + +#include "quantum.h" + + + +#define LAYOUT_all( \ + K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, K48, \ + 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, K47, 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, 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, K47, K48, K49, K4A, K4B, K4C, K4D, K4E }, \ +} + +#define LAYOUT_65_ansi( \ + K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K48, \ + 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, K46, K49, K4A, K4B, K4C, K4D, K4E \ +) { \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, KC_NO }, \ + { 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, KC_NO, K2D, K2E }, \ + { K30, KC_NO, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E }, \ + { K40, K41, K42, KC_NO, KC_NO, KC_NO, K46, KC_NO, K48, K49, K4A, K4B, K4C, K4D, K4E }, \ +} diff --git a/keyboards/mechlovin/hannah910/rev3/rules.mk b/keyboards/mechlovin/hannah910/rev3/rules.mk new file mode 100644 index 000000000000..a8100762d3a4 --- /dev/null +++ b/keyboards/mechlovin/hannah910/rev3/rules.mk @@ -0,0 +1,24 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +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 +BLUETOOTH_ENABLE = no # Enable Bluetooth +AUDIO_ENABLE = no # Audio output + +LAYOUTS = 65_ansi \ No newline at end of file From fb297a564487b6779d6abbed9c86817b8ac66da6 Mon Sep 17 00:00:00 2001 From: Marco Syfrig Date: Tue, 4 Aug 2020 04:49:26 +0200 Subject: [PATCH 507/930] [Docs] small text and formatting fixes in vscode manual (#9156) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * small text and formatting fixes in vscode manual fix double opening tags for correct formatting expand two points for better understanding * restored , clarified how to open the terminal restored tags that were deleted with the last commit; they are correct as they were to have the whole menu "breadcrumb" nested inside a box clarified how to open the terminal escaped backtick for shortcut Ctrl+` as I’ve added backticks for code on the same line * Update docs/other_vscode.md --- docs/other_vscode.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/other_vscode.md b/docs/other_vscode.md index d544db6307ef..d98b96bdf189 100644 --- a/docs/other_vscode.md +++ b/docs/other_vscode.md @@ -77,11 +77,11 @@ Now, we will set up the MSYS2 window to show up in VSCode as the integrated term } ``` - If there are settings here already, then just add everything between the first and last curly brackets. + If there are settings here already, then just add everything between the first and last curly brackets and separate the existing settings with a comma from the newly added ones. ?> If you installed MSYS2 to a different folder, then you'll need to change the path for `terminal.integrated.shell.windows` to the correct path for your system. -4. Hit Ctrl-` (grave) to bring up the terminal. +4. Hit Ctrl-`\`` (Grave) to bring up the terminal or go to View > Terminal (command `workbench.action.terminal.toggleTerminal`). A new terminal will be opened if there isn‘t one already. This should start the terminal in the workspace's folder (so the `qmk_firmware` folder), and then you can compile your keyboard. From f047840d0f84033ab6a1cba0e4d5f09abfb6f81f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=81lvaro=20A=2E=20Volpato?= Date: Tue, 4 Aug 2020 02:13:33 -0300 Subject: [PATCH 508/930] [Keyboard] Add ArcticPCB pre-Alpha support (#8479) * Add initial ArcticPCB support * Added README * Solve info.json comma issue * Apply suggestions from noroadsleft code review Use the LAYOUT_60_tsangan_hhkb Community Layout * Apply suggestions from tzarc * Add license header to arctic.c, arctic.h and config.h * Remove redundant tsangan keymap * Remove tsangan compilation suggestion from readme --- keyboards/acheron/arctic/arctic.c | 18 + keyboards/acheron/arctic/arctic.h | 36 + keyboards/acheron/arctic/chconf.h | 714 ++++++++++++++++++ keyboards/acheron/arctic/config.h | 70 ++ keyboards/acheron/arctic/halconf.h | 525 +++++++++++++ keyboards/acheron/arctic/info.json | 15 + .../acheron/arctic/keymaps/default/keymap.c | 32 + keyboards/acheron/arctic/mcuconf.h | 176 +++++ keyboards/acheron/arctic/readme.md | 33 + keyboards/acheron/arctic/rules.mk | 22 + 10 files changed, 1641 insertions(+) create mode 100644 keyboards/acheron/arctic/arctic.c create mode 100644 keyboards/acheron/arctic/arctic.h create mode 100644 keyboards/acheron/arctic/chconf.h create mode 100644 keyboards/acheron/arctic/config.h create mode 100644 keyboards/acheron/arctic/halconf.h create mode 100644 keyboards/acheron/arctic/info.json create mode 100755 keyboards/acheron/arctic/keymaps/default/keymap.c create mode 100644 keyboards/acheron/arctic/mcuconf.h create mode 100644 keyboards/acheron/arctic/readme.md create mode 100644 keyboards/acheron/arctic/rules.mk diff --git a/keyboards/acheron/arctic/arctic.c b/keyboards/acheron/arctic/arctic.c new file mode 100644 index 000000000000..716150a10765 --- /dev/null +++ b/keyboards/acheron/arctic/arctic.c @@ -0,0 +1,18 @@ +/* +Copyright 2015 Álvaro "Gondolindrim" Volpato + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#include "arctic.h" diff --git a/keyboards/acheron/arctic/arctic.h b/keyboards/acheron/arctic/arctic.h new file mode 100644 index 000000000000..19c9385cc133 --- /dev/null +++ b/keyboards/acheron/arctic/arctic.h @@ -0,0 +1,36 @@ +/* +Copyright 2015 Álvaro "Gondolindrim" Volpato + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License 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 + +#define LAYOUT_60_tsangan_hhkb( \ + 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, \ + K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, \ + K40, K41, K42, K46, 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, 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, ___}, \ + { K40, K41, K42, ___, ___, ___, K46, ___, ___, K49, K4A, K4B, ___, ___} \ +} diff --git a/keyboards/acheron/arctic/chconf.h b/keyboards/acheron/arctic/chconf.h new file mode 100644 index 000000000000..4640ff5332b0 --- /dev/null +++ b/keyboards/acheron/arctic/chconf.h @@ -0,0 +1,714 @@ +/* + 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. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +/** + * @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. + * + * @addtogroup config + * @details Kernel related settings and hooks. + * @{ + */ + +#ifndef CHCONF_H +#define CHCONF_H + +#define _CHIBIOS_RT_CONF_ +#define _CHIBIOS_RT_CONF_VER_6_0_ + +/*===========================================================================*/ +/** + * @name System timers settings + * @{ + */ +/*===========================================================================*/ + +/** + * @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. + * @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. + */ +#if !defined(CH_CFG_ST_TIMEDELTA) +#define CH_CFG_ST_TIMEDELTA 2 +#endif + +/** @} */ + +/*===========================================================================*/ +/** + * @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. + */ +#if !defined(CH_CFG_TIME_QUANTUM) +#define CH_CFG_TIME_QUANTUM 0 +#endif + +/** + * @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. + */ +#if !defined(CH_CFG_MEMCORE_SIZE) +#define CH_CFG_MEMCORE_SIZE 0 +#endif + +/** + * @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. + */ +#if !defined(CH_CFG_NO_IDLE_THREAD) +#define CH_CFG_NO_IDLE_THREAD FALSE +#endif + +/** @} */ + +/*===========================================================================*/ +/** + * @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. + */ +#if !defined(CH_CFG_OPTIMIZE_SPEED) +#define CH_CFG_OPTIMIZE_SPEED FALSE +#endif + +/** @} */ + +/*===========================================================================*/ +/** + * @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. + */ +#if !defined(CH_CFG_USE_TM) +#define CH_CFG_USE_TM FALSE +#endif + +/** + * @brief Threads registry APIs. + * @details If enabled then the registry APIs are included in the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_REGISTRY) +#define CH_CFG_USE_REGISTRY TRUE +#endif + +/** + * @brief Threads synchronization APIs. + * @details If enabled then the @p chThdWait() function is included in + * the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_WAITEXIT) +#define CH_CFG_USE_WAITEXIT TRUE +#endif + +/** + * @brief Semaphores APIs. + * @details If enabled then the Semaphores APIs are included in the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_SEMAPHORES) +#define CH_CFG_USE_SEMAPHORES TRUE +#endif + +/** + * @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. + */ +#if !defined(CH_CFG_USE_SEMAPHORES_PRIORITY) +#define CH_CFG_USE_SEMAPHORES_PRIORITY FALSE +#endif + +/** + * @brief Mutexes APIs. + * @details If enabled then the mutexes APIs are included in the kernel. + * + * @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. + * @note Recursive mutexes are heavier and have an increased + * memory footprint. + * + * @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. + * @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. + */ +#if !defined(CH_CFG_USE_CONDVARS) +#define CH_CFG_USE_CONDVARS TRUE +#endif + +/** + * @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. + */ +#if !defined(CH_CFG_USE_CONDVARS_TIMEOUT) +#define CH_CFG_USE_CONDVARS_TIMEOUT FALSE +#endif + +/** + * @brief Events Flags APIs. + * @details If enabled then the event flags APIs are included in the kernel. + * + * @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. + * @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. + */ +#if !defined(CH_CFG_USE_EVENTS_TIMEOUT) +#define CH_CFG_USE_EVENTS_TIMEOUT TRUE +#endif + +/** + * @brief Synchronous Messages APIs. + * @details If enabled then the synchronous messages APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_MESSAGES) +#define CH_CFG_USE_MESSAGES TRUE +#endif + +/** + * @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. + */ +#if !defined(CH_CFG_USE_MESSAGES_PRIORITY) +#define CH_CFG_USE_MESSAGES_PRIORITY FALSE +#endif + +/** + * @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. + */ +#if !defined(CH_CFG_USE_MAILBOXES) +#define CH_CFG_USE_MAILBOXES TRUE +#endif + +/** + * @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. + */ +#if !defined(CH_CFG_USE_MEMCORE) +#define CH_CFG_USE_MEMCORE FALSE +#endif + +/** + * @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. + */ +#if !defined(CH_CFG_USE_HEAP) +#define CH_CFG_USE_HEAP FALSE +#endif + +/** + * @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. + */ +#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. + * @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. + */ +#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 + +/** @} */ + +/*===========================================================================*/ +/** + * @name Debug options + * @{ + */ +/*===========================================================================*/ + +/** + * @brief Debug option, kernel statistics. + * + * @note The default is @p FALSE. + */ +#if !defined(CH_DBG_STATISTICS) +#define CH_DBG_STATISTICS FALSE +#endif + +/** + * @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. + */ +#if !defined(CH_DBG_SYSTEM_STATE_CHECK) +#define CH_DBG_SYSTEM_STATE_CHECK FALSE +#endif + +/** + * @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. + */ +#if !defined(CH_DBG_ENABLE_CHECKS) +#define CH_DBG_ENABLE_CHECKS FALSE +#endif + +/** + * @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. + */ +#if !defined(CH_DBG_ENABLE_ASSERTS) +#define CH_DBG_ENABLE_ASSERTS FALSE +#endif + +/** + * @brief Debug option, trace buffer. + * @details If enabled then the trace buffer is activated. + * + * @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. + * @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. + */ +#if !defined(CH_DBG_ENABLE_STACK_CHECK) +#define CH_DBG_ENABLE_STACK_CHECK FALSE +#endif + +/** + * @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. + */ +#if !defined(CH_DBG_FILL_THREADS) +#define CH_DBG_FILL_THREADS FALSE +#endif + +/** + * @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. + */ +#if !defined(CH_DBG_THREADS_PROFILING) +#define CH_DBG_THREADS_PROFILING FALSE +#endif + +/** @} */ + +/*===========================================================================*/ +/** + * @name Kernel hooks + * @{ + */ +/*===========================================================================*/ + +/** + * @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. + */ +#define CH_CFG_THREAD_EXTRA_FIELDS \ + /* Add threads custom fields here.*/ + +/** + * @brief Threads initialization hook. + * @details User initialization code added to the @p _thread_init() function. + * + * @note It is invoked from within @p _thread_init() 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/arctic/config.h b/keyboards/acheron/arctic/config.h new file mode 100644 index 000000000000..4056ad007319 --- /dev/null +++ b/keyboards/acheron/arctic/config.h @@ -0,0 +1,70 @@ +/* +Copyright 2015 Álvaro "Gondolindrim" Volpato + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License 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 0x4150 // AP for AcheronProject +#define PRODUCT_ID 0x4152 // AR for Arctic +#define DEVICE_VER 0x0001 // Revision pre-Alpha +#define MANUFACTURER AcheronProject +#define PRODUCT ArcticPCB + +/* key matrix size */ +#define MATRIX_ROWS 5 +#define MATRIX_COLS 14 + +#define MATRIX_COL_PINS { B0, A5, A4, A3, A2, A1, A0, F1, F0, C15, C14, C13, B9, B8} +#define MATRIX_ROW_PINS { B7, B6, A6, A7, B1} +#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/arctic/halconf.h b/keyboards/acheron/arctic/halconf.h new file mode 100644 index 000000000000..16f32117d51b --- /dev/null +++ b/keyboards/acheron/arctic/halconf.h @@ -0,0 +1,525 @@ +/* + 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. + 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 + +#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 +#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 cryptographic subsystem. + */ +#if !defined(HAL_USE_CRY) || defined(__DOXYGEN__) +#define HAL_USE_CRY FALSE +#endif + +/** + * @brief Enables the DAC subsystem. + */ +#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 +#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 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 +#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 +#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 + +/** + * @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. */ +/*===========================================================================*/ + +/** + * @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 + +/** + * @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. */ +/*===========================================================================*/ + +/** + * @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 the zero-copy API. + */ +#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 + +/** + * @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. */ +/*===========================================================================*/ + +/** + * @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 16 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 256 bytes for both the transmission and receive + * buffers. + */ +#if !defined(SERIAL_USB_BUFFERS_SIZE) || defined(__DOXYGEN__) +#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 + +/*===========================================================================*/ +/* 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 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 +#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. */ +/*===========================================================================*/ + +/** + * @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 + +/*===========================================================================*/ +/* 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/acheron/arctic/info.json b/keyboards/acheron/arctic/info.json new file mode 100644 index 000000000000..3c06ab145a25 --- /dev/null +++ b/keyboards/acheron/arctic/info.json @@ -0,0 +1,15 @@ +{ + "keyboard_name": "ArcticPCB", + "url": "http://gondolindrim.github.io/AcheronDocs/arctic/intro.html", + "maintainer": "Gondolindrim", + "width": 15, + "height": 5, + "layouts": { + "LAYOUT_60_ansi_tsangan": { + "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}, {"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":"Fn", "x":12.5, "y":4}, {"label":"Ctrl", "x":13.5, "y":4, "w":1.5}] + }, + "LAYOUT_60_tsangan_hhkb": { + "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":"|", "x":13, "y":0}, {"label":"Del", "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":"Fn", "x":12.25, "y":3}, {"label":"Shift", "x":13.25, "y":3, "w":1.75}, {"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/acheron/arctic/keymaps/default/keymap.c b/keyboards/acheron/arctic/keymaps/default/keymap.c new file mode 100755 index 000000000000..0d71ccd03773 --- /dev/null +++ b/keyboards/acheron/arctic/keymaps/default/keymap.c @@ -0,0 +1,32 @@ +/* +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_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_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_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, 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_TRNS, KC_TRNS, KC_DEL, KC_DEL, + KC_TRNS, KC_TRNS, KC_UP , KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 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_PGDN, KC_PGUP, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_NO, KC_TRNS ), +}; diff --git a/keyboards/acheron/arctic/mcuconf.h b/keyboards/acheron/arctic/mcuconf.h new file mode 100644 index 000000000000..6289be66dadf --- /dev/null +++ b/keyboards/acheron/arctic/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 FALSE +#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 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_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/arctic/readme.md b/keyboards/acheron/arctic/readme.md new file mode 100644 index 000000000000..1c6a71a84380 --- /dev/null +++ b/keyboards/acheron/arctic/readme.md @@ -0,0 +1,33 @@ +# Acheron Aχξρων 60-SM-S-STM32-MX-TH-WI (codename "Arctic") QMK firmware + +

+ +

+ +## Introduction + +This is the QMK firmware repository for the ArcticPCB, updated until [pre-revision Alpha](https://github.com/Gondolindrim/ArcticPCBn/releases/tag/pre-Alpha). + +The ArcticPCB is an Open-Hardware guidelines compliant PCB which files can be found at [this link](https://github.com/Gondolindrim/ArcticPCB). Its designer and maintainer is [Gondolindrim](https://github.com/Gondolindrim). + +The ArcticPCB is a collaboration between Gondolindrim and ArcticFox; its layouts and features were cherry-picked by Fox and the PCb was designed for him with these chosen features. + +As of may 2020, there is no way to buy an ArcticPCB through a vendor or GroupBuy; the only possible way is ordering them directly from a manufacturer. + +## Layouts + +The possible layouts consist of a fixed 7U bottom row, with possibility of using split backspace, split right shift and stepped caps lock. In the pre-revision Alpha, the Fn and 1.75 RShift keys were swapped (the Fn is on the left and the RShift on the right), so keep that in mind. + +## PCB Documentation + +See the [AcheronDocs](https://gondolindrim.github.io/AcheronDocs/arctic/intro.html) page for the ArcticPCB full documentation. You can also check the KiCad PCB files at the [ArcticPCB GitHub repository](https://github.com/Gondolindrim/ArcticPCB). + +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 Arctic PCB is published. + +## How to compile + +After setting up your build environment, you can compile the Arctic default keymap by using: + + make acheron/arctic: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/acheron/arctic/rules.mk b/keyboards/acheron/arctic/rules.mk new file mode 100644 index 000000000000..5edab2afe1bd --- /dev/null +++ b/keyboards/acheron/arctic/rules.mk @@ -0,0 +1,22 @@ +# 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 = no # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +AUDIO_ENABLE = no # Audio output on port C6 + +# Enter lower-power sleep mode when on the ChibiOS idle thread +OPT_DEFS += -DCORTEX_ENABLE_WFI_IDLE=TRUE From 13de2f415fcc9874462335282b9cd067bec1465f Mon Sep 17 00:00:00 2001 From: moyi4681 Date: Tue, 4 Aug 2020 13:59:11 +0800 Subject: [PATCH 509/930] [Keyboard] Add volcano660 (#9795) Co-authored-by: ridingqwerty Co-authored-by: Drashna Jaelre Co-authored-by: Ryan Co-authored-by: James Young <18669334+noroadsleft@users.noreply.github.com> --- keyboards/dztech/volcano660/config.h | 60 +++++++++++++++++++ keyboards/dztech/volcano660/info.json | 12 ++++ .../volcano660/keymaps/default/keymap.c | 34 +++++++++++ .../dztech/volcano660/keymaps/via/keymap.c | 48 +++++++++++++++ .../dztech/volcano660/keymaps/via/rules.mk | 2 + keyboards/dztech/volcano660/readme.md | 12 ++++ keyboards/dztech/volcano660/rules.mk | 22 +++++++ keyboards/dztech/volcano660/volcano660.c | 34 +++++++++++ keyboards/dztech/volcano660/volcano660.h | 32 ++++++++++ 9 files changed, 256 insertions(+) create mode 100644 keyboards/dztech/volcano660/config.h create mode 100644 keyboards/dztech/volcano660/info.json create mode 100755 keyboards/dztech/volcano660/keymaps/default/keymap.c create mode 100755 keyboards/dztech/volcano660/keymaps/via/keymap.c create mode 100644 keyboards/dztech/volcano660/keymaps/via/rules.mk create mode 100644 keyboards/dztech/volcano660/readme.md create mode 100644 keyboards/dztech/volcano660/rules.mk create mode 100644 keyboards/dztech/volcano660/volcano660.c create mode 100644 keyboards/dztech/volcano660/volcano660.h diff --git a/keyboards/dztech/volcano660/config.h b/keyboards/dztech/volcano660/config.h new file mode 100644 index 000000000000..9fb7b03c2b82 --- /dev/null +++ b/keyboards/dztech/volcano660/config.h @@ -0,0 +1,60 @@ +/* Copyright 2020 dztech + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License 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 0x445A // "DZ" +#define PRODUCT_ID 0x0002 +#define DEVICE_VER 0x0001 +#define MANUFACTURER DZTECH +#define PRODUCT VOLCANO660 + +/* 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 { B0, B1, B2, B3, B6 } +#define MATRIX_COL_PINS { C6, C7, F7, F6, F5, F4, F1, F0, D3, D5, D4, D6, D7, B4, B5 } +#define UNUSED_PINS + +/* COL2ROW, ROW2COL*/ +#define DIODE_DIRECTION COL2ROW + +#define BACKLIGHT_PIN B7 +#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 + +/* VIA related config */ +#define VIA_EEPROM_LAYOUT_OPTIONS_SIZE 4 diff --git a/keyboards/dztech/volcano660/info.json b/keyboards/dztech/volcano660/info.json new file mode 100644 index 000000000000..04122620a6b7 --- /dev/null +++ b/keyboards/dztech/volcano660/info.json @@ -0,0 +1,12 @@ +{ + "keyboard_name": "volcano660", + "url": "", + "maintainer": "dztech", + "width": 16.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}, {"x":14, "y":0}, {"x":15.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}, {"x":15.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":"Enter", "x":12.75, "y":2, "w":2.25}, {"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":2.25}, {"x":14.5, "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}, {"label":"Menu", "x":12.25, "y":4, "w":1.25}, {"label":"Ctrl", "x":13.5, "y":4}, {"x":14.5, "y":4}, {"x":15.5, "y":4}] + } + } +} diff --git a/keyboards/dztech/volcano660/keymaps/default/keymap.c b/keyboards/dztech/volcano660/keymaps/default/keymap.c new file mode 100755 index 000000000000..7f43e108414c --- /dev/null +++ b/keyboards/dztech/volcano660/keymaps/default/keymap.c @@ -0,0 +1,34 @@ +/* Copyright 2020 dztech + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public 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( + 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_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_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_UP, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT), + + LAYOUT_all( + 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_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 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/dztech/volcano660/keymaps/via/keymap.c b/keyboards/dztech/volcano660/keymaps/via/keymap.c new file mode 100755 index 000000000000..d47d98207a7f --- /dev/null +++ b/keyboards/dztech/volcano660/keymaps/via/keymap.c @@ -0,0 +1,48 @@ +/* Copyright 2020 dztech + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public 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( + 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_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_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_UP, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT), + + LAYOUT_all( + 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_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 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_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), + + 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) + +}; diff --git a/keyboards/dztech/volcano660/keymaps/via/rules.mk b/keyboards/dztech/volcano660/keymaps/via/rules.mk new file mode 100644 index 000000000000..36b7ba9cbc98 --- /dev/null +++ b/keyboards/dztech/volcano660/keymaps/via/rules.mk @@ -0,0 +1,2 @@ +VIA_ENABLE = yes +LTO_ENABLE = yes diff --git a/keyboards/dztech/volcano660/readme.md b/keyboards/dztech/volcano660/readme.md new file mode 100644 index 000000000000..f6a4e822c81e --- /dev/null +++ b/keyboards/dztech/volcano660/readme.md @@ -0,0 +1,12 @@ +# Volcano660 + +* Keyboard Maintainer: DZTECH +* Hardware Supported: DZTECH +* Hardware Availability: iLumkb + +Make example for this keyboard (after setting up your build environment): + + make dztech/volcano660:default + make dztech/volcano660: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/dztech/volcano660/rules.mk b/keyboards/dztech/volcano660/rules.mk new file mode 100644 index 000000000000..c230601214df --- /dev/null +++ b/keyboards/dztech/volcano660/rules.mk @@ -0,0 +1,22 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +BOOTLOADER = atmel-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 = yes # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +BLUETOOTH_ENABLE = no # Enable Bluetooth +AUDIO_ENABLE = no # Audio output diff --git a/keyboards/dztech/volcano660/volcano660.c b/keyboards/dztech/volcano660/volcano660.c new file mode 100644 index 000000000000..e838ae17d2a9 --- /dev/null +++ b/keyboards/dztech/volcano660/volcano660.c @@ -0,0 +1,34 @@ +/* Copyright 2020 dztech + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#include "volcano660.h" + +void matrix_init_kb(void) { + setPinOutput(D0); + setPinOutput(D1); + setPinOutput(D2); + matrix_init_user(); +} + +bool led_update_kb(led_t led_state) { + bool res = led_update_user(led_state); + if(res) { + writePin(D0, !led_state.num_lock); + writePin(D2, !led_state.caps_lock); + writePin(D1, !led_state.scroll_lock); + + } + return res; +} diff --git a/keyboards/dztech/volcano660/volcano660.h b/keyboards/dztech/volcano660/volcano660.h new file mode 100644 index 000000000000..a76d5723fe2c --- /dev/null +++ b/keyboards/dztech/volcano660/volcano660.h @@ -0,0 +1,32 @@ +/* Copyright 2020 dztech + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License 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( \ + K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, K214, \ + 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, K213, \ + K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, \ + K400, K401, K402, K406, K409, K410, K411, K412, K413, K414 \ +) { \ + { 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, KC_NO, K213, K214 }, \ + { K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, KC_NO }, \ + { K400, K401, K402, KC_NO, KC_NO, KC_NO, K406, KC_NO, KC_NO, K409, K410, K411, K412, K413, K414 } \ +} From 19795a4dcc4153b647078297a1e11dad1a2d66be Mon Sep 17 00:00:00 2001 From: gtips <51393966+gtips@users.noreply.github.com> Date: Tue, 4 Aug 2020 15:23:24 +0900 Subject: [PATCH 510/930] [Keyboard] Fixed readme.md for reviungs (#9838) * [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 * Update readme.md Change the image photo of readme.md. * [Keyboard] Add reviung61 * Update readme.md * fix keyboards/reviung61/ and add keymap default_rgb * fix keyboards/reviung61/info.json * fix keyboards/reviung61/info.json * remove keyboards/reviung61/keymaps/default/config.h * [keyboard] Fixed readme.md for reviung39 and 61. --- keyboards/reviung39/readme.md | 2 +- keyboards/reviung61/readme.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/keyboards/reviung39/readme.md b/keyboards/reviung39/readme.md index efc13f73413a..e0bf64282889 100644 --- a/keyboards/reviung39/readme.md +++ b/keyboards/reviung39/readme.md @@ -2,7 +2,7 @@ ![reviung39](https://github.com/gtips/reviung/blob/master/reviung39/image/REVIUNG39-1.jpg) -The REVIUNG39 is 39-key (37.5%) column staggered keyboard. +The REVIUNG39 is 39-key column staggered keyboard. Keyboard Maintainer: [gtips](https://github.com/gtips) Hardware Supported: The REVIUNG39 PCBs, Pro Micro supported diff --git a/keyboards/reviung61/readme.md b/keyboards/reviung61/readme.md index ed01d368d7c8..d483ec5b0993 100644 --- a/keyboards/reviung61/readme.md +++ b/keyboards/reviung61/readme.md @@ -2,7 +2,7 @@ ![REVIUNG61](https://github.com/gtips/reviung/blob/master/reviung61/image/reviung61-pcb.jpg) -The REVIUNG41 is 61-key Standard ANSI 60% keyboard. And compatible with MX and ALPS. +The REVIUNG61 is 61-key Standard ANSI 60% keyboard. And compatible with MX and ALPS. * Keyboard Maintainer: [gtips](https://github.com/gtips) * Hardware Supported: REVIUNG61 From 7b85962673e40633d9c36e4a36bedd80a601a0ac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jes=C3=BAs=20David?= Date: Tue, 4 Aug 2020 02:10:06 -0500 Subject: [PATCH 511/930] Add via compatibility to Daisy 40 (#9805) * Add via compatibility to Daisy 40 * Move via config to its own keymap * Use lite bootmagic * Add fourth layer to keymap --- keyboards/daisy/config.h | 4 +- keyboards/daisy/keymaps/via/keymap.c | 102 ++++++++++++++++++++++++++ keyboards/daisy/keymaps/via/readme.md | 1 + keyboards/daisy/keymaps/via/rules.mk | 1 + keyboards/daisy/rules.mk | 2 +- 5 files changed, 107 insertions(+), 3 deletions(-) create mode 100644 keyboards/daisy/keymaps/via/keymap.c create mode 100644 keyboards/daisy/keymaps/via/readme.md create mode 100644 keyboards/daisy/keymaps/via/rules.mk diff --git a/keyboards/daisy/config.h b/keyboards/daisy/config.h index ea03d116bdab..1b6656eb7162 100644 --- a/keyboards/daisy/config.h +++ b/keyboards/daisy/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 0x7169 +#define VENDOR_ID 0x4B50 +#define PRODUCT_ID 0xD7DC #define DEVICE_VER 0x0501 #define MANUFACTURER KTEC #define PRODUCT Daisy diff --git a/keyboards/daisy/keymaps/via/keymap.c b/keyboards/daisy/keymaps/via/keymap.c new file mode 100644 index 000000000000..b3156ce3b87e --- /dev/null +++ b/keyboards/daisy/keymaps/via/keymap.c @@ -0,0 +1,102 @@ +/* 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 QMK_KEYBOARD_H + +// Defines names for use in layer keycodes and the keymap +enum layer_names { + _BL, + _LW, + _RS, + _EM +}; + +#define LOWER MO(_LW) +#define RAISE MO(_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│ + * ├────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬────┤ + * │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, _______, _______, _______ + ), + + /* 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, _______, + _______, _______, _______, _______, _______, _______, _______, _______ + ), + + /* Empty 4th layer for VIA + * ┌───┬───┬───┬───┬───┬───┬───┐───┌───┬───┐───┬───┐ + * | | | | | | | | | | | | | + * └───┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐──└┬──┴┬──┴┐──┴───┤ + * │    │  │  │  │ │ │ │   │   │   │      │ + * ├────└─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴───┴───┴───┴─┐────┤ + * │      │ │ │ │ │ │ │ │ │ │    │ + * ├────┬─└───┴───┴───┴───┴───┴───┴───┴───┴───┘────┤ + * │    │   │    │        │          │    │   │    │ + * └────┴───┴────┴────────┴──────────┴────┴───┴────┘ + */ + [_EM] = 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 + ) +}; diff --git a/keyboards/daisy/keymaps/via/readme.md b/keyboards/daisy/keymaps/via/readme.md new file mode 100644 index 000000000000..9345124a3c1f --- /dev/null +++ b/keyboards/daisy/keymaps/via/readme.md @@ -0,0 +1 @@ +# VIA keymap for Daisy diff --git a/keyboards/daisy/keymaps/via/rules.mk b/keyboards/daisy/keymaps/via/rules.mk new file mode 100644 index 000000000000..036bd6d1c3ec --- /dev/null +++ b/keyboards/daisy/keymaps/via/rules.mk @@ -0,0 +1 @@ +VIA_ENABLE = yes \ No newline at end of file diff --git a/keyboards/daisy/rules.mk b/keyboards/daisy/rules.mk index c82fa9bc6781..48cfa90fcc48 100644 --- a/keyboards/daisy/rules.mk +++ b/keyboards/daisy/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 = no # Console for debug From 62c0146419a3a51614e200cfbddef69d14fde6f4 Mon Sep 17 00:00:00 2001 From: shela Date: Wed, 5 Aug 2020 12:19:27 +0900 Subject: [PATCH 512/930] [Keymap] Update my keymap (#9849) --- .../{action_pseudo_lut.c => action_pseudo.c} | 84 +-- .../hhkb/ansi/keymaps/shela/action_pseudo.h | 27 + .../ansi/keymaps/shela/action_pseudo_lut.h | 15 - keyboards/hhkb/ansi/keymaps/shela/config.h | 38 +- keyboards/hhkb/ansi/keymaps/shela/keymap.c | 483 +++++++++++++----- .../hhkb/ansi/keymaps/shela/keymap_jis2us.h | 71 ++- keyboards/hhkb/ansi/keymaps/shela/readme.md | 76 ++- keyboards/hhkb/ansi/keymaps/shela/rules.mk | 4 +- 8 files changed, 581 insertions(+), 217 deletions(-) rename keyboards/hhkb/ansi/keymaps/shela/{action_pseudo_lut.c => action_pseudo.c} (61%) create mode 100644 keyboards/hhkb/ansi/keymaps/shela/action_pseudo.h delete mode 100644 keyboards/hhkb/ansi/keymaps/shela/action_pseudo_lut.h diff --git a/keyboards/hhkb/ansi/keymaps/shela/action_pseudo_lut.c b/keyboards/hhkb/ansi/keymaps/shela/action_pseudo.c similarity index 61% rename from keyboards/hhkb/ansi/keymaps/shela/action_pseudo_lut.c rename to keyboards/hhkb/ansi/keymaps/shela/action_pseudo.c index a15f5e5e0b30..2ba8b3e5030a 100644 --- a/keyboards/hhkb/ansi/keymaps/shela/action_pseudo_lut.c +++ b/keyboards/hhkb/ansi/keymaps/shela/action_pseudo.c @@ -1,27 +1,42 @@ +/* Copyright 2020 shela + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public 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" #include "command.h" -#include "action_pseudo_lut.h" +#include "action_pseudo.h" static uint8_t send_key_shift_bit[SHIFT_BIT_SIZE]; /* - * Pseudo layout action. - * This action converts a keycode in order to output the character according to the keymap you specified - * still your keyboard layout recognized wrongly on your OS. - * Memo: Using other layer keymap to get keycode + * Action Pseudo Process. + * Gets the keycode in the same position of the specified layer. + * The keycode is sent after conversion according to the conversion keymap. */ -void action_pseudo_lut(keyrecord_t *record, uint8_t base_keymap_id, const uint16_t (*keymap)[2]) { - uint8_t prev_shift; +void action_pseudo_process(keyrecord_t *record, uint8_t base_layer, const uint16_t (*keymap)[2]) { + uint8_t prev_shift; uint16_t keycode; uint16_t pseudo_keycode; - /* get keycode from keymap you specified */ - keycode = keymap_key_to_keycode(base_keymap_id, record->event.key); + /* Get keycode from specified layer */ + keycode = keymap_key_to_keycode(base_layer, record->event.key); - prev_shift = keyboard_report->mods & (MOD_BIT(KC_LSFT) | MOD_BIT(KC_RSFT)); + prev_shift = get_mods() & MOD_MASK_SHIFT; if (record->event.pressed) { - /* when magic commands entered, keycode does not converted */ + /* If magic commands entered, keycode is not converted */ if (IS_COMMAND()) { if (prev_shift) { add_shift_bit(keycode); @@ -38,25 +53,21 @@ void action_pseudo_lut(keyrecord_t *record, uint8_t base_keymap_id, const uint16 if (IS_LSFT(pseudo_keycode)) { register_code(QK_LSFT ^ pseudo_keycode); } else { - /* delete shift mod temporarily */ - del_mods(prev_shift); - send_keyboard_report(); + /* Delete shift mod temporarily */ + unregister_mods(prev_shift); register_code(pseudo_keycode); - add_mods(prev_shift); - send_keyboard_report(); + register_mods(prev_shift); } } else { pseudo_keycode = convert_keycode(keymap, keycode, false); dprintf("pressed: %02X, converted: %04X\n", keycode, pseudo_keycode); if (IS_LSFT(pseudo_keycode)) { - add_weak_mods(MOD_BIT(KC_LSFT)); - send_keyboard_report(); + register_weak_mods(MOD_LSFT); register_code(QK_LSFT ^ pseudo_keycode); - /* on Windows, prevent key repeat to avoid unintended output */ + /* Prevent key repeat to avoid unintended output on Windows */ unregister_code(QK_LSFT ^ pseudo_keycode); - del_weak_mods(MOD_BIT(KC_LSFT)); - send_keyboard_report(); + unregister_weak_mods(MOD_LSFT); } else { register_code(pseudo_keycode); } @@ -78,9 +89,9 @@ void action_pseudo_lut(keyrecord_t *record, uint8_t base_keymap_id, const uint16 } } -uint16_t convert_keycode(const uint16_t (*keymap)[2], uint16_t keycode, bool shift_modded) -{ - uint16_t pseudo_keycode; +/* Convert keycode according to the keymap */ +uint16_t convert_keycode(const uint16_t (*keymap)[2], uint16_t keycode, bool shift_modded) { + uint16_t pseudo_keycode = 0x00; /* default value */ switch (keycode) { case KC_A ... KC_CAPSLOCK: @@ -97,23 +108,18 @@ uint16_t convert_keycode(const uint16_t (*keymap)[2], uint16_t keycode, bool shi pseudo_keycode = keymap[keycode][0]; } #endif - /* if undefined, use got keycode as it is */ - if (pseudo_keycode == 0x00) { - if (shift_modded) { - pseudo_keycode = S(keycode); - } else { - pseudo_keycode = keycode; - } - } - break; - default: - if (shift_modded) { - pseudo_keycode = S(keycode); - } else { - pseudo_keycode = keycode; - } break; } + + /* If pseudo keycode is the default value, use the keycode as it is */ + if (pseudo_keycode == 0x00) { + if (shift_modded) { + pseudo_keycode = S(keycode); + } else { + pseudo_keycode = keycode; + } + } + return pseudo_keycode; } diff --git a/keyboards/hhkb/ansi/keymaps/shela/action_pseudo.h b/keyboards/hhkb/ansi/keymaps/shela/action_pseudo.h new file mode 100644 index 000000000000..7c3d38fa07ad --- /dev/null +++ b/keyboards/hhkb/ansi/keymaps/shela/action_pseudo.h @@ -0,0 +1,27 @@ +/* Copyright 2020 shela + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License 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 SHIFT_BIT_SIZE (0xE7 / 8 + 1) /* 1bit per 1key */ +#define IS_LSFT(kc) ((QK_LSFT & (kc)) == QK_LSFT) + +void action_pseudo_process(keyrecord_t *, uint8_t, const uint16_t (*)[2]); +uint16_t convert_keycode(const uint16_t (*)[2], uint16_t, bool); + +uint8_t get_shift_bit(uint16_t); +void add_shift_bit(uint16_t); +void del_shift_bit(uint16_t); diff --git a/keyboards/hhkb/ansi/keymaps/shela/action_pseudo_lut.h b/keyboards/hhkb/ansi/keymaps/shela/action_pseudo_lut.h deleted file mode 100644 index 681252440f46..000000000000 --- a/keyboards/hhkb/ansi/keymaps/shela/action_pseudo_lut.h +++ /dev/null @@ -1,15 +0,0 @@ -#ifndef ACTION_PSEUDO_LUT_H -#define ACTION_PSEUDO_LUT_H - -#define SHIFT_BIT_SIZE (0xE7 / 8 + 1) // 1bit per 1key - -#define IS_LSFT(kc) ((QK_LSFT & (kc)) == QK_LSFT) - -void action_pseudo_lut(keyrecord_t *, uint8_t, const uint16_t (*)[2]); -uint16_t convert_keycode(const uint16_t (*)[2], uint16_t, bool); - -uint8_t get_shift_bit(uint16_t); -void add_shift_bit(uint16_t); -void del_shift_bit(uint16_t); - -#endif diff --git a/keyboards/hhkb/ansi/keymaps/shela/config.h b/keyboards/hhkb/ansi/keymaps/shela/config.h index 08cc1fb46eab..25794900c3b7 100644 --- a/keyboards/hhkb/ansi/keymaps/shela/config.h +++ b/keyboards/hhkb/ansi/keymaps/shela/config.h @@ -1,12 +1,38 @@ -#ifndef CONFIG_SHELA_H -#define CONFIG_SHELA_H +/* Copyright 2020 shela + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License 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.h" +/* USB Device descriptor parameter */ +#undef VENDOR_ID +#define VENDOR_ID 0x0853 +#undef PRODUCT_ID +#define PRODUCT_ID 0x0100 +#undef DEVICE_VER +#define DEVICE_VER 0x0102 +#undef MANUFACTURER +#define MANUFACTURER Topre Corporation +#undef PRODUCT +#define PRODUCT HHKB Professional + #undef TAPPING_TERM -#define TAPPING_TERM 230 +#define TAPPING_TERM 210 +#define SPFN_TAPPING_TERM 190 /* SpaceFN tapping term */ -#define ONESHOT_TAP_TOGGLE 2 +#define ONESHOT_TAP_TOGGLE 3 #define ONESHOT_TIMEOUT 2000 - -#endif diff --git a/keyboards/hhkb/ansi/keymaps/shela/keymap.c b/keyboards/hhkb/ansi/keymaps/shela/keymap.c index 3971e8f94559..f63b99a4ff9f 100644 --- a/keyboards/hhkb/ansi/keymaps/shela/keymap.c +++ b/keyboards/hhkb/ansi/keymaps/shela/keymap.c @@ -1,186 +1,433 @@ -/* - * HHKB Pro 2 US Layout for shela +/* Copyright 2020 shela + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public 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_jis2us.h" -#include "action_pseudo_lut.h" +#include "action_pseudo.h" + +// clang-format off +enum keyboard_layers { + _QWERTY = 0, + _DVORAK, + _COLEMAK, + _PSEUDO, + _TENKEY, + _MOUSE, + _HHKB, + _SPACE_FN +}; -enum keymap_layout -{ - BASE = 0, - PSEUDO_US, +enum custom_keycodes { + QWERTY = SAFE_RANGE, DVORAK, - MOUSE, + COLEMAK, + PSEUDO, TENKEY, - HHKB, - SPACE_FN, + MOUSE, + L_INNER, + R_INNER, + L_OUTER, + R_OUTER, + PSE_FN, + MACMODE, + DYNAMIC_MACRO_RANGE }; +// clang-format on -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +/* Additional custom keycodes */ +#define MO_HHKB MO(_HHKB) +#define LT_SPFN LT(_SPACE_FN, KC_SPC) +#define DM_STA1 DYN_REC_START1 +#define DM_PLY1 DYN_MACRO_PLAY1 + +/* User settings structure for the EEPROM */ +typedef union { + uint32_t raw; + struct { + uint8_t base_layer : 8; + bool mac_mode : 1; + }; +} user_config_t; + +user_config_t user_config; +static uint8_t base_layer = _QWERTY; +static bool mac_mode = false; +static bool l_long_pressed = false; +static bool l_pressed = false; +static uint16_t l_time = 0; +static bool r_long_pressed = false; +static bool r_pressed = false; +static uint16_t r_time = 0; - /* Layer 0: Default Layer +static uint16_t l_inner = KC_NO; +static uint16_t l_outer = KC_NO; +static uint16_t r_inner = KC_NO; +static uint16_t r_outer = KC_NO; + +// clang-format off +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* Qwerty Layer * ,-----------------------------------------------------------------------------------------. - * | Esc | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | ` | BSp | + * | Esc | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | ` | BS | * |-----------------------------------------------------------------------------------------| * | Tab | Q | W | E | R | T | Y | U | I | O | P | [ | ] | \ | * |-----------------------------------------------------------------------------------------| - * | Control | A | S | D | F | G | H | J | K | L | ; | ' | Enter | + * | LControl | A | S | D | F | G | H | J | K | L | ; | ' | Enter | * |-----------------------------------------------------------------------------------------| - * | Shift | Z | X | C | V | B | N | M | , | . | / | Shift | Fn0 | + * | LShift | Z | X | C | V | B | N | M | , | . | / | RShift |HHKB | * `-----------------------------------------------------------------------------------------' - * |LAlt | LGui | SpaceFN | RGui |RAlt | + * |LOutr| LInner | SpaceFN | RInner |ROutr| * `-----------------------------------------------------------------' */ - [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_TAB, KC_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, LT(SPACE_FN, KC_SPACE), KC_RGUI, KC_RALT), - - /* Layer 1: Pseudo US Layout Layer + [_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_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_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_HHKB, + L_OUTER, L_INNER, LT_SPFN, R_INNER, R_OUTER + ), + + /* Dvorak Layer * ,-----------------------------------------------------------------------------------------. - * | Esc | Fn1 | Fn1 | Fn1 | Fn1 | Fn1 | Fn1 | Fn1 | Fn1 | Fn1 | Fn1 | Fn1 | Fn1 | Fn1 | BSp | + * | Esc | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | [ | ] | ` | BS | * |-----------------------------------------------------------------------------------------| - * | Tab | Fn1 | Fn1 | Fn1 | Fn1 | Fn1 | Fn1 | Fn1 | Fn1 | Fn1 | Fn1 | Fn1 | Fn1 | Fn1 | + * | Tab | ' | , | . | P | Y | F | G | C | R | L | / | = | \ | * |-----------------------------------------------------------------------------------------| - * | Control | Fn1 | Fn1 | Fn1 | Fn1 | Fn1 | Fn1 | Fn1 | Fn1 | Fn1 | Fn1 | Fn1 | Enter | + * | LControl | A | O | E | U | I | D | H | T | N | S | - | Enter | * |-----------------------------------------------------------------------------------------| - * | Shift | Fn1 | Fn1 | Fn1 | Fn1 | Fn1 | Fn1 | Fn1 | Fn1 | Fn1 | Fn1 | Shift | Fn0 | + * | LShift | ; | Q | J | K | X | B | M | W | V | Z | RShift |HHKB | * `-----------------------------------------------------------------------------------------' - * |LGui | Fn3 | SpaceFN | Fn4 |RGui | + * |LOutr| LInner | SpaceFN | RInner |ROutr| * `-----------------------------------------------------------------' */ - [PSEUDO_US] = - LAYOUT(KC_ESC, 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_BSPC, - 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, MT(MOD_LALT, KC_MHEN), LT(SPACE_FN, KC_SPACE), MT(MOD_RALT, KC_KANA), KC_RGUI), - - /* Layer 2: Dvorak Layer + [_DVORAK] = 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_GRV, 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_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, + L_OUTER, L_INNER, LT_SPFN, R_INNER, R_OUTER + ), + + /* Colemak Layer * ,-----------------------------------------------------------------------------------------. - * | Esc | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | [ | ] | ` | BSp | + * | Esc | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | ` | BS | * |-----------------------------------------------------------------------------------------| - * | Tab | ' | , | . | P | Y | F | G | C | R | L | / | = | \ | + * | Tab | Q | W | F | P | G | J | L | U | Y | ; | [ | ] | \ | * |-----------------------------------------------------------------------------------------| - * | Control | A | O | E | U | I | D | H | T | N | S | - | Enter | + * | LControl | A | R | S | T | D | H | N | E | I | O | ' | Enter | * |-----------------------------------------------------------------------------------------| - * | Shift | ; | Q | J | K | X | B | M | W | V | Z | Shift | Fn0 | + * | LShift | Z | X | C | V | B | K | M | , | . | / | RShift |HHKB | * `-----------------------------------------------------------------------------------------' - * |LAlt | LGui | SpaceFN | RGui |RAlt | + * |LOutr| LInner | SpaceFN | RInner |ROutr| * `-----------------------------------------------------------------' */ - [DVORAK] = - 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_GRV, 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_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, LT(SPACE_FN, KC_SPACE), KC_RGUI, KC_RALT), - - /* Layer 3: Mouse layer + [_COLEMAK] = 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_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_LBRC, KC_RBRC, KC_BSLS, + 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_HHKB, + L_OUTER, L_INNER, LT_SPFN, R_INNER, R_OUTER + ), + + /* Pseudo Layer * ,-----------------------------------------------------------------------------------------. - * | Esc | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | | | + * | Esc |PseFn|PseFn|PseFn|PseFn|PseFn|PseFn|PseFn|PseFn|PseFn|PseFn|PseFn|PseFn|PseFn| BS | * |-----------------------------------------------------------------------------------------| - * | | | | | | | MwL | MwD | MwU | MwR | | | | | + * | Tab |PseFn|PseFn|PseFn|PseFn|PseFn|PseFn|PseFn|PseFn|PseFn|PseFn|PseFn|PseFn| PseFn | * |-----------------------------------------------------------------------------------------| - * | | | | | | | McL | McD | McU | McR | | | | + * | Control |PseFn|PseFn|PseFn|PseFn|PseFn|PseFn|PseFn|PseFn|PseFn|PseFn|PseFn| Enter | * |-----------------------------------------------------------------------------------------| - * | | | | | | | Mb1 | Mb2 | Mb3 | | | | Fn0 | + * | Shift |PseFn|PseFn|PseFn|PseFn|PseFn|PseFn|PseFn|PseFn|PseFn|PseFn| Shift |HHKB | * `-----------------------------------------------------------------------------------------' - * | | | Mb1 | | | + * |LOutr| LInner | SpaceFN | RInner |ROutr| * `-----------------------------------------------------------------' */ - [MOUSE] = - 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_NO, KC_TRNS, - KC_TRNS, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_WH_L, KC_WH_D, KC_WH_U, KC_WH_R, KC_NO, KC_NO, KC_NO, KC_NO, - KC_TRNS, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_MS_L, KC_MS_D, KC_MS_U, KC_MS_R, KC_NO, KC_NO, KC_TRNS, - KC_TRNS, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_BTN1, KC_BTN2, KC_BTN3, KC_NO, KC_NO, KC_TRNS, MO(HHKB), - KC_TRNS, KC_TRNS, KC_BTN1, KC_TRNS, KC_TRNS), - - /* Layer 4: Tenkey layer + [_PSEUDO] = LAYOUT( + KC_ESC, PSE_FN, PSE_FN, PSE_FN, PSE_FN, PSE_FN, PSE_FN, PSE_FN, PSE_FN, PSE_FN, PSE_FN, PSE_FN, PSE_FN, PSE_FN, KC_BSPC, + KC_TAB, PSE_FN, PSE_FN, PSE_FN, PSE_FN, PSE_FN, PSE_FN, PSE_FN, PSE_FN, PSE_FN, PSE_FN, PSE_FN, PSE_FN, PSE_FN, + KC_LCTL, PSE_FN, PSE_FN, PSE_FN, PSE_FN, PSE_FN, PSE_FN, PSE_FN, PSE_FN, PSE_FN, PSE_FN, PSE_FN, KC_ENT, + KC_LSFT, PSE_FN, PSE_FN, PSE_FN, PSE_FN, PSE_FN, PSE_FN, PSE_FN, PSE_FN, PSE_FN, PSE_FN, KC_RSFT, MO_HHKB, + L_OUTER, L_INNER, LT_SPFN, R_INNER, R_OUTER + ), + + /* Tenkey layer * ,-----------------------------------------------------------------------------------------. - * | Esc | | | | | | | | | | / | * | - | | BSp | + * | Esc | | | | | | | | | | / | * | - | | BS | * |-----------------------------------------------------------------------------------------| - * | | | | | | | | | | 7 | 8 | 9 | + | | + * | Tab | | | | | | | | | 7 | 8 | 9 | + | | * |-----------------------------------------------------------------------------------------| - * | | | | | | | | | | 4 | 5 | 6 | Enter | + * | LControl | | | | | | | | | 4 | 5 | 6 | Enter | * |-----------------------------------------------------------------------------------------| - * | | | | | | | | | 1 | 2 | 3 | + | Fn0 | + * | LShift | | | | | | | | 1 | 2 | 3 | + |HHKB | * `-----------------------------------------------------------------------------------------' - * | | | SpaceFN | 0 | . | + * |LOutr| LInner | SpaceFN | 0 | . | * `-----------------------------------------------------------------' */ - [TENKEY] = - LAYOUT(KC_ESC, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_PSLS, KC_PAST, KC_PMNS, KC_NO, KC_BSPC, - 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, LT(SPACE_FN, KC_SPACE), KC_KP_0, KC_PDOT), - - /* Layer 5: HHKB mode (HHKB Fn) + [_TENKEY] = LAYOUT( + KC_ESC, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_PSLS, KC_PAST, KC_PMNS, XXXXXXX, KC_BSPC, + KC_TAB, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_P7, KC_P8, KC_P9, KC_PPLS, XXXXXXX, + KC_LCTL, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_P4, KC_P5, KC_P6, KC_PENT, + KC_LSFT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_P1, KC_P2, KC_P3, KC_PPLS, MO_HHKB, + L_OUTER, L_INNER, LT_SPFN, KC_P0, KC_PDOT + ), + + /* Mouse layer * ,-----------------------------------------------------------------------------------------. - * | Pwr | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | Ins | Del | + * | Esc | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | | BS | * |-----------------------------------------------------------------------------------------| - * | Caps | Fn5 | Fn6 | Fn7 | Fn8 | Fn9 | | | Psc | Slk | Pus | Up | | BSp | + * | Tab | | | | | | WhL | WhD | WhU | WhR | | | | | * |-----------------------------------------------------------------------------------------| - * | | VoD | VoU | Mut | | | * | / | Hom | PgU | Lef | Rig | Enter | + * | LControl | | | | | | MsL | MsD | MsU | MsR | | | Enter | * |-----------------------------------------------------------------------------------------| - * | | | | | | | + | - | End | PgD | Dow | | | + * | LShift | | | | | | Mb1 | Mb2 | Mb3 | | | RShift |HHKB | * `-----------------------------------------------------------------------------------------' - * | | | | | | + * |LOutr| LInner | Mb1 | RInner |ROutr| + * `-----------------------------------------------------------------' + */ + [_MOUSE] = 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, XXXXXXX, KC_BSPC, + KC_TAB, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_WH_L, KC_WH_D, KC_WH_U, KC_WH_R, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + KC_LCTL, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_MS_L, KC_MS_D, KC_MS_U, KC_MS_R, XXXXXXX, XXXXXXX, KC_ENT, + KC_LSFT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_BTN1, KC_BTN2, KC_BTN3, XXXXXXX, XXXXXXX, KC_RSFT, MO_HHKB, + L_OUTER, L_INNER, KC_BTN1, R_INNER, R_OUTER + ), + + /* HHKB Layer + * ,-----------------------------------------------------------------------------------------. + * |Power| F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | Ins | Del | + * |-----------------------------------------------------------------------------------------| + * | Caps |Qwert|Dvork|Colmk|Psedo|Tenky|Mouse| |PScr |SLck |Paus | Up | | Clear | + * |-----------------------------------------------------------------------------------------| + * | |VolD |VolU |Mute |Ejct | | * | / |Home |PgUp |Left |Rght | Enter | + * |-----------------------------------------------------------------------------------------| + * | |Sta1 |Ply1 | | Mac | | + | - | End |PgDn |Down | | | + * `-----------------------------------------------------------------------------------------' + * | | | Space | | | * `-----------------------------------------------------------------' */ - [HHKB] = - LAYOUT(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_CAPS, DF(BASE), DF(PSEUDO_US), DF(MOUSE), DF(TENKEY), DF(DVORAK), KC_TRNS, KC_TRNS, KC_PSCR, KC_SLCK, KC_PAUS, KC_UP, KC_TRNS, KC_BSPC, - KC_TRNS, KC_VOLD, KC_VOLU, KC_MUTE, KC_TRNS, KC_TRNS, KC_PAST, KC_PSLS, KC_HOME, KC_PGUP, KC_LEFT, KC_RGHT, KC_PENT, - 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), - - /* Layer 6: SpaceFN + [_HHKB] = LAYOUT( + 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_CAPS, QWERTY, DVORAK, COLEMAK, PSEUDO, TENKEY, MOUSE, XXXXXXX, KC_PSCR, KC_SLCK, KC_PAUS, KC_UP, XXXXXXX, KC_NLCK, + _______, KC_VOLD, KC_VOLU, KC_MUTE, KC_EJCT, XXXXXXX, KC_PAST, KC_PSLS, KC_HOME, KC_PGUP, KC_LEFT, KC_RGHT, KC_PENT, + _______, DM_STA1, DM_PLY1, XXXXXXX, MACMODE, XXXXXXX, KC_PPLS, KC_PMNS, KC_END, KC_PGDN, KC_DOWN, _______, _______, + _______, _______, KC_SPC, _______, _______ + ), + + /* SpaceFN Layer * ,-----------------------------------------------------------------------------------------. * | | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | | Del | * |-----------------------------------------------------------------------------------------| - * | | Hom | Up | End | | | | Hom | End | | Psc | Slk | Pau | Ins | + * | |Home | Up | End | | | |Home | End | |PScr |SLck |Paus | Ins | * |-----------------------------------------------------------------------------------------| - * | | Lef | Dow | Rig | PgU | | Lef | Dow | Up | Rig | | | | + * | |Left |Down |Rght |PgUp | |Left |Down | Up |Rght | | | | * |-----------------------------------------------------------------------------------------| - * | | | | PgD | | Spc | | PgD | PgU | | | | | + * | | | |PgDn | | Spc | |PgDn |PgUp | | | | | * `-----------------------------------------------------------------------------------------' * | | | | | | * `-----------------------------------------------------------------' */ - [SPACE_FN] = - 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_NO, KC_DEL, - KC_TRNS, KC_HOME, KC_UP, KC_END, KC_NO, KC_NO, KC_NO, KC_HOME, KC_END, KC_NO, KC_PSCR, KC_SLCK, KC_PAUS, KC_INS, - KC_TRNS, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGUP, KC_NO, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_NO, KC_NO, KC_TRNS, - KC_TRNS, KC_NO, KC_NO, KC_PGDN, KC_NO, KC_SPC, KC_NO, KC_PGDN, KC_PGUP, KC_NO, KC_NO, KC_TRNS, KC_NO, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), + [_SPACE_FN] = 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, XXXXXXX, KC_DEL, + _______, KC_HOME, KC_UP, KC_END, XXXXXXX, XXXXXXX, XXXXXXX, KC_HOME, KC_END, XXXXXXX, KC_PSCR, KC_SLCK, KC_PAUS, KC_INS, + _______, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGUP, XXXXXXX, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, XXXXXXX, XXXXXXX, _______, + _______, XXXXXXX, XXXXXXX, KC_PGDN, XXXXXXX, KC_SPC, XXXXXXX, KC_PGDN, KC_PGUP, XXXXXXX, XXXXXXX, _______, XXXXXXX, + _______, _______, _______, _______, _______ + ), }; +// clang-format on -/* - * user defined action function - */ -enum function_id -{ - PSEUDO_US_FUNCTION, -}; +void set_mac_mode_keys(bool mac_mode) { + if (mac_mode) { + l_inner = KC_LCMD; + l_outer = KC_LOPT; + r_inner = KC_RCMD; + r_outer = KC_ROPT; + } else { + l_inner = KC_LALT; + l_outer = KC_LGUI; + r_inner = KC_RALT; + r_outer = KC_RGUI; + } +} + +void keyboard_post_init_user(void) { + user_config.raw = eeconfig_read_user(); + mac_mode = user_config.mac_mode; + base_layer = user_config.base_layer; + set_mac_mode_keys(mac_mode); +} + +/* Set default values for the EEPROM */ +void eeconfig_init_user(void) { + user_config.raw = 0; + user_config.base_layer = _QWERTY; + user_config.mac_mode = false; + eeconfig_update_user(user_config.raw); + base_layer = _QWERTY; + mac_mode = false; + set_mac_mode_keys(mac_mode); +} -void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) -{ +void persistent_default_layer_set(uint8_t layer) { + set_single_persistent_default_layer(layer); + user_config.base_layer = layer; + eeconfig_update_user(user_config.raw); + base_layer = layer; +} - switch (id) - { - case PSEUDO_US_FUNCTION: - action_pseudo_lut(record, BASE, keymap_jis2us); - break; +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case QWERTY: + if (record->event.pressed) { + persistent_default_layer_set(_QWERTY); + } + return false; + case DVORAK: + if (record->event.pressed) { + persistent_default_layer_set(_DVORAK); + } + return false; + case COLEMAK: + if (record->event.pressed) { + persistent_default_layer_set(_COLEMAK); + } + return false; + case PSEUDO: + if (record->event.pressed) { + if (l_pressed && !l_long_pressed) { + register_code(l_inner); + l_long_pressed = true; + } + if (r_pressed && !r_long_pressed) { + register_code(r_inner); + r_long_pressed = true; + } + set_single_persistent_default_layer(_PSEUDO); + } + return false; + case TENKEY: + if (record->event.pressed) { + default_layer_set(1U << _TENKEY); + } + return false; + case MOUSE: + if (record->event.pressed) { + default_layer_set(1U << _MOUSE); + } + return false; + case L_INNER: + if (record->event.pressed) { + l_pressed = true; + l_time = record->event.time; + } else { + if (l_pressed) { + if (l_long_pressed) { + unregister_code(l_inner); + l_long_pressed = false; + } else { + if (TIMER_DIFF_16(record->event.time, l_time) < TAPPING_TERM) { + if (mac_mode) { + register_code(KC_LANG2); + unregister_code(KC_LANG2); + } else { + register_code(KC_MHEN); + unregister_code(KC_MHEN); + } + } else { + register_code(l_inner); + unregister_code(l_inner); + } + } + l_pressed = false; + } + } + return false; + case R_INNER: + if (record->event.pressed) { + r_pressed = true; + r_time = record->event.time; + } else { + if (r_pressed) { + if (r_long_pressed) { + unregister_code(r_inner); + r_long_pressed = false; + } else { + if (TIMER_DIFF_16(record->event.time, r_time) < TAPPING_TERM) { + if (mac_mode) { + register_code(KC_LANG1); + unregister_code(KC_LANG1); + } else { + register_code(KC_KANA); + unregister_code(KC_KANA); + } + } else { + register_code(r_inner); + unregister_code(r_inner); + } + } + r_pressed = false; + } + } + return false; + case L_OUTER: + if (record->event.pressed) { + register_code(l_outer); + } else { + unregister_code(l_outer); + } + return false; + case R_OUTER: + if (record->event.pressed) { + register_code(r_outer); + } else { + unregister_code(r_outer); + } + return false; + case MACMODE: + if (record->event.pressed) { + /* Toggle Mac mode value */ + mac_mode = !mac_mode; + user_config.mac_mode = mac_mode; + eeconfig_update_user(user_config.raw); + set_mac_mode_keys(mac_mode); + } + return false; + case PSE_FN: + action_pseudo_process(record, base_layer, keymap_jis2us); + return false; + default: + if (record->event.pressed) { + if (l_pressed && !l_long_pressed) { + register_code(l_inner); + l_long_pressed = true; + } + if (r_pressed && !r_long_pressed) { + register_code(r_inner); + r_long_pressed = true; + } + } } + return true; } -/* - * Fn action definition - */ -const uint16_t PROGMEM fn_actions[] = { - [1] = ACTION_FUNCTION(PSEUDO_US_FUNCTION), -}; +uint16_t get_tapping_term(uint16_t keycode) { + switch (keycode) { + case LT_SPFN: + return SPFN_TAPPING_TERM; + default: + return TAPPING_TERM; + } +} diff --git a/keyboards/hhkb/ansi/keymaps/shela/keymap_jis2us.h b/keyboards/hhkb/ansi/keymaps/shela/keymap_jis2us.h index edc1e6d869b7..916a403eb60e 100644 --- a/keyboards/hhkb/ansi/keymaps/shela/keymap_jis2us.h +++ b/keyboards/hhkb/ansi/keymaps/shela/keymap_jis2us.h @@ -1,32 +1,49 @@ -#ifndef LAYOUT_JIS2US_H -#define LAYOUT_JIS2US_H +/* Copyright 2020 shela + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ -/* keymap for convert from JIS to US */ +#pragma once + +#include "keymap_jp.h" + +// clang-format off +/* Keymap for converting JIS to US */ const uint16_t PROGMEM keymap_jis2us[][2] = { [KC_A ... KC_CAPS] = { 0x00, 0x00 }, /* default value */ - [KC_1] = { KC_1, KC_EXLM }, /* 1 and ! -> 1 and ! */ - [KC_2] = { KC_2, KC_LBRC }, /* 2 and " -> 2 and @ */ - [KC_3] = { KC_3, KC_HASH }, /* 3 and # -> 3 and # */ - [KC_4] = { KC_4, KC_DLR }, /* 4 and $ -> 4 and $ */ - [KC_5] = { KC_5, KC_PERC }, /* 5 and % -> 5 and % */ - [KC_6] = { KC_6, KC_EQL }, /* 6 and & -> 6 and ^ */ - [KC_7] = { KC_7, KC_CIRC }, /* 7 and ' -> 7 and & */ - [KC_8] = { KC_8, KC_DQT }, /* 8 and ( -> 8 and * */ - [KC_9] = { KC_9, KC_ASTR }, /* 9 and ) -> 9 and ( */ - [KC_0] = { KC_0, KC_LPRN }, /* 0 and (no assign) -> 0 and ) */ - [KC_MINS] = { KC_MINS, S(KC_RO) }, /* - and = -> - and _ */ - [KC_EQL] = { KC_UNDS, KC_COLN }, /* ^ and ~ -> = and + */ - [KC_LBRC] = { KC_RBRC, KC_RCBR }, /* @ and ` -> [ and { */ - [KC_RBRC] = { KC_BSLS, KC_PIPE }, /* [ and { -> ] and } */ - [KC_BSLS] = { KC_JYEN, S(KC_JYEN) }, /* ] and } -> / and | */ - [KC_NUHS] = { KC_NUHS, S(KC_NUHS) }, /* (no assign) */ - [KC_SCLN] = { KC_SCLN, KC_QUOT }, /* ; and + -> ; and : */ - [KC_QUOT] = { KC_AMPR, KC_AT }, /* : and * -> ' and " */ - [KC_GRV] = { KC_LCBR, KC_PLUS }, /* (no assign) -> ` and ~ */ - [KC_COMM] = { KC_COMM, KC_LT }, /* , and < -> , and < */ - [KC_DOT] = { KC_DOT, KC_GT }, /* . and > -> . and > */ - [KC_SLSH] = { KC_SLSH, KC_QUES }, /* / and ? -> / and ? */ + [KC_1] = { KC_1, JP_EXLM }, /* 1 and ! -> 1 and ! */ + [KC_2] = { KC_2, JP_AT }, /* 2 and " -> 2 and @ */ + [KC_3] = { KC_3, JP_HASH }, /* 3 and # -> 3 and # */ + [KC_4] = { KC_4, JP_DLR }, /* 4 and $ -> 4 and $ */ + [KC_5] = { KC_5, JP_PERC }, /* 5 and % -> 5 and % */ + [KC_6] = { KC_6, JP_CIRC }, /* 6 and & -> 6 and ^ */ + [KC_7] = { KC_7, JP_AMPR }, /* 7 and ' -> 7 and & */ + [KC_8] = { KC_8, JP_ASTR }, /* 8 and ( -> 8 and * */ + [KC_9] = { KC_9, JP_LPRN }, /* 9 and ) -> 9 and ( */ + [KC_0] = { KC_0, JP_RPRN }, /* 0 -> 0 and ) */ + [KC_MINS] = { JP_MINS, JP_UNDS }, /* - and = -> - and _ */ + [KC_EQL] = { JP_EQL, JP_PLUS }, /* ^ and ~ -> = and + */ + [KC_LBRC] = { JP_LBRC, JP_LCBR }, /* @ and ` -> [ and { */ + [KC_RBRC] = { JP_RBRC, JP_RCBR }, /* [ and { -> ] and } */ + [KC_BSLS] = { JP_YEN, JP_PIPE }, /* ] and } -> \ and | */ + [KC_NUHS] = { JP_YEN, JP_PIPE }, /* ] and } -> \ and | */ + [KC_SCLN] = { JP_SCLN, JP_COLN }, /* ; and + -> ; and : */ + [KC_QUOT] = { JP_QUOT, JP_DQT }, /* : and * -> ' and " */ + [KC_GRV] = { JP_GRV, JP_TILD }, /* Han/Zen -> ` and ~ */ + [KC_COMM] = { JP_COMM, JP_LT }, /* , and < -> , and < */ + [KC_DOT] = { JP_DOT, JP_GT }, /* . and > -> . and > */ + [KC_SLSH] = { JP_SLSH, JP_QUES }, /* / and ? -> / and ? */ }; - -#endif +// clang-format on diff --git a/keyboards/hhkb/ansi/keymaps/shela/readme.md b/keyboards/hhkb/ansi/keymaps/shela/readme.md index 5a06a83632a5..ad0b627cb576 100644 --- a/keyboards/hhkb/ansi/keymaps/shela/readme.md +++ b/keyboards/hhkb/ansi/keymaps/shela/readme.md @@ -1,14 +1,68 @@ -# Shela's HHKB Layout +# Shela's keymap for HHKB Pro 2 US Layout with Alternate Controller -Layer 0: US Layout -Layer 1: Pseudo US Layout -Layer 2: Dvorak Layout -Layer 3: Mouse -Layer 4: Tenkey -Layer 5: HHKB Fn Key -Layer 6: SpaceFN +## Layers -## Pseudo US Layout +Layer 1: Qwerty Layer +Layer 2: Dvorak Layer +Layer 3: Colemak Layer +Layer 4: Pseudo US Layer +Layer 5: Tenkey Layer +Layer 6: Mouse Layer +Layer 7: HHKB Fn Layer +Layer 8: SpaceFN Layer -On japanese Windows, HHKB Professional 2 US layout model recognized wrongly as JIS layout without changing OS settings. -But, you can use HHKB like a US layout keyboard as it is. +### Qwerty/Dvorak/Colemak Layer + +Basic keymap layer for each keyboard layout. + +### Pseudo US Layer + +A layer that can be used with the same physical layout as the previously activated basic (Qwerty/Dvorak/Colemak) keymap layer, with the keyboard still configured as a Japanese keyboard on the OS. + +This is useful when using virtual environments and remote desktops, because you can use Japanese Windows with the same keyboard without changing the OS keyboard settings. Also, when using the keyboard as a US keyboard on Windows OS, all keys existing only on Japanese keyboards are ignored and it is not possible to assign these keys to the desired function of any application. You can avoid such problems. + +### Tenkey/Mouse Layer + +Tenkey (numeric keypad) and mouse layers. For the Tenkey to work, Numlock must be turned on in the OS. + +### HHKB Fn Layer + +A layer that is equivalent to Fn key of Happy Hacking Keyboard. There are also some layer switching keys and special function keys. + +### SpaceFN Layer + +Customized [SpaceFN](https://geekhack.org/index.php?topic=51069.0) layer. There are left-hand and right-hand Arrows/Home/End/PageUp/PageDown keys. Frequently used keys in HHKB Fn layer are configured to this layer and can be used as an alternative layer to the HHKB Fn layer. + +## Special function keycodes + +### Pseudo US keycode + +A special keycode that implements Pseudo US Layout. + +### Mac mode keycode + +A special keycode that toggles Mac mode. When Mac mode is enabled, the keymap of the Left Inner/Outer and Right Inner/Outer keys are changed for macOS. See _Left Inner/Outer, Right Inner/Outer keys_ for details. + +### Left Inner/Outer, Right Inner/Outer keycodes + +If you tap a Mod-Tap key and another key within the time specified by TAPPING_TERM, QMK interprets these keys as if they were pressed at the same time even if they were not pressed simultaneously. Therefore, for fast typists, Mod-Tap can accidentally send a keycode with modifier. These special keycodes allow you to work around this issue and change the keymap in Mac mode. + +These keys work as follows: + +Mac mode: Disabled + +| Key | Keycode | Tap | Hold | +| ----------- | ------- | ------- | ------- | +| Left Inner | L_INNER | KC_MHEN | KC_LALT | +| Left Outer | L_OUTER | KC_LGUI | KC_LGUI | +| Right Inner | R_INNER | KC_KANA | KC_RALT | +| Right Outer | R_OUTER | KC_RGUI | KC_RGUI | + +Mac mode: Enabled + +| Key | Keycode | Tap | Hold | +| ----------- | ------- | -------- | ------- | +| Left Inner | L_INNER | KC_LANG2 | KC_LCMD | +| Left Outer | L_OUTER | KC_LOPT | KC_LOPT | +| Right Inner | R_INNER | KC_LANG1 | KC_RCMD | +| Right Outer | R_OUTER | KC_ROPT | KC_ROPT | diff --git a/keyboards/hhkb/ansi/keymaps/shela/rules.mk b/keyboards/hhkb/ansi/keymaps/shela/rules.mk index d0586bda68bf..84f6395a485e 100644 --- a/keyboards/hhkb/ansi/keymaps/shela/rules.mk +++ b/keyboards/hhkb/ansi/keymaps/shela/rules.mk @@ -1 +1,3 @@ -SRC += action_pseudo_lut.c +DYNAMIC_MACRO_ENABLE = yes + +SRC += action_pseudo.c From 349646bfe0658b1b0236fcc986db714b510114df Mon Sep 17 00:00:00 2001 From: BeefaloKing <9630438+BeefaloKing@users.noreply.github.com> Date: Tue, 4 Aug 2020 22:03:29 -0600 Subject: [PATCH 513/930] Fix RGB_DISABLE_TIMEOUT overflow warning (#9866) (#9874) * Fix RGB_DISABLE_TIMEOUT overflow warning (#9866) * Adjust capitalization (#9874) --- quantum/rgb_matrix.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/quantum/rgb_matrix.c b/quantum/rgb_matrix.c index f3da0ab0f7d5..615b4b0a7bf6 100644 --- a/quantum/rgb_matrix.c +++ b/quantum/rgb_matrix.c @@ -58,7 +58,7 @@ const point_t k_rgb_matrix_center = RGB_MATRIX_CENTER; // ------------------------------------------ #if defined(RGB_DISABLE_AFTER_TIMEOUT) && !defined(RGB_DISABLE_TIMEOUT) -# define RGB_DISABLE_TIMEOUT (RGB_DISABLE_AFTER_TIMEOUT * 1200) +# define RGB_DISABLE_TIMEOUT (RGB_DISABLE_AFTER_TIMEOUT * 1200UL) #endif #ifndef RGB_DISABLE_TIMEOUT From 3df52050c12cd5e6286664672efc6f43849d935d Mon Sep 17 00:00:00 2001 From: James Young <18669334+noroadsleft@users.noreply.github.com> Date: Wed, 5 Aug 2020 11:43:31 -0700 Subject: [PATCH 514/930] [Keyboard] Fix Configurator data for Mechlovin Hannah910 rev2 (#9903) * fix Configurator data * rework layout macros * enable 65_ansi_blocker Community Layout support * fix layout macro references in info.json * update rules.mk per fauxpark * update rules.mk per fauxpark II --- keyboards/mechlovin/hannah910/rev2/info.json | 147 ++++++++++++++++++- keyboards/mechlovin/hannah910/rev2/rev2.h | 78 +++++----- keyboards/mechlovin/hannah910/rev2/rules.mk | 17 +-- 3 files changed, 187 insertions(+), 55 deletions(-) diff --git a/keyboards/mechlovin/hannah910/rev2/info.json b/keyboards/mechlovin/hannah910/rev2/info.json index df48fbcf3241..b094bfdcf86d 100644 --- a/keyboards/mechlovin/hannah910/rev2/info.json +++ b/keyboards/mechlovin/hannah910/rev2/info.json @@ -5,8 +5,7 @@ "width": 16, "height": 5, "layouts": { - "LAYOUT": { - "key_count": 72, + "LAYOUT_all": { "layout": [ {"label":"K00 (B0,B5)", "x":0, "y":0}, {"label":"K01 (B0,B6)", "x":1, "y":0}, @@ -81,6 +80,150 @@ {"label":"K4D (B4,D2)", "x":14, "y":4}, {"label":"K4E (B4,D3)", "x":15, "y":4} ] + }, + "LAYOUT_65_iso_blocker_split_bs": { + "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}, + {"label":"K0E", "x":14, "y":0}, + {"label":"K49", "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":"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":"K4C", "x":13, "y":4}, + {"label":"K4D", "x":14, "y":4}, + {"label":"K4E", "x":15, "y":4} + ] + }, + "LAYOUT_65_ansi_blocker": { + "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":"K49", "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":"K2D", "x":12.75, "y":2, "w":2.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":"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":"K4C", "x":13, "y":4}, + {"label":"K4D", "x":14, "y":4}, + {"label":"K4E", "x":15, "y":4} + ] } } ,"meta": "https://noroadsleft.github.io/kbf_qmk_converter/" diff --git a/keyboards/mechlovin/hannah910/rev2/rev2.h b/keyboards/mechlovin/hannah910/rev2/rev2.h index d212d1ea3e01..6d87fea7e883 100644 --- a/keyboards/mechlovin/hannah910/rev2/rev2.h +++ b/keyboards/mechlovin/hannah910/rev2/rev2.h @@ -1,50 +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, 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 }, \ + K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, K49, \ + 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, K44, 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, KC_NO, K44, KC_NO, K46, KC_NO, K48, K49, K4A, K4B, K4C, K4D, K4E } \ } -#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_65_iso_blocker_split_bs( \ + K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, K49, \ + 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, K46, 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, KC_NO, 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, KC_NO, KC_NO, KC_NO, K46, KC_NO, KC_NO, K49, K4A, K4B, K4C, K4D, K4E } \ } -#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 }, \ +#define LAYOUT_65_ansi_blocker( \ + 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, 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, K46, K4A, K4B, K4C, K4D, K4E \ +) { \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, KC_NO }, \ + { 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, KC_NO, K2D, K2E }, \ + { K30, KC_NO, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E }, \ + { K40, K41, K42, KC_NO, KC_NO, KC_NO, K46, KC_NO, KC_NO, K49, K4A, K4B, K4C, K4D, K4E } \ } +#define LAYOUT_iso LAYOUT_65_iso_blocker_split_bs +#define LAYOUT_ansi LAYOUT_65_ansi_blocker diff --git a/keyboards/mechlovin/hannah910/rev2/rules.mk b/keyboards/mechlovin/hannah910/rev2/rules.mk index e8100a0f42d7..4f114baa92b0 100644 --- a/keyboards/mechlovin/hannah910/rev2/rules.mk +++ b/keyboards/mechlovin/hannah910/rev2/rules.mk @@ -2,13 +2,6 @@ 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 @@ -25,9 +18,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 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 +BLUETOOTH_ENABLE = no # Enable Bluetooth +AUDIO_ENABLE = no # Audio output + +LAYOUTS = 65_ansi_blocker From 4c14b11fc79e51521b6e53453862252b806a5c02 Mon Sep 17 00:00:00 2001 From: Drashna Jaelre Date: Wed, 5 Aug 2020 13:29:04 -0700 Subject: [PATCH 515/930] Add Indicator flag for RGB Matrix (#9933) * Add Indicator flag for RGB Matrix This adds a new flag for the RGB Matrix feature that lets you specify if the LED is an indicator LED, to be used to indicate the system state of the keyboard (eg caps/num/etc lock status, layer indication, modifer status, etc). * Better formatting of table --- docs/feature_rgb_matrix.md | 19 ++++++++++--------- quantum/rgb_matrix_types.h | 1 + 2 files changed, 11 insertions(+), 9 deletions(-) diff --git a/docs/feature_rgb_matrix.md b/docs/feature_rgb_matrix.md index 9604bdcc8982..2cde3ec56950 100644 --- a/docs/feature_rgb_matrix.md +++ b/docs/feature_rgb_matrix.md @@ -159,15 +159,16 @@ As mentioned earlier, the center of the keyboard by default is expected to be `{ ## Flags :id=flags -|Define |Description | -|------------------------------------|-------------------------------------------| -|`#define HAS_FLAGS(bits, flags)` |Returns true if `bits` has all `flags` set.| -|`#define HAS_ANY_FLAGS(bits, flags)`|Returns true if `bits` has any `flags` set.| -|`#define LED_FLAG_NONE 0x00` |If this LED has no flags. | -|`#define LED_FLAG_ALL 0xFF` |If this LED has all flags. | -|`#define LED_FLAG_MODIFIER 0x01` |If the Key for this LED is a modifier. | -|`#define LED_FLAG_UNDERGLOW 0x02` |If the LED is for underglow. | -|`#define LED_FLAG_KEYLIGHT 0x04` |If the LED is for key backlight. | +|Define |Value |Description | +|----------------------------|------|-------------------------------------------------| +|`HAS_FLAGS(bits, flags)` |*n/a* |Evaluates to `true` if `bits` has all `flags` set| +|`HAS_ANY_FLAGS(bits, flags)`|*n/a* |Evaluates to `true` if `bits` has any `flags` set| +|`LED_FLAG_NONE` |`0x00`|If this LED has no flags | +|`LED_FLAG_ALL` |`0xFF`|If this LED has all flags | +|`LED_FLAG_MODIFIER` |`0x01`|If the LED is on a modifier key | +|`LED_FLAG_UNDERGLOW` |`0x02`|If the LED is for underglow | +|`LED_FLAG_KEYLIGHT` |`0x04`|If the LED is for key backlight | +|`LED_FLAG_INDICATOR` |`0x08`|If the LED is for keyboard state indication | ## Keycodes :id=keycodes diff --git a/quantum/rgb_matrix_types.h b/quantum/rgb_matrix_types.h index f447ac9c562a..f7ebec1d5dcd 100644 --- a/quantum/rgb_matrix_types.h +++ b/quantum/rgb_matrix_types.h @@ -56,6 +56,7 @@ typedef struct PACKED { #define LED_FLAG_MODIFIER 0x01 #define LED_FLAG_UNDERGLOW 0x02 #define LED_FLAG_KEYLIGHT 0x04 +#define LED_FLAG_INDICATOR 0x08 #define NO_LED 255 From 37cbf7bcecef7e7542b41cfde9efc06fffa4e65b Mon Sep 17 00:00:00 2001 From: Sendy YK <69058604+mrsendyyk@users.noreply.github.com> Date: Thu, 6 Aug 2020 04:45:57 +0700 Subject: [PATCH 516/930] [Keymap] Add ANSI with Arrow Layout & RGB Underglow as a Caps Lock Indicator (#9910) * KBDfans DZ60 ANSI with Arrow also RGB Underglow as a Caps Lock Indicator * Change all the KC_NOs to _______ (seven underscores) * change all the KC_NOs to _______ (seven underscores) * Update keymap.c * Update readme.md Update build environment setup link, make instructions link, and make instructions link. --- keyboards/dz60/keymaps/mrsendyyk/keymap.c | 62 ++++++++++++++++++++++ keyboards/dz60/keymaps/mrsendyyk/readme.md | 46 ++++++++++++++++ 2 files changed, 108 insertions(+) create mode 100644 keyboards/dz60/keymaps/mrsendyyk/keymap.c create mode 100644 keyboards/dz60/keymaps/mrsendyyk/readme.md diff --git a/keyboards/dz60/keymaps/mrsendyyk/keymap.c b/keyboards/dz60/keymaps/mrsendyyk/keymap.c new file mode 100644 index 000000000000..fed671d83f08 --- /dev/null +++ b/keyboards/dz60/keymaps/mrsendyyk/keymap.c @@ -0,0 +1,62 @@ +#include QMK_KEYBOARD_H + +// KBDfans DZ60 - ANSI with Arrow + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + /* Qwerty [0] + * ,-----------------------------------------------------------------------------------------. + * | Esc | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | Backspace | + * |-----------------------------------------------------------------------------------------+ + * | Tab | Q | W | E | R | T | Y | U | I | O | P | [ | ] | \ | + * |-----------------------------------------------------------------------------------------+ + * |Caps Lock| A | S | D | F | G | H | J | K | L | ; | ' | Enter | + * |-----------------------------------------------------------------------------------------+ + * | Shift | Z | X | C | V | B | N | M | , | . | RShift | Up | / | + * |-----------------------------------------------------------------------------------------+ + * | Ctrl | OS | Alt | Space | RAlt | Fn |Left |Down |Right| + * `-----------------------------------------------------------------------------------------' + */ + + [0] = LAYOUT_60_b_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_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_SPC, KC_SPC, KC_RALT, MO(1), KC_LEFT, KC_DOWN, KC_RGHT), + + /* Fn Layer [1] + * ,-----------------------------------------------------------------------------------------. + * | ` ~ | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | Delete | + * |-----------------------------------------------------------------------------------------+ + * | Bri Up | | | End | Rst | | | | Ins | | P Sc| | | Eject | + * |-----------------------------------------------------------------------------------------+ + * | Bri Down| | S L | | | | Home| | | | | | Mute | + * |-----------------------------------------------------------------------------------------+ + * | Vol + | | | Calc| | | | Mail| | | |Pg U |Pause| + * |-----------------------------------------------------------------------------------------+ + * | Vol - | Rwd | F Fd | Play | M Stp| | Prev| Pg D| Next| + * `-----------------------------------------------------------------------------------------' + */ + + [1] = LAYOUT_60_b_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_DEL, + KC_BRIU, _______, _______, KC_END, RESET, _______, _______, _______, KC_INS, _______, KC_PSCR, _______, _______, KC_EJCT, + KC_BRID, _______, KC_SLCK, _______, _______, _______, KC_HOME, _______, _______, _______, _______, _______, KC_MUTE, + KC_VOLU, _______, _______, KC_CALC, _______, _______, _______, KC_MAIL, _______, _______, _______, KC_PGUP, KC_PAUS, + KC_VOLD, KC_MRWD, KC_MFFD, KC_MPLY, KC_MPLY, KC_MPLY, KC_MSTP, KC_TRNS, KC_MPRV, KC_PGDN, KC_MNXT) +}; + +void keyboard_post_init_user(void) { + rgblight_enable_noeeprom(); + rgblight_sethsv_noeeprom(0, 0, 0); +}; + +// RGB Underglow as a Caps Lock Indicator + +void led_set_user(uint8_t usb_led) { + if (IS_LED_ON(usb_led, USB_LED_CAPS_LOCK)) { + writePinLow(B2); + rgblight_setrgb(100, 255, 100); + } else { + rgblight_setrgb(0, 0, 0); + } +} diff --git a/keyboards/dz60/keymaps/mrsendyyk/readme.md b/keyboards/dz60/keymaps/mrsendyyk/readme.md new file mode 100644 index 000000000000..dc2dfefe0adb --- /dev/null +++ b/keyboards/dz60/keymaps/mrsendyyk/readme.md @@ -0,0 +1,46 @@ +# Sendy YK's Keymap +--- + +KBDfans DZ60 ANSI with Arrow also RGB Underglow as a Caps Lock Indicator + +### Qwerty [0] +``` +,-----------------------------------------------------------------------------------------. +| Esc | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | Backspace | +|-----------------------------------------------------------------------------------------+ +| Tab | Q | W | E | R | T | Y | U | I | O | P | [ | ] | \ | +|-----------------------------------------------------------------------------------------+ +|Caps Lock| A | S | D | F | G | H | J | K | L | ; | ' | Enter | +|-----------------------------------------------------------------------------------------+ +| Shift | Z | X | C | V | B | N | M | , | . | RShift | Up | / | +|-----------------------------------------------------------------------------------------+ +| Ctrl | OS | Alt | Space | RAlt | Fn |Left |Down |Right| +`-----------------------------------------------------------------------------------------' +``` + +### Fn Layer [1] +``` +,-----------------------------------------------------------------------------------------. +| ` ~ | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | Delete | +|-----------------------------------------------------------------------------------------+ +| Bri Up | | | End | Rst | | | | Ins | | P Sc| | | Eject | +|-----------------------------------------------------------------------------------------+ +| Bri Down| | S L | | | | Home| | | | | | Mute | +|-----------------------------------------------------------------------------------------+ +| Vol + | | | Calc| | | | Mail| | | |Pg U |Pause| +|-----------------------------------------------------------------------------------------+ +| Vol - | Rwd | F Fd | Play | M Stp| | Prev| Pg D| Next| +`-----------------------------------------------------------------------------------------' +``` + +### RGB Underglow as a Caps Lock Indicator + +Set in `mrsendyyk/keymap.c` in the `led_set_user` function. + +--- + +Make example for this keyboard (after setting up your build environment): + + make dz60:mrsendyyk + +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 904c5613f41859ccc07057278b41587224b84871 Mon Sep 17 00:00:00 2001 From: aerialviews007 Date: Wed, 5 Aug 2020 17:11:35 -0500 Subject: [PATCH 517/930] [Keymap] Adding Custom Keymap for Let's Split (#9423) * add * Delete rules.mk * Update keymap.c * Update keymap.c * Update keyboards/lets_split/keymaps/aerialviews007/keymap.c * Update keyboards/lets_split/keymaps/aerialviews007/keymap.c * Update keyboards/lets_split/keymaps/aerialviews007/keymap.c * Update keyboards/lets_split/keymaps/aerialviews007/keymap.c * Update keyboards/lets_split/keymaps/aerialviews007/keymap.c * Update keyboards/lets_split/keymaps/aerialviews007/keymap.c * Update keyboards/lets_split/keymaps/aerialviews007/keymap.c * Update keyboards/lets_split/keymaps/aerialviews007/keymap.c --- .../keymaps/aerialviews007/config.h | 36 ++++ .../keymaps/aerialviews007/keymap.c | 160 ++++++++++++++++++ 2 files changed, 196 insertions(+) create mode 100644 keyboards/lets_split/keymaps/aerialviews007/config.h create mode 100644 keyboards/lets_split/keymaps/aerialviews007/keymap.c diff --git a/keyboards/lets_split/keymaps/aerialviews007/config.h b/keyboards/lets_split/keymaps/aerialviews007/config.h new file mode 100644 index 000000000000..60e23f816d29 --- /dev/null +++ b/keyboards/lets_split/keymaps/aerialviews007/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 + + // 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 diff --git a/keyboards/lets_split/keymaps/aerialviews007/keymap.c b/keyboards/lets_split/keymaps/aerialviews007/keymap.c new file mode 100644 index 000000000000..cc3dabf65e6f --- /dev/null +++ b/keyboards/lets_split/keymaps/aerialviews007/keymap.c @@ -0,0 +1,160 @@ +#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 custom_layers { + _QWERTY, + _COLEMAK, + _DVORAK, + _LOWER, + _RAISE, + _ADJUST, +}; + +enum custom_keycodes { + QWERTY = SAFE_RANGE, + COLEMAK, + DVORAK +}; + +#define LOWER MO(_LOWER) +#define RAISE MO(_RAISE) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +/* Qwerty + * ,-----------------------------------------------------------------------------------. + * | Tab | Q | W | E | R | T | Y | U | I | O | P | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | GEsc | A | S | D | F | G | H | J | K | L | ; | " | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | Shift| Z | X | C | V | B | N | M | , | . | / |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | @ | 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_GESC, 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_AT, 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 | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | GEsc | A | R | S | T | D | H | N | E | I | O | ' | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | Shift| Z | X | C | V | B | K | M | , | . | / |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | @ | 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_GESC, 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_AT, 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 | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | GEsc | A | O | E | U | I | D | H | T | N | S | / | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | Shift| ; | Q | J | K | X | B | M | W | V | Z |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | @ | 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_GESC, 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_AT, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT +), + +/* Lower + * ,-----------------------------------------------------------------------------------. + * | ~ | F1 | F2 | F3 | F4 | _ | % | 7 | 8 | 9 | ^ | Del | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Del | F5 | F6 | F7 | F8 | ! | $ | 4 | 5 | 6 | 0 | | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | F8 | F9 | F10 | F12 | & | # | 1 | 2 | 3 | = | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | / | - | + | * | + * `-----------------------------------------------------------------------------------' + */ +[_LOWER] = LAYOUT_ortho_4x12( + KC_TILD, KC_F1, KC_F2, KC_F3, KC_F4,S(KC_MINS), KC_PERC, KC_7, KC_8, KC_9, KC_CIRC, KC_DEL, + KC_DEL, KC_F5, KC_F6, KC_F7, KC_F8, KC_EXLM, KC_DLR, KC_4, KC_5, KC_6, KC_0, KC_PIPE, + _______, KC_F9, KC_F10, KC_F11, KC_F12, KC_AMPR, KC_HASH, KC_1, KC_2, KC_3, KC_EQL, _______, + _______, _______, _______, _______, _______, _______, _______, _______, KC_PSLS, KC_PMNS, KC_PPLS, KC_PAST +), + +/* Raise (Mouse & Media) + * ,-----------------------------------------------------------------------------------. + * | ` | | | MsUp | | { | } | | MsWup| | | Del | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Del | |MsLeft|MsDown|MsRght| ( | ) | Lclk |MsWdwn| Rclk | | \ | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | | | | | [ | ] | | | Mute | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | Next | Vol- | Vol+ | Play | + * `-----------------------------------------------------------------------------------' + */ +[_RAISE] = LAYOUT_ortho_4x12( + KC_GRV, _______, _______, KC_MS_U, _______, KC_LCBR, KC_RCBR, _______, KC_WH_U, _______, _______, KC_DEL, + KC_DEL, _______, KC_MS_L, KC_MS_D, KC_MS_R, KC_LPRN, KC_RPRN, KC_BTN1, KC_WH_D, KC_BTN2, _______, KC_BSLS, + _______, _______, _______, _______, _______, KC_LBRC, KC_RBRC, _______, _______, KC_MUTE, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY +), + +/* Adjust (Lower + Raise) + * ,-----------------------------------------------------------------------------------. + * | | Reset| | | | | | | | | Reset| Del | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | | |Aud on|Audoff|AGnorm|AGswap|Qwerty|Colemk|Dvorak| | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | | | | | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | + * `-----------------------------------------------------------------------------------' + */ +[_ADJUST] = LAYOUT_ortho_4x12( + _______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, 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; +} From cb9b81cc103f801febd67dcaf0c86322a2bfddc8 Mon Sep 17 00:00:00 2001 From: sh-xguitar Date: Thu, 6 Aug 2020 15:03:27 +0700 Subject: [PATCH 518/930] [Keyboard] added ASH-XIIX keyboard (#9833) * Create readme.md * Update readme.md * Update readme.md * Create ash_xiix.c * Create ash_xiix.h * Create info.json * Create config.h * Create rules.mk * Create keymap.c * Update keyboards/ash_xiix/rules.mk * Update keyboards/ash_xiix/config.h * Update keyboards/ash_xiix/config.h * Update keyboards/ash_xiix/config.h * Update keyboards/ash_xiix/info.json * Update keyboards/ash_xiix/info.json * Update keyboards/ash_xiix/readme.md * Update readme.md * Update readme.md --- keyboards/ash_xiix/ash_xiix.c | 25 + keyboards/ash_xiix/ash_xiix.h | 51 ++ keyboards/ash_xiix/config.h | 56 ++ keyboards/ash_xiix/info.json | 540 ++++++++++++++++++++ keyboards/ash_xiix/keymaps/default/keymap.c | 37 ++ keyboards/ash_xiix/readme.md | 15 + keyboards/ash_xiix/rules.mk | 22 + 7 files changed, 746 insertions(+) create mode 100644 keyboards/ash_xiix/ash_xiix.c create mode 100644 keyboards/ash_xiix/ash_xiix.h create mode 100644 keyboards/ash_xiix/config.h create mode 100644 keyboards/ash_xiix/info.json create mode 100644 keyboards/ash_xiix/keymaps/default/keymap.c create mode 100644 keyboards/ash_xiix/readme.md create mode 100644 keyboards/ash_xiix/rules.mk diff --git a/keyboards/ash_xiix/ash_xiix.c b/keyboards/ash_xiix/ash_xiix.c new file mode 100644 index 000000000000..56e6f48d032d --- /dev/null +++ b/keyboards/ash_xiix/ash_xiix.c @@ -0,0 +1,25 @@ +/* Copyright 2020 sh_xguitar + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#include "ash_xiix.h" + +bool led_update_kb(led_t led_state) { + if (led_update_user(led_state)) { + writePin(NUM_LOCK_LED_PIN, led_state.num_lock); + writePin(CAPS_LOCK_LED_PIN, led_state.caps_lock); + writePin(SCROLL_LOCK_LED_PIN, led_state.scroll_lock); + } + return true; +} diff --git a/keyboards/ash_xiix/ash_xiix.h b/keyboards/ash_xiix/ash_xiix.h new file mode 100644 index 000000000000..48f9a31a267f --- /dev/null +++ b/keyboards/ash_xiix/ash_xiix.h @@ -0,0 +1,51 @@ +/* Copyright 2020 sh_xguitar + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License 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( \ + k00, k01, k02, k03, k60, k61, k62, k63, k04, k05, k06, k07, k08, k54, k55, k56, k57, \ + k64, k65, k66, k67, \ + k10, k11, k12, k13, k70, k71, k72, k73, k14, k15, k16, k17, k18, k19, k74, k75, k76, k77, \ + k20, k21, k22, k23, k80, k81, k82, k83, k24, k25, k26, k27, k28, k29, k84, k85, k86, k87, \ + k30, k31, k32, k33, k90, k91, k92, k93, k34, k35, k36, k37, k38, k94, k95, k96, k97, \ + k40, k41, k42, k43, ka0, ka1, ka2, ka3, k44, k45, k46, k47, k48, ka9, ka4, ka5, ka6, ka7, \ + k50, k51, k52, k53, kb4, kb7, ka8, kb8, kb9, kb5, kb6 \ +) \ +{ \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, KC_NO }, \ + { 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, KC_NO }, \ + { k40, k41, k42, k43, k44, k45, k46, k47, k48, KC_NO }, \ + { k50, k51, k52, k53, k54, k55, k56, k57, KC_NO, KC_NO }, \ + { k60, k61, k62, k63, k64, k65, k66, k67, KC_NO, KC_NO }, \ + { k70, k71, k72, k73, k74, k75, k76, k77, KC_NO, KC_NO }, \ + { k80, k81, k82, k83, k84, k85, k86, k87, KC_NO, KC_NO }, \ + { k90, k91, k92, k93, k94, k95, k96, k97, KC_NO, KC_NO }, \ + { ka0, ka1, ka2, ka3, ka4, ka5, ka6, ka7, ka8, ka9 }, \ + { KC_NO, KC_NO, KC_NO, KC_NO, kb4, kb5, kb6, kb7, kb8, kb9 } \ +} + diff --git a/keyboards/ash_xiix/config.h b/keyboards/ash_xiix/config.h new file mode 100644 index 000000000000..bcfdaeef7c48 --- /dev/null +++ b/keyboards/ash_xiix/config.h @@ -0,0 +1,56 @@ +/* +Copyright 2020 sh_xguitar +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License 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 0x14BC +#define DEVICE_VER 0x0001 +#define MANUFACTURER ASH +#define PRODUCT XIIX + +/* key matrix size */ +#define MATRIX_ROWS 12 +#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, B6, B5, B4, D7, D0, D1, D2, D3, D5, D4, D6 } +#define MATRIX_COL_PINS { F1, F4, F5, F6, B0, B2, B1, B3, B7, C7 } +#define UNUSED_PINS + +#define NUM_LOCK_LED_PIN E6 +#define CAPS_LOCK_LED_PIN F0 +#define SCROLL_LOCK_LED_PIN F7 + +/* 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 +#define LOCKING_RESYNC_ENABLE diff --git a/keyboards/ash_xiix/info.json b/keyboards/ash_xiix/info.json new file mode 100644 index 000000000000..c81eb0a6bb01 --- /dev/null +++ b/keyboards/ash_xiix/info.json @@ -0,0 +1,540 @@ +{ + "keyboard_name": "ASH-XIIX", + "url": "config.qmk.fm", + "maintainer": "qmk", + "width": 19.5, + "height": 7.25, + "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": "Insert", + "x": 15.5, + "y": 0 + }, + { + "label": "Home", + "x": 16.5, + "y": 0 + }, + { + "label": "PgUp", + "x": 17.5, + "y": 0 + }, + { + "label": "PrtSc", + "x": 18.5, + "y": 0 + }, + { + "label": "Del", + "x": 15.5, + "y": 1 + }, + { + "label": "End", + "x": 16.5, + "y": 1 + }, + { + "label": "PgDn", + "x": 17.5, + "y": 1 + }, + { + "label": "Scroll Lock", + "x": 18.5, + "y": 1 + }, + { + "label": "~", + "x": 0, + "y": 2 + }, + { + "label": "!", + "x": 1, + "y": 2 + }, + { + "label": "@", + "x": 2, + "y": 2 + }, + { + "label": "#", + "x": 3, + "y": 2 + }, + { + "label": "$", + "x": 4, + "y": 2 + }, + { + "label": "%", + "x": 5, + "y": 2 + }, + { + "label": "^", + "x": 6, + "y": 2 + }, + { + "label": "&", + "x": 7, + "y": 2 + }, + { + "label": "", + "x": 8, + "y": 2 + }, + { + "label": "(", + "x": 9, + "y": 2 + }, + { + "label": ")", + "x": 10, + "y": 2 + }, + { + "label": "_", + "x": 11, + "y": 2 + }, + { + "label": "+", + "x": 12, + "y": 2 + }, + { + "label": "Backspace", + "x": 13, + "y": 2, + "w": 2 + }, + { + "label": "Num Lock", + "x": 15.5, + "y": 2 + }, + { + "label": "/", + "x": 16.5, + "y": 2 + }, + { + "x": 17.5, + "y": 2 + }, + { + "label": "Pause", + "x": 18.5, + "y": 2 + }, + { + "label": "Tab", + "x": 0, + "y": 3, + "w": 1.5 + }, + { + "label": "Q", + "x": 1.5, + "y": 3 + }, + { + "label": "W", + "x": 2.5, + "y": 3 + }, + { + "label": "E", + "x": 3.5, + "y": 3 + }, + { + "label": "R", + "x": 4.5, + "y": 3 + }, + { + "label": "T", + "x": 5.5, + "y": 3 + }, + { + "label": "Y", + "x": 6.5, + "y": 3 + }, + { + "label": "U", + "x": 7.5, + "y": 3 + }, + { + "label": "I", + "x": 8.5, + "y": 3 + }, + { + "label": "O", + "x": 9.5, + "y": 3 + }, + { + "label": "P", + "x": 10.5, + "y": 3 + }, + { + "label": "{", + "x": 11.5, + "y": 3 + }, + { + "label": "}", + "x": 12.5, + "y": 3 + }, + { + "label": "|", + "x": 13.5, + "y": 3, + "w": 1.5 + }, + { + "label": "7", + "x": 15.5, + "y": 3 + }, + { + "label": "8", + "x": 16.5, + "y": 3 + }, + { + "label": "9", + "x": 17.5, + "y": 3 + }, + { + "label": "-", + "x": 18.5, + "y": 3 + }, + { + "label": "Caps Lock", + "x": 0, + "y": 4, + "w": 1.75 + }, + { + "label": "A", + "x": 1.75, + "y": 4 + }, + { + "label": "S", + "x": 2.75, + "y": 4 + }, + { + "label": "D", + "x": 3.75, + "y": 4 + }, + { + "label": "F", + "x": 4.75, + "y": 4 + }, + { + "label": "G", + "x": 5.75, + "y": 4 + }, + { + "label": "H", + "x": 6.75, + "y": 4 + }, + { + "label": "J", + "x": 7.75, + "y": 4 + }, + { + "label": "K", + "x": 8.75, + "y": 4 + }, + { + "label": "L", + "x": 9.75, + "y": 4 + }, + { + "label": ":", + "x": 10.75, + "y": 4 + }, + { + "label": "\"", + "x": 11.75, + "y": 4 + }, + { + "label": "Enter", + "x": 12.75, + "y": 4, + "w": 2.25 + }, + { + "label": "4", + "x": 15.5, + "y": 4 + }, + { + "label": "5", + "x": 16.5, + "y": 4 + }, + { + "label": "6", + "x": 17.5, + "y": 4 + }, + { + "label": "+", + "x": 18.5, + "y": 4 + }, + { + "label": "Shift", + "x": 0, + "y": 5, + "w": 1.25 + }, + { + "label": "ISO1", + "x": 1.25, + "y": 5 + }, + { + "label": "Z", + "x": 2.25, + "y": 5 + }, + { + "label": "X", + "x": 3.25, + "y": 5 + }, + { + "label": "C", + "x": 4.25, + "y": 5 + }, + { + "label": "V", + "x": 5.25, + "y": 5 + }, + { + "label": "B", + "x": 6.25, + "y": 5 + }, + { + "label": "N", + "x": 7.25, + "y": 5 + }, + { + "label": "M", + "x": 8.25, + "y": 5 + }, + { + "label": "<", + "x": 9.25, + "y": 5 + }, + { + "label": ">", + "x": 10.25, + "y": 5 + }, + { + "label": "?", + "x": 11.25, + "y": 5 + }, + { + "label": "Shift", + "x": 12.25, + "y": 5, + "w": 1.75 + }, + { + "label": "up", + "x": 14.25, + "y": 5.25 + }, + { + "label": "1", + "x": 15.5, + "y": 5 + }, + { + "label": "2", + "x": 16.5, + "y": 5 + }, + { + "label": "3", + "x": 17.5, + "y": 5 + }, + { + "label": "Enter", + "x": 18.5, + "y": 5, + "h": 2 + }, + { + "label": "Ctrl", + "x": 0, + "y": 6, + "w": 1.25 + }, + { + "label": "OS", + "x": 1.25, + "y": 6, + "w": 1.25 + }, + { + "label": "Alt", + "x": 2.5, + "y": 6, + "w": 1.25 + }, + { + "x": 3.75, + "y": 6, + "w": 6.25 + }, + { + "label": "Alt", + "x": 10, + "y": 6, + "w": 1.5 + }, + { + "label": "Ctrl", + "x": 11.5, + "y": 6, + "w": 1.5 + }, + { + "label": "left", + "x": 13.25, + "y": 6.25 + }, + { + "label": "down", + "x": 14.25, + "y": 6.25 + }, + { + "label": "right", + "x": 15.25, + "y": 6.25 + }, + { + "label": "0", + "x": 16.5, + "y": 6 + }, + { + "label": ".", + "x": 17.5, + "y": 6 + } + ] + } + } +} diff --git a/keyboards/ash_xiix/keymaps/default/keymap.c b/keyboards/ash_xiix/keymaps/default/keymap.c new file mode 100644 index 000000000000..2127dc59020a --- /dev/null +++ b/keyboards/ash_xiix/keymaps/default/keymap.c @@ -0,0 +1,37 @@ +/* Copyright 2020 sh_xguitar + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public 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_PGUP, KC_PSCR, + KC_DEL, KC_END, KC_PGDN, KC_SLCK, + 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_NLCK, KC_PSLS, KC_PAST, MO(1), + KC_TAB, KC_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_ENT, KC_P4, KC_P5, KC_P6, KC_PPLS, + 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_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RCTL, KC_LEFT, KC_DOWN, KC_RIGHT, KC_P0, KC_PDOT + ), + [1] = LAYOUT_all ( + RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, KC_MUTE, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_CALC, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_VOLU, _______, _______, _______, _______, + _______, _______, _______, KC_MPLY, _______, _______, KC_MPRV, KC_VOLD, KC_MNXT, _______, _______ + ), +}; diff --git a/keyboards/ash_xiix/readme.md b/keyboards/ash_xiix/readme.md new file mode 100644 index 000000000000..1fbecfaac8a9 --- /dev/null +++ b/keyboards/ash_xiix/readme.md @@ -0,0 +1,15 @@ +# ASH-XIIX + +![ASH-XIIX](https://i.imgur.com/KJk9dDol.jpg) + +In mission to fill my Cherry 1800 case. So I continue developing 1800 PCB (ASH-1800) to fit G80-1800 case. It has some update to make ASH-XIIX more user friendly. + +* Keyboard Maintainer: [sh_xguitar](https://github.com/sh-xguitar) +* Keyboard Specification: ATmega32u4, 5P TH MINI USB, JST-PH 5P, Larger ISP Header. +* Hardware Availability: Sold in Indonesia only + +Make example for this keyboard (after setting up your build environment): + + make ash_xiix: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/ash_xiix/rules.mk b/keyboards/ash_xiix/rules.mk new file mode 100644 index 000000000000..32981133b2eb --- /dev/null +++ b/keyboards/ash_xiix/rules.mk @@ -0,0 +1,22 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +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 = no # Enable keyboard RGB underglow +BLUETOOTH_ENABLE = no # Enable Bluetooth +AUDIO_ENABLE = no # Audio output From b8438c74e32f503a4af8fd242c1962f149ea8fbf Mon Sep 17 00:00:00 2001 From: NightlyBoards <65656486+NightlyBoards@users.noreply.github.com> Date: Thu, 6 Aug 2020 16:05:06 +0800 Subject: [PATCH 519/930] [Keymap] Add via keymap folder for N2 keyboard (#9886) * Create Alter folder * Revert "Create Alter folder" This reverts commit 361103b821dbb22957b66cdedb0d11f996def71c. * Add via keymap folder for n2 keyboard --- .../nightly_boards/n2/keymaps/via/keymap.c | 35 +++++++++++++++++++ .../nightly_boards/n2/keymaps/via/rules.mk | 2 ++ 2 files changed, 37 insertions(+) create mode 100644 keyboards/nightly_boards/n2/keymaps/via/keymap.c create mode 100644 keyboards/nightly_boards/n2/keymaps/via/rules.mk diff --git a/keyboards/nightly_boards/n2/keymaps/via/keymap.c b/keyboards/nightly_boards/n2/keymaps/via/keymap.c new file mode 100644 index 000000000000..1736404d0ace --- /dev/null +++ b/keyboards/nightly_boards/n2/keymaps/via/keymap.c @@ -0,0 +1,35 @@ +/* Copyright 2020 Neil Brian Ramirez + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public 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_L, + KC_O + ), + [1] = LAYOUT( + KC_TRNS, + KC_TRNS + ), + [2] = LAYOUT( + KC_TRNS, + KC_TRNS + ), + [3] = LAYOUT( + KC_TRNS, + KC_TRNS + ) +}; diff --git a/keyboards/nightly_boards/n2/keymaps/via/rules.mk b/keyboards/nightly_boards/n2/keymaps/via/rules.mk new file mode 100644 index 000000000000..43061db1dd46 --- /dev/null +++ b/keyboards/nightly_boards/n2/keymaps/via/rules.mk @@ -0,0 +1,2 @@ +VIA_ENABLE = yes +LTO_ENABLE = yes \ No newline at end of file From 7222df36e7753a1db6e9bbe263377cd8b631b702 Mon Sep 17 00:00:00 2001 From: Brandon <33381875+brandon-ha@users.noreply.github.com> Date: Thu, 6 Aug 2020 01:10:52 -0700 Subject: [PATCH 520/930] Added VIA keymap for bm60rgb (#9897) --- keyboards/bm60rgb/config.h | 2 +- keyboards/bm60rgb/keymaps/via/keymap.c | 47 +++++++++++++++++++++++++ keyboards/bm60rgb/keymaps/via/readme.md | 1 + keyboards/bm60rgb/keymaps/via/rules.mk | 1 + 4 files changed, 50 insertions(+), 1 deletion(-) create mode 100644 keyboards/bm60rgb/keymaps/via/keymap.c create mode 100644 keyboards/bm60rgb/keymaps/via/readme.md create mode 100644 keyboards/bm60rgb/keymaps/via/rules.mk diff --git a/keyboards/bm60rgb/config.h b/keyboards/bm60rgb/config.h index fc550b21b350..816f356e8b95 100644 --- a/keyboards/bm60rgb/config.h +++ b/keyboards/bm60rgb/config.h @@ -20,7 +20,7 @@ along with this program. If not, see . #include "config_common.h" /* USB Device descriptor parameter */ -#define VENDOR_ID 0xFEED +#define VENDOR_ID 0x4B50 // "KP" #define PRODUCT_ID 0xEF8C #define DEVICE_VER 0x0001 #define MANUFACTURER KP Republic diff --git a/keyboards/bm60rgb/keymaps/via/keymap.c b/keyboards/bm60rgb/keymaps/via/keymap.c new file mode 100644 index 000000000000..d84aaf5256d0 --- /dev/null +++ b/keyboards/bm60rgb/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( + 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, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + [2] = LAYOUT( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + [3] = LAYOUT( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______ + ) +}; diff --git a/keyboards/bm60rgb/keymaps/via/readme.md b/keyboards/bm60rgb/keymaps/via/readme.md new file mode 100644 index 000000000000..9335f2cab0e4 --- /dev/null +++ b/keyboards/bm60rgb/keymaps/via/readme.md @@ -0,0 +1 @@ +# The VIA default keymap for bm60rgb diff --git a/keyboards/bm60rgb/keymaps/via/rules.mk b/keyboards/bm60rgb/keymaps/via/rules.mk new file mode 100644 index 000000000000..036bd6d1c3ec --- /dev/null +++ b/keyboards/bm60rgb/keymaps/via/rules.mk @@ -0,0 +1 @@ +VIA_ENABLE = yes \ No newline at end of file From 0d04d95326e3b4c0ed2e25e16a41434ef086819e Mon Sep 17 00:00:00 2001 From: russellsherman Date: Thu, 6 Aug 2020 10:16:34 -0700 Subject: [PATCH 521/930] [Keymap] Adds OSX layout with additional media keys (#9894) --- .../discipline/keymaps/osx/keymap.c | 37 +++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 keyboards/coseyfannitutti/discipline/keymaps/osx/keymap.c diff --git a/keyboards/coseyfannitutti/discipline/keymaps/osx/keymap.c b/keyboards/coseyfannitutti/discipline/keymaps/osx/keymap.c new file mode 100644 index 000000000000..d224ca0e9d56 --- /dev/null +++ b/keyboards/coseyfannitutti/discipline/keymaps/osx/keymap.c @@ -0,0 +1,37 @@ +/* Copyright 2019 COSEYFANNITUTTI + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public 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( + 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, + 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(1), KC_RALT, KC_RCTL, KC_LEFT, KC_DOWN, KC_RIGHT), + + [1] = LAYOUT_65_ansi( + /* esc 1 2 3 4 5 6 7 8 9 0 - = bkspc `~ */ + 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_PSCR, + /* tab Q W E R T Y U I O P [ ] \ delete*/ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RESET, KC_TRNS,KC_TRNS,KC_TRNS,KC_INS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PAUS, KC_TRNS, KC_TRNS, + /* caps A S D F G H J K L ; ' enter pg 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_MPLY, KC_HOME, + /* shift Z X C V B N M , . / shift up pg dn*/ + KC_LSFT, KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_MUTE, KC_TRNS, KC_TRNS, KC_TRNS, KC_MUTE, KC_VOLU, KC_END, + /* ctrl alt cmd space fn alt ctrl left down right*/ + KC_LCTL, KC_LALT, KC_LGUI, KC_TRNS, KC_TRNS, KC_RALT, KC_RCTL, KC_MPRV, KC_VOLD, KC_MNXT) +}; From 60d8d8677aa596120e4f3f0926b93b4d5cc0201a Mon Sep 17 00:00:00 2001 From: sotoba Date: Fri, 7 Aug 2020 02:18:16 +0900 Subject: [PATCH 522/930] Update default layout for craftwalk (#9888) * fix cratfwalk default layout --- keyboards/craftwalk/keymaps/default/keymap.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/keyboards/craftwalk/keymaps/default/keymap.c b/keyboards/craftwalk/keymaps/default/keymap.c index 9acd46d9be2f..40c951447566 100644 --- a/keyboards/craftwalk/keymaps/default/keymap.c +++ b/keyboards/craftwalk/keymaps/default/keymap.c @@ -34,9 +34,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), /* Number */ [_NUM] = LAYOUT( - KC_1, KC_2, KC_3, - KC_TRNS, KC_4, KC_5, KC_6, - KC_TRNS, KC_7, KC_8, KC_9, KC_F3, KC_TRNS, KC_TRNS + KC_7, KC_8, KC_9, + KC_ESC, KC_4, KC_5, KC_6, + KC_TRNS, KC_1, KC_2, KC_3, KC_F3, KC_TRNS, KC_TRNS ), /* Adjust */ [_ADJUST] = LAYOUT( From c8b721d7c6cf683473bcf3d0af6ec561471b1dcc Mon Sep 17 00:00:00 2001 From: Danilo de Klerk Date: Thu, 6 Aug 2020 19:36:26 +0200 Subject: [PATCH 523/930] split_3x5_3 layout support (#9624) * Add split_3x5_3 support to Minidox * Add split_3x5_3 support to Miniaxe * Add LAYOUT_mini to Centromere This layout macro removes the need or KC_NO keycodes in the keymap. * Add split_3x5_3 support to Centromere * Add split_3x5_3 support to suihankey split * Add LAYOUT_mini to centromere/info.json * Add LAYOUT_mini to crkbd * Add split_3x5_3 support to crkbd * Change mini layout names * Rename main layouts for split_3x6_3 keyboards * Use split_3x5_3 macro for remaining keyboards * Update relevant info.json files * Fix suihankey/split/alpha macro * Add layout aliases for suihankey --- keyboards/centromere/centromere.h | 32 +++++++++--- keyboards/centromere/info.json | 42 +++++++++++++++- keyboards/centromere/keymaps/default/keymap.c | 6 +-- .../centromere/keymaps/default_u2/keymap.c | 6 +-- keyboards/centromere/keymaps/mini/keymap.c | 32 ++++++------ keyboards/centromere/rules.mk | 2 +- keyboards/crkbd/info.json | 49 ++++++++++++++++++- keyboards/crkbd/keymaps/default/keymap.c | 8 +-- keyboards/crkbd/rev1/rev1.h | 21 +++++++- keyboards/crkbd/rev1/rules.mk | 2 +- keyboards/miniaxe/info.json | 2 +- keyboards/miniaxe/keymaps/default/keymap.c | 8 +-- keyboards/miniaxe/miniaxe.h | 4 +- keyboards/miniaxe/rules.mk | 2 + keyboards/minidox/keymaps/default/keymap.c | 8 +-- keyboards/minidox/rev1/info.json | 2 +- keyboards/minidox/rev1/rev1.h | 4 +- keyboards/minidox/rev1/rules.mk | 2 + keyboards/suihankey/split/alpha/alpha.h | 3 +- keyboards/suihankey/split/info.json | 2 +- .../suihankey/split/keymaps/default/keymap.c | 8 +-- keyboards/suihankey/split/rev1/rev1.h | 4 +- keyboards/suihankey/split/rev1/rules.mk | 1 + 23 files changed, 191 insertions(+), 59 deletions(-) diff --git a/keyboards/centromere/centromere.h b/keyboards/centromere/centromere.h index d07a53b1ac03..bf13aa7b00d7 100644 --- a/keyboards/centromere/centromere.h +++ b/keyboards/centromere/centromere.h @@ -28,22 +28,38 @@ #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 +// For readability +#define ___ KC_NO // 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( \ +#define LAYOUT_split_3x6_3( \ 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 } \ + { \ + { 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 }, \ + { ___, ___, k32, k33, k34, k35, k36, k37, ___, ___ }, \ + { ___, ___, k2a, k1a, k0a, k0b, k1b, k2b, ___, ___ } \ } -#define LAYOUT_split_3x6_3 LAYOUT +#define LAYOUT_split_3x5_3( \ + 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,\ + 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 }, \ + { ___, ___, k32, k33, k34, k35, k36, k37, ___, ___ }, \ + { ___, ___, ___, ___, ___, ___, ___, ___, ___, ___ } \ + } + +#define LAYOUT LAYOUT_split_3x6_3 diff --git a/keyboards/centromere/info.json b/keyboards/centromere/info.json index aa9bcdce103e..8fb421313012 100644 --- a/keyboards/centromere/info.json +++ b/keyboards/centromere/info.json @@ -5,7 +5,7 @@ "width": 14, "height": 4, "layouts": { - "LAYOUT": { + "LAYOUT_split_3x6_3": { "layout": [ {"label":"Tab", "x":0, "y":0.25}, {"label":"Q", "x":1, "y":0.25}, @@ -50,6 +50,46 @@ {"label":"MO(_NUM)", "x":8.5, "y":3.25}, {"label":"RAlt", "x":9.5, "y":3.125} ] + }, + "LAYOUT_split_3x5_3": { + "layout": [ + {"label":"Q", "x":0, "y":0.25}, + {"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":7, "y":0.25}, + {"label":"U", "x":8, "y":0.125}, + {"label":"I", "x":9, "y":0}, + {"label":"O", "x":10, "y":0.125}, + {"label":"P", "x":11, "y":0.25}, + {"label":"A", "x":0, "y":1.25}, + {"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":7, "y":1.25}, + {"label":"J", "x":8, "y":1.125}, + {"label":"K", "x":9, "y":1}, + {"label":"L", "x":10, "y":1.125}, + {"label":";", "x":11, "y":1.25}, + {"label":"Z", "x":0, "y":2.25}, + {"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":7, "y":2.25}, + {"label":"M", "x":8, "y":2.125}, + {"label":",", "x":9, "y":2}, + {"label":".", "x":10, "y":2.125}, + {"label":"/", "x":11, "y":2.25}, + {"label":"LGUI", "x":2.5, "y":3.125}, + {"label":"MO(_FN)", "x":3.5, "y":3.25}, + {"label":"Space", "x":4.5, "y":3.375}, + {"label":"Space", "x":6.5, "y":3.375}, + {"label":"MO(_NUM)", "x":7.5, "y":3.25}, + {"label":"RAlt", "x":8.5, "y":3.125} + ] } } } diff --git a/keyboards/centromere/keymaps/default/keymap.c b/keyboards/centromere/keymaps/default/keymap.c index ca235f61f5a9..6c830ec2c5bf 100644 --- a/keyboards/centromere/keymaps/default/keymap.c +++ b/keyboards/centromere/keymaps/default/keymap.c @@ -10,7 +10,7 @@ enum centromere_layers const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [_STD] = LAYOUT( \ + [_STD] = LAYOUT_split_3x6_3( \ //,-----------------------------------------------------. ,-----------------------------------------------------. KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC,\ //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| @@ -24,7 +24,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), - [_NUM] = LAYOUT( \ + [_NUM] = LAYOUT_split_3x6_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,\ //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| @@ -36,7 +36,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { //`--------------------------' `--------------------------' ), - [_FN] = LAYOUT( \ + [_FN] = LAYOUT_split_3x6_3( \ //,-----------------------------------------------------. ,-----------------------------------------------------. KC_ESC, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSPC,\ //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| diff --git a/keyboards/centromere/keymaps/default_u2/keymap.c b/keyboards/centromere/keymaps/default_u2/keymap.c index c704adc58cd6..3a3707a47b8a 100644 --- a/keyboards/centromere/keymaps/default_u2/keymap.c +++ b/keyboards/centromere/keymaps/default_u2/keymap.c @@ -9,7 +9,7 @@ enum centromere_layers const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [_STD] = LAYOUT( \ + [_STD] = LAYOUT_split_3x6_3( \ //,-----------------------------------------------------. ,-----------------------------------------------------. KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC,\ //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| @@ -23,7 +23,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), - [_NUM] = LAYOUT( \ + [_NUM] = LAYOUT_split_3x6_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,\ //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| @@ -35,7 +35,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { //`--------------------------' `--------------------------' ), - [_FN] = LAYOUT( \ + [_FN] = LAYOUT_split_3x6_3( \ //,-----------------------------------------------------. ,-----------------------------------------------------. KC_ESC, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSPC,\ //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| diff --git a/keyboards/centromere/keymaps/mini/keymap.c b/keyboards/centromere/keymaps/mini/keymap.c index 3d6de56f221d..4241e28a3d13 100644 --- a/keyboards/centromere/keymaps/mini/keymap.c +++ b/keyboards/centromere/keymaps/mini/keymap.c @@ -38,10 +38,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | * `------' `------' */ -[_QWERTY] = LAYOUT( - KC_NO, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_NO, - KC_NO, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_NO, - KC_NO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_NO, +[_QWERTY] = LAYOUT_split_3x5_3( + 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_LCTL, LOWER, KC_SPC, KC_BSPC, RAISE, OSM(MOD_LSFT) ), @@ -60,10 +60,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | * `------' `------' */ -[_RAISE] = LAYOUT( - KC_NO, 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_TAB, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, _______, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_NO, - KC_NO, KC_LCTL, KC_GRV, KC_LGUI, KC_LALT, _______, _______, _______, _______, KC_BSLS, KC_QUOT, KC_NO, +[_RAISE] = LAYOUT_split_3x5_3( + KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, + KC_TAB, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, _______, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, + KC_LCTL, KC_GRV, KC_LGUI, KC_LALT, _______, _______, _______, _______, KC_BSLS, KC_QUOT, _______, _______, _______, _______, _______, _______ ), @@ -82,10 +82,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | * `------' `------' */ -[_LOWER] = LAYOUT( - KC_NO, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_NO, - KC_NO, KC_ESC, _______, _______, _______, _______, _______, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_NO, - KC_NO, KC_CAPS, KC_TILD, _______, _______, _______, _______, _______, _______, KC_PIPE, KC_DQT, KC_NO, +[_LOWER] = LAYOUT_split_3x5_3( + KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, + KC_ESC, _______, _______, _______, _______, _______, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, + KC_CAPS, KC_TILD, _______, _______, _______, _______, _______, _______, KC_PIPE, KC_DQT, _______, _______, _______, KC_ENT, _______, KC_DEL ), @@ -104,10 +104,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | * `------' `------' */ -[_ADJUST] = LAYOUT( - KC_NO, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_NO, - KC_NO, KC_F11, KC_F12, _______, _______, _______, _______, _______, _______, TSKMGR, CALTDEL, KC_NO, - KC_NO, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_NO, +[_ADJUST] = LAYOUT_split_3x5_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, _______, _______, _______, _______, _______, _______, TSKMGR, CALTDEL, + RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ ) }; diff --git a/keyboards/centromere/rules.mk b/keyboards/centromere/rules.mk index 866c33138c95..f08f6e6ebd40 100644 --- a/keyboards/centromere/rules.mk +++ b/keyboards/centromere/rules.mk @@ -41,4 +41,4 @@ OPT_DEFS += -DCENTROMERE_PROMICRO # # project specific files SRC = matrix.c -LAYOUTS = split_3x6_3 +LAYOUTS = split_3x5_3 split_3x6_3 diff --git a/keyboards/crkbd/info.json b/keyboards/crkbd/info.json index d7f6309043bf..34b3e95b9423 100644 --- a/keyboards/crkbd/info.json +++ b/keyboards/crkbd/info.json @@ -5,7 +5,7 @@ "width": 15, "height": 4.7, "layouts": { - "LAYOUT": { + "LAYOUT_split_3x6_3": { "layout": [ {"label":"Esc", "x":0, "y":0.3}, {"label":"Q", "x":1, "y":0.3}, @@ -57,6 +57,53 @@ {"label":"Raise", "x":9, "y":3.7}, {"label":"Alt / KC_HAEN", "x":10, "y":3.7} ] + }, + "LAYOUT_split_3x5_3": { + "layout": [ + {"label":"Q", "x":0, "y":0.3}, + {"label":"W", "x":1, "y":0.1}, + {"label":"E", "x":2, "y":0}, + {"label":"R", "x":3, "y":0.1}, + {"label":"T", "x":4, "y":0.2}, + + {"label":"Y", "x":8, "y":0.2}, + {"label":"U", "x":9, "y":0.1}, + {"label":"I", "x":10, "y":0}, + {"label":"O", "x":11, "y":0.1}, + {"label":"P", "x":12, "y":0.3}, + + {"label":"A", "x":0, "y":1.3}, + {"label":"S", "x":1, "y":1.1}, + {"label":"D", "x":2, "y":1}, + {"label":"F", "x":3, "y":1.1}, + {"label":"G", "x":4, "y":1.2}, + + {"label":"H", "x":8, "y":1.2}, + {"label":"J", "x":9, "y":1.1}, + {"label":"K", "x":10, "y":1}, + {"label":"L", "x":11, "y":1.1}, + {"label":";", "x":12, "y":1.3}, + + {"label":"Z", "x":0, "y":2.3}, + {"label":"X", "x":1, "y":2.1}, + {"label":"C", "x":2, "y":2}, + {"label":"V", "x":3, "y":2.1}, + {"label":"B", "x":4, "y":2.2}, + + {"label":"N", "x":8, "y":2.2}, + {"label":"M", "x":9, "y":2.1}, + {"label":",", "x":10, "y":2}, + {"label":".", "x":11, "y":2.1}, + {"label":"/", "x":12, "y":2.3}, + + {"label":"GUI / KC_HANJ", "x":3, "y":3.7}, + {"label":"Lower", "x":4, "y":3.7}, + {"label":"Space", "x":5, "y":3.2, "h":1.5}, + + {"label":"Enter", "x":7, "y":3.2, "h":1.5}, + {"label":"Raise", "x":8, "y":3.7}, + {"label":"Alt / KC_HAEN", "x":9, "y":3.7} + ] } } } diff --git a/keyboards/crkbd/keymaps/default/keymap.c b/keyboards/crkbd/keymaps/default/keymap.c index 446e3281e457..4dd0be899274 100644 --- a/keyboards/crkbd/keymaps/default/keymap.c +++ b/keyboards/crkbd/keymaps/default/keymap.c @@ -31,7 +31,7 @@ enum macro_keycodes { }; const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [_QWERTY] = LAYOUT( \ + [_QWERTY] = LAYOUT_split_3x6_3( \ //,-----------------------------------------------------. ,-----------------------------------------------------. KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC,\ //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| @@ -44,7 +44,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), - [_LOWER] = LAYOUT( \ + [_LOWER] = LAYOUT_split_3x6_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,\ //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| @@ -56,7 +56,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { //`--------------------------' `--------------------------' ), - [_RAISE] = LAYOUT( \ + [_RAISE] = LAYOUT_split_3x6_3( \ //,-----------------------------------------------------. ,-----------------------------------------------------. KC_ESC, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSPC,\ //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| @@ -68,7 +68,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { //`--------------------------' `--------------------------' ), - [_ADJUST] = LAYOUT( \ + [_ADJUST] = LAYOUT_split_3x6_3( \ //,-----------------------------------------------------. ,-----------------------------------------------------. RESET, RGBRST, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,\ //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| diff --git a/keyboards/crkbd/rev1/rev1.h b/keyboards/crkbd/rev1/rev1.h index 6580d73fe31c..2244b87f177b 100644 --- a/keyboards/crkbd/rev1/rev1.h +++ b/keyboards/crkbd/rev1/rev1.h @@ -22,7 +22,7 @@ #endif // clang-format off -#define LAYOUT( \ +#define LAYOUT_split_3x6_3( \ 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, \ @@ -39,6 +39,23 @@ { KC_NO, KC_NO, KC_NO, R32, R31, R30 } \ } +#define LAYOUT_split_3x5_3( \ + L00, L01, L02, L03, L04, R00, R01, R02, R03, R04, \ + L10, L11, L12, L13, L14, R10, R11, R12, R13, R14, \ + L20, L21, L22, L23, L24, R20, R21, R22, R23, R24, \ + L30, L31, L32, R30, R31, R32 \ + ) \ + { \ + { KC_NO, L00, L01, L02, L03, L04 }, \ + { KC_NO, L10, L11, L12, L13, L14 }, \ + { KC_NO, L20, L21, L22, L23, L24 }, \ + { KC_NO, KC_NO, KC_NO, L30, L31, L32 }, \ + { KC_NO, R04, R03, R02, R01, R00 }, \ + { KC_NO, R14, R13, R12, R11, R10 }, \ + { KC_NO, R24, R23, R22, R21, R20 }, \ + { KC_NO, KC_NO, KC_NO, R32, R31, R30 } \ + } + #define LAYOUT_kc( \ L00, L01, L02, L03, L04, L05, R00, R01, R02, R03, R04, R05, \ L10, L11, L12, L13, L14, L15, R10, R11, R12, R13, R14, R15, \ @@ -53,4 +70,4 @@ ) // clang-format on -#define LAYOUT_split_3x6_3 LAYOUT +#define LAYOUT LAYOUT_split_3x6_3 diff --git a/keyboards/crkbd/rev1/rules.mk b/keyboards/crkbd/rev1/rules.mk index a921e60308b0..21cee6bcf719 100644 --- a/keyboards/crkbd/rev1/rules.mk +++ b/keyboards/crkbd/rev1/rules.mk @@ -2,4 +2,4 @@ SRC += matrix.c \ split_util.c \ split_scomm.c -LAYOUTS = split_3x6_3 +LAYOUTS = split_3x5_3 split_3x6_3 diff --git a/keyboards/miniaxe/info.json b/keyboards/miniaxe/info.json index 5fee787b55ae..7461a548d98e 100644 --- a/keyboards/miniaxe/info.json +++ b/keyboards/miniaxe/info.json @@ -5,7 +5,7 @@ "width": 11, "height": 4, "layouts": { - "LAYOUT": { + "LAYOUT_split_3x5_3": { "layout": [{"label":"Q", "x":0, "y":0}, {"label":"W", "x":1, "y":0}, {"label":"E", "x":2, "y":0}, {"label":"R", "x":3, "y":0}, {"label":"T", "x":4, "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":0, "y":1}, {"label":"S", "x":1, "y":1}, {"label":"D", "x":2, "y":1}, {"label":"F", "x":3, "y":1}, {"label":"G", "x":4, "y":1}, {"label":"J", "x":6, "y":1}, {"label":"J", "x":7, "y":1}, {"label":"K", "x":8, "y":1}, {"label":"L", "x":9, "y":1}, {"label":";", "x":10, "y":1}, {"label":"Z", "x":0, "y":2}, {"label":"X", "x":1, "y":2}, {"label":"C", "x":2, "y":2}, {"label":"V", "x":3, "y":2}, {"label":"B", "x":4, "y":2}, {"label":"N", "x":6, "y":2}, {"label":"M", "x":7, "y":2}, {"label":",", "x":8, "y":2}, {"label":".", "x":9, "y":2}, {"label":"/", "x":10, "y":2}, {"label":"Cmd", "x":2, "y":3}, {"label":"⇓", "x":3, "y":3}, {"label":"Ctrl", "x":4, "y":3}, {"x":6, "y":3}, {"label":"⇑", "x":7, "y":3}, {"label":"Opt", "x":8, "y":3}] } } diff --git a/keyboards/miniaxe/keymaps/default/keymap.c b/keyboards/miniaxe/keymaps/default/keymap.c index 4b405e202948..fb8f6ca9710d 100644 --- a/keyboards/miniaxe/keymaps/default/keymap.c +++ b/keyboards/miniaxe/keymaps/default/keymap.c @@ -42,7 +42,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | GUI | LOWER|Ctrl/Esc| |Spc/Sft| RAISE|Alt/BkSp | * `--------------------' `--------------------' */ -[_QWERTY] = LAYOUT( \ +[_QWERTY] = LAYOUT_split_3x5_3( \ 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, \ @@ -61,7 +61,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | LOWER| | | Esc | RAISE| | * `--------------------' `--------------------' */ -[_RAISE] = LAYOUT( \ +[_RAISE] = LAYOUT_split_3x5_3( \ KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, \ KC_TAB, KC_UNDS, KC_PLUS, KC_PIPE, KC_TILD, KC_COLN, KC_DQUO, KC_GT, KC_LCBR, KC_RCBR, \ KC_CAPS, KC_MINS, KC_EQL, KC_BSLS, KC_GRV, KC_SCLN, KC_QUOT, KC_LT, KC_LBRC, KC_RBRC, \ @@ -80,7 +80,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | LOWER| | | | RAISE| | * `--------------------' `--------------------' */ -[_LOWER] = LAYOUT( \ +[_LOWER] = LAYOUT_split_3x5_3( \ KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, \ KC_TAB, _______, _______, _______, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_ENT, \ KC_LCTL, KC_GRV, KC_LGUI, KC_LALT, KC_DEL, KC_BSPC, KC_PGUP, KC_PGDN, KC_BSLS, KC_QUOT, \ @@ -100,7 +100,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | LOWER| | | | RAISE| | * `--------------------' `--------------------' */ -[_ADJUST] = LAYOUT( \ +[_ADJUST] = LAYOUT_split_3x5_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, _______, _______, _______, _______, _______, _______, _______, _______, \ RESET, _______, _______, _______, _______, KC_MPRV, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY, \ diff --git a/keyboards/miniaxe/miniaxe.h b/keyboards/miniaxe/miniaxe.h index a0130ad28008..b6a605112398 100644 --- a/keyboards/miniaxe/miniaxe.h +++ b/keyboards/miniaxe/miniaxe.h @@ -30,7 +30,7 @@ // readability #define ___ KC_NO -#define LAYOUT( \ +#define LAYOUT_split_3x5_3( \ L01, L02, L03, L04, L05, R01, R02, R03, R04, R05, \ L06, L07, L08, L09, L10, R06, R07, R08, R09, R10, \ L11, L12, L13, L14, L15, R11, R12, R13, R14, R15, \ @@ -48,3 +48,5 @@ } #endif + +#define LAYOUT LAYOUT_split_3x5_3 diff --git a/keyboards/miniaxe/rules.mk b/keyboards/miniaxe/rules.mk index cf5efab09a7e..7c5ef7d20cee 100644 --- a/keyboards/miniaxe/rules.mk +++ b/keyboards/miniaxe/rules.mk @@ -35,3 +35,5 @@ HD44780_ENABLE = no # Enable support for HD44780 based LCDs DEBUG_ENABLE = no CUSTOM_MATRIX = no # Use custom matrix code SPLIT_KEYBOARD = yes # Use shared split_common code + +LAYOUTS = split_3x5_3 diff --git a/keyboards/minidox/keymaps/default/keymap.c b/keyboards/minidox/keymaps/default/keymap.c index 03731082c9a1..d1e13c28d1d0 100644 --- a/keyboards/minidox/keymaps/default/keymap.c +++ b/keyboards/minidox/keymaps/default/keymap.c @@ -38,7 +38,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | * `------' `------' */ -[_QWERTY] = LAYOUT( \ +[_QWERTY] = LAYOUT_split_3x5_3( \ 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, \ @@ -60,7 +60,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | * `------' `------' */ -[_RAISE] = LAYOUT( \ +[_RAISE] = LAYOUT_split_3x5_3( \ KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, \ KC_TAB, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, _______, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, \ KC_LCTL, KC_GRV, KC_LGUI, KC_LALT, _______, _______, _______, _______, KC_BSLS, KC_QUOT, \ @@ -82,7 +82,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | * `------' `------' */ -[_LOWER] = LAYOUT( \ +[_LOWER] = LAYOUT_split_3x5_3( \ KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, \ KC_ESC, _______, _______, _______, _______, _______, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, \ KC_CAPS, KC_TILD, _______, _______, _______, _______, _______, _______, KC_PIPE, KC_DQT, \ @@ -104,7 +104,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | * `------' `------' */ -[_ADJUST] = LAYOUT( \ +[_ADJUST] = LAYOUT_split_3x5_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, _______, _______, _______, _______, _______, _______, TSKMGR, CALTDEL, \ RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ diff --git a/keyboards/minidox/rev1/info.json b/keyboards/minidox/rev1/info.json index c86e9a0d745c..438dae5e5209 100644 --- a/keyboards/minidox/rev1/info.json +++ b/keyboards/minidox/rev1/info.json @@ -5,7 +5,7 @@ "width": 12, "height": 5.75, "layouts": { - "LAYOUT": { + "LAYOUT_split_3x5_3": { "key_count": 36, "layout": [{"x":0, "y":0.375}, {"x":1, "y":0.125}, {"x":2, "y":0}, {"x":3, "y":0.125}, {"x":4, "y":0.25}, {"x":7, "y":0.25}, {"x":8, "y":0.125}, {"x":9, "y":0}, {"x":10, "y":0.125}, {"x":11, "y":0.375}, {"x":0, "y":1.375}, {"x":1, "y":1.125}, {"x":2, "y":1}, {"x":3, "y":1.125}, {"x":4, "y":1.25}, {"x":7, "y":1.25}, {"x":8, "y":1.125}, {"x":9, "y":1}, {"x":10, "y":1.125}, {"x":11, "y":1.375}, {"x":0, "y":2.375}, {"x":1, "y":2.125}, {"x":2, "y":2}, {"x":3, "y":2.125}, {"x":4, "y":2.25}, {"x":7, "y":2.25}, {"x":8, "y":2.125}, {"x":9, "y":2}, {"x":10, "y":2.125}, {"x":11, "y":2.375}, {"x":2.5, "y":4.75}, {"x":3.5, "y":4.75}, {"x":4.5, "y":3.75, "h":2}, {"x":6.5, "y":3.75, "h":2}, {"x":7.5, "y":4.75}, {"x":8.5, "y":4.75}] } diff --git a/keyboards/minidox/rev1/rev1.h b/keyboards/minidox/rev1/rev1.h index bfa0e5fcc0e3..bb8bd646661b 100644 --- a/keyboards/minidox/rev1/rev1.h +++ b/keyboards/minidox/rev1/rev1.h @@ -5,7 +5,7 @@ // readability #define ___ KC_NO -#define LAYOUT( \ +#define LAYOUT_split_3x5_3( \ k01, k02, k03, k04, k05, k45, k44, k43, k42, k41, \ k11, k12, k13, k14, k15, k55, k54, k53, k52, k51, \ k21, k22, k23, k24, k25, k65, k64, k63, k62, k61, \ @@ -21,3 +21,5 @@ { k61, k62, k63, k64, k65 }, \ { ___, ___, k73, k74, k75 } \ } + +#define LAYOUT LAYOUT_split_3x5_3 diff --git a/keyboards/minidox/rev1/rules.mk b/keyboards/minidox/rev1/rules.mk index 7b30c0beff2a..8ec0de6f7f16 100644 --- a/keyboards/minidox/rev1/rules.mk +++ b/keyboards/minidox/rev1/rules.mk @@ -1 +1,3 @@ BACKLIGHT_ENABLE = no + +LAYOUTS = split_3x5_3 diff --git a/keyboards/suihankey/split/alpha/alpha.h b/keyboards/suihankey/split/alpha/alpha.h index f14639806ea9..ba93405ecc83 100644 --- a/keyboards/suihankey/split/alpha/alpha.h +++ b/keyboards/suihankey/split/alpha/alpha.h @@ -25,7 +25,7 @@ * The second converts the arguments into a two-dimensional array which * represents the switch matrix. */ -#define LAYOUT( \ +#define LAYOUT_split_3x5_3( \ 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, \ @@ -42,3 +42,4 @@ { R30, R31, R32 }, \ } +#define LAYOUT LAYOUT_split_3x5_3 diff --git a/keyboards/suihankey/split/info.json b/keyboards/suihankey/split/info.json index f50012dd12dd..e95f2bd9cece 100644 --- a/keyboards/suihankey/split/info.json +++ b/keyboards/suihankey/split/info.json @@ -5,7 +5,7 @@ "width": 13.2, "height": 4.85, "layouts": { - "LAYOUT": { + "LAYOUT_split_3x5_3": { "layout": [ {"x": 0, "y": 0.375}, {"x": 1, "y": 0.125}, diff --git a/keyboards/suihankey/split/keymaps/default/keymap.c b/keyboards/suihankey/split/keymaps/default/keymap.c index 9b8448ac2779..e844db9ed571 100644 --- a/keyboards/suihankey/split/keymaps/default/keymap.c +++ b/keyboards/suihankey/split/keymaps/default/keymap.c @@ -29,25 +29,25 @@ enum layers{ #define KC_SET_CTRL LT(SETTING,KC_LCTRL) const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [BASE] = LAYOUT( /* Base */ + [BASE] = LAYOUT_split_3x5_3( /* Base */ 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_COMMA, KC_DOT, KC_SLASH, KC_SET_CTRL, KC_NUM_ALT, KC_CMD_SP, KC_CMD_ET, KC_BSPC, KC_LSFT ), - [COMMAND] = LAYOUT( /* Base */ + [COMMAND] = LAYOUT_split_3x5_3( /* Base */ 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, LCTL(KC_Z), LCTL(KC_X), LCTL(KC_C), LCTL(KC_V), LCTL(KC_B), KC_N, KC_M, KC_COMMA, KC_DOT, KC_SLASH, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO ), - [NUMBER] = LAYOUT( /* Base */ + [NUMBER] = LAYOUT_split_3x5_3( /* Base */ KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_P7, KC_P8, KC_P9, KC_NO, KC_NO, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_P4, KC_P5, KC_P6, KC_NO, KC_NO, KC_F11, KC_F12, KC_NO, KC_NO, KC_NO, KC_P1, KC_P2, KC_P3, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_P0, KC_PDOT, KC_NO ), - [SETTING] = LAYOUT( /* Base */ + [SETTING] = LAYOUT_split_3x5_3( /* Base */ KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, 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, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, diff --git a/keyboards/suihankey/split/rev1/rev1.h b/keyboards/suihankey/split/rev1/rev1.h index bf5468234d02..98618ba71230 100644 --- a/keyboards/suihankey/split/rev1/rev1.h +++ b/keyboards/suihankey/split/rev1/rev1.h @@ -25,7 +25,7 @@ * The second converts the arguments into a two-dimensional array which * represents the switch matrix. */ -#define LAYOUT( \ +#define LAYOUT_split_3x5_3( \ 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, \ @@ -43,3 +43,5 @@ { R03, R13, R23, KC_NO }, \ { R04, R14, R24, KC_NO }, \ } + +#define LAYOUT LAYOUT_split_3x5_3 diff --git a/keyboards/suihankey/split/rev1/rules.mk b/keyboards/suihankey/split/rev1/rules.mk index 1e3cebb14515..d3661099d09a 100644 --- a/keyboards/suihankey/split/rev1/rules.mk +++ b/keyboards/suihankey/split/rev1/rules.mk @@ -1 +1,2 @@ RGBLIGHT_ENABLE = yes +LAYOUTS = split_3x5_3 From d9fe755f7e1f6c0635780071691af0c0a20c4076 Mon Sep 17 00:00:00 2001 From: obosob Date: Thu, 6 Aug 2020 20:08:20 +0100 Subject: [PATCH 524/930] [Keyboard] Add Arch-36 keyboard (#9688) * Add Arch-36 keyboard * Apply suggestions from code review Update based on PR Review comments * Apply suggestions from code review Update to PR comments * Fix Build * Use full rules.mk template for Arch-36 keyboard * Reduce default firmware size * Update based on PR comments * Fix Copyright statement on arch_36:obosob keymap * Apply suggestions from code review --- keyboards/arch_36/arch_36.c | 16 + keyboards/arch_36/arch_36.h | 43 ++ keyboards/arch_36/config.h | 58 ++ keyboards/arch_36/keymaps/default/keymap.c | 309 ++++++++ keyboards/arch_36/keymaps/obosob/config.h | 31 + keyboards/arch_36/keymaps/obosob/keymap.c | 818 +++++++++++++++++++++ keyboards/arch_36/keymaps/obosob/readme.md | 1 + keyboards/arch_36/keymaps/obosob/rules.mk | 3 + keyboards/arch_36/readme.md | 16 + keyboards/arch_36/rules.mk | 26 + 10 files changed, 1321 insertions(+) create mode 100644 keyboards/arch_36/arch_36.c create mode 100644 keyboards/arch_36/arch_36.h create mode 100644 keyboards/arch_36/config.h create mode 100644 keyboards/arch_36/keymaps/default/keymap.c create mode 100644 keyboards/arch_36/keymaps/obosob/config.h create mode 100644 keyboards/arch_36/keymaps/obosob/keymap.c create mode 100644 keyboards/arch_36/keymaps/obosob/readme.md create mode 100644 keyboards/arch_36/keymaps/obosob/rules.mk create mode 100644 keyboards/arch_36/readme.md create mode 100644 keyboards/arch_36/rules.mk diff --git a/keyboards/arch_36/arch_36.c b/keyboards/arch_36/arch_36.c new file mode 100644 index 000000000000..d707e6419577 --- /dev/null +++ b/keyboards/arch_36/arch_36.c @@ -0,0 +1,16 @@ +/* Copyright 2020 Obosob + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#include "arch_36.h" diff --git a/keyboards/arch_36/arch_36.h b/keyboards/arch_36/arch_36.h new file mode 100644 index 000000000000..11c5e2de221c --- /dev/null +++ b/keyboards/arch_36/arch_36.h @@ -0,0 +1,43 @@ +/* Copyright 2020 Obosob + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License 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_split_3x5_3( \ + L00, L01, L02, L03, L04, R05, R06, R07, R08, R09, \ + L10, L11, L12, L13, L14, R15, R16, R17, R18, R19, \ + L20, L21, L22, L23, L24, R25, R26, R27, R28, R29, \ + L32, L33, L34, R35, R36, R37 \ +) \ +{ \ + { L00, L01, L02, L03, L04 }, \ + { L10, L11, L12, L13, L14 }, \ + { L20, L21, L22, L23, L24 }, \ + { KC_NO, KC_NO, L32, L33, L34 }, \ + { R09, R08, R07, R06, R05 }, \ + { R19, R18, R17, R16, R15 }, \ + { R29, R28, R27, R26, R25 }, \ + { KC_NO, KC_NO, R37, R36, R35 }, \ +} diff --git a/keyboards/arch_36/config.h b/keyboards/arch_36/config.h new file mode 100644 index 000000000000..3950c4b9a1f3 --- /dev/null +++ b/keyboards/arch_36/config.h @@ -0,0 +1,58 @@ +/* +Copyright 2020 Obosob + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License 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 0x9CE3 +#define DEVICE_VER 0x0001 +#define MANUFACTURER obosob +#define PRODUCT Arch-36 + +/* key matrix size */ +/* Rows are doubled up */ +#define MATRIX_ROWS 8 +#define MATRIX_COLS 5 + +// wiring +#define MATRIX_ROW_PINS { D7, E6, B4, B5 } +#define MATRIX_COL_PINS { F7, B1, B3, B2, B6 } +#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 + +/* + * 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 + +#ifdef RGBLIGHT_ENABLE +#define RGB_DI_PIN D3 +#define RGBLED_SPLIT { 6, 6 } +#define RGBLED_NUM 12 +#define RGBLIGHT_LED_MAP { 0, 1, 2, 3, 4, 5, \ + 11, 10, 9, 8, 7, 6 } +#endif + +#define EE_HANDS diff --git a/keyboards/arch_36/keymaps/default/keymap.c b/keyboards/arch_36/keymaps/default/keymap.c new file mode 100644 index 000000000000..48412f812ae1 --- /dev/null +++ b/keyboards/arch_36/keymaps/default/keymap.c @@ -0,0 +1,309 @@ +#include QMK_KEYBOARD_H + +// Defines names for use in layer keycodes and the keymap +enum layer_names { + _QWERTY, + _LOWER, + _RAISE, + _ADJUST +}; + +#define LOWER MO(_LOWER) +#define RAISE MO(_RAISE) + +// Defines for task manager and such +#define CALTDEL LCTL(LALT(KC_DEL)) +#define TSKMGR LCTL(LSFT(KC_ESC)) + +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 | , | . | / | + * `----------------------------------' `----------------------------------' + * ,--------------------. ,--------------------. + * | Ctrl | LOWER| Space| |BckSpc| RAISE| Shift| + * `--------------------' `--------------------. + */ +[_QWERTY] = LAYOUT_split_3x5_3( + 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_LCTL, LOWER, KC_SPC, KC_BSPC, RAISE, OSM(MOD_LSFT) +), + +/* Raise + * + * ,----------------------------------. ,----------------------------------. + * | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | + * |------+------+------+------+------| |------+------+------+------+------| + * | Tab | Left | Down | Up | Right| | | - | = | [ | ] | + * |------+------+------+------+------| |------+------+------+------+------| + * | Ctrl| ` | GUI | Alt | | | | | | \ | ' | + * `----------------------------------' `----------------------------------' + * ,--------------------. ,--------------------. + * | | LOWER| | | | RAISE| | + * `--------------------' `--------------------. + */ +[_RAISE] = LAYOUT_split_3x5_3( + KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, + KC_TAB, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, _______, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, + KC_LCTL, KC_GRV, KC_LGUI, KC_LALT, _______, _______, _______, _______, KC_BSLS, KC_QUOT, + _______, _______, _______, _______, _______, _______ +), + +/* Lower + * + * ,----------------------------------. ,----------------------------------. + * | ! | @ | # | $ | % | | ^ | & | * | ( | ) | + * |------+------+------+------+------| |------+------+------+------+------| + * | Esc | | | | | | | _ | + | { | } | + * |------+------+------+------+------| |------+------+------+------+------| + * | Caps| ~ | | | | | | | | | | " | + * `----------------------------------' `----------------------------------' + * ,--------------------. ,--------------------. + * | | LOWER| | | | RAISE| Del | + * `--------------------' `--------------------. + */ +[_LOWER] = LAYOUT_split_3x5_3( + KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, + KC_ESC, _______, _______, _______, _______, _______, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, + KC_CAPS, KC_TILD, _______, _______, _______, _______, _______, _______, KC_PIPE, KC_DQT, + _______, _______, _______, KC_ENT, _______, KC_DEL +), + +/* Adjust (Lower + Raise) + * + * ,----------------------------------. ,----------------------------------. + * | F1 | F2 | F3 | F4 | F5 | | F6 | F7 | F8 | F9 | F10 | + * |------+------+------+------+------| |------+------+------+------+------| + * | F11 | F12 | | | | | | | |Taskmg|caltde| + * |------+------+------+------+------| |------+------+------+------+------| + * | Reset| | | | | | | | | | | + * `----------------------------------' `----------------------------------' + * ,--------------------. ,--------------------. + * | | LOWER| | | | RAISE| | + * `--------------------' `--------------------. + */ +[_ADJUST] = LAYOUT_split_3x5_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, _______, _______, _______, _______, _______, _______, TSKMGR, CALTDEL, + RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______ +) +}; + +layer_state_t layer_state_set_user(layer_state_t state) { + return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST); +} + +uint16_t rgb_edit_timer = 0; +uint16_t last_rgb_char = 0; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch(keycode) { + case RGB_TOG: + case RGB_MOD: + case RGB_HUD: + case RGB_HUI: + case RGB_SAD: + case RGB_SAI: + case RGB_VAI: + case RGB_VAD: + rgb_edit_timer = timer_read(); + last_rgb_char = keycode; + return true; + } + return true; +} + +#ifdef OLED_DRIVER_ENABLE + +oled_rotation_t oled_init_user(oled_rotation_t rotation) { + return OLED_ROTATION_180; +} + +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; + } +} + +#ifdef RGBLIGHT_ENABLE +bool cleared = false; +void render_rgb_state(void) { + if(!rgblight_get_mode()) { + if(!cleared) { + oled_clear(); + cleared = true; + } + return; + } + cleared = false; + uint8_t width = (OLED_DISPLAY_WIDTH/OLED_FONT_WIDTH)-10; + uint8_t hue = (rgblight_get_hue()*width/255), + sat = (rgblight_get_sat()*width/255), + val = (rgblight_get_val()*width/255); + bool changing_hue = timer_elapsed(rgb_edit_timer) < 1000 && (last_rgb_char == RGB_HUI || last_rgb_char == RGB_HUD); + bool changing_sat = timer_elapsed(rgb_edit_timer) < 1000 && (last_rgb_char == RGB_SAI || last_rgb_char == RGB_SAD); + bool changing_val = timer_elapsed(rgb_edit_timer) < 1000 && (last_rgb_char == RGB_VAI || last_rgb_char == RGB_VAD); + + uint8_t i; + + oled_write_ln_P(PSTR(""), false); + + oled_write_P(PSTR("Hue: ["), changing_hue); + for(i = 0; i < width; ++i) { + oled_write_P(i + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#pragma once + +#ifdef OLED_DRIVER_ENABLE + #define OLED_DISPLAY_128X64 +#endif + +#ifdef RGBLIGHT_ENABLE +// #define RGBLIGHT_ANIMATIONS + #define RGBLIGHT_EFFECT_RAINBOW_SWIRL + #define RGBLIGHT_HUE_STEP 8 + #define RGBLIGHT_SAT_STEP 8 + #define RGBLIGHT_VAL_STEP 8 +#endif + +#define PERMISSIVE_HOLD diff --git a/keyboards/arch_36/keymaps/obosob/keymap.c b/keyboards/arch_36/keymaps/obosob/keymap.c new file mode 100644 index 000000000000..a938314ac8a5 --- /dev/null +++ b/keyboards/arch_36/keymaps/obosob/keymap.c @@ -0,0 +1,818 @@ +/* Copyright 2020 Obosob + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public 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 { + _QWERTY, + _COLMAK, + _NUM, + _NAV, + _SYM, + _MISC, + _ADJUST +}; + +#define MY_SPC LT(_NAV, KC_SPC) +#define MY_ENT LT(_NUM, KC_ENT) +#define MY_BSPC SFT_T(KC_BSPC) +#define MY_DEL SFT_T(KC_DEL) +#define MY_ESC CTL_T(KC_ESC) +#define MY_TAB RALT_T(KC_TAB) + +#define KC_NUPI S(KC_NUBS) + +#define OS_SFT OSM(MOD_LSFT) +#define OS_CTL OSM(MOD_LCTL) +#define OS_GUI OSM(MOD_LGUI) +#define OS_ALT OSM(MOD_LALT) + +enum keycodes { + QWERTY = SAFE_RANGE, + COLEMAK, +// layers + SYM, + MISC, +// special keys + ENC_PRS, + DOTSPC, + COMMSPC, + EXLMSPC, + QUESSPC, + DQUOT, + QUOT, + PRN, + BRC, + CBR, + LTGT, + LTGTC, + GRV, + A_TAB, + AS_TAB, + WOKE, +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +// Qwerty ________ ________ +// ________| E |________ ________| I |________ +// | W | | R |________ ________| U | | O | +// ________| |________| | T | | Y | |________| |________ +// | Q |________| D |________| | | |________| K |________| P | +// | | S | | F |________| |________| J | | L | | +// |________| |________| | G | | H | |________| |________| +// | A |________| C |________| | | |________| SYM |________| : | +// | | X | | V |________| |________| M | | MISC | ; | +// |________| |________| | B | | N | |________| |________| +// | Z |________| |________| | | |________| |________| ? | +// | | | Esc |________| |________| Tab | | / | +// |________| | Ctrl | Enter |________ ________| Space | Alt | |________| +// |________| NUM | Del | | BkSp | NAV |________| +// ________| Shift | | Shift |________ +// |________| |________| + + [_QWERTY] = LAYOUT_split_3x5_3( + 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, SYM, MISC, KC_SLSH, + MY_ESC, MY_ENT, MY_DEL, MY_BSPC, MY_SPC, MY_TAB + ), +// Colemak (Mod-DH) ________ ________ +// ________| F |________ ________| U |________ +// | W | | P |________ ________| L | | Y | +// ________| |________| | B | | J | |________| |________ +// | Q |________| S |________| | | |________| E |________| : | +// | | R | | T |________| |________| N | | I | ; | +// |________| |________| | G | | K | |________| |________| +// | A |________| C |________| | | |________| SYM |________| O | +// | | X | | D |________| |________| H | | MISC | | +// |________| |________| | V | | M | |________| |________| +// | Z |________| |________| | | |________| |________| ? | +// | | | Esc |________| |________| Tab | | / | +// |________| | Ctrl | Enter |________ ________| Space | Alt | |________| +// |________| NUM | Del | | BkSp | NAV |________| +// ________| Shift | | Shift |________ +// |________| |________| + + [_COLMAK] = LAYOUT_split_3x5_3( + KC_Q, KC_W, KC_F, KC_P, KC_B, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, + KC_A, KC_R, KC_S, KC_T, KC_G, KC_K, KC_N, KC_E, KC_I, KC_O, + KC_Z, KC_X, KC_C, KC_D, KC_V, KC_M, KC_H, SYM, MISC, KC_SLSH, + MY_ESC, MY_ENT, MY_DEL, MY_BSPC, MY_SPC, MY_TAB + ), +// Number ________ ________ +// ________| F3 |________ ________| 8 |________ +// | F2 | | F4 |________ ________| 7 | | 9 | +// ________| |________| | | | + | |________| |________ +// | F1 |________| F7 |________| | | |________| 5 |________| / | +// | | F6 | | F8 |________| |________| 4 | | 6 | | +// |________| |________| | | | 0 | |________| |________| +// | F5 |________| F11 |________| | | |________| 2 |________| . | +// | | F10 | | F12 |________| |________| 1 | | 3 | | +// |________| |________| | | | - | |________| |________| +// | F9 |________| |________| | | |________| |________| * | +// | | | |________| |________| | | | +// |________| | | |________ ________| ADJUST | | |________| +// |________| **** | | | | |________| +// |________| | | |________| +// |________| |________| + [_NUM] = LAYOUT_split_3x5_3( + KC_F1, KC_F2, KC_F3, KC_F4, XXXXXXX, KC_PLUS, KC_7, KC_8, KC_9, KC_SLSH, + KC_F5, KC_F6, KC_F7, KC_F8, XXXXXXX, KC_COMM, KC_4, KC_5, KC_6, KC_DOT, + KC_F9, KC_F10, KC_F11, KC_F12, XXXXXXX, KC_MINS, KC_1, KC_2, KC_3, KC_ASTR, + XXXXXXX, _______, XXXXXXX, _______, _______, KC_0 + ), +// Navigation ________ ________ +// ________| OS |________ ________| PgUp |________ +// | OS | Ctrl | OS |________ ________| PgDn | | End | +// ________| Alt |________| Shift | AltTab | | Home | |________| |________ +// | OS |________| Ctrl |________| | | |________| Up |________| PrtScr | +// | Super | Alt | | Shift |________| |________| Down | | Right | | +// |________| |________| | | | Left | |________| |________| +// | Super |________| |________| | | |________| |________| Insert | +// | | | | |________| |________| | | | | +// |________| |________| | | | | |________| |________| +// | |________| |________| | | |________| |________| | +// | | | |________| |________| | | | +// |________| | | ADJUST |________ ________| | | |________| +// |________| | | | | **** |________| +// |________| | | |________| +// |________| |________| + [_NAV] = LAYOUT_split_3x5_3( + OS_GUI, OS_ALT, OS_CTL, OS_SFT, XXXXXXX, KC_HOME, KC_PGDN, KC_PGUP, KC_END, KC_PSCR, + KC_LGUI, KC_LALT, KC_LCTL, KC_LSFT, XXXXXXX, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_INS, + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, AS_TAB, A_TAB, XXXXXXX, XXXXXXX, + _______, _______, _______, XXXXXXX, _______, XXXXXXX + ), +// Symbol ________ ________ +// ________| { |________ ________| |________ +// | > | | } |________ ________| | | | +// ________| |________| | ` | | | |________| |________ +// | < |________| ( |________| | | |________| |________| | | +// | | £ | | ) |________| |________| - | | & | | +// |________| |________| | ^ | | _ | |________| |________| +// | * |________| [ |________| | | |________| |________| ~ | +// | | $ | | ] |________| |________| + | **** | % | | +// |________| |________| | @ | | = | |________| |________| +// | \ |________| |________| | | |________| |________| # | +// | | | ? |________| |________| ! | | | +// |________| | | ' |________ ________| . | | |________| +// |________| | " | | , | |________| +// |________| | | |________| +// |________| |________| +// + [_SYM] = LAYOUT_split_3x5_3( + KC_LT, KC_GT, KC_LCBR, KC_RCBR, KC_GRV, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_NUPI, + KC_ASTR, KC_HASH, KC_LPRN, KC_RPRN, KC_CIRC, KC_UNDS, KC_MINS, XXXXXXX, KC_AMPR, KC_PIPE, + KC_NUBS, KC_DLR, KC_LBRC, KC_RBRC, KC_DQUO, KC_EQL, KC_PLUS, _______, KC_PERC, KC_NUHS, + KC_QUES, KC_QUOT, KC_AT, KC_COMM, KC_DOT, KC_EXLM + ), +// Miscellaneous ________ ________ +// ________| {|} |________ ________| |________ +// | | | {|} |________ ________| | | | +// ________| |________| | | | | |________| |________ +// | <|> |________| (|) |________| | | |________| |________| | +// | | | | (|) |________| |________| | | | | +// |________| |________| | | | | |________| |________| +// | |________| [|] |________| | | |________| |________| | +// | | | | [|] |________| |________| | | | | +// |________| |________| | | | | |________| **** |________| +// | |________| |________| | | |________| |________| | +// | | | ?_^ |________| |________| !_^ | | | +// |________| | | '|' |________ ________| ._^ | | |________| +// |________| | "|" | | ,_ | |________| +// |________| | | |________| +// |________| |________| +// + [_MISC] = LAYOUT_split_3x5_3( + LTGT, LTGTC, CBR, CBR, GRV, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + XXXXXXX, XXXXXXX, PRN, PRN, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + XXXXXXX, XXXXXXX, BRC, BRC, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, XXXXXXX, + QUESSPC, QUOT, DQUOT, COMMSPC, DOTSPC, EXLMSPC + ), +// Adjust ________ ________ +// ________| RESET |________ ________| |________ +// | | EEPROM | RESET |________ ________| | | | +// ________| |________| | | | | |________| |________ +// | |________| RGB |________| | | |________| |________| | +// | | RGB | Hue+ | RGB |________| |________| | | | | +// |________| Toggle |________| Sat+ | RGB | | | |________| |________| +// | |________| RGB |________| Bri+ | | |________| |________| | +// | | RGB | Hue- | RGB |________| |________| | | | | +// |________| Mode |________| Sat- | RGB | | | |________| |________| +// | |________| |________| Bri- | | |________| |________| | +// | | | |________| |________| | | | +// |________| | | |________ ________| | | |________| +// |________| **** | | | | **** |________| +// |________| | | |________| +// |________| |________| + [_ADJUST] = LAYOUT_split_3x5_3( + XXXXXXX, WOKE, EEP_RST, RESET, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + XXXXXXX, RGB_TOG, RGB_HUI, RGB_SAI, RGB_VAI, XXXXXXX, QWERTY, COLEMAK, XXXXXXX, XXXXXXX, + XXXXXXX, RGB_MOD, RGB_HUD, RGB_SAD, RGB_VAD, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX + ), +}; + +bool alt_tabbing = false; +bool woke_mode = false; +uint16_t rgb_edit_timer = 0; +uint16_t last_rgb_char = 0; + +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(_COLMAK); + } + return false; + case SYM: + if (record->event.pressed) { + layer_on(_SYM); + } else { + layer_off(_SYM); + } + return false; + case MY_SPC: + if (!record->event.pressed) { + if(alt_tabbing) { + unregister_code(KC_LALT); + alt_tabbing = false; + } + } + return true; + case MISC: + if (record->event.pressed) { + layer_on(_MISC); + } else { + layer_off(_MISC); + } + return false; + case DOTSPC: + if (record->event.pressed) { + tap_code(KC_DOT); + tap_code(KC_SPC); + set_oneshot_mods(MOD_LSFT); + } + return false; + case COMMSPC: + if (record->event.pressed) { + tap_code(KC_COMM); + tap_code(KC_SPC); + } + return false; + case EXLMSPC: + if (record->event.pressed) { + tap_code16(KC_EXLM); + tap_code(KC_SPC); + set_oneshot_mods(MOD_LSFT); + } + return false; + case QUESSPC: + if (record->event.pressed) { + tap_code16(KC_QUES); + tap_code(KC_SPC); + set_oneshot_mods(MOD_LSFT); + } + return false; + case QUOT: + if (record->event.pressed) { + tap_code(KC_QUOT); + tap_code(KC_QUOT); + tap_code(KC_LEFT); + } + return false; + case DQUOT: + if (record->event.pressed) { + tap_code16(KC_DQUO); + tap_code16(KC_DQUO); + tap_code(KC_LEFT); + } + return false; + case PRN: + if (record->event.pressed) { + tap_code16(KC_LPRN); + tap_code16(KC_RPRN); + tap_code(KC_LEFT); + } + return false; + case BRC: + if (record->event.pressed) { + tap_code(KC_LBRC); + tap_code(KC_RBRC); + tap_code(KC_LEFT); + } + return false; + case CBR: + if (record->event.pressed) { + tap_code16(KC_LCBR); + tap_code16(KC_RCBR); + tap_code(KC_LEFT); + } + return false; + case LTGT: + if (record->event.pressed) { + tap_code16(KC_LT); + tap_code16(KC_GT); + tap_code(KC_LEFT); + } + return false; + case LTGTC: + if (record->event.pressed) { + tap_code16(KC_LT); + tap_code(KC_SLSH); + tap_code16(KC_GT); + tap_code(KC_LEFT); + } + return false; + case GRV: + if (record->event.pressed) { + tap_code(KC_GRV); + tap_code(KC_GRV); + tap_code(KC_LEFT); + } + return false; + case AS_TAB: + if (record->event.pressed) { + register_code(KC_LSFT); + } else { + unregister_code(KC_LSFT); + } + case A_TAB: + if (record->event.pressed) { + register_code(KC_LALT); + register_code(KC_TAB); + alt_tabbing = true; + } else { + unregister_code(KC_TAB); + } + return false; + case WOKE: + if (!record->event.pressed) { + woke_mode = !woke_mode; + } + return false; + case RGB_TOG: + case RGB_MOD: + case RGB_HUD: + case RGB_HUI: + case RGB_SAD: + case RGB_SAI: + case RGB_VAI: + case RGB_VAD: + rgb_edit_timer = timer_read(); + last_rgb_char = keycode; + return true; + } + + if (woke_mode && ((keycode >= KC_A && keycode <= KC_Z) || keycode == MY_BSPC)) { + if (record->event.pressed) { + tap_code(KC_CAPS); + } + } + + return true; +} + +layer_state_t layer_state_set_user(layer_state_t state) { + state = update_tri_layer_state(state, _NAV, _NUM, _ADJUST); + return state; +} + +#ifdef OLED_DRIVER_ENABLE + +#define ANIM_NUM_FRAMES 4 +#define ANIM_FRAME_DURATION 100 + +#ifdef ANIM_REVERSE +#define ANIM_TOTAL_FRAMES (2*((ANIM_NUM_FRAMES)-1)) +#else +#define ANIM_TOTAL_FRAMES ANIM_NUM_FRAMES +#endif + +uint16_t anim_timer = 0; +uint8_t current_anim_frame = 0; + +oled_rotation_t oled_init_user(oled_rotation_t rotation) { + return OLED_ROTATION_180; +} + +void render_default_layer_state(void) { + oled_write_P(PSTR("Layout: "), false); + switch (get_highest_layer(default_layer_state)) { + case _QWERTY: + if(woke_mode) { + oled_write_ln_P(PSTR("QwErTy"), false); + } else { + oled_write_ln_P(PSTR("Qwerty"), false); + } + break; + case _COLMAK: + oled_write_ln_P(PSTR("Colemak"), false); + break; + } +} + +#ifdef RGBLIGHT_ENABLE +bool cleared = false; +void render_rgb_state(void) { + if(!rgblight_get_mode()) { + if(!cleared) { + oled_clear(); + cleared = true; + } + return; + } + cleared = false; + uint8_t width = (OLED_DISPLAY_WIDTH/OLED_FONT_WIDTH)-10; + uint8_t hue = (rgblight_get_hue()*width/255), + sat = (rgblight_get_sat()*width/255), + val = (rgblight_get_val()*width/255); + bool changing_hue = timer_elapsed(rgb_edit_timer) < 1000 && (last_rgb_char == RGB_HUI || last_rgb_char == RGB_HUD); + bool changing_sat = timer_elapsed(rgb_edit_timer) < 1000 && (last_rgb_char == RGB_SAI || last_rgb_char == RGB_SAD); + bool changing_val = timer_elapsed(rgb_edit_timer) < 1000 && (last_rgb_char == RGB_VAI || last_rgb_char == RGB_VAD); + + uint8_t i; + + oled_write_ln_P(PSTR(""), false); + + oled_write_P(PSTR("Hue: ["), changing_hue); + for(i = 0; i < width; ++i) { + oled_write_P(i ANIM_FRAME_DURATION) { + anim_timer = timer_read(); + current_anim_frame = (current_anim_frame + 1) % ANIM_TOTAL_FRAMES; + oled_write_raw_P(frame[abs((ANIM_NUM_FRAMES-1)-current_anim_frame)], 1024); + } +} + +void oled_task_user(void) { + if (is_keyboard_master()) { + render_status(); // Renders the current keyboard state (layer, lock, caps, scroll, etc) + } + else { + render_logo(); + } +} +#endif diff --git a/keyboards/arch_36/keymaps/obosob/readme.md b/keyboards/arch_36/keymaps/obosob/readme.md new file mode 100644 index 000000000000..e7dc6952d797 --- /dev/null +++ b/keyboards/arch_36/keymaps/obosob/readme.md @@ -0,0 +1 @@ +# Obosob's keymap for Arch-36 diff --git a/keyboards/arch_36/keymaps/obosob/rules.mk b/keyboards/arch_36/keymaps/obosob/rules.mk new file mode 100644 index 000000000000..2b16ebb7bc73 --- /dev/null +++ b/keyboards/arch_36/keymaps/obosob/rules.mk @@ -0,0 +1,3 @@ +EXTRAKEY_ENABLE = no # Audio control and System control +UNICODE_ENABLE = no # Unicode +LTO_ENABLE = yes diff --git a/keyboards/arch_36/readme.md b/keyboards/arch_36/readme.md new file mode 100644 index 000000000000..d0e16434ee9f --- /dev/null +++ b/keyboards/arch_36/readme.md @@ -0,0 +1,16 @@ +# Arch-36 + +An ergonomic 30% split keyboard + +* Keyboard Maintainer: [obosob](https://github.com/obosob) +* Hardware Supported: Pro Micro 5V/16MHz and compatible. + +Make example for this keyboard (after setting up your build environment): + + make arch_36:default + +Example of flashing this keyboard: + + make arch_36: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). diff --git a/keyboards/arch_36/rules.mk b/keyboards/arch_36/rules.mk new file mode 100644 index 000000000000..588ef01e3e68 --- /dev/null +++ b/keyboards/arch_36/rules.mk @@ -0,0 +1,26 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +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 +OLED_DRIVER_ENABLE = yes # Enables the use of OLED displays +BLUETOOTH_ENABLE = no # Enable Bluetooth +AUDIO_ENABLE = no # Audio output +SPLIT_KEYBOARD = yes # Split common + +LAYOUTS = split_3x5_3 From 1b4f47c8ee099f373dddd5b294e09bd78b39055f Mon Sep 17 00:00:00 2001 From: Nguyen Minh Hoang Date: Fri, 7 Aug 2020 02:19:09 +0700 Subject: [PATCH 525/930] Fix configuration data for keyboard pom_keyboards/tnln95 (#9904) * fix configuration data, comment out unused layout * fix keymap * add info for layout all * change keymap name --- keyboards/pom_keyboards/tnln95/info.json | 17 ++++++-- .../tnln95/keymaps/default/keymap.c | 24 +++++------ .../tnln95/keymaps/default_ansi/keymap.c | 42 +++++++++++++++++++ keyboards/pom_keyboards/tnln95/tnln95.h | 8 ++-- 4 files changed, 71 insertions(+), 20 deletions(-) create mode 100644 keyboards/pom_keyboards/tnln95/keymaps/default_ansi/keymap.c diff --git a/keyboards/pom_keyboards/tnln95/info.json b/keyboards/pom_keyboards/tnln95/info.json index d72a0fe1dcd3..a8d83ac3ecfe 100644 --- a/keyboards/pom_keyboards/tnln95/info.json +++ b/keyboards/pom_keyboards/tnln95/info.json @@ -5,13 +5,22 @@ "width": 21.25, "height": 5, "layouts": { + "LAYOUT_all": { + "layout": [ + { "label": "Calc", "x": 0, "y": 0 },{ "label": "/", "x": 1, "y": 0 },{ "label": "*", "x": 2, "y": 0 },{ "label": "Bksp", "x": 3, "y": 0 },{ "label": "Esc", "x": 4, "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": ")", "x": 15.25, "y": 0 },{ "label": "_", "x": 16.25, "y": 0 },{ "label": "+", "x": 17.25, "y": 0 },{ "label": "|", "x": 18.25, "y": 0 },{ "label": "PrintScr", "x": 19.25, "y": 0 },{ "label": "Home", "x": 20.25, "y": 0 }, + { "label": "-", "x": 0, "y": 1 },{ "label": "7", "x": 1, "y": 1 },{ "label": "8", "x": 2, "y": 1 },{ "label": "9", "x": 3, "y": 1 },{ "label": "Num Lock", "x": 4, "y": 1 },{ "label": "Tab", "x": 5.25, "y": 1, "w": 1.5 },{ "label": "Q", "x": 6.75, "y": 1 },{ "label": "W", "x": 7.75, "y": 1 },{ "label": "E", "x": 8.75, "y": 1 },{ "label": "R", "x": 9.75, "y": 1 },{ "label": "T", "x": 10.75, "y": 1 },{ "label": "Y", "x": 11.75, "y": 1 },{ "label": "U", "x": 12.75, "y": 1 },{ "label": "I", "x": 13.75, "y": 1 },{ "label": "O", "x": 14.75, "y": 1 },{ "label": "P", "x": 15.75, "y": 1 },{ "label": "{", "x": 16.75, "y": 1 },{ "label": "}", "x": 17.75, "y": 1 },{ "label": "Backspace", "x": 18.75, "y": 1, "w": 1.5 },{ "label": "PageUp", "x": 20.25, "y": 1 }, + { "label": "+", "x": 0, "y": 2 },{ "label": "4", "x": 1, "y": 2 },{ "label": "5", "x": 2, "y": 2 },{ "label": "6", "x": 3, "y": 2 },{ "label": "Copy", "x": 4, "y": 2 },{ "label": "Capslock", "x": 5.25, "y": 2, "w": 1.75 },{ "label": "A", "x": 7, "y": 2 },{ "label": "S", "x": 8, "y": 2 },{ "label": "D", "x": 9, "y": 2 },{ "label": "F", "x": 10, "y": 2 },{ "label": "G", "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": ":", "x": 16, "y": 2 },{ "label": "\"", "x": 17, "y": 2 },{ "label": "Enter", "x": 18, "y": 2, "w": 2.25 },{ "label": "PageDown", "x": 20.25, "y": 2 }, + { "label": "=", "x": 0, "y": 3 },{ "label": "1", "x": 1, "y": 3 },{ "label": "2", "x": 2, "y": 3 },{ "label": "3", "x": 3, "y": 3 },{ "label": "Paste", "x": 4, "y": 3 },{ "label": "Shift", "x": 5.25, "y": 3, "w": 2.25 },{ "label": "Z", "x": 7.5, "y": 3 },{ "label": "X", "x": 8.5, "y": 3 },{ "label": "C", "x": 9.5, "y": 3 },{ "label": "V", "x": 10.5, "y": 3 },{ "label": "B", "x": 11.5, "y": 3 },{ "label": "N", "x": 12.5, "y": 3 },{ "label": "M", "x": 13.5, "y": 3 },{ "label": "<", "x": 14.5, "y": 3 },{ "label": ">", "x": 15.5, "y": 3 },{ "label": "?", "x": 16.5, "y": 3 },{ "label": "Shift", "x": 17.5, "y": 3, "w": 1.75 },{ "label": "Up", "x": 19.25, "y": 3 },{ "label": "End", "x": 20.25, "y": 3 }, + { "label": "Enter", "x": 0, "y": 4 },{ "label": ".", "x": 1, "y": 4 },{ "label": "0", "x": 2, "y": 4 },{ "label": "00", "x": 3, "y": 4 },{ "label": ",", "x": 4, "y": 4 },{ "label": "Ctrl", "x": 5.25, "y": 4, "w": 1.25 },{ "label": "Win", "x": 6.5, "y": 4, "w": 1.25 },{ "label": "Alt", "x": 7.75, "y": 4, "w": 1.25 },{ "label": "Space", "x": 9, "y": 4, "w": 2.25 },{ "label": "Space", "x": 11.25, "y": 4, "w": 1.25 },{ "label": "Space", "x": 12.5, "y": 4, "w": 2.25 },{ "label": "Alt", "x": 14.75, "y": 4, "w": 1.25 },{ "label": "Fn", "x": 16, "y": 4 },{ "label": "Ctrl", "x": 17, "y": 4, "w": 1.25 },{ "label": "Left", "x": 18.25, "y": 4 },{ "label": "Down", "x": 19.25, "y": 4 },{ "label": "Right", "x": 20.25, "y": 4 } + ] + }, "LAYOUT_ansi": { "layout": [ { "label": "-", "x": 0, "y": 0 },{ "label": "/", "x": 1, "y": 0 },{ "label": "*", "x": 2, "y": 0 },{ "label": "Bksp", "x": 3, "y": 0 },{ "label": "Esc", "x": 4, "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": ")", "x": 15.25, "y": 0 },{ "label": "_", "x": 16.25, "y": 0 },{ "label": "+", "x": 17.25, "y": 0 },{ "label": "Backspace", "x": 18.25, "y": 0, "w": 2 },{ "label": "Home", "x": 20.25, "y": 0 }, - { "label": "7", "x": 1, "y": 1 }, { "label": "8", "x": 2, "y": 1 }, { "label": "9", "x": 3, "y": 1 }, { "label": "Num Lock", "x": 4, "y": 1 }, { "label": "Tab", "x": 5.25, "y": 1, "w": 1.5 }, { "label": "Q", "x": 6.25, "y": 1 }, { "label": "W", "x": 7.25, "y": 1 }, { "label": "E", "x": 8.25, "y": 1 }, { "label": "R", "x": 9.25, "y": 1 }, { "label": "T", "x": 10.25, "y": 1 }, { "label": "Y", "x": 11.25, "y": 1 }, { "label": "U", "x": 12.25, "y": 1 }, { "label": "I", "x": 13.25, "y": 1 }, { "label": "O", "x": 14.25, "y": 1 }, { "label": "P", "x": 15.25, "y": 1 }, { "label": "{", "x": 16.25, "y": 1 }, { "label": "}", "x": 17.25, "y": 1 }, { "label": "|", "x": 18.75, "y": 1, "w": 1.5 }, { "label": "Delete", "x": 20.25, "y": 1 }, - { "label": "+", "x": 0, "y": 2, "h": 2 }, { "label": "4", "x": 1, "y": 2 }, { "label": "5", "x": 2, "y": 2 }, { "label": "6", "x": 3, "y": 2 }, { "label": "Copy", "x": 4, "y": 2 },{ "label": "Capslock", "x": 5.25, "y": 3, "w": 1.75 }, { "label": "A", "x": 7, "y": 3 }, { "label": "S", "x": 8, "y": 3 }, { "label": "D", "x": 9, "y": 3 }, { "label": "F", "x": 10, "y": 3 }, { "label": "G", "x": 11, "y": 3 }, { "label": "H", "x": 12, "y": 3 }, { "label": "J", "x": 13, "y": 3 }, { "label": "K", "x": 14, "y": 3 }, { "label": "L", "x": 15, "y": 3 }, { "label": ":", "x": 16, "y": 3 }, { "label": "\"", "x": 17, "y": 3 }, { "label": "Enter", "x": 18, "y": 1, "w": 2.25 }, { "label": "PageUp", "x": 20.25, "y": 1 }, - { "label": "1", "x": 1, "y": 4 }, { "label": "2", "x": 2, "y": 4 }, { "label": "3", "x": 3, "y": 4 }, { "label": "Paste", "x": 4, "y": 4 },{ "label": "Shift", "x": 5.25, "y": 4, "w": 2.25 },{ "label": "Z", "x": 7.5, "y": 4 },{ "label": "X", "x": 8.5, "y": 4 },{ "label": "C", "x": 9.5, "y": 4 },{ "label": "V", "x": 10.5, "y": 4 },{ "label": "B", "x": 11.5, "y": 4 },{ "label": "N", "x": 12.5, "y": 4 },{ "label": "M", "x": 13.5, "y": 4 },{ "label": "<", "x": 14.5, "y": 4 },{ "label": ">", "x": 15.5, "y": 4 },{ "label": "?", "x": 16.5, "y": 4 },{ "label": "Shift", "x": 17.5, "y": 4, "w": 1.75 },{ "label": "Up", "x": 19.25, "y": 4 },{ "label": "PageDown", "x": 20.25, "y": 4 }, - { "label": "Enter", "x": 0, "y": 5, "h": 2 }, { "label": ".", "x": 1, "y": 5 }, { "label": "0", "x": 2, "y": 5, "w": 2 }, { "label": ",", "x": 4, "y": 5 },{ "label": "Ctrl", "x": 5.25, "y": 5, "w": 1.25 },{ "label": "Win", "x": 6.5, "y": 5, "w": 1.25 },{ "label": "Alt", "x": 7.75, "y": 5, "w": 1.25 },{ "label": "Space", "x": 9, "y": 5, "w": 6.25 },{ "label": "Alt", "x": 15.25, "y": 5, "w": 1.5 },{ "label": "Fn", "x": 16.75, "y": 5, "w": 1.5 },{ "label": "Left", "x": 18.25, "y": 5 },{ "label": "Down", "x": 19.25, "y": 5 },{ "label": "Right", "x": 20.25, "y": 5 } + { "label": "+", "x": 0, "y": 1, "h": 2 },{ "label": "7", "x": 1, "y": 1 },{ "label": "8", "x": 2, "y": 1 },{ "label": "9", "x": 3, "y": 1 },{ "label": "Num Lock", "x": 4, "y": 1 },{ "label": "Tab", "x": 5.25, "y": 1, "w": 1.5 },{ "label": "Q", "x": 6.75, "y": 1 },{ "label": "W", "x": 7.75, "y": 1 },{ "label": "E", "x": 8.75, "y": 1 },{ "label": "R", "x": 9.75, "y": 1 },{ "label": "T", "x": 10.75, "y": 1 },{ "label": "Y", "x": 11.75, "y": 1 },{ "label": "U", "x": 12.75, "y": 1 },{ "label": "I", "x": 13.75, "y": 1 },{ "label": "O", "x": 14.75, "y": 1 },{ "label": "P", "x": 15.75, "y": 1 },{ "label": "{", "x": 16.75, "y": 1 },{ "label": "}", "x": 17.75, "y": 1 },{ "label": "|", "x": 18.75, "y": 1, "w": 1.5 },{ "label": "Delete", "x": 20.25, "y": 1 }, + { "label": "4", "x": 1, "y": 2 },{ "label": "5", "x": 2, "y": 2 },{ "label": "6", "x": 3, "y": 2 },{ "label": "Copy", "x": 4, "y": 2 },{ "label": "Capslock", "x": 5.25, "y": 2, "w": 1.75 },{ "label": "A", "x": 7, "y": 2 },{ "label": "S", "x": 8, "y": 2 },{ "label": "D", "x": 9, "y": 2 },{ "label": "F", "x": 10, "y": 2 },{ "label": "G", "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": ":", "x": 16, "y": 2 },{ "label": "\"", "x": 17, "y": 2 },{ "label": "Enter", "x": 18, "y": 2, "w": 2.25 },{ "label": "PageUp", "x": 20.25, "y": 2 }, + { "label": "Enter", "x": 0, "y": 3, "h": 2 },{ "label": "1", "x": 1, "y": 3 },{ "label": "2", "x": 2, "y": 3 },{ "label": "3", "x": 3, "y": 3 },{ "label": "Paste", "x": 4, "y": 3 },{ "label": "Shift", "x": 5.25, "y": 3, "w": 2.25 },{ "label": "Z", "x": 7.5, "y": 3 },{ "label": "X", "x": 8.5, "y": 3 },{ "label": "C", "x": 9.5, "y": 3 },{ "label": "V", "x": 10.5, "y": 3 },{ "label": "B", "x": 11.5, "y": 3 },{ "label": "N", "x": 12.5, "y": 3 },{ "label": "M", "x": 13.5, "y": 3 },{ "label": "<", "x": 14.5, "y": 3 },{ "label": ">", "x": 15.5, "y": 3 },{ "label": "?", "x": 16.5, "y": 3 },{ "label": "Shift", "x": 17.5, "y": 3, "w": 1.75 },{ "label": "Up", "x": 19.25, "y": 3 },{ "label": "PageDown", "x": 20.25, "y": 3 }, + { "label": ".", "x": 1, "y": 4 },{ "label": "0", "x": 2, "y": 4, "w": 2 },{ "label": ",", "x": 4, "y": 4 },{ "label": "Ctrl", "x": 5.25, "y": 4, "w": 1.25 },{ "label": "Win", "x": 6.5, "y": 4, "w": 1.25 },{ "label": "Alt", "x": 7.75, "y": 4, "w": 1.25 },{ "label": "Space", "x": 9, "y": 4, "w": 6.25 },{ "label": "Alt", "x": 15.25, "y": 4, "w": 1.5 },{ "label": "Fn", "x": 16.75, "y": 4, "w": 1.5 },{ "label": "Left", "x": 18.25, "y": 4 },{ "label": "Down", "x": 19.25, "y": 4 },{ "label": "Right", "x": 20.25, "y": 4 } ] } } diff --git a/keyboards/pom_keyboards/tnln95/keymaps/default/keymap.c b/keyboards/pom_keyboards/tnln95/keymaps/default/keymap.c index 066961daad03..22418d1a7de0 100644 --- a/keyboards/pom_keyboards/tnln95/keymaps/default/keymap.c +++ b/keyboards/pom_keyboards/tnln95/keymaps/default/keymap.c @@ -25,18 +25,18 @@ enum layer_names { #define CMD_PASTE LSFT(KC_INS) const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [_DEF] = LAYOUT_ansi( - KC_PMNS, KC_PAST, KC_PSLS, KC_BSPACE, KC_ESC, KC_GRAVE, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINUS, KC_EQUAL, KC_BSPACE, KC_HOME, - KC_P7, KC_P8, KC_P9, KC_NUMLOCK, KC_TAB, KC_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_PPLS, KC_P4, KC_P5, KC_P6, CMD_COPY, KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCOLON, KC_QUOTE, KC_ENTER, KC_PGDN, - KC_P1, KC_P2, KC_P3, CMD_PASTE, KC_LSHIFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMMA, KC_DOT, KC_SLASH, KC_RSHIFT, KC_UP, KC_END, - KC_PENT, KC_PDOT, KC_P0, KC_COMMA , KC_LCTRL, KC_LGUI, KC_LALT, KC_SPACE, KC_RALT, MO(_FNC), KC_LEFT, KC_DOWN, KC_RIGHT + [_DEF] = LAYOUT_all( + KC_CALC, KC_PAST, KC_PSLS, KC_BSPACE, KC_ESC, KC_GRAVE, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINUS, KC_EQUAL, KC_BSLASH , KC_PSCR, KC_HOME, + KC_PMNS, KC_P7, KC_P8, KC_P9, KC_NUMLOCK, KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSPACE, KC_PGUP, + KC_PPLS, KC_P4, KC_P5, KC_P6, CMD_COPY, KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCOLON, KC_QUOTE, KC_ENTER, KC_PGDN, + KC_EQL, KC_P1, KC_P2, KC_P3, CMD_PASTE, KC_LSHIFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMMA, KC_DOT, KC_SLASH, KC_RSHIFT, KC_UP, KC_END, + KC_PENT, KC_PDOT, KC_P0, KC_P0, KC_COMMA , KC_LCTRL, KC_LGUI, KC_LALT, KC_SPACE, KC_SPACE, KC_SPACE, KC_RALT, MO(_FNC), KC_RCTRL, KC_LEFT, KC_DOWN, KC_RIGHT ), - [_FNC] = 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_PSCR, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_TOG, RGB_RMOD, RGB_MOD, KC_INS, KC_VOLU, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, BL_TOGG, KC_VOLD, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, BL_DEC, BL_INC, BL_BRTG, _______, _______, KC_MUTE, - _______, _______, _______, _______ , _______, _______, _______, _______, _______, MO(_FNC), _______, _______, _______ + [_FNC] = LAYOUT_all( + _______, _______, _______, _______, _______, _______, KC_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, RGB_RMOD, RGB_MOD, _______, KC_VOLU, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, BL_TOGG, KC_VOLD, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, BL_DEC, BL_INC, BL_BRTG, _______, _______, KC_MUTE, + _______, _______, _______, _______, _______ , _______, _______, _______, _______, _______, _______, _______, MO(_FNC), _______, _______, _______, _______ ) }; diff --git a/keyboards/pom_keyboards/tnln95/keymaps/default_ansi/keymap.c b/keyboards/pom_keyboards/tnln95/keymaps/default_ansi/keymap.c new file mode 100644 index 000000000000..2c175ca95758 --- /dev/null +++ b/keyboards/pom_keyboards/tnln95/keymaps/default_ansi/keymap.c @@ -0,0 +1,42 @@ +/* Copyright 2020 Nguyen Minh HOang + + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public 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 { + _DEF, + _FNC +}; + +#define CMD_COPY LCTL(KC_INS) +#define CMD_PASTE LSFT(KC_INS) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_DEF] = LAYOUT_ansi( + KC_PMNS, KC_PAST, KC_PSLS, KC_BSPACE, KC_ESC, KC_GRAVE, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINUS, KC_EQUAL, KC_BSPACE, KC_HOME, + KC_PPLS, KC_P7, KC_P8, KC_P9, KC_NUMLOCK, KC_TAB, KC_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_P4, KC_P5, KC_P6, CMD_COPY, KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCOLON, KC_QUOTE, KC_ENTER, KC_PGDN, + KC_PENT, KC_P1, KC_P2, KC_P3, CMD_PASTE, KC_LSHIFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMMA, KC_DOT, KC_SLASH, KC_RSHIFT, KC_UP, KC_END, + KC_PDOT, KC_P0, KC_COMMA , KC_LCTRL, KC_LGUI, KC_LALT, KC_SPACE, KC_RALT, MO(_FNC), KC_LEFT, KC_DOWN, KC_RIGHT + ), + [_FNC] = 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_PSCR, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_TOG, RGB_RMOD, RGB_MOD, KC_INS, KC_VOLU, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, BL_TOGG, KC_VOLD, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, BL_DEC, BL_INC, BL_BRTG, _______, _______, KC_MUTE, + _______, _______, _______ , _______, _______, _______, _______, _______, MO(_FNC), _______, _______, _______ + ) +}; diff --git a/keyboards/pom_keyboards/tnln95/tnln95.h b/keyboards/pom_keyboards/tnln95/tnln95.h index ee88d9aac49d..33a59b3a75e8 100644 --- a/keyboards/pom_keyboards/tnln95/tnln95.h +++ b/keyboards/pom_keyboards/tnln95/tnln95.h @@ -42,10 +42,10 @@ #define LAYOUT_ansi(\ K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K10, K11, K12, K13, K14, K15, K16, K17, K19, K96, \ - 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, K58, K59, \ - K61, K62, K63, K64, K65, K66, K67, K68, K69, K70, K71, K72, K73, K74, K75, K77, K78, K79, \ - K80, K81, K83, K84, K85, K86, K87, K89, K93, K95, K97, K98, K99 \ + K40, K21, K22, K23, K24, K25, K26, K27, K28, K29, K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, \ + K41, K42, K43, K44, K45, K46, K47, K48, K49, K50, K51, K52, K53, K54, K55, K56, K58, K59, \ + K80, K61, K62, K63, K64, K65, K66, K67, K68, K69, K70, K71, K72, K73, K74, K75, K77, K78, K79, \ + K81, K83, K84, K85, K86, K87, K89, K93, K95, K97, K98, K99 \ ) {\ { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09 },\ { K10, K11, K12, K13, K14, K15, K16, K17, KC_NO, K19 },\ From 547410b65514b14acb37496c89d68618d20d16a6 Mon Sep 17 00:00:00 2001 From: moyi4681 Date: Fri, 7 Aug 2020 03:41:45 +0800 Subject: [PATCH 526/930] [Keyboard] add dztech/bocc keyboard (#9794) * Update readme.md * add bocc keyboard * Update bocc.c * Update keymap.c * Update readme.md * Update config.h * Update keyboards/dztech/bocc/config.h * Update keyboards/dztech/bocc/rules.mk * Update keyboards/dztech/bocc/bocc.c * Update keyboards/dztech/bocc/bocc.c * Update keyboards/dztech/bocc/readme.md * Update keyboards/dztech/bocc/readme.md * Update keyboards/dztech/bocc/rules.mk * Update keyboards/dztech/bocc/rules.mk * Update bocc.c * Update bocc.h * Update bocc.c * Update config.h * Update keymap.c * Update keymap.c * Update keyboards/dztech/bocc/config.h * Update keyboards/dztech/bocc/keymaps/default/keymap.c * Update keyboards/dztech/bocc/bocc.h * Update keyboards/dztech/bocc/info.json * Update keyboards/dztech/bocc/keymaps/default/keymap.c * Update keyboards/dztech/bocc/keymaps/via/keymap.c * Update keyboards/dztech/bocc/keymaps/via/keymap.c * Update keyboards/dztech/bocc/keymaps/via/keymap.c * Update keyboards/dztech/bocc/keymaps/via/keymap.c * Update bocc.h * Update keymap.c * Update keymap.c * Update keymap.c * Update bocc.h * Update keyboards/dztech/bocc/bocc.h --- keyboards/dztech/bocc/bocc.c | 29 ++++++++ keyboards/dztech/bocc/bocc.h | 32 +++++++++ keyboards/dztech/bocc/config.h | 70 +++++++++++++++++++ keyboards/dztech/bocc/info.json | 12 ++++ .../dztech/bocc/keymaps/default/keymap.c | 27 +++++++ keyboards/dztech/bocc/keymaps/via/keymap.c | 48 +++++++++++++ keyboards/dztech/bocc/keymaps/via/rules.mk | 2 + keyboards/dztech/bocc/readme.md | 12 ++++ keyboards/dztech/bocc/rules.mk | 22 ++++++ 9 files changed, 254 insertions(+) create mode 100644 keyboards/dztech/bocc/bocc.c create mode 100644 keyboards/dztech/bocc/bocc.h create mode 100644 keyboards/dztech/bocc/config.h create mode 100644 keyboards/dztech/bocc/info.json create mode 100755 keyboards/dztech/bocc/keymaps/default/keymap.c create mode 100755 keyboards/dztech/bocc/keymaps/via/keymap.c create mode 100644 keyboards/dztech/bocc/keymaps/via/rules.mk create mode 100644 keyboards/dztech/bocc/readme.md create mode 100644 keyboards/dztech/bocc/rules.mk diff --git a/keyboards/dztech/bocc/bocc.c b/keyboards/dztech/bocc/bocc.c new file mode 100644 index 000000000000..2aada9b5ea6b --- /dev/null +++ b/keyboards/dztech/bocc/bocc.c @@ -0,0 +1,29 @@ +/* Copyright 2020 dztech + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#include "bocc.h" + +void matrix_init_kb(void) { + setPinOutput(E6); + matrix_init_user(); +} + +bool led_update_kb(led_t led_state) { + bool res = led_update_user(led_state); + if(res) { + writePin(E6, !led_state.caps_lock); + } + return res; +} diff --git a/keyboards/dztech/bocc/bocc.h b/keyboards/dztech/bocc/bocc.h new file mode 100644 index 000000000000..271f503879c5 --- /dev/null +++ b/keyboards/dztech/bocc/bocc.h @@ -0,0 +1,32 @@ +/* Copyright 2020 dztech + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License 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( \ + K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, K414, 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, K216, \ + K300, K301, K302, K405, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, K315, K316, \ + K400, K401, K402, K403, K404, K407, K411, K412, K413, K415, K416 \ +) { \ + { K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, 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, KC_NO, K216 }, \ + { K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, KC_NO, K315, K316 }, \ + { K400, K401, K402, K403, K404, K405, KC_NO, K407, KC_NO, KC_NO, KC_NO, K411, K412, K413, K414, K415, K416 } \ +} diff --git a/keyboards/dztech/bocc/config.h b/keyboards/dztech/bocc/config.h new file mode 100644 index 000000000000..e0effdd7b837 --- /dev/null +++ b/keyboards/dztech/bocc/config.h @@ -0,0 +1,70 @@ +/* Copyright 2020 dztech + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License 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 0x445A // "DZ" +#define PRODUCT_ID 0x1010 +#define DEVICE_VER 0x0001 +#define MANUFACTURER DZtech +#define PRODUCT BOCC + +/* key matrix size */ +#define MATRIX_ROWS 5 +#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 { B0, B1, B2, B3, F0 } +#define MATRIX_COL_PINS { B5, B6, C6, C7, F7, F6, F5, F4, F1, D1, D2, D3, D5, D4, D6, D7, B4 } +#define UNUSED_PINS + +/* COL2ROW, ROW2COL*/ +#define DIODE_DIRECTION COL2ROW + +#define BACKLIGHT_PIN B7 +#define BACKLIGHT_LEVELS 5 + +#define RGB_DI_PIN E2 +#ifdef RGB_DI_PIN +# define RGBLIGHT_ANIMATIONS +# define RGBLED_NUM 16 +# define RGBLIGHT_HUE_STEP 8 +# define RGBLIGHT_SAT_STEP 8 +# define RGBLIGHT_VAL_STEP 8 +# define RGBLIGHT_SLEEP +#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 + +/* VIA related config */ +#define VIA_EEPROM_LAYOUT_OPTIONS_SIZE 2 diff --git a/keyboards/dztech/bocc/info.json b/keyboards/dztech/bocc/info.json new file mode 100644 index 000000000000..10b4bc5449e1 --- /dev/null +++ b/keyboards/dztech/bocc/info.json @@ -0,0 +1,12 @@ +{ + "keyboard_name": "BOCC", + "url": "", + "maintainer": "DZTECH", + "width": 18.5, + "height": 5, + "layouts": { + "LAYOUT_all": { + "layout": [{"x":0, "y":0}, {"x":1, "y":0}, {"label":"~", "x":2.5, "y":0}, {"label":"!", "x":3.5, "y":0}, {"label":"@", "x":4.5, "y":0}, {"label":"#", "x":5.5, "y":0}, {"label":"$", "x":6.5, "y":0}, {"label":"%", "x":7.5, "y":0}, {"label":"^", "x":8.5, "y":0}, {"label":"&", "x":9.5, "y":0}, {"label":"*", "x":10.5, "y":0}, {"label":"(", "x":11.5, "y":0}, {"label":")", "x":12.5, "y":0}, {"label":"_", "x":13.5, "y":0}, {"label":"+", "x":14.5, "y":0}, {"label":"Backspace", "x":15.5, "y":0}, {"x":16.5, "y":0}, {"label":"Home", "x":17.5, "y":0}, {"x":0, "y":1}, {"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":9, "y":1}, {"label":"U", "x":10, "y":1}, {"label":"I", "x":11, "y":1}, {"label":"O", "x":12, "y":1}, {"label":"P", "x":13, "y":1}, {"label":"{", "x":14, "y":1}, {"label":"}", "x":15, "y":1}, {"label":"|", "x":16, "y":1, "w":1.5}, {"label":"Page Up", "x":17.5, "y":1}, {"x":0, "y":2}, {"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":9.25, "y":2}, {"label":"J", "x":10.25, "y":2}, {"label":"K", "x":11.25, "y":2}, {"label":"L", "x":12.25, "y":2}, {"label":":", "x":13.25, "y":2}, {"label":"\"", "x":14.25, "y":2}, {"label":"Enter", "x":15.25, "y":2, "w":2.25}, {"label":"Page Down", "x":17.5, "y":2}, {"x":0, "y":3}, {"x":1, "y":3}, {"x":2.5, "y":3, "w":1.25}, {"label":"Shift", "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":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":"Shift", "x":14.75, "y":3, "w":1.75}, {"label":"\u2191", "x":16.5, "y":3}, {"label":"End", "x":17.5, "y":3}, {"x":0, "y":4}, {"x":1, "y":4}, {"label":"Ctrl", "x":2.5, "y":4, "w":1.25}, {"label":"Win", "x":3.75, "y":4, "w":1.25}, {"label":"Alt", "x":5, "y":4, "w":1.25}, {"x":6.25, "y":4, "w":6.25}, {"label":"Alt", "x":12.5, "y":4, "w":1.25}, {"label":"Fn", "x":13.75, "y":4, "w":1.25}, {"label":"\u2190", "x":15.5, "y":4}, {"label":"\u2193", "x":16.5, "y":4}, {"label":"\u2192", "x":17.5, "y":4}] + } + } +} diff --git a/keyboards/dztech/bocc/keymaps/default/keymap.c b/keyboards/dztech/bocc/keymaps/default/keymap.c new file mode 100755 index 000000000000..eaff37a58dd8 --- /dev/null +++ b/keyboards/dztech/bocc/keymaps/default/keymap.c @@ -0,0 +1,27 @@ +/* Copyright 2020 dztech + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public 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( + 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_GRV, KC_BSPC, KC_HOME, + 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_PGUP, + 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_PGDN, + KC_F7, KC_F8, 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_END, + KC_F9, KC_F10, KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT), + +}; diff --git a/keyboards/dztech/bocc/keymaps/via/keymap.c b/keyboards/dztech/bocc/keymaps/via/keymap.c new file mode 100755 index 000000000000..00f9a27e82a1 --- /dev/null +++ b/keyboards/dztech/bocc/keymaps/via/keymap.c @@ -0,0 +1,48 @@ +/* Copyright 2020 dztech + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public 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( + 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_GRV, KC_BSPC, KC_HOME, + 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_PGUP, + 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_PGDN, + KC_F7, KC_F8, 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_END, + KC_F9, KC_F10, KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT), + + LAYOUT_all( + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO), + + LAYOUT_all( + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_NO, KC_NO, KC_NO,KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO), + + LAYOUT_all( + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO), + +}; diff --git a/keyboards/dztech/bocc/keymaps/via/rules.mk b/keyboards/dztech/bocc/keymaps/via/rules.mk new file mode 100644 index 000000000000..36b7ba9cbc98 --- /dev/null +++ b/keyboards/dztech/bocc/keymaps/via/rules.mk @@ -0,0 +1,2 @@ +VIA_ENABLE = yes +LTO_ENABLE = yes diff --git a/keyboards/dztech/bocc/readme.md b/keyboards/dztech/bocc/readme.md new file mode 100644 index 000000000000..e1935206f9b0 --- /dev/null +++ b/keyboards/dztech/bocc/readme.md @@ -0,0 +1,12 @@ +# BOCC + +* Keyboard Maintainer: DZTECH +* Hardware Supported: DZTECH +* Hardware Availability: BOCC + +Make example for this keyboard (after setting up your build environment): + + make dztech/bocc:default + make dztech/bocc: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/dztech/bocc/rules.mk b/keyboards/dztech/bocc/rules.mk new file mode 100644 index 000000000000..6695a40a62b7 --- /dev/null +++ b/keyboards/dztech/bocc/rules.mk @@ -0,0 +1,22 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +BOOTLOADER = atmel-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 = yes # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow +BLUETOOTH_ENABLE = no # Enable Bluetooth +AUDIO_ENABLE = no # Audio output From 8dc2502177ea24b31190b073f4a0fdef92d73bff Mon Sep 17 00:00:00 2001 From: Nick Brassel Date: Fri, 7 Aug 2020 06:16:14 +1000 Subject: [PATCH 527/930] Add PR checklist document. (#9913) * Add PR checklist document. * Update docs/pr_checklist.md Co-authored-by: James Young <18669334+noroadsleft@users.noreply.github.com> * Apply suggestions from code review Co-authored-by: Ryan * Reword the lower/raise/adjust suggestion somewhat for clarity. * Add suggestion from @Didel for coding conventions. Co-authored-by: James Young <18669334+noroadsleft@users.noreply.github.com> Co-authored-by: Ryan --- .github/PULL_REQUEST_TEMPLATE.md | 3 +- docs/_summary.md | 1 + docs/pr_checklist.md | 125 +++++++++++++++++++++++++++++++ 3 files changed, 128 insertions(+), 1 deletion(-) create mode 100644 docs/pr_checklist.md diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index cbc018ea057f..d402488d407e 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -26,7 +26,8 @@ -- [ ] My code follows the code style of this project. +- [ ] My code follows the code style of this project: [**C**](https://docs.qmk.fm/#/coding_conventions_c), [**Python**](https://docs.qmk.fm/#/coding_conventions_python) +- [ ] I have read the [**PR Checklist** document](https://docs.qmk.fm/#/pr_checklist) and have made the appropriate changes. - [ ] My change requires a change to the documentation. - [ ] I have updated the documentation accordingly. - [ ] I have read the [**CONTRIBUTING** document](https://docs.qmk.fm/#/contributing). diff --git a/docs/_summary.md b/docs/_summary.md index 63c54ec21931..9ed55a3d062f 100644 --- a/docs/_summary.md +++ b/docs/_summary.md @@ -111,6 +111,7 @@ * [Velocikey](feature_velocikey.md) * Developing QMK + * [PR Checklist](pr_checklist.md) * Breaking Changes * [Overview](breaking_changes.md) * [My Pull Request Was Flagged](breaking_changes_instructions.md) diff --git a/docs/pr_checklist.md b/docs/pr_checklist.md new file mode 100644 index 000000000000..8755552b9def --- /dev/null +++ b/docs/pr_checklist.md @@ -0,0 +1,125 @@ +# PR checklists + +This is a non-exhaustive checklist of what the QMK collaborators will be checking when reviewing submitted PRs. + +If there are any inconsistencies with these recommendations, you're best off [creating an issue](https://github.com/qmk/qmk_firmware/issues/new) against this document, or getting in touch with a QMK Collaborator on Discord. + +## General PRs + +- PR should be submitted using a non-`master` branch on the source repository + - This does not mean you target a different branch for your PR, rather that you're not working out of your own master branch + - If submitter _does_ use their own `master` branch, they'll be given a link to the ["how to git"](https://docs.qmk.fm/#/newbs_git_using_your_master_branch) page after merging -- (end of this document will contain the contents of the message) +- Newly-added directories and filenames must be lowercase + - This rule may be relaxed if upstream sources originally had uppercase characters (e.g. ChibiOS, or imported files from other repositories etc.) + - If there is enough justification (i.e. consistency with existing core files etc.) this can be relaxed + - a board designer naming their keyboard with uppercase letters is not enough justification +- Valid license headers on all `*.c` and `*.h` source files + - GPL2/GPL3 recommended for consistency + - Other licenses are permitted, however they must be GPL-compatible and must allow for redistribution. Using a different license will almost certainly delay a PR getting merged. +- QMK codebase "best practices" followed + - This is not an exhaustive list, and will likely get amended as time goes by + - `#pragma once` instead of `#ifndef` include guards in header files + - No "old-school" GPIO/I2C/SPI functions used -- must use QMK abstractions unless justifiable (and laziness is not valid justification) + - Timing abstractions should be followed too: + - `wait_ms()` instead of `_delay_ms()` (remove `#include ` too) + - `timer_read()` and `timer_read32()` etc. -- see [timer.h](https://github.com/qmk/qmk_firmware/blob/master/tmk_core/common/timer.h) for the timing APIs + - If you think a new abstraction is useful, you're encouraged to: + - prototype it in your own keyboard until it's feature-complete + - discuss it with QMK Collaborators on Discord + - refactor it as a separate core change + - remove your specific copy in your board + +## Core PRs + +- Must now target `develop` branch, which will subsequently be merged back to `master` on the breaking changes timeline +- Other notes TBD + - Core is a lot more subjective given the breadth of posted changes + +## Keyboard PRs + +Closed PRs (for inspiration, previous sets of review comments will help you eliminate ping-pong of your own reviews): +https://github.com/qmk/qmk_firmware/pulls?q=is%3Apr+is%3Aclosed+label%3Akeyboard + +- `info.json` + - valid URL + - valid maintainer + - displays correctly in Configurator (press Ctrl+Shift+I to preview local file, turn on fast input to verify ordering) +- `readme.md` + - standard template should be present + - flash command has `:flash` at end + - valid hardware availability link (unless handwired) -- private groupbuys are okay, but one-off prototypes will be questioned. If open-source, a link to files should be provided. +- `rules.mk` + - removed `MIDI_ENABLE`, `FAUXCLICKY_ENABLE` and `HD44780_ENABLE` + - modified `# Enable Bluetooth with the Adafruit EZ-Key HID` -> `# Enable Bluetooth` + - No `(-/+size)` comments related to enabling features + - Remove the list of alternate bootloaders if one has been specified + - No re-definitions of the default MCU parameters if same value, when compared to the equivalent MCU in [mcu_selection.mk](https://github.com/qmk/qmk_firmware/blob/master/quantum/mcu_selection.mk) +- keyboard `config.h` + - don't repeat `MANUFACTURER` in the `PRODUCT` value + - no `#define DESCRIPTION` + - no Magic Key Options, MIDI Options or HD44780 configuration + - user preference configurable `#define`s need to be moved to keymap `config.h` + - "`DEBOUNCE`" instead of "`DEBOUNCING_DELAY`" + - bare minimum required code for a board to boot into QMK should be present + - initialisation code for the matrix and critical devices + - mirroring existing functionality of a commercial board (like custom keycodes and special animations etc.) should be handled through non-`default` keymaps +- `keyboard.c` + - empty `xxxx_xxxx_kb()` or other weak-defined default implemented functions removed + - commented-out functions removed too + - `matrix_init_board()` etc. migrated to `keyboard_pre_init_kb()`, see: [keyboard_pre_init*](https://docs.qmk.fm/#/custom_quantum_functions?id=keyboard_pre_init_-function-documentation) + - prefer `CUSTOM_MATRIX = lite` if custom matrix used, allows for standard debounce, see [custom matrix 'lite'](https://docs.qmk.fm/#/custom_matrix?id=lite) +- `keyboard.h` + - `#include "quantum.h"` appears at the top + - `LAYOUT` macros should use standard definitions if applicable + - Use the Community Layout macro names where they apply (preferred above `LAYOUT`/`LAYOUT_all`) +- keymap `config.h` + - no duplication of `rules.mk` or `config.h` from keyboard +- `keymaps/default/keymap.c` + - `QMKBEST`/`QMKURL` removed (sheesh) + - If using `MO(_LOWER)` and `MO(_RAISE)` keycodes or equivalent, and the keymap has an adjust layer when holding both keys -- if the keymap has no "direct-to-adjust" keycode (such as `MO(_ADJUST)`) then you should prefer to write... + ``` + layer_state_t layer_state_set_user(layer_state_t state) { + return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST); + } + ``` + ...instead of manually handling `layer_on()`, `update_tri_layer()` inside the keymap's `process_record_user()`. +- default (and via) keymaps should be "pristine" + - bare minimum to be used as a "clean slate" for another user to develop their own user-specific keymap + - standard layouts preferred in these keymaps, if possible +- submitters can have a personal (or bells-and-whistles) keymap showcasing capabilities in the same PR but it shouldn't be embedded in the 'default' keymap +- submitters can also have a "manufacturer-matching" keymap that mirrors existing functionality of the commercial product, if porting an existing board + +Also, specific to ChibiOS: +- **Strong** preference to using existing ChibiOS board definitions. + - A lot of the time, an equivalent Nucleo board can be used with a different flash size or slightly different model in the same family + - Example: For an STM32L082KZ, given the similarity to an STM32L073RZ, you can use `BOARD = ST_NUCLEO64_L073RZ` in rules.mk + - QMK is migrating to not having custom board definitions if at all possible, due to the ongoing maintenance burden when upgrading ChibiOS +- If a board definition is unavoidable, `board.c` must have a standard `__early_init()` (as per normal ChibiOS board defs) and an empty `boardInit()`: + - see Arm/ChibiOS [early initialization](https://docs.qmk.fm/#/platformdev_chibios_earlyinit?id=board-init) + - `__early_init()` should be replaced by either `early_hardware_init_pre()` or `early_hardware_init_post()` as appropriate + - `boardInit()` should be migrated to `board_init()` + +## Keymap PRs + +- `#include QMK_KEYBOARD_H` preferred to including specific board files +- Prefer layer `enum`s to `#define`s +- Require custom keycode `enum`s to `#define`s, first entry must have ` = SAFE_RANGE` +- Terminating backslash (`\`) in lines of LAYOUT macro parameters is superfluous +- Some care with spacing (e.g., alignment on commas or first char of keycodes) makes for a much nicer-looking keymap + +--- + +## Notes + +For when people use their own `master` branch, post this after merge: +``` +For future reference, we recommend against committing to your `master` branch as you've done here, because pull requests from modified `master` branches can make it more difficult to keep your QMK fork updated. It is highly recommended for QMK development – regardless of what is being done or where – to keep your master updated, but **NEVER** commit to it. Instead, do all your changes in a branch (branches are basically free in Git) and issue PRs from your branches when you're developing. + +There are instructions on how to keep your fork updated here: + +[**Best Practices: Your Fork's Master: Update Often, Commit Never**](https://docs.qmk.fm/#/newbs_git_using_your_master_branch) + +[Fixing Your Branch](https://docs.qmk.fm/#/newbs_git_resynchronize_a_branch) will walk you through fixing up your `master` branch moving forward. If you need any help with this just ask. + +Thanks for contributing! +``` From b531bd3b04e99e2a46004114997aa791d2699466 Mon Sep 17 00:00:00 2001 From: vattern Date: Thu, 6 Aug 2020 23:18:34 +0100 Subject: [PATCH 528/930] [Keyboard] Add new "stoutgat" keyboard (#9837) * Add new "stoutgat" keyboard Add new 65% ISO keyboard "stoutgat" with dual encoders * Apply suggestions from code review * Update readme with information about the keyboard * Fix erroneous trailing comma in info.json * Fix layout bits for qmk info * Update keyboards/stoutgat/info.json * Update keyboards/stoutgat/stoutgat.h * Fix keymap and macro after updates * Apply suggestions from code review * Update keyboards/stoutgat/info.json * Update keyboards/stoutgat/keymaps/default/keymap.c * Update keyboards/stoutgat/info.json * Update keyboards/stoutgat/readme.md * Fix encoder volume bug * Adding 65_iso and 65_ansi layouts * Update keyboards/stoutgat/config.h * Update keyboards/stoutgat/rules.mk --- keyboards/stoutgat/config.h | 43 ++++++++++ keyboards/stoutgat/info.json | 89 ++++++++++++++++++++ keyboards/stoutgat/keymaps/default/keymap.c | 77 +++++++++++++++++ keyboards/stoutgat/keymaps/default/readme.md | 1 + keyboards/stoutgat/readme.md | 16 ++++ keyboards/stoutgat/rules.mk | 27 ++++++ keyboards/stoutgat/stoutgat.c | 17 ++++ keyboards/stoutgat/stoutgat.h | 71 ++++++++++++++++ 8 files changed, 341 insertions(+) create mode 100644 keyboards/stoutgat/config.h create mode 100644 keyboards/stoutgat/info.json create mode 100644 keyboards/stoutgat/keymaps/default/keymap.c create mode 100644 keyboards/stoutgat/keymaps/default/readme.md create mode 100644 keyboards/stoutgat/readme.md create mode 100644 keyboards/stoutgat/rules.mk create mode 100644 keyboards/stoutgat/stoutgat.c create mode 100644 keyboards/stoutgat/stoutgat.h diff --git a/keyboards/stoutgat/config.h b/keyboards/stoutgat/config.h new file mode 100644 index 000000000000..2c60e8b5656c --- /dev/null +++ b/keyboards/stoutgat/config.h @@ -0,0 +1,43 @@ +/*Copyright 2020 Thys de Wet + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License 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 0xFEED +#define PRODUCT_ID 0x7811 +#define DEVICE_VER 0x0001 +#define MANUFACTURER TKW +#define PRODUCT stoutgat + +/* key matrix size */ +#define MATRIX_ROWS 5 +#define MATRIX_COLS 15 +#define TAP_CODE_DELAY 10 + +#define MATRIX_ROW_PINS { D1, D0, A0, A1, A2 } +#define MATRIX_COL_PINS { D6, D5, D7, C0, C1, C2, C3, C4, C5, C6, C7, A7, A6, A5, A4 } +#define ENCODERS_PAD_A { B4, B0 } +#define ENCODERS_PAD_B { B3, B1 } + +#define UNUSED_PINS + +#define DIODE_DIRECTION COL2ROW + +/* disable these deprecated features by default */ +#define NO_ACTION_MACRO +#define NO_ACTION_FUNCTION diff --git a/keyboards/stoutgat/info.json b/keyboards/stoutgat/info.json new file mode 100644 index 000000000000..f66a54152d25 --- /dev/null +++ b/keyboards/stoutgat/info.json @@ -0,0 +1,89 @@ +{ + "keyboard_name": "stoutgat", + "url": "https://github.com/vattern/stoutgat", + "maintainer": "vattern", + "width": 16, + "height": 6, + "layouts": { + "LAYOUT_encoder": { + "layout": [ + {"x": 1,"y": 0}, + {"x": 14,"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, "w": 2}, + {"x": 15, "y": 1}, + + {"x": 0, "y": 2, "w": 1.5}, + {"x": 1.5, "y": 2}, + {"x": 2.5, "y": 2}, + {"x": 3.5, "y": 2}, + {"x": 4.5, "y": 2}, + {"x": 5.5, "y": 2}, + {"x": 6.5, "y": 2}, + {"x": 7.5, "y": 2}, + {"x": 8.5, "y": 2}, + {"x": 9.5, "y": 2}, + {"x": 10.5, "y": 2}, + {"x": 11.5, "y": 2}, + {"x": 12.5, "y": 2}, + {"x": 15, "y": 2}, + + {"x": 0, "y": 3, "w": 1.75}, + {"x": 1.75, "y": 3}, + {"x": 2.75, "y": 3}, + {"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": 2, "w": 1.25, "h": 2}, + {"x": 15, "y": 3}, + + {"x": 0, "y": 4, "w": 1.25}, + {"x": 1.25, "y": 4}, + {"x": 2.25, "y": 4}, + {"x": 3.25, "y": 4}, + {"x": 4.25, "y": 4}, + {"x": 5.25, "y": 4}, + {"x": 6.25, "y": 4}, + {"x": 7.25, "y": 4}, + {"x": 8.25, "y": 4}, + {"x": 9.25, "y": 4}, + {"x": 10.25, "y": 4}, + {"x": 11.25, "y": 4}, + {"x": 12.25, "y": 4, "w": 1.75}, + {"x": 14, "y": 4}, + {"x": 15, "y": 4}, + + {"x": 0, "y": 5, "w": 1.25}, + {"x": 1.25, "y": 5, "w": 1.25}, + {"x": 2.5, "y": 5, "w": 1.25}, + {"x": 3.75, "y": 5, "w": 6.25}, + {"x": 10, "y": 5}, + {"x": 11, "y": 5}, + {"x": 12, "y": 5}, + {"x": 13, "y": 5}, + {"x": 14, "y": 5}, + {"x": 15, "y": 5} + ] + } + } +} diff --git a/keyboards/stoutgat/keymaps/default/keymap.c b/keyboards/stoutgat/keymaps/default/keymap.c new file mode 100644 index 000000000000..bf9d905843f3 --- /dev/null +++ b/keyboards/stoutgat/keymaps/default/keymap.c @@ -0,0 +1,77 @@ +#include QMK_KEYBOARD_H + +#define _BL 0 +#define _FL 1 + + + + const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_encoder( + KC_MPLY,KC_ESC, + 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_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_RCTL, KC_LEFT, KC_DOWN, KC_RIGHT), + + [1] = LAYOUT_encoder( + KC_MPLY,KC_ESC, + /* esc 1 2 3 4 5 6 7 8 9 0 - = bkspc `~ */ + 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_PSCR, + /* tab Q W E R T Y U I O P [ ] delete*/ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RESET, KC_TRNS,KC_TRNS,KC_TRNS,KC_INS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PAUS, KC_TRNS, + /* caps A S D F G H J K L ; ' # enter pg 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_INS, KC_TRNS, KC_HOME, + /* shift \ Z X C V B N M , . / shift up pg dn*/ + KC_LSFT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_MUTE, KC_TRNS, KC_TRNS, KC_TRNS, KC_RSFT, KC_VOLU, KC_END, + /* ctrl win alt space alt fn ctrl left down right*/ + KC_LCTL, KC_LGUI, KC_LALT, KC_TRNS, KC_RALT, KC_TRNS, KC_RCTL, KC_TRNS, KC_VOLD, KC_TRNS) + }; + + + + +#ifdef ENCODER_ENABLE +void encoder_update_user(uint8_t index, bool clockwise) { + + if (index == 0) { + switch (get_highest_layer(layer_state)) { + case _BL: + // Move whole words. Hold shift to select while moving. + if (clockwise) { + tap_code16(C(KC_RGHT)); + } else { + tap_code16(C(KC_LEFT)); + } + break; + default: + // History scrubbing. For Adobe products, hold shift while moving + // backward to go forward instead. + if (clockwise) { + tap_code16(C(KC_Z)); + } else { + tap_code16(C(KC_Y)); + } + break; + } + } else if (index == 1) { + switch (get_highest_layer(layer_state)) { + case _BL: + // Scrolling with PageUp and PgDn. + if (clockwise) { + tap_code16(KC_PGDN); + } else { + tap_code16(KC_PGUP); + } + break; + default: + if (clockwise) { + tap_code16(KC_VOLU); + } else { + tap_code16(KC_VOLD); + } + break; + } + } +} +#endif diff --git a/keyboards/stoutgat/keymaps/default/readme.md b/keyboards/stoutgat/keymaps/default/readme.md new file mode 100644 index 000000000000..198550735460 --- /dev/null +++ b/keyboards/stoutgat/keymaps/default/readme.md @@ -0,0 +1 @@ +# The default keymap for stoutgat diff --git a/keyboards/stoutgat/readme.md b/keyboards/stoutgat/readme.md new file mode 100644 index 000000000000..13953e231908 --- /dev/null +++ b/keyboards/stoutgat/readme.md @@ -0,0 +1,16 @@ +# stoutgat + +![stoutgat](https://i.imgur.com/CfWa5AGl.jpg?1) + +An ISO through hole component 65% keyboard with dual encoders. Uses the ATMega32A. +Inspired by the cftkb Discipline. + +* Keyboard Maintainer: [Thys de Wet](https://github.com/vattern) +* Hardware Supported: Stoutgat PCBs , running ATMega32A +* Hardware Availability: https://github.com/vattern/stoutgat + +Make example for this keyboard (after setting up your build environment): + + make stoutgat: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/stoutgat/rules.mk b/keyboards/stoutgat/rules.mk new file mode 100644 index 000000000000..a9b6c4fc3012 --- /dev/null +++ b/keyboards/stoutgat/rules.mk @@ -0,0 +1,27 @@ +# MCU name +MCU = atmega32a + +# Processor frequency +F_CPU = 16000000 + +# Bootloader selection +BOOTLOADER = USBasp + +# 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 +BLUETOOTH_ENABLE = no # Enable Bluetooth +AUDIO_ENABLE = no # Audio output +ENCODER_ENABLE = yes +LAYOUTS = 65_iso 65_ansi diff --git a/keyboards/stoutgat/stoutgat.c b/keyboards/stoutgat/stoutgat.c new file mode 100644 index 000000000000..10c82fd9f962 --- /dev/null +++ b/keyboards/stoutgat/stoutgat.c @@ -0,0 +1,17 @@ +/* Copyright 2020 Thys de Wet + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public 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 diff --git a/keyboards/stoutgat/stoutgat.h b/keyboards/stoutgat/stoutgat.h new file mode 100644 index 000000000000..7c8c71574843 --- /dev/null +++ b/keyboards/stoutgat/stoutgat.h @@ -0,0 +1,71 @@ +/* Copyright 2020 Thys de Wet + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License 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 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_encoder( \ + K44, K48, \ + 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, K2D, K1D, K2E, \ + K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E, \ + K40, K41, K42, K46, 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, K1D, K1E }, \ +{ K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, _x_, K2D, K2E }, \ +{ K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E }, \ +{ K40, K41, K42, _x_, K44, _x_, K46, _x_, K48, K49, K4A, K4B, K4C, K4D, K4E } \ +} + +#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, K2D, K1D, K2E, \ + K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E, \ + K40, K41, K42, K46, 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, K1D, K1E }, \ +{ K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, _x_, K2D, K2E }, \ +{ K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E }, \ +{ K40, K41, K42, _x_, _x_, _x_, K46, _x_, _x_, K49, K4A, K4B, K4C, K4D, K4E } \ +} + +#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, K46, 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, K1D, K1E }, \ +{ K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, _x_, K2D, K2E }, \ +{ K30, _x_, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E }, \ +{ K40, K41, K42, _x_, _x_, _x_, K46, _x_, _x_, K49, K4A, K4B, K4C, K4D, K4E} \ +} From 671d066c84276f884caaca27046a9cf0493afc5f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Reibl=20J=C3=A1nos=20D=C3=A1niel?= Date: Fri, 7 Aug 2020 00:30:16 +0200 Subject: [PATCH 529/930] [Keyboard] Add handwired 12*5 blackpill keyboard (#9855) * Add new handwired keyboard with F401 blackpill * Re-indent * Add README.md * Apply suggestions from code review * Re-indent * Add README.md * Apply suggestions from code review * Fix spacing * Modify keymap Add license header --- keyboards/handwired/riblee_f401/README.md | 16 + keyboards/handwired/riblee_f401/chconf.h | 714 ++++++++++++++++++ keyboards/handwired/riblee_f401/config.h | 41 + keyboards/handwired/riblee_f401/halconf.h | 525 +++++++++++++ .../riblee_f401/keymaps/default/keymap.c | 207 +++++ .../riblee_f401/keymaps/default/readme.md | 1 + keyboards/handwired/riblee_f401/mcuconf.h | 253 +++++++ keyboards/handwired/riblee_f401/riblee_f401.c | 17 + keyboards/handwired/riblee_f401/riblee_f401.h | 34 + keyboards/handwired/riblee_f401/rules.mk | 46 ++ 10 files changed, 1854 insertions(+) create mode 100644 keyboards/handwired/riblee_f401/README.md create mode 100644 keyboards/handwired/riblee_f401/chconf.h create mode 100644 keyboards/handwired/riblee_f401/config.h create mode 100644 keyboards/handwired/riblee_f401/halconf.h create mode 100644 keyboards/handwired/riblee_f401/keymaps/default/keymap.c create mode 100644 keyboards/handwired/riblee_f401/keymaps/default/readme.md create mode 100644 keyboards/handwired/riblee_f401/mcuconf.h create mode 100644 keyboards/handwired/riblee_f401/riblee_f401.c create mode 100644 keyboards/handwired/riblee_f401/riblee_f401.h create mode 100644 keyboards/handwired/riblee_f401/rules.mk diff --git a/keyboards/handwired/riblee_f401/README.md b/keyboards/handwired/riblee_f401/README.md new file mode 100644 index 000000000000..6287ac40c18f --- /dev/null +++ b/keyboards/handwired/riblee_f401/README.md @@ -0,0 +1,16 @@ +# Handwired Preonic + +A compact 50% (12x5) ortholinear keyboard. + +* Keyboard Maintainer: [Daniel Reibl](https://github.com/riblee) +* Hardware Supported: Blackpill F401 + +Make example for this keyboard (after setting up your build environment): + + make handwired/riblee_f401:default + +Flashing example for this keyboard: + + make handwired/riblee_f401: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/handwired/riblee_f401/chconf.h b/keyboards/handwired/riblee_f401/chconf.h new file mode 100644 index 000000000000..7dc4f84a8a00 --- /dev/null +++ b/keyboards/handwired/riblee_f401/chconf.h @@ -0,0 +1,714 @@ +/* + 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. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +/** + * @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. + * + * @addtogroup config + * @details Kernel related settings and hooks. + * @{ + */ + +#ifndef CHCONF_H +#define CHCONF_H + +#define _CHIBIOS_RT_CONF_ +#define _CHIBIOS_RT_CONF_VER_6_0_ + +/*===========================================================================*/ +/** + * @name System timers settings + * @{ + */ +/*===========================================================================*/ + +/** + * @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. + * @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. + */ +#if !defined(CH_CFG_ST_TIMEDELTA) +#define CH_CFG_ST_TIMEDELTA 2 +#endif + +/** @} */ + +/*===========================================================================*/ +/** + * @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. + */ +#if !defined(CH_CFG_TIME_QUANTUM) +#define CH_CFG_TIME_QUANTUM 0 +#endif + +/** + * @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. + */ +#if !defined(CH_CFG_MEMCORE_SIZE) +#define CH_CFG_MEMCORE_SIZE 0 +#endif + +/** + * @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. + */ +#if !defined(CH_CFG_NO_IDLE_THREAD) +#define CH_CFG_NO_IDLE_THREAD FALSE +#endif + +/** @} */ + +/*===========================================================================*/ +/** + * @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. + */ +#if !defined(CH_CFG_OPTIMIZE_SPEED) +#define CH_CFG_OPTIMIZE_SPEED TRUE +#endif + +/** @} */ + +/*===========================================================================*/ +/** + * @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. + */ +#if !defined(CH_CFG_USE_TM) +#define CH_CFG_USE_TM TRUE +#endif + +/** + * @brief Threads registry APIs. + * @details If enabled then the registry APIs are included in the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_REGISTRY) +#define CH_CFG_USE_REGISTRY TRUE +#endif + +/** + * @brief Threads synchronization APIs. + * @details If enabled then the @p chThdWait() function is included in + * the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_WAITEXIT) +#define CH_CFG_USE_WAITEXIT TRUE +#endif + +/** + * @brief Semaphores APIs. + * @details If enabled then the Semaphores APIs are included in the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_SEMAPHORES) +#define CH_CFG_USE_SEMAPHORES TRUE +#endif + +/** + * @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. + */ +#if !defined(CH_CFG_USE_SEMAPHORES_PRIORITY) +#define CH_CFG_USE_SEMAPHORES_PRIORITY FALSE +#endif + +/** + * @brief Mutexes APIs. + * @details If enabled then the mutexes APIs are included in the kernel. + * + * @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. + * @note Recursive mutexes are heavier and have an increased + * memory footprint. + * + * @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. + * @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. + */ +#if !defined(CH_CFG_USE_CONDVARS) +#define CH_CFG_USE_CONDVARS TRUE +#endif + +/** + * @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. + */ +#if !defined(CH_CFG_USE_CONDVARS_TIMEOUT) +#define CH_CFG_USE_CONDVARS_TIMEOUT TRUE +#endif + +/** + * @brief Events Flags APIs. + * @details If enabled then the event flags APIs are included in the kernel. + * + * @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. + * @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. + */ +#if !defined(CH_CFG_USE_EVENTS_TIMEOUT) +#define CH_CFG_USE_EVENTS_TIMEOUT TRUE +#endif + +/** + * @brief Synchronous Messages APIs. + * @details If enabled then the synchronous messages APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_MESSAGES) +#define CH_CFG_USE_MESSAGES TRUE +#endif + +/** + * @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. + */ +#if !defined(CH_CFG_USE_MESSAGES_PRIORITY) +#define CH_CFG_USE_MESSAGES_PRIORITY FALSE +#endif + +/** + * @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. + */ +#if !defined(CH_CFG_USE_MAILBOXES) +#define CH_CFG_USE_MAILBOXES TRUE +#endif + +/** + * @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. + */ +#if !defined(CH_CFG_USE_MEMCORE) +#define CH_CFG_USE_MEMCORE TRUE +#endif + +/** + * @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. + */ +#if !defined(CH_CFG_USE_HEAP) +#define CH_CFG_USE_HEAP TRUE +#endif + +/** + * @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. + */ +#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. + * @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. + */ +#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 + +/** @} */ + +/*===========================================================================*/ +/** + * @name Debug options + * @{ + */ +/*===========================================================================*/ + +/** + * @brief Debug option, kernel statistics. + * + * @note The default is @p FALSE. + */ +#if !defined(CH_DBG_STATISTICS) +#define CH_DBG_STATISTICS FALSE +#endif + +/** + * @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. + */ +#if !defined(CH_DBG_SYSTEM_STATE_CHECK) +#define CH_DBG_SYSTEM_STATE_CHECK FALSE +#endif + +/** + * @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. + */ +#if !defined(CH_DBG_ENABLE_CHECKS) +#define CH_DBG_ENABLE_CHECKS FALSE +#endif + +/** + * @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. + */ +#if !defined(CH_DBG_ENABLE_ASSERTS) +#define CH_DBG_ENABLE_ASSERTS FALSE +#endif + +/** + * @brief Debug option, trace buffer. + * @details If enabled then the trace buffer is activated. + * + * @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. + * @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. + */ +#if !defined(CH_DBG_ENABLE_STACK_CHECK) +#define CH_DBG_ENABLE_STACK_CHECK FALSE +#endif + +/** + * @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. + */ +#if !defined(CH_DBG_FILL_THREADS) +#define CH_DBG_FILL_THREADS FALSE +#endif + +/** + * @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. + */ +#if !defined(CH_DBG_THREADS_PROFILING) +#define CH_DBG_THREADS_PROFILING FALSE +#endif + +/** @} */ + +/*===========================================================================*/ +/** + * @name Kernel hooks + * @{ + */ +/*===========================================================================*/ + +/** + * @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. + */ +#define CH_CFG_THREAD_EXTRA_FIELDS \ + /* Add threads custom fields here.*/ + +/** + * @brief Threads initialization hook. + * @details User initialization code added to the @p _thread_init() function. + * + * @note It is invoked from within @p _thread_init() 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/handwired/riblee_f401/config.h b/keyboards/handwired/riblee_f401/config.h new file mode 100644 index 000000000000..d8e7e7d62113 --- /dev/null +++ b/keyboards/handwired/riblee_f401/config.h @@ -0,0 +1,41 @@ +/* Copyright 2020 Daniel Reibl + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License 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 0xFEED +#define PRODUCT_ID 0x002A +#define DEVICE_VER 0x0001 +#define MANUFACTURER Riblee +#define PRODUCT Handwired F401 + +#define MATRIX_ROWS 5 +#define MATRIX_COLS 12 + +// Testing with onekey +// #define MATRIX_ROW_PINS { A7 } +// #define MATRIX_COL_PINS { B0 } + +#define MATRIX_ROW_PINS { A6, A5, A4, A3, A2 } +#define MATRIX_COL_PINS { B10, B1, B0, B15, A8, B3, B4, B5, B6, B7, B8, B9 } +#define UNUSED_PINS + +#define DIODE_DIRECTION COL2ROW + +#define BACKLIGHT_PIN A0 +#define BACKLIGHT_LEVELS 5 diff --git a/keyboards/handwired/riblee_f401/halconf.h b/keyboards/handwired/riblee_f401/halconf.h new file mode 100644 index 000000000000..a8db392aaa6c --- /dev/null +++ b/keyboards/handwired/riblee_f401/halconf.h @@ -0,0 +1,525 @@ +/* + 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. + 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 + +#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 +#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 cryptographic subsystem. + */ +#if !defined(HAL_USE_CRY) || defined(__DOXYGEN__) +#define HAL_USE_CRY FALSE +#endif + +/** + * @brief Enables the DAC subsystem. + */ +#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 +#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 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 +#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 +#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 + +/** + * @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. */ +/*===========================================================================*/ + +/** + * @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 + +/** + * @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. */ +/*===========================================================================*/ + +/** + * @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 the zero-copy API. + */ +#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 + +/** + * @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. */ +/*===========================================================================*/ + +/** + * @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 16 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 256 bytes for both the transmission and receive + * buffers. + */ +#if !defined(SERIAL_USB_BUFFERS_SIZE) || defined(__DOXYGEN__) +#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 + +/*===========================================================================*/ +/* 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 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 +#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. */ +/*===========================================================================*/ + +/** + * @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 + +/*===========================================================================*/ +/* 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/riblee_f401/keymaps/default/keymap.c b/keyboards/handwired/riblee_f401/keymaps/default/keymap.c new file mode 100644 index 000000000000..40f64e189977 --- /dev/null +++ b/keyboards/handwired/riblee_f401/keymaps/default/keymap.c @@ -0,0 +1,207 @@ +/* Copyright 2015-2017 Jack Humbert + * Copyright 2020 Daniel Reibl + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public 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 preonic_layers { + _QWERTY, + _COLEMAK, + _DVORAK, + _LOWER, + _RAISE, + _ADJUST +}; + +enum preonic_keycodes { + QWERTY = SAFE_RANGE, + COLEMAK, + DVORAK, + BACKLIT +}; + +#define LOWER MO(_LOWER) +#define RAISE MO(_RAISE) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +/* Qwerty + * ,-----------------------------------------------------------------------------------. + * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | 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 | Bksp |Space |Raise | Left | Down | Up |Right | + * `-----------------------------------------------------------------------------------' + */ +[_QWERTY] = LAYOUT_ortho_5x12( + 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_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, KC_ENT, + BACKLIT, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_BSPC, 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_ortho_5x12( + 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_ortho_5x12( + 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 |ISO ~ |ISO | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | Next | Vol- | Vol+ | Play | + * `-----------------------------------------------------------------------------------' + */ +[_LOWER] = LAYOUT_ortho_5x12( + 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 + * ,-----------------------------------------------------------------------------------. + * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Del | F1 | F2 | F3 | F4 | F5 | F6 | - | = | [ | ] | \ | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | Shift| F7 | F8 | F9 | F10 | F11 | F12 |ISO # |ISO / | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | Next | Vol- | Vol+ | Play | + * `-----------------------------------------------------------------------------------' + */ +[_RAISE] = LAYOUT_ortho_5x12( + 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_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_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_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_ortho_5x12( + 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, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ +) + + +}; + +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; + 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 + } else { + unregister_code(KC_RSFT); + } + return false; + break; + } + return true; +}; diff --git a/keyboards/handwired/riblee_f401/keymaps/default/readme.md b/keyboards/handwired/riblee_f401/keymaps/default/readme.md new file mode 100644 index 000000000000..e911968dd964 --- /dev/null +++ b/keyboards/handwired/riblee_f401/keymaps/default/readme.md @@ -0,0 +1 @@ +# The default Preonic layout - largely based on the Planck's \ No newline at end of file diff --git a/keyboards/handwired/riblee_f401/mcuconf.h b/keyboards/handwired/riblee_f401/mcuconf.h new file mode 100644 index 000000000000..ba6e934fe7bd --- /dev/null +++ b/keyboards/handwired/riblee_f401/mcuconf.h @@ -0,0 +1,253 @@ +/* + 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. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#ifndef MCUCONF_H +#define MCUCONF_H + +/* + * STM32F4xx 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: + * 15...0 Lowest...Highest. + * + * DMA priorities: + * 0...3 Lowest...Highest. + */ + +#define STM32F4xx_MCUCONF + +/* + * HAL driver system settings. + */ +#define STM32_NO_INIT FALSE +#define STM32_HSI_ENABLED TRUE +#define STM32_LSI_ENABLED TRUE +#define STM32_HSE_ENABLED TRUE +#define STM32_LSE_ENABLED FALSE +#define STM32_CLOCK48_REQUIRED TRUE +#define STM32_SW STM32_SW_PLL +#define STM32_PLLSRC STM32_PLLSRC_HSE +#define STM32_PLLM_VALUE 25 +#define STM32_PLLN_VALUE 336 +#define STM32_PLLP_VALUE 4 +#define STM32_PLLQ_VALUE 7 +#define STM32_HPRE STM32_HPRE_DIV1 +#define STM32_PPRE1 STM32_PPRE1_DIV4 +#define STM32_PPRE2 STM32_PPRE2_DIV2 +#define STM32_RTCSEL STM32_RTCSEL_LSI +#define STM32_RTCPRE_VALUE 8 +#define STM32_MCO1SEL STM32_MCO1SEL_HSI +#define STM32_MCO1PRE STM32_MCO1PRE_DIV1 +#define STM32_MCO2SEL STM32_MCO2SEL_SYSCLK +#define STM32_MCO2PRE STM32_MCO2PRE_DIV5 +#define STM32_I2SSRC STM32_I2SSRC_CKIN +#define STM32_PLLI2SN_VALUE 192 +#define STM32_PLLI2SR_VALUE 5 +#define STM32_PVD_ENABLE FALSE +#define STM32_PLS STM32_PLS_LEV0 +#define STM32_BKPRAM_ENABLE FALSE + +/* + * 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 6 +#define STM32_IRQ_EXTI20_PRIORITY 6 +#define STM32_IRQ_EXTI21_PRIORITY 15 +#define STM32_IRQ_EXTI22_PRIORITY 15 + +/* + * ADC driver system settings. + */ +#define STM32_ADC_ADCPRE ADC_CCR_ADCPRE_DIV4 +#define STM32_ADC_USE_ADC1 FALSE +#define STM32_ADC_ADC1_DMA_STREAM STM32_DMA_STREAM_ID(2, 4) +#define STM32_ADC_ADC1_DMA_PRIORITY 2 +#define STM32_ADC_IRQ_PRIORITY 6 +#define STM32_ADC_ADC1_DMA_IRQ_PRIORITY 6 + +/* + * 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_TIM4 FALSE +#define STM32_GPT_USE_TIM5 FALSE +#define STM32_GPT_USE_TIM9 FALSE +#define STM32_GPT_USE_TIM11 FALSE +#define STM32_GPT_TIM1_IRQ_PRIORITY 7 +#define STM32_GPT_TIM2_IRQ_PRIORITY 7 +#define STM32_GPT_TIM3_IRQ_PRIORITY 7 +#define STM32_GPT_TIM4_IRQ_PRIORITY 7 +#define STM32_GPT_TIM5_IRQ_PRIORITY 7 +#define STM32_GPT_TIM9_IRQ_PRIORITY 7 +#define STM32_GPT_TIM11_IRQ_PRIORITY 7 + +/* + * I2C driver system settings. + */ +#define STM32_I2C_USE_I2C1 FALSE +#define STM32_I2C_USE_I2C2 FALSE +#define STM32_I2C_USE_I2C3 FALSE +#define STM32_I2C_BUSY_TIMEOUT 50 +#define STM32_I2C_I2C1_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 0) +#define STM32_I2C_I2C1_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 6) +#define STM32_I2C_I2C2_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 2) +#define STM32_I2C_I2C2_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 7) +#define STM32_I2C_I2C3_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 2) +#define STM32_I2C_I2C3_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 4) +#define STM32_I2C_I2C1_IRQ_PRIORITY 5 +#define STM32_I2C_I2C2_IRQ_PRIORITY 5 +#define STM32_I2C_I2C3_IRQ_PRIORITY 5 +#define STM32_I2C_I2C1_DMA_PRIORITY 3 +#define STM32_I2C_I2C2_DMA_PRIORITY 3 +#define STM32_I2C_I2C3_DMA_PRIORITY 3 +#define STM32_I2C_DMA_ERROR_HOOK(i2cp) osalSysHalt("DMA failure") + +/* + * I2S driver system settings. + */ +#define STM32_I2S_USE_SPI2 FALSE +#define STM32_I2S_USE_SPI3 FALSE +#define STM32_I2S_SPI2_IRQ_PRIORITY 10 +#define STM32_I2S_SPI3_IRQ_PRIORITY 10 +#define STM32_I2S_SPI2_DMA_PRIORITY 1 +#define STM32_I2S_SPI3_DMA_PRIORITY 1 +#define STM32_I2S_SPI2_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 3) +#define STM32_I2S_SPI2_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 4) +#define STM32_I2S_SPI3_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 0) +#define STM32_I2S_SPI3_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 7) +#define STM32_I2S_DMA_ERROR_HOOK(i2sp) 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_USE_TIM4 FALSE +#define STM32_ICU_USE_TIM5 FALSE +#define STM32_ICU_USE_TIM9 FALSE +#define STM32_ICU_TIM1_IRQ_PRIORITY 7 +#define STM32_ICU_TIM2_IRQ_PRIORITY 7 +#define STM32_ICU_TIM3_IRQ_PRIORITY 7 +#define STM32_ICU_TIM4_IRQ_PRIORITY 7 +#define STM32_ICU_TIM5_IRQ_PRIORITY 7 +#define STM32_ICU_TIM9_IRQ_PRIORITY 7 + +/* + * 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_USE_TIM4 FALSE +#define STM32_PWM_USE_TIM5 FALSE +#define STM32_PWM_USE_TIM9 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_TIM5_IRQ_PRIORITY 7 +#define STM32_PWM_TIM9_IRQ_PRIORITY 7 + +/* + * SERIAL driver system settings. + */ +#define STM32_SERIAL_USE_USART1 FALSE +#define STM32_SERIAL_USE_USART2 FALSE +#define STM32_SERIAL_USE_USART6 FALSE +#define STM32_SERIAL_USART1_PRIORITY 12 +#define STM32_SERIAL_USART2_PRIORITY 12 +#define STM32_SERIAL_USART6_PRIORITY 12 + +/* + * SPI driver system settings. + */ +#define STM32_SPI_USE_SPI1 FALSE +#define STM32_SPI_USE_SPI2 FALSE +#define STM32_SPI_USE_SPI3 FALSE +#define STM32_SPI_SPI1_RX_DMA_STREAM STM32_DMA_STREAM_ID(2, 0) +#define STM32_SPI_SPI1_TX_DMA_STREAM STM32_DMA_STREAM_ID(2, 3) +#define STM32_SPI_SPI2_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 3) +#define STM32_SPI_SPI2_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 4) +#define STM32_SPI_SPI3_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 0) +#define STM32_SPI_SPI3_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 7) +#define STM32_SPI_SPI1_DMA_PRIORITY 1 +#define STM32_SPI_SPI2_DMA_PRIORITY 1 +#define STM32_SPI_SPI3_DMA_PRIORITY 1 +#define STM32_SPI_SPI1_IRQ_PRIORITY 10 +#define STM32_SPI_SPI2_IRQ_PRIORITY 10 +#define STM32_SPI_SPI3_IRQ_PRIORITY 10 +#define STM32_SPI_DMA_ERROR_HOOK(spip) osalSysHalt("DMA failure") + +/* + * ST driver system settings. + */ +#define STM32_ST_IRQ_PRIORITY 8 +#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_USE_USART6 FALSE +#define STM32_UART_USART1_RX_DMA_STREAM STM32_DMA_STREAM_ID(2, 5) +#define STM32_UART_USART1_TX_DMA_STREAM STM32_DMA_STREAM_ID(2, 7) +#define STM32_UART_USART2_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 5) +#define STM32_UART_USART2_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 6) +#define STM32_UART_USART6_RX_DMA_STREAM STM32_DMA_STREAM_ID(2, 2) +#define STM32_UART_USART6_TX_DMA_STREAM STM32_DMA_STREAM_ID(2, 7) +#define STM32_UART_USART1_IRQ_PRIORITY 12 +#define STM32_UART_USART2_IRQ_PRIORITY 12 +#define STM32_UART_USART6_IRQ_PRIORITY 12 +#define STM32_UART_USART1_DMA_PRIORITY 0 +#define STM32_UART_USART2_DMA_PRIORITY 0 +#define STM32_UART_USART6_DMA_PRIORITY 0 +#define STM32_UART_DMA_ERROR_HOOK(uartp) osalSysHalt("DMA failure") + +/* + * USB driver system settings. + */ +#define STM32_USB_USE_OTG1 TRUE +#define STM32_USB_OTG1_IRQ_PRIORITY 14 +#define STM32_USB_OTG1_RX_FIFO_SIZE 512 +#define STM32_USB_OTG_THREAD_PRIO NORMALPRIO+1 +#define STM32_USB_OTG_THREAD_STACK_SIZE 128 +#define STM32_USB_OTGFIFO_FILL_BASEPRI 0 + +/* + * WDG driver system settings. + */ +#define STM32_WDG_USE_IWDG FALSE + +#endif /* MCUCONF_H */ diff --git a/keyboards/handwired/riblee_f401/riblee_f401.c b/keyboards/handwired/riblee_f401/riblee_f401.c new file mode 100644 index 000000000000..65155b373cc2 --- /dev/null +++ b/keyboards/handwired/riblee_f401/riblee_f401.c @@ -0,0 +1,17 @@ +/* Copyright 2020 Daniel Reibl + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#include "riblee_f401.h" \ No newline at end of file diff --git a/keyboards/handwired/riblee_f401/riblee_f401.h b/keyboards/handwired/riblee_f401/riblee_f401.h new file mode 100644 index 000000000000..306565a310b2 --- /dev/null +++ b/keyboards/handwired/riblee_f401/riblee_f401.h @@ -0,0 +1,34 @@ +/* +Copyright 2020 QMK Community, Daniel Reibl + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License 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_5x12( \ + 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, \ + k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, k4a, k4b \ +) \ +{ \ + { 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 }, \ + { k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, k4a, k4b } \ +} diff --git a/keyboards/handwired/riblee_f401/rules.mk b/keyboards/handwired/riblee_f401/rules.mk new file mode 100644 index 000000000000..eab426a375cd --- /dev/null +++ b/keyboards/handwired/riblee_f401/rules.mk @@ -0,0 +1,46 @@ +## chip/board settings +# the next two should match the directories in +# /os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES) +MCU_FAMILY = STM32 +MCU_SERIES = STM32F4xx +# linker script to use +# it should exist either in /os/common/ports/ARMCMx/compilers/GCC/ld/ +# or /ld/ +MCU_LDSCRIPT = STM32F401xC +# startup code to use +# is should exist in /os/common/ports/ARMCMx/compilers/GCC/mk/ +MCU_STARTUP = stm32f4xx +# it should exist either in /os/hal/boards/ +# or /boards +BOARD = BLACKPILL_STM32_F401 +# 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 +ARMV = 7 +USE_FPU = yes +# Address of the booloader in system memory +STM32_BOOTLOADER_ADDRESS = 0x1FFF0000 + +# 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 + +# 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 +KEYBOARD_SHARED_EP = yes +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = no # Commands for debug and configuration +# 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 +BACKLIGHT_DRIVER = software +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +BLUETOOTH_ENABLE = no # Enable Bluetooth +AUDIO_ENABLE = no # Audio output \ No newline at end of file From db54a7b79e214203b76e7e18e4228f06ce4f02c8 Mon Sep 17 00:00:00 2001 From: x1 Date: Fri, 7 Aug 2020 07:32:32 +0900 Subject: [PATCH 530/930] [Keyboard] Add kudox via compatibility (#9875) * Modify VENDOR_ID of kudox-keyboard series. * Add via support for kudox/rev3. * Add via support for kudox/columner. * Add via support for kudox-game keyboard. * Remove info.json from kudox/rev1. * Revert kudox/rev1/info.json. * Remove redundancy spaces. * Add key_count on kudox/**/info.json. * Remove unsupported items from info.json. * Modify to use rgblight_mode from rgblight_mode_noeeprom * Remove unneed line from info.json * Revert keyboards/kudox/rev1/info.json --- keyboards/kudox/columner/config.h | 2 +- keyboards/kudox/columner/keymaps/via/keymap.c | 76 ++++++++++++++++++ .../kudox/columner/keymaps/via/readme.md | 1 + keyboards/kudox/columner/keymaps/via/rules.mk | 1 + keyboards/kudox/rev1/config.h | 2 +- keyboards/kudox/rev2/config.h | 2 +- keyboards/kudox/rev3/config.h | 2 +- keyboards/kudox/rev3/keymaps/default/keymap.c | 8 +- keyboards/kudox/rev3/keymaps/jis/keymap.c | 4 +- keyboards/kudox/rev3/keymaps/via/keymap.c | 77 ++++++++++++++++++ keyboards/kudox/rev3/keymaps/via/readme.md | 1 + keyboards/kudox/rev3/keymaps/via/rules.mk | 1 + keyboards/kudox_game/keymaps/default/keymap.c | 4 +- keyboards/kudox_game/keymaps/via/keymap.c | 78 +++++++++++++++++++ keyboards/kudox_game/keymaps/via/readme.md | 1 + keyboards/kudox_game/keymaps/via/rules.mk | 1 + keyboards/kudox_game/rev1/config.h | 2 +- keyboards/kudox_game/rev2/config.h | 2 +- 18 files changed, 251 insertions(+), 14 deletions(-) create mode 100644 keyboards/kudox/columner/keymaps/via/keymap.c create mode 100644 keyboards/kudox/columner/keymaps/via/readme.md create mode 100644 keyboards/kudox/columner/keymaps/via/rules.mk create mode 100644 keyboards/kudox/rev3/keymaps/via/keymap.c create mode 100644 keyboards/kudox/rev3/keymaps/via/readme.md create mode 100644 keyboards/kudox/rev3/keymaps/via/rules.mk create mode 100644 keyboards/kudox_game/keymaps/via/keymap.c create mode 100644 keyboards/kudox_game/keymaps/via/readme.md create mode 100644 keyboards/kudox_game/keymaps/via/rules.mk diff --git a/keyboards/kudox/columner/config.h b/keyboards/kudox/columner/config.h index a76bce09dafa..84e89b52a468 100644 --- a/keyboards/kudox/columner/config.h +++ b/keyboards/kudox/columner/config.h @@ -19,7 +19,7 @@ #include "config_common.h" /* USB Device descriptor parameter */ -#define VENDOR_ID 0xFEED +#define VENDOR_ID 0xABBA #define PRODUCT_ID 0x9691 #define DEVICE_VER 0x0100 #define MANUFACTURER Kumao Kobo diff --git a/keyboards/kudox/columner/keymaps/via/keymap.c b/keyboards/kudox/columner/keymaps/via/keymap.c new file mode 100644 index 000000000000..5a9527abeb30 --- /dev/null +++ b/keyboards/kudox/columner/keymaps/via/keymap.c @@ -0,0 +1,76 @@ +#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, + _FN1, + _FN2, + _FN3, +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [_BASE] = LAYOUT( + //┌────────┬────────┬────────┬────────┬────────┬────────┬────────┐ ┌────────┬────────┬────────┬────────┬────────┬────────┬────────┐ + KC_ESC ,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_BSPC , + //├────────┼────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┼────────┤ + KC_TAB ,KC_Q ,KC_W ,KC_E ,KC_R ,KC_T ,KC_MINS , KC_EQL ,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_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_LALT ,KC_QUOT ,KC_GRV ,KC_DEL ,MO(_FN1),KC_LGUI ,KC_SPC , KC_SPC ,KC_RGUI ,TO(_FN2),KC_LEFT ,KC_DOWN ,KC_UP ,KC_RGHT + //└────────┴────────┴────────┴────────┴────────┴────────┴────────┘ └────────┴────────┴────────┴────────┴────────┴────────┴────────┘ + ), + + [_FN1] = LAYOUT( + //┌────────┬────────┬────────┬────────┬────────┬────────┬────────┐ ┌────────┬────────┬────────┬────────┬────────┬────────┬────────┐ + KC_ESC ,KC_F1 ,KC_F2 ,KC_F3 ,KC_F4 ,KC_F5 ,KC_F11 , KC_F12 ,KC_F6 ,KC_F7 ,KC_F8 ,KC_F9 ,KC_F10 ,KC_DEL , + //├────────┼────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┼────────┤ + KC_TRNS ,KC_DQUO ,KC_QUOT ,KC_GRV ,KC_ASTR ,KC_PLUS ,KC_EQL , KC_LPRN ,KC_RPRN ,KC_PIPE ,KC_ASTR ,KC_TILD ,KC_CIRC ,KC_PIPE , + //├────────┼────────┼────────┼────────┼────────┼────────┼────────┘ └────────┼────────┼────────┼────────┼────────┼────────┼────────┤ + KC_TRNS ,KC_AT ,KC_COLN ,KC_GRV ,KC_SLSH ,KC_MINS , KC_LBRC ,KC_RBRC ,KC_DOT ,KC_SLSH ,KC_MINS ,KC_TRNS , + //├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤ + KC_TRNS ,XXXXXXX ,XXXXXXX ,XXXXXXX ,KC_DOT ,KC_SLSH , KC_LCBR ,KC_RCBR ,KC_TRNS ,KC_TRNS ,KC_CIRC ,KC_TRNS , + //├────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┴────────┼────────┼────────┼────────┤ + KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS , KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_LT ,KC_UNDS ,KC_CIRC ,KC_GT + //└────────┴────────┴────────┴────────┴────────┴────────┴────────┘ └────────┴────────┴────────┴────────┴────────┴────────┴────────┘ + ), + + [_FN2] = LAYOUT( + //┌────────┬────────┬────────┬────────┬────────┬────────┬────────┐ ┌────────┬────────┬────────┬────────┬────────┬────────┬────────┐ + KC_TRNS ,RGB_HUI ,RGB_HUD ,RGB_SAI ,RGB_SAD ,RGB_VAI ,RGB_VAD , RGB_HUI ,RGB_HUD ,RGB_SAI ,RGB_SAD ,RGB_VAI ,RGB_VAD ,XXXXXXX , + //├────────┼────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┼────────┤ + KC_TRNS ,RGB_M_P ,RGB_M_SW ,RGB_M_X,XXXXXXX ,XXXXXXX ,XXXXXXX , RGB_M_P ,RGB_M_SW,RGB_M_X ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX , + //├────────┼────────┼────────┼────────┼────────┼────────┼────────┘ └────────┼────────┼────────┼────────┼────────┼────────┼────────┤ + KC_TRNS ,RGB_M_B ,RGB_M_SN ,RGB_M_G,XXXXXXX ,XXXXXXX , RGB_M_B ,RGB_M_SN,RGB_M_G ,XXXXXXX ,XXXXXXX ,XXXXXXX , + //├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤ + KC_TRNS ,RGB_M_R ,RGB_M_K ,RGB_M_T ,XXXXXXX ,XXXXXXX , RGB_M_R ,RGB_M_K ,RGB_M_T ,XXXXXXX ,XXXXXXX ,XXXXXXX , + //├────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┴────────┼────────┼────────┼────────┤ + KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,RGB_MOD ,RGB_TOG , RGB_TOG ,RGB_MOD ,TO(_BASE),XXXXXXX,XXXXXXX ,XXXXXXX ,XXXXXXX + //└────────┴────────┴────────┴────────┴────────┴────────┴────────┘ └────────┴────────┴────────┴────────┴────────┴────────┴────────┘ + ), + + [_FN3] = 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_7 ,KC_8 ,KC_9 ,KC_ASTR ,KC_PLUS ,KC_TRNS , KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS , + //├────────┼────────┼────────┼────────┼────────┼────────┼────────┘ └────────┼────────┼────────┼────────┼────────┼────────┼────────┤ + KC_TRNS ,KC_4 ,KC_5 ,KC_6 ,KC_0 ,KC_MINS , KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS , + //├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤ + KC_TRNS ,KC_1 ,KC_2 ,KC_3 ,KC_DOT ,KC_SLSH , KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS , + //├────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┴────────┼────────┼────────┼────────┤ + KC_TRNS ,KC_TRNS ,KC_JYEN ,KC_0 ,KC_TRNS ,KC_TRNS ,KC_TRNS , KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS + //└────────┴────────┴────────┴────────┴────────┴────────┴────────┘ └────────┴────────┴────────┴────────┴────────┴────────┴────────┘ + ) +}; + +#ifdef RGBLIGHT_ENABLE +void eeconfig_init_user(void) { + rgblight_mode(RGBLIGHT_MODE_RAINBOW_SWIRL); +}; +#endif diff --git a/keyboards/kudox/columner/keymaps/via/readme.md b/keyboards/kudox/columner/keymaps/via/readme.md new file mode 100644 index 000000000000..152df04959fb --- /dev/null +++ b/keyboards/kudox/columner/keymaps/via/readme.md @@ -0,0 +1 @@ +# The default VIA keymap for Kudox Columner Keyboard diff --git a/keyboards/kudox/columner/keymaps/via/rules.mk b/keyboards/kudox/columner/keymaps/via/rules.mk new file mode 100644 index 000000000000..1e5b99807cb7 --- /dev/null +++ b/keyboards/kudox/columner/keymaps/via/rules.mk @@ -0,0 +1 @@ +VIA_ENABLE = yes diff --git a/keyboards/kudox/rev1/config.h b/keyboards/kudox/rev1/config.h index b57b6b7acbbf..079252181412 100644 --- a/keyboards/kudox/rev1/config.h +++ b/keyboards/kudox/rev1/config.h @@ -19,7 +19,7 @@ #include "config_common.h" /* USB Device descriptor parameter */ -#define VENDOR_ID 0xFEED +#define VENDOR_ID 0xABBA #define PRODUCT_ID 0x9690 #define DEVICE_VER 0x0100 #define MANUFACTURER Kumao Kobo diff --git a/keyboards/kudox/rev2/config.h b/keyboards/kudox/rev2/config.h index 3a0d608c226d..b1a0922f6c67 100644 --- a/keyboards/kudox/rev2/config.h +++ b/keyboards/kudox/rev2/config.h @@ -19,7 +19,7 @@ #include "config_common.h" /* USB Device descriptor parameter */ -#define VENDOR_ID 0xFEED +#define VENDOR_ID 0xABBA #define PRODUCT_ID 0x9690 #define DEVICE_VER 0x0200 #define MANUFACTURER Kumao Kobo diff --git a/keyboards/kudox/rev3/config.h b/keyboards/kudox/rev3/config.h index 88969feed9e7..5c1de6994f96 100644 --- a/keyboards/kudox/rev3/config.h +++ b/keyboards/kudox/rev3/config.h @@ -19,7 +19,7 @@ #include "config_common.h" /* USB Device descriptor parameter */ -#define VENDOR_ID 0xFEED +#define VENDOR_ID 0xABBA #define PRODUCT_ID 0x9690 #define DEVICE_VER 0x0300 #define MANUFACTURER Kumao Kobo diff --git a/keyboards/kudox/rev3/keymaps/default/keymap.c b/keyboards/kudox/rev3/keymaps/default/keymap.c index 53166e735507..e17f5a6bab7b 100644 --- a/keyboards/kudox/rev3/keymaps/default/keymap.c +++ b/keyboards/kudox/rev3/keymaps/default/keymap.c @@ -50,9 +50,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { //┌────────┬────────┬────────┬────────┬────────┬────────┬────────┐ ┌────────┬────────┬────────┬────────┬────────┬────────┬────────┐ _______ ,RGB_HUI ,RGB_HUD ,RGB_SAI ,RGB_SAD ,RGB_VAI ,RGB_VAD , RGB_HUI ,RGB_HUD ,RGB_SAI ,RGB_SAD ,RGB_VAI ,RGB_VAD ,XXXXXXX , //├────────┼────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┼────────┤ - _______ ,RGB_M_P ,RGB_M_SW ,RGB_M_X,XXXXXXX ,XXXXXXX ,XXXXXXX , RGB_M_P ,RGB_M_SW ,RGB_M_X ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX , + _______ ,RGB_M_P ,RGB_M_SW ,RGB_M_X,XXXXXXX ,XXXXXXX ,XXXXXXX , RGB_M_P ,RGB_M_SW ,RGB_M_X,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX , //├────────┼────────┼────────┼────────┼────────┼────────┼────────┘ └────────┼────────┼────────┼────────┼────────┼────────┼────────┤ - _______ ,RGB_M_B ,RGB_M_SN ,RGB_M_G,XXXXXXX ,XXXXXXX , RGB_M_B ,RGB_M_SN ,RGB_M_G ,XXXXXXX ,XXXXXXX ,XXXXXXX , + _______ ,RGB_M_B ,RGB_M_SN ,RGB_M_G,XXXXXXX ,XXXXXXX , RGB_M_B ,RGB_M_SN,RGB_M_G ,XXXXXXX ,XXXXXXX ,XXXXXXX , //├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤ _______ ,RGB_M_R ,RGB_M_K ,RGB_M_T ,XXXXXXX ,XXXXXXX , RGB_M_R ,RGB_M_K ,RGB_M_T ,XXXXXXX ,XXXXXXX ,XXXXXXX , //├────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┴────────┼────────┼────────┼────────┤ @@ -64,7 +64,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { #ifdef RGBLIGHT_ENABLE -void keyboard_post_init_user(void) { - rgblight_mode_noeeprom(RGBLIGHT_MODE_RAINBOW_SWIRL); +void eeconfig_init_user(void) { + rgblight_mode(RGBLIGHT_MODE_RAINBOW_SWIRL); }; #endif diff --git a/keyboards/kudox/rev3/keymaps/jis/keymap.c b/keyboards/kudox/rev3/keymaps/jis/keymap.c index bc1b3331056c..28ee3f9214df 100644 --- a/keyboards/kudox/rev3/keymaps/jis/keymap.c +++ b/keyboards/kudox/rev3/keymaps/jis/keymap.c @@ -64,7 +64,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { }; #ifdef RGBLIGHT_ENABLE -void keyboard_post_init_user(void) { - rgblight_mode_noeeprom(RGBLIGHT_MODE_RAINBOW_SWIRL); +void eeconfig_init_user(void) { + rgblight_mode(RGBLIGHT_MODE_RAINBOW_SWIRL); }; #endif diff --git a/keyboards/kudox/rev3/keymaps/via/keymap.c b/keyboards/kudox/rev3/keymaps/via/keymap.c new file mode 100644 index 000000000000..bf8148bb1bd8 --- /dev/null +++ b/keyboards/kudox/rev3/keymaps/via/keymap.c @@ -0,0 +1,77 @@ +#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, + _FN1, + _FN2, + _FN3, +}; + +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_TAB ,KC_Q ,KC_W ,KC_E ,KC_R ,KC_T ,KC_ESC , KC_Y ,KC_U ,KC_I ,KC_O ,KC_P ,KC_SLSH ,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_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_LALT ,KC_LBRC ,KC_RBRC ,MO(_FN1),KC_ENT ,KC_LGUI ,KC_SPC , KC_SPC ,KC_RGUI ,TO(_FN2),KC_LANG1,KC_LEFT, KC_DOWN ,KC_RIGHT + //└────────┴────────┴────────┴────────┴────────┴────────┴────────┘ └────────┴────────┴────────┴────────┴────────┴────────┴────────┘ + ), + + [_FN1] = 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_DEL , + //├────────┼────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┼────────┤ + KC_TRNS ,KC_DQUO ,KC_QUOT ,KC_GRV ,KC_ASTR ,KC_PLUS ,KC_EQL , KC_LPRN ,KC_RPRN ,KC_PIPE ,KC_ASTR ,KC_TILD ,KC_CIRC ,KC_PIPE , + //├────────┼────────┼────────┼────────┼────────┼────────┼────────┘ └────────┼────────┼────────┼────────┼────────┼────────┼────────┤ + KC_TRNS ,KC_AT ,KC_COLN ,KC_GRV ,KC_SLSH ,KC_MINS , KC_LBRC ,KC_RBRC ,KC_DOT ,KC_SLSH ,KC_MINS ,KC_TRNS , + //├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤ + KC_TRNS ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX , KC_LCBR ,KC_RCBR ,KC_TRNS ,KC_TRNS ,KC_CIRC ,KC_TRNS , + //├────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┴────────┼────────┼────────┼────────┤ + KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS , KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_LABK ,KC_UNDS ,KC_RABK + //└────────┴────────┴────────┴────────┴────────┴────────┴────────┘ └────────┴────────┴────────┴────────┴────────┴────────┴────────┘ + ), + + [_FN2] = LAYOUT( + //┌────────┬────────┬────────┬────────┬────────┬────────┬────────┐ ┌────────┬────────┬────────┬────────┬────────┬────────┬────────┐ + KC_TRNS ,RGB_HUI ,RGB_HUD ,RGB_SAI ,RGB_SAD ,RGB_VAI ,RGB_VAD , RGB_HUI ,RGB_HUD ,RGB_SAI ,RGB_SAD ,RGB_VAI ,RGB_VAD ,XXXXXXX , + //├────────┼────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┼────────┤ + KC_TRNS ,RGB_M_P ,RGB_M_SW ,RGB_M_X,XXXXXXX ,XXXXXXX ,XXXXXXX , RGB_M_P ,RGB_M_SW,RGB_M_X ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX , + //├────────┼────────┼────────┼────────┼────────┼────────┼────────┘ └────────┼────────┼────────┼────────┼────────┼────────┼────────┤ + KC_TRNS ,RGB_M_B ,RGB_M_SN ,RGB_M_G,XXXXXXX ,XXXXXXX , RGB_M_B ,RGB_M_SN,RGB_M_G ,XXXXXXX ,XXXXXXX ,XXXXXXX , + //├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤ + KC_TRNS ,RGB_M_R ,RGB_M_K ,RGB_M_T ,XXXXXXX ,XXXXXXX , RGB_M_R ,RGB_M_K ,RGB_M_T ,XXXXXXX ,XXXXXXX ,XXXXXXX , + //├────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┴────────┼────────┼────────┼────────┤ + KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,RGB_MOD ,RGB_TOG , RGB_TOG ,RGB_MOD ,TO(_BASE),XXXXXXX,XXXXXXX ,XXXXXXX ,XXXXXXX + //└────────┴────────┴────────┴────────┴────────┴────────┴────────┘ └────────┴────────┴────────┴────────┴────────┴────────┴────────┘ + ), + + [_FN3] = 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 + //└────────┴────────┴────────┴────────┴────────┴────────┴────────┘ └────────┴────────┴────────┴────────┴────────┴────────┴────────┘ + ) +}; + + +#ifdef RGBLIGHT_ENABLE +void eeconfig_init_user(void) { + rgblight_mode(RGBLIGHT_MODE_RAINBOW_SWIRL); +}; +#endif diff --git a/keyboards/kudox/rev3/keymaps/via/readme.md b/keyboards/kudox/rev3/keymaps/via/readme.md new file mode 100644 index 000000000000..cc95d79eacde --- /dev/null +++ b/keyboards/kudox/rev3/keymaps/via/readme.md @@ -0,0 +1 @@ +# The default VIA keymap for Kudox Keyboard Rev3.0 diff --git a/keyboards/kudox/rev3/keymaps/via/rules.mk b/keyboards/kudox/rev3/keymaps/via/rules.mk new file mode 100644 index 000000000000..1e5b99807cb7 --- /dev/null +++ b/keyboards/kudox/rev3/keymaps/via/rules.mk @@ -0,0 +1 @@ +VIA_ENABLE = yes diff --git a/keyboards/kudox_game/keymaps/default/keymap.c b/keyboards/kudox_game/keymaps/default/keymap.c index d7efeaed0196..aecf8976c2eb 100644 --- a/keyboards/kudox_game/keymaps/default/keymap.c +++ b/keyboards/kudox_game/keymaps/default/keymap.c @@ -65,7 +65,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { // Runs just one time when the keyboard initializes. #ifdef RGBLIGHT_ENABLE -void keyboard_post_init_user(void) { - rgblight_mode_noeeprom(RGBLIGHT_MODE_RAINBOW_SWIRL); +void eeconfig_init_user(void) { + rgblight_mode(RGBLIGHT_MODE_RAINBOW_SWIRL); }; #endif diff --git a/keyboards/kudox_game/keymaps/via/keymap.c b/keyboards/kudox_game/keymaps/via/keymap.c new file mode 100644 index 000000000000..0a18483d907d --- /dev/null +++ b/keyboards/kudox_game/keymaps/via/keymap.c @@ -0,0 +1,78 @@ +#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, + _FN1, + _FN2, + _FN3, +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [_BASE] = LAYOUT( + //┌──────────┬──────────┬──────────┬──────────┬──────────┬──────────┐ + KC_ESC ,KC_1 ,KC_2 ,KC_3 ,KC_4 ,KC_5 , + //└──────────┼──────────┼──────────┼──────────┼──────────┼──────────┤ + KC_Q ,KC_W ,KC_E ,KC_R ,KC_T , + //┌──────────┼──────────┼──────────┼──────────┼──────────┼──────────┼──────────┐ + LCTL(KC_C),LCTL(KC_V),KC_A ,KC_S ,KC_D ,KC_F ,KC_G , + //├──────────┼──────────┼──────────┴──────────┼──────────┼──────────┼──────────┤ + KC_LSFT ,KC_Z ,KC_X ,KC_C ,KC_V , + //├──────────┼──────────┘ └──────────┴──────────┼──────────┼──────────┐ + KC_LCTL ,TO(_FN1) ,KC_SPC + //└──────────┘ └──────────┴──────────┘ + ), + + [_FN1] = LAYOUT( + //┌──────────┬──────────┬──────────┬──────────┬──────────┬──────────┐ + KC_TRNS ,KC_6 ,KC_7 ,KC_8 ,KC_9 ,KC_0 , + //└──────────┼──────────┼──────────┼──────────┼──────────┼──────────┤ + KC_GRV ,KC_UP ,KC_PIPE ,KC_LCBR ,KC_RCBR , + //┌──────────┼──────────┼──────────┼──────────┼──────────┼──────────┼──────────┐ + KC_TRNS ,KC_TRNS ,KC_LEFT ,KC_DOWN ,KC_RIGHT ,KC_LBRC ,KC_RBRC , + //├──────────┼──────────┼──────────┴──────────┼──────────┼──────────┼──────────┤ + KC_TRNS ,KC_BSPC ,KC_DEL ,KC_LPRN ,KC_RPRN , + //├──────────┼──────────┘ └──────────┴──────────┼──────────┼──────────┐ + TO(_FN2) ,TO(_BASE) ,KC_TRNS + //└──────────┘ └──────────┴──────────┘ + ), + + [_FN2] = LAYOUT( + //┌──────────┬──────────┬──────────┬──────────┬──────────┬──────────┐ + KC_TRNS ,RGB_HUI ,RGB_HUD ,RGB_SAI ,RGB_SAD ,RGB_VAI , + //└──────────┼──────────┼──────────┼──────────┼──────────┼──────────┤ + RGB_M_P ,RGB_M_SW ,RGB_M_X ,RGB_M_B ,RGB_VAD , + //┌──────────┼──────────┼──────────┼──────────┼──────────┼──────────┼──────────┐ + KC_TRNS ,KC_TRNS ,RGB_M_SN ,RGB_M_G ,RGB_M_R ,RGB_M_K ,RGB_M_T , + //├──────────┼──────────┼──────────┴──────────┼──────────┼──────────┼──────────┤ + KC_TRNS ,RGB_M_T ,KC_DEL ,RGB_VAI ,RGB_VAD , + //├──────────┼──────────┘ └──────────┴──────────┼──────────┼──────────┐ + TO(_FN1) ,RGB_MOD ,RGB_TOG + //└──────────┘ └──────────┴──────────┘ + ), + + + [_FN3] = 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 + //└──────────┘ └──────────┴──────────┘ + ) +}; + + +#ifdef RGBLIGHT_ENABLE +void eeconfig_init_user(void) { + rgblight_mode(RGBLIGHT_MODE_RAINBOW_SWIRL); +}; +#endif diff --git a/keyboards/kudox_game/keymaps/via/readme.md b/keyboards/kudox_game/keymaps/via/readme.md new file mode 100644 index 000000000000..203474736cdf --- /dev/null +++ b/keyboards/kudox_game/keymaps/via/readme.md @@ -0,0 +1 @@ +# The default VIA keymap for Kudox Game Keyboard diff --git a/keyboards/kudox_game/keymaps/via/rules.mk b/keyboards/kudox_game/keymaps/via/rules.mk new file mode 100644 index 000000000000..1e5b99807cb7 --- /dev/null +++ b/keyboards/kudox_game/keymaps/via/rules.mk @@ -0,0 +1 @@ +VIA_ENABLE = yes diff --git a/keyboards/kudox_game/rev1/config.h b/keyboards/kudox_game/rev1/config.h index e7f7ad1b6263..9f1ea45ef2b9 100644 --- a/keyboards/kudox_game/rev1/config.h +++ b/keyboards/kudox_game/rev1/config.h @@ -20,7 +20,7 @@ along with this program. If not, see . #include "config_common.h" /* USB Device descriptor parameter */ -#define VENDOR_ID 0xFEED +#define VENDOR_ID 0xABBA #define PRODUCT_ID 0x9696 #define DEVICE_VER 0x0100 #define MANUFACTURER Kumao Kobo diff --git a/keyboards/kudox_game/rev2/config.h b/keyboards/kudox_game/rev2/config.h index 500f93280d99..ff3d7dc8b861 100644 --- a/keyboards/kudox_game/rev2/config.h +++ b/keyboards/kudox_game/rev2/config.h @@ -20,7 +20,7 @@ along with this program. If not, see . #include "config_common.h" /* USB Device descriptor parameter */ -#define VENDOR_ID 0xFEED +#define VENDOR_ID 0xABBA #define PRODUCT_ID 0x9696 #define DEVICE_VER 0x0200 #define MANUFACTURER Kumao Kobo From 997d1b2bb581fb93c6a42fbfc63c5fdb7e58588b Mon Sep 17 00:00:00 2001 From: NightlyBoards <65656486+NightlyBoards@users.noreply.github.com> Date: Fri, 7 Aug 2020 06:41:15 +0800 Subject: [PATCH 531/930] Added a via keymap folder for n87 (#9885) * Create Alter folder * Revert "Create Alter folder" This reverts commit 361103b821dbb22957b66cdedb0d11f996def71c. * Added a via keymap folder * Edited files based on requested changes --- .../nightly_boards/n87/keymaps/via/keymap.c | 52 +++++++++++++++++++ .../nightly_boards/n87/keymaps/via/rules.mk | 2 + keyboards/nightly_boards/n87/rules.mk | 22 ++++---- 3 files changed, 64 insertions(+), 12 deletions(-) create mode 100644 keyboards/nightly_boards/n87/keymaps/via/keymap.c create mode 100644 keyboards/nightly_boards/n87/keymaps/via/rules.mk diff --git a/keyboards/nightly_boards/n87/keymaps/via/keymap.c b/keyboards/nightly_boards/n87/keymaps/via/keymap.c new file mode 100644 index 000000000000..142d3c159264 --- /dev/null +++ b/keyboards/nightly_boards/n87/keymaps/via/keymap.c @@ -0,0 +1,52 @@ +/* Copyright 2020 Neil Brian Ramirez + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public 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] = { + /* Base */ + [0] = LAYOUT_tkl_ansi_split_bs_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_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_LSFT, MO(1), KC_UP, + KC_LCTL, MO(1), KC_LALT, KC_SPC, KC_LALT, KC_LGUI, KC_MENU, KC_LCTL, KC_LEFT, KC_DOWN, KC_RGHT + ), + [1] = LAYOUT_tkl_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, CLICKY_UP, CLICKY_RESET, 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, CLICKY_DOWN, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, CLICKY_TOGGLE, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, 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_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_VOLU, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_BRID, KC_VOLD, KC_BRIU + ), + [2] = LAYOUT_tkl_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, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 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_tkl_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, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 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/nightly_boards/n87/keymaps/via/rules.mk b/keyboards/nightly_boards/n87/keymaps/via/rules.mk new file mode 100644 index 000000000000..36b7ba9cbc98 --- /dev/null +++ b/keyboards/nightly_boards/n87/keymaps/via/rules.mk @@ -0,0 +1,2 @@ +VIA_ENABLE = yes +LTO_ENABLE = yes diff --git a/keyboards/nightly_boards/n87/rules.mk b/keyboards/nightly_boards/n87/rules.mk index e782e59186c5..b90ef02f3c52 100644 --- a/keyboards/nightly_boards/n87/rules.mk +++ b/keyboards/nightly_boards/n87/rules.mk @@ -15,18 +15,16 @@ BOOTLOADER = atmel-dfu # 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 +MOUSEKEY_ENABLE = yes # 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 -RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support -BLUETOOTH_ENABLE = no # Enable Bluetooth -AUDIO_ENABLE = yes # Audio output -FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches +NKRO_ENABLE = yes # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow +BLUETOOTH_ENABLE = no # Enable Bluetooth +AUDIO_ENABLE = yes # Audio output From c125d0a7a0daa539d425c6c01ace4175ebffa2f1 Mon Sep 17 00:00:00 2001 From: "Philip (Han) Suh" <36554396+phlopsuh@users.noreply.github.com> Date: Thu, 6 Aug 2020 20:20:11 -0700 Subject: [PATCH 532/930] [Keyboard] Re-initial commit of ztboards (#9869) * Re-initial commit of ztboards * Added info.json * Made changes to info.json * Update keyboards/ztboards/after/config.h * Update keyboards/ztboards/after/rules.mk * Update keyboards/ztboards/noon/rules.mk * Update keyboards/ztboards/noon/config.h * Update keyboards/ztboards/after/config.h * Update keyboards/ztboards/noon/config.h * Update keyboards/ztboards/after/config.h * Update keyboards/ztboards/after/info.json * Update keyboards/ztboards/noon/info.json * Update noon.h * Update keymap.c * Update keymap.c * Update keymap.c * Update keymap.c * Update noon.h * Update keymap.c * Update keymap.c * Update noon.h --- keyboards/ztboards/after/after.c | 18 ++++++ keyboards/ztboards/after/after.h | 17 ++++++ keyboards/ztboards/after/config.h | 49 +++++++++++++++++ keyboards/ztboards/after/info.json | 12 ++++ .../ztboards/after/keymaps/default/keymap.c | 55 +++++++++++++++++++ .../ztboards/after/keymaps/ellicose/keymap.c | 55 +++++++++++++++++++ .../ztboards/after/keymaps/phlop/keymap.c | 42 ++++++++++++++ keyboards/ztboards/after/readme.md | 15 +++++ keyboards/ztboards/after/rules.mk | 23 ++++++++ keyboards/ztboards/noon/config.h | 47 ++++++++++++++++ keyboards/ztboards/noon/info.json | 12 ++++ .../ztboards/noon/keymaps/default/keymap.c | 20 +++++++ keyboards/ztboards/noon/keymaps/via/keymap.c | 37 +++++++++++++ keyboards/ztboards/noon/keymaps/via/rules.mk | 2 + keyboards/ztboards/noon/noon.c | 19 +++++++ keyboards/ztboards/noon/noon.h | 17 ++++++ keyboards/ztboards/noon/readme.md | 15 +++++ keyboards/ztboards/noon/rules.mk | 22 ++++++++ 18 files changed, 477 insertions(+) create mode 100644 keyboards/ztboards/after/after.c create mode 100644 keyboards/ztboards/after/after.h create mode 100644 keyboards/ztboards/after/config.h create mode 100644 keyboards/ztboards/after/info.json create mode 100644 keyboards/ztboards/after/keymaps/default/keymap.c create mode 100644 keyboards/ztboards/after/keymaps/ellicose/keymap.c create mode 100644 keyboards/ztboards/after/keymaps/phlop/keymap.c create mode 100644 keyboards/ztboards/after/readme.md create mode 100644 keyboards/ztboards/after/rules.mk create mode 100644 keyboards/ztboards/noon/config.h create mode 100644 keyboards/ztboards/noon/info.json create mode 100644 keyboards/ztboards/noon/keymaps/default/keymap.c create mode 100644 keyboards/ztboards/noon/keymaps/via/keymap.c create mode 100644 keyboards/ztboards/noon/keymaps/via/rules.mk create mode 100644 keyboards/ztboards/noon/noon.c create mode 100644 keyboards/ztboards/noon/noon.h create mode 100644 keyboards/ztboards/noon/readme.md create mode 100644 keyboards/ztboards/noon/rules.mk diff --git a/keyboards/ztboards/after/after.c b/keyboards/ztboards/after/after.c new file mode 100644 index 000000000000..85278d342afb --- /dev/null +++ b/keyboards/ztboards/after/after.c @@ -0,0 +1,18 @@ +/* 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 "after.h" + diff --git a/keyboards/ztboards/after/after.h b/keyboards/ztboards/after/after.h new file mode 100644 index 000000000000..b8f68f756adc --- /dev/null +++ b/keyboards/ztboards/after/after.h @@ -0,0 +1,17 @@ +#pragma once +#include "quantum.h" + + +#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, K115, \ + K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K215, \ + K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K312, K313, K315, \ + K400, K402, K405, K409, K410, K412, K413, 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, KC_NO, K115 }, \ + { K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, KC_NO, KC_NO, K215 }, \ + { K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, KC_NO, K312, K313, KC_NO, K315 }, \ + { K400, KC_NO, K402, KC_NO, KC_NO, K405, KC_NO, KC_NO, KC_NO, K409, K410, KC_NO, K412, K413, KC_NO, K415 } \ +} diff --git a/keyboards/ztboards/after/config.h b/keyboards/ztboards/after/config.h new file mode 100644 index 000000000000..d5497dd6d070 --- /dev/null +++ b/keyboards/ztboards/after/config.h @@ -0,0 +1,49 @@ +/* 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" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0x0927 // ZT Boards +#define PRODUCT_ID 0x0001 +#define DEVICE_VER 0x0001 +#define MANUFACTURER ZTBoards +#define PRODUCT After + +/* key matrix size */ +#define MATRIX_ROWS 5 +#define MATRIX_COLS 16 + +/* key matrix pins */ +#define MATRIX_ROW_PINS { B3, F6, F5, D5, B2 } +#define MATRIX_COL_PINS { D0, D1, D2, D3, D7, D6, D4, C7, C6, B6, B5, B4, F7, F0, F4, F1 } +#define UNUSED_PINS +#define ENCODERS_PAD_A { B1 } +#define ENCODERS_PAD_B { B0 } + +/* 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/ztboards/after/info.json b/keyboards/ztboards/after/info.json new file mode 100644 index 000000000000..f702ea035989 --- /dev/null +++ b/keyboards/ztboards/after/info.json @@ -0,0 +1,12 @@ +{ + "keyboard_name": "ZTBoards After", + "url": "ztboards.myshopify.com", + "maintainer": "phlopsuh", + "width": 16, + "height": 5, + "layouts": { + "LAYOUT_all": { + "layout": [{"label":"Rotary", "x":15.5, "y":0.5}, {"label":"Esc", "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":"~", "x":13, "y":1}, {"label":"|", "x":14, "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":"Del", "x":15.5, "y":2}, {"label":"Caps Lock", "x":0, "y":3, "w":1.25}, {"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":"Pg Up", "x":15.5, "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":"Pg Dn", "x":15.5, "y":4}, {"label":"Up", "x":14.25, "y":4.25}, {"label":"Ctrl", "x":0, "y":5, "w":1.5}, {"label":"Alt", "x":2.25, "y":5, "w":1.5}, {"x":3.75, "y":5, "w":6.25}, {"label":"Alt", "x":10, "y":5, "w":1.5}, {"label":"Ctrl", "x":11.5, "y":5, "w":1.5}, {"label":"Left", "x":13.25, "y":5.25}, {"label":"Down", "x":14.25, "y":5.25}, {"label":"Right", "x":15.25, "y":5.25}] + } + } +} diff --git a/keyboards/ztboards/after/keymaps/default/keymap.c b/keyboards/ztboards/after/keymaps/default/keymap.c new file mode 100644 index 000000000000..e014b3a98585 --- /dev/null +++ b/keyboards/ztboards/after/keymaps/default/keymap.c @@ -0,0 +1,55 @@ +#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_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_RSFT, KC_UP , KC_DEL , + KC_LCTL, KC_LALT, KC_SPC, MO(1), KC_RCTL, 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, KC_INS, 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, KC_TRNS, KC_TRNS + ) +}; + + +void encoder_update_user(uint8_t index, bool clockwise) { + /* Custom encoder control - handles CW/CCW turning of encoder + * Default behavior: + * main layer: + * CW: move mouse right + * CCW: move mouse left + * other layers: + * CW: = (equals/plus - increase slider in Adobe products) + * CCW: - (minus/underscore - decrease slider in adobe products) + * Thank you to imchipwood/dumbpad for defining this. + */ + if (index == 0) { + switch (get_highest_layer(layer_state)) { + case 1: + // main layer - move mouse right (CW) and left (CCW) + if (clockwise) { + tap_code(KC_MS_R); + } else { + tap_code(KC_MS_L); + } + break; + + default: + // other layers - =/+ (quals/plus) (CW) and -/_ (minus/underscore) (CCW) + if (clockwise) { + tap_code(KC_EQL); + } else { + tap_code(KC_MINS); + } + break; + } + } +} diff --git a/keyboards/ztboards/after/keymaps/ellicose/keymap.c b/keyboards/ztboards/after/keymaps/ellicose/keymap.c new file mode 100644 index 000000000000..b7e65bbf149c --- /dev/null +++ b/keyboards/ztboards/after/keymaps/ellicose/keymap.c @@ -0,0 +1,55 @@ +#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_BSLS, KC_GRV, KC_AUDIO_MUTE , + KC_TAB, KC_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 , MO(1) , + KC_CAPS, KC_LALT, KC_SPC, KC_RGUI, 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, KC_INS, KC_DEL, 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 + ) +}; + + +void encoder_update_user(uint8_t index, bool clockwise) { + /* Custom encoder control - handles CW/CCW turning of encoder + * Default behavior: + * main layer: + * CW: move mouse right + * CCW: move mouse left + * other layers: + * CW: = (equals/plus - increase slider in Adobe products) + * CCW: - (minus/underscore - decrease slider in adobe products) + * Thank you to imchipwood/dumbpad for defining this. + */ + if (index == 0) { + switch(get_highest_layer(layer_state)) { + case 1: + // main layer - move mouse right (CW) and left (CCW) + if (clockwise) { + tap_code(KC_BRIGHTNESS_UP); + } else { + tap_code(KC_BRIGHTNESS_DOWN); + } + break; + + default: + // other layers - =/+ (quals/plus) (CW) and -/_ (minus/underscore) (CCW) + if (clockwise) { + tap_code(KC_AUDIO_VOL_UP); + } else { + tap_code(KC_AUDIO_VOL_DOWN); + } + break; + } + } +} diff --git a/keyboards/ztboards/after/keymaps/phlop/keymap.c b/keyboards/ztboards/after/keymaps/phlop/keymap.c new file mode 100644 index 000000000000..15a91d51ad1c --- /dev/null +++ b/keyboards/ztboards/after/keymaps/phlop/keymap.c @@ -0,0 +1,42 @@ +#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_BSLS, KC_GRV, 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 , + 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 , MO(1) , + KC_LCTL, KC_LALT, KC_SPC, KC_RGUI, KC_RCTL, 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, KC_INS, KC_DEL, 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 + ) +}; + + +void encoder_update_user(uint8_t index, bool clockwise) { + if (index == 0) { + switch(get_highest_layer(layer_state)) { + case 1: //EDIT THESE FOR THE ENCODER'S FUNCTION WHEN PRESSING MO(1) + if (clockwise) { + tap_code16 (KC_VOLU); + } else { + tap_code16(KC_VOLD); + } + break; + // default: //EDIT THESE FOR THE ENCODER'S FUNCTIONS ON DEFAULT LAYER + if (clockwise) { + tap_code16(KC_VOLU); + } else { + tap_code16(KC_VOLD); + } + break; + } + } +}; diff --git a/keyboards/ztboards/after/readme.md b/keyboards/ztboards/after/readme.md new file mode 100644 index 000000000000..6dc2bc783afd --- /dev/null +++ b/keyboards/ztboards/after/readme.md @@ -0,0 +1,15 @@ +# After + +A 65% keyboard made by ZTBoards and run in a Geekhack group buy. + +* Keyboard Maintainer: ZTBoards +* Hardware Supported: After QMK PCB +* Hardware Availability: https://geekhack.org/index.php?topic=107414.msg2930924#msg2930924 + +Make example for this keyboard (after setting up your build environment): + + make ztboards/after: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). + +Esc + plugging in will put the keyboard into bootloader. \ No newline at end of file diff --git a/keyboards/ztboards/after/rules.mk b/keyboards/ztboards/after/rules.mk new file mode 100644 index 000000000000..6edb6ea54cbd --- /dev/null +++ b/keyboards/ztboards/after/rules.mk @@ -0,0 +1,23 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +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 = no # Enable keyboard RGB underglow +BLUETOOTH_ENABLE = no # Enable Bluetooth +AUDIO_ENABLE = no # Audio output +ENCODER_ENABLE = yes # Rotary Encoder use diff --git a/keyboards/ztboards/noon/config.h b/keyboards/ztboards/noon/config.h new file mode 100644 index 000000000000..0928665f40ec --- /dev/null +++ b/keyboards/ztboards/noon/config.h @@ -0,0 +1,47 @@ +/* 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" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0x0927 //ZT Boards +#define PRODUCT_ID 0x0002 +#define DEVICE_VER 0x0001 +#define MANUFACTURER ZTBoards +#define PRODUCT Noon + +/* key matrix size */ +#define MATRIX_ROWS 5 +#define MATRIX_COLS 16 + +/* key matrix pins */ +#define MATRIX_ROW_PINS { B5, D5, D3, B1, F0 } +#define MATRIX_COL_PINS { D2, D1, D0, D4, D6, B2, D7, B4, B6, C6, C7, F7, F6, F5, F4, F1 } +#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/ztboards/noon/info.json b/keyboards/ztboards/noon/info.json new file mode 100644 index 000000000000..cbc561f8d1b7 --- /dev/null +++ b/keyboards/ztboards/noon/info.json @@ -0,0 +1,12 @@ +{ + "keyboard_name": "ZTBoards Noon", + "url": "ztboards.myshopify.com", + "maintainer": "phlopsuh", + "width": 16, + "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":"~", "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":"Pg Up", "x":15, "y":1}, {"label":"Caps Lock", "x":0, "y":2, "w":1.25}, {"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":"Pg Dn", "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":"Del", "x":15, "y":3}, {"label":"Ctrl", "x":0, "y":4, "w":1.5}, {"label":"Alt", "x":2.25, "y":4, "w":1.5}, {"x":3.75, "y":4, "w":7}, {"label":"Alt", "x":10.75, "y":4, "w":1.5}, {"label":"Left", "x":13, "y":4}, {"label":"Down", "x":14, "y":4}, {"label":"Right", "x":15, "y":4}] + } + } +} diff --git a/keyboards/ztboards/noon/keymaps/default/keymap.c b/keyboards/ztboards/noon/keymaps/default/keymap.c new file mode 100644 index 000000000000..cc8ab8df056a --- /dev/null +++ b/keyboards/ztboards/noon/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_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_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_DEL , + KC_LCTL, KC_LALT, KC_SPC, 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, KC_INS, 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 + ) +}; diff --git a/keyboards/ztboards/noon/keymaps/via/keymap.c b/keyboards/ztboards/noon/keymaps/via/keymap.c new file mode 100644 index 000000000000..46bbc5598698 --- /dev/null +++ b/keyboards/ztboards/noon/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_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_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_DEL , + KC_LCTL, KC_LALT, KC_SPC, 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, KC_INS, 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 + ), + + [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/ztboards/noon/keymaps/via/rules.mk b/keyboards/ztboards/noon/keymaps/via/rules.mk new file mode 100644 index 000000000000..43061db1dd46 --- /dev/null +++ b/keyboards/ztboards/noon/keymaps/via/rules.mk @@ -0,0 +1,2 @@ +VIA_ENABLE = yes +LTO_ENABLE = yes \ No newline at end of file diff --git a/keyboards/ztboards/noon/noon.c b/keyboards/ztboards/noon/noon.c new file mode 100644 index 000000000000..8a60850d075a --- /dev/null +++ b/keyboards/ztboards/noon/noon.c @@ -0,0 +1,19 @@ +/* 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 "noon.h" + + diff --git a/keyboards/ztboards/noon/noon.h b/keyboards/ztboards/noon/noon.h new file mode 100644 index 000000000000..a38ad1f0cb5e --- /dev/null +++ b/keyboards/ztboards/noon/noon.h @@ -0,0 +1,17 @@ +#pragma once +#include "quantum.h" + + +#define LAYOUT_all( \ + 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, K115, \ + K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K215, \ + K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K313, K315, \ + K400, K402, K405, K410, K411, K413, K415 \ +) { \ + { 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, K115 }, \ + { K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, KC_NO, KC_NO, K215 }, \ + { K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, KC_NO, K313, KC_NO, K315 }, \ + { K400, K402, KC_NO, KC_NO, K405, KC_NO, KC_NO, KC_NO, KC_NO, K410, K411, KC_NO, K413, KC_NO, K415 } \ +} diff --git a/keyboards/ztboards/noon/readme.md b/keyboards/ztboards/noon/readme.md new file mode 100644 index 000000000000..96b2bcd8ded8 --- /dev/null +++ b/keyboards/ztboards/noon/readme.md @@ -0,0 +1,15 @@ +# Noon + +A 65% keyboard made by ZTBoards and run in a Geekhack group buy. + +* Keyboard Maintainer: ZTBoards +* Hardware Supported: Noon QMK PCB +* Hardware Availability: https://geekhack.org/index.php?topic=107414.msg2930924#msg2930924 + +Make example for this keyboard (after setting up your build environment): + + make ztboards/noon: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). + +Esc + plugging in will put the keyboard into bootloader. \ No newline at end of file diff --git a/keyboards/ztboards/noon/rules.mk b/keyboards/ztboards/noon/rules.mk new file mode 100644 index 000000000000..32981133b2eb --- /dev/null +++ b/keyboards/ztboards/noon/rules.mk @@ -0,0 +1,22 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +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 = no # Enable keyboard RGB underglow +BLUETOOTH_ENABLE = no # Enable Bluetooth +AUDIO_ENABLE = no # Audio output From 2d8703f6cc61918aaefd3ce04a064a82ab238140 Mon Sep 17 00:00:00 2001 From: kb-elmo Date: Fri, 7 Aug 2020 05:47:00 +0200 Subject: [PATCH 533/930] [Keyboard] add kb-elmo boards (#9898) * add kb-elmo boards * Apply suggestions from code review * Apply suggestions from code review * Apply suggestions from code review * fix wrong names * fix VID and UID --- keyboards/kb_elmo/aek2_usb/aek2_usb.c | 37 ++++++ keyboards/kb_elmo/aek2_usb/aek2_usb.h | 45 +++++++ keyboards/kb_elmo/aek2_usb/config.h | 49 ++++++++ keyboards/kb_elmo/aek2_usb/info.json | 118 ++++++++++++++++++ .../kb_elmo/aek2_usb/keymaps/default/keymap.c | 36 ++++++ keyboards/kb_elmo/aek2_usb/readme.md | 15 +++ keyboards/kb_elmo/aek2_usb/rules.mk | 25 ++++ keyboards/kb_elmo/elmopad/config.h | 44 +++++++ keyboards/kb_elmo/elmopad/elmopad.c | 17 +++ keyboards/kb_elmo/elmopad/elmopad.h | 43 +++++++ keyboards/kb_elmo/elmopad/info.json | 34 +++++ .../kb_elmo/elmopad/keymaps/default/keymap.c | 28 +++++ keyboards/kb_elmo/elmopad/readme.md | 15 +++ keyboards/kb_elmo/elmopad/rules.mk | 27 ++++ keyboards/kb_elmo/m0110a_usb/config.h | 49 ++++++++ keyboards/kb_elmo/m0110a_usb/info.json | 91 ++++++++++++++ .../m0110a_usb/keymaps/default/keymap.c | 34 +++++ keyboards/kb_elmo/m0110a_usb/m0110a_usb.c | 17 +++ keyboards/kb_elmo/m0110a_usb/m0110a_usb.h | 41 ++++++ keyboards/kb_elmo/m0110a_usb/readme.md | 15 +++ keyboards/kb_elmo/m0110a_usb/rules.mk | 25 ++++ keyboards/kb_elmo/m0116_usb/config.h | 53 ++++++++ keyboards/kb_elmo/m0116_usb/info.json | 94 ++++++++++++++ .../m0116_usb/keymaps/default/keymap.c | 36 ++++++ keyboards/kb_elmo/m0116_usb/m0116_usb.c | 17 +++ keyboards/kb_elmo/m0116_usb/m0116_usb.h | 42 +++++++ keyboards/kb_elmo/m0116_usb/readme.md | 15 +++ keyboards/kb_elmo/m0116_usb/rules.mk | 25 ++++ keyboards/kb_elmo/sesame/config.h | 48 +++++++ keyboards/kb_elmo/sesame/info.json | 78 ++++++++++++ .../kb_elmo/sesame/keymaps/default/keymap.c | 34 +++++ keyboards/kb_elmo/sesame/readme.md | 15 +++ keyboards/kb_elmo/sesame/rules.mk | 25 ++++ keyboards/kb_elmo/sesame/sesame.c | 17 +++ keyboards/kb_elmo/sesame/sesame.h | 41 ++++++ 35 files changed, 1345 insertions(+) create mode 100644 keyboards/kb_elmo/aek2_usb/aek2_usb.c create mode 100644 keyboards/kb_elmo/aek2_usb/aek2_usb.h create mode 100644 keyboards/kb_elmo/aek2_usb/config.h create mode 100644 keyboards/kb_elmo/aek2_usb/info.json create mode 100644 keyboards/kb_elmo/aek2_usb/keymaps/default/keymap.c create mode 100644 keyboards/kb_elmo/aek2_usb/readme.md create mode 100644 keyboards/kb_elmo/aek2_usb/rules.mk create mode 100644 keyboards/kb_elmo/elmopad/config.h create mode 100644 keyboards/kb_elmo/elmopad/elmopad.c create mode 100644 keyboards/kb_elmo/elmopad/elmopad.h create mode 100644 keyboards/kb_elmo/elmopad/info.json create mode 100644 keyboards/kb_elmo/elmopad/keymaps/default/keymap.c create mode 100644 keyboards/kb_elmo/elmopad/readme.md create mode 100644 keyboards/kb_elmo/elmopad/rules.mk create mode 100644 keyboards/kb_elmo/m0110a_usb/config.h create mode 100644 keyboards/kb_elmo/m0110a_usb/info.json create mode 100644 keyboards/kb_elmo/m0110a_usb/keymaps/default/keymap.c create mode 100644 keyboards/kb_elmo/m0110a_usb/m0110a_usb.c create mode 100644 keyboards/kb_elmo/m0110a_usb/m0110a_usb.h create mode 100644 keyboards/kb_elmo/m0110a_usb/readme.md create mode 100644 keyboards/kb_elmo/m0110a_usb/rules.mk create mode 100644 keyboards/kb_elmo/m0116_usb/config.h create mode 100644 keyboards/kb_elmo/m0116_usb/info.json create mode 100644 keyboards/kb_elmo/m0116_usb/keymaps/default/keymap.c create mode 100644 keyboards/kb_elmo/m0116_usb/m0116_usb.c create mode 100644 keyboards/kb_elmo/m0116_usb/m0116_usb.h create mode 100644 keyboards/kb_elmo/m0116_usb/readme.md create mode 100644 keyboards/kb_elmo/m0116_usb/rules.mk create mode 100644 keyboards/kb_elmo/sesame/config.h create mode 100644 keyboards/kb_elmo/sesame/info.json create mode 100644 keyboards/kb_elmo/sesame/keymaps/default/keymap.c create mode 100644 keyboards/kb_elmo/sesame/readme.md create mode 100644 keyboards/kb_elmo/sesame/rules.mk create mode 100644 keyboards/kb_elmo/sesame/sesame.c create mode 100644 keyboards/kb_elmo/sesame/sesame.h diff --git a/keyboards/kb_elmo/aek2_usb/aek2_usb.c b/keyboards/kb_elmo/aek2_usb/aek2_usb.c new file mode 100644 index 000000000000..b83faf5dad5d --- /dev/null +++ b/keyboards/kb_elmo/aek2_usb/aek2_usb.c @@ -0,0 +1,37 @@ +/* Copyright 2020 kb-elmo + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#include "aek2_usb.h" + +void keyboard_pre_init_kb(void) { + led_init_ports(); + keyboard_pre_init_user(); +} + +void led_init_ports(void) { + setPinOutput(B0); + setPinOutput(B1); + setPinOutput(B2); +} + +bool led_update_kb(led_t led_state) { + if (led_update_user(led_state)) { + writePin(B0, led_state.scroll_lock); + writePin(B1, led_state.caps_lock); + writePin(B2, led_state.num_lock); + } + return true; +} \ No newline at end of file diff --git a/keyboards/kb_elmo/aek2_usb/aek2_usb.h b/keyboards/kb_elmo/aek2_usb/aek2_usb.h new file mode 100644 index 000000000000..37c252f29a8c --- /dev/null +++ b/keyboards/kb_elmo/aek2_usb/aek2_usb.h @@ -0,0 +1,45 @@ +/* Copyright 2020 kb-elmo + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License 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( \ + k01, k02, k03, k04, k05, k06, k07, k08, k09, k10, k11, k52, k12, k105, k91, k90, k84, \ + k13, k14, k15, k16, k17, k18, k19, k20, k21, k22, k23, k24, k25, k26, k104, k78, k79, k80, k81, k83, k85, \ + k27, k28, k29, k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k40, k92, k93, k94, k95, k82, k97, k99, \ + k41, k42, k43, k44, k45, k46, k47, k48, k49, k50, k51, k53, k54, k89, k96, k98, k86, \ + k55, k56, k57, k58, k59, k60, k61, k62, k63, k64, k65, k66, k73, k103, k88, k87, \ + k67, k68, k69, k70, k75, k76, k77, k72, k74, k71, k102, k101, k100 \ +) { \ + { k01, KC_NO, k02, k03, k04, k05, k06, k07, k08, k09, KC_NO, 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, KC_NO, KC_NO, k66 }, \ + { k67, k68, k69, KC_NO, KC_NO, k70, k71, k72, k73, k74, k75, k76, KC_NO, k77 }, \ + { k78, k79, k80, k81, k82, k83, k84, k85, k86, k87, k88, k89, k90, k91 }, \ + { k92, k93, k94, k95, k96, k97, k98, k99, k100, k101, k102, k103, k104, k105 } \ +} diff --git a/keyboards/kb_elmo/aek2_usb/config.h b/keyboards/kb_elmo/aek2_usb/config.h new file mode 100644 index 000000000000..f7b347f1db5d --- /dev/null +++ b/keyboards/kb_elmo/aek2_usb/config.h @@ -0,0 +1,49 @@ +/* +Copyright 2020 kb-elmo + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License 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 0xA68C +#define PRODUCT_ID 0xDB52 +#define DEVICE_VER 0x0001 +#define MANUFACTURER kb-elmo +#define PRODUCT AEK II USB + +/* key matrix size */ +#define MATRIX_ROWS 8 +#define MATRIX_COLS 14 + +/* + * Keyboard Matrix Assignments + */ +#define MATRIX_ROW_PINS { D5, C1, C4, D0, C3, C2, B3, B4 } +#define MATRIX_COL_PINS { A1, A0, A2, A3, A4, A5, A6, A7, C7, C6, C5, C0, D6, D1 } +#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/kb_elmo/aek2_usb/info.json b/keyboards/kb_elmo/aek2_usb/info.json new file mode 100644 index 000000000000..7a15742f08b4 --- /dev/null +++ b/keyboards/kb_elmo/aek2_usb/info.json @@ -0,0 +1,118 @@ +{ + "keyboard_name": "aek 2 usb", + "url": "https://github.com/kb-elmo/aek2_usb", + "maintainer": "kb-elmo", + "width": 23, + "height": 7, + "layouts": { + "LAYOUT": { + "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.5, "y":0}, + {"x":16.5, "y":0}, + {"x":17.5, "y":0}, + {"x":22, "y":0}, + {"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":12, "y":2}, + {"x":13, "y":2, "w":2}, + {"x":15.5, "y":2}, + {"x":16.5, "y":2}, + {"x":17.5, "y":2}, + {"x":19, "y":2}, + {"x":20, "y":2}, + {"x":21, "y":2}, + {"x":22, "y":2}, + {"x":0, "y":3, "w":1.5}, + {"x":1.5, "y":3}, + {"x":2.5, "y":3}, + {"x":3.5, "y":3}, + {"x":4.5, "y":3}, + {"x":5.5, "y":3}, + {"x":6.5, "y":3}, + {"x":7.5, "y":3}, + {"x":8.5, "y":3}, + {"x":9.5, "y":3}, + {"x":10.5, "y":3}, + {"x":11.5, "y":3}, + {"x":12.5, "y":3}, + {"x":13.5, "y":3, "w":1.5}, + {"x":15.5, "y":3}, + {"x":16.5, "y":3}, + {"x":17.5, "y":3}, + {"x":19, "y":3}, + {"x":20, "y":3}, + {"x":21, "y":3}, + {"x":22, "y":3}, + {"x":0, "y":4, "w":1.75}, + {"x":1.75, "y":4}, + {"x":2.75, "y":4}, + {"x":3.75, "y":4}, + {"x":4.75, "y":4}, + {"x":5.75, "y":4}, + {"x":6.75, "y":4}, + {"x":7.75, "y":4}, + {"x":8.75, "y":4}, + {"x":9.75, "y":4}, + {"x":10.75, "y":4}, + {"x":11.75, "y":4}, + {"x":12.75, "y":4, "w":2.25}, + {"x":19, "y":4}, + {"x":20, "y":4}, + {"x":21, "y":4}, + {"x":22, "y":4}, + {"x":0, "y":5, "w":2.25}, + {"x":2.25, "y":5}, + {"x":3.25, "y":5}, + {"x":4.25, "y":5}, + {"x":5.25, "y":5}, + {"x":6.25, "y":5}, + {"x":7.25, "y":5}, + {"x":8.25, "y":5}, + {"x":9.25, "y":5}, + {"x":10.25, "y":5}, + {"x":11.25, "y":5}, + {"x":12.25, "y":5, "w":2.75}, + {"x":16.5, "y":5}, + {"x":19, "y":5}, + {"x":20, "y":5}, + {"x":21, "y":5}, + {"x":22, "y":5, "h":2}, + {"x":0, "y":6, "w":1.5}, + {"x":1.5, "y":6, "w":1.25}, + {"x":2.75, "y":6, "w":1.5}, + {"x":4.25, "y":6, "w":6.5}, + {"x":10.75, "y":6, "w":1.5}, + {"x":12.25, "y":6, "w":1.25}, + {"x":13.5, "y":6, "w":1.5}, + {"x":15.5, "y":6}, + {"x":16.5, "y":6}, + {"x":17.5, "y":6}, + {"x":19, "y":6, "w":2}, + {"x":21, "y":6} + ] + } + } +} \ No newline at end of file diff --git a/keyboards/kb_elmo/aek2_usb/keymaps/default/keymap.c b/keyboards/kb_elmo/aek2_usb/keymaps/default/keymap.c new file mode 100644 index 000000000000..c5ff48e23ed6 --- /dev/null +++ b/keyboards/kb_elmo/aek2_usb/keymaps/default/keymap.c @@ -0,0 +1,36 @@ +/* Copyright 2020 kb-elmo + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public 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] = { + /* Base */ + [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_MPLY, + 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_NLCK, KC_PEQL, KC_PSLS, KC_PAST, + KC_TAB, KC_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_P7, KC_P8, KC_P9, KC_PMNS, + 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, KC_P4, KC_P5, KC_P6, KC_PPLS, + 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_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT, KC_P0, KC_PDOT, KC_PENT + ), + [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, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_VOLD, KC_VOLU, KC_MUTE, KC_MPRV, KC_MNXT, 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, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ) +}; diff --git a/keyboards/kb_elmo/aek2_usb/readme.md b/keyboards/kb_elmo/aek2_usb/readme.md new file mode 100644 index 000000000000..ccbd4ac89a11 --- /dev/null +++ b/keyboards/kb_elmo/aek2_usb/readme.md @@ -0,0 +1,15 @@ +# AEK 2 USB + +![aek2usb](https://i.imgur.com/3325BHBl.jpg) + +Drop in replacement PCB for the Apple Extended Keyboard II + +* Keyboard Maintainer: [kb-elmo](https://github.com/kb-elmo) +* Hardware Supported: AEK 2 USB +* Hardware Availability: [Project is open source](https://github.com/kb-elmo/aek2_usb) + +Make example for this keyboard (after setting up your build environment): + + make kb_elmo/aek2_usb: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/kb_elmo/aek2_usb/rules.mk b/keyboards/kb_elmo/aek2_usb/rules.mk new file mode 100644 index 000000000000..e5b427e5a521 --- /dev/null +++ b/keyboards/kb_elmo/aek2_usb/rules.mk @@ -0,0 +1,25 @@ +# MCU name +MCU = atmega32a + +# Processor frequency +F_CPU = 16000000 + +# Bootloader selection +BOOTLOADER = USBasp + +# 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 +BLUETOOTH_ENABLE = no # Enable Bluetooth +AUDIO_ENABLE = no # Audio output diff --git a/keyboards/kb_elmo/elmopad/config.h b/keyboards/kb_elmo/elmopad/config.h new file mode 100644 index 000000000000..1dd6cff5b37d --- /dev/null +++ b/keyboards/kb_elmo/elmopad/config.h @@ -0,0 +1,44 @@ +/* +Copyright 2020 kb-elmo + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License 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 0xA68C +#define PRODUCT_ID 0x8B35 +#define DEVICE_VER 0x0001 +#define MANUFACTURER kb-elmo +#define PRODUCT ElmoPad + +/* key matrix size */ +#define MATRIX_ROWS 6 +#define MATRIX_COLS 4 + +/* + * Keyboard Matrix Assignments + */ +#define MATRIX_ROW_PINS { C5, C4, B2, B1, D7, B0 } +#define MATRIX_COL_PINS { C0, C1, C2, C3 } +#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/kb_elmo/elmopad/elmopad.c b/keyboards/kb_elmo/elmopad/elmopad.c new file mode 100644 index 000000000000..bb905ed7e105 --- /dev/null +++ b/keyboards/kb_elmo/elmopad/elmopad.c @@ -0,0 +1,17 @@ +/* Copyright 2020 kb-elmo + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#include "elmopad.h" diff --git a/keyboards/kb_elmo/elmopad/elmopad.h b/keyboards/kb_elmo/elmopad/elmopad.h new file mode 100644 index 000000000000..413910a9d4de --- /dev/null +++ b/keyboards/kb_elmo/elmopad/elmopad.h @@ -0,0 +1,43 @@ +/* Copyright 2020 kb-elmo + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License 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_numpad_6x4( \ + k00, k01, k02, k03, \ + k04, k05, k06, k07, \ + k08, k09, k10, \ + k12, k13, k14, k15, \ + k16, k17, k18, \ + k20, k22, k23 \ +) { \ + {k00, k01, k02, k03 }, \ + {k04, k05, k06, k07 }, \ + {k08, k09, k10, KC_NO }, \ + {k12, k13, k14, k15 }, \ + {k16, k17, k18, KC_NO }, \ + {k20, KC_NO, k22, k23 } \ +} diff --git a/keyboards/kb_elmo/elmopad/info.json b/keyboards/kb_elmo/elmopad/info.json new file mode 100644 index 000000000000..adc2eae247cb --- /dev/null +++ b/keyboards/kb_elmo/elmopad/info.json @@ -0,0 +1,34 @@ +{ + "keyboard_name": "elmopad", + "url": "https://github.com/kb-elmo/numpad", + "maintainer": "kb-elmo", + "width": 3, + "height": 2, + "layouts": { + "LAYOUT": { + "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/kb_elmo/elmopad/keymaps/default/keymap.c b/keyboards/kb_elmo/elmopad/keymaps/default/keymap.c new file mode 100644 index 000000000000..9e672de69dfb --- /dev/null +++ b/keyboards/kb_elmo/elmopad/keymaps/default/keymap.c @@ -0,0 +1,28 @@ +/* Copyright 2020 kb-elmo + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public 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] = { + /* Base */ + [0] = LAYOUT_numpad_6x4( + KC_ESC, KC_TAB, KC_DEL, 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 + ) +}; diff --git a/keyboards/kb_elmo/elmopad/readme.md b/keyboards/kb_elmo/elmopad/readme.md new file mode 100644 index 000000000000..c5ecda2f6cbe --- /dev/null +++ b/keyboards/kb_elmo/elmopad/readme.md @@ -0,0 +1,15 @@ +# ElmoPad + +![elmopad](https://i.imgur.com/kWBxiVwl.jpg) + +THT numpad with USB-C + +* Keyboard Maintainer: [kb-elmo](https://github.com/kb-elmo) +* Hardware Supported: ElmoPad +* Hardware Availability: [Project is open source](https://github.com/kb-elmo/numpad) + +Make example for this keyboard (after setting up your build environment): + + make kb_elmo/elmopad: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/kb_elmo/elmopad/rules.mk b/keyboards/kb_elmo/elmopad/rules.mk new file mode 100644 index 000000000000..6e20108338ea --- /dev/null +++ b/keyboards/kb_elmo/elmopad/rules.mk @@ -0,0 +1,27 @@ +# MCU name +MCU = atmega328p + +# Processor frequency +F_CPU = 16000000 + +# Bootloader selection +BOOTLOADER = USBasp + +# 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 +BLUETOOTH_ENABLE = no # Enable Bluetooth +AUDIO_ENABLE = no # Audio output + +LAYOUTS = numpad_6x4 diff --git a/keyboards/kb_elmo/m0110a_usb/config.h b/keyboards/kb_elmo/m0110a_usb/config.h new file mode 100644 index 000000000000..0010f0d27e70 --- /dev/null +++ b/keyboards/kb_elmo/m0110a_usb/config.h @@ -0,0 +1,49 @@ +/* +Copyright 2020 kb-elmo + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License 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 0xA68C +#define PRODUCT_ID 0xDB4B +#define DEVICE_VER 0x0001 +#define MANUFACTURER kb-elmo +#define PRODUCT M0110A USB + +/* key matrix size */ +#define MATRIX_ROWS 5 +#define MATRIX_COLS 17 + +/* + * Keyboard Matrix Assignments + */ +#define MATRIX_ROW_PINS { B0, B1, B2, B3, D5 } +#define MATRIX_COL_PINS { D7, C0, C1, C2, C3, D1, B4, C6, C7, A7, A6, A5, A4, A3, A2, A1, A0 } +#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/kb_elmo/m0110a_usb/info.json b/keyboards/kb_elmo/m0110a_usb/info.json new file mode 100644 index 000000000000..9d8fb2871a93 --- /dev/null +++ b/keyboards/kb_elmo/m0110a_usb/info.json @@ -0,0 +1,91 @@ +{ + "keyboard_name": "m0110a usb", + "url": "https://github.com/kb-elmo/m0110a_usb", + "maintainer": "kb-elmo", + "width": 19.25, + "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, "w":1.5}, + {"x":15.25, "y":0}, + {"x":16.25, "y":0}, + {"x":17.25, "y":0}, + {"x":18.25, "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":15.25, "y":1}, + {"x":16.25, "y":1}, + {"x":17.25, "y":1}, + {"x":18.25, "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":13.5, "y":1, "h":2}, + {"x":15.25, "y":2}, + {"x":16.25, "y":2}, + {"x":17.25, "y":2}, + {"x":18.25, "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.25}, + {"x":13.5, "y":3}, + {"x":15.25, "y":3}, + {"x":16.25, "y":3}, + {"x":17.25, "y":3}, + {"x":18.25, "y":3, "h":2}, + {"x":0, "y":4, "w":1.5}, + {"x":1.5, "y":4, "w":2}, + {"x":3.5, "y":4, "w":7}, + {"x":10.5, "y":4}, + {"x":11.5, "y":4}, + {"x":12.5, "y":4}, + {"x":13.5, "y":4}, + {"x":15.25, "y":4, "w":2}, + {"x":17.25, "y":4} + ] + } + } +} diff --git a/keyboards/kb_elmo/m0110a_usb/keymaps/default/keymap.c b/keyboards/kb_elmo/m0110a_usb/keymaps/default/keymap.c new file mode 100644 index 000000000000..cb1378b134a9 --- /dev/null +++ b/keyboards/kb_elmo/m0110a_usb/keymaps/default/keymap.c @@ -0,0 +1,34 @@ +/* Copyright 2020 kb-elmo + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public 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] = { + /* Base */ + [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_DEL, KC_EQL, KC_PSLS, KC_PAST, + KC_TAB, KC_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_PMNS, + 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, KC_P4, KC_P5, KC_P6, KC_PPLS, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, MO(1), KC_UP, KC_P1, KC_P2, KC_P3, + KC_LCTL, KC_LGUI, KC_SPC, KC_BSLS, KC_LEFT, KC_RGHT, KC_DOWN, KC_P0, KC_PDOT, KC_PENT + ), + [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_TRNS, KC_INS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_HOME, KC_UP, KC_END, KC_PGUP, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_UP, KC_PGUP, KC_TRNS, + KC_TRNS, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGDN, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_LEFT, KC_TRNS, 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_END, KC_DOWN, KC_PGDN, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ) +}; diff --git a/keyboards/kb_elmo/m0110a_usb/m0110a_usb.c b/keyboards/kb_elmo/m0110a_usb/m0110a_usb.c new file mode 100644 index 000000000000..9711eca53ebb --- /dev/null +++ b/keyboards/kb_elmo/m0110a_usb/m0110a_usb.c @@ -0,0 +1,17 @@ +/* Copyright 2020 kb-elmo + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#include "m0110a_usb.h" diff --git a/keyboards/kb_elmo/m0110a_usb/m0110a_usb.h b/keyboards/kb_elmo/m0110a_usb/m0110a_usb.h new file mode 100644 index 000000000000..a33c70a6d11e --- /dev/null +++ b/keyboards/kb_elmo/m0110a_usb/m0110a_usb.h @@ -0,0 +1,41 @@ +/* Copyright 2020 kb-elmo + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License 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, k10, k11, k12, k76, 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, \ + k68, k69, k72, k77, k78, k79, k80, k81, k83, k84 \ +) { \ + { 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, KC_NO, }, \ + { k68, k69, KC_NO, KC_NO, k72, KC_NO, KC_NO, KC_NO, k76, k77, k78, k79, k80, k81, KC_NO, k83, k84 } \ +} diff --git a/keyboards/kb_elmo/m0110a_usb/readme.md b/keyboards/kb_elmo/m0110a_usb/readme.md new file mode 100644 index 000000000000..19a354c622ac --- /dev/null +++ b/keyboards/kb_elmo/m0110a_usb/readme.md @@ -0,0 +1,15 @@ +# M0110a USB + +![m0110a_usb](https://i.imgur.com/h8nN8Onl.jpg) + +Drop in replacement PCB for the Apple M0110a + +* Keyboard Maintainer: [kb-elmo](https://github.com/kb-elmo) +* Hardware Supported: M0110a USB +* Hardware Availability: [Project is open source](https://github.com/kb-elmo/m0110a_usb) + +Make example for this keyboard (after setting up your build environment): + + make kb_elmo/m0110a_usb: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/kb_elmo/m0110a_usb/rules.mk b/keyboards/kb_elmo/m0110a_usb/rules.mk new file mode 100644 index 000000000000..e5b427e5a521 --- /dev/null +++ b/keyboards/kb_elmo/m0110a_usb/rules.mk @@ -0,0 +1,25 @@ +# MCU name +MCU = atmega32a + +# Processor frequency +F_CPU = 16000000 + +# Bootloader selection +BOOTLOADER = USBasp + +# 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 +BLUETOOTH_ENABLE = no # Enable Bluetooth +AUDIO_ENABLE = no # Audio output diff --git a/keyboards/kb_elmo/m0116_usb/config.h b/keyboards/kb_elmo/m0116_usb/config.h new file mode 100644 index 000000000000..693d3ab6a80a --- /dev/null +++ b/keyboards/kb_elmo/m0116_usb/config.h @@ -0,0 +1,53 @@ +/* +Copyright 2020 kb-elmo + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License 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 0xA68C +#define PRODUCT_ID 0x8F7E +#define DEVICE_VER 0x0001 +#define MANUFACTURER kb-elmo +#define PRODUCT M0116 USB + +/* key matrix size */ +#define MATRIX_ROWS 5 +#define MATRIX_COLS 18 + +/* + * Keyboard Matrix Assignments + */ +#define MATRIX_ROW_PINS { B1, A0, B2, A2, A1 } +#define MATRIX_COL_PINS { D6, D5, D1, D0, D7, C0, C1, C2, C3, C4, C5, C6, C7, A7, A6, A5, A4, A3 } +#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 + +/* Bootmagic Lite key configuration */ +#define BOOTMAGIC_LITE_ROW 4 +#define BOOTMAGIC_LITE_COLUMN 5 diff --git a/keyboards/kb_elmo/m0116_usb/info.json b/keyboards/kb_elmo/m0116_usb/info.json new file mode 100644 index 000000000000..1a55664d18c8 --- /dev/null +++ b/keyboards/kb_elmo/m0116_usb/info.json @@ -0,0 +1,94 @@ +{ + "keyboard_name": "m0116 usb", + "url": "https://github.com/kb-elmo/m0116_usb", + "maintainer": "kb-elmo", + "width": 19.25, + "height": 6.15, + "layouts": { + "LAYOUT": { + "layout": [ + {"x":5, "y":0, "w":2}, + {"x":0, "y":1.15}, + {"x":1, "y":1.15}, + {"x":2, "y":1.15}, + {"x":3, "y":1.15}, + {"x":4, "y":1.15}, + {"x":5, "y":1.15}, + {"x":6, "y":1.15}, + {"x":7, "y":1.15}, + {"x":8, "y":1.15}, + {"x":9, "y":1.15}, + {"x":10, "y":1.15}, + {"x":11, "y":1.15}, + {"x":12, "y":1.15}, + {"x":13, "y":1.15, "w":1.5}, + {"x":15.25, "y":1.15}, + {"x":16.25, "y":1.15}, + {"x":17.25, "y":1.15}, + {"x":18.25, "y":1.15}, + {"x":0, "y":2.15, "w":1.5}, + {"x":1.5, "y":2.15}, + {"x":2.5, "y":2.15}, + {"x":3.5, "y":2.15}, + {"x":4.5, "y":2.15}, + {"x":5.5, "y":2.15}, + {"x":6.5, "y":2.15}, + {"x":7.5, "y":2.15}, + {"x":8.5, "y":2.15}, + {"x":9.5, "y":2.15}, + {"x":10.5, "y":2.15}, + {"x":11.5, "y":2.15}, + {"x":12.5, "y":2.15}, + {"x":15.25, "y":2.15}, + {"x":16.25, "y":2.15}, + {"x":17.25, "y":2.15}, + {"x":18.25, "y":2.15}, + {"x":0, "y":3.15, "w":1.75}, + {"x":1.75, "y":3.15}, + {"x":2.75, "y":3.15}, + {"x":3.75, "y":3.15}, + {"x":4.75, "y":3.15}, + {"x":5.75, "y":3.15}, + {"x":6.75, "y":3.15}, + {"x":7.75, "y":3.15}, + {"x":8.75, "y":3.15}, + {"x":9.75, "y":3.15}, + {"x":10.75, "y":3.15}, + {"x":11.75, "y":3.15}, + {"x":13.5, "y":2.15, "h":2}, + {"x":15.25, "y":3.15}, + {"x":16.25, "y":3.15}, + {"x":17.25, "y":3.15}, + {"x":18.25, "y":3.15}, + {"x":0, "y":4.15, "w":2.25}, + {"x":2.25, "y":4.15}, + {"x":3.25, "y":4.15}, + {"x":4.25, "y":4.15}, + {"x":5.25, "y":4.15}, + {"x":6.25, "y":4.15}, + {"x":7.25, "y":4.15}, + {"x":8.25, "y":4.15}, + {"x":9.25, "y":4.15}, + {"x":10.25, "y":4.15}, + {"x":11.25, "y":4.15}, + {"x":12.25, "y":4.15, "w":2.25}, + {"x":15.25, "y":4.15}, + {"x":16.25, "y":4.15}, + {"x":17.25, "y":4.15}, + {"x":18.25, "y":4.15, "h":2}, + {"x":0, "y":5.15}, + {"x":1, "y":5.15}, + {"x":2, "y":5.15, "w":1.75}, + {"x":3.75, "y":5.15}, + {"x":4.75, "y":5.15, "w":4.75}, + {"x":9.5, "y":5.15}, + {"x":10.5, "y":5.15}, + {"x":11.5, "y":5.15}, + {"x":12.5, "y":5.15}, + {"x":13.5, "y":5.15}, + {"x":15.25, "y":5.15, "w":2}, + {"x":17.25, "y":5.15} + ] + } + } +} diff --git a/keyboards/kb_elmo/m0116_usb/keymaps/default/keymap.c b/keyboards/kb_elmo/m0116_usb/keymaps/default/keymap.c new file mode 100644 index 000000000000..14f1a7d8e77a --- /dev/null +++ b/keyboards/kb_elmo/m0116_usb/keymaps/default/keymap.c @@ -0,0 +1,36 @@ +/* Copyright 2020 kb-elmo + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public 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] = { + /* Base */ + [0] = LAYOUT( + KC_PSCR, + 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_EQL, KC_PSLS, KC_PAST, + KC_TAB, KC_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_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_P4, KC_P5, KC_P6, KC_PMNS, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, MO(1), KC_P1, KC_P2, KC_P3, + KC_LCAP, KC_LGUI, KC_LALT, KC_GRV, KC_SPC, KC_BSLS, KC_LEFT, KC_RGHT, KC_DOWN, KC_UP, KC_P0, KC_PDOT, KC_PENT + ), + [1] = LAYOUT( + KC_TRNS, + 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_INS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_HOME, KC_UP, KC_END, KC_PGUP, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_UP, KC_PGUP, KC_TRNS, + KC_TRNS, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGDN, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_LEFT, KC_TRNS, 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_END, KC_DOWN, 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 + ) +}; diff --git a/keyboards/kb_elmo/m0116_usb/m0116_usb.c b/keyboards/kb_elmo/m0116_usb/m0116_usb.c new file mode 100644 index 000000000000..823e2abd0ae6 --- /dev/null +++ b/keyboards/kb_elmo/m0116_usb/m0116_usb.c @@ -0,0 +1,17 @@ +/* Copyright 2020 kb-elmo + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#include "m0116_usb.h" diff --git a/keyboards/kb_elmo/m0116_usb/m0116_usb.h b/keyboards/kb_elmo/m0116_usb/m0116_usb.h new file mode 100644 index 000000000000..9e98e19ea2f2 --- /dev/null +++ b/keyboards/kb_elmo/m0116_usb/m0116_usb.h @@ -0,0 +1,42 @@ +/* Copyright 2020 kb-elmo + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License 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( \ + 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, k32, k33, k34, k35, \ + k36, k37, k38, k39, k40, k41, k42, k43, k44, k45, k46, k47, k31, k48, k49, k50, k51, \ + k52, k53, k54, k55, k56, k57, k58, k59, k60, k61, k62, k63, k64, k65, k66, \ + k67, k68, k69, k70, k72, k73, k74, k75, k76, k77, k78, k79, k80 \ +) { \ + { 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, KC_NO, KC_NO, k48, k49, k50, k51, }, \ + { k52, k53, k54, k55, k56, k57, k58, k59, k60, k61, k62, KC_NO, KC_NO, k63, k64, k65, k66, KC_NO }, \ + { k67, k68, k69, k70, KC_NO, k71, KC_NO, k72, k73, k74, k75, k76, KC_NO, k77, k78, KC_NO, k79, k80, } \ +} diff --git a/keyboards/kb_elmo/m0116_usb/readme.md b/keyboards/kb_elmo/m0116_usb/readme.md new file mode 100644 index 000000000000..0ffd841c3803 --- /dev/null +++ b/keyboards/kb_elmo/m0116_usb/readme.md @@ -0,0 +1,15 @@ +# M0116 USB + +![m0116_usb](https://i.imgur.com/0l0W3oYl.jpg) + +Drop in replacement PCB for the Apple M0116 + +* Keyboard Maintainer: [elmo-space](https://github.com/elmo-space) +* Hardware Supported: M0116 USB +* Hardware Availability: [Project is open source](https://github.com/elmo-space/m0116_usb) + +Make example for this keyboard (after setting up your build environment): + + make kb_elmo/m0116_usb: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/kb_elmo/m0116_usb/rules.mk b/keyboards/kb_elmo/m0116_usb/rules.mk new file mode 100644 index 000000000000..e5b427e5a521 --- /dev/null +++ b/keyboards/kb_elmo/m0116_usb/rules.mk @@ -0,0 +1,25 @@ +# MCU name +MCU = atmega32a + +# Processor frequency +F_CPU = 16000000 + +# Bootloader selection +BOOTLOADER = USBasp + +# 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 +BLUETOOTH_ENABLE = no # Enable Bluetooth +AUDIO_ENABLE = no # Audio output diff --git a/keyboards/kb_elmo/sesame/config.h b/keyboards/kb_elmo/sesame/config.h new file mode 100644 index 000000000000..5015cc87b979 --- /dev/null +++ b/keyboards/kb_elmo/sesame/config.h @@ -0,0 +1,48 @@ +/* +Copyright 2020 kb-elmo + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License 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 0xA68C +#define PRODUCT_ID 0xE2BD +#define DEVICE_VER 0x0001 +#define MANUFACTURER kb-elmo +#define PRODUCT Sesame + +/* key matrix size */ +#define MATRIX_ROWS 5 +#define MATRIX_COLS 15 + +/* + * Keyboard Matrix Assignments + */ +#define MATRIX_ROW_PINS { C4, C5, C6, C7, A7 } +#define MATRIX_COL_PINS { D1, D5, D6, D7, C0, C1, C2, C3, A6, A5, A4, A3, A2, A1, A0 } +#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 + +/* Bootmagic Lite key configuration */ +#define BOOTMAGIC_LITE_ROW 0 +#define BOOTMAGIC_LITE_COLUMN 1 diff --git a/keyboards/kb_elmo/sesame/info.json b/keyboards/kb_elmo/sesame/info.json new file mode 100644 index 000000000000..b371b3d58969 --- /dev/null +++ b/keyboards/kb_elmo/sesame/info.json @@ -0,0 +1,78 @@ +{ + "keyboard_name": "sesame", + "url": "https://github.com/kb-elmo/sesame", + "maintainer": "kb-elmo", + "width": 17.75, + "height": 5, + "layouts": { + "LAYOUT": { + "layout": [ + {"x":0, "y":0}, + {"x":1.25, "y":0}, + {"x":2.25, "y":0}, + {"x":3.25, "y":0}, + {"x":4.25, "y":0}, + {"x":5.25, "y":0}, + {"x":6.25, "y":0}, + {"x":7.25, "y":0}, + {"x":10.25, "y":0}, + {"x":11.25, "y":0}, + {"x":12.25, "y":0}, + {"x":13.25, "y":0}, + {"x":14.25, "y":0}, + {"x":15.25, "y":0}, + {"x":16.25, "y":0, "w": 2}, + {"x":0, "y":1}, + {"x":1.25, "y":1, "w":1.5}, + {"x":2.75, "y":1}, + {"x":3.75, "y":1}, + {"x":4.75, "y":1}, + {"x":5.75, "y":1}, + {"x":6.75, "y":1}, + {"x":9.75, "y":1}, + {"x":10.75, "y":1}, + {"x":11.75, "y":1}, + {"x":12.75, "y":1}, + {"x":13.75, "y":1}, + {"x":14.75, "y":1}, + {"x":15.75, "y":1}, + {"x":16.75, "y":1, "w":1.5}, + {"x":0, "y":2}, + {"x":1.25, "y":2, "w":1.75}, + {"x":3, "y":2}, + {"x":4, "y":2}, + {"x":5, "y":2}, + {"x":6, "y":2}, + {"x":7, "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":16, "y":2, "w":2.25}, + {"x":1.25, "y":3, "w":2.25}, + {"x":3.5, "y":3}, + {"x":4.5, "y":3}, + {"x":5.5, "y":3}, + {"x":6.5, "y":3}, + {"x":7.5, "y":3}, + {"x":9.5, "y":3}, + {"x":10.5, "y":3}, + {"x":11.5, "y":3}, + {"x":12.5, "y":3}, + {"x":13.5, "y":3}, + {"x":14.5, "y":3}, + {"x":15.5, "y":3, "w":1.75}, + {"x":17.25, "y":3}, + {"x":1.25, "y":4, "w":1.5}, + {"x":4.25, "y":4, "w":1.5}, + {"x":5.75, "y":4, "w":2}, + {"x":7.75, "y":4, "w":1.25}, + {"x":9.5, "y":4, "w":2.75}, + {"x":12.25, "y":4, "w":1.5}, + {"x":16.75, "y":4, "w":1.5} + ] + } + } +} diff --git a/keyboards/kb_elmo/sesame/keymaps/default/keymap.c b/keyboards/kb_elmo/sesame/keymaps/default/keymap.c new file mode 100644 index 000000000000..e1c74203efe0 --- /dev/null +++ b/keyboards/kb_elmo/sesame/keymaps/default/keymap.c @@ -0,0 +1,34 @@ +/* Copyright 2020 kb-elmo + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public 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] = { + /* Base */ + [0] = LAYOUT( + KC_PAUS, 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_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_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(1), + KC_LCTL, KC_LALT, KC_SPC, KC_LGUI, KC_SPC, KC_RALT, KC_RCTL + ), + [1] = LAYOUT( + KC_TRNS, 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_HOME, KC_UP, KC_END, KC_PGUP, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_CAPS, KC_LEFT, KC_DOWN, KC_RGHT, 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_VOLD, KC_VOLU, KC_MUTE, KC_MPRV, KC_MNXT, KC_MPLY, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ) +}; diff --git a/keyboards/kb_elmo/sesame/readme.md b/keyboards/kb_elmo/sesame/readme.md new file mode 100644 index 000000000000..9fa7f3541c7c --- /dev/null +++ b/keyboards/kb_elmo/sesame/readme.md @@ -0,0 +1,15 @@ +# Sesame + +![sesame](https://i.imgur.com/IdudbWjl.jpg) + +Alice layout THT keyboard + +* Keyboard Maintainer: [kb-elmo](https://github.com/kb-elmo) +* Hardware Supported: Sesame +* Hardware Availability: [Project is open source](https://github.com/kb-elmo/sesame) + +Make example for this keyboard (after setting up your build environment): + + make kb_elmo/sesame: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/kb_elmo/sesame/rules.mk b/keyboards/kb_elmo/sesame/rules.mk new file mode 100644 index 000000000000..e5b427e5a521 --- /dev/null +++ b/keyboards/kb_elmo/sesame/rules.mk @@ -0,0 +1,25 @@ +# MCU name +MCU = atmega32a + +# Processor frequency +F_CPU = 16000000 + +# Bootloader selection +BOOTLOADER = USBasp + +# 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 +BLUETOOTH_ENABLE = no # Enable Bluetooth +AUDIO_ENABLE = no # Audio output diff --git a/keyboards/kb_elmo/sesame/sesame.c b/keyboards/kb_elmo/sesame/sesame.c new file mode 100644 index 000000000000..4ca3d08f04da --- /dev/null +++ b/keyboards/kb_elmo/sesame/sesame.c @@ -0,0 +1,17 @@ +/* Copyright 2020 kb-elmo + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#include "sesame.h" diff --git a/keyboards/kb_elmo/sesame/sesame.h b/keyboards/kb_elmo/sesame/sesame.h new file mode 100644 index 000000000000..512bce6e2fc8 --- /dev/null +++ b/keyboards/kb_elmo/sesame/sesame.h @@ -0,0 +1,41 @@ +/* Copyright 2020 kb-elmo + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License 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, 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, \ + k45, k46, k47, k48, k49, k50, k51, k52, k53, k54, k55, k56, k57, k58, \ + k59, k60, k61, k62, k63, k64, k65 \ +) { \ + { 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, KC_NO, k44 }, \ + { KC_NO, k45, k46, k47, k48, k49, k50, k51, k52, k53, k54, k55, k56, k57, k58 }, \ + { KC_NO, k59, KC_NO, k60, KC_NO, k61, k62, KC_NO, k63, KC_NO, k64, KC_NO, KC_NO, k65, KC_NO } \ +} From 871d35aa432f149b67d986b584bb31b80bd1573e Mon Sep 17 00:00:00 2001 From: Whale Mo Date: Fri, 7 Aug 2020 13:47:59 +0800 Subject: [PATCH 534/930] [Keyboard] Add Whale's Split Keyboard(ver.3) (#9859) Co-authored-by: Joel Challis Co-authored-by: Ryan Co-authored-by: James Young <18669334+noroadsleft@users.noreply.github.com> --- keyboards/whale/sk/config.h | 23 + keyboards/whale/sk/keymaps/default/keymap.c | 34 + keyboards/whale/sk/readme.md | 15 + keyboards/whale/sk/rules.mk | 1 + keyboards/whale/sk/sk.c | 1 + keyboards/whale/sk/sk.h | 7 + keyboards/whale/sk/v3/config.h | 53 ++ keyboards/whale/sk/v3/info.json | 970 ++++++++++++++++++++ keyboards/whale/sk/v3/rules.mk | 25 + keyboards/whale/sk/v3/v3.c | 134 +++ keyboards/whale/sk/v3/v3.h | 65 ++ 11 files changed, 1328 insertions(+) create mode 100644 keyboards/whale/sk/config.h create mode 100644 keyboards/whale/sk/keymaps/default/keymap.c create mode 100644 keyboards/whale/sk/readme.md create mode 100644 keyboards/whale/sk/rules.mk create mode 100644 keyboards/whale/sk/sk.c create mode 100644 keyboards/whale/sk/sk.h create mode 100644 keyboards/whale/sk/v3/config.h create mode 100644 keyboards/whale/sk/v3/info.json create mode 100644 keyboards/whale/sk/v3/rules.mk create mode 100644 keyboards/whale/sk/v3/v3.c create mode 100644 keyboards/whale/sk/v3/v3.h diff --git a/keyboards/whale/sk/config.h b/keyboards/whale/sk/config.h new file mode 100644 index 000000000000..a3989df890be --- /dev/null +++ b/keyboards/whale/sk/config.h @@ -0,0 +1,23 @@ +/* Copyright 2020 Whale Mo + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License 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 0x0495 diff --git a/keyboards/whale/sk/keymaps/default/keymap.c b/keyboards/whale/sk/keymaps/default/keymap.c new file mode 100644 index 000000000000..249b1955e785 --- /dev/null +++ b/keyboards/whale/sk/keymaps/default/keymap.c @@ -0,0 +1,34 @@ +/* Copyright 2020 Whale Mo + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public 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, +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_BASE] = LAYOUT_all( + KC_ESC, KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_HOME, KC_END, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_PGUP, KC_PGDOWN, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLASH, + KC_LCTRL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_DEL, KC_BSPC, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_ENT, + KC_LSHIFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_LEFT, KC_RIGHT, KC_N, KC_M, KC_COMMA, KC_DOT, KC_SLSH, KC_RSHIFT, + KC_LBRACKET, KC_LALT, KC_LWIN, KC_APP, KC_HENK, KC_MENU, KC_MENU, KC_MHEN, KC_APP, KC_RWIN, KC_RALT, KC_RBRACKET, + KC_F1, KC_F2, KC_F7, KC_F8, + KC_SPC, KC_F3, KC_F4, KC_F9, KC_F10, KC_SPC, + KC_F5, KC_F6, KC_F11, KC_F12 + ), +}; diff --git a/keyboards/whale/sk/readme.md b/keyboards/whale/sk/readme.md new file mode 100644 index 000000000000..ab2121a9c874 --- /dev/null +++ b/keyboards/whale/sk/readme.md @@ -0,0 +1,15 @@ +# Splite Keyboard + +![Split Keyboard Default Layout](https://github.com/ncwhale/Keyboard_Design/raw/master/Splite-Keyboard-v3/Keyboard-layout.png) + +A splite keyboard (7x6x2) made by Whale Mo. + +* Keyboard Maintainer: [Whale Mo](https://github.com/ncwhale) +* Hardware Supported: [Opensource Design](https://github.com/ncwhale/Keyboard_Design), Sparkfun Micro Pro +* Hardware Availability: On the way. + +Make example for this keyboard (after setting up your build environment): + + make whale/sk: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/whale/sk/rules.mk b/keyboards/whale/sk/rules.mk new file mode 100644 index 000000000000..1a4ddedfa733 --- /dev/null +++ b/keyboards/whale/sk/rules.mk @@ -0,0 +1 @@ +DEFAULT_FOLDER = whale/sk/v3 diff --git a/keyboards/whale/sk/sk.c b/keyboards/whale/sk/sk.c new file mode 100644 index 000000000000..c151f73fb68f --- /dev/null +++ b/keyboards/whale/sk/sk.c @@ -0,0 +1 @@ +#include "sk.h" diff --git a/keyboards/whale/sk/sk.h b/keyboards/whale/sk/sk.h new file mode 100644 index 000000000000..d9c75f15b2ba --- /dev/null +++ b/keyboards/whale/sk/sk.h @@ -0,0 +1,7 @@ +#pragma once + +#include "quantum.h" + +#ifdef KEYBOARD_whale_sk_v3 + #include "v3.h" +#endif diff --git a/keyboards/whale/sk/v3/config.h b/keyboards/whale/sk/v3/config.h new file mode 100644 index 000000000000..8fff28ca725b --- /dev/null +++ b/keyboards/whale/sk/v3/config.h @@ -0,0 +1,53 @@ +/* +Copyright 2020 Whale Mo + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License 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 0x0003 +#define MANUFACTURER Whale Mo +#define PRODUCT Splite Keyboard v3 + +/* key matrix size */ +/* Notice: HALF of row on the slave side */ +#define MATRIX_ROWS 12 +#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 { B1, B2, B3, B4, B5, B6 } +#define MATRIX_COL_PINS { D4, C6, D7, E6, F4, F5, F6 } + +/* 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 */ +#define NO_ACTION_MACRO +#define NO_ACTION_FUNCTION diff --git a/keyboards/whale/sk/v3/info.json b/keyboards/whale/sk/v3/info.json new file mode 100644 index 000000000000..b0353465005c --- /dev/null +++ b/keyboards/whale/sk/v3/info.json @@ -0,0 +1,970 @@ +{ + "keyboard_name": "Splite Keyboard v3", + "url": "https://github.com/ncwhale/Keyboard_Design/tree/master/Splite-Keyboard-v3", + "maintainer": "ncwhale", + "width": 20, + "height": 8, + "key_count": 84, + "layouts": { + "LAYOUT_all": { + "layout": [ + { + "label": "Esc", + "x": 0.25, + "y": 0 + }, + { + "label": "~", + "x": 1.25, + "y": 0 + }, + { + "label": "1", + "x": 2.25, + "y": 0 + }, + { + "label": "2", + "x": 3.25, + "y": 0 + }, + { + "label": "3", + "x": 4.25, + "y": 0 + }, + { + "label": "4", + "x": 5.25, + "y": 0 + }, + { + "label": "5", + "x": 6.25, + "y": 0 + }, + { + "label": "Home", + "x": 7.25, + "y": 0, + "w": 1.25 + }, + { + "label": "End", + "x": 11.5, + "y": 0, + "w": 1.25 + }, + { + "label": "6", + "x": 12.75, + "y": 0 + }, + { + "label": "7", + "x": 13.75, + "y": 0 + }, + { + "label": "8", + "x": 14.75, + "y": 0 + }, + { + "label": "9", + "x": 15.75, + "y": 0 + }, + { + "label": "0", + "x": 16.75, + "y": 0 + }, + { + "label": "-", + "x": 17.75, + "y": 0 + }, + { + "label": "=", + "x": 18.75, + "y": 0 + }, + { + "label": "Tab", + "x": 0.5, + "y": 1, + "w": 1.5 + }, + { + "label": "Q", + "x": 2, + "y": 1 + }, + { + "label": "W", + "x": 3, + "y": 1 + }, + { + "label": "E", + "x": 4, + "y": 1 + }, + { + "label": "R", + "x": 5, + "y": 1 + }, + { + "label": "T", + "x": 6, + "y": 1 + }, + { + "label": "PgUp", + "x": 7, + "y": 1, + "w": 1.5 + }, + { + "label": "PgDn", + "x": 11.5, + "y": 1, + "w": 1.5 + }, + { + "label": "Y", + "x": 13, + "y": 1 + }, + { + "label": "U", + "x": 14, + "y": 1 + }, + { + "label": "I", + "x": 15, + "y": 1 + }, + { + "label": "O", + "x": 16, + "y": 1 + }, + { + "label": "P", + "x": 17, + "y": 1 + }, + { + "label": "\\", + "x": 18, + "y": 1, + "w": 1.5 + }, + { + "label": "Control", + "x": 0.25, + "y": 2, + "w": 1.5 + }, + { + "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": "Del", + "x": 6.75, + "y": 2, + "w": 1.5 + }, + { + "label": "BS", + "x": 11.75, + "y": 2, + "w": 1.5 + }, + { + "label": "H", + "x": 13.25, + "y": 2 + }, + { + "label": "J", + "x": 14.25, + "y": 2 + }, + { + "label": "K", + "x": 15.25, + "y": 2 + }, + { + "label": "L", + "x": 16.25, + "y": 2 + }, + { + "label": ";", + "x": 17.25, + "y": 2 + }, + { + "label": "Enter", + "x": 18.25, + "y": 2, + "w": 1.5 + }, + { + "label": "Shift", + "x": 0, + "y": 3, + "w": 1.5 + }, + { + "label": "Z", + "x": 1.5, + "y": 3 + }, + { + "label": "X", + "x": 2.5, + "y": 3 + }, + { + "label": "C", + "x": 3.5, + "y": 3 + }, + { + "label": "V", + "x": 4.5, + "y": 3 + }, + { + "label": "B", + "x": 5.5, + "y": 3 + }, + { + "label": "Fn", + "x": 6.5, + "y": 3 + }, + { + "label": "Fn", + "x": 12.5, + "y": 3 + }, + { + "label": "N", + "x": 13.5, + "y": 3 + }, + { + "label": "M", + "x": 14.5, + "y": 3 + }, + { + "label": ",", + "x": 15.5, + "y": 3 + }, + { + "label": ".", + "x": 16.5, + "y": 3 + }, + { + "label": "/", + "x": 17.5, + "y": 3 + }, + { + "label": "Shift", + "x": 18.5, + "y": 3, + "w": 1.5 + }, + { + "label": "Fn", + "x": 0, + "y": 4 + }, + { + "label": "Alt", + "x": 1, + "y": 4 + }, + { + "label": "Meta", + "x": 2, + "y": 4 + }, + { + "label": "TF", + "x": 3, + "y": 4 + }, + { + "label": "QB", + "x": 4, + "y": 4 + }, + { + "label": "Menu", + "x": 5, + "y": 4 + }, + { + "label": "Menu", + "x": 14, + "y": 4 + }, + { + "label": "QB", + "x": 15, + "y": 4 + }, + { + "label": "TF", + "x": 16, + "y": 4 + }, + { + "label": "Meta", + "x": 17, + "y": 4 + }, + { + "label": "Alt", + "x": 18, + "y": 4 + }, + { + "label": "Fn", + "x": 19, + "y": 4 + }, + { + "label": "F1", + "x": 7.5, + "y": 4, + "r": 30, + "rx": 7, + "ry": 3.5 + }, + { + "label": "F2", + "x": 8.5, + "y": 4, + "r": 30, + "rx": 7, + "ry": 3.5 + }, + { + "x": 6.5, + "y": 5, + "h": 2, + "r": 30, + "rx": 7, + "ry": 3.5 + }, + { + "label": "F3", + "x": 7.5, + "y": 5, + "r": 30, + "rx": 7, + "ry": 3.5 + }, + { + "label": "F4", + "x": 8.5, + "y": 5, + "r": 30, + "rx": 7, + "ry": 3.5 + }, + { + "label": "F5", + "x": 7.5, + "y": 6, + "r": 30, + "rx": 7, + "ry": 3.5 + }, + { + "label": "F6", + "x": 8.5, + "y": 6, + "r": 30, + "rx": 7, + "ry": 3.5 + }, + { + "label": "F7", + "x": 10.5, + "y": 4, + "r": -30, + "rx": 13, + "ry": 3.5 + }, + { + "label": "F8", + "x": 11.5, + "y": 4, + "r": -30, + "rx": 13, + "ry": 3.5 + }, + { + "label": "F9", + "x": 10.5, + "y": 5, + "r": -30, + "rx": 13, + "ry": 3.5 + }, + { + "label": "F10", + "x": 11.5, + "y": 5, + "r": -30, + "rx": 13, + "ry": 3.5 + }, + { + "x": 12.5, + "y": 5, + "h": 2, + "r": -30, + "rx": 13, + "ry": 3.5 + }, + { + "label": "F11", + "x": 10.5, + "y": 6, + "r": -30, + "rx": 13, + "ry": 3.5 + }, + { + "label": "F12", + "x": 11.5, + "y": 6, + "r": -30, + "rx": 13, + "ry": 3.5 + } + ] + }, + "LAYOUT_left_half_only": { + "layout": [ + { + "label": "Esc", + "x": 0.25, + "y": 0 + }, + { + "label": "~", + "x": 1.25, + "y": 0 + }, + { + "label": "1", + "x": 2.25, + "y": 0 + }, + { + "label": "2", + "x": 3.25, + "y": 0 + }, + { + "label": "3", + "x": 4.25, + "y": 0 + }, + { + "label": "4", + "x": 5.25, + "y": 0 + }, + { + "label": "5", + "x": 6.25, + "y": 0 + }, + { + "label": "Home", + "x": 7.25, + "y": 0, + "w": 1.25 + }, + { + "label": "Tab", + "x": 0.5, + "y": 1, + "w": 1.5 + }, + { + "label": "Q", + "x": 2, + "y": 1 + }, + { + "label": "W", + "x": 3, + "y": 1 + }, + { + "label": "E", + "x": 4, + "y": 1 + }, + { + "label": "R", + "x": 5, + "y": 1 + }, + { + "label": "T", + "x": 6, + "y": 1 + }, + { + "label": "PgUp", + "x": 7, + "y": 1, + "w": 1.5 + }, + { + "label": "Control", + "x": 0.25, + "y": 2, + "w": 1.5 + }, + { + "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": "Del", + "x": 6.75, + "y": 2, + "w": 1.5 + }, + { + "label": "Shift", + "x": 0, + "y": 3, + "w": 1.5 + }, + { + "label": "Z", + "x": 1.5, + "y": 3 + }, + { + "label": "X", + "x": 2.5, + "y": 3 + }, + { + "label": "C", + "x": 3.5, + "y": 3 + }, + { + "label": "V", + "x": 4.5, + "y": 3 + }, + { + "label": "B", + "x": 5.5, + "y": 3 + }, + { + "label": "Fn", + "x": 6.5, + "y": 3 + }, + { + "label": "Fn", + "x": 0, + "y": 4 + }, + { + "label": "Alt", + "x": 1, + "y": 4 + }, + { + "label": "Meta", + "x": 2, + "y": 4 + }, + { + "label": "TF", + "x": 3, + "y": 4 + }, + { + "label": "QB", + "x": 4, + "y": 4 + }, + { + "label": "Menu", + "x": 5, + "y": 4 + }, + { + "label": "F1", + "x": 7.5, + "y": 4, + "r": 30, + "rx": 7, + "ry": 3.5 + }, + { + "label": "F2", + "x": 8.5, + "y": 4, + "r": 30, + "rx": 7, + "ry": 3.5 + }, + { + "x": 6.5, + "y": 5, + "h": 2, + "r": 30, + "rx": 7, + "ry": 3.5 + }, + { + "label": "F3", + "x": 7.5, + "y": 5, + "r": 30, + "rx": 7, + "ry": 3.5 + }, + { + "label": "F4", + "x": 8.5, + "y": 5, + "r": 30, + "rx": 7, + "ry": 3.5 + }, + { + "label": "F5", + "x": 7.5, + "y": 6, + "r": 30, + "rx": 7, + "ry": 3.5 + }, + { + "label": "F6", + "x": 8.5, + "y": 6, + "r": 30, + "rx": 7, + "ry": 3.5 + } + ] + }, + "LAYOUT_right_half_only": { + "layout": [ + { + "label": "End", + "x": 11.5, + "y": 0, + "w": 1.25 + }, + { + "label": "6", + "x": 12.75, + "y": 0 + }, + { + "label": "7", + "x": 13.75, + "y": 0 + }, + { + "label": "8", + "x": 14.75, + "y": 0 + }, + { + "label": "9", + "x": 15.75, + "y": 0 + }, + { + "label": "0", + "x": 16.75, + "y": 0 + }, + { + "label": "-", + "x": 17.75, + "y": 0 + }, + { + "label": "=", + "x": 18.75, + "y": 0 + }, + { + "label": "PgDn", + "x": 11.5, + "y": 1, + "w": 1.5 + }, + { + "label": "Y", + "x": 13, + "y": 1 + }, + { + "label": "U", + "x": 14, + "y": 1 + }, + { + "label": "I", + "x": 15, + "y": 1 + }, + { + "label": "O", + "x": 16, + "y": 1 + }, + { + "label": "P", + "x": 17, + "y": 1 + }, + { + "label": "\\", + "x": 18, + "y": 1, + "w": 1.5 + }, + { + "label": "BS", + "x": 11.75, + "y": 2, + "w": 1.5 + }, + { + "label": "H", + "x": 13.25, + "y": 2 + }, + { + "label": "J", + "x": 14.25, + "y": 2 + }, + { + "label": "K", + "x": 15.25, + "y": 2 + }, + { + "label": "L", + "x": 16.25, + "y": 2 + }, + { + "label": ";", + "x": 17.25, + "y": 2 + }, + { + "label": "Enter", + "x": 18.25, + "y": 2, + "w": 1.5 + }, + { + "label": "Fn", + "x": 12.5, + "y": 3 + }, + { + "label": "N", + "x": 13.5, + "y": 3 + }, + { + "label": "M", + "x": 14.5, + "y": 3 + }, + { + "label": ",", + "x": 15.5, + "y": 3 + }, + { + "label": ".", + "x": 16.5, + "y": 3 + }, + { + "label": "/", + "x": 17.5, + "y": 3 + }, + { + "label": "Shift", + "x": 18.5, + "y": 3, + "w": 1.5 + }, + { + "label": "Menu", + "x": 14, + "y": 4 + }, + { + "label": "QB", + "x": 15, + "y": 4 + }, + { + "label": "TF", + "x": 16, + "y": 4 + }, + { + "label": "Meta", + "x": 17, + "y": 4 + }, + { + "label": "Alt", + "x": 18, + "y": 4 + }, + { + "label": "Fn", + "x": 19, + "y": 4 + }, + { + "label": "F7", + "x": 10.5, + "y": 4, + "r": -30, + "rx": 13, + "ry": 3.5 + }, + { + "label": "F8", + "x": 11.5, + "y": 4, + "r": -30, + "rx": 13, + "ry": 3.5 + }, + { + "label": "F9", + "x": 10.5, + "y": 5, + "r": -30, + "rx": 13, + "ry": 3.5 + }, + { + "label": "F10", + "x": 11.5, + "y": 5, + "r": -30, + "rx": 13, + "ry": 3.5 + }, + { + "x": 12.5, + "y": 5, + "h": 2, + "r": -30, + "rx": 13, + "ry": 3.5 + }, + { + "label": "F11", + "x": 10.5, + "y": 6, + "r": -30, + "rx": 13, + "ry": 3.5 + }, + { + "label": "F12", + "x": 11.5, + "y": 6, + "r": -30, + "rx": 13, + "ry": 3.5 + } + ] + } + } +} diff --git a/keyboards/whale/sk/v3/rules.mk b/keyboards/whale/sk/v3/rules.mk new file mode 100644 index 000000000000..cbb4c8dc5c97 --- /dev/null +++ b/keyboards/whale/sk/v3/rules.mk @@ -0,0 +1,25 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +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 = no # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +BLUETOOTH_ENABLE = no # Enable Bluetooth +AUDIO_ENABLE = no # Audio output + +SPLIT_KEYBOARD = yes +SPLIT_TRANSPORT = custom diff --git a/keyboards/whale/sk/v3/v3.c b/keyboards/whale/sk/v3/v3.c new file mode 100644 index 000000000000..30ffc4dcce38 --- /dev/null +++ b/keyboards/whale/sk/v3/v3.c @@ -0,0 +1,134 @@ +#include "v3.h" + +#if defined(__AVR__) +# include +# include +#endif + +#define ROWS_PER_HAND (MATRIX_ROWS / 2) +#define SLAVE_MATRIX_SYNC_ADDR (0x01) + +typedef struct { + char* buffer; + size_t count; + bool* flag; +} transmit_status; + +transmit_status irx = {}, itx = {}; + +// Buffer for master/slave matrix scan transmit. +// Master: receive buffer. +// Slave: transmit buffer. +matrix_row_t sync_matrix[ROWS_PER_HAND]; +bool matrix_synced = false; + +void USART_init(uint16_t baud) { + cli(); + + // UBRR1H = (unsigned char)(baud >>8); + // UBRR1L = (unsigned char)(baud); + UBRR1 = baud; + // Enable U2X1 for double speed. + UCSR1A = (1 << U2X1); + // Enable RX/TX, 9N1 mode + UCSR1B = (1 << RXEN1) | (1 << TXEN1) | (1 << RXCIE1) | (1 << TXCIE1) | (1 << UCSZ12); + UCSR1C = (1 << UCSZ10) | (1 << UCSZ11); + sei(); +} + +ISR(USART1_RX_vect) { + // read data from reg. + uint8_t status = UCSR1A; + uint8_t high_bit = UCSR1B; + uint8_t low_data = UDR1; + if (status & ((1 << FE1) | (1 << DOR1) | (1 << UPE1))) { + // Something error happen, ignore this package. + irx.count = 0; + return; + } + + // Is it a addr? (9th bit is one/zero?) + if (high_bit & (1 << RXB81)) { + // data is addr. prepend for receive. + switch (low_data) { + case SLAVE_MATRIX_SYNC_ADDR: + irx.buffer = (char *)sync_matrix; + irx.count = sizeof(sync_matrix) * sizeof(matrix_row_t); + irx.flag = &matrix_synced; + break; + + default: + // ignore this package. + irx.count = 0; + break; + } + + } else if (irx.count > 0) { + *irx.buffer = low_data; + ++irx.buffer; + if (--irx.count == 0 && irx.flag != NULL) { + *irx.flag = true; + } + } +} + +// TX complete +ISR(USART1_TX_vect) { + // Is in transmit? + if (itx.count > 0) { + // Send data. + UCSR1B &= ~(1 << TXB81); + UDR1 = *itx.buffer; + + // Move to next char. + ++itx.buffer; + if (--itx.count == 0) { + *itx.flag = true; + } + } + // TODO: read queue/register for next message. +} + +// return: queue depth. +int send_packet(uint8_t addr, char* buffer, size_t length, bool* flag) { + // See if we can start transmit right now. + if ((itx.count == 0) && (UCSR1A & (1 << UDRE1))) { + // Ready to write. + // Prepend registers. + itx.buffer = buffer; + itx.count = length; + itx.flag = flag; + + // Write addr to kick start transmit. + UCSR1B |= (1 << TXB81); + UDR1 = addr; + // TODO: put request in queue; + // }else{ + } + + return 0; +} + +void transport_master_init(void) { USART_init(0); } + +void transport_slave_init(void) { USART_init(0); } + +// returns false if valid data not received from slave +bool transport_master(matrix_row_t matrix[]) { + if (matrix_synced) { + for (uint8_t i = 0; i < ROWS_PER_HAND; ++i) { + matrix[i] = sync_matrix[i]; + } + matrix_synced = false; + return true; + } + return false; +} + +void transport_slave(matrix_row_t matrix[]) { + for (uint8_t i = 0; i < ROWS_PER_HAND; ++i) { + sync_matrix[i] = matrix[i]; + } + matrix_synced = false; + send_packet(SLAVE_MATRIX_SYNC_ADDR, (char*)sync_matrix, sizeof(sync_matrix) * sizeof(matrix_row_t), &matrix_synced); +} diff --git a/keyboards/whale/sk/v3/v3.h b/keyboards/whale/sk/v3/v3.h new file mode 100644 index 000000000000..06ebc45dc906 --- /dev/null +++ b/keyboards/whale/sk/v3/v3.h @@ -0,0 +1,65 @@ +#pragma once + +#include "sk.h" + +#include "quantum.h" + +#define LAYOUT_all( \ + L00, L01, L02, L03, L04, L05, L06, L46, R46, R06, R05, R04, R03, R02, R01, R00, \ + L10, L11, L12, L13, L14, L15, L16, R16, R15, R14, R13, R12, R11, R10, \ + L20, L21, L22, L23, L24, L25, L26, R26, R25, R24, R23, R22, R21, R20, \ + L30, L31, L32, L33, L34, L35, L36, R36, R35, R34, R33, R32, R31, R30, \ + L40, L41, L42, L43, L44, L45, R45, R44, R43, R42, R41, R40, \ + L51, L52, R52, R51, \ + L50, L53, L54, R54, R53, R50, \ + L55, L56, R56, R55 \ +) { \ + {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, }, \ + {L50, L51, L52, L53, L54, L55, L56, }, \ + {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, }, \ + {R50, R51, R52, R53, R54, R55, R56 } \ +} + +#define LAYOUT_left_half_only(\ + L00, L01, L02, L03, L04, L05, L06, L46, \ + 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, \ + L51, L52, \ + L50, L53, L54, \ + L55, L56 \ +) { \ + {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, }, \ + {L50, L51, L52, L53, L54, L55, L56 } \ +} + +#define LAYOUT_right_half_only( \ + R46, R06, R05, R04, R03, R02, R01, R00, \ + R16, R15, R14, R13, R12, R11, R10, \ + R26, R25, R24, R23, R22, R21, R20, \ + R36, R35, R34, R33, R32, R31, R30, \ + R45, R44, R43, R42, R41, R40, \ + R52, R51, \ + R54, R53, R50, \ + R56, R55 \ +) { \ + {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, }, \ + {R50, R51, R52, R53, R54, R55, R56 } \ +} From 4e8af9d41bb5122a398bc8f768bc3931c8aaf9a4 Mon Sep 17 00:00:00 2001 From: James Young <18669334+noroadsleft@users.noreply.github.com> Date: Fri, 7 Aug 2020 02:06:14 -0700 Subject: [PATCH 535/930] Remove HD44780 References, Part 2 (#9918) * remove HD44780_ENABLE rules: C-F * remove HD44780_ENABLE config: C-F --- keyboards/cannonkeys/obliterated75/rules.mk | 1 - keyboards/chidori/config.h | 28 ------------------- keyboards/chidori/rules.mk | 1 - keyboards/chimera_ortho_plus/rules.mk | 1 - keyboards/choco60/rules.mk | 1 - keyboards/ckeys/washington/config.h | 28 ------------------- keyboards/ckeys/washington/rules.mk | 1 - keyboards/clawsome/bookerboard/rules.mk | 1 - keyboards/cocoa40/rules.mk | 1 - keyboards/converter/modelm101/rules.mk | 1 - .../converter/numeric_keypad_IIe/rules.mk | 1 - keyboards/converter/usb_usb/ble/rules.mk | 1 - .../copenhagen_click/click_pad_v1/config.h | 28 ------------------- .../copenhagen_click/click_pad_v1/rules.mk | 1 - keyboards/coseyfannitutti/discipad/config.h | 28 ------------------- keyboards/coseyfannitutti/discipad/rules.mk | 1 - keyboards/coseyfannitutti/discipline/config.h | 28 ------------------- keyboards/coseyfannitutti/discipline/rules.mk | 1 - keyboards/coseyfannitutti/mullet/config.h | 27 ------------------ keyboards/coseyfannitutti/mullet/rules.mk | 1 - keyboards/coseyfannitutti/mulletpad/config.h | 27 ------------------ keyboards/coseyfannitutti/mulletpad/rules.mk | 1 - keyboards/coseyfannitutti/mysterium/config.h | 28 ------------------- keyboards/coseyfannitutti/mysterium/rules.mk | 1 - keyboards/coseyfannitutti/romeo/config.h | 28 ------------------- keyboards/coseyfannitutti/romeo/rules.mk | 1 - keyboards/cospad/config.h | 28 ------------------- keyboards/cospad/rules.mk | 1 - keyboards/cu80/rules.mk | 1 - keyboards/cutie_club/wraith/config.h | 28 ------------------- keyboards/cutie_club/wraith/rules.mk | 1 - keyboards/daisy/config.h | 28 ------------------- keyboards/daisy/rules.mk | 1 - keyboards/dc01/arrow/rules.mk | 1 - keyboards/dc01/left/rules.mk | 1 - keyboards/dc01/numpad/rules.mk | 1 - keyboards/dc01/right/rules.mk | 1 - keyboards/deltasplit75/rules.mk | 1 - keyboards/dm9records/plaid/config.h | 28 ------------------- keyboards/dm9records/plaid/rules.mk | 1 - keyboards/dm9records/tartan/config.h | 28 ------------------- keyboards/dm9records/tartan/rules.mk | 1 - keyboards/dmqdesign/spin/rules.mk | 1 - keyboards/doppelganger/rules.mk | 1 - keyboards/doro67/multi/rules.mk | 1 - keyboards/doro67/regular/rules.mk | 1 - keyboards/doro67/rgb/rules.mk | 1 - keyboards/dozen0/config.h | 28 ------------------- keyboards/dozen0/rules.mk | 1 - keyboards/duck/jetfire/config.h | 27 ------------------ keyboards/duck/jetfire/rules.mk | 1 - keyboards/dumbpad/config.h | 28 ------------------- keyboards/dumbpad/rules.mk | 1 - keyboards/dztech/dz60rgb/v1/rules.mk | 1 - keyboards/dztech/dz60rgb/v2/rules.mk | 1 - keyboards/dztech/dz60rgb_ansi/v1/rules.mk | 1 - keyboards/dztech/dz60rgb_ansi/v2/rules.mk | 1 - keyboards/dztech/dz60rgb_wkl/v1/rules.mk | 1 - keyboards/dztech/dz60rgb_wkl/v2/rules.mk | 1 - keyboards/dztech/dz65rgb/v1/rules.mk | 1 - keyboards/dztech/dz65rgb/v2/rules.mk | 1 - keyboards/efreet/config.h | 28 ------------------- keyboards/efreet/rules.mk | 1 - keyboards/eniigmakeyboards/ek87/config.h | 28 ------------------- keyboards/eniigmakeyboards/ek87/rules.mk | 1 - keyboards/ep/40/rules.mk | 1 - keyboards/ep/96/config.h | 27 ------------------ keyboards/ep/96/rules.mk | 1 - keyboards/ep/comsn/hs68/rules.mk | 1 - keyboards/ep/comsn/mollydooker/config.h | 27 ------------------ keyboards/ep/comsn/mollydooker/rules.mk | 1 - keyboards/ep/comsn/tf_longeboye/rules.mk | 1 - keyboards/ergo42/rules.mk | 1 - keyboards/ergosaurus/config.h | 28 ------------------- keyboards/ergosaurus/rules.mk | 1 - .../ericrlau/numdiscipline/rev1/config.h | 28 ------------------- .../ericrlau/numdiscipline/rev1/rules.mk | 1 - keyboards/exclusive/e6v2/le_bmc/rules.mk | 1 - keyboards/exclusive/e6v2/oe_bmc/rules.mk | 1 - keyboards/exclusive/e7v1se/config.h | 28 ------------------- keyboards/exclusive/e7v1se/rules.mk | 1 - keyboards/felix/config.h | 28 ------------------- keyboards/felix/rules.mk | 1 - keyboards/fluorite/config.h | 28 ------------------- keyboards/fluorite/rules.mk | 1 - keyboards/flx/lodestone/rules.mk | 1 - keyboards/flx/virgo/rules.mk | 1 - keyboards/fortitude60/rules.mk | 1 - keyboards/foxlab/leaf60/hotswap/config.h | 28 ------------------- keyboards/foxlab/leaf60/hotswap/rules.mk | 1 - keyboards/foxlab/leaf60/universal/config.h | 28 ------------------- keyboards/foxlab/leaf60/universal/rules.mk | 1 - keyboards/freyr/rules.mk | 1 - keyboards/funky40/rules.mk | 1 - 94 files changed, 845 deletions(-) diff --git a/keyboards/cannonkeys/obliterated75/rules.mk b/keyboards/cannonkeys/obliterated75/rules.mk index 350b0d53245a..a1aa5f142fcd 100644 --- a/keyboards/cannonkeys/obliterated75/rules.mk +++ b/keyboards/cannonkeys/obliterated75/rules.mk @@ -17,7 +17,6 @@ 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 WS2812_DRIVER = spi # Enter lower-power sleep mode when on the ChibiOS idle thread diff --git a/keyboards/chidori/config.h b/keyboards/chidori/config.h index 669b68a247b4..a0693e7f6734 100644 --- a/keyboards/chidori/config.h +++ b/keyboards/chidori/config.h @@ -220,34 +220,6 @@ 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 -/* - * 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/rules.mk b/keyboards/chidori/rules.mk index 7902c41db5fe..b2b28b32ab96 100644 --- a/keyboards/chidori/rules.mk +++ b/keyboards/chidori/rules.mk @@ -30,7 +30,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 CUSTOM_MATRIX = lite diff --git a/keyboards/chimera_ortho_plus/rules.mk b/keyboards/chimera_ortho_plus/rules.mk index 9ee7e4f65322..2dd6c3e1f046 100644 --- a/keyboards/chimera_ortho_plus/rules.mk +++ b/keyboards/chimera_ortho_plus/rules.mk @@ -29,7 +29,6 @@ MIDI_ENABLE = no # MIDI support BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches -HD44780_ENABLE = no # Enable support for HD44780 based LCDs UNICODE_ENABLE = yes CUSTOM_MATRIX = yes diff --git a/keyboards/choco60/rules.mk b/keyboards/choco60/rules.mk index 63b982146139..87e3e3e8cefe 100644 --- a/keyboards/choco60/rules.mk +++ b/keyboards/choco60/rules.mk @@ -30,6 +30,5 @@ UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = 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 # Enable split keyboard diff --git a/keyboards/ckeys/washington/config.h b/keyboards/ckeys/washington/config.h index 9a9b69d32351..e39fe0a96c1a 100644 --- a/keyboards/ckeys/washington/config.h +++ b/keyboards/ckeys/washington/config.h @@ -219,34 +219,6 @@ 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 -/* - * 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/ckeys/washington/rules.mk b/keyboards/ckeys/washington/rules.mk index aa2dfb328ccb..f14456c013c7 100644 --- a/keyboards/ckeys/washington/rules.mk +++ b/keyboards/ckeys/washington/rules.mk @@ -29,6 +29,5 @@ 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 ENCODER_ENABLE = yes # Enable support for encoders OLED_DRIVER_ENABLE = yes # Enable support for OLED displays diff --git a/keyboards/clawsome/bookerboard/rules.mk b/keyboards/clawsome/bookerboard/rules.mk index 847da5a3deb8..2915f8db927c 100644 --- a/keyboards/clawsome/bookerboard/rules.mk +++ b/keyboards/clawsome/bookerboard/rules.mk @@ -30,4 +30,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 -HD44780_ENABLE = no # Enable support for HD44780 based LCDs diff --git a/keyboards/cocoa40/rules.mk b/keyboards/cocoa40/rules.mk index 2fb3031164b8..08e605991be9 100644 --- a/keyboards/cocoa40/rules.mk +++ b/keyboards/cocoa40/rules.mk @@ -30,5 +30,4 @@ UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = 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 diff --git a/keyboards/converter/modelm101/rules.mk b/keyboards/converter/modelm101/rules.mk index 03c8bda35797..af0443666ed3 100644 --- a/keyboards/converter/modelm101/rules.mk +++ b/keyboards/converter/modelm101/rules.mk @@ -30,4 +30,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 -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 fa18648913d8..7854599db893 100644 --- a/keyboards/converter/numeric_keypad_IIe/rules.mk +++ b/keyboards/converter/numeric_keypad_IIe/rules.mk @@ -30,4 +30,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 -HD44780_ENABLE = no # Enable support for HD44780 based LCDs diff --git a/keyboards/converter/usb_usb/ble/rules.mk b/keyboards/converter/usb_usb/ble/rules.mk index cb2910bd96f9..acd5cb5d935f 100644 --- a/keyboards/converter/usb_usb/ble/rules.mk +++ b/keyboards/converter/usb_usb/ble/rules.mk @@ -17,7 +17,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 BLUETOOTH = AdafruitBLE ADAFRUIT_BLE_ENABLE = yes diff --git a/keyboards/copenhagen_click/click_pad_v1/config.h b/keyboards/copenhagen_click/click_pad_v1/config.h index e459925c844b..51574d31d87e 100755 --- a/keyboards/copenhagen_click/click_pad_v1/config.h +++ b/keyboards/copenhagen_click/click_pad_v1/config.h @@ -218,34 +218,6 @@ 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 -/* - * 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/copenhagen_click/click_pad_v1/rules.mk b/keyboards/copenhagen_click/click_pad_v1/rules.mk index 0372e3cb29a3..7a5225818948 100755 --- a/keyboards/copenhagen_click/click_pad_v1/rules.mk +++ b/keyboards/copenhagen_click/click_pad_v1/rules.mk @@ -30,4 +30,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 -HD44780_ENABLE = no # Enable support for HD44780 based LCDs diff --git a/keyboards/coseyfannitutti/discipad/config.h b/keyboards/coseyfannitutti/discipad/config.h index 34776fcbdd65..035a0ac1849f 100644 --- a/keyboards/coseyfannitutti/discipad/config.h +++ b/keyboards/coseyfannitutti/discipad/config.h @@ -215,34 +215,6 @@ 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 -/* - * 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/coseyfannitutti/discipad/rules.mk b/keyboards/coseyfannitutti/discipad/rules.mk index cc81604a414d..62d60ef29fda 100644 --- a/keyboards/coseyfannitutti/discipad/rules.mk +++ b/keyboards/coseyfannitutti/discipad/rules.mk @@ -30,4 +30,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 -HD44780_ENABLE = no # Enable support for HD44780 based LCDs diff --git a/keyboards/coseyfannitutti/discipline/config.h b/keyboards/coseyfannitutti/discipline/config.h index 5d243090804e..aba1ecaf2210 100644 --- a/keyboards/coseyfannitutti/discipline/config.h +++ b/keyboards/coseyfannitutti/discipline/config.h @@ -213,34 +213,6 @@ 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 -/* - * 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/coseyfannitutti/discipline/rules.mk b/keyboards/coseyfannitutti/discipline/rules.mk index f556cb1d4463..81997e7fda29 100644 --- a/keyboards/coseyfannitutti/discipline/rules.mk +++ b/keyboards/coseyfannitutti/discipline/rules.mk @@ -33,6 +33,5 @@ UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = 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 = 65_ansi 65_ansi_blocker 65_iso 65_iso_blocker diff --git a/keyboards/coseyfannitutti/mullet/config.h b/keyboards/coseyfannitutti/mullet/config.h index f9aef2911c05..56460ce0ba11 100644 --- a/keyboards/coseyfannitutti/mullet/config.h +++ b/keyboards/coseyfannitutti/mullet/config.h @@ -142,30 +142,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 -/* - * 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 -*/ diff --git a/keyboards/coseyfannitutti/mullet/rules.mk b/keyboards/coseyfannitutti/mullet/rules.mk index b42558a30a14..7bed2f555e81 100644 --- a/keyboards/coseyfannitutti/mullet/rules.mk +++ b/keyboards/coseyfannitutti/mullet/rules.mk @@ -30,4 +30,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 -HD44780_ENABLE = no # Enable support for HD44780 based LCDs diff --git a/keyboards/coseyfannitutti/mulletpad/config.h b/keyboards/coseyfannitutti/mulletpad/config.h index 4e25ec033748..a977be705ee5 100644 --- a/keyboards/coseyfannitutti/mulletpad/config.h +++ b/keyboards/coseyfannitutti/mulletpad/config.h @@ -142,30 +142,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 -/* - * 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 -*/ diff --git a/keyboards/coseyfannitutti/mulletpad/rules.mk b/keyboards/coseyfannitutti/mulletpad/rules.mk index 1b9994cd32b7..0418bb9aab68 100644 --- a/keyboards/coseyfannitutti/mulletpad/rules.mk +++ b/keyboards/coseyfannitutti/mulletpad/rules.mk @@ -30,6 +30,5 @@ UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = 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 = numpad_5x4 diff --git a/keyboards/coseyfannitutti/mysterium/config.h b/keyboards/coseyfannitutti/mysterium/config.h index 968794da99e4..245eaab35304 100644 --- a/keyboards/coseyfannitutti/mysterium/config.h +++ b/keyboards/coseyfannitutti/mysterium/config.h @@ -211,34 +211,6 @@ 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 -/* - * 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/coseyfannitutti/mysterium/rules.mk b/keyboards/coseyfannitutti/mysterium/rules.mk index 9628ac7135cc..a557426282cb 100644 --- a/keyboards/coseyfannitutti/mysterium/rules.mk +++ b/keyboards/coseyfannitutti/mysterium/rules.mk @@ -33,6 +33,5 @@ UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = 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/coseyfannitutti/romeo/config.h b/keyboards/coseyfannitutti/romeo/config.h index 49226ebfaf75..a70d539ef9b6 100644 --- a/keyboards/coseyfannitutti/romeo/config.h +++ b/keyboards/coseyfannitutti/romeo/config.h @@ -214,34 +214,6 @@ 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 -/* - * 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/coseyfannitutti/romeo/rules.mk b/keyboards/coseyfannitutti/romeo/rules.mk index 154f663699b3..ee79d15ac35f 100644 --- a/keyboards/coseyfannitutti/romeo/rules.mk +++ b/keyboards/coseyfannitutti/romeo/rules.mk @@ -30,4 +30,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 -HD44780_ENABLE = no # Enable support for HD44780 based LCDs diff --git a/keyboards/cospad/config.h b/keyboards/cospad/config.h index 362f6c38b187..52e41d0d562f 100644 --- a/keyboards/cospad/config.h +++ b/keyboards/cospad/config.h @@ -219,34 +219,6 @@ 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 -/* - * 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/cospad/rules.mk b/keyboards/cospad/rules.mk index 61243fd378bc..ae6c97d9f414 100644 --- a/keyboards/cospad/rules.mk +++ b/keyboards/cospad/rules.mk @@ -29,6 +29,5 @@ 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 = numpad_6x4 ortho_6x4 diff --git a/keyboards/cu80/rules.mk b/keyboards/cu80/rules.mk index 1ce40aef3432..f3f8531355a2 100644 --- a/keyboards/cu80/rules.mk +++ b/keyboards/cu80/rules.mk @@ -30,6 +30,5 @@ UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = 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_iso tkl_ansi diff --git a/keyboards/cutie_club/wraith/config.h b/keyboards/cutie_club/wraith/config.h index 4908f7d8cdc2..a5d3f0ebc6bf 100644 --- a/keyboards/cutie_club/wraith/config.h +++ b/keyboards/cutie_club/wraith/config.h @@ -216,34 +216,6 @@ 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 -/* - * 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/cutie_club/wraith/rules.mk b/keyboards/cutie_club/wraith/rules.mk index 18055ba4740a..fed01a63eca2 100644 --- a/keyboards/cutie_club/wraith/rules.mk +++ b/keyboards/cutie_club/wraith/rules.mk @@ -27,4 +27,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 -HD44780_ENABLE = no # Enable support for HD44780 based LCDs diff --git a/keyboards/daisy/config.h b/keyboards/daisy/config.h index 1b6656eb7162..64b86a5b9483 100644 --- a/keyboards/daisy/config.h +++ b/keyboards/daisy/config.h @@ -218,34 +218,6 @@ 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 -/* - * 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/rules.mk b/keyboards/daisy/rules.mk index 48cfa90fcc48..b759cdee7301 100644 --- a/keyboards/daisy/rules.mk +++ b/keyboards/daisy/rules.mk @@ -29,4 +29,3 @@ 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/dc01/arrow/rules.mk b/keyboards/dc01/arrow/rules.mk index 6643ad789e7e..f257a56a0a43 100644 --- a/keyboards/dc01/arrow/rules.mk +++ b/keyboards/dc01/arrow/rules.mk @@ -29,7 +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 -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 aa2467eb6c35..be07664894ec 100644 --- a/keyboards/dc01/left/rules.mk +++ b/keyboards/dc01/left/rules.mk @@ -29,7 +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 -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 27d73e261834..1f6883a8b199 100644 --- a/keyboards/dc01/numpad/rules.mk +++ b/keyboards/dc01/numpad/rules.mk @@ -29,7 +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 -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 6643ad789e7e..f257a56a0a43 100644 --- a/keyboards/dc01/right/rules.mk +++ b/keyboards/dc01/right/rules.mk @@ -29,7 +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 -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 b0049fcbff8f..ccb7c3e91763 100644 --- a/keyboards/deltasplit75/rules.mk +++ b/keyboards/deltasplit75/rules.mk @@ -29,7 +29,6 @@ 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 diff --git a/keyboards/dm9records/plaid/config.h b/keyboards/dm9records/plaid/config.h index 4d7bedee5fc0..8c7132c95a7b 100644 --- a/keyboards/dm9records/plaid/config.h +++ b/keyboards/dm9records/plaid/config.h @@ -215,34 +215,6 @@ 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 -/* - * 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/dm9records/plaid/rules.mk b/keyboards/dm9records/plaid/rules.mk index 7c4112c9aa21..84075f0f025b 100644 --- a/keyboards/dm9records/plaid/rules.mk +++ b/keyboards/dm9records/plaid/rules.mk @@ -30,7 +30,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 LAYOUTS = ortho_4x12 planck_mit LAYOUTS_HAS_RGB = no diff --git a/keyboards/dm9records/tartan/config.h b/keyboards/dm9records/tartan/config.h index ee4393e53ae2..e46c68c9edc9 100644 --- a/keyboards/dm9records/tartan/config.h +++ b/keyboards/dm9records/tartan/config.h @@ -213,34 +213,6 @@ 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 -/* - * 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/dm9records/tartan/rules.mk b/keyboards/dm9records/tartan/rules.mk index 81130019189c..de2f52d421d0 100644 --- a/keyboards/dm9records/tartan/rules.mk +++ b/keyboards/dm9records/tartan/rules.mk @@ -30,7 +30,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 LAYOUTS = 60_ansi 60_ansi_split_bs_rshift 60_iso 60_iso_split_bs_rshift LAYOUTS_HAS_RGB = no diff --git a/keyboards/dmqdesign/spin/rules.mk b/keyboards/dmqdesign/spin/rules.mk index f8dc59afaa78..6e8b2ffbfd4f 100644 --- a/keyboards/dmqdesign/spin/rules.mk +++ b/keyboards/dmqdesign/spin/rules.mk @@ -30,5 +30,4 @@ UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = 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 rotary encoder support diff --git a/keyboards/doppelganger/rules.mk b/keyboards/doppelganger/rules.mk index 9e1bd63ab0b6..e8240a146463 100644 --- a/keyboards/doppelganger/rules.mk +++ b/keyboards/doppelganger/rules.mk @@ -30,5 +30,4 @@ UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = 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 diff --git a/keyboards/doro67/multi/rules.mk b/keyboards/doro67/multi/rules.mk index d24fdc3a6ba8..a6b5ddaff0f7 100644 --- a/keyboards/doro67/multi/rules.mk +++ b/keyboards/doro67/multi/rules.mk @@ -29,6 +29,5 @@ UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = 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 = 65_ansi_blocker diff --git a/keyboards/doro67/regular/rules.mk b/keyboards/doro67/regular/rules.mk index ca6817ffff5e..0b9ecabb73f1 100644 --- a/keyboards/doro67/regular/rules.mk +++ b/keyboards/doro67/regular/rules.mk @@ -30,6 +30,5 @@ UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = 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 = 65_ansi_blocker diff --git a/keyboards/doro67/rgb/rules.mk b/keyboards/doro67/rgb/rules.mk index 8540dd61e031..5a1462c138fa 100644 --- a/keyboards/doro67/rgb/rules.mk +++ b/keyboards/doro67/rgb/rules.mk @@ -30,7 +30,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 RGB_MATRIX_ENABLE = WS2812 LAYOUTS = 65_ansi_blocker diff --git a/keyboards/dozen0/config.h b/keyboards/dozen0/config.h index 3fdd50f50486..dce4258ff2d7 100644 --- a/keyboards/dozen0/config.h +++ b/keyboards/dozen0/config.h @@ -189,34 +189,6 @@ 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 -/* - * 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/dozen0/rules.mk b/keyboards/dozen0/rules.mk index ffeffc7fe03f..415a8b44a020 100644 --- a/keyboards/dozen0/rules.mk +++ b/keyboards/dozen0/rules.mk @@ -30,4 +30,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 -HD44780_ENABLE = no # Enable support for HD44780 based LCDs diff --git a/keyboards/duck/jetfire/config.h b/keyboards/duck/jetfire/config.h index f616bc238e84..b0cc42585279 100644 --- a/keyboards/duck/jetfire/config.h +++ b/keyboards/duck/jetfire/config.h @@ -167,30 +167,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 -/* - * 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 -*/ diff --git a/keyboards/duck/jetfire/rules.mk b/keyboards/duck/jetfire/rules.mk index 09a5d1eccf9d..e5da58234e9c 100644 --- a/keyboards/duck/jetfire/rules.mk +++ b/keyboards/duck/jetfire/rules.mk @@ -31,7 +31,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 CUSTOM_MATRIX = yes SRC += indicator_leds.c \ diff --git a/keyboards/dumbpad/config.h b/keyboards/dumbpad/config.h index 3c27a35b28d0..3d0cc129b3f6 100644 --- a/keyboards/dumbpad/config.h +++ b/keyboards/dumbpad/config.h @@ -230,34 +230,6 @@ 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 -/* - * 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/dumbpad/rules.mk b/keyboards/dumbpad/rules.mk index 34bd05ee16bc..656801c68844 100644 --- a/keyboards/dumbpad/rules.mk +++ b/keyboards/dumbpad/rules.mk @@ -30,7 +30,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 ENCODER_ENABLE = yes MOUSEKEY_ENABLE = yes diff --git a/keyboards/dztech/dz60rgb/v1/rules.mk b/keyboards/dztech/dz60rgb/v1/rules.mk index c06ab43338d5..9465b57eebf1 100644 --- a/keyboards/dztech/dz60rgb/v1/rules.mk +++ b/keyboards/dztech/dz60rgb/v1/rules.mk @@ -19,6 +19,5 @@ 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 ed91876fbf14..8763c8ac7534 100644 --- a/keyboards/dztech/dz60rgb/v2/rules.mk +++ b/keyboards/dztech/dz60rgb/v2/rules.mk @@ -29,6 +29,5 @@ 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 c06ab43338d5..9465b57eebf1 100644 --- a/keyboards/dztech/dz60rgb_ansi/v1/rules.mk +++ b/keyboards/dztech/dz60rgb_ansi/v1/rules.mk @@ -19,6 +19,5 @@ 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 ed91876fbf14..8763c8ac7534 100644 --- a/keyboards/dztech/dz60rgb_ansi/v2/rules.mk +++ b/keyboards/dztech/dz60rgb_ansi/v2/rules.mk @@ -29,6 +29,5 @@ 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 be72ca4fb61b..1daa4ed54a3a 100644 --- a/keyboards/dztech/dz60rgb_wkl/v1/rules.mk +++ b/keyboards/dztech/dz60rgb_wkl/v1/rules.mk @@ -19,7 +19,6 @@ 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/v2/rules.mk b/keyboards/dztech/dz60rgb_wkl/v2/rules.mk index 76117e7ea910..862024c449c2 100644 --- a/keyboards/dztech/dz60rgb_wkl/v2/rules.mk +++ b/keyboards/dztech/dz60rgb_wkl/v2/rules.mk @@ -29,7 +29,6 @@ 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/dz65rgb/v1/rules.mk b/keyboards/dztech/dz65rgb/v1/rules.mk index 9175430052fb..280d70aa2d17 100644 --- a/keyboards/dztech/dz65rgb/v1/rules.mk +++ b/keyboards/dztech/dz65rgb/v1/rules.mk @@ -19,7 +19,6 @@ 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 118087e2ffe2..9b871f734747 100644 --- a/keyboards/dztech/dz65rgb/v2/rules.mk +++ b/keyboards/dztech/dz65rgb/v2/rules.mk @@ -29,7 +29,6 @@ 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/efreet/config.h b/keyboards/efreet/config.h index c95a6a6b2245..b73ce7e05223 100644 --- a/keyboards/efreet/config.h +++ b/keyboards/efreet/config.h @@ -212,34 +212,6 @@ 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 -/* - * 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/efreet/rules.mk b/keyboards/efreet/rules.mk index 411c3f7a76fc..4f0e32f55e14 100644 --- a/keyboards/efreet/rules.mk +++ b/keyboards/efreet/rules.mk @@ -27,6 +27,5 @@ UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = 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 planck_mit diff --git a/keyboards/eniigmakeyboards/ek87/config.h b/keyboards/eniigmakeyboards/ek87/config.h index 2f20a1594822..60750a68531c 100644 --- a/keyboards/eniigmakeyboards/ek87/config.h +++ b/keyboards/eniigmakeyboards/ek87/config.h @@ -217,34 +217,6 @@ 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 -/* - * 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/eniigmakeyboards/ek87/rules.mk b/keyboards/eniigmakeyboards/ek87/rules.mk index dfe300fae002..0aca1d07e14a 100644 --- a/keyboards/eniigmakeyboards/ek87/rules.mk +++ b/keyboards/eniigmakeyboards/ek87/rules.mk @@ -29,4 +29,3 @@ 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/ep/40/rules.mk b/keyboards/ep/40/rules.mk index 862bcbf8f2f0..2a6501e095cd 100644 --- a/keyboards/ep/40/rules.mk +++ b/keyboards/ep/40/rules.mk @@ -30,4 +30,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 -HD44780_ENABLE = no # Enable support for HD44780 based LCDs diff --git a/keyboards/ep/96/config.h b/keyboards/ep/96/config.h index 22d406fd5d51..46f82f95c0df 100644 --- a/keyboards/ep/96/config.h +++ b/keyboards/ep/96/config.h @@ -176,30 +176,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 -/* - * 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 -*/ diff --git a/keyboards/ep/96/rules.mk b/keyboards/ep/96/rules.mk index 862bcbf8f2f0..2a6501e095cd 100644 --- a/keyboards/ep/96/rules.mk +++ b/keyboards/ep/96/rules.mk @@ -30,4 +30,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 -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 80c82b7c98a0..0001317dfcc0 100644 --- a/keyboards/ep/comsn/hs68/rules.mk +++ b/keyboards/ep/comsn/hs68/rules.mk @@ -30,4 +30,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 -HD44780_ENABLE = no # Enable support for HD44780 based LCDs diff --git a/keyboards/ep/comsn/mollydooker/config.h b/keyboards/ep/comsn/mollydooker/config.h index 2a96b5341431..4200aaed1adb 100644 --- a/keyboards/ep/comsn/mollydooker/config.h +++ b/keyboards/ep/comsn/mollydooker/config.h @@ -185,30 +185,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 -/* - * 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 -*/ diff --git a/keyboards/ep/comsn/mollydooker/rules.mk b/keyboards/ep/comsn/mollydooker/rules.mk index e501469fcaf6..985f756c1890 100644 --- a/keyboards/ep/comsn/mollydooker/rules.mk +++ b/keyboards/ep/comsn/mollydooker/rules.mk @@ -30,4 +30,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 -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 bd3cd09a9fd2..46d5a4193be6 100644 --- a/keyboards/ep/comsn/tf_longeboye/rules.mk +++ b/keyboards/ep/comsn/tf_longeboye/rules.mk @@ -30,4 +30,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 -HD44780_ENABLE = no # Enable support for HD44780 based LCDs diff --git a/keyboards/ergo42/rules.mk b/keyboards/ergo42/rules.mk index 3f55da67a9c3..d83fc056a3c3 100644 --- a/keyboards/ergo42/rules.mk +++ b/keyboards/ergo42/rules.mk @@ -29,7 +29,6 @@ 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 diff --git a/keyboards/ergosaurus/config.h b/keyboards/ergosaurus/config.h index c33972c1b8b8..f7d707037999 100644 --- a/keyboards/ergosaurus/config.h +++ b/keyboards/ergosaurus/config.h @@ -218,34 +218,6 @@ 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 -/* - * 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/rules.mk b/keyboards/ergosaurus/rules.mk index b70e8d49fc44..62676d1c5b49 100644 --- a/keyboards/ergosaurus/rules.mk +++ b/keyboards/ergosaurus/rules.mk @@ -30,4 +30,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 -HD44780_ENABLE = no # Enable support for HD44780 based LCDs diff --git a/keyboards/ericrlau/numdiscipline/rev1/config.h b/keyboards/ericrlau/numdiscipline/rev1/config.h index 008d5f0c3244..ffef273acd65 100644 --- a/keyboards/ericrlau/numdiscipline/rev1/config.h +++ b/keyboards/ericrlau/numdiscipline/rev1/config.h @@ -215,34 +215,6 @@ 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 -/* - * 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/ericrlau/numdiscipline/rev1/rules.mk b/keyboards/ericrlau/numdiscipline/rev1/rules.mk index 5a54d4123930..b47e0fe862f3 100644 --- a/keyboards/ericrlau/numdiscipline/rev1/rules.mk +++ b/keyboards/ericrlau/numdiscipline/rev1/rules.mk @@ -33,4 +33,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 -HD44780_ENABLE = no # Enable support for HD44780 based LCDs diff --git a/keyboards/exclusive/e6v2/le_bmc/rules.mk b/keyboards/exclusive/e6v2/le_bmc/rules.mk index a5e8b449ee1a..c5a5556118f7 100644 --- a/keyboards/exclusive/e6v2/le_bmc/rules.mk +++ b/keyboards/exclusive/e6v2/le_bmc/rules.mk @@ -31,4 +31,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 -HD44780_ENABLE = no # Enable support for HD44780 based LCDs diff --git a/keyboards/exclusive/e6v2/oe_bmc/rules.mk b/keyboards/exclusive/e6v2/oe_bmc/rules.mk index a5e8b449ee1a..c5a5556118f7 100644 --- a/keyboards/exclusive/e6v2/oe_bmc/rules.mk +++ b/keyboards/exclusive/e6v2/oe_bmc/rules.mk @@ -31,4 +31,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 -HD44780_ENABLE = no # Enable support for HD44780 based LCDs diff --git a/keyboards/exclusive/e7v1se/config.h b/keyboards/exclusive/e7v1se/config.h index 8784828ed82f..287acb1b6b14 100644 --- a/keyboards/exclusive/e7v1se/config.h +++ b/keyboards/exclusive/e7v1se/config.h @@ -218,34 +218,6 @@ 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 -/* - * 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/rules.mk b/keyboards/exclusive/e7v1se/rules.mk index c9e41ede4be4..8bc92352f5eb 100644 --- a/keyboards/exclusive/e7v1se/rules.mk +++ b/keyboards/exclusive/e7v1se/rules.mk @@ -29,4 +29,3 @@ 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/felix/config.h b/keyboards/felix/config.h index 19a5247d27de..79cc5b4188a5 100644 --- a/keyboards/felix/config.h +++ b/keyboards/felix/config.h @@ -199,34 +199,6 @@ /* 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/felix/rules.mk b/keyboards/felix/rules.mk index 1bcaf0b5e6cb..8624f2963399 100644 --- a/keyboards/felix/rules.mk +++ b/keyboards/felix/rules.mk @@ -29,6 +29,5 @@ UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = 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_5x4 diff --git a/keyboards/fluorite/config.h b/keyboards/fluorite/config.h index 7bae8a013cdb..5219ae7f15be 100644 --- a/keyboards/fluorite/config.h +++ b/keyboards/fluorite/config.h @@ -211,34 +211,6 @@ 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 -/* - * 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/fluorite/rules.mk b/keyboards/fluorite/rules.mk index 107da9b95414..06f4f401f770 100644 --- a/keyboards/fluorite/rules.mk +++ b/keyboards/fluorite/rules.mk @@ -30,6 +30,5 @@ UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = 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 diff --git a/keyboards/flx/lodestone/rules.mk b/keyboards/flx/lodestone/rules.mk index 47af00e0a2ee..467313fb9552 100644 --- a/keyboards/flx/lodestone/rules.mk +++ b/keyboards/flx/lodestone/rules.mk @@ -29,7 +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 -HD44780_ENABLE = no # Enable support for HD44780 based LCDs LTO_ENABLE = yes LAYOUTS = 65_ansi_blocker 65_iso_blocker diff --git a/keyboards/flx/virgo/rules.mk b/keyboards/flx/virgo/rules.mk index c512b6a02f43..529d365b5939 100644 --- a/keyboards/flx/virgo/rules.mk +++ b/keyboards/flx/virgo/rules.mk @@ -30,6 +30,5 @@ UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches -HD44780_ENABLE = no # Enable support for HD44780 based LCDs LINK_TIME_OPTIMIZATION_ENABLE = yes diff --git a/keyboards/fortitude60/rules.mk b/keyboards/fortitude60/rules.mk index 707f6a37567f..1a4cb1c8b07c 100644 --- a/keyboards/fortitude60/rules.mk +++ b/keyboards/fortitude60/rules.mk @@ -29,7 +29,6 @@ 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 diff --git a/keyboards/foxlab/leaf60/hotswap/config.h b/keyboards/foxlab/leaf60/hotswap/config.h index c78ad5425c83..26b67586efee 100644 --- a/keyboards/foxlab/leaf60/hotswap/config.h +++ b/keyboards/foxlab/leaf60/hotswap/config.h @@ -196,34 +196,6 @@ 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 -/* - * 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/foxlab/leaf60/hotswap/rules.mk b/keyboards/foxlab/leaf60/hotswap/rules.mk index 1239cee3fd29..d1587baeba54 100644 --- a/keyboards/foxlab/leaf60/hotswap/rules.mk +++ b/keyboards/foxlab/leaf60/hotswap/rules.mk @@ -30,4 +30,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 -HD44780_ENABLE = no # Enable support for HD44780 based LCDs diff --git a/keyboards/foxlab/leaf60/universal/config.h b/keyboards/foxlab/leaf60/universal/config.h index 4b32d27393be..9f761f454d1c 100644 --- a/keyboards/foxlab/leaf60/universal/config.h +++ b/keyboards/foxlab/leaf60/universal/config.h @@ -196,34 +196,6 @@ 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 -/* - * 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/foxlab/leaf60/universal/rules.mk b/keyboards/foxlab/leaf60/universal/rules.mk index 9f572eb2e37b..8df2f1fe818b 100644 --- a/keyboards/foxlab/leaf60/universal/rules.mk +++ b/keyboards/foxlab/leaf60/universal/rules.mk @@ -30,6 +30,5 @@ UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = 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_hhkb diff --git a/keyboards/freyr/rules.mk b/keyboards/freyr/rules.mk index ee4b122eb496..20f9cd13056a 100644 --- a/keyboards/freyr/rules.mk +++ b/keyboards/freyr/rules.mk @@ -30,7 +30,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 # Supported layouts LAYOUTS = tkl_ansi tkl_iso diff --git a/keyboards/funky40/rules.mk b/keyboards/funky40/rules.mk index c8c2b74e44dd..eebf90715d9e 100644 --- a/keyboards/funky40/rules.mk +++ b/keyboards/funky40/rules.mk @@ -29,4 +29,3 @@ 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 \ No newline at end of file From 242336d475126599f68c3a2cb34b88549d1a3be9 Mon Sep 17 00:00:00 2001 From: Ibnu Daru Aji Date: Fri, 7 Aug 2020 16:43:08 +0700 Subject: [PATCH 536/930] keymap for squiggle goldberg. (#9909) --- .../keymaps/rick-complicated/config.h | 8 + .../keymaps/rick-complicated/keymap.c | 195 ++++++++++++++++++ .../keymaps/rick-complicated/readme.md | 3 + .../keymaps/rick-complicated/rules.mk | 2 + 4 files changed, 208 insertions(+) create mode 100644 keyboards/squiggle/keymaps/rick-complicated/config.h create mode 100644 keyboards/squiggle/keymaps/rick-complicated/keymap.c create mode 100644 keyboards/squiggle/keymaps/rick-complicated/readme.md create mode 100644 keyboards/squiggle/keymaps/rick-complicated/rules.mk diff --git a/keyboards/squiggle/keymaps/rick-complicated/config.h b/keyboards/squiggle/keymaps/rick-complicated/config.h new file mode 100644 index 000000000000..5b97451890f6 --- /dev/null +++ b/keyboards/squiggle/keymaps/rick-complicated/config.h @@ -0,0 +1,8 @@ +#pragma once + +#define COMBO_TERM 100 +#define COMBO_COUNT 38 +#define IGNORE_MOD_TAP_INTERRUPT +#define PERMISSIVE_HOLD + +#define LEADER_TIMEOUT 300 diff --git a/keyboards/squiggle/keymaps/rick-complicated/keymap.c b/keyboards/squiggle/keymaps/rick-complicated/keymap.c new file mode 100644 index 000000000000..eb5853e90e1d --- /dev/null +++ b/keyboards/squiggle/keymaps/rick-complicated/keymap.c @@ -0,0 +1,195 @@ +/* Copyright 2020 Ibnu D. Aji + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public 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 for combos. +enum combos { + // left hand combinations. + COLON_COMMA, + COMMA_DOT, + DOT_P, + P_Y, + COMMA_P, + QUOT_Q, + Q_J, + J_K, + Q_K, + K_X, + + // right hand combinations. + L_R, + R_C, + C_G, + R_G, + G_F, + V_W, + W_M, + V_M, + M_B, + + // both hands combinations. + J_W, +}; + +enum { + _BASE, + _LOWER, + _RAISE, + _ADJUST, +}; + +enum custom_keycodes { + BASE = SAFE_RANGE, + 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_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) + +// 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) + +// 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 p_y_combo[] = {KC_P, KC_Y, COMBO_END}; +const uint16_t PROGMEM comma_p_combo[] = {KC_COMM, 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}; +const uint16_t PROGMEM q_k_combo[] = {KC_Q, KC_K, COMBO_END}; +const uint16_t PROGMEM k_x_combo[] = {KC_K, KC_X, 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 r_g_combo[] = {KC_R, KC_G, COMBO_END}; +const uint16_t PROGMEM g_f_combo[] = {KC_G, KC_F, 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}; +const uint16_t PROGMEM v_m_combo[] = {KC_V, KC_M, COMBO_END}; +const uint16_t PROGMEM m_b_combo[] = {KC_M, KC_B, 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), + [P_Y] = COMBO(p_y_combo, KC_PIPE), + [COMMA_P] = COMBO(comma_p_combo, PRVTAB), + [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), + [Q_K] = COMBO(q_k_combo, KC_TAB), + [K_X] = COMBO(k_x_combo, KC_TILD), + + // 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), + [R_G] = COMBO(r_g_combo, NXTTAB), + [G_F] = COMBO(g_f_combo, KC_BSLS), + [V_W] = COMBO(v_w_combo, KC_APP), + [W_M] = COMBO(w_m_combo, KC_DELT), + [V_M] = COMBO(v_m_combo, LSFT(KC_TAB)), + [M_B] = COMBO(m_b_combo, KC_GRV), + + // both hand combinations. + [J_W] = COMBO(j_w_combo, KC_ENT), +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +[_BASE] = LAYOUT_complicated( + KC_SCLN,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, + KC_QUOT,KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, + LW_BSPC,KC_LEAD, ALT_ENT,RS_SPC, + LW_BSPC,SFT_ESC, ALT_ENT,RS_SPC +), + +[_RAISE] = LAYOUT_complicated( + 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_0 , + KC_LBRC,KC_RBRC,KC_LPRN,KC_RPRN,KC_AMPR, KC_GRV, KC_1, KC_2, KC_3, KC_PLUS , + ADDDD ,_______, _______,_______, + ADDDD ,_______, _______,_______ +), +[_LOWER] = LAYOUT_complicated( + _______,_______,_______,KC_F1, KC_F2, KC_F3, KC_F4, _______,_______,_______ , + 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, _______ , + _______,_______, _______,ADDDD, + _______,_______, _______,ADDDD +), +[_ADJUST] = LAYOUT_complicated( + _______,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, _______,_______,_______,_______,_______, + _______,_______, _______,_______, + _______,_______, _______,_______ +), +}; + +LEADER_EXTERNS(); + +void matrix_scan_user() { + LEADER_DICTIONARY() { + leading = false; + leader_end(); + + SEQ_ONE_KEY(KC_U) { + SEND_STRING(":luvu:\n"); + } + } +} diff --git a/keyboards/squiggle/keymaps/rick-complicated/readme.md b/keyboards/squiggle/keymaps/rick-complicated/readme.md new file mode 100644 index 000000000000..d14eb193c05b --- /dev/null +++ b/keyboards/squiggle/keymaps/rick-complicated/readme.md @@ -0,0 +1,3 @@ +# goldberg keymap + +ricky rick's keymap on squiggle goldberg. ayyy. diff --git a/keyboards/squiggle/keymaps/rick-complicated/rules.mk b/keyboards/squiggle/keymaps/rick-complicated/rules.mk new file mode 100644 index 000000000000..00c78275d97f --- /dev/null +++ b/keyboards/squiggle/keymaps/rick-complicated/rules.mk @@ -0,0 +1,2 @@ +COMBO_ENABLE = yes +LEADER_ENABLE = yes From fc8cf8ec82107bc7620f9c2860191661b457e023 Mon Sep 17 00:00:00 2001 From: mechlovin <57231893+mechlovin@users.noreply.github.com> Date: Fri, 7 Aug 2020 17:46:16 +0700 Subject: [PATCH 537/930] [Keyboard] Adelais En Ciel rev2 (#9834) * add * update * update * update * Update config.h * delete description config.h & change default folder --- keyboards/mechlovin/adelais/adelais.c | 25 --- keyboards/mechlovin/adelais/rgb_led/config.h | 15 +- .../mechlovin/adelais/rgb_led/rev1/config.h | 14 ++ .../mechlovin/adelais/rgb_led/rev1/rev1.c | 42 +++++ .../mechlovin/adelais/rgb_led/rev1/rev1.h | 19 ++ .../mechlovin/adelais/rgb_led/rev1/rules.mk | 1 + .../mechlovin/adelais/rgb_led/rev2/config.h | 35 ++++ .../mechlovin/adelais/rgb_led/rev2/rev2.c | 171 ++++++++++++++++++ .../mechlovin/adelais/rgb_led/rev2/rev2.h | 19 ++ .../mechlovin/adelais/rgb_led/rev2/rules.mk | 2 + keyboards/mechlovin/adelais/rgb_led/rules.mk | 4 +- 11 files changed, 307 insertions(+), 40 deletions(-) create mode 100644 keyboards/mechlovin/adelais/rgb_led/rev1/config.h create mode 100644 keyboards/mechlovin/adelais/rgb_led/rev1/rev1.c create mode 100644 keyboards/mechlovin/adelais/rgb_led/rev1/rev1.h create mode 100644 keyboards/mechlovin/adelais/rgb_led/rev1/rules.mk create mode 100644 keyboards/mechlovin/adelais/rgb_led/rev2/config.h create mode 100644 keyboards/mechlovin/adelais/rgb_led/rev2/rev2.c create mode 100644 keyboards/mechlovin/adelais/rgb_led/rev2/rev2.h create mode 100644 keyboards/mechlovin/adelais/rgb_led/rev2/rules.mk diff --git a/keyboards/mechlovin/adelais/adelais.c b/keyboards/mechlovin/adelais/adelais.c index 87f0caf09177..da5f68f62bf3 100644 --- a/keyboards/mechlovin/adelais/adelais.c +++ b/keyboards/mechlovin/adelais/adelais.c @@ -16,31 +16,6 @@ #include "adelais.h" -#ifdef RGB_MATRIX_ENABLE -led_config_t g_led_config = { { - //Key Matrix to LED Index - {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 16}, - {18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 0}, - {33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, NO_LED, 45, 17}, - {46, NO_LED, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 58, 60, 32}, - {61, NO_LED, 62, NO_LED, 63, NO_LED, 64, NO_LED, 65, NO_LED, 66, NO_LED, NO_LED, 57, 67} -}, { - //LED Index to Physical Positon - {0,0}, { 17, 0}, { 34, 0 }, { 51, 0 }, { 69, 0}, { 86, 0}, {100, 0}, {103, 0}, { 120, 0}, { 138, 0}, { 155, 0}, { 172, 0}, { 189, 0}, {207, 0}, {215, 0}, {223, 0}, {224, 0}, - {0,16}, { 17, 16}, { 34,16 }, { 51,16 }, { 69,16}, { 86,16}, {103,16}, { 120,16}, { 138,16}, { 155,16}, { 172,16}, { 189,16}, {207, 16}, {215, 16}, {224,16}, - {0,32}, { 17, 32}, { 34,32 }, { 51,32 }, { 69,32}, { 86,32}, {103,32}, { 120,32}, { 138,32}, { 155,32}, { 172,32}, { 189,32}, {207, 32}, {224,32}, - { 17, 48}, { 34,48 }, { 51,48 }, { 69,48}, { 86,48}, {103,48}, { 120,48}, { 138,48}, { 155,48}, { 172,48}, { 189,48}, {207, 48}, {215, 48}, {224,48}, {224,48}, - { 17, 64}, { 51,64 }, { 86,64}, { 103,64}, { 138,64}, { 172,64}, {224, 64}, - {100,0}, { 69,0}, { 24, 0}, { 0,3}, { 0,16}, { 0,32}, { 0,51}, { 15,64 }, { 34,64}, { 69,64}, { 103,64}, {110,64}, { 120,64}, { 155,64}, { 189,64}, { 192,64}, { 224,58}, { 224,32}, { 224,16}, { 224,0}, { 207,0}, { 172,0}, { 138,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, 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, 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, 1, 1, 1, 1, -} }; -#endif - void matrix_init_kb(void) { // put your keyboard start-up code here // runs once when the firmware starts up diff --git a/keyboards/mechlovin/adelais/rgb_led/config.h b/keyboards/mechlovin/adelais/rgb_led/config.h index 860bcee7c4e5..26bf6f311d08 100644 --- a/keyboards/mechlovin/adelais/rgb_led/config.h +++ b/keyboards/mechlovin/adelais/rgb_led/config.h @@ -1,16 +1,3 @@ #pragma once -#define PRODUCT_ID 0xAEC1 -#define PRODUCT Adelais En Ciel -#define DESCRIPTION Team.Mechlovin Adelais En Ciel - -#define RGB_DI_PIN A7 -#define DRIVER_LED_TOTAL 91 -#define RGB_MATRIX_KEYPRESSES // reacts to keypresses -#define RGB_MATRIX_KEYRELEASES // reacts to keyreleases (instead of 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 false // turn off effects when suspended -#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 220 // 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_PINWHEEL // Sets the default mode, if none has been set \ No newline at end of file +#define RGB_DI_PIN A7 \ No newline at end of file diff --git a/keyboards/mechlovin/adelais/rgb_led/rev1/config.h b/keyboards/mechlovin/adelais/rgb_led/rev1/config.h new file mode 100644 index 000000000000..9ebb399bacb4 --- /dev/null +++ b/keyboards/mechlovin/adelais/rgb_led/rev1/config.h @@ -0,0 +1,14 @@ +#pragma once + +#define PRODUCT_ID 0xAEC1 +#define PRODUCT Adelais En Ciel + +#define DRIVER_LED_TOTAL 91 +#define RGB_MATRIX_KEYPRESSES // reacts to keypresses +#define RGB_MATRIX_KEYRELEASES // reacts to keyreleases (instead of 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 false // turn off effects when suspended +#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 220 // 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_PINWHEEL // Sets the default mode, if none has been set \ No newline at end of file diff --git a/keyboards/mechlovin/adelais/rgb_led/rev1/rev1.c b/keyboards/mechlovin/adelais/rgb_led/rev1/rev1.c new file mode 100644 index 000000000000..490599c43a20 --- /dev/null +++ b/keyboards/mechlovin/adelais/rgb_led/rev1/rev1.c @@ -0,0 +1,42 @@ +/* Copyright 2020 Team 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 "adelais.h" + +#ifdef RGB_MATRIX_ENABLE +led_config_t g_led_config = { { + //Key Matrix to LED Index + {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 16}, + {18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 0}, + {33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, NO_LED, 45, 17}, + {46, NO_LED, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 58, 60, 32}, + {61, NO_LED, 62, NO_LED, 63, NO_LED, 64, NO_LED, 65, NO_LED, 66, NO_LED, NO_LED, 57, 67} +}, { + //LED Index to Physical Positon + {0,0}, { 17, 0}, { 34, 0 }, { 51, 0 }, { 69, 0}, { 86, 0}, {100, 0}, {103, 0}, { 120, 0}, { 138, 0}, { 155, 0}, { 172, 0}, { 189, 0}, {207, 0}, {215, 0}, {223, 0}, {224, 0}, + {0,16}, { 17, 16}, { 34,16 }, { 51,16 }, { 69,16}, { 86,16}, {103,16}, { 120,16}, { 138,16}, { 155,16}, { 172,16}, { 189,16}, {207, 16}, {215, 16}, {224,16}, + {0,32}, { 17, 32}, { 34,32 }, { 51,32 }, { 69,32}, { 86,32}, {103,32}, { 120,32}, { 138,32}, { 155,32}, { 172,32}, { 189,32}, {207, 32}, {224,32}, + { 17, 48}, { 34,48 }, { 51,48 }, { 69,48}, { 86,48}, {103,48}, { 120,48}, { 138,48}, { 155,48}, { 172,48}, { 189,48}, {207, 48}, {215, 48}, {224,48}, {224,48}, + { 17, 64}, { 51,64 }, { 86,64}, { 103,64}, { 138,64}, { 172,64}, {224, 64}, + {100,0}, { 69,0}, { 24, 0}, { 0,3}, { 0,16}, { 0,32}, { 0,51}, { 15,64 }, { 34,64}, { 69,64}, { 103,64}, {110,64}, { 120,64}, { 155,64}, { 189,64}, { 192,64}, { 224,58}, { 224,32}, { 224,16}, { 224,0}, { 207,0}, { 172,0}, { 138,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, 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, 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, 1, 1, 1, 1, +} }; +#endif diff --git a/keyboards/mechlovin/adelais/rgb_led/rev1/rev1.h b/keyboards/mechlovin/adelais/rgb_led/rev1/rev1.h new file mode 100644 index 000000000000..16cdf9ed8565 --- /dev/null +++ b/keyboards/mechlovin/adelais/rgb_led/rev1/rev1.h @@ -0,0 +1,19 @@ +/* Copyright 2020 Team 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" diff --git a/keyboards/mechlovin/adelais/rgb_led/rev1/rules.mk b/keyboards/mechlovin/adelais/rgb_led/rev1/rules.mk new file mode 100644 index 000000000000..20256e2086f8 --- /dev/null +++ b/keyboards/mechlovin/adelais/rgb_led/rev1/rules.mk @@ -0,0 +1 @@ +RGB_MATRIX_ENABLE = WS2812 diff --git a/keyboards/mechlovin/adelais/rgb_led/rev2/config.h b/keyboards/mechlovin/adelais/rgb_led/rev2/config.h new file mode 100644 index 000000000000..534abc0f6fe3 --- /dev/null +++ b/keyboards/mechlovin/adelais/rgb_led/rev2/config.h @@ -0,0 +1,35 @@ +#pragma once + +#define PRODUCT_ID 0xAEC2 +#define PRODUCT Adelais En Ciel Rev2 + +#define RGBLED_NUM 23 +#define RGBLIGHT_ANIMATIONS +#define RGBLIGHT_HUE_STEP 8 +#define RGBLIGHT_SAT_STEP 8 +#define RGBLIGHT_VAL_STEP 8 + +//rgb matrix setting +// 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) +// The address will vary depending on your wiring: +// 0b1110100 AD <-> GND +// 0b1110111 AD <-> VCC +// 0b1110101 AD <-> SCL +// 0b1110110 AD <-> SDA +#define DRIVER_ADDR_1 0b1110100 +#define DRIVER_ADDR_2 0b1110101 +#define DRIVER_COUNT 2 +#define DRIVER_1_LED_TOTAL 32 +#define DRIVER_2_LED_TOTAL 36 +#define DRIVER_LED_TOTAL (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL) +#define RGB_MATRIX_KEYPRESSES // reacts to keypresses +#define RGB_MATRIX_KEYRELEASES // reacts to keyreleases (instead of 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 false // turn off effects when suspended +#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 255 // 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_PINWHEEL // Sets the default mode, if none has been set + +#define RGB_MATRIX_DISABLE_KEYCODES \ No newline at end of file diff --git a/keyboards/mechlovin/adelais/rgb_led/rev2/rev2.c b/keyboards/mechlovin/adelais/rgb_led/rev2/rev2.c new file mode 100644 index 000000000000..ce0f24a0e688 --- /dev/null +++ b/keyboards/mechlovin/adelais/rgb_led/rev2/rev2.c @@ -0,0 +1,171 @@ +/* Copyright 2020 Team 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 "adelais.h" + +#ifdef RGB_MATRIX_ENABLE +const is31_led g_is31_leds[DRIVER_LED_TOTAL] = { + + {0, C2_1, C3_1, C4_1}, //D102-A0-0 + {0, C5_1, C6_1, C7_1}, //D108-A1-1 + {0, C1_1, C3_2, C4_2}, //D115-A2-2 + {0, C5_2, C6_2, C7_2}, //D121-A3-3 + {0, C1_2, C2_2, C4_3}, //D126-A4-4 + {0, C5_3, C6_3, C7_3}, //D132-A5-5 + {0, C1_3, C2_3, C3_3}, //D138-A6-6 + {0, C5_4, C6_4, C7_4}, //D144-A7-7 + {0, C1_4, C2_4, C3_4}, //D149-A8-8 + {0, C4_4, C6_5, C7_5}, //D155-A9-9 + {0, C1_5, C2_5, C3_5}, //D160-A10-10 + {0, C4_5, C5_5, C7_6}, //D166-A11-11 + {0, C1_6, C2_6, C3_6}, //D173-A12-12 + {0, C4_6, C5_6, C6_6}, //D178-A13-13 + {0, C1_7, C2_7, C3_7}, //D183-A14-14 + {0, C4_7, C5_7, C6_7}, //D187-A15-15 + {0, C1_8, C2_8, C3_8}, //D190-A16-16 + + + {0, C2_9, C3_9, C4_9}, //D80-B0-17 + {0, C5_9, C6_9, C7_9}, //D84-B1-18 + {0, C1_9, C3_10, C4_10}, //D89-B2-19 + {0, C5_10, C6_10, C7_10}, //D94-B3-20 + {0, C1_10, C2_10, C4_11}, //D81-B4-21 + {0, C5_11, C6_11, C7_11}, //D85-B5-22 + {0, C1_11, C2_11, C3_11}, //D90-B6-23 + {0, C5_12, C6_12, C7_12}, //D95-B7-24 + {0, C1_12, C2_12, C3_12}, //D82-B8-25 + {0, C4_12, C6_13, C7_13}, //D86-B9-26 + {0, C1_13, C2_13, C3_13}, //D91-B10-27 + {0, C4_13, C5_13, C7_14}, //D96-B11-28 + {0, C1_14, C2_14, C3_14}, //D79-B12-29 + {0, C4_14, C5_14, C6_14}, //D83-B13-30 + {0, C1_15, C2_15, C3_15}, //D87-B14-31 + + + {1, C2_1, C3_1, C4_1}, //D102-C0-32 + {1, C5_1, C6_1, C7_1}, //D108-C1-33 + {1, C1_1, C3_2, C4_2}, //D115-C2-34 + {1, C5_2, C6_2, C7_2}, //D121-C3-35 + {1, C1_2, C2_2, C4_3}, //D126-C4-36 + {1, C5_3, C6_3, C7_3}, //D132-C5-37 + {1, C1_3, C2_3, C3_3}, //D138-C6-38 + {1, C5_4, C6_4, C7_4}, //D144-C7-39 + {1, C1_4, C2_4, C3_4}, //D149-C8-40 + {1, C4_4, C6_5, C7_5}, //D155-C9-41 + {1, C1_5, C2_5, C3_5}, //D160-C10-42 + {1, C4_5, C5_5, C7_6}, //D166-C11-43 + {1, C1_6, C2_6, C3_6}, //D173-C12-44 + {1, C4_6, C5_6, C6_6}, //D178-C13-45 + + {1, C2_9, C3_9, C4_9}, //D80-D0-46 + {1, C1_9, C3_10, C4_10}, //D89-D2-47 + {1, C5_10, C6_10, C7_10}, //D94-D3-48 + {1, C5_11, C6_11, C7_11}, //D85-D5-49 + {1, C1_11, C2_11, C3_11}, //D90-D6-50 + {1, C1_12, C2_12, C3_12}, //D82-D8-51 + {1, C1_13, C2_13, C3_13}, //D91-D10-52 + {1, C4_13, C5_13, C7_14}, //D96-D11-53 + {1, C1_15, C2_15, C3_15}, //D87-D14-54 + {1, C4_15, C5_15, C6_15}, //D87-D14-55 + {1, C1_16, C2_16, C3_16}, //D87-D14-56 + {1, C4_16, C5_16, C6_16}, //D87-D14-57 + {1, C1_8, C2_8, C3_8}, //D84-D1-58 + {1, C4_8, C5_8, C6_8}, //D84-D1-59 + {1, C1_7, C2_7, C3_7}, //D84-D1-60 + {1, C1_10, C2_10, C4_11}, //D81-D4-61 + {1, C5_9, C6_9, C7_9}, //D95-D7-62 + {1, C5_12, C6_12, C7_12}, //D95-D7-63 + {1, C4_12, C6_13, C7_13}, //D86-D9-64 + {1, C1_14, C2_14, C3_14}, //D79-D12-65 + {1, C4_14, C5_14, C6_14}, //D83-D13-66 + {1, C4_7, C5_7, C6_7}, //D83-D13-67 +}; + +led_config_t g_led_config = { { + // Key Matrix to LED Index + { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 16}, + {18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 0}, + {33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, NO_LED, 45, 17}, + {46, NO_LED, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 58, 60, 32}, + {61, NO_LED, 62, NO_LED, 63, NO_LED, 64, NO_LED, 65, NO_LED, 66, NO_LED, NO_LED, 59, 67} + }, + { + //LED Index to Physical Positon + {0,0}, { 17, 0}, { 34, 0 }, { 51, 0 }, { 69, 0}, { 86, 0}, {100, 0}, {103, 0}, { 120, 0}, { 138, 0}, { 155, 0}, { 172, 0}, { 189, 0}, {207, 0}, {215, 0}, {223, 0}, {224, 0}, + {0,16}, { 17, 16}, { 34,16 }, { 51,16 }, { 69,16}, { 86,16}, {103,16}, { 120,16}, { 138,16}, { 155,16}, { 172,16}, { 189,16}, {207, 16}, {215, 16}, {224,16}, + {0,32}, { 17, 32}, { 34,32 }, { 51,32 }, { 69,32}, { 86,32}, {103,32}, { 120,32}, { 138,32}, { 155,32}, { 172,32}, { 189,32}, {207, 32}, {224,32}, + { 17, 48}, { 34,48 }, { 51,48 }, { 69,48}, { 86,48}, {103,48}, { 120,48}, { 138,48}, { 155,48}, { 172,48}, { 189,48}, {207, 48}, {215, 48}, {224,48}, {224,48}, + { 17, 64}, { 51,64 }, { 86,64}, { 103,64}, { 138,64}, { 172,64}, {224, 64}, +}, { + 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, 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, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, +} }; + +void rgb_matrix_indicators_user(void) { + if (host_keyboard_led_state().caps_lock) { + rgb_matrix_set_color(33, 255, 255, 255); + } +} + + +#endif + +bool process_record_kb(uint16_t keycode, keyrecord_t *record) { + 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; + case KC_F15: + rgb_matrix_increase_speed(); + return false; + case KC_F16: + rgb_matrix_decrease_speed(); + return false; + case KC_F17: + rgb_matrix_increase_hue(); + return false; + case KC_F18: + rgb_matrix_decrease_hue(); + return false; + case KC_F19: + rgb_matrix_increase_sat(); + return false; + case KC_F20: + rgb_matrix_decrease_sat(); + return false; + case KC_F21: + rgb_matrix_increase_val(); + return false; + case KC_F22: + rgb_matrix_decrease_val(); + return false; + #endif + #endif + default: + break; + } + } + return true; +} \ No newline at end of file diff --git a/keyboards/mechlovin/adelais/rgb_led/rev2/rev2.h b/keyboards/mechlovin/adelais/rgb_led/rev2/rev2.h new file mode 100644 index 000000000000..16cdf9ed8565 --- /dev/null +++ b/keyboards/mechlovin/adelais/rgb_led/rev2/rev2.h @@ -0,0 +1,19 @@ +/* Copyright 2020 Team 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" diff --git a/keyboards/mechlovin/adelais/rgb_led/rev2/rules.mk b/keyboards/mechlovin/adelais/rgb_led/rev2/rules.mk new file mode 100644 index 000000000000..014db586b867 --- /dev/null +++ b/keyboards/mechlovin/adelais/rgb_led/rev2/rules.mk @@ -0,0 +1,2 @@ +RGB_MATRIX_ENABLE = IS31FL3731 +RGBLIGHT_ENABLE = yes \ No newline at end of file diff --git a/keyboards/mechlovin/adelais/rgb_led/rules.mk b/keyboards/mechlovin/adelais/rgb_led/rules.mk index 20256e2086f8..8a9bdd433d63 100644 --- a/keyboards/mechlovin/adelais/rgb_led/rules.mk +++ b/keyboards/mechlovin/adelais/rgb_led/rules.mk @@ -1 +1,3 @@ -RGB_MATRIX_ENABLE = WS2812 + + +DEFAULT_FOLDER = mechlovin/adelais/rgb_led/rev1 \ No newline at end of file From 395fd7bb561fd0780b4738ce3ed49ae5ebe0b386 Mon Sep 17 00:00:00 2001 From: TerryMathews Date: Fri, 7 Aug 2020 06:59:41 -0400 Subject: [PATCH 538/930] Blocked65: add support for VIA Configurator (#9938) * Update config.h * Create keymap.c * Create rules.mk --- keyboards/wheatfield/blocked65/config.h | 4 +- .../wheatfield/blocked65/keymaps/via/keymap.c | 49 +++++++++++++++++++ .../wheatfield/blocked65/keymaps/via/rules.mk | 1 + 3 files changed, 52 insertions(+), 2 deletions(-) create mode 100644 keyboards/wheatfield/blocked65/keymaps/via/keymap.c create mode 100644 keyboards/wheatfield/blocked65/keymaps/via/rules.mk diff --git a/keyboards/wheatfield/blocked65/config.h b/keyboards/wheatfield/blocked65/config.h index ea5c31611253..fb277881829d 100644 --- a/keyboards/wheatfield/blocked65/config.h +++ b/keyboards/wheatfield/blocked65/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 0x6060 +#define VENDOR_ID 0x5746 //WF +#define PRODUCT_ID 0x0001 //Blocked65 #define DEVICE_VER 0x0001 #define MANUFACTURER Dou #define PRODUCT Blocked65 diff --git a/keyboards/wheatfield/blocked65/keymaps/via/keymap.c b/keyboards/wheatfield/blocked65/keymaps/via/keymap.c new file mode 100644 index 000000000000..7c35725c0b8b --- /dev/null +++ b/keyboards/wheatfield/blocked65/keymaps/via/keymap.c @@ -0,0 +1,49 @@ +#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, + _FL, + _SL, + _LL +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [_BL] = 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_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_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, KC_DEL, KC_PSCR, + KC_TRNS, KC_NO, KC_UP, KC_NO, RGB_TOG, RGB_VAI, RGB_HUI, RGB_SAI, KC_INS, RESET, KC_PSCR, KC_SLCK, KC_PAUS, KC_BSLS, KC_SLCK, + KC_TRNS, KC_LEFT, KC_DOWN, KC_RGHT, RGB_MOD, RGB_VAD, RGB_HUD, RGB_SAD, KC_NO, KC_NO, KC_F14, KC_F15, KC_INS, KC_HOME, + KC_LSFT, KC_MPRV, KC_MPLY, KC_MNXT, KC_NO, BL_TOGG, KC_NO, KC_MUTE, KC_VOLD, KC_VOLU, KC_NO, KC_RSFT, RGB_MOD, KC_END, + KC_LCTL, KC_LGUI, KC_LALT, RESET, KC_RALT, KC_TRNS, KC_HOME, BL_STEP, KC_END + ), + + [_SL] = 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 + ), + + [_LL] = 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/wheatfield/blocked65/keymaps/via/rules.mk b/keyboards/wheatfield/blocked65/keymaps/via/rules.mk new file mode 100644 index 000000000000..1e5b99807cb7 --- /dev/null +++ b/keyboards/wheatfield/blocked65/keymaps/via/rules.mk @@ -0,0 +1 @@ +VIA_ENABLE = yes From 06f698a4960e1b2320932052ba6b788f64a89ad1 Mon Sep 17 00:00:00 2001 From: Maarten Dekkers Date: Fri, 7 Aug 2020 13:13:35 +0200 Subject: [PATCH 539/930] Fix Eon95 info.json (#9934) --- keyboards/maartenwut/eon95/info.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/keyboards/maartenwut/eon95/info.json b/keyboards/maartenwut/eon95/info.json index 740c9bb0cbe5..6580ef66ee5c 100644 --- a/keyboards/maartenwut/eon95/info.json +++ b/keyboards/maartenwut/eon95/info.json @@ -174,7 +174,6 @@ {"x":15.5, "y":2.25}, {"x":16.5, "y":2.25}, {"x":17.5, "y":2.25}, - {"x":18.5, "y":2.25, "h":2}, {"x":0, "y":3.25, "w":1.75}, {"x":1.75, "y":3.25}, @@ -192,6 +191,7 @@ {"x":15.5, "y":3.25}, {"x":16.5, "y":3.25}, {"x":17.5, "y":3.25}, + {"x":18.5, "y":2.25, "h":2}, {"x":0, "y":4.25, "w":2.25}, {"x":2.25, "y":4.25}, @@ -281,7 +281,6 @@ {"x":15.5, "y":2.25}, {"x":16.5, "y":2.25}, {"x":17.5, "y":2.25}, - {"x":18.5, "y":2.25, "h":2}, {"x":0, "y":3.25, "w":1.75}, {"x":1.75, "y":3.25}, @@ -300,6 +299,7 @@ {"x":15.5, "y":3.25}, {"x":16.5, "y":3.25}, {"x":17.5, "y":3.25}, + {"x":18.5, "y":2.25, "h":2}, {"x":0, "y":4.25, "w":1.25}, {"x":1.25, "y":4.25}, From 7d2cfadb550d931c5062dba78c7388af3d24964b Mon Sep 17 00:00:00 2001 From: Jan Christoph Ebersbach Date: Fri, 7 Aug 2020 13:40:41 +0200 Subject: [PATCH 540/930] handwired/dactyl_manuform/5x6_5: fix broken keyboard and keymap reference (#9921) --- .../dactyl_manuform/5x6_5/keymaps/default/keymap.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/keyboards/handwired/dactyl_manuform/5x6_5/keymaps/default/keymap.json b/keyboards/handwired/dactyl_manuform/5x6_5/keymaps/default/keymap.json index 901a707ad41a..14027b215747 100644 --- a/keyboards/handwired/dactyl_manuform/5x6_5/keymaps/default/keymap.json +++ b/keyboards/handwired/dactyl_manuform/5x6_5/keymaps/default/keymap.json @@ -2,8 +2,8 @@ "version": 1, "notes": "", "author": "Jan Christoph Ebersbach", - "keyboard": "dactyl_manuform/5x6_5/default", - "keymap": "dactyl_manuform_5x6_5_default", + "keyboard": "handwired/dactyl_manuform/5x6_5", + "keymap": "default", "layout": "LAYOUT_5x6_5", "layers": [ [ From 24c898218bedbdddbdc85c9a255a08905de3a1cf Mon Sep 17 00:00:00 2001 From: Tom Barnes Date: Fri, 7 Aug 2020 18:26:02 +0100 Subject: [PATCH 541/930] [Keymap] add mini_bom chorded keymap (#9916) * add mini_bom chorded keymap * Update keymap.c * Update config.h * Update keyboards/centromere/keymaps/mini_bom/config.h * Update keyboards/centromere/keymaps/mini_bom/keymap.c * Update keyboards/centromere/keymaps/mini_bom/rules.mk * Update keyboards/centromere/keymaps/mini_bom/keymap.c --- .../centromere/keymaps/mini_bom/config.h | 28 ++++ .../centromere/keymaps/mini_bom/keymap.c | 153 ++++++++++++++++++ .../centromere/keymaps/mini_bom/readme.md | 1 + .../centromere/keymaps/mini_bom/rules.mk | 1 + 4 files changed, 183 insertions(+) create mode 100644 keyboards/centromere/keymaps/mini_bom/config.h create mode 100644 keyboards/centromere/keymaps/mini_bom/keymap.c create mode 100644 keyboards/centromere/keymaps/mini_bom/readme.md create mode 100644 keyboards/centromere/keymaps/mini_bom/rules.mk diff --git a/keyboards/centromere/keymaps/mini_bom/config.h b/keyboards/centromere/keymaps/mini_bom/config.h new file mode 100644 index 000000000000..61b0a76297c8 --- /dev/null +++ b/keyboards/centromere/keymaps/mini_bom/config.h @@ -0,0 +1,28 @@ +/* Copyright 2020 keyboard-magpie + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#pragma once + +#ifdef COMBO_ENABLE +# define COMBO_COUNT 10 +# define COMBO_TERM 50 +#endif + +#ifdef TAPPING_TERM +# undef TAPPING_TERM +#endif +#define TAPPING_TERM 200 +#define IGNORE_MOD_TAP_INTERRUPT diff --git a/keyboards/centromere/keymaps/mini_bom/keymap.c b/keyboards/centromere/keymaps/mini_bom/keymap.c new file mode 100644 index 000000000000..75b2ea08f177 --- /dev/null +++ b/keyboards/centromere/keymaps/mini_bom/keymap.c @@ -0,0 +1,153 @@ +/* Copyright 2020 keyboard-magpie + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public 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. + + +enum centromere_layers +{ + _BASE, + _SYMB, + _NUMB, +}; + + enum combo_events { + COMBO_BSPC, + COMBO_TAB, + COMBO_ESC, + COMBO_DEL, + COMBO_UNDS, + COMBO_BKSL, + COMBO_LESS, + COMBO_MORE, + COMBO_QUOT, + COMBO_DASH, + }; + + + /* Combomap + * + * ,-----------------------------. ,--------------------------------. + * | | ESC | | | | | | BSLH | + * |-----+-----+-----+-----+------| |--------------------------------| + * | | BSPC | | | LES | GRT | | + * |-----+-----+-----+--RMB+-LMB--+ |--------------------------------| + * | | MINS | | | | QUO | UNDR | | | + * `------+-----+-----+------+----' `--------------------------------' + * .-------------------------. .-----------------. + * | | | | | | | | + * '-------------------------' '-----------------' + */ + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +/* Keymap 0: Basic layer + * + * ,-----------------------------. ,--------------------------------. + * | Q | W | E | R | T | | Y | U | I | O | P | + * |-----+-----+-----+-----+------| |--------------------------------| + * |CTRL/A| S | D | F | G | | H | J | K | L | CTRL/; | + * |-----+-----+-----+-----+------+ |--------------------------------| + * |SHFT/Z| X | C | V | B | | N | M | < | > | SHFT/? | + * `------+-----+-----+------+----' `--------------------------------' + * .-------------------------. .-----------------. + * |ESC/META|ENT/ALT|SPC(SYM)| |SPC(NUM)|BSPC|TAB| + * '-------------------------' '-----------------' + */ + +[_BASE] = LAYOUT( + KC_NO, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_NO, + KC_NO, MT(MOD_LCTL, KC_A), KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, MT(MOD_LCTL, KC_SCLN), KC_NO, + KC_NO, MT(MOD_RSFT, KC_Z), KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, MT(MOD_RSFT, KC_SLSH), KC_NO, + MT(MOD_LGUI, KC_ESC), MT(MOD_LALT, KC_ENT), LT(_SYMB, KC_SPC), LT(_NUMB, KC_SPC), KC_LSFT, MT(MOD_RSFT, KC_TAB) + ), + + /* Keymap 1: Symbols layer + * ,-----------------------------. ,--------------------------------. + * | ! | @ | { | } | | ` | ~ | | | \ | + * |-----+-----+-----+-----+------| |--------------------------------| + * | # | $ | ( | ) | LMB | | + | - | / | * | ' | + * |-----+-----+-----+-----+------+ |--------------------------------| + * | % | ^ | [ | ] | RMB | | & | = | , | . | - | + * `------+-----+-----+------+----' `--------------------------------' + * .-----------------. .------------------. + * |MMB | ; | = | | = | ; | DEL | + * '-----------------' '------------------' + */ +[_SYMB] = LAYOUT( + KC_NO, KC_EXLM, KC_AT, KC_LCBR, KC_RCBR, KC_PIPE, KC_GRV, KC_TILD, KC_TRNS, KC_TRNS, KC_BSLS, KC_NO, + KC_NO, KC_HASH, KC_DLR, KC_LPRN, KC_RPRN, KC_BTN2, KC_PLUS, KC_MINS, KC_SLSH, KC_ASTR, KC_QUOT, KC_NO, + KC_NO, KC_PERC, KC_CIRC, KC_LBRC, KC_RBRC, KC_BTN1, KC_AMPR, KC_EQL, KC_COMM, KC_DOT, KC_MINS, KC_NO, + CMB_TOG, KC_SCLN, KC_EQL, KC_EQL, KC_SCLN, KC_DEL + ), + + /* Keymap 2: Pad/Function layer + * ,-----------------------------. ,-------------------------------. + * | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | + * |-----+-----+-----+-----+------| |-------------------------------| + * | F1 | F2 | F3 | F4 | F5 | | LFT | DWN | UP | RGT | VOLUP | + * |-----+-----+-----+-----+------+ |-------------------------------| + * | F6 | F7 | F8 | F9 | F10 | |MLFT | MDWN| MUP | MRGT| VOLDN | + * `------+-----+-----+------+----' `-------------------------------' + * .-----------------. .-----------------. + * | F11 | F12| | | | PLY | SKP | + * '-----------------' '-----------------' + */ +[_NUMB] = LAYOUT( + KC_NO, 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_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_VOLU, KC_NO, + KC_NO, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_MS_L, KC_MS_D, KC_MS_U, KC_MS_R, KC_VOLD, KC_NO, + KC_F11, KC_F12, KC_TRNS, KC_TRNS, KC_MPLY, KC_MNXT + ), + +}; + + +// layer_state_t layer_state_set_user(layer_state_t state) { +// return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST); +// } + +#ifdef COMBO_ENABLE +const uint16_t PROGMEM combo_bspc[] = {KC_S, KC_D, COMBO_END}; +const uint16_t PROGMEM combo_tab[] = {KC_D, KC_F, COMBO_END}; +const uint16_t PROGMEM combo_esc[] = {KC_W, KC_E, COMBO_END}; +const uint16_t PROGMEM combo_del[] = {KC_A, KC_S, COMBO_END}; +const uint16_t PROGMEM combo_unds[] = {KC_M, KC_COMM, COMBO_END}; +const uint16_t PROGMEM combo_bksl[] = {KC_O, KC_P, COMBO_END}; +const uint16_t PROGMEM combo_less[] = {KC_H, KC_J, COMBO_END}; +const uint16_t PROGMEM combo_more[] = {KC_K, KC_L, COMBO_END}; +const uint16_t PROGMEM combo_quot[] = {KC_N, KC_M, COMBO_END}; +const uint16_t PROGMEM combo_dash[] = {KC_X, KC_C, COMBO_END}; + +combo_t key_combos[COMBO_COUNT] = { + [COMBO_BSPC] = COMBO(combo_bspc,KC_BSPC), + [COMBO_TAB] = COMBO(combo_tab,KC_TAB), + [COMBO_ESC] = COMBO(combo_esc,KC_ESC), + [COMBO_DEL] = COMBO(combo_del,KC_DEL), + [COMBO_UNDS] = COMBO(combo_unds, KC_UNDS), + [COMBO_BKSL] = COMBO(combo_bksl,KC_BSLS), + [COMBO_LESS] = COMBO(combo_less,KC_LT), + [COMBO_MORE] = COMBO(combo_more,KC_GT), + [COMBO_QUOT] = COMBO(combo_quot, KC_QUOT), + [COMBO_DASH] = COMBO(combo_dash, KC_MINS), +}; +#endif diff --git a/keyboards/centromere/keymaps/mini_bom/readme.md b/keyboards/centromere/keymaps/mini_bom/readme.md new file mode 100644 index 000000000000..6efa1d4c7427 --- /dev/null +++ b/keyboards/centromere/keymaps/mini_bom/readme.md @@ -0,0 +1 @@ +Porting a keymap with chording inspired by gboards.ca gergoplex default keymap, to the centromere mini. \ No newline at end of file diff --git a/keyboards/centromere/keymaps/mini_bom/rules.mk b/keyboards/centromere/keymaps/mini_bom/rules.mk new file mode 100644 index 000000000000..ab1e438182a3 --- /dev/null +++ b/keyboards/centromere/keymaps/mini_bom/rules.mk @@ -0,0 +1 @@ +COMBO_ENABLE = yes From 55102ed9802b5d87d10a8c0300b12a80b73f83f2 Mon Sep 17 00:00:00 2001 From: Yasuhiro SHIMIZU Date: Sat, 8 Aug 2020 02:36:32 +0900 Subject: [PATCH 542/930] update yshrsmz lily58 keymap (#9937) --- keyboards/lily58/keymaps/yshrsmz/config.h | 4 +- keyboards/lily58/keymaps/yshrsmz/keymap.c | 58 ++++++++--------------- keyboards/lily58/keymaps/yshrsmz/rules.mk | 7 +-- 3 files changed, 25 insertions(+), 44 deletions(-) diff --git a/keyboards/lily58/keymaps/yshrsmz/config.h b/keyboards/lily58/keymaps/yshrsmz/config.h index 58bbdc5e9d05..6b9e52c05ee0 100644 --- a/keyboards/lily58/keymaps/yshrsmz/config.h +++ b/keyboards/lily58/keymaps/yshrsmz/config.h @@ -28,8 +28,6 @@ along with this program. If not, see . // #define MASTER_RIGHT // #define EE_HANDS -#define SSD1306OLED - #define USE_SERIAL_PD2 #define TAPPING_FORCE_HOLD @@ -49,4 +47,4 @@ along with this program. If not, see . #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 index 6bbf9b3ee7a7..545d440b4346 100644 --- a/keyboards/lily58/keymaps/yshrsmz/keymap.c +++ b/keyboards/lily58/keymaps/yshrsmz/keymap.c @@ -8,8 +8,6 @@ #include "ssd1306.h" #endif - - #ifdef RGBLIGHT_ENABLE //Following line allows macro to read current RGB settings extern rgblight_config_t rgblight_config; @@ -137,16 +135,18 @@ 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 +//SSD1306 OLED update loop, make sure to enable OLED_DRIVER_ENABLE=yes in rules.mk +#ifdef OLED_DRIVER_ENABLE -// When add source files to SRC in rules.mk, you can use functions. +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; +} + +// When you 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); @@ -158,42 +158,24 @@ const char *read_keylogs(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) { +void oled_task_user(void) { + if (is_keyboard_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()); + oled_write_ln(read_layer_state(), false); + oled_write_ln(read_keylog(), false); + oled_write_ln(read_keylogs(), false); + //oled_write_ln(read_mode_icon(keymap_config.swap_lalt_lgui), false); + //oled_write_ln(read_host_led_state(), false); + //oled_write_ln(read_timelog(), false); } 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; + oled_write(read_logo(), false); } } - -void iota_gfx_task_user(void) { - struct CharacterMatrix matrix; - matrix_clear(&matrix); - matrix_render_user(&matrix); - matrix_update(&display, &matrix); -} -#endif//SSD1306OLED +#endif // OLED_DRIVER_ENABLE bool process_record_user(uint16_t keycode, keyrecord_t *record) { if (record->event.pressed) { -#ifdef SSD1306OLED +#ifdef OLED_DRIVER_ENABLE set_keylog(keycode, record); #endif // set_timelog(); diff --git a/keyboards/lily58/keymaps/yshrsmz/rules.mk b/keyboards/lily58/keymaps/yshrsmz/rules.mk index 9c0b3dee64b5..4d481eac120f 100644 --- a/keyboards/lily58/keymaps/yshrsmz/rules.mk +++ b/keyboards/lily58/keymaps/yshrsmz/rules.mk @@ -1,8 +1,9 @@ -RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. +RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. +AUTO_SHIFT_ENABLE = yes +OLED_DRIVER_ENABLE= yes # OLED display # If you want to change the display of OLED, you need to change here -SRC += ./lib/glcdfont.c \ - ./lib/rgb_state_reader.c \ +SRC += ./lib/rgb_state_reader.c \ ./lib/layer_state_reader.c \ ./lib/logo_reader.c \ ./lib/keylogger.c \ From 99905dcfa37b7445497c0ce87b0f94ea66139f31 Mon Sep 17 00:00:00 2001 From: ai03 Date: Sat, 8 Aug 2020 02:39:29 +0900 Subject: [PATCH 543/930] [Keyboard] Add ai03 Vega (#9850) * Make initial set of files * Update keymap * Cleanup rules.mk * Update keyboards/ai03/vega/keymaps/via/keymap.c * Update keyboards/ai03/vega/config.h * Update keyboards/ai03/vega/readme.md * Update keyboards/ai03/vega/readme.md * Update keyboards/ai03/vega/rules.mk * Add license headers * Apply suggestions from code review --- keyboards/ai03/vega/bootloader_defs.h | 7 + keyboards/ai03/vega/chconf.h | 714 +++++++++++++++++++ keyboards/ai03/vega/config.h | 63 ++ keyboards/ai03/vega/halconf.h | 525 ++++++++++++++ keyboards/ai03/vega/info.json | 379 ++++++++++ keyboards/ai03/vega/keymaps/default/keymap.c | 47 ++ keyboards/ai03/vega/keymaps/via/keymap.c | 65 ++ keyboards/ai03/vega/keymaps/via/rules.mk | 2 + keyboards/ai03/vega/mcuconf.h | 176 +++++ keyboards/ai03/vega/readme.md | 15 + keyboards/ai03/vega/rules.mk | 22 + keyboards/ai03/vega/vega.c | 37 + keyboards/ai03/vega/vega.h | 33 + 13 files changed, 2085 insertions(+) create mode 100644 keyboards/ai03/vega/bootloader_defs.h create mode 100644 keyboards/ai03/vega/chconf.h create mode 100644 keyboards/ai03/vega/config.h create mode 100644 keyboards/ai03/vega/halconf.h create mode 100644 keyboards/ai03/vega/info.json create mode 100644 keyboards/ai03/vega/keymaps/default/keymap.c create mode 100644 keyboards/ai03/vega/keymaps/via/keymap.c create mode 100644 keyboards/ai03/vega/keymaps/via/rules.mk create mode 100644 keyboards/ai03/vega/mcuconf.h create mode 100644 keyboards/ai03/vega/readme.md create mode 100644 keyboards/ai03/vega/rules.mk create mode 100644 keyboards/ai03/vega/vega.c create mode 100644 keyboards/ai03/vega/vega.h diff --git a/keyboards/ai03/vega/bootloader_defs.h b/keyboards/ai03/vega/bootloader_defs.h new file mode 100644 index 000000000000..02c48c4e6dcb --- /dev/null +++ b/keyboards/ai03/vega/bootloader_defs.h @@ -0,0 +1,7 @@ +/* Address for jumping to bootloader on STM32 chips. */ +/* 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 + */ +#define STM32_BOOTLOADER_ADDRESS 0x1FFFC800 diff --git a/keyboards/ai03/vega/chconf.h b/keyboards/ai03/vega/chconf.h new file mode 100644 index 000000000000..03f63da36a88 --- /dev/null +++ b/keyboards/ai03/vega/chconf.h @@ -0,0 +1,714 @@ +/* + 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. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +/** + * @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. + * + * @addtogroup config + * @details Kernel related settings and hooks. + * @{ + */ + +#ifndef CHCONF_H +#define CHCONF_H + +#define _CHIBIOS_RT_CONF_ +#define _CHIBIOS_RT_CONF_VER_6_0_ + +/*===========================================================================*/ +/** + * @name System timers settings + * @{ + */ +/*===========================================================================*/ + +/** + * @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. + * @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. + */ +#if !defined(CH_CFG_ST_TIMEDELTA) +#define CH_CFG_ST_TIMEDELTA 2 +#endif + +/** @} */ + +/*===========================================================================*/ +/** + * @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. + */ +#if !defined(CH_CFG_TIME_QUANTUM) +#define CH_CFG_TIME_QUANTUM 0 +#endif + +/** + * @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. + */ +#if !defined(CH_CFG_MEMCORE_SIZE) +#define CH_CFG_MEMCORE_SIZE 0 +#endif + +/** + * @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. + */ +#if !defined(CH_CFG_NO_IDLE_THREAD) +#define CH_CFG_NO_IDLE_THREAD FALSE +#endif + +/** @} */ + +/*===========================================================================*/ +/** + * @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. + */ +#if !defined(CH_CFG_OPTIMIZE_SPEED) +#define CH_CFG_OPTIMIZE_SPEED FALSE +#endif + +/** @} */ + +/*===========================================================================*/ +/** + * @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. + */ +#if !defined(CH_CFG_USE_TM) +#define CH_CFG_USE_TM FALSE +#endif + +/** + * @brief Threads registry APIs. + * @details If enabled then the registry APIs are included in the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_REGISTRY) +#define CH_CFG_USE_REGISTRY TRUE +#endif + +/** + * @brief Threads synchronization APIs. + * @details If enabled then the @p chThdWait() function is included in + * the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_WAITEXIT) +#define CH_CFG_USE_WAITEXIT TRUE +#endif + +/** + * @brief Semaphores APIs. + * @details If enabled then the Semaphores APIs are included in the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_SEMAPHORES) +#define CH_CFG_USE_SEMAPHORES TRUE +#endif + +/** + * @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. + */ +#if !defined(CH_CFG_USE_SEMAPHORES_PRIORITY) +#define CH_CFG_USE_SEMAPHORES_PRIORITY FALSE +#endif + +/** + * @brief Mutexes APIs. + * @details If enabled then the mutexes APIs are included in the kernel. + * + * @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. + * @note Recursive mutexes are heavier and have an increased + * memory footprint. + * + * @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. + * @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. + */ +#if !defined(CH_CFG_USE_CONDVARS) +#define CH_CFG_USE_CONDVARS TRUE +#endif + +/** + * @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. + */ +#if !defined(CH_CFG_USE_CONDVARS_TIMEOUT) +#define CH_CFG_USE_CONDVARS_TIMEOUT FALSE +#endif + +/** + * @brief Events Flags APIs. + * @details If enabled then the event flags APIs are included in the kernel. + * + * @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. + * @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. + */ +#if !defined(CH_CFG_USE_EVENTS_TIMEOUT) +#define CH_CFG_USE_EVENTS_TIMEOUT TRUE +#endif + +/** + * @brief Synchronous Messages APIs. + * @details If enabled then the synchronous messages APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_MESSAGES) +#define CH_CFG_USE_MESSAGES TRUE +#endif + +/** + * @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. + */ +#if !defined(CH_CFG_USE_MESSAGES_PRIORITY) +#define CH_CFG_USE_MESSAGES_PRIORITY FALSE +#endif + +/** + * @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. + */ +#if !defined(CH_CFG_USE_MAILBOXES) +#define CH_CFG_USE_MAILBOXES TRUE +#endif + +/** + * @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. + */ +#if !defined(CH_CFG_USE_MEMCORE) +#define CH_CFG_USE_MEMCORE TRUE +#endif + +/** + * @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. + */ +#if !defined(CH_CFG_USE_HEAP) +#define CH_CFG_USE_HEAP FALSE +#endif + +/** + * @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. + */ +#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. + * @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. + */ +#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 + +/** @} */ + +/*===========================================================================*/ +/** + * @name Debug options + * @{ + */ +/*===========================================================================*/ + +/** + * @brief Debug option, kernel statistics. + * + * @note The default is @p FALSE. + */ +#if !defined(CH_DBG_STATISTICS) +#define CH_DBG_STATISTICS FALSE +#endif + +/** + * @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. + */ +#if !defined(CH_DBG_SYSTEM_STATE_CHECK) +#define CH_DBG_SYSTEM_STATE_CHECK FALSE +#endif + +/** + * @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. + */ +#if !defined(CH_DBG_ENABLE_CHECKS) +#define CH_DBG_ENABLE_CHECKS FALSE +#endif + +/** + * @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. + */ +#if !defined(CH_DBG_ENABLE_ASSERTS) +#define CH_DBG_ENABLE_ASSERTS FALSE +#endif + +/** + * @brief Debug option, trace buffer. + * @details If enabled then the trace buffer is activated. + * + * @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. + * @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. + */ +#if !defined(CH_DBG_ENABLE_STACK_CHECK) +#define CH_DBG_ENABLE_STACK_CHECK FALSE +#endif + +/** + * @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. + */ +#if !defined(CH_DBG_FILL_THREADS) +#define CH_DBG_FILL_THREADS FALSE +#endif + +/** + * @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. + */ +#if !defined(CH_DBG_THREADS_PROFILING) +#define CH_DBG_THREADS_PROFILING FALSE +#endif + +/** @} */ + +/*===========================================================================*/ +/** + * @name Kernel hooks + * @{ + */ +/*===========================================================================*/ + +/** + * @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. + */ +#define CH_CFG_THREAD_EXTRA_FIELDS \ + /* Add threads custom fields here.*/ + +/** + * @brief Threads initialization hook. + * @details User initialization code added to the @p _thread_init() function. + * + * @note It is invoked from within @p _thread_init() 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/ai03/vega/config.h b/keyboards/ai03/vega/config.h new file mode 100644 index 000000000000..ac589276a7e7 --- /dev/null +++ b/keyboards/ai03/vega/config.h @@ -0,0 +1,63 @@ +/* +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 0xA103 +#define PRODUCT_ID 0x0015 +#define DEVICE_VER 0x0001 +#define MANUFACTURER ai03 Design Studio +#define PRODUCT Vega + +/* key matrix size */ +#define MATRIX_ROWS 5 +#define MATRIX_COLS 15 + +#define MATRIX_COL_PINS { B5, A3, A9, A8, B15, B14, B13, B12, B11, B10, B2, B1, B0, A7, A6 } +#define MATRIX_ROW_PINS { A1, A2, B3, A15, A10 } +#define DIODE_DIRECTION COL2ROW + +/* 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/ai03/vega/halconf.h b/keyboards/ai03/vega/halconf.h new file mode 100644 index 000000000000..16f32117d51b --- /dev/null +++ b/keyboards/ai03/vega/halconf.h @@ -0,0 +1,525 @@ +/* + 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. + 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 + +#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 +#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 cryptographic subsystem. + */ +#if !defined(HAL_USE_CRY) || defined(__DOXYGEN__) +#define HAL_USE_CRY FALSE +#endif + +/** + * @brief Enables the DAC subsystem. + */ +#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 +#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 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 +#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 +#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 + +/** + * @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. */ +/*===========================================================================*/ + +/** + * @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 + +/** + * @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. */ +/*===========================================================================*/ + +/** + * @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 the zero-copy API. + */ +#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 + +/** + * @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. */ +/*===========================================================================*/ + +/** + * @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 16 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 256 bytes for both the transmission and receive + * buffers. + */ +#if !defined(SERIAL_USB_BUFFERS_SIZE) || defined(__DOXYGEN__) +#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 + +/*===========================================================================*/ +/* 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 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 +#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. */ +/*===========================================================================*/ + +/** + * @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 + +/*===========================================================================*/ +/* 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/ai03/vega/info.json b/keyboards/ai03/vega/info.json new file mode 100644 index 000000000000..637071aa0110 --- /dev/null +++ b/keyboards/ai03/vega/info.json @@ -0,0 +1,379 @@ +{ + "keyboard_name": "Vega", + "url": "ai03.com", + "maintainer": "ai03", + "width": 16, + "height": 5, + "layouts": { + "LAYOUT_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": "Back Space", + "x": 13, + "y": 0 + }, + { + "label": "Delete", + "x": 14, + "y": 0 + }, + { + "label": "PgUp", + "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": "PgDn", + "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": "Home", + "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": "↑", + "x": 14, + "y": 3 + }, + { + "label": "End", + "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": 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": "Ctrl", + "x": 11.25, + "y": 4, + "w": 1.25 + }, + { + "label": "←", + "x": 13, + "y": 4 + }, + { + "label": "↓", + "x": 14, + "y": 4 + }, + { + "label": "→", + "x": 15, + "y": 4 + } + ] + } + } +} diff --git a/keyboards/ai03/vega/keymaps/default/keymap.c b/keyboards/ai03/vega/keymaps/default/keymap.c new file mode 100644 index 000000000000..1cf024c37011 --- /dev/null +++ b/keyboards/ai03/vega/keymaps/default/keymap.c @@ -0,0 +1,47 @@ +/* +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 + + +// 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, + _FN +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [_BASE] = 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_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_BSLS, KC_END, + 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_PGUP, + 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_PGDN, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_SPC, KC_SPC, KC_RALT, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT + ), + + [_FN] = 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_PGUP, _______, _______, _______, _______, KC_UP, _______, _______, _______, _______, _______, _______, + _______, _______, KC_HOME, KC_PGDN, KC_END, _______, _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_PGUP, _______, + _______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_END + ) + +}; diff --git a/keyboards/ai03/vega/keymaps/via/keymap.c b/keyboards/ai03/vega/keymaps/via/keymap.c new file mode 100644 index 000000000000..53d10127f33e --- /dev/null +++ b/keyboards/ai03/vega/keymaps/via/keymap.c @@ -0,0 +1,65 @@ +/* +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 + + +// 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, + _FN1, + _FN2, + _FN3 +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [_BASE] = 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_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_BSLS, KC_END, + 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_PGUP, + 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_PGDN, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_SPC, KC_SPC, KC_RALT, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT + ), + + [_FN1] = 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_PGUP, _______, _______, _______, _______, KC_UP, _______, _______, _______, _______, _______, _______, + _______, _______, KC_HOME, KC_PGDN, KC_END, _______, _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_PGUP, _______, + _______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_END + ), + + [_FN2] = LAYOUT_all( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + + [_FN3] = LAYOUT_all( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + +}; diff --git a/keyboards/ai03/vega/keymaps/via/rules.mk b/keyboards/ai03/vega/keymaps/via/rules.mk new file mode 100644 index 000000000000..16d33cd89fe4 --- /dev/null +++ b/keyboards/ai03/vega/keymaps/via/rules.mk @@ -0,0 +1,2 @@ +VIA_ENABLE = yes + diff --git a/keyboards/ai03/vega/mcuconf.h b/keyboards/ai03/vega/mcuconf.h new file mode 100644 index 000000000000..4ff1fd7ffe44 --- /dev/null +++ b/keyboards/ai03/vega/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 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_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/ai03/vega/readme.md b/keyboards/ai03/vega/readme.md new file mode 100644 index 000000000000..9f6155a9f478 --- /dev/null +++ b/keyboards/ai03/vega/readme.md @@ -0,0 +1,15 @@ +# Vega + +![Vega](https://i.imgur.com/7ZcCqwPl.png) + +A typical 65% keyboard + +* Keyboard Maintainer: [ai03](https://github.com/ai03-2725) +* Hardware Supported: Vega PCBs, both solderable and hotswap +* Hardware Availability: Check the Vega page on [ai03's website](https://ai03.com/) + +Make example for this keyboard (after setting up your build environment): + + make ai03/vega: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/vega/rules.mk b/keyboards/ai03/vega/rules.mk new file mode 100644 index 000000000000..b5330c8e7e64 --- /dev/null +++ b/keyboards/ai03/vega/rules.mk @@ -0,0 +1,22 @@ +# 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 = 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 +BLUETOOTH_ENABLE = no # Enable Bluetooth +AUDIO_ENABLE = no # Audio output + +# Enter lower-power sleep mode when on the ChibiOS idle thread +OPT_DEFS += -DCORTEX_ENABLE_WFI_IDLE=TRUE diff --git a/keyboards/ai03/vega/vega.c b/keyboards/ai03/vega/vega.c new file mode 100644 index 000000000000..27a55e134dac --- /dev/null +++ b/keyboards/ai03/vega/vega.c @@ -0,0 +1,37 @@ +/* Copyright 2020 ai03 + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#include "vega.h" + +void matrix_init_kb(void) { + // Initialize indicator LEDs to output + + setPinOutput(B7); // Caps + setPinOutput(A5); // Slck + + matrix_init_user(); +} + +bool led_update_kb(led_t led_state) { + + bool res = led_update_user(led_state); + + if(res) { + writePin(B7, !led_state.caps_lock); + writePin(A5, !led_state.scroll_lock); + } + return res; +} \ No newline at end of file diff --git a/keyboards/ai03/vega/vega.h b/keyboards/ai03/vega/vega.h new file mode 100644 index 000000000000..d7cfb1867a82 --- /dev/null +++ b/keyboards/ai03/vega/vega.h @@ -0,0 +1,33 @@ +/* Copyright 2020 ai03 + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License 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( \ + K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K212, 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, K213, K214, \ + K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, K314, \ + K400, K401, K402, K404, K406, K408, K410, K411, K412, K413, K414 \ +) { \ + { 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, K213, K214 }, \ + { K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, K314 }, \ + { K400, K401, K402, KC_NO, K404, KC_NO, K406, KC_NO, K408, KC_NO, K410, K411, K412, K413, K414 } \ +} From a260cbbea6a0e41931e2c4a50520215d4da93be7 Mon Sep 17 00:00:00 2001 From: KDon <370490639@qq.com> Date: Sat, 8 Aug 2020 02:12:14 +0800 Subject: [PATCH 544/930] [Keyboard] Add kabedon keyboards (#9929) * Add kabedon keyboards * #define DYNAMIC_KEYMAP_EEPROM_MAX_ADDR 2047 * change README.md * Update README.md * Update config.h * Update keymap.c * Update rules.mk * Update rules.mk * Update README.md * Update info.json * Update kabedon980.c * Update keymap.c * Update rules.mk * Update config.h * Update config.h * Update info.json * Update README.md * Update rules.mk * Update README.md * Update kabedon980.c * Update rules.mk * Update rules.mk * Update rules.mk * Update rules.mk * Update rules.mk * Update README.md * Update README.md * Update info.json --- keyboards/kabedon/kabedon78s/README.md | 13 ++ keyboards/kabedon/kabedon78s/config.h | 52 ++++++++ keyboards/kabedon/kabedon78s/info.json | 119 ++++++++++++++++++ keyboards/kabedon/kabedon78s/kabedon78s.c | 17 +++ keyboards/kabedon/kabedon78s/kabedon78s.h | 21 ++++ .../kabedon78s/keymaps/default/keymap.c | 21 ++++ .../kabedon/kabedon78s/keymaps/via/keymap.c | 37 ++++++ .../kabedon/kabedon78s/keymaps/via/rules.mk | 2 + keyboards/kabedon/kabedon78s/rules.mk | 23 ++++ keyboards/kabedon/kabedon980/README.md | 18 +++ keyboards/kabedon/kabedon980/config.h | 54 ++++++++ keyboards/kabedon/kabedon980/info.json | 112 +++++++++++++++++ keyboards/kabedon/kabedon980/kabedon980.c | 8 ++ keyboards/kabedon/kabedon980/kabedon980.h | 25 ++++ .../kabedon980/keymaps/default/keymap.c | 21 ++++ .../kabedon/kabedon980/keymaps/via/keymap.c | 37 ++++++ .../kabedon/kabedon980/keymaps/via/rules.mk | 2 + keyboards/kabedon/kabedon980/rules.mk | 23 ++++ 18 files changed, 605 insertions(+) create mode 100644 keyboards/kabedon/kabedon78s/README.md create mode 100644 keyboards/kabedon/kabedon78s/config.h create mode 100644 keyboards/kabedon/kabedon78s/info.json create mode 100644 keyboards/kabedon/kabedon78s/kabedon78s.c create mode 100644 keyboards/kabedon/kabedon78s/kabedon78s.h create mode 100644 keyboards/kabedon/kabedon78s/keymaps/default/keymap.c create mode 100644 keyboards/kabedon/kabedon78s/keymaps/via/keymap.c create mode 100644 keyboards/kabedon/kabedon78s/keymaps/via/rules.mk create mode 100644 keyboards/kabedon/kabedon78s/rules.mk create mode 100644 keyboards/kabedon/kabedon980/README.md create mode 100644 keyboards/kabedon/kabedon980/config.h create mode 100644 keyboards/kabedon/kabedon980/info.json create mode 100644 keyboards/kabedon/kabedon980/kabedon980.c create mode 100644 keyboards/kabedon/kabedon980/kabedon980.h create mode 100644 keyboards/kabedon/kabedon980/keymaps/default/keymap.c create mode 100644 keyboards/kabedon/kabedon980/keymaps/via/keymap.c create mode 100644 keyboards/kabedon/kabedon980/keymaps/via/rules.mk create mode 100644 keyboards/kabedon/kabedon980/rules.mk diff --git a/keyboards/kabedon/kabedon78s/README.md b/keyboards/kabedon/kabedon78s/README.md new file mode 100644 index 000000000000..6fd1420e5f3d --- /dev/null +++ b/keyboards/kabedon/kabedon78s/README.md @@ -0,0 +1,13 @@ +# Kabe Don 78S + +This is a special-shaped keyboard with smaller keyboard and more functions,Includes RGB LEDs Underglow + +* Keyboard Maintainer: [370490639](https://github.com/370490639) +* Hardware Supported: Kabe Don 78s +* Hardware Availability: Kabe Don 78S + +Make example for this keyboard (after setting up your build environment): + + make kabedon/kabedon78s: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/kabedon/kabedon78s/config.h b/keyboards/kabedon/kabedon78s/config.h new file mode 100644 index 000000000000..e0076afed8e9 --- /dev/null +++ b/keyboards/kabedon/kabedon78s/config.h @@ -0,0 +1,52 @@ +/* +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 0x4B44 //KD +#define PRODUCT_ID 0x3738 //78 +#define DEVICE_VER 0x0001 +#define MANUFACTURER Kabe_Don +#define PRODUCT 78S + +/* key matrix size */ +#define MATRIX_ROWS 6 +#define MATRIX_COLS 18 + +/* Keyboard Matrix Assignments */ +#define MATRIX_ROW_PINS {D0,D2,F7,B1,B0,D6} +#define MATRIX_COL_PINS {F5,F4,F6,C6,B6,B4,D3,D1,D4,F1,B3,D5,F0,C7,D7,B5,B2,E6} + +/* COL2ROW, ROW2COL*/ +#define DIODE_DIRECTION ROW2COL + +#define DEBOUNCE 5 + +#define RGB_DI_PIN B7 +#ifdef RGB_DI_PIN + #define RGBLED_NUM 20 + #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_ANIMATIONS +#endif + + diff --git a/keyboards/kabedon/kabedon78s/info.json b/keyboards/kabedon/kabedon78s/info.json new file mode 100644 index 000000000000..f4873eeff4fb --- /dev/null +++ b/keyboards/kabedon/kabedon78s/info.json @@ -0,0 +1,119 @@ +{ + "keyboard_name": "KabeDon78s", + "url": "", + "maintainer": "370490639", + "width": 22.25, + "height": 6.25, + "layouts": { + "LAYOUT": { + "layout": [ + {"label":"Esc", "x":1.5, "y":0}, + {"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":"F5", "x":8, "y":0}, + {"label":"F6", "x":10, "y":0}, + {"label":"F7", "x":11, "y":0}, + {"label":"F8", "x":12, "y":0}, + {"label":"F9", "x":13.5, "y":0}, + {"label":"F10", "x":14.5, "y":0}, + {"label":"F11", "x":15.5, "y":0}, + {"label":"F12", "x":16.5, "y":0}, + {"label":"Delete", "x":18.25, "y":0}, + {"label":"Home", "x":19.25, "y":0}, + {"label":"PgUp", "x":20.25, "y":0}, + {"label":"PgDn", "x":21.25, "y":0}, + {"label":"Insert", "x":0, "y":1.25}, + {"label":"~", "x":1.5, "y":1.25}, + {"label":"!", "x":2.5, "y":1.25}, + {"label":"@", "x":3.5, "y":1.25}, + {"label":"#", "x":4.5, "y":1.25}, + {"label":"$", "x":5.5, "y":1.25}, + {"label":"%", "x":6.5, "y":1.25}, + {"label":"^", "x":7.5, "y":1.25}, + {"label":"&", "x":9.5, "y":1.25}, + {"label":"*", "x":10.5, "y":1.25}, + {"label":"(", "x":11.5, "y":1.25}, + {"label":")", "x":12.5, "y":1.25}, + {"label":"_", "x":13.5, "y":1.25}, + {"label":"+", "x":14.5, "y":1.25}, + {"label":"Backspace", "x":15.5, "y":1.25, "w":2}, + {"label":"Num Lock", "x":18.25, "y":1.25}, + {"label":"/", "x":19.25, "y":1.25}, + {"label":"*", "x":20.25, "y":1.25}, + {"label":"-", "x":21.25, "y":1.25}, + {"label":"Pause", "x":0, "y":2.25}, + {"label":"Tab", "x":1.5, "y":2.25, "w":1.5}, + {"label":"Q", "x":3, "y":2.25}, + {"label":"W", "x":4, "y":2.25}, + {"label":"E", "x":5, "y":2.25}, + {"label":"R", "x":6, "y":2.25}, + {"label":"T", "x":7, "y":2.25}, + {"label":"Y", "x":9, "y":2.25}, + {"label":"U", "x":10, "y":2.25}, + {"label":"I", "x":11, "y":2.25}, + {"label":"O", "x":12, "y":2.25}, + {"label":"P", "x":13, "y":2.25}, + {"label":"{", "x":14, "y":2.25}, + {"label":"}", "x":15, "y":2.25}, + {"label":"|", "x":16, "y":2.25, "w":1.5}, + {"label":"7", "x":18.25, "y":2.25}, + {"label":"8", "x":19.25, "y":2.25}, + {"label":"9", "x":20.25, "y":2.25}, + {"label":"+", "x":21.25, "y":2.25, "h":2}, + {"label":"ScrLk", "x":0, "y":3.25}, + {"label":"Caps Lock", "x":1.5, "y":3.25, "w":1.75}, + {"label":"A", "x":3.25, "y":3.25}, + {"label":"S", "x":4.25, "y":3.25}, + {"label":"D", "x":5.25, "y":3.25}, + {"label":"F", "x":6.25, "y":3.25}, + {"label":"G", "x":7.25, "y":3.25}, + {"label":"H", "x":9.25, "y":3.25}, + {"label":"J", "x":10.25, "y":3.25}, + {"label":"K", "x":11.25, "y":3.25}, + {"label":"L", "x":12.25, "y":3.25}, + {"label":":", "x":13.25, "y":3.25}, + {"label":"\"", "x":14.25, "y":3.25}, + {"label":"Enter", "x":15.25, "y":3.25, "w":2.25}, + {"label":"4", "x":18.25, "y":3.25}, + {"label":"5", "x":19.25, "y":3.25}, + {"label":"6", "x":20.25, "y":3.25}, + {"label":"PrtSc", "x":0, "y":4.25}, + {"label":"Shift", "x":1.5, "y":4.25, "w":2.25}, + {"label":"Z", "x":3.75, "y":4.25}, + {"label":"X", "x":4.75, "y":4.25}, + {"label":"C", "x":5.75, "y":4.25}, + {"label":"V", "x":6.75, "y":4.25}, + {"label":"B", "x":7.75, "y":4.25}, + {"label":"N", "x":9.75, "y":4.25}, + {"label":"M", "x":10.75, "y":4.25}, + {"label":"<", "x":11.75, "y":4.25}, + {"label":">", "x":12.75, "y":4.25}, + {"label":"Shift", "x":13.75, "y":4.25, "w":1.75}, + {"label":"UP", "x":15.5, "y":4.25}, + {"label":"?", "x":16.5, "y":4.25}, + {"label":"1", "x":18.25, "y":4.25}, + {"label":"2", "x":19.25, "y":4.25}, + {"label":"3", "x":20.25, "y":4.25}, + {"label":"Enter", "x":21.25, "y":4.25, "h":2}, + {"label":"NmLk", "x":0, "y":5.25}, + {"label":"Ctrl", "x":1.5, "y":5.25, "w":1.25}, + {"label":"Win", "x":2.75, "y":5.25}, + {"label":"Fn", "x":3.75, "y":5.25}, + {"label":"Alt", "x":4.75, "y":5.25, "w":1.25}, + {"label":"space", "x":6, "y":5.25, "w":2.75}, + {"label":"space", "x":9.75, "y":5.25, "w":2.25}, + {"label":"Alt", "x":12, "y":5.25, "w":1.25}, + {"label":"Ctrl", "x":13.25, "y":5.25, "w":1.25}, + {"label":"LEFT", "x":14.5, "y":5.25}, + {"label":"Down", "x":15.5, "y":5.25}, + {"label":"Right", "x":16.5, "y":5.25}, + {"label":"0", "x":18.25, "y":5.25, "w":2}, + {"label":".", "x":20.25, "y":5.25} + ] + } + } +} + + diff --git a/keyboards/kabedon/kabedon78s/kabedon78s.c b/keyboards/kabedon/kabedon78s/kabedon78s.c new file mode 100644 index 000000000000..dc60ea752e8d --- /dev/null +++ b/keyboards/kabedon/kabedon78s/kabedon78s.c @@ -0,0 +1,17 @@ +/* Copyright 2018 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 "kabedon78s.h" diff --git a/keyboards/kabedon/kabedon78s/kabedon78s.h b/keyboards/kabedon/kabedon78s/kabedon78s.h new file mode 100644 index 000000000000..72752920b78d --- /dev/null +++ b/keyboards/kabedon/kabedon78s/kabedon78s.h @@ -0,0 +1,21 @@ +#pragma once + +#include "quantum.h" + +#define LAYOUT( \ + KA00, KA01, KA02, KA03, KA04, KA05, KA07, KA08, KA09, KA10, KA11, KA12, KA13, KA14, KA15, KA16, KA17, \ + KB06, KB00, KB01, KB02, KB03, KB04, KB05, KF05, KB07, KB08, KB09, KB10, KB11, KB12, KB13, KB14, KB15, KB16, KB17, \ + KC06, KC00, KC01, KC02, KC03, KC04, KC05, KF07, KC07, KC08, KC09, KC10, KC11, KC12, KC13, KC14, KC15, KC16, KC17, \ + KD06, KD00, KD01, KD02, KD03, KD04, KD05, KD07, KD08, KD09, KD10, KD11, KD12, KD13, KD14, KD15, KD16, \ + KE06, KE00, KE01, KE02, KE03, KE04, KE05, KE07, KE08, KE09, KE10, KE11, KE12, KE13, KE14, KE15, KE16, KE17, \ + KF06, KF00, KF01, KF02, KF03, KF04, KF08, KF09, KF10, KF11, KF12, KF13, KF14, KF16 \ +) { \ + { KA00, KA01, KA02, KA03, KA04, KA05,KC_NO, KA07, KA08, KA09, KA10, KA11, KA12, KB13, KA14, KA15, KA16, KA17}, \ + { KB00, KB01, KB02, KB03, KB04, KB05, KB06, KB07, KB08, KB09, KB10, KB11, KB12, KB13, KB14, KB15, KB16, KB17}, \ + { KC00, KC01, KC02, KC03, KC04, KC05, KC06, KC07, KC08, KC09, KC10, KC11, KC12, KC13, KC14, KC15, KC16, KC17}, \ + { KD00, KD01, KD02, KD03, KD04, KD05, KD06, KD07, KD08, KD09, KD10, KD11, KD12, KD13, KD14, KD15, KD16,KC_NO}, \ + { KE00, KE01, KE02, KE03, KE04, KE05, KE06, KE07, KE08, KE09, KE10, KE11, KE12, KE13, KE14, KE15, KE16, KE17}, \ + { KF00, KF01, KF02, KF03, KF04, KF05, KF06, KF07, KF08, KF09, KF10, KF11, KF12, KF13, KF14,KC_NO, KF16,KC_NO} \ +} + + diff --git a/keyboards/kabedon/kabedon78s/keymaps/default/keymap.c b/keyboards/kabedon/kabedon78s/keymaps/default/keymap.c new file mode 100644 index 000000000000..0861eabb00cf --- /dev/null +++ b/keyboards/kabedon/kabedon78s/keymaps/default/keymap.c @@ -0,0 +1,21 @@ +#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_DEL, KC_HOME, KC_PGUP, KC_PGDN, + KC_TRNS, 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_NLCK, KC_PSLS, KC_PAST, KC_PMNS, + 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_BSLS, KC_P7, KC_P8, KC_P9, KC_PPLS, + KC_TRNS, 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_TRNS, 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_P1, KC_P2, KC_P3, KC_PENT, + KC_TRNS, KC_LCTL, KC_LGUI, KC_LALT,MO(1), KC_SPC, KC_SPC, KC_RALT,KC_RCTL,KC_LEFT, KC_DOWN, KC_RGHT, KC_P0, KC_PDOT ), + + [1] = LAYOUT( + RGB_TOG, RGB_MOD, RGB_SAD, RGB_SAI, 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, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS, + KC_TRNS, KC_TRNS, 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/kabedon/kabedon78s/keymaps/via/keymap.c b/keyboards/kabedon/kabedon78s/keymaps/via/keymap.c new file mode 100644 index 000000000000..e7ceb58bf562 --- /dev/null +++ b/keyboards/kabedon/kabedon78s/keymaps/via/keymap.c @@ -0,0 +1,37 @@ +#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_DEL, KC_HOME, KC_PGUP, KC_PGDN, + KC_TRNS, 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_NLCK, KC_PSLS, KC_PAST, KC_PMNS, + 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_BSLS, KC_P7, KC_P8, KC_P9, KC_PPLS, + KC_TRNS, 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_TRNS, 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_P1, KC_P2, KC_P3, KC_PENT, + KC_TRNS, KC_LCTL, KC_LGUI, KC_LALT,MO(1), KC_SPC, KC_SPC, KC_RALT,KC_RCTL,KC_LEFT, KC_DOWN, KC_RGHT, KC_P0, KC_PDOT ), + + [1] = LAYOUT( + RGB_TOG, RGB_MOD, RGB_SAD, RGB_SAI, 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, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS, + KC_TRNS, KC_TRNS, 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, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS, + KC_TRNS, KC_TRNS, 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, KC_TRNS, 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/kabedon/kabedon78s/keymaps/via/rules.mk b/keyboards/kabedon/kabedon78s/keymaps/via/rules.mk new file mode 100644 index 000000000000..16d33cd89fe4 --- /dev/null +++ b/keyboards/kabedon/kabedon78s/keymaps/via/rules.mk @@ -0,0 +1,2 @@ +VIA_ENABLE = yes + diff --git a/keyboards/kabedon/kabedon78s/rules.mk b/keyboards/kabedon/kabedon78s/rules.mk new file mode 100644 index 000000000000..0a28dcbff851 --- /dev/null +++ b/keyboards/kabedon/kabedon78s/rules.mk @@ -0,0 +1,23 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +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 +BLUETOOTH_ENABLE = no # Enable Bluetooth +AUDIO_ENABLE = no # Audio output +UNICODE_ENABLE = yes # Unicode diff --git a/keyboards/kabedon/kabedon980/README.md b/keyboards/kabedon/kabedon980/README.md new file mode 100644 index 000000000000..7adb75ad0777 --- /dev/null +++ b/keyboards/kabedon/kabedon980/README.md @@ -0,0 +1,18 @@ +# Kabe Don 980 + +![Kabe Don 980](http://qungz.photo.store.qq.com/qun-qungz/V53LJWsQ407RKV3X7gmf3M0Ih23R00WB/V5bCQA1OTY5NTEwNjOx0B5fOCOlAQ!!/800?w5=2133&h5=1599&rf=viewer_421) + +A mechanical keyboard PCB in the same layout as the Leopold FC980M, sold by Kabe Don Peripherals on Taobao. +This PCB use Kailh hot swap sockets. +KabeDon980 Includes RGB Underglow. +Aluminium Alloy and Translucent Case. + +* Keyboard Maintainer: [370490639](https://github.com/370490639) +* Hardware Supported: Kabe Don 980 +* Hardware Availability: [Kabe Don 980](https://item.taobao.com/item.htm?spm=a1z10.1-c.w4023-17458066155.8.81406bd0J97pHX&id=614156027788) + +Make example for this keyboard (after setting up your build environment): + + make kabedon/kabedon980: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/kabedon/kabedon980/config.h b/keyboards/kabedon/kabedon980/config.h new file mode 100644 index 000000000000..5dc70dfebf31 --- /dev/null +++ b/keyboards/kabedon/kabedon980/config.h @@ -0,0 +1,54 @@ +/* +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 0x4B44 //KD +#define PRODUCT_ID 0x3938 //98 +#define DEVICE_VER 0x0001 +#define MANUFACTURER Kabe_Don +#define PRODUCT 980 + + +/* key matrix size */ +#define MATRIX_ROWS 10 +#define MATRIX_COLS 13 + +/* Keyboard Matrix Assignments */ +#define MATRIX_ROW_PINS {D0,D2,F7,B1,B0,D6,C7,D7,B5,B2} +#define MATRIX_COL_PINS {F5,F4,F6,C6,B6,B4,D3,D1,D4,F1,B3,D5,F0} +#define UNUSED_PINS +#define DYNAMIC_KEYMAP_EEPROM_MAX_ADDR 2047 +/* COL2ROW, ROW2COL*/ +#define DIODE_DIRECTION ROW2COL + +#define RGB_DI_PIN B7 +#ifdef RGB_DI_PIN + #define RGBLED_NUM 20 + #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_ANIMATIONS +#endif + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCE 5 + diff --git a/keyboards/kabedon/kabedon980/info.json b/keyboards/kabedon/kabedon980/info.json new file mode 100644 index 000000000000..eb41324d8d73 --- /dev/null +++ b/keyboards/kabedon/kabedon980/info.json @@ -0,0 +1,112 @@ +{ + "keyboard_name": "KabeDon980", + "url": "https://kabedon.taobao.com", + "maintainer": "370490639", + "width": 19.3, + "height": 6.3, + "layouts": { + "LAYOUT": { + "layout": [ + {"label":"ESC", "x":0, "y":0}, + {"label":"F1", "x":1.6, "y":0}, + {"label":"F2", "x":2.6, "y":0}, + {"label":"F3", "x":3.6, "y":0}, + {"label":"F4", "x":4.6, "y":0}, + {"label":"F5", "x":6.3, "y":0}, + {"label":"F6", "x":7.3, "y":0}, + {"label":"F7", "x":8.3, "y":0}, + {"label":"F8", "x":9.3, "y":0}, + {"label":"F9", "x":11.0, "y":0}, + {"label":"F10", "x":12.0, "y":0}, + {"label":"F11", "x":13.0, "y":0}, + {"label":"F12", "x":14.0, "y":0}, + {"label":"DELETE", "x":15.3, "y":0}, + {"label":"HOME", "x":16.3, "y":0}, + {"label":"PGUP", "x":17.3, "y":0}, + {"label":"PGDN", "x":18.3, "y":0}, + {"label":"~", "x":0, "y":1.15}, + {"label":"!", "x":1, "y":1.15}, + {"label":"@", "x":2, "y":1.15}, + {"label":"#", "x":3, "y":1.15}, + {"label":"$", "x":4, "y":1.15}, + {"label":"%", "x":5, "y":1.15}, + {"label":"^", "x":6, "y":1.15}, + {"label":"&", "x":7, "y":1.15}, + {"label":"*", "x":8, "y":1.15}, + {"label":"(", "x":9, "y":1.15}, + {"label":")", "x":10, "y":1.15}, + {"label":"_", "x":11, "y":1.15}, + {"label":"+", "x":12, "y":1.15}, + {"label":"BACK SPACE", "x":13, "y":1.15, "w":2}, + {"label":"NUMLK", "x":15.3, "y":1.15}, + {"label":"/", "x":16.3, "y":1.15}, + {"label":"*", "x":17.3, "y":1.15}, + {"label":"-", "x":18.3, "y":1.15}, + {"label":"TAB", "x":0, "y":2.15, "w":1.5}, + {"label":"Q", "x":1.5, "y":2.15}, + {"label":"W", "x":2.5, "y":2.15}, + {"label":"E", "x":3.5, "y":2.15}, + {"label":"R", "x":4.5, "y":2.15}, + {"label":"T", "x":5.5, "y":2.15}, + {"label":"Y", "x":6.5, "y":2.15}, + {"label":"U", "x":7.5, "y":2.15}, + {"label":"I", "x":8.5, "y":2.15}, + {"label":"O", "x":9.5, "y":2.15}, + {"label":"P", "x":10.5, "y":2.15}, + {"label":"[", "x":11.5, "y":2.15}, + {"label":"]", "x":12.5, "y":2.15}, + {"label":"|", "x":13.5, "y":2.15, "w":1.5}, + {"label":"7", "x":15.3, "y":2.15}, + {"label":"8", "x":16.3, "y":2.15}, + {"label":"9", "x":17.3, "y":2.15}, + {"label":"+", "x":18.3, "y":2.15, "h":2}, + {"label":"CAPS LOCK", "x":0, "y":3.15, "w":1.75}, + {"label":"A", "x":1.75, "y":3.15}, + {"label":"S", "x":2.75, "y":3.15}, + {"label":"D", "x":3.75, "y":3.15}, + {"label":"F", "x":4.75, "y":3.15}, + {"label":"G", "x":5.75, "y":3.15}, + {"label":"H", "x":6.75, "y":3.15}, + {"label":"J", "x":7.75, "y":3.15}, + {"label":"K", "x":8.75, "y":3.15}, + {"label":"L", "x":9.75, "y":3.15}, + {"label":":", "x":10.75, "y":3.15}, + {"label":"\"", "x":11.75, "y":3.15}, + {"label":"ENTER", "x":12.75, "y":3.15, "w":2.25}, + {"label":"4", "x":15.3, "y":3.15}, + {"label":"5", "x":16.3, "y":3.15}, + {"label":"6", "x":17.3, "y":3.15}, + {"label":"SHIFT", "x":0, "y":4.15, "w":2.25}, + {"label":"Z", "x":2.25, "y":4.15}, + {"label":"X", "x":3.25, "y":4.15}, + {"label":"C", "x":4.25, "y":4.15}, + {"label":"V", "x":5.25, "y":4.15}, + {"label":"B", "x":6.25, "y":4.15}, + {"label":"N", "x":7.25, "y":4.15}, + {"label":"M", "x":8.25, "y":4.15}, + {"label":"<", "x":9.25, "y":4.15}, + {"label":">", "x":10.25, "y":4.15}, + {"label":"?", "x":11.25, "y":4.15}, + {"label":"SHIFT", "x":12.25, "y":4.15, "w":1.75}, + {"label":"Up", "x":14.15, "y":4.3}, + {"label":"1", "x":15.3, "y":4.15}, + {"label":"2", "x":16.3, "y":4.15}, + {"label":"3", "x":17.3, "y":4.15}, + {"label":"ENTER", "x":18.3, "y":4.15, "h":2}, + {"label":"CTRL", "x":0, "y":5.15, "w":1.25}, + {"label":"WIN", "x":1.25, "y":5.15, "w":1.25}, + {"label":"ALT", "x":2.5, "y":5.15, "w":1.25}, + {"label":"Space", "x":3.75, "y":5.15, "w":6.25}, + {"label":"ALT", "x":10, "y":5.15}, + {"label":"FN", "x":11, "y":5.15}, + {"label":"CTRL", "x":12, "y":5.15}, + {"label":"Left", "x":13.15, "y":5.3}, + {"label":"Down", "x":14.15, "y":5.3}, + {"label":"Right", "x":15.15, "y":5.3}, + {"label":"0", "x":16.3, "y":5.15}, + {"label":".", "x":17.3, "y":5.15} + ] + } + } +} + diff --git a/keyboards/kabedon/kabedon980/kabedon980.c b/keyboards/kabedon/kabedon980/kabedon980.c new file mode 100644 index 000000000000..f0c8382d66a5 --- /dev/null +++ b/keyboards/kabedon/kabedon980/kabedon980.c @@ -0,0 +1,8 @@ +#include "kabedon980.h" + + bool led_update_kb(led_t led_state) { + if (led_update_user(led_state)) { + writePin(E6, !led_state.caps_lock); + } + return true; +} diff --git a/keyboards/kabedon/kabedon980/kabedon980.h b/keyboards/kabedon/kabedon980/kabedon980.h new file mode 100644 index 000000000000..0355955b666b --- /dev/null +++ b/keyboards/kabedon/kabedon980/kabedon980.h @@ -0,0 +1,25 @@ +#pragma once + +#include "quantum.h" + +#define LAYOUT( \ + KI06, KC04, KD04, KB10, KA05, KA11, KA02, KC01, KA04, KA07, KC02, KJ05, KE06, KH03, KJ01, KI01, KI00, \ + KJ07, KC05, KC06, KA03, KH07, KJ06, KI02, KB07, KG03, KI05, KG05, KG06, KA06, KD02, KA08, KF01, KH01, KG01, \ + KI03, KJ02, KD06, KD05, KB04, KC03, KE03, KF07, KB08, KG02, KB11, KB02, KF05, KE01, KG00, KA01, KF08, KF00, \ + KB03, KB00, KH02, KF03, KB01, KA09, KH04, KH05, KH06, KF04, KB06, KF06, KF02, KB12, KA00, KG08, \ + KJ12, KB09, KJ04, KA10, KE02, KJ03, KD07, KI04, KD03, KB05, KE04, KI12, KI07, KD01, KI08, KH08, KC00, \ + KF10, KD09, KH11, KA12, KG11, KC08, KE10, KE07, KG07, KC07, KD00, KH00 \ +) { \ + { KA00, KA01, KA02, KA03, KA04, KA05, KA06, KA07, KA08, KA09, KA10, KA11, KA12 }, \ + { KB00, KB01, KB02, KB03, KB04, KB05, KB06, KB07, KB08, KB09, KB10, KB11, KB12 }, \ + { KC00, KC01, KC02, KC03, KC04, KC05, KC06, KC07, KC08, KC_NO, KC_NO, KC_NO, KC_NO }, \ + { KD00, KD01, KD02, KD03, KD04, KD05, KD06, KD07, KC_NO, KD09, KC_NO, KC_NO, KC_NO }, \ + { KC_NO, KE01, KE02, KE03, KE04, KC_NO, KE06, KE07, KC_NO, KC_NO, KE10, KC_NO, KC_NO }, \ + { KF00, KF01, KF02, KF03, KF04, KF05, KF06, KF07, KF08, KC_NO, KF10, KC_NO, KC_NO }, \ + { KG00, KG01, KG02, KG03, KC_NO, KG05, KG06, KG07, KG08, KC_NO, KC_NO, KG11, KC_NO }, \ + { KH00, KH01, KH02, KH03, KH04, KH05, KH06, KH07, KH08, KC_NO, KC_NO, KH11, KC_NO }, \ + { KI00, KI01, KI02, KI03, KI04, KI05, KI06, KI07, KI08, KC_NO, KC_NO, KC_NO, KI12 }, \ + { KC_NO, KJ01, KJ02, KJ03, KJ04, KJ05, KJ06, KJ07, KC_NO, KC_NO, KC_NO, KC_NO, KJ12 } \ +} + + diff --git a/keyboards/kabedon/kabedon980/keymaps/default/keymap.c b/keyboards/kabedon/kabedon980/keymaps/default/keymap.c new file mode 100644 index 000000000000..a5b660daf6f5 --- /dev/null +++ b/keyboards/kabedon/kabedon980/keymaps/default/keymap.c @@ -0,0 +1,21 @@ +#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_DEL, KC_HOME, 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_BSPC, 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_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, MO(1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT, KC_P0, KC_PDOT ), + + [1] = LAYOUT( + RGB_MOD, RGB_TOG, RGB_SAI, RGB_SAD, RGB_HUI, RGB_HUD, RGB_SPI, RGB_SPD, 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, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + 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/kabedon/kabedon980/keymaps/via/keymap.c b/keyboards/kabedon/kabedon980/keymaps/via/keymap.c new file mode 100644 index 000000000000..44574452bfb6 --- /dev/null +++ b/keyboards/kabedon/kabedon980/keymaps/via/keymap.c @@ -0,0 +1,37 @@ +#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_DEL, KC_HOME, 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_BSPC, 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_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, MO(1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT, KC_P0, KC_PDOT ), + + [1] = LAYOUT( + RGB_MOD, RGB_TOG, RGB_SAI, RGB_SAD, RGB_HUI, RGB_HUD, RGB_SPI, RGB_SPD, 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, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + 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, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + 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, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS ) +}; + diff --git a/keyboards/kabedon/kabedon980/keymaps/via/rules.mk b/keyboards/kabedon/kabedon980/keymaps/via/rules.mk new file mode 100644 index 000000000000..16d33cd89fe4 --- /dev/null +++ b/keyboards/kabedon/kabedon980/keymaps/via/rules.mk @@ -0,0 +1,2 @@ +VIA_ENABLE = yes + diff --git a/keyboards/kabedon/kabedon980/rules.mk b/keyboards/kabedon/kabedon980/rules.mk new file mode 100644 index 000000000000..0a28dcbff851 --- /dev/null +++ b/keyboards/kabedon/kabedon980/rules.mk @@ -0,0 +1,23 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +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 +BLUETOOTH_ENABLE = no # Enable Bluetooth +AUDIO_ENABLE = no # Audio output +UNICODE_ENABLE = yes # Unicode From 245797f6b998fb4f52df61e38151c80b05615740 Mon Sep 17 00:00:00 2001 From: t-miyajima <55669223+dvorak55@users.noreply.github.com> Date: Sat, 8 Aug 2020 03:27:20 +0900 Subject: [PATCH 545/930] [keyboard] Add chavdai40 keyboard (#9820) * On branch add_chavdai40_keyboard Changes to be committed: new file: keyboards/chavdai40/boards/GENERIC_STM32_F042X6/board.c new file: keyboards/chavdai40/boards/GENERIC_STM32_F042X6/board.h new file: keyboards/chavdai40/boards/GENERIC_STM32_F042X6/board.mk new file: keyboards/chavdai40/bootloader_defs.h new file: keyboards/chavdai40/chavdai40.c new file: keyboards/chavdai40/chavdai40.h new file: keyboards/chavdai40/chconf.h new file: keyboards/chavdai40/config.h new file: keyboards/chavdai40/halconf.h new file: keyboards/chavdai40/info.json new file: keyboards/chavdai40/keymaps/42keys-dvorak/config.h new file: keyboards/chavdai40/keymaps/42keys-dvorak/keymap.c new file: keyboards/chavdai40/keymaps/42keys-eucalyn/config.h new file: keyboards/chavdai40/keymaps/42keys-eucalyn/keymap.c new file: keyboards/chavdai40/keymaps/42keys-qwerty/config.h new file: keyboards/chavdai40/keymaps/42keys-qwerty/keymap.c new file: keyboards/chavdai40/keymaps/44keys-dvorak/config.h new file: keyboards/chavdai40/keymaps/44keys-dvorak/keymap.c new file: keyboards/chavdai40/keymaps/44keys-eucalyn/config.h new file: keyboards/chavdai40/keymaps/44keys-eucalyn/keymap.c new file: keyboards/chavdai40/keymaps/44keys-qwerty/config.h new file: keyboards/chavdai40/keymaps/44keys-qwerty/keymap.c new file: keyboards/chavdai40/keymaps/default/config.h new file: keyboards/chavdai40/keymaps/default/keymap.c new file: keyboards/chavdai40/mcuconf.h new file: keyboards/chavdai40/readme.md new file: keyboards/chavdai40/rules.mk * commit suggestions of zvecr and fauxpark, thanks * commit suggestions of fauxpark, thanks * commit suggestions of fauxpark, thanks * commit suggestions of drashna, thanks --- .../boards/GENERIC_STM32_F042X6/board.c | 266 ++++++ .../boards/GENERIC_STM32_F042X6/board.h | 805 ++++++++++++++++++ .../boards/GENERIC_STM32_F042X6/board.mk | 9 + keyboards/chavdai40/bootloader_defs.h | 7 + keyboards/chavdai40/chavdai40.c | 16 + keyboards/chavdai40/chavdai40.h | 49 ++ keyboards/chavdai40/chconf.h | 714 ++++++++++++++++ keyboards/chavdai40/config.h | 74 ++ keyboards/chavdai40/halconf.h | 525 ++++++++++++ keyboards/chavdai40/info.json | 101 +++ .../chavdai40/keymaps/42keys-dvorak/config.h | 22 + .../chavdai40/keymaps/42keys-dvorak/keymap.c | 41 + .../chavdai40/keymaps/42keys-eucalyn/config.h | 22 + .../chavdai40/keymaps/42keys-eucalyn/keymap.c | 40 + .../chavdai40/keymaps/42keys-qwerty/config.h | 22 + .../chavdai40/keymaps/42keys-qwerty/keymap.c | 40 + .../chavdai40/keymaps/44keys-dvorak/config.h | 22 + .../chavdai40/keymaps/44keys-dvorak/keymap.c | 40 + .../chavdai40/keymaps/44keys-eucalyn/config.h | 22 + .../chavdai40/keymaps/44keys-eucalyn/keymap.c | 40 + .../chavdai40/keymaps/44keys-qwerty/config.h | 22 + .../chavdai40/keymaps/44keys-qwerty/keymap.c | 40 + keyboards/chavdai40/keymaps/default/config.h | 22 + keyboards/chavdai40/keymaps/default/keymap.c | 40 + keyboards/chavdai40/mcuconf.h | 190 +++++ keyboards/chavdai40/readme.md | 19 + keyboards/chavdai40/rules.mk | 18 + 27 files changed, 3228 insertions(+) create mode 100644 keyboards/chavdai40/boards/GENERIC_STM32_F042X6/board.c create mode 100644 keyboards/chavdai40/boards/GENERIC_STM32_F042X6/board.h create mode 100644 keyboards/chavdai40/boards/GENERIC_STM32_F042X6/board.mk create mode 100644 keyboards/chavdai40/bootloader_defs.h create mode 100644 keyboards/chavdai40/chavdai40.c create mode 100644 keyboards/chavdai40/chavdai40.h create mode 100644 keyboards/chavdai40/chconf.h create mode 100644 keyboards/chavdai40/config.h create mode 100644 keyboards/chavdai40/halconf.h create mode 100644 keyboards/chavdai40/info.json create mode 100644 keyboards/chavdai40/keymaps/42keys-dvorak/config.h create mode 100644 keyboards/chavdai40/keymaps/42keys-dvorak/keymap.c create mode 100644 keyboards/chavdai40/keymaps/42keys-eucalyn/config.h create mode 100644 keyboards/chavdai40/keymaps/42keys-eucalyn/keymap.c create mode 100644 keyboards/chavdai40/keymaps/42keys-qwerty/config.h create mode 100644 keyboards/chavdai40/keymaps/42keys-qwerty/keymap.c create mode 100644 keyboards/chavdai40/keymaps/44keys-dvorak/config.h create mode 100644 keyboards/chavdai40/keymaps/44keys-dvorak/keymap.c create mode 100644 keyboards/chavdai40/keymaps/44keys-eucalyn/config.h create mode 100644 keyboards/chavdai40/keymaps/44keys-eucalyn/keymap.c create mode 100644 keyboards/chavdai40/keymaps/44keys-qwerty/config.h create mode 100644 keyboards/chavdai40/keymaps/44keys-qwerty/keymap.c create mode 100644 keyboards/chavdai40/keymaps/default/config.h create mode 100644 keyboards/chavdai40/keymaps/default/keymap.c create mode 100644 keyboards/chavdai40/mcuconf.h create mode 100644 keyboards/chavdai40/readme.md create mode 100644 keyboards/chavdai40/rules.mk diff --git a/keyboards/chavdai40/boards/GENERIC_STM32_F042X6/board.c b/keyboards/chavdai40/boards/GENERIC_STM32_F042X6/board.c new file mode 100644 index 000000000000..2bd2c5e216d8 --- /dev/null +++ b/keyboards/chavdai40/boards/GENERIC_STM32_F042X6/board.c @@ -0,0 +1,266 @@ +/* + ChibiOS - Copyright (C) 2006..2020 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" +#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; + +/** + * @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 + {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_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. */ +/*===========================================================================*/ + +/** + * @brief Early initialization code. + * @details GPIO ports and system clocks are initialized before everything + * else. + */ +void __early_init(void) { + + 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; + /* CHTODO: Fill the implementation.*/ + return true; +} + +/** + * @brief SDC card write protection detection. + */ +bool sdc_lld_is_write_protected(SDCDriver *sdcp) { + + (void)sdcp; + /* CHTODO: Fill the implementation.*/ + return false; +} +#endif /* HAL_USE_SDC */ + +#if HAL_USE_MMC_SPI || defined(__DOXYGEN__) +/** + * @brief MMC_SPI card detection. + */ +bool mmc_lld_is_card_inserted(MMCDriver *mmcp) { + + (void)mmcp; + /* CHTODO: Fill the implementation.*/ + return true; +} + +/** + * @brief MMC_SPI card write protection detection. + */ +bool mmc_lld_is_write_protected(MMCDriver *mmcp) { + + (void)mmcp; + /* CHTODO: Fill the implementation.*/ + return false; +} +#endif + +/** + * @brief Board-specific initialization code. + * @note You can add your board-specific code here. + */ +void boardInit(void) { + +} diff --git a/keyboards/chavdai40/boards/GENERIC_STM32_F042X6/board.h b/keyboards/chavdai40/boards/GENERIC_STM32_F042X6/board.h new file mode 100644 index 000000000000..ea8a45029bc6 --- /dev/null +++ b/keyboards/chavdai40/boards/GENERIC_STM32_F042X6/board.h @@ -0,0 +1,805 @@ +/* + ChibiOS - Copyright (C) 2006..2020 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 + +/*===========================================================================*/ +/* Driver constants. */ +/*===========================================================================*/ + +/* + * Setup for ST STM32F0-Discovery board. + */ + +/* + * Board identifier. + */ +#define BOARD_GENERIC_STM32_F042X6 +#define BOARD_NAME "Chavdai40" + +/* + * 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 STM32F042x6 + +/* + * 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_PIN11 11U +#define GPIOA_PIN12 12U +#define GPIOA_SWDAT 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_PIN13 13U +#define GPIOB_PIN14 14U +#define GPIOB_PIN15 15U + +#define GPIOC_PIN0 0U +#define GPIOC_PIN1 1U +#define GPIOC_PIN2 2U +#define GPIOC_PIN3 3U +#define GPIOC_PIN4 4U +#define GPIOC_PIN5 5U +#define GPIOC_PIN6 6U +#define GPIOC_PIN7 7U +#define GPIOC_LED4 8U +#define GPIOC_LED3 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 GPIOF_OSC_IN 0U +// #define GPIOF_OSC_OUT 1U +#define GPIOF_I2C1_SDA 0U +#define GPIOF_I2C1_SCL 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_SWDAT PAL_LINE(GPIOA, 13U) +#define LINE_SWCLK PAL_LINE(GPIOA, 14U) +#define LINE_LED4 PAL_LINE(GPIOC, 8U) +#define LINE_LED3 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_I2C1_SDA PAL_LINE(GPIOF, 0U) +#define LINE_I2C1_SCL 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. + * 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 - PIN11 (input pullup). + * PA12 - PIN12 (input pullup). + * PA13 - SWDAT (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_PIN11) | \ + PIN_MODE_INPUT(GPIOA_PIN12) | \ + PIN_MODE_ALTERNATE(GPIOA_SWDAT) | \ + 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_PIN11) | \ + PIN_OTYPE_PUSHPULL(GPIOA_PIN12) | \ + PIN_OTYPE_PUSHPULL(GPIOA_SWDAT) | \ + 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_PIN11) | \ + PIN_OSPEED_VERYLOW(GPIOA_PIN12) | \ + PIN_OSPEED_HIGH(GPIOA_SWDAT) | \ + 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_PULLUP(GPIOA_PIN11) | \ + PIN_PUPDR_PULLUP(GPIOA_PIN12) | \ + PIN_PUPDR_PULLUP(GPIOA_SWDAT) | \ + 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_PIN11) | \ + PIN_ODR_HIGH(GPIOA_PIN12) | \ + PIN_ODR_HIGH(GPIOA_SWDAT) | \ + 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_PIN11, 0U) | \ + PIN_AFIO_AF(GPIOA_PIN12, 0U) | \ + PIN_AFIO_AF(GPIOA_SWDAT, 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 - PIN13 (input pullup). + * PB14 - PIN14 (input pullup). + * PB15 - PIN15 (input pullup). + */ +#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_INPUT(GPIOB_PIN13) | \ + PIN_MODE_INPUT(GPIOB_PIN14) | \ + PIN_MODE_INPUT(GPIOB_PIN15)) +#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_PIN13) | \ + PIN_OTYPE_PUSHPULL(GPIOB_PIN14) | \ + PIN_OTYPE_PUSHPULL(GPIOB_PIN15)) +#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_PIN13) | \ + PIN_OSPEED_VERYLOW(GPIOB_PIN14) | \ + PIN_OSPEED_VERYLOW(GPIOB_PIN15)) +#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_PULLUP(GPIOB_PIN13) | \ + PIN_PUPDR_PULLUP(GPIOB_PIN14) | \ + PIN_PUPDR_PULLUP(GPIOB_PIN15)) +#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_PIN13) | \ + PIN_ODR_HIGH(GPIOB_PIN14) | \ + PIN_ODR_HIGH(GPIOB_PIN15)) +#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_PIN13, 0U) | \ + PIN_AFIO_AF(GPIOB_PIN14, 0U) | \ + PIN_AFIO_AF(GPIOB_PIN15, 0U)) + +/* + * GPIOC setup: + * + * PC0 - PIN0 (input pullup). + * PC1 - PIN1 (input pullup). + * PC2 - PIN2 (input pullup). + * PC3 - PIN3 (input pullup). + * PC4 - PIN4 (input pullup). + * PC5 - PIN5 (input pullup). + * PC6 - PIN6 (input pullup). + * PC7 - PIN7 (input pullup). + * PC8 - LED4 (output pushpull maximum). + * PC9 - LED3 (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_INPUT(GPIOC_PIN0) | \ + 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_INPUT(GPIOC_PIN6) | \ + PIN_MODE_INPUT(GPIOC_PIN7) | \ + PIN_MODE_OUTPUT(GPIOC_LED4) | \ + PIN_MODE_OUTPUT(GPIOC_LED3) | \ + 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_PIN0) | \ + 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_PIN6) | \ + PIN_OTYPE_PUSHPULL(GPIOC_PIN7) | \ + PIN_OTYPE_PUSHPULL(GPIOC_LED4) | \ + PIN_OTYPE_PUSHPULL(GPIOC_LED3) | \ + 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_VERYLOW(GPIOC_PIN0) | \ + 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_VERYLOW(GPIOC_PIN6) | \ + PIN_OSPEED_VERYLOW(GPIOC_PIN7) | \ + PIN_OSPEED_HIGH(GPIOC_LED4) | \ + PIN_OSPEED_HIGH(GPIOC_LED3) | \ + 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_PULLUP(GPIOC_PIN0) | \ + 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_PULLUP(GPIOC_PIN6) | \ + PIN_PUPDR_PULLUP(GPIOC_PIN7) | \ + PIN_PUPDR_FLOATING(GPIOC_LED4) | \ + PIN_PUPDR_FLOATING(GPIOC_LED3) | \ + 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_PIN0) | \ + 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_HIGH(GPIOC_PIN6) | \ + PIN_ODR_HIGH(GPIOC_PIN7) | \ + PIN_ODR_LOW(GPIOC_LED4) | \ + PIN_ODR_LOW(GPIOC_LED3) | \ + 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_PIN0, 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_PIN6, 0U) | \ + PIN_AFIO_AF(GPIOC_PIN7, 0U)) +#define VAL_GPIOC_AFRH (PIN_AFIO_AF(GPIOC_LED4, 0U) | \ + PIN_AFIO_AF(GPIOC_LED3, 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)) + +/* + * GPIOF setup: + * + ******** PF0 - OSC_IN (input floating). + ******** PF1 - OSC_OUT (input floating). + * PF0 - I2C1_SDA (alternate 0). + * PF1 - I2C1_SCL (alternate 0). + * 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_ALTERNATE(GPIOF_I2C1_SDA) | \ + PIN_MODE_ALTERNATE(GPIOF_I2C1_SCL) | \ + 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_I2C1_SDA) | \ + PIN_OTYPE_PUSHPULL(GPIOF_I2C1_SCL) | \ + 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_HIGH(GPIOF_I2C1_SDA) | \ + PIN_OSPEED_HIGH(GPIOF_I2C1_SCL) | \ + 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_PULLUP(GPIOF_I2C1_SDA) | \ + PIN_PUPDR_PULLUP(GPIOF_I2C1_SCL) | \ + 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_I2C1_SDA) | \ + PIN_ODR_HIGH(GPIOF_I2C1_SCL) | \ + 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_I2C1_SDA, 0U) | \ + PIN_AFIO_AF(GPIOF_I2C1_SCL, 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" { +#endif + void boardInit(void); +#ifdef __cplusplus +} +#endif +#endif /* _FROM_ASM_ */ + +#endif /* BOARD_H */ diff --git a/keyboards/chavdai40/boards/GENERIC_STM32_F042X6/board.mk b/keyboards/chavdai40/boards/GENERIC_STM32_F042X6/board.mk new file mode 100644 index 000000000000..3fff4fbbf817 --- /dev/null +++ b/keyboards/chavdai40/boards/GENERIC_STM32_F042X6/board.mk @@ -0,0 +1,9 @@ +# List of all the board related files. +BOARDSRC = $(BOARD_PATH)/boards/GENERIC_STM32_F042X6/board.c + +# Required include directories +BOARDINC = $(BOARD_PATH)/boards/GENERIC_STM32_F042X6 + +# Shared variables +ALLCSRC += $(BOARDSRC) +ALLINC += $(BOARDINC) diff --git a/keyboards/chavdai40/bootloader_defs.h b/keyboards/chavdai40/bootloader_defs.h new file mode 100644 index 000000000000..4994be9c24c3 --- /dev/null +++ b/keyboards/chavdai40/bootloader_defs.h @@ -0,0 +1,7 @@ +/* Address for jumping to bootloader on STM32 chips. */ +/* It is chip dependent, the correct number can be looked up here: + * 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 + */ +#define STM32_BOOTLOADER_ADDRESS 0x1FFFC400 \ No newline at end of file diff --git a/keyboards/chavdai40/chavdai40.c b/keyboards/chavdai40/chavdai40.c new file mode 100644 index 000000000000..6101732e2b5a --- /dev/null +++ b/keyboards/chavdai40/chavdai40.c @@ -0,0 +1,16 @@ +/* Copyright 2020 t-miyajima + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#include "chavdai40.h" diff --git a/keyboards/chavdai40/chavdai40.h b/keyboards/chavdai40/chavdai40.h new file mode 100644 index 000000000000..a10f695c7863 --- /dev/null +++ b/keyboards/chavdai40/chavdai40.h @@ -0,0 +1,49 @@ +/* Copyright 2020 t-miyajima + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License 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 a shortcut to help you visually see your layout. + +#define LAYOUT_44key( \ + 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 \ +) { \ + { 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, XXX }, \ + { k26, k27, k28, k29, k30, k31, k32, k33, k34, k35, k36, k37, XXX }, \ + { k38, k39, XXX, k40, XXX, k41, XXX, XXX, k42, k43, k44, XXX, XXX } \ +} + +#define LAYOUT_42key( \ + 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, k41, k43, k44 \ +) { \ + { 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, XXX }, \ + { k26, k27, k28, k29, k30, k31, k32, k33, k34, k35, k36, k37, XXX }, \ + { k38, k39, XXX, XXX, XXX, k41, XXX, XXX, XXX, k43, k44, XXX, XXX } \ +} + diff --git a/keyboards/chavdai40/chconf.h b/keyboards/chavdai40/chconf.h new file mode 100644 index 000000000000..6d169b36e9d3 --- /dev/null +++ b/keyboards/chavdai40/chconf.h @@ -0,0 +1,714 @@ +/* + 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. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +/** + * @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. + * + * @addtogroup config + * @details Kernel related settings and hooks. + * @{ + */ + +#ifndef CHCONF_H +#define CHCONF_H + +#define _CHIBIOS_RT_CONF_ +#define _CHIBIOS_RT_CONF_VER_6_0_ + +/*===========================================================================*/ +/** + * @name System timers settings + * @{ + */ +/*===========================================================================*/ + +/** + * @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. + * @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. + */ +#if !defined(CH_CFG_ST_TIMEDELTA) +#define CH_CFG_ST_TIMEDELTA 2 +#endif + +/** @} */ + +/*===========================================================================*/ +/** + * @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. + */ +#if !defined(CH_CFG_TIME_QUANTUM) +#define CH_CFG_TIME_QUANTUM 0 +#endif + +/** + * @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. + */ +#if !defined(CH_CFG_MEMCORE_SIZE) +#define CH_CFG_MEMCORE_SIZE 0 +#endif + +/** + * @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. + */ +#if !defined(CH_CFG_NO_IDLE_THREAD) +#define CH_CFG_NO_IDLE_THREAD FALSE +#endif + +/** @} */ + +/*===========================================================================*/ +/** + * @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. + */ +#if !defined(CH_CFG_OPTIMIZE_SPEED) +#define CH_CFG_OPTIMIZE_SPEED TRUE +#endif + +/** @} */ + +/*===========================================================================*/ +/** + * @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. + */ +#if !defined(CH_CFG_USE_TM) +#define CH_CFG_USE_TM FALSE +#endif + +/** + * @brief Threads registry APIs. + * @details If enabled then the registry APIs are included in the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_REGISTRY) +#define CH_CFG_USE_REGISTRY TRUE +#endif + +/** + * @brief Threads synchronization APIs. + * @details If enabled then the @p chThdWait() function is included in + * the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_WAITEXIT) +#define CH_CFG_USE_WAITEXIT TRUE +#endif + +/** + * @brief Semaphores APIs. + * @details If enabled then the Semaphores APIs are included in the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_SEMAPHORES) +#define CH_CFG_USE_SEMAPHORES TRUE +#endif + +/** + * @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. + */ +#if !defined(CH_CFG_USE_SEMAPHORES_PRIORITY) +#define CH_CFG_USE_SEMAPHORES_PRIORITY FALSE +#endif + +/** + * @brief Mutexes APIs. + * @details If enabled then the mutexes APIs are included in the kernel. + * + * @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. + * @note Recursive mutexes are heavier and have an increased + * memory footprint. + * + * @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. + * @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. + */ +#if !defined(CH_CFG_USE_CONDVARS) +#define CH_CFG_USE_CONDVARS TRUE +#endif + +/** + * @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. + */ +#if !defined(CH_CFG_USE_CONDVARS_TIMEOUT) +#define CH_CFG_USE_CONDVARS_TIMEOUT TRUE +#endif + +/** + * @brief Events Flags APIs. + * @details If enabled then the event flags APIs are included in the kernel. + * + * @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. + * @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. + */ +#if !defined(CH_CFG_USE_EVENTS_TIMEOUT) +#define CH_CFG_USE_EVENTS_TIMEOUT TRUE +#endif + +/** + * @brief Synchronous Messages APIs. + * @details If enabled then the synchronous messages APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_MESSAGES) +#define CH_CFG_USE_MESSAGES TRUE +#endif + +/** + * @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. + */ +#if !defined(CH_CFG_USE_MESSAGES_PRIORITY) +#define CH_CFG_USE_MESSAGES_PRIORITY FALSE +#endif + +/** + * @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. + */ +#if !defined(CH_CFG_USE_MAILBOXES) +#define CH_CFG_USE_MAILBOXES TRUE +#endif + +/** + * @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. + */ +#if !defined(CH_CFG_USE_MEMCORE) +#define CH_CFG_USE_MEMCORE TRUE +#endif + +/** + * @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. + */ +#if !defined(CH_CFG_USE_HEAP) +#define CH_CFG_USE_HEAP TRUE +#endif + +/** + * @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. + */ +#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. + * @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. + */ +#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 + +/** @} */ + +/*===========================================================================*/ +/** + * @name Debug options + * @{ + */ +/*===========================================================================*/ + +/** + * @brief Debug option, kernel statistics. + * + * @note The default is @p FALSE. + */ +#if !defined(CH_DBG_STATISTICS) +#define CH_DBG_STATISTICS FALSE +#endif + +/** + * @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. + */ +#if !defined(CH_DBG_SYSTEM_STATE_CHECK) +#define CH_DBG_SYSTEM_STATE_CHECK FALSE +#endif + +/** + * @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. + */ +#if !defined(CH_DBG_ENABLE_CHECKS) +#define CH_DBG_ENABLE_CHECKS FALSE +#endif + +/** + * @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. + */ +#if !defined(CH_DBG_ENABLE_ASSERTS) +#define CH_DBG_ENABLE_ASSERTS FALSE +#endif + +/** + * @brief Debug option, trace buffer. + * @details If enabled then the trace buffer is activated. + * + * @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. + * @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. + */ +#if !defined(CH_DBG_ENABLE_STACK_CHECK) +#define CH_DBG_ENABLE_STACK_CHECK FALSE +#endif + +/** + * @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. + */ +#if !defined(CH_DBG_FILL_THREADS) +#define CH_DBG_FILL_THREADS FALSE +#endif + +/** + * @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. + */ +#if !defined(CH_DBG_THREADS_PROFILING) +#define CH_DBG_THREADS_PROFILING FALSE +#endif + +/** @} */ + +/*===========================================================================*/ +/** + * @name Kernel hooks + * @{ + */ +/*===========================================================================*/ + +/** + * @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. + */ +#define CH_CFG_THREAD_EXTRA_FIELDS \ + /* Add threads custom fields here.*/ + +/** + * @brief Threads initialization hook. + * @details User initialization code added to the @p _thread_init() function. + * + * @note It is invoked from within @p _thread_init() 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/chavdai40/config.h b/keyboards/chavdai40/config.h new file mode 100644 index 000000000000..a3dcf84e9a6c --- /dev/null +++ b/keyboards/chavdai40/config.h @@ -0,0 +1,74 @@ +/* Copyright 2020 t-miyajima + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License 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 0x16D0 +#define PRODUCT_ID 0x0F95 +#define DEVICE_VER 0x0001 +#define MANUFACTURER t-miyajima +#define PRODUCT Chavdai40 + +/* usb power settings */ +#define USB_MAX_POWER_CONSUMPTION 100 + +/* key matrix size */ +#define MATRIX_ROWS 4 +#define MATRIX_COLS 13 + + +#define MATRIX_ROW_PINS { A0, A15, B5, B6 } +#define MATRIX_COL_PINS { B8, B4, B3, B2, B1, B0, A7, A6, A5, A4, A3, A2, A1 } +#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 + +/* 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 diff --git a/keyboards/chavdai40/halconf.h b/keyboards/chavdai40/halconf.h new file mode 100644 index 000000000000..383f3a8bb4f0 --- /dev/null +++ b/keyboards/chavdai40/halconf.h @@ -0,0 +1,525 @@ +/* + 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. + 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 + +#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 +#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 cryptographic subsystem. + */ +#if !defined(HAL_USE_CRY) || defined(__DOXYGEN__) +#define HAL_USE_CRY FALSE +#endif + +/** + * @brief Enables the DAC subsystem. + */ +#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 +#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 TRUE +#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 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 +#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 +#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 + +/** + * @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. */ +/*===========================================================================*/ + +/** + * @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 + +/** + * @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. */ +/*===========================================================================*/ + +/** + * @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 the zero-copy API. + */ +#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 + +/** + * @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. */ +/*===========================================================================*/ + +/** + * @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 16 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 256 bytes for both the transmission and receive + * buffers. + */ +#if !defined(SERIAL_USB_BUFFERS_SIZE) || defined(__DOXYGEN__) +#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 + +/*===========================================================================*/ +/* 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 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 +#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. */ +/*===========================================================================*/ + +/** + * @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 + +/*===========================================================================*/ +/* 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/chavdai40/info.json b/keyboards/chavdai40/info.json new file mode 100644 index 000000000000..53007b923d13 --- /dev/null +++ b/keyboards/chavdai40/info.json @@ -0,0 +1,101 @@ +{ + "keyboard_name": "chavdai40", + "url": "https://github.com/dvorak55/chavdai40", + "maintainer": "t-miyajima", + "width": 14, + "height": 4, + "layouts": { + "LAYOUT_44key": { + "layout": [ + {"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}, + {"label":"Backspace", "x":12.5, "y":0, "w":1.5}, + {"label":"Ctrl", "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":2.25}, + {"label":"Shift", "x":0, "y":2, "w":2.25}, + {"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":"?", "x":11.25, "y":2, "w":1.25}, + {"x":12.5, "y":2, "w":1.25}, + {"label":"Alt", "x":1.38, "y":3, "w":1.25}, + {"label":"Win", "x":2.63, "y":3, "w":1.25}, + {"x":3.88, "y":3, "w":2.25}, + {"x":6.13, "y":3, "w":2.75}, + {"label":"Win", "x":8.88, "y":3, "w":1.25}, + {"label":"Alt", "x":10.13, "y":3, "w":1.25}, + {"label":"Esc", "x":11.38, "y":3, "w":1.25}] + }, + "LAYOUT_42key": { + "layout": [ + {"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}, + {"label":"Backspace", "x":12.5, "y":0, "w":1.5}, + {"label":"Ctrl", "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":2.25}, + {"label":"Shift", "x":0, "y":2, "w":2.25}, + {"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":"?", "x":11.25, "y":2, "w":1.25}, + {"x":12.5, "y":2, "w":1.25}, + {"label":"Alt", "x":1.38, "y":3, "w":1.25}, + {"label":"Win", "x":2.63, "y":3, "w":1.25}, + {"x":3.88, "y":3, "w":6.25}, + {"label":"Win", "x":10.13, "y":3, "w":1.25}, + {"label":"Alt", "x":11.38, "y":3, "w":1.25}] + } + } +} \ No newline at end of file diff --git a/keyboards/chavdai40/keymaps/42keys-dvorak/config.h b/keyboards/chavdai40/keymaps/42keys-dvorak/config.h new file mode 100644 index 000000000000..bbcd7cdf980c --- /dev/null +++ b/keyboards/chavdai40/keymaps/42keys-dvorak/config.h @@ -0,0 +1,22 @@ +/* Copyright 2020 t-miyajima + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License 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 PERMISSIVE_HOLD +#define RETRO_TAPPING +#define TAPPING_TERM 5 diff --git a/keyboards/chavdai40/keymaps/42keys-dvorak/keymap.c b/keyboards/chavdai40/keymaps/42keys-dvorak/keymap.c new file mode 100644 index 000000000000..3ea66f5f3f99 --- /dev/null +++ b/keyboards/chavdai40/keymaps/42keys-dvorak/keymap.c @@ -0,0 +1,41 @@ + /* Copyright 2020 t-miyajima + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public 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 _BL: (Base Layer) Default Layer + * ,-------------------------------------------------------. + * | Tab | /| ,| .| P| Y| F| G| C| R| L| -| Bspc| + * |-------------------------------------------------------| + * | Ctrl | A| O| E| U| I| D| H| T| N| S| Return| + * |-------------------------------------------------------| + * | Shift | ;| Q| J| K| X| B| M| W| V| Z| Lyr| + * `----.---------------------------------------------.---' + * | Alt |Win | Space |Win |Alt | + * `---------------------------------------------' + */ + LAYOUT_42key( /* Base */ + KC_TAB, KC_SLASH, KC_COMMA, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_MINUS, KC_BSPACE, + KC_LCTRL, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_ENTER, + KC_LSFT, KC_SCOLON, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, MO(1), + KC_LALT, KC_LGUI, KC_SPACE, KC_RGUI, KC_RALT), + LAYOUT_42key( /* layer 1 */ + KC_GRAVE, KC_EXCLAIM, KC_AT, KC_HASH, KC_QUOTE, KC_PERCENT, KC_CIRCUMFLEX, KC_AMPERSAND, KC_ASTERISK, KC_LEFT_PAREN, KC_RIGHT_PAREN, KC_LBRACKET, KC_RBRACKET, + KC_TRNS, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_TRNS, + KC_TRNS, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_EQUAL, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), +}; + diff --git a/keyboards/chavdai40/keymaps/42keys-eucalyn/config.h b/keyboards/chavdai40/keymaps/42keys-eucalyn/config.h new file mode 100644 index 000000000000..bbcd7cdf980c --- /dev/null +++ b/keyboards/chavdai40/keymaps/42keys-eucalyn/config.h @@ -0,0 +1,22 @@ +/* Copyright 2020 t-miyajima + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License 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 PERMISSIVE_HOLD +#define RETRO_TAPPING +#define TAPPING_TERM 5 diff --git a/keyboards/chavdai40/keymaps/42keys-eucalyn/keymap.c b/keyboards/chavdai40/keymaps/42keys-eucalyn/keymap.c new file mode 100644 index 000000000000..a464a586e75e --- /dev/null +++ b/keyboards/chavdai40/keymaps/42keys-eucalyn/keymap.c @@ -0,0 +1,40 @@ + /* Copyright 2020 t-miyajima + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public 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 _BL: (Base Layer) Default Layer + * ,-------------------------------------------------------. + * | Tab | ;| ,| .| P| Q| Y| G| D| M| F| -| Bspc| + * |-------------------------------------------------------| + * | Ctrl | A| O| E| I| U| B| N| T| R| S| Return| + * |-------------------------------------------------------| + * | Shift | Z| X| C| V| W| H| J| K| L| /| Lyr| + * `----.---------------------------------------------.---' + * | Alt |Win | Space |Win |Alt | + * `---------------------------------------------' + */ + LAYOUT_42key( /* Base */ + KC_TAB, KC_SCOLON, KC_COMMA, KC_DOT, KC_P, KC_Q, KC_Y, KC_G, KC_D, KC_M, KC_F, KC_MINUS, KC_BSPACE, + KC_LCTRL, KC_A, KC_O, KC_E, KC_I, KC_U, KC_B, KC_N, KC_T, KC_R, KC_S, KC_ENTER, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_W, KC_H, KC_J, KC_K, KC_L, KC_SLASH, MO(1), + KC_LALT, KC_LGUI, KC_SPACE, KC_RGUI, KC_RALT), + LAYOUT_42key( /* layer 1 */ + KC_GRAVE, KC_EXCLAIM, KC_AT, KC_HASH, KC_QUOTE, KC_PERCENT, KC_CIRCUMFLEX, KC_AMPERSAND, KC_ASTERISK, KC_LEFT_PAREN, KC_RIGHT_PAREN, KC_LBRACKET, KC_RBRACKET, + KC_TRNS, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_TRNS, + KC_TRNS, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_EQUAL, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), +}; diff --git a/keyboards/chavdai40/keymaps/42keys-qwerty/config.h b/keyboards/chavdai40/keymaps/42keys-qwerty/config.h new file mode 100644 index 000000000000..bbcd7cdf980c --- /dev/null +++ b/keyboards/chavdai40/keymaps/42keys-qwerty/config.h @@ -0,0 +1,22 @@ +/* Copyright 2020 t-miyajima + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License 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 PERMISSIVE_HOLD +#define RETRO_TAPPING +#define TAPPING_TERM 5 diff --git a/keyboards/chavdai40/keymaps/42keys-qwerty/keymap.c b/keyboards/chavdai40/keymaps/42keys-qwerty/keymap.c new file mode 100644 index 000000000000..fb5a7bd69e68 --- /dev/null +++ b/keyboards/chavdai40/keymaps/42keys-qwerty/keymap.c @@ -0,0 +1,40 @@ + /* Copyright 2020 t-miyajima + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public 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 _BL: (Base Layer) Default Layer + * ,-------------------------------------------------------. + * | Tab | Q| W| E| R| T| Y| U| I| O| P| -| Bspc| + * |-------------------------------------------------------| + * | Ctrl | A| S| D| F| G| H| J| K| L| ;| Return| + * |-------------------------------------------------------| + * | Shift | Z| X| C| V| B| N| M| ,| .| /| Lyr| + * `----.---------------------------------------------.---' + * | Alt |Win | Space |Win |Alt | + * `---------------------------------------------' + */ + LAYOUT_42key( /* Base */ + 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_BSPACE, + KC_LCTRL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCOLON, KC_ENTER, + KC_LSHIFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMMA, KC_DOT, KC_SLASH, MO(1), + KC_LALT, KC_LGUI, KC_SPACE, KC_RGUI, KC_RALT), + LAYOUT_42key( /* layer 1 */ + KC_GRAVE, KC_EXCLAIM, KC_AT, KC_HASH, KC_QUOTE, KC_PERCENT, KC_CIRCUMFLEX, KC_AMPERSAND, KC_ASTERISK, KC_LEFT_PAREN, KC_RIGHT_PAREN, KC_LBRACKET, KC_RBRACKET, + KC_TRNS, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_TRNS, + KC_TRNS, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_EQUAL, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), +}; diff --git a/keyboards/chavdai40/keymaps/44keys-dvorak/config.h b/keyboards/chavdai40/keymaps/44keys-dvorak/config.h new file mode 100644 index 000000000000..bbcd7cdf980c --- /dev/null +++ b/keyboards/chavdai40/keymaps/44keys-dvorak/config.h @@ -0,0 +1,22 @@ +/* Copyright 2020 t-miyajima + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License 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 PERMISSIVE_HOLD +#define RETRO_TAPPING +#define TAPPING_TERM 5 diff --git a/keyboards/chavdai40/keymaps/44keys-dvorak/keymap.c b/keyboards/chavdai40/keymaps/44keys-dvorak/keymap.c new file mode 100644 index 000000000000..09dd15e71bd9 --- /dev/null +++ b/keyboards/chavdai40/keymaps/44keys-dvorak/keymap.c @@ -0,0 +1,40 @@ + /* Copyright 2020 t-miyajima + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public 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 _BL: (Base Layer) Default Layer + * ,-------------------------------------------------------. + * | Tab | /| ,| .| P| Y| F| G| C| R| L| -| Bspc| + * |-------------------------------------------------------| + * | Ctrl | A| O| E| U| I| D| H| T| N| S| Return| + * |-------------------------------------------------------| + * | Shift | ;| Q| J| K| X| B| M| W| V| Z| Del| + * `----.---------------------------------------------.---' + * | Alt |Win | Layer | Space |Win |Alt |Esc | + * `---------------------------------------------' + */ + LAYOUT_44key( /* Base */ + KC_TAB, KC_SLASH, KC_COMMA, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_MINUS, KC_BSPACE, + KC_LCTRL, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_ENTER, + KC_LSFT, KC_SCOLON, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_DELETE, + KC_LALT, KC_LGUI, MO(1), KC_SPACE, KC_RGUI, KC_RALT, KC_ESCAPE), + LAYOUT_44key( /* layer 1 */ + KC_GRAVE, KC_EXCLAIM, KC_AT, KC_HASH, KC_QUOTE, KC_PERCENT, KC_CIRCUMFLEX, KC_AMPERSAND, KC_ASTERISK, KC_LEFT_PAREN, KC_RIGHT_PAREN, KC_LBRACKET, KC_RBRACKET, + KC_TRNS, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_TRNS, + KC_TRNS, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_EQUAL, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), +}; diff --git a/keyboards/chavdai40/keymaps/44keys-eucalyn/config.h b/keyboards/chavdai40/keymaps/44keys-eucalyn/config.h new file mode 100644 index 000000000000..bbcd7cdf980c --- /dev/null +++ b/keyboards/chavdai40/keymaps/44keys-eucalyn/config.h @@ -0,0 +1,22 @@ +/* Copyright 2020 t-miyajima + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License 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 PERMISSIVE_HOLD +#define RETRO_TAPPING +#define TAPPING_TERM 5 diff --git a/keyboards/chavdai40/keymaps/44keys-eucalyn/keymap.c b/keyboards/chavdai40/keymaps/44keys-eucalyn/keymap.c new file mode 100644 index 000000000000..a8a48899eb28 --- /dev/null +++ b/keyboards/chavdai40/keymaps/44keys-eucalyn/keymap.c @@ -0,0 +1,40 @@ + /* Copyright 2020 t-miyajima + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public 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 _BL: (Base Layer) Default Layer + * ,-------------------------------------------------------. + * | Tab | ;| ,| .| P| Q| Y| G| D| M| F| -| Bspc| + * |-------------------------------------------------------| + * | Ctrl | A| O| E| I| U| B| N| T| R| S| Return| + * |-------------------------------------------------------| + * | Shift | Z| X| C| V| W| H| J| K| L| /| Del| + * `----.---------------------------------------------.---' + * | Alt |Win | Layer | Space |Win |Alt |Esc | + * `---------------------------------------------' + */ + LAYOUT_44key( /* Base */ + KC_TAB, KC_SCOLON, KC_COMMA, KC_DOT, KC_P, KC_Q, KC_Y, KC_G, KC_D, KC_M, KC_F, KC_MINUS, KC_BSPACE, + KC_LCTRL, KC_A, KC_O, KC_E, KC_I, KC_U, KC_B, KC_N, KC_T, KC_R, KC_S, KC_ENTER, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_W, KC_H, KC_J, KC_K, KC_L, KC_SLASH, KC_DELETE, + KC_LALT, KC_LGUI, MO(1), KC_SPACE, KC_RGUI, KC_RALT, KC_ESCAPE), + LAYOUT_44key( /* layer 1 */ + KC_GRAVE, KC_EXCLAIM, KC_AT, KC_HASH, KC_QUOTE, KC_PERCENT, KC_CIRCUMFLEX, KC_AMPERSAND, KC_ASTERISK, KC_LEFT_PAREN, KC_RIGHT_PAREN, KC_LBRACKET, KC_RBRACKET, + KC_TRNS, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_TRNS, + KC_TRNS, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_EQUAL, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), +}; diff --git a/keyboards/chavdai40/keymaps/44keys-qwerty/config.h b/keyboards/chavdai40/keymaps/44keys-qwerty/config.h new file mode 100644 index 000000000000..bbcd7cdf980c --- /dev/null +++ b/keyboards/chavdai40/keymaps/44keys-qwerty/config.h @@ -0,0 +1,22 @@ +/* Copyright 2020 t-miyajima + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License 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 PERMISSIVE_HOLD +#define RETRO_TAPPING +#define TAPPING_TERM 5 diff --git a/keyboards/chavdai40/keymaps/44keys-qwerty/keymap.c b/keyboards/chavdai40/keymaps/44keys-qwerty/keymap.c new file mode 100644 index 000000000000..b709b34fbd34 --- /dev/null +++ b/keyboards/chavdai40/keymaps/44keys-qwerty/keymap.c @@ -0,0 +1,40 @@ + /* Copyright 2020 t-miyajima + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public 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 _BL: (Base Layer) Default Layer + * ,-------------------------------------------------------. + * | Tab | Q| W| E| R| T| Y| U| I| O| P| -| Bspc| + * |-------------------------------------------------------| + * | Ctrl | A| S| D| F| G| H| J| K| L| ;| Return| + * |-------------------------------------------------------| + * | Shift | Z| X| C| V| B| N| M| ,| .| /| Del| + * `----.---------------------------------------------.---' + * | Alt |Win | Layer | Space |Win |Alt |Esc | + * `---------------------------------------------' + */ + LAYOUT_44key( /* Base */ + 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_BSPACE, + KC_LCTRL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCOLON, KC_ENTER, + KC_LSHIFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMMA, KC_DOT, KC_SLASH, KC_DELETE, + KC_LALT, KC_LGUI, MO(1), KC_SPACE, KC_RGUI, KC_RALT, KC_ESCAPE), + LAYOUT_44key( /* layer 1 */ + KC_GRAVE, KC_EXCLAIM, KC_AT, KC_HASH, KC_QUOTE, KC_PERCENT, KC_CIRCUMFLEX, KC_AMPERSAND, KC_ASTERISK, KC_LEFT_PAREN, KC_RIGHT_PAREN, KC_LBRACKET, KC_RBRACKET, + KC_TRNS, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_TRNS, + KC_TRNS, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_EQUAL, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), +}; diff --git a/keyboards/chavdai40/keymaps/default/config.h b/keyboards/chavdai40/keymaps/default/config.h new file mode 100644 index 000000000000..bbcd7cdf980c --- /dev/null +++ b/keyboards/chavdai40/keymaps/default/config.h @@ -0,0 +1,22 @@ +/* Copyright 2020 t-miyajima + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License 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 PERMISSIVE_HOLD +#define RETRO_TAPPING +#define TAPPING_TERM 5 diff --git a/keyboards/chavdai40/keymaps/default/keymap.c b/keyboards/chavdai40/keymaps/default/keymap.c new file mode 100644 index 000000000000..b709b34fbd34 --- /dev/null +++ b/keyboards/chavdai40/keymaps/default/keymap.c @@ -0,0 +1,40 @@ + /* Copyright 2020 t-miyajima + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public 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 _BL: (Base Layer) Default Layer + * ,-------------------------------------------------------. + * | Tab | Q| W| E| R| T| Y| U| I| O| P| -| Bspc| + * |-------------------------------------------------------| + * | Ctrl | A| S| D| F| G| H| J| K| L| ;| Return| + * |-------------------------------------------------------| + * | Shift | Z| X| C| V| B| N| M| ,| .| /| Del| + * `----.---------------------------------------------.---' + * | Alt |Win | Layer | Space |Win |Alt |Esc | + * `---------------------------------------------' + */ + LAYOUT_44key( /* Base */ + 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_BSPACE, + KC_LCTRL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCOLON, KC_ENTER, + KC_LSHIFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMMA, KC_DOT, KC_SLASH, KC_DELETE, + KC_LALT, KC_LGUI, MO(1), KC_SPACE, KC_RGUI, KC_RALT, KC_ESCAPE), + LAYOUT_44key( /* layer 1 */ + KC_GRAVE, KC_EXCLAIM, KC_AT, KC_HASH, KC_QUOTE, KC_PERCENT, KC_CIRCUMFLEX, KC_AMPERSAND, KC_ASTERISK, KC_LEFT_PAREN, KC_RIGHT_PAREN, KC_LBRACKET, KC_RBRACKET, + KC_TRNS, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_TRNS, + KC_TRNS, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_EQUAL, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), +}; diff --git a/keyboards/chavdai40/mcuconf.h b/keyboards/chavdai40/mcuconf.h new file mode 100644 index 000000000000..0cc575d40fd9 --- /dev/null +++ b/keyboards/chavdai40/mcuconf.h @@ -0,0 +1,190 @@ +/* + 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. + 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_MCOSEL STM32_MCOSEL_NOCLOCK +#define STM32_MCOPRE STM32_MCOPRE_DIV1 +#define STM32_PLLNODIV STM32_PLLNODIV_DIV2 +#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 + +/* + * IRQ system settings. + */ +#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 + +/* + * ADC driver system settings. + */ +#define STM32_ADC_USE_ADC1 FALSE +#define STM32_ADC_ADC1_CKMODE STM32_ADC_CKMODE_ADCCLK +#define STM32_ADC_ADC1_DMA_PRIORITY 2 +#define STM32_ADC_ADC1_DMA_IRQ_PRIORITY 2 +#define STM32_ADC_ADC1_DMA_STREAM STM32_DMA_STREAM_ID(1, 1) + +/* + * 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_BUSY_TIMEOUT 50 +#define STM32_I2C_I2C1_IRQ_PRIORITY 3 +#define STM32_I2C_USE_DMA TRUE +#define STM32_I2C_I2C1_DMA_PRIORITY 1 +#define STM32_I2C_I2C1_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 3) +#define STM32_I2C_I2C1_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 2) +#define STM32_I2C_DMA_ERROR_HOOK(i2cp) osalSysHalt("DMA failure") + +/* + * I2S driver system settings. + */ +#define STM32_I2S_USE_SPI1 FALSE +#define STM32_I2S_SPI1_MODE (STM32_I2S_MODE_MASTER | \ + STM32_I2S_MODE_RX) +#define STM32_I2S_SPI1_IRQ_PRIORITY 2 +#define STM32_I2S_SPI1_DMA_PRIORITY 1 +#define STM32_I2S_SPI1_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 2) +#define STM32_I2S_SPI1_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 3) +#define STM32_I2S_DMA_ERROR_HOOK(i2sp) 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 TRUE +#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_SPI1_DMA_PRIORITY 1 +#define STM32_SPI_SPI1_IRQ_PRIORITY 2 +#define STM32_SPI_SPI1_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 2) +#define STM32_SPI_SPI1_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 3) +#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_USART1_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 3) +#define STM32_UART_USART1_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 2) +#define STM32_UART_USART2_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 5) +#define STM32_UART_USART2_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 4) +#define STM32_UART_DMA_ERROR_HOOK(uartp) osalSysHalt("DMA failure") + +/* + * WDG driver system settings. + */ +#define STM32_WDG_USE_IWDG FALSE + +/* + * 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/chavdai40/readme.md b/keyboards/chavdai40/readme.md new file mode 100644 index 000000000000..57af68d0abec --- /dev/null +++ b/keyboards/chavdai40/readme.md @@ -0,0 +1,19 @@ +# chavdai40 + +![chavdai40](https://github.com/dvorak55/chavdai40/blob/master/image-ver1/impl-1.jpg) + +Chavdai40 is very simple decoratable 40% keyboard + +* Keyboard Maintainer: [t-miyajima](https://github.com/dvorak55) +* Hardware Supported: Chavdai40 PCB rev1 +* Hardware Availability: not yet available. + +Make example for this keyboard (after setting up your build environment): + + make chavdai40:default + +Flashing example for this keyboard: + + make chavdai40: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). diff --git a/keyboards/chavdai40/rules.mk b/keyboards/chavdai40/rules.mk new file mode 100644 index 000000000000..64c6f662af8e --- /dev/null +++ b/keyboards/chavdai40/rules.mk @@ -0,0 +1,18 @@ +# MCU name +MCU = STM32F042 + +# 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 +BLUETOOTH_ENABLE = no # Enable Bluetooth +AUDIO_ENABLE = no # Audio output \ No newline at end of file From 78fef0a46aa29e3fd97ba1723f652c5cd79ad2b3 Mon Sep 17 00:00:00 2001 From: David Camp Date: Fri, 7 Aug 2020 13:31:22 -0700 Subject: [PATCH 546/930] [Keyboard] Add "Selene" to the handwired section (#9920) * Added handwired/selene based on handwired/106_with_trackpoint * now at least parially working * Selene Firmware 1, ready * Updated Readme to align more with Template * Added URL to info.json * Fix status Lights being wired incorrectly * Update keyboards/handwired/selene/config.h * Update keyboards/handwired/selene/keymaps/Bpendragon/keymap.c * Update keyboards/handwired/selene/selene.c * Update keyboards/handwired/selene/selene.h * Changes for PR requested by fauxpark * Adds `default` keymap * Renames `Bpendragon` to `bpendragon` * Removes uneeded descriptors and options * Simplifies return statement in `keymap.c` * Removes trailing slashes from layout in `keymap.c` * Updates `readme.mk` to reflect default keymap * Aligns comments in `rules.mk` * Forced folder name update to lowercase * Apply suggestions from code review --- keyboards/handwired/selene/config.h | 43 +++++++ keyboards/handwired/selene/info.json | 121 ++++++++++++++++++ .../selene/keymaps/bpendragon/keymap.c | 43 +++++++ .../handwired/selene/keymaps/default/keymap.c | 43 +++++++ keyboards/handwired/selene/readme.md | 17 +++ keyboards/handwired/selene/rules.mk | 20 +++ keyboards/handwired/selene/selene.c | 38 ++++++ keyboards/handwired/selene/selene.h | 39 ++++++ 8 files changed, 364 insertions(+) create mode 100644 keyboards/handwired/selene/config.h create mode 100644 keyboards/handwired/selene/info.json create mode 100644 keyboards/handwired/selene/keymaps/bpendragon/keymap.c create mode 100644 keyboards/handwired/selene/keymaps/default/keymap.c create mode 100644 keyboards/handwired/selene/readme.md create mode 100644 keyboards/handwired/selene/rules.mk create mode 100644 keyboards/handwired/selene/selene.c create mode 100644 keyboards/handwired/selene/selene.h diff --git a/keyboards/handwired/selene/config.h b/keyboards/handwired/selene/config.h new file mode 100644 index 000000000000..ced93e516478 --- /dev/null +++ b/keyboards/handwired/selene/config.h @@ -0,0 +1,43 @@ +/* Copyright 2020 Bpendragon + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License 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 0x4244 //-B-pen-D-ragon +#define PRODUCT_ID 0x0001 +#define DEVICE_VER 0x0001 +#define MANUFACTURER Bpendragon +#define PRODUCT Selene + +#define MATRIX_ROWS 6 +#define MATRIX_COLS 21 + +#define MATRIX_ROW_PINS { B10, B9, B15, B14, B13, B8} +#define MATRIX_COL_PINS { A9, A10, B11, B7, B6, B5, B4, B3, B2, B1, B0, C14, A4, A5, A6, A7, A8, A15, A13, A14, B12 } +#define UNUSED_PINS +#define RGB_DI_PIN A3 +#define RGBLED_NUM 50 + + +/* COL2ROW or ROW2COL */ +#define DIODE_DIRECTION COL2ROW + +#define DEBOUNCE 5 + +#define LOCKING_SUPPORT_ENABLE +#define LOCKING_RESYNC_ENABLE diff --git a/keyboards/handwired/selene/info.json b/keyboards/handwired/selene/info.json new file mode 100644 index 000000000000..8df57f936c91 --- /dev/null +++ b/keyboards/handwired/selene/info.json @@ -0,0 +1,121 @@ +{ + "keyboard_name": "Selene", + "url": "https://github.com/Bpendragon/Selene-Keyboard", + "maintainer": "Bpendragon", + "width": 22.5, + "height": 6.5, + "layouts": { + "LAYOUT": { + "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", "x":15.25, "y":0}, + {"label":"Scroll Lock", "x":16.25, "y":0}, + {"label":"Pause", "x":17.25, "y":0}, + {"label":"Out", "x":18.5, "y":0}, + {"label":"+", "x":19.5, "y":0}, + {"label":"-", "x":20.5, "y":0}, + {"label":"~", "x":21.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":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, "w":2}, + {"label":"Insert", "x":15.25, "y":1.5}, + {"label":"Home", "x":16.25, "y":1.5}, + {"label":"Pg Up", "x":17.25, "y":1.5}, + {"label":"Num", "x":18.5, "y":1.5}, + {"label":"\u00f7", "x":19.5, "y":1.5}, + {"label":"\u00d7", "x":20.5, "y":1.5}, + {"label":"-", "x":21.5, "y":1.5}, + {"label":"", "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":"|", "x":13.5, "y":2.5, "w":1.5}, + {"label":"Delete", "x":15.25, "y":2.5}, + {"label":"End", "x":16.25, "y":2.5}, + {"label":"Pg Dn", "x":17.25, "y":2.5}, + {"label":"7", "x":18.5, "y":2.5}, + {"label":"8", "x":19.5, "y":2.5}, + {"label":"9", "x":20.5, "y":2.5}, + {"label":"+", "x":21.5, "y":2.5, "h":2}, + {"label":"\u21e9", "x":0, "y":3.5, "w":1.25}, + {"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, "w":2.25}, + {"label":"4", "x":18.5, "y":3.5}, + {"label":"5", "x":19.5, "y":3.5}, + {"label":"6", "x":20.5, "y":3.5}, + {"label":"\u21e7", "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":"\u21e7", "x":12.25, "y":4.5, "w":2.75}, + {"label":"\u2191", "x":16.25, "y":4.5}, + {"label":"1", "x":18.5, "y":4.5}, + {"label":"2", "x":19.5, "y":4.5}, + {"label":"3", "x":20.5, "y":4.5}, + {"label":"", "x":21.5, "y":4.5, "h":2}, + {"label":"Control", "x":0, "y":5.5, "w":1.25}, + {"label":"Super", "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":"Alt", "x":10, "y":5.5, "w":1.25}, + {"label":"Super", "x":11.25, "y":5.5, "w":1.25}, + {"label":"Menu", "x":12.5, "y":5.5, "w":1.25}, + {"label":"Control", "x":13.75, "y":5.5, "w":1.25}, + {"label":"\u2190", "x":15.25, "y":5.5}, + {"label":"\u2193", "x":16.25, "y":5.5}, + {"label":"\u2192", "x":17.25, "y":5.5}, + {"label":"0", "x":18.5, "y":5.5}, + {"label":"00", "x":19.5, "y":5.5}, + {"label":".", "x":20.5, "y":5.5}] + } + } +} diff --git a/keyboards/handwired/selene/keymaps/bpendragon/keymap.c b/keyboards/handwired/selene/keymaps/bpendragon/keymap.c new file mode 100644 index 000000000000..cdafc003e1f8 --- /dev/null +++ b/keyboards/handwired/selene/keymaps/bpendragon/keymap.c @@ -0,0 +1,43 @@ +/* Copyright 2020 Bpendragon + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public 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 { + DBL_0 = SAFE_RANGE, +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case DBL_0: + if(record->event.pressed) { + SEND_STRING("00"); + } + break; + } + return true; +}; + +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_MUTE, KC_MPRV, KC_MNXT, KC_MPLY, + 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_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_DEL, KC_END, KC_PGDN, 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_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_RGUI, KC_APP, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT, KC_P0, DBL_0, KC_PDOT + ) +}; diff --git a/keyboards/handwired/selene/keymaps/default/keymap.c b/keyboards/handwired/selene/keymaps/default/keymap.c new file mode 100644 index 000000000000..cdafc003e1f8 --- /dev/null +++ b/keyboards/handwired/selene/keymaps/default/keymap.c @@ -0,0 +1,43 @@ +/* Copyright 2020 Bpendragon + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public 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 { + DBL_0 = SAFE_RANGE, +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case DBL_0: + if(record->event.pressed) { + SEND_STRING("00"); + } + break; + } + return true; +}; + +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_MUTE, KC_MPRV, KC_MNXT, KC_MPLY, + 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_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_DEL, KC_END, KC_PGDN, 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_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_RGUI, KC_APP, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT, KC_P0, DBL_0, KC_PDOT + ) +}; diff --git a/keyboards/handwired/selene/readme.md b/keyboards/handwired/selene/readme.md new file mode 100644 index 000000000000..47e3e4a86aea --- /dev/null +++ b/keyboards/handwired/selene/readme.md @@ -0,0 +1,17 @@ +# Selene + +![Selene](https://i.imgur.com/qLyaZtWl.jpg) + +A 109 key Full size with Media and 00 Keys + +[Layout](http://www.keyboard-layout-editor.com/#/gists/7abe0f9944f72517c9f9f7b989548eb5) + +* Keyboard Maintainer: [Bpendragon](https://github.com/Bpendragon) +* Hardware Supported: Proton-C +* Hardware Availability: DXF files for the plates may be downloded [From the Project Repo](https://github.com/Bpendragon/Selene-Keyboard/releases/tag/1.0). You'll have to source the plates yourself. (I used Ponoko for the Acrylic and Elevated Materials for the Carbon Fiber) + +Make example for this keyboard (after setting up your build environment): + + make handwired/selene: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/selene/rules.mk b/keyboards/handwired/selene/rules.mk new file mode 100644 index 000000000000..9416bc5fd3ed --- /dev/null +++ b/keyboards/handwired/selene/rules.mk @@ -0,0 +1,20 @@ +# MCU name +MCU = STM32F303 + +# 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 = yes # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow +WS2812_DRIVER = bitbang +BLUETOOTH_ENABLE = no # Enable Bluetooth +AUDIO_ENABLE = no # Audio output diff --git a/keyboards/handwired/selene/selene.c b/keyboards/handwired/selene/selene.c new file mode 100644 index 000000000000..a3702ce02e35 --- /dev/null +++ b/keyboards/handwired/selene/selene.c @@ -0,0 +1,38 @@ +/* Copyright 2020 Bpendragon + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + + +#include "selene.h" + +void matrix_init_kb(void){ + setPinOutput(NUM_LOCK_PIN); + setPinOutput(CAPS_LOCK_PIN); + setPinOutput(SCROLL_LOCK_PIN); +} + +void keyboard_post_init_user(void) { + rgblight_setrgb(0xff, 0xff, 0xff); +} + +bool led_update_kb(led_t led_state) { + bool res = led_update_user(led_state); + if(res) { + writePin(NUM_LOCK_PIN, led_state.num_lock); + writePin(CAPS_LOCK_PIN, led_state.caps_lock); + writePin(SCROLL_LOCK_PIN, led_state.scroll_lock); + } + return res; +} diff --git a/keyboards/handwired/selene/selene.h b/keyboards/handwired/selene/selene.h new file mode 100644 index 000000000000..1cffc76c1bad --- /dev/null +++ b/keyboards/handwired/selene/selene.h @@ -0,0 +1,39 @@ +/* Copyright 2020 Bpendragon + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License 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 NUM_LOCK_PIN A0 +#define CAPS_LOCK_PIN A2 +#define SCROLL_LOCK_PIN A1 + +#define LAYOUT( \ + K000, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, K015, K016, K017, K018, K019, K020, \ + K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, K115, K116, K117, K118, K119, K120, \ + K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K214, K215, K216, K217, K218, K219, K220, \ + K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K313, K317, K318, K319, \ + K400, K401, K402, K403, K404, K405, K406, K407, K408, K409, K410, K412, K415, K417, K418, K419, K420, \ + K500, K501, K502, K505, K509, K510, K511, K513, K514, K515, K516, K517, K518, K519 \ +) { \ + { K000, KC_NO, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, K015, K016, K017, K018, K019, K020 }, \ + { K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, K115, K116, K117, K118, K119, K120 }, \ + { K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K214, K215, K216, K217, K218, K219, K220 }, \ + { K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, KC_NO, K313, KC_NO, KC_NO, KC_NO, K317, K318, K319, KC_NO }, \ + { K400, K401, K402, K403, K404, K405, K406, K407, K408, K409, K410, KC_NO, K412, KC_NO, KC_NO, K415, KC_NO, K417, K418, K419, K420 }, \ + { K500, K501, K502, KC_NO, KC_NO, K505, KC_NO, KC_NO, KC_NO, K509, K510, K511, KC_NO, K513, K514, K515, K516, K517, K518, K519, KC_NO } \ +} From a536e1bd8f29f82eb5cd4a7db6a4874bd469a076 Mon Sep 17 00:00:00 2001 From: Maarten Dekkers Date: Sat, 8 Aug 2020 19:49:21 +0200 Subject: [PATCH 547/930] [Keyboard] Add Quackfire controller (#9958) * Add Quackfire controller * Comply with PR checklist * Update VIA keymap * Update keyboards/maartenwut/quackfire/readme.md --- keyboards/maartenwut/quackfire/config.h | 147 ++++++++++++ keyboards/maartenwut/quackfire/info.json | 212 ++++++++++++++++++ .../quackfire/keymaps/default/keymap.c | 53 +++++ .../maartenwut/quackfire/keymaps/via/keymap.c | 46 ++++ .../maartenwut/quackfire/keymaps/via/rules.mk | 2 + keyboards/maartenwut/quackfire/quackfire.c | 44 ++++ keyboards/maartenwut/quackfire/quackfire.h | 69 ++++++ keyboards/maartenwut/quackfire/readme.md | 19 ++ keyboards/maartenwut/quackfire/rules.mk | 24 ++ 9 files changed, 616 insertions(+) create mode 100644 keyboards/maartenwut/quackfire/config.h create mode 100644 keyboards/maartenwut/quackfire/info.json create mode 100644 keyboards/maartenwut/quackfire/keymaps/default/keymap.c create mode 100644 keyboards/maartenwut/quackfire/keymaps/via/keymap.c create mode 100644 keyboards/maartenwut/quackfire/keymaps/via/rules.mk create mode 100644 keyboards/maartenwut/quackfire/quackfire.c create mode 100644 keyboards/maartenwut/quackfire/quackfire.h create mode 100644 keyboards/maartenwut/quackfire/readme.md create mode 100644 keyboards/maartenwut/quackfire/rules.mk diff --git a/keyboards/maartenwut/quackfire/config.h b/keyboards/maartenwut/quackfire/config.h new file mode 100644 index 000000000000..6f974c3bf029 --- /dev/null +++ b/keyboards/maartenwut/quackfire/config.h @@ -0,0 +1,147 @@ +/* +Copyright 2020 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 0x87C9 +#define DEVICE_VER 0x0001 +#define MANUFACTURER Maartenwut +#define PRODUCT Quackfire + +/* key matrix size */ +#define MATRIX_ROWS 8 +#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 {D3,F5,F4,F0,B7,B2,E6,B0} +#define MATRIX_COL_PINS {B3,F1,B1,D5,D2,D1,D0,D4,D6,D7,B4,B5,B6,C6,C7} +#define UNUSED_PINS + +/* COL2ROW, ROW2COL*/ +#define DIODE_DIRECTION ROW2COL + +/* + * 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 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 + +/* 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 +/* + * 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 6 +#define BOOTMAGIC_LITE_COLUMN 5 + +#define DYNAMIC_KEYMAP_LAYER_COUNT 3 diff --git a/keyboards/maartenwut/quackfire/info.json b/keyboards/maartenwut/quackfire/info.json new file mode 100644 index 000000000000..e307826a66bc --- /dev/null +++ b/keyboards/maartenwut/quackfire/info.json @@ -0,0 +1,212 @@ +{ + "keyboard_name": "Quackfire", + "url": "https://github.com/Maartenwut/quackfire-controller", + "maintainer": "Maartenwut", + "width": 18.5, + "height": 6.5, + "layouts": { + "LAYOUT_tkl_ansi": { + "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":"PrtSc", "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":"|", "x":13.5, "y":2.5, "w":1.5}, + + {"label":"Delete", "x":15.25, "y":2.5}, + {"label":"End", "x":16.25, "y":2.5}, + {"label":"PgDn", "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":"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":2.75}, + + {"label":"\u2191", "x":16.25, "y":4.5}, + + {"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":6.25}, + {"label":"Alt", "x":10, "y":5.5, "w":1.25}, + {"label":"Win", "x":11.25, "y":5.5, "w":1.25}, + {"label":"Menu", "x":12.5, "y":5.5, "w":1.25}, + {"label":"Ctrl", "x":13.75, "y":5.5, "w":1.25}, + + {"label":"\u2190", "x":15.25, "y":5.5}, + {"label":"\u2193", "x":16.25, "y":5.5}, + {"label":"\u2192", "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":"PrtSc", "x":15.25, "y":0}, + {"label":"Scroll Lock", "x":16.25, "y":0}, + {"label":"Pause", "x":17.25, "y":0}, + + {"label":"\u00ac", "x":0, "y":1.5}, + {"label":"!", "x":1, "y":1.5}, + {"label":"\"", "x":2, "y":1.5}, + {"label":"\u00a3", "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":"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":"PgUp", "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":"PgDn", "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":"\u2191", "x":16.25, "y":4.5}, + + {"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":6.25}, + {"label":"AltGr", "x":10, "y":5.5, "w":1.25}, + {"label":"Win", "x":11.25, "y":5.5, "w":1.25}, + {"label":"Menu", "x":12.5, "y":5.5, "w":1.25}, + {"label":"Ctrl", "x":13.75, "y":5.5, "w":1.25}, + + {"label":"\u2190", "x":15.25, "y":5.5}, + {"label":"\u2193", "x":16.25, "y":5.5}, + {"label":"\u2192", "x":17.25, "y":5.5} + ] + } + } +} diff --git a/keyboards/maartenwut/quackfire/keymaps/default/keymap.c b/keyboards/maartenwut/quackfire/keymaps/default/keymap.c new file mode 100644 index 000000000000..db3e169088ee --- /dev/null +++ b/keyboards/maartenwut/quackfire/keymaps/default/keymap.c @@ -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 . + */ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* + * ┌───┐   ┌───┬───┬───┬───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┐ + * │Esc│   │F1 │F2 │F3 │F4 │ │F5 │F6 │F7 │F8 │ │F9 │F10│F11│F12│ │PSc│Slk│Pse│ + * └───┘   └───┴───┴───┴───┘ └───┴───┴───┴───┘ └───┴───┴───┴───┘ └───┴───┴───┘ + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ ┌───┬───┬───┐ + * │ ` │ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ - │ = │ Backsp│ │Ins│Hom│PgU│ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ ├───┼───┼───┤ + * │ Tab │ Q │ W │ E │ R │ T │ Y │ U │ I │ O │ P │ [ │ ] │  \  │ │Del│End│PgD│ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤ └───┴───┴───┘ + * │ Caps │ A │ S │ D │ F │ G │ H │ J │ K │ L │ ; │ ' │  Enter │ + * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────────┤     ┌───┐ + * │ Shift  │ Z │ X │ C │ V │ B │ N │ M │ , │ . │ / │    Shift │     │ ↑ │ + * ├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤ ┌───┼───┼───┐ + * │Ctrl│GUI │Alt │                        │ Alt│ GUI│Menu│Ctrl│ │ ← │ ↓ │ → │ + * └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘ └───┴───┴───┘ + */ + 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 + ), + LAYOUT_tkl_ansi( + RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, BL_STEP, BL_TOGG, _______, _______, KC_MUTE, + + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MPLY, KC_MSTP, KC_VOLU, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MPRV, KC_MNXT, KC_VOLD, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ) +}; diff --git a/keyboards/maartenwut/quackfire/keymaps/via/keymap.c b/keyboards/maartenwut/quackfire/keymaps/via/keymap.c new file mode 100644 index 000000000000..391882af83a0 --- /dev/null +++ b/keyboards/maartenwut/quackfire/keymaps/via/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 + +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_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, 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_all( + RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, BL_STEP, BL_TOGG, _______, _______, KC_MUTE, + + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MPLY, KC_MSTP, KC_VOLU, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MPRV, KC_MNXT, KC_VOLD, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + [2] = LAYOUT_all( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ) +}; diff --git a/keyboards/maartenwut/quackfire/keymaps/via/rules.mk b/keyboards/maartenwut/quackfire/keymaps/via/rules.mk new file mode 100644 index 000000000000..36b7ba9cbc98 --- /dev/null +++ b/keyboards/maartenwut/quackfire/keymaps/via/rules.mk @@ -0,0 +1,2 @@ +VIA_ENABLE = yes +LTO_ENABLE = yes diff --git a/keyboards/maartenwut/quackfire/quackfire.c b/keyboards/maartenwut/quackfire/quackfire.c new file mode 100644 index 000000000000..cf76c5eb50bd --- /dev/null +++ b/keyboards/maartenwut/quackfire/quackfire.c @@ -0,0 +1,44 @@ +/* Copyright 2020 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 "quackfire.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(); + led_init_ports(); +} + +void led_init_ports(void) { + setPinOutput(F6); + setPinOutput(F7); + writePinHigh(F6); + writePinHigh(F7); +} + +bool led_update_kb(led_t led_state) { + if(led_update_user(led_state)) { + writePin(F7, !led_state.caps_lock); + writePin(F6, !led_state.scroll_lock); + } + + return true; +} diff --git a/keyboards/maartenwut/quackfire/quackfire.h b/keyboards/maartenwut/quackfire/quackfire.h new file mode 100644 index 000000000000..81c0e279bccb --- /dev/null +++ b/keyboards/maartenwut/quackfire/quackfire.h @@ -0,0 +1,69 @@ +/* Copyright 2020 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 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 LAYOUT_tkl_iso + +#define LAYOUT_tkl_ansi( \ + k3e, k0d, k0b, k4b, k3b, k21, k36, k45, k05, k03, k23, k33, k63, k28, k18, k11, \ + k0e, k2e, k2d, k2b, k29, k09, k07, k27, k26, k25, k24, k04, k06, k43, k02, k0a, k0c, \ + k4e, k1e, k1d, k1b, k19, k49, k47, k17, k16, k15, k14, k44, k46, k73, k00, k2a, k2c, \ + k4d, k7e, k7d, k7b, k79, k39, k37, k77, k76, k75, k74, k34, k53, \ + k4c, k5e, k5d, k5b, k59, k69, k67, k57, k56, k55, k64, k7c, k3a, \ + k01, k4a, k38, k30, k68, k71, k65, k51, k6a, k60, k62 \ +) \ +{ \ + { k00, k01, k02, k03, k04, k05, k06, k07, XXX, k09, k0a, k0b, k0c, k0d, k0e }, \ + { XXX, k11, XXX, XXX, k14, k15, k16, k17, k18, k19, XXX, k1b, XXX, k1d, k1e }, \ + { XXX, k21, XXX, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2d, k2e }, \ + { k30, XXX, XXX, k33, k34, XXX, k36, k37, k38, k39, k3a, k3b, XXX, XXX, k3e }, \ + { XXX, XXX, XXX, k43, k44, k45, k46, k47, XXX, k49, k4a, k4b, k4c, k4d, k4e }, \ + { XXX, k51, XXX, k53, XXX, k55, k56, k57, XXX, k59, XXX, k5b, XXX, k5d, k5e }, \ + { k60, XXX, k62, k63, k64, k65, XXX, k67, k68, k69, k6a, XXX, XXX, XXX, XXX }, \ + { XXX, k71, XXX, k73, k74, k75, k76, k77, XXX, k79, XXX, k7b, k7c, k7d, k7e } \ +} + +#define LAYOUT_tkl_iso( \ + k3e, k0d, k0b, k4b, k3b, k21, k36, k45, k05, k03, k23, k33, k63, k28, k18, k11, \ + k0e, k2e, k2d, k2b, k29, k09, k07, k27, k26, k25, k24, k04, k06, k43, k02, k0a, k0c, \ + k4e, k1e, k1d, k1b, k19, k49, k47, k17, k16, k15, k14, k44, k46, k00, k2a, k2c, \ + k4d, k7e, k7d, k7b, k79, k39, k37, k77, k76, k75, k74, k34, k73, k53, \ + k4c, k3d, k5e, k5d, k5b, k59, k69, k67, k57, k56, k55, k64, k7c, k3a, \ + k01, k4a, k38, k30, k68, k71, k65, k51, k6a, k60, k62 \ +) \ +{ \ + { k00, k01, k02, k03, k04, k05, k06, k07, XXX, k09, k0a, k0b, k0c, k0d, k0e }, \ + { XXX, k11, XXX, XXX, k14, k15, k16, k17, k18, k19, XXX, k1b, XXX, k1d, k1e }, \ + { XXX, k21, XXX, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2d, k2e }, \ + { k30, XXX, XXX, k33, k34, XXX, k36, k37, k38, k39, k3a, k3b, XXX, k3d, k3e }, \ + { XXX, XXX, XXX, k43, k44, k45, k46, k47, XXX, k49, k4a, k4b, k4c, k4d, k4e }, \ + { XXX, k51, XXX, k53, XXX, k55, k56, k57, XXX, k59, XXX, k5b, XXX, k5d, k5e }, \ + { k60, XXX, k62, k63, k64, k65, XXX, k67, k68, k69, k6a, XXX, XXX, XXX, XXX }, \ + { XXX, k71, XXX, k73, k74, k75, k76, k77, XXX, k79, XXX, k7b, k7c, k7d, k7e } \ +} diff --git a/keyboards/maartenwut/quackfire/readme.md b/keyboards/maartenwut/quackfire/readme.md new file mode 100644 index 000000000000..44f1d7feaf58 --- /dev/null +++ b/keyboards/maartenwut/quackfire/readme.md @@ -0,0 +1,19 @@ +# Quackfire + +A drop-in replacement controller for the CM Quickfire Rapid. Not for the Quickfire Rapid-I! + +* Keyboard Maintainer: [Maartenwut](https://github.com/Maartenwut) +* Hardware Supported: Quackfire controller +* Hardware Availability: [Open source on GitHub](https://github.com/Maartenwut/quackfire-controller) + +## Flashing + +To get to the bootloader, hold Fn while plugging in the keyboard. You can also press Fn + Esc on the default layout. + +--- + +Make example for this keyboard (after setting up your build environment): + + make maartenwut/quackfire: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/quackfire/rules.mk b/keyboards/maartenwut/quackfire/rules.mk new file mode 100644 index 000000000000..f29136f7442b --- /dev/null +++ b/keyboards/maartenwut/quackfire/rules.mk @@ -0,0 +1,24 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +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 = no # Console for debug +COMMAND_ENABLE = no # Commands for debug and configuration +# 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 +BLUETOOTH_ENABLE = no # Enable Bluetooth +AUDIO_ENABLE = no # Audio output + +LAYOUTS = tkl_ansi tkl_iso From b506c498a789563511f59c8c902e9d9f6a1daaa4 Mon Sep 17 00:00:00 2001 From: TripTrap Date: Sat, 8 Aug 2020 20:24:10 +0200 Subject: [PATCH 548/930] [Keyboard] Dumbo (#9656) * added dumbo keyboard * added my personal keymap * changed picture in readme * removed rev1 folder to reduce clutter and confusion * missed a few changes in last commit, everything should be added now * Apply suggestions from code review Committed all of the suggested changes except for removing the bootloader reference comments in rules.mk as i think it is handy. * Update keyboards/dumbo/rules.mk Removed the bootloader reference as suggested * Apply clean up of info.json * Apply suggestions from noroadsleft to support community layout LAYOUT_SPLIT_3x6_4 in the future_4 --- keyboards/dumbo/config.h | 58 +++ keyboards/dumbo/dumbo.c | 16 + keyboards/dumbo/dumbo.h | 44 +++ keyboards/dumbo/info.json | 64 +++ keyboards/dumbo/keymaps/default/config.h | 21 + keyboards/dumbo/keymaps/default/keymap.c | 230 +++++++++++ keyboards/dumbo/keymaps/default/rules.mk | 2 + keyboards/dumbo/keymaps/trip-trap/config.h | 27 ++ keyboards/dumbo/keymaps/trip-trap/keymap.c | 428 +++++++++++++++++++++ keyboards/dumbo/keymaps/trip-trap/rules.mk | 3 + keyboards/dumbo/readme.md | 17 + keyboards/dumbo/rules.mk | 23 ++ 12 files changed, 933 insertions(+) create mode 100644 keyboards/dumbo/config.h create mode 100644 keyboards/dumbo/dumbo.c create mode 100644 keyboards/dumbo/dumbo.h create mode 100644 keyboards/dumbo/info.json create mode 100644 keyboards/dumbo/keymaps/default/config.h create mode 100644 keyboards/dumbo/keymaps/default/keymap.c create mode 100644 keyboards/dumbo/keymaps/default/rules.mk create mode 100644 keyboards/dumbo/keymaps/trip-trap/config.h create mode 100644 keyboards/dumbo/keymaps/trip-trap/keymap.c create mode 100644 keyboards/dumbo/keymaps/trip-trap/rules.mk create mode 100644 keyboards/dumbo/readme.md create mode 100644 keyboards/dumbo/rules.mk diff --git a/keyboards/dumbo/config.h b/keyboards/dumbo/config.h new file mode 100644 index 000000000000..07b67d06d361 --- /dev/null +++ b/keyboards/dumbo/config.h @@ -0,0 +1,58 @@ +/* +Copyright 2020 Adam Naldal +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License 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 0x25E3 +#define DEVICE_VER 0x0001 +#define MANUFACTURER trip_trap +#define PRODUCT Dumbo + +/* key matrix size */ +/* Rows are doubled up */ +#define MATRIX_ROWS 8 +#define MATRIX_COLS 6 + +// wiring +#define MATRIX_ROW_PINS { D4, D7, E6, B4 } +#define MATRIX_COL_PINS { B6, B2, B3, B1, F7, F6} +#define UNUSED_PINS + +#define ENCODERS_PAD_A { F4, C6 } +#define ENCODERS_PAD_B { F5, B5 } +#define ENCODERS_PAD_A_RIGHT { F5, B5 } +#define ENCODERS_PAD_B_RIGHT { F4, C6 } + +/* COL2ROW, ROW2COL*/ +#define DIODE_DIRECTION COL2ROW + +/* define if matrix has ghost (lacks anti-ghosting diodes) */ +//#define MATRIX_HAS_GHOST + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCE 5 + +/* + * 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 + +/* 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/dumbo/dumbo.c b/keyboards/dumbo/dumbo.c new file mode 100644 index 000000000000..a8c34c1c9ef7 --- /dev/null +++ b/keyboards/dumbo/dumbo.c @@ -0,0 +1,16 @@ +/* Copyright 2020 Adam Naldal + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#include "dumbo.h" diff --git a/keyboards/dumbo/dumbo.h b/keyboards/dumbo/dumbo.h new file mode 100644 index 000000000000..bd1d02f8ecca --- /dev/null +++ b/keyboards/dumbo/dumbo.h @@ -0,0 +1,44 @@ +/* Copyright 2020 Adam Naldal + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License 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_split_3x6_4( \ + 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, R30, R31, R32, R33 \ + ) \ + { \ + { L00, L01, L02, L03, L04, L05 }, \ + { L10, L11, L12, L13, L14, L15 }, \ + { L20, L21, L22, L23, L24, L25 }, \ + { KC_NO, KC_NO, L30, L31, L32, L33 }, \ + { R05, R04, R03, R02, R01, R00 }, \ + { R15, R14, R13, R12, R11, R10 }, \ + { R25, R24, R23, R22, R21, R20 }, \ + { KC_NO, KC_NO, R33, R32, R31, R30 } \ + } diff --git a/keyboards/dumbo/info.json b/keyboards/dumbo/info.json new file mode 100644 index 000000000000..900b5bb5acbf --- /dev/null +++ b/keyboards/dumbo/info.json @@ -0,0 +1,64 @@ +{ + "keyboard_name": "Dumbo", + "url": "", + "maintainer": "adamnaldal", + "width": 15.5, + "height": 5.25, + "layouts": { + "LAYOUT_split_3x6_4": { + "layout": [ + {"x":0, "y":1.25}, + {"x":1, "y":1}, + {"x":2, "y":0.25}, + {"x":3, "y":0}, + {"x":4, "y":0.5}, + {"x":5, "y":0.75}, + + {"x":9.5, "y":0.75}, + {"x":10.5, "y":0.5}, + {"x":11.5, "y":0}, + {"x":12.5, "y":0.25}, + {"x":13.5, "y":1}, + {"x":14.5, "y":1.25}, + + {"x":0, "y":2.25}, + {"x":1, "y":2}, + {"x":2, "y":1.25}, + {"x":3, "y":1}, + {"x":4, "y":1.5}, + {"x":5, "y":1.75}, + + {"x":9.5, "y":1.75}, + {"x":10.5, "y":1.5}, + {"x":11.5, "y":1}, + {"x":12.5, "y":1.25}, + {"x":13.5, "y":2}, + {"x":14.5, "y":2.25}, + + {"x":0, "y":3.25}, + {"x":1, "y":3}, + {"x":2, "y":2.25}, + {"x":3, "y":2}, + {"x":4, "y":2.5}, + {"x":5, "y":2.75}, + + {"x":9.5, "y":2.75}, + {"x":10.5, "y":2.5}, + {"x":11.5, "y":2}, + {"x":12.5, "y":2.25}, + {"x":13.5, "y":3}, + {"x":14.5, "y":3.25}, + + {"x":3.25, "y":3.75}, + {"x":4.25, "y":3.75, "h":1.5}, + {"x":5.25, "y":3.75, "h":1.5}, + {"x":6.25, "y":4.25}, + + {"x":8.25, "y":4.25}, + {"x":9.25, "y":3.75, "h":1.5}, + {"x":10.25, "y":3.75, "h":1.5}, + {"x":11.25, "y":3.75} + ] + } + } +} diff --git a/keyboards/dumbo/keymaps/default/config.h b/keyboards/dumbo/keymaps/default/config.h new file mode 100644 index 000000000000..3b330ce54642 --- /dev/null +++ b/keyboards/dumbo/keymaps/default/config.h @@ -0,0 +1,21 @@ +/* Copyright 2020 Adam Naldal + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License 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 you are using an Elite C rev3 on the slave side, uncomment the lines below: +// #define SPLIT_USB_DETECT +// #define NO_USB_STARTUP_CHECK diff --git a/keyboards/dumbo/keymaps/default/keymap.c b/keyboards/dumbo/keymaps/default/keymap.c new file mode 100644 index 000000000000..dfa6a52b91f4 --- /dev/null +++ b/keyboards/dumbo/keymaps/default/keymap.c @@ -0,0 +1,230 @@ +/* Copyright 2020 Adam Naldal + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public 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, + _NN, + _MS, + _SP +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +/* + * Base Layer: QWERTY + * + * ,-------------------------------------------. ,-------------------------------------------. + * | TAB | Q | W | E | R | T | | Y | U | I | O | P | ESC | + * |--------+------+------+------+------+------| |------+------+------+------+------+--------| + * | CTRL | A | S | D | F | G | | H | J | K | L | ; : | ' " | + * |--------+------+------+------+------+------| |------+------+------+------+------+--------| + * | LShift | Z | X | C | V | B | | N | M | , < | . > | / ? | SHIFT | + * `------------------------⫟------⫟------⫟------⫟------. ,-----⫟------⫟------⫟------⫟-------------------------' + * | GUI | Caps | Space| Nav +| |Media+| Bksp | Enter| AltGr| + * | | | |Number| |symbol| | | | + * `---------------------------' `---------------------------' + */ + [_QWERTY] = LAYOUT_split_3x6_4( + //,-----------------------------------------------------. ,-----------------------------------------------------. + 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_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_LGUI, KC_CAPS, KC_SPC, MO(_NN), MO(_MS), KC_BSPC, KC_ENT, KC_RALT + //`------------------------------------' '------------------------------------' + ), + /* + * Navigation and Numbers: _NN + * + * ,-------------------------------------------. ,-------------------------------------------. + * | TAB | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | ESC | + * |--------+------+------+------+------+------| |------+------+------+------+------+--------| + * | CTRL | F1 | F2 | F3 | F4 | F5 | | left | down | up | right| | | + * |--------+------+------+------+------+------| |------+------+------+------+------+--------| + * | LShift | F6 | F7 | F8 | F9 | F10 | | home | pgdn | pgup | end | | SHIFT | + * `------------------------⫟------⫟------⫟------⫟------. ,-----⫟------⫟------⫟------⫟-------------------------' + * | GUI | Del | Space| Nav +| |Media+|Back- | Enter| AltGr| + * | | | |Number| |symbol|space | | | + * `---------------------------' `---------------------------' + */ + [_NN] = LAYOUT_split_3x6_4( + //,-----------------------------------------------------. ,-----------------------------------------------------. + KC_TAB, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_ESC, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + KC_LCTL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_LEFT, KC_DOWN, KC_UP,KC_RIGHT, XXXXXXX, XXXXXXX, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + KC_LSFT, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_HOME, KC_PGDN, KC_PGUP, KC_END, XXXXXXX, KC_RSFT, + //|--------+--------+-----------⫟--------⫟--------⫟--------⫟--------. .--------⫟--------⫟--------⫟--------⫟-----------+--------+--------| + KC_LGUI, KC_DEL, KC_SPC, _______, _______, KC_BSPC, KC_ENT, KC_RALT + //`------------------------------------' '------------------------------------' + ), + /* + * Media and Symbols: _MS + * + * ,-------------------------------------------. ,-------------------------------------------. + * | TAB | ! | @ | # | $ | % | | ^ | & | * | ( | ) | ESC | + * |--------+------+------+------+------+------| |------+------+------+------+------+--------| + * | CTRL | | prev | play | next | vol+ | | - | = | { | } | | | ´ | + * |--------+------+------+------+------+------| |------+------+------+------+------+--------| + * | LShift | |brght-|brght+| mute | vol- | | _ | + | [ | ] | \ | ~ | + * `------------------------⫟------⫟------⫟------⫟------. ,-----⫟------⫟------⫟------⫟-------------------------' + * | GUI | Del | Space| Nav +| |Media+| Bksp | Enter| AltGr| + * | | | |Number| |symbol| | | | + * `---------------------------' `---------------------------' + */ + [_MS] = LAYOUT_split_3x6_4( + //,-----------------------------------------------------. ,-----------------------------------------------------. + KC_TAB, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_ESC, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + KC_LCTL, XXXXXXX, KC_MRWD, KC_MPLY, KC_MFFD, KC_VOLU, KC_MINS, KC_EQL, KC_LCBR, KC_RCBR, KC_PIPE, KC_GRV, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + KC_LSFT, XXXXXXX, KC_BRID, KC_BRIU, KC_MUTE, KC_VOLD, KC_UNDS, KC_PLUS, KC_LBRC, KC_RBRC, KC_BSLS, KC_TILD, + //|--------+--------+-----------⫟--------⫟--------⫟--------⫟--------. .--------⫟--------⫟--------⫟--------⫟-----------+--------+--------| + KC_LGUI, KC_DEL, KC_SPC, _______, _______, KC_BSPC, KC_ENT, KC_RALT + //`------------------------------------' '------------------------------------' + ), +/* + * Special functions: _SP + * + * ,-------------------------------------------. ,-------------------------------------------. + * | TAB | | | | RESET| | | | | | | | ESC | + * |--------+------+------+------+------+------| |------+------+------+------+------+--------| + * | CTRL | | | DEBUG| | | | | | | | | | + * |--------+------+------+------+------+------| |------+------+------+------+------+--------| + * | LShift | | | | | | | | | | | | SHIFT | + * `------------------------⫟------⫟------⫟------⫟------. ,-----⫟------⫟------⫟------⫟-------------------------' + * | GUI | Del | Space| Nav +| |Media+| Bksp | Enter| AltGr| + * | | | |Number| |symbol| | | | + * `---------------------------' `---------------------------' + */ + [_SP] = LAYOUT_split_3x6_4( + //,-----------------------------------------------------. ,-----------------------------------------------------. + KC_TAB, XXXXXXX, XXXXXXX, XXXXXXX, RESET, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_ESC, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + KC_LCTL, XXXXXXX, XXXXXXX, DEBUG, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + KC_LSFT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_RSFT, + //|--------+--------+-----------⫟--------⫟--------⫟--------⫟--------. .--------⫟--------⫟--------⫟--------⫟-----------+--------+--------| + KC_LGUI, KC_DEL, KC_SPC, _______, _______, KC_BSPC, KC_ENT, KC_RALT + //`------------------------------------' '------------------------------------' + ), + +}; + +layer_state_t layer_state_set_user(layer_state_t state) { + return update_tri_layer_state(state, _NN, _MS, _SP); +} + +#ifdef OLED_DRIVER_ENABLE + +static void render_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, 0x00 + }; + + oled_write_P(qmk_logo, false); +} + +static void print_status_narrow(void) { + // Print current mode + oled_write_P(PSTR("\n"), false); + oled_write_ln_P(PSTR("MODE"), false); + oled_write_ln_P(PSTR(""), false); + + oled_write_P(PSTR("\n\n"), false); + // Print current layer + oled_write_ln_P(PSTR("LAYER"), false); + switch (get_highest_layer(layer_state)) { + case _QWERTY: + oled_write_P(PSTR("Base\n"), false); + break; + case _NN: + oled_write_P(PSTR("Nums\n"), false); + break; + case _MS: + oled_write_P(PSTR("Sym\n"), false); + break; + case _SP: + oled_write_P(PSTR("Spec\n"), false); + break; + default: + oled_write_ln_P(PSTR("Undef\n"), false); + } + oled_write_P(PSTR("\n\n"), false); + led_t led_usb_state = host_keyboard_led_state(); + oled_write_ln_P(PSTR("CPSLK"), led_usb_state.caps_lock); +} + +oled_rotation_t oled_init_user(oled_rotation_t rotation) { + if (is_keyboard_master()) { + return OLED_ROTATION_270; + } + return rotation; +} + +void oled_task_user(void) { + if (is_keyboard_master()) { + print_status_narrow(); + } else { + render_logo(); + } +} +#endif + +#ifdef ENCODER_ENABLE +void encoder_update_user(uint8_t index, bool clockwise) { + if (index == 0) { + // master side thumb encoder + // Volume control + if (clockwise) { + tap_code(KC_VOLU); + } else { + tap_code(KC_VOLD); + } + } + else if (index == 1) { + // master side pinky encoder + // Page down / Page up + if (clockwise) { + tap_code(KC_PGDN); + } else { + tap_code(KC_PGUP); + } + } + else if (index == 2) { + // minion side thumb encoder + // Next track / Previous track + if (clockwise) { + tap_code(KC_MFFD); + } else { + tap_code(KC_MRWD); + } + } + else if (index == 3) { + // minion side pinky encoder + // Page end / Page home + if (clockwise) { + tap_code(KC_END); + } else { + tap_code(KC_HOME); + } + } +} +#endif diff --git a/keyboards/dumbo/keymaps/default/rules.mk b/keyboards/dumbo/keymaps/default/rules.mk new file mode 100644 index 000000000000..16913b421c2c --- /dev/null +++ b/keyboards/dumbo/keymaps/default/rules.mk @@ -0,0 +1,2 @@ +OLED_DRIVER_ENABLE = yes # Enables the use of OLED displays +ENCODER_ENABLE = yes # Enables the use of one or more encoders diff --git a/keyboards/dumbo/keymaps/trip-trap/config.h b/keyboards/dumbo/keymaps/trip-trap/config.h new file mode 100644 index 000000000000..7f713e4a3dd5 --- /dev/null +++ b/keyboards/dumbo/keymaps/trip-trap/config.h @@ -0,0 +1,27 @@ +/* Copyright 2020 Adam Naldal + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#pragma once + +// Tapping term is ever so slightly lowered from the 200ms default to make layer and mod usage more snappy. +#define TAPPING_TERM 200 + +// Prevent normal rollover on alphas from accidentally triggering mods. +#define IGNORE_MOD_TAP_INTERRUPT + +// If you are using an Elite C rev3 on the slave side, uncomment the lines below: +// #define SPLIT_USB_DETECT +// #define NO_USB_STARTUP_CHECK diff --git a/keyboards/dumbo/keymaps/trip-trap/keymap.c b/keyboards/dumbo/keymaps/trip-trap/keymap.c new file mode 100644 index 000000000000..4e73fdaa0e79 --- /dev/null +++ b/keyboards/dumbo/keymaps/trip-trap/keymap.c @@ -0,0 +1,428 @@ +/* Copyright 2020 Adam Naldal + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public 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_danish.h" +#include + +enum layers { + _QWERTY = 0, + _COLEMAK, + _NN, + _MS, + _SP +}; + +// Default layer switching +#define QWERT DF(_QWERTY) +#define COLEM DF(_COLEMAK) + +// Layer tap codes +#define LT_SPC LT(_NN, KC_SPC) +#define LT_TAB LT(_MS, KC_TAB) +#define LT_ENT LT(_MS, KC_ENT) +#define LT_BSPC LT(_NN, KC_BSPC) + +// Qwerty homerow mods +#define A_CTL LCTL_T(KC_A) +#define S_ALT LALT_T(KC_S) +#define D_GUI LGUI_T(KC_D) +#define F_SFT LSFT_T(KC_F) +#define J_SFT RSFT_T(KC_J) +#define K_GUI RGUI_T(KC_K) +#define L_ALT RALT_T(KC_L) +#define AE_CTL RCTL_T(DK_AE) + +// Colemak homerow mods +#define R_ALT LALT_T(KC_R) +#define S_GUI LGUI_T(KC_S) +#define T_SFT LSFT_T(KC_T) +#define N_SFT RSFT_T(KC_N) +#define E_GUI RGUI_T(KC_E) +#define I_ALT RALT_T(KC_I) +#define O_CTL RCTL_T(KC_O) + +// Navigation and numbers homerow mods +#define RGHT_SFT LSFT_T(KC_RGHT) +#define DOWN_GUI LGUI_T(KC_DOWN) +#define LEFT_ALT LALT_T(KC_LEFT) +#define N4_SFT RSFT_T(KC_4) +#define N5_GUI RGUI_T(KC_5) +#define N6_ALT RALT_T(KC_6) +#define OE_CTL RCTL_T(DK_OSTR) + +// Undefined or wrong symbols (homebrew) +#define HB_LCBR S(A(KC_8)) // { +#define HB_RCBR S(A(KC_9)) // } +#define HB_LABR KC_GRV // < +#define HB_RABR S(KC_GRV) // > +#define HB_USD KC_NUBS // $ +#define HB_PRGF S(KC_NUBS) // § +#define HB_AT A(KC_NUHS) // @ +#define HB_EUR S(KC_4) // € + + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +/* + * Base Layer: 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 | , ; | . : | - _ | | + * `------------------------⫟------⫟------⫟------⫟------. ,-----⫟------⫟------⫟------⫟-------------------------' + * | MUTE | Esc | Space| Tab | | Enter| Bksp | Caps| PLAY| + * |(enc) | | _NN | _MS | | _MS | _NN | |(enc)| + * `---------------------------' `---------------------------' + */ + [_QWERTY] = LAYOUT_split_3x6_4( + //,-----------------------------------------------------. ,-----------------------------------------------------. + XXXXXXX, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, DK_ARNG, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + XXXXXXX, A_CTL, S_ALT, D_GUI, F_SFT, KC_G, KC_H, J_SFT, K_GUI, L_ALT, AE_CTL, DK_OSTR, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + XXXXXXX, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, DK_MINS, XXXXXXX, + //|--------+--------+-----------⫟--------⫟--------⫟--------⫟--------. .--------⫟--------⫟--------⫟--------⫟-----------+--------+--------| + KC_MUTE, KC_ESC, LT_SPC, LT_TAB, LT_ENT, LT_BSPC, KC_CAPS, KC_MPLY + //`------------------------------------' '------------------------------------' + ), +/* + * Base Layer: COLEMAK + * + * ,-------------------------------------------. ,-------------------------------------------. + * | | Q | W | F | P | B | | J | L | U | Y | Å | | + * |--------+------+------+------+------+------| |------+------+------+------+------+--------| + * | | A | R | S | T | G | | M | N | E | I | O | | + * |--------+------+------+------+------+------| |------+------+------+------+------+--------| + * | | Z | X | C | D | V | | K | H | , ; | . : | Æ | | + * `------------------------⫟------⫟------⫟------⫟------. ,-----⫟------⫟------⫟------⫟-------------------------' + * | MUTE | Esc | Space| Tab | | Enter| Bksp | Caps | PLAY| + * |(enc) | | _NN | _MS | | _MS | _NN | | (enc)| + * `---------------------------' `---------------------------' + */ + [_COLEMAK] = LAYOUT_split_3x6_4( + //,-----------------------------------------------------. ,-----------------------------------------------------. + XXXXXXX, KC_Q, KC_W, KC_F, KC_P, KC_B, KC_J, KC_L, KC_U, KC_Y, DK_ARNG, XXXXXXX, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + XXXXXXX, A_CTL, R_ALT, S_GUI, T_SFT, KC_G, KC_M, N_SFT, E_GUI, I_ALT, O_CTL, XXXXXXX, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + XXXXXXX, KC_Z, KC_X, KC_C, KC_D, KC_V, KC_K, KC_H, KC_COMM, KC_DOT, DK_AE, XXXXXXX, + //|--------+--------+-----------⫟--------⫟--------⫟--------⫟--------. .--------⫟--------⫟--------⫟--------⫟-----------+--------+--------| + KC_MUTE, KC_ESC, LT_SPC, LT_TAB, LT_ENT, LT_BSPC, KC_CAPS, KC_MPLY + //`------------------------------------' '------------------------------------' + ), + /* + * Navigation and Numbers: _NN + * + * ,-------------------------------------------. ,-------------------------------------------. + * | | | Home | Up | End | pgUp | | * | 7 | 8 | 9 | + | | + * |--------+------+------+------+------+------| |------+------+------+------+------+--------| + * | | | Left | Down | Right| pgDwn| | / | 4 | 5 | 6 | Ø | | + * |--------+------+------+------+------+------| |------+------+------+------+------+--------| + * | | | Cut | Copy | | Paste| | = | 1 | 2 | 3 | - | | + * `------------------------⫟------⫟------⫟------⫟------. ,-----⫟------⫟------⫟------⫟-------------------------' + * | MUTE | Del | Space| Tab | | Enter| Bksp | 0 | PLAY | + * |(enc) | | _NN | _MS | | _MS | _NN | |(enc) | + * `---------------------------' `---------------------------' + */ + [_NN] = LAYOUT_split_3x6_4( + //,-----------------------------------------------------. ,-----------------------------------------------------. + XXXXXXX, XXXXXXX, KC_HOME, KC_UP, KC_END, KC_PGUP, DK_ASTR, KC_7, KC_8, KC_9, DK_PLUS, XXXXXXX, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + XXXXXXX, KC_LCTL,LEFT_ALT,DOWN_GUI,RGHT_SFT, KC_PGDN, DK_SLSH, N4_SFT, N5_GUI, N6_ALT, OE_CTL, XXXXXXX, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + XXXXXXX, XXXXXXX, G(KC_X), G(KC_C), XXXXXXX, G(KC_V), DK_EQL, KC_1, KC_2, KC_3, DK_MINS, XXXXXXX, + //|--------+--------+-----------⫟--------⫟--------⫟--------⫟--------. .--------⫟--------⫟--------⫟--------⫟-----------+--------+--------| + KC_MUTE, KC_DEL, _______, _______, _______, _______, KC_0, KC_MPLY + //`------------------------------------' '------------------------------------' + ), + /* + * Media and Symbols: _MS + * + * ,-------------------------------------------. ,-------------------------------------------. + * | | | | [ | ] | F1 | | $ | / | ( | ) | ? | | + * |--------+------+------+------+------+------| |------+------+------+------+------+--------| + * | |brght-|brght+| { | } | F2 | | @ | € | % | & | ' | | + * |--------+------+------+------+------+------| |------+------+------+------+------+--------| + * | | | | < | > | F3 | | § | ! | " | # | _ | | + * `------------------------⫟------⫟------⫟------⫟------. ,-----⫟------⫟------⫟------⫟-------------------------' + * | MUTE | Esc | Space| Tab | | Enter| Bksp | Caps | PLAY| + * |(enc) | | _NN | _MS | | _MS | _NN | | (enc)| + * `---------------------------' `---------------------------' + */ + [_MS] = LAYOUT_split_3x6_4( + //,-----------------------------------------------------. ,-----------------------------------------------------. + XXXXXXX, XXXXXXX, XXXXXXX, DK_LBRC, DK_RBRC, KC_F1, HB_USD, DK_SLSH, DK_LPRN, DK_RPRN, DK_QUES, XXXXXXX, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + XXXXXXX, KC_BRID, KC_BRIU, HB_LCBR, HB_RCBR, KC_F2, HB_AT, HB_EUR, DK_PERC, DK_AMPR, DK_QUOT, XXXXXXX, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + XXXXXXX, XXXXXXX, XXXXXXX, HB_LABR, HB_RABR, KC_F3, HB_PRGF, DK_EXLM, DK_DQUO, DK_HASH, DK_UNDS, XXXXXXX, + //|--------+--------+-----------⫟--------⫟--------⫟--------⫟--------. .--------⫟--------⫟--------⫟--------⫟-----------+--------+--------| + KC_MUTE, KC_ESC, _______, _______, _______, _______, KC_CAPS, KC_MPLY + //`------------------------------------' '------------------------------------' + ), +/* + * Special functions: _SP + * + * ,-------------------------------------------. ,-------------------------------------------. + * | |QWERTY| | | RESET| | | | | | | | | + * |--------+------+------+------+------+------| |------+------+------+------+------+--------| + * | | | | DEBUG| | | | | | | | | | + * |--------+------+------+------+------+------| |------+------+------+------+------+--------| + * | | | |COLEMK| | | | | | | | | | + * `------------------------⫟------⫟------⫟------⫟------. ,-----⫟------⫟------⫟------⫟-------------------------' + * | GUI | Del | Space| Nav +| |Media+| Bksp | Enter| AltGr| + * | | | |Number| |symbol| | | | + * `---------------------------' `---------------------------' + */ + [_SP] = LAYOUT_split_3x6_4( + //,-----------------------------------------------------. ,-----------------------------------------------------. + XXXXXXX, QWERT, XXXXXXX, XXXXXXX, RESET, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + XXXXXXX, XXXXXXX, XXXXXXX, DEBUG, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + XXXXXXX, XXXXXXX, XXXXXXX, COLEM, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + //|--------+--------+-----------⫟--------⫟--------⫟--------⫟--------. .--------⫟--------⫟--------⫟--------⫟-----------+--------+--------| + KC_MUTE, KC_ESC, _______, _______, _______, _______, KC_CAPS, KC_MPLY + //`------------------------------------' '------------------------------------' + ), + +}; + +layer_state_t layer_state_set_user(layer_state_t state) { + return update_tri_layer_state(state, _NN, _MS, _SP); +} + +#ifdef OLED_DRIVER_ENABLE +char wpm_str[10]; + +// static void render_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, 0x00 +// }; +// +// oled_write_P(qmk_logo, false); +// } + +static void print_status_narrow(void) { + // Print current mode + oled_write_P(PSTR("\n"), false); + oled_write_ln_P(PSTR("MODE"), false); + oled_write_ln_P(PSTR(""), false); + + switch (get_highest_layer(default_layer_state)) { + case _QWERTY: + oled_write_ln_P(PSTR("Qwrt"), false); + break; + case _COLEMAK: + oled_write_ln_P(PSTR("Clmk"), false); + break; + default: + oled_write_P(PSTR("Undef"), false); + } + oled_write_P(PSTR("\n\n"), false); + // Print current layer + oled_write_ln_P(PSTR("LAYER"), false); + switch (get_highest_layer(layer_state)) { + case _QWERTY: + oled_write_P(PSTR("Base\n"), false); + break; + case _NN: + oled_write_P(PSTR("Nums\n"), false); + break; + case _MS: + oled_write_P(PSTR("Sym\n"), false); + break; + case _SP: + oled_write_P(PSTR("Spec\n"), false); + break; + default: + oled_write_ln_P(PSTR("Undef\n"), false); + } + oled_write_P(PSTR("\n\n"), false); + led_t led_usb_state = host_keyboard_led_state(); + oled_write_ln_P(PSTR("CPSLK"), led_usb_state.caps_lock); +} + +#define ANIM_NUM_FRAMES 2 // number of frames in the animation +#define MAX_DURATION 10000 +#define ANIM_BEGIN 30 +uint16_t anim_frame_duration = 100; // how long each frame lasts +// #define ANIM_REVERSE // define this if you want the animation to run backwards at the end + +#ifdef ANIM_REVERSE +#define ANIM_TOTAL_FRAMES (2*((ANIM_NUM_FRAMES)-1)) +#else +#define ANIM_TOTAL_FRAMES ANIM_NUM_FRAMES +#endif + +uint16_t anim_timer = 0; +uint8_t current_anim_frame = 0; + +static void render_anim(void) { + static const char PROGMEM frame[ANIM_NUM_FRAMES][512] = { + { + // 'pokemon experiment frame 1', 32x128px + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 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, 0x60, 0x10, 0x08, 0x04, 0x04, 0x02, 0x02, 0x02, + 0x02, 0x02, 0x02, 0x02, 0x04, 0x04, 0x04, 0x08, 0x30, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x1f, 0x3c, 0xf2, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x04, 0xf2, 0x3a, 0x1c, 0x3c, 0xf8, 0xe0, 0x00, 0x00, 0x01, 0x1e, 0xe0, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x70, 0x8c, 0x03, 0x41, 0x82, 0x02, 0x03, 0x80, 0x40, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x07, 0x04, 0x84, 0x84, 0xc7, 0x63, 0x00, 0x00, 0x00, 0xe0, 0x1f, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x02, 0x04, 0x1c, 0x28, 0x58, 0xa4, 0xa4, 0x44, 0x42, 0x42, + 0x23, 0x97, 0x91, 0x48, 0x24, 0x23, 0x10, 0x08, 0x04, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, + 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x80, 0x70, 0x08, 0x04, 0x04, 0x08, 0x08, 0x50, 0x20, 0x10, 0x10, 0x10, 0x90, 0x90, + 0x90, 0x10, 0x10, 0x10, 0x10, 0x10, 0x20, 0x10, 0x08, 0x08, 0x04, 0x04, 0x08, 0xf0, 0x00, 0x00, + 0x80, 0x78, 0x1f, 0x3a, 0xf2, 0xc4, 0x00, 0x00, 0x30, 0x60, 0x00, 0x06, 0x8f, 0xcf, 0xe7, 0x03, + 0x01, 0x00, 0x04, 0xf2, 0x3a, 0x1c, 0x1c, 0x78, 0xf0, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x0f, 0xf0, + 0x1f, 0x64, 0xb4, 0x64, 0xa7, 0x23, 0x40, 0x48, 0x50, 0x40, 0x80, 0x80, 0x91, 0x89, 0x80, 0x80, + 0x80, 0x40, 0x40, 0x47, 0x44, 0x44, 0xa4, 0x64, 0x27, 0x13, 0x08, 0x00, 0x00, 0x80, 0x60, 0x1f, + 0x00, 0x00, 0x00, 0x01, 0x01, 0x03, 0x02, 0x06, 0x04, 0x0c, 0x0c, 0x0c, 0x08, 0x08, 0x08, 0x0c, + 0x0c, 0x0c, 0x0a, 0x0a, 0x09, 0x05, 0x04, 0x04, 0x04, 0x02, 0x02, 0x02, 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, 0x80, 0x40, 0x20, 0x10, 0x10, 0x08, 0x08, 0x08, 0x04, 0x04, 0x04, + 0x04, 0x04, 0x04, 0x04, 0x04, 0x08, 0x08, 0x08, 0x10, 0x10, 0x20, 0x40, 0x80, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0xfc, 0x1b, 0x3c, 0xfc, 0xf9, 0x01, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x02, 0xf1, 0x39, 0x1c, 0x3c, 0xfc, 0xf8, 0xf0, 0x00, 0x00, 0x03, 0x0c, 0xf0, + 0x00, 0xf8, 0x06, 0x01, 0x32, 0x02, 0x03, 0x31, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x07, 0x04, 0x84, 0x84, 0x47, 0xe3, 0x01, 0x00, 0x00, 0x00, 0xc0, 0x3f, + 0x00, 0x00, 0x01, 0x02, 0x06, 0x0a, 0x14, 0x28, 0x48, 0x44, 0x44, 0xc2, 0xc2, 0xc2, 0xa2, 0xa2, + 0xa1, 0x91, 0x91, 0x89, 0x49, 0x45, 0x44, 0x22, 0x21, 0x10, 0x10, 0x08, 0x04, 0x02, 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, + + }, + { + // 'pokemon experiment frame 2', 32x128px + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, + 0x80, 0x80, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x18, 0x84, 0x02, 0x01, 0x01, 0x00, 0x00, 0x00, + 0x00, 0x80, 0x80, 0x00, 0x01, 0x01, 0x01, 0x02, 0x0c, 0x70, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x7f, 0x87, 0x8f, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x01, 0xfc, 0x0e, 0x07, 0x0f, 0xfe, 0xf8, 0x00, 0x00, 0x00, 0x07, 0xf8, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x1c, 0x63, 0x80, 0x10, 0x20, 0x00, 0x00, 0x20, 0x10, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x81, 0x81, 0x41, 0x41, 0x21, 0x10, 0x00, 0x80, 0x60, 0x18, 0x07, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x06, 0x04, 0x04, 0x0a, 0x0a, 0x0a, 0x0a, 0x09, + 0x05, 0x07, 0x04, 0x02, 0x02, 0x02, 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, 0xe0, 0x10, 0x08, 0x08, 0x10, 0x10, 0xa0, 0x40, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x40, 0x20, 0x10, 0x10, 0x08, 0x08, 0x10, 0xe0, 0x00, 0x00, + 0x00, 0xf0, 0x3f, 0x72, 0xe2, 0x80, 0x00, 0x00, 0x60, 0xc0, 0x00, 0x0c, 0x1e, 0x9e, 0xcf, 0x07, + 0x03, 0x00, 0x00, 0xe2, 0x72, 0x38, 0x38, 0xf0, 0xe0, 0x80, 0x00, 0x00, 0x00, 0x01, 0x1e, 0xe0, + 0x3f, 0xc8, 0x68, 0x48, 0x8f, 0x87, 0x00, 0x20, 0x40, 0x00, 0x00, 0x00, 0x43, 0x23, 0x01, 0x00, + 0x00, 0x00, 0x00, 0x0f, 0x08, 0x88, 0x88, 0x48, 0x4f, 0x27, 0x10, 0x00, 0x00, 0x00, 0xc0, 0x3f, + 0x00, 0x00, 0x01, 0x02, 0x02, 0x06, 0x05, 0x09, 0x09, 0x09, 0x12, 0x12, 0x12, 0x12, 0x11, 0x11, + 0x11, 0x11, 0x11, 0x09, 0x09, 0x09, 0x08, 0x08, 0x08, 0x04, 0x04, 0x04, 0x02, 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, 0x80, 0x40, 0x20, 0x90, 0x88, 0x88, 0x04, 0x04, 0x04, 0x02, 0x02, 0x02, + 0x02, 0x02, 0x02, 0x82, 0x82, 0x84, 0x04, 0x04, 0x08, 0x08, 0x10, 0x20, 0x40, 0x80, 0x00, 0x00, + 0x00, 0x00, 0x00, 0xfe, 0x0d, 0x1e, 0xfe, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0xf8, 0x1c, 0x0e, 0x1e, 0xfe, 0xfc, 0xf8, 0x00, 0x00, 0x01, 0x06, 0xf8, + 0x00, 0x78, 0x87, 0x00, 0x31, 0x01, 0x01, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x03, 0x02, 0x82, 0x82, 0x43, 0x61, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x1f, + 0x00, 0x00, 0x00, 0x01, 0x01, 0x02, 0x04, 0x0c, 0x08, 0x14, 0x12, 0x12, 0x12, 0x22, 0x22, 0x22, + 0x21, 0x21, 0x21, 0x21, 0x11, 0x11, 0x10, 0x08, 0x08, 0x08, 0x04, 0x04, 0x02, 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 + } + }; + + if (get_current_wpm() > ANIM_BEGIN){ + if(timer_elapsed(anim_timer) > anim_frame_duration) { + anim_timer = timer_read(); + current_anim_frame = (current_anim_frame + 1) % ANIM_TOTAL_FRAMES; + oled_clear(); + oled_write_raw_P(frame[abs((ANIM_NUM_FRAMES-1)-current_anim_frame)], 512); + if (get_current_wpm() > ANIM_BEGIN){ + anim_frame_duration = MAX_DURATION/get_current_wpm(); + } + } + } else { + oled_write_raw_P(frame[0],512); + } +} + +oled_rotation_t oled_init_user(oled_rotation_t rotation) { + if (is_keyboard_master()) { + return OLED_ROTATION_270; + } + if (is_keyboard_master() != true){ + return OLED_ROTATION_270; + } + return rotation; +} + +void oled_task_user(void) { + if (is_keyboard_master()) { + print_status_narrow(); + sprintf(wpm_str, "%03d", get_current_wpm()); + oled_write(wpm_str, false); + } else { + render_anim(); + } +} +#endif + +#ifdef ENCODER_ENABLE +void encoder_update_user(uint8_t index, bool clockwise) { + if (index == 0) { + // master side thumb encoder + // Volume control + if (clockwise) { + tap_code(KC_VOLU); + } else { + tap_code(KC_VOLD); + } + } + else if (index == 1) { + // master side pinky encoder + // Page down / Page up + if (clockwise) { + tap_code(KC_PGDN); + } else { + tap_code(KC_PGUP); + } + } + else if (index == 2) { + // minion side thumb encoder + // Next track / Previous track + if (clockwise) { + tap_code(KC_MFFD); + } else { + tap_code(KC_MRWD); + } + } + else if (index == 3) { + // minion side pinky encoder + // Page end / Page home + if (clockwise) { + tap_code(KC_END); + } else { + tap_code(KC_HOME); + } + } +} +#endif diff --git a/keyboards/dumbo/keymaps/trip-trap/rules.mk b/keyboards/dumbo/keymaps/trip-trap/rules.mk new file mode 100644 index 000000000000..1eb566bbef0e --- /dev/null +++ b/keyboards/dumbo/keymaps/trip-trap/rules.mk @@ -0,0 +1,3 @@ +OLED_DRIVER_ENABLE = yes # Enables the use of OLED displays +ENCODER_ENABLE = yes # Enables the use of one or more encoders +WPM_ENABLE = yes diff --git a/keyboards/dumbo/readme.md b/keyboards/dumbo/readme.md new file mode 100644 index 000000000000..8ebd14477bcb --- /dev/null +++ b/keyboards/dumbo/readme.md @@ -0,0 +1,17 @@ +# Dumbo + +![Dumbo](https://i.imgur.com/EEqCZsgl.jpg) + +Inspired by the corne, kyria and chimera ergo 42, the dumbo is a split keyboard ready for a comfortable future (read: bluetooth and ergo). + +The Dumbo is a small split ergonomic keyboard with 44 keys (outer columns can be broken off to make it 38 keys), heavy columnar stagger, small and comfortable thumb cluster, support for two rotary encoders per half, support for OLEDs, and optional support for a JST-PH two-pin connector to attach a battery and an on/ofF switch to power Bluetooth Pro Micro replacements like the nice!nano. + +* Keyboard Maintainer: [Adam Naldal](https://github.com/adamnaldal) +* Hardware Supported: Pro Micro and pin-compatible replacements like the nice!nano +* Hardware Availability: NA + +Make example for this keyboard (after setting up your build environment): + + make dumbo: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/dumbo/rules.mk b/keyboards/dumbo/rules.mk new file mode 100644 index 000000000000..ffc7dc55d591 --- /dev/null +++ b/keyboards/dumbo/rules.mk @@ -0,0 +1,23 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +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 = no # Console for debug +COMMAND_ENABLE = no # Commands for debug and configuration +# 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 +BLUETOOTH_ENABLE = no # Enable Bluetooth +AUDIO_ENABLE = no # Audio output +SPLIT_KEYBOARD = yes +LTO_ENABLE = yes From c7b56bee96b17a84a3de372117394b62191e22ce Mon Sep 17 00:00:00 2001 From: Drashna Jaelre Date: Sat, 8 Aug 2020 16:41:10 -0700 Subject: [PATCH 549/930] [Bug] Fix Swap Hands bug introduced by OSH (#9968) Fixes the handling for the oneshot cleanup, so it only cleans up if it is active. It should not cleanup of SHO is off (eg using a normal oneshot key), nor if it's actively pressed or used. Previous behavior BROKE swap hand key. --- tmk_core/common/action_util.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tmk_core/common/action_util.c b/tmk_core/common/action_util.c index 371acfa610b5..fd0e4409f0a3 100644 --- a/tmk_core/common/action_util.c +++ b/tmk_core/common/action_util.c @@ -97,7 +97,7 @@ static uint16_t oneshot_layer_time = 0; inline bool has_oneshot_layer_timed_out() { return TIMER_DIFF_16(timer_read(), oneshot_layer_time) >= ONESHOT_TIMEOUT && !(get_oneshot_layer_state() & ONESHOT_TOGGLED); } # ifdef SWAP_HANDS_ENABLE static uint16_t oneshot_swaphands_time = 0; -inline bool has_oneshot_swaphands_timed_out() { return TIMER_DIFF_16(timer_read(), oneshot_swaphands_time) >= ONESHOT_TIMEOUT && !(swap_hands_oneshot >= SHO_PRESSED); } +inline bool has_oneshot_swaphands_timed_out() { return TIMER_DIFF_16(timer_read(), oneshot_swaphands_time) >= ONESHOT_TIMEOUT && (swap_hands_oneshot == SHO_ACTIVE); } # endif # endif From 215b71716a90f1a258645ad4f924609afa9cb886 Mon Sep 17 00:00:00 2001 From: Andrew Kannan Date: Sun, 9 Aug 2020 04:40:52 -0400 Subject: [PATCH 550/930] Cannonkeys via keymap fixes (#9977) --- .../cannonkeys/instant65/keymaps/via/keymap.c | 25 +++++++++---------- .../obliterated75/keymaps/via/keymap.c | 8 +++--- 2 files changed, 16 insertions(+), 17 deletions(-) diff --git a/keyboards/cannonkeys/instant65/keymaps/via/keymap.c b/keyboards/cannonkeys/instant65/keymaps/via/keymap.c index 8fb2eacee4e4..c2ad7f213612 100644 --- a/keyboards/cannonkeys/instant65/keymaps/via/keymap.c +++ b/keyboards/cannonkeys/instant65/keymaps/via/keymap.c @@ -28,38 +28,37 @@ enum layer_names { _FN3 }; - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_BASE] = 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_DEL, KC_INS, + 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_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_PGUP, - 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_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_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(_FN1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT ), [_FN1] = LAYOUT_default( - 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, RGB_TOG, - 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, RGB_MOD, - BL_BRTG, 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, - BL_INC, BL_DEC, BL_TOGG, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_GRV, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RESET, KC_TRNS, KC_TRNS + 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, RGB_TOG, + KC_TRNS, KC_TRNS, KC_UP, KC_TRNS, RGB_HUI, RGB_SAI, RGB_VAI, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RGB_MOD, + BL_BRTG, KC_LEFT, KC_DOWN, KC_RGHT, RGB_HUD, RGB_SAD, RGB_VAD, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + BL_INC, BL_TOGG, 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, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RESET, KC_TRNS, KC_TRNS ), [_FN2] = LAYOUT_default( - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 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( - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 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/obliterated75/keymaps/via/keymap.c b/keyboards/cannonkeys/obliterated75/keymaps/via/keymap.c index 68fe4f7885d8..b47657e423cf 100644 --- a/keyboards/cannonkeys/obliterated75/keymaps/via/keymap.c +++ b/keyboards/cannonkeys/obliterated75/keymaps/via/keymap.c @@ -32,7 +32,7 @@ enum layer_names { const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_BASE] = 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_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_MPLY, 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_TAB, KC_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_NUBS, KC_ENT, KC_PGUP, @@ -41,10 +41,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), [_FN1] = 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_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_TRNS, 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, RGB_TOG, - 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, RGB_MOD, - BL_BRTG, 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_UP, KC_TRNS, RGB_HUI, RGB_SAI, RGB_VAI, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RGB_MOD, + BL_BRTG, KC_LEFT, KC_DOWN, KC_RGHT, RGB_HUD, RGB_SAD, RGB_VAD, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, BL_INC, BL_DEC, BL_TOGG, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_GRV, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RESET, KC_TRNS, KC_TRNS ), From 98e1e18f6bcae6977ef56747243158eb94c6bd69 Mon Sep 17 00:00:00 2001 From: Woongki Sung Date: Sun, 9 Aug 2020 10:50:48 -0400 Subject: [PATCH 551/930] [Keyboard] Add Flatbread60, Vaneela, and VaneelaEx by nckiibs (#9817) * creOnic added * made requested changed by a moderator * device name changed * fixed flatbread60 files * add vaneela and vaneelaEX support * Update keyboards/nckiibs/vaneelaex/rules.mk * vaneela rgb disabled * include error fxied * vaneelaex Via keymap fixed * vaneelaex keymap fixed * all fixed except clang part * vaneelaex config.h error fixed, clang fixed * Update keyboards/nckiibs/flatbread60/keymaps/default/keymap.c * Update keyboards/nckiibs/flatbread60/keymaps/default/keymap.c done * Update keyboards/nckiibs/flatbread60/keymaps/default/keymap.c done * Update keyboards/nckiibs/flatbread60/keymaps/default/keymap.c done * Update keyboards/nckiibs/flatbread60/keymaps/default/keymap.c done * Update keyboards/nckiibs/flatbread60/keymaps/default/keymap.c * Update keyboards/nckiibs/flatbread60/keymaps/default/keymap.c * Update keyboards/nckiibs/flatbread60/keymaps/default/keymap.c * Update keyboards/nckiibs/flatbread60/keymaps/default/keymap.c * Update keyboards/nckiibs/flatbread60/keymaps/default/keymap.c * Update keyboards/nckiibs/flatbread60/rules.mk done * line endings were fixed as requested * Apply suggestions from code review Thank you! * requests applied and rebased * pics changed * flatbread via fixed * Apply suggestions from code review Thanks! * Apply suggestions from code review Done! * Apply suggestions from code review except VIA keymaps Questions regarding VIA keymaps are pending * Update keyboards/nckiibs/flatbread60/keymaps/default/keymap.c * flatbread via keymap changed * Apply suggestions from code review --- keyboards/nckiibs/flatbread60/config.h | 175 ++++++++++ keyboards/nckiibs/flatbread60/flatbread60.c | 18 + keyboards/nckiibs/flatbread60/flatbread60.h | 42 +++ keyboards/nckiibs/flatbread60/info.json | 253 ++++++++++++++ .../flatbread60/keymaps/default/keymap.c | 187 ++++++++++ .../flatbread60/keymaps/default/readme.md | 1 + .../nckiibs/flatbread60/keymaps/via/keymap.c | 114 ++++++ .../nckiibs/flatbread60/keymaps/via/rules.mk | 2 + keyboards/nckiibs/flatbread60/readme.md | 19 + keyboards/nckiibs/flatbread60/rules.mk | 22 ++ keyboards/nckiibs/vaneela/config.h | 163 +++++++++ keyboards/nckiibs/vaneela/info.json | 313 +++++++++++++++++ .../nckiibs/vaneela/keymaps/default/keymap.c | 120 +++++++ .../nckiibs/vaneela/keymaps/default/readme.md | 1 + .../nckiibs/vaneela/keymaps/via/keymap.c | 114 ++++++ .../nckiibs/vaneela/keymaps/via/rules.mk | 1 + keyboards/nckiibs/vaneela/readme.md | 19 + keyboards/nckiibs/vaneela/rules.mk | 22 ++ keyboards/nckiibs/vaneela/vaneela.c | 18 + keyboards/nckiibs/vaneela/vaneela.h | 42 +++ keyboards/nckiibs/vaneelaex/config.h | 162 +++++++++ keyboards/nckiibs/vaneelaex/info.json | 326 ++++++++++++++++++ .../vaneelaex/keymaps/default/keymap.c | 108 ++++++ .../vaneelaex/keymaps/default/readme.md | 2 + .../nckiibs/vaneelaex/keymaps/via/keymap.c | 103 ++++++ .../nckiibs/vaneelaex/keymaps/via/rules.mk | 1 + keyboards/nckiibs/vaneelaex/readme.md | 20 ++ keyboards/nckiibs/vaneelaex/rules.mk | 22 ++ keyboards/nckiibs/vaneelaex/vaneelaex.c | 18 + keyboards/nckiibs/vaneelaex/vaneelaex.h | 42 +++ 30 files changed, 2450 insertions(+) create mode 100644 keyboards/nckiibs/flatbread60/config.h create mode 100644 keyboards/nckiibs/flatbread60/flatbread60.c create mode 100644 keyboards/nckiibs/flatbread60/flatbread60.h create mode 100644 keyboards/nckiibs/flatbread60/info.json create mode 100644 keyboards/nckiibs/flatbread60/keymaps/default/keymap.c create mode 100644 keyboards/nckiibs/flatbread60/keymaps/default/readme.md create mode 100644 keyboards/nckiibs/flatbread60/keymaps/via/keymap.c create mode 100644 keyboards/nckiibs/flatbread60/keymaps/via/rules.mk create mode 100644 keyboards/nckiibs/flatbread60/readme.md create mode 100644 keyboards/nckiibs/flatbread60/rules.mk create mode 100644 keyboards/nckiibs/vaneela/config.h create mode 100644 keyboards/nckiibs/vaneela/info.json create mode 100644 keyboards/nckiibs/vaneela/keymaps/default/keymap.c create mode 100644 keyboards/nckiibs/vaneela/keymaps/default/readme.md create mode 100644 keyboards/nckiibs/vaneela/keymaps/via/keymap.c create mode 100644 keyboards/nckiibs/vaneela/keymaps/via/rules.mk create mode 100644 keyboards/nckiibs/vaneela/readme.md create mode 100644 keyboards/nckiibs/vaneela/rules.mk create mode 100644 keyboards/nckiibs/vaneela/vaneela.c create mode 100644 keyboards/nckiibs/vaneela/vaneela.h create mode 100644 keyboards/nckiibs/vaneelaex/config.h create mode 100644 keyboards/nckiibs/vaneelaex/info.json create mode 100644 keyboards/nckiibs/vaneelaex/keymaps/default/keymap.c create mode 100644 keyboards/nckiibs/vaneelaex/keymaps/default/readme.md create mode 100644 keyboards/nckiibs/vaneelaex/keymaps/via/keymap.c create mode 100644 keyboards/nckiibs/vaneelaex/keymaps/via/rules.mk create mode 100644 keyboards/nckiibs/vaneelaex/readme.md create mode 100644 keyboards/nckiibs/vaneelaex/rules.mk create mode 100644 keyboards/nckiibs/vaneelaex/vaneelaex.c create mode 100644 keyboards/nckiibs/vaneelaex/vaneelaex.h diff --git a/keyboards/nckiibs/flatbread60/config.h b/keyboards/nckiibs/flatbread60/config.h new file mode 100644 index 000000000000..14b54f43a6cf --- /dev/null +++ b/keyboards/nckiibs/flatbread60/config.h @@ -0,0 +1,175 @@ +/* +Copyright 2020 noclew + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License 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 0x9906 +#define PRODUCT_ID 0x0000 +#define DEVICE_VER 0x0001 +#define MANUFACTURER nckiibs +#define PRODUCT Flatbread60 + +/* key matrix size */ +#define MATRIX_ROWS 5 +#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 { F6, B1, B3, B2, B6 } +#define MATRIX_COL_PINS { F4, F5, B5, B4, E6, D7, C6, D4, D0, D1, D2, 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 F7 +#ifdef RGB_DI_PIN + #define RGBLED_NUM 19 + #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 + +/* 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 */ +#define NO_ACTION_MACRO +#define NO_ACTION_FUNCTION diff --git a/keyboards/nckiibs/flatbread60/flatbread60.c b/keyboards/nckiibs/flatbread60/flatbread60.c new file mode 100644 index 000000000000..0cbc265530ef --- /dev/null +++ b/keyboards/nckiibs/flatbread60/flatbread60.c @@ -0,0 +1,18 @@ +/* Copyright 2020 noclew + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#include "flatbread60.h" + diff --git a/keyboards/nckiibs/flatbread60/flatbread60.h b/keyboards/nckiibs/flatbread60/flatbread60.h new file mode 100644 index 000000000000..3fb8d7a6f18f --- /dev/null +++ b/keyboards/nckiibs/flatbread60/flatbread60.h @@ -0,0 +1,42 @@ +/* Copyright 2020 noclew + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License 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_5x12( \ + 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 \ +) \ +{ \ + { 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 } \ +} diff --git a/keyboards/nckiibs/flatbread60/info.json b/keyboards/nckiibs/flatbread60/info.json new file mode 100644 index 000000000000..ed621e8175b8 --- /dev/null +++ b/keyboards/nckiibs/flatbread60/info.json @@ -0,0 +1,253 @@ +{ + "keyboard_name": "flatbread60", + "url": "", + "maintainer": "noclew", + "width": 12, + "height": 5, + "layouts": { + "LAYOUT_ortho_5x12": { + "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 + }, + { + "x": 0, + "y": 4 + }, + { + "x": 1, + "y": 4 + }, + { + "x": 2, + "y": 4 + }, + { + "x": 3, + "y": 4 + }, + { + "x": 4, + "y": 4 + }, + { + "x": 5, + "y": 4 + }, + { + "x": 6, + "y": 4 + }, + { + "x": 7, + "y": 4 + }, + { + "x": 8, + "y": 4 + }, + { + "x": 9, + "y": 4 + }, + { + "x": 10, + "y": 4 + }, + { + "x": 11, + "y": 4 + } + ] + } + } +} diff --git a/keyboards/nckiibs/flatbread60/keymaps/default/keymap.c b/keyboards/nckiibs/flatbread60/keymaps/default/keymap.c new file mode 100644 index 000000000000..ed3ed26037dd --- /dev/null +++ b/keyboards/nckiibs/flatbread60/keymaps/default/keymap.c @@ -0,0 +1,187 @@ +/* Copyright 2020 noclew + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public 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 { _QWERTY, _COLEMAK, _DVORAK, _LOWER, _RAISE, _ADJUST }; + +enum layer_keycodes { + QWERTY = SAFE_RANGE, + COLEMAK, + DVORAK, +}; + +// Defines the keycodes used by our macros in process_record_user +#define LOWER MO(_LOWER) +#define RAISE MO(_RAISE) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +/* BASE + * ,-----------------------------------------------------------------------------------. + * | ` | 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 | Alt | GUI |Lower | Space|Space |Raise | Left | Down | Up |Right | + * `-----------------------------------------------------------------------------------' + * */ +[_QWERTY] = LAYOUT_ortho_5x12( + 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, KC_ENT, + KC_NO, 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 | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | + * `-----------------------------------------------------------------------------------' + */ + +[_COLEMAK] = LAYOUT_ortho_5x12( + 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, + KC_NO, 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 | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | + * `-----------------------------------------------------------------------------------' + */ +[_DVORAK] = LAYOUT_ortho_5x12( + 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, + KC_NO, 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_ortho_5x12( + 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 + * ,-----------------------------------------------------------------------------------. + * | ` | 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 / | PGUP| PGDN| | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | Next | Vol- | Vol+ | Play | + * `-----------------------------------------------------------------------------------' + */ +[_RAISE] = LAYOUT_ortho_5x12( + 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 +), + +/* FN (Lower + Raise) + * ,-----------------------------------------------------------------------------------. + * | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | Reset| Debug| | | | | | | | | Del | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | | | | |AGNorm|AGswap|Qwerty|Colemk|Dvorak| | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | rgb |rgb M | Hue |brt + |brt - |sat + | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | + * `-----------------------------------------------------------------------------------' + */ +[_ADJUST] = LAYOUT_ortho_5x12( + 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, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL, + _______, _______, _______, _______, _______, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, _______, _______, + _______, RGB_TOG, RGB_MOD, RGB_HUI, RGB_VAI, RGB_VAD, RGB_SAI, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ +) + +}; + +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) { + print("mode just switched to qwerty and this is a huge string\n"); + 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/nckiibs/flatbread60/keymaps/default/readme.md b/keyboards/nckiibs/flatbread60/keymaps/default/readme.md new file mode 100644 index 000000000000..571cfbcd6828 --- /dev/null +++ b/keyboards/nckiibs/flatbread60/keymaps/default/readme.md @@ -0,0 +1 @@ +# The default keymap for flatbread60 diff --git a/keyboards/nckiibs/flatbread60/keymaps/via/keymap.c b/keyboards/nckiibs/flatbread60/keymaps/via/keymap.c new file mode 100644 index 000000000000..cfba3e11c0b0 --- /dev/null +++ b/keyboards/nckiibs/flatbread60/keymaps/via/keymap.c @@ -0,0 +1,114 @@ +/* Copyright 2020 noclew + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public 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 { _QWERTY, _LOWER, _RAISE, _ADJUST }; + +enum layer_keycodes { + QWERTY = SAFE_RANGE, + COLEMAK, + DVORAK, +}; + +#define LOWER MO(_LOWER) +#define RAISE MO(_RAISE) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +/* BASE + * ,-----------------------------------------------------------------------------------. + * | ` | 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 | Alt | GUI |Lower | Space|Space |Raise | Left | Down | Up |Right | + * `-----------------------------------------------------------------------------------' + * */ +[_QWERTY] = LAYOUT_ortho_5x12( + 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, KC_ENT, + KC_NO, KC_LCTL, KC_LALT, KC_LGUI, FN_MO13, KC_SPC, KC_SPC, FN_MO23, 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_ortho_5x12( + 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 + * ,-----------------------------------------------------------------------------------. + * | ` | 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 / | PGUP| PGDN| | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | Next | Vol- | Vol+ | Play | + * `-----------------------------------------------------------------------------------' + */ +[_RAISE] = LAYOUT_ortho_5x12( + 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 +), + +/* FN (Lower + Raise) + * ,-----------------------------------------------------------------------------------. + * | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | Reset| Debug| | | | | | | | | Del | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | | | | |AGnorm|AGswap| | | | | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | rgb |rgb M | Hue |brt + |brt - |sat + | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | + * `-----------------------------------------------------------------------------------' + */ +[_ADJUST] = LAYOUT_ortho_5x12( + 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, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL, + _______, _______, _______, _______, _______, AG_NORM, AG_SWAP, _______, _______, _______, _______, _______, + _______, RGB_TOG, RGB_MOD, RGB_HUI, RGB_VAI, RGB_VAD, RGB_SAI, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ +) + +}; diff --git a/keyboards/nckiibs/flatbread60/keymaps/via/rules.mk b/keyboards/nckiibs/flatbread60/keymaps/via/rules.mk new file mode 100644 index 000000000000..bde15290ba57 --- /dev/null +++ b/keyboards/nckiibs/flatbread60/keymaps/via/rules.mk @@ -0,0 +1,2 @@ +VIA_ENABLE = yes +RGBLIGHT_ENABLE = no diff --git a/keyboards/nckiibs/flatbread60/readme.md b/keyboards/nckiibs/flatbread60/readme.md new file mode 100644 index 000000000000..fa932143b45a --- /dev/null +++ b/keyboards/nckiibs/flatbread60/readme.md @@ -0,0 +1,19 @@ +# flatbread60 + +![flatbread60](https://i.imgur.com/kIPP0JKl.jpg) + +This is a custom PCB made by a hobbiest, and it has an ortholinear 60 key layout. Flatbread60 supports Pro Micro and its wireless variants, such as Blue Micro. A battery switch slot and extra pinout is on the board. + +* Keyboard Maintainer: [noclew](https://github.com/noclew) +* Hardware Supported: flatbread60 PCB +* Hardware Availability: Not commercially available, but the board fabricaion file will be uploaded in the near future. + +Make example for this keyboard (after setting up your build environment): + + make nckiibs/flatbread60:default + +Flashing example for this keyboard: + + make nckiibs/flatbread60: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). diff --git a/keyboards/nckiibs/flatbread60/rules.mk b/keyboards/nckiibs/flatbread60/rules.mk new file mode 100644 index 000000000000..4012c6ac3e4b --- /dev/null +++ b/keyboards/nckiibs/flatbread60/rules.mk @@ -0,0 +1,22 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +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 = no # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow +BLUETOOTH_ENABLE = no # Enable Bluetooth +AUDIO_ENABLE = no # Audio output diff --git a/keyboards/nckiibs/vaneela/config.h b/keyboards/nckiibs/vaneela/config.h new file mode 100644 index 000000000000..b8f031d7c8f2 --- /dev/null +++ b/keyboards/nckiibs/vaneela/config.h @@ -0,0 +1,163 @@ +/* +Copyright 2020 noclew + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License 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 0x9906 +#define PRODUCT_ID 0x0001 +#define DEVICE_VER 0x0001 +#define MANUFACTURER noclew +#define PRODUCT Vaneela + +/* key matrix size */ +#define MATRIX_ROWS 5 +#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 { F6, F7, B3, B2, B6 } +#define MATRIX_COL_PINS { F4, F5, B5, B4, E6, D7, C6, D4, D0, D1, D2, D3 } +#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. + * + */ + +/* 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 */ +#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/nckiibs/vaneela/info.json b/keyboards/nckiibs/vaneela/info.json new file mode 100644 index 000000000000..9faf7ceffb67 --- /dev/null +++ b/keyboards/nckiibs/vaneela/info.json @@ -0,0 +1,313 @@ +{ + "keyboard_name": "Vaneela", + "url": "http://www.keyboard-layout-editor.com/#/gists/be89ff3a761a44280296994d459bd0a9", + "maintainer": "qmk", + "width": 12.5, + "height": 5, + "layouts": { + "LAYOUT": { + "layout": [ + { + "label": "`", + "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, + "w": 1.5 + }, + { + "label": "TAB", + "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": "Y", + "x": 6, + "y": 1 + }, + { + "label": "U", + "x": 7, + "y": 1 + }, + { + "label": "I", + "x": 8, + "y": 1 + }, + { + "label": "O", + "x": 9, + "y": 1 + }, + { + "label": "P", + "x": 10, + "y": 1 + }, + { + "label": "BS", + "x": 11, + "y": 1, + "w": 1.5 + }, + { + "label": "ESC", + "x": 0, + "y": 2, + "w": 1.25 + }, + { + "label": "A", + "x": 1.25, + "y": 2 + }, + { + "label": "S", + "x": 2.25, + "y": 2 + }, + { + "label": "D", + "x": 3.25, + "y": 2 + }, + { + "label": "F", + "x": 4.25, + "y": 2 + }, + { + "label": "G", + "x": 5.25, + "y": 2 + }, + { + "label": "H", + "x": 6.25, + "y": 2 + }, + { + "label": "J", + "x": 7.25, + "y": 2 + }, + { + "label": "K", + "x": 8.25, + "y": 2 + }, + { + "label": "L", + "x": 9.25, + "y": 2 + }, + { + "label": ";", + "x": 10.25, + "y": 2 + }, + { + "label": "ENTER", + "x": 11.25, + "y": 2, + "w": 1.25 + }, + { + "label": "SHIFT", + "x": 0, + "y": 3, + "w": 1.5 + }, + { + "label": "Z", + "x": 1.5, + "y": 3 + }, + { + "label": "X", + "x": 2.5, + "y": 3 + }, + { + "label": "C", + "x": 3.5, + "y": 3 + }, + { + "label": "V", + "x": 4.5, + "y": 3 + }, + { + "label": "B", + "x": 5.5, + "y": 3 + }, + { + "label": "N", + "x": 6.5, + "y": 3 + }, + { + "label": "M", + "x": 7.5, + "y": 3 + }, + { + "label": ",", + "x": 8.5, + "y": 3 + }, + { + "label": ".", + "x": 9.5, + "y": 3 + }, + { + "label": "/", + "x": 10.5, + "y": 3 + }, + { + "label": "SHIFT", + "x": 11.5, + "y": 3 + }, + { + "label": "CTRL", + "x": 0, + "y": 4 + }, + { + "label": "GUI", + "x": 1, + "y": 4 + }, + { + "label": "ALT", + "x": 2, + "y": 4 + }, + { + "x": 3, + "y": 4 + }, + { + "label": "LOWER", + "x": 4, + "y": 4, + "w": 1.25 + }, + { + "x": 5.25, + "y": 4 + }, + { + "x": 6.25, + "y": 4 + }, + { + "label": "RAISE", + "x": 7.25, + "y": 4, + "w": 1.25 + }, + { + "x": 8.5, + "y": 4 + }, + { + "x": 9.5, + "y": 4 + }, + { + "x": 10.5, + "y": 4 + }, + { + "x": 11.5, + "y": 4 + } + ] + } + } +} diff --git a/keyboards/nckiibs/vaneela/keymaps/default/keymap.c b/keyboards/nckiibs/vaneela/keymaps/default/keymap.c new file mode 100644 index 000000000000..ce0cd88e7e48 --- /dev/null +++ b/keyboards/nckiibs/vaneela/keymaps/default/keymap.c @@ -0,0 +1,120 @@ +/* Copyright 2020 noclew + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public 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, + _LOWER, + _RAISE, + _FN +}; + +// Defines the keycodes used by our macros in process_record_user +#define LOWER MO(_LOWER) +#define RAISE MO(_RAISE) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +/* BASE + * ,-----------------------------------------------------------------------------------. + * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | del | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Tab | Q | W | E | R | T | Y | U | I | O | P | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Esc | A | S | D | F | G | H | J | K | L | ; |Enter | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | Shift| Z | X | C | V | B | N | M | , | . | / | " | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Ctrl | Ctrl | Alt | GUI |Lower | Space|Space |Raise | Left | Down | Up |Right | + * `-----------------------------------------------------------------------------------' + * */ + [_BASE] = LAYOUT_ortho_5x12( + 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_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_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_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_ortho_5x12( + 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 + * ,-----------------------------------------------------------------------------------. + * | ` | 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 / | PGUP| PGDN| | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | Next | Vol- | Vol+ | Play | + * `-----------------------------------------------------------------------------------' + */ +[_RAISE] = LAYOUT_ortho_5x12( + 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_BSPC, KC_9, KC_0, KC_DEL, + KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, _______, 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 +), + +/* FN (Lower + Raise) + * ,-----------------------------------------------------------------------------------. + * | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | Reset| Debug| | | | | | | | | Del | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | | |Aud on|AudOff|AGnorm|AGswap|Qwerty|Colemk|Dvorak| | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | |Voice-|Voice+|Mus on|MusOff|MidiOn|MidOff| | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | + * `-----------------------------------------------------------------------------------' + */ +[_FN] = LAYOUT_ortho_5x12( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, RESET, DEBUG, _______, _______, _______, _______, _______, _______,TERM_ON, TERM_OFF, KC_DEL, + _______, _______, _______, _______, _______, AG_NORM, AG_SWAP, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ +) + +}; + +layer_state_t layer_state_set_user(layer_state_t state) { + state = update_tri_layer_state(state, _RAISE, _LOWER, _FN); + return state; +} diff --git a/keyboards/nckiibs/vaneela/keymaps/default/readme.md b/keyboards/nckiibs/vaneela/keymaps/default/readme.md new file mode 100644 index 000000000000..597cee4faf5b --- /dev/null +++ b/keyboards/nckiibs/vaneela/keymaps/default/readme.md @@ -0,0 +1 @@ +# The default keymap for vaneela diff --git a/keyboards/nckiibs/vaneela/keymaps/via/keymap.c b/keyboards/nckiibs/vaneela/keymaps/via/keymap.c new file mode 100644 index 000000000000..1dfad3f8eba2 --- /dev/null +++ b/keyboards/nckiibs/vaneela/keymaps/via/keymap.c @@ -0,0 +1,114 @@ +/* Copyright 2020 noclew + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public 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, + _LOWER, + _RAISE, + _FN +}; +// Defines the keycodes used by our macros in process_record_user +#define LOWER MO(_LOWER) +#define RAISE MO(_RAISE) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +/* BASE + * ,-----------------------------------------------------------------------------------. + * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | del | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Tab | Q | W | E | R | T | Y | U | I | O | P | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Esc | A | S | D | F | G | H | J | K | L | ; |Enter | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | Shift| Z | X | C | V | B | N | M | , | . | / | " | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Ctrl | Ctrl | Alt | GUI |Lower | Space|Space |Raise | Left | Down | Up |Right | + * `-----------------------------------------------------------------------------------' + * */ + [_BASE] = LAYOUT_ortho_5x12( + 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_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_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_LCTL, KC_LALT, KC_LGUI, FN_MO13, KC_SPC, KC_SPC, FN_MO23, 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_ortho_5x12( + 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 + * ,-----------------------------------------------------------------------------------. + * | ` | 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 / | PGUP| PGDN| | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | Next | Vol- | Vol+ | Play | + * `-----------------------------------------------------------------------------------' + */ +[_RAISE] = LAYOUT_ortho_5x12( + 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_BSPC, KC_9, KC_0, KC_DEL, + KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, _______, 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 +), + +/* FN (Lower + Raise) + * ,-----------------------------------------------------------------------------------. + * | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | Reset| Debug| | | | | | | | | Del | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | | |Aud on|AudOff|AGnorm|AGswap|Qwerty|Colemk|Dvorak| | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | |Voice-|Voice+|Mus on|MusOff|MidiOn|MidOff| | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | + * `-----------------------------------------------------------------------------------' + */ +[_FN] = LAYOUT_ortho_5x12( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, RESET, DEBUG, _______, _______, _______, _______, _______, _______,TERM_ON, TERM_OFF, KC_DEL, + _______, _______, _______, _______, _______, AG_NORM, AG_SWAP, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ +) + +}; diff --git a/keyboards/nckiibs/vaneela/keymaps/via/rules.mk b/keyboards/nckiibs/vaneela/keymaps/via/rules.mk new file mode 100644 index 000000000000..1e5b99807cb7 --- /dev/null +++ b/keyboards/nckiibs/vaneela/keymaps/via/rules.mk @@ -0,0 +1 @@ +VIA_ENABLE = yes diff --git a/keyboards/nckiibs/vaneela/readme.md b/keyboards/nckiibs/vaneela/readme.md new file mode 100644 index 000000000000..65a7d1772b47 --- /dev/null +++ b/keyboards/nckiibs/vaneela/readme.md @@ -0,0 +1,19 @@ +# Vaneela + +![vaneela](https://i.imgur.com/wp64G8vl.jpg) + +This is a semi-staggered 5x12 keyboard made by a hobbist. Vaneela runs on Pro Micro and its compatible variants, such as elite-C. In matrix wise, it has the same key layout as other 5 x 12 ortholinear boards. + +* Keyboard Maintainer: [noclew](https://github.com/noclew) +* Hardware Supported: Vaneela +* Hardware Availability: Not commercially available, but the board fabricaion file will be uploaded in the near future. + +Make example for this keyboard (after setting up your build environment): + + make nckiibs/vaneela:default + +Flashing example for this keyboard: + + make nckiibs/vaneela: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). diff --git a/keyboards/nckiibs/vaneela/rules.mk b/keyboards/nckiibs/vaneela/rules.mk new file mode 100644 index 000000000000..fd76a52478f7 --- /dev/null +++ b/keyboards/nckiibs/vaneela/rules.mk @@ -0,0 +1,22 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +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 = no # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +BLUETOOTH_ENABLE = no # Enable Bluetooth +AUDIO_ENABLE = no # Audio output diff --git a/keyboards/nckiibs/vaneela/vaneela.c b/keyboards/nckiibs/vaneela/vaneela.c new file mode 100644 index 000000000000..ca5d513a0025 --- /dev/null +++ b/keyboards/nckiibs/vaneela/vaneela.c @@ -0,0 +1,18 @@ +/* Copyright 2020 noclew + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#include "vaneela.h" + diff --git a/keyboards/nckiibs/vaneela/vaneela.h b/keyboards/nckiibs/vaneela/vaneela.h new file mode 100644 index 000000000000..3fb8d7a6f18f --- /dev/null +++ b/keyboards/nckiibs/vaneela/vaneela.h @@ -0,0 +1,42 @@ +/* Copyright 2020 noclew + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License 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_5x12( \ + 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 \ +) \ +{ \ + { 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 } \ +} diff --git a/keyboards/nckiibs/vaneelaex/config.h b/keyboards/nckiibs/vaneelaex/config.h new file mode 100644 index 000000000000..46ced5bfbf92 --- /dev/null +++ b/keyboards/nckiibs/vaneelaex/config.h @@ -0,0 +1,162 @@ +/* +Copyright 2020 noclew + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License 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 0x9906 +#define PRODUCT_ID 0x0002 +#define DEVICE_VER 0x0001 +#define MANUFACTURER nckiibs +#define PRODUCT VaneelaEx + +/* key matrix size */ +#define MATRIX_ROWS 6 +#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, B2, B6 } +#define MATRIX_COL_PINS { F4, F5, F6, F7, B1, B3, B5, B4, E6, D7, C6, D4 } +//#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. + * + */ + +/* 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 */ +#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/nckiibs/vaneelaex/info.json b/keyboards/nckiibs/vaneelaex/info.json new file mode 100644 index 000000000000..aa5b81f4d688 --- /dev/null +++ b/keyboards/nckiibs/vaneelaex/info.json @@ -0,0 +1,326 @@ +{ + "keyboard_name": "VaneelaEx", + "url": "http://www.keyboard-layout-editor.com/#/gists/f605c1a2cb2fea256161964740bd2a52", + "maintainer": "qmk", + "width": 16.5, + "height": 4, + "layouts": { + "LAYOUT_ss_6x12": { + "layout": [ + { + "x": 0, + "y": 0 + }, + { + "label": "7", + "x": 1, + "y": 0 + }, + { + "label": "8", + "x": 2, + "y": 0 + }, + { + "label": "9", + "x": 3, + "y": 0 + }, + { + "label": "TAB", + "x": 4, + "y": 0 + }, + { + "label": "Q", + "x": 5, + "y": 0 + }, + { + "label": "W", + "x": 6, + "y": 0 + }, + { + "label": "E", + "x": 7, + "y": 0 + }, + { + "label": "R", + "x": 8, + "y": 0 + }, + { + "label": "T", + "x": 9, + "y": 0 + }, + { + "label": "Y", + "x": 10, + "y": 0 + }, + { + "label": "U", + "x": 11, + "y": 0 + }, + { + "label": "I", + "x": 12, + "y": 0 + }, + { + "label": "O", + "x": 13, + "y": 0 + }, + { + "label": "P", + "x": 14, + "y": 0 + }, + { + "label": "BS", + "x": 15, + "y": 0, + "w": 1.5 + }, + { + "x": 0, + "y": 1 + }, + { + "label": "4", + "x": 1, + "y": 1 + }, + { + "label": "5", + "x": 2, + "y": 1 + }, + { + "label": "6", + "x": 3, + "y": 1 + }, + { + "label": "ESC", + "x": 4, + "y": 1, + "w": 1.25 + }, + { + "label": "A", + "x": 5.25, + "y": 1 + }, + { + "label": "S", + "x": 6.25, + "y": 1 + }, + { + "label": "D", + "x": 7.25, + "y": 1 + }, + { + "label": "F", + "x": 8.25, + "y": 1 + }, + { + "label": "G", + "x": 9.25, + "y": 1 + }, + { + "label": "H", + "x": 10.25, + "y": 1 + }, + { + "label": "J", + "x": 11.25, + "y": 1 + }, + { + "label": "K", + "x": 12.25, + "y": 1 + }, + { + "label": "L", + "x": 13.25, + "y": 1 + }, + { + "label": ";", + "x": 14.25, + "y": 1 + }, + { + "label": "ENTER", + "x": 15.25, + "y": 1, + "w": 1.25 + }, + { + "x": 0, + "y": 2 + }, + { + "label": "1", + "x": 1, + "y": 2 + }, + { + "label": "2", + "x": 2, + "y": 2 + }, + { + "label": "3", + "x": 3, + "y": 2 + }, + { + "label": "SHIFT", + "x": 4, + "y": 2, + "w": 1.5 + }, + { + "label": "Z", + "x": 5.5, + "y": 2 + }, + { + "label": "X", + "x": 6.5, + "y": 2 + }, + { + "label": "C", + "x": 7.5, + "y": 2 + }, + { + "label": "V", + "x": 8.5, + "y": 2 + }, + { + "label": "B", + "x": 9.5, + "y": 2 + }, + { + "label": "N", + "x": 10.5, + "y": 2 + }, + { + "label": "M", + "x": 11.5, + "y": 2 + }, + { + "label": ",", + "x": 12.5, + "y": 2 + }, + { + "label": ".", + "x": 13.5, + "y": 2 + }, + { + "label": "/", + "x": 14.5, + "y": 2 + }, + { + "label": "SHIFT", + "x": 15.5, + "y": 2 + }, + { + "x": 0, + "y": 3 + }, + { + "x": 1, + "y": 3 + }, + { + "x": 2, + "y": 3 + }, + { + "label": "0", + "x": 3, + "y": 3 + }, + { + "label": "CTRL", + "x": 4, + "y": 3 + }, + { + "label": "GUI", + "x": 5, + "y": 3 + }, + { + "label": "ALT", + "x": 6, + "y": 3 + }, + { + "x": 7, + "y": 3 + }, + { + "label": "LOWER", + "x": 8, + "y": 3, + "w": 1.25 + }, + { + "x": 9.25, + "y": 3 + }, + { + "x": 10.25, + "y": 3 + }, + { + "label": "RAISE", + "x": 11.25, + "y": 3, + "w": 1.25 + }, + { + "x": 12.5, + "y": 3 + }, + { + "x": 13.5, + "y": 3 + }, + { + "x": 14.5, + "y": 3 + }, + { + "x": 15.5, + "y": 3 + } + ] + } + } +} diff --git a/keyboards/nckiibs/vaneelaex/keymaps/default/keymap.c b/keyboards/nckiibs/vaneelaex/keymaps/default/keymap.c new file mode 100644 index 000000000000..6e98c9b8ac6e --- /dev/null +++ b/keyboards/nckiibs/vaneelaex/keymaps/default/keymap.c @@ -0,0 +1,108 @@ +/* Copyright 2020 noclew + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public 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, + _LOWER, + _RAISE, + _FN +}; + +// Defines the keycodes used by our macros in process_record_user +#define LOWER MO(_LOWER) +#define RAISE MO(_RAISE) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +/* BASE + * ,---------------------------------------------------------------------------------------------------------------. + * | = | 7 | 8 | 9 | Tab | Q | W | E | R | T | Y | U | I | O | P | Bksp | + * |------+------+------+------+------+------+------+------+------+-------------+------+------+------+------+------| + * | - | 4 | 5 | 6 | Esc | A | S | D | F | G | H | J | K | L | ; |Enter | + * |------+------+------+------+------+------+------+------+------+------|------+------+------+------+------+------| + * | + | 1 | 2 | 3 | Shift| Z | X | C | V | B | N | M | , | . | / | " | + * |------+------+------+------+------+------+------+------+------+------+------+------+------+------+------+------| + * | / | * | . | 0 | Brite| Ctrl | Alt | GUI |Lower | Space|Space |Raise | Left | Down | Up |Right | + * '---------------------------------------------------------------------------------------------------------------' + * */ +[_BASE] = LAYOUT_ss_6x12( +KC_KP_EQUAL, KC_7, KC_8, KC_9, 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_KP_MINUS, KC_4, KC_5, KC_6, KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_ENT, +KC_KP_PLUS, KC_1, KC_2, KC_3, 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_KP_SLASH, KC_KP_ASTERISK, KC_KP_DOT, KC_0, KC_LCTL, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT +), + + /* Lower + * ,---------------------------------------------------------------------------------------------------------------. + * | = | 7 | 8 | 9 | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Del | + * |------+------+------+------+------+------+------+------+------+-------------+------+------+------+------+------| + * | - | 4 | 5 | 6 | Del | F1 | F2 | F3 | F4 | F5 | F6 | _ | + | { | } | | | + * |------+------+------+------+------+------+------+------+------+------|------+------+------+------+------+------| + * | + | 1 | 2 | 3 | | F7 | F8 | F9 | F10 | F11 | F12 |ISO ~ |ISO | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------+------+------+------+------| + * | / | * | . | 0 | | | | | | | | Next | Vol- | Vol+ | Play | + * `---------------------------------------------------------------------------------------------------------------' + */ +[_LOWER] = LAYOUT_ss_6x12( +KC_KP_EQUAL, KC_7, KC_8, KC_TILDE, KC_9, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_DEL, +KC_KP_MINUS, KC_4, KC_5, KC_DEL, KC_6, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, +KC_KP_PLUS, KC_1, KC_2, _______, KC_3, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12,S(KC_NUHS),S(KC_NUBS),KC_HOME, KC_END, _______, +KC_KP_SLASH, KC_KP_ASTERISK, KC_KP_DOT, _______, KC_0, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY +), + +/* Raise + * ,---------------------------------------------------------------------------------------------------------------. + * | = | 7 | 8 | 9 | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Del | + * |------+------+------+------+------+------+------+------+------+-------------+------+------+------+------+------| + * | - | 4 | 5 | 6 | Del | F1 | F2 | F3 | F4 | F5 | F6 | - | = | [ | ] | \ | + * |------+------+------+------+------+------+------+------+------+------|------+------+------+------+------+------| + * | + | 1 | 2 | 3 | | F7 | F8 | F9 | F10 | F11 | F12 |ISO # |ISO / | PGUP| PGDN| | + * |------+------+------+------+------+------+------+------+------+------+------+------+------+------+------+------| + * | / | * | . | 0 | | | | | | | | Next | Vol- | Vol+ | Play | + * `---------------------------------------------------------------------------------------------------------------' + */ +[_RAISE] = LAYOUT_ss_6x12( + KC_KP_EQUAL, KC_7, KC_8, KC_9, 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_KP_MINUS, KC_4, KC_5, KC_6, 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_KP_PLUS, KC_1, KC_2, KC_3, _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_NUHS, KC_NUBS, KC_PGUP, KC_PGDN, _______, + KC_KP_SLASH, KC_KP_ASTERISK, KC_KP_DOT, KC_0, _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY +), + +/* FN (Lower + Raise) + * ,---------------------------------------------------------------------------------------------------------------. + * | = | 7 | 8 | 9 | Reset| | Debug| | | | | | | | | Del | + * |------+------+------+------+------+------+------+------+------+-------------+------+------+------+------+------| + * | - | 4 | 5 | 6 | | | |Aud on|AudOff|AGnorm|AGswap|Qwerty|Colemk|Dvorak| | | + * |------+------+------+------+------+------+------+------+------+------|------+------+------+------+------+------| + * | + | 1 | 2 | 3 | |Voice-|Voice+|Mus on|MusOff|MidiOn|MidOff| | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------+------+------+------+------| + * | / | * | . | 0 | | | | | | | | | | | | + * `---------------------------------------------------------------------------------------------------------------' + */ +[_FN] = LAYOUT_ss_6x12( +KC_KP_EQUAL, KC_7, KC_8, KC_9, RESET , RGB_TOG, RGB_MOD, RGB_HUI, RGB_VAI, RGB_VAD, RGB_SAI, RGB_SAD, _______, _______, _______, KC_DEL, +KC_KP_MINUS, KC_4, KC_5, KC_6, _______, _______, _______, _______, _______, AG_NORM, AG_SWAP, _______, _______, _______, _______, _______, +KC_KP_PLUS, KC_1, KC_2, KC_3, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, +KC_KP_SLASH, KC_KP_ASTERISK, KC_KP_DOT, KC_0, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ +) + +}; + +layer_state_t layer_state_set_user(layer_state_t state) { + state = update_tri_layer_state(state, _RAISE, _LOWER, _FN); + return state; +} diff --git a/keyboards/nckiibs/vaneelaex/keymaps/default/readme.md b/keyboards/nckiibs/vaneelaex/keymaps/default/readme.md new file mode 100644 index 000000000000..89c3c8c2aed9 --- /dev/null +++ b/keyboards/nckiibs/vaneelaex/keymaps/default/readme.md @@ -0,0 +1,2 @@ +# The default keymap for vaneela Ex + diff --git a/keyboards/nckiibs/vaneelaex/keymaps/via/keymap.c b/keyboards/nckiibs/vaneelaex/keymaps/via/keymap.c new file mode 100644 index 000000000000..e23cf96a276a --- /dev/null +++ b/keyboards/nckiibs/vaneelaex/keymaps/via/keymap.c @@ -0,0 +1,103 @@ +/* Copyright 2020 noclew + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public 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, + _LOWER, + _RAISE, + _FN +}; +// Defines the keycodes used by our macros in process_record_user + +// Defines the keycodes used by our macros in process_record_user +#define LOWER MO(_LOWER) +#define RAISE MO(_RAISE) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +/* BASE + * ,---------------------------------------------------------------------------------------------------------------. + * | = | 7 | 8 | 9 | Tab | Q | W | E | R | T | Y | U | I | O | P | Bksp | + * |------+------+------+------+------+------+------+------+------+-------------+------+------+------+------+------| + * | - | 4 | 5 | 6 | Esc | A | S | D | F | G | H | J | K | L | ; |Enter | + * |------+------+------+------+------+------+------+------+------+------|------+------+------+------+------+------| + * | + | 1 | 2 | 3 | Shift| Z | X | C | V | B | N | M | , | . | / | " | + * |------+------+------+------+------+------+------+------+------+------+------+------+------+------+------+------| + * | / | * | . | 0 | Brite| Ctrl | Alt | GUI |Lower | Space|Space |Raise | Left | Down | Up |Right | + * '---------------------------------------------------------------------------------------------------------------' + * */ +[_BASE] = LAYOUT_ss_6x12( +KC_KP_EQUAL, KC_7, KC_8, KC_9, 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_KP_MINUS, KC_4, KC_5, KC_6, KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_ENT, +KC_KP_PLUS, KC_1, KC_2, KC_3, 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_KP_SLASH, KC_KP_ASTERISK, KC_KP_DOT, KC_0, KC_LCTL, KC_LCTL, KC_LALT, KC_LGUI, FN_MO13, KC_SPC, KC_SPC, FN_MO23, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT +), + + /* Lower + * ,---------------------------------------------------------------------------------------------------------------. + * | = | 7 | 8 | 9 | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Del | + * |------+------+------+------+------+------+------+------+------+-------------+------+------+------+------+------| + * | - | 4 | 5 | 6 | Del | F1 | F2 | F3 | F4 | F5 | F6 | _ | + | { | } | | | + * |------+------+------+------+------+------+------+------+------+------|------+------+------+------+------+------| + * | + | 1 | 2 | 3 | | F7 | F8 | F9 | F10 | F11 | F12 |ISO ~ |ISO | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------+------+------+------+------| + * | / | * | . | 0 | | | | | | | | Next | Vol- | Vol+ | Play | + * `---------------------------------------------------------------------------------------------------------------' + */ +[_LOWER] = LAYOUT_ss_6x12( +KC_KP_EQUAL, KC_7, KC_8, KC_TILDE, KC_9, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_DEL, +KC_KP_MINUS, KC_4, KC_5, KC_DEL, KC_6, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, +KC_KP_PLUS, KC_1, KC_2, _______, KC_3, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12,S(KC_NUHS),S(KC_NUBS),KC_HOME, KC_END, _______, +KC_KP_SLASH, KC_KP_ASTERISK, KC_KP_DOT, _______, KC_0, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY +), + +/* Raise + * ,---------------------------------------------------------------------------------------------------------------. + * | = | 7 | 8 | 9 | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Del | + * |------+------+------+------+------+------+------+------+------+-------------+------+------+------+------+------| + * | - | 4 | 5 | 6 | Del | F1 | F2 | F3 | F4 | F5 | F6 | - | = | [ | ] | \ | + * |------+------+------+------+------+------+------+------+------+------|------+------+------+------+------+------| + * | + | 1 | 2 | 3 | | F7 | F8 | F9 | F10 | F11 | F12 |ISO # |ISO / | PGUP| PGDN| | + * |------+------+------+------+------+------+------+------+------+------+------+------+------+------+------+------| + * | / | * | . | 0 | | | | | | | | Next | Vol- | Vol+ | Play | + * `---------------------------------------------------------------------------------------------------------------' + */ +[_RAISE] = LAYOUT_ss_6x12( + KC_KP_EQUAL, KC_7, KC_8, KC_9, 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_KP_MINUS, KC_4, KC_5, KC_6, 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_KP_PLUS, KC_1, KC_2, KC_3, _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_NUHS, KC_NUBS, KC_PGUP, KC_PGDN, _______, + KC_KP_SLASH, KC_KP_ASTERISK, KC_KP_DOT, KC_0, _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY +), + +/* FN (Lower + Raise) + * ,---------------------------------------------------------------------------------------------------------------. + * | = | 7 | 8 | 9 | Reset| | Debug| | | | | | | | | Del | + * |------+------+------+------+------+------+------+------+------+-------------+------+------+------+------+------| + * | - | 4 | 5 | 6 | | | |Aud on|AudOff|AGnorm|AGswap|Qwerty|Colemk|Dvorak| | | + * |------+------+------+------+------+------+------+------+------+------|------+------+------+------+------+------| + * | + | 1 | 2 | 3 | |Voice-|Voice+|Mus on|MusOff|MidiOn|MidOff| | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------+------+------+------+------| + * | / | * | . | 0 | | | | | | | | | | | | + * `---------------------------------------------------------------------------------------------------------------' + */ +[_FN] = LAYOUT_ss_6x12( +KC_KP_EQUAL, KC_7, KC_8, KC_9, RESET , RGB_TOG, RGB_MOD, RGB_HUI, RGB_VAI, RGB_VAD, RGB_SAI, RGB_SAD, _______, _______, _______, KC_DEL, +KC_KP_MINUS, KC_4, KC_5, KC_6, _______, _______, _______, _______, _______, AG_NORM, AG_SWAP, _______, _______, _______, _______, _______, +KC_KP_PLUS, KC_1, KC_2, KC_3, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, +KC_KP_SLASH, KC_KP_ASTERISK, KC_KP_DOT, KC_0, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ +) +}; diff --git a/keyboards/nckiibs/vaneelaex/keymaps/via/rules.mk b/keyboards/nckiibs/vaneelaex/keymaps/via/rules.mk new file mode 100644 index 000000000000..1e5b99807cb7 --- /dev/null +++ b/keyboards/nckiibs/vaneelaex/keymaps/via/rules.mk @@ -0,0 +1 @@ +VIA_ENABLE = yes diff --git a/keyboards/nckiibs/vaneelaex/readme.md b/keyboards/nckiibs/vaneelaex/readme.md new file mode 100644 index 000000000000..9417ae812da6 --- /dev/null +++ b/keyboards/nckiibs/vaneelaex/readme.md @@ -0,0 +1,20 @@ +# Vaneela Ex + +![vaneelEx](https://i.imgur.com/5QmJLbjl.jpg) + +Vaneela Ex is a custom keyboard made by a hobbist. It has a semi-staggered layout with an optional 4x4 keys on the left or right. +Vaneela Ex supports Pro Micro and its compatible variants, such as elite-C. + +* Keyboard Maintainer: [noclew](https://github.com/noclew) +* Hardware Supported: Vaneela Ex PCB +* Hardware Availability: Not commercially available, but the board fabricaion file will be uploaded in the near future. + +Make example for this keyboard (after setting up your build environment): + + make nckiibs/vaneelaex:default + +Flashing example for this keyboard: + + make nckiibs/vaneelaex: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). diff --git a/keyboards/nckiibs/vaneelaex/rules.mk b/keyboards/nckiibs/vaneelaex/rules.mk new file mode 100644 index 000000000000..fd76a52478f7 --- /dev/null +++ b/keyboards/nckiibs/vaneelaex/rules.mk @@ -0,0 +1,22 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +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 = no # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +BLUETOOTH_ENABLE = no # Enable Bluetooth +AUDIO_ENABLE = no # Audio output diff --git a/keyboards/nckiibs/vaneelaex/vaneelaex.c b/keyboards/nckiibs/vaneelaex/vaneelaex.c new file mode 100644 index 000000000000..e82cd5487b11 --- /dev/null +++ b/keyboards/nckiibs/vaneelaex/vaneelaex.c @@ -0,0 +1,18 @@ +/* Copyright 2020 noclew + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#include "vaneelaex.h" + diff --git a/keyboards/nckiibs/vaneelaex/vaneelaex.h b/keyboards/nckiibs/vaneelaex/vaneelaex.h new file mode 100644 index 000000000000..9b2d74ecefdb --- /dev/null +++ b/keyboards/nckiibs/vaneelaex/vaneelaex.h @@ -0,0 +1,42 @@ +/* Copyright 2020 noclew + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License 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_ss_6x12( \ + k62, k63, k64, k65, k01, k02, k03, k04, k05, k06, k07, k08, k09, k10, k11, k12, \ + k58, k59, k60, k61, k13, k14, k15, k16, k17, k18, k19, k20, k21, k22, k23, k24, \ + k54, k55, k56, k57, k25, k26, k27, k28, k29, k30, k31, k32, k33, k34, k35, k36, \ + k50, k51, k52, k53, k37, k38, k39, k40, k41, k42, k43, k44, k45, k46, k47, k48 \ +) \ +{ \ + { 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 }, \ + { k50, k51, k52, k53, k54, k55, k56, k57, k58, k59, k60, k61 }, \ + { k62, k63, k64, k65, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO } \ +} From e2d4cd1a41c667da186891e3dbaf535c6b0717df Mon Sep 17 00:00:00 2001 From: Ryan Date: Wed, 12 Aug 2020 12:28:20 +1000 Subject: [PATCH 552/930] Add Kiibohd bootloader type to bootloader.mk (#9908) --- bootloader.mk | 13 +++++++++++++ keyboards/ergodox_infinity/bootloader_defs.h | 1 - keyboards/ergodox_infinity/rules.mk | 18 ++---------------- keyboards/infinity60/bootloader_defs.h | 1 - keyboards/infinity60/rules.mk | 17 ++--------------- keyboards/k_type/bootloader_defs.h | 1 - keyboards/k_type/rules.mk | 18 ++---------------- keyboards/whitefox/bootloader_defs.h | 1 - keyboards/whitefox/rules.mk | 18 ++---------------- tmk_core/chibios.mk | 2 +- tmk_core/common/chibios/bootloader.c | 6 +++--- 11 files changed, 25 insertions(+), 71 deletions(-) delete mode 100644 keyboards/ergodox_infinity/bootloader_defs.h delete mode 100644 keyboards/infinity60/bootloader_defs.h delete mode 100644 keyboards/k_type/bootloader_defs.h delete mode 100644 keyboards/whitefox/bootloader_defs.h diff --git a/bootloader.mk b/bootloader.mk index e516e9ff9fd2..c22291e435ab 100644 --- a/bootloader.mk +++ b/bootloader.mk @@ -27,6 +27,7 @@ # qmk-dfu QMK DFU (LUFA + blinkenlight) # bootloadHID HIDBootFlash compatible (ATmega32A) # USBasp USBaspLoader (ATmega328P) +# kiibohd Input:Club Kiibohd bootloader (only used on their boards) # # BOOTLOADER_SIZE can still be defined manually, but it's recommended # you add any possible configuration to this list @@ -89,6 +90,18 @@ ifeq ($(strip $(BOOTLOADER)), lufa-ms) BOOTLOADER_SIZE = 6144 FIRMWARE_FORMAT = bin endif +ifeq ($(strip $(BOOTLOADER)), kiibohd) + OPT_DEFS += -DBOOTLOADER_KIIBOHD + ifeq ($(strip $(MCU)), MK20DX128) + MCU_LDSCRIPT = MK20DX128BLDR4 + endif + ifeq ($(strip $(MCU)), MK20DX256) + MCU_LDSCRIPT = MK20DX256BLDR8 + endif + + DFU_ARGS = -d 1C11:B007 + DFU_SUFFIX_ARGS = -v 1C11 -p B007 +endif ifdef BOOTLOADER_SIZE OPT_DEFS += -DBOOTLOADER_SIZE=$(strip $(BOOTLOADER_SIZE)) diff --git a/keyboards/ergodox_infinity/bootloader_defs.h b/keyboards/ergodox_infinity/bootloader_defs.h deleted file mode 100644 index c67153be6021..000000000000 --- a/keyboards/ergodox_infinity/bootloader_defs.h +++ /dev/null @@ -1 +0,0 @@ -#define KIIBOHD_BOOTLOADER diff --git a/keyboards/ergodox_infinity/rules.mk b/keyboards/ergodox_infinity/rules.mk index 31bc20454c30..572bda2a97fc 100644 --- a/keyboards/ergodox_infinity/rules.mk +++ b/keyboards/ergodox_infinity/rules.mk @@ -1,32 +1,18 @@ # MCU name MCU = MK20DX256 -# 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 -# - MK20DX128BLDR4 for Infinity 60% with Kiibohd bootloader -# - MK20DX256BLDR8 for Infinity ErgoDox with Kiibohd bootloader -MCU_LDSCRIPT = MK20DX256BLDR8 - # 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=0x00002000 -BOOTLOADER = dfu +# Bootloader selection +BOOTLOADER = kiibohd # Build Options # comment out to disable the options. # -DFU_ARGS = -d 1c11:b007 -DFU_SUFFIX_ARGS = -p b007 -v 1c11 - BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control diff --git a/keyboards/infinity60/bootloader_defs.h b/keyboards/infinity60/bootloader_defs.h deleted file mode 100644 index c67153be6021..000000000000 --- a/keyboards/infinity60/bootloader_defs.h +++ /dev/null @@ -1 +0,0 @@ -#define KIIBOHD_BOOTLOADER diff --git a/keyboards/infinity60/rules.mk b/keyboards/infinity60/rules.mk index 579eab0f3fa2..8fb4b499ea36 100644 --- a/keyboards/infinity60/rules.mk +++ b/keyboards/infinity60/rules.mk @@ -1,17 +1,6 @@ # MCU name MCU = MK20DX128 -# 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 -# - MK20DX128BLDR4 for Infinity with Kiibohd bootloader -MCU_LDSCRIPT = MK20DX128BLDR4 - # Board: it should exist either in /os/hal/boards/ # or /boards # - BOARD = @@ -26,15 +15,13 @@ BOARD = MCHCK_K20 # The CORTEX_VTOR... is needed only for MCHCK/Infinity KB OPT_DEFS = -DCORTEX_VTOR_INIT=0x00001000 -BOOTLOADER = dfu +# Bootloader selection +BOOTLOADER = kiibohd # Build Options # comment out to disable the options. # -DFU_ARGS = -d 1c11:b007 -DFU_SUFFIX_ARGS = -p b007 -v 1c11 - BOOTMAGIC_ENABLE = no # 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/k_type/bootloader_defs.h b/keyboards/k_type/bootloader_defs.h deleted file mode 100644 index c67153be6021..000000000000 --- a/keyboards/k_type/bootloader_defs.h +++ /dev/null @@ -1 +0,0 @@ -#define KIIBOHD_BOOTLOADER diff --git a/keyboards/k_type/rules.mk b/keyboards/k_type/rules.mk index 56c4c606e3f3..176a28d8684d 100644 --- a/keyboards/k_type/rules.mk +++ b/keyboards/k_type/rules.mk @@ -1,28 +1,14 @@ # MCU name MCU = MK20DX256 -# 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 -# - MK20DX128BLDR4 for Infinity with Kiibohd bootloader -# - MK20DX256BLDR8 for Infinity ErgoDox with Kiibohd bootloader -MCU_LDSCRIPT = MK20DX256BLDR8 - # Board: it should exist either in /os/hal/boards/ # or /boards # 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 -DFU_ARGS = -d 1c11:b007 -DFU_SUFFIX_ARGS = -p b007 -v 1c11 - -BOOTLOADER = dfu +# Bootloader selection +BOOTLOADER = kiibohd # Build Options # comment out to disable the options. diff --git a/keyboards/whitefox/bootloader_defs.h b/keyboards/whitefox/bootloader_defs.h deleted file mode 100644 index c67153be6021..000000000000 --- a/keyboards/whitefox/bootloader_defs.h +++ /dev/null @@ -1 +0,0 @@ -#define KIIBOHD_BOOTLOADER diff --git a/keyboards/whitefox/rules.mk b/keyboards/whitefox/rules.mk index 14507e9dd279..568b33b464ac 100644 --- a/keyboards/whitefox/rules.mk +++ b/keyboards/whitefox/rules.mk @@ -1,18 +1,6 @@ # MCU name MCU = MK20DX256 -# 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 -# - MK20DX128BLDR4 for Infinity with Kiibohd bootloader -# - MK20DX256BLDR8 for Infinity ErgoDox with Kiibohd bootloader -MCU_LDSCRIPT = MK20DX256BLDR8 - # Board: it should exist either in /os/hal/boards/ # or /boards # - BOARD = @@ -22,10 +10,8 @@ MCU_LDSCRIPT = MK20DX256BLDR8 # - MCHCK_K20 for Infinity KB BOARD = IC_TEENSY_3_1 -DFU_ARGS = -d 1c11:b007 -DFU_SUFFIX_ARGS = -p b007 -v 1c11 - -BOOTLOADER = dfu +# Bootloader selection +BOOTLOADER = kiibohd # Build Options # comment out to disable the options. diff --git a/tmk_core/chibios.mk b/tmk_core/chibios.mk index 09aaddeef052..4c288646e21f 100644 --- a/tmk_core/chibios.mk +++ b/tmk_core/chibios.mk @@ -324,7 +324,7 @@ bin: $(BUILD_DIR)/$(TARGET).bin sizeafter flash: $(BUILD_DIR)/$(TARGET).bin cpfirmware sizeafter ifneq ($(strip $(PROGRAM_CMD)),) $(PROGRAM_CMD) -else ifeq ($(strip $(BOOTLOADER)),dfu) +else ifeq ($(strip $(BOOTLOADER)),kiibohd) $(call EXEC_DFU_UTIL) else ifeq ($(strip $(MCU_FAMILY)),KINETIS) $(call EXEC_TEENSY) diff --git a/tmk_core/common/chibios/bootloader.c b/tmk_core/common/chibios/bootloader.c index 4cf5dae7e645..6833511c0ee9 100644 --- a/tmk_core/common/chibios/bootloader.c +++ b/tmk_core/common/chibios/bootloader.c @@ -44,7 +44,7 @@ void enter_bootloader_mode_if_requested(void) { #elif defined(KL2x) || defined(K20x) /* STM32_BOOTLOADER_ADDRESS */ /* Kinetis */ -# if defined(KIIBOHD_BOOTLOADER) +# if defined(BOOTLOADER_KIIBOHD) /* Kiibohd Bootloader (MCHCK and Infinity KB) */ # define SCB_AIRCR_VECTKEY_WRITEMAGIC 0x05FA0000 const uint8_t sys_reset_to_loader_magic[] = "\xff\x00\x7fRESET TO LOADER\x7f\x00\xff"; @@ -54,14 +54,14 @@ void bootloader_jump(void) { SCB->AIRCR = SCB_AIRCR_VECTKEY_WRITEMAGIC | SCB_AIRCR_SYSRESETREQ_Msk; } -# else /* defined(KIIBOHD_BOOTLOADER) */ +# else /* defined(BOOTLOADER_KIIBOHD) */ /* Default for Kinetis - expecting an ARM Teensy */ # include "wait.h" void bootloader_jump(void) { wait_ms(100); __BKPT(0); } -# endif /* defined(KIIBOHD_BOOTLOADER) */ +# endif /* defined(BOOTLOADER_KIIBOHD) */ #else /* neither STM32 nor KINETIS */ __attribute__((weak)) void bootloader_jump(void) {} From ce5cdc6f8a37505333d5695ebcfa31574a7fe3cd Mon Sep 17 00:00:00 2001 From: KgOfHedgehogs Date: Wed, 12 Aug 2020 16:05:02 +0200 Subject: [PATCH 553/930] Add jian/keymaps/via/config.h (#9948) --- keyboards/jian/keymaps/via/config.h | 22 ++++++++++++++++++++++ keyboards/jian/rev2/config.h | 2 +- 2 files changed, 23 insertions(+), 1 deletion(-) create mode 100644 keyboards/jian/keymaps/via/config.h diff --git a/keyboards/jian/keymaps/via/config.h b/keyboards/jian/keymaps/via/config.h new file mode 100644 index 000000000000..4d9cb17cac58 --- /dev/null +++ b/keyboards/jian/keymaps/via/config.h @@ -0,0 +1,22 @@ +/* +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 IGNORE_MOD_TAP_INTERRUPT diff --git a/keyboards/jian/rev2/config.h b/keyboards/jian/rev2/config.h index 296e168ecda5..87dc82c2966b 100644 --- a/keyboards/jian/rev2/config.h +++ b/keyboards/jian/rev2/config.h @@ -56,7 +56,7 @@ along with this program. If not, see . #ifdef BACKLIGHT_ENABLE #define BACKLIGHT_PIN C6 #define BACKLIGHT_LEVELS 5 -#define BACKLIGHT_BREATHING //not working with splits right now +// #define BACKLIGHT_BREATHING //not working with splits right now #define BREATHING_PERIOD 6 #endif From f1299f32928210b6d7d2abe999e502244dcafd69 Mon Sep 17 00:00:00 2001 From: Brandon Claveria <48102030+swiftrax@users.noreply.github.com> Date: Wed, 12 Aug 2020 07:08:41 -0700 Subject: [PATCH 554/930] fix handwired/swiftrax/cowfish PID and VID (#9922) Co-authored-by: Swiftrax --- keyboards/handwired/swiftrax/cowfish/config.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/keyboards/handwired/swiftrax/cowfish/config.h b/keyboards/handwired/swiftrax/cowfish/config.h index d8ee8855399f..3b4877946696 100644 --- a/keyboards/handwired/swiftrax/cowfish/config.h +++ b/keyboards/handwired/swiftrax/cowfish/config.h @@ -20,8 +20,8 @@ along with this program. If not, see . #include "config_common.h" /* USB Device descriptor parameter */ -#define VENDOR_ID 0x7161 -#define PRODUCT_ID 0x5239 +#define VENDOR_ID 0x04D8 +#define PRODUCT_ID 0xEB53 #define DEVICE_VER 0x0001 #define MANUFACTURER Swiftrax #define PRODUCT CowFish From c957eed04b302459304f08a0d1fd43f7602da94e Mon Sep 17 00:00:00 2001 From: Xelus22 <17491233+Xelus22@users.noreply.github.com> Date: Thu, 13 Aug 2020 10:24:40 +1000 Subject: [PATCH 555/930] [Keyboard] AEboards Ext65 rev2 (#9482) * ext65rev2 initial * open drain change and config * pwm * pwm streams * spi * ws2812 spi * oled * enable sleep * keymap and dissable oled * readd oleds * nooled * led_update_kb revised * update and remove board specific files and add to ext65rev2.c * Update OLED usb status * Update keyboards led state * Layer state set kb * Return state * Update keyboards led state * Update OLED usb status * merge master and merge rev folders * add readme * move board_init to only if OLED is enabled * update readme * update rules.mk * Remove OLED from rules.mk * Update config.h * show AEBoards * Update keyboards/aeboards/ext65/rev2/rules.mk --- keyboards/aeboards/ext65/{ => rev1}/config.h | 0 .../ext65/{ => rev1}/keymaps/default/keymap.c | 0 .../{ => rev1}/keymaps/default/readme.md | 0 .../ext65/{ => rev1}/keymaps/via/keymap.c | 0 .../ext65/{ => rev1}/keymaps/via/readme.md | 0 .../ext65/{ => rev1}/keymaps/via/rules.mk | 0 keyboards/aeboards/ext65/{ => rev1}/readme.md | 2 +- .../aeboards/ext65/{ext65.c => rev1/rev1.c} | 0 .../aeboards/ext65/{ext65.h => rev1/rev1.h} | 0 keyboards/aeboards/ext65/{ => rev1}/rules.mk | 0 .../aeboards/ext65/rev2/bootloader_defs.h | 7 + keyboards/aeboards/ext65/rev2/chconf.h | 714 ++++++++++++++++++ keyboards/aeboards/ext65/rev2/config.h | 77 ++ keyboards/aeboards/ext65/rev2/halconf.h | 525 +++++++++++++ .../ext65/rev2/keymaps/default/keymap.c | 98 +++ .../ext65/rev2/keymaps/default/readme.md | 2 + .../aeboards/ext65/rev2/keymaps/via/keymap.c | 98 +++ .../aeboards/ext65/rev2/keymaps/via/readme.md | 2 + .../aeboards/ext65/rev2/keymaps/via/rules.mk | 1 + keyboards/aeboards/ext65/rev2/mcuconf.h | 176 +++++ keyboards/aeboards/ext65/rev2/readme.md | 13 + keyboards/aeboards/ext65/rev2/rev2.c | 45 ++ keyboards/aeboards/ext65/rev2/rev2.h | 24 + keyboards/aeboards/ext65/rev2/rules.mk | 23 + 24 files changed, 1806 insertions(+), 1 deletion(-) rename keyboards/aeboards/ext65/{ => rev1}/config.h (100%) rename keyboards/aeboards/ext65/{ => rev1}/keymaps/default/keymap.c (100%) rename keyboards/aeboards/ext65/{ => rev1}/keymaps/default/readme.md (100%) rename keyboards/aeboards/ext65/{ => rev1}/keymaps/via/keymap.c (100%) rename keyboards/aeboards/ext65/{ => rev1}/keymaps/via/readme.md (100%) rename keyboards/aeboards/ext65/{ => rev1}/keymaps/via/rules.mk (100%) rename keyboards/aeboards/ext65/{ => rev1}/readme.md (93%) rename keyboards/aeboards/ext65/{ext65.c => rev1/rev1.c} (100%) rename keyboards/aeboards/ext65/{ext65.h => rev1/rev1.h} (100%) rename keyboards/aeboards/ext65/{ => rev1}/rules.mk (100%) create mode 100644 keyboards/aeboards/ext65/rev2/bootloader_defs.h create mode 100644 keyboards/aeboards/ext65/rev2/chconf.h create mode 100644 keyboards/aeboards/ext65/rev2/config.h create mode 100644 keyboards/aeboards/ext65/rev2/halconf.h create mode 100644 keyboards/aeboards/ext65/rev2/keymaps/default/keymap.c create mode 100644 keyboards/aeboards/ext65/rev2/keymaps/default/readme.md create mode 100644 keyboards/aeboards/ext65/rev2/keymaps/via/keymap.c create mode 100644 keyboards/aeboards/ext65/rev2/keymaps/via/readme.md create mode 100644 keyboards/aeboards/ext65/rev2/keymaps/via/rules.mk create mode 100644 keyboards/aeboards/ext65/rev2/mcuconf.h create mode 100644 keyboards/aeboards/ext65/rev2/readme.md create mode 100644 keyboards/aeboards/ext65/rev2/rev2.c create mode 100644 keyboards/aeboards/ext65/rev2/rev2.h create mode 100644 keyboards/aeboards/ext65/rev2/rules.mk diff --git a/keyboards/aeboards/ext65/config.h b/keyboards/aeboards/ext65/rev1/config.h similarity index 100% rename from keyboards/aeboards/ext65/config.h rename to keyboards/aeboards/ext65/rev1/config.h diff --git a/keyboards/aeboards/ext65/keymaps/default/keymap.c b/keyboards/aeboards/ext65/rev1/keymaps/default/keymap.c similarity index 100% rename from keyboards/aeboards/ext65/keymaps/default/keymap.c rename to keyboards/aeboards/ext65/rev1/keymaps/default/keymap.c diff --git a/keyboards/aeboards/ext65/keymaps/default/readme.md b/keyboards/aeboards/ext65/rev1/keymaps/default/readme.md similarity index 100% rename from keyboards/aeboards/ext65/keymaps/default/readme.md rename to keyboards/aeboards/ext65/rev1/keymaps/default/readme.md diff --git a/keyboards/aeboards/ext65/keymaps/via/keymap.c b/keyboards/aeboards/ext65/rev1/keymaps/via/keymap.c similarity index 100% rename from keyboards/aeboards/ext65/keymaps/via/keymap.c rename to keyboards/aeboards/ext65/rev1/keymaps/via/keymap.c diff --git a/keyboards/aeboards/ext65/keymaps/via/readme.md b/keyboards/aeboards/ext65/rev1/keymaps/via/readme.md similarity index 100% rename from keyboards/aeboards/ext65/keymaps/via/readme.md rename to keyboards/aeboards/ext65/rev1/keymaps/via/readme.md diff --git a/keyboards/aeboards/ext65/keymaps/via/rules.mk b/keyboards/aeboards/ext65/rev1/keymaps/via/rules.mk similarity index 100% rename from keyboards/aeboards/ext65/keymaps/via/rules.mk rename to keyboards/aeboards/ext65/rev1/keymaps/via/rules.mk diff --git a/keyboards/aeboards/ext65/readme.md b/keyboards/aeboards/ext65/rev1/readme.md similarity index 93% rename from keyboards/aeboards/ext65/readme.md rename to keyboards/aeboards/ext65/rev1/readme.md index 5ee7fb4f8d83..78d5b8f9597b 100644 --- a/keyboards/aeboards/ext65/readme.md +++ b/keyboards/aeboards/ext65/rev1/readme.md @@ -9,6 +9,6 @@ Hardware Availability: Custom keyboard group buys Make example for this keyboard (after setting up your build environment): - make aeboards/ext65:default + make aeboards/ext65/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). \ No newline at end of file diff --git a/keyboards/aeboards/ext65/ext65.c b/keyboards/aeboards/ext65/rev1/rev1.c similarity index 100% rename from keyboards/aeboards/ext65/ext65.c rename to keyboards/aeboards/ext65/rev1/rev1.c diff --git a/keyboards/aeboards/ext65/ext65.h b/keyboards/aeboards/ext65/rev1/rev1.h similarity index 100% rename from keyboards/aeboards/ext65/ext65.h rename to keyboards/aeboards/ext65/rev1/rev1.h diff --git a/keyboards/aeboards/ext65/rules.mk b/keyboards/aeboards/ext65/rev1/rules.mk similarity index 100% rename from keyboards/aeboards/ext65/rules.mk rename to keyboards/aeboards/ext65/rev1/rules.mk diff --git a/keyboards/aeboards/ext65/rev2/bootloader_defs.h b/keyboards/aeboards/ext65/rev2/bootloader_defs.h new file mode 100644 index 000000000000..02c48c4e6dcb --- /dev/null +++ b/keyboards/aeboards/ext65/rev2/bootloader_defs.h @@ -0,0 +1,7 @@ +/* Address for jumping to bootloader on STM32 chips. */ +/* 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 + */ +#define STM32_BOOTLOADER_ADDRESS 0x1FFFC800 diff --git a/keyboards/aeboards/ext65/rev2/chconf.h b/keyboards/aeboards/ext65/rev2/chconf.h new file mode 100644 index 000000000000..4640ff5332b0 --- /dev/null +++ b/keyboards/aeboards/ext65/rev2/chconf.h @@ -0,0 +1,714 @@ +/* + 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. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +/** + * @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. + * + * @addtogroup config + * @details Kernel related settings and hooks. + * @{ + */ + +#ifndef CHCONF_H +#define CHCONF_H + +#define _CHIBIOS_RT_CONF_ +#define _CHIBIOS_RT_CONF_VER_6_0_ + +/*===========================================================================*/ +/** + * @name System timers settings + * @{ + */ +/*===========================================================================*/ + +/** + * @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. + * @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. + */ +#if !defined(CH_CFG_ST_TIMEDELTA) +#define CH_CFG_ST_TIMEDELTA 2 +#endif + +/** @} */ + +/*===========================================================================*/ +/** + * @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. + */ +#if !defined(CH_CFG_TIME_QUANTUM) +#define CH_CFG_TIME_QUANTUM 0 +#endif + +/** + * @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. + */ +#if !defined(CH_CFG_MEMCORE_SIZE) +#define CH_CFG_MEMCORE_SIZE 0 +#endif + +/** + * @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. + */ +#if !defined(CH_CFG_NO_IDLE_THREAD) +#define CH_CFG_NO_IDLE_THREAD FALSE +#endif + +/** @} */ + +/*===========================================================================*/ +/** + * @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. + */ +#if !defined(CH_CFG_OPTIMIZE_SPEED) +#define CH_CFG_OPTIMIZE_SPEED FALSE +#endif + +/** @} */ + +/*===========================================================================*/ +/** + * @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. + */ +#if !defined(CH_CFG_USE_TM) +#define CH_CFG_USE_TM FALSE +#endif + +/** + * @brief Threads registry APIs. + * @details If enabled then the registry APIs are included in the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_REGISTRY) +#define CH_CFG_USE_REGISTRY TRUE +#endif + +/** + * @brief Threads synchronization APIs. + * @details If enabled then the @p chThdWait() function is included in + * the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_WAITEXIT) +#define CH_CFG_USE_WAITEXIT TRUE +#endif + +/** + * @brief Semaphores APIs. + * @details If enabled then the Semaphores APIs are included in the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_SEMAPHORES) +#define CH_CFG_USE_SEMAPHORES TRUE +#endif + +/** + * @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. + */ +#if !defined(CH_CFG_USE_SEMAPHORES_PRIORITY) +#define CH_CFG_USE_SEMAPHORES_PRIORITY FALSE +#endif + +/** + * @brief Mutexes APIs. + * @details If enabled then the mutexes APIs are included in the kernel. + * + * @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. + * @note Recursive mutexes are heavier and have an increased + * memory footprint. + * + * @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. + * @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. + */ +#if !defined(CH_CFG_USE_CONDVARS) +#define CH_CFG_USE_CONDVARS TRUE +#endif + +/** + * @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. + */ +#if !defined(CH_CFG_USE_CONDVARS_TIMEOUT) +#define CH_CFG_USE_CONDVARS_TIMEOUT FALSE +#endif + +/** + * @brief Events Flags APIs. + * @details If enabled then the event flags APIs are included in the kernel. + * + * @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. + * @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. + */ +#if !defined(CH_CFG_USE_EVENTS_TIMEOUT) +#define CH_CFG_USE_EVENTS_TIMEOUT TRUE +#endif + +/** + * @brief Synchronous Messages APIs. + * @details If enabled then the synchronous messages APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_MESSAGES) +#define CH_CFG_USE_MESSAGES TRUE +#endif + +/** + * @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. + */ +#if !defined(CH_CFG_USE_MESSAGES_PRIORITY) +#define CH_CFG_USE_MESSAGES_PRIORITY FALSE +#endif + +/** + * @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. + */ +#if !defined(CH_CFG_USE_MAILBOXES) +#define CH_CFG_USE_MAILBOXES TRUE +#endif + +/** + * @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. + */ +#if !defined(CH_CFG_USE_MEMCORE) +#define CH_CFG_USE_MEMCORE FALSE +#endif + +/** + * @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. + */ +#if !defined(CH_CFG_USE_HEAP) +#define CH_CFG_USE_HEAP FALSE +#endif + +/** + * @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. + */ +#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. + * @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. + */ +#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 + +/** @} */ + +/*===========================================================================*/ +/** + * @name Debug options + * @{ + */ +/*===========================================================================*/ + +/** + * @brief Debug option, kernel statistics. + * + * @note The default is @p FALSE. + */ +#if !defined(CH_DBG_STATISTICS) +#define CH_DBG_STATISTICS FALSE +#endif + +/** + * @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. + */ +#if !defined(CH_DBG_SYSTEM_STATE_CHECK) +#define CH_DBG_SYSTEM_STATE_CHECK FALSE +#endif + +/** + * @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. + */ +#if !defined(CH_DBG_ENABLE_CHECKS) +#define CH_DBG_ENABLE_CHECKS FALSE +#endif + +/** + * @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. + */ +#if !defined(CH_DBG_ENABLE_ASSERTS) +#define CH_DBG_ENABLE_ASSERTS FALSE +#endif + +/** + * @brief Debug option, trace buffer. + * @details If enabled then the trace buffer is activated. + * + * @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. + * @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. + */ +#if !defined(CH_DBG_ENABLE_STACK_CHECK) +#define CH_DBG_ENABLE_STACK_CHECK FALSE +#endif + +/** + * @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. + */ +#if !defined(CH_DBG_FILL_THREADS) +#define CH_DBG_FILL_THREADS FALSE +#endif + +/** + * @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. + */ +#if !defined(CH_DBG_THREADS_PROFILING) +#define CH_DBG_THREADS_PROFILING FALSE +#endif + +/** @} */ + +/*===========================================================================*/ +/** + * @name Kernel hooks + * @{ + */ +/*===========================================================================*/ + +/** + * @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. + */ +#define CH_CFG_THREAD_EXTRA_FIELDS \ + /* Add threads custom fields here.*/ + +/** + * @brief Threads initialization hook. + * @details User initialization code added to the @p _thread_init() function. + * + * @note It is invoked from within @p _thread_init() 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/aeboards/ext65/rev2/config.h b/keyboards/aeboards/ext65/rev2/config.h new file mode 100644 index 000000000000..959bf91dc3e1 --- /dev/null +++ b/keyboards/aeboards/ext65/rev2/config.h @@ -0,0 +1,77 @@ +/* +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 0x4145 // "AE" +#define PRODUCT_ID 0xA652 // AEboards EXT65 Rev2 +#define DEVICE_VER 0x0001 +#define MANUFACTURER AEboards +#define PRODUCT AEBoards Ext65 Rev2 + +/* key matrix size */ +/* key matrix size */ +#define MATRIX_ROWS 10 +#define MATRIX_COLS 10 + +/* key matrix pins */ +#define MATRIX_ROW_PINS { A10, A9, A8, B7, A2, A1, B12, B11, B10, B2 } +#define MATRIX_COL_PINS { B14, B6, A0, B1, B0, A7, A6, A5, A4, A3 } + +#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 + +//RGB Underglow WS2812 +#define RGBLIGHT_ANIMATIONS +#define RGBLED_NUM 24 +#define RGB_DI_PIN B15 + +//SPI +#define WS2812_SPI SPID2 +#define WS2812_SPI_MOSI_PAL_MODE 0 +#define WS2812_EXTERNAL_PULLUP + +// I2C OLED defines +#define I2C1_SCL 8 +#define I2C1_SDA 9 + +#define I2C1_SCL_PAL_MODE 1 +#define I2C1_SDA_PAL_MODE 1 + +#define I2C1_TIMINGR_PRESC 0U +#define I2C1_TIMINGR_SCLDEL 3U +#define I2C1_TIMINGR_SDADEL 1U +#define I2C1_TIMINGR_SCLH 3U +#define I2C1_TIMINGR_SCLL 9U + +// LED defines +#define BACKLIGHT_PIN B5 +#define BACKLIGHT_PWM_DRIVER PWMD3 +#define BACKLIGHT_PWM_CHANNEL 2 +#define BACKLIGHT_PAL_MODE 1 + +#define BACKLIGHT_LEVELS 6 +#define BACKLIGHT_BREATHING +#define BREATHING_PERIOD 6 diff --git a/keyboards/aeboards/ext65/rev2/halconf.h b/keyboards/aeboards/ext65/rev2/halconf.h new file mode 100644 index 000000000000..adb1a907154b --- /dev/null +++ b/keyboards/aeboards/ext65/rev2/halconf.h @@ -0,0 +1,525 @@ +/* + 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. + 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 + +#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 +#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 cryptographic subsystem. + */ +#if !defined(HAL_USE_CRY) || defined(__DOXYGEN__) +#define HAL_USE_CRY FALSE +#endif + +/** + * @brief Enables the DAC subsystem. + */ +#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 +#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 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 +#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 +#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 + +/** + * @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. */ +/*===========================================================================*/ + +/** + * @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 + +/** + * @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. */ +/*===========================================================================*/ + +/** + * @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 the zero-copy API. + */ +#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 + +/** + * @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. */ +/*===========================================================================*/ + +/** + * @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 16 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 256 bytes for both the transmission and receive + * buffers. + */ +#if !defined(SERIAL_USB_BUFFERS_SIZE) || defined(__DOXYGEN__) +#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 + +/*===========================================================================*/ +/* 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 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 +#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. */ +/*===========================================================================*/ + +/** + * @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 + +/*===========================================================================*/ +/* 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/aeboards/ext65/rev2/keymaps/default/keymap.c b/keyboards/aeboards/ext65/rev2/keymaps/default/keymap.c new file mode 100644 index 000000000000..2158fac3174f --- /dev/null +++ b/keyboards/aeboards/ext65/rev2/keymaps/default/keymap.c @@ -0,0 +1,98 @@ +/* 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 . + */ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* Keymap BASE: (Base Layer) Default Layer + * ,-------------------. ,-------------------------------------------------------------------. + * |- | * | / |NmLK| |Esc| 1 | 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =|pipe| ~ | Pscr| + * |-------------------| |-------------------------------------------------------------------| + * | | 9 | 8 | 7 | |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| BSPC | Del | + * | + |--------------| |-------------------------------------------------------------------| + * | | 6 | 5 | 4 | |Caps | A| S| D| F| G| H| J| K| L| ;| '|Return | Pgup| + * |-------------------| |-------------------------------------------------------------------| + * | | 3 | 2 | 1 | |Shift | Z| X| C| V| B| N| M| ,| .| /|Shift | Up | Pgdn| + * | ENT|-------------------------------------------------------------------------------------| + * | | . | 0 | | Ctrl | Win | Alt | Space | FN | Ctrl | |Left| Dn | Rght| + * `------------------------------------------------------------------------------------------' + */ + [0] = LAYOUT_ext65( + RGB_M_T, BL_INC , BL_DEC , BL_TOGG, 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_PSCR, + RGB_TOG, KC_P9 , KC_P8 , KC_P7 , KC_TAB , KC_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_PPLS, KC_P6 , KC_P5 , KC_P4 , 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_PENT, KC_P3 , KC_P2 , KC_P1 , 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_PENT, KC_PDOT, KC_P0 , KC_P0 , KC_LCTL, KC_LGUI, KC_LALT, KC_SPC , MO(1) , KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT + ), + + [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, 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, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ), + + [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_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, 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_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_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ) +}; + +#ifdef OLED_DRIVER_ENABLE + +void render_layer_state(void) { + oled_write_ln(PSTR("LAYER"), false); + oled_write_ln(PSTR("L1"), layer_state_is(1)); + oled_write_ln(PSTR("L2"), layer_state_is(2)); + oled_write_ln(PSTR("L3"), layer_state_is(3)); + oled_write_ln(PSTR(" "), false); +} + +void render_keylock_status(led_t led_state) { + oled_write_ln(PSTR("Lock:"), false); + oled_write(PSTR("N"), led_state.num_lock); + oled_write(PSTR("C"), led_state.caps_lock); + oled_write_ln(PSTR("S"), led_state.scroll_lock); + oled_write_ln(PSTR(" "), false); +} + +void render_mod_status(uint8_t modifiers) { + oled_write_ln(PSTR("Mods:"), false); + oled_write(PSTR("S"), (modifiers & MOD_MASK_SHIFT)); + oled_write(PSTR("C"), (modifiers & MOD_MASK_CTRL)); + oled_write(PSTR("A"), (modifiers & MOD_MASK_ALT)); + oled_write_ln(PSTR("G"), (modifiers & MOD_MASK_GUI)); + oled_write_ln(PSTR(" "), false); +} + +void oled_task_user(void) { + render_layer_state(); + render_keylock_status(host_keyboard_led_state()); + render_mod_status(get_mods()|get_oneshot_mods()); +} + +#endif diff --git a/keyboards/aeboards/ext65/rev2/keymaps/default/readme.md b/keyboards/aeboards/ext65/rev2/keymaps/default/readme.md new file mode 100644 index 000000000000..3a3bb66d679e --- /dev/null +++ b/keyboards/aeboards/ext65/rev2/keymaps/default/readme.md @@ -0,0 +1,2 @@ +# The Default Ext65Rev2 Layout + diff --git a/keyboards/aeboards/ext65/rev2/keymaps/via/keymap.c b/keyboards/aeboards/ext65/rev2/keymaps/via/keymap.c new file mode 100644 index 000000000000..2158fac3174f --- /dev/null +++ b/keyboards/aeboards/ext65/rev2/keymaps/via/keymap.c @@ -0,0 +1,98 @@ +/* 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 . + */ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* Keymap BASE: (Base Layer) Default Layer + * ,-------------------. ,-------------------------------------------------------------------. + * |- | * | / |NmLK| |Esc| 1 | 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =|pipe| ~ | Pscr| + * |-------------------| |-------------------------------------------------------------------| + * | | 9 | 8 | 7 | |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| BSPC | Del | + * | + |--------------| |-------------------------------------------------------------------| + * | | 6 | 5 | 4 | |Caps | A| S| D| F| G| H| J| K| L| ;| '|Return | Pgup| + * |-------------------| |-------------------------------------------------------------------| + * | | 3 | 2 | 1 | |Shift | Z| X| C| V| B| N| M| ,| .| /|Shift | Up | Pgdn| + * | ENT|-------------------------------------------------------------------------------------| + * | | . | 0 | | Ctrl | Win | Alt | Space | FN | Ctrl | |Left| Dn | Rght| + * `------------------------------------------------------------------------------------------' + */ + [0] = LAYOUT_ext65( + RGB_M_T, BL_INC , BL_DEC , BL_TOGG, 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_PSCR, + RGB_TOG, KC_P9 , KC_P8 , KC_P7 , KC_TAB , KC_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_PPLS, KC_P6 , KC_P5 , KC_P4 , 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_PENT, KC_P3 , KC_P2 , KC_P1 , 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_PENT, KC_PDOT, KC_P0 , KC_P0 , KC_LCTL, KC_LGUI, KC_LALT, KC_SPC , MO(1) , KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT + ), + + [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, 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, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ), + + [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_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, 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_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_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ) +}; + +#ifdef OLED_DRIVER_ENABLE + +void render_layer_state(void) { + oled_write_ln(PSTR("LAYER"), false); + oled_write_ln(PSTR("L1"), layer_state_is(1)); + oled_write_ln(PSTR("L2"), layer_state_is(2)); + oled_write_ln(PSTR("L3"), layer_state_is(3)); + oled_write_ln(PSTR(" "), false); +} + +void render_keylock_status(led_t led_state) { + oled_write_ln(PSTR("Lock:"), false); + oled_write(PSTR("N"), led_state.num_lock); + oled_write(PSTR("C"), led_state.caps_lock); + oled_write_ln(PSTR("S"), led_state.scroll_lock); + oled_write_ln(PSTR(" "), false); +} + +void render_mod_status(uint8_t modifiers) { + oled_write_ln(PSTR("Mods:"), false); + oled_write(PSTR("S"), (modifiers & MOD_MASK_SHIFT)); + oled_write(PSTR("C"), (modifiers & MOD_MASK_CTRL)); + oled_write(PSTR("A"), (modifiers & MOD_MASK_ALT)); + oled_write_ln(PSTR("G"), (modifiers & MOD_MASK_GUI)); + oled_write_ln(PSTR(" "), false); +} + +void oled_task_user(void) { + render_layer_state(); + render_keylock_status(host_keyboard_led_state()); + render_mod_status(get_mods()|get_oneshot_mods()); +} + +#endif diff --git a/keyboards/aeboards/ext65/rev2/keymaps/via/readme.md b/keyboards/aeboards/ext65/rev2/keymaps/via/readme.md new file mode 100644 index 000000000000..4be6efb9e7e4 --- /dev/null +++ b/keyboards/aeboards/ext65/rev2/keymaps/via/readme.md @@ -0,0 +1,2 @@ +# The VIA Ext65Rev2 Layout + diff --git a/keyboards/aeboards/ext65/rev2/keymaps/via/rules.mk b/keyboards/aeboards/ext65/rev2/keymaps/via/rules.mk new file mode 100644 index 000000000000..1e5b99807cb7 --- /dev/null +++ b/keyboards/aeboards/ext65/rev2/keymaps/via/rules.mk @@ -0,0 +1 @@ +VIA_ENABLE = yes diff --git a/keyboards/aeboards/ext65/rev2/mcuconf.h b/keyboards/aeboards/ext65/rev2/mcuconf.h new file mode 100644 index 000000000000..048eb4df650d --- /dev/null +++ b/keyboards/aeboards/ext65/rev2/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/aeboards/ext65/rev2/readme.md b/keyboards/aeboards/ext65/rev2/readme.md new file mode 100644 index 000000000000..0a0aa18af05c --- /dev/null +++ b/keyboards/aeboards/ext65/rev2/readme.md @@ -0,0 +1,13 @@ +# Ext65Rev2 + +Ext65Rev2 Keyboard + +* Keyboard Maintainer: [Xelus22](https://github.com/Xelus22) +* Hardware Supported: Ext65Rev2 +* Hardware Availability: [Keyboard Treehouse](https://keyboardtreehouse.com/collections/all/products/ext65-r2-pcb) + +Make example for this keyboard (after setting up your build environment): + + make aeboards/ext65/rev2: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/aeboards/ext65/rev2/rev2.c b/keyboards/aeboards/ext65/rev2/rev2.c new file mode 100644 index 000000000000..35e88a8b1968 --- /dev/null +++ b/keyboards/aeboards/ext65/rev2/rev2.c @@ -0,0 +1,45 @@ +#include "rev2.h" + +#ifdef OLED_DRIVER_ENABLE +void board_init(void) { + SYSCFG->CFGR1 |= SYSCFG_CFGR1_I2C1_DMA_RMP; + SYSCFG->CFGR1 &= ~(SYSCFG_CFGR1_SPI2_DMA_RMP); +} + +oled_rotation_t oled_init_user(oled_rotation_t rotation) { + return OLED_ROTATION_90; // rotates the display 90 degrees +} + +#else + +void keyboard_pre_init_user(void) { + // Call the keyboard pre init code. + // Set our LED pins as output + setPinOutput(B4); + setPinOutput(B3); + setPinOutput(A15); + setPinOutput(A14); +} + +bool led_update_kb(led_t led_state) { + bool res = led_update_user(led_state); + if(res) { + writePin(B4, led_state.num_lock); + writePin(B3, led_state.caps_lock); + writePin(A15, led_state.scroll_lock); + } + return res; +} + +layer_state_t layer_state_set_kb(layer_state_t state) { + switch (get_highest_layer(state)) { + case 1: + writePinHigh(A14); + break; + default: // for any other layers, or the default layer + writePinLow(A14); + break; + } + return layer_state_set_user(state); +} +#endif diff --git a/keyboards/aeboards/ext65/rev2/rev2.h b/keyboards/aeboards/ext65/rev2/rev2.h new file mode 100644 index 000000000000..23a4d7c89e93 --- /dev/null +++ b/keyboards/aeboards/ext65/rev2/rev2.h @@ -0,0 +1,24 @@ +#pragma once + +#include "quantum.h" + +#define ____ KC_NO + +#define LAYOUT_ext65( \ + K000, K100, K001, K101, K002, K102, K003, K103, K004, K104, K005, K105, K006, K106, K007, K107, K008, K108, K508, K009, \ + K200, K300, K201, K301, K202, K302, K203, K303, K204, K304, K205, K305, K206, K306, K207, K307, K208, K308, K209, \ + K400, K500, K401, K501, K402, K502, K403, K503, K404, K504, K405, K505, K406, K506, K407, K507, K408, K409, \ + K600, K700, K601, K701, K602, K702, K603, K703, K604, K704, K605, K705, K606, K706, K607, K708, K608, K709, \ + K800, K900, K801, K901, K802, K902, K803, K805, K906, K807, K908, K808, K909 \ +) { \ + { 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, K208, K209 }, \ + { K300, K301, K302, K303, K304, K305, K306, K307, K308, ____ }, \ + { K400, K401, K402, K403, K404, K405, K406, K407, K408, K409 }, \ + { K500, K501, K502, K503, K504, K505, K506, K507, K508, ____ }, \ + { K600, K601, K602, K603, K604, K605, K606, K607, K608, ____ }, \ + { K700, K701, K702, K703, K704, K705, K706, ____, K708, K709 }, \ + { K800, K801, K802, K803, ____, K805, ____, K807, K808, ____ }, \ + { K900, K901, K902, ____, ____, ____, K906, ____, K908, K909 } \ +} diff --git a/keyboards/aeboards/ext65/rev2/rules.mk b/keyboards/aeboards/ext65/rev2/rules.mk new file mode 100644 index 000000000000..78d1e586ad35 --- /dev/null +++ b/keyboards/aeboards/ext65/rev2/rules.mk @@ -0,0 +1,23 @@ +# MCU name +MCU = STM32F072 + +# 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 = 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 = yes # USB Nkey Rollover +BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow +BLUETOOTH_ENABLE = no # Enable Bluetooth +AUDIO_ENABLE = no # Audio output +WS2812_DRIVER = spi + +# Enter lower-power sleep mode when on the ChibiOS idle thread +OPT_DEFS += -DCORTEX_ENABLE_WFI_IDLE=TRUE From 7c7078faf36b9d302186f8dd4b7152ab159df050 Mon Sep 17 00:00:00 2001 From: Dimiter Geelen Date: Thu, 13 Aug 2020 02:28:37 +0200 Subject: [PATCH 556/930] [Keymap] DZ60RGB - Add personal keymap (#9989) * DZ60RGB V1 - Add personal configuration (cherry picked from commit 313ce586e998f5604ed1b559bbe90de381f0b782) * [Keymap] Didel - Add license headers * [Keymap] Didel - Reformat Keymap * [Keymap] Didel - Add named layers --- .../dztech/dz60rgb/keymaps/didel/config.h | 23 +++++++ .../dztech/dz60rgb/keymaps/didel/keymap.c | 60 +++++++++++++++++++ .../dztech/dz60rgb/keymaps/didel/rules.mk | 1 + 3 files changed, 84 insertions(+) create mode 100644 keyboards/dztech/dz60rgb/keymaps/didel/config.h create mode 100644 keyboards/dztech/dz60rgb/keymaps/didel/keymap.c create mode 100644 keyboards/dztech/dz60rgb/keymaps/didel/rules.mk diff --git a/keyboards/dztech/dz60rgb/keymaps/didel/config.h b/keyboards/dztech/dz60rgb/keymaps/didel/config.h new file mode 100644 index 000000000000..32f04d817a6f --- /dev/null +++ b/keyboards/dztech/dz60rgb/keymaps/didel/config.h @@ -0,0 +1,23 @@ +/* + Keymap for the DZ60RGB keyboard. + Copyright (C) 2020 Dimiter Geelen + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License 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 FORCE_NKRO +#define PERMISSIVE_HOLD +#define TAPPING_TERM 150 diff --git a/keyboards/dztech/dz60rgb/keymaps/didel/keymap.c b/keyboards/dztech/dz60rgb/keymaps/didel/keymap.c new file mode 100644 index 000000000000..d88bc1092fc6 --- /dev/null +++ b/keyboards/dztech/dz60rgb/keymaps/didel/keymap.c @@ -0,0 +1,60 @@ +/* + Keymap for the DZ60RGB keyboard. + Copyright (C) 2020 Dimiter Geelen + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public 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 didel_layers { + _QWERTY, + _MEDIA, + _RGB, + _DVORAK, +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_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_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, + LSFT_T(KC_GRAVE), 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, LM(1, MOD_LALT), KC_LGUI, KC_SPC, KC_RALT, MO(1), KC_LEFT, KC_DOWN, KC_RGHT + ), + + [_MEDIA] = 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_POWER, + _______, _______, 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, + _______, _______, _______, _______, _______, _______, KC_MPRV, KC_VOLD, KC_MNXT + ), + + [_RGB] = 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, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + + [_DVORAK] = LAYOUT( + KC_DLR, KC_AMPR, KC_LBRC, KC_LCBR, KC_RCBR, KC_LPRN, KC_EQL, KC_ASTR, KC_RPRN, KC_PLUS, KC_RBRC, KC_EXLM, KC_HASH, KC_BSPC, + KC_TAB, KC_SCLN, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_SLSH, KC_AT, KC_BSLS, + KC_CAPS, 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_QUOT, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, RSFT_T(KC_Z), KC_UP, 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/keymaps/didel/rules.mk b/keyboards/dztech/dz60rgb/keymaps/didel/rules.mk new file mode 100644 index 000000000000..23a7632433d4 --- /dev/null +++ b/keyboards/dztech/dz60rgb/keymaps/didel/rules.mk @@ -0,0 +1 @@ +NKRO_ENABLE = yes From 156ed69b46b36fa8baaa72721085d632d34ea5be Mon Sep 17 00:00:00 2001 From: Ibnu Daru Aji Date: Fri, 14 Aug 2020 05:14:19 +0700 Subject: [PATCH 557/930] Fixing squiggle's `layout`s in the config.qmk.fm (#10019) * the `layout`s in `info.json` should actually reflects the `layout`s macros in the `rev1/rev1.h`. * fixed complicated's thumb keys. --- keyboards/squiggle/rev1/info.json | 106 +++++++++++++++--------------- 1 file changed, 53 insertions(+), 53 deletions(-) diff --git a/keyboards/squiggle/rev1/info.json b/keyboards/squiggle/rev1/info.json index 2bb974c7ad27..2e89d3b62728 100644 --- a/keyboards/squiggle/rev1/info.json +++ b/keyboards/squiggle/rev1/info.json @@ -13,39 +13,39 @@ {"label":"r", "x":3, "y":0.1}, {"label":"t", "x":4, "y":0.15}, - {"label":"a", "x":0, "y":1.9}, - {"label":"s", "x":1, "y":1.2}, - {"label":"d", "x":2, "y":1}, - {"label":"f", "x":3, "y":1.1}, - {"label":"g", "x":4, "y":1.15}, - - {"label":"z", "x":0, "y":2.9}, - {"label":"x", "x":1, "y":2.2}, - {"label":"c", "x":2, "y":2}, - {"label":"v", "x":3, "y":2.1}, - {"label":"b", "x":4, "y":2.15}, - - {"label":"bspc/lwr", "x":3, "y":3.6, "h":2}, - {"label":"esc/sft", "x":4, "y":3.65, "h":2}, - {"label":"y", "x":5, "y":0.15}, {"label":"u", "x":6, "y":0.1}, {"label":"i", "x":7, "y":0}, {"label":"o", "x":8, "y":0.2}, {"label":"p", "x":9, "y":0.9}, + {"label":"a", "x":0, "y":1.9}, + {"label":"s", "x":1, "y":1.2}, + {"label":"d", "x":2, "y":1}, + {"label":"f", "x":3, "y":1.1}, + {"label":"g", "x":4, "y":1.15}, + {"label":"h", "x":5, "y":1.15}, {"label":"j", "x":6, "y":1.1}, {"label":"k", "x":7, "y":1}, {"label":"l", "x":8, "y":1.2}, {"label":"'", "x":9, "y":1.9}, + {"label":"z", "x":0, "y":2.9}, + {"label":"x", "x":1, "y":2.2}, + {"label":"c", "x":2, "y":2}, + {"label":"v", "x":3, "y":2.1}, + {"label":"b", "x":4, "y":2.15}, + {"label":"n", "x":5, "y":2.15}, {"label":"m", "x":6, "y":2.1}, {"label":",", "x":7, "y":2}, {"label":".", "x":8, "y":2.2}, {"label":"/", "x":9, "y":2.9}, + {"label":"bspc/lwr", "x":3, "y":3.6, "h":2}, + {"label":"esc/sft", "x":4, "y":3.65, "h":2}, + {"label":"ent/alt", "x":5, "y":3.65, "h":2}, {"label":"spc/ris", "x":6, "y":3.6, "h":2} ] @@ -58,43 +58,43 @@ {"label":"r", "x":3, "y":0.1}, {"label":"t", "x":4, "y":0.15}, - {"label":"a", "x":0, "y":1.9}, - {"label":"s", "x":1, "y":1.2}, - {"label":"d", "x":2, "y":1}, - {"label":"f", "x":3, "y":1.1}, - {"label":"g", "x":4, "y":1.15}, - - {"label":"z", "x":0, "y":2.9}, - {"label":"x", "x":1, "y":2.2}, - {"label":"c", "x":2, "y":2}, - {"label":"v", "x":3, "y":2.1}, - {"label":"b", "x":4, "y":2.15}, - - {"label":"lower", "x":2, "y":3.6, "h":2}, - {"label":"bspc", "x":3, "y":3.6, "h":2}, - {"label":"esc/sft", "x":4, "y":3.65, "h":2}, - {"label":"y", "x":5, "y":0.15}, {"label":"u", "x":6, "y":0.1}, {"label":"i", "x":7, "y":0}, {"label":"o", "x":8, "y":0.2}, {"label":"p", "x":9, "y":0.9}, + {"label":"a", "x":0, "y":1.9}, + {"label":"s", "x":1, "y":1.2}, + {"label":"d", "x":2, "y":1}, + {"label":"f", "x":3, "y":1.1}, + {"label":"g", "x":4, "y":1.15}, + {"label":"h", "x":5, "y":1.15}, {"label":"j", "x":6, "y":1.1}, {"label":"k", "x":7, "y":1}, {"label":"l", "x":8, "y":1.2}, {"label":"'", "x":9, "y":1.9}, + {"label":"z", "x":0, "y":2.9}, + {"label":"x", "x":1, "y":2.2}, + {"label":"c", "x":2, "y":2}, + {"label":"v", "x":3, "y":2.1}, + {"label":"b", "x":4, "y":2.15}, + {"label":"n", "x":5, "y":2.15}, {"label":"m", "x":6, "y":2.1}, {"label":",", "x":7, "y":2}, {"label":".", "x":8, "y":2.2}, {"label":"/", "x":9, "y":2.9}, + {"label":"lower", "x":2, "y":3.6, "h":1.25}, + {"label":"bspc", "x":3, "y":3.6, "h":2}, + {"label":"esc/sft", "x":4, "y":3.65, "h":2}, + {"label":"ent/alt", "x":5, "y":3.65, "h":2}, {"label":"spc", "x":6, "y":3.6, "h":2}, - {"label":"raise", "x":7, "y":3.6, "h":2} + {"label":"raise", "x":7, "y":3.6, "h":1.25} ] }, "LAYOUT_complicated": { @@ -105,45 +105,45 @@ {"label":"r", "x":3, "y":0.1}, {"label":"t", "x":4, "y":0.15}, - {"label":"a", "x":0, "y":1.9}, - {"label":"s", "x":1, "y":1.2}, - {"label":"d", "x":2, "y":1}, - {"label":"f", "x":3, "y":1.1}, - {"label":"g", "x":4, "y":1.15}, - - {"label":"z", "x":0, "y":2.9}, - {"label":"x", "x":1, "y":2.2}, - {"label":"c", "x":2, "y":2}, - {"label":"v", "x":3, "y":2.1}, - {"label":"b", "x":4, "y":2.15}, - - {"label":"bspc", "x":3, "y":3.6, "h":2}, - {"label":"esc/sft", "x":4, "y":3.65, "h":2}, - {"label":"lower", "x":3, "y":4.6, "h":2}, - {"label":"gui", "x":4, "y":4.65, "h":2}, - {"label":"y", "x":5, "y":0.15}, {"label":"u", "x":6, "y":0.1}, {"label":"i", "x":7, "y":0}, {"label":"o", "x":8, "y":0.2}, {"label":"p", "x":9, "y":0.9}, + {"label":"a", "x":0, "y":1.9}, + {"label":"s", "x":1, "y":1.2}, + {"label":"d", "x":2, "y":1}, + {"label":"f", "x":3, "y":1.1}, + {"label":"g", "x":4, "y":1.15}, + {"label":"h", "x":5, "y":1.15}, {"label":"j", "x":6, "y":1.1}, {"label":"k", "x":7, "y":1}, {"label":"l", "x":8, "y":1.2}, {"label":"'", "x":9, "y":1.9}, + {"label":"z", "x":0, "y":2.9}, + {"label":"x", "x":1, "y":2.2}, + {"label":"c", "x":2, "y":2}, + {"label":"v", "x":3, "y":2.1}, + {"label":"b", "x":4, "y":2.15}, + {"label":"n", "x":5, "y":2.15}, {"label":"m", "x":6, "y":2.1}, {"label":",", "x":7, "y":2}, {"label":".", "x":8, "y":2.2}, {"label":"/", "x":9, "y":2.9}, - {"label":"ent/alt", "x":5, "y":3.65, "h":2}, - {"label":"spc", "x":6, "y":3.6, "h":2}, - {"label":"tab", "x":5, "y":4.65, "h":2}, - {"label":"raise", "x":6, "y":4.6, "h":2} + {"label":"bspc", "x":3, "y":3.6, "h":1}, + {"label":"esc/sft", "x":4, "y":3.65, "h":1}, + {"label":"ent/alt", "x":5, "y":3.65, "h":1}, + {"label":"spc", "x":6, "y":3.6, "h":1}, + + {"label":"lower", "x":3, "y":4.6, "h":1}, + {"label":"gui", "x":4, "y":4.65, "h":1}, + {"label":"tab", "x":5, "y":4.65, "h":1}, + {"label":"raise", "x":6, "y":4.6, "h":1} ] } } From 517f6d2c22adb0132e74396c08e21f35ae64118b Mon Sep 17 00:00:00 2001 From: Ryan Date: Fri, 14 Aug 2020 08:26:14 +1000 Subject: [PATCH 558/930] MSYS2: install packages for dfu-programmer, dfu-util, teensy-loader-cli (#10007) --- util/activate_msys2.sh | 2 -- util/activate_wsl.sh | 4 ---- util/msys2_install.sh | 4 +++- util/win_shared_install.sh | 13 ------------- 4 files changed, 3 insertions(+), 20 deletions(-) diff --git a/util/activate_msys2.sh b/util/activate_msys2.sh index f6e19f99db12..b003c1a7873c 100755 --- a/util/activate_msys2.sh +++ b/util/activate_msys2.sh @@ -3,8 +3,6 @@ function export_variables { local util_dir=~/qmk_utils export PATH=$PATH:$util_dir - export PATH=$PATH:$util_dir/dfu-programmer - export PATH=$PATH:$util_dir/dfu-util-0.9-win64 export PATH=$PATH:$util_dir/avr8-gnu-toolchain/bin export PATH=$PATH:$util_dir/gcc-arm-none-eabi/bin } diff --git a/util/activate_wsl.sh b/util/activate_wsl.sh index 7f6f5473104c..45cd945efb99 100755 --- a/util/activate_wsl.sh +++ b/util/activate_wsl.sh @@ -3,10 +3,6 @@ function export_variables { local util_dir=~/qmk_utils local download_dir=$util_dir/wsl_downloaded - - export DFU_PROGRAMMER=$download_dir/dfu-programmer/dfu-programmer.exe - export DFU_UTIL=$download_dir/dfu-util-0.9-win64/dfu-util.exe - export TEENSY_LOADER_CLI=$download_dir/teensy_loader_cli.exe } export_variables diff --git a/util/msys2_install.sh b/util/msys2_install.sh index 1b50bba707d9..1351aa5d7333 100755 --- a/util/msys2_install.sh +++ b/util/msys2_install.sh @@ -20,7 +20,7 @@ function install_avr { rm avr8-gnu-toolchain/bin/make.exe rm avr-gcc-8.3.0-x86-mingw.zip - pacman --needed --disable-download-timeout -S mingw-w64-x86_64-avrdude mingw-w64-x86_64-bootloadhid + pacman --needed --noconfirm --disable-download-timeout -S mingw-w64-x86_64-avrdude mingw-w64-x86_64-bootloadhid mingw-w64-x86_64-dfu-programmer mingw-w64-x86_64-teensy-loader-cli } function install_arm { @@ -29,6 +29,8 @@ function install_arm { echo "Extracting ARM toolchain..." unzip -q -d gcc-arm-none-eabi gcc-arm-none-eabi-8-2019-q3-update-win32.zip rm gcc-arm-none-eabi-8-2019-q3-update-win32.zip + + pacman --needed --noconfirm --disable-download-timeout -S mingw-w64-x86_64-dfu-util } pushd "$download_dir" diff --git a/util/win_shared_install.sh b/util/win_shared_install.sh index 17282bc94ddb..f45ca35170eb 100755 --- a/util/win_shared_install.sh +++ b/util/win_shared_install.sh @@ -6,18 +6,6 @@ function install_utils { pushd "$download_dir" - echo "Installing dfu-programmer" - wget 'http://downloads.sourceforge.net/project/dfu-programmer/dfu-programmer/0.7.2/dfu-programmer-win-0.7.2.zip' - unzip -d dfu-programmer dfu-programmer-win-0.7.2.zip - - echo "Installing dfu-util" - wget 'http://dfu-util.sourceforge.net/releases/dfu-util-0.9-win64.zip' - unzip dfu-util-0.9-win64.zip - - echo "Installing teensy_loader_cli" - wget 'https://www.pjrc.com/teensy/teensy_loader_cli_windows.zip' - unzip teensy_loader_cli_windows.zip - echo "Downloading the QMK driver installer" wget -qO- https://api.github.com/repos/qmk/qmk_driver_installer/releases | grep browser_download_url | head -n 1 | cut -d '"' -f 4 | wget -i - @@ -73,4 +61,3 @@ done popd > /dev/null - From c02666c4cbdae772698f2cb252a2a791225f81a9 Mon Sep 17 00:00:00 2001 From: Ramon Imbao Date: Fri, 14 Aug 2020 21:56:27 +0800 Subject: [PATCH 559/930] Add indicator LEDs for GHS.RAR (#10028) * Add indicator LEDs for GHS.RAR * Update keyboards/ghs/rar/rar.c Co-authored-by: Joel Challis Co-authored-by: Joel Challis --- keyboards/ghs/rar/rar.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/keyboards/ghs/rar/rar.c b/keyboards/ghs/rar/rar.c index 72f0654fc1e4..8f7ae3ba606a 100644 --- a/keyboards/ghs/rar/rar.c +++ b/keyboards/ghs/rar/rar.c @@ -15,3 +15,22 @@ */ #include "rar.h" + +void keyboard_pre_init_kb(void) { + // Set our LED pins as output. + setPinOutput(B1); + setPinOutput(B3); + + keyboard_pre_init_user(); +} + +bool led_update_kb(led_t led_state) { + bool res = led_update_user(led_state); + + if (res) { + writePin(B1, led_state.caps_lock); + writePin(B3, led_state.scroll_lock); + } + + return res; +} From acc4bedddcb360d2d221d7ca7882baec446457f2 Mon Sep 17 00:00:00 2001 From: Drashna Jaelre Date: Sat, 15 Aug 2020 05:18:13 -0700 Subject: [PATCH 560/930] [Keyboard] Fix Planck/Rev6 compiler issue (#9953) Specifically, don't want to have both RGBLight and RGB Matrix (with WS2812) enabled at the same time. This will cause issues in usage, but apparently not when compiling. Additionally, the led matrix was not encapsulated with preprocessor code. --- keyboards/planck/rev6/rev6.c | 2 ++ keyboards/planck/rev6/rules.mk | 3 +-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/keyboards/planck/rev6/rev6.c b/keyboards/planck/rev6/rev6.c index 6fe7772b5e2f..25c7351c7f21 100644 --- a/keyboards/planck/rev6/rev6.c +++ b/keyboards/planck/rev6/rev6.c @@ -15,6 +15,7 @@ */ #include "rev6.h" +#ifdef RGB_MATRIX_ENABLE led_config_t g_led_config = { { // Key Matrix to LED Index { NO_LED, 6, NO_LED, NO_LED, 5, NO_LED }, @@ -33,6 +34,7 @@ led_config_t g_led_config = { { LED_FLAG_ALL, LED_FLAG_ALL, LED_FLAG_ALL, LED_FLAG_ALL, LED_FLAG_ALL, LED_FLAG_ALL, LED_FLAG_ALL, LED_FLAG_ALL, LED_FLAG_ALL } }; +#endif void matrix_init_kb(void) { matrix_init_user(); diff --git a/keyboards/planck/rev6/rules.mk b/keyboards/planck/rev6/rules.mk index a1ff82b17e60..4f3790d294db 100644 --- a/keyboards/planck/rev6/rules.mk +++ b/keyboards/planck/rev6/rules.mk @@ -23,9 +23,8 @@ API_SYSEX_ENABLE = no # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -#SLEEP_LED_ENABLE = yes # Breathing sleep LED during USB suspend -RGB_MATRIX_ENABLE = WS2812 +# RGB_MATRIX_ENABLE = WS2812 # SERIAL_LINK_ENABLE = yes ENCODER_ENABLE = yes DIP_SWITCH_ENABLE = yes From f64245b10b6e388a7ea7f6aa2ebb37c93409e691 Mon Sep 17 00:00:00 2001 From: shela Date: Sat, 15 Aug 2020 21:54:52 +0900 Subject: [PATCH 561/930] [keymap] Fixed an issue that long pressed alt key does not work on PSN_FN layer. (#10039) --- keyboards/hhkb/ansi/keymaps/shela/keymap.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/keyboards/hhkb/ansi/keymaps/shela/keymap.c b/keyboards/hhkb/ansi/keymaps/shela/keymap.c index f63b99a4ff9f..9fbb46938190 100644 --- a/keyboards/hhkb/ansi/keymaps/shela/keymap.c +++ b/keyboards/hhkb/ansi/keymaps/shela/keymap.c @@ -406,6 +406,16 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { } return false; case PSE_FN: + if (record->event.pressed) { + if (l_pressed && !l_long_pressed) { + register_code(l_inner); + l_long_pressed = true; + } + if (r_pressed && !r_long_pressed) { + register_code(r_inner); + r_long_pressed = true; + } + } action_pseudo_process(record, base_layer, keymap_jis2us); return false; default: From 7c7feb44b2af2d7e6ecb452a34499885045d9726 Mon Sep 17 00:00:00 2001 From: Sendy YK Date: Sun, 16 Aug 2020 08:26:48 +0700 Subject: [PATCH 562/930] Add numpad llayout to ai03/soyuz & personal keymap (#10030) * ai03 Soyuz ## Description @ai03-2725 Soyuz: 1. Update `soyuz.h` (Add `LAYOUT_5x4`) 2. Added `keymap.c` 3. Added `readme.md` * Update readme.md * Update readme.md * Update keymap.c * Update keymap.c * Update keymap.c * Update keymap.c * Update soyuz.h Co-authored-by: Joel Challis * Update keyboards/ai03/soyuz/soyuz.h Co-authored-by: Joel Challis * Update keyboards/ai03/soyuz/keymaps/mrsendyyk/keymap.c Co-authored-by: Joel Challis * Update keyboards/ai03/soyuz/keymaps/mrsendyyk/keymap.c Co-authored-by: Joel Challis * Update rules.mk * Update keymap.c * Update keymap.c * Update keymap.c * Update readme.md * Update rules.mk * Update soyuz.h * Update soyuz.h * Update * Rename readme.md to README.md * Update keymap.c * Rename README.md to readme.md Co-authored-by: Joel Challis --- .../ai03/soyuz/keymaps/mrsendyyk/keymap.c | 24 ++++++++++++++++ .../ai03/soyuz/keymaps/mrsendyyk/readme.md | 25 +++++++++++++++++ keyboards/ai03/soyuz/rules.mk | 4 +-- keyboards/ai03/soyuz/soyuz.h | 28 +++++++++++++++++++ 4 files changed, 78 insertions(+), 3 deletions(-) create mode 100644 keyboards/ai03/soyuz/keymaps/mrsendyyk/keymap.c create mode 100644 keyboards/ai03/soyuz/keymaps/mrsendyyk/readme.md diff --git a/keyboards/ai03/soyuz/keymaps/mrsendyyk/keymap.c b/keyboards/ai03/soyuz/keymaps/mrsendyyk/keymap.c new file mode 100644 index 000000000000..f55f58a571ff --- /dev/null +++ b/keyboards/ai03/soyuz/keymaps/mrsendyyk/keymap.c @@ -0,0 +1,24 @@ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + /*[0] + *┌───┬───┬───┬───┐ + *│N L│/ │* │- │ + *├───┼───┼───┼───┤ + *│7 │8 │9 │ │ + *├───┼───┼───┤+ │ + *│4 │5 │6 │ │ + *├───┼───┼───┼───┤ + *│1 │2 │3 │ │ + *├───┴───┼───┤Ent│ + *│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/ai03/soyuz/keymaps/mrsendyyk/readme.md b/keyboards/ai03/soyuz/keymaps/mrsendyyk/readme.md new file mode 100644 index 000000000000..44db060bb769 --- /dev/null +++ b/keyboards/ai03/soyuz/keymaps/mrsendyyk/readme.md @@ -0,0 +1,25 @@ +# [Sendy YK](https://mr.sendyyk.com)'s Keymap + +`LAYOUT_numpad_5x4` + +### [0] + +``` +┌───┬───┬───┬───┐ +│N L│/ │* │- │ +├───┼───┼───┼───┤ +│7 │8 │9 │ │ +├───┼───┼───┤+ │ +│4 │5 │6 │ │ +├───┼───┼───┼───┤ +│1 │2 │3 │ │ +├───┴───┼───┤Ent│ +│0 │. │ │ +└───────┴───┴───┘ +``` + +## Build The Firmware + +You will need to build the firmware. To do so go to your terminal window and run the compile command: + + qmk compile -kb ai03/soyuz -km mrsendyyk diff --git a/keyboards/ai03/soyuz/rules.mk b/keyboards/ai03/soyuz/rules.mk index d75ca6435b70..5af8959743cd 100644 --- a/keyboards/ai03/soyuz/rules.mk +++ b/keyboards/ai03/soyuz/rules.mk @@ -25,10 +25,8 @@ 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 UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable 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 = ortho_5x4 +LAYOUTS = ortho_5x4 numpad_5x4 diff --git a/keyboards/ai03/soyuz/soyuz.h b/keyboards/ai03/soyuz/soyuz.h index a379f8ede661..05c42a6d647c 100644 --- a/keyboards/ai03/soyuz/soyuz.h +++ b/keyboards/ai03/soyuz/soyuz.h @@ -39,3 +39,31 @@ { K30, K31, K32, K33 }, \ { K40, K41, K42, K43 } \ } + +/* + * ┌───┬───┬───┬───┐ + * │00 │01 │02 │03 │ + * ├───┼───┼───┼───┤ + * │10 │11 │12 │ │ + * ├───┼───┼───┤23 │ + * │20 │21 │22 │ │ + * ├───┼───┼───┼───┤ + * │30 │31 │32 │ │ + * ├───┴───┼───┤43 │ + * │41 │42 │ │ + * └───────┴───┴───┘ +*/ + +#define LAYOUT_numpad_5x4( \ + k00, k01, k02, k03, \ + k10, k11, k12, \ + k20, k21, k22, k23, \ + k30, k31, k32, \ + k41, k42, k43 \ +) { \ + { k00, k01, k02, k03 }, \ + { k10, k11, k12, KC_NO }, \ + { k20, k21, k22, k23 }, \ + { k30, k31, k32, KC_NO }, \ + { KC_NO, k41, k42, k43 } \ +} From 249eab34e1945d8a9c4e9cd8a6de6651a2340b1c Mon Sep 17 00:00:00 2001 From: shela Date: Mon, 17 Aug 2020 02:58:33 +0900 Subject: [PATCH 563/930] Update Japanese translation of _summary.md. (#10051) --- docs/ja/_summary.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/ja/_summary.md b/docs/ja/_summary.md index a4cb75c5ea64..06c0482754aa 100644 --- a/docs/ja/_summary.md +++ b/docs/ja/_summary.md @@ -103,7 +103,7 @@ * [DIP スイッチ](ja/feature_dip_switch.md) * [エンコーダ](ja/feature_encoders.md) * [触覚フィードバック](ja/feature_haptic_feedback.md) - * [Proton C 規約](ja/proton_c_conversion.md) + * [Proton C 変換](ja/proton_c_conversion.md) * [PS/2 マウス](ja/feature_ps2_mouse.md) * [分割キーボード](ja/feature_split_keyboard.md) * [速記](ja/feature_stenography.md) @@ -111,6 +111,7 @@ * [Velocikey](ja/feature_velocikey.md) * QMK の開発 + * [PR チェックリスト](ja/pr_checklist.md) * 互換性を破る変更/Breaking changes * [概要](ja/breaking_changes.md) * [プルリクエストにフラグが付けられた](ja/breaking_changes_instructions.md) From 48bd8263a34bc9d7fdf5bea658e0dd10432a76e3 Mon Sep 17 00:00:00 2001 From: Ryan Date: Mon, 17 Aug 2020 08:10:48 +1000 Subject: [PATCH 564/930] Fix sendstring call in onekey ADC keymap (#10031) --- keyboards/handwired/onekey/keymaps/adc/keymap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/keyboards/handwired/onekey/keymaps/adc/keymap.c b/keyboards/handwired/onekey/keymaps/adc/keymap.c index 00238b8e6c62..f9302a42b247 100644 --- a/keyboards/handwired/onekey/keymaps/adc/keymap.c +++ b/keyboards/handwired/onekey/keymaps/adc/keymap.c @@ -21,7 +21,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { #ifdef CONSOLE_ENABLE printf(buffer); #else - SEND_STRING(buffer); + send_string(buffer); #endif } break; From e071206c58916e74117ebbec1ef7ec4ee957ee38 Mon Sep 17 00:00:00 2001 From: Rossman360 <53881724+Rossman360@users.noreply.github.com> Date: Sun, 16 Aug 2020 21:33:20 -0400 Subject: [PATCH 565/930] [Keyboard] Wabi handwire (#9704) * cleaning up * got some working bones * working pretty well * really livin' now * all done * copyright adjustments * default keymap * readme * no descrip * remove trailing slashes * remove blank line * remove trailing slashes * clean up readme * clean up rules spacing * bootloader spacing * made quick json from KLE converter * remove postageboard mini references * add actual manu and product values * add make example * rework * remove double bootload define * smoller image * liscensed * correct dimensions * dimensions --- keyboards/handwired/wabi/config.h | 61 +++++++++++++++++ keyboards/handwired/wabi/info.json | 12 ++++ .../handwired/wabi/keymaps/default/keymap.c | 27 ++++++++ .../wabi/keymaps/rossman360/keymap.c | 68 +++++++++++++++++++ keyboards/handwired/wabi/readme.md | 19 ++++++ keyboards/handwired/wabi/rules.mk | 22 ++++++ keyboards/handwired/wabi/wabi.c | 15 ++++ keyboards/handwired/wabi/wabi.h | 40 +++++++++++ 8 files changed, 264 insertions(+) create mode 100644 keyboards/handwired/wabi/config.h create mode 100644 keyboards/handwired/wabi/info.json create mode 100644 keyboards/handwired/wabi/keymaps/default/keymap.c create mode 100644 keyboards/handwired/wabi/keymaps/rossman360/keymap.c create mode 100644 keyboards/handwired/wabi/readme.md create mode 100644 keyboards/handwired/wabi/rules.mk create mode 100644 keyboards/handwired/wabi/wabi.c create mode 100644 keyboards/handwired/wabi/wabi.h diff --git a/keyboards/handwired/wabi/config.h b/keyboards/handwired/wabi/config.h new file mode 100644 index 000000000000..68700d487314 --- /dev/null +++ b/keyboards/handwired/wabi/config.h @@ -0,0 +1,61 @@ +/* +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 0xB07D +#define DEVICE_VER 0x0002 +#define MANUFACTURER Montsinger +#define PRODUCT Wabi + +/* 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 { D5, F5, F6, F7, B0 } +#define MATRIX_COL_PINS { F4, F1, F0, E6, B3, B7, D0, D1, D2, D3, D4, D6, D7, B5 } +#define UNUSED_PINS { B1, B2, C7, C6, B6, B4 } + +/* 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 + +/* Bootmagic Lite key configuration */ +// #define BOOTMAGIC_LITE_ROW 0 +// #define BOOTMAGIC_LITE_COLUMN 0 diff --git a/keyboards/handwired/wabi/info.json b/keyboards/handwired/wabi/info.json new file mode 100644 index 000000000000..d339f9dbc999 --- /dev/null +++ b/keyboards/handwired/wabi/info.json @@ -0,0 +1,12 @@ +{ + "keyboard_name": "Wabi", + "url": "www.montsinger.net", + "maintainer": "Montsinger", + "width": 18.5, + "height": 5, + "layouts": { + "LAYOUT": { + "layout": [{"label":"Esc", "x":1.25, "y":0}, {"label":"1", "x":2.25, "y":0}, {"label":"2", "x":3.25, "y":0}, {"label":"3", "x":4.25, "y":0}, {"label":"4", "x":5.25, "y":0}, {"label":"5", "x":6.25, "y":0}, {"label":"6", "x":8.75, "y":0}, {"label":"7", "x":9.75, "y":0}, {"label":"8", "x":10.75, "y":0}, {"label":"9", "x":11.75, "y":0}, {"label":"0", "x":12.75, "y":0}, {"label":"-", "x":13.75, "y":0}, {"label":"=", "x":14.75, "y":0}, {"label":"Backspace", "x":15.75, "y":0, "w":2}, {"label":"Tab", "x":0.75, "y":1, "w":1.5}, {"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":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":"Caps Lock", "x":0.5, "y":2, "w":1.75}, {"label":"A", "x":2.25, "y":2}, {"label":"S", "x":3.25, "y":2}, {"label":"D", "x":4.25, "y":2}, {"label":"F", "x":5.25, "y":2}, {"label":"G", "x":6.25, "y":2}, {"label":"H", "x":8.75, "y":2}, {"label":"J", "x":9.75, "y":2}, {"label":"K", "x":10.75, "y":2}, {"label":"L", "x":11.75, "y":2}, {"label":";", "x":12.75, "y":2}, {"label":"'", "x":13.75, "y":2}, {"label":"Enter", "x":14.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":8.75, "y":3}, {"label":"M", "x":9.75, "y":3}, {"label":",", "x":10.75, "y":3}, {"label":".", "x":11.75, "y":3}, {"label":"/", "x":12.75, "y":3}, {"label":"Shift", "x":13.75, "y":3, "w":2.75}, {"label":"Up", "x":16.5, "y":3}, {"label":"Ctrl", "x":0, "y":4, "w":1.25}, {"label":"Win", "x":1.25, "y":4, "w":1.25}, {"label":"Alt", "x":4, "y":4, "w":1.25}, {"label":"Space", "x":5.25, "y":4}, {"label":"Page Down", "x":6.25, "y":4, "w":1.25}, {"label":"Enter", "x":8.5, "y":4, "w":1.25}, {"label":"Space", "x":9.75, "y":4}, {"label":"Backspace", "x":10.75, "y":4, "w":1.25}, {"label":"Left", "x":15.5, "y":4}, {"label":"Down", "x":16.5, "y":4}, {"label":"Right", "x":17.5, "y":4}] } + } +} + diff --git a/keyboards/handwired/wabi/keymaps/default/keymap.c b/keyboards/handwired/wabi/keymaps/default/keymap.c new file mode 100644 index 000000000000..68d205631874 --- /dev/null +++ b/keyboards/handwired/wabi/keymaps/default/keymap.c @@ -0,0 +1,27 @@ +/* +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 . +*/ + +#include QMK_KEYBOARD_H + +#define _QWERTY 0 + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_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_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_UP, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_PGDN, KC_ENT, KC_SPC, KC_BSPC, KC_LEFT, KC_DOWN, KC_RGHT + ), +}; diff --git a/keyboards/handwired/wabi/keymaps/rossman360/keymap.c b/keyboards/handwired/wabi/keymaps/rossman360/keymap.c new file mode 100644 index 000000000000..dba4e77c25ee --- /dev/null +++ b/keyboards/handwired/wabi/keymaps/rossman360/keymap.c @@ -0,0 +1,68 @@ +/* +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 . +*/ + +#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 RSMOD LT(_FN1, KC_MINS) + +enum layer_names { + _BASE, + _DEL, + _FN1, + _FN2, + _NUM, +}; + +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_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, + JUMPBACK,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, RSMOD , KC_UP, + CMDBSP, ALTDEL, CTRLSP, TABMOD, PGMOD , ENTMOD , SPCMOD , MO(_DEL), KC_LEFT, KC_DOWN, KC_RGHT + ), +[_DEL] = LAYOUT( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + REMCAPS, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, BLINE , KC_BSPC, BWORD , KC_NO , KC_NO , _______, _______, _______, _______ + ), +[_FN1] = LAYOUT( + RESET , _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, NTAB, + _______, _______, _______, _______, _______, _______, _______, UNDO , _______, _______, _______, _______, _______, KC_SLSH, + _______, _______, _______, _______, _______, _______, KC_HOME, KC_LEFT, KC_UP , KC_RIGHT,KC_END , _______, CTAB, + _______, _______, XPANDR , _______, PMERGE , _______, _______, PMERGE , KC_DOWN, _______, _______, _______, _______, + _______, _______, _______, LWORD , RWORD , KC_NO , _______, KC_NO , _______, _______, _______ + ), +[_FN2] = LAYOUT( + _______, SPEAK1 , SPEAK2 , SPEAK3 , _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, PARADOWN, CSPEAK, _______, _______, _______, _______, _______, _______ + ), +[_NUM] = LAYOUT( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, KC_7 , KC_8 , KC_9 , _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, KC_MINS, KC_4 , KC_5 , KC_6 , KC_COLN, _______, _______, + _______, _______, _______, _______, _______, _______, _______, KC_1 , KC_2 , KC_3 , KC_BSLS, _______, _______, + _______, _______, _______, KC_0 , _______, KC_NO , KC_SPC , KC_0 , _______, _______, _______ + ), +}; diff --git a/keyboards/handwired/wabi/readme.md b/keyboards/handwired/wabi/readme.md new file mode 100644 index 000000000000..e654902fba46 --- /dev/null +++ b/keyboards/handwired/wabi/readme.md @@ -0,0 +1,19 @@ +# Wabi + +![Wabi](https://i.imgur.com/cCyv5jFl.jpg) + +A conjoined-split 60% ortholinear amoeba handwire made by Ross Montsinger with 104-keycap sets in mind. + +* Keyboard Maintainer: [Rossman360](https://github.com/rossman360) +* Hardware Supported: Postage Board Mini +* Hardware Availability: [Montsinger.net](https://montsinger.net) + +Make example for this keyboard (after setting up your build environment): + + make handwired/wabi:default + +Flashing example for this keyboard: + + make handwired/wabi: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). diff --git a/keyboards/handwired/wabi/rules.mk b/keyboards/handwired/wabi/rules.mk new file mode 100644 index 000000000000..f0423ca898fb --- /dev/null +++ b/keyboards/handwired/wabi/rules.mk @@ -0,0 +1,22 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +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 = 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 +BLUETOOTH_ENABLE = no # Enable Bluetooth +AUDIO_ENABLE = no # Audio output diff --git a/keyboards/handwired/wabi/wabi.c b/keyboards/handwired/wabi/wabi.c new file mode 100644 index 000000000000..a0d0ccbf7b64 --- /dev/null +++ b/keyboards/handwired/wabi/wabi.c @@ -0,0 +1,15 @@ +/* +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 . +*/ + +#include "wabi.h" diff --git a/keyboards/handwired/wabi/wabi.h b/keyboards/handwired/wabi/wabi.h new file mode 100644 index 000000000000..87b679efad1b --- /dev/null +++ b/keyboards/handwired/wabi/wabi.h @@ -0,0 +1,40 @@ +/* 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 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, 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, K3D, \ + K40, K41, K43, K44, K45, K46, K47, K48, 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, KC_NO }, \ + { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, KC_NO, K3D }, \ + { K40, K41, K41, K43, K44, K45, K46, K47, K48, K48, K48, K4B, K4C, K4D } \ +} From 194dc0984ee3bdaa285125c024b292794fa198d8 Mon Sep 17 00:00:00 2001 From: Viet Yen Nguyen Date: Mon, 17 Aug 2020 03:37:42 +0200 Subject: [PATCH 566/930] [Keyboard] Kinesis + Pro Micro (#9944) * [Keyboard] Kinesis + Pro Micro init - docs for DIY - custom matrix = lite - a near-factory dvorak mapping - optimized debouncing for lower latency * chore: reformatting * chore: update doc * chore: cleanups according to PR feedback * chore: PR feedback * fix: compile error * chore: add include * fix: LEDs hanging after USB disconnect * chore: enable QMK goodies by default * chore: use semantic write pin --- keyboards/kinesis/config.h | 10 -- .../keymaps/dvorak_nguyenvietyen/keymap.c | 30 +++++ keyboards/kinesis/kinesis.h | 3 + keyboards/kinesis/nguyenvietyen/README.md | 109 ++++++++++++++++++ keyboards/kinesis/nguyenvietyen/config.h | 27 +++++ keyboards/kinesis/nguyenvietyen/matrix.c | 64 ++++++++++ .../kinesis/nguyenvietyen/nguyenvietyen.c | 31 +++++ .../kinesis/nguyenvietyen/nguyenvietyen.h | 74 ++++++++++++ keyboards/kinesis/nguyenvietyen/rules.mk | 20 ++++ 9 files changed, 358 insertions(+), 10 deletions(-) create mode 100644 keyboards/kinesis/keymaps/dvorak_nguyenvietyen/keymap.c create mode 100644 keyboards/kinesis/nguyenvietyen/README.md create mode 100644 keyboards/kinesis/nguyenvietyen/config.h create mode 100644 keyboards/kinesis/nguyenvietyen/matrix.c create mode 100644 keyboards/kinesis/nguyenvietyen/nguyenvietyen.c create mode 100644 keyboards/kinesis/nguyenvietyen/nguyenvietyen.h create mode 100644 keyboards/kinesis/nguyenvietyen/rules.mk diff --git a/keyboards/kinesis/config.h b/keyboards/kinesis/config.h index db5c458bba56..29f4978623fc 100644 --- a/keyboards/kinesis/config.h +++ b/keyboards/kinesis/config.h @@ -130,14 +130,4 @@ along with this program. If not, see . //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION -#ifdef SUBPROJECT_alvicstep - #include "alvicstep/config.h" -#endif -#ifdef SUBPROJECT_stapelberg - #include "stapelberg/config.h" -#endif -#ifdef SUBPROJECT_kint2pp - #include "kint2pp/config.h" -#endif - #endif diff --git a/keyboards/kinesis/keymaps/dvorak_nguyenvietyen/keymap.c b/keyboards/kinesis/keymaps/dvorak_nguyenvietyen/keymap.c new file mode 100644 index 000000000000..a072176f43e0 --- /dev/null +++ b/keyboards/kinesis/keymaps/dvorak_nguyenvietyen/keymap.c @@ -0,0 +1,30 @@ +#include QMK_KEYBOARD_H + +#define DVORAK_MAC_MODE 0 // Base Dvorak in Kinesis's Mac Mode with (Cmd, Option, Ctrl, Cmd) thumbkeys + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +[DVORAK_MAC_MODE] = LAYOUT( + // left hand + KC_CAPS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, + KC_EQL, KC_1, KC_2, KC_3, KC_4, KC_5, + KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, + KC_ESC, KC_A, KC_O, KC_E, KC_U, KC_I, + KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, + KC_GRV, KC_INS, KC_LEFT, KC_RIGHT, + // left thumb + KC_LGUI, KC_LALT, + KC_HOME, + KC_BSPC, KC_DEL, KC_END, + // right hand + KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR, KC_SLCK, KC_PAUS, KC_NLCK, KC_POWER, + KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, + KC_F, KC_G, KC_C, KC_R, KC_L, KC_SLSH, + KC_D, KC_H, KC_T, KC_N, KC_S, KC_BSLS, + KC_B, KC_M, KC_W, KC_V, KC_Z, KC_RSFT, + KC_UP, KC_DOWN, KC_LBRC, KC_RBRC, + // right thumb + KC_RCTL, KC_RGUI, + KC_PGUP, + KC_PGDN, KC_ENT, KC_SPC + ) +}; diff --git a/keyboards/kinesis/kinesis.h b/keyboards/kinesis/kinesis.h index 42df64bf3b84..444322d1fe5d 100644 --- a/keyboards/kinesis/kinesis.h +++ b/keyboards/kinesis/kinesis.h @@ -10,6 +10,9 @@ #ifdef KEYBOARD_kinesis_kint2pp #include "kint2pp.h" #endif +#ifdef KEYBOARD_kinesis_nguyenvietyen + #include "nguyenvietyen.h" +#endif #include "quantum.h" diff --git a/keyboards/kinesis/nguyenvietyen/README.md b/keyboards/kinesis/nguyenvietyen/README.md new file mode 100644 index 000000000000..fc5390b0361c --- /dev/null +++ b/keyboards/kinesis/nguyenvietyen/README.md @@ -0,0 +1,109 @@ +# Viet's Kinesis + Pro Micro + +July 2020 + +This work is inspired by `alvicstep`'s solution. Instead of hooking up the Kinesis to a Teensy 2, this one hooks it up to a Pro Micro. + +## Kinesis Board Layout +The following is a reinterpretation of [@chrisandreae](https://github.com/chrisandreae/keyboard-firmware/blob/public/hardware/kinesis.h)'s work. + +### Used Pins +* 8 columns mapped to output pins 21 - 28 +* 16 rows mapped to 4 input pins: pin 39 - 36. Rows are traversed by iterating and setting 16 values from 0000 to 1111. +* 4 leds (e.g. capslock) mapped to input pin 1 - 4 +* keypad key mapped to pin 5 +* program key mapped to pin 6 +* `VCC` mapped to pin 40 + +### Matrix Configuration +The matrix configuration of the columns and rows on my Advantage is as follows: + +| | row 0 | row 1 | row 2 | row 3 | row 4 | row 5 | row 6 | row 7 | row 8 | row 9 | row A | row B | row C | row D | row E | row F | +| ----- | ----- | ----- | ----- | ----- | ----- | ----- | ----- | ----- | ----- | ----- | ----- | ----- | ----- | ----- | ----- | ----- | +| col0 | F6 | F8 | F7 | 5% | 4$ | 3# | 2@ | 1! | =+ | | | | | | | | +| col1 | F3 | F5 | F4 | T | R | E | W | Q | Tab | | | | | | | | +| col2 | Esc | F2 | F1 | G | F | D | S | A | CapsLk | | | | | | | | +| col3 | F9 | F11 | F10 | B | V | C | X | Z | LShift | Up | | Down | | [{ | ]} | | +| col4 | F12 | ScrLk | PrtSc | Right | | Left | Insert | ~ | | 6^ | 7& | 8* | | 9( | 0) | -_ | +| col5 | Pause | | | LAlt | | Home | | End | | Y | U | I | | O | P | `\|` | +| col6 | | | | LCtrl | Delete | Bksp | RCtrl | Enter | Space | H | J | K | | L | ;: | '" | +| col7 | | | | | RGUI | | PageUp | | PageDn | N | M | ,< | | .> | /? | RShift | + +(this is a modified copy from [@alvicstep](https://github.com/qmk/qmk_firmware/blob/master/keyboards/kinesis/alvicstep/alvicstep.h)) + +In the code, keypad and program keys are mapped respectively to col0 and col1 of row C, the 12th row. + +### Omitted Pins +There are pins that we currently omit: +* serial eeprom clock line mapped to pin 7 +* serial eeprom data line mapped to pin 8 +* EEPROM write protect mapped to pin 10. +* foot switch 1 mapped to pin 11 +* PS/2 clock mapped to pin 12 +* PS/2 data mapped to pin 13 +* foot switch 2 mapped to pin 17 +* foot switch 3 mapped to pin 15 +* audio mapped to pin 32 + +### DIP Socket +Here's an ASCII drawing of the 40 pin DIP socket. +``` + DL2 1 40 VCC + DR1 2 39 A + DR2 3 38 B + DL1 4 37 C + KPD 5 36 G + PGM 6 35 + SCL 7 34 + SDA 8 33 + RST 9 32 BUZZ + WP 10 31 EA + FS1 11 30 ALE + CLOCK 12 29 PSEN + DATA 13 28 r8 + 14 27 r7 + FS3 15 26 r6 + 16 25 r5 + FS2 17 24 r4 + XTAL1 18 23 r3 + XTAL2 19 22 r2 + GND 20 21 r1 +``` +(this is copied from [@wjanssens](https://raw.githubusercontent.com/wjanssens/tmk_keyboard/master/keyboard/kinesis/doc/readme.txt)) + +## Pin Mapping to Pro Micro + +The following table is ordered by physical Arduino pin order. + +| Arduino | Kinesis | Meaning | +| ------- | ------- | ------- | +| D3 | 36 | G | +| D2 | 37 | C | +| GND | | | +| GND | | | +| D1 | 38 | B | +| D0 | 39 | A | +| D4 | 1 | DL2 | +| C6 | 2 | DR1 | +| D7 | 3 | DR2 | +| E6 | 4 | DL1 | +| B4 | 5 | KPD | +| B5 | 6 | PGM | +| B6 | 21 | r1 | +| B2 | 22 | r2 | +| B3 | 23 | r3 | +| B1 | 24 | r4 | +| F7 | 25 | r5 | +| F6 | 26 | r6 | +| F5 | 27 | r7 | +| F4 | 28 | r8 | +| VCC | 40 | | +| RESET | | | +| GND | 20 | | +| RAW | | | + +## Notes + +* The rows are multiplexed. Instead of reading them out, one sets the row value and corresponding column values are returned through r1-r8. +* On my keyboard, the keypad and program key have dedicated pins. Since row 12 had no mapping in the physical matrix, there's a code override injects the keypad and program pins to the first two bits in the matrix. +* I've experimented with debouncing approaches. The current setting delivers a snappier feeling than Kinesis's factory default for me. diff --git a/keyboards/kinesis/nguyenvietyen/config.h b/keyboards/kinesis/nguyenvietyen/config.h new file mode 100644 index 000000000000..f221acd7e71d --- /dev/null +++ b/keyboards/kinesis/nguyenvietyen/config.h @@ -0,0 +1,27 @@ +#pragma once + +/* USB Device descriptor parameter */ +#define PRODUCT_ID 0x6060 +#define DEVICE_VER 0x0003 + +/* key matrix size */ +#define MATRIX_ROWS 16 +#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) + * + */ +// Passed through the port multipler, so 4 pins =16 +#define MATRIX_ROW_PINS { D0, D1, D2, D3 } +#define MATRIX_COL_PINS { B6, B2, B3, B1, F7, F6, F5, F4 } +#define UNUSED_PINS + +/* COL2ROW or ROW2COL */ +#define DIODE_DIRECTION COL2ROW diff --git a/keyboards/kinesis/nguyenvietyen/matrix.c b/keyboards/kinesis/nguyenvietyen/matrix.c new file mode 100644 index 000000000000..3e078946e09f --- /dev/null +++ b/keyboards/kinesis/nguyenvietyen/matrix.c @@ -0,0 +1,64 @@ +#include "matrix.h" + +#include "quantum.h" + +static matrix_row_t read_row(uint8_t row) { + matrix_io_delay(); // without this wait read unstable value. + + // keypad and program buttons + if (row == 12) { + return ~(readPin(B4) | (readPin(B5) << 1) | 0b11111100); + } + + return ~(readPin(B6) | readPin(B2) << 1 | readPin(B3) << 2 | readPin(B1) << 3 | readPin(F7) << 4 | readPin(F6) << 5 | readPin(F5) << 6 | readPin(F4) << 7); +} + +static void unselect_rows(void) { + // set A,B,C,G to 0 + PORTD &= 0xF0; +} + +static void select_rows(uint8_t row) { + // set A,B,C,G to row value + PORTD |= (0x0F & row); +} + +void matrix_init_custom(void) { + // output low (multiplexers) + setPinOutput(D0); + setPinOutput(D1); + setPinOutput(D2); + setPinOutput(D3); + + // input with pullup (matrix) + setPinInputHigh(B6); + setPinInputHigh(B2); + setPinInputHigh(B3); + setPinInputHigh(B1); + setPinInputHigh(F7); + setPinInputHigh(F6); + setPinInputHigh(F5); + setPinInputHigh(F4); + + // input with pullup (program and keypad buttons) + setPinInputHigh(B4); + setPinInputHigh(B5); + + // initialize row and col + unselect_rows(); +} + +bool matrix_scan_custom(matrix_row_t current_matrix[]) { + bool matrix_has_changed = false; + + for (uint8_t i = 0; i < MATRIX_ROWS; i++) { + select_rows(i); + matrix_row_t row = read_row(i); + unselect_rows(); + bool row_has_changed = current_matrix[i] != row; + matrix_has_changed |= row_has_changed; + current_matrix[i] = row; + } + + return matrix_has_changed; +} diff --git a/keyboards/kinesis/nguyenvietyen/nguyenvietyen.c b/keyboards/kinesis/nguyenvietyen/nguyenvietyen.c new file mode 100644 index 000000000000..1919412e9365 --- /dev/null +++ b/keyboards/kinesis/nguyenvietyen/nguyenvietyen.c @@ -0,0 +1,31 @@ +#include "nguyenvietyen.h" + +void matrix_init_kb(void) { + led_init_ports(); + matrix_init_user(); +} + +void led_init_ports() { + // * Set our LED pins as output + setPinOutput(D7); // Keypad LED + setPinOutput(C6); // ScrLock LED + setPinOutput(D4); // NumLock LED + setPinOutput(E6); // CapsLock LED + + // turn all LEDs off by default + writePinHigh(D7); + writePinHigh(C6); + writePinHigh(D4); + writePinHigh(E6); +} + +bool led_update_kb(led_t led_state) { + bool res = led_update_user(led_state); + if (res) { + writePin(D7, !led_state.compose); + writePin(C6, !led_state.scroll_lock); + writePin(D4, !led_state.num_lock); + writePin(E6, !led_state.caps_lock); + } + return res; +} diff --git a/keyboards/kinesis/nguyenvietyen/nguyenvietyen.h b/keyboards/kinesis/nguyenvietyen/nguyenvietyen.h new file mode 100644 index 000000000000..2aabcad1b8f5 --- /dev/null +++ b/keyboards/kinesis/nguyenvietyen/nguyenvietyen.h @@ -0,0 +1,74 @@ +#pragma once + +#include "quantum.h" + +#define ___ KC_NO + +#define LAYOUT( \ + k02, k22, k12, k01, k21, k11, k00, k20, k10, \ + k80, k70, k60, k50, k40, k30, \ + k81, k71, k61, k51, k41, k31, \ + k82, k72, k62, k52, k42, k32, \ + k83, k73, k63, k53, k43, k33, \ + k74, k64, k54, k34, \ + k36, k35, \ + k55, \ + k56, k46, k75, \ + \ + k03, k23, k13, k04, k24, k14, k05, kC0, kC1, \ + k94, kA4, kB4, kD4, kE4, kF4, \ + k95, kA5, kB5, kD5, kE5, kF5, \ + k96, kA6, kB6, kD6, kE6, kF6, \ + k97, kA7, kB7, kD7, kE7, kF7, \ + k93, kB3, kD3, kE3, \ + k47, k66, \ + k67, \ + k87, k76, k86 \ +) { \ + { k00, k01, k02, k03, k04, k05, ___, ___ }, \ + { k10, k11, k12, k13, k14, ___, ___, ___ }, \ + { k20, k21, k22, k23, k24, ___, ___, ___ }, \ + { k30, k31, k32, k33, k34, k35, k36, ___ }, \ + { k40, k41, k42, k43, ___, ___, k46, k47 }, \ + { k50, k51, k52, k53, k54, k55, k56, ___ }, \ + { k60, k61, k62, k63, k64, ___, k66, k67 }, \ + { k70, k71, k72, k73, k74, k75, k76, ___ }, \ + { k80, k81, k82, k83, ___, ___, k86, k87 }, \ + { ___, ___, ___, k93, k94, k95, k96, k97 }, \ + { ___, ___, ___, ___, kA4, kA5, kA6, kA7 }, \ + { ___, ___, ___, kB3, kB4, kB5, kB6, kB7 }, \ + { kC0, kC1, ___, ___, ___, ___, ___, ___ }, \ + { ___, ___, ___, kD3, kD4, kD5, kD6, kD7 }, \ + { ___, ___, ___, kE3, kE4, kE5, kE6, kE7 }, \ + { ___, ___, ___, ___, kF4, kF5, kF6, kF7 } \ +} + +/* ---------------- LEFT HAND ----------------- ---------------- RIGHT HAND ---------------- */ +#define LAYOUT_pretty( \ + k02, k22, k12, k01, k21, k11, k00, k20, k10, k03, k23, k13, k04, k24, k14, k05, kC0, kC1, \ + k80, k70, k60, k50, k40, k30, k94, kA4, kB4, kD4, kE4, kF4, \ + k81, k71, k61, k51, k41, k31, k95, kA5, kB5, kD5, kE5, kF5, \ + k82, k72, k62, k52, k42, k32, k96, kA6, kB6, kD6, kE6, kF6, \ + k83, k73, k63, k53, k43, k33, k97, kA7, kB7, kD7, kE7, kF7, \ + k74, k64, k54, k34, k93, kB3, kD3, kE3, \ + k36, k35, k47, k66, \ + k55, k67, \ + k56, k46, k75, k87, k76, k86 \ +) { \ + { k00, k01, k02, k03, k04, k05, ___, ___ }, \ + { k10, k11, k12, k13, k14, ___, ___, ___ }, \ + { k20, k21, k22, k23, k24, ___, ___, ___ }, \ + { k30, k31, k32, k33, k34, k35, k36, ___ }, \ + { k40, k41, k42, k43, ___, ___, k46, k47 }, \ + { k50, k51, k52, k53, k54, k55, k56, ___ }, \ + { k60, k61, k62, k63, k64, ___, k66, k67 }, \ + { k70, k71, k72, k73, k74, k75, k76, ___ }, \ + { k80, k81, k82, k83, ___, ___, k86, k87 }, \ + { ___, ___, ___, k93, k94, k95, k96, k97 }, \ + { ___, ___, ___, ___, kA4, kA5, kA6, kA7 }, \ + { ___, ___, ___, kB3, kB4, kB5, kB6, kB7 }, \ + { kC0, kC1, ___, ___, ___, ___, ___, ___ }, \ + { ___, ___, ___, kD3, kD4, kD5, kD6, kD7 }, \ + { ___, ___, ___, kE3, kE4, kE5, kE6, kE7 }, \ + { ___, ___, ___, ___, kF4, kF5, kF6, kF7 } \ +} diff --git a/keyboards/kinesis/nguyenvietyen/rules.mk b/keyboards/kinesis/nguyenvietyen/rules.mk new file mode 100644 index 000000000000..c2d5f729bc19 --- /dev/null +++ b/keyboards/kinesis/nguyenvietyen/rules.mk @@ -0,0 +1,20 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +BOOTLOADER = caterina + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = yes +MOUSEKEY_ENABLE = yes +EXTRAKEY_ENABLE = yes +COMMAND_ENABLE = yes +NKRO_ENABLE = yes +SLEEP_LED_ENABLE = yes +CUSTOM_MATRIX = lite +SRC += matrix.c + +# experimentally determined to be sufficient :) +DEBOUNCE=1 From 3b3a1b2a635fd41808cf58ddf9f33b89f6db3e5e Mon Sep 17 00:00:00 2001 From: kelvinhall05 <56369403+kelvinhall05@users.noreply.github.com> Date: Sun, 16 Aug 2020 21:42:26 -0400 Subject: [PATCH 567/930] [Keyboard] Southpaw75 (#9844) * adding southpaw75 * Added readme.md for Southpaw75 * adding info.json * Update keyboards/southpaw75/rules.mk * Update keyboards/southpaw75/southpaw75.h * Update keyboards/southpaw75/keymaps/default/keymap.c * Update keyboards/southpaw75/config.h * Update keyboards/southpaw75/southpaw75.h * Update keyboards/southpaw75/keymaps/default/keymap.c * Update keyboards/southpaw75/rules.mk * Update keyboards/southpaw75/rules.mk * Update keyboards/southpaw75/config.h * Update keyboards/southpaw75/readme.md * Update keyboards/southpaw75/readme.md * Update config.h * Update keymap.c * Update readme.md * Update southpaw75.c * Update southpaw75.h --- keyboards/southpaw75/config.h | 47 +++++++++++++++++++ keyboards/southpaw75/info.json | 12 +++++ keyboards/southpaw75/keymaps/default/keymap.c | 29 ++++++++++++ keyboards/southpaw75/readme.md | 16 +++++++ keyboards/southpaw75/rules.mk | 22 +++++++++ keyboards/southpaw75/southpaw75.c | 17 +++++++ keyboards/southpaw75/southpaw75.h | 37 +++++++++++++++ 7 files changed, 180 insertions(+) create mode 100644 keyboards/southpaw75/config.h create mode 100644 keyboards/southpaw75/info.json create mode 100644 keyboards/southpaw75/keymaps/default/keymap.c create mode 100644 keyboards/southpaw75/readme.md create mode 100644 keyboards/southpaw75/rules.mk create mode 100644 keyboards/southpaw75/southpaw75.c create mode 100644 keyboards/southpaw75/southpaw75.h diff --git a/keyboards/southpaw75/config.h b/keyboards/southpaw75/config.h new file mode 100644 index 000000000000..3dd93ec540dd --- /dev/null +++ b/keyboards/southpaw75/config.h @@ -0,0 +1,47 @@ + /* + Copyright 2020 Kelvin Hall + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License 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 0x350C +#define DEVICE_VER 0x0001 +#define MANUFACTURER kelvinhall05 +#define PRODUCT Southpaw75 + +/* key matrix size */ +#define MATRIX_ROWS 9 +#define MATRIX_COLS 9 + +/* key matrix pins */ +#define MATRIX_ROW_PINS { D3, D2, D1, D0, D4, C6, D7, E6, B4 } +#define MATRIX_COL_PINS { B5, F4, F5, F6, F7, B1, B3, B2, B6 } +#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/southpaw75/info.json b/keyboards/southpaw75/info.json new file mode 100644 index 000000000000..940165c45eac --- /dev/null +++ b/keyboards/southpaw75/info.json @@ -0,0 +1,12 @@ +{ + "keyboard_name": "Southpaw75", + "url": "https://github.com/kelvinhall05/southpaw75", + "maintainer": "kelvinhall05", + "width": 19, + "height": 5, + "layouts": { + "LAYOUT": { + "layout": [{"label":"Num Lock", "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":"_", "x":15, "y":0}, {"label":"+", "x":16, "y":0}, {"label":"Backspace", "x":17, "y":0, "w":2}, {"label":"7", "x":0, "y":1}, {"label":"8", "x":1, "y":1}, {"label":"9", "x":2, "y":1}, {"label":"+", "x":3, "y":1, "h":2}, {"label":"Tab", "x":4, "y":1, "w":1.5}, {"label":"Q", "x":5.5, "y":1}, {"label":"W", "x":6.5, "y":1}, {"label":"E", "x":7.5, "y":1}, {"label":"R", "x":8.5, "y":1}, {"label":"T", "x":9.5, "y":1}, {"label":"Y", "x":10.5, "y":1}, {"label":"U", "x":11.5, "y":1}, {"label":"I", "x":12.5, "y":1}, {"label":"O", "x":13.5, "y":1}, {"label":"P", "x":14.5, "y":1}, {"label":"{", "x":15.5, "y":1}, {"label":"}", "x":16.5, "y":1}, {"label":"|", "x":17.5, "y":1, "w":1.5}, {"label":"4", "x":0, "y":2}, {"label":"5", "x":1, "y":2}, {"label":"6", "x":2, "y":2}, {"label":"Caps Lock", "x":4, "y":2, "w":1.75}, {"label":"A", "x":5.75, "y":2}, {"label":"S", "x":6.75, "y":2}, {"label":"D", "x":7.75, "y":2}, {"label":"F", "x":8.75, "y":2}, {"label":"G", "x":9.75, "y":2}, {"label":"H", "x":10.75, "y":2}, {"label":"J", "x":11.75, "y":2}, {"label":"K", "x":12.75, "y":2}, {"label":"L", "x":13.75, "y":2}, {"label":":", "x":14.75, "y":2}, {"label":"\"", "x":15.75, "y":2}, {"label":"Enter", "x":16.75, "y":2, "w":2.25}, {"label":"1", "x":0, "y":3}, {"label":"2", "x":1, "y":3}, {"label":"3", "x":2, "y":3}, {"label":"Enter", "x":3, "y":3, "h":2}, {"label":"Shift", "x":4, "y":3, "w":2.25}, {"label":"Z", "x":6.25, "y":3}, {"label":"X", "x":7.25, "y":3}, {"label":"C", "x":8.25, "y":3}, {"label":"V", "x":9.25, "y":3}, {"label":"B", "x":10.25, "y":3}, {"label":"N", "x":11.25, "y":3}, {"label":"M", "x":12.25, "y":3}, {"label":"<", "x":13.25, "y":3}, {"label":">", "x":14.25, "y":3}, {"label":"?", "x":15.25, "y":3}, {"label":"Shift", "x":16.25, "y":3, "w":2.75}, {"label":"0", "x":0, "y":4, "w":2}, {"label":".", "x":2, "y":4}, {"label":"Ctrl", "x":4, "y":4, "w":1.25}, {"label":"Win", "x":5.25, "y":4, "w":1.25}, {"label":"Alt", "x":6.5, "y":4, "w":1.25}, {"x":7.75, "y":4, "w":6.25}, {"label":"Alt", "x":14, "y":4, "w":1.25}, {"label":"Win", "x":15.25, "y":4, "w":1.25}, {"label":"Menu", "x":16.5, "y":4, "w":1.25}, {"label":"Ctrl", "x":17.75, "y":4, "w":1.25}] + } + } +} diff --git a/keyboards/southpaw75/keymaps/default/keymap.c b/keyboards/southpaw75/keymaps/default/keymap.c new file mode 100644 index 000000000000..8d3edfd9674e --- /dev/null +++ b/keyboards/southpaw75/keymaps/default/keymap.c @@ -0,0 +1,29 @@ + /* + Copyright 2020 Kelvin Hall + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public 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_NLCK, KC_PSLS, KC_PAST, KC_PMNS, 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_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_P4, KC_P5, KC_P6, 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_P0, KC_PDOT, KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_LALT, KC_LGUI, KC_MENU, KC_LCTL + ) + +}; diff --git a/keyboards/southpaw75/readme.md b/keyboards/southpaw75/readme.md new file mode 100644 index 000000000000..bcbc82552894 --- /dev/null +++ b/keyboards/southpaw75/readme.md @@ -0,0 +1,16 @@ +# Southpaw75 + +![Southpaw75](https://i.imgur.com/BBXclH1l.jpg) + +60% with southpaw numpad. + +* Keyboard Maintainer: [kelvinhall05](https://github.com/kelvinhall05/) +* Hardware Supported: Southpaw75 Pro Micro PCB +* Hardware Availability: https://github.com/kelvinhall05/southpaw75 + +Make example for this keyboard (after setting up your build environment): + + make southpaw75: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/southpaw75/rules.mk b/keyboards/southpaw75/rules.mk new file mode 100644 index 000000000000..e70a8a7d6044 --- /dev/null +++ b/keyboards/southpaw75/rules.mk @@ -0,0 +1,22 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +BOOTLOADER = caterina + +# 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 +BLUETOOTH_ENABLE = no # Enable Bluetooth +AUDIO_ENABLE = no # Audio output diff --git a/keyboards/southpaw75/southpaw75.c b/keyboards/southpaw75/southpaw75.c new file mode 100644 index 000000000000..c9c6f2d36696 --- /dev/null +++ b/keyboards/southpaw75/southpaw75.c @@ -0,0 +1,17 @@ + /* + Copyright 2020 Kelvin Hall + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . + */ +#include "southpaw75.h" diff --git a/keyboards/southpaw75/southpaw75.h b/keyboards/southpaw75/southpaw75.h new file mode 100644 index 000000000000..7842d8ea9068 --- /dev/null +++ b/keyboards/southpaw75/southpaw75.h @@ -0,0 +1,37 @@ + /* + Copyright 2020 Kelvin Hall + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License 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, 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 \ +) { \ + { 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, KC_NO, KC_NO, KC_NO } \ +} From febf27361a6846d4c94cbe4adaeba87bc7726da6 Mon Sep 17 00:00:00 2001 From: Mike Rix Wolfe <2893679+MikeRixWolfe@users.noreply.github.com> Date: Sun, 16 Aug 2020 20:44:56 -0500 Subject: [PATCH 568/930] update mikefightsbears keymap for Lily58 (#9988) --- .../lily58/keymaps/mikefightsbears/config.h | 4 +- .../lily58/keymaps/mikefightsbears/keymap.c | 58 +++++++------------ .../lily58/keymaps/mikefightsbears/rules.mk | 4 +- 3 files changed, 23 insertions(+), 43 deletions(-) diff --git a/keyboards/lily58/keymaps/mikefightsbears/config.h b/keyboards/lily58/keymaps/mikefightsbears/config.h index 58bbdc5e9d05..6b9e52c05ee0 100644 --- a/keyboards/lily58/keymaps/mikefightsbears/config.h +++ b/keyboards/lily58/keymaps/mikefightsbears/config.h @@ -28,8 +28,6 @@ along with this program. If not, see . // #define MASTER_RIGHT // #define EE_HANDS -#define SSD1306OLED - #define USE_SERIAL_PD2 #define TAPPING_FORCE_HOLD @@ -49,4 +47,4 @@ along with this program. If not, see . #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 index 51f2ee8b3e20..d6e24ef3c696 100644 --- a/keyboards/lily58/keymaps/mikefightsbears/keymap.c +++ b/keyboards/lily58/keymaps/mikefightsbears/keymap.c @@ -8,8 +8,6 @@ #include "ssd1306.h" #endif - - #ifdef RGBLIGHT_ENABLE //Following line allows macro to read current RGB settings extern rgblight_config_t rgblight_config; @@ -135,16 +133,18 @@ 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 +//SSD1306 OLED update loop, make sure to enable OLED_DRIVER_ENABLE=yes in rules.mk +#ifdef OLED_DRIVER_ENABLE -// When add source files to SRC in rules.mk, you can use functions. +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; +} + +// When you 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); @@ -156,42 +156,24 @@ const char *read_keylogs(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) { +void oled_task_user(void) { + if (is_keyboard_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()); + oled_write_ln(read_layer_state(), false); + oled_write_ln(read_keylog(), false); + oled_write_ln(read_keylogs(), false); + //oled_write_ln(read_mode_icon(keymap_config.swap_lalt_lgui), false); + //oled_write_ln(read_host_led_state(), false); + //oled_write_ln(read_timelog(), false); } 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; + oled_write(read_logo(), false); } } - -void iota_gfx_task_user(void) { - struct CharacterMatrix matrix; - matrix_clear(&matrix); - matrix_render_user(&matrix); - matrix_update(&display, &matrix); -} -#endif//SSD1306OLED +#endif // OLED_DRIVER_ENABLE bool process_record_user(uint16_t keycode, keyrecord_t *record) { if (record->event.pressed) { -#ifdef SSD1306OLED +#ifdef OLED_DRIVER_ENABLE set_keylog(keycode, record); #endif // set_timelog(); diff --git a/keyboards/lily58/keymaps/mikefightsbears/rules.mk b/keyboards/lily58/keymaps/mikefightsbears/rules.mk index 10793d9a538b..af08856838ea 100644 --- a/keyboards/lily58/keymaps/mikefightsbears/rules.mk +++ b/keyboards/lily58/keymaps/mikefightsbears/rules.mk @@ -6,10 +6,10 @@ 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 +OLED_DRIVER_ENABLE= yes # OLED display # If you want to change the display of OLED, you need to change here -SRC += ./lib/glcdfont.c \ - ./lib/rgb_state_reader.c \ +SRC += ./lib/rgb_state_reader.c \ ./lib/layer_state_reader.c \ ./lib/logo_reader.c \ ./lib/keylogger.c \ From 792a4802446d0d5b97924bcb305ac0686b4539d8 Mon Sep 17 00:00:00 2001 From: Maarten Dekkers Date: Mon, 17 Aug 2020 04:15:30 +0200 Subject: [PATCH 569/930] [Keyboard] Maartenwut GH80-3700 (#9960) * Add GH80-3700 * Add via keymap * Update gh80_3700.h * Update config.h * LAYOUT_all -> LAYOUT_ortho_6x4 * Update readme.md --- keyboards/maartenwut/gh80_3700/config.h | 143 ++++++++++++++++++ keyboards/maartenwut/gh80_3700/gh80_3700.c | 46 ++++++ keyboards/maartenwut/gh80_3700/gh80_3700.h | 63 ++++++++ keyboards/maartenwut/gh80_3700/info.json | 72 +++++++++ .../gh80_3700/keymaps/default/keymap.c | 26 ++++ .../gh80_3700/keymaps/default/readme.md | 1 + .../maartenwut/gh80_3700/keymaps/ps2/config.h | 69 +++++++++ .../maartenwut/gh80_3700/keymaps/ps2/keymap.c | 26 ++++ .../gh80_3700/keymaps/ps2/readme.md | 1 + .../maartenwut/gh80_3700/keymaps/ps2/rules.mk | 5 + .../maartenwut/gh80_3700/keymaps/rgb/config.h | 21 +++ .../maartenwut/gh80_3700/keymaps/rgb/keymap.c | 26 ++++ .../gh80_3700/keymaps/rgb/readme.md | 1 + .../maartenwut/gh80_3700/keymaps/rgb/rules.mk | 4 + .../maartenwut/gh80_3700/keymaps/via/keymap.c | 50 ++++++ .../maartenwut/gh80_3700/keymaps/via/rules.mk | 2 + keyboards/maartenwut/gh80_3700/readme.md | 15 ++ keyboards/maartenwut/gh80_3700/rules.mk | 24 +++ 18 files changed, 595 insertions(+) create mode 100644 keyboards/maartenwut/gh80_3700/config.h create mode 100644 keyboards/maartenwut/gh80_3700/gh80_3700.c create mode 100644 keyboards/maartenwut/gh80_3700/gh80_3700.h create mode 100644 keyboards/maartenwut/gh80_3700/info.json create mode 100644 keyboards/maartenwut/gh80_3700/keymaps/default/keymap.c create mode 100644 keyboards/maartenwut/gh80_3700/keymaps/default/readme.md create mode 100644 keyboards/maartenwut/gh80_3700/keymaps/ps2/config.h create mode 100644 keyboards/maartenwut/gh80_3700/keymaps/ps2/keymap.c create mode 100644 keyboards/maartenwut/gh80_3700/keymaps/ps2/readme.md create mode 100644 keyboards/maartenwut/gh80_3700/keymaps/ps2/rules.mk create mode 100644 keyboards/maartenwut/gh80_3700/keymaps/rgb/config.h create mode 100644 keyboards/maartenwut/gh80_3700/keymaps/rgb/keymap.c create mode 100644 keyboards/maartenwut/gh80_3700/keymaps/rgb/readme.md create mode 100644 keyboards/maartenwut/gh80_3700/keymaps/rgb/rules.mk create mode 100644 keyboards/maartenwut/gh80_3700/keymaps/via/keymap.c create mode 100644 keyboards/maartenwut/gh80_3700/keymaps/via/rules.mk create mode 100644 keyboards/maartenwut/gh80_3700/readme.md create mode 100644 keyboards/maartenwut/gh80_3700/rules.mk diff --git a/keyboards/maartenwut/gh80_3700/config.h b/keyboards/maartenwut/gh80_3700/config.h new file mode 100644 index 000000000000..6e0b24547a72 --- /dev/null +++ b/keyboards/maartenwut/gh80_3700/config.h @@ -0,0 +1,143 @@ +/* Copyright 2020 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 0x633A +#define DEVICE_VER 0x0001 +#define MANUFACTURER Maartenwut +#define PRODUCT GH80 3700 + +/* 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 {B3,C7,C6,B6,B5,B4} +#define MATRIX_COL_PINS {B0,D7,D6,D4} +#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 B2 +// #ifdef RGB_DI_PIN +// #define RGBLED_NUM 8 +// #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 + +/* + * 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 rotary encoder +#define ENCODERS_PAD_A { F1 } +#define ENCODERS_PAD_B { F4 } diff --git a/keyboards/maartenwut/gh80_3700/gh80_3700.c b/keyboards/maartenwut/gh80_3700/gh80_3700.c new file mode 100644 index 000000000000..2c3595e49e8e --- /dev/null +++ b/keyboards/maartenwut/gh80_3700/gh80_3700.c @@ -0,0 +1,46 @@ +/* Copyright 2020 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 "gh80_3700.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) { + setPinOutput(E6); + setPinOutput(B1); + setPinOutput(D0); + setPinOutput(D1); + setPinOutput(F0); + + writePinHigh(E6); + writePinHigh(B1); + writePinHigh(D0); + writePinHigh(D1); + writePinHigh(F0); +} + +bool led_update_kb(led_t led_state) { + if(led_update_user(led_state)) { + writePin(E6, !led_state.num_lock); + } + + return true; +} \ No newline at end of file diff --git a/keyboards/maartenwut/gh80_3700/gh80_3700.h b/keyboards/maartenwut/gh80_3700/gh80_3700.h new file mode 100644 index 000000000000..053885ae3231 --- /dev/null +++ b/keyboards/maartenwut/gh80_3700/gh80_3700.h @@ -0,0 +1,63 @@ +/* Copyright 2020 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" + +/* 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 LAYOUT_ortho_6x4 + +#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/maartenwut/gh80_3700/info.json b/keyboards/maartenwut/gh80_3700/info.json new file mode 100644 index 000000000000..128f44ee8d63 --- /dev/null +++ b/keyboards/maartenwut/gh80_3700/info.json @@ -0,0 +1,72 @@ +{ + "keyboard_name": "GH80-3700", + "url": "https://github.com/Maartenwut/gh80-series/tree/master/GH80-3700", + "maintainer": "Maartenwut", + "width": 4, + "height": 7, + "layouts": { + "LAYOUT_ortho_6x4": { + "layout": [ + {"x":0, "y":0}, + {"x":1, "y":0}, + {"x":2, "y":0}, + {"x":3, "y":0}, + + {"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}, + + {"x":0, "y":6}, + {"x":1, "y":6}, + {"x":2, "y":6}, + {"x":3, "y":6} + ] + }, + "LAYOUT_numpad_6x4": { + "layout": [ + {"x":0, "y":0}, + {"x":1, "y":0}, + {"x":2, "y":0}, + {"x":3, "y":0}, + + {"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":0, "y":4}, + {"x":1, "y":4}, + {"x":2, "y":4}, + {"x":3, "y":3, "h":2}, + + {"x":0, "y":5}, + {"x":1, "y":5}, + {"x":2, "y":5}, + + {"x":0, "y":6, "w":2}, + {"x":2, "y":6}, + {"x":3, "y":5, "h":2} + ] + } + } +} diff --git a/keyboards/maartenwut/gh80_3700/keymaps/default/keymap.c b/keyboards/maartenwut/gh80_3700/keymaps/default/keymap.c new file mode 100644 index 000000000000..555036de72ea --- /dev/null +++ b/keyboards/maartenwut/gh80_3700/keymaps/default/keymap.c @@ -0,0 +1,26 @@ +/* Copyright 2020 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 + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +[0] = LAYOUT_ortho_6x4( + KC_ESC, KC_TAB, KC_EQL, KC_BSPC, + 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), +}; diff --git a/keyboards/maartenwut/gh80_3700/keymaps/default/readme.md b/keyboards/maartenwut/gh80_3700/keymaps/default/readme.md new file mode 100644 index 000000000000..8e1232190b32 --- /dev/null +++ b/keyboards/maartenwut/gh80_3700/keymaps/default/readme.md @@ -0,0 +1 @@ +This is the default keymap for the GH80-3700. diff --git a/keyboards/maartenwut/gh80_3700/keymaps/ps2/config.h b/keyboards/maartenwut/gh80_3700/keymaps/ps2/config.h new file mode 100644 index 000000000000..0d9508060ad7 --- /dev/null +++ b/keyboards/maartenwut/gh80_3700/keymaps/ps2/config.h @@ -0,0 +1,69 @@ +/* Copyright 2020 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 + +#ifdef PS2_USE_USART +#define PS2_CLOCK_PORT PORTD +#define PS2_CLOCK_PIN PIND +#define PS2_CLOCK_DDR DDRD +#define PS2_CLOCK_BIT 5 +#define PS2_DATA_PORT PORTD +#define PS2_DATA_PIN PIND +#define PS2_DATA_DDR DDRD +#define PS2_DATA_BIT 2 + +/* synchronous, odd parity, 1-bit stop, 8-bit data, sample at falling edge */ +/* set DDR of CLOCK as input to be slave */ +#define PS2_USART_INIT() do { \ + PS2_CLOCK_DDR &= ~(1< + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public 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( + KC_ESC, KC_TAB, KC_EQL, KC_BSPC, + 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), +}; diff --git a/keyboards/maartenwut/gh80_3700/keymaps/ps2/readme.md b/keyboards/maartenwut/gh80_3700/keymaps/ps2/readme.md new file mode 100644 index 000000000000..d434753b1709 --- /dev/null +++ b/keyboards/maartenwut/gh80_3700/keymaps/ps2/readme.md @@ -0,0 +1 @@ +This is a keymap for the GH80-3700 with PS/2 mouse functionality enabled. \ No newline at end of file diff --git a/keyboards/maartenwut/gh80_3700/keymaps/ps2/rules.mk b/keyboards/maartenwut/gh80_3700/keymaps/ps2/rules.mk new file mode 100644 index 000000000000..c58a93b73a0a --- /dev/null +++ b/keyboards/maartenwut/gh80_3700/keymaps/ps2/rules.mk @@ -0,0 +1,5 @@ +# Build Options +# change yes to no to disable +# +PS2_MOUSE_ENABLE = yes +PS2_USE_USART = yes diff --git a/keyboards/maartenwut/gh80_3700/keymaps/rgb/config.h b/keyboards/maartenwut/gh80_3700/keymaps/rgb/config.h new file mode 100644 index 000000000000..1bc51758c05b --- /dev/null +++ b/keyboards/maartenwut/gh80_3700/keymaps/rgb/config.h @@ -0,0 +1,21 @@ +/* Copyright 2020 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 + +#define RGB_DI_PIN B2 +#define RGBLED_NUM 8 +#define RGBLIGHT_ANIMATIONS diff --git a/keyboards/maartenwut/gh80_3700/keymaps/rgb/keymap.c b/keyboards/maartenwut/gh80_3700/keymaps/rgb/keymap.c new file mode 100644 index 000000000000..555036de72ea --- /dev/null +++ b/keyboards/maartenwut/gh80_3700/keymaps/rgb/keymap.c @@ -0,0 +1,26 @@ +/* Copyright 2020 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 + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +[0] = LAYOUT_ortho_6x4( + KC_ESC, KC_TAB, KC_EQL, KC_BSPC, + 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), +}; diff --git a/keyboards/maartenwut/gh80_3700/keymaps/rgb/readme.md b/keyboards/maartenwut/gh80_3700/keymaps/rgb/readme.md new file mode 100644 index 000000000000..cac017f429c1 --- /dev/null +++ b/keyboards/maartenwut/gh80_3700/keymaps/rgb/readme.md @@ -0,0 +1 @@ +This is a keymap for the GH80-3700 with RGB enabled. diff --git a/keyboards/maartenwut/gh80_3700/keymaps/rgb/rules.mk b/keyboards/maartenwut/gh80_3700/keymaps/rgb/rules.mk new file mode 100644 index 000000000000..06d70d5811d6 --- /dev/null +++ b/keyboards/maartenwut/gh80_3700/keymaps/rgb/rules.mk @@ -0,0 +1,4 @@ +# Build Options +# change yes to no to disable +# +RGBLIGHT_ENABLE = yes diff --git a/keyboards/maartenwut/gh80_3700/keymaps/via/keymap.c b/keyboards/maartenwut/gh80_3700/keymaps/via/keymap.c new file mode 100644 index 000000000000..58d6ee754ab3 --- /dev/null +++ b/keyboards/maartenwut/gh80_3700/keymaps/via/keymap.c @@ -0,0 +1,50 @@ +/* Copyright 2020 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 + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +[0] = LAYOUT_ortho_6x4( + KC_ESC, KC_TAB, KC_EQL, KC_BSPC, + 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( + _______, _______, _______, _______, + _______, _______, _______, _______, + _______, _______, _______, _______, + _______, _______, _______, _______, + _______, _______, _______, _______, + _______, _______, _______, _______), + +[2] = LAYOUT_ortho_6x4( + _______, _______, _______, _______, + _______, _______, _______, _______, + _______, _______, _______, _______, + _______, _______, _______, _______, + _______, _______, _______, _______, + _______, _______, _______, _______), + +[3] = LAYOUT_ortho_6x4( + _______, _______, _______, _______, + _______, _______, _______, _______, + _______, _______, _______, _______, + _______, _______, _______, _______, + _______, _______, _______, _______, + _______, _______, _______, _______), +}; diff --git a/keyboards/maartenwut/gh80_3700/keymaps/via/rules.mk b/keyboards/maartenwut/gh80_3700/keymaps/via/rules.mk new file mode 100644 index 000000000000..36b7ba9cbc98 --- /dev/null +++ b/keyboards/maartenwut/gh80_3700/keymaps/via/rules.mk @@ -0,0 +1,2 @@ +VIA_ENABLE = yes +LTO_ENABLE = yes diff --git a/keyboards/maartenwut/gh80_3700/readme.md b/keyboards/maartenwut/gh80_3700/readme.md new file mode 100644 index 000000000000..44f753334f7f --- /dev/null +++ b/keyboards/maartenwut/gh80_3700/readme.md @@ -0,0 +1,15 @@ +# GH80-3700 + +![GH80-3700](https://i.imgur.com/xMCzb8vl.jpg) + +## Support +* Keyboard Maintainer: [Maarten Dekkers](https://github.com/maartenwut) +* Hardware Supported: GH80-3700 PCB +* Hardware Availability: [maartenwut.com](https://maartenwut.com/product/gh80-3700-numpad-pcb/) + +## Build +Make example for this keyboard (after setting up your build environment): + + make maartenwut/gh80_3700: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/gh80_3700/rules.mk b/keyboards/maartenwut/gh80_3700/rules.mk new file mode 100644 index 000000000000..01ea4754f450 --- /dev/null +++ b/keyboards/maartenwut/gh80_3700/rules.mk @@ -0,0 +1,24 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +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 = no # Console for debug +COMMAND_ENABLE = no # Commands for debug and configuration +# 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 +BLUETOOTH_ENABLE = no # Enable Bluetooth +ENCODER_ENABLE = yes # Enable support for rotary encoders + +LAYOUTS = numpad_6x4 ortho_6x4 From 00af37a659c8ef4a1de08830536853fb60dc71a6 Mon Sep 17 00:00:00 2001 From: Takeshi ISHII <2170248+mtei@users.noreply.github.com> Date: Mon, 17 Aug 2020 17:19:52 +0900 Subject: [PATCH 570/930] [Docs] Japanese translation of docs/proton_c_conversion.md (#9927) * start translation docs/ja/proton_c_conversion.md * Japanese translation is in progress. * Japanese translation is in progress. * update * Update docs/ja/proton_c_conversion.md * Update docs/ja/proton_c_conversion.md * Update docs/ja/proton_c_conversion.md * Update docs/ja/proton_c_conversion.md * Update docs/ja/proton_c_conversion.md * Update docs/ja/proton_c_conversion.md * Update docs/ja/proton_c_conversion.md * Update docs/ja/proton_c_conversion.md * Update docs/ja/proton_c_conversion.md * update docs/ja/_summary.md: GPIO congtrol --- docs/ja/_summary.md | 2 +- docs/ja/proton_c_conversion.md | 97 ++++++++++++++++++++++++++++++++++ 2 files changed, 98 insertions(+), 1 deletion(-) create mode 100644 docs/ja/proton_c_conversion.md diff --git a/docs/ja/_summary.md b/docs/ja/_summary.md index 06c0482754aa..b44b76abcf94 100644 --- a/docs/ja/_summary.md +++ b/docs/ja/_summary.md @@ -132,7 +132,7 @@ * [WS2812 ドライバ](ja/ws2812_driver.md) * [EEPROM ドライバ](ja/eeprom_driver.md) * [シリアル ドライバ](ja/serial_driver.md) - * [GPIO コントロール](ja/internals_gpio_control.md) + * [GPIO 制御](ja/internals_gpio_control.md) * [キーボード ガイドライン](ja/hardware_keyboard_guidelines.md) * Python 開発 diff --git a/docs/ja/proton_c_conversion.md b/docs/ja/proton_c_conversion.md new file mode 100644 index 000000000000..6e4f7dcb6635 --- /dev/null +++ b/docs/ja/proton_c_conversion.md @@ -0,0 +1,97 @@ +# キーボードを Proton C を使うように変更 + + + +Proton C は Pro Micro の差し替え可能品であるため、簡単に使用することができます。 +このページでは、キーボードを変換するための便利な自動化されたプロセスと、Pro Micro では利用できない Proton C の機能を利用したい場合の手動プロセスについて説明しています。 + +## 自動で変換 + +QMK で現在サポートされているキーボードが Pro Micro(または互換ボード)を使用しており、Proton C を使用したい場合は、以下のように make 引数に `CONVERT_TO_PROTON_C=yes` (または `CTPC=yes`) を追加することでファームウェアを生成することができます。 + + make 40percentclub/mf68:default CTPC=yes + +同じ引数をキーマップの `rules.mk` に追加しても同じことができます。 + +これは、次のように、`#ifdef` を使用してコード内で使用できる `CONVERT_TO_PROTON_C` フラグを公開します。 + +```c +#ifdef CONVERT_TO_PROTON_C + // Proton C code +#else + // Pro Micro code +#endif +``` + +`PORTB/DDRB` などが定義されていないというエラーが発生した場合は、ARM と AVR の両方で機能する [GPIO 制御](ja/internals_gpio_control.md) を使用するようにキーボードのコードを変換する必要があります。これは AVR ビルドにまったく影響を与えません。 + +Proton C には1つのオンボード LED(C13)しかなく、デフォルトでは TXLED(D5) がそれにマップされています。代わりに RXLED(B0) をそれにマッピングしたい場合は、`config.h` に次のように追加してください。 + + #define CONVERT_TO_PROTON_C_RXLED + +## 機能の変換 + +下記は ARM ボードに実装されているものに基づいたデフォルトです。 + +| 機能 | 説明 | +|--------------------------------------|------------------------------------------------------------------------------------| +| [オーディオ](ja/feature_audio.md) | 有効 | +| [RGB ライト](ja/feature_rgblight.md) | 無効 | +| [バックライト](feature_backlight.md) | ARM が自動コンフィギュレーションを提供できるようになるまで、[タスク駆動 PWM](ja/(feature_backlight.md#software-pwm-driver))が強制されます | +| USB ホスト (例えば USB-USB コンバータ) | 未サポート (USB ホストコードは AVR 固有のもので、現在 ARM ではサポートされていません。 | +| [分割キーボード](ja/feature_split_keyboard.md) | 部分的 - 有効にする機能に大きく依存します | + +## 手動で変換 + +`CTPC = yes` を指定せずに Proton C をネイティブで使用するには、`rules.mk` の `MCU`行を変更する必要があります: + +``` +MCU = STM32F303 +``` + +次の変数が存在する場合は削除します。 + +* `BOOTLOADER` +* `EXTRA_FLAGS` + +最後に、`config.h`のすべてのピン割り当てを STM32 上の同等のものに変換します。 + +| Pro Micro 左側| Proton C 左側 | | Proton C 右側 | Pro Micro 右側 | +|--------------|--------------|-|--------------|---------------| +| `D3` | `A9` | | 5v | RAW (5v) | +| `D2` | `A10` | | GND | GND | +| GND | GND | | FLASH | RESET | +| GND | GND | | 3.3v | Vcc 1 | +| `D1` | `B7` | | `A2` | `F4` | +| `D0` | `B6` | | `A1` | `F5` | +| `D4` | `B5` | | `A0` | `F6` | +| `C6` | `B4` | | `B8` | `F7` | +| `D7` | `B3` | | `B13` | `B1` | +| `E6` | `B2` | | `B14` | `B3` | +| `B4` | `B1` | | `B15` | `B2` | +| `B5` | `B0` | | `B9` | `B6` | +| `B0` (RX LED) | `C13` 2 | | `C13` 2 | `D5` (TX LED) | + +また、Proton C の拡張部分にあるいくつかの新しいピンを利用することもできます。 + +| 左側 | | 右側 | +|------|-|-------| +| `A4`3 | | `B10` | +| `A5`4 | | `B11` | +| `A6` | | `B12` | +| `A7` | | `A14`5 (SWCLK) | +| `A8` | | `A13`5 (SWDIO) | +| `A15` | | RESET6 | + +注釈: + +1. Pro Micro の Vcc は 3.3V または 5V にすることができます。 +2. Proton C のオンボード LED は、Pro Micro のように2つはありません、1つだけです。Pro Micro には、RX LED(`D5`) と TX LED(`B0`)があります。 +3. `A4` ピンは、スピーカーと共有されています。 +4. `A5` ピンは、スピーカーと共有されています。 +5. `A13` と `A14` ピンはハードウェアデバッグ (SWD) に使用されます。GPIO にも使えますが、最後に使ってください。 +6. RESET を 3.3V とショート(プルアップ)して MCU をリブートします。これは Pro Micro のようにブートローダモードにはならず、MCU をリセットするだけです。 From 869b648088d3dc97a86e8db445b537ec7eed23fb Mon Sep 17 00:00:00 2001 From: codecoffeecode Date: Mon, 17 Aug 2020 01:32:07 -0700 Subject: [PATCH 571/930] Keymap Updates for DMQ Design SPIN, Boardsource 4x12, and Gingham (#9911) * Updating keymaps for Gingham and DMQ Design SPIN and adding keymap for BoardSource 4x12 * Update keyboards/boardsource/4x12/keymaps/codecoffeecode/keymap.c --- .../4x12/keymaps/codecoffeecode/keymap.c | 85 +++++++++++++++++++ .../spin/keymaps/codecoffeecode/config.h | 19 +++++ .../spin/keymaps/codecoffeecode/keymap.c | 51 +++++++++++ .../gingham/keymaps/codecoffeecode/keymap.c | 4 +- 4 files changed, 157 insertions(+), 2 deletions(-) create mode 100644 keyboards/boardsource/4x12/keymaps/codecoffeecode/keymap.c create mode 100644 keyboards/dmqdesign/spin/keymaps/codecoffeecode/config.h create mode 100644 keyboards/dmqdesign/spin/keymaps/codecoffeecode/keymap.c diff --git a/keyboards/boardsource/4x12/keymaps/codecoffeecode/keymap.c b/keyboards/boardsource/4x12/keymaps/codecoffeecode/keymap.c new file mode 100644 index 000000000000..0ea2b4cef41c --- /dev/null +++ b/keyboards/boardsource/4x12/keymaps/codecoffeecode/keymap.c @@ -0,0 +1,85 @@ +/* Copyright 2020 codecoffeecode + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public 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 { + _MAIN, + _LOWER, + _RAISE, +}; + +// Readability keycodes +#define LOWER MO(_LOWER) +#define RAISE MO(_RAISE) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + /* Layer _MAIN + * ,-----------------------------------------------------------------------------------. + * | 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 | Caps | Alt | GUI |Layer1| Space |Layer2| Left | Down | Up |Right | + * `-----------------------------------------------------------------------------------' + */ + [_MAIN] = 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_CAPS, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT + ), + + /* Layer _LOWER + * ,-----------------------------------------------------------------------------------. + * | ` | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | Del | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | Vol- | Vol+ | Mute | Play | | | F11 | F12 | | | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | | | | | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Reset| | | | | | | | | | | | + * `-----------------------------------------------------------------------------------' + */ + [_LOWER] = LAYOUT_ortho_4x12( + KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_DEL, + _______, KC_VOLD, KC_VOLU, KC_MUTE, KC_MPLY, _______, _______, KC_F11, KC_F12, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + + /* Layer _RAISE + * ,-----------------------------------------------------------------------------------. + * | | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | | | | | | | - | = | [ | ] | \ | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | | | | | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | | + * `-----------------------------------------------------------------------------------' + */ + [_RAISE] = LAYOUT_ortho_4x12( + _______, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, _______, + _______, _______, _______, _______, _______, _______, _______, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ) + +}; diff --git a/keyboards/dmqdesign/spin/keymaps/codecoffeecode/config.h b/keyboards/dmqdesign/spin/keymaps/codecoffeecode/config.h new file mode 100644 index 000000000000..d736cc309f0b --- /dev/null +++ b/keyboards/dmqdesign/spin/keymaps/codecoffeecode/config.h @@ -0,0 +1,19 @@ +/* Copyright 2020 codecoffeecode + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License 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_HUE_STEP 8 \ No newline at end of file diff --git a/keyboards/dmqdesign/spin/keymaps/codecoffeecode/keymap.c b/keyboards/dmqdesign/spin/keymaps/codecoffeecode/keymap.c new file mode 100644 index 000000000000..6e0911da53ba --- /dev/null +++ b/keyboards/dmqdesign/spin/keymaps/codecoffeecode/keymap.c @@ -0,0 +1,51 @@ +/* Copyright 2020 codecoffeecode + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public 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_HOME, KC_UP, KC_END, /*|*/ KC_TRNS, + KC_LEFT, KC_DOWN, KC_RIGHT, /*|*/ KC_TRNS, + KC_MPRV, KC_MPLY, KC_MNXT, /*|*/ KC_TRNS, + LCTL(LSFT(KC_ESC)), RGB_TOG, LGUI(KC_L) + ), +}; + +void encoder_update_user(uint8_t index, bool clockwise) { + switch(index) { + case 0: + if (clockwise) { + tap_code(KC_VOLU); // Volume + } else { + tap_code(KC_VOLD); + } + break; + case 1: + if (clockwise) { + tap_code(KC_MS_WH_DOWN); // Scroll + } else { + tap_code(KC_MS_WH_UP); + } + break; + case 2: + if (clockwise) { + rgblight_increase_hue(); // RGB Hue + } else { + rgblight_decrease_hue(); + } + break; + } +} diff --git a/keyboards/gingham/keymaps/codecoffeecode/keymap.c b/keyboards/gingham/keymaps/codecoffeecode/keymap.c index ef9ec2f875a0..5c3891845d56 100644 --- a/keyboards/gingham/keymaps/codecoffeecode/keymap.c +++ b/keyboards/gingham/keymaps/codecoffeecode/keymap.c @@ -26,14 +26,14 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1) , KC_APP, KC_RCTL), [1] = LAYOUT_60_ansi_split_bs_rshift( /* 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_TRNS, KC_TRNS, + 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, KC_UP, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RESET, 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, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_VOLU, KC_VOLD, KC_MUTE, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), [2] = LAYOUT_60_ansi_split_bs_rshift( /* 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_DEL, 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, From 2ddcd810201903836404724d27b8d5a628930a22 Mon Sep 17 00:00:00 2001 From: stanrc85 <47038504+stanrc85@users.noreply.github.com> Date: Mon, 17 Aug 2020 04:33:57 -0400 Subject: [PATCH 572/930] [Keymap] layer indicator lights (#10004) * move caps lock indicator position * use num lock and scroll lock as layer indicators --- users/stanrc85/rgblight_layers.c | 25 +++++++++++++++++++++++-- users/stanrc85/rgblight_layers_osa.c | 24 +++++++++++++++++++++--- 2 files changed, 44 insertions(+), 5 deletions(-) diff --git a/users/stanrc85/rgblight_layers.c b/users/stanrc85/rgblight_layers.c index 0363e358b09c..780555e7b58f 100644 --- a/users/stanrc85/rgblight_layers.c +++ b/users/stanrc85/rgblight_layers.c @@ -1,5 +1,8 @@ #include "stanrc85.h" +static uint8_t middle = 0; +static uint8_t bottom = 0; + const rgblight_segment_t PROGMEM my_capslock_layer[] = RGBLIGHT_LAYER_SEGMENTS( {3, 2, HSV_RED}, {10, 2, HSV_RED} @@ -38,10 +41,28 @@ layer_state_t layer_state_set_user(layer_state_t state) { rgblight_set_layer_state(1, layer_state_cmp(state, 1)); rgblight_set_layer_state(2, layer_state_cmp(state, 2)); rgblight_set_layer_state(3, layer_state_cmp(state, 3)); + middle = bottom = 0; + switch (get_highest_layer(state)) { + case _FN1_60: + middle = 1; + break; + case _FN2_60: + bottom = 1; + break; + case _DEFAULT: + middle = 1; + bottom = 1; + break; + default: // for any other layers, or the default layer + break; + } return state; } bool led_update_user(led_t led_state) { - rgblight_set_layer_state(0, led_state.caps_lock); - return true; + //rgblight_set_layer_state(0, led_state.caps_lock); + writePin(INDICATOR_PIN_0, !led_state.caps_lock); + writePin(INDICATOR_PIN_1, !middle); + writePin(INDICATOR_PIN_2, !bottom); + return false; } \ No newline at end of file diff --git a/users/stanrc85/rgblight_layers_osa.c b/users/stanrc85/rgblight_layers_osa.c index 8bd7137e4314..59366fa34a95 100644 --- a/users/stanrc85/rgblight_layers_osa.c +++ b/users/stanrc85/rgblight_layers_osa.c @@ -1,5 +1,8 @@ #include "stanrc85.h" +static uint8_t middle = 0; +static uint8_t bottom = 0; + const rgblight_segment_t PROGMEM my_capslock_layer[] = RGBLIGHT_LAYER_SEGMENTS( {2, 2, HSV_RED}, {6, 2, HSV_RED} @@ -38,13 +41,28 @@ layer_state_t layer_state_set_user(layer_state_t state) { rgblight_set_layer_state(1, layer_state_cmp(state, 1)); rgblight_set_layer_state(2, layer_state_cmp(state, 2)); rgblight_set_layer_state(3, layer_state_cmp(state, 3)); + middle = bottom = 0; + switch (get_highest_layer(state)) { + case _FN1_60: + middle = 1; + break; + case _FN2_60: + bottom = 1; + break; + case _DEFAULT: + middle = 1; + bottom = 1; + break; + default: // for any other layers, or the default layer + break; + } return state; } bool led_update_user(led_t led_state) { //rgblight_set_layer_state(0, led_state.caps_lock); writePin(C7, led_state.caps_lock); - writePin(C6, led_state.num_lock); - writePin(B6, led_state.scroll_lock); + writePin(C6, middle); + writePin(B6, bottom); return false; -} \ No newline at end of file +} From b4ae7badd46cb468cb8bef9be99dcf73f4a1e642 Mon Sep 17 00:00:00 2001 From: nopunin10did Date: Mon, 17 Aug 2020 05:08:15 -0400 Subject: [PATCH 573/930] Issue 9942: Add LSA, RSA, RCS, LSA_T, RSA_T, and RCS_T (#9943) * Issue 9942: Add Quantum defines Add codes to quantum_keycodes for LSA, RSA, RCS, and their corresponding _T macros * 9942: Add documentation for new defines Add documentation for new defines in feature request 9942. Also define SAGR and SAGR_T as aliases for RSA and RSA_T. * Update quantum/quantum_keycodes.h * Update docs/keycodes.md * Update docs/keycodes.md * Update docs/keycodes.md * Update docs/keycodes.md --- docs/keycodes.md | 74 ++++++++++++++++++++------------------ quantum/quantum_keycodes.h | 9 +++++ 2 files changed, 49 insertions(+), 34 deletions(-) diff --git a/docs/keycodes.md b/docs/keycodes.md index 5fbc8f4fa6b8..c6403c80bc4f 100644 --- a/docs/keycodes.md +++ b/docs/keycodes.md @@ -381,45 +381,51 @@ See also: [Mouse Keys](feature_mouse_keys.md) See also: [Modifier Keys](feature_advanced_keycodes.md#modifier-keys) -|Key |Aliases |Description | -|----------|-------------------------------|----------------------------------------------------| -|`LCTL(kc)`|`C(kc)` |Hold Left Control and press `kc` | -|`LSFT(kc)`|`S(kc)` |Hold Left Shift and press `kc` | -|`LALT(kc)`|`A(kc)`, `LOPT(kc)` |Hold Left Alt and press `kc` | -|`LGUI(kc)`|`G(kc)`, `LCMD(kc)`, `LWIN(kc)`|Hold Left GUI and press `kc` | -|`RCTL(kc)`| |Hold Right Control and press `kc` | -|`RSFT(kc)`| |Hold Right Shift and press `kc` | -|`RALT(kc)`|`ROPT(kc)`, `ALGR(kc)` |Hold Right Alt and press `kc` | -|`RGUI(kc)`|`RCMD(kc)`, `LWIN(kc)` |Hold Right GUI and press `kc` | -|`SGUI(kc)`|`SCMD(kc)`, `SWIN(kc)` |Hold Left Shift and GUI and press `kc` | -|`LCA(kc)` | |Hold Left Control and Alt and press `kc` | -|`LCAG(kc)`| |Hold Left Control, Alt and GUI and press `kc` | -|`MEH(kc)` | |Hold Left Control, Shift and Alt and press `kc` | -|`HYPR(kc)`| |Hold Left Control, Shift, Alt and GUI and press `kc`| -|`KC_MEH` | |Left Control, Shift and Alt | -|`KC_HYPR` | |Left Control, Shift, Alt and GUI | +|Key |Aliases |Description | +|----------|-------------------------------|------------------------------------------------------| +|`LCTL(kc)`|`C(kc)` |Hold Left Control and press `kc` | +|`LSFT(kc)`|`S(kc)` |Hold Left Shift and press `kc` | +|`LALT(kc)`|`A(kc)`, `LOPT(kc)` |Hold Left Alt and press `kc` | +|`LGUI(kc)`|`G(kc)`, `LCMD(kc)`, `LWIN(kc)`|Hold Left GUI and press `kc` | +|`RCTL(kc)`| |Hold Right Control and press `kc` | +|`RSFT(kc)`| |Hold Right Shift and press `kc` | +|`RALT(kc)`|`ROPT(kc)`, `ALGR(kc)` |Hold Right Alt (AltGr) and press `kc` | +|`RGUI(kc)`|`RCMD(kc)`, `LWIN(kc)` |Hold Right GUI and press `kc` | +|`SGUI(kc)`|`SCMD(kc)`, `SWIN(kc)` |Hold Left Shift and GUI and press `kc` | +|`LCA(kc)` | |Hold Left Control and Alt and press `kc` | +|`LSA(kc)` | |Hold Left Shift and Left Alt and press `kc` | +|`RSA(kc)` |`SAGR(kc)` |Hold Right Shift and Right Alt (AltGr) and press `kc` | +|`RCS(kc)` | |Hold Right Control and Right Shift and press `kc` | +|`LCAG(kc)`| |Hold Left Control, Alt and GUI and press `kc` | +|`MEH(kc)` | |Hold Left Control, Shift and Alt and press `kc` | +|`HYPR(kc)`| |Hold Left Control, Shift, Alt and GUI and press `kc` | +|`KC_MEH` | |Left Control, Shift and Alt | +|`KC_HYPR` | |Left Control, Shift, Alt and GUI | ## Mod-Tap Keys :id=mod-tap-keys See also: [Mod-Tap](mod_tap.md) -|Key |Aliases |Description | -|-------------|-----------------------------------------------------------------|-------------------------------------------------------| -|`MT(mod, kc)`| |`mod` when held, `kc` when tapped | -|`LCTL_T(kc)` |`CTL_T(kc)` |Left Control when held, `kc` when tapped | -|`LSFT_T(kc)` |`SFT_T(kc)` |Left Shift when held, `kc` when tapped | -|`LALT_T(kc)` |`LOPT_T(kc)`, `ALT_T(kc)`, `OPT_T(kc)` |Left Alt when held, `kc` when tapped | -|`LGUI_T(kc)` |`LCMD_T(kc)`, `LWIN_T(kc)`, `GUI_T(kc)`, `CMD_T(kc)`, `WIN_T(kc)`|Left GUI when held, `kc` when tapped | -|`RCTL_T(kc)` | |Right Control when held, `kc` when tapped | -|`RSFT_T(kc)` | |Right Shift when held, `kc` when tapped | -|`RALT_T(kc)` |`ROPT_T(kc)`, `ALGR_T(kc)` |Right Alt when held, `kc` when tapped | -|`RGUI_T(kc)` |`RCMD_T(kc)`, `RWIN_T(kc)` |Right GUI when held, `kc` when tapped | -|`SGUI_T(kc)` |`SCMD_T(kc)`, `SWIN_T(kc)` |Left Shift and GUI when held, `kc` when tapped | -|`LCA_T(kc)` | |Left Control and Alt when held, `kc` when tapped | -|`LCAG_T(kc)` | |Left Control, Alt and GUI when held, `kc` when tapped | -|`RCAG_T(kc)` | |Right Control, Alt and GUI when held, `kc` when tapped | -|`C_S_T(kc)` | |Left Control and Shift when held, `kc` when tapped | -|`MEH_T(kc)` | |Left Control, Shift and Alt when held, `kc` when tapped| +|Key |Aliases |Description | +|-------------|-----------------------------------------------------------------|--------------------------------------------------------------| +|`MT(mod, kc)`| |`mod` when held, `kc` when tapped | +|`LCTL_T(kc)` |`CTL_T(kc)` |Left Control when held, `kc` when tapped | +|`LSFT_T(kc)` |`SFT_T(kc)` |Left Shift when held, `kc` when tapped | +|`LALT_T(kc)` |`LOPT_T(kc)`, `ALT_T(kc)`, `OPT_T(kc)` |Left Alt when held, `kc` when tapped | +|`LGUI_T(kc)` |`LCMD_T(kc)`, `LWIN_T(kc)`, `GUI_T(kc)`, `CMD_T(kc)`, `WIN_T(kc)`|Left GUI when held, `kc` when tapped | +|`RCTL_T(kc)` | |Right Control when held, `kc` when tapped | +|`RSFT_T(kc)` | |Right Shift when held, `kc` when tapped | +|`RALT_T(kc)` |`ROPT_T(kc)`, `ALGR_T(kc)` |Right Alt (AltGr) when held, `kc` when tapped | +|`RGUI_T(kc)` |`RCMD_T(kc)`, `RWIN_T(kc)` |Right GUI when held, `kc` when tapped | +|`SGUI_T(kc)` |`SCMD_T(kc)`, `SWIN_T(kc)` |Left Shift and GUI when held, `kc` when tapped | +|`LCA_T(kc)` | |Left Control and Alt when held, `kc` when tapped | +|`LSA_T(kc)` | |Left Shift and Left Alt when held, `kc` when tapped | +|`RSA_T(kc)` |`SAGR_T(kc)` |Right Shift and Right Alt (AltGr) when held, `kc` when tapped | +|`RCS_T(kc)` | |Right Control and Right Shift when held, `kc` when tapped | +|`LCAG_T(kc)` | |Left Control, Alt and GUI when held, `kc` when tapped | +|`RCAG_T(kc)` | |Right Control, Alt and GUI when held, `kc` when tapped | +|`C_S_T(kc)` | |Left Control and Shift when held, `kc` when tapped | +|`MEH_T(kc)` | |Left Control, Shift and Alt when held, `kc` when tapped | |`HYPR_T(kc)` |`ALL_T(kc)` |Left Control, Shift, Alt and GUI when held, `kc` when tapped - more info [here](http://brettterpstra.com/2012/12/08/a-useful-caps-lock-key/)| ## RGB Lighting :id=rgb-lighting diff --git a/quantum/quantum_keycodes.h b/quantum/quantum_keycodes.h index d8f1fa4bbbc2..437921aeb1af 100644 --- a/quantum/quantum_keycodes.h +++ b/quantum/quantum_keycodes.h @@ -540,6 +540,10 @@ enum quantum_keycodes { #define SCMD(kc) SGUI(kc) #define SWIN(kc) SGUI(kc) #define LCA(kc) (QK_LCTL | QK_LALT | (kc)) +#define LSA(kc) (QK_LSFT | QK_LALT | (kc)) +#define RSA(kc) (QK_RSFT | QK_RALT | (kc)) +#define RCS(kc) (QK_RCTL | QK_RSFT | (kc)) +#define SAGR(kc) RSA(kc) #define MOD_HYPR 0xF #define MOD_MEH 0x7 @@ -763,6 +767,11 @@ enum quantum_keycodes { #define SCMD_T(kc) SGUI_T(kc) #define SWIN_T(kc) SGUI_T(kc) #define LCA_T(kc) MT(MOD_LCTL | MOD_LALT, kc) // Left Control + Alt +#define LSA_T(kc) MT(MOD_LSFT | MOD_LALT, kc) // Left Shift + Alt +#define RSA_T(kc) MT(MOD_RSFT | MOD_RALT, kc) // Right Shift + Alt +#define RCS_T(kc) MT(MOD_RCTL | MOD_RSFT, kc) // Right Control + Shift +#define SAGR_T(kc) RSA_T(kc) + #define ALL_T(kc) HYPR_T(kc) // Dedicated keycode versions for Hyper and Meh, if you want to use them as standalone keys rather than mod-tap From d02301e59d49a15a51eedb3456b289b1d585c22e Mon Sep 17 00:00:00 2001 From: Joel Challis Date: Mon, 17 Aug 2020 10:12:45 +0100 Subject: [PATCH 574/930] Swap git diff logic to github action when running qmk info (#9978) * swap git diff logic to github action * Print out layouts when linting --- .github/workflows/info.yml | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/.github/workflows/info.yml b/.github/workflows/info.yml index 31a11058361c..7551c127e0ae 100644 --- a/.github/workflows/info.yml +++ b/.github/workflows/info.yml @@ -16,16 +16,21 @@ jobs: with: fetch-depth: 0 + - uses: trilom/file-changes-action@v1.2.3 + id: file_changes + with: + output: '\n' + - name: Print info run: | git rev-parse --short HEAD echo ${{ github.event.pull_request.base.sha }} - git diff --name-only ${{ github.event.pull_request.base.sha }}... + echo '${{ steps.file_changes.outputs.files}}' - name: Run qmk info shell: 'bash {0}' run: | - QMK_CHANGES=$(git diff --name-only ${{ github.event.pull_request.base.sha }}...) + QMK_CHANGES=$(echo -e '${{ steps.file_changes.outputs.files}}') QMK_KEYBOARDS=$(qmk list-keyboards) exit_code=0 @@ -41,7 +46,7 @@ jobs: echo "linting ${KB}" # TODO: info info always returns 0 - right now the only way to know failure is to inspect log lines - qmk info -kb ${KB} 2>&1 | tee /tmp/$$ + qmk info -l -kb ${KB} 2>&1 | tee /tmp/$$ !(grep -cq ☒ /tmp/$$) : $((exit_code = $exit_code + $?)) fi From cb87f5fbeb2f77179845f20c9d5179a35dceca41 Mon Sep 17 00:00:00 2001 From: Wilba Date: Mon, 17 Aug 2020 19:21:02 +1000 Subject: [PATCH 575/930] [Keyboard] wilba.tech WT65-XT and WT65-XTX (#9999) * Added wilba.tech WT65-XT, WT65-XTX * Review changes * Review changes --- keyboards/wilba_tech/wt65_xt/config.h | 55 +++++++++++++++++++ keyboards/wilba_tech/wt65_xt/info.json | 12 ++++ .../wt65_xt/keymaps/default/keymap.c | 54 ++++++++++++++++++ .../wilba_tech/wt65_xt/keymaps/via/keymap.c | 51 +++++++++++++++++ .../wilba_tech/wt65_xt/keymaps/via/rules.mk | 1 + keyboards/wilba_tech/wt65_xt/readme.md | 21 +++++++ keyboards/wilba_tech/wt65_xt/rules.mk | 22 ++++++++ keyboards/wilba_tech/wt65_xt/wt65_xt.c | 17 ++++++ keyboards/wilba_tech/wt65_xt/wt65_xt.h | 35 ++++++++++++ keyboards/wilba_tech/wt65_xtx/config.h | 54 ++++++++++++++++++ keyboards/wilba_tech/wt65_xtx/info.json | 12 ++++ .../wt65_xtx/keymaps/default/keymap.c | 54 ++++++++++++++++++ .../wilba_tech/wt65_xtx/keymaps/via/keymap.c | 51 +++++++++++++++++ .../wilba_tech/wt65_xtx/keymaps/via/rules.mk | 1 + keyboards/wilba_tech/wt65_xtx/readme.md | 21 +++++++ keyboards/wilba_tech/wt65_xtx/rules.mk | 22 ++++++++ keyboards/wilba_tech/wt65_xtx/wt65_xtx.c | 17 ++++++ keyboards/wilba_tech/wt65_xtx/wt65_xtx.h | 35 ++++++++++++ 18 files changed, 535 insertions(+) create mode 100644 keyboards/wilba_tech/wt65_xt/config.h create mode 100644 keyboards/wilba_tech/wt65_xt/info.json create mode 100644 keyboards/wilba_tech/wt65_xt/keymaps/default/keymap.c create mode 100644 keyboards/wilba_tech/wt65_xt/keymaps/via/keymap.c create mode 100644 keyboards/wilba_tech/wt65_xt/keymaps/via/rules.mk create mode 100644 keyboards/wilba_tech/wt65_xt/readme.md create mode 100644 keyboards/wilba_tech/wt65_xt/rules.mk create mode 100644 keyboards/wilba_tech/wt65_xt/wt65_xt.c create mode 100644 keyboards/wilba_tech/wt65_xt/wt65_xt.h create mode 100644 keyboards/wilba_tech/wt65_xtx/config.h create mode 100644 keyboards/wilba_tech/wt65_xtx/info.json create mode 100644 keyboards/wilba_tech/wt65_xtx/keymaps/default/keymap.c create mode 100644 keyboards/wilba_tech/wt65_xtx/keymaps/via/keymap.c create mode 100644 keyboards/wilba_tech/wt65_xtx/keymaps/via/rules.mk create mode 100644 keyboards/wilba_tech/wt65_xtx/readme.md create mode 100644 keyboards/wilba_tech/wt65_xtx/rules.mk create mode 100644 keyboards/wilba_tech/wt65_xtx/wt65_xtx.c create mode 100644 keyboards/wilba_tech/wt65_xtx/wt65_xtx.h diff --git a/keyboards/wilba_tech/wt65_xt/config.h b/keyboards/wilba_tech/wt65_xt/config.h new file mode 100644 index 000000000000..8dbc8559ded5 --- /dev/null +++ b/keyboards/wilba_tech/wt65_xt/config.h @@ -0,0 +1,55 @@ +/* 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 0x001D // PCB #29 +#define DEVICE_VER 0x0001 +#define MANUFACTURER wilba.tech +#define PRODUCT wilba.tech WT65-XT + +/* key matrix size */ +#define MATRIX_ROWS 5 +#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 { F0, F1, F4, F6, F7 } +#define MATRIX_COL_PINS { B7, B0, F5, D5, B1, B2, B3, D3, D2, C7, C6, B6, B5, B4, D7, D6, D4 } +#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/wilba_tech/wt65_xt/info.json b/keyboards/wilba_tech/wt65_xt/info.json new file mode 100644 index 000000000000..5f921e6976dd --- /dev/null +++ b/keyboards/wilba_tech/wt65_xt/info.json @@ -0,0 +1,12 @@ +{ + "keyboard_name": "wilba.tech WT65-XT", + "url": "https://wilba.tech", + "maintainer": "Wilba", + "width": 18.5, + "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, "w":2}, {"x":17.5, "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":17.5, "y":1}, {"x":0, "y":2}, {"x":1, "y":2}, {"x":2.5, "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}, {"x":15.25, "y":2, "w":2.25}, {"x":17.5, "y":2}, {"x":0, "y":3}, {"x":1, "y":3}, {"x":2.5, "y":3, "w":2.25}, {"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":17.5, "y":3}, {"x":0, "y":4}, {"x":1, "y":4}, {"x":2.5, "y":4, "w":1.5}, {"x":4, "y":4}, {"x":5, "y":4, "w":1.5}, {"x":6.5, "y":4, "w":7}, {"x":13.5, "y":4, "w":1.5}, {"x":15.5, "y":4}, {"x":16.5, "y":4}, {"x":17.5, "y":4}] + } + } +} diff --git a/keyboards/wilba_tech/wt65_xt/keymaps/default/keymap.c b/keyboards/wilba_tech/wt65_xt/keymaps/default/keymap.c new file mode 100644 index 000000000000..82767283dfaf --- /dev/null +++ b/keyboards/wilba_tech/wt65_xt/keymaps/default/keymap.c @@ -0,0 +1,54 @@ +/* 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 . + */ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + // Default layer + [0] = 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_HOME, + 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_PGUP, + 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_PGDN, + 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_END, + KC_F9, KC_F10, KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, MO(1), KC_LEFT, KC_DOWN, KC_RGHT), + + // Fn1 Layer + [1] = LAYOUT_all( + KC_TRNS, KC_TRNS, 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_PSCR, KC_SLCK, KC_PAUS, KC_TRNS, KC_TRNS, 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_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_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 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, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 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, + 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/wt65_xt/keymaps/via/keymap.c b/keyboards/wilba_tech/wt65_xt/keymaps/via/keymap.c new file mode 100644 index 000000000000..8e57b6b4d84d --- /dev/null +++ b/keyboards/wilba_tech/wt65_xt/keymaps/via/keymap.c @@ -0,0 +1,51 @@ +/* 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 . + */ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + // Default layer + [0] = 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_HOME, + 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_PGUP, + 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_PGDN, + 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_END, + KC_F9, KC_F10, KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, MO(1), KC_LEFT, KC_DOWN, KC_RGHT), + + // Fn1 Layer + [1] = LAYOUT_all( + KC_TRNS, KC_TRNS, 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_PSCR, KC_SLCK, KC_PAUS, KC_TRNS, KC_TRNS, 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_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_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 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, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 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, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), +}; diff --git a/keyboards/wilba_tech/wt65_xt/keymaps/via/rules.mk b/keyboards/wilba_tech/wt65_xt/keymaps/via/rules.mk new file mode 100644 index 000000000000..1e5b99807cb7 --- /dev/null +++ b/keyboards/wilba_tech/wt65_xt/keymaps/via/rules.mk @@ -0,0 +1 @@ +VIA_ENABLE = yes diff --git a/keyboards/wilba_tech/wt65_xt/readme.md b/keyboards/wilba_tech/wt65_xt/readme.md new file mode 100644 index 000000000000..980f91421685 --- /dev/null +++ b/keyboards/wilba_tech/wt65_xt/readme.md @@ -0,0 +1,21 @@ +# wilba.tech WT65-XT + +![wilba.tech WT65-XT](https://images.squarespace-cdn.com/content/v1/5cb697d0b91449689ccff07f/1592033641845-YXDKZGZQ7BJFA7IDAZYF/ke17ZwdGBToddI8pDm48kPTrHXgsMrSIMwe6YW3w1AZ7gQa3H78H3Y0txjaiv_0fDoOvxcdMmMKkDsyUqMSsMWxHk725yiiHCCLfrh8O1z4YTzHvnKhyp6Da-NYroOW3ZGjoBKy3azqku80C789l0k5fwC0WRNFJBIXiBeNI5fKTrY37saURwPBw8fO2esROAxn-RKSrlQamlL27g22X2A/RW-ZENITH-01.2001.jpg?format=2500w) + +WT65-XT is a keyboard PCB supporting 65% layout with left side macro keys. + +First produced by [Rama Works Foundry](https://r.works) for [ION Keyboards Zenith](https://r.works/zenith) + +* Keyboard Maintainer: [Wilba6582](https://github.com/Wilba6582) +* Hardware Supported: wilba.tech WT65-XT +* Hardware Availability: [wilba.tech](https://wilba.tech/) + +Make example for this keyboard (after setting up your build environment): + + make wilba_tech/wt65_xt:default + +Flashing example for this keyboard: + + make wilba_tech/wt65_xt: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). diff --git a/keyboards/wilba_tech/wt65_xt/rules.mk b/keyboards/wilba_tech/wt65_xt/rules.mk new file mode 100644 index 000000000000..04e644cbc92e --- /dev/null +++ b/keyboards/wilba_tech/wt65_xt/rules.mk @@ -0,0 +1,22 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +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 = yes # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +BLUETOOTH_ENABLE = no # Enable Bluetooth +AUDIO_ENABLE = no # Audio output \ No newline at end of file diff --git a/keyboards/wilba_tech/wt65_xt/wt65_xt.c b/keyboards/wilba_tech/wt65_xt/wt65_xt.c new file mode 100644 index 000000000000..62be919a06a9 --- /dev/null +++ b/keyboards/wilba_tech/wt65_xt/wt65_xt.c @@ -0,0 +1,17 @@ +/* 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 . + */ + +#include "wt65_xt.h" diff --git a/keyboards/wilba_tech/wt65_xt/wt65_xt.h b/keyboards/wilba_tech/wt65_xt/wt65_xt.h new file mode 100644 index 000000000000..db8fe3557132 --- /dev/null +++ b/keyboards/wilba_tech/wt65_xt/wt65_xt.h @@ -0,0 +1,35 @@ +/* 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" + +#define ____ KC_NO + +#define LAYOUT_all( \ + K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, 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, K216, \ + K300, K301, K302, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, K314, K315, K316, \ + K400, K401, K402, K403, K404, K408, K413, K414, K415, K416 \ +) { \ + { K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, 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, ____, K216 }, \ + { K300, K301, K302, ____, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, K314, K315, K316 }, \ + { K400, K401, K402, K403, K404, ____, ____, ____, K408, ____, ____, ____, ____, K413, K414, K415, K416 } \ +} diff --git a/keyboards/wilba_tech/wt65_xtx/config.h b/keyboards/wilba_tech/wt65_xtx/config.h new file mode 100644 index 000000000000..3ee2d444290f --- /dev/null +++ b/keyboards/wilba_tech/wt65_xtx/config.h @@ -0,0 +1,54 @@ +/* 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 0x001E // PCB #30 +#define DEVICE_VER 0x0001 +#define MANUFACTURER wilba.tech +#define PRODUCT wilba.tech WT65-XTX + +/* key matrix size */ +#define MATRIX_ROWS 5 +#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 { F0, F1, F4, F6, F7 } +#define MATRIX_COL_PINS { B7, B0, F5, D5, B1, B2, B3, D3, D2, C7, C6, B6, B5, B4, D7, D6, D4 } +#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/wilba_tech/wt65_xtx/info.json b/keyboards/wilba_tech/wt65_xtx/info.json new file mode 100644 index 000000000000..ae1ccf0ebc87 --- /dev/null +++ b/keyboards/wilba_tech/wt65_xtx/info.json @@ -0,0 +1,12 @@ +{ + "keyboard_name": "wilba.tech WT65-XTX", + "url": "https://wilba.tech", + "maintainer": "Wilba", + "width": 18.5, + "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":17.5, "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":17.5, "y":1}, {"x":0, "y":2}, {"x":1, "y":2}, {"x":2.5, "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}, {"x":15.25, "y":2, "w":2.25}, {"x":17.5, "y":2}, {"x":0, "y":3}, {"x":1, "y":3}, {"x":2.5, "y":3, "w":2.25}, {"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":17.5, "y":3}, {"x":0, "y":4}, {"x":1, "y":4}, {"x":2.5, "y":4, "w":1.25}, {"x":3.75, "y":4, "w":1.25}, {"x":5, "y":4, "w":1.25}, {"x":6.25, "y":4, "w":6.25}, {"x":12.5, "y":4, "w":1.25}, {"x":13.75, "y":4, "w":1.25}, {"x":15.5, "y":4}, {"x":16.5, "y":4}, {"x":17.5, "y":4}] + } + } +} \ No newline at end of file diff --git a/keyboards/wilba_tech/wt65_xtx/keymaps/default/keymap.c b/keyboards/wilba_tech/wt65_xtx/keymaps/default/keymap.c new file mode 100644 index 000000000000..69f828686798 --- /dev/null +++ b/keyboards/wilba_tech/wt65_xtx/keymaps/default/keymap.c @@ -0,0 +1,54 @@ +/* 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 . + */ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + // Default layer + [0] = 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_BSPC, KC_HOME, + 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_PGUP, + 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_PGDN, + 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_END, + KC_F9, KC_F10, KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, MO(1), MO(1), KC_LEFT, KC_DOWN, KC_RGHT), + + // Fn1 Layer + [1] = LAYOUT_all( + KC_TRNS, KC_TRNS, 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_PSCR, KC_SLCK, KC_PAUS, KC_TRNS, KC_TRNS, 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_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_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 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, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 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, + 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/wt65_xtx/keymaps/via/keymap.c b/keyboards/wilba_tech/wt65_xtx/keymaps/via/keymap.c new file mode 100644 index 000000000000..6bf9c09f092e --- /dev/null +++ b/keyboards/wilba_tech/wt65_xtx/keymaps/via/keymap.c @@ -0,0 +1,51 @@ +/* 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 . + */ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + // Default layer + [0] = 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_BSPC, KC_HOME, + 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_PGUP, + 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_PGDN, + 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_END, + KC_F9, KC_F10, KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, MO(1), MO(1), KC_LEFT, KC_DOWN, KC_RGHT), + + // Fn1 Layer + [1] = LAYOUT_all( + KC_TRNS, KC_TRNS, 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_PSCR, KC_SLCK, KC_PAUS, KC_TRNS, KC_TRNS, 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_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_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 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, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 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, + 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/wt65_xtx/keymaps/via/rules.mk b/keyboards/wilba_tech/wt65_xtx/keymaps/via/rules.mk new file mode 100644 index 000000000000..1e5b99807cb7 --- /dev/null +++ b/keyboards/wilba_tech/wt65_xtx/keymaps/via/rules.mk @@ -0,0 +1 @@ +VIA_ENABLE = yes diff --git a/keyboards/wilba_tech/wt65_xtx/readme.md b/keyboards/wilba_tech/wt65_xtx/readme.md new file mode 100644 index 000000000000..fa28d991f6da --- /dev/null +++ b/keyboards/wilba_tech/wt65_xtx/readme.md @@ -0,0 +1,21 @@ +# wilba.tech WT65-XTX + +![wilba.tech WT65-XTX](https://images.squarespace-cdn.com/content/v1/5cb697d0b91449689ccff07f/1592033641845-YXDKZGZQ7BJFA7IDAZYF/ke17ZwdGBToddI8pDm48kPTrHXgsMrSIMwe6YW3w1AZ7gQa3H78H3Y0txjaiv_0fDoOvxcdMmMKkDsyUqMSsMWxHk725yiiHCCLfrh8O1z4YTzHvnKhyp6Da-NYroOW3ZGjoBKy3azqku80C789l0k5fwC0WRNFJBIXiBeNI5fKTrY37saURwPBw8fO2esROAxn-RKSrlQamlL27g22X2A/RW-ZENITH-01.2001.jpg?format=2500w) + +WT65-XTX is a keyboard PCB supporting 65% layout with left side macro keys. + +First produced by [Rama Works Foundry](https://r.works) for [ION Keyboards Zenith](https://r.works/zenith) + +* Keyboard Maintainer: [Wilba6582](https://github.com/Wilba6582) +* Hardware Supported: wilba.tech WT65-XT +* Hardware Availability: [wilba.tech](https://wilba.tech/) + +Make example for this keyboard (after setting up your build environment): + + make wilba_tech/wt65_xtx:default + +Flashing example for this keyboard: + + make wilba_tech/wt65_xtx: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). diff --git a/keyboards/wilba_tech/wt65_xtx/rules.mk b/keyboards/wilba_tech/wt65_xtx/rules.mk new file mode 100644 index 000000000000..04e644cbc92e --- /dev/null +++ b/keyboards/wilba_tech/wt65_xtx/rules.mk @@ -0,0 +1,22 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +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 = yes # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +BLUETOOTH_ENABLE = no # Enable Bluetooth +AUDIO_ENABLE = no # Audio output \ No newline at end of file diff --git a/keyboards/wilba_tech/wt65_xtx/wt65_xtx.c b/keyboards/wilba_tech/wt65_xtx/wt65_xtx.c new file mode 100644 index 000000000000..38aa7c362de0 --- /dev/null +++ b/keyboards/wilba_tech/wt65_xtx/wt65_xtx.c @@ -0,0 +1,17 @@ +/* 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 . + */ + +#include "wt65_xtx.h" diff --git a/keyboards/wilba_tech/wt65_xtx/wt65_xtx.h b/keyboards/wilba_tech/wt65_xtx/wt65_xtx.h new file mode 100644 index 000000000000..4c464ea2c8b2 --- /dev/null +++ b/keyboards/wilba_tech/wt65_xtx/wt65_xtx.h @@ -0,0 +1,35 @@ +/* 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" + +#define ____ KC_NO + +#define LAYOUT_all( \ + K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, K015, K215, 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, K216, \ + K300, K301, K302, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, K314, K315, K316, \ + K400, K401, K402, K403, K404, K408, K412, K413, K414, K415, K416 \ +) { \ + { K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, 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, ____, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, K314, K315, K316 }, \ + { K400, K401, K402, K403, K404, ____, ____, ____, K408, ____, ____, ____, K412, K413, K414, K415, K416 } \ +} From c72c01afd4ce7c0b3a116034839d1bcc15b1e635 Mon Sep 17 00:00:00 2001 From: Callum Oakley Date: Mon, 17 Aug 2020 11:12:40 +0100 Subject: [PATCH 576/930] [Keymap] Removing #4072 workaround! (#9995) * move media keys in to move layer; rearragne f keys; use send_string for rev5 compatability * remove send_string workaround for #4072 --- keyboards/planck/keymaps/callum/keymap.c | 133 ++++++++--------------- 1 file changed, 43 insertions(+), 90 deletions(-) diff --git a/keyboards/planck/keymaps/callum/keymap.c b/keyboards/planck/keymaps/callum/keymap.c index d9fe43f00351..50c0122a903e 100644 --- a/keyboards/planck/keymaps/callum/keymap.c +++ b/keyboards/planck/keymaps/callum/keymap.c @@ -46,20 +46,40 @@ #define n8 KC_8 #define n9 KC_9 +#define ampr KC_AMPR +#define astr KC_ASTR +#define at KC_AT +#define bsls KC_BSLS #define bspc KC_BSPC #define caps KC_CAPS +#define circ KC_CIRC #define comm KC_COMM #define dash A(KC_MINS) // en-dash (–); or with shift: em-dash (—) -#define scln KC_SCLN -#define slsh KC_SLSH -#define spc KC_SPC -#define tab KC_TAB #define del KC_DEL +#define dlr KC_DLR #define dot KC_DOT #define ent KC_ENT +#define eql KC_EQL +#define esc KC_ESC +#define exlm KC_EXLM +#define grv KC_GRV +#define hash KC_HASH +#define lbrc KC_LBRC +#define lcbr KC_LCBR +#define lprn KC_LPRN #define mins KC_MINS +#define perc KC_PERC +#define pipe KC_PIPE +#define plus KC_PLUS #define quot KC_QUOT -#define esc KC_ESC +#define rbrc KC_RBRC +#define rcbr KC_RCBR +#define rprn KC_RPRN +#define scln KC_SCLN +#define slsh KC_SLSH +#define spc KC_SPC +#define tab KC_TAB +#define tild KC_TILD #define down KC_DOWN #define home G(KC_LEFT) @@ -77,16 +97,14 @@ #define slup S(A(KC_UP)) // Previous unread in Slack #define sldn S(A(KC_DOWN)) // Next unread in Slack -#define ctl1 C(KC_1) -#define ctl2 C(KC_2) -#define ctl3 C(KC_3) -#define ctl4 C(KC_4) -#define ctl5 C(KC_5) -#define ctl6 C(KC_6) -#define ctl7 C(KC_7) -#define ctl8 C(KC_8) -#define ctl9 C(KC_9) -#define ctl0 C(KC_0) +#define ctl1 C(KC_1) // Desktop 1 (6 with shift) +#define ctl2 C(KC_2) // Desktop 2 (7 with shift) +#define ctl3 C(KC_3) // Desktop 3 (8 with shift) +#define ctl4 C(KC_4) // Desktop 4 (9 with shift) +#define ctl5 C(KC_5) // Desktop 5 (10 with shift) +#define ctl6 C(KC_6) // Screenshot +#define ctl7 C(KC_7) // Brightness up +#define ctl8 C(KC_8) // Brightness down #define f1 KC_F1 #define f2 KC_F2 @@ -136,30 +154,8 @@ enum planck_layers { }; enum planck_keycodes { - // ASCII - ampr = SAFE_RANGE, - astr, - at, - bsls, - circ, - dlr, - eql, - exlm, - grv, - hash, - lbrc, - lcbr, - lprn, - perc, - pipe, - plus, - rbrc, - rcbr, - rprn, - tild, - // Curly quotes - lcqt, + lcqt = SAFE_RANGE, rcqt, // "Smart" mods @@ -182,17 +178,17 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), [MOVE] = LAYOUT_planck_grid( - esc, ctl1, ctl2, ctl3, ctl4, xxxx, xxxx, home, up, end, ctl7, caps, - del, ctl5, slup, tabl, tabr, xxxx, xxxx, left, down, rght, ctl8, xxxx, - ____, ctl6, sldn, back, fwd, xxxx, xxxx, pgdn, pgup, ctl0, ctl9, ____, + esc, ctl1, ctl2, ctl3, ctl4, ctl5, ctl6, home, up, end, xxxx, xxxx, + del, play, volu, tabl, tabr, slup, ctl7, left, down, rght, caps, xxxx, + ____, mute, vold, back, fwd, sldn, ctl8, pgdn, pgup, xxxx, xxxx, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____ ), [FUNC] = LAYOUT_planck_grid( - rset, f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, volu, - powr, f11, f12, f13, f14, f15, f16, f17, f18, f19, f20, vold, + rset, f7, f5, f3, f1, f9, f8, f10, f2, f4, f6, xxxx, + xxxx, f17, f15, f13, f11, f19, f18, f20, f12, f14, f16, xxxx, ____, xxxx, xxxx, xxxx, xxxx, xxxx, xxxx, xxxx, xxxx, xxxx, xxxx, ____, - ____, ____, ____, ____, prev, mute, play, next, ____, ____, ____, ____ + ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____ ), }; @@ -205,13 +201,13 @@ bool send_string_if_keydown( uint8_t shifts = get_mods() & MOD_MASK_SHIFT; if (shifts) { del_mods(shifts); - SEND_STRING(shifted); + send_string(shifted); add_mods(shifts); } else { - SEND_STRING(unshifted); + send_string(unshifted); } } else { - SEND_STRING(unshifted); + send_string(unshifted); } } return true; @@ -241,49 +237,6 @@ bool smart_cmd(keyrecord_t *record) { bool process_record_user(uint16_t keycode, keyrecord_t *record) { switch (keycode) { - // Override the defualt auto shifted symbols to use SEND_STRING See - // https://github.com/qmk/qmk_firmware/issues/4072 - case ampr: - return send_string_if_keydown(record, "&", NULL); - case astr: - return send_string_if_keydown(record, "*", NULL); - case at: - return send_string_if_keydown(record, "@", NULL); - case bsls: - return send_string_if_keydown(record, "\\", NULL); - case circ: - return send_string_if_keydown(record, "^", NULL); - case dlr: - return send_string_if_keydown(record, "$", NULL); - case eql: - return send_string_if_keydown(record, "=", NULL); - case exlm: - return send_string_if_keydown(record, "!", NULL); - case grv: - return send_string_if_keydown(record, "`", NULL); - case hash: - return send_string_if_keydown(record, "#", NULL); - case lbrc: - return send_string_if_keydown(record, "[", NULL); - case lcbr: - return send_string_if_keydown(record, "{", NULL); - case lprn: - return send_string_if_keydown(record, "(", NULL); - case perc: - return send_string_if_keydown(record, "%", NULL); - case pipe: - return send_string_if_keydown(record, "|", NULL); - case plus: - return send_string_if_keydown(record, "+", NULL); - case rbrc: - return send_string_if_keydown(record, "]", NULL); - case rcbr: - return send_string_if_keydown(record, "}", NULL); - case rprn: - return send_string_if_keydown(record, ")", NULL); - case tild: - return send_string_if_keydown(record, "~", NULL); - // The macOS shortcuts for curly quotes are horrible, so this rebinds // them so that shift toggles single–double instead of left–right, and // then both varieties of left quote can share one key, and both From 3942b6f3727040dd986aab6fa013886565ee7366 Mon Sep 17 00:00:00 2001 From: dp Date: Mon, 17 Aug 2020 03:16:52 -0700 Subject: [PATCH 577/930] Redox: sync RGB on left and right sides (#10022) --- keyboards/redox/rev1/config.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/keyboards/redox/rev1/config.h b/keyboards/redox/rev1/config.h index 72ca94b7914e..94e824e0e4bd 100644 --- a/keyboards/redox/rev1/config.h +++ b/keyboards/redox/rev1/config.h @@ -62,6 +62,8 @@ along with this program. If not, see . #define RGBLED_NUM 14 // Number of LEDs +#define RGBLIGHT_SPLIT // sync LEDs between RIGHT and LEFT hand + /* * Feature disable options * These options are also useful to firmware size reduction. From 86ea85e3abb3d249a4403634a4908547894ec926 Mon Sep 17 00:00:00 2001 From: kaylanm <1063516+kaylanm@users.noreply.github.com> Date: Tue, 18 Aug 2020 00:26:42 -0400 Subject: [PATCH 578/930] [Keymap] Add via keymap for singa (#10050) --- keyboards/singa/config.h | 4 +- keyboards/singa/keymaps/via/keymap.c | 55 ++++++++++++++++++++++++++++ keyboards/singa/keymaps/via/rules.mk | 8 ++++ 3 files changed, 65 insertions(+), 2 deletions(-) create mode 100644 keyboards/singa/keymaps/via/keymap.c create mode 100644 keyboards/singa/keymaps/via/rules.mk diff --git a/keyboards/singa/config.h b/keyboards/singa/config.h index e998e6ea96db..408f88b2a436 100644 --- a/keyboards/singa/config.h +++ b/keyboards/singa/config.h @@ -19,8 +19,8 @@ along with this program. If not, see . #include "config_common.h" -#define VENDOR_ID 0x20A0 -#define PRODUCT_ID 0x422D +#define VENDOR_ID 0x736B // SK +#define PRODUCT_ID 0x7575 #define DEVICE_VER 0x0200 #define MANUFACTURER Singa Keyboards #define PRODUCT Singa diff --git a/keyboards/singa/keymaps/via/keymap.c b/keyboards/singa/keymaps/via/keymap.c new file mode 100644 index 000000000000..68a800a0b919 --- /dev/null +++ b/keyboards/singa/keymaps/via/keymap.c @@ -0,0 +1,55 @@ +/* Copyright 2018 amnesia0287 + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public 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_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_NO, KC_SPC, KC_SPC, KC_SPC, KC_RALT, KC_RGUI, KC_RCTL, KC_NO, KC_LEFT, KC_DOWN, KC_RGHT + ), + + [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, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, 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, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, 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/singa/keymaps/via/rules.mk b/keyboards/singa/keymaps/via/rules.mk new file mode 100644 index 000000000000..a823f59c43d9 --- /dev/null +++ b/keyboards/singa/keymaps/via/rules.mk @@ -0,0 +1,8 @@ +VIA_ENABLE = yes +LTO_ENABLE = yes + +MOUSEKEY_ENABLE = no +EXTRAKEY_ENABLE = no +COMMAND_ENABLE = no +CONSOLE_ENABLE = no + From 4c82a40a0a2bbcff4dd242a872297e7b20398c99 Mon Sep 17 00:00:00 2001 From: Maarten Dekkers Date: Tue, 18 Aug 2020 06:33:27 +0200 Subject: [PATCH 579/930] [Keyboard] Maartenwut GH80-1800 (#9981) * Add GH80-1800 * Update readme.md --- keyboards/maartenwut/gh80_1800/config.h | 143 +++++++ keyboards/maartenwut/gh80_1800/gh80_1800.c | 44 +++ keyboards/maartenwut/gh80_1800/gh80_1800.h | 94 +++++ keyboards/maartenwut/gh80_1800/info.json | 356 ++++++++++++++++++ .../gh80_1800/keymaps/default/keymap.c | 28 ++ .../gh80_1800/keymaps/default/readme.md | 1 + .../maartenwut/gh80_1800/keymaps/via/keymap.c | 55 +++ .../maartenwut/gh80_1800/keymaps/via/rules.mk | 2 + keyboards/maartenwut/gh80_1800/readme.md | 13 + keyboards/maartenwut/gh80_1800/rules.mk | 21 ++ 10 files changed, 757 insertions(+) create mode 100644 keyboards/maartenwut/gh80_1800/config.h create mode 100644 keyboards/maartenwut/gh80_1800/gh80_1800.c create mode 100644 keyboards/maartenwut/gh80_1800/gh80_1800.h create mode 100644 keyboards/maartenwut/gh80_1800/info.json create mode 100644 keyboards/maartenwut/gh80_1800/keymaps/default/keymap.c create mode 100644 keyboards/maartenwut/gh80_1800/keymaps/default/readme.md create mode 100644 keyboards/maartenwut/gh80_1800/keymaps/via/keymap.c create mode 100644 keyboards/maartenwut/gh80_1800/keymaps/via/rules.mk create mode 100644 keyboards/maartenwut/gh80_1800/readme.md create mode 100644 keyboards/maartenwut/gh80_1800/rules.mk diff --git a/keyboards/maartenwut/gh80_1800/config.h b/keyboards/maartenwut/gh80_1800/config.h new file mode 100644 index 000000000000..31ab3a449672 --- /dev/null +++ b/keyboards/maartenwut/gh80_1800/config.h @@ -0,0 +1,143 @@ +/* Copyright 2020 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 0x8B23 +#define DEVICE_VER 0x0001 +#define MANUFACTURER Maartenwut +#define PRODUCT GH80 1800 + +/* key matrix size */ +#define MATRIX_ROWS 10 +#define MATRIX_COLS 11 + +/* + * 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,B4,B5,B6,C6,C7,B0,B2,B1,B3} +#define MATRIX_COL_PINS {F0,F1,F4,F5,F6,F7,D3,D2,D1,D0,B7} +#define UNUSED_PINS {E6} + +/* 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 D0 +// #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 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 + +/* + * 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/maartenwut/gh80_1800/gh80_1800.c b/keyboards/maartenwut/gh80_1800/gh80_1800.c new file mode 100644 index 000000000000..58cd87db0216 --- /dev/null +++ b/keyboards/maartenwut/gh80_1800/gh80_1800.c @@ -0,0 +1,44 @@ +/* Copyright 2020 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 "gh80_1800.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) { + setPinOutput(D6); + setPinOutput(D7); + setPinOutput(D4); + + writePinHigh(D6); + writePinHigh(D7); + writePinHigh(D4); +} + +bool led_update_kb(led_t led_state) { + if(led_update_user(led_state)) { + writePin(D6, !led_state.num_lock); + writePin(D7, !led_state.caps_lock); + writePin(D4, !led_state.scroll_lock); + } + + return true; +} diff --git a/keyboards/maartenwut/gh80_1800/gh80_1800.h b/keyboards/maartenwut/gh80_1800/gh80_1800.h new file mode 100644 index 000000000000..fe700fa0a532 --- /dev/null +++ b/keyboards/maartenwut/gh80_1800/gh80_1800.h @@ -0,0 +1,94 @@ +/* Copyright 2020 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, k07, k08, k09, k0a, \ + k17, k18, k19, k1a, \ + k20, k30, k21, k31, k22, k32, k23, k33, k24, k34, k25, k35, k36, k26, k16, k27, k28, k29, k2a, \ + k40, k50, k41, k51, k42, k52, k43, k53, k44, k54, k45, k55, k46, k56, k37, k38, k39, k3a, \ + k60, k70, k61, k71, k62, k72, k63, k73, k64, k74, k65, k75, k76, k66, k47, k48, k49, k4a, \ + k80, k90, k81, k91, k82, k92, k83, k93, k84, k94, k85, k95, k86, k97, k57, k58, k59, k5a, \ + k77, k87, k78, k88, k79, k89, k7a, k8a, k98, k99, k9a, k68, k69, k6a \ +) \ +{ \ + {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, k33, k34, k35, k36, k37, k38, k39, k3a}, \ + {k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, k4a}, \ + {k50, k51, k52, k53, k54, k55, k56, k57, k58, k59, k5a}, \ + {k60, k61, k62, k63, k64, k65, k66, XXX, k68, k69, k6a}, \ + {k70, k71, k72, k73, k74, k75, k76, k77, k78, k79, k7a}, \ + {k80, k81, k82, k83, k84, k85, k86, k87, k88, k89, k8a}, \ + {k90, k91, k92, k93, k94, k95, XXX, k97, k98, k99, k9a} \ +} + +#define LAYOUT_1800_ansi( \ + k00, k10, k01, k11, k02, k12, k03, k13, k04, k14, k05, k15, k06, k07, k08, k09, k0a, \ + k17, k18, k19, k1a, \ + k20, k30, k21, k31, k22, k32, k23, k33, k24, k34, k25, k35, k36, k16, k27, k28, k29, k2a, \ + k40, k50, k41, k51, k42, k52, k43, k53, k44, k54, k45, k55, k46, k56, k37, k38, k39, k3a, \ + k60, k70, k61, k71, k62, k72, k63, k73, k64, k74, k65, k75, k66, k47, k48, k49, k4a, \ + k80, k81, k91, k82, k92, k83, k93, k84, k94, k85, k95, k86, k97, k57, k58, k59, \ + k77, k87, k78, k88, k79, k89, k7a, k8a, k98, k99, k9a, k68, k69, k6a \ +) \ +{ \ + {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, XXX, k27, k28, k29, k2a}, \ + {k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a}, \ + {k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, k4a}, \ + {k50, k51, k52, k53, k54, k55, k56, k57, k58, k59, XXX}, \ + {k60, k61, k62, k63, k64, k65, k66, XXX, k68, k69, k6a}, \ + {k70, k71, k72, k73, k74, k75, XXX, k77, k78, k79, k7a}, \ + {k80, k81, k82, k83, k84, k85, k86, k87, k88, k89, k8a}, \ + {XXX, k91, k92, k93, k94, k95, XXX, k97, k98, k99, k9a} \ +} + +#define LAYOUT_1800_iso( \ + k00, k10, k01, k11, k02, k12, k03, k13, k04, k14, k05, k15, k06, k07, k08, k09, k0a, \ + k17, k18, k19, k1a, \ + k20, k30, k21, k31, k22, k32, k23, k33, k24, k34, k25, k35, k36, k16, k27, k28, k29, k2a, \ + k40, k50, k41, k51, k42, k52, k43, k53, k44, k54, k45, k55, k46, k37, k38, k39, k3a, \ + k60, k70, k61, k71, k62, k72, k63, k73, k64, k74, k65, k75, k76, k66, k47, k48, k49, k4a, \ + k80, k90, k81, k91, k82, k92, k83, k93, k84, k94, k85, k95, k86, k97, k57, k58, k59, \ + k77, k87, k78, k88, k79, k89, k7a, k8a, k98, k99, k9a, k68, k69, k6a \ +) \ +{ \ + {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, XXX, k27, k28, k29, k2a}, \ + {k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a}, \ + {k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, k4a}, \ + {k50, k51, k52, k53, k54, k55, XXX, k57, k58, k59, XXX}, \ + {k60, k61, k62, k63, k64, k65, k66, XXX, k68, k69, k6a}, \ + {k70, k71, k72, k73, k74, k75, k76, k77, k78, k79, k7a}, \ + {k80, k81, k82, k83, k84, k85, k86, k87, k88, k89, k8a}, \ + {k90, k91, k92, k93, k94, k95, XXX, k97, k98, k99, k9a} \ +} diff --git a/keyboards/maartenwut/gh80_1800/info.json b/keyboards/maartenwut/gh80_1800/info.json new file mode 100644 index 000000000000..e7ed48b95483 --- /dev/null +++ b/keyboards/maartenwut/gh80_1800/info.json @@ -0,0 +1,356 @@ +{ + "keyboard_name": "GH80-1800", + "url": "https://github.com/Maartenwut/gh80-series/tree/master/GH80-1800", + "maintainer": "Maartenwut", + "width": 19.5, + "height": 7.25, + "layouts": { + "LAYOUT_all": { + "layout": [ + {"x":0, "y":0}, + {"x":1.25, "y":0}, + {"x":2.25, "y":0}, + {"x":3.25, "y":0}, + {"x":4.25, "y":0}, + {"x":5.5, "y":0}, + {"x":6.5, "y":0}, + {"x":7.5, "y":0}, + {"x":8.5, "y":0}, + {"x":9.75, "y":0}, + {"x":10.75, "y":0}, + {"x":11.75, "y":0}, + {"x":12.75, "y":0}, + {"x":15.5, "y":0}, + {"x":16.5, "y":0}, + {"x":17.5, "y":0}, + {"x":18.5, "y":0}, + + {"x":15.5, "y":1}, + {"x":16.5, "y":1}, + {"x":17.5, "y":1}, + {"x":18.5, "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":12, "y":2}, + {"x":13, "y":2}, + {"x":14, "y":2}, + {"x":15.5, "y":2}, + {"x":16.5, "y":2}, + {"x":17.5, "y":2}, + {"x":18.5, "y":2}, + + {"x":0, "y":3, "w":1.5}, + {"x":1.5, "y":3}, + {"x":2.5, "y":3}, + {"x":3.5, "y":3}, + {"x":4.5, "y":3}, + {"x":5.5, "y":3}, + {"x":6.5, "y":3}, + {"x":7.5, "y":3}, + {"x":8.5, "y":3}, + {"x":9.5, "y":3}, + {"x":10.5, "y":3}, + {"x":11.5, "y":3}, + {"x":12.5, "y":3}, + {"x":13.5, "y":3, "w":1.5}, + {"x":15.5, "y":3}, + {"x":16.5, "y":3}, + {"x":17.5, "y":3}, + {"x":18.5, "y":3}, + + {"x":0, "y":4, "w":1.75}, + {"x":1.75, "y":4}, + {"x":2.75, "y":4}, + {"x":3.75, "y":4}, + {"x":4.75, "y":4}, + {"x":5.75, "y":4}, + {"x":6.75, "y":4}, + {"x":7.75, "y":4}, + {"x":8.75, "y":4}, + {"x":9.75, "y":4}, + {"x":10.75, "y":4}, + {"x":11.75, "y":4}, + {"x":12.75, "y":4}, + {"x":13.75, "y":4, "w":1.25}, + {"x":15.5, "y":4}, + {"x":16.5, "y":4}, + {"x":17.5, "y":4}, + {"x":18.5, "y":4}, + + {"x":0, "y":5, "w":1.25}, + {"x":1.25, "y":5}, + {"x":2.25, "y":5}, + {"x":3.25, "y":5}, + {"x":4.25, "y":5}, + {"x":5.25, "y":5}, + {"x":6.25, "y":5}, + {"x":7.25, "y":5}, + {"x":8.25, "y":5}, + {"x":9.25, "y":5}, + {"x":10.25, "y":5}, + {"x":11.25, "y":5}, + {"x":12.25, "y":5, "w":1.75}, + {"x":14.25, "y":5.25}, + {"x":15.5, "y":5}, + {"x":16.5, "y":5}, + {"x":17.5, "y":5}, + {"x":18.5, "y":5}, + + {"x":0, "y":6}, + {"x":1, "y":6}, + {"x":2, "y":6}, + {"x":3, "y":6, "w":6}, + {"x":9, "y":6}, + {"x":10, "y":6}, + {"x":11, "y":6}, + {"x":12, "y":6}, + {"x":13.25, "y":6.25}, + {"x":14.25, "y":6.25}, + {"x":15.25, "y":6.25}, + {"x":16.5, "y":6}, + {"x":17.5, "y":6}, + {"x":18.5, "y":6} + ] + }, + "LAYOUT_1800_ansi": { + "layout": [ + {"x":0, "y":0}, + {"x":1.25, "y":0}, + {"x":2.25, "y":0}, + {"x":3.25, "y":0}, + {"x":4.25, "y":0}, + {"x":5.5, "y":0}, + {"x":6.5, "y":0}, + {"x":7.5, "y":0}, + {"x":8.5, "y":0}, + {"x":9.75, "y":0}, + {"x":10.75, "y":0}, + {"x":11.75, "y":0}, + {"x":12.75, "y":0}, + {"x":15.5, "y":0}, + {"x":16.5, "y":0}, + {"x":17.5, "y":0}, + {"x":18.5, "y":0}, + + {"x":15.5, "y":1}, + {"x":16.5, "y":1}, + {"x":17.5, "y":1}, + {"x":18.5, "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":12, "y":2}, + {"x":13, "y":2, "w":2}, + {"x":15.5, "y":2}, + {"x":16.5, "y":2}, + {"x":17.5, "y":2}, + {"x":18.5, "y":2}, + + {"x":0, "y":3, "w":1.5}, + {"x":1.5, "y":3}, + {"x":2.5, "y":3}, + {"x":3.5, "y":3}, + {"x":4.5, "y":3}, + {"x":5.5, "y":3}, + {"x":6.5, "y":3}, + {"x":7.5, "y":3}, + {"x":8.5, "y":3}, + {"x":9.5, "y":3}, + {"x":10.5, "y":3}, + {"x":11.5, "y":3}, + {"x":12.5, "y":3}, + {"x":13.5, "y":3, "w":1.5}, + {"x":15.5, "y":3}, + {"x":16.5, "y":3}, + {"x":17.5, "y":3}, + {"x":18.5, "y":3}, + + {"x":0, "y":4, "w":1.75}, + {"x":1.75, "y":4}, + {"x":2.75, "y":4}, + {"x":3.75, "y":4}, + {"x":4.75, "y":4}, + {"x":5.75, "y":4}, + {"x":6.75, "y":4}, + {"x":7.75, "y":4}, + {"x":8.75, "y":4}, + {"x":9.75, "y":4}, + {"x":10.75, "y":4}, + {"x":11.75, "y":4}, + {"x":12.75, "y":4, "w":2.25}, + {"x":15.5, "y":4}, + {"x":16.5, "y":4}, + {"x":17.5, "y":4}, + {"x":18.5, "y":4}, + + {"x":0, "y":5, "w":2.25}, + {"x":2.25, "y":5}, + {"x":3.25, "y":5}, + {"x":4.25, "y":5}, + {"x":5.25, "y":5}, + {"x":6.25, "y":5}, + {"x":7.25, "y":5}, + {"x":8.25, "y":5}, + {"x":9.25, "y":5}, + {"x":10.25, "y":5}, + {"x":11.25, "y":5}, + {"x":12.25, "y":5, "w":1.75}, + {"x":14.25, "y":5.25}, + {"x":15.5, "y":5}, + {"x":16.5, "y":5}, + {"x":17.5, "y":5}, + + {"x":0, "y":6}, + {"x":1, "y":6}, + {"x":2, "y":6}, + {"x":3, "y":6, "w":6}, + {"x":9, "y":6}, + {"x":10, "y":6}, + {"x":11, "y":6}, + {"x":12, "y":6}, + {"x":13.25, "y":6.25}, + {"x":14.25, "y":6.25}, + {"x":15.25, "y":6.25}, + {"x":16.5, "y":6}, + {"x":17.5, "y":6}, + {"x":18.5, "y":5, "h":2} + ] + }, + "LAYOUT_1800_iso": { + "layout": [ + {"x":0, "y":0}, + {"x":1.25, "y":0}, + {"x":2.25, "y":0}, + {"x":3.25, "y":0}, + {"x":4.25, "y":0}, + {"x":5.5, "y":0}, + {"x":6.5, "y":0}, + {"x":7.5, "y":0}, + {"x":8.5, "y":0}, + {"x":9.75, "y":0}, + {"x":10.75, "y":0}, + {"x":11.75, "y":0}, + {"x":12.75, "y":0}, + {"x":15.5, "y":0}, + {"x":16.5, "y":0}, + {"x":17.5, "y":0}, + {"x":18.5, "y":0}, + + {"x":15.5, "y":1}, + {"x":16.5, "y":1}, + {"x":17.5, "y":1}, + {"x":18.5, "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":12, "y":2}, + {"x":13, "y":2, "w":2}, + {"x":15.5, "y":2}, + {"x":16.5, "y":2}, + {"x":17.5, "y":2}, + {"x":18.5, "y":2}, + + {"x":0, "y":3, "w":1.5}, + {"x":1.5, "y":3}, + {"x":2.5, "y":3}, + {"x":3.5, "y":3}, + {"x":4.5, "y":3}, + {"x":5.5, "y":3}, + {"x":6.5, "y":3}, + {"x":7.5, "y":3}, + {"x":8.5, "y":3}, + {"x":9.5, "y":3}, + {"x":10.5, "y":3}, + {"x":11.5, "y":3}, + {"x":12.5, "y":3}, + {"x":15.5, "y":3}, + {"x":16.5, "y":3}, + {"x":17.5, "y":3}, + {"x":18.5, "y":3}, + + {"x":0, "y":4, "w":1.75}, + {"x":1.75, "y":4}, + {"x":2.75, "y":4}, + {"x":3.75, "y":4}, + {"x":4.75, "y":4}, + {"x":5.75, "y":4}, + {"x":6.75, "y":4}, + {"x":7.75, "y":4}, + {"x":8.75, "y":4}, + {"x":9.75, "y":4}, + {"x":10.75, "y":4}, + {"x":11.75, "y":4}, + {"x":12.75, "y":4}, + {"x":13.75, "y":3, "w":1.25, "h":2}, + {"x":15.5, "y":4}, + {"x":16.5, "y":4}, + {"x":17.5, "y":4}, + {"x":18.5, "y":4}, + + {"x":0, "y":5, "w":1.25}, + {"x":1.25, "y":5}, + {"x":2.25, "y":5}, + {"x":3.25, "y":5}, + {"x":4.25, "y":5}, + {"x":5.25, "y":5}, + {"x":6.25, "y":5}, + {"x":7.25, "y":5}, + {"x":8.25, "y":5}, + {"x":9.25, "y":5}, + {"x":10.25, "y":5}, + {"x":11.25, "y":5}, + {"x":12.25, "y":5, "w":1.75}, + {"x":14.25, "y":5.25}, + {"x":15.5, "y":5}, + {"x":16.5, "y":5}, + {"x":17.5, "y":5}, + + {"x":0, "y":6}, + {"x":1, "y":6}, + {"x":2, "y":6}, + {"x":3, "y":6, "w":6}, + {"x":9, "y":6}, + {"x":10, "y":6}, + {"x":11, "y":6}, + {"x":12, "y":6}, + {"x":13.25, "y":6.25}, + {"x":14.25, "y":6.25}, + {"x":15.25, "y":6.25}, + {"x":16.5, "y":6}, + {"x":17.5, "y":6}, + {"x":18.5, "y":5, "h":2} + ] + } + } +} \ No newline at end of file diff --git a/keyboards/maartenwut/gh80_1800/keymaps/default/keymap.c b/keyboards/maartenwut/gh80_1800/keymaps/default/keymap.c new file mode 100644 index 000000000000..84b7005f860d --- /dev/null +++ b/keyboards/maartenwut/gh80_1800/keymaps/default/keymap.c @@ -0,0 +1,28 @@ +/* Copyright 2020 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 + +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_INS, KC_HOME, KC_PGUP, KC_PSCR, + KC_DEL, KC_END, KC_PGDN, KC_SLCK, + 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_BSLS, 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_RSFT, KC_UP, KC_P1, KC_P2, KC_P3, KC_PPLS, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, KC_APP, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT, KC_P0, KC_PDOT, KC_PENT + ), +}; \ No newline at end of file diff --git a/keyboards/maartenwut/gh80_1800/keymaps/default/readme.md b/keyboards/maartenwut/gh80_1800/keymaps/default/readme.md new file mode 100644 index 000000000000..c90376fe8424 --- /dev/null +++ b/keyboards/maartenwut/gh80_1800/keymaps/default/readme.md @@ -0,0 +1 @@ +This is the default keymap for the GH80-1800. diff --git a/keyboards/maartenwut/gh80_1800/keymaps/via/keymap.c b/keyboards/maartenwut/gh80_1800/keymaps/via/keymap.c new file mode 100644 index 000000000000..415596d0c2db --- /dev/null +++ b/keyboards/maartenwut/gh80_1800/keymaps/via/keymap.c @@ -0,0 +1,55 @@ +/* Copyright 2020 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 + +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_INS, KC_HOME, KC_PGUP, KC_PSCR, + KC_DEL, KC_END, KC_PGDN, KC_SLCK, + 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_BSLS, 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_RSFT, KC_UP, KC_P1, KC_P2, KC_P3, KC_PPLS, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, KC_APP, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT, KC_P0, KC_PDOT, KC_PENT + ), + [1] = LAYOUT_all( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + [2] = LAYOUT_all( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + [3] = LAYOUT_all( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ) +}; \ No newline at end of file diff --git a/keyboards/maartenwut/gh80_1800/keymaps/via/rules.mk b/keyboards/maartenwut/gh80_1800/keymaps/via/rules.mk new file mode 100644 index 000000000000..36b7ba9cbc98 --- /dev/null +++ b/keyboards/maartenwut/gh80_1800/keymaps/via/rules.mk @@ -0,0 +1,2 @@ +VIA_ENABLE = yes +LTO_ENABLE = yes diff --git a/keyboards/maartenwut/gh80_1800/readme.md b/keyboards/maartenwut/gh80_1800/readme.md new file mode 100644 index 000000000000..a19d343ae610 --- /dev/null +++ b/keyboards/maartenwut/gh80_1800/readme.md @@ -0,0 +1,13 @@ +# GH80-1800 + +## Support +* Keyboard Maintainer: [Maarten Dekkers](https://github.com/maartenwut) +* Hardware Supported: GH80-1800 +* Hardware Availability: [Open source on GitHub](https://github.com/Maartenwut/gh80-series/tree/master/GH80-1800) + +## Build +Make example for this keyboard (after setting up your build environment): + + make maartenwut/gh80_1800: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/gh80_1800/rules.mk b/keyboards/maartenwut/gh80_1800/rules.mk new file mode 100644 index 000000000000..eaca844339d6 --- /dev/null +++ b/keyboards/maartenwut/gh80_1800/rules.mk @@ -0,0 +1,21 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +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 = no # Commands for debug and configuration +# 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 +BLUETOOTH_ENABLE = no # Enable Bluetooth From 613e5752d70758d3e0d9a37837efeb2175b74e75 Mon Sep 17 00:00:00 2001 From: HASU <18438880@qq.com> Date: Tue, 18 Aug 2020 12:36:16 +0800 Subject: [PATCH 580/930] latinpad ADD BOOTMAGIC_ENABLE = lite (#10056) * Update rules.mk * Update config.h * Update keyboards/latinpad/config.h --- keyboards/latinpad/rules.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/keyboards/latinpad/rules.mk b/keyboards/latinpad/rules.mk index 47208aec2e94..8d948b706ade 100644 --- a/keyboards/latinpad/rules.mk +++ b/keyboards/latinpad/rules.mk @@ -13,7 +13,7 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable -BOOTMAGIC_ENABLE = yes # 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 = no # Console for debug From 3b09add3494716eed62c562b334a82d6d460365f Mon Sep 17 00:00:00 2001 From: Yoonbae Cho Date: Tue, 18 Aug 2020 14:03:55 +0900 Subject: [PATCH 581/930] [Keymap] yoonbae81 keymap for JJ50 (#10052) * Create keymap for jj50 * Update rules.mk * Update rules.mk * Update * Update keymap.c --- keyboards/jj50/keymaps/yoonbae81/config.h | 6 ++++ keyboards/jj50/keymaps/yoonbae81/keymap.c | 42 +++++++++++++++++++++++ keyboards/jj50/keymaps/yoonbae81/rules.mk | 3 ++ 3 files changed, 51 insertions(+) create mode 100644 keyboards/jj50/keymaps/yoonbae81/config.h create mode 100644 keyboards/jj50/keymaps/yoonbae81/keymap.c create mode 100644 keyboards/jj50/keymaps/yoonbae81/rules.mk diff --git a/keyboards/jj50/keymaps/yoonbae81/config.h b/keyboards/jj50/keymaps/yoonbae81/config.h new file mode 100644 index 000000000000..f91326ca266a --- /dev/null +++ b/keyboards/jj50/keymaps/yoonbae81/config.h @@ -0,0 +1,6 @@ +#pragma once + +#define MOUSEKEY_DELAY 100 +#define MOUSEKEY_INTERVAL 25 +#define MOUSEKEY_MAX_SPEED 7 +#define MOUSEKEY_TIME_TO_MAX 30 \ No newline at end of file diff --git a/keyboards/jj50/keymaps/yoonbae81/keymap.c b/keyboards/jj50/keymaps/yoonbae81/keymap.c new file mode 100644 index 000000000000..571f93be5202 --- /dev/null +++ b/keyboards/jj50/keymaps/yoonbae81/keymap.c @@ -0,0 +1,42 @@ +#include QMK_KEYBOARD_H + +enum layer_names { + _MAIN, + _FN1, + _FN2, + _FN3 +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_MAIN] = LAYOUT( + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, 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_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_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_BSPC, + MO(2), MO(3), KC_LGUI, KC_LALT, LT(1,KC_ENT),KC_NO, KC_SPC,KC_NO, LT(1,KC_RALT), LT(2,KC_RCTL), KC_APP, TO(2) + ), + + [_FN1] = LAYOUT( + _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, + _______, KC_LCBR, KC_PGUP, KC_UP, KC_HOME, KC_RCBR, KC_NO, KC_HOME, KC_PGUP, KC_NO, KC_NO, KC_F12, + _______, KC_LPRN, KC_LEFT, KC_DOWN, KC_RGHT, KC_RPRN, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_MINS, KC_EQL, + _______, KC_LBRC, KC_END, KC_NO, KC_PGDN, KC_RBRC, KC_NO, KC_PGDN, KC_END, KC_ENT, KC_INS, KC_DEL, + _______, _______, _______, _______, _______, _______, KC_BSPC, _______, _______, _______, _______, _______ + ), + + [_FN2] = LAYOUT( + TO(0), KC_1, KC_2, KC_SLCK, KC_PAUS, KC_PSCR, KC_CALC, KC_ESC, KC_PMNS, KC_PERC, KC_PSLS, MO(3), + _______, KC_NO, KC_WH_U, KC_MS_U, KC_NO, KC_NO, KC_F2, KC_7, KC_8, KC_9, KC_PAST, KC_NO, + _______, KC_NO, KC_MS_L, KC_MS_D, KC_MS_R, KC_NO, KC_ENT, KC_4, KC_5, KC_6, KC_MINS, KC_EQL, + _______, KC_NO, KC_NO, KC_NO, KC_WH_D, KC_NO, KC_NO, KC_1, KC_2, KC_3, KC_PPLS, KC_BSPC, + _______, _______, _______, KC_BTN2, KC_BTN1, _______, KC_0, _______, KC_PDOT, _______, _______, TO(0) + ), + + [_FN3] = LAYOUT( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, KC_MPRV, KC_MRWD, KC_MFFD, KC_MNXT, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, KC_VOLD, KC_VOLU, KC_MPLY, _______, _______, _______, _______, _______, _______, _______ + ) +}; \ No newline at end of file diff --git a/keyboards/jj50/keymaps/yoonbae81/rules.mk b/keyboards/jj50/keymaps/yoonbae81/rules.mk new file mode 100644 index 000000000000..8232d05fdbd2 --- /dev/null +++ b/keyboards/jj50/keymaps/yoonbae81/rules.mk @@ -0,0 +1,3 @@ +MOUSEKEY_ENABLE = yes +BACKLIGHT_ENABLE = no +RGBLIGHT_ENABLE = no From b21faf768e49d54bb17a611938f598cabe76994d Mon Sep 17 00:00:00 2001 From: Xelus22 <17491233+Xelus22@users.noreply.github.com> Date: Tue, 18 Aug 2020 16:12:55 +1000 Subject: [PATCH 582/930] [Keyboard] AEBoards Constellation (#9972) * open drain * ext65 initial * clean up messy code * clean up init * update docs stm32 only and applies to all 3 driver * fix USE_GPIOIv1 * place documentation at bottom * constellation initial * cleanup * fix ws2812.c * Clean up rules.mk * Update config.h * Update config.h * Update readme.md * Update rules.mk * Update rules.mk * add license header --- keyboards/aeboards/constellation/config.h | 47 +++++++++++++++++ .../aeboards/constellation/constellation.c | 19 +++++++ .../aeboards/constellation/constellation.h | 35 +++++++++++++ .../constellation/keymaps/default/keymap.c | 36 +++++++++++++ .../constellation/keymaps/default/readme.md | 2 + .../constellation/keymaps/via/keymap.c | 52 +++++++++++++++++++ .../constellation/keymaps/via/readme.md | 2 + .../constellation/keymaps/via/rules.mk | 1 + keyboards/aeboards/constellation/readme.md | 13 +++++ keyboards/aeboards/constellation/rules.mk | 22 ++++++++ 10 files changed, 229 insertions(+) create mode 100755 keyboards/aeboards/constellation/config.h create mode 100755 keyboards/aeboards/constellation/constellation.c create mode 100755 keyboards/aeboards/constellation/constellation.h create mode 100755 keyboards/aeboards/constellation/keymaps/default/keymap.c create mode 100755 keyboards/aeboards/constellation/keymaps/default/readme.md create mode 100755 keyboards/aeboards/constellation/keymaps/via/keymap.c create mode 100755 keyboards/aeboards/constellation/keymaps/via/readme.md create mode 100755 keyboards/aeboards/constellation/keymaps/via/rules.mk create mode 100755 keyboards/aeboards/constellation/readme.md create mode 100755 keyboards/aeboards/constellation/rules.mk diff --git a/keyboards/aeboards/constellation/config.h b/keyboards/aeboards/constellation/config.h new file mode 100755 index 000000000000..f2e3f476b2e9 --- /dev/null +++ b/keyboards/aeboards/constellation/config.h @@ -0,0 +1,47 @@ +/* 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 . + */ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0x4145 // AE +#define PRODUCT_ID 0x065C // 65 - Constellation +#define DEVICE_VER 0x0001 +#define MANUFACTURER AEBoards +#define PRODUCT AEBoards Constellation + +/* key matrix size */ +#define MATRIX_ROWS 5 +#define MATRIX_COLS 15 + +/* key matrix pins */ +#define MATRIX_ROW_PINS { B0, B1, F0, F1, F4 } +#define MATRIX_COL_PINS { E6, D5, B2, B3, D3, F6, F7, C7, C6, B6, B5, B4, D7, D6, D4 } +#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/aeboards/constellation/constellation.c b/keyboards/aeboards/constellation/constellation.c new file mode 100755 index 000000000000..75d3efe7aca2 --- /dev/null +++ b/keyboards/aeboards/constellation/constellation.c @@ -0,0 +1,19 @@ +/* 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 "constellation.h" \ No newline at end of file diff --git a/keyboards/aeboards/constellation/constellation.h b/keyboards/aeboards/constellation/constellation.h new file mode 100755 index 000000000000..53a95d5d8577 --- /dev/null +++ b/keyboards/aeboards/constellation/constellation.h @@ -0,0 +1,35 @@ +/* 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 . + */ + +#pragma once + +#include "quantum.h" + +#define ____ KC_NO + +#define LAYOUT_all( \ + K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K213, 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, K312, K313, K314, \ + K400, K401, K402, K408, K409, K410, K412, K413, K414 \ +) { \ + { 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, K213, K214 }, \ + { K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, ____, K312, K313, K314 }, \ + { K400, K401, K402, ____, ____, ____, ____, ____, K408, K409, K410, ____, K412, K413, K414 } \ +} diff --git a/keyboards/aeboards/constellation/keymaps/default/keymap.c b/keyboards/aeboards/constellation/keymaps/default/keymap.c new file mode 100755 index 000000000000..70e763332583 --- /dev/null +++ b/keyboards/aeboards/constellation/keymaps/default/keymap.c @@ -0,0 +1,36 @@ +/* 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 . + */ +#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, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, MO(1), KC_RCTL, 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, RESET, + 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, KC_TRNS) +}; + diff --git a/keyboards/aeboards/constellation/keymaps/default/readme.md b/keyboards/aeboards/constellation/keymaps/default/readme.md new file mode 100755 index 000000000000..e5e100d873f6 --- /dev/null +++ b/keyboards/aeboards/constellation/keymaps/default/readme.md @@ -0,0 +1,2 @@ +# The Default Constellation Layout + diff --git a/keyboards/aeboards/constellation/keymaps/via/keymap.c b/keyboards/aeboards/constellation/keymaps/via/keymap.c new file mode 100755 index 000000000000..2836cf848d59 --- /dev/null +++ b/keyboards/aeboards/constellation/keymaps/via/keymap.c @@ -0,0 +1,52 @@ +/* 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 . + */ +#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, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RCTL, 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, 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, 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, KC_TRNS), +}; + diff --git a/keyboards/aeboards/constellation/keymaps/via/readme.md b/keyboards/aeboards/constellation/keymaps/via/readme.md new file mode 100755 index 000000000000..ce1a7d691ca3 --- /dev/null +++ b/keyboards/aeboards/constellation/keymaps/via/readme.md @@ -0,0 +1,2 @@ +# The VIA Constellation Layout + diff --git a/keyboards/aeboards/constellation/keymaps/via/rules.mk b/keyboards/aeboards/constellation/keymaps/via/rules.mk new file mode 100755 index 000000000000..1e5b99807cb7 --- /dev/null +++ b/keyboards/aeboards/constellation/keymaps/via/rules.mk @@ -0,0 +1 @@ +VIA_ENABLE = yes diff --git a/keyboards/aeboards/constellation/readme.md b/keyboards/aeboards/constellation/readme.md new file mode 100755 index 000000000000..19d4354e0243 --- /dev/null +++ b/keyboards/aeboards/constellation/readme.md @@ -0,0 +1,13 @@ +# CONSTELLATION + +A gasket 65% keyboard by [aeboards](https://aeboards.com/) + +* Keyboard Maintainer: [Xelus22](https://github.com/Xelus22) +* Hardware Supported: CONSTELLATION +* Hardware Availability: Custom keyboard group buys + +Make example for this keyboard (after setting up your build environment): + + make aeboards/constellation: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/aeboards/constellation/rules.mk b/keyboards/aeboards/constellation/rules.mk new file mode 100755 index 000000000000..2a82012de5f6 --- /dev/null +++ b/keyboards/aeboards/constellation/rules.mk @@ -0,0 +1,22 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +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 = 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 +BLUETOOTH_ENABLE = no # Enable Bluetooth +AUDIO_ENABLE = no # Audio output +LTO_ENABLE = yes From 3f5f6030f81c6ea8a6bd27b882149e21c5dd3510 Mon Sep 17 00:00:00 2001 From: markva Date: Tue, 18 Aug 2020 08:28:47 +0200 Subject: [PATCH 583/930] [Keyboard] BM60 RGB ISO (#9975) * Add BM60 RGB ISO Keyboard * fixed link to picture * Update keyboards/bm60rgb_iso/bm60rgb_iso.c * Update keyboards/bm60rgb_iso/config.h * Update keyboards/bm60rgb_iso/config.h * Update keyboards/bm60rgb_iso/info.json * Update keyboards/bm60rgb_iso/info.json * Update keyboards/bm60rgb_iso/rules.mk * Delete vscode file * Update my new username * Disable console and commands * Apply suggestions from code review --- keyboards/bm60rgb_iso/bm60rgb_iso.c | 48 ++++++++++++ keyboards/bm60rgb_iso/bm60rgb_iso.h | 32 ++++++++ keyboards/bm60rgb_iso/config.h | 72 +++++++++++++++++ keyboards/bm60rgb_iso/info.json | 77 +++++++++++++++++++ .../bm60rgb_iso/keymaps/default/keymap.c | 34 ++++++++ .../bm60rgb_iso/keymaps/default/readme.md | 1 + keyboards/bm60rgb_iso/readme.md | 19 +++++ keyboards/bm60rgb_iso/rules.mk | 24 ++++++ 8 files changed, 307 insertions(+) create mode 100644 keyboards/bm60rgb_iso/bm60rgb_iso.c create mode 100644 keyboards/bm60rgb_iso/bm60rgb_iso.h create mode 100644 keyboards/bm60rgb_iso/config.h create mode 100644 keyboards/bm60rgb_iso/info.json create mode 100644 keyboards/bm60rgb_iso/keymaps/default/keymap.c create mode 100644 keyboards/bm60rgb_iso/keymaps/default/readme.md create mode 100644 keyboards/bm60rgb_iso/readme.md create mode 100644 keyboards/bm60rgb_iso/rules.mk diff --git a/keyboards/bm60rgb_iso/bm60rgb_iso.c b/keyboards/bm60rgb_iso/bm60rgb_iso.c new file mode 100644 index 000000000000..3fa1bc89825b --- /dev/null +++ b/keyboards/bm60rgb_iso/bm60rgb_iso.c @@ -0,0 +1,48 @@ +/* Copyright 2020 markva + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public 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_iso.h" + +#if defined(RGB_MATRIX_ENABLE) +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, NO_LED, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40 }, + { 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54 }, + { 55, 56, 57, NO_LED, NO_LED, NO_LED, 58, NO_LED, NO_LED, 59, 60, 61, 62, 63} +}, { + // 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, + { 3, 48 }, { 22, 48 }, { 33, 48 }, { 48, 48 }, { 63, 48 }, { 78, 48 }, { 93, 48 }, { 108, 48 }, { 123, 48 }, { 138, 48 }, { 153, 48 }, { 168, 48 }, { 194, 48 }, { 213, 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, 4, 1, 4, + // Ctrl, GUI, Alt, Space, RAlt, FN, Left, Down, Right + 1, 1, 1, 4, 1, 1, 1, 1, 1 +} }; +#endif diff --git a/keyboards/bm60rgb_iso/bm60rgb_iso.h b/keyboards/bm60rgb_iso/bm60rgb_iso.h new file mode 100644 index 000000000000..f521610821cf --- /dev/null +++ b/keyboards/bm60rgb_iso/bm60rgb_iso.h @@ -0,0 +1,32 @@ +/* Copyright 2020 markva + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License 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, \ + K20, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, K1D, \ + K30, 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 }, \ + { K30, 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 }, \ +} diff --git a/keyboards/bm60rgb_iso/config.h b/keyboards/bm60rgb_iso/config.h new file mode 100644 index 000000000000..61d30cd83cea --- /dev/null +++ b/keyboards/bm60rgb_iso/config.h @@ -0,0 +1,72 @@ +/* +Copyright 2020 markva + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License 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 0x4B50 // "KP" +#define PRODUCT_ID 0xEF8C +#define DEVICE_VER 0x0001 +#define MANUFACTURER KPRepublic +#define PRODUCT bm60hsrgb-iso + +/* 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 70 +#ifdef RGB_DI_PIN + #define RGBLED_NUM 70 + #define RGB_MATRIX_KEYPRESSES + // #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 +#endif diff --git a/keyboards/bm60rgb_iso/info.json b/keyboards/bm60rgb_iso/info.json new file mode 100644 index 000000000000..6644a654179c --- /dev/null +++ b/keyboards/bm60rgb_iso/info.json @@ -0,0 +1,77 @@ +{ + "keyboard_name": "BM60 RGB ISO", + "url": "", + "maintainer": "qmk", + "width": 15, + "height": 5, + "layouts": { + "LAYOUT": { + "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":"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}, + {"label":"K1D (B1,F7)", "x":13.75, "y":1, "w":1.25, "h":2}, + {"label":"K30 (B3,D0)", "x":0, "y":3, "w":1.25}, + {"label":"K31 (B3,D1)", "x":1.25, "y":3}, + {"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} + ] + } + } +} diff --git a/keyboards/bm60rgb_iso/keymaps/default/keymap.c b/keyboards/bm60rgb_iso/keymaps/default/keymap.c new file mode 100644 index 000000000000..1cf1804b28ca --- /dev/null +++ b/keyboards/bm60rgb_iso/keymaps/default/keymap.c @@ -0,0 +1,34 @@ +/* Copyright 2020 markva + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public 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_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_BSLS, 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, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + +}; diff --git a/keyboards/bm60rgb_iso/keymaps/default/readme.md b/keyboards/bm60rgb_iso/keymaps/default/readme.md new file mode 100644 index 000000000000..1fd0185d4271 --- /dev/null +++ b/keyboards/bm60rgb_iso/keymaps/default/readme.md @@ -0,0 +1 @@ +# The default keymap for bm60rgb_iso diff --git a/keyboards/bm60rgb_iso/readme.md b/keyboards/bm60rgb_iso/readme.md new file mode 100644 index 000000000000..8ae86e4a6fc4 --- /dev/null +++ b/keyboards/bm60rgb_iso/readme.md @@ -0,0 +1,19 @@ +# BM60 RGB ISO + +![BM60 RGB ISO](https://i.imgur.com/i3gk2vql.jpg) + +A 60% ISO hotswap inswitch RGB keyboard. + +* Keyboard Maintainer: [markva](https://github.com/markva) +* Hardware Supported: BM60 RGB ISO +* Hardware Availability: [KP Republic](https://kprepublic.com/products/bm60-rgb-iso-uk-eu-rgb-60-hot-swappable-pcb-qmk-firmware-rgb-underglow-type-c) + +Make example for this keyboard (after setting up your build environment): + + make bm60rgb_iso:default + +Flashing example for this keyboard: + + make bm60rgb_iso: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). diff --git a/keyboards/bm60rgb_iso/rules.mk b/keyboards/bm60rgb_iso/rules.mk new file mode 100644 index 000000000000..e59155388570 --- /dev/null +++ b/keyboards/bm60rgb_iso/rules.mk @@ -0,0 +1,24 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +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 +BLUETOOTH_ENABLE = no # Enable Bluetooth +AUDIO_ENABLE = no # Audio output +RGB_MATRIX_ENABLE = WS2812 +LTO_ENABLE = yes From c59a81b792ffbe0629183cf1e84f869e9a8d5471 Mon Sep 17 00:00:00 2001 From: Richard Goulter Date: Tue, 18 Aug 2020 13:39:17 +0700 Subject: [PATCH 584/930] [Keyboard] Update bm40hsrgb with RGB Matrix support (#10044) * bm40rgb: copy from kbfirmware.com * bm40rgb: align default keymap * bm40rgb: rename kb.c/h to bm40rgb.c/h * bm40rgb: adjust with changes from the noroadsleft converter * bm40rgb: adjust keyboard to support plant_mit and ortho_4x12 layouts * bm40rgb: Add keyboard readme.md * bm40rgb: add RGB Matrix support * bm40rgb: remove bm40hsrgb layout * Apply suggestions from PR - Fix alignment in keyboards/bm40rgb/bm40rgb.c - Remove redundant DESCRIPTION in keyboards/bm40rgb/config.h - Tidy keyboards/bm40rgb/readme.md - Tidy MANUFACTURER, PRODUCT in keyboards/bm40rgb/config.h - Tidy rules.mk keyboards/bm40rgb/rules.mk - Use PRODUCT_ID computed from SHASUM of keyboard name in keyboards/bm40rgb/config.h - Define LAYOUT_all in keyboards/bm40rgb/bm40rgb.h * Update keyboards/bm40rgb/info.json * Tidy comment * Apply suggestions from code review * Apply suggestions from code review * Revert "bm40rgb: remove bm40hsrgb layout" This reverts commit 1f69a03551321bf8cf736150f1f651127c90585a. * Move the rgbmatrix change over to bm40hsrgb * Wrap g_led_config declaration with --- keyboards/bm40hsrgb/bm40hsrgb.c | 28 +++++++++- keyboards/bm40hsrgb/config.h | 7 +-- keyboards/bm40hsrgb/info.json | 94 ++++++++++++++++----------------- keyboards/bm40hsrgb/readme.md | 7 +-- keyboards/bm40hsrgb/rules.mk | 3 +- 5 files changed, 82 insertions(+), 57 deletions(-) diff --git a/keyboards/bm40hsrgb/bm40hsrgb.c b/keyboards/bm40hsrgb/bm40hsrgb.c index aa7218b56148..a44263a8b83a 100755 --- a/keyboards/bm40hsrgb/bm40hsrgb.c +++ b/keyboards/bm40hsrgb/bm40hsrgb.c @@ -1,4 +1,4 @@ -/* Copyright 2020 tominabox1 +/* Copyright 2020 tominabox1, Richard Goulter * * This 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,3 +14,29 @@ * along with this program. If not, see . */ #include "bm40hsrgb.h" + +#if defined(RGB_MATRIX_ENABLE) +led_config_t g_led_config = { + { + // Key Matrix to LED Index + { 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} + }, { + // LED Index to Physical Position + { 0, 0}, { 20, 0}, { 40, 0}, {61, 0}, {81, 0}, {101, 0}, {122, 0}, {142, 0}, {162, 0}, {183, 0}, {203, 0}, {224, 0}, + { 0, 21}, { 20, 21}, { 40, 21}, {61, 21}, {81, 21}, {101, 21}, {122, 21}, {142, 21}, {162, 21}, {183, 21}, {203, 21}, {224, 21}, + { 0, 42}, { 20, 42}, { 40, 42}, {61, 42}, {81, 42}, {101, 42}, {122, 42}, {142, 42}, {162, 42}, {183, 42}, {203, 42}, {224, 42}, + { 0, 64}, { 20, 64}, { 40, 64}, {61, 64}, {81, 64}, {111, 64}, {142, 64}, {162, 64}, {183, 64}, {203, 64}, {224, 64}, + {220, 32}, {176, 32}, {132, 32}, {88, 32}, {44, 32}, {0, 32} + }, { + // LED Index to Flag + 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, + 1, 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, 1, 1, 1, 1, 1, 1, 1, + 2, 2, 2, 2, 2, 2 + } +}; +#endif diff --git a/keyboards/bm40hsrgb/config.h b/keyboards/bm40hsrgb/config.h index c2acf30c7c87..53ef086d5468 100755 --- a/keyboards/bm40hsrgb/config.h +++ b/keyboards/bm40hsrgb/config.h @@ -46,10 +46,7 @@ #define LOCKING_RESYNC_ENABLE #define RGB_DI_PIN E2 +#define DRIVER_LED_TOTAL 53 #ifdef RGB_DI_PIN -#define RGBLIGHT_ANIMATIONS -#define RGBLED_NUM 54 -#define RGBLIGHT_HUE_STEP 8 -#define RGBLIGHT_SAT_STEP 8 -#define RGBLIGHT_VAL_STEP 8 + #define RGB_MATRIX_KEYPRESSES // reacts to keypresses #endif diff --git a/keyboards/bm40hsrgb/info.json b/keyboards/bm40hsrgb/info.json index 85fb0d25a102..54b4a5890ebd 100644 --- a/keyboards/bm40hsrgb/info.json +++ b/keyboards/bm40hsrgb/info.json @@ -7,53 +7,53 @@ "layouts": { "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} + {"label":"K00 (B3,B6)", "x":0, "y":0}, + {"label":"K01 (B3,C6)", "x":1, "y":0}, + {"label":"K02 (B3,B4)", "x":2, "y":0}, + {"label":"K03 (B3,D7)", "x":3, "y":0}, + {"label":"K04 (B3,D4)", "x":4, "y":0}, + {"label":"K05 (B3,D6)", "x":5, "y":0}, + {"label":"K06 (B3,C7)", "x":6, "y":0}, + {"label":"K07 (B3,F6)", "x":7, "y":0}, + {"label":"K08 (B3,F5)", "x":8, "y":0}, + {"label":"K09 (B3,F4)", "x":9, "y":0}, + {"label":"K0A (B3,F1)", "x":10, "y":0}, + {"label":"K0B (B3,F0)", "x":11, "y":0}, + {"label":"K10 (B2,B6)", "x":0, "y":1}, + {"label":"K11 (B2,C6)", "x":1, "y":1}, + {"label":"K12 (B2,B4)", "x":2, "y":1}, + {"label":"K13 (B2,D7)", "x":3, "y":1}, + {"label":"K14 (B2,D4)", "x":4, "y":1}, + {"label":"K15 (B2,D6)", "x":5, "y":1}, + {"label":"K16 (B2,C7)", "x":6, "y":1}, + {"label":"K17 (B2,F6)", "x":7, "y":1}, + {"label":"K18 (B2,F5)", "x":8, "y":1}, + {"label":"K19 (B2,F4)", "x":9, "y":1}, + {"label":"K1A (B2,F1)", "x":10, "y":1}, + {"label":"K1B (B2,F0)", "x":11, "y":1}, + {"label":"K20 (E6,B6)", "x":0, "y":2}, + {"label":"K21 (E6,C6)", "x":1, "y":2}, + {"label":"K22 (E6,B4)", "x":2, "y":2}, + {"label":"K23 (E6,D7)", "x":3, "y":2}, + {"label":"K24 (E6,D4)", "x":4, "y":2}, + {"label":"K25 (E6,D6)", "x":5, "y":2}, + {"label":"K26 (E6,C7)", "x":6, "y":2}, + {"label":"K27 (E6,F6)", "x":7, "y":2}, + {"label":"K28 (E6,F5)", "x":8, "y":2}, + {"label":"K29 (E6,F4)", "x":9, "y":2}, + {"label":"K2A (E6,F1)", "x":10, "y":2}, + {"label":"K2B (E6,F0)", "x":11, "y":2}, + {"label":"K30 (B5,B6)", "x":0, "y":3}, + {"label":"K31 (B5,C6)", "x":1, "y":3}, + {"label":"K32 (B5,B4)", "x":2, "y":3}, + {"label":"K33 (B5,D7)", "x":3, "y":3}, + {"label":"K34 (B5,D4)", "x":4, "y":3}, + {"label":"K35 (B5,D6)", "x":5, "y":3, "w":2}, + {"label":"K37 (B5,F6)", "x":7, "y":3}, + {"label":"K38 (B5,F5)", "x":8, "y":3}, + {"label":"K39 (B5,F4)", "x":9, "y":3}, + {"label":"K3A (B5,F1)", "x":10, "y":3}, + {"label":"K3B (B5,F0)", "x":11, "y":3} ] } } diff --git a/keyboards/bm40hsrgb/readme.md b/keyboards/bm40hsrgb/readme.md index 766c8e4e8a73..a2448f9571da 100644 --- a/keyboards/bm40hsrgb/readme.md +++ b/keyboards/bm40hsrgb/readme.md @@ -1,11 +1,12 @@ # bm40hsrgb -A 40% mechanical keyboard. +![BM40 RGB](https://rgoulter.com/images/keyboards/bm40rgb/bm40rgb_large.jpg) -This firmware was originally taken from a kbfirmware.json and manually converted. You may find the original `.json` files [here](https://drive.google.com/drive/folders/1tlTHQIFcluK2mjZ4UbbKCsdRLgSRSPw6). +An ortholinear 40% hotswap keyboard with per-key RGB in-switch LEDs and RGB Backlighting, from KP Republic. +This firmware was originally taken from a kbfirmware.json and manually converted. You may find the original `.json` files [here](https://drive.google.com/drive/folders/1tlTHQIFcluK2mjZ4UbbKCsdRLgSRSPw6). -* Keyboard Maintainer: [tominabox1](https://github.com/tominabox1) +* Keyboard Maintainer: [rgoulter](https://github.com/rgoulter) * Hardware Supported: bm40hsrgb PCB * Hardware Availability: [KPRepublic](https://www.aliexpress.com/item/4001147779116.html) diff --git a/keyboards/bm40hsrgb/rules.mk b/keyboards/bm40hsrgb/rules.mk index e4203bc4df07..e83c0edb7e4b 100755 --- a/keyboards/bm40hsrgb/rules.mk +++ b/keyboards/bm40hsrgb/rules.mk @@ -17,8 +17,9 @@ SLEEP_LED_ENABLE = no # Breathing sleep 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 BLUETOOTH_ENABLE = no # Enable Bluetooth AUDIO_ENABLE = no # Audio output +RGB_MATRIX_ENABLE = WS2812 LAYOUTS = planck_mit +LAYOUTS_HAS_RGB = yes From 70acf36d1641cad1337eb714ae56145d949ff423 Mon Sep 17 00:00:00 2001 From: Wilba Date: Tue, 18 Aug 2020 16:44:35 +1000 Subject: [PATCH 585/930] [Keyboard] Added RAMA WORKS M65-B, M65-BX, M10-C, M50-A (#9991) * Added RAMA WORKS M65-B, M65-BX, M10-C, M50-A * Review changes * Review changes * Review changes * Increase layers to 10 for M10-C, M10-B --- .../wilba_tech/rama_works_m10_b/config.h | 2 + .../rama_works_m10_b/keymaps/via/keymap.c | 19 +- .../wilba_tech/rama_works_m10_c/config.h | 120 +++++++++ .../wilba_tech/rama_works_m10_c/info.json | 12 + .../rama_works_m10_c/keymaps/default/keymap.c | 25 ++ .../rama_works_m10_c/keymaps/via/keymap.c | 29 +++ .../rama_works_m10_c/keymaps/via/rules.mk | 1 + .../rama_works_m10_c/rama_works_m10_c.c | 18 ++ .../rama_works_m10_c/rama_works_m10_c.h | 35 +++ .../wilba_tech/rama_works_m10_c/readme.md | 19 ++ .../wilba_tech/rama_works_m10_c/rules.mk | 35 +++ .../wilba_tech/rama_works_m50_a/config.h | 118 +++++++++ .../wilba_tech/rama_works_m50_a/info.json | 12 + .../rama_works_m50_a/keymaps/default/keymap.c | 95 +++++++ .../rama_works_m50_a/keymaps/via/keymap.c | 93 +++++++ .../rama_works_m50_a/keymaps/via/rules.mk | 1 + .../rama_works_m50_a/rama_works_m50_a.c | 18 ++ .../rama_works_m50_a/rama_works_m50_a.h | 41 ++++ .../wilba_tech/rama_works_m50_a/readme.md | 19 ++ .../wilba_tech/rama_works_m50_a/rules.mk | 35 +++ .../wilba_tech/rama_works_m65_b/config.h | 114 +++++++++ .../wilba_tech/rama_works_m65_b/info.json | 12 + .../rama_works_m65_b/keymaps/default/keymap.c | 38 +++ .../rama_works_m65_b/keymaps/via/keymap.c | 36 +++ .../rama_works_m65_b/keymaps/via/rules.mk | 1 + .../rama_works_m65_b/rama_works_m65_b.c | 18 ++ .../rama_works_m65_b/rama_works_m65_b.h | 45 ++++ .../wilba_tech/rama_works_m65_b/readme.md | 19 ++ .../wilba_tech/rama_works_m65_b/rules.mk | 35 +++ .../wilba_tech/rama_works_m65_bx/config.h | 114 +++++++++ .../wilba_tech/rama_works_m65_bx/info.json | 12 + .../keymaps/default/keymap.c | 38 +++ .../rama_works_m65_bx/keymaps/via/keymap.c | 36 +++ .../rama_works_m65_bx/keymaps/via/rules.mk | 1 + .../rama_works_m65_bx/rama_works_m65_bx.c | 18 ++ .../rama_works_m65_bx/rama_works_m65_bx.h | 45 ++++ .../wilba_tech/rama_works_m65_bx/readme.md | 19 ++ .../wilba_tech/rama_works_m65_bx/rules.mk | 35 +++ keyboards/wilba_tech/wt_rgb_backlight.c | 231 ++++++++++++++++-- keyboards/wilba_tech/wt_rgb_backlight.h | 12 +- 40 files changed, 1595 insertions(+), 31 deletions(-) create mode 100644 keyboards/wilba_tech/rama_works_m10_c/config.h create mode 100644 keyboards/wilba_tech/rama_works_m10_c/info.json create mode 100644 keyboards/wilba_tech/rama_works_m10_c/keymaps/default/keymap.c create mode 100644 keyboards/wilba_tech/rama_works_m10_c/keymaps/via/keymap.c create mode 100644 keyboards/wilba_tech/rama_works_m10_c/keymaps/via/rules.mk create mode 100644 keyboards/wilba_tech/rama_works_m10_c/rama_works_m10_c.c create mode 100644 keyboards/wilba_tech/rama_works_m10_c/rama_works_m10_c.h create mode 100644 keyboards/wilba_tech/rama_works_m10_c/readme.md create mode 100644 keyboards/wilba_tech/rama_works_m10_c/rules.mk create mode 100644 keyboards/wilba_tech/rama_works_m50_a/config.h create mode 100644 keyboards/wilba_tech/rama_works_m50_a/info.json create mode 100644 keyboards/wilba_tech/rama_works_m50_a/keymaps/default/keymap.c create mode 100644 keyboards/wilba_tech/rama_works_m50_a/keymaps/via/keymap.c create mode 100644 keyboards/wilba_tech/rama_works_m50_a/keymaps/via/rules.mk create mode 100644 keyboards/wilba_tech/rama_works_m50_a/rama_works_m50_a.c create mode 100644 keyboards/wilba_tech/rama_works_m50_a/rama_works_m50_a.h create mode 100644 keyboards/wilba_tech/rama_works_m50_a/readme.md create mode 100644 keyboards/wilba_tech/rama_works_m50_a/rules.mk create mode 100644 keyboards/wilba_tech/rama_works_m65_b/config.h create mode 100644 keyboards/wilba_tech/rama_works_m65_b/info.json create mode 100644 keyboards/wilba_tech/rama_works_m65_b/keymaps/default/keymap.c create mode 100644 keyboards/wilba_tech/rama_works_m65_b/keymaps/via/keymap.c create mode 100644 keyboards/wilba_tech/rama_works_m65_b/keymaps/via/rules.mk create mode 100644 keyboards/wilba_tech/rama_works_m65_b/rama_works_m65_b.c create mode 100644 keyboards/wilba_tech/rama_works_m65_b/rama_works_m65_b.h create mode 100644 keyboards/wilba_tech/rama_works_m65_b/readme.md create mode 100644 keyboards/wilba_tech/rama_works_m65_b/rules.mk create mode 100644 keyboards/wilba_tech/rama_works_m65_bx/config.h create mode 100644 keyboards/wilba_tech/rama_works_m65_bx/info.json create mode 100644 keyboards/wilba_tech/rama_works_m65_bx/keymaps/default/keymap.c create mode 100644 keyboards/wilba_tech/rama_works_m65_bx/keymaps/via/keymap.c create mode 100644 keyboards/wilba_tech/rama_works_m65_bx/keymaps/via/rules.mk create mode 100644 keyboards/wilba_tech/rama_works_m65_bx/rama_works_m65_bx.c create mode 100644 keyboards/wilba_tech/rama_works_m65_bx/rama_works_m65_bx.h create mode 100644 keyboards/wilba_tech/rama_works_m65_bx/readme.md create mode 100644 keyboards/wilba_tech/rama_works_m65_bx/rules.mk diff --git a/keyboards/wilba_tech/rama_works_m10_b/config.h b/keyboards/wilba_tech/rama_works_m10_b/config.h index d2e67e0c979e..1d380df37cb9 100644 --- a/keyboards/wilba_tech/rama_works_m10_b/config.h +++ b/keyboards/wilba_tech/rama_works_m10_b/config.h @@ -179,3 +179,5 @@ 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 10 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 index 8c97a5cfb65f..7a1dee39dd35 100644 --- a/keyboards/wilba_tech/rama_works_m10_b/keymaps/via/keymap.c +++ b/keyboards/wilba_tech/rama_works_m10_b/keymaps/via/keymap.c @@ -1,13 +1,14 @@ #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 ) + 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 ), + 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 ), + 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_c/config.h b/keyboards/wilba_tech/rama_works_m10_c/config.h new file mode 100644 index 000000000000..08ae1d081a97 --- /dev/null +++ b/keyboards/wilba_tech/rama_works_m10_c/config.h @@ -0,0 +1,120 @@ +/* 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 0x5241 // "RA" +#define PRODUCT_ID 0x00AC // 10-C +#define DEVICE_VER 0x0001 +#define MANUFACTURER RAMA WORKS +#define PRODUCT RAMA WORKS M10-C + +/* key matrix size */ +#define MATRIX_ROWS 1 +#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 { E6 } +#define MATRIX_COL_PINS { D7, B6, F0, D6, B5, F1, D4, B4, F4, F5 } +#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 + +/* disable these deprecated features by default */ +#define NO_ACTION_MACRO +#define NO_ACTION_FUNCTION + +// IS31FL3731 driver +#define DRIVER_COUNT 1 +#define DRIVER_LED_TOTAL 12 + +// Enable WT RGB backlight +#define RGB_BACKLIGHT_ENABLED 1 + +// This conditionally compiles the backlight code for M10-C specifics +#define RGB_BACKLIGHT_M10_C + +// enable/disable LEDs based on layout +#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 0b0000000000000000 +#define RGB_BACKLIGHT_ALPHAS_MODS_ROW_1 0b0000000000000000 +#define RGB_BACKLIGHT_ALPHAS_MODS_ROW_2 0b0000000000000000 +#define RGB_BACKLIGHT_ALPHAS_MODS_ROW_3 0b0000000000000000 +#define RGB_BACKLIGHT_ALPHAS_MODS_ROW_4 0b0000000000000000 + +#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 } + +#define DYNAMIC_KEYMAP_LAYER_COUNT 10 + +// Backlight config starts after VIA's EEPROM usage, +// dynamic keymaps start after this. +#define VIA_EEPROM_CUSTOM_CONFIG_SIZE 51 + +// VIA lighting is handled by the keyboard-level code +#define VIA_CUSTOM_LIGHTING_ENABLE diff --git a/keyboards/wilba_tech/rama_works_m10_c/info.json b/keyboards/wilba_tech/rama_works_m10_c/info.json new file mode 100644 index 000000000000..95439938e578 --- /dev/null +++ b/keyboards/wilba_tech/rama_works_m10_c/info.json @@ -0,0 +1,12 @@ +{ + "keyboard_name": "RAMA WORKS M10-C", + "url": "http://rama.works", + "maintainer": "Wilba", + "width": 3, + "height": 4, + "layouts": { + "LAYOUT": { + "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":0, "y":1}, {"label":"0,4", "x":1, "y":1}, {"label":"0,5", "x":2, "y":1}, {"label":"0,6", "x":0, "y":2}, {"label":"0,7", "x":1, "y":2}, {"label":"0,8", "x":2, "y":2}, {"label":"0,9", "x":1, "y":3, "w":2}] + } + } +} \ No newline at end of file diff --git a/keyboards/wilba_tech/rama_works_m10_c/keymaps/default/keymap.c b/keyboards/wilba_tech/rama_works_m10_c/keymaps/default/keymap.c new file mode 100644 index 000000000000..24536df3630b --- /dev/null +++ b/keyboards/wilba_tech/rama_works_m10_c/keymaps/default/keymap.c @@ -0,0 +1,25 @@ +/* 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 . + */ +#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_c/keymaps/via/keymap.c b/keyboards/wilba_tech/rama_works_m10_c/keymaps/via/keymap.c new file mode 100644 index 000000000000..91b08e8c2a85 --- /dev/null +++ b/keyboards/wilba_tech/rama_works_m10_c/keymaps/via/keymap.c @@ -0,0 +1,29 @@ +/* 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 . + */ +#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 ), + 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 ), + 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_c/keymaps/via/rules.mk b/keyboards/wilba_tech/rama_works_m10_c/keymaps/via/rules.mk new file mode 100644 index 000000000000..1e5b99807cb7 --- /dev/null +++ b/keyboards/wilba_tech/rama_works_m10_c/keymaps/via/rules.mk @@ -0,0 +1 @@ +VIA_ENABLE = yes diff --git a/keyboards/wilba_tech/rama_works_m10_c/rama_works_m10_c.c b/keyboards/wilba_tech/rama_works_m10_c/rama_works_m10_c.c new file mode 100644 index 000000000000..17fa921db611 --- /dev/null +++ b/keyboards/wilba_tech/rama_works_m10_c/rama_works_m10_c.c @@ -0,0 +1,18 @@ +/* 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 . + */ +#ifndef RGB_BACKLIGHT_M10_C +#error RGB_BACKLIGHT_M10_C not defined +#endif \ No newline at end of file diff --git a/keyboards/wilba_tech/rama_works_m10_c/rama_works_m10_c.h b/keyboards/wilba_tech/rama_works_m10_c/rama_works_m10_c.h new file mode 100644 index 000000000000..382cef1a6dc6 --- /dev/null +++ b/keyboards/wilba_tech/rama_works_m10_c/rama_works_m10_c.h @@ -0,0 +1,35 @@ +/* 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" + + +/* 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 \ +) { \ + {K00, K01, K02, K03, K04, K05, K06, K07, K08, K09}, \ +} diff --git a/keyboards/wilba_tech/rama_works_m10_c/readme.md b/keyboards/wilba_tech/rama_works_m10_c/readme.md new file mode 100644 index 000000000000..be7e225737c4 --- /dev/null +++ b/keyboards/wilba_tech/rama_works_m10_c/readme.md @@ -0,0 +1,19 @@ +# RAMA WORKS M10-C + +![RAMA WORKS M10-C](https://cdn.shopify.com/s/files/1/2689/3156/products/M10-C-LNY.1539_1296x1296.jpg?v=1580018332) + +The RAMA WORKS M10-C is an ortholinear keyboard made by Rama Works. + +* Keyboard Maintainer: [Wilba6582](https://github.com/Wilba6582) +* Hardware Supported: RAMA WORKS M10-C PCB +* Hardware Availability: [RAMA WORKS Store](https://ramaworks.store/) + +Make example for this keyboard (after setting up your build environment): + + make wilba_tech/rama_works_m10_c:default + +Flashing example for this keyboard: + + make wilba_tech/rama_works_m10_c: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/wilba_tech/rama_works_m10_c/rules.mk b/keyboards/wilba_tech/rama_works_m10_c/rules.mk new file mode 100644 index 000000000000..9f4cc186edea --- /dev/null +++ b/keyboards/wilba_tech/rama_works_m10_c/rules.mk @@ -0,0 +1,35 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +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 = yes # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +BLUETOOTH_ENABLE = no # Enable Bluetooth +AUDIO_ENABLE = no # Audio output +CIE1931_CURVE = yes + +# 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 + +# 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/rama_works_m50_a/config.h b/keyboards/wilba_tech/rama_works_m50_a/config.h new file mode 100644 index 000000000000..c16afd7900ae --- /dev/null +++ b/keyboards/wilba_tech/rama_works_m50_a/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 0x5241 // "RA" +#define PRODUCT_ID 0x050A // 50-A +#define DEVICE_VER 0x0001 +#define MANUFACTURER RAMA WORKS +#define PRODUCT RAMA WORKS M50-A + +/* 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 { F0, F1, F5, F6 } +#define MATRIX_COL_PINS { F4, B5, C7, C6, B6, B2, B3, B1, B4, D7, D6, D4, D3 } +#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 + +/* disable these deprecated features by default */ +#define NO_ACTION_MACRO +#define NO_ACTION_FUNCTION + +// IS31FL3731 driver +#define DRIVER_COUNT 2 +#define DRIVER_LED_TOTAL 72 + +// Enable WT RGB backlight +#define RGB_BACKLIGHT_ENABLED 1 + +// This conditionally compiles the backlight code for M50-A specifics +#define RGB_BACKLIGHT_M50_A + +// enable/disable LEDs based on layout +#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 0b0001000000000011 +#define RGB_BACKLIGHT_ALPHAS_MODS_ROW_1 0b0001000000000011 +#define RGB_BACKLIGHT_ALPHAS_MODS_ROW_2 0b0001000000000011 +#define RGB_BACKLIGHT_ALPHAS_MODS_ROW_3 0b0001111111111111 +#define RGB_BACKLIGHT_ALPHAS_MODS_ROW_4 0b0000000000000000 + +#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/rama_works_m50_a/info.json b/keyboards/wilba_tech/rama_works_m50_a/info.json new file mode 100644 index 000000000000..5b8031c7fb22 --- /dev/null +++ b/keyboards/wilba_tech/rama_works_m50_a/info.json @@ -0,0 +1,12 @@ +{ + "keyboard_name": "RAMA WORKS M50-A", + "url": "http://rama.works", + "maintainer": "Wilba", + "width": 13.25, + "height": 4, + "layouts": { + "LAYOUT": { + "layout": [{"label":"0,0", "x":0, "y":0}, {"label":"0,1", "x":1.25, "y":0}, {"label":"0,2", "x":2.25, "y":0}, {"label":"0,3", "x":3.25, "y":0}, {"label":"0,4", "x":4.25, "y":0}, {"label":"0,5", "x":5.25, "y":0}, {"label":"0,6", "x":6.25, "y":0}, {"label":"0,7", "x":7.25, "y":0}, {"label":"0,8", "x":8.25, "y":0}, {"label":"0,9", "x":9.25, "y":0}, {"label":"0,10", "x":10.25, "y":0}, {"label":"0,11", "x":11.25, "y":0}, {"label":"0,12", "x":12.25, "y":0}, {"label":"1,0", "x":0, "y":1}, {"label":"1,1", "x":1.25, "y":1}, {"label":"1,2", "x":2.25, "y":1}, {"label":"1,3", "x":3.25, "y":1}, {"label":"1,4", "x":4.25, "y":1}, {"label":"1,5", "x":5.25, "y":1}, {"label":"1,6", "x":6.25, "y":1}, {"label":"1,7", "x":7.25, "y":1}, {"label":"1,8", "x":8.25, "y":1}, {"label":"1,9", "x":9.25, "y":1}, {"label":"1,10", "x":10.25, "y":1}, {"label":"1,11", "x":11.25, "y":1}, {"label":"1,12", "x":12.25, "y":1}, {"label":"2,0", "x":0, "y":2}, {"label":"2,1", "x":1.25, "y":2}, {"label":"2,2", "x":2.25, "y":2}, {"label":"2,3", "x":3.25, "y":2}, {"label":"2,4", "x":4.25, "y":2}, {"label":"2,5", "x":5.25, "y":2}, {"label":"2,6", "x":6.25, "y":2}, {"label":"2,7", "x":7.25, "y":2}, {"label":"2,8", "x":8.25, "y":2}, {"label":"2,9", "x":9.25, "y":2}, {"label":"2,10", "x":10.25, "y":2}, {"label":"2,11", "x":11.25, "y":2}, {"label":"2,12", "x":12.25, "y":2}, {"label":"3,0", "x":0, "y":3}, {"label":"3,1", "x":1.25, "y":3}, {"label":"3,2", "x":2.25, "y":3}, {"label":"3,3", "x":3.25, "y":3}, {"label":"3,4", "x":4.25, "y":3}, {"label":"3,5", "x":5.25, "y":3}, {"label":"3,6", "x":6.25, "y":3}, {"label":"3,7", "x":7.25, "y":3}, {"label":"3,8", "x":8.25, "y":3}, {"label":"3,9", "x":9.25, "y":3}, {"label":"3,10", "x":10.25, "y":3}, {"label":"3,11", "x":11.25, "y":3}, {"label":"3,12", "x":12.25, "y":3}] + } + } +} \ No newline at end of file diff --git a/keyboards/wilba_tech/rama_works_m50_a/keymaps/default/keymap.c b/keyboards/wilba_tech/rama_works_m50_a/keymaps/default/keymap.c new file mode 100644 index 000000000000..491ac55b6aad --- /dev/null +++ b/keyboards/wilba_tech/rama_works_m50_a/keymaps/default/keymap.c @@ -0,0 +1,95 @@ +/* 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 . + */ +#include QMK_KEYBOARD_H + +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 |Raise | Left | Down | Up |Right | + * `------------------------------------------------------------------------------------------' + */ +[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, FN_MO13, KC_SPC, KC_SPC, FN_MO23, 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 | + * `------------------------------------------------------------------------------------------' + */ +[1] = LAYOUT( + _______, 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 | + * `------------------------------------------------------------------------------------------' + */ +[2] = LAYOUT( + _______, KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, + _______, KC_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) + * ,------------------------------------------------------------------------------------------. + * | | | | | | | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | | + * `------------------------------------------------------------------------------------------' + */ +/* +[3] = LAYOUT( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ +) +*/ + +}; diff --git a/keyboards/wilba_tech/rama_works_m50_a/keymaps/via/keymap.c b/keyboards/wilba_tech/rama_works_m50_a/keymaps/via/keymap.c new file mode 100644 index 000000000000..37f9bc94db08 --- /dev/null +++ b/keyboards/wilba_tech/rama_works_m50_a/keymaps/via/keymap.c @@ -0,0 +1,93 @@ +/* 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 . + */ +#include QMK_KEYBOARD_H + +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 |Raise | Left | Down | Up |Right | + * `------------------------------------------------------------------------------------------' + */ +[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, FN_MO13, KC_SPC, KC_SPC, FN_MO23, 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 | + * `------------------------------------------------------------------------------------------' + */ +[1] = LAYOUT( + _______, 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 | + * `------------------------------------------------------------------------------------------' + */ +[2] = LAYOUT( + _______, KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, + _______, KC_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) + * ,------------------------------------------------------------------------------------------. + * | | | | | | | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | | + * `------------------------------------------------------------------------------------------' + */ +[3] = LAYOUT( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ +) + +}; diff --git a/keyboards/wilba_tech/rama_works_m50_a/keymaps/via/rules.mk b/keyboards/wilba_tech/rama_works_m50_a/keymaps/via/rules.mk new file mode 100644 index 000000000000..1e5b99807cb7 --- /dev/null +++ b/keyboards/wilba_tech/rama_works_m50_a/keymaps/via/rules.mk @@ -0,0 +1 @@ +VIA_ENABLE = yes diff --git a/keyboards/wilba_tech/rama_works_m50_a/rama_works_m50_a.c b/keyboards/wilba_tech/rama_works_m50_a/rama_works_m50_a.c new file mode 100644 index 000000000000..ee5ebf93fd61 --- /dev/null +++ b/keyboards/wilba_tech/rama_works_m50_a/rama_works_m50_a.c @@ -0,0 +1,18 @@ +/* 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 . + */ +#ifndef RGB_BACKLIGHT_M50_A +#error RGB_BACKLIGHT_M50_A not defined +#endif diff --git a/keyboards/wilba_tech/rama_works_m50_a/rama_works_m50_a.h b/keyboards/wilba_tech/rama_works_m50_a/rama_works_m50_a.h new file mode 100644 index 000000000000..bd92ea3cf8ec --- /dev/null +++ b/keyboards/wilba_tech/rama_works_m50_a/rama_works_m50_a.h @@ -0,0 +1,41 @@ +/* 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" + +/* 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, \ + 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 \ +) { \ + { 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 } \ +} + diff --git a/keyboards/wilba_tech/rama_works_m50_a/readme.md b/keyboards/wilba_tech/rama_works_m50_a/readme.md new file mode 100644 index 000000000000..4842bb70f39d --- /dev/null +++ b/keyboards/wilba_tech/rama_works_m50_a/readme.md @@ -0,0 +1,19 @@ +# RAMA WORKS M50-A + +![RAMA WORKS M50-A](https://images.squarespace-cdn.com/content/v1/563c788ae4b099120ae219e2/1586599330524-K5GC9PIVQD3IDSIIMEWA/ke17ZwdGBToddI8pDm48kPTrHXgsMrSIMwe6YW3w1AZ7gQa3H78H3Y0txjaiv_0fDoOvxcdMmMKkDsyUqMSsMWxHk725yiiHCCLfrh8O1z4YTzHvnKhyp6Da-NYroOW3ZGjoBKy3azqku80C789l0k5fwC0WRNFJBIXiBeNI5fKTrY37saURwPBw8fO2esROAxn-RKSrlQamlL27g22X2A/M50-A-SCENE-01.1868.JPG?format=1500w) + +The RAMA WORKS M50-A is an ortholinear keyboard made by Rama Works. + +* Keyboard Maintainer: [Wilba6582](https://github.com/Wilba6582) +* Hardware Supported: RAMA WORKS M50-A PCB +* Hardware Availability: [RAMA WORKS Store](https://ramaworks.store/) + +Make example for this keyboard (after setting up your build environment): + + make wilba_tech/rama_works_m50_a:default + +Flashing example for this keyboard: + + make wilba_tech/rama_works_m50_a: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). diff --git a/keyboards/wilba_tech/rama_works_m50_a/rules.mk b/keyboards/wilba_tech/rama_works_m50_a/rules.mk new file mode 100644 index 000000000000..9f4cc186edea --- /dev/null +++ b/keyboards/wilba_tech/rama_works_m50_a/rules.mk @@ -0,0 +1,35 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +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 = yes # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +BLUETOOTH_ENABLE = no # Enable Bluetooth +AUDIO_ENABLE = no # Audio output +CIE1931_CURVE = yes + +# 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 + +# 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/rama_works_m65_b/config.h b/keyboards/wilba_tech/rama_works_m65_b/config.h new file mode 100644 index 000000000000..550617e58709 --- /dev/null +++ b/keyboards/wilba_tech/rama_works_m65_b/config.h @@ -0,0 +1,114 @@ +/* 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 0x5241 // "RA" +#define PRODUCT_ID 0x065B // 65-B +#define DEVICE_VER 0x0001 +#define MANUFACTURER RAMA WORKS +#define PRODUCT RAMA WORKS M65-B + +/* 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 { F0, F1, F4, F6, F7 } +#define MATRIX_COL_PINS { F5, D5, B1, B2, B3, D3, D2, C7, C6, B6, B5, B4, D7, D6, D4 } +#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 + +// Enable WT RGB backlight +#define RGB_BACKLIGHT_ENABLED 1 + +// This conditionally compiles the backlight code for M65-B specifics +#define RGB_BACKLIGHT_M65_B + +// enable/disable LEDs based on layout +#define RGB_BACKLIGHT_USE_SPLIT_BACKSPACE 1 +#define RGB_BACKLIGHT_USE_SPLIT_LEFT_SHIFT 0 +#define RGB_BACKLIGHT_USE_SPLIT_RIGHT_SHIFT 0 +#define RGB_BACKLIGHT_USE_7U_SPACEBAR 1 +#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 0b0110000000000001 +#define RGB_BACKLIGHT_ALPHAS_MODS_ROW_1 0b0110000000000001 +#define RGB_BACKLIGHT_ALPHAS_MODS_ROW_2 0b0111000000000001 +#define RGB_BACKLIGHT_ALPHAS_MODS_ROW_3 0b0111000000000001 +#define RGB_BACKLIGHT_ALPHAS_MODS_ROW_4 0b0111100000000111 + +#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/rama_works_m65_b/info.json b/keyboards/wilba_tech/rama_works_m65_b/info.json new file mode 100644 index 000000000000..fd712fafec43 --- /dev/null +++ b/keyboards/wilba_tech/rama_works_m65_b/info.json @@ -0,0 +1,12 @@ +{ + "keyboard_name": "RAMA WORKS M65-B", + "url": "http://rama.works", + "maintainer": "Wilba", + "width": 16, + "height": 5, + "layouts": { + "LAYOUT_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":"PrtSc", "x":13, "y":0}, {"label":"Pause", "x":14, "y":0}, {"label":"Num Lock", "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":"Insert", "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":"Home", "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":"/", "x":15, "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":"Ctrl", "x":11, "y":4, "w":1.5}, {"label":"\u2190", "x":13, "y":4}, {"label":"\u2193", "x":14, "y":4}, {"label":"\u2192", "x":15, "y":4}] + } + } +} \ No newline at end of file diff --git a/keyboards/wilba_tech/rama_works_m65_b/keymaps/default/keymap.c b/keyboards/wilba_tech/rama_works_m65_b/keymaps/default/keymap.c new file mode 100644 index 000000000000..6af46ab132b4 --- /dev/null +++ b/keyboards/wilba_tech/rama_works_m65_b/keymaps/default/keymap.c @@ -0,0 +1,38 @@ +#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_m65_b/keymaps/via/keymap.c b/keyboards/wilba_tech/rama_works_m65_b/keymaps/via/keymap.c new file mode 100644 index 000000000000..f6bc94fbd60e --- /dev/null +++ b/keyboards/wilba_tech/rama_works_m65_b/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_m65_b/keymaps/via/rules.mk b/keyboards/wilba_tech/rama_works_m65_b/keymaps/via/rules.mk new file mode 100644 index 000000000000..1e5b99807cb7 --- /dev/null +++ b/keyboards/wilba_tech/rama_works_m65_b/keymaps/via/rules.mk @@ -0,0 +1 @@ +VIA_ENABLE = yes diff --git a/keyboards/wilba_tech/rama_works_m65_b/rama_works_m65_b.c b/keyboards/wilba_tech/rama_works_m65_b/rama_works_m65_b.c new file mode 100644 index 000000000000..62546fbfc926 --- /dev/null +++ b/keyboards/wilba_tech/rama_works_m65_b/rama_works_m65_b.c @@ -0,0 +1,18 @@ +/* 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 . + */ +#ifndef RGB_BACKLIGHT_M65_B +#error RGB_BACKLIGHT_M65_B not defined +#endif diff --git a/keyboards/wilba_tech/rama_works_m65_b/rama_works_m65_b.h b/keyboards/wilba_tech/rama_works_m65_b/rama_works_m65_b.h new file mode 100644 index 000000000000..eb77d54419b8 --- /dev/null +++ b/keyboards/wilba_tech/rama_works_m65_b/rama_works_m65_b.h @@ -0,0 +1,45 @@ +/* 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 + +/* 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, K213, 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, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, K314, \ + K400, K401, K402, K407, K411, K412, K413, K414 \ +) { \ + { 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, K213, K214 }, \ + { K300, ____, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, K314 }, \ + { K400, K401, K402, ____, ____, ____, ____, K407, ____, ____, ____, K411, K412, K413, K414 } \ +} diff --git a/keyboards/wilba_tech/rama_works_m65_b/readme.md b/keyboards/wilba_tech/rama_works_m65_b/readme.md new file mode 100644 index 000000000000..320bb594aa6f --- /dev/null +++ b/keyboards/wilba_tech/rama_works_m65_b/readme.md @@ -0,0 +1,19 @@ +# RAMA WORKS M65-B + +![RAMA WORKS M65-B](https://images.squarespace-cdn.com/content/v1/563c788ae4b099120ae219e2/1572021195246-4QHS1WZTE862N635BVR2/ke17ZwdGBToddI8pDm48kAgzYejSbWGRoJP4yk7IdNQUqsxRUqqbr1mOJYKfIPR7LoDQ9mXPOjoJoqy81S2I8N_N4V1vUb5AoIIIbLZhVYy7Mythp_T-mtop-vrsUOmeInPi9iDjx9w8K4ZfjXt2dtCOkMDEaPiGoIoGazr_ji7tWlVp5kgqCHrK9bIsxYYSbSexTd1-frD7527z4SM9QQ/RW-M65-B-WIDE-HERO-A.1710.JPG?format=1500w) + +The RAMA WORKS M65-B is a 65% keyboard made by Rama Works. + +* Keyboard Maintainer: [Wilba6582](https://github.com/Wilba6582) +* Hardware Supported: RAMA WORKS M65-B PCB +* Hardware Availability: [RAMA WORKS Store](https://ramaworks.store/) + +Make example for this keyboard (after setting up your build environment): + + make wilba_tech/rama_works_m65_b:default + +Flashing example for this keyboard: + + make wilba_tech/rama_works_m65_b: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). diff --git a/keyboards/wilba_tech/rama_works_m65_b/rules.mk b/keyboards/wilba_tech/rama_works_m65_b/rules.mk new file mode 100644 index 000000000000..9f4cc186edea --- /dev/null +++ b/keyboards/wilba_tech/rama_works_m65_b/rules.mk @@ -0,0 +1,35 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +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 = yes # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +BLUETOOTH_ENABLE = no # Enable Bluetooth +AUDIO_ENABLE = no # Audio output +CIE1931_CURVE = yes + +# 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 + +# 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/rama_works_m65_bx/config.h b/keyboards/wilba_tech/rama_works_m65_bx/config.h new file mode 100644 index 000000000000..f840f4243612 --- /dev/null +++ b/keyboards/wilba_tech/rama_works_m65_bx/config.h @@ -0,0 +1,114 @@ +/* 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 0x5241 // "RA" +#define PRODUCT_ID 0x165B // 65-BX +#define DEVICE_VER 0x0001 +#define MANUFACTURER RAMA WORKS +#define PRODUCT RAMA WORKS M65-BX + +/* 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 { F0, F1, F4, F6, F7 } +#define MATRIX_COL_PINS { F5, D5, B1, B2, B3, D3, D2, C7, C6, B6, B5, B4, D7, D6, D4 } +#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 + +// Enable WT RGB backlight +#define RGB_BACKLIGHT_ENABLED 1 + +// This conditionally compiles the backlight code for M65-BX specifics +#define RGB_BACKLIGHT_M65_BX + +// enable/disable LEDs based on layout +#define RGB_BACKLIGHT_USE_SPLIT_BACKSPACE 1 +#define RGB_BACKLIGHT_USE_SPLIT_LEFT_SHIFT 0 +#define RGB_BACKLIGHT_USE_SPLIT_RIGHT_SHIFT 1 +#define RGB_BACKLIGHT_USE_7U_SPACEBAR 1 +#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 0b0110000000000001 +#define RGB_BACKLIGHT_ALPHAS_MODS_ROW_1 0b0110000000000001 +#define RGB_BACKLIGHT_ALPHAS_MODS_ROW_2 0b0111000000000001 +#define RGB_BACKLIGHT_ALPHAS_MODS_ROW_3 0b0111000000000001 +#define RGB_BACKLIGHT_ALPHAS_MODS_ROW_4 0b0111100000000111 + +#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/rama_works_m65_bx/info.json b/keyboards/wilba_tech/rama_works_m65_bx/info.json new file mode 100644 index 000000000000..2da84248e7f3 --- /dev/null +++ b/keyboards/wilba_tech/rama_works_m65_bx/info.json @@ -0,0 +1,12 @@ +{ + "keyboard_name": "RAMA WORKS M65-BX", + "url": "http://rama.works", + "maintainer": "Wilba", + "width": 16, + "height": 5, + "layouts": { + "LAYOUT_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":"PrtSc", "x":13, "y":0}, {"label":"Pause", "x":14, "y":0}, {"label":"Num Lock", "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":"Insert", "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":"Home", "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":"/", "x":15, "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":"Ctrl", "x":11, "y":4, "w":1.5}, {"label":"\u2190", "x":13, "y":4}, {"label":"\u2193", "x":14, "y":4}, {"label":"\u2192", "x":15, "y":4}] + } + } +} \ No newline at end of file diff --git a/keyboards/wilba_tech/rama_works_m65_bx/keymaps/default/keymap.c b/keyboards/wilba_tech/rama_works_m65_bx/keymaps/default/keymap.c new file mode 100644 index 000000000000..6af46ab132b4 --- /dev/null +++ b/keyboards/wilba_tech/rama_works_m65_bx/keymaps/default/keymap.c @@ -0,0 +1,38 @@ +#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_m65_bx/keymaps/via/keymap.c b/keyboards/wilba_tech/rama_works_m65_bx/keymaps/via/keymap.c new file mode 100644 index 000000000000..f6bc94fbd60e --- /dev/null +++ b/keyboards/wilba_tech/rama_works_m65_bx/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_m65_bx/keymaps/via/rules.mk b/keyboards/wilba_tech/rama_works_m65_bx/keymaps/via/rules.mk new file mode 100644 index 000000000000..1e5b99807cb7 --- /dev/null +++ b/keyboards/wilba_tech/rama_works_m65_bx/keymaps/via/rules.mk @@ -0,0 +1 @@ +VIA_ENABLE = yes diff --git a/keyboards/wilba_tech/rama_works_m65_bx/rama_works_m65_bx.c b/keyboards/wilba_tech/rama_works_m65_bx/rama_works_m65_bx.c new file mode 100644 index 000000000000..f390540a4812 --- /dev/null +++ b/keyboards/wilba_tech/rama_works_m65_bx/rama_works_m65_bx.c @@ -0,0 +1,18 @@ +/* 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 . + */ +#ifndef RGB_BACKLIGHT_M65_BX +#error RGB_BACKLIGHT_M65_BX not defined +#endif diff --git a/keyboards/wilba_tech/rama_works_m65_bx/rama_works_m65_bx.h b/keyboards/wilba_tech/rama_works_m65_bx/rama_works_m65_bx.h new file mode 100644 index 000000000000..eb77d54419b8 --- /dev/null +++ b/keyboards/wilba_tech/rama_works_m65_bx/rama_works_m65_bx.h @@ -0,0 +1,45 @@ +/* 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 + +/* 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, K213, 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, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, K314, \ + K400, K401, K402, K407, K411, K412, K413, K414 \ +) { \ + { 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, K213, K214 }, \ + { K300, ____, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, K314 }, \ + { K400, K401, K402, ____, ____, ____, ____, K407, ____, ____, ____, K411, K412, K413, K414 } \ +} diff --git a/keyboards/wilba_tech/rama_works_m65_bx/readme.md b/keyboards/wilba_tech/rama_works_m65_bx/readme.md new file mode 100644 index 000000000000..4d81f8a4d415 --- /dev/null +++ b/keyboards/wilba_tech/rama_works_m65_bx/readme.md @@ -0,0 +1,19 @@ +# RAMA WORKS M65-BX + +![RAMA WORKS M65-B](https://images.squarespace-cdn.com/content/v1/563c788ae4b099120ae219e2/1572021195246-4QHS1WZTE862N635BVR2/ke17ZwdGBToddI8pDm48kAgzYejSbWGRoJP4yk7IdNQUqsxRUqqbr1mOJYKfIPR7LoDQ9mXPOjoJoqy81S2I8N_N4V1vUb5AoIIIbLZhVYy7Mythp_T-mtop-vrsUOmeInPi9iDjx9w8K4ZfjXt2dtCOkMDEaPiGoIoGazr_ji7tWlVp5kgqCHrK9bIsxYYSbSexTd1-frD7527z4SM9QQ/RW-M65-B-WIDE-HERO-A.1710.JPG?format=1500w) + +The RAMA WORKS M65-B is a 65% keyboard made by Rama Works. The RAMA WORKS M65-BX PCB is the solderable variant with layout options. + +* Keyboard Maintainer: [Wilba6582](https://github.com/Wilba6582) +* Hardware Supported: RAMA WORKS M65-BX PCB +* Hardware Availability: [RAMA WORKS Store](https://ramaworks.store/) + +Make example for this keyboard (after setting up your build environment): + + make wilba_tech/rama_works_m65_bx:default + +Flashing example for this keyboard: + + make wilba_tech/rama_works_m65_bx: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). diff --git a/keyboards/wilba_tech/rama_works_m65_bx/rules.mk b/keyboards/wilba_tech/rama_works_m65_bx/rules.mk new file mode 100644 index 000000000000..9f4cc186edea --- /dev/null +++ b/keyboards/wilba_tech/rama_works_m65_bx/rules.mk @@ -0,0 +1,35 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +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 = yes # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +BLUETOOTH_ENABLE = no # Enable Bluetooth +AUDIO_ENABLE = no # Audio output +CIE1931_CURVE = yes + +# 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 + +# 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/wt_rgb_backlight.c b/keyboards/wilba_tech/wt_rgb_backlight.c index 92e14165ee25..24d9d85ec07c 100644 --- a/keyboards/wilba_tech/wt_rgb_backlight.c +++ b/keyboards/wilba_tech/wt_rgb_backlight.c @@ -18,7 +18,10 @@ defined(RGB_BACKLIGHT_ZEAL65) || \ defined(RGB_BACKLIGHT_M60_A) || \ defined(RGB_BACKLIGHT_M6_B) || \ + defined(RGB_BACKLIGHT_M10_C) || \ defined(RGB_BACKLIGHT_KOYU) || \ + defined(RGB_BACKLIGHT_M65_B) || \ + defined(RGB_BACKLIGHT_M65_BX) || \ defined(RGB_BACKLIGHT_HS60) || \ defined(RGB_BACKLIGHT_NK65) || \ defined(RGB_BACKLIGHT_NEBULA12) || \ @@ -27,7 +30,8 @@ defined(RGB_BACKLIGHT_DAWN60) || \ defined(RGB_BACKLIGHT_WT60_B) || \ defined(RGB_BACKLIGHT_WT60_BX) || \ - defined(RGB_BACKLIGHT_WT60_C) + defined(RGB_BACKLIGHT_WT60_C) || \ + defined(RGB_BACKLIGHT_M50_A) #else #error wt_rgb_backlight.c compiled without setting configuration symbol #endif @@ -87,6 +91,8 @@ LED_TYPE g_ws2812_leds[WS2812_LED_TOTAL]; #define BACKLIGHT_LED_COUNT 84 //64 + 20 #elif defined(RGB_BACKLIGHT_NEBULA12) #define BACKLIGHT_LED_COUNT 16 +#elif defined(RGB_BACKLIGHT_M10_C) +#define BACKLIGHT_LED_COUNT 12 #else #define BACKLIGHT_LED_COUNT 72 #endif @@ -120,6 +126,8 @@ backlight_config g_config = { RGB_BACKLIGHT_ALPHAS_MODS_ROW_4 }, #if defined(RGB_BACKLIGHT_M6_B) .custom_color = { { 0, 255 }, { 43, 255 }, { 85, 255 }, { 128, 255 }, { 171, 255 }, { 213, 255 } } +#elif defined(RGB_BACKLIGHT_M10_C) + .custom_color = { { 0, 255 }, { 43, 255 }, { 85, 255 }, { 128, 255 }, { 171, 255 }, { 213, 255 }, { 0, 255 }, { 43, 255 }, { 85, 255 }, { 128, 255 } } #endif }; @@ -600,7 +608,29 @@ const is31_led g_is31_leds[DRIVER_LED_TOTAL] = { {1, C9_15, C8_15, C6_14}, //D15 {1, C9_16, C7_15, C6_15} //D16 }; -#elif !defined(RGB_BACKLIGHT_M6_B) +#elif defined(RGB_BACKLIGHT_M6_B) + // Driver has fixed mapping of index to the red, green and blue LEDs +#elif defined(RGB_BACKLIGHT_M10_C) +// 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 + +const is31_led g_is31_leds[DRIVER_LED_TOTAL] = { + {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_12, C2_12, C3_12}, // LB4 + {0, C1_13, C2_13, C3_13}, // LB5 + {0, C1_14, C2_14, C3_14}, // LB6 + {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, C9_15, C8_15, C6_14}, // LB15 + {0, C9_16, C7_15, C6_15} // LB16 +}; +#else // 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 @@ -689,7 +719,7 @@ const is31_led g_is31_leds[DRIVER_LED_TOTAL] = { {1, C9_16, C7_15, C6_15}, // LD16 {1, C8_16, C7_16, C6_16}, // LD17 }; -#endif // !defined(RGB_BACKLIGHT_M6_B) +#endif typedef struct Point { @@ -759,6 +789,35 @@ const Point g_map_led_to_point_polar[BACKLIGHT_LED_COUNT] PROGMEM = { {0,9}, {0,43}, {0,77}, {0,111}, {0,145}, {0,201}, {224,181}, {230,217}, {235,255}, {189,128}, {200,131}, {210,141}, {218,159}, {255,255}, {207,238}, {211,255}, {218,255}, {255,255} }; +#elif defined(RGB_BACKLIGHT_M65_B) || defined(RGB_BACKLIGHT_M65_BX) +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}, {240,0}, {240,16}, + {136,16}, {152,16}, {168,16}, {184,16}, {200,16}, {220,16}, {240,32}, {240,48}, {240,64}, + // LC0..LC17 + {112,64}, {100,48}, {84,48}, {68,48}, {52,48}, {36,48}, {64,60}, {44,60}, {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}, {208,64}, {224,64} +}; +const Point g_map_led_to_point_polar[BACKLIGHT_LED_COUNT] PROGMEM = { + // LA0..LA17 + {64,128}, {75,132}, {84,145}, {91,164}, {97,187}, {102,213}, {105,242}, {109,255}, {128,243}, + {61,255}, {67,255}, {72,255}, {77,255}, {82,255}, {86,255}, {90,255}, {93,255}, {96,255}, + // LB0..LB17 + {56,255}, {51,255}, {46,255}, {42,255}, {38,255}, {35,255}, {37,255}, {32,255}, {19,255}, + {53,132}, {44,145}, {37,164}, {31,187}, {26,213}, {22,249}, {0,255}, {237,255}, {224,255}, + // LC0..LC17 + {189,255}, {179,135}, {170,149}, {163,169}, {157,193}, {153,220}, {172,252}, {169,255}, {165,255}, + {128,26}, {128,60}, {128,94}, {128,128}, {128,162}, {128,196}, {255,255}, {148,255}, {161,255}, + // LD0..LD17 + {0,9}, {0,43}, {0,77}, {0,111}, {0,145}, {0,201}, {224,181}, {230,217}, {235,255}, + {189,128}, {200,131}, {210,141}, {218,159}, {255,255}, {207,238}, {211,255}, {218,255}, {221,255} +}; #elif defined(RGB_BACKLIGHT_ZEAL60) || defined(RGB_BACKLIGHT_M60_A) const Point g_map_led_to_point[BACKLIGHT_LED_COUNT] PROGMEM = { // LA0..LA17 @@ -1010,6 +1069,24 @@ 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_M10_C) +// M10-C is really simple: +// 0 1 2 +// 3 4 5 +// 8 7 6 +// 11 10 9 +const Point g_map_led_to_point[BACKLIGHT_LED_COUNT] PROGMEM = { + {0,0}, {16,0}, {32,0}, + {0,16}, {16,16}, {32,16}, + {32,32}, {16,32}, {0,32}, + {32,48}, {24,48}, {16,48} +}; +const Point g_map_led_to_point_polar[BACKLIGHT_LED_COUNT] PROGMEM = { + {160,255}, {192,255}, {224,255}, + {128,255}, {0,0}, {0,255}, + {32,255}, {64,255}, {96,255}, + {45,255}, {54,255}, {64,255} +}; #elif defined(RGB_BACKLIGHT_DAWN60) const Point g_map_led_to_point[BACKLIGHT_LED_COUNT] PROGMEM = { // LA1..LA16 @@ -1053,7 +1130,35 @@ const Point g_map_led_to_point_polar[BACKLIGHT_LED_COUNT] PROGMEM = { //11 - 20 {234,255}, {222,255}, {213,255}, {197,255}, {180,255}, {167,255}, {152,255}, {147,255}, {128,255}, {101,255} }; - +#elif defined(RGB_BACKLIGHT_M50_A) +const Point g_map_led_to_point[BACKLIGHT_LED_COUNT] PROGMEM = { + // LA0..LA17 + {255,255}, {104,16}, {88,16}, {72,16}, {56,16}, {40,16}, {24,16}, {255,255}, {255,255}, + {104,0}, {88,0}, {72,0}, {56,0}, {40,0}, {24,0}, {0,0}, {0,16}, {255,255}, + // LB0..LB17 + {255,255}, {120,0}, {136,0}, {152,0}, {168,0}, {184,0}, {200,0}, {255,255}, {255,255}, + {120,16}, {136,16}, {152,16}, {168,16}, {184,16}, {200,16}, {255,255}, {255,255}, {255,255}, + // LC0..LC17 + {255,255}, {112,48}, {88,48}, {72,48}, {56,48}, {40,48}, {24,48}, {0,48}, {255,255}, + {104,32}, {88,32}, {72,32}, {56,32}, {40,32}, {24,32}, {0,32}, {255,255}, {255,255}, + // LD0..LD17 + {255,255}, {120,32}, {136,32}, {152,32}, {168,32}, {184,32}, {200,32}, {255,255}, {255,255}, + {255,255}, {136,48}, {152,48}, {168,48}, {184,48}, {200,48}, {255,255}, {255,255}, {255,255} +}; +const Point g_map_led_to_point_polar[BACKLIGHT_LED_COUNT] PROGMEM = { + // LA0..LA17 + {255,255}, {73,88}, {89,104}, {99,130}, {105,162}, {110,197}, {113,233}, {255,255}, {255,255}, + {67,255}, {73,255}, {79,255}, {84,255}, {89,255}, {93,255}, {98,255}, {116,255}, {255,255}, + // LB0..LB17 + {0,0}, {61,255}, {55,255}, {49,255}, {44,255}, {39,255}, {35,255}, {255,255}, {255,255}, + {55,88}, {39,104}, {29,130}, {23,162}, {18,197}, {15,233}, {255,255}, {255,255}, {255,255}, + // LC0..LC17 + {255,255}, {192,255}, {183,255}, {177,255}, {172,255}, {167,255}, {163,255}, {158,255}, {255,255}, + {183,88}, {167,104}, {157,130}, {151,162}, {146,197}, {143,233}, {140,255}, {255,255}, {255,255}, + // LD0..LD17 + {255,255}, {201,88}, {217,104}, {227,130}, {233,162}, {238,197}, {241,233}, {255,255}, {255,255}, + {255,255}, {201,255}, {207,255}, {212,255}, {217,255}, {221,255}, {255,255}, {255,255}, {255,255} +}; #endif // This may seem counter-intuitive, but it's quite flexible. @@ -1067,7 +1172,7 @@ void map_led_to_point( uint8_t index, Point *point ) point->x = pgm_read_byte(addr); point->y = pgm_read_byte(addr+1); -#if defined(RGB_BACKLIGHT_M6_B) || defined(RGB_BACKLIGHT_HS60) || defined(RGB_BACKLIGHT_NK65) || defined(RGB_BACKLIGHT_NEBULA65) || defined(RGB_BACKLIGHT_NEBULA12) +#if defined(RGB_BACKLIGHT_M6_B) || defined(RGB_BACKLIGHT_M10_C) || defined(RGB_BACKLIGHT_HS60) || defined(RGB_BACKLIGHT_NK65) || defined(RGB_BACKLIGHT_NEBULA65) || defined(RGB_BACKLIGHT_NEBULA12) return; #endif @@ -1177,6 +1282,22 @@ 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, 18+15 }, { 36+17, 36+8, 36+7, 36+6, 255, 255, 255, 36+0, 255, 255, 54+14, 54+15, 54+16, 18+17, 18+16 } }; +#elif defined(RGB_BACKLIGHT_M65_B) || defined(RGB_BACKLIGHT_M65_BX) +// Note: Left spacebar stab is at 4,4 (LC6) +// Right spacebar stab is at 4,10 (D14) +// (B6) +// A17, A16, A15, A14, A13, A12, A11, A10, A9, B0, B1, B2, B3, B4, B7 +// A7, A6, A5, A4, A3, A2, A1, A0, B9, B10, B11, B12, B13, B14, B8 +// A8, C14, C13, C12, C11, C10, C9, D0, D1, D2, D3, D4, D5, B5, B15 +// C16, C15, C5, C4, C3, C2, C1, D9, D10, D11, D12, D6, D7, D8, B16 +// C17, C8, C7, C6, ---, ---, ---, C0, ---, ---, D14, D15, D16, D17, B17 +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, 18+7 }, + { 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, 18+8 }, + { 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, 18+15 }, + { 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, 18+16 }, + { 36+17, 36+8, 36+7, 36+6, 255, 255, 255, 36+0, 255, 255, 54+14, 54+15, 54+16, 54+17, 18+17 } +}; #elif defined(RGB_BACKLIGHT_ZEAL60) || defined(RGB_BACKLIGHT_M60_A) // Note: Left spacebar stab is at 4,3 (LC6) // Right spacebar stab is at 4,9 (LD13) or 4,10 (LD14) @@ -1287,6 +1408,15 @@ 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_M10_C) +// M10-C is really simple: +// 0 1 2 +// 3 4 5 +// 8 7 6 +// 11 10 9 +const uint8_t g_map_row_column_to_led[MATRIX_ROWS][MATRIX_COLS] PROGMEM = { + { 0, 1, 2, 3, 4, 5, 8, 7, 6, 10 } +}; #elif defined(RGB_BACKLIGHT_DAWN60) //Dawn60 // A16, A15, A14, A13, A12, A11, A10, A9, B1, B2, B3, B4, B5, B6, @@ -1300,6 +1430,16 @@ const uint8_t g_map_row_column_to_led[MATRIX_ROWS][MATRIX_COLS] PROGMEM = { { -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 } +#elif defined(RGB_BACKLIGHT_M50_A) +// LA15, LA14, LA13, LA12, LA11, LA10, LA9, LB1, LB2, LB3, LB4, LB5, LB6 +// LA16, LA6, LA5, LA4, LA3, LA2, LA1, LB9, LB10, LB11, LB12, LB13, LB14 +// LC15, LC14, LC13, LC12, LC11, LC10, LC9, LD1, LD2, LD3, LD4, LD5, LD6 +// LC7, LC6, LC5, LC4, LC3, LC2, LC1, ----, LD10, LD11, LD12, LD13, LD14 +const uint8_t g_map_row_column_to_led[MATRIX_ROWS][MATRIX_COLS] PROGMEM = { + { 0+15, 0+14, 0+13, 0+12, 0+11, 0+10, 0+9, 18+1, 18+2, 18+3, 18+4, 18+5, 18+6 }, + { 0+16, 0+6, 0+5, 0+4, 0+3, 0+2, 0+1, 18+9, 18+10, 18+11, 18+12, 18+13, 18+14 }, + { 36+15, 36+14, 36+13, 36+12, 36+11, 36+10, 36+9, 54+1, 54+2, 54+3, 54+4, 54+5, 54+6 }, + { 36+7, 36+6, 36+5, 36+4, 36+3, 36+2, 36+1, 255, 54+10, 54+11, 54+12, 54+13, 54+14 }, }; #endif @@ -1316,6 +1456,9 @@ void backlight_update_pwm_buffers(void) { #if defined(RGB_BACKLIGHT_M6_B) IS31FL3218_update_pwm_buffers(); +#elif defined(RGB_BACKLIGHT_M10_C) + IS31FL3731_update_pwm_buffers( ISSI_ADDR_1, 0 ); + IS31FL3731_update_led_control_registers( ISSI_ADDR_1, 0 ); #elif defined(RGB_BACKLIGHT_HS60) IS31FL3733_update_pwm_buffers( ISSI_ADDR_1, 0 ); IS31FL3733_update_led_control_registers( ISSI_ADDR_1, 0 ); @@ -1856,17 +1999,24 @@ void backlight_effect_cycle_radial2(void) } } -#if defined(RGB_BACKLIGHT_M6_B) +#if defined(RGB_BACKLIGHT_M6_B) || defined(RGB_BACKLIGHT_M10_C) void backlight_effect_custom_colors(void) { RGB rgb; - for ( uint8_t i = 0; i < 6; i++ ) + for ( uint8_t i = 0; i < RGB_BACKLIGHT_CUSTOM_COLORS_COUNT; i++ ) { HSV hsv = { .h = g_config.custom_color[i].h, .s = g_config.custom_color[i].s, .v = g_config.brightness }; rgb = hsv_to_rgb( hsv ); uint8_t led; map_row_column_to_led( 0, i, &led ); backlight_set_color( led, rgb.r, rgb.g, rgb.b ); +#if defined(RGB_BACKLIGHT_M10_C) + // Set stab LEDs with the same color + if ( led == 10 ) { + backlight_set_color( 9, rgb.r, rgb.g, rgb.b ); + backlight_set_color( 11, rgb.r, rgb.g, rgb.b ); + } +#endif } } #endif @@ -1887,10 +2037,10 @@ void backlight_effect_indicators_set_colors( uint8_t index, HS color ) // do the same for the spacebar stabilizers if ( index == 36+0 ) // LC0 { -#if defined(RGB_BACKLIGHT_ZEAL65) +#if defined(RGB_BACKLIGHT_ZEAL65) backlight_set_color( 36+7, rgb.r, rgb.g, rgb.b ); // LC7 backlight_set_color( 54+14, rgb.r, rgb.g, rgb.b ); // LD14 -#elif defined(RGB_BACKLIGHT_KOYU) +#elif defined(RGB_BACKLIGHT_KOYU) || defined(RGB_BACKLIGHT_M65_B) || defined(RGB_BACKLIGHT_M65_BX) backlight_set_color( 36+6, rgb.r, rgb.g, rgb.b ); // LC6 backlight_set_color( 54+14, rgb.r, rgb.g, rgb.b ); // LD14 #elif defined(RGB_BACKLIGHT_ZEAL60) || defined(RGB_BACKLIGHT_M60_A) @@ -2008,7 +2158,7 @@ static void gpt_backlight_timer_task(GPTDriver *gptp) backlight_effect_solid_color(); break; case 2: -#if defined(RGB_BACKLIGHT_M6_B) +#if defined(RGB_BACKLIGHT_M6_B) || defined(RGB_BACKLIGHT_M10_C) backlight_effect_custom_colors(); #else backlight_effect_alphas_mods(); @@ -2045,7 +2195,7 @@ static void gpt_backlight_timer_task(GPTDriver *gptp) if ( ! suspend_backlight ) { -#if !defined(RGB_BACKLIGHT_M6_B) +#if !defined(RGB_BACKLIGHT_M6_B) && !defined(RGB_BACKLIGHT_M10_C) backlight_effect_indicators(); #endif } @@ -2231,11 +2381,11 @@ void backlight_config_set_value( uint8_t *data ) g_config.alphas_mods[i] = ( *(value_data+i*2) << 8 ) | ( *(value_data+i*2+1) ); } } -#if defined(RGB_BACKLIGHT_M6_B) +#if defined(RGB_BACKLIGHT_M6_B) || defined(RGB_BACKLIGHT_M10_C) case id_custom_color: { uint8_t index = value_data[0]; - if ( index >= 0 && index <= 6 ) + if ( index >= 0 && index < RGB_BACKLIGHT_CUSTOM_COLORS_COUNT ) { _set_color( &(g_config.custom_color[index]), &(value_data[1]) ); } @@ -2368,11 +2518,11 @@ void backlight_config_get_value( uint8_t *data ) *(value_data+i*2+1) = g_config.alphas_mods[i] & 0xFF; } } -#if defined(RGB_BACKLIGHT_M6_B) +#if defined(RGB_BACKLIGHT_M6_B) || defined(RGB_BACKLIGHT_M10_C) case id_custom_color: { uint8_t index = value_data[0]; - if ( index >= 0 && index <= 6 ) + if ( index >= 0 && index < RGB_BACKLIGHT_CUSTOM_COLORS_COUNT ) { _get_color( &(g_config.custom_color[index]), &(value_data[1]) ); } @@ -2459,10 +2609,13 @@ void backlight_init_drivers(void) IS31FL3733_update_led_control_registers( ISSI_ADDR_1, 0 ); IS31FL3733_update_led_control_registers( ISSI_ADDR_2, 1 ); #else + // Init the #1 driver IS31FL3731_init( ISSI_ADDR_1 ); -#if !defined(RGB_BACKLIGHT_NEBULA12) + // Init the #2 driver (if used) +#if !defined(RGB_BACKLIGHT_NEBULA12) && !defined(RGB_BACKLIGHT_M10_C) IS31FL3731_init( ISSI_ADDR_2 ); #endif + // Init the #3 driver (if used) #if defined(RGB_BACKLIGHT_U80_A) IS31FL3731_init( ISSI_ADDR_3 ); #endif @@ -2484,6 +2637,15 @@ void backlight_init_drivers(void) bool enabled = !( ( index == 36+15 ) || // LC15 ( index == 54+13 ) || // LD13 ( index == 54+17 ) ); // LD17 +#elif defined(RGB_BACKLIGHT_M65_B) || defined(RGB_BACKLIGHT_M65_BX) + bool enabled = !( + // LB6 not present on M65-B +#if defined(RGB_BACKLIGHT_M65_B) + ( index == 18+6 ) || // LB6 +#endif + // LC15 LD13 not present on M65-B, M65-BX + ( index == 36+15 ) || // LC15 + ( index == 54+13 ) ); // LD13 #elif defined(RGB_BACKLIGHT_M60_A) bool enabled = !( // LB6 LB7 LB8 LB15 LB16 LB17 not present on M60-A @@ -2550,19 +2712,50 @@ void backlight_init_drivers(void) ( index == 47+15 && g_config.use_7u_spacebar ) ); //LD15 #elif defined(RGB_BACKLIGHT_NEBULA12) bool enabled = !( ( index >= 9-1 && index <= 12-1 ) ); // A9-A12 +#elif defined(RGB_BACKLIGHT_M50_A) + bool enabled = !( + // LA0, LA7, LA8, LA17 + ( index == 0+0 ) || + ( index == 0+7 ) || + ( index == 0+8 ) || + ( index == 0+17 ) || + + // LB0, LB7, LB8, LB15, LB16, LB17, + ( index == 18+0 ) || + ( index == 18+7 ) || + ( index == 18+8 ) || + ( index == 18+15 ) || + ( index == 18+16 ) || + ( index == 18+17 ) || + // LC0, LC8, LC16, LC17 + ( index == 36+0 ) || + ( index == 36+8 ) || + ( index == 36+16 ) || + ( index == 36+17 ) || + // LD0, LD7, LD8, LD9, LD15, LD16, LD17 + ( index == 54+0 ) || + ( index == 54+7 ) || + ( index == 54+8 ) || + ( index == 54+9 ) || + ( index == 54+15 ) || + ( index == 54+16 ) || + ( index == 54+17 ) ); +#elif defined(RGB_BACKLIGHT_M10_C) + bool enabled = true; #endif // This only caches it for later IS31FL3731_set_led_control_register( index, enabled, enabled, enabled ); } // This actually updates the LED drivers + // TODO: refactor this to use DRIVER_COUNT IS31FL3731_update_led_control_registers( ISSI_ADDR_1, 0 ); -#if !defined(RGB_BACKLIGHT_NEBULA12) +#if !defined(RGB_BACKLIGHT_NEBULA12) && !defined(RGB_BACKLIGHT_M10_C) IS31FL3731_update_led_control_registers( ISSI_ADDR_2, 1 ); #endif -#if defined(RGB_BACKLIGHT_U80_A) +#if defined(RGB_BACKLIGHT_U80_A) IS31FL3731_update_led_control_registers( ISSI_ADDR_3, 2 ); #endif -#endif // !defined(RGB_BACKLIGHT_M6_B) +#endif // TODO: put the 1 second startup delay here? diff --git a/keyboards/wilba_tech/wt_rgb_backlight.h b/keyboards/wilba_tech/wt_rgb_backlight.h index 648465886684..529f84636a0a 100644 --- a/keyboards/wilba_tech/wt_rgb_backlight.h +++ b/keyboards/wilba_tech/wt_rgb_backlight.h @@ -37,6 +37,12 @@ typedef struct uint8_t index; } backlight_config_indicator; +#if defined(RGB_BACKLIGHT_M6_B) +#define RGB_BACKLIGHT_CUSTOM_COLORS_COUNT 6 +#elif defined(RGB_BACKLIGHT_M10_C) +#define RGB_BACKLIGHT_CUSTOM_COLORS_COUNT 10 +#endif + typedef struct { bool use_split_backspace:1; // | @@ -58,10 +64,10 @@ typedef struct backlight_config_indicator layer_2_indicator; // 3 bytes backlight_config_indicator layer_3_indicator; // 3 bytes uint16_t alphas_mods[5]; // 10 bytes -#if defined(RGB_BACKLIGHT_M6_B) - HS custom_color[6]; // 12 bytes +#if defined(RGB_BACKLIGHT_M6_B) || defined(RGB_BACKLIGHT_M10_C) + HS custom_color[RGB_BACKLIGHT_CUSTOM_COLORS_COUNT]; // 12 or 20 bytes #endif -} backlight_config; // = 31 bytes (M6-B = 43 bytes) +} backlight_config; // = 31 bytes (M6-B = 43 bytes, M10-C 51 bytes) void backlight_config_load(void); void backlight_config_save(void); From 0d65bbaa44b8b911744b5496fc9d8fca181d6ef5 Mon Sep 17 00:00:00 2001 From: rate Date: Tue, 18 Aug 2020 15:46:56 +0900 Subject: [PATCH 586/930] [Keyboard] Pistachio (#10003) * Add keyboard Pistachio * Update keyboards/pistachio/keymaps/default/keymap.c * Update keyboards/pistachio/keymaps/default/keymap.c * Update keyboards/pistachio/config.h * Fix Build error. * Apply suggestions from code review --- keyboards/pistachio/config.h | 80 ++++++++++++++ keyboards/pistachio/info.json | 103 +++++++++++++++++++ keyboards/pistachio/keymaps/default/keymap.c | 67 ++++++++++++ keyboards/pistachio/pistachio.c | 18 ++++ keyboards/pistachio/pistachio.h | 57 ++++++++++ keyboards/pistachio/readme.md | 21 ++++ keyboards/pistachio/rules.mk | 23 +++++ 7 files changed, 369 insertions(+) create mode 100644 keyboards/pistachio/config.h create mode 100644 keyboards/pistachio/info.json create mode 100644 keyboards/pistachio/keymaps/default/keymap.c create mode 100644 keyboards/pistachio/pistachio.c create mode 100644 keyboards/pistachio/pistachio.h create mode 100644 keyboards/pistachio/readme.md create mode 100644 keyboards/pistachio/rules.mk diff --git a/keyboards/pistachio/config.h b/keyboards/pistachio/config.h new file mode 100644 index 000000000000..e427f90ec1bf --- /dev/null +++ b/keyboards/pistachio/config.h @@ -0,0 +1,80 @@ +/* +Copyright 2020 rate + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License 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 0xD0C2 +#define DEVICE_VER 0x0001 +#define MANUFACTURER rate +#define PRODUCT pistachio + +/* key matrix size */ +#define MATRIX_ROWS 12 +#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 MATRIX_ROW_PINS { D4, C6, D7, E6, B4, B5 } +#define MATRIX_COL_PINS { F4, F5, F6, F7, B1, B3, B2, B6, D3} +#define UNUSED_PINS + +#define USE_I2C + +/* COL2ROW, ROW2COL */ +#define DIODE_DIRECTION COL2ROW + +/* ws2812 RGB LED */ +#define RGB_DI_PIN D2 +#define RGBLIGHT_SPLIT +#define RGBLED_SPLIT { 1, 1 } +#define RGBLED_NUM 2 +#define RGBLIGHT_LAYERS +#define RGBLIGHT_HUE_STEP 10 +#define RGBLIGHT_SAT_STEP 17 + +#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 + +/* 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 + +/* nKey Rollover */ +#define FORCE_NKRO + +/* disable these deprecated features by default */ +#define NO_ACTION_MACRO +#define NO_ACTION_FUNCTION diff --git a/keyboards/pistachio/info.json b/keyboards/pistachio/info.json new file mode 100644 index 000000000000..47f953b28a32 --- /dev/null +++ b/keyboards/pistachio/info.json @@ -0,0 +1,103 @@ +{ + "keyboard_name": "Pistachio", + "url": "", + "maintainer": "rate", + "width": 19.25, + "height": 6.75, + "layouts": { + "LAYOUT": { + "layout": [{"label":"ESC", "x":1.25, "y":0.25}, + {"label":"F1", "x":2.75, "y":0.25}, + {"label":"F2", "x":3.75, "y":0.25}, + {"label":"F3", "x":4.75, "y":0.25}, + {"label":"F4", "x":5.75, "y":0.25}, + {"label":"DEL", "x":7.25, "y":0.25}, + {"label":"F5", "x":9.5, "y":0.25}, + {"label":"F6", "x":10.5, "y":0.25}, + {"label":"F7", "x":11.5, "y":0.25}, + {"label":"F8", "x":12.5, "y":0.25}, + {"label":"F9", "x":14, "y":0.25}, + {"label":"F10", "x":15, "y":0.25}, + {"label":"F11", "x":16, "y":0.25}, + {"label":"F12", "x":17, "y":0.25}, + {"label":"\u25b6\u25b6|", "x":0, "y":1.75}, + {"label":"E/J", "x":1.25, "y":1.75}, + {"label":"!", "x":2.25, "y":1.75}, + {"label":"\"", "x":3.25, "y":1.75}, + {"label":"#", "x":4.25, "y":1.75}, + {"label":"$", "x":5.25, "y":1.75}, + {"label":"%", "x":6.25, "y":1.75}, + {"label":"&", "x":7.25, "y":1.75}, + {"label":"'", "x":10, "y":1.75}, + {"label":"(", "x":11, "y":1.75}, + {"label":")", "x":12, "y":1.75}, + {"label":"", "x":13, "y":1.75}, + {"label":"=", "x":14, "y":1.75}, + {"label":"~", "x":15, "y":1.75}, + {"label":"\\", "x":16, "y":1.75}, + {"label":"\u2190", "x":17, "y":1.75}, + {"label":"Delete", "x":18.25, "y":1.75}, + {"label":"\u25b6||", "x":0, "y":2.75}, + {"label":"Tab", "x":1.25, "y":2.75, "w":1.5}, + {"label":"Q", "x":2.75, "y":2.75}, + {"label":"W", "x":3.75, "y":2.75}, + {"label":"E", "x":4.75, "y":2.75}, + {"label":"R", "x":5.75, "y":2.75}, + {"label":"T", "x":6.75, "y":2.75}, + {"label":"Y", "x":9.5, "y":2.75}, + {"label":"U", "x":10.5, "y":2.75}, + {"label":"I", "x":11.5, "y":2.75}, + {"label":"O", "x":12.5, "y":2.75}, + {"label":"P", "x":13.5, "y":2.75}, + {"label":"`", "x":14.5, "y":2.75}, + {"label":"{", "x":15.5, "y":2.75}, + {"label":"Home", "x":18.25, "y":2.75}, + {"label":"\ud83d\udd07", "x":0, "y":3.75}, + {"label":"CapsLock", "x":1.25, "y":3.75, "w":1.75}, + {"label":"A", "x":3, "y":3.75}, + {"label":"S", "x":4, "y":3.75}, + {"label":"D", "x":5, "y":3.75}, + {"label":"F", "x":6, "y":3.75}, + {"label":"G", "x":7, "y":3.75}, + {"label":"H", "x":9.75, "y":3.75}, + {"label":"J", "x":10.75, "y":3.75}, + {"label":"K", "x":11.75, "y":3.75}, + {"label":"L", "x":12.75, "y":3.75}, + {"label":"+", "x":13.75, "y":3.75}, + {"label":"*", "x":14.75, "y":3.75}, + {"label":"}", "x":15.75, "y":3.75}, + {"label":"Enter", "x":16.75, "y":2.75, "w":1.25, "h":2}, + {"label":"End", "x":18.25, "y":3.75}, + {"label":"VolUP", "x":0, "y":4.75}, + {"label":"Shift", "x":1.25, "y":4.75, "w":2.25}, + {"label":"Z", "x":3.5, "y":4.75}, + {"label":"X", "x":4.5, "y":4.75}, + {"label":"C", "x":5.5, "y":4.75}, + {"label":"V", "x":6.5, "y":4.75}, + {"label":"B", "x":7.5, "y":4.75}, + {"label":"N", "x":10.25, "y":4.75}, + {"label":"M", "x":11.25, "y":4.75}, + {"label":"<", "x":12.25, "y":4.75}, + {"label":">", "x":13.25, "y":4.75}, + {"label":"?", "x":14.25, "y":4.75}, + {"label":"_", "x":15.25, "y":4.75}, + {"label":"Shift", "x":16.25, "y":4.75, "w":1.75}, + {"label":"Page", "x":18.25, "y":4.75}, + {"label":"VolDW", "x":0, "y":5.75}, + {"label":"Ctrl", "x":1.25, "y":5.75, "w":1.25}, + {"label":"Win", "x":2.5, "y":5.75}, + {"label":"Alt", "x":3.5, "y":5.75, "w":1.25}, + {"label":"Enter", "x":4.75, "y":5.75}, + {"label":"\u7121\u5909\u63db", "x":5.75, "y":5.75}, + {"x":6.75, "y":5.75, "w":1.25}, + {"x":10.5, "y":5.75, "w":1.25}, + {"label":"\u5909\u63db", "x":11.75, "y":5.75}, + {"label":"\u5de6\u30af\u30ea\u30c3\u30af", "x":12.75, "y":5.75}, + {"label":"Insert", "x":13.75, "y":5.75}, + {"label":"Alt", "x":14.75, "y":5.75}, + {"label":"Menu", "x":15.75, "y":5.75}, + {"label":"Ctrl", "x":16.75, "y":5.75, "w":1.25}, + {"label":"Page", "x":18.25, "y":5.75}] + } + } +} diff --git a/keyboards/pistachio/keymaps/default/keymap.c b/keyboards/pistachio/keymaps/default/keymap.c new file mode 100644 index 000000000000..585807abdd77 --- /dev/null +++ b/keyboards/pistachio/keymaps/default/keymap.c @@ -0,0 +1,67 @@ +/* Copyright 2020 rate + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public 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" + +extern rgblight_config_t rgblight_config; + +enum layer_names { + _QWERTY = 0, + _FN +}; + +enum custom_keycodes { + RGB_RST = SAFE_RANGE +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_QWERTY] = LAYOUT( + KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_DEL, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, + KC_MNXT, KC_ZKHK, 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_DEL, + KC_MPLY, 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_HOME, + KC_MUTE, 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_ENT, KC_END, + KC_VOLU, 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_PGUP, + KC_VOLD, KC_LCTL, KC_LGUI, KC_LALT, KC_ENT, KC_MHEN, LT(_FN,KC_SPC), LT(_FN,KC_SPC), KC_HENK, KC_BTN1, KC_INS, KC_RALT, KC_APP, KC_RCTL, KC_PGDN + ), + [_FN] = LAYOUT( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + RGB_VAI, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + RGB_VAD, _______, _______, _______, _______, KC_UP, _______, KC_HOME, KC_PGUP, KC_END, _______, _______, _______, _______, _______, + _______, _______, _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, KC_LEFT, KC_UP, KC_DOWN, KC_RGHT, _______, _______, _______, _______, _______, + RGB_HUI, _______, _______, _______, _______, _______, _______, KC_PGDN, _______, _______, _______, _______, _______, _______, RGB_SAI, + RGB_HUD, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_SAD + ) +}; + + +int RGB_current_mode; +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + bool result = false; + switch (keycode) { + case RGB_RST: + if (record->event.pressed) { + eeconfig_update_rgblight_default(); + rgblight_enable(); + RGB_current_mode = rgblight_config.mode; + } + break; + default: + result = true; + break; + } + + return result; +} diff --git a/keyboards/pistachio/pistachio.c b/keyboards/pistachio/pistachio.c new file mode 100644 index 000000000000..2a850f64a447 --- /dev/null +++ b/keyboards/pistachio/pistachio.c @@ -0,0 +1,18 @@ +/* Copyright 2020 rate + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#include "pistachio.h" + diff --git a/keyboards/pistachio/pistachio.h b/keyboards/pistachio/pistachio.h new file mode 100644 index 000000000000..83196bfa7bfc --- /dev/null +++ b/keyboards/pistachio/pistachio.h @@ -0,0 +1,57 @@ +/* Copyright 2020 rate + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License 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" + +/* + * ,------------------------------------------------- ---------------------------------------------------------. + * | | L00 | | L01 | L02 | L03 | L04 | | L05 | | 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 | | R20 | R21 | R22 | R23 | R24 | R25 | R26 | R27 || R28 | + * |--------------------------------------------- ------------------------------------------- ------+ + * | L30 || L31 | L32 | L33 | L34 | L35 | L36 | | R30 | R31 | R32 | R33 | R34 | R35 | R36 | || R37 | + * |---------------------------------------------- -------------------------------------------------------+ + * | L40 || L41 | L42 | L43 | L44 | L45 | L46 | | R40 | R41 | R42 | R43 | R44 | R45 | R46 || R47 | + * |----------------------------------------------- -----------------------------------------------------+ + * | L50 || L51 | L52 | L53 | L54 | L55 | L56 | | R50 | R51 | R52 | R53 | R54 | R55 | R56 || R57 | + * |----------------------------------------------- ---------------------------------------------------- + */ +#define LAYOUT( \ + L00, L01, L02, L03, L04, L05, 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, R20, R21, R22, R23, R24, R25, R26, R28, \ + L30, L31, L32, L33, L34, L35, L36, R30, R31, R32, R33, R34, R35, R36, R27, R37, \ + L40, L41, L42, L43, L44, L45, L46, R40, R41, R42, R43, R44, R45, R46, R47, \ + L50, L51, L52, L53, L54, L55, L56, R50, R51, R52, R53, R54, R55, R56, R57 \ + ) \ + { \ + { L00, L01, L02, L03, L04, L05, KC_NO, KC_NO, KC_NO }, \ + { L10, L11, L12, L13, L14, L15, L16, L17, KC_NO }, \ + { L20, L21, L22, L23, L24, L25, L26, KC_NO, KC_NO }, \ + { L30, L31, L32, L33, L34, L35, L36, KC_NO, KC_NO }, \ + { L40, L41, L42, L43, L44, L45, L46, KC_NO, KC_NO }, \ + { L50, L51, L52, L53, L54, L55, L56, 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 }, \ + { R30, R31, R32, R33, R34, R35, R36, R37, KC_NO }, \ + { R40, R41, R42, R43, R44, R45, R46, R47, KC_NO }, \ + { R50, R51, R52, R53, R54, R55, R56, R57, KC_NO } \ + } diff --git a/keyboards/pistachio/readme.md b/keyboards/pistachio/readme.md new file mode 100644 index 000000000000..fa073127f66a --- /dev/null +++ b/keyboards/pistachio/readme.md @@ -0,0 +1,21 @@ +# pistachio + +![pistachio](https://ratelog.net/wp-content/uploads/2020/08/Pistachio4-scaled.jpg) + +This is a 92-key split keyboard with JIS layout and spare keys. + +* Keyboard Maintainer: [rate](https://github.com/7-rate) +* Hardware Supported: pistachio PCB, Pro Micro +* Hardware Availability: [PCB & Case Data](https://github.com/7-rate/Pistachio), [Booth Shop](https://rates.booth.pm/items/2237334) + +Make example for this keyboard (after setting up your build environment): + + make pistachio:default + +Flashing example for this keyboard: + + make pistachio: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). + +[Build guide](https://ratelog.net/pistachio-build-guide/) \ No newline at end of file diff --git a/keyboards/pistachio/rules.mk b/keyboards/pistachio/rules.mk new file mode 100644 index 000000000000..1788664195ef --- /dev/null +++ b/keyboards/pistachio/rules.mk @@ -0,0 +1,23 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +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 = 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 = yes # Enable keyboard RGB underglow +BLUETOOTH_ENABLE = no # Enable Bluetooth +AUDIO_ENABLE = no # Audio output +SPLIT_KEYBOARD = yes # Enable split keyboard From 4237d35e83826d0d8949a45dffa27d6c68d3d4f9 Mon Sep 17 00:00:00 2001 From: Yu-Xi Lim Date: Tue, 18 Aug 2020 15:06:19 +0800 Subject: [PATCH 587/930] [Keyboard] HHKB Lite 2 (#9188) * Initial commit for HHKB Lite 2 * Rearrange keymap * Clean up config * Fix pin assignments * Code and filename cleanup * Add README * Apply suggestions from code review Code cleanup * Update keyboards/hhkb_lite_2/README.md Documentation cleanup * Change Vendor ID to unused * One more LAYOUT * Via keymap for HHKB Lite 2 * Remove redundant keymap.c * Add README for Via keymap * Fix vendorId for Via keymap * Apply suggestions from code review Cleanup based on review feedback * Clean up via keymap makefile rules * Switch to C keymap instead of JSON for Via layout * Move bootmagic key config to main Moved to main keyboard config to be shared by all keymaps. * Address PR feedback * Reformat config comments * Format rules.mk comments * Rename README -> readme * Use `make` instead of `qmk` in examples --- keyboards/hhkb_lite_2/config.h | 29 +++++++++++++++++ keyboards/hhkb_lite_2/hhkb_lite_2.c | 1 + keyboards/hhkb_lite_2/hhkb_lite_2.h | 22 +++++++++++++ .../hhkb_lite_2/keymaps/default/keymap.c | 22 +++++++++++++ keyboards/hhkb_lite_2/keymaps/via/config.h | 3 ++ keyboards/hhkb_lite_2/keymaps/via/keymap.c | 31 +++++++++++++++++++ keyboards/hhkb_lite_2/keymaps/via/readme.md | 3 ++ keyboards/hhkb_lite_2/keymaps/via/rules.mk | 2 ++ keyboards/hhkb_lite_2/readme.md | 28 +++++++++++++++++ keyboards/hhkb_lite_2/rules.mk | 23 ++++++++++++++ 10 files changed, 164 insertions(+) create mode 100644 keyboards/hhkb_lite_2/config.h create mode 100644 keyboards/hhkb_lite_2/hhkb_lite_2.c create mode 100644 keyboards/hhkb_lite_2/hhkb_lite_2.h create mode 100644 keyboards/hhkb_lite_2/keymaps/default/keymap.c create mode 100644 keyboards/hhkb_lite_2/keymaps/via/config.h create mode 100644 keyboards/hhkb_lite_2/keymaps/via/keymap.c create mode 100644 keyboards/hhkb_lite_2/keymaps/via/readme.md create mode 100644 keyboards/hhkb_lite_2/keymaps/via/rules.mk create mode 100644 keyboards/hhkb_lite_2/readme.md create mode 100644 keyboards/hhkb_lite_2/rules.mk diff --git a/keyboards/hhkb_lite_2/config.h b/keyboards/hhkb_lite_2/config.h new file mode 100644 index 000000000000..d9dd641951a5 --- /dev/null +++ b/keyboards/hhkb_lite_2/config.h @@ -0,0 +1,29 @@ +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0x88B2 +#define PRODUCT_ID 0x88B2 +#define DEVICE_VER 0x0002 +#define MANUFACTURER PFU +#define PRODUCT HHKB Lite 2 + +/* key matrix size */ +#define MATRIX_ROWS 8 +#define MATRIX_COLS 14 + +/* key matrix pins */ +#define MATRIX_ROW_PINS { F5, F4, F1, F0, B0, B1, B2, B3 } +#define MATRIX_COL_PINS { F6, F7, B6, B5, B4, D7, D6, D4, D5, C7, C6, D3, D2, D1} +#define UNUSED_PINS + +/* COL2ROW or ROW2COL */ +#define DIODE_DIRECTION COL2ROW + +/* Set 0 if debouncing isn't needed */ +#define DEBOUNCE 5 + +/* Bootmagic keys are non-standard because of matrix */ +#define BOOTMAGIC_LITE_ROW 5 +#define BOOTMAGIC_LITE_COLUMN 9 diff --git a/keyboards/hhkb_lite_2/hhkb_lite_2.c b/keyboards/hhkb_lite_2/hhkb_lite_2.c new file mode 100644 index 000000000000..d0eaf250d606 --- /dev/null +++ b/keyboards/hhkb_lite_2/hhkb_lite_2.c @@ -0,0 +1 @@ +#include "hhkb_lite_2.h" diff --git a/keyboards/hhkb_lite_2/hhkb_lite_2.h b/keyboards/hhkb_lite_2/hhkb_lite_2.h new file mode 100644 index 000000000000..ccdd765a2307 --- /dev/null +++ b/keyboards/hhkb_lite_2/hhkb_lite_2.h @@ -0,0 +1,22 @@ +#pragma once + +#include "quantum.h" + +#define LAYOUT( \ + K509, K109, K108, K107, K106, K006, K005, K105, K104, K103, K102, K002, K004, K413, K009, \ + K309, K209, K208, K207, K206, K306, K305, K205, K204, K203, K202, K302, K304, K313, \ + K010, K409, K408, K407, K406, K506, K505, K405, K404, K403, K402, K502, K613, \ + K311, K609, K608, K607, K606, K706, K705, K605, K600, K603, K702, K611, \ + K001, K512, K400, K713, K300, K712, \ + K000, \ + K303, K100, K200 \ +) { \ + { K000, K001, K002, KC_NO, K004, K005, K006, KC_NO, KC_NO, K009, K010, KC_NO, KC_NO, KC_NO }, \ + { K100, KC_NO, K102, K103, K104, K105, K106, K107, K108, K109, KC_NO, KC_NO, KC_NO, KC_NO }, \ + { K200, KC_NO, K202, K203, K204, K205, K206, K207, K208, K209, KC_NO, KC_NO, KC_NO, KC_NO }, \ + { K300, KC_NO, K302, K303, K304, K305, K306, KC_NO, KC_NO, K309, KC_NO, K311, KC_NO, K313 }, \ + { K400, KC_NO, K402, K403, K404, K405, K406, K407, K408, K409, KC_NO, KC_NO, KC_NO, K413 }, \ + { KC_NO, KC_NO, K502, KC_NO, KC_NO, K505, K506, KC_NO, KC_NO, K509, KC_NO, KC_NO, K512, KC_NO }, \ + { K600, KC_NO, KC_NO, K603, KC_NO, K605, K606, K607, K608, K609, KC_NO, K611, KC_NO, K613 }, \ + { KC_NO, KC_NO, K702, KC_NO, KC_NO, K705, K706, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, K712, K713 } \ +} diff --git a/keyboards/hhkb_lite_2/keymaps/default/keymap.c b/keyboards/hhkb_lite_2/keymaps/default/keymap.c new file mode 100644 index 000000000000..dd2d552e0b52 --- /dev/null +++ b/keyboards/hhkb_lite_2/keymaps/default/keymap.c @@ -0,0 +1,22 @@ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + 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_TAB, KC_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_LALT, KC_LGUI, KC_SPC, KC_RGUI, KC_RALT, + KC_UP, + KC_LEFT, KC_DOWN, KC_RGHT + ), + 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_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_NO, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_PGUP, KC_LEFT, KC_RIGHT, 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_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_PGUP, + KC_HOME, KC_PGDN, KC_END + ), +}; diff --git a/keyboards/hhkb_lite_2/keymaps/via/config.h b/keyboards/hhkb_lite_2/keymaps/via/config.h new file mode 100644 index 000000000000..a3b77a5b4d0b --- /dev/null +++ b/keyboards/hhkb_lite_2/keymaps/via/config.h @@ -0,0 +1,3 @@ +#pragma once + +#define DYNAMIC_KEYMAP_LAYER_COUNT 3 diff --git a/keyboards/hhkb_lite_2/keymaps/via/keymap.c b/keyboards/hhkb_lite_2/keymaps/via/keymap.c new file mode 100644 index 000000000000..7cbe7331c3d7 --- /dev/null +++ b/keyboards/hhkb_lite_2/keymaps/via/keymap.c @@ -0,0 +1,31 @@ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + 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_TAB, KC_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_LALT, KC_LGUI, KC_SPC, KC_RGUI, KC_RALT, + KC_UP, + KC_LEFT, KC_DOWN, KC_RGHT + ), + 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_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_NO, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_PGUP, KC_LEFT, KC_RIGHT, 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_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_PGUP, + KC_HOME, KC_PGDN, KC_END + ), + 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 + ) +}; diff --git a/keyboards/hhkb_lite_2/keymaps/via/readme.md b/keyboards/hhkb_lite_2/keymaps/via/readme.md new file mode 100644 index 000000000000..6eee36480ea0 --- /dev/null +++ b/keyboards/hhkb_lite_2/keymaps/via/readme.md @@ -0,0 +1,3 @@ +# Via-enabled keymap for HHKB Lite 2 + +See https://caniusevia.com/ diff --git a/keyboards/hhkb_lite_2/keymaps/via/rules.mk b/keyboards/hhkb_lite_2/keymaps/via/rules.mk new file mode 100644 index 000000000000..36b7ba9cbc98 --- /dev/null +++ b/keyboards/hhkb_lite_2/keymaps/via/rules.mk @@ -0,0 +1,2 @@ +VIA_ENABLE = yes +LTO_ENABLE = yes diff --git a/keyboards/hhkb_lite_2/readme.md b/keyboards/hhkb_lite_2/readme.md new file mode 100644 index 000000000000..a4b9f1611567 --- /dev/null +++ b/keyboards/hhkb_lite_2/readme.md @@ -0,0 +1,28 @@ +# HHKB Lite 2 + +![HHKB Lite 2](https://deskthority.net/wiki/images/e/ed/HHKB_Lite_2.jpg) + +This is for the [HHKB Lite 2](https://deskthority.net/wiki/HHKB_Lite) +by PFU, identified by model numbers PD-KB200W/U or PD-KB200B/U. It +uses the replacement Teensy 2.0 board from [my other +project](https://github.com/thirteen37/HHKB-Lite-2-Teensy). + +Make example for this keyboard (after setting up your build environment): + + make hhkb_lite_2:default + +Flashing example for this keyboard: + + make hhkb_lite_2: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). + +## Details + +The `default` keymap is nearly the official standard US QWERTY, except +with the `Delete` key behaving like `BS`, which is as if DIP `SW3` is +set. + +While there are two physical `Fn` keys on the keyboard, they are +electrically indistinguishable (same wiring matrix) so they can not be +assigned different keycodes. diff --git a/keyboards/hhkb_lite_2/rules.mk b/keyboards/hhkb_lite_2/rules.mk new file mode 100644 index 000000000000..dd02717921f2 --- /dev/null +++ b/keyboards/hhkb_lite_2/rules.mk @@ -0,0 +1,23 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +BOOTLOADER = halfkay + +# 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 +BLUETOOTH_ENABLE = no # Enable Bluetooth +AUDIO_ENABLE = no # Audio output +UNICODE_ENABLE = yes From 186b1b2ba2550d9a7a864a241e8f9503c37f188b Mon Sep 17 00:00:00 2001 From: JuanTapMan <68515848+JuanTapMan@users.noreply.github.com> Date: Tue, 18 Aug 2020 01:25:43 -0700 Subject: [PATCH 588/930] function96 keyboard added (#10024) Co-authored-by: James Young <18669334+noroadsleft@users.noreply.github.com> Co-authored-by: Ryan --- keyboards/function96/chconf.h | 711 ++++++++++++++++++ keyboards/function96/config.h | 52 ++ keyboards/function96/function96.c | 17 + keyboards/function96/function96.h | 44 ++ keyboards/function96/halconf.h | 522 +++++++++++++ keyboards/function96/info.json | 12 + keyboards/function96/keymaps/default/keymap.c | 44 ++ .../function96/keymaps/default/readme.md | 3 + keyboards/function96/mcuconf.h | 168 +++++ keyboards/function96/readme.md | 13 + keyboards/function96/rules.mk | 19 + 11 files changed, 1605 insertions(+) create mode 100644 keyboards/function96/chconf.h create mode 100644 keyboards/function96/config.h create mode 100644 keyboards/function96/function96.c create mode 100644 keyboards/function96/function96.h create mode 100644 keyboards/function96/halconf.h create mode 100644 keyboards/function96/info.json create mode 100644 keyboards/function96/keymaps/default/keymap.c create mode 100644 keyboards/function96/keymaps/default/readme.md create mode 100644 keyboards/function96/mcuconf.h create mode 100644 keyboards/function96/readme.md create mode 100644 keyboards/function96/rules.mk diff --git a/keyboards/function96/chconf.h b/keyboards/function96/chconf.h new file mode 100644 index 000000000000..d9e59faf760c --- /dev/null +++ b/keyboards/function96/chconf.h @@ -0,0 +1,711 @@ +/* + 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. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +/** + * @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. + * + * @addtogroup config + * @details Kernel related settings and hooks. + * @{ + */ + +#ifndef CHCONF_H +#define CHCONF_H + +#define _CHIBIOS_RT_CONF_ +#define _CHIBIOS_RT_CONF_VER_6_0_ + +/*===========================================================================*/ +/** + * @name System timers settings + * @{ + */ +/*===========================================================================*/ + +/** + * @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. + * @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. + */ +#if !defined(CH_CFG_ST_TIMEDELTA) +#define CH_CFG_ST_TIMEDELTA 2 +#endif + +/** @} */ + +/*===========================================================================*/ +/** + * @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. + */ +#if !defined(CH_CFG_TIME_QUANTUM) +#define CH_CFG_TIME_QUANTUM 0 +#endif + +/** + * @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. + */ +#if !defined(CH_CFG_MEMCORE_SIZE) +#define CH_CFG_MEMCORE_SIZE 0 +#endif + +/** + * @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. + */ +#if !defined(CH_CFG_NO_IDLE_THREAD) +#define CH_CFG_NO_IDLE_THREAD FALSE +#endif + +/** @} */ + +/*===========================================================================*/ +/** + * @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. + */ +#if !defined(CH_CFG_OPTIMIZE_SPEED) +#define CH_CFG_OPTIMIZE_SPEED FALSE +#endif + +/** @} */ + +/*===========================================================================*/ +/** + * @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. + */ +#if !defined(CH_CFG_USE_TM) +#define CH_CFG_USE_TM FALSE +#endif + +/** + * @brief Threads registry APIs. + * @details If enabled then the registry APIs are included in the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_REGISTRY) +#define CH_CFG_USE_REGISTRY TRUE +#endif + +/** + * @brief Threads synchronization APIs. + * @details If enabled then the @p chThdWait() function is included in + * the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_WAITEXIT) +#define CH_CFG_USE_WAITEXIT TRUE +#endif + +/** + * @brief Semaphores APIs. + * @details If enabled then the Semaphores APIs are included in the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_SEMAPHORES) +#define CH_CFG_USE_SEMAPHORES TRUE +#endif + +/** + * @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. + */ +#if !defined(CH_CFG_USE_SEMAPHORES_PRIORITY) +#define CH_CFG_USE_SEMAPHORES_PRIORITY FALSE +#endif + +/** + * @brief Mutexes APIs. + * @details If enabled then the mutexes APIs are included in the kernel. + * + * @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. + * @note Recursive mutexes are heavier and have an increased + * memory footprint. + * + * @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. + * @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. + */ +#if !defined(CH_CFG_USE_CONDVARS) +#define CH_CFG_USE_CONDVARS TRUE +#endif + +/** + * @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. + */ +#if !defined(CH_CFG_USE_CONDVARS_TIMEOUT) +#define CH_CFG_USE_CONDVARS_TIMEOUT FALSE +#endif + +/** + * @brief Events Flags APIs. + * @details If enabled then the event flags APIs are included in the kernel. + * + * @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. + * @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. + */ +#if !defined(CH_CFG_USE_EVENTS_TIMEOUT) +#define CH_CFG_USE_EVENTS_TIMEOUT TRUE +#endif + +/** + * @brief Synchronous Messages APIs. + * @details If enabled then the synchronous messages APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_MESSAGES) +#define CH_CFG_USE_MESSAGES TRUE +#endif + +/** + * @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. + */ +#if !defined(CH_CFG_USE_MESSAGES_PRIORITY) +#define CH_CFG_USE_MESSAGES_PRIORITY FALSE +#endif + +/** + * @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. + */ +#if !defined(CH_CFG_USE_MAILBOXES) +#define CH_CFG_USE_MAILBOXES TRUE +#endif + +/** + * @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. + */ +#if !defined(CH_CFG_USE_MEMCORE) +#define CH_CFG_USE_MEMCORE TRUE +#endif + +/** + * @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. + */ +#if !defined(CH_CFG_USE_HEAP) +#define CH_CFG_USE_HEAP FALSE +#endif + +/** + * @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. + */ +#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. + * @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. + */ +#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 + +/** @} */ + +/*===========================================================================*/ +/** + * @name Debug options + * @{ + */ +/*===========================================================================*/ + +/** + * @brief Debug option, kernel statistics. + * + * @note The default is @p FALSE. + */ +#if !defined(CH_DBG_STATISTICS) +#define CH_DBG_STATISTICS FALSE +#endif + +/** + * @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. + */ +#if !defined(CH_DBG_SYSTEM_STATE_CHECK) +#define CH_DBG_SYSTEM_STATE_CHECK FALSE +#endif + +/** + * @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. + */ +#if !defined(CH_DBG_ENABLE_CHECKS) +#define CH_DBG_ENABLE_CHECKS FALSE +#endif + +/** + * @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. + */ +#if !defined(CH_DBG_ENABLE_ASSERTS) +#define CH_DBG_ENABLE_ASSERTS FALSE +#endif + +/** + * @brief Debug option, trace buffer. + * @details If enabled then the trace buffer is activated. + * + * @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. + * @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. + */ +#if !defined(CH_DBG_ENABLE_STACK_CHECK) +#define CH_DBG_ENABLE_STACK_CHECK FALSE +#endif + +/** + * @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. + */ +#if !defined(CH_DBG_FILL_THREADS) +#define CH_DBG_FILL_THREADS FALSE +#endif + +/** + * @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. + */ +#if !defined(CH_DBG_THREADS_PROFILING) +#define CH_DBG_THREADS_PROFILING FALSE +#endif + +/** @} */ + +/*===========================================================================*/ +/** + * @name Kernel hooks + * @{ + */ +/*===========================================================================*/ + +/** + * @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. + */ +#define CH_CFG_THREAD_EXTRA_FIELDS \ + /* Add threads custom fields here.*/ + +/** + * @brief Threads initialization hook. + * @details User initialization code added to the @p _thread_init() function. + * + * @note It is invoked from within @p _thread_init() 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/function96/config.h b/keyboards/function96/config.h new file mode 100644 index 000000000000..0656d223e458 --- /dev/null +++ b/keyboards/function96/config.h @@ -0,0 +1,52 @@ +/* +Copyright 2020 Matt3o + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License 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 0x672A +#define DEVICE_VER 0x0001 +#define MANUFACTURER JTM +#define PRODUCT function96 + +/* key matrix size */ +#define MATRIX_ROWS 6 +#define MATRIX_COLS 19 + +/* + * 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 { F1, F0, C15, C14, C13, B9 } +#define MATRIX_COL_PINS { A3, A4, A5, A6, A7, B0, B1, B2, B10, B12, A13, A14, A15, B3, B4, B5, B6, B7, B8} +#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/function96/function96.c b/keyboards/function96/function96.c new file mode 100644 index 000000000000..86b8a6f704e3 --- /dev/null +++ b/keyboards/function96/function96.c @@ -0,0 +1,17 @@ +/* Copyright 2020 Matt3o + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#include "function96.h" diff --git a/keyboards/function96/function96.h b/keyboards/function96/function96.h new file mode 100644 index 000000000000..50cd1fb2bf58 --- /dev/null +++ b/keyboards/function96/function96.h @@ -0,0 +1,44 @@ +/* Copyright 2020 Matt3o + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License 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, 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, K79, K80, K81, K82, K83, K84, K85, K86, K87, \ + K88, K89, K90, K91, K92, K93, K94, K95, K96, K97, K98, K99, K100 \ +) { \ + { 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, KC_NO, K33, K34, K35 , K36}, \ + { K37, K38, K39, K40, K41, K42, K43, K44, K45, K46, K47, K48, K49, KC_NO, K50, K51, K52, K53 , K54}, \ + { K55, K56, K57, K58, K59, K60, K61, K62, K63, K64, K65, K66, KC_NO, K67, KC_NO, K68, K69, K70 , KC_NO}, \ + { K71, K72, K73, K74, K75, K76, K77, K78, K79, K80, K81, KC_NO, K82, KC_NO, K83, K84, K85, K86 , K87}, \ + { K88, K89, KC_NO, K90, K91, KC_NO, K92, KC_NO, K93, KC_NO, K94, K95, KC_NO, K96, K97, K98, K99, K100, KC_NO} \ +} diff --git a/keyboards/function96/halconf.h b/keyboards/function96/halconf.h new file mode 100644 index 000000000000..97696353fdd2 --- /dev/null +++ b/keyboards/function96/halconf.h @@ -0,0 +1,522 @@ +/* + 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. + 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 + +#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 +#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 cryptographic subsystem. + */ +#if !defined(HAL_USE_CRY) || defined(__DOXYGEN__) +#define HAL_USE_CRY FALSE +#endif + +/** + * @brief Enables the DAC subsystem. + */ +#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 +#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 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 +#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 +#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 + +/** + * @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. */ +/*===========================================================================*/ + +/** + * @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 + +/** + * @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. */ +/*===========================================================================*/ + +/** + * @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 the zero-copy API. + */ +#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 + +/** + * @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. */ +/*===========================================================================*/ + +/** + * @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 16 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 256 bytes for both the transmission and receive + * buffers. + */ +#if !defined(SERIAL_USB_BUFFERS_SIZE) || defined(__DOXYGEN__) +#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 + +/*===========================================================================*/ +/* 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 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 +#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. */ +/*===========================================================================*/ + +/** + * @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 + +/*===========================================================================*/ +/* 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/function96/info.json b/keyboards/function96/info.json new file mode 100644 index 000000000000..719aa680160c --- /dev/null +++ b/keyboards/function96/info.json @@ -0,0 +1,12 @@ +{ + "keyboard_name": "function96", + "url": "jtmkeebdesign@gmail.com", + "maintainer": "qmk", + "width": 19, + "height": 6, + "layouts": { + "LAYOUT": { + "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":"Print", "x":13, "y":0}, {"label":"Del", "x":14, "y":0}, {"x":15, "y":0}, {"x":16, "y":0}, {"x":17, "y":0}, {"x":18, "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}, {"x":15, "y":1}, {"label":"/", "x":16, "y":1}, {"label":"*", "x":17, "y":1}, {"label":"-", "x":18, "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":"7", "x":15, "y":2}, {"label":"8", "x":16, "y":2}, {"label":"9", "x":17, "y":2}, {"label":"+", "x":18, "y":2, "h":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":"4", "x":15, "y":3}, {"label":"5", "x":16, "y":3}, {"label":"6", "x":17, "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":"1", "x":15, "y":4}, {"label":"2", "x":16, "y":4}, {"label":"3", "x":17, "y":4}, {"x":18, "y":4, "h":2}, {"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.25}, {"x":6, "y":5, "w":1.25}, {"x":7.25, "y":5, "w":2.75}, {"x":10, "y":5, "w":1.25}, {"x":11.25, "y":5, "w":1.25}, {"label":"\u2190", "x":13, "y":5}, {"label":"\u2193", "x":14, "y":5}, {"label":"\u2192", "x":15, "y":5}, {"label":"0", "x":16, "y":5}, {"x":17, "y":5}] + } + } +} diff --git a/keyboards/function96/keymaps/default/keymap.c b/keyboards/function96/keymaps/default/keymap.c new file mode 100644 index 000000000000..fd7990c37e62 --- /dev/null +++ b/keyboards/function96/keymaps/default/keymap.c @@ -0,0 +1,44 @@ +/* Copyright 2020 Matt3o + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public 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_DEL, KC_MPRV, KC_MNXT, KC_VOLU, KC_VOLD, + 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_MPLY, 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_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_LWIN, KC_LALT, KC_SPC, MO(1), KC_SPC, KC_RALT, MO(2), KC_LEFT, KC_DOWN, KC_RGHT, KC_P0, KC_PDOT + ), + + [1] = LAYOUT( + _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, + _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, + _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, + _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, + _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, + _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______ + ), + [2] = LAYOUT( + _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, + _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, + _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, + _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, + _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, + _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______ + ) +}; diff --git a/keyboards/function96/keymaps/default/readme.md b/keyboards/function96/keymaps/default/readme.md new file mode 100644 index 000000000000..c80df7f7b399 --- /dev/null +++ b/keyboards/function96/keymaps/default/readme.md @@ -0,0 +1,3 @@ +# The Default Function96 Layout + +There are layer buttons assigned as MO(-). Feel free to modify both layers as you choose. diff --git a/keyboards/function96/mcuconf.h b/keyboards/function96/mcuconf.h new file mode 100644 index 000000000000..7c5cd00c2a7c --- /dev/null +++ b/keyboards/function96/mcuconf.h @@ -0,0 +1,168 @@ +/* + 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 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 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/function96/readme.md b/keyboards/function96/readme.md new file mode 100644 index 000000000000..8fde381418c8 --- /dev/null +++ b/keyboards/function96/readme.md @@ -0,0 +1,13 @@ +# Function96 + +This Function96 is a passion project of JTM. It's meant to give the user the maximum usability of the space allocated by the keyboard while also giving the option of using the numpad. + +* Keyboard Maintainer: The QMK Community +* Hardware Supported: Function96 +* Hardware Availability: Limited Groupbuy that ended on 8/14/2020, https://www.reddit.com/r/mechmarket/comments/i7wwh4/gb_function96_prototype/ + +Make example for this keyboard (after setting up your build environment): + + make function96: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/function96/rules.mk b/keyboards/function96/rules.mk new file mode 100644 index 000000000000..48ab62762e28 --- /dev/null +++ b/keyboards/function96/rules.mk @@ -0,0 +1,19 @@ +# MCU name +MCU = STM32F072 + +# 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 +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +BLUETOOTH_ENABLE = no # Enable Bluetooth +AUDIO_ENABLE = no # Audio output From c0df341f5c0db7217838dfb994ccbb6bd2d075fe Mon Sep 17 00:00:00 2001 From: cole smith <38364556+daysgobye@users.noreply.github.com> Date: Tue, 18 Aug 2020 13:46:09 -0600 Subject: [PATCH 589/930] [Keyboard] Boardsource Microdox (#9971) * microdox keyboard workidng * updated readme * cleaned up for pr * Apply suggestions from code review * Apply suggestions from code review * added license headers * Update keyboards/boardsource/microdox/keymaps/default/keymap.c * Update keyboards/boardsource/microdox/rules.mk * Update keyboards/boardsource/microdox/rules.mk * Update keyboards/boardsource/microdox/rules.mk --- keyboards/boardsource/microdox/config.h | 80 ++++++++++++ keyboards/boardsource/microdox/info.json | 56 +++++++++ .../microdox/keymaps/cole/keymap.c | 116 ++++++++++++++++++ .../microdox/keymaps/cole/rules.mk | 1 + .../microdox/keymaps/default/keymap.c | 50 ++++++++ keyboards/boardsource/microdox/microdox.c | 19 +++ keyboards/boardsource/microdox/microdox.h | 37 ++++++ keyboards/boardsource/microdox/readme.md | 13 ++ keyboards/boardsource/microdox/rules.mk | 23 ++++ 9 files changed, 395 insertions(+) create mode 100644 keyboards/boardsource/microdox/config.h create mode 100644 keyboards/boardsource/microdox/info.json create mode 100644 keyboards/boardsource/microdox/keymaps/cole/keymap.c create mode 100644 keyboards/boardsource/microdox/keymaps/cole/rules.mk create mode 100644 keyboards/boardsource/microdox/keymaps/default/keymap.c create mode 100644 keyboards/boardsource/microdox/microdox.c create mode 100644 keyboards/boardsource/microdox/microdox.h create mode 100644 keyboards/boardsource/microdox/readme.md create mode 100644 keyboards/boardsource/microdox/rules.mk diff --git a/keyboards/boardsource/microdox/config.h b/keyboards/boardsource/microdox/config.h new file mode 100644 index 000000000000..65af0f16dee6 --- /dev/null +++ b/keyboards/boardsource/microdox/config.h @@ -0,0 +1,80 @@ +/* +Copyright 2020 Cole Smith + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License 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 0xF7E0 +#define PRODUCT_ID 0x0412 +#define DEVICE_VER 0x0000 +#define MANUFACTURER Boardsource +#define PRODUCT microdox + +/* key matrix size */ +// Rows are doubled-up +#define MATRIX_ROWS 8 +#define MATRIX_COLS 5 +#define MATRIX_ROW_PINS { B2, B6, B4, B5 } + +// wiring of each half +#define MATRIX_COL_PINS { F4, F5, F6, F7, B1 } +#define USE_SERIAL +#define SOFT_SERIAL_PIN D2 +/* 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 + +/* COL2ROW, ROW2COL*/ +#define DIODE_DIRECTION COL2ROW + +/* 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 RGBLIGHT_ANIMATIONS +#define RGB_DI_PIN D3 +#define RGBLED_SPLIT { 6, 6 } +#define EE_HANDS +#ifdef RGBLIGHT_ENABLE +#define RGBLED_NUM 12 // Number of LEDs +#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 \ No newline at end of file diff --git a/keyboards/boardsource/microdox/info.json b/keyboards/boardsource/microdox/info.json new file mode 100644 index 000000000000..fad30399d4ef --- /dev/null +++ b/keyboards/boardsource/microdox/info.json @@ -0,0 +1,56 @@ +{ + "keyboard_name": "microdox", + "url": "https://boardsource.xyz/store/5f2e7e4a2902de7151494f92", + "maintainer": "boardsource", + "width": 13, + "height": 4.7, + "layouts": { + "LAYOUT_split_3x5_3": { + "layout": [ + { "label": "Q", "x": 0, "y": 0.3 }, + { "label": "W", "x": 1, "y": 0.1 }, + { "label": "E", "x": 2, "y": 0 }, + { "label": "R", "x": 3, "y": 0.1 }, + { "label": "T", "x": 4, "y": 0.2 }, + + { "label": "Y", "x": 8, "y": 0.2 }, + { "label": "U", "x": 9, "y": 0.1 }, + { "label": "I", "x": 10, "y": 0 }, + { "label": "O", "x": 11, "y": 0.1 }, + { "label": "P", "x": 12, "y": 0.3 }, + + { "label": "A", "x": 0, "y": 1.3 }, + { "label": "S", "x": 1, "y": 1.1 }, + { "label": "D", "x": 2, "y": 1 }, + { "label": "F", "x": 3, "y": 1.1 }, + { "label": "G", "x": 4, "y": 1.2 }, + + { "label": "H", "x": 8, "y": 1.2 }, + { "label": "J", "x": 9, "y": 1.1 }, + { "label": "K", "x": 10, "y": 1 }, + { "label": "L", "x": 11, "y": 1.1 }, + { "label": ";", "x": 12, "y": 1.3 }, + + { "label": "Z", "x": 0, "y": 2.3 }, + { "label": "X", "x": 1, "y": 2.1 }, + { "label": "C", "x": 2, "y": 2 }, + { "label": "V", "x": 3, "y": 2.1 }, + { "label": "B", "x": 4, "y": 2.2 }, + + { "label": "N", "x": 8, "y": 2.2 }, + { "label": "M", "x": 9, "y": 2.1 }, + { "label": ",", "x": 10, "y": 2 }, + { "label": ".", "x": 11, "y": 2.1 }, + { "label": "/", "x": 12, "y": 2.3 }, + + { "label": "GUI / KC_HANJ", "x": 3, "y": 3.7 }, + { "label": "Lower", "x": 4, "y": 3.7 }, + { "label": "Space", "x": 5, "y": 3.2 }, + + { "label": "Enter", "x": 7, "y": 3.2 }, + { "label": "Raise", "x": 8, "y": 3.7 }, + { "label": "Alt / KC_HAEN", "x": 9, "y": 3.7 } + ] + } + } +} diff --git a/keyboards/boardsource/microdox/keymaps/cole/keymap.c b/keyboards/boardsource/microdox/keymaps/cole/keymap.c new file mode 100644 index 000000000000..62d728000018 --- /dev/null +++ b/keyboards/boardsource/microdox/keymaps/cole/keymap.c @@ -0,0 +1,116 @@ +/* +Copyright 2020 Cole Smith + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public 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 "split_util.h" + +enum layers { + _QWERTY, + _RAISE, + _LOWER, + _ADJUST +}; + +#define KC_CTSC RCTL_T(KC_SCLN) +#define LOWER_SPC LT(_LOWER, KC_SPC) +#define RASE_BACK LT(_RAISE, KC_BSPC) +#define SHFT_Z MT(MOD_LSFT, KC_Z) +#define SHIFT_SLASH MT(MOD_RSFT,KC_SLSH) +#define RASE_ENT LT(_RAISE, KC_ENT) +#define CTRL_A MT(MOD_LCTL,KC_A) +#define PREVWINDOW MT(MOD_LCTL, KC_LEFT) +#define NEXTWINDOW MT(MOD_LCTL, KC_RGHT) + + + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_QWERTY] = LAYOUT_split_3x5_3( + KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, + CTRL_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_CTSC, + SHFT_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, SHIFT_SLASH, + MO(_LOWER),KC_LGUI, RASE_ENT, RASE_BACK, LOWER_SPC, KC_TAB + ), + [_RAISE] = LAYOUT_split_3x5_3( + KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, + KC_ESC, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_QUOT, + KC_LSFT, KC_GRV, PREVWINDOW, NEXTWINDOW, XXXXXXX, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, + _______, KC_LGUI, KC_ENT, KC_BSPC, KC_SPC, _______ + ), + [_LOWER] = LAYOUT_split_3x5_3( + KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, + KC_ESC, XXXXXXX, XXXXXXX, XXXXXXX, RGB_TOG, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_DQT, + KC_ESC, KC_TILD, PREVWINDOW, NEXTWINDOW, RGB_MODE_FORWARD, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, + _______, KC_LGUI, KC_ENT, KC_BSPC, KC_SPC, _______ + ) +}; + +#ifdef OLED_DRIVER_ENABLE +oled_rotation_t oled_init_user(oled_rotation_t rotation) { + if (is_keyboard_master()) + return OLED_ROTATION_180; + return rotation; +} + +static void render_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); +} + +static void render_status(void) { + switch (get_highest_layer(layer_state)) { + case _QWERTY: + oled_write_P(PSTR("B R L A O\n"), false); + oled_write_P(PSTR("^\n"), false); + oled_write_P(PSTR("Layer: Base\n"), false); + break; + case _RAISE: + oled_write_P(PSTR("B R L A O\n"), false); + oled_write_P(PSTR(" ^\n"), false); + oled_write_P(PSTR("Layer: Raise\n"), false); + break; + case _LOWER: + oled_write_P(PSTR("B R L A O\n"), false); + oled_write_P(PSTR(" ^\n"), false); + oled_write_P(PSTR("Layer: Lower\n"), false); + break; + case _ADJUST: + oled_write_P(PSTR("B R L A O\n"), false); + oled_write_P(PSTR(" ^\n"), false); + oled_write_P(PSTR("Layer: Adjust\n"), false); + break; + default: + oled_write_P(PSTR("B R L A O"), false); + oled_write_P(PSTR(" ^\n"), false); + oled_write_P(PSTR("Layer: Other\n"), false); + } +} + +void oled_task_user(void) { + if (is_keyboard_master()) { + render_status(); + } else { + render_logo(); + oled_scroll_left(); + } +} + +#endif diff --git a/keyboards/boardsource/microdox/keymaps/cole/rules.mk b/keyboards/boardsource/microdox/keymaps/cole/rules.mk new file mode 100644 index 000000000000..48a51b225024 --- /dev/null +++ b/keyboards/boardsource/microdox/keymaps/cole/rules.mk @@ -0,0 +1 @@ +OLED_DRIVER_ENABLE = yes \ No newline at end of file diff --git a/keyboards/boardsource/microdox/keymaps/default/keymap.c b/keyboards/boardsource/microdox/keymaps/default/keymap.c new file mode 100644 index 000000000000..06322be0b76d --- /dev/null +++ b/keyboards/boardsource/microdox/keymaps/default/keymap.c @@ -0,0 +1,50 @@ +/* +Copyright 2020 Cole Smith + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public 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, + _RAISE, + _LOWER, +}; + +#define RAISE MO(_RAISE) +#define LOWER MO(_LOWER) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +[_QWERTY] = LAYOUT_split_3x5_3( + 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_LCTL, LOWER, KC_SPC, KC_BSPC, RAISE, KC_ENT +), + +[_RAISE] = LAYOUT_split_3x5_3( + KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, + KC_TAB, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, XXXXXXX, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, + KC_LCTL, KC_GRV, KC_LGUI, KC_LALT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_BSLS, KC_QUOT, + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX +), + +[_LOWER] = LAYOUT_split_3x5_3( + KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, + KC_ESC, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, + KC_CAPS, KC_TILD, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_PIPE, KC_DQT, + XXXXXXX, XXXXXXX, XXXXXXX, KC_ENT, XXXXXXX, KC_DEL +) +}; diff --git a/keyboards/boardsource/microdox/microdox.c b/keyboards/boardsource/microdox/microdox.c new file mode 100644 index 000000000000..eef981297afe --- /dev/null +++ b/keyboards/boardsource/microdox/microdox.c @@ -0,0 +1,19 @@ +/* +Copyright 2020 Cole Smith + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#include "microdox.h" + diff --git a/keyboards/boardsource/microdox/microdox.h b/keyboards/boardsource/microdox/microdox.h new file mode 100644 index 000000000000..950d46d99f74 --- /dev/null +++ b/keyboards/boardsource/microdox/microdox.h @@ -0,0 +1,37 @@ +/* +Copyright 2020 Cole Smith + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License 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_split_3x5_3(\ + k01, k02, k03, k04, k05, k45, k44, k43, k42, k41, \ + k11, k12, k13, k14, k15, k55, k54, k53, k52, k51, \ + k21, k22, k23, k24, k25, k65, k64, k63, k62, k61, \ + k33, k34, k35, k75, k74, k73 \ + ) \ + { \ + { k01, k02, k03, k04, k05 }, \ + { k11, k12, k13, k14, k15 }, \ + { k21, k22, k23, k24, k25 }, \ + { KC_NO,KC_NO, k33, k34, k35 }, \ + { k41, k42, k43, k44, k45 }, \ + { k51, k52, k53, k54, k55 }, \ + { k61, k62, k63, k64, k65 }, \ + { KC_NO, KC_NO, k73, k74, k75 } \ + } diff --git a/keyboards/boardsource/microdox/readme.md b/keyboards/boardsource/microdox/readme.md new file mode 100644 index 000000000000..7b54283674a0 --- /dev/null +++ b/keyboards/boardsource/microdox/readme.md @@ -0,0 +1,13 @@ +# Microdox + +![boardsource Microdox](https://i.imgur.com/AliShkvl.jpg) + +* Keyboard Maintainer: [Boardsource](https://github.com/daysgobye) +* Hardware Supported: microdox v1 +* Hardware Availability: this keyboard is available from the [Boardsource store](https://boardsource.xyz/store/5f2e7e4a2902de7151494f92) + +Make example for this keyboard (after setting up your build environment): + + make boardsource/microdox: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/boardsource/microdox/rules.mk b/keyboards/boardsource/microdox/rules.mk new file mode 100644 index 000000000000..b6afb77c7830 --- /dev/null +++ b/keyboards/boardsource/microdox/rules.mk @@ -0,0 +1,23 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +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 +BLUETOOTH_ENABLE = no # Enable Bluetooth +AUDIO_ENABLE = no # Audio output +SPLIT_KEYBOARD = yes From 0e542b297ddeff908d5b8f4a28730e2189421720 Mon Sep 17 00:00:00 2001 From: Nick Blyumberg Date: Tue, 18 Aug 2020 16:10:43 -0400 Subject: [PATCH 590/930] Super16 VIA support (#10076) * Added via support for Super16 --- keyboards/1upkeyboards/super16/config.h | 4 +- .../1upkeyboards/super16/keymaps/via/keymap.c | 37 +++++++++++++++++++ .../1upkeyboards/super16/keymaps/via/rules.mk | 2 + 3 files changed, 41 insertions(+), 2 deletions(-) create mode 100644 keyboards/1upkeyboards/super16/keymaps/via/keymap.c create mode 100644 keyboards/1upkeyboards/super16/keymaps/via/rules.mk diff --git a/keyboards/1upkeyboards/super16/config.h b/keyboards/1upkeyboards/super16/config.h index f5cc77159fc1..3f0d468b7b93 100644 --- a/keyboards/1upkeyboards/super16/config.h +++ b/keyboards/1upkeyboards/super16/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 0x2010 +#define VENDOR_ID 0x6F75 // "ou" +#define PRODUCT_ID 0x5516 // "U" 16 #define DEVICE_VER 0x0001 #define MANUFACTURER 1upkeyboards #define PRODUCT super16 diff --git a/keyboards/1upkeyboards/super16/keymaps/via/keymap.c b/keyboards/1upkeyboards/super16/keymaps/via/keymap.c new file mode 100644 index 000000000000..bd3466814a88 --- /dev/null +++ b/keyboards/1upkeyboards/super16/keymaps/via/keymap.c @@ -0,0 +1,37 @@ +#include QMK_KEYBOARD_H + + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_ortho_4x4( + KC_7, KC_8, KC_9, KC_ASTR, + KC_4, KC_5, KC_6, KC_SLSH, + KC_1, KC_2, KC_3, KC_MINS, + KC_0, KC_ENT, KC_DOT, MO(1) + ), + + [1] = LAYOUT_ortho_4x4( + 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 + ), + + [2] = LAYOUT_ortho_4x4( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + 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_4x4( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + 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/super16/keymaps/via/rules.mk b/keyboards/1upkeyboards/super16/keymaps/via/rules.mk new file mode 100644 index 000000000000..36b7ba9cbc98 --- /dev/null +++ b/keyboards/1upkeyboards/super16/keymaps/via/rules.mk @@ -0,0 +1,2 @@ +VIA_ENABLE = yes +LTO_ENABLE = yes From 66de3308e5b17c0c59692b2660f2ce3a33c99863 Mon Sep 17 00:00:00 2001 From: Blake Date: Tue, 18 Aug 2020 21:45:33 +0100 Subject: [PATCH 591/930] [Keyboard] Bento handwired macro pad (#9973) * [Keyboard] Add ghostseven/bento * Correct attribution, Dwin17 * Formatting change * Markdown formating * Update keyboards/ghostseven/bento/info.json * Update keyboards/ghostseven/bento/readme.md * Update keyboards/ghostseven/bento/rev1/config.h * Update keyboards/ghostseven/bento/rev1/rules.mk * Update keyboards/ghostseven/bento/rev1/rules.mk * Update keyboards/ghostseven/bento/rev1/rules.mk * Update keyboards/ghostseven/bento/rev1/rules.mk * Update keyboards/ghostseven/bento/rev1/config.h * Update keyboards/ghostseven/bento/rev1/rev1.c * Update keyboards/ghostseven/bento/rev1/rev1.c * Update keyboards/ghostseven/bento/rev1/config.h * Update keyboards/ghostseven/bento/rev1/rules.mk * Update keyboards/ghostseven/bento/readme.md * Delete config.h * Delete config.h * Update rules.mk * Rename keyboards/ghostseven/bento/readme.md to keyboards/handwired/bento/readme.md * Rename keyboards/ghostseven/bento/rules.mk to keyboards/handwired/bento/rules.mk * Rename keyboards/ghostseven/bento/info.json to keyboards/handwired/bento/info.json * Rename keyboards/ghostseven/bento/bento.h to keyboards/handwired/bento/bento.h * Rename keyboards/ghostseven/bento/bento.c to keyboards/handwired/bento/bento.c * Rename keyboards/ghostseven/bento/rev1/rules.mk to keyboards/handwired/bento/rev1/rules.mk * Rename keyboards/ghostseven/bento/rev1/rev1.h to keyboards/handwired/bento/rev1/rev1.h * Rename keyboards/ghostseven/bento/rev1/rev1.c to keyboards/handwired/bento/rev1/rev1.c * Rename keyboards/ghostseven/bento/rev1/config.h to keyboards/handwired/bento/rev1/config.h * Rename keyboards/ghostseven/bento/keymaps/default/keymap.c to keyboards/handwired/bento/keymaps/default/keymap.c * Update bento.h * Change make location to handwired dir. * added alt keymap submited by cbc02009 * Added mac dev keymap * Licence updates --- keyboards/handwired/bento/bento.c | 16 +++++ keyboards/handwired/bento/bento.h | 20 +++++++ keyboards/handwired/bento/info.json | 19 ++++++ .../handwired/bento/keymaps/cbc02009/keymap.c | 41 +++++++++++++ .../handwired/bento/keymaps/default/keymap.c | 50 ++++++++++++++++ .../handwired/bento/keymaps/mac/keymap.c | 54 +++++++++++++++++ keyboards/handwired/bento/readme.md | 15 +++++ keyboards/handwired/bento/rev1/config.h | 59 +++++++++++++++++++ keyboards/handwired/bento/rev1/rev1.c | 28 +++++++++ keyboards/handwired/bento/rev1/rev1.h | 36 +++++++++++ keyboards/handwired/bento/rev1/rules.mk | 23 ++++++++ keyboards/handwired/bento/rules.mk | 1 + 12 files changed, 362 insertions(+) create mode 100644 keyboards/handwired/bento/bento.c create mode 100644 keyboards/handwired/bento/bento.h create mode 100644 keyboards/handwired/bento/info.json create mode 100644 keyboards/handwired/bento/keymaps/cbc02009/keymap.c create mode 100644 keyboards/handwired/bento/keymaps/default/keymap.c create mode 100644 keyboards/handwired/bento/keymaps/mac/keymap.c create mode 100644 keyboards/handwired/bento/readme.md create mode 100644 keyboards/handwired/bento/rev1/config.h create mode 100644 keyboards/handwired/bento/rev1/rev1.c create mode 100644 keyboards/handwired/bento/rev1/rev1.h create mode 100644 keyboards/handwired/bento/rev1/rules.mk create mode 100644 keyboards/handwired/bento/rules.mk diff --git a/keyboards/handwired/bento/bento.c b/keyboards/handwired/bento/bento.c new file mode 100644 index 000000000000..904e0e5b6508 --- /dev/null +++ b/keyboards/handwired/bento/bento.c @@ -0,0 +1,16 @@ +/* Copyright 2020 GhostSeven + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#include "bento.h" diff --git a/keyboards/handwired/bento/bento.h b/keyboards/handwired/bento/bento.h new file mode 100644 index 000000000000..106882860a8a --- /dev/null +++ b/keyboards/handwired/bento/bento.h @@ -0,0 +1,20 @@ +/* Copyright 2020 GhostSeven + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#pragma once + +#ifdef KEYBOARD_handwired_bento_rev1 + #include "rev1.h" +#endif diff --git a/keyboards/handwired/bento/info.json b/keyboards/handwired/bento/info.json new file mode 100644 index 000000000000..8339c6da35b0 --- /dev/null +++ b/keyboards/handwired/bento/info.json @@ -0,0 +1,19 @@ +{ + "keyboard_name": "Bento Macropad", + "url": "https://www.thingiverse.com/thing:4416966", + "maintainer": "Ghostseven", + "width": 3, + "height": 2, + "layouts": { + "LAYOUT": { + "layout": [ + {"x":0, "y":0}, + {"x":1, "y":0}, + {"x":2, "y":0}, + {"x":0, "y":1}, + {"x":1, "y":1}, + {"x":2, "y":1} + ] + } + } +} diff --git a/keyboards/handwired/bento/keymaps/cbc02009/keymap.c b/keyboards/handwired/bento/keymaps/cbc02009/keymap.c new file mode 100644 index 000000000000..169e0f1dd372 --- /dev/null +++ b/keyboards/handwired/bento/keymaps/cbc02009/keymap.c @@ -0,0 +1,41 @@ +/* Copyright 2019 cbc02009 + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public 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 1 + * ,---------------+-------. + * |KC_MPRV|KC_MNXT|KC_MUTE| + * |-------+-------+-------, + * |KC_MPLY|KC_MSTP|KC_MUTE| + * `-------+-------+-------' + */ +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT(KC_MPRV, KC_MNXT, KC_MUTE, KC_MPLY, KC_MSTP, KC_MUTE) +}; + +#ifdef ENCODER_ENABLE +#include "encoder.h" +void encoder_update_user(int8_t index, bool clockwise) { + if (index == 0) { /* First encoder */ + if (clockwise) { + tap_code(KC_VOLU); + } else { + tap_code(KC_VOLD); + } + } +} +#endif diff --git a/keyboards/handwired/bento/keymaps/default/keymap.c b/keyboards/handwired/bento/keymaps/default/keymap.c new file mode 100644 index 000000000000..6a2cfa682f3b --- /dev/null +++ b/keyboards/handwired/bento/keymaps/default/keymap.c @@ -0,0 +1,50 @@ +/* Copyright 2020 GhostSeven + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public 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 encoder_names { + _ENCODER +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* + | | | Knob 1: Vol Dn/Up | + | Hold: Layer 2 | Up | Press: Mute | + | Left | Down | Right | + */ + [0] = LAYOUT( + MO(1), KC_UP, KC_MUTE, + KC_LEFT, KC_DOWN, KC_RGHT + ), + /* + | Held: Layer 2 | Home | RESET | + | Media Previous | End | Media Next | + */ + [1] = LAYOUT( + _______, KC_HOME, RESET, + KC_MPRV, KC_END , KC_MNXT + ), +}; + +void encoder_update_user(uint8_t index, bool clockwise) { + if (index == _ENCODER) { + if (clockwise) { + tap_code(KC_VOLU); + } else { + tap_code(KC_VOLD); + } + } +} diff --git a/keyboards/handwired/bento/keymaps/mac/keymap.c b/keyboards/handwired/bento/keymaps/mac/keymap.c new file mode 100644 index 000000000000..29a7e809fc36 --- /dev/null +++ b/keyboards/handwired/bento/keymaps/mac/keymap.c @@ -0,0 +1,54 @@ +/* Copyright 2020 GhostSeven + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public 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 // Base layer +#define _CODE 1 // Code layer + +enum encoder_names { + _ENCODER +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* 0: Base Layer + * Media Prev / Hold L1 | Media Next | Mute + * Move Space Left | Mission Control | Move Space Right */ + [_BASE] = LAYOUT( + LT(_CODE, KC_MPRV), KC_MNXT, KC_MUTE, + C(KC_LEFT), C(KC_UP), C(KC_RIGHT) + ), + + + /* 1: Code layer + * ---- | Shift+CMD+B (Build VS Code) | DFU Mode + * Shift+CMD+C (FF Console) | Ctrl+Alt+U (Upload PIO) | Ctrl+Alt+S (Serial PIO) */ + [_CODE] = LAYOUT( + _______, S(G(KC_B)), RESET, + G(A(KC_C)), C(A(KC_U)), C(A(KC_S)) + ), +}; + + +void encoder_update_user(uint8_t index, bool clockwise) { + if (index == _ENCODER) { + if (clockwise) { + tap_code(KC_VOLU); + } else { + tap_code(KC_VOLD); + } + } +} + + diff --git a/keyboards/handwired/bento/readme.md b/keyboards/handwired/bento/readme.md new file mode 100644 index 000000000000..0c1373414168 --- /dev/null +++ b/keyboards/handwired/bento/readme.md @@ -0,0 +1,15 @@ +# BENTO + +![BENTO](https://cdn.thingiverse.com/assets/0b/6a/84/9c/9a/large_display_IMG_3374.jpg) + +A hand wired 2x3 macropad with a rotary encoder at the upper right corner. + +* Keyboard Maintainer: [Dwin17](https://www.thingiverse.com/dwin17) - Hardware [GhostSeven](https://github.com/ghostseven) - QMK Firmware +* Hardware Supported: Pro Micro, Elite-C, Proton C +* Hardware Availability: [Thingiverse](https://www.thingiverse.com/thing:4416966) + +Make example for this keyboard (after setting up your build environment): + + make handwired/bento/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/handwired/bento/rev1/config.h b/keyboards/handwired/bento/rev1/config.h new file mode 100644 index 000000000000..9bb7ef666da0 --- /dev/null +++ b/keyboards/handwired/bento/rev1/config.h @@ -0,0 +1,59 @@ +/* Copyright 2020 GhostSeven + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License 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 0xDAD3 +#define DEVICE_VER 0x0100 +#define MANUFACTURER GhostSeven +#define PRODUCT Bento Macropad Rev. 1 + +/* key matrix size */ +#define MATRIX_ROWS 2 +#define MATRIX_COLS 3 + +/* Keyboard Matrix Assignments */ +#define DIRECT_PINS { \ + { D7, B1, D2 }, \ + { E6, B4, B2 } \ +} + +#define ENCODERS_PAD_A { D1 } +#define ENCODERS_PAD_B { D0 } + +#define RGB_DI_PIN D3 +#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 +#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 diff --git a/keyboards/handwired/bento/rev1/rev1.c b/keyboards/handwired/bento/rev1/rev1.c new file mode 100644 index 000000000000..8f195d3ef8d5 --- /dev/null +++ b/keyboards/handwired/bento/rev1/rev1.c @@ -0,0 +1,28 @@ +/* Copyright 2020 GhostSeven + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public 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" + +void eeconfig_init_kb(void) { +#ifdef RGBLIGHT_ENABLE + rgblight_enable(); // Enable RGB by default + rgblight_sethsv(0, 255, 255); // Set default HSV - red hue, full saturation, full brightness +#ifdef RGBLIGHT_ANIMATIONS + rgblight_mode(RGBLIGHT_MODE_RAINBOW_SWIRL + 2); // set to RGB_RAINBOW_SWIRL by default +#endif +#endif + + eeconfig_init_user(); +} diff --git a/keyboards/handwired/bento/rev1/rev1.h b/keyboards/handwired/bento/rev1/rev1.h new file mode 100644 index 000000000000..a0b8ce2796c8 --- /dev/null +++ b/keyboards/handwired/bento/rev1/rev1.h @@ -0,0 +1,36 @@ +/* Copyright 2020 GhostSeven + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License 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 "bento.h" +#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( \ + KA1, KA2, KA3, \ + KB1, KB2, KB3 \ +) \ +{ \ + { KA1, KA2, KA3 }, \ + { KB1, KB2, KB3 } \ +} diff --git a/keyboards/handwired/bento/rev1/rules.mk b/keyboards/handwired/bento/rev1/rules.mk new file mode 100644 index 000000000000..f7e3ef1e9799 --- /dev/null +++ b/keyboards/handwired/bento/rev1/rules.mk @@ -0,0 +1,23 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +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 +BLUETOOTH_ENABLE = no # Enable Bluetooth +AUDIO_ENABLE = no # Audio output +ENCODER_ENABLE = yes diff --git a/keyboards/handwired/bento/rules.mk b/keyboards/handwired/bento/rules.mk new file mode 100644 index 000000000000..e160faab83c4 --- /dev/null +++ b/keyboards/handwired/bento/rules.mk @@ -0,0 +1 @@ +DEFAULT_FOLDER = handwired/bento/rev1 From f99f46773eb13ba4673240dcf5c8b0e3b4b413fd Mon Sep 17 00:00:00 2001 From: Evgenii <59191442+greenjack-z@users.noreply.github.com> Date: Wed, 19 Aug 2020 00:24:50 +0300 Subject: [PATCH 592/930] [Keyboard] zErgo handwired (#9990) * Create readme.md * Add files via upload * Update readme.md * Create info.json * Update info.json * Update and rename kb.c to zergo.c * Rename kb.h to zergo.h * Add files via upload * Update keymap.c * Update config.h * Update zergo.c * Update zergo.h * Update rules.mk * Update keymap.c * Rename Makefile to makefile * Update zergo.c * Update zergo.h * Update keymap.c * Update config.h * Update config.h * Update zergo.h * Update rules.mk * Update rules.mk * Update config.h * Update keyboards/handwired/zergo/keymap.c * Update keyboards/handwired/zergo/keymap.c * Update keyboards/handwired/zergo/zergo.h * Update keyboards/handwired/zergo/keymap.c * Update keyboards/handwired/zergo/keymap.c * Update keyboards/handwired/zergo/rules.mk * Update keyboards/handwired/zergo/keymap.c * Update readme.md * Update readme.md * Update keyboards/handwired/zergo/readme.md * Update readme.md * Update keyboards/handwired/zergo/config.h * Update keyboards/handwired/zergo/config.h * Update keyboards/handwired/zergo/info.json * Update readme.md * Update keyboards/handwired/zergo/readme.md * Update keyboards/handwired/zergo/readme.md * Delete makefile --- keyboards/handwired/zergo/config.h | 50 ++++++++++++++++ keyboards/handwired/zergo/info.json | 93 +++++++++++++++++++++++++++++ keyboards/handwired/zergo/keymap.c | 37 ++++++++++++ keyboards/handwired/zergo/readme.md | 19 ++++++ keyboards/handwired/zergo/rules.mk | 22 +++++++ keyboards/handwired/zergo/zergo.c | 17 ++++++ keyboards/handwired/zergo/zergo.h | 35 +++++++++++ 7 files changed, 273 insertions(+) create mode 100644 keyboards/handwired/zergo/config.h create mode 100644 keyboards/handwired/zergo/info.json create mode 100644 keyboards/handwired/zergo/keymap.c create mode 100644 keyboards/handwired/zergo/readme.md create mode 100644 keyboards/handwired/zergo/rules.mk create mode 100644 keyboards/handwired/zergo/zergo.c create mode 100644 keyboards/handwired/zergo/zergo.h diff --git a/keyboards/handwired/zergo/config.h b/keyboards/handwired/zergo/config.h new file mode 100644 index 000000000000..55fbd280c452 --- /dev/null +++ b/keyboards/handwired/zergo/config.h @@ -0,0 +1,50 @@ +/* +Copyright 2020 E.Zelianin + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License 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 0xB92B +#define DEVICE_VER 0x0001 +#define MANUFACTURER GreenJack +#define PRODUCT zErgo + +/* key matrix size */ +#define MATRIX_ROWS 6 +#define MATRIX_COLS 14 + +/* key matrix pins */ +#define MATRIX_ROW_PINS { B1, D7, C3, D6, D5, D4 } +#define MATRIX_COL_PINS { C7, C6, C5, C4, C2, C1, B7, D3, D2, B6, B5, B4, B3, B2 } +#define UNUSED_PINS + +/* COL2ROW or ROW2COL */ +#define DIODE_DIRECTION COL2ROW + +/* number of backlight levels */ + +/* 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/zergo/info.json b/keyboards/handwired/zergo/info.json new file mode 100644 index 000000000000..0bbb867ad89d --- /dev/null +++ b/keyboards/handwired/zergo/info.json @@ -0,0 +1,93 @@ +{ + "keyboard_name": "zergo", + "url": "", + "maintainer": "greenjack", + "width": 15, + "height": 6.25, + "layouts": { + "LAYOUT": { + "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":"Home", "x":0, "y":1.25}, + {"label":"~", "x":1, "y":1.25}, + {"label":"!", "x":2, "y":1.25}, + {"label":"@", "x":3, "y":1.25}, + {"label":"#", "x":4, "y":1.25}, + {"label":"$", "x":5, "y":1.25}, + {"label":"%", "x":6, "y":1.25}, + {"label":"^", "x":7, "y":1.25}, + {"label":"&", "x":8, "y":1.25}, + {"label":"*", "x":9, "y":1.25}, + {"label":"(", "x":10, "y":1.25}, + {"label":")", "x":11, "y":1.25}, + {"label":"_", "x":12, "y":1.25}, + {"label":"+", "x":13, "y":1.25}, + {"label":"PgUp", "x":14, "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":"}", "x":6.5, "y":2.25}, + {"label":"Y", "x":7.5, "y":2.25}, + {"label":"U", "x":8.5, "y":2.25}, + {"label":"I", "x":9.5, "y":2.25}, + {"label":"O", "x":10.5, "y":2.25}, + {"label":"P", "x":11.5, "y":2.25}, + {"label":"{", "x":12.5, "y":2.25}, + {"label":"|", "x":13.5, "y":2.25, "w":1.5}, + {"label":"Ctrl", "x":0, "y":3.25, "w":1.25}, + {"label":"A", "x":1.25, "y":3.25}, + {"label":"S", "x":2.25, "y":3.25}, + {"label":"D", "x":3.25, "y":3.25}, + {"label":"F", "x":4.25, "y":3.25}, + {"label":"G", "x":5.25, "y":3.25}, + {"label":"H", "x":7.75, "y":3.25}, + {"label":"J", "x":8.75, "y":3.25}, + {"label":"K", "x":9.75, "y":3.25}, + {"label":"L", "x":10.75, "y":3.25}, + {"label":":", "x":11.75, "y":3.25}, + {"label":"\"", "x":12.75, "y":3.25}, + {"label":"Ctrl", "x":13.75, "y":3.25, "w":1.25}, + {"label":"End", "x":0, "y":4.25}, + {"label":"\u2191", "x":1, "y":4.25}, + {"label":"Z", "x":2, "y":4.25}, + {"label":"X", "x":3, "y":4.25}, + {"label":"C", "x":4, "y":4.25}, + {"label":"V", "x":5, "y":4.25}, + {"label":"Enter", "x":6, "y":4.25, "w":2}, + {"label":"B", "x":8, "y":4.25}, + {"label":"N", "x":9, "y":4.25}, + {"label":"M", "x":10, "y":4.25}, + {"label":"<", "x":11, "y":4.25}, + {"label":">", "x":12, "y":4.25}, + {"label":"?", "x":13, "y":4.25}, + {"label":"PgDn", "x":14, "y":4.25}, + {"label":"\u2190", "x":0, "y":5.25}, + {"label":"\u2193", "x":1, "y":5.25}, + {"label":"\u2192", "x":2, "y":5.25}, + {"label":"Alt", "x":3, "y":5.25, "w":1.25}, + {"label":"Space", "x":4.25, "y":5.25, "w":2.25}, + {"label":"Bsp", "x":6.5, "y":5.25}, + {"label":"Space", "x":7.5, "y":5.25, "w":2.75}, + {"label":"Alt", "x":10.25, "y":5.25, "w":1.25}, + {"label":"Win", "x":11.5, "y":5.25, "w":1.25}, + {"label":"Menu", "x":12.75, "y":5.25, "w":1.25}, + {"label":"Fn", "x":14, "y":5.25} + ] + } + } +} diff --git a/keyboards/handwired/zergo/keymap.c b/keyboards/handwired/zergo/keymap.c new file mode 100644 index 000000000000..d0f7b750ec3a --- /dev/null +++ b/keyboards/handwired/zergo/keymap.c @@ -0,0 +1,37 @@ +/* Copyright 2020 E.Zelianin + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public 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_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_GRV, KC_1, KC_2, KC_3, KC_4, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_PGUP, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_5, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_BSLS, + KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_RBRC, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_LCTL, + MT(MOD_LSFT, KC_END), KC_UP, KC_Z, KC_X, KC_C, KC_V, KC_ENT, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, MT(MOD_LSFT, KC_PGDN), + KC_LEFT, KC_DOWN, KC_RGHT, KC_LALT, KC_SPC, KC_BSPC, KC_SPC, KC_RALT, KC_LGUI, KC_RGUI, LT(1, KC_NO)), + + LAYOUT( + TG(1), 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_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_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), + +}; diff --git a/keyboards/handwired/zergo/readme.md b/keyboards/handwired/zergo/readme.md new file mode 100644 index 000000000000..fa412e51509d --- /dev/null +++ b/keyboards/handwired/zergo/readme.md @@ -0,0 +1,19 @@ +# zErgo + +![Imgur](https://i.imgur.com/XbyhGeY.png) + +A compact 70% (15x6) keyboard inspired by the Katana60 project, but with F keys and adopted for the Russian layout. + +* Keyboard Maintainer: [Greenjack](https://github.com/greenjack-z) +* Hardware Supported: zErgo PCB, Teensy 2.0++ +* Hardware Availability: prototype self-made hardware + +Make example for this keyboard (after setting up your build environment): + + make handwired/zergo:default + +Flashing example for this keyboard: + + make handwired/zergo: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). diff --git a/keyboards/handwired/zergo/rules.mk b/keyboards/handwired/zergo/rules.mk new file mode 100644 index 000000000000..e633ab396d5e --- /dev/null +++ b/keyboards/handwired/zergo/rules.mk @@ -0,0 +1,22 @@ +# MCU name +MCU = at90usb1286 + +# Bootloader selection +BOOTLOADER = halfkay + +# 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 = no # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +BLUETOOTH_ENABLE = no # Enable Bluetooth +AUDIO_ENABLE = no # Audio output diff --git a/keyboards/handwired/zergo/zergo.c b/keyboards/handwired/zergo/zergo.c new file mode 100644 index 000000000000..8b283d126ce6 --- /dev/null +++ b/keyboards/handwired/zergo/zergo.c @@ -0,0 +1,17 @@ +/* Copyright 2020 E.Zelianin + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#include "zergo.h" diff --git a/keyboards/handwired/zergo/zergo.h b/keyboards/handwired/zergo/zergo.h new file mode 100644 index 000000000000..b4daeff76515 --- /dev/null +++ b/keyboards/handwired/zergo/zergo.h @@ -0,0 +1,35 @@ +/* Copyright 2020 E.Zelianin + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License 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, 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, K403, K404, K405, K406, K407, K408, K409, K410, K411, K412, K413, \ + K500, K501, K502, K503, K505, K506, K507, K509, K511, K512, K513 \ +) { \ + { K000, KC_NO, 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, K403, K404, K405, K406, K407, K408, K409, K410, K411, K412, K413 }, \ + { K500, K501, K502, K503, KC_NO, K505, K506, K507, KC_NO, K509, KC_NO, K511, K512, K513 } \ +} From 03090d657148dcad87f4ad51bba4a13f078a8083 Mon Sep 17 00:00:00 2001 From: JesseLeung97 <44124944+JesseLeung97@users.noreply.github.com> Date: Tue, 18 Aug 2020 17:28:25 -0400 Subject: [PATCH 593/930] [Keyboard] generic_panda/panda65_01 (#10006) * First commit * Added ChibiOS files * renamed files to remove capital letters * Fixed layout references * fixed image reference * Fixing errors * Fixed config.h * changed second up to fn key * renamed files and added beginning of via compatibility * renamed keyboard * removed vscode files * fixing files for via compatibility * adding via files * working via compatibility * Update readme.md * Update readme.md * First commit * Added ChibiOS files * renamed files to remove capital letters * Fixed layout references * fixed image reference * Fixing errors * Fixed config.h * changed second up to fn key * renamed files and added beginning of via compatibility * renamed keyboard * removed vscode files * fixing files for via compatibility * adding via files * working via compatibility * added license header to via file * preparing for pull request * Fixed firmware according to pull request feedback * fixed readme according to pull request feedback * Updated readme and removed unnecessary layers in default/keymap.c * removed whitespace * updated keymap readme to match suggestion --- keyboards/generic_panda/panda65_01/chconf.h | 711 ++++++++++++++++++ keyboards/generic_panda/panda65_01/config.h | 54 ++ keyboards/generic_panda/panda65_01/halconf.h | 522 +++++++++++++ keyboards/generic_panda/panda65_01/info.json | 15 + .../panda65_01/keymaps/default/keymap.c | 35 + .../panda65_01/keymaps/default/readme.md | 5 + .../panda65_01/keymaps/via/keymap.c | 53 ++ .../panda65_01/keymaps/via/rules.mk | 2 + keyboards/generic_panda/panda65_01/mcuconf.h | 168 +++++ .../generic_panda/panda65_01/panda65_01.c | 17 + .../generic_panda/panda65_01/panda65_01.h | 56 ++ keyboards/generic_panda/panda65_01/readme.md | 17 + keyboards/generic_panda/panda65_01/rules.mk | 19 + 13 files changed, 1674 insertions(+) create mode 100644 keyboards/generic_panda/panda65_01/chconf.h create mode 100644 keyboards/generic_panda/panda65_01/config.h create mode 100644 keyboards/generic_panda/panda65_01/halconf.h create mode 100644 keyboards/generic_panda/panda65_01/info.json create mode 100644 keyboards/generic_panda/panda65_01/keymaps/default/keymap.c create mode 100644 keyboards/generic_panda/panda65_01/keymaps/default/readme.md create mode 100644 keyboards/generic_panda/panda65_01/keymaps/via/keymap.c create mode 100644 keyboards/generic_panda/panda65_01/keymaps/via/rules.mk create mode 100644 keyboards/generic_panda/panda65_01/mcuconf.h create mode 100644 keyboards/generic_panda/panda65_01/panda65_01.c create mode 100644 keyboards/generic_panda/panda65_01/panda65_01.h create mode 100644 keyboards/generic_panda/panda65_01/readme.md create mode 100644 keyboards/generic_panda/panda65_01/rules.mk diff --git a/keyboards/generic_panda/panda65_01/chconf.h b/keyboards/generic_panda/panda65_01/chconf.h new file mode 100644 index 000000000000..03a6edca4a7a --- /dev/null +++ b/keyboards/generic_panda/panda65_01/chconf.h @@ -0,0 +1,711 @@ +/* + 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. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +/** + * @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. + * + * @addtogroup config + * @details Kernel related settings and hooks. + * @{ + */ + +#ifndef CHCONF_H +#define CHCONF_H + +#define _CHIBIOS_RT_CONF_ +#define _CHIBIOS_RT_CONF_VER_6_0_ + +/*===========================================================================*/ +/** + * @name System timers settings + * @{ + */ +/*===========================================================================*/ + +/** + * @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. + * @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. + */ +#if !defined(CH_CFG_ST_TIMEDELTA) +#define CH_CFG_ST_TIMEDELTA 2 +#endif + +/** @} */ + +/*===========================================================================*/ +/** + * @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. + */ +#if !defined(CH_CFG_TIME_QUANTUM) +#define CH_CFG_TIME_QUANTUM 0 +#endif + +/** + * @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. + */ +#if !defined(CH_CFG_MEMCORE_SIZE) +#define CH_CFG_MEMCORE_SIZE 0 +#endif + +/** + * @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. + */ +#if !defined(CH_CFG_NO_IDLE_THREAD) +#define CH_CFG_NO_IDLE_THREAD FALSE +#endif + +/** @} */ + +/*===========================================================================*/ +/** + * @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. + */ +#if !defined(CH_CFG_OPTIMIZE_SPEED) +#define CH_CFG_OPTIMIZE_SPEED FALSE +#endif + +/** @} */ + +/*===========================================================================*/ +/** + * @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. + */ +#if !defined(CH_CFG_USE_TM) +#define CH_CFG_USE_TM FALSE +#endif + +/** + * @brief Threads registry APIs. + * @details If enabled then the registry APIs are included in the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_REGISTRY) +#define CH_CFG_USE_REGISTRY TRUE +#endif + +/** + * @brief Threads synchronization APIs. + * @details If enabled then the @p chThdWait() function is included in + * the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_WAITEXIT) +#define CH_CFG_USE_WAITEXIT TRUE +#endif + +/** + * @brief Semaphores APIs. + * @details If enabled then the Semaphores APIs are included in the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_SEMAPHORES) +#define CH_CFG_USE_SEMAPHORES TRUE +#endif + +/** + * @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. + */ +#if !defined(CH_CFG_USE_SEMAPHORES_PRIORITY) +#define CH_CFG_USE_SEMAPHORES_PRIORITY FALSE +#endif + +/** + * @brief Mutexes APIs. + * @details If enabled then the mutexes APIs are included in the kernel. + * + * @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. + * @note Recursive mutexes are heavier and have an increased + * memory footprint. + * + * @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. + * @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. + */ +#if !defined(CH_CFG_USE_CONDVARS) +#define CH_CFG_USE_CONDVARS TRUE +#endif + +/** + * @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. + */ +#if !defined(CH_CFG_USE_CONDVARS_TIMEOUT) +#define CH_CFG_USE_CONDVARS_TIMEOUT FALSE +#endif + +/** + * @brief Events Flags APIs. + * @details If enabled then the event flags APIs are included in the kernel. + * + * @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. + * @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. + */ +#if !defined(CH_CFG_USE_EVENTS_TIMEOUT) +#define CH_CFG_USE_EVENTS_TIMEOUT TRUE +#endif + +/** + * @brief Synchronous Messages APIs. + * @details If enabled then the synchronous messages APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_MESSAGES) +#define CH_CFG_USE_MESSAGES TRUE +#endif + +/** + * @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. + */ +#if !defined(CH_CFG_USE_MESSAGES_PRIORITY) +#define CH_CFG_USE_MESSAGES_PRIORITY FALSE +#endif + +/** + * @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. + */ +#if !defined(CH_CFG_USE_MAILBOXES) +#define CH_CFG_USE_MAILBOXES TRUE +#endif + +/** + * @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. + */ +#if !defined(CH_CFG_USE_MEMCORE) +#define CH_CFG_USE_MEMCORE TRUE +#endif + +/** + * @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. + */ +#if !defined(CH_CFG_USE_HEAP) +#define CH_CFG_USE_HEAP FALSE +#endif + +/** + * @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. + */ +#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. + * @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. + */ +#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 + +/** @} */ + +/*===========================================================================*/ +/** + * @name Debug options + * @{ + */ +/*===========================================================================*/ + +/** + * @brief Debug option, kernel statistics. + * + * @note The default is @p FALSE. + */ +#if !defined(CH_DBG_STATISTICS) +#define CH_DBG_STATISTICS FALSE +#endif + +/** + * @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. + */ +#if !defined(CH_DBG_SYSTEM_STATE_CHECK) +#define CH_DBG_SYSTEM_STATE_CHECK FALSE +#endif + +/** + * @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. + */ +#if !defined(CH_DBG_ENABLE_CHECKS) +#define CH_DBG_ENABLE_CHECKS FALSE +#endif + +/** + * @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. + */ +#if !defined(CH_DBG_ENABLE_ASSERTS) +#define CH_DBG_ENABLE_ASSERTS FALSE +#endif + +/** + * @brief Debug option, trace buffer. + * @details If enabled then the trace buffer is activated. + * + * @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. + * @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. + */ +#if !defined(CH_DBG_ENABLE_STACK_CHECK) +#define CH_DBG_ENABLE_STACK_CHECK FALSE +#endif + +/** + * @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. + */ +#if !defined(CH_DBG_FILL_THREADS) +#define CH_DBG_FILL_THREADS FALSE +#endif + +/** + * @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. + */ +#if !defined(CH_DBG_THREADS_PROFILING) +#define CH_DBG_THREADS_PROFILING FALSE +#endif + +/** @} */ + +/*===========================================================================*/ +/** + * @name Kernel hooks + * @{ + */ +/*===========================================================================*/ + +/** + * @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. + */ +#define CH_CFG_THREAD_EXTRA_FIELDS \ + /* Add threads custom fields here.*/ + +/** + * @brief Threads initialization hook. + * @details User initialization code added to the @p _thread_init() function. + * + * @note It is invoked from within @p _thread_init() 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 */ + +/** @} */ \ No newline at end of file diff --git a/keyboards/generic_panda/panda65_01/config.h b/keyboards/generic_panda/panda65_01/config.h new file mode 100644 index 000000000000..9d4f0c19b466 --- /dev/null +++ b/keyboards/generic_panda/panda65_01/config.h @@ -0,0 +1,54 @@ +/* +Copyright 2020 generic_panda + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License 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 0x6770 // gp generic_panda +#define PRODUCT_ID 0x6501 // 65_01 +#define DEVICE_VER 0x0001 +#define MANUFACTURER generic_panda +#define PRODUCT panda65_01 + +/* key matrix size */ +#define MATRIX_ROWS 5 +#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 { A9, A8, B15, A6, A4 } +#define MATRIX_COL_PINS { A3, A10, B7, B6, B5, B4, B3, A15, A14, A2, A1, A0, F1, F0, B10, B11 } +#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 diff --git a/keyboards/generic_panda/panda65_01/halconf.h b/keyboards/generic_panda/panda65_01/halconf.h new file mode 100644 index 000000000000..f997b9df08fd --- /dev/null +++ b/keyboards/generic_panda/panda65_01/halconf.h @@ -0,0 +1,522 @@ +/* + 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. + 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 + +#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 +#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 cryptographic subsystem. + */ +#if !defined(HAL_USE_CRY) || defined(__DOXYGEN__) +#define HAL_USE_CRY FALSE +#endif + +/** + * @brief Enables the DAC subsystem. + */ +#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 +#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 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 +#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 +#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 + +/** + * @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. */ +/*===========================================================================*/ + +/** + * @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 + +/** + * @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. */ +/*===========================================================================*/ + +/** + * @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 the zero-copy API. + */ +#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 + +/** + * @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. */ +/*===========================================================================*/ + +/** + * @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 16 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 256 bytes for both the transmission and receive + * buffers. + */ +#if !defined(SERIAL_USB_BUFFERS_SIZE) || defined(__DOXYGEN__) +#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 + +/*===========================================================================*/ +/* 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 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 +#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. */ +/*===========================================================================*/ + +/** + * @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 + +/*===========================================================================*/ +/* 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 */ + +/** @} */ \ No newline at end of file diff --git a/keyboards/generic_panda/panda65_01/info.json b/keyboards/generic_panda/panda65_01/info.json new file mode 100644 index 000000000000..b63ed0ca200f --- /dev/null +++ b/keyboards/generic_panda/panda65_01/info.json @@ -0,0 +1,15 @@ +{ + "keyboard_name": "Panda65_01", + "url": "https://github.com/JesseLeung97/qmk_firmware/tree/master/keyboards/generic_panda/panda65_01", + "maintainer": "generic_panda", + "width": 16, + "height": 5, + "layouts": { + "LAYOUT_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":"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":"Caps", "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":"LShift", "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":"RShift", "x":12.25, "y":3, "w":1.75}, {"label":"Up", "x":14, "y":3}, {"label":"FN", "x":15, "y":3}, {"label":"LControl", "x":0, "y":4, "w":1.5}, {"label":"LAlt", "x":2.25, "y":4, "w":1.5}, {"label":"Space", "x":3.75, "y":4, "w":7}, {"label":"RWin", "x":10.75, "y":4, "w":1.5}, {"label":"Left", "x":13, "y":4}, {"label":"Down", "x":14, "y":4}, {"label":"Right", "x":15, "y":4}] + }, + "LAYOUT_full_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":"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":"PGup", "x":15, "y":1}, {"label":"Caps", "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":"LShift", "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":"RShift", "x":12.25, "y":3, "w":1.75}, {"label":"Up", "x":14, "y":3}, {"label":"Fn", "x":15, "y":3}, {"label":"LControl", "x":0, "y":4, "w":1.5}, {"label":"LAlt", "x":2.25, "y":4, "w":1.5}, {"label":"Space", "x":3.75, "y":4, "w":7}, {"label":"RWin", "x":10.75, "y":4, "w":1.5}, {"label":"Left", "x":13, "y":4}, {"label":"Down", "x":14, "y":4}, {"label":"Right", "x":15, "y":4}] + } + } +} diff --git a/keyboards/generic_panda/panda65_01/keymaps/default/keymap.c b/keyboards/generic_panda/panda65_01/keymaps/default/keymap.c new file mode 100644 index 000000000000..a40d54189715 --- /dev/null +++ b/keyboards/generic_panda/panda65_01/keymaps/default/keymap.c @@ -0,0 +1,35 @@ +/* Copyright 2020 generic_panda + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public 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] = { + /* Base */ + [0] = LAYOUT_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_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_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_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, MO(1), + KC_LCTL, KC_LALT, KC_SPC, KC_RGUI, KC_LEFT, KC_DOWN, KC_RIGHT + ), + //fn layer 1 + [1] = LAYOUT_split_bs( + 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_F13, KC_INS, 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, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 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/generic_panda/panda65_01/keymaps/default/readme.md b/keyboards/generic_panda/panda65_01/keymaps/default/readme.md new file mode 100644 index 000000000000..9bb2c18c896e --- /dev/null +++ b/keyboards/generic_panda/panda65_01/keymaps/default/readme.md @@ -0,0 +1,5 @@ +# The default keymap for Panda65_01 + +![panda65_01 layout image](https://i.imgur.com/fPBUDMT.png) + +This is the default layout that comes flashed with the panda65_01 pcb. It follows the physical layout of the bauer with equal sized windows keyless blockers. \ No newline at end of file diff --git a/keyboards/generic_panda/panda65_01/keymaps/via/keymap.c b/keyboards/generic_panda/panda65_01/keymaps/via/keymap.c new file mode 100644 index 000000000000..4ee5eca70e2f --- /dev/null +++ b/keyboards/generic_panda/panda65_01/keymaps/via/keymap.c @@ -0,0 +1,53 @@ +/* +Copyright 2020 generic_panda + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public 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] = { + /* Base */ + [0] = LAYOUT_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_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_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_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, MO(1), + KC_LCTL, KC_LALT, KC_SPC, KC_RGUI, KC_LEFT, KC_DOWN, KC_RIGHT + ), + //fn layer 1 + [1] = LAYOUT_split_bs( + 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_F13, KC_INS, 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, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 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 layer 2 + [2] = LAYOUT_split_bs( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 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 layer 3 + [3] = LAYOUT_split_bs( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 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/generic_panda/panda65_01/keymaps/via/rules.mk b/keyboards/generic_panda/panda65_01/keymaps/via/rules.mk new file mode 100644 index 000000000000..a2907138de34 --- /dev/null +++ b/keyboards/generic_panda/panda65_01/keymaps/via/rules.mk @@ -0,0 +1,2 @@ +VIA_ENABLE = yes # enable via +LTO_ENABLE = yes # reduce firmware size diff --git a/keyboards/generic_panda/panda65_01/mcuconf.h b/keyboards/generic_panda/panda65_01/mcuconf.h new file mode 100644 index 000000000000..d13a27eae626 --- /dev/null +++ b/keyboards/generic_panda/panda65_01/mcuconf.h @@ -0,0 +1,168 @@ +/* + 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 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 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_ */ \ No newline at end of file diff --git a/keyboards/generic_panda/panda65_01/panda65_01.c b/keyboards/generic_panda/panda65_01/panda65_01.c new file mode 100644 index 000000000000..15bf5774262d --- /dev/null +++ b/keyboards/generic_panda/panda65_01/panda65_01.c @@ -0,0 +1,17 @@ +/* Copyright 2020 generic_panda + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#include "panda65_01.h" diff --git a/keyboards/generic_panda/panda65_01/panda65_01.h b/keyboards/generic_panda/panda65_01/panda65_01.h new file mode 100644 index 000000000000..ced6e9b19620 --- /dev/null +++ b/keyboards/generic_panda/panda65_01/panda65_01.h @@ -0,0 +1,56 @@ +/* Copyright 2020 generic_panda + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License 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_split_bs( \ + 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, k115, \ + k200, k201, k202, k203, k204, k205, k206, k207, k208, k209, k210, k211, k212, k215, \ + k300, k301, k302, k303, k304, k305, k306, k307, k308, k309, k310, k311, k314, k315, \ + k400, k402, k406, k411, k413, k414, k415 \ +) { \ + { k000, k001, k002, k003, k004, k005, k006, k007, k008, k009, k010, k011, k012, k013, k014, k015 }, \ + { k100, KC_NO, k101, k102, k103, k104, k105, k106, k107, k108, k109, k110, k111, k112, k113, k115 }, \ + { k200, KC_NO, k201, k202, k203, k204, k205, k206, k207, k208, k209, k210, k211, k212, KC_NO, k215 }, \ + { k300, KC_NO, KC_NO, k301, k302, k303, k304, k305, k306, k307, k308, k309, k310, k311, k314, k315 }, \ + { k400, KC_NO, KC_NO, k402, k406, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, k411, KC_NO, k413, k414, k415 } \ +} + +#define LAYOUT_full_bs( \ + k000, k001, k002, k003, k004, k005, k006, k007, k008, k009, k010, k011, k012, k014, k015, \ + k100, k101, k102, k103, k104, k105, k106, k107, k108, k109, k110, k111, k112, k113, k115, \ + k200, k201, k202, k203, k204, k205, k206, k207, k208, k209, k210, k211, k212, k215, \ + k300, k301, k302, k303, k304, k305, k306, k307, k308, k309, k310, k311, k314, k315, \ + k400, k402, k406, k411, k413, k414, k415 \ +) { \ + { k000, k001, k002, k003, k004, k005, k006, k007, k008, k009, k010, k011, k012, KC_NO, k014 k015 }, \ + { k100, KC_NO, k101, k102, k103, k104, k105, k106, k107, k108, k109, k110, k111, k112, k113, k115 }, \ + { k200, KC_NO, k201, k202, k203, k204, k205, k206, k207, k208, k209, k210, k211, k212, KC_NO, k215 }, \ + { k300, KC_NO, KC_NO, k301, k302, k303, k304, k305, k306, k307, k308, k309, k310, k311, k314, k315 }, \ + { k400, KC_NO, KC_NO, k402, k406, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, k411, KC_NO, k413, k414, k415 } \ +} + diff --git a/keyboards/generic_panda/panda65_01/readme.md b/keyboards/generic_panda/panda65_01/readme.md new file mode 100644 index 000000000000..e33aebea8798 --- /dev/null +++ b/keyboards/generic_panda/panda65_01/readme.md @@ -0,0 +1,17 @@ +# The default keymap for Panda65_01 + +![Panda65_01 layout image](https://i.imgur.com/fPBUDMT.png) + +* Keyboard Maintainer: [generic_panda](https://github.com/jesseleung97) +* Hardware Supported: panda65_01 PCB +* Hardware Availability: [panda65-01 acrylic case designed by Alec:](https://onedrive.live.com/?authkey=%21AA8d6frZ0woiaV4&id=DC069E9FB0BC8004%21155830&cid=DC069E9FB0BC8004) + +Make example for this keyboard's default keymap (after setting up your build environment): + + make generic_panda/panda65_01:default + +Flashing example for this keyboard: + + make generic_panda/panda65_01: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). diff --git a/keyboards/generic_panda/panda65_01/rules.mk b/keyboards/generic_panda/panda65_01/rules.mk new file mode 100644 index 000000000000..cb4e9cc83073 --- /dev/null +++ b/keyboards/generic_panda/panda65_01/rules.mk @@ -0,0 +1,19 @@ +# MCU name +MCU = STM32F072 + +# 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 +BLUETOOTH_ENABLE = no # Enable Bluetooth +AUDIO_ENABLE = no # Audio output From 5aa55a715420a4977562c21ae4f76870024e8c42 Mon Sep 17 00:00:00 2001 From: Adam Gwilliam Date: Tue, 18 Aug 2020 16:36:46 -0500 Subject: [PATCH 594/930] add VIA keymap for boardsource/3x4 (#10043) * via keymap for boardsource/3x4 * fix formatting * Apply suggestions from code review fix rules.mk * Update keyboards/boardsource/3x4/rules.mk * use unique product ID * update vendor id to be unique, update product id to make more sense --- keyboards/boardsource/3x4/config.h | 4 +-- .../boardsource/3x4/keymaps/via/keymap.c | 25 +++++++++++++++++++ .../boardsource/3x4/keymaps/via/readme.md | 5 ++++ .../boardsource/3x4/keymaps/via/rules.mk | 1 + keyboards/boardsource/3x4/rules.mk | 7 ++---- 5 files changed, 35 insertions(+), 7 deletions(-) create mode 100644 keyboards/boardsource/3x4/keymaps/via/keymap.c create mode 100644 keyboards/boardsource/3x4/keymaps/via/readme.md create mode 100644 keyboards/boardsource/3x4/keymaps/via/rules.mk diff --git a/keyboards/boardsource/3x4/config.h b/keyboards/boardsource/3x4/config.h index 95c6f9ac2736..93ce004efbef 100644 --- a/keyboards/boardsource/3x4/config.h +++ b/keyboards/boardsource/3x4/config.h @@ -5,8 +5,8 @@ #include "config_common.h" /* USB Device descriptor parameter */ -#define VENDOR_ID 0xF7E0 -#define PRODUCT_ID 0x0412 +#define VENDOR_ID 0x4273 // "Bs" - Boardsource +#define PRODUCT_ID 0x0304 // 3x4 #define DEVICE_VER 0x0000 #define MANUFACTURER Boardsource #define PRODUCT 3x4 diff --git a/keyboards/boardsource/3x4/keymaps/via/keymap.c b/keyboards/boardsource/3x4/keymaps/via/keymap.c new file mode 100644 index 000000000000..a4824f8bfa0f --- /dev/null +++ b/keyboards/boardsource/3x4/keymaps/via/keymap.c @@ -0,0 +1,25 @@ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + LAYOUT( + KC_0, KC_1, KC_4, KC_7, + KC_ENT, KC_2, KC_5, KC_8, + MO(1), KC_3, KC_6, KC_9 + ), + LAYOUT( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, RESET + ), + 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 + ), + 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/boardsource/3x4/keymaps/via/readme.md b/keyboards/boardsource/3x4/keymaps/via/readme.md new file mode 100644 index 000000000000..c68eb9cf5a6b --- /dev/null +++ b/keyboards/boardsource/3x4/keymaps/via/readme.md @@ -0,0 +1,5 @@ +# The via keymap for boardsource 3x4 macropad + +This folder contains the [VIA](https://caniusevia.com/) configuration for the boardsource 3x4 macropad + +Maintained by: [gwillad](https://github.com/gwillad) diff --git a/keyboards/boardsource/3x4/keymaps/via/rules.mk b/keyboards/boardsource/3x4/keymaps/via/rules.mk new file mode 100644 index 000000000000..036bd6d1c3ec --- /dev/null +++ b/keyboards/boardsource/3x4/keymaps/via/rules.mk @@ -0,0 +1 @@ +VIA_ENABLE = yes \ No newline at end of file diff --git a/keyboards/boardsource/3x4/rules.mk b/keyboards/boardsource/3x4/rules.mk index 263c586048da..9c9acfda2900 100644 --- a/keyboards/boardsource/3x4/rules.mk +++ b/keyboards/boardsource/3x4/rules.mk @@ -24,8 +24,5 @@ SLEEP_LED_ENABLE = no # Breathing sleep 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 -UNICODE_ENABLE = no # Unicode -BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID -AUDIO_ENABLE = no # Audio output on port C6 -FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches +BLUETOOTH_ENABLE = no # Enable Bluetooth +AUDIO_ENABLE = no # Audio output From 588991af6934fc786abf6bbce61efc2c319195de Mon Sep 17 00:00:00 2001 From: Xelus22 <17491233+Xelus22@users.noreply.github.com> Date: Wed, 19 Aug 2020 08:13:18 +1000 Subject: [PATCH 595/930] Dawn60 update that breaks travis keyboard builds (#10082) --- keyboards/wilba_tech/wt_rgb_backlight.c | 1 + 1 file changed, 1 insertion(+) diff --git a/keyboards/wilba_tech/wt_rgb_backlight.c b/keyboards/wilba_tech/wt_rgb_backlight.c index 24d9d85ec07c..73d8208a7bfc 100644 --- a/keyboards/wilba_tech/wt_rgb_backlight.c +++ b/keyboards/wilba_tech/wt_rgb_backlight.c @@ -1430,6 +1430,7 @@ const uint8_t g_map_row_column_to_led[MATRIX_ROWS][MATRIX_COLS] PROGMEM = { { -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 } +}; #elif defined(RGB_BACKLIGHT_M50_A) // LA15, LA14, LA13, LA12, LA11, LA10, LA9, LB1, LB2, LB3, LB4, LB5, LB6 // LA16, LA6, LA5, LA4, LA3, LA2, LA1, LB9, LB10, LB11, LB12, LB13, LB14 From 33579efee3195e9c0c8ab180c47699cc765129a4 Mon Sep 17 00:00:00 2001 From: Yoonbae Cho Date: Wed, 19 Aug 2020 08:13:55 +0900 Subject: [PATCH 596/930] Update keymap for Keebio/iris4/rev4 (#10062) --- keyboards/keebio/iris/keymaps/yoonbae81/keymap.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/keyboards/keebio/iris/keymaps/yoonbae81/keymap.c b/keyboards/keebio/iris/keymaps/yoonbae81/keymap.c index 88421aeadf7a..58f115d6d144 100644 --- a/keyboards/keebio/iris/keymaps/yoonbae81/keymap.c +++ b/keyboards/keebio/iris/keymaps/yoonbae81/keymap.c @@ -25,9 +25,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_FN1] = LAYOUT( //┌────────┬────────┬────────┬────────┬────────┬────────┐ ┌────────┬────────┬────────┬────────┬────────┬────────┐ - 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_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, //├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤ - _______, KC_LCBR, KC_PGUP, KC_UP, KC_HOME, KC_RCBR, KC_NO, KC_HOME, KC_PGUP, KC_NO, KC_NO, KC_NO, + _______, KC_LCBR, KC_PGUP, KC_UP, KC_HOME, KC_RCBR, KC_NO, KC_HOME, KC_PGUP, KC_NO, KC_NO, KC_F12, //├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤ _______, KC_LPRN, KC_LEFT, KC_DOWN, KC_RGHT, KC_RPRN, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_MINS, KC_EQL, //├────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┤ @@ -53,7 +53,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_FN3] = LAYOUT( //┌────────┬────────┬────────┬────────┬────────┬────────┐ ┌────────┬────────┬────────┬────────┬────────┬────────┐ - RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET, _______, //├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, //├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤ From 1ff68165b855e4af3325adb3cf532d78fffb17fb Mon Sep 17 00:00:00 2001 From: yiancar Date: Wed, 19 Aug 2020 01:56:40 +0100 Subject: [PATCH 597/930] [Keyboard] NK87 (#9965) * Initial commit * Fix1 * Final Prettify * Update keyboards/nk87/config.h * Update keyboards/nk87/keymaps/default/keymap.c * Update keyboards/nk87/keymaps/via/keymap.c * Update keyboards/nk87/rules.mk * Remove unnecessary junk * Update keyboards/nk87/readme.md * Update keyboards/nk87/readme.md * Update keyboards/nk87/readme.md * Update keyboards/nk87/keymaps/default/readme.md * Update keyboards/nk87/keymaps/via/readme.md --- keyboards/nk87/chconf.h | 714 +++++++++++++++++++++++ keyboards/nk87/config.h | 146 +++++ keyboards/nk87/halconf.h | 525 +++++++++++++++++ keyboards/nk87/info.json | 12 + keyboards/nk87/keymaps/default/keymap.c | 34 ++ keyboards/nk87/keymaps/default/readme.md | 7 + keyboards/nk87/keymaps/via/keymap.c | 51 ++ keyboards/nk87/keymaps/via/readme.md | 7 + keyboards/nk87/keymaps/via/rules.mk | 1 + keyboards/nk87/mcuconf.h | 273 +++++++++ keyboards/nk87/nk87.c | 58 ++ keyboards/nk87/nk87.h | 40 ++ keyboards/nk87/readme.md | 34 ++ keyboards/nk87/rules.mk | 33 ++ keyboards/wilba_tech/wt_rgb_backlight.c | 118 +++- 15 files changed, 2040 insertions(+), 13 deletions(-) create mode 100644 keyboards/nk87/chconf.h create mode 100755 keyboards/nk87/config.h create mode 100644 keyboards/nk87/halconf.h create mode 100755 keyboards/nk87/info.json create mode 100755 keyboards/nk87/keymaps/default/keymap.c create mode 100755 keyboards/nk87/keymaps/default/readme.md create mode 100755 keyboards/nk87/keymaps/via/keymap.c create mode 100755 keyboards/nk87/keymaps/via/readme.md create mode 100755 keyboards/nk87/keymaps/via/rules.mk create mode 100644 keyboards/nk87/mcuconf.h create mode 100755 keyboards/nk87/nk87.c create mode 100755 keyboards/nk87/nk87.h create mode 100755 keyboards/nk87/readme.md create mode 100755 keyboards/nk87/rules.mk diff --git a/keyboards/nk87/chconf.h b/keyboards/nk87/chconf.h new file mode 100644 index 000000000000..aac33037058e --- /dev/null +++ b/keyboards/nk87/chconf.h @@ -0,0 +1,714 @@ +/* + 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. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +/** + * @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. + * + * @addtogroup config + * @details Kernel related settings and hooks. + * @{ + */ + +#ifndef CHCONF_H +#define CHCONF_H + +#define _CHIBIOS_RT_CONF_ +#define _CHIBIOS_RT_CONF_VER_6_0_ + +/*===========================================================================*/ +/** + * @name System timers settings + * @{ + */ +/*===========================================================================*/ + +/** + * @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. + * @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. + */ +#if !defined(CH_CFG_ST_TIMEDELTA) +#define CH_CFG_ST_TIMEDELTA 2 +#endif + +/** @} */ + +/*===========================================================================*/ +/** + * @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. + */ +#if !defined(CH_CFG_TIME_QUANTUM) +#define CH_CFG_TIME_QUANTUM 0 +#endif + +/** + * @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. + */ +#if !defined(CH_CFG_MEMCORE_SIZE) +#define CH_CFG_MEMCORE_SIZE 0 +#endif + +/** + * @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. + */ +#if !defined(CH_CFG_NO_IDLE_THREAD) +#define CH_CFG_NO_IDLE_THREAD FALSE +#endif + +/** @} */ + +/*===========================================================================*/ +/** + * @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. + */ +#if !defined(CH_CFG_OPTIMIZE_SPEED) +#define CH_CFG_OPTIMIZE_SPEED TRUE +#endif + +/** @} */ + +/*===========================================================================*/ +/** + * @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. + */ +#if !defined(CH_CFG_USE_TM) +#define CH_CFG_USE_TM TRUE +#endif + +/** + * @brief Threads registry APIs. + * @details If enabled then the registry APIs are included in the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_REGISTRY) +#define CH_CFG_USE_REGISTRY TRUE +#endif + +/** + * @brief Threads synchronization APIs. + * @details If enabled then the @p chThdWait() function is included in + * the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_WAITEXIT) +#define CH_CFG_USE_WAITEXIT TRUE +#endif + +/** + * @brief Semaphores APIs. + * @details If enabled then the Semaphores APIs are included in the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_SEMAPHORES) +#define CH_CFG_USE_SEMAPHORES TRUE +#endif + +/** + * @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. + */ +#if !defined(CH_CFG_USE_SEMAPHORES_PRIORITY) +#define CH_CFG_USE_SEMAPHORES_PRIORITY FALSE +#endif + +/** + * @brief Mutexes APIs. + * @details If enabled then the mutexes APIs are included in the kernel. + * + * @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. + * @note Recursive mutexes are heavier and have an increased + * memory footprint. + * + * @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. + * @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. + */ +#if !defined(CH_CFG_USE_CONDVARS) +#define CH_CFG_USE_CONDVARS TRUE +#endif + +/** + * @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. + */ +#if !defined(CH_CFG_USE_CONDVARS_TIMEOUT) +#define CH_CFG_USE_CONDVARS_TIMEOUT TRUE +#endif + +/** + * @brief Events Flags APIs. + * @details If enabled then the event flags APIs are included in the kernel. + * + * @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. + * @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. + */ +#if !defined(CH_CFG_USE_EVENTS_TIMEOUT) +#define CH_CFG_USE_EVENTS_TIMEOUT TRUE +#endif + +/** + * @brief Synchronous Messages APIs. + * @details If enabled then the synchronous messages APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_MESSAGES) +#define CH_CFG_USE_MESSAGES TRUE +#endif + +/** + * @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. + */ +#if !defined(CH_CFG_USE_MESSAGES_PRIORITY) +#define CH_CFG_USE_MESSAGES_PRIORITY TRUE +#endif + +/** + * @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. + */ +#if !defined(CH_CFG_USE_MAILBOXES) +#define CH_CFG_USE_MAILBOXES TRUE +#endif + +/** + * @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. + */ +#if !defined(CH_CFG_USE_MEMCORE) +#define CH_CFG_USE_MEMCORE TRUE +#endif + +/** + * @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. + */ +#if !defined(CH_CFG_USE_HEAP) +#define CH_CFG_USE_HEAP TRUE +#endif + +/** + * @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. + */ +#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. + * @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. + */ +#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 + +/** @} */ + +/*===========================================================================*/ +/** + * @name Debug options + * @{ + */ +/*===========================================================================*/ + +/** + * @brief Debug option, kernel statistics. + * + * @note The default is @p FALSE. + */ +#if !defined(CH_DBG_STATISTICS) +#define CH_DBG_STATISTICS FALSE +#endif + +/** + * @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. + */ +#if !defined(CH_DBG_SYSTEM_STATE_CHECK) +#define CH_DBG_SYSTEM_STATE_CHECK FALSE +#endif + +/** + * @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. + */ +#if !defined(CH_DBG_ENABLE_CHECKS) +#define CH_DBG_ENABLE_CHECKS FALSE +#endif + +/** + * @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. + */ +#if !defined(CH_DBG_ENABLE_ASSERTS) +#define CH_DBG_ENABLE_ASSERTS FALSE +#endif + +/** + * @brief Debug option, trace buffer. + * @details If enabled then the trace buffer is activated. + * + * @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. + * @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. + */ +#if !defined(CH_DBG_ENABLE_STACK_CHECK) +#define CH_DBG_ENABLE_STACK_CHECK TRUE +#endif + +/** + * @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. + */ +#if !defined(CH_DBG_FILL_THREADS) +#define CH_DBG_FILL_THREADS FALSE +#endif + +/** + * @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. + */ +#if !defined(CH_DBG_THREADS_PROFILING) +#define CH_DBG_THREADS_PROFILING FALSE +#endif + +/** @} */ + +/*===========================================================================*/ +/** + * @name Kernel hooks + * @{ + */ +/*===========================================================================*/ + +/** + * @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. + */ +#define CH_CFG_THREAD_EXTRA_FIELDS \ + /* Add threads custom fields here.*/ + +/** + * @brief Threads initialization hook. + * @details User initialization code added to the @p _thread_init() function. + * + * @note It is invoked from within @p _thread_init() 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/nk87/config.h b/keyboards/nk87/config.h new file mode 100755 index 000000000000..4a1098a9007d --- /dev/null +++ b/keyboards/nk87/config.h @@ -0,0 +1,146 @@ +/* +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 0x4E4C +#define DEVICE_VER 0x0001 +#define MANUFACTURER Yiancar-Designs +#define PRODUCT NK87 + +/* key matrix size */ +#define MATRIX_ROWS 6 +#define MATRIX_COLS 17 + +#define MATRIX_ROW_PINS { A7, B3, B4, B5, A8, A4 } +#define MATRIX_COL_PINS { A13, A10, A9, A14, A15, B8, B9, C13, C14, C15, A0, A1, A2, A3, A5, B1, B10 } +// To enable debugger set A13 A14 -> A5 A7 + +/* 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_NK87 + +// 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 128 + +// 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 +// Rows are shifted one down, F-row cannot be dynamically modified at the moment. +#define RGB_BACKLIGHT_ALPHAS_MODS_ROW_0 0b1110000000000000 +#define RGB_BACKLIGHT_ALPHAS_MODS_ROW_1 0b1100000000000001 +#define RGB_BACKLIGHT_ALPHAS_MODS_ROW_2 0b0010000000000001 +#define RGB_BACKLIGHT_ALPHAS_MODS_ROW_3 0b1001000000000001 +#define RGB_BACKLIGHT_ALPHAS_MODS_ROW_4 0b1111100000000111 + +#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 32 + +// VIA lighting is handled by the keyboard-level code +#define VIA_CUSTOM_LIGHTING_ENABLE diff --git a/keyboards/nk87/halconf.h b/keyboards/nk87/halconf.h new file mode 100644 index 000000000000..9306b2cfd8e9 --- /dev/null +++ b/keyboards/nk87/halconf.h @@ -0,0 +1,525 @@ +/* + 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. + 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 + +#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 +#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 cryptographic subsystem. + */ +#if !defined(HAL_USE_CRY) || defined(__DOXYGEN__) +#define HAL_USE_CRY FALSE +#endif + +/** + * @brief Enables the DAC subsystem. + */ +#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 +#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 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 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 +#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 +#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 + +/** + * @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. */ +/*===========================================================================*/ + +/** + * @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 + +/** + * @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. */ +/*===========================================================================*/ + +/** + * @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 the zero-copy API. + */ +#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 + +/** + * @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. */ +/*===========================================================================*/ + +/** + * @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 16 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 256 bytes for both the transmission and receive + * buffers. + */ +#if !defined(SERIAL_USB_BUFFERS_SIZE) || defined(__DOXYGEN__) +#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 + +/*===========================================================================*/ +/* 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 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 +#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. */ +/*===========================================================================*/ + +/** + * @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 + +/*===========================================================================*/ +/* 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/nk87/info.json b/keyboards/nk87/info.json new file mode 100755 index 000000000000..55f658e27d4b --- /dev/null +++ b/keyboards/nk87/info.json @@ -0,0 +1,12 @@ +{ + "keyboard_name": "NK87", + "url": "www.yiancar-designs.com", + "maintainer": "Yiancar", + "width": 18.25, + "height": 6.25, + "layouts": { + "LAYOUT_all": { + "layout": [{"label":"0,0", "x":0, "y":0}, {"label":"0,1", "x":1.25, "y":0}, {"label":"0,2", "x":2.25, "y":0}, {"label":"0,3", "x":3.25, "y":0}, {"label":"0,4", "x":4.25, "y":0}, {"label":"0,5", "x":5.5, "y":0}, {"label":"0,6", "x":6.5, "y":0}, {"label":"0,7", "x":7.5, "y":0}, {"label":"0,8", "x":8.5, "y":0}, {"label":"0,9", "x":9.75, "y":0}, {"label":"0,10", "x":10.75, "y":0}, {"label":"0,12", "x":11.75, "y":0}, {"label":"0,12", "x":12.75, "y":0}, {"label":"0,13", "x":14, "y":0}, {"label":"0,14", "x":15.25, "y":0}, {"label":"0,15", "x":16.25, "y":0}, {"label":"0,16", "x":17.25, "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":"1,4", "x":4, "y":1.25}, {"label":"1,5", "x":5, "y":1.25}, {"label":"1,6", "x":6, "y":1.25}, {"label":"1,7", "x":7, "y":1.25}, {"label":"1,8", "x":8, "y":1.25}, {"label":"1,9", "x":9, "y":1.25}, {"label":"1,10", "x":10, "y":1.25}, {"label":"1,11", "x":11, "y":1.25}, {"label":"1,12", "x":12, "y":1.25}, {"label":"1,13", "x":13, "y":1.25, "w":2}, {"label":"1,14", "x":15.25, "y":1.25}, {"label":"1,15", "x":16.25, "y":1.25}, {"label":"1,16", "x":17.25, "y":1.25}, {"label":"2,0", "x":0, "y":2.25, "w":1.5}, {"label":"2,1", "x":1.5, "y":2.25}, {"label":"2,2", "x":2.5, "y":2.25}, {"label":"2,3", "x":3.5, "y":2.25}, {"label":"2,4", "x":4.5, "y":2.25}, {"label":"2,5", "x":5.5, "y":2.25}, {"label":"2,6", "x":6.5, "y":2.25}, {"label":"2,7", "x":7.5, "y":2.25}, {"label":"2,8", "x":8.5, "y":2.25}, {"label":"2,9", "x":9.5, "y":2.25}, {"label":"2,10", "x":10.5, "y":2.25}, {"label":"2,11", "x":11.5, "y":2.25}, {"label":"2,12", "x":12.5, "y":2.25}, {"label":"3,12", "x":13.5, "y":2.25, "w":1.5}, {"label":"2,14", "x":15.25, "y":2.25}, {"label":"2,15", "x":16.25, "y":2.25}, {"label":"2,16", "x":17.25, "y":2.25}, {"label":"3,0", "x":0, "y":3.25, "w":1.75}, {"label":"3,1", "x":1.75, "y":3.25}, {"label":"3,2", "x":2.75, "y":3.25}, {"label":"3,3", "x":3.75, "y":3.25}, {"label":"3,4", "x":4.75, "y":3.25}, {"label":"3,5", "x":5.75, "y":3.25}, {"label":"3,6", "x":6.75, "y":3.25}, {"label":"3,7", "x":7.75, "y":3.25}, {"label":"3,8", "x":8.75, "y":3.25}, {"label":"3,9", "x":9.75, "y":3.25}, {"label":"3,10", "x":10.75, "y":3.25}, {"label":"3,11", "x":11.75, "y":3.25}, {"label":"3,13", "x":12.75, "y":3.25, "w":2.25}, {"label":"4,0", "x":0, "y":4.25, "w":2.25}, {"label":"4,2", "x":2.25, "y":4.25}, {"label":"4,3", "x":3.25, "y":4.25}, {"label":"4,4", "x":4.25, "y":4.25}, {"label":"4,5", "x":5.25, "y":4.25}, {"label":"4,6", "x":6.25, "y":4.25}, {"label":"4,7", "x":7.25, "y":4.25}, {"label":"4,8", "x":8.25, "y":4.25}, {"label":"4,9", "x":9.25, "y":4.25}, {"label":"4,10", "x":10.25, "y":4.25}, {"label":"4,11", "x":11.25, "y":4.25}, {"label":"4,12", "x":12.25, "y":4.25, "w":2.75}, {"label":"4,15", "x":16.25, "y":4.25}, {"label":"5,0", "x":0, "y":5.25, "w":1.5}, {"label":"5,1", "x":1.5, "y":5.25}, {"label":"5,2", "x":2.5, "y":5.25, "w":1.5}, {"label":"5,6", "x":4, "y":5.25, "w":7}, {"label":"5,11", "x":11, "y":5.25, "w":1.5}, {"label":"5,12", "x":12.5, "y":5.25}, {"label":"5,13", "x":13.5, "y":5.25, "w":1.5}, {"label":"5,14", "x":15.25, "y":5.25}, {"label":"5,15", "x":16.25, "y":5.25}, {"label":"5,16", "x":17.25, "y":5.25}] + } + } +} \ No newline at end of file diff --git a/keyboards/nk87/keymaps/default/keymap.c b/keyboards/nk87/keymaps/default/keymap.c new file mode 100755 index 000000000000..f5387d48def2 --- /dev/null +++ b/keyboards/nk87/keymaps/default/keymap.c @@ -0,0 +1,34 @@ +/* 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_F13, 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( /* FN */ + KC_TRNS, KC_TRNS, KC_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_VOLD, KC_MUTE, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, 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, S1_DEC, S1_INC, S2_DEC, S2_INC, 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_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), +}; diff --git a/keyboards/nk87/keymaps/default/readme.md b/keyboards/nk87/keymaps/default/readme.md new file mode 100755 index 000000000000..c0ca4361842f --- /dev/null +++ b/keyboards/nk87/keymaps/default/readme.md @@ -0,0 +1,7 @@ +# The default keymap for NK87 + +![Layer 0](https://i.imgur.com/nw29fvc.png) +Fn Layer: +![Layer 1](https://i.imgur.com/SyijLFt.png) + +Default layer is normal ANSI TKL diff --git a/keyboards/nk87/keymaps/via/keymap.c b/keyboards/nk87/keymaps/via/keymap.c new file mode 100755 index 000000000000..f8ada46952dc --- /dev/null +++ b/keyboards/nk87/keymaps/via/keymap.c @@ -0,0 +1,51 @@ +/* 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_F13, 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( /* FN */ + KC_TRNS, KC_TRNS, KC_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_VOLD, KC_MUTE, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, 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, S1_DEC, S1_INC, S2_DEC, S2_INC, 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_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, 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, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), +}; + diff --git a/keyboards/nk87/keymaps/via/readme.md b/keyboards/nk87/keymaps/via/readme.md new file mode 100755 index 000000000000..90253575e701 --- /dev/null +++ b/keyboards/nk87/keymaps/via/readme.md @@ -0,0 +1,7 @@ +# The default VIA keymap for NK87 + +![Layer 0](https://i.imgur.com/nw29fvc.png) +Fn Layer: +![Layer 1](https://i.imgur.com/SyijLFt.png) + +Default layer is normal ANSI TKL diff --git a/keyboards/nk87/keymaps/via/rules.mk b/keyboards/nk87/keymaps/via/rules.mk new file mode 100755 index 000000000000..1e5b99807cb7 --- /dev/null +++ b/keyboards/nk87/keymaps/via/rules.mk @@ -0,0 +1 @@ +VIA_ENABLE = yes diff --git a/keyboards/nk87/mcuconf.h b/keyboards/nk87/mcuconf.h new file mode 100644 index 000000000000..ed227b79679f --- /dev/null +++ b/keyboards/nk87/mcuconf.h @@ -0,0 +1,273 @@ +/* + 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. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#ifndef MCUCONF_H +#define MCUCONF_H + +/* + * STM32F3xx 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: + * 15...0 Lowest...Highest. + * + * DMA priorities: + * 0...3 Lowest...Highest. + */ + +#define STM32F3xx_MCUCONF +#define STM32F303_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_LSI_ENABLED TRUE +#define STM32_HSE_ENABLED TRUE +#define STM32_LSE_ENABLED FALSE +#define STM32_SW STM32_SW_PLL +#define STM32_PLLSRC STM32_PLLSRC_HSE +#define STM32_PREDIV_VALUE 1 +#define STM32_PLLMUL_VALUE 9 +#define STM32_HPRE STM32_HPRE_DIV1 +#define STM32_PPRE1 STM32_PPRE1_DIV2 +#define STM32_PPRE2 STM32_PPRE2_DIV2 +#define STM32_MCOSEL STM32_MCOSEL_NOCLOCK +#define STM32_ADC12PRES STM32_ADC12PRES_DIV1 +#define STM32_ADC34PRES STM32_ADC34PRES_DIV1 +#define STM32_USART1SW STM32_USART1SW_PCLK +#define STM32_USART2SW STM32_USART2SW_PCLK +#define STM32_USART3SW STM32_USART3SW_PCLK +#define STM32_UART4SW STM32_UART4SW_PCLK +#define STM32_UART5SW STM32_UART5SW_PCLK +#define STM32_I2C1SW STM32_I2C1SW_SYSCLK +#define STM32_I2C2SW STM32_I2C2SW_SYSCLK +#define STM32_TIM1SW STM32_TIM1SW_PCLK2 +#define STM32_TIM8SW STM32_TIM8SW_PCLK2 +#define STM32_RTCSEL STM32_RTCSEL_LSI +#define STM32_USB_CLOCK_REQUIRED TRUE +#define STM32_USBPRE STM32_USBPRE_DIV1P5 + +/* + * 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. + */ +#define STM32_ADC_DUAL_MODE FALSE +#define STM32_ADC_COMPACT_SAMPLES FALSE +#define STM32_ADC_USE_ADC1 FALSE +#define STM32_ADC_USE_ADC2 FALSE +#define STM32_ADC_USE_ADC3 FALSE +#define STM32_ADC_USE_ADC4 FALSE +#define STM32_ADC_ADC1_DMA_STREAM STM32_DMA_STREAM_ID(1, 1) +#define STM32_ADC_ADC2_DMA_STREAM STM32_DMA_STREAM_ID(2, 1) +#define STM32_ADC_ADC3_DMA_STREAM STM32_DMA_STREAM_ID(2, 5) +#define STM32_ADC_ADC4_DMA_STREAM STM32_DMA_STREAM_ID(2, 2) +#define STM32_ADC_ADC1_DMA_PRIORITY 2 +#define STM32_ADC_ADC2_DMA_PRIORITY 2 +#define STM32_ADC_ADC3_DMA_PRIORITY 2 +#define STM32_ADC_ADC4_DMA_PRIORITY 2 +#define STM32_ADC_ADC12_IRQ_PRIORITY 5 +#define STM32_ADC_ADC3_IRQ_PRIORITY 5 +#define STM32_ADC_ADC4_IRQ_PRIORITY 5 +#define STM32_ADC_ADC1_DMA_IRQ_PRIORITY 5 +#define STM32_ADC_ADC2_DMA_IRQ_PRIORITY 5 +#define STM32_ADC_ADC3_DMA_IRQ_PRIORITY 5 +#define STM32_ADC_ADC4_DMA_IRQ_PRIORITY 5 +#define STM32_ADC_ADC12_CLOCK_MODE ADC_CCR_CKMODE_AHB_DIV1 +#define STM32_ADC_ADC34_CLOCK_MODE ADC_CCR_CKMODE_AHB_DIV1 + +/* + * CAN driver system settings. + */ +#define STM32_CAN_USE_CAN1 FALSE +#define STM32_CAN_CAN1_IRQ_PRIORITY 11 + +/* + * DAC driver system settings. + */ +#define STM32_DAC_DUAL_MODE FALSE +#define STM32_DAC_USE_DAC1_CH1 TRUE +#define STM32_DAC_USE_DAC1_CH2 TRUE +#define STM32_DAC_DAC1_CH1_IRQ_PRIORITY 10 +#define STM32_DAC_DAC1_CH2_IRQ_PRIORITY 10 +#define STM32_DAC_DAC1_CH1_DMA_PRIORITY 2 +#define STM32_DAC_DAC1_CH2_DMA_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_TIM4 TRUE +#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 +#define STM32_GPT_TIM4_IRQ_PRIORITY 7 +#define STM32_GPT_TIM6_IRQ_PRIORITY 7 +#define STM32_GPT_TIM7_IRQ_PRIORITY 7 +#define STM32_GPT_TIM8_IRQ_PRIORITY 7 + +/* + * 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 10 +#define STM32_I2C_I2C2_IRQ_PRIORITY 10 +#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_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 +#define STM32_ICU_TIM4_IRQ_PRIORITY 7 +#define STM32_ICU_TIM8_IRQ_PRIORITY 7 + +/* + * 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_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. + */ +#define STM32_SERIAL_USE_USART1 FALSE +#define STM32_SERIAL_USE_USART2 FALSE +#define STM32_SERIAL_USE_USART3 FALSE +#define STM32_SERIAL_USE_UART4 FALSE +#define STM32_SERIAL_USE_UART5 FALSE +#define STM32_SERIAL_USART1_PRIORITY 12 +#define STM32_SERIAL_USART2_PRIORITY 12 +#define STM32_SERIAL_USART3_PRIORITY 12 +#define STM32_SERIAL_UART4_PRIORITY 12 +#define STM32_SERIAL_UART5_PRIORITY 12 + +/* + * SPI driver system settings. + */ +#define STM32_SPI_USE_SPI1 FALSE +#define STM32_SPI_USE_SPI2 FALSE +#define STM32_SPI_USE_SPI3 FALSE +#define STM32_SPI_SPI1_DMA_PRIORITY 1 +#define STM32_SPI_SPI2_DMA_PRIORITY 1 +#define STM32_SPI_SPI3_DMA_PRIORITY 1 +#define STM32_SPI_SPI1_IRQ_PRIORITY 10 +#define STM32_SPI_SPI2_IRQ_PRIORITY 10 +#define STM32_SPI_SPI3_IRQ_PRIORITY 10 +#define STM32_SPI_DMA_ERROR_HOOK(spip) osalSysHalt("DMA failure") + +/* + * ST driver system settings. + */ +#define STM32_ST_IRQ_PRIORITY 8 +#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_USE_USART3 FALSE +#define STM32_UART_USART1_IRQ_PRIORITY 12 +#define STM32_UART_USART2_IRQ_PRIORITY 12 +#define STM32_UART_USART3_IRQ_PRIORITY 12 +#define STM32_UART_USART1_DMA_PRIORITY 0 +#define STM32_UART_USART2_DMA_PRIORITY 0 +#define STM32_UART_USART3_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_HP_IRQ_PRIORITY 13 +#define STM32_USB_USB1_LP_IRQ_PRIORITY 14 + +/* + * WDG driver system settings. + */ +#define STM32_WDG_USE_IWDG FALSE + +#endif /* MCUCONF_H */ diff --git a/keyboards/nk87/nk87.c b/keyboards/nk87/nk87.c new file mode 100755 index 000000000000..bcebbc651cbf --- /dev/null +++ b/keyboards/nk87/nk87.c @@ -0,0 +1,58 @@ +/* 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 . + */ +#ifndef RGB_BACKLIGHT_NK87 +#error RGB_BACKLIGHT_NK87 not defined, recheck config.h +#endif + +#include "nk87.h" +#include "drivers/issi/is31fl3733.h" + +/* Indicator LEDS are part of the LED driver + * Top LED is blue only. LED driver 2 RGB 63 Blue channel + * Middle LED is blue and red. LED driver 2 RGB 63 Red and Green channel + * Bottom LED is red only LED driver 2 RGB 48 Blue channel. + */ +uint8_t CAPS = 0; +uint8_t FN1 = 0; +uint8_t FN2 = 0; + +bool led_update_kb(led_t led_state) { + bool res = led_update_user(led_state); + if(res) { + if (led_state.caps_lock) { + CAPS = 255; + } else { + CAPS = 0; + } + } + IS31FL3733_set_color( 63+64-1, FN1, FN1, CAPS ); + IS31FL3733_set_color( 48+64-1, 0, 0, FN2 ); + return res; +} + +__attribute__((weak)) layer_state_t layer_state_set_user(layer_state_t state) { + if (state & (1UL << 1)) { + FN1 = 255; + } else { + FN1 = 0; + } + if (state & (1UL << 2)) { + FN2 = 255; + } else { + FN2 = 0; + } + return state; +} diff --git a/keyboards/nk87/nk87.h b/keyboards/nk87/nk87.h new file mode 100755 index 000000000000..d17b1fb4a053 --- /dev/null +++ b/keyboards/nk87/nk87.h @@ -0,0 +1,40 @@ +/* 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 + +#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_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, K3C, 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, 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, XXX, K2E, K2F, K2G }, \ + { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, XXX, XXX, XXX }, \ + { K40, XXX, K42, K43, K44, K45, K46, K47, K48, K49, K4A, K4B, K4C, XXX, XXX, K4F, XXX }, \ + { K50, K51, K52, XXX, XXX, XXX, K56, XXX, XXX, XXX, XXX, K5B, K5C, K5D, K5E, K5F, K5G } \ +} diff --git a/keyboards/nk87/readme.md b/keyboards/nk87/readme.md new file mode 100755 index 000000000000..9ea4d9971889 --- /dev/null +++ b/keyboards/nk87/readme.md @@ -0,0 +1,34 @@ +# NK87 + +![NK87](https://i.imgur.com/nw29fvc.png) + +This is a standard fixed layout TKL PCB. It supports VIA and full per-key RGB. + +* Keyboard Maintainer: [Yiancar](https://yiancar-designs.com/) and on [GitHub](https://github.com/yiancar) +* Hardware Supported: A TKL keyboard with STM32F303CC +* Hardware Availability: https://novelkeys.xyz/ + +## Instructions + +### Build + +Make example for this keyboard (after setting up your build environment): + + make nk87: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). + +### Reset + +- Unplug +- Hold Escape +- Plug In +- Unplug +- Release Escape + +### Flash + +- Unplug +- Hold Escape +- Plug In +- Flash using QMK Toolbox or dfu-util (`make nk87::dfu-util`) diff --git a/keyboards/nk87/rules.mk b/keyboards/nk87/rules.mk new file mode 100755 index 000000000000..cdf4668ec16a --- /dev/null +++ b/keyboards/nk87/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 +# 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 +BLUETOOTH_ENABLE = no # Enable Bluetooth +AUDIO_ENABLE = no # Audio output + +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/chibios/i2c_master.c diff --git a/keyboards/wilba_tech/wt_rgb_backlight.c b/keyboards/wilba_tech/wt_rgb_backlight.c index 73d8208a7bfc..30c9c4c56d33 100644 --- a/keyboards/wilba_tech/wt_rgb_backlight.c +++ b/keyboards/wilba_tech/wt_rgb_backlight.c @@ -24,6 +24,7 @@ defined(RGB_BACKLIGHT_M65_BX) || \ defined(RGB_BACKLIGHT_HS60) || \ defined(RGB_BACKLIGHT_NK65) || \ + defined(RGB_BACKLIGHT_NK87) || \ defined(RGB_BACKLIGHT_NEBULA12) || \ defined(RGB_BACKLIGHT_NEBULA65) || \ defined(RGB_BACKLIGHT_U80_A) || \ @@ -49,7 +50,7 @@ #include "wt_rgb_backlight_api.h" #include "wt_rgb_backlight_keycodes.h" -#if !defined(RGB_BACKLIGHT_HS60) && !defined(RGB_BACKLIGHT_NK65) && !defined(RGB_BACKLIGHT_NEBULA65) && !defined(RGB_BACKLIGHT_NEBULA12) +#if !defined(RGB_BACKLIGHT_HS60) && !defined(RGB_BACKLIGHT_NK65) && !defined(RGB_BACKLIGHT_NK87) && !defined(RGB_BACKLIGHT_NEBULA65) && !defined(RGB_BACKLIGHT_NEBULA12) #include #include "drivers/avr/i2c_master.h" #else @@ -83,6 +84,9 @@ LED_TYPE g_ws2812_leds[WS2812_LED_TOTAL]; #elif defined(RGB_BACKLIGHT_NK65) || defined(RGB_BACKLIGHT_NEBULA65) #include "drivers/issi/is31fl3733.h" #define BACKLIGHT_LED_COUNT 69 +#elif defined(RGB_BACKLIGHT_NK87) +#include "drivers/issi/is31fl3733.h" +#define BACKLIGHT_LED_COUNT 128 #else #include "drivers/issi/is31fl3731.h" #if defined(RGB_BACKLIGHT_U80_A) @@ -223,7 +227,7 @@ const is31_led g_is31_leds[DRIVER_LED_TOTAL] = { {0, K_16, J_16, L_16}, //LA64 }; -#elif defined(RGB_BACKLIGHT_NK65) || defined(RGB_BACKLIGHT_NEBULA65) +#elif defined(RGB_BACKLIGHT_NK65) || defined(RGB_BACKLIGHT_NEBULA65) || defined(RGB_BACKLIGHT_NK87) // 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) @@ -1020,7 +1024,30 @@ const Point g_map_led_to_point_polar[BACKLIGHT_LED_COUNT] PROGMEM = { //LA62..LB5 {221,255}, {225,255}, {229,255}, {22,255}, {12,255}, {244,255}, {234,255}, {255,255} }; - +#elif defined(RGB_BACKLIGHT_NK87) +const Point g_map_led_to_point[BACKLIGHT_LED_COUNT] PROGMEM = { + {0,19}, {4,33}, {6,48}, {9,63}, {15,19}, {22,33}, {26,48}, {33,63}, {30,19}, {37,33}, {41,48}, {48,63}, {44,19}, {52,33}, {56,48}, {63,63}, + {59,19}, {67,33}, {70,48}, {78,63}, {74,19}, {81,33}, {85,48}, {93,63}, {89,19}, {96,33}, {100,48}, {107,63}, {104,19}, {111,33}, {115,48}, + {122,63}, {118,19}, {126,33}, {130,48}, {137,63}, {133,19}, {141,33}, {144,48}, {152,63}, {148,19}, {155,33}, {159,48}, {167,63}, {163,19}, + {170,33}, {174,48}, {226,78}, {178,19}, {185,33}, {194,63}, {241,63}, {200,19}, {204,33}, {198,48}, {241,78}, {4,78}, {22,78}, {41,78}, {104,78}, + {255,255}, {167,78}, {185,78}, {204,78}, {0,0}, {255,255}, {255,255}, {255,255}, {19,0}, {255,255}, {255,255}, {255,255}, {33,0}, {255,255}, + {255,255}, {255,78}, {48,0}, {255,255}, {255,255}, {255,255}, {63,0}, {255,255}, {255,255}, {255,255}, {81,0}, {255,255}, {255,255}, {255,255}, + {96,0}, {255,255}, {255,255}, {255,255}, {111,0}, {255,255}, {255,255}, {255,255}, {126,0}, {255,255}, {255,255}, {255,255}, {144,0}, {255,255}, + {255,255}, {255,255}, {159,0}, {255,255}, {255,255}, {255,255}, {174,0}, {255,255}, {255,255}, {255,255}, {189,0}, {255,255}, {226,33}, {226,19}, + {207,0}, {255,255}, {241,33}, {241,19}, {226,0}, {255,255}, {255,33}, {255,19}, {241,0}, {255,255}, {255,255}, {255,0} +}; +const Point g_map_led_to_point_polar[BACKLIGHT_LED_COUNT] PROGMEM = { + {104,255}, {120,242}, {141,246}, {157,255}, {101,255}, {119,208}, {143,210}, {162,255}, {99,251}, {118,180}, {145,183}, {165,248}, {95,230}, + {116,153}, {148,158}, {169,232}, {91,212}, {113,126}, {152,133}, {173,218}, {87,195}, {109,100}, {158,111}, {178,207}, {81,182}, {102,75}, + {167,92}, {184,200}, {75,172}, {89,55}, {179,79}, {190,196}, {68,167}, {67,45}, {194,75}, {196,197}, {61,166}, {43,52}, {208,82}, {201,201}, + {55,170}, {29,70}, {220,97}, {207,210}, {48,179}, {21,93}, {227,116}, {214,255}, {43,191}, {16,119}, {216,234}, {226,255}, {36,216}, {12,153}, + {235,155}, {216,255}, {166,255}, {169,255}, {172,255}, {186,255}, {255,255}, {201,255}, {206,255}, {210,255}, {91,255}, {255,255}, {255,255}, + {255,255}, {88,255}, {255,255}, {255,255}, {255,255}, {85,255}, {255,255}, {255,255}, {219,255}, {82,255}, {255,255}, {255,255}, {255,255}, + {79,255}, {255,255}, {255,255}, {255,255}, {75,255}, {255,255}, {255,255}, {255,255}, {72,255}, {255,255}, {255,255}, {255,255}, {68,255}, + {255,255}, {255,255}, {255,255}, {64,255}, {255,255}, {255,255}, {255,255}, {60,255}, {255,255}, {255,255}, {255,255}, {56,255}, {255,255}, + {255,255}, {255,255}, {53,255}, {255,255}, {255,255}, {255,255}, {50,255}, {255,255}, {10,194}, {29,251}, {46,255}, {255,255}, {8,222}, {27,255}, + {42,255}, {255,255}, {7,249}, {24,255}, {40,255}, {255,255}, {255,255}, {37,255} +}; #elif defined(RGB_BACKLIGHT_NEBULA12) const Point g_map_led_to_point[BACKLIGHT_LED_COUNT] PROGMEM = { // A1..A16 @@ -1034,7 +1061,6 @@ const Point g_map_led_to_point_polar[BACKLIGHT_LED_COUNT] PROGMEM = { {255,255}, {255,255}, {255,255}, {255,255}, {200,196}, {192,192}, {184,196}, {213,74} }; - #elif defined(RGB_BACKLIGHT_NEBULA65) const Point g_map_led_to_point[BACKLIGHT_LED_COUNT] PROGMEM = { // LA1..LA60 @@ -1058,7 +1084,6 @@ const Point g_map_led_to_point_polar[BACKLIGHT_LED_COUNT] PROGMEM = { //LA62..LB5 {207,255}, {213,255}, {218,255}, {35,255}, {21,255}, {19,255}, {224,255}, {32,255} }; - #elif defined(RGB_BACKLIGHT_M6_B) // M6-B is really simple: // 0 3 5 @@ -1172,7 +1197,7 @@ void map_led_to_point( uint8_t index, Point *point ) point->x = pgm_read_byte(addr); point->y = pgm_read_byte(addr+1); -#if defined(RGB_BACKLIGHT_M6_B) || defined(RGB_BACKLIGHT_M10_C) || defined(RGB_BACKLIGHT_HS60) || defined(RGB_BACKLIGHT_NK65) || defined(RGB_BACKLIGHT_NEBULA65) || defined(RGB_BACKLIGHT_NEBULA12) +#if defined(RGB_BACKLIGHT_M6_B) || defined(RGB_BACKLIGHT_M10_C) || defined(RGB_BACKLIGHT_HS60) || defined(RGB_BACKLIGHT_NK65) || defined(RGB_BACKLIGHT_NK87) || defined(RGB_BACKLIGHT_NEBULA65) || defined(RGB_BACKLIGHT_NEBULA12) return; #endif @@ -1389,6 +1414,22 @@ const uint8_t g_map_row_column_to_led[MATRIX_ROWS][MATRIX_COLS] PROGMEM = { { 4-1, 255, 8-1, 12-1, 16-1, 20-1, 24-1, 28-1, 32-1, 36-1, 40-1, 44-1, 51-1, 52-1, 3+64-1 }, { 57-1, 58-1, 59-1, 255, 255, 255, 60-1, 255, 255, 48-1, 62-1, 63-1, 64-1, 56-1, 4+64-1 } }; +#elif defined(RGB_BACKLIGHT_NK87) +// +// LB1, LB5, LB9, LB13, LB17, LB21, LB25, LB29, LB33, LB37, LB41, LB45, LB49, LB53, LB57, LB61, LB64, +// LA1, LA5, LA9, LA13, LA17, LA21, LA25, LA29, LA33, LA37, LA41, LA45, LA49, LA53, LB52, LB56, LB60, +// LA2, LA6, LA10, LA14, LA18, LA22, LA26, LA30, LA34, LA38, LA42, LA46, LA50, ---, LB51, LB55, LB59, +// LA3, LA7, LA11, LA15, LA19, LA23, LA27, LA31, LA35, LA39, LA43, LA47, LA54, LA55, ---, ---, ---, +// LA4, ---, LA8, LA12, LA16, LA20, LA24, LA28, LA32, LA36, LA40, LA44, LA51, ---, ---, LA52, ---, +// LA57, LA58, LA59, ---, ---, ---, LA60, ---, ---, ---, ---, LA62, LA63, LA64, LA48, LA56, LB12 +const uint8_t g_map_row_column_to_led[MATRIX_ROWS][MATRIX_COLS] PROGMEM = { + { 1+64-1, 5+64-1, 9+64-1, 13+64-1, 17+64-1, 21+64-1, 25+64-1, 29+64-1, 33+64-1, 37+64-1, 41+64-1, 45+64-1, 49+64-1, 53+64-1, 57+64-1, 61+64-1, 64+64-1 }, + { 1-1, 5-1, 9-1, 13-1, 17-1, 21-1, 25-1, 29-1, 33-1, 37-1, 41-1, 45-1, 49-1, 53-1, 52+64-1, 56+64-1, 60+64-1 }, + { 2-1, 6-1, 10-1, 14-1, 18-1, 22-1, 26-1, 30-1, 34-1, 38-1, 42-1, 46-1, 50-1, 255, 51+64-1, 55+64-1, 59+64-1 }, + { 3-1, 7-1, 11-1, 15-1, 19-1, 23-1, 27-1, 31-1, 35-1, 39-1, 43-1, 47-1, 54-1, 55-1, 255, 255, 255 }, + { 4-1, 255, 8-1, 12-1, 16-1, 20-1, 24-1, 28-1, 32-1, 36-1, 40-1, 44-1, 51-1, 255, 255, 52-1, 255 }, + { 57-1, 58-1, 59-1, 255, 255, 255, 60-1, 255, 255, 255, 255, 62-1, 63-1, 64-1, 48-1, 56-1, 12+64-1 } +}; #elif defined(RGB_BACKLIGHT_NEBULA12) // // A1, A2, A3, @@ -1463,7 +1504,7 @@ void backlight_update_pwm_buffers(void) #elif defined(RGB_BACKLIGHT_HS60) IS31FL3733_update_pwm_buffers( ISSI_ADDR_1, 0 ); IS31FL3733_update_led_control_registers( ISSI_ADDR_1, 0 ); -#elif defined(RGB_BACKLIGHT_NK65) || defined(RGB_BACKLIGHT_NEBULA65) +#elif defined(RGB_BACKLIGHT_NK65) || defined(RGB_BACKLIGHT_NEBULA65) || defined(RGB_BACKLIGHT_NK87) IS31FL3733_update_pwm_buffers( ISSI_ADDR_1, 0 ); IS31FL3733_update_pwm_buffers( ISSI_ADDR_2, 1 ); IS31FL3733_update_led_control_registers( ISSI_ADDR_1, 0 ); @@ -1503,6 +1544,11 @@ 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) || defined(RGB_BACKLIGHT_NEBULA65) IS31FL3733_set_color( index, red, green, blue ); +#elif defined(RGB_BACKLIGHT_NK87) + // This is done to avoid indicator LEDs being set + if (( index != 63+64-1 ) && ( index != 48+64-1 )) { + IS31FL3733_set_color( index, red, green, blue ); + } #elif defined(RGB_BACKLIGHT_DAWN60) if( index < DRIVER_LED_TOTAL ) { IS31FL3731_set_color( index, red, green, blue ); @@ -1526,6 +1572,13 @@ void backlight_set_color_all( uint8_t red, uint8_t green, uint8_t blue ) for (int i = 0; i < BACKLIGHT_LED_COUNT; i++) { IS31FL3733_set_color(i, red, green, blue); } +#elif defined(RGB_BACKLIGHT_NK87) + // This is done to avoid indicator LEDs being set + for (int i = 0; i < BACKLIGHT_LED_COUNT; i++) { + if (( i != 63+64-1 ) && ( i != 48+64-1 )) { + 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++) { @@ -1548,7 +1601,7 @@ void backlight_set_key_hit(uint8_t row, uint8_t column) g_any_key_hit = 0; } -#if !defined(RGB_BACKLIGHT_HS60) && !defined(RGB_BACKLIGHT_NK65) && !defined(RGB_BACKLIGHT_NEBULA65) && !defined(RGB_BACKLIGHT_NEBULA12) +#if !defined(RGB_BACKLIGHT_HS60) && !defined(RGB_BACKLIGHT_NK65) && !defined(RGB_BACKLIGHT_NEBULA65) && !defined(RGB_BACKLIGHT_NEBULA12) && !defined(RGB_BACKLIGHT_NK87) // This is (F_CPU/1024) / 20 Hz // = 15625 Hz / 20 Hz // = 781 @@ -1628,7 +1681,7 @@ void backlight_timer_disable(void) { gptStopTimer(&GPTD4); } -#endif //!defined(RGB_BACKLIGHT_HS60) && !defined(RGB_BACKLIGHT_NK65) && !defined(RGB_BACKLIGHT_NEBULA12) +#endif //!defined(RGB_BACKLIGHT_HS60) && !defined(RGB_BACKLIGHT_NK65) && !defined(RGB_BACKLIGHT_NEBULA65) && !defined(RGB_BACKLIGHT_NEBULA12) && !defined(RGB_BACKLIGHT_NK87) void backlight_set_suspend_state(bool state) { @@ -1748,6 +1801,15 @@ void backlight_effect_alphas_mods(void) { is_alpha = ( column < 16 ) && (( g_config.alphas_mods[row-1] & (1<= 2+64-1) && (index <= 4+64-1) ) || + ( (index >= 6+64-1) && (index <= 8+64-1) ) || + ( index == 10+64-1 ) || ( index == 11+64-1 ) || + ( (index >= 14+64-1) && (index <= 16+64-1) ) || + ( (index >= 18+64-1) && (index <= 20+64-1) ) || + ( (index >= 22+64-1) && (index <= 24+64-1) ) || + ( (index >= 26+64-1) && (index <= 28+64-1) ) || + ( (index >= 30+64-1) && (index <= 32+64-1) ) || + ( (index >= 34+64-1) && (index <= 36+64-1) ) || + ( (index >= 38+64-1) && (index <= 40+64-1) ) || + ( (index >= 42+64-1) && (index <= 44+64-1) ) || + ( (index >= 46+64-1) && (index <= 48+64-1) ) || + ( index == 50+64-1 ) || + ( index == 54+64-1 ) || + ( index == 58+64-1 ) || + ( index == 62+64-1 ) ); + // This only caches it for later + IS31FL3733_set_led_control_register( index, enabled, enabled, enabled ); + } + IS31FL3733_set_led_control_register( 48+64-1, 0, 0, 1 ); //Enable LB48 blue enable for indicators + // This actually updates the LED drivers + IS31FL3733_update_led_control_registers( ISSI_ADDR_1, 0 ); + IS31FL3733_update_led_control_registers( ISSI_ADDR_2, 1 ); #elif defined(RGB_BACKLIGHT_NEBULA65) IS31FL3733_init( ISSI_ADDR_1, 0 ); IS31FL3733_init( ISSI_ADDR_2, 0 ); From 37105225491b08c654e53690e9cf2d2df66d38aa Mon Sep 17 00:00:00 2001 From: mechlovin <57231893+mechlovin@users.noreply.github.com> Date: Wed, 19 Aug 2020 08:13:16 +0700 Subject: [PATCH 598/930] Refactor Adelais PCB (#10069) Enable RGBLIGHT for standard pcb rev2&3 * Update rules.mk * Update rules.mk --- keyboards/mechlovin/adelais/standard_led/rules.mk | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/keyboards/mechlovin/adelais/standard_led/rules.mk b/keyboards/mechlovin/adelais/standard_led/rules.mk index 34de30aa9710..a66d19314a64 100644 --- a/keyboards/mechlovin/adelais/standard_led/rules.mk +++ b/keyboards/mechlovin/adelais/standard_led/rules.mk @@ -1,3 +1,2 @@ - - +RGBLIGHT_ENABLE = yes DEFAULT_FOLDER = mechlovin/adelais/standard_led/rev2 \ No newline at end of file From 7c81ae287ce506980f5a858c226ea70c925443e4 Mon Sep 17 00:00:00 2001 From: kingwangwong <31333140+kingwangwong@users.noreply.github.com> Date: Tue, 18 Aug 2020 20:18:32 -0500 Subject: [PATCH 599/930] Changes to thevankeyboards/minivan:king keymap (#10032) * Changes to minivan layout --- .../minivan/keymaps/king/keymap.c | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) diff --git a/keyboards/thevankeyboards/minivan/keymaps/king/keymap.c b/keyboards/thevankeyboards/minivan/keymaps/king/keymap.c index 6b1e1769ef25..bcfbad2e0b1f 100644 --- a/keyboards/thevankeyboards/minivan/keymaps/king/keymap.c +++ b/keyboards/thevankeyboards/minivan/keymaps/king/keymap.c @@ -14,27 +14,25 @@ enum layer_names { const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* 0: Main Layer - * ┌─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────────┐ - * │ ESC │ Q │ W │ E │ R │ T │ Y │ U │ I │ O │ P │ENTER │ + * │ ESC │ Q │ W │ E │ R │ T │ Y │ U │ I │ O │ P │BKSPC │ * ├─────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────────┤ * │ TAB │ A │ S │ D │ F │ G │ H │ J │ K │ L │ ; │' │ * ├──────┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬─────┤ - * │ LSHFT │ Z │ X │ C │ V │ B │ N │ M │ , │ . │ / │MO(SL│ + * │ LSHFT │ Z │ X │ C │ V │ B │ N │ M │ , │ . │ / │ENTER│ * ├────────┬┴─────┴─┬───┴─┬───┴─────┴──┬──┴─────┴─────┴─┬───┴─┬───┴─┬───┴─────┤ - * │LCTRL │ LGUI │ LALT│SPACE(_NL) │MO(_NL) │BKSPC│ │MO(RL │ + * │LCTRL │ LGUI │ LALT│SPACE(_NL) │MO(_NL) │MO SL│ │MO(RL │ * └────────┴────────┴─────┴────────────┴────────────────┴─────┴─────┴─────────┘ */ [_ML] = LAYOUT( - 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_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, MO(_SL), - KC_LCTL, KC_LGUI, KC_LALT, SPC_FUN, MO(_NL), KC_BSPC, XXXXXXX, MO(_RL) + 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, SPC_FUN, MO(_NL), MO(_SL), XXXXXXX, MO(_RL) ), /* 1: Function Layer - * ┌─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────────┐ * │ │ │HOME │ UP │END │PGUP │ │ F1 │ F2 │ F3 │ F4 │ │ * ├─────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────────┤ @@ -55,7 +53,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* 2: Number Layer - * ┌─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────────┐ * │ ~ │ ! │ @ │ # │ $ │ % │ ^ │ & │ * │ ( │ ) │ │ * ├─────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────────┤ @@ -74,7 +71,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), /* 3: Symbol Layer - * ┌─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────────┐ * │ │ _ │ + │ { │ } │ | │ │ │ │ │ │ │ * ├─────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────────┤ @@ -93,7 +89,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), /* 4: Reset Layer - * ┌─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────────┐ * │RESET│ │ │ │ │ │ │ │ │ │ │ │ * ├─────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────────┤ @@ -111,4 +106,3 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX ) }; - From df1467c86d2abd08a1d34ac847452e06e51a5478 Mon Sep 17 00:00:00 2001 From: jotix <69703151+jotix@users.noreply.github.com> Date: Tue, 18 Aug 2020 22:48:40 -0300 Subject: [PATCH 600/930] [Keymap] jotix_ortho_4x12_layout (#10075) --- layouts/community/ortho_4x12/jotix/keymap.c | 71 ++++++++++++--------- layouts/community/ortho_4x12/jotix/rules.mk | 2 + 2 files changed, 44 insertions(+), 29 deletions(-) create mode 100644 layouts/community/ortho_4x12/jotix/rules.mk diff --git a/layouts/community/ortho_4x12/jotix/keymap.c b/layouts/community/ortho_4x12/jotix/keymap.c index 5c08f3a2ed08..699f94f67f33 100644 --- a/layouts/community/ortho_4x12/jotix/keymap.c +++ b/layouts/community/ortho_4x12/jotix/keymap.c @@ -2,14 +2,18 @@ enum layers { _QWERTY, - _LOWER, _RAISE, - _ADJUST + _LOWER, }; #define LOWER MO(_LOWER) #define RAISE MO(_RAISE) -#define TTLOWER TT(_LOWER) +#define TGRAISE TG(_RAISE) +#define RALT_QU RALT_T(KC_QUOT) + +static bool is_ctl_pressed; +static bool is_tab_pressed; +static bool is_bspc_pressed; const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { @@ -17,47 +21,35 @@ 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_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_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN,RALT_QU, // ├───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┤ 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,KC_RALT,TTLOWER,KC_SPC, KC_SPC, RAISE, KC_LEFT,KC_DOWN,KC_UP, KC_RGHT + KC_LCTL,KC_LGUI,KC_LALT,KC_DEL, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT,KC_DOWN,KC_UP, KC_RGHT // └───────┴───────┴───────┴───────┴───────┴───────┴───────┴───────┴───────┴───────┴───────┴───────┘ ), -[_LOWER] = 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_MINS,KC_EQL, KC_LBRC,KC_RBRC,KC_BSLS,KC_VOLU,KC_PSCR,KC_SLCK,KC_PAUS,_______,_______, -// ├───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┤ - _______,KC_UNDS,KC_PLUS,KC_LCBR,KC_RCBR,KC_PIPE,KC_VOLD,KC_MUTE,_______,_______,_______,_______, -// ├───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┤ - _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______ -// └───────┴───────┴───────┴───────┴───────┴───────┴───────┴───────┴───────┴───────┴───────┴───────┘ -), - [_RAISE] = 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_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, _______, // ├───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┤ - KC_CAPS,KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS,KC_EQL, KC_LBRC,KC_RBRC,KC_BSLS, + _______,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_UNDS,KC_PLUS,KC_LCBR,KC_RCBR,KC_PIPE, + _______,KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_GRV, _______,_______,_______,_______, // ├───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┤ _______,_______,_______,_______,_______,_______,_______,_______,KC_HOME,KC_PGDN,KC_PGUP,KC_END // └───────┴───────┴───────┴───────┴───────┴───────┴───────┴───────┴───────┴───────┴───────┴───────┘ ), -[_ADJUST] = LAYOUT_ortho_4x12 ( +[_LOWER] = LAYOUT_ortho_4x12 ( // ┌───────┬───────┬───────┬───────┬───────┬───────┬───────┬───────┬───────┬───────┬───────┬───────┐ - _______,RESET, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______, + _______,KC_EXLM,KC_AT, KC_HASH,KC_DLR, KC_PERC,KC_CIRC,KC_AMPR,KC_ASTR,KC_LPRN,KC_RPRN,_______, // ├───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┤ - _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, + _______,KC_VOLD,KC_MUTE,KC_VOLU,DM_REC1,DM_REC2,DM_RSTP,KC_UNDS,KC_PLUS,KC_LCBR,KC_RCBR,KC_PIPE, // ├───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┤ - _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, + _______,KC_MPRV,KC_MPLY,KC_MNXT,DM_PLY1,DM_PLY2,KC_CAPS,KC_TILD,KC_WH_D,KC_BTN1,KC_BTN2,KC_WH_U, // ├───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┤ - _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______ + _______,_______,_______,_______,_______,_______,TGRAISE,_______,KC_MS_L,KC_MS_D,KC_MS_U,KC_MS_R // └───────┴───────┴───────┴───────┴───────┴───────┴───────┴───────┴───────┴───────┴───────┴───────┘ ), @@ -65,9 +57,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { layer_state_t layer_state_set_user(layer_state_t state) { #ifdef JOTANCK_LEDS - writePin(JOTANCK_LED1, (get_highest_layer(state) == _LOWER)); + writePin(JOTANCK_LED2, (get_highest_layer(state) == _RAISE)); #endif - return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST); + return state; } bool led_update_user(led_t led_state) { @@ -77,7 +69,28 @@ bool led_update_user(led_t led_state) { } #ifdef JOTANCK_LEDS // CapsLock led - writePin(JOTANCK_LED2, led_state.caps_lock); + writePin(JOTANCK_LED1, led_state.caps_lock); #endif return true; -} \ No newline at end of file +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case KC_LCTL: + is_ctl_pressed = record->event.pressed; + break; + case KC_TAB: + is_tab_pressed = record->event.pressed; + break; + case KC_BSPC: + is_bspc_pressed = record->event.pressed; + break; + }; + return true; +} + +void matrix_scan_user(void) { + if (is_ctl_pressed && is_tab_pressed && is_bspc_pressed) { + reset_keyboard(); + } +} diff --git a/layouts/community/ortho_4x12/jotix/rules.mk b/layouts/community/ortho_4x12/jotix/rules.mk new file mode 100644 index 000000000000..a1adef2a6505 --- /dev/null +++ b/layouts/community/ortho_4x12/jotix/rules.mk @@ -0,0 +1,2 @@ +MOUSEKEY_ENABLE = yes +DYNAMIC_MACRO_ENABLE = yes From d9fe85592365259120d9f9e9cd24c8536ab95b98 Mon Sep 17 00:00:00 2001 From: Alpha Chen Date: Tue, 18 Aug 2020 19:21:50 -0700 Subject: [PATCH 601/930] [Keymap] update kejadlen keymaps (#9954) Standardizing my keymaps under my username, rather than a keymap name. --- keyboards/atreus/keymaps/alphadox/config.h | 3 - keyboards/atreus/keymaps/kejadlen/README.md | 4 ++ keyboards/atreus/keymaps/kejadlen/config.h | 14 +++++ .../keymaps/{alphadox => kejadlen}/keymap.c | 8 +-- keyboards/kyria/keymaps/kejadlen/config.h | 47 ++++++++++++++ keyboards/kyria/keymaps/kejadlen/keymap.c | 63 +++++++++++++++++++ keyboards/kyria/keymaps/kejadlen/rules.mk | 5 ++ .../ergodox/{alphadox => kejadlen}/config.h | 0 .../ergodox/{alphadox => kejadlen}/keymap.c | 14 ++--- .../ergodox/{alphadox => kejadlen}/rules.mk | 4 +- 10 files changed, 146 insertions(+), 16 deletions(-) delete mode 100644 keyboards/atreus/keymaps/alphadox/config.h create mode 100644 keyboards/atreus/keymaps/kejadlen/README.md create mode 100644 keyboards/atreus/keymaps/kejadlen/config.h rename keyboards/atreus/keymaps/{alphadox => kejadlen}/keymap.c (90%) create mode 100644 keyboards/kyria/keymaps/kejadlen/config.h create mode 100644 keyboards/kyria/keymaps/kejadlen/keymap.c create mode 100644 keyboards/kyria/keymaps/kejadlen/rules.mk rename layouts/community/ergodox/{alphadox => kejadlen}/config.h (100%) rename layouts/community/ergodox/{alphadox => kejadlen}/keymap.c (87%) rename layouts/community/ergodox/{alphadox => kejadlen}/rules.mk (84%) diff --git a/keyboards/atreus/keymaps/alphadox/config.h b/keyboards/atreus/keymaps/alphadox/config.h deleted file mode 100644 index 271f48d0011b..000000000000 --- a/keyboards/atreus/keymaps/alphadox/config.h +++ /dev/null @@ -1,3 +0,0 @@ -#pragma once - -// place overrides here diff --git a/keyboards/atreus/keymaps/kejadlen/README.md b/keyboards/atreus/keymaps/kejadlen/README.md new file mode 100644 index 000000000000..f3b8be3ee0ae --- /dev/null +++ b/keyboards/atreus/keymaps/kejadlen/README.md @@ -0,0 +1,4 @@ +```shell +make atreus/teensy2:kejadlen +make atreus/teensy2:kejadlen:flash +``` diff --git a/keyboards/atreus/keymaps/kejadlen/config.h b/keyboards/atreus/keymaps/kejadlen/config.h new file mode 100644 index 000000000000..03a48dcb4bf9 --- /dev/null +++ b/keyboards/atreus/keymaps/kejadlen/config.h @@ -0,0 +1,14 @@ +#pragma once + +#undef MATRIX_ROW_PINS +#undef MATRIX_COL_PINS +#define MATRIX_ROW_PINS { D0, D1, D2, D3 } +#define MATRIX_COL_PINS { F6, F5, F4, F1, F0, F7, B0, B1, B2, B3, B7 } +/* #define UNUSED_PINS */ + +#define DIODE_DIRECTION COL2ROW + +#define IGNORE_MOD_TAP_INTERRUPT +#define TAPPING_FORCE_HOLD + +#define USB_MAX_POWER_CONSUMPTION 50 diff --git a/keyboards/atreus/keymaps/alphadox/keymap.c b/keyboards/atreus/keymaps/kejadlen/keymap.c similarity index 90% rename from keyboards/atreus/keymaps/alphadox/keymap.c rename to keyboards/atreus/keymaps/kejadlen/keymap.c index 15485f287d8d..34a057c24088 100644 --- a/keyboards/atreus/keymaps/alphadox/keymap.c +++ b/keyboards/atreus/keymaps/kejadlen/keymap.c @@ -10,10 +10,10 @@ enum macro_id { const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [BASE] = LAYOUT( - KC_Q, KC_W, KC_D, KC_F, KC_K, KC_J, KC_U, KC_R, KC_L, KC_SCLN, - LT(ETC,KC_A), KC_S, KC_E, KC_T, KC_G, KC_Y, KC_N, KC_I, KC_O, KC_H, - SFT_T(KC_Z), KC_X, KC_C, KC_V, KC_B, KC_P, KC_M, KC_COMM, KC_DOT, SFT_T(KC_SLSH), - KC_GRV, KC_DEL, KC_LALT, GUI_T(KC_TAB), LT(SYMB,KC_BSPC), CTL_T(KC_ESC), SFT_T(KC_ENT), LT(SYMB,KC_SPC), GUI_T(KC_LEFT), KC_DOWN, KC_UP, LCAG_T(KC_RGHT) + KC_Q, KC_W, KC_D, KC_F, KC_K, KC_J, KC_U, KC_R, KC_L, KC_SCLN, + LT(ETC,KC_A), KC_S, KC_E, KC_T, KC_G, KC_Y, KC_N, KC_I, KC_O, KC_H, + SFT_T(KC_Z), KC_X, KC_C, KC_V, KC_B, KC_P, KC_M, KC_COMM, KC_DOT, SFT_T(KC_SLSH), + KC_GRV, KC_DEL, KC_LALT, GUI_T(KC_TAB), LT(SYMB,KC_BSPC), CTL_T(KC_ESC), SFT_T(KC_ENT), LT(SYMB,KC_SPC), GUI_T(KC_LEFT), ALT_T(KC_DOWN), KC_UP, LCAG_T(KC_RGHT) ), [SYMB] = LAYOUT( diff --git a/keyboards/kyria/keymaps/kejadlen/config.h b/keyboards/kyria/keymaps/kejadlen/config.h new file mode 100644 index 000000000000..3c0951f11206 --- /dev/null +++ b/keyboards/kyria/keymaps/kejadlen/config.h @@ -0,0 +1,47 @@ +/* Copyright 2019 Thomas Baart + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#pragma once + +#ifdef OLED_DRIVER_ENABLE + #define OLED_DISPLAY_128X64 +#endif + +#ifdef RGBLIGHT_ENABLE + #define RGBLIGHT_ANIMATIONS + #define RGBLIGHT_HUE_STEP 8 + #define RGBLIGHT_SAT_STEP 8 + #define RGBLIGHT_VAL_STEP 8 + #define RGBLIGHT_SLEEP +#endif + +// EC11K encoders have a different resolution than other EC11 encoders. +// When using the default resolution of 4, if you notice your encoder skipping +// every other tick, lower the resolution to 2. +#define ENCODER_RESOLUTION 2 + +// The Leader key allows to flexibly assign macros to key sequences. +#define LEADER_PER_KEY_TIMING +#define LEADER_TIMEOUT 350 + +#define TAPPING_TERM 200 + +// 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 + +// Allows media codes to properly register in macros and rotary encoder code +#define TAP_CODE_DELAY 10 diff --git a/keyboards/kyria/keymaps/kejadlen/keymap.c b/keyboards/kyria/keymaps/kejadlen/keymap.c new file mode 100644 index 000000000000..9de9be55525f --- /dev/null +++ b/keyboards/kyria/keymaps/kejadlen/keymap.c @@ -0,0 +1,63 @@ +/* Copyright 2019 Thomas Baart + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public 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 { + NOR = 0, + NAV, + SYM, + ETC, +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [NOR] = LAYOUT( + KC_NO, KC_Q, KC_W, KC_D, KC_F, KC_K, KC_J, KC_U, KC_R, KC_L, KC_SCLN, KC_BSLS, + KC_LSFT, KC_A, KC_S, KC_E, KC_T, KC_G, KC_Y, KC_N, KC_I, KC_O, KC_H, KC_QUOT, + KC_NO, KC_Z, KC_X, KC_C, KC_V, KC_B, MO(NAV), MO(ETC), MO(ETC), MO(NAV), KC_P, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, + LCAG_T(KC_NO), KC_LALT, GUI_T(KC_TAB), LT(SYM,KC_BSPC), CTL_T(KC_ESC), SFT_T(KC_ENT), LT(SYM,KC_SPC), GUI_T(KC_TAB), KC_LALT, RCAG_T(KC_NO) + ), + + [NAV] = LAYOUT( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MUTE, KC_NO, KC_NO, KC_NO, KC_NO, KC_TRNS, + KC_TRNS, KC_LSFT, KC_LCTL, KC_LOPT, KC_LCMD, KC_TRNS, KC_VOLU, KC_LEFT, KC_DOWN, KC_UP, 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_VOLD, KC_NO, KC_NO, KC_NO, KC_NO, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ), + + [SYM] = LAYOUT( + KC_TRNS, KC_EXLM, KC_AT, KC_LCBR, KC_RCBR, KC_PIPE, KC_EQL, KC_7, KC_8, KC_9, KC_PLUS, KC_TRNS, + KC_AMPR, KC_HASH, KC_DLR, KC_LPRN, KC_RPRN, KC_BSLS, KC_MINS, KC_4, KC_5, KC_6, KC_QUOT, KC_TRNS, + KC_GRV, KC_PERC, KC_CIRC, KC_LBRC, KC_RBRC, KC_ASTR, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_UNDS, KC_1, KC_2, KC_3, KC_DQUO, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_0, KC_DOT, KC_TRNS + ), + + [ETC] = LAYOUT( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_F7, KC_F8, KC_F9, KC_TRNS, KC_TRNS, + KC_TRNS, KC_LSFT, KC_LCTL, KC_LOPT, KC_LCMD, KC_TRNS, KC_TRNS, KC_F4, KC_F5, KC_F6, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_F1, KC_F2, KC_F3, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ), + + /* + [__TEMPLATE__] = 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, + ), + */ +}; diff --git a/keyboards/kyria/keymaps/kejadlen/rules.mk b/keyboards/kyria/keymaps/kejadlen/rules.mk new file mode 100644 index 000000000000..35ba17e4a233 --- /dev/null +++ b/keyboards/kyria/keymaps/kejadlen/rules.mk @@ -0,0 +1,5 @@ +OLED_DRIVER_ENABLE = no # Enables the use of OLED displays +ENCODER_ENABLE = no # Enables the use of one or more encoders +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +LEADER_ENABLE = no # Enable the Leader Key feature +MOUSEKEY_ENABLE = no diff --git a/layouts/community/ergodox/alphadox/config.h b/layouts/community/ergodox/kejadlen/config.h similarity index 100% rename from layouts/community/ergodox/alphadox/config.h rename to layouts/community/ergodox/kejadlen/config.h diff --git a/layouts/community/ergodox/alphadox/keymap.c b/layouts/community/ergodox/kejadlen/keymap.c similarity index 87% rename from layouts/community/ergodox/alphadox/keymap.c rename to layouts/community/ergodox/kejadlen/keymap.c index 75784f7a910b..cfeb7043041f 100644 --- a/layouts/community/ergodox/alphadox/keymap.c +++ b/layouts/community/ergodox/kejadlen/keymap.c @@ -22,14 +22,14 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_NO, LT(SYMB,KC_BSPC), CTL_T(KC_ESC), KC_NO, - KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, - KC_VOLU, KC_J, KC_U, KC_R, KC_L, KC_SCLN, KC_BSLS, - KC_Y, KC_N, KC_I, KC_O, KC_H, KC_QUOT, - KC_VOLD, KC_P, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, - GUI_T(KC_TAB), KC_LEFT, KC_DOWN, KC_UP, LCAG_T(KC_RGHT), - KC_NO, KC_NO, + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_VOLU, KC_J, KC_U, KC_R, KC_L, KC_SCLN, KC_BSLS, + KC_Y, KC_N, KC_I, KC_O, KC_H, KC_QUOT, + KC_VOLD, KC_P, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, + GUI_T(KC_TAB), ALT_T(KC_LEFT), KC_DOWN, KC_UP, LCAG_T(KC_RGHT), + KC_WAKE, KC_PWR, KC_NO, - KC_NO, SFT_T(KC_ENT), LT(SYMB,KC_SPC) + KC_NO, SFT_T(KC_ENT), LT(SYMB,KC_SPC) ), [SYMB] = LAYOUT_ergodox( diff --git a/layouts/community/ergodox/alphadox/rules.mk b/layouts/community/ergodox/kejadlen/rules.mk similarity index 84% rename from layouts/community/ergodox/alphadox/rules.mk rename to layouts/community/ergodox/kejadlen/rules.mk index 57c62a5e63b3..8e86848283da 100644 --- a/layouts/community/ergodox/alphadox/rules.mk +++ b/layouts/community/ergodox/kejadlen/rules.mk @@ -9,5 +9,5 @@ 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 +RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. +SLEEP_LED_ENABLE = yes # Breathing sleep LED during USB suspend From d57bd0f65ca18b854dfdfe019f53474d47bf7b53 Mon Sep 17 00:00:00 2001 From: jackytrabbit Date: Wed, 19 Aug 2020 10:29:09 +0800 Subject: [PATCH 602/930] [Keyboard] Add support for keyboard 'Bolt' (#10046) * Add support for keyboard 'Bolt' Add support for keyboard 'Bolt' * Update info.json * Update info.json * Update keyboards/lazydesigners/bolt/config.h Co-authored-by: Joel Challis * Update keyboards/lazydesigners/bolt/rules.mk Co-authored-by: Joel Challis * Update keyboards/lazydesigners/bolt/readme.md Co-authored-by: Joel Challis * Update info.json * Update keyboards/lazydesigners/bolt/info.json Co-authored-by: Ryan * Update keyboards/lazydesigners/bolt/bolt.h Co-authored-by: James Young <18669334+noroadsleft@users.noreply.github.com> * Update keyboards/lazydesigners/bolt/info.json Co-authored-by: James Young <18669334+noroadsleft@users.noreply.github.com> * Update keyboards/lazydesigners/bolt/keymaps/default/keymap.c Co-authored-by: James Young <18669334+noroadsleft@users.noreply.github.com> * Update keyboards/lazydesigners/bolt/info.json Co-authored-by: James Young <18669334+noroadsleft@users.noreply.github.com> * Update keyboards/lazydesigners/bolt/keymaps/default/keymap.c Co-authored-by: James Young <18669334+noroadsleft@users.noreply.github.com> * Update keyboards/lazydesigners/bolt/keymaps/default/keymap.c Co-authored-by: James Young <18669334+noroadsleft@users.noreply.github.com> Co-authored-by: Joel Challis Co-authored-by: Ryan Co-authored-by: James Young <18669334+noroadsleft@users.noreply.github.com> --- keyboards/lazydesigners/bolt/bolt.c | 1 + keyboards/lazydesigners/bolt/bolt.h | 32 ++++++++++ keyboards/lazydesigners/bolt/config.h | 47 +++++++++++++++ keyboards/lazydesigners/bolt/info.json | 59 +++++++++++++++++++ .../bolt/keymaps/default/keymap.c | 40 +++++++++++++ keyboards/lazydesigners/bolt/readme.md | 21 +++++++ keyboards/lazydesigners/bolt/rules.mk | 22 +++++++ 7 files changed, 222 insertions(+) create mode 100644 keyboards/lazydesigners/bolt/bolt.c create mode 100644 keyboards/lazydesigners/bolt/bolt.h create mode 100644 keyboards/lazydesigners/bolt/config.h create mode 100644 keyboards/lazydesigners/bolt/info.json create mode 100644 keyboards/lazydesigners/bolt/keymaps/default/keymap.c create mode 100644 keyboards/lazydesigners/bolt/readme.md create mode 100644 keyboards/lazydesigners/bolt/rules.mk diff --git a/keyboards/lazydesigners/bolt/bolt.c b/keyboards/lazydesigners/bolt/bolt.c new file mode 100644 index 000000000000..074d6bfd5ae0 --- /dev/null +++ b/keyboards/lazydesigners/bolt/bolt.c @@ -0,0 +1 @@ +#include "bolt.h" diff --git a/keyboards/lazydesigners/bolt/bolt.h b/keyboards/lazydesigners/bolt/bolt.h new file mode 100644 index 000000000000..412ed7b09966 --- /dev/null +++ b/keyboards/lazydesigners/bolt/bolt.h @@ -0,0 +1,32 @@ +/* +Copyright 2020 LAZYDESIGNERS + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License 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, \ + K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, \ + K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K311, \ + K300, K301, K303, K304, K306, K307, K308, K309, K310 \ +) { \ + { 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, KC_NO, K303, K304, KC_NO, K306, K307, K308, K309, K310, K311 } \ +} diff --git a/keyboards/lazydesigners/bolt/config.h b/keyboards/lazydesigners/bolt/config.h new file mode 100644 index 000000000000..37006c19e3d6 --- /dev/null +++ b/keyboards/lazydesigners/bolt/config.h @@ -0,0 +1,47 @@ +/* +Copyright 2020 LAZYDESIGNERS + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License 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 0x4C44 // "LD" +#define PRODUCT_ID 0x0041 +#define DEVICE_VER 0x0001 +#define MANUFACTURER LAZYDESIGNERS +#define PRODUCT Bolt + +/* key matrix size */ +#define MATRIX_ROWS 4 +#define MATRIX_COLS 12 + +#define MATRIX_ROW_PINS { F0, C7, B6, D5 } +#define MATRIX_COL_PINS { F1, F4, F5, F6, F7, C6, B3, B7, D0, D3, D2, D1 } + +#define DIODE_DIRECTION COL2ROW + +/* RBG underglow */ +#define RGB_DI_PIN E6 +#ifdef RGB_DI_PIN + #define RGBLIGHT_ANIMATIONS + #define RGBLIGHT_SLEEP + #define RGBLED_NUM 13 + /* #define RGBLIGHT_HUE_STEP 8 */ + /* #define RGBLIGHT_SAT_STEP 8 */ + /* #define RGBLIGHT_VAL_STEP 8 */ +#endif diff --git a/keyboards/lazydesigners/bolt/info.json b/keyboards/lazydesigners/bolt/info.json new file mode 100644 index 000000000000..ee2756bbe7a6 --- /dev/null +++ b/keyboards/lazydesigners/bolt/info.json @@ -0,0 +1,59 @@ +{ + "keyboard_name": "Bolt", + "url": "http://lazydesigners.cn", + "maintainer": "LAZYDESIGNERS", + "width": 14.25, + "height": 4, + "layouts": { + "LAYOUT": { + "layout": [ + {"label":"K000 (F0,F1)", "x":0, "y":0}, + {"label":"K001 (F0,F4)", "x":1, "y":0}, + {"label":"K002 (F0,F5)", "x":2, "y":0}, + {"label":"K003 (F0,F6)", "x":3, "y":0}, + {"label":"K004 (F0,F7)", "x":4, "y":0}, + {"label":"K005 (F0,C6)", "x":5, "y":0}, + {"label":"K006 (F0,B3)", "x":7.5, "y":0}, + {"label":"K007 (F0,B7)", "x":8.5, "y":0}, + {"label":"K008 (F0,D0)", "x":9.5, "y":0}, + {"label":"K009 (F0,D3)", "x":10.5, "y":0}, + {"label":"K010 (F0,D2)", "x":11.5, "y":0}, + {"label":"K011 (F0,D1)", "x":12.5, "y":0, "w":1.75}, + {"label":"K100 (C7,F1)", "x":0, "y":1, "w":1.25}, + {"label":"K101 (C7,F4)", "x":1.25, "y":1}, + {"label":"K102 (C7,F5)", "x":2.25, "y":1}, + {"label":"K103 (C7,F6)", "x":3.25, "y":1}, + {"label":"K104 (C7,F7)", "x":4.25, "y":1}, + {"label":"K105 (C7,C6)", "x":5.25, "y":1}, + {"label":"K106 (C7,B3)", "x":7.75, "y":1}, + {"label":"K107 (C7,B7)", "x":8.75, "y":1}, + {"label":"K108 (C7,D0)", "x":9.75, "y":1}, + {"label":"K109 (C7,D3)", "x":10.75, "y":1}, + {"label":"K110 (C7,D2)", "x":11.75, "y":1}, + {"label":"K111 (C7,D1)", "x":12.75, "y":1, "w":1.5}, + {"label":"K200 (B6,F1)", "x":0, "y":2, "w":1.75}, + {"label":"K201 (B6,F4)", "x":1.75, "y":2}, + {"label":"K202 (B6,F5)", "x":2.75, "y":2}, + {"label":"K203 (B6,F6)", "x":3.75, "y":2}, + {"label":"K204 (B6,F7)", "x":4.75, "y":2}, + {"label":"K205 (B6,C6)", "x":5.75, "y":2}, + {"label":"K206 (B6,B3)", "x":7.25, "y":2}, + {"label":"K207 (B6,B7)", "x":8.25, "y":2}, + {"label":"K208 (B6,D0)", "x":9.25, "y":2}, + {"label":"K209 (B6,D3)", "x":10.25, "y":2}, + {"label":"K210 (B6,D2)", "x":11.25, "y":2}, + {"label":"K211 (B6,D1)", "x":12.25, "y":2}, + {"label":"K311 (D5,D1)", "x":13.25, "y":2}, + {"label":"K300 (D5,F1)", "x":0, "y":3, "w":1.25}, + {"label":"K301 (D5,F4)", "x":1.25, "y":3, "w":1.25}, + {"label":"K303 (D5,F6)", "x":3.25, "y":3, "w":1.25}, + {"label":"K304 (D5,F7)", "x":4.5, "y":3, "w":2.25}, + {"label":"K306 (D5,B3)", "x":7.25, "y":3, "w":2.25}, + {"label":"K307 (D5,B7)", "x":9.5, "y":3}, + {"label":"K308 (D5,D0)", "x":11.25, "y":3}, + {"label":"K309 (D5,D3)", "x":12.25, "y":3}, + {"label":"K310 (D5,D2)", "x":13.25, "y":3} + ] + } + } +} diff --git a/keyboards/lazydesigners/bolt/keymaps/default/keymap.c b/keyboards/lazydesigners/bolt/keymaps/default/keymap.c new file mode 100644 index 000000000000..d410e60a530b --- /dev/null +++ b/keyboards/lazydesigners/bolt/keymaps/default/keymap.c @@ -0,0 +1,40 @@ +/* Copyright 2020 LAZYDESIGNERS + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public 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 LT2_TAB LT(2, KC_TAB) +#define LT1_SPC LT(1, KC_SPC) + +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_BSPC, + LT2_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_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_UP, MO(2), + KC_LCTL, KC_LALT, KC_LGUI, LT1_SPC, KC_SPC, LT1_SPC, KC_LEFT, KC_DOWN, KC_RGHT + ), + [1] = LAYOUT( + RESET, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_NO, + KC_INS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, + 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_VOLD, KC_MUTE, KC_VOLU, KC_TRNS, KC_TRNS, KC_NO, KC_NO, KC_NO, KC_NO + ), + [2] = LAYOUT( + 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_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO + ), +}; diff --git a/keyboards/lazydesigners/bolt/readme.md b/keyboards/lazydesigners/bolt/readme.md new file mode 100644 index 000000000000..d89bca097e8e --- /dev/null +++ b/keyboards/lazydesigners/bolt/readme.md @@ -0,0 +1,21 @@ +# Bolt + +![bolt](https://i.loli.net/2020/07/15/whZWXe1Il2cEftR.jpg) + +A 40% ergo keyboard designed and produced by [LAZYDESIGNERS](http://lazydesigners.cn). + +* Keyboard Maintainer: [LAZYDESIGNERS](https://github.com/jackytrabbit) +* Hardware Supported: Bolt +* Hardware Availability: Check [LAZYDESIGNERS's homepage.](http://lazydesigners.cn) + +Make example for this keyboard (after setting up your build environment): + + make lazydesigners/bolt:default + +Flashing example for this keyboard: + + make lazydesigners/bolt:default:flash + +**Reset Key:** To enter the bootloader, either push the RESET button on the PCB or the RESET button on the FN layer. + +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/lazydesigners/bolt/rules.mk b/keyboards/lazydesigners/bolt/rules.mk new file mode 100644 index 000000000000..38ce53e3096f --- /dev/null +++ b/keyboards/lazydesigners/bolt/rules.mk @@ -0,0 +1,22 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +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 +BLUETOOTH_ENABLE = no # Enable Bluetooth +AUDIO_ENABLE = no # Audio output From 79f080a43f005293c4442cbd7190533ad878526d Mon Sep 17 00:00:00 2001 From: Xelus22 <17491233+Xelus22@users.noreply.github.com> Date: Wed, 19 Aug 2020 13:20:22 +1000 Subject: [PATCH 603/930] [Keyboard] add Xelus Valor (#10079) * praxis avr * rgb * valor initial * rgb limit * readme update * update rules.mk and include valor * update readme * Update rules.mk * update readme and copyright + layout macro * oops didnt save --- keyboards/xelus/valor/config.h | 53 +++++++++++++++++++ .../xelus/valor/keymaps/default/keymap.c | 34 ++++++++++++ .../xelus/valor/keymaps/default/readme.md | 2 + keyboards/xelus/valor/keymaps/via/keymap.c | 50 +++++++++++++++++ keyboards/xelus/valor/keymaps/via/readme.md | 2 + keyboards/xelus/valor/keymaps/via/rules.mk | 1 + keyboards/xelus/valor/readme.md | 13 +++++ keyboards/xelus/valor/rules.mk | 23 ++++++++ keyboards/xelus/valor/valor.c | 19 +++++++ keyboards/xelus/valor/valor.h | 35 ++++++++++++ 10 files changed, 232 insertions(+) create mode 100644 keyboards/xelus/valor/config.h create mode 100644 keyboards/xelus/valor/keymaps/default/keymap.c create mode 100644 keyboards/xelus/valor/keymaps/default/readme.md create mode 100644 keyboards/xelus/valor/keymaps/via/keymap.c create mode 100644 keyboards/xelus/valor/keymaps/via/readme.md create mode 100644 keyboards/xelus/valor/keymaps/via/rules.mk create mode 100644 keyboards/xelus/valor/readme.md create mode 100644 keyboards/xelus/valor/rules.mk create mode 100644 keyboards/xelus/valor/valor.c create mode 100644 keyboards/xelus/valor/valor.h diff --git a/keyboards/xelus/valor/config.h b/keyboards/xelus/valor/config.h new file mode 100644 index 000000000000..a45ecbc07941 --- /dev/null +++ b/keyboards/xelus/valor/config.h @@ -0,0 +1,53 @@ +/* Copyright 2020 Harrison Chan (Xelus) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License 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 0x5652 // Valor "VR" +#define DEVICE_VER 0x0001 +#define MANUFACTURER Xelus +#define PRODUCT Xelus Valor + +/* key matrix size */ +#define MATRIX_ROWS 5 +#define MATRIX_COLS 15 + +/* key matrix pins */ +#define MATRIX_ROW_PINS { B1, B2, C7, C6, B6 } +#define MATRIX_COL_PINS { E6, F0, F1, F4, F5, F6, F7, B5, B4, D7, D6, D4, D5, D3, D2 } +#define UNUSED_PINS + +/* RGB Underglow */ +#define RGB_DI_PIN B0 +#define RGBLED_NUM 28 +#define RGBLIGHT_ANIMATIONS +#define RGBLIGHT_LIMIT_VAL 200 + +/* 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/xelus/valor/keymaps/default/keymap.c b/keyboards/xelus/valor/keymaps/default/keymap.c new file mode 100644 index 000000000000..3cf8111e97c1 --- /dev/null +++ b/keyboards/xelus/valor/keymaps/default/keymap.c @@ -0,0 +1,34 @@ +/* Copyright 2020 Harrison Chan (Xelus) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public 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_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_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, 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_RGUI, + KC_LCTL, KC_LALT, KC_SPC, MO(1), KC_SPC, KC_RALT, KC_RCTL + ), + + [1] = LAYOUT_all( + RGB_TOG, 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, + 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, + 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 + ) +}; diff --git a/keyboards/xelus/valor/keymaps/default/readme.md b/keyboards/xelus/valor/keymaps/default/readme.md new file mode 100644 index 000000000000..d596c606c7aa --- /dev/null +++ b/keyboards/xelus/valor/keymaps/default/readme.md @@ -0,0 +1,2 @@ +# The Default Valor Layout + diff --git a/keyboards/xelus/valor/keymaps/via/keymap.c b/keyboards/xelus/valor/keymaps/via/keymap.c new file mode 100644 index 000000000000..b3395f1dfbb6 --- /dev/null +++ b/keyboards/xelus/valor/keymaps/via/keymap.c @@ -0,0 +1,50 @@ +/* Copyright 2020 Harrison Chan (Xelus) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public 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_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_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, 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_RGUI, + KC_LCTL, KC_LALT, KC_SPC, MO(1), KC_SPC, KC_RALT, KC_RCTL + ), + + [1] = LAYOUT_all( + RGB_TOG, 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, + 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, + 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 + ), + + [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/xelus/valor/keymaps/via/readme.md b/keyboards/xelus/valor/keymaps/via/readme.md new file mode 100644 index 000000000000..1efb713ba941 --- /dev/null +++ b/keyboards/xelus/valor/keymaps/via/readme.md @@ -0,0 +1,2 @@ +# The VIA Valor Layout + diff --git a/keyboards/xelus/valor/keymaps/via/rules.mk b/keyboards/xelus/valor/keymaps/via/rules.mk new file mode 100644 index 000000000000..1e5b99807cb7 --- /dev/null +++ b/keyboards/xelus/valor/keymaps/via/rules.mk @@ -0,0 +1 @@ +VIA_ENABLE = yes diff --git a/keyboards/xelus/valor/readme.md b/keyboards/xelus/valor/readme.md new file mode 100644 index 000000000000..85cc9ad7236e --- /dev/null +++ b/keyboards/xelus/valor/readme.md @@ -0,0 +1,13 @@ +# Valor + +An Alice replacement keyboard PCB. + +* Keyboard Maintainer: [Xelus22](https://github.com/Xelus22) +* Hardware Supported: Valor +* Hardware Availability: Custom keyboard group buys + +Make example for this keyboard (after setting up your build environment): + + make xelus/valor: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/xelus/valor/rules.mk b/keyboards/xelus/valor/rules.mk new file mode 100644 index 000000000000..f244afd31c8d --- /dev/null +++ b/keyboards/xelus/valor/rules.mk @@ -0,0 +1,23 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +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 = 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 +BLUETOOTH_ENABLE = no # Enable Bluetooth +AUDIO_ENABLE = no # Audio output +LTO_ENABLE = yes diff --git a/keyboards/xelus/valor/valor.c b/keyboards/xelus/valor/valor.c new file mode 100644 index 000000000000..5157a2c730e9 --- /dev/null +++ b/keyboards/xelus/valor/valor.c @@ -0,0 +1,19 @@ +/* Copyright 2020 Harrison Chan (Xelus) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General 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 "valor.h" \ No newline at end of file diff --git a/keyboards/xelus/valor/valor.h b/keyboards/xelus/valor/valor.h new file mode 100644 index 000000000000..c43274605de4 --- /dev/null +++ b/keyboards/xelus/valor/valor.h @@ -0,0 +1,35 @@ +/* Copyright 2020 Harrison Chan (Xelus) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License 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 + +#define LAYOUT_all( \ + K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, K214, \ + 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, \ + K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, K314, \ + K401, K403, K405, K406, K408, K410, 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, K213, K214 }, \ + { ____, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, K314 }, \ + { ____, K401, ____, K403, ____, K405, K406, ____, K408, ____, K410, ____, ____, K413, ____ } \ +} From 993d4058a1537f82ee8eb0006e155ac8c8620af1 Mon Sep 17 00:00:00 2001 From: Sendy YK Date: Thu, 20 Aug 2020 01:16:10 +0700 Subject: [PATCH 604/930] 60_ansi_arrows Community Layout; mrsendyyk keymaps for dz60 and maartenwut/eon65 (#9993) * Add Layout and Keymap * Add and Update Keymap * Update readme.md * Update keymap.c * Update readme.md * Update * delete * update * Revert "update" This reverts commit 91a3ff800c043094469dd0bb60cc454857b3a2d0. * Update config.h remove `DESCRIPTION` as per PR checklist * Update config.h * Revert "Update config.h" This reverts commit 269df0535efb4548828463eecc3a022c99d98949. * Revert "Update config.h" This reverts commit cad5a3320123da4694f09fb4e3ac08cc75bab1cc. * Update keyboards/dz60/dz60.h * Update keyboards/dz60/keymaps/mrsendyyk/keymap.c * Update keyboards/dz60/keymaps/mrsendyyk/keymap.c * Update keyboards/dz60/keymaps/mrsendyyk/keymap.c * Update keyboards/dz60/keymaps/mrsendyyk/keymap.c * Update keyboards/dz60/keymaps/mrsendyyk/keymap.c * Update keyboards/dz60/keymaps/mrsendyyk/keymap.c * Update keyboards/dz60/keymaps/mrsendyyk/keymap.c * Update keymap.c * Update keymap.c * Update keymap.c * Update dz60.h * Update keymap.c * Update readme.md * Update keymap.c * Update keymap.c * Update readme.md * Update dz60.h * Update keymap.c * Update readme.md * Update readme.md * Update * Update keymap.c * Update keymap.c * Update keymap.c * Update readme.md * Update keymap.c * Update readme.md * Update readme.md * Update keymap.c * Update readme.md * Update readme.md * Update readme.md * Update readme.md * Update readme.md * Rename readme.md to README.md * Rename readme.md to README.md * Rename README.md to readme.md * Rename README.md to readme.md * Update rules.mk * Update dz60.h * Update keymap.c * Update readme.md * Update keymap.c * Update readme.md * Update * Update keymap.c * Update keymap.c * Update keymap.c * Update keymap.c * Update readme.md * Update info.json * Update keyboards/dz60/dz60.h * Update keyboards/dz60/dz60.h * Update keyboards/dz60/rules.mk * Update layouts/community/60_ansi_arrow/mrsendyyk/keymap.c * Update layouts/community/60_ansi_arrow/mrsendyyk/keymap.c * Update layouts/community/60_ansi_arrow/mrsendyyk/keymap.c * Update layouts/community/60_ansi_arrow/readme.md * Update layouts/default/60_ansi_arrow/default_60_ansi_arrow/keymap.c * Update layouts/default/60_ansi_arrow/default_60_ansi_arrow/keymap.c * Update layouts/default/60_ansi_arrow/default_60_ansi_arrow/keymap.c * Update layouts/default/60_ansi_arrow/readme.md * Update layouts/community/60_ansi_arrow/mrsendyyk/readme.md * Update layouts/community/60_ansi_arrow/mrsendyyk/readme.md * Update layouts/community/60_ansi_arrow/readme.md * Update layouts/community/60_ansi_arrow/readme.md * Update layouts/community/60_ansi_arrow/readme.md * Update layouts/community/60_ansi_arrow/readme.md * Update layouts/community/60_ansi_arrow/readme.md * Update keymap.c * Update readme.md * Update keymap.c * Update keymap.c * Update readme.md --- keyboards/dz60/dz60.h | 28 ++++ keyboards/dz60/keymaps/mrsendyyk/keymap.c | 147 ++++++++++++------ keyboards/dz60/keymaps/mrsendyyk/readme.md | 80 +++++----- keyboards/dz60/rules.mk | 13 +- .../eon65/keymaps/mrsendyyk/keymap.c | 46 ++++++ .../eon65/keymaps/mrsendyyk/readme.md | 38 +++++ layouts/community/60_ansi_arrow/layout.json | 6 + .../60_ansi_arrow/mrsendyyk/keymap.c | 115 ++++++++++++++ .../60_ansi_arrow/mrsendyyk/readme.md | 50 ++++++ .../60_ansi_arrow/mrsendyyk/rules.mk | 1 + layouts/community/60_ansi_arrow/readme.md | 114 ++++++++++++++ .../default_60_ansi_arrow/keymap.c | 67 ++++++++ layouts/default/60_ansi_arrow/info.json | 80 ++++++++++ layouts/default/60_ansi_arrow/layout.json | 6 + layouts/default/60_ansi_arrow/readme.md | 50 ++++++ 15 files changed, 748 insertions(+), 93 deletions(-) create mode 100644 keyboards/maartenwut/eon65/keymaps/mrsendyyk/keymap.c create mode 100644 keyboards/maartenwut/eon65/keymaps/mrsendyyk/readme.md create mode 100644 layouts/community/60_ansi_arrow/layout.json create mode 100644 layouts/community/60_ansi_arrow/mrsendyyk/keymap.c create mode 100644 layouts/community/60_ansi_arrow/mrsendyyk/readme.md create mode 100644 layouts/community/60_ansi_arrow/mrsendyyk/rules.mk create mode 100644 layouts/community/60_ansi_arrow/readme.md create mode 100644 layouts/default/60_ansi_arrow/default_60_ansi_arrow/keymap.c create mode 100644 layouts/default/60_ansi_arrow/info.json create mode 100644 layouts/default/60_ansi_arrow/layout.json create mode 100644 layouts/default/60_ansi_arrow/readme.md diff --git a/keyboards/dz60/dz60.h b/keyboards/dz60/dz60.h index a718c454a0c0..8638dc87922f 100644 --- a/keyboards/dz60/dz60.h +++ b/keyboards/dz60/dz60.h @@ -32,6 +32,34 @@ { k40, k41, KC_NO, k43, k44, KC_NO, k46, KC_NO, k48, KC_NO, k4a, k4b, k4c, k4d, k4e } \ } +/* + * LAYOUT_60_ansi_arrow + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ + * │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 │1e │ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤ + * │20 │22 │23 │24 │25 │26 │27 │28 │29 │2a │2b │2c │2d │ + * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴┬───┬───┤ + * │30 │32 │33 │34 │35 │36 │37 │38 │39 │3a │3c │3d │3e │ + * ├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴──┬┴──┬───┼───┼───┤ + * │40 │41 │43 │46 │4a │4b │4c │4d │4e │ + * └────┴────┴────┴────────────────────────┴───┴───┴───┴───┴───┘ + */ +#define LAYOUT_60_ansi_arrow( \ + 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, 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, KC_NO, k32, k33, k34, k35, k36, k37, k38, k39, k3a, KC_NO, k3c, k3d, k3e }, \ + { k40, k41, KC_NO, k43, KC_NO, KC_NO, k46, KC_NO, KC_NO, KC_NO, k4a, k4b, k4c, k4d, k4e } \ +} + /* LAYOUT_true_hhkb * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐ * │00 │01 │02 │03 │04 │05 │06 │07 │08 │09 │0a │0b │0c │0d │0e │ diff --git a/keyboards/dz60/keymaps/mrsendyyk/keymap.c b/keyboards/dz60/keymaps/mrsendyyk/keymap.c index fed671d83f08..4b0b33e2c880 100644 --- a/keyboards/dz60/keymaps/mrsendyyk/keymap.c +++ b/keyboards/dz60/keymaps/mrsendyyk/keymap.c @@ -1,62 +1,115 @@ #include QMK_KEYBOARD_H -// KBDfans DZ60 - ANSI with Arrow - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - - /* Qwerty [0] - * ,-----------------------------------------------------------------------------------------. - * | Esc | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | Backspace | - * |-----------------------------------------------------------------------------------------+ - * | Tab | Q | W | E | R | T | Y | U | I | O | P | [ | ] | \ | - * |-----------------------------------------------------------------------------------------+ - * |Caps Lock| A | S | D | F | G | H | J | K | L | ; | ' | Enter | - * |-----------------------------------------------------------------------------------------+ - * | Shift | Z | X | C | V | B | N | M | , | . | RShift | Up | / | - * |-----------------------------------------------------------------------------------------+ - * | Ctrl | OS | Alt | Space | RAlt | Fn |Left |Down |Right| - * `-----------------------------------------------------------------------------------------' + + /* + * Default Layer [0] + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ + * │Esc│1 │2 │3 │4 │5 │6 │7 │8 │9 │0 │- │= │Bspc │ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ + * │Tab │Q │W │E │R │T │Y │U │I │O │P │[ │] │\ │ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤ + * │Caps L│A │S │D │F │G │H │J │K │L │; │' │Enter │ + * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴┬───┬───┤ + * │Shift │Z │X │C │V │B │N │M │, │. │Shift │↑ │/ │ + * ├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴──┬┴──┬───┼───┼───┤ + * │Ctl │OS │Alt │ Space │Alt│Ctl│← │↓ │→ │ + * └────┴────┴────┴────────────────────────┴───┴───┴───┴───┴───┘ */ + [0] = LAYOUT_60_ansi_arrow(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_RSFT, KC_UP, KC_SLSH, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, LT(2, KC_RALT), LT(1, KC_RCTL), KC_LEFT, KC_DOWN, KC_RGHT + ), - [0] = LAYOUT_60_b_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_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_SPC, KC_SPC, KC_RALT, MO(1), KC_LEFT, KC_DOWN, KC_RGHT), - - /* Fn Layer [1] - * ,-----------------------------------------------------------------------------------------. - * | ` ~ | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | Delete | - * |-----------------------------------------------------------------------------------------+ - * | Bri Up | | | End | Rst | | | | Ins | | P Sc| | | Eject | - * |-----------------------------------------------------------------------------------------+ - * | Bri Down| | S L | | | | Home| | | | | | Mute | - * |-----------------------------------------------------------------------------------------+ - * | Vol + | | | Calc| | | | Mail| | | |Pg U |Pause| - * |-----------------------------------------------------------------------------------------+ - * | Vol - | Rwd | F Fd | Play | M Stp| | Prev| Pg D| Next| - * `-----------------------------------------------------------------------------------------' + /* + * Fn Layer [1] + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ + * │` │F1 │F2 │F3 │F4 │F5 │F6 │F7 │F8 │F9 │F10│F11│F12│Delete │ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ + * │Bri+ │ │ │End│Rst│ │ │ │Ins│ │P S│ │ │Eject│ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤ + * │Bri- │ │S L│ │ │ │Hm │ │ │ │ │ │Mute │ + * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴┬───┬───┤ + * │Vol+ │ │ │Cal│ │ │N L│Ml │ │ │Pause │P U│ │ + * ├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴──┬┴──┬───┼───┼───┤ + * │Vol-│Rwd │F FD│ Play │Stp│ │Prv│P D│Nxt│ + * └────┴────┴────┴────────────────────────┴───┴───┴───┴───┴───┘ */ + [1] = LAYOUT_60_ansi_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_BRIU, KC_TRNS, KC_TRNS, KC_END, RESET, KC_TRNS, KC_TRNS, KC_TRNS, KC_INS, KC_TRNS, KC_PSCR, KC_TRNS, KC_TRNS, KC_EJCT, + KC_BRID, KC_TRNS, KC_SLCK, KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MUTE, + KC_VOLU, KC_TRNS, KC_TRNS, KC_CALC, KC_TRNS, KC_TRNS, KC_NLCK, KC_MAIL, KC_TRNS, KC_TRNS, KC_PAUS, KC_PGUP, KC_TRNS, + KC_VOLD, KC_MRWD, KC_MFFD, KC_MPLY, KC_MSTP, KC_TRNS, KC_MPRV, KC_PGDN, KC_MNXT + ), - [1] = LAYOUT_60_b_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_DEL, - KC_BRIU, _______, _______, KC_END, RESET, _______, _______, _______, KC_INS, _______, KC_PSCR, _______, _______, KC_EJCT, - KC_BRID, _______, KC_SLCK, _______, _______, _______, KC_HOME, _______, _______, _______, _______, _______, KC_MUTE, - KC_VOLU, _______, _______, KC_CALC, _______, _______, _______, KC_MAIL, _______, _______, _______, KC_PGUP, KC_PAUS, - KC_VOLD, KC_MRWD, KC_MFFD, KC_MPLY, KC_MPLY, KC_MPLY, KC_MSTP, KC_TRNS, KC_MPRV, KC_PGDN, KC_MNXT) + /* + * Fn Layer [2] + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ + * │ │R T│R M│Hu+│Hu-│Sa+│Sa-│Br+│Br-│ │ │ │ │ │ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │ + * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴┬───┬───┤ + * │ │ │ │ │BL-│B T│BL+│B C│ │ │ │ │ │ + * ├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴──┬┴──┬───┼───┼───┤ + * │ │ │ │ │ │ │ │ │ │ + * └────┴────┴────┴────────────────────────┴───┴───┴───┴───┴───┘ + */ + [2] = LAYOUT_60_ansi_arrow(KC_TRNS, KC_TRNS, KC_TRNS, 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_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, 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 + ) }; void keyboard_post_init_user(void) { rgblight_enable_noeeprom(); rgblight_sethsv_noeeprom(0, 0, 0); -}; +} + +/* RGB Lighting/LED/Underglow as Caps Lock, Num Lock, Scroll Lock, and Layer indicator */ + void update_led(void) { + /* Num Lock Indicator */ + if (host_keyboard_led_state().num_lock) { + rgblight_setrgb(225, 8, 0); + } + /* Scroll Lock Indicator */ + if (host_keyboard_led_state().scroll_lock) { + rgblight_setrgb(0, 100, 255); + } + } -// RGB Underglow as a Caps Lock Indicator + void led_set_user(uint8_t usb_led) { + /* Caps Lock Indicator */ + if (IS_LED_ON(usb_led, USB_LED_CAPS_LOCK)) { + writePinLow(B2); + rgblight_setrgb(100, 255, 100); + } + /* Layer Indicator */ + else { + switch (get_highest_layer(layer_state)) { + /* Fn Layer [1] Indicator */ + case 1: + rgblight_setrgb(255, 110, 0); + break; + /* Fn Layer [2] Indicator */ + case 2: + rgblight_setrgb(255, 110, 0); + break; + /* Default Layer [0] Indicator */ + default: + rgblight_setrgb(0, 0, 0); + break; + } + update_led(); + } + } -void led_set_user(uint8_t usb_led) { - if (IS_LED_ON(usb_led, USB_LED_CAPS_LOCK)) { - writePinLow(B2); - rgblight_setrgb(100, 255, 100); - } else { - rgblight_setrgb(0, 0, 0); - } +layer_state_t layer_state_set_user(layer_state_t state) { + update_led(); + return state; } diff --git a/keyboards/dz60/keymaps/mrsendyyk/readme.md b/keyboards/dz60/keymaps/mrsendyyk/readme.md index dc2dfefe0adb..f5b74d8ebd05 100644 --- a/keyboards/dz60/keymaps/mrsendyyk/readme.md +++ b/keyboards/dz60/keymaps/mrsendyyk/readme.md @@ -1,46 +1,56 @@ -# Sendy YK's Keymap ---- +# [Sendy YK](https://mr.sendyyk.com)'s Keymap +`LAYOUT_60_ansi_arrow` with RGB Lighting/LED/Underglow as Caps Lock, Num Lock, Scroll Lock, and Layer indicator. -KBDfans DZ60 ANSI with Arrow also RGB Underglow as a Caps Lock Indicator +### Default Layer [0] -### Qwerty [0] ``` -,-----------------------------------------------------------------------------------------. -| Esc | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | Backspace | -|-----------------------------------------------------------------------------------------+ -| Tab | Q | W | E | R | T | Y | U | I | O | P | [ | ] | \ | -|-----------------------------------------------------------------------------------------+ -|Caps Lock| A | S | D | F | G | H | J | K | L | ; | ' | Enter | -|-----------------------------------------------------------------------------------------+ -| Shift | Z | X | C | V | B | N | M | , | . | RShift | Up | / | -|-----------------------------------------------------------------------------------------+ -| Ctrl | OS | Alt | Space | RAlt | Fn |Left |Down |Right| -`-----------------------------------------------------------------------------------------' +┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ +│Esc│1 │2 │3 │4 │5 │6 │7 │8 │9 │0 │- │= │Bspc │ +├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ +│Tab │Q │W │E │R │T │Y │U │I │O │P │[ │] │\ │ +├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤ +│Caps L│A │S │D │F │G │H │J │K │L │; │' │Enter │ +├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴┬───┬───┤ +│Shift │Z │X │C │V │B │N │M │, │. │Shift │↑ │/ │ +├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴──┬┴──┬───┼───┼───┤ +│Ctl │OS │Alt │ Space │Alt│Ctl│← │↓ │→ │ +└────┴────┴────┴────────────────────────┴───┴───┴───┴───┴───┘ ``` ### Fn Layer [1] +Press and hold *right* **Ctl** key. ``` -,-----------------------------------------------------------------------------------------. -| ` ~ | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | Delete | -|-----------------------------------------------------------------------------------------+ -| Bri Up | | | End | Rst | | | | Ins | | P Sc| | | Eject | -|-----------------------------------------------------------------------------------------+ -| Bri Down| | S L | | | | Home| | | | | | Mute | -|-----------------------------------------------------------------------------------------+ -| Vol + | | | Calc| | | | Mail| | | |Pg U |Pause| -|-----------------------------------------------------------------------------------------+ -| Vol - | Rwd | F Fd | Play | M Stp| | Prev| Pg D| Next| -`-----------------------------------------------------------------------------------------' +┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ +│` │F1 │F2 │F3 │F4 │F5 │F6 │F7 │F8 │F9 │F10│F11│F12│Delete │ +├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ +│Bri+ │ │ │End│Rst│ │ │ │Ins│ │P S│ │ │Eject│ +├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤ +│Bri- │ │S L│ │ │ │Hm │ │ │ │ │ │Mute │ +├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴┬───┬───┤ +│Vol+ │ │ │Cal│ │ │N L│Ml │ │ │Pause │P U│ │ +├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴──┬┴──┬───┼───┼───┤ +│Vol-│Rwd │F FD│ Play │Stp│ │Prv│P D│Nxt│ +└────┴────┴────┴────────────────────────┴───┴───┴───┴───┴───┘ ``` -### RGB Underglow as a Caps Lock Indicator - -Set in `mrsendyyk/keymap.c` in the `led_set_user` function. - ---- +### Fn Layer [2] +Press and hold *right* **Alt** key. +``` +┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ +│ │R T│R M│Hu+│Hu-│Sa+│Sa-│Br+│Br-│ │ │ │ │ │ +├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ +├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴┬───┬───┤ +│ │ │ │ │BL-│B T│BL+│B C│ │ │ │ │ │ +├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴──┬┴──┬───┼───┼───┤ +│ │ │ │ │ │ │ │ │ │ +└────┴────┴────┴────────────────────────┴───┴───┴───┴───┴───┘ +``` -Make example for this keyboard (after setting up your build environment): +## Build The Firmware +You will need to build the firmware. To do so go to your terminal window and run the compile command: - make dz60:mrsendyyk - -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). + qmk compile -kb dz60 -km mrsendyyk +See [The Complete Newbs Guide To QMK](https://docs.qmk.fm/#/newbs). diff --git a/keyboards/dz60/rules.mk b/keyboards/dz60/rules.mk index 55e5bada3999..26b48a626373 100644 --- a/keyboards/dz60/rules.mk +++ b/keyboards/dz60/rules.mk @@ -2,13 +2,6 @@ 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 @@ -25,9 +18,7 @@ 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 = yes # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support -BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +BLUETOOTH_ENABLE = no # Enable Bluetooth AUDIO_ENABLE = no # Audio output -FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches -LAYOUTS = 60_ansi 60_ansi_split_bs_rshift 60_hhkb 60_iso 60_abnt2 60_tsangan_hhkb +LAYOUTS = 60_ansi 60_ansi_arrow 60_ansi_split_bs_rshift 60_hhkb 60_iso 60_abnt2 60_tsangan_hhkb diff --git a/keyboards/maartenwut/eon65/keymaps/mrsendyyk/keymap.c b/keyboards/maartenwut/eon65/keymaps/mrsendyyk/keymap.c new file mode 100644 index 000000000000..f9c7178f6afd --- /dev/null +++ b/keyboards/maartenwut/eon65/keymaps/mrsendyyk/keymap.c @@ -0,0 +1,46 @@ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + /* + * Default Layer [0] + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┬───┐ + * │Esc│1 │2 │3 │4 │5 │6 │7 │8 │9 │0 │- │= │Bspc │Del│ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┼───┤ + * │Tab │Q │W │E │R │T │Y │U │I │O │P │[ │] │\ │P U│ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┼───┤ + * │Caps L│A │S │D │F │G │H │J │K │L │; │' │Return │P D│ + * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┬───┼───┤ + * │Shift │Z │X │C │V │B │N │M │, │. │/ │Shift │↑ │Fn │ + * ├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬┬┬───┼───┼───┤ + * │Ctrl│Opt │Cmd │ Space │Cmd │Opt │█│← │↓ │→ │ + * └────┴────┴────┴────────────────────────┴────┴────┴┴┴───┴───┴───┘ + */ + [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_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, MO(1), + KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, KC_RGUI, KC_RALT, KC_LEFT, KC_DOWN, KC_RGHT + ), + + /* + * Fn Layer [1] + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┬───┐ + * │` │F1 │F2 │F3 │F4 │F5 │F6 │F7 │F8 │F9 │F10│F11│F12│ │ │ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┼───┤ + * │Bri+ │ │ │End│Rst│ │ │ │Ins│ │P S│ │ │Eject│ │ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┼───┤ + * │Bri- │ │S L│ │ │ │Hm │ │ │ │ │ │Mute │ │ + * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┬───┼───┤ + * │Vol+ │ │ │Cal│ │ │N L│Ml │ │ │ │Pause │ │ │ + * ├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬┬┬───┼───┼───┤ + * │Vol-│Rwd │F FD│ Play │Stp │ │█│Prv│ │Nxt│ + * └────┴────┴────┴────────────────────────┴────┴────┴┴┴───┴───┴───┘ + */ + [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_TRNS, KC_TRNS, + KC_BRIU, KC_TRNS, KC_TRNS, KC_END, RESET, KC_TRNS, KC_TRNS, KC_TRNS, KC_INS, KC_TRNS, KC_PSCR, KC_TRNS, KC_TRNS, KC_EJCT, KC_TRNS, + KC_BRID, KC_TRNS, KC_SLCK, KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MUTE, KC_TRNS, + KC_VOLU, KC_TRNS, KC_TRNS, KC_CALC, KC_TRNS, KC_TRNS, KC_NLCK, KC_MAIL, KC_TRNS, KC_TRNS, KC_TRNS, KC_PAUS, KC_TRNS, KC_TRNS, + KC_VOLD, KC_MRWD, KC_MFFD, KC_MPLY, KC_MSTP, KC_NO, KC_MPRV, KC_NO, KC_MNXT + ) +}; diff --git a/keyboards/maartenwut/eon65/keymaps/mrsendyyk/readme.md b/keyboards/maartenwut/eon65/keymaps/mrsendyyk/readme.md new file mode 100644 index 000000000000..f9c661ccfdc2 --- /dev/null +++ b/keyboards/maartenwut/eon65/keymaps/mrsendyyk/readme.md @@ -0,0 +1,38 @@ +# [Sendy YK](https://mr.sendyyk.com)'s Keymap +`LAYOUT_65_ansi_blocker` + +### Default Layer [0] +``` +┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┬───┐ +│Esc│1 │2 │3 │4 │5 │6 │7 │8 │9 │0 │- │= │Bspc │Del│ +├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┼───┤ +│Tab │Q │W │E │R │T │Y │U │I │O │P │[ │] │\ │P U│ +├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┼───┤ +│Caps L│A │S │D │F │G │H │J │K │L │; │' │Return │P D│ +├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┬───┼───┤ +│Shift │Z │X │C │V │B │N │M │, │. │/ │Shift │↑ │Fn │ +├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬┬┬───┼───┼───┤ +│Ctrl│Opt │Cmd │ Space │Cmd │Opt │█│← │↓ │→ │ +└────┴────┴────┴────────────────────────┴────┴────┴┴┴───┴───┴───┘ +``` + +### Fn Layer [1] +``` +┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┬───┐ +│` │F1 │F2 │F3 │F4 │F5 │F6 │F7 │F8 │F9 │F10│F11│F12│ │ │ +├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┼───┤ +│Bri+ │ │ │End│Rst│ │ │ │Ins│ │P S│ │ │Eject│ │ +├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┼───┤ +│Bri- │ │S L│ │ │ │Hm │ │ │ │ │ │Mute │ │ +├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┬───┼───┤ +│Vol+ │ │ │Cal│ │ │N L│Ml │ │ │ │Pause │ │ │ +├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬┬┬───┼───┼───┤ +│Vol-│Rwd │F FD│ Play │Stp │ │█│Prv│ │Nxt│ +└────┴────┴────┴────────────────────────┴────┴────┴┴┴───┴───┴───┘ +``` + +## Build The Firmware +You will need to build the firmware. To do so go to your terminal window and run the compile command: + + qmk compile -kb maartenwut/eon65 -km mrsendyyk +See [The Complete Newbs Guide To QMK](https://docs.qmk.fm/#/newbs). diff --git a/layouts/community/60_ansi_arrow/layout.json b/layouts/community/60_ansi_arrow/layout.json new file mode 100644 index 000000000000..7fc631c3d1d1 --- /dev/null +++ b/layouts/community/60_ansi_arrow/layout.json @@ -0,0 +1,6 @@ +[{a:7},"","","","","","","","","","","","","",{w:2},""], +[{w:1.5},"","","","","","","","","","","","","",{w:1.5},""], +[{w:1.75},"","","","","","","","","","","","",{w:2.25},""], +[{w:2.25},"","","","","","","","","","",{w:1.75},"","",""], +[{w:1.25},"",{w:1.25},"",{w:1.25},"",{w:6.25},"","","","","",""] + \ No newline at end of file diff --git a/layouts/community/60_ansi_arrow/mrsendyyk/keymap.c b/layouts/community/60_ansi_arrow/mrsendyyk/keymap.c new file mode 100644 index 000000000000..4b0b33e2c880 --- /dev/null +++ b/layouts/community/60_ansi_arrow/mrsendyyk/keymap.c @@ -0,0 +1,115 @@ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + /* + * Default Layer [0] + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ + * │Esc│1 │2 │3 │4 │5 │6 │7 │8 │9 │0 │- │= │Bspc │ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ + * │Tab │Q │W │E │R │T │Y │U │I │O │P │[ │] │\ │ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤ + * │Caps L│A │S │D │F │G │H │J │K │L │; │' │Enter │ + * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴┬───┬───┤ + * │Shift │Z │X │C │V │B │N │M │, │. │Shift │↑ │/ │ + * ├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴──┬┴──┬───┼───┼───┤ + * │Ctl │OS │Alt │ Space │Alt│Ctl│← │↓ │→ │ + * └────┴────┴────┴────────────────────────┴───┴───┴───┴───┴───┘ + */ + [0] = LAYOUT_60_ansi_arrow(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_RSFT, KC_UP, KC_SLSH, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, LT(2, KC_RALT), LT(1, KC_RCTL), KC_LEFT, KC_DOWN, KC_RGHT + ), + + /* + * Fn Layer [1] + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ + * │` │F1 │F2 │F3 │F4 │F5 │F6 │F7 │F8 │F9 │F10│F11│F12│Delete │ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ + * │Bri+ │ │ │End│Rst│ │ │ │Ins│ │P S│ │ │Eject│ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤ + * │Bri- │ │S L│ │ │ │Hm │ │ │ │ │ │Mute │ + * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴┬───┬───┤ + * │Vol+ │ │ │Cal│ │ │N L│Ml │ │ │Pause │P U│ │ + * ├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴──┬┴──┬───┼───┼───┤ + * │Vol-│Rwd │F FD│ Play │Stp│ │Prv│P D│Nxt│ + * └────┴────┴────┴────────────────────────┴───┴───┴───┴───┴───┘ + */ + [1] = LAYOUT_60_ansi_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_BRIU, KC_TRNS, KC_TRNS, KC_END, RESET, KC_TRNS, KC_TRNS, KC_TRNS, KC_INS, KC_TRNS, KC_PSCR, KC_TRNS, KC_TRNS, KC_EJCT, + KC_BRID, KC_TRNS, KC_SLCK, KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MUTE, + KC_VOLU, KC_TRNS, KC_TRNS, KC_CALC, KC_TRNS, KC_TRNS, KC_NLCK, KC_MAIL, KC_TRNS, KC_TRNS, KC_PAUS, KC_PGUP, KC_TRNS, + KC_VOLD, KC_MRWD, KC_MFFD, KC_MPLY, KC_MSTP, KC_TRNS, KC_MPRV, KC_PGDN, KC_MNXT + ), + + /* + * Fn Layer [2] + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ + * │ │R T│R M│Hu+│Hu-│Sa+│Sa-│Br+│Br-│ │ │ │ │ │ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │ + * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴┬───┬───┤ + * │ │ │ │ │BL-│B T│BL+│B C│ │ │ │ │ │ + * ├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴──┬┴──┬───┼───┼───┤ + * │ │ │ │ │ │ │ │ │ │ + * └────┴────┴────┴────────────────────────┴───┴───┴───┴───┴───┘ + */ + [2] = LAYOUT_60_ansi_arrow(KC_TRNS, KC_TRNS, KC_TRNS, 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_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, 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 + ) +}; + +void keyboard_post_init_user(void) { + rgblight_enable_noeeprom(); + rgblight_sethsv_noeeprom(0, 0, 0); +} + +/* RGB Lighting/LED/Underglow as Caps Lock, Num Lock, Scroll Lock, and Layer indicator */ + void update_led(void) { + /* Num Lock Indicator */ + if (host_keyboard_led_state().num_lock) { + rgblight_setrgb(225, 8, 0); + } + /* Scroll Lock Indicator */ + if (host_keyboard_led_state().scroll_lock) { + rgblight_setrgb(0, 100, 255); + } + } + + void led_set_user(uint8_t usb_led) { + /* Caps Lock Indicator */ + if (IS_LED_ON(usb_led, USB_LED_CAPS_LOCK)) { + writePinLow(B2); + rgblight_setrgb(100, 255, 100); + } + /* Layer Indicator */ + else { + switch (get_highest_layer(layer_state)) { + /* Fn Layer [1] Indicator */ + case 1: + rgblight_setrgb(255, 110, 0); + break; + /* Fn Layer [2] Indicator */ + case 2: + rgblight_setrgb(255, 110, 0); + break; + /* Default Layer [0] Indicator */ + default: + rgblight_setrgb(0, 0, 0); + break; + } + update_led(); + } + } + +layer_state_t layer_state_set_user(layer_state_t state) { + update_led(); + return state; +} diff --git a/layouts/community/60_ansi_arrow/mrsendyyk/readme.md b/layouts/community/60_ansi_arrow/mrsendyyk/readme.md new file mode 100644 index 000000000000..4ddd6703d7a4 --- /dev/null +++ b/layouts/community/60_ansi_arrow/mrsendyyk/readme.md @@ -0,0 +1,50 @@ +# [Sendy YK](https://mr.sendyyk.com)'s 60_ansi_arrow Keymap +`LAYOUT_60_ansi_arrow` with RGB Lighting/LED/Underglow as Caps Lock, Num Lock, Scroll Lock, and Layer indicator. + +### Default Layer [0] + +``` +┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ +│Esc│1 │2 │3 │4 │5 │6 │7 │8 │9 │0 │- │= │Bspc │ +├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ +│Tab │Q │W │E │R │T │Y │U │I │O │P │[ │] │\ │ +├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤ +│Caps L│A │S │D │F │G │H │J │K │L │; │' │Enter │ +├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴┬───┬───┤ +│Shift │Z │X │C │V │B │N │M │, │. │Shift │↑ │/ │ +├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴──┬┴──┬───┼───┼───┤ +│Ctl │OS │Alt │ Space │Alt│Ctl│← │↓ │→ │ +└────┴────┴────┴────────────────────────┴───┴───┴───┴───┴───┘ +``` + +### Fn Layer [1] +Press and hold *right* **Ctl** key. +``` +┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ +│` │F1 │F2 │F3 │F4 │F5 │F6 │F7 │F8 │F9 │F10│F11│F12│Delete │ +├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ +│Bri+ │ │ │End│Rst│ │ │ │Ins│ │P S│ │ │Eject│ +├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤ +│Bri- │ │S L│ │ │ │Hm │ │ │ │ │ │Mute │ +├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴┬───┬───┤ +│Vol+ │ │ │Cal│ │ │N L│Ml │ │ │Pause │P U│ │ +├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴──┬┴──┬───┼───┼───┤ +│Vol-│Rwd │F FD│ Play │Stp│ │Prv│P D│Nxt│ +└────┴────┴────┴────────────────────────┴───┴───┴───┴───┴───┘ +``` + +### Fn Layer [2] +Press and hold *right* **Alt** key. +``` +┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ +│ │R T│R M│Hu+│Hu-│Sa+│Sa-│Br+│Br-│ │ │ │ │ │ +├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ +├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴┬───┬───┤ +│ │ │ │ │BL-│B T│BL+│B C│ │ │ │ │ │ +├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴──┬┴──┬───┼───┼───┤ +│ │ │ │ │ │ │ │ │ │ +└────┴────┴────┴────────────────────────┴───┴───┴───┴───┴───┘ +``` diff --git a/layouts/community/60_ansi_arrow/mrsendyyk/rules.mk b/layouts/community/60_ansi_arrow/mrsendyyk/rules.mk new file mode 100644 index 000000000000..479eb15e246f --- /dev/null +++ b/layouts/community/60_ansi_arrow/mrsendyyk/rules.mk @@ -0,0 +1 @@ +USER_NAME := mrsendyyk \ No newline at end of file diff --git a/layouts/community/60_ansi_arrow/readme.md b/layouts/community/60_ansi_arrow/readme.md new file mode 100644 index 000000000000..358740f30e22 --- /dev/null +++ b/layouts/community/60_ansi_arrow/readme.md @@ -0,0 +1,114 @@ +# 60_ansi_arrow +This is the 60% ANSI Arrow keyboard layout. + +## Requirements + +### 1. Layout Defined +A keyboard's `.h` file needs to have `LAYOUT_60_ansi_arrow` defined +```c +/* + * LAYOUT_60_ansi_arrow + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ + * │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 │1e │ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤ + * │20 │22 │23 │24 │25 │26 │27 │28 │29 │2a │2b │2c │2d │ + * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴┬───┬───┤ + * │30 │32 │33 │34 │35 │36 │37 │38 │39 │3a │3c │3d │3e │ + * ├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴──┬┴──┬───┼───┼───┤ + * │40 │41 │43 │46 │4a │4b │4c │4d │4e │ + * └────┴────┴────┴────────────────────────┴───┴───┴───┴───┴───┘ + */ +#define LAYOUT_60_ansi_arrow( \ + 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, 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, KC_NO, k32, k33, k34, k35, k36, k37, k38, k39, k3a, KC_NO, k3c, k3d, k3e }, \ + { k40, k41, KC_NO, k43, KC_NO, KC_NO, k46, KC_NO, KC_NO, KC_NO, k4a, k4b, k4c, k4d, k4e } \ +} +``` + +### 2. Configuring rules.mk +`rules.mk` needs to have the following line: + + LAYOUTS = 60_ansi_arrow + +### 3. Defining a Keymap +A keymap must be defined at + + qmk_firmware/layouts/community/60_ansi_arrow/yourfoldername/keymap.c +This keymap must have a `LAYOUT_60_ansi_arrow` layout defined. +```c +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + /* + * Default Layer [0] + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ + * │Esc│1 │2 │3 │4 │5 │6 │7 │8 │9 │0 │- │= │Bspc │ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ + * │Tab │Q │W │E │R │T │Y │U │I │O │P │[ │] │\ │ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤ + * │Caps L│A │S │D │F │G │H │J │K │L │; │' │Enter │ + * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴┬───┬───┤ + * │Shift │Z │X │C │V │B │N │M │, │. │Shift │↑ │/ │ + * ├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴──┬┴──┬───┼───┼───┤ + * │Ctl │OS │Alt │ Space │Alt│Ctl│← │↓ │→ │ + * └────┴────┴────┴────────────────────────┴───┴───┴───┴───┴───┘ + */ + [0] = LAYOUT_60_ansi_arrow(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_RSFT, KC_UP, KC_SLSH, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, LT(2, KC_RALT), LT(1, KC_RCTL), KC_LEFT, KC_DOWN, KC_RGHT + ), + + /* + * Fn Layer [1] + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ + * │` │F1 │F2 │F3 │F4 │F5 │F6 │F7 │F8 │F9 │F10│F11│F12│Delete │ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ + * │Bri+ │ │ │End│Rst│ │ │ │Ins│ │P S│ │ │Eject│ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤ + * │Bri- │ │S L│ │ │ │Hm │ │ │ │ │ │Mute │ + * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴┬───┬───┤ + * │Vol+ │ │ │Cal│ │ │N L│Ml │ │ │Pause │P U│ │ + * ├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴──┬┴──┬───┼───┼───┤ + * │Vol-│Rwd │F FD│ Play │Stp│ │Prv│P D│Nxt│ + * └────┴────┴────┴────────────────────────┴───┴───┴───┴───┴───┘ + */ + [1] = LAYOUT_60_ansi_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_BRIU, KC_TRNS, KC_TRNS, KC_END, RESET, KC_TRNS, KC_TRNS, KC_TRNS, KC_INS, KC_TRNS, KC_PSCR, KC_TRNS, KC_TRNS, KC_EJCT, + KC_BRID, KC_TRNS, KC_SLCK, KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MUTE, + KC_VOLU, KC_TRNS, KC_TRNS, KC_CALC, KC_TRNS, KC_TRNS, KC_NLCK, KC_MAIL, KC_TRNS, KC_TRNS, KC_PAUS, KC_PGUP, KC_TRNS, + KC_VOLD, KC_MRWD, KC_MFFD, KC_MPLY, KC_MSTP, KC_TRNS, KC_MPRV, KC_PGDN, KC_MNXT + ), + + /* + * Fn Layer [2] + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ + * │ │R T│R M│Hu+│Hu-│Sa+│Sa-│Br+│Br-│ │ │ │ │ │ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │ + * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴┬───┬───┤ + * │ │ │ │ │BL-│B T│BL+│B C│ │ │ │ │ │ + * ├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴──┬┴──┬───┼───┼───┤ + * │ │ │ │ │ │ │ │ │ │ + * └────┴────┴────┴────────────────────────┴───┴───┴───┴───┴───┘ + */ + [2] = LAYOUT_60_ansi_arrow(KC_TRNS, KC_TRNS, KC_TRNS, 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_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, 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 + ) +}; +``` diff --git a/layouts/default/60_ansi_arrow/default_60_ansi_arrow/keymap.c b/layouts/default/60_ansi_arrow/default_60_ansi_arrow/keymap.c new file mode 100644 index 000000000000..acbf16ad93b0 --- /dev/null +++ b/layouts/default/60_ansi_arrow/default_60_ansi_arrow/keymap.c @@ -0,0 +1,67 @@ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + /* + * Default Layer [0] + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ + * │Esc│1 │2 │3 │4 │5 │6 │7 │8 │9 │0 │- │= │Bspc │ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ + * │Tab │Q │W │E │R │T │Y │U │I │O │P │[ │] │\ │ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤ + * │Caps L│A │S │D │F │G │H │J │K │L │; │' │Enter │ + * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴┬───┬───┤ + * │Shift │Z │X │C │V │B │N │M │, │. │Shift │↑ │/ │ + * ├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴──┬┴──┬───┼───┼───┤ + * │Ctl │OS │Alt │ Space │Alt│Ctl│← │↓ │→ │ + * └────┴────┴────┴────────────────────────┴───┴───┴───┴───┴───┘ + */ + [0] = LAYOUT_60_ansi_arrow(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_RSFT, KC_UP, KC_SLSH, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, LT(2, KC_RALT), LT(1, KC_RCTL), KC_LEFT, KC_DOWN, KC_RGHT + ), + + /* + * Fn Layer [1] + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ + * │` │F1 │F2 │F3 │F4 │F5 │F6 │F7 │F8 │F9 │F10│F11│F12│Delete │ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ + * │Bri+ │ │ │End│Rst│ │ │ │Ins│ │P S│ │ │Eject│ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤ + * │Bri- │ │S L│ │ │ │Hm │ │ │ │ │ │Mute │ + * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴┬───┬───┤ + * │Vol+ │ │ │Cal│ │ │N L│Ml │ │ │Pause │P U│ │ + * ├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴──┬┴──┬───┼───┼───┤ + * │Vol-│Rwd │F FD│ Play │Stp│ │Prv│P D│Nxt│ + * └────┴────┴────┴────────────────────────┴───┴───┴───┴───┴───┘ + */ + [1] = LAYOUT_60_ansi_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_BRIU, KC_TRNS, KC_TRNS, KC_END, RESET, KC_TRNS, KC_TRNS, KC_TRNS, KC_INS, KC_TRNS, KC_PSCR, KC_TRNS, KC_TRNS, KC_EJCT, + KC_BRID, KC_TRNS, KC_SLCK, KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MUTE, + KC_VOLU, KC_TRNS, KC_TRNS, KC_CALC, KC_TRNS, KC_TRNS, KC_NLCK, KC_MAIL, KC_TRNS, KC_TRNS, KC_PAUS, KC_PGUP, KC_TRNS, + KC_VOLD, KC_MRWD, KC_MFFD, KC_MPLY, KC_MSTP, KC_TRNS, KC_MPRV, KC_PGDN, KC_MNXT + ), + + /* + * Fn Layer [2] + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ + * │ │R T│R M│Hu+│Hu-│Sa+│Sa-│Br+│Br-│ │ │ │ │ │ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │ + * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴┬───┬───┤ + * │ │ │ │ │BL-│B T│BL+│B C│ │ │ │ │ │ + * ├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴──┬┴──┬───┼───┼───┤ + * │ │ │ │ │ │ │ │ │ │ + * └────┴────┴────┴────────────────────────┴───┴───┴───┴───┴───┘ + */ + [2] = LAYOUT_60_ansi_arrow(KC_TRNS, KC_TRNS, KC_TRNS, 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_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, 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 + ) +}; diff --git a/layouts/default/60_ansi_arrow/info.json b/layouts/default/60_ansi_arrow/info.json new file mode 100644 index 000000000000..6bd85a6b9c0b --- /dev/null +++ b/layouts/default/60_ansi_arrow/info.json @@ -0,0 +1,80 @@ +{ + "keyboard_name": "60% ANSI Arrow Layout", + "url": "", + "maintainer": "qmk", + "width": 15, + "height": 5, + "layouts": { + "LAYOUT_60_ansi_arrow": { + "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/layouts/default/60_ansi_arrow/layout.json b/layouts/default/60_ansi_arrow/layout.json new file mode 100644 index 000000000000..7fc631c3d1d1 --- /dev/null +++ b/layouts/default/60_ansi_arrow/layout.json @@ -0,0 +1,6 @@ +[{a:7},"","","","","","","","","","","","","",{w:2},""], +[{w:1.5},"","","","","","","","","","","","","",{w:1.5},""], +[{w:1.75},"","","","","","","","","","","","",{w:2.25},""], +[{w:2.25},"","","","","","","","","","",{w:1.75},"","",""], +[{w:1.25},"",{w:1.25},"",{w:1.25},"",{w:6.25},"","","","","",""] + \ No newline at end of file diff --git a/layouts/default/60_ansi_arrow/readme.md b/layouts/default/60_ansi_arrow/readme.md new file mode 100644 index 000000000000..8d6e6c455321 --- /dev/null +++ b/layouts/default/60_ansi_arrow/readme.md @@ -0,0 +1,50 @@ +# 60_ansi_arrow +`LAYOUT_60_ansi_arrow` + +### Default Layer [0] + +``` +┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ +│Esc│1 │2 │3 │4 │5 │6 │7 │8 │9 │0 │- │= │Bspc │ +├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ +│Tab │Q │W │E │R │T │Y │U │I │O │P │[ │] │\ │ +├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤ +│Caps L│A │S │D │F │G │H │J │K │L │; │' │Enter │ +├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴┬───┬───┤ +│Shift │Z │X │C │V │B │N │M │, │. │Shift │↑ │/ │ +├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴──┬┴──┬───┼───┼───┤ +│Ctl │OS │Alt │ Space │Alt│Ctl│← │↓ │→ │ +└────┴────┴────┴────────────────────────┴───┴───┴───┴───┴───┘ +``` + +### Fn Layer [1] +Press and hold *right* **Ctl** key. +``` +┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ +│` │F1 │F2 │F3 │F4 │F5 │F6 │F7 │F8 │F9 │F10│F11│F12│Delete │ +├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ +│Bri+ │ │ │End│Rst│ │ │ │Ins│ │P S│ │ │Eject│ +├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤ +│Bri- │ │S L│ │ │ │Hm │ │ │ │ │ │Mute │ +├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴┬───┬───┤ +│Vol+ │ │ │Cal│ │ │N L│Ml │ │ │Pause │P U│ │ +├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴──┬┴──┬───┼───┼───┤ +│Vol-│Rwd │F FD│ Play │Stp│ │Prv│P D│Nxt│ +└────┴────┴────┴────────────────────────┴───┴───┴───┴───┴───┘ +``` + +### Fn Layer [2] +Press and hold *right* **Alt** key. +``` +┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ +│ │R T│R M│Hu+│Hu-│Sa+│Sa-│Br+│Br-│ │ │ │ │ │ +├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ +├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴┬───┬───┤ +│ │ │ │ │BL-│B T│BL+│B C│ │ │ │ │ │ +├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴──┬┴──┬───┼───┼───┤ +│ │ │ │ │ │ │ │ │ │ +└────┴────┴────┴────────────────────────┴───┴───┴───┴───┴───┘ +``` From e4a0a5f4e1e1a561939596fff09380dab8434d79 Mon Sep 17 00:00:00 2001 From: satt99 Date: Thu, 20 Aug 2020 03:18:52 +0900 Subject: [PATCH 605/930] [Keyboard] Vision keyboard by SatT (#9768) * Add vision keyboard * Remove bootloader_defs.h * Update keyboards/satt/vision/readme.md * Change Vendor ID * Update keyboards/satt/vision/config.h * Update keyboards/satt/vision/rules.mk * Fix info.json * Apply suggestions from code review * Add license header * Apply suggestions from code review --- keyboards/satt/vision/chconf.h | 714 ++++++++++++++++++ keyboards/satt/vision/config.h | 62 ++ keyboards/satt/vision/halconf.h | 525 +++++++++++++ keyboards/satt/vision/info.json | 12 + .../satt/vision/keymaps/default/keymap.c | 93 +++ .../satt/vision/keymaps/satt/action_pseudo.c | 149 ++++ .../satt/vision/keymaps/satt/action_pseudo.h | 27 + keyboards/satt/vision/keymaps/satt/keymap.c | 168 +++++ .../satt/vision/keymaps/satt/keymap_jis2us.h | 49 ++ keyboards/satt/vision/keymaps/satt/readme.md | 6 + keyboards/satt/vision/keymaps/satt/rules.mk | 1 + keyboards/satt/vision/keymaps/via/keymap.c | 64 ++ keyboards/satt/vision/keymaps/via/rules.mk | 3 + keyboards/satt/vision/mcuconf.h | 176 +++++ keyboards/satt/vision/readme.md | 12 + keyboards/satt/vision/rules.mk | 20 + keyboards/satt/vision/vision.c | 17 + keyboards/satt/vision/vision.h | 31 + 18 files changed, 2129 insertions(+) create mode 100644 keyboards/satt/vision/chconf.h create mode 100644 keyboards/satt/vision/config.h create mode 100644 keyboards/satt/vision/halconf.h create mode 100644 keyboards/satt/vision/info.json create mode 100644 keyboards/satt/vision/keymaps/default/keymap.c create mode 100644 keyboards/satt/vision/keymaps/satt/action_pseudo.c create mode 100644 keyboards/satt/vision/keymaps/satt/action_pseudo.h create mode 100644 keyboards/satt/vision/keymaps/satt/keymap.c create mode 100644 keyboards/satt/vision/keymaps/satt/keymap_jis2us.h create mode 100644 keyboards/satt/vision/keymaps/satt/readme.md create mode 100644 keyboards/satt/vision/keymaps/satt/rules.mk create mode 100644 keyboards/satt/vision/keymaps/via/keymap.c create mode 100644 keyboards/satt/vision/keymaps/via/rules.mk create mode 100644 keyboards/satt/vision/mcuconf.h create mode 100644 keyboards/satt/vision/readme.md create mode 100644 keyboards/satt/vision/rules.mk create mode 100644 keyboards/satt/vision/vision.c create mode 100644 keyboards/satt/vision/vision.h diff --git a/keyboards/satt/vision/chconf.h b/keyboards/satt/vision/chconf.h new file mode 100644 index 000000000000..03f63da36a88 --- /dev/null +++ b/keyboards/satt/vision/chconf.h @@ -0,0 +1,714 @@ +/* + 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. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +/** + * @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. + * + * @addtogroup config + * @details Kernel related settings and hooks. + * @{ + */ + +#ifndef CHCONF_H +#define CHCONF_H + +#define _CHIBIOS_RT_CONF_ +#define _CHIBIOS_RT_CONF_VER_6_0_ + +/*===========================================================================*/ +/** + * @name System timers settings + * @{ + */ +/*===========================================================================*/ + +/** + * @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. + * @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. + */ +#if !defined(CH_CFG_ST_TIMEDELTA) +#define CH_CFG_ST_TIMEDELTA 2 +#endif + +/** @} */ + +/*===========================================================================*/ +/** + * @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. + */ +#if !defined(CH_CFG_TIME_QUANTUM) +#define CH_CFG_TIME_QUANTUM 0 +#endif + +/** + * @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. + */ +#if !defined(CH_CFG_MEMCORE_SIZE) +#define CH_CFG_MEMCORE_SIZE 0 +#endif + +/** + * @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. + */ +#if !defined(CH_CFG_NO_IDLE_THREAD) +#define CH_CFG_NO_IDLE_THREAD FALSE +#endif + +/** @} */ + +/*===========================================================================*/ +/** + * @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. + */ +#if !defined(CH_CFG_OPTIMIZE_SPEED) +#define CH_CFG_OPTIMIZE_SPEED FALSE +#endif + +/** @} */ + +/*===========================================================================*/ +/** + * @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. + */ +#if !defined(CH_CFG_USE_TM) +#define CH_CFG_USE_TM FALSE +#endif + +/** + * @brief Threads registry APIs. + * @details If enabled then the registry APIs are included in the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_REGISTRY) +#define CH_CFG_USE_REGISTRY TRUE +#endif + +/** + * @brief Threads synchronization APIs. + * @details If enabled then the @p chThdWait() function is included in + * the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_WAITEXIT) +#define CH_CFG_USE_WAITEXIT TRUE +#endif + +/** + * @brief Semaphores APIs. + * @details If enabled then the Semaphores APIs are included in the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_SEMAPHORES) +#define CH_CFG_USE_SEMAPHORES TRUE +#endif + +/** + * @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. + */ +#if !defined(CH_CFG_USE_SEMAPHORES_PRIORITY) +#define CH_CFG_USE_SEMAPHORES_PRIORITY FALSE +#endif + +/** + * @brief Mutexes APIs. + * @details If enabled then the mutexes APIs are included in the kernel. + * + * @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. + * @note Recursive mutexes are heavier and have an increased + * memory footprint. + * + * @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. + * @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. + */ +#if !defined(CH_CFG_USE_CONDVARS) +#define CH_CFG_USE_CONDVARS TRUE +#endif + +/** + * @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. + */ +#if !defined(CH_CFG_USE_CONDVARS_TIMEOUT) +#define CH_CFG_USE_CONDVARS_TIMEOUT FALSE +#endif + +/** + * @brief Events Flags APIs. + * @details If enabled then the event flags APIs are included in the kernel. + * + * @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. + * @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. + */ +#if !defined(CH_CFG_USE_EVENTS_TIMEOUT) +#define CH_CFG_USE_EVENTS_TIMEOUT TRUE +#endif + +/** + * @brief Synchronous Messages APIs. + * @details If enabled then the synchronous messages APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_MESSAGES) +#define CH_CFG_USE_MESSAGES TRUE +#endif + +/** + * @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. + */ +#if !defined(CH_CFG_USE_MESSAGES_PRIORITY) +#define CH_CFG_USE_MESSAGES_PRIORITY FALSE +#endif + +/** + * @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. + */ +#if !defined(CH_CFG_USE_MAILBOXES) +#define CH_CFG_USE_MAILBOXES TRUE +#endif + +/** + * @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. + */ +#if !defined(CH_CFG_USE_MEMCORE) +#define CH_CFG_USE_MEMCORE TRUE +#endif + +/** + * @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. + */ +#if !defined(CH_CFG_USE_HEAP) +#define CH_CFG_USE_HEAP FALSE +#endif + +/** + * @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. + */ +#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. + * @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. + */ +#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 + +/** @} */ + +/*===========================================================================*/ +/** + * @name Debug options + * @{ + */ +/*===========================================================================*/ + +/** + * @brief Debug option, kernel statistics. + * + * @note The default is @p FALSE. + */ +#if !defined(CH_DBG_STATISTICS) +#define CH_DBG_STATISTICS FALSE +#endif + +/** + * @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. + */ +#if !defined(CH_DBG_SYSTEM_STATE_CHECK) +#define CH_DBG_SYSTEM_STATE_CHECK FALSE +#endif + +/** + * @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. + */ +#if !defined(CH_DBG_ENABLE_CHECKS) +#define CH_DBG_ENABLE_CHECKS FALSE +#endif + +/** + * @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. + */ +#if !defined(CH_DBG_ENABLE_ASSERTS) +#define CH_DBG_ENABLE_ASSERTS FALSE +#endif + +/** + * @brief Debug option, trace buffer. + * @details If enabled then the trace buffer is activated. + * + * @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. + * @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. + */ +#if !defined(CH_DBG_ENABLE_STACK_CHECK) +#define CH_DBG_ENABLE_STACK_CHECK FALSE +#endif + +/** + * @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. + */ +#if !defined(CH_DBG_FILL_THREADS) +#define CH_DBG_FILL_THREADS FALSE +#endif + +/** + * @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. + */ +#if !defined(CH_DBG_THREADS_PROFILING) +#define CH_DBG_THREADS_PROFILING FALSE +#endif + +/** @} */ + +/*===========================================================================*/ +/** + * @name Kernel hooks + * @{ + */ +/*===========================================================================*/ + +/** + * @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. + */ +#define CH_CFG_THREAD_EXTRA_FIELDS \ + /* Add threads custom fields here.*/ + +/** + * @brief Threads initialization hook. + * @details User initialization code added to the @p _thread_init() function. + * + * @note It is invoked from within @p _thread_init() 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/satt/vision/config.h b/keyboards/satt/vision/config.h new file mode 100644 index 000000000000..62a7244aa4ab --- /dev/null +++ b/keyboards/satt/vision/config.h @@ -0,0 +1,62 @@ +/* +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 0x5454 +#define PRODUCT_ID 0x5649 +#define DEVICE_VER 0x0001 +#define MANUFACTURER SatT +#define PRODUCT Vision + +/* key matrix size */ +#define MATRIX_ROWS 4 +#define MATRIX_COLS 14 + +#define MATRIX_COL_PINS { B1, B0, A7, A6, A5, A4, A3, B8, B7, B6, B5, B4, B3, A15 } +#define MATRIX_ROW_PINS { B12, B2, A2, A1 } +#define DIODE_DIRECTION COL2ROW + +/* 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/satt/vision/halconf.h b/keyboards/satt/vision/halconf.h new file mode 100644 index 000000000000..16f32117d51b --- /dev/null +++ b/keyboards/satt/vision/halconf.h @@ -0,0 +1,525 @@ +/* + 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. + 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 + +#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 +#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 cryptographic subsystem. + */ +#if !defined(HAL_USE_CRY) || defined(__DOXYGEN__) +#define HAL_USE_CRY FALSE +#endif + +/** + * @brief Enables the DAC subsystem. + */ +#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 +#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 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 +#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 +#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 + +/** + * @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. */ +/*===========================================================================*/ + +/** + * @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 + +/** + * @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. */ +/*===========================================================================*/ + +/** + * @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 the zero-copy API. + */ +#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 + +/** + * @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. */ +/*===========================================================================*/ + +/** + * @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 16 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 256 bytes for both the transmission and receive + * buffers. + */ +#if !defined(SERIAL_USB_BUFFERS_SIZE) || defined(__DOXYGEN__) +#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 + +/*===========================================================================*/ +/* 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 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 +#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. */ +/*===========================================================================*/ + +/** + * @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 + +/*===========================================================================*/ +/* 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/satt/vision/info.json b/keyboards/satt/vision/info.json new file mode 100644 index 000000000000..19ca9e856c72 --- /dev/null +++ b/keyboards/satt/vision/info.json @@ -0,0 +1,12 @@ +{ + "keyboard_name": "Vision", + "url": "", + "maintainer": "SatT", + "width": 16, + "height": 4, + "layouts": { + "LAYOUT": { + "layout": [{"label":"PgUp", "x":0, "y":0}, {"label":"Esc", "x":1.25, "y":0}, {"label":"Q", "x":2.25, "y":0}, {"label":"W", "x":3.25, "y":0}, {"label":"E", "x":4.25, "y":0}, {"label":"R", "x":5.25, "y":0}, {"label":"T", "x":6.25, "y":0}, {"label":"Y", "x":9, "y":0}, {"label":"U", "x":10, "y":0}, {"label":"I", "x":11, "y":0}, {"label":"O", "x":12, "y":0}, {"label":"P", "x":13, "y":0}, {"label":"Back", "x":14, "y":0}, {"label":"Del", "x":15, "y":0}, {"label":"PgDn", "x":0, "y":1}, {"label":"Tab", "x":1.25, "y":1, "w":1.25}, {"label":"A", "x":2.5, "y":1}, {"label":"S", "x":3.5, "y":1}, {"label":"D", "x":4.5, "y":1}, {"label":"F", "x":5.5, "y":1}, {"label":"G", "x":6.5, "y":1}, {"label":"H", "x":9.25, "y":1}, {"label":"J", "x":10.25, "y":1}, {"label":"K", "x":11.25, "y":1}, {"label":"L", "x":12.25, "y":1}, {"label":":", "x":13.25, "y":1}, {"label":"\"", "x":14.25, "y":1, "w":1.75}, {"label":"Shift", "x":1.25, "y":2, "w":1.75}, {"label":"Z", "x":3, "y":2}, {"label":"X", "x":4, "y":2}, {"label":"C", "x":5, "y":2}, {"label":"V", "x":6, "y":2}, {"label":"B", "x":7, "y":2}, {"label":"B", "x":8.75, "y":2}, {"label":"N", "x":9.75, "y":2}, {"label":"M", "x":10.75, "y":2}, {"label":"<", "x":11.75, "y":2}, {"label":">", "x":12.75, "y":2}, {"label":"?", "x":13.75, "y":2, "w":1.25}, {"label":"Adjust", "x":15, "y":2}, {"label":"Win", "x":1.25, "y":3, "w":1.5}, {"label":"Alt", "x":3.75, "y":3, "w":1.5}, {"label":"Lower", "x":5.25, "y":3, "w":2}, {"x":7.25, "y":3}, {"label":"Raise", "x":8.75, "y":3, "w":1.75}, {"label":"Enter", "x":10.5, "y":3}, {"label":"Alt", "x":11.5, "y":3, "w":1.5}, {"label":"Ctrl", "x":14.5, "y":3, "w":1.5}] + } + } +} diff --git a/keyboards/satt/vision/keymaps/default/keymap.c b/keyboards/satt/vision/keymaps/default/keymap.c new file mode 100644 index 000000000000..d7b3b00a88fa --- /dev/null +++ b/keyboards/satt/vision/keymaps/default/keymap.c @@ -0,0 +1,93 @@ +/* +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 + + +// 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, + _LOWER, + _RAISE, + _ADJUST +}; + +enum custom_keycodes { + LOWER = SAFE_RANGE, + RAISE, +}; + +#define ADJUST MO(_ADJUST) + +const uint16_t keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [_QWERTY] = LAYOUT( + KC_PGUP, 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_DEL, + KC_PGDN, 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_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, ADJUST, + KC_LGUI, KC_LALT, LOWER, KC_SPC, RAISE, KC_ENT, KC_RALT, KC_RCTL + ), + + [_LOWER] = LAYOUT( + _______, _______, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, _______, _______, + _______, _______, _______, _______, _______, _______, KC_GRV, KC_BSLS, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, _______, + _______, _______, _______, _______, _______, KC_TILD, _______, KC_PIPE, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, _______, + _______, _______, _______, _______, _______, _______, _______, _______ + ), + + [_RAISE] = LAYOUT( + _______, _______, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, _______, _______, + _______, _______, _______, _______, _______, _______, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_END, _______, + _______, _______, _______, _______, _______, _______, KC_HOME, XXXXXXX, KC_PGDN, KC_PGUP, XXXXXXX, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______ + ), + + [_ADJUST] = 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, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______ + ) +}; + +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; +} diff --git a/keyboards/satt/vision/keymaps/satt/action_pseudo.c b/keyboards/satt/vision/keymaps/satt/action_pseudo.c new file mode 100644 index 000000000000..2ba8b3e5030a --- /dev/null +++ b/keyboards/satt/vision/keymaps/satt/action_pseudo.c @@ -0,0 +1,149 @@ +/* Copyright 2020 shela + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public 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" +#include "command.h" +#include "action_pseudo.h" + +static uint8_t send_key_shift_bit[SHIFT_BIT_SIZE]; + +/* + * Action Pseudo Process. + * Gets the keycode in the same position of the specified layer. + * The keycode is sent after conversion according to the conversion keymap. + */ +void action_pseudo_process(keyrecord_t *record, uint8_t base_layer, const uint16_t (*keymap)[2]) { + uint8_t prev_shift; + uint16_t keycode; + uint16_t pseudo_keycode; + + /* Get keycode from specified layer */ + keycode = keymap_key_to_keycode(base_layer, record->event.key); + + prev_shift = get_mods() & MOD_MASK_SHIFT; + + if (record->event.pressed) { + /* If magic commands entered, keycode is not converted */ + if (IS_COMMAND()) { + if (prev_shift) { + add_shift_bit(keycode); + } + register_code(keycode); + return; + } + + if (prev_shift) { + pseudo_keycode = convert_keycode(keymap, keycode, true); + dprintf("pressed: %02X, converted: %04X\n", keycode, pseudo_keycode); + add_shift_bit(keycode); + + if (IS_LSFT(pseudo_keycode)) { + register_code(QK_LSFT ^ pseudo_keycode); + } else { + /* Delete shift mod temporarily */ + unregister_mods(prev_shift); + register_code(pseudo_keycode); + register_mods(prev_shift); + } + } else { + pseudo_keycode = convert_keycode(keymap, keycode, false); + dprintf("pressed: %02X, converted: %04X\n", keycode, pseudo_keycode); + + if (IS_LSFT(pseudo_keycode)) { + register_weak_mods(MOD_LSFT); + register_code(QK_LSFT ^ pseudo_keycode); + /* Prevent key repeat to avoid unintended output on Windows */ + unregister_code(QK_LSFT ^ pseudo_keycode); + unregister_weak_mods(MOD_LSFT); + } else { + register_code(pseudo_keycode); + } + } + } else { + if (get_shift_bit(keycode)) { + del_shift_bit(keycode); + pseudo_keycode = convert_keycode(keymap, keycode, true); + } else { + pseudo_keycode = convert_keycode(keymap, keycode, false); + } + dprintf("released: %02X, converted: %04X\n", keycode, pseudo_keycode); + + if (IS_LSFT(pseudo_keycode)) { + unregister_code(QK_LSFT ^ pseudo_keycode); + } else { + unregister_code(pseudo_keycode); + } + } +} + +/* Convert keycode according to the keymap */ +uint16_t convert_keycode(const uint16_t (*keymap)[2], uint16_t keycode, bool shift_modded) { + uint16_t pseudo_keycode = 0x00; /* default value */ + + switch (keycode) { + case KC_A ... KC_CAPSLOCK: +#if defined(__AVR__) + if (shift_modded) { + pseudo_keycode = pgm_read_word(&keymap[keycode][1]); + } else { + pseudo_keycode = pgm_read_word(&keymap[keycode][0]); + } +#else + if (shift_modded) { + pseudo_keycode = keymap[keycode][1]; + } else { + pseudo_keycode = keymap[keycode][0]; + } +#endif + break; + } + + /* If pseudo keycode is the default value, use the keycode as it is */ + if (pseudo_keycode == 0x00) { + if (shift_modded) { + pseudo_keycode = S(keycode); + } else { + pseudo_keycode = keycode; + } + } + + return pseudo_keycode; +} + +uint8_t get_shift_bit(uint16_t keycode) { + if ((keycode >> 3) < SHIFT_BIT_SIZE) { + return send_key_shift_bit[keycode >> 3] & (1 << (keycode & 7)); + } else { + dprintf("get_shift_bit: Can't get shift bit. keycode: %02X\n", keycode); + return 0; + } +} + +void add_shift_bit(uint16_t keycode) { + if ((keycode >> 3) < SHIFT_BIT_SIZE) { + send_key_shift_bit[keycode >> 3] |= (1 << (keycode & 7)); + } else { + dprintf("add_shift_bit: Can't add shift bit. keycode: %02X\n", keycode); + } +} + +void del_shift_bit(uint16_t keycode) { + if ((keycode >> 3) < SHIFT_BIT_SIZE) { + send_key_shift_bit[keycode >> 3] &= ~(1 << (keycode & 7)); + } else { + dprintf("del_shift_bit: Can't delete shift bit. keycode: %02X\n", keycode); + } +} diff --git a/keyboards/satt/vision/keymaps/satt/action_pseudo.h b/keyboards/satt/vision/keymaps/satt/action_pseudo.h new file mode 100644 index 000000000000..7c3d38fa07ad --- /dev/null +++ b/keyboards/satt/vision/keymaps/satt/action_pseudo.h @@ -0,0 +1,27 @@ +/* Copyright 2020 shela + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License 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 SHIFT_BIT_SIZE (0xE7 / 8 + 1) /* 1bit per 1key */ +#define IS_LSFT(kc) ((QK_LSFT & (kc)) == QK_LSFT) + +void action_pseudo_process(keyrecord_t *, uint8_t, const uint16_t (*)[2]); +uint16_t convert_keycode(const uint16_t (*)[2], uint16_t, bool); + +uint8_t get_shift_bit(uint16_t); +void add_shift_bit(uint16_t); +void del_shift_bit(uint16_t); diff --git a/keyboards/satt/vision/keymaps/satt/keymap.c b/keyboards/satt/vision/keymaps/satt/keymap.c new file mode 100644 index 000000000000..5735d34159a6 --- /dev/null +++ b/keyboards/satt/vision/keymaps/satt/keymap.c @@ -0,0 +1,168 @@ +/* +Copyright 2019 Sekigon + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public 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_jis2us.h" +#include "action_pseudo.h" +#include "keymap_jp.h" + +enum custom_keycodes { + JIS2US = SAFE_RANGE, /* JIS2US keycode */ + QWERTY, /* Layer keycode */ + PSEU_US, /* Layer keycode */ + LOWER, /* Layer keycode */ + RAISE, /* Layer keycode */ + P_LOWER, /* Layer keycode */ + P_RAISE /* Layer keycode */ +}; + +enum layer_names { + _QWERTY, + _LOWER, + _RAISE, + _PSEUDO_US, + _PSEUDO_US_LOWER, + _PSEUDO_US_RAISE, + _ADJUST, +}; + +// Layer related keycodes +#define ADJUST MO(_ADJUST) + +// Special keycodes +#define SPC_CTL CTL_T(KC_SPC) +#define ENT_SFT SFT_T(KC_ENT) +#define TB_CTSF C_S_T(KC_TAB) +#define IMON_AL ALT_T(KC_F13) +#define IMOF_AL ALT_T(KC_F14) +#define CTALDEL LCA(KC_DEL) +#define ESC_ADJ LT(_ADJUST, KC_ESC) +#define GUI_E LGUI(KC_E) +#define GUI_R LGUI(KC_R) +#define CTLGRV LCTL(KC_GRV) + +const uint16_t keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [_QWERTY] = LAYOUT( + GUI_E, ESC_ADJ, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_DEL, KC_DEL, + GUI_R, TB_CTSF, 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, CTLGRV, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_QUOT, + KC_LGUI, IMOF_AL, LOWER, SPC_CTL, RAISE, ENT_SFT, IMON_AL, KC_RCTL + ), + + [_LOWER] = LAYOUT( + _______, _______, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, _______, _______, + _______, _______, _______, KC_F2, KC_F5, KC_F10, KC_GRV, KC_BSLS, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, _______, + _______, _______, _______, _______, _______, KC_TILD, _______, KC_PIPE, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, _______, + _______, _______, _______, _______, _______, _______, _______, _______ + ), + + [_RAISE] = LAYOUT( + _______, _______, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, _______, _______, + _______, _______, _______, _______, _______, _______, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_END, _______, + _______, _______, _______, _______, _______, _______, KC_HOME, XXXXXXX, KC_PGDN, KC_PGUP, XXXXXXX, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______ + ), + + [_PSEUDO_US] = 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, JIS2US, _______, + _______, KC_Z, KC_X, KC_C, KC_V, KC_B, JP_ZHTG, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, JIS2US, + _______, _______, P_LOWER, _______, P_RAISE, _______, _______, _______ + ), + + [_PSEUDO_US_LOWER] = LAYOUT( + _______, _______, JP_EXLM, JP_AT, JP_HASH, JP_DLR, JP_PERC, JP_CIRC, JP_AMPR, JP_ASTR, JP_LPRN, JP_RPRN, _______, _______, + _______, _______, _______, KC_F2, KC_F5, KC_F10, JP_GRV, JP_BSLS, JP_MINS, JP_EQL, JP_LBRC, JP_RBRC, _______, + _______, _______, _______, _______, _______, JP_TILD, _______, JP_PIPE, JP_UNDS, JP_PLUS, JP_LCBR, JP_RCBR, _______, + _______, _______, _______, _______, _______, _______, _______, _______ + ), + + [_PSEUDO_US_RAISE] = LAYOUT( + _______, _______, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, _______, _______, + _______, _______, _______, _______, _______, _______, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_END, _______, + _______, _______, _______, _______, _______, _______, KC_HOME, XXXXXXX, KC_PGDN, KC_PGUP, XXXXXXX, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______ + ), + + [_ADJUST] = 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, + _______, _______, _______, _______, QWERTY, PSEU_US, CTALDEL, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______ + ) +}; + +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; + case P_LOWER: + if (record->event.pressed) { + layer_on(_PSEUDO_US_LOWER); + update_tri_layer(_PSEUDO_US_LOWER, _PSEUDO_US_RAISE, _ADJUST); + } else { + layer_off(_PSEUDO_US_LOWER); + update_tri_layer(_PSEUDO_US_LOWER, _PSEUDO_US_RAISE, _ADJUST); + } + return false; + break; + case P_RAISE: + if (record->event.pressed) { + layer_on(_PSEUDO_US_RAISE); + update_tri_layer(_PSEUDO_US_LOWER, _PSEUDO_US_RAISE, _ADJUST); + } else { + layer_off(_PSEUDO_US_RAISE); + update_tri_layer(_PSEUDO_US_LOWER, _PSEUDO_US_RAISE, _ADJUST); + } + return false; + break; + case QWERTY: + if (record->event.pressed) { + set_single_persistent_default_layer(_QWERTY); + } + break; + case PSEU_US: + if (record->event.pressed) { + set_single_persistent_default_layer(_PSEUDO_US); + } + break; + case JIS2US: + action_pseudo_process(record, _QWERTY, keymap_jis2us); + return false; + break; + } + return true; +} diff --git a/keyboards/satt/vision/keymaps/satt/keymap_jis2us.h b/keyboards/satt/vision/keymaps/satt/keymap_jis2us.h new file mode 100644 index 000000000000..916a403eb60e --- /dev/null +++ b/keyboards/satt/vision/keymaps/satt/keymap_jis2us.h @@ -0,0 +1,49 @@ +/* Copyright 2020 shela + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License 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_jp.h" + +// clang-format off +/* Keymap for converting JIS to US */ +const uint16_t PROGMEM keymap_jis2us[][2] = { + [KC_A ... KC_CAPS] = { 0x00, 0x00 }, /* default value */ + + [KC_1] = { KC_1, JP_EXLM }, /* 1 and ! -> 1 and ! */ + [KC_2] = { KC_2, JP_AT }, /* 2 and " -> 2 and @ */ + [KC_3] = { KC_3, JP_HASH }, /* 3 and # -> 3 and # */ + [KC_4] = { KC_4, JP_DLR }, /* 4 and $ -> 4 and $ */ + [KC_5] = { KC_5, JP_PERC }, /* 5 and % -> 5 and % */ + [KC_6] = { KC_6, JP_CIRC }, /* 6 and & -> 6 and ^ */ + [KC_7] = { KC_7, JP_AMPR }, /* 7 and ' -> 7 and & */ + [KC_8] = { KC_8, JP_ASTR }, /* 8 and ( -> 8 and * */ + [KC_9] = { KC_9, JP_LPRN }, /* 9 and ) -> 9 and ( */ + [KC_0] = { KC_0, JP_RPRN }, /* 0 -> 0 and ) */ + [KC_MINS] = { JP_MINS, JP_UNDS }, /* - and = -> - and _ */ + [KC_EQL] = { JP_EQL, JP_PLUS }, /* ^ and ~ -> = and + */ + [KC_LBRC] = { JP_LBRC, JP_LCBR }, /* @ and ` -> [ and { */ + [KC_RBRC] = { JP_RBRC, JP_RCBR }, /* [ and { -> ] and } */ + [KC_BSLS] = { JP_YEN, JP_PIPE }, /* ] and } -> \ and | */ + [KC_NUHS] = { JP_YEN, JP_PIPE }, /* ] and } -> \ and | */ + [KC_SCLN] = { JP_SCLN, JP_COLN }, /* ; and + -> ; and : */ + [KC_QUOT] = { JP_QUOT, JP_DQT }, /* : and * -> ' and " */ + [KC_GRV] = { JP_GRV, JP_TILD }, /* Han/Zen -> ` and ~ */ + [KC_COMM] = { JP_COMM, JP_LT }, /* , and < -> , and < */ + [KC_DOT] = { JP_DOT, JP_GT }, /* . and > -> . and > */ + [KC_SLSH] = { JP_SLSH, JP_QUES }, /* / and ? -> / and ? */ +}; +// clang-format on diff --git a/keyboards/satt/vision/keymaps/satt/readme.md b/keyboards/satt/vision/keymaps/satt/readme.md new file mode 100644 index 000000000000..33bbad3264bc --- /dev/null +++ b/keyboards/satt/vision/keymaps/satt/readme.md @@ -0,0 +1,6 @@ +## Pseudo US Layout + +On a Japanese Windows environment, ANSI keyboards may be recognized wrongly as a JIS keyboard. +By using this code, you can use your ANSI keyboard under a JIS keyboard environment without changing the settings and registry of your environment. + +Original code by [Shela](https://github.com/qmk/qmk_firmware/tree/master/keyboards/hhkb/keymaps/shela) diff --git a/keyboards/satt/vision/keymaps/satt/rules.mk b/keyboards/satt/vision/keymaps/satt/rules.mk new file mode 100644 index 000000000000..029fdeeb1d08 --- /dev/null +++ b/keyboards/satt/vision/keymaps/satt/rules.mk @@ -0,0 +1 @@ +SRC += action_pseudo.c diff --git a/keyboards/satt/vision/keymaps/via/keymap.c b/keyboards/satt/vision/keymaps/via/keymap.c new file mode 100644 index 000000000000..bacdccf80fd6 --- /dev/null +++ b/keyboards/satt/vision/keymaps/via/keymap.c @@ -0,0 +1,64 @@ +/* +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 + + +// 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, + _LOWER, + _RAISE, + _ADJUST +}; + +#define LOWER MO(_LOWER) +#define RAISE MO(_RAISE) +#define ADJUST MO(_ADJUST) + +const uint16_t keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [_QWERTY] = LAYOUT( + KC_PGUP, 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_DEL, + KC_PGDN, 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_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, ADJUST, + KC_LGUI, KC_LALT, LOWER, KC_SPC, RAISE, KC_ENT, KC_RALT, KC_RCTL + ), + + [_LOWER] = LAYOUT( + _______, _______, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, _______, _______, + _______, _______, _______, _______, _______, _______, KC_GRV, KC_BSLS, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, _______, + _______, _______, _______, _______, _______, KC_TILD, _______, KC_PIPE, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, _______, + _______, _______, _______, _______, _______, _______, _______, _______ + ), + + [_RAISE] = LAYOUT( + _______, _______, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, _______, _______, + _______, _______, _______, _______, _______, _______, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_END, _______, + _______, _______, _______, _______, _______, _______, KC_HOME, XXXXXXX, KC_PGDN, KC_PGUP, XXXXXXX, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______ + ), + + [_ADJUST] = 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, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______ + ) +}; diff --git a/keyboards/satt/vision/keymaps/via/rules.mk b/keyboards/satt/vision/keymaps/via/rules.mk new file mode 100644 index 000000000000..abbe2e7d3b98 --- /dev/null +++ b/keyboards/satt/vision/keymaps/via/rules.mk @@ -0,0 +1,3 @@ +# rules.mk overrides to enable VIA + +VIA_ENABLE = yes diff --git a/keyboards/satt/vision/mcuconf.h b/keyboards/satt/vision/mcuconf.h new file mode 100644 index 000000000000..4b76c054ae05 --- /dev/null +++ b/keyboards/satt/vision/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 FASLE +#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_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/satt/vision/readme.md b/keyboards/satt/vision/readme.md new file mode 100644 index 000000000000..9c001623f204 --- /dev/null +++ b/keyboards/satt/vision/readme.md @@ -0,0 +1,12 @@ +# Vision + +Vision Keyboard + +* Keyboard Maintainer: [SatT](https://github.com/satt99) +* Hardware Supported: STM32F072CBT6 + +Make example for this keyboard (after setting up your build environment): + + make satt/vision: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/satt/vision/rules.mk b/keyboards/satt/vision/rules.mk new file mode 100644 index 000000000000..888e650d545f --- /dev/null +++ b/keyboards/satt/vision/rules.mk @@ -0,0 +1,20 @@ +# 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 = 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 +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +BLUETOOTH_ENABLE = no # Enable Bluetooth +AUDIO_ENABLE = no # Audio output + +# Enter lower-power sleep mode when on the ChibiOS idle thread +OPT_DEFS += -DCORTEX_ENABLE_WFI_IDLE=TRUE diff --git a/keyboards/satt/vision/vision.c b/keyboards/satt/vision/vision.c new file mode 100644 index 000000000000..ef23c5b1d11a --- /dev/null +++ b/keyboards/satt/vision/vision.c @@ -0,0 +1,17 @@ +/* Copyright 2020 SatT + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#include "vision.h" diff --git a/keyboards/satt/vision/vision.h b/keyboards/satt/vision/vision.h new file mode 100644 index 000000000000..4906d4fcd1c5 --- /dev/null +++ b/keyboards/satt/vision/vision.h @@ -0,0 +1,31 @@ +/* Copyright 2020 SatT + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License 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, \ + K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K113, \ + K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, \ + K301, K303, K305, K306, K307, K309, K310, 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 }, \ + { KC_NO, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213 }, \ + { KC_NO, K301, KC_NO, K303, KC_NO, K305, K306, K307, KC_NO, K309, K310, KC_NO, KC_NO, K313 }, \ +} From 057bc5da80da0fc1056463f82b774bd198d5197e Mon Sep 17 00:00:00 2001 From: Damien Date: Wed, 19 Aug 2020 20:21:39 +0200 Subject: [PATCH 606/930] [Keymap] added dbroqua keymap for kbdfans/kbd6x (#10072) * [kbdfans] Added dbroqua layout for kbd6x Add dbroqua keymap for kbd6x Add dbroqua layout for kbd6x with HHKB style and RGB. * Update keymap.c * Change based on zvecr * Added RESET button --- .../kbdfans/kbd6x/keymaps/dbroqua/keymap.c | 94 +++++++++++++++++++ 1 file changed, 94 insertions(+) create mode 100644 keyboards/kbdfans/kbd6x/keymaps/dbroqua/keymap.c diff --git a/keyboards/kbdfans/kbd6x/keymaps/dbroqua/keymap.c b/keyboards/kbdfans/kbd6x/keymaps/dbroqua/keymap.c new file mode 100644 index 000000000000..e7f6d90103cd --- /dev/null +++ b/keyboards/kbdfans/kbd6x/keymaps/dbroqua/keymap.c @@ -0,0 +1,94 @@ +/* + * dbroqua HHKB Layout + */ +#include QMK_KEYBOARD_H + +enum layer_names { + _DEFAULT, + _ALTERNATE, + _FN, + _RGB +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* BASE layer: Default Layer + * ,-----------------------------------------------------------------------------------------. + * | Esc | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | \ | ` | + * |-----------------------------------------------------------------------------------------+ + * | Tab | Q | W | E | R | T | Y | U | I | O | P | [ | ] | Bksp | + * |-----------------------------------------------------------------------------------------+ + * | Ctrl | A | S | D | F | G | H | J | K | L | ; | ' | Enter | + * |-----------------------------------------------------------------------------------------+ + * | Shift | Z | X | C | V | B | N | M | , | . | / | Shift | fn | + * +-----------------------------------------------------------------------------------------+ + * | Alt | Gui | Space | Gui |RCtrl| + * `-------------------------------------------------------------------------´ + */ + [_DEFAULT] = 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_TAB, KC_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), + KC_TRNS, KC_LALT, KC_LGUI, /* */ KC_SPC, KC_RGUI, KC_RCTL, KC_TRNS), + /* Alternamte layer: swap alt/gui + * ,-----------------------------------------------------------------------------------------. + * | Esc | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | \ | ` | + * |-----------------------------------------------------------------------------------------+ + * | Tab | Q | W | E | R | T | Y | U | I | O | P | [ | ] | Bksp | + * |-----------------------------------------------------------------------------------------+ + * | Ctrl | A | S | D | F | G | H | J | K | L | ; | ' | Enter | + * |-----------------------------------------------------------------------------------------+ + * | Shift | Z | X | C | V | B | N | M | , | . | / | Shift | fn | + * +-----------------------------------------------------------------------------------------+ + * | Gui | Alt | Space | AltGr |RCtrl| + * `-------------------------------------------------------------------------´ + */ + [_ALTERNATE] = 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_TAB, KC_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), + KC_TRNS, KC_LGUI, KC_LALT, /* */ KC_SPC, KC_RALT, KC_RCTL, KC_TRNS), + + /* FN Layer + * ,-----------------------------------------------------------------------------------------. + * | Pwr | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F0 | F11 | F12 | Ins | Del| + * |-----------------------------------------------------------------------------------------+ + * | Caps | | | | | | | |PrtSc| Slck| Paus| Up | | | + * |-----------------------------------------------------------------------------------------+ + * | | Vol-| Vol+| Mute|Eject| | * | / | Home| PgUp| Left |Right| | + * |-----------------------------------------------------------------------------------------+ + * | | Prev| Play| Next| | | + | - | End |PgDwn| Down| _RGB | | + * +-----------------------------------------------------------------------------------------+ + * | _DEF| _ALTER | | Stop | | + * `-------------------------------------------------------------------------´ + */ + [_FN] = LAYOUT( + 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_CAPS, RGB_TOG, RGB_MOD, 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_MPRV, KC_MPLY, KC_MNXT, KC_TRNS, KC_TRNS, KC_PPLS, KC_PMNS, KC_END, KC_PGDN, KC_DOWN, DF(_RGB), KC_TRNS, + KC_TRNS, DF(_DEFAULT), DF(_ALTERNATE), KC_TRNS, KC_MSTP, KC_TRNS, KC_TRNS), + + + /* RGB Layer + * ,-----------------------------------------------------------------------------------------. + * | RST | | | | | | | | | | | | | | | + * |-----------------------------------------------------------------------------------------+ + * | |R_TOG|R_MOD|RRMOD|R_HUI|R_HUD|R_SAI|R_SAD|R_VAI|R_VAD|R_SPI|R_SPD| | | + * |-----------------------------------------------------------------------------------------+ + * | |R_M_P|R_M_B|R_M_R|R_MSW|R_MSN|R_M_K|R_M_X|R_M_G| | | | | + * |-----------------------------------------------------------------------------------------+ + * | |BL_TG|BL_ST|BL_ON|BL_OF|BL_IN|BL_DC|BL_BR| | | | | | + * +-----------------------------------------------------------------------------------------+ + * | _DEF| _ALTER | | | | + * `-------------------------------------------------------------------------´ + */ + [_RGB] = 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, RGB_TOG, RGB_MOD, RGB_RMOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, RGB_SPI, RGB_SPD, KC_TRNS, KC_TRNS, + KC_TRNS, 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, BL_TOGG, BL_STEP, BL_ON, BL_OFF, BL_INC, BL_DEC, BL_BRTG, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, DF(_DEFAULT), DF(_ALTERNATE), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS) + +}; From 4f4c6e04d9f1b0700f3ef46d0f08be64f19eb4d0 Mon Sep 17 00:00:00 2001 From: Evgenii <59191442+greenjack-z@users.noreply.github.com> Date: Wed, 19 Aug 2020 22:00:36 +0300 Subject: [PATCH 607/930] Rename keyboards/handwired/zergo/keymap.c to keyboards/handwired/zergo/keymaps/default/keymap.c (#10094) --- keyboards/handwired/zergo/{ => keymaps/default}/keymap.c | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename keyboards/handwired/zergo/{ => keymaps/default}/keymap.c (100%) diff --git a/keyboards/handwired/zergo/keymap.c b/keyboards/handwired/zergo/keymaps/default/keymap.c similarity index 100% rename from keyboards/handwired/zergo/keymap.c rename to keyboards/handwired/zergo/keymaps/default/keymap.c From c23e6dff78997e51a4aefc83e7fa8ac6d48df5ae Mon Sep 17 00:00:00 2001 From: fvolpe83 <62909893+fvolpe83@users.noreply.github.com> Date: Wed, 19 Aug 2020 21:30:00 +0200 Subject: [PATCH 608/930] [Keymap] xd60:shura30 (#10089) * added my xd60 layout * added my xd60 layout * Update keyboards/xd60/keymaps/shura30/keymap.c * Update keyboards/xd60/keymaps/shura30/keymap.c * Update keyboards/xd60/keymaps/shura30/config.h --- keyboards/xd60/keymaps/shura30/config.h | 10 +++ keyboards/xd60/keymaps/shura30/keymap.c | 78 ++++++++++++++++++++++++ keyboards/xd60/keymaps/shura30/readme.md | 33 ++++++++++ keyboards/xd60/keymaps/shura30/rules.mk | 1 + 4 files changed, 122 insertions(+) create mode 100755 keyboards/xd60/keymaps/shura30/config.h create mode 100755 keyboards/xd60/keymaps/shura30/keymap.c create mode 100755 keyboards/xd60/keymaps/shura30/readme.md create mode 100755 keyboards/xd60/keymaps/shura30/rules.mk diff --git a/keyboards/xd60/keymaps/shura30/config.h b/keyboards/xd60/keymaps/shura30/config.h new file mode 100755 index 000000000000..b26b00b18980 --- /dev/null +++ b/keyboards/xd60/keymaps/shura30/config.h @@ -0,0 +1,10 @@ +#pragma once + +/* Changes the number of taps required for layer toggle*/ +#define TAPPING_TOGGLE 3 + +/* The RGB lighting will be switched off when the host goes to sleep */ +#define RGBLIGHT_SLEEP + +// lighting layers +#define RGBLIGHT_LAYERS diff --git a/keyboards/xd60/keymaps/shura30/keymap.c b/keyboards/xd60/keymaps/shura30/keymap.c new file mode 100755 index 000000000000..61ce36310555 --- /dev/null +++ b/keyboards/xd60/keymaps/shura30/keymap.c @@ -0,0 +1,78 @@ +#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_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_NO, + 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_LSFT, KC_NUBS, 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_PSCR, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_APP, KC_NO, TT(1), KC_RCTL), + + [1] = 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_NO, KC_DEL, + KC_TAB, KC_INS, KC_DEL, KC_UP, KC_PGUP, KC_PGDN, KC_NO, KC_MS_BTN1, KC_MS_UP, KC_MS_BTN2, KC_NO, KC_NO, KC_NO, KC_NO, + KC_TRNS, KC_NO, KC_LEFT, KC_DOWN, KC_RGHT, KC_NO, KC_NO, KC_MS_LEFT, KC_MS_DOWN, KC_MS_RIGHT, KC_NO, KC_NO, KC_NO, KC_ENT, + KC_LSFT, KC_PSCR, KC_NO, KC_HOME, KC_END, KC_NO, KC_NO, KC_NO, KC_MS_BTN3, KC_NO, KC_NO, KC_NO, KC_NO, KC_RSFT, MO(2), + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_APP, KC_NO, KC_TRNS, KC_RCTL), + + [2] = LAYOUT_all( + KC_NO, KC_NO, 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, BL_TOGG, BL_STEP, BL_ON, BL_OFF, BL_INC, BL_DEC, BL_BRTG, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_NO, RGB_TOG, RGB_MOD, RGB_RMOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, RGB_SPI, RGB_SPD, KC_NO, KC_NO, + KC_NO, 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_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) +}; + +const rgblight_segment_t PROGMEM my_0_layer[] = RGBLIGHT_LAYER_SEGMENTS( + {0, 6, HSV_CYAN}, + {6, 6, HSV_BLUE} +); + +const rgblight_segment_t PROGMEM my_1_layer[] = RGBLIGHT_LAYER_SEGMENTS( + {1, 4, HSV_GREEN}, + {7, 4, HSV_GREEN} +); +const rgblight_segment_t PROGMEM my_2_layer[] = RGBLIGHT_LAYER_SEGMENTS( + {1, 4, HSV_PURPLE}, + {7, 4, HSV_PURPLE} +); + +const rgblight_segment_t PROGMEM my_caps_layer[] = RGBLIGHT_LAYER_SEGMENTS( + {0, 1, HSV_RED}, + {5, 1, HSV_RED}, + {6, 1, HSV_RED}, + {11, 1, HSV_RED} +); + +// Now define the array of layers. Later layers take precedence +const rgblight_segment_t* const PROGMEM my_layers[] = RGBLIGHT_LAYERS_LIST( + my_0_layer, + my_1_layer, + my_2_layer, + my_caps_layer +); + +void keyboard_post_init_user(void) { + // Enable the LED layers + rgblight_layers = my_layers; + layer_state_set_user(layer_state); +}; + +layer_state_t layer_state_set_user(layer_state_t state) { + rgblight_set_layer_state(0, layer_state_cmp(state, 0)); + rgblight_set_layer_state(1, layer_state_cmp(state, 1)); + rgblight_set_layer_state(2, layer_state_cmp(state, 2)); + return state; +}; + + bool led_update_user(led_t led_state) { + rgblight_set_layer_state(3, led_state.caps_lock); + return true; +}; + +/* // EEPROM Reset Function +void eeconfig_init_user(void) { + backlight_enable(); // Enable backlight by default + rgblight_enable(); // Enable RGB by default + rgblight_sethsv(HSV_BLUE); // Set it to orange by default +}; */ diff --git a/keyboards/xd60/keymaps/shura30/readme.md b/keyboards/xd60/keymaps/shura30/readme.md new file mode 100755 index 000000000000..8e58ad3d9810 --- /dev/null +++ b/keyboards/xd60/keymaps/shura30/readme.md @@ -0,0 +1,33 @@ +# shura30's keymap for XIUDI's 60% XD60 PCB rev3 + +3 layers in ISO: + +- 0 for ISO querty with split backspace and split right shift +- 1 for arrows and mouse +- 2 for backlight + + +![Keyboard Layout (Physical appearence)](https://i.imgur.com/Zgc4Fv6.jpg "physical layout") + + +## Additional Notes + +RGB lighting enabled and goes to sleep with the host, each layer has its own color including capslock layer: + +- 0 = cyan/blue +- caps = red +- 1 = green +- 2 = purple + +tapping toggle has been defined to 3 in the separate config.h + +via has been enabled, waiting for official support on their end + +## Build + +To build the keymap, simply run: + + make xd60/rev3:shura30 # XD60 rev3 + + +![Keyboard Layout (Physical appearence)](https://i.imgur.com/CSRPjbX.png "physical layout") diff --git a/keyboards/xd60/keymaps/shura30/rules.mk b/keyboards/xd60/keymaps/shura30/rules.mk new file mode 100755 index 000000000000..1e5b99807cb7 --- /dev/null +++ b/keyboards/xd60/keymaps/shura30/rules.mk @@ -0,0 +1 @@ +VIA_ENABLE = yes From c18cbcc5ad58c902cce6ab4cf44f9899ff5a154c Mon Sep 17 00:00:00 2001 From: Nick Blyumberg Date: Wed, 19 Aug 2020 15:31:56 -0400 Subject: [PATCH 609/930] [Keymap] VIA keymap for Cannonkeys Ortho60 (#10086) * Adding VIA support * Fixed Vendor ID * Update keyboards/cannonkeys/ortho60/config.h * Update keyboards/cannonkeys/ortho60/keymaps/via/keymap.c * Update keyboards/cannonkeys/ortho60/config.h --- keyboards/cannonkeys/ortho60/config.h | 4 +- .../cannonkeys/ortho60/keymaps/via/keymap.c | 49 +++++++++++++++++++ .../cannonkeys/ortho60/keymaps/via/rules.mk | 2 + 3 files changed, 53 insertions(+), 2 deletions(-) create mode 100644 keyboards/cannonkeys/ortho60/keymaps/via/keymap.c create mode 100644 keyboards/cannonkeys/ortho60/keymaps/via/rules.mk diff --git a/keyboards/cannonkeys/ortho60/config.h b/keyboards/cannonkeys/ortho60/config.h index 7e3ef879bc2a..d21764c7f5aa 100644 --- a/keyboards/cannonkeys/ortho60/config.h +++ b/keyboards/cannonkeys/ortho60/config.h @@ -18,8 +18,8 @@ along with this program. If not, see . #pragma once /* USB Device descriptor parameter */ -#define VENDOR_ID 0xFEED -#define PRODUCT_ID 0x6464 +#define VENDOR_ID 0xCA04 +#define PRODUCT_ID 0x4F60 // "O" 60 #define DEVICE_VER 0x0001 #define MANUFACTURER QMK #define PRODUCT Ortho60 diff --git a/keyboards/cannonkeys/ortho60/keymaps/via/keymap.c b/keyboards/cannonkeys/ortho60/keymaps/via/keymap.c new file mode 100644 index 000000000000..8c9e553ecdcb --- /dev/null +++ b/keyboards/cannonkeys/ortho60/keymaps/via/keymap.c @@ -0,0 +1,49 @@ + +#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, + _LOWER, + _RAISE, + _FN +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +[_BASE] = LAYOUT_ortho_5x12( + 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, KC_ENT, + BL_TOGG, KC_LCTL, KC_LALT, KC_LGUI, MO(_LOWER), KC_SPC, KC_SPC, MO(_RAISE), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT +), + +[_LOWER] = LAYOUT_ortho_5x12( + 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, _______, + RESET, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY +), + +[_RAISE] = LAYOUT_ortho_5x12( + 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, _______, + RGB_TOG, RGB_MOD, BL_INC, BL_DEC, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY +), + +[_FN] = LAYOUT_ortho_5x12( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + 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/ortho60/keymaps/via/rules.mk b/keyboards/cannonkeys/ortho60/keymaps/via/rules.mk new file mode 100644 index 000000000000..36b7ba9cbc98 --- /dev/null +++ b/keyboards/cannonkeys/ortho60/keymaps/via/rules.mk @@ -0,0 +1,2 @@ +VIA_ENABLE = yes +LTO_ENABLE = yes From cdb69da86e482cba7f7980cba946a5409215fe62 Mon Sep 17 00:00:00 2001 From: Jason Fields Date: Wed, 19 Aug 2020 14:59:59 -0700 Subject: [PATCH 610/930] Fix typo in docs/feature_dynamic_macros (#10085) s/completly/completely --- docs/feature_dynamic_macros.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/feature_dynamic_macros.md b/docs/feature_dynamic_macros.md index 137b0eefb949..01f2a0ca407b 100644 --- a/docs/feature_dynamic_macros.md +++ b/docs/feature_dynamic_macros.md @@ -22,7 +22,7 @@ To finish the recording, press the `DYN_REC_STOP` layer button. You can also pre To replay the macro, press either `DYN_MACRO_PLAY1` or `DYN_MACRO_PLAY2`. -It is possible to replay a macro as part of a macro. It's ok to replay macro 2 while recording macro 1 and vice versa but never create recursive macros i.e. macro 1 that replays macro 1. If you do so and the keyboard will get unresponsive, unplug the keyboard and plug it again. You can disable this completly by defining `DYNAMIC_MACRO_NO_NESTING` in your `config.h` file. +It is possible to replay a macro as part of a macro. It's ok to replay macro 2 while recording macro 1 and vice versa but never create recursive macros i.e. macro 1 that replays macro 1. If you do so and the keyboard will get unresponsive, unplug the keyboard and plug it again. You can disable this completely by defining `DYNAMIC_MACRO_NO_NESTING` in your `config.h` file. ?> For the details about the internals of the dynamic macros, please read the comments in the `process_dynamic_macro.h` and `process_dynamic_macro.c` files. From 0b894ca99c4b4556f386afb7badd6f04b715d086 Mon Sep 17 00:00:00 2001 From: LucW Date: Thu, 20 Aug 2020 09:38:52 +0800 Subject: [PATCH 611/930] [Keymap] update dvorak_42_key keymaps for atreus and ergodox_ez: add VSCode shortcuts (#10054) * remove obsolete cloud9 macros, add vscode macros on the KEYNAV layer * add vscode layer and shortcuts * remove duplicate VSCODE layer and macros * apply review changes --- .../atreus/keymaps/dvorak_42_key/keymap.c | 99 +++++++++++-------- .../ergodox_ez/keymaps/dvorak_42_key/keymap.c | 17 ++-- 2 files changed, 70 insertions(+), 46 deletions(-) diff --git a/keyboards/atreus/keymaps/dvorak_42_key/keymap.c b/keyboards/atreus/keymaps/dvorak_42_key/keymap.c index 3f769494494f..0c9ab59a92a5 100644 --- a/keyboards/atreus/keymaps/dvorak_42_key/keymap.c +++ b/keyboards/atreus/keymaps/dvorak_42_key/keymap.c @@ -11,8 +11,11 @@ // aliases // shell #define SHELL_DEL_WORD RCTL(KC_W) -// android studio +// comment out to use android studio macros instead +#define USE_VSCODE_MACROS + +// android studio shortcuts #define AS_TABLEFT LALT(KC_LEFT) #define AS_TABRIGHT LALT(KC_RIGHT) #define AS_SYMBOL LCTL(LALT(KC_N)) @@ -25,17 +28,49 @@ #define AS_CLOSETOOLWINDOW LCTL(LSFT(KC_F4)) #define AS_ALTENTER LALT(KC_ENTER) +// visual studio code shortcuts +#define VS_FILE LCTL(KC_P) +#define VS_LINE LCTL(KC_G) +#define VS_SYMBOLEDITOR LCTL(LSFT(KC_O)) +#define VS_DEFINITION KC_F12 +#define VS_IMPLEMENTATION LCTL(KC_F12) +#define VS_REFERENCES LSFT(KC_F12) +#define VS_BACK LALT(KC_LEFT) +#define VS_BRACKET LCTL(LSFT(KC_BSLS)) +#define VS_TABLEFT LCTL(KC_PGUP) +#define VS_TABRIGHT LCTL(KC_PGDN) +#define VS_CLOSETAB LCTL(KC_W) +#define VS_CLOSEPANEL LCTL(LSFT(KC_W)) +#define VS_TERMINAL LCTL(KC_GRAVE) +#define VS_BUILD LCTL(LSFT(KC_B)) +#define VS_COMMANDS LCTL(LSFT(KC_P)) +#define VS_CMT_BLOCK LSFT(LALT(KC_A)) +#define VS_CMT_LINE LCTL(KC_SLSH) +#define VS_DEL_LINE LCTL(LSFT(KC_K)) +#define VS_COPYLINEDOWN LSFT(LALT(KC_DOWN)) +// visual studio bookmark commands +#define VS_BM_LIST LCTL(LALT(KC_L)) +#define VS_BM_LISTALL LCTL(LALT(KC_A)) +#define VS_BM_PREV LCTL(LALT(KC_P)) +#define VS_BM_NEXT LCTL(LALT(KC_N)) +#define VS_BM_TOGGLE LCTL(LALT(KC_K)) +#define VS_BM_LABEL LCTL(LALT(KC_B)) + +/* +// VS code bookmark prev/next requires the following in vscode shortcuts config + { + "key": "ctrl+alt+p", + "command": "bookmarks.jumpToPrevious" + }, + { + "key": "ctrl+alt+n", + "command": "bookmarks.jumpToNext" + }, +*/ + enum custom_keycodes { PLACEHOLDER = SAFE_RANGE, // can always be here - // Cloud9 macros - CLOUD9_TAB_LEFT, - CLOUD9_TAB_RIGHT, - CLOUD9_TAB_CLOSE, - CLOUD9_GOTO_SYMBOL, - CLOUD9_GOTO_LINE, - CLOUD9_NAVIGATE, - // Windows 10 macros W10_TASKVIEW, W10_WORKSPACE_LEFT, @@ -43,9 +78,8 @@ enum custom_keycodes { }; -// building instructions: -// make atreus:dvorak_42_key - +// building/flashing instructions: +// make atreus/astar:dvorak_42_key:flash const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [BASE] = LAYOUT( @@ -55,12 +89,23 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { OSM(MOD_LSFT), OSM(MOD_LCTL), MO(KEYSEL), MO(BROWSER_CONTROL), MO(COMBINED), MO(KEYNAV), KC_ENTER, KC_SPACE, KC_BSPC, RCTL(KC_BSPC), KC_CAPSLOCK, OSM(MOD_LSFT) ), +#ifdef USE_VSCODE_MACROS +// use visual studio code macros on the KEYNAV layer + [KEYNAV] = LAYOUT( + KC_ESC, VS_DEFINITION, RCTL(KC_Z), RCTL(KC_S), MEH(KC_A), MEH(KC_B), KC_HOME, KC_UP, KC_END, KC_PGUP, + VS_BACK, VS_SYMBOLEDITOR, RSFT(KC_TAB), KC_TAB, SHELL_DEL_WORD, LCTL(KC_LEFT), KC_LEFT, KC_DOWN, KC_RIGHT, LCTL(KC_RIGHT), + VS_LINE, VS_FILE, VS_TABLEFT, VS_TABRIGHT, VS_CLOSETAB, KC_TRNS, RCTL(KC_C), RCTL(KC_X), RCTL(KC_V), KC_PGDOWN, + VS_COMMANDS, VS_CMT_LINE, VS_BM_PREV, VS_BM_NEXT, VS_BM_TOGGLE, KC_TRNS, KC_ENTER, KC_SPACE, KC_BSPC, RCTL(KC_BSPC), KC_DELETE, LCTL(KC_DELETE) + ), +#else +// use android studio macros on the KEYNAV layer [KEYNAV] = LAYOUT( KC_ESC, AS_GO_IMPLEMENTATION, RCTL(KC_Z), RCTL(KC_S), MEH(KC_A), MEH(KC_B), KC_HOME, KC_UP, KC_END, KC_PGUP, AS_BACK, AS_SYMBOL, RSFT(KC_TAB), KC_TAB, SHELL_DEL_WORD, LCTL(KC_LEFT), KC_LEFT, KC_DOWN, KC_RIGHT, LCTL(KC_RIGHT), AS_FINDUSAGE, AS_CLASS, AS_TABLEFT, AS_TABRIGHT, AS_CLOSETAB, KC_TRNS, RCTL(KC_C), RCTL(KC_X), RCTL(KC_V), KC_PGDOWN, AS_CLOSETOOLWINDOW, AS_GO_DECLARATION, KC_TRNS, KC_TRNS, AS_ALTENTER, KC_TRNS, KC_ENTER, KC_SPACE, KC_BSPC, RCTL(KC_BSPC), KC_DELETE, LCTL(KC_DELETE) ), +#endif [KEYSEL] = LAYOUT( MEH(KC_G), MEH(KC_H),MEH(KC_I), MEH(KC_J), MEH(KC_K), KC_TRNS, RSFT(KC_HOME), RSFT(KC_UP), RSFT(KC_END), RSFT(KC_PGUP), @@ -87,34 +132,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { bool process_record_user(uint16_t keycode, keyrecord_t *record) { if(record->event.pressed) { switch (keycode) { - // Cloud9 macros - case CLOUD9_TAB_LEFT: - SEND_STRING(SS_LCTRL("[")); - return true; - break; - case CLOUD9_TAB_RIGHT: - SEND_STRING(SS_LCTRL("]")); - return true; - break; - case CLOUD9_TAB_CLOSE: - SEND_STRING(SS_LALT("w")); - return true; - break; - case CLOUD9_GOTO_SYMBOL: - SEND_STRING(SS_LSFT(SS_LCTRL("e"))); - return true; - break; - case CLOUD9_GOTO_LINE: - SEND_STRING(SS_LCTRL("g")); - return true; - break; - case CLOUD9_NAVIGATE: - SEND_STRING(SS_LCTRL("e")); - return true; - break; + // windows 10 workspace shortcuts case W10_TASKVIEW: tap_code16(G(KC_TAB)); - return true; + return true; break; case W10_WORKSPACE_LEFT: tap_code16(G(C(KC_LEFT))); @@ -122,7 +143,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { break; case W10_WORKSPACE_RIGHT: tap_code16(G(C(KC_RIGHT))); - break; + break; } } diff --git a/keyboards/ergodox_ez/keymaps/dvorak_42_key/keymap.c b/keyboards/ergodox_ez/keymaps/dvorak_42_key/keymap.c index 22b8a9b9e0c9..b7deaa203766 100644 --- a/keyboards/ergodox_ez/keymaps/dvorak_42_key/keymap.c +++ b/keyboards/ergodox_ez/keymaps/dvorak_42_key/keymap.c @@ -109,6 +109,9 @@ enum custom_keycodes { #define AS_GO_IMPLEMENTATION LCTL(LALT(KC_B)) #define AS_CLOSETAB LCTL(KC_F4) #define AS_CLOSETOOLWINDOW LCTL(LSFT(KC_F4)) +#define AS_COPYLINEDOWN LCTL(KC_D) +#define AS_DEL_LINE LCTL(KC_Y) +#define AS_LINE LCTL(KC_G) // visual studio code shortcuts #define VS_FILE LCTL(KC_P) @@ -185,7 +188,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [BASE] = LAYOUT_ergodox( // left hand KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, - OSL(SCREEN_NAV), KC_QUOTE, KC_COMMA, KC_DOT, KC_P, KC_Y, MEH(KC_2), + OSL(SCREEN_NAV), KC_QUOTE, KC_COMMA, KC_DOT, KC_P, KC_Y, MO(ANDROID_STUDIO), OSL(SHELL_NAV), KC_A, KC_O, KC_E, KC_U, KC_I, OSL(SHELL_SCREEN), KC_SCOLON, KC_Q, KC_J, KC_K, KC_X, MO(VSCODE), MEH(KC_1), OSM(MOD_LSFT), OSM(MOD_LCTL), MO(KEYSEL), MO(BROWSER_CONTROL), @@ -350,16 +353,16 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS, // right hand - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, AS_FINDUSAGE, AS_GO_DECLARATION, AS_GO_IMPLEMENTATION, KC_TRNS, - AS_CLOSETAB, AS_TABLEFT, AS_TABRIGHT, AS_SYMBOL, AS_CLASS, AS_BACK, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, AS_CLOSETOOLWINDOW, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, AS_COPYLINEDOWN, AS_FINDUSAGE, AS_GO_DECLARATION, AS_GO_IMPLEMENTATION, AS_LINE, KC_TRNS, + AS_CLOSETAB, AS_TABLEFT, AS_TABRIGHT, AS_SYMBOL, AS_CLASS, AS_BACK, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, AS_CLOSETOOLWINDOW, KC_TRNS, // bottom row - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, // thumb cluster KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS + KC_TRNS, AS_DEL_LINE, KC_TRNS ), // vscode shortcuts shortcuts From ec7abc2ce287eb10ca54cb8631eb132426f27adc Mon Sep 17 00:00:00 2001 From: MechMerlin <30334081+mechmerlin@users.noreply.github.com> Date: Wed, 19 Aug 2020 18:49:31 -0700 Subject: [PATCH 612/930] [Keyboard] HolySwitch Co Southpaw75 (#10011) * add in drewguy's code with a few additions to the keymap * add VID and PID * fixup defualt keymap * add VIA keymap * thanks to bigchimpo for reminding me to put an Fn key in the default keymap * make sure we have the right gitugithub url for drew * remove description as per PR checklist * append readme with more information * Update keyboards/holyswitch/southpaw75/config.h * Update keyboards/holyswitch/southpaw75/info.json * Update keyboards/holyswitch/southpaw75/southpaw75.h * Update keyboards/holyswitch/southpaw75/info.json --- keyboards/holyswitch/southpaw75/config.h | 48 ++++++++++ keyboards/holyswitch/southpaw75/info.json | 91 +++++++++++++++++++ .../southpaw75/keymaps/default/keymap.c | 35 +++++++ .../southpaw75/keymaps/default/readme.md | 1 + .../southpaw75/keymaps/via/keymap.c | 51 +++++++++++ .../southpaw75/keymaps/via/rules.mk | 2 + keyboards/holyswitch/southpaw75/readme.md | 23 +++++ keyboards/holyswitch/southpaw75/rules.mk | 22 +++++ keyboards/holyswitch/southpaw75/southpaw75.c | 17 ++++ keyboards/holyswitch/southpaw75/southpaw75.h | 36 ++++++++ 10 files changed, 326 insertions(+) create mode 100644 keyboards/holyswitch/southpaw75/config.h create mode 100644 keyboards/holyswitch/southpaw75/info.json create mode 100644 keyboards/holyswitch/southpaw75/keymaps/default/keymap.c create mode 100644 keyboards/holyswitch/southpaw75/keymaps/default/readme.md create mode 100644 keyboards/holyswitch/southpaw75/keymaps/via/keymap.c create mode 100644 keyboards/holyswitch/southpaw75/keymaps/via/rules.mk create mode 100644 keyboards/holyswitch/southpaw75/readme.md create mode 100644 keyboards/holyswitch/southpaw75/rules.mk create mode 100644 keyboards/holyswitch/southpaw75/southpaw75.c create mode 100644 keyboards/holyswitch/southpaw75/southpaw75.h diff --git a/keyboards/holyswitch/southpaw75/config.h b/keyboards/holyswitch/southpaw75/config.h new file mode 100644 index 000000000000..c9971625adad --- /dev/null +++ b/keyboards/holyswitch/southpaw75/config.h @@ -0,0 +1,48 @@ +/* +Copyright 2020 drewguy + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License 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 0x484F // "HO" short for Holy Switch +#define PRODUCT_ID 0x5350 // "SP" short for Southpaw +#define DEVICE_VER 0x0001 +#define MANUFACTURER drewguy +#define PRODUCT southpaw default + +/* key matrix size */ +#define MATRIX_ROWS 9 +#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) + * + */ + +// 0 1 2 3 4 5 6 7 8 +#define MATRIX_ROW_PINS { B2, F0, C6, D4, D3, F1, D2, B5, D5 } +#define MATRIX_COL_PINS { B6, F7, F6, F5, F4, D0, D1, D7, B4 } + +#define DIODE_DIRECTION COL2ROW diff --git a/keyboards/holyswitch/southpaw75/info.json b/keyboards/holyswitch/southpaw75/info.json new file mode 100644 index 000000000000..3386f3be6009 --- /dev/null +++ b/keyboards/holyswitch/southpaw75/info.json @@ -0,0 +1,91 @@ +{ + "keyboard_name": "Southpaw75", + "url": "", + "maintainer": "qmk", + "width": 19, + "height": 5, + "layouts": { + "LAYOUT": { + "layout": [ + {"label":"K00 (B2,B6)", "x":0, "y":0}, + {"label":"K01 (B2,F7)", "x":1, "y":0}, + {"label":"K02 (B2,F6)", "x":2, "y":0}, + {"label":"K03 (B2,F5)", "x":3, "y":0}, + {"label":"K04 (B2,F4)", "x":4, "y":0}, + {"label":"K05 (B2,D0)", "x":5, "y":0}, + {"label":"K06 (B2,D1)", "x":6, "y":0}, + {"label":"K07 (B2,D7)", "x":7, "y":0}, + {"label":"K08 (B2,B4)", "x":8, "y":0}, + {"label":"K10 (F0,B6)", "x":9, "y":0}, + {"label":"K11 (F0,F7)", "x":10, "y":0}, + {"label":"K12 (F0,F6)", "x":11, "y":0}, + {"label":"K13 (F0,F5)", "x":12, "y":0}, + {"label":"K14 (F0,F4)", "x":13, "y":0}, + {"label":"K15 (F0,D0)", "x":14, "y":0}, + {"label":"K16 (F0,D1)", "x":15, "y":0}, + {"label":"K17 (F0,D7)", "x":16, "y":0}, + {"label":"K18 (F0,B4)", "x":17, "y":0, "w":2}, + {"label":"K20 (C6,B6)", "x":0, "y":1}, + {"label":"K21 (C6,F7)", "x":1, "y":1}, + {"label":"K22 (C6,F6)", "x":2, "y":1}, + {"label":"K23 (C6,F5)", "x":3, "y":1, "h":2}, + {"label":"K24 (C6,F4)", "x":4, "y":1, "w":1.5}, + {"label":"K25 (C6,D0)", "x":5.5, "y":1}, + {"label":"K26 (C6,D1)", "x":6.5, "y":1}, + {"label":"K27 (C6,D7)", "x":7.5, "y":1}, + {"label":"K28 (C6,B4)", "x":8.5, "y":1}, + {"label":"K30 (D4,B6)", "x":9.5, "y":1}, + {"label":"K31 (D4,F7)", "x":10.5, "y":1}, + {"label":"K32 (D4,F6)", "x":11.5, "y":1}, + {"label":"K33 (D4,F5)", "x":12.5, "y":1}, + {"label":"K34 (D4,F4)", "x":13.5, "y":1}, + {"label":"K35 (D4,D0)", "x":14.5, "y":1}, + {"label":"K36 (D4,D1)", "x":15.5, "y":1}, + {"label":"K37 (D4,D7)", "x":16.5, "y":1}, + {"label":"K38 (D4,B4)", "x":17.5, "y":1, "w":1.5}, + {"label":"K40 (D3,B6)", "x":0, "y":2}, + {"label":"K41 (D3,F7)", "x":1, "y":2}, + {"label":"K42 (D3,F6)", "x":2, "y":2}, + {"label":"K43 (D3,F5)", "x":4, "y":2, "w":1.75}, + {"label":"K44 (D3,F4)", "x":5.75, "y":2}, + {"label":"K45 (D3,D0)", "x":6.75, "y":2}, + {"label":"K46 (D3,D1)", "x":7.75, "y":2}, + {"label":"K47 (D3,D7)", "x":8.75, "y":2}, + {"label":"K48 (D3,B4)", "x":9.75, "y":2}, + {"label":"K50 (F1,B6)", "x":10.75, "y":2}, + {"label":"K51 (F1,F7)", "x":11.75, "y":2}, + {"label":"K52 (F1,F6)", "x":12.75, "y":2}, + {"label":"K53 (F1,F5)", "x":13.75, "y":2}, + {"label":"K54 (F1,F4)", "x":14.75, "y":2}, + {"label":"K55 (F1,D0)", "x":15.75, "y":2}, + {"label":"K56 (F1,D1)", "x":16.75, "y":2, "w":2.25}, + {"label":"K57 (F1,D7)", "x":0, "y":3}, + {"label":"K58 (F1,B4)", "x":1, "y":3}, + {"label":"K60 (D2,B6)", "x":2, "y":3}, + {"label":"K61 (D2,F7)", "x":3, "y":3, "h":2}, + {"label":"K62 (D2,F6)", "x":4, "y":3, "w":2.25}, + {"label":"K63 (D2,F5)", "x":6.25, "y":3}, + {"label":"K64 (D2,F4)", "x":7.25, "y":3}, + {"label":"K65 (D2,D0)", "x":8.25, "y":3}, + {"label":"K66 (D2,D1)", "x":9.25, "y":3}, + {"label":"K67 (D2,D7)", "x":10.25, "y":3}, + {"label":"K68 (D2,B4)", "x":11.25, "y":3}, + {"label":"K70 (B5,B6)", "x":12.25, "y":3}, + {"label":"K71 (B5,F7)", "x":13.25, "y":3}, + {"label":"K72 (B5,F6)", "x":14.25, "y":3}, + {"label":"K73 (B5,F5)", "x":15.25, "y":3}, + {"label":"K74 (B5,F4)", "x":16.25, "y":3, "w":2.75}, + {"label":"K75 (B5,D0)", "x":0, "y":4, "w":2}, + {"label":"K76 (B5,D1)", "x":2, "y":4}, + {"label":"K77 (B5,D7)", "x":4, "y":4, "w":1.25}, + {"label":"K78 (B5,B4)", "x":5.25, "y":4, "w":1.25}, + {"label":"K80 (D5,B6)", "x":6.5, "y":4, "w":1.25}, + {"label":"K81 (D5,F7)", "x":7.75, "y":4, "w":6.25}, + {"label":"K82 (D5,F6)", "x":14, "y":4, "w":1.25}, + {"label":"K83 (D5,F5)", "x":15.25, "y":4, "w":1.25}, + {"label":"K84 (D5,F4)", "x":16.5, "y":4, "w":1.25}, + {"label":"K85 (D5,D0)", "x":17.75, "y":4, "w":1.25} + ] + } + } +} diff --git a/keyboards/holyswitch/southpaw75/keymaps/default/keymap.c b/keyboards/holyswitch/southpaw75/keymaps/default/keymap.c new file mode 100644 index 000000000000..29675ef77356 --- /dev/null +++ b/keyboards/holyswitch/southpaw75/keymaps/default/keymap.c @@ -0,0 +1,35 @@ +/* Copyright 2020 Drewguy, 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_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_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_P4, KC_P5, KC_P6, 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_RSFT, + KC_P0, KC_PDOT, KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, MO(1), KC_RGUI, KC_APP, KC_RCTL + ), + + [1] = LAYOUT( + KC_TRNS, KC_TRNS, 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_DEL, + 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 + ), + +}; diff --git a/keyboards/holyswitch/southpaw75/keymaps/default/readme.md b/keyboards/holyswitch/southpaw75/keymaps/default/readme.md new file mode 100644 index 000000000000..bbcf7d1143fb --- /dev/null +++ b/keyboards/holyswitch/southpaw75/keymaps/default/readme.md @@ -0,0 +1 @@ +# The default keymap for southpaw75 diff --git a/keyboards/holyswitch/southpaw75/keymaps/via/keymap.c b/keyboards/holyswitch/southpaw75/keymaps/via/keymap.c new file mode 100644 index 000000000000..cfca6b435d05 --- /dev/null +++ b/keyboards/holyswitch/southpaw75/keymaps/via/keymap.c @@ -0,0 +1,51 @@ +/* Copyright 2020 Drewguy, 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_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_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_P4, KC_P5, KC_P6, 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_RSFT, + KC_P0, KC_PDOT, KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, MO(1), KC_RGUI, KC_APP, KC_RCTL + ), + + [1] = LAYOUT( + KC_TRNS, KC_TRNS, 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_DEL, + 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 + ), + + [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, 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 + ), + +}; diff --git a/keyboards/holyswitch/southpaw75/keymaps/via/rules.mk b/keyboards/holyswitch/southpaw75/keymaps/via/rules.mk new file mode 100644 index 000000000000..36b7ba9cbc98 --- /dev/null +++ b/keyboards/holyswitch/southpaw75/keymaps/via/rules.mk @@ -0,0 +1,2 @@ +VIA_ENABLE = yes +LTO_ENABLE = yes diff --git a/keyboards/holyswitch/southpaw75/readme.md b/keyboards/holyswitch/southpaw75/readme.md new file mode 100644 index 000000000000..9c7ade561bb8 --- /dev/null +++ b/keyboards/holyswitch/southpaw75/readme.md @@ -0,0 +1,23 @@ +# HolySwitch Co Southpaw75 + +60% Keyboard with numpad on the left side. + +This is the USB C, with pre soldered components and was a US exclusive sold through HolySwitch Co. The international +version was sold with a pro micro. + +Firmware on the international version is not compatible with this PCB, and firmware for this PCB is not compatible +with the international version. + +* Keyboard Maintainer: [Drewpyun](https://github.com/drewpyun), [MechMerlin](https://github.com/mechmerlin) +* Hardware Supported: Southpaw75 +* Hardware Availability: [HolySwitch Co.](https://holyswitch.co/collections/group-buys/products/southpaw75) + +Make example for this keyboard (after setting up your build environment): + + make holyswitch/southpaw75:default + +Flashing example for this keyboard: + + make holyswitch/southpaw75: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). diff --git a/keyboards/holyswitch/southpaw75/rules.mk b/keyboards/holyswitch/southpaw75/rules.mk new file mode 100644 index 000000000000..5c0d8f307c54 --- /dev/null +++ b/keyboards/holyswitch/southpaw75/rules.mk @@ -0,0 +1,22 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +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 +BLUETOOTH_ENABLE = no # Enable Bluetooth +AUDIO_ENABLE = no # Audio output diff --git a/keyboards/holyswitch/southpaw75/southpaw75.c b/keyboards/holyswitch/southpaw75/southpaw75.c new file mode 100644 index 000000000000..90246022776a --- /dev/null +++ b/keyboards/holyswitch/southpaw75/southpaw75.c @@ -0,0 +1,17 @@ +/* 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 "southpaw75.h" diff --git a/keyboards/holyswitch/southpaw75/southpaw75.h b/keyboards/holyswitch/southpaw75/southpaw75.h new file mode 100644 index 000000000000..0fd4ee0c0048 --- /dev/null +++ b/keyboards/holyswitch/southpaw75/southpaw75.h @@ -0,0 +1,36 @@ +/* Copyright 2020 drewguy + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License 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, 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 \ +) { \ + { 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, KC_NO, KC_NO, KC_NO }, \ +} From 83c7c66e8caab77bfb97c937c371ceb165c58102 Mon Sep 17 00:00:00 2001 From: Salicylic-acid3 <46864619+Salicylic-acid3@users.noreply.github.com> Date: Thu, 20 Aug 2020 10:50:43 +0900 Subject: [PATCH 613/930] [Keyboard] AJisai74 (#10021) * Add keyboard ajisai74 Add ajisai74 keyboard. A 74 keys ANSI/JIS Layout keyboard. Salicylic-acid3 * Update keyboards/ajisai74/keymaps/salicylic/keymap.c * Update keyboards/ajisai74/keymaps/via/keymap.c * Update keyboards/ajisai74/keymaps/via/keymap.c * Update keyboards/ajisai74/rules.mk * Update keyboards/ajisai74/rev1/rev1.h * Update keyboards/ajisai74/keymaps/default/keymap.c * Update keyboards/ajisai74/keymaps/default/keymap.c * Update keyboards/ajisai74/keymaps/jis/keymap.c * Keymap update Fixed an unnecessary symbol at the end of the file. * Update keyboards/ajisai74/readme.md * Update keyboards/ajisai74/rev1/config.h * Delete Rev1 directory I removed the directory because I don't have any plans to update now. * Update keyboards/ajisai74/rules.mk * Added copyright Added copyright to all files. * Update keyboards/ajisai74/ajisai74.h --- keyboards/ajisai74/ajisai74.c | 18 ++++ keyboards/ajisai74/ajisai74.h | 54 ++++++++++++ keyboards/ajisai74/config.h | 49 +++++++++++ keyboards/ajisai74/info.json | 86 +++++++++++++++++++ keyboards/ajisai74/keymaps/default/config.h | 22 +++++ keyboards/ajisai74/keymaps/default/keymap.c | 58 +++++++++++++ keyboards/ajisai74/keymaps/jis/config.h | 22 +++++ keyboards/ajisai74/keymaps/jis/keymap.c | 65 ++++++++++++++ keyboards/ajisai74/keymaps/jis/rules.mk | 1 + keyboards/ajisai74/keymaps/salicylic/config.h | 22 +++++ keyboards/ajisai74/keymaps/salicylic/keymap.c | 80 +++++++++++++++++ keyboards/ajisai74/keymaps/salicylic/rules.mk | 1 + keyboards/ajisai74/keymaps/via/config.h | 22 +++++ keyboards/ajisai74/keymaps/via/keymap.c | 86 +++++++++++++++++++ keyboards/ajisai74/keymaps/via/rules.mk | 1 + keyboards/ajisai74/readme.md | 17 ++++ keyboards/ajisai74/rules.mk | 24 ++++++ 17 files changed, 628 insertions(+) create mode 100644 keyboards/ajisai74/ajisai74.c create mode 100644 keyboards/ajisai74/ajisai74.h create mode 100644 keyboards/ajisai74/config.h create mode 100644 keyboards/ajisai74/info.json create mode 100644 keyboards/ajisai74/keymaps/default/config.h create mode 100644 keyboards/ajisai74/keymaps/default/keymap.c create mode 100644 keyboards/ajisai74/keymaps/jis/config.h create mode 100644 keyboards/ajisai74/keymaps/jis/keymap.c create mode 100644 keyboards/ajisai74/keymaps/jis/rules.mk create mode 100644 keyboards/ajisai74/keymaps/salicylic/config.h create mode 100644 keyboards/ajisai74/keymaps/salicylic/keymap.c create mode 100644 keyboards/ajisai74/keymaps/salicylic/rules.mk create mode 100644 keyboards/ajisai74/keymaps/via/config.h create mode 100644 keyboards/ajisai74/keymaps/via/keymap.c create mode 100644 keyboards/ajisai74/keymaps/via/rules.mk create mode 100644 keyboards/ajisai74/readme.md create mode 100644 keyboards/ajisai74/rules.mk diff --git a/keyboards/ajisai74/ajisai74.c b/keyboards/ajisai74/ajisai74.c new file mode 100644 index 000000000000..3c9342e6f7ff --- /dev/null +++ b/keyboards/ajisai74/ajisai74.c @@ -0,0 +1,18 @@ +/* +Copyright 2020 Salicylic_Acid + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#include "ajisai74.h" diff --git a/keyboards/ajisai74/ajisai74.h b/keyboards/ajisai74/ajisai74.h new file mode 100644 index 000000000000..40c7d8b31bc1 --- /dev/null +++ b/keyboards/ajisai74/ajisai74.h @@ -0,0 +1,54 @@ +/* +Copyright 2020 Salicylic_Acid + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License 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" + +/* + * ,------------------------------------ ------------------------------------------------------------. + * | L00 | L01 | L02 | L03 | L04 | L05 | | R00 | R01 | R02 | R03 | R04 | R05 | R06 | R07 | R08 | R18 | + * |---------------------------------------------------------------------------------------------------+ + * | L10 | L11 | L12 | L13 | L14 | L15 | | R10 | R11 | R12 | R13 | R14 | R15 | R16 | R17 | R28 | + * |---------------------------------------- ---------------------------------------------------------+ + * | L20 | L21 | L22 | L23 | L24 | L25 | | R20 | R21 | R22 | R23 | R24 | R25 | R26 | R27 | R38 | + * |---------------------------------------------------------------------------------------------------+ + * | L30 | L45 | L31 | L32 | L33 | L34 | L35 | | R30 | R31 | R32 | R33 | R34 | R35 | R36 | R37 | + * |------------------------------------------- -----------------------------------------------------+ + * | L40 | L41 | L42 | L43 | L44 | | R40 | R41 | R42 | R43 | R44 | | R46 | R47 | R48 | + * |---------------------------------------- --------------------------------------------------------' + */ + +#define LAYOUT( \ + L00, L01, L02, L03, L04, L05, R00, R01, R02, R03, R04, R05, R06, R07, R08, R18, \ + L10, L11, L12, L13, L14, L15, R10, R11, R12, R13, R14, R15, R16, R17, R28, \ + L20, L21, L22, L23, L24, L25, R20, R21, R22, R23, R24, R25, R26, R27, R38, \ + L30, L45, L31, L32, L33, L34, L35, R30, R31, R32, R33, R34, R35, R36, R37, \ + L40, L41, L42, L43, L44, R40, R41, R42, R43, R44, R46, R47, R48 \ + ) \ + { \ + { L00, L01, L02, L03, L04, L05, KC_NO, KC_NO, KC_NO }, \ + { L10, L11, L12, L13, L14, L15, KC_NO, KC_NO, KC_NO }, \ + { L20, L21, L22, L23, L24, L25, KC_NO, KC_NO, KC_NO }, \ + { L30, L31, L32, L33, L34, L35, KC_NO, KC_NO, KC_NO }, \ + { L40, L41, L42, L43, L44, L45, KC_NO, KC_NO, KC_NO }, \ + { R00, R01, R02, R03, R04, R05, R06, R07, R08 }, \ + { R10, R11, R12, R13, R14, R15, R16, R17, R18 }, \ + { R20, R21, R22, R23, R24, R25, R26, R27, R28 }, \ + { R30, R31, R32, R33, R34, R35, R36, R37, R38 }, \ + { R40, R41, R42, R43, R44, KC_NO, R46, R47, R48 } \ + } diff --git a/keyboards/ajisai74/config.h b/keyboards/ajisai74/config.h new file mode 100644 index 000000000000..e7a1555aeaa3 --- /dev/null +++ b/keyboards/ajisai74/config.h @@ -0,0 +1,49 @@ +/* +Copyright 2020 Salicylic_Acid + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License 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 0xEB54 +#define DEVICE_VER 0x0001 +#define MANUFACTURER Salicylic_Acid +#define PRODUCT ajisai74 + +/* key matrix size */ +#define MATRIX_ROWS 10 +#define MATRIX_COLS 9 + +// wiring of each half +#define MATRIX_ROW_PINS { D4, C6, D7, E6, B4 } +#define MATRIX_COL_PINS { F4, F5, F6, F7, B1, B3, B2, B5, D3 } + +#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 +#define SPLIT_HAND_PIN B6 + +/* 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/ajisai74/info.json b/keyboards/ajisai74/info.json new file mode 100644 index 000000000000..b8ab1f1092cf --- /dev/null +++ b/keyboards/ajisai74/info.json @@ -0,0 +1,86 @@ +{ + "keyboard_name": "ajisai74", + "url": "https://salicylic-acid3.hatenablog.com/", + "maintainer": "Salicylic_acid3", + "width": 16.75, + "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.75, "y":0}, + {"label":"7", "x":7.75, "y":0}, + {"label":"8", "x":8.75, "y":0}, + {"label":"9", "x":9.75, "y":0}, + {"label":"0", "x":10.75, "y":0}, + {"label":"-", "x":11.75, "y":0}, + {"label":"=", "x":12.75, "y":0}, + {"label":"Back", "x":13.75, "y":0}, + {"label":"Back", "x":14.75, "y":0}, + {"label":"Insert", "x":15.75, "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":7.25, "y":1}, + {"label":"U", "x":8.25, "y":1}, + {"label":"I", "x":9.25, "y":1}, + {"label":"O", "x":10.25, "y":1}, + {"label":"P", "x":11.25, "y":1}, + {"label":"[", "x":12.25, "y":1}, + {"label":"]", "x":13.25, "y":1}, + {"label":"\"", "x":14.25, "y":1, "w":1.5}, + {"label":"Del", "x":15.75, "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":7.5, "y":2}, + {"label":"J", "x":8.5, "y":2}, + {"label":"K", "x":9.5, "y":2}, + {"label":"L", "x":10.5, "y":2}, + {"label":":", "x":11.5, "y":2}, + {"label":"'", "x":12.5, "y":2}, + {"label":"Return", "x":13.5, "y":2}, + {"label":"Return", "x":14.5, "y":2, "w":1.25}, + {"label":"PgUp", "x":15.75, "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":8, "y":3}, + {"label":"M", "x":9, "y":3}, + {"label":"<", "x":10, "y":3}, + {"label":">", "x":11, "y":3}, + {"label":"?", "x":12, "y":3}, + {"label":"Shift", "x":13, "y":3, "w":1.75}, + {"label":"Up", "x":14.75, "y":3}, + {"label":"PgDwn", "x":15.75, "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":1.5}, + {"x":5.5, "y":4, "w":1.25}, + {"x":7.5, "y":4, "w":1.25}, + {"x":8.75, "y":4, "w":1.25}, + {"label":"Alt", "x":10, "y":4, "w":1.25}, + {"label":"Win", "x":11.25, "y":4}, + {"label":"Fn", "x":12.25, "y":4}, + {"label":"Left", "x":13.75, "y":4}, + {"label":"Down", "x":14.75, "y":4}, + {"label":"Right", "x":15.75, "y":4}] + } + } +} \ No newline at end of file diff --git a/keyboards/ajisai74/keymaps/default/config.h b/keyboards/ajisai74/keymaps/default/config.h new file mode 100644 index 000000000000..81ee8ef78509 --- /dev/null +++ b/keyboards/ajisai74/keymaps/default/config.h @@ -0,0 +1,22 @@ +/* Copyright 2020 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/ajisai74/keymaps/default/keymap.c b/keyboards/ajisai74/keymaps/default/keymap.c new file mode 100644 index 000000000000..4bd68878aae6 --- /dev/null +++ b/keyboards/ajisai74/keymaps/default/keymap.c @@ -0,0 +1,58 @@ +/* +Copyright 2020 Salicylic_Acid + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public 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. +enum layer_number { + _QWERTY = 0, + _FN, +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_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_MINS, KC_EQL, KC_BSPC, 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_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_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_LCTRL, KC_LGUI, KC_LALT, KC_SPC, KC_SPC, KC_SPC, KC_SPC, KC_RALT, KC_RGUI, MO(_FN), KC_LEFT, KC_DOWN,KC_RIGHT + //|-----------------------------------------------------| |--------------------------------------------------------------------------------' + ), + + [_FN] = 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_STOP, KC_SLCK,KC_PAUSE, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_PSCR, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------+--------+--------| + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------+--------+--------| + _______,_______,_______,_______,_______,_______, _______, _______, _______, _______, _______, _______, _______, _______, KC_END, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------+--------+--------| + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + //|-----------------------------------------------------| |--------------------------------------------------------------------------------' + ) +}; + diff --git a/keyboards/ajisai74/keymaps/jis/config.h b/keyboards/ajisai74/keymaps/jis/config.h new file mode 100644 index 000000000000..81ee8ef78509 --- /dev/null +++ b/keyboards/ajisai74/keymaps/jis/config.h @@ -0,0 +1,22 @@ +/* Copyright 2020 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/ajisai74/keymaps/jis/keymap.c b/keyboards/ajisai74/keymaps/jis/keymap.c new file mode 100644 index 000000000000..b0d31b03bdc9 --- /dev/null +++ b/keyboards/ajisai74/keymaps/jis/keymap.c @@ -0,0 +1,65 @@ +/* +Copyright 2020 Salicylic_Acid + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public 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" +// 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 = 0, + _FN, +}; + +enum tapdances{ + TD_ENT = 0, +}; + +qk_tap_dance_action_t tap_dance_actions[] = { + [TD_ENT] = ACTION_TAP_DANCE_DOUBLE(KC_ENT, KC_ENT), +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_QWERTY] = LAYOUT( + //,-----------------------------------------------------| |-----------------------------------------------------------------------------------------. + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, JP_MINS, JP_EQL, JP_YEN, 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, JP_AT, JP_LBRC,TD(TD_ENT),KC_PSCR, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------+--------+--------| + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, JP_SCLN, JP_QUOT, JP_RBRC,TD(TD_ENT),KC_PGUP, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------+--------+--------| + KC_LSFT,JP_BSLS,KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, JP_SLSH, KC_RSFT, KC_UP, KC_PGDN, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------+--------+--------| + KC_LCTRL, KC_LGUI, KC_LALT, KC_MHEN, KC_SPC, KC_SPC, KC_HENK, KC_KANA, KC_APP, MO(_FN), KC_LEFT, KC_DOWN,KC_RIGHT + //|-----------------------------------------------------| |--------------------------------------------------------------------------------' + ), + + [_FN] = 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_STOP, KC_SLCK,KC_PAUSE, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_PSCR, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------+--------+--------| + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------+--------+--------| + _______,_______,_______,_______,_______,_______, _______, _______, _______, _______, _______, _______, _______, _______, KC_END, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------+--------+--------| + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + //|-----------------------------------------------------| |--------------------------------------------------------------------------------' + ) +}; diff --git a/keyboards/ajisai74/keymaps/jis/rules.mk b/keyboards/ajisai74/keymaps/jis/rules.mk new file mode 100644 index 000000000000..e5ddcae8d927 --- /dev/null +++ b/keyboards/ajisai74/keymaps/jis/rules.mk @@ -0,0 +1 @@ +TAP_DANCE_ENABLE = yes diff --git a/keyboards/ajisai74/keymaps/salicylic/config.h b/keyboards/ajisai74/keymaps/salicylic/config.h new file mode 100644 index 000000000000..81ee8ef78509 --- /dev/null +++ b/keyboards/ajisai74/keymaps/salicylic/config.h @@ -0,0 +1,22 @@ +/* Copyright 2020 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/ajisai74/keymaps/salicylic/keymap.c b/keyboards/ajisai74/keymaps/salicylic/keymap.c new file mode 100644 index 000000000000..03cecb7a0d9c --- /dev/null +++ b/keyboards/ajisai74/keymaps/salicylic/keymap.c @@ -0,0 +1,80 @@ +/* +Copyright 2020 Salicylic_Acid + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public 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" +// 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 = 0, + _LOWER, + _RAISE, +}; + +enum tapdances{ + TD_ENT = 0, +}; + +qk_tap_dance_action_t tap_dance_actions[] = { + [TD_ENT] = ACTION_TAP_DANCE_DOUBLE(KC_ENT, KC_ENT), +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_QWERTY] = LAYOUT( + //,-----------------------------------------------------| |-----------------------------------------------------------------------------------------. + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, JP_MINS, JP_EQL, KC_END, KC_HOME, KC_PSCR, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, JP_LBRC, JP_RBRC, KC_BSPC, KC_DEL, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------+--------+--------| + KC_LCTRL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, JP_MINS, JP_BSLS,TD(TD_ENT),TD(TD_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, JP_SLSH, KC_RSFT, KC_UP, KC_PGDN, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------+--------+--------| + KC_ZKHK, KC_LGUI, KC_MHEN,LT(_LOWER,KC_ENT), KC_BSPC, KC_DEL,LT(_RAISE,KC_SPC),KC_HENK,KC_LALT,KC_APP, KC_LEFT, KC_DOWN,KC_RIGHT + //|-----------------------------------------------------| |--------------------------------------------------------------------------------' + ), + + [_LOWER] = 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, _______, _______, _______, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + JP_DQUO, JP_EXLM, JP_QUES, JP_LBRC, JP_RBRC, JP_TILD, KC_P6, KC_P7, KC_P8, KC_P9, JP_ASTR, JP_SLSH, _______, _______, _______, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------+--------+--------| + JP_QUOT, JP_HASH, JP_DQT, JP_LPRN, JP_RPRN, JP_AT, XXXXXXX, KC_P4, KC_P5, KC_P6, JP_MINS, JP_EQL, _______, _______, _______, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------+--------+--------| + _______,JP_CIRC,JP_PERC,JP_AMPR,JP_SCLN, JP_COLN, JP_PIPE, KC_P0, KC_P1, KC_P2, KC_P3, JP_PLUS, _______, _______, _______, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------+--------+--------| + _______, _______, _______,MO(_LOWER), _______, _______,MO(_RAISE), JP_DOT, _______, _______, _______, _______, _______ + //|-----------------------------------------------------| |--------------------------------------------------------------------------------' + ), + + [_RAISE] = 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_TAB, KC_1, KC_2, KC_3, KC_4, KC_5, XXXXXXX, XXXXXXX, KC_UP, XXXXXXX, XXXXXXX, XXXXXXX, _______, _______, _______, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------+--------+--------| +LCTL_T(KC_F11),XXXXXXX, KC_F2, KC_F3, KC_F4, KC_F5, XXXXXXX, KC_LEFT, KC_DOWN,KC_RIGHT, XXXXXXX, XXXXXXX, _______, _______, _______, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------+--------+--------| +_______,SFT_T(KC_F12),KC_F6,KC_F7, KC_F8, KC_F9, KC_F10, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, _______, _______, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------+--------+--------| + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + //|-----------------------------------------------------| |--------------------------------------------------------------------------------' + ), +}; diff --git a/keyboards/ajisai74/keymaps/salicylic/rules.mk b/keyboards/ajisai74/keymaps/salicylic/rules.mk new file mode 100644 index 000000000000..e5ddcae8d927 --- /dev/null +++ b/keyboards/ajisai74/keymaps/salicylic/rules.mk @@ -0,0 +1 @@ +TAP_DANCE_ENABLE = yes diff --git a/keyboards/ajisai74/keymaps/via/config.h b/keyboards/ajisai74/keymaps/via/config.h new file mode 100644 index 000000000000..81ee8ef78509 --- /dev/null +++ b/keyboards/ajisai74/keymaps/via/config.h @@ -0,0 +1,22 @@ +/* Copyright 2020 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/ajisai74/keymaps/via/keymap.c b/keyboards/ajisai74/keymaps/via/keymap.c new file mode 100644 index 000000000000..79bd7541c55b --- /dev/null +++ b/keyboards/ajisai74/keymaps/via/keymap.c @@ -0,0 +1,86 @@ +/* +Copyright 2020 Salicylic_Acid + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public 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. +enum layer_number { + _BASE = 0, + _L1, + _L2, + _L3, +}; + +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_BSPC, 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_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_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_LCTRL, KC_LGUI, KC_LALT, KC_SPC, KC_SPC, KC_SPC, KC_SPC, KC_RALT, KC_RGUI, MO(_L1), KC_LEFT, KC_DOWN,KC_RIGHT + //|-----------------------------------------------------| |--------------------------------------------------------------------------------' + ), + + [_L1] = 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_STOP, KC_SLCK,KC_PAUSE, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_PSCR, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------+--------+--------| + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------+--------+--------| + _______,_______,_______,_______,_______,_______, _______, _______, _______, _______, _______, _______, _______, _______, KC_END, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------+--------+--------| + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + //|-----------------------------------------------------| |--------------------------------------------------------------------------------' + ), + + [_L2] = 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_STOP, KC_SLCK,KC_PAUSE, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_PSCR, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------+--------+--------| + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------+--------+--------| + _______,_______,_______,_______,_______,_______, _______, _______, _______, _______, _______, _______, _______, _______, KC_END, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------+--------+--------| + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + //|-----------------------------------------------------| |--------------------------------------------------------------------------------' + ), + + [_L3] = 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_STOP, KC_SLCK,KC_PAUSE, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_PSCR, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------+--------+--------| + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------+--------+--------| + _______,_______,_______,_______,_______,_______, _______, _______, _______, _______, _______, _______, _______, _______, KC_END, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------+--------+--------| + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + //|-----------------------------------------------------| |--------------------------------------------------------------------------------' + ) +}; diff --git a/keyboards/ajisai74/keymaps/via/rules.mk b/keyboards/ajisai74/keymaps/via/rules.mk new file mode 100644 index 000000000000..036bd6d1c3ec --- /dev/null +++ b/keyboards/ajisai74/keymaps/via/rules.mk @@ -0,0 +1 @@ +VIA_ENABLE = yes \ No newline at end of file diff --git a/keyboards/ajisai74/readme.md b/keyboards/ajisai74/readme.md new file mode 100644 index 000000000000..af66ce0fc5b4 --- /dev/null +++ b/keyboards/ajisai74/readme.md @@ -0,0 +1,17 @@ +# AJisai74 + +![ajisai74](https://cdn-ak.f.st-hatena.com/images/fotolife/S/Salicylic_acid3/20200812/20200812214740.png) + +This is 74 keys Custom keyboard. + +* Keyboard Maintainer: [Salicylic_acid3](https://github.com/Salicylic-acid3) +* Hardware Supported: AJisai74 PCB, Pro Micro +* Hardware Availability: [PCB & Case Data](https://github.com/Salicylic-acid3/PCB_Data), [Booth Shop](https://salicylic-acid3.booth.pm/items/2291877) + +Make example for this keyboard (after setting up your build environment): + + make ajisai74: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/ajisai74-build-guide) diff --git a/keyboards/ajisai74/rules.mk b/keyboards/ajisai74/rules.mk new file mode 100644 index 000000000000..9b916f556e50 --- /dev/null +++ b/keyboards/ajisai74/rules.mk @@ -0,0 +1,24 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +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 = no # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +BLUETOOTH_ENABLE = no # Enable Bluetooth +AUDIO_ENABLE = no # Audio output + +SPLIT_KEYBOARD = yes From dd763f2988f0804fc7a0ff03de5c2a1e5a29e450 Mon Sep 17 00:00:00 2001 From: rupa Date: Thu, 20 Aug 2020 20:07:09 -0400 Subject: [PATCH 614/930] [Keymap] userspace and keymap for rupa (#9786) * first iteration of my keymap * * move to userspace * "script" modes * keymap bling * OM and RUPA keys and tryin to micro-optimize in process_records.c * woops swap shifted rupas forgot to add codepoint for OM * Apply suggestions from code review Co-authored-by: Drashna Jaelre * add call to process_record_keymap, per review * fall through to process_record_keymap * license headers Co-authored-by: Drashna Jaelre --- keyboards/tada68/keymaps/rupa/config.h | 10 ++++ keyboards/tada68/keymaps/rupa/keymap.c | 45 ++++++++++++++++ keyboards/tada68/keymaps/rupa/readme.md | 21 ++++++++ keyboards/tada68/keymaps/rupa/rules.mk | 4 ++ users/rupa/config.h | 8 +++ users/rupa/process_records.c | 72 +++++++++++++++++++++++++ users/rupa/process_records.h | 21 ++++++++ users/rupa/rules.mk | 3 ++ users/rupa/rupa.c | 49 +++++++++++++++++ users/rupa/rupa.h | 54 +++++++++++++++++++ users/rupa/unicode.c | 42 +++++++++++++++ users/rupa/unicode.h | 43 +++++++++++++++ 12 files changed, 372 insertions(+) create mode 100644 keyboards/tada68/keymaps/rupa/config.h create mode 100755 keyboards/tada68/keymaps/rupa/keymap.c create mode 100755 keyboards/tada68/keymaps/rupa/readme.md create mode 100644 keyboards/tada68/keymaps/rupa/rules.mk create mode 100644 users/rupa/config.h create mode 100755 users/rupa/process_records.c create mode 100755 users/rupa/process_records.h create mode 100644 users/rupa/rules.mk create mode 100755 users/rupa/rupa.c create mode 100755 users/rupa/rupa.h create mode 100755 users/rupa/unicode.c create mode 100755 users/rupa/unicode.h diff --git a/keyboards/tada68/keymaps/rupa/config.h b/keyboards/tada68/keymaps/rupa/config.h new file mode 100644 index 000000000000..ddbf0ab667a5 --- /dev/null +++ b/keyboards/tada68/keymaps/rupa/config.h @@ -0,0 +1,10 @@ +#pragma once + +#define GRAVE_ESC_ALT_OVERRIDE + +/* disable 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/tada68/keymaps/rupa/keymap.c b/keyboards/tada68/keymaps/rupa/keymap.c new file mode 100755 index 000000000000..3a8a55056107 --- /dev/null +++ b/keyboards/tada68/keymaps/rupa/keymap.c @@ -0,0 +1,45 @@ +#include "rupa.h" + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* Keymap _QWERTY: (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│ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┼───┤ + * │ Fn │ A │ S │ D │ F │ G │ H │ J │ K │ L │ ; │ ' │ Enter │PgU│ + * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┬───┼───┤ + * │ Shift │ Z │ X │ C │ V │ B │ N │ M │ , │ . │ / │ Shift│ ↑ │PgD│ + * ├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴──┬┴──┬┴──┬───┼───┼───┤ + * │Ctrl│Alt │Gui │ Space │Fn │Alt│Ctl│ ← │ ↓ │ → │ + * └────┴────┴────┴────────────────────────┴───┴───┴───┴───┴───┴───┘ + */ + [_QWERTY] = 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, + RAISE, 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, RAISE, KC_RALT, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT + ), + + /* Keymap _RAISE: Function Layer + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┬───┐ + * │LOD│F1 │F2 │F3 │F4 │F5 │F6 │F7 │F8 │F9 │F10│F11│F12│ Del │Hme│ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┼───┤ + * │ │VSN│U_s│U_f│U_m│ │ │uni│ │ ॐ │ │♩ ♪│♫ ♬│★ ☆ │Ins│ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┼───┤ + * │ │ │ │ │ │ │ │ │ │ │ │ │ ✓ │End│ + * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┬───┼───┤ + * │ RShift │ ⸮ │Rup│Brt│Bls│Blt│ │Mut│V- │V+ │‽ ☭│ McL│M↑ │McR│ + * ├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴──┬┴──┬┴──┬───┼───┼───┤ + * │RCtl│RAlt│RGui│ │ │ │CAP│M← │M↓ │M→ │ + * └────┴────┴────┴────────────────────────┴───┴───┴───┴───┴───┴───┘ + */ + [_RAISE] = LAYOUT_65_ansi( + LOD, KC_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, + _______, VRSN, U_SCRPT, U_FRACT, U_MONOS, _______, _______, UC_MOD, _______, X(OM), _______, XP(M4,M8), XP(M8B,M16), XP(STB, STW), KC_INS, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, X(CHEK), KC_END, + OS_RSFT, X(IRNY), RUPA, BL_BRTG, BL_STEP, BL_TOGG, _______, KC_MUTE, KC_VOLD, KC_VOLU, XP(IBNG,HAS), KC_BTN1, KC_MS_U, KC_BTN2, + OS_RCTL, OS_RALT, OS_RGUI, _______, _______, _______, KC_CAPS, KC_MS_L, KC_MS_D, KC_MS_R + ), +}; diff --git a/keyboards/tada68/keymaps/rupa/readme.md b/keyboards/tada68/keymaps/rupa/readme.md new file mode 100755 index 000000000000..77629131a02c --- /dev/null +++ b/keyboards/tada68/keymaps/rupa/readme.md @@ -0,0 +1,21 @@ +# rupa's TADA68 layout + +i've swapped the lufa-ms bootloader for caterina + +most everything is in my userspace dir + +console mode is on, and there's barely any room left! + +* win/alt -> alt/cmd +* alt/fn -> fn/alt +* grave escape, with alt override +* caps is another fn key, CAPS on fn-rctl + +fn layer: + * no wasd arrows + * rotate mute/vol + * backlight -> breathing, step, toggle + * swap home and ins + * unicode chars sprinkled around + * script mode! + * (one-shot) right versions of shift/ctl/alt/gui (not working quite right yet) diff --git a/keyboards/tada68/keymaps/rupa/rules.mk b/keyboards/tada68/keymaps/rupa/rules.mk new file mode 100644 index 000000000000..df6f5674b542 --- /dev/null +++ b/keyboards/tada68/keymaps/rupa/rules.mk @@ -0,0 +1,4 @@ +BOOTLOADER = caterina + +UNICODEMAP_ENABLE = yes +CONSOLE_ENABLE = yes diff --git a/users/rupa/config.h b/users/rupa/config.h new file mode 100644 index 000000000000..902405204242 --- /dev/null +++ b/users/rupa/config.h @@ -0,0 +1,8 @@ +#pragma once + +#define UNICODE_SELECTED_MODES UC_MAC, UC_LNX + +#define ONESHOT_TAP_TOGGLE 5 +#define ONESHOT_TIMEOUT 5000 + +#define TAP_CODE_DELAY 5 //DEFAULT: 100 diff --git a/users/rupa/process_records.c b/users/rupa/process_records.c new file mode 100755 index 000000000000..2d723101004e --- /dev/null +++ b/users/rupa/process_records.c @@ -0,0 +1,72 @@ +/* +Copyright 2020 rupa @rupa + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#include "rupa.h" + +font_t *translator = NULL; + +__attribute__((weak)) +bool process_record_keymap(uint16_t keycode, keyrecord_t *record) { + return true; +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + bool is_shifted = get_mods()&MOD_MASK_SHIFT; + bool is_pressed = record->event.pressed; + + switch(keycode) { + case VRSN: + if (is_pressed) { + send_string_with_delay_P(PSTR( + "# " QMK_KEYBOARD "/" QMK_KEYMAP ":" QMK_VERSION " " QMK_BUILDDATE "\n" + ), TAP_CODE_DELAY); + } + return false; + + case LOD: + case RUPA: + if (is_pressed) { + if (keycode == LOD) { + send_unicode_string((is_shifted ? "¯\\_(ツ)_/¯" : "ಠ_ಠ")); + } else if (keycode == RUPA) { + send_unicode_string((is_shifted ? "Śrīrūpa" : "rūpa")); + } + } + return false; + + // script modes + case U_FRACT: + case U_MONOS: + case U_SCRPT: + if (is_pressed) { + if (keycode == U_SCRPT) { + translator = (translator == &script_bold ? NULL : &script_bold); + } else if (keycode == U_FRACT) { + translator = (translator == &fraktu_bold ? NULL : &fraktu_bold); + } else if (keycode == U_MONOS) { + translator = (translator == &monosp_bold ? NULL : &monosp_bold); + } + } + return true; + + default: + if (is_pressed && translator != NULL) { + return script_mode_translate(translator, is_shifted, keycode); + } + } + return process_record_keymap(keycode, record); +} diff --git a/users/rupa/process_records.h b/users/rupa/process_records.h new file mode 100755 index 000000000000..7c7fe491be13 --- /dev/null +++ b/users/rupa/process_records.h @@ -0,0 +1,21 @@ +/* +Copyright 2020 rupa @rupa + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License 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 "rupa.h" + +bool process_record_keymap(uint16_t keycode, keyrecord_t *record); diff --git a/users/rupa/rules.mk b/users/rupa/rules.mk new file mode 100644 index 000000000000..c4f147d9130d --- /dev/null +++ b/users/rupa/rules.mk @@ -0,0 +1,3 @@ +SRC += rupa.c \ + process_records.c \ + unicode.c diff --git a/users/rupa/rupa.c b/users/rupa/rupa.c new file mode 100755 index 000000000000..60fec3caf095 --- /dev/null +++ b/users/rupa/rupa.c @@ -0,0 +1,49 @@ +/* +Copyright 2020 rupa @rupa + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public 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 "rupa.h" + +// https://en.wikipedia.org/wiki/Mathematical_Alphanumeric_Symbols +font_t script_bold = {0x1D4D0, 0x1D4EA, 0x1D7CE}; // with bold numbers +font_t fraktu_bold = {0x1D56C, 0x1D586, 0x1D7D8}; // with doublestruck numbers +font_t monosp_bold = {0x1D670, 0x1D68A, 0x1D7F6}; + +// Maps A-Z, a-z, and 0-9 to other unicode ranges. We also map space to EN +// SPACE for some reason :) +uint32_t map_alnum(font_t *f, bool is_shifted, uint32_t keycode) { + switch (keycode) { + case KC_SPACE: + return (is_shifted ? 0 : 0x2002); // EN SPACE + case KC_0: + return (is_shifted ? 0 : f->zero_glyph); + case KC_A ... KC_Z: + return (is_shifted ? f->upper_alpha : f->lower_alpha) + keycode - KC_A; + case KC_1 ... KC_9: + return (is_shifted ? 0 : f->zero_glyph + keycode - KC_1 + 1); + default: + return 0; + } +} + +bool script_mode_translate(font_t *translator, bool is_shifted, uint32_t keycode) { + uint32_t translated = map_alnum(translator, is_shifted, keycode); + if (translated == 0) return true; + dprintf("script_mode_translate: %u => %d\n", keycode, translated); + register_unicode(translated); + return false; +} diff --git a/users/rupa/rupa.h b/users/rupa/rupa.h new file mode 100755 index 000000000000..9be3a2d62fca --- /dev/null +++ b/users/rupa/rupa.h @@ -0,0 +1,54 @@ +/* +Copyright 2020 rupa @rupa + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License 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 +#include "version.h" +#include "process_records.h" +#include "unicode.h" + +enum userspace_layers { + _QWERTY = 0, + _RAISE, +}; + +enum userspace_custom_keycodes { + VRSN = SAFE_RANGE, + LOD, + RUPA, + U_FRACT, + U_MONOS, + U_SCRPT, +}; + +typedef struct font_t { + uint32_t upper_alpha; + uint32_t lower_alpha; + uint32_t zero_glyph; +} font_t; + +font_t fraktu_bold; +font_t monosp_bold; +font_t script_bold; + +bool script_mode_translate(font_t *translator, bool is_shifted, uint32_t keycode); + +#define RAISE MO(_RAISE) +#define OS_RGUI OSM(MOD_RGUI) +#define OS_RALT OSM(MOD_RALT) +#define OS_RCTL OSM(MOD_RCTL) +#define OS_RSFT OSM(MOD_RSFT) diff --git a/users/rupa/unicode.c b/users/rupa/unicode.c new file mode 100755 index 000000000000..89a0d4766563 --- /dev/null +++ b/users/rupa/unicode.c @@ -0,0 +1,42 @@ +/* +Copyright 2020 rupa @rupa + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#include "unicode.h" + +#if defined(UNICODEMAP_ENABLE) +const uint32_t PROGMEM unicode_map[] = { + [CHEK] = 0x2713, // ✓ + /* + [DI1] = 0x2680, // ⚀ + [DI2] = 0x2681, // ⚁ + [DI3] = 0x2682, // ⚂ + [DI4] = 0x2683, // ⚃ + [DI5] = 0x2684, // ⚄ + [DI6] = 0x2685, // ⚅ + */ + [HAS] = 0x262D, // ☭ + [IBNG] = 0x203D, // ‽ + [IRNY] = 0x2E2E, // ⸮ + [M4] = 0x2669, // ♩ + [M8] = 0x266A, // ♪ + [M8B] = 0x266B, // ♫ + [M16] = 0x266C, // ♬ + [OM] = 0x0950, // ॐ + [STB] = 0x2605, // ★ + [STW] = 0x2606, // ☆ +}; +#endif diff --git a/users/rupa/unicode.h b/users/rupa/unicode.h new file mode 100755 index 000000000000..0c067bd913c2 --- /dev/null +++ b/users/rupa/unicode.h @@ -0,0 +1,43 @@ +/* +Copyright 2020 rupa @rupa + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License 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 "rupa.h" + +#if defined(UNICODEMAP_ENABLE) +enum unicode_names { + CHEK, + /* + DI1, // ⚀ + DI2, // ⚁ + DI3, // ⚂ + DI4, // ⚃ + DI5, // ⚄ + DI6, // ⚅ + */ + HAS, // ☭ + IBNG, // ‽ + IRNY, // ⸮ + M4, // ♩ + M8, // ♪ + M8B, // ♫ + M16, // ♬ + OM, // ॐ + STB, // ★ + STW, // ☆ +}; +#endif From 930446fe964d27950f93b5743fd11bbe127c9036 Mon Sep 17 00:00:00 2001 From: gtips <51393966+gtips@users.noreply.github.com> Date: Fri, 21 Aug 2020 10:10:05 +0900 Subject: [PATCH 615/930] Update reviung39 PRODUCT_ID (#10001) --- keyboards/reviung39/config.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/keyboards/reviung39/config.h b/keyboards/reviung39/config.h index 6bd3eb7602e4..9a8600b6f1bb 100644 --- a/keyboards/reviung39/config.h +++ b/keyboards/reviung39/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 0x5F10 #define DEVICE_VER 0x0001 #define MANUFACTURER gtips #define PRODUCT reviung39 From 22ceab9c08c36cd9de5167994867ddb3bdad754d Mon Sep 17 00:00:00 2001 From: Sendy YK Date: Sat, 22 Aug 2020 04:24:02 +0700 Subject: [PATCH 616/930] Fixed DZ60 LAYOUT_60_ansi_arrow Preview on QMK Configurator (#10122) --- keyboards/dz60/info.json | 71 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 71 insertions(+) diff --git a/keyboards/dz60/info.json b/keyboards/dz60/info.json index 8bd164150ece..1c13ec8a8ea2 100644 --- a/keyboards/dz60/info.json +++ b/keyboards/dz60/info.json @@ -80,6 +80,77 @@ {"x": 14, "y": 4} ] }, + "LAYOUT_60_ansi_arrow": { + "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} + ] + }, "LAYOUT_true_hhkb": { "layout": [ {"x": 0, "y": 0}, From 1b0272e801d5ed5fb9af6012376e0d23ca678acd Mon Sep 17 00:00:00 2001 From: Sendy YK Date: Sat, 22 Aug 2020 04:25:28 +0700 Subject: [PATCH 617/930] Fixed Soyuz LAYOUT_numpad_5x4 Preview on QMK Configurator (#10123) --- keyboards/ai03/soyuz/info.json | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/keyboards/ai03/soyuz/info.json b/keyboards/ai03/soyuz/info.json index e4f8eb0aa4af..3a819b537efd 100644 --- a/keyboards/ai03/soyuz/info.json +++ b/keyboards/ai03/soyuz/info.json @@ -28,6 +28,31 @@ {"x":2, "y":4}, {"x":3, "y":4} ] + }, + "LAYOUT_numpad_5x4": { + "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} + ] } } } From 70ce4ba56f5d805e71c2b1de7334d6492b5e350a Mon Sep 17 00:00:00 2001 From: Nick Brassel Date: Sat, 22 Aug 2020 08:42:28 +1000 Subject: [PATCH 618/930] Revert "Add Kiibohd bootloader type to bootloader.mk (#9908)" (#10126) This reverts commit e2d4cd1a41c667da186891e3dbaf535c6b0717df. --- bootloader.mk | 13 ------------- keyboards/ergodox_infinity/bootloader_defs.h | 1 + keyboards/ergodox_infinity/rules.mk | 18 ++++++++++++++++-- keyboards/infinity60/bootloader_defs.h | 1 + keyboards/infinity60/rules.mk | 17 +++++++++++++++-- keyboards/k_type/bootloader_defs.h | 1 + keyboards/k_type/rules.mk | 18 ++++++++++++++++-- keyboards/whitefox/bootloader_defs.h | 1 + keyboards/whitefox/rules.mk | 18 ++++++++++++++++-- tmk_core/chibios.mk | 2 +- tmk_core/common/chibios/bootloader.c | 6 +++--- 11 files changed, 71 insertions(+), 25 deletions(-) create mode 100644 keyboards/ergodox_infinity/bootloader_defs.h create mode 100644 keyboards/infinity60/bootloader_defs.h create mode 100644 keyboards/k_type/bootloader_defs.h create mode 100644 keyboards/whitefox/bootloader_defs.h diff --git a/bootloader.mk b/bootloader.mk index c22291e435ab..e516e9ff9fd2 100644 --- a/bootloader.mk +++ b/bootloader.mk @@ -27,7 +27,6 @@ # qmk-dfu QMK DFU (LUFA + blinkenlight) # bootloadHID HIDBootFlash compatible (ATmega32A) # USBasp USBaspLoader (ATmega328P) -# kiibohd Input:Club Kiibohd bootloader (only used on their boards) # # BOOTLOADER_SIZE can still be defined manually, but it's recommended # you add any possible configuration to this list @@ -90,18 +89,6 @@ ifeq ($(strip $(BOOTLOADER)), lufa-ms) BOOTLOADER_SIZE = 6144 FIRMWARE_FORMAT = bin endif -ifeq ($(strip $(BOOTLOADER)), kiibohd) - OPT_DEFS += -DBOOTLOADER_KIIBOHD - ifeq ($(strip $(MCU)), MK20DX128) - MCU_LDSCRIPT = MK20DX128BLDR4 - endif - ifeq ($(strip $(MCU)), MK20DX256) - MCU_LDSCRIPT = MK20DX256BLDR8 - endif - - DFU_ARGS = -d 1C11:B007 - DFU_SUFFIX_ARGS = -v 1C11 -p B007 -endif ifdef BOOTLOADER_SIZE OPT_DEFS += -DBOOTLOADER_SIZE=$(strip $(BOOTLOADER_SIZE)) diff --git a/keyboards/ergodox_infinity/bootloader_defs.h b/keyboards/ergodox_infinity/bootloader_defs.h new file mode 100644 index 000000000000..c67153be6021 --- /dev/null +++ b/keyboards/ergodox_infinity/bootloader_defs.h @@ -0,0 +1 @@ +#define KIIBOHD_BOOTLOADER diff --git a/keyboards/ergodox_infinity/rules.mk b/keyboards/ergodox_infinity/rules.mk index 572bda2a97fc..31bc20454c30 100644 --- a/keyboards/ergodox_infinity/rules.mk +++ b/keyboards/ergodox_infinity/rules.mk @@ -1,18 +1,32 @@ # MCU name MCU = MK20DX256 +# 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 +# - MK20DX128BLDR4 for Infinity 60% with Kiibohd bootloader +# - MK20DX256BLDR8 for Infinity ErgoDox with Kiibohd bootloader +MCU_LDSCRIPT = MK20DX256BLDR8 + # 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=0x00002000 -# Bootloader selection -BOOTLOADER = kiibohd +BOOTLOADER = dfu # Build Options # comment out to disable the options. # +DFU_ARGS = -d 1c11:b007 +DFU_SUFFIX_ARGS = -p b007 -v 1c11 + BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control diff --git a/keyboards/infinity60/bootloader_defs.h b/keyboards/infinity60/bootloader_defs.h new file mode 100644 index 000000000000..c67153be6021 --- /dev/null +++ b/keyboards/infinity60/bootloader_defs.h @@ -0,0 +1 @@ +#define KIIBOHD_BOOTLOADER diff --git a/keyboards/infinity60/rules.mk b/keyboards/infinity60/rules.mk index 8fb4b499ea36..579eab0f3fa2 100644 --- a/keyboards/infinity60/rules.mk +++ b/keyboards/infinity60/rules.mk @@ -1,6 +1,17 @@ # MCU name MCU = MK20DX128 +# 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 +# - MK20DX128BLDR4 for Infinity with Kiibohd bootloader +MCU_LDSCRIPT = MK20DX128BLDR4 + # Board: it should exist either in /os/hal/boards/ # or /boards # - BOARD = @@ -15,13 +26,15 @@ BOARD = MCHCK_K20 # The CORTEX_VTOR... is needed only for MCHCK/Infinity KB OPT_DEFS = -DCORTEX_VTOR_INIT=0x00001000 -# Bootloader selection -BOOTLOADER = kiibohd +BOOTLOADER = dfu # Build Options # comment out to disable the options. # +DFU_ARGS = -d 1c11:b007 +DFU_SUFFIX_ARGS = -p b007 -v 1c11 + BOOTMAGIC_ENABLE = no # 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/k_type/bootloader_defs.h b/keyboards/k_type/bootloader_defs.h new file mode 100644 index 000000000000..c67153be6021 --- /dev/null +++ b/keyboards/k_type/bootloader_defs.h @@ -0,0 +1 @@ +#define KIIBOHD_BOOTLOADER diff --git a/keyboards/k_type/rules.mk b/keyboards/k_type/rules.mk index 176a28d8684d..56c4c606e3f3 100644 --- a/keyboards/k_type/rules.mk +++ b/keyboards/k_type/rules.mk @@ -1,14 +1,28 @@ # MCU name MCU = MK20DX256 +# 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 +# - MK20DX128BLDR4 for Infinity with Kiibohd bootloader +# - MK20DX256BLDR8 for Infinity ErgoDox with Kiibohd bootloader +MCU_LDSCRIPT = MK20DX256BLDR8 + # Board: it should exist either in /os/hal/boards/ # or /boards # 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 -# Bootloader selection -BOOTLOADER = kiibohd +DFU_ARGS = -d 1c11:b007 +DFU_SUFFIX_ARGS = -p b007 -v 1c11 + +BOOTLOADER = dfu # Build Options # comment out to disable the options. diff --git a/keyboards/whitefox/bootloader_defs.h b/keyboards/whitefox/bootloader_defs.h new file mode 100644 index 000000000000..c67153be6021 --- /dev/null +++ b/keyboards/whitefox/bootloader_defs.h @@ -0,0 +1 @@ +#define KIIBOHD_BOOTLOADER diff --git a/keyboards/whitefox/rules.mk b/keyboards/whitefox/rules.mk index 568b33b464ac..14507e9dd279 100644 --- a/keyboards/whitefox/rules.mk +++ b/keyboards/whitefox/rules.mk @@ -1,6 +1,18 @@ # MCU name MCU = MK20DX256 +# 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 +# - MK20DX128BLDR4 for Infinity with Kiibohd bootloader +# - MK20DX256BLDR8 for Infinity ErgoDox with Kiibohd bootloader +MCU_LDSCRIPT = MK20DX256BLDR8 + # Board: it should exist either in /os/hal/boards/ # or /boards # - BOARD = @@ -10,8 +22,10 @@ MCU = MK20DX256 # - MCHCK_K20 for Infinity KB BOARD = IC_TEENSY_3_1 -# Bootloader selection -BOOTLOADER = kiibohd +DFU_ARGS = -d 1c11:b007 +DFU_SUFFIX_ARGS = -p b007 -v 1c11 + +BOOTLOADER = dfu # Build Options # comment out to disable the options. diff --git a/tmk_core/chibios.mk b/tmk_core/chibios.mk index 4c288646e21f..09aaddeef052 100644 --- a/tmk_core/chibios.mk +++ b/tmk_core/chibios.mk @@ -324,7 +324,7 @@ bin: $(BUILD_DIR)/$(TARGET).bin sizeafter flash: $(BUILD_DIR)/$(TARGET).bin cpfirmware sizeafter ifneq ($(strip $(PROGRAM_CMD)),) $(PROGRAM_CMD) -else ifeq ($(strip $(BOOTLOADER)),kiibohd) +else ifeq ($(strip $(BOOTLOADER)),dfu) $(call EXEC_DFU_UTIL) else ifeq ($(strip $(MCU_FAMILY)),KINETIS) $(call EXEC_TEENSY) diff --git a/tmk_core/common/chibios/bootloader.c b/tmk_core/common/chibios/bootloader.c index 6833511c0ee9..4cf5dae7e645 100644 --- a/tmk_core/common/chibios/bootloader.c +++ b/tmk_core/common/chibios/bootloader.c @@ -44,7 +44,7 @@ void enter_bootloader_mode_if_requested(void) { #elif defined(KL2x) || defined(K20x) /* STM32_BOOTLOADER_ADDRESS */ /* Kinetis */ -# if defined(BOOTLOADER_KIIBOHD) +# if defined(KIIBOHD_BOOTLOADER) /* Kiibohd Bootloader (MCHCK and Infinity KB) */ # define SCB_AIRCR_VECTKEY_WRITEMAGIC 0x05FA0000 const uint8_t sys_reset_to_loader_magic[] = "\xff\x00\x7fRESET TO LOADER\x7f\x00\xff"; @@ -54,14 +54,14 @@ void bootloader_jump(void) { SCB->AIRCR = SCB_AIRCR_VECTKEY_WRITEMAGIC | SCB_AIRCR_SYSRESETREQ_Msk; } -# else /* defined(BOOTLOADER_KIIBOHD) */ +# else /* defined(KIIBOHD_BOOTLOADER) */ /* Default for Kinetis - expecting an ARM Teensy */ # include "wait.h" void bootloader_jump(void) { wait_ms(100); __BKPT(0); } -# endif /* defined(BOOTLOADER_KIIBOHD) */ +# endif /* defined(KIIBOHD_BOOTLOADER) */ #else /* neither STM32 nor KINETIS */ __attribute__((weak)) void bootloader_jump(void) {} From 08acb7ab68cbbf14c8892301e53b6a4e124d65ac Mon Sep 17 00:00:00 2001 From: Nick Blyumberg Date: Sat, 22 Aug 2020 02:14:52 -0400 Subject: [PATCH 619/930] Ortho48 VIA keymap (#10128) --- keyboards/cannonkeys/ortho48/config.h | 2 +- .../cannonkeys/ortho48/keymaps/via/keymap.c | 49 +++++++++++++++++++ .../cannonkeys/ortho48/keymaps/via/rules.mk | 2 + 3 files changed, 52 insertions(+), 1 deletion(-) create mode 100644 keyboards/cannonkeys/ortho48/keymaps/via/keymap.c create mode 100644 keyboards/cannonkeys/ortho48/keymaps/via/rules.mk diff --git a/keyboards/cannonkeys/ortho48/config.h b/keyboards/cannonkeys/ortho48/config.h index c3b9dee1861e..634d2f6cfe07 100644 --- a/keyboards/cannonkeys/ortho48/config.h +++ b/keyboards/cannonkeys/ortho48/config.h @@ -19,7 +19,7 @@ along with this program. If not, see . /* USB Device descriptor parameter */ #define VENDOR_ID 0xCA04 -#define PRODUCT_ID 0x0248 +#define PRODUCT_ID 0x4F48 // "O" 48 #define DEVICE_VER 0x0001 #define MANUFACTURER QMK #define PRODUCT Ortho48 diff --git a/keyboards/cannonkeys/ortho48/keymaps/via/keymap.c b/keyboards/cannonkeys/ortho48/keymaps/via/keymap.c new file mode 100644 index 000000000000..419fc053e1f2 --- /dev/null +++ b/keyboards/cannonkeys/ortho48/keymaps/via/keymap.c @@ -0,0 +1,49 @@ +/* +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_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_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, _______, + RESET, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY +), + +[2] = 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, _______, + RGB_TOG, RGB_MOD, BL_INC, BL_DEC, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY +), + +[3] = LAYOUT_ortho_4x12( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + 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/ortho48/keymaps/via/rules.mk b/keyboards/cannonkeys/ortho48/keymaps/via/rules.mk new file mode 100644 index 000000000000..36b7ba9cbc98 --- /dev/null +++ b/keyboards/cannonkeys/ortho48/keymaps/via/rules.mk @@ -0,0 +1,2 @@ +VIA_ENABLE = yes +LTO_ENABLE = yes From 0f0530c5a4441eecd5941f1f61f74ea89d15e9a2 Mon Sep 17 00:00:00 2001 From: zeriyoshi Date: Sat, 22 Aug 2020 17:12:19 +0900 Subject: [PATCH 620/930] Fix IDOBAO ID80 board configurations. (#9796) * Fix IDOBAO 80 disable console and LEDs. * Re-enabling to IDOBAO80s underglow rgb light * fix define legacy declarements --- keyboards/id80/config.h | 22 +++++++++++----------- keyboards/id80/rules.mk | 2 +- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/keyboards/id80/config.h b/keyboards/id80/config.h index 936fd5b2e879..e4f72421edf8 100644 --- a/keyboards/id80/config.h +++ b/keyboards/id80/config.h @@ -62,7 +62,7 @@ along with this program. If not, see . #define DIODE_DIRECTION COL2ROW #define BACKLIGHT_PIN B6 -// #define BACKLIGHT_BREATHING +#define BACKLIGHT_BREATHING #define BACKLIGHT_LEVELS 3 #define CAPS_LOCK_LED_PIN C7 @@ -77,16 +77,16 @@ along with this program. If not, see . #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 +/*== 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 /* Bootmagic Lite key configuration: use the Esc key */ diff --git a/keyboards/id80/rules.mk b/keyboards/id80/rules.mk index 37aa911568b9..81d15e5ea6d2 100644 --- a/keyboards/id80/rules.mk +++ b/keyboards/id80/rules.mk @@ -17,7 +17,7 @@ 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 +CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = no # Commands for debug and configuration # 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 346bfb2a052f4e05cc91e55e1317c8529c405ac6 Mon Sep 17 00:00:00 2001 From: Ikta <48316247+IktaS@users.noreply.github.com> Date: Sat, 22 Aug 2020 20:06:16 +0700 Subject: [PATCH 621/930] Update i2c_driver.md (#10131) Update i2c_driver.md to change ARM pin number documentation, line 84 and 85 --- docs/i2c_driver.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/i2c_driver.md b/docs/i2c_driver.md index d28a20fa16a5..0103e1b4ccc9 100644 --- a/docs/i2c_driver.md +++ b/docs/i2c_driver.md @@ -81,8 +81,8 @@ STM32 MCUs allows a variety of pins to be configured as I2C pins depending on th |--------------------------|----------------------------------------------------------------------------------------------|---------| | `I2C1_SCL_BANK` | The bank of pins (`GPIOA`, `GPIOB`, `GPIOC`) to use for SCL | `GPIOB` | | `I2C1_SDA_BANK` | The bank of pins (`GPIOA`, `GPIOB`, `GPIOC`) to use for SDA | `GPIOB` | -| `I2C1_SCL` | The pin number for the SCL pin (0-9) | `6` | -| `I2C1_SDA` | The pin number for the SDA pin (0-9) | `7` | +| `I2C1_SCL` | The pin number for the SCL pin (0-15) | `6` | +| `I2C1_SDA` | The pin number for the SDA pin (0-15) | `7` | | `I2C1_BANK` (deprecated) | The bank of pins (`GPIOA`, `GPIOB`, `GPIOC`), superceded by `I2C1_SCL_BANK`, `I2C1_SDA_BANK` | `GPIOB` | The ChibiOS I2C driver configuration depends on STM32 MCU: From 220b1c9db40d95271dcdd8d8050e46a2a3143c65 Mon Sep 17 00:00:00 2001 From: Drashna Jaelre Date: Sat, 22 Aug 2020 07:44:42 -0700 Subject: [PATCH 622/930] [Keyboard] Add ZSA Moonlander (#9853) --- keyboards/moonlander/config.h | 103 ++++ keyboards/moonlander/info.json | 31 ++ keyboards/moonlander/keymaps/default/config.h | 21 + keyboards/moonlander/keymaps/default/keymap.c | 109 ++++ keyboards/moonlander/keymaps/drashna/config.h | 21 + keyboards/moonlander/keymaps/drashna/keymap.c | 279 +++++++++++ keyboards/moonlander/keymaps/drashna/rules.mk | 4 + keyboards/moonlander/matrix.c | 270 ++++++++++ keyboards/moonlander/moonlander.c | 466 ++++++++++++++++++ keyboards/moonlander/moonlander.h | 81 +++ keyboards/moonlander/readme.md | 28 ++ keyboards/moonlander/rules.mk | 29 ++ 12 files changed, 1442 insertions(+) create mode 100644 keyboards/moonlander/config.h create mode 100644 keyboards/moonlander/info.json create mode 100644 keyboards/moonlander/keymaps/default/config.h create mode 100644 keyboards/moonlander/keymaps/default/keymap.c create mode 100644 keyboards/moonlander/keymaps/drashna/config.h create mode 100644 keyboards/moonlander/keymaps/drashna/keymap.c create mode 100644 keyboards/moonlander/keymaps/drashna/rules.mk create mode 100644 keyboards/moonlander/matrix.c create mode 100644 keyboards/moonlander/moonlander.c create mode 100644 keyboards/moonlander/moonlander.h create mode 100644 keyboards/moonlander/readme.md create mode 100644 keyboards/moonlander/rules.mk diff --git a/keyboards/moonlander/config.h b/keyboards/moonlander/config.h new file mode 100644 index 000000000000..b77fcbd1e04a --- /dev/null +++ b/keyboards/moonlander/config.h @@ -0,0 +1,103 @@ +/* Copyright 2020 ZSA Technology Labs, Inc <@zsa> + * Copyright 2020 Jack Humbert + * Copyright 2020 Drashna Jael're + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License 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 */ +// clang-format off +#define VENDOR_ID 0x3297 +#define PRODUCT_ID 0x1969 +#define MANUFACTURER ZSA Technology Labs +#define PRODUCT Moonlander Mark I +#define DEVICE_VER 0x0001 +#define WEBUSB_LANDING_PAGE_URL u8"configure.ergodox-ez.com" + +// clang-format on + +/* key matrix size */ +#define MATRIX_ROWS 12 +#define MATRIX_COLS 7 + +/* PCB default pin-out */ +// #define MATRIX_ROW_PINS { B10, B11, B12, B13, B14, B15 } +// #define MATRIX_COL_PINS { A0, A1, A2, A3, A6, A7, B0 } + +// #define MCP23_ROW_PINS { GPB5, GBP4, GBP3, GBP2, GBP1, GBP0 } +// #define MCP23_COL_PINS { GPA0, GBA1, GBA2, GBA3, GBA4, GBA5, GBA6 } + +// #define MCP23_LED_R GPB7 +// #define MCP23_LED_G GPB6 +// #define MCP23_LED_B GPA7 + +#define EEPROM_I2C_24LC128 + +// Not needed, is default address: +// #define EXTERNAL_EEPROM_I2C_BASE_ADDRESS 0b10100000 + +/* COL2ROW or ROW2COL */ +#define DIODE_DIRECTION ROW2COL + +/* 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 DRIVER_ADDR_1 0b1110100 +#define DRIVER_ADDR_2 0b1110111 + +#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) +#define RGB_MATRIX_CENTER { 125, 26 } +#define RGB_MATRIX_MAXIMUM_BRIGHTNESS 175 +#define RGB_MATRIX_FRAMEBUFFER_EFFECTS +#define RGB_MATRIX_KEYPRESSES +#define RGB_DISABLE_WHEN_USB_SUSPENDED true + +#define MUSIC_MAP + +#define FIRMWARE_VERSION_SIZE 17 +#define DYNAMIC_KEYMAP_EEPROM_ADDR (EECONFIG_SIZE + FIRMWARE_VERSION_SIZE) +#ifdef EEPROM_I2C +# define DYNAMIC_KEYMAP_EEPROM_MAX_ADDR 16383 +# define DYNAMIC_KEYMAP_LAYER_COUNT 32 +#endif diff --git a/keyboards/moonlander/info.json b/keyboards/moonlander/info.json new file mode 100644 index 000000000000..1a12b665a565 --- /dev/null +++ b/keyboards/moonlander/info.json @@ -0,0 +1,31 @@ +{ + "keyboard_name": "Moonlander Mark I", + "url": "zsa.io/moonlander", + "maintainer": "ZSA via Drashna", + "manufacturer": "ZSA Technology Labs Inc", + "width": 17, + "height": 8, + + "layouts": { + "LAYOUT_moonlander": { + "layout": [ + {"x":0, "y":0.375}, {"x":1, "y":0.375}, {"x":2, "y":0.125}, {"x":3, "y":0}, {"x":4, "y":0.125}, {"x":5, "y":0.25}, {"x":6, "y":0.25}, + {"x":10, "y":0.25}, {"x":11, "y":0.25}, {"x":12, "y":0.125}, {"x":13, "y":0}, {"x":14, "y":0.125}, {"x":15, "y":0.375}, {"x":16, "y":0.375}, + + {"x":0, "y":1.375}, {"x":1, "y":1.375}, {"x":2, "y":1.125}, {"x":3, "y":1}, {"x":4, "y":1.125}, {"x":5, "y":1.25}, {"x":6, "y":1.25}, + {"x":10, "y":1.25}, {"x":11, "y":1.25}, {"x":12, "y":1.125}, {"x":13, "y":1}, {"x":14, "y":1.125}, {"x":15, "y":1.375}, {"x":16, "y":1.375}, + + {"x":0, "y":2.375}, {"x":1, "y":2.375}, {"x":2, "y":2.125}, {"x":3, "y":2}, {"x":4, "y":2.125}, {"x":5, "y":2.25}, {"x":6, "y":2.25}, + {"x":10, "y":2.25}, {"x":11, "y":2.25}, {"x":12, "y":2.125}, {"x":13, "y":2}, {"x":14, "y":2.125}, {"x":15, "y":2.375}, {"x":16, "y":2.375}, + + {"x":0, "y":3.375}, {"x":1, "y":3.375}, {"x":2, "y":3.125}, {"x":3, "y":3}, {"x":4, "y":3.125}, {"x":5, "y":3.25}, + {"x":11, "y":3.25}, {"x":12, "y":3.125}, {"x":13, "y":3}, {"x":14, "y":3.125}, {"x":15, "y":3.375}, {"x":16, "y":3.375}, + + {"x":0, "y":4.375}, {"x":1, "y":4.375}, {"x":2, "y":4.125}, {"x":3, "y":4}, {"x":4, "y":4.125}, {"x":5, "y":4.5, "w":2}, + {"x":10, "y":4.5, "w":2}, {"x":12, "y":4.125}, {"x":13, "y":4}, {"x":14, "y":4.125}, {"x":15, "y":4.375}, {"x":16, "y":4.375}, + + {"x":5, "y":5.5, "h":1.5}, {"x":6, "y":5.5, "h":1.5}, {"x":7, "y":5.5, "h":1.5}, {"x":9, "y":5.5, "h":1.5}, {"x":10, "y":5.5, "h":1.5}, {"x":11, "y":5.5, "h":1.5} + ] + } + } +} diff --git a/keyboards/moonlander/keymaps/default/config.h b/keyboards/moonlander/keymaps/default/config.h new file mode 100644 index 000000000000..95b05a5a61bc --- /dev/null +++ b/keyboards/moonlander/keymaps/default/config.h @@ -0,0 +1,21 @@ +/* Copyright 2020 ZSA Technology Labs, Inc <@zsa> + * Copyright 2020 Jack Humbert + * Copyright 2020 Drashna Jael're + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License 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 ORYX_CONFIGURATOR diff --git a/keyboards/moonlander/keymaps/default/keymap.c b/keyboards/moonlander/keymaps/default/keymap.c new file mode 100644 index 000000000000..67a2cd53a8e5 --- /dev/null +++ b/keyboards/moonlander/keymaps/default/keymap.c @@ -0,0 +1,109 @@ +/* Copyright 2020 ZSA Technology Labs, Inc <@zsa> + * Copyright 2020 Jack Humbert + * Copyright 2020 Drashna Jael're + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public 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 "version.h" + +enum layers { + BASE, // default layer + SYMB, // symbols + MDIA, // media keys +}; + +enum custom_keycodes { + VRSN = ML_SAFE_RANGE, +}; + +// clang-format off +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [BASE] = LAYOUT_moonlander( + KC_EQL, KC_1, KC_2, KC_3, KC_4, KC_5, KC_LEFT, KC_RGHT, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, TG(SYMB), TG(SYMB), KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS, + KC_BSPC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_HYPR, KC_MEH, KC_H, KC_J, KC_K, KC_L, LT(MDIA, KC_SCLN), GUI_T(KC_QUOT), + KC_LSFT, LCTL_T(KC_Z),KC_X,KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, LCTL_T(KC_SLSH), KC_LSFT, + LT(SYMB,KC_GRV),WEBUSB_PAIR,A(KC_LSFT),KC_LEFT, KC_RGHT, LALT_T(KC_APP), RCTL_T(KC_ESC), KC_UP, KC_DOWN, KC_LBRC, KC_RBRC, TT(SYMB), + KC_SPC, KC_BSPC, KC_LGUI, KC_RALT, KC_TAB, KC_ENT + ), + + [SYMB] = LAYOUT_moonlander( + VRSN, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_TRNS, KC_TRNS, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, + KC_TRNS, KC_EXLM, KC_AT, KC_LCBR, KC_RCBR, KC_PIPE, KC_TRNS, KC_TRNS, KC_UP, KC_7, KC_8, KC_9, KC_ASTR, KC_F12, + KC_TRNS, KC_HASH, KC_DLR, KC_LPRN, KC_RPRN, KC_GRV, KC_TRNS, KC_TRNS, KC_DOWN, 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, + EEP_RST, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RGB_VAI, RGB_TOG, KC_TRNS, KC_DOT, KC_0, KC_EQL, KC_TRNS, + RGB_HUD, RGB_VAD, RGB_HUI, TOGGLE_LAYER_COLOR,KC_TRNS, KC_TRNS + ), + + [MDIA] = LAYOUT_moonlander( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_MS_U, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 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, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MPLY, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MPRV, KC_MNXT, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_BTN1, KC_BTN2, KC_TRNS, KC_TRNS, KC_VOLU, KC_VOLD, KC_MUTE, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ), +}; + +layer_state_t layer_state_set_user(layer_state_t state) { + ML_LED_1(false); + ML_LED_2(false); + ML_LED_3(false); + ML_LED_4(false); + ML_LED_5(false); + ML_LED_6(false); + + switch (get_highest_layer(state)) { + case 1: + ML_LED_1(1); + ML_LED_4(1); + break; + case 2: + ML_LED_2(1); + ML_LED_5(1); + break; + case 3: + ML_LED_3(1); + break; + case 4: + ML_LED_4(1); + break; + case 5: + ML_LED_5(1); + break; + case 6: + ML_LED_6(1); + break; + default: + break; + } + + return state; +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + if (record->event.pressed) { + switch (keycode) { + case VRSN: + SEND_STRING (QMK_KEYBOARD "/" QMK_KEYMAP " @ " QMK_VERSION); + return false; + } + } + return true; +} diff --git a/keyboards/moonlander/keymaps/drashna/config.h b/keyboards/moonlander/keymaps/drashna/config.h new file mode 100644 index 000000000000..dd49eaf4b4c2 --- /dev/null +++ b/keyboards/moonlander/keymaps/drashna/config.h @@ -0,0 +1,21 @@ +/* Copyright 2020 Drashna Jael're + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License 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_PER_KEY diff --git a/keyboards/moonlander/keymaps/drashna/keymap.c b/keyboards/moonlander/keymaps/drashna/keymap.c new file mode 100644 index 000000000000..b8754673be1a --- /dev/null +++ b/keyboards/moonlander/keymaps/drashna/keymap.c @@ -0,0 +1,279 @@ +/* Copyright 2020 Drashna Jael're + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + + + +#include "drashna.h" + +#ifndef UNICODE_ENABLE +# define UC(x) KC_NO +#endif + +enum more_custom_keycodes { KC_SWAP_NUM = NEW_SAFE_RANGE }; + +// clang-format off +#define LAYOUT_moonlander_wrapper(...) LAYOUT_moonlander(__VA_ARGS__) + +#define LAYOUT_moonlander_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_moonlander_wrapper( \ + KC_ESC, ________________NUMBER_LEFT________________, UC_FLIP, UC_TABL, ________________NUMBER_RIGHT_______________, KC_MINS, \ + KC_TAB, K01, K02, K03, K04, K05, TG(_DIABLO),TG(_DIABLO), K06, K07, K08, K09, K0A, KC_BSLS, \ + KC_C1R3, K11, K12, K13, K14, K15, TG(_GAMEPAD),TG(_GAMEPAD), K16, K17, K18, K19, K1A, RALT_T(KC_QUOT), \ + KC_MLSF, CTL_T(K21), K22, K23, K24, K25, K26, K27, K28, K29, RCTL_T(K2A),KC_MRSF, \ + KC_GRV, OS_MEH, OS_HYPR, KC_LBRC, KC_RBRC, KC_NO, KC_DEL, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, UC(0x2E2E), \ + KC_SPC, BK_LWER, OS_LALT, OS_RGUI, DL_RAIS, KC_ENT \ + ) + +#define LAYOUT_moonlander_base_wrapper(...) LAYOUT_moonlander_base(__VA_ARGS__) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [_QWERTY] = LAYOUT_moonlander_base_wrapper( + _________________QWERTY_L1_________________, _________________QWERTY_R1_________________, + _________________QWERTY_L2_________________, _________________QWERTY_R2_________________, + _________________QWERTY_L3_________________, _________________QWERTY_R3_________________ + ), + + [_COLEMAK] = LAYOUT_moonlander_base_wrapper( + _________________COLEMAK_L1________________, _________________COLEMAK_R1________________, + _________________COLEMAK_L2________________, _________________COLEMAK_R2________________, + _________________COLEMAK_L3________________, _________________COLEMAK_R3________________ + ), + + [_DVORAK] = LAYOUT_moonlander_base_wrapper( + _________________DVORAK_L1_________________, _________________DVORAK_R1_________________, + _________________DVORAK_L2_________________, _________________DVORAK_R2_________________, + _________________DVORAK_L3_________________, _________________DVORAK_R3_________________ + ), + + [_WORKMAN] = LAYOUT_moonlander_base_wrapper( + _________________WORKMAN_L1________________, _________________WORKMAN_R1________________, + _________________WORKMAN_L2________________, _________________WORKMAN_R2________________, + _________________WORKMAN_L3________________, _________________WORKMAN_R3________________ + ), + + [_NORMAN] = LAYOUT_moonlander_base_wrapper( + _________________NORMAN_L1_________________, _________________NORMAN_L1_________________, + _________________NORMAN_L2_________________, _________________NORMAN_R2_________________, + _________________NORMAN_L3_________________, _________________NORMAN_R3_________________ + ), + + [_MALTRON] = LAYOUT_moonlander_base_wrapper( + _________________MALTRON_L1________________, _________________MALTRON_R1________________, + _________________MALTRON_L2________________, _________________MALTRON_R2________________, + _________________MALTRON_L3________________, _________________MALTRON_R3________________ + ), + + [_EUCALYN] = LAYOUT_moonlander_base_wrapper( + _________________EUCALYN_L1________________, _________________EUCALYN_R1________________, + _________________EUCALYN_L2________________, _________________EUCALYN_R2________________, + _________________EUCALYN_L3________________, _________________EUCALYN_R3________________ + ), + + [_CARPLAX] = LAYOUT_moonlander_base_wrapper( + _____________CARPLAX_QFMLWY_L1_____________, _____________CARPLAX_QFMLWY_R1_____________, + _____________CARPLAX_QFMLWY_L2_____________, _____________CARPLAX_QFMLWY_R2_____________, + _____________CARPLAX_QFMLWY_L3_____________, _____________CARPLAX_QFMLWY_R3_____________ + ), + +#ifdef _MODS + [_MODS] = LAYOUT_moonlander_wrapper( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + KC_LSFT, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_RSFT, + _______, KC_MEH, KC_HYPR, _______, _______, _______, _______, _______, _______, _______, _______, _______, + KC_LALT, _______, _______, _______, _______, KC_RGUI + ), +#endif + + [_GAMEPAD] = LAYOUT_moonlander_wrapper( + KC_ESC, KC_NO, KC_1, KC_2, KC_3, KC_4, HYPR(KC_Q), KC_TRNS, KC_F9, KC_F10, KC_F11, KC_F12, KC_NO, KC_NO, + KC_F1, KC_K, KC_Q, KC_W, KC_E, KC_R, KC_T, UC_SHRG, UC_DISA, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_TAB, KC_G, KC_A, KC_S, KC_D, KC_F, KC_TRNS, TG(_GAMEPAD), KC_I, KC_O, KC_NO, KC_NO, KC_NO, KC_NO, + KC_LCTL, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_N, KC_M, KC_NO, KC_NO, KC_NO, KC_NO, + KC_GRV, KC_U, KC_I, KC_Y, KC_T, KC_PSCR, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_NO, + KC_V, KC_SPC, KC_H, KC_NO, KC_NO, KC_SWAP_NUM + ), + [_DIABLO] = LAYOUT_moonlander_wrapper( + KC_ESC, KC_V, KC_D, KC_LALT, KC_NO, KC_NO, KC_NO, KC_TRNS, KC_F9, KC_F10, KC_F11, KC_F12, KC_NO, KC_NO, + KC_TAB, KC_S, KC_I, KC_F, KC_M, KC_T, KC_TRNS, KC_TRNS, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_NO, KC_1, KC_2, KC_3, KC_4, KC_G, KC_TRNS, KC_TRNS, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_LCTL, KC_D3_1, KC_D3_2, KC_D3_3, KC_D3_4, KC_Z, KC_N, KC_M, KC_NO, KC_NO, KC_NO, KC_NO, + KC_NO, KC_NO, KC_L, KC_J, KC_F, KC_PSCR, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_DIABLO_CLEAR, SFT_T(KC_SPACE), ALT_T(KC_Q), KC_PGDN, KC_DEL, KC_ENT + ), + + [_LOWER] = LAYOUT_moonlander_wrapper( + KC_F12, _________________FUNC_LEFT_________________, _______, _______, _________________FUNC_RIGHT________________, KC_F11, + _______, _________________LOWER_L1__________________, _______, _______, _________________LOWER_R1__________________, KC_PIPE, + _______, _________________LOWER_L2__________________, _______, _______, _________________LOWER_R2__________________, KC_DQUO, + _______, _________________LOWER_L3__________________, _________________LOWER_R3__________________, KC_PSCR, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_PAUS, + _______, _______, _______, _______, _______, _______ + ), + + [_RAISE] = LAYOUT_moonlander_wrapper( + KC_F12, _________________FUNC_LEFT_________________, _______, _______, _________________FUNC_RIGHT________________, KC_F11, + _______, _________________RAISE_L1__________________, _______, _______, _________________RAISE_R1__________________, KC_BSLS, + _______, _________________RAISE_L2__________________, _______, _______, _________________RAISE_R2__________________, KC_QUOT, + _______, _________________RAISE_L3__________________, _________________RAISE_R3__________________, KC_PSCR, + _______, _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_PGUP, KC_END, KC_PAUS, + _______, _______, _______, _______, _______, _______ + ), + + [_ADJUST] = LAYOUT_moonlander_wrapper( + KC_MAKE, _________________FUNC_LEFT_________________, UC_MOD, KC_NUKE, _________________ADJUST_R1_________________, KC_RST, + VRSN, _________________ADJUST_L1_________________, _______, _______, _________________ADJUST_R1_________________, EEP_RST, + _______, _________________ADJUST_L2_________________, _______, _______, _________________ADJUST_R2_________________, RGB_IDL, + _______, _________________ADJUST_L3_________________, _________________ADJUST_R3_________________, TG_MODS, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_PAUS, + _______, _______, _______, _______, _______, _______ + ), +}; + +/* Blank + + [_LAYER] = LAYOUT_moonlander_wrapper( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______ + ), + +*/ + + +bool process_record_keymap(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case KC_1: + if (layer_state_is(_GAMEPAD) && userspace_config.swapped_numbers) { + if (record->event.pressed) { + register_code(KC_2); + } else { + unregister_code(KC_2); + } + return false; + } + break; + case KC_2: + if (layer_state_is(_GAMEPAD) && userspace_config.swapped_numbers) { + if (record->event.pressed) { + register_code(KC_1); + } else { + unregister_code(KC_1); + } + return false; + } + break; + case KC_SWAP_NUM: + if (record->event.pressed) { + userspace_config.swapped_numbers ^= 1; + eeconfig_update_user(userspace_config.raw); + unregister_code(KC_1); + unregister_code(KC_2); + } + break; + } + return true; +} + +#ifdef RGB_MATRIX_ENABLE +# ifndef RGB_MATRIX_INDICATOR_SET_COLOR +# define RGB_MATRIX_INDICATOR_SET_COLOR(i, r, g, b) rgb_matrix_set_color(i, r, g, b) +void rgb_matrix_indicators_user(void) { + #else +void rgb_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max) { +# endif + if (g_suspend_state || !rgb_matrix_config.enable) return; + + if (layer_state_is(_GAMEPAD)) { + RGB_MATRIX_INDICATOR_SET_COLOR(11, 0x00, 0xFF, 0x00); // Q + RGB_MATRIX_INDICATOR_SET_COLOR(16, 0x00, 0xFF, 0xFF); // W + RGB_MATRIX_INDICATOR_SET_COLOR(21, 0xFF, 0x00, 0x00); // E + RGB_MATRIX_INDICATOR_SET_COLOR(26, 0xFF, 0x80, 0x00); // R + RGB_MATRIX_INDICATOR_SET_COLOR(12, 0x00, 0xFF, 0xFF); // A + RGB_MATRIX_INDICATOR_SET_COLOR(17, 0x00, 0xFF, 0xFF); // S + RGB_MATRIX_INDICATOR_SET_COLOR(22, 0x00, 0xFF, 0xFF); // D + RGB_MATRIX_INDICATOR_SET_COLOR(27, 0x7A, 0x00, 0xFF); // F + + RGB_MATRIX_INDICATOR_SET_COLOR((userspace_config.swapped_numbers ? 10 : 15), 0xFF, 0xFF, 0xFF); // 1 + RGB_MATRIX_INDICATOR_SET_COLOR((userspace_config.swapped_numbers ? 15 : 10), 0x00, 0xFF, 0x00); // 2 + RGB_MATRIX_INDICATOR_SET_COLOR(20, 0x7A, 0x00, 0xFF); // 3 + } + + if (userspace_config.rgb_layer_change) { + switch (get_highest_layer(layer_state|default_layer_state)) { + case _QWERTY: + rgb_matrix_layer_helper(HSV_CYAN, 0, rgb_matrix_config.speed, LED_FLAG_MODIFIER); + break; + case _COLEMAK: + rgb_matrix_layer_helper(HSV_MAGENTA, 0, rgb_matrix_config.speed, LED_FLAG_MODIFIER); + break; + case _DVORAK: + rgb_matrix_layer_helper(HSV_SPRINGGREEN, 0, rgb_matrix_config.speed, LED_FLAG_MODIFIER); + break; + case _WORKMAN: + rgb_matrix_layer_helper(HSV_GOLDENROD, 0, rgb_matrix_config.speed, LED_FLAG_MODIFIER); + break; + case _NORMAN: + rgb_matrix_layer_helper(HSV_CORAL, 0, rgb_matrix_config.speed, LED_FLAG_MODIFIER); + break; + case _MALTRON: + rgb_matrix_layer_helper(HSV_YELLOW, 0, rgb_matrix_config.speed, LED_FLAG_MODIFIER); + break; + case _EUCALYN: + rgb_matrix_layer_helper(HSV_PINK, 0, rgb_matrix_config.speed, LED_FLAG_MODIFIER); + break; + case _CARPLAX: + rgb_matrix_layer_helper(HSV_BLUE, 0, rgb_matrix_config.speed, LED_FLAG_MODIFIER); + break; + case _GAMEPAD: + rgb_matrix_layer_helper(HSV_ORANGE, 1, rgb_matrix_config.speed, LED_FLAG_MODIFIER); + break; + case _DIABLO: + rgb_matrix_layer_helper(HSV_RED, 1, rgb_matrix_config.speed * 8, LED_FLAG_MODIFIER); + break; + case _RAISE: + rgb_matrix_layer_helper(HSV_YELLOW, 1, rgb_matrix_config.speed, LED_FLAG_MODIFIER); + break; + case _LOWER: + rgb_matrix_layer_helper(HSV_GREEN, 1, rgb_matrix_config.speed, LED_FLAG_MODIFIER); + break; + case _ADJUST: + rgb_matrix_layer_helper(HSV_RED, 1, rgb_matrix_config.speed, LED_FLAG_MODIFIER); + break; + } + } +} +#endif + +#ifdef TAPPING_TERM_PER_KEY +uint16_t get_tapping_term(uint16_t keycode, keyrecord_t *record) { + if (keycode >= QK_MOD_TAP && keycode <= QK_MOD_TAP_MAX) { + if (mod_config(keycode & 0xf) & MOD_MASK_ALT) { + return (2 * TAPPING_TERM); + } + } + return TAPPING_TERM; +} +#endif diff --git a/keyboards/moonlander/keymaps/drashna/rules.mk b/keyboards/moonlander/keymaps/drashna/rules.mk new file mode 100644 index 000000000000..480e9744631c --- /dev/null +++ b/keyboards/moonlander/keymaps/drashna/rules.mk @@ -0,0 +1,4 @@ +TAP_DANCE_ENABLE = yes +BOOTMAGIC_ENABLE = lite +UNICODE_ENABLE = yes +UNICODEMAP_ENABLE = no diff --git a/keyboards/moonlander/matrix.c b/keyboards/moonlander/matrix.c new file mode 100644 index 000000000000..774b01187d3d --- /dev/null +++ b/keyboards/moonlander/matrix.c @@ -0,0 +1,270 @@ +/* Copyright 2020 ZSA Technology Labs, Inc <@zsa> + * Copyright 2020 Jack Humbert + * Copyright 2020 Drashna Jael're + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public 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 +#include "hal.h" +#include "timer.h" +#include "wait.h" +#include "printf.h" +#include "matrix.h" +#include "action.h" +#include "keycode.h" +#include +#include "moonlander.h" +#include "i2c_master.h" +#include "debounce.h" + +/* +#define MATRIX_ROW_PINS { B10, B11, B12, B13, B14, B15 } outputs +#define MATRIX_COL_PINS { A0, A1, A2, A3, A6, A7, B0 } inputs + */ +/* 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 matrix_debouncing_right[MATRIX_COLS]; +static bool debouncing = false; +static uint16_t debouncing_time = 0; +static bool debouncing_right = false; +static uint16_t debouncing_time_right = 0; + +#define ROWS_PER_HAND (MATRIX_ROWS / 2) + +#ifndef MATRIX_IO_DELAY +# define MATRIX_IO_DELAY 20 +#endif + +extern bool mcp23018_leds[3]; +extern bool is_launching; + +__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(); } + +__attribute__((weak)) void matrix_io_delay(void) { wait_us(MATRIX_IO_DELAY); } + +bool mcp23018_initd = false; +static uint8_t mcp23018_reset_loop; + +uint8_t mcp23018_tx[3]; +uint8_t mcp23018_rx[1]; + +void mcp23018_init(void) { + i2c_init(); + + // #define MCP23_ROW_PINS { GPB5, GBP4, GBP3, GBP2, GBP1, GBP0 } outputs + // #define MCP23_COL_PINS { GPA0, GBA1, GBA2, GBA3, GBA4, GBA5, GBA6 } inputs + + mcp23018_tx[0] = 0x00; // IODIRA + mcp23018_tx[1] = 0b00000000; // A is output + mcp23018_tx[2] = 0b00111111; // B is inputs + + if (MSG_OK != i2c_transmit(MCP23018_DEFAULT_ADDRESS << 1, mcp23018_tx, 3, I2C_TIMEOUT)) { + printf("error hori\n"); + } else { + mcp23018_tx[0] = 0x0C; // GPPUA + mcp23018_tx[1] = 0b10000000; // A is not pulled-up + mcp23018_tx[2] = 0b11111111; // B is pulled-up + + if (MSG_OK != i2c_transmit(MCP23018_DEFAULT_ADDRESS << 1, mcp23018_tx, 3, I2C_TIMEOUT)) { + printf("error hori\n"); + } else { + mcp23018_initd = is_launching = true; + } + } +} + +void matrix_init(void) { + printf("matrix init\n"); + // debug_matrix = true; + + // outputs + setPinOutput(B10); + setPinOutput(B11); + setPinOutput(B12); + setPinOutput(B13); + setPinOutput(B14); + setPinOutput(B15); + + // inputs + setPinInputLow(A0); + setPinInputLow(A1); + setPinInputLow(A2); + setPinInputLow(A3); + setPinInputLow(A6); + setPinInputLow(A7); + setPinInputLow(B0); + + memset(matrix, 0, MATRIX_ROWS * sizeof(matrix_row_t)); + memset(matrix_debouncing, 0, MATRIX_ROWS * sizeof(matrix_row_t)); + memset(matrix_debouncing_right, 0, MATRIX_COLS * sizeof(matrix_row_t)); + + mcp23018_init(); + + matrix_init_quantum(); +} + +uint8_t matrix_scan(void) { + bool changed = false; + + matrix_row_t data = 0; + // actual matrix + for (uint8_t row = 0; row < ROWS_PER_HAND; row++) { + // strobe row + switch (row) { + case 0: writePinHigh(B10); break; + case 1: writePinHigh(B11); break; + case 2: writePinHigh(B12); break; + case 3: writePinHigh(B13); break; + case 4: writePinHigh(B14); break; + case 5: writePinHigh(B15); break; + } + + // need wait to settle pin state + matrix_io_delay(); + + // read col data + data = ( + (readPin(A0) << 0 ) | + (readPin(A1) << 1 ) | + (readPin(A2) << 2 ) | + (readPin(A3) << 3 ) | + (readPin(A6) << 4 ) | + (readPin(A7) << 5 ) | + (readPin(B0) << 6 ) + ); + + // unstrobe row + switch (row) { + case 0: writePinLow(B10); break; + case 1: writePinLow(B11); break; + case 2: writePinLow(B12); break; + case 3: writePinLow(B13); break; + case 4: writePinLow(B14); break; + case 5: writePinLow(B15); break; + } + + if (matrix_debouncing[row] != data) { + matrix_debouncing[row] = data; + debouncing = true; + debouncing_time = timer_read(); + changed = true; + } + } + + for (uint8_t row = 0; row <= ROWS_PER_HAND; row++) { + // right side + + if (!mcp23018_initd) { + if (++mcp23018_reset_loop == 0) { + // if (++mcp23018_reset_loop >= 1300) { + // since mcp23018_reset_loop is 8 bit - we'll try to reset once in 255 matrix scans + // this will be approx bit more frequent than once per second + print("trying to reset mcp23018\n"); + mcp23018_init(); + if (!mcp23018_initd) { + print("left side not responding\n"); + } else { + print("left side attached\n"); +#ifdef RGB_MATRIX_ENABLE + rgb_matrix_init(); +#endif + } + } + } + + // #define MCP23_ROW_PINS { GPB5, GBP4, GBP3, GBP2, GBP1, GBP0 } outputs + // #define MCP23_COL_PINS { GPA0, GBA1, GBA2, GBA3, GBA4, GBA5, GBA6 } inputs + + // select row + + mcp23018_tx[0] = 0x12; // GPIOA + mcp23018_tx[1] = (0b01111111 & ~(1 << (row))) | ((uint8_t)!mcp23018_leds[2] << 7); // activate row + mcp23018_tx[2] = ((uint8_t)!mcp23018_leds[1] << 6) | ((uint8_t)!mcp23018_leds[0] << 7); // activate row + + if (MSG_OK != i2c_transmit(MCP23018_DEFAULT_ADDRESS << 1, mcp23018_tx, 3, I2C_TIMEOUT)) { + printf("error hori\n"); + mcp23018_initd = false; + } + + // read col + + mcp23018_tx[0] = 0x13; // GPIOB + if (MSG_OK != i2c_readReg(MCP23018_DEFAULT_ADDRESS << 1, mcp23018_tx[0], &mcp23018_rx[0], 1, I2C_TIMEOUT)) { + printf("error vert\n"); + mcp23018_initd = false; + } + + data = ~(mcp23018_rx[0] & 0b00111111); + // data = 0x01; + + if (matrix_debouncing_right[row] != data) { + matrix_debouncing_right[row] = data; + debouncing_right = true; + debouncing_time_right = timer_read(); + changed = true; + } + } + + if (debouncing && timer_elapsed(debouncing_time) > DEBOUNCE) { + for (int row = 0; row < ROWS_PER_HAND; row++) { + matrix[row] = matrix_debouncing[row]; + } + debouncing = false; + } + + if (debouncing_right && timer_elapsed(debouncing_time_right) > DEBOUNCE && mcp23018_initd) { + for (int row = 0; row < ROWS_PER_HAND; row++) { + matrix[11 - row] = 0; + for (int col = 0; col < MATRIX_COLS; col++) { + matrix[11 - row] |= ((matrix_debouncing_right[6 - col] & (1 << row) ? 1 : 0) << col); + } + } + debouncing_right = false; + } + + matrix_scan_quantum(); + + return (uint8_t)changed; +} + +bool matrix_is_on(uint8_t row, uint8_t col) { return (matrix[row] & (1 << col)); } + +matrix_row_t matrix_get_row(uint8_t row) { return matrix[row]; } + +void matrix_print(void) { + printf("\nr/c 01234567\n"); + for (uint8_t row = 0; row < MATRIX_ROWS; row++) { + printf("%X0: ", row); + matrix_row_t data = matrix_get_row(row); + for (int col = 0; col < MATRIX_COLS; col++) { + if (data & (1 << col)) + printf("1"); + else + printf("0"); + } + printf("\n"); + } +} diff --git a/keyboards/moonlander/moonlander.c b/keyboards/moonlander/moonlander.c new file mode 100644 index 000000000000..403e6aef8b38 --- /dev/null +++ b/keyboards/moonlander/moonlander.c @@ -0,0 +1,466 @@ +/* Copyright 2020 ZSA Technology Labs, Inc <@zsa> + * Copyright 2020 Jack Humbert + * Copyright 2020 Drashna Jael're + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . +*/ + + + +#include "moonlander.h" +#ifdef WEBUSB_ENABLE +# include "webusb.h" +#endif + +keyboard_config_t keyboard_config; + +bool mcp23018_leds[3] = {0, 0, 0}; +bool is_launching = false; + +#ifdef DYNAMIC_MACRO_ENABLE +static bool is_dynamic_recording = false; + +void dynamic_macro_record_start_user(void) { is_dynamic_recording = true; } + +void dynamic_macro_record_end_user(int8_t direction) { + is_dynamic_recording = false; + ML_LED_3(false); +} +#endif + +void moonlander_led_task(void) { + if (is_launching) { + ML_LED_1(false); + ML_LED_2(false); + ML_LED_3(false); + ML_LED_4(false); + ML_LED_5(false); + ML_LED_6(false); + + ML_LED_1(true); + wait_ms(250); + ML_LED_2(true); + wait_ms(250); + ML_LED_3(true); + wait_ms(250); + ML_LED_4(true); + wait_ms(250); + ML_LED_5(true); + wait_ms(250); + ML_LED_6(true); + wait_ms(250); + ML_LED_1(false); + wait_ms(250); + ML_LED_2(false); + wait_ms(250); + ML_LED_3(false); + wait_ms(250); + ML_LED_4(false); + wait_ms(250); + ML_LED_5(false); + wait_ms(250); + ML_LED_6(false); + wait_ms(250); + is_launching = false; + layer_state_set_kb(layer_state); + } +#ifdef DYNAMIC_MACRO_ENABLE + else if (is_dynamic_recording) { + ML_LED_3(true); + wait_ms(100); + ML_LED_3(false); + wait_ms(155); + } +#endif +#ifdef WEBUSB_ENABLE + else if (webusb_state.pairing == true) { + static uint8_t led_mask; + + ML_LED_1(false); + ML_LED_2(false); + ML_LED_3(false); + ML_LED_4(false); + ML_LED_5(false); + ML_LED_6(false); + + if (!led_mask) { + led_mask = 1; + } else { + led_mask++; + if (led_mask > 12) led_mask = 1; + } + switch (led_mask) { + case 1: + case 12: + ML_LED_1(true); + break; + case 2: + case 11: + ML_LED_2(true); + break; + case 3: + case 10: + ML_LED_3(true); + break; + case 4: + case 9: + ML_LED_4(true); + break; + case 5: + case 8: + ML_LED_5(true); + break; + case 6: + case 7: + ML_LED_6(true); + break; + } + wait_ms(150); + } +#endif +} + +static THD_WORKING_AREA(waLEDThread, 128); +static THD_FUNCTION(LEDThread, arg) { + (void)arg; + chRegSetThreadName("LEDThread"); + while (true) { + moonlander_led_task(); + } +} + +void keyboard_pre_init_kb(void) { + setPinOutput(B5); + setPinOutput(B4); + setPinOutput(B3); + + writePinLow(B5); + writePinLow(B4); + writePinLow(B3); + + chThdCreateStatic(waLEDThread, sizeof(waLEDThread), NORMALPRIO - 16, LEDThread, NULL); + + /* the array is initialized to 0, no need to re-set it here */ + // mcp23018_leds[0] = 0; // blue + // mcp23018_leds[1] = 0; // green + // mcp23018_leds[2] = 0; // red + + keyboard_pre_init_user(); +} + +#ifdef ORYX_CONFIGURATOR +layer_state_t layer_state_set_kb(layer_state_t state) { + state = layer_state_set_user(state); + if (is_launching) return state; + + ML_LED_1(false); + ML_LED_2(false); + ML_LED_3(false); + ML_LED_4(false); + ML_LED_5(false); + ML_LED_6(false); + + uint8_t layer = get_highest_layer(state); + switch (layer) { + case 1: + ML_LED_1(1); + ML_LED_4(1); + break; + case 2: + ML_LED_2(1); + ML_LED_5(1); + break; + case 3: + ML_LED_3(1); + break; + case 4: + ML_LED_4(1); + break; + case 5: + ML_LED_5(1); + break; + case 6: + ML_LED_6(1); + break; + default: + break; + } + + return state; +} +#endif + +#ifdef RGB_MATRIX_ENABLE +// clang-format off +const is31_led g_is31_leds[DRIVER_LED_TOTAL] = { +/* Refer to IS31 manual for these locations + * driver + * | R location + * | | G location + * | | | B location + * | | | | */ + {0, C3_2, C1_1, C4_2}, // 1 + {0, C2_2, C1_2, C4_3}, + {0, C2_3, C1_3, C3_3}, + {0, C2_4, C1_4, C3_4}, + {0, C2_5, C1_5, C3_5}, + {0, C2_6, C1_6, C3_6}, + {0, C2_7, C1_7, C3_7}, + {0, C2_8, C1_8, C3_8}, + {0, C3_1, C2_1, C4_1}, + + {0, C7_8, C6_8, C8_8}, // 10 + {0, C7_7, C6_7, C9_8}, + {0, C8_7, C6_6, C9_7}, + {0, C8_6, C7_6, C9_6}, + {0, C8_5, C7_5, C9_5}, + {0, C8_4, C7_4, C9_4}, + {0, C8_3, C7_3, C9_3}, + {0, C8_2, C7_2, C9_2}, + {0, C8_1, C7_1, C9_1}, + + {0, C3_10, C1_9, C4_10}, // 19 + {0, C2_10, C1_10, C4_11}, + {0, C2_11, C1_11, C3_11}, + {0, C2_12, C1_12, C3_12}, + {0, C2_13, C1_13, C3_13}, + {0, C2_14, C1_14, C3_14}, + {0, C2_15, C1_15, C3_15}, + {0, C2_16, C1_16, C3_16}, + {0, C3_9, C2_9, C4_9}, + + {0, C7_16, C6_16, C8_16}, // 28 + {0, C7_15, C6_15, C9_16}, + {0, C8_15, C6_14, C9_15}, + {0, C8_10, C7_10, C9_10}, + {0, C8_9, C7_9, C9_9}, + {0, C8_11, C7_11, C9_11}, + {0, C8_12, C7_12, C9_12}, + {0, C8_13, C7_13, C9_13}, + {0, C8_14, C7_14, C9_14}, + + {1, C3_2, C1_1, C4_2}, // 1 + {1, C2_2, C1_2, C4_3}, + {1, C2_3, C1_3, C3_3}, + {1, C2_4, C1_4, C3_4}, + {1, C2_5, C1_5, C3_5}, + {1, C2_6, C1_6, C3_6}, + {1, C2_7, C1_7, C3_7}, + {1, C2_8, C1_8, C3_8}, + {1, C3_1, C2_1, C4_1}, + + {1, C7_8, C6_8, C8_8}, // 10 + {1, C7_7, C6_7, C9_8}, + {1, C8_7, C6_6, C9_7}, + {1, C8_6, C7_6, C9_6}, + {1, C8_5, C7_5, C9_5}, + {1, C8_4, C7_4, C9_4}, + {1, C8_3, C7_3, C9_3}, + {1, C8_2, C7_2, C9_2}, + {1, C8_1, C7_1, C9_1}, + + {1, C3_10, C1_9, C4_10}, // 19 + {1, C2_10, C1_10, C4_11}, + {1, C2_11, C1_11, C3_11}, + {1, C2_12, C1_12, C3_12}, + {1, C2_13, C1_13, C3_13}, + {1, C2_14, C1_14, C3_14}, + {1, C2_15, C1_15, C3_15}, + {1, C2_16, C1_16, C3_16}, + {1, C3_9, C2_9, C4_9}, + + {1, C7_16, C6_16, C8_16}, // 28 + {1, C7_15, C6_15, C9_16}, + {1, C8_15, C6_14, C9_15}, + {1, C8_10, C7_10, C9_10}, + {1, C8_9, C7_9, C9_9}, + {1, C8_11, C7_11, C9_11}, + {1, C8_12, C7_12, C9_12}, + {1, C8_13, C7_13, C9_13}, + {1, C8_14, C7_14, C9_14}, + +}; + +led_config_t g_led_config = { { + { 0, 5, 10, 15, 20, 25, 29 }, + { 1, 6, 11, 16, 21, 26, 30 }, + { 2, 7, 12, 17, 22, 27, 31 }, + { 3, 8, 13, 18, 23, 28, NO_LED }, + { 4, 9, 14, 19, 24, NO_LED, NO_LED }, + { 32, 33, 34, 35, NO_LED, NO_LED, NO_LED }, + { 65, 61, 56, 51, 46, 41, 36 }, + { 66, 62, 57, 52, 47, 42, 37 }, + { 67, 63, 58, 53, 48, 43, 38 }, + { NO_LED, 64, 59, 54, 49, 44, 39 }, + { NO_LED, NO_LED, 60, 55, 50, 45, 40 }, + { NO_LED, NO_LED, NO_LED, 71, 70, 69, 68 }, +}, { + { 0, 0 }, { 0, 12 }, { 0, 25 }, { 0, 38 }, { 0, 51 }, + { 17, 0 }, { 17, 12 }, { 17, 25 }, { 17, 38 }, { 17, 51 }, + { 34, 0 }, { 34, 12 }, { 34, 25 }, { 34, 38 }, { 34, 51 }, + { 51, 0 }, { 51, 12 }, { 51, 25 }, { 51, 38 }, { 51, 51 }, + { 68, 0 }, { 68, 12 }, { 68, 25 }, { 68, 38 }, { 68, 51 }, + { 86, 0 }, { 86, 12 }, { 86, 25 }, { 86, 38 }, + { 105, 0 }, { 105, 12 }, { 105, 25 }, + { 90, 55 }, { 105, 68 }, { 116, 86 }, { 116, 59 }, + + { 250, 0 }, { 250, 12 }, { 250, 25 }, { 250, 38 }, { 250, 51 }, + { 233, 0 }, { 233, 12 }, { 233, 25 }, { 233, 38 }, { 233, 51 }, + { 216, 0 }, { 216, 12 }, { 216, 25 }, { 216, 38 }, { 216, 51 }, + { 198, 0 }, { 198, 12 }, { 198, 25 }, { 198, 38 }, { 198, 51 }, + { 181, 0 }, { 181, 12 }, { 181, 25 }, { 181, 38 }, { 181, 51 }, + { 163, 0 }, { 163, 12 }, { 163, 25 }, { 163, 38 }, + { 146, 0 }, { 146, 12 }, { 146, 25 }, + { 161, 55 }, { 161, 68 }, { 146, 86 }, { 131, 59 } + +}, { + 1, 1, 1, 1, 1, 4, + 4, 4, 4, 1, 4, 4, + 4, 4, 1, 4, 4, 4, + 4, 1, 4, 4, 4, 4, + 1, 4, 4, 4, 4, 4, + 4, 4, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 4, + 4, 4, 4, 1, 4, 4, + 4, 4, 1, 4, 4, 4, + 4, 1, 4, 4, 4, 4, + 1, 4, 4, 4, 4, 4, + 4, 4, 1, 1, 1, 1 +} }; +// clang-format on + +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(); +} +#endif + +#ifdef AUDIO_ENABLE +bool music_mask_kb(uint16_t keycode) { + switch (keycode) { + case QK_LAYER_TAP ... QK_ONE_SHOT_LAYER_MAX: + case QK_LAYER_TAP_TOGGLE ... QK_LAYER_MOD_MAX: + case QK_MOD_TAP ... QK_MOD_TAP_MAX: + case AU_ON ... MUV_DE: + case RESET: + case EEP_RST: + return false; + default: + return music_mask_user(keycode); + } +} +#endif + +#ifdef SWAP_HANDS_ENABLE +// swap-hands action needs a matrix to define the swap +// clang-format off +const keypos_t hand_swap_config[MATRIX_ROWS][MATRIX_COLS] = { + /* Left hand, matrix positions */ + {{6,6}, {5,6}, {4,6}, {3,6}, {2,6}, {1,6},{0,6}}, + {{6,7}, {5,7}, {4,7}, {3,7}, {2,7}, {1,7},{0,7}}, + {{6,8}, {5,8}, {4,8}, {3,8}, {2,8}, {1,8},{0,8}}, + {{6,9}, {5,9}, {4,9}, {3,9}, {2,9}, {1,9},{0,9}}, + {{6,10},{5,10},{4,10},{3,10},{2,10},{1,10},{0,10}}, + {{6,11},{5,11},{4,11},{3,11},{2,11},{1,11},{0,11}}, + /* Right hand, matrix positions */ + {{6,0}, {5,0}, {4,0}, {3,0}, {2,0}, {1,0},{0,0}}, + {{6,1}, {5,1}, {4,1}, {3,1}, {2,1}, {1,1},{0,1}}, + {{6,2}, {5,2}, {4,2}, {3,2}, {2,2}, {1,2},{0,2}}, + {{6,3}, {5,3}, {4,3}, {3,3}, {2,3}, {1,3},{0,3}}, + {{6,4}, {5,4}, {4,4}, {3,4}, {2,4}, {1,4},{0,4}}, + {{6,5}, {5,5}, {4,5}, {3,5}, {2,5}, {1,5},{0,5}}, +}; +// clang-format on + +void keyboard_post_init_kb(void) { + rgb_matrix_enable_noeeprom(); + keyboard_post_init_user(); +} +#endif + +#if defined(AUDIO_ENABLE) && defined(MUSIC_MAP) +// clang-format off +const uint8_t music_map[MATRIX_ROWS][MATRIX_COLS] = LAYOUT_moonlander( + 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, + 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, + 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, + 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, + 8, 9, 10, 11, 12, 3, 4, 13, 14, 15, 16, 17, + 0, 1, 2, 5, 6, 7 +); +// clang-format on +#endif + +#ifdef ORYX_CONFIGURATOR +bool process_record_kb(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { +#ifdef WEBUSB_ENABLE + case WEBUSB_PAIR: + if (!record->event.pressed && !webusb_state.pairing) layer_state_set_kb(layer_state); + break; +#endif +#ifdef RGB_MATRIX_ENABLE + case TOGGLE_LAYER_COLOR: + if (record->event.pressed) { + keyboard_config.disable_layer_led ^= 1; + if (keyboard_config.disable_layer_led) rgb_matrix_set_color_all(0, 0, 0); + eeconfig_update_kb(keyboard_config.raw); + } + break; + case RGB_TOG: + if (record->event.pressed) { + switch (rgb_matrix_get_flags()) { + case LED_FLAG_ALL: { + rgb_matrix_set_flags(LED_FLAG_NONE); + keyboard_config.rgb_matrix_enable = false; + rgb_matrix_set_color_all(0, 0, 0); + } break; + default: { + rgb_matrix_set_flags(LED_FLAG_ALL); + keyboard_config.rgb_matrix_enable = true; + } break; + } + eeconfig_update_kb(keyboard_config.raw); + } + return false; +#endif + } + return process_record_user(keycode, record); +} + +#endif + +void matrix_init_kb(void) { + keyboard_config.raw = eeconfig_read_kb(); + +#ifdef RGB_MATRIX_ENABLE + if (keyboard_config.rgb_matrix_enable) { + rgb_matrix_set_flags(LED_FLAG_ALL); + } else { + rgb_matrix_set_flags(LED_FLAG_NONE); + } +#endif +} + +void eeconfig_init_kb(void) { // EEPROM is getting reset! + keyboard_config.raw = 0; + keyboard_config.rgb_matrix_enable = true; + eeconfig_update_kb(keyboard_config.raw); + eeconfig_init_user(); +} diff --git a/keyboards/moonlander/moonlander.h b/keyboards/moonlander/moonlander.h new file mode 100644 index 000000000000..0e2dc880e982 --- /dev/null +++ b/keyboards/moonlander/moonlander.h @@ -0,0 +1,81 @@ +/* Copyright 2020 ZSA Technology Labs, Inc <@zsa> + * Copyright 2020 Jack Humbert + * Copyright 2020 Drashna Jael're + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License 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" + +extern bool mcp23018_leds[]; + +#define MCP23018_DEFAULT_ADDRESS 0b0100000 + +#define ML_LED_1(status) writePin(B5, (bool)status) +#define ML_LED_2(status) writePin(B4, (bool)status) +#define ML_LED_3(status) writePin(B3, (bool)status) + +#define ML_LED_4(status) mcp23018_leds[0] = (bool)status +#define ML_LED_5(status) mcp23018_leds[1] = (bool)status +#define ML_LED_6(status) mcp23018_leds[2] = (bool)status + + +// clang-format off +#define LAYOUT_moonlander( \ + k00, k01, k02, k03, k04, k05, k06, k60, k61, k62, k63, k64, k65, k66, \ + k10, k11, k12, k13, k14, k15, k16, k70, k71, k72, k73, k74, k75, k76, \ + k20, k21, k22, k23, k24, k25, k26, k80, k81, k82, k83, k84, k85, k86, \ + k30, k31, k32, k33, k34, k35, k91, k92, k93, k94, k95, k96, \ + k40, k41, k42, k43, k44, k53, kb3, ka2, ka3, ka4, ka5, ka6, \ + k50, k51, k52, kb4, kb5, kb6 \ +) \ +{ \ + { k00, k01, k02, k03, k04, k05, k06 }, \ + { k10, k11, k12, k13, k14, k15, k16 }, \ + { k20, k21, k22, k23, k24, k25, k26 }, \ + { k30, k31, k32, k33, k34, k35, KC_NO }, \ + { k40, k41, k42, k43, k44, KC_NO, KC_NO }, \ + { k50, k51, k52, k53, KC_NO, KC_NO, KC_NO }, \ +\ + { k60, k61, k62, k63, k64, k65, k66 }, \ + { k70, k71, k72, k73, k74, k75, k76 }, \ + { k80, k81, k82, k83, k84, k85, k86 }, \ + { KC_NO,k91, k92, k93, k94, k95, k96 }, \ + { KC_NO, KC_NO, ka2, ka3, ka4, ka5, ka6 }, \ + { KC_NO, KC_NO, KC_NO, kb3, kb4, kb5, kb6 } \ +} +// clang-format on + +enum planck_ez_keycodes { + TOGGLE_LAYER_COLOR = SAFE_RANGE, + ML_SAFE_RANGE, +}; + +#ifndef WEBUSB_ENABLE +# define WEBUSB_PAIR KC_NO +#endif + +typedef union { + uint32_t raw; + struct { + bool disable_layer_led :1; + bool rgb_matrix_enable :1; + }; +} keyboard_config_t; + +extern keyboard_config_t keyboard_config; diff --git a/keyboards/moonlander/readme.md b/keyboards/moonlander/readme.md new file mode 100644 index 000000000000..7ddfdb84a712 --- /dev/null +++ b/keyboards/moonlander/readme.md @@ -0,0 +1,28 @@ +# Moonlander + +![Moonlander](https://zsa.io/static/gallery-white-case-7a2ef555f8f7f4ce1b9030477b16e517.png) + +A next-gen split, ergonomic keyboard with an active left side, USB type C, integrated wrist rest, and a thumb cluster that can move. + + +* Keyboard Maintainer: [drashna](https://github.com/drashna), [ZSA](https://github.com/zsa/) +* Hardware Supported: Moonlander MK 1 (STM32F303xC) +* Hardware Availability: [ZSA Store](https://zsa.io/moonlander/) + +Make example for this keyboard (after setting up your build environment): + + make moonlander:default + +Flashing example for this keyboard: + + make moonlander: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). + +## Oryx Configuation + +If you're using the Smart LED (layer indication) feature from the Oryx Configurator, you want to make sure that you enable these options by adding `#define ORYX_CONFIGURATOR` to your keymap's `config.h`. + +This changes the `RGB_TOG` keycode so that it will toggle the lights on and off, in a way that will allow the Smart LEDs to continue to work, even with the rest of the LEDs turned off. + +Additionally, a new keycode has been added to toggle the Smart LEDs. Use `TOGGLE_LAYER_COLOR`, if you aren't already. diff --git a/keyboards/moonlander/rules.mk b/keyboards/moonlander/rules.mk new file mode 100644 index 000000000000..63e91fabb84f --- /dev/null +++ b/keyboards/moonlander/rules.mk @@ -0,0 +1,29 @@ +# MCU name +MCU = STM32F303 + +# 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 = yes # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +BLUETOOTH_ENABLE = no # Enable Bluetooth +AUDIO_ENABLE = yes # Audio output +CUSTOM_MATRIX = yes +DEBOUNCE_TYPE = custom +SWAP_HANDS_ENABLE = yes +RGB_MATRIX_ENABLE = IS31FL3731 +#SERIAL_LINK_ENABLE = yes +EEPROM_DRIVER = i2c + +#project specific files +SRC += matrix.c +QUANTUM_LIB_SRC += i2c_master.c From cf4b493c247c1e4f02f10cf62bc499ce2d001380 Mon Sep 17 00:00:00 2001 From: cBachoo Date: Sat, 22 Aug 2020 15:40:55 -0400 Subject: [PATCH 623/930] [Keyboard] Nemui (#10020) * added nemui layout * via support working * added license headers for c and h files * Update keyboards/nemui/keymaps/via/rules.mk * Update keyboards/nemui/nemui.c * Update keyboards/nemui/config.h * Update keyboards/nemui/readme.md * Update keyboards/nemui/rules.mk * removed nemui.json as it was supposed to only be in via repo * Update keyboards/nemui/keymaps/default/keymap.c * Update keyboards/nemui/info.json * Update keyboards/nemui/info.json * Update keyboards/nemui/keymaps/via/keymap.c * Update keyboards/nemui/keymaps/via/keymap.c --- keyboards/nemui/chconf.h | 714 +++++++++++++++++++++++ keyboards/nemui/config.h | 61 ++ keyboards/nemui/halconf.h | 525 +++++++++++++++++ keyboards/nemui/info.json | 290 +++++++++ keyboards/nemui/keymaps/default/keymap.c | 31 + keyboards/nemui/keymaps/via/keymap.c | 43 ++ keyboards/nemui/keymaps/via/rules.mk | 1 + keyboards/nemui/mcuconf.h | 176 ++++++ keyboards/nemui/nemui.c | 16 + keyboards/nemui/nemui.h | 34 ++ keyboards/nemui/readme.md | 19 + keyboards/nemui/rules.mk | 22 + 12 files changed, 1932 insertions(+) create mode 100644 keyboards/nemui/chconf.h create mode 100644 keyboards/nemui/config.h create mode 100644 keyboards/nemui/halconf.h create mode 100644 keyboards/nemui/info.json create mode 100644 keyboards/nemui/keymaps/default/keymap.c create mode 100644 keyboards/nemui/keymaps/via/keymap.c create mode 100644 keyboards/nemui/keymaps/via/rules.mk create mode 100644 keyboards/nemui/mcuconf.h create mode 100644 keyboards/nemui/nemui.c create mode 100644 keyboards/nemui/nemui.h create mode 100644 keyboards/nemui/readme.md create mode 100644 keyboards/nemui/rules.mk diff --git a/keyboards/nemui/chconf.h b/keyboards/nemui/chconf.h new file mode 100644 index 000000000000..03f63da36a88 --- /dev/null +++ b/keyboards/nemui/chconf.h @@ -0,0 +1,714 @@ +/* + 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. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +/** + * @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. + * + * @addtogroup config + * @details Kernel related settings and hooks. + * @{ + */ + +#ifndef CHCONF_H +#define CHCONF_H + +#define _CHIBIOS_RT_CONF_ +#define _CHIBIOS_RT_CONF_VER_6_0_ + +/*===========================================================================*/ +/** + * @name System timers settings + * @{ + */ +/*===========================================================================*/ + +/** + * @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. + * @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. + */ +#if !defined(CH_CFG_ST_TIMEDELTA) +#define CH_CFG_ST_TIMEDELTA 2 +#endif + +/** @} */ + +/*===========================================================================*/ +/** + * @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. + */ +#if !defined(CH_CFG_TIME_QUANTUM) +#define CH_CFG_TIME_QUANTUM 0 +#endif + +/** + * @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. + */ +#if !defined(CH_CFG_MEMCORE_SIZE) +#define CH_CFG_MEMCORE_SIZE 0 +#endif + +/** + * @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. + */ +#if !defined(CH_CFG_NO_IDLE_THREAD) +#define CH_CFG_NO_IDLE_THREAD FALSE +#endif + +/** @} */ + +/*===========================================================================*/ +/** + * @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. + */ +#if !defined(CH_CFG_OPTIMIZE_SPEED) +#define CH_CFG_OPTIMIZE_SPEED FALSE +#endif + +/** @} */ + +/*===========================================================================*/ +/** + * @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. + */ +#if !defined(CH_CFG_USE_TM) +#define CH_CFG_USE_TM FALSE +#endif + +/** + * @brief Threads registry APIs. + * @details If enabled then the registry APIs are included in the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_REGISTRY) +#define CH_CFG_USE_REGISTRY TRUE +#endif + +/** + * @brief Threads synchronization APIs. + * @details If enabled then the @p chThdWait() function is included in + * the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_WAITEXIT) +#define CH_CFG_USE_WAITEXIT TRUE +#endif + +/** + * @brief Semaphores APIs. + * @details If enabled then the Semaphores APIs are included in the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_SEMAPHORES) +#define CH_CFG_USE_SEMAPHORES TRUE +#endif + +/** + * @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. + */ +#if !defined(CH_CFG_USE_SEMAPHORES_PRIORITY) +#define CH_CFG_USE_SEMAPHORES_PRIORITY FALSE +#endif + +/** + * @brief Mutexes APIs. + * @details If enabled then the mutexes APIs are included in the kernel. + * + * @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. + * @note Recursive mutexes are heavier and have an increased + * memory footprint. + * + * @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. + * @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. + */ +#if !defined(CH_CFG_USE_CONDVARS) +#define CH_CFG_USE_CONDVARS TRUE +#endif + +/** + * @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. + */ +#if !defined(CH_CFG_USE_CONDVARS_TIMEOUT) +#define CH_CFG_USE_CONDVARS_TIMEOUT FALSE +#endif + +/** + * @brief Events Flags APIs. + * @details If enabled then the event flags APIs are included in the kernel. + * + * @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. + * @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. + */ +#if !defined(CH_CFG_USE_EVENTS_TIMEOUT) +#define CH_CFG_USE_EVENTS_TIMEOUT TRUE +#endif + +/** + * @brief Synchronous Messages APIs. + * @details If enabled then the synchronous messages APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_MESSAGES) +#define CH_CFG_USE_MESSAGES TRUE +#endif + +/** + * @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. + */ +#if !defined(CH_CFG_USE_MESSAGES_PRIORITY) +#define CH_CFG_USE_MESSAGES_PRIORITY FALSE +#endif + +/** + * @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. + */ +#if !defined(CH_CFG_USE_MAILBOXES) +#define CH_CFG_USE_MAILBOXES TRUE +#endif + +/** + * @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. + */ +#if !defined(CH_CFG_USE_MEMCORE) +#define CH_CFG_USE_MEMCORE TRUE +#endif + +/** + * @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. + */ +#if !defined(CH_CFG_USE_HEAP) +#define CH_CFG_USE_HEAP FALSE +#endif + +/** + * @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. + */ +#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. + * @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. + */ +#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 + +/** @} */ + +/*===========================================================================*/ +/** + * @name Debug options + * @{ + */ +/*===========================================================================*/ + +/** + * @brief Debug option, kernel statistics. + * + * @note The default is @p FALSE. + */ +#if !defined(CH_DBG_STATISTICS) +#define CH_DBG_STATISTICS FALSE +#endif + +/** + * @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. + */ +#if !defined(CH_DBG_SYSTEM_STATE_CHECK) +#define CH_DBG_SYSTEM_STATE_CHECK FALSE +#endif + +/** + * @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. + */ +#if !defined(CH_DBG_ENABLE_CHECKS) +#define CH_DBG_ENABLE_CHECKS FALSE +#endif + +/** + * @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. + */ +#if !defined(CH_DBG_ENABLE_ASSERTS) +#define CH_DBG_ENABLE_ASSERTS FALSE +#endif + +/** + * @brief Debug option, trace buffer. + * @details If enabled then the trace buffer is activated. + * + * @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. + * @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. + */ +#if !defined(CH_DBG_ENABLE_STACK_CHECK) +#define CH_DBG_ENABLE_STACK_CHECK FALSE +#endif + +/** + * @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. + */ +#if !defined(CH_DBG_FILL_THREADS) +#define CH_DBG_FILL_THREADS FALSE +#endif + +/** + * @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. + */ +#if !defined(CH_DBG_THREADS_PROFILING) +#define CH_DBG_THREADS_PROFILING FALSE +#endif + +/** @} */ + +/*===========================================================================*/ +/** + * @name Kernel hooks + * @{ + */ +/*===========================================================================*/ + +/** + * @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. + */ +#define CH_CFG_THREAD_EXTRA_FIELDS \ + /* Add threads custom fields here.*/ + +/** + * @brief Threads initialization hook. + * @details User initialization code added to the @p _thread_init() function. + * + * @note It is invoked from within @p _thread_init() 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/nemui/config.h b/keyboards/nemui/config.h new file mode 100644 index 000000000000..e2c3827a5f91 --- /dev/null +++ b/keyboards/nemui/config.h @@ -0,0 +1,61 @@ + +/* Copyright 2020 Bachoo + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License 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 0x6400 +#define PRODUCT_ID 0x2371 +#define DEVICE_VER 0x0001 +#define MANUFACTURER Bachoo +#define PRODUCT Nemui + +/* key matrix size */ +#define MATRIX_ROWS 5 +#define MATRIX_COLS 15 + +#define MATRIX_COL_PINS { B2, B1, B0, B10, B11, A7, B12, B13, B14, A10, A9, A8, B7, B8, B9 } +#define MATRIX_ROW_PINS { A3, A4, A5, A6, A2 } +#define DIODE_DIRECTION COL2ROW + +/* 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/nemui/halconf.h b/keyboards/nemui/halconf.h new file mode 100644 index 000000000000..adb1a907154b --- /dev/null +++ b/keyboards/nemui/halconf.h @@ -0,0 +1,525 @@ +/* + 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. + 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 + +#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 +#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 cryptographic subsystem. + */ +#if !defined(HAL_USE_CRY) || defined(__DOXYGEN__) +#define HAL_USE_CRY FALSE +#endif + +/** + * @brief Enables the DAC subsystem. + */ +#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 +#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 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 +#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 +#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 + +/** + * @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. */ +/*===========================================================================*/ + +/** + * @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 + +/** + * @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. */ +/*===========================================================================*/ + +/** + * @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 the zero-copy API. + */ +#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 + +/** + * @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. */ +/*===========================================================================*/ + +/** + * @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 16 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 256 bytes for both the transmission and receive + * buffers. + */ +#if !defined(SERIAL_USB_BUFFERS_SIZE) || defined(__DOXYGEN__) +#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 + +/*===========================================================================*/ +/* 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 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 +#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. */ +/*===========================================================================*/ + +/** + * @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 + +/*===========================================================================*/ +/* 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/nemui/info.json b/keyboards/nemui/info.json new file mode 100644 index 000000000000..867b55f3ad4d --- /dev/null +++ b/keyboards/nemui/info.json @@ -0,0 +1,290 @@ +{ + "keyboard_name": "nemui", + "url": "", + "maintainer": "qmk", + "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, + "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": 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, + "w": 1.25 + }, + { + "x": 11.25, + "y": 4, + "w": 1.25 + }, + { + "x": 13, + "y": 4 + }, + { + "x": 14, + "y": 4 + }, + { + "x": 15, + "y": 4 + } + ] +} +} +} diff --git a/keyboards/nemui/keymaps/default/keymap.c b/keyboards/nemui/keymaps/default/keymap.c new file mode 100644 index 000000000000..400e75961211 --- /dev/null +++ b/keyboards/nemui/keymaps/default/keymap.c @@ -0,0 +1,31 @@ +/* Copyright 2020 Bachoo + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public 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_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( + 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_TRNS, 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_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, KC_TRNS, 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/nemui/keymaps/via/keymap.c b/keyboards/nemui/keymaps/via/keymap.c new file mode 100644 index 000000000000..e703a177e866 --- /dev/null +++ b/keyboards/nemui/keymaps/via/keymap.c @@ -0,0 +1,43 @@ + /* Copyright 2020 Bachoo + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public 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_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( + 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_TRNS, 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_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, KC_TRNS, 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), + [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), + }; diff --git a/keyboards/nemui/keymaps/via/rules.mk b/keyboards/nemui/keymaps/via/rules.mk new file mode 100644 index 000000000000..1e5b99807cb7 --- /dev/null +++ b/keyboards/nemui/keymaps/via/rules.mk @@ -0,0 +1 @@ +VIA_ENABLE = yes diff --git a/keyboards/nemui/mcuconf.h b/keyboards/nemui/mcuconf.h new file mode 100644 index 000000000000..048eb4df650d --- /dev/null +++ b/keyboards/nemui/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/nemui/nemui.c b/keyboards/nemui/nemui.c new file mode 100644 index 000000000000..cdfebb05550a --- /dev/null +++ b/keyboards/nemui/nemui.c @@ -0,0 +1,16 @@ + /* Copyright 2020 Bachoo + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#include "nemui.h" diff --git a/keyboards/nemui/nemui.h b/keyboards/nemui/nemui.h new file mode 100644 index 000000000000..b48c6eab724f --- /dev/null +++ b/keyboards/nemui/nemui.h @@ -0,0 +1,34 @@ + /* Copyright 2020 Bachoo + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License 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 + +#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, k1e, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2e, \ + k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3e, \ + k40, k41, k42, k45, k49, k4a, k4b, k4c, k4e \ +){ \ + { 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 }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, ___, k2e }, \ + { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, ___, k3e }, \ + { k40, k41, k42, ___, ___, k45, ___, ___, ___, k49, k4a, k4b, k4c, ___, k4e } \ +} diff --git a/keyboards/nemui/readme.md b/keyboards/nemui/readme.md new file mode 100644 index 000000000000..1470a5e2a8d2 --- /dev/null +++ b/keyboards/nemui/readme.md @@ -0,0 +1,19 @@ +# Nemui + + + +The Nemui is a okayish 65% keyboard. + +* Keyboard Maintainer: [Bachoo](https://github.com/cBachoo/) +* Hardware Supported: The Nemui PCB and kit. +* Hardware Availability: TBD + +Make example for this keyboard (after setting up your build environment): + + make nemui:default + +Flashing example for this keyboard: + + make nemui: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). diff --git a/keyboards/nemui/rules.mk b/keyboards/nemui/rules.mk new file mode 100644 index 000000000000..109141ebbee8 --- /dev/null +++ b/keyboards/nemui/rules.mk @@ -0,0 +1,22 @@ +# 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 = no # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +BLUETOOTH_ENABLE = no # Enable Bluetooth +AUDIO_ENABLE = no # Audio output + +# Enter lower-power sleep mode when on the ChibiOS idle thread +OPT_DEFS += -DCORTEX_ENABLE_WFI_IDLE=TRUE From e02f4798f97f7432e8df55846f8eb496b6ac45d1 Mon Sep 17 00:00:00 2001 From: myoung34 Date: Sat, 22 Aug 2020 14:59:24 -0500 Subject: [PATCH 624/930] [Keyboard] Pterodactyl handwired (#9884) * Working bluetooth fork of dactyl * Refactor thanks to zvecr * Final refactor per PR comments * Pragma once * Update keyboards/handwired/pterodactyl/pterodactyl.h * Update keyboards/handwired/pterodactyl/readme.md * Update keyboards/handwired/pterodactyl/rules.mk * Update keyboards/handwired/pterodactyl/rules.mk * Update keyboards/handwired/pterodactyl/config.h * Update keyboards/handwired/pterodactyl/pterodactyl.h * Update keyboards/handwired/pterodactyl/config.h * Update keyboards/handwired/pterodactyl/pterodactyl.h * update readme * Update keyboards/handwired/pterodactyl/keymaps/default/keymap.c * Update keyboards/handwired/pterodactyl/info.json * Update keyboards/handwired/pterodactyl/readme.md * Update keyboards/handwired/pterodactyl/config.h * Update keyboards/handwired/pterodactyl/info.json * Update keyboards/handwired/pterodactyl/keymaps/default/keymap.c * Update keyboards/handwired/pterodactyl/keymaps/default/keymap.c * Update keyboards/handwired/pterodactyl/keymaps/default/keymap.c * Update keyboards/handwired/pterodactyl/keymaps/default/keymap.c * Update keyboards/handwired/pterodactyl/pterodactyl.h * Update keyboards/handwired/pterodactyl/keymaps/default/keymap.c * Update keyboards/handwired/pterodactyl/matrix.c * Fix/add formatting and info/keymap.json * Update keyboards/handwired/pterodactyl/keymaps/default/keymap.json * lint default/keymap.json * format info.json --- keyboards/handwired/pterodactyl/config.h | 66 +++ keyboards/handwired/pterodactyl/info.json | 98 ++++ .../pterodactyl/keymaps/default/keymap.c | 112 ++++ .../pterodactyl/keymaps/default/keymap.json | 43 ++ .../pterodactyl/keymaps/default/readme.md | 14 + keyboards/handwired/pterodactyl/matrix.c | 527 ++++++++++++++++++ keyboards/handwired/pterodactyl/pterodactyl.c | 14 + keyboards/handwired/pterodactyl/pterodactyl.h | 38 ++ keyboards/handwired/pterodactyl/readme.md | 21 + keyboards/handwired/pterodactyl/rules.mk | 31 ++ 10 files changed, 964 insertions(+) create mode 100644 keyboards/handwired/pterodactyl/config.h create mode 100644 keyboards/handwired/pterodactyl/info.json create mode 100644 keyboards/handwired/pterodactyl/keymaps/default/keymap.c create mode 100644 keyboards/handwired/pterodactyl/keymaps/default/keymap.json create mode 100644 keyboards/handwired/pterodactyl/keymaps/default/readme.md create mode 100644 keyboards/handwired/pterodactyl/matrix.c create mode 100644 keyboards/handwired/pterodactyl/pterodactyl.c create mode 100644 keyboards/handwired/pterodactyl/pterodactyl.h create mode 100644 keyboards/handwired/pterodactyl/readme.md create mode 100644 keyboards/handwired/pterodactyl/rules.mk diff --git a/keyboards/handwired/pterodactyl/config.h b/keyboards/handwired/pterodactyl/config.h new file mode 100644 index 000000000000..9f5f1412b8c5 --- /dev/null +++ b/keyboards/handwired/pterodactyl/config.h @@ -0,0 +1,66 @@ +/* +Copyright 2012 Jun Wako +Copyright 2013 Oleg Kostyuk +Copyright 2017 Erin Call +Copyright 2020 Marcus Young + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License 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 0x1308 +#define DEVICE_VER 0x0002 +#define MANUFACTURER myoung34 +#define PRODUCT Pterodactyl + +#define DIODE_DIRECTION COL2ROW +#define MATRIX_ROWS 6 +#define MATRIX_COLS 12 +#define COL_EXPANDED { true, true, true, true, true, true, false, false, false, false, false, false} +#define MATRIX_ONBOARD_ROW_PINS { F7, F6, F5, F4, F1, F0 } +#define MATRIX_ONBOARD_COL_PINS { 0, 0, 0, 0, 0, 0, B6, B7, D6, D2, D3, C6 } +#define EXPANDER_COL_REGISTER GPIOB +#define EXPANDER_ROW_REGISTER GPIOA +#define MATRIX_EXPANDER_COL_PINS {0, 1, 2, 3, 4, 5} +#define MATRIX_EXPANDER_ROW_PINS {0, 1, 2, 3, 4, 5} + +#define MOUSEKEY_INTERVAL 20 +#define MOUSEKEY_DELAY 0 +#define MOUSEKEY_TIME_TO_MAX 60 +#define MOUSEKEY_MAX_SPEED 7 +#define MOUSEKEY_WHEEL_DELAY 0 + +#define TAPPING_TOGGLE 1 + +#define IGNORE_MOD_TAP_INTERRUPT // 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.) + +/* key combination for command */ +#define IS_COMMAND() ( \ + get_mods() == (MOD_BIT(KC_LCTL) | MOD_BIT(KC_RCTL)) || \ + get_mods() == (MOD_BIT(KC_LSFT) | MOD_BIT(KC_RSFT)) \ +) + +/* fix space cadet rollover issue */ +#define DISABLE_SPACE_CADET_ROLLOVER + +/* Set 0 if debouncing isn't needed */ +#define DEBOUNCE 0 + +#define AdafruitBleResetPin D4 +#define AdafruitBleCSPin B4 +#define AdafruitBleIRQPin E6 diff --git a/keyboards/handwired/pterodactyl/info.json b/keyboards/handwired/pterodactyl/info.json new file mode 100644 index 000000000000..5de1d369c82e --- /dev/null +++ b/keyboards/handwired/pterodactyl/info.json @@ -0,0 +1,98 @@ +{ + "keyboard_name": "Pterodactyl", + "url": "https://marcyoung.us/post/pterodactyl/", + "maintainer": "Marcus Young", + "width": 17, + "height": 8, + "layouts": { + "LAYOUT_pterodactyl": { + "key_count": 70, + "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":11, "y":0}, + {"x":12, "y":0}, + {"x":13, "y":0}, + {"x":14, "y":0}, + {"x":15, "y":0}, + {"x":16, "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":11, "y":1}, + {"x":12, "y":1}, + {"x":13, "y":1}, + {"x":14, "y":1}, + {"x":15, "y":1}, + {"x":16, "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":11, "y":2}, + {"x":12, "y":2}, + {"x":13, "y":2}, + {"x":14, "y":2}, + {"x":15, "y":2}, + {"x":16, "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":11, "y":3}, + {"x":12, "y":3}, + {"x":13, "y":3}, + {"x":14, "y":3}, + {"x":15, "y":3}, + {"x":16, "y":3}, + + {"x":0, "y":4}, + {"x":1, "y":4}, + {"x":2, "y":4}, + {"x":3, "y":4}, + {"x":4, "y":4}, + + {"x":12, "y":4}, + {"x":13, "y":4}, + {"x":14, "y":4}, + {"x":15, "y":4}, + {"x":16, "y":4}, + + {"x":6, "y":5}, + {"x":7, "y":5}, + + {"x":9, "y":5}, + {"x":10, "y":5}, + + {"x":7, "y":6}, + {"x":9, "y":6}, + + {"x":5, "y":6, "h":2}, + {"x":6, "y":6, "h":2}, + {"x":7, "y":7}, + + {"x":9, "y":7}, + {"x":10, "y":6, "h":2}, + {"x":11, "y":6, "h":2} + ] + } + } +} diff --git a/keyboards/handwired/pterodactyl/keymaps/default/keymap.c b/keyboards/handwired/pterodactyl/keymaps/default/keymap.c new file mode 100644 index 000000000000..058631818da7 --- /dev/null +++ b/keyboards/handwired/pterodactyl/keymaps/default/keymap.c @@ -0,0 +1,112 @@ +#include QMK_KEYBOARD_H +#include "version.h" + +#define BASE 0 // default layer +enum +{ + _BL = 0, + _SYMB, + _MDIA, +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +/* Keymap 0: Basic layer + * + * ,-----------------------------------------. ,-----------------------------------------. + * | = | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | - | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | Del | Q | W | E | R | T | | Y | U | I | O | P | \ | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | BkSp | A | S | D | F | G | | H | J | K | L |; / L2|'/Cmd | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * |LShift|Z/Ctrl| X | C | V | B | | N | M | , | . |//Ctrl|RShift| + * |------+------+------+------+------+------' `------+------+------+------+------+------| + * |Grv/L1| '" |AltShf| Left | Right| | Up | Down | [ | ] | ~L1 | + * `----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * | App | LGui | | Alt | ^/Esc| + * ,------|------|------| |------+------+------. + * | | | Home | | PgUp | | | + * | Space|Backsp|------| |------| Tab |Enter | + * | |ace | End | | PgDn | | | + * `--------------------' `--------------------' + */ +[_BL] = LAYOUT_pterodactyl( // layer 0 : default + // left hand + KC_EQL, 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_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS, + KC_BSPC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, LT(_MDIA, KC_SCLN), GUI_T(KC_QUOT), + KC_LSFT, CTL_T(KC_Z), KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, CTL_T(KC_SLSH), KC_RSFT, + LT(_SYMB,KC_GRV), KC_QUOT, LALT(KC_LSFT), KC_LEFT, KC_RGHT, KC_UP, KC_DOWN, KC_LBRC, KC_RBRC, TT(_SYMB), + + ALT_T(KC_APP), KC_LGUI, KC_RALT, CTL_T(KC_ESC), + KC_HOME, KC_PGUP, + KC_SPC, KC_BSPC, KC_END, KC_PGDN, KC_TAB, KC_ENT +), +/* Keymap 1: Symbol Layer + * + * ,-----------------------------------------. ,-----------------------------------------. + * |Versn | F1 | F2 | F3 | F4 | F5 | | F6 | F7 | F8 | F9 | F10 | F11 | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | ! | @ | { | } | | | | Up | 7 | 8 | 9 | * | F12 | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | # | $ | ( | ) | ` | | Down | 4 | 5 | 6 | + | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | % | ^ | [ | ] | ~ | | & | 1 | 2 | 3 | \ | | + * |------+------+------+------+------+------' `------+------+------+------+------+------| + * |RESET | | | | | | | . | 0 | = | | + * `----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * | | | | | | + * ,------|------|------| |------+------+------. + * | | | | | | | | + * | | |------| |------| | | + * | | | | | | | | + * `--------------------' `--------------------' + */ +// SYMBOLS +[_SYMB] = LAYOUT_pterodactyl( + // left hand + 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_TRNS, KC_EXLM, KC_AT, KC_LCBR, KC_RCBR, KC_PIPE, KC_UP, KC_7, KC_8, KC_9, KC_ASTR, KC_F12, + KC_TRNS, KC_HASH, KC_DLR, KC_LPRN, KC_RPRN, KC_GRV, KC_DOWN, 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, + RESET, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_DOT, 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_TRNS, KC_TRNS, KC_TRNS +), +/* Keymap 2: Media and mouse keys + * ,-----------------------------------------. ,-----------------------------------------. + * | | | | | | | | | | | | | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | | | MsUp | | | | | | | | | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | |MsLeft|MsDown|MsRght| | | | | | | | Play | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | | | | | | | | | Prev | Next | | | + * |------+------+------+------+------+------' `------+------+------+------+------+------| + * | | | | Lclk | Rclk | | VolUp| VolDn| Mute | | | + * `----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * | | | | | | + * ,------|------|------| |------+------+------. + * | | | | | | |Brwser| + * | | |------| |------| |Back | + * | | | | | | | | + * `--------------------' `--------------------' + * + */ +// MEDIA AND MOUSE +[_MDIA] = LAYOUT_pterodactyl( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_MS_U, KC_TRNS, KC_TRNS, 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, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MPLY, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MPRV, KC_MNXT, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_BTN1, KC_BTN2, KC_VOLU, KC_VOLD, KC_MUTE, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_WBAK +), +}; diff --git a/keyboards/handwired/pterodactyl/keymaps/default/keymap.json b/keyboards/handwired/pterodactyl/keymaps/default/keymap.json new file mode 100644 index 000000000000..1a4a1fa9b17f --- /dev/null +++ b/keyboards/handwired/pterodactyl/keymaps/default/keymap.json @@ -0,0 +1,43 @@ +{ + "version": 1, + "notes": "", + "author": "Marcus Young", + "keyboard": "handwired/pterodactyl", + "keymap": "default", + "layout": "LAYOUT_pterodactyl", + "layers": [ + [ + "KC_EQL", "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_Q", "KC_W", "KC_E", "KC_R", "KC_T", "KC_Y", "KC_U", "KC_I", "KC_O", "KC_P", "KC_BSLS", + "KC_BSPC", "KC_A", "KC_S", "KC_D", "KC_F", "KC_G", "KC_H", "KC_J", "KC_K", "KC_L", "LT(2,KC_SCLN)", "LGUI_T(KC_QUOT)", + "KC_LSFT", "LCTL_T(KC_Z)", "KC_X", "KC_C", "KC_V", "KC_B", "KC_N", "KC_M", "KC_COMM", "KC_DOT", "LCTL_T(KC_SLSH)", "KC_RSFT", + "LT(1,KC_GRV)", "KC_QUOT", "LALT(KC_LSFT)", "KC_LEFT", "KC_RGHT", "KC_UP", "KC_DOWN", "KC_LBRC", "KC_RBRC", "TT(1)", + + "LALT_T(KC_APP)", "KC_LGUI", "KC_RALT", "LCTL_T(KC_ESC)", + "KC_HOME", "KC_PGUP", + "KC_SPC", "KC_BSPC", "KC_END", "KC_PGDN", "KC_TAB", "KC_ENT" + ], + [ + "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_TRNS", "KC_EXLM", "KC_AT", "KC_LCBR", "KC_RCBR", "KC_PIPE", "KC_UP", "KC_7", "KC_8", "KC_9", "KC_ASTR", "KC_F12", + "KC_TRNS", "KC_HASH", "KC_DLR", "KC_LPRN", "KC_RPRN", "KC_GRV", "KC_DOWN", "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", + "RESET", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_DOT", "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_TRNS", "KC_TRNS", "KC_TRNS" + ], + [ + "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", + "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_MS_U", "KC_TRNS", "KC_TRNS", "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", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_MPLY", + "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_MPRV", "KC_MNXT", "KC_TRNS", "KC_TRNS", + "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_BTN1", "KC_BTN2", "KC_VOLU", "KC_VOLD", "KC_MUTE", "KC_TRNS", "KC_TRNS", + + "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", + "KC_TRNS", "KC_TRNS", + "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_WBAK" + ] + ] +} diff --git a/keyboards/handwired/pterodactyl/keymaps/default/readme.md b/keyboards/handwired/pterodactyl/keymaps/default/readme.md new file mode 100644 index 000000000000..876416f0023e --- /dev/null +++ b/keyboards/handwired/pterodactyl/keymaps/default/readme.md @@ -0,0 +1,14 @@ +# Pterodactyl Default Configuration + +## Changelog + +* Nov 2017: + * Copied and adapted from the Ergodox EZ equivalent + * Notable differences: + - Don't try to have the columns that don't exist, naturally + - Removed RGB keys, since there are no RGB LEDs in the Dactyl (as designed, at least) +* May 2020: + * Copied and adapted from dactyl base + * Notable differences: + - Support for Bluetooth via default Adafruit Feather 32u4 + - Assumes processor lives in left half of split, not right diff --git a/keyboards/handwired/pterodactyl/matrix.c b/keyboards/handwired/pterodactyl/matrix.c new file mode 100644 index 000000000000..5f13cb30bbd1 --- /dev/null +++ b/keyboards/handwired/pterodactyl/matrix.c @@ -0,0 +1,527 @@ +/* +Copyright 2013 Oleg Kostyuk +Copyright 2017 Erin Call + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public 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 +#include "wait.h" +#include "action_layer.h" +#include "print.h" +#include "debug.h" +#include "util.h" +#include "matrix.h" +#include "pterodactyl.h" +#include "i2c_master.h" +#include "timer.h" + +#define I2C_TIMEOUT 100 + +#define I2C_ADDR 0b0100000 +#define I2C_ADDR_WRITE ( (I2C_ADDR<<1) | I2C_WRITE ) +#define I2C_ADDR_READ ( (I2C_ADDR<<1) | I2C_READ ) +#define IODIRA 0x00 // i/o direction register +#define IODIRB 0x01 +#define GPPUA 0x0C // GPIO pull-up resistor register +#define GPPUB 0x0D +#define GPIOA 0x12 // general purpose i/o port register (write modifies OLAT) +#define GPIOB 0x13 + +void init_expander(void); + +/* Set 0 if debouncing isn't needed */ + +#ifndef DEBOUNCE +# define DEBOUNCE 5 +#endif + +#if (DEBOUNCE > 0) + static uint16_t debouncing_time; + static bool debouncing = false; +#endif + +#ifdef MATRIX_MASKED + extern const matrix_row_t matrix_mask[]; +#endif + +#if (DIODE_DIRECTION == ROW2COL) || (DIODE_DIRECTION == COL2ROW) +static const uint8_t onboard_row_pins[MATRIX_ROWS] = MATRIX_ONBOARD_ROW_PINS; +static const uint8_t onboard_col_pins[MATRIX_COLS] = MATRIX_ONBOARD_COL_PINS; +static const bool col_expanded[MATRIX_COLS] = COL_EXPANDED; +#endif + +/* 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 const uint8_t expander_col_pins[MATRIX_COLS] = MATRIX_EXPANDER_COL_PINS; + 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 const uint8_t expander_row_pins[MATRIX_ROWS] = MATRIX_EXPANDER_ROW_PINS; + 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 select_col(uint8_t col); + static void unselect_col(uint8_t col); +#endif + +static uint8_t expander_reset_loop; +uint8_t expander_status; +uint8_t expander_input_pin_mask; +bool i2c_initialized = false; + +#define ROW_SHIFTER ((matrix_row_t)1) + +__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(); +} + +inline +uint8_t matrix_rows(void) +{ + return MATRIX_ROWS; +} + +inline +uint8_t matrix_cols(void) +{ + return MATRIX_COLS; +} + +void matrix_init(void) +{ + init_expander(); + +#if (DIODE_DIRECTION == COL2ROW) + unselect_rows(); + init_cols(); +#elif (DIODE_DIRECTION == ROW2COL) + unselect_cols(); + init_rows(); +#endif + + // 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(); +} + +void init_expander(void) { + if (! i2c_initialized) { + i2c_init(); + wait_us(1000000); + } + + if (! expander_input_pin_mask) { +#if (DIODE_DIRECTION == COL2ROW) + for (int col = 0; col < MATRIX_COLS; col++) { + if (col_expanded[col]) { + expander_input_pin_mask |= (1 << expander_col_pins[col]); + } + } +#elif (DIODE_DIRECTION == ROW2COL) + for (int row = 0; row < MATRIX_ROWS; row++) { + expander_input_pin_mask |= (1 << expander_row_pins[row]); + } +#endif + } + + expander_status = i2c_start(I2C_ADDR_WRITE, I2C_TIMEOUT); if (expander_status) goto out; + expander_status = i2c_write(IODIRA, I2C_TIMEOUT); if (expander_status) goto out; + + /* + Pin direction and pull-up depends on both the diode direction + and on whether the column register is GPIOA or GPIOB + +-------+---------------+---------------+ + | | ROW2COL | COL2ROW | + +-------+---------------+---------------+ + | GPIOA | input, output | output, input | + +-------+---------------+---------------+ + | GPIOB | output, input | input, output | + +-------+---------------+---------------+ + */ + +#if (EXPANDER_COL_REGISTER == GPIOA) +# if (DIODE_DIRECTION == COL2ROW) + expander_status = i2c_write(expander_input_pin_mask, I2C_TIMEOUT); if (expander_status) goto out; + expander_status = i2c_write(0, I2C_TIMEOUT); if (expander_status) goto out; +# elif (DIODE_DIRECTION == ROW2COL) + expander_status = i2c_write(0, I2C_TIMEOUT); if (expander_status) goto out; + expander_status = i2c_write(expander_input_pin_mask, I2C_TIMEOUT); if (expander_status) goto out; +# endif +#elif (EXPANDER_COL_REGISTER == GPIOB) +# if (DIODE_DIRECTION == COL2ROW) + expander_status = i2c_write(0, I2C_TIMEOUT); if (expander_status) goto out; + expander_status = i2c_write(expander_input_pin_mask, I2C_TIMEOUT); if (expander_status) goto out; +# elif (DIODE_DIRECTION == ROW2COL) + expander_status = i2c_write(expander_input_pin_mask, I2C_TIMEOUT); if (expander_status) goto out; + expander_status = i2c_write(0, I2C_TIMEOUT); if (expander_status) goto out; +# endif +#endif + + i2c_stop(); + + // set pull-up + // - unused : off : 0 + // - input : on : 1 + // - driving : off : 0 + expander_status = i2c_start(I2C_ADDR_WRITE, I2C_TIMEOUT); if (expander_status) goto out; + expander_status = i2c_write(GPPUA, I2C_TIMEOUT); if (expander_status) goto out; +#if (EXPANDER_COL_REGISTER == GPIOA) +# if (DIODE_DIRECTION == COL2ROW) + expander_status = i2c_write(expander_input_pin_mask, I2C_TIMEOUT); if (expander_status) goto out; + expander_status = i2c_write(0, I2C_TIMEOUT); if (expander_status) goto out; +# elif (DIODE_DIRECTION == ROW2COL) + expander_status = i2c_write(0, I2C_TIMEOUT); if (expander_status) goto out; + expander_status = i2c_write(expander_input_pin_mask, I2C_TIMEOUT); if (expander_status) goto out; +# endif +#elif (EXPANDER_COL_REGISTER == GPIOB) +# if (DIODE_DIRECTION == COL2ROW) + expander_status = i2c_write(0, I2C_TIMEOUT); if (expander_status) goto out; + expander_status = i2c_write(expander_input_pin_mask, I2C_TIMEOUT); if (expander_status) goto out; +# elif (DIODE_DIRECTION == ROW2COL) + expander_status = i2c_write(expander_input_pin_mask, I2C_TIMEOUT); if (expander_status) goto out; + expander_status = i2c_write(0, I2C_TIMEOUT); if (expander_status) goto out; +# endif +#endif + +out: + i2c_stop(); +} + +uint8_t matrix_scan(void) +{ + if (expander_status) { // if there was an error + if (++expander_reset_loop == 0) { + // since expander_reset_loop is 8 bit - we'll try to reset once in 255 matrix scans + // this will be approx bit more frequent than once per second + print("trying to reset expander\n"); + init_expander(); + if (expander_status) { + print("left side not responding\n"); + } else { + print("left side attached\n"); + } + } + } + +#if (DIODE_DIRECTION == COL2ROW) + for (uint8_t current_row = 0; current_row < MATRIX_ROWS; current_row++) { +# if (DEBOUNCE > 0) + bool matrix_changed = read_cols_on_row(matrix_debouncing, current_row); + + if (matrix_changed) { + debouncing = true; + debouncing_time = timer_read(); + } +# else + read_cols_on_row(matrix, current_row); +# endif + } + +#elif (DIODE_DIRECTION == ROW2COL) + for (uint8_t current_col = 0; current_col < MATRIX_COLS; current_col++) { +# if (DEBOUNCE > 0) + bool matrix_changed = read_rows_on_col(matrix_debouncing, current_col); + + if (matrix_changed) { + debouncing = true; + debouncing_time = timer_read(); + } +# else + read_rows_on_col(matrix, current_col); +# endif + + } +#endif + +# if (DEBOUNCE > 0) + if (debouncing && (timer_elapsed(debouncing_time) > DEBOUNCE)) { + for (uint8_t i = 0; i < MATRIX_ROWS; i++) { + matrix[i] = matrix_debouncing[i]; + } + debouncing = false; + } +# endif + + matrix_scan_quantum(); + return 1; +} + +bool matrix_is_modified(void) // deprecated and evidently not called. +{ +#if (DEBOUNCE > 0) + if (debouncing) return false; +#endif + return true; +} + +inline +bool matrix_is_on(uint8_t row, uint8_t col) +{ + return (matrix[row] & (ROW_SHIFTER << col)); +} + +inline +matrix_row_t matrix_get_row(uint8_t row) +{ +#ifdef MATRIX_MASKED + return matrix[row] & matrix_mask[row]; +#else + return matrix[row]; +#endif +} + +void matrix_print(void) +{ + print("\nr/c 0123456789ABCDEF\n"); + for (uint8_t row = 0; row < MATRIX_ROWS; row++) { + phex(row); print(": "); + pbin_reverse16(matrix_get_row(row)); + print("\n"); + } +} + +uint8_t matrix_key_count(void) +{ + uint8_t count = 0; + for (uint8_t i = 0; i < MATRIX_ROWS; i++) { + count += bitpop16(matrix[i]); + } + return count; +} + +#if (DIODE_DIRECTION == COL2ROW) + +static void init_cols(void) { + for (uint8_t x = 0; x < MATRIX_COLS; x++) { + if (! col_expanded[x]) { + uint8_t pin = onboard_col_pins[x]; + _SFR_IO8((pin >> 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 selection to stabilize + select_row(current_row); + wait_us(30); + + // Read columns from expander, unless it's in an error state + if (! expander_status) { + expander_status = i2c_start(I2C_ADDR_WRITE, I2C_TIMEOUT); if (expander_status) goto out; + expander_status = i2c_write(EXPANDER_COL_REGISTER, I2C_TIMEOUT); if (expander_status) goto out; + expander_status = i2c_start(I2C_ADDR_READ, I2C_TIMEOUT); if (expander_status) goto out; + + current_matrix[current_row] |= (~i2c_read_nack(I2C_TIMEOUT)) & expander_input_pin_mask; + + out: + i2c_stop(); + } + + // Read columns from onboard pins + for (uint8_t col_index = 0; col_index < MATRIX_COLS; col_index++) { + if (! col_expanded[col_index]) { + uint8_t pin = onboard_col_pins[col_index]; + uint8_t pin_state = (_SFR_IO8(pin >> 4) & _BV(pin & 0xF)); + current_matrix[current_row] |= pin_state ? 0 : (ROW_SHIFTER << col_index); + } + } + + unselect_row(current_row); + + return (last_row_value != current_matrix[current_row]); +} + +static void select_row(uint8_t row) { + // select on expander, unless it's in an error state + if (! expander_status) { + // set active row low : 0 + // set other rows hi-Z : 1 + expander_status = i2c_start(I2C_ADDR_WRITE, I2C_TIMEOUT); if (expander_status) goto out; + expander_status = i2c_write(EXPANDER_ROW_REGISTER, I2C_TIMEOUT); if (expander_status) goto out; + expander_status = i2c_write(0xFF & ~(1<> 4) + 1) |= _BV(pin & 0xF); // OUT + _SFR_IO8((pin >> 4) + 2) &= ~_BV(pin & 0xF); // LOW +} + +static void unselect_row(uint8_t row) +{ + // No need to explicitly unselect expander pins--their I/O state is + // set simultaneously, with a single bitmask sent to i2c_write. When + // select_row selects a single pin, it implicitly unselects all the + // other ones. + + // unselect on teensy + uint8_t pin = onboard_row_pins[row]; + _SFR_IO8((pin >> 4) + 1) &= ~_BV(pin & 0xF); // OUT + _SFR_IO8((pin >> 4) + 2) |= _BV(pin & 0xF); // LOW +} + +static void unselect_rows(void) { + for (uint8_t x = 0; x < MATRIX_ROWS; x++) { + unselect_row(x); + } +} + +#elif (DIODE_DIRECTION == ROW2COL) + +static void init_rows(void) +{ + for (uint8_t x = 0; x < MATRIX_ROWS; x++) { + uint8_t pin = onboard_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; + + uint8_t column_state = 0; + + //select col and wait for selection to stabilize + select_col(current_col); + wait_us(30); + + if (current_col < 6) { + // read rows from expander + if (expander_status) { + // it's already in an error state; nothing we can do + return false; + } + + expander_status = i2c_start(I2C_ADDR_WRITE, I2C_TIMEOUT); if (expander_status) goto out; + expander_status = i2c_write(EXPANDER_ROW_REGISTER, I2C_TIMEOUT); if (expander_status) goto out; + expander_status = i2c_start(I2C_ADDR_READ, I2C_TIMEOUT); if (expander_status) goto out; + column_state = i2c_read_nack(I2C_TIMEOUT); + + out: + i2c_stop(); + + column_state = ~column_state; + } else { + for (uint8_t current_row = 0; current_row < MATRIX_ROWS; current_row++) { + if ((_SFR_IO8(onboard_row_pins[current_row] >> 4) & _BV(onboard_row_pins[current_row] & 0xF)) == 0) { + column_state |= (1 << current_row); + } + } + } + + for (uint8_t current_row = 0; current_row < MATRIX_ROWS; current_row++) { + // Store last value of row prior to reading + matrix_row_t last_row_value = current_matrix[current_row]; + + if (column_state & (1 << current_row)) { + // key closed; set state bit in matrix + current_matrix[current_row] |= (ROW_SHIFTER << current_col); + } else { + // key open; clear state bit in matrix + current_matrix[current_row] &= ~(ROW_SHIFTER << current_col); + } + + // Determine whether the matrix changed state + if ((last_row_value != current_matrix[current_row]) && !(matrix_changed)) + { + matrix_changed = true; + } + } + + unselect_col(current_col); + + return matrix_changed; +} + +static void select_col(uint8_t col) +{ + if (col_expanded[col]) { + // select on expander + if (expander_status) { // if there was an error + // do nothing + } else { + // set active col low : 0 + // set other cols hi-Z : 1 + expander_status = i2c_start(I2C_ADDR_WRITE); if (expander_status) goto out; + expander_status = i2c_write(EXPANDER_COL_REGISTER); if (expander_status) goto out; + expander_status = i2c_write(0xFF & ~(1<> 4) + 1) |= _BV(pin & 0xF); // OUT + _SFR_IO8((pin >> 4) + 2) &= ~_BV(pin & 0xF); // LOW + } +} + +static void unselect_col(uint8_t col) +{ + if (col_expanded[col]) { + // No need to explicitly unselect expander pins--their I/O state is + // set simultaneously, with a single bitmask sent to i2c_write. When + // select_col selects a single pin, it implicitly unselects all the + // other ones. + } else { + // unselect on teensy + uint8_t pin = onboard_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++) { + unselect_col(x); + } +} +#endif diff --git a/keyboards/handwired/pterodactyl/pterodactyl.c b/keyboards/handwired/pterodactyl/pterodactyl.c new file mode 100644 index 000000000000..736b0a62c419 --- /dev/null +++ b/keyboards/handwired/pterodactyl/pterodactyl.c @@ -0,0 +1,14 @@ +#include "pterodactyl.h" + +#ifdef SWAP_HANDS_ENABLE +__attribute__ ((weak)) +// swap-hands action needs a matrix to define the swap +const keypos_t hand_swap_config[MATRIX_ROWS][MATRIX_COLS] = { + {{0,11}, {0,10}, {0,9}, {0,8}, {0,7}, {0,6}, {0,5}, {0,4}, {0,3}, {0,2}, {0,1}, {0,0}}, + {{1,11}, {1,11}, {1,9}, {1,8}, {1,7}, {1,6}, {1,5}, {1,4}, {1,3}, {1,2}, {1,1}, {1,0}}, + {{2,11}, {2,12}, {2,9}, {2,8}, {2,7}, {2,6}, {2,5}, {2,4}, {2,3}, {2,2}, {2,1}, {2,0}}, + {{3,11}, {3,13}, {3,9}, {3,8}, {3,7}, {3,6}, {3,5}, {3,4}, {3,3}, {3,2}, {3,1}, {3,0}}, + {{4,11}, {4,14}, {4,9}, {4,8}, {4,7}, {4,6}, {4,5}, {4,4}, {4,3}, {4,2}, {4,1}, {4,0}}, + {{5,11}, {5,15}, {5,9}, {5,8}, {5,7}, {5,6}, {5,5}, {5,4}, {5,3}, {5,2}, {5,1}, {5,0}}, +}; +#endif diff --git a/keyboards/handwired/pterodactyl/pterodactyl.h b/keyboards/handwired/pterodactyl/pterodactyl.h new file mode 100644 index 000000000000..7bdc3bc63df9 --- /dev/null +++ b/keyboards/handwired/pterodactyl/pterodactyl.h @@ -0,0 +1,38 @@ +#pragma once + +#include "quantum.h" +#include +#include +#include "i2c_master.h" + +/* + * LEFT HAND: LINES 38-45 + * RIGHT HAND: LINES 47-54 + */ +#define LAYOUT_pterodactyl( \ + \ + 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, \ + k40,k41,k42,k43,k44, k47,k48,k49,k4A,k4B, \ + k55,k50, k5B,k56, \ + k54, k57, \ + k53, k52,k51, k5A,k59,k58 ) \ + \ + /* matrix positions */ \ + { \ + { k0B, k0A, k09, k08, k07, k06, k05, k04, k03, k02, k01, k00 }, \ + { k1B, k1A, k19, k18, k17, k16, k15, k14, k13, k12, k11, k10 }, \ + { k2B, k2A, k29, k28, k27, k26, k25, k24, k23, k22, k21, k20 }, \ + { k3B, k3A, k39, k38, k37, k36, k35, k34, k33, k32, k31, k30 }, \ + { k4B, k4A, k49, k48, k47, k58, k53, k44, k43, k42, k41, k40 }, \ + { k56, k5B, k57, k5A, k59, KC_NO, KC_NO, k52, k51, k54, k50, k55 }, \ + } + /* for future comers: + * the weird ass ordering here is because the dactyl/ergo/etc are wired for the + * chip to be in the right side, mine is not built that way. + * that last line is not obvious but its due to the way my columns are wired + * and are different than the dactyl guide. + * this is to compensate for my build. + */ diff --git a/keyboards/handwired/pterodactyl/readme.md b/keyboards/handwired/pterodactyl/readme.md new file mode 100644 index 000000000000..3cc5e19c37f0 --- /dev/null +++ b/keyboards/handwired/pterodactyl/readme.md @@ -0,0 +1,21 @@ +# Pterodactyl + +![](https://cdn.zappy.app/65bacc35e1fbeb19ba02d42d80bddb9b.png) + +A bluetooth fork of the dactyl + +* Keyboard Maintainer: [myoung34](https://github.com/myoung34) +* Hardware Supported: + * [Feather 32u4](https://learn.adafruit.com/adafruit-feather-32u4-bluefruit-le) +* Hardware Availability: + * [Feather 32u4](https://www.amazon.com/Adafruit-Feather-32u4-Bluefruit-ADA2829/dp/B01GJR9MNI) + +Make example for this keyboard (after setting up your build environment): + + make handwired/pterodactyl:default + +Flashing example for this keyboard: + + make handwired/pterodactyl: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). diff --git a/keyboards/handwired/pterodactyl/rules.mk b/keyboards/handwired/pterodactyl/rules.mk new file mode 100644 index 000000000000..271b89606cb4 --- /dev/null +++ b/keyboards/handwired/pterodactyl/rules.mk @@ -0,0 +1,31 @@ +# MCU name +MCU = atmega32u4 + +# Processor frequency +F_CPU = 8000000 + +# Bootloader selection +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 = no # Commands for debug and configuration +# 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 +BLUETOOTH_ENABLE = no # Enable Bluetooth +AUDIO_ENABLE = no # Audio output +BLUETOOTH = AdafruitBLE +UNICODE_ENABLE = yes +CUSTOM_MATRIX = yes + +SRC += matrix.c +QUANTUM_LIB_SRC += i2c_master.c From ac3dfa742a92de541f86846b94269aab87d55d3c Mon Sep 17 00:00:00 2001 From: yulei Date: Sun, 23 Aug 2020 04:45:06 +0800 Subject: [PATCH 625/930] [Keyboard] added matrix 8xv2.0 additional (#9470) * added matrix 8xv2.0 additional keyboard * Apply suggestions from code review Co-authored-by: James Young <18669334+noroadsleft@users.noreply.github.com> * add copyright and speed up the matrix scanning * Update keyboards/matrix/m20add/rules.mk Co-authored-by: Drashna Jaelre Co-authored-by: James Young <18669334+noroadsleft@users.noreply.github.com> Co-authored-by: Drashna Jaelre --- .../matrix/m20add/boards/m20add_bd/board.c | 268 ++++ .../matrix/m20add/boards/m20add_bd/board.h | 1299 +++++++++++++++++ .../matrix/m20add/boards/m20add_bd/board.mk | 9 + keyboards/matrix/m20add/bootloader_defs.h | 7 + keyboards/matrix/m20add/chconf.h | 714 +++++++++ keyboards/matrix/m20add/config.h | 96 ++ keyboards/matrix/m20add/halconf.h | 525 +++++++ keyboards/matrix/m20add/info.json | 15 + .../matrix/m20add/keymaps/default/keymap.c | 26 + keyboards/matrix/m20add/keymaps/iso/keymap.c | 24 + keyboards/matrix/m20add/ld/m20add_boot.ld | 85 ++ keyboards/matrix/m20add/m20add.c | 80 + keyboards/matrix/m20add/m20add.h | 46 + keyboards/matrix/m20add/matrix.c | 93 ++ keyboards/matrix/m20add/mcuconf.h | 253 ++++ keyboards/matrix/m20add/readme.md | 13 + keyboards/matrix/m20add/rgb_ring.c | 457 ++++++ keyboards/matrix/m20add/rgb_ring.h | 23 + keyboards/matrix/m20add/rules.mk | 52 + keyboards/matrix/m20add/tca6424.c | 115 ++ keyboards/matrix/m20add/tca6424.h | 40 + 21 files changed, 4240 insertions(+) create mode 100644 keyboards/matrix/m20add/boards/m20add_bd/board.c create mode 100644 keyboards/matrix/m20add/boards/m20add_bd/board.h create mode 100644 keyboards/matrix/m20add/boards/m20add_bd/board.mk create mode 100644 keyboards/matrix/m20add/bootloader_defs.h create mode 100644 keyboards/matrix/m20add/chconf.h create mode 100644 keyboards/matrix/m20add/config.h create mode 100644 keyboards/matrix/m20add/halconf.h create mode 100644 keyboards/matrix/m20add/info.json create mode 100644 keyboards/matrix/m20add/keymaps/default/keymap.c create mode 100644 keyboards/matrix/m20add/keymaps/iso/keymap.c create mode 100644 keyboards/matrix/m20add/ld/m20add_boot.ld create mode 100644 keyboards/matrix/m20add/m20add.c create mode 100644 keyboards/matrix/m20add/m20add.h create mode 100644 keyboards/matrix/m20add/matrix.c create mode 100644 keyboards/matrix/m20add/mcuconf.h create mode 100644 keyboards/matrix/m20add/readme.md create mode 100644 keyboards/matrix/m20add/rgb_ring.c create mode 100644 keyboards/matrix/m20add/rgb_ring.h create mode 100644 keyboards/matrix/m20add/rules.mk create mode 100644 keyboards/matrix/m20add/tca6424.c create mode 100644 keyboards/matrix/m20add/tca6424.h diff --git a/keyboards/matrix/m20add/boards/m20add_bd/board.c b/keyboards/matrix/m20add/boards/m20add_bd/board.c new file mode 100644 index 000000000000..68cf23cddc4a --- /dev/null +++ b/keyboards/matrix/m20add/boards/m20add_bd/board.c @@ -0,0 +1,268 @@ +/* + 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. + 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" +#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; + +/** + * @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 + {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_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 +} + +/*===========================================================================*/ +/* Driver interrupt handlers. */ +/*===========================================================================*/ + +/*===========================================================================*/ +/* Driver exported functions. */ +/*===========================================================================*/ + +/** + * @brief Early initialization code. + * @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. + */ +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/keyboards/matrix/m20add/boards/m20add_bd/board.h b/keyboards/matrix/m20add/boards/m20add_bd/board.h new file mode 100644 index 000000000000..9d8c248c5d2d --- /dev/null +++ b/keyboards/matrix/m20add/boards/m20add_bd/board.h @@ -0,0 +1,1299 @@ +/* + 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 + +/* + * Board identifier. + */ +#define BOARD_MATRIX_NOAH +#define BOARD_NAME "Matrix 8XV2.0 ADD keyboard" +#define BOARD_OTG_NOVBUSSENS + +/* + * Board oscillators-related settings. + * NOTE: LSE not fitted. + */ +#if !defined(STM32_LSECLK) +#define STM32_LSECLK 0U +#endif + +#if !defined(STM32_HSECLK) +#define STM32_HSECLK 8000000U +#endif + +//#define STM32_HSE_BYPASS + +/* + * Board voltages. + * Required for performance limits calculation. + */ +#define STM32_VDD 300U + +/* + * MCU type as defined in the ST header. + */ +#define STM32F411xE + +/* + * IO pins assignments. + */ +#define GPIOA_PIN0 0U +#define GPIOA_PIN1 1U +#define GPIOA_PIN2 2U +#define GPIOA_PIN3 3U +#define GPIOA_PIN4 4U +#define GPIOA_SCK 5U +#define GPIOA_MISO 6U +#define GPIOA_MOSI 7U +#define GPIOA_PIN8 8U +#define GPIOA_PIN9 9U +#define GPIOA_PIN10 10U +#define GPIOA_OTG_FS_DM 11U +#define GPIOA_OTG_FS_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_SWO 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_PIN13 13U +#define GPIOB_PIN14 14U +#define GPIOB_PIN15 15U + +#define GPIOC_PIN0 0U +#define GPIOC_PIN1 1U +#define GPIOC_PIN2 2U +#define GPIOC_PIN3 3U +#define GPIOC_PIN4 4U +#define GPIOC_PIN5 5U +#define GPIOC_PIN6 6U +#define GPIOC_PIN7 7U +#define GPIOC_PIN8 8U +#define GPIOC_PIN9 9U +#define GPIOC_PIN10 10U +#define GPIOC_PIN11 11U +#define GPIOC_PIN12 12U +#define GPIOC_PIN13 13U +#define GPIOC_PIN14 14U +#define GPIOC_PIN15 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_PIN0 0U +#define GPIOF_PIN1 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 GPIOG_PIN0 0U +#define GPIOG_PIN1 1U +#define GPIOG_PIN2 2U +#define GPIOG_PIN3 3U +#define GPIOG_PIN4 4U +#define GPIOG_PIN5 5U +#define GPIOG_PIN6 6U +#define GPIOG_PIN7 7U +#define GPIOG_PIN8 8U +#define GPIOG_PIN9 9U +#define GPIOG_PIN10 10U +#define GPIOG_PIN11 11U +#define GPIOG_PIN12 12U +#define GPIOG_PIN13 13U +#define GPIOG_PIN14 14U +#define GPIOG_PIN15 15U + +#define GPIOH_OSC_IN 0U +#define GPIOH_OSC_OUT 1U +#define GPIOH_PIN2 2U +#define GPIOH_PIN3 3U +#define GPIOH_PIN4 4U +#define GPIOH_PIN5 5U +#define GPIOH_PIN6 6U +#define GPIOH_PIN7 7U +#define GPIOH_PIN8 8U +#define GPIOH_PIN9 9U +#define GPIOH_PIN10 10U +#define GPIOH_PIN11 11U +#define GPIOH_PIN12 12U +#define GPIOH_PIN13 13U +#define GPIOH_PIN14 14U +#define GPIOH_PIN15 15U + +#define GPIOI_PIN0 0U +#define GPIOI_PIN1 1U +#define GPIOI_PIN2 2U +#define GPIOI_PIN3 3U +#define GPIOI_PIN4 4U +#define GPIOI_PIN5 5U +#define GPIOI_PIN6 6U +#define GPIOI_PIN7 7U +#define GPIOI_PIN8 8U +#define GPIOI_PIN9 9U +#define GPIOI_PIN10 10U +#define GPIOI_PIN11 11U +#define GPIOI_PIN12 12U +#define GPIOI_PIN13 13U +#define GPIOI_PIN14 14U +#define GPIOI_PIN15 15U + +/* + * 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 - (input pullup). + * PA1 - (input pullup). + * PA2 - (input pullup). + * PA3 - (input pullup). + * PA4 - (input pullup). + * PA5 - SPI SCK (alternate 5). + * PA6 - SPI MISO (alternate 5). + * PA7 - SPI MOSI (alternate 5). + * PA8 - (input pullup). + * PA9 - (input pullup). + * PA10 - (input pullup). + * PA11 - OTG_FS_DM (alternate 10). + * PA12 - OTG_FS_DP (alternate 10). + * PA13 - SWDIO (alternate 0). + * PA14 - SWCLK (alternate 0). + * PA15 - (input pullup). + */ +#define VAL_GPIOA_MODER (PIN_MODE_INPUT(GPIOA_PIN0) | \ + PIN_MODE_INPUT(GPIOA_PIN1) | \ + PIN_MODE_INPUT(GPIOA_PIN2) | \ + PIN_MODE_INPUT(GPIOA_PIN3) | \ + PIN_MODE_INPUT(GPIOA_PIN4) | \ + PIN_MODE_ALTERNATE(GPIOA_SCK) | \ + PIN_MODE_ALTERNATE(GPIOA_MISO) | \ + PIN_MODE_ALTERNATE(GPIOA_MOSI) | \ + PIN_MODE_INPUT(GPIOA_PIN8) | \ + PIN_MODE_INPUT(GPIOA_PIN9) | \ + PIN_MODE_INPUT(GPIOA_PIN10) | \ + PIN_MODE_ALTERNATE(GPIOA_OTG_FS_DM) | \ + PIN_MODE_ALTERNATE(GPIOA_OTG_FS_DP) | \ + PIN_MODE_ALTERNATE(GPIOA_SWDIO) | \ + PIN_MODE_ALTERNATE(GPIOA_SWCLK) | \ + PIN_MODE_INPUT(GPIOA_PIN15)) +#define VAL_GPIOA_OTYPER (PIN_OTYPE_PUSHPULL(GPIOA_PIN0) | \ + PIN_OTYPE_PUSHPULL(GPIOA_PIN1) | \ + PIN_OTYPE_PUSHPULL(GPIOA_PIN2) | \ + PIN_OTYPE_PUSHPULL(GPIOA_PIN3) | \ + PIN_OTYPE_PUSHPULL(GPIOA_PIN4) | \ + PIN_OTYPE_PUSHPULL(GPIOA_SCK) | \ + PIN_OTYPE_PUSHPULL(GPIOA_MISO) | \ + PIN_OTYPE_PUSHPULL(GPIOA_MOSI) | \ + PIN_OTYPE_PUSHPULL(GPIOA_PIN8) | \ + PIN_OTYPE_PUSHPULL(GPIOA_PIN9) | \ + PIN_OTYPE_PUSHPULL(GPIOA_PIN10) | \ + PIN_OTYPE_PUSHPULL(GPIOA_OTG_FS_DM) | \ + PIN_OTYPE_PUSHPULL(GPIOA_OTG_FS_DP) | \ + PIN_OTYPE_PUSHPULL(GPIOA_SWDIO) | \ + PIN_OTYPE_PUSHPULL(GPIOA_SWCLK) | \ + PIN_OTYPE_PUSHPULL(GPIOA_PIN15)) +#define VAL_GPIOA_OSPEEDR (PIN_OSPEED_VERYLOW(GPIOA_PIN0) | \ + PIN_OSPEED_VERYLOW(GPIOA_PIN1) | \ + PIN_OSPEED_VERYLOW(GPIOA_PIN2) | \ + PIN_OSPEED_VERYLOW(GPIOA_PIN3) | \ + PIN_OSPEED_VERYLOW(GPIOA_PIN4) | \ + PIN_OSPEED_HIGH(GPIOA_SCK) | \ + PIN_OSPEED_HIGH(GPIOA_MISO) | \ + PIN_OSPEED_HIGH(GPIOA_MOSI) | \ + PIN_OSPEED_VERYLOW(GPIOA_PIN8) | \ + PIN_OSPEED_VERYLOW(GPIOA_PIN9) | \ + PIN_OSPEED_VERYLOW(GPIOA_PIN10) | \ + PIN_OSPEED_HIGH(GPIOA_OTG_FS_DM) | \ + PIN_OSPEED_HIGH(GPIOA_OTG_FS_DP) | \ + PIN_OSPEED_HIGH(GPIOA_SWDIO) | \ + PIN_OSPEED_HIGH(GPIOA_SWCLK) | \ + PIN_OSPEED_VERYLOW(GPIOA_PIN15)) +#define VAL_GPIOA_PUPDR (PIN_PUPDR_PULLUP(GPIOA_PIN0) | \ + PIN_PUPDR_PULLUP(GPIOA_PIN1) | \ + PIN_PUPDR_PULLUP(GPIOA_PIN2) | \ + PIN_PUPDR_PULLUP(GPIOA_PIN3) | \ + PIN_PUPDR_PULLUP(GPIOA_PIN4) | \ + PIN_PUPDR_PULLUP(GPIOA_SCK) | \ + PIN_PUPDR_PULLUP(GPIOA_MISO) | \ + PIN_PUPDR_PULLUP(GPIOA_MOSI) | \ + PIN_PUPDR_PULLUP(GPIOA_PIN8) | \ + PIN_PUPDR_PULLUP(GPIOA_PIN9) | \ + PIN_PUPDR_PULLUP(GPIOA_PIN10) | \ + PIN_PUPDR_FLOATING(GPIOA_OTG_FS_DM) | \ + PIN_PUPDR_FLOATING(GPIOA_OTG_FS_DP) | \ + PIN_PUPDR_PULLUP(GPIOA_SWDIO) | \ + PIN_PUPDR_PULLDOWN(GPIOA_SWCLK) | \ + PIN_PUPDR_PULLUP(GPIOA_PIN15)) +#define VAL_GPIOA_ODR (PIN_ODR_HIGH(GPIOA_PIN0) | \ + PIN_ODR_HIGH(GPIOA_PIN1) | \ + PIN_ODR_HIGH(GPIOA_PIN2) | \ + PIN_ODR_HIGH(GPIOA_PIN3) | \ + PIN_ODR_HIGH(GPIOA_PIN4) | \ + PIN_ODR_HIGH(GPIOA_SCK) | \ + PIN_ODR_HIGH(GPIOA_MISO) | \ + PIN_ODR_HIGH(GPIOA_MOSI) | \ + PIN_ODR_HIGH(GPIOA_PIN8) | \ + PIN_ODR_HIGH(GPIOA_PIN9) | \ + PIN_ODR_HIGH(GPIOA_PIN10) | \ + PIN_ODR_HIGH(GPIOA_OTG_FS_DM) | \ + PIN_ODR_HIGH(GPIOA_OTG_FS_DP) | \ + PIN_ODR_HIGH(GPIOA_SWDIO) | \ + PIN_ODR_HIGH(GPIOA_SWCLK) | \ + PIN_ODR_HIGH(GPIOA_PIN15)) +#define VAL_GPIOA_AFRL (PIN_AFIO_AF(GPIOA_PIN0, 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_SCK, 5U) | \ + PIN_AFIO_AF(GPIOA_MISO, 5U) | \ + PIN_AFIO_AF(GPIOA_MOSI, 5U)) +#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_OTG_FS_DM, 10U) | \ + PIN_AFIO_AF(GPIOA_OTG_FS_DP, 10U) | \ + PIN_AFIO_AF(GPIOA_SWDIO, 0U) | \ + PIN_AFIO_AF(GPIOA_SWCLK, 0U) | \ + PIN_AFIO_AF(GPIOA_PIN15, 0U)) + +/* + * GPIOB setup: + * + * PB0 - (input pullup). + * PB1 - (input pullup). + * PB2 - (input pullup). + * PB3 - SWO (alternate 0). + * PB4 - (input pullup). + * PB5 - (input pullup). + * PB6 - (input pullup). + * PB7 - (input pullup). + * PB8 - (input pullup). + * PB9 - (input pullup). + * PB10 - (input pullup). + * PB11 - (input pullup). + * PB12 - (input pullup). + * PB13 - (input pullup). + * PB14 - (input pullup). + * PB15 - (input pullup). + */ +#define VAL_GPIOB_MODER (PIN_MODE_INPUT(GPIOB_PIN0) | \ + PIN_MODE_INPUT(GPIOB_PIN1) | \ + PIN_MODE_INPUT(GPIOB_PIN2) | \ + PIN_MODE_ALTERNATE(GPIOB_SWO) | \ + 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_INPUT(GPIOB_PIN13) | \ + PIN_MODE_INPUT(GPIOB_PIN14) | \ + PIN_MODE_INPUT(GPIOB_PIN15)) +#define VAL_GPIOB_OTYPER (PIN_OTYPE_PUSHPULL(GPIOB_PIN0) | \ + PIN_OTYPE_PUSHPULL(GPIOB_PIN1) | \ + PIN_OTYPE_PUSHPULL(GPIOB_PIN2) | \ + PIN_OTYPE_PUSHPULL(GPIOB_SWO) | \ + 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_PIN13) | \ + PIN_OTYPE_PUSHPULL(GPIOB_PIN14) | \ + PIN_OTYPE_PUSHPULL(GPIOB_PIN15)) +#define VAL_GPIOB_OSPEEDR (PIN_OSPEED_VERYLOW(GPIOB_PIN0) | \ + PIN_OSPEED_VERYLOW(GPIOB_PIN1) | \ + PIN_OSPEED_VERYLOW(GPIOB_PIN2) | \ + PIN_OSPEED_HIGH(GPIOB_SWO) | \ + PIN_OSPEED_VERYLOW(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_PIN13) | \ + PIN_OSPEED_VERYLOW(GPIOB_PIN14) | \ + PIN_OSPEED_VERYLOW(GPIOB_PIN15)) +#define VAL_GPIOB_PUPDR (PIN_PUPDR_PULLUP(GPIOB_PIN0) | \ + PIN_PUPDR_PULLUP(GPIOB_PIN1) | \ + PIN_PUPDR_PULLUP(GPIOB_PIN2) | \ + PIN_PUPDR_PULLUP(GPIOB_SWO) | \ + 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_PULLUP(GPIOB_PIN13) | \ + PIN_PUPDR_PULLUP(GPIOB_PIN14) | \ + PIN_PUPDR_PULLUP(GPIOB_PIN15)) +#define VAL_GPIOB_ODR (PIN_ODR_HIGH(GPIOB_PIN0) | \ + PIN_ODR_HIGH(GPIOB_PIN1) | \ + PIN_ODR_HIGH(GPIOB_PIN2) | \ + PIN_ODR_HIGH(GPIOB_SWO) | \ + 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_PIN13) | \ + PIN_ODR_HIGH(GPIOB_PIN14) | \ + PIN_ODR_HIGH(GPIOB_PIN15)) +#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_SWO, 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_PIN13, 0U) | \ + PIN_AFIO_AF(GPIOB_PIN14, 0U) | \ + PIN_AFIO_AF(GPIOB_PIN15, 0U)) + +/* + * GPIOC setup: + * + * PC0 - (input pullup). + * PC1 - (input pullup). + * PC2 - (input pullup). + * PC3 - (input pullup). + * PC4 - (input pullup). + * PC5 - (input pullup). + * PC6 - (input pullup). + * PC7 - (input pullup). + * PC8 - (input pullup). + * PC9 - (input pullup). + * PC10 - (input pullup). + * PC11 - (input pullup). + * PC12 - (input pullup). + * PC13 - (input floating). + * PC14 - (input floating). + * PC15 - (input floating). + */ +#define VAL_GPIOC_MODER (PIN_MODE_INPUT(GPIOC_PIN0) | \ + 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_INPUT(GPIOC_PIN6) | \ + PIN_MODE_INPUT(GPIOC_PIN7) | \ + PIN_MODE_INPUT(GPIOC_PIN8) | \ + PIN_MODE_INPUT(GPIOC_PIN9) | \ + PIN_MODE_INPUT(GPIOC_PIN10) | \ + PIN_MODE_INPUT(GPIOC_PIN11) | \ + PIN_MODE_INPUT(GPIOC_PIN12) | \ + PIN_MODE_INPUT(GPIOC_PIN13) | \ + PIN_MODE_INPUT(GPIOC_PIN14) | \ + PIN_MODE_INPUT(GPIOC_PIN15)) +#define VAL_GPIOC_OTYPER (PIN_OTYPE_PUSHPULL(GPIOC_PIN0) | \ + 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_PIN6) | \ + PIN_OTYPE_PUSHPULL(GPIOC_PIN7) | \ + PIN_OTYPE_PUSHPULL(GPIOC_PIN8) | \ + PIN_OTYPE_PUSHPULL(GPIOC_PIN9) | \ + PIN_OTYPE_PUSHPULL(GPIOC_PIN10) | \ + PIN_OTYPE_PUSHPULL(GPIOC_PIN11) | \ + PIN_OTYPE_PUSHPULL(GPIOC_PIN12) | \ + PIN_OTYPE_PUSHPULL(GPIOC_PIN13) | \ + PIN_OTYPE_PUSHPULL(GPIOC_PIN14) | \ + PIN_OTYPE_PUSHPULL(GPIOC_PIN15)) +#define VAL_GPIOC_OSPEEDR (PIN_OSPEED_VERYLOW(GPIOC_PIN0) | \ + 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_VERYLOW(GPIOC_PIN6) | \ + PIN_OSPEED_VERYLOW(GPIOC_PIN7) | \ + PIN_OSPEED_VERYLOW(GPIOC_PIN8) | \ + PIN_OSPEED_VERYLOW(GPIOC_PIN9) | \ + PIN_OSPEED_VERYLOW(GPIOC_PIN10) | \ + PIN_OSPEED_VERYLOW(GPIOC_PIN11) | \ + PIN_OSPEED_VERYLOW(GPIOC_PIN12) | \ + PIN_OSPEED_VERYLOW(GPIOC_PIN13) | \ + PIN_OSPEED_VERYLOW(GPIOC_PIN14) | \ + PIN_OSPEED_VERYLOW(GPIOC_PIN15)) +#define VAL_GPIOC_PUPDR (PIN_PUPDR_PULLUP(GPIOC_PIN0) | \ + 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_PULLUP(GPIOC_PIN6) | \ + PIN_PUPDR_PULLUP(GPIOC_PIN7) | \ + PIN_PUPDR_PULLUP(GPIOC_PIN8) | \ + PIN_PUPDR_PULLUP(GPIOC_PIN9) | \ + PIN_PUPDR_PULLUP(GPIOC_PIN10) | \ + PIN_PUPDR_PULLUP(GPIOC_PIN11) | \ + PIN_PUPDR_PULLUP(GPIOC_PIN12) | \ + PIN_PUPDR_PULLUP(GPIOC_PIN13) | \ + PIN_PUPDR_PULLUP(GPIOC_PIN14) | \ + PIN_PUPDR_PULLUP(GPIOC_PIN15)) +#define VAL_GPIOC_ODR (PIN_ODR_HIGH(GPIOC_PIN0) | \ + 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_HIGH(GPIOC_PIN6) | \ + PIN_ODR_HIGH(GPIOC_PIN7) | \ + PIN_ODR_HIGH(GPIOC_PIN8) | \ + PIN_ODR_HIGH(GPIOC_PIN9) | \ + PIN_ODR_HIGH(GPIOC_PIN10) | \ + PIN_ODR_HIGH(GPIOC_PIN11) | \ + PIN_ODR_HIGH(GPIOC_PIN12) | \ + PIN_ODR_HIGH(GPIOC_PIN13) | \ + PIN_ODR_HIGH(GPIOC_PIN14) | \ + PIN_ODR_HIGH(GPIOC_PIN15)) +#define VAL_GPIOC_AFRL (PIN_AFIO_AF(GPIOC_PIN0, 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_PIN6, 0U) | \ + PIN_AFIO_AF(GPIOC_PIN7, 0U)) +#define VAL_GPIOC_AFRH (PIN_AFIO_AF(GPIOC_PIN8, 0U) | \ + PIN_AFIO_AF(GPIOC_PIN9, 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_PIN14, 0U) | \ + PIN_AFIO_AF(GPIOC_PIN15, 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_HIGH(GPIOD_PIN0) | \ + PIN_OSPEED_HIGH(GPIOD_PIN1) | \ + PIN_OSPEED_HIGH(GPIOD_PIN2) | \ + PIN_OSPEED_HIGH(GPIOD_PIN3) | \ + PIN_OSPEED_HIGH(GPIOD_PIN4) | \ + PIN_OSPEED_HIGH(GPIOD_PIN5) | \ + PIN_OSPEED_HIGH(GPIOD_PIN6) | \ + PIN_OSPEED_HIGH(GPIOD_PIN7) | \ + PIN_OSPEED_HIGH(GPIOD_PIN8) | \ + PIN_OSPEED_HIGH(GPIOD_PIN9) | \ + PIN_OSPEED_HIGH(GPIOD_PIN10) | \ + PIN_OSPEED_HIGH(GPIOD_PIN11) | \ + PIN_OSPEED_HIGH(GPIOD_PIN12) | \ + PIN_OSPEED_HIGH(GPIOD_PIN13) | \ + PIN_OSPEED_HIGH(GPIOD_PIN14) | \ + PIN_OSPEED_HIGH(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_HIGH(GPIOE_PIN0) | \ + PIN_OSPEED_HIGH(GPIOE_PIN1) | \ + PIN_OSPEED_HIGH(GPIOE_PIN2) | \ + PIN_OSPEED_HIGH(GPIOE_PIN3) | \ + PIN_OSPEED_HIGH(GPIOE_PIN4) | \ + PIN_OSPEED_HIGH(GPIOE_PIN5) | \ + PIN_OSPEED_HIGH(GPIOE_PIN6) | \ + PIN_OSPEED_HIGH(GPIOE_PIN7) | \ + PIN_OSPEED_HIGH(GPIOE_PIN8) | \ + PIN_OSPEED_HIGH(GPIOE_PIN9) | \ + PIN_OSPEED_HIGH(GPIOE_PIN10) | \ + PIN_OSPEED_HIGH(GPIOE_PIN11) | \ + PIN_OSPEED_HIGH(GPIOE_PIN12) | \ + PIN_OSPEED_HIGH(GPIOE_PIN13) | \ + PIN_OSPEED_HIGH(GPIOE_PIN14) | \ + PIN_OSPEED_HIGH(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 - PIN0 (input pullup). + * PF1 - PIN1 (input pullup). + * 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_PIN0) | \ + PIN_MODE_INPUT(GPIOF_PIN1) | \ + 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_PIN0) | \ + PIN_OTYPE_PUSHPULL(GPIOF_PIN1) | \ + 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_HIGH(GPIOF_PIN0) | \ + PIN_OSPEED_HIGH(GPIOF_PIN1) | \ + PIN_OSPEED_HIGH(GPIOF_PIN2) | \ + PIN_OSPEED_HIGH(GPIOF_PIN3) | \ + PIN_OSPEED_HIGH(GPIOF_PIN4) | \ + PIN_OSPEED_HIGH(GPIOF_PIN5) | \ + PIN_OSPEED_HIGH(GPIOF_PIN6) | \ + PIN_OSPEED_HIGH(GPIOF_PIN7) | \ + PIN_OSPEED_HIGH(GPIOF_PIN8) | \ + PIN_OSPEED_HIGH(GPIOF_PIN9) | \ + PIN_OSPEED_HIGH(GPIOF_PIN10) | \ + PIN_OSPEED_HIGH(GPIOF_PIN11) | \ + PIN_OSPEED_HIGH(GPIOF_PIN12) | \ + PIN_OSPEED_HIGH(GPIOF_PIN13) | \ + PIN_OSPEED_HIGH(GPIOF_PIN14) | \ + PIN_OSPEED_HIGH(GPIOF_PIN15)) +#define VAL_GPIOF_PUPDR (PIN_PUPDR_PULLUP(GPIOF_PIN0) | \ + PIN_PUPDR_PULLUP(GPIOF_PIN1) | \ + 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_PIN0) | \ + PIN_ODR_HIGH(GPIOF_PIN1) | \ + 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_PIN0, 0U) | \ + PIN_AFIO_AF(GPIOF_PIN1, 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)) + +/* + * GPIOG setup: + * + * PG0 - PIN0 (input pullup). + * PG1 - PIN1 (input pullup). + * PG2 - PIN2 (input pullup). + * PG3 - PIN3 (input pullup). + * PG4 - PIN4 (input pullup). + * PG5 - PIN5 (input pullup). + * PG6 - PIN6 (input pullup). + * PG7 - PIN7 (input pullup). + * PG8 - PIN8 (input pullup). + * PG9 - PIN9 (input pullup). + * PG10 - PIN10 (input pullup). + * PG11 - PIN11 (input pullup). + * PG12 - PIN12 (input pullup). + * PG13 - PIN13 (input pullup). + * PG14 - PIN14 (input pullup). + * PG15 - PIN15 (input pullup). + */ +#define VAL_GPIOG_MODER (PIN_MODE_INPUT(GPIOG_PIN0) | \ + PIN_MODE_INPUT(GPIOG_PIN1) | \ + PIN_MODE_INPUT(GPIOG_PIN2) | \ + PIN_MODE_INPUT(GPIOG_PIN3) | \ + PIN_MODE_INPUT(GPIOG_PIN4) | \ + PIN_MODE_INPUT(GPIOG_PIN5) | \ + PIN_MODE_INPUT(GPIOG_PIN6) | \ + PIN_MODE_INPUT(GPIOG_PIN7) | \ + PIN_MODE_INPUT(GPIOG_PIN8) | \ + PIN_MODE_INPUT(GPIOG_PIN9) | \ + PIN_MODE_INPUT(GPIOG_PIN10) | \ + PIN_MODE_INPUT(GPIOG_PIN11) | \ + PIN_MODE_INPUT(GPIOG_PIN12) | \ + PIN_MODE_INPUT(GPIOG_PIN13) | \ + PIN_MODE_INPUT(GPIOG_PIN14) | \ + PIN_MODE_INPUT(GPIOG_PIN15)) +#define VAL_GPIOG_OTYPER (PIN_OTYPE_PUSHPULL(GPIOG_PIN0) | \ + PIN_OTYPE_PUSHPULL(GPIOG_PIN1) | \ + PIN_OTYPE_PUSHPULL(GPIOG_PIN2) | \ + PIN_OTYPE_PUSHPULL(GPIOG_PIN3) | \ + PIN_OTYPE_PUSHPULL(GPIOG_PIN4) | \ + PIN_OTYPE_PUSHPULL(GPIOG_PIN5) | \ + PIN_OTYPE_PUSHPULL(GPIOG_PIN6) | \ + PIN_OTYPE_PUSHPULL(GPIOG_PIN7) | \ + PIN_OTYPE_PUSHPULL(GPIOG_PIN8) | \ + PIN_OTYPE_PUSHPULL(GPIOG_PIN9) | \ + PIN_OTYPE_PUSHPULL(GPIOG_PIN10) | \ + PIN_OTYPE_PUSHPULL(GPIOG_PIN11) | \ + PIN_OTYPE_PUSHPULL(GPIOG_PIN12) | \ + PIN_OTYPE_PUSHPULL(GPIOG_PIN13) | \ + PIN_OTYPE_PUSHPULL(GPIOG_PIN14) | \ + PIN_OTYPE_PUSHPULL(GPIOG_PIN15)) +#define VAL_GPIOG_OSPEEDR (PIN_OSPEED_HIGH(GPIOG_PIN0) | \ + PIN_OSPEED_HIGH(GPIOG_PIN1) | \ + PIN_OSPEED_HIGH(GPIOG_PIN2) | \ + PIN_OSPEED_HIGH(GPIOG_PIN3) | \ + PIN_OSPEED_HIGH(GPIOG_PIN4) | \ + PIN_OSPEED_HIGH(GPIOG_PIN5) | \ + PIN_OSPEED_HIGH(GPIOG_PIN6) | \ + PIN_OSPEED_HIGH(GPIOG_PIN7) | \ + PIN_OSPEED_HIGH(GPIOG_PIN8) | \ + PIN_OSPEED_HIGH(GPIOG_PIN9) | \ + PIN_OSPEED_HIGH(GPIOG_PIN10) | \ + PIN_OSPEED_HIGH(GPIOG_PIN11) | \ + PIN_OSPEED_HIGH(GPIOG_PIN12) | \ + PIN_OSPEED_HIGH(GPIOG_PIN13) | \ + PIN_OSPEED_HIGH(GPIOG_PIN14) | \ + PIN_OSPEED_HIGH(GPIOG_PIN15)) +#define VAL_GPIOG_PUPDR (PIN_PUPDR_PULLUP(GPIOG_PIN0) | \ + PIN_PUPDR_PULLUP(GPIOG_PIN1) | \ + PIN_PUPDR_PULLUP(GPIOG_PIN2) | \ + PIN_PUPDR_PULLUP(GPIOG_PIN3) | \ + PIN_PUPDR_PULLUP(GPIOG_PIN4) | \ + PIN_PUPDR_PULLUP(GPIOG_PIN5) | \ + PIN_PUPDR_PULLUP(GPIOG_PIN6) | \ + PIN_PUPDR_PULLUP(GPIOG_PIN7) | \ + PIN_PUPDR_PULLUP(GPIOG_PIN8) | \ + PIN_PUPDR_PULLUP(GPIOG_PIN9) | \ + PIN_PUPDR_PULLUP(GPIOG_PIN10) | \ + PIN_PUPDR_PULLUP(GPIOG_PIN11) | \ + PIN_PUPDR_PULLUP(GPIOG_PIN12) | \ + PIN_PUPDR_PULLUP(GPIOG_PIN13) | \ + PIN_PUPDR_PULLUP(GPIOG_PIN14) | \ + PIN_PUPDR_PULLUP(GPIOG_PIN15)) +#define VAL_GPIOG_ODR (PIN_ODR_HIGH(GPIOG_PIN0) | \ + PIN_ODR_HIGH(GPIOG_PIN1) | \ + PIN_ODR_HIGH(GPIOG_PIN2) | \ + PIN_ODR_HIGH(GPIOG_PIN3) | \ + PIN_ODR_HIGH(GPIOG_PIN4) | \ + PIN_ODR_HIGH(GPIOG_PIN5) | \ + PIN_ODR_HIGH(GPIOG_PIN6) | \ + PIN_ODR_HIGH(GPIOG_PIN7) | \ + PIN_ODR_HIGH(GPIOG_PIN8) | \ + PIN_ODR_HIGH(GPIOG_PIN9) | \ + PIN_ODR_HIGH(GPIOG_PIN10) | \ + PIN_ODR_HIGH(GPIOG_PIN11) | \ + PIN_ODR_HIGH(GPIOG_PIN12) | \ + PIN_ODR_HIGH(GPIOG_PIN13) | \ + PIN_ODR_HIGH(GPIOG_PIN14) | \ + PIN_ODR_HIGH(GPIOG_PIN15)) +#define VAL_GPIOG_AFRL (PIN_AFIO_AF(GPIOG_PIN0, 0U) | \ + PIN_AFIO_AF(GPIOG_PIN1, 0U) | \ + PIN_AFIO_AF(GPIOG_PIN2, 0U) | \ + PIN_AFIO_AF(GPIOG_PIN3, 0U) | \ + PIN_AFIO_AF(GPIOG_PIN4, 0U) | \ + PIN_AFIO_AF(GPIOG_PIN5, 0U) | \ + PIN_AFIO_AF(GPIOG_PIN6, 0U) | \ + PIN_AFIO_AF(GPIOG_PIN7, 0U)) +#define VAL_GPIOG_AFRH (PIN_AFIO_AF(GPIOG_PIN8, 0U) | \ + PIN_AFIO_AF(GPIOG_PIN9, 0U) | \ + PIN_AFIO_AF(GPIOG_PIN10, 0U) | \ + PIN_AFIO_AF(GPIOG_PIN11, 0U) | \ + PIN_AFIO_AF(GPIOG_PIN12, 0U) | \ + PIN_AFIO_AF(GPIOG_PIN13, 0U) | \ + PIN_AFIO_AF(GPIOG_PIN14, 0U) | \ + PIN_AFIO_AF(GPIOG_PIN15, 0U)) + +/* + * GPIOH setup: + * + * PH0 - OSC_IN (input floating). + * PH1 - OSC_OUT (input floating). + * PH2 - PIN2 (input pullup). + * PH3 - PIN3 (input pullup). + * PH4 - PIN4 (input pullup). + * PH5 - PIN5 (input pullup). + * PH6 - PIN6 (input pullup). + * PH7 - PIN7 (input pullup). + * PH8 - PIN8 (input pullup). + * PH9 - PIN9 (input pullup). + * PH10 - PIN10 (input pullup). + * PH11 - PIN11 (input pullup). + * PH12 - PIN12 (input pullup). + * PH13 - PIN13 (input pullup). + * PH14 - PIN14 (input pullup). + * PH15 - PIN15 (input pullup). + */ +#define VAL_GPIOH_MODER (PIN_MODE_INPUT(GPIOH_OSC_IN) | \ + PIN_MODE_INPUT(GPIOH_OSC_OUT) | \ + PIN_MODE_INPUT(GPIOH_PIN2) | \ + PIN_MODE_INPUT(GPIOH_PIN3) | \ + PIN_MODE_INPUT(GPIOH_PIN4) | \ + PIN_MODE_INPUT(GPIOH_PIN5) | \ + PIN_MODE_INPUT(GPIOH_PIN6) | \ + PIN_MODE_INPUT(GPIOH_PIN7) | \ + PIN_MODE_INPUT(GPIOH_PIN8) | \ + PIN_MODE_INPUT(GPIOH_PIN9) | \ + PIN_MODE_INPUT(GPIOH_PIN10) | \ + PIN_MODE_INPUT(GPIOH_PIN11) | \ + PIN_MODE_INPUT(GPIOH_PIN12) | \ + PIN_MODE_INPUT(GPIOH_PIN13) | \ + PIN_MODE_INPUT(GPIOH_PIN14) | \ + PIN_MODE_INPUT(GPIOH_PIN15)) +#define VAL_GPIOH_OTYPER (PIN_OTYPE_PUSHPULL(GPIOH_OSC_IN) | \ + PIN_OTYPE_PUSHPULL(GPIOH_OSC_OUT) | \ + PIN_OTYPE_PUSHPULL(GPIOH_PIN2) | \ + PIN_OTYPE_PUSHPULL(GPIOH_PIN3) | \ + PIN_OTYPE_PUSHPULL(GPIOH_PIN4) | \ + PIN_OTYPE_PUSHPULL(GPIOH_PIN5) | \ + PIN_OTYPE_PUSHPULL(GPIOH_PIN6) | \ + PIN_OTYPE_PUSHPULL(GPIOH_PIN7) | \ + PIN_OTYPE_PUSHPULL(GPIOH_PIN8) | \ + PIN_OTYPE_PUSHPULL(GPIOH_PIN9) | \ + PIN_OTYPE_PUSHPULL(GPIOH_PIN10) | \ + PIN_OTYPE_PUSHPULL(GPIOH_PIN11) | \ + PIN_OTYPE_PUSHPULL(GPIOH_PIN12) | \ + PIN_OTYPE_PUSHPULL(GPIOH_PIN13) | \ + PIN_OTYPE_PUSHPULL(GPIOH_PIN14) | \ + PIN_OTYPE_PUSHPULL(GPIOH_PIN15)) +#define VAL_GPIOH_OSPEEDR (PIN_OSPEED_HIGH(GPIOH_OSC_IN) | \ + PIN_OSPEED_HIGH(GPIOH_OSC_OUT) | \ + PIN_OSPEED_HIGH(GPIOH_PIN2) | \ + PIN_OSPEED_HIGH(GPIOH_PIN3) | \ + PIN_OSPEED_HIGH(GPIOH_PIN4) | \ + PIN_OSPEED_HIGH(GPIOH_PIN5) | \ + PIN_OSPEED_HIGH(GPIOH_PIN6) | \ + PIN_OSPEED_HIGH(GPIOH_PIN7) | \ + PIN_OSPEED_HIGH(GPIOH_PIN8) | \ + PIN_OSPEED_HIGH(GPIOH_PIN9) | \ + PIN_OSPEED_HIGH(GPIOH_PIN10) | \ + PIN_OSPEED_HIGH(GPIOH_PIN11) | \ + PIN_OSPEED_HIGH(GPIOH_PIN12) | \ + PIN_OSPEED_HIGH(GPIOH_PIN13) | \ + PIN_OSPEED_HIGH(GPIOH_PIN14) | \ + PIN_OSPEED_HIGH(GPIOH_PIN15)) +#define VAL_GPIOH_PUPDR (PIN_PUPDR_FLOATING(GPIOH_OSC_IN) | \ + PIN_PUPDR_FLOATING(GPIOH_OSC_OUT) | \ + PIN_PUPDR_PULLUP(GPIOH_PIN2) | \ + PIN_PUPDR_PULLUP(GPIOH_PIN3) | \ + PIN_PUPDR_PULLUP(GPIOH_PIN4) | \ + PIN_PUPDR_PULLUP(GPIOH_PIN5) | \ + PIN_PUPDR_PULLUP(GPIOH_PIN6) | \ + PIN_PUPDR_PULLUP(GPIOH_PIN7) | \ + PIN_PUPDR_PULLUP(GPIOH_PIN8) | \ + PIN_PUPDR_PULLUP(GPIOH_PIN9) | \ + PIN_PUPDR_PULLUP(GPIOH_PIN10) | \ + PIN_PUPDR_PULLUP(GPIOH_PIN11) | \ + PIN_PUPDR_PULLUP(GPIOH_PIN12) | \ + PIN_PUPDR_PULLUP(GPIOH_PIN13) | \ + PIN_PUPDR_PULLUP(GPIOH_PIN14) | \ + PIN_PUPDR_PULLUP(GPIOH_PIN15)) +#define VAL_GPIOH_ODR (PIN_ODR_HIGH(GPIOH_OSC_IN) | \ + PIN_ODR_HIGH(GPIOH_OSC_OUT) | \ + PIN_ODR_HIGH(GPIOH_PIN2) | \ + PIN_ODR_HIGH(GPIOH_PIN3) | \ + PIN_ODR_HIGH(GPIOH_PIN4) | \ + PIN_ODR_HIGH(GPIOH_PIN5) | \ + PIN_ODR_HIGH(GPIOH_PIN6) | \ + PIN_ODR_HIGH(GPIOH_PIN7) | \ + PIN_ODR_HIGH(GPIOH_PIN8) | \ + PIN_ODR_HIGH(GPIOH_PIN9) | \ + PIN_ODR_HIGH(GPIOH_PIN10) | \ + PIN_ODR_HIGH(GPIOH_PIN11) | \ + PIN_ODR_HIGH(GPIOH_PIN12) | \ + PIN_ODR_HIGH(GPIOH_PIN13) | \ + PIN_ODR_HIGH(GPIOH_PIN14) | \ + PIN_ODR_HIGH(GPIOH_PIN15)) +#define VAL_GPIOH_AFRL (PIN_AFIO_AF(GPIOH_OSC_IN, 0U) | \ + PIN_AFIO_AF(GPIOH_OSC_OUT, 0U) | \ + PIN_AFIO_AF(GPIOH_PIN2, 0U) | \ + PIN_AFIO_AF(GPIOH_PIN3, 0U) | \ + PIN_AFIO_AF(GPIOH_PIN4, 0U) | \ + PIN_AFIO_AF(GPIOH_PIN5, 0U) | \ + PIN_AFIO_AF(GPIOH_PIN6, 0U) | \ + PIN_AFIO_AF(GPIOH_PIN7, 0U)) +#define VAL_GPIOH_AFRH (PIN_AFIO_AF(GPIOH_PIN8, 0U) | \ + PIN_AFIO_AF(GPIOH_PIN9, 0U) | \ + PIN_AFIO_AF(GPIOH_PIN10, 0U) | \ + PIN_AFIO_AF(GPIOH_PIN11, 0U) | \ + PIN_AFIO_AF(GPIOH_PIN12, 0U) | \ + PIN_AFIO_AF(GPIOH_PIN13, 0U) | \ + PIN_AFIO_AF(GPIOH_PIN14, 0U) | \ + PIN_AFIO_AF(GPIOH_PIN15, 0U)) + +/* + * GPIOI setup: + * + * PI0 - PIN0 (input pullup). + * PI1 - PIN1 (input pullup). + * PI2 - PIN2 (input pullup). + * PI3 - PIN3 (input pullup). + * PI4 - PIN4 (input pullup). + * PI5 - PIN5 (input pullup). + * PI6 - PIN6 (input pullup). + * PI7 - PIN7 (input pullup). + * PI8 - PIN8 (input pullup). + * PI9 - PIN9 (input pullup). + * PI10 - PIN10 (input pullup). + * PI11 - PIN11 (input pullup). + * PI12 - PIN12 (input pullup). + * PI13 - PIN13 (input pullup). + * PI14 - PIN14 (input pullup). + * PI15 - PIN15 (input pullup). + */ +#define VAL_GPIOI_MODER (PIN_MODE_INPUT(GPIOI_PIN0) | \ + PIN_MODE_INPUT(GPIOI_PIN1) | \ + PIN_MODE_INPUT(GPIOI_PIN2) | \ + PIN_MODE_INPUT(GPIOI_PIN3) | \ + PIN_MODE_INPUT(GPIOI_PIN4) | \ + PIN_MODE_INPUT(GPIOI_PIN5) | \ + PIN_MODE_INPUT(GPIOI_PIN6) | \ + PIN_MODE_INPUT(GPIOI_PIN7) | \ + PIN_MODE_INPUT(GPIOI_PIN8) | \ + PIN_MODE_INPUT(GPIOI_PIN9) | \ + PIN_MODE_INPUT(GPIOI_PIN10) | \ + PIN_MODE_INPUT(GPIOI_PIN11) | \ + PIN_MODE_INPUT(GPIOI_PIN12) | \ + PIN_MODE_INPUT(GPIOI_PIN13) | \ + PIN_MODE_INPUT(GPIOI_PIN14) | \ + PIN_MODE_INPUT(GPIOI_PIN15)) +#define VAL_GPIOI_OTYPER (PIN_OTYPE_PUSHPULL(GPIOI_PIN0) | \ + PIN_OTYPE_PUSHPULL(GPIOI_PIN1) | \ + PIN_OTYPE_PUSHPULL(GPIOI_PIN2) | \ + PIN_OTYPE_PUSHPULL(GPIOI_PIN3) | \ + PIN_OTYPE_PUSHPULL(GPIOI_PIN4) | \ + PIN_OTYPE_PUSHPULL(GPIOI_PIN5) | \ + PIN_OTYPE_PUSHPULL(GPIOI_PIN6) | \ + PIN_OTYPE_PUSHPULL(GPIOI_PIN7) | \ + PIN_OTYPE_PUSHPULL(GPIOI_PIN8) | \ + PIN_OTYPE_PUSHPULL(GPIOI_PIN9) | \ + PIN_OTYPE_PUSHPULL(GPIOI_PIN10) | \ + PIN_OTYPE_PUSHPULL(GPIOI_PIN11) | \ + PIN_OTYPE_PUSHPULL(GPIOI_PIN12) | \ + PIN_OTYPE_PUSHPULL(GPIOI_PIN13) | \ + PIN_OTYPE_PUSHPULL(GPIOI_PIN14) | \ + PIN_OTYPE_PUSHPULL(GPIOI_PIN15)) +#define VAL_GPIOI_OSPEEDR (PIN_OSPEED_HIGH(GPIOI_PIN0) | \ + PIN_OSPEED_HIGH(GPIOI_PIN1) | \ + PIN_OSPEED_HIGH(GPIOI_PIN2) | \ + PIN_OSPEED_HIGH(GPIOI_PIN3) | \ + PIN_OSPEED_HIGH(GPIOI_PIN4) | \ + PIN_OSPEED_HIGH(GPIOI_PIN5) | \ + PIN_OSPEED_HIGH(GPIOI_PIN6) | \ + PIN_OSPEED_HIGH(GPIOI_PIN7) | \ + PIN_OSPEED_HIGH(GPIOI_PIN8) | \ + PIN_OSPEED_HIGH(GPIOI_PIN9) | \ + PIN_OSPEED_HIGH(GPIOI_PIN10) | \ + PIN_OSPEED_HIGH(GPIOI_PIN11) | \ + PIN_OSPEED_HIGH(GPIOI_PIN12) | \ + PIN_OSPEED_HIGH(GPIOI_PIN13) | \ + PIN_OSPEED_HIGH(GPIOI_PIN14) | \ + PIN_OSPEED_HIGH(GPIOI_PIN15)) +#define VAL_GPIOI_PUPDR (PIN_PUPDR_PULLUP(GPIOI_PIN0) | \ + PIN_PUPDR_PULLUP(GPIOI_PIN1) | \ + PIN_PUPDR_PULLUP(GPIOI_PIN2) | \ + PIN_PUPDR_PULLUP(GPIOI_PIN3) | \ + PIN_PUPDR_PULLUP(GPIOI_PIN4) | \ + PIN_PUPDR_PULLUP(GPIOI_PIN5) | \ + PIN_PUPDR_PULLUP(GPIOI_PIN6) | \ + PIN_PUPDR_PULLUP(GPIOI_PIN7) | \ + PIN_PUPDR_PULLUP(GPIOI_PIN8) | \ + PIN_PUPDR_PULLUP(GPIOI_PIN9) | \ + PIN_PUPDR_PULLUP(GPIOI_PIN10) | \ + PIN_PUPDR_PULLUP(GPIOI_PIN11) | \ + PIN_PUPDR_PULLUP(GPIOI_PIN12) | \ + PIN_PUPDR_PULLUP(GPIOI_PIN13) | \ + PIN_PUPDR_PULLUP(GPIOI_PIN14) | \ + PIN_PUPDR_PULLUP(GPIOI_PIN15)) +#define VAL_GPIOI_ODR (PIN_ODR_HIGH(GPIOI_PIN0) | \ + PIN_ODR_HIGH(GPIOI_PIN1) | \ + PIN_ODR_HIGH(GPIOI_PIN2) | \ + PIN_ODR_HIGH(GPIOI_PIN3) | \ + PIN_ODR_HIGH(GPIOI_PIN4) | \ + PIN_ODR_HIGH(GPIOI_PIN5) | \ + PIN_ODR_HIGH(GPIOI_PIN6) | \ + PIN_ODR_HIGH(GPIOI_PIN7) | \ + PIN_ODR_HIGH(GPIOI_PIN8) | \ + PIN_ODR_HIGH(GPIOI_PIN9) | \ + PIN_ODR_HIGH(GPIOI_PIN10) | \ + PIN_ODR_HIGH(GPIOI_PIN11) | \ + PIN_ODR_HIGH(GPIOI_PIN12) | \ + PIN_ODR_HIGH(GPIOI_PIN13) | \ + PIN_ODR_HIGH(GPIOI_PIN14) | \ + PIN_ODR_HIGH(GPIOI_PIN15)) +#define VAL_GPIOI_AFRL (PIN_AFIO_AF(GPIOI_PIN0, 0U) | \ + PIN_AFIO_AF(GPIOI_PIN1, 0U) | \ + PIN_AFIO_AF(GPIOI_PIN2, 0U) | \ + PIN_AFIO_AF(GPIOI_PIN3, 0U) | \ + PIN_AFIO_AF(GPIOI_PIN4, 0U) | \ + PIN_AFIO_AF(GPIOI_PIN5, 0U) | \ + PIN_AFIO_AF(GPIOI_PIN6, 0U) | \ + PIN_AFIO_AF(GPIOI_PIN7, 0U)) +#define VAL_GPIOI_AFRH (PIN_AFIO_AF(GPIOI_PIN8, 0U) | \ + PIN_AFIO_AF(GPIOI_PIN9, 0U) | \ + PIN_AFIO_AF(GPIOI_PIN10, 0U) | \ + PIN_AFIO_AF(GPIOI_PIN11, 0U) | \ + PIN_AFIO_AF(GPIOI_PIN12, 0U) | \ + PIN_AFIO_AF(GPIOI_PIN13, 0U) | \ + PIN_AFIO_AF(GPIOI_PIN14, 0U) | \ + PIN_AFIO_AF(GPIOI_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/keyboards/matrix/m20add/boards/m20add_bd/board.mk b/keyboards/matrix/m20add/boards/m20add_bd/board.mk new file mode 100644 index 000000000000..a12d8670d5a7 --- /dev/null +++ b/keyboards/matrix/m20add/boards/m20add_bd/board.mk @@ -0,0 +1,9 @@ +# List of all the board related files. +BOARDSRC = $(BOARD_PATH)/boards/m20add_bd/board.c + +# Required include directories +BOARDINC = $(BOARD_PATH)/boards/m20add_bd + +# Shared variables +ALLCSRC += $(BOARDSRC) +ALLINC += $(BOARDINC) diff --git a/keyboards/matrix/m20add/bootloader_defs.h b/keyboards/matrix/m20add/bootloader_defs.h new file mode 100644 index 000000000000..20b8f73e6f7d --- /dev/null +++ b/keyboards/matrix/m20add/bootloader_defs.h @@ -0,0 +1,7 @@ +/* Address for jumping to bootloader on STM32 chips. */ +/* It is chip dependent, the correct number can be looked up here: + * 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 + */ +#define STM32_BOOTLOADER_ADDRESS 0x1FFF0000 diff --git a/keyboards/matrix/m20add/chconf.h b/keyboards/matrix/m20add/chconf.h new file mode 100644 index 000000000000..7dc4f84a8a00 --- /dev/null +++ b/keyboards/matrix/m20add/chconf.h @@ -0,0 +1,714 @@ +/* + 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. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +/** + * @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. + * + * @addtogroup config + * @details Kernel related settings and hooks. + * @{ + */ + +#ifndef CHCONF_H +#define CHCONF_H + +#define _CHIBIOS_RT_CONF_ +#define _CHIBIOS_RT_CONF_VER_6_0_ + +/*===========================================================================*/ +/** + * @name System timers settings + * @{ + */ +/*===========================================================================*/ + +/** + * @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. + * @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. + */ +#if !defined(CH_CFG_ST_TIMEDELTA) +#define CH_CFG_ST_TIMEDELTA 2 +#endif + +/** @} */ + +/*===========================================================================*/ +/** + * @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. + */ +#if !defined(CH_CFG_TIME_QUANTUM) +#define CH_CFG_TIME_QUANTUM 0 +#endif + +/** + * @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. + */ +#if !defined(CH_CFG_MEMCORE_SIZE) +#define CH_CFG_MEMCORE_SIZE 0 +#endif + +/** + * @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. + */ +#if !defined(CH_CFG_NO_IDLE_THREAD) +#define CH_CFG_NO_IDLE_THREAD FALSE +#endif + +/** @} */ + +/*===========================================================================*/ +/** + * @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. + */ +#if !defined(CH_CFG_OPTIMIZE_SPEED) +#define CH_CFG_OPTIMIZE_SPEED TRUE +#endif + +/** @} */ + +/*===========================================================================*/ +/** + * @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. + */ +#if !defined(CH_CFG_USE_TM) +#define CH_CFG_USE_TM TRUE +#endif + +/** + * @brief Threads registry APIs. + * @details If enabled then the registry APIs are included in the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_REGISTRY) +#define CH_CFG_USE_REGISTRY TRUE +#endif + +/** + * @brief Threads synchronization APIs. + * @details If enabled then the @p chThdWait() function is included in + * the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_WAITEXIT) +#define CH_CFG_USE_WAITEXIT TRUE +#endif + +/** + * @brief Semaphores APIs. + * @details If enabled then the Semaphores APIs are included in the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_SEMAPHORES) +#define CH_CFG_USE_SEMAPHORES TRUE +#endif + +/** + * @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. + */ +#if !defined(CH_CFG_USE_SEMAPHORES_PRIORITY) +#define CH_CFG_USE_SEMAPHORES_PRIORITY FALSE +#endif + +/** + * @brief Mutexes APIs. + * @details If enabled then the mutexes APIs are included in the kernel. + * + * @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. + * @note Recursive mutexes are heavier and have an increased + * memory footprint. + * + * @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. + * @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. + */ +#if !defined(CH_CFG_USE_CONDVARS) +#define CH_CFG_USE_CONDVARS TRUE +#endif + +/** + * @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. + */ +#if !defined(CH_CFG_USE_CONDVARS_TIMEOUT) +#define CH_CFG_USE_CONDVARS_TIMEOUT TRUE +#endif + +/** + * @brief Events Flags APIs. + * @details If enabled then the event flags APIs are included in the kernel. + * + * @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. + * @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. + */ +#if !defined(CH_CFG_USE_EVENTS_TIMEOUT) +#define CH_CFG_USE_EVENTS_TIMEOUT TRUE +#endif + +/** + * @brief Synchronous Messages APIs. + * @details If enabled then the synchronous messages APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_MESSAGES) +#define CH_CFG_USE_MESSAGES TRUE +#endif + +/** + * @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. + */ +#if !defined(CH_CFG_USE_MESSAGES_PRIORITY) +#define CH_CFG_USE_MESSAGES_PRIORITY FALSE +#endif + +/** + * @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. + */ +#if !defined(CH_CFG_USE_MAILBOXES) +#define CH_CFG_USE_MAILBOXES TRUE +#endif + +/** + * @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. + */ +#if !defined(CH_CFG_USE_MEMCORE) +#define CH_CFG_USE_MEMCORE TRUE +#endif + +/** + * @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. + */ +#if !defined(CH_CFG_USE_HEAP) +#define CH_CFG_USE_HEAP TRUE +#endif + +/** + * @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. + */ +#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. + * @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. + */ +#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 + +/** @} */ + +/*===========================================================================*/ +/** + * @name Debug options + * @{ + */ +/*===========================================================================*/ + +/** + * @brief Debug option, kernel statistics. + * + * @note The default is @p FALSE. + */ +#if !defined(CH_DBG_STATISTICS) +#define CH_DBG_STATISTICS FALSE +#endif + +/** + * @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. + */ +#if !defined(CH_DBG_SYSTEM_STATE_CHECK) +#define CH_DBG_SYSTEM_STATE_CHECK FALSE +#endif + +/** + * @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. + */ +#if !defined(CH_DBG_ENABLE_CHECKS) +#define CH_DBG_ENABLE_CHECKS FALSE +#endif + +/** + * @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. + */ +#if !defined(CH_DBG_ENABLE_ASSERTS) +#define CH_DBG_ENABLE_ASSERTS FALSE +#endif + +/** + * @brief Debug option, trace buffer. + * @details If enabled then the trace buffer is activated. + * + * @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. + * @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. + */ +#if !defined(CH_DBG_ENABLE_STACK_CHECK) +#define CH_DBG_ENABLE_STACK_CHECK FALSE +#endif + +/** + * @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. + */ +#if !defined(CH_DBG_FILL_THREADS) +#define CH_DBG_FILL_THREADS FALSE +#endif + +/** + * @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. + */ +#if !defined(CH_DBG_THREADS_PROFILING) +#define CH_DBG_THREADS_PROFILING FALSE +#endif + +/** @} */ + +/*===========================================================================*/ +/** + * @name Kernel hooks + * @{ + */ +/*===========================================================================*/ + +/** + * @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. + */ +#define CH_CFG_THREAD_EXTRA_FIELDS \ + /* Add threads custom fields here.*/ + +/** + * @brief Threads initialization hook. + * @details User initialization code added to the @p _thread_init() function. + * + * @note It is invoked from within @p _thread_init() 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/matrix/m20add/config.h b/keyboards/matrix/m20add/config.h new file mode 100644 index 000000000000..8c3f922ab91e --- /dev/null +++ b/keyboards/matrix/m20add/config.h @@ -0,0 +1,96 @@ +/** + * config.h + * + */ + +#pragma once + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0x4D58 // MX +#define PRODUCT_ID 0x20AD // 8XV2.0 Additional +#define DEVICE_VER 0x0001 +#define MANUFACTURER MATRIX +#define PRODUCT 8XV2.0 Additional + +/* key matrix size */ +#define MATRIX_ROWS 6 +#define MATRIX_COLS 16 + +#define DEF_PIN(port, pin) (((port) << 8) | pin) +#define GET_PORT(pp) (((pp) >> 8) & 0xFF) +#define GET_PIN(pp) ((pp) & 0xFF) + +#define ROW1_MASK 0x80 +#define ROW2_MASK 0x40 +#define ROW3_MASK 0x01 +#define ROW4_MASK 0x04 +#define ROW5_MASK 0x10 +#define ROW6_MASK 0x20 +#define ROW_PORT TCA6424_PORT2 + +#define COL1_MASK 0x02 +#define COL2_MASK 0x80 +#define COL3_MASK 0x40 +#define COL4_MASK 0x20 +#define COL5_MASK 0x10 +#define COL6_MASK 0x08 +#define COL7_MASK 0x04 +#define COL8_MASK 0x02 +#define COL9_MASK 0x01 +#define COL10_MASK 0x80 +#define COL11_MASK 0x40 +#define COL12_MASK 0x20 +#define COL13_MASK 0x10 +#define COL14_MASK 0x08 +#define COL15_MASK 0x04 +#define COL16_MASK 0x02 + +#define MATRIX_ROW_PINS { \ + DEF_PIN(TCA6424_PORT2, 7), \ + DEF_PIN(TCA6424_PORT2, 6), \ + DEF_PIN(TCA6424_PORT2, 0), \ + DEF_PIN(TCA6424_PORT2, 2), \ + DEF_PIN(TCA6424_PORT2, 4), \ + DEF_PIN(TCA6424_PORT2, 5) } + +#define MATRIX_COL_PINS { \ + DEF_PIN(TCA6424_PORT2, 1), \ + DEF_PIN(TCA6424_PORT1, 7), \ + DEF_PIN(TCA6424_PORT1, 6), \ + DEF_PIN(TCA6424_PORT1, 5), \ + DEF_PIN(TCA6424_PORT1, 4), \ + DEF_PIN(TCA6424_PORT1, 3), \ + DEF_PIN(TCA6424_PORT1, 2), \ + DEF_PIN(TCA6424_PORT1, 1), \ + DEF_PIN(TCA6424_PORT1, 0), \ + DEF_PIN(TCA6424_PORT0, 7), \ + DEF_PIN(TCA6424_PORT0, 6), \ + DEF_PIN(TCA6424_PORT0, 5), \ + DEF_PIN(TCA6424_PORT0, 4), \ + DEF_PIN(TCA6424_PORT0, 3), \ + DEF_PIN(TCA6424_PORT0, 2), \ + DEF_PIN(TCA6424_PORT0, 1) } + +#define UNUSED_PINS + + +#define DIODE_DIRECTION COL2ROW +#define DEBOUNCE 5 + +// i2c setting +#define USE_I2CV1 +#define I2C1_SCL 8 +#define I2C1_SDA 9 +#define I2C1_CLOCK_SPEED 400000 +#define I2C1_DUTY_CYCLE FAST_DUTY_CYCLE_2 + +// rgb light setting +#define RGB_DI_PIN B4 // reserved pin for future usage +#define RGBLED_NUM 20 +#define RGBLIGHT_ANIMATIONS + +#define DRIVER_ADDR_1 0b1110100 +#define DRIVER_COUNT 1 +#define DRIVER_LED_TOTAL RGBLED_NUM + +#define EARLY_INIT_PERFORM_BOOTLOADER_JUMP FALSE // disable jump to system bootloader diff --git a/keyboards/matrix/m20add/halconf.h b/keyboards/matrix/m20add/halconf.h new file mode 100644 index 000000000000..dca1abbaf872 --- /dev/null +++ b/keyboards/matrix/m20add/halconf.h @@ -0,0 +1,525 @@ +/* + 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. + 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 + +#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 +#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 cryptographic subsystem. + */ +#if !defined(HAL_USE_CRY) || defined(__DOXYGEN__) +#define HAL_USE_CRY FALSE +#endif + +/** + * @brief Enables the DAC subsystem. + */ +#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 +#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 FALSE +#endif + +/** + * @brief Enables the RTC subsystem. + */ +#if !defined(HAL_USE_RTC) || defined(__DOXYGEN__) +#define HAL_USE_RTC TRUE +#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 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 +#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 +#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 + +/** + * @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. */ +/*===========================================================================*/ + +/** + * @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 + +/** + * @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. */ +/*===========================================================================*/ + +/** + * @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 the zero-copy API. + */ +#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 + +/** + * @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. */ +/*===========================================================================*/ + +/** + * @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 16 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 256 bytes for both the transmission and receive + * buffers. + */ +#if !defined(SERIAL_USB_BUFFERS_SIZE) || defined(__DOXYGEN__) +#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 + +/*===========================================================================*/ +/* 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 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 +#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. */ +/*===========================================================================*/ + +/** + * @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 + +/*===========================================================================*/ +/* 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/m20add/info.json b/keyboards/matrix/m20add/info.json new file mode 100644 index 000000000000..389916ce8e9b --- /dev/null +++ b/keyboards/matrix/m20add/info.json @@ -0,0 +1,15 @@ +{ + "keyboard_name": "Matrix 2.0 Additional", + "url": "", + "maintainer": "qmk", + "width": 18.25, + "height": 6.5, + "layouts": { + "LAYOUT_tkl_ansi_tsangan": { + "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":"PrtSc", "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":"!", "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":"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":"PgUp", "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":"|", "x":13.5, "y":2.5, "w":1.5}, {"label":"Delete", "x":15.25, "y":2.5}, {"label":"End", "x":16.25, "y":2.5}, {"label":"PgDn", "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":"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":2.75}, {"label":"\u2191", "x":16.25, "y":4.5}, {"label":"Ctrl", "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":"Menu", "x":12.5, "y":5.5}, {"label":"Ctrl", "x":13.5, "y":5.5, "w":1.5}, {"label":"\u2190", "x":15.25, "y":5.5}, {"label":"\u2193", "x":16.25, "y":5.5}, {"label":"\u2192", "x":17.25, "y":5.5}] + }, + "LAYOUT_tkl_iso_tsangan": { + "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":"PrtSc", "x":15.25, "y":0}, {"label":"Scroll Lock", "x":16.25, "y":0}, {"label":"Pause", "x":17.25, "y":0}, {"label":"\u00ac", "x":0, "y":1.5}, {"label":"!", "x":1, "y":1.5}, {"label":"\"", "x":2, "y":1.5}, {"label":"\u00a3", "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":"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":"PgUp", "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":"PgDn", "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":"\u2191", "x":16.25, "y":4.5}, {"label":"Ctrl", "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":"AltGr", "x":11, "y":5.5, "w":1.5}, {"label":"Menu", "x":12.5, "y":5.5}, {"label":"Ctrl", "x":13.5, "y":5.5, "w":1.5}, {"label":"\u2190", "x":15.25, "y":5.5}, {"label":"\u2193", "x":16.25, "y":5.5}, {"label":"\u2192", "x":17.25, "y":5.5}] + } + } +} diff --git a/keyboards/matrix/m20add/keymaps/default/keymap.c b/keyboards/matrix/m20add/keymaps/default/keymap.c new file mode 100644 index 000000000000..e7ddc00cc394 --- /dev/null +++ b/keyboards/matrix/m20add/keymaps/default/keymap.c @@ -0,0 +1,26 @@ +/** + * keymap.c + */ + +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0]=LAYOUT_tkl_ansi_tsangan( + + 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, LT(1,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_tkl_ansi_tsangan( + KC_MUTE, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + KC_NLCK, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, _______, _______, _______, _______, _______, _______, _______, _______, + RESET, _______, _______, KC_F24, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_VOLU, + _______, _______, _______, KC_MPLY, _______, _______, _______, KC_MPRV, KC_VOLD, KC_MNXT), +}; diff --git a/keyboards/matrix/m20add/keymaps/iso/keymap.c b/keyboards/matrix/m20add/keymaps/iso/keymap.c new file mode 100644 index 000000000000..c57bdfcd40af --- /dev/null +++ b/keyboards/matrix/m20add/keymaps/iso/keymap.c @@ -0,0 +1,24 @@ +/** + * keymap.c + */ + +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0]=LAYOUT_tkl_iso_tsangan( + 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, LT(1,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_LGUI, 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_tkl_iso_tsangan( + KC_MUTE, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + KC_NLCK, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, _______, _______, _______, _______, _______, _______, _______, + RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_VOLU, + _______, _______, _______, KC_MPLY, _______, _______, _______, KC_MPRV, KC_VOLD, KC_MNXT), +}; diff --git a/keyboards/matrix/m20add/ld/m20add_boot.ld b/keyboards/matrix/m20add/ld/m20add_boot.ld new file mode 100644 index 000000000000..3abdd1529be4 --- /dev/null +++ b/keyboards/matrix/m20add/ld/m20add_boot.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. +*/ + +/* + * STM32F411xE memory setup. + */ +MEMORY +{ + flash0 : org = 0x08020000, len = 512k-128k + 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 = 128k + 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/matrix/m20add/m20add.c b/keyboards/matrix/m20add/m20add.c new file mode 100644 index 000000000000..b38dad27cdfd --- /dev/null +++ b/keyboards/matrix/m20add/m20add.c @@ -0,0 +1,80 @@ +/** + * m20add.c + */ + +#include "m20add.h" +#include "tca6424.h" +#include "rgb_ring.h" +#include "i2c_master.h" + +void set_pin(uint16_t pin) +{ + uint8_t data = tca6424_read_port(GET_PORT(pin)); + data |= ( 1 << GET_PIN(pin)); + tca6424_write_port(GET_PORT(pin), data); +} + +void clear_pin(uint16_t pin) +{ + uint8_t data = tca6424_read_port(GET_PORT(pin)); + data &= ~( 1 << GET_PIN(pin)); + tca6424_write_port(GET_PORT(pin), data); +} + +uint8_t read_pin(uint16_t pin) +{ + uint8_t data = tca6424_read_port(GET_PORT(pin)); + return (data & (1<BKP0R)) = REBOOT_MAGIC; +} diff --git a/keyboards/matrix/m20add/m20add.h b/keyboards/matrix/m20add/m20add.h new file mode 100644 index 000000000000..1c85dc3bdeaa --- /dev/null +++ b/keyboards/matrix/m20add/m20add.h @@ -0,0 +1,46 @@ +/** + * m20add.h + */ + +#pragma once + +#include "quantum.h" + + +#define LAYOUT_tkl_iso_tsangan( \ + 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, K116, \ + K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K214, K215, K216, \ + K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, \ + K400, K401, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, K412, K413, \ + K500, K501, K502, K503, K504, K505, K506, K507, K508, K509 \ +) { \ + { 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, KC_NO, K214, K116}, \ + { K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, K215, K216}, \ + { K400, K401, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, K412, KC_NO, K413,KC_NO}, \ + { K500, K501, K502, KC_NO, KC_NO, KC_NO, K503, KC_NO, K504, K505, K506, K507, K508, KC_NO, K509,KC_NO}, \ +} + +#define LAYOUT_tkl_ansi_tsangan( \ + 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, 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, K313, \ + K400, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, K412, K413, \ + K500, K501, K502, K503, K504, K505, K506, K507, K508, K509 \ +) { \ + { 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, K214, K116}, \ + { K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, KC_NO, K313, K215, K216}, \ + { K400, KC_NO, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, K412, KC_NO, K413,KC_NO}, \ + { K500, K501, K502, KC_NO, KC_NO, KC_NO, K503, KC_NO, K504, K505, K506, K507, K508, KC_NO, K509,KC_NO}, \ +} + +void set_pin(uint16_t pin); +void clear_pin(uint16_t pin); +uint8_t read_pin(uint16_t pin); diff --git a/keyboards/matrix/m20add/matrix.c b/keyboards/matrix/m20add/matrix.c new file mode 100644 index 000000000000..b17643fea82e --- /dev/null +++ b/keyboards/matrix/m20add/matrix.c @@ -0,0 +1,93 @@ +/** + * matrix.c + */ + +#include +#include +#include +#include "quantum.h" +#include "matrix.h" +#include "tca6424.h" +#include "m20add.h" + +static const uint16_t col_pins[MATRIX_COLS] = MATRIX_COL_PINS; + +void matrix_init_custom(void) +{ + tca6424_init(); + // set port0 + tca6424_write_config(TCA6424_PORT0, 0); + // set port1 + tca6424_write_config(TCA6424_PORT1, 0); + // set port2 + tca6424_write_config(TCA6424_PORT2, 0xF5); + + // clear output + tca6424_write_port(TCA6424_PORT0, 0); + tca6424_write_port(TCA6424_PORT1, 0); + tca6424_write_port(TCA6424_PORT2, 0); +} + + +static uint8_t row_mask[] = {ROW1_MASK,ROW2_MASK,ROW3_MASK,ROW4_MASK,ROW5_MASK,ROW6_MASK}; +static uint8_t col_mask[] = {COL1_MASK, COL2_MASK, COL3_MASK, COL4_MASK, COL5_MASK, COL6_MASK, COL7_MASK, COL8_MASK, COL9_MASK, COL10_MASK, COL11_MASK, COL12_MASK, COL13_MASK, COL14_MASK, COL15_MASK, COL16_MASK}; + +bool matrix_scan_custom(matrix_row_t current_matrix[]) +{ + bool changed = false; + uint8_t p0_data = tca6424_read_port(TCA6424_PORT0); + + for (int col = 0; col < MATRIX_COLS; col++) { + // Select col and wait for col selecton to stabilize + switch(col) { + case 0: + set_pin(col_pins[col]); + break; + case 1 ... 8: + tca6424_write_port(TCA6424_PORT1, col_mask[col]); + break; + default: + tca6424_write_port(TCA6424_PORT0, col_mask[col]|(p0_data&0x01)); + break; + } + matrix_io_delay(); + + // read row port for all rows + uint8_t row_value = tca6424_read_port(ROW_PORT); + for (uint8_t row = 0; row < MATRIX_ROWS; row++) { + uint8_t tmp = row; + // Store last value of row prior to reading + matrix_row_t last_row_value = current_matrix[tmp]; + + // Check row pin state + if (row_value & row_mask[row]) { + // Pin HI, set col bit + current_matrix[tmp] |= (1 << col); + } else { + // Pin LOW, clear col bit + current_matrix[tmp] &= ~(1 << col); + } + + // Determine if the matrix changed state + if ((last_row_value != current_matrix[tmp]) && !(changed)) { + changed = true; + } + } + // Unselect col + switch(col) { + case 0: + clear_pin(col_pins[col]); + break; + case 8: + tca6424_write_port(TCA6424_PORT1, 0); + break; + case 15: + tca6424_write_port(TCA6424_PORT0, p0_data&0x01); + break; + default: + break; + } + } + + return changed; +} diff --git a/keyboards/matrix/m20add/mcuconf.h b/keyboards/matrix/m20add/mcuconf.h new file mode 100644 index 000000000000..54a1f2661324 --- /dev/null +++ b/keyboards/matrix/m20add/mcuconf.h @@ -0,0 +1,253 @@ +/* + 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. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#ifndef MCUCONF_H +#define MCUCONF_H + +/* + * STM32F4xx 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: + * 15...0 Lowest...Highest. + * + * DMA priorities: + * 0...3 Lowest...Highest. + */ + +#define STM32F4xx_MCUCONF + +/* + * HAL driver system settings. + */ +#define STM32_NO_INIT FALSE +#define STM32_HSI_ENABLED TRUE +#define STM32_LSI_ENABLED TRUE +#define STM32_HSE_ENABLED TRUE +#define STM32_LSE_ENABLED FALSE +#define STM32_CLOCK48_REQUIRED TRUE +#define STM32_SW STM32_SW_PLL +#define STM32_PLLSRC STM32_PLLSRC_HSE +#define STM32_PLLM_VALUE 8 +#define STM32_PLLN_VALUE 192 +#define STM32_PLLP_VALUE 2 +#define STM32_PLLQ_VALUE 4 +#define STM32_HPRE STM32_HPRE_DIV1 +#define STM32_PPRE1 STM32_PPRE1_DIV2 +#define STM32_PPRE2 STM32_PPRE2_DIV2 +#define STM32_RTCSEL STM32_RTCSEL_LSI +#define STM32_RTCPRE_VALUE 8 +#define STM32_MCO1SEL STM32_MCO1SEL_HSI +#define STM32_MCO1PRE STM32_MCO1PRE_DIV1 +#define STM32_MCO2SEL STM32_MCO2SEL_SYSCLK +#define STM32_MCO2PRE STM32_MCO2PRE_DIV5 +#define STM32_I2SSRC STM32_I2SSRC_CKIN +#define STM32_PLLI2SN_VALUE 192 +#define STM32_PLLI2SR_VALUE 5 +#define STM32_PVD_ENABLE FALSE +#define STM32_PLS STM32_PLS_LEV0 +#define STM32_BKPRAM_ENABLE FALSE + +/* + * 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 6 +#define STM32_IRQ_EXTI20_PRIORITY 6 +#define STM32_IRQ_EXTI21_PRIORITY 15 +#define STM32_IRQ_EXTI22_PRIORITY 15 + +/* + * ADC driver system settings. + */ +#define STM32_ADC_ADCPRE ADC_CCR_ADCPRE_DIV4 +#define STM32_ADC_USE_ADC1 FALSE +#define STM32_ADC_ADC1_DMA_STREAM STM32_DMA_STREAM_ID(2, 4) +#define STM32_ADC_ADC1_DMA_PRIORITY 2 +#define STM32_ADC_IRQ_PRIORITY 6 +#define STM32_ADC_ADC1_DMA_IRQ_PRIORITY 6 + +/* + * 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_TIM4 TRUE +#define STM32_GPT_USE_TIM5 FALSE +#define STM32_GPT_USE_TIM9 FALSE +#define STM32_GPT_USE_TIM11 FALSE +#define STM32_GPT_TIM1_IRQ_PRIORITY 7 +#define STM32_GPT_TIM2_IRQ_PRIORITY 7 +#define STM32_GPT_TIM3_IRQ_PRIORITY 7 +#define STM32_GPT_TIM4_IRQ_PRIORITY 7 +#define STM32_GPT_TIM5_IRQ_PRIORITY 7 +#define STM32_GPT_TIM9_IRQ_PRIORITY 7 +#define STM32_GPT_TIM11_IRQ_PRIORITY 7 + +/* + * I2C driver system settings. + */ +#define STM32_I2C_USE_I2C1 TRUE +#define STM32_I2C_USE_I2C2 FALSE +#define STM32_I2C_USE_I2C3 FALSE +#define STM32_I2C_BUSY_TIMEOUT 50 +#define STM32_I2C_I2C1_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 0) +#define STM32_I2C_I2C1_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 6) +#define STM32_I2C_I2C2_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 2) +#define STM32_I2C_I2C2_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 7) +#define STM32_I2C_I2C3_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 2) +#define STM32_I2C_I2C3_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 4) +#define STM32_I2C_I2C1_IRQ_PRIORITY 5 +#define STM32_I2C_I2C2_IRQ_PRIORITY 5 +#define STM32_I2C_I2C3_IRQ_PRIORITY 5 +#define STM32_I2C_I2C1_DMA_PRIORITY 3 +#define STM32_I2C_I2C2_DMA_PRIORITY 3 +#define STM32_I2C_I2C3_DMA_PRIORITY 3 +#define STM32_I2C_DMA_ERROR_HOOK(i2cp) osalSysHalt("DMA failure") + +/* + * I2S driver system settings. + */ +#define STM32_I2S_USE_SPI2 FALSE +#define STM32_I2S_USE_SPI3 FALSE +#define STM32_I2S_SPI2_IRQ_PRIORITY 10 +#define STM32_I2S_SPI3_IRQ_PRIORITY 10 +#define STM32_I2S_SPI2_DMA_PRIORITY 1 +#define STM32_I2S_SPI3_DMA_PRIORITY 1 +#define STM32_I2S_SPI2_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 3) +#define STM32_I2S_SPI2_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 4) +#define STM32_I2S_SPI3_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 0) +#define STM32_I2S_SPI3_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 7) +#define STM32_I2S_DMA_ERROR_HOOK(i2sp) 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_USE_TIM4 FALSE +#define STM32_ICU_USE_TIM5 FALSE +#define STM32_ICU_USE_TIM9 FALSE +#define STM32_ICU_TIM1_IRQ_PRIORITY 7 +#define STM32_ICU_TIM2_IRQ_PRIORITY 7 +#define STM32_ICU_TIM3_IRQ_PRIORITY 7 +#define STM32_ICU_TIM4_IRQ_PRIORITY 7 +#define STM32_ICU_TIM5_IRQ_PRIORITY 7 +#define STM32_ICU_TIM9_IRQ_PRIORITY 7 + +/* + * 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_USE_TIM4 FALSE +#define STM32_PWM_USE_TIM5 FALSE +#define STM32_PWM_USE_TIM9 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_TIM5_IRQ_PRIORITY 7 +#define STM32_PWM_TIM9_IRQ_PRIORITY 7 + +/* + * SERIAL driver system settings. + */ +#define STM32_SERIAL_USE_USART1 FALSE +#define STM32_SERIAL_USE_USART2 FALSE +#define STM32_SERIAL_USE_USART6 FALSE +#define STM32_SERIAL_USART1_PRIORITY 12 +#define STM32_SERIAL_USART2_PRIORITY 12 +#define STM32_SERIAL_USART6_PRIORITY 12 + +/* + * SPI driver system settings. + */ +#define STM32_SPI_USE_SPI1 TRUE +#define STM32_SPI_USE_SPI2 FALSE +#define STM32_SPI_USE_SPI3 FALSE +#define STM32_SPI_SPI1_RX_DMA_STREAM STM32_DMA_STREAM_ID(2, 0) +#define STM32_SPI_SPI1_TX_DMA_STREAM STM32_DMA_STREAM_ID(2, 3) +#define STM32_SPI_SPI2_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 3) +#define STM32_SPI_SPI2_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 4) +#define STM32_SPI_SPI3_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 0) +#define STM32_SPI_SPI3_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 7) +#define STM32_SPI_SPI1_DMA_PRIORITY 1 +#define STM32_SPI_SPI2_DMA_PRIORITY 1 +#define STM32_SPI_SPI3_DMA_PRIORITY 1 +#define STM32_SPI_SPI1_IRQ_PRIORITY 10 +#define STM32_SPI_SPI2_IRQ_PRIORITY 10 +#define STM32_SPI_SPI3_IRQ_PRIORITY 10 +#define STM32_SPI_DMA_ERROR_HOOK(spip) osalSysHalt("DMA failure") + +/* + * ST driver system settings. + */ +#define STM32_ST_IRQ_PRIORITY 8 +#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_USE_USART6 FALSE +#define STM32_UART_USART1_RX_DMA_STREAM STM32_DMA_STREAM_ID(2, 5) +#define STM32_UART_USART1_TX_DMA_STREAM STM32_DMA_STREAM_ID(2, 7) +#define STM32_UART_USART2_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 5) +#define STM32_UART_USART2_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 6) +#define STM32_UART_USART6_RX_DMA_STREAM STM32_DMA_STREAM_ID(2, 2) +#define STM32_UART_USART6_TX_DMA_STREAM STM32_DMA_STREAM_ID(2, 7) +#define STM32_UART_USART1_IRQ_PRIORITY 12 +#define STM32_UART_USART2_IRQ_PRIORITY 12 +#define STM32_UART_USART6_IRQ_PRIORITY 12 +#define STM32_UART_USART1_DMA_PRIORITY 0 +#define STM32_UART_USART2_DMA_PRIORITY 0 +#define STM32_UART_USART6_DMA_PRIORITY 0 +#define STM32_UART_DMA_ERROR_HOOK(uartp) osalSysHalt("DMA failure") + +/* + * USB driver system settings. + */ +#define STM32_USB_USE_OTG1 TRUE +#define STM32_USB_OTG1_IRQ_PRIORITY 14 +#define STM32_USB_OTG1_RX_FIFO_SIZE 512 +#define STM32_USB_OTG_THREAD_PRIO LOWPRIO +#define STM32_USB_OTG_THREAD_STACK_SIZE 128 +#define STM32_USB_OTGFIFO_FILL_BASEPRI 0 + +/* + * WDG driver system settings. + */ +#define STM32_WDG_USE_IWDG FALSE + +#endif /* MCUCONF_H */ diff --git a/keyboards/matrix/m20add/readme.md b/keyboards/matrix/m20add/readme.md new file mode 100644 index 000000000000..fd3ef7fecf52 --- /dev/null +++ b/keyboards/matrix/m20add/readme.md @@ -0,0 +1,13 @@ +# 8XV2.0 Additional keyboard + +This was the upgraded version of the Matrix 8XV2.0 keyboard + +Keyboard Maintainer: [astro](https://github.com/yulei) +Hardware Supported: Matrix 8XV2.0 Additional keyboard +Hardware Availability: + +Make example for this keyboard (after setting up your build environment): + + make matrix/m20add: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/matrix/m20add/rgb_ring.c b/keyboards/matrix/m20add/rgb_ring.c new file mode 100644 index 000000000000..fa70dea7ebcb --- /dev/null +++ b/keyboards/matrix/m20add/rgb_ring.c @@ -0,0 +1,457 @@ +/** + * @file rgb_ring.c + * @author astro + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#include "rgb_ring.h" + +#include +#include "quantum.h" +#include "rgblight.h" +#include "issi/is31fl3731.h" +#include "i2c_master.h" + + +#ifndef RGBLIGHT_ENABLE +#error "MUST enable rgblight" +#endif +// rgb ring leds setting + +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}, + {0, C1_2, C2_2, C4_3}, + {0, C1_3, C2_3, C3_3}, + {0, C1_4, C2_4, C3_4}, + {0, C1_5, C2_5, C3_5}, + {0, C1_6, C2_6, C3_6}, + {0, C1_7, C2_7, C3_7}, + {0, C1_8, C2_8, C3_8}, + + {0, C9_1, C8_1, C7_1}, + {0, C9_2, C8_2, C7_2}, + {0, C9_3, C8_3, C7_3}, + {0, C9_4, C8_4, C7_4}, + {0, C9_5, C8_5, C7_5}, + {0, C9_6, C8_6, C7_6}, + {0, C9_7, C8_7, C6_6}, + {0, C9_8, C7_7, C6_7}, + + {0, C1_9, C3_10, C4_10}, + {0, C1_10, C2_10, C4_11}, + {0, C1_11, C2_11, C3_11}, + {0, C1_12, C2_12, C3_12}, +}; + +#define RING_OUTER_BEGIN 0 +#define RING_OUTER_END 15 +#define RING_OUTER_SIZE (RING_OUTER_END + 1 - RING_OUTER_BEGIN) + +#define RING_INNER_BEGIN 16 +#define RING_INNER_END 19 +#define RING_INNER_SIZE (RING_INNER_END + 1 - RING_INNER_BEGIN) + +#define SPEED_MAX 100 +#define SPEED_STEP 10 + +typedef enum { + RING_STATE_INIT, + RING_STATE_QMK, + RING_STATE_CUSTOM, +} RING_STATE; + +typedef enum { + RING_EFFECT_1, + RING_EFFECT_2, + RING_EFFECT_3, + RING_EFFECT_4, + RING_EFFECT_5, + RING_EFFECT_6, + RING_EFFECT_MAX +} RING_EFFECT; + +typedef struct { + uint8_t state; + uint8_t effect; + uint8_t speed; + uint8_t outer_index; + uint8_t inner_index; + uint8_t effect_count; + uint8_t led_begin; + uint8_t led_end; + bool led_forward; + bool led_clear; +} rgb_ring_t; + +static rgb_ring_t rgb_ring = { + .state = RING_STATE_INIT, + .effect = RING_EFFECT_1, + .speed = 10, + .outer_index = 0, + .inner_index = 0, + .effect_count = 0, + .led_begin = RING_OUTER_BEGIN, + .led_end = RING_OUTER_END, + .led_forward = true, + .led_clear = false, +}; + +static void rgb_ring_reset(void) +{ + rgb_ring.effect_count = 0; + rgb_ring.led_begin = RING_OUTER_BEGIN; + rgb_ring.led_end = RING_OUTER_END; + rgb_ring.led_forward = true; + rgb_ring.led_clear = false; +} + +extern animation_status_t animation_status; +extern rgblight_config_t rgblight_config; + +#define EFFECT_TEST_INTERVAL 50 +#define EFFECT_TEST_COUNT 5 +#define EFFECT_TEST_HUE_STEP 85 +#define EFFECT_TEST_VAL_STEP 17 +static void testing_mode(void) +{ + if (timer_elapsed(animation_status.last_timer) > EFFECT_TEST_INTERVAL) { + HSV h = {rgblight_config.hue, rgblight_config.sat, rgblight_config.val}; + RGB c = hsv_to_rgb(h); + //IS31FL3731_set_color_all(c.r, c.g, c.b); + IS31FL3731_set_color_all(0, 0, 0); + IS31FL3731_set_color(rgb_ring.outer_index+RING_OUTER_BEGIN, c.r, c.g, c.b); + h.v = EFFECT_TEST_VAL_STEP*rgb_ring.outer_index; + c = hsv_to_rgb(h); + for (uint8_t i = RING_INNER_BEGIN; i <= RING_INNER_END; i++) { + IS31FL3731_set_color(i, c.r, c.g, c.b); + } + rgb_ring.outer_index = (rgb_ring.outer_index + 1) % RING_OUTER_SIZE; + //rgb_ring.inner_index = (rgb_ring.inner_index + 1) % RING_INNER_SIZE; + + if (rgb_ring.outer_index == RING_OUTER_BEGIN) { + rgblight_config.hue += EFFECT_TEST_HUE_STEP; + rgb_ring.effect_count++; + } + animation_status.last_timer = timer_read(); + } + if (rgb_ring.effect_count > EFFECT_TEST_COUNT) { + rgb_ring_reset(); + rgb_ring.state = RING_STATE_QMK; + rgblight_set(); + } +} + +static bool need_update(uint32_t max_interval) +{ + uint32_t interval = timer_elapsed(animation_status.last_timer); + return (interval*rgb_ring.speed) > max_interval; +} + +static void update_effect(uint32_t max_count) +{ + if (rgb_ring.effect_count > max_count) { + rgb_ring_reset(); + rgb_ring.effect = (rgb_ring.effect + 1) % RING_EFFECT_MAX; + } +} + +#define EFFECT_1_INTERVAL 1000 +#define EFFECT_1_COUNT 64 +#define EFFECT_1_HUE_STEP 15 + +static void ring_effect_no_1(void) +{ + if (need_update(EFFECT_1_INTERVAL)) { + HSV h = {rgblight_config.hue, rgblight_config.sat, rgblight_config.val}; + for (uint8_t i = RING_OUTER_BEGIN; i <= RING_OUTER_END; i++) { + RGB c = hsv_to_rgb(h); + IS31FL3731_set_color(i, c.r, c.g, c.b); + } + rgblight_config.hue += EFFECT_1_HUE_STEP; + rgb_ring.effect_count++; + animation_status.last_timer = timer_read(); + } + + update_effect(EFFECT_1_COUNT); +} + +#define EFFECT_2_INTERVAL 1000 +#define EFFECT_2_COUNT 64 +#define EFFECT_2_HUE_STEP 15 + +static void ring_effect_no_2(void) +{ + if (need_update(EFFECT_2_INTERVAL)) { + IS31FL3731_set_color_all(0, 0, 0); + HSV h = {rgblight_config.hue, rgblight_config.sat, rgblight_config.val}; + RGB c = hsv_to_rgb(h); + + IS31FL3731_set_color(rgb_ring.led_begin, c.r, c.g, c.b); + IS31FL3731_set_color(rgb_ring.led_end, c.r, c.g, c.b); + + rgb_ring.led_begin = (rgb_ring.led_begin + 1) % RING_OUTER_SIZE; + rgb_ring.led_end = (rgb_ring.led_end + RING_OUTER_SIZE - 1) % RING_OUTER_SIZE; + + rgblight_config.hue += EFFECT_2_HUE_STEP; + rgb_ring.effect_count++; + animation_status.last_timer = timer_read(); + } + + update_effect(EFFECT_2_COUNT); +} + +#define EFFECT_3_INTERVAL 1000 +#define EFFECT_3_COUNT 64 +#define EFFECT_3_HUE_STEP 15 + +static void ring_effect_no_3(void) +{ + if (rgb_ring.effect_count == 0) { + IS31FL3731_set_color_all(0, 0, 0); + } + + if (need_update(EFFECT_3_INTERVAL)) { + HSV h = {rgblight_config.hue, rgblight_config.sat, rgblight_config.val}; + + if (rgb_ring.led_clear) { + IS31FL3731_set_color(rgb_ring.led_begin, 0, 0, 0); + IS31FL3731_set_color(rgb_ring.led_end, 0, 0, 0); + } else { + RGB c = hsv_to_rgb(h); + IS31FL3731_set_color(rgb_ring.led_begin, c.r, c.g, c.b); + IS31FL3731_set_color(rgb_ring.led_end, c.r, c.g, c.b); + } + + rgb_ring.led_begin = (rgb_ring.led_begin + 1) % RING_OUTER_SIZE; + if (rgb_ring.led_begin == rgb_ring.led_end) { + if (rgb_ring.led_forward) { + rgb_ring.led_begin = RING_OUTER_BEGIN; + rgb_ring.led_end = RING_OUTER_END+1; + } else { + rgb_ring.led_begin = RING_OUTER_BEGIN + RING_OUTER_SIZE/2; + rgb_ring.led_end = RING_OUTER_END+1 - RING_OUTER_SIZE/2; + } + + if (!rgb_ring.led_clear) { + rgb_ring.led_forward = !rgb_ring.led_forward; + } + + rgb_ring.led_clear = !rgb_ring.led_clear; + } + + rgb_ring.led_end = (rgb_ring.led_end + RING_OUTER_SIZE - 1) % RING_OUTER_SIZE; + + rgblight_config.hue += EFFECT_3_HUE_STEP; + rgb_ring.effect_count++; + animation_status.last_timer = timer_read(); + } + + update_effect(EFFECT_3_COUNT); +} + +#define EFFECT_4_INTERVAL 1000 +#define EFFECT_4_COUNT 64 +#define EFFECT_4_STEP 3 +static void ring_effect_no_4(void) +{ + if (need_update(EFFECT_4_INTERVAL)) { + IS31FL3731_set_color_all(0, 0, 0); + HSV h = {rgblight_config.hue, rgblight_config.sat, rgblight_config.val}; + RGB c = hsv_to_rgb(h); + + IS31FL3731_set_color(rgb_ring.led_begin, c.r, c.g, c.b); + IS31FL3731_set_color(rgb_ring.led_end, c.r, c.g, c.b); + + rgb_ring.led_begin = (rgb_ring.led_begin + EFFECT_4_STEP) % RING_OUTER_SIZE; + rgb_ring.led_end = (rgb_ring.led_end + RING_OUTER_SIZE - EFFECT_4_STEP) % RING_OUTER_SIZE; + + rgblight_config.hue += EFFECT_1_HUE_STEP; + rgb_ring.effect_count++; + animation_status.last_timer = timer_read(); + } + + update_effect(EFFECT_4_COUNT); +} + +#define EFFECT_5_INTERVAL 1000 +#define EFFECT_5_COUNT 64 +#define EFFECT_5_HUE_STEP 16 +static void ring_effect_no_5(void) +{ + if (need_update(EFFECT_5_INTERVAL)) { + IS31FL3731_set_color_all(0, 0, 0); + for (uint8_t i = RING_INNER_BEGIN; i <= RING_INNER_END; i++) { + HSV h = {rgblight_config.hue, rgblight_config.sat, rgblight_config.val}; + RGB c = hsv_to_rgb(h); + IS31FL3731_set_color(i, c.r, c.g, c.b); + } + for (uint8_t i = RING_OUTER_BEGIN; i <= RING_OUTER_END; i++) { + HSV h = {rgblight_config.hue+EFFECT_5_HUE_STEP, rgblight_config.sat, rgblight_config.val}; + RGB c = hsv_to_rgb(h); + IS31FL3731_set_color(i, c.r, c.g, c.b); + } + rgblight_config.hue += EFFECT_5_HUE_STEP; + rgb_ring.effect_count++; + animation_status.last_timer = timer_read(); + } + + update_effect(EFFECT_5_COUNT); +} + +#define EFFECT_6_INTERVAL 1000 +#define EFFECT_6_COUNT 64 +#define EFFECT_I_HUE_STEP 10 +#define EFFECT_O_HUE_STEP 10 +static void ring_effect_no_6(void) +{ + if (need_update(EFFECT_6_INTERVAL)) { + IS31FL3731_set_color_all(0, 0, 0); + for (uint8_t i = RING_INNER_BEGIN; i <= RING_INNER_END; i++) { + HSV h = {rgblight_config.hue+i*EFFECT_I_HUE_STEP, rgblight_config.sat, rgblight_config.val}; + RGB c = hsv_to_rgb(h); + IS31FL3731_set_color(i, c.r, c.g, c.b); + } + for (uint8_t i = RING_OUTER_BEGIN; i <= RING_OUTER_END; i++) { + HSV h = {rgblight_config.hue+i*EFFECT_O_HUE_STEP, rgblight_config.sat, rgblight_config.val}; + RGB c = hsv_to_rgb(h); + IS31FL3731_set_color(i, c.r, c.g, c.b); + } + rgblight_config.hue += EFFECT_I_HUE_STEP; + rgb_ring.effect_count++; + animation_status.last_timer = timer_read(); + } + + update_effect(EFFECT_6_COUNT); +} + +typedef void(*effect_fun)(void); +static effect_fun effect_funcs[RING_EFFECT_MAX] = { + ring_effect_no_1, + ring_effect_no_2, + ring_effect_no_3, + ring_effect_no_4, + ring_effect_no_5, + ring_effect_no_6, +}; + +static void custom_effects(void) +{ + effect_funcs[rgb_ring.effect](); +} + +void rgblight_call_driver(LED_TYPE *start_led, uint8_t num_leds) +{ + if (rgb_ring.state != RING_STATE_QMK) { + return; + } + + for (uint8_t i = 0; i < num_leds; i++) { + IS31FL3731_set_color(i, start_led[i].r, start_led[i].g, start_led[i].b); + } +} + + +void rgb_ring_init(void) +{ + i2c_init(); + IS31FL3731_init(DRIVER_ADDR_1); + for (int index = 0; index < DRIVER_LED_TOTAL; index++) { + bool enabled = true; + IS31FL3731_set_led_control_register(index, enabled, enabled, enabled); + } + IS31FL3731_update_led_control_registers(DRIVER_ADDR_1, 0); +} + +void rgb_ring_task(void) +{ + switch (rgb_ring.state) { + case RING_STATE_INIT: // testing mode + testing_mode(); + break; + case RING_STATE_QMK: // qmk effects + //rgblight_task(); + break; + case RING_STATE_CUSTOM: // custom effects + custom_effects(); + break; + default: + break; + }; + + IS31FL3731_update_pwm_buffers(DRIVER_ADDR_1, 0); +} + +bool process_record_kb(uint16_t keycode, keyrecord_t *record) +{ + if (record->event.pressed) { + switch(keycode) { + case RGB_MODE_FORWARD: + if (rgb_ring.state == RING_STATE_INIT) { + // in testing mode, do nothing + return false; + } else if (rgb_ring.state == RING_STATE_CUSTOM) { + // switch to qmk mode + rgblight_config.mode = 1; + rgb_ring.state = RING_STATE_QMK; + rgblight_mode(rgblight_config.mode); + return false; + } else { + // in qmk mode, switch to custom mode? + if (rgblight_config.mode >= RGBLIGHT_MODES) { + rgb_ring.state = RING_STATE_CUSTOM; + return false; + } + } + break; + case RGB_MODE_REVERSE: + if (rgb_ring.state == RING_STATE_INIT) { + // in testing mode, do nothing + return false; + } else if (rgb_ring.state == RING_STATE_CUSTOM) { + // switch to qmk mode + rgblight_config.mode = RGBLIGHT_MODES; + rgb_ring.state = RING_STATE_QMK; + rgblight_mode(rgblight_config.mode); + return false; + } else { + // in qmk mode, switch to custom mode? + if (rgblight_config.mode <= 1) { + rgb_ring.state = RING_STATE_CUSTOM; + return false; + } + } + break; + case KC_F24: + if (rgb_ring.state == RING_STATE_QMK) { + rgb_ring.state = RING_STATE_CUSTOM; + rgb_ring_reset(); + return false; + } else if (rgb_ring.state == RING_STATE_CUSTOM) { + rgb_ring.state = RING_STATE_QMK; + return false; + } + break; + default: + break; + } + } + return process_record_user(keycode, record); +} diff --git a/keyboards/matrix/m20add/rgb_ring.h b/keyboards/matrix/m20add/rgb_ring.h new file mode 100644 index 000000000000..1e96b68367cf --- /dev/null +++ b/keyboards/matrix/m20add/rgb_ring.h @@ -0,0 +1,23 @@ +/** + * @file rgb_ring.h + * @author astro + * @brief effects for the rgb ring + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License 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 rgb_ring_init(void); +void rgb_ring_task(void); diff --git a/keyboards/matrix/m20add/rules.mk b/keyboards/matrix/m20add/rules.mk new file mode 100644 index 000000000000..6dba153932cb --- /dev/null +++ b/keyboards/matrix/m20add/rules.mk @@ -0,0 +1,52 @@ +## chip/board settings +# - the next two should match the directories in +# /os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES) +MCU_FAMILY = STM32 +MCU_SERIES = STM32F4xx + +# Linker script to use +# - it should exist either in /os/common/ports/ARMCMx/compilers/GCC/ld/ +# or /ld/ +MCU_LDSCRIPT = m20add_boot + +# Startup code to use +# - it should exist in /os/common/startup/ARMCMx/compilers/GCC/mk/ +MCU_STARTUP = stm32f4xx + +# Board: it should exist either in /os/hal/boards/ +# or /boards +BOARD = m20add_bd + +# 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.*/ +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 + +# 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 +NKRO_ENABLE = no # USB Nkey Rollover +NO_USB_STARTUP_CHECK = yes # Disable initialization only when usb is plugged in + +RGBLIGHT_ENABLE = yes + +CUSTOM_MATRIX = lite +# project specific files +SRC += matrix.c tca6424.c rgb_ring.c issi/is31fl3731.c +QUANTUM_LIB_SRC += i2c_master.c diff --git a/keyboards/matrix/m20add/tca6424.c b/keyboards/matrix/m20add/tca6424.c new file mode 100644 index 000000000000..38cea9f15f5c --- /dev/null +++ b/keyboards/matrix/m20add/tca6424.c @@ -0,0 +1,115 @@ +/** + * @file tca6424.c + * @author astro + * @brief driver for the tca6424 + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#include "tca6424.h" +#include "i2c_master.h" + +#define TCA6424_INPUT_PORT0 0x0 +#define TCA6424_INPUT_PORT1 0x01 +#define TCA6424_INPUT_PORT2 0x02 + +#define TCA6424_OUTPUT_PORT0 0x04 +#define TCA6424_OUTPUT_PORT1 0x05 +#define TCA6424_OUTPUT_PORT2 0x06 + +#define TCA6424_POLARITY_PORT0 0x08 +#define TCA6424_POLARITY_PORT1 0x09 +#define TCA6424_POLARITY_PORT2 0x0A + +#define TCA6424_CONF_PORT0 0x0C +#define TCA6424_CONF_PORT1 0x0D +#define TCA6424_CONF_PORT2 0x0E + +#define TIMEOUT 100 + +void tca6424_init(void) +{ + i2c_init(); +} + +static void write_port(uint8_t p, uint8_t d) +{ + i2c_writeReg(TCA6424_ADDR, p, &d, 1, TIMEOUT); +} + +static uint8_t read_port(uint8_t port) +{ + uint8_t data = 0; + i2c_readReg(TCA6424_ADDR, port, &data, 1, TIMEOUT); + return data; +} + +void tca6424_write_config(TCA6424_PORT port, uint8_t data) +{ + switch(port) { + case TCA6424_PORT0: + write_port(TCA6424_CONF_PORT0, data); + break; + case TCA6424_PORT1: + write_port(TCA6424_CONF_PORT1, data); + break; + case TCA6424_PORT2: + write_port(TCA6424_CONF_PORT2, data); + break; + } +} + +void tca6424_write_polarity(TCA6424_PORT port, uint8_t data) +{ + switch(port) { + case TCA6424_PORT0: + write_port(TCA6424_POLARITY_PORT0, data); + break; + case TCA6424_PORT1: + write_port(TCA6424_POLARITY_PORT1, data); + break; + case TCA6424_PORT2: + write_port(TCA6424_POLARITY_PORT2, data); + break; + } +} + +void tca6424_write_port(TCA6424_PORT port, uint8_t data) +{ + switch(port) { + case TCA6424_PORT0: + write_port(TCA6424_OUTPUT_PORT0, data); + break; + case TCA6424_PORT1: + write_port(TCA6424_OUTPUT_PORT1, data); + break; + case TCA6424_PORT2: + write_port(TCA6424_OUTPUT_PORT2, data); + break; + } +} + +uint8_t tca6424_read_port(TCA6424_PORT port) +{ + switch(port) { + case TCA6424_PORT0: + return read_port(TCA6424_INPUT_PORT0); + case TCA6424_PORT1: + return read_port(TCA6424_INPUT_PORT1); + case TCA6424_PORT2: + return read_port(TCA6424_INPUT_PORT2); + } + + return 0; +} diff --git a/keyboards/matrix/m20add/tca6424.h b/keyboards/matrix/m20add/tca6424.h new file mode 100644 index 000000000000..6153265ed78e --- /dev/null +++ b/keyboards/matrix/m20add/tca6424.h @@ -0,0 +1,40 @@ +/** + * @file tca6424.h + * @author astro + * @brief driver for the tca6424 + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License 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 + +#ifndef TCA6424_ADDR + #define TCA6424_ADDR 0x44 +#endif + +typedef enum { + TCA6424_PORT0 = 0, + TCA6424_PORT1, + TCA6424_PORT2, +} TCA6424_PORT; + +void tca6424_init(void); + +void tca6424_write_config(TCA6424_PORT port, uint8_t data); +void tca6424_write_polarity(TCA6424_PORT port, uint8_t data); + +void tca6424_write_port(TCA6424_PORT port, uint8_t data); +uint8_t tca6424_read_port(TCA6424_PORT port); From 42eeb315a5424fc576239b7e57061affc2ffa8ab Mon Sep 17 00:00:00 2001 From: Michael Schwingen Date: Sun, 23 Aug 2020 01:02:16 +0200 Subject: [PATCH 626/930] [Keyboard] add support for ModelM USB board (#9846) * add support for ModelM USB board * EMI improvement: remove unnecessary toggling of MOSI pin * address review comments * Update keyboards/mschwingen/modelm/rules.mk Co-authored-by: James Young <18669334+noroadsleft@users.noreply.github.com> * Update keyboards/mschwingen/modelm/rules.mk Co-authored-by: James Young <18669334+noroadsleft@users.noreply.github.com> * Update keyboards/mschwingen/modelm/config.h Co-authored-by: James Young <18669334+noroadsleft@users.noreply.github.com> * Update keyboards/mschwingen/modelm/config.h Co-authored-by: James Young <18669334+noroadsleft@users.noreply.github.com> * Update keyboards/mschwingen/modelm/rules.mk Co-authored-by: Drashna Jaelre * Update keyboards/mschwingen/modelm/keymaps/default/keymap.c Co-authored-by: Drashna Jaelre * update printf usage * add comment * EMI improvement: remove unnecessary toggling of MOSI signal * remove trailing space * use shorter macros as suggested in review by noroadsleft, re-format table to line up columns * Update keyboards/mschwingen/modelm/config.h Co-authored-by: Ryan * Update keyboards/mschwingen/modelm/rules.mk Co-authored-by: Ryan * Update keyboards/mschwingen/modelm/rules.mk Co-authored-by: Ryan * Update keyboards/mschwingen/modelm/rules.mk Co-authored-by: Ryan * Update keyboards/mschwingen/modelm/README.md Co-authored-by: Ryan * Update keyboards/mschwingen/modelm/README.md Co-authored-by: Ryan * Apply suggestions from code review use spi_read from core insteads of our own copy Co-authored-by: Ryan * include spi_master.c to use spi_read() * Update keyboards/mschwingen/modelm/README.md Co-authored-by: James Young <18669334+noroadsleft@users.noreply.github.com> * Apply suggestions from code review: correct indenting in keymap Co-authored-by: James Young <18669334+noroadsleft@users.noreply.github.com> * Apply suggestions from code review use automatic variant defines from makefile instead of defining our own Co-authored-by: Drashna Jaelre * Update keyboards/mschwingen/modelm/rules.mk: use QUANTUM_LIB_SRC for uart.c Co-authored-by: Drashna Jaelre Co-authored-by: Michael Schwingen Co-authored-by: James Young <18669334+noroadsleft@users.noreply.github.com> Co-authored-by: Drashna Jaelre Co-authored-by: Ryan --- keyboards/mschwingen/modelm/README.md | 25 ++ keyboards/mschwingen/modelm/config.h | 91 ++++++++ .../modelm/keymaps/default/keymap.c | 86 +++++++ keyboards/mschwingen/modelm/led_ffc/rules.mk | 1 + .../mschwingen/modelm/led_wired/rules.mk | 1 + .../mschwingen/modelm/led_ws2812/rules.mk | 2 + keyboards/mschwingen/modelm/matrix.c | 117 ++++++++++ keyboards/mschwingen/modelm/modelm.c | 214 ++++++++++++++++++ keyboards/mschwingen/modelm/modelm.h | 58 +++++ keyboards/mschwingen/modelm/rules.mk | 43 ++++ 10 files changed, 638 insertions(+) create mode 100644 keyboards/mschwingen/modelm/README.md create mode 100644 keyboards/mschwingen/modelm/config.h create mode 100644 keyboards/mschwingen/modelm/keymaps/default/keymap.c create mode 100644 keyboards/mschwingen/modelm/led_ffc/rules.mk create mode 100644 keyboards/mschwingen/modelm/led_wired/rules.mk create mode 100644 keyboards/mschwingen/modelm/led_ws2812/rules.mk create mode 100644 keyboards/mschwingen/modelm/matrix.c create mode 100644 keyboards/mschwingen/modelm/modelm.c create mode 100644 keyboards/mschwingen/modelm/modelm.h create mode 100644 keyboards/mschwingen/modelm/rules.mk diff --git a/keyboards/mschwingen/modelm/README.md b/keyboards/mschwingen/modelm/README.md new file mode 100644 index 000000000000..f4cb3606252f --- /dev/null +++ b/keyboards/mschwingen/modelm/README.md @@ -0,0 +1,25 @@ +# atmega32U4 board for IBM Model M + +![modelm](https://raw.githubusercontent.com/mschwingen/hardware/master/modelm-usb/images/PCB.jpg) + +This is a configuration of QMK intended to be used with the [Model M USB PCB](https://github.com/mschwingen/hardware/tree/master/modelm-usb). + +* Keyboard Maintainer: [Michael Schwingen](https://github.com/mschwingen/) +* Hardware Supported: [Model M USB PCB](https://github.com/mschwingen/hardware/tree/master/modelm-usb) +* Hardware Availability: need to build your own. + +Make example for this keyboard (after setting up your build environment), run one of: + + make mschwingen/modelm/led_wired:default + make mschwingen/modelm/led_ffc:default + make mschwingen/modelm/led_ws2812:default + +flash: + + make mschwingen/modelm/led_wired:default:flash + make mschwingen/modelm/led_ffc:default:flash + make mschwingen/modelm/led_ws2812:default:flash + +Bootloader: do not use the QMK bootloader, use the bootloader from [here](https://github.com/mschwingen/modelm-lufa-bootloader) + +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/mschwingen/modelm/config.h b/keyboards/mschwingen/modelm/config.h new file mode 100644 index 000000000000..07881cd211f9 --- /dev/null +++ b/keyboards/mschwingen/modelm/config.h @@ -0,0 +1,91 @@ +/* + * Copyright 2020 Michael Schwingen + + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License 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 0x558E +#define DEVICE_VER 0x0001 +#define MANUFACTURER mschwingen +#define PRODUCT IBM Model M 101/102 + +/* key matrix size */ +#define MATRIX_ROWS 16 +#define MATRIX_COLS 8 + +/* pins for external shift registers */ +#define SR_LOAD_PIN B0 +#define SR_CLK_PIN B1 +#define SR_DIN_PIN B3 +#define SR_DOUT_PIN B2 + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed (5 is default) */ +#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 +#define NORMAL_PRINT +//#define USER_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 DEBUG_MATRIX_SCAN_RATE +#define DYNAMIC_MACRO_NO_NESTING + +#define QMK_LED E6 + +#define MODELM_LED1 B5 +#define MODELM_LED2 B6 +#define MODELM_LED3 D0 + +#if defined(KEYBOARD_mschwingen_modelm_led_wired) +# define MODELM_LED_CAPSLOCK MODELM_LED1 +# define MODELM_LED_SCROLLOCK MODELM_LED2 +# define MODELM_LED_NUMLOCK MODELM_LED3 +#elif defined(KEYBOARD_mschwingen_modelm_led_ffc) +# define MODELM_LED_CAPSLOCK MODELM_LED2 +# define MODELM_LED_SCROLLOCK MODELM_LED3 +# define MODELM_LED_NUMLOCK MODELM_LED1 +#elif defined(KEYBOARD_mschwingen_modelm_led_ws2812) +#else +# error one of MODELM_LEDS_FFC, MODELM_LEDS_WIRED or MODELM_LEDS_WS2812 must be set! +#endif + +// 3* WS2812 LEDs instead of singlecolor GPIO LEDs +#define RGB_DI_PIN B6 +#define RGBLED_NUM 3 + +// disabled, needs PCB patch. +//#define C6_AUDIO +//#define NO_MUSIC_MODE diff --git a/keyboards/mschwingen/modelm/keymaps/default/keymap.c b/keyboards/mschwingen/modelm/keymaps/default/keymap.c new file mode 100644 index 000000000000..7f43746db9d0 --- /dev/null +++ b/keyboards/mschwingen/modelm/keymaps/default/keymap.c @@ -0,0 +1,86 @@ +/* Copyright 2019 ashpil + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public 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 { + _BL0, + _BL1, + _FL, + _MS +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_BL0] = LAYOUT( /* Base layer - Windows key instead of CapsLock, hold ESC for special functions */ + LT(_FL,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_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_DEL , KC_END , KC_PGDN, KC_P7, KC_P8 , KC_P9 , KC_PPLS, + KC_LWIN, 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_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_LCTL, KC_LALT, KC_SPC , KC_RALT, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT, KC_P0, KC_PDOT + ), + + [_BL1] = LAYOUT( /* Base layer - standard layout without any special functions */ + 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_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_DEL , KC_END , KC_PGDN, 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_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_LCTL, KC_LALT, KC_SPC , KC_RALT, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT, KC_P0, KC_PDOT + ), + + [_FL] = LAYOUT( /* special functions layer */ + // F1: dyn. macro 1 play + // F2: dyn. macro 2 play + // F3: dyn. macro 1 record + // F4: dyn. macro 2 record + // F5: dyn. macro record stop + // Capslock: CapsLock (really!) + // ~: Key Lock + // Cursor: Media Pref / Next / Volume Up / Volume Down + // Space: Media Play / Pause + // m: enter mouse layer + _______, DM_PLY1, DM_PLY2, DM_REC1, DM_REC2, DM_RSTP, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + KC_LOCK, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + KC_CAPS, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, TG(_MS), _______, _______, _______, _______, KC_VOLU, _______, _______, _______, _______, + _______, _______, KC_MPLY, _______, _______, KC_MPRV, KC_VOLD, KC_MNXT, _______, _______ + ), + + [_MS] = LAYOUT( /* mouse key layer */ + // Cursor: mouse, INS/HOME/PgUp: Mouse Accel, Del, End, PageDn: mouse buttons + TG(_MS), _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_ACL0, KC_ACL1, KC_ACL2, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_BTN1, KC_BTN3, KC_BTN2, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MS_U, _______, _______, _______, _______, + _______, _______, _______, _______, _______, KC_MS_L, KC_MS_D, KC_MS_R, _______, _______ + ) +}; + +void keyboard_post_init_user(void) { + // Customise these values to desired behaviour + //debug_enable=true; + //debug_matrix=true; + //debug_keyboard=true; + //debug_mouse=true; +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + // If console is enabled, it will print the matrix position and status of each key pressed + dprintf("KL: kc: %u, col: %u, row: %u, pressed: %u\n", keycode, record->event.key.col, record->event.key.row, record->event.pressed); + return true; +} diff --git a/keyboards/mschwingen/modelm/led_ffc/rules.mk b/keyboards/mschwingen/modelm/led_ffc/rules.mk new file mode 100644 index 000000000000..8b137891791f --- /dev/null +++ b/keyboards/mschwingen/modelm/led_ffc/rules.mk @@ -0,0 +1 @@ + diff --git a/keyboards/mschwingen/modelm/led_wired/rules.mk b/keyboards/mschwingen/modelm/led_wired/rules.mk new file mode 100644 index 000000000000..8b137891791f --- /dev/null +++ b/keyboards/mschwingen/modelm/led_wired/rules.mk @@ -0,0 +1 @@ + diff --git a/keyboards/mschwingen/modelm/led_ws2812/rules.mk b/keyboards/mschwingen/modelm/led_ws2812/rules.mk new file mode 100644 index 000000000000..424388fd8f6f --- /dev/null +++ b/keyboards/mschwingen/modelm/led_ws2812/rules.mk @@ -0,0 +1,2 @@ +# variant for WS2812 LEDs +SRC += ws2812.c diff --git a/keyboards/mschwingen/modelm/matrix.c b/keyboards/mschwingen/modelm/matrix.c new file mode 100644 index 000000000000..ef725a61eb72 --- /dev/null +++ b/keyboards/mschwingen/modelm/matrix.c @@ -0,0 +1,117 @@ +/* + * Copyright 2020 Michael Schwingen + + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public 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 "util.h" +#include "matrix.h" +#include "debounce.h" +#include "quantum.h" +#include "spi_master.h" +#include "print.h" +#include "modelm.h" + +#define DEBUG 0 + +#define SPI_TIMEOUT 100 + +/* Keyboard Matrix Assignments */ +static uint16_t row_bits[MATRIX_ROWS] = { + 0x4000, 0x8000, 0x2000, 0x1000, 0x0800, 0x0400, 0x0100, 0x0200, + 0x0040, 0x0080, 0x0020, 0x0010, 0x0008, 0x0004, 0x0001, 0x0002}; + +static const pin_t col_pins[MATRIX_COLS] = {D1, D4, D7, B4, F7, F6, F5, F4}; + +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 bool read_rows_on_col(matrix_row_t current_matrix[], uint8_t current_col) { + uint16_t row_data; + bool matrix_changed = false; + + // Select col and wait for col selecton to stabilize + select_col(current_col); + matrix_io_delay(); + + writePinLow(SR_LOAD_PIN); + writePinHigh(SR_LOAD_PIN); + + row_data = spi_read() << 8; + row_data |= spi_read(); + +#if DEBUG + phex(~row_data); + uprint(" "); +#endif + // 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]; + matrix_row_t current_row_value = last_row_value; + + // Check row pin state + if ((row_data & row_bits[row_index]) == 0) { + // Pin LO, set col bit + current_row_value |= (MATRIX_ROW_SHIFTER << current_col); + } else { + // Pin HI, clear col bit + current_row_value &= ~(MATRIX_ROW_SHIFTER << current_col); + } + + // Determine if the matrix changed state + if ((last_row_value != current_row_value)) { + matrix_changed = true; + current_matrix[row_index] = current_row_value; + } + } + + // Unselect col + unselect_col(current_col); + + return matrix_changed; +} + +void matrix_init_custom(void) { + unselect_cols(); + + // set 4MHz SPI clock + SPSR = 0; + SPCR = _BV(SPE) | _BV(MSTR) | _BV(CPOL); +} + +bool matrix_scan_custom(matrix_row_t current_matrix[]) { + bool changed = false; + +#if DEBUG + uprint("\r\nScan: "); +#endif + // Set col, read rows + for (uint8_t current_col = 0; current_col < MATRIX_COLS; current_col++) { + changed |= read_rows_on_col(current_matrix, current_col); + } + update_layer_leds(); + return changed; +} diff --git a/keyboards/mschwingen/modelm/modelm.c b/keyboards/mschwingen/modelm/modelm.c new file mode 100644 index 000000000000..5756a95170bc --- /dev/null +++ b/keyboards/mschwingen/modelm/modelm.c @@ -0,0 +1,214 @@ +/* + * Copyright 2020 Michael Schwingen + + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public 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 "modelm.h" +#include "uart.h" +#include "print.h" +#include "sendchar.h" +#include "ws2812.h" +#include "modelm.h" +#include "sleep_led.h" + +#ifdef UART_DEBUG +# undef sendchar +static int8_t capture_sendchar(uint8_t c) { + // sendchar(c); + uart_putchar(c); + return 0; +} +#endif + +static uint16_t blink_cycle_timer; +static bool blink_state = false; +static uint8_t isRecording = 0; + +#ifdef KEYBOARD_mschwingen_modelm_led_ws2812 +# if RGBLED_NUM < 3 +# error we need at least 3 RGB LEDs! +# endif +static cRGB led[RGBLED_NUM] = {{255, 255, 255}, {255, 255, 255}, {255, 255, 255}}; + +# define BRIGHT 32 +# define DIM 6 + +static const cRGB black = {.r = 0, .g = 0, .b = 0}; + +static const cRGB green = {.r = 0, .g = BRIGHT, .b = 0}; +static const cRGB lgreen = {.r = 0, .g = DIM, .b = 0}; + +static const cRGB red = {.r = BRIGHT, .g = 0, .b = 0}; +static const cRGB lred = {.r = DIM, .g = 0, .b = 0}; + +static const cRGB blue = {.r = 0, .g = 0, .b = BRIGHT}; +static const cRGB lblue = {.r = 0, .g = 0, .b = DIM}; + +static const cRGB turq = {.r = 0, .g = BRIGHT, .b = BRIGHT}; +static const cRGB lturq = {.r = 0, .g = DIM, .b = DIM}; + +static const cRGB white = {.r = BRIGHT, .g = BRIGHT, .b = BRIGHT}; + +static led_t led_state; +static uint8_t layer; +static uint8_t default_layer; +#endif + +// we need our own sleep_led_* implementation to get callbacks on USB +// suspend/resume in order to completely turn off WS2812 LEDs +static bool suspend_active = false; +void sleep_led_init(void) {} + +void sleep_led_toggle(void) {} + +void sleep_led_disable(void) { + suspend_active = false; + writePinHigh(QMK_LED); +} + +void sleep_led_enable(void) { + suspend_active = true; + writePinLow(QMK_LED); +#ifdef KEYBOARD_mschwingen_modelm_led_ws2812 + led[0] = black; + led[1] = black; + led[2] = black; + ws2812_setleds(led, RGBLED_NUM); +#endif +} + +void keyboard_pre_init_kb(void) { +#ifdef KEYBOARD_mschwingen_modelm_led_ws2812 + ws2812_setleds(led, RGBLED_NUM); +#else + /* Set status LEDs pins to output and Low (on) */ + setPinOutput(MODELM_LED_CAPSLOCK); + setPinOutput(MODELM_LED_SCROLLOCK); + setPinOutput(MODELM_LED_NUMLOCK); + writePinLow(MODELM_LED_CAPSLOCK); + writePinLow(MODELM_LED_SCROLLOCK); + writePinLow(MODELM_LED_NUMLOCK); +#endif + setPinOutput(QMK_LED); + writePinHigh(QMK_LED); + _delay_ms(50); +#ifdef UART_DEBUG + uart_init(115200); + print_set_sendchar(capture_sendchar); + uprintf("\r\nHello world!\r\n"); +#endif + + setPinOutput(SR_LOAD_PIN); + setPinOutput(SR_CLK_PIN); + setPinOutput(SR_DOUT_PIN); // MOSI - unused + writePinLow(SR_CLK_PIN); +} + +#ifdef KEYBOARD_mschwingen_modelm_led_ws2812 +static void led_update_rgb(void) { + if (isRecording && blink_state) { + led[0] = white; + } else { + switch (default_layer) { + case 0: + led[0] = led_state.num_lock ? blue : lblue; + break; + case 1: + led[0] = led_state.num_lock ? green : black; + break; + } + } + + led[1] = led_state.caps_lock ? green : black; + + switch (layer) { + case 0: + case 1: + default: + led[2] = led_state.scroll_lock ? green : black; + break; + case 2: + led[2] = led_state.scroll_lock ? red : lred; + break; + case 3: + led[2] = led_state.scroll_lock ? turq : lturq; + break; + } + if (!suspend_active) { + ws2812_setleds(led, RGBLED_NUM); + } +} + +bool led_update_kb(led_t state) { + dprintf("LED Update: %d %d %d", led_state.num_lock, led_state.caps_lock, led_state.scroll_lock); + led_state = state; + led_update_rgb(); + + return true; +} + +void update_layer_leds(void) { + static uint8_t old_layer = 255; + static uint8_t old_default_layer = 255; + + layer = biton32(layer_state); + default_layer = biton32(default_layer_state); + + if (isRecording && timer_elapsed(blink_cycle_timer) > 150) { + blink_state = !blink_state; + blink_cycle_timer = timer_read(); + old_layer = 255; // fallthrough next check + } + + if (layer == old_layer && default_layer == old_default_layer) { + return; + } + old_layer = layer; + old_default_layer = default_layer; + dprintf("Layer change: %d %d", default_layer, layer); + led_update_rgb(); +} + +/*****************************************************************************/ +#else // classic LEDs on GPIO +bool led_update_kb(led_t led_state) { + dprintf("LED Update: %d %d %d", led_state.num_lock, led_state.caps_lock, led_state.scroll_lock); + + if (led_update_user(led_state)) { + if (!isRecording) writePin(MODELM_LED_NUMLOCK, !led_state.num_lock); + writePin(MODELM_LED_CAPSLOCK, !led_state.caps_lock); + writePin(MODELM_LED_SCROLLOCK, !led_state.scroll_lock); + } + return true; +} + +void update_layer_leds(void) { + if (isRecording && timer_elapsed(blink_cycle_timer) > 150) { + blink_state = !blink_state; + blink_cycle_timer = timer_read(); + writePin(MODELM_LED_NUMLOCK, blink_state); + } +} + +#endif + +void dynamic_macro_record_start_user(void) { + isRecording++; + blink_cycle_timer = timer_read(); +} + +void dynamic_macro_record_end_user(int8_t direction) { + if (isRecording) isRecording--; +} diff --git a/keyboards/mschwingen/modelm/modelm.h b/keyboards/mschwingen/modelm/modelm.h new file mode 100644 index 000000000000..04b6b6112570 --- /dev/null +++ b/keyboards/mschwingen/modelm/modelm.h @@ -0,0 +1,58 @@ +/* + * Copyright 2020 Michael Schwingen + + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#pragma once + +extern void update_layer_leds(void); + +#include "quantum.h" + +/* This a shortcut to help you visually see your layout. + * The first section contains "names" for physical keys of the keyboard + * and defines their position on the board. + * The second section defines position of the keys on the switch matrix + * (where COLUMNS and ROWS crosses). */ + +/* universla layout for both 101 and 102-key versions */ +#define LAYOUT( \ + K5A, K5B, K5C, K5D, K5E, K5F, K5G, K5H, K5I, K5J, K5K, K5L, K5M, K5N, K5O, K5P, \ + \ + K4A, K4B, K4C, K4D, K4E, K4F, K4G, K4H, K4I, K4J, K4K, K4L, K4M, K4N, K4O, K4P, K4Q, K4R, K4S, K4T, K4U, \ + K3A, K3B, K3C, K3D, K3E, K3F, K3G, K3H, K3I, K3J, K3K, K3L, K3M, K3N, K3O, K3P, K3Q, K3R, K3S, K3T, K3U, \ + K2A, K2B, K2C, K2D, K2E, K2F, K2G, K2H, K2I, K2J, K2K, K2L, K2M, K2N, K2O, K2P, K2Q, \ + K1A, K1B, K1C, K1D, K1E, K1F, K1G, K1H, K1I, K1J, K1K, K1L, K1M, K1N, K1O, K1P, K1Q, K1R, \ + K0A, K0B, K0C, K0D, K0E, K0F, K0G, K0H, K0I, K0J \ +) \ + {/* COL0 ............ COL7 */ \ + { K0D , KC_NO, KC_NO, K5O , K5N , KC_NO, KC_NO, K0B }, /* ROW0 */ \ + { K0F , K5P , K1R , K3U , K3P , K4P , KC_NO, K1N }, \ + { K4U , K4T , K1Q , K3T , K3Q , K4Q , K2Q , K0J }, \ + { K0H , K4S , K1P , K3S , K5M , K4O , K2P , K0I }, \ + { K0G , K4R , K1O , K3R , K5L , K3O , K2O , KC_NO }, \ + { K1L , K2M , K2K , K3K , K4K , K4L , K3L , K2L }, \ + { KC_NO, K1K , K2J , K3J , K4J , K5I , K5H , KC_NO }, \ + { KC_NO, K1J , K2I , K3I , K4I , K4M , K3M , K5G }, \ + { K1H , K1I , K2H , K3H , K4H , K4G , K3G , K2G }, \ + { K0C , K2N , K3N , KC_NO, K5K , K5J , K4N , K5F }, \ + { K1G , K1F , K2E , K3E , K4E , K4F , K3F , K2F }, \ + { KC_NO, K1E , K2D , K3D , K4D , K5C , K5D , K5E }, \ + { KC_NO, K1D , K2C , K3C , K4C , K5B , K2A , K1B }, \ + { KC_NO, K1C , K2B , K3B , K4B , K4A , K3A , K5A }, \ + { KC_NO, K1M , KC_NO, KC_NO, KC_NO, KC_NO, K1A , KC_NO }, \ + { KC_NO, K0E , KC_NO, KC_NO, KC_NO, K0A , KC_NO, KC_NO }, /* ROW15 */ \ +} + diff --git a/keyboards/mschwingen/modelm/rules.mk b/keyboards/mschwingen/modelm/rules.mk new file mode 100644 index 000000000000..f3af26eeeb0f --- /dev/null +++ b/keyboards/mschwingen/modelm/rules.mk @@ -0,0 +1,43 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +BOOTLOADER = lufa-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 = 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 +BLUETOOTH_ENABLE = no # Enable Bluetooth +AUDIO_ENABLE = no # Audio output + +CUSTOM_MATRIX = lite +KEY_LOCK_ENABLE = yes + +DYNAMIC_MACRO_ENABLE = yes + +UART_DEBUG = no + +SRC += matrix.c +QUANTUM_LIB_SRC += $(COMMON_DIR)/uart.c \ + spi_master.c + +OPT_DEFS += -DSLEEP_LED_ENABLE # we need our own sleep callbacks to turn of WS2812 LEDs + +LTO_ENABLE = yes + +ifeq ($(strip $(UART_DEBUG)), yes) + OPT_DEFS += -DUART_DEBUG +endif + +DEFAULT_FOLDER = mschwingen/modelm/led_wired From a7cb1ceade0908122862a119e1f50d56a67cb2b8 Mon Sep 17 00:00:00 2001 From: kakunpc <15257475+kakunpc@users.noreply.github.com> Date: Sun, 23 Aug 2020 08:18:53 +0900 Subject: [PATCH 627/930] [Keyboard] Add "rabbit capture plan" keyboard (#9895) * add rabbit_capture_plan * update keymap.c * Update keyboards/rabbit_capture_plan/paw3204.c Co-authored-by: Drashna Jaelre * move bto_to keymap * remove paw3204 Co-authored-by: Drashna Jaelre --- keyboards/rabbit_capture_plan/config.h | 148 +++++++++ keyboards/rabbit_capture_plan/info.json | 310 ++++++++++++++++++ .../keymaps/default/keymap.c | 39 +++ .../keymaps/default/readme.md | 1 + .../rabbit_capture_plan/keymaps/via/keymap.c | 48 +++ .../rabbit_capture_plan/keymaps/via/readme.md | 1 + .../rabbit_capture_plan/keymaps/via/rules.mk | 1 + .../rabbit_capture_plan/rabbit_capture_plan.c | 17 + .../rabbit_capture_plan/rabbit_capture_plan.h | 47 +++ keyboards/rabbit_capture_plan/readme.md | 19 ++ keyboards/rabbit_capture_plan/rules.mk | 24 ++ 11 files changed, 655 insertions(+) create mode 100644 keyboards/rabbit_capture_plan/config.h create mode 100644 keyboards/rabbit_capture_plan/info.json create mode 100644 keyboards/rabbit_capture_plan/keymaps/default/keymap.c create mode 100644 keyboards/rabbit_capture_plan/keymaps/default/readme.md create mode 100644 keyboards/rabbit_capture_plan/keymaps/via/keymap.c create mode 100644 keyboards/rabbit_capture_plan/keymaps/via/readme.md create mode 100644 keyboards/rabbit_capture_plan/keymaps/via/rules.mk create mode 100644 keyboards/rabbit_capture_plan/rabbit_capture_plan.c create mode 100644 keyboards/rabbit_capture_plan/rabbit_capture_plan.h create mode 100644 keyboards/rabbit_capture_plan/readme.md create mode 100644 keyboards/rabbit_capture_plan/rules.mk diff --git a/keyboards/rabbit_capture_plan/config.h b/keyboards/rabbit_capture_plan/config.h new file mode 100644 index 000000000000..b622d33c1ad6 --- /dev/null +++ b/keyboards/rabbit_capture_plan/config.h @@ -0,0 +1,148 @@ +/* +Copyright 2020 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 + VID & PID are lisenced from microchip sublisence program, Don't use other project! */ +#define VENDOR_ID 0x04D8 +#define PRODUCT_ID 0xEB59 +#define DEVICE_VER 0x0001 +#define MANUFACTURER kakunpc +#define PRODUCT rabbit_capture_plan + +/* 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 { D4, C6, D7, E6, B4 } +#define MATRIX_COL_PINS { F4, F5, F6, F7, B1, B3, B2, B6 } +#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 BACKLIGHT_PIN B7 +//#define BACKLIGHT_LEVELS 3 +//#define BACKLIGHT_BREATHING + +#define RGB_DI_PIN D3 +#ifdef RGB_DI_PIN +#define RGBLED_SPLIT {32, 37} +# define RGBLED_NUM 69 +# 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 + +/* 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 useful 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 + +/* + * 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 */ +#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/rabbit_capture_plan/info.json b/keyboards/rabbit_capture_plan/info.json new file mode 100644 index 000000000000..271a87ffee47 --- /dev/null +++ b/keyboards/rabbit_capture_plan/info.json @@ -0,0 +1,310 @@ +{ + "keyboard_name": "rabbit_capture_plan", + "url": "https://kakunpc.booth.pm/", + "maintainer": "kakunpc", + "width": 20.25, + "height": 5.25, + "layouts": { + "LAYOUT": { + "layout": [ + { + "x": 0.66, + "y": 0 + }, + { + "x": 1.6600000000000001, + "y": 0 + }, + { + "x": 2.97, + "y": 0 + }, + { + "x": 3.97, + "y": 0 + }, + { + "x": 4.97, + "y": 0 + }, + { + "x": 5.97, + "y": 0 + }, + { + "x": 6.97, + "y": 0 + }, + { + "x": 9.87, + "y": 0 + }, + { + "x": 10.87, + "y": 0 + }, + { + "x": 11.87, + "y": 0 + }, + { + "x": 12.87, + "y": 0 + }, + { + "x": 14.32, + "y": 0 + }, + { + "x": 15.32, + "y": 0 + }, + { + "x": 16.32, + "y": 0 + }, + { + "x": 17.32, + "y": 0 + }, + + + + { + "x": 0.53, + "y": 1, + "w": 1.5 + }, + { + "x": 2.03, + "y": 1 + }, + { + "x": 3.47, + "y": 1 + }, + { + "x": 4.47, + "y": 1 + }, + { + "x": 5.47, + "y": 1 + }, + { + "x": 6.47, + "y": 1 + }, + { + "x": 7.47, + "y": 1 + }, + { + "x": 9.37, + "y": 1 + }, + { + "x": 10.37, + "y": 1 + }, + { + "x": 11.37, + "y": 1 + }, + { + "x": 12.37, + "y": 1 + }, + { + "x": 13.97, + "y": 1 + }, + { + "x": 14.97, + "y": 1 + }, + { + "x": 15.97, + "y": 1 + }, + { + "x": 16.97, + "y": 1, + "w": 1.5 + }, + + + + { + "x": 0.39, + "y": 2, + "w": 1.75 + }, + { + "x": 2.14, + "y": 2 + }, + { + "x": 3.72, + "y": 2 + }, + { + "x": 4.72, + "y": 2 + }, + { + "x": 5.72, + "y": 2 + }, + { + "x": 6.72, + "y": 2 + }, + { + "x": 7.72, + "y": 2 + }, + { + "x": 9.62, + "y": 2 + }, + { + "x": 10.62, + "y": 2 + }, + { + "x": 11.62, + "y": 2 + }, + { + "x": 12.62, + "y": 2 + }, + { + "x": 14.34, + "y": 2 + }, + { + "x": 15.34, + "y": 2 + }, + { + "x": 16.34, + "y": 2, + "w": 2.25 + }, + + + + { + "x": 0.25, + "y": 3, + "w": 2.25 + }, + { + "x": 2.5, + "y": 3 + }, + { + "x": 4.22, + "y": 3 + }, + { + "x": 5.22, + "y": 3 + }, + { + "x": 6.22, + "y": 3 + }, + { + "x": 7.22, + "y": 3 + }, + { + "x": 9.12, + "y": 3 + }, + { + "x": 10.12, + "y": 3 + }, + { + "x": 11.12, + "y": 3 + }, + { + "x": 12.12, + "y": 3 + }, + { + "x": 13.97, + "y": 3 + }, + { + "x": 14.97, + "y": 3 + }, + { + "x": 15.97, + "y": 3 + }, + { + "x": 16.97, + "y": 3 + }, + { + "x": 18.25, + "y": 3.25 + }, + + + + { + "x": 0.5, + "y": 4, + "w": 1.25 + }, + { + "x": 1.75, + "y": 4, + "w": 1.25 + }, + { + "x": 4.72, + "y": 4 + }, + { + "x": 5.72, + "y": 4, + "w": 2 + }, + { + "x": 7.72, + "y": 4 + }, + { + "x": 9.6, + "y": 4, + "w": 2.75 + }, + { + "x": 12.35, + "y": 4 + }, + { + "x": 17.25, + "y": 4.25 + }, + { + "x": 18.25, + "y": 4.25 + }, + { + "x": 19.25, + "y": 4.25 + } + ] + } + } +} \ No newline at end of file diff --git a/keyboards/rabbit_capture_plan/keymaps/default/keymap.c b/keyboards/rabbit_capture_plan/keymaps/default/keymap.c new file mode 100644 index 000000000000..cbfb6b14101a --- /dev/null +++ b/keyboards/rabbit_capture_plan/keymaps/default/keymap.c @@ -0,0 +1,39 @@ +/* Copyright 2020 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, + _FN +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* Base */ + [_BASE] = LAYOUT_all( + 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_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, + KC_LCAP, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, 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_DEL, KC_UP, + KC_LCTRL, KC_LGUI, KC_LALT, KC_SPC, KC_SPC, KC_SPC, KC_SPC, KC_LEFT, KC_DOWN, KC_RIGHT + ), + [_FN] = 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_UP, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, KC_LEFT, KC_DOWN, KC_RIGHT, _______, _______,_______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + RGB_TOG, RGB_MOD, _______, _______, _______, _______, _______, _______, _______, _______ + ), +}; diff --git a/keyboards/rabbit_capture_plan/keymaps/default/readme.md b/keyboards/rabbit_capture_plan/keymaps/default/readme.md new file mode 100644 index 000000000000..2ececc3fc2a0 --- /dev/null +++ b/keyboards/rabbit_capture_plan/keymaps/default/readme.md @@ -0,0 +1 @@ +# The default keymap for rabbit_capture_plan diff --git a/keyboards/rabbit_capture_plan/keymaps/via/keymap.c b/keyboards/rabbit_capture_plan/keymaps/via/keymap.c new file mode 100644 index 000000000000..f8109f4f0813 --- /dev/null +++ b/keyboards/rabbit_capture_plan/keymaps/via/keymap.c @@ -0,0 +1,48 @@ +/* Copyright 2020 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] = { + /* Base */ + [0] = LAYOUT_all( + 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_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, + KC_LCAP, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, 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_DEL, KC_UP, + KC_LCTRL, KC_LGUI, KC_LALT, KC_SPC, KC_SPC, KC_SPC, KC_SPC, KC_LEFT, KC_DOWN, KC_RIGHT + ), + [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, _______, + _______, _______, KC_UP, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, KC_LEFT, KC_DOWN, KC_RIGHT, _______, _______,_______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + RGB_TOG, RGB_MOD, _______, _______, _______, _______, _______, _______, _______, _______ + ), + [2] = LAYOUT_all( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______,_______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + [3] = LAYOUT_all( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______,_______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ) +}; diff --git a/keyboards/rabbit_capture_plan/keymaps/via/readme.md b/keyboards/rabbit_capture_plan/keymaps/via/readme.md new file mode 100644 index 000000000000..928cdb8b7772 --- /dev/null +++ b/keyboards/rabbit_capture_plan/keymaps/via/readme.md @@ -0,0 +1 @@ +# The via keymap for rabbit_capture_plan diff --git a/keyboards/rabbit_capture_plan/keymaps/via/rules.mk b/keyboards/rabbit_capture_plan/keymaps/via/rules.mk new file mode 100644 index 000000000000..1e5b99807cb7 --- /dev/null +++ b/keyboards/rabbit_capture_plan/keymaps/via/rules.mk @@ -0,0 +1 @@ +VIA_ENABLE = yes diff --git a/keyboards/rabbit_capture_plan/rabbit_capture_plan.c b/keyboards/rabbit_capture_plan/rabbit_capture_plan.c new file mode 100644 index 000000000000..7a45e61f358b --- /dev/null +++ b/keyboards/rabbit_capture_plan/rabbit_capture_plan.c @@ -0,0 +1,17 @@ +/* Copyright 2020 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 "rabbit_capture_plan.h" diff --git a/keyboards/rabbit_capture_plan/rabbit_capture_plan.h b/keyboards/rabbit_capture_plan/rabbit_capture_plan.h new file mode 100644 index 000000000000..8065fdfeb95c --- /dev/null +++ b/keyboards/rabbit_capture_plan/rabbit_capture_plan.h @@ -0,0 +1,47 @@ +/* Copyright 2020 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 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( \ + L00, L01, L02, L03, L04, L05, L06, R00, R01, R02, R03, R04, R05, R06, R07, \ + L10, L11, L12, L13, L14, L15, L16, R10, R11, R12, R13, R14, R15, R16, R17, \ + 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, R36, R37, R38, \ + L40, L41, L42, L43, L44, R40, R41, R42, R43, R44 \ +) \ +{ \ + { L00, L01, L02, L03, L04, L05, L06, KC_NO }, \ + { L10, L11, L12, L13, L14, L15, L16, KC_NO }, \ + { L20, L21, L22, L23, L24, L25, KC_NO, KC_NO }, \ + { L30, L31, L32, L33, L34, L35, KC_NO, KC_NO }, \ + { L40, L41, L42, L43, L44, L26, KC_NO, KC_NO }, \ + { R00, R01, R02, R03, R04, R05, R06, R07 }, \ + { R10, R11, R12, R13, R14, R15, R16, R17 }, \ + { R20, R21, R22, R23, R24, R25, R26, KC_NO }, \ + { R30, R31, R32, R33, R34, R35, R36, R37 }, \ + { R38, R40, R41, R42, R43, R44, KC_NO, KC_NO } \ +} diff --git a/keyboards/rabbit_capture_plan/readme.md b/keyboards/rabbit_capture_plan/readme.md new file mode 100644 index 000000000000..bc6f9d5deabf --- /dev/null +++ b/keyboards/rabbit_capture_plan/readme.md @@ -0,0 +1,19 @@ +# rabbit_capture_plan + +![rabbit_capture_plan](https://i.gyazo.com/eb25048b17906f897253e8be18db001c.jpg) + +This is 70 keys split keyboard with trackball. + +* Keyboard Maintainer: [kakunpc](https://github.com/kakunpc) +* Hardware Supported: rabbit capture plan pcb +* Hardware Availability: booth([@kakunpc](https://kakunpc.booth.pm/)) + +Make example for this keyboard (after setting up your build environment): + + make rabbit_capture_plan:default + +Flashing example for this keyboard: + + make rabbit_capture_plan: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). diff --git a/keyboards/rabbit_capture_plan/rules.mk b/keyboards/rabbit_capture_plan/rules.mk new file mode 100644 index 000000000000..df27d2eb1424 --- /dev/null +++ b/keyboards/rabbit_capture_plan/rules.mk @@ -0,0 +1,24 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +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 = no # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow +BLUETOOTH_ENABLE = no # Enable Bluetooth +AUDIO_ENABLE = no # Audio output +SPLIT_KEYBOARD = yes +OLED_DRIVER_ENABLE = no From 92da1f0b972fbd3fe08888e04b96e45e44ab1b32 Mon Sep 17 00:00:00 2001 From: JagdPietr <59313824+JagdPietr@users.noreply.github.com> Date: Sun, 23 Aug 2020 09:24:09 +0800 Subject: [PATCH 628/930] [Keyboard] Drakon (#10071) * Drakon60 * Updates * Update: Deletion of XXX in WKL keymap * Update keymap.c * Revert "Updates" This reverts commit b4f97d38777ae3f41d6b20b0da69d90945c1ed8a. * Update keyboards/drakon/info.json * Update keyboards/drakon/info.json * Update keyboards/drakon/info.json * Update keyboards/drakon/config.h * Update keyboards/drakon/config.h * Update keyboards/drakon/rules.mk * Update keyboards/drakon/rules.mk * Update keyboards/drakon/rules.mk * Update keyboards/drakon/rules.mk * Update keyboards/drakon/keymaps/wkl/readme.md * Update keyboards/drakon/keymaps/logo/keymap.c * Update keyboards/drakon/keymaps/default/keymap.c * Update keyboards/drakon/keymaps/wkl/keymap.c * Update keyboards/drakon/config.h * Update keyboards/drakon/config.h * Update keyboards/drakon/keymaps/logo/readme.md * Update keyboards/drakon/config.h * Update keyboards/drakon/readme.md * Update keyboards/drakon/rules.mk * Update keyboards/drakon/drakon.c * Update config.h Deletion as recommended * Update config.h Correction of the deletion * Update config.h Deletion of line as recommended * Update config.h Deleted line as recommended * Update keymap.c Deleted line as recommended * Deletion of File * Delete config.h * Delete config.h * Delete config.h * Update keyboards/drakon/config.h * Update keyboards/drakon/keymaps/wkl/keymap.c * Update keyboards/drakon/keymaps/default/keymap.c * Update keyboards/drakon/keymaps/wkl/keymap.c --- keyboards/drakon/config.h | 114 ++++++++++ keyboards/drakon/drakon.c | 17 ++ keyboards/drakon/drakon.h | 91 ++++++++ keyboards/drakon/info.json | 15 ++ keyboards/drakon/keymaps/default/keymap.c | 247 ++++++++++++++++++++ keyboards/drakon/keymaps/default/readme.md | 1 + keyboards/drakon/keymaps/logo/keymap.c | 110 +++++++++ keyboards/drakon/keymaps/logo/readme.md | 1 + keyboards/drakon/keymaps/wkl/keymap.c | 248 +++++++++++++++++++++ keyboards/drakon/keymaps/wkl/readme.md | 1 + keyboards/drakon/readme.md | 14 ++ keyboards/drakon/rules.mk | 27 +++ 12 files changed, 886 insertions(+) create mode 100644 keyboards/drakon/config.h create mode 100644 keyboards/drakon/drakon.c create mode 100644 keyboards/drakon/drakon.h create mode 100644 keyboards/drakon/info.json create mode 100644 keyboards/drakon/keymaps/default/keymap.c create mode 100644 keyboards/drakon/keymaps/default/readme.md create mode 100644 keyboards/drakon/keymaps/logo/keymap.c create mode 100644 keyboards/drakon/keymaps/logo/readme.md create mode 100644 keyboards/drakon/keymaps/wkl/keymap.c create mode 100644 keyboards/drakon/keymaps/wkl/readme.md create mode 100644 keyboards/drakon/readme.md create mode 100644 keyboards/drakon/rules.mk diff --git a/keyboards/drakon/config.h b/keyboards/drakon/config.h new file mode 100644 index 000000000000..f9565e41a488 --- /dev/null +++ b/keyboards/drakon/config.h @@ -0,0 +1,114 @@ +/* +Copyright 2020 jagdpietr + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License 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 0x7776 +#define DEVICE_VER 0x0001 +#define MANUFACTURER jagdpietr +#define PRODUCT drakon + +/* 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, B5, B6, B0, B1, F1 } +#define MATRIX_COL_PINS { F4, F5, F6, F7, C6, B2, B3, B7, D3, D5, D4, D6, D7, B4 } +#define UNUSED_PINS + +/* COL2ROW, ROW2COL*/ +#define DIODE_DIRECTION COL2ROW + +#define ENCODERS_PAD_A { D2 } +#define ENCODERS_PAD_B { F0 } + +/* + * 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 + +/* 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 + + +/* + * 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 */ +#define NO_ACTION_MACRO +#define NO_ACTION_FUNCTION diff --git a/keyboards/drakon/drakon.c b/keyboards/drakon/drakon.c new file mode 100644 index 000000000000..29fe65f46b24 --- /dev/null +++ b/keyboards/drakon/drakon.c @@ -0,0 +1,17 @@ +/* Copyright 2020 jagdpietr + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#include "drakon.h" diff --git a/keyboards/drakon/drakon.h b/keyboards/drakon/drakon.h new file mode 100644 index 000000000000..68315914d9ef --- /dev/null +++ b/keyboards/drakon/drakon.h @@ -0,0 +1,91 @@ +/* Copyright 2020 jagdpietr + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License 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 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. + */ + + +/* LAYOUT_ansi + * ,---------------------------------------------------------. .---. + * |00 |01 |02 |03 |04 |05 |06 |07 |08 |09 |0A |0B |0C |0D|2D| |5C | + * |---------------------------------------------------------| ,-----------. + * |10 |11 |12 |13 |14 |15 |16 |17 |18 |19 |1A |1B |1C |1D | |5A |5D |59 | + * |---------------------------------------------------------| `-----------' + * |20 |21 |22 |23 |24 |25 |26 |27 |28 |29 |2A |2B |2C | |5B | + * |---------------------------------------------------------. `---' + * |30 |31 |32 |33 |34 |35 |36 |37 |38 |39 |3A |3B | |3C | + * |--------------------------------------------------'--`---'---. + * |40 |41 |42 | 43 |49 |4A | |4B |4C |4D | + * `----------------------------------------------' `-----------' + */ + +#define LAYOUT_ansi( \ + K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K2D, K5C, \ + K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K5A, K5D, K59, \ + K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K5B, \ + K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, \ + K40, K41, K42, K43, 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, K3A, K3B, K3C, XXX }, \ + { K40, K41, K42, K43, XXX, XXX, XXX, XXX, XXX, K49, K4A, K4B, K4C, K4D }, \ + { XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, K59, K5A, K5B, K5C, K5D } \ +} + +/* LAYOUT_wkl + * ,---------------------------------------------------------. .---. + * |00 |01 |02 |03 |04 |05 |06 |07 |08 |09 |0A |0B |0C |0D|2D| |5C | + * |---------------------------------------------------------| ,-----------. + * |10 |11 |12 |13 |14 |15 |16 |17 |18 |19 |1A |1B |1C |1D | |5A |5D |59 | + * |---------------------------------------------------------| `-----------' + * |20 |21 |22 |23 |24 |25 |26 |27 |28 |29 |2A |2B |2C | |5B | + * |---------------------------------------------------------. `---' + * |30 |31 |32 |33 |34 |35 |36 |37 |38 |39 |3A |3B | |3C | + * |--------------------------------------------------'--`---'---. + * |40 | |42 | 43 |49 |4A | |4B |4C |4D | + * `----------------------------------------------' `-----------' + */ + +#define LAYOUT_wkl( \ + K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K2D, K5C, \ + K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K5A, K5D, K59, \ + K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K5B, \ + K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, \ + K40, K42, K43, 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, K3A, K3B, K3C, XXX }, \ + { K40, XXX, K42, K43, XXX, XXX, XXX, XXX, XXX, K49, K4A, K4B, K4C, K4D }, \ + { XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, K59, K5A, K5B, K5C, K5D } \ +} diff --git a/keyboards/drakon/info.json b/keyboards/drakon/info.json new file mode 100644 index 000000000000..328bdba9ee18 --- /dev/null +++ b/keyboards/drakon/info.json @@ -0,0 +1,15 @@ +{ + "keyboard_name": "drakon", + "url": "", + "maintainer": "jagdpietr", + "width": 18.25, + "height": 5.25, + "layouts": { + "LAYOUT_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}, {"x":14, "y":0}, {"x":16.25, "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.25, "y":1}, {"x":16.25, "y":1}, {"x":17.25, "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":16.25, "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.25}, {"x":13.75, "y":3.25}, {"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.75, "y":4.25}, {"x":13.75, "y":4.25}, {"x":14.75, "y":4.25}] + }, + "LAYOUT_wkl": { + "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":16.25, "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.25, "y":1}, {"x":16.25, "y":1}, {"x":17.25, "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":16.25, "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.25}, {"x":13.75, "y":3.25}, {"x":0, "y":4, "w":1.25}, {"x":1.75, "y":4, "w":1.25}, {"x":3, "y":4, "w":7}, {"x":10, "y":4, "w":1.25}, {"x":11.25, "y":4, "w":1.25}, {"x":12.75, "y":4.25}, {"x":13.75, "y":4.25}, {"x":14.75, "y":4.25}] + } + } +} diff --git a/keyboards/drakon/keymaps/default/keymap.c b/keyboards/drakon/keymaps/default/keymap.c new file mode 100644 index 000000000000..04c511f21116 --- /dev/null +++ b/keyboards/drakon/keymaps/default/keymap.c @@ -0,0 +1,247 @@ +/* Copyright 2020 jagdpietr + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public 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 + +char wpm_str[10]; + +// Defines names for use in layer keycodes and the keymap +enum Layer_names { +_Base, +_FN, +_Lyr2 +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_Base] = LAYOUT_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_MUTE, + KC_TAB, KC_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_MPRV, KC_MPLY, KC_MNXT, + 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_MSTP, + 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_APP, MO(_FN), KC_LEFT, KC_DOWN, KC_RIGHT + ), + + [_FN] = 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_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_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_HOME, KC_PGDN, KC_END + ), + + [_Lyr2] = LAYOUT_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, KC_TRNS, KC_TRNS, KC_TRNS + ) +}; + +void encoder_update_user(uint8_t index, bool clockwise) { + if (clockwise) { + tap_code(KC_VOLU); + } else { + tap_code(KC_VOLD); + } +} + +#ifdef OLED_DRIVER_ENABLE + +oled_rotation_t oled_init_user(oled_rotation_t rotation) { + return OLED_ROTATION_90; // flips the display 90 degrees if offhand + +} + +void render_status(void) { + //Host Keyboard Layer Status + oled_set_cursor(0,10); + oled_write_P(PSTR("Lyr: "), false); + + switch (get_highest_layer(layer_state)) { + case _Base: + oled_write_P(PSTR("Base\n"), false); + break; + case _FN: + oled_write_P(PSTR("FN\n"), false); + break; + case _Lyr2: + oled_write_P(PSTR("Lyr2\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 + led_t led_state = host_keyboard_led_state(); + oled_set_cursor(0,12); + oled_write_P(led_state.caps_lock ? PSTR("CAP ") : PSTR(" "), false); + +} + +// WPM-responsive animation stuff here +#define IDLE_FRAMES 5 +#define IDLE_SPEED 40 // below this wpm value your animation will idle + +// #define PREP_FRAMES 1 // uncomment if >1 + +#define TAP_FRAMES 2 +#define TAP_SPEED 60 // above this wpm value typing animation to triggere + +#define ANIM_FRAME_DURATION 200 // how long each frame lasts in ms +// #define SLEEP_TIMER 60000 // should sleep after this period of 0 wpm, needs fixing +#define ANIM_SIZE 128 // number of bytes in array, minimize for adequate firmware size, max is 1024 + +uint32_t anim_timer = 0; +uint32_t anim_sleep = 0; +uint8_t current_idle_frame = 0; +// uint8_t current_prep_frame = 0; // uncomment if PREP_FRAMES >1 +uint8_t current_tap_frame = 0; + +// Images credit j-inc(/James Incandenza) and pixelbenny. Credit to obosob for initial animation approach. +static void render_anim(void) { + static const char PROGMEM idle[IDLE_FRAMES][ANIM_SIZE] = { + { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0xc0, 0x60, 0x30, 0x18, 0x60, + 0xc0, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0xc0, 0x20, 0x10, 0x0c, 0x06, 0x03, 0x81, 0xc0, 0x80, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x01, 0x01, 0x03, 0x06, 0x04, 0x0c, 0x18, 0x10, 0x18, 0x08, 0xf8, 0x00, 0x00, 0x00, + 0x00, 0x3e, 0x23, 0x20, 0x20, 0x20, 0x30, 0x10, 0x10, 0x10, 0x30, 0x21, 0x21, 0x63, 0x43, 0x42, + 0xc0, 0x80, 0x88, 0x8c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x73, 0xc0, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x05, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x06, 0x04, 0x0c, 0x08, 0x0b, 0x08, 0x00 + }, + { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x60, 0x30, 0x10, 0x08, 0x04, 0x04, 0x06, 0x01, 0x01, 0x06, + 0x04, 0x0c, 0x08, 0x18, 0x10, 0x30, 0x20, 0x40, 0xc0, 0x80, 0x80, 0x80, 0xc0, 0xc0, 0x00, 0x00, + 0xe0, 0x98, 0x04, 0x03, 0x01, 0x80, 0x80, 0x80, 0x80, 0x84, 0x86, 0x80, 0x08, 0x18, 0x10, 0x00, + 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x78, 0x87, 0x00, 0x00, + 0x00, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x02, + 0x02, 0x02, 0x0e, 0x3e, 0x20, 0x20, 0x20, 0x10, 0x10, 0x18, 0x18, 0x10, 0x10, 0x33, 0x3e, 0x00 + }, + { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0xc0, 0x60, 0x30, 0x18, 0x60, + 0xc0, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0xc0, 0x20, 0x10, 0x0c, 0x06, 0x03, 0x81, 0xc0, 0x80, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x01, 0x01, 0x03, 0x06, 0x04, 0x0c, 0x18, 0x10, 0x18, 0x08, 0xf8, 0x00, 0x00, 0x00, + 0x00, 0x3e, 0x23, 0x20, 0x20, 0x20, 0x30, 0x10, 0x10, 0x10, 0x30, 0x21, 0x21, 0x63, 0x43, 0x42, + 0xc0, 0x80, 0x88, 0x8c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x73, 0xc0, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x05, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x06, 0x04, 0x0c, 0x08, 0x0b, 0x08, 0x00 + }, + { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x60, 0x30, 0x10, 0x08, 0x04, 0x04, 0x06, 0x01, 0x01, 0x06, + 0x04, 0x0c, 0x08, 0x18, 0x10, 0x30, 0x20, 0x40, 0xc0, 0x80, 0x80, 0x80, 0xc0, 0xc0, 0x00, 0x00, + 0xe0, 0x98, 0x04, 0x03, 0x01, 0x80, 0x80, 0x80, 0x80, 0x84, 0x86, 0x80, 0x08, 0x18, 0x10, 0x00, + 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x78, 0x87, 0x00, 0x00, + 0x00, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x02, + 0x02, 0x02, 0x0e, 0x3e, 0x20, 0x20, 0x20, 0x10, 0x10, 0x18, 0x18, 0x10, 0x10, 0x33, 0x3e, 0x00 + }, + { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0xc0, 0x60, 0x30, 0x18, 0x60, + 0xc0, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0xc0, 0x20, 0x10, 0x0c, 0x06, 0x03, 0x81, 0xc0, 0x80, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x01, 0x01, 0x03, 0x06, 0x04, 0x0c, 0x18, 0x10, 0x18, 0x08, 0xf8, 0x00, 0x00, 0x00, + 0x00, 0x3e, 0x23, 0x20, 0x20, 0x20, 0x30, 0x10, 0x10, 0x10, 0x30, 0x21, 0x21, 0x63, 0x43, 0x42, + 0xc0, 0x80, 0x88, 0x8c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x73, 0xc0, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x05, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x06, 0x04, 0x0c, 0x08, 0x0b, 0x08, 0x00 + } + }; + static const char PROGMEM prep[][ANIM_SIZE] = { + { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xc0, 0x40, 0x30, 0x18, 0x0c, 0x38, + 0x60, 0xc0, 0xc0, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0xf8, 0x18, 0x0c, 0x0c, 0x38, 0x0c, 0x06, 0x03, 0x01, 0xc0, 0x80, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x01, 0x03, 0x02, 0x06, 0x04, 0x08, 0x18, 0x30, 0x18, 0x18, 0xf8, 0x00, 0x00, + 0x00, 0x07, 0x0c, 0x18, 0x18, 0x10, 0x10, 0x10, 0x20, 0x60, 0x61, 0x41, 0x42, 0xc2, 0x86, 0x84, + 0x80, 0x00, 0x00, 0x18, 0x10, 0xfc, 0x02, 0x02, 0x04, 0x1c, 0x00, 0x00, 0x3e, 0xe1, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, + 0x01, 0x03, 0x03, 0x02, 0x06, 0x07, 0x06, 0x0c, 0x0c, 0x0c, 0x10, 0x10, 0x30, 0x20, 0x3f, 0x00 + } + }; + static const char PROGMEM tap[TAP_FRAMES][ANIM_SIZE] = { + { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xc0, 0x40, 0x30, 0x18, 0x0c, 0x38, + 0x60, 0xc0, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xfe, 0xfe, 0x80, 0xc0, 0x60, 0x18, 0x0c, 0x02, 0x01, 0x00, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x01, 0x01, 0x03, 0x06, 0x04, 0x08, 0x10, 0x10, 0x18, 0x08, 0xfc, 0x00, 0x00, + 0xf9, 0xff, 0xe3, 0xe0, 0xc0, 0x40, 0x60, 0x20, 0x20, 0x60, 0x41, 0x40, 0xc3, 0x82, 0x86, 0x04, + 0x00, 0x00, 0x00, 0x18, 0x18, 0xfc, 0x06, 0x06, 0x04, 0x38, 0x00, 0x00, 0x1c, 0xe7, 0x00, 0x00, + 0xf0, 0xfc, 0x03, 0x00, 0x01, 0x07, 0x7c, 0x78, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, + 0x01, 0x03, 0x02, 0x02, 0x06, 0x07, 0x04, 0x0c, 0x08, 0x08, 0x18, 0x10, 0x30, 0x21, 0x3f, 0x38 + }, + { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x40, 0x60, 0x30, 0x18, 0x0c, 0x38, + 0x60, 0x40, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xe0, 0xf8, 0x04, 0x04, 0x0c, 0x3c, 0x06, 0x03, 0x01, 0xc0, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x01, 0x01, 0x03, 0x02, 0x06, 0x0c, 0x18, 0x98, 0x08, 0x0c, 0xfc, 0x00, 0x00, + 0x03, 0x07, 0x04, 0x0c, 0x08, 0x08, 0x18, 0x10, 0x10, 0x30, 0x20, 0x20, 0x61, 0x43, 0x43, 0xc2, + 0x80, 0x80, 0x80, 0x8c, 0x80, 0x00, 0x00, 0xe0, 0xf8, 0x7e, 0x3f, 0x1f, 0x1f, 0x7d, 0x80, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0xe0, 0xe0, 0xe0, 0xf0, 0xf0, 0x70, + 0x30, 0x38, 0x19, 0x0f, 0x1e, 0x1c, 0x79, 0xf8, 0xe8, 0xc4, 0x84, 0x08, 0x08, 0x18, 0x1f, 0x1c + }, + }; + + //assumes 1 frame prep stage + void animation_phase(void) { + if(get_current_wpm() <=IDLE_SPEED){ + current_idle_frame = (current_idle_frame + 1) % IDLE_FRAMES; + oled_write_raw_P(idle[abs((IDLE_FRAMES-1)-current_idle_frame)], ANIM_SIZE); + } + if(get_current_wpm() >IDLE_SPEED && get_current_wpm() 1 + oled_write_raw_P(prep[0], ANIM_SIZE); // remove if IDLE_FRAMES >1 + } + if(get_current_wpm() >=TAP_SPEED){ + current_tap_frame = (current_tap_frame + 1) % TAP_FRAMES; + oled_write_raw_P(tap[abs((TAP_FRAMES-1)-current_tap_frame)], ANIM_SIZE); + } + } + if(get_current_wpm() != 000) { + oled_on(); // not essential but turns on animation OLED with any alpha keypress + if(timer_elapsed32(anim_timer) > ANIM_FRAME_DURATION) { + anim_timer = timer_read32(); + animation_phase(); + } + anim_sleep = timer_read32(); + } else { + if(timer_elapsed32(anim_sleep) > OLED_TIMEOUT) { + oled_off(); + } else { + if(timer_elapsed32(anim_timer) > ANIM_FRAME_DURATION) { + anim_timer = timer_read32(); + animation_phase(); + } + } + } +} +void oled_task_user(void) { + + render_anim(); + oled_set_cursor(0,6); + sprintf(wpm_str, " WPM: %03d", get_current_wpm()); + oled_set_cursor(0,5); + oled_write(wpm_str, false); + + render_status(); + + } + +#endif diff --git a/keyboards/drakon/keymaps/default/readme.md b/keyboards/drakon/keymaps/default/readme.md new file mode 100644 index 000000000000..e56b5a93bbdf --- /dev/null +++ b/keyboards/drakon/keymaps/default/readme.md @@ -0,0 +1 @@ +# The default keymap for drakon diff --git a/keyboards/drakon/keymaps/logo/keymap.c b/keyboards/drakon/keymaps/logo/keymap.c new file mode 100644 index 000000000000..a20559d9e14f --- /dev/null +++ b/keyboards/drakon/keymaps/logo/keymap.c @@ -0,0 +1,110 @@ +/* Copyright 2020 jagdpietr + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public 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, +_Lyr2 +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_Base] = LAYOUT_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_MUTE, + KC_TAB, KC_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_MPRV, KC_MPLY, KC_MNXT, + 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_MSTP, + 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_APP, MO(_FN), KC_LEFT, KC_DOWN, KC_RIGHT + ), + + [_FN] = 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_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_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_HOME, KC_PGDN, KC_END + ), + + [_Lyr2] = LAYOUT_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, KC_TRNS, KC_TRNS, KC_TRNS + ) +}; + +void encoder_update_user(uint8_t index, bool clockwise) { + if (clockwise) { + tap_code(KC_VOLU); + } else { + tap_code(KC_VOLD); + } +} + +#ifdef OLED_DRIVER_ENABLE + +oled_rotation_t oled_init_user(oled_rotation_t rotation) { + return OLED_ROTATION_90; // flips the display 90 degrees if offhand + +} + +void oled_task_user(void) { + static const char PROGMEM drakon_logo[] = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0xc0, 0x80, 0x80, 0x80, 0x80, 0x80, 0xc0, 0x40, 0x80, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x10, 0x10, 0x10, 0x18, 0x18, 0x11, 0x17, 0x11, 0x12, 0x22, 0x24, 0x28, 0x59, + 0x52, 0xec, 0xf0, 0xe0, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x1e, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, + 0x03, 0xfc, 0x01, 0x03, 0x07, 0x1e, 0x78, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x09, 0x0b, 0x06, 0x1c, 0x18, 0x10, 0x10, 0x30, + 0x2e, 0x27, 0x20, 0x20, 0x20, 0x20, 0x20, 0x21, 0x27, 0x3c, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x1c, 0x22, 0x41, 0x41, 0xc1, 0x22, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x41, 0x47, 0x06, 0x38, + 0x38, 0x00, 0x47, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x41, 0x7f, 0x4d, 0x0c, 0x10, 0x63, 0x41, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 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 + }; + oled_set_cursor(0,4); + oled_write_raw_P(drakon_logo, 192); + + // Host Keyboard Layer Status + oled_set_cursor(0,10); + oled_write_P(PSTR("Lyr: "), false); + + switch (get_highest_layer(layer_state)) { + case _Base: + oled_write_P(PSTR("Base\n"), false); + break; + case _FN: + oled_write_P(PSTR("FN\n"), false); + break; + case _Lyr2: + oled_write_P(PSTR("Lyr2\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 + led_t led_state = host_keyboard_led_state(); + oled_set_cursor(0,12); + oled_write_P(led_state.caps_lock ? PSTR("CAP ") : PSTR(" "), false); + + +} + +#endif diff --git a/keyboards/drakon/keymaps/logo/readme.md b/keyboards/drakon/keymaps/logo/readme.md new file mode 100644 index 000000000000..419f434ea061 --- /dev/null +++ b/keyboards/drakon/keymaps/logo/readme.md @@ -0,0 +1 @@ +# The logo keymap for drakon diff --git a/keyboards/drakon/keymaps/wkl/keymap.c b/keyboards/drakon/keymaps/wkl/keymap.c new file mode 100644 index 000000000000..ca261f35b58b --- /dev/null +++ b/keyboards/drakon/keymaps/wkl/keymap.c @@ -0,0 +1,248 @@ +/* Copyright 2020 jagdpietr + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public 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 + +char wpm_str[10]; + +// Defines names for use in layer keycodes and the keymap +enum Layer_names { +_Base, +_FN, +_Lyr2 +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_Base] = LAYOUT_wkl( + 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_MUTE, + KC_TAB, KC_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_MPRV, KC_MPLY, KC_MNXT, + 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_MSTP, + 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_SPC, KC_APP, MO(_FN), KC_LEFT, KC_DOWN, KC_RIGHT + ), + + [_FN] = LAYOUT_wkl( + 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, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_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_HOME, KC_PGDN, KC_END + ), + + [_Lyr2] = LAYOUT_wkl( + KC_TRNS, KC_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_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_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_HOME, KC_PGDN, KC_END + ) + +}; + +void encoder_update_user(uint8_t index, bool clockwise) { + if (clockwise) { + tap_code(KC_VOLU); + } else { + tap_code(KC_VOLD); + } +} + +#ifdef OLED_DRIVER_ENABLE + +oled_rotation_t oled_init_user(oled_rotation_t rotation) { + return OLED_ROTATION_90; // flips the display 90 degrees if offhand + +} + +void render_status(void) { + //Host Keyboard Layer Status + oled_set_cursor(0,10); + oled_write_P(PSTR("Lyr: "), false); + + switch (get_highest_layer(layer_state)) { + case _Base: + oled_write_P(PSTR("Base\n"), false); + break; + case _FN: + oled_write_P(PSTR("FN\n"), false); + break; + case _Lyr2: + oled_write_P(PSTR("Lyr2\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 + led_t led_state = host_keyboard_led_state(); + oled_set_cursor(0,12); + oled_write_P(led_state.caps_lock ? PSTR("CAP ") : PSTR(" "), false); + +} + +// WPM-responsive animation stuff here +#define IDLE_FRAMES 5 +#define IDLE_SPEED 40 // below this wpm value your animation will idle + +// #define PREP_FRAMES 1 // uncomment if >1 + +#define TAP_FRAMES 2 +#define TAP_SPEED 60 // above this wpm value typing animation to triggere + +#define ANIM_FRAME_DURATION 200 // how long each frame lasts in ms +// #define SLEEP_TIMER 60000 // should sleep after this period of 0 wpm, needs fixing +#define ANIM_SIZE 128 // number of bytes in array, minimize for adequate firmware size, max is 1024 + +uint32_t anim_timer = 0; +uint32_t anim_sleep = 0; +uint8_t current_idle_frame = 0; +// uint8_t current_prep_frame = 0; // uncomment if PREP_FRAMES >1 +uint8_t current_tap_frame = 0; + +// Images credit j-inc(/James Incandenza) and pixelbenny. Credit to obosob for initial animation approach. +static void render_anim(void) { + static const char PROGMEM idle[IDLE_FRAMES][ANIM_SIZE] = { + { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0xc0, 0x60, 0x30, 0x18, 0x60, + 0xc0, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0xc0, 0x20, 0x10, 0x0c, 0x06, 0x03, 0x81, 0xc0, 0x80, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x01, 0x01, 0x03, 0x06, 0x04, 0x0c, 0x18, 0x10, 0x18, 0x08, 0xf8, 0x00, 0x00, 0x00, + 0x00, 0x3e, 0x23, 0x20, 0x20, 0x20, 0x30, 0x10, 0x10, 0x10, 0x30, 0x21, 0x21, 0x63, 0x43, 0x42, + 0xc0, 0x80, 0x88, 0x8c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x73, 0xc0, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x05, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x06, 0x04, 0x0c, 0x08, 0x0b, 0x08, 0x00 + }, + { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x60, 0x30, 0x10, 0x08, 0x04, 0x04, 0x06, 0x01, 0x01, 0x06, + 0x04, 0x0c, 0x08, 0x18, 0x10, 0x30, 0x20, 0x40, 0xc0, 0x80, 0x80, 0x80, 0xc0, 0xc0, 0x00, 0x00, + 0xe0, 0x98, 0x04, 0x03, 0x01, 0x80, 0x80, 0x80, 0x80, 0x84, 0x86, 0x80, 0x08, 0x18, 0x10, 0x00, + 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x78, 0x87, 0x00, 0x00, + 0x00, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x02, + 0x02, 0x02, 0x0e, 0x3e, 0x20, 0x20, 0x20, 0x10, 0x10, 0x18, 0x18, 0x10, 0x10, 0x33, 0x3e, 0x00 + }, + { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0xc0, 0x60, 0x30, 0x18, 0x60, + 0xc0, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0xc0, 0x20, 0x10, 0x0c, 0x06, 0x03, 0x81, 0xc0, 0x80, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x01, 0x01, 0x03, 0x06, 0x04, 0x0c, 0x18, 0x10, 0x18, 0x08, 0xf8, 0x00, 0x00, 0x00, + 0x00, 0x3e, 0x23, 0x20, 0x20, 0x20, 0x30, 0x10, 0x10, 0x10, 0x30, 0x21, 0x21, 0x63, 0x43, 0x42, + 0xc0, 0x80, 0x88, 0x8c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x73, 0xc0, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x05, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x06, 0x04, 0x0c, 0x08, 0x0b, 0x08, 0x00 + }, + { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x60, 0x30, 0x10, 0x08, 0x04, 0x04, 0x06, 0x01, 0x01, 0x06, + 0x04, 0x0c, 0x08, 0x18, 0x10, 0x30, 0x20, 0x40, 0xc0, 0x80, 0x80, 0x80, 0xc0, 0xc0, 0x00, 0x00, + 0xe0, 0x98, 0x04, 0x03, 0x01, 0x80, 0x80, 0x80, 0x80, 0x84, 0x86, 0x80, 0x08, 0x18, 0x10, 0x00, + 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x78, 0x87, 0x00, 0x00, + 0x00, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x02, + 0x02, 0x02, 0x0e, 0x3e, 0x20, 0x20, 0x20, 0x10, 0x10, 0x18, 0x18, 0x10, 0x10, 0x33, 0x3e, 0x00 + }, + { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0xc0, 0x60, 0x30, 0x18, 0x60, + 0xc0, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0xc0, 0x20, 0x10, 0x0c, 0x06, 0x03, 0x81, 0xc0, 0x80, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x01, 0x01, 0x03, 0x06, 0x04, 0x0c, 0x18, 0x10, 0x18, 0x08, 0xf8, 0x00, 0x00, 0x00, + 0x00, 0x3e, 0x23, 0x20, 0x20, 0x20, 0x30, 0x10, 0x10, 0x10, 0x30, 0x21, 0x21, 0x63, 0x43, 0x42, + 0xc0, 0x80, 0x88, 0x8c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x73, 0xc0, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x05, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x06, 0x04, 0x0c, 0x08, 0x0b, 0x08, 0x00 + } + }; + static const char PROGMEM prep[][ANIM_SIZE] = { + { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xc0, 0x40, 0x30, 0x18, 0x0c, 0x38, + 0x60, 0xc0, 0xc0, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0xf8, 0x18, 0x0c, 0x0c, 0x38, 0x0c, 0x06, 0x03, 0x01, 0xc0, 0x80, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x01, 0x03, 0x02, 0x06, 0x04, 0x08, 0x18, 0x30, 0x18, 0x18, 0xf8, 0x00, 0x00, + 0x00, 0x07, 0x0c, 0x18, 0x18, 0x10, 0x10, 0x10, 0x20, 0x60, 0x61, 0x41, 0x42, 0xc2, 0x86, 0x84, + 0x80, 0x00, 0x00, 0x18, 0x10, 0xfc, 0x02, 0x02, 0x04, 0x1c, 0x00, 0x00, 0x3e, 0xe1, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, + 0x01, 0x03, 0x03, 0x02, 0x06, 0x07, 0x06, 0x0c, 0x0c, 0x0c, 0x10, 0x10, 0x30, 0x20, 0x3f, 0x00 + } + }; + static const char PROGMEM tap[TAP_FRAMES][ANIM_SIZE] = { + { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xc0, 0x40, 0x30, 0x18, 0x0c, 0x38, + 0x60, 0xc0, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xfe, 0xfe, 0x80, 0xc0, 0x60, 0x18, 0x0c, 0x02, 0x01, 0x00, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x01, 0x01, 0x03, 0x06, 0x04, 0x08, 0x10, 0x10, 0x18, 0x08, 0xfc, 0x00, 0x00, + 0xf9, 0xff, 0xe3, 0xe0, 0xc0, 0x40, 0x60, 0x20, 0x20, 0x60, 0x41, 0x40, 0xc3, 0x82, 0x86, 0x04, + 0x00, 0x00, 0x00, 0x18, 0x18, 0xfc, 0x06, 0x06, 0x04, 0x38, 0x00, 0x00, 0x1c, 0xe7, 0x00, 0x00, + 0xf0, 0xfc, 0x03, 0x00, 0x01, 0x07, 0x7c, 0x78, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, + 0x01, 0x03, 0x02, 0x02, 0x06, 0x07, 0x04, 0x0c, 0x08, 0x08, 0x18, 0x10, 0x30, 0x21, 0x3f, 0x38 + }, + { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x40, 0x60, 0x30, 0x18, 0x0c, 0x38, + 0x60, 0x40, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xe0, 0xf8, 0x04, 0x04, 0x0c, 0x3c, 0x06, 0x03, 0x01, 0xc0, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x01, 0x01, 0x03, 0x02, 0x06, 0x0c, 0x18, 0x98, 0x08, 0x0c, 0xfc, 0x00, 0x00, + 0x03, 0x07, 0x04, 0x0c, 0x08, 0x08, 0x18, 0x10, 0x10, 0x30, 0x20, 0x20, 0x61, 0x43, 0x43, 0xc2, + 0x80, 0x80, 0x80, 0x8c, 0x80, 0x00, 0x00, 0xe0, 0xf8, 0x7e, 0x3f, 0x1f, 0x1f, 0x7d, 0x80, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0xe0, 0xe0, 0xe0, 0xf0, 0xf0, 0x70, + 0x30, 0x38, 0x19, 0x0f, 0x1e, 0x1c, 0x79, 0xf8, 0xe8, 0xc4, 0x84, 0x08, 0x08, 0x18, 0x1f, 0x1c + }, + }; + + //assumes 1 frame prep stage + void animation_phase(void) { + if(get_current_wpm() <=IDLE_SPEED){ + current_idle_frame = (current_idle_frame + 1) % IDLE_FRAMES; + oled_write_raw_P(idle[abs((IDLE_FRAMES-1)-current_idle_frame)], ANIM_SIZE); + } + if(get_current_wpm() >IDLE_SPEED && get_current_wpm() 1 + oled_write_raw_P(prep[0], ANIM_SIZE); // remove if IDLE_FRAMES >1 + } + if(get_current_wpm() >=TAP_SPEED){ + current_tap_frame = (current_tap_frame + 1) % TAP_FRAMES; + oled_write_raw_P(tap[abs((TAP_FRAMES-1)-current_tap_frame)], ANIM_SIZE); + } + } + if(get_current_wpm() != 000) { + oled_on(); // not essential but turns on animation OLED with any alpha keypress + if(timer_elapsed32(anim_timer) > ANIM_FRAME_DURATION) { + anim_timer = timer_read32(); + animation_phase(); + } + anim_sleep = timer_read32(); + } else { + if(timer_elapsed32(anim_sleep) > OLED_TIMEOUT) { + oled_off(); + } else { + if(timer_elapsed32(anim_timer) > ANIM_FRAME_DURATION) { + anim_timer = timer_read32(); + animation_phase(); + } + } + } +} +void oled_task_user(void) { + + render_anim(); + oled_set_cursor(0,6); + sprintf(wpm_str, " WPM: %03d", get_current_wpm()); + oled_set_cursor(0,5); + oled_write(wpm_str, false); + + render_status(); + + } + +#endif diff --git a/keyboards/drakon/keymaps/wkl/readme.md b/keyboards/drakon/keymaps/wkl/readme.md new file mode 100644 index 000000000000..46356035b018 --- /dev/null +++ b/keyboards/drakon/keymaps/wkl/readme.md @@ -0,0 +1 @@ +# The Winkeyless keymap for drakon diff --git a/keyboards/drakon/readme.md b/keyboards/drakon/readme.md new file mode 100644 index 000000000000..f20bdfdf64c0 --- /dev/null +++ b/keyboards/drakon/readme.md @@ -0,0 +1,14 @@ +# drakon + +![drakon](https://i.imgur.com/J5PkdURl.jpg) + +60% keyboard with OLED and 4-directional press Encoder + +* Keyboard Maintainer: [jagdpietr](https://github.com/JagdPietr) +* Hardware Supported: Atmega32u4-AU + +Make example for this keyboard (after setting up your build environment): + + make drakon: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/drakon/rules.mk b/keyboards/drakon/rules.mk new file mode 100644 index 000000000000..a74fce2898a2 --- /dev/null +++ b/keyboards/drakon/rules.mk @@ -0,0 +1,27 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +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 = 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 +BLUETOOTH_ENABLE = no # Enable Bluetooth +AUDIO_ENABLE = no # Audio output + +LTO_ENABLE = yes +WPM_ENABLE = yes +OLED_DRIVER_ENABLE = yes +ENCODER_ENABLE = yes From 8937c145140354f656a012ff6d6ec8d0a151ddd7 Mon Sep 17 00:00:00 2001 From: kakunpc <15257475+kakunpc@users.noreply.github.com> Date: Sun, 23 Aug 2020 16:27:01 +0900 Subject: [PATCH 629/930] FIX rabbit_capture_plan info.json (#10139) --- keyboards/rabbit_capture_plan/info.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/keyboards/rabbit_capture_plan/info.json b/keyboards/rabbit_capture_plan/info.json index 271a87ffee47..6cf5953ac1af 100644 --- a/keyboards/rabbit_capture_plan/info.json +++ b/keyboards/rabbit_capture_plan/info.json @@ -5,7 +5,7 @@ "width": 20.25, "height": 5.25, "layouts": { - "LAYOUT": { + "LAYOUT_all": { "layout": [ { "x": 0.66, From 0ea476a3112310f86359b7e2dd7cf93a86d7b6de Mon Sep 17 00:00:00 2001 From: Chris Alves Date: Mon, 24 Aug 2020 02:13:11 -0400 Subject: [PATCH 630/930] [Keymap] chrisae9 dz60 updates (#10098) * Changed keyboard layout and updated some keys * Updated keymap * Updated layout and pictures * Remove old keymap Co-authored-by: chis --- keyboards/dz60/keymaps/chrisae9/config.h | 14 +++++++++ keyboards/dz60/keymaps/chrisae9/keymap.c | 38 ++++++++++------------- keyboards/dz60/keymaps/chrisae9/readme.md | 8 ++--- 3 files changed, 34 insertions(+), 26 deletions(-) diff --git a/keyboards/dz60/keymaps/chrisae9/config.h b/keyboards/dz60/keymaps/chrisae9/config.h index 659970b72a41..047734e7d1f2 100644 --- a/keyboards/dz60/keymaps/chrisae9/config.h +++ b/keyboards/dz60/keymaps/chrisae9/config.h @@ -8,6 +8,20 @@ #define RGBLIGHT_SAT_STEP 8 #undef RGBLIGHT_VAL_STEP #define RGBLIGHT_VAL_STEP 16 +#undef RGBLIGHT_ANIMATIONS + +/* In order */ +#define RGBLIGHT_EFFECT_BREATHING +#undef RGBLIGHT_EFFECT_RAINBOW_MOOD +#undef RGBLIGHT_EFFECT_RAINBOW_SWIRL +#undef RGBLIGHT_EFFECT_SNAKE +#undef RGBLIGHT_EFFECT_KNIGHT +#undef RGBLIGHT_EFFECT_CHRISTMAS +#undef RGBLIGHT_EFFECT_STATIC_GRADIENT +#undef RGBLIGHT_EFFECT_RGB_TEST +#undef RGBLIGHT_EFFECT_ALTERNATING +#define RGBLIGHT_EFFECT_TWINKLE + /* Mouse Config */ #define MOUSEKEY_DELAY 0 diff --git a/keyboards/dz60/keymaps/chrisae9/keymap.c b/keyboards/dz60/keymaps/chrisae9/keymap.c index 9ba7e7b01d02..5893de6e6391 100644 --- a/keyboards/dz60/keymaps/chrisae9/keymap.c +++ b/keyboards/dz60/keymaps/chrisae9/keymap.c @@ -2,38 +2,32 @@ 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, + LAYOUT_directional( + 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_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_UP, MO(2), - KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_SPC, KC_SPC, MO(3), KC_LEFT, KC_NO, KC_DOWN, KC_RIGHT), - LAYOUT( - KC_CAPS, 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_NO, KC_BSPC, - KC_TRNS, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_SLASH, KC_EQL, KC_TRNS, - KC_GESC, 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_NO, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_UP, MO(2), - KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_SPC, KC_SPC, MO(3), KC_LEFT, KC_NO, KC_DOWN, KC_RIGHT), + KC_GESC, 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, MO(1), + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_MINS, KC_BSPC, KC_RALT, MO(2), KC_LEFT, KC_DOWN, KC_RIGHT), - LAYOUT( + LAYOUT_directional( 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_NO, KC_DEL, - KC_INS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - TG(4), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_NO, 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, TG(1), TG(1), TG(1), MO(3), KC_HOME, KC_NO, KC_PGDN, 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, + TG(3), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_INS, + KC_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, MO(2), KC_HOME, KC_PGDN, KC_END), - LAYOUT( + LAYOUT_directional( KC_PWR, RESET, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_BRID, KC_BRIU, KC_NO, KC_PSCR, KC_TRNS, KC_PGUP, KC_MS_U, KC_PGDN, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_VOLD, KC_VOLU, KC_MUTE, KC_TRNS, KC_MS_L, KC_MS_D, KC_MS_R, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MPRV, KC_MNXT, KC_MPLY, - KC_TRNS, KC_NO, RGB_M_P, RGB_M_B, KC_BTN3, KC_BTN4, KC_BTN5, KC_TRNS, KC_TRNS, KC_TRNS, RGB_VAD, RGB_VAI, RGB_SAI, RGB_TOG, - KC_TRNS, KC_TRNS, KC_MS_BTN2, KC_MS_BTN1, KC_MS_BTN1, KC_MS_BTN1, KC_TRNS, RGB_HUD, KC_NO, RGB_SAD, RGB_HUI), + KC_TRNS, RGB_RMOD, RGB_MOD, KC_BTN3, KC_BTN4, KC_BTN5, KC_TRNS, KC_TRNS, KC_TRNS, RGB_VAD, RGB_VAI, RGB_TOG, RGB_SAI, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_MS_BTN1, KC_MS_BTN2, KC_MS_BTN1, KC_TRNS, KC_TRNS, RGB_HUD, RGB_SAD, RGB_HUI), - LAYOUT( + LAYOUT_directional( KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, - TG(4), KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + TG(3), KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO), - + }; diff --git a/keyboards/dz60/keymaps/chrisae9/readme.md b/keyboards/dz60/keymaps/chrisae9/readme.md index 764a9787821b..9e85864fa582 100644 --- a/keyboards/dz60/keymaps/chrisae9/readme.md +++ b/keyboards/dz60/keymaps/chrisae9/readme.md @@ -4,15 +4,15 @@ This is a custom keymap for the layout of the DZ60. ## Keyboard Picture -![Keyboard Picture](https://i.imgur.com/cbKxxx4.jpg) +![Keyboard](https://i.imgur.com/qyWgShY.png) ## Keyboard Layout -![Chris DZ60](https://i.imgur.com/sILXwXc.png) +![Chris DZ60](https://i.imgur.com/6mwsEOl.png) ## Setup -[QMK Tookbox Download](https://github.com/qmk/qmk_toolbox/releases/tag/0.0.13) +[QMK Toolbox Download](https://github.com/qmk/qmk_toolbox/releases/tag/0.0.13) [MYSYS2 for Windows](http://www.msys2.org/) @@ -29,5 +29,5 @@ util/qmk_install.sh ``` bash #From the qmk_firware directory run -make dz60:chrisae9:flash +make dz60:chrisae9 ``` From b139d34924499e69746307e618afaaa7cf5ab549 Mon Sep 17 00:00:00 2001 From: Nick Blyumberg Date: Mon, 24 Aug 2020 10:49:25 -0400 Subject: [PATCH 631/930] Update Ortho60 VIA keymap (#10130) * Added the license header and made the layers generic --- .../cannonkeys/ortho60/keymaps/via/keymap.c | 38 ++++++++++--------- 1 file changed, 21 insertions(+), 17 deletions(-) diff --git a/keyboards/cannonkeys/ortho60/keymaps/via/keymap.c b/keyboards/cannonkeys/ortho60/keymaps/via/keymap.c index 8c9e553ecdcb..e982ec247cac 100644 --- a/keyboards/cannonkeys/ortho60/keymaps/via/keymap.c +++ b/keyboards/cannonkeys/ortho60/keymaps/via/keymap.c @@ -1,29 +1,33 @@ - +/* +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 -// 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, - _LOWER, - _RAISE, - _FN -}; - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { -[_BASE] = LAYOUT_ortho_5x12( +[0] = LAYOUT_ortho_5x12( 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, KC_ENT, - BL_TOGG, KC_LCTL, KC_LALT, KC_LGUI, MO(_LOWER), KC_SPC, KC_SPC, MO(_RAISE), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT + BL_TOGG, KC_LCTL, KC_LALT, KC_LGUI, MO(1), KC_SPC, KC_SPC, MO(2), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT ), -[_LOWER] = LAYOUT_ortho_5x12( +[1] = LAYOUT_ortho_5x12( 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, @@ -31,7 +35,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { RESET, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY ), -[_RAISE] = LAYOUT_ortho_5x12( +[2] = LAYOUT_ortho_5x12( 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, @@ -39,7 +43,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { RGB_TOG, RGB_MOD, BL_INC, BL_DEC, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY ), -[_FN] = LAYOUT_ortho_5x12( +[3] = LAYOUT_ortho_5x12( KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 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 958e3f85cb91b152c9e22de52a4a5113603d669d Mon Sep 17 00:00:00 2001 From: Naoki Katahira Date: Tue, 25 Aug 2020 01:08:35 +0900 Subject: [PATCH 632/930] Update Lily58 Keymaps and VendorID (#9979) * Update keymaps and venderID * update config.h * Update keyboards/lily58/keymaps/yuchi/keymap.c --- keyboards/lily58/keymaps/default/config.h | 2 + keyboards/lily58/keymaps/default/keymap.c | 74 ++------------ keyboards/lily58/keymaps/default/rules.mk | 2 +- keyboards/lily58/keymaps/yuchi/config.h | 20 +--- keyboards/lily58/keymaps/yuchi/keymap.c | 114 +++++----------------- keyboards/lily58/keymaps/yuchi/rules.mk | 3 +- keyboards/lily58/rev1/config.h | 6 +- keyboards/lily58/rev1/info.json | 2 +- 8 files changed, 46 insertions(+), 177 deletions(-) diff --git a/keyboards/lily58/keymaps/default/config.h b/keyboards/lily58/keymaps/default/config.h index 6b9e52c05ee0..4f155d3af8ef 100644 --- a/keyboards/lily58/keymaps/default/config.h +++ b/keyboards/lily58/keymaps/default/config.h @@ -28,6 +28,8 @@ along with this program. If not, see . // #define MASTER_RIGHT // #define EE_HANDS +// #define SSD1306OLED + #define USE_SERIAL_PD2 #define TAPPING_FORCE_HOLD diff --git a/keyboards/lily58/keymaps/default/keymap.c b/keyboards/lily58/keymaps/default/keymap.c index f0fbaa8b0d2b..52d401c5c5f0 100644 --- a/keyboards/lily58/keymaps/default/keymap.c +++ b/keyboards/lily58/keymaps/default/keymap.c @@ -8,26 +8,15 @@ #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 - -enum custom_keycodes { - QWERTY = SAFE_RANGE, - LOWER, - RAISE, - ADJUST, +enum layer_number { + _QWERTY = 0, + _LOWER, + _RAISE, + _ADJUST, }; - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* QWERTY @@ -50,7 +39,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_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_RSFT, \ - KC_LALT, KC_LGUI,LOWER, KC_SPC, KC_ENT, RAISE, KC_BSPC, KC_RGUI \ + KC_LALT, KC_LGUI, MO(_LOWER), KC_SPC, KC_ENT, MO(_RAISE), KC_BSPC, KC_RGUI \ ), /* LOWER * ,-----------------------------------------. ,-----------------------------------------. @@ -112,14 +101,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_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,\ + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \ + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,\ _______, _______, _______, _______, _______, _______, _______, _______ \ ) }; -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)) { @@ -129,12 +116,6 @@ 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 update loop, make sure to enable OLED_DRIVER_ENABLE=yes in rules.mk #ifdef OLED_DRIVER_ENABLE @@ -178,42 +159,5 @@ bool process_record_user(uint16_t keycode, keyrecord_t *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/default/rules.mk b/keyboards/lily58/keymaps/default/rules.mk index a5b6303a1e19..ea94a9708eba 100644 --- a/keyboards/lily58/keymaps/default/rules.mk +++ b/keyboards/lily58/keymaps/default/rules.mk @@ -13,7 +13,7 @@ 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_ENABLE = no # Enable WS2812 RGB underlight. SWAP_HANDS_ENABLE = no # Enable one-hand typing OLED_DRIVER_ENABLE= yes # OLED display diff --git a/keyboards/lily58/keymaps/yuchi/config.h b/keyboards/lily58/keymaps/yuchi/config.h index 58bbdc5e9d05..130b5642e191 100644 --- a/keyboards/lily58/keymaps/yuchi/config.h +++ b/keyboards/lily58/keymaps/yuchi/config.h @@ -28,25 +28,9 @@ along with this program. If not, see . // #define MASTER_RIGHT // #define EE_HANDS -#define SSD1306OLED +//#define OLED_DRIVER #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 +#define TAPPING_TERM 100 \ No newline at end of file diff --git a/keyboards/lily58/keymaps/yuchi/keymap.c b/keyboards/lily58/keymaps/yuchi/keymap.c index d258fbcbc044..37230696fc32 100644 --- a/keyboards/lily58/keymaps/yuchi/keymap.c +++ b/keyboards/lily58/keymaps/yuchi/keymap.c @@ -8,26 +8,13 @@ #include "ssd1306.h" #endif - -extern keymap_config_t keymap_config; - -#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 16 - -enum custom_keycodes { - QWERTY = SAFE_RANGE, - LOWER, - RAISE, - ADJUST, +enum layer_number { + _QWERTY = 0, + _LOWER, + _RAISE, + _ADJUST, }; @@ -53,17 +40,17 @@ 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_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_RSFT, \ - LOWER,KC_LGUI, KC_LALT, KC_SPC, KC_ENT, KC_BSPC, KC_RGUI, RAISE \ + MO(_LOWER),KC_LGUI, KC_LALT, LT(_LOWER,KC_SPC), LT(_RAISE,KC_ENT), KC_BSPC, KC_RGUI, MO(_RAISE) \ ), /* LOWER * ,-----------------------------------------. ,-----------------------------------------. * | | | | | | | | | | | | | | * |------+------+------+------+------+------| |------+------+------+------+------+------| - * | F1 | F2 | F3 | F4 | F5 | F6 | | F7 | F8 | F9 | F10 | F11 | F12 | + * | | ! | @ | # | $ | % | | ^ | & | * | ( | ) | | * |------+------+------+------+------+------| |------+------+------+------+------+------| - * | ~ | ! | @ | # | $ | % |-------. ,-------| ^ | & | * | ( | ) | - | + * | | 1 | 2 | 3 | 4 | 5 |-------. ,-------| 6 | 7 | 8 | 9 | 0 | | * |------+------+------+------+------+------| [ | | ] |------+------+------+------+------+------| - * | | | | | | |-------| |-------| | _ | + | { | } | | | + * | | | | | | |-------| |-------| | | ` | + | { | } | | * `-----------------------------------------/ / \ \-----------------------------------------' * |LOWER | LGUI | Alt | /Space / \Enter \ |BackSP| RGUI |RAISE | * | | | |/ / \ \ | | | | @@ -71,20 +58,20 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ [_LOWER] = 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_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_TILD, \ - _______, _______, _______, _______, _______, _______, _______, _______, XXXXXXX, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, \ + _______, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, _______, \ + _______, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, KC_PIPE, KC_GRAVE, KC_PLUS, KC_LCBR, KC_RCBR, _______, \ _______, _______, _______, _______, _______, _______, _______, _______\ ), /* RAISE * ,-----------------------------------------. ,-----------------------------------------. * | | | | | | | | | | | | | | * |------+------+------+------+------+------| |------+------+------+------+------+------| - * | ` | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | | + * | F1 | F2 | F3 | F4 | F5 | F6 | | F7 | F8 | F9 | F10 | F11 | F12 | * |------+------+------+------+------+------| |------+------+------+------+------+------| - * | F1 | F2 | F3 | F4 | F5 | F6 |-------. ,-------| | Left | Down | Up |Right | | + * | | | | | | |-------. ,-------| | Left | Down | Up |Right | | * |------+------+------+------+------+------| [ | | ] |------+------+------+------+------+------| - * | F7 | F8 | F9 | F10 | F11 | F12 |-------| |-------| + | - | = | [ | ] | \ | + * | | | | | | |-------| |-------| + | = | [ | ] | \ | | * `-----------------------------------------/ / \ \-----------------------------------------' * |LOWER | LGUI | Alt | /Space / \Enter \ |BackSP| RGUI |RAISE | * | | | |/ / \ \ | | | | @@ -93,9 +80,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_RAISE] = LAYOUT( \ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ - KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, _______, \ - KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, XXXXXXX, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, XXXXXXX, \ - KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______, KC_PLUS, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, \ + 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, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, XXXXXXX, \ + _______, _______, _______, _______, _______, _______, _______, _______, KC_PLUS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, _______, \ _______, _______, _______, _______, _______, _______, _______, _______ \ ), @@ -105,9 +92,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |------+------+------+------+------+------| |------+------+------+------+------+------| * | | | | | | | | | | | | | | * |------+------+------+------+------+------| |------+------+------+------+------+------| - * | | | | | | |-------. ,-------| | |RGB ON| HUE+ | SAT+ | VAL+ | + * | | | | | | |-------. ,-------| | | | | | | * |------+------+------+------+------+------| | | |------+------+------+------+------+------| - * | | | | | | |-------| |-------| | | MODE | HUE- | SAT- | VAL- | + * | | | | | | |-------| |-------| | | | | | | * `-----------------------------------------/ / \ \-----------------------------------------' * |LOWER | LGUI | Alt | /Space / \Enter \ |BackSP| RGUI |RAISE | * | | | |/ / \ \ | | | | @@ -116,13 +103,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_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,\ + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \ + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,\ _______, _______, _______, _______, _______, _______, _______, _______ \ ) }; -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) { @@ -133,12 +119,6 @@ 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 update loop, make sure to enable OLED_DRIVER_ENABLE=yes in rules.mk #ifdef OLED_DRIVER_ENABLE @@ -148,7 +128,7 @@ oled_rotation_t oled_init_user(oled_rotation_t rotation) { return rotation; } -// When add source files to SRC in rules.mk, you can use functions. +// When you 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); @@ -160,12 +140,8 @@ const char *read_keylogs(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) { +void oled_task_user(void) { + if (is_keyboard_master()) { // If you want to change the display of OLED, you need to change here oled_write_ln(read_layer_state(), false); oled_write_ln(read_keylog(), false); @@ -177,8 +153,7 @@ void matrix_render_user(struct CharacterMatrix *matrix) { oled_write(read_logo(), false); } } - -#endif//SSD1306OLED +#endif // OLED_DRIVER_ENABLE bool process_record_user(uint16_t keycode, keyrecord_t *record) { if (record->event.pressed) { @@ -187,42 +162,5 @@ bool process_record_user(uint16_t keycode, keyrecord_t *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/yuchi/rules.mk b/keyboards/lily58/keymaps/yuchi/rules.mk index 0db9ac50fa12..45bf4cfc3a3b 100644 --- a/keyboards/lily58/keymaps/yuchi/rules.mk +++ b/keyboards/lily58/keymaps/yuchi/rules.mk @@ -13,8 +13,9 @@ 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_ENABLE = no # Enable WS2812 RGB underlight. SWAP_HANDS_ENABLE = no # Enable one-hand typing +OLED_DRIVER_ENABLE= yes # OLED display # 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/lily58/rev1/config.h b/keyboards/lily58/rev1/config.h index adcf11b52bca..4443f03c4cff 100644 --- a/keyboards/lily58/rev1/config.h +++ b/keyboards/lily58/rev1/config.h @@ -20,10 +20,10 @@ along with this program. If not, see . #pragma once /* USB Device descriptor parameter */ -#define VENDOR_ID 0xFC51 -#define PRODUCT_ID 0x0058 +#define VENDOR_ID 0x04D8 +#define PRODUCT_ID 0xEB2D #define DEVICE_VER 0x0100 -#define MANUFACTURER F_YUUCHI +#define MANUFACTURER liliums #define PRODUCT Lily58 #define DESCRIPTION Lily58 is 6×4+5keys column-staggered split keyboard. diff --git a/keyboards/lily58/rev1/info.json b/keyboards/lily58/rev1/info.json index 4a3568c3e206..dcafc96fa27a 100644 --- a/keyboards/lily58/rev1/info.json +++ b/keyboards/lily58/rev1/info.json @@ -1,7 +1,7 @@ { "keyboard_name": "Lily58", "url": "", - "maintainer": "F_YUUCHI", + "maintainer": "liliums", "width": 16.5, "height": 5.25, "layouts": { From 5772ac8bf68f5e8e003b4a047494ac3fa2065524 Mon Sep 17 00:00:00 2001 From: haierwangwei2005 <69899561+haierwangwei2005@users.noreply.github.com> Date: Tue, 25 Aug 2020 02:55:24 +0800 Subject: [PATCH 633/930] [Keyboard] 10 ble oled usbhub pad (#10095) * Create rules.mk * Create glcdfonr.c * Create keymap.c * Create keymap.c * Create rules.mk * Add files via upload * Update readme.md * Update readme.md * Update readme.md * Update config.h * Update 10bleoledhub.h * Update 10bleoledhub.c * Update info.json * Update keymap.c * Update keymap.c * Rename glcdfonr.c to glcdfont.c * Update config.h * Update config.h * Update config.h * Update rules.mk * Update 10bleoledhub.c * Update 10bleoledhub.h * Update info.json * Update config.h * Update rules.mk * Update keymap.c * Update keymap.c * Update glcdfont.c * Update keyboards/10bleoledhub/rules.mk * Update keyboards/10bleoledhub/keymaps/via/keymap.c * Update keyboards/10bleoledhub/keymaps/default/keymap.c * Update keyboards/10bleoledhub/config.h * Update keyboards/10bleoledhub/config.h * Update keyboards/10bleoledhub/10bleoledhub.h --- keyboards/10bleoledhub/10bleoledhub.c | 17 ++ keyboards/10bleoledhub/10bleoledhub.h | 30 +++ keyboards/10bleoledhub/config.h | 50 ++++ keyboards/10bleoledhub/info.json | 24 ++ .../10bleoledhub/keymaps/default/keymap.c | 72 ++++++ keyboards/10bleoledhub/keymaps/via/keymap.c | 72 ++++++ keyboards/10bleoledhub/keymaps/via/rules.mk | 2 + keyboards/10bleoledhub/lib/glcdfont.c | 241 ++++++++++++++++++ keyboards/10bleoledhub/readme.md | 14 + keyboards/10bleoledhub/rules.mk | 28 ++ 10 files changed, 550 insertions(+) create mode 100644 keyboards/10bleoledhub/10bleoledhub.c create mode 100644 keyboards/10bleoledhub/10bleoledhub.h create mode 100644 keyboards/10bleoledhub/config.h create mode 100644 keyboards/10bleoledhub/info.json create mode 100644 keyboards/10bleoledhub/keymaps/default/keymap.c create mode 100644 keyboards/10bleoledhub/keymaps/via/keymap.c create mode 100644 keyboards/10bleoledhub/keymaps/via/rules.mk create mode 100644 keyboards/10bleoledhub/lib/glcdfont.c create mode 100644 keyboards/10bleoledhub/readme.md create mode 100644 keyboards/10bleoledhub/rules.mk diff --git a/keyboards/10bleoledhub/10bleoledhub.c b/keyboards/10bleoledhub/10bleoledhub.c new file mode 100644 index 000000000000..095d49d388ae --- /dev/null +++ b/keyboards/10bleoledhub/10bleoledhub.c @@ -0,0 +1,17 @@ +/* Copyright 2020 haierwangwei2005 + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#include "10bleoledhub.h" + diff --git a/keyboards/10bleoledhub/10bleoledhub.h b/keyboards/10bleoledhub/10bleoledhub.h new file mode 100644 index 000000000000..ad73017e1238 --- /dev/null +++ b/keyboards/10bleoledhub/10bleoledhub.h @@ -0,0 +1,30 @@ +/* Copyright 2020 haierwangwei2005 + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License 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, \ + K10, K11, K12, \ + K20, K21, K22, \ + K30, K31, K32 \ +) { \ + { K00, KC_NO, KC_NO }, \ + { K10, K11, K12 }, \ + { K20, K21, K22 }, \ + { K30, K31, K32 } \ +} diff --git a/keyboards/10bleoledhub/config.h b/keyboards/10bleoledhub/config.h new file mode 100644 index 000000000000..0cc7831f3c7d --- /dev/null +++ b/keyboards/10bleoledhub/config.h @@ -0,0 +1,50 @@ +/* +Copyright 2020 haierwangwei2005 + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License 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 0x7C88 // "hw" = haierwangwei2005 +#define PRODUCT_ID 0x7C99 // "10b" = 10bleoledhub +#define DEVICE_VER 0x0001 +#define MANUFACTURER haierwangwei2005 +#define PRODUCT 10bleoledhub + +/* key matrix size */ +#define MATRIX_ROWS 4 +#define MATRIX_COLS 3 +#define MATRIX_ROW_PINS { F6, F5, F4, F1 } +#define MATRIX_COL_PINS { D6, D7, B5 } +#define UNUSED_PINS + +#define DIODE_DIRECTION ROW2COL + +#define SSD1306OLED +#define RGB_DI_PIN B7 + +#define RGBLED_NUM 4 + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCE 5 +#define RGBLIGHT_ANIMATIONS + + +#define OLED_FONT_H "./lib/glcdfont.c" + +#define ENCODERS_PAD_A { C7 } +#define ENCODERS_PAD_B { F7 } + +#define ENCODER_RESOLUTION 4 diff --git a/keyboards/10bleoledhub/info.json b/keyboards/10bleoledhub/info.json new file mode 100644 index 000000000000..368efab38140 --- /dev/null +++ b/keyboards/10bleoledhub/info.json @@ -0,0 +1,24 @@ +{ + "keyboard_name": "10bleoledhub", + "url": "https://github.com/haierwangwei2005/10BLE-OLED-HUB", + "maintainer": "haierwangwei2005", + + "width": 4, + "height": 3, + "layouts": { + "LAYOUT": { + "layout": [ + {"label":"Num Lock", "x":0, "y":0, "w":0.8, "h":0.8}, + {"label":"7", "x":0, "y":1}, + {"label":"8", "x":1, "y":1}, + {"label":"9", "x":2, "y":1}, + {"label":"4", "x":0, "y":2}, + {"label":"5", "x":1, "y":2}, + {"label":"6", "x":2, "y":2}, + {"label":"1", "x":0, "y":3}, + {"label":"2", "x":1, "y":3}, + {"label":"3", "x":2, "y":3} + ] + } + } +} diff --git a/keyboards/10bleoledhub/keymaps/default/keymap.c b/keyboards/10bleoledhub/keymaps/default/keymap.c new file mode 100644 index 000000000000..ee2616819649 --- /dev/null +++ b/keyboards/10bleoledhub/keymaps/default/keymap.c @@ -0,0 +1,72 @@ + /* +Copyright 2020 haierwangwei2005 +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. +You should have received a copy of the GNU General Public License +along with this program. If not, see .*/ +/* Keymap _0: (Base Layer) Default Layer + + * .-----. + * |PGUP | + * |-----------------. + * | 7 | 8 | 9 | + * |-----|-----|-----| + * | 4 | 5 | 6 | + * |-----|-----|-----| + * | 1 | 2 | 3 | + * .-----------------. + */ + /* Keymap _1: (Second Layer) second Layer + + * .-------. + * |NUMLOCK| + * |-----------------------. + * |RGB_TOG|RGB_MOD|RGB_M_K| + * |-------|-------|-------| + * |RGB_SAI|RGB_SAD|RGB_HUI| + * |-------|-------|-------| + * |RGB_VAI|RGB_VAD|RGB_SPI| + * .-----------------------. +*/ + +#include QMK_KEYBOARD_H +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT( + KC_PGUP, + KC_KP_7, KC_KP_8, MO(1), + KC_P4, KC_P5, KC_P6, + KC_P1, KC_P2, KC_P3), + [1] = LAYOUT( + KC_NUMLOCK, + RGB_TOG, RGB_MOD, RGB_M_K, + RGB_SAI, RGB_SAD, RGB_HUI, + RGB_VAI, RGB_VAD, RGB_SPI), +}; + +static void render_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); +} + +#ifdef OLED_DRIVER_ENABLE +void oled_task_user(void) { render_logo(); } +#endif + +void encoder_update_user(uint8_t index, bool clockwise) { + if (index == 0) { /* First encoder */ + if (clockwise) { + tap_code(KC_PGDN); + } else { + tap_code(KC_PGUP); + } + } +} + + +void matrix_init_user(void) { render_logo(); } diff --git a/keyboards/10bleoledhub/keymaps/via/keymap.c b/keyboards/10bleoledhub/keymaps/via/keymap.c new file mode 100644 index 000000000000..d7e986acfc6c --- /dev/null +++ b/keyboards/10bleoledhub/keymaps/via/keymap.c @@ -0,0 +1,72 @@ +/* +Copyright 2020 haierwangwei2005 +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. +You should have received a copy of the GNU General Public License +along with this program. If not, see .*/ +/* Keymap _0: (Base Layer) Default Layer + + * .-----. + * |PGUP | + * |-----------------. + * | 7 | 8 | 9 | + * |-----|-----|-----| + * | 4 | 5 | 6 | + * |-----|-----|-----| + * | 1 | 2 | 3 | + * .-----------------. + */ + /* Keymap _1: (Second Layer) second Layer + + * .-------. + * |NUMLOCK| + * |-----------------------. + * |RGB_TOG|RGB_MOD|RGB_M_K| + * |-------|-------|-------| + * |RGB_SAI|RGB_SAD|RGB_HUI| + * |-------|-------|-------| + * |RGB_VAI|RGB_VAD|RGB_SPI| + * .-----------------------. +*/ + +#include QMK_KEYBOARD_H +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT( + KC_PGUP, + KC_KP_7, KC_KP_8, MO(1), + KC_P4, KC_P5, KC_P6, + KC_P1, KC_P2, KC_P3), + [1] = LAYOUT( + KC_NUMLOCK, + RGB_TOG, RGB_MOD, RGB_M_K, + RGB_SAI, RGB_SAD, RGB_HUI, + RGB_VAI, RGB_VAD, RGB_SPI), +}; + +static void render_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); +} + +#ifdef OLED_DRIVER_ENABLE +void oled_task_user(void) { render_logo(); } +#endif + +void encoder_update_user(uint8_t index, bool clockwise) { + if (index == 0) { /* First encoder */ + if (clockwise) { + tap_code(KC_PGDN); + } else { + tap_code(KC_PGUP); + } + } +} + + +void matrix_init_user(void) { render_logo(); } diff --git a/keyboards/10bleoledhub/keymaps/via/rules.mk b/keyboards/10bleoledhub/keymaps/via/rules.mk new file mode 100644 index 000000000000..36b7ba9cbc98 --- /dev/null +++ b/keyboards/10bleoledhub/keymaps/via/rules.mk @@ -0,0 +1,2 @@ +VIA_ENABLE = yes +LTO_ENABLE = yes diff --git a/keyboards/10bleoledhub/lib/glcdfont.c b/keyboards/10bleoledhub/lib/glcdfont.c new file mode 100644 index 000000000000..c99ba25fda1b --- /dev/null +++ b/keyboards/10bleoledhub/lib/glcdfont.c @@ -0,0 +1,241 @@ +/* +Copyright 2020 haierwangwei2005 +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. +You should have received a copy of the GNU General Public License +along with this program. If not, see .*/ + +#include "progmem.h" +// 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, 0xF8, 0xF8, 0x58, 0x58, 0x5E, + 0xDA, 0x5A, 0x5B, 0x59, 0xDB, 0x5A, + 0x5B, 0x58, 0xD8, 0x58, 0x58, 0x58, + 0xD8, 0x58, 0x58, 0x58, 0xD8, 0x58, + 0x58, 0x58, 0xD8, 0x58, 0x58, 0x58, + 0xD8, 0x58, 0x58, 0x78, 0xF8, 0xF8, + 0xF8, 0x78, 0x78, 0x78, 0xF8, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x44, 0x28, 0xFF, 0x5A, 0x24, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 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, 0x44, 0x55, 0x44, + 0xFF, 0x44, 0x55, 0x44, 0xFF, 0x44, + 0x55, 0x44, 0xFF, 0x44, 0x55, 0x44, + 0xFF, 0x44, 0x55, 0x44, 0xFF, 0x44, + 0x55, 0x44, 0xFF, 0x44, 0x55, 0x44, + 0xFF, 0x44, 0x55, 0x44, 0xFF, 0xFF, + 0xFF, 0xC4, 0xD5, 0xC4, 0xFF, 0x00, + 0x00, 0xFE, 0x21, 0x61, 0xA1, 0x1E, + 0x00, 0xFE, 0x01, 0x21, 0x21, 0xEF, + 0x00, 0xFF, 0x11, 0x11, 0x11, 0xFE, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xFF, 0x11, 0x11, 0x11, 0xFE, 0x00, + 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xFF, 0x00, 0x00, 0x00, 0xFF, 0x00, + 0xFF, 0x11, 0x11, 0x11, 0x01, 0x00, + 0x01, 0x01, 0xFF, 0x01, 0x01, 0x00, + 0xFF, 0x01, 0x01, 0xFF, 0x00, 0xFF, + 0x01, 0x01, 0xFF, 0x00, 0x01, 0x01, + 0xFF, 0x01, 0x01, 0x00, 0xFF, 0x20, + 0x20, 0x20, 0xFF, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x7F, 0x7F, 0x44, 0x55, 0x44, + 0x7F, 0x44, 0x55, 0x54, 0x57, 0x54, + 0x55, 0x54, 0x57, 0x54, 0x55, 0x54, + 0x57, 0x54, 0x55, 0x54, 0x57, 0x54, + 0x45, 0x7C, 0x47, 0x54, 0x45, 0x7C, + 0x7F, 0x7C, 0x45, 0x54, 0x57, 0x50, + 0x5E, 0x50, 0x57, 0x47, 0x7F, 0x00, + 0x00, 0x03, 0x00, 0x00, 0x00, 0x03, + 0x00, 0x01, 0x02, 0x02, 0x02, 0x03, + 0x00, 0x03, 0x02, 0x02, 0x02, 0x01, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x03, 0x02, 0x02, 0x02, 0x01, 0x00, + 0x03, 0x02, 0x02, 0x02, 0x02, 0x00, + 0x03, 0x02, 0x02, 0x02, 0x03, 0x00, + 0x03, 0x02, 0x02, 0x02, 0x02, 0x00, + 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, + 0x03, 0x02, 0x02, 0x03, 0x00, 0x03, + 0x02, 0x02, 0x03, 0x00, 0x00, 0x30, + 0x2B, 0x7C, 0x20, 0x40, 0x03, 0x7C, + 0x44, 0x7C, 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, +}; diff --git a/keyboards/10bleoledhub/readme.md b/keyboards/10bleoledhub/readme.md new file mode 100644 index 000000000000..2ab41d4b473a --- /dev/null +++ b/keyboards/10bleoledhub/readme.md @@ -0,0 +1,14 @@ +# 10bleoledhub + +![10bleoledhub](https://github.com/haierwangwei2005/10BLE-OLED-HUB/blob/master/20200801103918.png) + +10 BLE OLED HUB + +* Keyboard Maintainer: [haierwangwei2005](https://github.com/haierwangwei2005) +* Hardware Availability: https://github.com/haierwangwei2005/10bleoled-hub + +Make example for this keyboard (after setting up your build environment): + + make 10bleoledhub: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/10bleoledhub/rules.mk b/keyboards/10bleoledhub/rules.mk new file mode 100644 index 000000000000..e582b213f778 --- /dev/null +++ b/keyboards/10bleoledhub/rules.mk @@ -0,0 +1,28 @@ +# MCU name +MCU = atmega32u4 + +# Processor frequency +F_CPU = 8000000 + +# Bootloader selection +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 = no # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +BLUETOOTH_ENABLE = no # Enable Bluetooth +AUDIO_ENABLE = no # Audio output +BLUETOOTH = AdafruitBLE +OLED_DRIVER_ENABLE = yes +ENCODER_ENABLE = yes From 297bda1c1ff818c0a1419d5e5256c605f5edff3b Mon Sep 17 00:00:00 2001 From: Josh Hinnebusch Date: Mon, 24 Aug 2020 17:55:49 -0400 Subject: [PATCH 634/930] add num lock indicator functionality to hineybush/h10 (#10100) * add num lock indicator functionality to h10 * Update keyboards/hineybush/h10/h10.c --- keyboards/hineybush/h10/h10.c | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/keyboards/hineybush/h10/h10.c b/keyboards/hineybush/h10/h10.c index fbaca7f38edc..8c149c1451ec 100644 --- a/keyboards/hineybush/h10/h10.c +++ b/keyboards/hineybush/h10/h10.c @@ -20,10 +20,15 @@ // You can leave any or all of these undefined. // These are only required if you want to perform custom actions. -/* -bool led_update_kb(led_t led_state) { - // placeholder for LED indicator added to next revision +void matrix_init_kb(void) { + // put your keyboard start-up code here + // runs once when the firmware starts up + setPinOutput(F7); +} - return led_update_user(led_state); +bool led_update_kb(led_t led_state) { + if(led_update_user(led_state)) { + writePin(F7, !led_state.num_lock); + } + return true; } -*/ From 80d92525db8aee24d1028a977fd3bbb210414877 Mon Sep 17 00:00:00 2001 From: Pierre Chevalier Date: Mon, 24 Aug 2020 22:56:48 +0100 Subject: [PATCH 635/930] Upstream a good default keymap for the Ferris handwired (#9926) * Proper default keymap * Update keyboards/handwired/ferris/keymaps/default/readme.md --- .../handwired/ferris/keymaps/default/keymap.c | 39 ------ .../ferris/keymaps/default/keymap.json | 106 +++++++++++++++ .../ferris/keymaps/default/readme.md | 122 ++++++++++++++++++ .../handwired/ferris/keymaps/json2crab.py | 76 +++++++++++ 4 files changed, 304 insertions(+), 39 deletions(-) delete mode 100644 keyboards/handwired/ferris/keymaps/default/keymap.c create mode 100644 keyboards/handwired/ferris/keymaps/default/keymap.json create mode 100644 keyboards/handwired/ferris/keymaps/default/readme.md create mode 100755 keyboards/handwired/ferris/keymaps/json2crab.py diff --git a/keyboards/handwired/ferris/keymaps/default/keymap.c b/keyboards/handwired/ferris/keymaps/default/keymap.c deleted file mode 100644 index faf5203e7d50..000000000000 --- a/keyboards/handwired/ferris/keymaps/default/keymap.c +++ /dev/null @@ -1,39 +0,0 @@ -/* -Copyright 2020 Pierre Chevalier - -This program is free software: you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation, either version 2 of the License, or -(at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public 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 template at the bottom -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { -/* Keymap 0: 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 | < | > | ? | - * `-----+-----+-----+-----+-----+--. ,-+-----------------------------' - * | BSPC | SPC | | SPC | ENT | - * '------------' '-----------' - */ -[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, KC_SCLN, - KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, - KC_BSPC, KC_SPC, KC_SPC, KC_ENT) -}; diff --git a/keyboards/handwired/ferris/keymaps/default/keymap.json b/keyboards/handwired/ferris/keymaps/default/keymap.json new file mode 100644 index 000000000000..7f7d614e200c --- /dev/null +++ b/keyboards/handwired/ferris/keymaps/default/keymap.json @@ -0,0 +1,106 @@ +{ "version": 1, + "notes": "My awesome keymap", + "documentation": "\"This file is a QMK Configurator export. You can import this at . It can also be used directly with QMK's source code.\n\nTo setup your QMK environment check out the tutorial: \n\nYou can convert this file to a keymap.c using this command: `qmk json2c {keymap}`\n\nYou can compile this keymap using this command: `qmk compile {keymap}`\"\n", + "keyboard": "handwired/ferris", + "keymap": "default", + "layout": "LAYOUT", + "layers": [ + ["KC_Q" , "KC_W" , "KC_E" , "KC_R" , "KC_T", + "KC_Y" , "KC_U" , "KC_I" , "KC_O" , "KC_P", + + "LSFT_T(KC_A)", "LT(5,KC_S)" , "LT(1,KC_D)" , "LT(3,KC_F)" , "KC_G", + "KC_H" , "LT(4,KC_J)" , "LT(2,KC_K)" , "LT(6,KC_L)" , "LSFT_T(KC_SCLN)", + + "KC_Z" , "LCTL_T(KC_X)", "LALT_T(KC_C)" , "KC_V" , "KC_B", + "KC_N" , "KC_M" , "LALT_T(KC_COMM)", "LCTL_T(KC_DOT)", "KC_SLSH", + + "KC_P0" , "KC_BSPC", + "LT(7,KC_SPC)", "KC_P1" + ], + ["KC_TRNS" , "KC_TRNS" , "KC_TRNS" , "KC_TRNS" , "KC_TRNS", + "KC_TRNS" , "KC_BTN1" , "KC_WH_U" , "KC_BTN2" , "KC_TRNS", + + "KC_TRNS" , "KC_BTN2" , "KC_NO" , "KC_BTN1" , "KC_TRNS", + "KC_TRNS" , "KC_MS_L" , "KC_MS_D" , "KC_MS_U" , "KC_MS_R", + + "KC_TRNS" , "KC_TRNS" , "KC_TRNS" , "KC_TRNS" , "KC_TRNS", + "KC_TRNS" , "KC_WH_L" , "KC_WH_D" , "KC_WH_R" , "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_LEFT" , "KC_UP" , "KC_DOWN" , "KC_RGHT" , "KC_TRNS", + "KC_TRNS" , "KC_LGUI" , "KC_NO" , "LCTL(KC_LALT)" , "LCA(KC_LSFT)", + + "KC_TRNS" , "KC_HOME" , "KC_PGDN" , "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_UNDS" , "KC_PIPE" , "KC_QUOT" , "KC_TRNS", + + "KC_CIRC" , "KC_ASTR" , "KC_AMPR" , "KC_NO" , "KC_TRNS", + "KC_HASH" , "KC_TILD" , "KC_SLSH" , "KC_DQUO" , "KC_DLR", + + "KC_TRNS" , "KC_TRNS" , "KC_TRNS" , "KC_TRNS" , "KC_TRNS", + "KC_TRNS" , "KC_MINS" , "KC_BSLS" , "KC_GRV" , "KC_TRNS", + + "KC_TRNS" , "KC_TRNS", + "KC_TRNS" , "KC_TRNS" + ], + ["KC_TRNS" , "KC_COLN" , "KC_LT" , "KC_GT" , "KC_SCLN", + "KC_TRNS" , "KC_TRNS" , "KC_TRNS" , "KC_TRNS" , "KC_TRNS", + + "KC_LCBR" , "KC_RCBR" , "KC_LPRN" , "KC_RPRN" , "KC_AT", + "KC_TRNS" , "KC_NO" , "KC_EQL" , "KC_PLUS" , "KC_PERC", + + "KC_TRNS" , "KC_EXLM" , "KC_LBRC" , "KC_RBRC" , "KC_TRNS", + "KC_TRNS" , "KC_TRNS" , "KC_TRNS" , "KC_TRNS" , "KC_TRNS", + + "KC_VOLD" , "KC_TRNS", + "KC_TRNS" , "KC_VOLU" + ], + ["KC_TRNS" , "KC_TRNS" , "KC_TRNS" , "KC_TRNS" , "KC_TRNS", + "KC_TRNS" , "KC_F7" , "KC_F8" , "KC_F9" , "KC_F10", + + "KC_TRNS" , "KC_NO" , "LCTL(KC_LALT)" , "KC_TRNS" , "KC_TRNS", + "KC_TRNS" , "KC_F4" , "KC_F5" , "KC_F6" , "KC_F11", + + "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_PSLS" , "KC_7" , "KC_8" , "KC_9" , "KC_PPLS", + "KC_TRNS" , "KC_TRNS" , "KC_TRNS" , "KC_TRNS" , "KC_TRNS", + + "KC_0" , "KC_1" , "KC_2" , "KC_3" , "KC_PMNS", + "KC_TRNS" , "KC_TRNS" , "KC_TRNS" , "KC_NO" , "KC_TRNS", + + "KC_PAST" , "KC_4" , "KC_5" , "KC_6" , "KC_PEQL", + "KC_TRNS" , "KC_TRNS" , "KC_TRNS" , "KC_TRNS" , "KC_TRNS", + + "KC_TRNS" , "KC_TRNS", + "KC_TRNS" , "KC_TRNS" + ], + ["KC_TRNS" , "KC_TRNS" , "KC_COLN" , "KC_ESC" , "KC_TRNS", + "KC_TRNS" , "KC_TRNS" , "KC_TRNS" , "KC_TRNS" , "KC_DEL", + + "KC_TRNS" , "KC_PERC" , "KC_SLSH" , "KC_ENT" , "KC_TRNS", + "DF(1)" , "KC_LGUI" , "KC_TRNS" , "KC_TRNS" , "KC_TRNS", + + "KC_TRNS" , "KC_TRNS" , "KC_TRNS" , "KC_EXLM" , "KC_TRNS", + "DF(0)" , "KC_TRNS" , "RALT_T(KC_COMM)", "RCTL_T(KC_DOT)", "RESET", + + "KC_TRNS" , "KC_TAB", + "KC_NO" , "KC_TRNS" + ] + ], + "author": "@pierrec83" +} diff --git a/keyboards/handwired/ferris/keymaps/default/readme.md b/keyboards/handwired/ferris/keymaps/default/readme.md new file mode 100644 index 000000000000..252f886f5262 --- /dev/null +++ b/keyboards/handwired/ferris/keymaps/default/readme.md @@ -0,0 +1,122 @@ +A usable default keymap for the Ferris keyboard +=============================================== + +Keymaps in general are quite personal, so it is difficult to come up with a default that will suit every user. + +This keymap makes heavy use of keys behaving differently when tapped and held, so that all the keys one may need remain accessible despite the low number of thumb keys. + +It comes with a number of layers to give access to most of the keys one may need on a keyboard. It is not meant to be the best possible keymap, but rather a good base on which to build a keymap that works for you. + +This is not the only way to make 34 keys a comfortable typing experience, but it is one way to do so. If you don't already know of a better way, this may be as good a starting point as any :) + +Note that this keymap was built from the perspective that it is OK to take a steep learning curve if it results in a keymap that is easier to use in the long run. This means that it may take more effort to learn this keymap than some alternatives. "Easy to use" was assessed against the workflow of the author, so your mileage may vary on some of the details. + +What do all these layers do? +---------------------------- + +### Layer 0: Base layer + +![Layer 0](https://i.imgur.com/HjNHUPL.png) + +On tapping the keys, our base layer is qwerty with space on the right homing thumb and backspace on the left homing thumb. + +In this layer, the non-homing-thumb positions have 0 and 1. I recommend modifying this to some frequently accessed shortcut such as copy/paste, previous/next tab or anything that makes most sense in your own workflow. O and 1 are place-holders and make it easy to troubleshoot that all keys are working properly before soldering in the switches. +The reason I recommend convenience shortcuts instead of more commonly used keys like tab or meta is that unhoming of the thumbs was a frequent source of typos for me when I used more than one thumb key frequently in the context of typing. + +Despite being missing on this layer, "meta", "tab", "esc" and such are accessible from any other layer: see Layer 7. + +The behaviour of some keys differ when held: +* Both homing pinkies behave as shift. +* Both bottom-row ring fingers behave as ctrl. +* Both bottom-row middle fingers behave as alt. + +* The homing left ring finger gives access to the Function keys layer +* The homing right ring finger gives access to the Numbers layer +* The homing left middle finger gives access to the Mouse layer +* The homing right middle finger gives access to the Navigation layer +* The homing left index finger gives access to the Right symbols layer +* The homing right index finger gives access to the Left symbols layer +* The homing right thumb gives access to the Always accessible layer + +### Layer 1: Mouse + +![Layer 1](https://i.imgur.com/0fvTuB9.png) + +Layer 1 is a mouse layer: it can be used one-handed or two-handed. The most common way to use it is two handed, with left and right click on the homerow of the left hand and directions on the homerow of the right hand. +Scrolling is available on the right hand with mid finger up and down for vertical scroll and index and ring finger down for horizontal scroll. +On the right hand, left click and right click are also available with index and ring finger up to allow one handed operation. This can be particularly handy when enabling the mouse layer permanently (no need to hold the left middle finger), which can be done from Layer 7. + +Note that thanks to the transparency, shift, ctrl and alt are all accessible on the left hand while operating the mouse. + +### Layer 2: Navigation + +![Layer 2](https://i.imgur.com/ZquQJRq.png) + +The navigation layer somewhat mirrors the mouse layer. It is accessed by holding the right middle finger and gives access to arrow keys on the left homerow. Page up and down, Home and End mirror the vertical scrolling and horizontal scrolling on the mouse layer. + +On the right hand, in addition to ctrl and alt which are available through transparency, ctrl + alt, ctrl + alt + shift and meta are accessible on the homerow to enable common shortcuts in some window managers. This part is quite workflow dependent, so make sure to adapt it to your own workflow as appropriate. + +### Layer 3: Right symbols + +![Layer 3](https://i.imgur.com/9tLAUqG.png) + +When holding down the left index, one may access about half of the symbols. The pinkies store `^` and `$` symbols that represent begin and end in vim. The left homerow hosts `*` and `&`, symbols which are related in the way that they represent some form of indirection in programming languages such as rust. On the right hand, most symbols used when navigating the command line are stored together, organized by columns of related symbols. + +### Layer 4: Left symbols + +![Layer 4](https://i.imgur.com/CkjUSW6.png) + +When holding down the right index, one may access the other symbols. On the left hand, most of the different brackets are laid out. The most frequent ones (round brackets and curly brackets) get a spot on the homerow. The rest of the layer hosts the remaining symbols that are easier to access here than on any other layers. + +### Layer 5: Function keys + +![Layer 5](https://i.imgur.com/fWgVqc4.png) + +By holding down the left ring finger, one may access the function keys, roughly in a numpad layout. +This means that alt+F4 is easy to type, with F4 being on the homerow. +There is a shortcut for ctrl+alt on the left hand to enable convenient switching between virtual terminals on Linux. + +### Layer 6: Numbers + +![Layer 6](https://i.imgur.com/S8gq9Kj.png) + +The number layer is accessed by holding the right ring finger. It hosts the numbers and some duplicated symbols that are commonly accessed next to numbers, such as mathematical operators. +The number are layed out similarly to a numpad, but with the middle row and the homerow swapped so that the most used numbers: 0, 1, 2 and 3 are all available in homing positions. + +### Layer 7: Always accessible + +![Layer 7](https://i.imgur.com/twqBeBb.png) + +Layer 7 is accessed by holding the right homing thumb down. Because this position is left transparent from every other layer, this layer is always accessible. +It gives access to some essential keys that would typically be accessed on a thumb cluster or pinkies, such as meta, enter, tab, esc and delete. + +As the layer hosting esc, we duplicated some symbols here to allow for fast navigation in vim. For instance, esc, :, w, q can be done in a single roll. + +Where is the keymap.c? +---------------------- + +The keymap.c file is not published to the repository. It is generated from `keymap.json` by the build system. + +This avoids duplicating information and allow users to edit their keymap from the qmk configurator web interface. + +How do I edit and update the keymap? +------------------------------------ + +The `keymap.json` file is generated from the qmk configurator interface and formatted for better readability in the context of the Ferris keyboard. + +To edit it, you may: +* Edit it directly from a text editor. +* Edit it from the qmk configurator. + +If you decide to use the latter workflow, here are the steps to follow: + +* From the qmk configurator, hit the "import QMK keymap json file" button (it has a drawing with an up arrow on it). +* Browse to the location of your keymap (for example, `/keyboards/handwired/ferris/keymaps/default/keymap.json`) +* Perform any modification to the keymap in the web UI +* Export the keymap to your downloads folder, by hitting the "Export QMK keymap json file" button (it has a drawing with a down arrow on it) +* Override your original keymap with the output of formatting the exported keymap by running a command such as this one from the root of your qmk repo: + ``` + ./keyboards/handwired/ferris/keymaps/json2crab.py --input /default.json > ./keyboards/handwired/ferris/keymaps/default/keymap.json + ``` + Note that you may first need to make json2crab executable by using `chmod +x` on it. + Also note that you may then want to remove the exported keymap from your dowload directory. diff --git a/keyboards/handwired/ferris/keymaps/json2crab.py b/keyboards/handwired/ferris/keymaps/json2crab.py new file mode 100755 index 000000000000..a32429fae5f9 --- /dev/null +++ b/keyboards/handwired/ferris/keymaps/json2crab.py @@ -0,0 +1,76 @@ +#!/usr/bin/env python3 + +import argparse +import sys +import json + +indent_level=4 + +def parse_cli(): + parser = argparse.ArgumentParser(description='Ferris keymap formatter') + parser.add_argument("--input", type=argparse.FileType('r'), + default=sys.stdin, help="Input keymap (json file produced by qmk configurator)") + return parser.parse_args() + +def col_index(key_index): + if key_index < 30: + col = key_index % 5 + else: + col = key_index % 2 + return col + +def format_layers(layers): + formatted = indent_level * " " + "\"layers\": [\n" + max_key_length = {} + for layer in layers: + for (index, keycode) in enumerate(layer): + col = col_index(index) + max_length = max_key_length.get(col) + if (not max_length) or len(keycode) > max_length: + max_key_length.update({col: len(keycode)}) + for (layer_index, layer) in enumerate(layers): + formatted += 2 * indent_level * " " + formatted += "[" + for (index, keycode) in enumerate(layer): + if index > 30 and index % 2 == 0 or index % 5 == 0 and index != 0: + formatted += (1 + 2 * indent_level) * " " + formatted += json.dumps(keycode) + if index == 33: + formatted += "\n" + elif index > 30 and index % 2 == 1 or index % 5 == 4: + formatted += ",\n" + else: + n_spaces = max_key_length[col_index(index)] - len(keycode) + formatted += n_spaces * " " + formatted += ", " + if index % 10 == 9: + formatted += "\n" + formatted += 2 * indent_level * " " + if layer_index < len(layers) - 1: + formatted += "],\n" + else: + formatted += "]\n" + formatted += indent_level * " " + formatted += "]" + + return formatted + +def format_keymap(keymap_json): + formatted = "{" + for (index, k) in enumerate(keymap_json): + if k == "layers": + formatted += format_layers(keymap_json[k]) + else: + formatted += f"{indent_level * ' '}{json.dumps(k)}: {json.dumps(keymap_json[k])}" + if index < len(keymap_json) - 1: + formatted += "," + formatted += "\n" + formatted += "}" + return formatted + +def main(): + args=parse_cli() + keymap_json = json.loads(args.input.read()) + print(format_keymap(keymap_json)) + +main() From 1272371f157f9730013981ada600d994612378aa Mon Sep 17 00:00:00 2001 From: Cassandra de la Cruz-Munoz Date: Mon, 24 Aug 2020 19:56:27 -0400 Subject: [PATCH 636/930] [Keymap] add miuni32:cassdelacruzmunoz (#10108) * created keymap for miuni32:cassdelacruzmunoz * add license headers * fixed error --- .../keymaps/cassdelacruzmunoz/config.h | 23 +++ .../keymaps/cassdelacruzmunoz/keymap.c | 173 ++++++++++++++++++ .../keymaps/cassdelacruzmunoz/readme.md | 19 ++ 3 files changed, 215 insertions(+) create mode 100644 keyboards/miuni32/keymaps/cassdelacruzmunoz/config.h create mode 100644 keyboards/miuni32/keymaps/cassdelacruzmunoz/keymap.c create mode 100644 keyboards/miuni32/keymaps/cassdelacruzmunoz/readme.md diff --git a/keyboards/miuni32/keymaps/cassdelacruzmunoz/config.h b/keyboards/miuni32/keymaps/cassdelacruzmunoz/config.h new file mode 100644 index 000000000000..1e64b6353f14 --- /dev/null +++ b/keyboards/miuni32/keymaps/cassdelacruzmunoz/config.h @@ -0,0 +1,23 @@ +/* Copyright 2020 Cassandra de la Cruz-Munoz cassandra.delacruzmunoz@gmaill.com @cassdelacruzmunoz +* +* This program is free software: you can redistribute it and/or modify +* it under the terms of the GNU General Public License as published by +* the Free Software Foundation, either version 2 of the License, or +* (at your option) any later version. +* +* This program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License 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 RGBLIGHT_ANIMATIONS_OFF +#define RGBLIGHT_LAYERS +#define RGBLIGHT_SLEEP +#define MIDI_ADVANCED diff --git a/keyboards/miuni32/keymaps/cassdelacruzmunoz/keymap.c b/keyboards/miuni32/keymaps/cassdelacruzmunoz/keymap.c new file mode 100644 index 000000000000..d7979bc4647c --- /dev/null +++ b/keyboards/miuni32/keymaps/cassdelacruzmunoz/keymap.c @@ -0,0 +1,173 @@ +/* Copyright 2020 Cassandra de la Cruz-Munoz cassandra.delacruzmunoz@gmaill.com @cassdelacruzmunoz +* +* This program is free software: you can redistribute it and/or modify +* it under the terms of the GNU General Public License as published by +* the Free Software Foundation, either version 2 of the License, or +* (at your option) any later version. +* +* This program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public 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] = { + /* Level 0: Default Layer + * ,---------------------------------------------------------------------------------------. + * | Q | W | E | R | T | Y | U | I | O | P | BSP | + * |---------------------------------------------------------------------------------------| + * | A | S | D | F | G | H | J | K | L | ENT |LT(1|,)| + * |---------------------------------------------------------------------------------------| + * | Z | X | C | V | SPC | B | N | M | RSFT | . | + * |---------------------------------------------------------------------------------------| + */ + [0] = LAYOUT( + 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_ENT, LT(1, KC_COMMA), + KC_Z, KC_X, KC_C, KC_V, KC_SPC, KC_B, KC_N, KC_M, KC_RSFT, KC_DOT + ), + /* Level 1: Layers Layer + * ,---------------------------------------------------------------------------------------. + * | TO(2) | TO(3) | TO(4) | TO(5) | TO(6) | TO(7) | TO(8) | TO(9) | TO(10)| TO(11)| TO(12)| + * |---------------------------------------------------------------------------------------| + * | TO(13)| TO(14)| TO(15)| TO(16)| TO(17)| TO(18)| TO(19)| TO(20)| TO(21)| TO(22)| TRNS | + * |---------------------------------------------------------------------------------------| + * | TO(23)| TO(24)| TO(25)| TO(26)| | TO(27)| TO(28)| TO(29)| TO(30)| TO(31)| + * |---------------------------------------------------------------------------------------| + */ + [1] = LAYOUT( + TO(2), TO(3), TO(4), TO(5), TO(6),//TO(7), TO(8), TO(9), TO(10), TO(11), TO(12), + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + //TO(13), TO(14), TO(15), TO(16), TO(17), TO(18), TO(19), TO(20), TO(21), TO(22), _______, + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, _______, + //TO(23), TO(24), TO(25), TO(26), KC_NO, TO(27), TO(28), TO(29), TO(30), TO(31) + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO + ), + /* Level 2: Numbers Layer + * ,---------------------------------------------------------------------------------------. + * | ESC | 7 | 8 | 9 | / | * | . | , | ( | ) | DEL | + * |---------------------------------------------------------------------------------------| + * | TAB | 4 | 5 | 6 | - | + | HOME | UP | END | PGUP | TG(2) | + * |---------------------------------------------------------------------------------------| + * | LALT | 1 | 2 | 3 | 0 | LEFT | DOWN | RGHT | PGDN | RSHFT | + * |---------------------------------------------------------------------------------------| + */ + [2] = LAYOUT( + KC_ESC, KC_7, KC_8, KC_9, KC_SLSH, KC_ASTR, KC_DOT, KC_COMM, KC_LPRN, KC_RPRN, KC_DEL, + KC_TAB, KC_4, KC_5, KC_6, KC_MINS, KC_PLUS, KC_HOME, KC_UP, KC_END, KC_PGUP, TG(2), + KC_LALT, KC_1, KC_2, KC_3, KC_0, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGDN, KC_RSFT + ), + /* Level 3: Symbols Layer + * ,---------------------------------------------------------------------------------------. + * | ! | @ | # | $ | % | ^ | & | * | - | + | = | + * |---------------------------------------------------------------------------------------| + * | { | } | [ | ] | ' | | \ | ; | : | ` | TG(3) | + * |---------------------------------------------------------------------------------------| + * | LSFT | LCTL | | | TAB | | | | RCTL | ? | + * |---------------------------------------------------------------------------------------| + */ + [3] = LAYOUT( + KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_MINS, KC_PLUS, KC_EQL, + KC_LCBR, KC_RCBR, KC_LBRC, KC_RBRC, KC_QUOT, KC_NO, KC_BSLS, KC_SCLN, KC_COLN, KC_GRV, TG(3), + KC_LSFT, KC_LCTL, KC_NO, KC_NO, KC_TAB, KC_NO, KC_NO, KC_NO, KC_RCTL, KC_QUES + ), + /* Level 4: F-keys and Media Layer + * ,---------------------------------------------------------------------------------------. + * | RESET | MUTE | VOLU | MPLY | TRNS | F1 | F2 | F3 | F4 | F5 | F6 | + * |---------------------------------------------------------------------------------------| + * | LGUI | MPRV | VOLD | MNXT | TRNS | TRNS | TRNS | TRNS | TRNS | TRNS | TG(4) | + * |---------------------------------------------------------------------------------------| + * | TRNS | TRNS | TRNS | TRNS | F7 | F8 | F9 | F10 | F11 | F12 | + * |---------------------------------------------------------------------------------------| + */ + [4] = LAYOUT( + RESET, KC_MUTE, KC_VOLU, KC_MPLY, KC_NO, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, + KC_LGUI, KC_MPRV, KC_VOLD, KC_MNXT, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, TG(4), + KC_NO, KC_NO, KC_NO, KC_NO, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12 + ), + /* Level 5: Commands Layer + * ,---------------------------------------------------------------------------------------. + * | CUT | PSCR | BRIU | PWR | | | | | | | | + * |---------------------------------------------------------------------------------------| + * | COPY | FIND | BRID | SLEP | | | | | | | TG(5) | + * |---------------------------------------------------------------------------------------| + * | PSTE | | | WAKE | | | | | | | + * |---------------------------------------------------------------------------------------| + */ + [5] = LAYOUT( + KC_CUT, KC_PSCR, KC_BRIU, KC_PWR, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_COPY, KC_FIND, KC_BRID, KC_SLEP, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, TG(5), + KC_PSTE, KC_NO, KC_NO, KC_WAKE, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO + ), + /* Level 6: MIDI Layer + * ,---------------------------------------------------------------------------------------. + * | C1 | E1 | G1 | B1 | D2 | F2 | A2 | C3 | E3 | G3 | | + * |---------------------------------------------------------------------------------------| + * | D1 | F1 | A1 | C2 | E2 | G2 | B2 | D3 | F3 | A3 | TG(6) | + * |---------------------------------------------------------------------------------------| + * | OCTD | OCTU | TRNSD | TRNSU | | | | | | | + * |---------------------------------------------------------------------------------------| + */ + [6] = LAYOUT( + MI_C_1, MI_E_1, MI_G_1, MI_B_1, MI_D_2, MI_F_2, MI_A_2, MI_C_3, MI_E_3, MI_G_3, KC_NO, + MI_D_1, MI_F_1, MI_A_1, MI_C_2, MI_E_2, MI_G_2, MI_B_2, MI_D_3, MI_F_3, MI_A_3, TG(6), + MI_OCTD, MI_OCTU, MI_TRNSD, MI_TRNSU, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO + ) +}; + +// Light LEDs 0 through 16 in white when keyboard layer 0 is active +const rgblight_segment_t PROGMEM my_layer0_layer[] = RGBLIGHT_LAYER_SEGMENTS( + {0, 17, HSV_WHITE} +); +// Light LEDs 0 through 16 in blue when keyboard layer 1 is active +const rgblight_segment_t PROGMEM my_layer1_layer[] = RGBLIGHT_LAYER_SEGMENTS( + {0, 17, HSV_BLUE} +); +// Light LEDs 0 through 16 in green when keyboard layer 2 is active +const rgblight_segment_t PROGMEM my_layer2_layer[] = RGBLIGHT_LAYER_SEGMENTS( + {0, 17, HSV_GREEN} +); +// Light LEDs 0 through 16 in yellow when keyboard layer 3 is active +const rgblight_segment_t PROGMEM my_layer3_layer[] = RGBLIGHT_LAYER_SEGMENTS( + {0, 17, HSV_YELLOW} +); +// Light LEDs 0 through 16 in red when keyboard layer 4 is active +const rgblight_segment_t PROGMEM my_layer4_layer[] = RGBLIGHT_LAYER_SEGMENTS( + {0, 17, HSV_RED} +); +// Light LEDs 0 through 16 in cyan when keyboard layer 5 is active +const rgblight_segment_t PROGMEM my_layer5_layer[] = RGBLIGHT_LAYER_SEGMENTS( + {0, 17, HSV_CYAN} +); +// Light LEDs 0 through 16 in orange when keyboard layer 6 is active +const rgblight_segment_t PROGMEM my_layer6_layer[] = RGBLIGHT_LAYER_SEGMENTS( + {0, 17, HSV_ORANGE} +); + +// Now define the array of layers. Later layers take precedence +const rgblight_segment_t* const PROGMEM my_rgb_layers[] = RGBLIGHT_LAYERS_LIST( + my_layer0_layer, + my_layer1_layer, + my_layer2_layer, + my_layer3_layer, + my_layer4_layer, + my_layer5_layer, + my_layer6_layer +); + +void keyboard_post_init_user(void) { + // Enable the LED layers + rgblight_layers = my_rgb_layers; +} + +layer_state_t layer_state_set_user(layer_state_t state) { + for (int i = 0; i < 7; i++) { + rgblight_set_layer_state(i, layer_state_cmp(state, i)); + } + return state; +} diff --git a/keyboards/miuni32/keymaps/cassdelacruzmunoz/readme.md b/keyboards/miuni32/keymaps/cassdelacruzmunoz/readme.md new file mode 100644 index 000000000000..b9e42964cfd9 --- /dev/null +++ b/keyboards/miuni32/keymaps/cassdelacruzmunoz/readme.md @@ -0,0 +1,19 @@ +# Cass de la Cruz-Munoz's keymap for Miuni32 + +7 layers: + +* QUERTY +* Layer access +* Numberpad, navigation keys +* Symbols +* Function and media keys +* Assorted command keys +* MIDI keys + +![QUERTY](https://imgur.com/0B3Xl2D.png) +![Layers](https://imgur.com/Rb9KRgL.png) +![Numberpad & Navigation](https://imgur.com/psq5U5o.png) +![Symbols](https://imgur.com/nbxOjCG.png) +![Function & Media](https://imgur.com/AZe6Vib.png) +![Commands](https://imgur.com/Pl0NYbw.png) +![MIDI](https://imgur.com/c6BcDe2.png) From ecb212106950d4ffc5dca64fc06f031b6b12fcc1 Mon Sep 17 00:00:00 2001 From: AKiwi92 <69772382+AKiwi92@users.noreply.github.com> Date: Tue, 25 Aug 2020 04:36:05 +0100 Subject: [PATCH 637/930] [Keyboard] KiwiKeebs MacroBoard v1.0 (#10080) * KiwiKeebs v.10 QMK * Rename files and folder structure for QMK pull request * Deleted unused files * Added starter keymap * Changes to make pull request compliant * Removed lines for PR error * Error fix in json for PR * Update keyboards/kiwikeebsmacro/kiwikeebsmacro.h * Update keyboards/kiwikeebsmacro/readme.md * Update keyboards/kiwikeebsmacro/keymaps/default/readme.md * Update keyboards/kiwikeebsmacro/keymaps/default/keymap.c * Update keyboards/kiwikeebsmacro/info.json * Update keyboards/kiwikeebsmacro/keymaps/default/keymap.c * Update keyboards/kiwikeebsmacro/config.h * Changed structure to allow for future boards * Update keyboards/kiwikeebs/macro/config.h * Update keyboards/kiwikeebs/macro/info.json * Update keyboards/kiwikeebs/macro/keymaps/default/keymap.c * Update keyboards/kiwikeebs/macro/keymaps/default/keymap.c * Amended rotarty to use kb instead of user * Updated structure after pull request commits * Update keyboards/kiwikeebs/macro/config.h * Update keyboards/kiwikeebs/macro/info.json --- keyboards/kiwikeebs/macro/config.h | 108 ++++++++++++++++++ keyboards/kiwikeebs/macro/info.json | 21 ++++ .../kiwikeebs/macro/keymaps/default/keymap.c | 34 ++++++ keyboards/kiwikeebs/macro/macro.c | 27 +++++ keyboards/kiwikeebs/macro/macro.h | 35 ++++++ keyboards/kiwikeebs/macro/rules.mk | 21 ++++ keyboards/kiwikeebs/readme.md | 19 +++ 7 files changed, 265 insertions(+) create mode 100644 keyboards/kiwikeebs/macro/config.h create mode 100644 keyboards/kiwikeebs/macro/info.json create mode 100644 keyboards/kiwikeebs/macro/keymaps/default/keymap.c create mode 100644 keyboards/kiwikeebs/macro/macro.c create mode 100644 keyboards/kiwikeebs/macro/macro.h create mode 100644 keyboards/kiwikeebs/macro/rules.mk create mode 100644 keyboards/kiwikeebs/readme.md diff --git a/keyboards/kiwikeebs/macro/config.h b/keyboards/kiwikeebs/macro/config.h new file mode 100644 index 000000000000..5753b52a0bff --- /dev/null +++ b/keyboards/kiwikeebs/macro/config.h @@ -0,0 +1,108 @@ +/* +Copyright 2020 KiwiKeebs + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License 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 0x4712 +#define DEVICE_VER 0x0001 +#define MANUFACTURER KiwiKeebs +#define PRODUCT MacroBoard v.1.0 + +/* key matrix size */ +#define MATRIX_ROWS 2 +#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 { E6, D7 } +#define MATRIX_COL_PINS { F7, B1, B3, B2 } +#define UNUSED_PINS + +/* COL2ROW or ROW2COL */ +#define DIODE_DIRECTION COL2ROW + +#define ENCODERS_PAD_A { D1 } +#define ENCODERS_PAD_B { D0 } + +/* 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 useful 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 + +/* + * 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 */ +#define NO_ACTION_MACRO +#define NO_ACTION_FUNCTION diff --git a/keyboards/kiwikeebs/macro/info.json b/keyboards/kiwikeebs/macro/info.json new file mode 100644 index 000000000000..00726a02f4cf --- /dev/null +++ b/keyboards/kiwikeebs/macro/info.json @@ -0,0 +1,21 @@ +{ + "keyboard_name": "KiwiKeebs MacroBoard v.10", + "url": "https://www.reddit.com/r/mechmarket/comments/ibijrd/ic_kiwikeebs_6key_macroboard_rotary_encoder_diy/", + "maintainer": "KiwiKeebs", + "width": 5, + "height": 2, + "layouts": { + "LAYOUT": { + "layout": [ + { "label": "k00", "x": 0, "y": 0 }, + { "label": "k01", "x": 1, "y": 0 }, + { "label": "k02", "x": 2, "y": 0 }, + + { "label": "k03", "x": 0, "y": 1 }, + { "label": "k04", "x": 1, "y": 1 }, + { "label": "k05", "x": 2, "y": 1 }, + { "label": "k06", "x": 3, "y": 0, "h":2, "w":2 } + ] + } + } +} diff --git a/keyboards/kiwikeebs/macro/keymaps/default/keymap.c b/keyboards/kiwikeebs/macro/keymaps/default/keymap.c new file mode 100644 index 000000000000..7d1acce308fd --- /dev/null +++ b/keyboards/kiwikeebs/macro/keymaps/default/keymap.c @@ -0,0 +1,34 @@ +/* Copyright 2020 KiwiKeebs + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public 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( + KC_DEL, KC_HOME, LT(_FN,KC_END), + KC_MPRV, KC_MPLY, KC_MNXT, KC_MUTE + ), + [_FN] = LAYOUT( + KC_1, KC_UP, _______, + KC_LEFT, KC_DOWN, KC_RGHT, _______ + ) +}; diff --git a/keyboards/kiwikeebs/macro/macro.c b/keyboards/kiwikeebs/macro/macro.c new file mode 100644 index 000000000000..3d5ab1661701 --- /dev/null +++ b/keyboards/kiwikeebs/macro/macro.c @@ -0,0 +1,27 @@ +/* Copyright 2020 KiwiKeebs + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#include "macro.h" + +void encoder_update_kb(uint8_t index, bool clockwise) { + if (index == 0) { /* First encoder */ + if (clockwise) { + tap_code(KC_AUDIO_VOL_UP); + } else { + tap_code(KC_AUDIO_VOL_DOWN); + } + } +} \ No newline at end of file diff --git a/keyboards/kiwikeebs/macro/macro.h b/keyboards/kiwikeebs/macro/macro.h new file mode 100644 index 000000000000..ee7c6bd47d95 --- /dev/null +++ b/keyboards/kiwikeebs/macro/macro.h @@ -0,0 +1,35 @@ +/* Copyright 2020 KiwiKeebs + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License 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 \ +) { \ + { k00, k01, k02, KC_NO }, \ + { k03, k04, k05, k06 } \ +} diff --git a/keyboards/kiwikeebs/macro/rules.mk b/keyboards/kiwikeebs/macro/rules.mk new file mode 100644 index 000000000000..0c3a849c4f1e --- /dev/null +++ b/keyboards/kiwikeebs/macro/rules.mk @@ -0,0 +1,21 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +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 +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 +BLUETOOTH_ENABLE = no # Enable Bluetooth +AUDIO_ENABLE = no # Audio output +ENCODER_ENABLE = yes \ No newline at end of file diff --git a/keyboards/kiwikeebs/readme.md b/keyboards/kiwikeebs/readme.md new file mode 100644 index 000000000000..61a1441bd759 --- /dev/null +++ b/keyboards/kiwikeebs/readme.md @@ -0,0 +1,19 @@ +# KiwiKeebs MacroBoard V1.0 + +![KiwiKeebs](https://i.imgur.com/h5i9jBl.png) + +A 6 Key PCB with Rotary Encoder Knob + Button made from solid CNC aluminium. + +* Keyboard Maintainer: [AKiwi92](https://github.com/akiwi92) +* Hardware Supported: KiwiKeebs MacroBoard V1.0 +* Hardware Availability: [reddit.com](https://www.reddit.com/r/mechmarket/comments/ibijrd/ic_kiwikeebs_6key_macroboard_rotary_encoder_diy/) + +Make example for this keyboard (after setting up your build environment): + + make kiwikeebsmacro:default + +Flashing example for this keyboard: + + make kiwikeebsmacro: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). From 5460489b5177245371d23b84b94673951866d003 Mon Sep 17 00:00:00 2001 From: yiancar Date: Tue, 25 Aug 2020 04:37:01 +0100 Subject: [PATCH 638/930] [Keyboard] Barleycorn (#10118) * Initial commit * Barleycorn rename * Update readme.md * PR checklist fixes * Update info.json * Update keyboards/barleycorn/rules.mk * Update keyboards/barleycorn/config.h * Update keyboards/barleycorn/rules.mk * Update keyboards/barleycorn/config.h * Update keyboards/barleycorn/info.json * Update keyboards/barleycorn/info.json * Update keyboards/barleycorn/readme.md * Update keyboards/barleycorn/rules.mk * Update keyboards/barleycorn/rules.mk * PR review * Update keyboards/barleycorn/readme.md * Update keyboards/barleycorn/rules.mk * Update keyboards/barleycorn/keymaps/default/readme.md * Update keyboards/barleycorn/keymaps/iso/readme.md * Update keyboards/barleycorn/rules.mk * Update keyboards/barleycorn/readme.md * Update keyboards/barleycorn/rules.mk * Update keyboards/barleycorn/matrix.c * Update keyboards/barleycorn/barleycorn.c * added ansi/iso keymaps! * Update keyboards/barleycorn/info.json --- keyboards/barleycorn/barleycorn.c | 37 +++ keyboards/barleycorn/barleycorn.h | 63 ++++ keyboards/barleycorn/config.h | 103 +++++++ keyboards/barleycorn/info.json | 283 ++++++++++++++++++ keyboards/barleycorn/keymaps/default/keymap.c | 34 +++ .../barleycorn/keymaps/default/readme.md | 11 + keyboards/barleycorn/keymaps/iso/keymap.c | 35 +++ keyboards/barleycorn/keymaps/iso/readme.md | 11 + keyboards/barleycorn/keymaps/via/keymap.c | 48 +++ keyboards/barleycorn/keymaps/via/readme.md | 3 + keyboards/barleycorn/keymaps/via/rules.mk | 3 + keyboards/barleycorn/matrix.c | 138 +++++++++ keyboards/barleycorn/readme.md | 23 ++ keyboards/barleycorn/rules.mk | 27 ++ 14 files changed, 819 insertions(+) create mode 100644 keyboards/barleycorn/barleycorn.c create mode 100644 keyboards/barleycorn/barleycorn.h create mode 100644 keyboards/barleycorn/config.h create mode 100644 keyboards/barleycorn/info.json create mode 100644 keyboards/barleycorn/keymaps/default/keymap.c create mode 100644 keyboards/barleycorn/keymaps/default/readme.md create mode 100644 keyboards/barleycorn/keymaps/iso/keymap.c create mode 100644 keyboards/barleycorn/keymaps/iso/readme.md create mode 100644 keyboards/barleycorn/keymaps/via/keymap.c create mode 100644 keyboards/barleycorn/keymaps/via/readme.md create mode 100644 keyboards/barleycorn/keymaps/via/rules.mk create mode 100644 keyboards/barleycorn/matrix.c create mode 100644 keyboards/barleycorn/readme.md create mode 100644 keyboards/barleycorn/rules.mk diff --git a/keyboards/barleycorn/barleycorn.c b/keyboards/barleycorn/barleycorn.c new file mode 100644 index 000000000000..4d555de195de --- /dev/null +++ b/keyboards/barleycorn/barleycorn.c @@ -0,0 +1,37 @@ +/* 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 "barleycorn.h" + +void keyboard_pre_init_kb(void) { + // Set our LED pins as output + setPinOutput(B5); + setPinOutput(C0); + keyboard_pre_init_user(); +} + +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(B5, led_state.caps_lock); + writePin(C0, led_state.num_lock); + } + return res; +} diff --git a/keyboards/barleycorn/barleycorn.h b/keyboards/barleycorn/barleycorn.h new file mode 100644 index 000000000000..0b266feaed85 --- /dev/null +++ b/keyboards/barleycorn/barleycorn.h @@ -0,0 +1,63 @@ +/* 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 + +#define XXX KC_NO + +#include "quantum.h" + +#define LAYOUT_all( \ + K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K1D, K0E, K0F, K0G, K0H, \ + K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K2C, K1E, K1F, K1G, K1H, \ + K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2D, K2E, K2F, K2G, K2H, \ + K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E, K3F, K3G, K3H, \ + K40, K41, K42, K46, K4A, K4B, K4C, K4D, K4E, K4F, K4G, K4H \ +) { \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, K0F, K0G, K0H }, \ + { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E, K1F, K1G, K1H }, \ + { 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, K3D, K3E, K3F, K3G, K3H }, \ + { K40, K41, K42, XXX, XXX, XXX, K46, XXX, XXX, XXX, K4A, K4B, K4C, K4D, K4E, K4F, K4G, K4H } \ +} + +#define LAYOUT_ansi( \ + K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K1D, K0E, K0F, K0G, K0H, \ + K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K2C, K1E, K1F, K1G, K1H, \ + K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2D, K2E, K2F, K2G, K2H, \ + K30, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E, K3F, K3G, K3H, \ + K40, K41, K42, K46, K4A, K4B, K4C, K4D, K4E, K4F, K4G, K4H \ +) { \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, K0F, K0G, K0H }, \ + { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E, K1F, K1G, K1H }, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, K2E, K2F, K2G, K2H }, \ + { K30, XXX, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E, K3F, K3G, K3H }, \ + { K40, K41, K42, XXX, XXX, XXX, K46, XXX, XXX, XXX, K4A, K4B, K4C, K4D, K4E, K4F, K4G, K4H } \ +} + +#define LAYOUT_iso( \ + K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K1D, K0E, K0F, K0G, K0H, \ + K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1E, K1F, K1G, K1H, \ + 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, K3D, K3E, K3F, K3G, K3H, \ + K40, K41, K42, K46, K4A, K4B, K4C, K4D, K4E, K4F, K4G, K4H \ +) { \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, K0F, K0G, K0H }, \ + { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E, K1F, K1G, K1H }, \ + { 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, K3D, K3E, K3F, K3G, K3H }, \ + { K40, K41, K42, XXX, XXX, XXX, K46, XXX, XXX, XXX, K4A, K4B, K4C, K4D, K4E, K4F, K4G, K4H } \ +} diff --git a/keyboards/barleycorn/config.h b/keyboards/barleycorn/config.h new file mode 100644 index 000000000000..77714a87fcd7 --- /dev/null +++ b/keyboards/barleycorn/config.h @@ -0,0 +1,103 @@ +/* +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" + +#define VENDOR_ID 0x8968 +#define PRODUCT_ID 0x4749 +#define DEVICE_VER 0x0001 +#define MANUFACTURER Yiancar-Designs +#define PRODUCT Barleycorn + +/* key matrix size */ +#define MATRIX_ROWS 5 +#define MATRIX_COLS 18 + +/* + * 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) + * + */ + +/* A Custom matrix.c is used to poll the port expander C6 shows that the pins are hardwired there */ +#define MATRIX_ROW_PINS { B4, B3, B2, B1, C1 } +#define MATRIX_COL_PINS { B0, D7, D6, D4, D1, D0, C3, C2, D5, D5, D5, D5, D5, D5, D5, D5, D5, D5 } +#define UNUSED_PINS +#define PORT_EXPANDER_ADDRESS 0x20 + +/* COL2ROW, ROW2COL*/ +#define DIODE_DIRECTION COL2ROW + +#define USB_MAX_POWER_CONSUMPTION 100 + + +/* 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 + + +/* + * 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/barleycorn/info.json b/keyboards/barleycorn/info.json new file mode 100644 index 000000000000..4334f383f0a7 --- /dev/null +++ b/keyboards/barleycorn/info.json @@ -0,0 +1,283 @@ +{ + "keyboard_name": "Barleycorn", + "maintainer": "Yiancar", + "width": 19.5, + "height": 5, + "layouts": { + "LAYOUT_all": { + "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":"0,4", "x":4, "y":0}, + {"label":"0,5", "x":5, "y":0}, + {"label":"0,6", "x":6, "y":0}, + {"label":"0,7", "x":7, "y":0}, + {"label":"0,8", "x":8, "y":0}, + {"label":"0,9", "x":9, "y":0}, + {"label":"0,10", "x":10, "y":0}, + {"label":"0,11", "x":11, "y":0}, + {"label":"0,12", "x":12, "y":0}, + {"label":"0,13", "x":13, "y":0}, + {"label":"1,13", "x":14, "y":0}, + {"label":"0,14", "x":15.5, "y":0}, + {"label":"0,15", "x":16.5, "y":0}, + {"label":"0,16", "x":17.5, "y":0}, + {"label":"0,17", "x":18.5, "y":0}, + + {"label":"1,0", "x":0, "y":1, "w":1.5}, + {"label":"1,1", "x":1.5, "y":1}, + {"label":"1,2", "x":2.5, "y":1}, + {"label":"1,3", "x":3.5, "y":1}, + {"label":"1,4", "x":4.5, "y":1}, + {"label":"1,5", "x":5.5, "y":1}, + {"label":"1,6", "x":6.5, "y":1}, + {"label":"1,7", "x":7.5, "y":1}, + {"label":"1,8", "x":8.5, "y":1}, + {"label":"1,9", "x":9.5, "y":1}, + {"label":"1,10", "x":10.5, "y":1}, + {"label":"1,11", "x":11.5, "y":1}, + {"label":"1,12", "x":12.5, "y":1}, + {"label":"2,12", "x":13.5, "y":1, "w":1.5}, + {"label":"1,14", "x":15.5, "y":1}, + {"label":"1,15", "x":16.5, "y":1}, + {"label":"1,16", "x":17.5, "y":1}, + {"label":"1,17", "x":18.5, "y":1}, + + {"label":"2,0", "x":0, "y":2, "w":1.75}, + {"label":"2,1", "x":1.75, "y":2}, + {"label":"2,2", "x":2.75, "y":2}, + {"label":"2,3", "x":3.75, "y":2}, + {"label":"2,4", "x":4.75, "y":2}, + {"label":"2,5", "x":5.75, "y":2}, + {"label":"2,6", "x":6.75, "y":2}, + {"label":"2,7", "x":7.75, "y":2}, + {"label":"2,8", "x":8.75, "y":2}, + {"label":"2,9", "x":9.75, "y":2}, + {"label":"2,10", "x":10.75, "y":2}, + {"label":"2,11", "x":11.75, "y":2}, + {"label":"2,13", "x":12.75, "y":2, "w":2.25}, + {"label":"2,14", "x":15.5, "y":2}, + {"label":"2,15", "x":16.5, "y":2}, + {"label":"2,16", "x":17.5, "y":2}, + {"label":"2,17", "x":18.5, "y":2}, + + {"label":"3,0", "x":0, "y":3, "w":1.25}, + {"label":"3,1", "x":1.25, "y":3}, + {"label":"3,2", "x":2.25, "y":3}, + {"label":"3,3", "x":3.25, "y":3}, + {"label":"3,4", "x":4.25, "y":3}, + {"label":"3,5", "x":5.25, "y":3}, + {"label":"3,6", "x":6.25, "y":3}, + {"label":"3,7", "x":7.25, "y":3}, + {"label":"3,8", "x":8.25, "y":3}, + {"label":"3,9", "x":9.25, "y":3}, + {"label":"3,10", "x":10.25, "y":3}, + {"label":"3,11", "x":11.25, "y":3}, + {"label":"3,12", "x":12.25, "y":3, "w":1.75}, + {"label":"3,13", "x":14.25, "y":3.25}, + {"label":"3,14", "x":15.5, "y":3}, + {"label":"3,15", "x":16.5, "y":3}, + {"label":"3,16", "x":17.5, "y":3}, + {"label":"3,17", "x":18.5, "y":3}, + + {"label":"4,0", "x":0, "y":4, "w":1.25}, + {"label":"4,1", "x":1.25, "y":4, "w":1.25}, + {"label":"4,2", "x":2.5, "y":4, "w":1.25}, + {"label":"4,6", "x":3.75, "y":4, "w":6.25}, + {"label":"4,10", "x":10, "y":4, "w":1.5}, + {"label":"4,11", "x":11.5, "y":4, "w":1.5}, + {"label":"4,12", "x":13.25, "y":4.25}, + {"label":"4,13", "x":14.25, "y":4.25}, + {"label":"4,14", "x":15.25, "y":4.25}, + {"label":"4,15", "x":16.5, "y":4}, + {"label":"4,16", "x":17.5, "y":4}, + {"label":"4,17", "x":18.5, "y":4} + ] + }, + "LAYOUT_ansi": { + "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":"0,4", "x":4, "y":0}, + {"label":"0,5", "x":5, "y":0}, + {"label":"0,6", "x":6, "y":0}, + {"label":"0,7", "x":7, "y":0}, + {"label":"0,8", "x":8, "y":0}, + {"label":"0,9", "x":9, "y":0}, + {"label":"0,10", "x":10, "y":0}, + {"label":"0,11", "x":11, "y":0}, + {"label":"0,12", "x":12, "y":0}, + {"label":"0,13", "x":13, "y":0}, + {"label":"1,13", "x":14, "y":0}, + {"label":"0,14", "x":15.5, "y":0}, + {"label":"0,15", "x":16.5, "y":0}, + {"label":"0,16", "x":17.5, "y":0}, + {"label":"0,17", "x":18.5, "y":0}, + + {"label":"1,0", "x":0, "y":1, "w":1.5}, + {"label":"1,1", "x":1.5, "y":1}, + {"label":"1,2", "x":2.5, "y":1}, + {"label":"1,3", "x":3.5, "y":1}, + {"label":"1,4", "x":4.5, "y":1}, + {"label":"1,5", "x":5.5, "y":1}, + {"label":"1,6", "x":6.5, "y":1}, + {"label":"1,7", "x":7.5, "y":1}, + {"label":"1,8", "x":8.5, "y":1}, + {"label":"1,9", "x":9.5, "y":1}, + {"label":"1,10", "x":10.5, "y":1}, + {"label":"1,11", "x":11.5, "y":1}, + {"label":"1,12", "x":12.5, "y":1}, + {"label":"2,12", "x":13.5, "y":1, "w":1.5}, + {"label":"1,14", "x":15.5, "y":1}, + {"label":"1,15", "x":16.5, "y":1}, + {"label":"1,16", "x":17.5, "y":1}, + {"label":"1,17", "x":18.5, "y":1}, + + {"label":"2,0", "x":0, "y":2, "w":1.75}, + {"label":"2,1", "x":1.75, "y":2}, + {"label":"2,2", "x":2.75, "y":2}, + {"label":"2,3", "x":3.75, "y":2}, + {"label":"2,4", "x":4.75, "y":2}, + {"label":"2,5", "x":5.75, "y":2}, + {"label":"2,6", "x":6.75, "y":2}, + {"label":"2,7", "x":7.75, "y":2}, + {"label":"2,8", "x":8.75, "y":2}, + {"label":"2,9", "x":9.75, "y":2}, + {"label":"2,10", "x":10.75, "y":2}, + {"label":"2,11", "x":11.75, "y":2}, + {"label":"2,13", "x":12.75, "y":2, "w":2.25}, + {"label":"2,14", "x":15.5, "y":2}, + {"label":"2,15", "x":16.5, "y":2}, + {"label":"2,16", "x":17.5, "y":2}, + {"label":"2,17", "x":18.5, "y":2}, + + {"label":"3,0", "x":0, "y":3, "w":2.25}, + {"label":"3,2", "x":2.25, "y":3}, + {"label":"3,3", "x":3.25, "y":3}, + {"label":"3,4", "x":4.25, "y":3}, + {"label":"3,5", "x":5.25, "y":3}, + {"label":"3,6", "x":6.25, "y":3}, + {"label":"3,7", "x":7.25, "y":3}, + {"label":"3,8", "x":8.25, "y":3}, + {"label":"3,9", "x":9.25, "y":3}, + {"label":"3,10", "x":10.25, "y":3}, + {"label":"3,11", "x":11.25, "y":3}, + {"label":"3,12", "x":12.25, "y":3, "w":1.75}, + {"label":"3,13", "x":14.25, "y":3.25}, + {"label":"3,14", "x":15.5, "y":3}, + {"label":"3,15", "x":16.5, "y":3}, + {"label":"3,16", "x":17.5, "y":3}, + {"label":"3,17", "x":18.5, "y":3}, + + {"label":"4,0", "x":0, "y":4, "w":1.25}, + {"label":"4,1", "x":1.25, "y":4, "w":1.25}, + {"label":"4,2", "x":2.5, "y":4, "w":1.25}, + {"label":"4,6", "x":3.75, "y":4, "w":6.25}, + {"label":"4,10", "x":10, "y":4, "w":1.5}, + {"label":"4,11", "x":11.5, "y":4, "w":1.5}, + {"label":"4,12", "x":13.25, "y":4.25}, + {"label":"4,13", "x":14.25, "y":4.25}, + {"label":"4,14", "x":15.25, "y":4.25}, + {"label":"4,15", "x":16.5, "y":4}, + {"label":"4,16", "x":17.5, "y":4}, + {"label":"4,17", "x":18.5, "y":4} + ] + }, + "LAYOUT_iso": { + "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":"0,4", "x":4, "y":0}, + {"label":"0,5", "x":5, "y":0}, + {"label":"0,6", "x":6, "y":0}, + {"label":"0,7", "x":7, "y":0}, + {"label":"0,8", "x":8, "y":0}, + {"label":"0,9", "x":9, "y":0}, + {"label":"0,10", "x":10, "y":0}, + {"label":"0,11", "x":11, "y":0}, + {"label":"0,12", "x":12, "y":0}, + {"label":"0,13", "x":13, "y":0}, + {"label":"1,13", "x":14, "y":0}, + {"label":"0,14", "x":15.5, "y":0}, + {"label":"0,15", "x":16.5, "y":0}, + {"label":"0,16", "x":17.5, "y":0}, + {"label":"0,17", "x":18.5, "y":0}, + + {"label":"1,0", "x":0, "y":1, "w":1.5}, + {"label":"1,1", "x":1.5, "y":1}, + {"label":"1,2", "x":2.5, "y":1}, + {"label":"1,3", "x":3.5, "y":1}, + {"label":"1,4", "x":4.5, "y":1}, + {"label":"1,5", "x":5.5, "y":1}, + {"label":"1,6", "x":6.5, "y":1}, + {"label":"1,7", "x":7.5, "y":1}, + {"label":"1,8", "x":8.5, "y":1}, + {"label":"1,9", "x":9.5, "y":1}, + {"label":"1,10", "x":10.5, "y":1}, + {"label":"1,11", "x":11.5, "y":1}, + {"label":"1,12", "x":12.5, "y":1}, + {"label":"1,14", "x":15.5, "y":1}, + {"label":"1,15", "x":16.5, "y":1}, + {"label":"1,16", "x":17.5, "y":1}, + {"label":"1,17", "x":18.5, "y":1}, + + {"label":"2,0", "x":0, "y":2, "w":1.75}, + {"label":"2,1", "x":1.75, "y":2}, + {"label":"2,2", "x":2.75, "y":2}, + {"label":"2,3", "x":3.75, "y":2}, + {"label":"2,4", "x":4.75, "y":2}, + {"label":"2,5", "x":5.75, "y":2}, + {"label":"2,6", "x":6.75, "y":2}, + {"label":"2,7", "x":7.75, "y":2}, + {"label":"2,8", "x":8.75, "y":2}, + {"label":"2,9", "x":9.75, "y":2}, + {"label":"2,10", "x":10.75, "y":2}, + {"label":"2,11", "x":11.75, "y":2}, + {"label":"2,12", "x":12.75, "y":2}, + {"label":"2,13", "x":13.75, "y":1, "w":1.25, "h":2}, + {"label":"2,14", "x":15.5, "y":2}, + {"label":"2,15", "x":16.5, "y":2}, + {"label":"2,16", "x":17.5, "y":2}, + {"label":"2,17", "x":18.5, "y":2}, + + {"label":"3,0", "x":0, "y":3, "w":1.25}, + {"label":"3,1", "x":1.25, "y":3}, + {"label":"3,2", "x":2.25, "y":3}, + {"label":"3,3", "x":3.25, "y":3}, + {"label":"3,4", "x":4.25, "y":3}, + {"label":"3,5", "x":5.25, "y":3}, + {"label":"3,6", "x":6.25, "y":3}, + {"label":"3,7", "x":7.25, "y":3}, + {"label":"3,8", "x":8.25, "y":3}, + {"label":"3,9", "x":9.25, "y":3}, + {"label":"3,10", "x":10.25, "y":3}, + {"label":"3,11", "x":11.25, "y":3}, + {"label":"3,12", "x":12.25, "y":3, "w":1.75}, + {"label":"3,13", "x":14.25, "y":3.25}, + {"label":"3,14", "x":15.5, "y":3}, + {"label":"3,15", "x":16.5, "y":3}, + {"label":"3,16", "x":17.5, "y":3}, + {"label":"3,17", "x":18.5, "y":3}, + + {"label":"4,0", "x":0, "y":4, "w":1.25}, + {"label":"4,1", "x":1.25, "y":4, "w":1.25}, + {"label":"4,2", "x":2.5, "y":4, "w":1.25}, + {"label":"4,6", "x":3.75, "y":4, "w":6.25}, + {"label":"4,10", "x":10, "y":4, "w":1.5}, + {"label":"4,11", "x":11.5, "y":4, "w":1.5}, + {"label":"4,12", "x":13.25, "y":4.25}, + {"label":"4,13", "x":14.25, "y":4.25}, + {"label":"4,14", "x":15.25, "y":4.25}, + {"label":"4,15", "x":16.5, "y":4}, + {"label":"4,16", "x":17.5, "y":4}, + {"label":"4,17", "x":18.5, "y":4} + ] + } + } + } diff --git a/keyboards/barleycorn/keymaps/default/keymap.c b/keyboards/barleycorn/keymaps/default/keymap.c new file mode 100644 index 000000000000..230b78e99109 --- /dev/null +++ b/keyboards/barleycorn/keymaps/default/keymap.c @@ -0,0 +1,34 @@ +/* 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 + +//This is the ANSI version of the PCB + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +[0] = 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_PEQL, + 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_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_BSPC, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), KC_LEFT, KC_DOWN, KC_RGHT, KC_P0, KC_PDOT, KC_PENT), + +[1] = LAYOUT_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_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, RESET, 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, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_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_VOLD, KC_MUTE, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), +}; diff --git a/keyboards/barleycorn/keymaps/default/readme.md b/keyboards/barleycorn/keymaps/default/readme.md new file mode 100644 index 000000000000..04903f8cc903 --- /dev/null +++ b/keyboards/barleycorn/keymaps/default/readme.md @@ -0,0 +1,11 @@ +# The default keymap for Barleycorn + +![Layer 0](https://i.imgur.com/cU9lzz3.png) + +![Layer 1](https://i.imgur.com/0G3e1K3.png) + +Default layer is normal ANSI and Fn layer is used for Volume control and arrow cluster. + +Alternative ANSI layouts: + +![Alt Keymap](https://i.imgur.com/6uAx8jZ.png) diff --git a/keyboards/barleycorn/keymaps/iso/keymap.c b/keyboards/barleycorn/keymaps/iso/keymap.c new file mode 100644 index 000000000000..7fd4d06969fe --- /dev/null +++ b/keyboards/barleycorn/keymaps/iso/keymap.c @@ -0,0 +1,35 @@ +/* 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 + +//This is the ISO version of the PCB + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +[0] = 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_PEQL, + 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_RSFT, KC_UP, KC_P1, KC_P2, KC_P3, KC_BSPC, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), KC_LEFT, KC_DOWN, KC_RGHT, KC_P0, KC_PDOT, KC_PENT), + +[1] = LAYOUT_iso( /* 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_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, RESET, 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, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_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_VOLD, KC_MUTE, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), +}; + diff --git a/keyboards/barleycorn/keymaps/iso/readme.md b/keyboards/barleycorn/keymaps/iso/readme.md new file mode 100644 index 000000000000..492abfcecc49 --- /dev/null +++ b/keyboards/barleycorn/keymaps/iso/readme.md @@ -0,0 +1,11 @@ +# The default keymap for ISO Barleycorn + +![Layer 0](https://i.imgur.com/llZlVHt.png) + +![Layer 1](https://i.imgur.com/hrYtMQk.png) + +Default layer is normal ISO and Fn layer is used for Volume control and arrow cluster + +Alternative ISO layouts: + +![Alt Keymap](https://i.imgur.com/2cL0IGQ.png) diff --git a/keyboards/barleycorn/keymaps/via/keymap.c b/keyboards/barleycorn/keymaps/via/keymap.c new file mode 100644 index 000000000000..90ce60d1ea16 --- /dev/null +++ b/keyboards/barleycorn/keymaps/via/keymap.c @@ -0,0 +1,48 @@ +/* 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 + +// This keymaps is used for VIA, it reflects the default keymap. + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +[0] = 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_BSLS, KC_P7, KC_P8, KC_P9, KC_PEQL, + 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_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_BSPC, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), KC_LEFT, KC_DOWN, KC_RGHT, KC_P0, KC_PDOT, KC_PENT), + +[1] = LAYOUT_all( /* 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_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, RESET, 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, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_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_VOLD, KC_MUTE, 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, 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, KC_TRNS), +}; diff --git a/keyboards/barleycorn/keymaps/via/readme.md b/keyboards/barleycorn/keymaps/via/readme.md new file mode 100644 index 000000000000..a49e2c05684a --- /dev/null +++ b/keyboards/barleycorn/keymaps/via/readme.md @@ -0,0 +1,3 @@ +# Compile with this keymap to use VIA + +Sadly right now when using VIA, extrakeys is disabled. This means volume control will not work. diff --git a/keyboards/barleycorn/keymaps/via/rules.mk b/keyboards/barleycorn/keymaps/via/rules.mk new file mode 100644 index 000000000000..930e3552ad08 --- /dev/null +++ b/keyboards/barleycorn/keymaps/via/rules.mk @@ -0,0 +1,3 @@ +VIA_ENABLE = yes +MOUSEKEY_ENABLE = no +EXTRAKEY_ENABLE = no diff --git a/keyboards/barleycorn/matrix.c b/keyboards/barleycorn/matrix.c new file mode 100644 index 000000000000..99366d60987d --- /dev/null +++ b/keyboards/barleycorn/matrix.c @@ -0,0 +1,138 @@ +/* +Copyright 2012-2020 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 "quantum.h" +#include "i2c_master.h" + +static const pin_t row_pins[MATRIX_ROWS] = MATRIX_ROW_PINS; +static const pin_t col_pins[MATRIX_COLS] = MATRIX_COL_PINS; + +static void unselect_rows(void) { + for(uint8_t x = 0; x < MATRIX_ROWS; x++) { + setPinInputHigh(row_pins[x]); + } +} + +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 init_pins(void) { + unselect_rows(); + // Set I/O + uint8_t send_data[2] = { 0xFF, 0x03}; + i2c_writeReg((PORT_EXPANDER_ADDRESS << 1), 0x00, &send_data[0], 2, 20); + // Set Pull-up + i2c_writeReg((PORT_EXPANDER_ADDRESS << 1), 0x0C, &send_data[0], 2, 20); + + for (uint8_t x = 0; x < MATRIX_COLS; x++) { + if ( x < 8 ) { + setPinInputHigh(col_pins[x]); + } + } +} + +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]; + + // Clear data in matrix row + current_matrix[current_row] = 0; + + // Select row and wait for row selecton to stabilize + select_row(current_row); + matrix_io_delay(); + + uint8_t port_expander_col_buffer[2]; + i2c_readReg((PORT_EXPANDER_ADDRESS << 1), 0x12, &port_expander_col_buffer[0], 2, 20); + + // For each col... + for(uint8_t col_index = 0; col_index < MATRIX_COLS; col_index++) { + uint8_t pin_state; + // Select the col pin to read (active low) + switch (col_index) { + case 8 : + pin_state = port_expander_col_buffer[0] & (1 << 0); + break; + case 9 : + pin_state = port_expander_col_buffer[0] & (1 << 1); + break; + case 10 : + pin_state = port_expander_col_buffer[0] & (1 << 2); + break; + case 11 : + pin_state = port_expander_col_buffer[0] & (1 << 3); + break; + case 12 : + pin_state = port_expander_col_buffer[0] & (1 << 4); + break; + case 13 : + pin_state = port_expander_col_buffer[0] & (1 << 5); + break; + case 14 : + pin_state = port_expander_col_buffer[0] & (1 << 6); + break; + case 15 : + pin_state = port_expander_col_buffer[0] & (1 << 7); + break; + case 16 : + pin_state = port_expander_col_buffer[1] & (1 << 0); + break; + case 17 : + pin_state = port_expander_col_buffer[1] & (1 << 1); + break; + default : + 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]); +} + +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++) { + matrix_has_changed |= read_cols_on_row(current_matrix, current_row); + } + + return matrix_has_changed; +} diff --git a/keyboards/barleycorn/readme.md b/keyboards/barleycorn/readme.md new file mode 100644 index 000000000000..775d259681f0 --- /dev/null +++ b/keyboards/barleycorn/readme.md @@ -0,0 +1,23 @@ +# Barleycorn + +![Barleycorn](https://i.imgur.com/vi3L1HYl.png) + +An f-row less compact 1800 kit with only through hole components. + +* Keyboard Maintainer: [Yiancar](http://yiancar-designs.com/) and on [GitHub](https://github.com/yiancar) +* Hardware Supported: ATMEGA328p with vusb [PCB](https://github.com/yiancar/gingham_pcb) +* Hardware Availability: https://mykeyboard.eu/, https://novelkeys.xyz + +Make example for this keyboard (after setting up your build environment): + + make barleycorn:default + +Flashing example for this keyboard: + + make barleycorn:default:flash + +Bootloader: +use usbasploader from HSGW's 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/barleycorn/rules.mk b/keyboards/barleycorn/rules.mk new file mode 100644 index 000000000000..be005ab297e9 --- /dev/null +++ b/keyboards/barleycorn/rules.mk @@ -0,0 +1,27 @@ +# MCU name +MCU = atmega328p + +# Bootloader selection +BOOTLOADER = USBasp + +# 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 +BLUETOOTH_ENABLE = no # Enable Bluetooth +AUDIO_ENABLE = no # Audio output + +CUSTOM_MATRIX = lite + +SRC += matrix.c +QUANTUM_LIB_SRC += i2c_master.c From c9c63806a7a068cbc4d12d5739fdd0b05742241d Mon Sep 17 00:00:00 2001 From: Ryan Date: Tue, 25 Aug 2020 19:04:42 +1000 Subject: [PATCH 639/930] MSYS2: install packages for AVR toolchain (#10078) --- util/activate_msys2.sh | 1 - util/msys2_install.sh | 33 +++++---------------------------- 2 files changed, 5 insertions(+), 29 deletions(-) diff --git a/util/activate_msys2.sh b/util/activate_msys2.sh index b003c1a7873c..3fc149dbb65a 100755 --- a/util/activate_msys2.sh +++ b/util/activate_msys2.sh @@ -3,7 +3,6 @@ function export_variables { local util_dir=~/qmk_utils export PATH=$PATH:$util_dir - export PATH=$PATH:$util_dir/avr8-gnu-toolchain/bin export PATH=$PATH:$util_dir/gcc-arm-none-eabi/bin } diff --git a/util/msys2_install.sh b/util/msys2_install.sh index 1351aa5d7333..b92199647df5 100755 --- a/util/msys2_install.sh +++ b/util/msys2_install.sh @@ -2,25 +2,18 @@ dir=$(cd -P -- "$(dirname -- "$0")" && pwd -P) download_dir=~/qmk_utils -avrtools=avr8-gnu-toolchain armtools=gcc-arm-none-eabi util_dir=$(dirname "$0") -echo "Installing dependencies needed for the installation (quazip)" +echo "Installing dependencies needed for the installation" pacman --needed --noconfirm --disable-download-timeout -Sy base-devel mingw-w64-x86_64-toolchain mingw-w64-x86_64-clang git mingw-w64-x86_64-python3-pip unzip source "$dir/win_shared_install.sh" function install_avr { - rm -f -r "$avrtools" - wget "https://blog.zakkemble.net/download/avr-gcc-8.3.0-x86-mingw.zip" - echo "Extracting AVR toolchain..." - unzip -q -d . avr-gcc-8.3.0-x86-mingw.zip - mv avr-gcc-8.3.0-x86-mingw avr8-gnu-toolchain - rm avr8-gnu-toolchain/bin/make.exe - rm avr-gcc-8.3.0-x86-mingw.zip - - pacman --needed --noconfirm --disable-download-timeout -S mingw-w64-x86_64-avrdude mingw-w64-x86_64-bootloadhid mingw-w64-x86_64-dfu-programmer mingw-w64-x86_64-teensy-loader-cli + pacman --needed --noconfirm --disable-download-timeout -S \ + mingw-w64-x86_64-avr-binutils mingw-w64-x86_64-avr-gcc mingw-w64-x86_64-avr-libc \ + mingw-w64-x86_64-avrdude mingw-w64-x86_64-bootloadhid mingw-w64-x86_64-dfu-programmer mingw-w64-x86_64-teensy-loader-cli } function install_arm { @@ -35,23 +28,7 @@ function install_arm { pushd "$download_dir" -if [ ! -d "$avrtools" ]; then - echo - echo "The AVR toolchain is not installed." - echo "This is needed for building AVR based keyboards." - install_avr -else - while true; do - echo - echo "The AVR toolchain is already installed" - read -p "Do you want to reinstall? (Y/N) " res - case $res in - [Yy]* ) install_avr; break;; - [Nn]* ) break;; - * ) echo "Invalid answer";; - esac - done -fi +install_avr if [ ! -d "$armtools" ]; then echo From 1fd2f2f02227e969d4bde1ae88cd4eaa2f0ab242 Mon Sep 17 00:00:00 2001 From: Drashna Jaelre Date: Tue, 25 Aug 2020 02:05:39 -0700 Subject: [PATCH 640/930] Compiler warning when using WS2812 (#9955) Specifically, when rgb matrix is enabled and using the ws2812 driver, and rgb light is enabled at the same time, print a message about coexistance because it can cause issues, since you cannot change pins/config for the WS2812 driver. --- quantum/rgb_matrix_drivers.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/quantum/rgb_matrix_drivers.c b/quantum/rgb_matrix_drivers.c index 6084d5685c4b..0403d6c96ac9 100644 --- a/quantum/rgb_matrix_drivers.c +++ b/quantum/rgb_matrix_drivers.c @@ -111,6 +111,10 @@ const rgb_matrix_driver_t rgb_matrix_driver = { # endif #elif defined(WS2812) +# if defined(RGBLIGHT_ENABLE) && !defined(RGBLIGHT_CUSTOM_DRIVER) +# pragma message "Cannot use RGBLIGHT and RGB Matrix using WS2812 at the same time." +# pragma message "You need to use a custom driver, or re-implement the WS2812 driver to use a different configuration." +# endif // LED color buffer LED_TYPE rgb_matrix_ws2812_array[DRIVER_LED_TOTAL]; From b338a4d8867f69bd6a92ec92e306715a4ae41740 Mon Sep 17 00:00:00 2001 From: Drashna Jaelre Date: Tue, 25 Aug 2020 02:08:09 -0700 Subject: [PATCH 641/930] Add noeeprom speed function for RGBLIGHT (#9706) * [Docs] Add Speed functions to RGB Light docs * Add noeeprom functions for speed * Fix wording in doc Co-authored-by: Ryan Co-authored-by: Ryan --- docs/feature_rgblight.md | 11 +++++++++++ quantum/rgblight.c | 19 +++++++++++++++---- quantum/rgblight.h | 2 ++ 3 files changed, 28 insertions(+), 4 deletions(-) diff --git a/docs/feature_rgblight.md b/docs/feature_rgblight.md index a81b50e828a9..26e01da501d8 100644 --- a/docs/feature_rgblight.md +++ b/docs/feature_rgblight.md @@ -377,6 +377,17 @@ rgblight_sethsv(HSV_GREEN, 2); // led 2 |`rgblight_sethsv(h, s, v)` |Set effect range LEDs to the given HSV value where `h`/`s`/`v` are between 0 and 255 | |`rgblight_sethsv_noeeprom(h, s, v)` |Set effect range LEDs to the given HSV value where `h`/`s`/`v` are between 0 and 255 (not written to EEPROM) | +#### Speed functions +|Function |Description | +|--------------------------------------------|-------------| +|`rgblight_increase_speed()` |Increases the animation speed | +|`rgblight_increase_speed_noeeprom()` |Increases the animation speed (not written to EEPROM) | +|`rgblight_decrease_speed()` |Decreases the animation speed | +|`rgblight_decrease_speed_noeeprom()` |Decreases the animation speed (not written to EEPROM) | +|`rgblight_set_speed()` |Sets the speed. Value is between 0 and 255 | +|`rgblight_set_speed_noeeprom()` |Sets the speed. Value is between 0 and 255 (not written to EEPROM) | + + #### layer functions |Function |Description | |--------------------------------------------|-------------| diff --git a/quantum/rgblight.c b/quantum/rgblight.c index d33484ccfdf2..f9e9da167924 100644 --- a/quantum/rgblight.c +++ b/quantum/rgblight.c @@ -406,17 +406,28 @@ void rgblight_decrease_val_helper(bool 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) { + + +void rgblight_increase_speed_helper(bool write_to_eeprom) { 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 + if (write_to_eeprom) { + eeconfig_update_rgblight(rgblight_config.raw); // EECONFIG needs to be increased to support this + } } +void rgblight_increase_speed(void) { rgblight_increase_speed_helper(true); } +void rgblight_increase_speed_noeeprom(void) { rgblight_increase_speed_helper(false); } -void rgblight_decrease_speed(void) { +void rgblight_decrease_speed_helper(bool write_to_eeprom) { 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 + if (write_to_eeprom) { + eeconfig_update_rgblight(rgblight_config.raw); // EECONFIG needs to be increased to support this + } } +void rgblight_decrease_speed(void) { rgblight_decrease_speed_helper(true); } +void rgblight_decrease_speed_noeeprom(void) { rgblight_decrease_speed_helper(false); } + void rgblight_sethsv_noeeprom_old(uint8_t hue, uint8_t sat, uint8_t val) { if (rgblight_config.enable) { diff --git a/quantum/rgblight.h b/quantum/rgblight.h index c36b328a35f8..7b2696294751 100644 --- a/quantum/rgblight.h +++ b/quantum/rgblight.h @@ -336,7 +336,9 @@ void rgblight_increase_val_noeeprom(void); void rgblight_decrease_val(void); void rgblight_decrease_val_noeeprom(void); void rgblight_increase_speed(void); +void rgblight_increase_speed_noeeprom(void); void rgblight_decrease_speed(void); +void rgblight_decrease_speed_noeeprom(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); From 1f09fcaa69a42cef6aeb5d18e8b37ce1842980a3 Mon Sep 17 00:00:00 2001 From: eli <43716450+2-n@users.noreply.github.com> Date: Tue, 25 Aug 2020 05:29:11 -0400 Subject: [PATCH 642/930] [Keyboard] Pink Labs e88 (#9865) * Add files via upload * Update readme.md * Update readme.md * Delete info.json * Delete rules.mk * Delete readme.md * Delete f13.h * Delete f13.c * Delete config.h * Delete keymap.c * Delete readme.md * Add files via upload * Update keymap.c * Update config.h * Update config.h * Update rules.mk * Update keyboards/e88/config.h * Update keyboards/e88/readme.md * Update keyboards/e88/keymaps/default/keymap.c * Update keyboards/e88/rules.mk * Update keyboards/e88/rules.mk * Update keyboards/e88/config.h * Update keyboards/e88/rules.mk * Update keyboards/e88/rules.mk * Create info.json * Update config.h * Update keyboards/e88/info.json * Update keyboards/e88/readme.md * Update keyboards/e88/config.h * Update keyboards/e88/info.json --- keyboards/e88/config.h | 108 +++++++++++++++++++++++ keyboards/e88/e88.c | 16 ++++ keyboards/e88/e88.h | 45 ++++++++++ keyboards/e88/info.json | 109 ++++++++++++++++++++++++ keyboards/e88/keymaps/default/keymap.c | 40 +++++++++ keyboards/e88/keymaps/default/readme.md | 1 + keyboards/e88/readme.md | 19 +++++ keyboards/e88/rules.mk | 22 +++++ 8 files changed, 360 insertions(+) create mode 100644 keyboards/e88/config.h create mode 100644 keyboards/e88/e88.c create mode 100644 keyboards/e88/e88.h create mode 100644 keyboards/e88/info.json create mode 100644 keyboards/e88/keymaps/default/keymap.c create mode 100644 keyboards/e88/keymaps/default/readme.md create mode 100644 keyboards/e88/readme.md create mode 100644 keyboards/e88/rules.mk diff --git a/keyboards/e88/config.h b/keyboards/e88/config.h new file mode 100644 index 000000000000..5af8662fc5b4 --- /dev/null +++ b/keyboards/e88/config.h @@ -0,0 +1,108 @@ +/* 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 0x0187 +#define DEVICE_VER 0x0001 +#define MANUFACTURER Pink Labs +#define PRODUCT e88 + +/* 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 { B7, D7, B4, C6, B5, B6 } +#define MATRIX_COL_PINS { F0, F1, F4, F5, F6, F7, D0, D1, D2, D3, B3, B2, B1, E6, D5, D6, D4 } + +#define UNUSED_PINS {B0} + +/* 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 useful 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 + +/* + * 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 */ +#define NO_ACTION_MACRO +#define NO_ACTION_FUNCTION + +#define QMK_ESC_OUTPUT F0 // usually COL +#define QMK_ESC_INPUT B7 // usually ROW diff --git a/keyboards/e88/e88.c b/keyboards/e88/e88.c new file mode 100644 index 000000000000..044aa665a74c --- /dev/null +++ b/keyboards/e88/e88.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 "e88.h" diff --git a/keyboards/e88/e88.h b/keyboards/e88/e88.h new file mode 100644 index 000000000000..ebbcaae68eb3 --- /dev/null +++ b/keyboards/e88/e88.h @@ -0,0 +1,45 @@ +/* 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, 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, 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, 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, XXX, XXX, XXX }, \ + { k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, k4a, k4b, k4c, k4d, XXX, k4f, XXX }, \ + { k50, k51, k52, XXX, XXX, XXX, k56, XXX, XXX, XXX, k5a, k5b, k5c, k5d, k5e, k5f, k5g } \ +} diff --git a/keyboards/e88/info.json b/keyboards/e88/info.json new file mode 100644 index 000000000000..eb9c8365dfe2 --- /dev/null +++ b/keyboards/e88/info.json @@ -0,0 +1,109 @@ +{ + "keyboard_name": "e88", + "url": "", + "maintainer": "2-n", + "width": 18.25, + "height": 6.25, + "layouts": { + "LAYOUT_all": { + "layout": [ + {"x": 0, "y": 0}, + {"x": 1.25, "y": 0}, + {"x": 2.25, "y": 0}, + {"x": 3.25, "y": 0}, + {"x": 4.25, "y": 0}, + {"x": 5.5, "y": 0}, + {"x": 6.5, "y": 0}, + {"x": 7.5, "y": 0}, + {"x": 8.5, "y": 0}, + {"x": 9.75, "y": 0}, + {"x": 10.75, "y": 0}, + {"x": 11.75, "y": 0}, + {"x": 12.75, "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}, + {"x": 13.75, "y": 3.25, "w": 1.25}, + + {"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/e88/keymaps/default/keymap.c b/keyboards/e88/keymaps/default/keymap.c new file mode 100644 index 000000000000..9c877e124cd0 --- /dev/null +++ b/keyboards/e88/keymaps/default/keymap.c @@ -0,0 +1,40 @@ +/* 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 + +// Defines names for use in layer keycodes and the keymap +enum layer_names { + _MA, //Main layer + _FN //Function layer +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +[_MA] = 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_LGUI, 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_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_RALT, RESET, KC_RCTRL, KC_LEFT, KC_DOWN, KC_RGHT), +[_FN] = LAYOUT_all( + RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_VOLD, KC_MUTE, KC_VOLU, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MPRV, KC_MPLY, KC_MNXT, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______), + +}; diff --git a/keyboards/e88/keymaps/default/readme.md b/keyboards/e88/keymaps/default/readme.md new file mode 100644 index 000000000000..4918034cacad --- /dev/null +++ b/keyboards/e88/keymaps/default/readme.md @@ -0,0 +1 @@ +Default e88 firmware. \ No newline at end of file diff --git a/keyboards/e88/readme.md b/keyboards/e88/readme.md new file mode 100644 index 000000000000..2aaafccebcff --- /dev/null +++ b/keyboards/e88/readme.md @@ -0,0 +1,19 @@ +# e88 + +![pink labs logo](https://cdn.shopify.com/s/files/1/0302/4198/0548/files/logo_x60.png?v=1579122787) + +A tenkeyless PCB featuring the DK Saver layout, as designed for the Bliss keyboard by Pink Labs. + +* Maintainer: [elli](https://github.com/2-n) +* Hardware Supported: e88 f13 PCB (proto and final rev) +* Hardware Availability: [labs.pink](http://www.labs.pink/) + +Make example for this keyboard (after setting up your build environment): + + make e88:default + +Flashing example for this keyboard: + + make e88: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). diff --git a/keyboards/e88/rules.mk b/keyboards/e88/rules.mk new file mode 100644 index 000000000000..dc1dcdb8519d --- /dev/null +++ b/keyboards/e88/rules.mk @@ -0,0 +1,22 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +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 +BLUETOOTH_ENABLE = no # Enable Bluetooth +AUDIO_ENABLE = no # Audio output From b3987d7b3a5627e8ae28d9c6eec687eb0ee76c2b Mon Sep 17 00:00:00 2001 From: QMK Bot Date: Tue, 25 Aug 2020 09:47:03 +0000 Subject: [PATCH 643/930] format code according to conventions [skip ci] --- keyboards/e88/config.h | 216 ++++++++++++------------- keyboards/e88/e88.c | 32 ++-- keyboards/e88/e88.h | 90 +++++------ keyboards/e88/keymaps/default/keymap.c | 80 ++++----- keyboards/e88/readme.md | 38 ++--- 5 files changed, 228 insertions(+), 228 deletions(-) diff --git a/keyboards/e88/config.h b/keyboards/e88/config.h index 5af8662fc5b4..a077370c799a 100644 --- a/keyboards/e88/config.h +++ b/keyboards/e88/config.h @@ -1,108 +1,108 @@ -/* 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 0x0187 -#define DEVICE_VER 0x0001 -#define MANUFACTURER Pink Labs -#define PRODUCT e88 - -/* 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 { B7, D7, B4, C6, B5, B6 } -#define MATRIX_COL_PINS { F0, F1, F4, F5, F6, F7, D0, D1, D2, D3, B3, B2, B1, E6, D5, D6, D4 } - -#define UNUSED_PINS {B0} - -/* 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 useful 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 - -/* - * 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 */ -#define NO_ACTION_MACRO -#define NO_ACTION_FUNCTION - -#define QMK_ESC_OUTPUT F0 // usually COL -#define QMK_ESC_INPUT B7 // usually ROW +/* 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 0x0187 +#define DEVICE_VER 0x0001 +#define MANUFACTURER Pink Labs +#define PRODUCT e88 + +/* 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 { B7, D7, B4, C6, B5, B6 } +#define MATRIX_COL_PINS { F0, F1, F4, F5, F6, F7, D0, D1, D2, D3, B3, B2, B1, E6, D5, D6, D4 } + +#define UNUSED_PINS {B0} + +/* 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 useful 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 + +/* + * 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 */ +#define NO_ACTION_MACRO +#define NO_ACTION_FUNCTION + +#define QMK_ESC_OUTPUT F0 // usually COL +#define QMK_ESC_INPUT B7 // usually ROW diff --git a/keyboards/e88/e88.c b/keyboards/e88/e88.c index 044aa665a74c..970b04ce4fab 100644 --- a/keyboards/e88/e88.c +++ b/keyboards/e88/e88.c @@ -1,16 +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 "e88.h" +/* 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 "e88.h" diff --git a/keyboards/e88/e88.h b/keyboards/e88/e88.h index ebbcaae68eb3..2fc0428e04c5 100644 --- a/keyboards/e88/e88.h +++ b/keyboards/e88/e88.h @@ -1,45 +1,45 @@ -/* 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, 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, 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, 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, XXX, XXX, XXX }, \ - { k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, k4a, k4b, k4c, k4d, XXX, k4f, XXX }, \ - { k50, k51, k52, XXX, XXX, XXX, k56, XXX, XXX, XXX, k5a, k5b, k5c, k5d, k5e, k5f, k5g } \ -} +/* 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, 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, 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, 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, XXX, XXX, XXX }, \ + { k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, k4a, k4b, k4c, k4d, XXX, k4f, XXX }, \ + { k50, k51, k52, XXX, XXX, XXX, k56, XXX, XXX, XXX, k5a, k5b, k5c, k5d, k5e, k5f, k5g } \ +} diff --git a/keyboards/e88/keymaps/default/keymap.c b/keyboards/e88/keymaps/default/keymap.c index 9c877e124cd0..e58ffd12dc13 100644 --- a/keyboards/e88/keymaps/default/keymap.c +++ b/keyboards/e88/keymaps/default/keymap.c @@ -1,40 +1,40 @@ -/* 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 - -// Defines names for use in layer keycodes and the keymap -enum layer_names { - _MA, //Main layer - _FN //Function layer -}; - -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { -[_MA] = 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_LGUI, 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_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_RALT, RESET, KC_RCTRL, KC_LEFT, KC_DOWN, KC_RGHT), -[_FN] = LAYOUT_all( - RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_VOLD, KC_MUTE, KC_VOLU, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MPRV, KC_MPLY, KC_MNXT, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______), - -}; +/* 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 + +// Defines names for use in layer keycodes and the keymap +enum layer_names { + _MA, //Main layer + _FN //Function layer +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +[_MA] = 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_LGUI, 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_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_RALT, RESET, KC_RCTRL, KC_LEFT, KC_DOWN, KC_RGHT), +[_FN] = LAYOUT_all( + RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_VOLD, KC_MUTE, KC_VOLU, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MPRV, KC_MPLY, KC_MNXT, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______), + +}; diff --git a/keyboards/e88/readme.md b/keyboards/e88/readme.md index 2aaafccebcff..c92fb94760ee 100644 --- a/keyboards/e88/readme.md +++ b/keyboards/e88/readme.md @@ -1,19 +1,19 @@ -# e88 - -![pink labs logo](https://cdn.shopify.com/s/files/1/0302/4198/0548/files/logo_x60.png?v=1579122787) - -A tenkeyless PCB featuring the DK Saver layout, as designed for the Bliss keyboard by Pink Labs. - -* Maintainer: [elli](https://github.com/2-n) -* Hardware Supported: e88 f13 PCB (proto and final rev) -* Hardware Availability: [labs.pink](http://www.labs.pink/) - -Make example for this keyboard (after setting up your build environment): - - make e88:default - -Flashing example for this keyboard: - - make e88: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). +# e88 + +![pink labs logo](https://cdn.shopify.com/s/files/1/0302/4198/0548/files/logo_x60.png?v=1579122787) + +A tenkeyless PCB featuring the DK Saver layout, as designed for the Bliss keyboard by Pink Labs. + +* Maintainer: [elli](https://github.com/2-n) +* Hardware Supported: e88 f13 PCB (proto and final rev) +* Hardware Availability: [labs.pink](http://www.labs.pink/) + +Make example for this keyboard (after setting up your build environment): + + make e88:default + +Flashing example for this keyboard: + + make e88: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). From eb84f134c18d51c8e88e69b2ddf7d2bad86530be Mon Sep 17 00:00:00 2001 From: tominabox1 Date: Tue, 25 Aug 2020 14:47:16 -0500 Subject: [PATCH 644/930] [Keyboard] _33 v2 (#9899) * Initial prep for PR * Fixing jsons for revs * Remove old keymap ref in readme * Add Rev1 default layout * Fix extra comma in default r1 keymap * Changed default keymap for r1 to match new split bottom row macro name, updated via keymap readme, updated r1 json to match layout macro name, updated split space macro for r1 * Moved combo configs to default keymaps, removed unused bootloader selections * Update keyboards/underscore33/rev1/rules.mk * Update keyboards/underscore33/rev2/rules.mk * Refactor _33 folder structure * Add VIA keymap to rev1 * Rename macros and product_id as suggested --- .../underscore33/keymaps/default/readme.md | 5 -- keyboards/underscore33/readme.md | 10 ++- keyboards/underscore33/{ => rev1}/config.h | 19 +++- keyboards/underscore33/rev1/info.json | 16 ++++ .../rev1/keymaps/default/config.h | 5 ++ .../rev1/keymaps/default/keymap.c | 86 +++++++++++++++++++ .../rev1/keymaps/default/readme.md | 3 + .../rev1/keymaps/default/rules.mk | 1 + .../underscore33/rev1/keymaps/via/keymap.c | 46 ++++++++++ .../underscore33/rev1/keymaps/via/readme.md | 1 + .../underscore33/rev1/keymaps/via/rules.mk | 1 + keyboards/underscore33/rev1/rev1.c | 16 ++++ .../{underscore33.h => rev1/rev1.h} | 15 ++++ keyboards/underscore33/rev1/rules.mk | 22 +++++ keyboards/underscore33/rev2/config.h | 62 +++++++++++++ keyboards/underscore33/{ => rev2}/info.json | 2 +- .../rev2/keymaps/default/config.h | 5 ++ .../{ => rev2}/keymaps/default/keymap.c | 48 ++++++++++- .../rev2/keymaps/default/readme.md | 3 + .../rev2/keymaps/default/rules.mk | 1 + .../underscore33/rev2/keymaps/via/keymap.c | 46 ++++++++++ .../underscore33/rev2/keymaps/via/readme.md | 1 + .../underscore33/rev2/keymaps/via/rules.mk | 2 + keyboards/underscore33/rev2/rev2.c | 16 ++++ keyboards/underscore33/rev2/rev2.h | 46 ++++++++++ keyboards/underscore33/rev2/rules.mk | 23 +++++ keyboards/underscore33/rules.mk | 26 +----- keyboards/underscore33/underscore33.c | 1 - 28 files changed, 488 insertions(+), 40 deletions(-) delete mode 100644 keyboards/underscore33/keymaps/default/readme.md rename keyboards/underscore33/{ => rev1}/config.h (60%) create mode 100644 keyboards/underscore33/rev1/info.json create mode 100644 keyboards/underscore33/rev1/keymaps/default/config.h create mode 100644 keyboards/underscore33/rev1/keymaps/default/keymap.c create mode 100644 keyboards/underscore33/rev1/keymaps/default/readme.md create mode 100644 keyboards/underscore33/rev1/keymaps/default/rules.mk create mode 100644 keyboards/underscore33/rev1/keymaps/via/keymap.c create mode 100644 keyboards/underscore33/rev1/keymaps/via/readme.md create mode 100644 keyboards/underscore33/rev1/keymaps/via/rules.mk create mode 100644 keyboards/underscore33/rev1/rev1.c rename keyboards/underscore33/{underscore33.h => rev1/rev1.h} (60%) create mode 100644 keyboards/underscore33/rev1/rules.mk create mode 100644 keyboards/underscore33/rev2/config.h rename keyboards/underscore33/{ => rev2}/info.json (90%) create mode 100644 keyboards/underscore33/rev2/keymaps/default/config.h rename keyboards/underscore33/{ => rev2}/keymaps/default/keymap.c (50%) create mode 100644 keyboards/underscore33/rev2/keymaps/default/readme.md create mode 100644 keyboards/underscore33/rev2/keymaps/default/rules.mk create mode 100644 keyboards/underscore33/rev2/keymaps/via/keymap.c create mode 100644 keyboards/underscore33/rev2/keymaps/via/readme.md create mode 100644 keyboards/underscore33/rev2/keymaps/via/rules.mk create mode 100644 keyboards/underscore33/rev2/rev2.c create mode 100644 keyboards/underscore33/rev2/rev2.h create mode 100644 keyboards/underscore33/rev2/rules.mk delete mode 100644 keyboards/underscore33/underscore33.c diff --git a/keyboards/underscore33/keymaps/default/readme.md b/keyboards/underscore33/keymaps/default/readme.md deleted file mode 100644 index 7ef72915ed79..000000000000 --- a/keyboards/underscore33/keymaps/default/readme.md +++ /dev/null @@ -1,5 +0,0 @@ -![_33 layout Image](https://i.imgur.com/1vxmk0F.png) - -# Default _33 Layout - -This is the recommended default layout. It is not a fully functional layout without backspace, tab, esc and so on. It is recommended to use combos to access the additional modifiers when using the large spacebar layout option, however combos are not enabled in the default firmware. diff --git a/keyboards/underscore33/readme.md b/keyboards/underscore33/readme.md index 153329d84e4b..7cc2f9f4110f 100644 --- a/keyboards/underscore33/readme.md +++ b/keyboards/underscore33/readme.md @@ -2,14 +2,18 @@ ![_33](https://i.imgur.com/0Wuf8aT.png) -A little bitty 30% (10x4) ortholinear keyboard designed by tominabox1. The board supports an RGB LED strip with DI on port B6. There is an error on the initial 25 PCBs that incorrectly indicates PF0 for the RGB. The appropriate port is commented out in config.h for proper LED support. +A little bitty 30% (10x4) ortholinear keyboard designed by tominabox1. The R1 version of the board supports an RGB LED strip with DI on port B6. There is an error on the initial 25 PCBs that incorrectly indicates PF0 for the RGB. The R2 version is correctly labeled for RGB on D6. The appropriate port is commented out in config.h for proper LED support. * Keyboard Maintainer: [TJ Campie](https://github.com/tominabox1) -* Hardware Supported: _33 PCB and Plate limited buy (Open source available ca. Apirl 2020) +* Hardware Supported: [_33 r1 and r2 PCBs](https://github.com/tominabox1/_33-Keyboard) * Hardware Availability: [3D printed open sourced](https://github.com/tominabox1/_33-Keyboard) Make example for this keyboard (after setting up your build environment): - make underscore33:default + make underscore33/rev2:default + +Flashing example for this keyboard: + + make underscore33/rev2: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). diff --git a/keyboards/underscore33/config.h b/keyboards/underscore33/rev1/config.h similarity index 60% rename from keyboards/underscore33/config.h rename to keyboards/underscore33/rev1/config.h index 5733f30d00e6..8bdb802bdeac 100644 --- a/keyboards/underscore33/config.h +++ b/keyboards/underscore33/rev1/config.h @@ -1,10 +1,25 @@ +/* Copyright 2020 tominabox1 + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License 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 0x6A50 +#define VENDOR_ID 0x7431 +#define PRODUCT_ID 0x3301 // _33 rev1 #define DEVICE_VER 0x0001 #define MANUFACTURER tominabox1 #define PRODUCT underscore33 diff --git a/keyboards/underscore33/rev1/info.json b/keyboards/underscore33/rev1/info.json new file mode 100644 index 000000000000..9460a6f8c478 --- /dev/null +++ b/keyboards/underscore33/rev1/info.json @@ -0,0 +1,16 @@ +{ + "keyboard_name": "underscore33", + "url": "", + "maintainer": "tominabox1", + "width": 10, + "height": 4, + "layouts": { + "LAYOUT_33_big_space": { + "layout": [{"label":"Q", "x":0, "y":0}, {"label":"W", "x":1, "y":0}, {"label":"E", "x":2, "y":0}, {"label":"R", "x":3, "y":0}, {"label":"T", "x":4, "y":0}, {"label":"Y", "x":5, "y":0}, {"label":"U", "x":6, "y":0}, {"label":"I", "x":7, "y":0}, {"label":"O", "x":8, "y":0}, {"label":"P", "x":9, "y":0},{"label":"A", "x":0, "y":1}, {"label":"S", "x":1, "y":1}, {"label":"D", "x":2, "y":1}, {"label":"F", "x":3, "y":1}, {"label":"G", "x":4, "y":1}, {"label":"H", "x":5, "y":1}, {"label":"J", "x":6, "y":1}, {"label":"K", "x":7, "y":1}, {"label":"L", "x":8, "y":1}, {"label":";", "x":9, "y":1}, {"label":"Z", "x":0, "y":2}, {"label":"X", "x":1, "y":2}, {"label":"C", "x":2, "y":2}, {"label":"V", "x":3, "y":2}, {"label":"B", "x":4, "y":2}, {"label":"N", "x":5, "y":2}, {"label":"M", "x":6, "y":2}, {"label":"<", "x":7, "y":2}, {"label":">", "x":8, "y":2}, {"label":"?", "x":9, "y":2}, {"label":"", "x":0.65, "y":3, "w":1.25}, {"label":"", "x":1.9, "y":3, "w":6.25}, {"label":"", "x":8.15, "y":3, "w":1.25}] + }, + + "LAYOUT_33_tri_split": { + "layout": [{"label":"Q", "x":0, "y":0}, {"label":"W", "x":1, "y":0}, {"label":"E", "x":2, "y":0}, {"label":"R", "x":3, "y":0}, {"label":"T", "x":4, "y":0}, {"label":"Y", "x":5, "y":0}, {"label":"U", "x":6, "y":0}, {"label":"I", "x":7, "y":0}, {"label":"O", "x":8, "y":0}, {"label":"P", "x":9, "y":0}, {"label":"A", "x":0, "y":1}, {"label":"S", "x":1, "y":1}, {"label":"D", "x":2, "y":1}, {"label":"F", "x":3, "y":1}, {"label":"G", "x":4, "y":1}, {"label":"H", "x":5, "y":1}, {"label":"J", "x":6, "y":1}, {"label":"K", "x":7, "y":1}, {"label":"L", "x":8, "y":1}, {"label":";", "x":9, "y":1}, {"label":"Z", "x":0, "y":2}, {"label":"X", "x":1, "y":2}, {"label":"C", "x":2, "y":2}, {"label":"V", "x":3, "y":2}, {"label":"B", "x":4, "y":2}, {"label":"N", "x":5, "y":2}, {"label":"M", "x":6, "y":2}, {"label":"<", "x":7, "y":2}, {"label":">", "x":8, "y":2}, {"label":"?", "x":9, "y":2}, {"label":"", "x":0.65, "y":3, "w":1.25}, {"label":"", "x":1.9, "y":3, "w":2.25}, {"label":"", "x":4.15, "y":3, "w":1.75}, {"label":"", "x":5.9, "y":3, "w":2.25}, {"label":"", "x":8.15, "y":3, "w":1.25}] + } + } +} diff --git a/keyboards/underscore33/rev1/keymaps/default/config.h b/keyboards/underscore33/rev1/keymaps/default/config.h new file mode 100644 index 000000000000..5708a439acde --- /dev/null +++ b/keyboards/underscore33/rev1/keymaps/default/config.h @@ -0,0 +1,5 @@ +#pragma once + +/* Combos */ +#define COMBO_COUNT 5 +#define COMBO_TERM 50 diff --git a/keyboards/underscore33/rev1/keymaps/default/keymap.c b/keyboards/underscore33/rev1/keymaps/default/keymap.c new file mode 100644 index 000000000000..148e840fa527 --- /dev/null +++ b/keyboards/underscore33/rev1/keymaps/default/keymap.c @@ -0,0 +1,86 @@ +/* Copyright 2020 tominabox1 + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public 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, + _NUM_SYM, + _NAV +}; + +enum custom_keycodes{ + RGBRST = SAFE_RANGE, +}; + +#define KC_NUM_SPC LT(_NUM_SYM, KC_SPC) +#define KC_NAV_ENT LT(_NAV, KC_ENT) +#define KC_GA LGUI_T(KC_A) +#define KC_AS LALT_T(KC_S) +#define KC_CD LCTL_T(KC_D) +#define KC_SF LSFT_T(KC_F) +#define KC_SJ RSFT_T(KC_J) +#define KC_CK RCTL_T(KC_K) +#define KC_AL RALT_T(KC_L) +#define KC_GSCLN RGUI_T(KC_SCLN) + +enum combo_events { + COMBO_BSPC, + COMBO_NUMBAK, + COMBO_TAB, + COMBO_ESC, + COMBO_DEL, +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_BASE] = LAYOUT_33_split_space( + KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, + KC_GA, KC_AS, KC_CD, KC_SF, KC_G, KC_H, KC_SJ, KC_CK, KC_AL, KC_GSCLN, + KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, + KC_LCTL, KC_NAV_ENT, KC_RGUI, KC_NUM_SPC, KC_RCTL + ), + + [_NUM_SYM] = LAYOUT_33_split_space( + KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, + KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_EQUAL, KC_MINS, + KC_BSLS, KC_LCBR, KC_LBRC, KC_LPRN, KC_UNDS, KC_RPRN, KC_RBRC, KC_RCBR, KC_DOT, KC_GRV, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ), + + [_NAV] = LAYOUT_33_split_space( + RESET, RGBRST, AG_NORM, AG_SWAP, DEBUG, KC_GRV, KC_PGDN, KC_UP, KC_PGUP, KC_SCLN, + RGB_TOG, RGB_HUI, RGB_SAI, RGB_VAI, KC_NO, KC_HOME, KC_LEFT, KC_DOWN, KC_RGHT, KC_END, + RGB_MOD, RGB_HUD, RGB_SAD, RGB_VAD, KC_NO, KC_MINS, KC_RO, KC_COMM, KC_DOT, KC_BSLS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ), +}; + + +#ifdef COMBO_ENABLE +const uint16_t PROGMEM combo_bspc[] = {KC_O, KC_P, COMBO_END}; +const uint16_t PROGMEM combo_numbak[] = {KC_0, KC_9, COMBO_END}; +const uint16_t PROGMEM combo_tab[] = {KC_Q, KC_W, COMBO_END}; +const uint16_t PROGMEM combo_esc[] = {KC_E, KC_W, COMBO_END}; +const uint16_t PROGMEM combo_del[] = {KC_MINS, KC_EQL, COMBO_END}; + +combo_t key_combos[COMBO_COUNT] = { + [COMBO_BSPC] = COMBO(combo_bspc,KC_BSPC), + [COMBO_NUMBAK] = COMBO(combo_numbak,KC_BSPC), + [COMBO_TAB] = COMBO(combo_tab,KC_TAB), + [COMBO_ESC] = COMBO(combo_esc,KC_ESC), + [COMBO_DEL] = COMBO(combo_del,KC_DEL), + +}; +#endif diff --git a/keyboards/underscore33/rev1/keymaps/default/readme.md b/keyboards/underscore33/rev1/keymaps/default/readme.md new file mode 100644 index 000000000000..908b3e04ab3d --- /dev/null +++ b/keyboards/underscore33/rev1/keymaps/default/readme.md @@ -0,0 +1,3 @@ +# Default _33 Rev1 Layout + +This is the recommended default layout. diff --git a/keyboards/underscore33/rev1/keymaps/default/rules.mk b/keyboards/underscore33/rev1/keymaps/default/rules.mk new file mode 100644 index 000000000000..ab1e438182a3 --- /dev/null +++ b/keyboards/underscore33/rev1/keymaps/default/rules.mk @@ -0,0 +1 @@ +COMBO_ENABLE = yes diff --git a/keyboards/underscore33/rev1/keymaps/via/keymap.c b/keyboards/underscore33/rev1/keymaps/via/keymap.c new file mode 100644 index 000000000000..03e209fd15de --- /dev/null +++ b/keyboards/underscore33/rev1/keymaps/via/keymap.c @@ -0,0 +1,46 @@ +/* Copyright 2020 tominabox1 + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public 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_33_split_space( + 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_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, + KC_LCTL, KC_LALT, KC_SPACE, KC_RGUI, KC_RALT + ), + + [1] = LAYOUT_33_split_space( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_0, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, 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_33_split_space( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_0, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, 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_33_split_space( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_0, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, 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/underscore33/rev1/keymaps/via/readme.md b/keyboards/underscore33/rev1/keymaps/via/readme.md new file mode 100644 index 000000000000..a63a8342e831 --- /dev/null +++ b/keyboards/underscore33/rev1/keymaps/via/readme.md @@ -0,0 +1 @@ +# VIA _33 Rev1 Layout diff --git a/keyboards/underscore33/rev1/keymaps/via/rules.mk b/keyboards/underscore33/rev1/keymaps/via/rules.mk new file mode 100644 index 000000000000..1e5b99807cb7 --- /dev/null +++ b/keyboards/underscore33/rev1/keymaps/via/rules.mk @@ -0,0 +1 @@ +VIA_ENABLE = yes diff --git a/keyboards/underscore33/rev1/rev1.c b/keyboards/underscore33/rev1/rev1.c new file mode 100644 index 000000000000..4f763dbb495f --- /dev/null +++ b/keyboards/underscore33/rev1/rev1.c @@ -0,0 +1,16 @@ +/* Copyright 2020 tominabox1 + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public 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/underscore33/underscore33.h b/keyboards/underscore33/rev1/rev1.h similarity index 60% rename from keyboards/underscore33/underscore33.h rename to keyboards/underscore33/rev1/rev1.h index 5c774cfa855f..12cc7d9fd8cf 100644 --- a/keyboards/underscore33/underscore33.h +++ b/keyboards/underscore33/rev1/rev1.h @@ -1,3 +1,18 @@ +/* Copyright 2020 tominabox1 + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License 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" diff --git a/keyboards/underscore33/rev1/rules.mk b/keyboards/underscore33/rev1/rules.mk new file mode 100644 index 000000000000..32981133b2eb --- /dev/null +++ b/keyboards/underscore33/rev1/rules.mk @@ -0,0 +1,22 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +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 = no # Enable keyboard RGB underglow +BLUETOOTH_ENABLE = no # Enable Bluetooth +AUDIO_ENABLE = no # Audio output diff --git a/keyboards/underscore33/rev2/config.h b/keyboards/underscore33/rev2/config.h new file mode 100644 index 000000000000..0e965de23153 --- /dev/null +++ b/keyboards/underscore33/rev2/config.h @@ -0,0 +1,62 @@ +/* Copyright 2020 tominabox1 + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License 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 0x7431 +#define PRODUCT_ID 0x3302 // _33 rev2 +#define DEVICE_VER 0x0002 +#define MANUFACTURER tominabox1 +#define PRODUCT underscore33 + +/* key matrix size */ +#define MATRIX_ROWS 4 +#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 { C4, B0, B1, B2 } +#define MATRIX_COL_PINS { C5, C6, C7, B7, B6, B5, B4, B3, C2, D0 } +#define UNUSED_PINS + +/* 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 + +#ifdef RGBLIGHT_ENABLE +#define RGB_DI_PIN D6 + #define RGBLED_NUM 12 + #define RGBLIGHT_ANIMATIONS +#endif + diff --git a/keyboards/underscore33/info.json b/keyboards/underscore33/rev2/info.json similarity index 90% rename from keyboards/underscore33/info.json rename to keyboards/underscore33/rev2/info.json index 4e97a63802a0..567270ec72de 100644 --- a/keyboards/underscore33/info.json +++ b/keyboards/underscore33/rev2/info.json @@ -10,7 +10,7 @@ }, "LAYOUT_33_split_space": { - "layout": [{"label":"Q", "x":0, "y":0}, {"label":"W", "x":1, "y":0}, {"label":"E", "x":2, "y":0}, {"label":"R", "x":3, "y":0}, {"label":"T", "x":4, "y":0}, {"label":"Y", "x":5, "y":0}, {"label":"U", "x":6, "y":0}, {"label":"I", "x":7, "y":0}, {"label":"O", "x":8, "y":0}, {"label":"P", "x":9, "y":0},{"label":"A", "x":0, "y":1}, {"label":"S", "x":1, "y":1}, {"label":"D", "x":2, "y":1}, {"label":"F", "x":3, "y":1}, {"label":"G", "x":4, "y":1}, {"label":"H", "x":5, "y":1}, {"label":"J", "x":6, "y":1}, {"label":"K", "x":7, "y":1}, {"label":"L", "x":8, "y":1}, {"label":";", "x":9, "y":1}, {"label":"Z", "x":0, "y":2}, {"label":"X", "x":1, "y":2}, {"label":"C", "x":2, "y":2}, {"label":"V", "x":3, "y":2}, {"label":"B", "x":4, "y":2}, {"label":"N", "x":5, "y":2}, {"label":"M", "x":6, "y":2}, {"label":"<", "x":7, "y":2}, {"label":">", "x":8, "y":2}, {"label":"?", "x":9, "y":2}, {"label":"", "x":0.65, "y":3, "w":1.25}, {"label":"", "x":1.9, "y":3, "w":2.25}, {"label":"", "x":4.15, "y":3, "w":1.75}, {"label":"", "x":5.9, "y":3, "w":2.25}, {"label":"", "x":8.15, "y":3, "w":1.25}] + "layout": [{"label":"Q", "x":0, "y":0}, {"label":"W", "x":1, "y":0}, {"label":"E", "x":2, "y":0}, {"label":"R", "x":3, "y":0}, {"label":"T", "x":4, "y":0}, {"label":"Y", "x":5, "y":0}, {"label":"U", "x":6, "y":0}, {"label":"I", "x":7, "y":0}, {"label":"O", "x":8, "y":0}, {"label":"P", "x":9, "y":0},{"label":"A", "x":0, "y":1}, {"label":"S", "x":1, "y":1}, {"label":"D", "x":2, "y":1}, {"label":"F", "x":3, "y":1}, {"label":"G", "x":4, "y":1}, {"label":"H", "x":5, "y":1}, {"label":"J", "x":6, "y":1}, {"label":"K", "x":7, "y":1}, {"label":"L", "x":8, "y":1}, {"label":";", "x":9, "y":1}, {"label":"Z", "x":0, "y":2}, {"label":"X", "x":1, "y":2}, {"label":"C", "x":2, "y":2}, {"label":"V", "x":3, "y":2}, {"label":"B", "x":4, "y":2}, {"label":"N", "x":5, "y":2}, {"label":"M", "x":6, "y":2}, {"label":"<", "x":7, "y":2}, {"label":">", "x":8, "y":2}, {"label":"?", "x":9, "y":2}, {"label":"", "x":0.65, "y":3, "w":1}, {"label":"", "x":1.65, "y":3, "w":1.25}, {"label":"", "x":2.9, "y":3, "w":2.25}, {"label":"", "x":5.15, "y":3, "w":2}, {"label":"", "x":7.15, "y":3, "w":1.25}, {"label":"", "x":8.4, "y":3, "w":1}] } } } diff --git a/keyboards/underscore33/rev2/keymaps/default/config.h b/keyboards/underscore33/rev2/keymaps/default/config.h new file mode 100644 index 000000000000..5708a439acde --- /dev/null +++ b/keyboards/underscore33/rev2/keymaps/default/config.h @@ -0,0 +1,5 @@ +#pragma once + +/* Combos */ +#define COMBO_COUNT 5 +#define COMBO_TERM 50 diff --git a/keyboards/underscore33/keymaps/default/keymap.c b/keyboards/underscore33/rev2/keymaps/default/keymap.c similarity index 50% rename from keyboards/underscore33/keymaps/default/keymap.c rename to keyboards/underscore33/rev2/keymaps/default/keymap.c index 8fab8623a2ad..32a6f4863940 100644 --- a/keyboards/underscore33/keymaps/default/keymap.c +++ b/keyboards/underscore33/rev2/keymaps/default/keymap.c @@ -1,3 +1,18 @@ +/* Copyright 2020 tominabox1 + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public 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{ @@ -11,6 +26,7 @@ enum custom_keycodes{ }; #define KC_NUM_SPC LT(_NUM_SYM, KC_SPC) +#define KC_NAV_ENT LT(_NAV, KC_ENT) #define KC_GA LGUI_T(KC_A) #define KC_AS LALT_T(KC_S) #define KC_CD LCTL_T(KC_D) @@ -20,25 +36,51 @@ enum custom_keycodes{ #define KC_AL RALT_T(KC_L) #define KC_GSCLN RGUI_T(KC_SCLN) +enum combo_events { + COMBO_BSPC, + COMBO_NUMBAK, + COMBO_TAB, + COMBO_ESC, + COMBO_DEL, +}; + const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_BASE] = LAYOUT_33_split_space( KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_GA, KC_AS, KC_CD, KC_SF, KC_G, KC_H, KC_SJ, KC_CK, KC_AL, KC_GSCLN, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, - KC_LCTL, KC_LALT, KC_NUM_SPC, MO(_NAV), KC_RGUI + KC_LCTL, KC_LALT, KC_NAV_ENT, KC_NUM_SPC, KC_RGUI, KC_RCTL ), [_NUM_SYM] = LAYOUT_33_split_space( KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_EQUAL, KC_MINS, KC_BSLS, KC_LCBR, KC_LBRC, KC_LPRN, KC_UNDS, KC_RPRN, KC_RBRC, KC_RCBR, KC_DOT, KC_GRV, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS ), [_NAV] = LAYOUT_33_split_space( RESET, RGBRST, AG_NORM, AG_SWAP, DEBUG, KC_GRV, KC_PGDN, KC_UP, KC_PGUP, KC_SCLN, RGB_TOG, RGB_HUI, RGB_SAI, RGB_VAI, KC_NO, KC_HOME, KC_LEFT, KC_DOWN, KC_RGHT, KC_END, RGB_MOD, RGB_HUD, RGB_SAD, RGB_VAD, KC_NO, KC_MINS, KC_RO, KC_COMM, KC_DOT, KC_BSLS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS ), }; + + +#ifdef COMBO_ENABLE +const uint16_t PROGMEM combo_bspc[] = {KC_O, KC_P, COMBO_END}; +const uint16_t PROGMEM combo_numbak[] = {KC_0, KC_9, COMBO_END}; +const uint16_t PROGMEM combo_tab[] = {KC_Q, KC_W, COMBO_END}; +const uint16_t PROGMEM combo_esc[] = {KC_E, KC_W, COMBO_END}; +const uint16_t PROGMEM combo_del[] = {KC_MINS, KC_EQL, COMBO_END}; + +combo_t key_combos[COMBO_COUNT] = { + [COMBO_BSPC] = COMBO(combo_bspc,KC_BSPC), + [COMBO_NUMBAK] = COMBO(combo_numbak,KC_BSPC), + [COMBO_TAB] = COMBO(combo_tab,KC_TAB), + [COMBO_ESC] = COMBO(combo_esc,KC_ESC), + [COMBO_DEL] = COMBO(combo_del,KC_DEL), + +}; +#endif diff --git a/keyboards/underscore33/rev2/keymaps/default/readme.md b/keyboards/underscore33/rev2/keymaps/default/readme.md new file mode 100644 index 000000000000..fb4859889153 --- /dev/null +++ b/keyboards/underscore33/rev2/keymaps/default/readme.md @@ -0,0 +1,3 @@ +# Default _33 Rev2 Layout + +This is the recommended default layout. diff --git a/keyboards/underscore33/rev2/keymaps/default/rules.mk b/keyboards/underscore33/rev2/keymaps/default/rules.mk new file mode 100644 index 000000000000..ab1e438182a3 --- /dev/null +++ b/keyboards/underscore33/rev2/keymaps/default/rules.mk @@ -0,0 +1 @@ +COMBO_ENABLE = yes diff --git a/keyboards/underscore33/rev2/keymaps/via/keymap.c b/keyboards/underscore33/rev2/keymaps/via/keymap.c new file mode 100644 index 000000000000..9464b0cdb80c --- /dev/null +++ b/keyboards/underscore33/rev2/keymaps/via/keymap.c @@ -0,0 +1,46 @@ +/* Copyright 2020 tominabox1 + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public 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_33_split_space( + 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_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, + KC_LCTL, KC_LALT, KC_SPACE, KC_SPACE, KC_RGUI, KC_RALT + ), + + [1] = LAYOUT_33_split_space( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_0, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 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_33_split_space( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_0, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 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_33_split_space( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_0, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 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/underscore33/rev2/keymaps/via/readme.md b/keyboards/underscore33/rev2/keymaps/via/readme.md new file mode 100644 index 000000000000..7a6d4cf2f730 --- /dev/null +++ b/keyboards/underscore33/rev2/keymaps/via/readme.md @@ -0,0 +1 @@ +# VIA Layout diff --git a/keyboards/underscore33/rev2/keymaps/via/rules.mk b/keyboards/underscore33/rev2/keymaps/via/rules.mk new file mode 100644 index 000000000000..16d33cd89fe4 --- /dev/null +++ b/keyboards/underscore33/rev2/keymaps/via/rules.mk @@ -0,0 +1,2 @@ +VIA_ENABLE = yes + diff --git a/keyboards/underscore33/rev2/rev2.c b/keyboards/underscore33/rev2/rev2.c new file mode 100644 index 000000000000..e89b2938f9aa --- /dev/null +++ b/keyboards/underscore33/rev2/rev2.c @@ -0,0 +1,16 @@ +/* Copyright 2020 tominabox1 + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#include "rev2.h" diff --git a/keyboards/underscore33/rev2/rev2.h b/keyboards/underscore33/rev2/rev2.h new file mode 100644 index 000000000000..34e6e6b7a9cb --- /dev/null +++ b/keyboards/underscore33/rev2/rev2.h @@ -0,0 +1,46 @@ +/* Copyright 2020 tominabox1 + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License 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 + +#define LAYOUT_33_big_space( \ + 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, \ + K31, K34, K38 \ +) \ +{ \ + { 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 }, \ + { XXX, K31, XXX, XXX, K34, XXX, XXX, XXX, K38, XXX } \ +} + +#define LAYOUT_33_split_space( \ + 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, \ + K31, K32, K33, K35, K37, K38 \ +) \ +{ \ + { 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 }, \ + { XXX, K31, K32, K33, XXX, K35, XXX, K37, K38, XXX } \ +} diff --git a/keyboards/underscore33/rev2/rules.mk b/keyboards/underscore33/rev2/rules.mk new file mode 100644 index 000000000000..d226af58edc6 --- /dev/null +++ b/keyboards/underscore33/rev2/rules.mk @@ -0,0 +1,23 @@ +# MCU name +MCU = atmega32u2 + +# Bootloader selection +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 = yes # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +BLUETOOTH_ENABLE = no # Enable Bluetooth +AUDIO_ENABLE = no # Audio output + diff --git a/keyboards/underscore33/rules.mk b/keyboards/underscore33/rules.mk index a5c12fdadb05..b86f18e114fa 100644 --- a/keyboards/underscore33/rules.mk +++ b/keyboards/underscore33/rules.mk @@ -1,25 +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 - -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 -TAP_DANCE_ENABLE = no +DEFAULT_FOLDER = underscore33/rev1 diff --git a/keyboards/underscore33/underscore33.c b/keyboards/underscore33/underscore33.c deleted file mode 100644 index 9d690be9abd3..000000000000 --- a/keyboards/underscore33/underscore33.c +++ /dev/null @@ -1 +0,0 @@ -#include "underscore33.h" From 78362b1dc1f446a17c6386ccaafb0fc7cdccd4f6 Mon Sep 17 00:00:00 2001 From: James Young <18669334+noroadsleft@users.noreply.github.com> Date: Tue, 25 Aug 2020 17:13:06 -0700 Subject: [PATCH 645/930] Fix Configurator data: underscore33/rev1 Missed this on a previous PR. --- keyboards/underscore33/rev1/info.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/keyboards/underscore33/rev1/info.json b/keyboards/underscore33/rev1/info.json index 9460a6f8c478..5418340dc075 100644 --- a/keyboards/underscore33/rev1/info.json +++ b/keyboards/underscore33/rev1/info.json @@ -9,7 +9,7 @@ "layout": [{"label":"Q", "x":0, "y":0}, {"label":"W", "x":1, "y":0}, {"label":"E", "x":2, "y":0}, {"label":"R", "x":3, "y":0}, {"label":"T", "x":4, "y":0}, {"label":"Y", "x":5, "y":0}, {"label":"U", "x":6, "y":0}, {"label":"I", "x":7, "y":0}, {"label":"O", "x":8, "y":0}, {"label":"P", "x":9, "y":0},{"label":"A", "x":0, "y":1}, {"label":"S", "x":1, "y":1}, {"label":"D", "x":2, "y":1}, {"label":"F", "x":3, "y":1}, {"label":"G", "x":4, "y":1}, {"label":"H", "x":5, "y":1}, {"label":"J", "x":6, "y":1}, {"label":"K", "x":7, "y":1}, {"label":"L", "x":8, "y":1}, {"label":";", "x":9, "y":1}, {"label":"Z", "x":0, "y":2}, {"label":"X", "x":1, "y":2}, {"label":"C", "x":2, "y":2}, {"label":"V", "x":3, "y":2}, {"label":"B", "x":4, "y":2}, {"label":"N", "x":5, "y":2}, {"label":"M", "x":6, "y":2}, {"label":"<", "x":7, "y":2}, {"label":">", "x":8, "y":2}, {"label":"?", "x":9, "y":2}, {"label":"", "x":0.65, "y":3, "w":1.25}, {"label":"", "x":1.9, "y":3, "w":6.25}, {"label":"", "x":8.15, "y":3, "w":1.25}] }, - "LAYOUT_33_tri_split": { + "LAYOUT_33_split_space": { "layout": [{"label":"Q", "x":0, "y":0}, {"label":"W", "x":1, "y":0}, {"label":"E", "x":2, "y":0}, {"label":"R", "x":3, "y":0}, {"label":"T", "x":4, "y":0}, {"label":"Y", "x":5, "y":0}, {"label":"U", "x":6, "y":0}, {"label":"I", "x":7, "y":0}, {"label":"O", "x":8, "y":0}, {"label":"P", "x":9, "y":0}, {"label":"A", "x":0, "y":1}, {"label":"S", "x":1, "y":1}, {"label":"D", "x":2, "y":1}, {"label":"F", "x":3, "y":1}, {"label":"G", "x":4, "y":1}, {"label":"H", "x":5, "y":1}, {"label":"J", "x":6, "y":1}, {"label":"K", "x":7, "y":1}, {"label":"L", "x":8, "y":1}, {"label":";", "x":9, "y":1}, {"label":"Z", "x":0, "y":2}, {"label":"X", "x":1, "y":2}, {"label":"C", "x":2, "y":2}, {"label":"V", "x":3, "y":2}, {"label":"B", "x":4, "y":2}, {"label":"N", "x":5, "y":2}, {"label":"M", "x":6, "y":2}, {"label":"<", "x":7, "y":2}, {"label":">", "x":8, "y":2}, {"label":"?", "x":9, "y":2}, {"label":"", "x":0.65, "y":3, "w":1.25}, {"label":"", "x":1.9, "y":3, "w":2.25}, {"label":"", "x":4.15, "y":3, "w":1.75}, {"label":"", "x":5.9, "y":3, "w":2.25}, {"label":"", "x":8.15, "y":3, "w":1.25}] } } From c3ab20511d7170572d8698f47d3bee1c171919f8 Mon Sep 17 00:00:00 2001 From: rupa Date: Wed, 26 Aug 2020 04:09:45 -0400 Subject: [PATCH 646/930] kbd67/mkiirgb - allow disabling rgb matrix (#10147) * kbd67/mkiirgb - allow disabling rgb matrix wrap rgb matrix funs in defines * kbd67mkiirgb - changes per review remove kb funcs that just call the user version. what's left is all rgb matrix stuff so we can just wrap the whole file. --- keyboards/kbdfans/kbd67/mkiirgb/mkiirgb.c | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/keyboards/kbdfans/kbd67/mkiirgb/mkiirgb.c b/keyboards/kbdfans/kbd67/mkiirgb/mkiirgb.c index 526949e6fe7b..323cb2384818 100644 --- a/keyboards/kbdfans/kbd67/mkiirgb/mkiirgb.c +++ b/keyboards/kbdfans/kbd67/mkiirgb/mkiirgb.c @@ -95,17 +95,7 @@ led_config_t g_led_config = { { 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1, 1, 1, 4, 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) { rgb_matrix_set_suspend_state(true); @@ -126,6 +116,4 @@ void rgb_matrix_indicators_user(void) rgb_matrix_set_color(30, 0xFF, 0xFF, 0xFF); } } - - - +#endif From bad662b830bc5d93e244aec73d3115a65d7ccf17 Mon Sep 17 00:00:00 2001 From: Fidel Coria <1coriaF@gmail.com> Date: Wed, 26 Aug 2020 03:12:19 -0500 Subject: [PATCH 647/930] [Keyboard] Handwired pteron38 (#10035) * setup handwired pteron38 * Clean up readme * readme follow template * c formatting conventions * remove file size comments from rules.mk * use direct link to imgur image * Apply suggestions from code review * add license --- keyboards/handwired/pteron38/config.h | 41 +++++++++++++ keyboards/handwired/pteron38/info.json | 58 +++++++++++++++++++ .../pteron38/keymaps/default/keymap.c | 48 +++++++++++++++ keyboards/handwired/pteron38/pteron38.c | 17 ++++++ keyboards/handwired/pteron38/pteron38.h | 31 ++++++++++ keyboards/handwired/pteron38/readme.md | 15 +++++ keyboards/handwired/pteron38/rules.mk | 22 +++++++ 7 files changed, 232 insertions(+) create mode 100644 keyboards/handwired/pteron38/config.h create mode 100644 keyboards/handwired/pteron38/info.json create mode 100644 keyboards/handwired/pteron38/keymaps/default/keymap.c create mode 100644 keyboards/handwired/pteron38/pteron38.c create mode 100644 keyboards/handwired/pteron38/pteron38.h create mode 100644 keyboards/handwired/pteron38/readme.md create mode 100644 keyboards/handwired/pteron38/rules.mk diff --git a/keyboards/handwired/pteron38/config.h b/keyboards/handwired/pteron38/config.h new file mode 100644 index 000000000000..967872aaa9d4 --- /dev/null +++ b/keyboards/handwired/pteron38/config.h @@ -0,0 +1,41 @@ +/* Copyright 2020 Fidel Coria + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License 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 QMK Community +#define PRODUCT Pteron38 Keyboard + +/* key matrix size */ +#define MATRIX_ROWS 4 +#define MATRIX_COLS 10 + +/* key matrix pins */ +#define MATRIX_ROW_PINS { E6, B4, B5, B6 } +#define MATRIX_COL_PINS { F6, F5, F7, B1, B3, C6, D4, D0, D1, D2 } +#define UNUSED_PINS { D7, F4, D3 } + +/* COL2ROW or ROW2COL */ +#define DIODE_DIRECTION COL2ROW + +/* Set 0 if debouncing isn't needed */ +#define DEBOUNCE 5 /* 5 is default */ diff --git a/keyboards/handwired/pteron38/info.json b/keyboards/handwired/pteron38/info.json new file mode 100644 index 000000000000..58b46da7e891 --- /dev/null +++ b/keyboards/handwired/pteron38/info.json @@ -0,0 +1,58 @@ +{ + "keyboard_name": "pteron38", + "url": "", + "maintainer": "fidelcoria", + "width": 17, + "height": 5.95, + "layouts": { + "LAYOUT_split_3x5_4": { + "layout": [ + {"label":"K101", "x":1, "y":1.75}, + {"label":"K102", "x":2, "y":1.25}, + {"label":"K103", "x":3, "y":1}, + {"label":"K104", "x":4, "y":1.35}, + {"label":"K105", "x":5, "y":1.45}, + + {"label":"K106", "x":11, "y":1.45}, + {"label":"K107", "x":12, "y":1.35}, + {"label":"K108", "x":13, "y":1}, + {"label":"K109", "x":14, "y":1.25}, + {"label":"K110", "x":15, "y":1.75}, + + {"label":"K201", "x":1, "y":2.75}, + {"label":"K202", "x":2, "y":2.25}, + {"label":"K203", "x":3, "y":2}, + {"label":"K204", "x":4, "y":2.35}, + {"label":"K205", "x":5, "y":2.45}, + + {"label":"K206", "x":11, "y":2.45}, + {"label":"K207", "x":12, "y":2.35}, + {"label":"K208", "x":13, "y":2}, + {"label":"K209", "x":14, "y":2.25}, + {"label":"K210", "x":15, "y":2.75}, + + {"label":"K301", "x":1, "y":3.75}, + {"label":"K302", "x":2, "y":3.25}, + {"label":"K303", "x":3, "y":3}, + {"label":"K304", "x":4, "y":3.35}, + {"label":"K305", "x":5, "y":3.45}, + + {"label":"K306", "x":11, "y":3.45}, + {"label":"K307", "x":12, "y":3.35}, + {"label":"K308", "x":13, "y":3}, + {"label":"K309", "x":14, "y":3.25}, + {"label":"K310", "x":15, "y":3.75}, + + {"label":"K402", "x":4, "y":4.35}, + {"label":"K403", "x":5, "y":4.45}, + {"label":"K404", "x":6, "y":4.65}, + {"label":"K405", "x":7, "y":4.95}, + + {"label":"K406", "x":9, "y":4.95}, + {"label":"K407", "x":10, "y":4.65}, + {"label":"K408", "x":11, "y":4.45}, + {"label":"K409", "x":12, "y":4.35} + ] + } + } +} diff --git a/keyboards/handwired/pteron38/keymaps/default/keymap.c b/keyboards/handwired/pteron38/keymaps/default/keymap.c new file mode 100644 index 000000000000..df8028876b6d --- /dev/null +++ b/keyboards/handwired/pteron38/keymaps/default/keymap.c @@ -0,0 +1,48 @@ +/* Copyright 2020 Fidel Coria + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public 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 SFT_Z LSFT_T(KC_Z) +#define SFT_FSL RSFT_T(KC_SLSH) + +#define UNLOCK LCA(KC_DEL) +#define LOCK RGUI(KC_L) +#define CTL_S RCTL(KC_RSFT) // used with arrow keys for word highlight +#define G_SHFT RGUI(KC_RSFT) // plus arrow to switch window to other screen + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_split_3x5_4( + 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_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM,KC_DOT, SFT_FSL, + MO(1), KC_BSPC,MO(2), KC_LCTL, KC_RSFT,KC_ENT, KC_SPC, KC_RALT + ), + + [1] = LAYOUT_split_3x5_4( + KC_TAB, KC_HOME,KC_UP, KC_END, UNLOCK, KC_GRV, KC_LPRN,KC_RPRN,KC_MINS,KC_EQL, + KC_ESC, KC_LEFT,KC_DOWN,KC_RGHT,LOCK, KC_QUOT,KC_LCBR,KC_RCBR,KC_RGUI,KC_QUOT, + _______,KC_DEL, KC_ENT, KC_SPC, KC_CAPS, CTL_S, KC_LBRC,KC_RBRC,G_SHFT, KC_BSLS, + _______,_______,_______,_______, _______,_______,KC_RCTL,KC_RALT + ), + + [2] = LAYOUT_split_3x5_4( + 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_INS, _______,RESET, _______,_______, + _______,_______,_______,_______, _______,_______,KC_RCTL,KC_RALT + ) +}; diff --git a/keyboards/handwired/pteron38/pteron38.c b/keyboards/handwired/pteron38/pteron38.c new file mode 100644 index 000000000000..62d09ffa5546 --- /dev/null +++ b/keyboards/handwired/pteron38/pteron38.c @@ -0,0 +1,17 @@ +/* Copyright 2020 Fidel Coria + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#include "pteron38.h" diff --git a/keyboards/handwired/pteron38/pteron38.h b/keyboards/handwired/pteron38/pteron38.h new file mode 100644 index 000000000000..7b9e734cfbd5 --- /dev/null +++ b/keyboards/handwired/pteron38/pteron38.h @@ -0,0 +1,31 @@ +/* Copyright 2020 Fidel Coria + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License 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_split_3x5_4( \ + K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, \ + K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, \ + K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, \ + K402, K403, K404, K405, K406, K407, K408, K409 \ +) { \ + { K101, K102, K103, K104, K105, K106, K107, K108, K109, K110 }, \ + { K201, K202, K203, K204, K205, K206, K207, K208, K209, K210 }, \ + { K301, K302, K303, K304, K305, K306, K307, K308, K309, K310 }, \ + { KC_NO, K402, K403, K404, K405, K406, K407, K408, K409, KC_NO } \ +} diff --git a/keyboards/handwired/pteron38/readme.md b/keyboards/handwired/pteron38/readme.md new file mode 100644 index 000000000000..3ebdfecf4bdc --- /dev/null +++ b/keyboards/handwired/pteron38/readme.md @@ -0,0 +1,15 @@ +# Pteron38 + +![Pteron38](https://i.imgur.com/75030bal.jpg) + +An ergonomic keyboard heavily inspired by the [Atreus](https://github.com/technomancy/atreus), [Iris](https://github.com/keebio/iris-case) and [Atreis](https://github.com/dekonnection/atreis) keyboards. More info and files for laser cutting plates and case are in the [Pteron repository](https://github.com/FSund/pteron-keyboard). + +* Keyboard Maintainer: [Fidel Coria](https://github.com/fidelcoria) +* Hardware Supported: Elite C +* Hardware Availability: Handwired, no PCB's available (for now) + +Make example for this keyboard (after setting up your build environment): + + make handwired/pteron38: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/pteron38/rules.mk b/keyboards/handwired/pteron38/rules.mk new file mode 100644 index 000000000000..12c8a600591c --- /dev/null +++ b/keyboards/handwired/pteron38/rules.mk @@ -0,0 +1,22 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +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 +BLUETOOTH_ENABLE = no # Enable Bluetooth +AUDIO_ENABLE = no # Audio output From 2f9eb4cd22777e369cf220594d2269d6cfa8fcb6 Mon Sep 17 00:00:00 2001 From: Jonathan Dayton Date: Wed, 26 Aug 2020 11:55:18 -0500 Subject: [PATCH 648/930] [Keyboard] For Science (#9607) * Add a compiling layout based on minidox * Add the correct pins * Add old for science code * Update to 2020 standards * Get the keymap working * update config * Update pinout * Fix pins * Make requested changes * Add info.json for configurator * for science - PR comments * Apply suggestions from code review --- keyboards/for_science/config.h | 78 +++++++ keyboards/for_science/for_science.c | 16 ++ keyboards/for_science/for_science.h | 38 ++++ keyboards/for_science/info.json | 197 ++++++++++++++++++ .../for_science/keymaps/default/keymap.c | 113 ++++++++++ .../for_science/keymaps/default/readme.md | 1 + keyboards/for_science/readme.md | 18 ++ keyboards/for_science/rules.mk | 21 ++ 8 files changed, 482 insertions(+) create mode 100644 keyboards/for_science/config.h create mode 100644 keyboards/for_science/for_science.c create mode 100644 keyboards/for_science/for_science.h create mode 100644 keyboards/for_science/info.json create mode 100644 keyboards/for_science/keymaps/default/keymap.c create mode 100644 keyboards/for_science/keymaps/default/readme.md create mode 100644 keyboards/for_science/readme.md create mode 100644 keyboards/for_science/rules.mk diff --git a/keyboards/for_science/config.h b/keyboards/for_science/config.h new file mode 100644 index 000000000000..8c9c49d16493 --- /dev/null +++ b/keyboards/for_science/config.h @@ -0,0 +1,78 @@ +/* +Copyright 2017 Paul James (paul@peej.co.uk) +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License 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 0xF22C +#define DEVICE_VER 0x0001 +#define MANUFACTURER Peej +#define PRODUCT For Science + +/* key matrix size */ +// Rows are doubled-up +#define MATRIX_ROWS 10 +#define MATRIX_COLS 5 + +/* + * 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 { F6, B1, B3, B2, B6 } +#define MATRIX_ROW_PINS { D4, D7, E6, B4, B5 } +//#define MATRIX_COL_PINS { D4, C6, D7, E6, B4 } +#define MATRIX_COL_PINS { F6, F7, B1, B3, B2 } +#define UNUSED_PINS + +//#define USE_I2C +#define SOFT_SERIAL_PIN D0 + +/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */ +#define DIODE_DIRECTION ROW2COL + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCE 5 + +//#define MASTER_RIGHT + +/* 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) + +/* + * 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/for_science/for_science.c b/keyboards/for_science/for_science.c new file mode 100644 index 000000000000..32956ca673c0 --- /dev/null +++ b/keyboards/for_science/for_science.c @@ -0,0 +1,16 @@ +/* Copyright 2017 Paul James (paul@peej.co.uk) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#include "for_science.h" diff --git a/keyboards/for_science/for_science.h b/keyboards/for_science/for_science.h new file mode 100644 index 000000000000..09362a52864c --- /dev/null +++ b/keyboards/for_science/for_science.h @@ -0,0 +1,38 @@ +/* Copyright 2017 Paul James (paul@peej.co.uk) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License 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_split_4x5_3( \ + L00, L01, L02, L03, L04, R00, R01, R02, R03, R04, \ + L10, L11, L12, L13, L14, R10, R11, R12, R13, R14, \ + L20, L21, L22, L23, L24, R20, R21, R22, R23, R24, \ + L30, L31, L32, L33, L34, R30, R31, R32, R33, R34, \ + LT1, LT2, LT3, RT1, RT2, RT3 \ +) \ +{ \ + { L00, L01, L02, L03, L04 }, \ + { L10, L11, L12, L13, L14 }, \ + { L20, L21, L22, L23, L24 }, \ + { L30, L31, L32, L33, L34 }, \ + { KC_NO, KC_NO, LT1, LT2, LT3 }, \ + { R04, R03, R02, R01, R00 }, \ + { R14, R13, R12, R11, R10 }, \ + { R24, R23, R22, R21, R20 }, \ + { R34, R33, R32, R31, R30 }, \ + { KC_NO, KC_NO, RT3, RT2, RT1 } \ +} diff --git a/keyboards/for_science/info.json b/keyboards/for_science/info.json new file mode 100644 index 000000000000..de92f0eca222 --- /dev/null +++ b/keyboards/for_science/info.json @@ -0,0 +1,197 @@ +{ + "keyboard_name": "For Science", + "url": "https://github.com/peej/for-science-keyboard", + "maintainer": "qmk", + "width": 11.25, + "height": 5, + "layouts": { + "LAYOUT_split_4x5_3": { + "layout": [ + { + "x": 0, + "y": 0 + }, + { + "x": 1, + "y": 0 + }, + { + "x": 2, + "y": 0 + }, + { + "x": 3, + "y": 0 + }, + { + "x": 4, + "y": 0 + }, + { + "x": 6.25, + "y": 0 + }, + { + "x": 7.25, + "y": 0 + }, + { + "x": 8.25, + "y": 0 + }, + { + "x": 9.25, + "y": 0 + }, + { + "x": 10.25, + "y": 0 + }, + { + "x": 0, + "y": 1 + }, + { + "x": 1, + "y": 1 + }, + { + "x": 2, + "y": 1 + }, + { + "x": 3, + "y": 1 + }, + { + "x": 4, + "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": 0, + "y": 2 + }, + { + "x": 1, + "y": 2 + }, + { + "x": 2, + "y": 2 + }, + { + "x": 3, + "y": 2 + }, + { + "x": 4, + "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": 0, + "y": 3 + }, + { + "x": 1, + "y": 3 + }, + { + "x": 2, + "y": 3 + }, + { + "x": 3, + "y": 3 + }, + { + "x": 4, + "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": 2, + "y": 4 + }, + { + "x": 3, + "y": 4 + }, + { + "x": 4, + "y": 4 + }, + { + "x": 6.25, + "y": 4 + }, + { + "x": 7.25, + "y": 4 + }, + { + "x": 8.25, + "y": 4 + } + ] + } + } +} diff --git a/keyboards/for_science/keymaps/default/keymap.c b/keyboards/for_science/keymaps/default/keymap.c new file mode 100644 index 000000000000..918f60f4b861 --- /dev/null +++ b/keyboards/for_science/keymaps/default/keymap.c @@ -0,0 +1,113 @@ +/* Copyright 2017 Paul James (paul@peej.co.uk) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public 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, + _LAYER, + _MOD_LAYER, + _FUNCT +}; + +#define SFT_A SFT_T(KC_A) +#define SFT_F1 SFT_T(KC_F1) +#define SFT_Z SFT_T(KC_Z) +#define SFT_F6 SFT_T(KC_F6) +#define LAY_X LT(_LAYER, KC_X) +#define LAY_F7 LT(_LAYER, KC_F7) +#define LAY_SLS LT(_LAYER, KC_SLSH) +#define LAY_SPC LT(_LAYER, KC_SPACE) + +#define LOCK LGUI(KC_L) +#define MAC_LCK LGUI(LCTL(KC_Q)) + +#define LAYER MO(_LAYER) +#define FUNCT MO(_FUNCT) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +/* + * ,---------------------------------------- ----------------------------------------. + * | Tab | Esc | ( | { | [ | | ] | } | ) | ' | BkSp | + * | ~ | ` | < | _ | - | | + | = | > | \ | Del | + * |-------+-------+-------+-------+-------+ |-------+-------+-------+-------+-------| + * | Q | W | E | R | T | | Y | U | I | O | P | + * | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | + * |-------+-------+-------+-------+-------+ |-------+-------+-------+-------+-------| + * | A | S | D | F | G | | H | J | K | L | Enter | + * | F1 | F2 F3 | F4 | F5 | | PgUp | Home | Up | End | ; | + * |-Shift-+-------+-------+-------+-------+ |-------+-------+-------+-------+-------| + * | Z | X | C | V | B | | N | M | , | . | / | + * | F6 | F7 | F8 | F9 | F10 | | PgDn | Left | Down | Right | | + * `-Shift---Layer-+-------+-------+-------+ |-------+-------+-------+---------Layer-' + * | Ctrl | Gui | Alt | | Space | Layer | Shift | + * | | | | | Funct | | | + * `------------------------ `-Layer-----------------' + */ + +[_BASE] = LAYOUT_split_4x5_3( + KC_TAB, KC_ESC, KC_LPRN, KC_LCBR, KC_LBRC, KC_RBRC, KC_RCBR, KC_RPRN, KC_QUOT, KC_BSPC, + KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, + SFT_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_ENT, + SFT_Z, LAY_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, LAY_SLS, + KC_LCTL, KC_LGUI, KC_LALT, LAY_SPC, LAYER, KC_RSFT +), + +[_LAYER] = LAYOUT_split_4x5_3( + KC_TILD, KC_GRV, KC_LABK, KC_UNDS, KC_MINS, KC_PLUS, KC_EQL, KC_RABK, KC_BSLS, KC_DEL, + KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, + SFT_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_PGUP, KC_HOME, KC_UP, KC_END, KC_SCLN, + SFT_F6, LAY_F7, KC_F8, KC_F9, KC_F10, KC_PGDN, KC_LEFT, KC_DOWN, KC_RGHT, _______, + _______, _______, _______, FUNCT, _______, _______ +), + +[_MOD_LAYER] = LAYOUT_split_4x5_3( + KC_TILD, _______, _______, _______, _______, KC_Q, _______, _______, _______, _______, + KC_TAB, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______ +), + +[_FUNCT] = LAYOUT_split_4x5_3( + RESET, _______, _______, _______, LOCK, MAC_LCK, _______, _______, _______, MAGIC_SWAP_LALT_LGUI, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______ +), + +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + if (get_mods() & MOD_MASK_CAG) { + if (record->event.pressed) { + layer_on(_MOD_LAYER); + } else { + layer_off(_MOD_LAYER); + } + } + + if (record->event.pressed) { + if (keycode == KC_BSPC && (get_mods() & MOD_MASK_ALT)) { + tap_code(KC_DEL); + return false; + } + } + + return true; +}; diff --git a/keyboards/for_science/keymaps/default/readme.md b/keyboards/for_science/keymaps/default/readme.md new file mode 100644 index 000000000000..a5cb3ac09830 --- /dev/null +++ b/keyboards/for_science/keymaps/default/readme.md @@ -0,0 +1 @@ +# Default layout for For Science diff --git a/keyboards/for_science/readme.md b/keyboards/for_science/readme.md new file mode 100644 index 000000000000..8fa399a10c07 --- /dev/null +++ b/keyboards/for_science/readme.md @@ -0,0 +1,18 @@ +# For Science + +![for_science](https://raw.githubusercontent.com/peej/for-science-keyboard/master/pcb.png) + +A split ergo 4x5 keyboard with 3 thumb keys where each half is smaller than the 100x100mm cheap PCB production size. +Designed to be easy to build, it only supports serial communication over a TRRS cable and no LED support. +The PCB is reversible, meaning that you use the same PCB for both the left and right halves and thus need two PCBs to create a full keyboard. + +* Keyboard Maintainer: [Peej](https://github.com/peej) +* Hardware Supported: Pro Micro +* Hardware Availability: [Github](https://github.com/peej/for-science-keyboard) + +Make example for this keyboard (after setting up your build environment): + + make for_science: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/for_science/rules.mk b/keyboards/for_science/rules.mk new file mode 100644 index 000000000000..b8e091ef66b9 --- /dev/null +++ b/keyboards/for_science/rules.mk @@ -0,0 +1,21 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +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 +BLUETOOTH_ENABLE = no # Enable Bluetooth +AUDIO_ENABLE = no # Audio output From d949932c08db8e52f117f799280b5dc0b60bac85 Mon Sep 17 00:00:00 2001 From: Ryan Date: Thu, 27 Aug 2020 04:15:43 +1000 Subject: [PATCH 649/930] Fix ChibiOS backlight not turning off on suspend (#10114) * Fix ChibiOS backlight not turning off on suspend * Add missing code for backlight as caps lock too --- tmk_core/common/chibios/suspend.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/tmk_core/common/chibios/suspend.c b/tmk_core/common/chibios/suspend.c index 8c071e7a086d..64dfc05abce2 100644 --- a/tmk_core/common/chibios/suspend.c +++ b/tmk_core/common/chibios/suspend.c @@ -9,6 +9,7 @@ #include "mousekey.h" #include "host.h" #include "suspend.h" +#include "led.h" #include "wait.h" #ifdef BACKLIGHT_ENABLE @@ -47,6 +48,20 @@ __attribute__((weak)) void suspend_power_down_kb(void) { suspend_power_down_user * FIXME: needs doc */ void suspend_power_down(void) { +#ifdef BACKLIGHT_ENABLE + backlight_set(0); +#endif + + // Turn off LED indicators + uint8_t leds_off = 0; +#if defined(BACKLIGHT_CAPS_LOCK) && defined(BACKLIGHT_ENABLE) + if (is_backlight_enabled()) { + // Don't try to turn off Caps Lock indicator as it is backlight and backlight is already off + leds_off |= (1 << USB_LED_CAPS_LOCK); + } +#endif + led_set(leds_off); + // TODO: figure out what to power down and how // shouldn't power down TPM/FTM if we want a breathing LED // also shouldn't power down USB @@ -119,6 +134,7 @@ void suspend_wakeup_init(void) { #ifdef BACKLIGHT_ENABLE backlight_init(); #endif /* BACKLIGHT_ENABLE */ + led_set(host_keyboard_leds()); #if defined(RGBLIGHT_SLEEP) && defined(RGBLIGHT_ENABLE) is_suspended = false; if (rgblight_enabled) { From c9eaf1ac2ba0e9114343815432de524062f4c94f Mon Sep 17 00:00:00 2001 From: Evgenii <59191442+greenjack-z@users.noreply.github.com> Date: Wed, 26 Aug 2020 22:36:23 +0300 Subject: [PATCH 650/930] update info.json file for handwired/zergo (#10117) * Rename keyboards/handwired/zergo/keymap.c to keyboards/handwired/zergo/keymaps/default/keymap.c * Update rules.mk * Update rules.mk * Update bootloader.mk * Update rules.mk * Update bootloader.mk * Update info.json * Update rules.mk * Update zergo.h * Update info.json * Update keymap.c * Update keyboards/handwired/zergo/info.json * Update keyboards/handwired/zergo/keymaps/default/keymap.c --- keyboards/handwired/zergo/info.json | 82 +++++++++---------- .../handwired/zergo/keymaps/default/keymap.c | 14 ++-- keyboards/handwired/zergo/zergo.h | 8 +- 3 files changed, 52 insertions(+), 52 deletions(-) diff --git a/keyboards/handwired/zergo/info.json b/keyboards/handwired/zergo/info.json index 0bbb867ad89d..f5b1ff38c892 100644 --- a/keyboards/handwired/zergo/info.json +++ b/keyboards/handwired/zergo/info.json @@ -1,13 +1,13 @@ { "keyboard_name": "zergo", - "url": "", + "url": "https://github.com/qmk/qmk_firmware/tree/master/keyboards/handwired/zergo", "maintainer": "greenjack", "width": 15, "height": 6.25, "layouts": { "LAYOUT": { "layout": [ - {"label":"Esc", "x":0, "y":0}, + {"label":"Esc", "x":0, "y":0}, {"label":"F1", "x":2, "y":0}, {"label":"F2", "x":3, "y":0}, {"label":"F3", "x":4, "y":0}, @@ -20,28 +20,28 @@ {"label":"F10", "x":12, "y":0}, {"label":"F11", "x":13, "y":0}, {"label":"F12", "x":14, "y":0}, - {"label":"Home", "x":0, "y":1.25}, - {"label":"~", "x":1, "y":1.25}, - {"label":"!", "x":2, "y":1.25}, - {"label":"@", "x":3, "y":1.25}, - {"label":"#", "x":4, "y":1.25}, - {"label":"$", "x":5, "y":1.25}, - {"label":"%", "x":6, "y":1.25}, - {"label":"^", "x":7, "y":1.25}, - {"label":"&", "x":8, "y":1.25}, - {"label":"*", "x":9, "y":1.25}, - {"label":"(", "x":10, "y":1.25}, - {"label":")", "x":11, "y":1.25}, - {"label":"_", "x":12, "y":1.25}, - {"label":"+", "x":13, "y":1.25}, - {"label":"PgUp", "x":14, "y":1.25}, + {"label":"Del", "x":0, "y":1.25}, + {"label":"`", "x":1, "y":1.25}, + {"label":"1", "x":2, "y":1.25}, + {"label":"2", "x":3, "y":1.25}, + {"label":"3", "x":4, "y":1.25}, + {"label":"4", "x":5, "y":1.25}, + {"label":"5", "x":6, "y":1.25}, + {"label":"6", "x":7, "y":1.25}, + {"label":"7", "x":8, "y":1.25}, + {"label":"8", "x":9, "y":1.25}, + {"label":"9", "x":10, "y":1.25}, + {"label":"0", "x":11, "y":1.25}, + {"label":"-", "x":12, "y":1.25}, + {"label":"=", "x":13, "y":1.25}, + {"label":"Backspace", "x":14, "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":"}", "x":6.5, "y":2.25}, + {"label":"modifier", "x":6.5, "y":2.25}, {"label":"Y", "x":7.5, "y":2.25}, {"label":"U", "x":8.5, "y":2.25}, {"label":"I", "x":9.5, "y":2.25}, @@ -49,7 +49,7 @@ {"label":"P", "x":11.5, "y":2.25}, {"label":"{", "x":12.5, "y":2.25}, {"label":"|", "x":13.5, "y":2.25, "w":1.5}, - {"label":"Ctrl", "x":0, "y":3.25, "w":1.25}, + {"label":"modifier", "x":0, "y":3.25, "w":1.25}, {"label":"A", "x":1.25, "y":3.25}, {"label":"S", "x":2.25, "y":3.25}, {"label":"D", "x":3.25, "y":3.25}, @@ -61,32 +61,32 @@ {"label":"L", "x":10.75, "y":3.25}, {"label":":", "x":11.75, "y":3.25}, {"label":"\"", "x":12.75, "y":3.25}, - {"label":"Ctrl", "x":13.75, "y":3.25, "w":1.25}, - {"label":"End", "x":0, "y":4.25}, - {"label":"\u2191", "x":1, "y":4.25}, - {"label":"Z", "x":2, "y":4.25}, - {"label":"X", "x":3, "y":4.25}, - {"label":"C", "x":4, "y":4.25}, - {"label":"V", "x":5, "y":4.25}, - {"label":"Enter", "x":6, "y":4.25, "w":2}, - {"label":"B", "x":8, "y":4.25}, - {"label":"N", "x":9, "y":4.25}, - {"label":"M", "x":10, "y":4.25}, - {"label":"<", "x":11, "y":4.25}, - {"label":">", "x":12, "y":4.25}, - {"label":"?", "x":13, "y":4.25}, - {"label":"PgDn", "x":14, "y":4.25}, - {"label":"\u2190", "x":0, "y":5.25}, - {"label":"\u2193", "x":1, "y":5.25}, - {"label":"\u2192", "x":2, "y":5.25}, - {"label":"Alt", "x":3, "y":5.25, "w":1.25}, + {"label":"modifier", "x":13.75, "y":3.25, "w":1.25}, + {"label":"LShift", "x":0, "y":4.25}, + {"label":"Z", "x":1, "y":4.25}, + {"label":"X", "x":2, "y":4.25}, + {"label":"C", "x":3, "y":4.25}, + {"label":"V", "x":4, "y":4.25}, + {"label":"B", "x":5, "y":4.25}, + {"label":"Backspace", "x":6, "y":4.25, "w":2}, + {"label":"N", "x":8, "y":4.25}, + {"label":"M", "x":9, "y":4.25}, + {"label":"<", "x":10, "y":4.25}, + {"label":">", "x":11, "y":4.25}, + {"label":"?", "x":12, "y":4.25}, + {"label":"}", "x":13, "y":4.25}, + {"label":"Rshift", "x":14, "y":4.25}, + {"label":"LControl", "x":0, "y":5.25}, + {"label":"free-1", "x":1, "y":5.25}, + {"label":"free-2", "x":2, "y":5.25}, + {"label":"LAlt", "x":3, "y":5.25, "w":1.25}, {"label":"Space", "x":4.25, "y":5.25, "w":2.25}, - {"label":"Bsp", "x":6.5, "y":5.25}, + {"label":"Enter", "x":6.5, "y":5.25}, {"label":"Space", "x":7.5, "y":5.25, "w":2.75}, - {"label":"Alt", "x":10.25, "y":5.25, "w":1.25}, + {"label":"RAlt", "x":10.25, "y":5.25, "w":1.25}, {"label":"Win", "x":11.5, "y":5.25, "w":1.25}, {"label":"Menu", "x":12.75, "y":5.25, "w":1.25}, - {"label":"Fn", "x":14, "y":5.25} + {"label":"RControl", "x":14, "y":5.25} ] } } diff --git a/keyboards/handwired/zergo/keymaps/default/keymap.c b/keyboards/handwired/zergo/keymaps/default/keymap.c index d0f7b750ec3a..a9dcc82aea6d 100644 --- a/keyboards/handwired/zergo/keymaps/default/keymap.c +++ b/keyboards/handwired/zergo/keymaps/default/keymap.c @@ -20,17 +20,17 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { 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_HOME, KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_PGUP, - KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_5, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_BSLS, - KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_RBRC, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_LCTL, - MT(MOD_LSFT, KC_END), KC_UP, KC_Z, KC_X, KC_C, KC_V, KC_ENT, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, MT(MOD_LSFT, KC_PGDN), - KC_LEFT, KC_DOWN, KC_RGHT, KC_LALT, KC_SPC, KC_BSPC, KC_SPC, KC_RALT, KC_LGUI, KC_RGUI, LT(1, KC_NO)), + 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_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, TG(1), KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, 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_RCTL, + MT(MOD_LSFT, KC_HOME), KC_Z, KC_X, KC_C, KC_V, KC_B, KC_BSPC, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RBRC, MT(MOD_RSFT, KC_PGUP), + MT(MOD_LCTL, KC_END), KC_DOWN, KC_RGHT, KC_LALT, KC_SPC, KC_ENT, KC_SPC, KC_RALT, KC_LGUI, KC_MENU, MT(MOD_RCTL, KC_PGDN)), LAYOUT( - TG(1), 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, 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_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_ENT, KC_UP, KC_BSPC, 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, KC_TRNS, KC_TRNS), diff --git a/keyboards/handwired/zergo/zergo.h b/keyboards/handwired/zergo/zergo.h index b4daeff76515..5b7695868f7d 100644 --- a/keyboards/handwired/zergo/zergo.h +++ b/keyboards/handwired/zergo/zergo.h @@ -19,10 +19,10 @@ #include "quantum.h" #define LAYOUT( \ - 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, \ - 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, \ + K000, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, \ + K100, K101, K102, K103, K104, K105, K206, K106, K107, K108, K109, K110, K111, K112, K113, \ + K200, K201, K202, K203, K204, K205, K306, K207, K208, K209, K210, K211, K212, K213, \ + K300, K301, K302, K303, K304, K305, K307, K308, K309, K310, K311, K312, K313, \ K400, K401, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, K412, K413, \ K500, K501, K502, K503, K505, K506, K507, K509, K511, K512, K513 \ ) { \ From 0f9b7b9768e53add15dc7e860efab0464cd7533d Mon Sep 17 00:00:00 2001 From: Ryan Date: Sat, 29 Aug 2020 01:03:42 +1000 Subject: [PATCH 651/930] Add debug logging to `run()` (#9986) --- lib/python/qmk/commands.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/python/qmk/commands.py b/lib/python/qmk/commands.py index 5a6e60988ade..4db4667a8ebe 100644 --- a/lib/python/qmk/commands.py +++ b/lib/python/qmk/commands.py @@ -7,6 +7,7 @@ import shlex import shutil +from milc import cli import qmk.keymap @@ -83,4 +84,6 @@ def run(command, *args, **kwargs): safecmd = ' '.join(safecmd) command = [os.environ['SHELL'], '-c', safecmd] + cli.log.debug('Running command: %s', command) + return subprocess.run(command, *args, **kwargs) From 3dbbd4cf4466ba36676e028ce78c60bf7ccc4282 Mon Sep 17 00:00:00 2001 From: James Young <18669334+noroadsleft@users.noreply.github.com> Date: Sat, 30 May 2020 13:22:56 -0700 Subject: [PATCH 652/930] Branch point for 2020 Aug 29 Breaking Change Update readme.md --- readme.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/readme.md b/readme.md index 6092f209be1a..6321681a9249 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 DEVELOP BRANCH + +Warning- This is the `develop` 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 5cc3ab38c9148cd6bc7ccdba176a88fbb95653b1 Mon Sep 17 00:00:00 2001 From: Ryan Date: Fri, 5 Jun 2020 20:56:03 +1000 Subject: [PATCH 653/930] Remove iWRAP protocol (#9284) --- doxygen-todo | 1 - tmk_core/protocol/iwrap.mk | 32 --- tmk_core/protocol/iwrap/iWRAP4.txt | 376 ------------------------- tmk_core/protocol/iwrap/iWRAP5.txt | 356 ----------------------- tmk_core/protocol/iwrap/iwrap.c | 420 ---------------------------- tmk_core/protocol/iwrap/iwrap.h | 47 ---- tmk_core/protocol/iwrap/main.c | 412 --------------------------- tmk_core/protocol/iwrap/mux_exit.rb | 7 - tmk_core/protocol/iwrap/suart.S | 156 ----------- tmk_core/protocol/iwrap/suart.h | 8 - tmk_core/protocol/iwrap/wd.h | 161 ----------- tmk_core/readme.md | 5 +- 12 files changed, 2 insertions(+), 1979 deletions(-) delete mode 100644 tmk_core/protocol/iwrap.mk delete mode 100644 tmk_core/protocol/iwrap/iWRAP4.txt delete mode 100644 tmk_core/protocol/iwrap/iWRAP5.txt delete mode 100644 tmk_core/protocol/iwrap/iwrap.c delete mode 100644 tmk_core/protocol/iwrap/iwrap.h delete mode 100644 tmk_core/protocol/iwrap/main.c delete mode 100644 tmk_core/protocol/iwrap/mux_exit.rb delete mode 100644 tmk_core/protocol/iwrap/suart.S delete mode 100644 tmk_core/protocol/iwrap/suart.h delete mode 100644 tmk_core/protocol/iwrap/wd.h diff --git a/doxygen-todo b/doxygen-todo index 39fb498d9782..d8892e48ded7 100644 --- a/doxygen-todo +++ b/doxygen-todo @@ -1,6 +1,5 @@ tmk_core/protocol tmk_core/protocol/chibios -tmk_core/protocol/iwrap tmk_core/protocol/lufa tmk_core/protocol/midi tmk_core/protocol/midi/bytequeue diff --git a/tmk_core/protocol/iwrap.mk b/tmk_core/protocol/iwrap.mk deleted file mode 100644 index 934235bd8107..000000000000 --- a/tmk_core/protocol/iwrap.mk +++ /dev/null @@ -1,32 +0,0 @@ -IWRAP_DIR = protocol/iwrap - -OPT_DEFS += -DPROTOCOL_IWRAP - -SRC += $(IWRAP_DIR)/main.c \ - $(IWRAP_DIR)/iwrap.c \ - $(IWRAP_DIR)/suart.S \ - $(COMMON_DIR)/sendchar_uart.c \ - $(COMMON_DIR)/uart.c - -# Search Path -VPATH += $(TMK_DIR)/protocol/iwrap - - -# TODO: compatible with LUFA and PJRC -# V-USB -# -VUSB_DIR = protocol/vusb - -# Path to the V-USB library -VUSB_PATH = $(LIB_PATH)/vusb - -SRC += $(VUSB_DIR)/vusb.c \ - $(VUSB_PATH)/usbdrv/usbdrv.c \ - $(VUSB_PATH)/usbdrv/usbdrvasm.S \ - $(VUSB_PATH)/usbdrv/oddebug.c - -# Search Path -VPATH += $(TMK_PATH)/$(VUSB_DIR) -VPATH += $(VUSB_PATH) - -OPT_DEFS += -DPROTOCOL_VUSB diff --git a/tmk_core/protocol/iwrap/iWRAP4.txt b/tmk_core/protocol/iwrap/iWRAP4.txt deleted file mode 100644 index 2a062d9d98d2..000000000000 --- a/tmk_core/protocol/iwrap/iWRAP4.txt +++ /dev/null @@ -1,376 +0,0 @@ -Bulegiga WT12 -============= -WT12 is a bluetooth module from Bluegiga. http://www.bluegiga.com/ - -iWRAP - higher layer interface for bluetooth firmware - communicate with UART - -iWRAP HID -default setting - 115200 8bit/n/1/n - - -TODO ----- -KiCAD circuit/PCB design -power saving - AVR sleep(15ms by watch dog timer) - WT12 sleep - measuring current consumption - measuring battery life of normal usage/idle/intensive usage -software reset/bootloarder -LED indicator(chaging/paring/connecting) -license confirmation of suart.c -consumer page is not working -authenticate method/SSP -SPP keyboard support -SPP debug console support -mouse wheel feature request to Bluegiga - - -Problems --------- -power consumption -no consumer page support(bug?) -no mouse wheel support -no paring management -no interactive auth method - - -UART hardware flow control --------------------------- -(iWRAP4 User Guide 9.5) -Hardware flow control is enabled by default and it should not be disabled unless mandatory, because without the hardware flow control the data transmission may not be reliable. -If the hardware flow control is enabled from PS-keys, but no flow control is used, the following steps should be implemented in the hardware design: -- CTS pin must be grounded -- RTS pin must be left floating - - -Power Saving ------------- -power consume - without opimization: 4hr to shutdown(310mAh) - 2011/08/25: 9hr(310mAh) SNIFF MASTER sleep/WDTO_120MS - -measure current consumption - HHKB keyswitch matrix board - idle - scanning - Bluegiga WT12 module - SLEEP command - deep sleep on/off in config bits - -HHKB keyswich - how to power off - I/O pin configuration when sleeping - FET switch for 5V regulator - -Bluetooth module - power off when in USB mode - power off by FET switch - -AVR configuration - unused pins - ADC - - - -SET CONTROL CONFIG ------------------- - SET CONTROL CONFIG 4810 - SET CONTROL CONFIG LIST - SET CONTROL CONFIG 0000 0000 4910 DEEP_SLEEP KLUDGE INTERACTIVE_PIN UART_LATENCY - - Bit14 UART low latency - Bit11 Interactive pairing mode - Bit04 Deep sleep - - -Reconnection ------------- -SET CONTROL AUTOCALL 1124 5000 HID - 1124 HID service class - 5000 interval ms - -HID profile ------------ -This is needed to configure only once. - SET PROFILE HID ON - RESET - -HID class ---------- - SET BT CLASS 005C0 // keyboard/mouse combined devie - -Pairing Security ----------------- -Secure Simple Pairing(SSP) - SET BT SSP 2 0 // Enables SSP for keyboard and Man-in-the-middle protection - SET BT SSP 3 0 // Enables SSP just works mode - -for keyboard with SSP - SET BT AUTH * 0000 - SET BT SSP 2 0 - SET CONTROL CONFIG 800 - RESET - -for keyboard without SSP - SET BT AUTH * 0000 - SET CONTROL CONFIG 800 - RESET - -AUTH - AUTH xx:xx:xx:xx:xx:xx? // Pairing request event - AUTH xx:xx:xx:xx:xx:xx 0000 - - SSP PASSKEY 78:dd:08:b7:e4:a2 ? - SSP PASSKEY 78:dd:08:b7:e4:a2 xxxxx - (SSP COMPLETE 78:dd:08:b7:e4:a2 HCI_ERROR_AUTH_FAIL // failed) - RING 0 78:dd:08:b7:e4:a2 11 HID - -Connecton - RING xx:xx:xx:xx:xx:xx xx HID // connection event - - KILL xx:xx:xx:xx:xx:xx - -Mode ----- -Command mode -Data mode - Raw mode - (Simple mode not for a real keyboard) - -Raw mode - Keyboard: - 0x9f, length(10), 0xa1, 0x01, mods, 0x00, key1, key2, key3, key4, key5, key6 - - Mouse: - 0x9f, length(5), 0xa1, 0x02, buttons, X, Y - - Consumer page: - 0x9f, length(5), 0xa1, 0x03, bitfield1, bitfield2, bitfield3 - - consumer page suage - Bitfield 1: - 0x01 Volume Increment - 0x02 Volume Decrement - 0x04 Mute - 0x08 Play/Pause - 0x10 Scan Next Track - 0x20 Scan Previous Track - 0x40 Stop - 0x80 Eject - Bitfield 2: - 0x01 Email Reader - 0x02 Application Control Search - 0x04 AC Bookmarks - 0x08 AC Home - 0x10 AC Back - 0x20 AC Forward - 0x40 AC Stop - 0x80 AC Refresh - Bitfield 3: - 0x01 Application Launch Generic Consumer Control - 0x02 AL Internet Browser - 0x04 AL Calculator - 0x08 AL Terminal Lock / Screensaver - 0x10 AL Local Machine Browser - 0x20 AC Minimize - 0x40 Record - 0x80 Rewind - - - - - -2011/07/13 -set -SET BT BDADDR 00:07:80:47:22:14 -SET BT NAME HHKB pro BT -SET BT CLASS 0005c0 -SET BT AUTH * 0000 -SET BT IDENT BT:47 f000 4.1.0 Bluegiga iWRAP -SET BT LAP 9e8b33 -SET BT PAGEMODE 4 2000 1 -SET BT PAIR 78:dd:08:b7:e4:a2 a191189cd7e51030ad6a07848ce879bb -SET BT POWER 3 3 3 -SET BT ROLE 0 f 7d00 -SET BT SNIFF 0 20 1 8 -SET BT SSP 2 1 -SET BT MTU 667 -SET CONTROL AUTOCALL 1124 3000 HID -SET CONTROL BAUD 38400,8n1 -SET CONTROL CD 00 0 -SET CONTROL ECHO 7 -SET CONTROL ESCAPE 43 00 1 -SET CONTROL GAIN 0 5 -SET CONTROL INIT SET CONTROL MUX 0 -SET CONTROL MSC DTE 00 00 00 00 00 00 -SET CONTROL MUX 1 -SET CONTROL PIO 00 00 -SET CONTROL READY 00 -SET PROFILE HID f HID -SET - -info config - -!!! THIS IS BETA RELEASE AND MAY BE USED FOR EVALUATION PURPOSES ONLY !!! - -WRAP THOR AI (4.1.0 build 435) -Copyright (c) 2003-2011 Bluegiga Technologies Inc. -Compiled on Jun 28 2011 17:19:51, running on WT12-A module, psr v31 - AVRCP BGIO FTP HFP HFP_AG HID HID_CONSUMER_PAGE HSP LEDS MAP OTA PBAP PIO=0x00fc SSP SUBRATE TEST VOLUME - - BOCK3 version 435 (Jun 28 2011 17:19:37) (max acl/sco 7/1) - - Bluetooth version 2.1, Power class 2 - - Loader 4279, firmware 6297 (56-bit encryption), native execution mode - - up 0 days, 06:23, 2 connections (pool 2) - - User configuration: -&028a = 0001 0000 0000 0011 0024 0000 0000 0010 0000 0080 0000 0000 0080 005f 009b 0034 00fb 0006 -&028b = 0000 0bb8 -&028d = 0001 -&0295 = 0000 0005 000b 0000 0003 0000 0000 0000 0000 0000 0000 -&0298 = a006 -&0299 = 0000 0000 -&02a3 = 0030 0030 0030 0030 -&02a4 = 009d 0000 -&02a5 = 0053 0045 0054 0020 0043 004f 004e 0054 0052 004f 004c 0020 004d 0055 0058 0020 0030 -&02a7 = 0000 05c0 -&02a8 = 4910 0000 0000 -&02aa = 0004 2000 0001 0033 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 -&02ac = 0000 0000 002b 0000 0000 0000 0000 0000 0000 0000 0002 0000 0000 0000 0010 0000 0000 0000 0000 029b 0000 0000 0000 0000 -&02ad = 4848 424b 7020 6f72 4220 0054 -&02b3 = 0005 0003 0003 0003 0003 0003 0003 0003 0003 0003 0003 0003 0003 0003 0003 0003 -&02b7 = 000f 4948 0044 -&02bb = 8000 -READY. - - - - -2011/07/07 settings: -set -SET BT BDADDR 00:07:80:47:22:14 -SET BT NAME HHKB Pro BT -SET BT CLASS 0005c0 -SET BT AUTH * 000 -SET BT IDENT BT:47 f000 4.0.0 Bluegiga iWRAP -SET BT LAP 9e8b33 -SET BT PAGEMODE 4 2000 1 -SET BT PAIR 78:dd:08:b7:e4:a2 9e54d0aabb1b4d73cfccddb1ea4ef2d6 -SET BT POWER 3 3 3 -SET BT ROLE 0 f 7d00 -SET BT SNIFF 0 20 1 8 -SET BT SSP 3 0 -SET BT MTU 667 -SET CONTROL BAUD 38400,8n1 -SET CONTROL CD 00 0 -SET CONTROL ECHO 7 -SET CONTROL ESCAPE 255 00 1 -SET CONTROL GAIN 0 5 -SET CONTROL INIT set control mux 0 -SET CONTROL MSC DTE 00 00 00 00 00 00 -SET CONTROL PREAMP 1 1 -SET CONTROL READY 00 -SET PROFILE HID HID -SET PROFILE SPP Bluetooth Serial Port -SET - -info config -WRAP THOR AI (4.0.0 build 317) -Copyright (c) 2003-2010 Bluegiga Technologies Inc. -Compiled on Apr 20 2010 16:44:28, running on WT12-A module, psr v31 - AVRCP FTP PBAP PIO=0x00fc SSP SUBRATE VOLUME - - BOCK3 version 317 (Apr 20 2010 16:44:21) (max acl/sco 7/1) - - Bluetooth version 2.1, Power class 2 - - Loader 4279, firmware 6297 (56-bit encryption), native execution mode - - up 0 days, 00:00, 0 connections (pool 1) - - User configuration: -&028c = 0001 0020 0000 0001 0008 0000 -&028d = 0000 -&0296 = 0047 0001 f000 0400 6c42 6575 6967 6167 6920 5257 5041 -&0298 = c006 -&02a3 = 0030 0030 0030 -&02a4 = 009d 0000 -&02a5 = 0073 0065 0074 0020 0063 006f 006e 0074 0072 006f 006c 0020 006d 0075 0078 0020 0030 -&02a7 = 0000 05c0 -&02a8 = 0800 0000 0000 -&02ac = 0000 0000 00ff 0000 0000 0000 0000 0000 0000 0000 0002 0000 0000 0000 0010 0000 0000 0000 0000 029b 0000 0000 0000 0000 -&02ad = 4848 424b 5020 6f72 4220 0054 -&02b3 = 0004 0003 0003 0003 0003 0003 0003 0003 0003 0003 0003 0003 0003 0003 0003 0003 -&02b7 = 0000 -&02bb = 6c42 6575 6f74 746f 2068 6553 6972 6c61 5020 726f 0074 -READY. - - - -2011/08/23: -SET BT BDADDR 00:07:80:47:22:14 -SET BT NAME HHKB pro BT -SET BT CLASS 0005c0 -SET BT AUTH * 0000 -SET BT IDENT BT:47 f000 4.1.0 Bluegiga iWRAP -SET BT LAP 9e8b33 -SET BT PAGEMODE 4 2000 1 -SET BT PAIRCOUNT 4 -SET BT POWER 3 3 3 -SET BT ROLE 1 f 12c0 -SET BT SNIFF 10 2 1 8 -SET BT SSP 3 0 -SET BT MTU 667 -SET CONTROL BAUD 38400,8n1 -SET CONTROL CD 00 0 -SET CONTROL ECHO 7 -SET CONTROL ESCAPE 43 00 1 -SET CONTROL GAIN 0 5 -SET CONTROL INIT SET CONTROL MUX 0 -SET CONTROL MSC DTE 00 00 00 00 00 00 -SET CONTROL MUX 1 -SET CONTROL PIO 00 00 -SET CONTROL READY 00 -SET PROFILE HID 7 HIDKeyboardMouse -SET - -SET CONTROL CONFIG 0000 0004 481e CLOCK_CACHE INTERLACED_INQ INTERLACED_PAGE DEEP_SLEEP INTERACTIVE_PIN UART_LATENCY 23D_NOKLUDGE - - - -2011/08/25: -SET BT BDADDR 00:07:80:47:22:14 -SET BT NAME HHKB pro BT -SET BT CLASS 0005c0 - -SET BT IDENT BT:47 f000 4.1.0 Bluegiga iWRAP -SET BT LAP 9e8b33 -SET BT PAGEMODE 4 2000 1 -SET BT PAIRCOUNT 4 -SET BT PAIR 78:dd:08:b7:e4:a2 0be83335a03fed8ededae42e99554e28 -SET BT POWER 3 3 3 -SET BT ROLE 1 f 12c0 -SET BT SNIFF 100 20 1 8 -SET BT SSP 3 0 -SET BT MTU 667 -SET CONTROL BAUD 38400,8n1 -SET CONTROL CD 00 0 -SET CONTROL ECHO 7 -SET CONTROL ESCAPE - 20 1 -SET CONTROL GAIN 0 5 -SET CONTROL INIT SET CONTROL MUX 0 -SET CONTROL MSC DTE 00 00 00 00 00 00 -SET CONTROL MUX 1 -SET CONTROL PIO 00 00 -SET CONTROL READY 00 -SET PROFILE HID f HIDKeyboardMouse -SET - - -SET CONTROL CONFIG 0000 0000 490e CLOCK_CACHE INTERLACED_INQ INTERLACED_PAGE KLUDGE INTERACTIVE_PIN UART_LATENCY - - -2011/09/08: -SET CONTROL CONFIG 0000 0000 410e CLOCK_CACHE INTERLACED_INQ INTERLACED_PAGE KLUDGE UART_LATENCY - - Removed INTERACTIVE_PIN to avoid interactive auth and use SET BT AUTH pin(0000). - - -EOF diff --git a/tmk_core/protocol/iwrap/iWRAP5.txt b/tmk_core/protocol/iwrap/iWRAP5.txt deleted file mode 100644 index ce3310f1bf93..000000000000 --- a/tmk_core/protocol/iwrap/iWRAP5.txt +++ /dev/null @@ -1,356 +0,0 @@ -Terminology -=========== -PSM -HIDP HID Protocol -L2CAP Logical Link Control Adaptation Protocol -MTU Maximum Transmission Unit - - - -HID Protocol -============ -3 of HID_SPEC_V11.pdf - -Channel -------- -Control channel PSM=0x0011 -Interrupt channel PSM=0x0013 - -Message -------- -HANDSHAKE(0) -HID_CONTROL(1) - -GET_REPORT(4) - Host requests report(DATA payload on Control channel) from Device - Size Desc - ------------------------------------------------------------------------------ - HIDP-Hdr 1 7..4: HIDP Message TYpe(4: GET_REPORT) - 3: Size(1:2-octed buffer size, 0:size of the report) - 2: 0 - 1..0: Report Type(1:input, 2:output, 3: feature) - ReportID 1 Optional - BufferSize 2 Optional(specified when Size=1) - -SET_REPORT(5) -GET_PROTOCOL(6) -SET_PROTOCOL(7) - -DATA(A) - Input/Output Report: All DATA payloads flow on Interrupt channel. - Other: flows on Control channel. - Size Desc - ------------------------------------------------------------------------------ - HIDP-Hdr 1 7..4 0xA - 3..2 Reserved(0) - 1..0 Report Type(0:Other, 1:Input, 2:Output, 3:Feature) - Payload N Data - - - - -Boot Protocol -============= -3.3.2 -No report descriptor, fixed report descriptors defined. - -Device ReportID Size ---------------------------------- -Reserved 0 -Keyboard 1 9octets -Mouse 2 4octets -Reserved 3-255 - -Report descriptor ------------------ -Report ID is added to USB HID boot protocol descriptor. -Boot Protocol device doesn't need to supply descriptors. and can send extra data on end of boot report this data will be ignored unless host supports report descriptor. - -Report Protocol devices can have specific descriptors. Using Boot protocol descriptor followed by extra data may be useful for compatibility to Boot protocol only supported host. - -NOTE: -Bluegiga HID sample say report ID of mouse is 1 but 2? -Bluegiga HID sample say report ID of consumer page is 2 but 3? -** mouse.desc and consumer.desc were fixed. - size -keyboard.desc 67 0x43 -mouse.desc 60 0x3c -consumer.desc 82 0x52 -combo.desc 209 0xd1 - - - -SDP -=== -attributes(3.3.2) ----------- -HIDDeviceSubclass - which type is supported in Boot Protocol Mode - 7 6 - --- - 0 1 Keyboard - 1 0 Pointing device - 1 1 Combo keyboard/pointing device - -HIDBootDevice - TRUE -HIDReconnectInitiate - TRUE - - -Class of Device/Service -======================= -http://phys.sci.hokudai.ac.jp/LABS/yts/pic/GB002/Bluetooth_assigned_numbers_baseband.pdf - -0x0005C0 Keyboard and Pointing deivce(combo) - - - 23 16 15 8 7 0 - --------------------------------- - Service |Major |Minor |Format - - Format type - 1 0 - --- - 0 0 - - Minor Device Class of Peripheral Major - 7 6 - --- - 0 1 Keyboard - 1 0 Pointing device - 1 1 Combo keyboard/pointing device - - - Major device classes - 12 11 10 9 8 - -------------- - 0 0 0 0 0 Miscellaneous - 0 0 0 0 1 Computer - 0 0 0 1 0 Phone - 0 0 0 1 1 LAN /Network Access point - 0 0 1 0 0 Audio/Video (headset,speaker,stereo, video display, vcr..... - 0 0 1 0 1 *Peripheral (mouse, joystick, keyboards, ..... ) - 0 0 1 1 0 Imaging (printing, scanner, camera, display, ...) - 1 1 1 1 1 Uncategorized, specific device code not specified - X X X X X All other values reserved - - - Major service classes - bit - -------------------------------------- - 13 Limited Discoverable Mode [Ref #1] - 14 (reserved) - 15 (reserved) - 16 Positioning (Location identification) - 17 Networking (LAN, Ad hoc, ...) - 18 Rendering (Printing, Speaker, ...) - 19 Capturing (Scanner, Microphone, ...) - 20 Object Transfer (v-Inbox, v-Folder, ...) - 21 Audio (Speaker, Microphone, Headset service, ...) - 22 Telephony (Cordless telephony, Modem, Headset service, ...) - 23 Information (WEB-server, WAP-server, ...) - - - - -Authentication SSP -------------------- -SET BT SSP 2 0 PASS KEY entering -SET BT SSP 3 0 NO PASS KEY entering -SET BT SSP - : 0:display only 1:display+yes/no button 2:keyboard only 3:none -SET BT SSP 2 1 # 2:keyboard only 1:Man-in-the-middle protection is needed -SET BT SSP 2 0 # 2:keyboard only 0:Man-in-the-middle protection is not needed - - -SET BT SSP 2 1 - bond only if MITM protection is supported by host -SET BT SSP 2 0 - bond even if MITM protection is not supported by host - -On Windows 'Add device' causes SSP PASSKEY event on iWRAP - SSP PASSKEY 78:dd:08:b7:e4:a2 ? - -If device has display(0 or 1) this event occurs. User should be shown this code on the device. - SSP CONFIRM 78:dd:08:b7:e4:a2 517572 - - -SET BT SSP 3 0 - No input/output, No MITM protection. - Without procedure of authentication the divice is bond to host. - - -Connect -======= -CALL 78:dd:08:b7:e4:a2 11 HID - - -Setting -======== -Following settings need to be done before wiring into keyboard. -- UART speed: 38400bps(115200bps didn't work with software serial) -- No SSP procedure(without MITM protection) -- No Power Saving - -# clear pairing record and set default -SET BT PAIR * -SET RESET - -SET CONTROL INIT SET CONTROL MUX 0 -SET CONTROL BAUD 38400,8n1 -SET BT NAME TMK Blootooth WT12 -SET BT CLASS 0005c0 -SET BT AUTH * 0000 -SET BT SSP 3 0 -SET CONTROL CONFIG 4800 -SET PROFILE HID 0f c0 0100 00 en 0409 TMK Bluetooth keyboard(WT12) -SET PROFILE SPP - -# power saving? -SET BT SNIFF 100 20 1 8 - - -# Report Descriptor -# combo keyboard + mouse + consumer -HID SET d2 05010906a1010507850119e029e715002501750195088102950175088101950575010508850119012905910295017503910395067508150025650507190029658100c005010902a1010901a1008502050919012908150025017501950881020501093009311581257f750895028106093895018106050c0a380295018106c0c0050c0901a1018503050c1500250109e909ea09e209cd19b529b87501950881020a8a010a21020a2a021a23022a27027501950881020a83010a96010a92010a9e010a94010a060209b209b4750195088102c0 - - - -SET PROFILE HID ---------------- - SET PROFILE HID 0d c0 100 0 en 0409 HHKB pro Bluetooth keyboard - {function bit} uint8 - {subclass} uint8 - {version} uint16 - {country} uint8 - {BTlang} char[2] - {USBlang} uint16 - {name} string - - -SET BT CLASS ------------- - See Class of Device - composite device: keyboard and mouse - SET BT CLASS 005c0 - - - - - - ----------- -after setting ----------- -set -SET BT BDADDR 00:07:80:47:22:14 -SET BT NAME TMK Blootooth WT12 -SET BT CLASS 0005c0 -SET BT AUTH * 0000 -SET BT IDENT BT:47 f000 5.0.1 Bluegiga iWRAP -SET BT LAP 9e8b33 -SET BT PAGEMODE 4 2000 1 -SET BT PAIR 78:dd:08:b7:e4:a2 9e3d85c91bcae73fef8cc10bec18b42f -SET BT POWER 3 3 3 -SET BT ROLE 0 f 7d00 -SET BT SNIFF 0 20 1 8 -SET BT SSP 3 0 -SET BT MTU 667 -SET CONTROL BAUD 38400,8n1 -SET CONTROL CD 00 0 -SET CONTROL ECHO 7 -SET CONTROL ESCAPE 43 00 1 -SET CONTROL GAIN 0 5 -SET CONTROL INIT SET CONTROL MUX 0 -SET CONTROL MSC DTE 00 00 00 00 00 00 -SET CONTROL MUX 1 -SET CONTROL PIO 00 00 -SET CONTROL READY 00 -SET PROFILE HID 0f c0 0100 00 en 0409 TMK Bluetooth keyboard(WT12) -SET - -set control config list -SET CONTROL CONFIG 0000 0000 0000 4900 KLUDGE INTERACTIVE_PIN UART_LATENCY - - -info config -WRAP THOR AI (5.0.1 build 620) -Copyright (c) 2003-2012 Bluegiga Technologies Inc. -Compiled on Oct 1 2012 10:56:21, running on WT12-A module, psr v31 - BGIO FTP HFP HFP_AG HID HID_CONSUMER_PAGE HSP MAP MDP OTA PBAP PIO=0x00fc SSP SUBRATE TEST VOLUME - - BOCK4 version 620 (Oct 1 2012 10:56:03) (max acl/sco 7/1) - - Bluetooth version 3.0, Power class 2 - - Loader 8615, firmware 8825 (56-bit encryption), native execution mode - - up 0 days, 01:50, 2 connections (pool 2) - - User configuration: -&028d = 0001 -&0295 = 0000 0005 000b 0000 0003 0000 0000 0000 0000 0000 0000 -&0298 = c053 -&0299 = 0000 0000 -&02a3 = 0030 0030 0030 0030 -&02a4 = 009d 0000 -&02a5 = 0053 0045 0054 0020 0043 004f 004e 0054 0052 004f 004c 0020 004d 0055 0058 0020 0030 -&02a7 = 0000 05c0 -&02a8 = 0800 0000 0000 0000 -&02aa = 0004 2000 0001 0033 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 -&02ac = 0000 0000 002b 0000 0000 0000 0000 0000 0000 0000 0002 0000 0000 0000 0010 0000 0000 0000 0000 029b 0000 0000 0000 0000 -&02ad = 4d54 204b 6c42 6f6f 6f74 746f 2068 5457 3231 -&02b0 = fa65 b0aa 934a 077b a600 d1cc fe58 8dd5 -&02b3 = 0004 0003 0003 0003 0003 0003 0003 0003 0003 0003 0003 0003 0003 0003 0003 0003 0005 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0005 -&02b7 = 000f 00c0 0100 0000 0065 006e 0409 4d54 204b 6c42 6575 6f74 746f &02bb = 8000 -READY. ----------- - - - ------ -After 5.0.1 Firmware update -Firmware: ai-5.0.1-620-25b.bc4.dfu -PSR: wt12-a.ai-5.0.1-620-25b.psrf ------ -info config -WRAP THOR AI (5.0.1 build 620) -Copyright (c) 2003-2012 Bluegiga Technologies Inc. -Compiled on Oct 1 2012 10:56:21, running on WT12-A module, psr v31 - BGIO FTP HFP HFP_AG HID HID_CONSUMER_PAGE HSP MAP MDP OTA PBAP PIO=0x00fc SSP SUBRATE TEST VOLUME - - BOCK4 version 620 (Oct 1 2012 10:56:03) (max acl/sco 7/1) - - Bluetooth version 3.0, Power class 2 - - Loader 8615, firmware 8825 (56-bit encryption), native execution mode - - up 0 days, 00:03, 0 connections (pool 1) - - User configuration: -&0295 = 0000 0005 000b 0000 0003 0000 0000 0000 0000 0000 0000 -&0299 = 0000 0000 -&02aa = 0004 2000 0001 0033 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 -&02ac = 0000 0000 002b 0000 0000 0000 0000 0000 0000 0000 0002 0000 0000 0000 0010 0000 0000 0000 0000 029b 0000 0000 0000 0000 -&02ad = 5457 3231 412d -&02b0 = fa65 b0aa 934a 077b a600 d1cc fe58 8dd5 -READY. - -set -SET BT BDADDR 00:07:80:47:22:14 -SET BT NAME WT12-A -SET BT CLASS 001f00 -SET BT IDENT BT:47 f000 5.0.1 Bluegiga iWRAP -SET BT LAP 9e8b33 -SET BT PAGEMODE 4 2000 1 -SET BT PAIR 78:dd:08:b7:e4:a2 af18f81faa107e6dd068762ef921f48b -SET BT POWER 3 3 3 -SET BT ROLE 0 f 7d00 -SET BT SNIFF 0 20 1 8 -SET BT SSP 3 0 -SET BT MTU 667 -SET CONTROL BAUD 115200,8n1 -SET CONTROL CD 00 0 -SET CONTROL ECHO 7 -SET CONTROL ESCAPE 43 00 1 -SET CONTROL GAIN 0 5 -SET CONTROL MSC DTE 00 00 00 00 00 00 -SET CONTROL PIO 00 00 -SET CONTROL READY 00 -SET PROFILE SPP Bluetooth Serial Port -SET - -set control config list -SET CONTROL CONFIG 0000 0000 0000 0100 KLUDGE ---------- diff --git a/tmk_core/protocol/iwrap/iwrap.c b/tmk_core/protocol/iwrap/iwrap.c deleted file mode 100644 index 4d0ca5756b90..000000000000 --- a/tmk_core/protocol/iwrap/iwrap.c +++ /dev/null @@ -1,420 +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 . -*/ - -/* host driver for Bulegiga iWRAP */ -/* Bluegiga BT12 - * Connections - * Hardware UART Software UART BlueTooth - * PC=====UART=======AVR=====SUART====iWRAP(BT12)-----------PC - * - * - Hardware UART for Debug Console to communicate iWRAP - * - Software UART for iWRAP control to send keyboard/mouse data - */ - -#include -#include -#include -#include -#include "keycode.h" -#include "suart.h" -#include "uart.h" -#include "report.h" -#include "host_driver.h" -#include "iwrap.h" -#include "print.h" - -/* iWRAP MUX mode utils. 3.10 HID raw mode(iWRAP_HID_Application_Note.pdf) */ -#define MUX_HEADER(LINK, LENGTH) \ - do { \ - xmit(0xbf); /* SOF */ \ - xmit(LINK); /* Link */ \ - xmit(0x00); /* Flags */ \ - xmit(LENGTH); /* Length */ \ - } while (0) -#define MUX_FOOTER(LINK) xmit(LINK ^ 0xff) - -static uint8_t connected = 0; -// static uint8_t channel = 1; - -/* iWRAP buffer */ -#define MUX_BUF_SIZE 64 -static char buf[MUX_BUF_SIZE]; -static uint8_t snd_pos = 0; - -#define MUX_RCV_BUF_SIZE 256 -static char rcv_buf[MUX_RCV_BUF_SIZE]; -static uint8_t rcv_head = 0; -static uint8_t rcv_tail = 0; - -/* receive buffer */ -static void rcv_enq(char c) { - uint8_t next = (rcv_head + 1) % MUX_RCV_BUF_SIZE; - if (next != rcv_tail) { - rcv_buf[rcv_head] = c; - rcv_head = next; - } -} - -static char rcv_deq(void) { - char c = 0; - if (rcv_head != rcv_tail) { - c = rcv_buf[rcv_tail++]; - rcv_tail %= MUX_RCV_BUF_SIZE; - } - return c; -} - -/* -static char rcv_peek(void) -{ - if (rcv_head == rcv_tail) - return 0; - return rcv_buf[rcv_tail]; -} -*/ - -static void rcv_clear(void) { rcv_tail = rcv_head = 0; } - -/* iWRAP response */ -ISR(PCINT1_vect, ISR_BLOCK) // recv() runs away in case of ISR_NOBLOCK -{ - if ((SUART_IN_PIN & (1 << SUART_IN_BIT))) return; - - static volatile uint8_t mux_state = 0xff; - static volatile uint8_t mux_link = 0xff; - uint8_t c = recv(); - switch (mux_state) { - case 0xff: // SOF - if (c == 0xbf) mux_state--; - break; - case 0xfe: // Link - mux_state--; - mux_link = c; - break; - case 0xfd: // Flags - mux_state--; - break; - case 0xfc: // Length - mux_state = c; - break; - case 0x00: - mux_state = 0xff; - mux_link = 0xff; - break; - default: - if (mux_state--) { - uart_putchar(c); - rcv_enq(c); - } - } -} - -/*------------------------------------------------------------------* - * iWRAP communication - *------------------------------------------------------------------*/ -void iwrap_init(void) { - // reset iWRAP if in already MUX mode after AVR software-reset - iwrap_send("RESET"); - iwrap_mux_send("RESET"); - _delay_ms(3000); - iwrap_send("\r\nSET CONTROL MUX 1\r\n"); - _delay_ms(500); - iwrap_check_connection(); -} - -void iwrap_mux_send(const char *s) { - rcv_clear(); - MUX_HEADER(0xff, strlen((char *)s)); - iwrap_send(s); - MUX_FOOTER(0xff); -} - -void iwrap_send(const char *s) { - while (*s) xmit(*s++); -} - -/* send buffer */ -void iwrap_buf_add(uint8_t c) { - // need space for '\0' - if (snd_pos < MUX_BUF_SIZE - 1) buf[snd_pos++] = c; -} - -void iwrap_buf_del(void) { - if (snd_pos) snd_pos--; -} - -void iwrap_buf_send(void) { - buf[snd_pos] = '\0'; - snd_pos = 0; - iwrap_mux_send(buf); -} - -void iwrap_call(void) { - char *p; - - iwrap_mux_send("SET BT PAIR"); - _delay_ms(500); - - p = rcv_buf + rcv_tail; - while (!strncmp(p, "SET BT PAIR", 11)) { - p += 7; - strncpy(p, "CALL", 4); - strncpy(p + 22, " 11 HID\n\0", 9); - print_S(p); - iwrap_mux_send(p); - // TODO: skip to next line - p += 57; - - DEBUG_LED_CONFIG; - DEBUG_LED_ON; - _delay_ms(500); - DEBUG_LED_OFF; - _delay_ms(500); - DEBUG_LED_ON; - _delay_ms(500); - DEBUG_LED_OFF; - _delay_ms(500); - DEBUG_LED_ON; - _delay_ms(500); - DEBUG_LED_OFF; - _delay_ms(500); - DEBUG_LED_ON; - _delay_ms(500); - DEBUG_LED_OFF; - _delay_ms(500); - DEBUG_LED_ON; - _delay_ms(500); - DEBUG_LED_OFF; - _delay_ms(500); - } - iwrap_check_connection(); -} - -void iwrap_kill(void) { - char c; - iwrap_mux_send("LIST"); - _delay_ms(500); - - while ((c = rcv_deq()) && c != '\n') - ; - if (strncmp(rcv_buf + rcv_tail, "LIST ", 5)) { - print("no connection to kill.\n"); - return; - } - // skip 10 'space' chars - for (uint8_t i = 10; i; i--) - while ((c = rcv_deq()) && c != ' ') - ; - - char *p = rcv_buf + rcv_tail - 5; - strncpy(p, "KILL ", 5); - strncpy(p + 22, "\n\0", 2); - print_S(p); - iwrap_mux_send(p); - _delay_ms(500); - - iwrap_check_connection(); -} - -void iwrap_unpair(void) { - iwrap_mux_send("SET BT PAIR"); - _delay_ms(500); - - char *p = rcv_buf + rcv_tail; - if (!strncmp(p, "SET BT PAIR", 11)) { - strncpy(p + 29, "\n\0", 2); - print_S(p); - iwrap_mux_send(p); - } -} - -void iwrap_sleep(void) { iwrap_mux_send("SLEEP"); } - -void iwrap_sniff(void) {} - -void iwrap_subrate(void) {} - -bool iwrap_failed(void) { - if (strncmp(rcv_buf, "SYNTAX ERROR", 12)) - return true; - else - return false; -} - -uint8_t iwrap_connected(void) { return connected; } - -uint8_t iwrap_check_connection(void) { - iwrap_mux_send("LIST"); - _delay_ms(100); - - if (strncmp(rcv_buf, "LIST ", 5) || !strncmp(rcv_buf, "LIST 0", 6)) - connected = 0; - else - connected = 1; - return connected; -} - -/*------------------------------------------------------------------* - * 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 *iwrap_driver(void) { return &driver; } - -static uint8_t keyboard_leds(void) { return 0; } - -static void send_keyboard(report_keyboard_t *report) { - if (!iwrap_connected() && !iwrap_check_connection()) return; - MUX_HEADER(0x01, 0x0c); - // HID raw mode header - xmit(0x9f); - xmit(0x0a); // Length - xmit(0xa1); // DATA(Input) - xmit(0x01); // Report ID - xmit(report->mods); - xmit(0x00); // reserved byte(always 0) - xmit(report->keys[0]); - xmit(report->keys[1]); - xmit(report->keys[2]); - xmit(report->keys[3]); - xmit(report->keys[4]); - xmit(report->keys[5]); - MUX_FOOTER(0x01); -} - -static void send_mouse(report_mouse_t *report) { -#if defined(MOUSEKEY_ENABLE) || defined(PS2_MOUSE_ENABLE) || defined(POINTING_DEVICE_ENABLE) - if (!iwrap_connected() && !iwrap_check_connection()) return; - MUX_HEADER(0x01, 0x09); - // HID raw mode header - xmit(0x9f); - xmit(0x07); // Length - xmit(0xa1); // DATA(Input) - xmit(0x02); // Report ID - xmit(report->buttons); - xmit(report->x); - xmit(report->y); - xmit(report->v); - xmit(report->h); - MUX_FOOTER(0x01); -#endif -} - -static void send_system(uint16_t data) { /* not supported */ -} - -static void send_consumer(uint16_t data) { -#ifdef EXTRAKEY_ENABLE - static uint16_t last_data = 0; - uint8_t bits1 = 0; - uint8_t bits2 = 0; - uint8_t bits3 = 0; - - if (!iwrap_connected() && !iwrap_check_connection()) return; - if (data == last_data) return; - last_data = data; - - // 3.10 HID raw mode(iWRAP_HID_Application_Note.pdf) - switch (data) { - case AUDIO_VOL_UP: - bits1 = 0x01; - break; - case AUDIO_VOL_DOWN: - bits1 = 0x02; - break; - case AUDIO_MUTE: - bits1 = 0x04; - break; - case TRANSPORT_PLAY_PAUSE: - bits1 = 0x08; - break; - case TRANSPORT_NEXT_TRACK: - bits1 = 0x10; - break; - case TRANSPORT_PREV_TRACK: - bits1 = 0x20; - break; - case TRANSPORT_STOP: - bits1 = 0x40; - break; - case TRANSPORT_EJECT: - bits1 = 0x80; - break; - case AL_EMAIL: - bits2 = 0x01; - break; - case AC_SEARCH: - bits2 = 0x02; - break; - case AC_BOOKMARKS: - bits2 = 0x04; - break; - case AC_HOME: - bits2 = 0x08; - break; - case AC_BACK: - bits2 = 0x10; - break; - case AC_FORWARD: - bits2 = 0x20; - break; - case AC_STOP: - bits2 = 0x40; - break; - case AC_REFRESH: - bits2 = 0x80; - break; - case AL_CC_CONFIG: - bits3 = 0x01; - break; - case AL_CALCULATOR: - bits3 = 0x04; - break; - case AL_LOCK: - bits3 = 0x08; - break; - case AL_LOCAL_BROWSER: - bits3 = 0x10; - break; - case AC_MINIMIZE: - bits3 = 0x20; - break; - case TRANSPORT_RECORD: - bits3 = 0x40; - break; - case TRANSPORT_REWIND: - bits3 = 0x80; - break; - } - - MUX_HEADER(0x01, 0x07); - xmit(0x9f); - xmit(0x05); // Length - xmit(0xa1); // DATA(Input) - xmit(0x03); // Report ID - xmit(bits1); - xmit(bits2); - xmit(bits3); - MUX_FOOTER(0x01); -#endif -} diff --git a/tmk_core/protocol/iwrap/iwrap.h b/tmk_core/protocol/iwrap/iwrap.h deleted file mode 100644 index 51f2b5670bc8..000000000000 --- a/tmk_core/protocol/iwrap/iwrap.h +++ /dev/null @@ -1,47 +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 IWRAP_H -#define IWRAP_H - -#include -#include -#include "host_driver.h" - -/* enable iWRAP MUX mode */ -#define MUX_MODE - -host_driver_t *iwrap_driver(void); - -void iwrap_init(void); -void iwrap_send(const char *s); -void iwrap_mux_send(const char *s); -void iwrap_buf_send(void); -void iwrap_buf_add(uint8_t c); -void iwrap_buf_del(void); - -void iwrap_call(void); -void iwrap_kill(void); -void iwrap_unpair(void); -void iwrap_sleep(void); -void iwrap_sniff(void); -void iwrap_subrate(void); -bool iwrap_failed(void); -uint8_t iwrap_connected(void); -uint8_t iwrap_check_connection(void); - -#endif diff --git a/tmk_core/protocol/iwrap/main.c b/tmk_core/protocol/iwrap/main.c deleted file mode 100644 index 4048a9791dc5..000000000000 --- a/tmk_core/protocol/iwrap/main.c +++ /dev/null @@ -1,412 +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 -#include -//#include -#include "wd.h" // in order to use watchdog in interrupt mode -#include -#include -#include -#include "keyboard.h" -#include "matrix.h" -#include "host.h" -#include "action.h" -#include "iwrap.h" -#ifdef PROTOCOL_VUSB -# include "vusb.h" -# include -#endif -#include "uart.h" -#include "suart.h" -#include "timer.h" -#include "debug.h" -#include "keycode.h" -#include "command.h" - -static void sleep(uint8_t term); -static bool console(void); -static bool console_command(uint8_t c); -static uint8_t key2asc(uint8_t key); - -/* -static void set_prr(void) -{ - power_adc_disable(); - power_spi_disable(); - power_twi_disable(); -#ifndef TIMER_H - //power_timer0_disable(); // used in timer.c -#endif - power_timer1_disable(); - power_timer2_disable(); -} -*/ - -/* -static void pullup_pins(void) -{ - // DDRs are set to 0(input) by default. -#ifdef PORTA - PORTA = 0xFF; -#endif - PORTB = 0xFF; - PORTC = 0xFF; - PORTD = 0xFF; -#ifdef PORTE - PORTE = 0xFF; -#endif -#ifdef PORTE - PORTF = 0xFF; -#endif -} -*/ - -#ifdef PROTOCOL_VUSB -static void disable_vusb(void) { - // disable interrupt & disconnect to prevent host from enumerating - USB_INTR_ENABLE &= ~(1 << USB_INTR_ENABLE_BIT); - usbDeviceDisconnect(); -} - -static void enable_vusb(void) { - USB_INTR_ENABLE |= (1 << USB_INTR_ENABLE_BIT); - usbDeviceConnect(); -} - -static void init_vusb(void) { - uint8_t i = 0; - - usbInit(); - disable_vusb(); - /* fake USB disconnect for > 250 ms */ - while (--i) { - _delay_ms(1); - } - enable_vusb(); -} -#endif - -void change_driver(host_driver_t *driver) { - /* - host_clear_keyboard_report(); - host_swap_keyboard_report(); - host_clear_keyboard_report(); - host_send_keyboard_report(); - */ - clear_keyboard(); - _delay_ms(1000); - host_set_driver(driver); -} - -static bool sleeping = false; -static bool insomniac = false; // TODO: should be false for power saving -static uint16_t last_timer = 0; - -int main(void) { - MCUSR = 0; - clock_prescale_set(clock_div_1); - WD_SET(WD_OFF); - - // power saving: the result is worse than nothing... why? - // pullup_pins(); - // set_prr(); - -#ifdef PROTOCOL_VUSB - disable_vusb(); -#endif - uart_init(115200); - keyboard_init(); - print("\nSend BREAK for UART Console Commands.\n"); - - // TODO: move to iWRAP/suart file - print("suart init\n"); - // suart init - // PC4: Tx Output IDLE(Hi) - PORTC |= (1 << 4); - DDRC |= (1 << 4); - // PC5: Rx Input(pull-up) - PORTC |= (1 << 5); - DDRC &= ~(1 << 5); - // suart receive interrut(PC5/PCINT13) - PCMSK1 = 0b00100000; - PCICR = 0b00000010; - - host_set_driver(iwrap_driver()); - - print("iwrap_init()\n"); - iwrap_init(); - iwrap_call(); - - last_timer = timer_read(); - while (true) { -#ifdef PROTOCOL_VUSB - if (host_get_driver() == vusb_driver()) usbPoll(); -#endif - keyboard_task(); -#ifdef PROTOCOL_VUSB - if (host_get_driver() == vusb_driver()) vusb_transfer_keyboard(); -#endif - // TODO: depricated - if (matrix_is_modified() || console()) { - last_timer = timer_read(); - sleeping = false; - } else if (!sleeping && timer_elapsed(last_timer) > 4000) { - sleeping = true; - iwrap_check_connection(); - } - - // TODO: suspend.h - if (host_get_driver() == iwrap_driver()) { - if (sleeping && !insomniac) { - _delay_ms(1); // wait for UART to send - iwrap_sleep(); - sleep(WDTO_60MS); - } - } - } -} - -static void sleep(uint8_t term) { - WD_SET(WD_IRQ, term); - - cli(); - set_sleep_mode(SLEEP_MODE_PWR_DOWN); - sleep_enable(); - sleep_bod_disable(); - sei(); - sleep_cpu(); - sleep_disable(); - - WD_SET(WD_OFF); -} - -static bool console(void) { - // Send to Bluetoot module WT12 - static bool breaked = false; - if (!uart_available()) - return false; - else { - uint8_t c; - c = uart_getchar(); - uart_putchar(c); - switch (c) { - case 0x00: // BREAK signal - if (!breaked) { - print("break(? for help): "); - breaked = true; - } - break; - case '\r': - uart_putchar('\n'); - iwrap_buf_send(); - break; - case '\b': - iwrap_buf_del(); - break; - default: - if (breaked) { - print("\n"); - console_command(c); - breaked = false; - } else { - iwrap_buf_add(c); - } - break; - } - return true; - } -} - -bool command_extra(uint8_t code) { return console_command(key2asc(code)); } - -static bool console_command(uint8_t c) { - switch (c) { - case 'h': - case '?': - print("\nCommands for Bluetooth(WT12/iWRAP):\n"); - print("r: reset. software reset by watchdog\n"); - print("i: insomniac. prevent KB from sleeping\n"); - print("c: iwrap_call. CALL for BT connection.\n"); -#ifdef PROTOCOL_VUSB - print("u: USB mode. switch to USB.\n"); - print("w: BT mode. switch to Bluetooth.\n"); -#endif - print("k: kill first connection.\n"); - print("Del: unpair first pairing.\n"); - print("\n"); - return 0; - case 'r': - print("reset\n"); - WD_AVR_RESET(); - return 1; - case 'i': - insomniac = !insomniac; - if (insomniac) - print("insomniac\n"); - else - print("not insomniac\n"); - return 1; - case 'c': - print("iwrap_call()\n"); - iwrap_call(); - return 1; -#ifdef PROTOCOL_VUSB - case 'u': - print("USB mode\n"); - init_vusb(); - change_driver(vusb_driver()); - // iwrap_kill(); - // iwrap_sleep(); - // disable suart receive interrut(PC5/PCINT13) - PCMSK1 &= ~(0b00100000); - PCICR &= ~(0b00000010); - return 1; - case 'w': - print("iWRAP mode\n"); - change_driver(iwrap_driver()); - disable_vusb(); - // enable suart receive interrut(PC5/PCINT13) - PCMSK1 |= 0b00100000; - PCICR |= 0b00000010; - return 1; -#endif - case 'k': - print("kill\n"); - iwrap_kill(); - return 1; - case 0x7F: // DELETE - print("unpair\n"); - iwrap_unpair(); - return 1; - } - return 0; -} - -// convert keycode into ascii charactor -static uint8_t key2asc(uint8_t key) { - switch (key) { - case KC_A: - return 'a'; - case KC_B: - return 'b'; - case KC_C: - return 'c'; - case KC_D: - return 'd'; - case KC_E: - return 'e'; - case KC_F: - return 'f'; - case KC_G: - return 'g'; - case KC_H: - return 'h'; - case KC_I: - return 'i'; - case KC_J: - return 'j'; - case KC_K: - return 'k'; - case KC_L: - return 'l'; - case KC_M: - return 'm'; - case KC_N: - return 'n'; - case KC_O: - return 'o'; - case KC_P: - return 'p'; - case KC_Q: - return 'q'; - case KC_R: - return 'r'; - case KC_S: - return 's'; - case KC_T: - return 't'; - case KC_U: - return 'u'; - case KC_V: - return 'v'; - case KC_W: - return 'w'; - case KC_X: - return 'x'; - case KC_Y: - return 'y'; - case KC_Z: - return 'z'; - case KC_1: - return '1'; - case KC_2: - return '2'; - case KC_3: - return '3'; - case KC_4: - return '4'; - case KC_5: - return '5'; - case KC_6: - return '6'; - case KC_7: - return '7'; - case KC_8: - return '8'; - case KC_9: - return '9'; - case KC_0: - return '0'; - case KC_ENTER: - return '\n'; - case KC_ESCAPE: - return 0x1B; - case KC_BSPACE: - return '\b'; - case KC_TAB: - return '\t'; - case KC_SPACE: - return ' '; - case KC_MINUS: - return '-'; - case KC_EQUAL: - return '='; - case KC_LBRACKET: - return '['; - case KC_RBRACKET: - return ']'; - case KC_BSLASH: - return '\\'; - case KC_NONUS_HASH: - return '#'; - case KC_SCOLON: - return ';'; - case KC_QUOTE: - return '\''; - case KC_GRAVE: - return '`'; - case KC_COMMA: - return ','; - case KC_DOT: - return '.'; - case KC_SLASH: - return '/'; - default: - return 0x00; - } -} diff --git a/tmk_core/protocol/iwrap/mux_exit.rb b/tmk_core/protocol/iwrap/mux_exit.rb deleted file mode 100644 index 1f6be48afdcb..000000000000 --- a/tmk_core/protocol/iwrap/mux_exit.rb +++ /dev/null @@ -1,7 +0,0 @@ -# -# Rescue from Bluegiga iWRAP MUX mode -# 6.75 of iWRAP5_User_Guid.pdf -# -[0xBF, 0xFF, 0x00, 0x11, 0x53, 0x45, 0x54, 0x20, 0x43, 0x4f, 0x4e, 0x54, 0x52, 0x4f, 0x4c, 0x20, 0x4d, 0x55, 0x58, 0x20, 0x30, 0x00].each do |x| - print x.chr -end diff --git a/tmk_core/protocol/iwrap/suart.S b/tmk_core/protocol/iwrap/suart.S deleted file mode 100644 index a873515e1041..000000000000 --- a/tmk_core/protocol/iwrap/suart.S +++ /dev/null @@ -1,156 +0,0 @@ -;---------------------------------------------------------------------------; -; Software implemented UART module ; -; (C)ChaN, 2005 (http://elm-chan.org/) ; -;---------------------------------------------------------------------------; -; Bit rate settings: -; -; 1MHz 2MHz 4MHz 6MHz 8MHz 10MHz 12MHz 16MHz 20MHz -; 2.4kbps 138 - - - - - - - - -; 4.8kbps 68 138 - - - - - - - -; 9.6kbps 33 68 138 208 - - - - - -; 19.2kbps - 33 68 102 138 173 208 - - -; 38.4kbps - - 33 50 68 85 102 138 172 -; 57.6kbps - - 21 33 44 56 68 91 114 -; 115.2kbps - - - - 21 27 33 44 56 - -.nolist -#include -.list - -#define BPS 102 /* Bit delay. (see above table) */ -#define BIDIR 0 /* 0:Separated Tx/Rx, 1:Shared Tx/Rx */ - -#define OUT_1 sbi _SFR_IO_ADDR(SUART_OUT_PORT), SUART_OUT_BIT /* Output 1 */ -#define OUT_0 cbi _SFR_IO_ADDR(SUART_OUT_PORT), SUART_OUT_BIT /* Output 0 */ -#define SKIP_IN_1 sbis _SFR_IO_ADDR(SUART_IN_PIN), SUART_IN_BIT /* Skip if 1 */ -#define SKIP_IN_0 sbic _SFR_IO_ADDR(SUART_IN_PIN), SUART_IN_BIT /* Skip if 0 */ - - - -#ifdef SPM_PAGESIZE -.macro _LPMI reg - lpm \reg, Z+ -.endm -.macro _MOVW dh,dl, sh,sl - movw \dl, \sl -.endm -#else -.macro _LPMI reg - lpm - mov \reg, r0 - adiw ZL, 1 -.endm -.macro _MOVW dh,dl, sh,sl - mov \dl, \sl - mov \dh, \sh -.endm -#endif - - - -;---------------------------------------------------------------------------; -; Transmit a byte in serial format of N81 -; -;Prototype: void xmit (uint8_t data); -;Size: 16 words - -.global xmit -.func xmit -xmit: -#if BIDIR - ldi r23, BPS-1 ;Pre-idle time for bidirectional data line -5: dec r23 ; - brne 5b ;/ -#endif - in r0, _SFR_IO_ADDR(SREG) ;Save flags - - com r24 ;C = start bit - ldi r25, 10 ;Bit counter - cli ;Start critical section - -1: ldi r23, BPS-1 ;----- Bit transferring loop -2: dec r23 ;Wait for a bit time - brne 2b ;/ - brcs 3f ;MISO = bit to be sent - OUT_1 ; -3: brcc 4f ; - OUT_0 ;/ -4: lsr r24 ;Get next bit into C - dec r25 ;All bits sent? - brne 1b ; no, coutinue - - out _SFR_IO_ADDR(SREG), r0 ;End of critical section - ret -.endfunc - - - -;---------------------------------------------------------------------------; -; Receive a byte -; -;Prototype: uint8_t rcvr (void); -;Size: 19 words - -.global rcvr -.func rcvr -rcvr: - in r0, _SFR_IO_ADDR(SREG) ;Save flags - - ldi r24, 0x80 ;Receiving shift reg - cli ;Start critical section - -1: SKIP_IN_1 ;Wait for idle - rjmp 1b -2: SKIP_IN_0 ;Wait for start bit - rjmp 2b - ldi r25, BPS/2 ;Wait for half bit time -3: dec r25 - brne 3b - -4: ldi r25, BPS ;----- Bit receiving loop -5: dec r25 ;Wait for a bit time - brne 5b ;/ - lsr r24 ;Next bit - SKIP_IN_0 ;Get a data bit into r24.7 - ori r24, 0x80 - brcc 4b ;All bits received? no, continue - - out _SFR_IO_ADDR(SREG), r0 ;End of critical section - ret -.endfunc - - -; Not wait for start bit. This should be called after detecting start bit. -.global recv -.func recv -recv: - in r0, _SFR_IO_ADDR(SREG) ;Save flags - - ldi r24, 0x80 ;Receiving shift reg - cli ;Start critical section - -;1: SKIP_IN_1 ;Wait for idle -; rjmp 1b -;2: SKIP_IN_0 ;Wait for start bit -; rjmp 2b - ldi r25, BPS/2 ;Wait for half bit time -3: dec r25 - brne 3b - -4: ldi r25, BPS ;----- Bit receiving loop -5: dec r25 ;Wait for a bit time - brne 5b ;/ - lsr r24 ;Next bit - SKIP_IN_0 ;Get a data bit into r24.7 - ori r24, 0x80 - brcc 4b ;All bits received? no, continue - - ldi r25, BPS/2 ;Wait for half bit time -6: dec r25 - brne 6b -7: SKIP_IN_1 ;Wait for stop bit - rjmp 7b - - out _SFR_IO_ADDR(SREG), r0 ;End of critical section - ret -.endfunc diff --git a/tmk_core/protocol/iwrap/suart.h b/tmk_core/protocol/iwrap/suart.h deleted file mode 100644 index c634bbc2f44c..000000000000 --- a/tmk_core/protocol/iwrap/suart.h +++ /dev/null @@ -1,8 +0,0 @@ -#ifndef SUART -#define SUART - -void xmit(uint8_t); -uint8_t rcvr(void); -uint8_t recv(void); - -#endif /* SUART */ diff --git a/tmk_core/protocol/iwrap/wd.h b/tmk_core/protocol/iwrap/wd.h deleted file mode 100644 index 083d6d44d6c0..000000000000 --- a/tmk_core/protocol/iwrap/wd.h +++ /dev/null @@ -1,161 +0,0 @@ -/* This is from http://www.mtcnet.net/~henryvm/wdt/ */ -#ifndef _AVR_WD_H_ -#define _AVR_WD_H_ - -#include - -/* -Copyright (c) 2009, Curt Van Maanen - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF -OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - - -include usage- - #include "wd.h" //if in same directory as project - #include //if wd.h is in avr directory - -set watchdog modes and prescale - -usage- - WD_SET(mode,[timeout]); //prescale always set - -modes- - WD_OFF disabled - WD_RST normal reset mode - WD_IRQ interrupt only mode (if supported) - WD_RST_IRQ interrupt+reset mode (if supported) - -timeout- - WDTO_15MS default if no timeout provided - WDTO_30MS - WDTO_60MS - WDTO_120MS - WDTO_250MS - WDTO_500MS - WDTO_1S - WDTO_2S - WDTO_4S (if supported) - WDTO_8S (if supported) - -examples- - WD_SET(WD_RST,WDTO_1S); //reset mode, 1s timeout - WD_SET(WD_OFF); //watchdog disabled (if not fused on) - WD_SET(WD_RST); //reset mode, 15ms (default timeout) - WD_SET(WD_IRQ,WDTO_120MS); //interrupt only mode, 120ms timeout - WD_SET(WD_RST_IRQ,WDTO_2S); //interrupt+reset mode, 2S timeout - - -for enhanced watchdogs, if the watchdog is not being used WDRF should be -cleared on every power up or reset, along with disabling the watchdog- - WD_DISABLE(); //clear WDRF, then turn off watchdog - -*/ - -// reset registers to the same name (MCUCSR) -#if !defined(MCUCSR) -# define MCUCSR MCUSR -#endif - -// watchdog registers to the same name (WDTCSR) -#if !defined(WDTCSR) -# define WDTCSR WDTCR -#endif - -// if enhanced watchdog, define irq values, create disable macro -#if defined(WDIF) -# define WD_IRQ 0xC0 -# define WD_RST_IRQ 0xC8 -# define WD_DISABLE() \ - do { \ - MCUCSR &= ~(1 << WDRF); \ - WD_SET(WD_OFF); \ - } while (0) -#endif - -// all watchdogs -#define WD_RST 8 -#define WD_OFF 0 - -// prescale values -#define WDTO_15MS 0 -#define WDTO_30MS 1 -#define WDTO_60MS 2 -#define WDTO_120MS 3 -#define WDTO_250MS 4 -#define WDTO_500MS 5 -#define WDTO_1S 6 -#define WDTO_2S 7 - -// prescale values for avrs with WDP3 -#if defined(WDP3) -# define WDTO_4S 0x20 -# define WDTO_8S 0x21 -#endif - -// watchdog reset -#define WDR() __asm__ __volatile__("wdr") - -// avr reset using watchdog -#define WD_AVR_RESET() \ - do { \ - __asm__ __volatile__("cli"); \ - WD_SET_UNSAFE(WD_RST); \ - while (1) \ - ; \ - } while (0) - -/*set the watchdog- -1. save SREG -2. turn off irq's -3. reset watchdog timer -4. enable watchdog change -5. write watchdog value -6. restore SREG (restoring irq status) -*/ -#define WD_SET(val, ...) \ - __asm__ __volatile__("in __tmp_reg__,__SREG__" \ - "\n\t" \ - "cli" \ - "\n\t" \ - "wdr" \ - "\n\t" \ - "sts %[wdreg],%[wden]" \ - "\n\t" \ - "sts %[wdreg],%[wdval]" \ - "\n\t" \ - "out __SREG__,__tmp_reg__" \ - "\n\t" \ - : \ - : [ wdreg ] "M"(&WDTCSR), [ wden ] "r"((uint8_t)(0x18)), [ wdval ] "r"((uint8_t)(val | (__VA_ARGS__ + 0))) \ - : "r0") - -/*set the watchdog when I bit in SREG known to be clear- -1. reset watchdog timer -2. enable watchdog change -5. write watchdog value -*/ -#define WD_SET_UNSAFE(val, ...) \ - __asm__ __volatile__("wdr" \ - "\n\t" \ - "sts %[wdreg],%[wden]" \ - "\n\t" \ - "sts %[wdreg],%[wdval]" \ - "\n\t" \ - : \ - : [ wdreg ] "M"(&WDTCSR), [ wden ] "r"((uint8_t)(0x18)), [ wdval ] "r"((uint8_t)(val | (__VA_ARGS__ + 0)))) - -// for compatibility with avr/wdt.h -#define wdt_enable(val) WD_SET(WD_RST, val) -#define wdt_disable() WD_SET(WD_OFF) - -#endif /* _AVR_WD_H_ */ diff --git a/tmk_core/readme.md b/tmk_core/readme.md index 5b719bca5d35..a754cfee42d0 100644 --- a/tmk_core/readme.md +++ b/tmk_core/readme.md @@ -84,8 +84,8 @@ Architecture / /| Keys/Mouse | Protocol |d| | Action | | | Protocol | /__________/ |<-----------| LUFA |r| | Layer, Tap | | | Matrix | |.--------.| | LED | V-USB |i| |-------------| | | PS/2,IBM | __________________ - || || |----------->| iWRAP(BT)|v| | Keymap | | | ADB,M0110| Keys / /_/_/_/_/_/_/_/ /| - || Host || | Console | UART |e| | Mousekey | | | SUN/NEWS |<----------/ /_/_/_/_/_/_/_/ / / + || || |----------->| UART |v| | Keymap | | | ADB,M0110| Keys / /_/_/_/_/_/_/_/ /| + || Host || | Console | |e| | Mousekey | | | SUN/NEWS |<----------/ /_/_/_/_/_/_/_/ / / ||________||/.<-----------| |r| | Report | | | X68K/PC98| Control / /_/_/_/_/_/_/_/ / / `_========_'/| |---------------------------------------------|-------->/___ /_______/ ___/ / |_o______o_|/ | Sendchar, Print, Debug, Command, ... | |_________________|/ @@ -133,7 +133,6 @@ Files and Directories ### Keyboard Protocols * lufa/ - LUFA USB stack * vusb/ - Objective Development V-USB -* iwrap/ - Bluetooth HID for Bluegiga iWRAP * ps2.c - PS/2 protocol * adb.c - Apple Desktop Bus protocol * m0110.c - Macintosh 128K/512K/Plus keyboard protocol From 385d49cc39b57e74203e0c1c78c0789d249e4742 Mon Sep 17 00:00:00 2001 From: Nick Brassel Date: Sat, 6 Jun 2020 18:52:19 +1000 Subject: [PATCH 654/930] Initial work for consolidation of ChibiOS platform files (#8327) * Initial work for consolidation of board files and default ChibiOS configs. * Migrate F401/F411 black pills for testing. * Add early init bootloader jump flag. * Add support for I2C in order to use i2c_scanner keymap. * Add F401/F411 HSE bypass to get things booting. * Exempt "hooked" ChibiOS conf files from updater script. * Fix up ordering for bootloader_defs file check. * Match previous $(KEYBOARD_PATHS) value for Proton-C, updated for all board configs. --- build_keyboard.mk | 9 +- drivers/boards/BLACKPILL_STM32_F401/board.c | 250 ---- drivers/boards/BLACKPILL_STM32_F401/board.h | 568 -------- .../BLACKPILL_STM32_F401/cfg/board.chcfg | 1193 ----------------- .../BLACKPILL_STM32_F401/cfg/board.fmpp | 15 - drivers/boards/BLACKPILL_STM32_F411/board.c | 250 ---- drivers/boards/BLACKPILL_STM32_F411/board.h | 583 -------- .../BLACKPILL_STM32_F411/cfg/board.chcfg | 1193 ----------------- .../BLACKPILL_STM32_F411/cfg/board.fmpp | 15 - .../GENERIC_STM32_F072XB/cfg/board.chcfg | 703 ---------- .../GENERIC_STM32_F072XB/cfg/board.fmpp | 15 - drivers/boards/GENERIC_STM32_F303XC/board.mk | 5 - drivers/boards/IC_TEENSY_3_1/board.mk | 5 - drivers/boards/STM32_F103_STM32DUINO/board.mk | 5 - .../handwired/onekey/blackpill_f401/halconf.h | 537 +------- .../handwired/onekey/blackpill_f401/mcuconf.h | 264 +--- .../handwired/onekey/blackpill_f411/halconf.h | 537 +------- .../handwired/onekey/blackpill_f411/mcuconf.h | 264 +--- .../ixora/boards/GENERIC_STM32_F042X6/board.c | 268 ---- .../boards/GENERIC_STM32_F042X6/board.mk | 5 - .../vinta/boards/GENERIC_STM32_F042X6/board.h | 896 ------------- .../boards/GENERIC_STM32_F042X6/board.mk | 5 - keyboards/vinta/bootloader_defs.h | 7 - lib/python/qmk/cli/cformat.py | 4 +- .../BLACKPILL_STM32_F401/board/board.mk | 9 + .../BLACKPILL_STM32_F401/configs/board.h | 20 + .../BLACKPILL_STM32_F401/configs}/chconf.h | 0 .../BLACKPILL_STM32_F401/configs/config.h | 23 + .../BLACKPILL_STM32_F401/configs/halconf.h | 525 ++++++++ .../BLACKPILL_STM32_F401/configs/mcuconf.h | 253 ++++ .../BLACKPILL_STM32_F411/board/board.mk | 9 + .../BLACKPILL_STM32_F411/configs/board.h | 20 + .../BLACKPILL_STM32_F411/configs}/chconf.h | 0 .../BLACKPILL_STM32_F411/configs/config.h | 23 + .../BLACKPILL_STM32_F411/configs/halconf.h | 525 ++++++++ .../BLACKPILL_STM32_F411/configs/mcuconf.h | 253 ++++ .../GENERIC_STM32_F042X6/board}/board.c | 3 +- .../GENERIC_STM32_F042X6/board}/board.h | 0 .../GENERIC_STM32_F042X6/board}/board.mk | 4 +- .../configs}/bootloader_defs.h | 0 .../GENERIC_STM32_F072XB/board}/board.c | 0 .../GENERIC_STM32_F072XB/board}/board.h | 0 .../GENERIC_STM32_F072XB/board}/board.mk | 4 +- .../configs}/bootloader_defs.h | 0 .../GENERIC_STM32_F303XC/board}/board.c | 2 +- .../GENERIC_STM32_F303XC/board}/board.h | 0 .../GENERIC_STM32_F303XC/board}/board.mk | 4 +- .../configs}/bootloader_defs.h | 0 .../GENERIC_STM32_F303XC/configs}/chconf.h | 362 ++--- .../GENERIC_STM32_F303XC/configs}/halconf.h | 339 ++--- .../GENERIC_STM32_F303XC/configs/mcuconf.h | 273 ++++ .../GENERIC_STM32_F303XC/configs/proton_c.mk | 9 + .../chibios/IC_TEENSY_3_1/board}/board.c | 0 .../chibios/IC_TEENSY_3_1/board}/board.h | 0 .../chibios/IC_TEENSY_3_1/board/board.mk | 9 + .../STM32_F103_STM32DUINO/board}/board.c | 3 + .../STM32_F103_STM32DUINO/board}/board.h | 0 .../STM32_F103_STM32DUINO/board/board.mk | 9 + .../chibios/keyboard-config-templates/board.h | 20 + .../keyboard-config-templates/chconf.h | 20 + .../keyboard-config-templates/halconf.h | 20 + .../keyboard-config-templates/mcuconf.h | 21 + .../chibios}/ld/MKL26Z64.ld | 0 .../ld/STM32F103x8_stm32duino_bootloader.ld | 0 quantum/stm32/mcuconf.h | 273 ---- quantum/stm32/proton_c.mk | 47 - tmk_core/chibios.mk | 113 +- util/chibios-upgrader.sh | 6 +- util/travis_compiled_push.sh | 2 +- 69 files changed, 2563 insertions(+), 8236 deletions(-) delete mode 100644 drivers/boards/BLACKPILL_STM32_F401/board.c delete mode 100644 drivers/boards/BLACKPILL_STM32_F401/board.h delete mode 100644 drivers/boards/BLACKPILL_STM32_F401/cfg/board.chcfg delete mode 100644 drivers/boards/BLACKPILL_STM32_F401/cfg/board.fmpp delete mode 100644 drivers/boards/BLACKPILL_STM32_F411/board.c delete mode 100644 drivers/boards/BLACKPILL_STM32_F411/board.h delete mode 100644 drivers/boards/BLACKPILL_STM32_F411/cfg/board.chcfg delete mode 100644 drivers/boards/BLACKPILL_STM32_F411/cfg/board.fmpp delete mode 100644 drivers/boards/GENERIC_STM32_F072XB/cfg/board.chcfg delete mode 100644 drivers/boards/GENERIC_STM32_F072XB/cfg/board.fmpp delete mode 100644 drivers/boards/GENERIC_STM32_F303XC/board.mk delete mode 100644 drivers/boards/IC_TEENSY_3_1/board.mk delete mode 100644 drivers/boards/STM32_F103_STM32DUINO/board.mk delete mode 100644 keyboards/peiorisboards/ixora/boards/GENERIC_STM32_F042X6/board.c delete mode 100644 keyboards/peiorisboards/ixora/boards/GENERIC_STM32_F042X6/board.mk delete mode 100644 keyboards/vinta/boards/GENERIC_STM32_F042X6/board.h delete mode 100644 keyboards/vinta/boards/GENERIC_STM32_F042X6/board.mk delete mode 100644 keyboards/vinta/bootloader_defs.h create mode 100644 platforms/chibios/BLACKPILL_STM32_F401/board/board.mk create mode 100644 platforms/chibios/BLACKPILL_STM32_F401/configs/board.h rename {keyboards/handwired/onekey/blackpill_f401 => platforms/chibios/BLACKPILL_STM32_F401/configs}/chconf.h (100%) create mode 100644 platforms/chibios/BLACKPILL_STM32_F401/configs/config.h create mode 100644 platforms/chibios/BLACKPILL_STM32_F401/configs/halconf.h create mode 100644 platforms/chibios/BLACKPILL_STM32_F401/configs/mcuconf.h create mode 100644 platforms/chibios/BLACKPILL_STM32_F411/board/board.mk create mode 100644 platforms/chibios/BLACKPILL_STM32_F411/configs/board.h rename {keyboards/handwired/onekey/blackpill_f411 => platforms/chibios/BLACKPILL_STM32_F411/configs}/chconf.h (100%) create mode 100644 platforms/chibios/BLACKPILL_STM32_F411/configs/config.h create mode 100644 platforms/chibios/BLACKPILL_STM32_F411/configs/halconf.h create mode 100644 platforms/chibios/BLACKPILL_STM32_F411/configs/mcuconf.h rename {keyboards/vinta/boards/GENERIC_STM32_F042X6 => platforms/chibios/GENERIC_STM32_F042X6/board}/board.c (99%) rename {keyboards/peiorisboards/ixora/boards/GENERIC_STM32_F042X6 => platforms/chibios/GENERIC_STM32_F042X6/board}/board.h (100%) rename {drivers/boards/GENERIC_STM32_F072XB => platforms/chibios/GENERIC_STM32_F042X6/board}/board.mk (54%) rename {keyboards/peiorisboards/ixora => platforms/chibios/GENERIC_STM32_F042X6/configs}/bootloader_defs.h (100%) rename {drivers/boards/GENERIC_STM32_F072XB => platforms/chibios/GENERIC_STM32_F072XB/board}/board.c (100%) rename {drivers/boards/GENERIC_STM32_F072XB => platforms/chibios/GENERIC_STM32_F072XB/board}/board.h (100%) rename {drivers/boards/BLACKPILL_STM32_F411 => platforms/chibios/GENERIC_STM32_F072XB/board}/board.mk (54%) rename {drivers/boards/GENERIC_STM32_F072XB => platforms/chibios/GENERIC_STM32_F072XB/configs}/bootloader_defs.h (100%) rename {drivers/boards/GENERIC_STM32_F303XC => platforms/chibios/GENERIC_STM32_F303XC/board}/board.c (99%) rename {drivers/boards/GENERIC_STM32_F303XC => platforms/chibios/GENERIC_STM32_F303XC/board}/board.h (100%) rename {drivers/boards/BLACKPILL_STM32_F401 => platforms/chibios/GENERIC_STM32_F303XC/board}/board.mk (54%) rename {drivers/boards/GENERIC_STM32_F303XC => platforms/chibios/GENERIC_STM32_F303XC/configs}/bootloader_defs.h (100%) rename {quantum/stm32 => platforms/chibios/GENERIC_STM32_F303XC/configs}/chconf.h (68%) rename {quantum/stm32 => platforms/chibios/GENERIC_STM32_F303XC/configs}/halconf.h (62%) create mode 100644 platforms/chibios/GENERIC_STM32_F303XC/configs/mcuconf.h create mode 100644 platforms/chibios/GENERIC_STM32_F303XC/configs/proton_c.mk rename {drivers/boards/IC_TEENSY_3_1 => platforms/chibios/IC_TEENSY_3_1/board}/board.c (100%) rename {drivers/boards/IC_TEENSY_3_1 => platforms/chibios/IC_TEENSY_3_1/board}/board.h (100%) create mode 100644 platforms/chibios/IC_TEENSY_3_1/board/board.mk rename {drivers/boards/STM32_F103_STM32DUINO => platforms/chibios/STM32_F103_STM32DUINO/board}/board.c (93%) rename {drivers/boards/STM32_F103_STM32DUINO => platforms/chibios/STM32_F103_STM32DUINO/board}/board.h (100%) create mode 100644 platforms/chibios/STM32_F103_STM32DUINO/board/board.mk create mode 100644 platforms/chibios/keyboard-config-templates/board.h create mode 100644 platforms/chibios/keyboard-config-templates/chconf.h create mode 100644 platforms/chibios/keyboard-config-templates/halconf.h create mode 100644 platforms/chibios/keyboard-config-templates/mcuconf.h rename {drivers/boards => platforms/chibios}/ld/MKL26Z64.ld (100%) rename {drivers/boards => platforms/chibios}/ld/STM32F103x8_stm32duino_bootloader.ld (100%) delete mode 100644 quantum/stm32/mcuconf.h delete mode 100644 quantum/stm32/proton_c.mk diff --git a/build_keyboard.mk b/build_keyboard.mk index 4108704875d2..b4e1efd9ee40 100644 --- a/build_keyboard.mk +++ b/build_keyboard.mk @@ -16,7 +16,6 @@ include common.mk KEYBOARD_FILESAFE := $(subst /,_,$(KEYBOARD)) TARGET ?= $(KEYBOARD_FILESAFE)_$(KEYMAP) KEYBOARD_OUTPUT := $(BUILD_DIR)/obj_$(KEYBOARD_FILESAFE) -STM32_PATH := quantum/stm32 # Force expansion TARGET := $(TARGET) @@ -138,7 +137,7 @@ endif ifeq ($(strip $(CONVERT_TO_PROTON_C)), yes) TARGET := $(TARGET)_proton_c - include $(STM32_PATH)/proton_c.mk + include platforms/chibios/GENERIC_STM32_F303XC/configs/proton_c.mk OPT_DEFS += -DCONVERT_TO_PROTON_C endif @@ -148,12 +147,6 @@ endif include quantum/mcu_selection.mk -ifdef MCU_FAMILY - OPT_DEFS += -DQMK_STM32 - KEYBOARD_PATHS += $(STM32_PATH) -endif - - # Find all the C source files to be compiled in subfolders. KEYBOARD_SRC := diff --git a/drivers/boards/BLACKPILL_STM32_F401/board.c b/drivers/boards/BLACKPILL_STM32_F401/board.c deleted file mode 100644 index 330e06c8aa8e..000000000000 --- a/drivers/boards/BLACKPILL_STM32_F401/board.c +++ /dev/null @@ -1,250 +0,0 @@ -/* - 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. - 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" -#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; - -/** - * @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 - {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_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 -} - -/*===========================================================================*/ -/* Driver interrupt handlers. */ -/*===========================================================================*/ - -/*===========================================================================*/ -/* Driver exported functions. */ -/*===========================================================================*/ - -__attribute__((weak)) void enter_bootloader_mode_if_requested(void) {} - -/** - * @brief Early initialization code. - * @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. - */ -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/BLACKPILL_STM32_F401/board.h b/drivers/boards/BLACKPILL_STM32_F401/board.h deleted file mode 100644 index 2d1cd9ff72dd..000000000000 --- a/drivers/boards/BLACKPILL_STM32_F401/board.h +++ /dev/null @@ -1,568 +0,0 @@ -/* - 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. - 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 - -/*===========================================================================*/ -/* Driver constants. */ -/*===========================================================================*/ - -/* - * Setup for STM32F401CCU6 black pill board. - */ - -/* - * Board identifier. - */ -#define BOARD_BLACKPILL_STM32_F401 -#define BOARD_NAME "STM32F401CCU6 blackpill" - -/* - * Allow Board to boot USB without extra A9 hardware/software config - */ -#define BOARD_OTG_NOVBUSSENS 1 - -/* - * Board oscillators-related settings. - */ -#if !defined(STM32_LSECLK) -# define STM32_LSECLK 32768U -#endif - -#if !defined(STM32_HSECLK) -# define STM32_HSECLK 25000000U -#endif - -/* - * Board voltages. - * Required for performance limits calculation. - */ -#define STM32_VDD 300U - -/* - * MCU type as defined in the ST header. - */ -#define STM32F401xC - -/* - * IO pins assignments. - */ -#define GPIOA_BUTTON 0U -#define GPIOA_PIN1 1U -#define GPIOA_PIN2 2U -#define GPIOA_PIN3 3U -#define GPIOA_CS43L22_LRCK 4U -#define GPIOA_L3GD20_SCL 5U -#define GPIOA_L3GD20_SD0 6U -#define GPIOA_L3GD20_SDI 7U -#define GPIOA_PIN8 8U -#define GPIOA_VBUS_FS 9U -#define GPIOA_OTG_FS_ID 10U -#define GPIOA_OTG_FS_DM 11U -#define GPIOA_OTG_FS_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_SWO 3U -#define GPIOB_PIN4 4U -#define GPIOB_PIN5 5U -#define GPIOB_LSM303DLHC_SCL 6U -#define GPIOB_PIN7 7U -#define GPIOB_PIN8 8U -#define GPIOB_LSM303DLHC_SDA 9U -#define GPIOB_MP45DT02_CLK_IN 10U -#define GPIOB_PIN11 11U -#define GPIOB_PIN12 12U -#define GPIOB_PIN13 13U -#define GPIOB_PIN14 14U -#define GPIOB_PIN15 15U - -#define GPIOC_OTG_FS_POWER_ON 0U -#define GPIOC_PIN1 1U -#define GPIOC_PIN2 2U -#define GPIOC_CS43L22_AIN4x 3U -#define GPIOC_MP45DT02_PDM_OUT 3U -#define GPIOC_PIN4 4U -#define GPIOC_PIN5 5U -#define GPIOC_PIN6 6U -#define GPIOC_CS43L22_MCLK 7U -#define GPIOC_PIN8 8U -#define GPIOC_PIN9 9U -#define GPIOC_CS43L22_SCLK 10U -#define GPIOC_PIN11 11U -#define GPIOC_CS43L22_SDIN 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_CS43L22_RESET 4U -#define GPIOD_OverCurrent 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_LED4 12U -#define GPIOD_LED3 13U -#define GPIOD_LED5 14U -#define GPIOD_LED6 15U - -#define GPIOE_L3GD20_INT1 0U -#define GPIOE_L3GD20_INT2 1U -#define GPIOE_LSM303DLHC_DRDY 2U -#define GPIOE_L3GD20_CS 3U -#define GPIOE_LSM303DLHC_INT1 4U -#define GPIOE_LSM303DLHC_INT2 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_PIN0 0U -#define GPIOF_PIN1 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 GPIOG_PIN0 0U -#define GPIOG_PIN1 1U -#define GPIOG_PIN2 2U -#define GPIOG_PIN3 3U -#define GPIOG_PIN4 4U -#define GPIOG_PIN5 5U -#define GPIOG_PIN6 6U -#define GPIOG_PIN7 7U -#define GPIOG_PIN8 8U -#define GPIOG_PIN9 9U -#define GPIOG_PIN10 10U -#define GPIOG_PIN11 11U -#define GPIOG_PIN12 12U -#define GPIOG_PIN13 13U -#define GPIOG_PIN14 14U -#define GPIOG_PIN15 15U - -#define GPIOH_OSC_IN 0U -#define GPIOH_OSC_OUT 1U -#define GPIOH_PIN2 2U -#define GPIOH_PIN3 3U -#define GPIOH_PIN4 4U -#define GPIOH_PIN5 5U -#define GPIOH_PIN6 6U -#define GPIOH_PIN7 7U -#define GPIOH_PIN8 8U -#define GPIOH_PIN9 9U -#define GPIOH_PIN10 10U -#define GPIOH_PIN11 11U -#define GPIOH_PIN12 12U -#define GPIOH_PIN13 13U -#define GPIOH_PIN14 14U -#define GPIOH_PIN15 15U - -#define GPIOI_PIN0 0U -#define GPIOI_PIN1 1U -#define GPIOI_PIN2 2U -#define GPIOI_PIN3 3U -#define GPIOI_PIN4 4U -#define GPIOI_PIN5 5U -#define GPIOI_PIN6 6U -#define GPIOI_PIN7 7U -#define GPIOI_PIN8 8U -#define GPIOI_PIN9 9U -#define GPIOI_PIN10 10U -#define GPIOI_PIN11 11U -#define GPIOI_PIN12 12U -#define GPIOI_PIN13 13U -#define GPIOI_PIN14 14U -#define GPIOI_PIN15 15U - -/* - * IO lines assignments. - */ -#define LINE_BUTTON PAL_LINE(GPIOA, 0U) -#define LINE_CS43L22_LRCK PAL_LINE(GPIOA, 4U) -#define LINE_L3GD20_SCL PAL_LINE(GPIOA, 5U) -#define LINE_L3GD20_SD0 PAL_LINE(GPIOA, 6U) -#define LINE_L3GD20_SDI PAL_LINE(GPIOA, 7U) -#define LINE_VBUS_FS PAL_LINE(GPIOA, 9U) -#define LINE_OTG_FS_ID PAL_LINE(GPIOA, 10U) -#define LINE_OTG_FS_DM PAL_LINE(GPIOA, 11U) -#define LINE_OTG_FS_DP PAL_LINE(GPIOA, 12U) -#define LINE_SWDIO PAL_LINE(GPIOA, 13U) -#define LINE_SWCLK PAL_LINE(GPIOA, 14U) -#define LINE_SWO PAL_LINE(GPIOB, 3U) -#define LINE_LSM303DLHC_SCL PAL_LINE(GPIOB, 6U) -#define LINE_LSM303DLHC_SDA PAL_LINE(GPIOB, 9U) -#define LINE_MP45DT02_CLK_IN PAL_LINE(GPIOB, 10U) -#define LINE_OTG_FS_POWER_ON PAL_LINE(GPIOC, 0U) -#define LINE_CS43L22_AIN4x PAL_LINE(GPIOC, 3U) -#define LINE_MP45DT02_PDM_OUT PAL_LINE(GPIOC, 3U) -#define LINE_CS43L22_MCLK PAL_LINE(GPIOC, 7U) -#define LINE_CS43L22_SCLK PAL_LINE(GPIOC, 10U) -#define LINE_CS43L22_SDIN PAL_LINE(GPIOC, 12U) -#define LINE_OSC32_IN PAL_LINE(GPIOC, 14U) -#define LINE_OSC32_OUT PAL_LINE(GPIOC, 15U) -#define LINE_CS43L22_RESET PAL_LINE(GPIOD, 4U) -#define LINE_OverCurrent PAL_LINE(GPIOD, 5U) -#define LINE_LED4 PAL_LINE(GPIOD, 12U) -#define LINE_LED3 PAL_LINE(GPIOD, 13U) -#define LINE_LED5 PAL_LINE(GPIOD, 14U) -#define LINE_LED6 PAL_LINE(GPIOD, 15U) -#define LINE_L3GD20_INT1 PAL_LINE(GPIOE, 0U) -#define LINE_L3GD20_INT2 PAL_LINE(GPIOE, 1U) -#define LINE_LSM303DLHC_DRDY PAL_LINE(GPIOE, 2U) -#define LINE_L3GD20_CS PAL_LINE(GPIOE, 3U) -#define LINE_LSM303DLHC_INT1 PAL_LINE(GPIOE, 4U) -#define LINE_LSM303DLHC_INT2 PAL_LINE(GPIOE, 5U) -#define LINE_OSC_IN PAL_LINE(GPIOH, 0U) -#define LINE_OSC_OUT PAL_LINE(GPIOH, 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. - * 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 - CS43L22_LRCK (alternate 6). - * PA5 - L3GD20_SCL (alternate 5). - * PA6 - L3GD20_SD0 (alternate 5). - * PA7 - L3GD20_SDI (alternate 5). - * PA8 - PIN8 (input pullup). - * PA9 - VBUS_FS (input floating). - * PA10 - OTG_FS_ID (alternate 10). - * PA11 - OTG_FS_DM (alternate 10). - * PA12 - OTG_FS_DP (alternate 10). - * 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_ALTERNATE(GPIOA_CS43L22_LRCK) | PIN_MODE_ALTERNATE(GPIOA_L3GD20_SCL) | PIN_MODE_ALTERNATE(GPIOA_L3GD20_SD0) | PIN_MODE_ALTERNATE(GPIOA_L3GD20_SDI) | PIN_MODE_INPUT(GPIOA_PIN8) | PIN_MODE_INPUT(GPIOA_VBUS_FS) | PIN_MODE_ALTERNATE(GPIOA_OTG_FS_ID) | PIN_MODE_ALTERNATE(GPIOA_OTG_FS_DM) | PIN_MODE_ALTERNATE(GPIOA_OTG_FS_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_CS43L22_LRCK) | PIN_OTYPE_PUSHPULL(GPIOA_L3GD20_SCL) | PIN_OTYPE_PUSHPULL(GPIOA_L3GD20_SD0) | PIN_OTYPE_PUSHPULL(GPIOA_L3GD20_SDI) | PIN_OTYPE_PUSHPULL(GPIOA_PIN8) | PIN_OTYPE_PUSHPULL(GPIOA_VBUS_FS) | PIN_OTYPE_PUSHPULL(GPIOA_OTG_FS_ID) | PIN_OTYPE_PUSHPULL(GPIOA_OTG_FS_DM) | PIN_OTYPE_PUSHPULL(GPIOA_OTG_FS_DP) | PIN_OTYPE_PUSHPULL(GPIOA_SWDIO) | PIN_OTYPE_PUSHPULL(GPIOA_SWCLK) | PIN_OTYPE_PUSHPULL(GPIOA_PIN15)) -#define VAL_GPIOA_OSPEEDR (PIN_OSPEED_HIGH(GPIOA_BUTTON) | PIN_OSPEED_HIGH(GPIOA_PIN1) | PIN_OSPEED_HIGH(GPIOA_PIN2) | PIN_OSPEED_HIGH(GPIOA_PIN3) | PIN_OSPEED_HIGH(GPIOA_CS43L22_LRCK) | PIN_OSPEED_HIGH(GPIOA_L3GD20_SCL) | PIN_OSPEED_HIGH(GPIOA_L3GD20_SD0) | PIN_OSPEED_HIGH(GPIOA_L3GD20_SDI) | PIN_OSPEED_HIGH(GPIOA_PIN8) | PIN_OSPEED_HIGH(GPIOA_VBUS_FS) | PIN_OSPEED_HIGH(GPIOA_OTG_FS_ID) | PIN_OSPEED_HIGH(GPIOA_OTG_FS_DM) | PIN_OSPEED_HIGH(GPIOA_OTG_FS_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_FLOATING(GPIOA_CS43L22_LRCK) | PIN_PUPDR_FLOATING(GPIOA_L3GD20_SCL) | PIN_PUPDR_PULLUP(GPIOA_L3GD20_SD0) | PIN_PUPDR_PULLUP(GPIOA_L3GD20_SDI) | PIN_PUPDR_PULLUP(GPIOA_PIN8) | PIN_PUPDR_FLOATING(GPIOA_VBUS_FS) | PIN_PUPDR_FLOATING(GPIOA_OTG_FS_ID) | PIN_PUPDR_FLOATING(GPIOA_OTG_FS_DM) | PIN_PUPDR_FLOATING(GPIOA_OTG_FS_DP) | PIN_PUPDR_FLOATING(GPIOA_SWDIO) | PIN_PUPDR_FLOATING(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_CS43L22_LRCK) | PIN_ODR_HIGH(GPIOA_L3GD20_SCL) | PIN_ODR_HIGH(GPIOA_L3GD20_SD0) | PIN_ODR_HIGH(GPIOA_L3GD20_SDI) | PIN_ODR_HIGH(GPIOA_PIN8) | PIN_ODR_HIGH(GPIOA_VBUS_FS) | PIN_ODR_HIGH(GPIOA_OTG_FS_ID) | PIN_ODR_HIGH(GPIOA_OTG_FS_DM) | PIN_ODR_HIGH(GPIOA_OTG_FS_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_CS43L22_LRCK, 6U) | PIN_AFIO_AF(GPIOA_L3GD20_SCL, 5U) | PIN_AFIO_AF(GPIOA_L3GD20_SD0, 5U) | PIN_AFIO_AF(GPIOA_L3GD20_SDI, 5U)) -#define VAL_GPIOA_AFRH (PIN_AFIO_AF(GPIOA_PIN8, 0U) | PIN_AFIO_AF(GPIOA_VBUS_FS, 0U) | PIN_AFIO_AF(GPIOA_OTG_FS_ID, 10U) | PIN_AFIO_AF(GPIOA_OTG_FS_DM, 10U) | PIN_AFIO_AF(GPIOA_OTG_FS_DP, 10U) | 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 - SWO (alternate 0). - * PB4 - PIN4 (input pullup). - * PB5 - PIN5 (input pullup). - * PB6 - LSM303DLHC_SCL (alternate 4). - * PB7 - PIN7 (input pullup). - * PB8 - PIN8 (input pullup). - * PB9 - LSM303DLHC_SDA (alternate 4). - * PB10 - MP45DT02_CLK_IN (alternate 5). - * PB11 - PIN11 (input pullup). - * PB12 - PIN12 (input pullup). - * PB13 - PIN13 (input pullup). - * PB14 - PIN14 (input pullup). - * PB15 - PIN15 (input pullup). - */ -#define VAL_GPIOB_MODER (PIN_MODE_INPUT(GPIOB_PIN0) | PIN_MODE_INPUT(GPIOB_PIN1) | PIN_MODE_INPUT(GPIOB_PIN2) | PIN_MODE_ALTERNATE(GPIOB_SWO) | PIN_MODE_INPUT(GPIOB_PIN4) | PIN_MODE_INPUT(GPIOB_PIN5) | PIN_MODE_ALTERNATE(GPIOB_LSM303DLHC_SCL) | PIN_MODE_INPUT(GPIOB_PIN7) | PIN_MODE_INPUT(GPIOB_PIN8) | PIN_MODE_ALTERNATE(GPIOB_LSM303DLHC_SDA) | PIN_MODE_ALTERNATE(GPIOB_MP45DT02_CLK_IN) | PIN_MODE_INPUT(GPIOB_PIN11) | PIN_MODE_INPUT(GPIOB_PIN12) | PIN_MODE_INPUT(GPIOB_PIN13) | PIN_MODE_INPUT(GPIOB_PIN14) | PIN_MODE_INPUT(GPIOB_PIN15)) -#define VAL_GPIOB_OTYPER (PIN_OTYPE_PUSHPULL(GPIOB_PIN0) | PIN_OTYPE_PUSHPULL(GPIOB_PIN1) | PIN_OTYPE_PUSHPULL(GPIOB_PIN2) | PIN_OTYPE_PUSHPULL(GPIOB_SWO) | PIN_OTYPE_PUSHPULL(GPIOB_PIN4) | PIN_OTYPE_PUSHPULL(GPIOB_PIN5) | PIN_OTYPE_PUSHPULL(GPIOB_LSM303DLHC_SCL) | PIN_OTYPE_PUSHPULL(GPIOB_PIN7) | PIN_OTYPE_PUSHPULL(GPIOB_PIN8) | PIN_OTYPE_PUSHPULL(GPIOB_LSM303DLHC_SDA) | PIN_OTYPE_PUSHPULL(GPIOB_MP45DT02_CLK_IN) | PIN_OTYPE_PUSHPULL(GPIOB_PIN11) | PIN_OTYPE_PUSHPULL(GPIOB_PIN12) | PIN_OTYPE_PUSHPULL(GPIOB_PIN13) | PIN_OTYPE_PUSHPULL(GPIOB_PIN14) | PIN_OTYPE_PUSHPULL(GPIOB_PIN15)) -#define VAL_GPIOB_OSPEEDR (PIN_OSPEED_HIGH(GPIOB_PIN0) | PIN_OSPEED_HIGH(GPIOB_PIN1) | PIN_OSPEED_HIGH(GPIOB_PIN2) | PIN_OSPEED_HIGH(GPIOB_SWO) | PIN_OSPEED_HIGH(GPIOB_PIN4) | PIN_OSPEED_HIGH(GPIOB_PIN5) | PIN_OSPEED_HIGH(GPIOB_LSM303DLHC_SCL) | PIN_OSPEED_HIGH(GPIOB_PIN7) | PIN_OSPEED_HIGH(GPIOB_PIN8) | PIN_OSPEED_HIGH(GPIOB_LSM303DLHC_SDA) | PIN_OSPEED_HIGH(GPIOB_MP45DT02_CLK_IN) | PIN_OSPEED_HIGH(GPIOB_PIN11) | PIN_OSPEED_HIGH(GPIOB_PIN12) | PIN_OSPEED_HIGH(GPIOB_PIN13) | PIN_OSPEED_HIGH(GPIOB_PIN14) | PIN_OSPEED_HIGH(GPIOB_PIN15)) -#define VAL_GPIOB_PUPDR (PIN_PUPDR_PULLUP(GPIOB_PIN0) | PIN_PUPDR_PULLUP(GPIOB_PIN1) | PIN_PUPDR_PULLUP(GPIOB_PIN2) | PIN_PUPDR_PULLUP(GPIOB_SWO) | PIN_PUPDR_PULLUP(GPIOB_PIN4) | PIN_PUPDR_PULLUP(GPIOB_PIN5) | PIN_PUPDR_FLOATING(GPIOB_LSM303DLHC_SCL) | PIN_PUPDR_PULLUP(GPIOB_PIN7) | PIN_PUPDR_PULLUP(GPIOB_PIN8) | PIN_PUPDR_FLOATING(GPIOB_LSM303DLHC_SDA) | PIN_PUPDR_FLOATING(GPIOB_MP45DT02_CLK_IN) | PIN_PUPDR_PULLUP(GPIOB_PIN11) | PIN_PUPDR_PULLUP(GPIOB_PIN12) | PIN_PUPDR_PULLUP(GPIOB_PIN13) | PIN_PUPDR_PULLUP(GPIOB_PIN14) | PIN_PUPDR_PULLUP(GPIOB_PIN15)) -#define VAL_GPIOB_ODR (PIN_ODR_HIGH(GPIOB_PIN0) | PIN_ODR_HIGH(GPIOB_PIN1) | PIN_ODR_HIGH(GPIOB_PIN2) | PIN_ODR_HIGH(GPIOB_SWO) | PIN_ODR_HIGH(GPIOB_PIN4) | PIN_ODR_HIGH(GPIOB_PIN5) | PIN_ODR_HIGH(GPIOB_LSM303DLHC_SCL) | PIN_ODR_HIGH(GPIOB_PIN7) | PIN_ODR_HIGH(GPIOB_PIN8) | PIN_ODR_HIGH(GPIOB_LSM303DLHC_SDA) | PIN_ODR_HIGH(GPIOB_MP45DT02_CLK_IN) | PIN_ODR_HIGH(GPIOB_PIN11) | PIN_ODR_HIGH(GPIOB_PIN12) | PIN_ODR_HIGH(GPIOB_PIN13) | PIN_ODR_HIGH(GPIOB_PIN14) | PIN_ODR_HIGH(GPIOB_PIN15)) -#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_SWO, 0U) | PIN_AFIO_AF(GPIOB_PIN4, 0U) | PIN_AFIO_AF(GPIOB_PIN5, 0U) | PIN_AFIO_AF(GPIOB_LSM303DLHC_SCL, 4U) | PIN_AFIO_AF(GPIOB_PIN7, 0U)) -#define VAL_GPIOB_AFRH (PIN_AFIO_AF(GPIOB_PIN8, 0U) | PIN_AFIO_AF(GPIOB_LSM303DLHC_SDA, 4U) | PIN_AFIO_AF(GPIOB_MP45DT02_CLK_IN, 5U) | PIN_AFIO_AF(GPIOB_PIN11, 0U) | PIN_AFIO_AF(GPIOB_PIN12, 0U) | PIN_AFIO_AF(GPIOB_PIN13, 0U) | PIN_AFIO_AF(GPIOB_PIN14, 0U) | PIN_AFIO_AF(GPIOB_PIN15, 0U)) - -/* - * GPIOC setup: - * - * PC0 - OTG_FS_POWER_ON (output pushpull maximum). - * PC1 - PIN1 (input pullup). - * PC2 - PIN2 (input pullup). - * PC3 - CS43L22_AIN4x MP45DT02_PDM_OUT(alternate 5). - * PC4 - PIN4 (input pullup). - * PC5 - PIN5 (input pullup). - * PC6 - PIN6 (input pullup). - * PC7 - CS43L22_MCLK (alternate 6). - * PC8 - PIN8 (input pullup). - * PC9 - PIN9 (input pullup). - * PC10 - CS43L22_SCLK (alternate 6). - * PC11 - PIN11 (input pullup). - * PC12 - CS43L22_SDIN (alternate 6). - * PC13 - PIN13 (input pullup). - * PC14 - OSC32_IN (input floating). - * PC15 - OSC32_OUT (input floating). - */ -#define VAL_GPIOC_MODER (PIN_MODE_OUTPUT(GPIOC_OTG_FS_POWER_ON) | PIN_MODE_INPUT(GPIOC_PIN1) | PIN_MODE_INPUT(GPIOC_PIN2) | PIN_MODE_ALTERNATE(GPIOC_CS43L22_AIN4x) | PIN_MODE_INPUT(GPIOC_PIN4) | PIN_MODE_INPUT(GPIOC_PIN5) | PIN_MODE_INPUT(GPIOC_PIN6) | PIN_MODE_ALTERNATE(GPIOC_CS43L22_MCLK) | PIN_MODE_INPUT(GPIOC_PIN8) | PIN_MODE_INPUT(GPIOC_PIN9) | PIN_MODE_ALTERNATE(GPIOC_CS43L22_SCLK) | PIN_MODE_INPUT(GPIOC_PIN11) | PIN_MODE_ALTERNATE(GPIOC_CS43L22_SDIN) | 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_OTG_FS_POWER_ON) | PIN_OTYPE_PUSHPULL(GPIOC_PIN1) | PIN_OTYPE_PUSHPULL(GPIOC_PIN2) | PIN_OTYPE_PUSHPULL(GPIOC_CS43L22_AIN4x) | PIN_OTYPE_PUSHPULL(GPIOC_PIN4) | PIN_OTYPE_PUSHPULL(GPIOC_PIN5) | PIN_OTYPE_PUSHPULL(GPIOC_PIN6) | PIN_OTYPE_PUSHPULL(GPIOC_CS43L22_MCLK) | PIN_OTYPE_PUSHPULL(GPIOC_PIN8) | PIN_OTYPE_PUSHPULL(GPIOC_PIN9) | PIN_OTYPE_PUSHPULL(GPIOC_CS43L22_SCLK) | PIN_OTYPE_PUSHPULL(GPIOC_PIN11) | PIN_OTYPE_PUSHPULL(GPIOC_CS43L22_SDIN) | 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_OTG_FS_POWER_ON) | PIN_OSPEED_HIGH(GPIOC_PIN1) | PIN_OSPEED_HIGH(GPIOC_PIN2) | PIN_OSPEED_HIGH(GPIOC_CS43L22_AIN4x) | PIN_OSPEED_HIGH(GPIOC_PIN4) | PIN_OSPEED_HIGH(GPIOC_PIN5) | PIN_OSPEED_HIGH(GPIOC_PIN6) | PIN_OSPEED_HIGH(GPIOC_CS43L22_MCLK) | PIN_OSPEED_HIGH(GPIOC_PIN8) | PIN_OSPEED_HIGH(GPIOC_PIN9) | PIN_OSPEED_HIGH(GPIOC_CS43L22_SCLK) | PIN_OSPEED_HIGH(GPIOC_PIN11) | PIN_OSPEED_HIGH(GPIOC_CS43L22_SDIN) | PIN_OSPEED_HIGH(GPIOC_PIN13) | PIN_OSPEED_HIGH(GPIOC_OSC32_IN) | PIN_OSPEED_HIGH(GPIOC_OSC32_OUT)) -#define VAL_GPIOC_PUPDR (PIN_PUPDR_PULLUP(GPIOC_OTG_FS_POWER_ON) | PIN_PUPDR_PULLUP(GPIOC_PIN1) | PIN_PUPDR_PULLUP(GPIOC_PIN2) | PIN_PUPDR_FLOATING(GPIOC_CS43L22_AIN4x) | PIN_PUPDR_PULLUP(GPIOC_PIN4) | PIN_PUPDR_PULLUP(GPIOC_PIN5) | PIN_PUPDR_PULLUP(GPIOC_PIN6) | PIN_PUPDR_PULLUP(GPIOC_CS43L22_MCLK) | PIN_PUPDR_PULLUP(GPIOC_PIN8) | PIN_PUPDR_PULLUP(GPIOC_PIN9) | PIN_PUPDR_PULLUP(GPIOC_CS43L22_SCLK) | PIN_PUPDR_PULLUP(GPIOC_PIN11) | PIN_PUPDR_PULLUP(GPIOC_CS43L22_SDIN) | 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_OTG_FS_POWER_ON) | PIN_ODR_HIGH(GPIOC_PIN1) | PIN_ODR_HIGH(GPIOC_PIN2) | PIN_ODR_HIGH(GPIOC_CS43L22_AIN4x) | PIN_ODR_HIGH(GPIOC_PIN4) | PIN_ODR_HIGH(GPIOC_PIN5) | PIN_ODR_HIGH(GPIOC_PIN6) | PIN_ODR_HIGH(GPIOC_CS43L22_MCLK) | PIN_ODR_HIGH(GPIOC_PIN8) | PIN_ODR_HIGH(GPIOC_PIN9) | PIN_ODR_HIGH(GPIOC_CS43L22_SCLK) | PIN_ODR_HIGH(GPIOC_PIN11) | PIN_ODR_HIGH(GPIOC_CS43L22_SDIN) | 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_OTG_FS_POWER_ON, 0U) | PIN_AFIO_AF(GPIOC_PIN1, 0U) | PIN_AFIO_AF(GPIOC_PIN2, 0U) | PIN_AFIO_AF(GPIOC_CS43L22_AIN4x, 5U) | PIN_AFIO_AF(GPIOC_PIN4, 0U) | PIN_AFIO_AF(GPIOC_PIN5, 0U) | PIN_AFIO_AF(GPIOC_PIN6, 0U) | PIN_AFIO_AF(GPIOC_CS43L22_MCLK, 6U)) -#define VAL_GPIOC_AFRH (PIN_AFIO_AF(GPIOC_PIN8, 0U) | PIN_AFIO_AF(GPIOC_PIN9, 0U) | PIN_AFIO_AF(GPIOC_CS43L22_SCLK, 6U) | PIN_AFIO_AF(GPIOC_PIN11, 0U) | PIN_AFIO_AF(GPIOC_CS43L22_SDIN, 6U) | 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 - CS43L22_RESET (output pushpull maximum). - * PD5 - OverCurrent (input floating). - * 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 - LED4 (output pushpull maximum). - * PD13 - LED3 (output pushpull maximum). - * PD14 - LED5 (output pushpull maximum). - * PD15 - LED6 (output pushpull maximum). - */ -#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_OUTPUT(GPIOD_CS43L22_RESET) | PIN_MODE_INPUT(GPIOD_OverCurrent) | 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_OUTPUT(GPIOD_LED4) | PIN_MODE_OUTPUT(GPIOD_LED3) | PIN_MODE_OUTPUT(GPIOD_LED5) | PIN_MODE_OUTPUT(GPIOD_LED6)) -#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_CS43L22_RESET) | PIN_OTYPE_PUSHPULL(GPIOD_OverCurrent) | 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_LED4) | PIN_OTYPE_PUSHPULL(GPIOD_LED3) | PIN_OTYPE_PUSHPULL(GPIOD_LED5) | PIN_OTYPE_PUSHPULL(GPIOD_LED6)) -#define VAL_GPIOD_OSPEEDR (PIN_OSPEED_HIGH(GPIOD_PIN0) | PIN_OSPEED_HIGH(GPIOD_PIN1) | PIN_OSPEED_HIGH(GPIOD_PIN2) | PIN_OSPEED_HIGH(GPIOD_PIN3) | PIN_OSPEED_HIGH(GPIOD_CS43L22_RESET) | PIN_OSPEED_HIGH(GPIOD_OverCurrent) | PIN_OSPEED_HIGH(GPIOD_PIN6) | PIN_OSPEED_HIGH(GPIOD_PIN7) | PIN_OSPEED_HIGH(GPIOD_PIN8) | PIN_OSPEED_HIGH(GPIOD_PIN9) | PIN_OSPEED_HIGH(GPIOD_PIN10) | PIN_OSPEED_HIGH(GPIOD_PIN11) | PIN_OSPEED_HIGH(GPIOD_LED4) | PIN_OSPEED_HIGH(GPIOD_LED3) | PIN_OSPEED_HIGH(GPIOD_LED5) | PIN_OSPEED_HIGH(GPIOD_LED6)) -#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_CS43L22_RESET) | PIN_PUPDR_FLOATING(GPIOD_OverCurrent) | 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_FLOATING(GPIOD_LED4) | PIN_PUPDR_FLOATING(GPIOD_LED3) | PIN_PUPDR_FLOATING(GPIOD_LED5) | PIN_PUPDR_FLOATING(GPIOD_LED6)) -#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_CS43L22_RESET) | PIN_ODR_HIGH(GPIOD_OverCurrent) | 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_LOW(GPIOD_LED4) | PIN_ODR_LOW(GPIOD_LED3) | PIN_ODR_LOW(GPIOD_LED5) | PIN_ODR_LOW(GPIOD_LED6)) -#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_CS43L22_RESET, 0U) | PIN_AFIO_AF(GPIOD_OverCurrent, 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_LED4, 0U) | PIN_AFIO_AF(GPIOD_LED3, 0U) | PIN_AFIO_AF(GPIOD_LED5, 0U) | PIN_AFIO_AF(GPIOD_LED6, 0U)) - -/* - * GPIOE setup: - * - * PE0 - L3GD20_INT1 (input pullup). - * PE1 - L3GD20_INT2 (input pullup). - * PE2 - LSM303DLHC_DRDY (input floating). - * PE3 - L3GD20_CS (output pushpull maximum). - * PE4 - LSM303DLHC_INT1 (output pushpull maximum). - * PE5 - LSM303DLHC_INT2 (output pushpull maximum). - * 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_L3GD20_INT1) | PIN_MODE_INPUT(GPIOE_L3GD20_INT2) | PIN_MODE_INPUT(GPIOE_LSM303DLHC_DRDY) | PIN_MODE_OUTPUT(GPIOE_L3GD20_CS) | PIN_MODE_OUTPUT(GPIOE_LSM303DLHC_INT1) | PIN_MODE_OUTPUT(GPIOE_LSM303DLHC_INT2) | 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_L3GD20_INT1) | PIN_OTYPE_PUSHPULL(GPIOE_L3GD20_INT2) | PIN_OTYPE_PUSHPULL(GPIOE_LSM303DLHC_DRDY) | PIN_OTYPE_PUSHPULL(GPIOE_L3GD20_CS) | PIN_OTYPE_PUSHPULL(GPIOE_LSM303DLHC_INT1) | PIN_OTYPE_PUSHPULL(GPIOE_LSM303DLHC_INT2) | 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_HIGH(GPIOE_L3GD20_INT1) | PIN_OSPEED_HIGH(GPIOE_L3GD20_INT2) | PIN_OSPEED_HIGH(GPIOE_LSM303DLHC_DRDY) | PIN_OSPEED_HIGH(GPIOE_L3GD20_CS) | PIN_OSPEED_HIGH(GPIOE_LSM303DLHC_INT1) | PIN_OSPEED_HIGH(GPIOE_LSM303DLHC_INT2) | PIN_OSPEED_HIGH(GPIOE_PIN6) | PIN_OSPEED_HIGH(GPIOE_PIN7) | PIN_OSPEED_HIGH(GPIOE_PIN8) | PIN_OSPEED_HIGH(GPIOE_PIN9) | PIN_OSPEED_HIGH(GPIOE_PIN10) | PIN_OSPEED_HIGH(GPIOE_PIN11) | PIN_OSPEED_HIGH(GPIOE_PIN12) | PIN_OSPEED_HIGH(GPIOE_PIN13) | PIN_OSPEED_HIGH(GPIOE_PIN14) | PIN_OSPEED_HIGH(GPIOE_PIN15)) -#define VAL_GPIOE_PUPDR (PIN_PUPDR_PULLUP(GPIOE_L3GD20_INT1) | PIN_PUPDR_PULLUP(GPIOE_L3GD20_INT2) | PIN_PUPDR_FLOATING(GPIOE_LSM303DLHC_DRDY) | PIN_PUPDR_PULLUP(GPIOE_L3GD20_CS) | PIN_PUPDR_PULLUP(GPIOE_LSM303DLHC_INT1) | PIN_PUPDR_PULLUP(GPIOE_LSM303DLHC_INT2) | 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_L3GD20_INT1) | PIN_ODR_HIGH(GPIOE_L3GD20_INT2) | PIN_ODR_HIGH(GPIOE_LSM303DLHC_DRDY) | PIN_ODR_HIGH(GPIOE_L3GD20_CS) | PIN_ODR_HIGH(GPIOE_LSM303DLHC_INT1) | PIN_ODR_HIGH(GPIOE_LSM303DLHC_INT2) | 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_L3GD20_INT1, 0U) | PIN_AFIO_AF(GPIOE_L3GD20_INT2, 0U) | PIN_AFIO_AF(GPIOE_LSM303DLHC_DRDY, 0U) | PIN_AFIO_AF(GPIOE_L3GD20_CS, 0U) | PIN_AFIO_AF(GPIOE_LSM303DLHC_INT1, 0U) | PIN_AFIO_AF(GPIOE_LSM303DLHC_INT2, 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 - PIN0 (input pullup). - * PF1 - PIN1 (input pullup). - * 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_PIN0) | PIN_MODE_INPUT(GPIOF_PIN1) | 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_PIN0) | PIN_OTYPE_PUSHPULL(GPIOF_PIN1) | 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_HIGH(GPIOF_PIN0) | PIN_OSPEED_HIGH(GPIOF_PIN1) | PIN_OSPEED_HIGH(GPIOF_PIN2) | PIN_OSPEED_HIGH(GPIOF_PIN3) | PIN_OSPEED_HIGH(GPIOF_PIN4) | PIN_OSPEED_HIGH(GPIOF_PIN5) | PIN_OSPEED_HIGH(GPIOF_PIN6) | PIN_OSPEED_HIGH(GPIOF_PIN7) | PIN_OSPEED_HIGH(GPIOF_PIN8) | PIN_OSPEED_HIGH(GPIOF_PIN9) | PIN_OSPEED_HIGH(GPIOF_PIN10) | PIN_OSPEED_HIGH(GPIOF_PIN11) | PIN_OSPEED_HIGH(GPIOF_PIN12) | PIN_OSPEED_HIGH(GPIOF_PIN13) | PIN_OSPEED_HIGH(GPIOF_PIN14) | PIN_OSPEED_HIGH(GPIOF_PIN15)) -#define VAL_GPIOF_PUPDR (PIN_PUPDR_PULLUP(GPIOF_PIN0) | PIN_PUPDR_PULLUP(GPIOF_PIN1) | 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_PIN0) | PIN_ODR_HIGH(GPIOF_PIN1) | 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_PIN0, 0U) | PIN_AFIO_AF(GPIOF_PIN1, 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)) - -/* - * GPIOG setup: - * - * PG0 - PIN0 (input pullup). - * PG1 - PIN1 (input pullup). - * PG2 - PIN2 (input pullup). - * PG3 - PIN3 (input pullup). - * PG4 - PIN4 (input pullup). - * PG5 - PIN5 (input pullup). - * PG6 - PIN6 (input pullup). - * PG7 - PIN7 (input pullup). - * PG8 - PIN8 (input pullup). - * PG9 - PIN9 (input pullup). - * PG10 - PIN10 (input pullup). - * PG11 - PIN11 (input pullup). - * PG12 - PIN12 (input pullup). - * PG13 - PIN13 (input pullup). - * PG14 - PIN14 (input pullup). - * PG15 - PIN15 (input pullup). - */ -#define VAL_GPIOG_MODER (PIN_MODE_INPUT(GPIOG_PIN0) | PIN_MODE_INPUT(GPIOG_PIN1) | PIN_MODE_INPUT(GPIOG_PIN2) | PIN_MODE_INPUT(GPIOG_PIN3) | PIN_MODE_INPUT(GPIOG_PIN4) | PIN_MODE_INPUT(GPIOG_PIN5) | PIN_MODE_INPUT(GPIOG_PIN6) | PIN_MODE_INPUT(GPIOG_PIN7) | PIN_MODE_INPUT(GPIOG_PIN8) | PIN_MODE_INPUT(GPIOG_PIN9) | PIN_MODE_INPUT(GPIOG_PIN10) | PIN_MODE_INPUT(GPIOG_PIN11) | PIN_MODE_INPUT(GPIOG_PIN12) | PIN_MODE_INPUT(GPIOG_PIN13) | PIN_MODE_INPUT(GPIOG_PIN14) | PIN_MODE_INPUT(GPIOG_PIN15)) -#define VAL_GPIOG_OTYPER (PIN_OTYPE_PUSHPULL(GPIOG_PIN0) | PIN_OTYPE_PUSHPULL(GPIOG_PIN1) | PIN_OTYPE_PUSHPULL(GPIOG_PIN2) | PIN_OTYPE_PUSHPULL(GPIOG_PIN3) | PIN_OTYPE_PUSHPULL(GPIOG_PIN4) | PIN_OTYPE_PUSHPULL(GPIOG_PIN5) | PIN_OTYPE_PUSHPULL(GPIOG_PIN6) | PIN_OTYPE_PUSHPULL(GPIOG_PIN7) | PIN_OTYPE_PUSHPULL(GPIOG_PIN8) | PIN_OTYPE_PUSHPULL(GPIOG_PIN9) | PIN_OTYPE_PUSHPULL(GPIOG_PIN10) | PIN_OTYPE_PUSHPULL(GPIOG_PIN11) | PIN_OTYPE_PUSHPULL(GPIOG_PIN12) | PIN_OTYPE_PUSHPULL(GPIOG_PIN13) | PIN_OTYPE_PUSHPULL(GPIOG_PIN14) | PIN_OTYPE_PUSHPULL(GPIOG_PIN15)) -#define VAL_GPIOG_OSPEEDR (PIN_OSPEED_HIGH(GPIOG_PIN0) | PIN_OSPEED_HIGH(GPIOG_PIN1) | PIN_OSPEED_HIGH(GPIOG_PIN2) | PIN_OSPEED_HIGH(GPIOG_PIN3) | PIN_OSPEED_HIGH(GPIOG_PIN4) | PIN_OSPEED_HIGH(GPIOG_PIN5) | PIN_OSPEED_HIGH(GPIOG_PIN6) | PIN_OSPEED_HIGH(GPIOG_PIN7) | PIN_OSPEED_HIGH(GPIOG_PIN8) | PIN_OSPEED_HIGH(GPIOG_PIN9) | PIN_OSPEED_HIGH(GPIOG_PIN10) | PIN_OSPEED_HIGH(GPIOG_PIN11) | PIN_OSPEED_HIGH(GPIOG_PIN12) | PIN_OSPEED_HIGH(GPIOG_PIN13) | PIN_OSPEED_HIGH(GPIOG_PIN14) | PIN_OSPEED_HIGH(GPIOG_PIN15)) -#define VAL_GPIOG_PUPDR (PIN_PUPDR_PULLUP(GPIOG_PIN0) | PIN_PUPDR_PULLUP(GPIOG_PIN1) | PIN_PUPDR_PULLUP(GPIOG_PIN2) | PIN_PUPDR_PULLUP(GPIOG_PIN3) | PIN_PUPDR_PULLUP(GPIOG_PIN4) | PIN_PUPDR_PULLUP(GPIOG_PIN5) | PIN_PUPDR_PULLUP(GPIOG_PIN6) | PIN_PUPDR_PULLUP(GPIOG_PIN7) | PIN_PUPDR_PULLUP(GPIOG_PIN8) | PIN_PUPDR_PULLUP(GPIOG_PIN9) | PIN_PUPDR_PULLUP(GPIOG_PIN10) | PIN_PUPDR_PULLUP(GPIOG_PIN11) | PIN_PUPDR_PULLUP(GPIOG_PIN12) | PIN_PUPDR_PULLUP(GPIOG_PIN13) | PIN_PUPDR_PULLUP(GPIOG_PIN14) | PIN_PUPDR_PULLUP(GPIOG_PIN15)) -#define VAL_GPIOG_ODR (PIN_ODR_HIGH(GPIOG_PIN0) | PIN_ODR_HIGH(GPIOG_PIN1) | PIN_ODR_HIGH(GPIOG_PIN2) | PIN_ODR_HIGH(GPIOG_PIN3) | PIN_ODR_HIGH(GPIOG_PIN4) | PIN_ODR_HIGH(GPIOG_PIN5) | PIN_ODR_HIGH(GPIOG_PIN6) | PIN_ODR_HIGH(GPIOG_PIN7) | PIN_ODR_HIGH(GPIOG_PIN8) | PIN_ODR_HIGH(GPIOG_PIN9) | PIN_ODR_HIGH(GPIOG_PIN10) | PIN_ODR_HIGH(GPIOG_PIN11) | PIN_ODR_HIGH(GPIOG_PIN12) | PIN_ODR_HIGH(GPIOG_PIN13) | PIN_ODR_HIGH(GPIOG_PIN14) | PIN_ODR_HIGH(GPIOG_PIN15)) -#define VAL_GPIOG_AFRL (PIN_AFIO_AF(GPIOG_PIN0, 0U) | PIN_AFIO_AF(GPIOG_PIN1, 0U) | PIN_AFIO_AF(GPIOG_PIN2, 0U) | PIN_AFIO_AF(GPIOG_PIN3, 0U) | PIN_AFIO_AF(GPIOG_PIN4, 0U) | PIN_AFIO_AF(GPIOG_PIN5, 0U) | PIN_AFIO_AF(GPIOG_PIN6, 0U) | PIN_AFIO_AF(GPIOG_PIN7, 0U)) -#define VAL_GPIOG_AFRH (PIN_AFIO_AF(GPIOG_PIN8, 0U) | PIN_AFIO_AF(GPIOG_PIN9, 0U) | PIN_AFIO_AF(GPIOG_PIN10, 0U) | PIN_AFIO_AF(GPIOG_PIN11, 0U) | PIN_AFIO_AF(GPIOG_PIN12, 0U) | PIN_AFIO_AF(GPIOG_PIN13, 0U) | PIN_AFIO_AF(GPIOG_PIN14, 0U) | PIN_AFIO_AF(GPIOG_PIN15, 0U)) - -/* - * GPIOH setup: - * - * PH0 - OSC_IN (input floating). - * PH1 - OSC_OUT (input floating). - * PH2 - PIN2 (input pullup). - * PH3 - PIN3 (input pullup). - * PH4 - PIN4 (input pullup). - * PH5 - PIN5 (input pullup). - * PH6 - PIN6 (input pullup). - * PH7 - PIN7 (input pullup). - * PH8 - PIN8 (input pullup). - * PH9 - PIN9 (input pullup). - * PH10 - PIN10 (input pullup). - * PH11 - PIN11 (input pullup). - * PH12 - PIN12 (input pullup). - * PH13 - PIN13 (input pullup). - * PH14 - PIN14 (input pullup). - * PH15 - PIN15 (input pullup). - */ -#define VAL_GPIOH_MODER (PIN_MODE_INPUT(GPIOH_OSC_IN) | PIN_MODE_INPUT(GPIOH_OSC_OUT) | PIN_MODE_INPUT(GPIOH_PIN2) | PIN_MODE_INPUT(GPIOH_PIN3) | PIN_MODE_INPUT(GPIOH_PIN4) | PIN_MODE_INPUT(GPIOH_PIN5) | PIN_MODE_INPUT(GPIOH_PIN6) | PIN_MODE_INPUT(GPIOH_PIN7) | PIN_MODE_INPUT(GPIOH_PIN8) | PIN_MODE_INPUT(GPIOH_PIN9) | PIN_MODE_INPUT(GPIOH_PIN10) | PIN_MODE_INPUT(GPIOH_PIN11) | PIN_MODE_INPUT(GPIOH_PIN12) | PIN_MODE_INPUT(GPIOH_PIN13) | PIN_MODE_INPUT(GPIOH_PIN14) | PIN_MODE_INPUT(GPIOH_PIN15)) -#define VAL_GPIOH_OTYPER (PIN_OTYPE_PUSHPULL(GPIOH_OSC_IN) | PIN_OTYPE_PUSHPULL(GPIOH_OSC_OUT) | PIN_OTYPE_PUSHPULL(GPIOH_PIN2) | PIN_OTYPE_PUSHPULL(GPIOH_PIN3) | PIN_OTYPE_PUSHPULL(GPIOH_PIN4) | PIN_OTYPE_PUSHPULL(GPIOH_PIN5) | PIN_OTYPE_PUSHPULL(GPIOH_PIN6) | PIN_OTYPE_PUSHPULL(GPIOH_PIN7) | PIN_OTYPE_PUSHPULL(GPIOH_PIN8) | PIN_OTYPE_PUSHPULL(GPIOH_PIN9) | PIN_OTYPE_PUSHPULL(GPIOH_PIN10) | PIN_OTYPE_PUSHPULL(GPIOH_PIN11) | PIN_OTYPE_PUSHPULL(GPIOH_PIN12) | PIN_OTYPE_PUSHPULL(GPIOH_PIN13) | PIN_OTYPE_PUSHPULL(GPIOH_PIN14) | PIN_OTYPE_PUSHPULL(GPIOH_PIN15)) -#define VAL_GPIOH_OSPEEDR (PIN_OSPEED_HIGH(GPIOH_OSC_IN) | PIN_OSPEED_HIGH(GPIOH_OSC_OUT) | PIN_OSPEED_HIGH(GPIOH_PIN2) | PIN_OSPEED_HIGH(GPIOH_PIN3) | PIN_OSPEED_HIGH(GPIOH_PIN4) | PIN_OSPEED_HIGH(GPIOH_PIN5) | PIN_OSPEED_HIGH(GPIOH_PIN6) | PIN_OSPEED_HIGH(GPIOH_PIN7) | PIN_OSPEED_HIGH(GPIOH_PIN8) | PIN_OSPEED_HIGH(GPIOH_PIN9) | PIN_OSPEED_HIGH(GPIOH_PIN10) | PIN_OSPEED_HIGH(GPIOH_PIN11) | PIN_OSPEED_HIGH(GPIOH_PIN12) | PIN_OSPEED_HIGH(GPIOH_PIN13) | PIN_OSPEED_HIGH(GPIOH_PIN14) | PIN_OSPEED_HIGH(GPIOH_PIN15)) -#define VAL_GPIOH_PUPDR (PIN_PUPDR_FLOATING(GPIOH_OSC_IN) | PIN_PUPDR_FLOATING(GPIOH_OSC_OUT) | PIN_PUPDR_PULLUP(GPIOH_PIN2) | PIN_PUPDR_PULLUP(GPIOH_PIN3) | PIN_PUPDR_PULLUP(GPIOH_PIN4) | PIN_PUPDR_PULLUP(GPIOH_PIN5) | PIN_PUPDR_PULLUP(GPIOH_PIN6) | PIN_PUPDR_PULLUP(GPIOH_PIN7) | PIN_PUPDR_PULLUP(GPIOH_PIN8) | PIN_PUPDR_PULLUP(GPIOH_PIN9) | PIN_PUPDR_PULLUP(GPIOH_PIN10) | PIN_PUPDR_PULLUP(GPIOH_PIN11) | PIN_PUPDR_PULLUP(GPIOH_PIN12) | PIN_PUPDR_PULLUP(GPIOH_PIN13) | PIN_PUPDR_PULLUP(GPIOH_PIN14) | PIN_PUPDR_PULLUP(GPIOH_PIN15)) -#define VAL_GPIOH_ODR (PIN_ODR_HIGH(GPIOH_OSC_IN) | PIN_ODR_HIGH(GPIOH_OSC_OUT) | PIN_ODR_HIGH(GPIOH_PIN2) | PIN_ODR_HIGH(GPIOH_PIN3) | PIN_ODR_HIGH(GPIOH_PIN4) | PIN_ODR_HIGH(GPIOH_PIN5) | PIN_ODR_HIGH(GPIOH_PIN6) | PIN_ODR_HIGH(GPIOH_PIN7) | PIN_ODR_HIGH(GPIOH_PIN8) | PIN_ODR_HIGH(GPIOH_PIN9) | PIN_ODR_HIGH(GPIOH_PIN10) | PIN_ODR_HIGH(GPIOH_PIN11) | PIN_ODR_HIGH(GPIOH_PIN12) | PIN_ODR_HIGH(GPIOH_PIN13) | PIN_ODR_HIGH(GPIOH_PIN14) | PIN_ODR_HIGH(GPIOH_PIN15)) -#define VAL_GPIOH_AFRL (PIN_AFIO_AF(GPIOH_OSC_IN, 0U) | PIN_AFIO_AF(GPIOH_OSC_OUT, 0U) | PIN_AFIO_AF(GPIOH_PIN2, 0U) | PIN_AFIO_AF(GPIOH_PIN3, 0U) | PIN_AFIO_AF(GPIOH_PIN4, 0U) | PIN_AFIO_AF(GPIOH_PIN5, 0U) | PIN_AFIO_AF(GPIOH_PIN6, 0U) | PIN_AFIO_AF(GPIOH_PIN7, 0U)) -#define VAL_GPIOH_AFRH (PIN_AFIO_AF(GPIOH_PIN8, 0U) | PIN_AFIO_AF(GPIOH_PIN9, 0U) | PIN_AFIO_AF(GPIOH_PIN10, 0U) | PIN_AFIO_AF(GPIOH_PIN11, 0U) | PIN_AFIO_AF(GPIOH_PIN12, 0U) | PIN_AFIO_AF(GPIOH_PIN13, 0U) | PIN_AFIO_AF(GPIOH_PIN14, 0U) | PIN_AFIO_AF(GPIOH_PIN15, 0U)) - -/* - * GPIOI setup: - * - * PI0 - PIN0 (input pullup). - * PI1 - PIN1 (input pullup). - * PI2 - PIN2 (input pullup). - * PI3 - PIN3 (input pullup). - * PI4 - PIN4 (input pullup). - * PI5 - PIN5 (input pullup). - * PI6 - PIN6 (input pullup). - * PI7 - PIN7 (input pullup). - * PI8 - PIN8 (input pullup). - * PI9 - PIN9 (input pullup). - * PI10 - PIN10 (input pullup). - * PI11 - PIN11 (input pullup). - * PI12 - PIN12 (input pullup). - * PI13 - PIN13 (input pullup). - * PI14 - PIN14 (input pullup). - * PI15 - PIN15 (input pullup). - */ -#define VAL_GPIOI_MODER (PIN_MODE_INPUT(GPIOI_PIN0) | PIN_MODE_INPUT(GPIOI_PIN1) | PIN_MODE_INPUT(GPIOI_PIN2) | PIN_MODE_INPUT(GPIOI_PIN3) | PIN_MODE_INPUT(GPIOI_PIN4) | PIN_MODE_INPUT(GPIOI_PIN5) | PIN_MODE_INPUT(GPIOI_PIN6) | PIN_MODE_INPUT(GPIOI_PIN7) | PIN_MODE_INPUT(GPIOI_PIN8) | PIN_MODE_INPUT(GPIOI_PIN9) | PIN_MODE_INPUT(GPIOI_PIN10) | PIN_MODE_INPUT(GPIOI_PIN11) | PIN_MODE_INPUT(GPIOI_PIN12) | PIN_MODE_INPUT(GPIOI_PIN13) | PIN_MODE_INPUT(GPIOI_PIN14) | PIN_MODE_INPUT(GPIOI_PIN15)) -#define VAL_GPIOI_OTYPER (PIN_OTYPE_PUSHPULL(GPIOI_PIN0) | PIN_OTYPE_PUSHPULL(GPIOI_PIN1) | PIN_OTYPE_PUSHPULL(GPIOI_PIN2) | PIN_OTYPE_PUSHPULL(GPIOI_PIN3) | PIN_OTYPE_PUSHPULL(GPIOI_PIN4) | PIN_OTYPE_PUSHPULL(GPIOI_PIN5) | PIN_OTYPE_PUSHPULL(GPIOI_PIN6) | PIN_OTYPE_PUSHPULL(GPIOI_PIN7) | PIN_OTYPE_PUSHPULL(GPIOI_PIN8) | PIN_OTYPE_PUSHPULL(GPIOI_PIN9) | PIN_OTYPE_PUSHPULL(GPIOI_PIN10) | PIN_OTYPE_PUSHPULL(GPIOI_PIN11) | PIN_OTYPE_PUSHPULL(GPIOI_PIN12) | PIN_OTYPE_PUSHPULL(GPIOI_PIN13) | PIN_OTYPE_PUSHPULL(GPIOI_PIN14) | PIN_OTYPE_PUSHPULL(GPIOI_PIN15)) -#define VAL_GPIOI_OSPEEDR (PIN_OSPEED_HIGH(GPIOI_PIN0) | PIN_OSPEED_HIGH(GPIOI_PIN1) | PIN_OSPEED_HIGH(GPIOI_PIN2) | PIN_OSPEED_HIGH(GPIOI_PIN3) | PIN_OSPEED_HIGH(GPIOI_PIN4) | PIN_OSPEED_HIGH(GPIOI_PIN5) | PIN_OSPEED_HIGH(GPIOI_PIN6) | PIN_OSPEED_HIGH(GPIOI_PIN7) | PIN_OSPEED_HIGH(GPIOI_PIN8) | PIN_OSPEED_HIGH(GPIOI_PIN9) | PIN_OSPEED_HIGH(GPIOI_PIN10) | PIN_OSPEED_HIGH(GPIOI_PIN11) | PIN_OSPEED_HIGH(GPIOI_PIN12) | PIN_OSPEED_HIGH(GPIOI_PIN13) | PIN_OSPEED_HIGH(GPIOI_PIN14) | PIN_OSPEED_HIGH(GPIOI_PIN15)) -#define VAL_GPIOI_PUPDR (PIN_PUPDR_PULLUP(GPIOI_PIN0) | PIN_PUPDR_PULLUP(GPIOI_PIN1) | PIN_PUPDR_PULLUP(GPIOI_PIN2) | PIN_PUPDR_PULLUP(GPIOI_PIN3) | PIN_PUPDR_PULLUP(GPIOI_PIN4) | PIN_PUPDR_PULLUP(GPIOI_PIN5) | PIN_PUPDR_PULLUP(GPIOI_PIN6) | PIN_PUPDR_PULLUP(GPIOI_PIN7) | PIN_PUPDR_PULLUP(GPIOI_PIN8) | PIN_PUPDR_PULLUP(GPIOI_PIN9) | PIN_PUPDR_PULLUP(GPIOI_PIN10) | PIN_PUPDR_PULLUP(GPIOI_PIN11) | PIN_PUPDR_PULLUP(GPIOI_PIN12) | PIN_PUPDR_PULLUP(GPIOI_PIN13) | PIN_PUPDR_PULLUP(GPIOI_PIN14) | PIN_PUPDR_PULLUP(GPIOI_PIN15)) -#define VAL_GPIOI_ODR (PIN_ODR_HIGH(GPIOI_PIN0) | PIN_ODR_HIGH(GPIOI_PIN1) | PIN_ODR_HIGH(GPIOI_PIN2) | PIN_ODR_HIGH(GPIOI_PIN3) | PIN_ODR_HIGH(GPIOI_PIN4) | PIN_ODR_HIGH(GPIOI_PIN5) | PIN_ODR_HIGH(GPIOI_PIN6) | PIN_ODR_HIGH(GPIOI_PIN7) | PIN_ODR_HIGH(GPIOI_PIN8) | PIN_ODR_HIGH(GPIOI_PIN9) | PIN_ODR_HIGH(GPIOI_PIN10) | PIN_ODR_HIGH(GPIOI_PIN11) | PIN_ODR_HIGH(GPIOI_PIN12) | PIN_ODR_HIGH(GPIOI_PIN13) | PIN_ODR_HIGH(GPIOI_PIN14) | PIN_ODR_HIGH(GPIOI_PIN15)) -#define VAL_GPIOI_AFRL (PIN_AFIO_AF(GPIOI_PIN0, 0U) | PIN_AFIO_AF(GPIOI_PIN1, 0U) | PIN_AFIO_AF(GPIOI_PIN2, 0U) | PIN_AFIO_AF(GPIOI_PIN3, 0U) | PIN_AFIO_AF(GPIOI_PIN4, 0U) | PIN_AFIO_AF(GPIOI_PIN5, 0U) | PIN_AFIO_AF(GPIOI_PIN6, 0U) | PIN_AFIO_AF(GPIOI_PIN7, 0U)) -#define VAL_GPIOI_AFRH (PIN_AFIO_AF(GPIOI_PIN8, 0U) | PIN_AFIO_AF(GPIOI_PIN9, 0U) | PIN_AFIO_AF(GPIOI_PIN10, 0U) | PIN_AFIO_AF(GPIOI_PIN11, 0U) | PIN_AFIO_AF(GPIOI_PIN12, 0U) | PIN_AFIO_AF(GPIOI_PIN13, 0U) | PIN_AFIO_AF(GPIOI_PIN14, 0U) | PIN_AFIO_AF(GPIOI_PIN15, 0U)) - -/*===========================================================================*/ -/* External declarations. */ -/*===========================================================================*/ - -#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/BLACKPILL_STM32_F401/cfg/board.chcfg b/drivers/boards/BLACKPILL_STM32_F401/cfg/board.chcfg deleted file mode 100644 index 7559ceb938f5..000000000000 --- a/drivers/boards/BLACKPILL_STM32_F401/cfg/board.chcfg +++ /dev/null @@ -1,1193 +0,0 @@ - - - - - resources/gencfg/processors/boards/stm32f4xx/templates - .. - 5.0.x - - STMicroelectronics STM32F401C-Discovery - ST_STM32F401C_DISCOVERY - - STM32F401xC - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/drivers/boards/BLACKPILL_STM32_F401/cfg/board.fmpp b/drivers/boards/BLACKPILL_STM32_F401/cfg/board.fmpp deleted file mode 100644 index 41754c1414a9..000000000000 --- a/drivers/boards/BLACKPILL_STM32_F401/cfg/board.fmpp +++ /dev/null @@ -1,15 +0,0 @@ -sourceRoot: ../../../../../tools/ftl/processors/boards/stm32f4xx/templates -outputRoot: .. -dataRoot: . - -freemarkerLinks: { - lib: ../../../../../tools/ftl/libs -} - -data : { - doc1:xml ( - board.chcfg - { - } - ) -} diff --git a/drivers/boards/BLACKPILL_STM32_F411/board.c b/drivers/boards/BLACKPILL_STM32_F411/board.c deleted file mode 100644 index 330e06c8aa8e..000000000000 --- a/drivers/boards/BLACKPILL_STM32_F411/board.c +++ /dev/null @@ -1,250 +0,0 @@ -/* - 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. - 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" -#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; - -/** - * @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 - {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_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 -} - -/*===========================================================================*/ -/* Driver interrupt handlers. */ -/*===========================================================================*/ - -/*===========================================================================*/ -/* Driver exported functions. */ -/*===========================================================================*/ - -__attribute__((weak)) void enter_bootloader_mode_if_requested(void) {} - -/** - * @brief Early initialization code. - * @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. - */ -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/BLACKPILL_STM32_F411/board.h b/drivers/boards/BLACKPILL_STM32_F411/board.h deleted file mode 100644 index c0613b4a711f..000000000000 --- a/drivers/boards/BLACKPILL_STM32_F411/board.h +++ /dev/null @@ -1,583 +0,0 @@ -/* - 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. - 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 - -/*===========================================================================*/ -/* Driver constants. */ -/*===========================================================================*/ - -/* - * Setup for STM32F411CEU6 black pill board. - */ - -/* - * Board identifier. - */ -#define BOARD_BLACKPILL_STM32_F411 -#define BOARD_NAME "STM32F411CEU6 blackpill" - -/* - * Allow Board to boot USB without extra A9 hardware/software config - */ -#define BOARD_OTG_NOVBUSSENS 1 - -/* - * Board oscillators-related settings. - */ -#if !defined(STM32_LSECLK) -# define STM32_LSECLK 32768U -#endif - -#if !defined(STM32_HSECLK) -# define STM32_HSECLK 25000000U -#endif - -//#define STM32_HSE_BYPASS - -/* - * Board voltages. - * Required for performance limits calculation. - */ -#define STM32_VDD 300U - -/* - * MCU type as defined in the ST header. - */ -#define STM32F411xE - -/* - * IO pins assignments. - */ -#define GPIOA_ARD_A0 0U -#define GPIOA_ADC1_IN0 0U -#define GPIOA_ARD_A1 1U -#define GPIOA_ADC1_IN1 1U -#define GPIOA_ARD_D1 2U -#define GPIOA_USART2_TX 2U -#define GPIOA_ARD_D0 3U -#define GPIOA_USART2_RX 3U -#define GPIOA_ARD_A2 4U -#define GPIOA_ADC1_IN4 4U -#define GPIOA_LED_GREEN 5U -#define GPIOA_ARD_D13 5U -#define GPIOA_ARD_D12 6U -#define GPIOA_ARD_D11 7U -#define GPIOA_ARD_D7 8U -#define GPIOA_ARD_D8 9U -#define GPIOA_ARD_D2 10U -#define GPIOA_OTG_FS_DM 11U -#define GPIOA_OTG_FS_DP 12U -#define GPIOA_SWDIO 13U -#define GPIOA_SWCLK 14U -#define GPIOA_PIN15 15U - -#define GPIOB_ARD_A3 0U -#define GPIOB_ADC1_IN8 0U -#define GPIOB_PIN1 1U -#define GPIOB_PIN2 2U -#define GPIOB_SWO 3U -#define GPIOB_ARD_D3 3U -#define GPIOB_ARD_D5 4U -#define GPIOB_ARD_D4 5U -#define GPIOB_ARD_D10 6U -#define GPIOB_PIN7 7U -#define GPIOB_ARD_D15 8U -#define GPIOB_ARD_D14 9U -#define GPIOB_ARD_D6 10U -#define GPIOB_PIN11 11U -#define GPIOB_PIN12 12U -#define GPIOB_PIN13 13U -#define GPIOB_PIN14 14U -#define GPIOB_PIN15 15U - -#define GPIOC_ARD_A5 0U -#define GPIOC_ADC1_IN10 0U -#define GPIOC_ARD_A4 1U -#define GPIOC_ADC1_IN11 1U -#define GPIOC_PIN2 2U -#define GPIOC_PIN3 3U -#define GPIOC_PIN4 4U -#define GPIOC_PIN5 5U -#define GPIOC_PIN6 6U -#define GPIOC_ARD_D9 7U -#define GPIOC_PIN8 8U -#define GPIOC_PIN9 9U -#define GPIOC_PIN10 10U -#define GPIOC_PIN11 11U -#define GPIOC_PIN12 12U -#define GPIOC_BUTTON 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_PIN0 0U -#define GPIOF_PIN1 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 GPIOG_PIN0 0U -#define GPIOG_PIN1 1U -#define GPIOG_PIN2 2U -#define GPIOG_PIN3 3U -#define GPIOG_PIN4 4U -#define GPIOG_PIN5 5U -#define GPIOG_PIN6 6U -#define GPIOG_PIN7 7U -#define GPIOG_PIN8 8U -#define GPIOG_PIN9 9U -#define GPIOG_PIN10 10U -#define GPIOG_PIN11 11U -#define GPIOG_PIN12 12U -#define GPIOG_PIN13 13U -#define GPIOG_PIN14 14U -#define GPIOG_PIN15 15U - -#define GPIOH_OSC_IN 0U -#define GPIOH_OSC_OUT 1U -#define GPIOH_PIN2 2U -#define GPIOH_PIN3 3U -#define GPIOH_PIN4 4U -#define GPIOH_PIN5 5U -#define GPIOH_PIN6 6U -#define GPIOH_PIN7 7U -#define GPIOH_PIN8 8U -#define GPIOH_PIN9 9U -#define GPIOH_PIN10 10U -#define GPIOH_PIN11 11U -#define GPIOH_PIN12 12U -#define GPIOH_PIN13 13U -#define GPIOH_PIN14 14U -#define GPIOH_PIN15 15U - -#define GPIOI_PIN0 0U -#define GPIOI_PIN1 1U -#define GPIOI_PIN2 2U -#define GPIOI_PIN3 3U -#define GPIOI_PIN4 4U -#define GPIOI_PIN5 5U -#define GPIOI_PIN6 6U -#define GPIOI_PIN7 7U -#define GPIOI_PIN8 8U -#define GPIOI_PIN9 9U -#define GPIOI_PIN10 10U -#define GPIOI_PIN11 11U -#define GPIOI_PIN12 12U -#define GPIOI_PIN13 13U -#define GPIOI_PIN14 14U -#define GPIOI_PIN15 15U - -/* - * IO lines assignments. - */ -#define LINE_ARD_A0 PAL_LINE(GPIOA, 0U) -#define LINE_ADC1_IN0 PAL_LINE(GPIOA, 0U) -#define LINE_ARD_A1 PAL_LINE(GPIOA, 1U) -#define LINE_ADC1_IN1 PAL_LINE(GPIOA, 1U) -#define LINE_ARD_D1 PAL_LINE(GPIOA, 2U) -#define LINE_USART2_TX PAL_LINE(GPIOA, 2U) -#define LINE_ARD_D0 PAL_LINE(GPIOA, 3U) -#define LINE_USART2_RX PAL_LINE(GPIOA, 3U) -#define LINE_ARD_A2 PAL_LINE(GPIOA, 4U) -#define LINE_ADC1_IN4 PAL_LINE(GPIOA, 4U) -#define LINE_LED_GREEN PAL_LINE(GPIOA, 5U) -#define LINE_ARD_D13 PAL_LINE(GPIOA, 5U) -#define LINE_ARD_D12 PAL_LINE(GPIOA, 6U) -#define LINE_ARD_D11 PAL_LINE(GPIOA, 7U) -#define LINE_ARD_D7 PAL_LINE(GPIOA, 8U) -#define LINE_ARD_D8 PAL_LINE(GPIOA, 9U) -#define LINE_ARD_D2 PAL_LINE(GPIOA, 10U) -#define LINE_OTG_FS_DM PAL_LINE(GPIOA, 11U) -#define LINE_OTG_FS_DP PAL_LINE(GPIOA, 12U) -#define LINE_SWDIO PAL_LINE(GPIOA, 13U) -#define LINE_SWCLK PAL_LINE(GPIOA, 14U) -#define LINE_ARD_A3 PAL_LINE(GPIOB, 0U) -#define LINE_ADC1_IN8 PAL_LINE(GPIOB, 0U) -#define LINE_SWO PAL_LINE(GPIOB, 3U) -#define LINE_ARD_D3 PAL_LINE(GPIOB, 3U) -#define LINE_ARD_D5 PAL_LINE(GPIOB, 4U) -#define LINE_ARD_D4 PAL_LINE(GPIOB, 5U) -#define LINE_ARD_D10 PAL_LINE(GPIOB, 6U) -#define LINE_ARD_D15 PAL_LINE(GPIOB, 8U) -#define LINE_ARD_D14 PAL_LINE(GPIOB, 9U) -#define LINE_ARD_D6 PAL_LINE(GPIOB, 10U) -#define LINE_ARD_A5 PAL_LINE(GPIOC, 0U) -#define LINE_ADC1_IN10 PAL_LINE(GPIOC, 0U) -#define LINE_ARD_A4 PAL_LINE(GPIOC, 1U) -#define LINE_ADC1_IN11 PAL_LINE(GPIOC, 1U) -#define LINE_ARD_D9 PAL_LINE(GPIOC, 7U) -#define LINE_BUTTON PAL_LINE(GPIOC, 13U) -#define LINE_OSC32_IN PAL_LINE(GPIOC, 14U) -#define LINE_OSC32_OUT PAL_LINE(GPIOC, 15U) -#define LINE_OSC_IN PAL_LINE(GPIOH, 0U) -#define LINE_OSC_OUT PAL_LINE(GPIOH, 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. - * 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 - ARD_A0 ADC1_IN0 (input pullup). - * PA1 - ARD_A1 ADC1_IN1 (input pullup). - * PA2 - ARD_D1 USART2_TX (alternate 7). - * PA3 - ARD_D0 USART2_RX (alternate 7). - * PA4 - ARD_A2 ADC1_IN4 (input pullup). - * PA5 - LED_GREEN ARD_D13 (output pushpull high). - * PA6 - ARD_D12 (input pullup). - * PA7 - ARD_D11 (input pullup). - * PA8 - ARD_D7 (input pullup). - * PA9 - ARD_D8 (input pullup). - * PA10 - ARD_D2 (input pullup). - * PA11 - OTG_FS_DM (alternate 10). - * PA12 - OTG_FS_DP (alternate 10). - * PA13 - SWDIO (alternate 0). - * PA14 - SWCLK (alternate 0). - * PA15 - PIN15 (input pullup). - */ -#define VAL_GPIOA_MODER (PIN_MODE_INPUT(GPIOA_ARD_A0) | PIN_MODE_INPUT(GPIOA_ARD_A1) | PIN_MODE_ALTERNATE(GPIOA_ARD_D1) | PIN_MODE_ALTERNATE(GPIOA_ARD_D0) | PIN_MODE_INPUT(GPIOA_ARD_A2) | PIN_MODE_OUTPUT(GPIOA_LED_GREEN) | PIN_MODE_INPUT(GPIOA_ARD_D12) | PIN_MODE_INPUT(GPIOA_ARD_D11) | PIN_MODE_INPUT(GPIOA_ARD_D7) | PIN_MODE_INPUT(GPIOA_ARD_D8) | PIN_MODE_INPUT(GPIOA_ARD_D2) | PIN_MODE_ALTERNATE(GPIOA_OTG_FS_DM) | PIN_MODE_ALTERNATE(GPIOA_OTG_FS_DP) | PIN_MODE_ALTERNATE(GPIOA_SWDIO) | PIN_MODE_ALTERNATE(GPIOA_SWCLK) | PIN_MODE_INPUT(GPIOA_PIN15)) -#define VAL_GPIOA_OTYPER (PIN_OTYPE_PUSHPULL(GPIOA_ARD_A0) | PIN_OTYPE_PUSHPULL(GPIOA_ARD_A1) | PIN_OTYPE_PUSHPULL(GPIOA_ARD_D1) | PIN_OTYPE_PUSHPULL(GPIOA_ARD_D0) | PIN_OTYPE_PUSHPULL(GPIOA_ARD_A2) | PIN_OTYPE_PUSHPULL(GPIOA_LED_GREEN) | PIN_OTYPE_PUSHPULL(GPIOA_ARD_D12) | PIN_OTYPE_PUSHPULL(GPIOA_ARD_D11) | PIN_OTYPE_PUSHPULL(GPIOA_ARD_D7) | PIN_OTYPE_PUSHPULL(GPIOA_ARD_D8) | PIN_OTYPE_PUSHPULL(GPIOA_ARD_D2) | PIN_OTYPE_PUSHPULL(GPIOA_OTG_FS_DM) | PIN_OTYPE_PUSHPULL(GPIOA_OTG_FS_DP) | PIN_OTYPE_PUSHPULL(GPIOA_SWDIO) | PIN_OTYPE_PUSHPULL(GPIOA_SWCLK) | PIN_OTYPE_PUSHPULL(GPIOA_PIN15)) -#define VAL_GPIOA_OSPEEDR (PIN_OSPEED_HIGH(GPIOA_ARD_A0) | PIN_OSPEED_HIGH(GPIOA_ARD_A1) | PIN_OSPEED_MEDIUM(GPIOA_ARD_D1) | PIN_OSPEED_MEDIUM(GPIOA_ARD_D0) | PIN_OSPEED_HIGH(GPIOA_ARD_A2) | PIN_OSPEED_MEDIUM(GPIOA_LED_GREEN) | PIN_OSPEED_HIGH(GPIOA_ARD_D12) | PIN_OSPEED_HIGH(GPIOA_ARD_D11) | PIN_OSPEED_HIGH(GPIOA_ARD_D7) | PIN_OSPEED_HIGH(GPIOA_ARD_D8) | PIN_OSPEED_HIGH(GPIOA_ARD_D2) | PIN_OSPEED_HIGH(GPIOA_OTG_FS_DM) | PIN_OSPEED_HIGH(GPIOA_OTG_FS_DP) | PIN_OSPEED_HIGH(GPIOA_SWDIO) | PIN_OSPEED_HIGH(GPIOA_SWCLK) | PIN_OSPEED_HIGH(GPIOA_PIN15)) -#define VAL_GPIOA_PUPDR (PIN_PUPDR_PULLUP(GPIOA_ARD_A0) | PIN_PUPDR_PULLUP(GPIOA_ARD_A1) | PIN_PUPDR_FLOATING(GPIOA_ARD_D1) | PIN_PUPDR_FLOATING(GPIOA_ARD_D0) | PIN_PUPDR_PULLUP(GPIOA_ARD_A2) | PIN_PUPDR_FLOATING(GPIOA_LED_GREEN) | PIN_PUPDR_PULLUP(GPIOA_ARD_D12) | PIN_PUPDR_PULLUP(GPIOA_ARD_D11) | PIN_PUPDR_PULLUP(GPIOA_ARD_D7) | PIN_PUPDR_PULLUP(GPIOA_ARD_D8) | PIN_PUPDR_PULLUP(GPIOA_ARD_D2) | PIN_PUPDR_FLOATING(GPIOA_OTG_FS_DM) | PIN_PUPDR_FLOATING(GPIOA_OTG_FS_DP) | PIN_PUPDR_PULLUP(GPIOA_SWDIO) | PIN_PUPDR_PULLDOWN(GPIOA_SWCLK) | PIN_PUPDR_PULLUP(GPIOA_PIN15)) -#define VAL_GPIOA_ODR (PIN_ODR_HIGH(GPIOA_ARD_A0) | PIN_ODR_HIGH(GPIOA_ARD_A1) | PIN_ODR_HIGH(GPIOA_ARD_D1) | PIN_ODR_HIGH(GPIOA_ARD_D0) | PIN_ODR_HIGH(GPIOA_ARD_A2) | PIN_ODR_LOW(GPIOA_LED_GREEN) | PIN_ODR_HIGH(GPIOA_ARD_D12) | PIN_ODR_HIGH(GPIOA_ARD_D11) | PIN_ODR_HIGH(GPIOA_ARD_D7) | PIN_ODR_HIGH(GPIOA_ARD_D8) | PIN_ODR_HIGH(GPIOA_ARD_D2) | PIN_ODR_HIGH(GPIOA_OTG_FS_DM) | PIN_ODR_HIGH(GPIOA_OTG_FS_DP) | PIN_ODR_HIGH(GPIOA_SWDIO) | PIN_ODR_HIGH(GPIOA_SWCLK) | PIN_ODR_HIGH(GPIOA_PIN15)) -#define VAL_GPIOA_AFRL (PIN_AFIO_AF(GPIOA_ARD_A0, 0U) | PIN_AFIO_AF(GPIOA_ARD_A1, 0U) | PIN_AFIO_AF(GPIOA_ARD_D1, 7U) | PIN_AFIO_AF(GPIOA_ARD_D0, 7U) | PIN_AFIO_AF(GPIOA_ARD_A2, 0U) | PIN_AFIO_AF(GPIOA_LED_GREEN, 0U) | PIN_AFIO_AF(GPIOA_ARD_D12, 0U) | PIN_AFIO_AF(GPIOA_ARD_D11, 0U)) -#define VAL_GPIOA_AFRH (PIN_AFIO_AF(GPIOA_ARD_D7, 0U) | PIN_AFIO_AF(GPIOA_ARD_D8, 0U) | PIN_AFIO_AF(GPIOA_ARD_D2, 0U) | PIN_AFIO_AF(GPIOA_OTG_FS_DM, 10U) | PIN_AFIO_AF(GPIOA_OTG_FS_DP, 10U) | PIN_AFIO_AF(GPIOA_SWDIO, 0U) | PIN_AFIO_AF(GPIOA_SWCLK, 0U) | PIN_AFIO_AF(GPIOA_PIN15, 0U)) - -/* - * GPIOB setup: - * - * PB0 - ARD_A3 ADC1_IN8 (input pullup). - * PB1 - PIN1 (input pullup). - * PB2 - PIN2 (input pullup). - * PB3 - SWO ARD_D3 (alternate 0). - * PB4 - ARD_D5 (input pullup). - * PB5 - ARD_D4 (input pullup). - * PB6 - ARD_D10 (input pullup). - * PB7 - PIN7 (input pullup). - * PB8 - ARD_D15 (input pullup). - * PB9 - ARD_D14 (input pullup). - * PB10 - ARD_D6 (input pullup). - * PB11 - PIN11 (input pullup). - * PB12 - PIN12 (input pullup). - * PB13 - PIN13 (input pullup). - * PB14 - PIN14 (input pullup). - * PB15 - PIN15 (input pullup). - */ -#define VAL_GPIOB_MODER (PIN_MODE_INPUT(GPIOB_ARD_A3) | PIN_MODE_INPUT(GPIOB_PIN1) | PIN_MODE_INPUT(GPIOB_PIN2) | PIN_MODE_ALTERNATE(GPIOB_SWO) | PIN_MODE_INPUT(GPIOB_ARD_D5) | PIN_MODE_INPUT(GPIOB_ARD_D4) | PIN_MODE_INPUT(GPIOB_ARD_D10) | PIN_MODE_INPUT(GPIOB_PIN7) | PIN_MODE_INPUT(GPIOB_ARD_D15) | PIN_MODE_INPUT(GPIOB_ARD_D14) | PIN_MODE_INPUT(GPIOB_ARD_D6) | PIN_MODE_INPUT(GPIOB_PIN11) | PIN_MODE_INPUT(GPIOB_PIN12) | PIN_MODE_INPUT(GPIOB_PIN13) | PIN_MODE_INPUT(GPIOB_PIN14) | PIN_MODE_INPUT(GPIOB_PIN15)) -#define VAL_GPIOB_OTYPER (PIN_OTYPE_PUSHPULL(GPIOB_ARD_A3) | PIN_OTYPE_PUSHPULL(GPIOB_PIN1) | PIN_OTYPE_PUSHPULL(GPIOB_PIN2) | PIN_OTYPE_PUSHPULL(GPIOB_SWO) | PIN_OTYPE_PUSHPULL(GPIOB_ARD_D5) | PIN_OTYPE_PUSHPULL(GPIOB_ARD_D4) | PIN_OTYPE_PUSHPULL(GPIOB_ARD_D10) | PIN_OTYPE_PUSHPULL(GPIOB_PIN7) | PIN_OTYPE_PUSHPULL(GPIOB_ARD_D15) | PIN_OTYPE_PUSHPULL(GPIOB_ARD_D14) | PIN_OTYPE_PUSHPULL(GPIOB_ARD_D6) | PIN_OTYPE_PUSHPULL(GPIOB_PIN11) | PIN_OTYPE_PUSHPULL(GPIOB_PIN12) | PIN_OTYPE_PUSHPULL(GPIOB_PIN13) | PIN_OTYPE_PUSHPULL(GPIOB_PIN14) | PIN_OTYPE_PUSHPULL(GPIOB_PIN15)) -#define VAL_GPIOB_OSPEEDR (PIN_OSPEED_HIGH(GPIOB_ARD_A3) | PIN_OSPEED_HIGH(GPIOB_PIN1) | PIN_OSPEED_HIGH(GPIOB_PIN2) | PIN_OSPEED_HIGH(GPIOB_SWO) | PIN_OSPEED_HIGH(GPIOB_ARD_D5) | PIN_OSPEED_HIGH(GPIOB_ARD_D4) | PIN_OSPEED_HIGH(GPIOB_ARD_D10) | PIN_OSPEED_HIGH(GPIOB_PIN7) | PIN_OSPEED_HIGH(GPIOB_ARD_D15) | PIN_OSPEED_HIGH(GPIOB_ARD_D14) | PIN_OSPEED_HIGH(GPIOB_ARD_D6) | PIN_OSPEED_HIGH(GPIOB_PIN11) | PIN_OSPEED_HIGH(GPIOB_PIN12) | PIN_OSPEED_HIGH(GPIOB_PIN13) | PIN_OSPEED_HIGH(GPIOB_PIN14) | PIN_OSPEED_HIGH(GPIOB_PIN15)) -#define VAL_GPIOB_PUPDR (PIN_PUPDR_PULLUP(GPIOB_ARD_A3) | PIN_PUPDR_PULLUP(GPIOB_PIN1) | PIN_PUPDR_PULLUP(GPIOB_PIN2) | PIN_PUPDR_PULLUP(GPIOB_SWO) | PIN_PUPDR_PULLUP(GPIOB_ARD_D5) | PIN_PUPDR_PULLUP(GPIOB_ARD_D4) | PIN_PUPDR_PULLUP(GPIOB_ARD_D10) | PIN_PUPDR_PULLUP(GPIOB_PIN7) | PIN_PUPDR_PULLUP(GPIOB_ARD_D15) | PIN_PUPDR_PULLUP(GPIOB_ARD_D14) | PIN_PUPDR_PULLUP(GPIOB_ARD_D6) | PIN_PUPDR_PULLUP(GPIOB_PIN11) | PIN_PUPDR_PULLUP(GPIOB_PIN12) | PIN_PUPDR_PULLUP(GPIOB_PIN13) | PIN_PUPDR_PULLUP(GPIOB_PIN14) | PIN_PUPDR_PULLUP(GPIOB_PIN15)) -#define VAL_GPIOB_ODR (PIN_ODR_HIGH(GPIOB_ARD_A3) | PIN_ODR_HIGH(GPIOB_PIN1) | PIN_ODR_HIGH(GPIOB_PIN2) | PIN_ODR_HIGH(GPIOB_SWO) | PIN_ODR_HIGH(GPIOB_ARD_D5) | PIN_ODR_HIGH(GPIOB_ARD_D4) | PIN_ODR_HIGH(GPIOB_ARD_D10) | PIN_ODR_HIGH(GPIOB_PIN7) | PIN_ODR_HIGH(GPIOB_ARD_D15) | PIN_ODR_HIGH(GPIOB_ARD_D14) | PIN_ODR_HIGH(GPIOB_ARD_D6) | PIN_ODR_HIGH(GPIOB_PIN11) | PIN_ODR_HIGH(GPIOB_PIN12) | PIN_ODR_HIGH(GPIOB_PIN13) | PIN_ODR_HIGH(GPIOB_PIN14) | PIN_ODR_HIGH(GPIOB_PIN15)) -#define VAL_GPIOB_AFRL (PIN_AFIO_AF(GPIOB_ARD_A3, 0U) | PIN_AFIO_AF(GPIOB_PIN1, 0U) | PIN_AFIO_AF(GPIOB_PIN2, 0U) | PIN_AFIO_AF(GPIOB_SWO, 0U) | PIN_AFIO_AF(GPIOB_ARD_D5, 0U) | PIN_AFIO_AF(GPIOB_ARD_D4, 0U) | PIN_AFIO_AF(GPIOB_ARD_D10, 0U) | PIN_AFIO_AF(GPIOB_PIN7, 0U)) -#define VAL_GPIOB_AFRH (PIN_AFIO_AF(GPIOB_ARD_D15, 0U) | PIN_AFIO_AF(GPIOB_ARD_D14, 0U) | PIN_AFIO_AF(GPIOB_ARD_D6, 0U) | PIN_AFIO_AF(GPIOB_PIN11, 0U) | PIN_AFIO_AF(GPIOB_PIN12, 0U) | PIN_AFIO_AF(GPIOB_PIN13, 0U) | PIN_AFIO_AF(GPIOB_PIN14, 0U) | PIN_AFIO_AF(GPIOB_PIN15, 0U)) - -/* - * GPIOC setup: - * - * PC0 - ARD_A5 ADC1_IN10 (input pullup). - * PC1 - ARD_A4 ADC1_IN11 (input pullup). - * PC2 - PIN2 (input pullup). - * PC3 - PIN3 (input pullup). - * PC4 - PIN4 (input pullup). - * PC5 - PIN5 (input pullup). - * PC6 - PIN6 (input pullup). - * PC7 - ARD_D9 (input pullup). - * PC8 - PIN8 (input pullup). - * PC9 - PIN9 (input pullup). - * PC10 - PIN10 (input pullup). - * PC11 - PIN11 (input pullup). - * PC12 - PIN12 (input pullup). - * PC13 - BUTTON (input floating). - * PC14 - OSC32_IN (input floating). - * PC15 - OSC32_OUT (input floating). - */ -#define VAL_GPIOC_MODER (PIN_MODE_INPUT(GPIOC_ARD_A5) | PIN_MODE_INPUT(GPIOC_ARD_A4) | PIN_MODE_INPUT(GPIOC_PIN2) | PIN_MODE_INPUT(GPIOC_PIN3) | PIN_MODE_INPUT(GPIOC_PIN4) | PIN_MODE_INPUT(GPIOC_PIN5) | PIN_MODE_INPUT(GPIOC_PIN6) | PIN_MODE_INPUT(GPIOC_ARD_D9) | PIN_MODE_INPUT(GPIOC_PIN8) | PIN_MODE_INPUT(GPIOC_PIN9) | PIN_MODE_INPUT(GPIOC_PIN10) | PIN_MODE_INPUT(GPIOC_PIN11) | PIN_MODE_INPUT(GPIOC_PIN12) | PIN_MODE_INPUT(GPIOC_BUTTON) | PIN_MODE_INPUT(GPIOC_OSC32_IN) | PIN_MODE_INPUT(GPIOC_OSC32_OUT)) -#define VAL_GPIOC_OTYPER (PIN_OTYPE_PUSHPULL(GPIOC_ARD_A5) | PIN_OTYPE_PUSHPULL(GPIOC_ARD_A4) | PIN_OTYPE_PUSHPULL(GPIOC_PIN2) | PIN_OTYPE_PUSHPULL(GPIOC_PIN3) | PIN_OTYPE_PUSHPULL(GPIOC_PIN4) | PIN_OTYPE_PUSHPULL(GPIOC_PIN5) | PIN_OTYPE_PUSHPULL(GPIOC_PIN6) | PIN_OTYPE_PUSHPULL(GPIOC_ARD_D9) | PIN_OTYPE_PUSHPULL(GPIOC_PIN8) | PIN_OTYPE_PUSHPULL(GPIOC_PIN9) | PIN_OTYPE_PUSHPULL(GPIOC_PIN10) | PIN_OTYPE_PUSHPULL(GPIOC_PIN11) | PIN_OTYPE_PUSHPULL(GPIOC_PIN12) | PIN_OTYPE_PUSHPULL(GPIOC_BUTTON) | PIN_OTYPE_PUSHPULL(GPIOC_OSC32_IN) | PIN_OTYPE_PUSHPULL(GPIOC_OSC32_OUT)) -#define VAL_GPIOC_OSPEEDR (PIN_OSPEED_HIGH(GPIOC_ARD_A5) | PIN_OSPEED_HIGH(GPIOC_ARD_A4) | PIN_OSPEED_HIGH(GPIOC_PIN2) | PIN_OSPEED_HIGH(GPIOC_PIN3) | PIN_OSPEED_HIGH(GPIOC_PIN4) | PIN_OSPEED_HIGH(GPIOC_PIN5) | PIN_OSPEED_HIGH(GPIOC_PIN6) | PIN_OSPEED_HIGH(GPIOC_ARD_D9) | PIN_OSPEED_HIGH(GPIOC_PIN8) | PIN_OSPEED_HIGH(GPIOC_PIN9) | PIN_OSPEED_HIGH(GPIOC_PIN10) | PIN_OSPEED_HIGH(GPIOC_PIN11) | PIN_OSPEED_HIGH(GPIOC_PIN12) | PIN_OSPEED_HIGH(GPIOC_BUTTON) | PIN_OSPEED_HIGH(GPIOC_OSC32_IN) | PIN_OSPEED_HIGH(GPIOC_OSC32_OUT)) -#define VAL_GPIOC_PUPDR (PIN_PUPDR_PULLUP(GPIOC_ARD_A5) | PIN_PUPDR_PULLUP(GPIOC_ARD_A4) | PIN_PUPDR_PULLUP(GPIOC_PIN2) | PIN_PUPDR_PULLUP(GPIOC_PIN3) | PIN_PUPDR_PULLUP(GPIOC_PIN4) | PIN_PUPDR_PULLUP(GPIOC_PIN5) | PIN_PUPDR_PULLUP(GPIOC_PIN6) | PIN_PUPDR_PULLUP(GPIOC_ARD_D9) | PIN_PUPDR_PULLUP(GPIOC_PIN8) | PIN_PUPDR_PULLUP(GPIOC_PIN9) | PIN_PUPDR_PULLUP(GPIOC_PIN10) | PIN_PUPDR_PULLUP(GPIOC_PIN11) | PIN_PUPDR_PULLUP(GPIOC_PIN12) | PIN_PUPDR_FLOATING(GPIOC_BUTTON) | PIN_PUPDR_FLOATING(GPIOC_OSC32_IN) | PIN_PUPDR_FLOATING(GPIOC_OSC32_OUT)) -#define VAL_GPIOC_ODR (PIN_ODR_HIGH(GPIOC_ARD_A5) | PIN_ODR_HIGH(GPIOC_ARD_A4) | PIN_ODR_HIGH(GPIOC_PIN2) | PIN_ODR_HIGH(GPIOC_PIN3) | PIN_ODR_HIGH(GPIOC_PIN4) | PIN_ODR_HIGH(GPIOC_PIN5) | PIN_ODR_HIGH(GPIOC_PIN6) | PIN_ODR_HIGH(GPIOC_ARD_D9) | PIN_ODR_HIGH(GPIOC_PIN8) | PIN_ODR_HIGH(GPIOC_PIN9) | PIN_ODR_HIGH(GPIOC_PIN10) | PIN_ODR_HIGH(GPIOC_PIN11) | PIN_ODR_HIGH(GPIOC_PIN12) | PIN_ODR_HIGH(GPIOC_BUTTON) | PIN_ODR_HIGH(GPIOC_OSC32_IN) | PIN_ODR_HIGH(GPIOC_OSC32_OUT)) -#define VAL_GPIOC_AFRL (PIN_AFIO_AF(GPIOC_ARD_A5, 0U) | PIN_AFIO_AF(GPIOC_ARD_A4, 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_PIN6, 0U) | PIN_AFIO_AF(GPIOC_ARD_D9, 0U)) -#define VAL_GPIOC_AFRH (PIN_AFIO_AF(GPIOC_PIN8, 0U) | PIN_AFIO_AF(GPIOC_PIN9, 0U) | PIN_AFIO_AF(GPIOC_PIN10, 0U) | PIN_AFIO_AF(GPIOC_PIN11, 0U) | PIN_AFIO_AF(GPIOC_PIN12, 0U) | PIN_AFIO_AF(GPIOC_BUTTON, 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_HIGH(GPIOD_PIN0) | PIN_OSPEED_HIGH(GPIOD_PIN1) | PIN_OSPEED_HIGH(GPIOD_PIN2) | PIN_OSPEED_HIGH(GPIOD_PIN3) | PIN_OSPEED_HIGH(GPIOD_PIN4) | PIN_OSPEED_HIGH(GPIOD_PIN5) | PIN_OSPEED_HIGH(GPIOD_PIN6) | PIN_OSPEED_HIGH(GPIOD_PIN7) | PIN_OSPEED_HIGH(GPIOD_PIN8) | PIN_OSPEED_HIGH(GPIOD_PIN9) | PIN_OSPEED_HIGH(GPIOD_PIN10) | PIN_OSPEED_HIGH(GPIOD_PIN11) | PIN_OSPEED_HIGH(GPIOD_PIN12) | PIN_OSPEED_HIGH(GPIOD_PIN13) | PIN_OSPEED_HIGH(GPIOD_PIN14) | PIN_OSPEED_HIGH(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_HIGH(GPIOE_PIN0) | PIN_OSPEED_HIGH(GPIOE_PIN1) | PIN_OSPEED_HIGH(GPIOE_PIN2) | PIN_OSPEED_HIGH(GPIOE_PIN3) | PIN_OSPEED_HIGH(GPIOE_PIN4) | PIN_OSPEED_HIGH(GPIOE_PIN5) | PIN_OSPEED_HIGH(GPIOE_PIN6) | PIN_OSPEED_HIGH(GPIOE_PIN7) | PIN_OSPEED_HIGH(GPIOE_PIN8) | PIN_OSPEED_HIGH(GPIOE_PIN9) | PIN_OSPEED_HIGH(GPIOE_PIN10) | PIN_OSPEED_HIGH(GPIOE_PIN11) | PIN_OSPEED_HIGH(GPIOE_PIN12) | PIN_OSPEED_HIGH(GPIOE_PIN13) | PIN_OSPEED_HIGH(GPIOE_PIN14) | PIN_OSPEED_HIGH(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 - PIN0 (input pullup). - * PF1 - PIN1 (input pullup). - * 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_PIN0) | PIN_MODE_INPUT(GPIOF_PIN1) | 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_PIN0) | PIN_OTYPE_PUSHPULL(GPIOF_PIN1) | 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_HIGH(GPIOF_PIN0) | PIN_OSPEED_HIGH(GPIOF_PIN1) | PIN_OSPEED_HIGH(GPIOF_PIN2) | PIN_OSPEED_HIGH(GPIOF_PIN3) | PIN_OSPEED_HIGH(GPIOF_PIN4) | PIN_OSPEED_HIGH(GPIOF_PIN5) | PIN_OSPEED_HIGH(GPIOF_PIN6) | PIN_OSPEED_HIGH(GPIOF_PIN7) | PIN_OSPEED_HIGH(GPIOF_PIN8) | PIN_OSPEED_HIGH(GPIOF_PIN9) | PIN_OSPEED_HIGH(GPIOF_PIN10) | PIN_OSPEED_HIGH(GPIOF_PIN11) | PIN_OSPEED_HIGH(GPIOF_PIN12) | PIN_OSPEED_HIGH(GPIOF_PIN13) | PIN_OSPEED_HIGH(GPIOF_PIN14) | PIN_OSPEED_HIGH(GPIOF_PIN15)) -#define VAL_GPIOF_PUPDR (PIN_PUPDR_PULLUP(GPIOF_PIN0) | PIN_PUPDR_PULLUP(GPIOF_PIN1) | 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_PIN0) | PIN_ODR_HIGH(GPIOF_PIN1) | 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_PIN0, 0U) | PIN_AFIO_AF(GPIOF_PIN1, 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)) - -/* - * GPIOG setup: - * - * PG0 - PIN0 (input pullup). - * PG1 - PIN1 (input pullup). - * PG2 - PIN2 (input pullup). - * PG3 - PIN3 (input pullup). - * PG4 - PIN4 (input pullup). - * PG5 - PIN5 (input pullup). - * PG6 - PIN6 (input pullup). - * PG7 - PIN7 (input pullup). - * PG8 - PIN8 (input pullup). - * PG9 - PIN9 (input pullup). - * PG10 - PIN10 (input pullup). - * PG11 - PIN11 (input pullup). - * PG12 - PIN12 (input pullup). - * PG13 - PIN13 (input pullup). - * PG14 - PIN14 (input pullup). - * PG15 - PIN15 (input pullup). - */ -#define VAL_GPIOG_MODER (PIN_MODE_INPUT(GPIOG_PIN0) | PIN_MODE_INPUT(GPIOG_PIN1) | PIN_MODE_INPUT(GPIOG_PIN2) | PIN_MODE_INPUT(GPIOG_PIN3) | PIN_MODE_INPUT(GPIOG_PIN4) | PIN_MODE_INPUT(GPIOG_PIN5) | PIN_MODE_INPUT(GPIOG_PIN6) | PIN_MODE_INPUT(GPIOG_PIN7) | PIN_MODE_INPUT(GPIOG_PIN8) | PIN_MODE_INPUT(GPIOG_PIN9) | PIN_MODE_INPUT(GPIOG_PIN10) | PIN_MODE_INPUT(GPIOG_PIN11) | PIN_MODE_INPUT(GPIOG_PIN12) | PIN_MODE_INPUT(GPIOG_PIN13) | PIN_MODE_INPUT(GPIOG_PIN14) | PIN_MODE_INPUT(GPIOG_PIN15)) -#define VAL_GPIOG_OTYPER (PIN_OTYPE_PUSHPULL(GPIOG_PIN0) | PIN_OTYPE_PUSHPULL(GPIOG_PIN1) | PIN_OTYPE_PUSHPULL(GPIOG_PIN2) | PIN_OTYPE_PUSHPULL(GPIOG_PIN3) | PIN_OTYPE_PUSHPULL(GPIOG_PIN4) | PIN_OTYPE_PUSHPULL(GPIOG_PIN5) | PIN_OTYPE_PUSHPULL(GPIOG_PIN6) | PIN_OTYPE_PUSHPULL(GPIOG_PIN7) | PIN_OTYPE_PUSHPULL(GPIOG_PIN8) | PIN_OTYPE_PUSHPULL(GPIOG_PIN9) | PIN_OTYPE_PUSHPULL(GPIOG_PIN10) | PIN_OTYPE_PUSHPULL(GPIOG_PIN11) | PIN_OTYPE_PUSHPULL(GPIOG_PIN12) | PIN_OTYPE_PUSHPULL(GPIOG_PIN13) | PIN_OTYPE_PUSHPULL(GPIOG_PIN14) | PIN_OTYPE_PUSHPULL(GPIOG_PIN15)) -#define VAL_GPIOG_OSPEEDR (PIN_OSPEED_HIGH(GPIOG_PIN0) | PIN_OSPEED_HIGH(GPIOG_PIN1) | PIN_OSPEED_HIGH(GPIOG_PIN2) | PIN_OSPEED_HIGH(GPIOG_PIN3) | PIN_OSPEED_HIGH(GPIOG_PIN4) | PIN_OSPEED_HIGH(GPIOG_PIN5) | PIN_OSPEED_HIGH(GPIOG_PIN6) | PIN_OSPEED_HIGH(GPIOG_PIN7) | PIN_OSPEED_HIGH(GPIOG_PIN8) | PIN_OSPEED_HIGH(GPIOG_PIN9) | PIN_OSPEED_HIGH(GPIOG_PIN10) | PIN_OSPEED_HIGH(GPIOG_PIN11) | PIN_OSPEED_HIGH(GPIOG_PIN12) | PIN_OSPEED_HIGH(GPIOG_PIN13) | PIN_OSPEED_HIGH(GPIOG_PIN14) | PIN_OSPEED_HIGH(GPIOG_PIN15)) -#define VAL_GPIOG_PUPDR (PIN_PUPDR_PULLUP(GPIOG_PIN0) | PIN_PUPDR_PULLUP(GPIOG_PIN1) | PIN_PUPDR_PULLUP(GPIOG_PIN2) | PIN_PUPDR_PULLUP(GPIOG_PIN3) | PIN_PUPDR_PULLUP(GPIOG_PIN4) | PIN_PUPDR_PULLUP(GPIOG_PIN5) | PIN_PUPDR_PULLUP(GPIOG_PIN6) | PIN_PUPDR_PULLUP(GPIOG_PIN7) | PIN_PUPDR_PULLUP(GPIOG_PIN8) | PIN_PUPDR_PULLUP(GPIOG_PIN9) | PIN_PUPDR_PULLUP(GPIOG_PIN10) | PIN_PUPDR_PULLUP(GPIOG_PIN11) | PIN_PUPDR_PULLUP(GPIOG_PIN12) | PIN_PUPDR_PULLUP(GPIOG_PIN13) | PIN_PUPDR_PULLUP(GPIOG_PIN14) | PIN_PUPDR_PULLUP(GPIOG_PIN15)) -#define VAL_GPIOG_ODR (PIN_ODR_HIGH(GPIOG_PIN0) | PIN_ODR_HIGH(GPIOG_PIN1) | PIN_ODR_HIGH(GPIOG_PIN2) | PIN_ODR_HIGH(GPIOG_PIN3) | PIN_ODR_HIGH(GPIOG_PIN4) | PIN_ODR_HIGH(GPIOG_PIN5) | PIN_ODR_HIGH(GPIOG_PIN6) | PIN_ODR_HIGH(GPIOG_PIN7) | PIN_ODR_HIGH(GPIOG_PIN8) | PIN_ODR_HIGH(GPIOG_PIN9) | PIN_ODR_HIGH(GPIOG_PIN10) | PIN_ODR_HIGH(GPIOG_PIN11) | PIN_ODR_HIGH(GPIOG_PIN12) | PIN_ODR_HIGH(GPIOG_PIN13) | PIN_ODR_HIGH(GPIOG_PIN14) | PIN_ODR_HIGH(GPIOG_PIN15)) -#define VAL_GPIOG_AFRL (PIN_AFIO_AF(GPIOG_PIN0, 0U) | PIN_AFIO_AF(GPIOG_PIN1, 0U) | PIN_AFIO_AF(GPIOG_PIN2, 0U) | PIN_AFIO_AF(GPIOG_PIN3, 0U) | PIN_AFIO_AF(GPIOG_PIN4, 0U) | PIN_AFIO_AF(GPIOG_PIN5, 0U) | PIN_AFIO_AF(GPIOG_PIN6, 0U) | PIN_AFIO_AF(GPIOG_PIN7, 0U)) -#define VAL_GPIOG_AFRH (PIN_AFIO_AF(GPIOG_PIN8, 0U) | PIN_AFIO_AF(GPIOG_PIN9, 0U) | PIN_AFIO_AF(GPIOG_PIN10, 0U) | PIN_AFIO_AF(GPIOG_PIN11, 0U) | PIN_AFIO_AF(GPIOG_PIN12, 0U) | PIN_AFIO_AF(GPIOG_PIN13, 0U) | PIN_AFIO_AF(GPIOG_PIN14, 0U) | PIN_AFIO_AF(GPIOG_PIN15, 0U)) - -/* - * GPIOH setup: - * - * PH0 - OSC_IN (input floating). - * PH1 - OSC_OUT (input floating). - * PH2 - PIN2 (input pullup). - * PH3 - PIN3 (input pullup). - * PH4 - PIN4 (input pullup). - * PH5 - PIN5 (input pullup). - * PH6 - PIN6 (input pullup). - * PH7 - PIN7 (input pullup). - * PH8 - PIN8 (input pullup). - * PH9 - PIN9 (input pullup). - * PH10 - PIN10 (input pullup). - * PH11 - PIN11 (input pullup). - * PH12 - PIN12 (input pullup). - * PH13 - PIN13 (input pullup). - * PH14 - PIN14 (input pullup). - * PH15 - PIN15 (input pullup). - */ -#define VAL_GPIOH_MODER (PIN_MODE_INPUT(GPIOH_OSC_IN) | PIN_MODE_INPUT(GPIOH_OSC_OUT) | PIN_MODE_INPUT(GPIOH_PIN2) | PIN_MODE_INPUT(GPIOH_PIN3) | PIN_MODE_INPUT(GPIOH_PIN4) | PIN_MODE_INPUT(GPIOH_PIN5) | PIN_MODE_INPUT(GPIOH_PIN6) | PIN_MODE_INPUT(GPIOH_PIN7) | PIN_MODE_INPUT(GPIOH_PIN8) | PIN_MODE_INPUT(GPIOH_PIN9) | PIN_MODE_INPUT(GPIOH_PIN10) | PIN_MODE_INPUT(GPIOH_PIN11) | PIN_MODE_INPUT(GPIOH_PIN12) | PIN_MODE_INPUT(GPIOH_PIN13) | PIN_MODE_INPUT(GPIOH_PIN14) | PIN_MODE_INPUT(GPIOH_PIN15)) -#define VAL_GPIOH_OTYPER (PIN_OTYPE_PUSHPULL(GPIOH_OSC_IN) | PIN_OTYPE_PUSHPULL(GPIOH_OSC_OUT) | PIN_OTYPE_PUSHPULL(GPIOH_PIN2) | PIN_OTYPE_PUSHPULL(GPIOH_PIN3) | PIN_OTYPE_PUSHPULL(GPIOH_PIN4) | PIN_OTYPE_PUSHPULL(GPIOH_PIN5) | PIN_OTYPE_PUSHPULL(GPIOH_PIN6) | PIN_OTYPE_PUSHPULL(GPIOH_PIN7) | PIN_OTYPE_PUSHPULL(GPIOH_PIN8) | PIN_OTYPE_PUSHPULL(GPIOH_PIN9) | PIN_OTYPE_PUSHPULL(GPIOH_PIN10) | PIN_OTYPE_PUSHPULL(GPIOH_PIN11) | PIN_OTYPE_PUSHPULL(GPIOH_PIN12) | PIN_OTYPE_PUSHPULL(GPIOH_PIN13) | PIN_OTYPE_PUSHPULL(GPIOH_PIN14) | PIN_OTYPE_PUSHPULL(GPIOH_PIN15)) -#define VAL_GPIOH_OSPEEDR (PIN_OSPEED_HIGH(GPIOH_OSC_IN) | PIN_OSPEED_HIGH(GPIOH_OSC_OUT) | PIN_OSPEED_HIGH(GPIOH_PIN2) | PIN_OSPEED_HIGH(GPIOH_PIN3) | PIN_OSPEED_HIGH(GPIOH_PIN4) | PIN_OSPEED_HIGH(GPIOH_PIN5) | PIN_OSPEED_HIGH(GPIOH_PIN6) | PIN_OSPEED_HIGH(GPIOH_PIN7) | PIN_OSPEED_HIGH(GPIOH_PIN8) | PIN_OSPEED_HIGH(GPIOH_PIN9) | PIN_OSPEED_HIGH(GPIOH_PIN10) | PIN_OSPEED_HIGH(GPIOH_PIN11) | PIN_OSPEED_HIGH(GPIOH_PIN12) | PIN_OSPEED_HIGH(GPIOH_PIN13) | PIN_OSPEED_HIGH(GPIOH_PIN14) | PIN_OSPEED_HIGH(GPIOH_PIN15)) -#define VAL_GPIOH_PUPDR (PIN_PUPDR_FLOATING(GPIOH_OSC_IN) | PIN_PUPDR_FLOATING(GPIOH_OSC_OUT) | PIN_PUPDR_PULLUP(GPIOH_PIN2) | PIN_PUPDR_PULLUP(GPIOH_PIN3) | PIN_PUPDR_PULLUP(GPIOH_PIN4) | PIN_PUPDR_PULLUP(GPIOH_PIN5) | PIN_PUPDR_PULLUP(GPIOH_PIN6) | PIN_PUPDR_PULLUP(GPIOH_PIN7) | PIN_PUPDR_PULLUP(GPIOH_PIN8) | PIN_PUPDR_PULLUP(GPIOH_PIN9) | PIN_PUPDR_PULLUP(GPIOH_PIN10) | PIN_PUPDR_PULLUP(GPIOH_PIN11) | PIN_PUPDR_PULLUP(GPIOH_PIN12) | PIN_PUPDR_PULLUP(GPIOH_PIN13) | PIN_PUPDR_PULLUP(GPIOH_PIN14) | PIN_PUPDR_PULLUP(GPIOH_PIN15)) -#define VAL_GPIOH_ODR (PIN_ODR_HIGH(GPIOH_OSC_IN) | PIN_ODR_HIGH(GPIOH_OSC_OUT) | PIN_ODR_HIGH(GPIOH_PIN2) | PIN_ODR_HIGH(GPIOH_PIN3) | PIN_ODR_HIGH(GPIOH_PIN4) | PIN_ODR_HIGH(GPIOH_PIN5) | PIN_ODR_HIGH(GPIOH_PIN6) | PIN_ODR_HIGH(GPIOH_PIN7) | PIN_ODR_HIGH(GPIOH_PIN8) | PIN_ODR_HIGH(GPIOH_PIN9) | PIN_ODR_HIGH(GPIOH_PIN10) | PIN_ODR_HIGH(GPIOH_PIN11) | PIN_ODR_HIGH(GPIOH_PIN12) | PIN_ODR_HIGH(GPIOH_PIN13) | PIN_ODR_HIGH(GPIOH_PIN14) | PIN_ODR_HIGH(GPIOH_PIN15)) -#define VAL_GPIOH_AFRL (PIN_AFIO_AF(GPIOH_OSC_IN, 0U) | PIN_AFIO_AF(GPIOH_OSC_OUT, 0U) | PIN_AFIO_AF(GPIOH_PIN2, 0U) | PIN_AFIO_AF(GPIOH_PIN3, 0U) | PIN_AFIO_AF(GPIOH_PIN4, 0U) | PIN_AFIO_AF(GPIOH_PIN5, 0U) | PIN_AFIO_AF(GPIOH_PIN6, 0U) | PIN_AFIO_AF(GPIOH_PIN7, 0U)) -#define VAL_GPIOH_AFRH (PIN_AFIO_AF(GPIOH_PIN8, 0U) | PIN_AFIO_AF(GPIOH_PIN9, 0U) | PIN_AFIO_AF(GPIOH_PIN10, 0U) | PIN_AFIO_AF(GPIOH_PIN11, 0U) | PIN_AFIO_AF(GPIOH_PIN12, 0U) | PIN_AFIO_AF(GPIOH_PIN13, 0U) | PIN_AFIO_AF(GPIOH_PIN14, 0U) | PIN_AFIO_AF(GPIOH_PIN15, 0U)) - -/* - * GPIOI setup: - * - * PI0 - PIN0 (input pullup). - * PI1 - PIN1 (input pullup). - * PI2 - PIN2 (input pullup). - * PI3 - PIN3 (input pullup). - * PI4 - PIN4 (input pullup). - * PI5 - PIN5 (input pullup). - * PI6 - PIN6 (input pullup). - * PI7 - PIN7 (input pullup). - * PI8 - PIN8 (input pullup). - * PI9 - PIN9 (input pullup). - * PI10 - PIN10 (input pullup). - * PI11 - PIN11 (input pullup). - * PI12 - PIN12 (input pullup). - * PI13 - PIN13 (input pullup). - * PI14 - PIN14 (input pullup). - * PI15 - PIN15 (input pullup). - */ -#define VAL_GPIOI_MODER (PIN_MODE_INPUT(GPIOI_PIN0) | PIN_MODE_INPUT(GPIOI_PIN1) | PIN_MODE_INPUT(GPIOI_PIN2) | PIN_MODE_INPUT(GPIOI_PIN3) | PIN_MODE_INPUT(GPIOI_PIN4) | PIN_MODE_INPUT(GPIOI_PIN5) | PIN_MODE_INPUT(GPIOI_PIN6) | PIN_MODE_INPUT(GPIOI_PIN7) | PIN_MODE_INPUT(GPIOI_PIN8) | PIN_MODE_INPUT(GPIOI_PIN9) | PIN_MODE_INPUT(GPIOI_PIN10) | PIN_MODE_INPUT(GPIOI_PIN11) | PIN_MODE_INPUT(GPIOI_PIN12) | PIN_MODE_INPUT(GPIOI_PIN13) | PIN_MODE_INPUT(GPIOI_PIN14) | PIN_MODE_INPUT(GPIOI_PIN15)) -#define VAL_GPIOI_OTYPER (PIN_OTYPE_PUSHPULL(GPIOI_PIN0) | PIN_OTYPE_PUSHPULL(GPIOI_PIN1) | PIN_OTYPE_PUSHPULL(GPIOI_PIN2) | PIN_OTYPE_PUSHPULL(GPIOI_PIN3) | PIN_OTYPE_PUSHPULL(GPIOI_PIN4) | PIN_OTYPE_PUSHPULL(GPIOI_PIN5) | PIN_OTYPE_PUSHPULL(GPIOI_PIN6) | PIN_OTYPE_PUSHPULL(GPIOI_PIN7) | PIN_OTYPE_PUSHPULL(GPIOI_PIN8) | PIN_OTYPE_PUSHPULL(GPIOI_PIN9) | PIN_OTYPE_PUSHPULL(GPIOI_PIN10) | PIN_OTYPE_PUSHPULL(GPIOI_PIN11) | PIN_OTYPE_PUSHPULL(GPIOI_PIN12) | PIN_OTYPE_PUSHPULL(GPIOI_PIN13) | PIN_OTYPE_PUSHPULL(GPIOI_PIN14) | PIN_OTYPE_PUSHPULL(GPIOI_PIN15)) -#define VAL_GPIOI_OSPEEDR (PIN_OSPEED_HIGH(GPIOI_PIN0) | PIN_OSPEED_HIGH(GPIOI_PIN1) | PIN_OSPEED_HIGH(GPIOI_PIN2) | PIN_OSPEED_HIGH(GPIOI_PIN3) | PIN_OSPEED_HIGH(GPIOI_PIN4) | PIN_OSPEED_HIGH(GPIOI_PIN5) | PIN_OSPEED_HIGH(GPIOI_PIN6) | PIN_OSPEED_HIGH(GPIOI_PIN7) | PIN_OSPEED_HIGH(GPIOI_PIN8) | PIN_OSPEED_HIGH(GPIOI_PIN9) | PIN_OSPEED_HIGH(GPIOI_PIN10) | PIN_OSPEED_HIGH(GPIOI_PIN11) | PIN_OSPEED_HIGH(GPIOI_PIN12) | PIN_OSPEED_HIGH(GPIOI_PIN13) | PIN_OSPEED_HIGH(GPIOI_PIN14) | PIN_OSPEED_HIGH(GPIOI_PIN15)) -#define VAL_GPIOI_PUPDR (PIN_PUPDR_PULLUP(GPIOI_PIN0) | PIN_PUPDR_PULLUP(GPIOI_PIN1) | PIN_PUPDR_PULLUP(GPIOI_PIN2) | PIN_PUPDR_PULLUP(GPIOI_PIN3) | PIN_PUPDR_PULLUP(GPIOI_PIN4) | PIN_PUPDR_PULLUP(GPIOI_PIN5) | PIN_PUPDR_PULLUP(GPIOI_PIN6) | PIN_PUPDR_PULLUP(GPIOI_PIN7) | PIN_PUPDR_PULLUP(GPIOI_PIN8) | PIN_PUPDR_PULLUP(GPIOI_PIN9) | PIN_PUPDR_PULLUP(GPIOI_PIN10) | PIN_PUPDR_PULLUP(GPIOI_PIN11) | PIN_PUPDR_PULLUP(GPIOI_PIN12) | PIN_PUPDR_PULLUP(GPIOI_PIN13) | PIN_PUPDR_PULLUP(GPIOI_PIN14) | PIN_PUPDR_PULLUP(GPIOI_PIN15)) -#define VAL_GPIOI_ODR (PIN_ODR_HIGH(GPIOI_PIN0) | PIN_ODR_HIGH(GPIOI_PIN1) | PIN_ODR_HIGH(GPIOI_PIN2) | PIN_ODR_HIGH(GPIOI_PIN3) | PIN_ODR_HIGH(GPIOI_PIN4) | PIN_ODR_HIGH(GPIOI_PIN5) | PIN_ODR_HIGH(GPIOI_PIN6) | PIN_ODR_HIGH(GPIOI_PIN7) | PIN_ODR_HIGH(GPIOI_PIN8) | PIN_ODR_HIGH(GPIOI_PIN9) | PIN_ODR_HIGH(GPIOI_PIN10) | PIN_ODR_HIGH(GPIOI_PIN11) | PIN_ODR_HIGH(GPIOI_PIN12) | PIN_ODR_HIGH(GPIOI_PIN13) | PIN_ODR_HIGH(GPIOI_PIN14) | PIN_ODR_HIGH(GPIOI_PIN15)) -#define VAL_GPIOI_AFRL (PIN_AFIO_AF(GPIOI_PIN0, 0U) | PIN_AFIO_AF(GPIOI_PIN1, 0U) | PIN_AFIO_AF(GPIOI_PIN2, 0U) | PIN_AFIO_AF(GPIOI_PIN3, 0U) | PIN_AFIO_AF(GPIOI_PIN4, 0U) | PIN_AFIO_AF(GPIOI_PIN5, 0U) | PIN_AFIO_AF(GPIOI_PIN6, 0U) | PIN_AFIO_AF(GPIOI_PIN7, 0U)) -#define VAL_GPIOI_AFRH (PIN_AFIO_AF(GPIOI_PIN8, 0U) | PIN_AFIO_AF(GPIOI_PIN9, 0U) | PIN_AFIO_AF(GPIOI_PIN10, 0U) | PIN_AFIO_AF(GPIOI_PIN11, 0U) | PIN_AFIO_AF(GPIOI_PIN12, 0U) | PIN_AFIO_AF(GPIOI_PIN13, 0U) | PIN_AFIO_AF(GPIOI_PIN14, 0U) | PIN_AFIO_AF(GPIOI_PIN15, 0U)) - -/*===========================================================================*/ -/* External declarations. */ -/*===========================================================================*/ - -#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/BLACKPILL_STM32_F411/cfg/board.chcfg b/drivers/boards/BLACKPILL_STM32_F411/cfg/board.chcfg deleted file mode 100644 index 3095409cca56..000000000000 --- a/drivers/boards/BLACKPILL_STM32_F411/cfg/board.chcfg +++ /dev/null @@ -1,1193 +0,0 @@ - - - - - resources/gencfg/processors/boards/stm32f4xx/templates - .. - 5.0.x - - STMicroelectronics STM32 Nucleo64-F411RE - ST_NUCLEO64_F411RE - - STM32F411xE - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/drivers/boards/BLACKPILL_STM32_F411/cfg/board.fmpp b/drivers/boards/BLACKPILL_STM32_F411/cfg/board.fmpp deleted file mode 100644 index 41754c1414a9..000000000000 --- a/drivers/boards/BLACKPILL_STM32_F411/cfg/board.fmpp +++ /dev/null @@ -1,15 +0,0 @@ -sourceRoot: ../../../../../tools/ftl/processors/boards/stm32f4xx/templates -outputRoot: .. -dataRoot: . - -freemarkerLinks: { - lib: ../../../../../tools/ftl/libs -} - -data : { - doc1:xml ( - board.chcfg - { - } - ) -} diff --git a/drivers/boards/GENERIC_STM32_F072XB/cfg/board.chcfg b/drivers/boards/GENERIC_STM32_F072XB/cfg/board.chcfg deleted file mode 100644 index e6ceecb62e89..000000000000 --- a/drivers/boards/GENERIC_STM32_F072XB/cfg/board.chcfg +++ /dev/null @@ -1,703 +0,0 @@ - - - - - resources/gencfg/processors/boards/stm32f0xx/templates - .. - 5.0.x - - ST STM32F072B-Discovery - ST_STM32F072B_DISCOVERY - - STM32F072xB - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/drivers/boards/GENERIC_STM32_F072XB/cfg/board.fmpp b/drivers/boards/GENERIC_STM32_F072XB/cfg/board.fmpp deleted file mode 100644 index 55cd396e41cf..000000000000 --- a/drivers/boards/GENERIC_STM32_F072XB/cfg/board.fmpp +++ /dev/null @@ -1,15 +0,0 @@ -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.mk b/drivers/boards/GENERIC_STM32_F303XC/board.mk deleted file mode 100644 index 43377629a3cc..000000000000 --- a/drivers/boards/GENERIC_STM32_F303XC/board.mk +++ /dev/null @@ -1,5 +0,0 @@ -# List of all the board related files. -BOARDSRC = $(BOARD_PATH)/boards/GENERIC_STM32_F303XC/board.c - -# Required include directories -BOARDINC = $(BOARD_PATH)/boards/GENERIC_STM32_F303XC diff --git a/drivers/boards/IC_TEENSY_3_1/board.mk b/drivers/boards/IC_TEENSY_3_1/board.mk deleted file mode 100644 index 62f5b751c7d1..000000000000 --- a/drivers/boards/IC_TEENSY_3_1/board.mk +++ /dev/null @@ -1,5 +0,0 @@ -# List of all the board related files. -BOARDSRC = $(BOARD_PATH)/boards/IC_TEENSY_3_1/board.c - -# Required include directories -BOARDINC = $(BOARD_PATH)/boards/IC_TEENSY_3_1 diff --git a/drivers/boards/STM32_F103_STM32DUINO/board.mk b/drivers/boards/STM32_F103_STM32DUINO/board.mk deleted file mode 100644 index 81141bdfd95b..000000000000 --- a/drivers/boards/STM32_F103_STM32DUINO/board.mk +++ /dev/null @@ -1,5 +0,0 @@ -# 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 diff --git a/keyboards/handwired/onekey/blackpill_f401/halconf.h b/keyboards/handwired/onekey/blackpill_f401/halconf.h index a8db392aaa6c..d73c214ec64c 100644 --- a/keyboards/handwired/onekey/blackpill_f401/halconf.h +++ b/keyboards/handwired/onekey/blackpill_f401/halconf.h @@ -1,525 +1,20 @@ -/* - 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. - 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. +/* Copyright 2020 Nick Brassel (tzarc) * - * @addtogroup HAL_CONF - * @{ - */ - -#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 -#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 cryptographic subsystem. - */ -#if !defined(HAL_USE_CRY) || defined(__DOXYGEN__) -#define HAL_USE_CRY FALSE -#endif - -/** - * @brief Enables the DAC subsystem. - */ -#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 -#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 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 -#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 -#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 - -/** - * @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. */ -/*===========================================================================*/ - -/** - * @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 - -/** - * @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. */ -/*===========================================================================*/ - -/** - * @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 the zero-copy API. - */ -#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 - -/** - * @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. */ -/*===========================================================================*/ - -/** - * @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 16 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 256 bytes for both the transmission and receive - * buffers. - */ -#if !defined(SERIAL_USB_BUFFERS_SIZE) || defined(__DOXYGEN__) -#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 - -/*===========================================================================*/ -/* 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 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 -#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. */ -/*===========================================================================*/ - -/** - * @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 - -/*===========================================================================*/ -/* 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. + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ -#if !defined(WSPI_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) -#define WSPI_USE_MUTUAL_EXCLUSION TRUE -#endif +#pragma once -#endif /* HALCONF_H */ +#define HAL_USE_I2C TRUE -/** @} */ +#include_next "halconf.h" diff --git a/keyboards/handwired/onekey/blackpill_f401/mcuconf.h b/keyboards/handwired/onekey/blackpill_f401/mcuconf.h index ba6e934fe7bd..33e07847b413 100644 --- a/keyboards/handwired/onekey/blackpill_f401/mcuconf.h +++ b/keyboards/handwired/onekey/blackpill_f401/mcuconf.h @@ -1,253 +1,21 @@ -/* - 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. - See the License for the specific language governing permissions and - limitations under the License. -*/ - -#ifndef MCUCONF_H -#define MCUCONF_H - -/* - * STM32F4xx 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. +/* Copyright 2020 Nick Brassel (tzarc) * - * IRQ priorities: - * 15...0 Lowest...Highest. + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. * - * DMA priorities: - * 0...3 Lowest...Highest. - */ - -#define STM32F4xx_MCUCONF - -/* - * HAL driver system settings. - */ -#define STM32_NO_INIT FALSE -#define STM32_HSI_ENABLED TRUE -#define STM32_LSI_ENABLED TRUE -#define STM32_HSE_ENABLED TRUE -#define STM32_LSE_ENABLED FALSE -#define STM32_CLOCK48_REQUIRED TRUE -#define STM32_SW STM32_SW_PLL -#define STM32_PLLSRC STM32_PLLSRC_HSE -#define STM32_PLLM_VALUE 25 -#define STM32_PLLN_VALUE 336 -#define STM32_PLLP_VALUE 4 -#define STM32_PLLQ_VALUE 7 -#define STM32_HPRE STM32_HPRE_DIV1 -#define STM32_PPRE1 STM32_PPRE1_DIV4 -#define STM32_PPRE2 STM32_PPRE2_DIV2 -#define STM32_RTCSEL STM32_RTCSEL_LSI -#define STM32_RTCPRE_VALUE 8 -#define STM32_MCO1SEL STM32_MCO1SEL_HSI -#define STM32_MCO1PRE STM32_MCO1PRE_DIV1 -#define STM32_MCO2SEL STM32_MCO2SEL_SYSCLK -#define STM32_MCO2PRE STM32_MCO2PRE_DIV5 -#define STM32_I2SSRC STM32_I2SSRC_CKIN -#define STM32_PLLI2SN_VALUE 192 -#define STM32_PLLI2SR_VALUE 5 -#define STM32_PVD_ENABLE FALSE -#define STM32_PLS STM32_PLS_LEV0 -#define STM32_BKPRAM_ENABLE FALSE - -/* - * 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 6 -#define STM32_IRQ_EXTI20_PRIORITY 6 -#define STM32_IRQ_EXTI21_PRIORITY 15 -#define STM32_IRQ_EXTI22_PRIORITY 15 - -/* - * ADC driver system settings. - */ -#define STM32_ADC_ADCPRE ADC_CCR_ADCPRE_DIV4 -#define STM32_ADC_USE_ADC1 FALSE -#define STM32_ADC_ADC1_DMA_STREAM STM32_DMA_STREAM_ID(2, 4) -#define STM32_ADC_ADC1_DMA_PRIORITY 2 -#define STM32_ADC_IRQ_PRIORITY 6 -#define STM32_ADC_ADC1_DMA_IRQ_PRIORITY 6 - -/* - * 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_TIM4 FALSE -#define STM32_GPT_USE_TIM5 FALSE -#define STM32_GPT_USE_TIM9 FALSE -#define STM32_GPT_USE_TIM11 FALSE -#define STM32_GPT_TIM1_IRQ_PRIORITY 7 -#define STM32_GPT_TIM2_IRQ_PRIORITY 7 -#define STM32_GPT_TIM3_IRQ_PRIORITY 7 -#define STM32_GPT_TIM4_IRQ_PRIORITY 7 -#define STM32_GPT_TIM5_IRQ_PRIORITY 7 -#define STM32_GPT_TIM9_IRQ_PRIORITY 7 -#define STM32_GPT_TIM11_IRQ_PRIORITY 7 - -/* - * I2C driver system settings. - */ -#define STM32_I2C_USE_I2C1 FALSE -#define STM32_I2C_USE_I2C2 FALSE -#define STM32_I2C_USE_I2C3 FALSE -#define STM32_I2C_BUSY_TIMEOUT 50 -#define STM32_I2C_I2C1_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 0) -#define STM32_I2C_I2C1_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 6) -#define STM32_I2C_I2C2_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 2) -#define STM32_I2C_I2C2_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 7) -#define STM32_I2C_I2C3_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 2) -#define STM32_I2C_I2C3_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 4) -#define STM32_I2C_I2C1_IRQ_PRIORITY 5 -#define STM32_I2C_I2C2_IRQ_PRIORITY 5 -#define STM32_I2C_I2C3_IRQ_PRIORITY 5 -#define STM32_I2C_I2C1_DMA_PRIORITY 3 -#define STM32_I2C_I2C2_DMA_PRIORITY 3 -#define STM32_I2C_I2C3_DMA_PRIORITY 3 -#define STM32_I2C_DMA_ERROR_HOOK(i2cp) osalSysHalt("DMA failure") - -/* - * I2S driver system settings. - */ -#define STM32_I2S_USE_SPI2 FALSE -#define STM32_I2S_USE_SPI3 FALSE -#define STM32_I2S_SPI2_IRQ_PRIORITY 10 -#define STM32_I2S_SPI3_IRQ_PRIORITY 10 -#define STM32_I2S_SPI2_DMA_PRIORITY 1 -#define STM32_I2S_SPI3_DMA_PRIORITY 1 -#define STM32_I2S_SPI2_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 3) -#define STM32_I2S_SPI2_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 4) -#define STM32_I2S_SPI3_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 0) -#define STM32_I2S_SPI3_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 7) -#define STM32_I2S_DMA_ERROR_HOOK(i2sp) 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_USE_TIM4 FALSE -#define STM32_ICU_USE_TIM5 FALSE -#define STM32_ICU_USE_TIM9 FALSE -#define STM32_ICU_TIM1_IRQ_PRIORITY 7 -#define STM32_ICU_TIM2_IRQ_PRIORITY 7 -#define STM32_ICU_TIM3_IRQ_PRIORITY 7 -#define STM32_ICU_TIM4_IRQ_PRIORITY 7 -#define STM32_ICU_TIM5_IRQ_PRIORITY 7 -#define STM32_ICU_TIM9_IRQ_PRIORITY 7 - -/* - * 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_USE_TIM4 FALSE -#define STM32_PWM_USE_TIM5 FALSE -#define STM32_PWM_USE_TIM9 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_TIM5_IRQ_PRIORITY 7 -#define STM32_PWM_TIM9_IRQ_PRIORITY 7 - -/* - * SERIAL driver system settings. - */ -#define STM32_SERIAL_USE_USART1 FALSE -#define STM32_SERIAL_USE_USART2 FALSE -#define STM32_SERIAL_USE_USART6 FALSE -#define STM32_SERIAL_USART1_PRIORITY 12 -#define STM32_SERIAL_USART2_PRIORITY 12 -#define STM32_SERIAL_USART6_PRIORITY 12 - -/* - * SPI driver system settings. - */ -#define STM32_SPI_USE_SPI1 FALSE -#define STM32_SPI_USE_SPI2 FALSE -#define STM32_SPI_USE_SPI3 FALSE -#define STM32_SPI_SPI1_RX_DMA_STREAM STM32_DMA_STREAM_ID(2, 0) -#define STM32_SPI_SPI1_TX_DMA_STREAM STM32_DMA_STREAM_ID(2, 3) -#define STM32_SPI_SPI2_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 3) -#define STM32_SPI_SPI2_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 4) -#define STM32_SPI_SPI3_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 0) -#define STM32_SPI_SPI3_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 7) -#define STM32_SPI_SPI1_DMA_PRIORITY 1 -#define STM32_SPI_SPI2_DMA_PRIORITY 1 -#define STM32_SPI_SPI3_DMA_PRIORITY 1 -#define STM32_SPI_SPI1_IRQ_PRIORITY 10 -#define STM32_SPI_SPI2_IRQ_PRIORITY 10 -#define STM32_SPI_SPI3_IRQ_PRIORITY 10 -#define STM32_SPI_DMA_ERROR_HOOK(spip) osalSysHalt("DMA failure") - -/* - * ST driver system settings. - */ -#define STM32_ST_IRQ_PRIORITY 8 -#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_USE_USART6 FALSE -#define STM32_UART_USART1_RX_DMA_STREAM STM32_DMA_STREAM_ID(2, 5) -#define STM32_UART_USART1_TX_DMA_STREAM STM32_DMA_STREAM_ID(2, 7) -#define STM32_UART_USART2_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 5) -#define STM32_UART_USART2_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 6) -#define STM32_UART_USART6_RX_DMA_STREAM STM32_DMA_STREAM_ID(2, 2) -#define STM32_UART_USART6_TX_DMA_STREAM STM32_DMA_STREAM_ID(2, 7) -#define STM32_UART_USART1_IRQ_PRIORITY 12 -#define STM32_UART_USART2_IRQ_PRIORITY 12 -#define STM32_UART_USART6_IRQ_PRIORITY 12 -#define STM32_UART_USART1_DMA_PRIORITY 0 -#define STM32_UART_USART2_DMA_PRIORITY 0 -#define STM32_UART_USART6_DMA_PRIORITY 0 -#define STM32_UART_DMA_ERROR_HOOK(uartp) osalSysHalt("DMA failure") - -/* - * USB driver system settings. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General 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 STM32_USB_USE_OTG1 TRUE -#define STM32_USB_OTG1_IRQ_PRIORITY 14 -#define STM32_USB_OTG1_RX_FIFO_SIZE 512 -#define STM32_USB_OTG_THREAD_PRIO NORMALPRIO+1 -#define STM32_USB_OTG_THREAD_STACK_SIZE 128 -#define STM32_USB_OTGFIFO_FILL_BASEPRI 0 +#pragma once -/* - * WDG driver system settings. - */ -#define STM32_WDG_USE_IWDG FALSE +#include_next "mcuconf.h" -#endif /* MCUCONF_H */ +#undef STM32_I2C_USE_I2C1 +#define STM32_I2C_USE_I2C1 TRUE diff --git a/keyboards/handwired/onekey/blackpill_f411/halconf.h b/keyboards/handwired/onekey/blackpill_f411/halconf.h index a8db392aaa6c..d73c214ec64c 100644 --- a/keyboards/handwired/onekey/blackpill_f411/halconf.h +++ b/keyboards/handwired/onekey/blackpill_f411/halconf.h @@ -1,525 +1,20 @@ -/* - 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. - 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. +/* Copyright 2020 Nick Brassel (tzarc) * - * @addtogroup HAL_CONF - * @{ - */ - -#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 -#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 cryptographic subsystem. - */ -#if !defined(HAL_USE_CRY) || defined(__DOXYGEN__) -#define HAL_USE_CRY FALSE -#endif - -/** - * @brief Enables the DAC subsystem. - */ -#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 -#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 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 -#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 -#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 - -/** - * @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. */ -/*===========================================================================*/ - -/** - * @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 - -/** - * @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. */ -/*===========================================================================*/ - -/** - * @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 the zero-copy API. - */ -#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 - -/** - * @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. */ -/*===========================================================================*/ - -/** - * @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 16 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 256 bytes for both the transmission and receive - * buffers. - */ -#if !defined(SERIAL_USB_BUFFERS_SIZE) || defined(__DOXYGEN__) -#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 - -/*===========================================================================*/ -/* 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 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 -#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. */ -/*===========================================================================*/ - -/** - * @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 - -/*===========================================================================*/ -/* 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. + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ -#if !defined(WSPI_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) -#define WSPI_USE_MUTUAL_EXCLUSION TRUE -#endif +#pragma once -#endif /* HALCONF_H */ +#define HAL_USE_I2C TRUE -/** @} */ +#include_next "halconf.h" diff --git a/keyboards/handwired/onekey/blackpill_f411/mcuconf.h b/keyboards/handwired/onekey/blackpill_f411/mcuconf.h index 0394ff56bb97..33e07847b413 100644 --- a/keyboards/handwired/onekey/blackpill_f411/mcuconf.h +++ b/keyboards/handwired/onekey/blackpill_f411/mcuconf.h @@ -1,253 +1,21 @@ -/* - 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. - See the License for the specific language governing permissions and - limitations under the License. -*/ - -#ifndef MCUCONF_H -#define MCUCONF_H - -/* - * STM32F4xx 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. +/* Copyright 2020 Nick Brassel (tzarc) * - * IRQ priorities: - * 15...0 Lowest...Highest. + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. * - * DMA priorities: - * 0...3 Lowest...Highest. - */ - -#define STM32F4xx_MCUCONF - -/* - * HAL driver system settings. - */ -#define STM32_NO_INIT FALSE -#define STM32_HSI_ENABLED TRUE -#define STM32_LSI_ENABLED TRUE -#define STM32_HSE_ENABLED TRUE -#define STM32_LSE_ENABLED FALSE -#define STM32_CLOCK48_REQUIRED TRUE -#define STM32_SW STM32_SW_PLL -#define STM32_PLLSRC STM32_PLLSRC_HSE -#define STM32_PLLM_VALUE 25 -#define STM32_PLLN_VALUE 384 -#define STM32_PLLP_VALUE 4 -#define STM32_PLLQ_VALUE 8 -#define STM32_HPRE STM32_HPRE_DIV1 -#define STM32_PPRE1 STM32_PPRE1_DIV4 -#define STM32_PPRE2 STM32_PPRE2_DIV2 -#define STM32_RTCSEL STM32_RTCSEL_LSI -#define STM32_RTCPRE_VALUE 8 -#define STM32_MCO1SEL STM32_MCO1SEL_HSI -#define STM32_MCO1PRE STM32_MCO1PRE_DIV1 -#define STM32_MCO2SEL STM32_MCO2SEL_SYSCLK -#define STM32_MCO2PRE STM32_MCO2PRE_DIV5 -#define STM32_I2SSRC STM32_I2SSRC_CKIN -#define STM32_PLLI2SN_VALUE 192 -#define STM32_PLLI2SR_VALUE 5 -#define STM32_PVD_ENABLE FALSE -#define STM32_PLS STM32_PLS_LEV0 -#define STM32_BKPRAM_ENABLE FALSE - -/* - * 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 6 -#define STM32_IRQ_EXTI20_PRIORITY 6 -#define STM32_IRQ_EXTI21_PRIORITY 15 -#define STM32_IRQ_EXTI22_PRIORITY 15 - -/* - * ADC driver system settings. - */ -#define STM32_ADC_ADCPRE ADC_CCR_ADCPRE_DIV4 -#define STM32_ADC_USE_ADC1 FALSE -#define STM32_ADC_ADC1_DMA_STREAM STM32_DMA_STREAM_ID(2, 4) -#define STM32_ADC_ADC1_DMA_PRIORITY 2 -#define STM32_ADC_IRQ_PRIORITY 6 -#define STM32_ADC_ADC1_DMA_IRQ_PRIORITY 6 - -/* - * 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_TIM4 FALSE -#define STM32_GPT_USE_TIM5 FALSE -#define STM32_GPT_USE_TIM9 FALSE -#define STM32_GPT_USE_TIM11 FALSE -#define STM32_GPT_TIM1_IRQ_PRIORITY 7 -#define STM32_GPT_TIM2_IRQ_PRIORITY 7 -#define STM32_GPT_TIM3_IRQ_PRIORITY 7 -#define STM32_GPT_TIM4_IRQ_PRIORITY 7 -#define STM32_GPT_TIM5_IRQ_PRIORITY 7 -#define STM32_GPT_TIM9_IRQ_PRIORITY 7 -#define STM32_GPT_TIM11_IRQ_PRIORITY 7 - -/* - * I2C driver system settings. - */ -#define STM32_I2C_USE_I2C1 FALSE -#define STM32_I2C_USE_I2C2 FALSE -#define STM32_I2C_USE_I2C3 FALSE -#define STM32_I2C_BUSY_TIMEOUT 50 -#define STM32_I2C_I2C1_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 0) -#define STM32_I2C_I2C1_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 6) -#define STM32_I2C_I2C2_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 2) -#define STM32_I2C_I2C2_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 7) -#define STM32_I2C_I2C3_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 2) -#define STM32_I2C_I2C3_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 4) -#define STM32_I2C_I2C1_IRQ_PRIORITY 5 -#define STM32_I2C_I2C2_IRQ_PRIORITY 5 -#define STM32_I2C_I2C3_IRQ_PRIORITY 5 -#define STM32_I2C_I2C1_DMA_PRIORITY 3 -#define STM32_I2C_I2C2_DMA_PRIORITY 3 -#define STM32_I2C_I2C3_DMA_PRIORITY 3 -#define STM32_I2C_DMA_ERROR_HOOK(i2cp) osalSysHalt("DMA failure") - -/* - * I2S driver system settings. - */ -#define STM32_I2S_USE_SPI2 FALSE -#define STM32_I2S_USE_SPI3 FALSE -#define STM32_I2S_SPI2_IRQ_PRIORITY 10 -#define STM32_I2S_SPI3_IRQ_PRIORITY 10 -#define STM32_I2S_SPI2_DMA_PRIORITY 1 -#define STM32_I2S_SPI3_DMA_PRIORITY 1 -#define STM32_I2S_SPI2_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 3) -#define STM32_I2S_SPI2_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 4) -#define STM32_I2S_SPI3_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 0) -#define STM32_I2S_SPI3_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 7) -#define STM32_I2S_DMA_ERROR_HOOK(i2sp) 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_USE_TIM4 FALSE -#define STM32_ICU_USE_TIM5 FALSE -#define STM32_ICU_USE_TIM9 FALSE -#define STM32_ICU_TIM1_IRQ_PRIORITY 7 -#define STM32_ICU_TIM2_IRQ_PRIORITY 7 -#define STM32_ICU_TIM3_IRQ_PRIORITY 7 -#define STM32_ICU_TIM4_IRQ_PRIORITY 7 -#define STM32_ICU_TIM5_IRQ_PRIORITY 7 -#define STM32_ICU_TIM9_IRQ_PRIORITY 7 - -/* - * 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_USE_TIM4 FALSE -#define STM32_PWM_USE_TIM5 FALSE -#define STM32_PWM_USE_TIM9 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_TIM5_IRQ_PRIORITY 7 -#define STM32_PWM_TIM9_IRQ_PRIORITY 7 - -/* - * SERIAL driver system settings. - */ -#define STM32_SERIAL_USE_USART1 FALSE -#define STM32_SERIAL_USE_USART2 FALSE -#define STM32_SERIAL_USE_USART6 FALSE -#define STM32_SERIAL_USART1_PRIORITY 12 -#define STM32_SERIAL_USART2_PRIORITY 12 -#define STM32_SERIAL_USART6_PRIORITY 12 - -/* - * SPI driver system settings. - */ -#define STM32_SPI_USE_SPI1 FALSE -#define STM32_SPI_USE_SPI2 FALSE -#define STM32_SPI_USE_SPI3 FALSE -#define STM32_SPI_SPI1_RX_DMA_STREAM STM32_DMA_STREAM_ID(2, 0) -#define STM32_SPI_SPI1_TX_DMA_STREAM STM32_DMA_STREAM_ID(2, 3) -#define STM32_SPI_SPI2_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 3) -#define STM32_SPI_SPI2_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 4) -#define STM32_SPI_SPI3_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 0) -#define STM32_SPI_SPI3_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 7) -#define STM32_SPI_SPI1_DMA_PRIORITY 1 -#define STM32_SPI_SPI2_DMA_PRIORITY 1 -#define STM32_SPI_SPI3_DMA_PRIORITY 1 -#define STM32_SPI_SPI1_IRQ_PRIORITY 10 -#define STM32_SPI_SPI2_IRQ_PRIORITY 10 -#define STM32_SPI_SPI3_IRQ_PRIORITY 10 -#define STM32_SPI_DMA_ERROR_HOOK(spip) osalSysHalt("DMA failure") - -/* - * ST driver system settings. - */ -#define STM32_ST_IRQ_PRIORITY 8 -#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_USE_USART6 FALSE -#define STM32_UART_USART1_RX_DMA_STREAM STM32_DMA_STREAM_ID(2, 5) -#define STM32_UART_USART1_TX_DMA_STREAM STM32_DMA_STREAM_ID(2, 7) -#define STM32_UART_USART2_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 5) -#define STM32_UART_USART2_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 6) -#define STM32_UART_USART6_RX_DMA_STREAM STM32_DMA_STREAM_ID(2, 2) -#define STM32_UART_USART6_TX_DMA_STREAM STM32_DMA_STREAM_ID(2, 7) -#define STM32_UART_USART1_IRQ_PRIORITY 12 -#define STM32_UART_USART2_IRQ_PRIORITY 12 -#define STM32_UART_USART6_IRQ_PRIORITY 12 -#define STM32_UART_USART1_DMA_PRIORITY 0 -#define STM32_UART_USART2_DMA_PRIORITY 0 -#define STM32_UART_USART6_DMA_PRIORITY 0 -#define STM32_UART_DMA_ERROR_HOOK(uartp) osalSysHalt("DMA failure") - -/* - * USB driver system settings. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General 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 STM32_USB_USE_OTG1 TRUE -#define STM32_USB_OTG1_IRQ_PRIORITY 14 -#define STM32_USB_OTG1_RX_FIFO_SIZE 512 -#define STM32_USB_OTG_THREAD_PRIO NORMALPRIO+1 -#define STM32_USB_OTG_THREAD_STACK_SIZE 128 -#define STM32_USB_OTGFIFO_FILL_BASEPRI 0 +#pragma once -/* - * WDG driver system settings. - */ -#define STM32_WDG_USE_IWDG FALSE +#include_next "mcuconf.h" -#endif /* MCUCONF_H */ +#undef STM32_I2C_USE_I2C1 +#define STM32_I2C_USE_I2C1 TRUE diff --git a/keyboards/peiorisboards/ixora/boards/GENERIC_STM32_F042X6/board.c b/keyboards/peiorisboards/ixora/boards/GENERIC_STM32_F042X6/board.c deleted file mode 100644 index 754dc5c4dd05..000000000000 --- a/keyboards/peiorisboards/ixora/boards/GENERIC_STM32_F042X6/board.c +++ /dev/null @@ -1,268 +0,0 @@ -/* - 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. - 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" -#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; - -/** - * @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 - {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_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. */ -/*===========================================================================*/ - -/** - * @brief Early initialization code. - * @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. - */ -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/keyboards/peiorisboards/ixora/boards/GENERIC_STM32_F042X6/board.mk b/keyboards/peiorisboards/ixora/boards/GENERIC_STM32_F042X6/board.mk deleted file mode 100644 index bbeb5bbff728..000000000000 --- a/keyboards/peiorisboards/ixora/boards/GENERIC_STM32_F042X6/board.mk +++ /dev/null @@ -1,5 +0,0 @@ -# List of all the board related files. -BOARDSRC = $(BOARD_PATH)/boards/GENERIC_STM32_F042X6/board.c - -# Required include directories -BOARDINC = $(BOARD_PATH)/boards/GENERIC_STM32_F042X6 diff --git a/keyboards/vinta/boards/GENERIC_STM32_F042X6/board.h b/keyboards/vinta/boards/GENERIC_STM32_F042X6/board.h deleted file mode 100644 index 241d566afa27..000000000000 --- a/keyboards/vinta/boards/GENERIC_STM32_F042X6/board.h +++ /dev/null @@ -1,896 +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. -*/ -#ifndef _BOARD_H -#define _BOARD_H - -/* - * Setup for STMicroelectronics STM32 Nucleo32-F042K6 board. - */ - -/* - * Board identifier. - */ -#define BOARD_GENERIC_STM32_F042X6 -#define BOARD_NAME "Vinta PCB" - -/* - * 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 - -/* - * MCU type as defined in the ST header. - */ -#define STM32F042x6 - -/* - * IO pins assignments. - */ -#define GPIOA_PIN0 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_PIN11 11U -#define GPIOA_PIN12 12U -#define GPIOA_PIN13 13U -#define GPIOA_PIN14 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_PIN13 13U -#define GPIOB_PIN14 14U -#define GPIOB_PIN15 15U - -#define GPIOC_PIN0 0U -#define GPIOC_PIN1 1U -#define GPIOC_PIN2 2U -#define GPIOC_PIN3 3U -#define GPIOC_PIN4 4U -#define GPIOC_PIN5 5U -#define GPIOC_PIN6 6U -#define GPIOC_PIN7 7U -#define GPIOC_PIN8 8U -#define GPIOC_PIN9 9U -#define GPIOC_PIN10 10U -#define GPIOC_PIN11 11U -#define GPIOC_PIN12 12U -#define GPIOC_PIN13 13U -#define GPIOC_PIN14 14U -#define GPIOC_PIN15 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_PIN0 0U -#define GPIOF_PIN1 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_BOOT0 PAL_LINE(GPIOB, 8U) -#define LINE_SWCLK PAL_LINE(GPIOA, 14U) -#define LINE_SWDIO PAL_LINE(GPIOA, 13U) - -/* - * 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 - COL5 - * PA1 - COL4 - * PA2 - COL3 - * PA3 - COL2 - * PA4 - COL1 - * PA5 - COL0 - * PA6 - ROW4 - * PA7 - ROW3 - * PA8 - NC - * PA9 - ROW1 - * PA10 - ROW0 - * PA11 - USB_DM - * PA12 - USB_DP - * PA13 - COL15/SWDIO (for now, COL15) - * PA14 - COL14/SWCLK (for now, COL14) - * PA15 - COL13 - */ -#define VAL_GPIOA_MODER (PIN_MODE_INPUT(GPIOA_PIN0) | \ - 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_PIN11) | \ - PIN_MODE_INPUT(GPIOA_PIN12) | \ - PIN_MODE_INPUT(GPIOA_PIN13) | \ - PIN_MODE_INPUT(GPIOA_PIN14) | \ - PIN_MODE_INPUT(GPIOA_PIN15)) -#define VAL_GPIOA_OTYPER (PIN_OTYPE_PUSHPULL(GPIOA_PIN0) | \ - 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_PIN11) | \ - PIN_OTYPE_PUSHPULL(GPIOA_PIN12) | \ - PIN_OTYPE_PUSHPULL(GPIOA_PIN13) | \ - PIN_OTYPE_PUSHPULL(GPIOA_PIN14) | \ - PIN_OTYPE_PUSHPULL(GPIOA_PIN15)) -#define VAL_GPIOA_OSPEEDR (PIN_OSPEED_VERYLOW(GPIOA_PIN0) | \ - 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_HIGH(GPIOA_PIN11) | \ - PIN_OSPEED_VERYLOW(GPIOA_PIN12) | \ - PIN_OSPEED_VERYLOW(GPIOA_PIN13) | \ - PIN_OSPEED_VERYLOW(GPIOA_PIN14) | \ - PIN_OSPEED_VERYLOW(GPIOA_PIN15)) -#define VAL_GPIOA_PUPDR (PIN_PUPDR_PULLUP(GPIOA_PIN0) | \ - 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_PIN11) | \ - PIN_PUPDR_FLOATING(GPIOA_PIN12) | \ - PIN_PUPDR_PULLUP(GPIOA_PIN13) | \ - PIN_PUPDR_PULLUP(GPIOA_PIN14) | \ - PIN_PUPDR_PULLUP(GPIOA_PIN15)) -#define VAL_GPIOA_ODR (PIN_ODR_HIGH(GPIOA_PIN0) | \ - 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_PIN11) | \ - PIN_ODR_HIGH(GPIOA_PIN12) | \ - PIN_ODR_HIGH(GPIOA_PIN13) | \ - PIN_ODR_HIGH(GPIOA_PIN14) | \ - PIN_ODR_HIGH(GPIOA_PIN15)) -#define VAL_GPIOA_AFRL (PIN_AFIO_AF(GPIOA_PIN0, 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_PIN11, 0U) | \ - PIN_AFIO_AF(GPIOA_PIN12, 0U) | \ - PIN_AFIO_AF(GPIOA_PIN13, 0U) | \ - PIN_AFIO_AF(GPIOA_PIN14, 0U) | \ - PIN_AFIO_AF(GPIOA_PIN15, 0U)) - -/* - * GPIOB setup: - * - * PB0 - ROW2 - * PB1 - RGB_D - * PB2 - PIN2 (input pullup). - * PB3 - COL12 - * PB4 - COL11 - * PB5 - COL10 - * PB6 - COL9 - * PB7 - COL8 - * PB8 - BOOT0 (set as output for STM32F042) - * PB9 - PIN9 (input pullup). - * PB10 - PIN10 (input pullup). - * PB11 - PIN11 (input pullup). - * PB12 - PIN12 (input pullup). - * PB13 - PIN13 (input pullup). - * PB14 - PIN14 (input pullup). - * PB15 - PIN15 (input pullup). - */ -#define VAL_GPIOB_MODER (PIN_MODE_INPUT(GPIOB_PIN0) | \ - PIN_MODE_OUTPUT(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_OUTPUT(GPIOB_PIN8) | \ - PIN_MODE_INPUT(GPIOB_PIN9) | \ - PIN_MODE_INPUT(GPIOB_PIN10) | \ - PIN_MODE_INPUT(GPIOB_PIN11) | \ - PIN_MODE_INPUT(GPIOB_PIN12) | \ - PIN_MODE_INPUT(GPIOB_PIN13) | \ - PIN_MODE_INPUT(GPIOB_PIN14) | \ - PIN_MODE_INPUT(GPIOB_PIN15)) -#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_PIN13) | \ - PIN_OTYPE_PUSHPULL(GPIOB_PIN14) | \ - PIN_OTYPE_PUSHPULL(GPIOB_PIN15)) -#define VAL_GPIOB_OSPEEDR (PIN_OSPEED_VERYLOW(GPIOB_PIN0) | \ - PIN_OSPEED_HIGH(GPIOB_PIN1) | \ - PIN_OSPEED_HIGH(GPIOB_PIN2) | \ - PIN_OSPEED_VERYLOW(GPIOB_PIN3) | \ - PIN_OSPEED_VERYLOW(GPIOB_PIN4) | \ - PIN_OSPEED_VERYLOW(GPIOB_PIN5) | \ - PIN_OSPEED_VERYLOW(GPIOB_PIN6) | \ - PIN_OSPEED_VERYLOW(GPIOB_PIN7) | \ - PIN_OSPEED_VERYLOW(GPIOB_PIN8) | \ - PIN_OSPEED_HIGH(GPIOB_PIN9) | \ - PIN_OSPEED_HIGH(GPIOB_PIN10) | \ - PIN_OSPEED_HIGH(GPIOB_PIN11) | \ - PIN_OSPEED_HIGH(GPIOB_PIN12) | \ - PIN_OSPEED_HIGH(GPIOB_PIN13) | \ - PIN_OSPEED_HIGH(GPIOB_PIN14) | \ - PIN_OSPEED_HIGH(GPIOB_PIN15)) -#define VAL_GPIOB_PUPDR (PIN_PUPDR_PULLUP(GPIOB_PIN0) | \ - PIN_PUPDR_FLOATING(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_PULLDOWN(GPIOB_PIN8) | \ - PIN_PUPDR_PULLUP(GPIOB_PIN9) | \ - PIN_PUPDR_PULLUP(GPIOB_PIN10) | \ - PIN_PUPDR_PULLUP(GPIOB_PIN11) | \ - PIN_PUPDR_PULLUP(GPIOB_PIN12) | \ - PIN_PUPDR_PULLUP(GPIOB_PIN13) | \ - PIN_PUPDR_PULLUP(GPIOB_PIN14) | \ - PIN_PUPDR_PULLUP(GPIOB_PIN15)) -#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_PIN13) | \ - PIN_ODR_HIGH(GPIOB_PIN14) | \ - PIN_ODR_HIGH(GPIOB_PIN15)) -#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_PIN13, 0U) | \ - PIN_AFIO_AF(GPIOB_PIN14, 0U) | \ - PIN_AFIO_AF(GPIOB_PIN15, 0U)) - -/* - * GPIOC setup: - * - * PC0 - PIN0 (input pullup). - * PC1 - PIN1 (input pullup). - * PC2 - PIN2 (input pullup). - * PC3 - PIN3 (input pullup). - * PC4 - PIN4 (input pullup). - * PC5 - PIN5 (input pullup). - * PC6 - PIN6 (input pullup). - * PC7 - PIN7 (input pullup). - * PC8 - PIN8 (input pullup). - * PC9 - PIN9 (input pullup). - * PC10 - PIN10 (input pullup). - * PC11 - PIN11 (input pullup). - * PC12 - PIN12 (input pullup). - * PC13 - PIN13 (input pullup). - * PC14 - PIN14 (input pullup). - * PC15 - PIN15 (input pullup). - */ -#define VAL_GPIOC_MODER (PIN_MODE_INPUT(GPIOC_PIN0) | \ - 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_INPUT(GPIOC_PIN6) | \ - PIN_MODE_INPUT(GPIOC_PIN7) | \ - PIN_MODE_INPUT(GPIOC_PIN8) | \ - PIN_MODE_INPUT(GPIOC_PIN9) | \ - PIN_MODE_INPUT(GPIOC_PIN10) | \ - PIN_MODE_INPUT(GPIOC_PIN11) | \ - PIN_MODE_INPUT(GPIOC_PIN12) | \ - PIN_MODE_INPUT(GPIOC_PIN13) | \ - PIN_MODE_INPUT(GPIOC_PIN14) | \ - PIN_MODE_INPUT(GPIOC_PIN15)) -#define VAL_GPIOC_OTYPER (PIN_OTYPE_PUSHPULL(GPIOC_PIN0) | \ - 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_PIN6) | \ - PIN_OTYPE_PUSHPULL(GPIOC_PIN7) | \ - PIN_OTYPE_PUSHPULL(GPIOC_PIN8) | \ - PIN_OTYPE_PUSHPULL(GPIOC_PIN9) | \ - PIN_OTYPE_PUSHPULL(GPIOC_PIN10) | \ - PIN_OTYPE_PUSHPULL(GPIOC_PIN11) | \ - PIN_OTYPE_PUSHPULL(GPIOC_PIN12) | \ - PIN_OTYPE_PUSHPULL(GPIOC_PIN13) | \ - PIN_OTYPE_PUSHPULL(GPIOC_PIN14) | \ - PIN_OTYPE_PUSHPULL(GPIOC_PIN15)) -#define VAL_GPIOC_OSPEEDR (PIN_OSPEED_HIGH(GPIOC_PIN0) | \ - PIN_OSPEED_HIGH(GPIOC_PIN1) | \ - PIN_OSPEED_HIGH(GPIOC_PIN2) | \ - PIN_OSPEED_HIGH(GPIOC_PIN3) | \ - PIN_OSPEED_HIGH(GPIOC_PIN4) | \ - PIN_OSPEED_HIGH(GPIOC_PIN5) | \ - PIN_OSPEED_HIGH(GPIOC_PIN6) | \ - PIN_OSPEED_HIGH(GPIOC_PIN7) | \ - PIN_OSPEED_HIGH(GPIOC_PIN8) | \ - PIN_OSPEED_HIGH(GPIOC_PIN9) | \ - PIN_OSPEED_HIGH(GPIOC_PIN10) | \ - PIN_OSPEED_HIGH(GPIOC_PIN11) | \ - PIN_OSPEED_HIGH(GPIOC_PIN12) | \ - PIN_OSPEED_HIGH(GPIOC_PIN13) | \ - PIN_OSPEED_HIGH(GPIOC_PIN14) | \ - PIN_OSPEED_HIGH(GPIOC_PIN15)) -#define VAL_GPIOC_PUPDR (PIN_PUPDR_PULLUP(GPIOC_PIN0) | \ - 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_PULLUP(GPIOC_PIN6) | \ - PIN_PUPDR_PULLUP(GPIOC_PIN7) | \ - PIN_PUPDR_PULLUP(GPIOC_PIN8) | \ - PIN_PUPDR_PULLUP(GPIOC_PIN9) | \ - PIN_PUPDR_PULLUP(GPIOC_PIN10) | \ - PIN_PUPDR_PULLUP(GPIOC_PIN11) | \ - PIN_PUPDR_PULLUP(GPIOC_PIN12) | \ - PIN_PUPDR_PULLUP(GPIOC_PIN13) | \ - PIN_PUPDR_PULLUP(GPIOC_PIN14) | \ - PIN_PUPDR_PULLUP(GPIOC_PIN15)) -#define VAL_GPIOC_ODR (PIN_ODR_HIGH(GPIOC_PIN0) | \ - 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_HIGH(GPIOC_PIN6) | \ - PIN_ODR_HIGH(GPIOC_PIN7) | \ - PIN_ODR_HIGH(GPIOC_PIN8) | \ - PIN_ODR_HIGH(GPIOC_PIN9) | \ - PIN_ODR_HIGH(GPIOC_PIN10) | \ - PIN_ODR_HIGH(GPIOC_PIN11) | \ - PIN_ODR_HIGH(GPIOC_PIN12) | \ - PIN_ODR_HIGH(GPIOC_PIN13) | \ - PIN_ODR_HIGH(GPIOC_PIN14) | \ - PIN_ODR_HIGH(GPIOC_PIN15)) -#define VAL_GPIOC_AFRL (PIN_AFIO_AF(GPIOC_PIN0, 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_PIN6, 0U) | \ - PIN_AFIO_AF(GPIOC_PIN7, 0U)) -#define VAL_GPIOC_AFRH (PIN_AFIO_AF(GPIOC_PIN8, 0U) | \ - PIN_AFIO_AF(GPIOC_PIN9, 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_PIN14, 0U) | \ - PIN_AFIO_AF(GPIOC_PIN15, 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_HIGH(GPIOD_PIN0) | \ - PIN_OSPEED_HIGH(GPIOD_PIN1) | \ - PIN_OSPEED_HIGH(GPIOD_PIN2) | \ - PIN_OSPEED_HIGH(GPIOD_PIN3) | \ - PIN_OSPEED_HIGH(GPIOD_PIN4) | \ - PIN_OSPEED_HIGH(GPIOD_PIN5) | \ - PIN_OSPEED_HIGH(GPIOD_PIN6) | \ - PIN_OSPEED_HIGH(GPIOD_PIN7) | \ - PIN_OSPEED_HIGH(GPIOD_PIN8) | \ - PIN_OSPEED_HIGH(GPIOD_PIN9) | \ - PIN_OSPEED_HIGH(GPIOD_PIN10) | \ - PIN_OSPEED_HIGH(GPIOD_PIN11) | \ - PIN_OSPEED_HIGH(GPIOD_PIN12) | \ - PIN_OSPEED_HIGH(GPIOD_PIN13) | \ - PIN_OSPEED_HIGH(GPIOD_PIN14) | \ - PIN_OSPEED_HIGH(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_HIGH(GPIOE_PIN0) | \ - PIN_OSPEED_HIGH(GPIOE_PIN1) | \ - PIN_OSPEED_HIGH(GPIOE_PIN2) | \ - PIN_OSPEED_HIGH(GPIOE_PIN3) | \ - PIN_OSPEED_HIGH(GPIOE_PIN4) | \ - PIN_OSPEED_HIGH(GPIOE_PIN5) | \ - PIN_OSPEED_HIGH(GPIOE_PIN6) | \ - PIN_OSPEED_HIGH(GPIOE_PIN7) | \ - PIN_OSPEED_HIGH(GPIOE_PIN8) | \ - PIN_OSPEED_HIGH(GPIOE_PIN9) | \ - PIN_OSPEED_HIGH(GPIOE_PIN10) | \ - PIN_OSPEED_HIGH(GPIOE_PIN11) | \ - PIN_OSPEED_HIGH(GPIOE_PIN12) | \ - PIN_OSPEED_HIGH(GPIOE_PIN13) | \ - PIN_OSPEED_HIGH(GPIOE_PIN14) | \ - PIN_OSPEED_HIGH(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 - COL7 - * PF1 - COL6 - * 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_PIN0) | \ - PIN_MODE_INPUT(GPIOF_PIN1) | \ - 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_PIN0) | \ - PIN_OTYPE_PUSHPULL(GPIOF_PIN1) | \ - 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_PIN0) | \ - PIN_OSPEED_VERYLOW(GPIOF_PIN1) | \ - PIN_OSPEED_HIGH(GPIOF_PIN2) | \ - PIN_OSPEED_HIGH(GPIOF_PIN3) | \ - PIN_OSPEED_HIGH(GPIOF_PIN4) | \ - PIN_OSPEED_HIGH(GPIOF_PIN5) | \ - PIN_OSPEED_HIGH(GPIOF_PIN6) | \ - PIN_OSPEED_HIGH(GPIOF_PIN7) | \ - PIN_OSPEED_HIGH(GPIOF_PIN8) | \ - PIN_OSPEED_HIGH(GPIOF_PIN9) | \ - PIN_OSPEED_HIGH(GPIOF_PIN10) | \ - PIN_OSPEED_HIGH(GPIOF_PIN11) | \ - PIN_OSPEED_HIGH(GPIOF_PIN12) | \ - PIN_OSPEED_HIGH(GPIOF_PIN13) | \ - PIN_OSPEED_HIGH(GPIOF_PIN14) | \ - PIN_OSPEED_HIGH(GPIOF_PIN15)) -#define VAL_GPIOF_PUPDR (PIN_PUPDR_PULLUP(GPIOF_PIN0) | \ - PIN_PUPDR_PULLUP(GPIOF_PIN1) | \ - 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_PIN0) | \ - PIN_ODR_HIGH(GPIOF_PIN1) | \ - 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_PIN0, 0U) | \ - PIN_AFIO_AF(GPIOF_PIN1, 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/keyboards/vinta/boards/GENERIC_STM32_F042X6/board.mk b/keyboards/vinta/boards/GENERIC_STM32_F042X6/board.mk deleted file mode 100644 index bbeb5bbff728..000000000000 --- a/keyboards/vinta/boards/GENERIC_STM32_F042X6/board.mk +++ /dev/null @@ -1,5 +0,0 @@ -# List of all the board related files. -BOARDSRC = $(BOARD_PATH)/boards/GENERIC_STM32_F042X6/board.c - -# Required include directories -BOARDINC = $(BOARD_PATH)/boards/GENERIC_STM32_F042X6 diff --git a/keyboards/vinta/bootloader_defs.h b/keyboards/vinta/bootloader_defs.h deleted file mode 100644 index 4994be9c24c3..000000000000 --- a/keyboards/vinta/bootloader_defs.h +++ /dev/null @@ -1,7 +0,0 @@ -/* Address for jumping to bootloader on STM32 chips. */ -/* It is chip dependent, the correct number can be looked up here: - * 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 - */ -#define STM32_BOOTLOADER_ADDRESS 0x1FFFC400 \ No newline at end of file diff --git a/lib/python/qmk/cli/cformat.py b/lib/python/qmk/cli/cformat.py index 600161c5c53c..6bcd15a1102a 100644 --- a/lib/python/qmk/cli/cformat.py +++ b/lib/python/qmk/cli/cformat.py @@ -43,8 +43,8 @@ def cformat(cli): # Empty array for files files = [] # Core directories for formatting - core_dirs = ['drivers', 'quantum', 'tests', 'tmk_core'] - ignores = ['tmk_core/protocol/usb_hid', 'quantum/template'] + core_dirs = ['drivers', 'quantum', 'tests', 'tmk_core', 'platforms'] + ignores = ['tmk_core/protocol/usb_hid', 'quantum/template', 'platforms/chibios'] # Find the list of files to format if cli.args.files: files.extend(normpath(file) for file in cli.args.files) diff --git a/platforms/chibios/BLACKPILL_STM32_F401/board/board.mk b/platforms/chibios/BLACKPILL_STM32_F401/board/board.mk new file mode 100644 index 000000000000..fddf7dace499 --- /dev/null +++ b/platforms/chibios/BLACKPILL_STM32_F401/board/board.mk @@ -0,0 +1,9 @@ +# List of all the board related files. +BOARDSRC = $(CHIBIOS)/os/hal/boards/ST_STM32F401C_DISCOVERY/board.c + +# Required include directories +BOARDINC = $(CHIBIOS)/os/hal/boards/ST_STM32F401C_DISCOVERY + +# Shared variables +ALLCSRC += $(BOARDSRC) +ALLINC += $(BOARDINC) diff --git a/platforms/chibios/BLACKPILL_STM32_F401/configs/board.h b/platforms/chibios/BLACKPILL_STM32_F401/configs/board.h new file mode 100644 index 000000000000..30af6b0c8608 --- /dev/null +++ b/platforms/chibios/BLACKPILL_STM32_F401/configs/board.h @@ -0,0 +1,20 @@ +/* Copyright 2020 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 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License 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_next "board.h" + +#undef STM32_HSE_BYPASS diff --git a/keyboards/handwired/onekey/blackpill_f401/chconf.h b/platforms/chibios/BLACKPILL_STM32_F401/configs/chconf.h similarity index 100% rename from keyboards/handwired/onekey/blackpill_f401/chconf.h rename to platforms/chibios/BLACKPILL_STM32_F401/configs/chconf.h diff --git a/platforms/chibios/BLACKPILL_STM32_F401/configs/config.h b/platforms/chibios/BLACKPILL_STM32_F401/configs/config.h new file mode 100644 index 000000000000..eb73e72ef282 --- /dev/null +++ b/platforms/chibios/BLACKPILL_STM32_F401/configs/config.h @@ -0,0 +1,23 @@ +/* Copyright 2020 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 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License 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 BOARD_OTG_NOVBUSSENS 1 + +#define STM32_LSECLK 32768U +#define STM32_HSECLK 25000000U + +#define EARLY_INIT_PERFORM_BOOTLOADER_JUMP TRUE diff --git a/platforms/chibios/BLACKPILL_STM32_F401/configs/halconf.h b/platforms/chibios/BLACKPILL_STM32_F401/configs/halconf.h new file mode 100644 index 000000000000..a8db392aaa6c --- /dev/null +++ b/platforms/chibios/BLACKPILL_STM32_F401/configs/halconf.h @@ -0,0 +1,525 @@ +/* + 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. + 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 + +#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 +#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 cryptographic subsystem. + */ +#if !defined(HAL_USE_CRY) || defined(__DOXYGEN__) +#define HAL_USE_CRY FALSE +#endif + +/** + * @brief Enables the DAC subsystem. + */ +#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 +#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 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 +#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 +#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 + +/** + * @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. */ +/*===========================================================================*/ + +/** + * @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 + +/** + * @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. */ +/*===========================================================================*/ + +/** + * @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 the zero-copy API. + */ +#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 + +/** + * @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. */ +/*===========================================================================*/ + +/** + * @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 16 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 256 bytes for both the transmission and receive + * buffers. + */ +#if !defined(SERIAL_USB_BUFFERS_SIZE) || defined(__DOXYGEN__) +#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 + +/*===========================================================================*/ +/* 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 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 +#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. */ +/*===========================================================================*/ + +/** + * @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 + +/*===========================================================================*/ +/* 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/platforms/chibios/BLACKPILL_STM32_F401/configs/mcuconf.h b/platforms/chibios/BLACKPILL_STM32_F401/configs/mcuconf.h new file mode 100644 index 000000000000..ba6e934fe7bd --- /dev/null +++ b/platforms/chibios/BLACKPILL_STM32_F401/configs/mcuconf.h @@ -0,0 +1,253 @@ +/* + 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. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#ifndef MCUCONF_H +#define MCUCONF_H + +/* + * STM32F4xx 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: + * 15...0 Lowest...Highest. + * + * DMA priorities: + * 0...3 Lowest...Highest. + */ + +#define STM32F4xx_MCUCONF + +/* + * HAL driver system settings. + */ +#define STM32_NO_INIT FALSE +#define STM32_HSI_ENABLED TRUE +#define STM32_LSI_ENABLED TRUE +#define STM32_HSE_ENABLED TRUE +#define STM32_LSE_ENABLED FALSE +#define STM32_CLOCK48_REQUIRED TRUE +#define STM32_SW STM32_SW_PLL +#define STM32_PLLSRC STM32_PLLSRC_HSE +#define STM32_PLLM_VALUE 25 +#define STM32_PLLN_VALUE 336 +#define STM32_PLLP_VALUE 4 +#define STM32_PLLQ_VALUE 7 +#define STM32_HPRE STM32_HPRE_DIV1 +#define STM32_PPRE1 STM32_PPRE1_DIV4 +#define STM32_PPRE2 STM32_PPRE2_DIV2 +#define STM32_RTCSEL STM32_RTCSEL_LSI +#define STM32_RTCPRE_VALUE 8 +#define STM32_MCO1SEL STM32_MCO1SEL_HSI +#define STM32_MCO1PRE STM32_MCO1PRE_DIV1 +#define STM32_MCO2SEL STM32_MCO2SEL_SYSCLK +#define STM32_MCO2PRE STM32_MCO2PRE_DIV5 +#define STM32_I2SSRC STM32_I2SSRC_CKIN +#define STM32_PLLI2SN_VALUE 192 +#define STM32_PLLI2SR_VALUE 5 +#define STM32_PVD_ENABLE FALSE +#define STM32_PLS STM32_PLS_LEV0 +#define STM32_BKPRAM_ENABLE FALSE + +/* + * 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 6 +#define STM32_IRQ_EXTI20_PRIORITY 6 +#define STM32_IRQ_EXTI21_PRIORITY 15 +#define STM32_IRQ_EXTI22_PRIORITY 15 + +/* + * ADC driver system settings. + */ +#define STM32_ADC_ADCPRE ADC_CCR_ADCPRE_DIV4 +#define STM32_ADC_USE_ADC1 FALSE +#define STM32_ADC_ADC1_DMA_STREAM STM32_DMA_STREAM_ID(2, 4) +#define STM32_ADC_ADC1_DMA_PRIORITY 2 +#define STM32_ADC_IRQ_PRIORITY 6 +#define STM32_ADC_ADC1_DMA_IRQ_PRIORITY 6 + +/* + * 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_TIM4 FALSE +#define STM32_GPT_USE_TIM5 FALSE +#define STM32_GPT_USE_TIM9 FALSE +#define STM32_GPT_USE_TIM11 FALSE +#define STM32_GPT_TIM1_IRQ_PRIORITY 7 +#define STM32_GPT_TIM2_IRQ_PRIORITY 7 +#define STM32_GPT_TIM3_IRQ_PRIORITY 7 +#define STM32_GPT_TIM4_IRQ_PRIORITY 7 +#define STM32_GPT_TIM5_IRQ_PRIORITY 7 +#define STM32_GPT_TIM9_IRQ_PRIORITY 7 +#define STM32_GPT_TIM11_IRQ_PRIORITY 7 + +/* + * I2C driver system settings. + */ +#define STM32_I2C_USE_I2C1 FALSE +#define STM32_I2C_USE_I2C2 FALSE +#define STM32_I2C_USE_I2C3 FALSE +#define STM32_I2C_BUSY_TIMEOUT 50 +#define STM32_I2C_I2C1_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 0) +#define STM32_I2C_I2C1_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 6) +#define STM32_I2C_I2C2_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 2) +#define STM32_I2C_I2C2_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 7) +#define STM32_I2C_I2C3_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 2) +#define STM32_I2C_I2C3_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 4) +#define STM32_I2C_I2C1_IRQ_PRIORITY 5 +#define STM32_I2C_I2C2_IRQ_PRIORITY 5 +#define STM32_I2C_I2C3_IRQ_PRIORITY 5 +#define STM32_I2C_I2C1_DMA_PRIORITY 3 +#define STM32_I2C_I2C2_DMA_PRIORITY 3 +#define STM32_I2C_I2C3_DMA_PRIORITY 3 +#define STM32_I2C_DMA_ERROR_HOOK(i2cp) osalSysHalt("DMA failure") + +/* + * I2S driver system settings. + */ +#define STM32_I2S_USE_SPI2 FALSE +#define STM32_I2S_USE_SPI3 FALSE +#define STM32_I2S_SPI2_IRQ_PRIORITY 10 +#define STM32_I2S_SPI3_IRQ_PRIORITY 10 +#define STM32_I2S_SPI2_DMA_PRIORITY 1 +#define STM32_I2S_SPI3_DMA_PRIORITY 1 +#define STM32_I2S_SPI2_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 3) +#define STM32_I2S_SPI2_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 4) +#define STM32_I2S_SPI3_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 0) +#define STM32_I2S_SPI3_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 7) +#define STM32_I2S_DMA_ERROR_HOOK(i2sp) 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_USE_TIM4 FALSE +#define STM32_ICU_USE_TIM5 FALSE +#define STM32_ICU_USE_TIM9 FALSE +#define STM32_ICU_TIM1_IRQ_PRIORITY 7 +#define STM32_ICU_TIM2_IRQ_PRIORITY 7 +#define STM32_ICU_TIM3_IRQ_PRIORITY 7 +#define STM32_ICU_TIM4_IRQ_PRIORITY 7 +#define STM32_ICU_TIM5_IRQ_PRIORITY 7 +#define STM32_ICU_TIM9_IRQ_PRIORITY 7 + +/* + * 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_USE_TIM4 FALSE +#define STM32_PWM_USE_TIM5 FALSE +#define STM32_PWM_USE_TIM9 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_TIM5_IRQ_PRIORITY 7 +#define STM32_PWM_TIM9_IRQ_PRIORITY 7 + +/* + * SERIAL driver system settings. + */ +#define STM32_SERIAL_USE_USART1 FALSE +#define STM32_SERIAL_USE_USART2 FALSE +#define STM32_SERIAL_USE_USART6 FALSE +#define STM32_SERIAL_USART1_PRIORITY 12 +#define STM32_SERIAL_USART2_PRIORITY 12 +#define STM32_SERIAL_USART6_PRIORITY 12 + +/* + * SPI driver system settings. + */ +#define STM32_SPI_USE_SPI1 FALSE +#define STM32_SPI_USE_SPI2 FALSE +#define STM32_SPI_USE_SPI3 FALSE +#define STM32_SPI_SPI1_RX_DMA_STREAM STM32_DMA_STREAM_ID(2, 0) +#define STM32_SPI_SPI1_TX_DMA_STREAM STM32_DMA_STREAM_ID(2, 3) +#define STM32_SPI_SPI2_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 3) +#define STM32_SPI_SPI2_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 4) +#define STM32_SPI_SPI3_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 0) +#define STM32_SPI_SPI3_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 7) +#define STM32_SPI_SPI1_DMA_PRIORITY 1 +#define STM32_SPI_SPI2_DMA_PRIORITY 1 +#define STM32_SPI_SPI3_DMA_PRIORITY 1 +#define STM32_SPI_SPI1_IRQ_PRIORITY 10 +#define STM32_SPI_SPI2_IRQ_PRIORITY 10 +#define STM32_SPI_SPI3_IRQ_PRIORITY 10 +#define STM32_SPI_DMA_ERROR_HOOK(spip) osalSysHalt("DMA failure") + +/* + * ST driver system settings. + */ +#define STM32_ST_IRQ_PRIORITY 8 +#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_USE_USART6 FALSE +#define STM32_UART_USART1_RX_DMA_STREAM STM32_DMA_STREAM_ID(2, 5) +#define STM32_UART_USART1_TX_DMA_STREAM STM32_DMA_STREAM_ID(2, 7) +#define STM32_UART_USART2_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 5) +#define STM32_UART_USART2_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 6) +#define STM32_UART_USART6_RX_DMA_STREAM STM32_DMA_STREAM_ID(2, 2) +#define STM32_UART_USART6_TX_DMA_STREAM STM32_DMA_STREAM_ID(2, 7) +#define STM32_UART_USART1_IRQ_PRIORITY 12 +#define STM32_UART_USART2_IRQ_PRIORITY 12 +#define STM32_UART_USART6_IRQ_PRIORITY 12 +#define STM32_UART_USART1_DMA_PRIORITY 0 +#define STM32_UART_USART2_DMA_PRIORITY 0 +#define STM32_UART_USART6_DMA_PRIORITY 0 +#define STM32_UART_DMA_ERROR_HOOK(uartp) osalSysHalt("DMA failure") + +/* + * USB driver system settings. + */ +#define STM32_USB_USE_OTG1 TRUE +#define STM32_USB_OTG1_IRQ_PRIORITY 14 +#define STM32_USB_OTG1_RX_FIFO_SIZE 512 +#define STM32_USB_OTG_THREAD_PRIO NORMALPRIO+1 +#define STM32_USB_OTG_THREAD_STACK_SIZE 128 +#define STM32_USB_OTGFIFO_FILL_BASEPRI 0 + +/* + * WDG driver system settings. + */ +#define STM32_WDG_USE_IWDG FALSE + +#endif /* MCUCONF_H */ diff --git a/platforms/chibios/BLACKPILL_STM32_F411/board/board.mk b/platforms/chibios/BLACKPILL_STM32_F411/board/board.mk new file mode 100644 index 000000000000..bb00b1a2b0dc --- /dev/null +++ b/platforms/chibios/BLACKPILL_STM32_F411/board/board.mk @@ -0,0 +1,9 @@ +# List of all the board related files. +BOARDSRC = $(CHIBIOS)/os/hal/boards/ST_NUCLEO64_F411RE/board.c + +# Required include directories +BOARDINC = $(CHIBIOS)/os/hal/boards/ST_NUCLEO64_F411RE + +# Shared variables +ALLCSRC += $(BOARDSRC) +ALLINC += $(BOARDINC) diff --git a/platforms/chibios/BLACKPILL_STM32_F411/configs/board.h b/platforms/chibios/BLACKPILL_STM32_F411/configs/board.h new file mode 100644 index 000000000000..30af6b0c8608 --- /dev/null +++ b/platforms/chibios/BLACKPILL_STM32_F411/configs/board.h @@ -0,0 +1,20 @@ +/* Copyright 2020 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 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License 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_next "board.h" + +#undef STM32_HSE_BYPASS diff --git a/keyboards/handwired/onekey/blackpill_f411/chconf.h b/platforms/chibios/BLACKPILL_STM32_F411/configs/chconf.h similarity index 100% rename from keyboards/handwired/onekey/blackpill_f411/chconf.h rename to platforms/chibios/BLACKPILL_STM32_F411/configs/chconf.h diff --git a/platforms/chibios/BLACKPILL_STM32_F411/configs/config.h b/platforms/chibios/BLACKPILL_STM32_F411/configs/config.h new file mode 100644 index 000000000000..eb73e72ef282 --- /dev/null +++ b/platforms/chibios/BLACKPILL_STM32_F411/configs/config.h @@ -0,0 +1,23 @@ +/* Copyright 2020 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 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License 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 BOARD_OTG_NOVBUSSENS 1 + +#define STM32_LSECLK 32768U +#define STM32_HSECLK 25000000U + +#define EARLY_INIT_PERFORM_BOOTLOADER_JUMP TRUE diff --git a/platforms/chibios/BLACKPILL_STM32_F411/configs/halconf.h b/platforms/chibios/BLACKPILL_STM32_F411/configs/halconf.h new file mode 100644 index 000000000000..a8db392aaa6c --- /dev/null +++ b/platforms/chibios/BLACKPILL_STM32_F411/configs/halconf.h @@ -0,0 +1,525 @@ +/* + 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. + 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 + +#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 +#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 cryptographic subsystem. + */ +#if !defined(HAL_USE_CRY) || defined(__DOXYGEN__) +#define HAL_USE_CRY FALSE +#endif + +/** + * @brief Enables the DAC subsystem. + */ +#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 +#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 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 +#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 +#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 + +/** + * @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. */ +/*===========================================================================*/ + +/** + * @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 + +/** + * @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. */ +/*===========================================================================*/ + +/** + * @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 the zero-copy API. + */ +#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 + +/** + * @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. */ +/*===========================================================================*/ + +/** + * @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 16 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 256 bytes for both the transmission and receive + * buffers. + */ +#if !defined(SERIAL_USB_BUFFERS_SIZE) || defined(__DOXYGEN__) +#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 + +/*===========================================================================*/ +/* 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 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 +#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. */ +/*===========================================================================*/ + +/** + * @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 + +/*===========================================================================*/ +/* 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/platforms/chibios/BLACKPILL_STM32_F411/configs/mcuconf.h b/platforms/chibios/BLACKPILL_STM32_F411/configs/mcuconf.h new file mode 100644 index 000000000000..0394ff56bb97 --- /dev/null +++ b/platforms/chibios/BLACKPILL_STM32_F411/configs/mcuconf.h @@ -0,0 +1,253 @@ +/* + 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. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#ifndef MCUCONF_H +#define MCUCONF_H + +/* + * STM32F4xx 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: + * 15...0 Lowest...Highest. + * + * DMA priorities: + * 0...3 Lowest...Highest. + */ + +#define STM32F4xx_MCUCONF + +/* + * HAL driver system settings. + */ +#define STM32_NO_INIT FALSE +#define STM32_HSI_ENABLED TRUE +#define STM32_LSI_ENABLED TRUE +#define STM32_HSE_ENABLED TRUE +#define STM32_LSE_ENABLED FALSE +#define STM32_CLOCK48_REQUIRED TRUE +#define STM32_SW STM32_SW_PLL +#define STM32_PLLSRC STM32_PLLSRC_HSE +#define STM32_PLLM_VALUE 25 +#define STM32_PLLN_VALUE 384 +#define STM32_PLLP_VALUE 4 +#define STM32_PLLQ_VALUE 8 +#define STM32_HPRE STM32_HPRE_DIV1 +#define STM32_PPRE1 STM32_PPRE1_DIV4 +#define STM32_PPRE2 STM32_PPRE2_DIV2 +#define STM32_RTCSEL STM32_RTCSEL_LSI +#define STM32_RTCPRE_VALUE 8 +#define STM32_MCO1SEL STM32_MCO1SEL_HSI +#define STM32_MCO1PRE STM32_MCO1PRE_DIV1 +#define STM32_MCO2SEL STM32_MCO2SEL_SYSCLK +#define STM32_MCO2PRE STM32_MCO2PRE_DIV5 +#define STM32_I2SSRC STM32_I2SSRC_CKIN +#define STM32_PLLI2SN_VALUE 192 +#define STM32_PLLI2SR_VALUE 5 +#define STM32_PVD_ENABLE FALSE +#define STM32_PLS STM32_PLS_LEV0 +#define STM32_BKPRAM_ENABLE FALSE + +/* + * 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 6 +#define STM32_IRQ_EXTI20_PRIORITY 6 +#define STM32_IRQ_EXTI21_PRIORITY 15 +#define STM32_IRQ_EXTI22_PRIORITY 15 + +/* + * ADC driver system settings. + */ +#define STM32_ADC_ADCPRE ADC_CCR_ADCPRE_DIV4 +#define STM32_ADC_USE_ADC1 FALSE +#define STM32_ADC_ADC1_DMA_STREAM STM32_DMA_STREAM_ID(2, 4) +#define STM32_ADC_ADC1_DMA_PRIORITY 2 +#define STM32_ADC_IRQ_PRIORITY 6 +#define STM32_ADC_ADC1_DMA_IRQ_PRIORITY 6 + +/* + * 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_TIM4 FALSE +#define STM32_GPT_USE_TIM5 FALSE +#define STM32_GPT_USE_TIM9 FALSE +#define STM32_GPT_USE_TIM11 FALSE +#define STM32_GPT_TIM1_IRQ_PRIORITY 7 +#define STM32_GPT_TIM2_IRQ_PRIORITY 7 +#define STM32_GPT_TIM3_IRQ_PRIORITY 7 +#define STM32_GPT_TIM4_IRQ_PRIORITY 7 +#define STM32_GPT_TIM5_IRQ_PRIORITY 7 +#define STM32_GPT_TIM9_IRQ_PRIORITY 7 +#define STM32_GPT_TIM11_IRQ_PRIORITY 7 + +/* + * I2C driver system settings. + */ +#define STM32_I2C_USE_I2C1 FALSE +#define STM32_I2C_USE_I2C2 FALSE +#define STM32_I2C_USE_I2C3 FALSE +#define STM32_I2C_BUSY_TIMEOUT 50 +#define STM32_I2C_I2C1_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 0) +#define STM32_I2C_I2C1_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 6) +#define STM32_I2C_I2C2_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 2) +#define STM32_I2C_I2C2_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 7) +#define STM32_I2C_I2C3_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 2) +#define STM32_I2C_I2C3_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 4) +#define STM32_I2C_I2C1_IRQ_PRIORITY 5 +#define STM32_I2C_I2C2_IRQ_PRIORITY 5 +#define STM32_I2C_I2C3_IRQ_PRIORITY 5 +#define STM32_I2C_I2C1_DMA_PRIORITY 3 +#define STM32_I2C_I2C2_DMA_PRIORITY 3 +#define STM32_I2C_I2C3_DMA_PRIORITY 3 +#define STM32_I2C_DMA_ERROR_HOOK(i2cp) osalSysHalt("DMA failure") + +/* + * I2S driver system settings. + */ +#define STM32_I2S_USE_SPI2 FALSE +#define STM32_I2S_USE_SPI3 FALSE +#define STM32_I2S_SPI2_IRQ_PRIORITY 10 +#define STM32_I2S_SPI3_IRQ_PRIORITY 10 +#define STM32_I2S_SPI2_DMA_PRIORITY 1 +#define STM32_I2S_SPI3_DMA_PRIORITY 1 +#define STM32_I2S_SPI2_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 3) +#define STM32_I2S_SPI2_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 4) +#define STM32_I2S_SPI3_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 0) +#define STM32_I2S_SPI3_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 7) +#define STM32_I2S_DMA_ERROR_HOOK(i2sp) 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_USE_TIM4 FALSE +#define STM32_ICU_USE_TIM5 FALSE +#define STM32_ICU_USE_TIM9 FALSE +#define STM32_ICU_TIM1_IRQ_PRIORITY 7 +#define STM32_ICU_TIM2_IRQ_PRIORITY 7 +#define STM32_ICU_TIM3_IRQ_PRIORITY 7 +#define STM32_ICU_TIM4_IRQ_PRIORITY 7 +#define STM32_ICU_TIM5_IRQ_PRIORITY 7 +#define STM32_ICU_TIM9_IRQ_PRIORITY 7 + +/* + * 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_USE_TIM4 FALSE +#define STM32_PWM_USE_TIM5 FALSE +#define STM32_PWM_USE_TIM9 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_TIM5_IRQ_PRIORITY 7 +#define STM32_PWM_TIM9_IRQ_PRIORITY 7 + +/* + * SERIAL driver system settings. + */ +#define STM32_SERIAL_USE_USART1 FALSE +#define STM32_SERIAL_USE_USART2 FALSE +#define STM32_SERIAL_USE_USART6 FALSE +#define STM32_SERIAL_USART1_PRIORITY 12 +#define STM32_SERIAL_USART2_PRIORITY 12 +#define STM32_SERIAL_USART6_PRIORITY 12 + +/* + * SPI driver system settings. + */ +#define STM32_SPI_USE_SPI1 FALSE +#define STM32_SPI_USE_SPI2 FALSE +#define STM32_SPI_USE_SPI3 FALSE +#define STM32_SPI_SPI1_RX_DMA_STREAM STM32_DMA_STREAM_ID(2, 0) +#define STM32_SPI_SPI1_TX_DMA_STREAM STM32_DMA_STREAM_ID(2, 3) +#define STM32_SPI_SPI2_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 3) +#define STM32_SPI_SPI2_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 4) +#define STM32_SPI_SPI3_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 0) +#define STM32_SPI_SPI3_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 7) +#define STM32_SPI_SPI1_DMA_PRIORITY 1 +#define STM32_SPI_SPI2_DMA_PRIORITY 1 +#define STM32_SPI_SPI3_DMA_PRIORITY 1 +#define STM32_SPI_SPI1_IRQ_PRIORITY 10 +#define STM32_SPI_SPI2_IRQ_PRIORITY 10 +#define STM32_SPI_SPI3_IRQ_PRIORITY 10 +#define STM32_SPI_DMA_ERROR_HOOK(spip) osalSysHalt("DMA failure") + +/* + * ST driver system settings. + */ +#define STM32_ST_IRQ_PRIORITY 8 +#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_USE_USART6 FALSE +#define STM32_UART_USART1_RX_DMA_STREAM STM32_DMA_STREAM_ID(2, 5) +#define STM32_UART_USART1_TX_DMA_STREAM STM32_DMA_STREAM_ID(2, 7) +#define STM32_UART_USART2_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 5) +#define STM32_UART_USART2_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 6) +#define STM32_UART_USART6_RX_DMA_STREAM STM32_DMA_STREAM_ID(2, 2) +#define STM32_UART_USART6_TX_DMA_STREAM STM32_DMA_STREAM_ID(2, 7) +#define STM32_UART_USART1_IRQ_PRIORITY 12 +#define STM32_UART_USART2_IRQ_PRIORITY 12 +#define STM32_UART_USART6_IRQ_PRIORITY 12 +#define STM32_UART_USART1_DMA_PRIORITY 0 +#define STM32_UART_USART2_DMA_PRIORITY 0 +#define STM32_UART_USART6_DMA_PRIORITY 0 +#define STM32_UART_DMA_ERROR_HOOK(uartp) osalSysHalt("DMA failure") + +/* + * USB driver system settings. + */ +#define STM32_USB_USE_OTG1 TRUE +#define STM32_USB_OTG1_IRQ_PRIORITY 14 +#define STM32_USB_OTG1_RX_FIFO_SIZE 512 +#define STM32_USB_OTG_THREAD_PRIO NORMALPRIO+1 +#define STM32_USB_OTG_THREAD_STACK_SIZE 128 +#define STM32_USB_OTGFIFO_FILL_BASEPRI 0 + +/* + * WDG driver system settings. + */ +#define STM32_WDG_USE_IWDG FALSE + +#endif /* MCUCONF_H */ diff --git a/keyboards/vinta/boards/GENERIC_STM32_F042X6/board.c b/platforms/chibios/GENERIC_STM32_F042X6/board/board.c similarity index 99% rename from keyboards/vinta/boards/GENERIC_STM32_F042X6/board.c rename to platforms/chibios/GENERIC_STM32_F042X6/board/board.c index 754dc5c4dd05..7d93b68f9c1d 100644 --- a/keyboards/vinta/boards/GENERIC_STM32_F042X6/board.c +++ b/platforms/chibios/GENERIC_STM32_F042X6/board/board.c @@ -202,13 +202,14 @@ static void stm32_gpio_init(void) { /* Driver exported functions. */ /*===========================================================================*/ +__attribute__((weak)) void enter_bootloader_mode_if_requested(void) {} + /** * @brief Early initialization code. * @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(); diff --git a/keyboards/peiorisboards/ixora/boards/GENERIC_STM32_F042X6/board.h b/platforms/chibios/GENERIC_STM32_F042X6/board/board.h similarity index 100% rename from keyboards/peiorisboards/ixora/boards/GENERIC_STM32_F042X6/board.h rename to platforms/chibios/GENERIC_STM32_F042X6/board/board.h diff --git a/drivers/boards/GENERIC_STM32_F072XB/board.mk b/platforms/chibios/GENERIC_STM32_F042X6/board/board.mk similarity index 54% rename from drivers/boards/GENERIC_STM32_F072XB/board.mk rename to platforms/chibios/GENERIC_STM32_F042X6/board/board.mk index bd6f878269bc..842e33590594 100644 --- a/drivers/boards/GENERIC_STM32_F072XB/board.mk +++ b/platforms/chibios/GENERIC_STM32_F042X6/board/board.mk @@ -1,8 +1,8 @@ # List of all the board related files. -BOARDSRC = $(BOARD_PATH)/boards/GENERIC_STM32_F072XB/board.c +BOARDSRC = $(BOARD_PATH)/board/board.c # Required include directories -BOARDINC = $(BOARD_PATH)/boards/GENERIC_STM32_F072XB +BOARDINC = $(BOARD_PATH)/board # Shared variables ALLCSRC += $(BOARDSRC) diff --git a/keyboards/peiorisboards/ixora/bootloader_defs.h b/platforms/chibios/GENERIC_STM32_F042X6/configs/bootloader_defs.h similarity index 100% rename from keyboards/peiorisboards/ixora/bootloader_defs.h rename to platforms/chibios/GENERIC_STM32_F042X6/configs/bootloader_defs.h diff --git a/drivers/boards/GENERIC_STM32_F072XB/board.c b/platforms/chibios/GENERIC_STM32_F072XB/board/board.c similarity index 100% rename from drivers/boards/GENERIC_STM32_F072XB/board.c rename to platforms/chibios/GENERIC_STM32_F072XB/board/board.c diff --git a/drivers/boards/GENERIC_STM32_F072XB/board.h b/platforms/chibios/GENERIC_STM32_F072XB/board/board.h similarity index 100% rename from drivers/boards/GENERIC_STM32_F072XB/board.h rename to platforms/chibios/GENERIC_STM32_F072XB/board/board.h diff --git a/drivers/boards/BLACKPILL_STM32_F411/board.mk b/platforms/chibios/GENERIC_STM32_F072XB/board/board.mk similarity index 54% rename from drivers/boards/BLACKPILL_STM32_F411/board.mk rename to platforms/chibios/GENERIC_STM32_F072XB/board/board.mk index 93c1e62f5d7d..842e33590594 100644 --- a/drivers/boards/BLACKPILL_STM32_F411/board.mk +++ b/platforms/chibios/GENERIC_STM32_F072XB/board/board.mk @@ -1,8 +1,8 @@ # List of all the board related files. -BOARDSRC = $(BOARD_PATH)/boards/BLACKPILL_STM32_F411/board.c +BOARDSRC = $(BOARD_PATH)/board/board.c # Required include directories -BOARDINC = $(BOARD_PATH)/boards/BLACKPILL_STM32_F411 +BOARDINC = $(BOARD_PATH)/board # Shared variables ALLCSRC += $(BOARDSRC) diff --git a/drivers/boards/GENERIC_STM32_F072XB/bootloader_defs.h b/platforms/chibios/GENERIC_STM32_F072XB/configs/bootloader_defs.h similarity index 100% rename from drivers/boards/GENERIC_STM32_F072XB/bootloader_defs.h rename to platforms/chibios/GENERIC_STM32_F072XB/configs/bootloader_defs.h diff --git a/drivers/boards/GENERIC_STM32_F303XC/board.c b/platforms/chibios/GENERIC_STM32_F303XC/board/board.c similarity index 99% rename from drivers/boards/GENERIC_STM32_F303XC/board.c rename to platforms/chibios/GENERIC_STM32_F303XC/board/board.c index 9b0fc1b6b958..4722acd648fe 100644 --- a/drivers/boards/GENERIC_STM32_F303XC/board.c +++ b/platforms/chibios/GENERIC_STM32_F303XC/board/board.c @@ -181,7 +181,7 @@ static void stm32_gpio_init(void) { #endif } -void enter_bootloader_mode_if_requested(void); +__attribute__((weak)) void enter_bootloader_mode_if_requested(void) {} /** * @brief Early initialization code. diff --git a/drivers/boards/GENERIC_STM32_F303XC/board.h b/platforms/chibios/GENERIC_STM32_F303XC/board/board.h similarity index 100% rename from drivers/boards/GENERIC_STM32_F303XC/board.h rename to platforms/chibios/GENERIC_STM32_F303XC/board/board.h diff --git a/drivers/boards/BLACKPILL_STM32_F401/board.mk b/platforms/chibios/GENERIC_STM32_F303XC/board/board.mk similarity index 54% rename from drivers/boards/BLACKPILL_STM32_F401/board.mk rename to platforms/chibios/GENERIC_STM32_F303XC/board/board.mk index 33473ed6b1d4..842e33590594 100644 --- a/drivers/boards/BLACKPILL_STM32_F401/board.mk +++ b/platforms/chibios/GENERIC_STM32_F303XC/board/board.mk @@ -1,8 +1,8 @@ # List of all the board related files. -BOARDSRC = $(BOARD_PATH)/boards/BLACKPILL_STM32_F401/board.c +BOARDSRC = $(BOARD_PATH)/board/board.c # Required include directories -BOARDINC = $(BOARD_PATH)/boards/BLACKPILL_STM32_F401 +BOARDINC = $(BOARD_PATH)/board # Shared variables ALLCSRC += $(BOARDSRC) diff --git a/drivers/boards/GENERIC_STM32_F303XC/bootloader_defs.h b/platforms/chibios/GENERIC_STM32_F303XC/configs/bootloader_defs.h similarity index 100% rename from drivers/boards/GENERIC_STM32_F303XC/bootloader_defs.h rename to platforms/chibios/GENERIC_STM32_F303XC/configs/bootloader_defs.h diff --git a/quantum/stm32/chconf.h b/platforms/chibios/GENERIC_STM32_F303XC/configs/chconf.h similarity index 68% rename from quantum/stm32/chconf.h rename to platforms/chibios/GENERIC_STM32_F303XC/configs/chconf.h index b6e66f9e4988..aac33037058e 100644 --- a/quantum/stm32/chconf.h +++ b/platforms/chibios/GENERIC_STM32_F303XC/configs/chconf.h @@ -26,10 +26,10 @@ */ #ifndef CHCONF_H -# define CHCONF_H +#define CHCONF_H -# define _CHIBIOS_RT_CONF_ -# define _CHIBIOS_RT_CONF_VER_6_0_ +#define _CHIBIOS_RT_CONF_ +#define _CHIBIOS_RT_CONF_VER_6_0_ /*===========================================================================*/ /** @@ -42,34 +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 +#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 +#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 +#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 +#if !defined(CH_CFG_TIME_TYPES_SIZE) +#define CH_CFG_TIME_TYPES_SIZE 32 +#endif /** * @brief Time delta constant for the tick-less mode. @@ -79,9 +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 +#if !defined(CH_CFG_ST_TIMEDELTA) +#define CH_CFG_ST_TIMEDELTA 2 +#endif /** @} */ @@ -104,9 +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 +#if !defined(CH_CFG_TIME_QUANTUM) +#define CH_CFG_TIME_QUANTUM 0 +#endif /** * @brief Managed RAM size. @@ -119,9 +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 +#if !defined(CH_CFG_MEMCORE_SIZE) +#define CH_CFG_MEMCORE_SIZE 0 +#endif /** * @brief Idle thread automatic spawn suppression. @@ -130,9 +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 +#if !defined(CH_CFG_NO_IDLE_THREAD) +#define CH_CFG_NO_IDLE_THREAD FALSE +#endif /** @} */ @@ -151,9 +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 +#if !defined(CH_CFG_OPTIMIZE_SPEED) +#define CH_CFG_OPTIMIZE_SPEED TRUE +#endif /** @} */ @@ -171,9 +171,9 @@ * * @note The default is @p TRUE. */ -# if !defined(CH_CFG_USE_TM) -# define CH_CFG_USE_TM TRUE -# endif +#if !defined(CH_CFG_USE_TM) +#define CH_CFG_USE_TM TRUE +#endif /** * @brief Threads registry APIs. @@ -181,9 +181,9 @@ * * @note The default is @p TRUE. */ -# if !defined(CH_CFG_USE_REGISTRY) -# define CH_CFG_USE_REGISTRY TRUE -# endif +#if !defined(CH_CFG_USE_REGISTRY) +#define CH_CFG_USE_REGISTRY TRUE +#endif /** * @brief Threads synchronization APIs. @@ -192,9 +192,9 @@ * * @note The default is @p TRUE. */ -# if !defined(CH_CFG_USE_WAITEXIT) -# define CH_CFG_USE_WAITEXIT TRUE -# endif +#if !defined(CH_CFG_USE_WAITEXIT) +#define CH_CFG_USE_WAITEXIT TRUE +#endif /** * @brief Semaphores APIs. @@ -202,9 +202,9 @@ * * @note The default is @p TRUE. */ -# if !defined(CH_CFG_USE_SEMAPHORES) -# define CH_CFG_USE_SEMAPHORES TRUE -# endif +#if !defined(CH_CFG_USE_SEMAPHORES) +#define CH_CFG_USE_SEMAPHORES TRUE +#endif /** * @brief Semaphores queuing mode. @@ -215,9 +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 +#if !defined(CH_CFG_USE_SEMAPHORES_PRIORITY) +#define CH_CFG_USE_SEMAPHORES_PRIORITY FALSE +#endif /** * @brief Mutexes APIs. @@ -225,9 +225,9 @@ * * @note The default is @p TRUE. */ -# if !defined(CH_CFG_USE_MUTEXES) -# define CH_CFG_USE_MUTEXES TRUE -# endif +#if !defined(CH_CFG_USE_MUTEXES) +#define CH_CFG_USE_MUTEXES TRUE +#endif /** * @brief Enables recursive behavior on mutexes. @@ -237,9 +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 +#if !defined(CH_CFG_USE_MUTEXES_RECURSIVE) +#define CH_CFG_USE_MUTEXES_RECURSIVE FALSE +#endif /** * @brief Conditional Variables APIs. @@ -249,9 +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 +#if !defined(CH_CFG_USE_CONDVARS) +#define CH_CFG_USE_CONDVARS TRUE +#endif /** * @brief Conditional Variables APIs with timeout. @@ -261,9 +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 +#if !defined(CH_CFG_USE_CONDVARS_TIMEOUT) +#define CH_CFG_USE_CONDVARS_TIMEOUT TRUE +#endif /** * @brief Events Flags APIs. @@ -271,9 +271,9 @@ * * @note The default is @p TRUE. */ -# if !defined(CH_CFG_USE_EVENTS) -# define CH_CFG_USE_EVENTS TRUE -# endif +#if !defined(CH_CFG_USE_EVENTS) +#define CH_CFG_USE_EVENTS TRUE +#endif /** * @brief Events Flags APIs with timeout. @@ -283,9 +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 +#if !defined(CH_CFG_USE_EVENTS_TIMEOUT) +#define CH_CFG_USE_EVENTS_TIMEOUT TRUE +#endif /** * @brief Synchronous Messages APIs. @@ -294,9 +294,9 @@ * * @note The default is @p TRUE. */ -# if !defined(CH_CFG_USE_MESSAGES) -# define CH_CFG_USE_MESSAGES TRUE -# endif +#if !defined(CH_CFG_USE_MESSAGES) +#define CH_CFG_USE_MESSAGES TRUE +#endif /** * @brief Synchronous Messages queuing mode. @@ -307,9 +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 +#if !defined(CH_CFG_USE_MESSAGES_PRIORITY) +#define CH_CFG_USE_MESSAGES_PRIORITY TRUE +#endif /** * @brief Mailboxes APIs. @@ -319,9 +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 +#if !defined(CH_CFG_USE_MAILBOXES) +#define CH_CFG_USE_MAILBOXES TRUE +#endif /** * @brief Core Memory Manager APIs. @@ -330,9 +330,9 @@ * * @note The default is @p TRUE. */ -# if !defined(CH_CFG_USE_MEMCORE) -# define CH_CFG_USE_MEMCORE TRUE -# endif +#if !defined(CH_CFG_USE_MEMCORE) +#define CH_CFG_USE_MEMCORE TRUE +#endif /** * @brief Heap Allocator APIs. @@ -344,9 +344,9 @@ * @p CH_CFG_USE_SEMAPHORES. * @note Mutexes are recommended. */ -# if !defined(CH_CFG_USE_HEAP) -# define CH_CFG_USE_HEAP TRUE -# endif +#if !defined(CH_CFG_USE_HEAP) +#define CH_CFG_USE_HEAP TRUE +#endif /** * @brief Memory Pools Allocator APIs. @@ -355,9 +355,9 @@ * * @note The default is @p TRUE. */ -# if !defined(CH_CFG_USE_MEMPOOLS) -# define CH_CFG_USE_MEMPOOLS TRUE -# endif +#if !defined(CH_CFG_USE_MEMPOOLS) +#define CH_CFG_USE_MEMPOOLS TRUE +#endif /** * @brief Objects FIFOs APIs. @@ -366,9 +366,9 @@ * * @note The default is @p TRUE. */ -# if !defined(CH_CFG_USE_OBJ_FIFOS) -# define CH_CFG_USE_OBJ_FIFOS TRUE -# endif +#if !defined(CH_CFG_USE_OBJ_FIFOS) +#define CH_CFG_USE_OBJ_FIFOS TRUE +#endif /** * @brief Pipes APIs. @@ -377,9 +377,9 @@ * * @note The default is @p TRUE. */ -# if !defined(CH_CFG_USE_PIPES) -# define CH_CFG_USE_PIPES TRUE -# endif +#if !defined(CH_CFG_USE_PIPES) +#define CH_CFG_USE_PIPES TRUE +#endif /** * @brief Dynamic Threads APIs. @@ -390,9 +390,9 @@ * @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 +#if !defined(CH_CFG_USE_DYNAMIC) +#define CH_CFG_USE_DYNAMIC TRUE +#endif /** @} */ @@ -410,60 +410,60 @@ * * @note The default is @p FALSE. */ -# if !defined(CH_CFG_USE_FACTORY) -# define CH_CFG_USE_FACTORY TRUE -# endif +#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 +#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 +#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 +#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 +#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 +#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 +#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 +#if !defined(CH_CFG_FACTORY_PIPES) || defined(__DOXYGEN__) +#define CH_CFG_FACTORY_PIPES TRUE +#endif /** @} */ @@ -479,9 +479,9 @@ * * @note The default is @p FALSE. */ -# if !defined(CH_DBG_STATISTICS) -# define CH_DBG_STATISTICS FALSE -# endif +#if !defined(CH_DBG_STATISTICS) +#define CH_DBG_STATISTICS FALSE +#endif /** * @brief Debug option, system state check. @@ -490,9 +490,9 @@ * * @note The default is @p FALSE. */ -# if !defined(CH_DBG_SYSTEM_STATE_CHECK) -# define CH_DBG_SYSTEM_STATE_CHECK FALSE -# endif +#if !defined(CH_DBG_SYSTEM_STATE_CHECK) +#define CH_DBG_SYSTEM_STATE_CHECK FALSE +#endif /** * @brief Debug option, parameters checks. @@ -501,9 +501,9 @@ * * @note The default is @p FALSE. */ -# if !defined(CH_DBG_ENABLE_CHECKS) -# define CH_DBG_ENABLE_CHECKS FALSE -# endif +#if !defined(CH_DBG_ENABLE_CHECKS) +#define CH_DBG_ENABLE_CHECKS FALSE +#endif /** * @brief Debug option, consistency checks. @@ -513,9 +513,9 @@ * * @note The default is @p FALSE. */ -# if !defined(CH_DBG_ENABLE_ASSERTS) -# define CH_DBG_ENABLE_ASSERTS FALSE -# endif +#if !defined(CH_DBG_ENABLE_ASSERTS) +#define CH_DBG_ENABLE_ASSERTS FALSE +#endif /** * @brief Debug option, trace buffer. @@ -523,18 +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 +#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 +#if !defined(CH_DBG_TRACE_BUFFER_SIZE) +#define CH_DBG_TRACE_BUFFER_SIZE 128 +#endif /** * @brief Debug option, stack checks. @@ -546,9 +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 +#if !defined(CH_DBG_ENABLE_STACK_CHECK) +#define CH_DBG_ENABLE_STACK_CHECK TRUE +#endif /** * @brief Debug option, stacks initialization. @@ -558,9 +558,9 @@ * * @note The default is @p FALSE. */ -# if !defined(CH_DBG_FILL_THREADS) -# define CH_DBG_FILL_THREADS FALSE -# endif +#if !defined(CH_DBG_FILL_THREADS) +#define CH_DBG_FILL_THREADS FALSE +#endif /** * @brief Debug option, threads profiling. @@ -571,9 +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 +#if !defined(CH_DBG_THREADS_PROFILING) +#define CH_DBG_THREADS_PROFILING FALSE +#endif /** @} */ @@ -588,22 +588,24 @@ * @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.*/ +#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.*/ \ - } +#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. */ -# define CH_CFG_THREAD_EXTRA_FIELDS /* Add threads custom fields here.*/ +#define CH_CFG_THREAD_EXTRA_FIELDS \ + /* Add threads custom fields here.*/ /** * @brief Threads initialization hook. @@ -612,39 +614,39 @@ * @note It is invoked from within @p _thread_init() and implicitly from all * the threads creation APIs. */ -# define CH_CFG_THREAD_INIT_HOOK(tp) \ - { /* Add threads initialization code here.*/ \ - } +#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.*/ \ - } +#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.*/ \ - } +#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.*/ \ - } +#define CH_CFG_IRQ_PROLOGUE_HOOK() { \ + /* IRQ prologue code here.*/ \ +} /** * @brief ISR exit hook. */ -# define CH_CFG_IRQ_EPILOGUE_HOOK() \ - { /* IRQ epilogue code here.*/ \ - } +#define CH_CFG_IRQ_EPILOGUE_HOOK() { \ + /* IRQ epilogue code here.*/ \ +} /** * @brief Idle thread enter hook. @@ -652,9 +654,9 @@ * 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.*/ \ - } +#define CH_CFG_IDLE_ENTER_HOOK() { \ + /* Idle-enter code here.*/ \ +} /** * @brief Idle thread leave hook. @@ -662,44 +664,44 @@ * 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.*/ \ - } +#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.*/ \ - } +#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.*/ \ - } +#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.*/ \ - } +#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.*/ \ - } +#define CH_CFG_TRACE_HOOK(tep) { \ + /* Trace code here.*/ \ +} /** @} */ @@ -707,6 +709,6 @@ /* Port-specific settings (override port settings defaulted in chcore.h). */ /*===========================================================================*/ -#endif /* CHCONF_H */ +#endif /* CHCONF_H */ /** @} */ diff --git a/quantum/stm32/halconf.h b/platforms/chibios/GENERIC_STM32_F303XC/configs/halconf.h similarity index 62% rename from quantum/stm32/halconf.h rename to platforms/chibios/GENERIC_STM32_F303XC/configs/halconf.h index b6c7b392ca71..6b48e289f90e 100644 --- a/quantum/stm32/halconf.h +++ b/platforms/chibios/GENERIC_STM32_F303XC/configs/halconf.h @@ -26,173 +26,173 @@ */ #ifndef HALCONF_H -# define HALCONF_H +#define HALCONF_H -# define _CHIBIOS_HAL_CONF_ -# define _CHIBIOS_HAL_CONF_VER_7_0_ +#define _CHIBIOS_HAL_CONF_ +#define _CHIBIOS_HAL_CONF_VER_7_0_ -# include "mcuconf.h" +#include "mcuconf.h" /** * @brief Enables the PAL subsystem. */ -# if !defined(HAL_USE_PAL) || defined(__DOXYGEN__) -# define HAL_USE_PAL TRUE -# endif +#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 +#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 +#if !defined(HAL_USE_CAN) || defined(__DOXYGEN__) +#define HAL_USE_CAN FALSE +#endif /** * @brief Enables the cryptographic subsystem. */ -# if !defined(HAL_USE_CRY) || defined(__DOXYGEN__) -# define HAL_USE_CRY FALSE -# endif +#if !defined(HAL_USE_CRY) || defined(__DOXYGEN__) +#define HAL_USE_CRY FALSE +#endif /** * @brief Enables the DAC subsystem. */ -# if !defined(HAL_USE_DAC) || defined(__DOXYGEN__) -# define HAL_USE_DAC TRUE -# endif +#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 -# endif +#if !defined(HAL_USE_GPT) || defined(__DOXYGEN__) +#define HAL_USE_GPT TRUE +#endif /** * @brief Enables the I2C subsystem. */ -# if !defined(HAL_USE_I2C) || defined(__DOXYGEN__) -# define HAL_USE_I2C TRUE -# endif +#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 +#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 +#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 +#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 +#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 +#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 +#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 +#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 +#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 TRUE -# endif +#if !defined(HAL_USE_SERIAL_USB) || defined(__DOXYGEN__) +#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 +#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 -# endif +#if !defined(HAL_USE_SPI) || defined(__DOXYGEN__) +#define HAL_USE_SPI TRUE +#endif /** * @brief Enables the TRNG subsystem. */ -# if !defined(HAL_USE_TRNG) || defined(__DOXYGEN__) -# define HAL_USE_TRNG FALSE -# endif +#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 -# endif +#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 +#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 +#if !defined(HAL_USE_WDG) || defined(__DOXYGEN__) +#define HAL_USE_WDG FALSE +#endif /** * @brief Enables the WSPI subsystem. */ -# if !defined(HAL_USE_WSPI) || defined(__DOXYGEN__) -# define HAL_USE_WSPI FALSE -# endif +#if !defined(HAL_USE_WSPI) || defined(__DOXYGEN__) +#define HAL_USE_WSPI FALSE +#endif /*===========================================================================*/ /* PAL driver related settings. */ @@ -202,17 +202,17 @@ * @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 +#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 TRUE -# endif +#if !defined(PAL_USE_WAIT) || defined(__DOXYGEN__) +#define PAL_USE_WAIT TRUE +#endif /*===========================================================================*/ /* ADC driver related settings. */ @@ -222,17 +222,17 @@ * @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 +#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 +#if !defined(ADC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) +#define ADC_USE_MUTUAL_EXCLUSION TRUE +#endif /*===========================================================================*/ /* CAN driver related settings. */ @@ -241,16 +241,16 @@ /** * @brief Sleep mode related APIs inclusion switch. */ -# if !defined(CAN_USE_SLEEP_MODE) || defined(__DOXYGEN__) -# define CAN_USE_SLEEP_MODE TRUE -# endif +#if !defined(CAN_USE_SLEEP_MODE) || defined(__DOXYGEN__) +#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 +#if !defined(CAN_ENFORCE_USE_CALLBACKS) || defined(__DOXYGEN__) +#define CAN_ENFORCE_USE_CALLBACKS FALSE +#endif /*===========================================================================*/ /* CRY driver related settings. */ @@ -263,16 +263,16 @@ * 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 +#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 +#if !defined(HAL_CRY_ENFORCE_FALLBACK) || defined(__DOXYGEN__) +#define HAL_CRY_ENFORCE_FALLBACK FALSE +#endif /*===========================================================================*/ /* DAC driver related settings. */ @@ -282,17 +282,17 @@ * @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 +#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 +#if !defined(DAC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) +#define DAC_USE_MUTUAL_EXCLUSION TRUE +#endif /*===========================================================================*/ /* I2C driver related settings. */ @@ -301,9 +301,9 @@ /** * @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 +#if !defined(I2C_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) +#define I2C_USE_MUTUAL_EXCLUSION TRUE +#endif /*===========================================================================*/ /* MAC driver related settings. */ @@ -312,16 +312,16 @@ /** * @brief Enables the zero-copy API. */ -# if !defined(MAC_USE_ZERO_COPY) || defined(__DOXYGEN__) -# define MAC_USE_ZERO_COPY FALSE -# endif +#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 +#if !defined(MAC_USE_EVENTS) || defined(__DOXYGEN__) +#define MAC_USE_EVENTS TRUE +#endif /*===========================================================================*/ /* MMC_SPI driver related settings. */ @@ -335,9 +335,9 @@ * 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 +#if !defined(MMC_NICE_WAITING) || defined(__DOXYGEN__) +#define MMC_NICE_WAITING TRUE +#endif /*===========================================================================*/ /* SDC driver related settings. */ @@ -347,18 +347,18 @@ * @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 +#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 +#if !defined(SDC_MMC_SUPPORT) || defined(__DOXYGEN__) +#define SDC_MMC_SUPPORT FALSE +#endif /** * @brief Delays insertions. @@ -366,23 +366,23 @@ * 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 +#if !defined(SDC_NICE_WAITING) || defined(__DOXYGEN__) +#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 +#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 +#if !defined(SDC_INIT_OCR) || defined(__DOXYGEN__) +#define SDC_INIT_OCR 0x80100000U +#endif /*===========================================================================*/ /* SERIAL driver related settings. */ @@ -393,9 +393,9 @@ * @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 +#if !defined(SERIAL_DEFAULT_BITRATE) || defined(__DOXYGEN__) +#define SERIAL_DEFAULT_BITRATE 38400 +#endif /** * @brief Serial buffers size. @@ -404,9 +404,9 @@ * @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 -# endif +#if !defined(SERIAL_BUFFERS_SIZE) || defined(__DOXYGEN__) +#define SERIAL_BUFFERS_SIZE 16 +#endif /*===========================================================================*/ /* SERIAL_USB driver related setting. */ @@ -419,17 +419,17 @@ * @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 -# endif +#if !defined(SERIAL_USB_BUFFERS_SIZE) || defined(__DOXYGEN__) +#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 +#if !defined(SERIAL_USB_BUFFERS_NUMBER) || defined(__DOXYGEN__) +#define SERIAL_USB_BUFFERS_NUMBER 2 +#endif /*===========================================================================*/ /* SPI driver related settings. */ @@ -439,33 +439,34 @@ * @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 +#if !defined(SPI_USE_WAIT) || defined(__DOXYGEN__) +#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 +#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 -# endif +#if !defined(SPI_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) +#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 +#if !defined(SPI_SELECT_MODE) || defined(__DOXYGEN__) +#define SPI_SELECT_MODE SPI_SELECT_MODE_PAD +#endif /*===========================================================================*/ /* UART driver related settings. */ @@ -475,17 +476,17 @@ * @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 +#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 +#if !defined(UART_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) +#define UART_USE_MUTUAL_EXCLUSION FALSE +#endif /*===========================================================================*/ /* USB driver related settings. */ @@ -495,9 +496,9 @@ * @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 +#if !defined(USB_USE_WAIT) || defined(__DOXYGEN__) +#define USB_USE_WAIT TRUE +#endif /*===========================================================================*/ /* WSPI driver related settings. */ @@ -507,17 +508,17 @@ * @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 +#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 +#if !defined(WSPI_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) +#define WSPI_USE_MUTUAL_EXCLUSION TRUE +#endif #endif /* HALCONF_H */ diff --git a/platforms/chibios/GENERIC_STM32_F303XC/configs/mcuconf.h b/platforms/chibios/GENERIC_STM32_F303XC/configs/mcuconf.h new file mode 100644 index 000000000000..3b15883485e5 --- /dev/null +++ b/platforms/chibios/GENERIC_STM32_F303XC/configs/mcuconf.h @@ -0,0 +1,273 @@ +/* + 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. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#ifndef MCUCONF_H +#define MCUCONF_H + +/* + * STM32F3xx 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: + * 15...0 Lowest...Highest. + * + * DMA priorities: + * 0...3 Lowest...Highest. + */ + +#define STM32F3xx_MCUCONF +#define STM32F303_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_LSI_ENABLED TRUE +#define STM32_HSE_ENABLED TRUE +#define STM32_LSE_ENABLED FALSE +#define STM32_SW STM32_SW_PLL +#define STM32_PLLSRC STM32_PLLSRC_HSE +#define STM32_PREDIV_VALUE 1 +#define STM32_PLLMUL_VALUE 9 +#define STM32_HPRE STM32_HPRE_DIV1 +#define STM32_PPRE1 STM32_PPRE1_DIV2 +#define STM32_PPRE2 STM32_PPRE2_DIV2 +#define STM32_MCOSEL STM32_MCOSEL_NOCLOCK +#define STM32_ADC12PRES STM32_ADC12PRES_DIV1 +#define STM32_ADC34PRES STM32_ADC34PRES_DIV1 +#define STM32_USART1SW STM32_USART1SW_PCLK +#define STM32_USART2SW STM32_USART2SW_PCLK +#define STM32_USART3SW STM32_USART3SW_PCLK +#define STM32_UART4SW STM32_UART4SW_PCLK +#define STM32_UART5SW STM32_UART5SW_PCLK +#define STM32_I2C1SW STM32_I2C1SW_SYSCLK +#define STM32_I2C2SW STM32_I2C2SW_SYSCLK +#define STM32_TIM1SW STM32_TIM1SW_PCLK2 +#define STM32_TIM8SW STM32_TIM8SW_PCLK2 +#define STM32_RTCSEL STM32_RTCSEL_LSI +#define STM32_USB_CLOCK_REQUIRED TRUE +#define STM32_USBPRE STM32_USBPRE_DIV1P5 + +/* + * 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. + */ +#define STM32_ADC_DUAL_MODE FALSE +#define STM32_ADC_COMPACT_SAMPLES FALSE +#define STM32_ADC_USE_ADC1 FALSE +#define STM32_ADC_USE_ADC2 FALSE +#define STM32_ADC_USE_ADC3 FALSE +#define STM32_ADC_USE_ADC4 FALSE +#define STM32_ADC_ADC1_DMA_STREAM STM32_DMA_STREAM_ID(1, 1) +#define STM32_ADC_ADC2_DMA_STREAM STM32_DMA_STREAM_ID(2, 1) +#define STM32_ADC_ADC3_DMA_STREAM STM32_DMA_STREAM_ID(2, 5) +#define STM32_ADC_ADC4_DMA_STREAM STM32_DMA_STREAM_ID(2, 2) +#define STM32_ADC_ADC1_DMA_PRIORITY 2 +#define STM32_ADC_ADC2_DMA_PRIORITY 2 +#define STM32_ADC_ADC3_DMA_PRIORITY 2 +#define STM32_ADC_ADC4_DMA_PRIORITY 2 +#define STM32_ADC_ADC12_IRQ_PRIORITY 5 +#define STM32_ADC_ADC3_IRQ_PRIORITY 5 +#define STM32_ADC_ADC4_IRQ_PRIORITY 5 +#define STM32_ADC_ADC1_DMA_IRQ_PRIORITY 5 +#define STM32_ADC_ADC2_DMA_IRQ_PRIORITY 5 +#define STM32_ADC_ADC3_DMA_IRQ_PRIORITY 5 +#define STM32_ADC_ADC4_DMA_IRQ_PRIORITY 5 +#define STM32_ADC_ADC12_CLOCK_MODE ADC_CCR_CKMODE_AHB_DIV1 +#define STM32_ADC_ADC34_CLOCK_MODE ADC_CCR_CKMODE_AHB_DIV1 + +/* + * CAN driver system settings. + */ +#define STM32_CAN_USE_CAN1 FALSE +#define STM32_CAN_CAN1_IRQ_PRIORITY 11 + +/* + * DAC driver system settings. + */ +#define STM32_DAC_DUAL_MODE FALSE +#define STM32_DAC_USE_DAC1_CH1 TRUE +#define STM32_DAC_USE_DAC1_CH2 TRUE +#define STM32_DAC_DAC1_CH1_IRQ_PRIORITY 10 +#define STM32_DAC_DAC1_CH2_IRQ_PRIORITY 10 +#define STM32_DAC_DAC1_CH1_DMA_PRIORITY 2 +#define STM32_DAC_DAC1_CH2_DMA_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_TIM4 FALSE +#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 +#define STM32_GPT_TIM4_IRQ_PRIORITY 7 +#define STM32_GPT_TIM6_IRQ_PRIORITY 7 +#define STM32_GPT_TIM7_IRQ_PRIORITY 7 +#define STM32_GPT_TIM8_IRQ_PRIORITY 7 + +/* + * 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 10 +#define STM32_I2C_I2C2_IRQ_PRIORITY 10 +#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_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 +#define STM32_ICU_TIM4_IRQ_PRIORITY 7 +#define STM32_ICU_TIM8_IRQ_PRIORITY 7 + +/* + * 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_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. + */ +#define STM32_SERIAL_USE_USART1 FALSE +#define STM32_SERIAL_USE_USART2 TRUE +#define STM32_SERIAL_USE_USART3 FALSE +#define STM32_SERIAL_USE_UART4 FALSE +#define STM32_SERIAL_USE_UART5 FALSE +#define STM32_SERIAL_USART1_PRIORITY 12 +#define STM32_SERIAL_USART2_PRIORITY 12 +#define STM32_SERIAL_USART3_PRIORITY 12 +#define STM32_SERIAL_UART4_PRIORITY 12 +#define STM32_SERIAL_UART5_PRIORITY 12 + +/* + * SPI driver system settings. + */ +#define STM32_SPI_USE_SPI1 FALSE +#define STM32_SPI_USE_SPI2 TRUE +#define STM32_SPI_USE_SPI3 FALSE +#define STM32_SPI_SPI1_DMA_PRIORITY 1 +#define STM32_SPI_SPI2_DMA_PRIORITY 1 +#define STM32_SPI_SPI3_DMA_PRIORITY 1 +#define STM32_SPI_SPI1_IRQ_PRIORITY 10 +#define STM32_SPI_SPI2_IRQ_PRIORITY 10 +#define STM32_SPI_SPI3_IRQ_PRIORITY 10 +#define STM32_SPI_DMA_ERROR_HOOK(spip) osalSysHalt("DMA failure") + +/* + * ST driver system settings. + */ +#define STM32_ST_IRQ_PRIORITY 8 +#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_USE_USART3 FALSE +#define STM32_UART_USART1_IRQ_PRIORITY 12 +#define STM32_UART_USART2_IRQ_PRIORITY 12 +#define STM32_UART_USART3_IRQ_PRIORITY 12 +#define STM32_UART_USART1_DMA_PRIORITY 0 +#define STM32_UART_USART2_DMA_PRIORITY 0 +#define STM32_UART_USART3_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_HP_IRQ_PRIORITY 13 +#define STM32_USB_USB1_LP_IRQ_PRIORITY 14 + +/* + * WDG driver system settings. + */ +#define STM32_WDG_USE_IWDG FALSE + +#endif /* MCUCONF_H */ diff --git a/platforms/chibios/GENERIC_STM32_F303XC/configs/proton_c.mk b/platforms/chibios/GENERIC_STM32_F303XC/configs/proton_c.mk new file mode 100644 index 000000000000..23907c810a3a --- /dev/null +++ b/platforms/chibios/GENERIC_STM32_F303XC/configs/proton_c.mk @@ -0,0 +1,9 @@ +# Proton C MCU settings for converting AVR projects +MCU = STM32F303 + +# These are defaults based on what has been implemented for ARM boards +AUDIO_ENABLE = yes +WS2812_DRIVER = bitbang + +# Force task driven PWM until ARM can provide automatic configuration +BACKLIGHT_DRIVER = software diff --git a/drivers/boards/IC_TEENSY_3_1/board.c b/platforms/chibios/IC_TEENSY_3_1/board/board.c similarity index 100% rename from drivers/boards/IC_TEENSY_3_1/board.c rename to platforms/chibios/IC_TEENSY_3_1/board/board.c diff --git a/drivers/boards/IC_TEENSY_3_1/board.h b/platforms/chibios/IC_TEENSY_3_1/board/board.h similarity index 100% rename from drivers/boards/IC_TEENSY_3_1/board.h rename to platforms/chibios/IC_TEENSY_3_1/board/board.h diff --git a/platforms/chibios/IC_TEENSY_3_1/board/board.mk b/platforms/chibios/IC_TEENSY_3_1/board/board.mk new file mode 100644 index 000000000000..842e33590594 --- /dev/null +++ b/platforms/chibios/IC_TEENSY_3_1/board/board.mk @@ -0,0 +1,9 @@ +# List of all the board related files. +BOARDSRC = $(BOARD_PATH)/board/board.c + +# Required include directories +BOARDINC = $(BOARD_PATH)/board + +# Shared variables +ALLCSRC += $(BOARDSRC) +ALLINC += $(BOARDINC) diff --git a/drivers/boards/STM32_F103_STM32DUINO/board.c b/platforms/chibios/STM32_F103_STM32DUINO/board/board.c similarity index 93% rename from drivers/boards/STM32_F103_STM32DUINO/board.c rename to platforms/chibios/STM32_F103_STM32DUINO/board/board.c index 8c5a87f35f8b..9135f613646f 100644 --- a/drivers/boards/STM32_F103_STM32DUINO/board.c +++ b/platforms/chibios/STM32_F103_STM32DUINO/board/board.c @@ -35,12 +35,15 @@ const PALConfig pal_default_config = }; #endif +__attribute__((weak)) void enter_bootloader_mode_if_requested(void) {} + /* * Early initialization code. * 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(); } diff --git a/drivers/boards/STM32_F103_STM32DUINO/board.h b/platforms/chibios/STM32_F103_STM32DUINO/board/board.h similarity index 100% rename from drivers/boards/STM32_F103_STM32DUINO/board.h rename to platforms/chibios/STM32_F103_STM32DUINO/board/board.h diff --git a/platforms/chibios/STM32_F103_STM32DUINO/board/board.mk b/platforms/chibios/STM32_F103_STM32DUINO/board/board.mk new file mode 100644 index 000000000000..842e33590594 --- /dev/null +++ b/platforms/chibios/STM32_F103_STM32DUINO/board/board.mk @@ -0,0 +1,9 @@ +# List of all the board related files. +BOARDSRC = $(BOARD_PATH)/board/board.c + +# Required include directories +BOARDINC = $(BOARD_PATH)/board + +# Shared variables +ALLCSRC += $(BOARDSRC) +ALLINC += $(BOARDINC) diff --git a/platforms/chibios/keyboard-config-templates/board.h b/platforms/chibios/keyboard-config-templates/board.h new file mode 100644 index 000000000000..967ec13a1c32 --- /dev/null +++ b/platforms/chibios/keyboard-config-templates/board.h @@ -0,0 +1,20 @@ +/* Copyright 2020 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 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License 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_next "board.h" + +// #undef STM32_HSE_BYPASS diff --git a/platforms/chibios/keyboard-config-templates/chconf.h b/platforms/chibios/keyboard-config-templates/chconf.h new file mode 100644 index 000000000000..7c2af93f5ea7 --- /dev/null +++ b/platforms/chibios/keyboard-config-templates/chconf.h @@ -0,0 +1,20 @@ +/* Copyright 2020 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 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License 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 CH_CFG_OPTIMIZE_SPEED TRUE + +#include_next "chconf.h" diff --git a/platforms/chibios/keyboard-config-templates/halconf.h b/platforms/chibios/keyboard-config-templates/halconf.h new file mode 100644 index 000000000000..ab5f738f97d1 --- /dev/null +++ b/platforms/chibios/keyboard-config-templates/halconf.h @@ -0,0 +1,20 @@ +/* Copyright 2020 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 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License 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 HAL_USE_DAC TRUE + +#include_next "halconf.h" diff --git a/platforms/chibios/keyboard-config-templates/mcuconf.h b/platforms/chibios/keyboard-config-templates/mcuconf.h new file mode 100644 index 000000000000..5b42747b952e --- /dev/null +++ b/platforms/chibios/keyboard-config-templates/mcuconf.h @@ -0,0 +1,21 @@ +/* Copyright 2020 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 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License 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_next "mcuconf.h" + +// #undef STM32_HSE_ENABLED +// #define STM32_HSE_ENABLED FALSE diff --git a/drivers/boards/ld/MKL26Z64.ld b/platforms/chibios/ld/MKL26Z64.ld similarity index 100% rename from drivers/boards/ld/MKL26Z64.ld rename to platforms/chibios/ld/MKL26Z64.ld diff --git a/drivers/boards/ld/STM32F103x8_stm32duino_bootloader.ld b/platforms/chibios/ld/STM32F103x8_stm32duino_bootloader.ld similarity index 100% rename from drivers/boards/ld/STM32F103x8_stm32duino_bootloader.ld rename to platforms/chibios/ld/STM32F103x8_stm32duino_bootloader.ld diff --git a/quantum/stm32/mcuconf.h b/quantum/stm32/mcuconf.h deleted file mode 100644 index 71994a98e098..000000000000 --- a/quantum/stm32/mcuconf.h +++ /dev/null @@ -1,273 +0,0 @@ -/* - 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. - See the License for the specific language governing permissions and - limitations under the License. -*/ - -#ifndef MCUCONF_H -#define MCUCONF_H - -/* - * STM32F3xx 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: - * 15...0 Lowest...Highest. - * - * DMA priorities: - * 0...3 Lowest...Highest. - */ - -#define STM32F3xx_MCUCONF -#define STM32F303_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_LSI_ENABLED TRUE -#define STM32_HSE_ENABLED TRUE -#define STM32_LSE_ENABLED FALSE -#define STM32_SW STM32_SW_PLL -#define STM32_PLLSRC STM32_PLLSRC_HSE -#define STM32_PREDIV_VALUE 1 -#define STM32_PLLMUL_VALUE 9 -#define STM32_HPRE STM32_HPRE_DIV1 -#define STM32_PPRE1 STM32_PPRE1_DIV2 -#define STM32_PPRE2 STM32_PPRE2_DIV2 -#define STM32_MCOSEL STM32_MCOSEL_NOCLOCK -#define STM32_ADC12PRES STM32_ADC12PRES_DIV1 -#define STM32_ADC34PRES STM32_ADC34PRES_DIV1 -#define STM32_USART1SW STM32_USART1SW_PCLK -#define STM32_USART2SW STM32_USART2SW_PCLK -#define STM32_USART3SW STM32_USART3SW_PCLK -#define STM32_UART4SW STM32_UART4SW_PCLK -#define STM32_UART5SW STM32_UART5SW_PCLK -#define STM32_I2C1SW STM32_I2C1SW_SYSCLK -#define STM32_I2C2SW STM32_I2C2SW_SYSCLK -#define STM32_TIM1SW STM32_TIM1SW_PCLK2 -#define STM32_TIM8SW STM32_TIM8SW_PCLK2 -#define STM32_RTCSEL STM32_RTCSEL_LSI -#define STM32_USB_CLOCK_REQUIRED TRUE -#define STM32_USBPRE STM32_USBPRE_DIV1P5 - -/* - * 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. - */ -#define STM32_ADC_DUAL_MODE FALSE -#define STM32_ADC_COMPACT_SAMPLES FALSE -#define STM32_ADC_USE_ADC1 FALSE -#define STM32_ADC_USE_ADC2 FALSE -#define STM32_ADC_USE_ADC3 FALSE -#define STM32_ADC_USE_ADC4 FALSE -#define STM32_ADC_ADC1_DMA_STREAM STM32_DMA_STREAM_ID(1, 1) -#define STM32_ADC_ADC2_DMA_STREAM STM32_DMA_STREAM_ID(2, 1) -#define STM32_ADC_ADC3_DMA_STREAM STM32_DMA_STREAM_ID(2, 5) -#define STM32_ADC_ADC4_DMA_STREAM STM32_DMA_STREAM_ID(2, 2) -#define STM32_ADC_ADC1_DMA_PRIORITY 2 -#define STM32_ADC_ADC2_DMA_PRIORITY 2 -#define STM32_ADC_ADC3_DMA_PRIORITY 2 -#define STM32_ADC_ADC4_DMA_PRIORITY 2 -#define STM32_ADC_ADC12_IRQ_PRIORITY 5 -#define STM32_ADC_ADC3_IRQ_PRIORITY 5 -#define STM32_ADC_ADC4_IRQ_PRIORITY 5 -#define STM32_ADC_ADC1_DMA_IRQ_PRIORITY 5 -#define STM32_ADC_ADC2_DMA_IRQ_PRIORITY 5 -#define STM32_ADC_ADC3_DMA_IRQ_PRIORITY 5 -#define STM32_ADC_ADC4_DMA_IRQ_PRIORITY 5 -#define STM32_ADC_ADC12_CLOCK_MODE ADC_CCR_CKMODE_AHB_DIV1 -#define STM32_ADC_ADC34_CLOCK_MODE ADC_CCR_CKMODE_AHB_DIV1 - -/* - * CAN driver system settings. - */ -#define STM32_CAN_USE_CAN1 FALSE -#define STM32_CAN_CAN1_IRQ_PRIORITY 11 - -/* - * DAC driver system settings. - */ -#define STM32_DAC_DUAL_MODE FALSE -#define STM32_DAC_USE_DAC1_CH1 TRUE -#define STM32_DAC_USE_DAC1_CH2 TRUE -#define STM32_DAC_DAC1_CH1_IRQ_PRIORITY 10 -#define STM32_DAC_DAC1_CH2_IRQ_PRIORITY 10 -#define STM32_DAC_DAC1_CH1_DMA_PRIORITY 2 -#define STM32_DAC_DAC1_CH2_DMA_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_TIM4 FALSE -#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 -#define STM32_GPT_TIM4_IRQ_PRIORITY 7 -#define STM32_GPT_TIM6_IRQ_PRIORITY 7 -#define STM32_GPT_TIM7_IRQ_PRIORITY 7 -#define STM32_GPT_TIM8_IRQ_PRIORITY 7 - -/* - * 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 10 -#define STM32_I2C_I2C2_IRQ_PRIORITY 10 -#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_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 -#define STM32_ICU_TIM4_IRQ_PRIORITY 7 -#define STM32_ICU_TIM8_IRQ_PRIORITY 7 - -/* - * 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_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. - */ -#define STM32_SERIAL_USE_USART1 FALSE -#define STM32_SERIAL_USE_USART2 TRUE -#define STM32_SERIAL_USE_USART3 FALSE -#define STM32_SERIAL_USE_UART4 FALSE -#define STM32_SERIAL_USE_UART5 FALSE -#define STM32_SERIAL_USART1_PRIORITY 12 -#define STM32_SERIAL_USART2_PRIORITY 12 -#define STM32_SERIAL_USART3_PRIORITY 12 -#define STM32_SERIAL_UART4_PRIORITY 12 -#define STM32_SERIAL_UART5_PRIORITY 12 - -/* - * SPI driver system settings. - */ -#define STM32_SPI_USE_SPI1 FALSE -#define STM32_SPI_USE_SPI2 TRUE -#define STM32_SPI_USE_SPI3 FALSE -#define STM32_SPI_SPI1_DMA_PRIORITY 1 -#define STM32_SPI_SPI2_DMA_PRIORITY 1 -#define STM32_SPI_SPI3_DMA_PRIORITY 1 -#define STM32_SPI_SPI1_IRQ_PRIORITY 10 -#define STM32_SPI_SPI2_IRQ_PRIORITY 10 -#define STM32_SPI_SPI3_IRQ_PRIORITY 10 -#define STM32_SPI_DMA_ERROR_HOOK(spip) osalSysHalt("DMA failure") - -/* - * ST driver system settings. - */ -#define STM32_ST_IRQ_PRIORITY 8 -#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_USE_USART3 FALSE -#define STM32_UART_USART1_IRQ_PRIORITY 12 -#define STM32_UART_USART2_IRQ_PRIORITY 12 -#define STM32_UART_USART3_IRQ_PRIORITY 12 -#define STM32_UART_USART1_DMA_PRIORITY 0 -#define STM32_UART_USART2_DMA_PRIORITY 0 -#define STM32_UART_USART3_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_HP_IRQ_PRIORITY 13 -#define STM32_USB_USB1_LP_IRQ_PRIORITY 14 - -/* - * WDG driver system settings. - */ -#define STM32_WDG_USE_IWDG FALSE - -#endif /* MCUCONF_H */ diff --git a/quantum/stm32/proton_c.mk b/quantum/stm32/proton_c.mk deleted file mode 100644 index b25b5550458e..000000000000 --- a/quantum/stm32/proton_c.mk +++ /dev/null @@ -1,47 +0,0 @@ -# Proton C MCU settings for converting AVR projects - -# These are defaults based on what has been implemented for ARM boards -AUDIO_ENABLE = yes -WS2812_DRIVER = bitbang - -# Force task driven PWM until ARM can provide automatic configuration -BACKLIGHT_DRIVER = software - -# The rest of these settings shouldn't change - -## 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 = - -# 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 diff --git a/tmk_core/chibios.mk b/tmk_core/chibios.mk index 09aaddeef052..4e8abc9be6c4 100644 --- a/tmk_core/chibios.mk +++ b/tmk_core/chibios.mk @@ -50,11 +50,42 @@ PLATFORM_MK = $(CHIBIOS_CONTRIB)/os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES)/$(PLAT endif include $(PLATFORM_MK) +BOARD_MK := + +ifneq ("$(wildcard $(KEYBOARD_PATH_5)/boards/$(BOARD)/board.mk)","") + BOARD_PATH = $(KEYBOARD_PATH_5) + BOARD_MK += $(KEYBOARD_PATH_5)/boards/$(BOARD)/board.mk +else ifneq ("$(wildcard $(KEYBOARD_PATH_4)/boards/$(BOARD)/board.mk)","") + BOARD_PATH = $(KEYBOARD_PATH_4) + BOARD_MK += $(KEYBOARD_PATH_4)/boards/$(BOARD)/board.mk +else ifneq ("$(wildcard $(KEYBOARD_PATH_3)/boards/$(BOARD)/board.mk)","") + BOARD_PATH = $(KEYBOARD_PATH_3) + BOARD_MK += $(KEYBOARD_PATH_3)/boards/$(BOARD)/board.mk +else ifneq ("$(wildcard $(KEYBOARD_PATH_2)/boards/$(BOARD)/board.mk)","") + BOARD_PATH = $(KEYBOARD_PATH_2) + BOARD_MK += $(KEYBOARD_PATH_2)/boards/$(BOARD)/board.mk +else ifneq ("$(wildcard $(KEYBOARD_PATH_1)/boards/$(BOARD)/board.mk)","") + BOARD_PATH = $(KEYBOARD_PATH_1) + BOARD_MK += $(KEYBOARD_PATH_1)/boards/$(BOARD)/board.mk +else ifneq ("$(wildcard $(TOP_DIR)/platforms/chibios/$(BOARD)/board/board.mk)","") + BOARD_PATH = $(TOP_DIR)/platforms/chibios/$(BOARD) + BOARD_MK += $(TOP_DIR)/platforms/chibios/$(BOARD)/board/board.mk + KEYBOARD_PATHS += $(BOARD_PATH)/configs +endif + +ifeq ("$(wildcard $(BOARD_MK))","") + BOARD_MK = $(CHIBIOS)/os/hal/boards/$(BOARD)/board.mk + ifeq ("$(wildcard $(BOARD_MK))","") + BOARD_MK = $(CHIBIOS_CONTRIB)/os/hal/boards/$(BOARD)/board.mk + endif +endif + # Bootloader address ifdef STM32_BOOTLOADER_ADDRESS OPT_DEFS += -DSTM32_BOOTLOADER_ADDRESS=$(STM32_BOOTLOADER_ADDRESS) endif +# Work out if we need to set up the include for the bootloader definitions ifneq ("$(wildcard $(KEYBOARD_PATH_5)/bootloader_defs.h)","") OPT_DEFS += -include $(KEYBOARD_PATH_5)/bootloader_defs.h else ifneq ("$(wildcard $(KEYBOARD_PATH_5)/boards/$(BOARD)/bootloader_defs.h)","") @@ -75,38 +106,52 @@ else ifneq ("$(wildcard $(KEYBOARD_PATH_1)/bootloader_defs.h)","") OPT_DEFS += -include $(KEYBOARD_PATH_1)/bootloader_defs.h else ifneq ("$(wildcard $(KEYBOARD_PATH_1)/boards/$(BOARD)/bootloader_defs.h)","") OPT_DEFS += -include $(KEYBOARD_PATH_1)/boards/$(BOARD)/bootloader_defs.h -else ifneq ("$(wildcard $(TOP_DIR)/drivers/boards/$(BOARD)/bootloader_defs.h)","") - OPT_DEFS += -include $(TOP_DIR)/drivers/boards/$(BOARD)/bootloader_defs.h +else ifneq ("$(wildcard $(BOARD_PATH)/configs/bootloader_defs.h)","") + OPT_DEFS += -include $(BOARD_PATH)/configs/bootloader_defs.h endif -BOARD_MK := +# Work out the config file directories +ifneq ("$(wildcard $(KEYBOARD_PATH_5)/chconf.h)","") + CHCONFDIR = $(KEYBOARD_PATH_5) +else ifneq ("$(wildcard $(KEYBOARD_PATH_4)/chconf.h)","") + CHCONFDIR = $(KEYBOARD_PATH_4) +else ifneq ("$(wildcard $(KEYBOARD_PATH_3)/chconf.h)","") + CHCONFDIR = $(KEYBOARD_PATH_3) +else ifneq ("$(wildcard $(KEYBOARD_PATH_2)/chconf.h)","") + CHCONFDIR = $(KEYBOARD_PATH_2) +else ifneq ("$(wildcard $(KEYBOARD_PATH_1)/chconf.h)","") + CHCONFDIR = $(KEYBOARD_PATH_1) +else ifneq ("$(wildcard $(TOP_DIR)/platforms/chibios/$(BOARD)/configs/chconf.h)","") + CHCONFDIR = $(TOP_DIR)/platforms/chibios/$(BOARD)/configs +endif -ifneq ("$(wildcard $(KEYBOARD_PATH_5)/boards/$(BOARD)/board.mk)","") - BOARD_PATH = $(KEYBOARD_PATH_5) - BOARD_MK += $(KEYBOARD_PATH_5)/boards/$(BOARD)/board.mk -else ifneq ("$(wildcard $(KEYBOARD_PATH_4)/boards/$(BOARD)/board.mk)","") - BOARD_PATH = $(KEYBOARD_PATH_4) - BOARD_MK += $(KEYBOARD_PATH_4)/boards/$(BOARD)/board.mk -else ifneq ("$(wildcard $(KEYBOARD_PATH_3)/boards/$(BOARD)/board.mk)","") - BOARD_PATH = $(KEYBOARD_PATH_3) - BOARD_MK += $(KEYBOARD_PATH_3)/boards/$(BOARD)/board.mk -else ifneq ("$(wildcard $(KEYBOARD_PATH_2)/boards/$(BOARD)/board.mk)","") - BOARD_PATH = $(KEYBOARD_PATH_2) - BOARD_MK += $(KEYBOARD_PATH_2)/boards/$(BOARD)/board.mk -else ifneq ("$(wildcard $(KEYBOARD_PATH_1)/boards/$(BOARD)/board.mk)","") - BOARD_PATH = $(KEYBOARD_PATH_1) - BOARD_MK += $(KEYBOARD_PATH_1)/boards/$(BOARD)/board.mk -else ifneq ("$(wildcard $(TOP_DIR)/drivers/boards/$(BOARD)/board.mk)","") - BOARD_PATH = $(TOP_DIR)/drivers - BOARD_MK += $(TOP_DIR)/drivers/boards/$(BOARD)/board.mk +ifneq ("$(wildcard $(KEYBOARD_PATH_5)/halconf.h)","") + HALCONFDIR = $(KEYBOARD_PATH_5) +else ifneq ("$(wildcard $(KEYBOARD_PATH_4)/halconf.h)","") + HALCONFDIR = $(KEYBOARD_PATH_4) +else ifneq ("$(wildcard $(KEYBOARD_PATH_3)/halconf.h)","") + HALCONFDIR = $(KEYBOARD_PATH_3) +else ifneq ("$(wildcard $(KEYBOARD_PATH_2)/halconf.h)","") + HALCONFDIR = $(KEYBOARD_PATH_2) +else ifneq ("$(wildcard $(KEYBOARD_PATH_1)/halconf.h)","") + HALCONFDIR = $(KEYBOARD_PATH_1) +else ifneq ("$(wildcard $(TOP_DIR)/platforms/chibios/$(BOARD)/configs/halconf.h)","") + HALCONFDIR = $(TOP_DIR)/platforms/chibios/$(BOARD)/configs endif -ifeq ("$(wildcard $(BOARD_MK))","") - BOARD_MK = $(CHIBIOS)/os/hal/boards/$(BOARD)/board.mk - ifeq ("$(wildcard $(BOARD_MK))","") - BOARD_MK = $(CHIBIOS_CONTRIB)/os/hal/boards/$(BOARD)/board.mk - endif +# HAL-OSAL files (optional). +include $(CHIBIOS)/os/hal/hal.mk + +ifeq ("$(PLATFORM_NAME)","") + PLATFORM_NAME = platform +endif + +PLATFORM_MK = $(CHIBIOS)/os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES)/$(PLATFORM_NAME).mk +ifeq ("$(wildcard $(PLATFORM_MK))","") +PLATFORM_MK = $(CHIBIOS_CONTRIB)/os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES)/$(PLATFORM_NAME).mk endif +include $(PLATFORM_MK) + include $(BOARD_MK) -include $(CHIBIOS)/os/hal/osal/rt/osal.mk # ChibiOS <= 19.x @@ -138,8 +183,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 ifneq ("$(wildcard $(TOP_DIR)/platforms/chibios/ld/$(MCU_LDSCRIPT).ld)","") + LDSCRIPT = $(TOP_DIR)/platforms/chibios/ld/$(MCU_LDSCRIPT).ld else ifneq ("$(wildcard $(STARTUPLD_CONTRIB)/$(MCU_LDSCRIPT).ld)","") LDSCRIPT = $(STARTUPLD_CONTRIB)/$(MCU_LDSCRIPT).ld USE_CHIBIOS_CONTRIB = yes @@ -163,6 +208,7 @@ QUANTUM_LIB_SRC += $(STARTUPASM) $(PORTASM) $(OSALASM) CHIBISRC := $(patsubst $(TOP_DIR)/%,%,$(CHIBISRC)) EXTRAINCDIRS += $(CHIBIOS)/os/license $(CHIBIOS)/os/oslib/include \ + $(TOP_DIR)/platforms/chibios/$(BOARD)/configs \ $(STARTUPINC) $(KERNINC) $(PORTINC) $(OSALINC) \ $(HALINC) $(PLATFORMINC) $(BOARDINC) $(TESTINC) \ $(STREAMSINC) $(CHIBIOS)/os/various $(COMMON_VPATH) @@ -182,6 +228,8 @@ 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 +else ifneq ("$(wildcard $(TOP_DIR)/platforms/chibios/$(BOARD)/configs/halconf_community.h)","") + USE_CHIBIOS_CONTRIB = yes endif ifeq ($(strip $(USE_CHIBIOS_CONTRIB)),yes) @@ -194,6 +242,15 @@ endif # Project, sources and paths ############################################################################## +############################################################################## +# Injected configs +# +ifneq ("$(wildcard $(BOARD_PATH)/configs/config.h)","") + CONFIG_H += $(BOARD_PATH)/configs/config.h +endif +ifneq ("$(wildcard $(BOARD_PATH)/configs/post_config.h)","") + POST_CONFIG_H += $(BOARD_PATH)/configs/post_config.h +endif ############################################################################## # Compiler settings diff --git a/util/chibios-upgrader.sh b/util/chibios-upgrader.sh index 2174da3cf133..ebc12abe7d52 100755 --- a/util/chibios-upgrader.sh +++ b/util/chibios-upgrader.sh @@ -38,7 +38,11 @@ find_chibi_files() { local search_path="$1" shift local conditions=( "$@" ) - find -L "$search_path" -not -path '*/lib/chibios*' -and -not -path '*/lib/ugfx*' -and -not -path '*/util/*' -and \( "${conditions[@]}" \) | sort + for file in $(find -L "$search_path" -not -path '*/lib/chibios*' -and -not -path '*/lib/ugfx*' -and -not -path '*/util/*' -and \( "${conditions[@]}" \) | sort) ; do + if [ -z "$(grep 'include_next' "$file")" ] ; then + echo $file + fi + done } revert_chibi_files() { diff --git a/util/travis_compiled_push.sh b/util/travis_compiled_push.sh index 68f6d5c1149f..195a87208b69 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-7 -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' -e 'platforms/chibios' | 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 f209f91c7ce073aa0381e79c10219616cb7db523 Mon Sep 17 00:00:00 2001 From: Ryan Date: Sun, 7 Jun 2020 15:00:21 +1000 Subject: [PATCH 655/930] Various tidyups for USB descriptor code (#9005) --- tmk_core/protocol/chibios/usb_main.c | 8 +- tmk_core/protocol/lufa/lufa.c | 120 ++++++++++++++------------- tmk_core/protocol/lufa/lufa.h | 4 - tmk_core/protocol/usb_descriptor.c | 10 +-- tmk_core/protocol/usb_descriptor.h | 5 -- tmk_core/protocol/vusb/vusb.c | 24 +++--- 6 files changed, 80 insertions(+), 91 deletions(-) diff --git a/tmk_core/protocol/chibios/usb_main.c b/tmk_core/protocol/chibios/usb_main.c index 65bd291bec59..9d68419f42e6 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; -uint8_t keyboard_led_stats = 0; +uint8_t keyboard_led_state = 0; volatile uint16_t keyboard_idle_count = 0; static virtual_timer_t keyboard_idle_timer; static void keyboard_idle_timer_cb(void *arg); @@ -386,10 +386,10 @@ static void set_led_transfer_cb(USBDriver *usbp) { 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]; + keyboard_led_state = set_report_buf[1]; } } else { - keyboard_led_stats = set_report_buf[0]; + keyboard_led_state = set_report_buf[0]; } } @@ -610,7 +610,7 @@ static void keyboard_idle_timer_cb(void *arg) { } /* LED status */ -uint8_t keyboard_leds(void) { return keyboard_led_stats; } +uint8_t keyboard_leds(void) { return keyboard_led_state; } /* prepare and start sending a report IN * not callable from ISR or locked state */ diff --git a/tmk_core/protocol/lufa/lufa.c b/tmk_core/protocol/lufa/lufa.c index 374add20f977..19f417770fae 100644 --- a/tmk_core/protocol/lufa/lufa.c +++ b/tmk_core/protocol/lufa/lufa.c @@ -88,7 +88,7 @@ extern keymap_config_t keymap_config; uint8_t keyboard_idle = 0; /* 0: Boot Protocol, 1: Report Protocol(default) */ uint8_t keyboard_protocol = 1; -static uint8_t keyboard_led_stats = 0; +static uint8_t keyboard_led_state = 0; static report_keyboard_t keyboard_report_sent; @@ -103,30 +103,30 @@ host_driver_t lufa_driver = { }; #ifdef VIRTSER_ENABLE +// clang-format off + USB_ClassInfo_CDC_Device_t cdc_device = { - .Config = - { - .ControlInterfaceNumber = CCI_INTERFACE, - .DataINEndpoint = - { - .Address = CDC_IN_EPADDR, - .Size = CDC_EPSIZE, - .Banks = 1, - }, - .DataOUTEndpoint = - { - .Address = CDC_OUT_EPADDR, - .Size = CDC_EPSIZE, - .Banks = 1, - }, - .NotificationEndpoint = - { - .Address = CDC_NOTIFICATION_EPADDR, - .Size = CDC_NOTIFICATION_EPSIZE, - .Banks = 1, - }, + .Config = { + .ControlInterfaceNumber = CCI_INTERFACE, + .DataINEndpoint = { + .Address = (CDC_IN_EPNUM | ENDPOINT_DIR_IN), + .Size = CDC_EPSIZE, + .Banks = 1 + }, + .DataOUTEndpoint = { + .Address = (CDC_OUT_EPNUM | ENDPOINT_DIR_OUT), + .Size = CDC_EPSIZE, + .Banks = 1 }, + .NotificationEndpoint = { + .Address = (CDC_NOTIFICATION_EPNUM | ENDPOINT_DIR_IN), + .Size = CDC_NOTIFICATION_EPSIZE, + .Banks = 1 + } + } }; + +// clang-format on #endif #ifdef RAW_ENABLE @@ -254,7 +254,7 @@ static void Console_Task(void) { // fill empty bank while (Endpoint_IsReadWriteAllowed()) Endpoint_Write_8(0); - // flash senchar packet + // flush sendchar packet if (Endpoint_IsINReady()) { Endpoint_ClearIN(); } @@ -370,45 +370,46 @@ void EVENT_USB_Device_StartOfFrame(void) { void EVENT_USB_Device_ConfigurationChanged(void) { bool ConfigSuccess = true; - /* Setup Keyboard HID Report Endpoints */ #ifndef KEYBOARD_SHARED_EP - ConfigSuccess &= ENDPOINT_CONFIG(KEYBOARD_IN_EPNUM, EP_TYPE_INTERRUPT, ENDPOINT_DIR_IN, KEYBOARD_EPSIZE, ENDPOINT_BANK_SINGLE); + /* Setup keyboard report endpoint */ + ConfigSuccess &= Endpoint_ConfigureEndpoint((KEYBOARD_IN_EPNUM | ENDPOINT_DIR_IN), EP_TYPE_INTERRUPT, KEYBOARD_EPSIZE, 1); #endif #if defined(MOUSE_ENABLE) && !defined(MOUSE_SHARED_EP) - /* Setup Mouse HID Report Endpoint */ - ConfigSuccess &= ENDPOINT_CONFIG(MOUSE_IN_EPNUM, EP_TYPE_INTERRUPT, ENDPOINT_DIR_IN, MOUSE_EPSIZE, ENDPOINT_BANK_SINGLE); + /* Setup mouse report endpoint */ + ConfigSuccess &= Endpoint_ConfigureEndpoint((MOUSE_IN_EPNUM | ENDPOINT_DIR_IN), EP_TYPE_INTERRUPT, MOUSE_EPSIZE, 1); #endif #ifdef SHARED_EP_ENABLE - /* Setup Shared HID Report Endpoint */ - ConfigSuccess &= ENDPOINT_CONFIG(SHARED_IN_EPNUM, EP_TYPE_INTERRUPT, ENDPOINT_DIR_IN, SHARED_EPSIZE, ENDPOINT_BANK_SINGLE); + /* Setup shared report endpoint */ + ConfigSuccess &= Endpoint_ConfigureEndpoint((SHARED_IN_EPNUM | ENDPOINT_DIR_IN), EP_TYPE_INTERRUPT, SHARED_EPSIZE, 1); #endif #ifdef RAW_ENABLE - /* Setup Raw HID Report Endpoints */ - ConfigSuccess &= ENDPOINT_CONFIG(RAW_IN_EPNUM, EP_TYPE_INTERRUPT, ENDPOINT_DIR_IN, RAW_EPSIZE, ENDPOINT_BANK_SINGLE); - ConfigSuccess &= ENDPOINT_CONFIG(RAW_OUT_EPNUM, EP_TYPE_INTERRUPT, ENDPOINT_DIR_OUT, RAW_EPSIZE, ENDPOINT_BANK_SINGLE); + /* Setup raw HID endpoints */ + ConfigSuccess &= Endpoint_ConfigureEndpoint((RAW_IN_EPNUM | ENDPOINT_DIR_IN), EP_TYPE_INTERRUPT, RAW_EPSIZE, 1); + ConfigSuccess &= Endpoint_ConfigureEndpoint((RAW_OUT_EPNUM | ENDPOINT_DIR_OUT), EP_TYPE_INTERRUPT, RAW_EPSIZE, 1); #endif #ifdef CONSOLE_ENABLE - /* Setup Console HID Report Endpoints */ - ConfigSuccess &= ENDPOINT_CONFIG(CONSOLE_IN_EPNUM, EP_TYPE_INTERRUPT, ENDPOINT_DIR_IN, CONSOLE_EPSIZE, ENDPOINT_BANK_SINGLE); + /* Setup console endpoint */ + ConfigSuccess &= Endpoint_ConfigureEndpoint((CONSOLE_IN_EPNUM | ENDPOINT_DIR_IN), EP_TYPE_INTERRUPT, CONSOLE_EPSIZE, 1); # if 0 - ConfigSuccess &= ENDPOINT_CONFIG(CONSOLE_OUT_EPNUM, EP_TYPE_INTERRUPT, ENDPOINT_DIR_OUT, - CONSOLE_EPSIZE, ENDPOINT_BANK_SINGLE); + ConfigSuccess &= Endpoint_ConfigureEndpoint((CONSOLE_OUT_EPNUM | ENDPOINT_DIR_OUT), EP_TYPE_INTERRUPT, CONSOLE_EPSIZE, 1); # endif #endif #ifdef MIDI_ENABLE - ConfigSuccess &= Endpoint_ConfigureEndpoint(MIDI_STREAM_IN_EPADDR, EP_TYPE_BULK, MIDI_STREAM_EPSIZE, ENDPOINT_BANK_SINGLE); - ConfigSuccess &= Endpoint_ConfigureEndpoint(MIDI_STREAM_OUT_EPADDR, EP_TYPE_BULK, MIDI_STREAM_EPSIZE, ENDPOINT_BANK_SINGLE); + /* Setup MIDI stream endpoints */ + ConfigSuccess &= Endpoint_ConfigureEndpoint((MIDI_STREAM_IN_EPNUM | ENDPOINT_DIR_IN), EP_TYPE_BULK, MIDI_STREAM_EPSIZE, 1); + ConfigSuccess &= Endpoint_ConfigureEndpoint((MIDI_STREAM_OUT_EPNUM | ENDPOINT_DIR_IN), EP_TYPE_BULK, MIDI_STREAM_EPSIZE, 1); #endif #ifdef VIRTSER_ENABLE - ConfigSuccess &= Endpoint_ConfigureEndpoint(CDC_NOTIFICATION_EPADDR, EP_TYPE_INTERRUPT, CDC_NOTIFICATION_EPSIZE, ENDPOINT_BANK_SINGLE); - ConfigSuccess &= Endpoint_ConfigureEndpoint(CDC_OUT_EPADDR, EP_TYPE_BULK, CDC_EPSIZE, ENDPOINT_BANK_SINGLE); - ConfigSuccess &= Endpoint_ConfigureEndpoint(CDC_IN_EPADDR, EP_TYPE_BULK, CDC_EPSIZE, ENDPOINT_BANK_SINGLE); + /* Setup virtual serial endpoints */ + ConfigSuccess &= Endpoint_ConfigureEndpoint((CDC_NOTIFICATION_EPNUM | ENDPOINT_DIR_IN), EP_TYPE_INTERRUPT, CDC_NOTIFICATION_EPSIZE, 1); + ConfigSuccess &= Endpoint_ConfigureEndpoint((CDC_OUT_EPNUM | ENDPOINT_DIR_OUT), EP_TYPE_BULK, CDC_EPSIZE, 1); + ConfigSuccess &= Endpoint_ConfigureEndpoint((CDC_IN_EPNUM | ENDPOINT_DIR_IN), EP_TYPE_BULK, CDC_EPSIZE, 1); #endif } @@ -472,10 +473,10 @@ void EVENT_USB_Device_ControlRequest(void) { uint8_t report_id = Endpoint_Read_8(); if (report_id == REPORT_ID_KEYBOARD || report_id == REPORT_ID_NKRO) { - keyboard_led_stats = Endpoint_Read_8(); + keyboard_led_state = Endpoint_Read_8(); } } else { - keyboard_led_stats = Endpoint_Read_8(); + keyboard_led_state = Endpoint_Read_8(); } Endpoint_ClearOUT(); @@ -545,7 +546,7 @@ void EVENT_USB_Device_ControlRequest(void) { * * FIXME: Needs doc */ -static uint8_t keyboard_leds(void) { return keyboard_led_stats; } +static uint8_t keyboard_leds(void) { return keyboard_led_state; } /** \brief Send Keyboard * @@ -808,25 +809,26 @@ int8_t sendchar(uint8_t c) { ******************************************************************************/ #ifdef MIDI_ENABLE +// clang-format off + USB_ClassInfo_MIDI_Device_t USB_MIDI_Interface = { - .Config = - { - .StreamingInterfaceNumber = AS_INTERFACE, - .DataINEndpoint = - { - .Address = MIDI_STREAM_IN_EPADDR, - .Size = MIDI_STREAM_EPSIZE, - .Banks = 1, - }, - .DataOUTEndpoint = - { - .Address = MIDI_STREAM_OUT_EPADDR, - .Size = MIDI_STREAM_EPSIZE, - .Banks = 1, - }, + .Config = { + .StreamingInterfaceNumber = AS_INTERFACE, + .DataINEndpoint = { + .Address = (MIDI_STREAM_IN_EPNUM | ENDPOINT_DIR_IN), + .Size = MIDI_STREAM_EPSIZE, + .Banks = 1 }, + .DataOUTEndpoint = { + .Address = (MIDI_STREAM_OUT_EPNUM | ENDPOINT_DIR_OUT), + .Size = MIDI_STREAM_EPSIZE, + .Banks = 1 + } + } }; +// clang-format on + void send_midi_packet(MIDI_EventPacket_t *event) { MIDI_Device_SendEventPacket(&USB_MIDI_Interface, event); } bool recv_midi_packet(MIDI_EventPacket_t *const event) { return MIDI_Device_ReceiveEventPacket(&USB_MIDI_Interface, event); } diff --git a/tmk_core/protocol/lufa/lufa.h b/tmk_core/protocol/lufa/lufa.h index 82a5f8e05fcb..71fd7aad854b 100644 --- a/tmk_core/protocol/lufa/lufa.h +++ b/tmk_core/protocol/lufa/lufa.h @@ -69,8 +69,4 @@ extern host_driver_t lufa_driver; # define MIDI_SYSEX_BUFFER (API_SYSEX_MAX_SIZE + API_SYSEX_MAX_SIZE / 7 + (API_SYSEX_MAX_SIZE % 7 ? 1 : 0)) #endif -#define ENDPOINT_BANK_SINGLE 1 -#define ENDPOINT_BANK_DOUBLE 2 -#define ENDPOINT_CONFIG(epnum, eptype, epdir, epsize, epbank) Endpoint_ConfigureEndpoint((epdir) | (epnum), eptype, epsize, epbank) - #endif diff --git a/tmk_core/protocol/usb_descriptor.c b/tmk_core/protocol/usb_descriptor.c index 8c71dd1dda77..bcca24586766 100644 --- a/tmk_core/protocol/usb_descriptor.c +++ b/tmk_core/protocol/usb_descriptor.c @@ -673,7 +673,7 @@ const USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor = { .Size = sizeof(USB_Audio_Descriptor_StreamEndpoint_Std_t), .Type = DTYPE_Endpoint }, - .EndpointAddress = MIDI_STREAM_OUT_EPADDR, + .EndpointAddress = (ENDPOINT_DIR_OUT | MIDI_STREAM_OUT_EPNUM), .Attributes = (EP_TYPE_BULK | ENDPOINT_ATTR_NO_SYNC | ENDPOINT_USAGE_DATA), .EndpointSize = MIDI_STREAM_EPSIZE, .PollingIntervalMS = 0x05 @@ -696,7 +696,7 @@ const USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor = { .Size = sizeof(USB_Audio_Descriptor_StreamEndpoint_Std_t), .Type = DTYPE_Endpoint }, - .EndpointAddress = MIDI_STREAM_IN_EPADDR, + .EndpointAddress = (ENDPOINT_DIR_IN | MIDI_STREAM_IN_EPNUM), .Attributes = (EP_TYPE_BULK | ENDPOINT_ATTR_NO_SYNC | ENDPOINT_USAGE_DATA), .EndpointSize = MIDI_STREAM_EPSIZE, .PollingIntervalMS = 0x05 @@ -774,7 +774,7 @@ const USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor = { .Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint }, - .EndpointAddress = CDC_NOTIFICATION_EPADDR, + .EndpointAddress = (ENDPOINT_DIR_IN | CDC_NOTIFICATION_EPNUM), .Attributes = (EP_TYPE_INTERRUPT | ENDPOINT_ATTR_NO_SYNC | ENDPOINT_USAGE_DATA), .EndpointSize = CDC_NOTIFICATION_EPSIZE, .PollingIntervalMS = 0xFF @@ -797,7 +797,7 @@ const USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor = { .Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint }, - .EndpointAddress = CDC_OUT_EPADDR, + .EndpointAddress = (ENDPOINT_DIR_OUT | CDC_OUT_EPNUM), .Attributes = (EP_TYPE_BULK | ENDPOINT_ATTR_NO_SYNC | ENDPOINT_USAGE_DATA), .EndpointSize = CDC_EPSIZE, .PollingIntervalMS = 0x05 @@ -807,7 +807,7 @@ const USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor = { .Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint }, - .EndpointAddress = CDC_IN_EPADDR, + .EndpointAddress = (ENDPOINT_DIR_IN | CDC_IN_EPNUM), .Attributes = (EP_TYPE_BULK | ENDPOINT_ATTR_NO_SYNC | ENDPOINT_USAGE_DATA), .EndpointSize = CDC_EPSIZE, .PollingIntervalMS = 0x05 diff --git a/tmk_core/protocol/usb_descriptor.h b/tmk_core/protocol/usb_descriptor.h index b2423fa7e662..34a85978a6b3 100644 --- a/tmk_core/protocol/usb_descriptor.h +++ b/tmk_core/protocol/usb_descriptor.h @@ -212,17 +212,12 @@ enum usb_endpoints { #ifdef MIDI_ENABLE MIDI_STREAM_IN_EPNUM = NEXT_EPNUM, MIDI_STREAM_OUT_EPNUM = NEXT_EPNUM, -# define MIDI_STREAM_IN_EPADDR (ENDPOINT_DIR_IN | MIDI_STREAM_IN_EPNUM) -# define MIDI_STREAM_OUT_EPADDR (ENDPOINT_DIR_OUT | MIDI_STREAM_OUT_EPNUM) #endif #ifdef VIRTSER_ENABLE CDC_NOTIFICATION_EPNUM = NEXT_EPNUM, CDC_IN_EPNUM = NEXT_EPNUM, CDC_OUT_EPNUM = NEXT_EPNUM, -# define CDC_NOTIFICATION_EPADDR (ENDPOINT_DIR_IN | CDC_NOTIFICATION_EPNUM) -# define CDC_IN_EPADDR (ENDPOINT_DIR_IN | CDC_IN_EPNUM) -# define CDC_OUT_EPADDR (ENDPOINT_DIR_OUT | CDC_OUT_EPNUM) #endif }; diff --git a/tmk_core/protocol/vusb/vusb.c b/tmk_core/protocol/vusb/vusb.c index 5feff889a1a1..f4727a0c38a2 100644 --- a/tmk_core/protocol/vusb/vusb.c +++ b/tmk_core/protocol/vusb/vusb.c @@ -65,7 +65,7 @@ enum usb_interfaces { # error There are not enough available interfaces to support all functions. Please disable one or more of the following: Mouse Keys, Extra Keys, Raw HID, Console #endif -static uint8_t vusb_keyboard_leds = 0; +static uint8_t keyboard_led_state = 0; static uint8_t vusb_idle_rate = 0; /* Keyboard report send buffer */ @@ -74,13 +74,7 @@ static report_keyboard_t kbuf[KBUF_SIZE]; static uint8_t kbuf_head = 0; static uint8_t kbuf_tail = 0; -typedef struct { - uint8_t modifier; - uint8_t reserved; - uint8_t keycode[6]; -} keyboard_report_t; - -static keyboard_report_t keyboard_report; // sent to PC +static report_keyboard_t keyboard_report_sent; #define VUSB_TRANSFER_KEYBOARD_MAX_TRIES 10 @@ -218,7 +212,7 @@ static host_driver_t driver = {keyboard_leds, send_keyboard, send_mouse, send_sy host_driver_t *vusb_driver(void) { return &driver; } -static uint8_t keyboard_leds(void) { return vusb_keyboard_leds; } +static uint8_t keyboard_leds(void) { return keyboard_led_state; } static void send_keyboard(report_keyboard_t *report) { uint8_t next = (kbuf_head + 1) % KBUF_SIZE; @@ -232,6 +226,7 @@ static void send_keyboard(report_keyboard_t *report) { // NOTE: send key strokes of Macro usbPoll(); vusb_transfer_keyboard(); + keyboard_report_sent = *report; } typedef struct { @@ -289,9 +284,10 @@ usbMsgLen_t usbFunctionSetup(uchar data[8]) { if ((rq->bmRequestType & USBRQ_TYPE_MASK) == USBRQ_TYPE_CLASS) { /* class request type */ if (rq->bRequest == USBRQ_HID_GET_REPORT) { debug("GET_REPORT:"); - /* we only have one report type, so don't look at wValue */ - usbMsgPtr = (usbMsgPtr_t)&keyboard_report; - return sizeof(keyboard_report); + if (rq->wIndex.word == KEYBOARD_INTERFACE) { + usbMsgPtr = (usbMsgPtr_t)&keyboard_report_sent; + return sizeof(keyboard_report_sent); + } } else if (rq->bRequest == USBRQ_HID_GET_IDLE) { debug("GET_IDLE: "); // debug_hex(vusb_idle_rate); @@ -304,7 +300,7 @@ usbMsgLen_t usbFunctionSetup(uchar data[8]) { } else if (rq->bRequest == USBRQ_HID_SET_REPORT) { debug("SET_REPORT: "); // Report Type: 0x02(Out)/ReportID: 0x00(none) && Interface: 0(keyboard) - if (rq->wValue.word == 0x0200 && rq->wIndex.word == 0) { + if (rq->wValue.word == 0x0200 && rq->wIndex.word == KEYBOARD_INTERFACE) { debug("SET_LED: "); last_req.kind = SET_LED; last_req.len = rq->wLength.word; @@ -330,7 +326,7 @@ uchar usbFunctionWrite(uchar *data, uchar len) { debug("SET_LED: "); debug_hex(data[0]); debug("\n"); - vusb_keyboard_leds = data[0]; + keyboard_led_state = data[0]; last_req.len = 0; return 1; break; From 1193e45bf4c8c69e33c054c6eb3d545d5d52fcb5 Mon Sep 17 00:00:00 2001 From: Ryan Date: Sun, 7 Jun 2020 15:00:59 +1000 Subject: [PATCH 656/930] Convert `CONSUMER2BLUEFRUIT()` and `CONSUMER2RN42()` macros to static inline functions (#9055) --- tmk_core/common/report.h | 7 ++- tmk_core/protocol/lufa/bluetooth.h | 98 ++++++++++++++++++++++-------- tmk_core/protocol/lufa/lufa.c | 2 +- 3 files changed, 79 insertions(+), 28 deletions(-) diff --git a/tmk_core/common/report.h b/tmk_core/common/report.h index c2b1b7c7101f..1b2f13bdde27 100644 --- a/tmk_core/common/report.h +++ b/tmk_core/common/report.h @@ -46,8 +46,9 @@ enum mouse_buttons { * See https://www.usb.org/sites/default/files/documents/hut1_12v2.pdf#page=75 */ enum consumer_usages { - // 15.5 Display Controls (https://www.usb.org/sites/default/files/hutrr41_0.pdf) - BRIGHTNESS_UP = 0x06F, + // 15.5 Display Controls + SNAPSHOT = 0x065, + BRIGHTNESS_UP = 0x06F, // https://www.usb.org/sites/default/files/hutrr41_0.pdf BRIGHTNESS_DOWN = 0x070, // 15.7 Transport Controls TRANSPORT_RECORD = 0x0B2, @@ -57,6 +58,7 @@ enum consumer_usages { TRANSPORT_PREV_TRACK = 0x0B6, TRANSPORT_STOP = 0x0B7, TRANSPORT_EJECT = 0x0B8, + TRANSPORT_RANDOM_PLAY = 0x0B9, TRANSPORT_STOP_EJECT = 0x0CC, TRANSPORT_PLAY_PAUSE = 0x0CD, // 15.9.1 Audio Controls - Volume @@ -71,6 +73,7 @@ enum consumer_usages { AL_LOCK = 0x19E, AL_CONTROL_PANEL = 0x19F, AL_ASSISTANT = 0x1CB, + AL_KEYBOARD_LAYOUT = 0x1AE, // 15.16 Generic GUI Application Controls AC_MINIMIZE = 0x206, AC_SEARCH = 0x221, diff --git a/tmk_core/protocol/lufa/bluetooth.h b/tmk_core/protocol/lufa/bluetooth.h index 081271a4e646..67f031439e92 100644 --- a/tmk_core/protocol/lufa/bluetooth.h +++ b/tmk_core/protocol/lufa/bluetooth.h @@ -15,34 +15,82 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -#ifndef BLUETOOTH_H -#define BLUETOOTH_H +#pragma once #include "../serial.h" void bluefruit_serial_send(uint8_t data); -/* -+-----------------+-------------------+-------+ -| Consumer Key | Bit Map | Hex | -+-----------------+-------------------+-------+ -| Home | 00000001 00000000 | 01 00 | -| KeyboardLayout | 00000010 00000000 | 02 00 | -| Search | 00000100 00000000 | 04 00 | -| Snapshot | 00001000 00000000 | 08 00 | -| VolumeUp | 00010000 00000000 | 10 00 | -| VolumeDown | 00100000 00000000 | 20 00 | -| Play/Pause | 01000000 00000000 | 40 00 | -| Fast Forward | 10000000 00000000 | 80 00 | -| Rewind | 00000000 00000001 | 00 01 | -| Scan Next Track | 00000000 00000010 | 00 02 | -| Scan Prev Track | 00000000 00000100 | 00 04 | -| Random Play | 00000000 00001000 | 00 08 | -| Stop | 00000000 00010000 | 00 10 | -+-------------------------------------+-------+ -*/ -#define CONSUMER2BLUEFRUIT(usage) (usage == AUDIO_MUTE ? 0x0000 : (usage == AUDIO_VOL_UP ? 0x1000 : (usage == AUDIO_VOL_DOWN ? 0x2000 : (usage == TRANSPORT_NEXT_TRACK ? 0x0002 : (usage == TRANSPORT_PREV_TRACK ? 0x0004 : (usage == TRANSPORT_STOP ? 0x0010 : (usage == TRANSPORT_STOP_EJECT ? 0x0000 : (usage == TRANSPORT_PLAY_PAUSE ? 0x4000 : (usage == AL_CC_CONFIG ? 0x0000 : (usage == AL_EMAIL ? 0x0000 : (usage == AL_CALCULATOR ? 0x0000 : (usage == AL_LOCAL_BROWSER ? 0x0000 : (usage == AC_SEARCH ? 0x0400 : (usage == AC_HOME ? 0x0100 : (usage == AC_BACK ? 0x0000 : (usage == AC_FORWARD ? 0x0000 : (usage == AC_STOP ? 0x0000 : (usage == AC_REFRESH ? 0x0000 : (usage == AC_BOOKMARKS ? 0x0000 : 0))))))))))))))))))) - -#define CONSUMER2RN42(usage) (usage == AUDIO_MUTE ? 0x0040 : (usage == AUDIO_VOL_UP ? 0x0010 : (usage == AUDIO_VOL_DOWN ? 0x0020 : (usage == TRANSPORT_NEXT_TRACK ? 0x0100 : (usage == TRANSPORT_PREV_TRACK ? 0x0200 : (usage == TRANSPORT_STOP ? 0x0400 : (usage == TRANSPORT_STOP_EJECT ? 0x0800 : (usage == TRANSPORT_PLAY_PAUSE ? 0x0080 : (usage == AL_EMAIL ? 0x0200 : (usage == AL_LOCAL_BROWSER ? 0x8000 : (usage == AC_SEARCH ? 0x0400 : (usage == AC_HOME ? 0x0100 : 0)))))))))))) +// https://learn.adafruit.com/introducing-bluefruit-ez-key-diy-bluetooth-hid-keyboard/sending-keys-via-serial#raw-hid-consumer-reports-8-14 +static inline uint16_t CONSUMER2BLUEFRUIT(uint16_t usage) { + switch (usage) { + case AC_HOME: + return 0x0001; + case AL_KEYBOARD_LAYOUT: + return 0x0002; + case AC_SEARCH: + return 0x0004; + case SNAPSHOT: + return 0x0008; + case AUDIO_VOL_UP: + return 0x0010; + case AUDIO_VOL_DOWN: + return 0x0020; + case TRANSPORT_PLAY_PAUSE: + return 0x0040; + case TRANSPORT_FAST_FORWARD: + return 0x0080; + case TRANSPORT_REWIND: + return 0x0100; + case TRANSPORT_NEXT_TRACK: + return 0x0200; + case TRANSPORT_PREV_TRACK: + return 0x0400; + case TRANSPORT_RANDOM_PLAY: + return 0x0800; + case TRANSPORT_STOP: + return 0x1000; + default: + return 0; + } +} -#endif +// https://cdn.sparkfun.com/datasheets/Wireless/Bluetooth/bluetooth_cr_UG-v1.0r.pdf#G7.663734 +static inline uint16_t CONSUMER2RN42(uint16_t usage) { + switch (usage) { + case AC_HOME: + return 0x0001; + case AL_EMAIL: + return 0x0002; + case AC_SEARCH: + return 0x0004; + case AL_KEYBOARD_LAYOUT: + return 0x0008; + case AUDIO_VOL_UP: + return 0x0010; + case AUDIO_VOL_DOWN: + return 0x0020; + case AUDIO_MUTE: + return 0x0040; + case TRANSPORT_PLAY_PAUSE: + return 0x0080; + case TRANSPORT_NEXT_TRACK: + return 0x0100; + case TRANSPORT_PREV_TRACK: + return 0x0200; + case TRANSPORT_STOP: + return 0x0400; + case TRANSPORT_EJECT: + return 0x0800; + case TRANSPORT_FAST_FORWARD: + return 0x1000; + case TRANSPORT_REWIND: + return 0x2000; + case TRANSPORT_STOP_EJECT: + return 0x4000; + case AL_LOCAL_BROWSER: + return 0x8000; + default: + return 0; + } +} diff --git a/tmk_core/protocol/lufa/lufa.c b/tmk_core/protocol/lufa/lufa.c index 19f417770fae..3ca1a809d1da 100644 --- a/tmk_core/protocol/lufa/lufa.c +++ b/tmk_core/protocol/lufa/lufa.c @@ -720,8 +720,8 @@ static void send_consumer(uint16_t data) { bluefruit_serial_send(0xFD); bluefruit_serial_send(0x00); bluefruit_serial_send(0x02); - bluefruit_serial_send((bitmap >> 8) & 0xFF); bluefruit_serial_send(bitmap & 0xFF); + bluefruit_serial_send((bitmap >> 8) & 0xFF); bluefruit_serial_send(0x00); bluefruit_serial_send(0x00); bluefruit_serial_send(0x00); From a3933bdbe74aa10120da9962b46ee1576450fc07 Mon Sep 17 00:00:00 2001 From: Nick Brassel Date: Mon, 8 Jun 2020 12:20:43 +1000 Subject: [PATCH 657/930] Attempt to fix CI for non-master branches. (#9308) --- .travis.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.travis.yml b/.travis.yml index d137a4209607..f2e8a8411df3 100644 --- a/.travis.yml +++ b/.travis.yml @@ -27,6 +27,7 @@ addons: install: - npm install -g moxygen script: + - git fetch --depth=50 origin $TRAVIS_BRANCH:$TRAVIS_BRANCH - git rev-parse --short HEAD - git diff --name-only HEAD $TRAVIS_BRANCH - bash util/travis_test.sh From 69e0ad1b2ce43fbf1daa85d22007570430ddf0c7 Mon Sep 17 00:00:00 2001 From: Ryan Date: Wed, 10 Jun 2020 06:30:37 +1000 Subject: [PATCH 658/930] Additional cleanups for V-USB code (#9310) --- quantum/mcu_selection.mk | 3 - tmk_core/common.mk | 4 - tmk_core/protocol/vusb.mk | 7 -- tmk_core/protocol/vusb/main.c | 37 +++------ tmk_core/protocol/vusb/sendchar_usart.c | 19 ----- tmk_core/protocol/vusb/vusb.c | 102 ++++++++++-------------- 6 files changed, 53 insertions(+), 119 deletions(-) delete mode 100644 tmk_core/protocol/vusb/sendchar_usart.c diff --git a/quantum/mcu_selection.mk b/quantum/mcu_selection.mk index a1d2c5fbf6f0..61fd7b6e4c04 100644 --- a/quantum/mcu_selection.mk +++ b/quantum/mcu_selection.mk @@ -266,7 +266,6 @@ ifneq (,$(filter $(MCU),atmega32a)) F_CPU ?= 12000000 # unsupported features for now - NO_UART ?= yes NO_SUSPEND_POWER_DOWN ?= yes endif @@ -284,7 +283,6 @@ ifneq (,$(filter $(MCU),atmega328p)) F_CPU ?= 16000000 # unsupported features for now - NO_UART ?= yes NO_SUSPEND_POWER_DOWN ?= yes endif @@ -317,6 +315,5 @@ ifneq (,$(filter $(MCU),attiny85)) F_CPU ?= 16500000 # unsupported features for now - NO_UART ?= yes NO_SUSPEND_POWER_DOWN ?= yes endif diff --git a/tmk_core/common.mk b/tmk_core/common.mk index 63de7c7edeeb..b7fe45afd6d8 100644 --- a/tmk_core/common.mk +++ b/tmk_core/common.mk @@ -113,10 +113,6 @@ ifeq ($(strip $(SLEEP_LED_ENABLE)), yes) TMK_COMMON_DEFS += -DNO_SUSPEND_POWER_DOWN endif -ifeq ($(strip $(NO_UART)), yes) - TMK_COMMON_DEFS += -DNO_UART -endif - ifeq ($(strip $(NO_SUSPEND_POWER_DOWN)), yes) TMK_COMMON_DEFS += -DNO_SUSPEND_POWER_DOWN endif diff --git a/tmk_core/protocol/vusb.mk b/tmk_core/protocol/vusb.mk index 5e564f748056..1de60030899e 100644 --- a/tmk_core/protocol/vusb.mk +++ b/tmk_core/protocol/vusb.mk @@ -9,13 +9,6 @@ SRC += $(VUSB_DIR)/main.c \ $(VUSB_PATH)/usbdrv/usbdrvasm.S \ $(VUSB_PATH)/usbdrv/oddebug.c -ifneq ($(strip $(CONSOLE_ENABLE)), yes) -ifndef NO_UART -SRC += $(COMMON_DIR)/sendchar_uart.c \ - $(COMMON_DIR)/uart.c -endif -endif - # Search Path VPATH += $(TMK_PATH)/$(VUSB_DIR) VPATH += $(VUSB_PATH) diff --git a/tmk_core/protocol/vusb/main.c b/tmk_core/protocol/vusb/main.c index b4063273daa9..a57df5ce06a7 100644 --- a/tmk_core/protocol/vusb/main.c +++ b/tmk_core/protocol/vusb/main.c @@ -7,19 +7,22 @@ * License: GNU GPL v2 (see License.txt), GNU GPL v3 or proprietary (CommercialLicense.txt) * This Revision: $Id: main.c 790 2010-05-30 21:00:26Z cs $ */ + #include + #include +#include #include #include -#include + #include -#include + #include "vusb.h" + #include "keyboard.h" #include "host.h" #include "timer.h" -#include "uart.h" -#include "debug.h" +#include "print.h" #include "suspend.h" #include "wait.h" #include "sendchar.h" @@ -28,8 +31,6 @@ # include "sleep_led.h" #endif -#define UART_BAUD_RATE 115200 - #ifdef CONSOLE_ENABLE void console_task(void); #endif @@ -47,7 +48,7 @@ static void initForUsbConnectivity(void) { usbDeviceDisconnect(); /* do this while interrupts are disabled */ while (--i) { /* fake USB disconnect for > 250 ms */ wdt_reset(); - _delay_ms(1); + wait_ms(1); } usbDeviceConnect(); } @@ -60,7 +61,7 @@ static void usb_remote_wakeup(void) { USBDDR = ddr_orig | USBMASK; USBOUT ^= USBMASK; - _delay_ms(25); + wait_ms(25); USBOUT ^= USBMASK; USBDDR = ddr_orig; @@ -74,7 +75,6 @@ static void usb_remote_wakeup(void) { * FIXME: Needs doc */ static void setup_usb(void) { - // debug("initForUsbConnectivity()\n"); initForUsbConnectivity(); // for Console_Task @@ -95,10 +95,7 @@ int main(void) { #ifdef CLKPR // avoid unintentional changes of clock frequency in devices that have a // clock prescaler - CLKPR = 0x80, CLKPR = 0; -#endif -#ifndef NO_UART - uart_init(UART_BAUD_RATE); + clock_prescale_set(clock_div_1); #endif keyboard_setup(); @@ -113,7 +110,6 @@ int main(void) { sleep_led_init(); #endif - debug("main loop\n"); while (1) { #if USB_COUNT_SOF if (usbSofCount != 0) { @@ -130,19 +126,6 @@ int main(void) { # ifdef SLEEP_LED_ENABLE sleep_led_enable(); # endif - /* - uart_putchar('S'); - _delay_ms(1); - cli(); - set_sleep_mode(SLEEP_MODE_PWR_DOWN); - sleep_enable(); - sleep_bod_disable(); - sei(); - sleep_cpu(); - sleep_disable(); - _delay_ms(10); - uart_putchar('W'); - */ } } #endif diff --git a/tmk_core/protocol/vusb/sendchar_usart.c b/tmk_core/protocol/vusb/sendchar_usart.c deleted file mode 100644 index a920a9a536b3..000000000000 --- a/tmk_core/protocol/vusb/sendchar_usart.c +++ /dev/null @@ -1,19 +0,0 @@ -/* - * Copyright: (c) 2005 by OBJECTIVE DEVELOPMENT Software GmbH - * License: GNU GPL v2 (see License.txt), GNU GPL v3 or proprietary (CommercialLicense.txt) - */ -#include -#include -#include "sendchar.h" - -#if DEBUG_LEVEL > 0 -/* from oddebug.c */ -int8_t sendchar(uint8_t c) { - while (!(ODDBG_USR & (1 << ODDBG_UDRE))) - ; /* wait for data register empty */ - ODDBG_UDR = c; - return 1; -} -#else -int8_t sendchar(uint8_t c) { return 1; } -#endif diff --git a/tmk_core/protocol/vusb/vusb.c b/tmk_core/protocol/vusb/vusb.c index f4727a0c38a2..735a1c1d307f 100644 --- a/tmk_core/protocol/vusb/vusb.c +++ b/tmk_core/protocol/vusb/vusb.c @@ -15,10 +15,12 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -#include -#include #include + +#include + #include + #include "usbconfig.h" #include "host.h" #include "report.h" @@ -26,6 +28,7 @@ along with this program. If not, see . #include "vusb.h" #include "print.h" #include "debug.h" +#include "wait.h" #include "usb_descriptor_common.h" #ifdef RAW_ENABLE @@ -56,7 +59,7 @@ enum usb_interfaces { #ifdef CONSOLE_ENABLE CONSOLE_INTERFACE = NEXT_INTERFACE, #endif - TOTAL_INTERFACES = NEXT_INTERFACE, + TOTAL_INTERFACES = NEXT_INTERFACE }; #define MAX_INTERFACES 2 @@ -86,19 +89,13 @@ void vusb_transfer_keyboard(void) { usbSetInterrupt((void *)&kbuf[kbuf_tail], sizeof(report_keyboard_t)); kbuf_tail = (kbuf_tail + 1) % KBUF_SIZE; if (debug_keyboard) { - print("V-USB: kbuf["); - pdec(kbuf_tail); - print("->"); - pdec(kbuf_head); - print("]("); - phex((kbuf_head < kbuf_tail) ? (KBUF_SIZE - kbuf_tail + kbuf_head) : (kbuf_head - kbuf_tail)); - print(")\n"); + dprintf("V-USB: kbuf[%d->%d](%02X)\n", kbuf_tail, kbuf_head, (kbuf_head < kbuf_tail) ? (KBUF_SIZE - kbuf_tail + kbuf_head) : (kbuf_head - kbuf_tail)); } } break; } usbPoll(); - _delay_ms(1); + wait_ms(1); } } @@ -220,7 +217,7 @@ static void send_keyboard(report_keyboard_t *report) { kbuf[kbuf_head] = *report; kbuf_head = next; } else { - debug("kbuf: full\n"); + dprint("kbuf: full\n"); } // NOTE: send key strokes of Macro @@ -283,37 +280,35 @@ usbMsgLen_t usbFunctionSetup(uchar data[8]) { if ((rq->bmRequestType & USBRQ_TYPE_MASK) == USBRQ_TYPE_CLASS) { /* class request type */ if (rq->bRequest == USBRQ_HID_GET_REPORT) { - debug("GET_REPORT:"); + dprint("GET_REPORT:"); if (rq->wIndex.word == KEYBOARD_INTERFACE) { usbMsgPtr = (usbMsgPtr_t)&keyboard_report_sent; return sizeof(keyboard_report_sent); } } else if (rq->bRequest == USBRQ_HID_GET_IDLE) { - debug("GET_IDLE: "); - // debug_hex(vusb_idle_rate); + dprint("GET_IDLE:"); usbMsgPtr = (usbMsgPtr_t)&vusb_idle_rate; return 1; } else if (rq->bRequest == USBRQ_HID_SET_IDLE) { vusb_idle_rate = rq->wValue.bytes[1]; - debug("SET_IDLE: "); - debug_hex(vusb_idle_rate); + dprintf("SET_IDLE: %02X", vusb_idle_rate); } else if (rq->bRequest == USBRQ_HID_SET_REPORT) { - debug("SET_REPORT: "); + dprint("SET_REPORT:"); // Report Type: 0x02(Out)/ReportID: 0x00(none) && Interface: 0(keyboard) if (rq->wValue.word == 0x0200 && rq->wIndex.word == KEYBOARD_INTERFACE) { - debug("SET_LED: "); + dprint("SET_LED:"); last_req.kind = SET_LED; last_req.len = rq->wLength.word; } return USB_NO_MSG; // to get data in usbFunctionWrite } else { - debug("UNKNOWN:"); + dprint("UNKNOWN:"); } } else { - debug("VENDOR:"); + dprint("VENDOR:"); /* no vendor specific requests implemented */ } - debug("\n"); + dprint("\n"); return 0; /* default for not implemented requests: return no data back to host */ } @@ -323,9 +318,7 @@ uchar usbFunctionWrite(uchar *data, uchar len) { } switch (last_req.kind) { case SET_LED: - debug("SET_LED: "); - debug_hex(data[0]); - debug("\n"); + dprintf("SET_LED: %02X\n", data[0]); keyboard_led_state = data[0]; last_req.len = 0; return 1; @@ -342,13 +335,13 @@ void usbFunctionWriteOut(uchar *data, uchar len) { #ifdef RAW_ENABLE // Data from host must be divided every 8bytes if (len != 8) { - debug("RAW: invalid length"); + dprint("RAW: invalid length\n"); raw_output_received_bytes = 0; return; } if (raw_output_received_bytes + len > RAW_BUFFER_SIZE) { - debug("RAW: buffer full"); + dprint("RAW: buffer full\n"); raw_output_received_bytes = 0; } else { for (uint8_t i = 0; i < 8; i++) { @@ -404,29 +397,6 @@ const PROGMEM uchar keyboard_hid_report[] = { 0xC0 // End Collection }; -#ifdef RAW_ENABLE -const PROGMEM uchar raw_hid_report[] = { - 0x06, RAW_USAGE_PAGE_LO, RAW_USAGE_PAGE_HI, // Usage Page (Vendor Defined) - 0x09, RAW_USAGE_ID, // Usage (Vendor Defined) - 0xA1, 0x01, // Collection (Application) - // Data to host - 0x09, 0x62, // Usage (Vendor Defined) - 0x15, 0x00, // Logical Minimum (0) - 0x26, 0xFF, 0x00, // Logical Maximum (255) - 0x95, RAW_BUFFER_SIZE, // Report Count - 0x75, 0x08, // Report Size (8) - 0x81, 0x02, // Input (Data, Variable, Absolute) - // Data from host - 0x09, 0x63, // Usage (Vendor Defined) - 0x15, 0x00, // Logical Minimum (0) - 0x26, 0xFF, 0x00, // Logical Maximum (255) - 0x95, RAW_BUFFER_SIZE, // Report Count - 0x75, 0x08, // Report Size (8) - 0x91, 0x02, // Output (Data, Variable, Absolute) - 0xC0 // End Collection -}; -#endif - #if defined(MOUSE_ENABLE) || defined(EXTRAKEY_ENABLE) const PROGMEM uchar mouse_extra_hid_report[] = { # ifdef MOUSE_ENABLE @@ -511,6 +481,29 @@ const PROGMEM uchar mouse_extra_hid_report[] = { }; #endif +#ifdef RAW_ENABLE +const PROGMEM uchar raw_hid_report[] = { + 0x06, RAW_USAGE_PAGE_LO, RAW_USAGE_PAGE_HI, // Usage Page (Vendor Defined) + 0x09, RAW_USAGE_ID, // Usage (Vendor Defined) + 0xA1, 0x01, // Collection (Application) + // Data to host + 0x09, 0x62, // Usage (Vendor Defined) + 0x15, 0x00, // Logical Minimum (0) + 0x26, 0xFF, 0x00, // Logical Maximum (255) + 0x95, RAW_BUFFER_SIZE, // Report Count + 0x75, 0x08, // Report Size (8) + 0x81, 0x02, // Input (Data, Variable, Absolute) + // Data from host + 0x09, 0x63, // Usage (Vendor Defined) + 0x15, 0x00, // Logical Minimum (0) + 0x26, 0xFF, 0x00, // Logical Maximum (255) + 0x95, RAW_BUFFER_SIZE, // Report Count + 0x75, 0x08, // Report Size (8) + 0x91, 0x02, // Output (Data, Variable, Absolute) + 0xC0 // End Collection +}; +#endif + #if defined(CONSOLE_ENABLE) const PROGMEM uchar console_hid_report[] = { 0x06, 0x31, 0xFF, // Usage Page (Vendor Defined - PJRC Teensy compatible) @@ -801,14 +794,6 @@ const PROGMEM usbConfigurationDescriptor_t usbConfigurationDescriptor = { USB_PUBLIC usbMsgLen_t usbFunctionDescriptor(struct usbRequest *rq) { usbMsgLen_t len = 0; - /* - debug("usbFunctionDescriptor: "); - debug_hex(rq->bmRequestType); debug(" "); - debug_hex(rq->bRequest); debug(" "); - debug_hex16(rq->wValue.word); debug(" "); - debug_hex16(rq->wIndex.word); debug(" "); - debug_hex16(rq->wLength.word); debug("\n"); - */ switch (rq->wValue.bytes[1]) { case USBDESCR_DEVICE: usbMsgPtr = (usbMsgPtr_t)&usbDeviceDescriptor; @@ -892,6 +877,5 @@ USB_PUBLIC usbMsgLen_t usbFunctionDescriptor(struct usbRequest *rq) { } break; } - // debug("desc len: "); debug_hex(len); debug("\n"); return len; } From e7434c874bcd201906e26aa2ef55ddd3de9cd905 Mon Sep 17 00:00:00 2001 From: Ryan Date: Wed, 17 Jun 2020 21:42:27 +1000 Subject: [PATCH 659/930] Remove inclusion of adafruit_ble.h from ssd1306.c (#9355) --- drivers/avr/ssd1306.c | 3 --- keyboards/claw44/ssd1306.c | 3 --- keyboards/comet46/ssd1306.c | 3 --- keyboards/crkbd/ssd1306.c | 3 --- keyboards/helix/local_drivers/ssd1306.c | 3 --- keyboards/yosino58/ssd1306.c | 3 --- 6 files changed, 18 deletions(-) diff --git a/drivers/avr/ssd1306.c b/drivers/avr/ssd1306.c index 61d7a9953113..205f749502b8 100644 --- a/drivers/avr/ssd1306.c +++ b/drivers/avr/ssd1306.c @@ -5,9 +5,6 @@ # include # include "print.h" # include "glcdfont.c" -# ifdef ADAFRUIT_BLE_ENABLE -# include "adafruit_ble.h" -# endif # ifdef PROTOCOL_LUFA # include "lufa.h" # endif diff --git a/keyboards/claw44/ssd1306.c b/keyboards/claw44/ssd1306.c index e32fc091c244..e04a431357c3 100644 --- a/keyboards/claw44/ssd1306.c +++ b/keyboards/claw44/ssd1306.c @@ -4,9 +4,6 @@ #include "i2c.h" #include #include "print.h" -#ifdef ADAFRUIT_BLE_ENABLE -#include "adafruit_ble.h" -#endif #ifdef PROTOCOL_LUFA #include "lufa.h" #endif diff --git a/keyboards/comet46/ssd1306.c b/keyboards/comet46/ssd1306.c index 20c2738db774..abbed4a49fb9 100644 --- a/keyboards/comet46/ssd1306.c +++ b/keyboards/comet46/ssd1306.c @@ -4,9 +4,6 @@ #include "i2c.h" #include #include "print.h" -#ifdef ADAFRUIT_BLE_ENABLE -#include "adafruit_ble.h" -#endif #ifdef PROTOCOL_LUFA #include "lufa.h" #endif diff --git a/keyboards/crkbd/ssd1306.c b/keyboards/crkbd/ssd1306.c index 622e44e35f59..b2676f386f24 100644 --- a/keyboards/crkbd/ssd1306.c +++ b/keyboards/crkbd/ssd1306.c @@ -4,9 +4,6 @@ #include "i2c.h" #include #include "print.h" -#ifdef ADAFRUIT_BLE_ENABLE -#include "adafruit_ble.h" -#endif #ifdef PROTOCOL_LUFA #include "lufa.h" #endif diff --git a/keyboards/helix/local_drivers/ssd1306.c b/keyboards/helix/local_drivers/ssd1306.c index dd3290ba0cc8..00b2fb0eec36 100644 --- a/keyboards/helix/local_drivers/ssd1306.c +++ b/keyboards/helix/local_drivers/ssd1306.c @@ -10,9 +10,6 @@ #else #include #endif -#ifdef ADAFRUIT_BLE_ENABLE -#include "adafruit_ble.h" -#endif #ifdef PROTOCOL_LUFA #include "lufa.h" #endif diff --git a/keyboards/yosino58/ssd1306.c b/keyboards/yosino58/ssd1306.c index 3353f615f581..ff6ba210d1fb 100644 --- a/keyboards/yosino58/ssd1306.c +++ b/keyboards/yosino58/ssd1306.c @@ -4,9 +4,6 @@ #include "i2c.h" #include #include "print.h" -#ifdef ADAFRUIT_BLE_ENABLE -#include "adafruit_ble.h" -#endif #ifdef PROTOCOL_LUFA #include "lufa.h" #endif From 3b34858b772cda36fa9988e4d45039ff7ff9146a Mon Sep 17 00:00:00 2001 From: Ryan Date: Wed, 17 Jun 2020 21:43:20 +1000 Subject: [PATCH 660/930] Don't compile outputselect.c if Bluetooth is disabled (#9356) --- quantum/quantum.c | 4 ++-- tmk_core/protocol/lufa.mk | 21 ++++++++++++--------- tmk_core/protocol/lufa/lufa.c | 16 +++++++++------- 3 files changed, 23 insertions(+), 18 deletions(-) diff --git a/quantum/quantum.c b/quantum/quantum.c index 044a15612845..9d63f4de2788 100644 --- a/quantum/quantum.c +++ b/quantum/quantum.c @@ -17,7 +17,7 @@ #include #include "quantum.h" -#ifdef PROTOCOL_LUFA +#ifdef BLUETOOTH_ENABLE # include "outputselect.h" #endif @@ -618,7 +618,7 @@ void matrix_init_quantum() { #ifdef HAPTIC_ENABLE haptic_init(); #endif -#ifdef OUTPUT_AUTO_ENABLE +#if defined(BLUETOOTH_ENABLE) && defined(OUTPUT_AUTO_ENABLE) set_output(OUTPUT_AUTO); #endif diff --git a/tmk_core/protocol/lufa.mk b/tmk_core/protocol/lufa.mk index d87802992e93..9bc972c266b7 100644 --- a/tmk_core/protocol/lufa.mk +++ b/tmk_core/protocol/lufa.mk @@ -15,9 +15,8 @@ else endif LUFA_SRC = lufa.c \ - usb_descriptor.c \ - outputselect.c \ - $(LUFA_SRC_USB) + usb_descriptor.c \ + $(LUFA_SRC_USB) ifeq ($(strip $(MIDI_ENABLE)), yes) include $(TMK_PATH)/protocol/midi.mk @@ -25,23 +24,27 @@ endif ifeq ($(strip $(BLUETOOTH_ENABLE)), yes) LUFA_SRC += $(LUFA_DIR)/bluetooth.c \ - $(TMK_DIR)/protocol/serial_uart.c + outputselect.c \ + $(TMK_DIR)/protocol/serial_uart.c endif ifeq ($(strip $(BLUETOOTH)), AdafruitBLE) - LUFA_SRC += spi_master.c - LUFA_SRC += analog.c - LUFA_SRC += $(LUFA_DIR)/adafruit_ble.cpp + LUFA_SRC += spi_master.c \ + analog.c \ + outputselect.c \ + $(LUFA_DIR)/adafruit_ble.cpp endif ifeq ($(strip $(BLUETOOTH)), AdafruitEZKey) LUFA_SRC += $(LUFA_DIR)/bluetooth.c \ - $(TMK_DIR)/protocol/serial_uart.c + outputselect.c \ + $(TMK_DIR)/protocol/serial_uart.c endif ifeq ($(strip $(BLUETOOTH)), RN42) LUFA_SRC += $(LUFA_DIR)/bluetooth.c \ - $(TMK_DIR)/protocol/serial_uart.c + outputselect.c \ + $(TMK_DIR)/protocol/serial_uart.c endif ifeq ($(strip $(VIRTSER_ENABLE)), yes) diff --git a/tmk_core/protocol/lufa/lufa.c b/tmk_core/protocol/lufa/lufa.c index 3ca1a809d1da..ca3384ba2552 100644 --- a/tmk_core/protocol/lufa/lufa.c +++ b/tmk_core/protocol/lufa/lufa.c @@ -53,7 +53,6 @@ #include "lufa.h" #include "quantum.h" #include -#include "outputselect.h" #ifdef NKRO_ENABLE # include "keycode_config.h" @@ -66,6 +65,7 @@ extern keymap_config_t keymap_config; #endif #ifdef BLUETOOTH_ENABLE +# include "outputselect.h" # ifdef MODULE_ADAFRUIT_BLE # include "adafruit_ble.h" # else @@ -554,9 +554,10 @@ static uint8_t keyboard_leds(void) { return keyboard_led_state; } */ static void send_keyboard(report_keyboard_t *report) { uint8_t timeout = 255; - uint8_t where = where_to_send(); #ifdef BLUETOOTH_ENABLE + uint8_t where = where_to_send(); + if (where == OUTPUT_BLUETOOTH || where == OUTPUT_USB_AND_BT) { # ifdef MODULE_ADAFRUIT_BLE adafruit_ble_send_keys(report->mods, report->keys, sizeof(report->keys)); @@ -578,11 +579,11 @@ static void send_keyboard(report_keyboard_t *report) { } # endif } -#endif if (where != OUTPUT_USB && where != OUTPUT_USB_AND_BT) { return; } +#endif /* Select the Keyboard Report Endpoint */ uint8_t ep = KEYBOARD_IN_EPNUM; @@ -618,9 +619,10 @@ static void send_keyboard(report_keyboard_t *report) { static void send_mouse(report_mouse_t *report) { #ifdef MOUSE_ENABLE uint8_t timeout = 255; - uint8_t where = where_to_send(); # ifdef BLUETOOTH_ENABLE + uint8_t where = where_to_send(); + if (where == OUTPUT_BLUETOOTH || where == OUTPUT_USB_AND_BT) { # ifdef MODULE_ADAFRUIT_BLE // FIXME: mouse buttons @@ -637,11 +639,11 @@ static void send_mouse(report_mouse_t *report) { bluefruit_serial_send(0x00); # endif } -# endif if (where != OUTPUT_USB && where != OUTPUT_USB_AND_BT) { return; } +# endif /* Select the Mouse Report Endpoint */ Endpoint_SelectEndpoint(MOUSE_IN_EPNUM); @@ -696,9 +698,9 @@ static void send_system(uint16_t data) { */ static void send_consumer(uint16_t data) { #ifdef EXTRAKEY_ENABLE +# ifdef BLUETOOTH_ENABLE uint8_t where = where_to_send(); -# ifdef BLUETOOTH_ENABLE if (where == OUTPUT_BLUETOOTH || where == OUTPUT_USB_AND_BT) { # ifdef MODULE_ADAFRUIT_BLE adafruit_ble_send_consumer_key(data, 0); @@ -728,11 +730,11 @@ static void send_consumer(uint16_t data) { bluefruit_serial_send(0x00); # endif } -# endif if (where != OUTPUT_USB && where != OUTPUT_USB_AND_BT) { return; } +# endif send_extra(REPORT_ID_CONSUMER, data); #endif From 60e5733c487cc0435e7d3b913f31ce4acc405d4a Mon Sep 17 00:00:00 2001 From: Nick Brassel Date: Mon, 22 Jun 2020 11:22:00 +1000 Subject: [PATCH 661/930] `qmk cformat` on `develop` (#9501) --- tmk_core/protocol/chibios/usb_main.c | 4 +--- tmk_core/protocol/lufa/lufa.c | 4 ++-- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/tmk_core/protocol/chibios/usb_main.c b/tmk_core/protocol/chibios/usb_main.c index 9d68419f42e6..21e9f14e50a8 100644 --- a/tmk_core/protocol/chibios/usb_main.c +++ b/tmk_core/protocol/chibios/usb_main.c @@ -796,9 +796,7 @@ int8_t sendchar(uint8_t c) { } #endif /* CONSOLE_ENABLE */ -void _putchar(char character) { - sendchar(character); -} +void _putchar(char character) { sendchar(character); } #ifdef RAW_ENABLE void raw_hid_send(uint8_t *data, uint8_t length) { diff --git a/tmk_core/protocol/lufa/lufa.c b/tmk_core/protocol/lufa/lufa.c index ca3384ba2552..6776a964e976 100644 --- a/tmk_core/protocol/lufa/lufa.c +++ b/tmk_core/protocol/lufa/lufa.c @@ -556,7 +556,7 @@ static void send_keyboard(report_keyboard_t *report) { uint8_t timeout = 255; #ifdef BLUETOOTH_ENABLE - uint8_t where = where_to_send(); + uint8_t where = where_to_send(); if (where == OUTPUT_BLUETOOTH || where == OUTPUT_USB_AND_BT) { # ifdef MODULE_ADAFRUIT_BLE @@ -621,7 +621,7 @@ static void send_mouse(report_mouse_t *report) { uint8_t timeout = 255; # ifdef BLUETOOTH_ENABLE - uint8_t where = where_to_send(); + uint8_t where = where_to_send(); if (where == OUTPUT_BLUETOOTH || where == OUTPUT_USB_AND_BT) { # ifdef MODULE_ADAFRUIT_BLE From 8a4a0c25fdb2c4d0ac3ac8fd5f6ba14b56f4cd28 Mon Sep 17 00:00:00 2001 From: Ryan Date: Thu, 2 Jul 2020 13:12:34 +1000 Subject: [PATCH 662/930] Change analogRead calls to analogReadPin (#9023) * Change analogRead calls to analogReadPin * Add ChangeLog * Update docs, remove mention of `analogRead()` * Retarget changelog for next round --- docs/ChangeLog/20200829/PR9023.md | 5 +++ docs/adc_driver.md | 39 ++++++++++----------- keyboards/handwired/promethium/config.h | 1 - keyboards/handwired/promethium/promethium.c | 3 +- tmk_core/protocol/lufa/adafruit_ble.cpp | 4 +-- 5 files changed, 27 insertions(+), 25 deletions(-) create mode 100644 docs/ChangeLog/20200829/PR9023.md diff --git a/docs/ChangeLog/20200829/PR9023.md b/docs/ChangeLog/20200829/PR9023.md new file mode 100644 index 000000000000..79ca2cb2f843 --- /dev/null +++ b/docs/ChangeLog/20200829/PR9023.md @@ -0,0 +1,5 @@ +# Deprecation of `analogRead()` + +[#9023](https://github.com/qmk/qmk_firmware/pull/9023) + +This function takes Arduino pin numbers (eg. `9` vs. `B5`), which is at odds with the rest of the codebase. The replacement for this function is `analogReadPin()`. diff --git a/docs/adc_driver.md b/docs/adc_driver.md index f8fb94094e84..6e3d513863bb 100644 --- a/docs/adc_driver.md +++ b/docs/adc_driver.md @@ -45,9 +45,9 @@ Then place this include at the top of your code: Note that some of these pins are doubled-up on ADCs with the same channel. This is because the pins can be used for either ADC. -Also note that the F0 and F3 use different numbering schemes. The F0 has a single ADC and the channels are 0-based, whereas the F3 has 4 ADCs and the channels are 1 based. This is because the F0 uses the `ADCv1` implementation of the ADC, whereas the F3 uses the `ADCv3` implementation. +Also note that the F0 and F3 use different numbering schemes. The F0 has a single ADC and the channels are 0-indexed, whereas the F3 has 4 ADCs and the channels are 1-indexed. This is because the F0 uses the `ADCv1` implementation of the ADC, whereas the F3 uses the `ADCv3` implementation. -|ADC|Channel|STM32F0XX|STM32F3XX| +|ADC|Channel|STM32F0xx|STM32F3xx| |---|-------|---------|---------| |1 |0 |`A0` | | |1 |1 |`A1` |`A0` | @@ -122,32 +122,29 @@ Also note that the F0 and F3 use different numbering schemes. The F0 has a singl |Function |Description | |----------------------------|-------------------------------------------------------------------------------------------------------------------| |`analogReference(mode)` |Sets the analog voltage reference source. Must be one of `ADC_REF_EXTERNAL`, `ADC_REF_POWER` or `ADC_REF_INTERNAL`.| -|`analogRead(pin)` |Reads the value from the specified Arduino pin, eg. `4` for ADC6 on the ATmega32U4. | -|`analogReadPin(pin)` |Reads the value from the specified QMK pin, eg. `F6` for ADC6 on the ATmega32U4. | -|`pinToMux(pin)` |Translates a given QMK pin to a mux value. If an unsupported pin is given, returns the mux value for "0V (GND)". | +|`analogReadPin(pin)` |Reads the value from the specified pin, eg. `F6` for ADC6 on the ATmega32U4. | +|`pinToMux(pin)` |Translates a given pin to a mux value. If an unsupported pin is given, returns the mux value for "0V (GND)". | |`adc_read(mux)` |Reads the value from the ADC according to the specified mux. See your MCU's datasheet for more information. | ### ARM -Note that care was taken to match all of the functions used for AVR devices, however complications in the ARM platform prevent that from always being possible. For example, the `STM32` chips do not have assigned Arduino pins. We could use the default pin numbers, but those numbers change based on the package type of the device. For this reason, please specify your target pins with their identifiers (`A0`, `F3`, etc.). Also note that there are some variants of functions that accept the target ADC for the pin. Some pins can be used for multiple ADCs, and this specified can help you pick which ADC will be used to interact with that pin. - -|Function |Description | -|----------------------------|--------------------------------------------------------------------------------------------------------------------| -|`analogReadPin(pin)` |Reads the value from the specified QMK pin, eg. `A0` for channel 0 on the STM32F0 and ADC1 channel 1 on the STM32F3. Note that if a pin can be used for multiple ADCs, it will pick the lower numbered ADC for this function. eg. `C0` will be channel 6 of ADC 1 when it could be used for ADC 2 as well.| -|`analogReadPinAdc(pin, adc)`|Reads the value from the specified QMK pin and ADC, eg. `C0, 1` will read from channel 6, ADC 2 instead of ADC 1. Note that the ADCs are 0-indexed for this function.| -|`pinToMux(pin)` |Translates a given QMK pin to a channel and ADC combination. If an unsupported pin is given, returns the mux value for "0V (GND)".| -|`adc_read(mux)` |Reads the value from the ADC according to the specified pin and adc combination. See your MCU's datasheet for more information.| +|Function |Description | +|----------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +|`analogReadPin(pin)` |Reads the value from the specified pin, eg. `A0` for channel 0 on the STM32F0 and ADC1 channel 1 on the STM32F3. Note that if a pin can be used for multiple ADCs, it will pick the lower numbered ADC for this function. eg. `C0` will be channel 6 of ADC 1 when it could be used for ADC 2 as well.| +|`analogReadPinAdc(pin, adc)`|Reads the value from the specified pin and ADC, eg. `C0, 1` will read from channel 6, ADC 2 instead of ADC 1. Note that the ADCs are 0-indexed for this function. | +|`pinToMux(pin)` |Translates a given pin to a channel and ADC combination. If an unsupported pin is given, returns the mux value for "0V (GND)". | +|`adc_read(mux)` |Reads the value from the ADC according to the specified pin and ADC combination. See your MCU's datasheet for more information. | ## Configuration ## ARM -The ARM implementation of the ADC has a few additional options that you can override in your own keyboards and keymaps to change how it operates. +The ARM implementation of the ADC has a few additional options that you can override in your own keyboards and keymaps to change how it operates. Please consult the corresponding `hal_adc_lld.h` in ChibiOS for your specific microcontroller for further documentation on your available options. -|`#define` |Type |Default |Description| -|-------------------|------|---------------------|-----------| -|ADC_CIRCULAR_BUFFER|`bool`|`false` |If `TRUE`, then the implementation will use a circular buffer.| -|ADC_NUM_CHANNELS |`int` |`1` |Sets the number of channels that will be scanned as part of an ADC operation. The current implementation only supports `1`.| -|ADC_BUFFER_DEPTH |`int` |`2` |Sets the depth of each result. Since we are only getting a 12-bit result by default, we set this to `2` bytes so we can contain our one value. This could be set to 1 if you opt for a 8-bit or lower result.| -|ADC_SAMPLING_RATE |`int` |`ADC_SMPR_SMP_1P5` |Sets the sampling rate of the ADC. By default, it is set to the fastest setting. Please consult the corresponding `hal_adc_lld.h` in ChibiOS for your specific microcontroller for further documentation on your available options.| -|ADC_RESOLUTION |`int` |`ADC_CFGR1_RES_12BIT`|The resolution of your result. We choose 12 bit by default, but you can opt for 12, 10, 8, or 6 bit. Please consult the corresponding `hal_adc_lld.h` in ChibiOS for your specific microcontroller for further documentation on your available options.| +|`#define` |Type |Default |Description | +|---------------------|------|---------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +|`ADC_CIRCULAR_BUFFER`|`bool`|`false` |If `true`, then the implementation will use a circular buffer. | +|`ADC_NUM_CHANNELS` |`int` |`1` |Sets the number of channels that will be scanned as part of an ADC operation. The current implementation only supports `1`. | +|`ADC_BUFFER_DEPTH` |`int` |`2` |Sets the depth of each result. Since we are only getting a 12-bit result by default, we set this to 2 bytes so we can contain our one value. This could be set to 1 if you opt for an 8-bit or lower result.| +|`ADC_SAMPLING_RATE` |`int` |`ADC_SMPR_SMP_1P5` |Sets the sampling rate of the ADC. By default, it is set to the fastest setting. | +|`ADC_RESOLUTION` |`int` |`ADC_CFGR1_RES_12BIT`|The resolution of your result. We choose 12 bit by default, but you can opt for 12, 10, 8, or 6 bit. | diff --git a/keyboards/handwired/promethium/config.h b/keyboards/handwired/promethium/config.h index f9560206b49c..20c5e6a855b9 100644 --- a/keyboards/handwired/promethium/config.h +++ b/keyboards/handwired/promethium/config.h @@ -150,7 +150,6 @@ along with this program. If not, see . //#define NO_ACTION_FUNCTION #define PS2_MOUSE_INIT_DELAY 2000 -#define BATTERY_PIN 9 #define BATTERY_POLL 30000 #define MAX_VOLTAGE 4.2 #define MIN_VOLTAGE 3.2 diff --git a/keyboards/handwired/promethium/promethium.c b/keyboards/handwired/promethium/promethium.c index 3cc0f5a8c829..96bcf3ce1480 100644 --- a/keyboards/handwired/promethium/promethium.c +++ b/keyboards/handwired/promethium/promethium.c @@ -3,6 +3,7 @@ #include "timer.h" #include "matrix.h" #include "musical_notes.h" +#include "adafruit_ble.h" float fauxclicky_pressed_note[2] = MUSICAL_NOTE(_A4, 0.0625); float fauxclicky_released_note[2] = MUSICAL_NOTE(_A4, 0.0625); @@ -11,7 +12,7 @@ float fauxclicky_beep_note[2] = MUSICAL_NOTE(_C6, 0.25); // cubic fit {3.3, 0}, {3.5, 2.9}, {3.6, 5}, {3.7, 8.6}, {3.8, 36}, {3.9, 62}, {4.0, 73}, {4.05, 83}, {4.1, 89}, {4.15, 94}, {4.2, 100} uint8_t battery_level(void) { - float voltage = analogRead(BATTERY_PIN) * 2 * 3.3 / 1024; + float voltage = adafruit_ble_read_battery_voltage() * 2 * 3.3 / 1024; if (voltage < MIN_VOLTAGE) return 0; if (voltage > MAX_VOLTAGE) return 255; return (voltage - MIN_VOLTAGE) / (MAX_VOLTAGE - MIN_VOLTAGE) * 255; diff --git a/tmk_core/protocol/lufa/adafruit_ble.cpp b/tmk_core/protocol/lufa/adafruit_ble.cpp index b07407f38775..79b35fca317e 100644 --- a/tmk_core/protocol/lufa/adafruit_ble.cpp +++ b/tmk_core/protocol/lufa/adafruit_ble.cpp @@ -38,7 +38,7 @@ #ifdef SAMPLE_BATTERY # ifndef BATTERY_LEVEL_PIN -# define BATTERY_LEVEL_PIN 7 +# define BATTERY_LEVEL_PIN B5 # endif #endif @@ -556,7 +556,7 @@ void adafruit_ble_task(void) { if (timer_elapsed(state.last_battery_update) > BatteryUpdateInterval && resp_buf.empty()) { state.last_battery_update = timer_read(); - state.vbat = analogRead(BATTERY_LEVEL_PIN); + state.vbat = analogReadPin(BATTERY_LEVEL_PIN); } #endif } From c6b7a0d386c347f20117943831a0215659d37c47 Mon Sep 17 00:00:00 2001 From: Nick Brassel Date: Thu, 16 Jul 2020 16:39:49 +1000 Subject: [PATCH 663/930] Add support for DMAMUX-capable MCU configuration with WS2812 PWM driver. (#9471) --- docs/ws2812_driver.md | 3 ++- drivers/chibios/ws2812_pwm.c | 8 ++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/docs/ws2812_driver.md b/docs/ws2812_driver.md index 941e1bde084a..c1b96329e9c4 100644 --- a/docs/ws2812_driver.md +++ b/docs/ws2812_driver.md @@ -92,6 +92,7 @@ Configure the hardware via your config.h: #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. +#define WS2812_DMAMUX_ID STM32_DMAMUX1_TIM2_UP // DMAMUX configuration for TIMx_UP -- only required if your MCU has a DMAMUX peripheral, 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 @@ -117,5 +118,5 @@ Note: This only applies to STM32 boards. To configure the `RGB_DI_PIN` to open drain configuration add this to your config.h file: ```c - #define WS2812_EXTERNAL_PULLUP +#define WS2812_EXTERNAL_PULLUP ``` diff --git a/drivers/chibios/ws2812_pwm.c b/drivers/chibios/ws2812_pwm.c index 7113db11e0b9..d93fa24735d5 100644 --- a/drivers/chibios/ws2812_pwm.c +++ b/drivers/chibios/ws2812_pwm.c @@ -23,6 +23,9 @@ #ifndef WS2812_DMA_CHANNEL # define WS2812_DMA_CHANNEL 2 // DMA Channel for TIMx_UP #endif +#if (STM32_DMA_SUPPORTS_DMAMUX == TRUE) && !defined(WS2812_DMAMUX_ID) +# error "please consult your MCU's datasheet and specify in your config.h: #define WS2812_DMAMUX_ID STM32_DMAMUX1_TIM?_UP" +#endif // Push Pull or Open Drain Configuration // Default Push Pull @@ -184,6 +187,11 @@ void ws2812_init(void) { 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 +#if (STM32_DMA_SUPPORTS_DMAMUX == TRUE) + // If the MCU has a DMAMUX we need to assign the correct resource + dmaSetRequestSource(WS2812_DMA_STREAM, WS2812_DMAMUX_ID); +#endif + // Start DMA dmaStreamEnable(WS2812_DMA_STREAM); From 86e30c26095bb9fdcb8edc23d7d5e879382087cf Mon Sep 17 00:00:00 2001 From: Nick Brassel Date: Thu, 16 Jul 2020 16:44:55 +1000 Subject: [PATCH 664/930] F303/Proton-C migration. (#9315) --- .../GENERIC_STM32_F303XC/board/board.c | 242 --------- .../GENERIC_STM32_F303XC/board/board.h | 475 ------------------ .../GENERIC_STM32_F303XC/board/board.mk | 4 +- .../GENERIC_STM32_F303XC/configs/board.h | 37 ++ .../GENERIC_STM32_F303XC/configs/config.h | 18 + 5 files changed, 57 insertions(+), 719 deletions(-) delete mode 100644 platforms/chibios/GENERIC_STM32_F303XC/board/board.c delete mode 100644 platforms/chibios/GENERIC_STM32_F303XC/board/board.h create mode 100644 platforms/chibios/GENERIC_STM32_F303XC/configs/board.h create mode 100644 platforms/chibios/GENERIC_STM32_F303XC/configs/config.h diff --git a/platforms/chibios/GENERIC_STM32_F303XC/board/board.c b/platforms/chibios/GENERIC_STM32_F303XC/board/board.c deleted file mode 100644 index 4722acd648fe..000000000000 --- a/platforms/chibios/GENERIC_STM32_F303XC/board/board.c +++ /dev/null @@ -1,242 +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. -*/ - -/* - * 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; - -/** - * @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 - {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_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 -} - -__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_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. - */ -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/platforms/chibios/GENERIC_STM32_F303XC/board/board.h b/platforms/chibios/GENERIC_STM32_F303XC/board/board.h deleted file mode 100644 index 3579c82770ec..000000000000 --- a/platforms/chibios/GENERIC_STM32_F303XC/board/board.h +++ /dev/null @@ -1,475 +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. -*/ - -#ifndef _BOARD_H_ -#define _BOARD_H_ - -/* - * Setup for Generic STM32_F303 Board - */ - -/* - * Board identifier. - */ -#define BOARD_GENERIC_STM32_F303XC -#define BOARD_NAME "STM32_F303" - -/* - * Board oscillators-related settings. - * NOTE: LSE not fitted. - */ -#if !defined(STM32_LSECLK) -# define STM32_LSECLK 0U -#endif - -#define STM32_LSEDRV (3U << 3U) - -#if !defined(STM32_HSECLK) -# define STM32_HSECLK 8000000U -#endif - -// #define STM32_HSE_BYPASS - -/* - * MCU type as defined in the ST header. - */ -#define STM32F303xC - -/* - * IO pins assignments. - */ -#define GPIOA_PIN0 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_PIN13 13U -#define GPIOB_PIN14 14U -#define GPIOB_PIN15 15U - -#define GPIOC_PIN0 0U -#define GPIOC_PIN1 1U -#define GPIOC_PIN2 2U -#define GPIOC_PIN3 3U -#define GPIOC_PIN4 4U -#define GPIOC_PIN5 5U -#define GPIOC_PIN6 6U -#define GPIOC_PIN7 7U -#define GPIOC_PIN8 8U -#define GPIOC_PIN9 9U -#define GPIOC_PIN10 10U -#define GPIOC_PIN11 11U -#define GPIOC_PIN12 12U -#define GPIOC_PIN13 13U -#define GPIOC_PIN14 14U -#define GPIOC_PIN15 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_I2C2_SDA 0U -#define GPIOF_I2C2_SCL 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 GPIOG_PIN0 0U -#define GPIOG_PIN1 1U -#define GPIOG_PIN2 2U -#define GPIOG_PIN3 3U -#define GPIOG_PIN4 4U -#define GPIOG_PIN5 5U -#define GPIOG_PIN6 6U -#define GPIOG_PIN7 7U -#define GPIOG_PIN8 8U -#define GPIOG_PIN9 9U -#define GPIOG_PIN10 10U -#define GPIOG_PIN11 11U -#define GPIOG_PIN12 12U -#define GPIOG_PIN13 13U -#define GPIOG_PIN14 14U -#define GPIOG_PIN15 15U - -#define GPIOH_PIN0 0U -#define GPIOH_PIN1 1U -#define GPIOH_PIN2 2U -#define GPIOH_PIN3 3U -#define GPIOH_PIN4 4U -#define GPIOH_PIN5 5U -#define GPIOH_PIN6 6U -#define GPIOH_PIN7 7U -#define GPIOH_PIN8 8U -#define GPIOH_PIN9 9U -#define GPIOH_PIN10 10U -#define GPIOH_PIN11 11U -#define GPIOH_PIN12 12U -#define GPIOH_PIN13 13U -#define GPIOH_PIN14 14U -#define GPIOH_PIN15 15U - -/* - * IO lines assignments. - */ -#define LINE_L3GD20_SDI PAL_LINE(GPIOA, 7U) -#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_PIN6 PAL_LINE(GPIOF, 0U) -#define LINE_PIN7 PAL_LINE(GPIOF, 1U) - -#define LINE_CAPS_LOCK PAL_LINE(GPIOB, 7U) - -/* - * 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 - NC - * PA1 - NC - * PA2 - COL1 - * PA3 - COL2 - * PA4 - SPEAKER1 - * PA5 - SPEAKER2 - * PA6 - COL3 - * PA7 - COL8 - * PA8 - COL6 - * PA9 - COL7 - * PA10 - ROW5 - * PA11 - USB_DM (alternate 14). - * PA12 - USB_DP (alternate 14). - * PA13 - SWDIO (alternate 0). - * PA14 - SWCLK (alternate 0). - * PA15 - ROW4 - */ -#define VAL_GPIOA_MODER (PIN_MODE_INPUT(GPIOA_PIN0) | PIN_MODE_ALTERNATE(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_ALTERNATE(GPIOA_USB_DM) | PIN_MODE_ALTERNATE(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_PIN0) | 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_PIN0) | PIN_OSPEED_HIGH(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_HIGH(GPIOA_USB_DM) | PIN_OSPEED_VERYLOW(GPIOA_USB_DP) | PIN_OSPEED_HIGH(GPIOA_SWDIO) | PIN_OSPEED_HIGH(GPIOA_SWCLK) | PIN_OSPEED_VERYLOW(GPIOA_PIN15)) -#define VAL_GPIOA_PUPDR (PIN_PUPDR_FLOATING(GPIOA_PIN0) | PIN_PUPDR_FLOATING(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_FLOATING(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_PIN0) | 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_PIN0, 0) | PIN_AFIO_AF(GPIOA_PIN1, 1) | PIN_AFIO_AF(GPIOA_PIN2, 0) | PIN_AFIO_AF(GPIOA_PIN3, 0) | PIN_AFIO_AF(GPIOA_PIN4, 0) | PIN_AFIO_AF(GPIOA_PIN5, 5) | PIN_AFIO_AF(GPIOA_PIN6, 5) | PIN_AFIO_AF(GPIOA_PIN7, 5)) -#define VAL_GPIOA_AFRH (PIN_AFIO_AF(GPIOA_PIN8, 0) | PIN_AFIO_AF(GPIOA_PIN9, 0) | PIN_AFIO_AF(GPIOA_PIN10, 0) | PIN_AFIO_AF(GPIOA_USB_DM, 14) | PIN_AFIO_AF(GPIOA_USB_DP, 14) | PIN_AFIO_AF(GPIOA_SWDIO, 0) | PIN_AFIO_AF(GPIOA_SWCLK, 0) | PIN_AFIO_AF(GPIOA_PIN15, 0)) - -/* - * GPIOB setup: - * - * PB0 - PIN0 (input pullup). - * PB1 - PIN1 (input pullup). - * PB2 - PIN2 (input pullup). - * PB3 - PIN3 (alternate 0). - * PB4 - PIN4 (input pullup). - * PB5 - PIN5 (input pullup). - * PB6 - PIN6 LSM303DLHC_SCL (alternate 4). - * PB7 - PIN7 LSM303DLHC_SDA (alternate 4). - * PB8 - PIN8 (input pullup). - * PB9 - PIN9 (input pullup). - * PB10 - PIN10 (input pullup). - * PB11 - PIN11 (input pullup). - * PB12 - PIN12 (input pullup). - * PB13 - PIN13 (input pullup). - * PB14 - PIN14 (input pullup). - * PB15 - PIN15 (input pullup). - */ -#define VAL_GPIOB_MODER (PIN_MODE_INPUT(GPIOB_PIN0) | PIN_MODE_INPUT(GPIOB_PIN1) | PIN_MODE_INPUT(GPIOB_PIN2) | PIN_MODE_ALTERNATE(GPIOB_PIN3) | PIN_MODE_INPUT(GPIOB_PIN4) | PIN_MODE_INPUT(GPIOB_PIN5) | PIN_MODE_ALTERNATE(GPIOB_PIN6) | PIN_MODE_OUTPUT(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_INPUT(GPIOB_PIN13) | PIN_MODE_INPUT(GPIOB_PIN14) | PIN_MODE_INPUT(GPIOB_PIN15)) -#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_OPENDRAIN(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_PIN13) | PIN_OTYPE_PUSHPULL(GPIOB_PIN14) | PIN_OTYPE_PUSHPULL(GPIOB_PIN15)) -#define VAL_GPIOB_OSPEEDR (PIN_OSPEED_VERYLOW(GPIOB_PIN0) | PIN_OSPEED_VERYLOW(GPIOB_PIN1) | PIN_OSPEED_VERYLOW(GPIOB_PIN2) | PIN_OSPEED_HIGH(GPIOB_PIN3) | PIN_OSPEED_VERYLOW(GPIOB_PIN4) | PIN_OSPEED_VERYLOW(GPIOB_PIN5) | PIN_OSPEED_HIGH(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_PIN13) | PIN_OSPEED_VERYLOW(GPIOB_PIN14) | PIN_OSPEED_VERYLOW(GPIOB_PIN15)) -#define VAL_GPIOB_PUPDR (PIN_PUPDR_PULLUP(GPIOB_PIN0) | PIN_PUPDR_PULLUP(GPIOB_PIN1) | PIN_PUPDR_PULLUP(GPIOB_PIN2) | PIN_PUPDR_FLOATING(GPIOB_PIN3) | PIN_PUPDR_PULLUP(GPIOB_PIN4) | PIN_PUPDR_PULLUP(GPIOB_PIN5) | PIN_PUPDR_FLOATING(GPIOB_PIN6) | PIN_PUPDR_PULLDOWN(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_PULLUP(GPIOB_PIN13) | PIN_PUPDR_PULLUP(GPIOB_PIN14) | PIN_PUPDR_PULLUP(GPIOB_PIN15)) -#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_LOW(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_PIN13) | PIN_ODR_HIGH(GPIOB_PIN14) | PIN_ODR_HIGH(GPIOB_PIN15)) -#define VAL_GPIOB_AFRL (PIN_AFIO_AF(GPIOB_PIN0, 0) | PIN_AFIO_AF(GPIOB_PIN1, 0) | PIN_AFIO_AF(GPIOB_PIN2, 0) | PIN_AFIO_AF(GPIOB_PIN3, 0) | PIN_AFIO_AF(GPIOB_PIN4, 0) | PIN_AFIO_AF(GPIOB_PIN5, 0) | PIN_AFIO_AF(GPIOB_PIN6, 4) | PIN_AFIO_AF(GPIOB_PIN7, 0)) -#define VAL_GPIOB_AFRH (PIN_AFIO_AF(GPIOB_PIN8, 0) | PIN_AFIO_AF(GPIOB_PIN9, 0) | PIN_AFIO_AF(GPIOB_PIN10, 0) | PIN_AFIO_AF(GPIOB_PIN11, 0) | PIN_AFIO_AF(GPIOB_PIN12, 0) | PIN_AFIO_AF(GPIOB_PIN13, 0) | PIN_AFIO_AF(GPIOB_PIN14, 0) | PIN_AFIO_AF(GPIOB_PIN15, 0)) - -/* - * GPIOC setup: - * - * PC0 - PIN0 (input pullup). - * PC1 - PIN1 (input pullup). - * PC2 - PIN2 (input pullup). - * PC3 - PIN3 (input pullup). - * PC4 - PIN4 (input pullup). - * PC5 - PIN5 (input pullup). - * PC6 - PIN6 (input pullup). - * PC7 - PIN7 (input pullup). - * PC8 - PIN8 (input pullup). - * PC9 - PIN9 (input pullup). - * PC10 - PIN10 (input pullup). - * PC11 - PIN11 (input pullup). - * PC12 - PIN12 (input pullup). - * PC13 - PIN13 (input pullup). - * PC14 - PIN14 (input floating). - * PC15 - PIN15 (input floating). - */ -#define VAL_GPIOC_MODER (PIN_MODE_INPUT(GPIOC_PIN0) | 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_INPUT(GPIOC_PIN6) | PIN_MODE_INPUT(GPIOC_PIN7) | PIN_MODE_INPUT(GPIOC_PIN8) | PIN_MODE_INPUT(GPIOC_PIN9) | PIN_MODE_INPUT(GPIOC_PIN10) | PIN_MODE_INPUT(GPIOC_PIN11) | PIN_MODE_INPUT(GPIOC_PIN12) | PIN_MODE_INPUT(GPIOC_PIN13) | PIN_MODE_INPUT(GPIOC_PIN14) | PIN_MODE_INPUT(GPIOC_PIN15)) -#define VAL_GPIOC_OTYPER (PIN_OTYPE_PUSHPULL(GPIOC_PIN0) | 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_PIN6) | PIN_OTYPE_PUSHPULL(GPIOC_PIN7) | PIN_OTYPE_PUSHPULL(GPIOC_PIN8) | PIN_OTYPE_PUSHPULL(GPIOC_PIN9) | PIN_OTYPE_PUSHPULL(GPIOC_PIN10) | PIN_OTYPE_PUSHPULL(GPIOC_PIN11) | PIN_OTYPE_PUSHPULL(GPIOC_PIN12) | PIN_OTYPE_PUSHPULL(GPIOC_PIN13) | PIN_OTYPE_PUSHPULL(GPIOC_PIN14) | PIN_OTYPE_PUSHPULL(GPIOC_PIN15)) -#define VAL_GPIOC_OSPEEDR (PIN_OSPEED_VERYLOW(GPIOC_PIN0) | 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_VERYLOW(GPIOC_PIN6) | PIN_OSPEED_VERYLOW(GPIOC_PIN7) | PIN_OSPEED_VERYLOW(GPIOC_PIN8) | PIN_OSPEED_VERYLOW(GPIOC_PIN9) | PIN_OSPEED_VERYLOW(GPIOC_PIN10) | PIN_OSPEED_VERYLOW(GPIOC_PIN11) | PIN_OSPEED_VERYLOW(GPIOC_PIN12) | PIN_OSPEED_VERYLOW(GPIOC_PIN13) | PIN_OSPEED_HIGH(GPIOC_PIN14) | PIN_OSPEED_HIGH(GPIOC_PIN15)) -#define VAL_GPIOC_PUPDR (PIN_PUPDR_PULLUP(GPIOC_PIN0) | 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_PULLUP(GPIOC_PIN6) | PIN_PUPDR_PULLUP(GPIOC_PIN7) | PIN_PUPDR_PULLUP(GPIOC_PIN8) | PIN_PUPDR_PULLUP(GPIOC_PIN9) | PIN_PUPDR_PULLUP(GPIOC_PIN10) | PIN_PUPDR_PULLUP(GPIOC_PIN11) | PIN_PUPDR_PULLUP(GPIOC_PIN12) | PIN_PUPDR_PULLUP(GPIOC_PIN13) | PIN_PUPDR_FLOATING(GPIOC_PIN14) | PIN_PUPDR_FLOATING(GPIOC_PIN15)) -#define VAL_GPIOC_ODR (PIN_ODR_HIGH(GPIOC_PIN0) | 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_HIGH(GPIOC_PIN6) | PIN_ODR_HIGH(GPIOC_PIN7) | PIN_ODR_HIGH(GPIOC_PIN8) | PIN_ODR_HIGH(GPIOC_PIN9) | PIN_ODR_HIGH(GPIOC_PIN10) | PIN_ODR_HIGH(GPIOC_PIN11) | PIN_ODR_HIGH(GPIOC_PIN12) | PIN_ODR_HIGH(GPIOC_PIN13) | PIN_ODR_HIGH(GPIOC_PIN14) | PIN_ODR_HIGH(GPIOC_PIN15)) -#define VAL_GPIOC_AFRL (PIN_AFIO_AF(GPIOC_PIN0, 0) | PIN_AFIO_AF(GPIOC_PIN1, 0) | PIN_AFIO_AF(GPIOC_PIN2, 0) | PIN_AFIO_AF(GPIOC_PIN3, 0) | PIN_AFIO_AF(GPIOC_PIN4, 0) | PIN_AFIO_AF(GPIOC_PIN5, 0) | PIN_AFIO_AF(GPIOC_PIN6, 0) | PIN_AFIO_AF(GPIOC_PIN7, 0)) -#define VAL_GPIOC_AFRH (PIN_AFIO_AF(GPIOC_PIN8, 0) | PIN_AFIO_AF(GPIOC_PIN9, 0) | PIN_AFIO_AF(GPIOC_PIN10, 0) | PIN_AFIO_AF(GPIOC_PIN11, 0) | PIN_AFIO_AF(GPIOC_PIN12, 0) | PIN_AFIO_AF(GPIOC_PIN13, 0) | PIN_AFIO_AF(GPIOC_PIN14, 0) | PIN_AFIO_AF(GPIOC_PIN15, 0)) - -/* - * 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). - * PD11 - 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, 0) | PIN_AFIO_AF(GPIOD_PIN1, 0) | PIN_AFIO_AF(GPIOD_PIN2, 0) | PIN_AFIO_AF(GPIOD_PIN3, 0) | PIN_AFIO_AF(GPIOD_PIN4, 0) | PIN_AFIO_AF(GPIOD_PIN5, 0) | PIN_AFIO_AF(GPIOD_PIN6, 0) | PIN_AFIO_AF(GPIOD_PIN7, 0)) -#define VAL_GPIOD_AFRH (PIN_AFIO_AF(GPIOD_PIN8, 0) | PIN_AFIO_AF(GPIOD_PIN9, 0) | PIN_AFIO_AF(GPIOD_PIN10, 0) | PIN_AFIO_AF(GPIOD_PIN11, 0) | PIN_AFIO_AF(GPIOD_PIN12, 0) | PIN_AFIO_AF(GPIOD_PIN13, 0) | PIN_AFIO_AF(GPIOD_PIN14, 0) | PIN_AFIO_AF(GPIOD_PIN15, 0)) - -/* - * GPIOE setup: - * - * PE0 - PIN0 (input pullup). - * PE1 - PIN1 (input pullup). - * PE2 - PIN2 (input pullup). - * PE3 - PIN3 L3GD20_CS (output pushpull maximum). - * PE4 - PIN4 (input pullup). - * PE5 - PIN5 (input pullup). - * PE6 - PIN6 (input pullup). - * PE7 - PIN7 (input pullup). - * PE8 - PIN8 (output pushpull maximum). - * PE9 - PIN9 (output pushpull maximum). - * PE10 - PIN10 (output pushpull maximum). - * PE11 - PIN11 (output pushpull maximum). - * PE12 - PIN12 (output pushpull maximum). - * PE13 - PIN13 (output pushpull maximum). - * PE14 - PIN14 (output pushpull maximum). - * PE15 - PIN15 (output pushpull maximum). - */ -#define VAL_GPIOE_MODER (PIN_MODE_INPUT(GPIOE_PIN0) | PIN_MODE_INPUT(GPIOE_PIN1) | PIN_MODE_INPUT(GPIOE_PIN2) | PIN_MODE_OUTPUT(GPIOE_PIN3) | PIN_MODE_INPUT(GPIOE_PIN4) | PIN_MODE_INPUT(GPIOE_PIN5) | PIN_MODE_INPUT(GPIOE_PIN6) | PIN_MODE_INPUT(GPIOE_PIN7) | PIN_MODE_OUTPUT(GPIOE_PIN8) | PIN_MODE_OUTPUT(GPIOE_PIN9) | PIN_MODE_OUTPUT(GPIOE_PIN10) | PIN_MODE_OUTPUT(GPIOE_PIN11) | PIN_MODE_OUTPUT(GPIOE_PIN12) | PIN_MODE_OUTPUT(GPIOE_PIN13) | PIN_MODE_OUTPUT(GPIOE_PIN14) | PIN_MODE_OUTPUT(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_HIGH(GPIOE_PIN3) | PIN_OSPEED_VERYLOW(GPIOE_PIN4) | PIN_OSPEED_VERYLOW(GPIOE_PIN5) | PIN_OSPEED_VERYLOW(GPIOE_PIN6) | PIN_OSPEED_VERYLOW(GPIOE_PIN7) | PIN_OSPEED_HIGH(GPIOE_PIN8) | PIN_OSPEED_HIGH(GPIOE_PIN9) | PIN_OSPEED_HIGH(GPIOE_PIN10) | PIN_OSPEED_HIGH(GPIOE_PIN11) | PIN_OSPEED_HIGH(GPIOE_PIN12) | PIN_OSPEED_HIGH(GPIOE_PIN13) | PIN_OSPEED_HIGH(GPIOE_PIN14) | PIN_OSPEED_HIGH(GPIOE_PIN15)) -#define VAL_GPIOE_PUPDR (PIN_PUPDR_PULLUP(GPIOE_PIN0) | PIN_PUPDR_PULLUP(GPIOE_PIN1) | PIN_PUPDR_PULLUP(GPIOE_PIN2) | PIN_PUPDR_FLOATING(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_FLOATING(GPIOE_PIN11) | PIN_PUPDR_PULLUP(GPIOE_PIN12) | PIN_PUPDR_FLOATING(GPIOE_PIN13) | PIN_PUPDR_FLOATING(GPIOE_PIN14) | PIN_PUPDR_FLOATING(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_LOW(GPIOE_PIN8) | PIN_ODR_LOW(GPIOE_PIN9) | PIN_ODR_LOW(GPIOE_PIN10) | PIN_ODR_LOW(GPIOE_PIN11) | PIN_ODR_LOW(GPIOE_PIN12) | PIN_ODR_LOW(GPIOE_PIN13) | PIN_ODR_LOW(GPIOE_PIN14) | PIN_ODR_LOW(GPIOE_PIN15)) -#define VAL_GPIOE_AFRL (PIN_AFIO_AF(GPIOE_PIN0, 0) | PIN_AFIO_AF(GPIOE_PIN1, 0) | PIN_AFIO_AF(GPIOE_PIN2, 0) | PIN_AFIO_AF(GPIOE_PIN3, 0) | PIN_AFIO_AF(GPIOE_PIN4, 0) | PIN_AFIO_AF(GPIOE_PIN5, 0) | PIN_AFIO_AF(GPIOE_PIN6, 0) | PIN_AFIO_AF(GPIOE_PIN7, 0)) -#define VAL_GPIOE_AFRH (PIN_AFIO_AF(GPIOE_PIN8, 0) | PIN_AFIO_AF(GPIOE_PIN9, 0) | PIN_AFIO_AF(GPIOE_PIN10, 0) | PIN_AFIO_AF(GPIOE_PIN11, 0) | PIN_AFIO_AF(GPIOE_PIN12, 0) | PIN_AFIO_AF(GPIOE_PIN13, 0) | PIN_AFIO_AF(GPIOE_PIN14, 0) | PIN_AFIO_AF(GPIOE_PIN15, 0)) - -/* - * GPIOF setup: - * - * PF0 - I2C2_SDA (input floating). - * PF1 - I2C2_SCL (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_I2C2_SDA) | PIN_MODE_INPUT(GPIOF_I2C2_SCL) | 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_I2C2_SDA) | PIN_OTYPE_PUSHPULL(GPIOF_I2C2_SCL) | 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_HIGH(GPIOF_I2C2_SDA) | PIN_OSPEED_HIGH(GPIOF_I2C2_SCL) | 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_I2C2_SDA) | PIN_PUPDR_FLOATING(GPIOF_I2C2_SCL) | 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_I2C2_SDA) | PIN_ODR_HIGH(GPIOF_I2C2_SCL) | 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_I2C2_SDA, 0) | PIN_AFIO_AF(GPIOF_I2C2_SCL, 0) | PIN_AFIO_AF(GPIOF_PIN2, 0) | PIN_AFIO_AF(GPIOF_PIN3, 0) | PIN_AFIO_AF(GPIOF_PIN4, 0) | PIN_AFIO_AF(GPIOF_PIN5, 0) | PIN_AFIO_AF(GPIOF_PIN6, 0) | PIN_AFIO_AF(GPIOF_PIN7, 0)) -#define VAL_GPIOF_AFRH (PIN_AFIO_AF(GPIOF_PIN8, 0) | PIN_AFIO_AF(GPIOF_PIN9, 0) | PIN_AFIO_AF(GPIOF_PIN10, 0) | PIN_AFIO_AF(GPIOF_PIN11, 0) | PIN_AFIO_AF(GPIOF_PIN12, 0) | PIN_AFIO_AF(GPIOF_PIN13, 0) | PIN_AFIO_AF(GPIOF_PIN14, 0) | PIN_AFIO_AF(GPIOF_PIN15, 0)) - -/* - * GPIOG setup: - * - * PG0 - PIN0 (input pullup). - * PG1 - PIN1 (input pullup). - * PG2 - PIN2 (input pullup). - * PG3 - PIN3 (input pullup). - * PG4 - PIN4 (input pullup). - * PG5 - PIN5 (input pullup). - * PG6 - PIN6 (input pullup). - * PG7 - PIN7 (input pullup). - * PG8 - PIN8 (input pullup). - * PG9 - PIN9 (input pullup). - * PG10 - PIN10 (input pullup). - * PG11 - PIN11 (input pullup). - * PG12 - PIN12 (input pullup). - * PG13 - PIN13 (input pullup). - * PG14 - PIN14 (input pullup). - * PG15 - PIN15 (input pullup). - */ -#define VAL_GPIOG_MODER (PIN_MODE_INPUT(GPIOG_PIN0) | PIN_MODE_INPUT(GPIOG_PIN1) | PIN_MODE_INPUT(GPIOG_PIN2) | PIN_MODE_INPUT(GPIOG_PIN3) | PIN_MODE_INPUT(GPIOG_PIN4) | PIN_MODE_INPUT(GPIOG_PIN5) | PIN_MODE_INPUT(GPIOG_PIN6) | PIN_MODE_INPUT(GPIOG_PIN7) | PIN_MODE_INPUT(GPIOG_PIN8) | PIN_MODE_INPUT(GPIOG_PIN9) | PIN_MODE_INPUT(GPIOG_PIN10) | PIN_MODE_INPUT(GPIOG_PIN11) | PIN_MODE_INPUT(GPIOG_PIN12) | PIN_MODE_INPUT(GPIOG_PIN13) | PIN_MODE_INPUT(GPIOG_PIN14) | PIN_MODE_INPUT(GPIOG_PIN15)) -#define VAL_GPIOG_OTYPER (PIN_OTYPE_PUSHPULL(GPIOG_PIN0) | PIN_OTYPE_PUSHPULL(GPIOG_PIN1) | PIN_OTYPE_PUSHPULL(GPIOG_PIN2) | PIN_OTYPE_PUSHPULL(GPIOG_PIN3) | PIN_OTYPE_PUSHPULL(GPIOG_PIN4) | PIN_OTYPE_PUSHPULL(GPIOG_PIN5) | PIN_OTYPE_PUSHPULL(GPIOG_PIN6) | PIN_OTYPE_PUSHPULL(GPIOG_PIN7) | PIN_OTYPE_PUSHPULL(GPIOG_PIN8) | PIN_OTYPE_PUSHPULL(GPIOG_PIN9) | PIN_OTYPE_PUSHPULL(GPIOG_PIN10) | PIN_OTYPE_PUSHPULL(GPIOG_PIN11) | PIN_OTYPE_PUSHPULL(GPIOG_PIN12) | PIN_OTYPE_PUSHPULL(GPIOG_PIN13) | PIN_OTYPE_PUSHPULL(GPIOG_PIN14) | PIN_OTYPE_PUSHPULL(GPIOG_PIN15)) -#define VAL_GPIOG_OSPEEDR (PIN_OSPEED_VERYLOW(GPIOG_PIN0) | PIN_OSPEED_VERYLOW(GPIOG_PIN1) | PIN_OSPEED_VERYLOW(GPIOG_PIN2) | PIN_OSPEED_VERYLOW(GPIOG_PIN3) | PIN_OSPEED_VERYLOW(GPIOG_PIN4) | PIN_OSPEED_VERYLOW(GPIOG_PIN5) | PIN_OSPEED_VERYLOW(GPIOG_PIN6) | PIN_OSPEED_VERYLOW(GPIOG_PIN7) | PIN_OSPEED_VERYLOW(GPIOG_PIN8) | PIN_OSPEED_VERYLOW(GPIOG_PIN9) | PIN_OSPEED_VERYLOW(GPIOG_PIN10) | PIN_OSPEED_VERYLOW(GPIOG_PIN11) | PIN_OSPEED_VERYLOW(GPIOG_PIN12) | PIN_OSPEED_VERYLOW(GPIOG_PIN13) | PIN_OSPEED_VERYLOW(GPIOG_PIN14) | PIN_OSPEED_VERYLOW(GPIOG_PIN15)) -#define VAL_GPIOG_PUPDR (PIN_PUPDR_PULLUP(GPIOG_PIN0) | PIN_PUPDR_PULLUP(GPIOG_PIN1) | PIN_PUPDR_PULLUP(GPIOG_PIN2) | PIN_PUPDR_PULLUP(GPIOG_PIN3) | PIN_PUPDR_PULLUP(GPIOG_PIN4) | PIN_PUPDR_PULLUP(GPIOG_PIN5) | PIN_PUPDR_PULLUP(GPIOG_PIN6) | PIN_PUPDR_PULLUP(GPIOG_PIN7) | PIN_PUPDR_PULLUP(GPIOG_PIN8) | PIN_PUPDR_PULLUP(GPIOG_PIN9) | PIN_PUPDR_PULLUP(GPIOG_PIN10) | PIN_PUPDR_PULLUP(GPIOG_PIN11) | PIN_PUPDR_PULLUP(GPIOG_PIN12) | PIN_PUPDR_PULLUP(GPIOG_PIN13) | PIN_PUPDR_PULLUP(GPIOG_PIN14) | PIN_PUPDR_PULLUP(GPIOG_PIN15)) -#define VAL_GPIOG_ODR (PIN_ODR_HIGH(GPIOG_PIN0) | PIN_ODR_HIGH(GPIOG_PIN1) | PIN_ODR_HIGH(GPIOG_PIN2) | PIN_ODR_HIGH(GPIOG_PIN3) | PIN_ODR_HIGH(GPIOG_PIN4) | PIN_ODR_HIGH(GPIOG_PIN5) | PIN_ODR_HIGH(GPIOG_PIN6) | PIN_ODR_HIGH(GPIOG_PIN7) | PIN_ODR_HIGH(GPIOG_PIN8) | PIN_ODR_HIGH(GPIOG_PIN9) | PIN_ODR_HIGH(GPIOG_PIN10) | PIN_ODR_HIGH(GPIOG_PIN11) | PIN_ODR_HIGH(GPIOG_PIN12) | PIN_ODR_HIGH(GPIOG_PIN13) | PIN_ODR_HIGH(GPIOG_PIN14) | PIN_ODR_HIGH(GPIOG_PIN15)) -#define VAL_GPIOG_AFRL (PIN_AFIO_AF(GPIOG_PIN0, 0) | PIN_AFIO_AF(GPIOG_PIN1, 0) | PIN_AFIO_AF(GPIOG_PIN2, 0) | PIN_AFIO_AF(GPIOG_PIN3, 0) | PIN_AFIO_AF(GPIOG_PIN4, 0) | PIN_AFIO_AF(GPIOG_PIN5, 0) | PIN_AFIO_AF(GPIOG_PIN6, 0) | PIN_AFIO_AF(GPIOG_PIN7, 0)) -#define VAL_GPIOG_AFRH (PIN_AFIO_AF(GPIOG_PIN8, 0) | PIN_AFIO_AF(GPIOG_PIN9, 0) | PIN_AFIO_AF(GPIOG_PIN10, 0) | PIN_AFIO_AF(GPIOG_PIN11, 0) | PIN_AFIO_AF(GPIOG_PIN12, 0) | PIN_AFIO_AF(GPIOG_PIN13, 0) | PIN_AFIO_AF(GPIOG_PIN14, 0) | PIN_AFIO_AF(GPIOG_PIN15, 0)) - -/* - * GPIOH setup: - * - * PH0 - PIN0 (input pullup). - * PH1 - PIN1 (input pullup). - * PH2 - PIN2 (input pullup). - * PH3 - PIN3 (input pullup). - * PH4 - PIN4 (input pullup). - * PH5 - PIN5 (input pullup). - * PH6 - PIN6 (input pullup). - * PH7 - PIN7 (input pullup). - * PH8 - PIN8 (input pullup). - * PH9 - PIN9 (input pullup). - * PH10 - PIN10 (input pullup). - * PH11 - PIN11 (input pullup). - * PH12 - PIN12 (input pullup). - * PH13 - PIN13 (input pullup). - * PH14 - PIN14 (input pullup). - * PH15 - PIN15 (input pullup). - */ -#define VAL_GPIOH_MODER (PIN_MODE_INPUT(GPIOH_PIN0) | PIN_MODE_INPUT(GPIOH_PIN1) | PIN_MODE_INPUT(GPIOH_PIN2) | PIN_MODE_INPUT(GPIOH_PIN3) | PIN_MODE_INPUT(GPIOH_PIN4) | PIN_MODE_INPUT(GPIOH_PIN5) | PIN_MODE_INPUT(GPIOH_PIN6) | PIN_MODE_INPUT(GPIOH_PIN7) | PIN_MODE_INPUT(GPIOH_PIN8) | PIN_MODE_INPUT(GPIOH_PIN9) | PIN_MODE_INPUT(GPIOH_PIN10) | PIN_MODE_INPUT(GPIOH_PIN11) | PIN_MODE_INPUT(GPIOH_PIN12) | PIN_MODE_INPUT(GPIOH_PIN13) | PIN_MODE_INPUT(GPIOH_PIN14) | PIN_MODE_INPUT(GPIOH_PIN15)) -#define VAL_GPIOH_OTYPER (PIN_OTYPE_PUSHPULL(GPIOH_PIN0) | PIN_OTYPE_PUSHPULL(GPIOH_PIN1) | PIN_OTYPE_PUSHPULL(GPIOH_PIN2) | PIN_OTYPE_PUSHPULL(GPIOH_PIN3) | PIN_OTYPE_PUSHPULL(GPIOH_PIN4) | PIN_OTYPE_PUSHPULL(GPIOH_PIN5) | PIN_OTYPE_PUSHPULL(GPIOH_PIN6) | PIN_OTYPE_PUSHPULL(GPIOH_PIN7) | PIN_OTYPE_PUSHPULL(GPIOH_PIN8) | PIN_OTYPE_PUSHPULL(GPIOH_PIN9) | PIN_OTYPE_PUSHPULL(GPIOH_PIN10) | PIN_OTYPE_PUSHPULL(GPIOH_PIN11) | PIN_OTYPE_PUSHPULL(GPIOH_PIN12) | PIN_OTYPE_PUSHPULL(GPIOH_PIN13) | PIN_OTYPE_PUSHPULL(GPIOH_PIN14) | PIN_OTYPE_PUSHPULL(GPIOH_PIN15)) -#define VAL_GPIOH_OSPEEDR (PIN_OSPEED_VERYLOW(GPIOH_PIN0) | PIN_OSPEED_VERYLOW(GPIOH_PIN1) | PIN_OSPEED_VERYLOW(GPIOH_PIN2) | PIN_OSPEED_VERYLOW(GPIOH_PIN3) | PIN_OSPEED_VERYLOW(GPIOH_PIN4) | PIN_OSPEED_VERYLOW(GPIOH_PIN5) | PIN_OSPEED_VERYLOW(GPIOH_PIN6) | PIN_OSPEED_VERYLOW(GPIOH_PIN7) | PIN_OSPEED_VERYLOW(GPIOH_PIN8) | PIN_OSPEED_VERYLOW(GPIOH_PIN9) | PIN_OSPEED_VERYLOW(GPIOH_PIN10) | PIN_OSPEED_VERYLOW(GPIOH_PIN11) | PIN_OSPEED_VERYLOW(GPIOH_PIN12) | PIN_OSPEED_VERYLOW(GPIOH_PIN13) | PIN_OSPEED_VERYLOW(GPIOH_PIN14) | PIN_OSPEED_VERYLOW(GPIOH_PIN15)) -#define VAL_GPIOH_PUPDR (PIN_PUPDR_PULLUP(GPIOH_PIN0) | PIN_PUPDR_PULLUP(GPIOH_PIN1) | PIN_PUPDR_PULLUP(GPIOH_PIN2) | PIN_PUPDR_PULLUP(GPIOH_PIN3) | PIN_PUPDR_PULLUP(GPIOH_PIN4) | PIN_PUPDR_PULLUP(GPIOH_PIN5) | PIN_PUPDR_PULLUP(GPIOH_PIN6) | PIN_PUPDR_PULLUP(GPIOH_PIN7) | PIN_PUPDR_PULLUP(GPIOH_PIN8) | PIN_PUPDR_PULLUP(GPIOH_PIN9) | PIN_PUPDR_PULLUP(GPIOH_PIN10) | PIN_PUPDR_PULLUP(GPIOH_PIN11) | PIN_PUPDR_PULLUP(GPIOH_PIN12) | PIN_PUPDR_PULLUP(GPIOH_PIN13) | PIN_PUPDR_PULLUP(GPIOH_PIN14) | PIN_PUPDR_PULLUP(GPIOH_PIN15)) -#define VAL_GPIOH_ODR (PIN_ODR_HIGH(GPIOH_PIN0) | PIN_ODR_HIGH(GPIOH_PIN1) | PIN_ODR_HIGH(GPIOH_PIN2) | PIN_ODR_HIGH(GPIOH_PIN3) | PIN_ODR_HIGH(GPIOH_PIN4) | PIN_ODR_HIGH(GPIOH_PIN5) | PIN_ODR_HIGH(GPIOH_PIN6) | PIN_ODR_HIGH(GPIOH_PIN7) | PIN_ODR_HIGH(GPIOH_PIN8) | PIN_ODR_HIGH(GPIOH_PIN9) | PIN_ODR_HIGH(GPIOH_PIN10) | PIN_ODR_HIGH(GPIOH_PIN11) | PIN_ODR_HIGH(GPIOH_PIN12) | PIN_ODR_HIGH(GPIOH_PIN13) | PIN_ODR_HIGH(GPIOH_PIN14) | PIN_ODR_HIGH(GPIOH_PIN15)) -#define VAL_GPIOH_AFRL (PIN_AFIO_AF(GPIOH_PIN0, 0) | PIN_AFIO_AF(GPIOH_PIN1, 0) | PIN_AFIO_AF(GPIOH_PIN2, 0) | PIN_AFIO_AF(GPIOH_PIN3, 0) | PIN_AFIO_AF(GPIOH_PIN4, 0) | PIN_AFIO_AF(GPIOH_PIN5, 0) | PIN_AFIO_AF(GPIOH_PIN6, 0) | PIN_AFIO_AF(GPIOH_PIN7, 0)) -#define VAL_GPIOH_AFRH (PIN_AFIO_AF(GPIOH_PIN8, 0) | PIN_AFIO_AF(GPIOH_PIN9, 0) | PIN_AFIO_AF(GPIOH_PIN10, 0) | PIN_AFIO_AF(GPIOH_PIN11, 0) | PIN_AFIO_AF(GPIOH_PIN12, 0) | PIN_AFIO_AF(GPIOH_PIN13, 0) | PIN_AFIO_AF(GPIOH_PIN14, 0) | PIN_AFIO_AF(GPIOH_PIN15, 0)) - -/* - * USB bus activation macro, required by the USB driver. - */ -// #define usb_lld_connect_bus(usbp) -#define usb_lld_connect_bus(usbp) (palSetPadMode(GPIOA, GPIOA_USB_DP, PAL_MODE_ALTERNATE(14))) -// #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) -#define usb_lld_disconnect_bus(usbp) \ - (palSetPadMode(GPIOA, GPIOA_USB_DP, PAL_MODE_OUTPUT_PUSHPULL)); \ - palClearPad(GPIOA, GPIOA_USB_DP) -// #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/platforms/chibios/GENERIC_STM32_F303XC/board/board.mk b/platforms/chibios/GENERIC_STM32_F303XC/board/board.mk index 842e33590594..f891e6524763 100644 --- a/platforms/chibios/GENERIC_STM32_F303XC/board/board.mk +++ b/platforms/chibios/GENERIC_STM32_F303XC/board/board.mk @@ -1,8 +1,8 @@ # List of all the board related files. -BOARDSRC = $(BOARD_PATH)/board/board.c +BOARDSRC = $(CHIBIOS)/os/hal/boards/ST_STM32F3_DISCOVERY/board.c # Required include directories -BOARDINC = $(BOARD_PATH)/board +BOARDINC = $(CHIBIOS)/os/hal/boards/ST_STM32F3_DISCOVERY # Shared variables ALLCSRC += $(BOARDSRC) diff --git a/platforms/chibios/GENERIC_STM32_F303XC/configs/board.h b/platforms/chibios/GENERIC_STM32_F303XC/configs/board.h new file mode 100644 index 000000000000..97159964d054 --- /dev/null +++ b/platforms/chibios/GENERIC_STM32_F303XC/configs/board.h @@ -0,0 +1,37 @@ +/* Copyright 2020 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 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License 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_next "board.h" + +#undef STM32_HSE_BYPASS + +/* + * USB bus activation macro, required by the USB driver. + */ +#define usb_lld_connect_bus(usbp) \ + do { \ + palSetPadMode(GPIOA, GPIOA_USB_DP, PAL_MODE_ALTERNATE(14)); \ + } while (0) + +/* + * USB bus de-activation macro, required by the USB driver. + */ +#define usb_lld_disconnect_bus(usbp) \ + do { \ + palSetPadMode(GPIOA, GPIOA_USB_DP, PAL_MODE_OUTPUT_PUSHPULL); \ + palClearPad(GPIOA, GPIOA_USB_DP); \ + } while (0) diff --git a/platforms/chibios/GENERIC_STM32_F303XC/configs/config.h b/platforms/chibios/GENERIC_STM32_F303XC/configs/config.h new file mode 100644 index 000000000000..48a7a900930a --- /dev/null +++ b/platforms/chibios/GENERIC_STM32_F303XC/configs/config.h @@ -0,0 +1,18 @@ +/* Copyright 2020 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 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License 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 EARLY_INIT_PERFORM_BOOTLOADER_JUMP TRUE From d0abad27abd6d58f88985c1c28463ee51b7a116e Mon Sep 17 00:00:00 2001 From: dhong44 Date: Thu, 16 Jul 2020 02:47:43 -0400 Subject: [PATCH 665/930] Fix the mousekey scrolling (#9174) Mousekey scrolling should have a separate repeat variable to keep track of scrolling acceleration, instead of being tied to mouse movement scolling in mousekeys. The send function should record when the last movement was made since this is when movement is actually sent. Doing this fixes the bug where the initial press of a mousekey scroll button causes a double scroll. Signed-off-by: Daniel Hong --- tmk_core/common/mousekey.c | 82 ++++++++++++++++++++------------------ 1 file changed, 43 insertions(+), 39 deletions(-) diff --git a/tmk_core/common/mousekey.c b/tmk_core/common/mousekey.c index 42bf231f4c19..390c74e0f147 100644 --- a/tmk_core/common/mousekey.c +++ b/tmk_core/common/mousekey.c @@ -35,7 +35,7 @@ static report_mouse_t mouse_report = {0}; static void mousekey_debug(void); static uint8_t mousekey_accel = 0; static uint8_t mousekey_repeat = 0; -static uint16_t last_timer = 0; +static uint8_t mousekey_wheel_repeat = 0; #ifndef MK_3_SPEED @@ -94,12 +94,12 @@ static uint8_t wheel_unit(void) { unit = (MOUSEKEY_WHEEL_DELTA * mk_wheel_max_speed) / 2; } else if (mousekey_accel & (1 << 2)) { unit = (MOUSEKEY_WHEEL_DELTA * mk_wheel_max_speed); - } else if (mousekey_repeat == 0) { + } else if (mousekey_wheel_repeat == 0) { unit = MOUSEKEY_WHEEL_DELTA; - } else if (mousekey_repeat >= mk_wheel_time_to_max) { + } else if (mousekey_wheel_repeat >= mk_wheel_time_to_max) { unit = MOUSEKEY_WHEEL_DELTA * mk_wheel_max_speed; } else { - unit = (MOUSEKEY_WHEEL_DELTA * mk_wheel_max_speed * mousekey_repeat) / mk_wheel_time_to_max; + unit = (MOUSEKEY_WHEEL_DELTA * mk_wheel_max_speed * mousekey_wheel_repeat) / mk_wheel_time_to_max; } return (unit > MOUSEKEY_WHEEL_MAX ? MOUSEKEY_WHEEL_MAX : (unit == 0 ? 1 : unit)); } @@ -147,14 +147,17 @@ static uint8_t wheel_unit(void) { void mousekey_task(void) { // report cursor and scroll movement independently report_mouse_t const tmpmr = mouse_report; - if ((mouse_report.x || mouse_report.y) && timer_elapsed(last_timer_c) > (mousekey_repeat ? mk_interval : mk_delay * 10)) { + + mouse_report.x = 0; + mouse_report.y = 0; + mouse_report.v = 0; + mouse_report.h = 0; + + if ((tmpmr.x || tmpmr.y) && timer_elapsed(last_timer_c) > (mousekey_repeat ? mk_interval : mk_delay * 10)) { if (mousekey_repeat != UINT8_MAX) mousekey_repeat++; - mouse_report.v = 0; - mouse_report.h = 0; - if (mouse_report.x > 0) mouse_report.x = move_unit(); - if (mouse_report.x < 0) mouse_report.x = move_unit() * -1; - if (mouse_report.y > 0) mouse_report.y = move_unit(); - if (mouse_report.y < 0) mouse_report.y = move_unit() * -1; + if (tmpmr.x != 0) mouse_report.x = move_unit() * ((tmpmr.x > 0) ? 1 : -1); + if (tmpmr.y != 0) mouse_report.y = move_unit() * ((tmpmr.y > 0) ? 1 : -1); + /* diagonal move [1/sqrt(2)] */ if (mouse_report.x && mouse_report.y) { mouse_report.x = times_inv_sqrt2(mouse_report.x); @@ -166,18 +169,12 @@ void mousekey_task(void) { mouse_report.y = 1; } } - mousekey_send(); - last_timer_c = last_timer; - mouse_report = tmpmr; } - if ((mouse_report.v || mouse_report.h) && timer_elapsed(last_timer_w) > (mousekey_repeat ? mk_wheel_interval : mk_wheel_delay * 10)) { - if (mousekey_repeat != UINT8_MAX) mousekey_repeat++; - mouse_report.x = 0; - mouse_report.y = 0; - if (mouse_report.v > 0) mouse_report.v = wheel_unit(); - if (mouse_report.v < 0) mouse_report.v = wheel_unit() * -1; - if (mouse_report.h > 0) mouse_report.h = wheel_unit(); - if (mouse_report.h < 0) mouse_report.h = wheel_unit() * -1; + if ((tmpmr.v || tmpmr.h) && timer_elapsed(last_timer_w) > (mousekey_wheel_repeat ? mk_wheel_interval : mk_wheel_delay * 10)) { + if (mousekey_wheel_repeat != UINT8_MAX) mousekey_wheel_repeat++; + if (tmpmr.v != 0) mouse_report.v = wheel_unit() * ((tmpmr.v > 0) ? 1 : -1); + if (tmpmr.h != 0) mouse_report.h = wheel_unit() * ((tmpmr.h > 0) ? 1 : -1); + /* diagonal move [1/sqrt(2)] */ if (mouse_report.v && mouse_report.h) { mouse_report.v = times_inv_sqrt2(mouse_report.v); @@ -189,10 +186,10 @@ void mousekey_task(void) { mouse_report.h = 1; } } - mousekey_send(); - last_timer_w = last_timer; - mouse_report = tmpmr; } + + if (mouse_report.x || mouse_report.y || mouse_report.v || mouse_report.h) mousekey_send(); + mouse_report = tmpmr; } void mousekey_on(uint8_t code) { @@ -228,6 +225,7 @@ void mousekey_on(uint8_t code) { mousekey_accel |= (1 << 1); else if (code == KC_MS_ACCEL2) mousekey_accel |= (1 << 2); + } void mousekey_off(uint8_t code) { @@ -263,7 +261,8 @@ void mousekey_off(uint8_t code) { mousekey_accel &= ~(1 << 1); else if (code == KC_MS_ACCEL2) mousekey_accel &= ~(1 << 2); - if (mouse_report.x == 0 && mouse_report.y == 0 && mouse_report.v == 0 && mouse_report.h == 0) mousekey_repeat = 0; + if (mouse_report.x == 0 && mouse_report.y == 0) mousekey_repeat = 0; + if (mouse_report.v == 0 && mouse_report.h == 0) mousekey_wheel_repeat = 0; } #else /* #ifndef MK_3_SPEED */ @@ -285,20 +284,22 @@ uint16_t w_intervals[mkspd_COUNT] = {MK_W_INTERVAL_UNMOD, MK_W_INTERVAL_0 void mousekey_task(void) { // report cursor and scroll movement independently report_mouse_t const tmpmr = mouse_report; - if ((mouse_report.x || mouse_report.y) && timer_elapsed(last_timer_c) > c_intervals[mk_speed]) { - mouse_report.h = 0; - mouse_report.v = 0; - mousekey_send(); - last_timer_c = last_timer; - mouse_report = tmpmr; + mouse_report.x = 0; + mouse_report.y = 0; + mouse_report.v = 0; + mouse_report.h = 0; + + if ((tmpmr.x || tmpmr.y) && timer_elapsed(last_timer_c) > c_intervals[mk_speed]) { + mouse_report.x = tmpmr.x; + mouse_report.y = tmpmr.y; } - if ((mouse_report.h || mouse_report.v) && timer_elapsed(last_timer_w) > w_intervals[mk_speed]) { - mouse_report.x = 0; - mouse_report.y = 0; - mousekey_send(); - last_timer_w = last_timer; - mouse_report = tmpmr; + if ((tmpmr.h || tmpmr.v) && timer_elapsed(last_timer_w) > w_intervals[mk_speed]) { + mouse_report.v = tmpmr.v; + mouse_report.h = tmpmr.h; } + + if (mouse_report.x || mouse_report.y || mouse_report.v || mouse_report.h) mousekey_send(); + mouse_report = tmpmr; } void adjust_speed(void) { @@ -413,13 +414,16 @@ void mousekey_off(uint8_t code) { void mousekey_send(void) { mousekey_debug(); + uint16_t time = timer_read(); + if (mouse_report.x || mouse_report.y) last_timer_c = time; + if (mouse_report.v || mouse_report.h) last_timer_w = time; host_mouse_send(&mouse_report); - last_timer = timer_read(); } void mousekey_clear(void) { mouse_report = (report_mouse_t){}; mousekey_repeat = 0; + mousekey_wheel_repeat = 0; mousekey_accel = 0; } From 93e7a8f74cc2c9c7bc50b413654642a0347a55d2 Mon Sep 17 00:00:00 2001 From: Nick Brassel Date: Thu, 16 Jul 2020 16:58:14 +1000 Subject: [PATCH 666/930] Add dual-bank STM32 bootloader support, given GPIO toggle on BOOT0 to charge RC circuit. (#8778) --- docs/platformdev_chibios_earlyinit.md | 19 ++++-- tmk_core/common/chibios/bootloader.c | 84 ++++++++++++++++++++++----- tmk_core/protocol/chibios/main.c | 1 + 3 files changed, 85 insertions(+), 19 deletions(-) diff --git a/docs/platformdev_chibios_earlyinit.md b/docs/platformdev_chibios_earlyinit.md index 699c223771bd..5fd78bb33648 100644 --- a/docs/platformdev_chibios_earlyinit.md +++ b/docs/platformdev_chibios_earlyinit.md @@ -4,17 +4,28 @@ This page describes a part of QMK that is a somewhat advanced concept, and is on QMK uses ChibiOS as the underlying layer to support a multitude of Arm-based devices. Each ChibiOS-supported keyboard has a low-level board definition which is responsible for initializing hardware peripherals such as the clocks, and GPIOs. -Older QMK revisions required duplication of these board definitions inside your keyboard's directory in order to override such early initialization points; this is now abstracted into the following APIs, and allows usage of the board definitions supplied with ChibiOS itself. Check `/lib/chibios/os/hal/boards` for the list of official definitions. If your keyboard needs extra initialization at a very early stage, consider providing keyboard-level overrides of the following APIs: +Older QMK revisions required duplication of these board definitions inside your keyboard's directory in order to override such early initialization points; this is now abstracted into the following APIs, and allows usage of the board definitions supplied with ChibiOS itself. Check `/lib/chibios/os/hal/boards` for the list of official definitions. If your keyboard needs extra initialization at a very early stage, consider providing keyboard-level overrides of the following APIs instead of duplicating the board definitions: ## `early_hardware_init_pre()` :id=early-hardware-init-pre The function `early_hardware_init_pre` is the earliest possible code that can be executed by a keyboard firmware. This is intended as a replacement for the ChibiOS board definition's `__early_init` function, and is the equivalent of executing at the start of the function. -This is executed before RAM gets cleared, and before clocks or GPIOs are configured; any delays or preparation using GPIOs is not likely to work at this point. After executing this function, RAM on the MCU may be zero'ed. Assigning values to variables during execution of this function may be overwritten. +This is executed before RAM gets cleared, and before clocks or GPIOs are configured; for example, ChibiOS delays are not likely to work at this point. After executing this function, RAM on the MCU may be zero'ed. Assigning values to variables during execution of this function may be overwritten. -As such, if you wish to override this API consider limiting use to writing to low-level registers. The default implementation of this function can be configured to jump to bootloader if a `RESET` key was pressed, by ensuring `#define EARLY_INIT_PERFORM_BOOTLOADER_JUMP TRUE` is in the keyboard's `config.h` file. +As such, if you wish to override this API consider limiting use to writing to low-level registers. The default implementation of this function can be configured to jump to bootloader if a `RESET` key was pressed: -To implement your own version of this function, in your keyboard's source files: +| `config.h` override | Description | Default | +|-----------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|----------| +| `#define EARLY_INIT_PERFORM_BOOTLOADER_JUMP` | Whether or not bootloader is to be executed during the early initialisation code of QMK. | `FALSE` | +| `#define STM32_BOOTLOADER_ADDRESS` | Relevant for single-bank STM32 MCUs, signifies the memory address to jump to bootloader. Consult [AN2606](https://www.st.com/content/st_com/en/search.html#q=an2606-t=resources-page=1) for the _System Memory_ address for your MCU. This value should be of the format `0x11111111`. | `` | +| `#define STM32_BOOTLOADER_DUAL_BANK` | Relevant for dual-bank STM32 MCUs, signifies that a GPIO is to be toggled in order to enter bootloader mode. | `FALSE` | +| `#define STM32_BOOTLOADER_DUAL_BANK_GPIO` | Relevant for dual-bank STM32 MCUs, the pin to toggle when attempting to enter bootloader mode, e.g. `B8` | `` | +| `#define STM32_BOOTLOADER_DUAL_BANK_POLARITY` | Relevant for dual-bank STM32 MCUs, the value to set the pin to in order to trigger charging of the RC circuit. e.g. `0` or `1`. | `0` | +| `#define STM32_BOOTLOADER_DUAL_BANK_DELAY` | Relevant for dual-bank STM32 MCUs, an arbitrary measurement of time to delay before resetting the MCU. Increasing number increases the delay. | `100000` | + +Kinetis MCUs have no configurable options. + +Alternatively, to implement your own version of this function, in your keyboard's source files: ```c void early_hardware_init_pre(void) { diff --git a/tmk_core/common/chibios/bootloader.c b/tmk_core/common/chibios/bootloader.c index 4cf5dae7e645..dceeaa6b19c8 100644 --- a/tmk_core/common/chibios/bootloader.c +++ b/tmk_core/common/chibios/bootloader.c @@ -3,28 +3,82 @@ #include "ch.h" #include "hal.h" -#ifdef STM32_BOOTLOADER_ADDRESS -/* STM32 */ - /* This code should be checked whether it runs correctly on platforms */ -# define SYMVAL(sym) (uint32_t)(((uint8_t *)&(sym)) - ((uint8_t *)0)) +#define SYMVAL(sym) (uint32_t)(((uint8_t *)&(sym)) - ((uint8_t *)0)) +#define BOOTLOADER_MAGIC 0xDEADBEEF +#define MAGIC_ADDR (unsigned long *)(SYMVAL(__ram0_end__) - 4) + +#ifndef STM32_BOOTLOADER_DUAL_BANK +# define STM32_BOOTLOADER_DUAL_BANK FALSE +#endif + +#if STM32_BOOTLOADER_DUAL_BANK + +// Need pin definitions +# include "config_common.h" + +# ifndef STM32_BOOTLOADER_DUAL_BANK_GPIO +# error "No STM32_BOOTLOADER_DUAL_BANK_GPIO defined, don't know which pin to toggle" +# endif + +# ifndef STM32_BOOTLOADER_DUAL_BANK_POLARITY +# define STM32_BOOTLOADER_DUAL_BANK_POLARITY 0 +# endif + +# ifndef STM32_BOOTLOADER_DUAL_BANK_DELAY +# define STM32_BOOTLOADER_DUAL_BANK_DELAY 100000 +# endif + +extern uint32_t __ram0_end__; + +# define bootdelay(loopcount) \ + do { \ + for (int i = 0; i < loopcount; ++i) { \ + __asm__ volatile("nop\n\t" \ + "nop\n\t" \ + "nop\n\t"); \ + } \ + } while (0) + +void bootloader_jump(void) { + *MAGIC_ADDR = BOOTLOADER_MAGIC; // set magic flag => reset handler will jump into boot loader + NVIC_SystemReset(); +} + +void enter_bootloader_mode_if_requested(void) { + unsigned long *check = MAGIC_ADDR; + if (*check == BOOTLOADER_MAGIC) { + *check = 0; + + // For STM32 MCUs with dual-bank flash, and we're incapable of jumping to the bootloader. The first valid flash + // bank is executed unconditionally after a reset, so it doesn't enter DFU unless BOOT0 is high. Instead, we do + // it with hardware...in this case, we pull a GPIO high/low depending on the configuration, connects 3.3V to + // BOOT0's RC charging circuit, lets it charge the capacitor, and issue a system reset. See the QMK discord + // #hardware channel pins for an example circuit. + palSetPadMode(PAL_PORT(STM32_BOOTLOADER_DUAL_BANK_GPIO), PAL_PAD(STM32_BOOTLOADER_DUAL_BANK_GPIO), PAL_MODE_OUTPUT_PUSHPULL); +# if STM32_BOOTLOADER_DUAL_BANK_POLARITY + palSetPad(PAL_PORT(STM32_BOOTLOADER_DUAL_BANK_GPIO), PAL_PAD(STM32_BOOTLOADER_DUAL_BANK_GPIO)); +# else + palClearPad(PAL_PORT(STM32_BOOTLOADER_DUAL_BANK_GPIO), PAL_PAD(STM32_BOOTLOADER_DUAL_BANK_GPIO)); +# endif + + // Wait for a while for the capacitor to charge + bootdelay(STM32_BOOTLOADER_DUAL_BANK_DELAY); + + // Issue a system reset to get the ROM bootloader to execute, with BOOT0 high + NVIC_SystemReset(); + } +} + +#elif defined(STM32_BOOTLOADER_ADDRESS) // STM32_BOOTLOADER_DUAL_BANK + extern uint32_t __ram0_end__; -# define BOOTLOADER_MAGIC 0xDEADBEEF -# define MAGIC_ADDR (unsigned long *)(SYMVAL(__ram0_end__) - 4) -/** \brief Jump to the bootloader - * - * FIXME: needs doc - */ void bootloader_jump(void) { *MAGIC_ADDR = BOOTLOADER_MAGIC; // set magic flag => reset handler will jump into boot loader NVIC_SystemReset(); } -/** \brief Enter bootloader mode if requested - * - * FIXME: needs doc - */ void enter_bootloader_mode_if_requested(void) { unsigned long *check = MAGIC_ADDR; if (*check == BOOTLOADER_MAGIC) { @@ -41,7 +95,7 @@ void enter_bootloader_mode_if_requested(void) { } } -#elif defined(KL2x) || defined(K20x) /* STM32_BOOTLOADER_ADDRESS */ +#elif defined(KL2x) || defined(K20x) // STM32_BOOTLOADER_DUAL_BANK // STM32_BOOTLOADER_ADDRESS /* Kinetis */ # if defined(KIIBOHD_BOOTLOADER) diff --git a/tmk_core/protocol/chibios/main.c b/tmk_core/protocol/chibios/main.c index 7d32c16ed8c5..a0d28f9afc08 100644 --- a/tmk_core/protocol/chibios/main.c +++ b/tmk_core/protocol/chibios/main.c @@ -35,6 +35,7 @@ #ifndef EARLY_INIT_PERFORM_BOOTLOADER_JUMP // Change this to be TRUE once we've migrated keyboards to the new init system +// Remember to change docs/platformdev_chibios_earlyinit.md as well. # define EARLY_INIT_PERFORM_BOOTLOADER_JUMP FALSE #endif From b0335b273142ead24cb4177893fafdf2fda88810 Mon Sep 17 00:00:00 2001 From: Pete Sevander Date: Thu, 16 Jul 2020 15:39:01 +0300 Subject: [PATCH 667/930] Bigger combo index (#9318) * Add change log * Change combo index from uint8_t to uint16_t --- docs/ChangeLog/20200829/PR9318.md | 11 +++++++++++ keyboards/ashpil/modelm_usbc/keymaps/ashpil/keymap.c | 2 +- .../converter/usb_usb/keymaps/chriskopher/combo.c | 2 +- keyboards/converter/usb_usb/keymaps/narze/keymap.c | 2 +- keyboards/ergodox_infinity/keymaps/narze/keymap.c | 2 +- keyboards/gboards/g/keymap_combo.h | 2 +- keyboards/maxr1998/pulse4k/pulse4k.c | 2 +- keyboards/minidox/keymaps/rsthd_combos/keymap.c | 2 +- keyboards/planck/keymaps/narze/keymap.c | 2 +- keyboards/xd75/keymaps/4sstylz/keymap.c | 2 +- quantum/process_keycode/process_combo.c | 6 +++--- quantum/process_keycode/process_combo.h | 2 +- users/issmirnov/issmirnov.c | 2 +- users/kuchosauronad0/combo.c | 2 +- users/ninjonas/combos.c | 2 +- users/yet-another-developer/combo.c | 2 +- 16 files changed, 28 insertions(+), 17 deletions(-) create mode 100644 docs/ChangeLog/20200829/PR9318.md diff --git a/docs/ChangeLog/20200829/PR9318.md b/docs/ChangeLog/20200829/PR9318.md new file mode 100644 index 000000000000..c238f6e4491e --- /dev/null +++ b/docs/ChangeLog/20200829/PR9318.md @@ -0,0 +1,11 @@ +### Bigger integer type when looping over combos. + +[#9318](https://github.com/qmk/qmk_firmware/pull/9318) + +Changes `uint8_t` to `uint16_t` so it is possible have more than 256 combos. + +Any fork that uses `process_combo_event` needs to update the function's first argument to `uint16_t`. + +| Old function | New Function | +|---------------------------------------------------------------|----------------------------------------------------------------| +| `void process_combo_event(uint8_t combo_index, bool pressed)` | `void process_combo_event(uint16_t combo_index, bool pressed)` | diff --git a/keyboards/ashpil/modelm_usbc/keymaps/ashpil/keymap.c b/keyboards/ashpil/modelm_usbc/keymaps/ashpil/keymap.c index 35b45e9ccf8c..30e6af7f6e6a 100644 --- a/keyboards/ashpil/modelm_usbc/keymaps/ashpil/keymap.c +++ b/keyboards/ashpil/modelm_usbc/keymaps/ashpil/keymap.c @@ -36,7 +36,7 @@ combo_t key_combos[COMBO_COUNT] = { [CTRL_PAUS_RESET] = COMBO_ACTION(reset_combo), }; -void process_combo_event(uint8_t combo_index, bool pressed) { +void process_combo_event(uint16_t combo_index, bool pressed) { switch(combo_index) { case CTRL_PAUS_RESET: if (pressed) { diff --git a/keyboards/converter/usb_usb/keymaps/chriskopher/combo.c b/keyboards/converter/usb_usb/keymaps/chriskopher/combo.c index c0a354eb55b3..68a3eda04c4a 100644 --- a/keyboards/converter/usb_usb/keymaps/chriskopher/combo.c +++ b/keyboards/converter/usb_usb/keymaps/chriskopher/combo.c @@ -33,7 +33,7 @@ combo_t key_combos[COMBO_COUNT] = { }; // Called after a combo event is triggered -void process_combo_event(uint8_t combo_index, bool pressed) { +void process_combo_event(uint16_t combo_index, bool pressed) { switch (combo_index) { case SD_LAYER_COMBO: if (pressed) { diff --git a/keyboards/converter/usb_usb/keymaps/narze/keymap.c b/keyboards/converter/usb_usb/keymaps/narze/keymap.c index b5938fa359f4..510b93b7ad84 100644 --- a/keyboards/converter/usb_usb/keymaps/narze/keymap.c +++ b/keyboards/converter/usb_usb/keymaps/narze/keymap.c @@ -153,7 +153,7 @@ void matrix_setup(void) { set_superduper_key_combos(); } -void process_combo_event(uint8_t combo_index, bool pressed) { +void process_combo_event(uint16_t combo_index, bool pressed) { if (pressed) { switch(combo_index) { case CB_SUPERDUPER: diff --git a/keyboards/ergodox_infinity/keymaps/narze/keymap.c b/keyboards/ergodox_infinity/keymaps/narze/keymap.c index 4a4e8ab9411c..dcabd657b03c 100644 --- a/keyboards/ergodox_infinity/keymaps/narze/keymap.c +++ b/keyboards/ergodox_infinity/keymaps/narze/keymap.c @@ -683,7 +683,7 @@ void matrix_scan_user(void) { // Combos -void process_combo_event(uint8_t combo_index, bool pressed) { +void process_combo_event(uint16_t combo_index, bool pressed) { if (pressed) { switch(combo_index) { case CB_SUPERDUPER: diff --git a/keyboards/gboards/g/keymap_combo.h b/keyboards/gboards/g/keymap_combo.h index 1302c460352c..58e99863eaeb 100644 --- a/keyboards/gboards/g/keymap_combo.h +++ b/keyboards/gboards/g/keymap_combo.h @@ -60,7 +60,7 @@ int COMBO_LEN = sizeof(key_combos) / sizeof(key_combos[0]); #define COMB BLANK #define SUBS A_ACTI #define TOGG A_TOGG -void process_combo_event(uint8_t combo_index, bool pressed) { +void process_combo_event(uint16_t combo_index, bool pressed) { switch (combo_index) { #include "combos.def" } diff --git a/keyboards/maxr1998/pulse4k/pulse4k.c b/keyboards/maxr1998/pulse4k/pulse4k.c index 61a18af7438e..37c558db727d 100644 --- a/keyboards/maxr1998/pulse4k/pulse4k.c +++ b/keyboards/maxr1998/pulse4k/pulse4k.c @@ -30,7 +30,7 @@ combo_t key_combos[COMBO_COUNT] = { bool led_adjust_active = false; -void process_combo_event(uint8_t combo_index, bool pressed) { +void process_combo_event(uint16_t combo_index, bool pressed) { if (combo_index == LED_ADJUST) { led_adjust_active = pressed; } diff --git a/keyboards/minidox/keymaps/rsthd_combos/keymap.c b/keyboards/minidox/keymaps/rsthd_combos/keymap.c index a3ba423c699e..d80febecafd5 100644 --- a/keyboards/minidox/keymaps/rsthd_combos/keymap.c +++ b/keyboards/minidox/keymaps/rsthd_combos/keymap.c @@ -45,7 +45,7 @@ combo_t key_combos[COMBO_COUNT] = { [BOT_CTR] = COMBO_ACTION(bx_combo), }; - void process_combo_event(uint8_t combo_index, bool pressed) { + void process_combo_event(uint16_t combo_index, bool pressed) { switch(combo_index) { case MID_R: if (pressed) { diff --git a/keyboards/planck/keymaps/narze/keymap.c b/keyboards/planck/keymaps/narze/keymap.c index c878cf9e4421..7fead3205889 100644 --- a/keyboards/planck/keymaps/narze/keymap.c +++ b/keyboards/planck/keymaps/narze/keymap.c @@ -357,7 +357,7 @@ void matrix_setup(void) { void matrix_scan_user(void) { } -void process_combo_event(uint8_t combo_index, bool pressed) { +void process_combo_event(uint16_t combo_index, bool pressed) { if (pressed) { switch(combo_index) { case CB_SUPERDUPER: diff --git a/keyboards/xd75/keymaps/4sstylz/keymap.c b/keyboards/xd75/keymaps/4sstylz/keymap.c index d722da9c588f..497ca40a9863 100644 --- a/keyboards/xd75/keymaps/4sstylz/keymap.c +++ b/keyboards/xd75/keymaps/4sstylz/keymap.c @@ -129,7 +129,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { return true; } -void process_combo_event(uint8_t combo_index, bool pressed) { +void process_combo_event(uint16_t combo_index, bool pressed) { switch(combo_index) { case SCR_LCK: if (pressed) { diff --git a/quantum/process_keycode/process_combo.c b/quantum/process_keycode/process_combo.c index c4e299958af2..1f715f43b94d 100644 --- a/quantum/process_keycode/process_combo.c +++ b/quantum/process_keycode/process_combo.c @@ -24,10 +24,10 @@ extern combo_t key_combos[]; extern int COMBO_LEN; #endif -__attribute__((weak)) void process_combo_event(uint8_t combo_index, bool pressed) {} +__attribute__((weak)) void process_combo_event(uint16_t combo_index, bool pressed) {} static uint16_t timer = 0; -static uint8_t current_combo_index = 0; +static uint16_t current_combo_index = 0; static bool drop_buffer = false; static bool is_active = false; static bool b_combo_enable = true; // defaults to enabled @@ -83,7 +83,7 @@ static inline void dump_key_buffer(bool emit) { static bool process_single_combo(combo_t *combo, uint16_t keycode, keyrecord_t *record) { uint8_t count = 0; - uint8_t index = -1; + uint16_t index = -1; /* Find index of keycode and number of combo keys */ for (const uint16_t *keys = combo->keys;; ++count) { uint16_t key = pgm_read_word(&keys[count]); diff --git a/quantum/process_keycode/process_combo.h b/quantum/process_keycode/process_combo.h index e21ee19609f6..0f01aae93edd 100644 --- a/quantum/process_keycode/process_combo.h +++ b/quantum/process_keycode/process_combo.h @@ -56,7 +56,7 @@ typedef struct { bool process_combo(uint16_t keycode, keyrecord_t *record); void matrix_scan_combo(void); -void process_combo_event(uint8_t combo_index, bool pressed); +void process_combo_event(uint16_t combo_index, bool pressed); void combo_enable(void); void combo_disable(void); diff --git a/users/issmirnov/issmirnov.c b/users/issmirnov/issmirnov.c index 665afbcfd7da..45ef7b19a7b9 100644 --- a/users/issmirnov/issmirnov.c +++ b/users/issmirnov/issmirnov.c @@ -26,7 +26,7 @@ combo_t key_combos[COMBO_COUNT] = { }; -void process_combo_event(uint8_t combo_index, bool pressed) { +void process_combo_event(uint16_t combo_index, bool pressed) { switch(combo_index) { case XC_COPY: if (pressed) { diff --git a/users/kuchosauronad0/combo.c b/users/kuchosauronad0/combo.c index b4e8e84ae51a..0a58e0277005 100644 --- a/users/kuchosauronad0/combo.c +++ b/users/kuchosauronad0/combo.c @@ -1,6 +1,6 @@ #include "combo.h" -void process_combo_event(uint8_t combo_index, bool pressed){ +void process_combo_event(uint16_t combo_index, bool pressed){ switch(combo_index) { case ZV_COPY: if (pressed) { diff --git a/users/ninjonas/combos.c b/users/ninjonas/combos.c index 9453ba84dc2b..8d1cd6510f0e 100644 --- a/users/ninjonas/combos.c +++ b/users/ninjonas/combos.c @@ -23,7 +23,7 @@ combo_t key_combos[COMBO_COUNT] = { [XV_PASTE] = COMBO_ACTION(paste_combo), }; -void process_combo_event(uint8_t combo_index, bool pressed) { +void process_combo_event(uint16_t combo_index, bool pressed) { switch(combo_index) { case EQ_QUIT: if (pressed) { diff --git a/users/yet-another-developer/combo.c b/users/yet-another-developer/combo.c index b4e8e84ae51a..0a58e0277005 100644 --- a/users/yet-another-developer/combo.c +++ b/users/yet-another-developer/combo.c @@ -1,6 +1,6 @@ #include "combo.h" -void process_combo_event(uint8_t combo_index, bool pressed){ +void process_combo_event(uint16_t combo_index, bool pressed){ switch(combo_index) { case ZV_COPY: if (pressed) { From 686a9d35ffe1cf834673be2991d7bf1025423ae6 Mon Sep 17 00:00:00 2001 From: Nick Brassel Date: Fri, 17 Jul 2020 06:19:18 +1000 Subject: [PATCH 668/930] Re-fix the STM32 dual-bank bootloader stuff. (#9738) * Re-fix the dual-bank bootloader stuff. * Use wait_ms() instead of using nop's for a delay, as ChibiOS is actually running at the time of bootloader jump. --- tmk_core/common/chibios/bootloader.c | 46 +++++++++------------------- 1 file changed, 15 insertions(+), 31 deletions(-) diff --git a/tmk_core/common/chibios/bootloader.c b/tmk_core/common/chibios/bootloader.c index dceeaa6b19c8..743448ee18f0 100644 --- a/tmk_core/common/chibios/bootloader.c +++ b/tmk_core/common/chibios/bootloader.c @@ -2,6 +2,7 @@ #include "ch.h" #include "hal.h" +#include "wait.h" /* This code should be checked whether it runs correctly on platforms */ #define SYMVAL(sym) (uint32_t)(((uint8_t *)&(sym)) - ((uint8_t *)0)) @@ -31,45 +32,28 @@ extern uint32_t __ram0_end__; -# define bootdelay(loopcount) \ - do { \ - for (int i = 0; i < loopcount; ++i) { \ - __asm__ volatile("nop\n\t" \ - "nop\n\t" \ - "nop\n\t"); \ - } \ - } while (0) - void bootloader_jump(void) { - *MAGIC_ADDR = BOOTLOADER_MAGIC; // set magic flag => reset handler will jump into boot loader - NVIC_SystemReset(); -} - -void enter_bootloader_mode_if_requested(void) { - unsigned long *check = MAGIC_ADDR; - if (*check == BOOTLOADER_MAGIC) { - *check = 0; - - // For STM32 MCUs with dual-bank flash, and we're incapable of jumping to the bootloader. The first valid flash - // bank is executed unconditionally after a reset, so it doesn't enter DFU unless BOOT0 is high. Instead, we do - // it with hardware...in this case, we pull a GPIO high/low depending on the configuration, connects 3.3V to - // BOOT0's RC charging circuit, lets it charge the capacitor, and issue a system reset. See the QMK discord - // #hardware channel pins for an example circuit. - palSetPadMode(PAL_PORT(STM32_BOOTLOADER_DUAL_BANK_GPIO), PAL_PAD(STM32_BOOTLOADER_DUAL_BANK_GPIO), PAL_MODE_OUTPUT_PUSHPULL); + // For STM32 MCUs with dual-bank flash, and we're incapable of jumping to the bootloader. The first valid flash + // bank is executed unconditionally after a reset, so it doesn't enter DFU unless BOOT0 is high. Instead, we do + // it with hardware...in this case, we pull a GPIO high/low depending on the configuration, connects 3.3V to + // BOOT0's RC charging circuit, lets it charge the capacitor, and issue a system reset. See the QMK discord + // #hardware channel pins for an example circuit. + palSetPadMode(PAL_PORT(STM32_BOOTLOADER_DUAL_BANK_GPIO), PAL_PAD(STM32_BOOTLOADER_DUAL_BANK_GPIO), PAL_MODE_OUTPUT_PUSHPULL); # if STM32_BOOTLOADER_DUAL_BANK_POLARITY - palSetPad(PAL_PORT(STM32_BOOTLOADER_DUAL_BANK_GPIO), PAL_PAD(STM32_BOOTLOADER_DUAL_BANK_GPIO)); + palSetPad(PAL_PORT(STM32_BOOTLOADER_DUAL_BANK_GPIO), PAL_PAD(STM32_BOOTLOADER_DUAL_BANK_GPIO)); # else - palClearPad(PAL_PORT(STM32_BOOTLOADER_DUAL_BANK_GPIO), PAL_PAD(STM32_BOOTLOADER_DUAL_BANK_GPIO)); + palClearPad(PAL_PORT(STM32_BOOTLOADER_DUAL_BANK_GPIO), PAL_PAD(STM32_BOOTLOADER_DUAL_BANK_GPIO)); # endif - // Wait for a while for the capacitor to charge - bootdelay(STM32_BOOTLOADER_DUAL_BANK_DELAY); + // Wait for a while for the capacitor to charge + wait_ms(100); - // Issue a system reset to get the ROM bootloader to execute, with BOOT0 high - NVIC_SystemReset(); - } + // Issue a system reset to get the ROM bootloader to execute, with BOOT0 high + NVIC_SystemReset(); } +void enter_bootloader_mode_if_requested(void) {} // not needed at all, but if anybody attempts to invoke it.... + #elif defined(STM32_BOOTLOADER_ADDRESS) // STM32_BOOTLOADER_DUAL_BANK extern uint32_t __ram0_end__; From 3c74edbc691502228b2d2c4d42d5888311f0ca4c Mon Sep 17 00:00:00 2001 From: Drashna Jaelre Date: Wed, 22 Jul 2020 13:57:47 -0700 Subject: [PATCH 669/930] Disable NKRO on V-USB controllers (#9054) * Disable NKRO on V-USB controllers * not _currently_ supported text Co-authored-by: Ryan Co-authored-by: Ryan --- tmk_core/common.mk | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/tmk_core/common.mk b/tmk_core/common.mk index b7fe45afd6d8..56ed4a85779d 100644 --- a/tmk_core/common.mk +++ b/tmk_core/common.mk @@ -99,8 +99,12 @@ ifeq ($(strip $(COMMAND_ENABLE)), yes) endif ifeq ($(strip $(NKRO_ENABLE)), yes) - TMK_COMMON_DEFS += -DNKRO_ENABLE - SHARED_EP_ENABLE = yes + ifneq ($(PROTOCOL),VUSB) + TMK_COMMON_DEFS += -DNKRO_ENABLE + SHARED_EP_ENABLE = yes + else + $(info NKRO is not currently supported on V-USB, and has been disabled.) + endif endif ifeq ($(strip $(USB_6KRO_ENABLE)), yes) From 9d3b26a47543d9898a2af2cee5f6ef53b4995e9f Mon Sep 17 00:00:00 2001 From: Drashna Jaelre Date: Fri, 24 Jul 2020 20:05:27 -0700 Subject: [PATCH 670/930] Update features to use Custom Tapping Term when appropriate (#6259) * Update Space Cadet to use Custom Tapping Term functionality * Detect correct keycode for space cadet tapping term * Update tap dancing to use global custom tapping term * Update documentation for Tap Dances * formatting pass * Apply suggestions from code review Co-Authored-By: fauxpark * Update docs/feature_tap_dance.md Co-authored-by: James Young <18669334+noroadsleft@users.noreply.github.com> * Update for future * Update user keymaps for space cadet * Fix typos * Clean up tapping term stuff * Fix compiler issue if NO_ACTION_TAPPING is enabled Co-authored-by: fauxpark Co-authored-by: James Young <18669334+noroadsleft@users.noreply.github.com> --- docs/feature_tap_dance.md | 4 +++- .../converter/usb_usb/keymaps/narze/keymap.c | 6 ++--- .../ergodox_infinity/keymaps/narze/keymap.c | 6 ++--- keyboards/planck/keymaps/narze/keymap.c | 4 ++-- quantum/process_keycode/process_space_cadet.c | 23 ++++++++++--------- quantum/process_keycode/process_space_cadet.h | 5 +++- quantum/process_keycode/process_tap_dance.c | 6 +---- 7 files changed, 28 insertions(+), 26 deletions(-) diff --git a/docs/feature_tap_dance.md b/docs/feature_tap_dance.md index 877c37336ec3..d2da39ad2b77 100644 --- a/docs/feature_tap_dance.md +++ b/docs/feature_tap_dance.md @@ -28,7 +28,9 @@ After this, you'll want to use the `tap_dance_actions` array to specify what act * `ACTION_TAP_DANCE_LAYER_TOGGLE(kc, layer)`: Sends the `kc` keycode when tapped once, or toggles the state of `layer`. (this functions like the `TG` layer keycode). * `ACTION_TAP_DANCE_FN(fn)`: Calls the specified function - defined in the user keymap - with the final tap count of the tap dance action. * `ACTION_TAP_DANCE_FN_ADVANCED(on_each_tap_fn, on_dance_finished_fn, on_dance_reset_fn)`: Calls the first specified function - defined in the user keymap - on every tap, the second function when the dance action finishes (like the previous option), and the last function when the tap dance action resets. -* `ACTION_TAP_DANCE_FN_ADVANCED_TIME(on_each_tap_fn, on_dance_finished_fn, on_dance_reset_fn, tap_specific_tapping_term)`: This functions identically to the `ACTION_TAP_DANCE_FN_ADVANCED` function, but uses a custom tapping term for it, instead of the predefined `TAPPING_TERM`. +* ~~`ACTION_TAP_DANCE_FN_ADVANCED_TIME(on_each_tap_fn, on_dance_finished_fn, on_dance_reset_fn, tap_specific_tapping_term)`~~: This functions identically to the `ACTION_TAP_DANCE_FN_ADVANCED` function, but uses a custom tapping term for it, instead of the predefined `TAPPING_TERM`. + * This is deprecated in favor of the Per Key Tapping Term functionality, as outlined [here](custom_quantum_functions.md#Custom_Tapping_Term). You'd want to check for the specific `TD()` macro that you want to use (such as `TD(TD_ESC_CAPS)`) instead of using this specific Tap Dance function. + The first option is enough for a lot of cases, that just want dual roles. For example, `ACTION_TAP_DANCE_DOUBLE(KC_SPC, KC_ENT)` will result in `Space` being sent on single-tap, `Enter` otherwise. diff --git a/keyboards/converter/usb_usb/keymaps/narze/keymap.c b/keyboards/converter/usb_usb/keymaps/narze/keymap.c index 510b93b7ad84..a84d613a2d36 100644 --- a/keyboards/converter/usb_usb/keymaps/narze/keymap.c +++ b/keyboards/converter/usb_usb/keymaps/narze/keymap.c @@ -130,17 +130,17 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { // 1. Hold for LGUI, tap for Underscore case GUI_UNDS: - perform_space_cadet(record, KC_LGUI, KC_LSFT, KC_MINS); + perform_space_cadet(record, keycode, KC_LGUI, KC_LSFT, KC_MINS); return false; // 2. Hold for LSHIFT, tap for Parens open case LSFT_LPRN: - perform_space_cadet(record, KC_LSFT, KC_LSFT, KC_9); + perform_space_cadet(record, keycode, KC_LSFT, KC_LSFT, KC_9); return false; // 3. Hold for RSHIFT, tap for Parens close case RSFT_RPRN: - perform_space_cadet(record, KC_RSFT, KC_RSFT, KC_0); + perform_space_cadet(record, keycode, KC_RSFT, KC_RSFT, KC_0); return false; default: diff --git a/keyboards/ergodox_infinity/keymaps/narze/keymap.c b/keyboards/ergodox_infinity/keymaps/narze/keymap.c index dcabd657b03c..d9499f00376c 100644 --- a/keyboards/ergodox_infinity/keymaps/narze/keymap.c +++ b/keyboards/ergodox_infinity/keymaps/narze/keymap.c @@ -635,17 +635,17 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { // 1. Hold for LGUI, tap for Underscore case GUI_UNDS: - perform_space_cadet(record, KC_LGUI, KC_LSFT, KC_MINS); + perform_space_cadet(record, keycode, KC_LGUI, KC_LSFT, KC_MINS); return false; // 2. Hold for LSHIFT, tap for Parens open case LSFT_LPRN: - perform_space_cadet(record, KC_LSFT, KC_LSFT, KC_9); + perform_space_cadet(record, keycode, KC_LSFT, KC_LSFT, KC_9); return false; // 3. Hold for RSHIFT, tap for Parens close case RSFT_RPRN: - perform_space_cadet(record, KC_RSFT, KC_RSFT, KC_0); + perform_space_cadet(record, keycode, KC_RSFT, KC_RSFT, KC_0); return false; } diff --git a/keyboards/planck/keymaps/narze/keymap.c b/keyboards/planck/keymaps/narze/keymap.c index 7fead3205889..81cb68ecc910 100644 --- a/keyboards/planck/keymaps/narze/keymap.c +++ b/keyboards/planck/keymaps/narze/keymap.c @@ -330,12 +330,12 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { // 1. Hold for LGUI, tap for Underscore case GUI_UNDS: - perform_space_cadet(record, KC_LGUI, KC_LSFT, KC_MINS); + perform_space_cadet(record, keycode, KC_LGUI, KC_LSFT, KC_MINS); return false; // 2. Hold for LSHIFT, tap for Parens open case LSFT_LPRN: - perform_space_cadet(record, KC_LSFT, KC_LSFT, KC_9); + perform_space_cadet(record, keycode, KC_LSFT, KC_LSFT, KC_9); return false; default: diff --git a/quantum/process_keycode/process_space_cadet.c b/quantum/process_keycode/process_space_cadet.c index 6833fdb9fb38..bcaf62a964ec 100644 --- a/quantum/process_keycode/process_space_cadet.c +++ b/quantum/process_keycode/process_space_cadet.c @@ -14,9 +14,10 @@ * along with this program. If not, see . */ #include "process_space_cadet.h" +#include "action_tapping.h" -#ifndef TAPPING_TERM -# define TAPPING_TERM 200 +#ifdef NO_ACTION_TAPPING +__attribute__((weak)) uint16_t get_tapping_term(uint16_t keycode, keyrecord_t *record) { return TAPPING_TERM; }; #endif // ********** OBSOLETE DEFINES, STOP USING! (pls?) ********** @@ -85,7 +86,7 @@ static uint16_t sc_timer = 0; static uint8_t sc_mods = 0; #endif -void perform_space_cadet(keyrecord_t *record, uint8_t holdMod, uint8_t tapMod, uint8_t keycode) { +void perform_space_cadet(keyrecord_t *record, uint16_t sc_keycode, uint8_t holdMod, uint8_t tapMod, uint8_t keycode) { if (record->event.pressed) { sc_last = holdMod; sc_timer = timer_read(); @@ -96,7 +97,7 @@ void perform_space_cadet(keyrecord_t *record, uint8_t holdMod, uint8_t tapMod, u register_mods(MOD_BIT(holdMod)); } } else { - if (sc_last == holdMod && timer_elapsed(sc_timer) < TAPPING_TERM) { + if (sc_last == holdMod && timer_elapsed(sc_timer) < get_tapping_term(sc_keycode, record)) { if (holdMod != tapMod) { if (IS_MOD(holdMod)) { unregister_mods(MOD_BIT(holdMod)); @@ -126,31 +127,31 @@ void perform_space_cadet(keyrecord_t *record, uint8_t holdMod, uint8_t tapMod, u bool process_space_cadet(uint16_t keycode, keyrecord_t *record) { switch (keycode) { case KC_LSPO: { - perform_space_cadet(record, LSPO_KEYS); + perform_space_cadet(record, keycode, LSPO_KEYS); return false; } case KC_RSPC: { - perform_space_cadet(record, RSPC_KEYS); + perform_space_cadet(record, keycode, RSPC_KEYS); return false; } case KC_LCPO: { - perform_space_cadet(record, LCPO_KEYS); + perform_space_cadet(record, keycode, LCPO_KEYS); return false; } case KC_RCPC: { - perform_space_cadet(record, RCPC_KEYS); + perform_space_cadet(record, keycode, RCPC_KEYS); return false; } case KC_LAPO: { - perform_space_cadet(record, LAPO_KEYS); + perform_space_cadet(record, keycode, LAPO_KEYS); return false; } case KC_RAPC: { - perform_space_cadet(record, RAPC_KEYS); + perform_space_cadet(record, keycode, RAPC_KEYS); return false; } case KC_SFTENT: { - perform_space_cadet(record, SFTENT_KEYS); + perform_space_cadet(record, keycode, SFTENT_KEYS); return false; } default: { diff --git a/quantum/process_keycode/process_space_cadet.h b/quantum/process_keycode/process_space_cadet.h index c8231435046a..3ace073997af 100644 --- a/quantum/process_keycode/process_space_cadet.h +++ b/quantum/process_keycode/process_space_cadet.h @@ -17,5 +17,8 @@ #include "quantum.h" -void perform_space_cadet(keyrecord_t *record, uint8_t holdMod, uint8_t tapMod, uint8_t keycode); +void perform_space_cadet(keyrecord_t *record, uint16_t sc_keycode, uint8_t holdMod, uint8_t tapMod, uint8_t keycode); bool process_space_cadet(uint16_t keycode, keyrecord_t *record); +#ifdef NO_ACTION_TAPPING +uint16_t get_tapping_term(uint16_t keycode, keyrecord_t *record); +#endif diff --git a/quantum/process_keycode/process_tap_dance.c b/quantum/process_keycode/process_tap_dance.c index 16756e59c204..0c7b6353eb51 100644 --- a/quantum/process_keycode/process_tap_dance.c +++ b/quantum/process_keycode/process_tap_dance.c @@ -16,10 +16,6 @@ #include "quantum.h" #include "action_tapping.h" -#ifndef TAPPING_TERM -# define TAPPING_TERM 200 -#endif - #ifndef NO_ACTION_ONESHOT uint8_t get_oneshot_mods(void); #endif @@ -171,7 +167,7 @@ void matrix_scan_tap_dance() { if (action->custom_tapping_term > 0) { tap_user_defined = action->custom_tapping_term; } else { - tap_user_defined = TAPPING_TERM; + tap_user_defined = get_tapping_term(action->state.keycode, NULL); } if (action->state.count && timer_elapsed(action->state.timer) > tap_user_defined) { process_tap_dance_action_on_dance_finished(action); From d4be07dad368c57669c88ead6c093c9e23086855 Mon Sep 17 00:00:00 2001 From: a-chol Date: Sat, 25 Jul 2020 14:01:15 +0200 Subject: [PATCH 671/930] Hid joystick interface (#4226) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * add support for hid gamepad interface add documentation for HID joystick Add joystick_task to read analog axes values even when no key is pressed or release. update doc Update docs/feature_joystick.md Manage pin setup and read to maintain matrix scan after analog read * Incorporates patches and changes to HID reporting There are some patches provided by @a-chol incorporated on this commit, and also some changes I made to the HID Report structure. The most interesting is the one dealing with number of buttons: Linux doesn't seem to care, but Windows requires the HID structure to be byte aligned (that's in the spec). So if one declares 8/16/32... buttons they should not have any issues, but this is what happens when you have 9 buttons: ``` bits |0|1|2|3|4|5|6|7| |*|*|*|*|*|*|*|*| axis 0 (report size 8) |*|*|*|*|*|*|*|*| ... |*|*|*|*|*|*|*|*| |*|*|*|*|*|*|*|*| |*|*|*|*|*|*|*|*| |*|*|*|*|*|*|*|*| |*|*|*|*|*|*|*|*| axis 6 |*|*|*|*|*|*|*|*| first 8 buttons (report size 1) |*| | | | | | | | last of 9 buttons, not aligned ``` So for that I added a conditonal that will add a number of reports with size 1 to make sure it aligns to the next multiple of 8. Those reports send dummy inputs that don't do anything aside from aligning the data. Tested on Linux, Windows 10 and Street Fighter (where the joystick is recognized as direct-input) * Add save and restore of each pin used in reading joystick (AVR). Allow output pin to be JS_VIRTUAL_AXIS if the axis is connected to Vcc instead of an output pin from the MCU. Fix joystick report id Fix broken v-usb hid joystick interface. Make it more resilient to unusual settings (none multiple of eight button count, 0 buttons or 0 axes) Correct adc reading for multiple axes. Piecewise range conversion for uncentered raw value range. Input, output and ground pin configuration per axis. Documentation fixes * Fix port addressing for joystick analog read * The other required set of changes As per the PR, the changes still holding it up. Add onekey for testing. Fix ARM builds. Fix device descriptor when either axes or buttons is zero. Add compile-time check for at least one axis or button. Move definition to try to fix conflict. PR review comments. qmk cformat * avoid float functions to compute range mapping for axis adc reading * Remove V-USB support for now. Updated docs accordingly. * Update tmk_core/protocol/lufa/lufa.c Co-Authored-By: Ryan * Update tmk_core/protocol/usb_descriptor.c Co-Authored-By: Ryan * Update tmk_core/protocol/usb_descriptor.c Co-Authored-By: Ryan * Update tmk_core/protocol/usb_descriptor.c Co-Authored-By: Ryan * Add support for joystick adc reading for stm32 MCUs. Fix joystick hid report sending for chibios * Fix HID joystick report sending for ChibiOS. Add one analog axis to the onekey:joystick keymap. Fix pin state save and restore during joystick analog read for STM32 MCUs. * Update tmk_core/protocol/chibios/usb_main.c Co-Authored-By: Ryan * Update tmk_core/protocol/lufa/lufa.c Co-Authored-By: Ryan * Add missing mcuconf.h and halconf.h to onekey:joystick keymap. Add suggested fixes from PR. * Switch saveState and restoreState signature to use pin_t type. onekey:joystick : add a second axis, virtual and programmatically animated. * Update docs/feature_joystick.md Co-Authored-By: Ryan * Update docs/feature_joystick.md Co-Authored-By: Ryan * Add PR corrections * Remove halconf.h and mcuconf.h from onekey keymaps * Change ADC_PIN to A0 Co-authored-by: achol Co-authored-by: José Júnior Co-authored-by: a-chol Co-authored-by: Nick Brassel Co-authored-by: Ryan --- common_features.mk | 7 + docs/_summary.md | 1 + docs/feature_joystick.md | 145 +++++++++++++++ drivers/avr/analog.c | 10 +- .../onekey/keymaps/joystick/config.h | 3 + .../onekey/keymaps/joystick/keymap.c | 25 +++ .../onekey/keymaps/joystick/rules.mk | 1 + quantum/joystick.c | 13 ++ quantum/joystick.h | 54 ++++++ quantum/process_keycode/process_joystick.c | 168 ++++++++++++++++++ quantum/process_keycode/process_joystick.h | 11 ++ quantum/quantum.c | 3 + quantum/quantum.h | 4 + quantum/quantum_keycodes.h | 35 ++++ tmk_core/common/keyboard.c | 7 + tmk_core/common/report.h | 13 +- tmk_core/protocol/chibios/usb_main.c | 69 +++++++ tmk_core/protocol/lufa/lufa.c | 67 +++++++ tmk_core/protocol/usb_descriptor.c | 111 +++++++++++- tmk_core/protocol/usb_descriptor.h | 15 ++ 20 files changed, 758 insertions(+), 4 deletions(-) create mode 100644 docs/feature_joystick.md create mode 100644 keyboards/handwired/onekey/keymaps/joystick/config.h create mode 100644 keyboards/handwired/onekey/keymaps/joystick/keymap.c create mode 100644 keyboards/handwired/onekey/keymaps/joystick/rules.mk create mode 100644 quantum/joystick.c create mode 100644 quantum/joystick.h create mode 100644 quantum/process_keycode/process_joystick.c create mode 100644 quantum/process_keycode/process_joystick.h diff --git a/common_features.mk b/common_features.mk index 8443a759b3a7..f9fca4669ceb 100644 --- a/common_features.mk +++ b/common_features.mk @@ -529,3 +529,10 @@ ifeq ($(strip $(AUTO_SHIFT_ENABLE)), yes) OPT_DEFS += -DAUTO_SHIFT_MODIFIERS endif endif + +ifeq ($(strip $(JOYSTICK_ENABLE)), yes) + OPT_DEFS += -DJOYSTICK_ENABLE + SRC += $(QUANTUM_DIR)/process_keycode/process_joystick.c + SRC += $(QUANTUM_DIR)/joystick.c + SRC += analog.c +endif diff --git a/docs/_summary.md b/docs/_summary.md index 9ed55a3d062f..0c43712159fa 100644 --- a/docs/_summary.md +++ b/docs/_summary.md @@ -103,6 +103,7 @@ * [DIP Switch](feature_dip_switch.md) * [Encoders](feature_encoders.md) * [Haptic Feedback](feature_haptic_feedback.md) + * [Joystick](feature_joystick.md) * [Proton C Conversion](proton_c_conversion.md) * [PS/2 Mouse](feature_ps2_mouse.md) * [Split Keyboard](feature_split_keyboard.md) diff --git a/docs/feature_joystick.md b/docs/feature_joystick.md new file mode 100644 index 000000000000..58dfc7b8df55 --- /dev/null +++ b/docs/feature_joystick.md @@ -0,0 +1,145 @@ +## Joystick + +The keyboard can be made to be recognized as a joystick HID device by the operating system. + +This is enabled by adding the following to `rules.mk`: + +```makefile +JOYSTICK_ENABLE = yes +``` + +!> Joystick support is not currently available on V-USB devices. + +The joystick feature provides two services: + * reading analog input devices (eg. potentiometers) + * sending gamepad HID reports + +Both services can be used without the other, depending on whether you just want to read a device but not send gamepad reports (for volume control for instance) +or send gamepad reports based on values computed by the keyboard. + +### Analog Input + +An analog device such as a potentiometer found on a gamepad's analog axes is based on a [voltage divider](https://en.wikipedia.org/wiki/Voltage_divider). +It is composed of three connectors linked to the ground, the power input and power output (usually the middle one). The power output holds the voltage that varies based on the position of the cursor, +which value will be read using your MCU's [ADC](https://en.wikipedia.org/wiki/Analog-to-digital_converter). +Depending on which pins are already used by your keyboard's matrix, the rest of the circuit can get a little bit more complicated, +feeding the power input and ground connection through pins and using diodes to avoid bad interactions with the matrix scanning procedures. + +### Configuring the Joystick + +By default, two axes and eight buttons are defined. This can be changed in your `config.h`: + +```c +// Max 32 +#define JOYSTICK_BUTTON_COUNT 16 +// Max 6: X, Y, Z, Rx, Ry, Rz +#define JOYSTICK_AXES_COUNT 3 +``` + +When defining axes for your joystick, you have to provide a definition array. You can do this from your keymap.c file. +A joystick will either be read from an input pin that allows the use of the ADC, or can be virtual, so that its value is provided by your code. +You have to define an array of type ''joystick_config_t'' and of proper size. + +There are three ways for your circuit to work with the ADC, that relies on the use of 1, 2 or 3 pins of the MCU: + * 1 pin: your analog device is directly connected to your device GND and VCC. The only pin used is the ADC pin of your choice. + * 2 pins: your analog device is powered through a pin that allows toggling it on or off. The other pin is used to read the input value through the ADC. + * 3 pins: both the power input and ground are connected to pins that must be set to a proper state before reading and restored afterwards. + +The configuration of each axis is performed using one of four macros: + * `JOYSTICK_AXIS_VIRTUAL`: no ADC reading must be performed, that value will be provided by keyboard/keymap-level code + * `JOYSTICK_AXIS_IN(INPUT_PIN, LOW, REST, HIGH)`: a voltage will be read on the provided pin, which must be an ADC-capable pin. + * `JOYSTICK_AXIS_IN_OUT(INPUT_PIN, OUTPUT_PIN, LOW, REST, HIGH)`: the provided `OUTPUT_PIN` will be set high before `INPUT_PIN` is read. + * `JOYSTICK_AXIS_IN_OUT_GROUND(INPUT_PIN, OUTPUT_PIN, GROUND_PIN, LOW, REST, HIGH)`: the `OUTPUT_PIN` will be set high and `GROUND_PIN` will be set low before reading from `INPUT_PIN`. + +In any case where an ADC reading takes place (when `INPUT_PIN` is provided), additional `LOW`, `REST` and `HIGH` parameters are used. +These implement the calibration of the analog device by defining the range of read values that will be mapped to the lowest, resting position and highest possible value for the axis (-127 to 127). +In practice, you have to provide the lowest/highest raw ADC reading, and the raw reading at resting position, when no deflection is applied. You can provide inverted `LOW` and `HIGH` to invert the axis. + +For instance, an axes configuration can be defined in the following way: + +```c +//joystick config +joystick_config_t joystick_axes[JOYSTICK_AXES_COUNT] = { + [0] = JOYSTICK_AXIS_IN_OUT_GROUND(A4, B0, A7, 900, 575, 285), + [1] = JOYSTICK_AXIS_VIRTUAL +}; +``` + +When the ADC reads 900 or higher, the returned axis value will be -127, whereas it will be 127 when the ADC reads 285 or lower. Zero is returned when 575 is read. + +In this example, the first axis will be read from the `A4` pin while `B0` is set high and `A7` is set low, using `analogReadPin()`, whereas the second axis will not be read. + +In order to give a value to the second axis, you can do so in any customizable entry point: as an action, in `process_record_user()` or in `matrix_scan_user()`, or even in `joystick_task()` which is called even when no key has been pressed. +You assign a value by writing to `joystick_status.axes[axis_index]` a signed 8-bit value (ranging from -127 to 127). Then it is necessary to assign the flag `JS_UPDATED` to `joystick_status.status` in order for an updated HID report to be sent. + +The following example writes two axes based on keypad presses, with `KC_P5` as a precision modifier: + +```c +#ifdef JOYSTICK_ENABLE +static uint8_t precision_val = 70; +static uint8_t axesFlags = 0; +enum axes { + Precision = 1, + Axis1High = 2, + Axis1Low = 4, + Axis2High = 8, + Axis2Low = 16 +}; +#endif + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch(keycode) { +#ifdef JOYSTICK_ENABLE + // virtual joystick +# if JOYSTICK_AXES_COUNT > 1 + case KC_P8: + if (record->event.pressed) { + axesFlags |= Axis2Low; + } else { + axesFlags &= ~Axis2Low; + } + joystick_status.status |= JS_UPDATED; + break; + case KC_P2: + if (record->event.pressed) { + axesFlags |= Axis2High; + } else { + axesFlags &= ~Axis2High; + } + joystick_status.status |= JS_UPDATED; + break; +# endif + case KC_P4: + if (record->event.pressed) { + axesFlags |= Axis1Low; + } else { + axesFlags &= ~Axis1Low; + } + joystick_status.status |= JS_UPDATED; + break; + case KC_P6: + if (record->event.pressed) { + axesFlags |= Axis1High; + } else { + axesFlags &= ~Axis1High; + } + joystick_status.status |= JS_UPDATED; + break; + case KC_P5: + if (record->event.pressed) { + axesFlags |= Precision; + } else { + axesFlags &= ~Precision; + } + joystick_status.status |= JS_UPDATED; + break; +#endif + } + return true; +} +``` + +### Triggering Joystick Buttons + +Joystick buttons are normal Quantum keycodes, defined as `JS_BUTTON0` to `JS_BUTTON31`, depending on the number of buttons you have configured. +To trigger a joystick button, just add the corresponding keycode to your keymap. diff --git a/drivers/avr/analog.c b/drivers/avr/analog.c index 9b8397b933f3..8d299ffdb923 100644 --- a/drivers/avr/analog.c +++ b/drivers/avr/analog.c @@ -97,10 +97,11 @@ uint8_t pinToMux(pin_t pin) { #endif // clang-format on } + return 0; } int16_t adc_read(uint8_t mux) { - uint8_t low; + uint16_t low; // Enable ADC and configure prescaler ADCSRA = _BV(ADEN) | ADC_PRESCALER; @@ -128,5 +129,10 @@ int16_t adc_read(uint8_t mux) { // Must read LSB first low = ADCL; // Must read MSB only once! - return (ADCH << 8) | low; + low |= (ADCH << 8); + + // turn off the ADC + ADCSRA &= ~(1 << ADEN); + + return low; } diff --git a/keyboards/handwired/onekey/keymaps/joystick/config.h b/keyboards/handwired/onekey/keymaps/joystick/config.h new file mode 100644 index 000000000000..5701d80c84c0 --- /dev/null +++ b/keyboards/handwired/onekey/keymaps/joystick/config.h @@ -0,0 +1,3 @@ +#pragma once +#define JOYSTICK_AXES_COUNT 2 +#define JOYSTICK_BUTTON_COUNT 1 diff --git a/keyboards/handwired/onekey/keymaps/joystick/keymap.c b/keyboards/handwired/onekey/keymaps/joystick/keymap.c new file mode 100644 index 000000000000..60802f464a90 --- /dev/null +++ b/keyboards/handwired/onekey/keymaps/joystick/keymap.c @@ -0,0 +1,25 @@ +#include QMK_KEYBOARD_H + +#include "joystick.h" + +#ifndef ADC_PIN +# define ADC_PIN F6 +#endif + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + LAYOUT( JS_BUTTON0 ) +}; + +void matrix_scan_user() { + int16_t val = (((uint32_t)timer_read()%5000 - 2500) * 255) / 5000; + if (val != joystick_status.axes[1]) { + joystick_status.axes[1] = val; + joystick_status.status |= JS_UPDATED; + } +} + +//joystick config +joystick_config_t joystick_axes[JOYSTICK_AXES_COUNT] = { + [0] = JOYSTICK_AXIS_IN(ADC_PIN, 0, 512, 1023) + , [1] = JOYSTICK_AXIS_VIRTUAL +}; \ No newline at end of file diff --git a/keyboards/handwired/onekey/keymaps/joystick/rules.mk b/keyboards/handwired/onekey/keymaps/joystick/rules.mk new file mode 100644 index 000000000000..fbddbc6de118 --- /dev/null +++ b/keyboards/handwired/onekey/keymaps/joystick/rules.mk @@ -0,0 +1 @@ +JOYSTICK_ENABLE = yes diff --git a/quantum/joystick.c b/quantum/joystick.c new file mode 100644 index 000000000000..7b87201aef98 --- /dev/null +++ b/quantum/joystick.c @@ -0,0 +1,13 @@ +#include "joystick.h" + +joystick_t joystick_status = {.buttons = {0}, + .axes = + { +#if JOYSTICK_AXES_COUNT > 0 + 0 +#endif + }, + .status = 0}; + +// array defining the reading of analog values for each axis +__attribute__((weak)) joystick_config_t joystick_axes[JOYSTICK_AXES_COUNT] = {}; diff --git a/quantum/joystick.h b/quantum/joystick.h new file mode 100644 index 000000000000..a95472b9fd44 --- /dev/null +++ b/quantum/joystick.h @@ -0,0 +1,54 @@ +#pragma once + +#ifndef JOYSTICK_BUTTON_COUNT +# define JOYSTICK_BUTTON_COUNT 8 +#endif + +#ifndef JOYSTICK_AXES_COUNT +# define JOYSTICK_AXES_COUNT 4 +#endif + +#include "quantum.h" + +#include + +// configure on input_pin of the joystick_axes array entry to JS_VIRTUAL_AXIS +// to prevent it from being read from the ADC. This allows outputing forged axis value. +// +#define JS_VIRTUAL_AXIS 0xFF + +#define JOYSTICK_AXIS_VIRTUAL \ + { JS_VIRTUAL_AXIS, JS_VIRTUAL_AXIS, JS_VIRTUAL_AXIS, 0, 1023 } +#define JOYSTICK_AXIS_IN(INPUT_PIN, LOW, REST, HIGH) \ + { JS_VIRTUAL_AXIS, INPUT_PIN, JS_VIRTUAL_AXIS, LOW, REST, HIGH } +#define JOYSTICK_AXIS_IN_OUT(INPUT_PIN, OUTPUT_PIN, LOW, REST, HIGH) \ + { OUTPUT_PIN, INPUT_PIN, JS_VIRTUAL_AXIS, LOW, REST, HIGH } +#define JOYSTICK_AXIS_IN_OUT_GROUND(INPUT_PIN, OUTPUT_PIN, GROUND_PIN, LOW, REST, HIGH) \ + { OUTPUT_PIN, INPUT_PIN, GROUND_PIN, LOW, REST, HIGH } + +typedef struct { + pin_t output_pin; + pin_t input_pin; + pin_t ground_pin; + + // the AVR ADC offers 10 bit precision, with significant bits on the higher part + uint16_t min_digit; + uint16_t mid_digit; + uint16_t max_digit; +} joystick_config_t; + +extern joystick_config_t joystick_axes[JOYSTICK_AXES_COUNT]; + +enum joystick_status { JS_INITIALIZED = 1, JS_UPDATED = 2 }; + +typedef struct { + uint8_t buttons[JOYSTICK_BUTTON_COUNT / 8 + 1]; + + int16_t axes[JOYSTICK_AXES_COUNT]; + uint8_t status : 2; +} joystick_t; + +extern joystick_t joystick_status; + +// to be implemented in the hid protocol library +void send_joystick_packet(joystick_t *joystick); diff --git a/quantum/process_keycode/process_joystick.c b/quantum/process_keycode/process_joystick.c new file mode 100644 index 000000000000..c12f7568544f --- /dev/null +++ b/quantum/process_keycode/process_joystick.c @@ -0,0 +1,168 @@ +#include "joystick.h" +#include "process_joystick.h" + +#include "analog.h" + +#include +#include + +bool process_joystick_buttons(uint16_t keycode, keyrecord_t *record); + +bool process_joystick(uint16_t keycode, keyrecord_t *record) { + if (process_joystick_buttons(keycode, record) && (joystick_status.status & JS_UPDATED) > 0) { + send_joystick_packet(&joystick_status); + joystick_status.status &= ~JS_UPDATED; + } + + return true; +} + +__attribute__((weak)) +void joystick_task(void) { + if (process_joystick_analogread() && (joystick_status.status & JS_UPDATED)) { + send_joystick_packet(&joystick_status); + joystick_status.status &= ~JS_UPDATED; + } +} + +bool process_joystick_buttons(uint16_t keycode, keyrecord_t *record) { + if (keycode < JS_BUTTON0 || keycode > JS_BUTTON_MAX) { + return true; + } else { + if (record->event.pressed) { + joystick_status.buttons[(keycode - JS_BUTTON0) / 8] |= 1 << (keycode % 8); + } else { + joystick_status.buttons[(keycode - JS_BUTTON0) / 8] &= ~(1 << (keycode % 8)); + } + + joystick_status.status |= JS_UPDATED; + } + + return true; +} + +uint16_t savePinState(pin_t pin) { +#ifdef __AVR__ + uint8_t pinNumber = pin & 0xF; + return ((PORTx_ADDRESS(pin) >> pinNumber) & 0x1) << 1 | ((DDRx_ADDRESS(pin) >> pinNumber) & 0x1); +#elif defined(PROTOCOL_CHIBIOS) + /* + The pin configuration is backed up in the following format : + bit 15 9 8 7 6 5 4 3 2 1 0 + |unused|ODR|IDR|PUPDR|OSPEEDR|OTYPER|MODER| + */ + return (( PAL_PORT(pin)->MODER >> (2*PAL_PAD(pin))) & 0x3) + | (((PAL_PORT(pin)->OTYPER >> (1*PAL_PAD(pin))) & 0x1) << 2) + | (((PAL_PORT(pin)->OSPEEDR >> (2*PAL_PAD(pin))) & 0x3) << 3) + | (((PAL_PORT(pin)->PUPDR >> (2*PAL_PAD(pin))) & 0x3) << 5) + | (((PAL_PORT(pin)->IDR >> (1*PAL_PAD(pin))) & 0x1) << 7) + | (((PAL_PORT(pin)->ODR >> (1*PAL_PAD(pin))) & 0x1) << 8); +#else + return 0; +#endif +} + +void restorePinState(pin_t pin, uint16_t restoreState) { +#if defined(PROTOCOL_LUFA) + uint8_t pinNumber = pin & 0xF; + PORTx_ADDRESS(pin) = (PORTx_ADDRESS(pin) & ~_BV(pinNumber)) | (((restoreState >> 1) & 0x1) << pinNumber); + DDRx_ADDRESS(pin) = (DDRx_ADDRESS(pin) & ~_BV(pinNumber)) | ((restoreState & 0x1) << pinNumber); +#elif defined(PROTOCOL_CHIBIOS) + PAL_PORT(pin)->MODER = (PAL_PORT(pin)->MODER & ~(0x3<< (2*PAL_PAD(pin)))) | (restoreState & 0x3) << (2*PAL_PAD(pin)); + PAL_PORT(pin)->OTYPER = (PAL_PORT(pin)->OTYPER & ~(0x1<< (1*PAL_PAD(pin)))) | ((restoreState>>2) & 0x1) << (1*PAL_PAD(pin)); + PAL_PORT(pin)->OSPEEDR= (PAL_PORT(pin)->OSPEEDR & ~(0x3<< (2*PAL_PAD(pin)))) | ((restoreState>>3) & 0x3) << (2*PAL_PAD(pin)); + PAL_PORT(pin)->PUPDR = (PAL_PORT(pin)->PUPDR & ~(0x3<< (2*PAL_PAD(pin)))) | ((restoreState>>5) & 0x3) << (2*PAL_PAD(pin)); + PAL_PORT(pin)->IDR = (PAL_PORT(pin)->IDR & ~(0x1<< (1*PAL_PAD(pin)))) | ((restoreState>>7) & 0x1) << (1*PAL_PAD(pin)); + PAL_PORT(pin)->ODR = (PAL_PORT(pin)->ODR & ~(0x1<< (1*PAL_PAD(pin)))) | ((restoreState>>8) & 0x1) << (1*PAL_PAD(pin)); +#else + return; +#endif +} + +__attribute__((weak)) bool process_joystick_analogread() { return process_joystick_analogread_quantum(); } + +bool process_joystick_analogread_quantum() { +#if JOYSTICK_AXES_COUNT > 0 + for (int axis_index = 0; axis_index < JOYSTICK_AXES_COUNT; ++axis_index) { + if (joystick_axes[axis_index].input_pin == JS_VIRTUAL_AXIS) { + continue; + } + + // save previous input pin status as well + uint16_t inputSavedState = savePinState(joystick_axes[axis_index].input_pin); + + // disable pull-up resistor + writePinLow(joystick_axes[axis_index].input_pin); + + // if pin was a pull-up input, we need to uncharge it by turning it low + // before making it a low input + setPinOutput(joystick_axes[axis_index].input_pin); + + wait_us(10); + + // save and apply output pin status + uint16_t outputSavedState = 0; + if (joystick_axes[axis_index].output_pin != JS_VIRTUAL_AXIS) { + // save previous output pin status + outputSavedState = savePinState(joystick_axes[axis_index].output_pin); + + setPinOutput(joystick_axes[axis_index].output_pin); + writePinHigh(joystick_axes[axis_index].output_pin); + } + + uint16_t groundSavedState = 0; + if (joystick_axes[axis_index].ground_pin != JS_VIRTUAL_AXIS) { + // save previous output pin status + groundSavedState = savePinState(joystick_axes[axis_index].ground_pin); + + setPinOutput(joystick_axes[axis_index].ground_pin); + writePinLow(joystick_axes[axis_index].ground_pin); + } + + wait_us(10); + + setPinInput(joystick_axes[axis_index].input_pin); + + wait_us(10); + +# if defined(__AVR__) || defined(PROTOCOL_CHIBIOS) + int16_t axis_val = analogReadPin(joystick_axes[axis_index].input_pin); +# else + // default to resting position + int16_t axis_val = joystick_axes[axis_index].mid_digit; +# endif + + //test the converted value against the lower range + int32_t ref = joystick_axes[axis_index].mid_digit; + int32_t range = joystick_axes[axis_index].min_digit; + int32_t ranged_val = ((axis_val - ref) * -127) / (range - ref) ; + + if (ranged_val > 0) { + //the value is in the higher range + range = joystick_axes[axis_index].max_digit; + ranged_val = ((axis_val - ref) * 127) / (range - ref); + } + + //clamp the result in the valid range + ranged_val = ranged_val < -127 ? -127 : ranged_val; + ranged_val = ranged_val > 127 ? 127 : ranged_val; + + if (ranged_val != joystick_status.axes[axis_index]) { + joystick_status.axes[axis_index] = ranged_val; + joystick_status.status |= JS_UPDATED; + } + + // restore output, ground and input status + if (joystick_axes[axis_index].output_pin != JS_VIRTUAL_AXIS) { + restorePinState(joystick_axes[axis_index].output_pin, outputSavedState); + } + if (joystick_axes[axis_index].ground_pin != JS_VIRTUAL_AXIS) { + restorePinState(joystick_axes[axis_index].ground_pin, groundSavedState); + } + + restorePinState(joystick_axes[axis_index].input_pin, inputSavedState); + } + +#endif + return true; +} diff --git a/quantum/process_keycode/process_joystick.h b/quantum/process_keycode/process_joystick.h new file mode 100644 index 000000000000..7a8b82913aa1 --- /dev/null +++ b/quantum/process_keycode/process_joystick.h @@ -0,0 +1,11 @@ +#pragma once + +#include +#include "quantum.h" + +bool process_joystick(uint16_t keycode, keyrecord_t *record); + +void joystick_task(void); + +bool process_joystick_analogread(void); +bool process_joystick_analogread_quantum(void); diff --git a/quantum/quantum.c b/quantum/quantum.c index 9d63f4de2788..dab6c9172fc0 100644 --- a/quantum/quantum.c +++ b/quantum/quantum.c @@ -276,6 +276,9 @@ bool process_record_quantum(keyrecord_t *record) { #endif #if defined(RGBLIGHT_ENABLE) || defined(RGB_MATRIX_ENABLE) process_rgb(keycode, record) && +#endif +#ifdef JOYSTICK_ENABLE + process_joystick(keycode, record) && #endif true)) { return false; diff --git a/quantum/quantum.h b/quantum/quantum.h index 51deac0cd525..a2c0ec9a286b 100644 --- a/quantum/quantum.h +++ b/quantum/quantum.h @@ -142,6 +142,10 @@ extern layer_state_t layer_state; # include "process_magic.h" #endif +#ifdef JOYSTICK_ENABLE +# include "process_joystick.h" +#endif + #ifdef GRAVE_ESC_ENABLE # include "process_grave_esc.h" #endif diff --git a/quantum/quantum_keycodes.h b/quantum/quantum_keycodes.h index 437921aeb1af..5e7c9ad33c6e 100644 --- a/quantum/quantum_keycodes.h +++ b/quantum/quantum_keycodes.h @@ -512,6 +512,41 @@ enum quantum_keycodes { DYN_MACRO_PLAY1, DYN_MACRO_PLAY2, + JS_BUTTON0, + JS_BUTTON_MIN = JS_BUTTON0, + JS_BUTTON1, + JS_BUTTON2, + JS_BUTTON3, + JS_BUTTON4, + JS_BUTTON5, + JS_BUTTON6, + JS_BUTTON7, + JS_BUTTON8, + JS_BUTTON9, + JS_BUTTON10, + JS_BUTTON11, + JS_BUTTON12, + JS_BUTTON13, + JS_BUTTON14, + JS_BUTTON15, + JS_BUTTON16, + JS_BUTTON17, + JS_BUTTON18, + JS_BUTTON19, + JS_BUTTON20, + JS_BUTTON21, + JS_BUTTON22, + JS_BUTTON23, + JS_BUTTON24, + JS_BUTTON25, + JS_BUTTON26, + JS_BUTTON27, + JS_BUTTON28, + JS_BUTTON29, + JS_BUTTON30, + JS_BUTTON31, + JS_BUTTON_MAX = JS_BUTTON31, + // always leave at the end SAFE_RANGE }; diff --git a/tmk_core/common/keyboard.c b/tmk_core/common/keyboard.c index 714c3d048f07..a45af56dfdbb 100644 --- a/tmk_core/common/keyboard.c +++ b/tmk_core/common/keyboard.c @@ -74,6 +74,9 @@ along with this program. If not, see . #ifdef MIDI_ENABLE # include "process_midi.h" #endif +#ifdef JOYSTICK_ENABLE +# include "process_joystick.h" +#endif #ifdef HD44780_ENABLE # include "hd44780.h" #endif @@ -420,6 +423,10 @@ void keyboard_task(void) { } #endif +#ifdef JOYSTICK_ENABLE + joystick_task(); +#endif + // update LED if (led_status != host_keyboard_leds()) { led_status = host_keyboard_leds(); diff --git a/tmk_core/common/report.h b/tmk_core/common/report.h index 1b2f13bdde27..1aa33c998d1e 100644 --- a/tmk_core/common/report.h +++ b/tmk_core/common/report.h @@ -29,7 +29,8 @@ enum hid_report_ids { REPORT_ID_MOUSE, REPORT_ID_SYSTEM, REPORT_ID_CONSUMER, - REPORT_ID_NKRO + REPORT_ID_NKRO, + REPORT_ID_JOYSTICK }; /* Mouse buttons */ @@ -189,6 +190,16 @@ typedef struct { int8_t h; } __attribute__((packed)) report_mouse_t; +typedef struct { +#if JOYSTICK_AXES_COUNT > 0 + int8_t axes[JOYSTICK_AXES_COUNT]; +#endif + +#if JOYSTICK_BUTTON_COUNT > 0 + uint8_t buttons[(JOYSTICK_BUTTON_COUNT - 1) / 8 + 1]; +#endif +} __attribute__((packed)) joystick_report_t; + /* keycode to system usage */ static inline uint16_t KEYCODE2SYSTEM(uint8_t key) { switch (key) { diff --git a/tmk_core/protocol/chibios/usb_main.c b/tmk_core/protocol/chibios/usb_main.c index 21e9f14e50a8..68c61cf55084 100644 --- a/tmk_core/protocol/chibios/usb_main.c +++ b/tmk_core/protocol/chibios/usb_main.c @@ -47,6 +47,10 @@ extern keymap_config_t keymap_config; #endif +#ifdef JOYSTICK_ENABLE +# include "joystick.h" +#endif + /* --------------------------------------------------------- * Global interface variables and declarations * --------------------------------------------------------- @@ -246,6 +250,9 @@ typedef struct { #endif #ifdef VIRTSER_ENABLE usb_driver_config_t serial_driver; +#endif +#ifdef JOYSTICK_ENABLE + usb_driver_config_t joystick_driver; #endif }; usb_driver_config_t array[0]; @@ -283,6 +290,14 @@ static usb_driver_configs_t drivers = { # define CDC_OUT_MODE USB_EP_MODE_TYPE_BULK .serial_driver = QMK_USB_DRIVER_CONFIG(CDC, CDC_NOTIFICATION_EPNUM, false), #endif + +#ifdef JOYSTICK_ENABLE +# define JOYSTICK_IN_CAPACITY 4 +# define JOYSTICK_OUT_CAPACITY 4 +# define JOYSTICK_IN_MODE USB_EP_MODE_TYPE_BULK +# define JOYSTICK_OUT_MODE USB_EP_MODE_TYPE_BULK + .joystick_driver = QMK_USB_DRIVER_CONFIG(JOYSTICK, 0, false), +#endif }; #define NUM_USB_DRIVERS (sizeof(drivers) / sizeof(usb_driver_config_t)) @@ -867,3 +882,57 @@ void virtser_task(void) { } #endif + +#ifdef JOYSTICK_ENABLE + +void send_joystick_packet(joystick_t *joystick) { + joystick_report_t rep = { +# if JOYSTICK_AXES_COUNT > 0 + .axes = {joystick->axes[0], + +# if JOYSTICK_AXES_COUNT >= 2 + joystick->axes[1], +# endif +# if JOYSTICK_AXES_COUNT >= 3 + joystick->axes[2], +# endif +# if JOYSTICK_AXES_COUNT >= 4 + joystick->axes[3], +# endif +# if JOYSTICK_AXES_COUNT >= 5 + joystick->axes[4], +# endif +# if JOYSTICK_AXES_COUNT >= 6 + joystick->axes[5], +# endif + }, +# endif // JOYSTICK_AXES_COUNT>0 + +# if JOYSTICK_BUTTON_COUNT > 0 + .buttons = {joystick->buttons[0], + +# if JOYSTICK_BUTTON_COUNT > 8 + joystick->buttons[1], +# endif +# if JOYSTICK_BUTTON_COUNT > 16 + joystick->buttons[2], +# endif +# if JOYSTICK_BUTTON_COUNT > 24 + joystick->buttons[3], +# endif + } +# endif // JOYSTICK_BUTTON_COUNT>0 + }; + + // chnWrite(&drivers.joystick_driver.driver, (uint8_t *)&rep, sizeof(rep)); + osalSysLock(); + if (usbGetDriverStateI(&USB_DRIVER) != USB_ACTIVE) { + osalSysUnlock(); + return; + } + + usbStartTransmitI(&USB_DRIVER, JOYSTICK_IN_EPNUM, (uint8_t *)&rep, sizeof(joystick_report_t)); + osalSysUnlock(); +} + +#endif diff --git a/tmk_core/protocol/lufa/lufa.c b/tmk_core/protocol/lufa/lufa.c index 6776a964e976..85603646db98 100644 --- a/tmk_core/protocol/lufa/lufa.c +++ b/tmk_core/protocol/lufa/lufa.c @@ -85,6 +85,10 @@ extern keymap_config_t keymap_config; # include "raw_hid.h" #endif +#ifdef JOYSTICK_ENABLE +# include "joystick.h" +#endif + uint8_t keyboard_idle = 0; /* 0: Boot Protocol, 1: Report Protocol(default) */ uint8_t keyboard_protocol = 1; @@ -263,6 +267,66 @@ static void Console_Task(void) { } #endif +/******************************************************************************* + * Joystick + ******************************************************************************/ +#ifdef JOYSTICK_ENABLE +void send_joystick_packet(joystick_t *joystick) { + uint8_t timeout = 255; + + joystick_report_t r = { +# if JOYSTICK_AXES_COUNT > 0 + .axes = {joystick->axes[0], + +# if JOYSTICK_AXES_COUNT >= 2 + joystick->axes[1], +# endif +# if JOYSTICK_AXES_COUNT >= 3 + joystick->axes[2], +# endif +# if JOYSTICK_AXES_COUNT >= 4 + joystick->axes[3], +# endif +# if JOYSTICK_AXES_COUNT >= 5 + joystick->axes[4], +# endif +# if JOYSTICK_AXES_COUNT >= 6 + joystick->axes[5], +# endif + }, +# endif // JOYSTICK_AXES_COUNT>0 + +# if JOYSTICK_BUTTON_COUNT > 0 + .buttons = {joystick->buttons[0], + +# if JOYSTICK_BUTTON_COUNT > 8 + joystick->buttons[1], +# endif +# if JOYSTICK_BUTTON_COUNT > 16 + joystick->buttons[2], +# endif +# if JOYSTICK_BUTTON_COUNT > 24 + joystick->buttons[3], +# endif + } +# endif // JOYSTICK_BUTTON_COUNT>0 + }; + + /* Select the Joystick Report Endpoint */ + Endpoint_SelectEndpoint(JOYSTICK_IN_EPNUM); + + /* Check if write ready for a polling interval around 10ms */ + while (timeout-- && !Endpoint_IsReadWriteAllowed()) _delay_us(40); + if (!Endpoint_IsReadWriteAllowed()) return; + + /* Write Joystick Report Data */ + Endpoint_Write_Stream_LE(&r, sizeof(joystick_report_t), NULL); + + /* Finalize the stream transfer to send the last packet */ + Endpoint_ClearIN(); +} +#endif + /******************************************************************************* * USB Events ******************************************************************************/ @@ -411,6 +475,9 @@ void EVENT_USB_Device_ConfigurationChanged(void) { ConfigSuccess &= Endpoint_ConfigureEndpoint((CDC_OUT_EPNUM | ENDPOINT_DIR_OUT), EP_TYPE_BULK, CDC_EPSIZE, 1); ConfigSuccess &= Endpoint_ConfigureEndpoint((CDC_IN_EPNUM | ENDPOINT_DIR_IN), EP_TYPE_BULK, CDC_EPSIZE, 1); #endif +#ifdef JOYSTICK_ENABLE + ConfigSuccess &= ENDPOINT_CONFIG(JOYSTICK_IN_EPNUM, EP_TYPE_INTERRUPT, ENDPOINT_DIR_IN, JOYSTICK_EPSIZE, ENDPOINT_BANK_SINGLE); +#endif } /* FIXME: Expose this table in the docs somehow diff --git a/tmk_core/protocol/usb_descriptor.c b/tmk_core/protocol/usb_descriptor.c index bcca24586766..f5d32445de50 100644 --- a/tmk_core/protocol/usb_descriptor.c +++ b/tmk_core/protocol/usb_descriptor.c @@ -279,6 +279,63 @@ const USB_Descriptor_HIDReport_Datatype_t PROGMEM ConsoleReport[] = { }; #endif +#ifdef JOYSTICK_ENABLE +# if JOYSTICK_AXES_COUNT == 0 && JOYSTICK_BUTTON_COUNT == 0 +# error Need at least one axis or button for joystick +# endif +const USB_Descriptor_HIDReport_Datatype_t PROGMEM JoystickReport[] = { + HID_RI_USAGE_PAGE(8, 0x01), // Generic Desktop + HID_RI_USAGE(8, 0x04), // Joystick + HID_RI_COLLECTION(8, 0x01), // Application + HID_RI_COLLECTION(8, 0x00), // Physical + HID_RI_USAGE_PAGE(8, 0x01), // Generic Desktop +# if JOYSTICK_AXES_COUNT >= 1 + HID_RI_USAGE(8, 0x30), // X +# endif +# if JOYSTICK_AXES_COUNT >= 2 + HID_RI_USAGE(8, 0x31), // Y +# endif +# if JOYSTICK_AXES_COUNT >= 3 + HID_RI_USAGE(8, 0x32), // Z +# endif +# if JOYSTICK_AXES_COUNT >= 4 + HID_RI_USAGE(8, 0x33), // Rx +# endif +# if JOYSTICK_AXES_COUNT >= 5 + HID_RI_USAGE(8, 0x34), // Ry +# endif +# if JOYSTICK_AXES_COUNT >= 6 + HID_RI_USAGE(8, 0x35), // Rz +# endif +# if JOYSTICK_AXES_COUNT >= 1 + HID_RI_LOGICAL_MINIMUM(8, -127), + HID_RI_LOGICAL_MAXIMUM(8, 127), + HID_RI_REPORT_COUNT(8, JOYSTICK_AXES_COUNT), + HID_RI_REPORT_SIZE(8, 0x08), + HID_RI_INPUT(8, HID_IOF_DATA | HID_IOF_VARIABLE | HID_IOF_ABSOLUTE), +# endif + +# if JOYSTICK_BUTTON_COUNT >= 1 + HID_RI_USAGE_PAGE(8, 0x09), // Button + HID_RI_USAGE_MINIMUM(8, 0x01), + HID_RI_USAGE_MAXIMUM(8, JOYSTICK_BUTTON_COUNT), + HID_RI_LOGICAL_MINIMUM(8, 0x00), + HID_RI_LOGICAL_MAXIMUM(8, 0x01), + HID_RI_REPORT_COUNT(8, JOYSTICK_BUTTON_COUNT), + HID_RI_REPORT_SIZE(8, 0x01), + HID_RI_INPUT(8, HID_IOF_DATA | HID_IOF_VARIABLE | HID_IOF_ABSOLUTE), + +# if (JOYSTICK_BUTTON_COUNT % 8) != 0 + HID_RI_REPORT_COUNT(8, 8 - (JOYSTICK_BUTTON_COUNT % 8)), + HID_RI_REPORT_SIZE(8, 0x01), + HID_RI_INPUT(8, HID_IOF_CONSTANT), +# endif +# endif + HID_RI_END_COLLECTION(0), + HID_RI_END_COLLECTION(0) +}; +#endif + /* * Device descriptor */ @@ -288,7 +345,7 @@ const USB_Descriptor_Device_t PROGMEM DeviceDescriptor = { .Type = DTYPE_Device }, .USBSpecification = VERSION_BCD(1, 1, 0), - + #if VIRTSER_ENABLE .Class = USB_CSCP_IADDeviceClass, .SubClass = USB_CSCP_IADDeviceSubclass, @@ -813,6 +870,46 @@ const USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor = { .PollingIntervalMS = 0x05 }, #endif + + /* + * Joystick + */ +#ifdef JOYSTICK_ENABLE + .Joystick_Interface = { + .Header = { + .Size = sizeof(USB_Descriptor_Interface_t), + .Type = DTYPE_Interface + }, + .InterfaceNumber = JOYSTICK_INTERFACE, + .AlternateSetting = 0x00, + .TotalEndpoints = 1, + .Class = HID_CSCP_HIDClass, + .SubClass = HID_CSCP_NonBootSubclass, + .Protocol = HID_CSCP_NonBootProtocol, + .InterfaceStrIndex = NO_DESCRIPTOR + }, + .Joystick_HID = { + .Header = { + .Size = sizeof(USB_HID_Descriptor_HID_t), + .Type = HID_DTYPE_HID + }, + .HIDSpec = VERSION_BCD(1, 1, 1), + .CountryCode = 0x00, + .TotalReportDescriptors = 1, + .HIDReportType = HID_DTYPE_Report, + .HIDReportLength = sizeof(JoystickReport) + }, + .Joystick_INEndpoint = { + .Header = { + .Size = sizeof(USB_Descriptor_Endpoint_t), + .Type = DTYPE_Endpoint + }, + .EndpointAddress = (ENDPOINT_DIR_IN | JOYSTICK_IN_EPNUM), + .Attributes = (EP_TYPE_INTERRUPT | ENDPOINT_ATTR_NO_SYNC | ENDPOINT_USAGE_DATA), + .EndpointSize = JOYSTICK_EPSIZE, + .PollingIntervalMS = USB_POLLING_INTERVAL_MS + } +#endif }; /* @@ -945,6 +1042,12 @@ uint16_t get_usb_descriptor(const uint16_t wValue, const uint16_t wIndex, const break; #endif +#ifdef JOYSTICK_ENABLE + case JOYSTICK_INTERFACE: + Address = &ConfigurationDescriptor.Joystick_HID; + Size = sizeof(USB_HID_Descriptor_HID_t); + break; +#endif } break; @@ -989,6 +1092,12 @@ uint16_t get_usb_descriptor(const uint16_t wValue, const uint16_t wIndex, const break; #endif +#ifdef JOYSTICK_ENABLE + case JOYSTICK_INTERFACE: + Address = &JoystickReport; + Size = sizeof(JoystickReport); + break; +#endif } break; diff --git a/tmk_core/protocol/usb_descriptor.h b/tmk_core/protocol/usb_descriptor.h index 34a85978a6b3..79dd87014f99 100644 --- a/tmk_core/protocol/usb_descriptor.h +++ b/tmk_core/protocol/usb_descriptor.h @@ -123,6 +123,13 @@ typedef struct { USB_Descriptor_Endpoint_t CDC_DataOutEndpoint; USB_Descriptor_Endpoint_t CDC_DataInEndpoint; #endif + +#ifdef JOYSTICK_ENABLE + // Joystick HID Interface + USB_Descriptor_Interface_t Joystick_Interface; + USB_HID_Descriptor_HID_t Joystick_HID; + USB_Descriptor_Endpoint_t Joystick_INEndpoint; +#endif } USB_Descriptor_Configuration_t; /* @@ -164,6 +171,9 @@ enum usb_interfaces { CDI_INTERFACE, #endif +#if defined(JOYSTICK_ENABLE) + JOYSTICK_INTERFACE, +#endif TOTAL_INTERFACES }; @@ -219,6 +229,10 @@ enum usb_endpoints { CDC_IN_EPNUM = NEXT_EPNUM, CDC_OUT_EPNUM = NEXT_EPNUM, #endif +#ifdef JOYSTICK_ENABLE + JOYSTICK_IN_EPNUM = NEXT_EPNUM, + JOYSTICK_OUT_EPNUM = NEXT_EPNUM, +#endif }; #ifdef PROTOCOL_LUFA @@ -243,6 +257,7 @@ enum usb_endpoints { #define MIDI_STREAM_EPSIZE 64 #define CDC_NOTIFICATION_EPSIZE 8 #define CDC_EPSIZE 16 +#define JOYSTICK_EPSIZE 8 uint16_t get_usb_descriptor(const uint16_t wValue, const uint16_t wIndex, const void** const DescriptorAddress); #endif From 4b74f985ec7b14f5517df4e591f0c36b24f85f5c Mon Sep 17 00:00:00 2001 From: Max Rumpf Date: Sun, 26 Jul 2020 01:00:33 +0200 Subject: [PATCH 672/930] Tweak the Christmas animation effect to be less harsh on the eyes (#7648) * Tweak the Christmas animation effect to be less harsh on the eyes * Further improve the tweaked Christmas animation code - Use constants where it makes sense - Instead of complicated math, use a static variable to keep track if it's animating from or to red - Don't use pow (but a simple macro instead) - Using floating point math is necessary for the fraction in the cubic bezier function to work * Update docs for the tweaked Christmas animation effect * Further improve memory usage - Don't use floats, but 32 bit ints instead (where needed) - Replace limits.h with constant * Fix typo --- docs/feature_rgblight.md | 24 ++++++++++++------------ quantum/rgblight.c | 31 +++++++++++++++++++++++++++---- quantum/rgblight.h | 2 +- 3 files changed, 40 insertions(+), 17 deletions(-) diff --git a/docs/feature_rgblight.md b/docs/feature_rgblight.md index 26e01da501d8..23b2886edbb2 100644 --- a/docs/feature_rgblight.md +++ b/docs/feature_rgblight.md @@ -126,19 +126,19 @@ Use these defines to add or remove animations from the firmware. When you are ru The following options are used to tweak the various animations: -|Define |Default |Description | -|------------------------------------|-------------|-------------------------------------------------------------------------------------| +|Define |Default |Description | +|------------------------------------|-------------|-----------------------------------------------------------------------------------------------| |`RGBLIGHT_EFFECT_BREATHE_CENTER` |*Not defined*|If defined, used to calculate the curve for the breathing animation. Valid values are 1.0 to 2.7 | -|`RGBLIGHT_EFFECT_BREATHE_MAX` |`255` |The maximum brightness for the breathing mode. Valid values are 1 to 255 | -|`RGBLIGHT_EFFECT_CHRISTMAS_INTERVAL`|`1000` |How long to wait between light changes for the "Christmas" animation, in milliseconds| -|`RGBLIGHT_EFFECT_CHRISTMAS_STEP` |`2` |The number of LEDs to group the red/green colors by for the "Christmas" animation | -|`RGBLIGHT_EFFECT_KNIGHT_LED_NUM` |`RGBLED_NUM` |The number of LEDs to have the "Knight" animation travel | -|`RGBLIGHT_EFFECT_KNIGHT_LENGTH` |`3` |The number of LEDs to light up for the "Knight" animation | -|`RGBLIGHT_EFFECT_KNIGHT_OFFSET` |`0` |The number of LEDs to start the "Knight" animation from the start of the strip by | -|`RGBLIGHT_RAINBOW_SWIRL_RANGE` |`255` |Range adjustment for the rainbow swirl effect to get different swirls | -|`RGBLIGHT_EFFECT_SNAKE_LENGTH` |`4` |The number of LEDs to light up for the "Snake" animation | -|`RGBLIGHT_EFFECT_TWINKLE_LIFE` |`75` |Adjusts how quickly each LED brightens and dims when twinkling (in animation steps) | -|`RGBLIGHT_EFFECT_TWINKLE_PROBABILITY`|`1/127` |Adjusts how likely each LED is to twinkle (on each animation step) | +|`RGBLIGHT_EFFECT_BREATHE_MAX` |`255` |The maximum brightness for the breathing mode. Valid values are 1 to 255 | +|`RGBLIGHT_EFFECT_CHRISTMAS_INTERVAL`|`40` |How long (in milliseconds) to wait between animation steps for the "Christmas" animation | +|`RGBLIGHT_EFFECT_CHRISTMAS_STEP` |`2` |The number of LEDs to group the red/green colors by for the "Christmas" animation | +|`RGBLIGHT_EFFECT_KNIGHT_LED_NUM` |`RGBLED_NUM` |The number of LEDs to have the "Knight" animation travel | +|`RGBLIGHT_EFFECT_KNIGHT_LENGTH` |`3` |The number of LEDs to light up for the "Knight" animation | +|`RGBLIGHT_EFFECT_KNIGHT_OFFSET` |`0` |The number of LEDs to start the "Knight" animation from the start of the strip by | +|`RGBLIGHT_RAINBOW_SWIRL_RANGE` |`255` |Range adjustment for the rainbow swirl effect to get different swirls | +|`RGBLIGHT_EFFECT_SNAKE_LENGTH` |`4` |The number of LEDs to light up for the "Snake" animation | +|`RGBLIGHT_EFFECT_TWINKLE_LIFE` |`75` |Adjusts how quickly each LED brightens and dims when twinkling (in animation steps) | +|`RGBLIGHT_EFFECT_TWINKLE_PROBABILITY`|`1/127` |Adjusts how likely each LED is to twinkle (on each animation step) | ### Example Usage to Reduce Memory Footprint 1. Remove `RGBLIGHT_ANIMATIONS` from `config.h`. diff --git a/quantum/rgblight.c b/quantum/rgblight.c index f9e9da167924..52d8da1813d7 100644 --- a/quantum/rgblight.c +++ b/quantum/rgblight.c @@ -1163,16 +1163,39 @@ void rgblight_effect_knight(animation_status_t *anim) { #endif #ifdef RGBLIGHT_EFFECT_CHRISTMAS +# define CUBED(x) ((x) * (x) * (x)) + +/** + * Christmas lights effect, with a smooth animation between red & green. + */ void rgblight_effect_christmas(animation_status_t *anim) { - uint8_t hue; + static int8_t increment = 1; + const uint8_t max_pos = 32; + const uint8_t hue_green = 85; + + uint32_t xa; + uint8_t hue, val; uint8_t i; - anim->current_offset = (anim->current_offset + 1) % 2; + // The effect works by animating anim->pos from 0 to 32 and back to 0. + // The pos is used in a cubic bezier formula to ease-in-out between red and green, leaving the interpolated colors visible as short as possible. + xa = CUBED((uint32_t) anim->pos); + hue = ((uint32_t) hue_green) * xa / (xa + CUBED((uint32_t) (max_pos - anim->pos))); + // Additionally, these interpolated colors get shown with a slightly darker value, to make them less prominent than the main colors. + val = 255 - (3 * (hue < hue_green / 2 ? hue : hue_green - hue) / 2); + for (i = 0; i < rgblight_ranges.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 + rgblight_ranges.effect_start_pos]); + uint8_t local_hue = (i / RGBLIGHT_EFFECT_CHRISTMAS_STEP) % 2 ? hue : hue_green - hue; + sethsv(local_hue, rgblight_config.sat, val, (LED_TYPE *)&led[i + rgblight_ranges.effect_start_pos]); } rgblight_set(); + + if (anim->pos == 0) { + increment = 1; + } else if (anim->pos == max_pos) { + increment = -1; + } + anim->pos += increment; } #endif diff --git a/quantum/rgblight.h b/quantum/rgblight.h index 7b2696294751..c3a9e94b7c24 100644 --- a/quantum/rgblight.h +++ b/quantum/rgblight.h @@ -142,7 +142,7 @@ enum RGBLIGHT_EFFECT_MODE { # endif # ifndef RGBLIGHT_EFFECT_CHRISTMAS_INTERVAL -# define RGBLIGHT_EFFECT_CHRISTMAS_INTERVAL 1000 +# define RGBLIGHT_EFFECT_CHRISTMAS_INTERVAL 40 # endif # ifndef RGBLIGHT_EFFECT_CHRISTMAS_STEP From e6266b19be46c1340209bdd0a6c519452d5b9f2a Mon Sep 17 00:00:00 2001 From: Drashna Jaelre Date: Mon, 27 Jul 2020 14:46:39 -0700 Subject: [PATCH 673/930] Initialize Layer State on startup (#8318) * Initialize Layer State on startup Right now, on startup, the default layer state gets called and set, triggering the callback functions for the default layer state. However, the normal layer state never actually gets initialized. It's set to 0 directly, by default, but the callback functions are never actually called. This creates some inconsistency in the behavior for end users. This adds a simple "clear" that triggers the callback on startup. This should produce more consisten behavior between the two functions and layer masks. * Stupid hack * Fix type casting? * Fix compile issues with magic is disabled --- tmk_core/common/action_layer.h | 6 ++++-- tmk_core/common/bootmagic.c | 2 ++ tmk_core/common/magic.c | 3 +++ 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/tmk_core/common/action_layer.h b/tmk_core/common/action_layer.h index 16922c1ff921..9b9173c33bae 100644 --- a/tmk_core/common/action_layer.h +++ b/tmk_core/common/action_layer.h @@ -85,6 +85,8 @@ void layer_invert(uint8_t layer); void layer_or(layer_state_t state); void layer_and(layer_state_t state); void layer_xor(layer_state_t state); +layer_state_t layer_state_set_user(layer_state_t state); +layer_state_t layer_state_set_kb(layer_state_t state); #else # define layer_state 0 @@ -101,10 +103,10 @@ void layer_xor(layer_state_t state); # define layer_or(state) (void)state # define layer_and(state) (void)state # define layer_xor(state) (void)state +# define layer_state_set_kb(state) (void)state +# define layer_state_set_user(state) (void)state #endif -layer_state_t layer_state_set_user(layer_state_t state); -layer_state_t layer_state_set_kb(layer_state_t state); /* pressed actions cache */ #if !defined(NO_ACTION_LAYER) && !defined(STRICT_LAYER_RELEASE) diff --git a/tmk_core/common/bootmagic.c b/tmk_core/common/bootmagic.c index bb2aa0db8cdd..c1b3adf94df1 100644 --- a/tmk_core/common/bootmagic.c +++ b/tmk_core/common/bootmagic.c @@ -122,6 +122,8 @@ void bootmagic(void) { default_layer = eeconfig_read_default_layer(); default_layer_set((layer_state_t)default_layer); } + /* Also initialize layer state to trigger callback functions for layer_state */ + layer_state_set_kb((layer_state_t)layer_state); /* EE_HANDS handedness */ if (bootmagic_scan_keycode(BOOTMAGIC_KEY_EE_HANDS_LEFT)) { diff --git a/tmk_core/common/magic.c b/tmk_core/common/magic.c index d8ab52573511..e14994164e22 100644 --- a/tmk_core/common/magic.c +++ b/tmk_core/common/magic.c @@ -33,4 +33,7 @@ void magic(void) { uint8_t default_layer = 0; default_layer = eeconfig_read_default_layer(); default_layer_set((layer_state_t)default_layer); + + /* Also initialize layer state to trigger callback functions for layer_state */ + layer_state_set_kb((layer_state_t)layer_state); } From 4764aa8711cadc2776fde7641e97e280c4ac55c5 Mon Sep 17 00:00:00 2001 From: TerryMathews Date: Tue, 28 Jul 2020 01:34:18 -0400 Subject: [PATCH 674/930] The Key Company project consolidation (#9547) * Consolidate TKC projects and increase VIA keymap count to 4. * Updated readme files. * Removed config.h via limitation of 2 dynamic keymaps * Reduce dynamic keymaps from 4 to 3 due to EEPROM space limitations. * Update dynamic_keymap.c * Restore 4 dynamic keymaps for VIA in TKC projects. * Update quantum/dynamic_keymap.c --- keyboards/m0lly/keymaps/via/config.h | 1 - .../{ => tkc}/candybar/bootloader_defs.h | 0 keyboards/{ => tkc}/candybar/chconf.h | 0 keyboards/{ => tkc}/candybar/halconf.h | 0 keyboards/{ => tkc}/candybar/lefty/config.h | 0 keyboards/{ => tkc}/candybar/lefty/info.json | 0 .../candybar/lefty/keymaps/default/keymap.c | 0 .../candybar/lefty/keymaps/via/keymap.c | 14 ++++++++++ .../candybar/lefty/keymaps/via/rules.mk | 0 keyboards/{ => tkc}/candybar/lefty/lefty.c | 0 keyboards/{ => tkc}/candybar/lefty/lefty.h | 0 keyboards/{ => tkc}/candybar/lefty/readme.md | 2 +- keyboards/{ => tkc}/candybar/lefty/rules.mk | 0 keyboards/{ => tkc}/candybar/mcuconf.h | 0 keyboards/{ => tkc}/candybar/righty/config.h | 0 keyboards/{ => tkc}/candybar/righty/info.json | 0 .../candybar/righty/keymaps/default/keymap.c | 0 .../candybar/righty/keymaps/via/keymap.c | 14 ++++++++++ .../candybar/righty/keymaps/via/rules.mk | 0 keyboards/{ => tkc}/candybar/righty/readme.md | 2 +- keyboards/{ => tkc}/candybar/righty/righty.c | 0 keyboards/{ => tkc}/candybar/righty/righty.h | 0 keyboards/{ => tkc}/candybar/righty/rules.mk | 0 keyboards/{ => tkc}/m0lly/README.md | 2 +- keyboards/{ => tkc}/m0lly/config.h | 0 keyboards/{ => tkc}/m0lly/info.json | 0 .../{ => tkc}/m0lly/keymaps/default/keymap.c | 0 .../{ => tkc}/m0lly/keymaps/via/keymap.c | 22 ++++++++++++++++ .../{ => tkc}/m0lly/keymaps/via/rules.mk | 0 keyboards/{ => tkc}/m0lly/m0lly.c | 0 keyboards/{ => tkc}/m0lly/m0lly.h | 0 keyboards/{ => tkc}/m0lly/rules.mk | 0 keyboards/{ => tkc}/tkc1800/README.md | 2 +- keyboards/{ => tkc}/tkc1800/config.h | 0 keyboards/{ => tkc}/tkc1800/info.json | 0 .../tkc1800/keymaps/default/keymap.c | 0 .../{ => tkc}/tkc1800/keymaps/smt/keymap.c | 0 .../{ => tkc}/tkc1800/keymaps/via/keymap.c | 26 +++++++++++++++++++ .../{ => tkc}/tkc1800/keymaps/via/rules.mk | 0 .../{ => tkc}/tkc1800/keymaps/wkl/keymap.c | 0 .../tkc1800/keymaps/yanfali/keymap.c | 0 .../tkc1800/keymaps/yanfali/rules.mk | 0 keyboards/{ => tkc}/tkc1800/rules.mk | 0 keyboards/{ => tkc}/tkc1800/tkc1800.c | 0 keyboards/{ => tkc}/tkc1800/tkc1800.h | 0 keyboards/tkc1800/keymaps/via/config.h | 1 - quantum/dynamic_keymap.c | 6 ++++- 47 files changed, 85 insertions(+), 7 deletions(-) delete mode 100644 keyboards/m0lly/keymaps/via/config.h rename keyboards/{ => tkc}/candybar/bootloader_defs.h (100%) rename keyboards/{ => tkc}/candybar/chconf.h (100%) rename keyboards/{ => tkc}/candybar/halconf.h (100%) rename keyboards/{ => tkc}/candybar/lefty/config.h (100%) rename keyboards/{ => tkc}/candybar/lefty/info.json (100%) rename keyboards/{ => tkc}/candybar/lefty/keymaps/default/keymap.c (100%) rename keyboards/{ => tkc}/candybar/lefty/keymaps/via/keymap.c (62%) rename keyboards/{ => tkc}/candybar/lefty/keymaps/via/rules.mk (100%) rename keyboards/{ => tkc}/candybar/lefty/lefty.c (100%) rename keyboards/{ => tkc}/candybar/lefty/lefty.h (100%) rename keyboards/{ => tkc}/candybar/lefty/readme.md (94%) rename keyboards/{ => tkc}/candybar/lefty/rules.mk (100%) rename keyboards/{ => tkc}/candybar/mcuconf.h (100%) rename keyboards/{ => tkc}/candybar/righty/config.h (100%) rename keyboards/{ => tkc}/candybar/righty/info.json (100%) rename keyboards/{ => tkc}/candybar/righty/keymaps/default/keymap.c (100%) rename keyboards/{ => tkc}/candybar/righty/keymaps/via/keymap.c (65%) rename keyboards/{ => tkc}/candybar/righty/keymaps/via/rules.mk (100%) rename keyboards/{ => tkc}/candybar/righty/readme.md (94%) rename keyboards/{ => tkc}/candybar/righty/righty.c (100%) rename keyboards/{ => tkc}/candybar/righty/righty.h (100%) rename keyboards/{ => tkc}/candybar/righty/rules.mk (100%) rename keyboards/{ => tkc}/m0lly/README.md (96%) rename keyboards/{ => tkc}/m0lly/config.h (100%) rename keyboards/{ => tkc}/m0lly/info.json (100%) rename keyboards/{ => tkc}/m0lly/keymaps/default/keymap.c (100%) rename keyboards/{ => tkc}/m0lly/keymaps/via/keymap.c (73%) rename keyboards/{ => tkc}/m0lly/keymaps/via/rules.mk (100%) rename keyboards/{ => tkc}/m0lly/m0lly.c (100%) rename keyboards/{ => tkc}/m0lly/m0lly.h (100%) rename keyboards/{ => tkc}/m0lly/rules.mk (100%) rename keyboards/{ => tkc}/tkc1800/README.md (96%) rename keyboards/{ => tkc}/tkc1800/config.h (100%) rename keyboards/{ => tkc}/tkc1800/info.json (100%) rename keyboards/{ => tkc}/tkc1800/keymaps/default/keymap.c (100%) rename keyboards/{ => tkc}/tkc1800/keymaps/smt/keymap.c (100%) rename keyboards/{ => tkc}/tkc1800/keymaps/via/keymap.c (72%) rename keyboards/{ => tkc}/tkc1800/keymaps/via/rules.mk (100%) rename keyboards/{ => tkc}/tkc1800/keymaps/wkl/keymap.c (100%) rename keyboards/{ => tkc}/tkc1800/keymaps/yanfali/keymap.c (100%) rename keyboards/{ => tkc}/tkc1800/keymaps/yanfali/rules.mk (100%) rename keyboards/{ => tkc}/tkc1800/rules.mk (100%) rename keyboards/{ => tkc}/tkc1800/tkc1800.c (100%) rename keyboards/{ => tkc}/tkc1800/tkc1800.h (100%) delete mode 100644 keyboards/tkc1800/keymaps/via/config.h diff --git a/keyboards/m0lly/keymaps/via/config.h b/keyboards/m0lly/keymaps/via/config.h deleted file mode 100644 index 579212d4a3a0..000000000000 --- a/keyboards/m0lly/keymaps/via/config.h +++ /dev/null @@ -1 +0,0 @@ -#define DYNAMIC_KEYMAP_LAYER_COUNT 2 diff --git a/keyboards/candybar/bootloader_defs.h b/keyboards/tkc/candybar/bootloader_defs.h similarity index 100% rename from keyboards/candybar/bootloader_defs.h rename to keyboards/tkc/candybar/bootloader_defs.h diff --git a/keyboards/candybar/chconf.h b/keyboards/tkc/candybar/chconf.h similarity index 100% rename from keyboards/candybar/chconf.h rename to keyboards/tkc/candybar/chconf.h diff --git a/keyboards/candybar/halconf.h b/keyboards/tkc/candybar/halconf.h similarity index 100% rename from keyboards/candybar/halconf.h rename to keyboards/tkc/candybar/halconf.h diff --git a/keyboards/candybar/lefty/config.h b/keyboards/tkc/candybar/lefty/config.h similarity index 100% rename from keyboards/candybar/lefty/config.h rename to keyboards/tkc/candybar/lefty/config.h diff --git a/keyboards/candybar/lefty/info.json b/keyboards/tkc/candybar/lefty/info.json similarity index 100% rename from keyboards/candybar/lefty/info.json rename to keyboards/tkc/candybar/lefty/info.json diff --git a/keyboards/candybar/lefty/keymaps/default/keymap.c b/keyboards/tkc/candybar/lefty/keymaps/default/keymap.c similarity index 100% rename from keyboards/candybar/lefty/keymaps/default/keymap.c rename to keyboards/tkc/candybar/lefty/keymaps/default/keymap.c diff --git a/keyboards/candybar/lefty/keymaps/via/keymap.c b/keyboards/tkc/candybar/lefty/keymaps/via/keymap.c similarity index 62% rename from keyboards/candybar/lefty/keymaps/via/keymap.c rename to keyboards/tkc/candybar/lefty/keymaps/via/keymap.c index 153fd99c507e..fd927195b224 100644 --- a/keyboards/candybar/lefty/keymaps/via/keymap.c +++ b/keyboards/tkc/candybar/lefty/keymaps/via/keymap.c @@ -18,6 +18,8 @@ #define _BL 0 #define _FL 1 +#define _AL 2 +#define _LL 3 const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Keymap _BL: Base Layer (Default Layer) @@ -35,4 +37,16 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_P4 , KC_P5, KC_P6 , KC_VOLD, KC_TAB , KC_A , KC_SLCK, KC_D, KC_F , KC_G , KC_H, KC_J , KC_K , KC_L , KC_QUOT, KC_BSLS , \ KC_P1 , KC_P2, KC_P3 , KC_PEQL, KC_LSFT, KC_Z , KC_X, KC_CAPS, KC_V , KC_B, KC_NLCK, KC_M , KC_COMM, KC_DOT , KC_SLSH, KC_PGUP , \ KC_END, KC_P0, KC_PDOT, KC_PENT, KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_SPC , KC_BSPC, KC_APP , MO(_FL), KC_HOME, KC_PGDN), + + [_AL] = LAYOUT( + KC_P7 , KC_P8, KC_P9 , KC_VOLU, RESET , KC_Q , KC_W , KC_E, KC_R , KC_T , KC_Y, KC_U , KC_I , KC_LBRC, KC_RBRC, KC_INS , KC_BSPC , \ + KC_P4 , KC_P5, KC_P6 , KC_VOLD, KC_TAB , KC_A , KC_SLCK, KC_D, KC_F , KC_G , KC_H, KC_J , KC_K , KC_L , KC_QUOT, KC_BSLS , \ + KC_P1 , KC_P2, KC_P3 , KC_PEQL, KC_LSFT, KC_Z , KC_X, KC_CAPS, KC_V , KC_B, KC_NLCK, KC_M , KC_COMM, KC_DOT , KC_SLSH, KC_PGUP , \ + KC_END, KC_P0, KC_PDOT, KC_PENT, KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_SPC , KC_BSPC, KC_APP , MO(_FL), KC_HOME, KC_PGDN), + + [_LL] = LAYOUT( + KC_P7 , KC_P8, KC_P9 , KC_VOLU, RESET , KC_Q , KC_W , KC_E, KC_R , KC_T , KC_Y, KC_U , KC_I , KC_LBRC, KC_RBRC, KC_INS , KC_BSPC , \ + KC_P4 , KC_P5, KC_P6 , KC_VOLD, KC_TAB , KC_A , KC_SLCK, KC_D, KC_F , KC_G , KC_H, KC_J , KC_K , KC_L , KC_QUOT, KC_BSLS , \ + KC_P1 , KC_P2, KC_P3 , KC_PEQL, KC_LSFT, KC_Z , KC_X, KC_CAPS, KC_V , KC_B, KC_NLCK, KC_M , KC_COMM, KC_DOT , KC_SLSH, KC_PGUP , \ + KC_END, KC_P0, KC_PDOT, KC_PENT, KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_SPC , KC_BSPC, KC_APP , MO(_FL), KC_HOME, KC_PGDN), }; diff --git a/keyboards/candybar/lefty/keymaps/via/rules.mk b/keyboards/tkc/candybar/lefty/keymaps/via/rules.mk similarity index 100% rename from keyboards/candybar/lefty/keymaps/via/rules.mk rename to keyboards/tkc/candybar/lefty/keymaps/via/rules.mk diff --git a/keyboards/candybar/lefty/lefty.c b/keyboards/tkc/candybar/lefty/lefty.c similarity index 100% rename from keyboards/candybar/lefty/lefty.c rename to keyboards/tkc/candybar/lefty/lefty.c diff --git a/keyboards/candybar/lefty/lefty.h b/keyboards/tkc/candybar/lefty/lefty.h similarity index 100% rename from keyboards/candybar/lefty/lefty.h rename to keyboards/tkc/candybar/lefty/lefty.h diff --git a/keyboards/candybar/lefty/readme.md b/keyboards/tkc/candybar/lefty/readme.md similarity index 94% rename from keyboards/candybar/lefty/readme.md rename to keyboards/tkc/candybar/lefty/readme.md index 5954720679ba..75ca1cbd80df 100644 --- a/keyboards/candybar/lefty/readme.md +++ b/keyboards/tkc/candybar/lefty/readme.md @@ -10,6 +10,6 @@ The Key Company Candybar is a staggered 40% board with a numpad utilizing the ST Make example for this keyboard (after setting up your build environment): - make candybar/lefty:default:dfu-util + make tkc/candybar/lefty:default:dfu-util 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/candybar/lefty/rules.mk b/keyboards/tkc/candybar/lefty/rules.mk similarity index 100% rename from keyboards/candybar/lefty/rules.mk rename to keyboards/tkc/candybar/lefty/rules.mk diff --git a/keyboards/candybar/mcuconf.h b/keyboards/tkc/candybar/mcuconf.h similarity index 100% rename from keyboards/candybar/mcuconf.h rename to keyboards/tkc/candybar/mcuconf.h diff --git a/keyboards/candybar/righty/config.h b/keyboards/tkc/candybar/righty/config.h similarity index 100% rename from keyboards/candybar/righty/config.h rename to keyboards/tkc/candybar/righty/config.h diff --git a/keyboards/candybar/righty/info.json b/keyboards/tkc/candybar/righty/info.json similarity index 100% rename from keyboards/candybar/righty/info.json rename to keyboards/tkc/candybar/righty/info.json diff --git a/keyboards/candybar/righty/keymaps/default/keymap.c b/keyboards/tkc/candybar/righty/keymaps/default/keymap.c similarity index 100% rename from keyboards/candybar/righty/keymaps/default/keymap.c rename to keyboards/tkc/candybar/righty/keymaps/default/keymap.c diff --git a/keyboards/candybar/righty/keymaps/via/keymap.c b/keyboards/tkc/candybar/righty/keymaps/via/keymap.c similarity index 65% rename from keyboards/candybar/righty/keymaps/via/keymap.c rename to keyboards/tkc/candybar/righty/keymaps/via/keymap.c index 8f4cc08c7467..fb8ac93d464c 100644 --- a/keyboards/candybar/righty/keymaps/via/keymap.c +++ b/keyboards/tkc/candybar/righty/keymaps/via/keymap.c @@ -18,6 +18,8 @@ #define _BL 0 #define _FL 1 +#define _AL 2 +#define _LL 3 const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Keymap _BL: Base Layer (Default Layer) @@ -35,4 +37,16 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TAB,KC_A,KC_SLCK,KC_D,KC_F,KC_G,KC_H,KC_J,KC_K,KC_L,KC_QUOT,KC_BSLS,KC_P4,KC_P5,KC_P6,KC_VOLD, \ KC_LSFT,KC_Z,KC_X,KC_CAPS,KC_V,KC_B,KC_NLCK,KC_M,KC_COMM,KC_DOT,KC_SLSH,KC_PGUP,KC_P1,KC_P2,KC_P3,KC_PEQL, \ KC_LCTL,KC_LGUI,KC_LALT,KC_SPC,KC_SPC,KC_BSPC,KC_APP,MO(_FL),KC_HOME,KC_PGDN,KC_END,KC_P0,KC_PDOT,KC_PENT), + + [_AL] = LAYOUT( + RESET,KC_Q,KC_W,KC_E,KC_R,KC_T,KC_Y,KC_U,KC_I,KC_LBRC,KC_RBRC,KC_INS,KC_BSPC,KC_P7,KC_P8,KC_P9,KC_VOLU, \ + KC_TAB,KC_A,KC_SLCK,KC_D,KC_F,KC_G,KC_H,KC_J,KC_K,KC_L,KC_QUOT,KC_BSLS,KC_P4,KC_P5,KC_P6,KC_VOLD, \ + KC_LSFT,KC_Z,KC_X,KC_CAPS,KC_V,KC_B,KC_NLCK,KC_M,KC_COMM,KC_DOT,KC_SLSH,KC_PGUP,KC_P1,KC_P2,KC_P3,KC_PEQL, \ + KC_LCTL,KC_LGUI,KC_LALT,KC_SPC,KC_SPC,KC_BSPC,KC_APP,MO(_FL),KC_HOME,KC_PGDN,KC_END,KC_P0,KC_PDOT,KC_PENT), + + [_LL] = LAYOUT( + RESET,KC_Q,KC_W,KC_E,KC_R,KC_T,KC_Y,KC_U,KC_I,KC_LBRC,KC_RBRC,KC_INS,KC_BSPC,KC_P7,KC_P8,KC_P9,KC_VOLU, \ + KC_TAB,KC_A,KC_SLCK,KC_D,KC_F,KC_G,KC_H,KC_J,KC_K,KC_L,KC_QUOT,KC_BSLS,KC_P4,KC_P5,KC_P6,KC_VOLD, \ + KC_LSFT,KC_Z,KC_X,KC_CAPS,KC_V,KC_B,KC_NLCK,KC_M,KC_COMM,KC_DOT,KC_SLSH,KC_PGUP,KC_P1,KC_P2,KC_P3,KC_PEQL, \ + KC_LCTL,KC_LGUI,KC_LALT,KC_SPC,KC_SPC,KC_BSPC,KC_APP,MO(_FL),KC_HOME,KC_PGDN,KC_END,KC_P0,KC_PDOT,KC_PENT), }; diff --git a/keyboards/candybar/righty/keymaps/via/rules.mk b/keyboards/tkc/candybar/righty/keymaps/via/rules.mk similarity index 100% rename from keyboards/candybar/righty/keymaps/via/rules.mk rename to keyboards/tkc/candybar/righty/keymaps/via/rules.mk diff --git a/keyboards/candybar/righty/readme.md b/keyboards/tkc/candybar/righty/readme.md similarity index 94% rename from keyboards/candybar/righty/readme.md rename to keyboards/tkc/candybar/righty/readme.md index d3aa867303b0..4e2a0f8474e8 100644 --- a/keyboards/candybar/righty/readme.md +++ b/keyboards/tkc/candybar/righty/readme.md @@ -10,6 +10,6 @@ The Key Company Candybar is a staggered 40% board with a numpad utilizing the ST Make example for this keyboard (after setting up your build environment): - make candybar/righty:default:dfu-util + make tkc/candybar/righty:default:dfu-util 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/candybar/righty/righty.c b/keyboards/tkc/candybar/righty/righty.c similarity index 100% rename from keyboards/candybar/righty/righty.c rename to keyboards/tkc/candybar/righty/righty.c diff --git a/keyboards/candybar/righty/righty.h b/keyboards/tkc/candybar/righty/righty.h similarity index 100% rename from keyboards/candybar/righty/righty.h rename to keyboards/tkc/candybar/righty/righty.h diff --git a/keyboards/candybar/righty/rules.mk b/keyboards/tkc/candybar/righty/rules.mk similarity index 100% rename from keyboards/candybar/righty/rules.mk rename to keyboards/tkc/candybar/righty/rules.mk diff --git a/keyboards/m0lly/README.md b/keyboards/tkc/m0lly/README.md similarity index 96% rename from keyboards/m0lly/README.md rename to keyboards/tkc/m0lly/README.md index e0c8b45d95f0..9af80c7e9877 100644 --- a/keyboards/m0lly/README.md +++ b/keyboards/tkc/m0lly/README.md @@ -12,6 +12,6 @@ Hardware Availability: [TheKey.Company](https://thekey.company) Make example for this keyboard (after setting up your build environment): - make m0lly:default + make tkc/m0lly: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/m0lly/config.h b/keyboards/tkc/m0lly/config.h similarity index 100% rename from keyboards/m0lly/config.h rename to keyboards/tkc/m0lly/config.h diff --git a/keyboards/m0lly/info.json b/keyboards/tkc/m0lly/info.json similarity index 100% rename from keyboards/m0lly/info.json rename to keyboards/tkc/m0lly/info.json diff --git a/keyboards/m0lly/keymaps/default/keymap.c b/keyboards/tkc/m0lly/keymaps/default/keymap.c similarity index 100% rename from keyboards/m0lly/keymaps/default/keymap.c rename to keyboards/tkc/m0lly/keymaps/default/keymap.c diff --git a/keyboards/m0lly/keymaps/via/keymap.c b/keyboards/tkc/m0lly/keymaps/via/keymap.c similarity index 73% rename from keyboards/m0lly/keymaps/via/keymap.c rename to keyboards/tkc/m0lly/keymaps/via/keymap.c index 2e5900f16632..b72b8f035be0 100644 --- a/keyboards/m0lly/keymaps/via/keymap.c +++ b/keyboards/tkc/m0lly/keymaps/via/keymap.c @@ -21,6 +21,8 @@ enum { BASE = 0, FUNCTION, + ALTERNATE, + LAST, }; const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { @@ -66,6 +68,20 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { _______, XXXXXXX, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, BL_STEP, _______, _______, XXXXXXX, _______, _______, _______, XXXXXXX, _______, _______, _______, _______, _______, _______, MO(FUNCTION), _______, _______, XXXXXXX, _______, _______ ), + [ALTERNATE] = LAYOUT_all( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET, XXXXXXX, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, XXXXXXX, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, XXXXXXX, _______, _______, _______, _______, _______, + _______, XXXXXXX, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, BL_STEP, _______, _______, XXXXXXX, _______, _______, _______, XXXXXXX, + _______, _______, _______, _______, _______, _______, MO(FUNCTION), _______, _______, XXXXXXX, _______, _______ + ), + [LAST] = LAYOUT_all( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET, XXXXXXX, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, XXXXXXX, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, XXXXXXX, _______, _______, _______, _______, _______, + _______, XXXXXXX, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, BL_STEP, _______, _______, XXXXXXX, _______, _______, _______, XXXXXXX, + _______, _______, _______, _______, _______, _______, MO(FUNCTION), _______, _______, XXXXXXX, _______, _______ + ), }; #ifdef OLED_DRIVER_ENABLE @@ -80,6 +96,12 @@ void oled_task_user(void) { break; case FUNCTION: oled_write_P(PSTR("Function\n"), false); + break; + case ALTERNATE: + oled_write_P(PSTR("Alternate\n"), false); + break; + case LAST: + oled_write_P(PSTR("Last\n"), false); break; default: // Or use the write_ln shortcut over adding '\n' to the end of your string diff --git a/keyboards/m0lly/keymaps/via/rules.mk b/keyboards/tkc/m0lly/keymaps/via/rules.mk similarity index 100% rename from keyboards/m0lly/keymaps/via/rules.mk rename to keyboards/tkc/m0lly/keymaps/via/rules.mk diff --git a/keyboards/m0lly/m0lly.c b/keyboards/tkc/m0lly/m0lly.c similarity index 100% rename from keyboards/m0lly/m0lly.c rename to keyboards/tkc/m0lly/m0lly.c diff --git a/keyboards/m0lly/m0lly.h b/keyboards/tkc/m0lly/m0lly.h similarity index 100% rename from keyboards/m0lly/m0lly.h rename to keyboards/tkc/m0lly/m0lly.h diff --git a/keyboards/m0lly/rules.mk b/keyboards/tkc/m0lly/rules.mk similarity index 100% rename from keyboards/m0lly/rules.mk rename to keyboards/tkc/m0lly/rules.mk diff --git a/keyboards/tkc1800/README.md b/keyboards/tkc/tkc1800/README.md similarity index 96% rename from keyboards/tkc1800/README.md rename to keyboards/tkc/tkc1800/README.md index e154770d72f3..5382b91b3c68 100644 --- a/keyboards/tkc1800/README.md +++ b/keyboards/tkc/tkc1800/README.md @@ -12,6 +12,6 @@ Hardware Availability: [TheKey.Company](https://thekey.company/collections/tkc-1 Make example for this keyboard (after setting up your build environment): - make tkc1800:default + make tkc/tkc1800: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/tkc1800/config.h b/keyboards/tkc/tkc1800/config.h similarity index 100% rename from keyboards/tkc1800/config.h rename to keyboards/tkc/tkc1800/config.h diff --git a/keyboards/tkc1800/info.json b/keyboards/tkc/tkc1800/info.json similarity index 100% rename from keyboards/tkc1800/info.json rename to keyboards/tkc/tkc1800/info.json diff --git a/keyboards/tkc1800/keymaps/default/keymap.c b/keyboards/tkc/tkc1800/keymaps/default/keymap.c similarity index 100% rename from keyboards/tkc1800/keymaps/default/keymap.c rename to keyboards/tkc/tkc1800/keymaps/default/keymap.c diff --git a/keyboards/tkc1800/keymaps/smt/keymap.c b/keyboards/tkc/tkc1800/keymaps/smt/keymap.c similarity index 100% rename from keyboards/tkc1800/keymaps/smt/keymap.c rename to keyboards/tkc/tkc1800/keymaps/smt/keymap.c diff --git a/keyboards/tkc1800/keymaps/via/keymap.c b/keyboards/tkc/tkc1800/keymaps/via/keymap.c similarity index 72% rename from keyboards/tkc1800/keymaps/via/keymap.c rename to keyboards/tkc/tkc1800/keymaps/via/keymap.c index 76fdf054064e..55c2874c6291 100644 --- a/keyboards/tkc1800/keymaps/via/keymap.c +++ b/keyboards/tkc/tkc1800/keymaps/via/keymap.c @@ -20,6 +20,8 @@ enum { BASE = 0, FUNCTION, + ALTERNATE, + LAST, }; const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { @@ -75,6 +77,24 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { _______, XXXXXXX, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, BL_STEP, _______, _______, _______, _______, _______, _______, XXXXXXX, \ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ ), + [ALTERNATE] = LAYOUT( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET, XXXXXXX, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, XXXXXXX, _______, _______, _______, _______, _______, \ + _______, XXXXXXX, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, BL_STEP, _______, _______, _______, _______, _______, _______, XXXXXXX, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ + ), + [LAST] = LAYOUT( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET, XXXXXXX, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, XXXXXXX, _______, _______, _______, _______, _______, \ + _______, XXXXXXX, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, BL_STEP, _______, _______, _______, _______, _______, _______, XXXXXXX, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ + ), }; #ifdef OLED_DRIVER_ENABLE @@ -89,6 +109,12 @@ void oled_task_user(void) { break; case FUNCTION: oled_write_P(PSTR("Function\n"), false); + break; + case ALTERNATE: + oled_write_P(PSTR("Alternate\n"), false); + break; + case LAST: + oled_write_P(PSTR("Last\n"), false); break; default: // Or use the write_ln shortcut over adding '\n' to the end of your string diff --git a/keyboards/tkc1800/keymaps/via/rules.mk b/keyboards/tkc/tkc1800/keymaps/via/rules.mk similarity index 100% rename from keyboards/tkc1800/keymaps/via/rules.mk rename to keyboards/tkc/tkc1800/keymaps/via/rules.mk diff --git a/keyboards/tkc1800/keymaps/wkl/keymap.c b/keyboards/tkc/tkc1800/keymaps/wkl/keymap.c similarity index 100% rename from keyboards/tkc1800/keymaps/wkl/keymap.c rename to keyboards/tkc/tkc1800/keymaps/wkl/keymap.c diff --git a/keyboards/tkc1800/keymaps/yanfali/keymap.c b/keyboards/tkc/tkc1800/keymaps/yanfali/keymap.c similarity index 100% rename from keyboards/tkc1800/keymaps/yanfali/keymap.c rename to keyboards/tkc/tkc1800/keymaps/yanfali/keymap.c diff --git a/keyboards/tkc1800/keymaps/yanfali/rules.mk b/keyboards/tkc/tkc1800/keymaps/yanfali/rules.mk similarity index 100% rename from keyboards/tkc1800/keymaps/yanfali/rules.mk rename to keyboards/tkc/tkc1800/keymaps/yanfali/rules.mk diff --git a/keyboards/tkc1800/rules.mk b/keyboards/tkc/tkc1800/rules.mk similarity index 100% rename from keyboards/tkc1800/rules.mk rename to keyboards/tkc/tkc1800/rules.mk diff --git a/keyboards/tkc1800/tkc1800.c b/keyboards/tkc/tkc1800/tkc1800.c similarity index 100% rename from keyboards/tkc1800/tkc1800.c rename to keyboards/tkc/tkc1800/tkc1800.c diff --git a/keyboards/tkc1800/tkc1800.h b/keyboards/tkc/tkc1800/tkc1800.h similarity index 100% rename from keyboards/tkc1800/tkc1800.h rename to keyboards/tkc/tkc1800/tkc1800.h diff --git a/keyboards/tkc1800/keymaps/via/config.h b/keyboards/tkc1800/keymaps/via/config.h deleted file mode 100644 index 579212d4a3a0..000000000000 --- a/keyboards/tkc1800/keymaps/via/config.h +++ /dev/null @@ -1 +0,0 @@ -#define DYNAMIC_KEYMAP_LAYER_COUNT 2 diff --git a/quantum/dynamic_keymap.c b/quantum/dynamic_keymap.c index 10d8c9eb661e..27ee6a284055 100644 --- a/quantum/dynamic_keymap.c +++ b/quantum/dynamic_keymap.c @@ -35,7 +35,11 @@ // 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 +# if defined(__AVR_AT90USB646__) || defined(__AVR_AT90USB647__) || defined(__AVR_AT90USB1286__) || defined(__AVR_AT90USB1287__) +# define DYNAMIC_KEYMAP_EEPROM_MAX_ADDR 2047 +# else +# define DYNAMIC_KEYMAP_EEPROM_MAX_ADDR 1023 +# endif #endif // If DYNAMIC_KEYMAP_EEPROM_ADDR not explicitly defined in config.h, From 200444f8d2c12ac04fd081745c74020c92d5da16 Mon Sep 17 00:00:00 2001 From: flehrad <20124416+flehrad@users.noreply.github.com> Date: Fri, 31 Jul 2020 08:04:49 +1000 Subject: [PATCH 675/930] [Keyboard] relocating boards by flehrad (#9635) Co-authored-by: flehrad --- keyboards/{ => flehrad}/bigswitch/README.md | 2 ++ keyboards/{ => flehrad}/bigswitch/bigswitch.c | 0 keyboards/{ => flehrad}/bigswitch/bigswitch.h | 0 keyboards/{ => flehrad}/bigswitch/config.h | 0 keyboards/{ => flehrad}/bigswitch/info.json | 0 keyboards/{ => flehrad}/bigswitch/keymaps/333fred/config.h | 0 keyboards/{ => flehrad}/bigswitch/keymaps/333fred/keymap.c | 0 keyboards/{ => flehrad}/bigswitch/keymaps/333fred/rules.mk | 0 keyboards/{ => flehrad}/bigswitch/keymaps/default/keymap.c | 0 keyboards/{ => flehrad}/bigswitch/keymaps/wanleg/config.h | 0 keyboards/{ => flehrad}/bigswitch/keymaps/wanleg/keymap.c | 0 keyboards/{ => flehrad}/bigswitch/keymaps/wanleg/rules.mk | 0 keyboards/{ => flehrad}/bigswitch/rules.mk | 0 keyboards/{handwired => flehrad}/downbubble/config.h | 0 keyboards/{handwired => flehrad}/downbubble/downbubble.c | 0 keyboards/{handwired => flehrad}/downbubble/downbubble.h | 0 keyboards/{handwired => flehrad}/downbubble/info.json | 0 .../{handwired => flehrad}/downbubble/keymaps/default/config.h | 0 .../{handwired => flehrad}/downbubble/keymaps/default/keymap.c | 0 .../{handwired => flehrad}/downbubble/keymaps/default/readme.md | 0 keyboards/{handwired => flehrad}/downbubble/license | 0 keyboards/{handwired => flehrad}/downbubble/readme.md | 2 +- keyboards/{handwired => flehrad}/downbubble/rules.mk | 0 keyboards/{handwired => flehrad}/numbrero/config.h | 0 keyboards/{handwired => flehrad}/numbrero/info.json | 0 .../{handwired => flehrad}/numbrero/keymaps/default/keymap.c | 0 keyboards/{handwired => flehrad}/numbrero/license | 0 keyboards/{handwired => flehrad}/numbrero/numbrero.c | 0 keyboards/{handwired => flehrad}/numbrero/numbrero.h | 0 keyboards/{handwired => flehrad}/numbrero/readme.md | 2 +- keyboards/{handwired => flehrad}/numbrero/rules.mk | 0 keyboards/{ => flehrad}/snagpad/config.h | 0 keyboards/{ => flehrad}/snagpad/info.json | 0 keyboards/{ => flehrad}/snagpad/keymaps/default/keymap.c | 0 keyboards/{ => flehrad}/snagpad/keymaps/via/keymap.c | 0 keyboards/{ => flehrad}/snagpad/keymaps/via/rules.mk | 0 keyboards/{handwired/tradestation => flehrad/snagpad}/license | 0 keyboards/{ => flehrad}/snagpad/readme.md | 2 +- keyboards/{ => flehrad}/snagpad/rules.mk | 0 keyboards/{ => flehrad}/snagpad/snagpad.c | 0 keyboards/{ => flehrad}/snagpad/snagpad.h | 0 keyboards/{handwired => flehrad}/tradestation/config.h | 0 keyboards/{handwired => flehrad}/tradestation/info.json | 0 .../tradestation/keymaps/default/keymap.c | 0 keyboards/{snagpad => flehrad/tradestation}/license | 0 keyboards/{handwired => flehrad}/tradestation/readme.md | 2 +- keyboards/{handwired => flehrad}/tradestation/rules.mk | 0 keyboards/{handwired => flehrad}/tradestation/tradestation.c | 0 keyboards/{handwired => flehrad}/tradestation/tradestation.h | 0 49 files changed, 6 insertions(+), 4 deletions(-) rename keyboards/{ => flehrad}/bigswitch/README.md (93%) rename keyboards/{ => flehrad}/bigswitch/bigswitch.c (100%) rename keyboards/{ => flehrad}/bigswitch/bigswitch.h (100%) mode change 100755 => 100644 rename keyboards/{ => flehrad}/bigswitch/config.h (100%) mode change 100755 => 100644 rename keyboards/{ => flehrad}/bigswitch/info.json (100%) rename keyboards/{ => flehrad}/bigswitch/keymaps/333fred/config.h (100%) rename keyboards/{ => flehrad}/bigswitch/keymaps/333fred/keymap.c (100%) rename keyboards/{ => flehrad}/bigswitch/keymaps/333fred/rules.mk (100%) rename keyboards/{ => flehrad}/bigswitch/keymaps/default/keymap.c (100%) mode change 100755 => 100644 rename keyboards/{ => flehrad}/bigswitch/keymaps/wanleg/config.h (100%) rename keyboards/{ => flehrad}/bigswitch/keymaps/wanleg/keymap.c (100%) rename keyboards/{ => flehrad}/bigswitch/keymaps/wanleg/rules.mk (100%) rename keyboards/{ => flehrad}/bigswitch/rules.mk (100%) mode change 100755 => 100644 rename keyboards/{handwired => flehrad}/downbubble/config.h (100%) rename keyboards/{handwired => flehrad}/downbubble/downbubble.c (100%) rename keyboards/{handwired => flehrad}/downbubble/downbubble.h (100%) rename keyboards/{handwired => flehrad}/downbubble/info.json (100%) rename keyboards/{handwired => flehrad}/downbubble/keymaps/default/config.h (100%) rename keyboards/{handwired => flehrad}/downbubble/keymaps/default/keymap.c (100%) rename keyboards/{handwired => flehrad}/downbubble/keymaps/default/readme.md (100%) rename keyboards/{handwired => flehrad}/downbubble/license (100%) rename keyboards/{handwired => flehrad}/downbubble/readme.md (95%) rename keyboards/{handwired => flehrad}/downbubble/rules.mk (100%) rename keyboards/{handwired => flehrad}/numbrero/config.h (100%) rename keyboards/{handwired => flehrad}/numbrero/info.json (100%) rename keyboards/{handwired => flehrad}/numbrero/keymaps/default/keymap.c (100%) rename keyboards/{handwired => flehrad}/numbrero/license (100%) rename keyboards/{handwired => flehrad}/numbrero/numbrero.c (100%) rename keyboards/{handwired => flehrad}/numbrero/numbrero.h (100%) rename keyboards/{handwired => flehrad}/numbrero/readme.md (94%) rename keyboards/{handwired => flehrad}/numbrero/rules.mk (100%) rename keyboards/{ => flehrad}/snagpad/config.h (100%) rename keyboards/{ => flehrad}/snagpad/info.json (100%) rename keyboards/{ => flehrad}/snagpad/keymaps/default/keymap.c (100%) rename keyboards/{ => flehrad}/snagpad/keymaps/via/keymap.c (100%) rename keyboards/{ => flehrad}/snagpad/keymaps/via/rules.mk (100%) rename keyboards/{handwired/tradestation => flehrad/snagpad}/license (100%) rename keyboards/{ => flehrad}/snagpad/readme.md (97%) rename keyboards/{ => flehrad}/snagpad/rules.mk (100%) rename keyboards/{ => flehrad}/snagpad/snagpad.c (100%) rename keyboards/{ => flehrad}/snagpad/snagpad.h (100%) rename keyboards/{handwired => flehrad}/tradestation/config.h (100%) rename keyboards/{handwired => flehrad}/tradestation/info.json (100%) rename keyboards/{handwired => flehrad}/tradestation/keymaps/default/keymap.c (100%) rename keyboards/{snagpad => flehrad/tradestation}/license (100%) rename keyboards/{handwired => flehrad}/tradestation/readme.md (97%) rename keyboards/{handwired => flehrad}/tradestation/rules.mk (100%) rename keyboards/{handwired => flehrad}/tradestation/tradestation.c (100%) rename keyboards/{handwired => flehrad}/tradestation/tradestation.h (100%) diff --git a/keyboards/bigswitch/README.md b/keyboards/flehrad/bigswitch/README.md similarity index 93% rename from keyboards/bigswitch/README.md rename to keyboards/flehrad/bigswitch/README.md index 65213af7c4bc..1a0fb155a792 100644 --- a/keyboards/bigswitch/README.md +++ b/keyboards/flehrad/bigswitch/README.md @@ -7,6 +7,8 @@ Designed by Don of the Board Podcast and sold as a kit by [keeb.io](https://keeb https://github.com/flehrad/Big-Switch-PCB +make: flehrad/bigswitch:default + ### Technical Specifications * Uses a atmega32u4 pro micro or pin compatible MCU diff --git a/keyboards/bigswitch/bigswitch.c b/keyboards/flehrad/bigswitch/bigswitch.c similarity index 100% rename from keyboards/bigswitch/bigswitch.c rename to keyboards/flehrad/bigswitch/bigswitch.c diff --git a/keyboards/bigswitch/bigswitch.h b/keyboards/flehrad/bigswitch/bigswitch.h old mode 100755 new mode 100644 similarity index 100% rename from keyboards/bigswitch/bigswitch.h rename to keyboards/flehrad/bigswitch/bigswitch.h diff --git a/keyboards/bigswitch/config.h b/keyboards/flehrad/bigswitch/config.h old mode 100755 new mode 100644 similarity index 100% rename from keyboards/bigswitch/config.h rename to keyboards/flehrad/bigswitch/config.h diff --git a/keyboards/bigswitch/info.json b/keyboards/flehrad/bigswitch/info.json similarity index 100% rename from keyboards/bigswitch/info.json rename to keyboards/flehrad/bigswitch/info.json diff --git a/keyboards/bigswitch/keymaps/333fred/config.h b/keyboards/flehrad/bigswitch/keymaps/333fred/config.h similarity index 100% rename from keyboards/bigswitch/keymaps/333fred/config.h rename to keyboards/flehrad/bigswitch/keymaps/333fred/config.h diff --git a/keyboards/bigswitch/keymaps/333fred/keymap.c b/keyboards/flehrad/bigswitch/keymaps/333fred/keymap.c similarity index 100% rename from keyboards/bigswitch/keymaps/333fred/keymap.c rename to keyboards/flehrad/bigswitch/keymaps/333fred/keymap.c diff --git a/keyboards/bigswitch/keymaps/333fred/rules.mk b/keyboards/flehrad/bigswitch/keymaps/333fred/rules.mk similarity index 100% rename from keyboards/bigswitch/keymaps/333fred/rules.mk rename to keyboards/flehrad/bigswitch/keymaps/333fred/rules.mk diff --git a/keyboards/bigswitch/keymaps/default/keymap.c b/keyboards/flehrad/bigswitch/keymaps/default/keymap.c old mode 100755 new mode 100644 similarity index 100% rename from keyboards/bigswitch/keymaps/default/keymap.c rename to keyboards/flehrad/bigswitch/keymaps/default/keymap.c diff --git a/keyboards/bigswitch/keymaps/wanleg/config.h b/keyboards/flehrad/bigswitch/keymaps/wanleg/config.h similarity index 100% rename from keyboards/bigswitch/keymaps/wanleg/config.h rename to keyboards/flehrad/bigswitch/keymaps/wanleg/config.h diff --git a/keyboards/bigswitch/keymaps/wanleg/keymap.c b/keyboards/flehrad/bigswitch/keymaps/wanleg/keymap.c similarity index 100% rename from keyboards/bigswitch/keymaps/wanleg/keymap.c rename to keyboards/flehrad/bigswitch/keymaps/wanleg/keymap.c diff --git a/keyboards/bigswitch/keymaps/wanleg/rules.mk b/keyboards/flehrad/bigswitch/keymaps/wanleg/rules.mk similarity index 100% rename from keyboards/bigswitch/keymaps/wanleg/rules.mk rename to keyboards/flehrad/bigswitch/keymaps/wanleg/rules.mk diff --git a/keyboards/bigswitch/rules.mk b/keyboards/flehrad/bigswitch/rules.mk old mode 100755 new mode 100644 similarity index 100% rename from keyboards/bigswitch/rules.mk rename to keyboards/flehrad/bigswitch/rules.mk diff --git a/keyboards/handwired/downbubble/config.h b/keyboards/flehrad/downbubble/config.h similarity index 100% rename from keyboards/handwired/downbubble/config.h rename to keyboards/flehrad/downbubble/config.h diff --git a/keyboards/handwired/downbubble/downbubble.c b/keyboards/flehrad/downbubble/downbubble.c similarity index 100% rename from keyboards/handwired/downbubble/downbubble.c rename to keyboards/flehrad/downbubble/downbubble.c diff --git a/keyboards/handwired/downbubble/downbubble.h b/keyboards/flehrad/downbubble/downbubble.h similarity index 100% rename from keyboards/handwired/downbubble/downbubble.h rename to keyboards/flehrad/downbubble/downbubble.h diff --git a/keyboards/handwired/downbubble/info.json b/keyboards/flehrad/downbubble/info.json similarity index 100% rename from keyboards/handwired/downbubble/info.json rename to keyboards/flehrad/downbubble/info.json diff --git a/keyboards/handwired/downbubble/keymaps/default/config.h b/keyboards/flehrad/downbubble/keymaps/default/config.h similarity index 100% rename from keyboards/handwired/downbubble/keymaps/default/config.h rename to keyboards/flehrad/downbubble/keymaps/default/config.h diff --git a/keyboards/handwired/downbubble/keymaps/default/keymap.c b/keyboards/flehrad/downbubble/keymaps/default/keymap.c similarity index 100% rename from keyboards/handwired/downbubble/keymaps/default/keymap.c rename to keyboards/flehrad/downbubble/keymaps/default/keymap.c diff --git a/keyboards/handwired/downbubble/keymaps/default/readme.md b/keyboards/flehrad/downbubble/keymaps/default/readme.md similarity index 100% rename from keyboards/handwired/downbubble/keymaps/default/readme.md rename to keyboards/flehrad/downbubble/keymaps/default/readme.md diff --git a/keyboards/handwired/downbubble/license b/keyboards/flehrad/downbubble/license similarity index 100% rename from keyboards/handwired/downbubble/license rename to keyboards/flehrad/downbubble/license diff --git a/keyboards/handwired/downbubble/readme.md b/keyboards/flehrad/downbubble/readme.md similarity index 95% rename from keyboards/handwired/downbubble/readme.md rename to keyboards/flehrad/downbubble/readme.md index e6623451277a..f1c83b8aa862 100644 --- a/keyboards/handwired/downbubble/readme.md +++ b/keyboards/flehrad/downbubble/readme.md @@ -10,6 +10,6 @@ Hardware Availability: The Board Podcast Slack Make example for this keyboard (after setting up your build environment): - make downbubble:default + make flehrad/downbubble: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/downbubble/rules.mk b/keyboards/flehrad/downbubble/rules.mk similarity index 100% rename from keyboards/handwired/downbubble/rules.mk rename to keyboards/flehrad/downbubble/rules.mk diff --git a/keyboards/handwired/numbrero/config.h b/keyboards/flehrad/numbrero/config.h similarity index 100% rename from keyboards/handwired/numbrero/config.h rename to keyboards/flehrad/numbrero/config.h diff --git a/keyboards/handwired/numbrero/info.json b/keyboards/flehrad/numbrero/info.json similarity index 100% rename from keyboards/handwired/numbrero/info.json rename to keyboards/flehrad/numbrero/info.json diff --git a/keyboards/handwired/numbrero/keymaps/default/keymap.c b/keyboards/flehrad/numbrero/keymaps/default/keymap.c similarity index 100% rename from keyboards/handwired/numbrero/keymaps/default/keymap.c rename to keyboards/flehrad/numbrero/keymaps/default/keymap.c diff --git a/keyboards/handwired/numbrero/license b/keyboards/flehrad/numbrero/license similarity index 100% rename from keyboards/handwired/numbrero/license rename to keyboards/flehrad/numbrero/license diff --git a/keyboards/handwired/numbrero/numbrero.c b/keyboards/flehrad/numbrero/numbrero.c similarity index 100% rename from keyboards/handwired/numbrero/numbrero.c rename to keyboards/flehrad/numbrero/numbrero.c diff --git a/keyboards/handwired/numbrero/numbrero.h b/keyboards/flehrad/numbrero/numbrero.h similarity index 100% rename from keyboards/handwired/numbrero/numbrero.h rename to keyboards/flehrad/numbrero/numbrero.h diff --git a/keyboards/handwired/numbrero/readme.md b/keyboards/flehrad/numbrero/readme.md similarity index 94% rename from keyboards/handwired/numbrero/readme.md rename to keyboards/flehrad/numbrero/readme.md index 931c601274fa..823a81fbef39 100644 --- a/keyboards/handwired/numbrero/readme.md +++ b/keyboards/flehrad/numbrero/readme.md @@ -8,6 +8,6 @@ Hardware Availability: The Board Podcast Slack Make example for this keyboard (after setting up your build environment): - make handwired/numbrero:default + make flehrad/numbrero: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/numbrero/rules.mk b/keyboards/flehrad/numbrero/rules.mk similarity index 100% rename from keyboards/handwired/numbrero/rules.mk rename to keyboards/flehrad/numbrero/rules.mk diff --git a/keyboards/snagpad/config.h b/keyboards/flehrad/snagpad/config.h similarity index 100% rename from keyboards/snagpad/config.h rename to keyboards/flehrad/snagpad/config.h diff --git a/keyboards/snagpad/info.json b/keyboards/flehrad/snagpad/info.json similarity index 100% rename from keyboards/snagpad/info.json rename to keyboards/flehrad/snagpad/info.json diff --git a/keyboards/snagpad/keymaps/default/keymap.c b/keyboards/flehrad/snagpad/keymaps/default/keymap.c similarity index 100% rename from keyboards/snagpad/keymaps/default/keymap.c rename to keyboards/flehrad/snagpad/keymaps/default/keymap.c diff --git a/keyboards/snagpad/keymaps/via/keymap.c b/keyboards/flehrad/snagpad/keymaps/via/keymap.c similarity index 100% rename from keyboards/snagpad/keymaps/via/keymap.c rename to keyboards/flehrad/snagpad/keymaps/via/keymap.c diff --git a/keyboards/snagpad/keymaps/via/rules.mk b/keyboards/flehrad/snagpad/keymaps/via/rules.mk similarity index 100% rename from keyboards/snagpad/keymaps/via/rules.mk rename to keyboards/flehrad/snagpad/keymaps/via/rules.mk diff --git a/keyboards/handwired/tradestation/license b/keyboards/flehrad/snagpad/license similarity index 100% rename from keyboards/handwired/tradestation/license rename to keyboards/flehrad/snagpad/license diff --git a/keyboards/snagpad/readme.md b/keyboards/flehrad/snagpad/readme.md similarity index 97% rename from keyboards/snagpad/readme.md rename to keyboards/flehrad/snagpad/readme.md index b59bd758860d..cefd65e570f3 100644 --- a/keyboards/snagpad/readme.md +++ b/keyboards/flehrad/snagpad/readme.md @@ -8,7 +8,7 @@ Hardware Availability: [GitHub](https://github.com/flehrad/Snagpad) Make example for this keyboard (after setting up your build environment): - make snagpad:default + make flehrad/snagpad: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/snagpad/rules.mk b/keyboards/flehrad/snagpad/rules.mk similarity index 100% rename from keyboards/snagpad/rules.mk rename to keyboards/flehrad/snagpad/rules.mk diff --git a/keyboards/snagpad/snagpad.c b/keyboards/flehrad/snagpad/snagpad.c similarity index 100% rename from keyboards/snagpad/snagpad.c rename to keyboards/flehrad/snagpad/snagpad.c diff --git a/keyboards/snagpad/snagpad.h b/keyboards/flehrad/snagpad/snagpad.h similarity index 100% rename from keyboards/snagpad/snagpad.h rename to keyboards/flehrad/snagpad/snagpad.h diff --git a/keyboards/handwired/tradestation/config.h b/keyboards/flehrad/tradestation/config.h similarity index 100% rename from keyboards/handwired/tradestation/config.h rename to keyboards/flehrad/tradestation/config.h diff --git a/keyboards/handwired/tradestation/info.json b/keyboards/flehrad/tradestation/info.json similarity index 100% rename from keyboards/handwired/tradestation/info.json rename to keyboards/flehrad/tradestation/info.json diff --git a/keyboards/handwired/tradestation/keymaps/default/keymap.c b/keyboards/flehrad/tradestation/keymaps/default/keymap.c similarity index 100% rename from keyboards/handwired/tradestation/keymaps/default/keymap.c rename to keyboards/flehrad/tradestation/keymaps/default/keymap.c diff --git a/keyboards/snagpad/license b/keyboards/flehrad/tradestation/license similarity index 100% rename from keyboards/snagpad/license rename to keyboards/flehrad/tradestation/license diff --git a/keyboards/handwired/tradestation/readme.md b/keyboards/flehrad/tradestation/readme.md similarity index 97% rename from keyboards/handwired/tradestation/readme.md rename to keyboards/flehrad/tradestation/readme.md index 3a8c39e26327..d2a9c4d18d49 100644 --- a/keyboards/handwired/tradestation/readme.md +++ b/keyboards/flehrad/tradestation/readme.md @@ -22,6 +22,6 @@ Hardware Supported: Tradestation PCB, Pro Micro Make example for this keyboard (after setting up your build environment): - make tradestation:default + make flehrad/tradestation: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/tradestation/rules.mk b/keyboards/flehrad/tradestation/rules.mk similarity index 100% rename from keyboards/handwired/tradestation/rules.mk rename to keyboards/flehrad/tradestation/rules.mk diff --git a/keyboards/handwired/tradestation/tradestation.c b/keyboards/flehrad/tradestation/tradestation.c similarity index 100% rename from keyboards/handwired/tradestation/tradestation.c rename to keyboards/flehrad/tradestation/tradestation.c diff --git a/keyboards/handwired/tradestation/tradestation.h b/keyboards/flehrad/tradestation/tradestation.h similarity index 100% rename from keyboards/handwired/tradestation/tradestation.h rename to keyboards/flehrad/tradestation/tradestation.h From c990dc1e6cdcabbfe280d60e981f9e7cc733d5db Mon Sep 17 00:00:00 2001 From: Nick Brassel Date: Wed, 5 Aug 2020 15:11:06 +1000 Subject: [PATCH 676/930] Add support for hsv->rgb conversion without using CIE curve. (#9856) * Add support for hsv->rgb conversion without using CIE curve. * Modify anavi/macropad8 to disable unicode (was unused), otherwise firmware size is too large. --- keyboards/anavi/macropad8/rules.mk | 1 - quantum/color.c | 26 +++++++++++++++++++++++--- quantum/color.h | 1 + 3 files changed, 24 insertions(+), 4 deletions(-) diff --git a/keyboards/anavi/macropad8/rules.mk b/keyboards/anavi/macropad8/rules.mk index 498c27a209f0..d4443e3fe6ed 100644 --- a/keyboards/anavi/macropad8/rules.mk +++ b/keyboards/anavi/macropad8/rules.mk @@ -23,7 +23,6 @@ NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: ht BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality MIDI_ENABLE = no # MIDI controls AUDIO_ENABLE = no # Audio output on port C6 -UNICODE_ENABLE = yes # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. OLED_DRIVER_ENABLE = yes # Enable Support for SSD1306 or SH1106 OLED Displays; Communicating over I2C diff --git a/quantum/color.c b/quantum/color.c index c050300627ba..1c5128e4a2b0 100644 --- a/quantum/color.c +++ b/quantum/color.c @@ -18,14 +18,20 @@ #include "led_tables.h" #include "progmem.h" -RGB hsv_to_rgb(HSV hsv) { +RGB hsv_to_rgb_impl(HSV hsv, bool use_cie) { RGB rgb; uint8_t region, remainder, p, q, t; uint16_t h, s, v; if (hsv.s == 0) { #ifdef USE_CIE1931_CURVE - rgb.r = rgb.g = rgb.b = pgm_read_byte(&CIE1931_CURVE[hsv.v]); + if (use_cie) { + rgb.r = rgb.g = rgb.b = pgm_read_byte(&CIE1931_CURVE[hsv.v]); + } else { + rgb.r = hsv.v; + rgb.g = hsv.v; + rgb.b = hsv.v; + } #else rgb.r = hsv.v; rgb.g = hsv.v; @@ -37,7 +43,11 @@ RGB hsv_to_rgb(HSV hsv) { h = hsv.h; s = hsv.s; #ifdef USE_CIE1931_CURVE - v = pgm_read_byte(&CIE1931_CURVE[hsv.v]); + if (use_cie) { + v = pgm_read_byte(&CIE1931_CURVE[hsv.v]); + } else { + v = hsv.v; + } #else v = hsv.v; #endif @@ -86,6 +96,16 @@ RGB hsv_to_rgb(HSV hsv) { return rgb; } +RGB hsv_to_rgb(HSV hsv) { +#ifdef USE_CIE1931_CURVE + return hsv_to_rgb_impl(hsv, true); +#else + return hsv_to_rgb_impl(hsv, false); +#endif +} + +RGB hsv_to_rgb_nocie(HSV hsv) { return hsv_to_rgb_impl(hsv, false); } + #ifdef RGBW # ifndef MIN # define MIN(a, b) ((a) < (b) ? (a) : (b)) diff --git a/quantum/color.h b/quantum/color.h index 58d4f0407fab..5c5a0f0ebd32 100644 --- a/quantum/color.h +++ b/quantum/color.h @@ -64,6 +64,7 @@ typedef struct PACKED { #endif RGB hsv_to_rgb(HSV hsv); +RGB hsv_to_rgb_nocie(HSV hsv); #ifdef RGBW void convert_rgb_to_rgbw(LED_TYPE *led); #endif From e34eca361fdd9ff61b8827fec545202da179648c Mon Sep 17 00:00:00 2001 From: Tynan Beatty <38031130+tynanbe@users.noreply.github.com> Date: Fri, 7 Aug 2020 16:43:57 -0500 Subject: [PATCH 677/930] Noeeprom functions for rgb_matrix (#9487) * Add eeprom_helpers for toggle, mode, sethsv, speed; add set_speed; add noeeprom versions of toggle, step, hue, sat, val, and speed * qmk cformat rgb_matrix * Add rgb_matrix_set_speed and *_noeeprom functions * Do not expose rgb_matrix_*_eeprom_helper functions --- docs/feature_rgb_matrix.md | 20 ++++- quantum/rgb_matrix.c | 155 +++++++++++++++++++++---------------- quantum/rgb_matrix.h | 64 ++++++++++----- 3 files changed, 149 insertions(+), 90 deletions(-) diff --git a/docs/feature_rgb_matrix.md b/docs/feature_rgb_matrix.md index 2cde3ec56950..a8fad59a191a 100644 --- a/docs/feature_rgb_matrix.md +++ b/docs/feature_rgb_matrix.md @@ -422,8 +422,8 @@ Where `28` is an unused index from `eeconfig.h`. |`rgb_matrix_toggle_noeeprom()` |Toggle effect range LEDs between on and off (not written to EEPROM) | |`rgb_matrix_enable()` |Turn effect range LEDs on, based on their previous state | |`rgb_matrix_enable_noeeprom()` |Turn effect range LEDs on, based on their previous state (not written to EEPROM) | -|`rgb_matrix_disable()` |Turn effect range LEDs off | -|`rgb_matrix_disable_noeeprom()` |Turn effect range LEDs off (not written to EEPROM) | +|`rgb_matrix_disable()` |Turn effect range LEDs off, based on their previous state | +|`rgb_matrix_disable_noeeprom()` |Turn effect range LEDs off, based on their previous state (not written to EEPROM) | ### Change Effect Mode :id=change-effect-mode |Function |Description | @@ -431,19 +431,31 @@ Where `28` is an unused index from `eeconfig.h`. |`rgb_matrix_mode(mode)` |Set the mode, if RGB animations are enabled | |`rgb_matrix_mode_noeeprom(mode)` |Set the mode, if RGB animations are enabled (not written to EEPROM) | |`rgb_matrix_step()` |Change the mode to the next RGB animation in the list of enabled RGB animations | +|`rgb_matrix_step_noeeprom()` |Change the mode to the next RGB animation in the list of enabled RGB animations (not written to EEPROM) | |`rgb_matrix_step_reverse()` |Change the mode to the previous RGB animation in the list of enabled RGB animations | -|`rgb_matrix_increase_speed()` |Increases the speed of the animations | -|`rgb_matrix_decrease_speed()` |Decreases the speed of the animations | +|`rgb_matrix_step_reverse_noeeprom()` |Change the mode to the previous RGB animation in the list of enabled RGB animations (not written to EEPROM) | +|`rgb_matrix_increase_speed()` |Increase the speed of the animations | +|`rgb_matrix_increase_speed_noeeprom()` |Increase the speed of the animations (not written to EEPROM) | +|`rgb_matrix_decrease_speed()` |Decrease the speed of the animations | +|`rgb_matrix_decrease_speed_noeeprom()` |Decrease the speed of the animations (not written to EEPROM) | +|`rgb_matrix_set_speed(speed)` |Set the speed of the animations to the given value where `speed` is between 0 and 255 | +|`rgb_matrix_set_speed_noeeprom(speed)` |Set the speed of the animations to the given value where `speed` is between 0 and 255 (not written to EEPROM) | ### Change Color :id=change-color |Function |Description | |--------------------------------------------|-------------| |`rgb_matrix_increase_hue()` |Increase the hue for effect range LEDs. This wraps around at maximum hue | +|`rgb_matrix_increase_hue_noeeprom()` |Increase the hue for effect range LEDs. This wraps around at maximum hue (not written to EEPROM) | |`rgb_matrix_decrease_hue()` |Decrease the hue for effect range LEDs. This wraps around at minimum hue | +|`rgb_matrix_decrease_hue_noeeprom()` |Decrease the hue for effect range LEDs. This wraps around at minimum hue (not written to EEPROM) | |`rgb_matrix_increase_sat()` |Increase the saturation for effect range LEDs. This wraps around at maximum saturation | +|`rgb_matrix_increase_sat_noeeprom()` |Increase the saturation for effect range LEDs. This wraps around at maximum saturation (not written to EEPROM) | |`rgb_matrix_decrease_sat()` |Decrease the saturation for effect range LEDs. This wraps around at minimum saturation | +|`rgb_matrix_decrease_sat_noeeprom()` |Decrease the saturation for effect range LEDs. This wraps around at minimum saturation (not written to EEPROM) | |`rgb_matrix_increase_val()` |Increase the value for effect range LEDs. This wraps around at maximum value | +|`rgb_matrix_increase_val_noeeprom()` |Increase the value for effect range LEDs. This wraps around at maximum value (not written to EEPROM) | |`rgb_matrix_decrease_val()` |Decrease the value for effect range LEDs. This wraps around at minimum value | +|`rgb_matrix_decrease_val_noeeprom()` |Decrease the value for effect range LEDs. This wraps around at minimum value (not written to EEPROM) | |`rgb_matrix_sethsv(h, s, v)` |Set LEDs to the given HSV value where `h`/`s`/`v` are between 0 and 255 | |`rgb_matrix_sethsv_noeeprom(h, s, v)` |Set LEDs to the given HSV value where `h`/`s`/`v` are between 0 and 255 (not written to EEPROM) | diff --git a/quantum/rgb_matrix.c b/quantum/rgb_matrix.c index 615b4b0a7bf6..802c5afcee21 100644 --- a/quantum/rgb_matrix.c +++ b/quantum/rgb_matrix.c @@ -155,7 +155,7 @@ void eeconfig_update_rgb_matrix_default(void) { } void eeconfig_debug_rgb_matrix(void) { - dprintf("rgb_matrix_config eprom\n"); + dprintf("rgb_matrix_config EEPROM\n"); dprintf("rgb_matrix_config.enable = %d\n", rgb_matrix_config.enable); dprintf("rgb_matrix_config.mode = %d\n", rgb_matrix_config.mode); dprintf("rgb_matrix_config.hsv.h = %d\n", rgb_matrix_config.hsv.h); @@ -462,11 +462,16 @@ void rgb_matrix_set_suspend_state(bool state) { bool rgb_matrix_get_suspend_state(void) { return g_suspend_state; } -void rgb_matrix_toggle(void) { +void rgb_matrix_toggle_eeprom_helper(bool write_to_eeprom) { rgb_matrix_config.enable ^= 1; rgb_task_state = STARTING; - eeconfig_update_rgb_matrix(); + if (write_to_eeprom) { + eeconfig_update_rgb_matrix(); + } + dprintf("rgb matrix toggle [%s]: rgb_matrix_config.enable = %u\n", (write_to_eeprom) ? "EEPROM" : "NOEEPROM", rgb_matrix_config.enable); } +void rgb_matrix_toggle_noeeprom(void) { rgb_matrix_toggle_eeprom_helper(false); } +void rgb_matrix_toggle(void) { rgb_matrix_toggle_eeprom_helper(true); } void rgb_matrix_enable(void) { rgb_matrix_enable_noeeprom(); @@ -490,90 +495,106 @@ void rgb_matrix_disable_noeeprom(void) { uint8_t rgb_matrix_is_enabled(void) { return rgb_matrix_config.enable; } -void rgb_matrix_step(void) { - rgb_matrix_config.mode++; - if (rgb_matrix_config.mode >= RGB_MATRIX_EFFECT_MAX) rgb_matrix_config.mode = 1; +void rgb_matrix_mode_eeprom_helper(uint8_t mode, bool write_to_eeprom) { + if (!rgb_matrix_config.enable) { + return; + } + if (mode < 1) { + rgb_matrix_config.mode = 1; + } else if (mode >= RGB_MATRIX_EFFECT_MAX) { + rgb_matrix_config.mode = RGB_MATRIX_EFFECT_MAX - 1; + } else { + rgb_matrix_config.mode = mode; + } rgb_task_state = STARTING; - eeconfig_update_rgb_matrix(); + if (write_to_eeprom) { + eeconfig_update_rgb_matrix(); + } + dprintf("rgb matrix mode [%s]: %u\n", (write_to_eeprom) ? "EEPROM" : "NOEEPROM", rgb_matrix_config.mode); } +void rgb_matrix_mode_noeeprom(uint8_t mode) { rgb_matrix_mode_eeprom_helper(mode, false); } +void rgb_matrix_mode(uint8_t mode) { rgb_matrix_mode_eeprom_helper(mode, true); } -void rgb_matrix_step_reverse(void) { - rgb_matrix_config.mode--; - if (rgb_matrix_config.mode < 1) rgb_matrix_config.mode = RGB_MATRIX_EFFECT_MAX - 1; - rgb_task_state = STARTING; - eeconfig_update_rgb_matrix(); -} +uint8_t rgb_matrix_get_mode(void) { return rgb_matrix_config.mode; } -void rgb_matrix_increase_hue(void) { - rgb_matrix_config.hsv.h += RGB_MATRIX_HUE_STEP; - eeconfig_update_rgb_matrix(); +void rgb_matrix_step_helper(bool write_to_eeprom) { + uint8_t mode = rgb_matrix_config.mode + 1; + rgb_matrix_mode_eeprom_helper((mode < RGB_MATRIX_EFFECT_MAX) ? mode : 1, write_to_eeprom); } +void rgb_matrix_step_noeeprom(void) { rgb_matrix_step_helper(false); } +void rgb_matrix_step(void) { rgb_matrix_step_helper(true); } -void rgb_matrix_decrease_hue(void) { - rgb_matrix_config.hsv.h -= RGB_MATRIX_HUE_STEP; - eeconfig_update_rgb_matrix(); +void rgb_matrix_step_reverse_helper(bool write_to_eeprom) { + uint8_t mode = rgb_matrix_config.mode - 1; + rgb_matrix_mode_eeprom_helper((mode < 1) ? RGB_MATRIX_EFFECT_MAX - 1 : mode, write_to_eeprom); } +void rgb_matrix_step_reverse_noeeprom(void) { rgb_matrix_step_reverse_helper(false); } +void rgb_matrix_step_reverse(void) { rgb_matrix_step_reverse_helper(true); } -void rgb_matrix_increase_sat(void) { - rgb_matrix_config.hsv.s = qadd8(rgb_matrix_config.hsv.s, RGB_MATRIX_SAT_STEP); - eeconfig_update_rgb_matrix(); -} - -void rgb_matrix_decrease_sat(void) { - rgb_matrix_config.hsv.s = qsub8(rgb_matrix_config.hsv.s, RGB_MATRIX_SAT_STEP); - eeconfig_update_rgb_matrix(); +void rgb_matrix_sethsv_eeprom_helper(uint16_t hue, uint8_t sat, uint8_t val, bool write_to_eeprom) { + if (!rgb_matrix_config.enable) { + return; + } + rgb_matrix_config.hsv.h = hue; + rgb_matrix_config.hsv.s = sat; + rgb_matrix_config.hsv.v = (val > RGB_MATRIX_MAXIMUM_BRIGHTNESS) ? RGB_MATRIX_MAXIMUM_BRIGHTNESS : val; + if (write_to_eeprom) { + eeconfig_update_rgb_matrix(); + } + dprintf("rgb matrix set hsv [%s]: %u,%u,%u\n", (write_to_eeprom) ? "EEPROM" : "NOEEPROM", rgb_matrix_config.hsv.h, rgb_matrix_config.hsv.s, rgb_matrix_config.hsv.v); } +void rgb_matrix_sethsv_noeeprom(uint16_t hue, uint8_t sat, uint8_t val) { rgb_matrix_sethsv_eeprom_helper(hue, sat, val, false); } +void rgb_matrix_sethsv(uint16_t hue, uint8_t sat, uint8_t val) { rgb_matrix_sethsv_eeprom_helper(hue, sat, val, true); } -void rgb_matrix_increase_val(void) { - rgb_matrix_config.hsv.v = qadd8(rgb_matrix_config.hsv.v, RGB_MATRIX_VAL_STEP); - if (rgb_matrix_config.hsv.v > RGB_MATRIX_MAXIMUM_BRIGHTNESS) rgb_matrix_config.hsv.v = RGB_MATRIX_MAXIMUM_BRIGHTNESS; - eeconfig_update_rgb_matrix(); -} +HSV rgb_matrix_get_hsv(void) { return rgb_matrix_config.hsv; } +uint8_t rgb_matrix_get_hue(void) { return rgb_matrix_config.hsv.h; } +uint8_t rgb_matrix_get_sat(void) { return rgb_matrix_config.hsv.s; } +uint8_t rgb_matrix_get_val(void) { return rgb_matrix_config.hsv.v; } -void rgb_matrix_decrease_val(void) { - rgb_matrix_config.hsv.v = qsub8(rgb_matrix_config.hsv.v, RGB_MATRIX_VAL_STEP); - eeconfig_update_rgb_matrix(); -} +void rgb_matrix_increase_hue_helper(bool write_to_eeprom) { rgb_matrix_sethsv_eeprom_helper(rgb_matrix_config.hsv.h + RGB_MATRIX_HUE_STEP, rgb_matrix_config.hsv.s, rgb_matrix_config.hsv.v, write_to_eeprom); } +void rgb_matrix_increase_hue_noeeprom(void) { rgb_matrix_increase_hue_helper(false); } +void rgb_matrix_increase_hue(void) { rgb_matrix_increase_hue_helper(true); } -void rgb_matrix_increase_speed(void) { - rgb_matrix_config.speed = qadd8(rgb_matrix_config.speed, RGB_MATRIX_SPD_STEP); - eeconfig_update_rgb_matrix(); -} +void rgb_matrix_decrease_hue_helper(bool write_to_eeprom) { rgb_matrix_sethsv_eeprom_helper(rgb_matrix_config.hsv.h - RGB_MATRIX_HUE_STEP, rgb_matrix_config.hsv.s, rgb_matrix_config.hsv.v, write_to_eeprom); } +void rgb_matrix_decrease_hue_noeeprom(void) { rgb_matrix_decrease_hue_helper(false); } +void rgb_matrix_decrease_hue(void) { rgb_matrix_decrease_hue_helper(true); } -void rgb_matrix_decrease_speed(void) { - rgb_matrix_config.speed = qsub8(rgb_matrix_config.speed, RGB_MATRIX_SPD_STEP); - eeconfig_update_rgb_matrix(); -} +void rgb_matrix_increase_sat_helper(bool write_to_eeprom) { rgb_matrix_sethsv_eeprom_helper(rgb_matrix_config.hsv.h, qadd8(rgb_matrix_config.hsv.s, RGB_MATRIX_SAT_STEP), rgb_matrix_config.hsv.v, write_to_eeprom); } +void rgb_matrix_increase_sat_noeeprom(void) { rgb_matrix_increase_sat_helper(false); } +void rgb_matrix_increase_sat(void) { rgb_matrix_increase_sat_helper(true); } -uint8_t rgb_matrix_get_speed(void) { return rgb_matrix_config.speed; } +void rgb_matrix_decrease_sat_helper(bool write_to_eeprom) { rgb_matrix_sethsv_eeprom_helper(rgb_matrix_config.hsv.h, qsub8(rgb_matrix_config.hsv.s, RGB_MATRIX_SAT_STEP), rgb_matrix_config.hsv.v, write_to_eeprom); } +void rgb_matrix_decrease_sat_noeeprom(void) { rgb_matrix_decrease_sat_helper(false); } +void rgb_matrix_decrease_sat(void) { rgb_matrix_decrease_sat_helper(true); } -led_flags_t rgb_matrix_get_flags(void) { return rgb_effect_params.flags; } +void rgb_matrix_increase_val_helper(bool write_to_eeprom) { rgb_matrix_sethsv_eeprom_helper(rgb_matrix_config.hsv.h, rgb_matrix_config.hsv.s, qadd8(rgb_matrix_config.hsv.v, RGB_MATRIX_VAL_STEP), write_to_eeprom); } +void rgb_matrix_increase_val_noeeprom(void) { rgb_matrix_increase_val_helper(false); } +void rgb_matrix_increase_val(void) { rgb_matrix_increase_val_helper(true); } -void rgb_matrix_set_flags(led_flags_t flags) { rgb_effect_params.flags = flags; } +void rgb_matrix_decrease_val_helper(bool write_to_eeprom) { rgb_matrix_sethsv_eeprom_helper(rgb_matrix_config.hsv.h, rgb_matrix_config.hsv.s, qsub8(rgb_matrix_config.hsv.v, RGB_MATRIX_VAL_STEP), write_to_eeprom); } +void rgb_matrix_decrease_val_noeeprom(void) { rgb_matrix_decrease_val_helper(false); } +void rgb_matrix_decrease_val(void) { rgb_matrix_decrease_val_helper(true); } -void rgb_matrix_mode(uint8_t mode) { - rgb_matrix_config.mode = mode; - rgb_task_state = STARTING; - eeconfig_update_rgb_matrix(); +void rgb_matrix_set_speed_eeprom_helper(uint8_t speed, bool write_to_eeprom) { + rgb_matrix_config.speed = speed; + if (write_to_eeprom) { + eeconfig_update_rgb_matrix(); + } + dprintf("rgb matrix set speed [%s]: %u\n", (write_to_eeprom) ? "EEPROM" : "NOEEPROM", rgb_matrix_config.speed); } +void rgb_matrix_set_speed_noeeprom(uint8_t speed) { rgb_matrix_set_speed_eeprom_helper(speed, false); } +void rgb_matrix_set_speed(uint8_t speed) { rgb_matrix_set_speed_eeprom_helper(speed, true); } -void rgb_matrix_mode_noeeprom(uint8_t mode) { rgb_matrix_config.mode = mode; } +uint8_t rgb_matrix_get_speed(void) { return rgb_matrix_config.speed; } -uint8_t rgb_matrix_get_mode(void) { return rgb_matrix_config.mode; } +void rgb_matrix_increase_speed_helper(bool write_to_eeprom) { rgb_matrix_set_speed_eeprom_helper(qadd8(rgb_matrix_config.speed, RGB_MATRIX_SPD_STEP), write_to_eeprom); } +void rgb_matrix_increase_speed_noeeprom(void) { rgb_matrix_increase_speed_helper(false); } +void rgb_matrix_increase_speed(void) { rgb_matrix_increase_speed_helper(true); } -void rgb_matrix_sethsv(uint16_t hue, uint8_t sat, uint8_t val) { - rgb_matrix_sethsv_noeeprom(hue, sat, val); - eeconfig_update_rgb_matrix(); -} +void rgb_matrix_decrease_speed_helper(bool write_to_eeprom) { rgb_matrix_set_speed_eeprom_helper(qsub8(rgb_matrix_config.speed, RGB_MATRIX_SPD_STEP), write_to_eeprom); } +void rgb_matrix_decrease_speed_noeeprom(void) { rgb_matrix_decrease_speed_helper(false); } +void rgb_matrix_decrease_speed(void) { rgb_matrix_decrease_speed_helper(true); } -void rgb_matrix_sethsv_noeeprom(uint16_t hue, uint8_t sat, uint8_t val) { - rgb_matrix_config.hsv.h = hue; - rgb_matrix_config.hsv.s = sat; - rgb_matrix_config.hsv.v = val; - if (rgb_matrix_config.hsv.v > RGB_MATRIX_MAXIMUM_BRIGHTNESS) rgb_matrix_config.hsv.v = RGB_MATRIX_MAXIMUM_BRIGHTNESS; -} +led_flags_t rgb_matrix_get_flags(void) { return rgb_effect_params.flags; } -HSV rgb_matrix_get_hsv(void) { return rgb_matrix_config.hsv; } -uint8_t rgb_matrix_get_hue(void) { return rgb_matrix_config.hsv.h; } -uint8_t rgb_matrix_get_sat(void) { return rgb_matrix_config.hsv.s; } -uint8_t rgb_matrix_get_val(void) { return rgb_matrix_config.hsv.v; } +void rgb_matrix_set_flags(led_flags_t flags) { rgb_effect_params.flags = flags; } diff --git a/quantum/rgb_matrix.h b/quantum/rgb_matrix.h index 03e9e8572c57..733333349faa 100644 --- a/quantum/rgb_matrix.h +++ b/quantum/rgb_matrix.h @@ -108,61 +108,87 @@ void rgb_matrix_init(void); void rgb_matrix_set_suspend_state(bool state); bool rgb_matrix_get_suspend_state(void); void rgb_matrix_toggle(void); +void rgb_matrix_toggle_noeeprom(void); void rgb_matrix_enable(void); void rgb_matrix_enable_noeeprom(void); void rgb_matrix_disable(void); void rgb_matrix_disable_noeeprom(void); uint8_t rgb_matrix_is_enabled(void); +void rgb_matrix_mode(uint8_t mode); +void rgb_matrix_mode_noeeprom(uint8_t mode); +uint8_t rgb_matrix_get_mode(void); void rgb_matrix_step(void); +void rgb_matrix_step_noeeprom(void); void rgb_matrix_step_reverse(void); +void rgb_matrix_step_reverse_noeeprom(void); +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); +HSV rgb_matrix_get_hsv(void); +uint8_t rgb_matrix_get_hue(void); +uint8_t rgb_matrix_get_sat(void); +uint8_t rgb_matrix_get_val(void); void rgb_matrix_increase_hue(void); +void rgb_matrix_increase_hue_noeeprom(void); void rgb_matrix_decrease_hue(void); +void rgb_matrix_decrease_hue_noeeprom(void); void rgb_matrix_increase_sat(void); +void rgb_matrix_increase_sat_noeeprom(void); void rgb_matrix_decrease_sat(void); +void rgb_matrix_decrease_sat_noeeprom(void); void rgb_matrix_increase_val(void); +void rgb_matrix_increase_val_noeeprom(void); void rgb_matrix_decrease_val(void); +void rgb_matrix_decrease_val_noeeprom(void); +void rgb_matrix_set_speed(uint8_t speed); +void rgb_matrix_set_speed_noeeprom(uint8_t speed); +uint8_t rgb_matrix_get_speed(void); void rgb_matrix_increase_speed(void); +void rgb_matrix_increase_speed_noeeprom(void); void rgb_matrix_decrease_speed(void); -uint8_t rgb_matrix_get_speed(void); +void rgb_matrix_decrease_speed_noeeprom(void); led_flags_t rgb_matrix_get_flags(void); void rgb_matrix_set_flags(led_flags_t flags); -void rgb_matrix_mode(uint8_t mode); -void rgb_matrix_mode_noeeprom(uint8_t mode); -uint8_t rgb_matrix_get_mode(void); -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); -HSV rgb_matrix_get_hsv(void); -uint8_t rgb_matrix_get_hue(void); -uint8_t rgb_matrix_get_sat(void); -uint8_t rgb_matrix_get_val(void); #ifndef RGBLIGHT_ENABLE # define rgblight_toggle rgb_matrix_toggle +# define rgblight_toggle_noeeprom rgb_matrix_toggle_noeeprom # 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_is_enabled rgb_matrix_is_enabled +# define rgblight_mode rgb_matrix_mode +# define rgblight_mode_noeeprom rgb_matrix_mode_noeeprom +# define rgblight_get_mode rgb_matrix_get_mode +# define rgblight_get_hue rgb_matrix_get_hue +# define rgblight_get_sat rgb_matrix_get_sat +# define rgblight_get_val rgb_matrix_get_val +# define rgblight_get_hsv rgb_matrix_get_hsv # define rgblight_step rgb_matrix_step +# define rgblight_step_noeeprom rgb_matrix_step_noeeprom +# define rgblight_step_reverse rgb_matrix_step_reverse +# define rgblight_step_reverse_noeeprom rgb_matrix_step_reverse_noeeprom # 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_increase_hue_noeeprom rgb_matrix_increase_hue_noeeprom # define rgblight_decrease_hue rgb_matrix_decrease_hue +# define rgblight_decrease_hue_noeeprom rgb_matrix_decrease_hue_noeeprom # define rgblight_increase_sat rgb_matrix_increase_sat +# define rgblight_increase_sat_noeeprom rgb_matrix_increase_sat_noeeprom # define rgblight_decrease_sat rgb_matrix_decrease_sat +# define rgblight_decrease_sat_noeeprom rgb_matrix_decrease_sat_noeeprom # define rgblight_increase_val rgb_matrix_increase_val +# define rgblight_increase_val_noeeprom rgb_matrix_increase_val_noeeprom # define rgblight_decrease_val rgb_matrix_decrease_val +# define rgblight_decrease_val_noeeprom rgb_matrix_decrease_val_noeeprom +# define rgblight_set_speed rgb_matrix_set_speed +# define rgblight_set_speed_noeeprom rgb_matrix_set_speed_noeeprom +# define rgblight_get_speed rgb_matrix_get_speed # define rgblight_increase_speed rgb_matrix_increase_speed +# define rgblight_increase_speed_noeeprom rgb_matrix_increase_speed_noeeprom # define rgblight_decrease_speed rgb_matrix_decrease_speed -# define rgblight_get_speed rgb_matrix_get_speed -# define rgblight_mode rgb_matrix_mode -# define rgblight_mode_noeeprom rgb_matrix_mode_noeeprom -# define rgblight_get_mode rgb_matrix_get_mode -# define rgblight_get_hue rgb_matrix_get_hue -# define rgblight_get_sat rgb_matrix_get_sat -# define rgblight_get_val rgb_matrix_get_val -# define rgblight_get_hsv rgb_matrix_get_hsv +# define rgblight_decrease_speed_noeeprom rgb_matrix_decrease_speed_noeeprom #endif typedef struct { From 12333b7c5e47f935c8e11276caebae464331df8a Mon Sep 17 00:00:00 2001 From: Ryan Date: Sat, 8 Aug 2020 10:24:29 +1000 Subject: [PATCH 678/930] Fix joystick compile issues (#9949) --- .../onekey/keymaps/joystick/config.h | 1 + .../onekey/keymaps/joystick/keymap.c | 21 ++++++++++--------- tmk_core/protocol/lufa/lufa.c | 4 +++- 3 files changed, 15 insertions(+), 11 deletions(-) diff --git a/keyboards/handwired/onekey/keymaps/joystick/config.h b/keyboards/handwired/onekey/keymaps/joystick/config.h index 5701d80c84c0..ac09aa7cfb28 100644 --- a/keyboards/handwired/onekey/keymaps/joystick/config.h +++ b/keyboards/handwired/onekey/keymaps/joystick/config.h @@ -1,3 +1,4 @@ #pragma once + #define JOYSTICK_AXES_COUNT 2 #define JOYSTICK_BUTTON_COUNT 1 diff --git a/keyboards/handwired/onekey/keymaps/joystick/keymap.c b/keyboards/handwired/onekey/keymaps/joystick/keymap.c index 60802f464a90..f427b9d77d40 100644 --- a/keyboards/handwired/onekey/keymaps/joystick/keymap.c +++ b/keyboards/handwired/onekey/keymaps/joystick/keymap.c @@ -7,19 +7,20 @@ #endif const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - LAYOUT( JS_BUTTON0 ) + LAYOUT_ortho_1x1(JS_BUTTON0) }; void matrix_scan_user() { - int16_t val = (((uint32_t)timer_read()%5000 - 2500) * 255) / 5000; - if (val != joystick_status.axes[1]) { - joystick_status.axes[1] = val; - joystick_status.status |= JS_UPDATED; - } + int16_t val = (((uint32_t)timer_read() % 5000 - 2500) * 255) / 5000; + + if (val != joystick_status.axes[1]) { + joystick_status.axes[1] = val; + joystick_status.status |= JS_UPDATED; + } } -//joystick config +// Joystick config joystick_config_t joystick_axes[JOYSTICK_AXES_COUNT] = { - [0] = JOYSTICK_AXIS_IN(ADC_PIN, 0, 512, 1023) - , [1] = JOYSTICK_AXIS_VIRTUAL -}; \ No newline at end of file + [0] = JOYSTICK_AXIS_IN(ADC_PIN, 0, 512, 1023), + [1] = JOYSTICK_AXIS_VIRTUAL +}; diff --git a/tmk_core/protocol/lufa/lufa.c b/tmk_core/protocol/lufa/lufa.c index 85603646db98..8410eb483ff7 100644 --- a/tmk_core/protocol/lufa/lufa.c +++ b/tmk_core/protocol/lufa/lufa.c @@ -475,8 +475,10 @@ void EVENT_USB_Device_ConfigurationChanged(void) { ConfigSuccess &= Endpoint_ConfigureEndpoint((CDC_OUT_EPNUM | ENDPOINT_DIR_OUT), EP_TYPE_BULK, CDC_EPSIZE, 1); ConfigSuccess &= Endpoint_ConfigureEndpoint((CDC_IN_EPNUM | ENDPOINT_DIR_IN), EP_TYPE_BULK, CDC_EPSIZE, 1); #endif + #ifdef JOYSTICK_ENABLE - ConfigSuccess &= ENDPOINT_CONFIG(JOYSTICK_IN_EPNUM, EP_TYPE_INTERRUPT, ENDPOINT_DIR_IN, JOYSTICK_EPSIZE, ENDPOINT_BANK_SINGLE); + /* Setup joystick endpoint */ + ConfigSuccess &= Endpoint_ConfigureEndpoint((JOYSTICK_IN_EPNUM | ENDPOINT_DIR_IN), EP_TYPE_INTERRUPT, JOYSTICK_EPSIZE, 1); #endif } From dba814876413c0e14b2aada3d1ea1d7c380f2760 Mon Sep 17 00:00:00 2001 From: David Kosorin Date: Tue, 11 Aug 2020 04:26:34 +0200 Subject: [PATCH 679/930] Fix Czech keycodes (#9987) --- quantum/keymap_extras/keymap_czech.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/quantum/keymap_extras/keymap_czech.h b/quantum/keymap_extras/keymap_czech.h index 7e9d299f499c..43ba2a14ffb5 100644 --- a/quantum/keymap_extras/keymap_czech.h +++ b/quantum/keymap_extras/keymap_czech.h @@ -94,7 +94,7 @@ * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐    │ * │      │   │   │   │   │   │   │   │   │   │ " │ ! │ ' │    │ * ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴────┤ - * │    │ | │   │   │   │   │   │   │   │ ; │ : │ _ │          │ + * │    │ | │   │   │   │   │   │   │   │ ? │ : │ _ │          │ * ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤ * │    │    │    │                        │    │    │    │    │ * └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘ @@ -122,7 +122,7 @@ #define CZ_QUOT S(CZ_DIAE) // ' // Row 4 #define CZ_PIPE S(CZ_BSLS) // | -#define CZ_SCLN S(CZ_COMM) // ; +#define CZ_QUES S(CZ_COMM) // ? #define CZ_COLN S(CZ_DOT) // : #define CZ_UNDS S(CZ_MINS) // _ From ea43bc8972d254e75062ac20472b156fd3d92ddc Mon Sep 17 00:00:00 2001 From: Danny Date: Wed, 12 Aug 2020 11:37:34 -0400 Subject: [PATCH 680/930] Keebio RGB wiring update (#7754) * Change RGB wiring for Levinson * Update RGB wiring for Iris * Update RGB wiring for Nyquist * Update RGB wiring for Quefrency * Update RGB wiring for Viterbi * Update RGB wiring for Fourier * Update RGB wiring for BFO * Handle redefinition of RGBLED_SPLIT --- keyboards/keebio/bfo9000/config.h | 1 + keyboards/keebio/fourier/config.h | 1 + keyboards/keebio/iris/rev2/config.h | 1 + keyboards/keebio/levinson/rev1/config.h | 2 +- keyboards/keebio/levinson/rev2/config.h | 2 +- keyboards/keebio/nyquist/rev1/config.h | 4 ++-- keyboards/keebio/nyquist/rev2/config.h | 4 ++-- keyboards/keebio/quefrency/keymaps/drashna_ms/config.h | 1 + keyboards/keebio/quefrency/rev1/config.h | 1 + keyboards/keebio/viterbi/rev1/config.h | 1 + keyboards/keebio/viterbi/rev2/config.h | 1 + 11 files changed, 13 insertions(+), 6 deletions(-) diff --git a/keyboards/keebio/bfo9000/config.h b/keyboards/keebio/bfo9000/config.h index 0b279bc34368..671575536e8a 100644 --- a/keyboards/keebio/bfo9000/config.h +++ b/keyboards/keebio/bfo9000/config.h @@ -53,6 +53,7 @@ along with this program. If not, see . /* ws2812 RGB LED */ #define RGB_DI_PIN B4 #define RGBLED_NUM 20 // Number of LEDs +#define RGBLED_SPLIT { 10, 10 } /* * Feature disable options diff --git a/keyboards/keebio/fourier/config.h b/keyboards/keebio/fourier/config.h index a0e85a3b1e78..b9db50aac541 100644 --- a/keyboards/keebio/fourier/config.h +++ b/keyboards/keebio/fourier/config.h @@ -65,6 +65,7 @@ along with this program. If not, see . #define RGB_DI_PIN D3 #define RGBLIGHT_ANIMATIONS #define RGBLED_NUM 14 // Number of LEDs +#define RGBLED_SPLIT { 7, 7 } /* * Feature disable options diff --git a/keyboards/keebio/iris/rev2/config.h b/keyboards/keebio/iris/rev2/config.h index 4ead367d3ca4..c3da1321c38f 100644 --- a/keyboards/keebio/iris/rev2/config.h +++ b/keyboards/keebio/iris/rev2/config.h @@ -60,4 +60,5 @@ along with this program. If not, see . /* ws2812 RGB LED */ #define RGB_DI_PIN D3 #define RGBLED_NUM 12 // Number of LEDs +#define RGBLED_SPLIT { 6, 6 } #define RGBLIGHT_ANIMATIONS diff --git a/keyboards/keebio/levinson/rev1/config.h b/keyboards/keebio/levinson/rev1/config.h index 5b23f18c1d36..a8854b1357eb 100644 --- a/keyboards/keebio/levinson/rev1/config.h +++ b/keyboards/keebio/levinson/rev1/config.h @@ -51,8 +51,8 @@ along with this program. If not, see . /* ws2812 RGB LED */ #define RGB_DI_PIN D3 - #define RGBLED_NUM 12 // Number of LEDs +#define RGBLED_SPLIT { 6, 6 } /* Backlight LEDs */ #define BACKLIGHT_PIN C6 diff --git a/keyboards/keebio/levinson/rev2/config.h b/keyboards/keebio/levinson/rev2/config.h index e8e7294dd867..5b1ae6fe1ec1 100644 --- a/keyboards/keebio/levinson/rev2/config.h +++ b/keyboards/keebio/levinson/rev2/config.h @@ -51,8 +51,8 @@ along with this program. If not, see . /* ws2812 RGB LED */ #define RGB_DI_PIN D3 - #define RGBLED_NUM 12 // Number of LEDs +#define RGBLED_SPLIT { 6, 6 } /* Backlight LEDs */ #define BACKLIGHT_PIN B5 diff --git a/keyboards/keebio/nyquist/rev1/config.h b/keyboards/keebio/nyquist/rev1/config.h index 75fa43b5874c..0822f91ad9ed 100644 --- a/keyboards/keebio/nyquist/rev1/config.h +++ b/keyboards/keebio/nyquist/rev1/config.h @@ -56,8 +56,8 @@ along with this program. If not, see . /* ws2812 RGB LED */ #define RGB_DI_PIN D3 - -#define RGBLED_NUM 16 // Number of LEDs +#define RGBLED_NUM 12 +#define RGBLED_SPLIT { 6, 6 } /* * Feature disable options diff --git a/keyboards/keebio/nyquist/rev2/config.h b/keyboards/keebio/nyquist/rev2/config.h index 9775113c6317..2810bde7a2ef 100644 --- a/keyboards/keebio/nyquist/rev2/config.h +++ b/keyboards/keebio/nyquist/rev2/config.h @@ -53,8 +53,8 @@ along with this program. If not, see . /* ws2812 RGB LED */ #define RGB_DI_PIN D3 - -#define RGBLED_NUM 16 // Number of LEDs +#define RGBLED_NUM 12 +#define RGBLED_SPLIT { 6, 6 } /* Backlight LEDs */ #define BACKLIGHT_PIN B6 diff --git a/keyboards/keebio/quefrency/keymaps/drashna_ms/config.h b/keyboards/keebio/quefrency/keymaps/drashna_ms/config.h index ec2a2ea164e5..089c8cf79e52 100644 --- a/keyboards/keebio/quefrency/keymaps/drashna_ms/config.h +++ b/keyboards/keebio/quefrency/keymaps/drashna_ms/config.h @@ -29,6 +29,7 @@ along with this program. If not, see . #define RGBLIGHT_SPLIT #undef RGBLED_NUM #define RGBLED_NUM 17 + #undef RGBLED_SPLIT #define RGBLED_SPLIT { 9, 8 } #define RGBLIGHT_SLEEP #endif diff --git a/keyboards/keebio/quefrency/rev1/config.h b/keyboards/keebio/quefrency/rev1/config.h index e9379ab2ff5f..b67507187466 100644 --- a/keyboards/keebio/quefrency/rev1/config.h +++ b/keyboards/keebio/quefrency/rev1/config.h @@ -55,6 +55,7 @@ along with this program. If not, see . #define RGB_DI_PIN D3 #define RGBLIGHT_ANIMATIONS #define RGBLED_NUM 16 // Number of LEDs +#define RGBLED_SPLIT { 8, 8 } // Set 65% column (option 1) and Macro (option 2) on by default #define VIA_EEPROM_LAYOUT_OPTIONS_DEFAULT 0x60 diff --git a/keyboards/keebio/viterbi/rev1/config.h b/keyboards/keebio/viterbi/rev1/config.h index 12a61448d16f..131bf8fbc68d 100644 --- a/keyboards/keebio/viterbi/rev1/config.h +++ b/keyboards/keebio/viterbi/rev1/config.h @@ -51,3 +51,4 @@ along with this program. If not, see . /* ws2812 RGB LED */ #define RGB_DI_PIN D3 #define RGBLED_NUM 14 +#define RGBLED_SPLIT { 7, 7 } diff --git a/keyboards/keebio/viterbi/rev2/config.h b/keyboards/keebio/viterbi/rev2/config.h index 0b78604d8f7f..83de01f32f85 100644 --- a/keyboards/keebio/viterbi/rev2/config.h +++ b/keyboards/keebio/viterbi/rev2/config.h @@ -50,6 +50,7 @@ along with this program. If not, see . /* ws2812 RGB LED */ #define RGB_DI_PIN D3 #define RGBLED_NUM 14 +#define RGBLED_SPLIT { 7, 7 } /* Backlight LEDs */ #define BACKLIGHT_PIN B6 From d00ac5dfb6388957d51f2666d8bd223bd3529151 Mon Sep 17 00:00:00 2001 From: Sergey Vlasov Date: Wed, 12 Aug 2020 18:53:53 +0300 Subject: [PATCH 681/930] Add `st-flash` flash target (#9964) * Add `st-flash` flash target Add support for flashing the firmware via the `st-flash` utility from the STLink Tools package (https://github.com/stlink-org/stlink). * Add `st-flash` to the `qmk flash -b` output --- docs/flashing.md | 1 + lib/python/qmk/cli/flash.py | 1 + tmk_core/chibios.mk | 5 +++++ 3 files changed, 7 insertions(+) diff --git a/docs/flashing.md b/docs/flashing.md index 1f71c253c3a0..5c245c567546 100644 --- a/docs/flashing.md +++ b/docs/flashing.md @@ -239,3 +239,4 @@ There are a number of DFU commands that you can use to flash firmware to a STM32 * `:dfu-util-split-left` - This flashes the normal firmware, just like the default option (`:dfu-util`). However, this also configures the "Left Side" EEPROM setting for split keyboards. * `:dfu-util-split-right` - This flashes the normal firmware, just like the default option (`:dfu-util`). However, this also configures the "Right Side" EEPROM setting for split keyboards. * `:st-link-cli` - This allows you to flash the firmware via ST-LINK's CLI utility, rather than dfu-util. +* `:st-flash` - This allows you to flash the firmware via the `st-flash` utility from [STLink Tools](https://github.com/stlink-org/stlink), rather than dfu-util. diff --git a/lib/python/qmk/cli/flash.py b/lib/python/qmk/cli/flash.py index f8497071efd5..cefb9ca31a5e 100644 --- a/lib/python/qmk/cli/flash.py +++ b/lib/python/qmk/cli/flash.py @@ -27,6 +27,7 @@ def print_bootloader_help(): cli.echo('\tdfu-util-split-left') cli.echo('\tdfu-util-split-right') cli.echo('\tst-link-cli') + cli.echo('\tst-flash') cli.echo('For more info, visit https://docs.qmk.fm/#/flashing') diff --git a/tmk_core/chibios.mk b/tmk_core/chibios.mk index 4e8abc9be6c4..a218488a194f 100644 --- a/tmk_core/chibios.mk +++ b/tmk_core/chibios.mk @@ -318,12 +318,14 @@ ifneq ("$(SERIAL)","") endif ST_LINK_ARGS ?= +ST_FLASH_ARGS ?= # List any extra directories to look for libraries here. EXTRALIBDIRS = $(RULESPATH)/ld DFU_UTIL ?= dfu-util ST_LINK_CLI ?= st-link_cli +ST_FLASH ?= st-flash define EXEC_DFU_UTIL until $(DFU_UTIL) -l | grep -q "Found DFU"; do\ @@ -357,6 +359,9 @@ dfu-util-split-right: dfu-util st-link-cli: $(BUILD_DIR)/$(TARGET).hex sizeafter $(ST_LINK_CLI) $(ST_LINK_ARGS) -q -c SWD -p $(BUILD_DIR)/$(TARGET).hex -Rst +st-flash: $(BUILD_DIR)/$(TARGET).hex sizeafter + $(ST_FLASH) $(ST_FLASH_ARGS) --reset --format ihex write $(BUILD_DIR)/$(TARGET).hex + # Autodetect teensy loader ifndef TEENSY_LOADER_CLI From 167daa9cf8c6376a1c9b92ae7dfaa8bdac21f62a Mon Sep 17 00:00:00 2001 From: Nick Brassel Date: Sun, 16 Aug 2020 06:51:35 +1000 Subject: [PATCH 682/930] Add ability to dump all makefile variables for the specified target. (#8256) --- tmk_core/rules.mk | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/tmk_core/rules.mk b/tmk_core/rules.mk index 9bb341ecb115..a7053d185c60 100644 --- a/tmk_core/rules.mk +++ b/tmk_core/rules.mk @@ -396,6 +396,12 @@ show_path: @echo SRC=$(SRC) @echo OBJ=$(OBJ) +dump_vars: ERROR_IF_EMPTY="" +dump_vars: ERROR_IF_NONBOOL="" +dump_vars: ERROR_IF_UNSET="" +dump_vars: + @$(foreach V,$(sort $(.VARIABLES)),$(if $(filter-out environment% default automatic,$(origin $V)),$(info $V=$($V)))) + objs-size: for i in $(OBJ); do echo $$i; done | sort | xargs $(SIZE) @@ -436,7 +442,7 @@ $(eval $(foreach OUTPUT,$(OUTPUTS),$(shell mkdir -p $(OUTPUT) 2>/dev/null))) # Listing of phony targets. -.PHONY : all finish sizebefore sizeafter qmkversion \ +.PHONY : all dump_vars finish sizebefore sizeafter qmkversion \ gccversion build elf hex eep lss sym coff extcoff \ clean clean_list debug gdb-config show_path \ program teensy dfu dfu-ee dfu-start \ From 568cae28ec41acc84a4a60bc3e20120e33ebee89 Mon Sep 17 00:00:00 2001 From: Greg Wright Date: Sat, 15 Aug 2020 16:55:13 -0400 Subject: [PATCH 683/930] #define AUTO_SHIFT_SETUP (#8441) * #define AUTO_SHIFT_SETUP * Clarification Changed `#ifndef` to `#ifdef` and moved enable disable outside AUTO_SHIFT_SETUP * AUTO_SHIFT_NO_SETUp --- docs/feature_auto_shift.md | 2 +- quantum/process_keycode/process_auto_shift.c | 70 +++++++++++--------- quantum/quantum_keycodes.h | 4 +- 3 files changed, 41 insertions(+), 35 deletions(-) diff --git a/docs/feature_auto_shift.md b/docs/feature_auto_shift.md index f0b507bc618a..b21a7690d9e4 100644 --- a/docs/feature_auto_shift.md +++ b/docs/feature_auto_shift.md @@ -139,7 +139,7 @@ completely normal and with no intention of shifted keys. `KC_ASRP`. The keyboard will type by itself the value of your `AUTO_SHIFT_TIMEOUT`. 7. Update `AUTO_SHIFT_TIMEOUT` in your `config.h` with the value reported. -8. Remove `AUTO_SHIFT_SETUP` from your `config.h`. +8. Add `AUTO_SHIFT_NO_SETUP` to your `config.h`. 9. Remove the key bindings `KC_ASDN`, `KC_ASUP` and `KC_ASRP`. 10. Compile and upload your new firmware. diff --git a/quantum/process_keycode/process_auto_shift.c b/quantum/process_keycode/process_auto_shift.c index b474bda6912c..330037cefbb0 100644 --- a/quantum/process_keycode/process_auto_shift.c +++ b/quantum/process_keycode/process_auto_shift.c @@ -25,19 +25,6 @@ static uint16_t autoshift_time = 0; static uint16_t autoshift_timeout = AUTO_SHIFT_TIMEOUT; static uint16_t autoshift_lastkey = KC_NO; -void autoshift_timer_report(void) { - char display[8]; - - snprintf(display, 8, "\n%d\n", autoshift_timeout); - - send_string((const char *)display); -} - -void autoshift_on(uint16_t keycode) { - autoshift_time = timer_read(); - autoshift_lastkey = keycode; -} - void autoshift_flush(void) { if (autoshift_lastkey != KC_NO) { uint16_t elapsed = timer_elapsed(autoshift_time); @@ -53,21 +40,36 @@ void autoshift_flush(void) { } } -void autoshift_enable(void) { autoshift_enabled = true; } -void autoshift_disable(void) { +void autoshift_on(uint16_t keycode) { + autoshift_time = timer_read(); + autoshift_lastkey = keycode; +} + +void autoshift_toggle(void) { + if (autoshift_enabled) { autoshift_enabled = false; autoshift_flush(); + } else { + autoshift_enabled = true; + } } -void autoshift_toggle(void) { - if (autoshift_enabled) { - autoshift_enabled = false; - autoshift_flush(); - } else { - autoshift_enabled = true; - } +void autoshift_enable(void) { autoshift_enabled = true; } +void autoshift_disable(void) { + autoshift_enabled = false; + autoshift_flush(); } +#ifndef AUTO_SHIFT_NO_SETUP +void autoshift_timer_report(void) { + char display[8]; + + snprintf(display, 8, "\n%d\n", autoshift_timeout); + + send_string((const char *)display); +} +#endif + bool get_autoshift_state(void) { return autoshift_enabled; } uint16_t get_autoshift_timeout(void) { return autoshift_timeout; } @@ -77,21 +79,11 @@ void set_autoshift_timeout(uint16_t timeout) { autoshift_timeout = timeout; } bool process_auto_shift(uint16_t keycode, keyrecord_t *record) { if (record->event.pressed) { switch (keycode) { - case KC_ASUP: - autoshift_timeout += 5; - return true; - - case KC_ASDN: - autoshift_timeout -= 5; - return true; - - case KC_ASRP: - autoshift_timer_report(); - return true; case KC_ASTG: autoshift_toggle(); return true; + case KC_ASON: autoshift_enable(); return true; @@ -99,6 +91,18 @@ bool process_auto_shift(uint16_t keycode, keyrecord_t *record) { autoshift_disable(); return true; +# ifndef AUTO_SHIFT_NO_SETUP + case KC_ASUP: + autoshift_timeout += 5; + return true; + case KC_ASDN: + autoshift_timeout -= 5; + return true; + + case KC_ASRP: + autoshift_timer_report(); + return true; +# endif # ifndef NO_AUTO_SHIFT_ALPHA case KC_A ... KC_Z: # endif diff --git a/quantum/quantum_keycodes.h b/quantum/quantum_keycodes.h index 5e7c9ad33c6e..a0a7bc340f23 100644 --- a/quantum/quantum_keycodes.h +++ b/quantum/quantum_keycodes.h @@ -123,10 +123,12 @@ enum quantum_keycodes { KC_LEAD, #endif - // Auto Shift setup +// Auto Shift setup +#ifndef AUTO_SHIFT_NO_SETUP KC_ASUP, KC_ASDN, KC_ASRP, +#endif KC_ASTG, KC_ASON, KC_ASOFF, From 21a00b7f020a87af1fbeb31b96a17e0f25a34e96 Mon Sep 17 00:00:00 2001 From: Joel Challis Date: Sat, 15 Aug 2020 22:22:11 +0100 Subject: [PATCH 684/930] ARM backlight - timer implementation (#8291) * Add GPT timer based backlight driver * Update to tim15 to avoid conflict with audio * Update quantum/backlight/backlight_timer.c --- common_features.mk | 2 +- .../GENERIC_STM32_F303XC/configs/mcuconf.h | 2 +- quantum/backlight/backlight_timer.c | 167 ++++++++++++++++++ 3 files changed, 169 insertions(+), 2 deletions(-) create mode 100644 quantum/backlight/backlight_timer.c diff --git a/common_features.mk b/common_features.mk index f9fca4669ceb..2806544f8b5b 100644 --- a/common_features.mk +++ b/common_features.mk @@ -264,7 +264,7 @@ ifeq ($(strip $(BACKLIGHT_CUSTOM_DRIVER)), yes) BACKLIGHT_DRIVER := custom endif -VALID_BACKLIGHT_TYPES := pwm software custom +VALID_BACKLIGHT_TYPES := pwm timer software custom BACKLIGHT_ENABLE ?= no BACKLIGHT_DRIVER ?= pwm diff --git a/platforms/chibios/GENERIC_STM32_F303XC/configs/mcuconf.h b/platforms/chibios/GENERIC_STM32_F303XC/configs/mcuconf.h index 3b15883485e5..ac2d9a1eed5d 100644 --- a/platforms/chibios/GENERIC_STM32_F303XC/configs/mcuconf.h +++ b/platforms/chibios/GENERIC_STM32_F303XC/configs/mcuconf.h @@ -144,7 +144,7 @@ #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_TIM15 TRUE #define STM32_GPT_USE_TIM16 FALSE #define STM32_GPT_USE_TIM17 FALSE #define STM32_GPT_TIM1_IRQ_PRIORITY 7 diff --git a/quantum/backlight/backlight_timer.c b/quantum/backlight/backlight_timer.c new file mode 100644 index 000000000000..c32c35c1543a --- /dev/null +++ b/quantum/backlight/backlight_timer.c @@ -0,0 +1,167 @@ +#include "quantum.h" +#include "backlight.h" +#include "backlight_driver_common.h" +#include "debug.h" + +#ifndef BACKLIGHT_GPT_DRIVER +# define BACKLIGHT_GPT_DRIVER GPTD15 +#endif + +// Platform specific implementations +static void backlight_timer_configure(bool enable); +static void backlight_timer_set_duty(uint16_t duty); +static uint16_t backlight_timer_get_duty(void); + +// 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) { + backlight_pins_init(); + + backlight_set(get_backlight_level()); + +#ifdef BACKLIGHT_BREATHING + if (is_backlight_breathing()) { + breathing_enable(); + } +#endif +} + +void backlight_set(uint8_t level) { + if (level > BACKLIGHT_LEVELS) level = BACKLIGHT_LEVELS; + + backlight_pins_off(); + + backlight_timer_set_duty(cie_lightness(0xFFFFU / BACKLIGHT_LEVELS * level)); + backlight_timer_configure(level != 0); +} + +static void backlight_timer_top(void) { +#ifdef BACKLIGHT_BREATHING + if (is_breathing()) { + breathing_task(); + } +#endif + + if (backlight_timer_get_duty() > 256) { + backlight_pins_on(); + } +} + +static void backlight_timer_cmp(void) { backlight_pins_off(); } + +void backlight_task(void) {} + +#ifdef BACKLIGHT_BREATHING +# define BREATHING_STEPS 128 + +static bool breathing = false; +static uint16_t breathing_counter = 0; + +/* 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 * get_backlight_level(); } + +void breathing_task(void) { + 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; + + // printf("index:%u\n", index); + + backlight_timer_set_duty(cie_lightness(scale_backlight((uint16_t)breathing_table[index] * 256))); +} + +bool is_breathing(void) { return breathing; } + +void breathing_enable(void) { + breathing_counter = 0; + breathing = true; +} +void breathing_disable(void) { breathing = false; } + +void breathing_pulse(void) { + backlight_set(is_backlight_enabled() ? 0 : BACKLIGHT_LEVELS); + wait_ms(10); + backlight_set(is_backlight_enabled() ? get_backlight_level() : 0); +} +#endif + +#ifdef PROTOCOL_CHIBIOS +// On Platforms where timers fire every tick and have no capture/top events +// - fake event in the normal timer callback +uint16_t s_duty = 0; + +static void timerCallback(void) { + /* Software PWM + * timer:1111 1111 1111 1111 + * \______/| \_______/____ count(0-255) + * \ \______________ unused(1) + * \__________________ index of step table(0-127) + */ + + // this works for cca 65536 irqs/sec + static union { + uint16_t raw; + struct { + uint16_t count : 8; + uint8_t dummy : 1; + uint8_t index : 7; + } pwm; + } timer = {.raw = 0}; + + timer.raw++; + + if (timer.pwm.count == 0) { + // LED on + backlight_timer_top(); + } else if (timer.pwm.count == (s_duty / 256)) { + // LED off + backlight_timer_cmp(); + } +} + +static void backlight_timer_set_duty(uint16_t duty) { s_duty = duty; } +static uint16_t backlight_timer_get_duty(void) { return s_duty; } + +// ChibiOS - Map GPT timer onto Software PWM +static void gptTimerCallback(GPTDriver *gptp) { + (void)gptp; + timerCallback(); +} + +static void backlight_timer_configure(bool enable) { + static const GPTConfig gptcfg = {1000000, gptTimerCallback, 0, 0}; + + static bool s_init = false; + if (!s_init) { + gptStart(&BACKLIGHT_GPT_DRIVER, &gptcfg); + s_init = true; + } + + if (enable) { + gptStartContinuous(&BACKLIGHT_GPT_DRIVER, gptcfg.frequency / 0xFFFF); + } else { + gptStopTimer(&BACKLIGHT_GPT_DRIVER); + } +} +#endif From 15b5ff1dc229703c86053ada87f6511a4efbded9 Mon Sep 17 00:00:00 2001 From: Joel Challis Date: Sun, 16 Aug 2020 11:13:45 +0100 Subject: [PATCH 685/930] Remove f072 backlight warning (#10040) * Remove f072 backlight warning * Remove f072 backlight warning from docs --- docs/feature_backlight.md | 2 -- quantum/backlight/backlight.c | 4 ---- 2 files changed, 6 deletions(-) diff --git a/docs/feature_backlight.md b/docs/feature_backlight.md index 9e467c708a28..6bb2bbed844b 100644 --- a/docs/feature_backlight.md +++ b/docs/feature_backlight.md @@ -160,8 +160,6 @@ See the ST datasheet for your particular MCU to determine these values. Unless y Currently only hardware PWM is supported, not timer assisted, and does not provide automatic configuration. -?> Backlight support for STM32F072 has had limited testing, so YMMV. If unsure, set `BACKLIGHT_ENABLE = no` in your `rules.mk`. - ### Software PWM Driver :id=software-pwm-driver In this mode, PWM is "emulated" 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`: diff --git a/quantum/backlight/backlight.c b/quantum/backlight/backlight.c index 34dd8cbdb5a7..113beb832f61 100644 --- a/quantum/backlight/backlight.c +++ b/quantum/backlight/backlight.c @@ -20,10 +20,6 @@ along with this program. If not, see . #include "eeconfig.h" #include "debug.h" -#if defined(STM32F0XX) || defined(STM32F0xx) -# pragma message("Backlight support for STMF072 has had limited testing, YMMV. If unsure, set 'BACKLIGHT_ENABLE = no' in your rules.mk") -#endif - backlight_config_t backlight_config; #ifdef BACKLIGHT_BREATHING From 9ef4526a2f6cdd2e708e7cfc37845a04749665dd Mon Sep 17 00:00:00 2001 From: Ryan Date: Tue, 18 Aug 2020 13:02:01 +1000 Subject: [PATCH 686/930] Remove unused CORTEX_VTOR_INIT (#10053) --- 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/converter/siemens_tastatur/rules.mk | 1 - keyboards/ergodox_infinity/rules.mk | 5 ----- .../bluepill/ld/STM32F103x8_stm32duino_bootloader.ld | 3 --- keyboards/handwired/onekey/bluepill/rules.mk | 1 - keyboards/handwired/z150/rules.mk | 1 - keyboards/infinity60/rules.mk | 5 ----- keyboards/wolfmarkclub/wm1/ld/wm1_f103.ld | 3 --- keyboards/wolfmarkclub/wm1/rules.mk | 1 - keyboards/zvecr/split_blackpill/rules.mk | 1 - platforms/chibios/ld/STM32F103x8_stm32duino_bootloader.ld | 3 --- 15 files changed, 29 deletions(-) diff --git a/keyboards/cannonkeys/ortho48/rules.mk b/keyboards/cannonkeys/ortho48/rules.mk index f2fc3e128e4d..5e18d91ca488 100644 --- a/keyboards/cannonkeys/ortho48/rules.mk +++ b/keyboards/cannonkeys/ortho48/rules.mk @@ -2,7 +2,6 @@ MCU = STM32F103 # GENERIC STM32F103C8T6 board - stm32duino bootloader -OPT_DEFS = -DCORTEX_VTOR_INIT=0x2000 MCU_LDSCRIPT = STM32F103x8_stm32duino_bootloader BOARD = STM32_F103_STM32DUINO diff --git a/keyboards/cannonkeys/ortho60/rules.mk b/keyboards/cannonkeys/ortho60/rules.mk index aaa14c2dbeff..80b31a12f4d4 100644 --- a/keyboards/cannonkeys/ortho60/rules.mk +++ b/keyboards/cannonkeys/ortho60/rules.mk @@ -2,7 +2,6 @@ MCU = STM32F103 # GENERIC STM32F103C8T6 board - stm32duino bootloader -OPT_DEFS = -DCORTEX_VTOR_INIT=0x2000 MCU_LDSCRIPT = STM32F103x8_stm32duino_bootloader BOARD = STM32_F103_STM32DUINO diff --git a/keyboards/cannonkeys/ortho75/rules.mk b/keyboards/cannonkeys/ortho75/rules.mk index fe9cec84c18d..ae196fd85019 100644 --- a/keyboards/cannonkeys/ortho75/rules.mk +++ b/keyboards/cannonkeys/ortho75/rules.mk @@ -2,7 +2,6 @@ MCU = STM32F103 # GENERIC STM32F103C8T6 board - stm32duino bootloader -OPT_DEFS = -DCORTEX_VTOR_INIT=0x2000 MCU_LDSCRIPT = STM32F103x8_stm32duino_bootloader BOARD = STM32_F103_STM32DUINO diff --git a/keyboards/cannonkeys/practice60/rules.mk b/keyboards/cannonkeys/practice60/rules.mk index 395913736828..3713b6078df7 100644 --- a/keyboards/cannonkeys/practice60/rules.mk +++ b/keyboards/cannonkeys/practice60/rules.mk @@ -2,7 +2,6 @@ MCU = STM32F103 # GENERIC STM32F103C8T6 board - stm32duino bootloader -OPT_DEFS = -DCORTEX_VTOR_INIT=0x2000 MCU_LDSCRIPT = STM32F103x8_stm32duino_bootloader BOARD = STM32_F103_STM32DUINO diff --git a/keyboards/cannonkeys/practice65/rules.mk b/keyboards/cannonkeys/practice65/rules.mk index d6d2b3fe7ef1..5fd4892dc591 100644 --- a/keyboards/cannonkeys/practice65/rules.mk +++ b/keyboards/cannonkeys/practice65/rules.mk @@ -2,7 +2,6 @@ MCU = STM32F103 # GENERIC STM32F103C8T6 board - stm32duino bootloader -OPT_DEFS = -DCORTEX_VTOR_INIT=0x2000 MCU_LDSCRIPT = STM32F103x8_stm32duino_bootloader BOARD = STM32_F103_STM32DUINO diff --git a/keyboards/converter/siemens_tastatur/rules.mk b/keyboards/converter/siemens_tastatur/rules.mk index bc5875962bb5..03e6b0f49d4a 100644 --- a/keyboards/converter/siemens_tastatur/rules.mk +++ b/keyboards/converter/siemens_tastatur/rules.mk @@ -2,7 +2,6 @@ MCU = STM32F103 # GENERIC STM32F103C8T6 board - stm32duino bootloader -OPT_DEFS = -DCORTEX_VTOR_INIT=0x2000 MCU_LDSCRIPT = STM32F103x8_stm32duino_bootloader BOARD = STM32_F103_STM32DUINO diff --git a/keyboards/ergodox_infinity/rules.mk b/keyboards/ergodox_infinity/rules.mk index 31bc20454c30..29e5c6dd7360 100644 --- a/keyboards/ergodox_infinity/rules.mk +++ b/keyboards/ergodox_infinity/rules.mk @@ -13,11 +13,6 @@ MCU = MK20DX256 # - MK20DX256BLDR8 for Infinity ErgoDox with Kiibohd bootloader MCU_LDSCRIPT = MK20DX256BLDR8 -# 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=0x00002000 - BOOTLOADER = dfu # Build Options diff --git a/keyboards/handwired/bluepill/ld/STM32F103x8_stm32duino_bootloader.ld b/keyboards/handwired/bluepill/ld/STM32F103x8_stm32duino_bootloader.ld index f9bfe9c00527..23e44bd63af0 100644 --- a/keyboards/handwired/bluepill/ld/STM32F103x8_stm32duino_bootloader.ld +++ b/keyboards/handwired/bluepill/ld/STM32F103x8_stm32duino_bootloader.ld @@ -16,9 +16,6 @@ /* * ST32F103xB memory setup for use with the maplemini bootloader. - * You will have to - * #define CORTEX_VTOR_INIT 0x5000 - * in your projects chconf.h */ MEMORY { diff --git a/keyboards/handwired/onekey/bluepill/rules.mk b/keyboards/handwired/onekey/bluepill/rules.mk index 83a81a56b185..66ce517445db 100644 --- a/keyboards/handwired/onekey/bluepill/rules.mk +++ b/keyboards/handwired/onekey/bluepill/rules.mk @@ -2,7 +2,6 @@ MCU = STM32F103 # GENERIC STM32F103C8T6 board - stm32duino bootloader -OPT_DEFS = -DCORTEX_VTOR_INIT=0x2000 MCU_LDSCRIPT = STM32F103x8_stm32duino_bootloader BOARD = STM32_F103_STM32DUINO diff --git a/keyboards/handwired/z150/rules.mk b/keyboards/handwired/z150/rules.mk index 08bd7908eb5d..fd1d3820337d 100644 --- a/keyboards/handwired/z150/rules.mk +++ b/keyboards/handwired/z150/rules.mk @@ -1,7 +1,6 @@ MCU = STM32F103 # GENERIC STM32F103C8T6 board - stm32duino bootloader -OPT_DEFS = -DCORTEX_VTOR_INIT=0x2000 MCU_LDSCRIPT = STM32F103x8_stm32duino_bootloader BOARD = STM32_F103_STM32DUINO STM32_BOOTLOADER_ADDRESS = 0x80000000 diff --git a/keyboards/infinity60/rules.mk b/keyboards/infinity60/rules.mk index 579eab0f3fa2..e6b234d821c6 100644 --- a/keyboards/infinity60/rules.mk +++ b/keyboards/infinity60/rules.mk @@ -21,11 +21,6 @@ MCU_LDSCRIPT = MK20DX128BLDR4 # - MCHCK_K20 for Infinity KB BOARD = MCHCK_K20 -# 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 - BOOTLOADER = dfu # Build Options diff --git a/keyboards/wolfmarkclub/wm1/ld/wm1_f103.ld b/keyboards/wolfmarkclub/wm1/ld/wm1_f103.ld index 41362282bc6b..3959f395ac88 100644 --- a/keyboards/wolfmarkclub/wm1/ld/wm1_f103.ld +++ b/keyboards/wolfmarkclub/wm1/ld/wm1_f103.ld @@ -16,9 +16,6 @@ /* * STM32F103xC memory setup for use with the WM1 mass-storage device bootloader. - * You will have to change: - * OPT_DEFS = -DCORTEX_VTOR_INIT=0x10000 - * in your board's rules.mk */ MEMORY { diff --git a/keyboards/wolfmarkclub/wm1/rules.mk b/keyboards/wolfmarkclub/wm1/rules.mk index 14ddab26d9dc..fcd4da1affc9 100644 --- a/keyboards/wolfmarkclub/wm1/rules.mk +++ b/keyboards/wolfmarkclub/wm1/rules.mk @@ -2,7 +2,6 @@ MCU = STM32F103 # GENERIC STM32F103C8T6 board - mass storage bootloader -OPT_DEFS = -DCORTEX_VTOR_INIT=0x10000 MCU_LDSCRIPT = wm1_f103 BOARD = STM32_F103_STM32DUINO diff --git a/keyboards/zvecr/split_blackpill/rules.mk b/keyboards/zvecr/split_blackpill/rules.mk index 95d901ee06a8..151ed15d8498 100644 --- a/keyboards/zvecr/split_blackpill/rules.mk +++ b/keyboards/zvecr/split_blackpill/rules.mk @@ -2,7 +2,6 @@ MCU = STM32F103 # GENERIC STM32F103C8T6 board - stm32duino bootloader -OPT_DEFS = -DCORTEX_VTOR_INIT=0x2000 MCU_LDSCRIPT = STM32F103x8_stm32duino_bootloader BOARD = STM32_F103_STM32DUINO STM32_BOOTLOADER_ADDRESS = 0x80000000 diff --git a/platforms/chibios/ld/STM32F103x8_stm32duino_bootloader.ld b/platforms/chibios/ld/STM32F103x8_stm32duino_bootloader.ld index d0688ef60164..bb852422a34a 100644 --- a/platforms/chibios/ld/STM32F103x8_stm32duino_bootloader.ld +++ b/platforms/chibios/ld/STM32F103x8_stm32duino_bootloader.ld @@ -16,9 +16,6 @@ /* * ST32F103xB memory setup for use with the maplemini bootloader. - * You will have to - * #define CORTEX_VTOR_INIT 0x5000 - * in your projects chconf.h */ MEMORY { From 47f8947bf5aa3ff1cbb484a2d6dc3fa818987700 Mon Sep 17 00:00:00 2001 From: yiancar Date: Wed, 19 Aug 2020 02:16:35 +0100 Subject: [PATCH 687/930] Update vusb to match 3rd endpoint. (#9020) * Update vusb to match 3rd endpoint. - With the addition of https://github.com/qmk/v-usb/pull/1 a 3rd endpoint (endpoint4) becomes available. - We can assign mouse/extrakeys to that endpoint as its a desirable feature and leave rawhid and console to compete for the 2nd endpoint. NOTE: The version of vusb.c in future branch is older than master. Just remember that it will need a #error if both raw_hid and console are enabled at the same time. * Final Fixes * Update tmk_core/protocol/vusb/vusb.c * Update tmk_core/protocol/vusb/vusb.c * Update tmk_core/protocol/vusb/usbconfig.h * Update tmk_core/protocol/vusb/usbconfig.h * Update tmk_core/protocol/vusb/usbconfig.h * Update tmk_core/protocol/vusb/usbconfig.h * Updated vusb submodule to latest commit --- lib/vusb | 2 +- tmk_core/protocol/vusb/usbconfig.h | 20 +++++++++++++++----- tmk_core/protocol/vusb/vusb.c | 18 +++++++++++------- 3 files changed, 27 insertions(+), 13 deletions(-) diff --git a/lib/vusb b/lib/vusb index 9a42d205eb60..bdb53e4c043d 160000 --- a/lib/vusb +++ b/lib/vusb @@ -1 +1 @@ -Subproject commit 9a42d205eb60faca494ff4eabce8d59f0ec0fc7f +Subproject commit bdb53e4c043d089279d9891b68bea77614cb97ee diff --git a/tmk_core/protocol/vusb/usbconfig.h b/tmk_core/protocol/vusb/usbconfig.h index dcef7584c4e0..041f7bd095a6 100644 --- a/tmk_core/protocol/vusb/usbconfig.h +++ b/tmk_core/protocol/vusb/usbconfig.h @@ -85,9 +85,19 @@ section at the end of this file). /* 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_CFG_HAVE_INTRIN_ENDPOINT4 1 +/* Define this to 1 if you want to compile a version with three endpoints: The + * default control endpoint 0, an interrupt-in endpoint 4 (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_EP4_NUMBER 4 +/* If the so-called endpoint 4 is used, it can now be configured to any other + * endpoint number (except 0) with this macro. Default if undefined is 4. + */ /* #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. + * interrupt/bulk endpoints 1, 3 and 4. 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! */ @@ -100,10 +110,10 @@ section at the end of this file). #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. + * usbSetInterrupt(), usbSetInterrupt3() and usbSetInterrupt4() 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 diff --git a/tmk_core/protocol/vusb/vusb.c b/tmk_core/protocol/vusb/vusb.c index 735a1c1d307f..77bbbd7bd4d0 100644 --- a/tmk_core/protocol/vusb/vusb.c +++ b/tmk_core/protocol/vusb/vusb.c @@ -62,12 +62,16 @@ enum usb_interfaces { TOTAL_INTERFACES = NEXT_INTERFACE }; -#define MAX_INTERFACES 2 +#define MAX_INTERFACES 3 #if (NEXT_INTERFACE - 1) > MAX_INTERFACES # error There are not enough available interfaces to support all functions. Please disable one or more of the following: Mouse Keys, Extra Keys, Raw HID, Console #endif +#if (defined(MOUSE_ENABLE) || defined(EXTRAKEY_ENABLE)) && CONSOLE_ENABLE +# error Mouse/Extra Keys share an endpoint with Console. Please disable one of the two. +#endif + static uint8_t keyboard_led_state = 0; static uint8_t vusb_idle_rate = 0; @@ -116,16 +120,16 @@ void raw_hid_send(uint8_t *data, uint8_t length) { uint8_t *temp = data; for (uint8_t i = 0; i < 4; i++) { - while (!usbInterruptIsReady3()) { + while (!usbInterruptIsReady4()) { usbPoll(); } - usbSetInterrupt3(temp, 8); + usbSetInterrupt4(temp, 8); temp += 8; } - while (!usbInterruptIsReady3()) { + while (!usbInterruptIsReady4()) { usbPoll(); } - usbSetInterrupt3(0, 0); + usbSetInterrupt4(0, 0); } __attribute__((weak)) void raw_hid_receive(uint8_t *data, uint8_t length) { @@ -683,7 +687,7 @@ const PROGMEM usbConfigurationDescriptor_t usbConfigurationDescriptor = { .bLength = sizeof(usbEndpointDescriptor_t), .bDescriptorType = USBDESCR_ENDPOINT }, - .bEndpointAddress = (USBRQ_DIR_DEVICE_TO_HOST | USB_CFG_EP3_NUMBER), + .bEndpointAddress = (USBRQ_DIR_DEVICE_TO_HOST | USB_CFG_EP4_NUMBER), .bmAttributes = 0x03, .wMaxPacketSize = RAW_EPSIZE, .bInterval = USB_POLLING_INTERVAL_MS @@ -693,7 +697,7 @@ const PROGMEM usbConfigurationDescriptor_t usbConfigurationDescriptor = { .bLength = sizeof(usbEndpointDescriptor_t), .bDescriptorType = USBDESCR_ENDPOINT }, - .bEndpointAddress = (USBRQ_DIR_HOST_TO_DEVICE | USB_CFG_EP3_NUMBER), + .bEndpointAddress = (USBRQ_DIR_HOST_TO_DEVICE | USB_CFG_EP4_NUMBER), .bmAttributes = 0x03, .wMaxPacketSize = RAW_EPSIZE, .bInterval = USB_POLLING_INTERVAL_MS From 3f392c09b60d46d9e4a4d3cc150a26294dea4da7 Mon Sep 17 00:00:00 2001 From: Ryan Date: Wed, 19 Aug 2020 22:46:15 +1000 Subject: [PATCH 688/930] More Bluetooth refactoring (#9905) --- tmk_core/common/progmem.h | 1 + tmk_core/protocol/lufa/adafruit_ble.h | 23 +++++++++++------------ tmk_core/protocol/lufa/outputselect.c | 14 ++++++++++++-- tmk_core/protocol/lufa/outputselect.h | 6 +++++- tmk_core/protocol/serial.h | 5 +---- 5 files changed, 30 insertions(+), 19 deletions(-) diff --git a/tmk_core/common/progmem.h b/tmk_core/common/progmem.h index 39a918fe9891..41b5b537cede 100644 --- a/tmk_core/common/progmem.h +++ b/tmk_core/common/progmem.h @@ -4,6 +4,7 @@ # include #else # define PROGMEM +# define PGM_P const char * # define memcpy_P(dest, src, n) memcpy(dest, src, n) # define pgm_read_byte(address_short) *((uint8_t*)(address_short)) # define pgm_read_word(address_short) *((uint16_t*)(address_short)) diff --git a/tmk_core/protocol/lufa/adafruit_ble.h b/tmk_core/protocol/lufa/adafruit_ble.h index cef46fe9f75a..aebded7b31bb 100644 --- a/tmk_core/protocol/lufa/adafruit_ble.h +++ b/tmk_core/protocol/lufa/adafruit_ble.h @@ -2,18 +2,19 @@ * Author: Wez Furlong, 2016 * Supports the Adafruit BLE board built around the nRF51822 chip. */ + #pragma once -#ifdef MODULE_ADAFRUIT_BLE -# include -# include -# include -# include "config_common.h" -# include "progmem.h" +#include +#include +#include + +#include "config_common.h" +#include "progmem.h" -# ifdef __cplusplus +#ifdef __cplusplus extern "C" { -# endif +#endif /* Instruct the module to enable HID keyboard support and reset */ extern bool adafruit_ble_enable_keyboard(void); @@ -54,8 +55,6 @@ extern uint32_t adafruit_ble_read_battery_voltage(void); extern bool adafruit_ble_set_mode_leds(bool on); extern bool adafruit_ble_set_power_level(int8_t level); -# ifdef __cplusplus +#ifdef __cplusplus } -# endif - -#endif // MODULE_ADAFRUIT_BLE +#endif diff --git a/tmk_core/protocol/lufa/outputselect.c b/tmk_core/protocol/lufa/outputselect.c index b115ea9691ef..f758c652809b 100644 --- a/tmk_core/protocol/lufa/outputselect.c +++ b/tmk_core/protocol/lufa/outputselect.c @@ -12,8 +12,12 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -#include "lufa.h" #include "outputselect.h" + +#if defined(PROTOCOL_LUFA) +# include "lufa.h" +#endif + #ifdef MODULE_ADAFRUIT_BLE # include "adafruit_ble.h" #endif @@ -35,12 +39,18 @@ void set_output(uint8_t output) { */ __attribute__((weak)) void set_output_user(uint8_t output) {} +static bool is_usb_configured(void) { +#if defined(PROTOCOL_LUFA) + return USB_DeviceState == DEVICE_STATE_Configured; +#endif +} + /** \brief Auto Detect Output * * FIXME: Needs doc */ uint8_t auto_detect_output(void) { - if (USB_DeviceState == DEVICE_STATE_Configured) { + if (is_usb_configured()) { return OUTPUT_USB; } diff --git a/tmk_core/protocol/lufa/outputselect.h b/tmk_core/protocol/lufa/outputselect.h index 24fe4daa24fe..7f7ed00b954d 100644 --- a/tmk_core/protocol/lufa/outputselect.h +++ b/tmk_core/protocol/lufa/outputselect.h @@ -12,6 +12,10 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ +#pragma once + +#include + enum outputs { OUTPUT_AUTO, @@ -37,4 +41,4 @@ enum outputs { void set_output(uint8_t output); void set_output_user(uint8_t output); uint8_t auto_detect_output(void); -uint8_t where_to_send(void); \ No newline at end of file +uint8_t where_to_send(void); diff --git a/tmk_core/protocol/serial.h b/tmk_core/protocol/serial.h index 93ac998983fe..b70d117d7c75 100644 --- a/tmk_core/protocol/serial.h +++ b/tmk_core/protocol/serial.h @@ -35,13 +35,10 @@ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifndef SERIAL_H -#define SERIAL_H +#pragma once /* host role */ void serial_init(void); uint8_t serial_recv(void); int16_t serial_recv2(void); void serial_send(uint8_t data); - -#endif From 92385b3fb617326b129609726020453c8949c7f8 Mon Sep 17 00:00:00 2001 From: Drashna Jaelre Date: Sat, 22 Aug 2020 01:21:06 -0700 Subject: [PATCH 689/930] Better handle LTO_ENABLE (#9832) * Better handle LTO_ENABLE Especially when calling from command line * Replace LINK_TIME_OPTIMIZATION_ENABLE with LTO_ENABLE * Remove long for LTO from show_options.mk --- docs/config_options.md | 4 +--- docs/ja/config_options.md | 4 +--- keyboards/1upkeyboards/sweet16/v1/rules.mk | 2 +- keyboards/1upkeyboards/sweet16/v2/promicro/rules.mk | 2 +- keyboards/bm60rgb/rules.mk | 2 +- keyboards/clueboard/66/keymaps/via/rules.mk | 2 +- keyboards/clueboard/card/rules.mk | 2 +- keyboards/converter/usb_usb/keymaps/chriskopher/rules.mk | 2 +- keyboards/crkbd/keymaps/ninjonas/rules.mk | 2 +- keyboards/crkbd/keymaps/rpbaptist/rules.mk | 2 +- keyboards/dz60/keymaps/via/rules.mk | 2 +- keyboards/dztech/dz60rgb/keymaps/xunz/rules.mk | 3 +-- keyboards/dztech/dz65rgb/keymaps/chocol8/rules.mk | 3 +-- keyboards/dztech/dz65rgb/keymaps/matthewrobo/rules.mk | 3 +-- keyboards/ergodox_ez/keymaps/hacker_dvorak/rules.mk | 2 +- keyboards/ergodox_ez/keymaps/nathanvercaemert/rules.mk | 2 +- keyboards/flx/virgo/rules.mk | 3 +-- keyboards/gray_studio/think65/hotswap/rules.mk | 2 +- keyboards/gray_studio/think65/solder/rules.mk | 2 +- keyboards/handwired/promethium/rules.mk | 2 +- keyboards/helix/pico/keymaps/biacco/rules.mk | 2 +- keyboards/helix/pico/keymaps/default/rules.mk | 2 +- keyboards/helix/pico/keymaps/mtei/rules.mk | 2 +- keyboards/helix/pico/local_features.mk | 6 +++--- keyboards/helix/rev2/keymaps/default/rules.mk | 2 +- keyboards/helix/rev2/keymaps/edvorakjp/rules.mk | 2 +- keyboards/helix/rev2/keymaps/five_rows/rules.mk | 2 +- keyboards/helix/rev2/keymaps/five_rows_jis/rules.mk | 2 +- keyboards/helix/rev2/keymaps/froggy/rules.mk | 2 +- keyboards/helix/rev2/keymaps/froggy_106/rules.mk | 2 +- keyboards/helix/rev2/keymaps/led_test/rules.mk | 2 +- keyboards/helix/rev2/keymaps/yshrsmz/rules.mk | 2 +- keyboards/helix/rev2/local_features.mk | 2 +- keyboards/hineybush/h88/rules.mk | 2 +- keyboards/hotdox/keymaps/ninjonas/rules.mk | 2 +- keyboards/id80/keymaps/via/rules.mk | 2 +- keyboards/kc60/keymaps/noroadsleft/rules.mk | 2 +- keyboards/keebio/bdn9/keymaps/via/rules.mk | 2 +- keyboards/keebio/iris/keymaps/pvinis/rules.mk | 2 +- keyboards/keebio/iris/keymaps/via/rules.mk | 2 +- keyboards/keebio/quefrency/keymaps/drashna_ms/rules.mk | 2 +- keyboards/keebio/quefrency/keymaps/via/rules.mk | 2 +- keyboards/kyria/keymaps/ninjonas/rules.mk | 4 ++-- keyboards/kyria/rules.mk | 2 +- keyboards/launchpad/keymaps/via/rules.mk | 2 +- keyboards/lily58/keymaps/ninjonas/rules.mk | 2 +- keyboards/pinky/3/keymaps/ninjonas/rules.mk | 2 +- keyboards/planck/keymaps/oryx/rules.mk | 2 +- keyboards/planck/keymaps/sascha/rules.mk | 2 +- keyboards/planck/keymaps/tylerwince/rules.mk | 2 +- keyboards/preonic/rev1/rules.mk | 2 +- keyboards/preonic/rev2/rules.mk | 2 +- keyboards/rgbkb/sol/keymaps/kageurufu/rules.mk | 3 +-- keyboards/rgbkb/sol/rev2/rules.mk | 2 +- keyboards/rgbkb/zygomorph/keymaps/5x6pad/rules.mk | 2 +- keyboards/rgbkb/zygomorph/keymaps/default/rules.mk | 2 +- keyboards/rgbkb/zygomorph/keymaps/default_oled/rules.mk | 2 +- keyboards/rgbkb/zygomorph/keymaps/xulkal/rules.mk | 2 +- keyboards/tg4x/rules.mk | 2 +- keyboards/tkc/candybar/lefty/rules.mk | 2 +- keyboards/tkc/candybar/righty/rules.mk | 2 +- keyboards/v60_type_r/rules.mk | 2 +- keyboards/vitamins_included/rules.mk | 2 +- keyboards/xd004/v1/config.h | 2 +- keyboards/xd004/v1/rules.mk | 2 +- keyboards/xd84/rules.mk | 2 +- keyboards/xd96/rules.mk | 2 +- keyboards/yushakobo/quick7/config.h | 2 +- show_options.mk | 3 +-- tmk_core/common.mk | 9 +++------ tmk_core/common/action.h | 2 +- tmk_core/common/command.c | 2 +- users/bcat/rules.mk | 2 +- users/dshields/rules.mk | 3 +-- users/issmirnov/rules.mk | 2 +- users/kuchosauronad0/rules.mk | 4 ++-- users/pvinis/rules.mk | 2 +- users/yanfali/rules.mk | 2 +- users/yet-another-developer/rules.mk | 2 +- 79 files changed, 85 insertions(+), 99 deletions(-) diff --git a/docs/config_options.md b/docs/config_options.md index 81a3b4b61c94..a323741c2a05 100644 --- a/docs/config_options.md +++ b/docs/config_options.md @@ -324,11 +324,9 @@ This is a [make](https://www.gnu.org/software/make/manual/make.html) file that i ``` * `LAYOUTS` * A list of [layouts](feature_layouts.md) this keyboard supports. -* `LINK_TIME_OPTIMIZATION_ENABLE` +* `LTO_ENABLE` * Enables Link Time Optimization (LTO) when compiling the keyboard. This makes the process take longer, but it can significantly reduce the compiled size (and since the firmware is small, the added time is not noticeable). However, this will automatically disable the legacy TMK Macros and Functions features, as these break when LTO is enabled. It does this by automatically defining `NO_ACTION_MACRO` and `NO_ACTION_FUNCTION`. (Note: This does not affect QMK [Macros](feature_macros.md) and [Layers](feature_layers.md).) -* `LTO_ENABLE` - * 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` diff --git a/docs/ja/config_options.md b/docs/ja/config_options.md index b4cf3c888ca7..6ba7f6f1f330 100644 --- a/docs/ja/config_options.md +++ b/docs/ja/config_options.md @@ -322,11 +322,9 @@ QMK での全ての利用可能な設定にはデフォルトがあります。 ``` * `LAYOUTS` * このキーボードがサポートする[レイアウト](ja/feature_layouts.md)のリスト -* `LINK_TIME_OPTIMIZATION_ENABLE` +* `LTO_ENABLE` * キーボードをコンパイルする時に、Link Time Optimization (LTO) を有効にします。これは処理に時間が掛かりますが、コンパイルされたサイズを大幅に減らします (そして、ファームウェアが小さいため、追加の時間は分からないくらいです)。 ただし、LTO が有効な場合、古い TMK のマクロと関数の機能が壊れるため、自動的にこれらの機能を無効にします。これは `NO_ACTION_MACRO` と `NO_ACTION_FUNCTION` を自動的に定義することで行われます。(メモ: これは QMK の [マクロ](ja/feature_macros.md) と [レイヤー](ja/feature_layers.md) には影響を与えません。) -* `LTO_ENABLE` - * LINK_TIME_OPTIMIZATION_ENABLE と同じ意味です。`LINK_TIME_OPTIMIZATION_ENABLE` の代わりに `LTO_ENABLE` を使うことができます。 ## AVR MCU オプション * `MCU = atmega32u4` diff --git a/keyboards/1upkeyboards/sweet16/v1/rules.mk b/keyboards/1upkeyboards/sweet16/v1/rules.mk index 09bd9e9e25d6..4c4280cdd4cf 100644 --- a/keyboards/1upkeyboards/sweet16/v1/rules.mk +++ b/keyboards/1upkeyboards/sweet16/v1/rules.mk @@ -14,4 +14,4 @@ BOOTLOADER = caterina RGBLIGHT_ENABLE = yes BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality -LINK_TIME_OPTIMIZATION_ENABLE = yes +LTO_ENABLE = yes diff --git a/keyboards/1upkeyboards/sweet16/v2/promicro/rules.mk b/keyboards/1upkeyboards/sweet16/v2/promicro/rules.mk index 9f38504a8cb5..16510f76743c 100644 --- a/keyboards/1upkeyboards/sweet16/v2/promicro/rules.mk +++ b/keyboards/1upkeyboards/sweet16/v2/promicro/rules.mk @@ -18,4 +18,4 @@ CONSOLE_ENABLE = yes RGBLIGHT_ENABLE = no ENCODER_ENABLE = yes -LINK_TIME_OPTIMIZATION_ENABLE = yes +LTO_ENABLE = yes diff --git a/keyboards/bm60rgb/rules.mk b/keyboards/bm60rgb/rules.mk index 72bfd539da85..d888399cfcbd 100644 --- a/keyboards/bm60rgb/rules.mk +++ b/keyboards/bm60rgb/rules.mk @@ -31,7 +31,7 @@ BLUETOOTH_ENABLE = no # Enable 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 = WS2812 -LINK_TIME_OPTIMIZATION_ENABLE = yes +LTO_ENABLE = yes # partially generated by KBFirmware JSON to QMK Parser # https://noroadsleft.github.io/kbf_qmk_converter/ diff --git a/keyboards/clueboard/66/keymaps/via/rules.mk b/keyboards/clueboard/66/keymaps/via/rules.mk index e85bff468f68..7a49719505df 100644 --- a/keyboards/clueboard/66/keymaps/via/rules.mk +++ b/keyboards/clueboard/66/keymaps/via/rules.mk @@ -1,4 +1,4 @@ # rules.mk overrides to enable VIA VIA_ENABLE = yes -LINK_TIME_OPTIMIZATION_ENABLE = yes \ No newline at end of file +LTO_ENABLE = yes diff --git a/keyboards/clueboard/card/rules.mk b/keyboards/clueboard/card/rules.mk index 37d1d866efea..a1b003f29c5d 100644 --- a/keyboards/clueboard/card/rules.mk +++ b/keyboards/clueboard/card/rules.mk @@ -26,4 +26,4 @@ UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = yes # Audio output on port C6 -LINK_TIME_OPTIMIZATION_ENABLE = yes +LTO_ENABLE = yes diff --git a/keyboards/converter/usb_usb/keymaps/chriskopher/rules.mk b/keyboards/converter/usb_usb/keymaps/chriskopher/rules.mk index d80022853b1c..643e1d013b8c 100644 --- a/keyboards/converter/usb_usb/keymaps/chriskopher/rules.mk +++ b/keyboards/converter/usb_usb/keymaps/chriskopher/rules.mk @@ -19,6 +19,6 @@ EXTRAKEY_ENABLE = yes # Used for audio control and system control keys COMBO_ENABLE = yes # Used to allow chording of keys to trigger an action TAP_DANCE_ENABLE = yes # Used to allow multiple taps of a key to perform different actions -LINK_TIME_OPTIMIZATION_ENABLE = yes # Reduces the compiled firmware size +LTO_ENABLE = yes # Reduces the compiled firmware size SRC += combo.c tap_dance.c diff --git a/keyboards/crkbd/keymaps/ninjonas/rules.mk b/keyboards/crkbd/keymaps/ninjonas/rules.mk index 95cc3fed367d..0c7fb3afcb85 100644 --- a/keyboards/crkbd/keymaps/ninjonas/rules.mk +++ b/keyboards/crkbd/keymaps/ninjonas/rules.mk @@ -1,7 +1,7 @@ RGB_MATRIX_ENABLE = WS2812 MOUSEKEY_ENABLE = no OLED_DRIVER_ENABLE = yes -LINK_TIME_OPTIMIZATION_ENABLE = yes +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 diff --git a/keyboards/crkbd/keymaps/rpbaptist/rules.mk b/keyboards/crkbd/keymaps/rpbaptist/rules.mk index d9e8b701e28c..dedd5753e50d 100644 --- a/keyboards/crkbd/keymaps/rpbaptist/rules.mk +++ b/keyboards/crkbd/keymaps/rpbaptist/rules.mk @@ -1,5 +1,5 @@ #This enables Link Time Optimization.This can save a good chunk of space(several KB for me), but the macro and function... functions cause it to error out. -LINK_TIME_OPTIMIZATION_ENABLE = yes +LTO_ENABLE = yes #Build Options #change to "no" to disable the options, or define them in the Makefile in diff --git a/keyboards/dz60/keymaps/via/rules.mk b/keyboards/dz60/keymaps/via/rules.mk index ea9a831e1743..ca9fed0e6b53 100644 --- a/keyboards/dz60/keymaps/via/rules.mk +++ b/keyboards/dz60/keymaps/via/rules.mk @@ -1,2 +1,2 @@ -LINK_TIME_OPTIMIZATION_ENABLE = yes +LTO_ENABLE = yes VIA_ENABLE = yes diff --git a/keyboards/dztech/dz60rgb/keymaps/xunz/rules.mk b/keyboards/dztech/dz60rgb/keymaps/xunz/rules.mk index 7a77be4939f5..d12c8dc44ef3 100644 --- a/keyboards/dztech/dz60rgb/keymaps/xunz/rules.mk +++ b/keyboards/dztech/dz60rgb/keymaps/xunz/rules.mk @@ -1,5 +1,4 @@ NKRO_ENABLE = yes # USB Nkey Rollover # VELOCIKEY_ENABLE = yes -LINK_TIME_OPTIMIZATION_ENABLE = yes - +LTO_ENABLE = yes diff --git a/keyboards/dztech/dz65rgb/keymaps/chocol8/rules.mk b/keyboards/dztech/dz65rgb/keymaps/chocol8/rules.mk index 626329f811a7..1778a5e141ca 100644 --- a/keyboards/dztech/dz65rgb/keymaps/chocol8/rules.mk +++ b/keyboards/dztech/dz65rgb/keymaps/chocol8/rules.mk @@ -2,5 +2,4 @@ NKRO_ENABLE = yes # USB Nkey Rollover VELOCIKEY_ENABLE = yes # AUTO_SHIFT_ENABLE = yes # Auto Shift -LINK_TIME_OPTIMIZATION_ENABLE = yes - +LTO_ENABLE = yes diff --git a/keyboards/dztech/dz65rgb/keymaps/matthewrobo/rules.mk b/keyboards/dztech/dz65rgb/keymaps/matthewrobo/rules.mk index 9a75bb29dcba..29afe8cd0364 100644 --- a/keyboards/dztech/dz65rgb/keymaps/matthewrobo/rules.mk +++ b/keyboards/dztech/dz65rgb/keymaps/matthewrobo/rules.mk @@ -2,5 +2,4 @@ NKRO_ENABLE = yes # USB Nkey Rollover AUTO_SHIFT_ENABLE = yes # Auto Shift # VELOCIKEY_ENABLE = yes -LINK_TIME_OPTIMIZATION_ENABLE = yes - +LTO_ENABLE = yes diff --git a/keyboards/ergodox_ez/keymaps/hacker_dvorak/rules.mk b/keyboards/ergodox_ez/keymaps/hacker_dvorak/rules.mk index aa13f98bd609..2eda18ce4ff5 100644 --- a/keyboards/ergodox_ez/keymaps/hacker_dvorak/rules.mk +++ b/keyboards/ergodox_ez/keymaps/hacker_dvorak/rules.mk @@ -1,7 +1,7 @@ # Set any rules.mk overrides for your specific keymap here. # See rules at https://docs.qmk.fm/#/config_options?id=the-rulesmk-file -LINK_TIME_OPTIMIZATION_ENABLE = yes +LTO_ENABLE = yes NKRO_ENABLE = yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work TAP_DANCE_ENABLE = yes MOUSEKEY_ENABLE = yes # Mouse keys(+4700b). diff --git a/keyboards/ergodox_ez/keymaps/nathanvercaemert/rules.mk b/keyboards/ergodox_ez/keymaps/nathanvercaemert/rules.mk index b41c275dd135..31c3fe3c7415 100644 --- a/keyboards/ergodox_ez/keymaps/nathanvercaemert/rules.mk +++ b/keyboards/ergodox_ez/keymaps/nathanvercaemert/rules.mk @@ -1,6 +1,6 @@ # Set any rules.mk overrides for your specific keymap here. # See rules at https://docs.qmk.fm/#/config_options?id=the-rulesmk-file -LINK_TIME_OPTIMIZATION_ENABLE = yes +LTO_ENABLE = yes COMMAND_ENABLE = no RGBLIGHT_ENABLE = no TAP_DANCE_ENABLE=yes diff --git a/keyboards/flx/virgo/rules.mk b/keyboards/flx/virgo/rules.mk index 529d365b5939..cbf45a2b9be9 100644 --- a/keyboards/flx/virgo/rules.mk +++ b/keyboards/flx/virgo/rules.mk @@ -30,5 +30,4 @@ UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches -LINK_TIME_OPTIMIZATION_ENABLE = yes - +LTO_ENABLE = yes diff --git a/keyboards/gray_studio/think65/hotswap/rules.mk b/keyboards/gray_studio/think65/hotswap/rules.mk index 2d789ff59a66..5f85ff18adfb 100644 --- a/keyboards/gray_studio/think65/hotswap/rules.mk +++ b/keyboards/gray_studio/think65/hotswap/rules.mk @@ -32,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 -LINK_TIME_OPTIMIZATION_ENABLE = yes +LTO_ENABLE = yes LAYOUTS = 65_ansi_blocker diff --git a/keyboards/gray_studio/think65/solder/rules.mk b/keyboards/gray_studio/think65/solder/rules.mk index 2d789ff59a66..5f85ff18adfb 100644 --- a/keyboards/gray_studio/think65/solder/rules.mk +++ b/keyboards/gray_studio/think65/solder/rules.mk @@ -32,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 -LINK_TIME_OPTIMIZATION_ENABLE = yes +LTO_ENABLE = yes LAYOUTS = 65_ansi_blocker diff --git a/keyboards/handwired/promethium/rules.mk b/keyboards/handwired/promethium/rules.mk index 19d20ee03fb2..4b96e2f691c9 100644 --- a/keyboards/handwired/promethium/rules.mk +++ b/keyboards/handwired/promethium/rules.mk @@ -45,4 +45,4 @@ SRC += rgbsps.c SRC += analog.c SRC += matrix.c -LINK_TIME_OPTIMIZATION_ENABLE = yes +LTO_ENABLE = yes diff --git a/keyboards/helix/pico/keymaps/biacco/rules.mk b/keyboards/helix/pico/keymaps/biacco/rules.mk index 0c60c40f64dc..37e49977c50d 100644 --- a/keyboards/helix/pico/keymaps/biacco/rules.mk +++ b/keyboards/helix/pico/keymaps/biacco/rules.mk @@ -7,7 +7,7 @@ # EXTRAKEY_ENABLE = yes # Audio control and System control(+450) AUDIO_ENABLE = yes # Audio output on port B5 -LINK_TIME_OPTIMIZATION_ENABLE = no # if firmware size over limit, try this option +LTO_ENABLE = no # if firmware size over limit, try this option # Helix Spacific Build Options # you can uncomment and edit follows 6 Variables diff --git a/keyboards/helix/pico/keymaps/default/rules.mk b/keyboards/helix/pico/keymaps/default/rules.mk index c08445732103..8f198e380375 100644 --- a/keyboards/helix/pico/keymaps/default/rules.mk +++ b/keyboards/helix/pico/keymaps/default/rules.mk @@ -7,7 +7,7 @@ # 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 +LTO_ENABLE = no # if firmware size over limit, try this option # Helix Spacific Build Options # you can uncomment and edit follows 6 Variables diff --git a/keyboards/helix/pico/keymaps/mtei/rules.mk b/keyboards/helix/pico/keymaps/mtei/rules.mk index 764b073007be..165233f5fef5 100644 --- a/keyboards/helix/pico/keymaps/mtei/rules.mk +++ b/keyboards/helix/pico/keymaps/mtei/rules.mk @@ -7,7 +7,7 @@ # EXTRAKEY_ENABLE = yes # Audio control and System control(+450) AUDIO_ENABLE = yes # Audio output on port B5 -LINK_TIME_OPTIMIZATION_ENABLE = no # if firmware size over limit, try this option +LTO_ENABLE = no # if firmware size over limit, try this option # Helix Spacific Build Options # you can uncomment and edit follows 6 Variables diff --git a/keyboards/helix/pico/local_features.mk b/keyboards/helix/pico/local_features.mk index 0277a3d227c0..a98444686839 100644 --- a/keyboards/helix/pico/local_features.mk +++ b/keyboards/helix/pico/local_features.mk @@ -106,10 +106,10 @@ endif ifeq ($(strip $(AUDIO_ENABLE)),yes) ifeq ($(strip $(RGBLIGHT_ENABLE)),yes) - LINK_TIME_OPTIMIZATION_ENABLE = yes + LTO_ENABLE = yes endif ifeq ($(strip $(OLED_ENABLE)),yes) - LINK_TIME_OPTIMIZATION_ENABLE = yes + LTO_ENABLE = yes endif endif @@ -120,7 +120,7 @@ ifneq ($(strip $(SHOW_HELIX_OPTIONS)),) $(info -- OLED_DRIVER_ENABLE = $(OLED_DRIVER_ENABLE)) $(info -- CONSOLE_ENABLE = $(CONSOLE_ENABLE)) $(info -- OPT_DEFS = $(OPT_DEFS)) - $(info -- LINK_TIME_OPTIMIZATION_ENABLE = $(LINK_TIME_OPTIMIZATION_ENABLE)) + $(info -- LTO_ENABLE = $(LTO_ENABLE)) $(info ) endif endif diff --git a/keyboards/helix/rev2/keymaps/default/rules.mk b/keyboards/helix/rev2/keymaps/default/rules.mk index 6a42fcf73fc1..9801648decfd 100644 --- a/keyboards/helix/rev2/keymaps/default/rules.mk +++ b/keyboards/helix/rev2/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. # -LINK_TIME_OPTIMIZATION_ENABLE = no # if firmware size over limit, try this option +LTO_ENABLE = no # if firmware size over limit, try this option # Helix Spacific Build Options # you can uncomment and edit follows 7 Variables diff --git a/keyboards/helix/rev2/keymaps/edvorakjp/rules.mk b/keyboards/helix/rev2/keymaps/edvorakjp/rules.mk index e30690029bb8..18bef6bf71e6 100644 --- a/keyboards/helix/rev2/keymaps/edvorakjp/rules.mk +++ b/keyboards/helix/rev2/keymaps/edvorakjp/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. # -LINK_TIME_OPTIMIZATION_ENABLE = no # if firmware size over limit, try this option +LTO_ENABLE = no # if firmware size over limit, try this option TAP_DANCE_ENABLE = yes # Helix Spacific Build Options diff --git a/keyboards/helix/rev2/keymaps/five_rows/rules.mk b/keyboards/helix/rev2/keymaps/five_rows/rules.mk index fb564b6e0424..8c4239deb9c8 100644 --- a/keyboards/helix/rev2/keymaps/five_rows/rules.mk +++ b/keyboards/helix/rev2/keymaps/five_rows/rules.mk @@ -11,7 +11,7 @@ # yes, no +1500 # yes, yes +3200 # no, yes +400 -LINK_TIME_OPTIMIZATION_ENABLE = no # if firmware size over limit, try this option +LTO_ENABLE = no # if firmware size over limit, try this option # Helix Spacific Build Options # you can uncomment and edit follows 7 Variables diff --git a/keyboards/helix/rev2/keymaps/five_rows_jis/rules.mk b/keyboards/helix/rev2/keymaps/five_rows_jis/rules.mk index 6c2057cfd6fa..d44382f86adb 100644 --- a/keyboards/helix/rev2/keymaps/five_rows_jis/rules.mk +++ b/keyboards/helix/rev2/keymaps/five_rows_jis/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. # -LINK_TIME_OPTIMIZATION_ENABLE = no # if firmware size over limit, try this option +LTO_ENABLE = no # if firmware size over limit, try this option # Helix Spacific Build Options # you can uncomment and edit follows 7 Variables diff --git a/keyboards/helix/rev2/keymaps/froggy/rules.mk b/keyboards/helix/rev2/keymaps/froggy/rules.mk index bea059ca16d5..5a0fd9a2b189 100644 --- a/keyboards/helix/rev2/keymaps/froggy/rules.mk +++ b/keyboards/helix/rev2/keymaps/froggy/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. # -LINK_TIME_OPTIMIZATION_ENABLE = no # if firmware size over limit, try this option +LTO_ENABLE = no # if firmware size over limit, try this option # Helix Spacific Build Options # you can uncomment and edit follows 7 Variables diff --git a/keyboards/helix/rev2/keymaps/froggy_106/rules.mk b/keyboards/helix/rev2/keymaps/froggy_106/rules.mk index bea059ca16d5..5a0fd9a2b189 100644 --- a/keyboards/helix/rev2/keymaps/froggy_106/rules.mk +++ b/keyboards/helix/rev2/keymaps/froggy_106/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. # -LINK_TIME_OPTIMIZATION_ENABLE = no # if firmware size over limit, try this option +LTO_ENABLE = no # if firmware size over limit, try this option # Helix Spacific Build Options # you can uncomment and edit follows 7 Variables diff --git a/keyboards/helix/rev2/keymaps/led_test/rules.mk b/keyboards/helix/rev2/keymaps/led_test/rules.mk index fb0b5a547622..013ef1482d3c 100644 --- a/keyboards/helix/rev2/keymaps/led_test/rules.mk +++ b/keyboards/helix/rev2/keymaps/led_test/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. # -LINK_TIME_OPTIMIZATION_ENABLE = no # if firmware size over limit, try this option +LTO_ENABLE = no # if firmware size over limit, try this option # Helix Spacific Build Options # you can uncomment and edit follows 7 Variables diff --git a/keyboards/helix/rev2/keymaps/yshrsmz/rules.mk b/keyboards/helix/rev2/keymaps/yshrsmz/rules.mk index 13d8099317e5..83dcc9b3b835 100644 --- a/keyboards/helix/rev2/keymaps/yshrsmz/rules.mk +++ b/keyboards/helix/rev2/keymaps/yshrsmz/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. # -LINK_TIME_OPTIMIZATION_ENABLE = no # if firmware size over limit, try this option +LTO_ENABLE = no # if firmware size over limit, try this option # Helix Spacific Build Options # you can uncomment and edit follows 7 Variables diff --git a/keyboards/helix/rev2/local_features.mk b/keyboards/helix/rev2/local_features.mk index 4b120936dedd..3f8a7216f9df 100644 --- a/keyboards/helix/rev2/local_features.mk +++ b/keyboards/helix/rev2/local_features.mk @@ -119,7 +119,7 @@ ifneq ($(strip $(SHOW_HELIX_OPTIONS)),) $(info -- OLED_DRIVER_ENABLE = $(OLED_DRIVER_ENABLE)) $(info -- CONSOLE_ENABLE = $(CONSOLE_ENABLE)) $(info -- OPT_DEFS = $(OPT_DEFS)) - $(info -- LINK_TIME_OPTIMIZATION_ENABLE = $(LINK_TIME_OPTIMIZATION_ENABLE)) + $(info -- LTO_ENABLE = $(LTO_ENABLE)) $(info ) endif endif diff --git a/keyboards/hineybush/h88/rules.mk b/keyboards/hineybush/h88/rules.mk index f39537546045..3d7de2731d09 100644 --- a/keyboards/hineybush/h88/rules.mk +++ b/keyboards/hineybush/h88/rules.mk @@ -30,4 +30,4 @@ UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches -LINK_TIME_OPTIMIZATION_ENABLE = yes +LTO_ENABLE = yes diff --git a/keyboards/hotdox/keymaps/ninjonas/rules.mk b/keyboards/hotdox/keymaps/ninjonas/rules.mk index 3ec5fb062843..4da205a168c7 100644 --- a/keyboards/hotdox/keymaps/ninjonas/rules.mk +++ b/keyboards/hotdox/keymaps/ninjonas/rules.mk @@ -1 +1 @@ -LINK_TIME_OPTIMIZATION_ENABLE = yes \ No newline at end of file +LTO_ENABLE = yes diff --git a/keyboards/id80/keymaps/via/rules.mk b/keyboards/id80/keymaps/via/rules.mk index ea9a831e1743..ca9fed0e6b53 100644 --- a/keyboards/id80/keymaps/via/rules.mk +++ b/keyboards/id80/keymaps/via/rules.mk @@ -1,2 +1,2 @@ -LINK_TIME_OPTIMIZATION_ENABLE = yes +LTO_ENABLE = yes VIA_ENABLE = yes diff --git a/keyboards/kc60/keymaps/noroadsleft/rules.mk b/keyboards/kc60/keymaps/noroadsleft/rules.mk index c9805878d268..2eab7943ddc4 100644 --- a/keyboards/kc60/keymaps/noroadsleft/rules.mk +++ b/keyboards/kc60/keymaps/noroadsleft/rules.mk @@ -1,6 +1,6 @@ # https://github.com/qmk/qmk_firmware/issues/3448#issuecomment-406636125 # EXTRAFLAGS += -flto -LINK_TIME_OPTIMIZATION_ENABLE = yes +LTO_ENABLE = yes MOUSEKEY_ENABLE = no # Mouse keys # COMMAND_ENABLE = no # Commands for debug and configuration diff --git a/keyboards/keebio/bdn9/keymaps/via/rules.mk b/keyboards/keebio/bdn9/keymaps/via/rules.mk index aa554ae29467..d96967a6085f 100644 --- a/keyboards/keebio/bdn9/keymaps/via/rules.mk +++ b/keyboards/keebio/bdn9/keymaps/via/rules.mk @@ -1,5 +1,5 @@ VIA_ENABLE = yes -LINK_TIME_OPTIMIZATION_ENABLE = yes +LTO_ENABLE = yes MOUSEKEY_ENABLE = yes CONSOLE_ENABLE = yes COMMAND_ENABLE = no diff --git a/keyboards/keebio/iris/keymaps/pvinis/rules.mk b/keyboards/keebio/iris/keymaps/pvinis/rules.mk index deeb3120363b..1e7e2d417ab3 100644 --- a/keyboards/keebio/iris/keymaps/pvinis/rules.mk +++ b/keyboards/keebio/iris/keymaps/pvinis/rules.mk @@ -4,6 +4,6 @@ RGBLIGHT_ENABLE = yes # rgb leds underlight ENCODER_ENABLE = yes # rotary knob # Some extra stuff to make firmware smaller. -LINK_TIME_OPTIMIZATION_ENABLE = yes +LTO_ENABLE = yes CONSOLE_ENABLE = no COMMAND_ENABLE = no diff --git a/keyboards/keebio/iris/keymaps/via/rules.mk b/keyboards/keebio/iris/keymaps/via/rules.mk index 92f9671eeb2d..36b7ba9cbc98 100644 --- a/keyboards/keebio/iris/keymaps/via/rules.mk +++ b/keyboards/keebio/iris/keymaps/via/rules.mk @@ -1,2 +1,2 @@ VIA_ENABLE = yes -LINK_TIME_OPTIMIZATION_ENABLE = yes +LTO_ENABLE = yes diff --git a/keyboards/keebio/quefrency/keymaps/drashna_ms/rules.mk b/keyboards/keebio/quefrency/keymaps/drashna_ms/rules.mk index 1b8b582abc32..fb7f940c93fb 100644 --- a/keyboards/keebio/quefrency/keymaps/drashna_ms/rules.mk +++ b/keyboards/keebio/quefrency/keymaps/drashna_ms/rules.mk @@ -1,4 +1,4 @@ -LINK_TIME_OPTIMIZATION_ENABLE = yes +LTO_ENABLE = yes RGBLIGHT_ENABLE = yes EXTRAKEY_ENABLE = yes AUDIO_ENABLE = yes diff --git a/keyboards/keebio/quefrency/keymaps/via/rules.mk b/keyboards/keebio/quefrency/keymaps/via/rules.mk index 540fc2ac3fee..4b1bcabda81a 100644 --- a/keyboards/keebio/quefrency/keymaps/via/rules.mk +++ b/keyboards/keebio/quefrency/keymaps/via/rules.mk @@ -1,3 +1,3 @@ VIA_ENABLE = yes CONSOLE_ENABLE = yes -LINK_TIME_OPTIMIZATION_ENABLE = yes +LTO_ENABLE = yes diff --git a/keyboards/kyria/keymaps/ninjonas/rules.mk b/keyboards/kyria/keymaps/ninjonas/rules.mk index e7e4726bace6..94c06b80eb4f 100644 --- a/keyboards/kyria/keymaps/ninjonas/rules.mk +++ b/keyboards/kyria/keymaps/ninjonas/rules.mk @@ -1,6 +1,6 @@ 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 +LTO_ENABLE = yes -SRC += oled.c \ No newline at end of file +SRC += oled.c diff --git a/keyboards/kyria/rules.mk b/keyboards/kyria/rules.mk index 57fbf76cfbbf..96f76241d1a0 100644 --- a/keyboards/kyria/rules.mk +++ b/keyboards/kyria/rules.mk @@ -31,6 +31,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 SPLIT_KEYBOARD = yes # Split common -LINK_TIME_OPTIMIZATION_ENABLE =yes +LTO_ENABLE = yes DEFAULT_FOLDER = kyria/rev1 diff --git a/keyboards/launchpad/keymaps/via/rules.mk b/keyboards/launchpad/keymaps/via/rules.mk index 87843cb0d6e7..37484844f5be 100644 --- a/keyboards/launchpad/keymaps/via/rules.mk +++ b/keyboards/launchpad/keymaps/via/rules.mk @@ -1,3 +1,3 @@ VIA_ENABLE = yes -LINK_TIME_OPTIMIZATION_ENABLE = yes +LTO_ENABLE = yes RGBLIGHT_ENABLE = yes diff --git a/keyboards/lily58/keymaps/ninjonas/rules.mk b/keyboards/lily58/keymaps/ninjonas/rules.mk index dc3fe55bca28..2cccbd077d2d 100644 --- a/keyboards/lily58/keymaps/ninjonas/rules.mk +++ b/keyboards/lily58/keymaps/ninjonas/rules.mk @@ -1,2 +1,2 @@ OLED_DRIVER_ENABLE = yes -LINK_TIME_OPTIMIZATION_ENABLE = yes \ No newline at end of file +LTO_ENABLE = yes diff --git a/keyboards/pinky/3/keymaps/ninjonas/rules.mk b/keyboards/pinky/3/keymaps/ninjonas/rules.mk index 155f56ef9f15..8d32e2248699 100644 --- a/keyboards/pinky/3/keymaps/ninjonas/rules.mk +++ b/keyboards/pinky/3/keymaps/ninjonas/rules.mk @@ -1,2 +1,2 @@ MOUSEKEY_ENABLE = no -LINK_TIME_OPTIMIZATION_ENABLE = yes \ No newline at end of file +LTO_ENABLE = yes diff --git a/keyboards/planck/keymaps/oryx/rules.mk b/keyboards/planck/keymaps/oryx/rules.mk index fb44d6b95eae..7657a3043413 100644 --- a/keyboards/planck/keymaps/oryx/rules.mk +++ b/keyboards/planck/keymaps/oryx/rules.mk @@ -1,6 +1,6 @@ SRC += muse.c # Set any rules.mk overrides for your specific keymap here. # See rules at https://docs.qmk.fm/#/config_options?id=the-rulesmk-file -LINK_TIME_OPTIMIZATION_ENABLE = yes +LTO_ENABLE = yes COMMAND_ENABLE = no MOUSEKEY_ENABLE = no diff --git a/keyboards/planck/keymaps/sascha/rules.mk b/keyboards/planck/keymaps/sascha/rules.mk index 57e5e2643eb1..ac69f9dbcbce 100644 --- a/keyboards/planck/keymaps/sascha/rules.mk +++ b/keyboards/planck/keymaps/sascha/rules.mk @@ -1,7 +1,7 @@ AUTO_SHIFT_ENABLE = yes AUTO_SHIFT_MODIFIERS = yes UNICODE_ENABLE = yes -LINK_TIME_OPTIMIZATION_ENABLE = yes +LTO_ENABLE = yes ifeq ($(strip $(KEYBOARD)), planck/rev5) BACKLIGHT_ENABLE = yes diff --git a/keyboards/planck/keymaps/tylerwince/rules.mk b/keyboards/planck/keymaps/tylerwince/rules.mk index a4f1a0b84f89..2c1585883fbe 100644 --- a/keyboards/planck/keymaps/tylerwince/rules.mk +++ b/keyboards/planck/keymaps/tylerwince/rules.mk @@ -1,7 +1,7 @@ SRC += muse.c # Set any rules.mk overrides for your specific keymap here. # See rules at https://docs.qmk.fm/#/config_options?id=the-rulesmk-file -LINK_TIME_OPTIMIZATION_ENABLE = yes +LTO_ENABLE = yes COMMAND_ENABLE = no MOUSEKEY_ENABLE = no TAP_DANCE_ENABLE=yes diff --git a/keyboards/preonic/rev1/rules.mk b/keyboards/preonic/rev1/rules.mk index 45edfa0b0f14..dea2bbbca908 100644 --- a/keyboards/preonic/rev1/rules.mk +++ b/keyboards/preonic/rev1/rules.mk @@ -34,4 +34,4 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend LAYOUTS = ortho_5x12 -LINK_TIME_OPTIMIZATION_ENABLE = yes +LTO_ENABLE = yes diff --git a/keyboards/preonic/rev2/rules.mk b/keyboards/preonic/rev2/rules.mk index f24c6a49b7b2..1b72a622a238 100644 --- a/keyboards/preonic/rev2/rules.mk +++ b/keyboards/preonic/rev2/rules.mk @@ -34,4 +34,4 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend LAYOUTS = ortho_5x12 -LINK_TIME_OPTIMIZATION_ENABLE = yes +LTO_ENABLE = yes diff --git a/keyboards/rgbkb/sol/keymaps/kageurufu/rules.mk b/keyboards/rgbkb/sol/keymaps/kageurufu/rules.mk index 056959a550d5..f60fa5d4c965 100644 --- a/keyboards/rgbkb/sol/keymaps/kageurufu/rules.mk +++ b/keyboards/rgbkb/sol/keymaps/kageurufu/rules.mk @@ -11,11 +11,10 @@ LED_MIRRORED = no # Mirror LEDs across halves (enable DIP 1 on RGB_MATRIX_ENABLE = WS2812 # Enable per-key coordinate based RGB effects. Do not enable with RGBlight # Userspace implements their own LTO -LINK_TIME_OPTIMIZATION_ENABLE = no +LTO_ENABLE = no # Do not edit past here include keyboards/$(KEYBOARD)/post_rules.mk - diff --git a/keyboards/rgbkb/sol/rev2/rules.mk b/keyboards/rgbkb/sol/rev2/rules.mk index debe8fe6bbd1..201a7b47b238 100644 --- a/keyboards/rgbkb/sol/rev2/rules.mk +++ b/keyboards/rgbkb/sol/rev2/rules.mk @@ -29,7 +29,7 @@ IOS_DEVICE_ENABLE = no # Limit max brightness to connect to IOS dev OLED_DRIVER_ENABLE = no # Enable the OLED Driver EXTRA_ENCODERS_ENABLE = no # Enables 3 encoders per side (up from 1, not compatible with OLED_DRIVER_ENABLE) SWAP_HANDS_ENABLE = no # Enable one-hand typing -LINK_TIME_OPTIMIZATION_ENABLE = yes # Enable Link Time Optimizations greatly reducing firmware size by disabling the old Macros and Functions features +LTO_ENABLE = yes # Enable Link Time Optimizations greatly reducing firmware size by disabling the old Macros and Functions features # Special RGB Matrix, OLED, & Encoder Control Menu! RGB_OLED_MENU = no # Enabled by setting this to the encoder index (0-5) you wish to use to control the menu. diff --git a/keyboards/rgbkb/zygomorph/keymaps/5x6pad/rules.mk b/keyboards/rgbkb/zygomorph/keymaps/5x6pad/rules.mk index 55d52d58e57f..c223cb9ebb90 100644 --- a/keyboards/rgbkb/zygomorph/keymaps/5x6pad/rules.mk +++ b/keyboards/rgbkb/zygomorph/keymaps/5x6pad/rules.mk @@ -19,7 +19,7 @@ SWAP_HANDS_ENABLE = no # Enable one-hand typing ENCODER_ENABLE = yes # Enable rotary encoder OLED_DRIVER_ENABLE = no # Enable the OLED Driver IOS_DEVICE_ENABLE = no # Limit max brightness to connect to IOS device (iPad,iPhone) -LINK_TIME_OPTIMIZATION_ENABLE = no # Enable optimizations to reduce firmware size. Also disables action macros and functions. +LTO_ENABLE = no # Enable optimizations to reduce firmware size. Also disables action macros and functions. # Do not edit past here diff --git a/keyboards/rgbkb/zygomorph/keymaps/default/rules.mk b/keyboards/rgbkb/zygomorph/keymaps/default/rules.mk index 55d52d58e57f..c223cb9ebb90 100644 --- a/keyboards/rgbkb/zygomorph/keymaps/default/rules.mk +++ b/keyboards/rgbkb/zygomorph/keymaps/default/rules.mk @@ -19,7 +19,7 @@ SWAP_HANDS_ENABLE = no # Enable one-hand typing ENCODER_ENABLE = yes # Enable rotary encoder OLED_DRIVER_ENABLE = no # Enable the OLED Driver IOS_DEVICE_ENABLE = no # Limit max brightness to connect to IOS device (iPad,iPhone) -LINK_TIME_OPTIMIZATION_ENABLE = no # Enable optimizations to reduce firmware size. Also disables action macros and functions. +LTO_ENABLE = no # Enable optimizations to reduce firmware size. Also disables action macros and functions. # Do not edit past here diff --git a/keyboards/rgbkb/zygomorph/keymaps/default_oled/rules.mk b/keyboards/rgbkb/zygomorph/keymaps/default_oled/rules.mk index 961edb6e2d8d..f2c194f0d356 100644 --- a/keyboards/rgbkb/zygomorph/keymaps/default_oled/rules.mk +++ b/keyboards/rgbkb/zygomorph/keymaps/default_oled/rules.mk @@ -19,7 +19,7 @@ SWAP_HANDS_ENABLE = no # Enable one-hand typing ENCODER_ENABLE = yes # Enable rotary encoder OLED_DRIVER_ENABLE = yes # Enable the OLED Driver IOS_DEVICE_ENABLE = no # Limit max brightness to connect to IOS device (iPad,iPhone) -LINK_TIME_OPTIMIZATION_ENABLE = yes # Enable optimizations to reduce firmware size. Also disables action macros and functions. +LTO_ENABLE = yes # Enable optimizations to reduce firmware size. Also disables action macros and functions. # Do not edit past here diff --git a/keyboards/rgbkb/zygomorph/keymaps/xulkal/rules.mk b/keyboards/rgbkb/zygomorph/keymaps/xulkal/rules.mk index dc687cbbd348..78969ad7a4f1 100644 --- a/keyboards/rgbkb/zygomorph/keymaps/xulkal/rules.mk +++ b/keyboards/rgbkb/zygomorph/keymaps/xulkal/rules.mk @@ -19,7 +19,7 @@ SWAP_HANDS_ENABLE = no # Enable one-hand typing ENCODER_ENABLE = no # Enable rotary encoder OLED_DRIVER_ENABLE = no # Enable the OLED Driver IOS_DEVICE_ENABLE = no # Limit max brightness to connect to IOS device (iPad,iPhone) -LINK_TIME_OPTIMIZATION_ENABLE = no # Enable optimizations to reduce firmware size. Also disables action macros and functions. +LTO_ENABLE = no # Enable optimizations to reduce firmware size. Also disables action macros and functions. # Do not edit past here diff --git a/keyboards/tg4x/rules.mk b/keyboards/tg4x/rules.mk index 41988177d31c..4a86998cb9e7 100644 --- a/keyboards/tg4x/rules.mk +++ b/keyboards/tg4x/rules.mk @@ -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 -LINK_TIME_OPTIMIZATION_ENABLE = yes \ No newline at end of file +LTO_ENABLE = yes diff --git a/keyboards/tkc/candybar/lefty/rules.mk b/keyboards/tkc/candybar/lefty/rules.mk index 52ef91c47ff3..1edad08350e8 100644 --- a/keyboards/tkc/candybar/lefty/rules.mk +++ b/keyboards/tkc/candybar/lefty/rules.mk @@ -5,7 +5,7 @@ MCU = STM32F072 # comment out to disable the options. # # EXTRAFLAGS+=-flto -LINK_TIME_OPTIMIZATION_ENABLE = yes +LTO_ENABLE = yes BACKLIGHT_ENABLE = no BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration ## (Note that for BOOTMAGIC on Teensy LC you have to use a custom .ld script.) diff --git a/keyboards/tkc/candybar/righty/rules.mk b/keyboards/tkc/candybar/righty/rules.mk index 52ef91c47ff3..1edad08350e8 100644 --- a/keyboards/tkc/candybar/righty/rules.mk +++ b/keyboards/tkc/candybar/righty/rules.mk @@ -5,7 +5,7 @@ MCU = STM32F072 # comment out to disable the options. # # EXTRAFLAGS+=-flto -LINK_TIME_OPTIMIZATION_ENABLE = yes +LTO_ENABLE = yes BACKLIGHT_ENABLE = no BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration ## (Note that for BOOTMAGIC on Teensy LC you have to use a custom .ld script.) diff --git a/keyboards/v60_type_r/rules.mk b/keyboards/v60_type_r/rules.mk index 94205df11f99..16ecb7df47e1 100644 --- a/keyboards/v60_type_r/rules.mk +++ b/keyboards/v60_type_r/rules.mk @@ -32,6 +32,6 @@ BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches -LINK_TIME_OPTIMIZATION_ENABLE = yes +LTO_ENABLE = yes LAYOUTS = 60_ansi 60_iso diff --git a/keyboards/vitamins_included/rules.mk b/keyboards/vitamins_included/rules.mk index 3eb3a1c306a7..c95ae27ecf42 100644 --- a/keyboards/vitamins_included/rules.mk +++ b/keyboards/vitamins_included/rules.mk @@ -25,4 +25,4 @@ LAYOUTS = ortho_4x12 DEFAULT_FOLDER = vitamins_included/rev2 -LINK_TIME_OPTIMIZATION_ENABLE = yes +LTO_ENABLE = yes diff --git a/keyboards/xd004/v1/config.h b/keyboards/xd004/v1/config.h index f7a262d4c071..b90e10b8989c 100644 --- a/keyboards/xd004/v1/config.h +++ b/keyboards/xd004/v1/config.h @@ -75,6 +75,6 @@ further optimizations can be done on that side. /* disable action features */ // #define NO_ACTION_ONESHOT // 462 bytes <- this needs to be un-commented out if Link Time Optimization is disabled, otherwise file is too large -// The two below are implicit since we use LINK_TIME_OPTIMIZATION_ENABLE (in rules.mk) +// The two below are implicit since we use LTO_ENABLE (in rules.mk) // #define NO_ACTION_MACRO // #define NO_ACTION_FUNCTION diff --git a/keyboards/xd004/v1/rules.mk b/keyboards/xd004/v1/rules.mk index 18f7d8041cd0..e9afff93cf4f 100644 --- a/keyboards/xd004/v1/rules.mk +++ b/keyboards/xd004/v1/rules.mk @@ -27,6 +27,6 @@ RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend SPACE_CADET_ENABLE = no # Saves about 5% of space: -LINK_TIME_OPTIMIZATION_ENABLE = yes +LTO_ENABLE = yes #LAYOUTS = ortho_1x4 diff --git a/keyboards/xd84/rules.mk b/keyboards/xd84/rules.mk index cf4e64361270..590038622fb7 100644 --- a/keyboards/xd84/rules.mk +++ b/keyboards/xd84/rules.mk @@ -31,7 +31,7 @@ BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches HD44780_ENABLE = no # Enable support for HD44780 based LCDs -LINK_TIME_OPTIMIZATION_ENABLE = yes +LTO_ENABLE = yes # custom matrix setup CUSTOM_MATRIX = lite diff --git a/keyboards/xd96/rules.mk b/keyboards/xd96/rules.mk index 0c56a5ac002b..3ede910c3ea2 100644 --- a/keyboards/xd96/rules.mk +++ b/keyboards/xd96/rules.mk @@ -31,7 +31,7 @@ BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches HD44780_ENABLE = no # Enable support for HD44780 based LCDs -LINK_TIME_OPTIMIZATION_ENABLE = yes +LTO_ENABLE = yes # custom matrix setup CUSTOM_MATRIX = lite diff --git a/keyboards/yushakobo/quick7/config.h b/keyboards/yushakobo/quick7/config.h index 4fb8ba6d96df..b9abd137b832 100644 --- a/keyboards/yushakobo/quick7/config.h +++ b/keyboards/yushakobo/quick7/config.h @@ -192,7 +192,7 @@ along with this program. If not, see . //#define NO_ACTION_ONESHOT /* disable these deprecated features by default */ -#ifndef LINK_TIME_OPTIMIZATION_ENABLE +#ifndef LTO_ENABLE #define NO_ACTION_MACRO #define NO_ACTION_FUNCTION #endif diff --git a/show_options.mk b/show_options.mk index 3f3243fbd0be..2a5781773502 100644 --- a/show_options.mk +++ b/show_options.mk @@ -82,8 +82,7 @@ OTHER_OPTION_NAMES = \ RGB_MATRIX_KEYPRESSES \ LED_MIRRORED \ RGBLIGHT_FULL_POWER \ - Link_Time_Optimization \ - LINK_TIME_OPTIMIZATION_ENABLE + LTO_ENABLE define NAME_ECHO @echo " $1 = $($1) # $(origin $1)" diff --git a/tmk_core/common.mk b/tmk_core/common.mk index 56ed4a85779d..a6c439f5c129 100644 --- a/tmk_core/common.mk +++ b/tmk_core/common.mk @@ -160,16 +160,13 @@ ifeq ($(strip $(SHARED_EP_ENABLE)), yes) endif ifeq ($(strip $(LTO_ENABLE)), yes) - LINK_TIME_OPTIMIZATION_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.) + $(info If unsure, set LTO_ENABLE = no.) endif EXTRAFLAGS += -flto - TMK_COMMON_DEFS += -DLINK_TIME_OPTIMIZATION_ENABLE + TMK_COMMON_DEFS += -DLTO_ENABLE + TMK_COMMON_DEFS += -DLINK_TIME_OPTIMIZATON_ENABLE endif # Search Path diff --git a/tmk_core/common/action.h b/tmk_core/common/action.h index c82c9c81be4d..345c030c94ac 100644 --- a/tmk_core/common/action.h +++ b/tmk_core/common/action.h @@ -29,7 +29,7 @@ extern "C" { #endif /* Disable macro and function features when LTO is enabled, since they break */ -#ifdef LINK_TIME_OPTIMIZATION_ENABLE +#ifdef LTO_ENABLE # ifndef NO_ACTION_MACRO # define NO_ACTION_MACRO # endif diff --git a/tmk_core/common/command.c b/tmk_core/common/command.c index ef6a39c0fe23..feeb2202e2b2 100644 --- a/tmk_core/common/command.c +++ b/tmk_core/common/command.c @@ -180,7 +180,7 @@ static void print_version(void) { #ifdef NKRO_ENABLE " NKRO" #endif -#ifdef LINK_TIME_OPTIMIZATION_ENABLE +#ifdef LTO_ENABLE " LTO" #endif diff --git a/users/bcat/rules.mk b/users/bcat/rules.mk index a595d1f588e8..f87974ed96fd 100644 --- a/users/bcat/rules.mk +++ b/users/bcat/rules.mk @@ -14,7 +14,7 @@ EXTRAKEY_ENABLE = yes NKRO_ENABLE = yes # Enable link-time optimization to reduce binary size. -LINK_TIME_OPTIMIZATION_ENABLE = yes +LTO_ENABLE = yes # Disable unused build options on all keyboards. COMMAND_ENABLE = no diff --git a/users/dshields/rules.mk b/users/dshields/rules.mk index abfbe5e40e8a..462649289b67 100644 --- a/users/dshields/rules.mk +++ b/users/dshields/rules.mk @@ -10,7 +10,7 @@ SPACE_CADET_ENABLE = no LEADER_ENABLE = no DYNAMIC_MACRO_ENABLE = yes -LINK_TIME_OPTIMIZATION_ENABLE = yes +LTO_ENABLE = yes ifeq ($(strip $(KEYBOARD)), planck/rev3) AUDIO_ENABLE = no @@ -29,4 +29,3 @@ ifeq ($(strip $(KEYBOARD)), planck/light) BACKLIGHT_ENABLE = no RGB_MATRIX_ENABLE = yes endif - diff --git a/users/issmirnov/rules.mk b/users/issmirnov/rules.mk index 096d7b4c0d1e..93ec21b01b4f 100644 --- a/users/issmirnov/rules.mk +++ b/users/issmirnov/rules.mk @@ -4,7 +4,7 @@ SRC += issmirnov.c # https://www.reddit.com/r/olkb/comments/bmpgjm/programming_help/ # Should shave 2000 bytes -LINK_TIME_OPTIMIZATION_ENABLE = yes +LTO_ENABLE = yes # Enable debugging only when needed. CONSOLE_ENABLE = yes # +400 bytes (hid_listen support) diff --git a/users/kuchosauronad0/rules.mk b/users/kuchosauronad0/rules.mk index b844d12c9265..dfab85703cb5 100644 --- a/users/kuchosauronad0/rules.mk +++ b/users/kuchosauronad0/rules.mk @@ -1,7 +1,7 @@ SRC += kuchosauronad0.c \ process_records.c -LINK_TIME_OPTIMIZATION_ENABLE = yes +LTO_ENABLE = yes SPACE_CADET_ENABLE = no ifneq ($(strip $(RGBLIGHT_ENABLE)),yes ) @@ -24,7 +24,7 @@ ifeq ($(strip $(LEADER_ENABLE)), yes) SRC += leader.c endif -ifneq ("$(wildcard $(USER_PATH)/secrets.c)","") +ifneq ("$(wildcard $(USER_PATH)/secrets.c)","") SRC += secrets.c endif ifeq ($(strip $(NO_SECRETS)), yes) diff --git a/users/pvinis/rules.mk b/users/pvinis/rules.mk index f6f09e54d9c6..6c7b47399ad9 100644 --- a/users/pvinis/rules.mk +++ b/users/pvinis/rules.mk @@ -14,6 +14,6 @@ SRC += pvinis.c # add userspace file ## Some extra stuff to make firmware smaller. -# LINK_TIME_OPTIMIZATION_ENABLE = yes +# LTO_ENABLE = yes # CONSOLE_ENABLE = no # COMMAND_ENABLE = no diff --git a/users/yanfali/rules.mk b/users/yanfali/rules.mk index 456d3bf3203f..a7208daa2c5a 100644 --- a/users/yanfali/rules.mk +++ b/users/yanfali/rules.mk @@ -2,7 +2,7 @@ BOOTMAGIC = lite DYNAMIC_KEYMAP_ENABLE = no CONSOLE_ENABLE = yes COMMAND_ENABLE = yes -LINK_TIME_OPTIMIZATION_ENABLE = yes +LTO_ENABLE = yes AUDIO_ENABLE = no # only enable audio on specific boards diff --git a/users/yet-another-developer/rules.mk b/users/yet-another-developer/rules.mk index 597df6d0b93c..64cf1f2fce1e 100644 --- a/users/yet-another-developer/rules.mk +++ b/users/yet-another-developer/rules.mk @@ -1,7 +1,7 @@ SRC += yet-another-developer.c \ process_records.c -LINK_TIME_OPTIMIZATION_ENABLE = yes +LTO_ENABLE = yes SPACE_CADET_ENABLE = no ifeq ($(strip $(TAP_DANCE_ENABLE)), yes) From fa6cf8572736f16d2fe076c21546d08f258e145f Mon Sep 17 00:00:00 2001 From: Richard Date: Mon, 24 Aug 2020 07:40:45 -0700 Subject: [PATCH 690/930] Add a method to read the OLED display buffer from user space (#8777) * Adding extern and declaration * Change to mediated buffer read * Adding raw byte read * Restore write raw... D'Oh * Working struct return * Pack that struct * Remove conditional packing and add example to docs * Cleanup tab/spaces * Update docs/feature_oled_driver.md Prettify formatting * Update drivers/oled/oled_driver.h Prettify formatting --- docs/feature_oled_driver.md | 41 +++++++++++++++++++++++++++++++++++++ drivers/oled/oled_driver.c | 8 ++++++++ drivers/oled/oled_driver.h | 9 ++++++++ 3 files changed, 58 insertions(+) diff --git a/docs/feature_oled_driver.md b/docs/feature_oled_driver.md index 5f3095198fbf..d106d3d13ee0 100644 --- a/docs/feature_oled_driver.md +++ b/docs/feature_oled_driver.md @@ -72,6 +72,43 @@ static void render_logo(void) { } ``` +## Buffer Read Example +For some purposes, you may need to read the current state of the OLED display +buffer. The `oled_read_raw` function can be used to safely read bytes from the +buffer. + +In this example, calling `fade_display` in the `oled_task_user` function will +slowly fade away whatever is on the screen by turning random pixels black over +time. +```c +//Setup some mask which can be or'd with bytes to turn off pixels +const uint8_t single_bit_masks[8] = {127, 191, 223, 239, 247, 251, 253, 254}; + +static void fade_display(void) { + //Define the reader structure + oled_buffer_reader_t reader; + uint8_t buff_char; + if (random() % 30 == 0) { + srand(timer_read()); + // Fetch a pointer for the buffer byte at index 0. The return structure + // will have the pointer and the number of bytes remaining from this + // index position if we want to perform a sequential read by + // incrementing the buffer pointer + reader = oled_read_raw(0); + //Loop over the remaining buffer and erase pixels as we go + for (uint16_t i = 0; i < reader.remaining_element_count; i++) { + //Get the actual byte in the buffer by dereferencing the pointer + buff_char = *reader.current_element; + if (buff_char != 0) { + oled_write_raw_byte(buff_char & single_bit_masks[rand() % 8], i); + } + //increment the pointer to fetch a new byte during the next loop + reader.current_element++; + } + } +} +``` + ## Other Examples In split keyboards, it is very common to have two OLED displays that each render different content and are oriented or flipped differently. You can do this by switching which content to render by using the return value from `is_keyboard_master()` or `is_keyboard_left()` found in `split_util.h`, e.g: @@ -238,6 +275,10 @@ void oled_write_P(const char *data, bool invert); // Remapped to call 'void oled_write_ln(const char *data, bool invert);' on ARM void oled_write_ln_P(const char *data, bool invert); +// Returns a pointer to the requested start index in the buffer plus remaining +// buffer length as struct +oled_buffer_reader_t oled_read_raw(uint16_t start_index); + // Writes a string to the buffer at current cursor position void oled_write_raw(const char *data, uint16_t size); diff --git a/drivers/oled/oled_driver.c b/drivers/oled/oled_driver.c index f1990567f784..bbf010a09086 100644 --- a/drivers/oled/oled_driver.c +++ b/drivers/oled/oled_driver.c @@ -444,6 +444,14 @@ void oled_pan(bool left) { oled_dirty = ~((OLED_BLOCK_TYPE)0); } +oled_buffer_reader_t oled_read_raw(uint16_t start_index) { + if (start_index > OLED_MATRIX_SIZE) start_index = OLED_MATRIX_SIZE; + oled_buffer_reader_t ret_reader; + ret_reader.current_element = &oled_buffer[start_index]; + ret_reader.remaining_element_count = OLED_MATRIX_SIZE - start_index; + return ret_reader; +} + void oled_write_raw_byte(const char data, uint16_t index) { if (index > OLED_MATRIX_SIZE) index = OLED_MATRIX_SIZE; if (oled_buffer[index] == data) return; diff --git a/drivers/oled/oled_driver.h b/drivers/oled/oled_driver.h index 5c21c0cc8e9d..7ec00d66a3dd 100644 --- a/drivers/oled/oled_driver.h +++ b/drivers/oled/oled_driver.h @@ -154,6 +154,11 @@ along with this program. If not, see . # define OLED_I2C_TIMEOUT 100 #endif +typedef struct __attribute__((__packed__)) { + uint8_t *current_element; + uint16_t remaining_element_count; +} oled_buffer_reader_t; + // OLED Rotation enum values are flags typedef enum { OLED_ROTATION_0 = 0, @@ -207,6 +212,10 @@ void oled_write_ln(const char *data, bool invert); // Pans the buffer to the right (or left by passing true) by moving contents of the buffer void oled_pan(bool left); +// Returns a pointer to the requested start index in the buffer plus remaining +// buffer length as struct +oled_buffer_reader_t oled_read_raw(uint16_t start_index); + void oled_write_raw(const char *data, uint16_t size); void oled_write_raw_byte(const char data, uint16_t index); From b89b2030af655132e2708cbdffd7fb1b8e1aaeb4 Mon Sep 17 00:00:00 2001 From: Ryan Date: Tue, 25 Aug 2020 18:58:00 +1000 Subject: [PATCH 691/930] Kiibohd bootloader, take 2 (#10129) --- bootloader.mk | 15 ++++++++++++++- keyboards/ergodox_infinity/bootloader_defs.h | 1 - keyboards/ergodox_infinity/rules.mk | 19 ++----------------- keyboards/infinity60/bootloader_defs.h | 1 - keyboards/infinity60/rules.mk | 18 ++---------------- keyboards/k_type/bootloader_defs.h | 1 - keyboards/k_type/rules.mk | 18 ++---------------- keyboards/whitefox/bootloader_defs.h | 1 - keyboards/whitefox/rules.mk | 18 ++---------------- quantum/mcu_selection.mk | 2 ++ tmk_core/chibios.mk | 2 +- tmk_core/common/chibios/bootloader.c | 6 +++--- 12 files changed, 28 insertions(+), 74 deletions(-) delete mode 100644 keyboards/ergodox_infinity/bootloader_defs.h delete mode 100644 keyboards/infinity60/bootloader_defs.h delete mode 100644 keyboards/k_type/bootloader_defs.h delete mode 100644 keyboards/whitefox/bootloader_defs.h diff --git a/bootloader.mk b/bootloader.mk index e516e9ff9fd2..d5f803f896f5 100644 --- a/bootloader.mk +++ b/bootloader.mk @@ -27,6 +27,7 @@ # qmk-dfu QMK DFU (LUFA + blinkenlight) # bootloadHID HIDBootFlash compatible (ATmega32A) # USBasp USBaspLoader (ATmega328P) +# kiibohd Input:Club Kiibohd bootloader (only used on their boards) # # BOOTLOADER_SIZE can still be defined manually, but it's recommended # you add any possible configuration to this list @@ -89,7 +90,19 @@ ifeq ($(strip $(BOOTLOADER)), lufa-ms) BOOTLOADER_SIZE = 6144 FIRMWARE_FORMAT = bin endif - ifdef BOOTLOADER_SIZE OPT_DEFS += -DBOOTLOADER_SIZE=$(strip $(BOOTLOADER_SIZE)) endif + +ifeq ($(strip $(BOOTLOADER)), kiibohd) + OPT_DEFS += -DBOOTLOADER_KIIBOHD + ifeq ($(strip $(MCU_ORIG)), MK20DX128) + MCU_LDSCRIPT = MK20DX128BLDR4 + endif + ifeq ($(strip $(MCU_ORIG)), MK20DX256) + MCU_LDSCRIPT = MK20DX256BLDR8 + endif + + DFU_ARGS = -d 1C11:B007 + DFU_SUFFIX_ARGS = -v 1C11 -p B007 +endif diff --git a/keyboards/ergodox_infinity/bootloader_defs.h b/keyboards/ergodox_infinity/bootloader_defs.h deleted file mode 100644 index c67153be6021..000000000000 --- a/keyboards/ergodox_infinity/bootloader_defs.h +++ /dev/null @@ -1 +0,0 @@ -#define KIIBOHD_BOOTLOADER diff --git a/keyboards/ergodox_infinity/rules.mk b/keyboards/ergodox_infinity/rules.mk index 29e5c6dd7360..b9ead9e87c8d 100644 --- a/keyboards/ergodox_infinity/rules.mk +++ b/keyboards/ergodox_infinity/rules.mk @@ -1,27 +1,12 @@ # MCU name MCU = MK20DX256 -# 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 -# - MK20DX128BLDR4 for Infinity 60% with Kiibohd bootloader -# - MK20DX256BLDR8 for Infinity ErgoDox with Kiibohd bootloader -MCU_LDSCRIPT = MK20DX256BLDR8 - -BOOTLOADER = dfu +# Bootloader selection +BOOTLOADER = kiibohd # Build Options # comment out to disable the options. # - -DFU_ARGS = -d 1c11:b007 -DFU_SUFFIX_ARGS = -p b007 -v 1c11 - BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control diff --git a/keyboards/infinity60/bootloader_defs.h b/keyboards/infinity60/bootloader_defs.h deleted file mode 100644 index c67153be6021..000000000000 --- a/keyboards/infinity60/bootloader_defs.h +++ /dev/null @@ -1 +0,0 @@ -#define KIIBOHD_BOOTLOADER diff --git a/keyboards/infinity60/rules.mk b/keyboards/infinity60/rules.mk index e6b234d821c6..dce10b5717fd 100644 --- a/keyboards/infinity60/rules.mk +++ b/keyboards/infinity60/rules.mk @@ -1,16 +1,8 @@ # MCU name MCU = MK20DX128 -# 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 -# - MK20DX128BLDR4 for Infinity with Kiibohd bootloader -MCU_LDSCRIPT = MK20DX128BLDR4 +# Bootloader selection +BOOTLOADER = kiibohd # Board: it should exist either in /os/hal/boards/ # or /boards @@ -21,15 +13,9 @@ MCU_LDSCRIPT = MK20DX128BLDR4 # - MCHCK_K20 for Infinity KB BOARD = MCHCK_K20 -BOOTLOADER = dfu - # Build Options # comment out to disable the options. # - -DFU_ARGS = -d 1c11:b007 -DFU_SUFFIX_ARGS = -p b007 -v 1c11 - BOOTMAGIC_ENABLE = no # 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/k_type/bootloader_defs.h b/keyboards/k_type/bootloader_defs.h deleted file mode 100644 index c67153be6021..000000000000 --- a/keyboards/k_type/bootloader_defs.h +++ /dev/null @@ -1 +0,0 @@ -#define KIIBOHD_BOOTLOADER diff --git a/keyboards/k_type/rules.mk b/keyboards/k_type/rules.mk index 56c4c606e3f3..52a9b8ee6a50 100644 --- a/keyboards/k_type/rules.mk +++ b/keyboards/k_type/rules.mk @@ -1,17 +1,8 @@ # MCU name MCU = MK20DX256 -# 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 -# - MK20DX128BLDR4 for Infinity with Kiibohd bootloader -# - MK20DX256BLDR8 for Infinity ErgoDox with Kiibohd bootloader -MCU_LDSCRIPT = MK20DX256BLDR8 +# Bootloader selection +BOOTLOADER = kiibohd # Board: it should exist either in /os/hal/boards/ # or /boards @@ -19,11 +10,6 @@ MCU_LDSCRIPT = MK20DX256BLDR8 # hack to ensure the watchdog has started before trying to disable it. BOARD = IC_TEENSY_3_1 -DFU_ARGS = -d 1c11:b007 -DFU_SUFFIX_ARGS = -p b007 -v 1c11 - -BOOTLOADER = dfu - # Build Options # comment out to disable the options. # diff --git a/keyboards/whitefox/bootloader_defs.h b/keyboards/whitefox/bootloader_defs.h deleted file mode 100644 index c67153be6021..000000000000 --- a/keyboards/whitefox/bootloader_defs.h +++ /dev/null @@ -1 +0,0 @@ -#define KIIBOHD_BOOTLOADER diff --git a/keyboards/whitefox/rules.mk b/keyboards/whitefox/rules.mk index 14507e9dd279..c3621ebd1d9f 100644 --- a/keyboards/whitefox/rules.mk +++ b/keyboards/whitefox/rules.mk @@ -1,17 +1,8 @@ # MCU name MCU = MK20DX256 -# 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 -# - MK20DX128BLDR4 for Infinity with Kiibohd bootloader -# - MK20DX256BLDR8 for Infinity ErgoDox with Kiibohd bootloader -MCU_LDSCRIPT = MK20DX256BLDR8 +# Bootloader selection +BOOTLOADER = kiibohd # Board: it should exist either in /os/hal/boards/ # or /boards @@ -22,11 +13,6 @@ MCU_LDSCRIPT = MK20DX256BLDR8 # - MCHCK_K20 for Infinity KB BOARD = IC_TEENSY_3_1 -DFU_ARGS = -d 1c11:b007 -DFU_SUFFIX_ARGS = -p b007 -v 1c11 - -BOOTLOADER = dfu - # Build Options # comment out to disable the options. # diff --git a/quantum/mcu_selection.mk b/quantum/mcu_selection.mk index 61fd7b6e4c04..33a0cabc84e5 100644 --- a/quantum/mcu_selection.mk +++ b/quantum/mcu_selection.mk @@ -1,3 +1,5 @@ +MCU_ORIG := $(MCU) + ifneq ($(findstring MKL26Z64, $(MCU)),) # Cortex version MCU = cortex-m0plus diff --git a/tmk_core/chibios.mk b/tmk_core/chibios.mk index a218488a194f..2bd53f0dc8c9 100644 --- a/tmk_core/chibios.mk +++ b/tmk_core/chibios.mk @@ -386,7 +386,7 @@ bin: $(BUILD_DIR)/$(TARGET).bin sizeafter flash: $(BUILD_DIR)/$(TARGET).bin cpfirmware sizeafter ifneq ($(strip $(PROGRAM_CMD)),) $(PROGRAM_CMD) -else ifeq ($(strip $(BOOTLOADER)),dfu) +else ifeq ($(strip $(BOOTLOADER)),kiibohd) $(call EXEC_DFU_UTIL) else ifeq ($(strip $(MCU_FAMILY)),KINETIS) $(call EXEC_TEENSY) diff --git a/tmk_core/common/chibios/bootloader.c b/tmk_core/common/chibios/bootloader.c index 743448ee18f0..7b2cf5c435aa 100644 --- a/tmk_core/common/chibios/bootloader.c +++ b/tmk_core/common/chibios/bootloader.c @@ -82,7 +82,7 @@ void enter_bootloader_mode_if_requested(void) { #elif defined(KL2x) || defined(K20x) // STM32_BOOTLOADER_DUAL_BANK // STM32_BOOTLOADER_ADDRESS /* Kinetis */ -# if defined(KIIBOHD_BOOTLOADER) +# if defined(BOOTLOADER_KIIBOHD) /* Kiibohd Bootloader (MCHCK and Infinity KB) */ # define SCB_AIRCR_VECTKEY_WRITEMAGIC 0x05FA0000 const uint8_t sys_reset_to_loader_magic[] = "\xff\x00\x7fRESET TO LOADER\x7f\x00\xff"; @@ -92,14 +92,14 @@ void bootloader_jump(void) { SCB->AIRCR = SCB_AIRCR_VECTKEY_WRITEMAGIC | SCB_AIRCR_SYSRESETREQ_Msk; } -# else /* defined(KIIBOHD_BOOTLOADER) */ +# else /* defined(BOOTLOADER_KIIBOHD) */ /* Default for Kinetis - expecting an ARM Teensy */ # include "wait.h" void bootloader_jump(void) { wait_ms(100); __BKPT(0); } -# endif /* defined(KIIBOHD_BOOTLOADER) */ +# endif /* defined(BOOTLOADER_KIIBOHD) */ #else /* neither STM32 nor KINETIS */ __attribute__((weak)) void bootloader_jump(void) {} From 1de39e5632a1cc9c4541a6b62b6eb3b360ce8747 Mon Sep 17 00:00:00 2001 From: Nick Brassel Date: Tue, 25 Aug 2020 18:58:22 +1000 Subject: [PATCH 692/930] Define STM32_DMA_REQUIRED when using DMA-based WS2812 driver on STM32. (#10127) --- common_features.mk | 6 ++++++ keyboards/zvecr/split_blackpill/rules.mk | 1 - keyboards/zvecr/zv48/rules.mk | 1 - 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/common_features.mk b/common_features.mk index 2806544f8b5b..088db89cac19 100644 --- a/common_features.mk +++ b/common_features.mk @@ -304,6 +304,12 @@ ifeq ($(strip $(WS2812_DRIVER_REQUIRED)), yes) SRC += ws2812.c else SRC += ws2812_$(strip $(WS2812_DRIVER)).c + + ifeq ($(strip $(PLATFORM)), CHIBIOS) + ifeq ($(strip $(WS2812_DRIVER)), pwm) + OPT_DEFS += -DSTM32_DMA_REQUIRED=TRUE + endif + endif endif # add extra deps diff --git a/keyboards/zvecr/split_blackpill/rules.mk b/keyboards/zvecr/split_blackpill/rules.mk index 151ed15d8498..6feec7dd97ae 100644 --- a/keyboards/zvecr/split_blackpill/rules.mk +++ b/keyboards/zvecr/split_blackpill/rules.mk @@ -31,6 +31,5 @@ FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches SPLIT_KEYBOARD = yes SERIAL_DRIVER = usart WS2812_DRIVER = pwm -OPT_DEFS += -DSTM32_DMA_REQUIRED=TRUE LAYOUTS = ortho_4x12 diff --git a/keyboards/zvecr/zv48/rules.mk b/keyboards/zvecr/zv48/rules.mk index 41ec506e6cfc..d725f9cb11cb 100644 --- a/keyboards/zvecr/zv48/rules.mk +++ b/keyboards/zvecr/zv48/rules.mk @@ -22,7 +22,6 @@ FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches SPLIT_KEYBOARD = yes SERIAL_DRIVER = usart WS2812_DRIVER = pwm -OPT_DEFS += -DSTM32_DMA_REQUIRED=TRUE DEFAULT_FOLDER = zvecr/zv48/f401 From 15df82cdf3f5b5d81af2cc235fbfe7643cd044b9 Mon Sep 17 00:00:00 2001 From: Sergey Vlasov Date: Tue, 25 Aug 2020 12:02:32 +0300 Subject: [PATCH 693/930] Fix DMA stream ID calculation in ws2812_pwm (#10008) Some STM32 chips have STM32_DMA1_STREAM1 as the first DMA stream, others (F4xx, F7xx, H7xx) have STM32_DMA1_STREAM0. Instead of those names, use STM32_DMA_STREAM(0), which should always give the first stm32_dma_stream_t structure in the DMA streams array, so that the stream ID would be calculated correctly. --- drivers/chibios/ws2812_pwm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/chibios/ws2812_pwm.c b/drivers/chibios/ws2812_pwm.c index d93fa24735d5..bfb44ce4a4e6 100644 --- a/drivers/chibios/ws2812_pwm.c +++ b/drivers/chibios/ws2812_pwm.c @@ -180,7 +180,7 @@ void ws2812_init(void) { // Configure DMA // dmaInit(); // Joe added this - dmaStreamAlloc(WS2812_DMA_STREAM - STM32_DMA1_STREAM1, 10, NULL, NULL); + dmaStreamAlloc(WS2812_DMA_STREAM - STM32_DMA_STREAM(0), 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); From 0f596881b36587a298568192078f9b467c51c109 Mon Sep 17 00:00:00 2001 From: Ryan Date: Tue, 25 Aug 2020 19:03:45 +1000 Subject: [PATCH 694/930] Remove support for Adafruit EZ-Key (#10103) * Remove support for Adafruit EZ-Key * Update docs/ja/feature_bluetooth.md Co-authored-by: Takeshi ISHII <2170248+mtei@users.noreply.github.com> Co-authored-by: Takeshi ISHII <2170248+mtei@users.noreply.github.com> --- docs/config_options.md | 4 +- docs/feature_bluetooth.md | 7 +- docs/getting_started_make_guide.md | 4 - docs/ja/config_options.md | 4 +- docs/ja/feature_bluetooth.md | 8 +- docs/ja/getting_started_make_guide.md | 4 - tmk_core/common.mk | 6 -- tmk_core/protocol/lufa.mk | 12 +-- tmk_core/protocol/lufa/bluetooth.c | 38 ---------- tmk_core/protocol/lufa/bluetooth.h | 96 ----------------------- tmk_core/protocol/lufa/lufa.c | 105 +++++++++++++++----------- 11 files changed, 68 insertions(+), 220 deletions(-) delete mode 100644 tmk_core/protocol/lufa/bluetooth.c delete mode 100644 tmk_core/protocol/lufa/bluetooth.h diff --git a/docs/config_options.md b/docs/config_options.md index a323741c2a05..f9b1cc657870 100644 --- a/docs/config_options.md +++ b/docs/config_options.md @@ -371,10 +371,8 @@ Use these to enable or disable building certain features. The more you have enab * MIDI controls * `UNICODE_ENABLE` * Unicode -* `BLUETOOTH_ENABLE` - * Legacy option to Enable Bluetooth with the Adafruit EZ-Key HID. See BLUETOOTH * `BLUETOOTH` - * Current options are AdafruitEzKey, AdafruitBLE, RN42 + * Current options are AdafruitBLE, RN42 * `SPLIT_KEYBOARD` * Enables split keyboard support (dual MCU like the let's split and bakingpy's boards) and includes all necessary files located at quantum/split_common * `CUSTOM_MATRIX` diff --git a/docs/feature_bluetooth.md b/docs/feature_bluetooth.md index 6cd5c3c6cf32..7b450b1ac8fc 100644 --- a/docs/feature_bluetooth.md +++ b/docs/feature_bluetooth.md @@ -2,11 +2,10 @@ ## Bluetooth Known Supported Hardware -Currently Bluetooth support is limited to AVR based chips. For Bluetooth 2.1, QMK has support for RN-42 modules and the Bluefruit EZ-Key, the latter of which is not produced anymore. For more recent BLE protocols, currently only the Adafruit Bluefruit SPI Friend is directly supported. BLE is needed to connect to iOS devices. Note iOS does not support mouse input. +Currently Bluetooth support is limited to AVR based chips. For Bluetooth 2.1, QMK has support for RN-42 modules. For more recent BLE protocols, currently only the Adafruit Bluefruit SPI Friend is directly supported. BLE is needed to connect to iOS devices. Note iOS does not support mouse input. |Board |Bluetooth Protocol |Connection Type |rules.mk |Bluetooth Chip| |----------------------------------------------------------------|----------------------------|----------------|---------------------------|--------------| -|[Adafruit EZ-Key HID](https://www.adafruit.com/product/1535) |Bluetooth Classic | UART |`BLUETOOTH = AdafruitEZKey` | | |Roving Networks RN-42 (Sparkfun Bluesmirf) |Bluetooth Classic | UART |`BLUETOOTH = RN42` | RN-42 | |[Bluefruit LE SPI Friend](https://www.adafruit.com/product/2633)|Bluetooth Low Energy | SPI |`BLUETOOTH = AdafruitBLE` | nRF51822 | @@ -24,16 +23,12 @@ Currently The only bluetooth chipset supported by QMK is the Adafruit Bluefruit A Bluefruit UART friend can be converted to an SPI friend, however this [requires](https://github.com/qmk/qmk_firmware/issues/2274) some reflashing and soldering directly to the MDBT40 chip. -## Adafruit EZ-Key hid -This requires [some hardware changes](https://www.reddit.com/r/MechanicalKeyboards/comments/3psx0q/the_planck_keyboard_with_bluetooth_guide_and/?ref=search_posts), but can be enabled via the Makefile. The firmware will still output characters via USB, so be aware of this when charging via a computer. It would make sense to have a switch on the Bluefruit to turn it off at will. - ## Bluetooth Rules.mk Options Use only one of these * BLUETOOTH_ENABLE = yes (Legacy Option) * BLUETOOTH = RN42 -* BLUETOOTH = AdafruitEZKey * BLUETOOTH = AdafruitBLE ## Bluetooth Keycodes diff --git a/docs/getting_started_make_guide.md b/docs/getting_started_make_guide.md index df82a001f049..a89dc73d018a 100644 --- a/docs/getting_started_make_guide.md +++ b/docs/getting_started_make_guide.md @@ -101,10 +101,6 @@ This allows you to send Unicode characters by inputting a mnemonic corresponding For further details, as well as limitations, see the [Unicode page](feature_unicode.md). -`BLUETOOTH_ENABLE` - -This allows you to interface with a Bluefruit EZ-key to send keycodes wirelessly. It uses the D2 and D3 pins. - `AUDIO_ENABLE` This allows you output audio on the C6 pin (needs abstracting). See the [audio page](feature_audio.md) for more information. diff --git a/docs/ja/config_options.md b/docs/ja/config_options.md index 6ba7f6f1f330..2a64f2ba2af4 100644 --- a/docs/ja/config_options.md +++ b/docs/ja/config_options.md @@ -369,10 +369,8 @@ QMK での全ての利用可能な設定にはデフォルトがあります。 * MIDI 制御 * `UNICODE_ENABLE` * Unicode -* `BLUETOOTH_ENABLE` - * Adafruit EZ-Key HID で Bluetooth を有効にするレガシーオプション。BLUETOOTH を見てください * `BLUETOOTH` - * 現在のオプションは、AdafruitEzKey、AdafruitBLE、RN42 + * 現在のオプションは、AdafruitBLE、RN42 * `SPLIT_KEYBOARD` * 分割キーボード (let's split や bakingpy のキーボードのようなデュアル MCU) のサポートを有効にし、quantum/split_common にある全ての必要なファイルをインクルードします * `CUSTOM_MATRIX` diff --git a/docs/ja/feature_bluetooth.md b/docs/ja/feature_bluetooth.md index 4443a4e3ea50..f7835dd548fd 100644 --- a/docs/ja/feature_bluetooth.md +++ b/docs/ja/feature_bluetooth.md @@ -7,11 +7,10 @@ ## Bluetooth の既知のサポートハードウェア -現在のところ Bluetooth のサポートは AVR ベースのチップに限られます。Bluetooth 2.1 については、QMK は RN-42 モジュールと、Bluefruit EZ-Key をサポートしますが、後者はもう生産されていません。より最近の BLE プロトコルについては、現在のところ Adafruit Bluefruit SPI Friend のみが直接サポートされています。iOS デバイスに接続するには、BLE が必要です。iOS はマウス入力をサポートしないことに注意してください。 +現在のところ Bluetooth のサポートは AVR ベースのチップに限られます。Bluetooth 2.1 については、QMK は RN-42 モジュールをサポートします。より最近の BLE プロトコルについては、現在のところ Adafruit Bluefruit SPI Friend のみが直接サポートされています。iOS デバイスに接続するには、BLE が必要です。iOS はマウス入力をサポートしないことに注意してください。 | ボード | Bluetooth プロトコル | 接続タイプ | rules.mk | Bluetooth チップ | |----------------------------------------------------------------|----------------------------|----------------|---------------------------|--------------| -| [Adafruit EZ-Key HID](https://www.adafruit.com/product/1535) | Bluetooth Classic | UART | `BLUETOOTH = AdafruitEZKey` | | | Roving Networks RN-42 (Sparkfun Bluesmirf) | Bluetooth Classic | UART | `BLUETOOTH = RN42` | RN-42 | | [Bluefruit LE SPI Friend](https://www.adafruit.com/product/2633) | Bluetooth Low Energy | SPI | `BLUETOOTH = AdafruitBLE` | nRF51822 | @@ -29,16 +28,11 @@ Bluefruit UART friend は SPI friend に変換することができますが、これにはMDBT40 チップへの直接の再書き込みとはんだ付けが[必要です](https://github.com/qmk/qmk_firmware/issues/2274)。 -## Adafruit EZ-Key hid -これには[ハードウェアの変更](https://www.reddit.com/r/MechanicalKeyboards/comments/3psx0q/the_planck_keyboard_with_bluetooth_guide_and/?ref=search_posts)が必要ですが、Makefile を使って有効にすることができます。ファームウェアは引き続き USB 経由で文字を出力するため、コンピュータ経由で充電する場合は注意してください。任意にオフにするために Bluefruit 上にスイッチを持つことは理にかなっています。 - - ## Bluetooth の Rules.mk オプション これらのうちの1つだけを使ってください * BLUETOOTH_ENABLE = yes (レガシーオプション) * BLUETOOTH = RN42 -* BLUETOOTH = AdafruitEZKey * BLUETOOTH = AdafruitBLE ## Bluetooth キーコード diff --git a/docs/ja/getting_started_make_guide.md b/docs/ja/getting_started_make_guide.md index 0d39583a1dcd..cbc824de8b1c 100644 --- a/docs/ja/getting_started_make_guide.md +++ b/docs/ja/getting_started_make_guide.md @@ -106,10 +106,6 @@ make コマンド自体にもいくつかの追加オプションがあります 詳細と制限については、[Unicode ページ](ja/feature_unicode.md) を見てください。 -`BLUETOOTH_ENABLE` - -これによりキーコードをワイヤレスで送信するために Bluefruit EZ-key と連動することができます。D2 と D3 ピンを使います。 - `AUDIO_ENABLE` C6 ピン(抽象化が必要)でオーディオ出力できます。詳細は[オーディオページ](ja/feature_audio.md)を見てください。 diff --git a/tmk_core/common.mk b/tmk_core/common.mk index a6c439f5c129..3c9de33c9940 100644 --- a/tmk_core/common.mk +++ b/tmk_core/common.mk @@ -132,12 +132,6 @@ ifeq ($(strip $(BLUETOOTH)), AdafruitBLE) TMK_COMMON_DEFS += -DNO_USB_STARTUP_CHECK endif -ifeq ($(strip $(BLUETOOTH)), AdafruitEZKey) - TMK_COMMON_DEFS += -DBLUETOOTH_ENABLE - TMK_COMMON_DEFS += -DMODULE_ADAFRUIT_EZKEY - TMK_COMMON_DEFS += -DNO_USB_STARTUP_CHECK -endif - ifeq ($(strip $(BLUETOOTH)), RN42) TMK_COMMON_DEFS += -DBLUETOOTH_ENABLE TMK_COMMON_DEFS += -DMODULE_RN42 diff --git a/tmk_core/protocol/lufa.mk b/tmk_core/protocol/lufa.mk index 9bc972c266b7..1cc1fa04e5fb 100644 --- a/tmk_core/protocol/lufa.mk +++ b/tmk_core/protocol/lufa.mk @@ -23,8 +23,7 @@ ifeq ($(strip $(MIDI_ENABLE)), yes) endif ifeq ($(strip $(BLUETOOTH_ENABLE)), yes) - LUFA_SRC += $(LUFA_DIR)/bluetooth.c \ - outputselect.c \ + LUFA_SRC += outputselect.c \ $(TMK_DIR)/protocol/serial_uart.c endif @@ -35,15 +34,8 @@ ifeq ($(strip $(BLUETOOTH)), AdafruitBLE) $(LUFA_DIR)/adafruit_ble.cpp endif -ifeq ($(strip $(BLUETOOTH)), AdafruitEZKey) - LUFA_SRC += $(LUFA_DIR)/bluetooth.c \ - outputselect.c \ - $(TMK_DIR)/protocol/serial_uart.c -endif - ifeq ($(strip $(BLUETOOTH)), RN42) - LUFA_SRC += $(LUFA_DIR)/bluetooth.c \ - outputselect.c \ + LUFA_SRC += outputselect.c \ $(TMK_DIR)/protocol/serial_uart.c endif diff --git a/tmk_core/protocol/lufa/bluetooth.c b/tmk_core/protocol/lufa/bluetooth.c deleted file mode 100644 index 5eb52860b14a..000000000000 --- a/tmk_core/protocol/lufa/bluetooth.c +++ /dev/null @@ -1,38 +0,0 @@ -/* -Bluefruit Protocol for TMK firmware -Author: Benjamin Gould, 2013 - Jack Humbert, 2015 -Based on code 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 "report.h" -#include "print.h" -#include "debug.h" -#include "bluetooth.h" - -void bluefruit_keyboard_print_report(report_keyboard_t *report) { - if (!debug_keyboard) return; - dprintf("keys: "); - for (int i = 0; i < KEYBOARD_REPORT_KEYS; i++) { - debug_hex8(report->keys[i]); - dprintf(" "); - } - dprintf(" mods: "); - debug_hex8(report->mods); - dprintf(" reserved: "); - debug_hex8(report->reserved); - dprintf("\n"); -} - -void bluefruit_serial_send(uint8_t data) { serial_send(data); } \ No newline at end of file diff --git a/tmk_core/protocol/lufa/bluetooth.h b/tmk_core/protocol/lufa/bluetooth.h deleted file mode 100644 index 67f031439e92..000000000000 --- a/tmk_core/protocol/lufa/bluetooth.h +++ /dev/null @@ -1,96 +0,0 @@ -/* -Bluefruit Protocol for TMK firmware -Author: Benjamin Gould, 2013 - Jack Humbert, 2015 -Based on code 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 . -*/ - -#pragma once - -#include "../serial.h" - -void bluefruit_serial_send(uint8_t data); - -// https://learn.adafruit.com/introducing-bluefruit-ez-key-diy-bluetooth-hid-keyboard/sending-keys-via-serial#raw-hid-consumer-reports-8-14 -static inline uint16_t CONSUMER2BLUEFRUIT(uint16_t usage) { - switch (usage) { - case AC_HOME: - return 0x0001; - case AL_KEYBOARD_LAYOUT: - return 0x0002; - case AC_SEARCH: - return 0x0004; - case SNAPSHOT: - return 0x0008; - case AUDIO_VOL_UP: - return 0x0010; - case AUDIO_VOL_DOWN: - return 0x0020; - case TRANSPORT_PLAY_PAUSE: - return 0x0040; - case TRANSPORT_FAST_FORWARD: - return 0x0080; - case TRANSPORT_REWIND: - return 0x0100; - case TRANSPORT_NEXT_TRACK: - return 0x0200; - case TRANSPORT_PREV_TRACK: - return 0x0400; - case TRANSPORT_RANDOM_PLAY: - return 0x0800; - case TRANSPORT_STOP: - return 0x1000; - default: - return 0; - } -} - -// https://cdn.sparkfun.com/datasheets/Wireless/Bluetooth/bluetooth_cr_UG-v1.0r.pdf#G7.663734 -static inline uint16_t CONSUMER2RN42(uint16_t usage) { - switch (usage) { - case AC_HOME: - return 0x0001; - case AL_EMAIL: - return 0x0002; - case AC_SEARCH: - return 0x0004; - case AL_KEYBOARD_LAYOUT: - return 0x0008; - case AUDIO_VOL_UP: - return 0x0010; - case AUDIO_VOL_DOWN: - return 0x0020; - case AUDIO_MUTE: - return 0x0040; - case TRANSPORT_PLAY_PAUSE: - return 0x0080; - case TRANSPORT_NEXT_TRACK: - return 0x0100; - case TRANSPORT_PREV_TRACK: - return 0x0200; - case TRANSPORT_STOP: - return 0x0400; - case TRANSPORT_EJECT: - return 0x0800; - case TRANSPORT_FAST_FORWARD: - return 0x1000; - case TRANSPORT_REWIND: - return 0x2000; - case TRANSPORT_STOP_EJECT: - return 0x4000; - case AL_LOCAL_BROWSER: - return 0x8000; - default: - return 0; - } -} diff --git a/tmk_core/protocol/lufa/lufa.c b/tmk_core/protocol/lufa/lufa.c index 8410eb483ff7..09ba0bacf736 100644 --- a/tmk_core/protocol/lufa/lufa.c +++ b/tmk_core/protocol/lufa/lufa.c @@ -69,7 +69,7 @@ extern keymap_config_t keymap_config; # ifdef MODULE_ADAFRUIT_BLE # include "adafruit_ble.h" # else -# include "bluetooth.h" +# include "../serial.h" # endif #endif @@ -89,6 +89,46 @@ extern keymap_config_t keymap_config; # include "joystick.h" #endif +// https://cdn.sparkfun.com/datasheets/Wireless/Bluetooth/bluetooth_cr_UG-v1.0r.pdf#G7.663734 +static inline uint16_t CONSUMER2RN42(uint16_t usage) { + switch (usage) { + case AC_HOME: + return 0x0001; + case AL_EMAIL: + return 0x0002; + case AC_SEARCH: + return 0x0004; + case AL_KEYBOARD_LAYOUT: + return 0x0008; + case AUDIO_VOL_UP: + return 0x0010; + case AUDIO_VOL_DOWN: + return 0x0020; + case AUDIO_MUTE: + return 0x0040; + case TRANSPORT_PLAY_PAUSE: + return 0x0080; + case TRANSPORT_NEXT_TRACK: + return 0x0100; + case TRANSPORT_PREV_TRACK: + return 0x0200; + case TRANSPORT_STOP: + return 0x0400; + case TRANSPORT_EJECT: + return 0x0800; + case TRANSPORT_FAST_FORWARD: + return 0x1000; + case TRANSPORT_REWIND: + return 0x2000; + case TRANSPORT_STOP_EJECT: + return 0x4000; + case AL_LOCAL_BROWSER: + return 0x8000; + default: + return 0; + } +} + uint8_t keyboard_idle = 0; /* 0: Boot Protocol, 1: Report Protocol(default) */ uint8_t keyboard_protocol = 1; @@ -631,20 +671,13 @@ static void send_keyboard(report_keyboard_t *report) { # ifdef MODULE_ADAFRUIT_BLE adafruit_ble_send_keys(report->mods, report->keys, sizeof(report->keys)); # elif MODULE_RN42 - bluefruit_serial_send(0xFD); - bluefruit_serial_send(0x09); - bluefruit_serial_send(0x01); - bluefruit_serial_send(report->mods); - bluefruit_serial_send(report->reserved); - for (uint8_t i = 0; i < KEYBOARD_REPORT_KEYS; i++) { - bluefruit_serial_send(report->keys[i]); - } -# else - bluefruit_serial_send(0xFD); - bluefruit_serial_send(report->mods); - bluefruit_serial_send(report->reserved); + serial_send(0xFD); + serial_send(0x09); + serial_send(0x01); + serial_send(report->mods); + serial_send(report->reserved); for (uint8_t i = 0; i < KEYBOARD_REPORT_KEYS; i++) { - bluefruit_serial_send(report->keys[i]); + serial_send(report->keys[i]); } # endif } @@ -697,15 +730,15 @@ static void send_mouse(report_mouse_t *report) { // FIXME: mouse buttons adafruit_ble_send_mouse_move(report->x, report->y, report->v, report->h, report->buttons); # else - bluefruit_serial_send(0xFD); - bluefruit_serial_send(0x00); - bluefruit_serial_send(0x03); - bluefruit_serial_send(report->buttons); - bluefruit_serial_send(report->x); - bluefruit_serial_send(report->y); - bluefruit_serial_send(report->v); // should try sending the wheel v here - bluefruit_serial_send(report->h); // should try sending the wheel h here - bluefruit_serial_send(0x00); + serial_send(0xFD); + serial_send(0x00); + serial_send(0x03); + serial_send(report->buttons); + serial_send(report->x); + serial_send(report->y); + serial_send(report->v); // should try sending the wheel v here + serial_send(report->h); // should try sending the wheel h here + serial_send(0x00); # endif } @@ -778,25 +811,11 @@ static void send_consumer(uint16_t data) { if (data == last_data) return; last_data = data; uint16_t bitmap = CONSUMER2RN42(data); - bluefruit_serial_send(0xFD); - bluefruit_serial_send(0x03); - bluefruit_serial_send(0x03); - bluefruit_serial_send(bitmap & 0xFF); - bluefruit_serial_send((bitmap >> 8) & 0xFF); -# else - static uint16_t last_data = 0; - if (data == last_data) return; - last_data = data; - uint16_t bitmap = CONSUMER2BLUEFRUIT(data); - bluefruit_serial_send(0xFD); - bluefruit_serial_send(0x00); - bluefruit_serial_send(0x02); - bluefruit_serial_send(bitmap & 0xFF); - bluefruit_serial_send((bitmap >> 8) & 0xFF); - bluefruit_serial_send(0x00); - bluefruit_serial_send(0x00); - bluefruit_serial_send(0x00); - bluefruit_serial_send(0x00); + serial_send(0xFD); + serial_send(0x03); + serial_send(0x03); + serial_send(bitmap & 0xFF); + serial_send((bitmap >> 8) & 0xFF); # endif } @@ -1018,7 +1037,7 @@ int main(void) { setup_usb(); sei(); -#if defined(MODULE_ADAFRUIT_EZKEY) || defined(MODULE_RN42) +#if defined(MODULE_RN42) serial_init(); #endif From 629cfc7f5ebd815231c9e3f969170995db1481c6 Mon Sep 17 00:00:00 2001 From: Ryan Date: Wed, 26 Aug 2020 18:41:32 +1000 Subject: [PATCH 695/930] K-Type refactor (#9864) * K-Type refactor * Declare QMK in product name again * Hopefully fix matrix scanning * Maybe this time * Partial (literally) RGB Matrix support * Put RGB_MATRIX_ENABLE into rgb keymap for now * Add ifdefs for RGB config * Set layer 1 to actually be layer 1... * Update keyboards/k_type/readme.md * Put all RGB config in keymap for now * Set SDB high? * Before `rgb_matrix_init()` would be best * User level, not keyboard * Combating dropped keys * Nope * Readme for RGB keymap * Remove custom matrix --- keyboards/k_type/config.h | 75 ++++++++-- keyboards/k_type/info.json | 118 +++++++++++++-- keyboards/k_type/k_type.c | 171 ++++++++++++++++++++-- keyboards/k_type/k_type.h | 42 +++--- keyboards/k_type/keymaps/belak/keymap.c | 46 +++--- keyboards/k_type/keymaps/default/keymap.c | 16 +- keyboards/k_type/keymaps/rgb/config.h | 23 +++ keyboards/k_type/keymaps/rgb/keymap.c | 30 ++++ keyboards/k_type/keymaps/rgb/readme.md | 5 + keyboards/k_type/keymaps/rgb/rules.mk | 1 + keyboards/k_type/matrix.c | 138 ----------------- keyboards/k_type/readme.md | 12 +- keyboards/k_type/rules.mk | 28 ++-- quantum/config_common.h | 2 + 14 files changed, 465 insertions(+), 242 deletions(-) create mode 100644 keyboards/k_type/keymaps/rgb/config.h create mode 100644 keyboards/k_type/keymaps/rgb/keymap.c create mode 100644 keyboards/k_type/keymaps/rgb/readme.md create mode 100644 keyboards/k_type/keymaps/rgb/rules.mk delete mode 100644 keyboards/k_type/matrix.c diff --git a/keyboards/k_type/config.h b/keyboards/k_type/config.h index 86b08769d1d2..82f641c533a7 100644 --- a/keyboards/k_type/config.h +++ b/keyboards/k_type/config.h @@ -15,30 +15,73 @@ 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 /* USB Device descriptor parameter */ -#define VENDOR_ID 0x1c11 -#define PRODUCT_ID 0xb04d -#define DEVICE_VER 0x0001 -#define MANUFACTURER Input Club -#define PRODUCT K-Type/QMK +#define VENDOR_ID 0x1C11 +#define PRODUCT_ID 0xB04D +#define DEVICE_VER 0x0001 +#define MANUFACTURER Input:Club +#define PRODUCT K-Type (QMK) + /* key matrix size */ #define MATRIX_ROWS 10 #define MATRIX_COLS 10 -/* define if matrix has ghost */ -//#define MATRIX_HAS_GHOST +/* + * 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, D6, D7, C1, C2, C3, C4, C5, C6, C7 } +#define MATRIX_COL_PINS { B2, B3, B18, B19, C0, C8, C9, D0, D1, D4 } +#define UNUSED_PINS -/* Set 0 if debouncing isn't needed */ -#define DEBOUNCE 5 +/* 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 useful 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 + /* * Feature disable options * These options are also useful to firmware size reduction. @@ -54,7 +97,11 @@ 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 -#endif +/* disable these deprecated features by default */ +#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/k_type/info.json b/keyboards/k_type/info.json index 9d3e10568b0e..fd4c95274864 100644 --- a/keyboards/k_type/info.json +++ b/keyboards/k_type/info.json @@ -1,12 +1,110 @@ { - "keyboard_name": "K-Type", - "url": "", - "maintainer": "qmk", - "width": 18.25, - "height": 6.5, - "layouts": { - "KEYMAP": { - "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":"PrtSc", "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":"!", "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":"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":"PgUp", "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":"|", "x":13.5, "y":2.5, "w":1.5}, {"label":"Delete", "x":15.25, "y":2.5}, {"label":"End", "x":16.25, "y":2.5}, {"label":"PgDn", "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":"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":2.75}, {"label":"\u2191", "x":16.25, "y":4.5}, {"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":6.25}, {"label":"Alt", "x":10, "y":5.5, "w":1.25}, {"label":"Win", "x":11.25, "y":5.5, "w":1.25}, {"label":"Menu", "x":12.5, "y":5.5, "w":1.25}, {"label":"Ctrl", "x":13.75, "y":5.5, "w":1.25}, {"label":"\u2190", "x":15.25, "y":5.5}, {"label":"\u2193", "x":16.25, "y":5.5}, {"label":"\u2192", "x":17.25, "y":5.5}] - } - } + "keyboard_name": "K-Type", + "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} + ] + } + } } diff --git a/keyboards/k_type/k_type.c b/keyboards/k_type/k_type.c index 0cffbedfd69d..ae62f0e72331 100644 --- a/keyboards/k_type/k_type.c +++ b/keyboards/k_type/k_type.c @@ -14,20 +14,171 @@ GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . */ + #include "k_type.h" -__attribute__ ((weak)) -void matrix_init_user(void) { -} +#ifdef RGB_MATRIX_ENABLE +const is31_led g_is31_leds[DRIVER_LED_TOTAL] = { + { 0, B_1, A_1, C_1 }, + { 0, B_2, A_2, C_2 }, + { 0, B_3, A_3, C_3 }, + { 0, B_4, A_4, C_4 }, + { 0, B_5, A_5, C_5 }, + { 0, B_6, A_6, C_6 }, + { 0, B_7, A_7, C_7 }, + { 0, B_8, A_8, C_8 }, + { 0, B_9, A_9, C_9 }, + { 0, B_10, A_10, C_10 }, + { 0, B_11, A_11, C_11 }, + { 0, B_12, A_12, C_12 }, + { 0, B_13, A_13, C_13 }, + { 0, B_14, A_14, C_14 }, + { 0, B_15, A_15, C_15 }, + { 0, B_16, A_16, C_16 }, + + { 0, E_1, D_1, F_1 }, + { 0, E_2, D_2, F_2 }, + { 0, E_3, D_3, F_3 }, + { 0, E_4, D_4, F_4 }, + { 0, E_5, D_5, F_5 }, + { 0, E_6, D_6, F_6 }, + { 0, E_7, D_7, F_7 }, + { 0, E_8, D_8, F_8 }, + { 0, E_9, D_9, F_9 }, + { 0, E_10, D_1, F_10 }, + { 0, E_11, D_1, F_11 }, + { 0, E_12, D_1, F_12 }, + { 0, E_13, D_1, F_13 }, + { 0, E_14, D_1, F_14 }, + { 0, E_15, D_15, F_15 }, + { 0, E_16, D_16, F_16 }, + + { 0, H_1, G_1, I_1 }, + { 0, H_2, G_2, I_2 }, + { 0, H_3, G_3, I_3 }, + { 0, H_4, G_4, I_4 }, + { 0, H_5, G_5, I_5 }, + { 0, H_6, G_6, I_6 }, + { 0, H_7, G_7, I_7 }, + { 0, H_8, G_8, I_8 }, + { 0, H_9, G_9, I_9 }, + { 0, H_10, G_1, I_10 }, + { 0, H_11, G_1, I_11 }, + { 0, H_12, G_1, I_12 }, + { 0, H_13, G_1, I_13 }, + { 0, H_14, G_1, I_14 }, + { 0, H_15, G_15, I_15 }, + { 0, H_16, G_16, I_16 }, + + { 0, K_1, J_1, L_1 }, + { 0, K_2, J_2, L_2 }, + { 0, K_3, J_3, L_3 }, + { 0, K_4, J_4, L_4 }, + { 0, K_5, J_5, L_5 }, + { 0, K_6, J_6, L_6 }, + { 0, K_7, J_7, L_7 }, + { 0, K_8, J_8, L_8 }, + { 0, K_9, J_9, L_9 }, + { 0, K_10, J_1, L_10 }, + { 0, K_11, J_1, L_11 }, + { 0, K_12, J_1, L_12 }, + { 0, K_13, J_1, L_13 }, + { 0, K_14, J_1, L_14 }, + { 0, K_15, J_15, L_15 }, + { 0, K_16, J_16, L_16 }, -__attribute__ ((weak)) -void matrix_scan_user(void) { -} + // Driver 2 is on I2C2 - currently not usable with i2c_master + //{ 1, B_1, A_1, C_1 }, + //{ 1, B_2, A_2, C_2 }, + //{ 1, B_3, A_3, C_3 }, + //{ 1, B_4, A_4, C_4 }, + //{ 1, B_5, A_5, C_5 }, + //{ 1, B_6, A_6, C_6 }, + //{ 1, B_7, A_7, C_7 }, + //{ 1, B_8, A_8, C_8 }, + //{ 1, B_9, A_9, C_9 }, + //{ 1, B_10, A_10, C_10 }, + //{ 1, B_11, A_11, C_11 }, + //{ 1, B_12, A_12, C_12 }, + //{ 1, B_13, A_13, C_13 }, + //{ 1, B_14, A_14, C_14 }, + //{ 1, B_15, A_15, C_15 }, + //{ 1, B_16, A_16, C_16 }, -void matrix_init_kb(void) { - matrix_init_user(); + //{ 1, E_1, D_1, F_1 }, + //{ 1, E_2, D_2, F_2 }, + //{ 1, E_3, D_3, F_3 }, + //{ 1, E_4, D_4, F_4 }, + //{ 1, E_5, D_5, F_5 }, + //{ 1, E_6, D_6, F_6 }, + //{ 1, E_7, D_7, F_7 }, + //{ 1, E_8, D_8, F_8 }, + //{ 1, E_9, D_9, F_9 }, + //{ 1, E_10, D_1, F_10 }, + //{ 1, E_11, D_1, F_11 }, + //{ 1, E_12, D_1, F_12 }, + //{ 1, E_13, D_1, F_13 }, + //{ 1, E_14, D_1, F_14 }, + //{ 1, E_15, D_15, F_15 }, + //{ 1, E_16, D_16, F_16 }, + + //{ 1, H_1, G_1, I_1 }, + //{ 1, H_2, G_2, I_2 }, + //{ 1, H_3, G_3, I_3 }, + //{ 1, H_4, G_4, I_4 }, + //{ 1, H_5, G_5, I_5 }, + //{ 1, H_6, G_6, I_6 }, + //{ 1, H_7, G_7, I_7 }, + //{ 1, H_8, G_8, I_8 }, + //{ 1, H_9, G_9, I_9 }, + //{ 1, H_10, G_1, I_10 }, + //{ 1, H_11, G_1, I_11 }, + //{ 1, H_12, G_1, I_12 }, + //{ 1, H_13, G_1, I_13 }, + //{ 1, H_14, G_1, I_14 }, + //{ 1, H_15, G_15, I_15 }, + //{ 1, H_16, G_16, I_16 }, + + //{ 1, K_1, J_1, L_1 }, + //{ 1, K_2, J_2, L_2 }, + //{ 1, K_3, J_3, L_3 }, + //{ 1, K_4, J_4, L_4 }, + //{ 1, K_5, J_5, L_5 }, + //{ 1, K_6, J_6, L_6 }, + //{ 1, K_7, J_7, L_7 } }; -void matrix_scan_kb(void) { - matrix_scan_user(); +led_config_t g_led_config = { + { + // Key Matrix to LED Index + { 0, 10, 20, 29, 38, 47, 57, NO_LED, NO_LED, NO_LED }, + { 1, 11, 21, NO_LED, 39, 48, 58, NO_LED, NO_LED, NO_LED }, + { 2, 12, 22, 30, 40, 49, 59, NO_LED, NO_LED, NO_LED }, + { 3, 13, 23, 31, 41, 50, 60, NO_LED, NO_LED, NO_LED }, + { 4, 14, 24, 32, 42, 51, 61, NO_LED, NO_LED, NO_LED }, + { 5, 15, 25, 33, 43, 52, NO_LED, NO_LED, NO_LED, NO_LED }, + { 6, 16, 26, 34, 44, 53, 62, NO_LED, NO_LED, NO_LED }, + { 7, 17, 27, 35, 45, 54, NO_LED, NO_LED, NO_LED, NO_LED }, + { 8, 18, 28, 36, 46, 55, 63, NO_LED, NO_LED, NO_LED }, + { 9, 19, NO_LED, 37, NO_LED, 56, NO_LED, NO_LED, NO_LED, NO_LED } + }, { + // LED Index to Physical Position + { 0, 0 }, { 26.35, 0 }, { 39.53, 0 }, { 52.71, 0 }, { 65.88, 0 }, { 79.06, 0 }, { 92.24, 0 }, { 105.41, 0 }, { 118.59, 0 }, { 131.77, 0 }, { 144.94, 0 }, { 158.12, 0 }, { 171.29, 0 }, { 197.65, 0 }, { 210.82, 0 }, { 224, 0 }, + + { 0, 21.33 }, { 13.18, 21.33 }, { 26.35, 21.33 }, { 39.53, 21.33 }, { 52.71, 21.33 }, { 65.88, 21.33 }, { 79.06, 21.33 }, { 92.24, 21.33 }, { 105.41, 21.33 }, { 118.59, 21.33 }, { 131.77, 21.33 }, { 144.94, 21.33 }, { 158.12, 21.33 }, { 171.29, 21.33 }, { 197.65, 21.33 }, { 210.82, 21.33 }, { 224, 21.33 }, + { 0, 32 }, { 13.18, 32 }, { 26.35, 32 }, { 39.53, 32 }, { 52.71, 32 }, { 65.88, 32 }, { 79.06, 32 }, { 92.24, 32 }, { 105.41, 32 }, { 118.59, 32 }, { 131.77, 32 }, { 144.94, 32 }, { 158.12, 32 }, { 171.29, 32 }, { 197.65, 32 }, { 210.82, 32 }, { 224, 32 }, + { 0, 42.67 }, { 13.18, 42.67 }, { 26.35, 42.67 }, { 39.53, 42.67 }, { 52.71, 42.67 }, { 65.88, 42.67 }, { 79.06, 42.67 }, { 92.24, 42.67 }, { 105.41, 42.67 }, { 118.59, 42.67 }, { 131.77, 42.67 }, { 144.94, 42.67 }, { 171.29, 42.67 }, + { 0, 53.33 }, //{ 26.35, 53.33 }, { 39.53, 53.33 }, { 52.71, 53.33 }, { 65.88, 53.33 }, { 79.06, 53.33 }, { 92.24, 53.33 }, { 105.41, 53.33 }, { 118.59, 53.33 }, { 131.77, 53.33 }, { 144.94, 53.33 }, { 171.29, 53.33 }, { 210.82, 53.33 }, + //{ 0, 64 }, { 13.18, 64 }, { 26.35, 64 }, { 79.06, 64 }, { 131.77, 64 }, { 144.94, 64 }, { 158.12, 64 }, { 171.29, 64 }, { 197.65, 64 }, { 210.82, 64 }, { 224, 64 } + }, { + // LED Index to Flag + 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, + + 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 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, 1, 1, + //1, 1, 1, 4, 1, 1, 1, 1, 1, 1, 1 + } }; +#endif diff --git a/keyboards/k_type/k_type.h b/keyboards/k_type/k_type.h index b0c1f2d652d3..077c0130662f 100644 --- a/keyboards/k_type/k_type.h +++ b/keyboards/k_type/k_type.h @@ -14,29 +14,29 @@ GNU General 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 K_TYPE_H -#define K_TYPE_H + +#pragma once #include "quantum.h" -#define KEYMAP( \ - 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, K79, K80, K81, K82, K83, K84, K85, K86, K87 \ +#define XXX KC_NO + +#define LAYOUT_tkl_ansi( \ + 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, k30, k32, k33, k34, \ + k35, k36, k37, k38, k39, k40, k41, k42, k43, k44, k45, k46, k47, k48, k50, k51, k52, \ + k53, k54, k55, k56, k57, k58, k59, k60, k61, k62, k63, k64, k66, \ + k68, k70, k71, k72, k73, k74, k75, k76, k77, k78, k79, k81, k83, \ + k84, k85, k86, k87, k88, k89, k90, k91, k92, k93, k94 \ ) { \ - { K01, K11, K21, K30, K39, K48, K58, K65, KC_NO, K83, }, \ - { K02, K12, K22, KC_NO, K40, K49, K59, K66, K75, K84, }, \ - { K03, K13, K23, K31, K41, K50, K60, K67, KC_NO, K85, }, \ - { K04, K14, K24, K32, K42, K51, K61, K68, K76, K86, }, \ - { K05, K15, K25, K33, K43, K52, K62, K69, K77, K87, }, \ - { K06, K16, K26, K34, K44, K53, KC_NO, K70, K78, KC_NO, }, \ - { K07, K17, K27, K35, K45, K54, K63, K71, K79, KC_NO, }, \ - { K08, K18, K28, K36, K46, K55, KC_NO, K72, K80, KC_NO, }, \ - { K09, K19, K29, K37, K47, K56, K64, K73, K81, KC_NO, }, \ - { K10, K20, KC_NO, K38, KC_NO, K57, KC_NO, K74, K82, KC_NO, }, \ + { 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, XXX }, \ + { k30, XXX, k32, k33, k34, k35, k36, k37, k38, k39 }, \ + { k40, k41, k42, k43, k44, k45, k46, k47, k48, XXX }, \ + { k50, k51, k52, k53, k54, k55, k56, k57, k58, k59 }, \ + { k60, k61, k62, k63, k64, XXX, k66, XXX, k68, XXX }, \ + { k70, k71, k72, k73, k74, k75, k76, k77, k78, k79 }, \ + { XXX, k81, XXX, k83, k84, k85, k86, k87, k88, k89 }, \ + { k90, k91, k92, k93, k94, XXX, XXX, XXX, XXX, XXX } \ } - -#endif diff --git a/keyboards/k_type/keymaps/belak/keymap.c b/keyboards/k_type/keymaps/belak/keymap.c index ed9392a2a594..e920579317b5 100644 --- a/keyboards/k_type/keymaps/belak/keymap.c +++ b/keyboards/k_type/keymaps/belak/keymap.c @@ -1,31 +1,27 @@ -#include "k_type.h" +#include QMK_KEYBOARD_H -#define _QW 0 -#define _L1 1 - -const uint16_t keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [_QW] = 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, \ - KC_TAB, KC_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, \ - MO(_L1), 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(_L1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT), - [_L1] = KEYMAP( - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MPLY, KC_MNXT, KC_VOLU, \ - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MSTP, KC_MPRV, KC_VOLD, \ - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_PGUP, \ - _______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_END), +enum layer_names { + _QW, + _L1 }; -// Runs just one time when the keyboard initializes. -void matrix_init_user(void) { - -}; +const uint16_t keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_QW] = 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, -// Runs constantly in the background, in a loop. -void matrix_scan_user(void) { + 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, + MO(_L1), 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(_L1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT + ), + [_L1] = LAYOUT_tkl_ansi( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MPLY, KC_MNXT, KC_VOLU, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MSTP, KC_MPRV, KC_VOLD, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_PGUP, + _______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_END + ) }; diff --git a/keyboards/k_type/keymaps/default/keymap.c b/keyboards/k_type/keymaps/default/keymap.c index 4f304b012027..b8df4df5ee28 100644 --- a/keyboards/k_type/keymaps/default/keymap.c +++ b/keyboards/k_type/keymaps/default/keymap.c @@ -1,11 +1,13 @@ #include QMK_KEYBOARD_H 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, \ - KC_TAB, KC_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_MENU, 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, KC_APP , KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT + ) }; diff --git a/keyboards/k_type/keymaps/rgb/config.h b/keyboards/k_type/keymaps/rgb/config.h new file mode 100644 index 000000000000..206b76f2b674 --- /dev/null +++ b/keyboards/k_type/keymaps/rgb/config.h @@ -0,0 +1,23 @@ +#pragma once + +#ifdef RGB_MATRIX_ENABLE +# define RGB_MATRIX_KEYPRESSES +# define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_CYCLE_ALL + +// i2c_master defines +# define I2C1_SCL 0 // A2 on pinout = B0 +# define I2C1_SDA 1 // A2 on pinout = B1 +# define I2C1_SCL_PAL_MODE PAL_MODE_ALTERNATIVE_2 +# define I2C1_SDA_PAL_MODE PAL_MODE_ALTERNATIVE_2 +//# define I2C2_SCL 10 // A2 on pinout = C10 +//# define I2C2_SDA 11 // A2 on pinout = C11 +//# define I2C2_SCL_PAL_MODE PAL_MODE_ALTERNATIVE_2 +//# define I2C2_SDA_PAL_MODE PAL_MODE_ALTERNATIVE_2 + +# define DRIVER_ADDR_1 0b1010000 +# define DRIVER_ADDR_2 0b1010001 +# define DRIVER_COUNT 2 +# define DRIVER_1_LED_TOTAL 64 +//# define DRIVER_2_LED_TOTAL 55 +# define DRIVER_LED_TOTAL DRIVER_1_LED_TOTAL +#endif diff --git a/keyboards/k_type/keymaps/rgb/keymap.c b/keyboards/k_type/keymaps/rgb/keymap.c new file mode 100644 index 000000000000..4ed15e5d6658 --- /dev/null +++ b/keyboards/k_type/keymaps/rgb/keymap.c @@ -0,0 +1,30 @@ +#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, MO(1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT + ), + [1] = LAYOUT_tkl_ansi( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_TOG, RGB_MOD, _______, + + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_HUI, RGB_SAI, RGB_VAI, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_HUD, RGB_SAD, RGB_VAD, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ) +}; + +#ifdef RGB_MATRIX_ENABLE +// Turn off SDB +void keyboard_pre_init_user() { + palSetPadMode(GPIOB, 16, PAL_MODE_OUTPUT_PUSHPULL); + palSetPad(GPIOB, 16); +} +#endif diff --git a/keyboards/k_type/keymaps/rgb/readme.md b/keyboards/k_type/keymaps/rgb/readme.md new file mode 100644 index 000000000000..794052c57af2 --- /dev/null +++ b/keyboards/k_type/keymaps/rgb/readme.md @@ -0,0 +1,5 @@ +# K-Type RGB Matrix Keymap + +This is an experimental keymap adding support for RGB Matrix on the K-Type. + +The board has two IS31FL3733 LED controllers, but they are each on different I2C buses, which QMK's `i2c_master` implementation currently does not support. As a result, all the keys after the left shift will not be lit. diff --git a/keyboards/k_type/keymaps/rgb/rules.mk b/keyboards/k_type/keymaps/rgb/rules.mk new file mode 100644 index 000000000000..a4206a1ad72e --- /dev/null +++ b/keyboards/k_type/keymaps/rgb/rules.mk @@ -0,0 +1 @@ +RGB_MATRIX_ENABLE = IS31FL3733 diff --git a/keyboards/k_type/matrix.c b/keyboards/k_type/matrix.c deleted file mode 100644 index d919bb880905..000000000000 --- a/keyboards/k_type/matrix.c +++ /dev/null @@ -1,138 +0,0 @@ -//#include -//#include -#include -#include "hal.h" -#include "timer.h" -#include "wait.h" -#include "print.h" -#include "matrix.h" -#include "debug.h" - -/* matrix state(1:on, 0:off) */ -static matrix_row_t matrix[MATRIX_ROWS]; -static matrix_row_t matrix_debouncing[MATRIX_ROWS]; -static bool debouncing = false; -static uint16_t debouncing_time = 0; - -void matrix_init(void) -{ - debug_matrix = true; - - /* Column(sense) */ - palSetPadMode(GPIOD, 5, PAL_MODE_INPUT_PULLDOWN); - palSetPadMode(GPIOD, 6, PAL_MODE_INPUT_PULLDOWN); - palSetPadMode(GPIOD, 7, PAL_MODE_INPUT_PULLDOWN); - palSetPadMode(GPIOC, 1, PAL_MODE_INPUT_PULLDOWN); - palSetPadMode(GPIOC, 2, PAL_MODE_INPUT_PULLDOWN); - palSetPadMode(GPIOC, 3, PAL_MODE_INPUT_PULLDOWN); - palSetPadMode(GPIOC, 4, PAL_MODE_INPUT_PULLDOWN); - palSetPadMode(GPIOC, 5, PAL_MODE_INPUT_PULLDOWN); - palSetPadMode(GPIOC, 6, PAL_MODE_INPUT_PULLDOWN); - palSetPadMode(GPIOC, 7, PAL_MODE_INPUT_PULLDOWN); - - /* Row(strobe) */ - palSetPadMode(GPIOB, 2, PAL_MODE_OUTPUT_PUSHPULL); - palSetPadMode(GPIOB, 3, PAL_MODE_OUTPUT_PUSHPULL); - palSetPadMode(GPIOB, 18, PAL_MODE_OUTPUT_PUSHPULL); - palSetPadMode(GPIOB, 19, PAL_MODE_OUTPUT_PUSHPULL); - palSetPadMode(GPIOC, 0, PAL_MODE_OUTPUT_PUSHPULL); - palSetPadMode(GPIOC, 8, PAL_MODE_OUTPUT_PUSHPULL); - palSetPadMode(GPIOC, 9, PAL_MODE_OUTPUT_PUSHPULL); - palSetPadMode(GPIOD, 0, PAL_MODE_OUTPUT_PUSHPULL); - palSetPadMode(GPIOD, 1, PAL_MODE_OUTPUT_PUSHPULL); - palSetPadMode(GPIOD, 4, PAL_MODE_OUTPUT_PUSHPULL); - - memset(matrix, 0, MATRIX_ROWS * sizeof(matrix_row_t)); - memset(matrix_debouncing, 0, MATRIX_ROWS * sizeof(matrix_row_t)); - - matrix_init_quantum(); -} - -uint8_t matrix_scan(void) -{ - for (int row = 0; row < MATRIX_ROWS; row++) { - matrix_row_t data = 0; - // strobe row - switch (row) { - case 0: palSetPad(GPIOB, 2); break; - case 1: palSetPad(GPIOB, 3); break; - case 2: palSetPad(GPIOB, 18); break; - case 3: palSetPad(GPIOB, 19); break; - case 4: palSetPad(GPIOC, 0); break; - case 5: palSetPad(GPIOC, 8); break; - case 6: palSetPad(GPIOC, 9); break; - case 7: palSetPad(GPIOD, 0); break; - case 8: palSetPad(GPIOD, 1); break; - case 9: palSetPad(GPIOD, 4); break; - } - - // need wait to settle pin state - // if you wait too short, or have a too high update rate - // the keyboard might freeze, or there might not be enough - // processing power to update the LCD screen properly. - // 20us, or two ticks at 100000Hz seems to be OK - wait_us(20); - - // read col data: { PTD5, PTD6, PTD7, PTC1, PTC2, PTC3, PTC4, PTC5, PTC6, PTC7 } - data = ((palReadPort(GPIOC) & 0xFEUL) << 2) | - ((palReadPort(GPIOD) & 0xE0UL) >> 5); - - // un-strobe row - switch (row) { - case 0: palClearPad(GPIOB, 2); break; - case 1: palClearPad(GPIOB, 3); break; - case 2: palClearPad(GPIOB, 18); break; - case 3: palClearPad(GPIOB, 19); break; - case 4: palClearPad(GPIOC, 0); break; - case 5: palClearPad(GPIOC, 8); break; - case 6: palClearPad(GPIOC, 9); break; - case 7: palClearPad(GPIOD, 0); break; - case 8: palClearPad(GPIOD, 1); break; - case 9: palClearPad(GPIOD, 4); break; - } - - if (matrix_debouncing[row] != data) { - matrix_debouncing[row] = data; - debouncing = true; - debouncing_time = timer_read(); - } - } - - if (debouncing && timer_elapsed(debouncing_time) > DEBOUNCE) { - for (int row = 0; row < MATRIX_ROWS; row++) { - matrix[row] = matrix_debouncing[row]; - } - debouncing = false; - } - - matrix_scan_quantum(); - return 1; -} - -bool matrix_is_on(uint8_t row, uint8_t col) -{ - return (matrix[row] & (1 << col)); -} - -matrix_row_t matrix_get_row(uint8_t row) -{ - return matrix[row]; -} - -void matrix_print(void) -{ - xprintf("\nr/c 01234567\n"); - for (uint8_t row = 0; row < MATRIX_ROWS; row++) { - xprintf("%02X: ", row); - matrix_row_t data = matrix_get_row(row); - for (int col = 0; col < MATRIX_COLS; col++) { - if (data & (1< Date: Thu, 27 Aug 2020 09:38:04 -0700 Subject: [PATCH 696/930] Allow joysticks to be used without analog pins (#10169) * Allow joysticks to be used without analog pins * change how analog/digital joysticks are specified --- common_features.mk | 11 ++++++++++- docs/feature_joystick.md | 16 +++++++++------- .../handwired/onekey/keymaps/joystick/rules.mk | 2 +- 3 files changed, 20 insertions(+), 9 deletions(-) diff --git a/common_features.mk b/common_features.mk index 088db89cac19..1f110d0819dd 100644 --- a/common_features.mk +++ b/common_features.mk @@ -536,9 +536,18 @@ ifeq ($(strip $(AUTO_SHIFT_ENABLE)), yes) endif endif -ifeq ($(strip $(JOYSTICK_ENABLE)), yes) +JOYSTICK_ENABLE ?= no +ifneq ($(strip $(JOYSTICK_ENABLE)), no) OPT_DEFS += -DJOYSTICK_ENABLE SRC += $(QUANTUM_DIR)/process_keycode/process_joystick.c SRC += $(QUANTUM_DIR)/joystick.c +endif + +ifeq ($(strip $(JOYSTICK_ENABLE)), analog) + OPT_DEFS += -DANALOG_JOYSTICK_ENABLE SRC += analog.c endif + +ifeq ($(strip $(JOYSTICK_ENABLE)), digital) + OPT_DEFS += -DDIGITAL_JOYSTICK_ENABLE +endif diff --git a/docs/feature_joystick.md b/docs/feature_joystick.md index 58dfc7b8df55..be3c781f6cd4 100644 --- a/docs/feature_joystick.md +++ b/docs/feature_joystick.md @@ -2,11 +2,7 @@ The keyboard can be made to be recognized as a joystick HID device by the operating system. -This is enabled by adding the following to `rules.mk`: - -```makefile -JOYSTICK_ENABLE = yes -``` +This is enabled by adding `JOYSTICK_ENABLE` to `rules.mk`. You can set this value to `analog`, `digital`, or `no`. !> Joystick support is not currently available on V-USB devices. @@ -19,6 +15,12 @@ or send gamepad reports based on values computed by the keyboard. ### Analog Input +To use analog input you must first enable it in `rules.mk`: + +```makefile +JOYSTICK_ENABLE = analog +``` + An analog device such as a potentiometer found on a gamepad's analog axes is based on a [voltage divider](https://en.wikipedia.org/wiki/Voltage_divider). It is composed of three connectors linked to the ground, the power input and power output (usually the middle one). The power output holds the voltage that varies based on the position of the cursor, which value will be read using your MCU's [ADC](https://en.wikipedia.org/wiki/Analog-to-digital_converter). @@ -75,7 +77,7 @@ You assign a value by writing to `joystick_status.axes[axis_index]` a signed 8-b The following example writes two axes based on keypad presses, with `KC_P5` as a precision modifier: ```c -#ifdef JOYSTICK_ENABLE +#ifdef ANALOG_JOYSTICK_ENABLE static uint8_t precision_val = 70; static uint8_t axesFlags = 0; enum axes { @@ -89,7 +91,7 @@ enum axes { bool process_record_user(uint16_t keycode, keyrecord_t *record) { switch(keycode) { -#ifdef JOYSTICK_ENABLE +#ifdef ANALOG_JOYSTICK_ENABLE // virtual joystick # if JOYSTICK_AXES_COUNT > 1 case KC_P8: diff --git a/keyboards/handwired/onekey/keymaps/joystick/rules.mk b/keyboards/handwired/onekey/keymaps/joystick/rules.mk index fbddbc6de118..cf034817378a 100644 --- a/keyboards/handwired/onekey/keymaps/joystick/rules.mk +++ b/keyboards/handwired/onekey/keymaps/joystick/rules.mk @@ -1 +1 @@ -JOYSTICK_ENABLE = yes +JOYSTICK_ENABLE = analog From c56b9a1ce97e415b90a0e8d32d84f7799c84bed5 Mon Sep 17 00:00:00 2001 From: James Young <18669334+noroadsleft@users.noreply.github.com> Date: Thu, 27 Aug 2020 14:23:22 -0700 Subject: [PATCH 697/930] Add ChangeLog for 2020 Aug 29 Breaking Changes --- docs/ChangeLog/20200829.md | 148 ++++++++++++++++++++++++++++++ docs/ChangeLog/20200829/PR9023.md | 5 - docs/ChangeLog/20200829/PR9318.md | 11 --- 3 files changed, 148 insertions(+), 16 deletions(-) create mode 100644 docs/ChangeLog/20200829.md delete mode 100644 docs/ChangeLog/20200829/PR9023.md delete mode 100644 docs/ChangeLog/20200829/PR9318.md diff --git a/docs/ChangeLog/20200829.md b/docs/ChangeLog/20200829.md new file mode 100644 index 000000000000..00e0bd1a2872 --- /dev/null +++ b/docs/ChangeLog/20200829.md @@ -0,0 +1,148 @@ +# QMK Breaking Change - 2020 Aug 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. + + +## Changes Requiring User Action :id=changes-requiring-user-action + +### Relocated Keyboards :id-relocated-keyboards + +#### The Key Company project consolidation ([#9547](https://github.com/qmk/qmk_firmware/pull/9547)) +#### relocating boards by flehrad to flehrad/ folder ([#9635](https://github.com/qmk/qmk_firmware/pull/9635)) + +Keyboards released by The Key Company and keyboards designed by flehrad have moved to vendor folders. If you own any of the keyboards listed below, please use the new names to compile your firmware moving forward. + +Old Name | New Name +:--------------------- | :------------------ +candybar/lefty | tkc/candybar/lefty +candybar/righty | tkc/candybar/righty +m0lly | tkc/m0lly +tkc1800 | tkc/tkc1800 +bigswitch | flehrad/bigswitch +handwired/downbubble | flehrad/downbubble +handwired/numbrero | flehrad/numbrero +snagpad | flehrad/snagpad +handwired/tradestation | flehrad/tradestation + +### Updated Keyboard Codebases :id=keyboard-updates + +#### Keebio RGB wiring update ([#7754](https://github.com/qmk/qmk_firmware/pull/7754)) + +This pull request changes the configuration for Keebio split boards to use the same RGB strip wiring for each half, which provides the following improvements: + +* Easier wiring due to one fewer wire needed (the wire between left DOut to extra data pin) and the fact that wiring is the same for both halves. +* RGB LEDs can be controlled by each half now instead of just master half. +* Extra data line is freed up to allow for I2C usage instead of serial. + +If you have customized the value of `RGBLED_SPLIT` for your keymap, you will need to undefine it using `#undef RGBLED_SPLIT` before defining it to your customized value. + +This change affects: + +* BFO-9000 +* Fourier +* Iris rev2 +* Levinson, revs. 1 and 2 +* Nyquist, revs. 1 and 2 +* Quefrency rev1 +* Viterbi, revs. 1 and 2 + +### Changes to Core Functionality :id=core-updates + +* Bigger Combo index ([#9318](https://github.com/qmk/qmk_firmware/pull/9318)) + +Allows the Combo feature to support more than 256 combos. + +Any fork that uses `process_combo_event` needs to update the function's first argument to `uint16_t`: + +* Old function: `void process_combo_event(uint8_t combo_index, bool pressed)` +* New function: `void process_combo_event(uint16_t combo_index, bool pressed)` + + +## Core Changes :id=core-changes + +### Fixes :id=core-fixes + +* Mousekeys: scrolling acceleration is no longer coupled to mouse movement acceleration ([#9174](https://github.com/qmk/qmk_firmware/pull/9174)) +* Keymap Extras: correctly assign Question Mark in Czech layout ([#9987](https://github.com/qmk/qmk_firmware/pull/9987)) + +### Additions and Enhancements :id=core-additions + +* allow for WS2812 PWM to work on DMAMUX-capable devices ([#9471](https://github.com/qmk/qmk_firmware/pull/9471)) + * Newer STM32 MCUs have a DMAMUX peripheral, which allows mapping of DMAs to different DMA streams, rather than hard-defining the target streams in silicon. + * Affects STM32L4+ devices, as well as the soon-to-be-supported-by-QMK STM32G4/H7 families. + * Tested on F303/Proton C (ChibiOS v19, non-DMAMUX), G474 (ChibiOS v20, with DMAMUX). +* dual-bank STM32 bootloader support ([#8778](https://github.com/qmk/qmk_firmware/pull/8778) and [#9738](https://github.com/qmk/qmk_firmware/pull/9738)) + * Adds support for STM32 dual-bank flash bootloaders, by toggling a GPIO during early init in order to charge an RC circuit attached to `BOOT0`. + * The main rationale behind this is that dual-bank STM32 devices unconditionally execute user-mode code, regardless of whether or not the user-mode code jumps to the bootloader. If either flash bank is valid (and `BOOT0` is low), then the built-in bootloader will skip any sort of DFU. + * This PR allows for the initialisation sequencing to charge the RC circuit based on the example circuit posted on Discord, effectively pulling `BOOT0` high before issuing the system reset. As the RC circuit takes a while to discharge, the system reset executes the ROM bootloader which subsequently sees `BOOT0` high, and starts executing the DFU routines. + * Tested with STM32L082 (with current QMK+current ChibiOS), and STM32G474 (against ChibiOS 20.x). +* update Space Cadet and Tap Dance features to use Custom Tapping Term when appropriate ([#6259](https://github.com/qmk/qmk_firmware/pull/6259)) + * For the Tap Dance feature, this completely removes the need for the `ACTION_TAP_DANCE_FN_ADVANCED_TIME` dance. +* HID Joystick Interface ([#4226](https://github.com/qmk/qmk_firmware/pull/4226) and [#9949](https://github.com/qmk/qmk_firmware/pull/9949 "Fix Joystick Compile Issues")) + * This implements a joystick feature, including a joystick_task function called from TMK, specific keycodes for joystick buttons and a USB HID interface. + * Tested on V-USB backend and Proton C; compiles but untested on LUFA. + * In order to test, you have to add `JOYSTICK_ENABLE = yes` to your `rules.mk` and + ```c + #define JOYSTICK_BUTTON_COUNT 8 + #define JOYSTICK_AXES_COUNT 2 + ``` + in your config.h. +* Christmas RGB Underglow animation now fades between green and red ([#7648](https://github.com/qmk/qmk_firmware/pull/7648)) + * `RGBLIGHT_EFFECT_CHRISTMAS_INTERVAL` has been greatly decreased; please check your animation if you have customized this value. +* layer state now initializes on startup ([#8318](https://github.com/qmk/qmk_firmware/pull/8318)) + * This should produce more consistent behavior between the two functions and layer masks. +* added support for HSV->RGB conversion without using CIE curve ([#9856](https://github.com/qmk/qmk_firmware/pull/9856)) +* added NOEEPROM functions for RGB Matrix ([#9487](https://github.com/qmk/qmk_firmware/pull/9487)) + * Added eeprom_helpers for toggle, mode, sethsv, speed, similar to rgblight versions. + * Added set_speed function. + * Added helper functions, similar to those in rgblight, in order to add NOEEPROM versions of toggle, step, hue, sat, val, and speed. + * Minor: spelling correction for EEPROM in a debug message. +* flashing firmware using `st-flash` utility from [STLink Tools](https://github.com/stlink-org/stlink) is now supported ([#9964](https://github.com/qmk/qmk_firmware/pull/9964)) +* add ability to dump all makefile variables for the specified target ([#8256](https://github.com/qmk/qmk_firmware/pull/8256)) + * Adds a new subtarget to builds, `dump_vars`, which allows for printing out all the variables that make knows about, after all substitutions occur. + * Example: `make handwired/onekey/proton_c:default:dump_vars` +* add ability to change the Auto Shift timeout in real time ([#8441](https://github.com/qmk/qmk_firmware/pull/8441)) +* added a timer implementation for backlight on ChibiOS ([#8291](https://github.com/qmk/qmk_firmware/pull/8291)) +* added a third endpoint to V-USB keyboards ([#9020](https://github.com/qmk/qmk_firmware/pull/9020)) +* added a method to read the OLED display buffer from user space ([#8777](https://github.com/qmk/qmk_firmware/pull/8777)) +* K-Type refactor ([#9864](https://github.com/qmk/qmk_firmware/pull/9864)) + * The K-Type has been refactored to use QMK's native matrix scanning routine, and now has partial support for the RGB Matrix feature. +* Joysticks can now be used without defining analog pins ([#10169](https://github.com/qmk/qmk_firmware/pull/10169)) + +### Clean-ups and Optimizations :id=core-optimizations + +* iWRAP protocol removed ([#9284](https://github.com/qmk/qmk_firmware/pull/9284)) +* work begun for consolidation of ChibiOS platform files ([#8327](https://github.com/qmk/qmk_firmware/pull/8327) and [#9315](https://github.com/qmk/qmk_firmware/pull/9315)) + * Start of the consolidation work to move the ChibiOS board definitions as well as the default set of configuration files for existing board definitions used by keyboards. + * Uses `/platforms/chibios` as previously discussed on discord. + * Consolidates the Proton C configs into the generic F303 definitions. + * Allows for defining a default set of `chconf.h`, `halconf.h`, and `mcuconf.h` files within the platform definition, which is able to be overridden by the keyboard directly, though include path ordering. + * Adds template `chconf.h`, `halconf.h`, `mcuconf.h`, and `board.h` that can be dropped into a keyboard directory, in order to override rather than replace the entire contents of the respective files. + * Removed Proton C QMK board definitions, falling back to ChibiOS board definitions with QMK overrides. +* Various tidy-ups for USB descriptor code ([#9005](https://github.com/qmk/qmk_firmware/pull/9005)) + * Renamed `keyboard_led_stats` in lufa.c and ChibiOS usb_main.c to `keyboard_led_state`, as well as `vusb_keyboard_leds`, for consistency + * Formatted CDC and MIDI descriptors better + * Removed `ENDPOINT_CONFIG` macro, it seems pointless and removes the need for endpoint address defines in the middle of the endpoint numbering enum + * Fixed (possibly?) V-USB `GET_REPORT` request handling. Not sure about this one, but the existing code appears to always return an empty report - now `send_keyboard` sets this variable to the current report, matching what the LUFA code does. +* converted `CONSUMER2BLUEFRUIT()` and `CONSUMER2RN42()` macros to static inline functions ([#9055](https://github.com/qmk/qmk_firmware/pull/9055)) +* Additional cleanups for V-USB code ([#9310](https://github.com/qmk/qmk_firmware/pull/9310)) + * Removing the UART stuff entirely, now that we have Console support. Also fixing up various other things; switching some `debug()` calls to `dprintf()`, moved `raw_hid_report` out of the way so that we can implement the shared endpoint stuff. +* removed inclusion of `adafruit_ble.h` from `ssd1306.c` ([#9355](https://github.com/qmk/qmk_firmware/pull/9355)) +* `outputselect.c` is no longer compiled if Bluetooth is disabled ([#9356](https://github.com/qmk/qmk_firmware/pull/9356)) +* `analogRead()` deprecated in favor of `analogReadPin()` ([#9023](https://github.com/qmk/qmk_firmware/pull/9023)) +* forcibly disable NKRO on V-USB controllers ([#9054](https://github.com/qmk/qmk_firmware/pull/9054)) +* removed warning if running backlight on STM32F072 ([#10040](https://github.com/qmk/qmk_firmware/pull/10040)) +* removed unused CORTEX_VTOR_INIT rules.mk option ([#10053](https://github.com/qmk/qmk_firmware/pull/10053)) +* improved handling for enabling Link Time Optimization ([#9832](https://github.com/qmk/qmk_firmware/pull/9832)) +* streamline rules for supporting Kiibohd bootloader ([#10129](https://github.com/qmk/qmk_firmware/pull/10129)) +* Define `STM32_DMA_REQUIRED` when using DMA-based WS2812 driver on STM32 ([#10127](https://github.com/qmk/qmk_firmware/pull/10127)) +* fix DMA stream ID calculation in ws2812_pwm ([#10008](https://github.com/qmk/qmk_firmware/pull/10008)) +* remove support for Adafruit EZ Key Bluetooth controller ([#10103](https://github.com/qmk/qmk_firmware/pull/10103)) + + +## QMK Infrastructure and Internals :id=qmk-internals + +* Attempt to fix CI for non-master branches. ([#9308](https://github.com/qmk/qmk_firmware/pull/9308)) + * Actually fetch the branch we're attempting to compare against. +* Run `qmk cformat` on `develop` branch ([#9501](https://github.com/qmk/qmk_firmware/pull/9501)) +* minor refactor of Bluetooth API ([#9905](https://github.com/qmk/qmk_firmware/pull/9905)) diff --git a/docs/ChangeLog/20200829/PR9023.md b/docs/ChangeLog/20200829/PR9023.md deleted file mode 100644 index 79ca2cb2f843..000000000000 --- a/docs/ChangeLog/20200829/PR9023.md +++ /dev/null @@ -1,5 +0,0 @@ -# Deprecation of `analogRead()` - -[#9023](https://github.com/qmk/qmk_firmware/pull/9023) - -This function takes Arduino pin numbers (eg. `9` vs. `B5`), which is at odds with the rest of the codebase. The replacement for this function is `analogReadPin()`. diff --git a/docs/ChangeLog/20200829/PR9318.md b/docs/ChangeLog/20200829/PR9318.md deleted file mode 100644 index c238f6e4491e..000000000000 --- a/docs/ChangeLog/20200829/PR9318.md +++ /dev/null @@ -1,11 +0,0 @@ -### Bigger integer type when looping over combos. - -[#9318](https://github.com/qmk/qmk_firmware/pull/9318) - -Changes `uint8_t` to `uint16_t` so it is possible have more than 256 combos. - -Any fork that uses `process_combo_event` needs to update the function's first argument to `uint16_t`. - -| Old function | New Function | -|---------------------------------------------------------------|----------------------------------------------------------------| -| `void process_combo_event(uint8_t combo_index, bool pressed)` | `void process_combo_event(uint16_t combo_index, bool pressed)` | From d3721bdff9cc5e0df0323d97b3f37dd57c208c36 Mon Sep 17 00:00:00 2001 From: James Young <18669334+noroadsleft@users.noreply.github.com> Date: Fri, 28 Aug 2020 10:08:59 -0700 Subject: [PATCH 698/930] Revert "Branch point for 2020 Aug 29 Breaking Change" This reverts commit 7259126e8d67e83a9bd48dcf0914be1849d638b5. --- readme.md | 6 ------ 1 file changed, 6 deletions(-) diff --git a/readme.md b/readme.md index 6321681a9249..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 DEVELOP BRANCH - -Warning- This is the `develop` 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 000eb14d789f84afc7dbd33955dbfb6481792f0b Mon Sep 17 00:00:00 2001 From: James Young <18669334+noroadsleft@users.noreply.github.com> Date: Sat, 29 Aug 2020 10:48:38 -0700 Subject: [PATCH 699/930] update "Breaking Changes" doc --- docs/breaking_changes.md | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/docs/breaking_changes.md b/docs/breaking_changes.md index 154695ddacb6..abace81648c6 100644 --- a/docs/breaking_changes.md +++ b/docs/breaking_changes.md @@ -6,22 +6,23 @@ 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 Aug 29](ChangeLog/20200829.md) * [2020 May 30](ChangeLog/20200530.md) * [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 Aug 29, 2020. +The next Breaking Change is scheduled for November 28, 2020. ### Important Dates -* [x] 2020 May 30 - `develop` is created. It will be rebased weekly. -* [ ] 2020 Aug 1 - `develop` closed to new PR's. -* [ ] 2020 Aug 1 - Call for testers. -* [ ] 2020 Aug 27 - `master` is locked, no PR's merged. -* [ ] 2020 Aug 29 - Merge `develop` to `master`. -* [ ] 2020 Aug 29 - `master` is unlocked. PR's can be merged again. +* [x] 2020 Aug 29 - `develop` is created. It will be rebased weekly. +* [ ] 2020 Oct 31 - `develop` closed to new PR's. +* [ ] 2020 Oct 31 - Call for testers. +* [ ] 2020 Nov 26 - `master` is locked, no PR's merged. +* [ ] 2020 Nov 28 - Merge `develop` to `master`. +* [ ] 2020 Nov 28 - `master` is unlocked. PR's can be merged again. ## What changes will be included? From a3db72df7299140e52f57d082a3742a8b480a226 Mon Sep 17 00:00:00 2001 From: QMK Bot Date: Sat, 29 Aug 2020 22:57:48 +0000 Subject: [PATCH 700/930] format code according to conventions [skip ci] --- drivers/oled/oled_driver.c | 2 +- drivers/oled/oled_driver.h | 2 +- .../onekey/keymaps/joystick/config.h | 2 +- .../onekey/keymaps/joystick/rules.mk | 2 +- quantum/process_keycode/process_auto_shift.c | 35 ++++++++-------- quantum/process_keycode/process_combo.c | 4 +- quantum/process_keycode/process_joystick.c | 42 ++++++++----------- quantum/rgblight.c | 12 +++--- tmk_core/common/action_layer.h | 7 ++-- tmk_core/common/mousekey.c | 19 ++++----- tmk_core/common/progmem.h | 2 +- tmk_core/protocol/chibios/usb_main.c | 28 +++++++------ tmk_core/protocol/lufa/adafruit_ble.h | 4 +- tmk_core/protocol/lufa/lufa.c | 28 +++++++------ 14 files changed, 93 insertions(+), 96 deletions(-) diff --git a/drivers/oled/oled_driver.c b/drivers/oled/oled_driver.c index bbf010a09086..9ae737ca2d39 100644 --- a/drivers/oled/oled_driver.c +++ b/drivers/oled/oled_driver.c @@ -447,7 +447,7 @@ void oled_pan(bool left) { oled_buffer_reader_t oled_read_raw(uint16_t start_index) { if (start_index > OLED_MATRIX_SIZE) start_index = OLED_MATRIX_SIZE; oled_buffer_reader_t ret_reader; - ret_reader.current_element = &oled_buffer[start_index]; + ret_reader.current_element = &oled_buffer[start_index]; ret_reader.remaining_element_count = OLED_MATRIX_SIZE - start_index; return ret_reader; } diff --git a/drivers/oled/oled_driver.h b/drivers/oled/oled_driver.h index 7ec00d66a3dd..9a4b98d2fdde 100644 --- a/drivers/oled/oled_driver.h +++ b/drivers/oled/oled_driver.h @@ -155,7 +155,7 @@ along with this program. If not, see . #endif typedef struct __attribute__((__packed__)) { - uint8_t *current_element; + uint8_t *current_element; uint16_t remaining_element_count; } oled_buffer_reader_t; diff --git a/keyboards/handwired/onekey/keymaps/joystick/config.h b/keyboards/handwired/onekey/keymaps/joystick/config.h index ac09aa7cfb28..a3b5858ad295 100644 --- a/keyboards/handwired/onekey/keymaps/joystick/config.h +++ b/keyboards/handwired/onekey/keymaps/joystick/config.h @@ -1,4 +1,4 @@ -#pragma once +#pragma once #define JOYSTICK_AXES_COUNT 2 #define JOYSTICK_BUTTON_COUNT 1 diff --git a/keyboards/handwired/onekey/keymaps/joystick/rules.mk b/keyboards/handwired/onekey/keymaps/joystick/rules.mk index cf034817378a..b910bdbe6c89 100644 --- a/keyboards/handwired/onekey/keymaps/joystick/rules.mk +++ b/keyboards/handwired/onekey/keymaps/joystick/rules.mk @@ -1 +1 @@ -JOYSTICK_ENABLE = analog +JOYSTICK_ENABLE = analog diff --git a/quantum/process_keycode/process_auto_shift.c b/quantum/process_keycode/process_auto_shift.c index 330037cefbb0..b1267922ce77 100644 --- a/quantum/process_keycode/process_auto_shift.c +++ b/quantum/process_keycode/process_auto_shift.c @@ -41,34 +41,34 @@ void autoshift_flush(void) { } void autoshift_on(uint16_t keycode) { - autoshift_time = timer_read(); - autoshift_lastkey = keycode; + autoshift_time = timer_read(); + autoshift_lastkey = keycode; } void autoshift_toggle(void) { - if (autoshift_enabled) { - autoshift_enabled = false; - autoshift_flush(); - } else { - autoshift_enabled = true; - } + if (autoshift_enabled) { + autoshift_enabled = false; + autoshift_flush(); + } else { + autoshift_enabled = true; + } } void autoshift_enable(void) { autoshift_enabled = true; } void autoshift_disable(void) { - autoshift_enabled = false; - autoshift_flush(); + autoshift_enabled = false; + autoshift_flush(); } -#ifndef AUTO_SHIFT_NO_SETUP +# ifndef AUTO_SHIFT_NO_SETUP void autoshift_timer_report(void) { - char display[8]; + char display[8]; - snprintf(display, 8, "\n%d\n", autoshift_timeout); + snprintf(display, 8, "\n%d\n", autoshift_timeout); - send_string((const char *)display); + send_string((const char *)display); } -#endif +# endif bool get_autoshift_state(void) { return autoshift_enabled; } @@ -79,7 +79,6 @@ void set_autoshift_timeout(uint16_t timeout) { autoshift_timeout = timeout; } bool process_auto_shift(uint16_t keycode, keyrecord_t *record) { if (record->event.pressed) { switch (keycode) { - case KC_ASTG: autoshift_toggle(); return true; @@ -92,10 +91,10 @@ bool process_auto_shift(uint16_t keycode, keyrecord_t *record) { return true; # ifndef AUTO_SHIFT_NO_SETUP - case KC_ASUP: + case KC_ASUP: autoshift_timeout += 5; return true; - case KC_ASDN: + case KC_ASDN: autoshift_timeout -= 5; return true; diff --git a/quantum/process_keycode/process_combo.c b/quantum/process_keycode/process_combo.c index 1f715f43b94d..f38d7d47a097 100644 --- a/quantum/process_keycode/process_combo.c +++ b/quantum/process_keycode/process_combo.c @@ -27,7 +27,7 @@ extern int COMBO_LEN; __attribute__((weak)) void process_combo_event(uint16_t combo_index, bool pressed) {} static uint16_t timer = 0; -static uint16_t current_combo_index = 0; +static uint16_t current_combo_index = 0; static bool drop_buffer = false; static bool is_active = false; static bool b_combo_enable = true; // defaults to enabled @@ -82,7 +82,7 @@ static inline void dump_key_buffer(bool emit) { } while (0) static bool process_single_combo(combo_t *combo, uint16_t keycode, keyrecord_t *record) { - uint8_t count = 0; + uint8_t count = 0; uint16_t index = -1; /* Find index of keycode and number of combo keys */ for (const uint16_t *keys = combo->keys;; ++count) { diff --git a/quantum/process_keycode/process_joystick.c b/quantum/process_keycode/process_joystick.c index c12f7568544f..5778a7434c1c 100644 --- a/quantum/process_keycode/process_joystick.c +++ b/quantum/process_keycode/process_joystick.c @@ -17,8 +17,7 @@ bool process_joystick(uint16_t keycode, keyrecord_t *record) { return true; } -__attribute__((weak)) -void joystick_task(void) { +__attribute__((weak)) void joystick_task(void) { if (process_joystick_analogread() && (joystick_status.status & JS_UPDATED)) { send_joystick_packet(&joystick_status); joystick_status.status &= ~JS_UPDATED; @@ -47,16 +46,11 @@ uint16_t savePinState(pin_t pin) { return ((PORTx_ADDRESS(pin) >> pinNumber) & 0x1) << 1 | ((DDRx_ADDRESS(pin) >> pinNumber) & 0x1); #elif defined(PROTOCOL_CHIBIOS) /* - The pin configuration is backed up in the following format : + The pin configuration is backed up in the following format : bit 15 9 8 7 6 5 4 3 2 1 0 |unused|ODR|IDR|PUPDR|OSPEEDR|OTYPER|MODER| */ - return (( PAL_PORT(pin)->MODER >> (2*PAL_PAD(pin))) & 0x3) - | (((PAL_PORT(pin)->OTYPER >> (1*PAL_PAD(pin))) & 0x1) << 2) - | (((PAL_PORT(pin)->OSPEEDR >> (2*PAL_PAD(pin))) & 0x3) << 3) - | (((PAL_PORT(pin)->PUPDR >> (2*PAL_PAD(pin))) & 0x3) << 5) - | (((PAL_PORT(pin)->IDR >> (1*PAL_PAD(pin))) & 0x1) << 7) - | (((PAL_PORT(pin)->ODR >> (1*PAL_PAD(pin))) & 0x1) << 8); + return ((PAL_PORT(pin)->MODER >> (2 * PAL_PAD(pin))) & 0x3) | (((PAL_PORT(pin)->OTYPER >> (1 * PAL_PAD(pin))) & 0x1) << 2) | (((PAL_PORT(pin)->OSPEEDR >> (2 * PAL_PAD(pin))) & 0x3) << 3) | (((PAL_PORT(pin)->PUPDR >> (2 * PAL_PAD(pin))) & 0x3) << 5) | (((PAL_PORT(pin)->IDR >> (1 * PAL_PAD(pin))) & 0x1) << 7) | (((PAL_PORT(pin)->ODR >> (1 * PAL_PAD(pin))) & 0x1) << 8); #else return 0; #endif @@ -68,12 +62,12 @@ void restorePinState(pin_t pin, uint16_t restoreState) { PORTx_ADDRESS(pin) = (PORTx_ADDRESS(pin) & ~_BV(pinNumber)) | (((restoreState >> 1) & 0x1) << pinNumber); DDRx_ADDRESS(pin) = (DDRx_ADDRESS(pin) & ~_BV(pinNumber)) | ((restoreState & 0x1) << pinNumber); #elif defined(PROTOCOL_CHIBIOS) - PAL_PORT(pin)->MODER = (PAL_PORT(pin)->MODER & ~(0x3<< (2*PAL_PAD(pin)))) | (restoreState & 0x3) << (2*PAL_PAD(pin)); - PAL_PORT(pin)->OTYPER = (PAL_PORT(pin)->OTYPER & ~(0x1<< (1*PAL_PAD(pin)))) | ((restoreState>>2) & 0x1) << (1*PAL_PAD(pin)); - PAL_PORT(pin)->OSPEEDR= (PAL_PORT(pin)->OSPEEDR & ~(0x3<< (2*PAL_PAD(pin)))) | ((restoreState>>3) & 0x3) << (2*PAL_PAD(pin)); - PAL_PORT(pin)->PUPDR = (PAL_PORT(pin)->PUPDR & ~(0x3<< (2*PAL_PAD(pin)))) | ((restoreState>>5) & 0x3) << (2*PAL_PAD(pin)); - PAL_PORT(pin)->IDR = (PAL_PORT(pin)->IDR & ~(0x1<< (1*PAL_PAD(pin)))) | ((restoreState>>7) & 0x1) << (1*PAL_PAD(pin)); - PAL_PORT(pin)->ODR = (PAL_PORT(pin)->ODR & ~(0x1<< (1*PAL_PAD(pin)))) | ((restoreState>>8) & 0x1) << (1*PAL_PAD(pin)); + PAL_PORT(pin)->MODER = (PAL_PORT(pin)->MODER & ~(0x3 << (2 * PAL_PAD(pin)))) | (restoreState & 0x3) << (2 * PAL_PAD(pin)); + PAL_PORT(pin)->OTYPER = (PAL_PORT(pin)->OTYPER & ~(0x1 << (1 * PAL_PAD(pin)))) | ((restoreState >> 2) & 0x1) << (1 * PAL_PAD(pin)); + PAL_PORT(pin)->OSPEEDR = (PAL_PORT(pin)->OSPEEDR & ~(0x3 << (2 * PAL_PAD(pin)))) | ((restoreState >> 3) & 0x3) << (2 * PAL_PAD(pin)); + PAL_PORT(pin)->PUPDR = (PAL_PORT(pin)->PUPDR & ~(0x3 << (2 * PAL_PAD(pin)))) | ((restoreState >> 5) & 0x3) << (2 * PAL_PAD(pin)); + PAL_PORT(pin)->IDR = (PAL_PORT(pin)->IDR & ~(0x1 << (1 * PAL_PAD(pin)))) | ((restoreState >> 7) & 0x1) << (1 * PAL_PAD(pin)); + PAL_PORT(pin)->ODR = (PAL_PORT(pin)->ODR & ~(0x1 << (1 * PAL_PAD(pin)))) | ((restoreState >> 8) & 0x1) << (1 * PAL_PAD(pin)); #else return; #endif @@ -132,21 +126,21 @@ bool process_joystick_analogread_quantum() { int16_t axis_val = joystick_axes[axis_index].mid_digit; # endif - //test the converted value against the lower range - int32_t ref = joystick_axes[axis_index].mid_digit; - int32_t range = joystick_axes[axis_index].min_digit; - int32_t ranged_val = ((axis_val - ref) * -127) / (range - ref) ; + // test the converted value against the lower range + int32_t ref = joystick_axes[axis_index].mid_digit; + int32_t range = joystick_axes[axis_index].min_digit; + int32_t ranged_val = ((axis_val - ref) * -127) / (range - ref); if (ranged_val > 0) { - //the value is in the higher range - range = joystick_axes[axis_index].max_digit; + // the value is in the higher range + range = joystick_axes[axis_index].max_digit; ranged_val = ((axis_val - ref) * 127) / (range - ref); } - - //clamp the result in the valid range + + // clamp the result in the valid range ranged_val = ranged_val < -127 ? -127 : ranged_val; ranged_val = ranged_val > 127 ? 127 : ranged_val; - + if (ranged_val != joystick_status.axes[axis_index]) { joystick_status.axes[axis_index] = ranged_val; joystick_status.status |= JS_UPDATED; diff --git a/quantum/rgblight.c b/quantum/rgblight.c index 52d8da1813d7..211ec975a6df 100644 --- a/quantum/rgblight.c +++ b/quantum/rgblight.c @@ -407,7 +407,6 @@ void rgblight_decrease_val_helper(bool 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_helper(bool write_to_eeprom) { if (rgblight_config.speed < 3) rgblight_config.speed++; // RGBLIGHT_SPLIT_SET_CHANGE_HSVS; // NEED? @@ -428,7 +427,6 @@ void rgblight_decrease_speed_helper(bool write_to_eeprom) { void rgblight_decrease_speed(void) { rgblight_decrease_speed_helper(true); } void rgblight_decrease_speed_noeeprom(void) { rgblight_decrease_speed_helper(false); } - void rgblight_sethsv_noeeprom_old(uint8_t hue, uint8_t sat, uint8_t val) { if (rgblight_config.enable) { LED_TYPE tmp_led; @@ -1170,17 +1168,17 @@ void rgblight_effect_knight(animation_status_t *anim) { */ void rgblight_effect_christmas(animation_status_t *anim) { static int8_t increment = 1; - const uint8_t max_pos = 32; + const uint8_t max_pos = 32; const uint8_t hue_green = 85; uint32_t xa; - uint8_t hue, val; - uint8_t i; + uint8_t hue, val; + uint8_t i; // The effect works by animating anim->pos from 0 to 32 and back to 0. // The pos is used in a cubic bezier formula to ease-in-out between red and green, leaving the interpolated colors visible as short as possible. - xa = CUBED((uint32_t) anim->pos); - hue = ((uint32_t) hue_green) * xa / (xa + CUBED((uint32_t) (max_pos - anim->pos))); + xa = CUBED((uint32_t)anim->pos); + hue = ((uint32_t)hue_green) * xa / (xa + CUBED((uint32_t)(max_pos - anim->pos))); // Additionally, these interpolated colors get shown with a slightly darker value, to make them less prominent than the main colors. val = 255 - (3 * (hue < hue_green / 2 ? hue : hue_green - hue) / 2); diff --git a/tmk_core/common/action_layer.h b/tmk_core/common/action_layer.h index 9b9173c33bae..f9f686112006 100644 --- a/tmk_core/common/action_layer.h +++ b/tmk_core/common/action_layer.h @@ -82,9 +82,9 @@ void layer_on(uint8_t layer); void layer_off(uint8_t layer); void layer_invert(uint8_t layer); /* bitwise operation */ -void layer_or(layer_state_t state); -void layer_and(layer_state_t state); -void layer_xor(layer_state_t state); +void layer_or(layer_state_t state); +void layer_and(layer_state_t state); +void layer_xor(layer_state_t state); layer_state_t layer_state_set_user(layer_state_t state); layer_state_t layer_state_set_kb(layer_state_t state); #else @@ -107,7 +107,6 @@ layer_state_t layer_state_set_kb(layer_state_t state); # define layer_state_set_user(state) (void)state #endif - /* pressed actions cache */ #if !defined(NO_ACTION_LAYER) && !defined(STRICT_LAYER_RELEASE) diff --git a/tmk_core/common/mousekey.c b/tmk_core/common/mousekey.c index 390c74e0f147..ef18bcf1a8a7 100644 --- a/tmk_core/common/mousekey.c +++ b/tmk_core/common/mousekey.c @@ -33,8 +33,8 @@ inline int8_t times_inv_sqrt2(int8_t x) { static report_mouse_t mouse_report = {0}; static void mousekey_debug(void); -static uint8_t mousekey_accel = 0; -static uint8_t mousekey_repeat = 0; +static uint8_t mousekey_accel = 0; +static uint8_t mousekey_repeat = 0; static uint8_t mousekey_wheel_repeat = 0; #ifndef MK_3_SPEED @@ -225,7 +225,6 @@ void mousekey_on(uint8_t code) { mousekey_accel |= (1 << 1); else if (code == KC_MS_ACCEL2) mousekey_accel |= (1 << 2); - } void mousekey_off(uint8_t code) { @@ -284,10 +283,10 @@ uint16_t w_intervals[mkspd_COUNT] = {MK_W_INTERVAL_UNMOD, MK_W_INTERVAL_0 void mousekey_task(void) { // report cursor and scroll movement independently report_mouse_t const tmpmr = mouse_report; - mouse_report.x = 0; - mouse_report.y = 0; - mouse_report.v = 0; - mouse_report.h = 0; + mouse_report.x = 0; + mouse_report.y = 0; + mouse_report.v = 0; + mouse_report.h = 0; if ((tmpmr.x || tmpmr.y) && timer_elapsed(last_timer_c) > c_intervals[mk_speed]) { mouse_report.x = tmpmr.x; @@ -421,10 +420,10 @@ void mousekey_send(void) { } void mousekey_clear(void) { - mouse_report = (report_mouse_t){}; - mousekey_repeat = 0; + mouse_report = (report_mouse_t){}; + mousekey_repeat = 0; mousekey_wheel_repeat = 0; - mousekey_accel = 0; + mousekey_accel = 0; } static void mousekey_debug(void) { diff --git a/tmk_core/common/progmem.h b/tmk_core/common/progmem.h index 41b5b537cede..c8863d3ad2bc 100644 --- a/tmk_core/common/progmem.h +++ b/tmk_core/common/progmem.h @@ -4,7 +4,7 @@ # include #else # define PROGMEM -# define PGM_P const char * +# define PGM_P const char* # define memcpy_P(dest, src, n) memcpy(dest, src, n) # define pgm_read_byte(address_short) *((uint8_t*)(address_short)) # define pgm_read_word(address_short) *((uint16_t*)(address_short)) diff --git a/tmk_core/protocol/chibios/usb_main.c b/tmk_core/protocol/chibios/usb_main.c index 68c61cf55084..ae33e86a70de 100644 --- a/tmk_core/protocol/chibios/usb_main.c +++ b/tmk_core/protocol/chibios/usb_main.c @@ -888,39 +888,43 @@ void virtser_task(void) { void send_joystick_packet(joystick_t *joystick) { joystick_report_t rep = { # if JOYSTICK_AXES_COUNT > 0 - .axes = {joystick->axes[0], + .axes = + { + joystick->axes[0], # if JOYSTICK_AXES_COUNT >= 2 - joystick->axes[1], + joystick->axes[1], # endif # if JOYSTICK_AXES_COUNT >= 3 - joystick->axes[2], + joystick->axes[2], # endif # if JOYSTICK_AXES_COUNT >= 4 - joystick->axes[3], + joystick->axes[3], # endif # if JOYSTICK_AXES_COUNT >= 5 - joystick->axes[4], + joystick->axes[4], # endif # if JOYSTICK_AXES_COUNT >= 6 - joystick->axes[5], + joystick->axes[5], # endif - }, + }, # endif // JOYSTICK_AXES_COUNT>0 # if JOYSTICK_BUTTON_COUNT > 0 - .buttons = {joystick->buttons[0], + .buttons = + { + joystick->buttons[0], # if JOYSTICK_BUTTON_COUNT > 8 - joystick->buttons[1], + joystick->buttons[1], # endif # if JOYSTICK_BUTTON_COUNT > 16 - joystick->buttons[2], + joystick->buttons[2], # endif # if JOYSTICK_BUTTON_COUNT > 24 - joystick->buttons[3], + joystick->buttons[3], # endif - } + } # endif // JOYSTICK_BUTTON_COUNT>0 }; diff --git a/tmk_core/protocol/lufa/adafruit_ble.h b/tmk_core/protocol/lufa/adafruit_ble.h index aebded7b31bb..9dfc9b43554e 100644 --- a/tmk_core/protocol/lufa/adafruit_ble.h +++ b/tmk_core/protocol/lufa/adafruit_ble.h @@ -41,12 +41,12 @@ extern bool adafruit_ble_send_keys(uint8_t hid_modifier_mask, uint8_t *keys, uin * (milliseconds) */ extern bool adafruit_ble_send_consumer_key(uint16_t keycode, int hold_duration); -# ifdef MOUSE_ENABLE +#ifdef MOUSE_ENABLE /* Send a mouse/wheel movement report. * The parameters are signed and indicate positive of negative direction * change. */ extern bool adafruit_ble_send_mouse_move(int8_t x, int8_t y, int8_t scroll, int8_t pan, uint8_t buttons); -# endif +#endif /* Compute battery voltage by reading an analog pin. * Returns the integer number of millivolts */ diff --git a/tmk_core/protocol/lufa/lufa.c b/tmk_core/protocol/lufa/lufa.c index 09ba0bacf736..cec00440269a 100644 --- a/tmk_core/protocol/lufa/lufa.c +++ b/tmk_core/protocol/lufa/lufa.c @@ -316,39 +316,43 @@ void send_joystick_packet(joystick_t *joystick) { joystick_report_t r = { # if JOYSTICK_AXES_COUNT > 0 - .axes = {joystick->axes[0], + .axes = + { + joystick->axes[0], # if JOYSTICK_AXES_COUNT >= 2 - joystick->axes[1], + joystick->axes[1], # endif # if JOYSTICK_AXES_COUNT >= 3 - joystick->axes[2], + joystick->axes[2], # endif # if JOYSTICK_AXES_COUNT >= 4 - joystick->axes[3], + joystick->axes[3], # endif # if JOYSTICK_AXES_COUNT >= 5 - joystick->axes[4], + joystick->axes[4], # endif # if JOYSTICK_AXES_COUNT >= 6 - joystick->axes[5], + joystick->axes[5], # endif - }, + }, # endif // JOYSTICK_AXES_COUNT>0 # if JOYSTICK_BUTTON_COUNT > 0 - .buttons = {joystick->buttons[0], + .buttons = + { + joystick->buttons[0], # if JOYSTICK_BUTTON_COUNT > 8 - joystick->buttons[1], + joystick->buttons[1], # endif # if JOYSTICK_BUTTON_COUNT > 16 - joystick->buttons[2], + joystick->buttons[2], # endif # if JOYSTICK_BUTTON_COUNT > 24 - joystick->buttons[3], + joystick->buttons[3], # endif - } + } # endif // JOYSTICK_BUTTON_COUNT>0 }; From 69804bb243989c06d276581cfdcc9e2f6fb188e6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?F=C3=A9lix=20Sanz?= Date: Tue, 1 Sep 2020 00:23:31 +0200 Subject: [PATCH 701/930] Fixed Spanish keymap extra ES_DIAE symbol (#10211) * Fixed Spanish keymap extra ES_DIAE symbol `ES_DIAE` should be `S(ES_ACUT)` not `S(ES_GRV)` * Update quantum/keymap_extras/keymap_spanish.h Co-authored-by: Ryan Co-authored-by: Ryan --- quantum/keymap_extras/keymap_spanish.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/quantum/keymap_extras/keymap_spanish.h b/quantum/keymap_extras/keymap_spanish.h index 26725a0c93d7..1465ecc81b26 100644 --- a/quantum/keymap_extras/keymap_spanish.h +++ b/quantum/keymap_extras/keymap_spanish.h @@ -117,7 +117,7 @@ #define ES_CIRC S(ES_GRV) // ^ (dead) #define ES_ASTR S(ES_PLUS) // * // Row 3 -#define ES_DIAE S(ES_GRV) // ¨ (dead) +#define ES_DIAE S(ES_ACUT) // ¨ (dead) // Row 4 #define ES_RABK S(ES_LABK) // > #define ES_SCLN S(KC_COMM) // ; From fa740c12861f77b1381fa2ee282fd57080c70502 Mon Sep 17 00:00:00 2001 From: mechlovin <57231893+mechlovin@users.noreply.github.com> Date: Tue, 1 Sep 2020 07:20:19 +0700 Subject: [PATCH 702/930] [Keyboard] Mechlovin Delphine (#9835) * add * ADD * update * update * update * update * Update rgb_led.c * Update rgb_led.c --- keyboards/mechlovin/delphine/config.h | 44 +++++ keyboards/mechlovin/delphine/delphine.c | 35 ++++ keyboards/mechlovin/delphine/delphine.h | 35 ++++ keyboards/mechlovin/delphine/info.json | 38 +++++ .../delphine/keymaps/default/keymap.c | 28 +++ .../delphine/keymaps/default/readme.md | 1 + .../mechlovin/delphine/keymaps/via/keymap.c | 52 ++++++ .../mechlovin/delphine/keymaps/via/readme.md | 1 + .../mechlovin/delphine/keymaps/via/rules.mk | 1 + .../mechlovin/delphine/mono_led/config.h | 34 ++++ .../mechlovin/delphine/mono_led/rules.mk | 2 + keyboards/mechlovin/delphine/readme.md | 15 ++ keyboards/mechlovin/delphine/rgb_led/config.h | 47 +++++ .../mechlovin/delphine/rgb_led/rgb_led.c | 160 ++++++++++++++++++ .../mechlovin/delphine/rgb_led/rgb_led.h | 19 +++ keyboards/mechlovin/delphine/rgb_led/rules.mk | 2 + keyboards/mechlovin/delphine/rules.mk | 25 +++ 17 files changed, 539 insertions(+) create mode 100644 keyboards/mechlovin/delphine/config.h create mode 100644 keyboards/mechlovin/delphine/delphine.c create mode 100644 keyboards/mechlovin/delphine/delphine.h create mode 100644 keyboards/mechlovin/delphine/info.json create mode 100644 keyboards/mechlovin/delphine/keymaps/default/keymap.c create mode 100644 keyboards/mechlovin/delphine/keymaps/default/readme.md create mode 100644 keyboards/mechlovin/delphine/keymaps/via/keymap.c create mode 100644 keyboards/mechlovin/delphine/keymaps/via/readme.md create mode 100644 keyboards/mechlovin/delphine/keymaps/via/rules.mk create mode 100644 keyboards/mechlovin/delphine/mono_led/config.h create mode 100644 keyboards/mechlovin/delphine/mono_led/rules.mk create mode 100644 keyboards/mechlovin/delphine/readme.md create mode 100644 keyboards/mechlovin/delphine/rgb_led/config.h create mode 100644 keyboards/mechlovin/delphine/rgb_led/rgb_led.c create mode 100644 keyboards/mechlovin/delphine/rgb_led/rgb_led.h create mode 100644 keyboards/mechlovin/delphine/rgb_led/rules.mk create mode 100644 keyboards/mechlovin/delphine/rules.mk diff --git a/keyboards/mechlovin/delphine/config.h b/keyboards/mechlovin/delphine/config.h new file mode 100644 index 000000000000..b3a084f67e75 --- /dev/null +++ b/keyboards/mechlovin/delphine/config.h @@ -0,0 +1,44 @@ +/* +Copyright 2020 Team 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 +#define MANUFACTURER Mechlovin +#define PRODUCT Mechlovin Delphine + +/* 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 { F0, F1, F4, F5, F6, D3 } +#define MATRIX_COL_PINS { F7, D7, D6, D2 } + +#define DIODE_DIRECTION COL2ROW \ No newline at end of file diff --git a/keyboards/mechlovin/delphine/delphine.c b/keyboards/mechlovin/delphine/delphine.c new file mode 100644 index 000000000000..52292b3c9228 --- /dev/null +++ b/keyboards/mechlovin/delphine/delphine.c @@ -0,0 +1,35 @@ +/* Copyright 2020 Team 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 "delphine.h" + +void matrix_init_kb(void) { + matrix_init_user(); + led_init_ports(); +} + +void led_init_ports(void) { + setPinOutput(B5); + writePinLow(B5); +} + +bool led_update_kb(led_t led_state) { + if(led_update_user(led_state)) { + writePin(B5, led_state.num_lock); + } + + return true; +} diff --git a/keyboards/mechlovin/delphine/delphine.h b/keyboards/mechlovin/delphine/delphine.h new file mode 100644 index 000000000000..1112fc27ffde --- /dev/null +++ b/keyboards/mechlovin/delphine/delphine.h @@ -0,0 +1,35 @@ +/* Copyright 2020 Team 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_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 }, \ +} diff --git a/keyboards/mechlovin/delphine/info.json b/keyboards/mechlovin/delphine/info.json new file mode 100644 index 000000000000..6356f4a3d602 --- /dev/null +++ b/keyboards/mechlovin/delphine/info.json @@ -0,0 +1,38 @@ +{ + "keyboard_name": "Delphine", + "url": "", + "maintainer": "Team Mechlovin'", + "width": 4, + "height": 6.25, + "layouts": { + "LAYOUT_ortho_6x4": { + "layout": [ + {"label":"K00 (F0,F7)", "x":0, "y":0}, + {"label":"K01 (F0,D7)", "x":1, "y":0}, + {"label":"K02 (F0,D6)", "x":2, "y":0}, + {"label":"K03 (F0,D2)", "x":3, "y":0}, + {"label":"K10 (F1,F7)", "x":0, "y":1.25}, + {"label":"K11 (F1,D7)", "x":1, "y":1.25}, + {"label":"K12 (F1,D6)", "x":2, "y":1.25}, + {"label":"K13 (F1,D2)", "x":3, "y":1.25}, + {"label":"K20 (F4,F7)", "x":0, "y":2.25}, + {"label":"K21 (F4,D7)", "x":1, "y":2.25}, + {"label":"K22 (F4,D6)", "x":2, "y":2.25}, + {"label":"K23 (F4,D2)", "x":3, "y":2.25}, + {"label":"K30 (F5,F7)", "x":0, "y":3.25}, + {"label":"K31 (F5,D7)", "x":1, "y":3.25}, + {"label":"K32 (F5,D6)", "x":2, "y":3.25}, + {"label":"K33 (F5,D2)", "x":3, "y":3.25}, + {"label":"K40 (F6,F7)", "x":0, "y":4.25}, + {"label":"K41 (F6,D7)", "x":1, "y":4.25}, + {"label":"K42 (F6,D6)", "x":2, "y":4.25}, + {"label":"K43 (F6,D2)", "x":3, "y":4.25}, + {"label":"K50 (D3,F7)", "x":0, "y":5.25}, + {"label":"K51 (D3,D7)", "x":1, "y":5.25}, + {"label":"K52 (D3,D6)", "x":2, "y":5.25}, + {"label":"K53 (D3,D2)", "x":3, "y":5.25} + ] + } + } + ,"meta": "https://noroadsleft.github.io/kbf_qmk_converter/" +} diff --git a/keyboards/mechlovin/delphine/keymaps/default/keymap.c b/keyboards/mechlovin/delphine/keymaps/default/keymap.c new file mode 100644 index 000000000000..584d0b223ada --- /dev/null +++ b/keyboards/mechlovin/delphine/keymaps/default/keymap.c @@ -0,0 +1,28 @@ +/* Copyright 2020 Team 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_ortho_6x4( + KC_ESC, BL_STEP, RGB_TOG, RGB_MOD, + 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_PENT, + KC_P0, KC_P0, KC_PDOT, KC_BSPC + ), + +}; \ No newline at end of file diff --git a/keyboards/mechlovin/delphine/keymaps/default/readme.md b/keyboards/mechlovin/delphine/keymaps/default/readme.md new file mode 100644 index 000000000000..67504a70dd4b --- /dev/null +++ b/keyboards/mechlovin/delphine/keymaps/default/readme.md @@ -0,0 +1 @@ +# The default keymap for delphine diff --git a/keyboards/mechlovin/delphine/keymaps/via/keymap.c b/keyboards/mechlovin/delphine/keymaps/via/keymap.c new file mode 100644 index 000000000000..18c30fdba09d --- /dev/null +++ b/keyboards/mechlovin/delphine/keymaps/via/keymap.c @@ -0,0 +1,52 @@ +/* Copyright 2020 Team 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_ortho_6x4( + KC_ESC, BL_STEP, RGB_TOG, RGB_MOD, + 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_PENT, + KC_P0, KC_P0, KC_PDOT, KC_BSPC + ), + [1] = LAYOUT_ortho_6x4( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + 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_6x4( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + 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( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + 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/delphine/keymaps/via/readme.md b/keyboards/mechlovin/delphine/keymaps/via/readme.md new file mode 100644 index 000000000000..b97ae1f26272 --- /dev/null +++ b/keyboards/mechlovin/delphine/keymaps/via/readme.md @@ -0,0 +1 @@ +# The via keymap for delphine diff --git a/keyboards/mechlovin/delphine/keymaps/via/rules.mk b/keyboards/mechlovin/delphine/keymaps/via/rules.mk new file mode 100644 index 000000000000..036bd6d1c3ec --- /dev/null +++ b/keyboards/mechlovin/delphine/keymaps/via/rules.mk @@ -0,0 +1 @@ +VIA_ENABLE = yes \ No newline at end of file diff --git a/keyboards/mechlovin/delphine/mono_led/config.h b/keyboards/mechlovin/delphine/mono_led/config.h new file mode 100644 index 000000000000..ead627937c84 --- /dev/null +++ b/keyboards/mechlovin/delphine/mono_led/config.h @@ -0,0 +1,34 @@ + +#pragma once + +#define PRODUCT_ID 0xDEF1 +#define DEVICE_VER 0x0001 + + +#ifdef BACKLIGHT_ENABLE +#define BACKLIGHT_PIN B6 +// #define BACKLIGHT_BREATHING +#define BACKLIGHT_LEVELS 3 +#endif + +#ifdef RGBLIGHT_ENABLE +#define RGB_DI_PIN E2 +#define RGBLED_NUM 13 +#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 \ No newline at end of file diff --git a/keyboards/mechlovin/delphine/mono_led/rules.mk b/keyboards/mechlovin/delphine/mono_led/rules.mk new file mode 100644 index 000000000000..ed572b0bbfcd --- /dev/null +++ b/keyboards/mechlovin/delphine/mono_led/rules.mk @@ -0,0 +1,2 @@ +BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow \ No newline at end of file diff --git a/keyboards/mechlovin/delphine/readme.md b/keyboards/mechlovin/delphine/readme.md new file mode 100644 index 000000000000..9a5389a5f331 --- /dev/null +++ b/keyboards/mechlovin/delphine/readme.md @@ -0,0 +1,15 @@ +# delphine + +![delphine](imgur.com image replace me!) + +A Number-Pad PCB, Mono backlight and RGB backlight version, Dolpad compatible. + +* Keyboard Maintainer: [Mechlovin'](https://github.com/mechlovin) +* Hardware Supported: Delphine PCB +* Hardware Availability: [Team Mechlovin'](https://mechlove.com) + +Make example for this keyboard (after setting up your build environment): + + make mechlovin/delphine: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/delphine/rgb_led/config.h b/keyboards/mechlovin/delphine/rgb_led/config.h new file mode 100644 index 000000000000..4d5c853d0c10 --- /dev/null +++ b/keyboards/mechlovin/delphine/rgb_led/config.h @@ -0,0 +1,47 @@ +#pragma once + +#define PRODUCT_ID 0xDEF2 +#define DEVICE_VER 0x0001 + +#ifdef RGBLIGHT_ENABLE +#define RGB_DI_PIN E2 +#define RGBLED_NUM 13 +#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 + +//rgb matrix setting// 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) +// The address will vary depending on your wiring: +// 0b1110100 AD <-> GND +// 0b1110111 AD <-> VCC +// 0b1110101 AD <-> SCL +// 0b1110110 AD <-> SDA +#define DRIVER_ADDR_1 0b1110110 +#define DRIVER_ADDR_2 0b1110100 +#define DRIVER_COUNT 1 +#define DRIVER_1_LED_TOTAL 25 +#define DRIVER_2_LED_TOTAL 0 +#define DRIVER_LED_TOTAL 25 +#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 false // turn off effects when suspended +#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 255 // 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_PINWHEEL // Sets the default mode, if none has been set diff --git a/keyboards/mechlovin/delphine/rgb_led/rgb_led.c b/keyboards/mechlovin/delphine/rgb_led/rgb_led.c new file mode 100644 index 000000000000..6f3e3ec731e6 --- /dev/null +++ b/keyboards/mechlovin/delphine/rgb_led/rgb_led.c @@ -0,0 +1,160 @@ +/* Copyright 2020 Team 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 "rgb_led.h" + + +#ifdef RGB_MATRIX_ENABLE +const is31_led g_is31_leds[DRIVER_LED_TOTAL] = { +// left CA + {0, C5_2, C6_2, C7_2}, //D2-0 + {0, C1_1, C3_2, C4_2}, //D20-1 + {0, C5_1, C6_1, C7_1}, //D36-2 + {0, C2_1, C3_1, C4_1}, //D46-3 + {0, C5_4, C6_4, C7_4}, //D65-4 + {0, C1_3, C2_3, C3_3}, //D26-5 + {0, C5_3, C6_3, C7_3}, //D37-6 + {0, C1_2, C2_2, C4_3}, //D47-7 + {0, C4_5, C5_5, C7_6}, //D11-8 + {0, C1_5, C2_5, C3_5}, //D27-9 + {0, C4_4, C6_5, C7_5}, //D38-10 + {0, C1_4, C2_4, C3_4}, //D48-11 + +// left CB + {0, C2_9, C3_9, C4_9}, //D17-12 + {0, C5_9, C6_9, C7_9}, //D28-13 + {0, C1_9, C3_10, C4_10}, //D39-14 + {0, C5_10, C6_10, C7_10}, //D49-15 + {0, C1_10, C2_10, C4_11}, //D18-16 + {0, C5_11, C6_11, C7_11}, //D29-17 + {0, C1_11, C2_11, C3_11}, //D40-18 + {0, C5_12, C6_12, C7_12}, //D50-19 + {0, C1_12, C2_12, C3_12}, //D19-20 + {0, C1_13, C2_13, C3_13}, //D61-21 + {0, C4_13, C5_13, C7_14}, //D35-22 + {0, C1_14, C2_14, C3_14}, //D41-23 + {0, C4_14, C5_14, C6_14}, //D51-24 +}; + +led_config_t g_led_config = { { + // Key Matrix to LED Index + {0, 1, 2, 3}, + {4, 5, 6, 7}, + {8, 9, 10, 11}, + {12, 13, 14, 15}, + {16, 17, 18, 19}, + {20, 22, 23, 24} + }, + { + //LED Index to Physical Positon + { 0, 0}, { 75, 0}, {149, 0}, {224, 0}, + { 0, 13}, { 75, 13}, {149, 13}, {224, 13}, + { 0, 25}, { 75, 25}, {149, 25}, {224, 25}, + { 0, 38}, { 75, 38}, {149, 38}, {224, 38}, + { 0, 51}, { 75, 51}, {149, 51}, {224, 51}, + { 0, 64}, { 37, 64}, { 75, 64}, {149, 64}, {224, 64}, +}, { + 4, 4, 4, 4, + 4, 1, 1, 4, + 4, 1, 1, 4, + 4, 1, 1, 4, + 4, 1, 1, 4, + 4, 0, 1, 1, 4, +} }; + +void rgb_matrix_indicators_kb(void) { + if (host_keyboard_led_state().num_lock) { + rgb_matrix_set_color(4, 255, 255, 255); + } +} + +__attribute__((weak)) +layer_state_t layer_state_set_user(layer_state_t state) { + // if on layer 1, turn on L1 LED, otherwise off. + if (get_highest_layer(state) == 0) { + rgb_matrix_set_color(1, 255, 0, 0); + } else { + rgb_matrix_set_color(1, 0, 0, 0); + } + // if on layer 2, turn on L2 LED, otherwise off. + if (get_highest_layer(state) == 1) { + rgb_matrix_set_color(0, 255, 0, 0); + } else { + rgb_matrix_set_color(0, 0, 0, 0); + } + + // if on layer 3, turn on L3 LED, otherwise off. + if (get_highest_layer(state) == 2) { + rgb_matrix_set_color(3, 255, 0, 0); + } else { + rgb_matrix_set_color(3, 0, 0, 0); + } + + // if on layer 4, turn on L4 LED, otherwise off. + if (get_highest_layer(state) == 3) { + rgb_matrix_set_color(2, 255, 0, 0); + } else { + rgb_matrix_set_color(2, 0, 0, 0); + } + + return state; +} + +#endif + +bool process_record_kb(uint16_t keycode, keyrecord_t *record) { + if (!process_record_user(keycode, record)) { return false; } + + if (record->event.pressed) { + switch(keycode) { + #ifdef 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_speed(); + return false; + case KC_F16: + rgb_matrix_decrease_speed(); + return false; + case KC_F17: + rgb_matrix_increase_hue(); + return false; + case KC_F18: + rgb_matrix_decrease_hue(); + return false; + case KC_F19: + rgb_matrix_increase_sat(); + return false; + case KC_F20: + rgb_matrix_decrease_sat(); + return false; + case KC_F21: + rgb_matrix_increase_val(); + return false; + case KC_F22: + rgb_matrix_decrease_val(); + return false; + #endif + default: + break; + } + } + return true; +} diff --git a/keyboards/mechlovin/delphine/rgb_led/rgb_led.h b/keyboards/mechlovin/delphine/rgb_led/rgb_led.h new file mode 100644 index 000000000000..60d581734472 --- /dev/null +++ b/keyboards/mechlovin/delphine/rgb_led/rgb_led.h @@ -0,0 +1,19 @@ +/* Copyright 2020 Team 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" diff --git a/keyboards/mechlovin/delphine/rgb_led/rules.mk b/keyboards/mechlovin/delphine/rgb_led/rules.mk new file mode 100644 index 000000000000..853f740ce9ae --- /dev/null +++ b/keyboards/mechlovin/delphine/rgb_led/rules.mk @@ -0,0 +1,2 @@ +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +RGB_MATRIX_ENABLE = IS31FL3731 # Use RGB matrix diff --git a/keyboards/mechlovin/delphine/rules.mk b/keyboards/mechlovin/delphine/rules.mk new file mode 100644 index 000000000000..217bb758b252 --- /dev/null +++ b/keyboards/mechlovin/delphine/rules.mk @@ -0,0 +1,25 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +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 = no # Enable keyboard RGB underglow +BLUETOOTH_ENABLE = no # Enable Bluetooth +AUDIO_ENABLE = no # Audio output + +LAYOUTS = ortho_6x4 +DEFAULT_FOLDER = mechlovin/delphine/mono_led \ No newline at end of file From 4286b81af016c2a566c06675dd5123fa83b74033 Mon Sep 17 00:00:00 2001 From: gorbachev Date: Tue, 1 Sep 2020 00:23:29 -0400 Subject: [PATCH 703/930] [Keymap] add dmqdesign/spin:gorbachev (#9919) * Add keymap for DQM Design Spin macropad * changes from code review * state -> layer_state * Formatting fixes * Formatting fixes * Formatting fixes * Formatting fixes * Formatting fixes --- .../dmqdesign/spin/keymaps/gorbachev/config.h | 25 ++ .../dmqdesign/spin/keymaps/gorbachev/keymap.c | 247 ++++++++++++++++++ .../spin/keymaps/gorbachev/readme.md | 7 + .../dmqdesign/spin/keymaps/gorbachev/rules.mk | 3 + 4 files changed, 282 insertions(+) create mode 100644 keyboards/dmqdesign/spin/keymaps/gorbachev/config.h create mode 100644 keyboards/dmqdesign/spin/keymaps/gorbachev/keymap.c create mode 100644 keyboards/dmqdesign/spin/keymaps/gorbachev/readme.md create mode 100644 keyboards/dmqdesign/spin/keymaps/gorbachev/rules.mk diff --git a/keyboards/dmqdesign/spin/keymaps/gorbachev/config.h b/keyboards/dmqdesign/spin/keymaps/gorbachev/config.h new file mode 100644 index 000000000000..10201015ee67 --- /dev/null +++ b/keyboards/dmqdesign/spin/keymaps/gorbachev/config.h @@ -0,0 +1,25 @@ +/* Copyright 2019-2020 DMQ Design + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License 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 +#define RGBLIGHT_HUE_STEP 8 + +// Use one or the other, determines the orientation of +// the OLED display +// #define RIGHT_HAND +#define LEFT_HAND diff --git a/keyboards/dmqdesign/spin/keymaps/gorbachev/keymap.c b/keyboards/dmqdesign/spin/keymaps/gorbachev/keymap.c new file mode 100644 index 000000000000..b9ad17386c23 --- /dev/null +++ b/keyboards/dmqdesign/spin/keymaps/gorbachev/keymap.c @@ -0,0 +1,247 @@ +/* Copyright 2019-2020 DMQ Design + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public 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 { + _NUMPAD, + _RGB, + _MACRO +}; + +enum custom_keycodes { + HELLO_WORLD = SAFE_RANGE, +}; + +//The below layers are intentionally empty in order to give a good starting point for how to configure multiple layers. +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_NUMPAD] = LAYOUT(/* Base */ + KC_7, KC_8, KC_9, TO(_NUMPAD), + KC_4, KC_5, KC_6, TO(_RGB), + KC_1, KC_2, KC_3, TO(_MACRO), + KC_0, KC_DOT, KC_ENTER + ), + + [_RGB] = LAYOUT(/* Base */ + RGB_HUI, RGB_SAI, RGB_VAI, KC_TRNS, + RGB_HUD, RGB_SAD, RGB_VAD, KC_TRNS, + KC_NO, KC_NO, KC_NO, KC_TRNS, + RGB_RMOD, RGB_TOG, RGB_MOD + ), + + [_MACRO] = LAYOUT(/* Base */ + HELLO_WORLD, KC_NO, KC_NO, KC_TRNS, + KC_NO, KC_NO, KC_NO, KC_TRNS, + KC_NO, KC_NO, KC_NO, KC_TRNS, + KC_NO, KC_NO, KC_NO + ) +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case HELLO_WORLD: + if (record->event.pressed) { + SEND_STRING("Hello, world!"); + } + break; + } + + return true; +}; + +void encoder_update_user(uint8_t index, bool clockwise) { + if (index == 0) { /* First encoder */ + switch (get_highest_layer(layer_state)) { //break each encoder update into a switch statement for the current layer + case _NUMPAD: + if (clockwise) { + tap_code(KC_DOWN); + } else { + tap_code(KC_UP); + } + break; + case _RGB: + if (clockwise) { + rgblight_increase_hue(); + } else { + rgblight_decrease_hue(); + } + break; + case _MACRO: + if (clockwise) { + break; + } else { + break; + } + break; + } + } else if (index == 1) { /* Second encoder */ + switch (get_highest_layer(layer_state)) { + case _NUMPAD: + if (clockwise) { + tap_code(KC_PGDN); + } else { + tap_code(KC_PGUP); + } + break; + case _RGB: + if (clockwise) { + rgblight_increase_sat(); + } else { + rgblight_decrease_sat(); + } + break; + case _MACRO: + if (clockwise) { + break; + } else { + break; + } + break; + } + } else if (index == 2) { /* Third encoder */ + switch (get_highest_layer(layer_state)) { + case _NUMPAD: + if (clockwise) { + tap_code(KC_VOLU); + } else { + tap_code(KC_VOLD); + } + break; + case _RGB: + if (clockwise) { + rgblight_increase_val(); + } else { + rgblight_decrease_val(); + } + break; + case _MACRO: + if (clockwise) { + break; + } else { + break; + } + break; + } + } +} + +layer_state_t layer_state_set_user(layer_state_t state) { //This will run every time the layer is updated + switch (get_highest_layer(state)) { + case _NUMPAD: + setrgb(RGB_WHITE, &led[0]); //Set the top LED to white for the bottom layer + setrgb(0, 0, 0, &led[1]); + setrgb(0, 0, 0, &led[2]); + break; + case _RGB: + setrgb(0, 0, 0, &led[0]); //Set the middle LED to white for the middle layer + setrgb(RGB_WHITE, &led[1]); + setrgb(0, 0, 0, &led[2]); + break; + case _MACRO: + setrgb(0, 0, 0, &led[0]); + setrgb(0, 0, 0, &led[1]); + setrgb(RGB_WHITE, &led[2]); //Set the bottom LED to white for the top layer + break; + } + rgblight_set(); + return state; +} + +#ifdef OLED_DRIVER_ENABLE + +static const char *ANIMATION_NAMES[] = { + "unknown", + "static", + "breathing I", + "breathing II", + "breathing III", + "breathing IV", + "rainbow mood I", + "rainbow mood II", + "rainbow mood III", + "rainbow swirl I", + "rainbow swirl II", + "rainbow swirl III", + "rainbow swirl IV", + "rainbow swirl V", + "rainbow swirl VI", + "snake I", + "snake II", + "snake III", + "snake IV", + "snake V", + "snake VI", + "knight I", + "knight II", + "knight III", + "christmas", + "static gradient I", + "static gradient II", + "static gradient III", + "static gradient IV", + "static gradient V", + "static gradient VI", + "static gradient VII", + "static gradient VIII", + "static gradient IX", + "static gradient X", + "rgb test", + "alternating", + "twinkle I", + "twinkle II", + "twinkle III", + "twinkle IV", + "twinkle V", + "twinkle VI" +}; + +void rgblight_get_mode_name(uint8_t mode, size_t bufsize, char *buf) { + snprintf(buf, bufsize, "%-25s", ANIMATION_NAMES[mode]); +} + +oled_rotation_t oled_init_user(oled_rotation_t rotation) { +#ifdef LEFT_HAND + return OLED_ROTATION_180; +#else + return OLED_ROTATION_0; +#endif +} + +void oled_task_user(void) { + // Host Keyboard Layer Status + oled_write_P(PSTR("Layer: "), false); + + switch (get_highest_layer(layer_state)) { + case _NUMPAD: + oled_write_P(PSTR("Numpad\n"), false); + break; + case _RGB: + oled_write_P(PSTR("RGB\n"), false); + break; + case _MACRO: + oled_write_P(PSTR("Macro\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); + } + + static char rgb_mode_name[30]; + rgblight_get_mode_name(rgblight_get_mode(), sizeof(rgb_mode_name), rgb_mode_name); + + oled_write_P(PSTR("Mode: "), false); + oled_write_ln(rgb_mode_name, false); +} +#endif diff --git a/keyboards/dmqdesign/spin/keymaps/gorbachev/readme.md b/keyboards/dmqdesign/spin/keymaps/gorbachev/readme.md new file mode 100644 index 000000000000..451dae7ef779 --- /dev/null +++ b/keyboards/dmqdesign/spin/keymaps/gorbachev/readme.md @@ -0,0 +1,7 @@ +# Keymap for Spin + +* Encoder button push changes layers +* First layer is a number pad +* Second layer is RGB control layer +* Third layer is macro layer +* OLED support diff --git a/keyboards/dmqdesign/spin/keymaps/gorbachev/rules.mk b/keyboards/dmqdesign/spin/keymaps/gorbachev/rules.mk new file mode 100644 index 000000000000..553adac19325 --- /dev/null +++ b/keyboards/dmqdesign/spin/keymaps/gorbachev/rules.mk @@ -0,0 +1,3 @@ +OLED_DRIVER_ENABLE = yes +MOUSEKEY_ENABLE = no +MIDI_ENABLE = no From a9a2817f3aff389fecf1b4bced52093a175a5a65 Mon Sep 17 00:00:00 2001 From: Danilo de Klerk Date: Tue, 1 Sep 2020 06:44:47 +0200 Subject: [PATCH 704/930] [Keymap] Add ddeklerk ortho_4x12 layout (#10109) * Add ddeklerk ortho_4x12 layout * Add license header --- .../community/ortho_4x12/ddeklerk/keymap.c | 78 +++++++++++++++++++ 1 file changed, 78 insertions(+) create mode 100644 layouts/community/ortho_4x12/ddeklerk/keymap.c diff --git a/layouts/community/ortho_4x12/ddeklerk/keymap.c b/layouts/community/ortho_4x12/ddeklerk/keymap.c new file mode 100644 index 000000000000..ec36a50616bb --- /dev/null +++ b/layouts/community/ortho_4x12/ddeklerk/keymap.c @@ -0,0 +1,78 @@ +/* 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 + +enum layers { + _BASE, + _GAME, + _FN1, + _FN2, + _FN3, + _ADJUST +}; + +#define BASE DF(_BASE) +#define GAME DF(_GAME) +#define FN1 LT(_FN1, KC_BSPC) +#define FN2 LT(_FN2, KC_ENT) +#define FN3SPC LT(_FN3, KC_SPC) + +#define CTRLESC MT(MOD_LCTL, KC_ESC) +#define CTRLMIN MT(MOD_RCTL, KC_MINS) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_BASE] = 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, XXXXXXX, + CTRLESC, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, CTRLMIN, + KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_RSFT, + XXXXXXX, XXXXXXX, XXXXXXX, KC_LGUI, FN1, FN3SPC, FN3SPC, FN2, KC_RALT, XXXXXXX, XXXXXXX, XXXXXXX + ), + [_GAME] = LAYOUT_ortho_4x12( + KC_3, KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, + KC_2, CTRLESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_BSPC, + KC_1, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_UP, KC_ENT, + XXXXXXX, KC_LALT, XXXXXXX, XXXXXXX, _______, KC_SPC, XXXXXXX, _______, XXXXXXX, KC_LEFT, KC_DOWN, KC_RGHT + ), + [_FN1] = 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_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_PIPE, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + [_FN2] = LAYOUT_ortho_4x12( + KC_GRV, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_LCBR, KC_RCBR, KC_QUES, KC_PLUS, _______, + KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_LBRC, KC_RBRC, KC_SLSH, KC_EQL, KC_BSLS, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + [_FN3] = LAYOUT_ortho_4x12( + _______, KC_MPRV, KC_MPLY, KC_MNXT, _______, _______, KC_INS, KC_HOME, KC_UP, KC_END, KC_BSPC, _______, + _______, _______, KC_VOLD, KC_VOLU, KC_MUTE, _______, KC_PGUP, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, + _______, KC_APP, _______, _______, _______, _______, KC_PGDN, KC_DEL, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + [_ADJUST] = LAYOUT_ortho_4x12( + XXXXXXX, RESET, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, GAME, BASE, XXXXXXX, XXXXXXX, XXXXXXX, + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, XXXXXXX, XXXXXXX, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX + ) +}; + +layer_state_t layer_state_set_user(layer_state_t state) { + return update_tri_layer_state(state, _FN1, _FN2, _ADJUST); +}; From 4a6cfb06c5aafb353ddfa056bfa69ae82b5fc894 Mon Sep 17 00:00:00 2001 From: Joe Wasson Date: Mon, 31 Aug 2020 22:19:51 -0700 Subject: [PATCH 705/930] TMO50: use layer_state_set_kb at keyboard level (#10150) * Change TMO to use layer_state_set_kb as is customary at the keyboard level. This also factors out `process_indicator_led` to a separate method. --- keyboards/tmo50/tmo50.c | 37 +++++++++++++++++++++++++++---------- keyboards/tmo50/tmo50.h | 5 ++++- 2 files changed, 31 insertions(+), 11 deletions(-) diff --git a/keyboards/tmo50/tmo50.c b/keyboards/tmo50/tmo50.c index 4f6288133da3..bad4319f11e7 100644 --- a/keyboards/tmo50/tmo50.c +++ b/keyboards/tmo50/tmo50.c @@ -51,34 +51,51 @@ void led_set_kb(uint8_t usb_led) { led_set_user(usb_led); } -uint32_t layer_state_set_user(uint32_t state) +layer_state_t layer_state_set_kb(layer_state_t state) { - // if on layer 0, turn on B0 LED, otherwise off. - if (biton32(state) == 0) { + state = layer_state_set_user(state); + process_indicator_led_kb(state); + + return state; +} + +__attribute__((weak)) +bool process_indicator_led_user(layer_state_t state){ + return true; +} + +bool process_indicator_led_kb(layer_state_t state) +{ + if(process_indicator_led_user(state)) + { + // if on layer 0, turn on B0 LED, otherwise off. + if (get_highest_layer(state) == 0) { PORTB &= ~(1< Date: Tue, 1 Sep 2020 12:26:52 +0700 Subject: [PATCH 706/930] [Keymap] update dz60:mrsendyyk (#10160) Update DZ60 Personal readme.md and keymap.c * Update readme.md * Update keymap.c * Update keymap.c * Update readme.md * Update readme.md * Update readme.md * Update keymap.c * Update readme.md * Update * Update readme.md * Update keymap.c * Update readme.md --- keyboards/dz60/keymaps/mrsendyyk/keymap.c | 62 +++--------- keyboards/dz60/keymaps/mrsendyyk/readme.md | 109 +++++++++++++-------- 2 files changed, 83 insertions(+), 88 deletions(-) diff --git a/keyboards/dz60/keymaps/mrsendyyk/keymap.c b/keyboards/dz60/keymaps/mrsendyyk/keymap.c index 4b0b33e2c880..58e10490da88 100644 --- a/keyboards/dz60/keymaps/mrsendyyk/keymap.c +++ b/keyboards/dz60/keymaps/mrsendyyk/keymap.c @@ -1,63 +1,29 @@ +/* + * Based on Sendy YK's 60% ANSI Arrow Layout and Keymap + * https://github.com/qmk/qmk_firmware/blob/master/layouts/default/60_ansi_arrow/info.json + * https://github.com/qmk/qmk_firmware/blob/master/layouts/community/60_ansi_arrow/mrsendyyk/keymap.c + * + * https://github.com/mrsendyyk + */ + #include QMK_KEYBOARD_H -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - - /* - * Default Layer [0] - * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ - * │Esc│1 │2 │3 │4 │5 │6 │7 │8 │9 │0 │- │= │Bspc │ - * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ - * │Tab │Q │W │E │R │T │Y │U │I │O │P │[ │] │\ │ - * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤ - * │Caps L│A │S │D │F │G │H │J │K │L │; │' │Enter │ - * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴┬───┬───┤ - * │Shift │Z │X │C │V │B │N │M │, │. │Shift │↑ │/ │ - * ├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴──┬┴──┬───┼───┼───┤ - * │Ctl │OS │Alt │ Space │Alt│Ctl│← │↓ │→ │ - * └────┴────┴────┴────────────────────────┴───┴───┴───┴───┴───┘ - */ +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* Default Layer [0] */ [0] = LAYOUT_60_ansi_arrow(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_RSFT, KC_UP, KC_SLSH, KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, LT(2, KC_RALT), LT(1, KC_RCTL), KC_LEFT, KC_DOWN, KC_RGHT ), - - /* - * Fn Layer [1] - * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ - * │` │F1 │F2 │F3 │F4 │F5 │F6 │F7 │F8 │F9 │F10│F11│F12│Delete │ - * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ - * │Bri+ │ │ │End│Rst│ │ │ │Ins│ │P S│ │ │Eject│ - * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤ - * │Bri- │ │S L│ │ │ │Hm │ │ │ │ │ │Mute │ - * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴┬───┬───┤ - * │Vol+ │ │ │Cal│ │ │N L│Ml │ │ │Pause │P U│ │ - * ├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴──┬┴──┬───┼───┼───┤ - * │Vol-│Rwd │F FD│ Play │Stp│ │Prv│P D│Nxt│ - * └────┴────┴────┴────────────────────────┴───┴───┴───┴───┴───┘ - */ + /* Fn Layer [1] */ [1] = LAYOUT_60_ansi_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_BRIU, KC_TRNS, KC_TRNS, KC_END, RESET, KC_TRNS, KC_TRNS, KC_TRNS, KC_INS, KC_TRNS, KC_PSCR, KC_TRNS, KC_TRNS, KC_EJCT, KC_BRID, KC_TRNS, KC_SLCK, KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MUTE, KC_VOLU, KC_TRNS, KC_TRNS, KC_CALC, KC_TRNS, KC_TRNS, KC_NLCK, KC_MAIL, KC_TRNS, KC_TRNS, KC_PAUS, KC_PGUP, KC_TRNS, KC_VOLD, KC_MRWD, KC_MFFD, KC_MPLY, KC_MSTP, KC_TRNS, KC_MPRV, KC_PGDN, KC_MNXT ), - - /* - * Fn Layer [2] - * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ - * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ - * │ │R T│R M│Hu+│Hu-│Sa+│Sa-│Br+│Br-│ │ │ │ │ │ - * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤ - * │ │ │ │ │ │ │ │ │ │ │ │ │ │ - * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴┬───┬───┤ - * │ │ │ │ │BL-│B T│BL+│B C│ │ │ │ │ │ - * ├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴──┬┴──┬───┼───┼───┤ - * │ │ │ │ │ │ │ │ │ │ - * └────┴────┴────┴────────────────────────┴───┴───┴───┴───┴───┘ - */ + /* Fn Layer [2] */ [2] = LAYOUT_60_ansi_arrow(KC_TRNS, KC_TRNS, KC_TRNS, 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_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, KC_TRNS, KC_TRNS, KC_TRNS, @@ -71,7 +37,7 @@ void keyboard_post_init_user(void) { rgblight_sethsv_noeeprom(0, 0, 0); } -/* RGB Lighting/LED/Underglow as Caps Lock, Num Lock, Scroll Lock, and Layer indicator */ +/* RGB Lighting/LED/Underglow as Caps Lock, Num Lock, Scroll Lock, and Layer Indicator */ void update_led(void) { /* Num Lock Indicator */ if (host_keyboard_led_state().num_lock) { @@ -79,7 +45,7 @@ void keyboard_post_init_user(void) { } /* Scroll Lock Indicator */ if (host_keyboard_led_state().scroll_lock) { - rgblight_setrgb(0, 100, 255); + rgblight_setrgb(241, 190, 72); } } diff --git a/keyboards/dz60/keymaps/mrsendyyk/readme.md b/keyboards/dz60/keymaps/mrsendyyk/readme.md index f5b74d8ebd05..ae5ad2228859 100644 --- a/keyboards/dz60/keymaps/mrsendyyk/readme.md +++ b/keyboards/dz60/keymaps/mrsendyyk/readme.md @@ -1,56 +1,85 @@ -# [Sendy YK](https://mr.sendyyk.com)'s Keymap -`LAYOUT_60_ansi_arrow` with RGB Lighting/LED/Underglow as Caps Lock, Num Lock, Scroll Lock, and Layer indicator. +# Sendy YK's 60% ANSI Arrow Layout and Keymap + +This is Sendy YK's [60% ANSI Arrow Layout](https://github.com/qmk/qmk_firmware/blob/master/layouts/default/60_ansi_arrow/info.json) and [Keymap (with RGB Lighting/LED/Underglow as Caps Lock, Num Lock, Scroll Lock, and Layer Indicator)](https://github.com/qmk/qmk_firmware/blob/master/layouts/community/60_ansi_arrow/mrsendyyk/keymap.c). + +## 60% ANSI Arrow Layout + +![LAYOUT_60_ansi_arrow](https://raw.githubusercontent.com/mrsendyyk/my_qmk/master/kbdfans_tofu_60_keyboard/assets/dz60_layout_60_ansi_arrow.png) + +## Keymap ### Default Layer [0] -``` -┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ -│Esc│1 │2 │3 │4 │5 │6 │7 │8 │9 │0 │- │= │Bspc │ -├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ -│Tab │Q │W │E │R │T │Y │U │I │O │P │[ │] │\ │ -├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤ -│Caps L│A │S │D │F │G │H │J │K │L │; │' │Enter │ -├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴┬───┬───┤ -│Shift │Z │X │C │V │B │N │M │, │. │Shift │↑ │/ │ -├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴──┬┴──┬───┼───┼───┤ -│Ctl │OS │Alt │ Space │Alt│Ctl│← │↓ │→ │ -└────┴────┴────┴────────────────────────┴───┴───┴───┴───┴───┘ -``` +![Default Layer [0]](https://raw.githubusercontent.com/mrsendyyk/my_qmk/master/kbdfans_tofu_60_keyboard/assets/dz60_mrsendyyk_0.png) ### Fn Layer [1] -Press and hold *right* **Ctl** key. -``` -┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ -│` │F1 │F2 │F3 │F4 │F5 │F6 │F7 │F8 │F9 │F10│F11│F12│Delete │ -├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ -│Bri+ │ │ │End│Rst│ │ │ │Ins│ │P S│ │ │Eject│ -├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤ -│Bri- │ │S L│ │ │ │Hm │ │ │ │ │ │Mute │ -├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴┬───┬───┤ -│Vol+ │ │ │Cal│ │ │N L│Ml │ │ │Pause │P U│ │ -├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴──┬┴──┬───┼───┼───┤ -│Vol-│Rwd │F FD│ Play │Stp│ │Prv│P D│Nxt│ -└────┴────┴────┴────────────────────────┴───┴───┴───┴───┴───┘ -``` + +Press and hold *right* **Ctrl** key. + +![Fn Layer [1]](https://raw.githubusercontent.com/mrsendyyk/my_qmk/master/kbdfans_tofu_60_keyboard/assets/dz60_mrsendyyk_1.png) ### Fn Layer [2] + Press and hold *right* **Alt** key. + +![Fn Layer [2]](https://raw.githubusercontent.com/mrsendyyk/my_qmk/master/kbdfans_tofu_60_keyboard/assets/dz60_mrsendyyk_2.png) + +### RGB Lighting/LED/Underglow as Caps Lock, Num Lock, Scroll Lock, and Layer Indicator + +#### Caps Lock Indicator + +```c +/* Caps Lock Indicator */ + if (IS_LED_ON(usb_led, USB_LED_CAPS_LOCK)) { + writePinLow(B2); + rgblight_setrgb(100, 255, 100); + } +``` + +#### Num Lock Indicator + +```c +/* Num Lock Indicator */ + if (host_keyboard_led_state().num_lock) { + rgblight_setrgb(225, 8, 0); + } ``` -┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ -│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ -│ │R T│R M│Hu+│Hu-│Sa+│Sa-│Br+│Br-│ │ │ │ │ │ -├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤ -│ │ │ │ │ │ │ │ │ │ │ │ │ │ -├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴┬───┬───┤ -│ │ │ │ │BL-│B T│BL+│B C│ │ │ │ │ │ -├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴──┬┴──┬───┼───┼───┤ -│ │ │ │ │ │ │ │ │ │ -└────┴────┴────┴────────────────────────┴───┴───┴───┴───┴───┘ + +#### Scroll Lock Indicator +```c +/* Scroll Lock Indicator */ + if (host_keyboard_led_state().scroll_lock) { + rgblight_setrgb(241, 190, 72); + } +``` + +#### Layer Indicator + +```c +/* Layer Indicator */ + else { + switch (get_highest_layer(layer_state)) { + /* Fn Layer [1] Indicator */ + case 1: + rgblight_setrgb(255, 110, 0); + break; + /* Fn Layer [2] Indicator */ + case 2: + rgblight_setrgb(255, 110, 0); + break; + /* Default Layer [0] Indicator */ + default: + rgblight_setrgb(0, 0, 0); + break; + } + update_led(); + } ``` ## Build The Firmware + You will need to build the firmware. To do so go to your terminal window and run the compile command: qmk compile -kb dz60 -km mrsendyyk + See [The Complete Newbs Guide To QMK](https://docs.qmk.fm/#/newbs). From 0032cb026b7d4143fd61ed3cb3378eda5bb41292 Mon Sep 17 00:00:00 2001 From: Ryan Date: Tue, 1 Sep 2020 15:30:07 +1000 Subject: [PATCH 707/930] [Keyboard] YMDK NP21 refactor (#10181) --- keyboards/ymdk_np21/config.h | 119 +++++++++++++-- keyboards/ymdk_np21/info.json | 140 +++++++++++------- keyboards/ymdk_np21/keymaps/default/keymap.c | 44 +++--- keyboards/ymdk_np21/keymaps/default/readme.md | 50 +++---- keyboards/ymdk_np21/{README.md => readme.md} | 0 keyboards/ymdk_np21/rules.mk | 34 ++--- keyboards/ymdk_np21/ymdk_np21.h | 65 ++++---- 7 files changed, 290 insertions(+), 162 deletions(-) rename keyboards/ymdk_np21/{README.md => readme.md} (100%) diff --git a/keyboards/ymdk_np21/config.h b/keyboards/ymdk_np21/config.h index 3796634316b6..1ea6fb0ce351 100644 --- a/keyboards/ymdk_np21/config.h +++ b/keyboards/ymdk_np21/config.h @@ -19,32 +19,121 @@ along with this program. If not, see . #include "config_common.h" -#define VENDOR_ID 0x20A0 -#define PRODUCT_ID 0x422D -#define DEVICE_VER 0x0200 -#define MANUFACTURER YMDK -#define PRODUCT NP21 +/* USB Device descriptor parameter */ +#define VENDOR_ID 0x594D // "YM" +#define PRODUCT_ID 0x5021 // "P" 21 +#define DEVICE_VER 0x0200 +#define MANUFACTURER YMDK +#define PRODUCT NP21 -/* matrix size */ +/* key matrix size */ #define MATRIX_ROWS 4 #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 { B0, B1, B2, B3 } #define MATRIX_COL_PINS { A0, A1, A2, A3, A4, A5 } -/* COL2ROW or ROW2COL */ +/* COL2ROW, ROW2COL */ #define DIODE_DIRECTION COL2ROW #define BACKLIGHT_PIN D4 #define BACKLIGHT_LEVELS 12 #define BACKLIGHT_BREATHING -#define TAPPING_TOGGLE 3 - -#define USB_MAX_POWER_CONSUMPTION 100 - -/* 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 5 -#define RGB_DI_PIN E2 // NOTE: for PS2AVRGB boards, underglow commands are sent via I2C to 0xB0. +//#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 + +/* 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 useful 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 + +/* + * 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 */ +#define NO_ACTION_MACRO +#define NO_ACTION_FUNCTION + +/* Bootmagic Lite key configuration */ +//#define BOOTMAGIC_LITE_ROW 0 +//#define BOOTMAGIC_LITE_COLUMN 0 + +#define USB_MAX_POWER_CONSUMPTION 100 diff --git a/keyboards/ymdk_np21/info.json b/keyboards/ymdk_np21/info.json index b17059a1cd88..bc5b101c9a41 100644 --- a/keyboards/ymdk_np21/info.json +++ b/keyboards/ymdk_np21/info.json @@ -6,63 +6,101 @@ "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} + {"x": 0, "y": 0}, + {"x": 1, "y": 0}, + {"x": 2, "y": 0}, + {"x": 3, "y": 0}, + + {"x": 0, "y": 1.25}, + {"x": 1, "y": 1.25}, + {"x": 2, "y": 1.25}, + {"x": 3, "y": 1.25}, + + {"x": 0, "y": 2.25}, + {"x": 1, "y": 2.25}, + {"x": 2, "y": 2.25}, + {"x": 3, "y": 2.25}, + + {"x": 0, "y": 3.25}, + {"x": 1, "y": 3.25}, + {"x": 2, "y": 3.25}, + {"x": 3, "y": 3.25}, + + {"x": 0, "y": 4.25}, + {"x": 1, "y": 4.25}, + {"x": 2, "y": 4.25}, + {"x": 3, "y": 4.25}, + + {"x": 0, "y": 5.25}, + {"x": 1, "y": 5.25}, + {"x": 2, "y": 5.25}, + {"x": 3, "y": 5.25} ] }, - "LAYOUT": { + "LAYOUT_ortho_4x6": { "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} + {"x": 0, "y": 0}, + {"x": 1, "y": 0}, + {"x": 2, "y": 0}, + {"x": 3, "y": 0}, + {"x": 4, "y": 0}, + {"x": 5.25, "y": 0}, + + {"x": 0, "y": 1}, + {"x": 1, "y": 1}, + {"x": 2, "y": 1}, + {"x": 3, "y": 1}, + {"x": 4, "y": 1}, + {"x": 5.25, "y": 1}, + + {"x": 0, "y": 2}, + {"x": 1, "y": 2}, + {"x": 2, "y": 2}, + {"x": 3, "y": 2}, + {"x": 4, "y": 2}, + {"x": 5.25, "y": 2}, + + {"x": 0, "y": 3}, + {"x": 1, "y": 3}, + {"x": 2, "y": 3}, + {"x": 3, "y": 3}, + {"x": 4, "y": 3}, + {"x": 5.25, "y": 3} + ] + }, + "LAYOUT_numpad_6x4": { + "width": 4, + "height": 6.25, + "layout": [ + {"x": 0, "y": 0}, + {"x": 1, "y": 0}, + {"x": 2, "y": 0}, + {"x": 3, "y": 0}, + + {"x": 0, "y": 1.25}, + {"x": 1, "y": 1.25}, + {"x": 2, "y": 1.25}, + {"x": 3, "y": 1.25}, + + {"x": 0, "y": 2.25}, + {"x": 1, "y": 2.25}, + {"x": 2, "y": 2.25}, + + {"x": 0, "y": 3.25}, + {"x": 1, "y": 3.25}, + {"x": 2, "y": 3.25}, + {"x": 3, "y": 2.25, "h": 2}, + + {"x": 0, "y": 4.25}, + {"x": 1, "y": 4.25}, + {"x": 2, "y": 4.25}, + + {"x": 0, "y": 5.25, "w": 2}, + {"x": 2, "y": 5.25}, + {"x": 3, "y": 4.25, "h": 2} ] } } diff --git a/keyboards/ymdk_np21/keymaps/default/keymap.c b/keyboards/ymdk_np21/keymaps/default/keymap.c index 143f4f61bbbd..e15fb1d6ebea 100644 --- a/keyboards/ymdk_np21/keymaps/default/keymap.c +++ b/keyboards/ymdk_np21/keymaps/default/keymap.c @@ -1,32 +1,26 @@ #include QMK_KEYBOARD_H -#define _NP 0 -#define _BL 1 - -enum custom_keycodes { - NP = SAFE_RANGE, - BL +enum layer_names { + _NP, + _BL }; const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - /* 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 - ) + [_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 index aca4c0caba80..3a4730f7e678 100644 --- a/keyboards/ymdk_np21/keymaps/default/readme.md +++ b/keyboards/ymdk_np21/keymaps/default/readme.md @@ -1,26 +1,26 @@ -# default +# The default keymap for the YMDK NP21 keypad -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 | - `-------------------------------' `-------------------------------' +``` +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/README.md b/keyboards/ymdk_np21/readme.md similarity index 100% rename from keyboards/ymdk_np21/README.md rename to keyboards/ymdk_np21/readme.md diff --git a/keyboards/ymdk_np21/rules.mk b/keyboards/ymdk_np21/rules.mk index c370c616a5a8..ed7d082f0dce 100644 --- a/keyboards/ymdk_np21/rules.mk +++ b/keyboards/ymdk_np21/rules.mk @@ -2,28 +2,20 @@ 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 = no -EXTRAKEY_ENABLE = yes -CONSOLE_ENABLE = no -COMMAND_ENABLE = yes - -BACKLIGHT_ENABLE = yes - -RGBLIGHT_ENABLE = yes +# 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 = yes # Commands for debug and configuration +# 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 = yes # Enable keyboard RGB underglow WS2812_DRIVER = i2c -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 +LAYOUTS = ortho_6x4 numpad_6x4 diff --git a/keyboards/ymdk_np21/ymdk_np21.h b/keyboards/ymdk_np21/ymdk_np21.h index afd3d38c7d45..bdc37231eeb8 100644 --- a/keyboards/ymdk_np21/ymdk_np21.h +++ b/keyboards/ymdk_np21/ymdk_np21.h @@ -19,31 +19,46 @@ along with this program. If not, see . #include "quantum.h" +#define XXX KC_NO + #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 }, \ - { K16, K15, K14, K13, K12, K11 }, \ - { K26, K25, K24, K23, K22, K21 }, \ - { K36, K35, K34, K33, K32, K31 } \ + k00, k10, k20, k30, \ + k01, k11, k21, k31, \ + k02, k12, k22, k32, \ + k03, k13, k23, k33, \ + k04, k14, k24, k34, \ + k05, k15, k25, k35 \ +) { \ + { k00, k01, k02, k03, k04, k05 }, \ + { k10, k11, k12, k13, k14, k15 }, \ + { k20, k21, k22, k23, k24, k25 }, \ + { k30, k31, k32, k33, k34, k35 } \ +} + +#define LAYOUT_ortho_4x6( \ + k05, k04, k03, k02, k01, k00, \ + k15, k14, k13, k12, k11, k10, \ + k25, k24, k23, k22, k21, k20, \ + k35, k34, k33, k32, k31, k30 \ +) { \ + { k00, k01, k02, k03, k04, k05 }, \ + { k10, k11, k12, k13, k14, k15 }, \ + { k20, k21, k22, k23, k24, k25 }, \ + { k30, k31, k32, k33, k34, k35 } \ +} + +#define LAYOUT_numpad_6x4( \ + k00, k10, k20, k30, \ + k01, k11, k21, k31, \ + k02, k12, k22,\ + k03, k13, k23, k33, \ + k04, k14, k24, \ + k05, k25, k35 \ +) { \ + { k00, k01, k02, k03, k04, k05 }, \ + { k10, k11, k12, k13, k14, XXX }, \ + { k20, k21, k22, k23, k24, k25 }, \ + { k30, k31, XXX, k33, XXX, k35 } \ } -#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 \ -) +#define LAYOUT LAYOUT_ortho_4x6 From d16d8665978b119e271b876de27dd971c77dc431 Mon Sep 17 00:00:00 2001 From: Joe Wasson Date: Mon, 31 Aug 2020 22:41:41 -0700 Subject: [PATCH 708/930] [Keyboard] 1upkeyboards/1up60rgb: fix broken Enter (#10188) The recent change to unnest macros put the enter on the wrong matrix key. On the 1uprgb, the ANSI and ISO enters share the same cell as does the ANSI and ISO backslash. --- keyboards/1upkeyboards/1up60rgb/1up60rgb.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/keyboards/1upkeyboards/1up60rgb/1up60rgb.h b/keyboards/1upkeyboards/1up60rgb/1up60rgb.h index 9e866bb50f68..61d064abb7a2 100644 --- a/keyboards/1upkeyboards/1up60rgb/1up60rgb.h +++ b/keyboards/1upkeyboards/1up60rgb/1up60rgb.h @@ -28,7 +28,7 @@ ) { \ { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, XXX }, \ { k10, XXX, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, k1E }, \ - { k20, XXX, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, XXX, k2E }, \ + { k20, XXX, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2E, XXX }, \ { k30, XXX, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, XXX, k3D, XXX }, \ { k40, k41, XXX, k43, XXX, XXX, k46, XXX, XXX, XXX, k4A, k4B, XXX, k4D, k4E } \ } @@ -42,8 +42,8 @@ k40, k41, k43, k46, k4A, k4B, k4D, k4E \ ) { \ { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, XXX }, \ - { k10, XXX, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, XXX }, \ - { k20, XXX, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2D, k2E }, \ + { k10, XXX, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, k2D }, \ + { k20, XXX, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2E, XXX }, \ { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, XXX, k3D, XXX }, \ { k40, k41, XXX, k43, XXX, XXX, k46, XXX, XXX, XXX, k4A, k4B, XXX, k4D, k4E } \ } @@ -58,7 +58,7 @@ ) { \ { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E }, \ { k10, XXX, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, k1E }, \ - { k20, XXX, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, XXX, k2E }, \ + { k20, XXX, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2E, XXX }, \ { k30, XXX, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, XXX, k3D, k3E }, \ { k40, k41, XXX, k43, XXX, XXX, k46, XXX, XXX, XXX, k4A, k4B, XXX, k4D, k4E } \ } @@ -73,7 +73,7 @@ ) { \ { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E }, \ { k10, XXX, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, k1E }, \ - { k20, XXX, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, XXX, k2E }, \ + { k20, XXX, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2E, XXX }, \ { k30, XXX, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, XXX, k3D, k3E }, \ { XXX, k41, XXX, k43, XXX, XXX, k46, XXX, XXX, XXX, XXX, k4B, XXX, k4D, XXX } \ } From 80fd81ad6baaf02d49bafca2e219355a100a45b4 Mon Sep 17 00:00:00 2001 From: umi <57262844+umi-umi@users.noreply.github.com> Date: Tue, 1 Sep 2020 18:31:25 +0900 Subject: [PATCH 709/930] [Docs] Japanese translation of docs/ref_functions.md (#9878) * add ref_functions.md translation * modify internal link for ja * update based on comment * reflect #9892 change * update based on comment * update based on comment --- docs/ja/ref_functions.md | 122 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 122 insertions(+) create mode 100644 docs/ja/ref_functions.md diff --git a/docs/ja/ref_functions.md b/docs/ja/ref_functions.md new file mode 100644 index 000000000000..e9c45fdecc31 --- /dev/null +++ b/docs/ja/ref_functions.md @@ -0,0 +1,122 @@ +# キーボードをより良くするための便利なコア関数のリスト + + + +QMK には、信じられないほど便利な、またはあなたが望んでいた機能を少し追加する、隠された関数がたくさんあります。特定の機能に固有の関数はそれぞれの機能のページにあるため、ここには含まれていません。 + +## (OLKB) トライレイヤー :id=olkb-tri-layers + +目的に応じて、実際に使うことができる別個の関数があります。 + +### `update_tri_layer(x, y, z)` + +最初は `update_tri_layer(x, y, z)` 関数です。この関数はレイヤー `x` と `y` の両方がオンになっているかどうかを調べます。両方ともオンの場合は、レイヤー `z` がオンになります。それ以外の場合、`x` と `y` の両方がオンではない(一方のみがオン、またはどちらもオンでない)場合は、レイヤー `z` をオフにします。 + +この関数は、この機能を持つ特定のキーを作成したいが、他のレイヤーのキーコードではそうしたくない場合に便利です。 + +#### 例 + +```c +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; + 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; + } + return true; +} +``` + +### `update_tri_layer_state(state, x, y, z)` +もう1つの関数は `update_tri_layer_state(state, x, y, z)` です。この関数は [`layer_state_set_*` 関数](ja/custom_quantum_functions.md#layer-change-code)から呼び出されることを意図しています。これは、キーコードを使ってレイヤーを変更するたびに、これがチェックされることを意味します。したがって、`LT(layer, kc)` を使ってレイヤーを変更すると、同じレイヤーチェックが引き起こされます。 + +このメソッドの注意点は、`x` および `y` レイヤーをオンにしないと、`z` レイヤーにアクセスできないことです。レイヤー `z` のみをアクティブにしようとすると、このコードが実行され、使用前にレイヤー `z` がオフになるからです。 + +#### 例 + +```c +layer_state_t layer_state_set_user(layer_state_t state) { + return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST); +} +``` + +あるいは、すぐに値を「返す」必要はありません。複数のトライレイヤーを追加、あるいは追加の効果を追加する場合に便利です。 + +```c +layer_state_t layer_state_set_user(layer_state_t state) { + state = update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST); + state = update_tri_layer_state(state, _RAISE, _SYMB, _SPECIAL); + return state; +} +``` + +## 永続的なデフォルトレイヤーの設定 + +デフォルトレイヤーを設定して、キーボードを取り外しても保持されるようにしたいですか?そうであれば、これがそのための関数です。 + +これを使うには、`set_single_persistent_default_layer(layer)` を使います。レイヤーに名前が定義されている場合は、代わりにそれを使うことができます (_QWERTY、_DVORAK、_COLEMAK など)。 + +これは、デフォルトレイヤーを設定し、永続設定が更新され、もし [オーディオ](ja/feature_audio.md) がキーボードで有効でデフォルトレイヤーの音が設定されている場合は、曲を再生します。 + +デフォルトレイヤーの音を設定するには、以下のように `config.h` ファイルに定義する必要があります。 + +```c +#define DEFAULT_LAYER_SONGS { SONG(QWERTY_SOUND), \ + SONG(COLEMAK_SOUND), \ + SONG(DVORAK_SOUND) \ + } +``` + + +?> [quantum/audio/song_list.h](https://github.com/qmk/qmk_firmware/blob/master/quantum/audio/song_list.h) に使用できる多くの定義済みの曲があります。 + +## キーボードのリセット + +使用できる `RESET` quantum キーコードがあります。ただし、キーを個別に押すのではなくマクロの一部としてリセットしたい場合は、そうすることができます。 + +そのためには、`reset_keyboard()` を関数またはマクロに追加すると、ブートローダがリセットされます。 + +## EEPROM (永続ストレージ)の消去 + +オーディオ、RGB アンダーグロー、バックライト、キーの動作に問題がある場合は、EEPROM (永続的な設定のストレージ)をリセットすることができます。ブートマジックはこれを行う方法の1つですが、有効になっていない場合はカスタムマクロを使って行うことができます。 + +EEPROM を消去するには、関数またはマクロから `eeconfig_init()` を実行し、ほとんどの設定をデフォルトにリセットします。 + +## タップランダムキー + +ランダムな文字をホストコンピュータに送信する場合は、`tap_random_base64()` 関数を使うことができます。これは[疑似乱数的に](https://en.wikipedia.org/wiki/Pseudorandom_number_generator)0から63の数字を選択し、その選択に基づいてキー押下を送信します。(0–25 は `A`–`Z`、26–51 は `a`–`z`、52–61 は `0`–`9`、62 は `+`、63 は `/`)。 + +?> 言うまでもないですが、これはランダムに Base64 キーあるいはパスワードを生成する暗号的に安全な方法では _ありません_。 + +## ソフトウェアタイマー + +タイマーを開始し、時間固有のイベントの値を読み取ることができます。以下は例です: + +```c +static uint16_t key_timer; +key_timer = timer_read(); + +if (timer_elapsed(key_timer) < 100) { + // 経過時間が 100ms 未満の場合に何かを行う +} else { + // 経過時間が 100ms 以上の場合に何かを行う +} +``` From 0bec817479aefd438ccd32b60f66087daa141e5c Mon Sep 17 00:00:00 2001 From: TheLibra23 <32517360+TheLibra23@users.noreply.github.com> Date: Tue, 1 Sep 2020 23:55:31 +0800 Subject: [PATCH 710/930] keebio/viterbi/rev2/: replaced change PRODUCT_ID (#10167) * replaced #define PRODUCT_ID 0x1157 with #define PRODUCT_ID 0x2157 replaced product id to distinguish rev2 from rev1. bakingpy gave me permission through discord chat. --- keyboards/keebio/viterbi/rev2/config.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/keyboards/keebio/viterbi/rev2/config.h b/keyboards/keebio/viterbi/rev2/config.h index 83de01f32f85..77751519228b 100644 --- a/keyboards/keebio/viterbi/rev2/config.h +++ b/keyboards/keebio/viterbi/rev2/config.h @@ -19,7 +19,7 @@ along with this program. If not, see . /* USB Device descriptor parameter */ #define VENDOR_ID 0xCB10 -#define PRODUCT_ID 0x1157 +#define PRODUCT_ID 0x2157 #define DEVICE_VER 0x0200 #define MANUFACTURER Keebio #define PRODUCT The Viterbi Keyboard From 744940bbd9ed0c346a3d9259422853b7e4c76a7d Mon Sep 17 00:00:00 2001 From: Josh Hinnebusch Date: Tue, 1 Sep 2020 12:05:03 -0400 Subject: [PATCH 711/930] hineybush/h88: update h88 LED stuff (#10101) * update h88.c * Update keyboards/hineybush/h88/h88.c --- keyboards/hineybush/h88/h88.c | 34 ++++++++++++++-------------------- 1 file changed, 14 insertions(+), 20 deletions(-) diff --git a/keyboards/hineybush/h88/h88.c b/keyboards/hineybush/h88/h88.c index 1f702e9e9dc5..adfb64bef192 100644 --- a/keyboards/hineybush/h88/h88.c +++ b/keyboards/hineybush/h88/h88.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,26 +43,19 @@ void led_set_kb(uint8_t usb_led) { led_set_user(usb_led); } -void led_init_ports(void) { - setPinOutput(D5); - setPinOutput(E6); +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 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); - } +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(); } - From 4889625015beadefa21d8131b0c5f2ddf899fba0 Mon Sep 17 00:00:00 2001 From: Bradford Date: Tue, 1 Sep 2020 12:09:24 -0400 Subject: [PATCH 712/930] bm60rgb: fixed LED layout; add underglow support (#10132) * Fixed the LED layout for the bm60rgb * Added underglow support --- keyboards/bm60rgb/bm60rgb.c | 36 ++++++++++++++++++++---------------- 1 file changed, 20 insertions(+), 16 deletions(-) diff --git a/keyboards/bm60rgb/bm60rgb.c b/keyboards/bm60rgb/bm60rgb.c index 3f301d1d475b..cbd020faf958 100644 --- a/keyboards/bm60rgb/bm60rgb.c +++ b/keyboards/bm60rgb/bm60rgb.c @@ -43,31 +43,35 @@ void led_set_kb(uint8_t 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} + { 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, NO_LED, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40 }, + { NO_LED, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53 }, + { 54, 55, 56, NO_LED, NO_LED, NO_LED, 57, NO_LED, NO_LED, 58, 59, 60, 61, 62 } }, { // 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 }, + { 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 }, + { 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 }, + { 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 } + { 3, 64 }, { 22, 64 }, { 33, 64 }, { 101, 64 }, { 135, 64 }, { 153, 64 }, { 195, 64 }, { 210, 64 }, { 225, 64 }, + // UNDERGLOW + { 216, 32 }, { 180, 32 }, { 144, 32 }, { 108, 32 }, { 72, 32 }, { 36, 32 } }, { // 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, + 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, + 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 + 1, 1, 1, 4, 1, 1, 1, 1, 1, + // UNDERGLOW + 2, 2, 2, 2, 2, 2 } }; From 32910738fda98f6a7e124ebb3596799d7f1d8dc8 Mon Sep 17 00:00:00 2001 From: Bradford Date: Tue, 1 Sep 2020 12:11:16 -0400 Subject: [PATCH 713/930] add bm60rgb:jbradforddillon keymap (#10133) * Added bm60rgb keymap * Fix copyright --- .../bm60rgb/keymaps/jbradforddillon/keymap.c | 41 +++++++++++++++++++ .../bm60rgb/keymaps/jbradforddillon/readme.md | 5 +++ 2 files changed, 46 insertions(+) create mode 100644 keyboards/bm60rgb/keymaps/jbradforddillon/keymap.c create mode 100644 keyboards/bm60rgb/keymaps/jbradforddillon/readme.md diff --git a/keyboards/bm60rgb/keymaps/jbradforddillon/keymap.c b/keyboards/bm60rgb/keymaps/jbradforddillon/keymap.c new file mode 100644 index 000000000000..c43365356e4a --- /dev/null +++ b/keyboards/bm60rgb/keymaps/jbradforddillon/keymap.c @@ -0,0 +1,41 @@ +/* Copyright 2020 jbradforddillon + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public 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_GRV, 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(1,KC_DEL), + KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, KC_RGUI, MO(2), 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, RGB_SPI, RGB_SPD, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + [2] = LAYOUT( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_VOLU, KC_MUTE, + _______, _______, _______, _______, _______, _______, KC_MPRV, KC_VOLD, KC_MNXT + ) + +}; diff --git a/keyboards/bm60rgb/keymaps/jbradforddillon/readme.md b/keyboards/bm60rgb/keymaps/jbradforddillon/readme.md new file mode 100644 index 000000000000..aa2009e1e87b --- /dev/null +++ b/keyboards/bm60rgb/keymaps/jbradforddillon/readme.md @@ -0,0 +1,5 @@ +I set this up the same way I set up my dz60 boards. +- Apple layout, +- Capslock replaced with grave/tilde, +- RShift doubles as forward slash, and +- Delete doubles as a layer shift. From 7fe01239ddfa87a0fe7ba26e659972f1040bffc6 Mon Sep 17 00:00:00 2001 From: Sendy YK Date: Tue, 1 Sep 2020 23:18:36 +0700 Subject: [PATCH 714/930] update ai03/soyuz:mrsendyyk keymap (#10161) Update ai03 Soyuz readme.md and keymap.c * Update readme.md * Update readme.md * Update keymap.c * Update keymap.c * Update readme.md * Update readme.md * Update readme.md * Update readme.md --- .../ai03/soyuz/keymaps/mrsendyyk/keymap.c | 25 ++++--------------- .../ai03/soyuz/keymaps/mrsendyyk/readme.md | 22 +++------------- 2 files changed, 9 insertions(+), 38 deletions(-) diff --git a/keyboards/ai03/soyuz/keymaps/mrsendyyk/keymap.c b/keyboards/ai03/soyuz/keymaps/mrsendyyk/keymap.c index f55f58a571ff..a1d2596a6ac7 100644 --- a/keyboards/ai03/soyuz/keymaps/mrsendyyk/keymap.c +++ b/keyboards/ai03/soyuz/keymaps/mrsendyyk/keymap.c @@ -1,24 +1,9 @@ #include QMK_KEYBOARD_H const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - - /*[0] - *┌───┬───┬───┬───┐ - *│N L│/ │* │- │ - *├───┼───┼───┼───┤ - *│7 │8 │9 │ │ - *├───┼───┼───┤+ │ - *│4 │5 │6 │ │ - *├───┼───┼───┼───┤ - *│1 │2 │3 │ │ - *├───┴───┼───┤Ent│ - *│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) + [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/ai03/soyuz/keymaps/mrsendyyk/readme.md b/keyboards/ai03/soyuz/keymaps/mrsendyyk/readme.md index 44db060bb769..e1f1b7ce36ee 100644 --- a/keyboards/ai03/soyuz/keymaps/mrsendyyk/readme.md +++ b/keyboards/ai03/soyuz/keymaps/mrsendyyk/readme.md @@ -1,25 +1,11 @@ -# [Sendy YK](https://mr.sendyyk.com)'s Keymap +# [Sendy YK's Keymap](https://github.com/mrsendyyk/my_qmk/tree/master/ai03_soyuz_numpad) -`LAYOUT_numpad_5x4` - -### [0] - -``` -┌───┬───┬───┬───┐ -│N L│/ │* │- │ -├───┼───┼───┼───┤ -│7 │8 │9 │ │ -├───┼───┼───┤+ │ -│4 │5 │6 │ │ -├───┼───┼───┼───┤ -│1 │2 │3 │ │ -├───┴───┼───┤Ent│ -│0 │. │ │ -└───────┴───┴───┘ -``` +![Default Layer [0]](https://raw.githubusercontent.com/mrsendyyk/my_qmk/master/ai03_soyuz_numpad/assets/ai03_soyuz_mrsendyyk.png) ## Build The Firmware You will need to build the firmware. To do so go to your terminal window and run the compile command: qmk compile -kb ai03/soyuz -km mrsendyyk + +See [The Complete Newbs Guide To QMK](https://docs.qmk.fm/#/newbs). From f145696dad27893b11213b314797711541431a9f Mon Sep 17 00:00:00 2001 From: MechMerlin <30334081+mechmerlin@users.noreply.github.com> Date: Tue, 1 Sep 2020 14:45:25 -0700 Subject: [PATCH 715/930] E85 Hotswap/Soldered Fixes (#10173) * split up the e85 into hotswap and soldered variants * remove layout_all LAYOUT macro for hotswap pcb * add copyright header to to all config files * remove list of alternate bootloaders * spruce up config file * comply with PR check list * Update keyboards/exclusive/e85/hotswap/info.json * Update keyboards/exclusive/e85/hotswap/info.json * Update keyboards/exclusive/e85/hotswap/info.json * Update keyboards/exclusive/e85/rules.mk * Update keyboards/exclusive/e85/config.h * Update keyboards/exclusive/e85/hotswap/config.h * Update keyboards/exclusive/e85/soldered/config.h * remove LAYOUT_all in hotswap and also remove superfluous comments * remove the soldered tsangan map --- keyboards/exclusive/e85/config.h | 3 - keyboards/exclusive/e85/hotswap/config.h | 18 ++ .../e85/{e85.c => hotswap/hotswap.c} | 2 +- keyboards/exclusive/e85/hotswap/hotswap.h | 63 ++++++ keyboards/exclusive/e85/hotswap/info.json | 193 ++++++++++++++++++ .../{ => hotswap}/keymaps/default/keymap.c | 0 .../{ => hotswap}/keymaps/standard/keymap.c | 0 .../{ => hotswap}/keymaps/tsangan/keymap.c | 0 .../e85/hotswap/keymaps/via/config.h | 17 ++ .../e85/{ => hotswap}/keymaps/via/keymap.c | 0 .../e85/{ => hotswap}/keymaps/via/rules.mk | 0 keyboards/exclusive/e85/hotswap/readme.md | 17 ++ keyboards/exclusive/e85/hotswap/rules.mk | 0 keyboards/exclusive/e85/keymaps/via/config.h | 1 - keyboards/exclusive/e85/readme.md | 9 +- keyboards/exclusive/e85/rules.mk | 13 +- keyboards/exclusive/e85/soldered/config.h | 18 ++ .../exclusive/e85/{ => soldered}/info.json | 0 .../e85/soldered/keymaps/default/keymap.c | 37 ++++ .../e85/soldered/keymaps/standard/keymap.c | 37 ++++ .../e85/soldered/keymaps/via/config.h | 17 ++ .../e85/soldered/keymaps/via/keymap.c | 45 ++++ .../e85/soldered/keymaps/via/rules.mk | 3 + keyboards/exclusive/e85/soldered/readme.md | 15 ++ keyboards/exclusive/e85/soldered/rules.mk | 0 keyboards/exclusive/e85/soldered/soldered.c | 17 ++ .../e85/{e85.h => soldered/soldered.h} | 17 +- 27 files changed, 512 insertions(+), 30 deletions(-) create mode 100644 keyboards/exclusive/e85/hotswap/config.h rename keyboards/exclusive/e85/{e85.c => hotswap/hotswap.c} (97%) create mode 100644 keyboards/exclusive/e85/hotswap/hotswap.h create mode 100644 keyboards/exclusive/e85/hotswap/info.json rename keyboards/exclusive/e85/{ => hotswap}/keymaps/default/keymap.c (100%) rename keyboards/exclusive/e85/{ => hotswap}/keymaps/standard/keymap.c (100%) rename keyboards/exclusive/e85/{ => hotswap}/keymaps/tsangan/keymap.c (100%) create mode 100644 keyboards/exclusive/e85/hotswap/keymaps/via/config.h rename keyboards/exclusive/e85/{ => hotswap}/keymaps/via/keymap.c (100%) rename keyboards/exclusive/e85/{ => hotswap}/keymaps/via/rules.mk (100%) create mode 100644 keyboards/exclusive/e85/hotswap/readme.md create mode 100644 keyboards/exclusive/e85/hotswap/rules.mk delete mode 100644 keyboards/exclusive/e85/keymaps/via/config.h create mode 100644 keyboards/exclusive/e85/soldered/config.h rename keyboards/exclusive/e85/{ => soldered}/info.json (100%) create mode 100644 keyboards/exclusive/e85/soldered/keymaps/default/keymap.c create mode 100644 keyboards/exclusive/e85/soldered/keymaps/standard/keymap.c create mode 100644 keyboards/exclusive/e85/soldered/keymaps/via/config.h create mode 100644 keyboards/exclusive/e85/soldered/keymaps/via/keymap.c create mode 100644 keyboards/exclusive/e85/soldered/keymaps/via/rules.mk create mode 100644 keyboards/exclusive/e85/soldered/readme.md create mode 100644 keyboards/exclusive/e85/soldered/rules.mk create mode 100644 keyboards/exclusive/e85/soldered/soldered.c rename keyboards/exclusive/e85/{e85.h => soldered/soldered.h} (90%) diff --git a/keyboards/exclusive/e85/config.h b/keyboards/exclusive/e85/config.h index d122c93619c3..758cd8b78c28 100644 --- a/keyboards/exclusive/e85/config.h +++ b/keyboards/exclusive/e85/config.h @@ -21,11 +21,8 @@ along with this program. If not, see . /* USB Device descriptor parameter */ #define VENDOR_ID 0x4558 // EX -#define PRODUCT_ID 0xE851 // E8.5 Version 1 #define DEVICE_VER 0x0001 #define MANUFACTURER Exclusive -#define PRODUCT E8.5 Hotswap PCB -#define DESCRIPTION A custom TKL keyboard /* key matrix size */ #define MATRIX_ROWS 11 diff --git a/keyboards/exclusive/e85/hotswap/config.h b/keyboards/exclusive/e85/hotswap/config.h new file mode 100644 index 000000000000..a0f957db87c9 --- /dev/null +++ b/keyboards/exclusive/e85/hotswap/config.h @@ -0,0 +1,18 @@ +/* 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 . + */ + +#define PRODUCT_ID 0xE851 // E8.5 Hotswap +#define PRODUCT E8.5 Hotswap PCB diff --git a/keyboards/exclusive/e85/e85.c b/keyboards/exclusive/e85/hotswap/hotswap.c similarity index 97% rename from keyboards/exclusive/e85/e85.c rename to keyboards/exclusive/e85/hotswap/hotswap.c index 20cd0e03f5f5..a5893e6bc50a 100644 --- a/keyboards/exclusive/e85/e85.c +++ b/keyboards/exclusive/e85/hotswap/hotswap.c @@ -14,4 +14,4 @@ * along with this program. If not, see . */ -#include "e85.h" +#include "hotswap.h" diff --git a/keyboards/exclusive/e85/hotswap/hotswap.h b/keyboards/exclusive/e85/hotswap/hotswap.h new file mode 100644 index 000000000000..377dd8ad5ae7 --- /dev/null +++ b/keyboards/exclusive/e85/hotswap/hotswap.h @@ -0,0 +1,63 @@ +/* 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 ___ KC_NO + +#define LAYOUT_ansi_standard( \ + K00, K01, K02, K03, K04, K05, K06, K07, K08, K68, K67, K65, K64, K63, K66, K62, K61, \ + K10, K11, K12, K13, K14, K15, K16, K17, K18, K78, K70, K77, K75, K73, K76, K72, K71, \ + K20, K21, K22, K23, K24, K25, K26, K27, K28, K88, K87, K85, K84, K83, K86, K82, K81, \ + K30, K31, K32, K33, K34, K35, K36, K37, K38, K98, K97, K95, K93, \ + K40, K42, K43, K44, K45, K46, K47, K48, KA8, KA7, KA5, KA4, K92, \ + K50, K51, K52, K56, K58, K57, K54, K53, KA6, KA2, KA1 \ +) { \ + { 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, KC_NO, K42, K43, K44, K45, K46, K47, K48 }, \ + { K50, K51, K52, K53, K54, KC_NO, K56, K57, K58 }, \ + { KC_NO, K61, K62, K63, K64, K65, K66, K67, K68 }, \ + { K70, K71, K72, K73, KC_NO, K75, K76, K77, K78 }, \ + { KC_NO, K81, K82, K83, K84, K85, K86, K87, K88 }, \ + { KC_NO, KC_NO, K92, K93, KC_NO, K95, KC_NO, K97, K98 }, \ + { KC_NO, KA1, KA2, KC_NO, KA4, KA5, KA6, KA7, KA8 }, \ +} + +#define LAYOUT_ansi_tsangan( \ + K00, K01, K02, K03, K04, K05, K06, K07, K08, K68, K67, K65, K64, K63, K66, K62, K61, \ + K10, K11, K12, K13, K14, K15, K16, K17, K18, K78, K70, K77, K75, K73, K76, K72, K71, \ + K20, K21, K22, K23, K24, K25, K26, K27, K28, K88, K87, K85, K84, K83, K86, K82, K81, \ + K30, K31, K32, K33, K34, K35, K36, K37, K38, K98, K97, K95, K93, \ + K40, K42, K43, K44, K45, K46, K47, K48, KA8, KA7, KA5, KA4, K92, \ + K50, K51, K52, K56, K57, K54, K53, KA6, KA2, KA1 \ +) { \ + { 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, KC_NO, K42, K43, K44, K45, K46, K47, K48 }, \ + { K50, K51, K52, K53, K54, KC_NO, K56, K57, KC_NO }, \ + { KC_NO, K61, K62, K63, K64, K65, K66, K67, K68 }, \ + { K70, K71, K72, K73, KC_NO, K75, K76, K77, K78 }, \ + { KC_NO, K81, K82, K83, K84, K85, K86, K87, K88 }, \ + { KC_NO, KC_NO, K92, K93, KC_NO, K95, KC_NO, K97, K98 }, \ + { KC_NO, KA1, KA2, KC_NO, KA4, KA5, KA6, KA7, KA8 }, \ +} diff --git a/keyboards/exclusive/e85/hotswap/info.json b/keyboards/exclusive/e85/hotswap/info.json new file mode 100644 index 000000000000..e939d4c8b4e4 --- /dev/null +++ b/keyboards/exclusive/e85/hotswap/info.json @@ -0,0 +1,193 @@ +{ + "keyboard_name": "Exclusive E8.5 TKL", + "url": "", + "maintainer": "qmk", + "width": 18.25, + "height": 6.5, + "layouts": { + "LAYOUT_ansi_standard": { + "layout": [ + {"label":"K00 (E6,D0)", "x":0, "y":0}, + {"label":"K01 (E6,D1)", "x":1.25, "y":0}, + {"label":"K02 (E6,D2)", "x":2.25, "y":0}, + {"label":"K03 (E6,D3)", "x":3.25, "y":0}, + {"label":"K04 (E6,D5)", "x":4.25, "y":0}, + {"label":"K05 (E6,D4)", "x":5.5, "y":0}, + {"label":"K06 (E6,D6)", "x":6.5, "y":0}, + {"label":"K07 (E6,D7)", "x":7.5, "y":0}, + {"label":"K08 (E6,B4)", "x":8.5, "y":0}, + {"label":"K68 (F7,B4)", "x":9.75, "y":0}, + {"label":"K67 (F7,D7)", "x":10.75, "y":0}, + {"label":"K65 (F7,D4)", "x":11.75, "y":0}, + {"label":"K64 (F7,D5)", "x":12.75, "y":0}, + {"label":"K63 (F7,D3)", "x":14, "y":0}, + {"label":"K66 (F7,D6)", "x":15.25, "y":0}, + {"label":"K62 (F7,D2)", "x":16.25, "y":0}, + {"label":"K61 (F7,D1)", "x":17.25, "y":0}, + {"label":"K10 (B0,D0)", "x":0, "y":1.5}, + {"label":"K11 (B0,D1)", "x":1, "y":1.5}, + {"label":"K12 (B0,D2)", "x":2, "y":1.5}, + {"label":"K13 (B0,D3)", "x":3, "y":1.5}, + {"label":"K14 (B0,D5)", "x":4, "y":1.5}, + {"label":"K15 (B0,D4)", "x":5, "y":1.5}, + {"label":"K16 (B0,D6)", "x":6, "y":1.5}, + {"label":"K17 (B0,D7)", "x":7, "y":1.5}, + {"label":"K18 (B0,B4)", "x":8, "y":1.5}, + {"label":"K78 (F6,B4)", "x":9, "y":1.5}, + {"label":"K70 (F6,D0)", "x":10, "y":1.5}, + {"label":"K77 (F6,D7)", "x":11, "y":1.5}, + {"label":"K75 (F6,D4)", "x":12, "y":1.5}, + {"label":"K73 (F6,D3)", "x":13, "y":1.5, "w":2}, + {"label":"K76 (F6,D6)", "x":15.25, "y":1.5}, + {"label":"K72 (F6,D2)", "x":16.25, "y":1.5}, + {"label":"K71 (F6,D1)", "x":17.25, "y":1.5}, + {"label":"K20 (B1,D0)", "x":0, "y":2.5, "w":1.5}, + {"label":"K21 (B1,D1)", "x":1.5, "y":2.5}, + {"label":"K22 (B1,D2)", "x":2.5, "y":2.5}, + {"label":"K23 (B1,D3)", "x":3.5, "y":2.5}, + {"label":"K24 (B1,D5)", "x":4.5, "y":2.5}, + {"label":"K25 (B1,D4)", "x":5.5, "y":2.5}, + {"label":"K26 (B1,D6)", "x":6.5, "y":2.5}, + {"label":"K27 (B1,D7)", "x":7.5, "y":2.5}, + {"label":"K28 (B1,B4)", "x":8.5, "y":2.5}, + {"label":"K88 (F5,B4)", "x":9.5, "y":2.5}, + {"label":"K87 (F5,D7)", "x":10.5, "y":2.5}, + {"label":"K85 (F5,D4)", "x":11.5, "y":2.5}, + {"label":"K84 (F5,D5)", "x":12.5, "y":2.5}, + {"label":"K83 (F5,D3)", "x":13.5, "y":2.5, "w":1.5}, + {"label":"K86 (F5,D6)", "x":15.25, "y":2.5}, + {"label":"K82 (F5,D2)", "x":16.25, "y":2.5}, + {"label":"K81 (F5,D1)", "x":17.25, "y":2.5}, + {"label":"K30 (B2,D0)", "x":0, "y":3.5, "w":1.75}, + {"label":"K31 (B2,D1)", "x":1.75, "y":3.5}, + {"label":"K32 (B2,D2)", "x":2.75, "y":3.5}, + {"label":"K33 (B2,D3)", "x":3.75, "y":3.5}, + {"label":"K34 (B2,D5)", "x":4.75, "y":3.5}, + {"label":"K35 (B2,D4)", "x":5.75, "y":3.5}, + {"label":"K36 (B2,D6)", "x":6.75, "y":3.5}, + {"label":"K37 (B2,D7)", "x":7.75, "y":3.5}, + {"label":"K38 (B2,B4)", "x":8.75, "y":3.5}, + {"label":"K98 (F4,B4)", "x":9.75, "y":3.5}, + {"label":"K97 (F4,D7)", "x":10.75, "y":3.5}, + {"label":"K95 (F4,D4)", "x":11.75, "y":3.5}, + {"label":"K93 (F4,D3)", "x":12.75, "y":3.5, "w":2.25}, + {"label":"K40 (B3,D0)", "x":0, "y":4.5, "w":2.25}, + {"label":"K42 (B3,D2)", "x":2.25, "y":4.5}, + {"label":"K43 (B3,D3)", "x":3.25, "y":4.5}, + {"label":"K44 (B3,D5)", "x":4.25, "y":4.5}, + {"label":"K45 (B3,D4)", "x":5.25, "y":4.5}, + {"label":"K46 (B3,D6)", "x":6.25, "y":4.5}, + {"label":"K47 (B3,D7)", "x":7.25, "y":4.5}, + {"label":"K48 (B3,B4)", "x":8.25, "y":4.5}, + {"label":"KA8 (F1,B4)", "x":9.25, "y":4.5}, + {"label":"KA7 (F1,D7)", "x":10.25, "y":4.5}, + {"label":"KA5 (F1,D4)", "x":11.25, "y":4.5}, + {"label":"KA4 (F1,D5)", "x":12.25, "y":4.5, "w":2.75}, + {"label":"K92 (F4,D2)", "x":16.25, "y":4.5}, + {"label":"K50 (B7,D0)", "x":0, "y":5.5, "w":1.25}, + {"label":"K51 (B7,D1)", "x":1.25, "y":5.5, "w":1.25}, + {"label":"K52 (B7,D2)", "x":2.5, "y":5.5, "w":1.25}, + {"label":"K56 (B7,D6)", "x":3.75, "y":5.5, "w":6.25}, + {"label":"K58 (B7,B4)", "x":10, "y":5.5, "w":1.25}, + {"label":"K57 (B7,D7)", "x":11.25, "y":5.5, "w":1.25}, + {"label":"K54 (B7,D5)", "x":12.5, "y":5.5, "w":1.25}, + {"label":"K53 (B7,D3)", "x":13.75, "y":5.5, "w":1.25}, + {"label":"KA6 (F1,D6)", "x":15.25, "y":5.5}, + {"label":"KA2 (F1,D2)", "x":16.25, "y":5.5}, + {"label":"KA1 (F1,D1)", "x":17.25, "y":5.5} + ] + }, + + "LAYOUT_ansi_tsangan": { + "layout": [ + {"label":"K00 (E6,D0)", "x":0, "y":0}, + {"label":"K01 (E6,D1)", "x":1.25, "y":0}, + {"label":"K02 (E6,D2)", "x":2.25, "y":0}, + {"label":"K03 (E6,D3)", "x":3.25, "y":0}, + {"label":"K04 (E6,D5)", "x":4.25, "y":0}, + {"label":"K05 (E6,D4)", "x":5.5, "y":0}, + {"label":"K06 (E6,D6)", "x":6.5, "y":0}, + {"label":"K07 (E6,D7)", "x":7.5, "y":0}, + {"label":"K08 (E6,B4)", "x":8.5, "y":0}, + {"label":"K68 (F7,B4)", "x":9.75, "y":0}, + {"label":"K67 (F7,D7)", "x":10.75, "y":0}, + {"label":"K65 (F7,D4)", "x":11.75, "y":0}, + {"label":"K64 (F7,D5)", "x":12.75, "y":0}, + {"label":"K63 (F7,D3)", "x":14, "y":0}, + {"label":"K66 (F7,D6)", "x":15.25, "y":0}, + {"label":"K62 (F7,D2)", "x":16.25, "y":0}, + {"label":"K61 (F7,D1)", "x":17.25, "y":0}, + {"label":"K10 (B0,D0)", "x":0, "y":1.5}, + {"label":"K11 (B0,D1)", "x":1, "y":1.5}, + {"label":"K12 (B0,D2)", "x":2, "y":1.5}, + {"label":"K13 (B0,D3)", "x":3, "y":1.5}, + {"label":"K14 (B0,D5)", "x":4, "y":1.5}, + {"label":"K15 (B0,D4)", "x":5, "y":1.5}, + {"label":"K16 (B0,D6)", "x":6, "y":1.5}, + {"label":"K17 (B0,D7)", "x":7, "y":1.5}, + {"label":"K18 (B0,B4)", "x":8, "y":1.5}, + {"label":"K78 (F6,B4)", "x":9, "y":1.5}, + {"label":"K70 (F6,D0)", "x":10, "y":1.5}, + {"label":"K77 (F6,D7)", "x":11, "y":1.5}, + {"label":"K75 (F6,D4)", "x":12, "y":1.5}, + {"label":"K73 (F6,D3)", "x":13, "y":1.5, "w":2}, + {"label":"K76 (F6,D6)", "x":15.25, "y":1.5}, + {"label":"K72 (F6,D2)", "x":16.25, "y":1.5}, + {"label":"K71 (F6,D1)", "x":17.25, "y":1.5}, + {"label":"K20 (B1,D0)", "x":0, "y":2.5, "w":1.5}, + {"label":"K21 (B1,D1)", "x":1.5, "y":2.5}, + {"label":"K22 (B1,D2)", "x":2.5, "y":2.5}, + {"label":"K23 (B1,D3)", "x":3.5, "y":2.5}, + {"label":"K24 (B1,D5)", "x":4.5, "y":2.5}, + {"label":"K25 (B1,D4)", "x":5.5, "y":2.5}, + {"label":"K26 (B1,D6)", "x":6.5, "y":2.5}, + {"label":"K27 (B1,D7)", "x":7.5, "y":2.5}, + {"label":"K28 (B1,B4)", "x":8.5, "y":2.5}, + {"label":"K88 (F5,B4)", "x":9.5, "y":2.5}, + {"label":"K87 (F5,D7)", "x":10.5, "y":2.5}, + {"label":"K85 (F5,D4)", "x":11.5, "y":2.5}, + {"label":"K84 (F5,D5)", "x":12.5, "y":2.5}, + {"label":"K83 (F5,D3)", "x":13.5, "y":2.5, "w":1.5}, + {"label":"K86 (F5,D6)", "x":15.25, "y":2.5}, + {"label":"K82 (F5,D2)", "x":16.25, "y":2.5}, + {"label":"K81 (F5,D1)", "x":17.25, "y":2.5}, + {"label":"K30 (B2,D0)", "x":0, "y":3.5, "w":1.75}, + {"label":"K31 (B2,D1)", "x":1.75, "y":3.5}, + {"label":"K32 (B2,D2)", "x":2.75, "y":3.5}, + {"label":"K33 (B2,D3)", "x":3.75, "y":3.5}, + {"label":"K34 (B2,D5)", "x":4.75, "y":3.5}, + {"label":"K35 (B2,D4)", "x":5.75, "y":3.5}, + {"label":"K36 (B2,D6)", "x":6.75, "y":3.5}, + {"label":"K37 (B2,D7)", "x":7.75, "y":3.5}, + {"label":"K38 (B2,B4)", "x":8.75, "y":3.5}, + {"label":"K98 (F4,B4)", "x":9.75, "y":3.5}, + {"label":"K97 (F4,D7)", "x":10.75, "y":3.5}, + {"label":"K95 (F4,D4)", "x":11.75, "y":3.5}, + {"label":"K93 (F4,D3)", "x":12.75, "y":3.5, "w":2.25}, + {"label":"K40 (B3,D0)", "x":0, "y":4.5, "w":2.25}, + {"label":"K42 (B3,D2)", "x":2.25, "y":4.5}, + {"label":"K43 (B3,D3)", "x":3.25, "y":4.5}, + {"label":"K44 (B3,D5)", "x":4.25, "y":4.5}, + {"label":"K45 (B3,D4)", "x":5.25, "y":4.5}, + {"label":"K46 (B3,D6)", "x":6.25, "y":4.5}, + {"label":"K47 (B3,D7)", "x":7.25, "y":4.5}, + {"label":"K48 (B3,B4)", "x":8.25, "y":4.5}, + {"label":"KA8 (F1,B4)", "x":9.25, "y":4.5}, + {"label":"KA7 (F1,D7)", "x":10.25, "y":4.5}, + {"label":"KA5 (F1,D4)", "x":11.25, "y":4.5}, + {"label":"KA4 (F1,D5)", "x":12.25, "y":4.5, "w":2.75}, + {"label":"K92 (F4,D2)", "x":16.25, "y":4.5}, + {"label":"K50 (B7,D0)", "x":0, "y":5.5, "w":1.5}, + {"label":"K51 (B7,D1)", "x":1.5, "y":5.5}, + {"label":"K52 (B7,D2)", "x":2.5, "y":5.5, "w":1.5}, + {"label":"K56 (B7,D6)", "x":4, "y":5.5, "w":7}, + {"label":"K57 (B7,D7)", "x":11, "y":5.5, "w":1.5}, + {"label":"K54 (B7,D5)", "x":12.5, "y":5.5}, + {"label":"K53 (B7,D3)", "x":13.5, "y":5.5, "w":1.5}, + {"label":"KA6 (F1,D6)", "x":15.25, "y":5.5}, + {"label":"KA2 (F1,D2)", "x":16.25, "y":5.5}, + {"label":"KA1 (F1,D1)", "x":17.25, "y":5.5} + ] + } + } +} diff --git a/keyboards/exclusive/e85/keymaps/default/keymap.c b/keyboards/exclusive/e85/hotswap/keymaps/default/keymap.c similarity index 100% rename from keyboards/exclusive/e85/keymaps/default/keymap.c rename to keyboards/exclusive/e85/hotswap/keymaps/default/keymap.c diff --git a/keyboards/exclusive/e85/keymaps/standard/keymap.c b/keyboards/exclusive/e85/hotswap/keymaps/standard/keymap.c similarity index 100% rename from keyboards/exclusive/e85/keymaps/standard/keymap.c rename to keyboards/exclusive/e85/hotswap/keymaps/standard/keymap.c diff --git a/keyboards/exclusive/e85/keymaps/tsangan/keymap.c b/keyboards/exclusive/e85/hotswap/keymaps/tsangan/keymap.c similarity index 100% rename from keyboards/exclusive/e85/keymaps/tsangan/keymap.c rename to keyboards/exclusive/e85/hotswap/keymaps/tsangan/keymap.c diff --git a/keyboards/exclusive/e85/hotswap/keymaps/via/config.h b/keyboards/exclusive/e85/hotswap/keymaps/via/config.h new file mode 100644 index 000000000000..7580d4a60ea3 --- /dev/null +++ b/keyboards/exclusive/e85/hotswap/keymaps/via/config.h @@ -0,0 +1,17 @@ + /* 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 . + */ + + #define DYNAMIC_KEYMAP_LAYER_COUNT 3 \ No newline at end of file diff --git a/keyboards/exclusive/e85/keymaps/via/keymap.c b/keyboards/exclusive/e85/hotswap/keymaps/via/keymap.c similarity index 100% rename from keyboards/exclusive/e85/keymaps/via/keymap.c rename to keyboards/exclusive/e85/hotswap/keymaps/via/keymap.c diff --git a/keyboards/exclusive/e85/keymaps/via/rules.mk b/keyboards/exclusive/e85/hotswap/keymaps/via/rules.mk similarity index 100% rename from keyboards/exclusive/e85/keymaps/via/rules.mk rename to keyboards/exclusive/e85/hotswap/keymaps/via/rules.mk diff --git a/keyboards/exclusive/e85/hotswap/readme.md b/keyboards/exclusive/e85/hotswap/readme.md new file mode 100644 index 000000000000..87792b607d9d --- /dev/null +++ b/keyboards/exclusive/e85/hotswap/readme.md @@ -0,0 +1,17 @@ +# Exclusive E8.5 Hotswap + +Hotswap PCB for Exclusive E8.5. + +Switch Matrix is identical between the standard and tsangan variants. Please select the correct layout. + +* Keyboard Maintainer: [MechMerlin](https://github.com/mechmerlin) +* Hardware Supported: E8.5 Hotswap, atmega32u4 +* Hardware Availability: [Geekhack GB](https://geekhack.org/index.php?topic=103520) + +Make example for this keyboard (after setting up your build environment): + + make exclusive/e85/hotswap:default + +**Reset Key**: The board can be reset by shorting the two holes underneath the PCB, or pressing the reset button on the reverse side. + +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/e85/hotswap/rules.mk b/keyboards/exclusive/e85/hotswap/rules.mk new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/keyboards/exclusive/e85/keymaps/via/config.h b/keyboards/exclusive/e85/keymaps/via/config.h deleted file mode 100644 index 78f3f6a69656..000000000000 --- a/keyboards/exclusive/e85/keymaps/via/config.h +++ /dev/null @@ -1 +0,0 @@ - #define DYNAMIC_KEYMAP_LAYER_COUNT 3 \ No newline at end of file diff --git a/keyboards/exclusive/e85/readme.md b/keyboards/exclusive/e85/readme.md index fe5af17de8d6..4ee2f8d0b2a0 100644 --- a/keyboards/exclusive/e85/readme.md +++ b/keyboards/exclusive/e85/readme.md @@ -1,16 +1,15 @@ # Exclusive E8.5 Hotswap -Custom hotswap PCB for Exclusive E8.5. +Custom PCBs for Exclusive E8.5. -The switch matrix is identical between all three PCB variants of this board. Choose the correct LAYOUT that best matches the physical LAYOUT of your PCB. - -* Keyboard Maintainer: [MechMerlin](https://github.com/mechmerlin) +* Keyboard Maintainer: [MechMerlin](https://github.com/mechmerlin), [rebeccaby](https://github.com/rebeccaby) * Hardware Supported: E8.5 Hotswap/Soldered, atmega32u4 * Hardware Availability: [Geekhack GB](https://geekhack.org/index.php?topic=103520) Make example for this keyboard (after setting up your build environment): - make exclusive/e85:default + make exclusive/e85/hotswap:default + make exclusive/e85/soldered:default **Reset Key**: The board can be reset by shorting the two holes underneath the PCB, or pressing the reset button on the reverse side. diff --git a/keyboards/exclusive/e85/rules.mk b/keyboards/exclusive/e85/rules.mk index e9c1ed8f1f89..ebbb95723563 100644 --- a/keyboards/exclusive/e85/rules.mk +++ b/keyboards/exclusive/e85/rules.mk @@ -2,13 +2,6 @@ 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 @@ -25,8 +18,8 @@ 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 -BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +BLUETOOTH_ENABLE = no # Enable Bluetooth AUDIO_ENABLE = no # Audio output -FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches LTO_ENABLE = yes + +DEFAULT_FOLDER = exclusive/e85/hotswap diff --git a/keyboards/exclusive/e85/soldered/config.h b/keyboards/exclusive/e85/soldered/config.h new file mode 100644 index 000000000000..c76fcf8074f2 --- /dev/null +++ b/keyboards/exclusive/e85/soldered/config.h @@ -0,0 +1,18 @@ +/* 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 . + */ + +#define PRODUCT_ID 0xE852 // E8.5 Soldered +#define PRODUCT E8.5 Soldered PCB diff --git a/keyboards/exclusive/e85/info.json b/keyboards/exclusive/e85/soldered/info.json similarity index 100% rename from keyboards/exclusive/e85/info.json rename to keyboards/exclusive/e85/soldered/info.json diff --git a/keyboards/exclusive/e85/soldered/keymaps/default/keymap.c b/keyboards/exclusive/e85/soldered/keymaps/default/keymap.c new file mode 100644 index 000000000000..80f8e0eeb4b4 --- /dev/null +++ b/keyboards/exclusive/e85/soldered/keymaps/default/keymap.c @@ -0,0 +1,37 @@ +/* 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_ansi_tsangan( + 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, MO(1), 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_RCTL, KC_LEFT, KC_DOWN, KC_RGHT + ), + + [1] = LAYOUT_ansi_tsangan( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + RGB_MOD, RGB_TOG, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + BL_TOGG, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + +}; diff --git a/keyboards/exclusive/e85/soldered/keymaps/standard/keymap.c b/keyboards/exclusive/e85/soldered/keymaps/standard/keymap.c new file mode 100644 index 000000000000..c6778180be1a --- /dev/null +++ b/keyboards/exclusive/e85/soldered/keymaps/standard/keymap.c @@ -0,0 +1,37 @@ +/* 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_ansi_standard( + 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, MO(1), 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_APP, KC_RGUI, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT + ), + + [1] = LAYOUT_ansi_standard( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + RGB_MOD, RGB_TOG, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + BL_TOGG, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + +}; diff --git a/keyboards/exclusive/e85/soldered/keymaps/via/config.h b/keyboards/exclusive/e85/soldered/keymaps/via/config.h new file mode 100644 index 000000000000..2de716b720b7 --- /dev/null +++ b/keyboards/exclusive/e85/soldered/keymaps/via/config.h @@ -0,0 +1,17 @@ + /* 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 . + */ + + #define DYNAMIC_KEYMAP_LAYER_COUNT 3 \ No newline at end of file diff --git a/keyboards/exclusive/e85/soldered/keymaps/via/keymap.c b/keyboards/exclusive/e85/soldered/keymaps/via/keymap.c new file mode 100644 index 000000000000..c55c35ce192f --- /dev/null +++ b/keyboards/exclusive/e85/soldered/keymaps/via/keymap.c @@ -0,0 +1,45 @@ +/* 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_ansi_tsangan( + 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, MO(1), 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_RCTL, KC_LEFT, KC_DOWN, KC_RGHT + ), + + [1] = LAYOUT_ansi_tsangan( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + RGB_MOD, RGB_TOG, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + BL_TOGG, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + + [2] = LAYOUT_ansi_tsangan( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), +}; diff --git a/keyboards/exclusive/e85/soldered/keymaps/via/rules.mk b/keyboards/exclusive/e85/soldered/keymaps/via/rules.mk new file mode 100644 index 000000000000..29a6f75191f0 --- /dev/null +++ b/keyboards/exclusive/e85/soldered/keymaps/via/rules.mk @@ -0,0 +1,3 @@ +VIA_ENABLE = yes +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = no # Commands for debug and configuration \ No newline at end of file diff --git a/keyboards/exclusive/e85/soldered/readme.md b/keyboards/exclusive/e85/soldered/readme.md new file mode 100644 index 000000000000..292efe0ff34c --- /dev/null +++ b/keyboards/exclusive/e85/soldered/readme.md @@ -0,0 +1,15 @@ +# Exclusive E8.5 Soldered + +Soldered PCB for Exclusive E8.5. + +* Keyboard Maintainer: [MechMerlin](https://github.com/mechmerlin), [rebeccaby](https://github.com/rebeccaby) +* Hardware Supported: E8.5 Soldered, atmega32u4 +* Hardware Availability: [Geekhack GB](https://geekhack.org/index.php?topic=103520) + +Make example for this keyboard (after setting up your build environment): + + make exclusive/e85/soldered:default + +**Reset Key**: The board can be reset by shorting the two holes underneath the PCB, or pressing the reset button on the reverse side. + +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/e85/soldered/rules.mk b/keyboards/exclusive/e85/soldered/rules.mk new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/keyboards/exclusive/e85/soldered/soldered.c b/keyboards/exclusive/e85/soldered/soldered.c new file mode 100644 index 000000000000..e01221a2c5bb --- /dev/null +++ b/keyboards/exclusive/e85/soldered/soldered.c @@ -0,0 +1,17 @@ +/* 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 "soldered.h" diff --git a/keyboards/exclusive/e85/e85.h b/keyboards/exclusive/e85/soldered/soldered.h similarity index 90% rename from keyboards/exclusive/e85/e85.h rename to keyboards/exclusive/e85/soldered/soldered.h index 19b2dff5507d..c14b9c39e6f7 100644 --- a/keyboards/exclusive/e85/e85.h +++ b/keyboards/exclusive/e85/soldered/soldered.h @@ -20,7 +20,6 @@ #define ___ KC_NO -// This is the layout for the soldered PCB #define LAYOUT_all( \ K00, K01, K02, K03, K04, K05, K06, K07, K08, K68, K67, K65, K64, K63, K66, K62, K61, \ K10, K11, K12, K13, K14, K15, K16, K17, K18, K78, K70, K77, K75, K74, K73, K76, K72, K71, \ @@ -42,12 +41,11 @@ { KC_NO, KA1, KA2, KA3, KA4, KA5, KA6, KA7, KA8 }, \ } -// This is the layout for one hotswap PCB and can also be used on the soldered edition #define LAYOUT_ansi_standard( \ K00, K01, K02, K03, K04, K05, K06, K07, K08, K68, K67, K65, K64, K63, K66, K62, K61, \ K10, K11, K12, K13, K14, K15, K16, K17, K18, K78, K70, K77, K75, K73, K76, K72, K71, \ - K20, K21, K22, K23, K24, K25, K26, K27, K28, K88, K87, K85, K84, K83, K86, K82, K81, \ - K30, K31, K32, K33, K34, K35, K36, K37, K38, K98, K97, K95, K93, \ + K20, K21, K22, K23, K24, K25, K26, K27, K28, K88, K87, K85, K84, K94, K86, K82, K81, \ + K30, K31, K32, K33, K34, K35, K36, K37, K38, K98, K97, K95, K83, \ K40, K42, K43, K44, K45, K46, K47, K48, KA8, KA7, KA5, KA4, K92, \ K50, K51, K52, K56, K58, K57, K54, K53, KA6, KA2, KA1 \ ) { \ @@ -60,16 +58,15 @@ { KC_NO, K61, K62, K63, K64, K65, K66, K67, K68 }, \ { K70, K71, K72, K73, KC_NO, K75, K76, K77, K78 }, \ { KC_NO, K81, K82, K83, K84, K85, K86, K87, K88 }, \ - { KC_NO, KC_NO, K92, K93, KC_NO, K95, KC_NO, K97, K98 }, \ + { KC_NO, KC_NO, K92, KC_NO, K94, K95, KC_NO, K97, K98 }, \ { KC_NO, KA1, KA2, KC_NO, KA4, KA5, KA6, KA7, KA8 }, \ } -// This is the layout for one hotswap PCB and can also be used on the soldered edition #define LAYOUT_ansi_tsangan( \ K00, K01, K02, K03, K04, K05, K06, K07, K08, K68, K67, K65, K64, K63, K66, K62, K61, \ K10, K11, K12, K13, K14, K15, K16, K17, K18, K78, K70, K77, K75, K73, K76, K72, K71, \ - K20, K21, K22, K23, K24, K25, K26, K27, K28, K88, K87, K85, K84, K83, K86, K82, K81, \ - K30, K31, K32, K33, K34, K35, K36, K37, K38, K98, K97, K95, K93, \ + K20, K21, K22, K23, K24, K25, K26, K27, K28, K88, K87, K85, K84, K94, K86, K82, K81, \ + K30, K31, K32, K33, K34, K35, K36, K37, K38, K98, K97, K95, K83, \ K40, K42, K43, K44, K45, K46, K47, K48, KA8, KA7, KA5, KA4, K92, \ K50, K51, K52, K56, K57, K54, K53, KA6, KA2, KA1 \ ) { \ @@ -82,6 +79,6 @@ { KC_NO, K61, K62, K63, K64, K65, K66, K67, K68 }, \ { K70, K71, K72, K73, KC_NO, K75, K76, K77, K78 }, \ { KC_NO, K81, K82, K83, K84, K85, K86, K87, K88 }, \ - { KC_NO, KC_NO, K92, K93, KC_NO, K95, KC_NO, K97, K98 }, \ - { KC_NO, KA1, KA2, KC_NO, KA4, KA5, KA6, KA7, KA8 }, \ + { KC_NO, KC_NO, K92, KC_NO, K94, K95, KC_NO, K97, K98 }, \ + { KC_NO, KA1, KA2, KC_NO, KA4, KA5, KA6, KA7, KA8 }, \ } From 58600d3f651706242df1ecf0ef7c71f0d6a8965f Mon Sep 17 00:00:00 2001 From: Salicylic-acid3 <46864619+Salicylic-acid3@users.noreply.github.com> Date: Wed, 2 Sep 2020 09:28:55 +0900 Subject: [PATCH 716/930] (setta21 & getta25) Keymaps Update (#10170) OLED is turned off by default. --- keyboards/getta25/keymaps/oled/rules.mk | 1 + keyboards/getta25/rules.mk | 2 +- keyboards/setta21/keymaps/salicylic/rules.mk | 2 +- keyboards/setta21/rules.mk | 2 +- 4 files changed, 4 insertions(+), 3 deletions(-) create mode 100644 keyboards/getta25/keymaps/oled/rules.mk diff --git a/keyboards/getta25/keymaps/oled/rules.mk b/keyboards/getta25/keymaps/oled/rules.mk new file mode 100644 index 000000000000..c582662134c4 --- /dev/null +++ b/keyboards/getta25/keymaps/oled/rules.mk @@ -0,0 +1 @@ +OLED_DRIVER_ENABLE = yes diff --git a/keyboards/getta25/rules.mk b/keyboards/getta25/rules.mk index 65aca76133c7..fdb399da288e 100644 --- a/keyboards/getta25/rules.mk +++ b/keyboards/getta25/rules.mk @@ -26,7 +26,7 @@ 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 +OLED_DRIVER_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/setta21/keymaps/salicylic/rules.mk b/keyboards/setta21/keymaps/salicylic/rules.mk index be8d10c9a64a..6e59dde1c130 100644 --- a/keyboards/setta21/keymaps/salicylic/rules.mk +++ b/keyboards/setta21/keymaps/salicylic/rules.mk @@ -1,3 +1,3 @@ RGBLIGHT_ENABLE = no RGB_MATRIX_ENABLE = WS2812 - +OLED_DRIVER_ENABLE = yes diff --git a/keyboards/setta21/rules.mk b/keyboards/setta21/rules.mk index f9c410634347..8eae05c6164c 100644 --- a/keyboards/setta21/rules.mk +++ b/keyboards/setta21/rules.mk @@ -27,7 +27,7 @@ UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. TAP_DANCE_ENABLE = no -OLED_DRIVER_ENABLE = yes +OLED_DRIVER_ENABLE = no USE_I2C = 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 From 825ef0bd963a031281748089ea1d603d8963111b Mon Sep 17 00:00:00 2001 From: Blake Date: Wed, 2 Sep 2020 01:31:34 +0100 Subject: [PATCH 717/930] add keebio/bdn9:ghostseven keymap (#10154) Keebio BDN9 Additional Keymap - Rev Encoders --- .../keebio/bdn9/keymaps/ghostseven/config.h | 20 ++++++ .../keebio/bdn9/keymaps/ghostseven/keymap.c | 70 +++++++++++++++++++ 2 files changed, 90 insertions(+) create mode 100644 keyboards/keebio/bdn9/keymaps/ghostseven/config.h create mode 100644 keyboards/keebio/bdn9/keymaps/ghostseven/keymap.c diff --git a/keyboards/keebio/bdn9/keymaps/ghostseven/config.h b/keyboards/keebio/bdn9/keymaps/ghostseven/config.h new file mode 100644 index 000000000000..6df867d57572 --- /dev/null +++ b/keyboards/keebio/bdn9/keymaps/ghostseven/config.h @@ -0,0 +1,20 @@ +/* Copyright 2020 GhostSeven + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#pragma once + +#ifdef RGB_MATRIX_ENABLE +# define RGB_MATRIX_KEYPRESSES +#endif diff --git a/keyboards/keebio/bdn9/keymaps/ghostseven/keymap.c b/keyboards/keebio/bdn9/keymaps/ghostseven/keymap.c new file mode 100644 index 000000000000..445e6e896a63 --- /dev/null +++ b/keyboards/keebio/bdn9/keymaps/ghostseven/keymap.c @@ -0,0 +1,70 @@ +/* Copyright 2020 GhostSeven + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public 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 encoder_names { + _LEFT, + _RIGHT, + _MIDDLE, +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* + | Knob 1: Vol Dn/Up | | Knob 2: Page Dn/Up | + | Press: Mute | Home | Press: Play/Pause | + | Hold: Layer 2 | Up | Enter | + | Left | Down | Right | + */ + [0] = LAYOUT( + KC_MUTE, KC_HOME, KC_MPLY, + MO(1) , KC_UP , KC_ENT, + KC_LEFT, KC_DOWN, KC_RGHT + ), + /* + | RESET | Shift+CMD+B (Build VS Code) | Media Stop | + | Held: Layer 2 | Home | RGB Mode | + | Media Previous | End | Media Next | + */ + [1] = LAYOUT( + RESET , S(G(KC_B)), KC_STOP, + _______, KC_HOME, RGB_MOD, + KC_MPRV, KC_END , KC_MNXT + ), +}; + +void encoder_update_user(uint8_t index, bool clockwise) { + if (index == _LEFT) { + if (clockwise) { + tap_code(KC_VOLD); + } else { + tap_code(KC_VOLU); + } + } + else if (index == _MIDDLE) { + if (clockwise) { + tap_code(KC_UP); + } else { + tap_code(KC_DOWN); + } + } + else if (index == _RIGHT) { + if (clockwise) { + tap_code(KC_PGUP); + } else { + tap_code(KC_PGDN); + } + } +} From 6e618baa5737c86d23d974cafe9bfa07efe1d810 Mon Sep 17 00:00:00 2001 From: 4pplet <4pplet@protonmail.com> Date: Wed, 2 Sep 2020 02:36:00 +0200 Subject: [PATCH 718/930] update 4pplet/waffling60 keyboard (#10143) * Update config.h added debounce to prevent stuttering with some switches * Update README.md --- keyboards/4pplet/waffling60/README.md | 2 +- keyboards/4pplet/waffling60/rev_a/config.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/keyboards/4pplet/waffling60/README.md b/keyboards/4pplet/waffling60/README.md index 6c333a5607b0..a6b56a69ea7f 100644 --- a/keyboards/4pplet/waffling60/README.md +++ b/keyboards/4pplet/waffling60/README.md @@ -5,7 +5,7 @@ A 60% PCB for MX switches, one hot swap and one solder-pcb version with decent l More info: https://geekhack.org/index.php?topic=103531.0 * Keyboard Maintainer: [4pplet](https://github.com/4pplet) -* Hardware Supported: waffling60 Rev A +* Hardware Supported: [waffling60](https://github.com/4pplet/waffling60) Make example for this keyboard (after setting up your build environment): diff --git a/keyboards/4pplet/waffling60/rev_a/config.h b/keyboards/4pplet/waffling60/rev_a/config.h index d232d3e70a76..6bbc68be60bc 100644 --- a/keyboards/4pplet/waffling60/rev_a/config.h +++ b/keyboards/4pplet/waffling60/rev_a/config.h @@ -25,7 +25,7 @@ //#define MATRIX_HAS_GHOST /* Set 0 if debouncing isn't needed */ -#define DEBOUNCE 0 +#define DEBOUNCE 5 #define QMK_ESC_OUTPUT D3 // usually COL #define QMK_ESC_INPUT D4 // usually ROW From 4701001524276638992d1ae92b638ca68fd0c410 Mon Sep 17 00:00:00 2001 From: Matthew Lyon Date: Tue, 1 Sep 2020 18:01:24 -0700 Subject: [PATCH 719/930] add centromere:mattly keymap (#10177) * mattly's mirrored centromere layout * Update keyboards/centromere/keymaps/mattly/keymap.c * Update keyboards/centromere/keymaps/mattly/rules.mk --- keyboards/centromere/keymaps/mattly/keymap.c | 55 ++++++++++++++++++++ keyboards/centromere/keymaps/mattly/rules.mk | 1 + 2 files changed, 56 insertions(+) create mode 100644 keyboards/centromere/keymaps/mattly/keymap.c create mode 100644 keyboards/centromere/keymaps/mattly/rules.mk diff --git a/keyboards/centromere/keymaps/mattly/keymap.c b/keyboards/centromere/keymaps/mattly/keymap.c new file mode 100644 index 000000000000..9ec77a7cf9e8 --- /dev/null +++ b/keyboards/centromere/keymaps/mattly/keymap.c @@ -0,0 +1,55 @@ +#include QMK_KEYBOARD_H +#include "mattly.h" + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + // I apparently soldered in my switches on the wrong sides of the boards, so this is mirrored + + [_BASE_MAC] = LAYOUT_split_3x6_3( + KC_SCLN, KC_P, O_CTL, I_ALT, U_GUI, KC_Y, KC_T, R_GUI, E_ALT, W_CTL, KC_Q, KC_BSPC, + KC_QUOT, MINSCTL, L_ALT, K_GUI, J_SFT, KC_H, KC_G, F_SFT, D_GUI, S_ALT, A_CTL, KC_CAPS, + KC_ENT, KC_SLSH, KC_DOT, KC_COMM, KC_M, KC_N, KC_B, KC_V, KC_C, KC_X, KC_Z, NAVLOCK, + DEL_WRP, BSP_SYM, SPC_SFT, SPC_SFT, TAB_NUM, ESC_HYP + ), + + [_OVER_WIN] = LAYOUT_split_3x6_3( + _______, _______, O_GUI, _______, U_CTL, _______, _______, R_CTL, _______, W_GUI, _______, _______, + _______, MINSGUI, _______, K_CTL, _______, _______, _______, _______, D_CTL, _______, A_GUI, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______ + ), + + + [_SYMBOL] = LAYOUT_split_3x6_3( + _______, XXXXXXX, KC_ASTR, KC_PLUS, KC_RABK, KC_LABK, KC_RBRC, KC_LBRC, KC_TILD, KC_GRV, KC_AMPR, _______, + _______, KC_UNDS, KC_AT, KC_EXLM, KC_COLN, KC_SCLN, KC_RPRN, KC_LPRN, KC_EQL, KC_PERC, KC_DLR, _______, + _______, KC_QUES, KC_BSLS, KC_PIPE, KC_DQUO, KC_QUOT, KC_RCBR, KC_LCBR, KC_HASH, KC_CIRC, KC_HASH, XXXXXXX, + _______, _______, _______, _______, _______, _______ + ), + + [_NAVNUM] = LAYOUT_split_3x6_3( + KC_PLUS, KC_DOT, KC_P9, KC_P8, KC_P7, KC_DLR, KC_PGUP, M_FWORD, KC_UP, M_BWORD, M_NAVFW, M_NXWIN, + KC_MINS, KC_EQL, KC_P6, KC_P5, KC_P4, KC_PERC, KC_PGDN, KC_RGHT, KC_DOWN, KC_LEFT, M_NAVBK, M_PVWIN, + KC_ASTR, KC_COMM, KC_P3, KC_P2, KC_P1, KC_P0, M_NXTAB, KC_END, XXXXXXX, KC_HOME, M_PVTAB, _______, + KC_P0, _______, _______, _______, _______, _______ + ), + [_NAVNUM_WIN] = LAYOUT_split_3x6_3( + _______, _______, _______, _______, _______, _______, _______, W_FWORD, _______, W_BWORD, W_NAVFW, W_NXWIN, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, W_NAVBK, W_PVWIN, + _______, _______, _______, _______, _______, _______, W_NXTAB, _______, _______, _______, W_PVTAB, _______, + _______, _______, _______, _______, _______, _______ + ), + + [_FUNCT] = LAYOUT_split_3x6_3( + KC_F15, KC_F12, KC_F9, KC_F8, KC_F7, KC_VOLU, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RESET, + KC_F14, KC_F11, KC_F6, KC_F5, KC_F4, KC_MUTE, XXXXXXX, TOG_WIN, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + KC_F13, KC_F10, KC_F3, KC_F2, KC_F1, KC_VOLD, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + _______, _______, _______, _______, _______, _______ + ), + [_FUNCT_WIN] = LAYOUT_split_3x6_3( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______ + ), +}; diff --git a/keyboards/centromere/keymaps/mattly/rules.mk b/keyboards/centromere/keymaps/mattly/rules.mk new file mode 100644 index 000000000000..0a5b666e8557 --- /dev/null +++ b/keyboards/centromere/keymaps/mattly/rules.mk @@ -0,0 +1 @@ +MOUSEKEY_ENABLE = no From 4086729f5e2823c484c2b31bb208c424e2be4c70 Mon Sep 17 00:00:00 2001 From: t-miyajima <55669223+dvorak55@users.noreply.github.com> Date: Wed, 2 Sep 2020 15:29:17 +0900 Subject: [PATCH 720/930] [Keyboard] Add Chavdai40% rev2 (#10210) * add chavdai40 rev2 * add chavdai40 rev2 * change include quantum.h to top of h files --- keyboards/chavdai40/readme.md | 10 ++- keyboards/chavdai40/{ => rev1}/config.h | 0 .../chavdai40/{chavdai40.c => rev1/rev1.c} | 2 +- .../chavdai40/{chavdai40.h => rev1/rev1.h} | 4 +- keyboards/chavdai40/{ => rev1}/rules.mk | 0 keyboards/chavdai40/rev2/config.h | 74 +++++++++++++++++++ keyboards/chavdai40/rev2/rev2.c | 16 ++++ keyboards/chavdai40/rev2/rev2.h | 49 ++++++++++++ keyboards/chavdai40/rev2/rules.mk | 18 +++++ 9 files changed, 166 insertions(+), 7 deletions(-) rename keyboards/chavdai40/{ => rev1}/config.h (100%) rename keyboards/chavdai40/{chavdai40.c => rev1/rev1.c} (96%) rename keyboards/chavdai40/{chavdai40.h => rev1/rev1.h} (100%) rename keyboards/chavdai40/{ => rev1}/rules.mk (100%) create mode 100644 keyboards/chavdai40/rev2/config.h create mode 100644 keyboards/chavdai40/rev2/rev2.c create mode 100644 keyboards/chavdai40/rev2/rev2.h create mode 100644 keyboards/chavdai40/rev2/rules.mk diff --git a/keyboards/chavdai40/readme.md b/keyboards/chavdai40/readme.md index 57af68d0abec..6925457a0e74 100644 --- a/keyboards/chavdai40/readme.md +++ b/keyboards/chavdai40/readme.md @@ -5,15 +5,17 @@ Chavdai40 is very simple decoratable 40% keyboard * Keyboard Maintainer: [t-miyajima](https://github.com/dvorak55) -* Hardware Supported: Chavdai40 PCB rev1 -* Hardware Availability: not yet available. +* Hardware Supported: Chavdai40 PCB rev1,rev2 +* Hardware Availability: [yushakobo](https://yushakobo.jp/shop/consign_chavdai40/) Make example for this keyboard (after setting up your build environment): - make chavdai40:default + make chavdai40/rev1:default + make chavdai40/rev2:default Flashing example for this keyboard: - make chavdai40:default:flash + make chavdai40/rev1:default:flash + make chavdai40/rev2: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). diff --git a/keyboards/chavdai40/config.h b/keyboards/chavdai40/rev1/config.h similarity index 100% rename from keyboards/chavdai40/config.h rename to keyboards/chavdai40/rev1/config.h diff --git a/keyboards/chavdai40/chavdai40.c b/keyboards/chavdai40/rev1/rev1.c similarity index 96% rename from keyboards/chavdai40/chavdai40.c rename to keyboards/chavdai40/rev1/rev1.c index 6101732e2b5a..116c301c2b85 100644 --- a/keyboards/chavdai40/chavdai40.c +++ b/keyboards/chavdai40/rev1/rev1.c @@ -13,4 +13,4 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -#include "chavdai40.h" +#include "rev1.h" diff --git a/keyboards/chavdai40/chavdai40.h b/keyboards/chavdai40/rev1/rev1.h similarity index 100% rename from keyboards/chavdai40/chavdai40.h rename to keyboards/chavdai40/rev1/rev1.h index a10f695c7863..c5899e24bc7c 100644 --- a/keyboards/chavdai40/chavdai40.h +++ b/keyboards/chavdai40/rev1/rev1.h @@ -17,10 +17,10 @@ #pragma once -#define XXX KC_NO - #include "quantum.h" +#define XXX KC_NO + // This a shortcut to help you visually see your layout. #define LAYOUT_44key( \ diff --git a/keyboards/chavdai40/rules.mk b/keyboards/chavdai40/rev1/rules.mk similarity index 100% rename from keyboards/chavdai40/rules.mk rename to keyboards/chavdai40/rev1/rules.mk diff --git a/keyboards/chavdai40/rev2/config.h b/keyboards/chavdai40/rev2/config.h new file mode 100644 index 000000000000..a95f025f420c --- /dev/null +++ b/keyboards/chavdai40/rev2/config.h @@ -0,0 +1,74 @@ +/* Copyright 2020 t-miyajima + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License 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 0x16D0 +#define PRODUCT_ID 0x0F95 +#define DEVICE_VER 0x0002 +#define MANUFACTURER t-miyajima +#define PRODUCT Chavdai40 rev2 + +/* usb power settings */ +#define USB_MAX_POWER_CONSUMPTION 100 + +/* key matrix size */ +#define MATRIX_ROWS 4 +#define MATRIX_COLS 13 + + +#define MATRIX_ROW_PINS { A0, A15, B5, B6 } +#define MATRIX_COL_PINS { B7, B4, B3, A8, B1, B0, A7, A6, A5, A4, A3, A2, A1 } +#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 + +/* 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 diff --git a/keyboards/chavdai40/rev2/rev2.c b/keyboards/chavdai40/rev2/rev2.c new file mode 100644 index 000000000000..6bd488c299fa --- /dev/null +++ b/keyboards/chavdai40/rev2/rev2.c @@ -0,0 +1,16 @@ +/* Copyright 2020 t-miyajima + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#include "rev2.h" diff --git a/keyboards/chavdai40/rev2/rev2.h b/keyboards/chavdai40/rev2/rev2.h new file mode 100644 index 000000000000..c5899e24bc7c --- /dev/null +++ b/keyboards/chavdai40/rev2/rev2.h @@ -0,0 +1,49 @@ +/* Copyright 2020 t-miyajima + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License 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. + +#define LAYOUT_44key( \ + 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 \ +) { \ + { 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, XXX }, \ + { k26, k27, k28, k29, k30, k31, k32, k33, k34, k35, k36, k37, XXX }, \ + { k38, k39, XXX, k40, XXX, k41, XXX, XXX, k42, k43, k44, XXX, XXX } \ +} + +#define LAYOUT_42key( \ + 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, k41, k43, k44 \ +) { \ + { 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, XXX }, \ + { k26, k27, k28, k29, k30, k31, k32, k33, k34, k35, k36, k37, XXX }, \ + { k38, k39, XXX, XXX, XXX, k41, XXX, XXX, XXX, k43, k44, XXX, XXX } \ +} + diff --git a/keyboards/chavdai40/rev2/rules.mk b/keyboards/chavdai40/rev2/rules.mk new file mode 100644 index 000000000000..64c6f662af8e --- /dev/null +++ b/keyboards/chavdai40/rev2/rules.mk @@ -0,0 +1,18 @@ +# MCU name +MCU = STM32F042 + +# 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 +BLUETOOTH_ENABLE = no # Enable Bluetooth +AUDIO_ENABLE = no # Audio output \ No newline at end of file From 2ab307a9402973fa7b4469d1d41d16d175d8785e Mon Sep 17 00:00:00 2001 From: Andy Jack Date: Wed, 2 Sep 2020 02:31:57 -0400 Subject: [PATCH 721/930] [Keymap] add 40percentclub/mf68:andyjack (#10208) * Initial checkin of my 40percentclub/mf68 keymap * Add gplv2 license header --- .../mf68/keymaps/andyjack/keymap.c | 144 ++++++++++++++++++ .../mf68/keymaps/andyjack/readme.md | 22 +++ .../mf68/keymaps/andyjack/rules.mk | 2 + 3 files changed, 168 insertions(+) create mode 100644 keyboards/40percentclub/mf68/keymaps/andyjack/keymap.c create mode 100644 keyboards/40percentclub/mf68/keymaps/andyjack/readme.md create mode 100644 keyboards/40percentclub/mf68/keymaps/andyjack/rules.mk diff --git a/keyboards/40percentclub/mf68/keymaps/andyjack/keymap.c b/keyboards/40percentclub/mf68/keymaps/andyjack/keymap.c new file mode 100644 index 000000000000..0dc41dd82ea7 --- /dev/null +++ b/keyboards/40percentclub/mf68/keymaps/andyjack/keymap.c @@ -0,0 +1,144 @@ +/* +Copyright 2020 Andy Jack + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public 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, + _L1, + _L2 +}; + +#define CTL_ESC LCTL_T(KC_ESC) + +/* these key combos are mapped to shell commands in my .keylaunchrc */ +#define MUT_IN LALT(KC_F10) +#define MUT_OUT LALT(KC_F11) +#define MUT_MIC LALT(KC_F12) +#define SCN_LCK LCTL(KC_SLCK) + +extern keymap_config_t keymap_config; + +enum custom_keycodes { + AJ_FN = SAFE_RANGE, + AJ_RCTL, + AJ_MSWP, + AJ_MLCK, +}; + +// clang-format off +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_QWERTY] = LAYOUT_68_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_INS, 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_PGDN, + 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_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, AJ_FN, AJ_RCTL, KC_LEFT, KC_DOWN, KC_RGHT + ), + [_L1] = LAYOUT_68_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_BSPC, KC_VOLU, KC_HOME, + _______, _______, KC_HOME, KC_UP, KC_END, _______, _______, MUT_IN , MUT_OUT, MUT_MIC, _______, _______, BL_STEP, _______, KC_VOLD, KC_END, + _______, _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, _______, _______, SCN_LCK, _______, _______, _______, + _______, _______, _______, _______, KC_BTN3, _______, _______, KC_MUTE, _______, _______, _______, _______, KC_MUTE, + _______, AJ_MLCK, AJ_MSWP, _______, _______, _______, _______, KC_MPRV, KC_MPLY, KC_MNXT + ), + [_L2] = LAYOUT_68_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_BSPC, KC_VOLU, KC_HOME, + _______, _______, _______, KC_UP, _______, _______, _______, KC_7, KC_8, KC_9, _______, _______, _______, _______, KC_VOLD, KC_END, + _______, _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, KC_4, KC_5, KC_6, _______, _______, _______, + _______, _______, _______, _______, _______, _______, KC_0, KC_1, KC_2, KC_3, _______, _______, KC_MUTE, + _______, _______, _______, _______, _______, _______, _______, KC_MPRV, KC_MPLY, KC_MNXT + ) +}; +// clang-format on + +static bool aj_fn_down = false; +static bool aj_rctl_down = false; +static uint8_t keycode_for_aj_rctl; + +/* My version of: + https://www.reddit.com/r/olkb/comments/8eticz/how_to_activate_a_layer_with_a_combination/dxygw0f/ +* AJ_FN by itself turns on layer 1 +* AJ_RCTL by itself acts as a control key +* pressing FN and RCTL together, in any order, turns on layer 2 +*/ +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case AJ_FN: + if (record->event.pressed) { + if (aj_rctl_down) { + layer_on(_L2); + } else { + layer_on(_L1); + } + aj_fn_down = true; + } else { + layer_off(_L1); + layer_off(_L2); + aj_fn_down = false; + } + return false; + break; + case AJ_RCTL: + if (record->event.pressed) { + if (aj_fn_down) { + layer_on(_L2); + } else { + register_code(keycode_for_aj_rctl); + } + aj_rctl_down = true; + } else { + layer_off(_L2); + unregister_code(keycode_for_aj_rctl); + aj_rctl_down = false; + } + return false; + break; + case AJ_MSWP: + case AJ_MLCK: + if (record->event.pressed) { + if (!eeconfig_is_enabled()) { + eeconfig_init(); + } + keymap_config.raw = eeconfig_read_keymap(); + switch (keycode) { + case AJ_MSWP: + keymap_config.swap_lalt_lgui = !keymap_config.swap_lalt_lgui; + keymap_config.swap_ralt_rgui = keymap_config.swap_lalt_lgui; + keycode_for_aj_rctl = keymap_config.swap_lalt_lgui ? KC_RALT : KC_RCTL; + break; + case AJ_MLCK: + keymap_config.no_gui = !keymap_config.no_gui; + break; + } + eeconfig_update_keymap(keymap_config.raw); + clear_keyboard(); // clear to prevent stuck keys + } + return false; + break; + } + return true; +} + +void keyboard_post_init_user(void) { + if (!eeconfig_is_enabled()) { + eeconfig_init(); + } + keymap_config.raw = eeconfig_read_keymap(); + keycode_for_aj_rctl = keymap_config.swap_lalt_lgui ? KC_RALT : KC_RCTL; + eeconfig_update_keymap(keymap_config.raw); + clear_keyboard(); // clear to prevent stuck keys +} diff --git a/keyboards/40percentclub/mf68/keymaps/andyjack/readme.md b/keyboards/40percentclub/mf68/keymaps/andyjack/readme.md new file mode 100644 index 000000000000..17a9d9e90fdc --- /dev/null +++ b/keyboards/40percentclub/mf68/keymaps/andyjack/readme.md @@ -0,0 +1,22 @@ +## Customizations from the `default` keymap + +* caps lock is left ctrl / press & release for escape +* keyboard LED brightness control - Fn + ] (same as default) +* bootmagic: + * ability to swap keys - for moving between mac and win/linux + * for win/linux - keys are as labeled in layer 0; AJ_RCTL is right ctl + * for mac: + * LALT and LGUI swapped + * RALT key sends RGUI code + * AJ_RCTL key sends RALT code + * layer 2 access via Fn + AJ_RCTL pressed in any order + * regardless of swapped state + * ability to disable left gui +* Fn + v sends a middle mouse click - nice for pasting the mouse selection in + linux - I always mess up and scroll while clicking + * note: the mouse cursor has to be placed at the insert point +* mapping some Fn + key combinations to program launch shortcuts + + diff --git a/keyboards/40percentclub/mf68/keymaps/andyjack/rules.mk b/keyboards/40percentclub/mf68/keymaps/andyjack/rules.mk new file mode 100644 index 000000000000..617f5f6fc92a --- /dev/null +++ b/keyboards/40percentclub/mf68/keymaps/andyjack/rules.mk @@ -0,0 +1,2 @@ +MOUSEKEY_ENABLE = yes +BOOTMAGIC_ENABLE = full From 9808bfaf2616afbe837873d962bc214be3705f90 Mon Sep 17 00:00:00 2001 From: mujimanic <64090325+mujimanic@users.noreply.github.com> Date: Thu, 3 Sep 2020 03:24:55 -0500 Subject: [PATCH 722/930] [Keyboard] add Sneakbox Alice Clone (#9792) * Initial Commit for alice clone pcb Initial commit for alice clone pcb * Update keyboards/sneakbox/aliceclone/config.h Change to #pragma once. Thanks. * Update keyboards/sneakbox/aliceclone/config.h * Update keyboards/sneakbox/aliceclone/kb.c * Rename kb.h to aliceclone.h * Update keyboards/sneakbox/aliceclone/keymaps/default/keymap.c * Update keyboards/sneakbox/aliceclone/keymaps/default/keymap.c * Update keyboards/sneakbox/aliceclone/keymaps/default/keymap.c * Update keyboards/sneakbox/aliceclone/keymaps/default/keymap.c * Update keyboards/sneakbox/aliceclone/keymaps/default/keymap.c Got it. Thanks. * Update keyboards/sneakbox/aliceclone/readme.md * Update keyboards/sneakbox/aliceclone/readme.md * Update keyboards/sneakbox/aliceclone/rules.mk * Update keymap.c * Rename kb.c to aliceclone.c * Update keyboards/sneakbox/aliceclone/config.h * Update keyboards/sneakbox/aliceclone/aliceclone.h * Update keyboards/sneakbox/aliceclone/aliceclone.h * Update keyboards/sneakbox/aliceclone/aliceclone.h * Update keyboards/sneakbox/aliceclone/config.h Got it. Thanks. * Update keyboards/sneakbox/aliceclone/readme.md Got it, the parent company folder needs to be added for make to find the source. Forgot that. Thanks. * Update keyboards/sneakbox/aliceclone/config.h * Info.json now reflects QMK configurator metadata Previously, .json represented via metadata. * Changed typo ) to } at end of line 9. * Update keymap.c Updated the spacing of the keymap layout to be more readable. * Update keymap.c Updated this VIA keymap for formatting to make it more readable. * Update keymap.c Updated formatting of the rotary encoder function * Update keymap.c * Update info.json Corrected key layout and aligned for straight keymap, removed rotation references * Update keymap.c Adjusted formatting for key layout for readability * Adjusted formatting for key layout for readability Adjusted formatting for key layout for readability * Added GPLv2 License header * Added GPLv2 license header * Update aliceclone.c * Updated the LAYOUT map LAYOUT map now resembles the actual keymap with correct KXY keys corresponding to switch position. * GPLv2 license header added * Update keyboards/sneakbox/aliceclone/config.h * GPLv2 License Header added * Updated License Header, Added keymap layers Added total of 4 keymap layers, fixed keymap visual formatting. License header GPLv2 * Added extra layers, corrected layer references * Updated formatting for keymap.c LAYOUT * Update keyboards/sneakbox/aliceclone/aliceclone.h Updated * Update keyboards/sneakbox/aliceclone/info.json Updated * Update keyboards/sneakbox/aliceclone/info.json Updated * Update keyboards/sneakbox/aliceclone/info.json Updated formatting * Update keyboards/sneakbox/aliceclone/keymaps/default/keymap.c Reviewed and approved. Thanks. * Update keyboards/sneakbox/aliceclone/keymaps/default/keymap.c Reviewed. Understood. Thanks. * Update keyboards/sneakbox/aliceclone/keymaps/default/keymap.c Got it. Removed. * Update keyboards/sneakbox/aliceclone/keymaps/via/keymap.c Agreed. Thanks for the suggestion. * Update keyboards/sneakbox/aliceclone/readme.md * Update keyboards/sneakbox/aliceclone/readme.md * Update keymap.c tabs spaces formatting * Update keymap.c Tabs and spaces. Remove L3 L4 * syntax in enum layer_names removed comma after "_FN" * Update aliceclone.h renamed LAYOUT_all to LAYOUT * Update keymap.c Updated keymap * Update keymap.c * Update keyboards/sneakbox/aliceclone/readme.md * Update keyboards/sneakbox/aliceclone/keymaps/via/keymap.c * Update keyboards/sneakbox/aliceclone/keymaps/via/keymap.c * Update keyboards/sneakbox/aliceclone/keymaps/via/keymap.c * Update keyboards/sneakbox/aliceclone/keymaps/via/keymap.c * Update keyboards/sneakbox/aliceclone/aliceclone.h * Update keyboards/sneakbox/aliceclone/keymaps/default/keymap.c * Update keyboards/sneakbox/aliceclone/keymaps/default/keymap.c --- keyboards/sneakbox/aliceclone/aliceclone.c | 36 ++++++++++ keyboards/sneakbox/aliceclone/aliceclone.h | 39 +++++++++++ keyboards/sneakbox/aliceclone/config.h | 68 ++++++++++++++++++ keyboards/sneakbox/aliceclone/info.json | 18 +++++ .../aliceclone/keymaps/default/keymap.c | 55 +++++++++++++++ .../sneakbox/aliceclone/keymaps/via/keymap.c | 70 +++++++++++++++++++ .../sneakbox/aliceclone/keymaps/via/rules.mk | 1 + keyboards/sneakbox/aliceclone/readme.md | 15 ++++ keyboards/sneakbox/aliceclone/rules.mk | 23 ++++++ 9 files changed, 325 insertions(+) create mode 100644 keyboards/sneakbox/aliceclone/aliceclone.c create mode 100644 keyboards/sneakbox/aliceclone/aliceclone.h create mode 100644 keyboards/sneakbox/aliceclone/config.h create mode 100644 keyboards/sneakbox/aliceclone/info.json create mode 100644 keyboards/sneakbox/aliceclone/keymaps/default/keymap.c create mode 100644 keyboards/sneakbox/aliceclone/keymaps/via/keymap.c create mode 100644 keyboards/sneakbox/aliceclone/keymaps/via/rules.mk create mode 100644 keyboards/sneakbox/aliceclone/readme.md create mode 100644 keyboards/sneakbox/aliceclone/rules.mk diff --git a/keyboards/sneakbox/aliceclone/aliceclone.c b/keyboards/sneakbox/aliceclone/aliceclone.c new file mode 100644 index 000000000000..9457c641df36 --- /dev/null +++ b/keyboards/sneakbox/aliceclone/aliceclone.c @@ -0,0 +1,36 @@ +/* +Copyright 2020 Bryan Ong + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#include "aliceclone.h" + +void keyboard_pre_init_kb() { + setPinOutput(D7); + setPinOutput(D6); + setPinOutput(D4); + + keyboard_pre_init_user(); +} + +bool led_update_kb(led_t led_state) { + bool res = led_update_user(led_state); + if(res) { + writePin(D7, led_state.num_lock); + writePin(D6, led_state.caps_lock); + writePin(D4, led_state.scroll_lock); + } + return res; +} diff --git a/keyboards/sneakbox/aliceclone/aliceclone.h b/keyboards/sneakbox/aliceclone/aliceclone.h new file mode 100644 index 000000000000..67ae7ce784b0 --- /dev/null +++ b/keyboards/sneakbox/aliceclone/aliceclone.h @@ -0,0 +1,39 @@ +/* +Copyright 2020 Bryan Ong + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License 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( \ + K020, K000, K001, K002, K003, K004, K005, K006, K010, K011, K012, K013, K014, K015, K016, K017, \ + K040, K021, K022, K023, K024, K025, K026, K030, K031, K032, K033, K034, K035, K036, K037, \ + K060, K041, K042, K043, K044, K045, K046, K050, K051, K052, K053, K054, K055, K056, \ + K061, K062, K063, K064, K065, K066, K070, K071, K072, K073, K074, K075, K076, K077, \ + K081, K083, K085, K086, K091, K093, K097 \ +) { \ + { K000, K001, K002, K003, K004, K005, K006, KC_NO }, \ + { K010, K011, K012, K013, K014, K015, K016, K017 }, \ + { K020, K021, K022, K023, K024, K025, K026, KC_NO }, \ + { K030, K031, K032, K033, K034, K035, K036, K037 }, \ + { K040, K041, K042, K043, K044, K045, K046, KC_NO }, \ + { K050, K051, K052, K053, K054, K055, K056, KC_NO }, \ + { K060, K061, K062, K063, K064, K065, K066, KC_NO }, \ + { K070, K071, K072, K073, K074, K075, K076, K077 }, \ + { KC_NO, K081, KC_NO, K083, KC_NO, K085, K086, KC_NO }, \ + { KC_NO, K091, KC_NO, K093, KC_NO, KC_NO, KC_NO, K097 } \ +} diff --git a/keyboards/sneakbox/aliceclone/config.h b/keyboards/sneakbox/aliceclone/config.h new file mode 100644 index 000000000000..492c5680b871 --- /dev/null +++ b/keyboards/sneakbox/aliceclone/config.h @@ -0,0 +1,68 @@ +/* +Copyright 2020 Bryan Ong + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License 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 0x5342 +#define PRODUCT_ID 0x0001 +#define DEVICE_VER 0x0001 +#define MANUFACTURER Sneakbox +#define PRODUCT AliceClone + +/*Bootmagic boot button, set to topmost, leftmost key */ +#define BOOTMAGIC_LITE_ROW 2 +#define BOOTMAGIC_LITE_COLUMN 0 + +/* encoder */ +/* #define NUMBER_OF_ENCODERS 1 */ +#define ENCODERS_PAD_A { D3 } +#define ENCODERS_PAD_B { D2 } +#define ENCODER_RESOLUTION 1 + + +/* key matrix size */ +#define MATRIX_ROWS 10 +#define MATRIX_COLS 8 + +/* key matrix pins */ +#define MATRIX_ROW_PINS { F1, E6, F4, B1, F5, B2, F6, B3, F7, B7 } +#define MATRIX_COL_PINS { F0, D0, C7, C6, B6, B5, B4, 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 + + +#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/sneakbox/aliceclone/info.json b/keyboards/sneakbox/aliceclone/info.json new file mode 100644 index 000000000000..332404b56dd2 --- /dev/null +++ b/keyboards/sneakbox/aliceclone/info.json @@ -0,0 +1,18 @@ +{ + "keyboard_name": "Alice Clone", + "url": "https://sneakbox.design", + "maintainer": "mujimanic", + "width": 18.25, + "height": 5, + "layouts": { + "LAYOUT_all": { + "layout": [ + {"x":0, "y":0}, {"x":1.25, "y":0}, {"x":2.25, "y":0}, {"x":3.25, "y":0}, {"x":4.25, "y":0}, {"x":5.25, "y":0}, {"x":6.25, "y":0}, {"x":7.25, "y":0}, {"x":10.25, "y":0}, {"x":11.25, "y":0}, {"x":12.25, "y":0}, {"x":13.25, "y":0}, {"x":14.25, "y":0}, {"x":15.25, "y":0}, {"x":16.25, "y":0}, {"x":17.25, "y":0}, + {"x":0, "y":1}, {"x":1.25, "y":1, "w":1.5}, {"x":2.75, "y":1}, {"x":3.75, "y":1}, {"x":4.75, "y":1}, {"x":5.75, "y":1}, {"x":6.75, "y":1}, {"x":9.75, "y":1}, {"x":10.75, "y":1}, {"x":11.75, "y":1}, {"x":12.75, "y":1}, {"x":13.75, "y":1}, {"x":14.75, "y":1}, {"x":15.75, "y":1}, {"x":16.75, "y":1, "w":1.5}, + {"x":0, "y":2}, {"x":1.25, "y":2, "w":1.75}, {"x":3, "y":2}, {"x":4, "y":2}, {"x":5, "y":2}, {"x":6, "y":2}, {"x":7, "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":16, "y":2, "w":2.25}, + {"x":1.25, "y":3, "w":2.25}, {"x":3.5, "y":3}, {"x":4.5, "y":3}, {"x":5.5, "y":3}, {"x":6.5, "y":3}, {"x":7.5, "y":3}, {"x":9.5, "y":3}, {"x":10.5, "y":3}, {"x":11.5, "y":3}, {"x":12.5, "y":3}, {"x":13.5, "y":3}, {"x":14.5, "y":3}, {"x":15.5, "y":3, "w":1.75}, {"x":17.25, "y":3}, + {"x":1.25, "y":4, "w":1.5}, {"x":4, "y":4, "w":1.5}, {"x":5.5, "y":4, "w":2.25}, {"x":7.75, "y":4}, {"x":9.75, "y":4, "w":2.75}, {"x":12.5, "y":4, "w":1.5}, {"x":16.75, "y":4, "w":1.5} + ] + } + } +} diff --git a/keyboards/sneakbox/aliceclone/keymaps/default/keymap.c b/keyboards/sneakbox/aliceclone/keymaps/default/keymap.c new file mode 100644 index 000000000000..39eb44bc9a7d --- /dev/null +++ b/keyboards/sneakbox/aliceclone/keymaps/default/keymap.c @@ -0,0 +1,55 @@ +/* +Copyright 2020 Bryan Ong + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public 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] = LAYOUT_all( + 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_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_LGUI, + KC_LCTL, KC_LALT, KC_SPC, LT(_FN, KC_SPC), KC_SPC, KC_RALT, KC_RCTL), + [_FN] = 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_UP, 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_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_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), +}; + +void encoder_update_user(uint8_t index, bool clockwise) { + if (index == 0) { /* First encoder */ + if (clockwise) { + tap_code(KC_DOWN); + } else { + tap_code(KC_UP); + } + } else if (index == 1) { /* Second encoder */ + if (clockwise) { + tap_code(KC_DOWN); + } else { + tap_code(KC_UP); + } + } +} diff --git a/keyboards/sneakbox/aliceclone/keymaps/via/keymap.c b/keyboards/sneakbox/aliceclone/keymaps/via/keymap.c new file mode 100644 index 000000000000..333b8a21620a --- /dev/null +++ b/keyboards/sneakbox/aliceclone/keymaps/via/keymap.c @@ -0,0 +1,70 @@ +/* +Copyright 2020 Bryan Ong + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public 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, + _L3, + _L4 +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [_BASE] = LAYOUT_all( + 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_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_LGUI, + KC_LCTL, KC_LALT, KC_SPC, LT(_FN, KC_SPC), KC_SPC, KC_RALT, KC_RCTL), + [_FN] = 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_UP, 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_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_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), + [_L3] = 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), + [_L4] = 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), +}; + +void encoder_update_user(uint8_t index, bool clockwise) { + if (index == 0) { /* First encoder */ + if (clockwise) { + tap_code(KC_DOWN); + } else { + tap_code(KC_UP); + } + } else if (index == 1) { /* Second encoder */ + if (clockwise) { + tap_code(KC_DOWN); + } else { + tap_code(KC_UP); + } + } +} diff --git a/keyboards/sneakbox/aliceclone/keymaps/via/rules.mk b/keyboards/sneakbox/aliceclone/keymaps/via/rules.mk new file mode 100644 index 000000000000..036bd6d1c3ec --- /dev/null +++ b/keyboards/sneakbox/aliceclone/keymaps/via/rules.mk @@ -0,0 +1 @@ +VIA_ENABLE = yes \ No newline at end of file diff --git a/keyboards/sneakbox/aliceclone/readme.md b/keyboards/sneakbox/aliceclone/readme.md new file mode 100644 index 000000000000..86ffbd9303ec --- /dev/null +++ b/keyboards/sneakbox/aliceclone/readme.md @@ -0,0 +1,15 @@ +# Sneakbox Alice Clone PCB + +![Sneakbox Alice Clone PCB](https://i.imgur.com/pMZNqLXl.jpg) + +An Alice-compatible PCB with hotswap, and pushbutton rotary encoder socket placed at the top left key position. Firmware covers all USB-connector variants of the Sneakbox Alice Clone PCB (Top USB-C, Bottom USB-C) + +* Keyboard Maintainer: [mujimanic](https://github.com/mujimanic) +* Hardware Supported: Any Alice-layout case. +* Hardware Availability: [sneakbox.design](https://sneakbox.design/products/sneakbox-alice-hotswap-pcbs) + +Make example for this keyboard (after setting up your build environment): + + make sneakbox/aliceclone: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/sneakbox/aliceclone/rules.mk b/keyboards/sneakbox/aliceclone/rules.mk new file mode 100644 index 000000000000..fb12719ce81e --- /dev/null +++ b/keyboards/sneakbox/aliceclone/rules.mk @@ -0,0 +1,23 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +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 +BLUETOOTH_ENABLE = no # Enable Bluetooth +AUDIO_ENABLE = no # Audio output +ENCODER_ENABLE = yes From e7cc5a35c2b80d081207db940777b7537d30a5cd Mon Sep 17 00:00:00 2001 From: jotix <69703151+jotix@users.noreply.github.com> Date: Thu, 3 Sep 2020 05:28:07 -0300 Subject: [PATCH 723/930] [Keymap] update ortho_4x12 jotix (#10157) * mouse_layout * add_mouse_btns * reset_with_ctrl+esc+bspc * add_mousekeys_on_right * mod-tap-mouse-layer * fn_layer --- layouts/community/ortho_4x12/jotix/keymap.c | 59 ++++++++++++--------- 1 file changed, 35 insertions(+), 24 deletions(-) diff --git a/layouts/community/ortho_4x12/jotix/keymap.c b/layouts/community/ortho_4x12/jotix/keymap.c index 699f94f67f33..867e40a380f0 100644 --- a/layouts/community/ortho_4x12/jotix/keymap.c +++ b/layouts/community/ortho_4x12/jotix/keymap.c @@ -4,59 +4,74 @@ enum layers { _QWERTY, _RAISE, _LOWER, + _FN, }; #define LOWER MO(_LOWER) #define RAISE MO(_RAISE) +#define FN MO(_FN) +#define TGLOWER TG(LOWER) #define TGRAISE TG(_RAISE) -#define RALT_QU RALT_T(KC_QUOT) +#define RALTDEL RALT_T(KC_DEL) static bool is_ctl_pressed; -static bool is_tab_pressed; +static bool is_esc_pressed; static bool is_bspc_pressed; const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_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_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,RALT_QU, + 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_ENT, + KC_LSFT,KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM,KC_DOT, KC_UP, KC_SLSH, // ├───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┤ - KC_LCTL,KC_LGUI,KC_LALT,KC_DEL, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT,KC_DOWN,KC_UP, KC_RGHT + KC_LCTL,KC_LGUI,KC_LALT,FN, LOWER, KC_SPC, KC_SPC, RAISE, RALTDEL,KC_LEFT,KC_DOWN,KC_RGHT // └───────┴───────┴───────┴───────┴───────┴───────┴───────┴───────┴───────┴───────┴───────┴───────┘ ), -[_RAISE] = LAYOUT_ortho_4x12 ( +[_LOWER] = LAYOUT_ortho_4x12 ( // ┌───────┬───────┬───────┬───────┬───────┬───────┬───────┬───────┬───────┬───────┬───────┬───────┐ - _______,KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, _______, + KC_TILD,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_MINS,KC_EQL, KC_LBRC,KC_RBRC,KC_BSLS, + _______,KC_VOLD,KC_MUTE,KC_VOLU,KC_HOME,KC_PGUP,KC_LCBR,KC_RCBR,KC_PIPE,KC_DQUO,_______,_______, // ├───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┤ - _______,KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_GRV, _______,_______,_______,_______, + _______,KC_MPRV,KC_MPLY,KC_MNXT,KC_END, KC_PGDN,KC_UNDS,KC_PLUS,KC_WH_U,KC_BTN1,KC_MS_U,KC_BTN2, // ├───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┤ - _______,_______,_______,_______,_______,_______,_______,_______,KC_HOME,KC_PGDN,KC_PGUP,KC_END + _______,_______,_______,_______,_______,_______,TGRAISE,_______,KC_WH_D,KC_MS_L,KC_MS_D,KC_MS_R // └───────┴───────┴───────┴───────┴───────┴───────┴───────┴───────┴───────┴───────┴───────┴───────┘ ), -[_LOWER] = LAYOUT_ortho_4x12 ( +[_RAISE] = LAYOUT_ortho_4x12 ( // ┌───────┬───────┬───────┬───────┬───────┬───────┬───────┬───────┬───────┬───────┬───────┬───────┐ - _______,KC_EXLM,KC_AT, KC_HASH,KC_DLR, KC_PERC,KC_CIRC,KC_AMPR,KC_ASTR,KC_LPRN,KC_RPRN,_______, + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, _______, // ├───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┤ - _______,KC_VOLD,KC_MUTE,KC_VOLU,DM_REC1,DM_REC2,DM_RSTP,KC_UNDS,KC_PLUS,KC_LCBR,KC_RCBR,KC_PIPE, + KC_CAPS,_______,_______,_______,_______,_______,KC_LBRC,KC_RBRC,KC_BSLS,KC_QUOT,_______,_______, // ├───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┤ - _______,KC_MPRV,KC_MPLY,KC_MNXT,DM_PLY1,DM_PLY2,KC_CAPS,KC_TILD,KC_WH_D,KC_BTN1,KC_BTN2,KC_WH_U, + _______,DM_REC1,DM_REC2,DM_RSTP,DM_PLY1,DM_PLY2,KC_MINS,KC_EQL, _______,_______,_______,_______, // ├───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┤ - _______,_______,_______,_______,_______,_______,TGRAISE,_______,KC_MS_L,KC_MS_D,KC_MS_U,KC_MS_R + _______,_______,_______,_______,_______,TGLOWER,_______,_______,_______,_______,_______,_______ // └───────┴───────┴───────┴───────┴───────┴───────┴───────┴───────┴───────┴───────┴───────┴───────┘ ), +[_FN] = LAYOUT_ortho_4x12 ( +// ┌───────┬───────┬───────┬───────┬───────┬───────┬───────┬───────┬───────┬───────┬───────┬───────┐ + _______,KC_F1, KC_F2, KC_F3, KC_F4, _______,_______,KC_P7, KC_P8, KC_P9, KC_PMNS,_______, +// ├───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┤ + _______,KC_F5, KC_F6, KC_F7, KC_F8, _______,_______,KC_P4, KC_P5, KC_P6, KC_PPLS,KC_PENT, +// ├───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┤ + _______,KC_F9, KC_F10, KC_F11, KC_F12, _______,_______,KC_P1, KC_P2, KC_P3, KC_PAST,KC_PSLS, +// ├───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┤ + _______,_______,_______,_______,_______,_______,_______,_______,KC_P0, KC_PDOT,KC_LPRN,KC_RPRN +// └───────┴───────┴───────┴───────┴───────┴───────┴───────┴───────┴───────┴───────┴───────┴───────┘ +), }; layer_state_t layer_state_set_user(layer_state_t state) { #ifdef JOTANCK_LEDS + writePin(JOTANCK_LED1, (get_highest_layer(state) == _LOWER)); writePin(JOTANCK_LED2, (get_highest_layer(state) == _RAISE)); #endif return state; @@ -67,20 +82,16 @@ bool led_update_user(led_t led_state) { if (!led_state.num_lock) { tap_code(KC_NUMLOCK); } - #ifdef JOTANCK_LEDS - // CapsLock led - writePin(JOTANCK_LED1, led_state.caps_lock); - #endif return true; } bool process_record_user(uint16_t keycode, keyrecord_t *record) { - switch (keycode) { + switch (keycode) { case KC_LCTL: is_ctl_pressed = record->event.pressed; break; - case KC_TAB: - is_tab_pressed = record->event.pressed; + case KC_ESC: + is_esc_pressed = record->event.pressed; break; case KC_BSPC: is_bspc_pressed = record->event.pressed; @@ -90,7 +101,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { } void matrix_scan_user(void) { - if (is_ctl_pressed && is_tab_pressed && is_bspc_pressed) { + if (is_ctl_pressed && is_esc_pressed && is_bspc_pressed) { reset_keyboard(); } } From 04293bcd5b39cdcc97acd3f05fdec67ba2a57f60 Mon Sep 17 00:00:00 2001 From: jrdsgl Date: Thu, 3 Sep 2020 01:34:42 -0700 Subject: [PATCH 724/930] [Keymap] add sixkeyboard:via (#10172) * Adding VIA support for sixkeyboard * Update keyboards/sixkeyboard/keymaps/via/keymap.c * Update keyboards/sixkeyboard/keymaps/via/keymap.c * Update keyboards/sixkeyboard/keymaps/via/keymap.c * Update keyboards/sixkeyboard/keymaps/via/keymap.c * Update keymap.c added suggested header. left my name out and changed year to 2020. --- keyboards/sixkeyboard/keymaps/via/keymap.c | 39 ++++++++++++++++++++++ keyboards/sixkeyboard/keymaps/via/rules.mk | 2 ++ 2 files changed, 41 insertions(+) create mode 100644 keyboards/sixkeyboard/keymaps/via/keymap.c create mode 100644 keyboards/sixkeyboard/keymaps/via/rules.mk diff --git a/keyboards/sixkeyboard/keymaps/via/keymap.c b/keyboards/sixkeyboard/keymaps/via/keymap.c new file mode 100644 index 000000000000..fed341595c39 --- /dev/null +++ b/keyboards/sixkeyboard/keymaps/via/keymap.c @@ -0,0 +1,39 @@ +/* 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 QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT( + KC_A, KC_B, KC_C, + KC_D, KC_E, KC_F + ), + + [1] = LAYOUT( + 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 + ), + + [3] = LAYOUT( + KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS + ) +}; diff --git a/keyboards/sixkeyboard/keymaps/via/rules.mk b/keyboards/sixkeyboard/keymaps/via/rules.mk new file mode 100644 index 000000000000..43061db1dd46 --- /dev/null +++ b/keyboards/sixkeyboard/keymaps/via/rules.mk @@ -0,0 +1,2 @@ +VIA_ENABLE = yes +LTO_ENABLE = yes \ No newline at end of file From eead2c6087d219b55349c11d9a4091a777b5700d Mon Sep 17 00:00:00 2001 From: Sendy YK Date: Thu, 3 Sep 2020 15:36:04 +0700 Subject: [PATCH 725/930] Update DZ60 Information (#10186) * Remove #define DESCRIPTION * Update readme.md * Update keyboards/readme.md * Update keyboards/readme.md --- keyboards/dz60/config.h | 1 - keyboards/dz60/readme.md | 12 +++++++----- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/keyboards/dz60/config.h b/keyboards/dz60/config.h index bb7b6ae7da36..3699ef755280 100644 --- a/keyboards/dz60/config.h +++ b/keyboards/dz60/config.h @@ -8,7 +8,6 @@ #define DEVICE_VER 0x0001 #define MANUFACTURER KBDFans #define PRODUCT DZ60 -#define DESCRIPTION DZ60 Keyboard /* key matrix size */ #define MATRIX_ROWS 5 diff --git a/keyboards/dz60/readme.md b/keyboards/dz60/readme.md index eb6d28d5d61d..55df690cf30b 100644 --- a/keyboards/dz60/readme.md +++ b/keyboards/dz60/readme.md @@ -1,12 +1,14 @@ -# DZ60 +# DZ60 60% Mechanical Keyboard PCB -![dz60](https://cdn.shopify.com/s/files/1/1473/3902/files/1_6525343b-ee62-47e8-882a-05e316136a3f.jpg?v=1501657073) +![DZ60](https://cdn.shopify.com/s/files/1/1473/3902/products/c_1.jpg) -A customizable 60% keyboard. +## A Customizable 60% Mechanical Keyboard PCB + +![A Customizable 60% Mechanical Keyboard PCB](https://cdn.shopify.com/s/files/1/1473/3902/files/1_03_abb48769-9486-44bd-a761-7cd39d7e1bda.jpg) * Keyboard Maintainer: QMK Community -* Hardware Supported: DZ60 -* Hardware Availability: [KBDfans](https://kbdfans.myshopify.com/collections/pcb/products/dz60-60-pcb?variant=40971616717) +* Hardware Supported: DZ60 60% Mechanical Keyboard PCB +* Hardware Availability: [KBDfans](https://kbdfans.com/collections/60/products/dz60-60-pcb) Make example for this keyboard (after setting up your build environment): From bad589ec59ef47e926dbc5b40e2802e3275d4105 Mon Sep 17 00:00:00 2001 From: gtips <51393966+gtips@users.noreply.github.com> Date: Thu, 3 Sep 2020 17:42:09 +0900 Subject: [PATCH 726/930] [Keyboard] reviung33 (#10162) * [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 * Update readme.md Change the image photo of readme.md. * [Keyboard] Add reviung61 * Update readme.md * fix keyboards/reviung61/ and add keymap default_rgb * fix keyboards/reviung61/info.json * fix keyboards/reviung61/info.json * remove keyboards/reviung61/keymaps/default/config.h * [keyboard] Fixed readme.md for reviung39 and 61. * [keyboard] add keyboard reviung33 * fix keyboards/reviung33/rules.mk * modified: keyboards/reving33/config.h * modified: keyboards/reving33/info.json * modified: keyboards/reving33/keymaps/default/keymap.c --- keyboards/reviung33/config.h | 137 ++++++++++++++++++ keyboards/reviung33/info.json | 49 +++++++ keyboards/reviung33/keymaps/default/keymap.c | 71 +++++++++ keyboards/reviung33/keymaps/default/readme.md | 1 + .../reviung33/keymaps/default_jp/keymap.c | 70 +++++++++ .../reviung33/keymaps/default_jp/readme.md | 1 + keyboards/reviung33/readme.md | 15 ++ keyboards/reviung33/reviung33.c | 17 +++ keyboards/reviung33/reviung33.h | 40 +++++ keyboards/reviung33/rules.mk | 22 +++ 10 files changed, 423 insertions(+) create mode 100644 keyboards/reviung33/config.h create mode 100644 keyboards/reviung33/info.json create mode 100644 keyboards/reviung33/keymaps/default/keymap.c create mode 100644 keyboards/reviung33/keymaps/default/readme.md create mode 100644 keyboards/reviung33/keymaps/default_jp/keymap.c create mode 100644 keyboards/reviung33/keymaps/default_jp/readme.md create mode 100644 keyboards/reviung33/readme.md create mode 100644 keyboards/reviung33/reviung33.c create mode 100644 keyboards/reviung33/reviung33.h create mode 100644 keyboards/reviung33/rules.mk diff --git a/keyboards/reviung33/config.h b/keyboards/reviung33/config.h new file mode 100644 index 000000000000..b65d1d7c3942 --- /dev/null +++ b/keyboards/reviung33/config.h @@ -0,0 +1,137 @@ +/* +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 0x516D +#define DEVICE_VER 0x0001 +#define MANUFACTURER gtips +#define PRODUCT reviung33 + +/* key matrix size */ +#define MATRIX_ROWS 4 +#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 { F4, F5, F6, F7} +#define MATRIX_COL_PINS { D4, C6, D7, E6, B4, B1, B3, B2, B6, B5 } +#define UNUSED_PINS + +/* COL2ROW, ROW2COL */ +#define DIODE_DIRECTION COL2ROW + +#define RGB_DI_PIN D3 +#ifdef RGB_DI_PIN +# define RGBLED_NUM 5 +# 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 useful 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 + +/* + * 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 */ +#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/reviung33/info.json b/keyboards/reviung33/info.json new file mode 100644 index 000000000000..559c2e0145f8 --- /dev/null +++ b/keyboards/reviung33/info.json @@ -0,0 +1,49 @@ +{ + "keyboard_name": "reviung33", + "url": "", + "maintainer": "gtips", + "width": 3, + "height": 2, + "layouts": { + "LAYOUT_reviung33": { + "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":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":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":0, "y":3}, + {"x":2, "y":3, "w":6}, + {"x":9, "y":3} + ] + } + } +} diff --git a/keyboards/reviung33/keymaps/default/keymap.c b/keyboards/reviung33/keymaps/default/keymap.c new file mode 100644 index 000000000000..875df9760150 --- /dev/null +++ b/keyboards/reviung33/keymaps/default/keymap.c @@ -0,0 +1,71 @@ +/* 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 + +// Defines names for use in layer keycodes and the keymap +enum layer_names { + _BASE, + _LOWER, + _RAISE, + _ADJUST +}; + +#define LOWER MO(_LOWER) +#define RAISE MO(_RAISE) + +#define CT_Q LCTL_T(KC_Q) +#define CT_CM RCTL_T(KC_COMM) +#define SF_Z LSFT_T(KC_Z) +#define SF_SS RSFT_T(KC_SLSH) +#define AL_X LALT_T(KC_X) +#define AL_DT RALT_T(KC_DOT) +#define TB_LO LT(LOWER, KC_TAB) +#define BS_RA LT(RAISE, KC_BSPC) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_BASE] = LAYOUT_reviung33( + CT_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, + SF_Z, AL_X, KC_C, KC_V, KC_B, KC_N, KC_M, CT_CM, AL_DT, SF_SS, + TB_LO, KC_SPC, BS_RA + ), + + [_LOWER] = LAYOUT_reviung33( + 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_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_SCLN, + KC_LSFT, KC_ESC, KC_LGUI, KC_LALT, KC_QUOT, KC_HOME, KC_END, KC_PGUP, KC_PGDN, KC_RSFT, + _______, _______, _______ + ), + + [_RAISE] = LAYOUT_reviung33( + KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, + KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, XXXXXXX, XXXXXXX, KC_GRV, KC_TILD, KC_COLN, + KC_LSFT, KC_ESC, KC_RGUI, KC_LALT, KC_DQUO, KC_TAB, KC_RALT, KC_RCTL, KC_RALT, KC_RSFT, + _______, KC_DEL, _______ + ), + + [_ADJUST] = LAYOUT_reviung33( + RGB_VAI, RGB_SAI, RGB_HUI, RGB_MOD, RGB_TOG, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, + RGB_VAD, RGB_SAD, RGB_HUD, RGB_RMOD,XXXXXXX, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RESET, KC_F11, KC_F12, KC_CAPS, XXXXXXX, KC_PSCR, + _______, _______, _______ + ), +}; + +layer_state_t layer_state_set_user(layer_state_t state) { + return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST); +} + diff --git a/keyboards/reviung33/keymaps/default/readme.md b/keyboards/reviung33/keymaps/default/readme.md new file mode 100644 index 000000000000..9121b14294d6 --- /dev/null +++ b/keyboards/reviung33/keymaps/default/readme.md @@ -0,0 +1 @@ +# The default keymap for reviung33 diff --git a/keyboards/reviung33/keymaps/default_jp/keymap.c b/keyboards/reviung33/keymaps/default_jp/keymap.c new file mode 100644 index 000000000000..1265a301ed6b --- /dev/null +++ b/keyboards/reviung33/keymaps/default_jp/keymap.c @@ -0,0 +1,70 @@ +/* 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 +#include "keymap_jp.h" + +enum layer_names { + _BASE, + _LOWER, + _RAISE, + _ADJUST +}; + +#define LOWER MO(_LOWER) +#define RAISE MO(_RAISE) + +#define CT_Q LCTL_T(JP_Q) +#define CT_CM RCTL_T(JP_COMM) +#define SF_Z LSFT_T(JP_Z) +#define SF_SS RSFT_T(JP_SLSH) +#define AL_X LALT_T(JP_X) +#define AL_DT RALT_T(JP_DOT) +#define TB_LO LT(LOWER, KC_TAB) +#define BS_RA LT(RAISE, KC_BSPC) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_BASE] = LAYOUT_reviung33( + CT_Q, JP_W, JP_E, JP_R, JP_T, JP_Y, JP_U, JP_I, JP_O, JP_P, + JP_A, JP_S, JP_D, JP_F, JP_G, JP_H, JP_J, JP_K, JP_L, KC_ENT, + SF_Z, AL_X, JP_C, JP_V, JP_B, JP_N, JP_M, CT_CM, AL_DT, SF_SS, + TB_LO, KC_SPC, BS_RA + ), + + [_LOWER] = LAYOUT_reviung33( + JP_EXLM, JP_AT, JP_HASH, JP_DLR, JP_PERC, JP_CIRC, JP_AMPR, JP_ASTR, JP_LPRN, JP_RPRN, + JP_UNDS, JP_PLUS, JP_LCBR, JP_RCBR, JP_PIPE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, JP_SCLN, + KC_LSFT, KC_ESC, KC_LGUI, KC_LALT, JP_QUOT, KC_HOME, KC_END, KC_PGUP, KC_PGDN, KC_RSFT, + _______, _______, _______ + ), + + [_RAISE] = LAYOUT_reviung33( + JP_1, JP_2, JP_3, JP_4, JP_5, JP_6, JP_7, JP_8, JP_9, JP_0, + JP_MINS, JP_EQL, JP_LBRC, JP_RBRC, JP_YEN, KC_RO, XXXXXXX, JP_GRV, JP_TILD, JP_COLN, + KC_LSFT, KC_ESC, KC_RGUI, KC_LALT, JP_DQUO, KC_TAB, XXXXXXX, KC_RCTL, KC_RALT, KC_RSFT, + _______, KC_DEL, _______ + ), + + [_ADJUST] = LAYOUT_reviung33( + RGB_VAI, RGB_SAI, RGB_HUI, RGB_MOD, RGB_TOG, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, + RGB_VAD, RGB_SAD, RGB_HUD, RGB_RMOD,XXXXXXX, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RESET, KC_F11, KC_F12, KC_CAPS, XXXXXXX, KC_PSCR, + _______, _______, _______ + ), +}; + +layer_state_t layer_state_set_user(layer_state_t state) { + return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST); +} diff --git a/keyboards/reviung33/keymaps/default_jp/readme.md b/keyboards/reviung33/keymaps/default_jp/readme.md new file mode 100644 index 000000000000..d7739a3d86bf --- /dev/null +++ b/keyboards/reviung33/keymaps/default_jp/readme.md @@ -0,0 +1 @@ +# The default_jp keymap for reviung33 diff --git a/keyboards/reviung33/readme.md b/keyboards/reviung33/readme.md new file mode 100644 index 000000000000..64ed4d57fe8f --- /dev/null +++ b/keyboards/reviung33/readme.md @@ -0,0 +1,15 @@ +# reviung33 + +![REVIUNG33](https://github.com/gtips/reviung/blob/master/reviung33/image/reviung33-01.jpg) + +The REVIUNG33 is 33-key ortholinear keyboard. + +* Keyboard Maintainer: [gtips](https://github.com/gtips) +* Hardware Supported: REVIUNG33 PCB. +* Hardware Availability: [PCB & Case Data](https://github.com/gtips/reviung/tree/master/reviung33) + +Make example for this keyboard (after setting up your build environment): + + make reviung33: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/reviung33/reviung33.c b/keyboards/reviung33/reviung33.c new file mode 100644 index 000000000000..7684cb72c88c --- /dev/null +++ b/keyboards/reviung33/reviung33.c @@ -0,0 +1,17 @@ +/* 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 "reviung33.h" diff --git a/keyboards/reviung33/reviung33.h b/keyboards/reviung33/reviung33.h new file mode 100644 index 000000000000..ea72a4aadb4a --- /dev/null +++ b/keyboards/reviung33/reviung33.h @@ -0,0 +1,40 @@ +/* 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 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_reviung33( \ + 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 \ +) \ +{ \ + { 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, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO } \ +} diff --git a/keyboards/reviung33/rules.mk b/keyboards/reviung33/rules.mk new file mode 100644 index 000000000000..4581b001d504 --- /dev/null +++ b/keyboards/reviung33/rules.mk @@ -0,0 +1,22 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +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 = no # Console for debug +COMMAND_ENABLE = no # Commands for debug and configuration +# 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 +BLUETOOTH_ENABLE = no # Enable Bluetooth +AUDIO_ENABLE = no # Audio output From 2f26e14dc627592734769424b09007e02ddb3c09 Mon Sep 17 00:00:00 2001 From: MelGeek <65591833+melgeek001365@users.noreply.github.com> Date: Thu, 3 Sep 2020 18:37:04 +0800 Subject: [PATCH 727/930] Update ISSI3741 (#9912) * [Driver] bugfix reset the scaling register flag to FALSE * Update drivers/issi/is31fl3741.c Co-authored-by: Ryan * Add CS & SW defines for ISSI3741 * Make IS31FL3741 control register update clearer Co-authored-by: Ryan Co-authored-by: Jumail Mundekkat --- drivers/issi/is31fl3741.c | 76 +++----- drivers/issi/is31fl3741.h | 379 +++++++++++++++++++++++++++++++++++++- 2 files changed, 394 insertions(+), 61 deletions(-) diff --git a/drivers/issi/is31fl3741.c b/drivers/issi/is31fl3741.c index fc5c58835d56..99d72b9b01c1 100644 --- a/drivers/issi/is31fl3741.c +++ b/drivers/issi/is31fl3741.c @@ -78,22 +78,6 @@ bool g_scaling_registers_update_required[DRIVER_COUNT] = {false}; uint8_t g_scaling_registers[DRIVER_COUNT][ISSI_MAX_LEDS]; -uint32_t IS31FL3741_get_cw_sw_position(uint8_t cs, uint8_t sw) { - uint32_t pos = 0; - - if (cs < 31) { - if (sw < 7) { - pos = (sw - 1) * 30 + (cs - 1); - - } else { - pos = 0xB4 + (sw - 7) * 30 + (cs - 1); - } - } else { - pos = 0xB4 + 0x5A + (sw - 1) * 9 + (cs - 31); - } - - return pos; -} void IS31FL3741_write_register(uint8_t addr, uint8_t reg, uint8_t data) { g_twi_transfer_buffer[0] = reg; @@ -186,15 +170,10 @@ void IS31FL3741_init(uint8_t addr) { void IS31FL3741_set_color(int index, uint8_t red, uint8_t green, uint8_t blue) { if (index >= 0 && index < DRIVER_LED_TOTAL) { is31_led led = g_is31_leds[index]; - uint32_t rp = 0, gp = 0, bp = 0; - rp = IS31FL3741_get_cw_sw_position(led.rcs, led.rsw); - gp = IS31FL3741_get_cw_sw_position(led.gcs, led.gsw); - bp = IS31FL3741_get_cw_sw_position(led.bcs, led.bsw); - - g_pwm_buffer[led.driver][rp] = red; - g_pwm_buffer[led.driver][gp] = green; - g_pwm_buffer[led.driver][bp] = blue; + g_pwm_buffer[led.driver][led.r] = red; + g_pwm_buffer[led.driver][led.g] = green; + g_pwm_buffer[led.driver][led.b] = blue; g_pwm_buffer_update_required = true; } } @@ -208,26 +187,22 @@ void IS31FL3741_set_color_all(uint8_t red, uint8_t green, uint8_t blue) { void IS31FL3741_set_led_control_register(uint8_t index, bool red, bool green, bool blue) { is31_led led = g_is31_leds[index]; - uint32_t scaling_register_r = IS31FL3741_get_cw_sw_position(led.rcs, led.rsw); - uint32_t scaling_register_g = IS31FL3741_get_cw_sw_position(led.gcs, led.gsw); - uint32_t scaling_register_b = IS31FL3741_get_cw_sw_position(led.bcs, led.bsw); - if (red) { - g_scaling_registers[led.driver][scaling_register_r] = 0xFF; + g_scaling_registers[led.driver][led.r] = 0xFF; } else { - g_scaling_registers[led.driver][scaling_register_r] = 0x00; + g_scaling_registers[led.driver][led.r] = 0x00; } if (green) { - g_scaling_registers[led.driver][scaling_register_g] = 0xFF; + g_scaling_registers[led.driver][led.g] = 0xFF; } else { - g_scaling_registers[led.driver][scaling_register_g] = 0x00; + g_scaling_registers[led.driver][led.g] = 0x00; } if (blue) { - g_scaling_registers[led.driver][scaling_register_b] = 0xFF; + g_scaling_registers[led.driver][led.b] = 0xFF; } else { - g_scaling_registers[led.driver][scaling_register_b] = 0x00; + g_scaling_registers[led.driver][led.b] = 0x00; } g_scaling_registers_update_required[led.driver] = true; @@ -242,15 +217,9 @@ void IS31FL3741_update_pwm_buffers(uint8_t addr1, uint8_t addr2) { } void IS31FL3741_set_pwm_buffer(const is31_led *pled, uint8_t red, uint8_t green, uint8_t blue) { - uint32_t rp = 0, gp = 0, bp = 0; - - rp = IS31FL3741_get_cw_sw_position(pled->rcs, pled->rsw); - gp = IS31FL3741_get_cw_sw_position(pled->gcs, pled->gsw); - bp = IS31FL3741_get_cw_sw_position(pled->bcs, pled->bsw); - - g_pwm_buffer[pled->driver][rp] = red; - g_pwm_buffer[pled->driver][gp] = green; - g_pwm_buffer[pled->driver][bp] = blue; + g_pwm_buffer[pled->driver][pled->r] = red; + g_pwm_buffer[pled->driver][pled->g] = green; + g_pwm_buffer[pled->driver][pled->b] = blue; g_pwm_buffer_update_required = true; } @@ -261,7 +230,8 @@ void IS31FL3741_update_led_control_registers(uint8_t addr, uint8_t index) { IS31FL3741_write_register(addr, ISSI_COMMANDREGISTER_WRITELOCK, 0xC5); IS31FL3741_write_register(addr, ISSI_COMMANDREGISTER, ISSI_PAGE_SCALING_0); - for (int i = 0; i < 180; ++i) { + // CS1_SW1 to CS30_SW6 are on PG2 + for (int i = CS1_SW1; i <= CS30_SW6; ++i) { IS31FL3741_write_register(addr, i, g_scaling_registers[0][i]); } @@ -269,8 +239,9 @@ void IS31FL3741_update_led_control_registers(uint8_t addr, uint8_t index) { IS31FL3741_write_register(addr, ISSI_COMMANDREGISTER_WRITELOCK, 0xC5); IS31FL3741_write_register(addr, ISSI_COMMANDREGISTER, ISSI_PAGE_SCALING_1); - for (int i = 0; i < 171; ++i) { - IS31FL3741_write_register(addr, i, g_scaling_registers[0][180 + i]); + // CS1_SW7 to CS39_SW9 are on PG3 + for (int i = CS1_SW7; i <= CS39_SW9; ++i) { + IS31FL3741_write_register(addr, i - CS1_SW7, g_scaling_registers[0][i]); } g_scaling_registers_update_required[index] = false; @@ -278,13 +249,8 @@ void IS31FL3741_update_led_control_registers(uint8_t addr, uint8_t index) { } void IS31FL3741_set_scaling_registers(const is31_led *pled, uint8_t red, uint8_t green, uint8_t blue) { - uint32_t rp = 0, gp = 0, bp = 0; - - rp = IS31FL3741_get_cw_sw_position(pled->rcs, pled->rsw); - gp = IS31FL3741_get_cw_sw_position(pled->gcs, pled->gsw); - bp = IS31FL3741_get_cw_sw_position(pled->bcs, pled->bsw); - - g_scaling_registers[pled->driver][rp] = red; - g_scaling_registers[pled->driver][gp] = green; - g_scaling_registers[pled->driver][bp] = blue; + g_scaling_registers[pled->driver][pled->r] = red; + g_scaling_registers[pled->driver][pled->g] = green; + g_scaling_registers[pled->driver][pled->b] = blue; } + diff --git a/drivers/issi/is31fl3741.h b/drivers/issi/is31fl3741.h index 3fa853467be2..69cf206d4a0c 100644 --- a/drivers/issi/is31fl3741.h +++ b/drivers/issi/is31fl3741.h @@ -24,12 +24,9 @@ typedef struct is31_led { uint8_t driver : 2; - uint8_t rcs; - uint8_t rsw; - uint8_t gcs; - uint8_t gsw; - uint8_t bcs; - uint8_t bsw; + uint16_t r; + uint16_t g; + uint16_t b; } __attribute__((packed)) is31_led; extern const is31_led g_is31_leds[DRIVER_LED_TOTAL]; @@ -53,3 +50,373 @@ void IS31FL3741_update_led_control_registers(uint8_t addr1, uint8_t addr2); void IS31FL3741_set_scaling_registers(const is31_led *pled, uint8_t red, uint8_t green, uint8_t blue); void IS31FL3741_set_pwm_buffer(const is31_led *pled, uint8_t red, uint8_t green, uint8_t blue); + +#define CS1_SW1 0x00 +#define CS2_SW1 0x01 +#define CS3_SW1 0x02 +#define CS4_SW1 0x03 +#define CS5_SW1 0x04 +#define CS6_SW1 0x05 +#define CS7_SW1 0x06 +#define CS8_SW1 0x07 +#define CS9_SW1 0x08 +#define CS10_SW1 0x09 +#define CS11_SW1 0x0A +#define CS12_SW1 0x0B +#define CS13_SW1 0x0C +#define CS14_SW1 0x0D +#define CS15_SW1 0x0E +#define CS16_SW1 0x0F +#define CS17_SW1 0x10 +#define CS18_SW1 0x11 +#define CS19_SW1 0x12 +#define CS20_SW1 0x13 +#define CS21_SW1 0x14 +#define CS22_SW1 0x15 +#define CS23_SW1 0x16 +#define CS24_SW1 0x17 +#define CS25_SW1 0x18 +#define CS26_SW1 0x19 +#define CS27_SW1 0x1A +#define CS28_SW1 0x1B +#define CS29_SW1 0x1C +#define CS30_SW1 0x1D + +#define CS1_SW2 0x1E +#define CS2_SW2 0x1F +#define CS3_SW2 0x20 +#define CS4_SW2 0x21 +#define CS5_SW2 0x22 +#define CS6_SW2 0x23 +#define CS7_SW2 0x24 +#define CS8_SW2 0x25 +#define CS9_SW2 0x26 +#define CS10_SW2 0x27 +#define CS11_SW2 0x28 +#define CS12_SW2 0x29 +#define CS13_SW2 0x2A +#define CS14_SW2 0x2B +#define CS15_SW2 0x2C +#define CS16_SW2 0x2D +#define CS17_SW2 0x2E +#define CS18_SW2 0x2F +#define CS19_SW2 0x30 +#define CS20_SW2 0x31 +#define CS21_SW2 0x32 +#define CS22_SW2 0x33 +#define CS23_SW2 0x34 +#define CS24_SW2 0x35 +#define CS25_SW2 0x36 +#define CS26_SW2 0x37 +#define CS27_SW2 0x38 +#define CS28_SW2 0x39 +#define CS29_SW2 0x3A +#define CS30_SW2 0x3B + +#define CS1_SW3 0x3C +#define CS2_SW3 0x3D +#define CS3_SW3 0x3E +#define CS4_SW3 0x3F +#define CS5_SW3 0x40 +#define CS6_SW3 0x41 +#define CS7_SW3 0x42 +#define CS8_SW3 0x43 +#define CS9_SW3 0x44 +#define CS10_SW3 0x45 +#define CS11_SW3 0x46 +#define CS12_SW3 0x47 +#define CS13_SW3 0x48 +#define CS14_SW3 0x49 +#define CS15_SW3 0x4A +#define CS16_SW3 0x4B +#define CS17_SW3 0x4C +#define CS18_SW3 0x4D +#define CS19_SW3 0x4E +#define CS20_SW3 0x4F +#define CS21_SW3 0x50 +#define CS22_SW3 0x51 +#define CS23_SW3 0x52 +#define CS24_SW3 0x53 +#define CS25_SW3 0x54 +#define CS26_SW3 0x55 +#define CS27_SW3 0x56 +#define CS28_SW3 0x57 +#define CS29_SW3 0x58 +#define CS30_SW3 0x59 + +#define CS1_SW4 0x5A +#define CS2_SW4 0x5B +#define CS3_SW4 0x5C +#define CS4_SW4 0x5D +#define CS5_SW4 0x5E +#define CS6_SW4 0x5F +#define CS7_SW4 0x60 +#define CS8_SW4 0x61 +#define CS9_SW4 0x62 +#define CS10_SW4 0x63 +#define CS11_SW4 0x64 +#define CS12_SW4 0x65 +#define CS13_SW4 0x66 +#define CS14_SW4 0x67 +#define CS15_SW4 0x68 +#define CS16_SW4 0x69 +#define CS17_SW4 0x6A +#define CS18_SW4 0x6B +#define CS19_SW4 0x6C +#define CS20_SW4 0x6D +#define CS21_SW4 0x6E +#define CS22_SW4 0x6F +#define CS23_SW4 0x70 +#define CS24_SW4 0x71 +#define CS25_SW4 0x72 +#define CS26_SW4 0x73 +#define CS27_SW4 0x74 +#define CS28_SW4 0x75 +#define CS29_SW4 0x76 +#define CS30_SW4 0x77 + +#define CS1_SW5 0x78 +#define CS2_SW5 0x79 +#define CS3_SW5 0x7A +#define CS4_SW5 0x7B +#define CS5_SW5 0x7C +#define CS6_SW5 0x7D +#define CS7_SW5 0x7E +#define CS8_SW5 0x7F +#define CS9_SW5 0x80 +#define CS10_SW5 0x81 +#define CS11_SW5 0x82 +#define CS12_SW5 0x83 +#define CS13_SW5 0x84 +#define CS14_SW5 0x85 +#define CS15_SW5 0x86 +#define CS16_SW5 0x87 +#define CS17_SW5 0x88 +#define CS18_SW5 0x89 +#define CS19_SW5 0x8A +#define CS20_SW5 0x8B +#define CS21_SW5 0x8C +#define CS22_SW5 0x8D +#define CS23_SW5 0x8E +#define CS24_SW5 0x8F +#define CS25_SW5 0x90 +#define CS26_SW5 0x91 +#define CS27_SW5 0x92 +#define CS28_SW5 0x93 +#define CS29_SW5 0x94 +#define CS30_SW5 0x95 + +#define CS1_SW6 0x96 +#define CS2_SW6 0x97 +#define CS3_SW6 0x98 +#define CS4_SW6 0x99 +#define CS5_SW6 0x9A +#define CS6_SW6 0x9B +#define CS7_SW6 0x9C +#define CS8_SW6 0x9D +#define CS9_SW6 0x9E +#define CS10_SW6 0x9F +#define CS11_SW6 0xA0 +#define CS12_SW6 0xA1 +#define CS13_SW6 0xA2 +#define CS14_SW6 0xA3 +#define CS15_SW6 0xA4 +#define CS16_SW6 0xA5 +#define CS17_SW6 0xA6 +#define CS18_SW6 0xA7 +#define CS19_SW6 0xA8 +#define CS20_SW6 0xA9 +#define CS21_SW6 0xAA +#define CS22_SW6 0xAB +#define CS23_SW6 0xAC +#define CS24_SW6 0xAD +#define CS25_SW6 0xAE +#define CS26_SW6 0xAF +#define CS27_SW6 0xB0 +#define CS28_SW6 0xB1 +#define CS29_SW6 0xB2 +#define CS30_SW6 0xB3 + +#define CS1_SW7 0xB4 +#define CS2_SW7 0xB5 +#define CS3_SW7 0xB6 +#define CS4_SW7 0xB7 +#define CS5_SW7 0xB8 +#define CS6_SW7 0xB9 +#define CS7_SW7 0xBA +#define CS8_SW7 0xBB +#define CS9_SW7 0xBC +#define CS10_SW7 0xBD +#define CS11_SW7 0xBE +#define CS12_SW7 0xBF +#define CS13_SW7 0xC0 +#define CS14_SW7 0xC1 +#define CS15_SW7 0xC2 +#define CS16_SW7 0xC3 +#define CS17_SW7 0xC4 +#define CS18_SW7 0xC5 +#define CS19_SW7 0xC6 +#define CS20_SW7 0xC7 +#define CS21_SW7 0xC8 +#define CS22_SW7 0xC9 +#define CS23_SW7 0xCA +#define CS24_SW7 0xCB +#define CS25_SW7 0xCC +#define CS26_SW7 0xCD +#define CS27_SW7 0xCE +#define CS28_SW7 0xCF +#define CS29_SW7 0xD0 +#define CS30_SW7 0xD1 + +#define CS1_SW8 0xD2 +#define CS2_SW8 0xD3 +#define CS3_SW8 0xD4 +#define CS4_SW8 0xD5 +#define CS5_SW8 0xD6 +#define CS6_SW8 0xD7 +#define CS7_SW8 0xD8 +#define CS8_SW8 0xD9 +#define CS9_SW8 0xDA +#define CS10_SW8 0xDB +#define CS11_SW8 0xDC +#define CS12_SW8 0xDD +#define CS13_SW8 0xDE +#define CS14_SW8 0xDF +#define CS15_SW8 0xE0 +#define CS16_SW8 0xE1 +#define CS17_SW8 0xE2 +#define CS18_SW8 0xE3 +#define CS19_SW8 0xE4 +#define CS20_SW8 0xE5 +#define CS21_SW8 0xE6 +#define CS22_SW8 0xE7 +#define CS23_SW8 0xE8 +#define CS24_SW8 0xE9 +#define CS25_SW8 0xEA +#define CS26_SW8 0xEB +#define CS27_SW8 0xEC +#define CS28_SW8 0xED +#define CS29_SW8 0xEE +#define CS30_SW8 0xEF + +#define CS1_SW9 0xF0 +#define CS2_SW9 0xF1 +#define CS3_SW9 0xF2 +#define CS4_SW9 0xF3 +#define CS5_SW9 0xF4 +#define CS6_SW9 0xF5 +#define CS7_SW9 0xF6 +#define CS8_SW9 0xF7 +#define CS9_SW9 0xF8 +#define CS10_SW9 0xF9 +#define CS11_SW9 0xFA +#define CS12_SW9 0xFB +#define CS13_SW9 0xFC +#define CS14_SW9 0xFD +#define CS15_SW9 0xFE +#define CS16_SW9 0xFF +#define CS17_SW9 0x100 +#define CS18_SW9 0x101 +#define CS19_SW9 0x102 +#define CS20_SW9 0x103 +#define CS21_SW9 0x104 +#define CS22_SW9 0x105 +#define CS23_SW9 0x106 +#define CS24_SW9 0x107 +#define CS25_SW9 0x108 +#define CS26_SW9 0x109 +#define CS27_SW9 0x10A +#define CS28_SW9 0x10B +#define CS29_SW9 0x10C +#define CS30_SW9 0x10D + +#define CS31_SW1 0x10E +#define CS32_SW1 0x10F +#define CS33_SW1 0x110 +#define CS34_SW1 0x111 +#define CS35_SW1 0x112 +#define CS36_SW1 0x113 +#define CS37_SW1 0x114 +#define CS38_SW1 0x115 +#define CS39_SW1 0x116 + +#define CS31_SW2 0x117 +#define CS32_SW2 0x118 +#define CS33_SW2 0x119 +#define CS34_SW2 0x11A +#define CS35_SW2 0x11B +#define CS36_SW2 0x11C +#define CS37_SW2 0x11D +#define CS38_SW2 0x11E +#define CS39_SW2 0x11F + +#define CS31_SW3 0x120 +#define CS32_SW3 0x121 +#define CS33_SW3 0x122 +#define CS34_SW3 0x123 +#define CS35_SW3 0x124 +#define CS36_SW3 0x125 +#define CS37_SW3 0x126 +#define CS38_SW3 0x127 +#define CS39_SW3 0x128 + +#define CS31_SW4 0x129 +#define CS32_SW4 0x12A +#define CS33_SW4 0x12B +#define CS34_SW4 0x12C +#define CS35_SW4 0x12D +#define CS36_SW4 0x12E +#define CS37_SW4 0x12F +#define CS38_SW4 0x130 +#define CS39_SW4 0x131 + +#define CS31_SW5 0x132 +#define CS32_SW5 0x133 +#define CS33_SW5 0x134 +#define CS34_SW5 0x135 +#define CS35_SW5 0x136 +#define CS36_SW5 0x137 +#define CS37_SW5 0x138 +#define CS38_SW5 0x139 +#define CS39_SW5 0x13A + +#define CS31_SW6 0x13B +#define CS32_SW6 0x13C +#define CS33_SW6 0x13D +#define CS34_SW6 0x13E +#define CS35_SW6 0x13F +#define CS36_SW6 0x140 +#define CS37_SW6 0x141 +#define CS38_SW6 0x142 +#define CS39_SW6 0x143 + +#define CS31_SW7 0x144 +#define CS32_SW7 0x145 +#define CS33_SW7 0x146 +#define CS34_SW7 0x147 +#define CS35_SW7 0x148 +#define CS36_SW7 0x149 +#define CS37_SW7 0x14A +#define CS38_SW7 0x14B +#define CS39_SW7 0x14C + +#define CS31_SW8 0x14D +#define CS32_SW8 0x14E +#define CS33_SW8 0x14F +#define CS34_SW8 0x150 +#define CS35_SW8 0x151 +#define CS36_SW8 0x152 +#define CS37_SW8 0x153 +#define CS38_SW8 0x154 +#define CS39_SW8 0x155 + +#define CS31_SW9 0x156 +#define CS32_SW9 0x157 +#define CS33_SW9 0x158 +#define CS34_SW9 0x159 +#define CS35_SW9 0x15A +#define CS36_SW9 0x15B +#define CS37_SW9 0x15C +#define CS38_SW9 0x15D +#define CS39_SW9 0x15E + From 25e93b4b677c85165f6996f3de96f260121f549a Mon Sep 17 00:00:00 2001 From: QMK Bot Date: Thu, 3 Sep 2020 11:25:14 +0000 Subject: [PATCH 728/930] format code according to conventions [skip ci] --- drivers/issi/is31fl3741.c | 4 +- drivers/issi/is31fl3741.h | 165 +++++++++++++++++++------------------- 2 files changed, 83 insertions(+), 86 deletions(-) diff --git a/drivers/issi/is31fl3741.c b/drivers/issi/is31fl3741.c index 99d72b9b01c1..bc434fb29707 100644 --- a/drivers/issi/is31fl3741.c +++ b/drivers/issi/is31fl3741.c @@ -78,7 +78,6 @@ bool g_scaling_registers_update_required[DRIVER_COUNT] = {false}; uint8_t g_scaling_registers[DRIVER_COUNT][ISSI_MAX_LEDS]; - void IS31FL3741_write_register(uint8_t addr, uint8_t reg, uint8_t data) { g_twi_transfer_buffer[0] = reg; g_twi_transfer_buffer[1] = data; @@ -174,7 +173,7 @@ void IS31FL3741_set_color(int index, uint8_t red, uint8_t green, uint8_t blue) { g_pwm_buffer[led.driver][led.r] = red; g_pwm_buffer[led.driver][led.g] = green; g_pwm_buffer[led.driver][led.b] = blue; - g_pwm_buffer_update_required = true; + g_pwm_buffer_update_required = true; } } @@ -253,4 +252,3 @@ void IS31FL3741_set_scaling_registers(const is31_led *pled, uint8_t red, uint8_t g_scaling_registers[pled->driver][pled->g] = green; g_scaling_registers[pled->driver][pled->b] = blue; } - diff --git a/drivers/issi/is31fl3741.h b/drivers/issi/is31fl3741.h index 69cf206d4a0c..ed53509321ee 100644 --- a/drivers/issi/is31fl3741.h +++ b/drivers/issi/is31fl3741.h @@ -23,7 +23,7 @@ #include typedef struct is31_led { - uint8_t driver : 2; + uint8_t driver : 2; uint16_t r; uint16_t g; uint16_t b; @@ -51,15 +51,15 @@ void IS31FL3741_set_scaling_registers(const is31_led *pled, uint8_t red, uint8_t void IS31FL3741_set_pwm_buffer(const is31_led *pled, uint8_t red, uint8_t green, uint8_t blue); -#define CS1_SW1 0x00 -#define CS2_SW1 0x01 -#define CS3_SW1 0x02 -#define CS4_SW1 0x03 -#define CS5_SW1 0x04 -#define CS6_SW1 0x05 -#define CS7_SW1 0x06 -#define CS8_SW1 0x07 -#define CS9_SW1 0x08 +#define CS1_SW1 0x00 +#define CS2_SW1 0x01 +#define CS3_SW1 0x02 +#define CS4_SW1 0x03 +#define CS5_SW1 0x04 +#define CS6_SW1 0x05 +#define CS7_SW1 0x06 +#define CS8_SW1 0x07 +#define CS9_SW1 0x08 #define CS10_SW1 0x09 #define CS11_SW1 0x0A #define CS12_SW1 0x0B @@ -82,15 +82,15 @@ void IS31FL3741_set_pwm_buffer(const is31_led *pled, uint8_t red, uint8_t green, #define CS29_SW1 0x1C #define CS30_SW1 0x1D -#define CS1_SW2 0x1E -#define CS2_SW2 0x1F -#define CS3_SW2 0x20 -#define CS4_SW2 0x21 -#define CS5_SW2 0x22 -#define CS6_SW2 0x23 -#define CS7_SW2 0x24 -#define CS8_SW2 0x25 -#define CS9_SW2 0x26 +#define CS1_SW2 0x1E +#define CS2_SW2 0x1F +#define CS3_SW2 0x20 +#define CS4_SW2 0x21 +#define CS5_SW2 0x22 +#define CS6_SW2 0x23 +#define CS7_SW2 0x24 +#define CS8_SW2 0x25 +#define CS9_SW2 0x26 #define CS10_SW2 0x27 #define CS11_SW2 0x28 #define CS12_SW2 0x29 @@ -113,15 +113,15 @@ void IS31FL3741_set_pwm_buffer(const is31_led *pled, uint8_t red, uint8_t green, #define CS29_SW2 0x3A #define CS30_SW2 0x3B -#define CS1_SW3 0x3C -#define CS2_SW3 0x3D -#define CS3_SW3 0x3E -#define CS4_SW3 0x3F -#define CS5_SW3 0x40 -#define CS6_SW3 0x41 -#define CS7_SW3 0x42 -#define CS8_SW3 0x43 -#define CS9_SW3 0x44 +#define CS1_SW3 0x3C +#define CS2_SW3 0x3D +#define CS3_SW3 0x3E +#define CS4_SW3 0x3F +#define CS5_SW3 0x40 +#define CS6_SW3 0x41 +#define CS7_SW3 0x42 +#define CS8_SW3 0x43 +#define CS9_SW3 0x44 #define CS10_SW3 0x45 #define CS11_SW3 0x46 #define CS12_SW3 0x47 @@ -144,15 +144,15 @@ void IS31FL3741_set_pwm_buffer(const is31_led *pled, uint8_t red, uint8_t green, #define CS29_SW3 0x58 #define CS30_SW3 0x59 -#define CS1_SW4 0x5A -#define CS2_SW4 0x5B -#define CS3_SW4 0x5C -#define CS4_SW4 0x5D -#define CS5_SW4 0x5E -#define CS6_SW4 0x5F -#define CS7_SW4 0x60 -#define CS8_SW4 0x61 -#define CS9_SW4 0x62 +#define CS1_SW4 0x5A +#define CS2_SW4 0x5B +#define CS3_SW4 0x5C +#define CS4_SW4 0x5D +#define CS5_SW4 0x5E +#define CS6_SW4 0x5F +#define CS7_SW4 0x60 +#define CS8_SW4 0x61 +#define CS9_SW4 0x62 #define CS10_SW4 0x63 #define CS11_SW4 0x64 #define CS12_SW4 0x65 @@ -175,15 +175,15 @@ void IS31FL3741_set_pwm_buffer(const is31_led *pled, uint8_t red, uint8_t green, #define CS29_SW4 0x76 #define CS30_SW4 0x77 -#define CS1_SW5 0x78 -#define CS2_SW5 0x79 -#define CS3_SW5 0x7A -#define CS4_SW5 0x7B -#define CS5_SW5 0x7C -#define CS6_SW5 0x7D -#define CS7_SW5 0x7E -#define CS8_SW5 0x7F -#define CS9_SW5 0x80 +#define CS1_SW5 0x78 +#define CS2_SW5 0x79 +#define CS3_SW5 0x7A +#define CS4_SW5 0x7B +#define CS5_SW5 0x7C +#define CS6_SW5 0x7D +#define CS7_SW5 0x7E +#define CS8_SW5 0x7F +#define CS9_SW5 0x80 #define CS10_SW5 0x81 #define CS11_SW5 0x82 #define CS12_SW5 0x83 @@ -206,15 +206,15 @@ void IS31FL3741_set_pwm_buffer(const is31_led *pled, uint8_t red, uint8_t green, #define CS29_SW5 0x94 #define CS30_SW5 0x95 -#define CS1_SW6 0x96 -#define CS2_SW6 0x97 -#define CS3_SW6 0x98 -#define CS4_SW6 0x99 -#define CS5_SW6 0x9A -#define CS6_SW6 0x9B -#define CS7_SW6 0x9C -#define CS8_SW6 0x9D -#define CS9_SW6 0x9E +#define CS1_SW6 0x96 +#define CS2_SW6 0x97 +#define CS3_SW6 0x98 +#define CS4_SW6 0x99 +#define CS5_SW6 0x9A +#define CS6_SW6 0x9B +#define CS7_SW6 0x9C +#define CS8_SW6 0x9D +#define CS9_SW6 0x9E #define CS10_SW6 0x9F #define CS11_SW6 0xA0 #define CS12_SW6 0xA1 @@ -237,15 +237,15 @@ void IS31FL3741_set_pwm_buffer(const is31_led *pled, uint8_t red, uint8_t green, #define CS29_SW6 0xB2 #define CS30_SW6 0xB3 -#define CS1_SW7 0xB4 -#define CS2_SW7 0xB5 -#define CS3_SW7 0xB6 -#define CS4_SW7 0xB7 -#define CS5_SW7 0xB8 -#define CS6_SW7 0xB9 -#define CS7_SW7 0xBA -#define CS8_SW7 0xBB -#define CS9_SW7 0xBC +#define CS1_SW7 0xB4 +#define CS2_SW7 0xB5 +#define CS3_SW7 0xB6 +#define CS4_SW7 0xB7 +#define CS5_SW7 0xB8 +#define CS6_SW7 0xB9 +#define CS7_SW7 0xBA +#define CS8_SW7 0xBB +#define CS9_SW7 0xBC #define CS10_SW7 0xBD #define CS11_SW7 0xBE #define CS12_SW7 0xBF @@ -268,15 +268,15 @@ void IS31FL3741_set_pwm_buffer(const is31_led *pled, uint8_t red, uint8_t green, #define CS29_SW7 0xD0 #define CS30_SW7 0xD1 -#define CS1_SW8 0xD2 -#define CS2_SW8 0xD3 -#define CS3_SW8 0xD4 -#define CS4_SW8 0xD5 -#define CS5_SW8 0xD6 -#define CS6_SW8 0xD7 -#define CS7_SW8 0xD8 -#define CS8_SW8 0xD9 -#define CS9_SW8 0xDA +#define CS1_SW8 0xD2 +#define CS2_SW8 0xD3 +#define CS3_SW8 0xD4 +#define CS4_SW8 0xD5 +#define CS5_SW8 0xD6 +#define CS6_SW8 0xD7 +#define CS7_SW8 0xD8 +#define CS8_SW8 0xD9 +#define CS9_SW8 0xDA #define CS10_SW8 0xDB #define CS11_SW8 0xDC #define CS12_SW8 0xDD @@ -299,15 +299,15 @@ void IS31FL3741_set_pwm_buffer(const is31_led *pled, uint8_t red, uint8_t green, #define CS29_SW8 0xEE #define CS30_SW8 0xEF -#define CS1_SW9 0xF0 -#define CS2_SW9 0xF1 -#define CS3_SW9 0xF2 -#define CS4_SW9 0xF3 -#define CS5_SW9 0xF4 -#define CS6_SW9 0xF5 -#define CS7_SW9 0xF6 -#define CS8_SW9 0xF7 -#define CS9_SW9 0xF8 +#define CS1_SW9 0xF0 +#define CS2_SW9 0xF1 +#define CS3_SW9 0xF2 +#define CS4_SW9 0xF3 +#define CS5_SW9 0xF4 +#define CS6_SW9 0xF5 +#define CS7_SW9 0xF6 +#define CS8_SW9 0xF7 +#define CS9_SW9 0xF8 #define CS10_SW9 0xF9 #define CS11_SW9 0xFA #define CS12_SW9 0xFB @@ -419,4 +419,3 @@ void IS31FL3741_set_pwm_buffer(const is31_led *pled, uint8_t red, uint8_t green, #define CS37_SW9 0x15C #define CS38_SW9 0x15D #define CS39_SW9 0x15E - From c1a6b5f430a46206ce98a3c52284725e80322a98 Mon Sep 17 00:00:00 2001 From: Koichi Katano <36572567+kkatano@users.noreply.github.com> Date: Fri, 4 Sep 2020 01:09:36 +0900 Subject: [PATCH 729/930] [Keyboard] add Bakeneko 60 (#10212) * Add Bakeneko 60 keyboard * Apply suggestions from code review --- keyboards/bakeneko60/bakeneko60.c | 17 ++ keyboards/bakeneko60/bakeneko60.h | 61 +++++ keyboards/bakeneko60/config.h | 109 +++++++++ keyboards/bakeneko60/info.json | 219 ++++++++++++++++++ keyboards/bakeneko60/keymaps/default/keymap.c | 38 +++ .../bakeneko60/keymaps/default/readme.md | 1 + keyboards/bakeneko60/keymaps/via/keymap.c | 54 +++++ keyboards/bakeneko60/keymaps/via/rules.mk | 1 + keyboards/bakeneko60/readme.md | 17 ++ keyboards/bakeneko60/rules.mk | 24 ++ 10 files changed, 541 insertions(+) create mode 100644 keyboards/bakeneko60/bakeneko60.c create mode 100644 keyboards/bakeneko60/bakeneko60.h create mode 100644 keyboards/bakeneko60/config.h create mode 100644 keyboards/bakeneko60/info.json create mode 100644 keyboards/bakeneko60/keymaps/default/keymap.c create mode 100644 keyboards/bakeneko60/keymaps/default/readme.md create mode 100644 keyboards/bakeneko60/keymaps/via/keymap.c create mode 100644 keyboards/bakeneko60/keymaps/via/rules.mk create mode 100644 keyboards/bakeneko60/readme.md create mode 100644 keyboards/bakeneko60/rules.mk diff --git a/keyboards/bakeneko60/bakeneko60.c b/keyboards/bakeneko60/bakeneko60.c new file mode 100644 index 000000000000..809c1ccf1845 --- /dev/null +++ b/keyboards/bakeneko60/bakeneko60.c @@ -0,0 +1,17 @@ +/* Copyright 2020 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 "bakeneko60.h" diff --git a/keyboards/bakeneko60/bakeneko60.h b/keyboards/bakeneko60/bakeneko60.h new file mode 100644 index 000000000000..eb2e344f036a --- /dev/null +++ b/keyboards/bakeneko60/bakeneko60.h @@ -0,0 +1,61 @@ +/* Copyright 2020 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" + +#define LAYOUT_60_ansi_split_bs_rshift( \ + 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, k213, \ + k300, k302, k303, k304, k305, k306, k307, k308, k309, k310, k311, k312, k313, \ + k400, k401, k402, k406, 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, KC_NO}, \ + { k200, k201, k202, k203, k204, k205, k206, k207, k208, k209, k210, k211, KC_NO, k213, KC_NO}, \ + { k300, KC_NO, k302, k303, k304, k305, k306, k307, k308, k309, k310, k311, k312, k313, KC_NO}, \ + { k400, k401, k402, KC_NO, KC_NO, KC_NO, k406, KC_NO, KC_NO, KC_NO, k410, k411, k412, k413, KC_NO} \ +} + +#define LAYOUT_60_ansi( \ + k000, k001, k002, k003, k004, k005, k006, k007, k008, k009, k010, k011, k012, 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, k213, \ + k300, k302, k303, k304, k305, k306, k307, k308, k309, k310, k311, k312, \ + k400, k401, k402, k406, k410, k411, k412, k413 \ +) { \ + { k000, k001, k002, k003, k004, k005, k006, k007, k008, k009, k010, k011, k012, KC_NO, 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, KC_NO, k213, KC_NO}, \ + { k300, KC_NO, k302, k303, k304, k305, k306, k307, k308, k309, k310, k311, k312, KC_NO, KC_NO}, \ + { k400, k401, k402, KC_NO, KC_NO, KC_NO, k406, KC_NO, KC_NO, KC_NO, k410, k411, k412, k413, KC_NO} \ +} + +#define LAYOUT_60_tsangan_hhkb( \ + 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, 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, 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, KC_NO, k213, KC_NO}, \ + { k300, KC_NO, k302, k303, k304, k305, k306, k307, k308, k309, k310, k311, k312, k313, KC_NO}, \ + { k400, k401, k402, KC_NO, KC_NO, KC_NO, k406, KC_NO, KC_NO, KC_NO, KC_NO, k411, k412, k413, KC_NO} \ +} diff --git a/keyboards/bakeneko60/config.h b/keyboards/bakeneko60/config.h new file mode 100644 index 000000000000..9b923552bb61 --- /dev/null +++ b/keyboards/bakeneko60/config.h @@ -0,0 +1,109 @@ +/* +Copyright 2020 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 0x3A0E +#define PRODUCT_ID 0xCBDC +#define DEVICE_VER 0x0001 +#define MANUFACTURER kkatano +#define PRODUCT Bakeneko 60 + +/* 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 { E6, B7, F7, F4, F5 } +#define MATRIX_COL_PINS { F6, B0, F1, C7, C6, B6, B5, B4, D7, D6, D4, D5, D3, D2, D1 } +#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 useful 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 + +/* + * 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 */ +#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/bakeneko60/info.json b/keyboards/bakeneko60/info.json new file mode 100644 index 000000000000..6310825ae24a --- /dev/null +++ b/keyboards/bakeneko60/info.json @@ -0,0 +1,219 @@ +{ + "keyboard_name": "Bakeneko 60", + "url": "https://github.com/kkatano/bakeneko-60-pcb", + "maintainer": "kkatano", + "width": 15, + "height": 5, + "layouts": { + "LAYOUT_60_ansi_split_bs_rshift": { + "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.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 } + ] + }, + "LAYOUT_60_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":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 } + ] + }, + "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 } + ] + } + } +} diff --git a/keyboards/bakeneko60/keymaps/default/keymap.c b/keyboards/bakeneko60/keymaps/default/keymap.c new file mode 100644 index 000000000000..e1f5cfc2e29d --- /dev/null +++ b/keyboards/bakeneko60/keymaps/default/keymap.c @@ -0,0 +1,38 @@ +/* Copyright 2020 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 + +enum layer_names { + _BASE, + _FN +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_BASE] = 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_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, MO(_FN), + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, KC_APP, KC_RCTL + ), + [_FN] = LAYOUT_60_ansi_split_bs_rshift( + 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, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______ + ) +}; diff --git a/keyboards/bakeneko60/keymaps/default/readme.md b/keyboards/bakeneko60/keymaps/default/readme.md new file mode 100644 index 000000000000..5609e2adbbb7 --- /dev/null +++ b/keyboards/bakeneko60/keymaps/default/readme.md @@ -0,0 +1 @@ +# The default keymap for Bakeneko 60 diff --git a/keyboards/bakeneko60/keymaps/via/keymap.c b/keyboards/bakeneko60/keymaps/via/keymap.c new file mode 100644 index 000000000000..4034ba70d36c --- /dev/null +++ b/keyboards/bakeneko60/keymaps/via/keymap.c @@ -0,0 +1,54 @@ +/* Copyright 2020 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 + +enum layer_names { + _L0, + _L1, + _L2, + _L3 +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_L0] = 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_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, MO(_L1), + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, KC_APP, KC_RCTL + ), + [_L1] = LAYOUT_60_ansi_split_bs_rshift( + 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, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______ + ), + [_L2] = LAYOUT_60_ansi_split_bs_rshift( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______ + ), + [_L3] = LAYOUT_60_ansi_split_bs_rshift( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______ + ) +}; diff --git a/keyboards/bakeneko60/keymaps/via/rules.mk b/keyboards/bakeneko60/keymaps/via/rules.mk new file mode 100644 index 000000000000..036bd6d1c3ec --- /dev/null +++ b/keyboards/bakeneko60/keymaps/via/rules.mk @@ -0,0 +1 @@ +VIA_ENABLE = yes \ No newline at end of file diff --git a/keyboards/bakeneko60/readme.md b/keyboards/bakeneko60/readme.md new file mode 100644 index 000000000000..9d8b2d3a2e3d --- /dev/null +++ b/keyboards/bakeneko60/readme.md @@ -0,0 +1,17 @@ +# Bakeneko 60 + +An open source O-ring gasket mount keyboard + +* Keyboard Maintainer: [kkatano](https://github.com/kkatano) +* Hardware Supported: Bakeneko 60 +* Hardware Availability: [Open source on GitHub](https://github.com/kkatano/bakeneko-60-pcb) + +Make example for this keyboard (after setting up your build environment): + + make bakeneko60:default + +Flashing example for this keyboard: + + make bakeneko60: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). diff --git a/keyboards/bakeneko60/rules.mk b/keyboards/bakeneko60/rules.mk new file mode 100644 index 000000000000..cc1b100ec9bb --- /dev/null +++ b/keyboards/bakeneko60/rules.mk @@ -0,0 +1,24 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +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 +BLUETOOTH_ENABLE = no # Enable Bluetooth +AUDIO_ENABLE = no # Audio output + +LAYOUTS = 60_ansi_split_bs_rshift 60_ansi 60_tsangan_hhkb From 461153150bd753291d5b96538ee578246cf4f80e Mon Sep 17 00:00:00 2001 From: Koichi Katano <36572567+kkatano@users.noreply.github.com> Date: Fri, 4 Sep 2020 02:02:40 +0900 Subject: [PATCH 730/930] Add Bakeneko 65 --- keyboards/bakeneko65/bakeneko65.c | 17 + keyboards/bakeneko65/bakeneko65.h | 75 +++++ keyboards/bakeneko65/config.h | 109 ++++++ keyboards/bakeneko65/info.json | 313 ++++++++++++++++++ keyboards/bakeneko65/keymaps/default/keymap.c | 38 +++ .../bakeneko65/keymaps/default/readme.md | 1 + keyboards/bakeneko65/keymaps/via/keymap.c | 54 +++ keyboards/bakeneko65/keymaps/via/rules.mk | 1 + keyboards/bakeneko65/readme.md | 17 + keyboards/bakeneko65/rules.mk | 24 ++ 10 files changed, 649 insertions(+) create mode 100644 keyboards/bakeneko65/bakeneko65.c create mode 100644 keyboards/bakeneko65/bakeneko65.h create mode 100644 keyboards/bakeneko65/config.h create mode 100644 keyboards/bakeneko65/info.json create mode 100644 keyboards/bakeneko65/keymaps/default/keymap.c create mode 100644 keyboards/bakeneko65/keymaps/default/readme.md create mode 100644 keyboards/bakeneko65/keymaps/via/keymap.c create mode 100644 keyboards/bakeneko65/keymaps/via/rules.mk create mode 100644 keyboards/bakeneko65/readme.md create mode 100644 keyboards/bakeneko65/rules.mk diff --git a/keyboards/bakeneko65/bakeneko65.c b/keyboards/bakeneko65/bakeneko65.c new file mode 100644 index 000000000000..aa1ba8e66185 --- /dev/null +++ b/keyboards/bakeneko65/bakeneko65.c @@ -0,0 +1,17 @@ +/* Copyright 2020 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 "bakeneko65.h" diff --git a/keyboards/bakeneko65/bakeneko65.h b/keyboards/bakeneko65/bakeneko65.h new file mode 100644 index 000000000000..db2d5c14a69f --- /dev/null +++ b/keyboards/bakeneko65/bakeneko65.h @@ -0,0 +1,75 @@ +/* Copyright 2020 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" + +#define LAYOUT_65_ansi_split_bs( \ + 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, k115, \ + k200, k201, k202, k203, k204, k205, k206, k207, k208, k209, k210, k211, k213, k215, \ + k300, k302, k303, k304, k305, k306, k307, k308, k309, k310, k311, k312, k313, k315, \ + k400, k401, k402, k406, k409, k410, k411, k412, k413, 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, KC_NO, k115 }, \ + { k200, k201, k202, k203, k204, k205, k206, k207, k208, k209, k210, k211, KC_NO, k213, KC_NO, k215 }, \ + { k300, KC_NO, k302, k303, k304, k305, k306, k307, k308, k309, k310, k311, k312, k313, KC_NO, k315 }, \ + { k400, k401, k402, KC_NO, KC_NO, KC_NO, k406, KC_NO, KC_NO, k409, k410, k411, k412, k413, KC_NO, k415 } \ +} + +#define LAYOUT_65_ansi( \ + k000, k001, k002, k003, k004, k005, k006, k007, k008, k009, k010, k011, k012, k014, k015, \ + k100, k101, k102, k103, k104, k105, k106, k107, k108, k109, k110, k111, k112, k113, k115, \ + k200, k201, k202, k203, k204, k205, k206, k207, k208, k209, k210, k211, k213, k215, \ + k300, k302, k303, k304, k305, k306, k307, k308, k309, k310, k311, k312, k313, k315, \ + k400, k401, k402, k406, k409, k410, k411, k412, k413, k415 \ +) { \ + { k000, k001, k002, k003, k004, k005, k006, k007, k008, k009, k010, k011, k012, KC_NO, k014, k015 }, \ + { k100, k101, k102, k103, k104, k105, k106, k107, k108, k109, k110, k111, k112, k113, KC_NO, k115 }, \ + { k200, k201, k202, k203, k204, k205, k206, k207, k208, k209, k210, k211, KC_NO, k213, KC_NO, k215 }, \ + { k300, KC_NO, k302, k303, k304, k305, k306, k307, k308, k309, k310, k311, k312, k313, KC_NO, k315 }, \ + { k400, k401, k402, KC_NO, KC_NO, KC_NO, k406, KC_NO, KC_NO, k409, k410, k411, k412, k413, KC_NO, k415 } \ +} + +#define LAYOUT_65_ansi_split_bs_2_right_mods( \ + 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, k115, \ + k200, k201, k202, k203, k204, k205, k206, k207, k208, k209, k210, k211, k213, k215, \ + k300, k302, k303, k304, k305, k306, k307, k308, k309, k310, k311, k312, k313, k315, \ + k400, k401, k402, k406, k409, k411, k412, k413, 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, KC_NO, k115 }, \ + { k200, k201, k202, k203, k204, k205, k206, k207, k208, k209, k210, k211, KC_NO, k213, KC_NO, k215 }, \ + { k300, KC_NO, k302, k303, k304, k305, k306, k307, k308, k309, k310, k311, k312, k313, KC_NO, k315 }, \ + { k400, k401, k402, KC_NO, KC_NO, KC_NO, k406, KC_NO, KC_NO, k409, KC_NO, k411, k412, k413, KC_NO, k415 } \ +} + +#define LAYOUT_65_ansi_2_right_mods( \ + k000, k001, k002, k003, k004, k005, k006, k007, k008, k009, k010, k011, k012, k014, k015, \ + k100, k101, k102, k103, k104, k105, k106, k107, k108, k109, k110, k111, k112, k113, k115, \ + k200, k201, k202, k203, k204, k205, k206, k207, k208, k209, k210, k211, k213, k215, \ + k300, k302, k303, k304, k305, k306, k307, k308, k309, k310, k311, k312, k313, k315, \ + k400, k401, k402, k406, k409, k411, k412, k413, k415 \ +) { \ + { k000, k001, k002, k003, k004, k005, k006, k007, k008, k009, k010, k011, k012, KC_NO, k014, k015 }, \ + { k100, k101, k102, k103, k104, k105, k106, k107, k108, k109, k110, k111, k112, k113, KC_NO, k115 }, \ + { k200, k201, k202, k203, k204, k205, k206, k207, k208, k209, k210, k211, KC_NO, k213, KC_NO, k215 }, \ + { k300, KC_NO, k302, k303, k304, k305, k306, k307, k308, k309, k310, k311, k312, k313, KC_NO, k315 }, \ + { k400, k401, k402, KC_NO, KC_NO, KC_NO, k406, KC_NO, KC_NO, k409, KC_NO, k411, k412, k413, KC_NO, k415 } \ +} diff --git a/keyboards/bakeneko65/config.h b/keyboards/bakeneko65/config.h new file mode 100644 index 000000000000..65b3ff88e292 --- /dev/null +++ b/keyboards/bakeneko65/config.h @@ -0,0 +1,109 @@ +/* +Copyright 2020 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 0x3A0E +#define PRODUCT_ID 0x4C82 +#define DEVICE_VER 0x0001 +#define MANUFACTURER kkatano +#define PRODUCT Bakeneko 65 + +/* key matrix size */ +#define MATRIX_ROWS 5 +#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, B7, F7, F4, F5 } +#define MATRIX_COL_PINS { F6, B0, F1, C7, C6, B6, B5, B4, D7, D6, D4, D5, D3, D2, D1, D0 } +#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 useful 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 + +/* + * 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 */ +#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/bakeneko65/info.json b/keyboards/bakeneko65/info.json new file mode 100644 index 000000000000..25b438c297b7 --- /dev/null +++ b/keyboards/bakeneko65/info.json @@ -0,0 +1,313 @@ +{ + "keyboard_name": "Bakeneko 65", + "url": "https://github.com/kkatano/bakeneko-65-pcb", + "maintainer": "kkatano", + "width": 16, + "height": 5, + "layouts": { + "LAYOUT_65_ansi_split_bs": { + "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, "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_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_65_ansi_split_bs_2_right_mods": { + "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, "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, "w":1.5 }, + { "x":11.5, "y":4, "w":1.5 }, + { "x":13, "y":4 }, + { "x":14, "y":4 }, + { "x":15, "y":4 } + ] + }, + "LAYOUT_65_ansi_2_right_mods": { + "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, "w":1.5 }, + { "x":11.5, "y":4, "w":1.5 }, + { "x":13, "y":4 }, + { "x":14, "y":4 }, + { "x":15, "y":4 } + ] + } + } +} diff --git a/keyboards/bakeneko65/keymaps/default/keymap.c b/keyboards/bakeneko65/keymaps/default/keymap.c new file mode 100644 index 000000000000..4d6d297d9422 --- /dev/null +++ b/keyboards/bakeneko65/keymaps/default/keymap.c @@ -0,0 +1,38 @@ +/* Copyright 2020 kkatano + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public 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_65_ansi_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_GRV, 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_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(_FN), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT + ), + [_FN] = LAYOUT_65_ansi_split_bs( + 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, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ) +}; diff --git a/keyboards/bakeneko65/keymaps/default/readme.md b/keyboards/bakeneko65/keymaps/default/readme.md new file mode 100644 index 000000000000..34d1b4e9312a --- /dev/null +++ b/keyboards/bakeneko65/keymaps/default/readme.md @@ -0,0 +1 @@ +# The default keymap for Bakeneko 65 diff --git a/keyboards/bakeneko65/keymaps/via/keymap.c b/keyboards/bakeneko65/keymaps/via/keymap.c new file mode 100644 index 000000000000..a4cc2d8e8a65 --- /dev/null +++ b/keyboards/bakeneko65/keymaps/via/keymap.c @@ -0,0 +1,54 @@ +/* Copyright 2020 kkatano + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public 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 { + _L0, + _L1, + _L2, + _L3 +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_L0] = LAYOUT_65_ansi_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_GRV, 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_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(_L1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT + ), + [_L1] = LAYOUT_65_ansi_split_bs( + 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, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + [_L2] = LAYOUT_65_ansi_split_bs( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + [_L3] = LAYOUT_65_ansi_split_bs( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ) +}; diff --git a/keyboards/bakeneko65/keymaps/via/rules.mk b/keyboards/bakeneko65/keymaps/via/rules.mk new file mode 100644 index 000000000000..1e5b99807cb7 --- /dev/null +++ b/keyboards/bakeneko65/keymaps/via/rules.mk @@ -0,0 +1 @@ +VIA_ENABLE = yes diff --git a/keyboards/bakeneko65/readme.md b/keyboards/bakeneko65/readme.md new file mode 100644 index 000000000000..f16c0757d89f --- /dev/null +++ b/keyboards/bakeneko65/readme.md @@ -0,0 +1,17 @@ +# Bakeneko 65 + +An open source O-ring gasket mount keyboard + +* Keyboard Maintainer: [kkatano](https://github.com/kkatano) +* Hardware Supported: Bakeneko 65 +* Hardware Availability: [Open source on GitHub](https://github.com/kkatano/bakeneko-65-pcb) + +Make example for this keyboard (after setting up your build environment): + + make bakeneko65:default + +Flashing example for this keyboard: + + make bakeneko65: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). diff --git a/keyboards/bakeneko65/rules.mk b/keyboards/bakeneko65/rules.mk new file mode 100644 index 000000000000..c2277c9dad07 --- /dev/null +++ b/keyboards/bakeneko65/rules.mk @@ -0,0 +1,24 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +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 +BLUETOOTH_ENABLE = no # Enable Bluetooth +AUDIO_ENABLE = no # Audio output + +LAYOUTS = 65_ansi_split_bs 65_ansi 65_ansi_split_bs_2_right_mods 65_ansi_2_right_mods From 9b9587527f7b0db1613b0c71c9f5b1f7b4109a23 Mon Sep 17 00:00:00 2001 From: umi <57262844+umi-umi@users.noreply.github.com> Date: Fri, 4 Sep 2020 03:25:21 +0900 Subject: [PATCH 731/930] [Docs] Japanese translation of docs/reference_info_json.md (#9881) * add reference_info_json.md translation * update based on comment * update based on comment --- docs/ja/reference_info_json.md | 78 ++++++++++++++++++++++++++++++++++ 1 file changed, 78 insertions(+) create mode 100644 docs/ja/reference_info_json.md diff --git a/docs/ja/reference_info_json.md b/docs/ja/reference_info_json.md new file mode 100644 index 000000000000..708f7c19ac3f --- /dev/null +++ b/docs/ja/reference_info_json.md @@ -0,0 +1,78 @@ +# `info.json` + + + +このファイルは [QMK API](https://github.com/qmk/qmk_api) によって使われます。このファイルは [QMK Configurator](https://config.qmk.fm/) がキーボードの画像を表示するために必要な情報を含んでいます。ここにメタデータを設定することもできます。 + +このメタデータを指定するために、`qmk_firmware/keyboards/` の下の全てのレベルで `info.json` を作成することができます。これらのファイルは結合され、より具体的なファイルがそうではないファイルのキーを上書きします。つまり、メタデータ情報を複製する必要はありません。例えば、`qmk_firmware/keyboards/clueboard/info.json` は `manufacturer` および `maintainer` を指定し、`qmk_firmware/keyboards/clueboard/66/info.json` は Clueboard 66% についてのより具体的な情報を指定します。 + +## `info.json` の形式 + +`info.json` ファイルは設定可能な以下のキーを持つ JSON 形式の辞書です。全てを設定する必要はなく、キーボードに適用するキーだけを設定します。 + +* `keyboard_name` + * キーボードを説明する自由形式のテキスト文字列。 + * 例: `Clueboard 66%` +* `url` + * キーボードの製品ページ、[QMK.fm/keyboards](https://qmk.fm/keyboards) のページ、あるいはキーボードに関する情報を説明する他のページの URL。 +* `maintainer` + * メンテナの GitHub のユーザ名、あるいはコミュニティが管理するキーボードの場合は `qmk` +* `width` + * キー単位でのキーボードの幅 +* `height` + * キー単位でのキーボードの高さ +* `layouts` + * 物理的なレイアウト表現。詳細は以下のセクションを見てください。 + +### レイアウトの形式 + +`info.json` ファイル内の辞書の `layouts` 部分は、幾つかの入れ子になった辞書を含みます。外側のレイヤーは QMK レイアウトマクロで構成されます。例えば、`LAYOUT_ansi` あるいは `LAYOUT_iso`。各レイアウトマクロ内には、`width`、 `height`、`key_count` のキーがあります。これらは自明でなければなりません。 + +* `width` + * オプション: キー単位でのレイアウトの幅 +* `height` + * オプション: キー単位でのレイアウトの高さ +* `key_count` + * **必須**: このレイアウトのキーの数 +* `layout` + * 物理レイアウトを説明するキー辞書のリスト。詳細は次のセクションを見てください。 + +### キー辞書形式 + +レイアウトの各キー辞書は、キーの物理プロパティを記述します。 の Raw Code に精通している場合、多くの概念が同じであることが分かります。可能な限り同じキー名とレイアウトの選択を再利用しますが、keyboard-layout-editor とは異なって各キーはステートレスで、前のキーからプロパティを継承しません。 + +全てのキーの位置と回転は、キーボードの左上と、各キーの左上を基準にして指定されます。 + +* `x` + * **必須**: 水平軸でのキーの絶対位置(キー単位)。 +* `y` + * **必須**: 垂直軸でのキーの絶対位置(キー単位)。 +* `w` + * キー単位でのキーの幅。`ks` が指定された場合は無視されます。デフォルト: `1` +* `h` + * キー単位でのキーの高さ。`ks` が指定された場合は無視されます。デフォルト: `1` +* `r` + * キーを回転させる時計回りの角度。 +* `rx` + * キーを回転させる点の水平軸における絶対位置。デフォルト: `x` +* `ry` + * キーを回転させる点の垂直軸における絶対位置。デフォルト: `y` +* `ks` + * キー形状: キー単位で頂点を列挙することでポリゴンを定義します。 + * **重要**: これらはキーの左上からの相対位置で、絶対位置ではありません。 + * ISO Enter の例: `[ [0,0], [1.5,0], [1.5,2], [0.25,2], [0.25,1], [0,1], [0,0] ]` +* `label` + * マトリックス内のこの位置につける名前。 + * これは通常 PCB 上でこの位置にシルクスクリーン印刷されるものと同じ名前でなければなりません。 + +## メタデータはどのように公開されますか? + +このメタデータは主に2つの方法で使われます: + +* Web ベースの configurator が動的に UI を生成できるようにする。 +* 新しい `make keyboard:keymap:qmk` ターゲットをサポートする。これは、このメタデータをファームウェアにバンドルして QMK Toolbox をよりスマートにします。 + +Configurator の作成者は、JSON API の使用に関する詳細について、[QMK Compiler](https://docs.api.qmk.fm/using-the-api) ドキュメントを参照することができます。 From 22821045264c03cb8b25d892f19ef6658f08427e Mon Sep 17 00:00:00 2001 From: umi <57262844+umi-umi@users.noreply.github.com> Date: Fri, 4 Sep 2020 03:28:53 +0900 Subject: [PATCH 732/930] [Docs] Japanese translation of docs/translating.md (#10018) * add translating.md translation * update based on comment * update based on comment --- docs/ja/translating.md | 60 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 60 insertions(+) create mode 100644 docs/ja/translating.md diff --git a/docs/ja/translating.md b/docs/ja/translating.md new file mode 100644 index 000000000000..f7a273308a64 --- /dev/null +++ b/docs/ja/translating.md @@ -0,0 +1,60 @@ +# QMK ドキュメントを翻訳する + + + +ルートフォルダ (`docs/`) にある全てのファイルは英語でなければなりません - 他の全ての言語は、ISO 639-1 言語コードと、それに続く`-`と関連する国コードのサブフォルダにある必要があります。[一般的なもののリストはここで見つかります](https://www.andiamo.co.uk/resources/iso-language-codes/)。このフォルダが存在しない場合、作成することができます。翻訳された各ファイルは英語バージョンと同じ名前でなければなりません。そうすることで、正常にフォールバックできます。 + +`_summary.md` ファイルはこのフォルダの中に存在し、各ファイルへのリンクのリスト、翻訳された名前、言語フォルダに続くリンクが含まれている必要があります。 + +```markdown + * [QMK简介](zh-cn/getting_started_introduction.md) +``` + +他の docs ページへの全てのリンクにも、言語のフォルダが前に付いている必要があります。もしリンクがページの特定の部分(例えば、特定の見出し)への場合、以下のように見出しに英語の ID を使う必要があります: + +```markdown +[建立你的环境](zh-cn/newbs-getting-started.md#set-up-your-environment) + +## 建立你的环境 :id=set-up-your-environment +``` + +新しい言語の翻訳が完了したら、以下のファイルも修正する必要があります: + +* [`docs/_langs.md`](https://github.com/qmk/qmk_firmware/blob/master/docs/_langs.md) +各行は、[GitHub emoji shortcode](https://github.com/ikatyang/emoji-cheat-sheet/blob/master/README.md#country-flag) の形式で国フラグと、それに続く言語で表される名前を含む必要があります。 + + ```markdown + - [:cn: 中文](/zh-cn/) + ``` + +* [`docs/index.html`](https://github.com/qmk/qmk_firmware/blob/master/docs/index.html) +`placeholder` と `noData` の両方のオブジェクトは、文字列で言語フォルダの辞書エントリが必要です: + + ```js + '/zh-cn/': '没有结果!', + ``` + + サイドバーの「QMK ファームウェア」の見出しリンクを設定するために、`nameLink` オブジェクトも以下のように追加される必要があります: + + ```js + '/zh-cn/': '/#/zh-cn/', + ``` + + また、`fallbackLanguages` リストに言語フォルダを追加して、404 ではなく英語に適切にフォールバックするようにしてください: + + ```js + fallbackLanguages: [ + // ... + 'zh-cn', + // ... + ], + ``` + +## 翻訳のプレビュー + +ドキュメントのローカルインスタンスをセットアップする方法については、[ドキュメントのプレビュー](ja/contributing.md#previewing-the-documentation)を見てください - 右上の "Translations" メニューから新しい言語を選択することができるはずです。 + +作業に満足したら、遠慮なくプルリクエストを開いてください! From 6eefc20c2ad81bafbfa10421a39165d312783020 Mon Sep 17 00:00:00 2001 From: umi <57262844+umi-umi@users.noreply.github.com> Date: Fri, 4 Sep 2020 10:50:53 +0900 Subject: [PATCH 733/930] [Docs] Japanese translation of docs/support.md (#10015) * add support.md translation * update based on comment --- docs/ja/support.md | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 docs/ja/support.md diff --git a/docs/ja/support.md b/docs/ja/support.md new file mode 100644 index 000000000000..01c2d41d19cb --- /dev/null +++ b/docs/ja/support.md @@ -0,0 +1,22 @@ +# 助けを得る + + + +QMK に関して助けを得るための多くのリソースがあります。 + +コミュニティスペースに参加する前に[行動規範](https://qmk.fm/coc/)を読んでください。 + +## リアルタイムチャット + +何かについて助けが必要な場合は、迅速なサポートを受けるための最良の場所は、[Discord Server](https://discord.gg/Uq7gcHh) です。通常は誰かがオンラインで、非常に助けになる多くの人がいます。 + +## 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 は長期的な議論あるいはデバッグを必要とする場合は、特に便利です。 From c10b011828bb9ea8682d56ea4dfe78a76d484fdd Mon Sep 17 00:00:00 2001 From: umi <57262844+umi-umi@users.noreply.github.com> Date: Fri, 4 Sep 2020 10:56:04 +0900 Subject: [PATCH 734/930] [Docs] Japanese translation of docs/syllabus.md (#10016) * add syllabus.md translation * update based on comment * update based on comment --- docs/ja/syllabus.md | 75 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 75 insertions(+) create mode 100644 docs/ja/syllabus.md diff --git a/docs/ja/syllabus.md b/docs/ja/syllabus.md new file mode 100644 index 000000000000..14e743ee9c4c --- /dev/null +++ b/docs/ja/syllabus.md @@ -0,0 +1,75 @@ +# QMK シラバス + + + +このページは最初に基本を紹介し、そして、QMK に習熟するために必要な全ての概念を理解するように導くことで、QMK の知識を構築するのに役立ちます。 + +# 初級トピック + +他に何も読んでいない場合は、このセクションのドキュメントを読んでください。[QMK 初心者ガイド](ja/newbs.md)を読み終わると、基本的なキーマップを作成し、それをコンパイルし、キーボードに書き込みできるようになっているはずです。残りのドキュメントはこれらの基本的な知識を具体的に肉付けします。 + +* **QMK Tools の使い方を学ぶ** + * [QMK 初心者ガイド](ja/newbs.md) + * [CLI](ja/cli.md) + * [Git](ja/newbs_git_best_practices.md) +* **キーマップについて学ぶ** + * [レイヤー](ja/feature_layers.md) + * [キーコード](ja/keycodes.md) + * 使用できるキーコードの完全なリスト。中級または上級トピックにある知識が必要な場合もあることに注意してください。 +* **IDE の設定** - オプション + * [Eclipse](ja/other_eclipse.md) + * [VS Code](ja/other_vscode.md) + +# 中級トピック + +これらのトピックでは、QMK がサポートする幾つかの機能について掘り下げます。これらのドキュメントを全て読む必要はありませんが、これらの一部をスキップすると、上級トピックのセクションの一部のドキュメントが意味をなさなくなるかもしれません。 + +* **機能の設定方法を学ぶ** + + * [オーディオ](ja/feature_audio.md) + * 電飾 + * [バックライト](ja/feature_backlight.md) + * [LED マトリックス](ja/feature_led_matrix.md) + * [RGB ライト](ja/feature_rgblight.md) + * [RGB マトリックス](ja/feature_rgb_matrix.md) + * [タップホールド設定](ja/tap_hold.md) +* **キーマップについてさらに学ぶ** + * [キーマップ](ja/keymap.md) + * [カスタム関数とキーコード](ja/custom_quantum_functions.md) + * マクロ + * [動的マクロ](ja/feature_dynamic_macros.md) + * [コンパイル済みのマクロ](ja/feature_macros.md) + * [タップダンス](ja/feature_tap_dance.md) + * [コンボ](ja/feature_combo.md) + * [ユーザスペース](ja/feature_userspace.md) + +# 上級トピック + +以下の全ては多くの基礎知識を必要とします。高度な機能を使ってキーマップを作成できることに加えて、`config.h` と `rules.mk` の両方を使ってキーボードのオプションを設定することに慣れている必要があります。 + +* **QMK 内のキーボードの保守** + * [キーボードの手配線](ja/hand_wire.md) + * [キーボードガイドライン](ja/hardware_keyboard_guidelines.md) + * [info.json リファレンス](ja/reference_info_json.md) + * [デバウンス API](ja/feature_debounce_type.md) +* **高度な機能** + * [ユニコード](ja/feature_unicode.md) + * [API](ja/api_overview.md) + * [ブートマジック](ja/feature_bootmagic.md) +* **ハードウェア** + * [キーボードがどのように動作するか](ja/how_keyboards_work.md) + * [キーボードマトリックスの仕組み](ja/how_a_matrix_works.md) + * [分割キーボード](ja/feature_split_keyboard.md) + * [速記](ja/feature_stenography.md) + * [ポインティングデバイス](ja/feature_pointing_device.md) +* **コア開発** + * [コーディング規約](ja/coding_conventions_c.md) + * [互換性のあるマイクロコントローラ](ja/compatible_microcontrollers.md) + * [カスタムマトリックス](ja/custom_matrix.md) + * [QMK を理解する](ja/understanding_qmk.md) +* **CLI 開発** + * [コーディング規約](ja/coding_conventions_python.md) + * [CLI 開発の概要](ja/cli_development.md) From 361003934ed069fe0fca5e3e2aaed1af34e68beb Mon Sep 17 00:00:00 2001 From: umi <57262844+umi-umi@users.noreply.github.com> Date: Fri, 4 Sep 2020 11:01:37 +0900 Subject: [PATCH 735/930] [Docs] Japanese translation of docs/quantum_keycodes.md (#10137) * add quantum_keycodes.md translation * update based on comment --- docs/ja/quantum_keycodes.md | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 docs/ja/quantum_keycodes.md diff --git a/docs/ja/quantum_keycodes.md b/docs/ja/quantum_keycodes.md new file mode 100644 index 000000000000..ffcc49446096 --- /dev/null +++ b/docs/ja/quantum_keycodes.md @@ -0,0 +1,20 @@ +# Quantum キーコード + + + +Quantum キーコードにより、カスタムアクションを定義することなく、基本的なものが提供するものより簡単にキーマップをカスタマイズすることができます。 + +quantum 内の全てのキーコードは `0x0000` と `0xFFFF` の間の数値です。`keymap.c` の中では、関数やその他の特別な場合があるように見えますが、最終的には C プリプロセッサによってそれらは単一の4バイト整数に変換されます。QMK は標準的なキーコードのために `0x0000` から `0x00FF` を予約しています。これらは、`KC_A`、`KC_1` および `KC_LCTL` のようなキーコードで、USB HID 仕様で定義された基本的なキーです。 + +このページでは、高度な quantum 機能を実装するために使われる `0x00FF` と `0xFFFF` の間のキーコードを説明します。独自のカスタムキーコードを定義する場合は、それらもこの範囲に配置されます。 + +## QMK キーコード :id=qmk-keycodes + +| キー | エイリアス | 説明 | +|----------------|------------|--------------------------------------------------------| +| `RESET` | | 書き込みのために、キーボードを bootloader モードにする | +| `DEBUG` | | デバッグモードの切り替え | +| `EEPROM_RESET` | `EEP_RST` | キーボードの EEPROM (永続化メモリ) を再初期化する | From 98278968b75ffe48fdb4c0189658de00b7e4322c Mon Sep 17 00:00:00 2001 From: umi <57262844+umi-umi@users.noreply.github.com> Date: Fri, 4 Sep 2020 11:44:39 +0900 Subject: [PATCH 736/930] [Docs] Japanese translation of docs/reference_glossary.md (#9880) * add reference_glossary.md translation * update based on comment * update based on comment * update based on comment --- docs/ja/reference_glossary.md | 173 ++++++++++++++++++++++++++++++++++ 1 file changed, 173 insertions(+) create mode 100644 docs/ja/reference_glossary.md diff --git a/docs/ja/reference_glossary.md b/docs/ja/reference_glossary.md new file mode 100644 index 000000000000..b33d8464495e --- /dev/null +++ b/docs/ja/reference_glossary.md @@ -0,0 +1,173 @@ +# QMK 用語集 + + + +## ARM +Atmel、Cypress、Kinetis、NXP、ST、TI など多くの企業が生産する 32 ビット MCU のライン。 + +## AVR +[Atmel](http://www.microchip.com/) が生産する 8 ビット MCU のライン。AVR は TMK がサポートしていた元のプラットフォームでした。 + +## AZERTY +標準的な Français (フランス) キーボードレイアウト。キーボードの最初の6つのキーから命名されました。 + +## バックライト +キーボードのライトの総称。バックライトが一般的ですが、それだけではなく、キーキャップあるいはスイッチを通して光る LED の配列。 + +## Bluetooth +短距離のピアツーピア無線プロトコル。キーボード用のもっとも一般的なワイヤレスプロトコル。 + +## ブートローダ +MCU の保護領域に書き込まれる特別なプログラムで、MCU が独自のファームウェアを通常は USB 経由でアップグレードできるようにします。 + +## ブートマジック +よくあるキーの交換あるいは無効化など、様々なキーボードの挙動の変更をその場で実行できる機能。 + +## C +システムコードに適した低レベルプログラミング言語。QMK のほとんどのコードは C で書かれています。 + +## Colemak +人気が出始めている代替キーボードレイアウト。 + +## コンパイル +人間が読めるコードを MCU が実行できるマシンコードに変換するプロセス。 + +## Dvorak +1930年代に Dr. August Dvorak によって開発された代替キーボードレイアウト。Dvorak Simplified Keyboard の短縮形。 + +## 動的マクロ +キーボードに記録されたマクロで、キーボードのプラグを抜くか、コンピュータを再起動すると失われます。 + +* [動的マクロドキュメント](ja/feature_dynamic_macros.md) + +## Eclipse +多くの C 開発者に人気のある IDE。 + +* [Eclipse セットアップ手順](ja/other_eclipse.md) + +## ファームウェア +MCU を制御するソフトウェア + +## git +コマンドラインで使用されるバージョン管理ソフトウェア + +## GitHub +QMK プロジェクトのほとんどをホストする Web サイト。git、課題管理、および QMK の実行に役立つその他の機能を統合して提供します。 + +## ISP +インシステムプログラミング。外部ハードウェアと JTAG ピンを使って AVR チップをプログラミングする方法。 + +## hid_listen +キーボードからデバッグメッセージを受信するためのインタフェース。[QMK Flasher](https://github.com/qmk/qmk_flasher) あるいは [PJRC の hid_listen](https://www.pjrc.com/teensy/hid_listen.html) を使ってこれらのメッセージを見ることができます。 + +## キーコード +特定のキーを表す2バイトの数値。`0x00`-`0xFF` は[基本キーコード](ja/keycodes_basic.md)に使われ、`0x100`-`0xFFFF` は [Quantum キーコード](ja/quantum_keycodes.md) に使われます。 + +## キーダウン +キーが押された時に発生し、キーが放される前に完了するイベント。 + +## キーアップ +キーが放された時に発生するイベント。 + +## キーマップ +物理的なキーボードレイアウトにマップされたキーコードの配列。キーの押下およびリリース時に処理されます。 + +## レイヤー +1つのキーが複数の目的を果たすために使われる抽象化。最上位のアクティブなレイヤーが優先されます。 + +## リーダーキー +リーダーキーに続けて1, 2 あるいは3つのキーをタップすることで、キーの押下あるいは他の quantum 機能をアクティブにする機能。 + +* [リーダーキードキュメント](ja/feature_leader_key.md) + +## LED +発光ダイオード。キーボードの表示に使われる最も一般的なデバイス。 + +## Make +全てのソースファイルをコンパイルするために使われるソフトウェアパッケージ。キーボードファームウェアをコンパイルするために、様々なオプションを指定して `make` を実行します。 + +## マトリックス +MCU がより少ないピン数でキー押下を検出できるようにする列と行の配線パターン。マトリックスには多くの場合、NKRO を可能にするためのダイオードが組み込まれています。 + +## マクロ +単一のキーのみを押した後で、複数のキー押下イベント (HID レポート) を送信できる機能。 + +* [マクロドキュメント](ja/feature_macros.md) + +## MCU +マイクロコントロールユニット。キーボードを動かすプロセッサ。 + +## モディファイア +別のキーを入力する間押したままにして、そのキーのアクションを変更するキー。例として、Ctrl、Alt および Shift があります。 +(訳注:モディファイヤ、モディファイヤキー、修飾キーなど、訳語が統一されていませんが同じものです) + +## マウスキー +キーボードからマウスカーソルを制御し、クリックできる機能。 + +* [マウスキードキュメント](ja/feature_mouse_keys.md) + +## N キーロールオーバー (NKRO) +一度に任意の数のキーの押下を送信できるキーボードに当てはまる用語。 + +## ワンショットモディファイア +別のキーが放されるまで押されているかのように機能するモディファイア。キーを押している間に mod を押し続けるのではなく、mod を押してからキーを押すことができます。スティッキーキーまたはデッドキーとも呼びます。 + +## ProMicro +低コストの AVR 開発ボード。このデバイスのクローンは ebay で非常に安価(5ドル未満)に見つかることがありますが、多くの場合 pro micro の書き込みに苦労します。 + +## プルリクエスト +QMK にコードを送信するリクエスト。全てのユーザが個人のキーマップのプルリクエストを送信することを推奨します。 + +## QWERTY +標準の英語キーボードレイアウト。多くの場合、他の言語の標準レイアウトへのショートカット。キーボードの最初の6文字から命名されました。 + +## QWERTZ +標準的な Deutsche (ドイツ語) キーボードレイアウト。キーボードの最初の6文字から命名されました。 + +## ロールオーバー +キーが既に押されている間にキーを押すことを指す用語。似たものに 2KRO、6KRO、NKRO が含まれます。 + +## スキャンコード +単一のキーを表す USB 経由の HID レポートの一部として送信される1バイトの数値。これらの値は、[USB-IF](http://www.usb.org/) が発行する [HID Usage Tables](https://www.usb.org/sites/default/files/documents/hut1_12v2.pdf) に記載されています。 + +## スペースカデットシフト +左または右 shift を1回以上タップすることで、様々なタイプの括弧を入力できる特別な shift キーのセット。 + +* [スペースカデットシフトドキュメント](ja/feature_space_cadet_shift.md) + +## タップ +キーを押して放す。状況によってはキーダウンイベントとキーアップイベントを区別する必要がありますが、タップは常に両方を一度に指します。 + +## タップダンス +押す回数に基づいて、同じキーに複数のキーコードを割り当てることができる機能。 + +* [タップダンスドキュメント](ja/feature_tap_dance.md) + +## Teensy +手配線での組み立てによく用いられる低コストの AVR 開発ボード。halfkay ブートローダによって書き込みが非常に簡単になるために、数ドル高いにもかかわらず teensy がしばしば選択されます。 + +## アンダーライト +キーボードの下側を照らす LED の総称。これらの LED は通常 PCB の底面からキーボードが置かれている表面に向けて照らします。 + +## ユニコード +大規模なコンピュータの世界では、ユニコードは任意の言語で文字を表現するためのエンコード方式のセットです。QMK に関しては、様々な OS スキームを使ってスキャンコードの代わりにユニコードコードポイントを送信することを意味します。 + +* [ユニコードドキュメント](ja/feature_unicode.md) + +## 単体テスト +QMK に対して自動テストを実行するためのフレームワーク。単体テストは、変更が何も壊さないことを確信するのに役立ちます。 + +* [単体テストドキュメント](unit_testing.md) + +## USB +ユニバーサルシリアルバス。キーボード用の最も一般的な有線インタフェース。 + +## USB ホスト (あるいは単にホスト) +USB ホストは、あなたのコンピュータ、またはキーボードが差し込まれているデバイスのことです。 + +# 探している用語が見つかりませんでしたか? + +質問についての [issue を開いて](https://github.com/qmk/qmk_firmware/issues) 、質問した用語についてここに追加することができます。さらに良いのは、定義についてのプルリクエストを開くことです。:) From c3f3b34d7c913df771f9cd6470169798a2ece16f Mon Sep 17 00:00:00 2001 From: umi <57262844+umi-umi@users.noreply.github.com> Date: Fri, 4 Sep 2020 11:54:23 +0900 Subject: [PATCH 737/930] [Docs] Japanese translation of api_*.md (#9992) * add api related translation * update based on comment * update based on comment * update based on comment --- docs/ja/api_development_environment.md | 8 +++ docs/ja/api_development_overview.md | 49 +++++++++++++++++ docs/ja/api_docs.md | 73 ++++++++++++++++++++++++++ docs/ja/api_overview.md | 20 +++++++ 4 files changed, 150 insertions(+) create mode 100644 docs/ja/api_development_environment.md create mode 100644 docs/ja/api_development_overview.md create mode 100644 docs/ja/api_docs.md create mode 100644 docs/ja/api_overview.md diff --git a/docs/ja/api_development_environment.md b/docs/ja/api_development_environment.md new file mode 100644 index 000000000000..8dce1ba2fd6e --- /dev/null +++ b/docs/ja/api_development_environment.md @@ -0,0 +1,8 @@ +# 開発環境のセットアップ + + + +開発環境をセットアップするには、[qmk_web_stack](https://github.com/qmk/qmk_web_stack) に行ってください。 diff --git a/docs/ja/api_development_overview.md b/docs/ja/api_development_overview.md new file mode 100644 index 000000000000..0612507b4d80 --- /dev/null +++ b/docs/ja/api_development_overview.md @@ -0,0 +1,49 @@ +# QMK コンパイラ開発ガイド + + + +このページでは、開発者に QMK コンパイラを紹介しようと思います。コードを読まなければならないような核心となる詳細に立ち入って調べることはしません。ここで得られるものは、コードを読んで理解を深めるためのフレームワークです。 + +# 概要 + +QMK Compile API は、いくつかの可動部分からできています: + +![構造図](https://raw.githubusercontent.com/qmk/qmk_api/master/docs/architecture.svg) + +API クライアントは API サービスと排他的にやりとりをします。ここでジョブをサブミットし、状態を調べ、結果をダウンロードします。API サービスはコンパイルジョブを [Redis Queue](https://python-rq.org) に挿入し、それらのジョブの結果について RQ と S3 の両方を調べます。 + +ワーカーは RQ から新しいコンパイルジョブを取り出し、ソースとバイナリを S3 互換のストレージエンジンにアップロードします。 + +# ワーカー + +QMK コンパイラワーカーは実際のビルド作業に責任を持ちます。ワーカーは RQ からジョブを取り出し、ジョブを完了するためにいくつかの事を行います: + +* 新しい qmk_firmware のチェックアウトを作成する +* 指定されたレイヤーとキーボードメタデータを使って `keymap.c` をビルドする +* ファームウェアをビルドする +* ソースのコピーを zip 形式で圧縮する +* ファームウェア、ソースの zip ファイル、メタデータファイルを S3 にアップロードする +* ジョブの状態を RQ に送信する + +# API サービス + +API サービスは比較的単純な Flask アプリケーションです。理解しておくべきことが幾つかあります。 + +## @app.route('/v1/compile', methods=['POST']) + +これは API の主なエントリーポイントです。クライアントとのやりとりはここから開始されます。クライアントはキーボードを表す JSON ドキュメントを POST し、API はコンパイルジョブをサブミットする前にいくらかの(とても)基本的な検証を行います。 + +## @app.route('/v1/compile/<string:job_id>', methods=['GET']) + +これは最もよく呼ばれるエンドポイントです。ジョブの詳細が redis から利用可能であればそれを取り出し、そうでなければ S3 からキャッシュされたジョブの詳細を取り出します。 + +## @app.route('/v1/compile/<string:job_id>/download', methods=['GET']) + +このメソッドによりユーザはコンパイルされたファームウェアファイルをダウンロードすることができます。 + +## @app.route('/v1/compile/<string:job_id>/source', methods=['GET']) + +このメソッドによりユーザはファームウェアのソースをダウンロードすることができます。 diff --git a/docs/ja/api_docs.md b/docs/ja/api_docs.md new file mode 100644 index 000000000000..b483c045e645 --- /dev/null +++ b/docs/ja/api_docs.md @@ -0,0 +1,73 @@ +# QMK API + + + +このページは QMK API の使い方を説明します。もしあなたがアプリケーション開発者であれば、全ての [QMK](https://qmk.fm) キーボードのファームウェアをコンパイルするために、この API を使うことができます。 + +## 概要 + +このサービスは、カスタムキーマップをコンパイルするための非同期 API です。API に 何らかの JSON を POST し、定期的に状態をチェックし、ファームウェアのコンパイルが完了していれば、結果のファームウェアと(もし希望すれば)そのファームウェアのソースコードをダウンロードすることができます。 + +#### JSON ペイロードの例: + +```json +{ + "keyboard": "clueboard/66/rev2", + "keymap": "my_awesome_keymap", + "layout": "LAYOUT_all", + "layers": [ + ["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_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(1)","KC_LEFT","KC_DOWN","KC_RIGHT"], + ["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_TRNS","KC_DEL","BL_STEP","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","MO(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_PGUP","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","MO(1)","KC_LEFT","KC_PGDN","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_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","MO(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","MO(1)","KC_TRNS","KC_TRNS","KC_TRNS"] + ] +} +``` + +ご覧のとおり、ペイロードにはファームウェアを作成および生成するために必要なキーボードの全ての側面を記述します。各レイヤーは QMK キーコードの1つのリストで、キーボードの `LAYOUT` マクロと同じ長さです。もしキーボードが複数の `LAYOUT` マクロをサポートする場合、どのマクロを使うかを指定することができます。 + +## コンパイルジョブのサブミット + +キーマップをファームウェアにコンパイルするには、単純に JSON を `/v1/compile` エンドポイントに POST します。以下の例では、JSON ペイロードを `json_data` という名前のファイルに配置しています。 + +``` +$ curl -H "Content-Type: application/json" -X POST -d "$(< json_data)" http://api.qmk.fm/v1/compile +{ + "enqueued": true, + "job_id": "ea1514b3-bdfc-4a7b-9b5c-08752684f7f6" +} +``` + +## 状態のチェック + +キーマップをサブミットした後で、簡単な HTTP GET 呼び出しを使って状態をチェックすることができます: + +``` +$ curl http://api.qmk.fm/v1/compile/ea1514b3-bdfc-4a7b-9b5c-08752684f7f6 +{ + "created_at": "Sat, 19 Aug 2017 21:39:12 GMT", + "enqueued_at": "Sat, 19 Aug 2017 21:39:12 GMT", + "id": "f5f9b992-73b4-479b-8236-df1deb37c163", + "status": "running", + "result": null +} +``` + +これは、ジョブをキューに入れることに成功し、現在実行中であることを示しています。5つの状態がありえます: + +* **failed**: なんらかの理由でコンパイルサービスが失敗しました。 +* **finished**: コンパイルが完了し、結果を見るには `result` をチェックする必要があります。 +* **queued**: キーマップはコンパイルサーバが利用可能になるのを待っています。 +* **running**: コンパイルが進行中で、まもなく完了するはずです。 +* **unknown**: 深刻なエラーが発生し、[バグを報告](https://github.com/qmk/qmk_compiler/issues)する必要があります。 + +## 完了した結果を検証 + +コンパイルジョブが完了したら、`result` キーをチェックします。このキーの値は幾つかの情報を含むハッシュです: + +* `firmware_binary_url`: 書き込み可能なファームウェアの URL のリスト +* `firmware_keymap_url`: `keymap.c` の URL のリスト +* `firmware_source_url`: ファームウェアの完全なソースコードの URL のリスト +* `output`: このコンパイルジョブの stdout と stderr。エラーはここで見つけることができます。 diff --git a/docs/ja/api_overview.md b/docs/ja/api_overview.md new file mode 100644 index 000000000000..18b8eae10f32 --- /dev/null +++ b/docs/ja/api_overview.md @@ -0,0 +1,20 @@ +# QMK API + + + +QMK API は、Web と GUI ツールが [QMK](http://qmk.fm/) によってサポートされるキーボード用の任意のキーマップをコンパイルするために使うことができる、非同期 API を提供します。標準のキーマップテンプレートは、C コードのサポートを必要としない全ての QMK キーコードをサポートします。キーボードのメンテナは独自のカスタムテンプレートを提供して、より多くの機能を実現することができます。 + +## アプリケーション開発者 + +もしあなたがアプリケーションでこの API を使うことに興味があるアプリケーション開発者であれば、[API の使用](ja/api_docs.md) に行くべきです。 + +## キーボードのメンテナ + +もし QMK Compiler API でのあなたのキーボードのサポートを強化したい場合は、[キーボードサポート](ja/reference_configurator_support.md) の節に行くべきです。 + +## バックエンド開発者 + +もし API 自体に取り組むことに興味がある場合は、[開発環境](ja/api_development_environment.md)のセットアップから始め、それから [API のハッキング](ja/api_development_overview.md) を調べるべきです。 From 2e4a75e2bcfc275ba4e5cc8dde6a6761296ede5b Mon Sep 17 00:00:00 2001 From: umi <57262844+umi-umi@users.noreply.github.com> Date: Fri, 4 Sep 2020 11:58:03 +0900 Subject: [PATCH 738/930] [Docs] Japanese translation of docs/serial_driver.md (#10014) * add serial_drive.md translation * update table style * update based on comment * update based on comment --- docs/ja/serial_driver.md | 75 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 75 insertions(+) create mode 100644 docs/ja/serial_driver.md diff --git a/docs/ja/serial_driver.md b/docs/ja/serial_driver.md new file mode 100644 index 000000000000..72071f4f7ed3 --- /dev/null +++ b/docs/ja/serial_driver.md @@ -0,0 +1,75 @@ +# 'シリアル' ドライバ + + + +このドライバは[分割キーボード](ja/feature_split_keyboard.md) 機能に使います。 + +?> この文章でのシリアルは、UART/USART/RS485/RS232 規格の実装ではなく、**一度に1ビットの情報を送信するもの**として読まれるべきです。 + +このカテゴリの全てのドライバには以下の特徴があります: +* 1本の線上でデータと信号を提供 +* シングルマスタ、シングルスレーブに限定 + +## サポートされるドライバの種類 + +| | AVR | ARM | +|-------------------|--------------------|--------------------| +| bit bang | :heavy_check_mark: | :heavy_check_mark: | +| USART Half-duplex | | :heavy_check_mark: | + +## ドライバ設定 + +### Bitbang +デフォルトのドライバ。設定がない場合はこのドライバが想定されます。設定するには、以下を rules.mk に追加します: + +```make +SERIAL_DRIVER = bitbang +``` + +config.h を介してドライバを設定します: +```c +#define SOFT_SERIAL_PIN D0 // または D1, D2, D3, E6 +#define SELECT_SOFT_SERIAL_SPEED 1 // または 0, 2, 3, 4, 5 + // 0: 約 189kbps (実験目的のみ) + // 1: 約 137kbps (デフォルト) + // 2: 約 75kbps + // 3: 約 39kbps + // 4: 約 26kbps + // 5: 約 20kbps +``` + +#### ARM + +!> bitbang ドライバは bitbang WS2812 ドライバと接続の問題があります + +上記の一般的なオプションに加えて、halconf.h で `PAL_USE_CALLBACKS` 機能もオンにする必要があります。 + +### USART Half-duplex +通信が USART ハードウェアデバイスに送信される STM32 ボードが対象です。これにより高速で正確なタイミングを提供できることが利点です。このドライバの `SOFT_SERIAL_PIN` は、設定された USART TX ピンです。**TX ピンに適切なプルアップ抵抗が必要です**。設定するには、以下を rules.mk に追加します: + +```make +SERIAL_DRIVER = usart +``` + +config.h を介してハードウェアを設定します: +```c +#define SOFT_SERIAL_PIN B6 // USART TX ピン +#define SELECT_SOFT_SERIAL_SPEED 1 // または 0, 2, 3, 4, 5 + // 0: 約 460800 ボー + // 1: 約 230400 ボー (デフォルト) + // 2: 約 115200 ボー + // 3: 約 57600 ボー + // 4: 約 38400 ボー + // 5: 約 19200 ボー +#define SERIAL_USART_DRIVER SD1 // TX ピンの USART ドライバ。デフォルトは SD1 +#define SERIAL_USART_TX_PAL_MODE 7 // 「代替機能」 ピン。MCU の適切な値については、それぞれのデータシートを見てください。デフォルトは 7 +``` + +また、ChibiOS `SERIAL` 機能を有効にする必要があります: +* キーボードの halconf.h: `#define HAL_USE_SERIAL TRUE` +* キーボードの mcuconf.h: `#define STM32_SERIAL_USE_USARTn TRUE` (ここで、'n' は MCU で選択した USART のペリフェラル番号と一致) + +必要な構成は、`UART` 周辺機器ではなく、`SERIAL` 周辺機器であることに注意してください。 From 6a79d99ea2d4c72200953b35d51bb9b9d784a54b Mon Sep 17 00:00:00 2001 From: marksard <38324387+marksard@users.noreply.github.com> Date: Fri, 4 Sep 2020 19:31:36 +0900 Subject: [PATCH 739/930] [Keyboard] add leftover30 by marksard (#10140) * 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 * Add keyboard leftover30 * update keymap * Update keyboards/marksard/leftover30/config.h I guess I was mistaken. Thank you. * Update keyboards/marksard/leftover30/keymaps/default/keymap.c * Update keyboards/marksard/leftover30/leftover30.c * Update keyboards/marksard/leftover30/keymaps/default/keymap.c * Update keyboards/marksard/leftover30/keymaps/default/keymap.c * Update keyboards/marksard/leftover30/keymaps/default/keymap.c * Update keyboards/marksard/leftover30/keymaps/default/keymap.c * Update keyboards/marksard/leftover30/keymaps/default/keymap.c * Update keyboards/marksard/leftover30/keymaps/default/keymap.c * Update keyboards/marksard/leftover30/keymaps/default/keymap.c * Update keyboards/marksard/leftover30/keymaps/default/keymap.c * Update keyboards/marksard/leftover30/keymaps/default/keymap.c * changed user led custom method * Update keyboards/marksard/leftover30/config.h * Update keyboards/marksard/leftover30/config.h * Update keyboards/marksard/leftover30/keymaps/default/rules.mk * Update keyboards/marksard/leftover30/rules.mk * Update from other review * Update keyboards/marksard/leftover30/readme.md * fixed kanji key procedure * Update keyboards/marksard/leftover30/config.h * Update keyboards/marksard/leftover30/config.h * Update keyboards/marksard/leftover30/config.h * fixed by review --- keyboards/marksard/leftover30/config.h | 138 ++++++++++++ keyboards/marksard/leftover30/info.json | 198 ++++++++++++++++++ .../leftover30/keymaps/default/config.h | 24 +++ .../leftover30/keymaps/default/keymap.c | 162 ++++++++++++++ .../leftover30/keymaps/default/readme.md | 1 + .../leftover30/keymaps/default/rules.mk | 1 + keyboards/marksard/leftover30/leftover30.c | 37 ++++ keyboards/marksard/leftover30/leftover30.h | 45 ++++ keyboards/marksard/leftover30/readme.md | 17 ++ keyboards/marksard/leftover30/rules.mk | 22 ++ 10 files changed, 645 insertions(+) create mode 100644 keyboards/marksard/leftover30/config.h create mode 100644 keyboards/marksard/leftover30/info.json create mode 100644 keyboards/marksard/leftover30/keymaps/default/config.h create mode 100644 keyboards/marksard/leftover30/keymaps/default/keymap.c create mode 100644 keyboards/marksard/leftover30/keymaps/default/readme.md create mode 100644 keyboards/marksard/leftover30/keymaps/default/rules.mk create mode 100644 keyboards/marksard/leftover30/leftover30.c create mode 100644 keyboards/marksard/leftover30/leftover30.h create mode 100644 keyboards/marksard/leftover30/readme.md create mode 100644 keyboards/marksard/leftover30/rules.mk diff --git a/keyboards/marksard/leftover30/config.h b/keyboards/marksard/leftover30/config.h new file mode 100644 index 000000000000..42c6c6287275 --- /dev/null +++ b/keyboards/marksard/leftover30/config.h @@ -0,0 +1,138 @@ +/* +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 "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0xDFA8 +#define DEVICE_VER 0x0001 +#define MANUFACTURER marksard +#define PRODUCT leftover30 + +/* Encoder */ +#define ENCODERS_PAD_A { F4 } +#define ENCODERS_PAD_B { F5 } +// #define ENCODER_DIRECTION_FLIP + +/* key matrix size */ +#define MATRIX_ROWS 8 +#define MATRIX_COLS 5 + +/* + * 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 { B6, B2, F7, F6, B3, B1, D4, D0 } +#define MATRIX_COL_PINS { B5, B4, E6, D7, C6 } +#define UNUSED_PINS + +/* COL2ROW, ROW2COL*/ +#define DIODE_DIRECTION COL2ROW + +#define RGB_DI_PIN D3 +#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 + +/* 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 + +/* + * 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 */ +#define NO_ACTION_MACRO +#define NO_ACTION_FUNCTION diff --git a/keyboards/marksard/leftover30/info.json b/keyboards/marksard/leftover30/info.json new file mode 100644 index 000000000000..700d08d9d3c0 --- /dev/null +++ b/keyboards/marksard/leftover30/info.json @@ -0,0 +1,198 @@ +{ + "keyboard_name": "Leftover30", + "url": "https://github.com/marksard/Keyboards", + "maintainer": "marksard", + "width": 11.5, + "height": 4, + "layouts": { + "LAYOUT": { + "layout": [ + { + "label": "Q", + "x": 0.5, + "y": 0 + }, + { + "label": "W", + "x": 1.5, + "y": 0 + }, + { + "label": "E", + "x": 2.5, + "y": 0 + }, + { + "label": "R", + "x": 3.5, + "y": 0 + }, + { + "label": "T", + "x": 4.5, + "y": 0 + }, + { + "label": "Y", + "x": 5.5, + "y": 0 + }, + { + "label": "U", + "x": 6.5, + "y": 0 + }, + { + "label": "I", + "x": 7.5, + "y": 0 + }, + { + "label": "O", + "x": 8.5, + "y": 0 + }, + { + "label": "P", + "x": 9.5, + "y": 0 + }, + { + "label": "BS", + "x": 10.5, + "y": 0 + }, + { + "label": "A", + "x": 0.75, + "y": 1 + }, + { + "label": "S", + "x": 1.75, + "y": 1 + }, + { + "label": "D", + "x": 2.75, + "y": 1 + }, + { + "label": "F", + "x": 3.75, + "y": 1 + }, + { + "label": "G", + "x": 4.75, + "y": 1 + }, + { + "label": "H", + "x": 5.75, + "y": 1 + }, + { + "label": "J", + "x": 6.75, + "y": 1 + }, + { + "label": "K", + "x": 7.75, + "y": 1 + }, + { + "label": "L", + "x": 8.75, + "y": 1 + }, + { + "label": "Enter", + "x": 9.75, + "y": 1, + "w": 1.75 + }, + { + "label": "Z", + "x": 1.25, + "y": 2 + }, + { + "label": "X", + "x": 2.25, + "y": 2 + }, + { + "label": "C", + "x": 3.25, + "y": 2 + }, + { + "label": "V", + "x": 4.25, + "y": 2 + }, + { + "label": "B", + "x": 5.25, + "y": 2 + }, + { + "label": "N", + "x": 6.25, + "y": 2 + }, + { + "label": "M", + "x": 7.25, + "y": 2 + }, + { + "label": "<", + "x": 8.25, + "y": 2 + }, + { + "label": ">", + "x": 9.25, + "y": 2 + }, + { + "label": "?", + "x": 10.25, + "y": 2, + "w": 1.25 + }, + { + "label": "", + "x": 0, + "y": 3 + }, + { + "label": "Alt", + "x": 1.5, + "y": 3, + "w": 1.25 + }, + { + "label": "", + "x": 2.75, + "y": 3, + "w": 6.25 + }, + { + "label": "Fn1", + "x": 9, + "y": 3 + }, + { + "label": "Ctrl", + "x": 10, + "y": 3, + "w": 1.5 + } + ] + } + } +} diff --git a/keyboards/marksard/leftover30/keymaps/default/config.h b/keyboards/marksard/leftover30/keymaps/default/config.h new file mode 100644 index 000000000000..8bffbbb3b51b --- /dev/null +++ b/keyboards/marksard/leftover30/keymaps/default/config.h @@ -0,0 +1,24 @@ +/* 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 + +// place overrides here +#define TAPPING_TERM 200 +#define IGNORE_MOD_TAP_INTERRUPT + +#define TAPPING_LAYER_TERM 150 // Custom LT Tapping term +#define TAPPING_TERM_PER_KEY diff --git a/keyboards/marksard/leftover30/keymaps/default/keymap.c b/keyboards/marksard/leftover30/keymaps/default/keymap.c new file mode 100644 index 000000000000..60751cd1ca08 --- /dev/null +++ b/keyboards/marksard/leftover30/keymaps/default/keymap.c @@ -0,0 +1,162 @@ +/* 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 + +enum layer_number { + _BASE, + _LOWER, + _RAISE, + _ADJUST, +}; + +enum custom_keycodes { + RGBRST = SAFE_RANGE, + LOWER, + RAISE, + KANJI, +}; + +// #define KC_ESAD LT(_ADJUST, KC_ESC) +// #define KC_BSLO LT(_LOWER, KC_BSPC) +#define KC_LOWR MO(_LOWER) +#define KC_SPRA LT(_RAISE, KC_SPC) +#define KC_AJST MO(_ADJUST) + +#define KC_Q_AL LALT_T(KC_Q) +#define KC_A_CT LCTL_T(KC_A) +#define KC_Z_SF LSFT_T(KC_Z) +#define KC_X_AL LALT_T(KC_X) +#define KC_ENSF RSFT_T(KC_ENT) +#define KC_SLSF RSFT_T(KC_SLSH) + +#define KC_F1AL LALT_T(KC_F1) +#define KC_F6CT LCTL_T(KC_F6) +#define KC_11SF LSFT_T(KC_F11) +#define KC_12AL LALT_T(KC_F12) +#define KC_QUSF RCTL_T(KC_QUOT) +#define KC_ROSF RSFT_T(KC_RO) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_BASE] = LAYOUT_all( + //,-----------------------------------------------------------------------------------------------------------. + KC_Q_AL, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, + //|--------+--------+--------+--------+--------+--------|--------+--------+--------+--------+--------+--------| + KC_A_CT, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_ENSF, + //|--------+--------+--------+--------+--------+--------|--------+--------+--------+--------+--------+--------| + KC_Z_SF, KC_X_AL, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSF, + //|--------+--------+--------+--------+--------+--------|--------+--------+--------+--------+--------+--------| + KC_LCTL, KC_LGUI, KC_SPRA, KC_LOWR, KC_RCTL + //`-----------------------------------------------------------------------------------------------------------' + ), + + [_LOWER] = LAYOUT_all( + //,-----------------------------------------------------------------------------------------------------------. + KC_F1AL, KC_F2, KC_F3, KC_F4, KC_F5, KC_MINS, KC_EQL, KC_JYEN, KC_LBRC, KC_RBRC, KC_BSLS, + //|--------+--------+--------+--------+--------+--------|--------+--------+--------+--------+--------+--------| + KC_F6CT, KC_F7, KC_F8, KC_F9, KC_F10, XXXXXXX, XXXXXXX, XXXXXXX, KC_SCLN, KC_QUSF, + //|--------+--------+--------+--------+--------+--------|--------+--------+--------+--------+--------+--------| + KC_11SF, KC_12AL, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_GRV, KC_RO, KC_SLSH, KC_ROSF, + //|--------+--------+--------+--------+--------+--------|--------+--------+--------+--------+--------+--------| + _______, _______, KC_AJST, _______, _______ + //`-----------------------------------------------------------------------------------------------------------' + ), + + [_RAISE] = LAYOUT_all( + //,-----------------------------------------------------------------------------------------------------------. + KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, + //|--------+--------+--------+--------+--------+--------|--------+--------+--------+--------+--------+--------| + KC_LCTL, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, _______, + //|--------+--------+--------+--------+--------+--------|--------+--------+--------+--------+--------+--------| + KC_LSFT, XXXXXXX, KC_ESC, KC_TAB, KANJI, KC_DEL, KC_COMM, KC_DOT, KC_BSLS, KC_ROSF, + //|--------+--------+--------+--------+--------+--------|--------+--------+--------+--------+--------+--------| + _______, _______, _______, KC_AJST, _______ + //`-----------------------------------------------------------------------------------------------------------' + ), + + [_ADJUST] = LAYOUT_all( + //,-----------------------------------------------------------------------------------------------------------. + RESET, RGBRST, AG_NORM, AG_SWAP, XXXXXXX, KC_HOME, KC_PGDN, KC_PGUP, KC_END, KC_INS, KC_PSCR, + //|--------+--------+--------+--------+--------+--------|--------+--------+--------+--------+--------+--------| + RGB_TOG, RGB_HUI, RGB_SAI, RGB_VAI, XXXXXXX, KC_MS_L, KC_MS_D, KC_MS_U, KC_MS_R, KC_NLCK, + //|--------+--------+--------+--------+--------+--------|--------+--------+--------+--------+--------+--------| + RGB_MOD, RGB_HUD, RGB_SAD, RGB_VAD, XXXXXXX, KC_BTN1, KC_BTN2, XXXXXXX, XXXXXXX, KC_CAPS, + //|--------+--------+--------+--------+--------+--------|--------+--------+--------+--------+--------+--------| + _______, _______, _______, _______, KC_CAPS + //`-----------------------------------------------------------------------------------------------------------' + ) +}; + +uint16_t get_tapping_term(uint16_t keycode) { + switch (keycode) { + case KC_SPRA: + return TAPPING_LAYER_TERM; + default: + return TAPPING_TERM; + } +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + + bool result = false; + switch (keycode) { + case KANJI: + if (record->event.pressed) { + register_code16(keymap_config.swap_lalt_lgui ? A(KC_GRV) : KC_LANG2); + } else { + unregister_code16(keymap_config.swap_lalt_lgui ? A(KC_GRV) : KC_LANG2); + } + break; +#ifdef RGBLIGHT_ENABLE + case RGBRST: + if (record->event.pressed) { + eeconfig_update_rgblight_default(); + rgblight_enable(); + } + break; +#endif + default: + result = true; + break; + } + + return result; +} + +void encoder_update_user(uint8_t index, bool clockwise) { + if (index == 0) { + if (IS_LAYER_ON(_ADJUST)) { + if (clockwise) { + rgblight_increase_hue_noeeprom(); + } else { + rgblight_decrease_hue_noeeprom(); + } + } else if (IS_LAYER_ON(_LOWER)) { + tap_code16((clockwise == true) ? LCTL(KC_Y) : LCTL(KC_Z)); + } else if (IS_LAYER_ON(_RAISE)) { + tap_code16((clockwise == true) ? S(KC_DOWN) : S(KC_UP)); + } else { + tap_code((clockwise == true) ? KC_WH_D : KC_WH_U); + } + + } +} + +// for exsample customize of LED inducator +// bool led_update_user(led_t led_state) { +// writePin(D2, IS_LAYER_ON(_LOWER)); +// writePin(D1, IS_LAYER_ON(_RAISE)); +// return false; +// } diff --git a/keyboards/marksard/leftover30/keymaps/default/readme.md b/keyboards/marksard/leftover30/keymaps/default/readme.md new file mode 100644 index 000000000000..05dcdc3d14f6 --- /dev/null +++ b/keyboards/marksard/leftover30/keymaps/default/readme.md @@ -0,0 +1 @@ +# The default keymap for leftover30 diff --git a/keyboards/marksard/leftover30/keymaps/default/rules.mk b/keyboards/marksard/leftover30/keymaps/default/rules.mk new file mode 100644 index 000000000000..5af1ba85367f --- /dev/null +++ b/keyboards/marksard/leftover30/keymaps/default/rules.mk @@ -0,0 +1 @@ +ENCODER_ENABLE = yes diff --git a/keyboards/marksard/leftover30/leftover30.c b/keyboards/marksard/leftover30/leftover30.c new file mode 100644 index 000000000000..df8152144b8b --- /dev/null +++ b/keyboards/marksard/leftover30/leftover30.c @@ -0,0 +1,37 @@ +/* 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 "leftover30.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 keyboard_pre_init_user(void) { + /* Set CAPSLOCK indicator pin as output */ + setPinOutput(D1); + /* Set NUMLOCK indicator pin as output */ + setPinOutput(D2); +} + +bool led_update_kb(led_t led_state) { + bool res = led_update_user(led_state); + if(res) { + writePin(D2, led_state.num_lock); + writePin(D1, led_state.caps_lock); + } + return res; +} diff --git a/keyboards/marksard/leftover30/leftover30.h b/keyboards/marksard/leftover30/leftover30.h new file mode 100644 index 000000000000..901b9b570a83 --- /dev/null +++ b/keyboards/marksard/leftover30/leftover30.h @@ -0,0 +1,45 @@ +/* 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" + +/* 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,\ + 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\ +) \ +{ \ + { k09, k08, k07, k06, k05 }, \ + { k19, k18, k17, k16, k15 }, \ + { k29, k28, k27, k26, k25 }, \ + { k0a, k34, k33, k32, k31 }, \ +\ + { k04, k03, k02, k01, k00 }, \ + { k14, k13, k12, k11, k10 }, \ + { k24, k23, k22, k21, k20 }, \ + { KC_NO, KC_NO, KC_NO, KC_NO, k30 } \ +} diff --git a/keyboards/marksard/leftover30/readme.md b/keyboards/marksard/leftover30/readme.md new file mode 100644 index 000000000000..6fefb057f224 --- /dev/null +++ b/keyboards/marksard/leftover30/readme.md @@ -0,0 +1,17 @@ +# leftover30 + +![leftover30](https://raw.githubusercontent.com/marksard/Keyboards/master/_image/_leftover30.jpg) + +A 30% mini keyboard. + +* Keyboard Maintainer: [marksard](https://github.com/marksard) +* Hardware Supported: LEFTOVER30 PCB (with Pro Micro) +* Hardware Availability: [Mark's Garage](https://marksard.booth.pm/) + +Make example for this keyboard (after setting up your build environment): + + make marksard/leftover30: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://github.com/marksard/Keyboards/blob/master/leftover30/documents/leftover30_buildguide.md) diff --git a/keyboards/marksard/leftover30/rules.mk b/keyboards/marksard/leftover30/rules.mk new file mode 100644 index 000000000000..dd52fe113edc --- /dev/null +++ b/keyboards/marksard/leftover30/rules.mk @@ -0,0 +1,22 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +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 = no # Console for debug +COMMAND_ENABLE = no # Commands for debug and configuration +# 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 +BLUETOOTH_ENABLE = no # Enable Bluetooth +AUDIO_ENABLE = no # Audio output From 82a830196f5a71ced413af302ce4dd12ec034782 Mon Sep 17 00:00:00 2001 From: Takeshi ISHII <2170248+mtei@users.noreply.github.com> Date: Fri, 4 Sep 2020 20:12:43 +0900 Subject: [PATCH 740/930] fix link in docs/ja/*.md (#10232) * fix link in docs/ja/feature_split_keyboard.md * fix link in docs/ja/faq_build.md * fix link in docs/ja/faq_general.md * fix link in docs/ja/faq_keymap.md * fix link in docs/ja/how_a_matrix_works.md * fix link in docs/ja/reference_glossary.md --- docs/ja/faq_build.md | 2 +- docs/ja/faq_general.md | 2 +- docs/ja/faq_keymap.md | 2 +- docs/ja/feature_split_keyboard.md | 4 ++-- docs/ja/how_a_matrix_works.md | 2 +- docs/ja/reference_glossary.md | 2 +- 6 files changed, 7 insertions(+), 7 deletions(-) diff --git a/docs/ja/faq_build.md b/docs/ja/faq_build.md index 97e1bd8cf7ca..62c36f249701 100644 --- a/docs/ja/faq_build.md +++ b/docs/ja/faq_build.md @@ -145,4 +145,4 @@ ARM ベースのチップ上での 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)とキーボード情報を見てください)。 +いずれかの形式でブートマジックが有効になっている場合は、これも実行できるはずです (実行方法の詳細については、[ブートマジックドキュメント](ja/feature_bootmagic.md)とキーボード情報を見てください)。 diff --git a/docs/ja/faq_general.md b/docs/ja/faq_general.md index a365e380b30a..83d1a557bdd6 100644 --- a/docs/ja/faq_general.md +++ b/docs/ja/faq_general.md @@ -51,7 +51,7 @@ OK、問題ありません。[GitHub で issue を開く](https://github.com/qmk 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)でこれらのキーコードの完全なリストを見ることができます。 +技術的な観点から、QMK は幾つかの新しい機能を追加した TMK に基づいています。最も注目すべきことは、QMK は利用可能なキーコードの数を増やし、`S()`、`LCTL()` および `MO()` などの高度な機能を実装するためにこれらを使っています。[キーコード](ja/keycodes.md)でこれらのキーコードの完全なリストを見ることができます。 プロジェクトとコミュニティの管理の観点から、TMK は公式にサポートされている全てのキーボードを自分で管理しており、コミュニティのサポートも少し受けています。他のキーボード用に別個のコミュニティが維持するフォークが存在するか、作成できます。デフォルトでは少数のキーマップのみが提供されるため、ユーザは一般的にお互いにキーマップを共有しません。QMK は集中管理されたリポジトリを介して、キーボードとキーマップの両方を共有することを奨励しており、品質基準に準拠する全てのプルリクエストを受け付けます。これらはほとんどコミュニティで管理されますが、必要な場合は QMK チームも支援します。 diff --git a/docs/ja/faq_keymap.md b/docs/ja/faq_keymap.md index 2726e18728db..311ebe0e4294 100644 --- a/docs/ja/faq_keymap.md +++ b/docs/ja/faq_keymap.md @@ -128,7 +128,7 @@ https://github.com/tekezo/Karabiner/issues/403 ## 単一のキーでの Esc と` -[Grave Escape](feature_grave_esc.md) 機能を見てください。 +[Grave Escape](ja/feature_grave_esc.md) 機能を見てください。 ## Mac OSX での Eject `KC_EJCT` キーコードは OSX で動作します。https://github.com/tmk/tmk_keyboard/issues/250 diff --git a/docs/ja/feature_split_keyboard.md b/docs/ja/feature_split_keyboard.md index 74b62310fbf1..1efc98e40f9e 100644 --- a/docs/ja/feature_split_keyboard.md +++ b/docs/ja/feature_split_keyboard.md @@ -20,12 +20,12 @@ QMK ファームウェアには、任意のキーボードで使用可能な一 | Transport | AVR | ARM | |------------------------------|--------------------|--------------------| -| ['serial'](serial_driver.md) | :heavy_check_mark: | :white_check_mark: 1 | +| ['serial'](ja/serial_driver.md) | :heavy_check_mark: | :white_check_mark: 1 | | I2C | :heavy_check_mark: | | 注意: -1. ハードウェアとソフトウェアの両方の制限は、[ドライバーのドキュメント](serial_driver.md)の中で説明されます。 +1. ハードウェアとソフトウェアの両方の制限は、[ドライバーのドキュメント](ja/serial_driver.md)の中で説明されます。 ## ハードウェア設定 diff --git a/docs/ja/how_a_matrix_works.md b/docs/ja/how_a_matrix_works.md index ff4fbb115df7..b6ded186baf7 100644 --- a/docs/ja/how_a_matrix_works.md +++ b/docs/ja/how_a_matrix_works.md @@ -101,4 +101,4 @@ - [Deskthority の記事](https://deskthority.net/wiki/Keyboard_matrix) - [Dave Dribin による Keyboard Matrix Help (2000)](https://www.dribin.org/dave/keyboard/one_html/) - [PCBheaven による How Key Matrices Works](http://pcbheaven.com/wikipages/How_Key_Matrices_Works/) (アニメーションの例) -- [キーボードの仕組み - QMK ドキュメント](how_keyboards_work.md) +- [キーボードの仕組み - QMK ドキュメント](ja/how_keyboards_work.md) diff --git a/docs/ja/reference_glossary.md b/docs/ja/reference_glossary.md index b33d8464495e..19791206f17b 100644 --- a/docs/ja/reference_glossary.md +++ b/docs/ja/reference_glossary.md @@ -160,7 +160,7 @@ QMK にコードを送信するリクエスト。全てのユーザが個人の ## 単体テスト QMK に対して自動テストを実行するためのフレームワーク。単体テストは、変更が何も壊さないことを確信するのに役立ちます。 -* [単体テストドキュメント](unit_testing.md) +* [単体テストドキュメント](ja/unit_testing.md) ## USB ユニバーサルシリアルバス。キーボード用の最も一般的な有線インタフェース。 From 6e32dd123ff0ff49768f43c97bbc10836ff8a629 Mon Sep 17 00:00:00 2001 From: marksard <38324387+marksard@users.noreply.github.com> Date: Fri, 4 Sep 2020 20:14:34 +0900 Subject: [PATCH 741/930] [Keyboard] add rhymestone by marksard (#9708) * 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 * Add keyboard the Rhymestone * fixed by PR review * fixed by review * Update keyboards/rhymestone/readme.md fixed * Fixed possible changes to oled_write_P * Change the name of the layout definition * Update keyboards/rhymestone/info.json * Update keyboards/rhymestone/keymaps/default/keymap.c * Update keyboards/rhymestone/keymaps/default/keymap.c * Update keyboards/rhymestone/keymaps/default/keymap.c * Update keyboards/rhymestone/keymaps/default/keymap.c * Update keyboards/rhymestone/keymaps/switch_tester/keymap.c * Update keyboards/rhymestone/keymaps/switch_tester/keymap.c * Update keyboards/rhymestone/rev1/rev1.h * add empty rules.mk in rev1 * Update from other review * Update keyboards/rhymestone/rules.mk * fixed other review * move rhymestone to marksard directory * move rhymestone to marksard directory (Commit the necessary modifications) * remove --- .vscode/settings.json | 3 +- .../marksard/rhymestone/common/glcdfont.c | 233 ++++++++++++++++++ .../marksard/rhymestone/common/oled_helper.c | 87 +++++++ .../marksard/rhymestone/common/oled_helper.h | 32 +++ keyboards/marksard/rhymestone/info.json | 213 ++++++++++++++++ .../rhymestone/keymaps/default/config.h | 27 ++ .../rhymestone/keymaps/default/keymap.c | 226 +++++++++++++++++ .../rhymestone/keymaps/default/rules.mk | 9 + .../rhymestone/keymaps/switch_tester/keymap.c | 76 ++++++ .../keymaps/switch_tester/readme.md | 3 + .../rhymestone/keymaps/switch_tester/rules.mk | 7 + keyboards/marksard/rhymestone/readme.md | 18 ++ keyboards/marksard/rhymestone/rev1/config.h | 152 ++++++++++++ keyboards/marksard/rhymestone/rev1/rev1.c | 108 ++++++++ keyboards/marksard/rhymestone/rev1/rev1.h | 89 +++++++ keyboards/marksard/rhymestone/rev1/rules.mk | 0 keyboards/marksard/rhymestone/rules.mk | 27 ++ 17 files changed, 1309 insertions(+), 1 deletion(-) create mode 100644 keyboards/marksard/rhymestone/common/glcdfont.c create mode 100644 keyboards/marksard/rhymestone/common/oled_helper.c create mode 100644 keyboards/marksard/rhymestone/common/oled_helper.h create mode 100644 keyboards/marksard/rhymestone/info.json create mode 100644 keyboards/marksard/rhymestone/keymaps/default/config.h create mode 100644 keyboards/marksard/rhymestone/keymaps/default/keymap.c create mode 100644 keyboards/marksard/rhymestone/keymaps/default/rules.mk create mode 100644 keyboards/marksard/rhymestone/keymaps/switch_tester/keymap.c create mode 100644 keyboards/marksard/rhymestone/keymaps/switch_tester/readme.md create mode 100644 keyboards/marksard/rhymestone/keymaps/switch_tester/rules.mk create mode 100644 keyboards/marksard/rhymestone/readme.md create mode 100644 keyboards/marksard/rhymestone/rev1/config.h create mode 100644 keyboards/marksard/rhymestone/rev1/rev1.c create mode 100644 keyboards/marksard/rhymestone/rev1/rev1.h create mode 100644 keyboards/marksard/rhymestone/rev1/rules.mk create mode 100644 keyboards/marksard/rhymestone/rules.mk diff --git a/.vscode/settings.json b/.vscode/settings.json index 9aa546a78770..775b3df17222 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -16,7 +16,8 @@ "*.hpp": "cpp", "xstddef": "c", "type_traits": "c", - "utility": "c" + "utility": "c", + "ranges": "c" }, "[markdown]": { "editor.trimAutoWhitespace": false, diff --git a/keyboards/marksard/rhymestone/common/glcdfont.c b/keyboards/marksard/rhymestone/common/glcdfont.c new file mode 100644 index 000000000000..d9438aa5a7d8 --- /dev/null +++ b/keyboards/marksard/rhymestone/common/glcdfont.c @@ -0,0 +1,233 @@ +// This is the 'classic' fixed-space bitmap font for Adafruit_GFX since 1.0. +// See gfxfont.h for newer custom bitmap font info. + +#include "progmem.h" + +// Standard ASCII 5x7 font + +static 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, + 0xFC, 0x18, 0x24, 0x24, 0x18, 0x00, + 0x18, 0x24, 0x24, 0x18, 0xFC, 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, 0x10, 0x10, 0x10, 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, 0xD8, 0xDE, 0xDE, 0xDE, + 0x1E, 0x1E, 0x1E, 0x1E, 0xFE, 0xFE, + 0xFE, 0xFE, 0x00, 0xF0, 0xFF, 0xFF, + 0xFF, 0xE3, 0xE0, 0xE0, 0xE0, 0xE0, + 0xE0, 0xE0, 0x00, 0x80, 0xE0, 0xE0, + 0xE0, 0x00, 0x00, 0x00, 0x00, 0xE0, + 0xE0, 0xE0, 0xE0, 0x00, 0xE0, 0xE0, + 0xE0, 0xE0, 0xE0, 0xE0, 0xE0, 0xE0, + 0xE0, 0xE0, 0xE0, 0xE0, 0xE0, 0xE0, + 0xE0, 0xE0, 0xE0, 0x00, 0xC0, 0xE0, + 0xE0, 0xE0, 0xE0, 0xE0, 0xE0, 0xE0, + 0xE0, 0xE0, 0xE0, 0x00, 0x80, 0xE0, + 0xE0, 0xE0, 0xE0, 0xE0, 0xE0, 0xE0, + 0xE0, 0xE0, 0xE0, 0xE0, 0x00, 0xFC, + 0xFC, 0xFC, 0xFC, 0xE0, 0xE0, 0x80, + 0xE0, 0xE0, 0xE0, 0xE0, 0xE0, 0xE0, + 0xE0, 0xE0, 0xE0, 0xE0, 0xC0, 0x00, + 0xE0, 0xE0, 0xE0, 0xE0, 0xE0, 0xE0, + 0xE0, 0xE0, 0xE0, 0xE0, 0xE0, 0x80, + 0x00, 0xC0, 0xE0, 0xE0, 0xE0, 0xE0, + 0xE0, 0xE0, 0xE0, 0xE0, 0xE0, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 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, 0xFE, 0xFF, 0xFF, 0x7F, 0x0F, + 0x0E, 0x0E, 0xCE, 0xFF, 0xFF, 0xFF, + 0x7F, 0x80, 0xFE, 0xFF, 0xFF, 0x3F, + 0x01, 0x01, 0x01, 0x81, 0xFF, 0xFF, + 0xFF, 0x3F, 0xE0, 0xFF, 0xFF, 0xFF, + 0x8F, 0x80, 0x80, 0x80, 0xF8, 0xFF, + 0xFF, 0x7F, 0xC1, 0xFE, 0xFF, 0xFF, + 0x1F, 0x01, 0x01, 0xE1, 0xFF, 0xFF, + 0xFF, 0x0F, 0x01, 0x01, 0xF1, 0xFF, + 0xFF, 0xFF, 0x07, 0xFC, 0xFF, 0xFF, + 0xFF, 0x9D, 0x9D, 0x9D, 0x9D, 0x9F, + 0x9F, 0x9F, 0x1F, 0x80, 0x9F, 0x9F, + 0x9F, 0x9F, 0x9D, 0x9D, 0xDD, 0xFD, + 0xFD, 0xFD, 0x39, 0xC0, 0xFF, 0xFF, + 0xFF, 0x9F, 0x81, 0x01, 0xF1, 0xFF, + 0xFF, 0xFF, 0x87, 0x81, 0x81, 0x81, + 0xF9, 0xFF, 0xFF, 0xFF, 0x03, 0xFC, + 0xFF, 0xFF, 0x3F, 0x01, 0x01, 0x01, + 0x01, 0xFF, 0xFF, 0xFF, 0x7F, 0xC0, + 0xFF, 0xFF, 0xFF, 0x9F, 0x9D, 0x9D, + 0x9D, 0x9D, 0x9F, 0x9F, 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, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x07, 0x07, 0x07, 0x07, 0x00, 0x00, + 0x00, 0x00, 0x07, 0x07, 0x07, 0x07, + 0x00, 0x07, 0x07, 0x07, 0x07, 0x00, + 0x00, 0x00, 0x00, 0x07, 0x07, 0x07, + 0x07, 0x60, 0x73, 0x77, 0x77, 0x77, + 0x77, 0x77, 0x77, 0x7F, 0x7F, 0x7F, + 0x1F, 0x00, 0x07, 0x07, 0x07, 0x07, + 0x00, 0x00, 0x00, 0x07, 0x07, 0x07, + 0x03, 0x00, 0x00, 0x00, 0x07, 0x07, + 0x07, 0x01, 0x00, 0x07, 0x07, 0x07, + 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, + 0x07, 0x00, 0x00, 0x07, 0x07, 0x07, + 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, + 0x07, 0x03, 0x00, 0x03, 0x07, 0x07, + 0x07, 0x07, 0x07, 0x00, 0x03, 0x07, + 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, + 0x07, 0x07, 0x03, 0x00, 0x07, 0x07, + 0x07, 0x07, 0x00, 0x00, 0x00, 0x00, + 0x07, 0x07, 0x07, 0x07, 0x00, 0x03, + 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, + 0x07, 0x07, 0x07, 0x07, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +}; diff --git a/keyboards/marksard/rhymestone/common/oled_helper.c b/keyboards/marksard/rhymestone/common/oled_helper.c new file mode 100644 index 000000000000..537650025c9c --- /dev/null +++ b/keyboards/marksard/rhymestone/common/oled_helper.c @@ -0,0 +1,87 @@ +#ifdef OLED_DRIVER_ENABLE +#include QMK_KEYBOARD_H +#include +#include + +void render_logo(void) { + + static const char PROGMEM logo_buf[]={ + 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(logo_buf, false); +} + +void render_lock_status(void) { + + // Host Keyboard LED Status + led_t led_state = host_keyboard_led_state(); + + oled_write_P(PSTR("Lock:"), false); + if (led_state.num_lock) { + oled_write_P(PSTR("Num "), false); + } + if (led_state.caps_lock) { + oled_write_P(PSTR("Caps "), false); + } + if (led_state.scroll_lock) { + oled_write_P(PSTR("Scrl"), false); + } + + oled_write_P(PSTR("\n"), false); +} + +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', + 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', + '1', '2', '3', '4', '5', '6', '7', '8', '9', '0', + 'R', 'E', 'B', 'T', ' ', '-', ' ', '@', ' ', ' ', + ' ', ';', ':', ' ', ',', '.', '/', ' ', ' ', ' '}; + +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\n", + record->event.key.row, record->event.key.col, + (uint16_t)keycode, name); +} + +void render_key_status(void) { + + oled_write(keylog_buf, false); +} + +#ifdef RGBLIGHT_ENABLE +extern rgblight_config_t rgblight_config; + +static char led_buf[24] = "LED state ready.\n"; +rgblight_config_t rgblight_config_bak; +void update_led_status(void) { + + if (rgblight_config_bak.enable != rgblight_config.enable || + rgblight_config_bak.mode != rgblight_config.mode || + rgblight_config_bak.hue != rgblight_config.hue || + rgblight_config_bak.sat != rgblight_config.sat || + rgblight_config_bak.val != rgblight_config.val + ) { + snprintf(led_buf, sizeof(led_buf) - 1, "LED%c:%2d hsv:%2d %2d %2d\n", + rgblight_config.enable ? '*' : '.', (uint8_t)rgblight_config.mode, + (uint8_t)(rgblight_config.hue / RGBLIGHT_HUE_STEP), + (uint8_t)(rgblight_config.sat / RGBLIGHT_SAT_STEP), + (uint8_t)(rgblight_config.val / RGBLIGHT_VAL_STEP)); + rgblight_config_bak = rgblight_config; + } +} + +void render_led_status(void) { + + oled_write(led_buf, false); +} +#endif +#endif diff --git a/keyboards/marksard/rhymestone/common/oled_helper.h b/keyboards/marksard/rhymestone/common/oled_helper.h new file mode 100644 index 000000000000..02f7b94fa526 --- /dev/null +++ b/keyboards/marksard/rhymestone/common/oled_helper.h @@ -0,0 +1,32 @@ +#ifdef OLED_DRIVER_ENABLE + +void render_logo(void); +void render_lock_status(void); +void update_key_status(uint16_t keycode, keyrecord_t *record); +void render_key_status(void); + +#define RENDER_LOGO() render_logo() +#define RENDER_LOCK_STATUS() render_lock_status() +#define UPDATE_KEY_STATUS(a, b) update_key_status(a, b) +#define RENDER_KEY_STATUS() render_key_status() + +#ifdef RGBLIGHT_ENABLE + void update_led_status(void); + void render_led_status(void); + #define UPDATE_LED_STATUS() update_led_status() + #define RENDER_LED_STATUS() render_led_status() +#else + #define UPDATE_LED_STATUS() + #define RENDER_LED_STATUS() +#endif + +#else + +#define RENDER_LOGO() +#define RENDER_LOCK_STATUS() +#define UPDATE_KEY_STATUS(a, b) +#define RENDER_KEY_STATUS() +#define UPDATE_LED_STATUS() +#define RENDER_LED_STATUS() + +#endif diff --git a/keyboards/marksard/rhymestone/info.json b/keyboards/marksard/rhymestone/info.json new file mode 100644 index 000000000000..2c1ba9b37c70 --- /dev/null +++ b/keyboards/marksard/rhymestone/info.json @@ -0,0 +1,213 @@ +{ + "keyboard_name": "Rhymestone", + "url": "https://github.com/marksard/Keyboards", + "maintainer": "marksard", + "width": 11, + "height": 4, + "layouts": { + "LAYOUT_ortho_4x10": { + "layout": [ + { + "label": "Q", + "x": 0, + "y": 0 + }, + { + "label": "W", + "x": 1, + "y": 0 + }, + { + "label": "E", + "x": 2, + "y": 0 + }, + { + "label": "R", + "x": 3, + "y": 0 + }, + { + "label": "T", + "x": 4, + "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": 0, + "y": 1 + }, + { + "label": "S", + "x": 1, + "y": 1 + }, + { + "label": "D", + "x": 2, + "y": 1 + }, + { + "label": "F", + "x": 3, + "y": 1 + }, + { + "label": "G", + "x": 4, + "y": 1 + }, + { + "label": "H", + "x": 6, + "y": 1 + }, + { + "label": "J", + "x": 7, + "y": 1 + }, + { + "label": "K", + "x": 8, + "y": 1 + }, + { + "label": "L", + "x": 9, + "y": 1 + }, + { + "label": "Enter", + "x": 10, + "y": 1 + }, + { + "label": "Z", + "x": 0, + "y": 2 + }, + { + "label": "X", + "x": 1, + "y": 2 + }, + { + "label": "C", + "x": 2, + "y": 2 + }, + { + "label": "V", + "x": 3, + "y": 2 + }, + { + "label": "B", + "x": 4, + "y": 2 + }, + { + "label": "N", + "x": 6, + "y": 2 + }, + { + "label": "M", + "x": 7, + "y": 2 + }, + { + "label": ",", + "x": 8, + "y": 2 + }, + { + "label": ".", + "x": 9, + "y": 2 + }, + { + "label": "/", + "x": 10, + "y": 2 + }, + { + "label": "Ctrl", + "x": 0, + "y": 3 + }, + { + "label": "Win", + "x": 1, + "y": 3 + }, + { + "label": "Alt", + "x": 2, + "y": 3 + }, + { + "label": "Lower", + "x": 3, + "y": 3 + }, + { + "label": "backspace", + "x": 4, + "y": 3 + }, + { + "label": "space", + "x": 6, + "y": 3 + }, + { + "label": "Upper", + "x": 7, + "y": 3 + }, + { + "label": "Alt", + "x": 8, + "y": 3 + }, + { + "label": "App", + "x": 9, + "y": 3 + }, + { + "label": "Ctrl", + "x": 10, + "y": 3 + } + ] + } + } +} diff --git a/keyboards/marksard/rhymestone/keymaps/default/config.h b/keyboards/marksard/rhymestone/keymaps/default/config.h new file mode 100644 index 000000000000..95f2d039b241 --- /dev/null +++ b/keyboards/marksard/rhymestone/keymaps/default/config.h @@ -0,0 +1,27 @@ +/* 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 + +// place overrides here + +// If you use the HashTwenty(alpha), please enable USE_HASHTWENTY +// #define USE_HASHTWENTY + +// If you plug in the USB on the right side, please enable MASTER_RIGHT +// #define MASTER_RIGHT + +#define OLED_FONT_H "keyboards/rhymestone/common/glcdfont.c" diff --git a/keyboards/marksard/rhymestone/keymaps/default/keymap.c b/keyboards/marksard/rhymestone/keymaps/default/keymap.c new file mode 100644 index 000000000000..2d695f76b14a --- /dev/null +++ b/keyboards/marksard/rhymestone/keymaps/default/keymap.c @@ -0,0 +1,226 @@ +/* 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 "./common/oled_helper.h" + +enum layer_number { + _BASE, + _LOWER, + _RAISE, + _ADJUST, +}; + +enum custom_keycodes { + LOWER = SAFE_RANGE, + RAISE, + ADJUST, + KANJI, + RGBRST +}; + +// Base layer mod tap +#define KC_Z_SF LSFT_T(KC_Z) +#define KC_SLSF RSFT_T(KC_SLSH) + +// Lower layer mod tap +#define KC_11SF LSFT_T(KC_F11) +#define KC_GRSF RSFT_T(KC_GRV) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_BASE] = LAYOUT_ortho_4x10( + //,---------------------------------------------------------------------------------------------------. + 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_Z_SF, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSF, + //`---------+---------+---------+---------+---------+---------+---------+---------+---------+---------' + KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_BSPC, KC_SPC, RAISE, KC_RGUI, KC_APP, KC_RCTL + //,---------------------------------------------------------------------------------------------------. + ), + + [_LOWER] = LAYOUT_ortho_4x10( + //,---------------------------------------------------------------------------------------------------. + KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, + //|---------+---------+---------+---------+---------+---------+---------+---------+---------+---------| + KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, XXXXXXX, XXXXXXX, XXXXXXX, KC_SCLN, KC_QUOT, + //|---------+---------+---------+---------+---------+---------+---------+---------+---------+---------| + KC_11SF, KC_F12, KC_ESC, KC_TAB, KANJI, KC_DEL, XXXXXXX, XXXXXXX, KC_RO, KC_GRSF, + //`---------+---------+---------+---------+---------+---------+---------+---------+---------+---------' + _______, _______, _______, _______, KC_DEL, _______, _______, _______, _______, _______ + //,---------------------------------------------------------------------------------------------------. + ), + + [_RAISE] = LAYOUT_ortho_4x10( + //,---------------------------------------------------------------------------------------------------. + KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, + //|---------+---------+---------+---------+---------+---------+---------+---------+---------+---------| + KC_LSFT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_RSFT, + //|---------+---------+---------+---------+---------+---------+---------+---------+---------+---------| + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_MINS, KC_RO, KC_COMM, KC_DOT, KC_SLSF, + //`---------+---------+---------+---------+---------+---------+---------+---------+---------+---------' + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + //,---------------------------------------------------------------------------------------------------. + ), + + [_ADJUST] = LAYOUT_ortho_4x10( + //,---------------------------------------------------------------------------------------------------. + RESET, RGBRST, AG_NORM, AG_SWAP, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_INS, KC_PSCR, + //|---------+---------+---------+---------+---------+---------+---------+---------+---------+---------| + RGB_TOG, RGB_HUI, RGB_SAI, RGB_VAI, XXXXXXX, KC_MS_L, KC_MS_D, KC_MS_U, KC_MS_R, KC_NLCK, + //|---------+---------+---------+---------+---------+---------+---------+---------+---------+---------| + RGB_MOD, RGB_HUD, RGB_SAD, RGB_VAD, XXXXXXX, KC_BTN1, KC_BTN2, XXXXXXX, XXXXXXX, XXXXXXX, + //`---------+---------+---------+---------+---------+---------+---------+---------+---------+---------' + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + //,---------------------------------------------------------------------------------------------------. + ) +}; + +#define L_BASE _BASE +#define L_LOWER (1<<_LOWER) +#define L_RAISE (1<<_RAISE) +#define L_ADJUST (1<<_ADJUST) +#define L_ADJUST_TRI (L_ADJUST|L_RAISE|L_LOWER) + +#ifdef OLED_DRIVER_ENABLE +#include +#include + +typedef struct { + uint8_t state; + char name[8]; +}LAYER_DISPLAY_NAME; + +#define LAYER_DISPLAY_MAX 5 +const LAYER_DISPLAY_NAME layer_display_name[LAYER_DISPLAY_MAX] = { + {L_BASE, "Base"}, + {L_BASE + 1, "Base"}, + {L_LOWER, "Lower"}, + {L_RAISE, "Raise"}, + {L_ADJUST_TRI, "Adjust"} +}; + +static inline const char* get_leyer_status(void) { + + for (uint8_t i = 0; i < LAYER_DISPLAY_MAX; ++i) { + if (layer_state == 0 && layer_display_name[i].state == default_layer_state) { + + return layer_display_name[i].name; + } else if (layer_state != 0 && layer_display_name[i].state == layer_state) { + + return layer_display_name[i].name; + } + } + + return "?"; +} + +static char layer_status_buf[24] = "Layer state ready.\n"; +static inline void update_keymap_status(void) { + + snprintf(layer_status_buf, sizeof(layer_status_buf) - 1, "OS:%s Layer:%s\n", + keymap_config.swap_lalt_lgui? "win" : "mac", get_leyer_status()); +} + +static inline void render_keymap_status(void) { + + oled_write(layer_status_buf, false); +} + +#define UPDATE_KEYMAP_STATUS() update_keymap_status() + +static inline void render_status(void) { + + UPDATE_LED_STATUS(); + RENDER_LED_STATUS(); + render_keymap_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() + +#endif + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + + UPDATE_KEY_STATUS(keycode, record); + + bool result = false; + switch (keycode) { + case LOWER: + if (record->event.pressed) { + layer_on(_LOWER); + } else { + layer_off(_LOWER); + } + + update_tri_layer(_LOWER, _RAISE, _ADJUST); + break; + case RAISE: + if (record->event.pressed) { + layer_on(_RAISE); + } else { + layer_off(_RAISE); + } + + update_tri_layer(_LOWER, _RAISE, _ADJUST); + break; + case KANJI: + if (record->event.pressed) { + if (keymap_config.swap_lalt_lgui == false) { + register_code(KC_LANG2); + } else { + register_code16(A(KC_GRV)); + } + } else { + unregister_code(KC_LANG2); + } + break; + #ifdef RGBLIGHT_ENABLE + case RGBRST: + if (record->event.pressed) { + eeconfig_update_rgblight_default(); + rgblight_enable(); + } + break; + #endif + default: + result = true; + break; + } + + UPDATE_KEYMAP_STATUS(); + return result; +} diff --git a/keyboards/marksard/rhymestone/keymaps/default/rules.mk b/keyboards/marksard/rhymestone/keymaps/default/rules.mk new file mode 100644 index 000000000000..c86cab8cce7f --- /dev/null +++ b/keyboards/marksard/rhymestone/keymaps/default/rules.mk @@ -0,0 +1,9 @@ +MOUSEKEY_ENABLE = yes # Mouse keys +TAP_DANCE_ENABLE = no + +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/marksard/rhymestone/keymaps/switch_tester/keymap.c b/keyboards/marksard/rhymestone/keymaps/switch_tester/keymap.c new file mode 100644 index 000000000000..1d4e78af8002 --- /dev/null +++ b/keyboards/marksard/rhymestone/keymaps/switch_tester/keymap.c @@ -0,0 +1,76 @@ +/* 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 + +enum layer_number { + _BASE, + _ADJUST, +}; + +enum custom_keycodes { + LOWER = SAFE_RANGE, + ADJUST, + RGBRST +}; + +// Layer Mode aliases +#define KC_LTAD LT(_ADJUST, KC_NO) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_BASE] = LAYOUT_ortho_4x10( + //,---------------------------------------------------------------------------------------------------. + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, 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_LTAD, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX + //,---------------------------------------------------------------------------------------------------. + ), + + [_ADJUST] = LAYOUT_ortho_4x10( + //,---------------------------------------------------------------------------------------------------. + RESET, RGBRST, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + //|---------+---------+---------+---------+---------+---------+---------+---------+---------+---------| + RGB_TOG, RGB_HUI, RGB_SAI, RGB_VAI, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + //|---------+---------+---------+---------+---------+---------+---------+---------+---------+---------| + RGB_MOD, RGB_HUD, RGB_SAD, RGB_VAD, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + //`---------+---------+---------+---------+---------+---------+---------+---------+---------+---------' + _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX + //,---------------------------------------------------------------------------------------------------. + ) +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + + bool result = false; + switch (keycode) { + #ifdef RGBLIGHT_ENABLE + case RGBRST: + if (record->event.pressed) { + eeconfig_update_rgblight_default(); + rgblight_enable(); + } + break; + #endif + default: + result = true; + break; + } + + return result; +} diff --git a/keyboards/marksard/rhymestone/keymaps/switch_tester/readme.md b/keyboards/marksard/rhymestone/keymaps/switch_tester/readme.md new file mode 100644 index 000000000000..f85906a83bef --- /dev/null +++ b/keyboards/marksard/rhymestone/keymaps/switch_tester/readme.md @@ -0,0 +1,3 @@ +# The switch tester keymap for Rhymestone + +This keymap is Switch Tester and RGB_MATRIX Light demo. diff --git a/keyboards/marksard/rhymestone/keymaps/switch_tester/rules.mk b/keyboards/marksard/rhymestone/keymaps/switch_tester/rules.mk new file mode 100644 index 000000000000..78824da30411 --- /dev/null +++ b/keyboards/marksard/rhymestone/keymaps/switch_tester/rules.mk @@ -0,0 +1,7 @@ +MOUSEKEY_ENABLE = no # Mouse keys +TAP_DANCE_ENABLE = no + +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +OLED_DRIVER_ENABLE = no +LTO_ENABLE = yes +RGB_MATRIX_ENABLE = WS2812 diff --git a/keyboards/marksard/rhymestone/readme.md b/keyboards/marksard/rhymestone/readme.md new file mode 100644 index 000000000000..721e8beb35f6 --- /dev/null +++ b/keyboards/marksard/rhymestone/readme.md @@ -0,0 +1,18 @@ +# Rhymestone + +![Rhymestone](https://github.com/marksard/Keyboards/blob/7950099e0679a6626dc9f77a70b8c6616d7030cf/_image/_rhymestone.jpg) + +This is 40 keys split Ortholinear keyboard. + +* Keyboard Maintainer: [marksard](https://github.com/marksard) +* Hardware Supported: Rhymestone PCB (with Pro Micro) +* Hardware Availability: [marksard keyboards](https://github.com/marksard/Keyboards/blob/master/rhymestone/) + +Make example for this keyboard (after setting up your build environment): + + make marksard/rhymestone: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://github.com/marksard/Keyboards/blob/master/rhymestone/documents/rhymestone_buildguide.md) +[Firmware](https://github.com/marksard/qmk_firmware/tree/my_customize/keyboards/rhymestone) diff --git a/keyboards/marksard/rhymestone/rev1/config.h b/keyboards/marksard/rhymestone/rev1/config.h new file mode 100644 index 000000000000..9a1bf0a1d8fd --- /dev/null +++ b/keyboards/marksard/rhymestone/rev1/config.h @@ -0,0 +1,152 @@ +/* +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 "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0xDFA1 +#define DEVICE_VER 0x0020 +#define MANUFACTURER marksard +#define PRODUCT Rhymestone + +/* key matrix size */ +#define MATRIX_ROWS 8 +#define MATRIX_COLS 5 + +/* + * 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 } +#define MATRIX_COL_PINS { D4, C6, D7, E6, B4 } +#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 BACKLIGHT_PIN B7 +// #define BACKLIGHT_BREATHING +// #define BACKLIGHT_LEVELS 3 + +#define RGB_DI_PIN D3 + +#ifdef RGBLIGHT_ENABLE +// #ifdef RGB_DI_PIN + #define RGBLED_NUM 40 + #define RGBLED_SPLIT {20, 20} + #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 1.85 // 1 to 2.7 + #define RGBLIGHT_EFFECT_BREATHE_MAX 255 // 0 to 255 +#endif + +#ifdef RGB_MATRIX_ENABLE + #define RGBLED_NUM 40 // Number of LEDs + #define DRIVER_LED_TOTAL RGBLED_NUM + #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 150 // 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 8 + #define RGB_MATRIX_SPD_STEP 10 + +// #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 RGB_MATRIX_FRAMEBUFFER_EFFECTS +// #define DISABLE_RGB_MATRIX_TYPING_HEATMAP +// #define DISABLE_RGB_MATRIX_DIGITAL_RAIN + +// #define RGB_MATRIX_KEYPRESSES // reacts to keypresses + +// #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 RGB_MATRIX_STARTUP_MODE RGB_MATRIX_TYPING_HEATMAP +#endif + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCE 5 diff --git a/keyboards/marksard/rhymestone/rev1/rev1.c b/keyboards/marksard/rhymestone/rev1/rev1.c new file mode 100644 index 000000000000..a4dadd55cbf0 --- /dev/null +++ b/keyboards/marksard/rhymestone/rev1/rev1.c @@ -0,0 +1,108 @@ +/* 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" + +// Optional override functions below. +// You can leave any or all of these undefined. +// These are only required if you want to perform custom actions. + +#ifdef RGB_MATRIX_ENABLE +led_config_t g_led_config = { { + { 10, 11, 12, 13, 0 }, + { 9, 18, 19, 14, 1 }, + { 8, 17, 16, 15, 2 }, + { 7, 6, 5, 4, 3 }, + { 30, 31, 32, 33, 20 }, + { 29, 38, 39, 34, 21 }, + { 28, 37, 36, 35, 22 }, + { 27, 26, 25, 24, 23 } +}, { + { 100, 0 }, { 100, 21 }, { 100, 43 }, { 100, 64 }, + { 75, 64 }, { 50, 64 }, { 25, 64 }, { 0, 64 }, + { 0, 43 }, { 0, 21 }, { 0, 0 }, + { 25, 0 }, { 50, 0 }, { 75, 0 }, + { 75, 21 }, { 75, 43 }, + { 50, 43 }, { 25, 43 }, + { 25, 21 }, { 50, 21 }, + { 125, 0 }, { 125, 21 }, { 125, 43 }, { 125, 64 }, + { 150, 64 }, { 175, 64 }, { 200, 64 }, { 225, 64 }, + { 225, 43 }, { 225, 21 }, { 225, 0 }, + { 200, 0 }, { 175, 0 }, { 150, 0 }, + { 150, 21 }, { 150, 43 }, + { 175, 43 }, { 200, 43 }, + { 200, 21 }, { 150, 21 } +}, { + 4, 4, 4, 1, + 1, 1, 1, 1, + 4, 4, 4, 4, + 4, 4, 4, 4, + 4, 4, 4, 4, + 4, 4, 4, 1, + 1, 1, 1, 1, + 4, 4, 4, 4, + 4, 4, 4, 4, + 4, 4, 4, 4 +} }; +#endif + +__attribute__((weak)) +void matrix_init_user(void) {} + +void matrix_init_kb(void) { + +#ifdef RGB_MATRIX_ENABLE + // if (!is_keyboard_master()) { + // g_led_config = (led_config_t){ { + // { 30, 31, 32, 33, 20 }, + // { 29, 38, 39, 34, 21 }, + // { 28, 37, 36, 35, 22 }, + // { 27, 26, 25, 24, 23 }, + // { 10, 11, 12, 13, 0 }, + // { 9, 18, 19, 14, 1 }, + // { 8, 17, 16, 15, 2 }, + // { 7, 6, 5, 4, 3 } + // }, { + // { 125, 0 }, { 125, 21 }, { 125, 43 }, { 125, 64 }, + // { 150, 64 }, { 175, 64 }, { 200, 64 }, { 225, 64 }, + // { 225, 43 }, { 225, 21 }, { 225, 0 }, + // { 200, 0 }, { 175, 0 }, { 150, 0 }, + // { 150, 21 }, { 150, 43 }, + // { 175, 43 }, { 200, 43 }, + // { 200, 21 }, { 150, 21 }, + // { 100, 0 }, { 100, 21 }, { 100, 43 }, { 100, 64 }, + // { 75, 64 }, { 50, 64 }, { 25, 64 }, { 0, 64 }, + // { 0, 43 }, { 0, 21 }, { 0, 0 }, + // { 25, 0 }, { 50, 0 }, { 75, 0 }, + // { 75, 21 }, { 75, 43 }, + // { 50, 43 }, { 25, 43 }, + // { 25, 21 }, { 50, 21 } + // }, { + // 4, 4, 4, 1, + // 1, 1, 1, 1, + // 4, 4, 4, 4, + // 4, 4, 4, 4, + // 4, 4, 4, 4, + // 4, 4, 4, 1, + // 1, 1, 1, 1, + // 4, 4, 4, 4, + // 4, 4, 4, 4, + // 4, 4, 4, 4 + // } }; + // } +#endif + matrix_init_user(); +} diff --git a/keyboards/marksard/rhymestone/rev1/rev1.h b/keyboards/marksard/rhymestone/rev1/rev1.h new file mode 100644 index 000000000000..855e288df3c3 --- /dev/null +++ b/keyboards/marksard/rhymestone/rev1/rev1.h @@ -0,0 +1,89 @@ +/* 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" + +/* 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. + */ + +#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) +#define LAYOUT_ortho_4x10( \ + L00, L01, L02, L03, L04, R00, R01, R02, R03, R04, \ + L10, L11, L12, L13, L14, R10, R11, R12, R13, R14, \ + L20, L21, L22, L23, L24, R20, R21, R22, R23, R24, \ + L30, L31, L32, L33, L34, R30, R31, R32, R33, R34 \ + ) \ + { \ + { L00, L01, L02, L03, L04 }, \ + { L10, L11, L12, L13, L14 }, \ + { L20, L21, L22, L23, L24 }, \ + { L30, L31, L32, L33, L34 }, \ + { R04, R03, R02, R01, R00 }, \ + { R14, R13, R12, R11, R10 }, \ + { R24, R23, R22, R21, R20 }, \ + { R34, R33, R32, R31, R30 }, \ + } +#else +// Keymap with right side flipped +// (TRRS jack on both halves are to the right) +#define LAYOUT_ortho_4x10( \ + L00, L01, L02, L03, L04, R00, R01, R02, R03, R04, \ + L10, L11, L12, L13, L14, R10, R11, R12, R13, R14, \ + L20, L21, L22, L23, L24, R20, R21, R22, R23, R24, \ + L30, L31, L32, L33, L34, R30, R31, R32, R33, R34 \ + ) \ + { \ + { L04, L03, L02, L01, L00 }, \ + { L14, L13, L12, L11, L10 }, \ + { L24, L23, L22, L21, L20 }, \ + { L34, L33, L32, L31, L30 }, \ + { R04, R03, R02, R01, R00 }, \ + { R14, R13, R12, R11, R10 }, \ + { R24, R23, R22, R21, R20 }, \ + { R34, R33, R32, R31, R30 }, \ + } +#endif + +#ifdef USE_HASHTWENTY // The HashTwenty is Alpha version of The Rhymestone +#undef LAYOUT_ortho_4x10 +// HashTwenty layout +#define LAYOUT_ortho_4x10( \ + L00, L01, L02, L03, L04, R00, R01, R02, R03, R04, \ + L10, L11, L12, L13, L14, R10, R11, R12, R13, R14, \ + L20, L21, L22, L23, L24, R20, R21, R22, R23, R24, \ + L30, L31, L32, L33, L34, R30, R31, R32, R33, R34 \ + ) \ + { \ + { L04, L03, L02, L01, L00 }, \ + { L14, L13, L12, L11, L10 }, \ + { L24, L23, L22, L21, L20 }, \ + { L34, L33, L32, L31, L30 }, \ + { R00, R01, R02, R03, R04 }, \ + { R10, R11, R12, R13, R14 }, \ + { R20, R21, R22, R23, R24 }, \ + { R30, R31, R32, R33, R34 }, \ + } +#endif diff --git a/keyboards/marksard/rhymestone/rev1/rules.mk b/keyboards/marksard/rhymestone/rev1/rules.mk new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/keyboards/marksard/rhymestone/rules.mk b/keyboards/marksard/rhymestone/rules.mk new file mode 100644 index 000000000000..1f58665efcfb --- /dev/null +++ b/keyboards/marksard/rhymestone/rules.mk @@ -0,0 +1,27 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +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 = yes # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +BLUETOOTH_ENABLE = no # Enable Bluetooth +AUDIO_ENABLE = no # Audio output +SPLIT_KEYBOARD = yes + +DEFAULT_FOLDER = marksard/rhymestone/rev1 + +LAYOUTS = ortho_4x10 From a8a714c46eba273fc64e3bac37e90338774a9d42 Mon Sep 17 00:00:00 2001 From: umi <57262844+umi-umi@users.noreply.github.com> Date: Sat, 5 Sep 2020 13:53:19 +0900 Subject: [PATCH 742/930] [Docs] Japanese translation of docs/reference_configurator_support.md (#9879) * add reference_configurator_support.md translation * update based on comment * update based on comment * update based on comment * update based on comment --- docs/ja/reference_configurator_support.md | 202 ++++++++++++++++++++++ 1 file changed, 202 insertions(+) create mode 100644 docs/ja/reference_configurator_support.md diff --git a/docs/ja/reference_configurator_support.md b/docs/ja/reference_configurator_support.md new file mode 100644 index 000000000000..0151731e99a5 --- /dev/null +++ b/docs/ja/reference_configurator_support.md @@ -0,0 +1,202 @@ +# QMK Configurator でのキーボードのサポート + + + +このページは [QMK Configurator](https://config.qmk.fm/) でキーボードを適切にサポートする方法について説明します。 + + +## Configurator がキーボードを理解する方法 + +Configurator がキーボードをどのように理解するかを理解するには、最初にレイアウトマクロを理解する必要があります。この演習では、17キーのテンキー PCB を想定します。これを `numpad` と呼びます。 + +``` +|---------------| +|NLk| / | * | - | +|---+---+---+---| +|7 |8 |9 | + | +|---+---+---| | +|4 |5 |6 | | +|---+---+---+---| +|1 |2 |3 |Ent| +|-------+---| | +|0 | . | | +|---------------| +``` + +?> レイアウトマクロの詳細については、[QMK の理解: マトリックススキャン](ja/understanding_qmk.md?id=matrix-scanning) と [QMK の理解: マトリックスから物理レイアウトへのマップ](ja/understanding_qmk.md?id=matrix-to-physical-layout-map) を見てください。 + +Configurator の API はキーボードの `.h` ファイルを `qmk_firmware/keyboards//.h` から読み取ります。numpad の場合、このファイルは `qmk_firmware/keyboards/numpad/numpad.h` です: + +```c +#pragma once + +#define LAYOUT( \ + k00, k01, k02, k03, \ + k10, k11, k12, k13, \ + k20, k21, k22, \ + k30, k31, k32, k33, \ + k40, k42 \ + ) { \ + { k00, k01, k02, k03 }, \ + { k10, k11, k12, k13 }, \ + { k20, k21, k22, KC_NO }, \ + { k30, k31, k32, k33 }, \ + { k40, KC_NO, k42, KC_NO } \ +} +``` + +QMK は `KC_NO` を使って、スイッチマトリックス内のスイッチがない場所を指定します。デバッグが必要な場合に、このセクションを読みやすくするために、`XXX`、`___`、`____` を略記として使うこともあります。通常は `.h` ファイルの先頭近くで定義されます: + +```c +#pragma once + +#define XXX KC_NO + +#define LAYOUT( \ + k00, k01, k02, k03, \ + k10, k11, k12, k13, \ + k20, k21, k22, \ + k30, k31, k32, k33, \ + k40, k42 \ + ) { \ + { k00, k01, k02, k03 }, \ + { k10, k11, k12, k13 }, \ + { k20, k21, k22, XXX }, \ + { k30, k31, k32, k33 }, \ + { k40, XXX, k42, XXX } \ +} +``` + +!> この使用方法はキーマップマクロと異なります。キーマップマクロはほとんど常に`KC_NO`については`XXXXXXX` (7つの大文字の X) を、`KC_TRNS` については `_______` (7つのアンダースコア)を使います。 + +!> ユーザの混乱を防ぐために、`KC_NO` を使うことをお勧めします。 + +レイアウトマクロは、キーボードに17個のキーがあり、4列それぞれが5行に配置されていることを Configurator に伝えます。スイッチの位置は、0から始まる `k` という名前が付けられています。キーマップからキーコードを受け取る上部セクションと、マトリックス内の各キーの位置を指定する下部セクションとが一致する限り、名前自体は実際には問題ではありません。 + +物理的なキーボードに似た形でキーボードを表示するには、それぞれのキーの物理的な位置とサイズをスイッチマトリックスに結びつけることを Configurator に伝える JSON ファイルを作成する必要があります。 + +## JSON ファイルのビルド + +JSON ファイルをビルドする最も簡単な方法は、[Keyboard Layout Editor](http://www.keyboard-layout-editor.com/) ("KLE") でレイアウトを作成することです。この Raw Data を QMK tool に入れて、Configurator が読み出して使用する JSON ファイルに変換します。KLE は numpad レイアウトをデフォルトで開くため、Getting Started の説明を削除し、残りを使います。 + +レイアウトが望み通りのものになったら、KLE の Raw Data タブに移動し、内容をコピーします: + +``` +["Num Lock","/","*","-"], +["7\nHome","8\n↑","9\nPgUp",{h:2},"+"], +["4\n←","5","6\n→"], +["1\nEnd","2\n↓","3\nPgDn",{h:2},"Enter"], +[{w:2},"0\nIns",".\nDel"] +``` + +このデータを JSON に変換するには、[QMK KLE-JSON Converter](https://qmk.fm/converter/) に移動し、Raw Data を Input フィールド に貼り付け、Convert ボタンをクリックします。しばらくすると、JSON データが Output フィールドに表示されます。内容を新しいテキストドキュメントにコピーし、ドキュメントに `info.json` という名前を付け、`numpad.h` を含む同じフォルダに保存します。 + +`keyboard_name` オブジェクトを使ってキーボードの名前を設定します。説明のために、各キーのオブジェクトを各行に配置します。これはファイルを人間が読みやすいものにするためのもので、Configurator の機能には影響しません。 + +```json +{ + "keyboard_name": "Numpad", + "url": "", + "maintainer": "qmk", + "tags": { + "form_factor": "numpad" + }, + "width": 4, + "height": 5, + "layouts": { + "LAYOUT": { + "layout": [ + {"label":"Num Lock", "x":0, "y":0}, + {"label":"/", "x":1, "y":0}, + {"label":"*", "x":2, "y":0}, + {"label":"-", "x":3, "y":0}, + {"label":"7", "x":0, "y":1}, + {"label":"8", "x":1, "y":1}, + {"label":"9", "x":2, "y":1}, + {"label":"+", "x":3, "y":1, "h":2}, + {"label":"4", "x":0, "y":2}, + {"label":"5", "x":1, "y":2}, + {"label":"6", "x":2, "y":2}, + {"label":"1", "x":0, "y":3}, + {"label":"2", "x":1, "y":3}, + {"label":"3", "x":2, "y":3}, + {"label":"Enter", "x":3, "y":3, "h":2}, + {"label":"0", "x":0, "y":4, "w":2}, + {"label":".", "x":2, "y":4} + ] + } + } +} +``` + +`layouts` オブジェクトにはキーボードの物理レイアウトを表すデータが含まれます。このオブジェクトには `LAYOUT` という名前のオブジェクトがあり、このオブジェクト名は `numpad.h` のレイアウトマクロの名前と一致する必要があります。`LAYOUT` オブジェクト自体には `layout` という名前のオブジェクトがあります。このオブジェクトにはキーボードの物理キーごとに 1つの JSON オブジェクトが以下の形式で含まれています: + +``` + キーの名前。Configurator では表示されません。 + | + | キーボードの左端からのキー単位での + | | キーの X 軸の位置。 + | | + | | キーボードの上端(奥側)からのキー単位での + | | | キーの Y 軸位置。 + ↓ ↓ ↓ +{"label":"Num Lock", "x":0, "y":0}, +``` + +一部のオブジェクトには、それぞれキーの幅と高さを表す `"w"` 属性キーと `"h"` 属性キーがあります。 + +?> `info.json` ファイルの詳細については、[`info.json` 形式](ja/reference_info_json.md) を参照してください。 + + +## Configurator がキーをプログラムする方法 + +Configurator の API は、指定されたレイアウトマクロと JSON ファイルを使って、特定のキーに関連付けられた各ビジュアルオブジェクトを順番に持つキーボードのビジュアル表現を作成します: + +| レイアウトマクロのキー | 使用される JSON オブジェクト | +:---: | :---- +| k00 | {"label":"Num Lock", "x":0, "y":0} | +| k01 | {"label":"/", "x":1, "y":0} | +| k02 | {"label":"*", "x":2, "y":0} | +| k03 | {"label":"-", "x":3, "y":0} | +| k10 | {"label":"7", "x":0, "y":1} | +| k11 | {"label":"8", "x":1, "y":1} | +| k12 | {"label":"9", "x":2, "y":1} | +| k13 | {"label":"+", "x":3, "y":1, "h":2} | +| k20 | {"label":"4", "x":0, "y":2} | +| k21 | {"label":"5", "x":1, "y":2} | +| k22 | {"label":"6", "x":2, "y":2} | +| k30 | {"label":"1", "x":0, "y":3} | +| k31 | {"label":"2", "x":1, "y":3} | +| k32 | {"label":"3", "x":2, "y":3} | +| k33 | {"label":"Enter", "x":3, "y":3, "h":2} | +| k40 | {"label":"0", "x":0, "y":4, "w":2} | +| k42 | {"label":".", "x":2, "y":4} | + +ユーザが Configurator で左上のキーを選択し、Num Lock を割り当てると、Configurator は最初のキーとして `KC_NLCK` を持つキーマップを作成し、同様にキーマップが作成されます。`label` キーは使われません; それらは `info.json` ファイルをデバッグする時に特定のキーを識別するためのユーザの参照のためだけのものです。 + + +## 問題と危険 + +現在のところ、Configurator はキーの回転または ISO Enter などの長方形ではないキーをサポートしません。さらに、"行"から垂直方向にずれているキー、— 顕著な例として [TKC1800](https://github.com/qmk/qmk_firmware/tree/4ac48a61a66206beaf2fdd5f2939d8bbedd0004c/keyboards/tkc1800/) のような1800レイアウト上の矢印キー — は、 `info.json` ファイルの提供者によって調整されていない場合は、KLE-to-JSON コンバータを混乱させます。 + +### 回避策 + +#### 長方形ではないキー + +ISO Enter キーについては、QMK custom は幅 1.25u、高さ 2u の長方形のキーとして表示し、右端が英数字キーブロックの右端に揃うように配置されます。 + +![](https://i.imgur.com/JKngtTw.png) +*QMK Configurator によって描画される標準 ISO レイアウトの60%キーボード。* + +#### 垂直方向にずれたキー + +垂直方向にずれたキーについては、ずれていないかのように KLE で配置し、変換された JSON ファイルで必要に応じて Y 値を編集します。 + +![](https://i.imgur.com/fmDvDzR.png) +*矢印キーに適用される垂直方向のずれのない、Keyboard Layout Editor で描画された1800レイアウトのキーボード。* + +![](https://i.imgur.com/8beYMBR.png) +*キーボードの JSON ファイルで矢印キーを垂直方向にずらすために必要な変更を示す、Unix の diff ファイル。* From 687d05dfb13de08b519e455ef95b8155c2492af6 Mon Sep 17 00:00:00 2001 From: Ryan Date: Sat, 5 Sep 2020 23:37:25 +1000 Subject: [PATCH 743/930] Update file changes action (#10245) --- .github/workflows/info.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/info.yml b/.github/workflows/info.yml index 7551c127e0ae..bb3a50847766 100644 --- a/.github/workflows/info.yml +++ b/.github/workflows/info.yml @@ -16,7 +16,7 @@ jobs: with: fetch-depth: 0 - - uses: trilom/file-changes-action@v1.2.3 + - uses: trilom/file-changes-action@v1.2.4 id: file_changes with: output: '\n' From d612d617eec446bb20a45dcbb1e2831361ddc81d Mon Sep 17 00:00:00 2001 From: Brandon Claveria <48102030+swiftrax@users.noreply.github.com> Date: Sat, 5 Sep 2020 11:37:05 -0700 Subject: [PATCH 744/930] [Keyboard] add Pandamic handwired (#10227) * Add pandemic keyboard * Fix default keymap * Add via keymap * Fix via keymap * Fix keymaps and pandamic.h * add info.json * update info.json * Apply suggestions from code review * Update keyboards/handwired/swiftrax/pandamic/info.json * make suggested changes --- .../handwired/swiftrax/pandamic/config.h | 52 +++++++++++++++++++ .../handwired/swiftrax/pandamic/info.json | 12 +++++ .../pandamic/keymaps/default/keymap.c | 49 +++++++++++++++++ .../swiftrax/pandamic/keymaps/via/keymap.c | 46 ++++++++++++++++ .../swiftrax/pandamic/keymaps/via/rules.mk | 1 + .../handwired/swiftrax/pandamic/pandamic.c | 16 ++++++ .../handwired/swiftrax/pandamic/pandamic.h | 40 ++++++++++++++ .../handwired/swiftrax/pandamic/readme.md | 13 +++++ .../handwired/swiftrax/pandamic/rules.mk | 23 ++++++++ 9 files changed, 252 insertions(+) create mode 100644 keyboards/handwired/swiftrax/pandamic/config.h create mode 100644 keyboards/handwired/swiftrax/pandamic/info.json create mode 100644 keyboards/handwired/swiftrax/pandamic/keymaps/default/keymap.c create mode 100644 keyboards/handwired/swiftrax/pandamic/keymaps/via/keymap.c create mode 100644 keyboards/handwired/swiftrax/pandamic/keymaps/via/rules.mk create mode 100644 keyboards/handwired/swiftrax/pandamic/pandamic.c create mode 100644 keyboards/handwired/swiftrax/pandamic/pandamic.h create mode 100644 keyboards/handwired/swiftrax/pandamic/readme.md create mode 100644 keyboards/handwired/swiftrax/pandamic/rules.mk diff --git a/keyboards/handwired/swiftrax/pandamic/config.h b/keyboards/handwired/swiftrax/pandamic/config.h new file mode 100644 index 000000000000..0916bbf1c753 --- /dev/null +++ b/keyboards/handwired/swiftrax/pandamic/config.h @@ -0,0 +1,52 @@ +/* +Copyright 2020 Swiftrax + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License 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 0xEB0E +#define DEVICE_VER 0x0001 +#define MANUFACTURER Swiftrax +#define PRODUCT Pandamic + +/* key matrix size */ +#define MATRIX_ROWS 10 +#define MATRIX_COLS 10 + +// ROWS: Top to bottom, COLS: Left to right + +#define MATRIX_ROW_PINS { D1, D2, B5, B7, D3, D5, D6, D4, D7, B4 } +#define MATRIX_COL_PINS { B6, C6, C7, F7, F6, F5, F4, F1, F0, D0 } + +#define ENCODERS_PAD_A { E6 } +#define ENCODERS_PAD_B { B0 } + + +/* COL2ROW or ROW2COL */ +#define DIODE_DIRECTION ROW2COL + +/* define if matrix has ghost */ +//#define MATRIX_HAS_GHOST + +/* Set 0 if debouncing isn't needed */ +#define DEBOUNCE 5 + +/*EEPROM for via*/ +#define DYNAMIC_KEYMAP_LAYER_COUNT 3 diff --git a/keyboards/handwired/swiftrax/pandamic/info.json b/keyboards/handwired/swiftrax/pandamic/info.json new file mode 100644 index 000000000000..4446a041dd9b --- /dev/null +++ b/keyboards/handwired/swiftrax/pandamic/info.json @@ -0,0 +1,12 @@ +{ + "keyboard_name": "Pandamic", + "url": "https://github.com/swiftrax", + "maintainer": "swiftrax", + "width": 20.75, + "height": 5.25, + "layouts": { + "LAYOUT": { + "layout": [{"x":0, "y":0}, {"x":1, "y":0}, {"x":2, "y":0}, {"x":3, "y":0}, {"x":4.25, "y":0}, {"x":5.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.25, "y":0}, {"x":11.25, "y":0}, {"x":12.25, "y":0}, {"x":13.25, "y":0}, {"x":14.25, "y":0}, {"x":15.25, "y":0}, {"x":16.25, "y":0}, {"x":17.25, "y":0}, {"x":18.25, "y":0}, {"x":19.75, "y":0}, {"x":0, "y":1}, {"x":1, "y":1}, {"x":2, "y":1}, {"x":3, "y":1, "h":2}, {"x":4.25, "y":1, "w":1.5}, {"x":5.75, "y":1}, {"x":6.75, "y":1}, {"x":7.75, "y":1}, {"x":8.75, "y":1}, {"x":9.75, "y":1}, {"x":10.75, "y":1}, {"x":11.75, "y":1}, {"x":12.75, "y":1}, {"x":13.75, "y":1}, {"x":14.75, "y":1}, {"x":15.75, "y":1}, {"x":16.75, "y":1}, {"x":17.75, "y":1, "w":1.5}, {"x":19.75, "y":1}, {"x":0, "y":2}, {"x":1, "y":2}, {"x":2, "y":2}, {"x":4.25, "y":2, "w":1.75}, {"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":12, "y":2}, {"x":13, "y":2}, {"x":14, "y":2}, {"x":15, "y":2}, {"x":16, "y":2}, {"x":17, "y":2, "w":2.25}, {"x":19.75, "y":2}, {"x":0, "y":3}, {"x":1, "y":3}, {"x":2, "y":3}, {"x":3, "y":3, "h":2}, {"x":4.25, "y":3, "w":1.25}, {"x":5.5, "y":3}, {"x":6.5, "y":3}, {"x":7.5, "y":3}, {"x":8.5, "y":3}, {"x":9.5, "y":3}, {"x":10.5, "y":3}, {"x":11.5, "y":3}, {"x":12.5, "y":3}, {"x":13.5, "y":3}, {"x":14.5, "y":3}, {"x":15.5, "y":3}, {"x":16.5, "y":3, "w":1.75}, {"x":18.5, "y":3.25}, {"x":19.75, "y":3}, {"x":0, "y":4, "w":2}, {"x":2, "y":4}, {"x":4.25, "y":4, "w":1.25}, {"x":5.5, "y":4, "w":1.25}, {"x":6.75, "y":4, "w":1.25}, {"x":8, "y":4, "w":6.25}, {"x":14.25, "y":4}, {"x":15.25, "y":4}, {"x":16.25, "y":4}, {"x":17.5, "y":4.25}, {"x":18.5, "y":4.25}, {"x":19.5, "y":4.25}] + } + } +} diff --git a/keyboards/handwired/swiftrax/pandamic/keymaps/default/keymap.c b/keyboards/handwired/swiftrax/pandamic/keymaps/default/keymap.c new file mode 100644 index 000000000000..11e770921e2c --- /dev/null +++ b/keyboards/handwired/swiftrax/pandamic/keymaps/default/keymap.c @@ -0,0 +1,49 @@ +/* Copyright 2020 swiftrax + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public 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. +enum _layer { + _MA, + _FN +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +[_MA] = LAYOUT( + KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS, 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_MUTE, + 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_P4, KC_P5, KC_P6, 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_END, + KC_P1, KC_P2, KC_P3, KC_PENT, KC_LSFT, MO(_FN), 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_HOME, + KC_P0, KC_PDOT, KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, MO(_FN), KC_RGUI, 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_PSCR, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______), +}; + +void encoder_update_user(uint8_t index, bool clockwise) { + if (clockwise) { + tap_code(KC_VOLU); + } else { + tap_code(KC_VOLD); + } +} \ No newline at end of file diff --git a/keyboards/handwired/swiftrax/pandamic/keymaps/via/keymap.c b/keyboards/handwired/swiftrax/pandamic/keymaps/via/keymap.c new file mode 100644 index 000000000000..38e455becb60 --- /dev/null +++ b/keyboards/handwired/swiftrax/pandamic/keymaps/via/keymap.c @@ -0,0 +1,46 @@ +/* Copyright 2020 swiftrax + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public 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_NLCK, KC_PSLS, KC_PAST, KC_PMNS, 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_MUTE, + 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_P4, KC_P5, KC_P6, 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_END, + KC_P1, KC_P2, KC_P3, KC_PENT, 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_HOME, + KC_P0, KC_PDOT, KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, MO(1), KC_RGUI, KC_RCTL, 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, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______), +[2] = LAYOUT( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______), +}; + +void encoder_update_user(uint8_t index, bool clockwise) { + if (clockwise) { + tap_code(KC_VOLU); + } else { + tap_code(KC_VOLD); + } +} \ No newline at end of file diff --git a/keyboards/handwired/swiftrax/pandamic/keymaps/via/rules.mk b/keyboards/handwired/swiftrax/pandamic/keymaps/via/rules.mk new file mode 100644 index 000000000000..036bd6d1c3ec --- /dev/null +++ b/keyboards/handwired/swiftrax/pandamic/keymaps/via/rules.mk @@ -0,0 +1 @@ +VIA_ENABLE = yes \ No newline at end of file diff --git a/keyboards/handwired/swiftrax/pandamic/pandamic.c b/keyboards/handwired/swiftrax/pandamic/pandamic.c new file mode 100644 index 000000000000..c718a3373415 --- /dev/null +++ b/keyboards/handwired/swiftrax/pandamic/pandamic.c @@ -0,0 +1,16 @@ +/* Copyright 2020 swiftrax + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#include "pandamic.h" diff --git a/keyboards/handwired/swiftrax/pandamic/pandamic.h b/keyboards/handwired/swiftrax/pandamic/pandamic.h new file mode 100644 index 000000000000..9fbb78427e83 --- /dev/null +++ b/keyboards/handwired/swiftrax/pandamic/pandamic.h @@ -0,0 +1,40 @@ +/* Copyright 2020 swiftrax + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License 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" + +// readability +#define XXX KC_NO + +#define LAYOUT( \ + K000, K100, K001, K101, K002, K102, K003, K103, K004, K104, K005, K105, K006, K106, K007, K107, K008, K108, K009, K109,\ + K200, K300, K201, K301, K202, K302, K203, K303, K204, K304, K205, K305, K206, K306, K207, K307, K208, K308, K309,\ + K400, K500, K401, K402, K502, K403, K503, K404, K504, K405, K505, K406, K506, K407, K507, K508, K509,\ + K600, K700, K601, K701, K602, K702, K603, K703, K604, K704, K605, K705, K606, K706, K607, K707, K608, K609, K709,\ + K800, K801, K802, K902, K803, K805, K807, K907, K808, K908, K809, K909 \ +) { \ + {K000, K001, K002, K003, K004, K005, K006, K007, K008, K009},\ + {K100, K101, K102, K103, K104, K105, K106, K107, K108, K109},\ + {K200, K201, K202, K203, K204, K205, K206, K207, K208, XXX},\ + {K300, K301, K302, K303, K304, K305, K306, K307, K308, K309},\ + {K400, K401, K402, K403, K404, K405, K406, K407, XXX, XXX},\ + {K500, XXX, K502, K503, K504, K505, K506, K507, K508, K509},\ + {K600, K601, K602, K603, K604, K605, K606, K607, K608, K609},\ + {K700, K701, K702, K703, K704, K705, K706, K707, XXX, K709},\ + {K800, K801, K802, K803, XXX, K805, XXX, K807, K808, K809},\ + { XXX, XXX, K902, XXX, XXX, XXX, XXX, K907, K908, K909} \ +} diff --git a/keyboards/handwired/swiftrax/pandamic/readme.md b/keyboards/handwired/swiftrax/pandamic/readme.md new file mode 100644 index 000000000000..227c2ebe11b4 --- /dev/null +++ b/keyboards/handwired/swiftrax/pandamic/readme.md @@ -0,0 +1,13 @@ +# Pandamic + +A southpaw 65% mechanical keyboard with rotary encoder support + +* Keyboard Maintainer: [Swiftrax](https://github.com/swiftrax) +* Hardware Supported: Pandamic +* Hardware Availability: [GitHub.com](https://github.com/swiftrax/Pandamic) + +Make example for this keyboard (after setting up your build environment): + + make handwired/swiftrax/pandamic: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/swiftrax/pandamic/rules.mk b/keyboards/handwired/swiftrax/pandamic/rules.mk new file mode 100644 index 000000000000..f83e0a1fd13e --- /dev/null +++ b/keyboards/handwired/swiftrax/pandamic/rules.mk @@ -0,0 +1,23 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +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 +BLUETOOTH_ENABLE = no # Enable Bluetooth +AUDIO_ENABLE = no # Audio output +ENCODER_ENABLE = yes # Rotary Encoder From 9bca381b9824da7fb1010a5377c73579af478dea Mon Sep 17 00:00:00 2001 From: Olivier Li Date: Sat, 5 Sep 2020 19:51:38 -0400 Subject: [PATCH 745/930] Unflip < and > for canadian mutlilingual (#10222) Co-authored-by: Olivier Li --- quantum/keymap_extras/keymap_canadian_multilingual.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/quantum/keymap_extras/keymap_canadian_multilingual.h b/quantum/keymap_extras/keymap_canadian_multilingual.h index 20333fd6da24..382e67ac994b 100644 --- a/quantum/keymap_extras/keymap_canadian_multilingual.h +++ b/quantum/keymap_extras/keymap_canadian_multilingual.h @@ -151,8 +151,8 @@ // Row 4 #define CA_LDAQ ALGR(CA_X) // « #define CA_RDAQ ALGR(CA_C) // » -#define CA_LABK ALGR(CA_DOT) // < -#define CA_RABK ALGR(CA_COMM) // > +#define CA_LABK ALGR(CA_COMM) // < +#define CA_RABK ALGR(CA_DOT) // > /* Right Ctrl symbols * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ From e0b7c70743d9307f3131d827848b79f821abaf69 Mon Sep 17 00:00:00 2001 From: Maarten Dekkers Date: Sun, 6 Sep 2020 08:07:34 +0200 Subject: [PATCH 746/930] [Keyboard] add Solheim68 by Maartenwut (#10190) * Add Solheim68 * Update info.json * Layout rename and config cleanup --- keyboards/maartenwut/solheim68/config.h | 143 +++++++ keyboards/maartenwut/solheim68/info.json | 397 ++++++++++++++++++ .../solheim68/keymaps/default/keymap.c | 31 ++ .../solheim68/keymaps/default/readme.md | 1 + keyboards/maartenwut/solheim68/readme.md | 17 + keyboards/maartenwut/solheim68/rules.mk | 22 + keyboards/maartenwut/solheim68/solheim68.c | 16 + keyboards/maartenwut/solheim68/solheim68.h | 102 +++++ 8 files changed, 729 insertions(+) create mode 100644 keyboards/maartenwut/solheim68/config.h create mode 100644 keyboards/maartenwut/solheim68/info.json create mode 100644 keyboards/maartenwut/solheim68/keymaps/default/keymap.c create mode 100644 keyboards/maartenwut/solheim68/keymaps/default/readme.md create mode 100644 keyboards/maartenwut/solheim68/readme.md create mode 100644 keyboards/maartenwut/solheim68/rules.mk create mode 100644 keyboards/maartenwut/solheim68/solheim68.c create mode 100644 keyboards/maartenwut/solheim68/solheim68.h diff --git a/keyboards/maartenwut/solheim68/config.h b/keyboards/maartenwut/solheim68/config.h new file mode 100644 index 000000000000..cb2070e872c5 --- /dev/null +++ b/keyboards/maartenwut/solheim68/config.h @@ -0,0 +1,143 @@ +/* Copyright 2020 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 0x7BFF +#define DEVICE_VER 0x0001 +#define MANUFACTURER Maartenwut +#define PRODUCT Solheim68 + +/* key matrix size */ +#define MATRIX_ROWS 5 +#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} +#define MATRIX_COL_PINS {F0,F1,F4,F5,F6,F7,C7,C6,B6,B5,B4,D7,D6,D4,D5,D3} +#define UNUSED_PINS {B7,D0,D1,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 + +/* + * 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/maartenwut/solheim68/info.json b/keyboards/maartenwut/solheim68/info.json new file mode 100644 index 000000000000..14a4a36f5a01 --- /dev/null +++ b/keyboards/maartenwut/solheim68/info.json @@ -0,0 +1,397 @@ +{ + "keyboard_name": "Solheim68", + "url": "https://github.com/Maartenwut/solheim68", + "maintainer": "maartenwut", + "width": 17.25, + "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":15.25, "y":0}, + {"x":16.25, "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.25, "y":1}, + {"x":16.25, "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}, + {"x":13.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}, + {"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.25, "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, "w":1.25}, + {"x":11.25, "y":4, "w":1.25}, + {"x":12.5, "y":4, "w":1.25}, + {"x":14.25, "y":4}, + {"x":15.25, "y":4}, + {"x":16.25, "y":4} + ] + }, + "LAYOUT_68_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.25, "y":0}, + {"x":16.25, "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.25, "y":1}, + {"x":16.25, "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":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":15.25, "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, "w":1.25}, + {"x":11.25, "y":4, "w":1.25}, + {"x":12.5, "y":4, "w":1.25}, + {"x":14.25, "y":4}, + {"x":15.25, "y":4}, + {"x":16.25, "y":4} + ] + }, + "LAYOUT_68_iso": { + "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.25, "y":0}, + {"x":16.25, "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":15.25, "y":1}, + {"x":16.25, "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}, + {"x":13.75, "y":1, "w":1.25, "h":2}, + + {"x":0, "y":3, "w":1.25}, + {"x":1.25, "y":3}, + {"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":15.25, "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, "w":1.25}, + {"x":11.25, "y":4, "w":1.25}, + {"x":12.5, "y":4, "w":1.25}, + {"x":14.25, "y":4}, + {"x":15.25, "y":4}, + {"x":16.25, "y":4} + ] + }, + "LAYOUT_68_ansi_split_rshift": { + "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.25, "y":0}, + {"x":16.25, "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.25, "y":1}, + {"x":16.25, "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":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.25, "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, "w":1.25}, + {"x":11.25, "y":4, "w":1.25}, + {"x":12.5, "y":4, "w":1.25}, + {"x":14.25, "y":4}, + {"x":15.25, "y":4}, + {"x":16.25, "y":4} + ] + }, + "LAYOUT_68_iso_split_rshift": { + "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.25, "y":0}, + {"x":16.25, "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":15.25, "y":1}, + {"x":16.25, "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}, + {"x":13.75, "y":1, "w":1.25, "h":2}, + + {"x":0, "y":3, "w":1.25}, + {"x":1.25, "y":3}, + {"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.25, "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, "w":1.25}, + {"x":11.25, "y":4, "w":1.25}, + {"x":12.5, "y":4, "w":1.25}, + {"x":14.25, "y":4}, + {"x":15.25, "y":4}, + {"x":16.25, "y":4} + ] + } + } +} \ No newline at end of file diff --git a/keyboards/maartenwut/solheim68/keymaps/default/keymap.c b/keyboards/maartenwut/solheim68/keymaps/default/keymap.c new file mode 100644 index 000000000000..728e8019a2c3 --- /dev/null +++ b/keyboards/maartenwut/solheim68/keymaps/default/keymap.c @@ -0,0 +1,31 @@ +/* Copyright 2020 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 + +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_BSLS, KC_BSPC, KC_MPLY, 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_DEL, 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_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(1), KC_UP, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, KC_RCTL, KC_LEFT, KC_DOWN, KC_RIGHT), + [1] = LAYOUT_all( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET, KC_PSCR, KC_PGUP, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_PGDN, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_VOLD, KC_VOLU, KC_MUTE, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______), +}; diff --git a/keyboards/maartenwut/solheim68/keymaps/default/readme.md b/keyboards/maartenwut/solheim68/keymaps/default/readme.md new file mode 100644 index 000000000000..6e9745403b39 --- /dev/null +++ b/keyboards/maartenwut/solheim68/keymaps/default/readme.md @@ -0,0 +1 @@ +This is the default keymap for the Solheim68. \ No newline at end of file diff --git a/keyboards/maartenwut/solheim68/readme.md b/keyboards/maartenwut/solheim68/readme.md new file mode 100644 index 000000000000..1cf0ee94635e --- /dev/null +++ b/keyboards/maartenwut/solheim68/readme.md @@ -0,0 +1,17 @@ +# Solheim68 + +A replacement PCB for the VA68M (v2) with Mini-USB. + +* Keyboard Maintainer: [Maartenwut](https://github.com/Maartenwut) +* Hardware Supported: Solheim68 PCB +* Hardware Availability: [Open source on GitHub](https://github.com/Maartenwut/solheim68) + +Make example for this keyboard (after setting up your build environment): + + make maartenwut/solheim68:default + +Flashing example for this keyboard: + + make maartenwut/solheim68: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). diff --git a/keyboards/maartenwut/solheim68/rules.mk b/keyboards/maartenwut/solheim68/rules.mk new file mode 100644 index 000000000000..a90eef1fc65a --- /dev/null +++ b/keyboards/maartenwut/solheim68/rules.mk @@ -0,0 +1,22 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +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 +BLUETOOTH_ENABLE = no # Enable Bluetooth +AUDIO_ENABLE = no # Audio output diff --git a/keyboards/maartenwut/solheim68/solheim68.c b/keyboards/maartenwut/solheim68/solheim68.c new file mode 100644 index 000000000000..27f90f4e8741 --- /dev/null +++ b/keyboards/maartenwut/solheim68/solheim68.c @@ -0,0 +1,16 @@ +/* Copyright 2020 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 "solheim68.h" diff --git a/keyboards/maartenwut/solheim68/solheim68.h b/keyboards/maartenwut/solheim68/solheim68.h new file mode 100644 index 000000000000..2f6339bd10ed --- /dev/null +++ b/keyboards/maartenwut/solheim68/solheim68.h @@ -0,0 +1,102 @@ +/* Copyright 2020 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, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k2e, k0d, k0e, k0f, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d, k1e, k1f, \ + 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, k3e, \ + k40, k41, k42, k46, k4a, k4b, k4c, k4d, k4e, k4f \ +) \ +{ \ + { 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, k1d, k1e, k1f }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2d, k2e, XXX }, \ + { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d, k3e, XXX }, \ + { k40, k41, k42, XXX, XXX, XXX, k46, XXX, XXX, XXX, k4a, k4b, k4c, k4d, k4e, k4f } \ +} + +#define LAYOUT_68_ansi( \ + 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, k1d, k1e, k1f, \ + 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, k3e, \ + k40, k41, k42, k46, k4a, k4b, k4c, k4d, k4e, k4f \ +) \ +{ \ + { 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, k1d, k1e, k1f }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, XXX, k2d, XXX, XXX }, \ + { k30, XXX, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, XXX, k3e, XXX }, \ + { k40, k41, k42, XXX, XXX, XXX, k46, XXX, XXX, XXX, k4a, k4b, k4c, k4d, k4e, k4f } \ +} + +#define LAYOUT_68_iso( \ + 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, k2d, \ + k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3e, \ + k40, k41, k42, k46, k4a, k4b, k4c, k4d, k4e, k4f \ +) \ +{ \ + { 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, XXX, k1e, k1f }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2d, XXX, XXX }, \ + { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, XXX, k3e, XXX }, \ + { k40, k41, k42, XXX, XXX, XXX, k46, XXX, XXX, XXX, k4a, k4b, k4c, k4d, k4e, k4f } \ +} + +#define LAYOUT_68_ansi_split_rshift( \ + 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, k1d, k1e, k1f, \ + 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, k46, k4a, k4b, k4c, k4d, k4e, k4f \ +) \ +{ \ + { 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, k1d, k1e, k1f }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, XXX, k2d, XXX, XXX }, \ + { k30, XXX, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d, k3e, XXX }, \ + { k40, k41, k42, XXX, XXX, XXX, k46, XXX, XXX, XXX, k4a, k4b, k4c, k4d, k4e, k4f } \ +} + +#define LAYOUT_68_iso_split_rshift( \ + 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, k2d, \ + k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d, k3e, \ + k40, k41, k42, k46, k4a, k4b, k4c, k4d, k4e, k4f \ +) \ +{ \ + { 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, XXX, k1e, k1f }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2d, XXX, XXX }, \ + { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d, k3e, XXX }, \ + { k40, k41, k42, XXX, XXX, XXX, k46, XXX, XXX, XXX, k4a, k4b, k4c, k4d, k4e, k4f } \ +} From d0eabd083ebe13b864dd7628b43096c8362d0f29 Mon Sep 17 00:00:00 2001 From: Maarten Dekkers Date: Sun, 6 Sep 2020 09:33:43 +0200 Subject: [PATCH 747/930] [Keyboard] add Plume Keyboards Plume65 (#10176) * Add Plume65 * Changes --- keyboards/plume/plume65/config.h | 137 +++++++ keyboards/plume/plume65/info.json | 376 ++++++++++++++++++ .../plume/plume65/keymaps/default/keymap.c | 33 ++ .../plume/plume65/keymaps/default/readme.md | 1 + keyboards/plume/plume65/keymaps/via/keymap.c | 45 +++ keyboards/plume/plume65/keymaps/via/rules.mk | 1 + keyboards/plume/plume65/plume65.c | 16 + keyboards/plume/plume65/plume65.h | 103 +++++ keyboards/plume/plume65/readme.md | 16 + keyboards/plume/plume65/rules.mk | 22 + 10 files changed, 750 insertions(+) create mode 100644 keyboards/plume/plume65/config.h create mode 100644 keyboards/plume/plume65/info.json create mode 100644 keyboards/plume/plume65/keymaps/default/keymap.c create mode 100644 keyboards/plume/plume65/keymaps/default/readme.md create mode 100644 keyboards/plume/plume65/keymaps/via/keymap.c create mode 100644 keyboards/plume/plume65/keymaps/via/rules.mk create mode 100644 keyboards/plume/plume65/plume65.c create mode 100644 keyboards/plume/plume65/plume65.h create mode 100644 keyboards/plume/plume65/readme.md create mode 100644 keyboards/plume/plume65/rules.mk diff --git a/keyboards/plume/plume65/config.h b/keyboards/plume/plume65/config.h new file mode 100644 index 000000000000..2cd05e180af7 --- /dev/null +++ b/keyboards/plume/plume65/config.h @@ -0,0 +1,137 @@ +/* Copyright 2020 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 0x5D66 +#define PRODUCT_ID 0x22CF +#define DEVICE_VER 0x0001 +#define MANUFACTURER Plume Keyboards LLC +#define PRODUCT Plume65 + +/* 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 { D2, D5, E6, D0, D1 } +#define MATRIX_COL_PINS { B7, F7, C7, C6, B6, F0, B5, F1, B4, F4, D7, F5, D6, F6, D4 } +#define UNUSED_PINS { } + +/* COL2ROW, ROW2COL*/ +#define DIODE_DIRECTION COL2ROW + + #define RGB_DI_PIN B0 +// #ifdef RGB_DI_PIN + #define RGBLED_NUM 10 +// #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 + +/* + * 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 + +#define QMK_ESC_OUTPUT B7 // usually COL +#define QMK_ESC_INPUT D2 // usually ROW diff --git a/keyboards/plume/plume65/info.json b/keyboards/plume/plume65/info.json new file mode 100644 index 000000000000..941d911f39a4 --- /dev/null +++ b/keyboards/plume/plume65/info.json @@ -0,0 +1,376 @@ +{ + "keyboard_name": "Plume65", + "url": "", + "maintainer": "maartenwut", + "width": 16, + "height": 5, + "layouts": { + "LAYOUT_iso": { + "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":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}, + {"x":13.75, "y":1, "w":1.25, "h":2}, + {"x":15, "y":2}, + + {"x":0, "y":3, "w":1.25}, + {"x":1.25, "y":3}, + {"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.5}, + {"x":2.5, "y":4, "w":1.5}, + {"x":4, "y":4, "w":7}, + {"x":11, "y":4, "w":1.5}, + {"x":13, "y":4}, + {"x":14, "y":4}, + {"x":15, "y":4} + ] + }, + "LAYOUT_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":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.5}, + {"x":2.5, "y":4, "w":1.5}, + {"x":4, "y":4, "w":7}, + {"x":11, "y":4, "w":1.5}, + {"x":13, "y":4}, + {"x":14, "y":4}, + {"x":15, "y":4} + ] + }, + "LAYOUT_iso_split_bs": { + "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":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}, + {"x":13.75, "y":1, "w":1.25, "h":2}, + {"x":15, "y":2}, + + {"x":0, "y":3, "w":1.25}, + {"x":1.25, "y":3}, + {"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.5}, + {"x":2.5, "y":4, "w":1.5}, + {"x":4, "y":4, "w":7}, + {"x":11, "y":4, "w":1.5}, + {"x":13, "y":4}, + {"x":14, "y":4}, + {"x":15, "y":4} + ] + }, + "LAYOUT_ansi_split_bs": { + "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":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.5}, + {"x":2.5, "y":4, "w":1.5}, + {"x":4, "y":4, "w":7}, + {"x":11, "y":4, "w":1.5}, + {"x":13, "y":4}, + {"x":14, "y":4}, + {"x":15, "y":4} + ] + }, + "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":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}, + {"x":13.75, "y":2, "w":1.25}, + {"x":15, "y":2}, + + {"x":0, "y":3, "w":1.25}, + {"x":1.25, "y":3}, + {"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.5}, + {"x":2.5, "y":4, "w":1.5}, + {"x":4, "y":4, "w":7}, + {"x":11, "y":4, "w":1.5}, + {"x":13, "y":4}, + {"x":14, "y":4}, + {"x":15, "y":4} + ] + } + } +} diff --git a/keyboards/plume/plume65/keymaps/default/keymap.c b/keyboards/plume/plume65/keymaps/default/keymap.c new file mode 100644 index 000000000000..343c3b4f7955 --- /dev/null +++ b/keyboards/plume/plume65/keymaps/default/keymap.c @@ -0,0 +1,33 @@ +/* Copyright 2020 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 + +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_TAB, KC_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_LALT, KC_SPC, MO(1), KC_LEFT, KC_DOWN, KC_RGHT), +[1] = LAYOUT_ansi( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______) + +}; diff --git a/keyboards/plume/plume65/keymaps/default/readme.md b/keyboards/plume/plume65/keymaps/default/readme.md new file mode 100644 index 000000000000..33c50283a065 --- /dev/null +++ b/keyboards/plume/plume65/keymaps/default/readme.md @@ -0,0 +1 @@ +This is the default keymap for the Plume65. diff --git a/keyboards/plume/plume65/keymaps/via/keymap.c b/keyboards/plume/plume65/keymaps/via/keymap.c new file mode 100644 index 000000000000..ed8e921c72ba --- /dev/null +++ b/keyboards/plume/plume65/keymaps/via/keymap.c @@ -0,0 +1,45 @@ +/* Copyright 2020 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 + +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_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_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_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_LALT, KC_SPC, MO(1), KC_LEFT, KC_DOWN, KC_RGHT), +[1] = LAYOUT_all( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______), +[2] = LAYOUT_all( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______), +[3] = LAYOUT_all( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______), + +}; diff --git a/keyboards/plume/plume65/keymaps/via/rules.mk b/keyboards/plume/plume65/keymaps/via/rules.mk new file mode 100644 index 000000000000..1e5b99807cb7 --- /dev/null +++ b/keyboards/plume/plume65/keymaps/via/rules.mk @@ -0,0 +1 @@ +VIA_ENABLE = yes diff --git a/keyboards/plume/plume65/plume65.c b/keyboards/plume/plume65/plume65.c new file mode 100644 index 000000000000..d59f2289ea9d --- /dev/null +++ b/keyboards/plume/plume65/plume65.c @@ -0,0 +1,16 @@ +/* Copyright 2020 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 "plume65.h" diff --git a/keyboards/plume/plume65/plume65.h b/keyboards/plume/plume65/plume65.h new file mode 100644 index 000000000000..fa169a8bc36b --- /dev/null +++ b/keyboards/plume/plume65/plume65.h @@ -0,0 +1,103 @@ +/* Copyright 2020 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_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, 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, k42, k46, k4b, k4c, k4d, k4e \ +) \ +{ \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, XXX }, \ + { 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, XXX, k42, XXX, XXX, XXX, k46, XXX, XXX, XXX, XXX, k4b, k4c, k4d, k4e } \ +} + +#define LAYOUT_ansi_split_bs( \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0e, k0d, \ + 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, k42, k46, 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, XXX, k42, XXX, XXX, XXX, k46, XXX, XXX, XXX, XXX, k4b, k4c, k4d, k4e } \ +} + +#define LAYOUT_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, 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, k42, k46, k4b, k4c, k4d, k4e \ +) \ +{ \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, XXX }, \ + { 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, XXX, k42, XXX, XXX, XXX, k46, XXX, XXX, XXX, XXX, k4b, k4c, k4d, k4e } \ +} + +#define LAYOUT_iso_split_bs( \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0e, k0d, \ + 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, k42, k46, 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, XXX, k42, XXX, XXX, XXX, k46, XXX, XXX, XXX, XXX, k4b, k4c, k4d, k4e } \ +} + +#define LAYOUT_all( \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0e, k0d, \ + 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, k42, k46, 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, XXX, k42, XXX, XXX, XXX, k46, XXX, XXX, XXX, XXX, k4b, k4c, k4d, k4e } \ +} diff --git a/keyboards/plume/plume65/readme.md b/keyboards/plume/plume65/readme.md new file mode 100644 index 000000000000..828477eaf002 --- /dev/null +++ b/keyboards/plume/plume65/readme.md @@ -0,0 +1,16 @@ +# Plume65 + +## Support +* Keyboard Maintainer: [maartenwut](https://github.com/maartenwut) +* Hardware Supported: Plume65 +* Hardware Availability: N/A + +Make example for this keyboard (after setting up your build environment): + + make plume/plume65:default + +Flashing example for this keyboard: + + make plume/plume65: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). diff --git a/keyboards/plume/plume65/rules.mk b/keyboards/plume/plume65/rules.mk new file mode 100644 index 000000000000..dded09bb8720 --- /dev/null +++ b/keyboards/plume/plume65/rules.mk @@ -0,0 +1,22 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +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 = no # Console for debug +COMMAND_ENABLE = no # Commands for debug and configuration +# 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 +BLUETOOTH_ENABLE = no # Enable Bluetooth +AUDIO_ENABLE = no # Audio output From ac24f203cc4141d6d27f27dc173e04fc5edde741 Mon Sep 17 00:00:00 2001 From: Erovia Date: Sun, 6 Sep 2020 13:06:12 +0100 Subject: [PATCH 748/930] Docs/PR_checklist: Reorder, unify and pet-peeves (#10253) Co-authored-by: James Young <18669334+noroadsleft@users.noreply.github.com> --- docs/pr_checklist.md | 69 +++++++++++++++++++++++--------------------- 1 file changed, 36 insertions(+), 33 deletions(-) diff --git a/docs/pr_checklist.md b/docs/pr_checklist.md index 8755552b9def..22e8a3fe1a23 100644 --- a/docs/pr_checklist.md +++ b/docs/pr_checklist.md @@ -1,39 +1,42 @@ # PR checklists -This is a non-exhaustive checklist of what the QMK collaborators will be checking when reviewing submitted PRs. +This is a non-exhaustive checklist of what the QMK Collaborators will be checking when reviewing submitted PRs. -If there are any inconsistencies with these recommendations, you're best off [creating an issue](https://github.com/qmk/qmk_firmware/issues/new) against this document, or getting in touch with a QMK Collaborator on Discord. +If there are any inconsistencies with these recommendations, you're best off [creating an issue](https://github.com/qmk/qmk_firmware/issues/new) against this document, or getting in touch with a QMK Collaborator on [Discord](https://discord.gg/Uq7gcHh). ## General PRs - PR should be submitted using a non-`master` branch on the source repository - - This does not mean you target a different branch for your PR, rather that you're not working out of your own master branch - - If submitter _does_ use their own `master` branch, they'll be given a link to the ["how to git"](https://docs.qmk.fm/#/newbs_git_using_your_master_branch) page after merging -- (end of this document will contain the contents of the message) -- Newly-added directories and filenames must be lowercase - - This rule may be relaxed if upstream sources originally had uppercase characters (e.g. ChibiOS, or imported files from other repositories etc.) - - If there is enough justification (i.e. consistency with existing core files etc.) this can be relaxed + - this does not mean you target a different branch for your PR, rather that you're not working out of your own master branch + - if submitter _does_ use their own `master` branch, they'll be given a link to the ["how to git"](https://docs.qmk.fm/#/newbs_git_using_your_master_branch) page after merging -- (end of this document will contain the contents of the message) +- newly-added directories and filenames must be lowercase + - this rule may be relaxed if upstream sources originally had uppercase characters (e.g. ChibiOS, or imported files from other repositories etc.) + - if there is enough justification (i.e. consistency with existing core files etc.) this can be relaxed - a board designer naming their keyboard with uppercase letters is not enough justification -- Valid license headers on all `*.c` and `*.h` source files +- valid license headers on all `*.c` and `*.h` source files - GPL2/GPL3 recommended for consistency - - Other licenses are permitted, however they must be GPL-compatible and must allow for redistribution. Using a different license will almost certainly delay a PR getting merged. -- QMK codebase "best practices" followed - - This is not an exhaustive list, and will likely get amended as time goes by + - other licenses are permitted, however they must be GPL-compatible and must allow for redistribution. Using a different license will almost certainly delay a PR getting merged. +- QMK Codebase "best practices" followed + - this is not an exhaustive list, and will likely get amended as time goes by - `#pragma once` instead of `#ifndef` include guards in header files - - No "old-school" GPIO/I2C/SPI functions used -- must use QMK abstractions unless justifiable (and laziness is not valid justification) - - Timing abstractions should be followed too: + - no "old-school" GPIO/I2C/SPI functions used -- must use QMK abstractions unless justifiable (and laziness is not valid justification) + - timing abstractions should be followed too: - `wait_ms()` instead of `_delay_ms()` (remove `#include ` too) - `timer_read()` and `timer_read32()` etc. -- see [timer.h](https://github.com/qmk/qmk_firmware/blob/master/tmk_core/common/timer.h) for the timing APIs - - If you think a new abstraction is useful, you're encouraged to: + - if you think a new abstraction is useful, you're encouraged to: - prototype it in your own keyboard until it's feature-complete - discuss it with QMK Collaborators on Discord - refactor it as a separate core change - remove your specific copy in your board +- rebase and fix all merge conflicts before opening the PR (in case you need help or advice, reach out to QMK Collaborators on Discord) -## Core PRs +## Keymap PRs -- Must now target `develop` branch, which will subsequently be merged back to `master` on the breaking changes timeline -- Other notes TBD - - Core is a lot more subjective given the breadth of posted changes +- `#include QMK_KEYBOARD_H` preferred to including specific board files +- prefer layer `enum`s to `#define`s +- require custom keycode `enum`s to `#define`s, first entry must have ` = SAFE_RANGE` +- terminating backslash (`\`) in lines of LAYOUT macro parameters is superfluous +- some care with spacing (e.g., alignment on commas or first char of keycodes) makes for a much nicer-looking keymap ## Keyboard PRs @@ -48,12 +51,14 @@ https://github.com/qmk/qmk_firmware/pulls?q=is%3Apr+is%3Aclosed+label%3Akeyboard - standard template should be present - flash command has `:flash` at end - valid hardware availability link (unless handwired) -- private groupbuys are okay, but one-off prototypes will be questioned. If open-source, a link to files should be provided. + - clear instructions on how to reset the board into bootloader mode + - a picture about the keyboard and preferably about the PCB, too - `rules.mk` - removed `MIDI_ENABLE`, `FAUXCLICKY_ENABLE` and `HD44780_ENABLE` - modified `# Enable Bluetooth with the Adafruit EZ-Key HID` -> `# Enable Bluetooth` - - No `(-/+size)` comments related to enabling features - - Remove the list of alternate bootloaders if one has been specified - - No re-definitions of the default MCU parameters if same value, when compared to the equivalent MCU in [mcu_selection.mk](https://github.com/qmk/qmk_firmware/blob/master/quantum/mcu_selection.mk) + - no `(-/+size)` comments related to enabling features + - remove the list of alternate bootloaders if one has been specified + - no re-definitions of the default MCU parameters if same value, when compared to the equivalent MCU in [mcu_selection.mk](https://github.com/qmk/qmk_firmware/blob/master/quantum/mcu_selection.mk) - keyboard `config.h` - don't repeat `MANUFACTURER` in the `PRODUCT` value - no `#define DESCRIPTION` @@ -71,12 +76,12 @@ https://github.com/qmk/qmk_firmware/pulls?q=is%3Apr+is%3Aclosed+label%3Akeyboard - `keyboard.h` - `#include "quantum.h"` appears at the top - `LAYOUT` macros should use standard definitions if applicable - - Use the Community Layout macro names where they apply (preferred above `LAYOUT`/`LAYOUT_all`) + - use the Community Layout macro names where they apply (preferred above `LAYOUT`/`LAYOUT_all`) - keymap `config.h` - no duplication of `rules.mk` or `config.h` from keyboard - `keymaps/default/keymap.c` - `QMKBEST`/`QMKURL` removed (sheesh) - - If using `MO(_LOWER)` and `MO(_RAISE)` keycodes or equivalent, and the keymap has an adjust layer when holding both keys -- if the keymap has no "direct-to-adjust" keycode (such as `MO(_ADJUST)`) then you should prefer to write... + - if using `MO(_LOWER)` and `MO(_RAISE)` keycodes or equivalent, and the keymap has an adjust layer when holding both keys -- if the keymap has no "direct-to-adjust" keycode (such as `MO(_ADJUST)`) then you should prefer to write... ``` layer_state_t layer_state_set_user(layer_state_t state) { return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST); @@ -90,22 +95,20 @@ https://github.com/qmk/qmk_firmware/pulls?q=is%3Apr+is%3Aclosed+label%3Akeyboard - submitters can also have a "manufacturer-matching" keymap that mirrors existing functionality of the commercial product, if porting an existing board Also, specific to ChibiOS: -- **Strong** preference to using existing ChibiOS board definitions. - - A lot of the time, an equivalent Nucleo board can be used with a different flash size or slightly different model in the same family - - Example: For an STM32L082KZ, given the similarity to an STM32L073RZ, you can use `BOARD = ST_NUCLEO64_L073RZ` in rules.mk +- **strong** preference to using existing ChibiOS board definitions. + - a lot of the time, an equivalent Nucleo board can be used with a different flash size or slightly different model in the same family + - example: For an STM32L082KZ, given the similarity to an STM32L073RZ, you can use `BOARD = ST_NUCLEO64_L073RZ` in rules.mk - QMK is migrating to not having custom board definitions if at all possible, due to the ongoing maintenance burden when upgrading ChibiOS -- If a board definition is unavoidable, `board.c` must have a standard `__early_init()` (as per normal ChibiOS board defs) and an empty `boardInit()`: +- if a board definition is unavoidable, `board.c` must have a standard `__early_init()` (as per normal ChibiOS board defs) and an empty `boardInit()`: - see Arm/ChibiOS [early initialization](https://docs.qmk.fm/#/platformdev_chibios_earlyinit?id=board-init) - `__early_init()` should be replaced by either `early_hardware_init_pre()` or `early_hardware_init_post()` as appropriate - `boardInit()` should be migrated to `board_init()` -## Keymap PRs +## Core PRs -- `#include QMK_KEYBOARD_H` preferred to including specific board files -- Prefer layer `enum`s to `#define`s -- Require custom keycode `enum`s to `#define`s, first entry must have ` = SAFE_RANGE` -- Terminating backslash (`\`) in lines of LAYOUT macro parameters is superfluous -- Some care with spacing (e.g., alignment on commas or first char of keycodes) makes for a much nicer-looking keymap +- must now target `develop` branch, which will subsequently be merged back to `master` on the breaking changes timeline +- other notes TBD + - core is a lot more subjective given the breadth of posted changes --- From 8ac9940a76f09d4a47be342fc123306ecbfb27f3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Rodr=C3=ADguez=20Rivero?= Date: Sun, 6 Sep 2020 22:13:18 +0200 Subject: [PATCH 749/930] [Keymap] danielo515/redox-1 (#9935) * chore: pulled the latest from master Bring my redox layout from my latest redox branch Bring my latest user stuff from my redox branch * Update users/danielo515/config.h Co-authored-by: Drashna Jaelre * chore: small cleanup Co-authored-by: Drashna Jaelre --- keyboards/redox_w/keymaps/danielo515/keymap.c | 65 ++--- users/danielo515/combo.c | 44 ++-- users/danielo515/config.h | 4 +- users/danielo515/process_records.c | 247 ++++++++++-------- users/danielo515/process_records.h | 94 +++---- 5 files changed, 250 insertions(+), 204 deletions(-) diff --git a/keyboards/redox_w/keymaps/danielo515/keymap.c b/keyboards/redox_w/keymaps/danielo515/keymap.c index 2b37a4be333f..c174c7cf3997 100644 --- a/keyboards/redox_w/keymaps/danielo515/keymap.c +++ b/keyboards/redox_w/keymaps/danielo515/keymap.c @@ -22,56 +22,59 @@ # define GUI OSM(MOD_LGUI) # define ENT_SYM LT(_SYMB, KC_ENT) # define __S LT(_S,KC_S) +# define OSX_BACK LGUI(KC_GRV) +// Which key do you use to enter a layer +# define ENTRY _______ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_QWERTY] = LAYOUT( //┌────────┬────────┬────────┬────────┬────────┬────────┐ ┌────────┬────────┬────────┬────────┬────────┬────────┐ - KC_NAGR ,KC_1 ,KC_2 ,KC_3 ,KC_4 ,KC_5 , KC_6 ,KC_7 ,KC_8 ,KC_9 ,KC_0 ,KC_DQUO , + KC_EQL ,KC_1 ,KC_2 ,KC_3 ,KC_4 ,KC_5 , KC_6 ,KC_7 ,KC_8 ,KC_9 ,KC_0 ,KC_DQUO , //├────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┤ - KC_TAB ,KC_Q ,KC_W ,KC_E ,KC_R ,KC_T ,TD_PASTE, ALT_TAB ,KC_Y ,KC_U ,KC_I ,KC_O ,KC_P ,SFT_MINS, + KC_TAB ,KC_Q ,KC_W ,KC_E ,KC_R ,KC_T ,TD_PASTE, KC_INS ,KC_Y ,KC_U ,KC_I ,KC_O ,KC_P ,CMD_MINS, //├────────┼────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┼────────┤ - SHIFT ,KC_A ,__S ,FN_D ,FN_F ,KC_G ,COPY_CUT, KC_UNDS ,HYPR_H ,ALT_J ,CTL_K ,KC_L ,TD_CLN ,CMD_QUOT, + KC_PIPE ,KC_A ,__S ,FN_D ,FN_F ,KC_G ,COPY_CUT, KC_UNDS ,HYPR_H ,ALT_J ,CTL_K ,KC_L ,TD_CLN ,SFT_QUOT, //├────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┤ - KC_BSLS ,KC_Z ,KC_X ,KC_C ,KC_V ,KC_B ,KC_DEL ,KC_PGDN , ALT_TAB ,AD_ESC ,KC_N ,KC_M ,KC_COMM ,KC_DOT ,KC_SLSH ,KC_ASTR , + KC_BSLS ,KC_Z ,KC_X ,KC_C ,KC_V ,KC_B ,KC_DEL ,KC_PLUS , ALT_TAB ,AD_ESC ,KC_N ,KC_M ,KC_COMM ,KC_DOT ,KC_SLSH ,KC_ASTR , //├────────┼────────┼────────┼────────┼────┬───┴────┬───┼────────┼────────┤ ├────────┼────────┼───┬────┴───┬────┼────────┼────────┼────────┼────────┤ CTL ,ALT ,KC_LEFT ,KC_RIGHT, GUI , SHIFT ,KC_BSPC , KC_LEAD ,NAV_SPC , ENT_SYM, KC_LBRC ,KC_RBRC ,KC_DOWN ,KC_UP //└────────┴────────┴────────┴────────┘ └────────┘ └────────┴────────┘ └────────┴────────┘ └────────┘ └────────┴────────┴────────┴────────┘ ), [_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_EXLM ,KC_DLR ,KC_LCBR ,KC_RCBR ,KC_PIPE ,_______ , _______ ,KC_PSLS ,KC_P7 ,KC_P8 ,KC_P9 ,KC_PERC ,KC_PMNS , - //├────────┼────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┼────────┤ - _______ ,KC_AT ,KC_DLR , KC_LPRN, KC_RPRN,KC_GRV ,_______ , _______ ,KC_PAST ,KC_P4 ,KC_P5 ,KC_P6 ,KC_PPLS ,KC_BSPC , - //├────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┤ - _______ ,KC_PERC ,KC_CIRC ,KC_LBRC ,KC_RBRC ,KC_TILD ,_______ ,_______ , _______ ,_______ ,KC_COLN ,KC_P1 ,KC_P2 ,KC_P3 ,KC_PENT ,XXXXXXX , - //├────────┼────────┼────────┼────────┼────┬───┴────┬───┼────────┼────────┤ ├────────┼────────┼───┬────┴───┬────┼────────┼────────┼────────┼────────┤ - _______ ,_______ ,_______ ,_______ , _______ , _______ ,_______ , _______ ,_______ , KC_P0 , KC_P0 ,KC_PDOT ,KC_PENT ,XXXXXXX - //└────────┴────────┴────────┴────────┘ └────────┘ └────────┴────────┘ └────────┴────────┘ └────────┘ └────────┴────────┴────────┴────────┘ + //┌────────┬────────┬────────┬────────┬────────┬────────┐ ┌────────┬────────┬────────┬────────┬────────┬────────┐ + _______ ,KC_F1 ,KC_F2 ,KC_F3 ,KC_F4 ,KC_F5 , KC_F6 ,KC_F7 ,KC_F8 ,KC_F9 ,KC_F10 ,KC_F12 , + //├────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┤ + _______ ,KC_EXLM ,KC_DLR ,KC_LCBR ,KC_RCBR ,KC_PIPE ,_______ , _______ ,KC_PSLS ,KC_P7 ,KC_P8 ,KC_P9 ,KC_PERC ,KC_BSPC , + //├────────┼────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┼────────┤ + _______ ,KC_AT ,KC_DLR , KC_LPRN, KC_RPRN,KC_GRV ,_______ , _______ ,KC_PENT ,KC_P4 ,KC_P5 ,KC_P6 ,KC_PPLS ,KC_PMNS , + //├────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┤ + _______ ,KC_PERC ,KC_CIRC ,KC_LBRC ,KC_RBRC ,KC_TILD ,_______ ,_______ , _______ ,_______ ,KC_COLN ,KC_P1 ,KC_P2 ,KC_P3 ,KC_PSLS ,XXXXXXX , + //├────────┼────────┼────────┼────────┼────┬───┴────┬───┼────────┼────────┤ ├────────┼────────┼───┬────┴───┬────┼────────┼────────┼────────┼────────┤ + _______ ,_______ ,_______ ,_______ , _______ , _______ ,_______ , _______ ,_______ , ENTRY , KC_P0 ,KC_PDOT ,KC_PAST ,XXXXXXX + //└────────┴────────┴────────┴────────┘ └────────┘ └────────┴────────┘ └────────┴────────┘ └────────┘ └────────┴────────┴────────┴────────┘ ), [_NAV] = LAYOUT( //┌────────┬────────┬────────┬────────┬────────┬────────┐ ┌────────┬────────┬────────┬────────┬────────┬────────┐ _______ ,_______ ,_______ ,_______ ,_______ ,_______ , _______ ,_______ ,_______ ,_______ ,_______ ,_______ , //├────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┤ - XXXXXXX ,XXXXXXX ,KC_MS_U ,XXXXXXX ,KC_WH_U ,XXXXXXX ,_______ , _______ ,XXXXXXX,SFT_LEFT,SFT_RIGHT,XXXXXXX ,XXXXXXX ,XXXXXXX , + XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,_______ , _______ ,SFT_LEFT_END,SFT_LEFT,SFT_RIGHT,SFT_RIGHT_END ,XXXXXXX ,KC_F12 , //├────────┼────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┼────────┤ - XXXXXXX ,KC_MS_L ,KC_MS_D ,KC_MS_R ,KC_WH_D ,XXXXXXX ,_______ , _______ ,KC_LEFT ,KC_DOWN ,KC_UP ,KC_RIGHT,XXXXXXX ,XXXXXXX , + XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,_______ , _______ ,KC_LEFT ,KC_DOWN ,KC_UP ,KC_RIGHT,XXXXXXX ,XXXXXXX , //├────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┤ - XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,_______ ,_______ , _______ ,XXXXXXX ,KC_HOME ,CTL_LEFT,CTL_RIGHT,XXXXXXX,XXXXXXX ,XXXXXXX , + XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,_______ ,_______ , _______ ,XXXXXXX ,KC_HOME ,CTL_LEFT,CTL_RIGHT,KC_END,XXXXXXX ,XXXXXXX , //├────────┼────────┼────────┼────────┼────┬───┴────┬───┼────────┼────────┤ ├────────┼────────┼───┬────┴───┬────┼────────┼────────┼────────┼────────┤ - XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX , KC_BTN1 , KC_BTN2 ,_______ , _______ ,_______ , XXXXXXX , XXXXXXX ,XXXXXXX ,WIN_LEFT,WIN_RIGHT + XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX , _______ , _______ ,_______ , _______ , ENTRY , KC_MUTE , KC_VOLD ,KC_VOLU ,WIN_LEFT,WIN_RIGHT //└────────┴────────┴────────┴────────┘ └────────┘ └────────┴────────┘ └────────┴────────┘ └────────┘ └────────┴────────┴────────┴────────┘ ), [_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 ,KC_F12 , + XXXXXXX ,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 , //├────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┤ @@ -84,26 +87,26 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { //┌────────┬────────┬────────┬────────┬────────┬────────┐ ┌────────┬────────┬────────┬────────┬────────┬────────┐ XXXXXXX ,KC_F1 ,KC_F2 ,KC_F3 ,KC_F4 ,KC_F5 , KC_F6 ,KC_F7 ,KC_F8 ,KC_F9 ,KC_F10 ,KC_F11 , //├────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┤ - XXXXXXX ,XXXXXXX ,ALL_WIN ,EXPOSE ,XXXXXXX ,XXXXXXX ,XXXXXXX , XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX , + XXXXXXX ,XXXXXXX ,ALL_WIN ,EXPOSE ,XXXXXXX ,XXXXXXX ,XXXXXXX , XXXXXXX ,XXXXXXX ,KC_F4 ,KC_F5 ,KC_F6 ,XXXXXXX ,KC_F12 , //├────────┼────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┼────────┤ - XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,_______ ,XXXXXXX ,XXXXXXX , XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX , + XXXXXXX ,XXXXXXX ,SAVE ,OSX_BACK ,ENTRY ,XXXXXXX ,XXXXXXX , XXXXXXX ,KC_PSCR ,KC_F1 ,KC_F2 ,KC_F3 ,XXXXXXX ,XXXXXXX , //├────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┤ - XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX , XXXXXXX ,_______ ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX , + XXXXXXX ,UNDO ,REDO ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX , XXXXXXX ,_______ ,XXXXXXX ,XXXXXXX ,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_PGUP ,KC_PGDOWN , XXXXXXX , XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX //└────────┴────────┴────────┴────────┘ └────────┘ └────────┴────────┘ └────────┴────────┘ └────────┘ └────────┴────────┴────────┴────────┘ ), [_D] = LAYOUT( //┌────────┬────────┬────────┬────────┬────────┬────────┐ ┌────────┬────────┬────────┬────────┬────────┬────────┐ - XXXXXXX ,KC_F1 ,KC_F2 ,KC_F3 ,KC_F4 ,KC_F5 , KC_F6 ,KC_F7 ,KC_F8 ,KC_F9 ,KC_F10 ,KC_F12 , + XXXXXXX ,KC_F1 ,KC_F2 ,KC_F3 ,KC_F4 ,KC_F5 , KC_A ,KC_B ,KC_C ,KC_D ,KC_E ,KC_F , //├────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┤ - XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX , _______ ,KC_PSLS ,KC_P7 ,KC_P8 ,KC_P9 ,KC_PERC ,KC_PMNS , + XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX , _______ ,KC_LBRACKET ,KC_P7 ,KC_P8 ,KC_P9 ,KC_PERC ,KC_KP_MINUS , //├────────┼────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┼────────┤ - XXXXXXX ,XXXXXXX ,XXXXXXX ,_______ ,XXXXXXX ,XXXXXXX ,XXXXXXX , _______ ,KC_PAST ,KC_P4 ,KC_P5 ,KC_P6 ,KC_PPLS ,KC_BSPC , + XXXXXXX ,XXXXXXX ,XXXXXXX ,_______ ,KC_F5 ,KC_F2 ,XXXXXXX , _______ ,KC_RBRACKET ,KC_P4 ,KC_P5 ,KC_P6 ,KC_PPLS ,KC_PAST , //├────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┤ - XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX , _______ ,_______ ,KC_COLN ,KC_P1 ,KC_P2 ,KC_P3 ,KC_PENT ,XXXXXXX , + XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX , _______ ,_______ ,KC_COLN ,KC_P1 ,KC_P2 ,KC_P3 ,KC_PSLS ,XXXXXXX , //├────────┼────────┼────────┼────────┼────┬───┴────┬───┼────────┼────────┤ ├────────┼────────┼───┬────┴───┬────┼────────┼────────┼────────┼────────┤ - XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX , XXXXXXX , XXXXXXX ,_______ , _______ ,_______ , KC_P0 , KC_P0 ,KC_PDOT ,KC_PENT ,XXXXXXX + XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX , XXXXXXX , XXXXXXX ,_______ , _______ ,_______ , KC_P0 , KC_COMMA ,KC_PDOT ,KC_PAST ,XXXXXXX //└────────┴────────┴────────┴────────┘ └────────┘ └────────┴────────┘ └────────┴────────┘ └────────┘ └────────┴────────┴────────┴────────┘ ), [_S] = LAYOUT( @@ -114,9 +117,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { //├────────┼────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┼────────┤ XXXXXXX ,XXXXXXX ,_______ ,KC_EQL ,F_ARROW ,KC_GRAVE,XXXXXXX , XXXXXXX ,KC_AMPR ,KC_LPRN ,KC_RPRN ,CLN_EQ ,KC_PLUS ,KC_PIPE , //├────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┤ - XXXXXXX ,XXXXXXX ,XXXXXXX ,KC_CIRC ,KC_DLR ,XXXXXXX ,XXXXXXX ,XXXXXXX , XXXXXXX ,XXXXXXX ,KC_EXLM ,KC_TILD ,KC_CIRC ,ARROW ,KC_BSLASH,IARROW , + XXXXXXX ,XXXXXXX ,XXXXXXX ,KC_CIRC ,ARROW ,XXXXXXX ,XXXXXXX ,XXXXXXX , XXXXXXX ,XXXXXXX ,KC_EXLM ,KC_TILD ,KC_CIRC ,ARROW ,KC_BSLASH,IARROW , //├────────┼────────┼────────┼────────┼────┬───┴────┬───┼────────┼────────┤ ├────────┼────────┼───┬────┴───┬────┼────────┼────────┼────────┼────────┤ - XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX , XXXXXXX , XXXXXXX ,_______ , XXXXXXX ,_______ , XXXXXXX , XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX + XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX , XXXXXXX , XXXXXXX ,_______ , XXXXXXX ,ENTRY , XXXXXXX , XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX //└────────┴────────┴────────┴────────┘ └────────┘ └────────┴────────┘ └────────┴────────┘ └────────┘ └────────┴────────┴────────┴────────┘ ) diff --git a/users/danielo515/combo.c b/users/danielo515/combo.c index 1c8414377216..b33cb838bc53 100644 --- a/users/danielo515/combo.c +++ b/users/danielo515/combo.c @@ -6,31 +6,39 @@ enum combos { UI_COM, IO_COM, QW_COM, - COM_SLS, + DOT_SLS, COM_DOT, M_COMM, N_M, OP_COM, + M_CM_DOT, }; -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}; -const uint16_t PROGMEM qw_combo[] = {KC_Q, KC_W, COMBO_END}; -const uint16_t PROGMEM com_sls[] = {KC_COMMA, KC_SLSH, COMBO_END}; -const uint16_t PROGMEM com_dot[] = {KC_COMMA, KC_DOT, COMBO_END}; -const uint16_t PROGMEM m_comm[] = {KC_M,KC_COMMA, COMBO_END}; -const uint16_t PROGMEM n_m[] = {KC_N, KC_M,COMBO_END}; +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}; +const uint16_t PROGMEM qw_combo[] = {KC_Q, KC_W, COMBO_END}; +const uint16_t PROGMEM dot_sls[] = {KC_DOT, KC_SLSH, COMBO_END}; +const uint16_t PROGMEM com_dot[] = {KC_COMMA, KC_DOT, COMBO_END}; +const uint16_t PROGMEM m_comm[] = {KC_M, KC_COMMA, COMBO_END}; +const uint16_t PROGMEM n_m[] = {KC_N, KC_M, COMBO_END}; +const uint16_t PROGMEM o_p_combo[] = {KC_O, KC_P, COMBO_END}; +const uint16_t PROGMEM m_cm_dot_combo[] = {KC_M, KC_COMMA, KC_DOT, 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_DLR), - [IO_COM] = COMBO(io_combo, KC_TILD), + [JK_ESC] = COMBO(jk_combo, KC_ESC), + [YU_COM] = COMBO(yu_combo, KC_AMPR), + [UI_COM] = COMBO(ui_combo, KC_CIRC), + [IO_COM] = COMBO(io_combo, KC_TILD), + [DOT_SLS] = COMBO(dot_sls, KC_EXLM), + [COM_DOT] = COMBO(com_dot, KC_QUES), + [N_M] = COMBO(n_m, KC_DLR), + [OP_COM] = COMBO(o_p_combo, KC_HASH), + // m + , = { + [M_COMM] = COMBO(m_comm, KC_LCBR), + // m + , + . = } + // [M_CM_DOT] = COMBO(m_cm_dot_combo, KC_RCBR), + // Right hand side combos [QW_COM] = COMBO(qw_combo, KC_AT), - [COM_SLS] = COMBO(com_sls, KC_QUES), - [COM_DOT] = COMBO(com_dot, KC_QUES), - [M_COMM] = COMBO(m_comm, KC_ESC), - [N_M] = COMBO(n_m, KC_DLR), }; diff --git a/users/danielo515/config.h b/users/danielo515/config.h index fb2472645c6a..d7efcd53672d 100644 --- a/users/danielo515/config.h +++ b/users/danielo515/config.h @@ -1,8 +1,8 @@ #pragma once #if defined(COMBO_ENABLE) - #define COMBO_COUNT 9 - #define COMBO_TERM 40 +# define COMBO_COUNT 11 +# define COMBO_TERM 25 #endif // !COMBO_ENABLE // Timeout settings for leader key #undef LEADER_TIMEOUT diff --git a/users/danielo515/process_records.c b/users/danielo515/process_records.c index b1a8b92552ed..22a46789ad2b 100644 --- a/users/danielo515/process_records.c +++ b/users/danielo515/process_records.c @@ -4,11 +4,11 @@ extern bool onMac; // ======== INCREMENTAL MACROS STUFF ============= #define MAX_INCREMENTAL_MACRO 20 #define TAP_ROTATION_TIMEOUT 400 -uint16_t latest_kc = 0; +uint16_t latest_kc = 0; uint16_t latest_rotation = 0; -int key_count = 0; +int key_count = 0; -const char incremental_macros[][MAX_INCREMENTAL_MACRO] = { "String1"SS_TAP(X_HOME)"X-", "String2"SS_TAP(X_HOME) }; +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) { @@ -44,124 +44,157 @@ void refresh_incremental_macros(uint16_t kc) { } // 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)); } + if (onMac) { + tap_code16(LGUI(kc)); + } else { + tap_code16(LCTL(kc)); + } return false; } bool process_record_user(uint16_t keycode, keyrecord_t *record) { bool pressed = record->event.pressed; - if(pressed){ + if (pressed) { refresh_incremental_macros(keycode); - if(process_incremental_macro(keycode)){ + if (process_incremental_macro(keycode)) { return false; } switch (keycode) { case MAC_TGL: - onMac = !onMac; - onMac ? SEND_STRING("On mac") : SEND_STRING("Not on MAC"); - return false; + 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); - } else { - layer_off(_LOWER); - } - return false; - case RAISE: - if (record->event.pressed) { - layer_on(_RAISE); - } else { - layer_off(_RAISE); - } - return false; - case ADJUST: - if (record->event.pressed) { - layer_on(_ADJUST); - } else { - layer_off(_ADJUST); - } - return false; - // == Macros START === - case IARROW: if (record->event.pressed) SEND_STRING("<-"); return false; - 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; - case CLN_EQ: if (record->event.pressed) SEND_STRING(":="); 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 === + 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); + } else { + layer_off(_LOWER); + } + return false; + case RAISE: + if (record->event.pressed) { + layer_on(_RAISE); + } else { + layer_off(_RAISE); + } + return false; + case ADJUST: + if (record->event.pressed) { + layer_on(_ADJUST); + } else { + layer_off(_ADJUST); + } + return false; + // == Macros START === + case IARROW: + if (record->event.pressed) SEND_STRING("<-"); + return false; + 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; + case CLN_EQ: + if (record->event.pressed) SEND_STRING(":="); + 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 REDO: + if (record->event.pressed) { + onMac ? SEND_STRING(SS_LGUI(SS_LSFT("z"))) : SEND_STRING(SS_LCTRL("y")); + } + return false; + case FIND: + if (record->event.pressed) { + onMac ? SEND_STRING(SS_LGUI("f")) : SEND_STRING(SS_LCTRL("f")); + } + return false; + case WIN_TO_RIGHT: + if (record->event.pressed) { + onMac ? tap_code16(SGUI(A(KC_RIGHT))) : tap_code16(G(KC_RIGHT)); + } + return false; + case WIN_TO_LEFT: + if (record->event.pressed) { + onMac ? tap_code16(SGUI(A(KC_LEFT))) : tap_code16(G(KC_LEFT)); + } + 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 + 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 - } -// =============== ALT_TAB single key handling - return process_alt_tab(keycode, record); + } + // =============== ALT_TAB single key handling + return process_alt_tab(keycode, record); }; - - - diff --git a/users/danielo515/process_records.h b/users/danielo515/process_records.h index c994511a5f8d..0efd690d405e 100644 --- a/users/danielo515/process_records.h +++ b/users/danielo515/process_records.h @@ -1,35 +1,36 @@ #pragma once #include "quantum.h" -enum custom_keycodes -{ - EPRM = SAFE_RANGE, - RGB_SLD, +enum custom_keycodes { + RGB_SLD = SAFE_RANGE, ALT_TAB, QWERTY, SYM, NAV, ADJUST, -// Macros + // Macros ARROW, IARROW, CLN_EQ, F_ARROW, GREP, -// Accented characters + // Accented characters AC_A, AC_E, AC_I, AC_O, -// Custom multi-os key-codes + // Custom multi-os key-codes CUT, COPY, PASTE, SAVE, UNDO, + REDO, CHG_LAYOUT, FIND, -// OTHER OLD STUFF + WIN_TO_LEFT, + WIN_TO_RIGHT, + // OTHER OLD STUFF LOWER, RAISE, MAC_TGL, @@ -57,48 +58,49 @@ enum layers { }; //===== 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 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_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_E_OVRR ES_OVRR -# define KC_E_APOS ES_APOS -# define KC_E_IEXL ES_IEXL +#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_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) )) -# define ALL_WIN LCTL(KC_DOWN) -# define EXPOSE LGUI(KC_DOWN) +#define WIN_LEFT_HALF LALT(LGUI(KC_LEFT)) +#define WIN_RIGHT_HALF LALT(LGUI(KC_RIGHT)) +#define ALL_WIN LCTL(KC_DOWN) +#define EXPOSE LGUI(KC_DOWN) // ========== Modifiers!! -# define SHIFT OSM(MOD_LSFT) +#define SHIFT OSM(MOD_LSFT) //=============== tap for key hold for mod -# define HYPR_H HYPR_T(KC_H) -# define CTL_K RCTL_T(KC_K) -# define ALT_J ALT_T(KC_J) -# define SFT_MINS LSFT_T(KC_MINS) // tap - hold shift -# define CMD_QUOT GUI_T(KC_QUOTE) // tap ' hold cmd +#define HYPR_H HYPR_T(KC_H) +#define CTL_K RCTL_T(KC_K) +#define ALT_J ALT_T(KC_J) +#define SFT_MINS LSFT_T(KC_MINS) // tap - hold shift +#define CMD_MINS GUI_T(KC_MINS) // tap - hold cmd +#define CMD_QUOT GUI_T(KC_QUOTE) // tap ' hold cmd +#define SFT_QUOT LSFT_T(KC_QUOTE) // tap ' hold shift //=============== Movement modified -# define CTL_LEFT LCTL(KC_LEFT) -# define CTL_RIGHT LCTL(KC_RIGHT) +#define CTL_LEFT LCTL(KC_LEFT) +#define CTL_RIGHT LCTL(KC_RIGHT) -# define SFT_LEFT LSFT(KC_LEFT) -# define SFT_RIGHT LSFT(KC_RIGHT) +#define SFT_LEFT LSFT(KC_LEFT) +#define SFT_RIGHT LSFT(KC_RIGHT) +#define SFT_LEFT_END LGUI(LSFT(KC_LEFT)) +#define SFT_RIGHT_END LGUI(LSFT(KC_RIGHT)) From f7ccbfcea88e127319a4665a6c8ca67883854030 Mon Sep 17 00:00:00 2001 From: Purdea Andrei Date: Sun, 6 Sep 2020 23:13:49 +0300 Subject: [PATCH 750/930] quantum/debounce: rename debouncing algorithms (#9564) * quantum/debounce: rename debouncing algorithms according to Issue 8763 This is the second attempt at implementation, with no ts_ and cy_ prefixes, since those will be implemented with macros. * Debouncing documentation: Refactor, add some generic info, and merge into a single document --- common_features.mk | 13 +- docs/feature_debounce_type.md | 146 +++++++++++++++--- quantum/debounce/readme.md | 28 ---- quantum/debounce/{sym_g.c => sym_defer_g.c} | 0 quantum/debounce/{sym_pk.c => sym_defer_pk.c} | 0 .../debounce/{eager_pk.c => sym_eager_pk.c} | 0 .../debounce/{eager_pr.c => sym_eager_pr.c} | 0 7 files changed, 139 insertions(+), 48 deletions(-) delete mode 100644 quantum/debounce/readme.md rename quantum/debounce/{sym_g.c => sym_defer_g.c} (100%) rename quantum/debounce/{sym_pk.c => sym_defer_pk.c} (100%) rename quantum/debounce/{eager_pk.c => sym_eager_pk.c} (100%) rename quantum/debounce/{eager_pr.c => sym_eager_pr.c} (100%) diff --git a/common_features.mk b/common_features.mk index 1f110d0819dd..ed6908f4b891 100644 --- a/common_features.mk +++ b/common_features.mk @@ -397,9 +397,20 @@ ifneq ($(strip $(CUSTOM_MATRIX)), yes) endif endif +# Support for translating old names to new names: +ifeq ($(strip $(DEBOUNCE_TYPE)),sym_g) + DEBOUNCE_TYPE:=sym_defer_g +else ifeq ($(strip $(DEBOUNCE_TYPE)),eager_pk) + DEBOUNCE_TYPE:=sym_eager_pk +else ifeq ($(strip $(DEBOUNCE_TYPE)),sym_pk) + DEBOUNCE_TYPE:=sym_defer_pk +else ifeq ($(strip $(DEBOUNCE_TYPE)),eager_pr) + DEBOUNCE_TYPE:=sym_eager_pr +endif + DEBOUNCE_DIR:= $(QUANTUM_DIR)/debounce # Debounce Modules. Set DEBOUNCE_TYPE=custom if including one manually. -DEBOUNCE_TYPE?= sym_g +DEBOUNCE_TYPE?= sym_defer_g ifneq ($(strip $(DEBOUNCE_TYPE)), custom) QUANTUM_SRC += $(DEBOUNCE_DIR)/$(strip $(DEBOUNCE_TYPE)).c endif diff --git a/docs/feature_debounce_type.md b/docs/feature_debounce_type.md index 65b4ea1e5354..83ebafe60ec5 100644 --- a/docs/feature_debounce_type.md +++ b/docs/feature_debounce_type.md @@ -1,43 +1,151 @@ -# Debounce algorithm +# Contact bounce / contact chatter -QMK supports multiple debounce algorithms through its debounce API. +Mechanical switches often don't have a clean single transition between pressed and unpressed states. + +In an ideal world, when you press a switch, you would expect the digital pin to see something like this: +(X axis showing time +``` +voltage +---------------------- + ^ | + | | + | ------------------+ + ----> time +``` + +However in the real world you will actually see contact bounce, which will look like multiple 1->0 and 0->1 transitions, +until the value finally settles. +``` + +-+ +--+ +------------- + | | | | | + | | | | | ++-----------------+ +-+ +-+ +``` +The time it takes for the switch to settle might vary with switch type, age, and even pressing technique. + +If the device chooses not to mitigate contact bounce, then often actions that happen when the switch is pressed are repeated +multiple times. + +There are many ways to handle contact bounce ("Debouncing"). Some include employing additional hardware, for example an RC filter, +while there are various ways to do debouncing in software too, often called debounce algorithms. This page discusses software +debouncing methods available in QMK. + +While technically not considered contact bounce/contact chatter, some switch technologies are susceptible to noise, meaning, +while the key is not changing state, sometimes short random 0->1 or 1->0 transitions might be read by the digital circuit, for example: +``` + +-+ + | | + | | ++-----------------+ +-------------------- +``` + +Many debounce methods (but not all) will also make the device resistant to noise. If you are working with a technology that is +susceptible to noise, you must choose a debounce method that will also mitigate noise for you. + +## Types of debounce algorithms -The logic for which debounce method called is below. It checks various defines that you have set in rules.mk +1) Unit of time: Timestamp (milliseconds) vs Cycles (scans) + * Debounce algorithms often have a 'debounce time' parameter, that specifies the maximum settling time of the switch contacts. + This time might be measured in various units: + * Cycles-based debouncing waits n cycles (scans), decreasing count by one each matrix_scan + * Timestamp-based debouncing stores the millisecond timestamp a change occurred, and does substraction to figure out time elapsed. + * Timestamp-based debouncing is usually superior, especially in the case of noise-resistant devices because settling times of physical + switches is specified in units of time, and should not depend on the matrix scan-rate of the keyboard. + * Cycles-based debouncing is sometimes considered inferior, because the settling time that it is able to compensate for depends on the + performance of the matrix scanning code. If you use cycles-based debouncing, and you significantly improve the performance of your scanning + code, you might end up with less effective debouncing. A situation in which cycles-based debouncing might be preferable is when + noise is present, and the scanning algorithm is slow, or variable speed. Even if your debounce algorithm is fundamentally noise-resistant, + if the scanning is slow, and you are using a timestamp-based algorithm, you might end up making a debouncing decision based on only two + sampled values, which will limit the noise-resistance of the algorithm. + * Currently all built-in debounce algorithms support timestamp-based debouncing only. In the future we might + implement cycles-based debouncing, and it will be selectable via a ```config.h``` macro. + +2) Symmetric vs Asymmetric + * Symmetric - apply the same debouncing algorithm, to both key-up and key-down events. + * Recommended naming convention: ```sym_*``` + * Asymmetric - apply different debouncing algorithms to key-down and key-up events. E.g. Eager key-down, Defer key-up. + * Recommended naming convention: ```asym_*``` followed by details of the type of algorithm in use, in order, for key-down and then key-up + +3) Eager vs Defer + * Eager - any key change is reported immediately. All further inputs for DEBOUNCE ms are ignored. + * Eager algorithms are not noise-resistant. + * Recommended naming conventions: + * ```sym_eager_*``` + * ```asym_eager_*_*```: key-down is using eager algorithm + * ```asym_*_eager_*```: key-up is using eager algorithm + * Defer - wait for no changes for DEBOUNCE ms before reporting change. + * Defer algorithms are noise-resistant + * Recommended naming conventions: + * ```sym_defer_*``` + * ```asym_defer_*_*```: key-down is using eager algorithm + * ```asym_*_defer_*```: key-up is using eager algorithm + +4) Global vs Per-Key vs Per-Row + * Global - one timer for all keys. Any key change state affects global timer + * Recommended naming convention: ```*_g``` + * Per-key - one timer per key + * Recommended naming convention: ```*_pk``` + * Per-row - one timer per row + * Recommended naming convention: ```*_pr``` + * Per-key and per-row algorithms consume more resources (in terms of performance, + and ram usage), but fast typists might prefer them over global. + +## Debounce algorithms supported by QMK + +QMK supports multiple debounce algorithms through its debounce API. +The logic for which debounce method called is below. It checks various defines that you have set in ```rules.mk``` ``` DEBOUNCE_DIR:= $(QUANTUM_DIR)/debounce -DEBOUNCE_TYPE?= sym_g +DEBOUNCE_TYPE?= sym_defer_g ifneq ($(strip $(DEBOUNCE_TYPE)), custom) QUANTUM_SRC += $(DEBOUNCE_DIR)/$(strip $(DEBOUNCE_TYPE)).c endif ``` -# Debounce selection +### Debounce selection | DEBOUNCE_TYPE | Description | What else is needed | | ------------- | --------------------------------------------------- | ----------------------------- | -| Not defined | Use the default algorithm, currently sym_g | Nothing | +| Not defined | Use the default algorithm, currently sym_defer_g | Nothing | | custom | Use your own debounce code | ```SRC += debounce.c``` add your own debounce.c and implement necessary functions | -| anything_else | Use another algorithm from quantum/debounce/* | Nothing | +| Anything Else | Use another algorithm from quantum/debounce/* | Nothing | **Regarding split keyboards**: The debounce code is compatible with split keyboards. -# Use your own debouncing code -* Set ```DEBOUNCE_TYPE = custom```. -* Add ```SRC += debounce.c``` +### Selecting an included debouncing method +Keyboards may select one of the already implemented debounce methods, by adding to ```rules.mk``` the following line: +``` +DEBOUNCE_TYPE = +``` +Where name of algorithm is one of: +* ```sym_defer_g``` - debouncing per keyboard. On any state change, a global timer is set. When ```DEBOUNCE``` milliseconds of no changes has occurred, all input changes are pushed. + * This is the current default algorithm. This is the highest performance algorithm with lowest memory usage, and it's also noise-resistant. +* ```sym_eager_pr``` - debouncing per row. On any state change, response is immediate, followed by locking the row ```DEBOUNCE``` milliseconds of no further input for that row. +For use in keyboards where refreshing ```NUM_KEYS``` 8-bit counters is computationally expensive / low scan rate, and fingers usually only hit one row at a time. This could be +appropriate for the ErgoDox models; the matrix is rotated 90°, and hence its "rows" are really columns, and each finger only hits a single "row" at a time in normal use. +* ```sym_eager_pk``` - debouncing per key. On any state change, response is immediate, followed by ```DEBOUNCE``` milliseconds of no further input for that key +* ```sym_defer_pk``` - debouncing per key. On any state change, a per-key timer is set. When ```DEBOUNCE``` milliseconds of no changes have occurred on that key, the key status change is pushed. + +### A couple algorithms that could be implemented in the future: +* ```sym_defer_pr``` +* ```sym_eager_g``` +* ```asym_eager_defer_pk``` + +### Use your own debouncing code +You have the option to implement you own debouncing algorithm. To do this: +* Set ```DEBOUNCE_TYPE = custom``` in ```rules.mk```. +* Add ```SRC += debounce.c``` in ```rules.mk``` * Add your own ```debounce.c```. Look at current implementations in ```quantum/debounce``` for examples. * Debouncing occurs after every raw matrix scan. * Use num_rows rather than MATRIX_ROWS, so that split keyboards are supported correctly. +* If the algorithm might be applicable to other keyboards, please consider adding it to ```quantum/debounce``` -# Changing between included debouncing methods -You can either use your own code, by including your own debounce.c, or switch to another included one. -Included debounce methods are: -* eager_pr - debouncing per row. On any state change, response is immediate, followed by locking the row ```DEBOUNCE``` milliseconds of no further input for that row. -For use in keyboards where refreshing ```NUM_KEYS``` 8-bit counters is computationally expensive / low scan rate, and fingers usually only hit one row at a time. This could be -appropriate for the ErgoDox models; the matrix is rotated 90°, and hence its "rows" are really columns, and each finger only hits a single "row" at a time in normal use. -* eager_pk - debouncing per key. On any state change, response is immediate, followed by ```DEBOUNCE``` milliseconds of no further input for that key -* sym_g - debouncing per keyboard. On any state change, a global timer is set. When ```DEBOUNCE``` milliseconds of no changes has occured, all input changes are pushed. -* sym_pk - debouncing per key. On any state change, a per-key timer is set. When ```DEBOUNCE``` milliseconds of no changes have occured on that key, the key status change is pushed. +### Old names +The following old names for existing algorithms will continue to be supported, however it is recommended to use the new names instead. +* sym_g - old name for sym_defer_g +* eager_pk - old name for sym_eager_pk +* sym_pk - old name for sym_defer_pk +* eager_pr - old name for sym_eager_pr diff --git a/quantum/debounce/readme.md b/quantum/debounce/readme.md deleted file mode 100644 index f77f78c764f9..000000000000 --- a/quantum/debounce/readme.md +++ /dev/null @@ -1,28 +0,0 @@ -Debounce algorithms belong in this folder. -Here are a few ideas - -1) Global vs Per-Key vs Per-Row - * Global - one timer for all keys. Any key change state affects global timer - * Per key - one timer per key - * Per row - one timer per row - -2) Eager vs symmetric vs asymmetric - * Eager - any key change is reported immediately. All further inputs for DEBOUNCE ms are ignored. - * Symmetric - wait for no changes for DEBOUNCE ms before reporting change - * Asymmetric - wait for different times depending on key-down/key-up. E.g. Eager key-down, DEBOUNCE ms key up. - -3) Timestamp vs cycles - * old old old code waits n cycles, decreasing count by one each matrix_scan - * newer code stores the millisecond the change occurred, and does subraction to figure out time elapsed. - * Timestamps are superior, i don't think cycles will ever be used again once upgraded. - -The default algorithm is symmetric and global. -Here are a few that could be implemented: - -sym_g.c -sym_pk.c -sym_pr.c -sym_pr_cycles.c -eager_g.c -eager_pk.c -eager_pr.c //could be used in ergo-dox! diff --git a/quantum/debounce/sym_g.c b/quantum/debounce/sym_defer_g.c similarity index 100% rename from quantum/debounce/sym_g.c rename to quantum/debounce/sym_defer_g.c diff --git a/quantum/debounce/sym_pk.c b/quantum/debounce/sym_defer_pk.c similarity index 100% rename from quantum/debounce/sym_pk.c rename to quantum/debounce/sym_defer_pk.c diff --git a/quantum/debounce/eager_pk.c b/quantum/debounce/sym_eager_pk.c similarity index 100% rename from quantum/debounce/eager_pk.c rename to quantum/debounce/sym_eager_pk.c diff --git a/quantum/debounce/eager_pr.c b/quantum/debounce/sym_eager_pr.c similarity index 100% rename from quantum/debounce/eager_pr.c rename to quantum/debounce/sym_eager_pr.c From 6c3e404839bec5f04e8f0d9eef4f0ac98b16e987 Mon Sep 17 00:00:00 2001 From: stanrc85 <47038504+stanrc85@users.noreply.github.com> Date: Sun, 6 Sep 2020 18:04:29 -0400 Subject: [PATCH 751/930] [Keymap] Add indicator light bootup fanfare (#10158) * Add indicator light bootup fanfare * move fanfare code to new file * fanfare code in new file and remove unused boards * new startup fanfare code * add lock/unlock indicator animation * input key presses before changing lights * remove old code --- users/stanrc85/rgblight_layers.c | 38 ---------------------------- users/stanrc85/rules.mk | 18 ++----------- users/stanrc85/stanrc85.c | 36 +++++++++++++++++++++++++- users/stanrc85/startup_fanfare.c | 43 ++++++++++++++++++++++++++++++++ 4 files changed, 80 insertions(+), 55 deletions(-) create mode 100644 users/stanrc85/startup_fanfare.c diff --git a/users/stanrc85/rgblight_layers.c b/users/stanrc85/rgblight_layers.c index 780555e7b58f..1fbd5414987a 100644 --- a/users/stanrc85/rgblight_layers.c +++ b/users/stanrc85/rgblight_layers.c @@ -3,44 +3,7 @@ static uint8_t middle = 0; static uint8_t bottom = 0; -const rgblight_segment_t PROGMEM my_capslock_layer[] = RGBLIGHT_LAYER_SEGMENTS( - {3, 2, HSV_RED}, - {10, 2, HSV_RED} -); - -const rgblight_segment_t PROGMEM my_layer1_layer[] = RGBLIGHT_LAYER_SEGMENTS( - {3, 1, HSV_GREEN}, - {11, 1, HSV_GREEN} -); - -const rgblight_segment_t PROGMEM my_layer2_layer[] = RGBLIGHT_LAYER_SEGMENTS( - {3, 1, HSV_BLUE}, - {11, 1, HSV_BLUE} -); - -const rgblight_segment_t PROGMEM my_layer3_layer[] = RGBLIGHT_LAYER_SEGMENTS( - {3, 1, HSV_WHITE}, - {11, 1, HSV_WHITE} -); - -// Now define the array of layers. Later layers take precedence -const rgblight_segment_t* const PROGMEM my_rgb_layers[] = RGBLIGHT_LAYERS_LIST( - my_capslock_layer, - my_layer1_layer, - my_layer2_layer, - my_layer3_layer -); - -void keyboard_post_init_user(void) { - // Enable the LED layers - rgblight_layers = my_rgb_layers; -} - layer_state_t layer_state_set_user(layer_state_t state) { - // Both layers will light up if both kb layers are active - rgblight_set_layer_state(1, layer_state_cmp(state, 1)); - rgblight_set_layer_state(2, layer_state_cmp(state, 2)); - rgblight_set_layer_state(3, layer_state_cmp(state, 3)); middle = bottom = 0; switch (get_highest_layer(state)) { case _FN1_60: @@ -60,7 +23,6 @@ layer_state_t layer_state_set_user(layer_state_t state) { } bool led_update_user(led_t led_state) { - //rgblight_set_layer_state(0, led_state.caps_lock); writePin(INDICATOR_PIN_0, !led_state.caps_lock); writePin(INDICATOR_PIN_1, !middle); writePin(INDICATOR_PIN_2, !bottom); diff --git a/users/stanrc85/rules.mk b/users/stanrc85/rules.mk index 5c572c0af384..54f0f7626098 100644 --- a/users/stanrc85/rules.mk +++ b/users/stanrc85/rules.mk @@ -10,24 +10,10 @@ NKRO_ENABLE = no SRC += stanrc85.c -ifeq ($(strip $(KEYBOARD)), 1upkeyboards/1up60hse) - SRC += layer_rgb.c - VIA_ENABLE = yes - LTO_ENABLE = yes -endif -ifeq ($(strip $(KEYBOARD)), dz60) - SRC += layer_rgb.c - VIA_ENABLE = yes - LTO_ENABLE = yes -endif -ifeq ($(strip $(KEYBOARD)), projectkb/alice/rev1) - SRC += rgblight_layers.c - VIA_ENABLE = yes - LTO_ENABLE = no - VELOCIKEY_ENABLE=yes -endif ifeq ($(strip $(KEYBOARD)), projectkb/alice/rev2) SRC += rgblight_layers.c + SRC += startup_fanfare.c + OPT_DEFS += -DHAS_INDICATORS VIA_ENABLE = yes LTO_ENABLE = no VELOCIKEY_ENABLE=yes diff --git a/users/stanrc85/stanrc85.c b/users/stanrc85/stanrc85.c index c1aaad1a1aee..2dbd41974bcd 100644 --- a/users/stanrc85/stanrc85.c +++ b/users/stanrc85/stanrc85.c @@ -44,8 +44,42 @@ void ctl_copy_reset (qk_tap_dance_state_t *state, void *user_data) { } } +#if defined(HAS_INDICATORS) + static uint8_t led_user = 0; +#endif + +void lock_unlock (qk_tap_dance_state_t *state, void *user_data) { + td_state = cur_dance(state); + switch (td_state) { + case SINGLE_TAP: // Ctl + Alt + Del to unlock workstation + tap_code16(KC_CAD); + #if defined(HAS_INDICATORS) + led_user = 0; + writePin(INDICATOR_PIN_0, !led_user); + wait_ms(200); + writePin(INDICATOR_PIN_1, !led_user); + wait_ms(200); + writePin(INDICATOR_PIN_2, !led_user); + #endif + break; + case SINGLE_HOLD: + break; + case DOUBLE_TAP: //Lock workstation + tap_code16(KC_LOCK); + #if defined(HAS_INDICATORS) + led_user = 1; + writePin(INDICATOR_PIN_2, !led_user); + wait_ms(200); + writePin(INDICATOR_PIN_1, !led_user); + wait_ms(200); + writePin(INDICATOR_PIN_0, !led_user); + #endif + break; + } +} + qk_tap_dance_action_t tap_dance_actions[] = { - [TD_WIN] = ACTION_TAP_DANCE_DOUBLE(KC_CAD, KC_LOCK), + [TD_WIN] = ACTION_TAP_DANCE_FN(lock_unlock), [TD_ESC] = ACTION_TAP_DANCE_DOUBLE(KC_ESC, KC_GRV), [TD_RCTL] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, ctl_copy_finished, ctl_copy_reset) }; diff --git a/users/stanrc85/startup_fanfare.c b/users/stanrc85/startup_fanfare.c new file mode 100644 index 000000000000..507d9e389ca8 --- /dev/null +++ b/users/stanrc85/startup_fanfare.c @@ -0,0 +1,43 @@ +#include "stanrc85.h" + +static uint8_t top = 0; +static uint8_t middle = 0; +static uint8_t bottom = 0; + +static bool is_enabled = true; +static bool is_rgblight_startup = true; +static uint16_t rgblight_startup_loop_timer; + +void matrix_scan_user(void) { + // Boot up "fanfare" + if (is_rgblight_startup && is_keyboard_master()) { + if (timer_elapsed(rgblight_startup_loop_timer) > 10) { + static uint8_t counter; + counter++; + if (counter == 1) { + top = 1; + writePin(INDICATOR_PIN_0, !top); + wait_ms(200); + top = 0; + writePin(INDICATOR_PIN_0, !top); + } + if (counter == 2) { + middle = 1; + writePin(INDICATOR_PIN_1, !middle); + wait_ms(200); + middle = 0; + writePin(INDICATOR_PIN_1, !middle); + } + if (counter == 3) { + bottom = 1; + writePin(INDICATOR_PIN_2, !bottom); + wait_ms(200); + bottom = 0; + writePin(INDICATOR_PIN_2, !bottom); + } + if (counter == 4) { + is_enabled = is_rgblight_startup = false; + } + } + } +} From 28e10eedda4e53243e4e84397b7d3bb26e6d99c1 Mon Sep 17 00:00:00 2001 From: Koichi Katano <36572567+kkatano@users.noreply.github.com> Date: Mon, 7 Sep 2020 09:33:12 +0900 Subject: [PATCH 752/930] Apply suggestions from code review Co-authored-by: Ryan --- keyboards/bakeneko65/rules.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/keyboards/bakeneko65/rules.mk b/keyboards/bakeneko65/rules.mk index c2277c9dad07..f8a290cad533 100644 --- a/keyboards/bakeneko65/rules.mk +++ b/keyboards/bakeneko65/rules.mk @@ -21,4 +21,4 @@ RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow BLUETOOTH_ENABLE = no # Enable Bluetooth AUDIO_ENABLE = no # Audio output -LAYOUTS = 65_ansi_split_bs 65_ansi 65_ansi_split_bs_2_right_mods 65_ansi_2_right_mods +LAYOUTS = 65_ansi From 788cbcf8283126eb3d60e71272591efd91e641fe Mon Sep 17 00:00:00 2001 From: Alvaro Muente <40742045+alvaromuente@users.noreply.github.com> Date: Sun, 6 Sep 2020 19:52:57 -0500 Subject: [PATCH 753/930] [Keyboard] Update JJ40 VID and PID (#10215) Co-authored-by: Alvaro --- keyboards/jj40/config.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/keyboards/jj40/config.h b/keyboards/jj40/config.h index 9a1eadb7841f..0d168f2c01fd 100644 --- a/keyboards/jj40/config.h +++ b/keyboards/jj40/config.h @@ -16,8 +16,8 @@ along with this program. If not, see . #include "config_common.h" -#define VENDOR_ID 0x20A0 -#define PRODUCT_ID 0x422D +#define VENDOR_ID 0x4B50 // "KP" +#define PRODUCT_ID 0x0040 #define DEVICE_VER 0x0200 #define MANUFACTURER KPrepublic #define PRODUCT JJ40 From 8ea8a80c5b0eb4aac35b1f9f993f033bb04f1555 Mon Sep 17 00:00:00 2001 From: moyi4681 Date: Mon, 7 Sep 2020 08:55:06 +0800 Subject: [PATCH 754/930] [Keyboard] add Maja soldered keyboard (#10152) * add maja_soldered keyboard add maja_soldered keyboard * Update info.json * update keymap * Update keyboards/kbdfans/maja_soldered/config.h Co-authored-by: Drashna Jaelre * Update keymap.c * Update keyboards/kbdfans/maja_soldered/rules.mk Co-authored-by: Ryan * Update keyboards/kbdfans/maja_soldered/rules.mk Co-authored-by: Ryan * Update keymap.c * Update keymap.c * Update keymap.c Co-authored-by: Drashna Jaelre Co-authored-by: Ryan --- keyboards/kbdfans/maja_soldered/config.h | 44 ++++++++++ keyboards/kbdfans/maja_soldered/info.json | 81 +++++++++++++++++++ .../maja_soldered/keymaps/default/keymap.c | 43 ++++++++++ .../maja_soldered/keymaps/via/keymap.c | 43 ++++++++++ .../maja_soldered/keymaps/via/rules.mk | 2 + .../kbdfans/maja_soldered/maja_soldered.c | 29 +++++++ .../kbdfans/maja_soldered/maja_soldered.h | 19 +++++ keyboards/kbdfans/maja_soldered/readme.md | 14 ++++ keyboards/kbdfans/maja_soldered/rules.mk | 22 +++++ 9 files changed, 297 insertions(+) create mode 100755 keyboards/kbdfans/maja_soldered/config.h create mode 100644 keyboards/kbdfans/maja_soldered/info.json create mode 100755 keyboards/kbdfans/maja_soldered/keymaps/default/keymap.c create mode 100755 keyboards/kbdfans/maja_soldered/keymaps/via/keymap.c create mode 100755 keyboards/kbdfans/maja_soldered/keymaps/via/rules.mk create mode 100755 keyboards/kbdfans/maja_soldered/maja_soldered.c create mode 100755 keyboards/kbdfans/maja_soldered/maja_soldered.h create mode 100755 keyboards/kbdfans/maja_soldered/readme.md create mode 100755 keyboards/kbdfans/maja_soldered/rules.mk diff --git a/keyboards/kbdfans/maja_soldered/config.h b/keyboards/kbdfans/maja_soldered/config.h new file mode 100755 index 000000000000..bc284893d541 --- /dev/null +++ b/keyboards/kbdfans/maja_soldered/config.h @@ -0,0 +1,44 @@ +/* Copyright 2020 dztech kbdfans + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License 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 0x4B42 +#define PRODUCT_ID 0x6069 +#define DEVICE_VER 0x0001 +#define MANUFACTURER KBDFANS +#define PRODUCT MAJA_SOLDERED + +#define MATRIX_ROWS 5 +#define MATRIX_COLS 15 +#define MATRIX_ROW_PINS { F0, B6, D6, B4, D7 } +#define MATRIX_COL_PINS { C6, C7, F7, F6, F5, F4, F1, B0, B1, B2, B3, B7, D2, D3, D5 } +#define DIODE_DIRECTION COL2ROW + +#define DEBOUNCE 3 + +/* number of backlight levels */ +#define BACKLIGHT_PIN B5 +#ifdef BACKLIGHT_PIN +#define BACKLIGHT_LEVELS 3 +#endif + +/* 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/kbdfans/maja_soldered/info.json b/keyboards/kbdfans/maja_soldered/info.json new file mode 100644 index 000000000000..b583282a9ac2 --- /dev/null +++ b/keyboards/kbdfans/maja_soldered/info.json @@ -0,0 +1,81 @@ +{ + "keyboard_name": "MAJA_SOLDERED", + "url": "", + "maintainer": "DZTECH", + "width": 18.75, + "height": 5.5, + "layouts": { + "LAYOUT": { + "layout": [ + {"x": 0.75, "y": 0.25}, + {"x": 1.75, "y": 0.25}, + {"x": 2.75, "y": 0}, + {"x": 3.75, "y": 0.25}, + {"x": 4.75, "y": 0.25}, + {"x": 5.75, "y": 0.25}, + {"x": 6.75, "y": 0.25}, + {"x": 8.75, "y": 0.25}, + {"x": 9.75, "y": 0.25}, + {"x": 10.75, "y": 0.25}, + {"x": 11.75, "y": 0.25}, + {"x": 12.75, "y": 0}, + {"x": 13.75, "y": 0.25}, + {"x": 14.75, "y": 0.25}, + {"x": 15.75, "y": 0.25}, + {"x": 17.75, "y": 0.25}, + {"x": 0.5, "y": 1.25, "w": 1.5}, + {"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": 8.5, "y": 1.25}, + {"x": 9.5, "y": 1.25}, + {"x": 10.5, "y": 1.25}, + {"x": 11.5, "y": 1.25}, + {"x": 12.5, "y": 1.25}, + {"x": 13.5, "y": 1.25}, + {"x": 14.5, "y": 1.25}, + {"x": 15.5, "y": 1.25, "w": 1.5}, + {"x": 17.75, "y": 1.25}, + {"x": 0.25, "y": 2.25, "w": 1.75}, + {"x": 2, "y": 2.25}, + {"x": 3, "y": 2.25}, + {"x": 4, "y": 2.25}, + {"x": 5, "y": 2.25}, + {"x": 6, "y": 2.25}, + {"x": 9, "y": 2.25}, + {"x": 10, "y": 2.25}, + {"x": 11, "y": 2.25}, + {"x": 12, "y": 2.25}, + {"x": 13, "y": 2.25}, + {"x": 14, "y": 2.25}, + {"x": 15, "y": 2.25, "w": 2.25}, + {"x": 17.75, "y": 2.25}, + {"x": 0, "y": 3.25, "w": 2.25}, + {"x": 2.25, "y": 3.25}, + {"x": 3.25, "y": 3.25}, + {"x": 4.25, "y": 3.25}, + {"x": 5.25, "y": 3.25}, + {"x": 6.25, "y": 3.25}, + {"x": 8.25, "y": 3.25}, + {"x": 9.25, "y": 3.25}, + {"x": 10.25, "y": 3.25}, + {"x": 11.25, "y": 3.25}, + {"x": 12.25, "y": 3.25}, + {"x": 13.25, "y": 3.25}, + {"x": 14.25, "y": 3.25, "w": 2.25}, + {"x": 16.75, "y": 3.5}, + {"x": 0, "y": 4.25, "w": 1.5}, + {"x": 3, "y": 4.25, "w": 1.5}, + {"x": 4.5, "y": 4.25, "w": 2}, + {"x": 6.5, "y": 4.25, "w": 1.25}, + {"x": 8.25, "y": 4.25, "w": 2.75}, + {"x": 11, "y": 4.25, "w": 1.5}, + {"x": 15.75, "y": 4.5}, + {"x": 16.75, "y": 4.5}, + {"x": 17.75, "y": 4.5} + ] + } + } +} diff --git a/keyboards/kbdfans/maja_soldered/keymaps/default/keymap.c b/keyboards/kbdfans/maja_soldered/keymaps/default/keymap.c new file mode 100755 index 000000000000..a86004ef72dd --- /dev/null +++ b/keyboards/kbdfans/maja_soldered/keymaps/default/keymap.c @@ -0,0 +1,43 @@ +/* Copyright 2020 dztech kbdfans + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public 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_BSPC,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_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, MO(1), 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_RCTL, 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, RESET,KC_TRNS,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, 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( /* FN */ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 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( /* FN */ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 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/maja_soldered/keymaps/via/keymap.c b/keyboards/kbdfans/maja_soldered/keymaps/via/keymap.c new file mode 100755 index 000000000000..cf64bec4c8b1 --- /dev/null +++ b/keyboards/kbdfans/maja_soldered/keymaps/via/keymap.c @@ -0,0 +1,43 @@ +/* Copyright 2020 dztech kbdfans + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public 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_BSPC,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_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, MO(1), 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_RCTL, 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, RESET,KC_TRNS,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, 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( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 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), + }; diff --git a/keyboards/kbdfans/maja_soldered/keymaps/via/rules.mk b/keyboards/kbdfans/maja_soldered/keymaps/via/rules.mk new file mode 100755 index 000000000000..36b7ba9cbc98 --- /dev/null +++ b/keyboards/kbdfans/maja_soldered/keymaps/via/rules.mk @@ -0,0 +1,2 @@ +VIA_ENABLE = yes +LTO_ENABLE = yes diff --git a/keyboards/kbdfans/maja_soldered/maja_soldered.c b/keyboards/kbdfans/maja_soldered/maja_soldered.c new file mode 100755 index 000000000000..1f0f48c4cd72 --- /dev/null +++ b/keyboards/kbdfans/maja_soldered/maja_soldered.c @@ -0,0 +1,29 @@ +/* Copyright 2020 dztech kbdfans + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#include "maja_soldered.h" + +void matrix_init_kb(void) { + setPinOutput(D4); + matrix_init_user(); +} + +bool led_update_kb(led_t led_state) { + bool res = led_update_user(led_state); + if(res) { + writePin(D4, !led_state.caps_lock); + } + return res; +} diff --git a/keyboards/kbdfans/maja_soldered/maja_soldered.h b/keyboards/kbdfans/maja_soldered/maja_soldered.h new file mode 100755 index 000000000000..4834c2b74f52 --- /dev/null +++ b/keyboards/kbdfans/maja_soldered/maja_soldered.h @@ -0,0 +1,19 @@ +#pragma once + +#include "quantum.h" + +#define XXX KC_NO + +#define LAYOUT( \ + K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K3E, 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, K3C, K3D, \ + K40, K42, K43, K45, K47, K49, 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, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E }, \ + { K40, XXX, K42, K43, XXX, K45, XXX, K47, XXX, K49, XXX, XXX, K4C, K4D, K4E } \ +} diff --git a/keyboards/kbdfans/maja_soldered/readme.md b/keyboards/kbdfans/maja_soldered/readme.md new file mode 100755 index 000000000000..f19c1d74030e --- /dev/null +++ b/keyboards/kbdfans/maja_soldered/readme.md @@ -0,0 +1,14 @@ +# MAJA_SOLDERED + +![MAJA_SOLDERED](https://i.ibb.co/4Kq0wfp/20200816100310.png) +![MAJA_SOLDERED](https://i.ibb.co/3vJM805/20200816100345.png) + +* Keyboard Maintainer: [DZTECH](https://github.com/moyi4681) +* Hardware Supported: MAJA_SOLDERED +* Hardware Availability: [KBDFans](https://kbdfans.cn/) + +Make example for this keyboard (after setting up your build environment): + + make kbdfans/maja_soldered: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/maja_soldered/rules.mk b/keyboards/kbdfans/maja_soldered/rules.mk new file mode 100755 index 000000000000..6cd4d92603c5 --- /dev/null +++ b/keyboards/kbdfans/maja_soldered/rules.mk @@ -0,0 +1,22 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +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 +BLUETOOTH_ENABLE = no # Enable Bluetooth +AUDIO_ENABLE = no # Audio output +NO_USB_STARTUP_CHECK = no # Disable initialization only when usb is plugged in From 92e5361fc5637a61754d0e63e7634c867b389fd7 Mon Sep 17 00:00:00 2001 From: nathanvercaemert <50712356+nathanvercaemert@users.noreply.github.com> Date: Sun, 6 Sep 2020 20:55:39 -0400 Subject: [PATCH 755/930] [Keymap] Personal Keymap (nathanvercaemert) Update (#10107) * updates to incorporate combined mouse key acceleration functionality * tab switching in chrome works, updated readme * updated keymap image * updated keymap image Co-authored-by: Nathan Vercaemert --- .../keymaps/nathanvercaemert/config.h | 3 + .../keymaps/nathanvercaemert/keymap.c | 123 +++++++++++++++--- .../keymaps/nathanvercaemert/readme.md | 7 +- .../keymaps/nathanvercaemert/rules.mk | 3 +- 4 files changed, 111 insertions(+), 25 deletions(-) diff --git a/keyboards/ergodox_ez/keymaps/nathanvercaemert/config.h b/keyboards/ergodox_ez/keymaps/nathanvercaemert/config.h index 6d69b0011260..06c50e0a96db 100644 --- a/keyboards/ergodox_ez/keymaps/nathanvercaemert/config.h +++ b/keyboards/ergodox_ez/keymaps/nathanvercaemert/config.h @@ -18,6 +18,9 @@ #undef MOUSEKEY_WHEEL_INTERVAL #define MOUSEKEY_WHEEL_INTERVAL 50 +#undef MK_COMBINED +#define MK_COMBINED + // /* Temporarily defining a tapping term that is ridiculous to see if i can tell if lt is working. */ // #undef TAPPING_TERM // #define TAPPING_TERM 499 diff --git a/keyboards/ergodox_ez/keymaps/nathanvercaemert/keymap.c b/keyboards/ergodox_ez/keymaps/nathanvercaemert/keymap.c index c2960cfa16e8..e06d0b769fe9 100644 --- a/keyboards/ergodox_ez/keymaps/nathanvercaemert/keymap.c +++ b/keyboards/ergodox_ez/keymaps/nathanvercaemert/keymap.c @@ -28,13 +28,17 @@ enum custom_keycodes { RGB_SLD = EZ_SAFE_RANGE, + MS_WH_UP, + MS_WH_DOWN, + MS_WH_RIGHT, + MS_WH_LEFT, }; // tapdance keycodes enum td_keycodes { CTRL_TO12, SHIFT_TO13, - ALT_TO11 + ALT_TO11, }; // define a type containing as many tapdance states as you need @@ -59,6 +63,7 @@ void altto11_reset (qk_tap_dance_state_t *state, void *user_data); void shiftto13_finished (qk_tap_dance_state_t *state, void *user_data); void shiftto13_reset (qk_tap_dance_state_t *state, void *user_data); + const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [0] = LAYOUT_ergodox_pretty( KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, @@ -162,9 +167,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), [10] = LAYOUT_ergodox_pretty( 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_NO, KC_LGUI, KC_MS_BTN2, KC_NO, KC_NO, KC_TRANSPARENT, MT(MOD_RCTL, KC_A), KC_NO, KC_NO, KC_MS_UP, KC_NO, KC_NO, KC_TRANSPARENT, + KC_TRANSPARENT, KC_NO, KC_LGUI, KC_MS_BTN2, KC_ACL2, KC_NO, KC_TRANSPARENT, KC_TRANSPARENT, KC_NO, KC_NO, KC_MS_UP, KC_NO, KC_NO, KC_TRANSPARENT, KC_TRANSPARENT, TD(SHIFT_TO13), TD(CTRL_TO12), TD(ALT_TO11), KC_MS_BTN1, KC_NO, KC_NO, KC_MS_LEFT, KC_MS_DOWN, KC_MS_RIGHT, KC_NO, KC_TRANSPARENT, - KC_TRANSPARENT, KC_NO, MT(MOD_LGUI | MOD_LCTL,KC_NO), KC_NO, KC_NO, KC_NO, KC_TRANSPARENT, KC_TRANSPARENT, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_TRANSPARENT, + KC_TRANSPARENT, KC_NO, MT(MOD_LGUI | MOD_LCTL,KC_NO), KC_ACL0, KC_NO, KC_NO, KC_TRANSPARENT, KC_TRANSPARENT, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, 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, @@ -182,9 +187,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), [12] = LAYOUT_ergodox_pretty( 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_NO, KC_LGUI, KC_HYPR, KC_NO, KC_NO, KC_TRANSPARENT, KC_TRANSPARENT, KC_NO, KC_NO, KC_MS_WH_UP, KC_NO, KC_NO, KC_TRANSPARENT, + KC_TRANSPARENT, KC_NO, KC_LGUI, KC_HYPR, KC_ACL2, KC_NO, KC_TRANSPARENT, KC_TRANSPARENT, KC_NO, KC_NO, KC_MS_WH_UP, KC_NO, KC_NO, KC_TRANSPARENT, KC_TRANSPARENT, KC_LSHIFT, KC_LCTRL, KC_LALT, KC_NO, KC_NO, KC_NO, KC_MS_WH_LEFT, KC_MS_WH_DOWN, KC_MS_WH_RIGHT, KC_NO, KC_TRANSPARENT, - KC_TRANSPARENT, KC_NO, MT(MOD_LGUI | MOD_LCTL,KC_NO), KC_NO, KC_NO, KC_NO, KC_TRANSPARENT, KC_TRANSPARENT, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_TRANSPARENT, + KC_TRANSPARENT, KC_NO, MT(MOD_LGUI | MOD_LCTL,KC_NO), MO(14), KC_NO, KC_NO, KC_TRANSPARENT, KC_TRANSPARENT, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, 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, @@ -200,16 +205,18 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, TO(0) ), + [14] = LAYOUT_ergodox_pretty( + 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_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_TRANSPARENT, KC_TRANSPARENT, KC_NO, KC_NO, MS_WH_UP, KC_NO, KC_NO, KC_TRANSPARENT, + KC_TRANSPARENT, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, MS_WH_LEFT, MS_WH_DOWN, MS_WH_RIGHT, KC_NO, KC_TRANSPARENT, + KC_TRANSPARENT, KC_NO, KC_NO, KC_TRANSPARENT, KC_NO, KC_NO, KC_TRANSPARENT, KC_TRANSPARENT, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, 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 + ), }; - -/* Commenting out for debug purposes */ -// bool process_record_user(uint16_t keycode, keyrecord_t *record) { -// switch (keycode) { -// } -// return true; -// } - uint32_t layer_state_set_user(uint32_t state) { uint8_t layer = biton32(state); ergodox_board_led_off(); @@ -252,11 +259,31 @@ uint32_t layer_state_set_user(uint32_t state) { // determine the tapdance state to return int cur_dance (qk_tap_dance_state_t *state) { if (state->count == 1) { - if (state->interrupted || !state->pressed) { return SINGLE_TAP; } + if (state->interrupted && state->pressed && state->interrupting_keycode == KC_MS_BTN1) {return SINGLE_HOLD;} + if (state->interrupted && state->pressed && state->interrupting_keycode == 22273) {return SINGLE_HOLD;} + if (state->interrupted && state->pressed && state->interrupting_keycode == 22272) {return SINGLE_HOLD;} + if (state->interrupted && state->pressed && state->interrupting_keycode == KC_TAB) {return SINGLE_HOLD;} + else if (state->interrupted || !state->pressed) { + // if (state->interrupted) { + // print("interrupted\n"); + // uprintf("Shift: %u\n", KC_LSHIFT); + // uprintf("Control: %u\n", KC_LCTRL); + // uprintf("%u\n",state->interrupting_keycode); + // } + return SINGLE_TAP; + } else { return SINGLE_HOLD; } } else { return 2; } // any number higher than the maximum state value you return above } +// /* Backup in case previous code is hard to piece together. */ +// 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; } +// } +// else { return 2; } // any number higher than the maximum state value you return above +// } void ctrlto12_finished (qk_tap_dance_state_t *state, void *user_data) { td_state = cur_dance(state); @@ -265,7 +292,14 @@ void ctrlto12_finished (qk_tap_dance_state_t *state, void *user_data) { layer_on(12); break; case SINGLE_HOLD: + if (state->interrupted && (state->interrupting_keycode == 22273 || state->interrupting_keycode == 43)) { + register_mods(MOD_BIT(KC_LCTRL)); + break; + } register_mods(MOD_BIT(KC_LCTRL)); // for a layer-tap key, use `layer_on(_MY_LAYER)` here + if (state->interrupted && state->interrupting_keycode == KC_MS_BTN1) { + register_code16(LCTL(KC_MS_BTN1)); + } break; } } @@ -275,7 +309,14 @@ void ctrlto12_reset (qk_tap_dance_state_t *state, void *user_data) { case SINGLE_TAP: break; case SINGLE_HOLD: + if (state->interrupted && (state->interrupting_keycode == 22273 || state->interrupting_keycode == 43) ) { + unregister_mods(MOD_BIT(KC_LCTRL)); + break; + } unregister_mods(MOD_BIT(KC_LCTRL)); // for a layer-tap key, use `layer_off(_MY_LAYER)` here + if (state->interrupted && state->interrupting_keycode == KC_MS_BTN1) { + unregister_code16(LCTL(KC_MS_BTN1)); + } break; } } @@ -287,7 +328,14 @@ void shiftto13_finished (qk_tap_dance_state_t *state, void *user_data) { layer_on(13); break; case SINGLE_HOLD: + if (state->interrupted && (state->interrupting_keycode == 22272 || state->interrupting_keycode == 43) ) { + register_mods(MOD_BIT(KC_LSHIFT)); + break; + } register_mods(MOD_BIT(KC_LSHIFT)); // for a layer-tap key, use `layer_on(_MY_LAYER)` here + if (state->interrupted && state->interrupting_keycode == KC_MS_BTN1) { + register_code16(LSFT(KC_MS_BTN1)); + } break; } } @@ -297,7 +345,14 @@ void shiftto13_reset (qk_tap_dance_state_t *state, void *user_data) { case SINGLE_TAP: break; case SINGLE_HOLD: + if (state->interrupted && (state->interrupting_keycode == 22272 || state->interrupting_keycode == 43) ) { + unregister_mods(MOD_BIT(KC_LSHIFT)); + break; + } unregister_mods(MOD_BIT(KC_LSHIFT)); // for a layer-tap key, use `layer_off(_MY_LAYER)` here + if (state->interrupted && state->interrupting_keycode == KC_MS_BTN1) { + unregister_code16(LSFT(KC_MS_BTN1)); + } break; } } @@ -310,6 +365,9 @@ void altto11_finished (qk_tap_dance_state_t *state, void *user_data) { break; case SINGLE_HOLD: register_mods(MOD_BIT(KC_LALT)); // for a layer-tap key, use `layer_on(_MY_LAYER)` here + if (state->interrupted && state->interrupting_keycode == KC_MS_BTN1) { + register_code16(LALT(KC_MS_BTN1)); + } break; } } @@ -320,6 +378,9 @@ void altto11_reset (qk_tap_dance_state_t *state, void *user_data) { break; case SINGLE_HOLD: unregister_mods(MOD_BIT(KC_LALT)); // for a layer-tap key, use `layer_off(_MY_LAYER)` here + if (state->interrupted && state->interrupting_keycode == KC_MS_BTN1) { + unregister_code16(LALT(KC_MS_BTN1)); + } break; } } @@ -328,7 +389,7 @@ void altto11_reset (qk_tap_dance_state_t *state, void *user_data) { qk_tap_dance_action_t tap_dance_actions[] = { [CTRL_TO12] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, ctrlto12_finished, ctrlto12_reset), [SHIFT_TO13] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, shiftto13_finished, shiftto13_reset), - [ALT_TO11] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, altto11_finished, altto11_reset) + [ALT_TO11] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, altto11_finished, altto11_reset), }; /* Debugging functions */ @@ -342,10 +403,32 @@ void keyboard_post_init_user(void) { } bool process_record_user(uint16_t keycode, keyrecord_t *record) { - // If console is enabled, it will print the matrix position and status of each key pressed -// #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 - return true; + // If console is enabled, it will print the matrix position and status of each key pressed + // #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 + switch (keycode) { + case MS_WH_DOWN: + if (record->event.pressed) { + SEND_STRING(SS_TAP(X_MS_WH_DOWN)); + } + break; + case MS_WH_UP: + if (record->event.pressed) { + SEND_STRING(SS_TAP(X_MS_WH_UP)); + } + break; + case MS_WH_LEFT: + if (record->event.pressed) { + SEND_STRING(SS_TAP(X_MS_WH_LEFT)); + } + break; + case MS_WH_RIGHT: + if (record->event.pressed) { + SEND_STRING(SS_TAP(X_MS_WH_RIGHT)); + } + break; + } + return true; } diff --git a/keyboards/ergodox_ez/keymaps/nathanvercaemert/readme.md b/keyboards/ergodox_ez/keymaps/nathanvercaemert/readme.md index 5570d9881c87..ff3c8d142cca 100644 --- a/keyboards/ergodox_ez/keymaps/nathanvercaemert/readme.md +++ b/keyboards/ergodox_ez/keymaps/nathanvercaemert/readme.md @@ -1,7 +1,6 @@ # The nathanvercaemert ErgoDox EZ configuration -Centered around the home row and the use of mouse keys, this configuration focuses -on minimal finger movement. No key is more than one unit away from a finger on the home row. +Centered around the home row and the use of mouse keys, this configuration focuses on minimal finger movement. No key is more than one unit away from the home row. ## Layers @@ -20,7 +19,9 @@ on minimal finger movement. No key is more than one unit away from a finger on t navigation layers. * Navigation Layers * From the Mouse Layer, taps to the left home row navigate to scroll keys, arrow keys, and page keys. +* Notes on Acceleration + * Designated as "Slow" and "Fast" on the mouse layers (movement and scroll,) these keys can be held to allow for slow/precise or fast/efficient control. Here is the image of my keymap: -![Default](https://i.imgur.com/kXywQIq.png) \ No newline at end of file +![Imgur Image](https://i.imgur.com/x6VgH9Z.png) \ No newline at end of file diff --git a/keyboards/ergodox_ez/keymaps/nathanvercaemert/rules.mk b/keyboards/ergodox_ez/keymaps/nathanvercaemert/rules.mk index 31c3fe3c7415..0dadd4371f5f 100644 --- a/keyboards/ergodox_ez/keymaps/nathanvercaemert/rules.mk +++ b/keyboards/ergodox_ez/keymaps/nathanvercaemert/rules.mk @@ -5,6 +5,5 @@ COMMAND_ENABLE = no RGBLIGHT_ENABLE = no TAP_DANCE_ENABLE=yes - -#Beginning debugging process for LT() and permissive hold +# Debugging CONSOLE_ENABLE = yes From 1d8b0ccc813fa2665d78fd3df85b39ef47a8f220 Mon Sep 17 00:00:00 2001 From: Adam Gwilliam Date: Sun, 6 Sep 2020 20:10:18 -0500 Subject: [PATCH 756/930] [Keyboard] add via support for boardsource/4x12 (#10220) Co-authored-by: Adam Gwilliam --- .../boardsource/4x12/keymaps/via/keymap.c | 36 +++++++++++++++++++ .../boardsource/4x12/keymaps/via/readme.md | 5 +++ .../boardsource/4x12/keymaps/via/rules.mk | 1 + 3 files changed, 42 insertions(+) create mode 100644 keyboards/boardsource/4x12/keymaps/via/keymap.c create mode 100644 keyboards/boardsource/4x12/keymaps/via/readme.md create mode 100644 keyboards/boardsource/4x12/keymaps/via/rules.mk diff --git a/keyboards/boardsource/4x12/keymaps/via/keymap.c b/keyboards/boardsource/4x12/keymaps/via/keymap.c new file mode 100644 index 000000000000..d9a0c47a6b39 --- /dev/null +++ b/keyboards/boardsource/4x12/keymaps/via/keymap.c @@ -0,0 +1,36 @@ +#include QMK_KEYBOARD_H + +enum layers { + _MAIN, + _RAISE, + _LOWER, +}; + +// Readability keycodes +#define LOWER MO(_LOWER) +#define RAISE MO(_RAISE) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [_MAIN] = 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_PIPE, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT + ), + + [_RAISE] = 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, _______, + RESET, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY + ), + + [_LOWER] = 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 + ) + +}; diff --git a/keyboards/boardsource/4x12/keymaps/via/readme.md b/keyboards/boardsource/4x12/keymaps/via/readme.md new file mode 100644 index 000000000000..534633d45e8b --- /dev/null +++ b/keyboards/boardsource/4x12/keymaps/via/readme.md @@ -0,0 +1,5 @@ +# The via keymap for boardsource 4x12 ortholinear keybaoard + +This folder contains the [VIA](https://caniusevia.com/) configuration for the boardsource 4x12 ortholinear keybaoard + +Maintained by: [gwillad](https://github.com/gwillad) diff --git a/keyboards/boardsource/4x12/keymaps/via/rules.mk b/keyboards/boardsource/4x12/keymaps/via/rules.mk new file mode 100644 index 000000000000..036bd6d1c3ec --- /dev/null +++ b/keyboards/boardsource/4x12/keymaps/via/rules.mk @@ -0,0 +1 @@ +VIA_ENABLE = yes \ No newline at end of file From fb66f0a3fbed3a9060f62cc82306728015930b31 Mon Sep 17 00:00:00 2001 From: jackytrabbit Date: Mon, 7 Sep 2020 11:47:52 +0800 Subject: [PATCH 757/930] [Keyboard] Add VIA support for lazydesigners\bolt (#10218) * Add VIA support for lazydesigners\bolt Add VIA support for lazydesigners\bolt * Update keyboards/lazydesigners/bolt/via/rules.mk Co-authored-by: Ryan Co-authored-by: Ryan --- keyboards/lazydesigners/bolt/via/keymap.c | 43 +++++++++++++++++++++++ keyboards/lazydesigners/bolt/via/rules.mk | 2 ++ 2 files changed, 45 insertions(+) create mode 100644 keyboards/lazydesigners/bolt/via/keymap.c create mode 100644 keyboards/lazydesigners/bolt/via/rules.mk diff --git a/keyboards/lazydesigners/bolt/via/keymap.c b/keyboards/lazydesigners/bolt/via/keymap.c new file mode 100644 index 000000000000..86078dc1e268 --- /dev/null +++ b/keyboards/lazydesigners/bolt/via/keymap.c @@ -0,0 +1,43 @@ +/* Copyright 2020 LAZYDESIGNERS + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public 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_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_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_UP, MO(2), + KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, KC_SPC, MO(1), KC_LEFT, KC_DOWN, KC_RGHT + ), + [1] = LAYOUT( + RESET, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_NO, + KC_INS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, + 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_VOLD, KC_MUTE, KC_VOLU, KC_TRNS, KC_TRNS, KC_NO, KC_NO, KC_NO, KC_NO + ), + [2] = LAYOUT( + 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_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO + ), + [3] = 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, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO + ), +}; diff --git a/keyboards/lazydesigners/bolt/via/rules.mk b/keyboards/lazydesigners/bolt/via/rules.mk new file mode 100644 index 000000000000..a2d6d0a96e85 --- /dev/null +++ b/keyboards/lazydesigners/bolt/via/rules.mk @@ -0,0 +1,2 @@ +VIA_ENABLE = yes +LTO_ENABLE = yes From 3b14c032e0ed61870596a59bbc86857338365bf5 Mon Sep 17 00:00:00 2001 From: gitdrik <58667795+gitdrik@users.noreply.github.com> Date: Mon, 7 Sep 2020 05:49:20 +0200 Subject: [PATCH 758/930] [Keymap] Added Finnish SFS 5966 keymap for planck. (#10200) * Added Finnish SFS 5966 keymap for planck. * Modified comments and added copyright header. --- keyboards/planck/keymaps/gitdrik/config.h | 56 +++++ keyboards/planck/keymaps/gitdrik/keymap.c | 231 +++++++++++++++++++++ keyboards/planck/keymaps/gitdrik/readme.md | 1 + keyboards/planck/keymaps/gitdrik/rules.mk | 3 + 4 files changed, 291 insertions(+) create mode 100644 keyboards/planck/keymaps/gitdrik/config.h create mode 100644 keyboards/planck/keymaps/gitdrik/keymap.c create mode 100644 keyboards/planck/keymaps/gitdrik/readme.md create mode 100644 keyboards/planck/keymaps/gitdrik/rules.mk diff --git a/keyboards/planck/keymaps/gitdrik/config.h b/keyboards/planck/keymaps/gitdrik/config.h new file mode 100644 index 000000000000..0acf06dc5495 --- /dev/null +++ b/keyboards/planck/keymaps/gitdrik/config.h @@ -0,0 +1,56 @@ +/* Original code probably 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 . + */ + +/* Passed along from planck default to Finnish SFS 5966 by gitdrik, 2020. */ + +#pragma once + +#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/gitdrik/keymap.c b/keyboards/planck/keymaps/gitdrik/keymap.c new file mode 100644 index 000000000000..bdaef207634f --- /dev/null +++ b/keyboards/planck/keymaps/gitdrik/keymap.c @@ -0,0 +1,231 @@ +/* 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 . + */ + +/* Modified from planck default to Finnish SFS 5966 by gitdrik, 2020. */ + +#include QMK_KEYBOARD_H +#include "muse.h" + +enum planck_layers { + _BASE, + _LEFT, + _RIGHT, + _LEFTER, + _RIGHTER +}; + +#define LEFT TT(_LEFT) +#define RIGHT MO(_RIGHT) +#define LEFTER MO(_LEFTER) +#define RIGHTER MO(_RIGHTER) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +/* Base + * ,-----------------------------------------------------------------------------------. + * | Tab | Q | W | E | R | T | Y | U | I | O | P | Å | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Esc | A | S | D | F | G | H | J | K | L | Ö | Ä | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Ctrl | Shift| X | C | V | B | N | M | , | . | Shift| Enter| + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Z | GUI | Alt |Left2 | Left |BkSpc | Spc |Right |Rghter| < | - | / | + * `-----------------------------------------------------------------------------------' + */ +[_BASE] = 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_LBRC, + 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_LCTL, KC_LSFT, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_RSFT, KC_ENT , + KC_Z, KC_LGUI, KC_LALT, LEFTER, LEFT, KC_BSPC, KC_SPC, RIGHT, RIGHTER, KC_NUBS, KC_SLSH, LSFT(KC_7) +), + +/* Left + * ,-----------------------------------------------------------------------------------. + * | Tab | F10 | F9 | F8 | F7 | { | } | 7 | 8 | 9 | ^ | = | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Esc | F11 | F6 | F5 | F4 | ( | ) | 4 | 5 | 6 | + | * | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | RCtrl| Shift| F3 | F2 | F1 | [ | ] | 1 | 2 | 3 | Shift| Enter| + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | F12 | GUI | Alt |Lefter| Left |BkSpc | Spc |Right | 0 | , | - | / | + * `-----------------------------------------------------------------------------------' + */ +[_LEFT] = LAYOUT_planck_grid( + KC_TRNS, KC_F10, KC_F9, KC_F8, KC_F7, RALT(KC_7), RALT(KC_0), KC_7, KC_8, KC_9, LSFT(KC_RBRC), LSFT(KC_0), + KC_TRNS, KC_F11, KC_F6, KC_F5, KC_F4, LSFT(KC_8), LSFT(KC_9), KC_4, KC_5, KC_6, KC_PPLS, KC_PAST, + KC_RCTL, KC_TRNS, KC_F3, KC_F2, KC_F1, RALT(KC_8), RALT(KC_9), KC_1, KC_2, KC_3, KC_TRNS, KC_TRNS, + KC_F12, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_0, KC_COMM, KC_PMNS, KC_PSLS +), + +/* Right + * ,-----------------------------------------------------------------------------------. + * | Tab | ◌̄ | ◌̈ | ◌́ | ◌̀ | ◌̃ | ◌̆ | Home | Up | End | Ins | PgUp | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Esc | @ | $ | ° | & | # | % | Left | Down | Right| Del | PgDn | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | RCtrl| Shift| ” | « | » | ‚ „ | ‰ |PlayPs| << | >> | Shift| Enter| + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | “ | GUI | Alt |Lefter| |BkSpc | Spc |Right |Rghter| Vol- | Vol+ | Mute | + * `-----------------------------------------------------------------------------------' + */ + [_RIGHT] = LAYOUT_planck_grid( + KC_TRNS, RALT(LSFT(KC_RBRC)), KC_RBRC, KC_EQL , LSFT(KC_EQL), RALT(KC_RBRC), RALT(KC_NUHS), KC_HOME, KC_UP, KC_END , KC_INS , KC_PGUP, + KC_TRNS, RALT(KC_2), RALT(KC_4), RALT(LSFT(KC_0)), LSFT(KC_6), LSFT(KC_3), LSFT(KC_5), KC_LEFT, KC_DOWN, KC_RGHT, KC_DEL, KC_PGDN, + KC_RCTRL, KC_TRNS, RALT(LSFT(KC_2)), RALT(LSFT(KC_4)), RALT(LSFT(KC_3)), RALT(KC_6), RALT(KC_5), KC_MPLY, KC_MPRV, KC_MNXT, KC_TRNS, KC_TRNS, + RALT(LSFT(KC_5)), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_VOLD, KC_VOLU, KC_MUTE +), + +/* Lefter + * ,-----------------------------------------------------------------------------------. + * | Tab | § ½ | " | € | | þ Þ | ¡ | ! | ı | œ Œ | ◌̛ ◌̉ | ◌̋ ◌̊ | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Esc | ə Ə | ß ẞ | ð Ð | ' | | | | ĸ | ◌̵ | ø Ø | æ Æ | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Ctrl | Shift| × · | ◌̧ ◌̨ | | \ | ŋ Ŋ | µ — | ’ ‘ | ◌̣ ◌̇ | Shift| Enter| + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | ʒ Ʒ | GUI | Alt |Lefter| | BkSpc| NbSp | |Rghter| | | – ◌̦ | ? | + * `-----------------------------------------------------------------------------------' + */ + [_LEFTER] = LAYOUT_planck_grid( + KC_TRNS, KC_GRV, LSFT(KC_2), RALT(KC_E), RALT(KC_R), RALT(KC_T), RALT(LSFT(KC_1)), LSFT(KC_1), RALT(KC_I), RALT(KC_O), RALT(KC_P), RALT(KC_LBRC), + KC_TRNS, RALT(KC_A),RALT(KC_S), RALT(KC_D), KC_NUHS, RALT(KC_G), RALT(KC_H), RALT(KC_J), RALT(KC_K), RALT(KC_L), RALT(KC_SCLN), RALT(KC_QUOT), + KC_TRNS, KC_TRNS, RALT(KC_X), RALT(KC_EQL), RALT(KC_V), RALT(KC_MINS), RALT(KC_N), RALT(KC_M), RALT(KC_COMM), RALT(KC_DOT), KC_TRNS, KC_TRNS, + RALT(KC_Z),KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RALT(KC_BSPC), RALT(KC_SPC), KC_TRNS, KC_TRNS, RALT(KC_NUBS), RALT(KC_SLSH), LSFT(KC_MINS) +), + +/* Righter + * ,-----------------------------------------------------------------------------------. + * | | Reset| Debug| | | | |WheLft| MUp |WheRgt| MBt2 | WheUp| + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | MBt4 | MBt3 | MBt2 | MBt1 | | | MLeft| MDown|MRight| MBt1 | WheDn| + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | |MUSmod|Mus on|Musoff| | | MBt1 | MBt2 | MBt3 | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | |Rghter|Light-|Light+| | + * `-----------------------------------------------------------------------------------' + */ + [_RIGHTER] = LAYOUT_planck_grid( + KC_TRNS, RESET, DEBUG, KC_NO, KC_NO, KC_NO, KC_NO, KC_WH_L, KC_MS_U, KC_WH_R, KC_BTN2, KC_WH_U, + KC_TRNS, KC_BTN4, KC_BTN3, KC_BTN2, KC_BTN1, KC_NO, KC_NO, KC_MS_L, KC_MS_D, KC_MS_R, KC_BTN1, KC_WH_D, + KC_TRNS, KC_TRNS, MU_MOD, MU_ON, MU_OFF, KC_NO, KC_NO, KC_BTN1, KC_BTN2, KC_BTN3, KC_TRNS, KC_TRNS, + KC_NO, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_NO, KC_NO, KC_TRNS, KC_TRNS, KC_BRID, KC_BRIU, KC_NO +), + +}; + +#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(_RIGHT)) { + 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(_LEFTER); + } else { +#ifdef AUDIO_ENABLE + if (play_sound) { PLAY_SONG(plover_gb_song); } +#endif + layer_off(_LEFTER); + } +#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 _LEFTER: + return false; + default: + return true; + } +} diff --git a/keyboards/planck/keymaps/gitdrik/readme.md b/keyboards/planck/keymaps/gitdrik/readme.md new file mode 100644 index 000000000000..f064565182e1 --- /dev/null +++ b/keyboards/planck/keymaps/gitdrik/readme.md @@ -0,0 +1 @@ +# Finnish SFS 5966 layout by gitdrik 2020. diff --git a/keyboards/planck/keymaps/gitdrik/rules.mk b/keyboards/planck/keymaps/gitdrik/rules.mk new file mode 100644 index 000000000000..67528de9c834 --- /dev/null +++ b/keyboards/planck/keymaps/gitdrik/rules.mk @@ -0,0 +1,3 @@ +SRC += muse.c +MOUSEKEY_ENABLE = yes +AUDIO_ENABLE = yes From 3b1abe0deebfea44d8e00abfa549e6fa10d3bf7a Mon Sep 17 00:00:00 2001 From: QMK Bot Date: Mon, 7 Sep 2020 03:50:14 +0000 Subject: [PATCH 759/930] format code according to conventions [skip ci] --- keyboards/lazydesigners/bolt/via/keymap.c | 86 +++++++++++------------ keyboards/lazydesigners/bolt/via/rules.mk | 4 +- 2 files changed, 45 insertions(+), 45 deletions(-) diff --git a/keyboards/lazydesigners/bolt/via/keymap.c b/keyboards/lazydesigners/bolt/via/keymap.c index 86078dc1e268..a977f9c38f9e 100644 --- a/keyboards/lazydesigners/bolt/via/keymap.c +++ b/keyboards/lazydesigners/bolt/via/keymap.c @@ -1,43 +1,43 @@ -/* Copyright 2020 LAZYDESIGNERS - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public 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_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_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_UP, MO(2), - KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, KC_SPC, MO(1), KC_LEFT, KC_DOWN, KC_RGHT - ), - [1] = LAYOUT( - RESET, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_NO, - KC_INS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, - 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_VOLD, KC_MUTE, KC_VOLU, KC_TRNS, KC_TRNS, KC_NO, KC_NO, KC_NO, KC_NO - ), - [2] = LAYOUT( - 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_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO - ), - [3] = 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, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, - KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, - KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO - ), -}; +/* Copyright 2020 LAZYDESIGNERS + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public 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_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_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_UP, MO(2), + KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, KC_SPC, MO(1), KC_LEFT, KC_DOWN, KC_RGHT + ), + [1] = LAYOUT( + RESET, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_NO, + KC_INS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, + 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_VOLD, KC_MUTE, KC_VOLU, KC_TRNS, KC_TRNS, KC_NO, KC_NO, KC_NO, KC_NO + ), + [2] = LAYOUT( + 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_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO + ), + [3] = 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, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO + ), +}; diff --git a/keyboards/lazydesigners/bolt/via/rules.mk b/keyboards/lazydesigners/bolt/via/rules.mk index a2d6d0a96e85..36b7ba9cbc98 100644 --- a/keyboards/lazydesigners/bolt/via/rules.mk +++ b/keyboards/lazydesigners/bolt/via/rules.mk @@ -1,2 +1,2 @@ -VIA_ENABLE = yes -LTO_ENABLE = yes +VIA_ENABLE = yes +LTO_ENABLE = yes From 6b1c58629fe0284d74a176303d7fad787ebb85a7 Mon Sep 17 00:00:00 2001 From: Vitja Makarov Date: Mon, 7 Sep 2020 07:03:16 +0300 Subject: [PATCH 760/930] [Keyboard] Fix adb_usb/aek layout keypad equal key (#10248) --- keyboards/converter/adb_usb/adb_usb.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/keyboards/converter/adb_usb/adb_usb.h b/keyboards/converter/adb_usb/adb_usb.h index 8691adcc65ea..3db303b039fc 100644 --- a/keyboards/converter/adb_usb/adb_usb.h +++ b/keyboards/converter/adb_usb/adb_usb.h @@ -56,7 +56,7 @@ Ported to QMK by Peter Roe { K38, K39, K3A, K3B, K3C, K3D, K3E, KC_NO, }, \ { KC_NO, K41, KC_NO, K43, KC_NO, K45, KC_NO, K47 }, \ { KC_NO, KC_NO, KC_NO, K4B, K4C, KC_NO, K4E, KC_NO, }, \ - { KC_NO, KC_NO, K52, K53, K54, K55, K56, K57 }, \ + { KC_NO, K51, K52, K53, K54, K55, K56, K57 }, \ { K58, K59, KC_NO, K5B, K5C, KC_NO, KC_NO, KC_NO, }, \ { K60, K61, K62, K63, K64, K65, KC_NO, K67 }, \ { KC_NO, K69, KC_NO, K6B, KC_NO, K6D, KC_NO, K6F }, \ From 088888937a805c29304753a1f211845744d249e8 Mon Sep 17 00:00:00 2001 From: Takeshi ISHII <2170248+mtei@users.noreply.github.com> Date: Mon, 7 Sep 2020 13:15:55 +0900 Subject: [PATCH 761/930] Replace figures in docs/feature_split_keyboard.md (#10242) * Replace figures in feature_split_keyboard.md * fig update * Update docs/feature_split_keyboard.md Co-authored-by: Ryan Co-authored-by: Ryan --- docs/feature_split_keyboard.md | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/docs/feature_split_keyboard.md b/docs/feature_split_keyboard.md index ce470b996470..f054f365b6f2 100644 --- a/docs/feature_split_keyboard.md +++ b/docs/feature_split_keyboard.md @@ -48,11 +48,12 @@ However, USB cables, SATA cables, and even just 4 wires have been known to be us ### Serial Wiring -The 3 wires of the TRS/TRRS cable need to connect GND, VCC, and D0 (aka PDO or pin 3) between the two Pro Micros. +The 3 wires of the TRS/TRRS cable need to connect GND, VCC, and D0/D1/D2/D3 (aka PD0/PD1/PD2/PD3) between the two Pro Micros. ?> Note that the pin used here is actually set by `SOFT_SERIAL_PIN` below. -![serial wiring](https://i.imgur.com/C3D1GAQ.png) +sk-pd0-connection-mono +sk-pd2-connection-mono ### I2C Wiring @@ -60,7 +61,7 @@ The 4 wires of the TRRS cable need to connect GND, VCC, and SCL and SDA (aka PD0 The pull-up resistors may be placed on either half. If you wish to use the halves independently, it is also possible to use 4 resistors and have the pull-ups in both halves. -![I2C wiring](https://i.imgur.com/Hbzhc6E.png) +sk-i2c-connection-mono ## Firmware Configuration From 78d5224a1d89f97c519fd6410216d6cc408f931f Mon Sep 17 00:00:00 2001 From: James Young <18669334+noroadsleft@users.noreply.github.com> Date: Mon, 7 Sep 2020 22:28:18 -0700 Subject: [PATCH 762/930] Remove HD44780 References, Part 3 (#10238) * remove HD44780_ENABLE rules: G-H * remove HD44780_ENABLE config: G-H --- keyboards/flehrad/downbubble/config.h | 28 ------------------- keyboards/flehrad/downbubble/rules.mk | 1 - keyboards/gami_studio/lex60/rules.mk | 1 - keyboards/gingham/config.h | 27 ------------------ keyboards/gingham/rules.mk | 1 - keyboards/gon/nerd60/keymaps/mauin/rules.mk | 1 - keyboards/gon/nerd60/rules.mk | 1 - .../gon/nerdtkl/keymaps/gam3cat/rules.mk | 1 - keyboards/gon/nerdtkl/rules.mk | 1 - keyboards/gray_studio/space65/config.h | 28 ------------------- keyboards/gray_studio/space65/rules.mk | 1 - .../gray_studio/think65/hotswap/rules.mk | 1 - keyboards/gray_studio/think65/solder/rules.mk | 1 - keyboards/grid600/press/rules.mk | 1 - keyboards/halberd/config.h | 28 ------------------- keyboards/halberd/rules.mk | 1 - .../handwired/108key_trackpoint/rules.mk | 1 - keyboards/handwired/412_64/config.h | 27 ------------------ keyboards/handwired/412_64/rules.mk | 3 +- keyboards/handwired/42/rules.mk | 1 - keyboards/handwired/6macro/rules.mk | 1 - keyboards/handwired/aplx2/rules.mk | 1 - keyboards/handwired/aranck/config.h | 28 ------------------- keyboards/handwired/aranck/rules.mk | 1 - keyboards/handwired/bdn9_ble/rules.mk | 1 - keyboards/handwired/cans12er/rules.mk | 1 - keyboards/handwired/chiron/rules.mk | 1 - keyboards/handwired/colorlice/rules.mk | 1 - keyboards/handwired/dactyl_left/config.h | 28 ------------------- keyboards/handwired/dactyl_left/rules.mk | 1 - keyboards/handwired/fc200rt_qmk/rules.mk | 1 - keyboards/handwired/floorboard/config.h | 28 ------------------- keyboards/handwired/floorboard/rules.mk | 1 - keyboards/handwired/hacked_motospeed/config.h | 28 ------------------- keyboards/handwired/hacked_motospeed/rules.mk | 1 - keyboards/handwired/heisenberg/config.h | 28 ------------------- keyboards/handwired/heisenberg/rules.mk | 1 - keyboards/handwired/hnah108/config.h | 27 ------------------ keyboards/handwired/hnah108/rules.mk | 1 - keyboards/handwired/hnah40/config.h | 28 ------------------- keyboards/handwired/hnah40/rules.mk | 1 - keyboards/handwired/hnah40rgb/rules.mk | 1 - keyboards/handwired/jn68m/rules.mk | 1 - .../handwired/jtallbean/split_65/config.h | 28 ------------------- .../handwired/jtallbean/split_65/rules.mk | 1 - .../handwired/mechboards_micropad/config.h | 28 ------------------- .../handwired/mechboards_micropad/rules.mk | 1 - keyboards/handwired/minorca/rules.mk | 1 - keyboards/handwired/novem/rules.mk | 1 - keyboards/handwired/onekey/rules.mk | 1 - keyboards/handwired/owlet60/config.h | 28 ------------------- keyboards/handwired/owlet60/rules.mk | 1 - keyboards/handwired/p1800fl/rules.mk | 1 - keyboards/handwired/p65rgb/rules.mk | 1 - .../handwired/postageboard/mini/rules.mk | 1 - keyboards/handwired/postageboard/r1/rules.mk | 1 - keyboards/handwired/prime_exl/rules.mk | 1 - keyboards/handwired/prime_exl_plus/rules.mk | 1 - keyboards/handwired/sick68/config.h | 28 ------------------- keyboards/handwired/sick68/rules.mk | 1 - keyboards/handwired/slash/rules.mk | 1 - keyboards/handwired/sticc14/config.h | 28 ------------------- keyboards/handwired/sticc14/rules.mk | 1 - keyboards/handwired/symmetry60/rules.mk | 1 - keyboards/handwired/tennie/config.h | 28 ------------------- keyboards/handwired/tennie/rules.mk | 1 - keyboards/handwired/twadlee/tp69/config.h | 28 ------------------- keyboards/handwired/twadlee/tp69/rules.mk | 1 - keyboards/handwired/videowriter/rules.mk | 1 - keyboards/handwired/wulkan/rules.mk | 1 - keyboards/hecomi/alpha/config.h | 28 ------------------- keyboards/hecomi/alpha/rules.mk | 1 - keyboards/hecomi/rules.mk | 1 - keyboards/hineybush/h75_singa/config.h | 28 ------------------- keyboards/hineybush/h75_singa/rules.mk | 1 - keyboards/hineybush/hbcp/rules.mk | 1 - keyboards/hineybush/hineyg80/rules.mk | 1 - keyboards/hineybush/physix/config.h | 28 ------------------- keyboards/hineybush/physix/rules.mk | 1 - keyboards/hineybush/sm68/config.h | 28 ------------------- keyboards/hineybush/sm68/rules.mk | 1 - keyboards/hub16/rules.mk | 1 - 82 files changed, 1 insertion(+), 701 deletions(-) diff --git a/keyboards/flehrad/downbubble/config.h b/keyboards/flehrad/downbubble/config.h index f2628cb706e1..04fbc4a0dd6d 100644 --- a/keyboards/flehrad/downbubble/config.h +++ b/keyboards/flehrad/downbubble/config.h @@ -207,34 +207,6 @@ 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 -/* - * 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/flehrad/downbubble/rules.mk b/keyboards/flehrad/downbubble/rules.mk index 189b82720e29..39fa656c614e 100644 --- a/keyboards/flehrad/downbubble/rules.mk +++ b/keyboards/flehrad/downbubble/rules.mk @@ -30,4 +30,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 -HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) diff --git a/keyboards/gami_studio/lex60/rules.mk b/keyboards/gami_studio/lex60/rules.mk index 3b7f4dbd51eb..84bbccfba1fc 100644 --- a/keyboards/gami_studio/lex60/rules.mk +++ b/keyboards/gami_studio/lex60/rules.mk @@ -29,4 +29,3 @@ 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/gingham/config.h b/keyboards/gingham/config.h index 653c0f627953..0c4d4c97a97f 100644 --- a/keyboards/gingham/config.h +++ b/keyboards/gingham/config.h @@ -213,30 +213,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 -/* - * 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 -*/ diff --git a/keyboards/gingham/rules.mk b/keyboards/gingham/rules.mk index e1046c017bb6..c4e36e877818 100644 --- a/keyboards/gingham/rules.mk +++ b/keyboards/gingham/rules.mk @@ -33,6 +33,5 @@ UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = 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 = lite diff --git a/keyboards/gon/nerd60/keymaps/mauin/rules.mk b/keyboards/gon/nerd60/keymaps/mauin/rules.mk index 625fc9c0292e..6094ff6603e7 100644 --- a/keyboards/gon/nerd60/keymaps/mauin/rules.mk +++ b/keyboards/gon/nerd60/keymaps/mauin/rules.mk @@ -17,4 +17,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 -HD44780_ENABLE = no # Enable support for HD44780 based LCDs diff --git a/keyboards/gon/nerd60/rules.mk b/keyboards/gon/nerd60/rules.mk index 8446dd39ca94..74fd4fcc3262 100644 --- a/keyboards/gon/nerd60/rules.mk +++ b/keyboards/gon/nerd60/rules.mk @@ -33,4 +33,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 -HD44780_ENABLE = no # Enable support for HD44780 based LCDs diff --git a/keyboards/gon/nerdtkl/keymaps/gam3cat/rules.mk b/keyboards/gon/nerdtkl/keymaps/gam3cat/rules.mk index 65c2a5d62246..e827f5072349 100644 --- a/keyboards/gon/nerdtkl/keymaps/gam3cat/rules.mk +++ b/keyboards/gon/nerdtkl/keymaps/gam3cat/rules.mk @@ -18,7 +18,6 @@ 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 diff --git a/keyboards/gon/nerdtkl/rules.mk b/keyboards/gon/nerdtkl/rules.mk index 8446dd39ca94..74fd4fcc3262 100644 --- a/keyboards/gon/nerdtkl/rules.mk +++ b/keyboards/gon/nerdtkl/rules.mk @@ -33,4 +33,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 -HD44780_ENABLE = no # Enable support for HD44780 based LCDs diff --git a/keyboards/gray_studio/space65/config.h b/keyboards/gray_studio/space65/config.h index 0485afca40cb..2e3928e695d8 100644 --- a/keyboards/gray_studio/space65/config.h +++ b/keyboards/gray_studio/space65/config.h @@ -211,34 +211,6 @@ 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 -/* - * 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/gray_studio/space65/rules.mk b/keyboards/gray_studio/space65/rules.mk index 887d870a6814..b882a3a19ad4 100644 --- a/keyboards/gray_studio/space65/rules.mk +++ b/keyboards/gray_studio/space65/rules.mk @@ -30,6 +30,5 @@ UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = 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 = 65_ansi_blocker 65_iso_blocker diff --git a/keyboards/gray_studio/think65/hotswap/rules.mk b/keyboards/gray_studio/think65/hotswap/rules.mk index 5f85ff18adfb..dac30fa9fbed 100644 --- a/keyboards/gray_studio/think65/hotswap/rules.mk +++ b/keyboards/gray_studio/think65/hotswap/rules.mk @@ -30,7 +30,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 LTO_ENABLE = yes diff --git a/keyboards/gray_studio/think65/solder/rules.mk b/keyboards/gray_studio/think65/solder/rules.mk index 5f85ff18adfb..dac30fa9fbed 100644 --- a/keyboards/gray_studio/think65/solder/rules.mk +++ b/keyboards/gray_studio/think65/solder/rules.mk @@ -30,7 +30,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 LTO_ENABLE = yes diff --git a/keyboards/grid600/press/rules.mk b/keyboards/grid600/press/rules.mk index 2d9a649e0f50..17c51ec37caf 100644 --- a/keyboards/grid600/press/rules.mk +++ b/keyboards/grid600/press/rules.mk @@ -30,4 +30,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 -HD44780_ENABLE = no # Enable support for HD44780 based LCDs diff --git a/keyboards/halberd/config.h b/keyboards/halberd/config.h index 57e29e858e5a..746375b70ef9 100644 --- a/keyboards/halberd/config.h +++ b/keyboards/halberd/config.h @@ -188,34 +188,6 @@ 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 -/* - * 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/halberd/rules.mk b/keyboards/halberd/rules.mk index 145d1f3229d4..28e6adcc23fd 100644 --- a/keyboards/halberd/rules.mk +++ b/keyboards/halberd/rules.mk @@ -30,4 +30,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 -HD44780_ENABLE = no # Enable support for HD44780 based LCDs diff --git a/keyboards/handwired/108key_trackpoint/rules.mk b/keyboards/handwired/108key_trackpoint/rules.mk index 2a8ed6af15c4..848c79fe34d8 100644 --- a/keyboards/handwired/108key_trackpoint/rules.mk +++ b/keyboards/handwired/108key_trackpoint/rules.mk @@ -30,6 +30,5 @@ UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches -HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) PS2_MOUSE_ENABLE = yes PS2_USE_USART = yes diff --git a/keyboards/handwired/412_64/config.h b/keyboards/handwired/412_64/config.h index cce38f3e68f8..4acda46fd476 100644 --- a/keyboards/handwired/412_64/config.h +++ b/keyboards/handwired/412_64/config.h @@ -165,30 +165,3 @@ /* 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 -*/ diff --git a/keyboards/handwired/412_64/rules.mk b/keyboards/handwired/412_64/rules.mk index c7dfa8705b7e..de611b460e59 100644 --- a/keyboards/handwired/412_64/rules.mk +++ b/keyboards/handwired/412_64/rules.mk @@ -29,6 +29,5 @@ UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # 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 = ortho_4x16 +LAYOUTS = ortho_4x16 diff --git a/keyboards/handwired/42/rules.mk b/keyboards/handwired/42/rules.mk index f2306f310fc1..183d4db0c338 100644 --- a/keyboards/handwired/42/rules.mk +++ b/keyboards/handwired/42/rules.mk @@ -31,7 +31,6 @@ RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow MIDI_ENABLE = no # MIDI support AUDIO_ENABLE = 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 UNICODEMAP_ENABLE = no # ^^ diff --git a/keyboards/handwired/6macro/rules.mk b/keyboards/handwired/6macro/rules.mk index 13760ae0664d..9add0e5a5062 100644 --- a/keyboards/handwired/6macro/rules.mk +++ b/keyboards/handwired/6macro/rules.mk @@ -31,4 +31,3 @@ 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) diff --git a/keyboards/handwired/aplx2/rules.mk b/keyboards/handwired/aplx2/rules.mk index af9df6087f33..38c15fafe53b 100644 --- a/keyboards/handwired/aplx2/rules.mk +++ b/keyboards/handwired/aplx2/rules.mk @@ -29,5 +29,4 @@ 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 diff --git a/keyboards/handwired/aranck/config.h b/keyboards/handwired/aranck/config.h index 0de56cc3b6fe..f07f20738ce0 100644 --- a/keyboards/handwired/aranck/config.h +++ b/keyboards/handwired/aranck/config.h @@ -229,34 +229,6 @@ 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 -/* - * 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/aranck/rules.mk b/keyboards/handwired/aranck/rules.mk index a6809de9d46a..b41c39374a04 100644 --- a/keyboards/handwired/aranck/rules.mk +++ b/keyboards/handwired/aranck/rules.mk @@ -30,6 +30,5 @@ 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 \ No newline at end of file diff --git a/keyboards/handwired/bdn9_ble/rules.mk b/keyboards/handwired/bdn9_ble/rules.mk index 4fabf1c89d0a..48cc9d5f0b18 100644 --- a/keyboards/handwired/bdn9_ble/rules.mk +++ b/keyboards/handwired/bdn9_ble/rules.mk @@ -33,5 +33,4 @@ UNICODE_ENABLE = no # Unicode BLUETOOTH = AdafruitBLE # Enable Bluetooth AUDIO_ENABLE = 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 = no diff --git a/keyboards/handwired/cans12er/rules.mk b/keyboards/handwired/cans12er/rules.mk index c6675b6153ce..84bb4e82d110 100644 --- a/keyboards/handwired/cans12er/rules.mk +++ b/keyboards/handwired/cans12er/rules.mk @@ -29,4 +29,3 @@ 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 \ No newline at end of file diff --git a/keyboards/handwired/chiron/rules.mk b/keyboards/handwired/chiron/rules.mk index 96f64227004e..85aff72cb1bf 100644 --- a/keyboards/handwired/chiron/rules.mk +++ b/keyboards/handwired/chiron/rules.mk @@ -24,7 +24,6 @@ CONSOLE_ENABLE = no DEBUG_ENABLE = no EXTRAKEY_ENABLE = no FAUXCLICKY_ENABLE = no -HD44780_ENABLE = no LEADER_ENABLE = no MIDI_ENABLE = no MOUSEKEY_ENABLE = yes diff --git a/keyboards/handwired/colorlice/rules.mk b/keyboards/handwired/colorlice/rules.mk index 02da465d3e3a..f41304b2aa8c 100644 --- a/keyboards/handwired/colorlice/rules.mk +++ b/keyboards/handwired/colorlice/rules.mk @@ -29,7 +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 -HD44780_ENABLE = no # Enable support for HD44780 based LCDs LTO_ENABLE = no # Use link time optimization RGB_MATRIX_ENABLE = WS2812 # Enable keyboard RGB backlight functionality with ws2812 driver RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow diff --git a/keyboards/handwired/dactyl_left/config.h b/keyboards/handwired/dactyl_left/config.h index 43c0d3d43fcd..e3924b96a151 100644 --- a/keyboards/handwired/dactyl_left/config.h +++ b/keyboards/handwired/dactyl_left/config.h @@ -218,34 +218,6 @@ 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 -/* - * 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/dactyl_left/rules.mk b/keyboards/handwired/dactyl_left/rules.mk index 1ea1de18da1d..f29d5333c324 100644 --- a/keyboards/handwired/dactyl_left/rules.mk +++ b/keyboards/handwired/dactyl_left/rules.mk @@ -30,4 +30,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 -HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) diff --git a/keyboards/handwired/fc200rt_qmk/rules.mk b/keyboards/handwired/fc200rt_qmk/rules.mk index 8ef9dbd6c382..5e832358bbee 100644 --- a/keyboards/handwired/fc200rt_qmk/rules.mk +++ b/keyboards/handwired/fc200rt_qmk/rules.mk @@ -29,4 +29,3 @@ 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/floorboard/config.h b/keyboards/handwired/floorboard/config.h index bf8646f39af3..12ab4387f1e3 100644 --- a/keyboards/handwired/floorboard/config.h +++ b/keyboards/handwired/floorboard/config.h @@ -218,34 +218,6 @@ 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 -/* - * 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/floorboard/rules.mk b/keyboards/handwired/floorboard/rules.mk index 16f3332aaa82..5a83cfcf9645 100644 --- a/keyboards/handwired/floorboard/rules.mk +++ b/keyboards/handwired/floorboard/rules.mk @@ -19,5 +19,4 @@ 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 diff --git a/keyboards/handwired/hacked_motospeed/config.h b/keyboards/handwired/hacked_motospeed/config.h index 0035a5e282b3..eba87164f269 100644 --- a/keyboards/handwired/hacked_motospeed/config.h +++ b/keyboards/handwired/hacked_motospeed/config.h @@ -215,34 +215,6 @@ 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 -/* - * 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/hacked_motospeed/rules.mk b/keyboards/handwired/hacked_motospeed/rules.mk index 7cb9e914ec23..291da87cfd79 100644 --- a/keyboards/handwired/hacked_motospeed/rules.mk +++ b/keyboards/handwired/hacked_motospeed/rules.mk @@ -30,6 +30,5 @@ UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # 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_USB_STARTUP_CHECK = yes # Disable initialization only when usb is plugged in BLUETOOTH = RN42 diff --git a/keyboards/handwired/heisenberg/config.h b/keyboards/handwired/heisenberg/config.h index 9fe57cbeba55..34458b492e18 100644 --- a/keyboards/handwired/heisenberg/config.h +++ b/keyboards/handwired/heisenberg/config.h @@ -229,34 +229,6 @@ 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 -/* - * 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/rules.mk b/keyboards/handwired/heisenberg/rules.mk index 2fd710029c05..10046d710286 100644 --- a/keyboards/handwired/heisenberg/rules.mk +++ b/keyboards/handwired/heisenberg/rules.mk @@ -30,6 +30,5 @@ 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 diff --git a/keyboards/handwired/hnah108/config.h b/keyboards/handwired/hnah108/config.h index b2d84e3e38aa..a0c20706b038 100644 --- a/keyboards/handwired/hnah108/config.h +++ b/keyboards/handwired/hnah108/config.h @@ -216,30 +216,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 -/* - * 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 -*/ diff --git a/keyboards/handwired/hnah108/rules.mk b/keyboards/handwired/hnah108/rules.mk index 8e486c594b2d..fa28a1cceaf2 100644 --- a/keyboards/handwired/hnah108/rules.mk +++ b/keyboards/handwired/hnah108/rules.mk @@ -30,6 +30,5 @@ UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches -HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) ENCODER_ENABLE = yes RGB_MATRIX_ENABLE = WS2812 diff --git a/keyboards/handwired/hnah40/config.h b/keyboards/handwired/hnah40/config.h index 9583c4c38ee9..6138d2e3ea9c 100644 --- a/keyboards/handwired/hnah40/config.h +++ b/keyboards/handwired/hnah40/config.h @@ -192,31 +192,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 -/* - * 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 -*/ - diff --git a/keyboards/handwired/hnah40/rules.mk b/keyboards/handwired/hnah40/rules.mk index 0df52f7de63f..39d9374de23d 100644 --- a/keyboards/handwired/hnah40/rules.mk +++ b/keyboards/handwired/hnah40/rules.mk @@ -30,4 +30,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 -HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) diff --git a/keyboards/handwired/hnah40rgb/rules.mk b/keyboards/handwired/hnah40rgb/rules.mk index 5ad9f40c30a6..658a74d14e15 100644 --- a/keyboards/handwired/hnah40rgb/rules.mk +++ b/keyboards/handwired/hnah40rgb/rules.mk @@ -29,5 +29,4 @@ UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = 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 \ No newline at end of file diff --git a/keyboards/handwired/jn68m/rules.mk b/keyboards/handwired/jn68m/rules.mk index 80b59d628d97..f07380121a08 100644 --- a/keyboards/handwired/jn68m/rules.mk +++ b/keyboards/handwired/jn68m/rules.mk @@ -30,4 +30,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 -HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) diff --git a/keyboards/handwired/jtallbean/split_65/config.h b/keyboards/handwired/jtallbean/split_65/config.h index 5c7a9d54ba01..06c569f9f275 100644 --- a/keyboards/handwired/jtallbean/split_65/config.h +++ b/keyboards/handwired/jtallbean/split_65/config.h @@ -221,34 +221,6 @@ 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 -/* - * 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/jtallbean/split_65/rules.mk b/keyboards/handwired/jtallbean/split_65/rules.mk index d868f5e77f7b..7f96d78328cd 100644 --- a/keyboards/handwired/jtallbean/split_65/rules.mk +++ b/keyboards/handwired/jtallbean/split_65/rules.mk @@ -29,5 +29,4 @@ 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 # Enable split keyboard support diff --git a/keyboards/handwired/mechboards_micropad/config.h b/keyboards/handwired/mechboards_micropad/config.h index 8f237a64a14f..30775ac8f6d7 100644 --- a/keyboards/handwired/mechboards_micropad/config.h +++ b/keyboards/handwired/mechboards_micropad/config.h @@ -212,34 +212,6 @@ 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 -/* - * 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/mechboards_micropad/rules.mk b/keyboards/handwired/mechboards_micropad/rules.mk index a61b3b3d834f..01cefabcc634 100644 --- a/keyboards/handwired/mechboards_micropad/rules.mk +++ b/keyboards/handwired/mechboards_micropad/rules.mk @@ -30,4 +30,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 -HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) diff --git a/keyboards/handwired/minorca/rules.mk b/keyboards/handwired/minorca/rules.mk index 195749ceb3fc..e9e9fc84ba36 100644 --- a/keyboards/handwired/minorca/rules.mk +++ b/keyboards/handwired/minorca/rules.mk @@ -29,5 +29,4 @@ 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 diff --git a/keyboards/handwired/novem/rules.mk b/keyboards/handwired/novem/rules.mk index 3891651f3b02..e7acaabf8e0e 100644 --- a/keyboards/handwired/novem/rules.mk +++ b/keyboards/handwired/novem/rules.mk @@ -29,4 +29,3 @@ 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/onekey/rules.mk b/keyboards/handwired/onekey/rules.mk index 8ed255768383..968e338e211d 100644 --- a/keyboards/handwired/onekey/rules.mk +++ b/keyboards/handwired/onekey/rules.mk @@ -17,7 +17,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 (+400) DEFAULT_FOLDER = handwired/onekey/promicro LAYOUTS = ortho_1x1 diff --git a/keyboards/handwired/owlet60/config.h b/keyboards/handwired/owlet60/config.h index 29fd0b1e5739..0bcc8f20e23c 100644 --- a/keyboards/handwired/owlet60/config.h +++ b/keyboards/handwired/owlet60/config.h @@ -217,34 +217,6 @@ 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 -/* - * 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/owlet60/rules.mk b/keyboards/handwired/owlet60/rules.mk index 6c81dad09ce8..c3c94c91daaa 100644 --- a/keyboards/handwired/owlet60/rules.mk +++ b/keyboards/handwired/owlet60/rules.mk @@ -30,7 +30,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 (+400) CUSTOM_MATRIX = yes OLED_DRIVER_ENABLE = no diff --git a/keyboards/handwired/p1800fl/rules.mk b/keyboards/handwired/p1800fl/rules.mk index b8601f0f1055..60ec4f699c06 100644 --- a/keyboards/handwired/p1800fl/rules.mk +++ b/keyboards/handwired/p1800fl/rules.mk @@ -29,4 +29,3 @@ 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/p65rgb/rules.mk b/keyboards/handwired/p65rgb/rules.mk index 297aa1cd77a5..5eeaf976c3dd 100644 --- a/keyboards/handwired/p65rgb/rules.mk +++ b/keyboards/handwired/p65rgb/rules.mk @@ -30,4 +30,3 @@ 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/postageboard/mini/rules.mk b/keyboards/handwired/postageboard/mini/rules.mk index 96e8e574cfd8..bd7866ecf14b 100644 --- a/keyboards/handwired/postageboard/mini/rules.mk +++ b/keyboards/handwired/postageboard/mini/rules.mk @@ -26,4 +26,3 @@ 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/postageboard/r1/rules.mk b/keyboards/handwired/postageboard/r1/rules.mk index 96e8e574cfd8..bd7866ecf14b 100644 --- a/keyboards/handwired/postageboard/r1/rules.mk +++ b/keyboards/handwired/postageboard/r1/rules.mk @@ -26,4 +26,3 @@ 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/prime_exl/rules.mk b/keyboards/handwired/prime_exl/rules.mk index d7aca43dfc90..a535e2e8c44b 100644 --- a/keyboards/handwired/prime_exl/rules.mk +++ b/keyboards/handwired/prime_exl/rules.mk @@ -30,4 +30,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 -HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) diff --git a/keyboards/handwired/prime_exl_plus/rules.mk b/keyboards/handwired/prime_exl_plus/rules.mk index c0493d993c77..53e9616cc8d5 100644 --- a/keyboards/handwired/prime_exl_plus/rules.mk +++ b/keyboards/handwired/prime_exl_plus/rules.mk @@ -30,4 +30,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 -HD44780_ENABLE = no # Enable support for HD44780 based LCDs diff --git a/keyboards/handwired/sick68/config.h b/keyboards/handwired/sick68/config.h index 9f050c361e90..c61eb7eafd1c 100644 --- a/keyboards/handwired/sick68/config.h +++ b/keyboards/handwired/sick68/config.h @@ -220,34 +220,6 @@ 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 -/* - * 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/sick68/rules.mk b/keyboards/handwired/sick68/rules.mk index f90c4cf21e35..fa2740ae6562 100644 --- a/keyboards/handwired/sick68/rules.mk +++ b/keyboards/handwired/sick68/rules.mk @@ -29,6 +29,5 @@ 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 = 65_ansi diff --git a/keyboards/handwired/slash/rules.mk b/keyboards/handwired/slash/rules.mk index 092115db1273..5c2cc5d97998 100644 --- a/keyboards/handwired/slash/rules.mk +++ b/keyboards/handwired/slash/rules.mk @@ -34,4 +34,3 @@ UNICODE_ENABLE = no # Unicode BLUETOOTH = AdafruitBLE AUDIO_ENABLE = 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/sticc14/config.h b/keyboards/handwired/sticc14/config.h index 22011f07889a..30516477d6a0 100644 --- a/keyboards/handwired/sticc14/config.h +++ b/keyboards/handwired/sticc14/config.h @@ -216,34 +216,6 @@ 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 -/* - * 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/sticc14/rules.mk b/keyboards/handwired/sticc14/rules.mk index 7b326cc31948..99931790cebc 100644 --- a/keyboards/handwired/sticc14/rules.mk +++ b/keyboards/handwired/sticc14/rules.mk @@ -29,4 +29,3 @@ 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/symmetry60/rules.mk b/keyboards/handwired/symmetry60/rules.mk index 6830cc690553..c7ec2f8d0ff9 100644 --- a/keyboards/handwired/symmetry60/rules.mk +++ b/keyboards/handwired/symmetry60/rules.mk @@ -30,7 +30,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 LTO_ENABLE = yes # Use link time optimization LAYOUTS = ortho_5x14 diff --git a/keyboards/handwired/tennie/config.h b/keyboards/handwired/tennie/config.h index d26cb4c616fe..ca92c8e8c8e0 100644 --- a/keyboards/handwired/tennie/config.h +++ b/keyboards/handwired/tennie/config.h @@ -207,34 +207,6 @@ 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 -/* - * 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/tennie/rules.mk b/keyboards/handwired/tennie/rules.mk index b41b736a71a3..a404294f1330 100644 --- a/keyboards/handwired/tennie/rules.mk +++ b/keyboards/handwired/tennie/rules.mk @@ -30,4 +30,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 -HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) diff --git a/keyboards/handwired/twadlee/tp69/config.h b/keyboards/handwired/twadlee/tp69/config.h index 4da7d2560337..d6f28bdc1e2e 100644 --- a/keyboards/handwired/twadlee/tp69/config.h +++ b/keyboards/handwired/twadlee/tp69/config.h @@ -220,34 +220,6 @@ 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 -/* - * 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/twadlee/tp69/rules.mk b/keyboards/handwired/twadlee/tp69/rules.mk index 967060802b1f..ec1da36328d9 100644 --- a/keyboards/handwired/twadlee/tp69/rules.mk +++ b/keyboards/handwired/twadlee/tp69/rules.mk @@ -19,7 +19,6 @@ 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 PS2_MOUSE_ENABLE = no USE_CHIBIOS_CONTRIB = yes diff --git a/keyboards/handwired/videowriter/rules.mk b/keyboards/handwired/videowriter/rules.mk index 7b326cc31948..99931790cebc 100644 --- a/keyboards/handwired/videowriter/rules.mk +++ b/keyboards/handwired/videowriter/rules.mk @@ -29,4 +29,3 @@ 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/wulkan/rules.mk b/keyboards/handwired/wulkan/rules.mk index f432c7d67363..25bb402698ce 100644 --- a/keyboards/handwired/wulkan/rules.mk +++ b/keyboards/handwired/wulkan/rules.mk @@ -18,6 +18,5 @@ 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 FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches -HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) NO_SUSPEND_POWER_DOWN = yes UNICODEMAP_ENABLE = no diff --git a/keyboards/hecomi/alpha/config.h b/keyboards/hecomi/alpha/config.h index 3600eb717df0..741fdd5cadc0 100644 --- a/keyboards/hecomi/alpha/config.h +++ b/keyboards/hecomi/alpha/config.h @@ -207,34 +207,6 @@ 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 -/* - * 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/hecomi/alpha/rules.mk b/keyboards/hecomi/alpha/rules.mk index 0f0b632b1d2d..12b5a001b30d 100644 --- a/keyboards/hecomi/alpha/rules.mk +++ b/keyboards/hecomi/alpha/rules.mk @@ -30,5 +30,4 @@ UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = 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 diff --git a/keyboards/hecomi/rules.mk b/keyboards/hecomi/rules.mk index ad2178e9ebd3..c23c51a599b1 100644 --- a/keyboards/hecomi/rules.mk +++ b/keyboards/hecomi/rules.mk @@ -30,7 +30,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 SPLIT_KEYBOARD = yes DEFAULT_FOLDER = hecomi/alpha diff --git a/keyboards/hineybush/h75_singa/config.h b/keyboards/hineybush/h75_singa/config.h index 82222e29c3b4..187fc791f001 100644 --- a/keyboards/hineybush/h75_singa/config.h +++ b/keyboards/hineybush/h75_singa/config.h @@ -212,34 +212,6 @@ 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 -/* - * 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/rules.mk b/keyboards/hineybush/h75_singa/rules.mk index 92ad960cb938..d676e0f708b0 100644 --- a/keyboards/hineybush/h75_singa/rules.mk +++ b/keyboards/hineybush/h75_singa/rules.mk @@ -29,4 +29,3 @@ 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/hineybush/hbcp/rules.mk b/keyboards/hineybush/hbcp/rules.mk index 1e973bc858e0..e186b39cfa9d 100644 --- a/keyboards/hineybush/hbcp/rules.mk +++ b/keyboards/hineybush/hbcp/rules.mk @@ -30,6 +30,5 @@ UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = 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 = lite SRC += matrix.c diff --git a/keyboards/hineybush/hineyg80/rules.mk b/keyboards/hineybush/hineyg80/rules.mk index 1aa3379312d2..77d0f1ec16d8 100644 --- a/keyboards/hineybush/hineyg80/rules.mk +++ b/keyboards/hineybush/hineyg80/rules.mk @@ -30,4 +30,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 -HD44780_ENABLE = no # Enable support for HD44780 based LCDs diff --git a/keyboards/hineybush/physix/config.h b/keyboards/hineybush/physix/config.h index ccdb18fd2121..d705efefa45e 100644 --- a/keyboards/hineybush/physix/config.h +++ b/keyboards/hineybush/physix/config.h @@ -218,34 +218,6 @@ 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 -/* - * 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/rules.mk b/keyboards/hineybush/physix/rules.mk index 010cb024d0dd..20b1e9e5d1c6 100644 --- a/keyboards/hineybush/physix/rules.mk +++ b/keyboards/hineybush/physix/rules.mk @@ -29,4 +29,3 @@ 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/hineybush/sm68/config.h b/keyboards/hineybush/sm68/config.h index f41f5bc2d529..cdb22aee7b9a 100644 --- a/keyboards/hineybush/sm68/config.h +++ b/keyboards/hineybush/sm68/config.h @@ -208,34 +208,6 @@ 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 -/* - * 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/sm68/rules.mk b/keyboards/hineybush/sm68/rules.mk index 28e24020af0c..a7e841a7c13b 100644 --- a/keyboards/hineybush/sm68/rules.mk +++ b/keyboards/hineybush/sm68/rules.mk @@ -29,4 +29,3 @@ 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/hub16/rules.mk b/keyboards/hub16/rules.mk index ad1e238604df..b050dcf4214a 100755 --- a/keyboards/hub16/rules.mk +++ b/keyboards/hub16/rules.mk @@ -31,7 +31,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 ENCODER_ENABLE = yes # Rotary Encoder support TAP_DANCE_ENABLE = yes # Support for tap dancing From ae7a076964deeddcd192a25f15256e6cd28b5a41 Mon Sep 17 00:00:00 2001 From: marksard <38324387+marksard@users.noreply.github.com> Date: Tue, 8 Sep 2020 14:37:15 +0900 Subject: [PATCH 763/930] Update marksard/leftover30 info.json (#10240) * 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 * Updated leftover30 info.json file --- keyboards/marksard/leftover30/info.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/keyboards/marksard/leftover30/info.json b/keyboards/marksard/leftover30/info.json index 700d08d9d3c0..4321527c168e 100644 --- a/keyboards/marksard/leftover30/info.json +++ b/keyboards/marksard/leftover30/info.json @@ -5,7 +5,7 @@ "width": 11.5, "height": 4, "layouts": { - "LAYOUT": { + "LAYOUT_all": { "layout": [ { "label": "Q", From 4e3a96ff3e14f74eb8e895959868e3b6578af7fe Mon Sep 17 00:00:00 2001 From: marksard <38324387+marksard@users.noreply.github.com> Date: Tue, 8 Sep 2020 15:00:19 +0900 Subject: [PATCH 764/930] Update treadstone48/rev2 info.json (#10241) * 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 * Updated treadstone48 info.json file * remove kc define * Nested layout macro 1/2 * Nested layout macro 2/2 --- keyboards/treadstone48/rev1/rev1.h | 178 ++++----- keyboards/treadstone48/rev2/info.json | 516 +++++++++++++------------- 2 files changed, 349 insertions(+), 345 deletions(-) diff --git a/keyboards/treadstone48/rev1/rev1.h b/keyboards/treadstone48/rev1/rev1.h index 9a66d855d884..753479642220 100644 --- a/keyboards/treadstone48/rev1/rev1.h +++ b/keyboards/treadstone48/rev1/rev1.h @@ -66,26 +66,24 @@ L20, L21, L22, L23, L24, L25, L60, L61, L62, L63, L64, L65, \ L30, L31, L32, L33, L34, L35, L70, L71, L72, L73, L74, L75 \ ) \ - LAYOUT_full( \ - L00, L01, L02, L03, L04, L05, L40, L41, L42, L43, L44, L45, K_N, K_N, K_N, K_N, K_N, K_N, K_N, K_N, K_N, K_N, K_N, K_N, \ - L10, L11, L12, L13, L14, L15, L50, L51, L52, L53, L54, L55, K_N, K_N, K_N, K_N, K_N, K_N, K_N, K_N, K_N, K_N, K_N, K_N, \ - L20, L21, L22, L23, L24, L25, L60, L61, L62, L63, L64, L65, K_N, K_N, K_N, K_N, K_N, K_N, K_N, K_N, K_N, K_N, K_N, K_N, \ - L30, L31, L32, L33, L34, L35, L70, L71, L72, L73, L74, L75, K_N, K_N, K_N, K_N, K_N, K_N, K_N, K_N, K_N, K_N, K_N, K_N \ - ) - -// Used to create a keymap using only KC_ prefixed keys -#define LAYOUT_base_kc( \ - L00, L01, L02, L03, L04, L05, L40, L41, L42, L43, L44, L45, \ - L10, L11, L12, L13, L14, L15, L50, L51, L52, L53, L54, L55, \ - L20, L21, L22, L23, L24, L25, L60, L61, L62, L63, L64, L65, \ - L30, L31, L32, L33, L34, L35, L70, L71, L72, L73, L74, L75 \ - ) \ - LAYOUT_base( \ - KC_##L00, KC_##L01, KC_##L02, KC_##L03, KC_##L04, KC_##L05, KC_##L40, KC_##L41, KC_##L42, KC_##L43, KC_##L44, KC_##L45, \ - KC_##L10, KC_##L11, KC_##L12, KC_##L13, KC_##L14, KC_##L15, KC_##L50, KC_##L51, KC_##L52, KC_##L53, KC_##L54, KC_##L55, \ - KC_##L20, KC_##L21, KC_##L22, KC_##L23, KC_##L24, KC_##L25, KC_##L60, KC_##L61, KC_##L62, KC_##L63, KC_##L64, KC_##L65, \ - KC_##L30, KC_##L31, KC_##L32, KC_##L33, KC_##L34, KC_##L35, KC_##L70, KC_##L71, KC_##L72, KC_##L73, KC_##L74, KC_##L75 \ - ) + { \ + { L45, L44, L43, L42, L41, L40 }, \ + { L55, L54, L53, L52, L51, L50 }, \ + { L65, L64, L63, L62, L61, L60 }, \ + { L75, L74, L73, L72, L71, L70 }, \ + { L05, L04, L03, L02, L01, L00 }, \ + { L15, L14, L13, L12, L11, L10 }, \ + { L25, L24, L23, L22, L21, L20 }, \ + { L35, L34, L33, L32, L31, L30 }, \ + { K_N, K_N, K_N, K_N, K_N, K_N }, \ + { K_N, K_N, K_N, K_N, K_N, K_N }, \ + { K_N, K_N, K_N, K_N, K_N, K_N }, \ + { K_N, K_N, K_N, K_N, K_N, K_N }, \ + { K_N, K_N, K_N, K_N, K_N, K_N }, \ + { K_N, K_N, K_N, K_N, K_N, K_N }, \ + { K_N, K_N, K_N, K_N, K_N, K_N }, \ + { K_N, K_N, K_N, K_N, K_N, K_N }, \ + } ////////////////////////////////////////////////////////////////////////////// @@ -99,12 +97,24 @@ L20, L21, L22, L23, L24, L25, L60, L61, L62, L63, L64, L65, R60, R61, R62, R63, R64, \ L30, L31, L32, L33, L34, L35, L70, L71, L72, L73, L74, R70, R71, R72, R73, R74, L75 \ ) \ - LAYOUT_full( \ - L00, L01, L02, L03, L04, L05, L40, L41, L42, L43, L44, L45, K_N, K_N, K_N, K_N, K_N, K_N, K_N, R44, R43, R42, R41, R40, \ - L10, L11, L12, L13, L14, L15, L50, L51, L52, L53, L54, L55, K_N, K_N, K_N, K_N, K_N, K_N, K_N, R54, R53, R52, R51, R50, \ - L20, L21, L22, L23, L24, L25, L60, L61, L62, L63, L64, L65, K_N, K_N, K_N, K_N, K_N, K_N, K_N, R64, R63, R62, R61, R60, \ - L30, L31, L32, L33, L34, L35, L70, L71, L72, L73, L74, L75, K_N, K_N, K_N, K_N, K_N, K_N, K_N, R74, R73, R72, R71, R70 \ - ) + { \ + { L45, L44, L43, L42, L41, L40 }, \ + { L55, L54, L53, L52, L51, L50 }, \ + { L65, L64, L63, L62, L61, L60 }, \ + { L75, L74, L73, L72, L71, L70 }, \ + { L05, L04, L03, L02, L01, L00 }, \ + { L15, L14, L13, L12, L11, L10 }, \ + { L25, L24, L23, L22, L21, L20 }, \ + { L35, L34, L33, L32, L31, L30 }, \ + { R40, R41, R42, R43, R44, K_N }, \ + { R50, R51, R52, R53, R54, K_N }, \ + { R60, R61, R62, R63, R64, K_N }, \ + { R70, R71, R72, R73, R74, K_N }, \ + { K_N, K_N, K_N, K_N, K_N, K_N }, \ + { K_N, K_N, K_N, K_N, K_N, K_N }, \ + { K_N, K_N, K_N, K_N, K_N, K_N }, \ + { K_N, K_N, K_N, K_N, K_N, K_N }, \ + } // When use right hand side of the Rhymestone. #ifdef RHYMESTONE_RIGHTHAND @@ -115,27 +125,25 @@ L20, L21, L22, L23, L24, L25, L60, L61, L62, L63, L64, L65, R60, R61, R62, R63, R64, \ L30, L31, L32, L33, L34, L35, L70, L71, L72, L73, L74, R70, R71, R72, R73, R74, L75 \ ) \ - LAYOUT_full( \ - L00, L01, L02, L03, L04, L05, L40, L41, L42, L43, L44, L45, K_N, K_N, K_N, K_N, K_N, K_N, K_N, R40, R41, R42, R43, R44, \ - L10, L11, L12, L13, L14, L15, L50, L51, L52, L53, L54, L55, K_N, K_N, K_N, K_N, K_N, K_N, K_N, R50, R51, R52, R53, R54, \ - L20, L21, L22, L23, L24, L25, L60, L61, L62, L63, L64, L65, K_N, K_N, K_N, K_N, K_N, K_N, K_N, R60, R61, R62, R63, R64, \ - L30, L31, L32, L33, L34, L35, L70, L71, L72, L73, L74, L75, K_N, K_N, K_N, K_N, K_N, K_N, K_N, R70, R71, R72, R73, R74 \ - ) + { \ + { L45, L44, L43, L42, L41, L40 }, \ + { L55, L54, L53, L52, L51, L50 }, \ + { L65, L64, L63, L62, L61, L60 }, \ + { L75, L74, L73, L72, L71, L70 }, \ + { L05, L04, L03, L02, L01, L00 }, \ + { L15, L14, L13, L12, L11, L10 }, \ + { L25, L24, L23, L22, L21, L20 }, \ + { L35, L34, L33, L32, L31, L30 }, \ + { R44, R43, R42, R41, R40, K_N }, \ + { R54, R53, R52, R51, R50, K_N }, \ + { R64, R63, R62, R61, R60, K_N }, \ + { R74, R73, R72, R71, R70, K_N }, \ + { K_N, K_N, K_N, K_N, K_N, K_N }, \ + { K_N, K_N, K_N, K_N, K_N, K_N }, \ + { K_N, K_N, K_N, K_N, K_N, K_N }, \ + { K_N, K_N, K_N, K_N, K_N, K_N }, \ + } #endif - -// Used to create a keymap using only KC_ prefixed keys -#define LAYOUT_rs_kc( \ - L00, L01, L02, L03, L04, L05, L40, L41, L42, L43, L44, L45, R40, R41, R42, R43, R44, \ - L10, L11, L12, L13, L14, L15, L50, L51, L52, L53, L54, L55, R50, R51, R52, R53, R54, \ - L20, L21, L22, L23, L24, L25, L60, L61, L62, L63, L64, L65, R60, R61, R62, R63, R64, \ - L30, L31, L32, L33, L34, L35, L70, L71, L72, L73, L74, L75, R70, R71, R72, R73, R74 \ - ) \ - LAYOUT_rs( \ - KC_##L00, KC_##L01, KC_##L02, KC_##L03, KC_##L04, KC_##L05, KC_##L40, KC_##L41, KC_##L42, KC_##L43, KC_##L44, KC_##L45, KC_##R40, KC_##R41, KC_##R42, KC_##R43, KC_##R44, \ - KC_##L10, KC_##L11, KC_##L12, KC_##L13, KC_##L14, KC_##L15, KC_##L50, KC_##L51, KC_##L52, KC_##L53, KC_##L54, KC_##L55, KC_##R50, KC_##R51, KC_##R52, KC_##R53, KC_##R54, \ - KC_##L20, KC_##L21, KC_##L22, KC_##L23, KC_##L24, KC_##L25, KC_##L60, KC_##L61, KC_##L62, KC_##L63, KC_##L64, KC_##L65, KC_##R60, KC_##R61, KC_##R62, KC_##R63, KC_##R64, \ - KC_##L30, KC_##L31, KC_##L32, KC_##L33, KC_##L34, KC_##L35, KC_##L70, KC_##L71, KC_##L72, KC_##L73, KC_##L74, KC_##L75, KC_##R70, KC_##R71, KC_##R72, KC_##R73, KC_##R74 \ - ) ////////////////////////////////////////////////////////////////////////////// @@ -146,9 +154,7 @@ ////////////////////////////////////////////////////////////////////////////// #ifdef ANGELINA_KEYMAP #undef LAYOUT_base -#undef LAYOUT_base_kc #undef LAYOUT_rs -#undef LAYOUT_rs_kc #define LAYOUT_base( \ L00, L01, L02, L03, L04, L05, L40, L41, L42, L43, L44, L45, \ @@ -156,26 +162,25 @@ L20, L21, L22, L23, L24, L25, L60, L61, L62, L63, L64, L65, \ L31, L32, L33, L34, L35, L70, L71, L72, L73, L74, L75, L30 \ ) \ - LAYOUT_full( \ - L00, L01, L02, L03, L04, L05, L40, L41, L42, L43, L44, L45, K_N, K_N, K_N, K_N, K_N, K_N, K_N, K_N, K_N, K_N, K_N, K_N, \ - L10, L11, L12, L13, L14, L15, L50, L51, L52, L53, L54, L55, K_N, K_N, K_N, K_N, K_N, K_N, K_N, K_N, K_N, K_N, K_N, K_N, \ - L20, L21, L22, L23, L24, L25, L60, L61, L62, L63, L64, L65, K_N, K_N, K_N, K_N, K_N, K_N, K_N, K_N, K_N, K_N, K_N, K_N, \ - L30, L31, L32, L33, L34, L35, L70, L71, L72, L73, L74, L75, K_N, K_N, K_N, K_N, K_N, K_N, K_N, K_N, K_N, K_N, K_N, K_N \ - ) + { \ + { L45, L44, L43, L42, L41, L40 }, \ + { L55, L54, L53, L52, L51, L50 }, \ + { L65, L64, L63, L62, L61, L60 }, \ + { L75, L74, L73, L72, L71, L70 }, \ + { L05, L04, L03, L02, L01, L00 }, \ + { L15, L14, L13, L12, L11, L10 }, \ + { L25, L24, L23, L22, L21, L20 }, \ + { L35, L34, L33, L32, L31, L30 }, \ + { K_N, K_N, K_N, K_N, K_N, K_N }, \ + { K_N, K_N, K_N, K_N, K_N, K_N }, \ + { K_N, K_N, K_N, K_N, K_N, K_N }, \ + { K_N, K_N, K_N, K_N, K_N, K_N }, \ + { K_N, K_N, K_N, K_N, K_N, K_N }, \ + { K_N, K_N, K_N, K_N, K_N, K_N }, \ + { K_N, K_N, K_N, K_N, K_N, K_N }, \ + { K_N, K_N, K_N, K_N, K_N, K_N }, \ + } -// Used to create a keymap using only KC_ prefixed keys -#define LAYOUT_base_kc( \ - L00, L01, L02, L03, L04, L05, L40, L41, L42, L43, L44, L45, \ - L10, L11, L12, L13, L14, L15, L50, L51, L52, L53, L54, L55, \ - L20, L21, L22, L23, L24, L25, L60, L61, L62, L63, L64, L65, \ - L30, L31, L32, L33, L34, L35, L70, L71, L72, L73, L74, L75 \ - ) \ - LAYOUT_base( \ - KC_##L00, KC_##L01, KC_##L02, KC_##L03, KC_##L04, KC_##L05, KC_##L40, KC_##L41, KC_##L42, KC_##L43, KC_##L44, KC_##L45, \ - KC_##L10, KC_##L11, KC_##L12, KC_##L13, KC_##L14, KC_##L15, KC_##L50, KC_##L51, KC_##L52, KC_##L53, KC_##L54, KC_##L55, \ - KC_##L20, KC_##L21, KC_##L22, KC_##L23, KC_##L24, KC_##L25, KC_##L60, KC_##L61, KC_##L62, KC_##L63, KC_##L64, KC_##L65, \ - KC_##L30, KC_##L31, KC_##L32, KC_##L33, KC_##L34, KC_##L35, KC_##L70, KC_##L71, KC_##L72, KC_##L73, KC_##L74, KC_##L75 \ - ) #define LAYOUT_rs( \ L00, L01, L02, L03, L04, L05, L40, L41, L42, L43, L44, L45, R40, R41, R42, R43, R44, \ @@ -183,26 +188,23 @@ L20, L21, L22, L23, L24, L25, L60, L61, L62, L63, L64, L65, R60, R61, R62, R63, R64, \ L31, L32, L33, L34, L35, L70, L71, L72, L73, L74, L75, R70, R71, R72, R73, R74, L30 \ ) \ - LAYOUT_full( \ - L00, L01, L02, L03, L04, L05, L40, L41, L42, L43, L44, L45, K_N, K_N, K_N, K_N, K_N, K_N, K_N, R44, R43, R42, R41, R40, \ - L10, L11, L12, L13, L14, L15, L50, L51, L52, L53, L54, L55, K_N, K_N, K_N, K_N, K_N, K_N, K_N, R54, R53, R52, R51, R50, \ - L20, L21, L22, L23, L24, L25, L60, L61, L62, L63, L64, L65, K_N, K_N, K_N, K_N, K_N, K_N, K_N, R64, R63, R62, R61, R60, \ - L30, L31, L32, L33, L34, L35, L70, L71, L72, L73, L74, L75, K_N, K_N, K_N, K_N, K_N, K_N, K_N, R74, R73, R72, R71, R70 \ - ) - -// Used to create a keymap using only KC_ prefixed keys -#define LAYOUT_rs_kc( \ - L00, L01, L02, L03, L04, L05, L40, L41, L42, L43, L44, L45, R40, R41, R42, R43, R44, \ - L10, L11, L12, L13, L14, L15, L50, L51, L52, L53, L54, L55, R50, R51, R52, R53, R54, \ - L20, L21, L22, L23, L24, L25, L60, L61, L62, L63, L64, L65, R60, R61, R62, R63, R64, \ - L30, L31, L32, L33, L34, L35, L70, L71, L72, L73, L74, L75, R70, R71, R72, R73, R74 \ - ) \ - LAYOUT_rs( \ - KC_##L00, KC_##L01, KC_##L02, KC_##L03, KC_##L04, KC_##L05, KC_##L40, KC_##L41, KC_##L42, KC_##L43, KC_##L44, KC_##L45, KC_##R40, KC_##R41, KC_##R42, KC_##R43, KC_##R44, \ - KC_##L10, KC_##L11, KC_##L12, KC_##L13, KC_##L14, KC_##L15, KC_##L50, KC_##L51, KC_##L52, KC_##L53, KC_##L54, KC_##L55, KC_##R50, KC_##R51, KC_##R52, KC_##R53, KC_##R54, \ - KC_##L20, KC_##L21, KC_##L22, KC_##L23, KC_##L24, KC_##L25, KC_##L60, KC_##L61, KC_##L62, KC_##L63, KC_##L64, KC_##L65, KC_##R60, KC_##R61, KC_##R62, KC_##R63, KC_##R64, \ - KC_##L30, KC_##L31, KC_##L32, KC_##L33, KC_##L34, KC_##L35, KC_##L70, KC_##L71, KC_##L72, KC_##L73, KC_##L74, KC_##L75, KC_##R70, KC_##R71, KC_##R72, KC_##R73, KC_##R74 \ - ) - + { \ + { L45, L44, L43, L42, L41, L40 }, \ + { L55, L54, L53, L52, L51, L50 }, \ + { L65, L64, L63, L62, L61, L60 }, \ + { L75, L74, L73, L72, L71, L70 }, \ + { L05, L04, L03, L02, L01, L00 }, \ + { L15, L14, L13, L12, L11, L10 }, \ + { L25, L24, L23, L22, L21, L20 }, \ + { L35, L34, L33, L32, L31, L30 }, \ + { R40, R41, R42, R43, R44, K_N }, \ + { R50, R51, R52, R53, R54, K_N }, \ + { R60, R61, R62, R63, R64, K_N }, \ + { R70, R71, R72, R73, R74, K_N }, \ + { K_N, K_N, K_N, K_N, K_N, K_N }, \ + { K_N, K_N, K_N, K_N, K_N, K_N }, \ + { K_N, K_N, K_N, K_N, K_N, K_N }, \ + { K_N, K_N, K_N, K_N, K_N, K_N }, \ + } #endif ////////////////////////////////////////////////////////////////////////////// diff --git a/keyboards/treadstone48/rev2/info.json b/keyboards/treadstone48/rev2/info.json index df9e7591b509..1771a6a9d145 100644 --- a/keyboards/treadstone48/rev2/info.json +++ b/keyboards/treadstone48/rev2/info.json @@ -1,261 +1,263 @@ { - "keyboard_name": "Treadstone48", - "url": "https://github.com/marksard/Keyboards", - "maintainer": "marksard", - "width": 14.75, - "height": 4, - "layouts": { - "LAYOUT_base": { - "layout": [ - { - "label": "Esc", - "x": 1, - "y": 0 - }, - { - "label": "Q", - "x": 2.25, - "y": 0 - }, - { - "label": "W", - "x": 3.25, - "y": 0 - }, - { - "label": "E", - "x": 4.25, - "y": 0 - }, - { - "label": "R", - "x": 5.25, - "y": 0 - }, - { - "label": "T", - "x": 6.25, - "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": 13.75, - "y": 0 - }, - { - "label": "Tab", - "x": 1, - "y": 1, - "w": 1.5 - }, - { - "label": "A", - "x": 2.5, - "y": 1 - }, - { - "label": "S", - "x": 3.5, - "y": 1 - }, - { - "label": "D", - "x": 4.5, - "y": 1 - }, - { - "label": "F", - "x": 5.5, - "y": 1 - }, - { - "label": "G", - "x": 6.5, - "y": 1 - }, - { - "label": "H", - "x": 7.5, - "y": 1 - }, - { - "label": "J", - "x": 8.5, - "y": 1 - }, - { - "label": "K", - "x": 9.5, - "y": 1 - }, - { - "label": "L", - "x": 10.5, - "y": 1 - }, - { - "label": ":", - "x": 11.5, - "y": 1 - }, - { - "label": "Enter", - "x": 12.5, - "y": 1, - "w": 2.25 - }, - { - "label": "Shift", - "x": 0, - "y": 2, - "w": 2.25 - }, - { - "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.75, - "y": 2 - }, - { - "label": "M", - "x": 8.75, - "y": 2 - }, - { - "label": "<", - "x": 9.75, - "y": 2 - }, - { - "label": ">", - "x": 10.75, - "y": 2 - }, - { - "label": "?", - "x": 11.75, - "y": 2 - }, - { - "label": "\u2191", - "x": 12.75, - "y": 2 - }, - { - "label": "Ctrl", - "x": 0.75, - "y": 3, - "w": 1.25 - }, - { - "label": "Win", - "x": 2, - "y": 3, - "w": 1.25 - }, - { - "label": "Alt", - "x": 3.25, - "y": 3, - "w": 1.25 - }, - { - "label": "Lower", - "x": 4.5, - "y": 3 - }, - { - "label": "BackSpace", - "x": 5.5, - "y": 3, - "w": 2 - }, - { - "x": 7.5, - "y": 3, - "w": 2 - }, - { - "label": "Raise", - "x": 9.5, - "y": 3 - }, - { - "label": "Menu", - "x": 10.5, - "y": 3, - "w": 1.25 - }, - { - "label": "\u2190", - "x": 11.75, - "y": 3 - }, - { - "label": "\u2193", - "x": 12.75, - "y": 3 - }, - { - "label": "\u2192", - "x": 13.75, - "y": 3 - }, - { - "label": "_", - "x": 12.75, - "y": 0 + "keyboard_name": "Treadstone48", + "url": "https://github.com/marksard/Keyboards", + "maintainer": "marksard", + "width": 14.75, + "height": 4, + "layouts": { + "LAYOUT_base": { + "layout": [ + { + "label": "Esc", + "x": 1, + "y": 0 + }, + { + "label": "Q", + "x": 2.25, + "y": 0 + }, + { + "label": "W", + "x": 3.25, + "y": 0 + }, + { + "label": "E", + "x": 4.25, + "y": 0 + }, + { + "label": "R", + "x": 5.25, + "y": 0 + }, + { + "label": "T", + "x": 6.25, + "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": "Backspace", + "x": 12.75, + "y": 0, + "w": 2 + }, + { + "label": "Tab", + "x": 1, + "y": 1, + "w": 1.5 + }, + { + "label": "A", + "x": 2.5, + "y": 1 + }, + { + "label": "S", + "x": 3.5, + "y": 1 + }, + { + "label": "D", + "x": 4.5, + "y": 1 + }, + { + "label": "F", + "x": 5.5, + "y": 1 + }, + { + "label": "G", + "x": 6.5, + "y": 1 + }, + { + "label": "H", + "x": 7.5, + "y": 1 + }, + { + "label": "J", + "x": 8.5, + "y": 1 + }, + { + "label": "K", + "x": 9.5, + "y": 1 + }, + { + "label": "L", + "x": 10.5, + "y": 1 + }, + { + "label": ":", + "x": 11.5, + "y": 1 + }, + { + "label": "Enter", + "x": 12.5, + "y": 1, + "w": 2.25 + }, + { + "label": "Shift", + "x": 0, + "y": 2, + "w": 2.25 + }, + { + "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.75, + "y": 2 + }, + { + "label": "M", + "x": 8.75, + "y": 2 + }, + { + "label": "<", + "x": 9.75, + "y": 2 + }, + { + "label": ">", + "x": 10.75, + "y": 2 + }, + { + "label": "?", + "x": 11.75, + "y": 2 + }, + { + "label": "\u2191", + "x": 12.75, + "y": 2 + }, + { + "label": "Shift", + "x": 13.75, + "y": 2 + }, + { + "label": "Ctrl", + "x": 0.75, + "y": 3, + "w": 1.25 + }, + { + "label": "Win", + "x": 2, + "y": 3, + "w": 1.25 + }, + { + "label": "Alt", + "x": 3.25, + "y": 3, + "w": 1.25 + }, + { + "label": "Lower", + "x": 4.5, + "y": 3 + }, + { + "label": "Backspace", + "x": 5.5, + "y": 3, + "w": 2 + }, + { + "label": "Space", + "x": 7.5, + "y": 3, + "w": 2 + }, + { + "label": "Raise", + "x": 9.5, + "y": 3 + }, + { + "label": "Menu", + "x": 10.5, + "y": 3, + "w": 1.25 + }, + { + "label": "\u2190", + "x": 11.75, + "y": 3 + }, + { + "label": "\u2193", + "x": 12.75, + "y": 3 + }, + { + "label": "\u2192", + "x": 13.75, + "y": 3 + } + ] } - ] } - } } From cd73949682dc9bd032a80038dec83d4aa0597cb8 Mon Sep 17 00:00:00 2001 From: MakotoKurauchi Date: Tue, 8 Sep 2020 15:20:16 +0900 Subject: [PATCH 765/930] updated readme.md of yushakobo/quick7 keyboard (#10243) * update "Hardware Availability" * add a section of "How to build" * update "Hardware Supported" --- keyboards/yushakobo/quick7/readme.md | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/keyboards/yushakobo/quick7/readme.md b/keyboards/yushakobo/quick7/readme.md index 5e9f85c248e4..3c65d46c7f72 100644 --- a/keyboards/yushakobo/quick7/readme.md +++ b/keyboards/yushakobo/quick7/readme.md @@ -5,8 +5,11 @@ A simple macropad for the beginners. * Keyboard Maintainer: [yushakobo](https://github.com/yushakobo) -* Hardware Supported: quick7, Pro Micro (ATmega32U4) -* Hardware Availability: (Under Preparation) +* Hardware Supported: quick7 PCB, Pro Micro (ATmega32U4) +* Hardware Availability: [yushakobo Shop](https://yushakobo.jp/shop/quick7/) + +## How to build +* Build guide available [here](https://github.com/yushakobo/build-documents/blob/master/Quick7/Buildguide-en.md). (Japanese build guide is [here](https://github.com/yushakobo/build-documents/blob/master/Quick7/BuildGuide.md).) Make example for this keyboard (after setting up your build environment): From 5f00df0c4c181b6c3f779fe86cf40b3987b5c8a1 Mon Sep 17 00:00:00 2001 From: umi <57262844+umi-umi@users.noreply.github.com> Date: Wed, 9 Sep 2020 06:44:36 +0900 Subject: [PATCH 766/930] [Docs] Japanese translation of docs/reference_keymap_extras.md (#10138) * add reference_keymap_extras.md translation * update based on comment * update based on comment * update based on comment --- docs/ja/reference_keymap_extras.md | 88 ++++++++++++++++++++++++++++++ 1 file changed, 88 insertions(+) create mode 100644 docs/ja/reference_keymap_extras.md diff --git a/docs/ja/reference_keymap_extras.md b/docs/ja/reference_keymap_extras.md new file mode 100644 index 000000000000..e8104e5f3e68 --- /dev/null +++ b/docs/ja/reference_keymap_extras.md @@ -0,0 +1,88 @@ +# 言語固有のキーコード + + + +キーボードは多くの言語をサポートすることができます。ただし、それらはキーを押したことで生成される実際の文字を送信しません - 代わりに数字のコードを送信します。USB HID の仕様ではそれらは "usages" と呼ばれますが、キーボードの文脈では「スキャンコード」あるいは「キーコード」と呼ばれることが多いです。 +HID Keyboard/Keypad usage ページでは 256 未満の usage が定義されており、それらの一部は現在のオペレーティングシステムでは機能しません。では、この言語のサポートはどのようにして実現されるのでしょうか? + +簡単に言うと、オペレーティングシステムはユーザが設定したキーボードレイアウトに基づいて受け取った usage を適切な文字にマップします。例えば、スウェーデン人がキーボードの `å` という文字が刻印されたキーを押すと、キーボードは *実際には* `[` のキーコードを送信します。 + +明らかにこれは混乱する可能性があるため、QMK は多くのキーボードレイアウトのために言語固有のキーコードのエイリアスを提供します。これらはそれだけでは何もしません - さらに OS の設定で対応するキーボードレイアウトを設定する必要があります。それらをキーマップのキーキャップラベルと考えてください。 + +これらを使うには、`keymap.c` で対応する [ヘッダファイル](https://github.com/qmk/qmk_firmware/tree/master/quantum/keymap_extras) を `#include` し、それらで定義されているキーコードを `KC_` プリフィクスの代わりに追加します: + +| レイアウト | ヘッダファイル | +|-----------------------------|----------------------------------| +| Canadian Multilingual (CSA) | `keymap_canadian_multilingual.h` | +| Croatian | `keymap_croatian.h` | +| Czech | `keymap_czech.h` | +| Danish | `keymap_danish.h` | +| Dutch (Belgium) | `keymap_belgian.h` | +| English (Ireland) | `keymap_irish.h` | +| English (UK) | `keymap_uk.h` | +| English (US International) | `keymap_us_international.h` | +| Estonian | `keymap_estonian.h` | +| Finnish | `keymap_finnish.h` | +| French | `keymap_french.h` | +| French (AFNOR) | `keymap_french_afnor.h` | +| French (BÉPO) | `keymap_bepo.h` | +| French (Belgium) | `keymap_belgian.h` | +| French (Switzerland) | `keymap_fr_ch.h` | +| French (macOS, ISO) | `keymap_french_osx.h` | +| German | `keymap_german.h` | +| German (Switzerland) | `keymap_german_ch.h` | +| German (macOS) | `keymap_german_osx.h` | +| German (Neo2)* | `keymap_neo2.h` | +| Greek* | `keymap_greek.h` | +| Hebrew* | `keymap_hebrew.h` | +| Hungarian | `keymap_hungarian.h` | +| Icelandic | `keymap_icelandic.h` | +| Italian | `keymap_italian.h` | +| Italian (macOS, ANSI) | `keymap_italian_osx_ansi.h` | +| Italian (macOS, ISO) | `keymap_italian_osx_iso.h` | +| Japanese | `keymap_jp.h` | +| Korean | `keymap_korean.h` | +| Latvian | `keymap_latvian.h` | +| Lithuanian (ĄŽERTY) | `keymap_lithuanian_azerty.h` | +| Lithuanian (QWERTY) | `keymap_lithuanian_qwerty.h` | +| Norwegian | `keymap_norwegian.h` | +| Polish | `keymap_polish.h` | +| Portuguese | `keymap_portuguese.h` | +| Portuguese (Brazil) | `keymap_br_abnt2.h` | +| Romanian | `keymap_romanian.h` | +| Russian* | `keymap_russian.h` | +| Serbian* | `keymap_serbian.h` | +| Serbian (Latin) | `keymap_serbian_latin.h` | +| Slovak | `keymap_slovak.h` | +| Slovenian | `keymap_slovenian.h` | +| Spanish | `keymap_spanish.h` | +| Spanish (Dvorak) | `keymap_spanish_dvorak.h` | +| Swedish | `keymap_swedish.h` | +| Turkish (F) | `keymap_turkish_f.h` | +| Turkish (Q) | `keymap_turkish_q.h` | + +言語固有でないものもありますが、QWERTY レイアウトを使っていない場合に役立ちます: + +| レイアウト | ヘッダファイル | +|---------------------|--------------------------| +| Colemak | `keymap_colemak.h` | +| Dvorak | `keymap_dvorak.h` | +| Dvorak (French) | `keymap_dvorak_fr.h` | +| Dvorak (Programmer) | `keymap_dvp.h` | +| Norman | `keymap_norman.h` | +| Plover* | `keymap_plover.h` | +| Plover (Dvorak)* | `keymap_plover_dvorak.h` | +| Steno* | `keymap_steno.h` | +| Workman | `keymap_workman.h` | +| Workman (ZXCVM) | `keymap_workman_zxcvm.h` | + +## Sendstring サポート + +デフォルトでは、`SEND_STRING()` は US ANSI キーボードレイアウトが設定されたと見なします。別のレイアウトを使っている場合は、キーマップで(上記のように)`#include "sendstring_*.h"` して、ASCII 文字をキーコードにマッピングするために使われるルックアップテーブルを上書きすることができます。 + +ここで注意すべき重要な点は、`SEND_STRING()` は [ASCII 文字](https://en.wikipedia.org/wiki/ASCII#Character_set) でのみ機能するということです。これは、ユニコード文字を含む文字列を渡すことができないことを意味します - 残念ながら、これには希望のレイアウトに存在する可能性のあるアクセント付き文字が含まれています。 +多くのレイアウトでは、Grave または Tilde などの特定の文字を[デッドキー](https://en.wikipedia.org/wiki/Dead_key)としてのみ使えるようにしています。そのため、デッドキーが次の文字と潜在的に結合されることを防ぐためには、送信したい文字列の中のデッドキーのすぐ後にスペースを追加する必要があります。 +ラテン語由来のアルファベットを使わない(例えば、ギリシャ語やロシア語のような)他のレイアウトには、Sendstring ヘッダーがありません。従って ASCII 文字セットのほとんどを入力する方法がありません。これらは上記で `*` でマークされています。 From d3cea9ed930a28b400b38c933cfa5c4f503c7856 Mon Sep 17 00:00:00 2001 From: Nick Blyumberg Date: Wed, 9 Sep 2020 00:10:30 -0400 Subject: [PATCH 767/930] [Keyboard] Added the proper RGB settings to allow via control (#10223) --- keyboards/1upkeyboards/super16/keymaps/via/rules.mk | 2 ++ 1 file changed, 2 insertions(+) diff --git a/keyboards/1upkeyboards/super16/keymaps/via/rules.mk b/keyboards/1upkeyboards/super16/keymaps/via/rules.mk index 36b7ba9cbc98..7fe9493aff80 100644 --- a/keyboards/1upkeyboards/super16/keymaps/via/rules.mk +++ b/keyboards/1upkeyboards/super16/keymaps/via/rules.mk @@ -1,2 +1,4 @@ VIA_ENABLE = yes LTO_ENABLE = yes +RGB_MATRIX_ENABLE = no +RGBLIGHT_ENABLE = yes From ba3ec0f081373763784d8f092af886b8098d131c Mon Sep 17 00:00:00 2001 From: boss566y <67247583+boss566y@users.noreply.github.com> Date: Wed, 9 Sep 2020 00:24:23 -0400 Subject: [PATCH 768/930] [Keymap] Romac Keymap with VIA and OLED Support (#10249) * Add Personal Keymap with VIA and OLED * Update keyboards/kingly_keys/romac/keymaps/boss566y/keymap.c Co-authored-by: Drashna Jaelre * Update keyboards/kingly_keys/romac/keymaps/boss566y/keymap.c Co-authored-by: Drashna Jaelre * Update keyboards/kingly_keys/romac/keymaps/boss566y/keymap.c Co-authored-by: Ryan * Update keyboards/kingly_keys/romac/keymaps/boss566y/keymap.c Co-authored-by: Ryan * Update keyboards/kingly_keys/romac/keymaps/boss566y/keymap.c Co-authored-by: Ryan Co-authored-by: Drashna Jaelre Co-authored-by: Ryan --- .../romac/keymaps/boss566y/config.h | 20 +++++ .../romac/keymaps/boss566y/keymap.c | 90 +++++++++++++++++++ .../romac/keymaps/boss566y/rules.mk | 3 + 3 files changed, 113 insertions(+) create mode 100755 keyboards/kingly_keys/romac/keymaps/boss566y/config.h create mode 100755 keyboards/kingly_keys/romac/keymaps/boss566y/keymap.c create mode 100755 keyboards/kingly_keys/romac/keymaps/boss566y/rules.mk diff --git a/keyboards/kingly_keys/romac/keymaps/boss566y/config.h b/keyboards/kingly_keys/romac/keymaps/boss566y/config.h new file mode 100755 index 000000000000..8b098b6c0caf --- /dev/null +++ b/keyboards/kingly_keys/romac/keymaps/boss566y/config.h @@ -0,0 +1,20 @@ +/* +Copyright 2020 boss566y + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License 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 DYNAMIC_KEYMAP_LAYER_COUNT 8 diff --git a/keyboards/kingly_keys/romac/keymaps/boss566y/keymap.c b/keyboards/kingly_keys/romac/keymaps/boss566y/keymap.c new file mode 100755 index 000000000000..a636bb47612e --- /dev/null +++ b/keyboards/kingly_keys/romac/keymaps/boss566y/keymap.c @@ -0,0 +1,90 @@ +/* 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 + +char oled_layer[20]; + +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 + ), + [4] = 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 + ), + [5] = 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 + ), + [6] = 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 + ), + [7] = 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 + ) +}; + + + +#ifdef OLED_DRIVER_ENABLE +oled_rotation_t oled_init_user(oled_rotation_t rotation) { + return OLED_ROTATION_270; +} + +void oled_task_user(void) { + // Host Keyboard Layer Status + sprintf(oled_layer,"Layer\nL: %d\n",get_highest_layer(layer_state)); + oled_write(oled_layer,false); + + // Host Keyboard LED Status + led_t led_state = host_keyboard_led_state(); + oled_write_P(led_state.num_lock ? PSTR("NLCK ") : PSTR(" "), false); + oled_write_P(led_state.caps_lock ? PSTR("CAPS ") : PSTR(" "), false); + oled_write_P(led_state.scroll_lock ? PSTR("SCRLK") : PSTR(" "), false); +} +#endif diff --git a/keyboards/kingly_keys/romac/keymaps/boss566y/rules.mk b/keyboards/kingly_keys/romac/keymaps/boss566y/rules.mk new file mode 100755 index 000000000000..73fd595ab828 --- /dev/null +++ b/keyboards/kingly_keys/romac/keymaps/boss566y/rules.mk @@ -0,0 +1,3 @@ +VIA_ENABLE = yes +BOOTLOADER = qmk-dfu +OLED_DRIVER_ENABLE = yes # Enable Support for SSD1306 or SH1106 OLED Displays; Communicating over I2C \ No newline at end of file From 4b9c3dc2e5a1d0e16bcb2841fe10337734c2f248 Mon Sep 17 00:00:00 2001 From: Jan Kolkmeier Date: Wed, 9 Sep 2020 07:25:13 +0200 Subject: [PATCH 769/930] add keyboard: bemeier/bmek (revisited) (#10144) * bmek keyboard support * Update keyboards/bemeier/bmek/bmek.h Co-authored-by: Drashna Jaelre * Update keyboards/bemeier/bmek/rules.mk Co-authored-by: Drashna Jaelre * moved shutdown behavior to shutdown hook * removed dynamic macro option statement * Apply suggestions from code review 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> * change layout name in via * move/copy root rules to revs * Apply suggestions from code review Co-authored-by: Drashna Jaelre * Apply suggestions from code review Co-authored-by: Drashna Jaelre Co-authored-by: Drashna Jaelre Co-authored-by: James Young <18669334+noroadsleft@users.noreply.github.com> --- keyboards/bemeier/bmek/README.md | 30 +++++ keyboards/bemeier/bmek/bmek.c | 23 ++++ keyboards/bemeier/bmek/bmek.h | 58 +++++++++ keyboards/bemeier/bmek/config.h | 47 ++++++++ keyboards/bemeier/bmek/info.json | 25 ++++ .../bemeier/bmek/keymaps/default/README.md | 4 + .../bemeier/bmek/keymaps/default/keymap.c | 76 ++++++++++++ keyboards/bemeier/bmek/keymaps/via/README.md | 18 +++ keyboards/bemeier/bmek/keymaps/via/keymap.c | 114 ++++++++++++++++++ keyboards/bemeier/bmek/keymaps/via/rules.mk | 1 + keyboards/bemeier/bmek/rev1/config.h | 29 +++++ keyboards/bemeier/bmek/rev1/rev1.c | 16 +++ keyboards/bemeier/bmek/rev1/rev1.h | 18 +++ keyboards/bemeier/bmek/rev1/rules.mk | 21 ++++ keyboards/bemeier/bmek/rev2/config.h | 29 +++++ keyboards/bemeier/bmek/rev2/rev2.c | 16 +++ keyboards/bemeier/bmek/rev2/rev2.h | 18 +++ keyboards/bemeier/bmek/rev2/rules.mk | 21 ++++ keyboards/bemeier/bmek/rev3/config.h | 29 +++++ keyboards/bemeier/bmek/rev3/rev3.c | 16 +++ keyboards/bemeier/bmek/rev3/rev3.h | 24 ++++ keyboards/bemeier/bmek/rev3/rules.mk | 21 ++++ 22 files changed, 654 insertions(+) create mode 100755 keyboards/bemeier/bmek/README.md create mode 100755 keyboards/bemeier/bmek/bmek.c create mode 100755 keyboards/bemeier/bmek/bmek.h create mode 100755 keyboards/bemeier/bmek/config.h create mode 100755 keyboards/bemeier/bmek/info.json create mode 100755 keyboards/bemeier/bmek/keymaps/default/README.md create mode 100755 keyboards/bemeier/bmek/keymaps/default/keymap.c create mode 100755 keyboards/bemeier/bmek/keymaps/via/README.md create mode 100755 keyboards/bemeier/bmek/keymaps/via/keymap.c create mode 100755 keyboards/bemeier/bmek/keymaps/via/rules.mk create mode 100755 keyboards/bemeier/bmek/rev1/config.h create mode 100755 keyboards/bemeier/bmek/rev1/rev1.c create mode 100755 keyboards/bemeier/bmek/rev1/rev1.h create mode 100755 keyboards/bemeier/bmek/rev1/rules.mk create mode 100755 keyboards/bemeier/bmek/rev2/config.h create mode 100755 keyboards/bemeier/bmek/rev2/rev2.c create mode 100755 keyboards/bemeier/bmek/rev2/rev2.h create mode 100755 keyboards/bemeier/bmek/rev2/rules.mk create mode 100755 keyboards/bemeier/bmek/rev3/config.h create mode 100755 keyboards/bemeier/bmek/rev3/rev3.c create mode 100755 keyboards/bemeier/bmek/rev3/rev3.h create mode 100755 keyboards/bemeier/bmek/rev3/rules.mk diff --git a/keyboards/bemeier/bmek/README.md b/keyboards/bemeier/bmek/README.md new file mode 100755 index 000000000000..3437a5afdd4c --- /dev/null +++ b/keyboards/bemeier/bmek/README.md @@ -0,0 +1,30 @@ +# BMEK + +![BMEK](https://i.imgur.com/p1KFi6ql.jpg) + +BMEK combines the best of HHKB & Alice-likes. All PCB and case design files are open source. + +* Keyboard Maintainer: [Bemeier](https://github.com/Bemeier) +* Hardware Supported: BMEK PCB rev1, rev2, rev3 +* Hardware Availability: Case & PCB files: [github.com/bemeier/bmek](https://github.com/bemeier/bmek) + +Make example for this keyboard, for an hhkb-like layout and keymap (after setting up your build environment): + + make bemeier/bmek/rev3:default + +Make the VIA compatible firmware: + + make bemeier/bmek/rev3:via + +The ```rev3```, denotes the version of the PCB. +Check on the PCB to find out which version you have, and set it to rev1, rev2 or rev3 accordingly (the BMEK group buy PCBs are all rev3). + +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). + +# Layouts + +Starting with rev3 (the version of the PCB to be shipped in the GB), the following layout options are supported: + +![layouts](https://i.imgur.com/XuFxwthl.png) + +Note that the keymap shown above may not accurately reflect the default keymap of the firmware (see the keymaps folder). diff --git a/keyboards/bemeier/bmek/bmek.c b/keyboards/bemeier/bmek/bmek.c new file mode 100755 index 000000000000..47e874269589 --- /dev/null +++ b/keyboards/bemeier/bmek/bmek.c @@ -0,0 +1,23 @@ +/* Copyright 2020 bemeier + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#include "bmek.h" + +__attribute__((weak)) +void shutdown_user() { +#ifdef RGBLIGHT_ENABLE + rgblight_setrgb(255, 0, 0); +#endif +} diff --git a/keyboards/bemeier/bmek/bmek.h b/keyboards/bemeier/bmek/bmek.h new file mode 100755 index 000000000000..4249d0256691 --- /dev/null +++ b/keyboards/bemeier/bmek/bmek.h @@ -0,0 +1,58 @@ +/* Copyright 2020 bemeier + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License 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" + +#if defined(KEYBOARD_bemeier_bmek_rev1) +# include "rev1.h" +#elif defined(KEYBOARD_bemeier_bmek_rev2) +# include "rev2.h" +#elif defined(KEYBOARD_bemeier_bmek_rev3) +# include "rev3.h" +#endif + +#define XXX KC_NO // makes the switch matrix easier to read + +// This layout is supported by all revisions +#define LAYOUT_hhkb(\ + 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, K2D,\ + K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E,\ + K42, K43, K45, K48, K4A, K4B \ + ) { \ + { 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 }, \ + { XXX, XXX, K42, K43, XXX, K45, XXX, XXX, K48, XXX, K4A, K4B, XXX, XXX, XXX } \ +} + +// Layout exposing all keys (adding the ISO-style split left shift, which is supported starting rev3) +#define LAYOUT_all(\ + 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, K2D,\ + K30, K31, K41, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E,\ + K42, K43, K45, K48, K4A, K4B \ + ) { \ + { 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 }, \ + { XXX, K41, K42, K43, XXX, K45, XXX, XXX, K48, XXX, K4A, K4B, XXX, XXX, XXX } \ +} diff --git a/keyboards/bemeier/bmek/config.h b/keyboards/bemeier/bmek/config.h new file mode 100755 index 000000000000..1bd996d07af6 --- /dev/null +++ b/keyboards/bemeier/bmek/config.h @@ -0,0 +1,47 @@ +/* Copyright 2020 bemeier + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License 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 0x626D // BeMeier +#define PRODUCT_ID 0x656B // ErgonomicKeyboard +#define MANUFACTURER Bemeier +#define PRODUCT BMEK + +#define DYNAMIC_KEYMAP_LAYER_COUNT 5 +#define VIA_EEPROM_CUSTOM_CONFIG_SIZE 20 + +/* Keyboard Matrix size */ +#define MATRIX_ROWS 5 +#define MATRIX_COLS 15 + +#define DIODE_DIRECTION COL2ROW + +#define RGBLIGHT_EFFECT_BREATHING +#define RGBLIGHT_EFFECT_RAINBOW_MOOD +#define RGBLIGHT_MODE_STATIC_GRADIENT + +#define RGBLED_NUM 6 +#define RGBLIGHT_HUE_STEP 8 +#define RGBLIGHT_SAT_STEP 8 +#define RGBLIGHT_VAL_STEP 8 +#define RGBLIGHT_LIMIT_VAL 255 + +#define DEBOUNCE 5 +//#define RETRO_TAPPING +#define TAPPING_TERM 175 diff --git a/keyboards/bemeier/bmek/info.json b/keyboards/bemeier/bmek/info.json new file mode 100755 index 000000000000..51dc980c21f4 --- /dev/null +++ b/keyboards/bemeier/bmek/info.json @@ -0,0 +1,25 @@ +{ + "keyboard_name": "bmek", + "url": "https://github.com/Bemeier/bmek", + "maintainer": "Bemeier", + "width": 18, + "height": 5, + "layouts": { + "LAYOUT_all": { + "layout": [ + {"label":"Home", "x":0, "y":0}, {"label":"Esc", "x":1.5, "y":0}, {"label":"!", "x":2.5, "y":0}, {"label":"@", "x":3.5, "y":0}, {"label":"#", "x":4.5, "y":0}, {"label":"$", "x":5.5, "y":0}, {"label":"%", "x":6.5, "y":0}, {"label":"^", "x":7.5, "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":"+", "x":15, "y":0}, {"label":"|", "x":16, "y":0}, {"label":"~", "x":17, "y":0}, + {"label":"PgUp", "x":0, "y":1}, {"label":"Tab", "x":1.5, "y":1, "w":1.5}, {"label":"Q", "x":3, "y":1}, {"label":"W", "x":4, "y":1}, {"label":"E", "x":5, "y":1}, {"label":"R", "x":6, "y":1}, {"label":"T", "x":7, "y":1}, {"label":"Y", "x":9.5, "y":1}, {"label":"U", "x":10.5, "y":1}, {"label":"I", "x":11.5, "y":1}, {"label":"O", "x":12.5, "y":1}, {"label":"P", "x":13.5, "y":1}, {"label":"{", "x":14.5, "y":1}, {"label":"}", "x":15.5, "y":1}, {"label":"Backspace", "x":16.5, "y":1, "w":1.5}, + {"label":"PgDn", "x":0, "y":2}, {"label":"Ctrl", "x":1.5, "y":2, "w":1.75}, {"label":"A", "x":3.25, "y":2}, {"label":"S", "x":4.25, "y":2}, {"label":"D", "x":5.25, "y":2}, {"label":"F", "x":6.25, "y":2}, {"label":"G", "x":7.25, "y":2}, {"label":"H", "x":9.75, "y":2}, {"label":"J", "x":10.75, "y":2}, {"label":"K", "x":11.75, "y":2}, {"label":"L", "x":12.75, "y":2}, {"label":":", "x":13.75, "y":2}, {"label":"\"", "x":14.75, "y":2}, {"label":"Enter", "x":15.75, "y":2, "w":2.25}, + {"label":"End", "x":0, "y":3}, {"label":"Shift", "x":1.5, "y":3, "w":1.25}, {"label":"~", "x":2.75, "y":3}, {"label":"Z", "x":3.75, "y":3}, {"label":"X", "x":4.75, "y":3}, {"label":"C", "x":5.75, "y":3}, {"label":"V", "x":6.75, "y":3}, {"label":"B", "x":7.75, "y":3}, {"label":"B", "x":9.25, "y":3}, {"label":"N", "x":10.25, "y":3}, {"label":"M", "x":11.25, "y":3}, {"label":"<", "x":12.25, "y":3}, {"label":">", "x":13.25, "y":3}, {"label":"?", "x":14.25, "y":3}, {"label":"Shift", "x":15.25, "y":3, "w":1.75}, {"label":"Fn", "x":17, "y":3}, {"label":"Win", "x":3.75, "y":4}, {"label":"Alt", "x":4.75, "y":4, "w":1.25}, {"x":6, "y":4, "w":2.75}, {"x":9.25, "y":4, "w":2.75}, {"label":"Alt", "x":12, "y":4, "w":1.25}, {"label":"Win", "x":13.25, "y":4} + ] + }, + "LAYOUT_hhkb": { + "layout": [ + {"label":"Home", "x":0, "y":0}, {"label":"Esc", "x":1.5, "y":0}, {"label":"!", "x":2.5, "y":0}, {"label":"@", "x":3.5, "y":0}, {"label":"#", "x":4.5, "y":0}, {"label":"$", "x":5.5, "y":0}, {"label":"%", "x":6.5, "y":0}, {"label":"^", "x":7.5, "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":"+", "x":15, "y":0}, {"label":"|", "x":16, "y":0}, {"label":"~", "x":17, "y":0}, + {"label":"PgUp", "x":0, "y":1}, {"label":"Tab", "x":1.5, "y":1, "w":1.5}, {"label":"Q", "x":3, "y":1}, {"label":"W", "x":4, "y":1}, {"label":"E", "x":5, "y":1}, {"label":"R", "x":6, "y":1}, {"label":"T", "x":7, "y":1}, {"label":"Y", "x":9.5, "y":1}, {"label":"U", "x":10.5, "y":1}, {"label":"I", "x":11.5, "y":1}, {"label":"O", "x":12.5, "y":1}, {"label":"P", "x":13.5, "y":1}, {"label":"{", "x":14.5, "y":1}, {"label":"}", "x":15.5, "y":1}, {"label":"Backspace", "x":16.5, "y":1, "w":1.5}, + {"label":"PgDn", "x":0, "y":2}, {"label":"Ctrl", "x":1.5, "y":2, "w":1.75}, {"label":"A", "x":3.25, "y":2}, {"label":"S", "x":4.25, "y":2}, {"label":"D", "x":5.25, "y":2}, {"label":"F", "x":6.25, "y":2}, {"label":"G", "x":7.25, "y":2}, {"label":"H", "x":9.75, "y":2}, {"label":"J", "x":10.75, "y":2}, {"label":"K", "x":11.75, "y":2}, {"label":"L", "x":12.75, "y":2}, {"label":":", "x":13.75, "y":2}, {"label":"\"", "x":14.75, "y":2}, {"label":"Enter", "x":15.75, "y":2, "w":2.25}, + {"label":"End", "x":0, "y":3}, {"label":"Shift", "x":1.5, "y":3, "w":2.25}, {"label":"Z", "x":3.75, "y":3}, {"label":"X", "x":4.75, "y":3}, {"label":"C", "x":5.75, "y":3}, {"label":"V", "x":6.75, "y":3}, {"label":"B", "x":7.75, "y":3}, {"label":"B", "x":9.25, "y":3}, {"label":"N", "x":10.25, "y":3}, {"label":"M", "x":11.25, "y":3}, {"label":"<", "x":12.25, "y":3}, {"label":">", "x":13.25, "y":3}, {"label":"?", "x":14.25, "y":3}, {"label":"Shift", "x":15.25, "y":3, "w":1.75}, {"label":"Fn", "x":17, "y":3}, {"label":"Win", "x":3.75, "y":4}, {"label":"Alt", "x":4.75, "y":4, "w":1.25}, {"x":6, "y":4, "w":2.75}, {"x":9.25, "y":4, "w":2.75}, {"label":"Alt", "x":12, "y":4, "w":1.25}, {"label":"Win", "x":13.25, "y":4} + ] + } + } +} diff --git a/keyboards/bemeier/bmek/keymaps/default/README.md b/keyboards/bemeier/bmek/keymaps/default/README.md new file mode 100755 index 000000000000..a2c12ad3d652 --- /dev/null +++ b/keyboards/bemeier/bmek/keymaps/default/README.md @@ -0,0 +1,4 @@ +# Default BMEK Keymap +This is the default keymap for the BMEK, besides the left macro columns and the split spacebars. +It's uses the HHKB-like layout options (no split left shift, split backspace and split right shift). +Please checkout the diagrams in ```keymap.c``` for an overview of the keymap. diff --git a/keyboards/bemeier/bmek/keymaps/default/keymap.c b/keyboards/bemeier/bmek/keymaps/default/keymap.c new file mode 100755 index 000000000000..a2fccfb2c9ff --- /dev/null +++ b/keyboards/bemeier/bmek/keymaps/default/keymap.c @@ -0,0 +1,76 @@ +/* Copyright 2020 bemeier + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public 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_hhkb( +/* Default layer +┌─────┐ ┌─────┬─────┬─────┬─────┬─────┬─────┬─────┐ ┌─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┐ +│ F13 │ │ ESC │ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ │ 7 │ 8 │ 9 │ 0 │ - │ = │ \ │ ` │ +├─────┤ ├─────┴─┬───┴─┬───┴─┬───┴─┬───┴─┬───┴─┬───┘ ┌─┴───┬─┴───┬─┴───┬─┴───┬─┴───┬─┴───┬─┴───┬─┴─────┤ +│ F14 │ │ TAB │ Q │ W │ E │ R │ T │ │ Y │ U │ I │ O │ P │ [ │ ] │ BSPC │ +├─────┤ ├───────┴┬────┴┬────┴┬────┴┬────┴┬────┴┐ └─┬───┴─┬───┴─┬───┴─┬───┴─┬───┴─┬───┴─┬───┴───────┤ +│ F15 │ │ CTRL │ A │ S │ D │ F │ G │ │ H │ J │ K │ L │ ; │ ' │ ENTER │ +├─────┤ ├────────┴┬────┴┬────┴┬────┴┬────┴┬────┴┐ ┌┴────┬┴────┬┴────┬┴────┬┴────┬┴────┬┴──────┬────┤ +│ F16 │ │ SHFT │ Z │ X │ C │ V │ B │ │ B │ N │ M │ , │ . │ / │ SHFT │ Fn │ +└─────┘ └─────────┼─────┼─────┴┬────┴─────┴─────┤ ├─────┴─────┴────┬┴─────┼─────┼─────┴───────┴────┘ + │ GUI │ ALT │ SPACE │ │ SPACE/Fn_1 │ ALT │ CTL │ + └─────┴──────┴────────────────┘ └────────────────┴──────┴─────┘ +*/ + KC_F13, 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_F14, KC_TAB, KC_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_F15, 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_F16, 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(1), + KC_LGUI, KC_LALT, KC_SPC, LT(1, KC_SPC), KC_RALT, KC_RCTL +), [1] = LAYOUT_hhkb( +/* Function Layer 1: Nav +┌─────┐ ┌─────┬─────┬─────┬─────┬─────┬─────┬─────┐ ┌─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┐ +│ RST │ │ PWR │ F1 │ F2 │ F3 │ F4 │ F5 │ F6 │ │ F7 │ F8 │ F9 │ F10 │ F11 │ F12 │ INS │ DEL │ +├─────┤ ├─────┴─┬───┴─┬───┴─┬───┴─┬───┴─┬───┴─┬───┘ ┌─┴───┬─┴───┬─┴───┬─┴───┬─┴───┬─┴───┬─┴───┬─┴─────┤ +│ │ │ CAPS │ │ │ │ │ │ │ │ │PSCR │SLCK │PAUS │ ^ │ │ │ +├─────┤ ├───────┴┬────┴┬────┴┬────┴┬────┴┬────┴┐ └─┬───┴─┬───┴─┬───┴─┬───┴─┬───┴─┬───┴─┬───┴───────┤ +│ │ │ │ o) │ o)} │ Ø │EJCT │ │ │ * │ / │HOME │PGUP │ <- │ -> │ │ +├─────┤ ├────────┴┬────┴┬────┴┬────┴┬────┴┬────┴┐ ┌┴────┬┴────┬┴────┬┴────┬┴────┬┴────┬┴──────┬────┤ +│ │ │ │ │ │ CFG │ │ │ │ + │ - │ │ END │PGDN │ v │ │ │ +└─────┘ └─────────┼─────┼─────┴┬────┴─────┴─────┤ ├─────┴─────┴────┬┴─────┼─────┼─────┴───────┴────┘ + │ │ │ │ │ │ │ │ + └─────┴──────┴────────────────┘ └────────────────┴──────┴─────┘ +*/ + RESET, 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_CAPS, _______, _______, _______, _______, _______, _______, _______, KC_PSCR, KC_SLCK, KC_PAUS, KC_UP, _______, _______, + _______, _______, KC_VOLD, KC_VOLU, KC_MUTE, KC_EJCT, _______, KC_PAST, KC_PSLS, KC_HOME, KC_PGUP, KC_LEFT, KC_RGHT, KC_PENT, + _______, _______, _______, _______, TG(2), _______, _______, _______, KC_PPLS, KC_PMNS, KC_END, KC_PGDN, KC_DOWN, _______, _______, + _______, _______, _______, _______, _______, _______ +), [2] = LAYOUT_hhkb( +/* Function Layer 4: Firmware Config (TODO) +┌─────┐ ┌─────┬─────┬─────┬─────┬─────┬─────┬─────┐ ┌─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┐ +│ RST │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +├─────┤ ├─────┴─┬───┴─┬───┴─┬───┴─┬───┴─┬───┴─┬───┘ ┌─┴───┬─┴───┬─┴───┬─┴───┬─┴───┬─┴───┬─┴───┬─┴─────┤ +│ │ │ │ RGB │RGB+ │RGB- │HUE+ │HUE- │ │ │ │ │ │ │ │ │ │ +├─────┤ ├───────┴┬────┴┬────┴┬────┴┬────┴┬────┴┐ └─┬───┴─┬───┴─┬───┴─┬───┴─┬───┴─┬───┴─┬───┴───────┤ +│ │ │ │ │SPD+ │SPD- │SAT+ │SAT- │ │ │ │ │ │ │ │ │ +├─────┤ ├────────┴┬────┴┬────┴┬────┴┬────┴┬────┴┐ ┌┴────┬┴────┬┴────┬┴────┬┴────┬┴────┬┴──────┬────┤ +│ │ │ │ │ │ ___ │VAL+ │VAL- │ │ │ │ │ │ │ │ │ │ +└─────┘ └─────────┼─────┼─────┴┬────┴─────┴─────┤ ├─────┴─────┴────┬┴─────┼─────┼─────┴───────┴────┘ + │ │ │ │ │ │ │ │ + └─────┴──────┴────────────────┘ └────────────────┴──────┴─────┘ +*/ + RESET, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + XXXXXXX, XXXXXXX, RGB_TOG, RGB_MOD, RGB_RMOD, RGB_HUI, RGB_HUD, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + XXXXXXX, XXXXXXX, XXXXXXX, RGB_SPI, RGB_SPD, RGB_SAI, RGB_SAD, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, TG(2), RGB_VAI, RGB_VAD, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, + XXXXXXX, XXXXXXX, XXXXXXX, _______, XXXXXXX, XXXXXXX +) }; diff --git a/keyboards/bemeier/bmek/keymaps/via/README.md b/keyboards/bemeier/bmek/keymaps/via/README.md new file mode 100755 index 000000000000..30d54301fb18 --- /dev/null +++ b/keyboards/bemeier/bmek/keymaps/via/README.md @@ -0,0 +1,18 @@ +# Default VIA Keymap +Compile the firmware with this keymap for use the BMEK with the [VIA configurator](https://caniusevia.com/). +Layout options can be configured in VIA (see first screenshot below). + +## 0: Base Layer +![Base Layer](https://i.imgur.com/tBu50SS.png) + +## 1: Nav Layer +![Nav Layer](https://i.imgur.com/ZzEow3t.png) + +## 2: NUM Block +![NUM Block](https://i.imgur.com/vzjZIa1.png) + +## 4: FW Config +![FW Config](https://i.imgur.com/L7QynAb.png) + +## Alternative Preconfigured Layouts +TODO: Provide (links to) some alternative via keymaps after VIA support is landed upstream. diff --git a/keyboards/bemeier/bmek/keymaps/via/keymap.c b/keyboards/bemeier/bmek/keymaps/via/keymap.c new file mode 100755 index 000000000000..8e5f7b2d0efc --- /dev/null +++ b/keyboards/bemeier/bmek/keymaps/via/keymap.c @@ -0,0 +1,114 @@ +/* Copyright 2020 bemeier + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public 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( +/* Default layer +┌─────┐ ┌─────┬─────┬─────┬─────┬─────┬─────┬─────┐ ┌─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┐ +│ F13 │ │ ESC │ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ │ 7 │ 8 │ 9 │ 0 │ - │ = │ \ │ ` │ +├─────┤ ├─────┴─┬───┴─┬───┴─┬───┴─┬───┴─┬───┴─┬───┘ ┌─┴───┬─┴───┬─┴───┬─┴───┬─┴───┬─┴───┬─┴───┬─┴─────┤ +│ F14 │ │ TAB │ Q │ W │ E │ R │ T │ │ Y │ U │ I │ O │ P │ [ │ ] │ BSPC │ +├─────┤ ├───────┴┬────┴┬────┴┬────┴┬────┴┬────┴┐ └─┬───┴─┬───┴─┬───┴─┬───┴─┬───┴─┬───┴─┬───┴───────┤ +│ F15 │ │ CTRL │ A │ S │ D │ F │ G │ │ H │ J │ K │ L │ ; │ ' │ ENTER │ +├─────┤ ├───────┬┴┬────┴┬────┴┬────┴┬────┴┬────┴┐ ┌┴────┬┴────┬┴────┬┴────┬┴────┬┴────┬┴──────┬────┤ +│ F16 │ │ SHFT │`│ Z │ X │ C │ V │ B │ │ B │ N │ M │ , │ . │ / │ SHFT │ Fn │ +└─────┘ └───────┴─┼─────┼─────┴┬────┴─────┴─────┤ ├─────┴─────┴────┬┴─────┼─────┼─────┴───────┴────┘ + │ GUI │ ALT │ SPACE │ │ SPACE/Fn_1 │ ALT │ CTL │ + └─────┴──────┴────────────────┘ └────────────────┴──────┴─────┘ +*/ + KC_F13, 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_F14, KC_TAB, KC_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_F15, 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_F16, KC_LSFT, KC_GRV, 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_LGUI, KC_LALT, KC_SPC, LT(1, KC_SPC), KC_RALT, KC_RCTL +), [1] = LAYOUT_all( +/* Function Layer 1: Nav +┌─────┐ ┌─────┬─────┬─────┬─────┬─────┬─────┬─────┐ ┌─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┐ +│ RST │ │ │ F1 │ F2 │ F3 │ F4 │ F5 │ F6 │ │ F7 │ F8 │ F9 │ F10 │ F11 │ F12 │ INS │ DEL │ +├─────┤ ├─────┴─┬───┴─┬───┴─┬───┴─┬───┴─┬───┴─┬───┘ ┌─┴───┬─┴───┬─┴───┬─┴───┬─┴───┬─┴───┬─┴───┬─┴─────┤ +│ │ │ │ END │ ^ │HOME │PGUP │ │ │ │ │ │ │ |> │ << │ >> │ │ +├─────┤ ├───────┴┬────┴┬────┴┬────┴┬────┴┬────┴┐ └─┬───┴─┬───┴─┬───┴─┬───┴─┬───┴─┬───┴─┬───┴───────┤ +│ │ │ │ <- │ v │ -> │PGDN │ │ │ <- │ v │ ^ │ -> │ o) │ o)} │ │ +├─────┤ ├───────┬┴┬────┴┬────┴┬────┴┬────┴┬────┴┐ ┌┴────┬┴────┬┴────┬┴────┬┴────┬┴────┬┴──────┬────┤ +│ │ │ │ │ │ │ CFG │ │ NUM │ │ │ │ │LDSKT│RDSKT│ Ø │ │ │ +└─────┘ └───────┴─┼─────┼─────┴┬────┴─────┴─────┤ ├─────┴─────┴────┬┴─────┼─────┼─────┴───────┴────┘ + │ │ │ │ │ │ │ │ + └─────┴──────┴────────────────┘ └────────────────┴──────┴─────┘ +*/ + 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_END, KC_UP, KC_HOME, KC_PGUP, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_MPLY, KC_MPRV, KC_MNXT, _______, + _______, _______, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGDN, XXXXXXX, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_VOLD, KC_VOLU, _______, + _______, _______, XXXXXXX, XXXXXXX, XXXXXXX, TG(4), XXXXXXX, XXXXXXX, TG(2), XXXXXXX, XXXXXXX, LCTL(LGUI(KC_LEFT)), LCTL(LGUI(KC_RGHT)), KC_MUTE, _______, _______, + _______, _______, _______, _______, _______, _______ +), [2] = LAYOUT_all( +/* Function Layer 2: Numpad example +┌─────┐ ┌─────┬─────┬─────┬─────┬─────┬─────┬─────┐ ┌─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┐ +│ │ │ │ │ │ │ │ │ │ │ 7 │ 8 │ 9 │ 0 │ - │ + │ │ │ +├─────┤ ├─────┴─┬───┴─┬───┴─┬───┴─┬───┴─┬───┴─┬───┘ ┌─┴───┬─┴───┬─┴───┬─┴───┬─┴───┬─┴───┬─┴───┬─┴─────┤ +│ │ │ │ │ │ │ │ │ │ 4 │ 5 │ 6 │ │ / │ * │ │ │ +├─────┤ ├───────┴┬────┴┬────┴┬────┴┬────┴┬────┴┐ └─┬───┴─┬───┴─┬───┴─┬───┴─┬───┴─┬───┴─┬───┴───────┤ +│ │ │ │ │ │ │ │ │ │ 1 │ 2 │ 3 │ │ │ │ KP_ENTER │ +├─────┤ ├───────┬┴┬────┴┬────┴┬────┴┬────┴┬────┴┐ ┌┴────┬┴────┬┴────┬┴────┬┴────┬┴────┬┴──────┬────┤ +│ │ │ │ │ │ │ │ │ │ │ ___ │ 0 │ . │ │ │ │ │ │ +└─────┘ └───────┴─┼─────┼─────┴┬────┴─────┴─────┤ ├─────┴─────┴────┬┴─────┼─────┼─────┴───────┴────┘ + │ │ │ │ │ │ │ │ + └─────┴──────┴────────────────┘ └────────────────┴──────┴─────┘ +*/ + _______, _______, _______, _______, _______, _______, _______, _______, KC_KP_7, KC_KP_8, KC_KP_9, KC_KP_0, KC_PMNS, KC_PPLS, _______, _______, + _______, _______, _______, _______, _______, _______, _______, KC_KP_4, KC_KP_5, KC_KP_6, XXXXXXX, KC_PSLS, KC_PAST, _______, _______, + _______, _______, _______, _______, _______, _______, _______, KC_KP_1, KC_KP_2, KC_KP_3, XXXXXXX, _______, _______, KC_PENT, + _______, _______, _______, _______, _______, _______, _______, _______, TG(2), KC_KP_0, KC_PDOT, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______ +), [3] = LAYOUT_all( +/* Function Layer 3 +┌─────┐ ┌─────┬─────┬─────┬─────┬─────┬─────┬─────┐ ┌─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┐ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +├─────┤ ├─────┴─┬───┴─┬───┴─┬───┴─┬───┴─┬───┴─┬───┘ ┌─┴───┬─┴───┬─┴───┬─┴───┬─┴───┬─┴───┬─┴───┬─┴─────┤ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +├─────┤ ├───────┴┬────┴┬────┴┬────┴┬────┴┬────┴┐ └─┬───┴─┬───┴─┬───┴─┬───┴─┬───┴─┬───┴─┬───┴───────┤ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +├─────┤ ├───────┬┴┬────┴┬────┴┬────┴┬────┴┬────┴┐ ┌┴────┬┴────┬┴────┬┴────┬┴────┬┴────┬┴──────┬────┤ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +└─────┘ └───────┴─┼─────┼─────┴┬────┴─────┴─────┤ ├─────┴─────┴────┬┴─────┼─────┼─────┴───────┴────┘ + │ │ │ │ │ │ │ │ + └─────┴──────┴────────────────┘ └────────────────┴──────┴─────┘ +*/ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______ +), [4] = LAYOUT_all( +/* Function Layer 4: Firmware Config +┌─────┐ ┌─────┬─────┬─────┬─────┬─────┬─────┬─────┐ ┌─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┐ +│ RST │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +├─────┤ ├─────┴─┬───┴─┬───┴─┬───┴─┬───┴─┬───┴─┬───┘ ┌─┴───┬─┴───┬─┴───┬─┴───┬─┴───┬─┴───┬─┴───┬─┴─────┤ +│ │ │ │ RGB │RGB+ │RGB- │HUE+ │HUE- │ │ │ │ │ │ │ │ │ │ +├─────┤ ├───────┴┬────┴┬────┴┬────┴┬────┴┬────┴┐ └─┬───┴─┬───┴─┬───┴─┬───┴─┬───┴─┬───┴─┬───┴───────┤ +│ │ │ │ │SPD+ │SPD- │SAT+ │SAT- │ │ │ │ │ │ │ │ │ +├─────┤ ├───────┬┴┬────┴┬────┴┬────┴┬────┴┬────┴┐ ┌┴────┬┴────┬┴────┬┴────┬┴────┬┴────┬┴──────┬────┤ +│ │ │ │ │ │ │ ___ │VAL+ │VAL- │ │ │ │ │ │ │ │ │ │ +└─────┘ └───────┴─┼─────┼─────┴┬────┴─────┴─────┤ ├─────┴─────┴────┬┴─────┼─────┼─────┴───────┴────┘ + │ │ │ │ │ │ │ │ + └─────┴──────┴────────────────┘ └────────────────┴──────┴─────┘ +*/ + RESET, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + XXXXXXX, XXXXXXX, RGB_TOG, RGB_MOD, RGB_RMOD, RGB_HUI, RGB_HUD, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + XXXXXXX, XXXXXXX, XXXXXXX, RGB_SPI, RGB_SPD, RGB_SAI, RGB_SAD, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, TG(4), RGB_VAI, RGB_VAD, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, + XXXXXXX, XXXXXXX, XXXXXXX, _______, XXXXXXX, XXXXXXX +) }; diff --git a/keyboards/bemeier/bmek/keymaps/via/rules.mk b/keyboards/bemeier/bmek/keymaps/via/rules.mk new file mode 100755 index 000000000000..1e5b99807cb7 --- /dev/null +++ b/keyboards/bemeier/bmek/keymaps/via/rules.mk @@ -0,0 +1 @@ +VIA_ENABLE = yes diff --git a/keyboards/bemeier/bmek/rev1/config.h b/keyboards/bemeier/bmek/rev1/config.h new file mode 100755 index 000000000000..5c738499f707 --- /dev/null +++ b/keyboards/bemeier/bmek/rev1/config.h @@ -0,0 +1,29 @@ +/* Copyright 2020 bemeier + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License 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 DEVICE_VER 0x0001 + +#define MATRIX_ROW_PINS \ + { D4, D7, B6, B4, B7 } +#define MATRIX_COL_PINS \ + { F1, B0, B1, B2, B3, D0, D1, D2, C6, C7, F7, F6, F5, F4, B5 } +#define UNUSED_PINS \ + { D4, D5, F0, B7 } +#define RGB_DI_PIN E6 + diff --git a/keyboards/bemeier/bmek/rev1/rev1.c b/keyboards/bemeier/bmek/rev1/rev1.c new file mode 100755 index 000000000000..24f0dcdb942d --- /dev/null +++ b/keyboards/bemeier/bmek/rev1/rev1.c @@ -0,0 +1,16 @@ +/* Copyright 2020 bemeier + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public 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/bemeier/bmek/rev1/rev1.h b/keyboards/bemeier/bmek/rev1/rev1.h new file mode 100755 index 000000000000..1c46169bdc76 --- /dev/null +++ b/keyboards/bemeier/bmek/rev1/rev1.h @@ -0,0 +1,18 @@ +/* Copyright 2020 bemeier + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License 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" diff --git a/keyboards/bemeier/bmek/rev1/rules.mk b/keyboards/bemeier/bmek/rev1/rules.mk new file mode 100755 index 000000000000..17d390f22146 --- /dev/null +++ b/keyboards/bemeier/bmek/rev1/rules.mk @@ -0,0 +1,21 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +BOOTLOADER = atmel-dfu + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = lite +MOUSEKEY_ENABLE = no +EXTRAKEY_ENABLE = yes +CONSOLE_ENABLE = no +COMMAND_ENABLE = no +SLEEP_LED_ENABLE = yes +SPLIT_KEYBOARD = no +BACKLIGHT_ENABLE = no +NKRO_ENABLE = yes +RGBLIGHT_ENABLE = yes +AUDIO_ENABLE = no +LTO_ENABLE = yes diff --git a/keyboards/bemeier/bmek/rev2/config.h b/keyboards/bemeier/bmek/rev2/config.h new file mode 100755 index 000000000000..c97d0417adde --- /dev/null +++ b/keyboards/bemeier/bmek/rev2/config.h @@ -0,0 +1,29 @@ +/* Copyright 2020 bemeier + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License 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 DEVICE_VER 0x0002 + +#define MATRIX_ROW_PINS \ + { F4, F5, D7, B5, B4 } +#define MATRIX_COL_PINS \ + { F6, B0, B1, F7, C7, C6, B6, F1, B2, B3, D6, D3, D2, D1, D0 } +#define UNUSED_PINS \ + { D4, D5, F0, B7 } + +#define RGB_DI_PIN E6 diff --git a/keyboards/bemeier/bmek/rev2/rev2.c b/keyboards/bemeier/bmek/rev2/rev2.c new file mode 100755 index 000000000000..97ee43e31841 --- /dev/null +++ b/keyboards/bemeier/bmek/rev2/rev2.c @@ -0,0 +1,16 @@ +/* Copyright 2020 bemeier + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#include "rev2.h" diff --git a/keyboards/bemeier/bmek/rev2/rev2.h b/keyboards/bemeier/bmek/rev2/rev2.h new file mode 100755 index 000000000000..1c46169bdc76 --- /dev/null +++ b/keyboards/bemeier/bmek/rev2/rev2.h @@ -0,0 +1,18 @@ +/* Copyright 2020 bemeier + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License 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" diff --git a/keyboards/bemeier/bmek/rev2/rules.mk b/keyboards/bemeier/bmek/rev2/rules.mk new file mode 100755 index 000000000000..17d390f22146 --- /dev/null +++ b/keyboards/bemeier/bmek/rev2/rules.mk @@ -0,0 +1,21 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +BOOTLOADER = atmel-dfu + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = lite +MOUSEKEY_ENABLE = no +EXTRAKEY_ENABLE = yes +CONSOLE_ENABLE = no +COMMAND_ENABLE = no +SLEEP_LED_ENABLE = yes +SPLIT_KEYBOARD = no +BACKLIGHT_ENABLE = no +NKRO_ENABLE = yes +RGBLIGHT_ENABLE = yes +AUDIO_ENABLE = no +LTO_ENABLE = yes diff --git a/keyboards/bemeier/bmek/rev3/config.h b/keyboards/bemeier/bmek/rev3/config.h new file mode 100755 index 000000000000..fd74a74027ab --- /dev/null +++ b/keyboards/bemeier/bmek/rev3/config.h @@ -0,0 +1,29 @@ +/* Copyright 2020 bemeier + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License 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 DEVICE_VER 0x0003 + +#define MATRIX_ROW_PINS \ + { F1, B4, B5, D6, D7 } +#define MATRIX_COL_PINS \ + { B6, C6, C7, F7, F6, F5, F4, F0, B7, D0, D1, D2, D3, D5, D4 } +#define UNUSED_PINS \ + { D0, B1, B2, B3 } + +#define RGB_DI_PIN E6 diff --git a/keyboards/bemeier/bmek/rev3/rev3.c b/keyboards/bemeier/bmek/rev3/rev3.c new file mode 100755 index 000000000000..6193ab51b4d2 --- /dev/null +++ b/keyboards/bemeier/bmek/rev3/rev3.c @@ -0,0 +1,16 @@ +/* Copyright 2020 bemeier + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#include "rev3.h" diff --git a/keyboards/bemeier/bmek/rev3/rev3.h b/keyboards/bemeier/bmek/rev3/rev3.h new file mode 100755 index 000000000000..f7699271935f --- /dev/null +++ b/keyboards/bemeier/bmek/rev3/rev3.h @@ -0,0 +1,24 @@ +/* Copyright 2020 bemeier + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License 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" + +/* +PCB rev3 has a number of layout options that rev2 and rev1 don't have, +however, to me just using "ALL_67" for all for all keymaps seems easier to +maintain than adding all possible permutations of layout options here. +*/ diff --git a/keyboards/bemeier/bmek/rev3/rules.mk b/keyboards/bemeier/bmek/rev3/rules.mk new file mode 100755 index 000000000000..17d390f22146 --- /dev/null +++ b/keyboards/bemeier/bmek/rev3/rules.mk @@ -0,0 +1,21 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +BOOTLOADER = atmel-dfu + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = lite +MOUSEKEY_ENABLE = no +EXTRAKEY_ENABLE = yes +CONSOLE_ENABLE = no +COMMAND_ENABLE = no +SLEEP_LED_ENABLE = yes +SPLIT_KEYBOARD = no +BACKLIGHT_ENABLE = no +NKRO_ENABLE = yes +RGBLIGHT_ENABLE = yes +AUDIO_ENABLE = no +LTO_ENABLE = yes From 08f6e64137e2a3fe5cf54928b193c3421e71b625 Mon Sep 17 00:00:00 2001 From: Ramon Imbao Date: Wed, 9 Sep 2020 13:32:47 +0800 Subject: [PATCH 770/930] [Keyboard] Add Squishy65 keyboard (#10266) * Add Squishy65 keyboard * Edit info.json * Fix incorrect ISO layout * Add missing license in files * Update keyboards/ramonimbao/squishy65/config.h Co-authored-by: Ryan * Update keyboards/ramonimbao/squishy65/keymaps/via/rules.mk Co-authored-by: Ryan * Update keyboards/ramonimbao/squishy65/rules.mk Co-authored-by: Ryan Co-authored-by: Ryan --- keyboards/ramonimbao/squishy65/chconf.h | 714 ++++++++++++++++++ keyboards/ramonimbao/squishy65/config.h | 68 ++ keyboards/ramonimbao/squishy65/halconf.h | 525 +++++++++++++ keyboards/ramonimbao/squishy65/info.json | 18 + .../squishy65/keymaps/default/keymap.c | 35 + .../ramonimbao/squishy65/keymaps/iso/keymap.c | 35 + .../ramonimbao/squishy65/keymaps/via/config.h | 1 + .../ramonimbao/squishy65/keymaps/via/keymap.c | 49 ++ .../ramonimbao/squishy65/keymaps/via/rules.mk | 1 + keyboards/ramonimbao/squishy65/mcuconf.h | 176 +++++ keyboards/ramonimbao/squishy65/readme.md | 14 + keyboards/ramonimbao/squishy65/rules.mk | 22 + keyboards/ramonimbao/squishy65/squishy65.c | 17 + keyboards/ramonimbao/squishy65/squishy65.h | 73 ++ 14 files changed, 1748 insertions(+) create mode 100644 keyboards/ramonimbao/squishy65/chconf.h create mode 100644 keyboards/ramonimbao/squishy65/config.h create mode 100644 keyboards/ramonimbao/squishy65/halconf.h create mode 100644 keyboards/ramonimbao/squishy65/info.json create mode 100644 keyboards/ramonimbao/squishy65/keymaps/default/keymap.c create mode 100644 keyboards/ramonimbao/squishy65/keymaps/iso/keymap.c create mode 100644 keyboards/ramonimbao/squishy65/keymaps/via/config.h create mode 100644 keyboards/ramonimbao/squishy65/keymaps/via/keymap.c create mode 100644 keyboards/ramonimbao/squishy65/keymaps/via/rules.mk create mode 100644 keyboards/ramonimbao/squishy65/mcuconf.h create mode 100644 keyboards/ramonimbao/squishy65/readme.md create mode 100644 keyboards/ramonimbao/squishy65/rules.mk create mode 100644 keyboards/ramonimbao/squishy65/squishy65.c create mode 100644 keyboards/ramonimbao/squishy65/squishy65.h diff --git a/keyboards/ramonimbao/squishy65/chconf.h b/keyboards/ramonimbao/squishy65/chconf.h new file mode 100644 index 000000000000..03f63da36a88 --- /dev/null +++ b/keyboards/ramonimbao/squishy65/chconf.h @@ -0,0 +1,714 @@ +/* + 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. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +/** + * @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. + * + * @addtogroup config + * @details Kernel related settings and hooks. + * @{ + */ + +#ifndef CHCONF_H +#define CHCONF_H + +#define _CHIBIOS_RT_CONF_ +#define _CHIBIOS_RT_CONF_VER_6_0_ + +/*===========================================================================*/ +/** + * @name System timers settings + * @{ + */ +/*===========================================================================*/ + +/** + * @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. + * @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. + */ +#if !defined(CH_CFG_ST_TIMEDELTA) +#define CH_CFG_ST_TIMEDELTA 2 +#endif + +/** @} */ + +/*===========================================================================*/ +/** + * @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. + */ +#if !defined(CH_CFG_TIME_QUANTUM) +#define CH_CFG_TIME_QUANTUM 0 +#endif + +/** + * @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. + */ +#if !defined(CH_CFG_MEMCORE_SIZE) +#define CH_CFG_MEMCORE_SIZE 0 +#endif + +/** + * @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. + */ +#if !defined(CH_CFG_NO_IDLE_THREAD) +#define CH_CFG_NO_IDLE_THREAD FALSE +#endif + +/** @} */ + +/*===========================================================================*/ +/** + * @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. + */ +#if !defined(CH_CFG_OPTIMIZE_SPEED) +#define CH_CFG_OPTIMIZE_SPEED FALSE +#endif + +/** @} */ + +/*===========================================================================*/ +/** + * @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. + */ +#if !defined(CH_CFG_USE_TM) +#define CH_CFG_USE_TM FALSE +#endif + +/** + * @brief Threads registry APIs. + * @details If enabled then the registry APIs are included in the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_REGISTRY) +#define CH_CFG_USE_REGISTRY TRUE +#endif + +/** + * @brief Threads synchronization APIs. + * @details If enabled then the @p chThdWait() function is included in + * the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_WAITEXIT) +#define CH_CFG_USE_WAITEXIT TRUE +#endif + +/** + * @brief Semaphores APIs. + * @details If enabled then the Semaphores APIs are included in the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_SEMAPHORES) +#define CH_CFG_USE_SEMAPHORES TRUE +#endif + +/** + * @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. + */ +#if !defined(CH_CFG_USE_SEMAPHORES_PRIORITY) +#define CH_CFG_USE_SEMAPHORES_PRIORITY FALSE +#endif + +/** + * @brief Mutexes APIs. + * @details If enabled then the mutexes APIs are included in the kernel. + * + * @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. + * @note Recursive mutexes are heavier and have an increased + * memory footprint. + * + * @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. + * @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. + */ +#if !defined(CH_CFG_USE_CONDVARS) +#define CH_CFG_USE_CONDVARS TRUE +#endif + +/** + * @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. + */ +#if !defined(CH_CFG_USE_CONDVARS_TIMEOUT) +#define CH_CFG_USE_CONDVARS_TIMEOUT FALSE +#endif + +/** + * @brief Events Flags APIs. + * @details If enabled then the event flags APIs are included in the kernel. + * + * @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. + * @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. + */ +#if !defined(CH_CFG_USE_EVENTS_TIMEOUT) +#define CH_CFG_USE_EVENTS_TIMEOUT TRUE +#endif + +/** + * @brief Synchronous Messages APIs. + * @details If enabled then the synchronous messages APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_MESSAGES) +#define CH_CFG_USE_MESSAGES TRUE +#endif + +/** + * @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. + */ +#if !defined(CH_CFG_USE_MESSAGES_PRIORITY) +#define CH_CFG_USE_MESSAGES_PRIORITY FALSE +#endif + +/** + * @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. + */ +#if !defined(CH_CFG_USE_MAILBOXES) +#define CH_CFG_USE_MAILBOXES TRUE +#endif + +/** + * @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. + */ +#if !defined(CH_CFG_USE_MEMCORE) +#define CH_CFG_USE_MEMCORE TRUE +#endif + +/** + * @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. + */ +#if !defined(CH_CFG_USE_HEAP) +#define CH_CFG_USE_HEAP FALSE +#endif + +/** + * @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. + */ +#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. + * @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. + */ +#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 + +/** @} */ + +/*===========================================================================*/ +/** + * @name Debug options + * @{ + */ +/*===========================================================================*/ + +/** + * @brief Debug option, kernel statistics. + * + * @note The default is @p FALSE. + */ +#if !defined(CH_DBG_STATISTICS) +#define CH_DBG_STATISTICS FALSE +#endif + +/** + * @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. + */ +#if !defined(CH_DBG_SYSTEM_STATE_CHECK) +#define CH_DBG_SYSTEM_STATE_CHECK FALSE +#endif + +/** + * @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. + */ +#if !defined(CH_DBG_ENABLE_CHECKS) +#define CH_DBG_ENABLE_CHECKS FALSE +#endif + +/** + * @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. + */ +#if !defined(CH_DBG_ENABLE_ASSERTS) +#define CH_DBG_ENABLE_ASSERTS FALSE +#endif + +/** + * @brief Debug option, trace buffer. + * @details If enabled then the trace buffer is activated. + * + * @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. + * @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. + */ +#if !defined(CH_DBG_ENABLE_STACK_CHECK) +#define CH_DBG_ENABLE_STACK_CHECK FALSE +#endif + +/** + * @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. + */ +#if !defined(CH_DBG_FILL_THREADS) +#define CH_DBG_FILL_THREADS FALSE +#endif + +/** + * @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. + */ +#if !defined(CH_DBG_THREADS_PROFILING) +#define CH_DBG_THREADS_PROFILING FALSE +#endif + +/** @} */ + +/*===========================================================================*/ +/** + * @name Kernel hooks + * @{ + */ +/*===========================================================================*/ + +/** + * @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. + */ +#define CH_CFG_THREAD_EXTRA_FIELDS \ + /* Add threads custom fields here.*/ + +/** + * @brief Threads initialization hook. + * @details User initialization code added to the @p _thread_init() function. + * + * @note It is invoked from within @p _thread_init() 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/ramonimbao/squishy65/config.h b/keyboards/ramonimbao/squishy65/config.h new file mode 100644 index 000000000000..9aa3c8d82dfe --- /dev/null +++ b/keyboards/ramonimbao/squishy65/config.h @@ -0,0 +1,68 @@ +/* +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 0x10B5 +#define DEVICE_VER 0x0065 +#define MANUFACTURER Ramon Imbao +#define PRODUCT Squishy65 + +/* key matrix size */ +#define MATRIX_ROWS 5 +#define MATRIX_COLS 16 + +#define MATRIX_COL_PINS { A9, B9, B7, B6, B5, B4, B2, B1, B0, A7, A6, A5, A4, A10, A3, A2 } +#define MATRIX_ROW_PINS { A15, B3, A0, B10, B11 } +#define DIODE_DIRECTION COL2ROW + +// RGB B4 +#define RGB_DI_PIN B15 +#define RGBLED_NUM 18 +#define RGBLIGHT_ANIMATIONS + +/* 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/ramonimbao/squishy65/halconf.h b/keyboards/ramonimbao/squishy65/halconf.h new file mode 100644 index 000000000000..ff5ae7e8a5f6 --- /dev/null +++ b/keyboards/ramonimbao/squishy65/halconf.h @@ -0,0 +1,525 @@ +/* + 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. + 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 + +#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 +#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 cryptographic subsystem. + */ +#if !defined(HAL_USE_CRY) || defined(__DOXYGEN__) +#define HAL_USE_CRY FALSE +#endif + +/** + * @brief Enables the DAC subsystem. + */ +#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 +#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 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 +#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 +#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 + +/** + * @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. */ +/*===========================================================================*/ + +/** + * @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 + +/** + * @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. */ +/*===========================================================================*/ + +/** + * @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 the zero-copy API. + */ +#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 + +/** + * @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. */ +/*===========================================================================*/ + +/** + * @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 16 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 256 bytes for both the transmission and receive + * buffers. + */ +#if !defined(SERIAL_USB_BUFFERS_SIZE) || defined(__DOXYGEN__) +#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 + +/*===========================================================================*/ +/* 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 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 +#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. */ +/*===========================================================================*/ + +/** + * @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 + +/*===========================================================================*/ +/* 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/ramonimbao/squishy65/info.json b/keyboards/ramonimbao/squishy65/info.json new file mode 100644 index 000000000000..40ba15f6f166 --- /dev/null +++ b/keyboards/ramonimbao/squishy65/info.json @@ -0,0 +1,18 @@ +{ + "keyboard_name": "Squishy65", + "url": "", + "maintainer": "Ramon Imbao", + "width": 16, + "height": 5, + "layouts": { + "LAYOUT_ansi": { + "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":"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":"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":"\u2191", "x":14, "y":3}, {"label":"End", "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":"", "x":3.75, "y":4, "w":6.25}, {"label":"Alt", "x":10, "y":4, "w":1.25}, {"label":"Ctrl", "x":11.25, "y":4, "w":1.25}, {"label":"\u2190", "x":13, "y":4}, {"label":"\u2193", "x":14, "y":4}, {"label":"\u2192", "x":15, "y":4}] + }, + "LAYOUT_iso": { + "layout": [{"label":"Esc", "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":"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":"Enter", "x":13.75, "y":1, "w":1.25, "h":2}, {"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":"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":"\u2191", "x":14, "y":3}, {"label":"End", "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":"", "x":3.75, "y":4, "w":6.25}, {"label":"Alt", "x":10, "y":4, "w":1.25}, {"label":"Ctrl", "x":11.25, "y":4, "w":1.25}, {"label":"\u2190", "x":13, "y":4}, {"label":"\u2193", "x":14, "y":4}, {"label":"\u2192", "x":15, "y":4}] + }, + "LAYOUT_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":"|", "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":"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":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":"\u2191", "x":14, "y":3}, {"label":"End", "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":"", "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":"\u2190", "x":13, "y":4}, {"label":"\u2193", "x":14, "y":4}, {"label":"\u2192", "x":15, "y":4}] + } + } +} diff --git a/keyboards/ramonimbao/squishy65/keymaps/default/keymap.c b/keyboards/ramonimbao/squishy65/keymaps/default/keymap.c new file mode 100644 index 000000000000..c46d57332307 --- /dev/null +++ b/keyboards/ramonimbao/squishy65/keymaps/default/keymap.c @@ -0,0 +1,35 @@ +/* +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( + 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_BSLS, 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_RSFT, KC_UP, KC_END, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), KC_LEFT, KC_DOWN, KC_RGHT + ), + [1] = LAYOUT_ansi( + 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_SAI, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL, RGB_HUI, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_HUD, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_VAI, RGB_SAD, + _______, _______, _______, RGB_TOG, _______, _______, RGB_MOD, RGB_VAD, RGB_RMOD + ) +}; diff --git a/keyboards/ramonimbao/squishy65/keymaps/iso/keymap.c b/keyboards/ramonimbao/squishy65/keymaps/iso/keymap.c new file mode 100644 index 000000000000..ee1907d3e526 --- /dev/null +++ b/keyboards/ramonimbao/squishy65/keymaps/iso/keymap.c @@ -0,0 +1,35 @@ +/* +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( + 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_ENT, 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_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_RALT, MO(1), KC_LEFT, KC_DOWN, KC_RGHT + ), + [1] = LAYOUT_iso( + 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, RGB_SAI, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_HUI, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_HUD, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_VAI, RGB_SAD, + _______, _______, _______, RGB_TOG, _______, _______, RGB_MOD, RGB_VAD, RGB_RMOD + ) +}; diff --git a/keyboards/ramonimbao/squishy65/keymaps/via/config.h b/keyboards/ramonimbao/squishy65/keymaps/via/config.h new file mode 100644 index 000000000000..4dadf6a1695e --- /dev/null +++ b/keyboards/ramonimbao/squishy65/keymaps/via/config.h @@ -0,0 +1 @@ +#define DYNAMIC_KEYMAP_EEPROM_MAX_ADDR 2047 diff --git a/keyboards/ramonimbao/squishy65/keymaps/via/keymap.c b/keyboards/ramonimbao/squishy65/keymaps/via/keymap.c new file mode 100644 index 000000000000..d9177a622e93 --- /dev/null +++ b/keyboards/ramonimbao/squishy65/keymaps/via/keymap.c @@ -0,0 +1,49 @@ +/* +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_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_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_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_END, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), KC_NO, 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_SAI, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL, RGB_HUI, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_HUD, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_VAI, RGB_SAD, + _______, _______, _______, RGB_TOG, _______, _______, _______, RGB_MOD, RGB_VAD, RGB_RMOD + ), + [2] = LAYOUT_all( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + [3] = LAYOUT_all( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ) +}; diff --git a/keyboards/ramonimbao/squishy65/keymaps/via/rules.mk b/keyboards/ramonimbao/squishy65/keymaps/via/rules.mk new file mode 100644 index 000000000000..1e5b99807cb7 --- /dev/null +++ b/keyboards/ramonimbao/squishy65/keymaps/via/rules.mk @@ -0,0 +1 @@ +VIA_ENABLE = yes diff --git a/keyboards/ramonimbao/squishy65/mcuconf.h b/keyboards/ramonimbao/squishy65/mcuconf.h new file mode 100644 index 000000000000..ad12562d1702 --- /dev/null +++ b/keyboards/ramonimbao/squishy65/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/ramonimbao/squishy65/readme.md b/keyboards/ramonimbao/squishy65/readme.md new file mode 100644 index 000000000000..95dd1edfaf1e --- /dev/null +++ b/keyboards/ramonimbao/squishy65/readme.md @@ -0,0 +1,14 @@ +# Squishy65 + +![Squishy65](https://i.imgur.com/dZsllxQ.png) + +A gasket mount stacked acrylic 65% keyboard. + +* Keyboard Maintainer: [Ramon Imbao](https://github.com/ramonimbao) +* Hardware Supported: STM32F072CBU6 + +Make example for this keyboard (after setting up your build environment): + + make ramonimbao/squishy65: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/ramonimbao/squishy65/rules.mk b/keyboards/ramonimbao/squishy65/rules.mk new file mode 100644 index 000000000000..000e0d34f8de --- /dev/null +++ b/keyboards/ramonimbao/squishy65/rules.mk @@ -0,0 +1,22 @@ +# MCU name +MCU = STM32F072 + +# 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 = yes # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow +BLUETOOTH_ENABLE = no # Enable Bluetooth +AUDIO_ENABLE = no # Audio output + +# Enter lower-power sleep mode when on the ChibiOS idle thread +OPT_DEFS += -DCORTEX_ENABLE_WFI_IDLE=TRUE diff --git a/keyboards/ramonimbao/squishy65/squishy65.c b/keyboards/ramonimbao/squishy65/squishy65.c new file mode 100644 index 000000000000..6d9fb24196a7 --- /dev/null +++ b/keyboards/ramonimbao/squishy65/squishy65.c @@ -0,0 +1,17 @@ +/* Copyright 2020 Ramon Imbao + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#include "squishy65.h" diff --git a/keyboards/ramonimbao/squishy65/squishy65.h b/keyboards/ramonimbao/squishy65/squishy65.h new file mode 100644 index 000000000000..25480c874828 --- /dev/null +++ b/keyboards/ramonimbao/squishy65/squishy65.h @@ -0,0 +1,73 @@ +/* Copyright 2020 Ramon Imbao + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License 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 + + +// ANSI +// split backspace +// 2x right mods +#define LAYOUT_ansi( \ + 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, k2e, k2f, \ + k30, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3e, k3f, \ + k40, k41, k42, k46, k49, k4a, k4b, k4e, k4f \ +) { \ + { 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, XXX, k1e, k1f }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, XXX, XXX, k2e, k2f }, \ + { k30, XXX, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, XXX, k3e, k3f }, \ + { k40, k4a, k42, XXX, XXX, XXX, k46, XXX, XXX, k49, k4a, k4b, XXX, XXX, k4e, k4f }, \ +} + +// ISO +// 2u backspace +// 2x right mods +#define LAYOUT_iso( \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, 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, k2e, k2f, \ + k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3e, k3f, \ + k40, k41, k42, k46, k49, k4a, k4b, k4e, k4f \ +) { \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, XXX, k0f }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, XXX, k1e, k1f }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, XXX, XXX, k2e, k2f }, \ + { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, XXX, k3e, k3f }, \ + { k40, k4a, k42, XXX, XXX, XXX, k46, XXX, XXX, k49, k4a, k4b, XXX, XXX, k4e, k4f }, \ +} + +// Exposed +// split backspace +// 3x right mods +#define LAYOUT_all( \ + 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, k2e, k2f, \ + k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3e, k3f, \ + k40, k41, k42, k46, k49, k4a, k4b, k4c, k4e, k4f \ +) { \ + { 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, XXX, k1e, k1f }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, XXX, XXX, k2e, k2f }, \ + { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, XXX, k3e, k3f }, \ + { k40, k4a, k42, XXX, XXX, XXX, k46, XXX, XXX, k49, k4a, k4b, k4c, XXX, k4e, k4f }, \ +} From 076b9d482f271bad14cb31c67aee6226b069e734 Mon Sep 17 00:00:00 2001 From: Nick Christus <136611+nchristus@users.noreply.github.com> Date: Wed, 9 Sep 2020 00:33:38 -0500 Subject: [PATCH 771/930] [Keymap] Added nchristus userspace (#10261) * userspace: added nchristus * userspace: updates per PR review --- users/nchristus/nchristus.c | 18 ++++++++ users/nchristus/nchristus.h | 87 +++++++++++++++++++++++++++++++++++++ users/nchristus/rules.mk | 0 3 files changed, 105 insertions(+) create mode 100644 users/nchristus/nchristus.c create mode 100644 users/nchristus/nchristus.h create mode 100644 users/nchristus/rules.mk diff --git a/users/nchristus/nchristus.c b/users/nchristus/nchristus.c new file mode 100644 index 000000000000..555cd74cefb8 --- /dev/null +++ b/users/nchristus/nchristus.c @@ -0,0 +1,18 @@ +/* +Copyright 2020 Nick Christus @nchristus + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#include "nchristus.h" diff --git a/users/nchristus/nchristus.h b/users/nchristus/nchristus.h new file mode 100644 index 000000000000..751b5c8f5296 --- /dev/null +++ b/users/nchristus/nchristus.h @@ -0,0 +1,87 @@ +/* +Copyright 2020 Nick Christus @nchristus + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License 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 + +// Define layer names +enum userspace_layers { + _QWRTY = 0, + _LOWER, + _RAISE, + _ARROW, + _FNCTN, + _ADJST +}; + +// CTRL / ESC +#define CTL_ESC CTL_T(KC_ESC) + +// Force quit dialog +#define C_O_ESC LALT(LGUI(KC_ESC)) + +// Mac lock +#define MAC_LOK LCTL(LGUI(KC_Q)) + +// 1Password +#define OPW_OPN LALT(LGUI(KC_BSLS)) +#define OPW_CPY S(LGUI(KC_C)) + +// Screenshotting +#define SCR_FLL S(LGUI(KC_3)) +#define SCR_CRP S(LGUI(KC_4)) + +// FSNotes +#define FSNOTES LALT(LGUI(LSFT(LCTL(KC_0)))) + +#if (!defined(LAYOUT) && defined(KEYMAP)) + #define LAYOUT KEYMAP +#endif + +#define KEYMAP_wrapper(...) LAYOUT(__VA_ARGS__) +#define LAYOUT_wrapper(...) LAYOUT(__VA_ARGS__) +#define LAYOUT_ortho_4x12_wrapper(...) LAYOUT_ortho_4x12(__VA_ARGS__) + +#define ___________________BLANK___________________ _______, _______, _______, _______, _______ + +#define __________________QWERTYL1_________________ KC_Q, KC_W, KC_E, KC_R, KC_T +#define __________________QWERTYR1_________________ KC_Y, KC_U, KC_I, KC_O, KC_P + +#define __________________QWERTYL2_________________ KC_A, KC_S, KC_D, KC_F, KC_G +#define __________________QWERTYR2_________________ KC_H, KC_J, KC_K, KC_L, KC_SCLN + +#define __________________QWERTYL3_________________ KC_Z, KC_X, KC_C, KC_V, KC_B +#define __________________QWERTYR3_________________ KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH + +#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 ________________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 _________________LOWER_L1__________________ ________________NUMBER_LEFT________________ +#define _________________LOWER_L2__________________ KC_MINS, KC_PLUS, KC_LBRC, KC_RBRC, KC_BSLS + +#define _________________LOWER_R1__________________ ________________NUMBER_RIGHT_______________ +#define _________________LOWER_R2__________________ KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, _______ + +#define _________________RAISE_L1__________________ KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC +#define _________________RAISE_L2__________________ ___________________BLANK___________________ + +#define _________________RAISE_R1__________________ KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN +#define _________________RAISE_R2__________________ KC_UNDS, KC_EQL, KC_LCBR, KC_RCBR, KC_PIPE diff --git a/users/nchristus/rules.mk b/users/nchristus/rules.mk new file mode 100644 index 000000000000..e69de29bb2d1 From 6e948feb6a33bcd1da45c5a590d0e6c241e1d879 Mon Sep 17 00:00:00 2001 From: Ryan Date: Thu, 10 Sep 2020 00:00:27 +1000 Subject: [PATCH 772/930] Use the force when flashing with dfu-programmer (#10070) --- tmk_core/avr.mk | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tmk_core/avr.mk b/tmk_core/avr.mk index 04ae16224691..3cb34dc66503 100644 --- a/tmk_core/avr.mk +++ b/tmk_core/avr.mk @@ -120,7 +120,7 @@ define EXEC_DFU if $(DFU_PROGRAMMER) --version 2>&1 | $(GREP) -q 0.7 ; then\ $(DFU_PROGRAMMER) $(MCU) erase --force; \ if [ "$(1)" ]; then \ - $(DFU_PROGRAMMER) $(MCU) flash --eeprom $(QUANTUM_PATH)/split_common/$(1);\ + $(DFU_PROGRAMMER) $(MCU) flash --force --eeprom $(QUANTUM_PATH)/split_common/$(1);\ fi; \ else \ $(DFU_PROGRAMMER) $(MCU) erase; \ @@ -128,7 +128,7 @@ define EXEC_DFU $(DFU_PROGRAMMER) $(MCU) flash-eeprom $(QUANTUM_PATH)/split_common/$(1);\ fi; \ fi; \ - $(DFU_PROGRAMMER) $(MCU) flash $(BUILD_DIR)/$(TARGET).hex;\ + $(DFU_PROGRAMMER) $(MCU) flash --force $(BUILD_DIR)/$(TARGET).hex;\ $(DFU_PROGRAMMER) $(MCU) reset endef @@ -141,7 +141,7 @@ dfu-start: dfu-ee: $(BUILD_DIR)/$(TARGET).hex $(BUILD_DIR)/$(TARGET).eep if $(DFU_PROGRAMMER) --version 2>&1 | $(GREP) -q 0.7 ; then\ - $(DFU_PROGRAMMER) $(MCU) flash --eeprom $(BUILD_DIR)/$(TARGET).eep;\ + $(DFU_PROGRAMMER) $(MCU) flash --force --eeprom $(BUILD_DIR)/$(TARGET).eep;\ else\ $(DFU_PROGRAMMER) $(MCU) flash-eeprom $(BUILD_DIR)/$(TARGET).eep;\ fi From 3d4f0028d60cebc829ac9c947d1a61cc840d05c0 Mon Sep 17 00:00:00 2001 From: Callum Oakley Date: Wed, 9 Sep 2020 23:37:34 +0100 Subject: [PATCH 773/930] [Keymap] major keymap overhaul (#10185) * experiment with userspace * reorganise * readme * missing oneshot shift from ignored keys * recombine hands in layout macro --- keyboards/planck/keymaps/callum/keymap.c | 260 ------------------- keyboards/planck/keymaps/callum/readme.md | 30 --- keyboards/planck/keymaps/callum/rules.mk | 7 - layouts/community/ortho_4x12/callum/config.h | 14 + layouts/community/ortho_4x12/callum/keymap.c | 1 + users/callum/callum.c | 130 ++++++++++ users/callum/oneshot.c | 57 ++++ users/callum/oneshot.h | 31 +++ users/callum/readme.md | 99 +++++++ users/callum/rules.mk | 3 + users/callum/swapper.c | 27 ++ users/callum/swapper.h | 20 ++ 12 files changed, 382 insertions(+), 297 deletions(-) delete mode 100644 keyboards/planck/keymaps/callum/keymap.c delete mode 100644 keyboards/planck/keymaps/callum/readme.md delete mode 100644 keyboards/planck/keymaps/callum/rules.mk create mode 100644 layouts/community/ortho_4x12/callum/config.h create mode 100644 layouts/community/ortho_4x12/callum/keymap.c create mode 100644 users/callum/callum.c create mode 100644 users/callum/oneshot.c create mode 100644 users/callum/oneshot.h create mode 100644 users/callum/readme.md create mode 100644 users/callum/rules.mk create mode 100644 users/callum/swapper.c create mode 100644 users/callum/swapper.h diff --git a/keyboards/planck/keymaps/callum/keymap.c b/keyboards/planck/keymaps/callum/keymap.c deleted file mode 100644 index 50c0122a903e..000000000000 --- a/keyboards/planck/keymaps/callum/keymap.c +++ /dev/null @@ -1,260 +0,0 @@ -#include "planck.h" -#include "action_layer.h" - -#define a KC_A -#define b KC_B -#define c KC_C -#define d KC_D -#define e KC_E -#define f KC_F -#define g KC_G -#define h KC_H -#define i KC_I -#define j KC_J -#define k KC_K -#define l KC_L -#define m KC_M -#define n KC_N -#define o KC_O -#define p KC_P -#define q KC_Q -#define r KC_R -#define s KC_S -#define t KC_T -#define u KC_U -#define v KC_V -#define w KC_W -#define x KC_X -#define y KC_Y -#define z KC_Z - -#define lalt KC_LALT -#define lctl KC_LCTL -#define lsft KC_LSFT -#define ralt KC_RALT -#define rctl KC_RCTL -#define rsft KC_RSFT - -#define n0 KC_0 -#define n1 KC_1 -#define n2 KC_2 -#define n3 KC_3 -#define n4 KC_4 -#define n5 KC_5 -#define n6 KC_6 -#define n7 KC_7 -#define n8 KC_8 -#define n9 KC_9 - -#define ampr KC_AMPR -#define astr KC_ASTR -#define at KC_AT -#define bsls KC_BSLS -#define bspc KC_BSPC -#define caps KC_CAPS -#define circ KC_CIRC -#define comm KC_COMM -#define dash A(KC_MINS) // en-dash (–); or with shift: em-dash (—) -#define del KC_DEL -#define dlr KC_DLR -#define dot KC_DOT -#define ent KC_ENT -#define eql KC_EQL -#define esc KC_ESC -#define exlm KC_EXLM -#define grv KC_GRV -#define hash KC_HASH -#define lbrc KC_LBRC -#define lcbr KC_LCBR -#define lprn KC_LPRN -#define mins KC_MINS -#define perc KC_PERC -#define pipe KC_PIPE -#define plus KC_PLUS -#define quot KC_QUOT -#define rbrc KC_RBRC -#define rcbr KC_RCBR -#define rprn KC_RPRN -#define scln KC_SCLN -#define slsh KC_SLSH -#define spc KC_SPC -#define tab KC_TAB -#define tild KC_TILD - -#define down KC_DOWN -#define home G(KC_LEFT) -#define end G(KC_RGHT) -#define up KC_UP -#define pgdn KC_PGDN -#define pgup KC_PGUP -#define left KC_LEFT -#define rght KC_RGHT - -#define tabl G(S(KC_LBRC)) -#define tabr G(S(KC_RBRC)) -#define fwd G(KC_RBRC) -#define back G(KC_LBRC) -#define slup S(A(KC_UP)) // Previous unread in Slack -#define sldn S(A(KC_DOWN)) // Next unread in Slack - -#define ctl1 C(KC_1) // Desktop 1 (6 with shift) -#define ctl2 C(KC_2) // Desktop 2 (7 with shift) -#define ctl3 C(KC_3) // Desktop 3 (8 with shift) -#define ctl4 C(KC_4) // Desktop 4 (9 with shift) -#define ctl5 C(KC_5) // Desktop 5 (10 with shift) -#define ctl6 C(KC_6) // Screenshot -#define ctl7 C(KC_7) // Brightness up -#define ctl8 C(KC_8) // Brightness down - -#define f1 KC_F1 -#define f2 KC_F2 -#define f3 KC_F3 -#define f4 KC_F4 -#define f5 KC_F5 -#define f6 KC_F6 -#define f7 KC_F7 -#define f8 KC_F8 -#define f9 KC_F9 -#define f10 KC_F10 -#define f11 KC_F11 -#define f12 KC_F12 -#define f13 KC_F13 -#define f14 KC_F14 -#define f15 KC_F15 -#define f16 KC_F16 -#define f17 KC_F17 -#define f18 KC_F18 -#define f19 KC_F19 -#define f20 KC_F20 - -#define mute KC_MUTE -#define next KC_MNXT -#define play KC_MPLY -#define prev KC_MPRV -#define vold KC_VOLD -#define volu KC_VOLU - -#define symb MO(SYMB) -#define move MO(MOVE) -#define func MO(FUNC) - -#define rset RESET -#define powr KC_POWER - -#define ____ KC_TRNS -#define xxxx KC_NO - -extern keymap_config_t keymap_config; - -enum planck_layers { - BASE, - SYMB, - MOVE, - FUNC, -}; - -enum planck_keycodes { - // Curly quotes - lcqt = SAFE_RANGE, - rcqt, - - // "Smart" mods - cmd, -}; - -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [BASE] = LAYOUT_planck_grid( - tab, q, w, f, p, g, j, l, u, y, scln, mins, - bspc, a, r, s, t, d, h, n, e, i, o, quot, - lsft, z, x, c, v, b, k, m, comm, dot, slsh, rsft, - func, lctl, lalt, cmd, move, ent, spc, symb, cmd, ralt, rctl, func - ), - - [SYMB] = LAYOUT_planck_grid( - esc, n7, n5, n3, n1, n9, n8, n0, n2, n4, n6, dash, - lcqt, at, dlr, eql, lprn, lbrc, rbrc, rprn, astr, hash, plus, rcqt, - ____, grv, pipe, bsls, lcbr, tild, circ, rcbr, ampr, exlm, perc, ____, - ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____ - ), - - [MOVE] = LAYOUT_planck_grid( - esc, ctl1, ctl2, ctl3, ctl4, ctl5, ctl6, home, up, end, xxxx, xxxx, - del, play, volu, tabl, tabr, slup, ctl7, left, down, rght, caps, xxxx, - ____, mute, vold, back, fwd, sldn, ctl8, pgdn, pgup, xxxx, xxxx, ____, - ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____ - ), - - [FUNC] = LAYOUT_planck_grid( - rset, f7, f5, f3, f1, f9, f8, f10, f2, f4, f6, xxxx, - xxxx, f17, f15, f13, f11, f19, f18, f20, f12, f14, f16, xxxx, - ____, xxxx, xxxx, xxxx, xxxx, xxxx, xxxx, xxxx, xxxx, xxxx, xxxx, ____, - ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____ - ), -}; - -bool send_string_if_keydown( - keyrecord_t *record, - const char *unshifted, - const char *shifted) { - if (record->event.pressed) { - if (shifted) { - uint8_t shifts = get_mods() & MOD_MASK_SHIFT; - if (shifts) { - del_mods(shifts); - send_string(shifted); - add_mods(shifts); - } else { - send_string(unshifted); - } - } else { - send_string(unshifted); - } - } - return true; -} - -// Holding both cmd keys will instead register as cmd + ctl -bool smart_cmd(keyrecord_t *record) { - static int cmd_keys_down = 0; - - if (record->event.pressed) { - if (cmd_keys_down == 0) { - register_code(KC_LCMD); - } else { - register_code(KC_LCTL); - } - cmd_keys_down++; - } else { - if (cmd_keys_down == 1) { - unregister_code(KC_LCMD); - } else { - unregister_code(KC_LCTL); - } - cmd_keys_down--; - } - return true; -} - -bool process_record_user(uint16_t keycode, keyrecord_t *record) { - switch (keycode) { - // The macOS shortcuts for curly quotes are horrible, so this rebinds - // them so that shift toggles single–double instead of left–right, and - // then both varieties of left quote can share one key, and both - // varieties of right quote share another. - case lcqt: - return send_string_if_keydown( - record, - SS_LALT("]"), // left single quote (‘) - SS_LALT("[")); // left double quote (“) - case rcqt: - return send_string_if_keydown( - record, - SS_LALT(SS_LSFT("]")), // right single quote (’) - SS_LALT(SS_LSFT("["))); // right double quote (”) - - // cmd + cmd -> cmd + ctl - case cmd: - return smart_cmd(record); - } - return true; -} diff --git a/keyboards/planck/keymaps/callum/readme.md b/keyboards/planck/keymaps/callum/readme.md deleted file mode 100644 index 471de2b741bf..000000000000 --- a/keyboards/planck/keymaps/callum/readme.md +++ /dev/null @@ -1,30 +0,0 @@ -# callum’s planck layout - -This is a layout for the grid planck, built with a few ideals in mind: - -- Consistent and minimal response times should be maintained. Keys that react - differently depending on whether they are tapped or held, keys that react - differently if they are double tapped, etc. should be avoided – they - inevitably send their keycode later than a normal key – interrupting the - immediate feedback from the screen. Therefore we restrict ourselves to - chording as our only means of getting more than one symbol out of a single - physical key. - -- The hands should never need to leave the home position. The usual culprit for - this is the arrow cluster, so the arrow cluster should be as close to home as - possible. - -- There should be two of every modifier (one on each side), otherwise certain - long key combinations become hard to make. - -- It should be possible to do things you might want to do while using the mouse - with only the left hand (e.g. change tabs, navigate back or forwards in - browser history). - -- Symbols should be arranged so that the most frequently used are easiest to - reach. This includes numbers, and lower numbers are more commonly used than - higher ones. (number arrangement borrowed from [dustypomeleau’s minidox - layout][]). - -[dustypomeleau’s minidox layout]: https://github.com/qmk/qmk_firmware/tree/master/keyboards/minidox/keymaps/dustypomerleau -[keymap.c]: keymap.c diff --git a/keyboards/planck/keymaps/callum/rules.mk b/keyboards/planck/keymaps/callum/rules.mk deleted file mode 100644 index 9615222d1bde..000000000000 --- a/keyboards/planck/keymaps/callum/rules.mk +++ /dev/null @@ -1,7 +0,0 @@ -BOOTMAGIC_ENABLE = no -MOUSEKEY_ENABLE = no -CONSOLE_ENABLE = no -COMMAND_ENABLE = yes -MIDI_ENABLE = no -AUDIO_ENABLE = yes -RGBLIGHT_ENABLE = no diff --git a/layouts/community/ortho_4x12/callum/config.h b/layouts/community/ortho_4x12/callum/config.h new file mode 100644 index 000000000000..8034fe51b6f8 --- /dev/null +++ b/layouts/community/ortho_4x12/callum/config.h @@ -0,0 +1,14 @@ +#pragma once + +#define LAYOUT_callum( \ + KEY00, KEY01, KEY02, KEY03, KEY04, KEY05, KEY06, KEY07, KEY08, KEY09, \ + KEY10, KEY11, KEY12, KEY13, KEY14, KEY15, KEY16, KEY17, KEY18, KEY19, \ + KEY20, KEY21, KEY22, KEY23, KEY24, KEY25, KEY26, KEY27, KEY28, KEY29, \ + KEY30, KEY31, KEY32, KEY33 \ +) \ +LAYOUT_ortho_4x12( \ + KEY00, KEY01, KEY02, KEY03, KEY04, KC_NO, KC_NO, KEY05, KEY06, KEY07, KEY08, KEY09, \ + KEY10, KEY11, KEY12, KEY13, KEY14, KC_NO, KC_NO, KEY15, KEY16, KEY17, KEY18, KEY19, \ + KEY20, KEY21, KEY22, KEY23, KEY24, KC_NO, KC_NO, KEY25, KEY26, KEY27, KEY28, KEY29, \ + KC_NO, KC_NO, KC_NO, KEY30, KEY31, KC_NO, KC_NO, KEY32, KEY33, KC_NO, KC_NO, KC_NO \ +) diff --git a/layouts/community/ortho_4x12/callum/keymap.c b/layouts/community/ortho_4x12/callum/keymap.c new file mode 100644 index 000000000000..acff75905dc7 --- /dev/null +++ b/layouts/community/ortho_4x12/callum/keymap.c @@ -0,0 +1 @@ +// Intentionally empty. See /users/callum/readme.md. diff --git a/users/callum/callum.c b/users/callum/callum.c new file mode 100644 index 000000000000..4661902af546 --- /dev/null +++ b/users/callum/callum.c @@ -0,0 +1,130 @@ +#include QMK_KEYBOARD_H + +#include "oneshot.h" +#include "swapper.h" + +#define HOME G(KC_LEFT) +#define END G(KC_RGHT) +#define FWD G(KC_RBRC) +#define BACK G(KC_LBRC) +#define TABL G(S(KC_LBRC)) +#define TABR G(S(KC_RBRC)) +#define SPCL A(G(KC_LEFT)) +#define SPCR A(G(KC_RGHT)) +#define LA_SYM MO(SYM) +#define LA_NAV MO(NAV) + +enum layers { + DEF, + SYM, + NAV, + NUM, +}; + +enum keycodes { + // Custom oneshot mod implementation with no timers. + OS_SHFT = SAFE_RANGE, + OS_CTRL, + OS_ALT, + OS_CMD, + + SW_WIN, // Switch to next window (cmd-tab) + SW_LANG, // Switch to next input language (ctl-spc) +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [DEF] = LAYOUT_callum( + KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_QUOT, + KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, + KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, + LA_NAV, KC_LSFT, KC_SPC, LA_SYM + ), + + [SYM] = LAYOUT_callum( + KC_ESC, KC_LBRC, KC_LCBR, KC_LPRN, KC_TILD, KC_CIRC, KC_RPRN, KC_RCBR, KC_RBRC, KC_GRV, + KC_MINS, KC_ASTR, KC_EQL, KC_UNDS, KC_DLR, KC_HASH, OS_CMD, OS_ALT, OS_CTRL, OS_SHFT, + KC_PLUS, KC_PIPE, KC_AT, KC_BSLS, KC_PERC, XXXXXXX, KC_AMPR, KC_SCLN, KC_COLN, KC_EXLM, + _______, _______, _______, _______ + ), + + [NAV] = LAYOUT_callum( + KC_TAB, SW_WIN, TABL, TABR, KC_VOLU, RESET, HOME, KC_UP, END, KC_DEL, + OS_SHFT, OS_CTRL, OS_ALT, OS_CMD, KC_VOLD, KC_CAPS, KC_LEFT, KC_DOWN, KC_RGHT, KC_BSPC, + SPCL, SPCR, BACK, FWD, KC_MPLY, XXXXXXX, KC_PGDN, KC_PGUP, SW_LANG, KC_ENT, + _______, _______, _______, _______ + ), + + [NUM] = LAYOUT_callum( + KC_7, KC_5, KC_3, KC_1, KC_9, KC_8, KC_0, KC_2, KC_4, KC_6, + OS_SHFT, OS_CTRL, OS_ALT, OS_CMD, KC_F11, KC_F10, OS_CMD, OS_ALT, OS_CTRL, OS_SHFT, + KC_F7, KC_F5, KC_F3, KC_F1, KC_F9, KC_F8, KC_F12, KC_F2, KC_F4, KC_F6, + _______, _______, _______, _______ + ), +}; + +bool is_oneshot_cancel_key(uint16_t keycode) { + switch (keycode) { + case LA_SYM: + case LA_NAV: + return true; + default: + return false; + } +} + +bool is_oneshot_ignored_key(uint16_t keycode) { + switch (keycode) { + case LA_SYM: + case LA_NAV: + case KC_LSFT: + case OS_SHFT: + case OS_CTRL: + case OS_ALT: + case OS_CMD: + return true; + default: + return false; + } +} + +bool sw_win_active = false; +bool sw_lang_active = false; + +oneshot_state os_shft_state = os_up_unqueued; +oneshot_state os_ctrl_state = os_up_unqueued; +oneshot_state os_alt_state = os_up_unqueued; +oneshot_state os_cmd_state = os_up_unqueued; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + update_swapper( + &sw_win_active, KC_LGUI, KC_TAB, SW_WIN, + keycode, record + ); + update_swapper( + &sw_lang_active, KC_LCTL, KC_SPC, SW_LANG, + keycode, record + ); + + update_oneshot( + &os_shft_state, KC_LSFT, OS_SHFT, + keycode, record + ); + update_oneshot( + &os_ctrl_state, KC_LCTL, OS_CTRL, + keycode, record + ); + update_oneshot( + &os_alt_state, KC_LALT, OS_ALT, + keycode, record + ); + update_oneshot( + &os_cmd_state, KC_LCMD, OS_CMD, + keycode, record + ); + + return true; +} + +layer_state_t layer_state_set_user(layer_state_t state) { + return update_tri_layer_state(state, SYM, NAV, NUM); +} diff --git a/users/callum/oneshot.c b/users/callum/oneshot.c new file mode 100644 index 000000000000..33ec3895e2d6 --- /dev/null +++ b/users/callum/oneshot.c @@ -0,0 +1,57 @@ +#include "oneshot.h" + +void update_oneshot( + oneshot_state *state, + uint16_t mod, + uint16_t trigger, + uint16_t keycode, + keyrecord_t *record +) { + if (keycode == trigger) { + if (record->event.pressed) { + // Trigger keydown + if (*state == os_up_unqueued) { + register_code(mod); + } + *state = os_down_unused; + } else { + // Trigger keyup + switch (*state) { + case os_down_unused: + // If we didn't use the mod while trigger was held, queue it. + *state = os_up_queued; + break; + case os_down_used: + // If we did use the mod while trigger was held, unregister it. + *state = os_up_unqueued; + unregister_code(mod); + break; + default: + break; + } + } + } else { + if (record->event.pressed) { + if (is_oneshot_cancel_key(keycode) && *state != os_up_unqueued) { + // Cancel oneshot on designated cancel keydown. + *state = os_up_unqueued; + unregister_code(mod); + } + } else { + if (!is_oneshot_ignored_key(keycode)) { + // On non-ignored keyup, consider the oneshot used. + switch (*state) { + case os_down_unused: + *state = os_down_used; + break; + case os_up_queued: + *state = os_up_unqueued; + unregister_code(mod); + break; + default: + break; + } + } + } + } +} diff --git a/users/callum/oneshot.h b/users/callum/oneshot.h new file mode 100644 index 000000000000..a6b8e17742a4 --- /dev/null +++ b/users/callum/oneshot.h @@ -0,0 +1,31 @@ +#pragma once + +#include QMK_KEYBOARD_H + +// Represents the four states a oneshot key can be in +typedef enum { + os_up_unqueued, + os_up_queued, + os_down_unused, + os_down_used, +} oneshot_state; + +// Custom oneshot mod implementation that doesn't rely on timers. If a mod is +// used while it is held it will be unregistered on keyup as normal, otherwise +// it will be queued and only released after the next non-mod keyup. +void update_oneshot( + oneshot_state *state, + uint16_t mod, + uint16_t trigger, + uint16_t keycode, + keyrecord_t *record +); + +// To be implemented by the consumer. Defines keys to cancel oneshot mods. +bool is_oneshot_cancel_key(uint16_t keycode); + +// To be implemented by the consumer. Defines keys to ignore when determining +// whether a oneshot mod has been used. Setting this to modifiers and layer +// change keys allows stacking multiple oneshot modifiers, and carrying them +// between layers. +bool is_oneshot_ignored_key(uint16_t keycode); diff --git a/users/callum/readme.md b/users/callum/readme.md new file mode 100644 index 000000000000..24b71038b6cc --- /dev/null +++ b/users/callum/readme.md @@ -0,0 +1,99 @@ +A keymap for 34 keys with 4 layers and no mod-tap. + +![](https://raw.githubusercontent.com/callum-oakley/keymap/master/keymap.svg) + +## Details + +- Hold `sym` to activate the symbols layer. +- Hold `nav` to activate the navigation layer. +- Hold `sym` and `nav` together to activate the numbers layer. +- The home row modifiers are oneshot so that it's possible to modify the + keys on the base layer, where there are no dedicated modifiers. +- `swap win` sends `cmd-tab` for changing focus in macOS but holds `cmd` + between consecutive presses. +- `swap lang` behaves similarly but sends `ctrl-space`, for changing input + language in macOS. + +## Oneshot modifiers + +The home row modifiers can either be held and used as normal, or if no other +keys are pressed while a modifier is down, the modifier will be queued and +applied to the next non-modifier keypress. For example to type `shift-cmd-t`, +type `sym-o-n` (or `nav-a-t`), release, then hit `t`. + +You can and should hit chords as fast as you like because there are no timers +involved. + +Cancel unused modifiers by tapping `nav` or `sym`. + +### Userspace oneshot implementation + +For my usage patterns I was hitting stuck modifiers frequently with [`OSM`][] +(maybe related to [#3963][]?). I'd like to try to help fix this in QMK proper, +but implementing oneshot mods in userspace first was: + +1. Fun. +2. A good exploration of how I think oneshot mods should work without timers. + +So in the meantime, this [userspace oneshot implementation][] is working well +for me. + +## Swapper + +`swap win` sends `cmd-tab`, but holds `cmd` between consecutive keypresses. +`cmd` is released when some other key is hit or released. For example + + nav down, swap win, swap win, nav up -> cmd down, tab, tab, cmd up + nav down, swap win, enter -> cmd down, tab, cmd up, enter + +`swap lang` sends `ctrl-space` to swap input languages in macOS and behaves +similarly. + +[Swapper implementation.][] + +## Why no mod-tap? + +[Mod-tap][] seems to be by far the most popular tool among users of tiny +keyboards to answer the question of where to put the modifiers, and in the +right hands it can clearly work brilliantly, but I've always found myself error +prone and inconsistent with it. + +With dedicated modifiers, there are three ways one might type `ctrl-c`: + + ctrl down, ctrl up, c down, c up + ctrl down, c down, ctrl up, c up + ctrl down, c down, c up, ctrl up + +Basically, you never have to worry about the keyups, as long as the keydowns +occur in the correct order. Similarly, there are three ways one might type +`ac`: + + a down, a up, c down, c up + a down, c down, a up, c up + a down, c down, c up, a up + +Replace `a` with `ctrl` and this is exactly what we had before! So if we want +to put `a` and `ctrl` on the same key we have a problem, because without +considering timing these sequences become ambiguous. So let's consider timing. + +The solution to the ambiguity that QMK employs is to configure the +`TAPPING_TERM` and consider a key held rather than tapped if it is held for +long enough. My problem with this is that it forces you to slow down to use +modifiers. By its very nature the tapping term must be longer than the longest +you would ever hold a key while typing on the slowest laziest Sunday afternoon. +I'm not typing at 100% speed at all times, but when I am, having to think about +timing and consciously slow down for certain actions never fails to trip me up. + +So alas, mod-tap is not for me -- but if it works for you, more power to you. +:) + +* * * + +[My github][] + +[`OSM`]: /docs/one_shot_keys.md +[#3963]: https://github.com/qmk/qmk_firmware/issues/3963 +[userspace oneshot implementation]: oneshot.c +[swapper implementation.]: swapper.c +[Mod-tap]: https://github.com/qmk/qmk_firmware/blob/master/docs/mod_tap.md +[My github]: https://github.com/callum-oakley diff --git a/users/callum/rules.mk b/users/callum/rules.mk new file mode 100644 index 000000000000..2d98e02c55b1 --- /dev/null +++ b/users/callum/rules.mk @@ -0,0 +1,3 @@ +SRC += callum.c +SRC += oneshot.c +SRC += swapper.c diff --git a/users/callum/swapper.c b/users/callum/swapper.c new file mode 100644 index 000000000000..736b2fef0c1b --- /dev/null +++ b/users/callum/swapper.c @@ -0,0 +1,27 @@ +#include "swapper.h" + +void update_swapper( + bool *active, + uint16_t cmdish, + uint16_t tabish, + uint16_t trigger, + uint16_t keycode, + keyrecord_t *record +) { + if (keycode == trigger) { + if (record->event.pressed) { + if (!*active) { + *active = true; + register_code(cmdish); + } + register_code(tabish); + } else { + unregister_code(tabish); + // Don't unregister cmdish until some other key is hit or released. + } + } else if (*active) { + unregister_code(cmdish); + *active = false; + } +} + diff --git a/users/callum/swapper.h b/users/callum/swapper.h new file mode 100644 index 000000000000..ad47fd96cec9 --- /dev/null +++ b/users/callum/swapper.h @@ -0,0 +1,20 @@ +#pragma once + +#include QMK_KEYBOARD_H + +// Implements cmd-tab like behaviour on a single key. On first tap of trigger +// cmdish is held and tabish is tapped -- cmdish then remains held until some +// other key is hit or released. For example: +// +// trigger, trigger, a -> cmd down, tab, tab, cmd up, a +// nav down, trigger, nav up -> nav down, cmd down, tab, cmd up, nav up +// +// This behaviour is useful for more than just cmd-tab, hence: cmdish, tabish. +void update_swapper( + bool *active, + uint16_t cmdish, + uint16_t tabish, + uint16_t trigger, + uint16_t keycode, + keyrecord_t *record +); From 3d3c2e1d3fd3b3ca063491c8f623143db56dada7 Mon Sep 17 00:00:00 2001 From: Alvaro Muente <40742045+alvaromuente@users.noreply.github.com> Date: Fri, 11 Sep 2020 02:03:49 -0500 Subject: [PATCH 774/930] Add VIA support for JJ40 (#10263) * via support * Removing backspaces from jj40 keymap.c * Updating jj40/via/rules.mk --- keyboards/jj40/keymaps/via/keymap.c | 93 +++++++++++++++++++++++++++++ keyboards/jj40/keymaps/via/rules.mk | 4 ++ 2 files changed, 97 insertions(+) create mode 100644 keyboards/jj40/keymaps/via/keymap.c create mode 100755 keyboards/jj40/keymaps/via/rules.mk diff --git a/keyboards/jj40/keymaps/via/keymap.c b/keyboards/jj40/keymaps/via/keymap.c new file mode 100644 index 000000000000..0e0e469abc2e --- /dev/null +++ b/keyboards/jj40/keymaps/via/keymap.c @@ -0,0 +1,93 @@ +/* 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 + +#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 |Raise | Left | Down | Up |Right | + * `-----------------------------------------------------------------------------------' + */ +[0] = 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, + 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, 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 | + * `-----------------------------------------------------------------------------------' + */ +[1] = 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_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 | + * `-----------------------------------------------------------------------------------' + */ +[2] = 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_MNXT, KC_VOLD, KC_VOLU, KC_MPLY +), + +/* Adjust (Lower + Raise) + * ,-----------------------------------------------------------------------------------. + * | | Reset| | | | | | | | | | Del | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | | | | | | | | | | | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | | | | | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | + * `-----------------------------------------------------------------------------------' + */ +[3] = LAYOUT_planck_mit( + _______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL, + _______, _______, BL_TOGG, BL_STEP, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, RGB_TOG, RGB_MOD, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ +) +}; diff --git a/keyboards/jj40/keymaps/via/rules.mk b/keyboards/jj40/keymaps/via/rules.mk new file mode 100755 index 000000000000..58ecfdf5c2be --- /dev/null +++ b/keyboards/jj40/keymaps/via/rules.mk @@ -0,0 +1,4 @@ +VIA_ENABLE = yes +LTO_ENABLE = yes + +RGBLIGHT_ENABLE = yes From 6de4a53c7cb9a0d2dc4cbbe5dcbf19604daca465 Mon Sep 17 00:00:00 2001 From: yulei Date: Fri, 11 Sep 2020 17:28:23 +0800 Subject: [PATCH 775/930] [Keyboard] added SQUARE.X by iNETT Studio (#10066) * added SQUARE.X keyboard from the iNETT Studio * split to two sub directories * Apply suggestions from code review * Update keyboards/inett_studio/sqx/universal/universal.h * Apply suggestions from code review * update the matrix control keycodes settings * use the offical macro to the rgb matrix control * fixed led position issue * Apply suggestions from code review * removed the redundant #endif * update default keymap * Apply suggestions from code review * add license header --- keyboards/inett_studio/sqx/hotswap/config.h | 72 +++++++ keyboards/inett_studio/sqx/hotswap/hotswap.c | 191 +++++++++++++++++ keyboards/inett_studio/sqx/hotswap/hotswap.h | 66 ++++++ keyboards/inett_studio/sqx/hotswap/info.json | 12 ++ .../sqx/hotswap/keymaps/default/keymap.c | 34 +++ .../sqx/hotswap/keymaps/via/keymap.c | 48 +++++ .../sqx/hotswap/keymaps/via/rules.mk | 1 + keyboards/inett_studio/sqx/hotswap/readme.md | 13 ++ keyboards/inett_studio/sqx/hotswap/rules.mk | 27 +++ keyboards/inett_studio/sqx/universal/config.h | 72 +++++++ .../inett_studio/sqx/universal/info.json | 27 +++ .../sqx/universal/keymaps/default/keymap.c | 34 +++ .../sqx/universal/keymaps/via/keymap.c | 48 +++++ .../sqx/universal/keymaps/via/rules.mk | 1 + .../inett_studio/sqx/universal/readme.md | 13 ++ keyboards/inett_studio/sqx/universal/rules.mk | 25 +++ .../inett_studio/sqx/universal/universal.c | 194 ++++++++++++++++++ .../inett_studio/sqx/universal/universal.h | 141 +++++++++++++ 18 files changed, 1019 insertions(+) create mode 100644 keyboards/inett_studio/sqx/hotswap/config.h create mode 100644 keyboards/inett_studio/sqx/hotswap/hotswap.c create mode 100644 keyboards/inett_studio/sqx/hotswap/hotswap.h create mode 100644 keyboards/inett_studio/sqx/hotswap/info.json create mode 100644 keyboards/inett_studio/sqx/hotswap/keymaps/default/keymap.c create mode 100644 keyboards/inett_studio/sqx/hotswap/keymaps/via/keymap.c create mode 100644 keyboards/inett_studio/sqx/hotswap/keymaps/via/rules.mk create mode 100644 keyboards/inett_studio/sqx/hotswap/readme.md create mode 100644 keyboards/inett_studio/sqx/hotswap/rules.mk create mode 100644 keyboards/inett_studio/sqx/universal/config.h create mode 100644 keyboards/inett_studio/sqx/universal/info.json create mode 100644 keyboards/inett_studio/sqx/universal/keymaps/default/keymap.c create mode 100644 keyboards/inett_studio/sqx/universal/keymaps/via/keymap.c create mode 100644 keyboards/inett_studio/sqx/universal/keymaps/via/rules.mk create mode 100644 keyboards/inett_studio/sqx/universal/readme.md create mode 100644 keyboards/inett_studio/sqx/universal/rules.mk create mode 100644 keyboards/inett_studio/sqx/universal/universal.c create mode 100644 keyboards/inett_studio/sqx/universal/universal.h diff --git a/keyboards/inett_studio/sqx/hotswap/config.h b/keyboards/inett_studio/sqx/hotswap/config.h new file mode 100644 index 000000000000..a59ad3e7e3f6 --- /dev/null +++ b/keyboards/inett_studio/sqx/hotswap/config.h @@ -0,0 +1,72 @@ +/** + * config.h + * + Copyright 2020 astro + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License 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 0x694E //'iN' +#define PRODUCT_ID 0x5336 //'S6' +#define DEVICE_VER 0x0001 +#define MANUFACTURER iNETT Studio +#define PRODUCT SQUARE.X + +/* key matrix size */ +#define MATRIX_ROWS 5 +#define MATRIX_COLS 14 +#define MATRIX_ROW_PINS { F0, F1, F4, B7, D6} +#define MATRIX_COL_PINS { C7, C6, B6, B5, B4, F7, F6, F5, E6, B0, D2, D4, D5, D3 } +#define UNUSED_PINS +#define DIODE_DIRECTION ROW2COL + +/* 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 + + +//rgb light setting +#define RGBLIGHT_LIMIT_VAL 128 +#define RGBLED_NUM 18 +#define RGB_DI_PIN D7 +#define RGBLIGHT_ANIMATIONS +#define RGBLIGHT_HUE_STEP 8 +#define RGBLIGHT_SAT_STEP 8 +#define RGBLIGHT_VAL_STEP 8 + +//rgb matrix setting +#define DRIVER_1_LED_TOTAL 33 +#define DRIVER_2_LED_TOTAL 31 +#define DRIVER_ADDR_1 0b1110100 +#define DRIVER_ADDR_2 0b1110111 +#define DRIVER_COUNT 2 +#define DRIVER_LED_TOTAL (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL) + +#if defined(RGB_MATRIX_ENABLE) && defined(RGBLIGHT_ENABLE) + #define RGB_MATRIX_DISABLE_KEYCODES +#endif diff --git a/keyboards/inett_studio/sqx/hotswap/hotswap.c b/keyboards/inett_studio/sqx/hotswap/hotswap.c new file mode 100644 index 000000000000..773b0b0b0a78 --- /dev/null +++ b/keyboards/inett_studio/sqx/hotswap/hotswap.c @@ -0,0 +1,191 @@ +/** + * @file hotswap.c + * + Copyright 2020 astro + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . + */ + +#include "hotswap.h" + +#ifdef RGB_MATRIX_ENABLE +const is31_led g_is31_leds[DRIVER_LED_TOTAL] = { +/* Refer to IS31 manual for these locations + * driver + * | R location + * | | G location + * | | | B location + * | | | | */ +// left CA + {0, C1_1, C3_2, C4_2}, + {0, C1_2, C2_2, C4_3}, + {0, C1_3, C2_3, C3_3}, + {0, C1_4, C2_4, C3_4}, + {0, C1_5, C2_5, C3_5}, + {0, C1_6, C2_6, C3_6}, + {0, C1_7, C2_7, C3_7}, + {0, C1_8, C2_8, C3_8}, + + //{0, C5_1, C4_1, C6_1}, + //{0, C5_8, C4_8, C6_8}, + + {0, C9_1, C8_1, C7_1}, + {0, C9_2, C8_2, C7_2}, + //{0, C9_3, C8_3, C7_3}, + {0, C9_4, C8_4, C7_4}, + {0, C9_5, C8_5, C7_5}, + {0, C9_6, C8_6, C7_6}, + {0, C9_7, C8_7, C6_6}, + {0, C9_8, C7_7, C6_7}, +// left CB + {0, C1_9, C3_10, C4_10}, + {0, C1_10, C2_10, C4_11}, + {0, C1_11, C2_11, C3_11}, + {0, C1_12, C2_12, C3_12}, + {0, C1_13, C2_13, C3_13}, + {0, C1_14, C2_14, C3_14}, + {0, C1_15, C2_15, C3_15}, + {0, C1_16, C2_16, C3_16}, + + {0, C5_9, C4_9, C6_9}, + {0, C5_16, C4_16, C6_16}, + + {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, C9_15, C8_15, C6_14}, + {0, C9_16, C7_15, C6_15}, + +// right CA + {1, C1_1, C3_2, C4_2}, + {1, C1_2, C2_2, C4_3}, + {1, C1_3, C2_3, C3_3}, + {1, C1_4, C2_4, C3_4}, + {1, C1_5, C2_5, C3_5}, + {1, C1_6, C2_6, C3_6}, + {1, C1_7, C2_7, C3_7}, + {1, C1_8, C2_8, C3_8}, + + //{1, C5_1, C4_1, C6_1}, + //{1, C5_8, C4_8, C6_8}, + + {1, C9_1, C8_1, C7_1}, + {1, C9_2, C8_2, C7_2}, + {1, C9_3, C8_3, C7_3}, + {1, C9_4, C8_4, C7_4}, + {1, C9_5, C8_5, C7_5}, + {1, C9_6, C8_6, C7_6}, + {1, C9_7, C8_7, C6_6}, + {1, C9_8, C7_7, C6_7}, +// right CB + {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}, + //{1, C1_14, C2_14, C3_14}, + {1, C1_15, C2_15, C3_15}, + {1, C1_16, C2_16, C3_16}, + + //{1, C5_9, C4_9, C6_9}, + //{1, C5_16, C4_16, C6_16}, + + {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, C9_13, C8_13, C7_13}, + {1, C9_14, C8_14, C7_14}, + {1, C9_15, C8_15, C6_14}, + {1, C9_16, C7_15, C6_15}, +}; + +led_config_t g_led_config = { + { + { 18, 19, 20, 21, 22, 23, 24, 16, 17, 36, 37, 38, 39, 40}, + { 26, 27, 28, 29, 30, 31, 25, 48, 41, 42, 43, 44, 45, 46}, + { 8, 7, 0, 32, 33, 34, 35, 49, 50, 51, 52, 53, NO_LED, 47}, + { 9, NO_LED, 10, 1, 2, 3, 4, 5, 56, 55, 57, 58, 59, 54}, + { 14, 13, 12, 11, NO_LED, NO_LED, 6, 15, NO_LED, NO_LED, 60, 61, 62, 63}, + }, + { + { 48, 32},{ 48, 48},{ 64, 48},{ 80, 48},{ 96, 48},{112, 48},{112, 64},{ 32, 32}, + { 16, 32},{ 16, 48}, { 32, 48},{ 64, 64},{ 40, 64},{ 20, 64},{ 0, 64}, + + { 0, 0},{ 16, 0},{ 32, 0},{ 48, 0},{ 64, 0},{ 80, 0},{ 96, 0},{ 96, 16}, + { 0, 16},{ 16, 16}, + { 32, 16},{ 48, 16},{ 64, 16},{ 80, 16},{ 64, 32},{ 80, 32},{ 96, 32},{112, 32}, + + {112, 0},{128, 0},{144, 0},{160, 0},{176, 0},{192, 0},{208, 0},{224, 0}, + {128, 16},{144, 16},{160, 16},{176, 16},{192, 16},{216, 16},{216, 32},{112, 16}, + + {128, 32},{144, 32},{160, 32},{176, 32},{192, 32}, {224, 48},{144, 48}, + {128, 48},{160, 48},{176, 48},{192, 48},{160, 64},{180, 64},{200, 64},{224, 64} + }, + { + 4, 4, 4, 4, 4, 4, 4, 1, + 1, 1, 4, 1, 1, 1, 1, + + 1, 4, 4, 4, 4, 4, 4, 4, + 1, 4, + 4, 4, 4, 4, 4, 4, 4, 4, + + 4, 4, 4, 4, 4, 4, 1, 1, + 4, 4, 4, 4, 4, 1, 1, 4, + + 4, 4, 4, 4, 4, 1, 4, + 4, 4, 4, 1, 1, 1, 1, 1, + } +}; + +#endif //RGB_MATRIX_ENABLE + +bool process_record_kb(uint16_t keycode, keyrecord_t *record) { + if (record->event.pressed) { + switch(keycode) { +#if defined(RGB_MATRIX_DISABLE_KEYCODES) + case RGB_MATRIX_TOGGLE: // toggle rgb matrix + rgb_matrix_toggle(); + return false; + case RGB_MATRIX_STEP: + rgb_matrix_step(); + return false; + case RGB_MATRIX_INC_HUE: + rgb_matrix_increase_hue(); + return false; + case RGB_MATRIX_DEC_HUE: + rgb_matrix_decrease_hue(); + return false; + case RGB_MATRIX_INC_SAT: + rgb_matrix_increase_sat(); + return false; + case RGB_MATRIX_DEC_SAT: + rgb_matrix_decrease_sat(); + return false; + case RGB_MATRIX_INC_VAL: + rgb_matrix_increase_val(); + return false; + case RGB_MATRIX_DEC_VAL: + rgb_matrix_decrease_val(); + return false; +#endif + default: + break; + } + } + return true; +} diff --git a/keyboards/inett_studio/sqx/hotswap/hotswap.h b/keyboards/inett_studio/sqx/hotswap/hotswap.h new file mode 100644 index 000000000000..b879f7aaaf89 --- /dev/null +++ b/keyboards/inett_studio/sqx/hotswap/hotswap.h @@ -0,0 +1,66 @@ +/** + * @file hotswap.h + * + Copyright 2020 astro + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License 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 arguements +// The second converts the arguments into a two-dimensional array +#define LAYOUT_60_tsangan_hhkb( \ + 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, 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, KC_NO, k2e}, \ + {k30, KC_NO, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d}, \ + {k40, k42, k43, KC_NO, KC_NO, KC_NO, k47, k07, KC_NO, KC_NO, KC_NO, k49, k4a, k4b} \ +} + +#if defined(RGB_MATRIX_DISABLE_KEYCODES) +# ifndef RGB_MATRIX_TOGGLE +# define RGB_MATRIX_TOGGLE KC_F16 +# endif +# ifndef RGB_MATRIX_STEP +# define RGB_MATRIX_STEP KC_F17 +# endif +# ifndef RGB_MATRIX_INC_HUE +# define RGB_MATRIX_INC_HUE KC_F18 +# endif +# ifndef RGB_MATRIX_DEC_HUE +# define RGB_MATRIX_DEC_HUE KC_F19 +# endif +# ifndef RGB_MATRIX_INC_SAT +# define RGB_MATRIX_INC_SAT KC_F20 +# endif +# ifndef RGB_MATRIX_DEC_SAT +# define RGB_MATRIX_DEC_SAT KC_F21 +# endif +# ifndef RGB_MATRIX_INC_VAL +# define RGB_MATRIX_INC_VAL KC_F22 +# endif +# ifndef RGB_MATRIX_DEC_VAL +# define RGB_MATRIX_DEC_VAL KC_F23 +# endif +#endif diff --git a/keyboards/inett_studio/sqx/hotswap/info.json b/keyboards/inett_studio/sqx/hotswap/info.json new file mode 100644 index 000000000000..7180422c3de4 --- /dev/null +++ b/keyboards/inett_studio/sqx/hotswap/info.json @@ -0,0 +1,12 @@ +{ + "keyboard_name": "sqx", + "url": "", + "maintainer": "qmk", + "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}] + } + } + } diff --git a/keyboards/inett_studio/sqx/hotswap/keymaps/default/keymap.c b/keyboards/inett_studio/sqx/hotswap/keymaps/default/keymap.c new file mode 100644 index 000000000000..0e814cc98cb9 --- /dev/null +++ b/keyboards/inett_studio/sqx/hotswap/keymaps/default/keymap.c @@ -0,0 +1,34 @@ +/* +Copyright 2020 astro + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public 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_tsangan_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_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, KC_END, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1),KC_RCTL), + + [1] = 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_PSCR, + RESET, RGB_TOG,RGB_MOD,_______, KC_F16, KC_F17,_______,_______,_______,_______,_______,KC_PGUP,KC_PGDN,_______, + _______, _______,_______,_______,_______,_______,KC_LEFT,KC_DOWN, KC_UP,KC_RIGHT,KC_HOME, KC_END,_______, + _______, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, + _______,_______,_______, _______, _______,_______,_______), +}; diff --git a/keyboards/inett_studio/sqx/hotswap/keymaps/via/keymap.c b/keyboards/inett_studio/sqx/hotswap/keymaps/via/keymap.c new file mode 100644 index 000000000000..d9258169fa66 --- /dev/null +++ b/keyboards/inett_studio/sqx/hotswap/keymaps/via/keymap.c @@ -0,0 +1,48 @@ +/* +Copyright 2020 astro + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public 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_tsangan_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_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, TG(1),KC_RCTL), + + [1] = 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_PSCR, + RESET, RGB_TOG,RGB_MOD,_______, KC_F16, KC_F17,_______,_______,_______,_______,_______,KC_PGUP,KC_PGDN,_______, + _______, _______,_______,_______,_______,_______,KC_LEFT,KC_DOWN, KC_UP,KC_RIGHT,KC_HOME, KC_END,_______, + _______, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, + _______,_______,_______, _______, _______, TG(0),_______), + + [2] = LAYOUT_60_tsangan_hhkb( + _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, + _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, + _______, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, + _______, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, + _______,_______,_______, _______, _______, TG(0),_______), + + [3] = LAYOUT_60_tsangan_hhkb( + _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, + _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, + _______, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, + _______, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, + _______,_______,_______, _______, _______, TG(0),_______), +}; diff --git a/keyboards/inett_studio/sqx/hotswap/keymaps/via/rules.mk b/keyboards/inett_studio/sqx/hotswap/keymaps/via/rules.mk new file mode 100644 index 000000000000..1e5b99807cb7 --- /dev/null +++ b/keyboards/inett_studio/sqx/hotswap/keymaps/via/rules.mk @@ -0,0 +1 @@ +VIA_ENABLE = yes diff --git a/keyboards/inett_studio/sqx/hotswap/readme.md b/keyboards/inett_studio/sqx/hotswap/readme.md new file mode 100644 index 000000000000..faf5cc6a6ef4 --- /dev/null +++ b/keyboards/inett_studio/sqx/hotswap/readme.md @@ -0,0 +1,13 @@ +# iNETT Studio SQUARE.X hotswap + +A 60% keyboard from the iNETT Studio's SQUARE series. + +* Keyboard Maintainer: [astro](https://github.com/yulei) +* Hardware Supported: SQUARE.X hotswap +* Hardware Availability: [Geekhack Group Buy](https://geekhack.org/index.php?topic=107062.0) + +Make example for this keyboard (after setting up your build environment): + + make inett_studio/sqx/hotswap: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/inett_studio/sqx/hotswap/rules.mk b/keyboards/inett_studio/sqx/hotswap/rules.mk new file mode 100644 index 000000000000..80968787d512 --- /dev/null +++ b/keyboards/inett_studio/sqx/hotswap/rules.mk @@ -0,0 +1,27 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +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 = yes # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow +RGB_MATRIX_ENABLE = yes # Use RGB per key light +BLUETOOTH_ENABLE = no # Enable Bluetooth +AUDIO_ENABLE = no # Audio output + +LTO_ENABLE = yes # Reducing firmware size + +LAYOUTS = 60_tsangan_hhkb diff --git a/keyboards/inett_studio/sqx/universal/config.h b/keyboards/inett_studio/sqx/universal/config.h new file mode 100644 index 000000000000..a4a5b42c4d6e --- /dev/null +++ b/keyboards/inett_studio/sqx/universal/config.h @@ -0,0 +1,72 @@ +/** + * config.h + * + Copyright 2020 astro + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License 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 0x694E //'iN' +#define PRODUCT_ID 0x5336 //'S6' +#define DEVICE_VER 0x0001 +#define MANUFACTURER iNETT Studio +#define PRODUCT SQUARE.X + +/* key matrix size */ +#define MATRIX_ROWS 5 +#define MATRIX_COLS 14 +#define MATRIX_ROW_PINS { F0, F1, F4, B7, D6} +#define MATRIX_COL_PINS { C7, C6, B6, B5, B4, F7, F6, F5, E6, B0, D2, D4, D5, D3 } +#define UNUSED_PINS +#define DIODE_DIRECTION ROW2COL + +/* 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 + + +//rgb light setting +#define RGBLIGHT_LIMIT_VAL 128 +#define RGBLED_NUM 18 +#define RGB_DI_PIN D7 +#define RGBLIGHT_ANIMATIONS +#define RGBLIGHT_HUE_STEP 8 +#define RGBLIGHT_SAT_STEP 8 +#define RGBLIGHT_VAL_STEP 8 + +//rgb matrix setting +#define DRIVER_1_LED_TOTAL 36 +#define DRIVER_2_LED_TOTAL 36 +#define DRIVER_ADDR_1 0b1110100 +#define DRIVER_ADDR_2 0b1110111 +#define DRIVER_COUNT 2 +#define DRIVER_LED_TOTAL (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL) + +#if defined(RGB_MATRIX_ENABLE) && defined(RGBLIGHT_ENABLE) +# define RGB_MATRIX_DISABLE_KEYCODES +#endif diff --git a/keyboards/inett_studio/sqx/universal/info.json b/keyboards/inett_studio/sqx/universal/info.json new file mode 100644 index 000000000000..d0956b68028b --- /dev/null +++ b/keyboards/inett_studio/sqx/universal/info.json @@ -0,0 +1,27 @@ +{ + "keyboard_name": "sqx", + "url": "", + "maintainer": "qmk", + "width": 15, + "height": 5, + "layouts": { + "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, "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": { + "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": { + "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_60_iso": { + "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":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}, {"x":13.75, "y":1, "w":1.25, "h":2}, {"x":0, "y":3, "w":1.25}, {"x":1.25, "y":3}, {"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}] + }, + "LAYOUT_60_ansi_split_bs_rshift": { + "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.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}] + }, + "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}] + } + } + } diff --git a/keyboards/inett_studio/sqx/universal/keymaps/default/keymap.c b/keyboards/inett_studio/sqx/universal/keymaps/default/keymap.c new file mode 100644 index 000000000000..bd2869e247d6 --- /dev/null +++ b/keyboards/inett_studio/sqx/universal/keymaps/default/keymap.c @@ -0,0 +1,34 @@ +/* +Copyright 2020 astro + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public 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_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_F16, KC_F17,_______,_______,_______,_______,_______,KC_PGUP,KC_PGDN,_______, + _______, _______,_______,_______,_______,_______,KC_LEFT,KC_DOWN, KC_UP,KC_RIGHT,KC_HOME, KC_END,_______, + _______, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, + _______,_______,_______, _______, _______,_______,TG(0),_______), +}; diff --git a/keyboards/inett_studio/sqx/universal/keymaps/via/keymap.c b/keyboards/inett_studio/sqx/universal/keymaps/via/keymap.c new file mode 100644 index 000000000000..c58090d9d724 --- /dev/null +++ b/keyboards/inett_studio/sqx/universal/keymaps/via/keymap.c @@ -0,0 +1,48 @@ +/* +Copyright 2020 astro + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public 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_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_F16, KC_F17,_______,_______,_______,_______,_______,KC_PGUP,KC_PGDN,_______, + _______, _______,_______,_______,_______,_______,KC_LEFT,KC_DOWN, KC_UP,KC_RIGHT,KC_HOME, KC_END,_______, + _______, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, + _______,_______,_______, _______, _______,_______, TG(0),_______), + + [2] = LAYOUT_60_ansi_split_bs_rshift( + _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, + _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, + _______, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, + _______, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, + _______,_______,_______, _______, _______,_______, TG(0),_______), + + [3] = LAYOUT_60_ansi_split_bs_rshift( + _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, + _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, + _______, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, + _______, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, + _______,_______,_______, _______, _______,_______, TG(0),_______), +}; diff --git a/keyboards/inett_studio/sqx/universal/keymaps/via/rules.mk b/keyboards/inett_studio/sqx/universal/keymaps/via/rules.mk new file mode 100644 index 000000000000..1e5b99807cb7 --- /dev/null +++ b/keyboards/inett_studio/sqx/universal/keymaps/via/rules.mk @@ -0,0 +1 @@ +VIA_ENABLE = yes diff --git a/keyboards/inett_studio/sqx/universal/readme.md b/keyboards/inett_studio/sqx/universal/readme.md new file mode 100644 index 000000000000..0a09b9c7dd25 --- /dev/null +++ b/keyboards/inett_studio/sqx/universal/readme.md @@ -0,0 +1,13 @@ +# iNETT Studio SQUARE.X universal + +A 60% keyboard from the iNETT Studio's SQUARE series. + +* Keyboard Maintainer: [astro](https://github.com/yulei) +* Hardware Supported: SQUARE.X universal +* Hardware Availability: [Geekhack Group Buy](https://geekhack.org/index.php?topic=107062.0) + +Make example for this keyboard (after setting up your build environment): + + make inett_studio/sqx/universal: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/inett_studio/sqx/universal/rules.mk b/keyboards/inett_studio/sqx/universal/rules.mk new file mode 100644 index 000000000000..cf3a64ba9fec --- /dev/null +++ b/keyboards/inett_studio/sqx/universal/rules.mk @@ -0,0 +1,25 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +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 = yes # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow +RGB_MATRIX_ENABLE = yes # Use RGB per key light + +LTO_ENABLE = yes # Reducing firmware size + +LAYOUTS = 60_ansi 60_hhkb 60_iso 60_ansi_split_bs_rshift 60_tsangan_hhkb diff --git a/keyboards/inett_studio/sqx/universal/universal.c b/keyboards/inett_studio/sqx/universal/universal.c new file mode 100644 index 000000000000..f0f7f88f7a53 --- /dev/null +++ b/keyboards/inett_studio/sqx/universal/universal.c @@ -0,0 +1,194 @@ +/** + * @file universal.c + * + Copyright 2020 astro + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . + */ + +#include "universal.h" + +#ifdef RGB_MATRIX_ENABLE +const is31_led g_is31_leds[DRIVER_LED_TOTAL] = { +/* Refer to IS31 manual for these locations + * driver + * | R location + * | | G location + * | | | B location + * | | | | */ +// left CA + {0, C1_1, C3_2, C4_2}, + {0, C1_2, C2_2, C4_3}, + {0, C1_3, C2_3, C3_3}, + {0, C1_4, C2_4, C3_4}, + {0, C1_5, C2_5, C3_5}, + {0, C1_6, C2_6, C3_6}, + {0, C1_7, C2_7, C3_7}, + {0, C1_8, C2_8, C3_8}, + + {0, C5_1, C4_1, C6_1}, + {0, C5_8, C4_8, C6_8}, + + {0, C9_1, C8_1, C7_1}, + {0, C9_2, C8_2, C7_2}, + {0, C9_3, C8_3, C7_3}, + {0, C9_4, C8_4, C7_4}, + {0, C9_5, C8_5, C7_5}, + {0, C9_6, C8_6, C7_6}, + {0, C9_7, C8_7, C6_6}, + {0, C9_8, C7_7, C6_7}, +// left CB + {0, C1_9, C3_10, C4_10}, + {0, C1_10, C2_10, C4_11}, + {0, C1_11, C2_11, C3_11}, + {0, C1_12, C2_12, C3_12}, + {0, C1_13, C2_13, C3_13}, + {0, C1_14, C2_14, C3_14}, + {0, C1_15, C2_15, C3_15}, + {0, C1_16, C2_16, C3_16}, + + {0, C5_9, C4_9, C6_9}, + {0, C5_16, C4_16, C6_16}, + + {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, C9_15, C8_15, C6_14}, + {0, C9_16, C7_15, C6_15}, + +// right CA + {1, C1_1, C3_2, C4_2}, + {1, C1_2, C2_2, C4_3}, + {1, C1_3, C2_3, C3_3}, + {1, C1_4, C2_4, C3_4}, + {1, C1_5, C2_5, C3_5}, + {1, C1_6, C2_6, C3_6}, + {1, C1_7, C2_7, C3_7}, + {1, C1_8, C2_8, C3_8}, + + {1, C5_1, C4_1, C6_1}, + {1, C5_8, C4_8, C6_8}, + + {1, C9_1, C8_1, C7_1}, + {1, C9_2, C8_2, C7_2}, + {1, C9_3, C8_3, C7_3}, + {1, C9_4, C8_4, C7_4}, + {1, C9_5, C8_5, C7_5}, + {1, C9_6, C8_6, C7_6}, + {1, C9_7, C8_7, C6_6}, + {1, C9_8, C7_7, C6_7}, +// right CB + {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}, + {1, C1_14, C2_14, C3_14}, + {1, C1_15, C2_15, C3_15}, + {1, C1_16, C2_16, C3_16}, + + {1, C5_9, C4_9, C6_9}, + {1, C5_16, C4_16, C6_16}, + + {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, C9_13, C8_13, C7_13}, + {1, C9_14, C8_14, C7_14}, + {1, C9_15, C8_15, C6_14}, + {1, C9_16, C7_15, C6_15}, +}; + +led_config_t g_led_config = { + { + { 0, 1, 2, 3, 4, 5, 6, 36, 37, 38, 39, 40, 41, 42}, + { 8, 9, 10, 11, 12, 13, 7, 45, 46, 47, 48, 49, 50, 51}, + { 26,27, 18, 14, 15, 16, 17, 54, 55, 56, 57, 58, 59, 53}, + { 29,30, 31, 19, 20, 21, 22, 23, 62, 63, 64, 65, 66, 61}, + { 35,34, 33, NO_LED, NO_LED, NO_LED, 24, 44, NO_LED, NO_LED, 68, 69, 70, 71}, + }, + { + { 32, 32},{ 48, 48},{ 64, 48},{ 80, 48},{ 96, 48},{112, 48},{ 96, 64},{ 96, 64}, + { 0, 32},{ 16, 32}, + { 0, 48},{ 0, 48},{ 16, 48},{ 32, 48},{ 64, 64},{ 32, 64},{ 16, 64},{ 0, 64}, + { 0, 0},{ 16, 0},{ 32, 0},{ 48, 0},{ 64, 0},{ 80, 0},{ 96, 0},{ 96, 16}, + { 0, 16},{ 16, 16}, + { 32, 16},{ 48, 16},{ 64, 16},{ 80, 16},{ 48, 32},{ 64, 32},{ 80, 32},{ 96, 32}, + + {128, 0},{144, 0},{160, 0},{176, 0},{192, 0},{208, 0},{216, 0},{224, 0}, + {112, 0},{128, 16}, + {144, 16},{160, 16},{176, 16},{192, 16},{208, 16},{224, 16},{224, 32},{216, 32}, + {128, 32},{144, 32},{160, 32},{176, 32},{192, 32},{208, 32},{208, 48},{224, 48}, + {128, 48},{144, 48}, + {160, 48},{176, 48},{192, 48},{142, 64},{160, 64},{176, 64},{208, 64},{224, 64} + }, + { + 4, 4, 4, 4, 4, 4, 4, 4, + 1, 4, + 4, 4, 1, 1, 1, 4, 4, 4, + + 1, 4, 4, 4, 4, 4, 4, 4, + 1, 4, + 4, 4, 4, 4, 4, 4, 4, 4, + + 4, 4, 4, 4, 4, 4, 1, 1, + 4, 4, + 4, 4, 4, 4, 4, 1, 1, 1, + + 4, 4, 4, 4, 4, 4, 4, 1, + 1, 4, + 4, 4, 4, 4, 1, 1, 1, 1, + } +}; +#endif //RGB_MATRIX_ENABLE + +bool process_record_kb(uint16_t keycode, keyrecord_t *record) { + if (record->event.pressed) { + switch(keycode) { +#if defined(RGB_MATRIX_DISABLE_KEYCODES) + case RGB_MATRIX_TOGGLE: // toggle rgb matrix + rgb_matrix_toggle(); + return false; + case RGB_MATRIX_STEP: + rgb_matrix_step(); + return false; + case RGB_MATRIX_INC_HUE: + rgb_matrix_increase_hue(); + return false; + case RGB_MATRIX_DEC_HUE: + rgb_matrix_decrease_hue(); + return false; + case RGB_MATRIX_INC_SAT: + rgb_matrix_increase_sat(); + return false; + case RGB_MATRIX_DEC_SAT: + rgb_matrix_decrease_sat(); + return false; + case RGB_MATRIX_INC_VAL: + rgb_matrix_increase_val(); + return false; + case RGB_MATRIX_DEC_VAL: + rgb_matrix_decrease_val(); + return false; +#endif + default: + break; + } + } + return true; +} diff --git a/keyboards/inett_studio/sqx/universal/universal.h b/keyboards/inett_studio/sqx/universal/universal.h new file mode 100644 index 000000000000..b2df37ecc4be --- /dev/null +++ b/keyboards/inett_studio/sqx/universal/universal.h @@ -0,0 +1,141 @@ +/** + * @file universal.h + * + Copyright 2020 astro + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License 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 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, \ + 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, k08, k09, k0a, k0b, k0c, KC_NO, 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, KC_NO, k2e}, \ + {k30, KC_NO, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, KC_NO}, \ + {k40, k42, k43, KC_NO, KC_NO, KC_NO, k47, k07, KC_NO, KC_NO, k48, k49, k4a, k4b} \ +} + +#define LAYOUT_60_iso( \ + 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, \ + k20, 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, \ + k40, k42, k43, k47, k48, k49, k4a, k4b \ +) \ +{ \ + {k00, k01, k02, k03, k04, k05, k06, k08, k09, k0a, k0b, k0c, KC_NO, k0e}, \ + {k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, KC_NO}, \ + {k20, 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, KC_NO}, \ + {k40, k42, k43, KC_NO, KC_NO, KC_NO, k47, k07, KC_NO, KC_NO, k48, k49, k4a, k4b} \ +} + +#define LAYOUT_60_ansi_tsangan_split_rshift( \ + 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, k08, k09, k0a, k0b, k0c, KC_NO, 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, KC_NO, k2e}, \ + {k30, KC_NO, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d}, \ + {k40, k42, k43, KC_NO, KC_NO, KC_NO, k47, k07, 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, \ + 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, 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, KC_NO, k2e}, \ + {k30, KC_NO, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d}, \ + {KC_NO, k42, k43, KC_NO, KC_NO, KC_NO, k47, k07, KC_NO, KC_NO, KC_NO, k49, k4a, KC_NO} \ +} +#define LAYOUT_60_tsangan_hhkb( \ + 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, 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, KC_NO, k2e}, \ + {k30, KC_NO, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d}, \ + {k40, k42, k43, KC_NO, KC_NO, KC_NO, k47, k07, KC_NO, KC_NO, KC_NO, k49, k4a, k4b} \ +} + +#define LAYOUT_60_ansi_split_bs_rshift( \ + 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, 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, KC_NO, k2e}, \ + {k30, KC_NO, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d}, \ + {k40, k42, k43, KC_NO, KC_NO, KC_NO, k47, k07, KC_NO, KC_NO, k48, k49, k4a, k4b} \ +} + + +#if defined(RGB_MATRIX_DISABLE_KEYCODES) +# ifndef RGB_MATRIX_TOGGLE +# define RGB_MATRIX_TOGGLE KC_F16 +# endif +# ifndef RGB_MATRIX_STEP +# define RGB_MATRIX_STEP KC_F17 +# endif +# ifndef RGB_MATRIX_INC_HUE +# define RGB_MATRIX_INC_HUE KC_F18 +# endif +# ifndef RGB_MATRIX_DEC_HUE +# define RGB_MATRIX_DEC_HUE KC_F19 +# endif +# ifndef RGB_MATRIX_INC_SAT +# define RGB_MATRIX_INC_SAT KC_F20 +# endif +# ifndef RGB_MATRIX_DEC_SAT +# define RGB_MATRIX_DEC_SAT KC_F21 +# endif +# ifndef RGB_MATRIX_INC_VAL +# define RGB_MATRIX_INC_VAL KC_F22 +# endif +# ifndef RGB_MATRIX_DEC_VAL +# define RGB_MATRIX_DEC_VAL KC_F23 +# endif +#endif From 58d7e9fa0ebe90ab26812970a7473aec91f9f31a Mon Sep 17 00:00:00 2001 From: hidenori Date: Sat, 12 Sep 2020 05:06:38 +0900 Subject: [PATCH 776/930] [Keymap] Added ToyoshimaHidenori's keymap for Ergodash mini (#10228) * Add ToyoshimaHidenori's keymap * Remove some dead code and characters * Change the folder name from uppercase to lowercase * Remove uppercase folder --- .../mini/keymaps/toyoshimahidenori/config.h | 33 ++++ .../mini/keymaps/toyoshimahidenori/keymap.c | 141 ++++++++++++++++++ .../mini/keymaps/toyoshimahidenori/readme.md | 62 ++++++++ .../mini/keymaps/toyoshimahidenori/rules.mk | 3 + 4 files changed, 239 insertions(+) create mode 100644 keyboards/ergodash/mini/keymaps/toyoshimahidenori/config.h create mode 100644 keyboards/ergodash/mini/keymaps/toyoshimahidenori/keymap.c create mode 100644 keyboards/ergodash/mini/keymaps/toyoshimahidenori/readme.md create mode 100644 keyboards/ergodash/mini/keymaps/toyoshimahidenori/rules.mk diff --git a/keyboards/ergodash/mini/keymaps/toyoshimahidenori/config.h b/keyboards/ergodash/mini/keymaps/toyoshimahidenori/config.h new file mode 100644 index 000000000000..df04873a97ec --- /dev/null +++ b/keyboards/ergodash/mini/keymaps/toyoshimahidenori/config.h @@ -0,0 +1,33 @@ +/* +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/ergodash/mini/keymaps/toyoshimahidenori/keymap.c b/keyboards/ergodash/mini/keymaps/toyoshimahidenori/keymap.c new file mode 100644 index 000000000000..7224af7a0051 --- /dev/null +++ b/keyboards/ergodash/mini/keymaps/toyoshimahidenori/keymap.c @@ -0,0 +1,141 @@ +/* Copyright 2020 Toyoshima Hidenori +* +* This program is free software: you can redistribute it and/or modify +* it under the terms of the GNU General Public License as published by +* the Free Software Foundation, either version 2 of the License, or +* (at your option) any later version. +* +* This program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public 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, + _LOWER, + _RAISE, + _ADJUST, +}; + +enum custom_keycodes { + QWERTY = SAFE_RANGE, + LOWER, + RAISE, + ADJUST, +}; + +#define EISU LALT(KC_GRV) +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + /* Qwerty + * ,----------------------------------------------------------------------------------------------------------------------. + * | 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 | GUI | | GUI | N | M | , | . | / | Shift| + * |-------------+------+------+------+------+------+------+------+------+------+------+------+------+------+-------------| + * | Ctrl | ESC | ALt | ESC |||||||| Shift| Raise| Space|||||||| enter| Lower| Bcspc|||||||| Left | Down | Up | Right| + * ,----------------------------------------------------------------------------------------------------------------------. + */ + [_QWERTY] = LAYOUT( + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_MINS, KC_EQL , 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_LBRC, 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_LGUI, KC_RGUI, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, + KC_LCTL, KC_ESC, KC_LALT, KC_ESC, KC_LSFT, RAISE, KC_SPC, KC_ENT, LOWER, KC_BSPC, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT + ), + + /* Lower + * ,----------------------------------------------------------------------------------------------------------------------. + * | ~ | 1 | 2 | 3 | 4 | 5 | _ | | + | 6 | 7 | 8 | 9 | 0 | | | + * |------+------+------+------+------+------+------+--------------------+------+------+------+------+------+------+------| + * | Ctrl | ^ | & | * | ( | ) | { | | } | Left | Down | Up | Right| : | " | + * |------+------+------+------+------+------+---------------------------+------+------+------+------+------+------+------| + * | Shift| ! | @ | # | $ | % | GUI | | GUI | - | = | < | > | ? | Shift| + * |-------------+------+------+------+------+------+------+------+------+------+------+------+------+------+-------------| + * | Ctrl | ESC | ALt | EISU |||||||| kana | Raise| Space|||||||| Enter| Lower|Delete|||||||| Home |PageDn|PageUp| End | + * ,----------------------------------------------------------------------------------------------------------------------. + */ + [_LOWER] = LAYOUT( + KC_TILD, KC_1, KC_2, KC_3, KC_4, KC_5, KC_UNDS, KC_PLUS, KC_6, KC_7, KC_8, KC_9, KC_0, KC_PIPE, + KC_LCTL, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_LCBR, KC_RCBR, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_COLN, KC_DQT , + KC_LSFT, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_LGUI, KC_RGUI, KC_MINS, KC_EQL, KC_LT, KC_GT, KC_QUES, KC_RSFT, + KC_LCTL, KC_ESC, KC_LALT, KC_LANG2, KC_LANG1,RAISE, KC_SPC, KC_ENT, LOWER, KC_DEL, KC_HOME,KC_PGDN, KC_PGUP, KC_END + ), + + /* Raise + * ,----------------------------------------------------------------------------------------------------------------------. + * | ` | 1 | 2 | 3 | 4 | 5 | _ | | + | 6 | 7 | 8 | 9 | 0 | | | + * |------+------+------+------+------+------+------+--------------------+------+------+------+------+------+------+------| + * | Ctrl | ^ | & | * | ( | ) | { | | } | Left | Down | Up | Right| : | " | + * |------+------+------+------+------+------+---------------------------+------+------+------+------+------+------+------| + * | Shift| ! | @ | # | $ | % | GUI | | GUI | _ | + | < | > | ? | Shift| + * |-------------+------+------+------+------+------+------+------+------+------+------+------+------+------+-------------| + * | Ctrl | ESC | ALt | EISU |||||||| kana | Raise| Space|||||||| Enter| Lower|Delete|||||||| Home |PageDn|PageUp| End | + * ,----------------------------------------------------------------------------------------------------------------------. + */ + [_RAISE] = LAYOUT( + KC_GRV , KC_1, KC_2, KC_3, KC_4, KC_5, KC_UNDS, KC_PLUS, KC_6, KC_7, KC_8, KC_9, KC_0, KC_PIPE, + KC_LCTL, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_LCBR, KC_RCBR, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_COLN, KC_DQT , + KC_LSFT, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_LGUI, KC_RGUI, KC_UNDS, KC_PLUS, KC_LT, KC_GT, KC_QUES, KC_RSFT, + KC_LCTL, KC_ESC, KC_LALT, KC_LANG2, KC_LANG1,RAISE, KC_SPC, KC_ENT, LOWER, KC_DEL, KC_HOME, KC_PGDN, KC_PGUP, KC_END + ), + + /* Adjust + * ,----------------------------------------------------------------------------------------------------------------------. + * | | Reset|RGB ON| MODE| HUE-| HUE+| | | | SAT-| SAT+| VAL-| VAL+| | | + * |------+------+------+------+------+------+---------------------------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | + * |------+------+------+------+------+------+---------------------------+------+------+------+------+------+------+------| + * | F1 | F2 | F3 | F4 | F5 | F6 | | | | F7 | F8 | F9 | F10 | F11 | F12 | + * |-------------+------+------+------+------+------+------+------+------+------+------+------+------+------+-------------| + * | | | | |||||||| | | |||||||| | | |||||||| | | | | + * ,----------------------------------------------------------------------------------------------------------------------. + */ + [_ADJUST] = LAYOUT( + _______, RESET , RGB_TOG, RGB_MOD, RGB_HUD, RGB_HUI,_______, _______, RGB_SAD, RGB_SAI, RGB_VAD, RGB_VAI, _______, _______, + _______, _______, BL_TOGG, BL_BRTG, BL_INC , BL_DEC ,_______, _______, _______, _______, _______, _______, _______, _______, + 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 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; +} diff --git a/keyboards/ergodash/mini/keymaps/toyoshimahidenori/readme.md b/keyboards/ergodash/mini/keymaps/toyoshimahidenori/readme.md new file mode 100644 index 000000000000..ebc13043a7e0 --- /dev/null +++ b/keyboards/ergodash/mini/keymaps/toyoshimahidenori/readme.md @@ -0,0 +1,62 @@ +# ToyoshimaHidenori's keymap for Ergodash mini + +This is the ToyoshimaHidenori's keymap configuration for Ergodash mini. +There are four layers, QWERTY(default), LOWER, RAISE and ADJSUT. + +## Layers + +### Qwerty + +``` +,----------------------------------------------------------------------------------------------------------------------. +| 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 | GUI | | GUI | N | M | , | . | / | Shift| +|-------------+------+------+------+------+------+------+------+------+------+------+------+------+------+-------------| +| Ctrl | ESC | ALt | ESC |||||||| Shift| Raise| Space|||||||| enter| Lower| Bcspc|||||||| Left | Down | Up | Right| +,----------------------------------------------------------------------------------------------------------------------. +``` + +### Lower + +``` +,----------------------------------------------------------------------------------------------------------------------. +| ~ | 1 | 2 | 3 | 4 | 5 | _ | | + | 6 | 7 | 8 | 9 | 0 | | | +|------+------+------+------+------+------+------+--------------------+------+------+------+------+------+------+------| +| Ctrl | ^ | & | * | ( | ) | { | | } | Left | Down | Up | Right| : | " | +|------+------+------+------+------+------+---------------------------+------+------+------+------+------+------+------| +| Shift| ! | @ | # | $ | % | GUI | | GUI | - | = | < | > | ? | Shift| +|-------------+------+------+------+------+------+------+------+------+------+------+------+------+------+-------------| +| Ctrl | ESC | ALt | EISU |||||||| kana | Raise| Space|||||||| Enter| Lower|Delete|||||||| Home |PageDn|PageUp| End | +,----------------------------------------------------------------------------------------------------------------------. +``` + +### Raise + +``` +,----------------------------------------------------------------------------------------------------------------------. +| ` | 1 | 2 | 3 | 4 | 5 | _ | | + | 6 | 7 | 8 | 9 | 0 | | | +|------+------+------+------+------+------+------+--------------------+------+------+------+------+------+------+------| +| Ctrl | ^ | & | * | ( | ) | { | | } | Left | Down | Up | Right| : | " | +|------+------+------+------+------+------+---------------------------+------+------+------+------+------+------+------| +| Shift| ! | @ | # | $ | % | GUI | | GUI | _ | + | < | > | ? | Shift| +|-------------+------+------+------+------+------+------+------+------+------+------+------+------+------+-------------| +| Ctrl | ESC | ALt | EISU |||||||| kana | Raise| Space|||||||| Enter| Lower|Delete|||||||| Home |PageDn|PageUp| End | +,----------------------------------------------------------------------------------------------------------------------. +``` + +### Adjust + +``` +,----------------------------------------------------------------------------------------------------------------------. +| | Reset|RGB ON| MODE| HUE-| HUE+| | | | SAT-| SAT+| VAL-| VAL+| | | +|------+------+------+------+------+------+---------------------------+------+------+------+------+------+------+------| +| | | | | | | | | | | | +|------+------+------+------+------+------+---------------------------+------+------+------+------+------+------+------| +| F1 | F2 | F3 | F4 | F5 | F6 | | | | F7 | F8 | F9 | F10 | F11 | F12 | +|-------------+------+------+------+------+------+------+------+------+------+------+------+------+------+-------------| +| | | | |||||||| | | |||||||| | | |||||||| | | | | +,----------------------------------------------------------------------------------------------------------------------. +``` diff --git a/keyboards/ergodash/mini/keymaps/toyoshimahidenori/rules.mk b/keyboards/ergodash/mini/keymaps/toyoshimahidenori/rules.mk new file mode 100644 index 000000000000..11b62b9bffeb --- /dev/null +++ b/keyboards/ergodash/mini/keymaps/toyoshimahidenori/rules.mk @@ -0,0 +1,3 @@ +BACKLIGHT_ENABLE = yes +RGBLIGHT_ENABLE = yes +AUDIO_ENABLE = no From d8d65bbf5f81dd075438e4ce89bda135ebf8f2b9 Mon Sep 17 00:00:00 2001 From: Takeshi ISHII <2170248+mtei@users.noreply.github.com> Date: Sat, 12 Sep 2020 05:10:30 +0900 Subject: [PATCH 777/930] [Docs] Update Japanese translation of feature_split_keyboard.md (#10283) Apply #10242 changes to ja/feature_split_keyboard.md --- docs/ja/feature_split_keyboard.md | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/docs/ja/feature_split_keyboard.md b/docs/ja/feature_split_keyboard.md index 1efc98e40f9e..3bdf96d1c7d1 100644 --- a/docs/ja/feature_split_keyboard.md +++ b/docs/ja/feature_split_keyboard.md @@ -1,8 +1,8 @@ # 分割キーボード QMK ファームウェアリポジトリの多くのキーボードは、"分割"キーボードです。それらは2つのコントローラを使います — 1つは USB に接続し、もう1つは TRRS または同様のケーブルを介してシリアルまたは I2C 接続で接続します。 @@ -53,11 +53,12 @@ QMK ファームウェアには、任意のキーボードで使用可能な一 ### シリアル配線 -2つの Pro Micro 間で GND、Vcc、D0 (別名 PDO あるいは pin 3) を TRS/TRRS ケーブルの3本のワイヤで接続します。 +2つの Pro Micro 間で GND、Vcc、D0/D1/D2/D3 (別名 PD0/PD1/PD2/PD3) を TRS/TRRS ケーブルの3本のワイヤで接続します。 ?> ここで使われるピンは実際には以下の `SOFT_SERIAL_PIN` によって設定されることに注意してください。 -![シリアル配線](https://i.imgur.com/C3D1GAQ.png) +sk-pd0-connection-mono +sk-pd2-connection-mono ### I2C 配線 @@ -65,7 +66,7 @@ QMK ファームウェアには、任意のキーボードで使用可能な一 プルアップ抵抗はキーボードの左右どちら側にも配置することができます。もし各側を単独で使いたい場合は、4つの抵抗を使い、両側にプルアップ抵抗を配置することもできます。 -![I2C 配線](https://i.imgur.com/Hbzhc6E.png) +sk-i2c-connection-mono ## ファームウェア設定 From c82865efabb4153ca67a804a1ed746dab3073b8d Mon Sep 17 00:00:00 2001 From: Ben Date: Sat, 12 Sep 2020 03:19:05 +0200 Subject: [PATCH 778/930] Add VIA keymap for Plaid-Pad (#10057) * Add via keymap for Plaid-Pad - Add VIA support for the Plaid-Pad - Changes Vendor ID and Product ID (to follow VIA's guidelines) * Add extra encoder pads for rev1.1 * Change Product Id from pp to PP (hex value) * improved readme - detailed informations about rotary encoder, bootloader and firmware * Improved encoder informations in via keymap * Improved encoder infos and code in default keymap * add revision folder for rev1 and rev1.1 * change encoder assignment for defaul a via keymap * Update keyboards/keycapsss/plaid_pad/config.h * change revision number * 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 * add license to header of *.h and *.c files * remove the list of alternate bootloaders - due to the pr checklist * Update keyboards/keycapsss/plaid_pad/rules.mk --- keyboards/keycapsss/plaid_pad/config.h | 28 +++-- .../plaid_pad/keymaps/default/config.h | 16 +++ .../plaid_pad/keymaps/default/keymap.c | 41 +++++-- .../plaid_pad/keymaps/default/readme.md | 13 --- .../keycapsss/plaid_pad/keymaps/via/keymap.c | 100 ++++++++++++++++++ .../keycapsss/plaid_pad/keymaps/via/rules.mk | 4 + keyboards/keycapsss/plaid_pad/plaid_pad.c | 16 +++ keyboards/keycapsss/plaid_pad/plaid_pad.h | 16 +++ keyboards/keycapsss/plaid_pad/readme.md | 54 ++++++++-- keyboards/keycapsss/plaid_pad/rev1/config.h | 25 +++++ keyboards/keycapsss/plaid_pad/rev1/rev1.c | 17 +++ keyboards/keycapsss/plaid_pad/rev1/rev1.h | 19 ++++ keyboards/keycapsss/plaid_pad/rev1/rules.mk | 1 + keyboards/keycapsss/plaid_pad/rev2/config.h | 25 +++++ keyboards/keycapsss/plaid_pad/rev2/rev2.c | 17 +++ keyboards/keycapsss/plaid_pad/rev2/rev2.h | 19 ++++ keyboards/keycapsss/plaid_pad/rev2/rules.mk | 1 + keyboards/keycapsss/plaid_pad/rules.mk | 23 ++-- 18 files changed, 383 insertions(+), 52 deletions(-) delete mode 100644 keyboards/keycapsss/plaid_pad/keymaps/default/readme.md create mode 100644 keyboards/keycapsss/plaid_pad/keymaps/via/keymap.c create mode 100644 keyboards/keycapsss/plaid_pad/keymaps/via/rules.mk create mode 100644 keyboards/keycapsss/plaid_pad/rev1/config.h create mode 100644 keyboards/keycapsss/plaid_pad/rev1/rev1.c create mode 100644 keyboards/keycapsss/plaid_pad/rev1/rev1.h create mode 100644 keyboards/keycapsss/plaid_pad/rev1/rules.mk create mode 100644 keyboards/keycapsss/plaid_pad/rev2/config.h create mode 100644 keyboards/keycapsss/plaid_pad/rev2/rev2.c create mode 100644 keyboards/keycapsss/plaid_pad/rev2/rev2.h create mode 100644 keyboards/keycapsss/plaid_pad/rev2/rules.mk diff --git a/keyboards/keycapsss/plaid_pad/config.h b/keyboards/keycapsss/plaid_pad/config.h index f456bf84410d..d52a51ccdc72 100644 --- a/keyboards/keycapsss/plaid_pad/config.h +++ b/keyboards/keycapsss/plaid_pad/config.h @@ -1,14 +1,27 @@ +/* Copyright 2020 Ben Roesner (keycapsss.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 */ -#define VENDOR_ID 0xFEED -#define PRODUCT_ID 0xAF12 -#define DEVICE_VER 0x0001 +#define VENDOR_ID 0x7983 +#define PRODUCT_ID 0x5050 // "PP" #define MANUFACTURER Keycapsss -#define PRODUCT Plaid-Pad -#define DESCRIPTION 4x4 numpad with through hole components /* key matrix size */ #define MATRIX_ROWS 4 @@ -16,11 +29,6 @@ #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 { D1, B2 } -#define ENCODERS_PAD_B { D0, B1 } - #define ENCODER_RESOLUTION 4 diff --git a/keyboards/keycapsss/plaid_pad/keymaps/default/config.h b/keyboards/keycapsss/plaid_pad/keymaps/default/config.h index 271f48d0011b..fb4c0f5e25b7 100644 --- a/keyboards/keycapsss/plaid_pad/keymaps/default/config.h +++ b/keyboards/keycapsss/plaid_pad/keymaps/default/config.h @@ -1,3 +1,19 @@ +/* Copyright 2020 Ben Roesner (keycapsss.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 // place overrides here diff --git a/keyboards/keycapsss/plaid_pad/keymaps/default/keymap.c b/keyboards/keycapsss/plaid_pad/keymaps/default/keymap.c index 7de3be5bd3d5..59031c91d267 100644 --- a/keyboards/keycapsss/plaid_pad/keymaps/default/keymap.c +++ b/keyboards/keycapsss/plaid_pad/keymaps/default/keymap.c @@ -28,17 +28,46 @@ void keyboard_post_init_user(void) { } void encoder_update_user(uint8_t index, bool clockwise) { - if (index == 0) { // First encoder - top left +/* +Rev1.1 Rev1 +,-----------------------, ,-----------------------, +| E1 | E2 | E3 | E4 | | E1 | | | E2 | +|-----+-----+-----+-----| |-----+-----+-----+-----| +| | | | E3 | | | | | | +|-----+-----+-----+-----| |-----+-----+-----+-----| +| | | | E2 | | | | | | +|-----+-----+-----+-----| |-----+-----+-----+-----| +| | | | E1 | | | | | | +`-----------------------' `-----------------------' + */ + + // First encoder (E1) + if (index == 0) { + if (clockwise) { + tap_code(KC_F17); + } else { + tap_code(KC_F18); + } + // Second encoder (E2) + } else if (index == 1) { + if (clockwise) { + tap_code(KC_F19); + } else { + tap_code(KC_F20); + } + // Third encoder (E3) + } else if (index == 2) { if (clockwise) { - tap_code(KC_RIGHT); + tap_code(KC_F21); } else { - tap_code(KC_LEFT); + tap_code(KC_F22); } - } else if (index == 1) { // Second encoder - top right + // Forth encoder (E4) + } else if (index == 3) { if (clockwise) { - tap_code(KC_UP); + tap_code(KC_F23); } else { - tap_code(KC_DOWN); + tap_code(KC_F24); } } } diff --git a/keyboards/keycapsss/plaid_pad/keymaps/default/readme.md b/keyboards/keycapsss/plaid_pad/keymaps/default/readme.md deleted file mode 100644 index ccbea5f86521..000000000000 --- a/keyboards/keycapsss/plaid_pad/keymaps/default/readme.md +++ /dev/null @@ -1,13 +0,0 @@ - - - -# Default Plaid-Pad Layout - -This is the default layout for the plaid pad. -The upper left (7) and right (/) switch, can be replaced by a rotary encoder. -Encoders with built-in switch are supported and map to the original keys (7) and (/). - -The upper left encoder performs a tap on "Right Arrow" (KC_RIGHT) and "Left Arrow" (KC_LEFT) when rotated clockwise and counter-clockwise in the respective direction for each step of the encoder. - -The upper right encoder performs a tap on "Up Arrow" (KC_UP) and "Down Arrow" (KC_DOWN) when rotated clockwise and counter-clockwise in the respective direction for each step of the encoder. - diff --git a/keyboards/keycapsss/plaid_pad/keymaps/via/keymap.c b/keyboards/keycapsss/plaid_pad/keymaps/via/keymap.c new file mode 100644 index 000000000000..1b1d59e3e999 --- /dev/null +++ b/keyboards/keycapsss/plaid_pad/keymaps/via/keymap.c @@ -0,0 +1,100 @@ +/* Copyright 2020 Ben Roesner (keycapsss.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] = { +/* + * ,-----------------------, + * | 7 | 8 | 9 | / | + * |-----+-----+-----+-----| + * | 4 | 5 | 6 | * | + * |-----+-----+-----+-----| + * | 1 | 2 | 3 | - | + * |-----+-----+-----+-----| + * | 0 | . | = | + | + * `-----------------------' + */ + [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 ), + [1] = LAYOUT_ortho_4x4( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + 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_4x4( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + 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_4x4( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + 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 LED1 state during powerup +void keyboard_post_init_user(void) { + writePinHigh(LED_RED); +} + +void encoder_update_user(uint8_t index, bool clockwise) { +/* +Rev1.1 Rev1 +,-----------------------, ,-----------------------, +| E1 | E2 | E3 | E4 | | E1 | | | E2 | +|-----+-----+-----+-----| |-----+-----+-----+-----| +| | | | E3 | | | | | | +|-----+-----+-----+-----| |-----+-----+-----+-----| +| | | | E2 | | | | | | +|-----+-----+-----+-----| |-----+-----+-----+-----| +| | | | E1 | | | | | | +`-----------------------' `-----------------------' + */ + + // First encoder (E1) + if (index == 0) { + if (clockwise) { + tap_code(KC_F17); + } else { + tap_code(KC_F18); + } + // Second encoder (E2) + } else if (index == 1) { + if (clockwise) { + tap_code(KC_F19); + } else { + tap_code(KC_F20); + } + // Third encoder (E3) + } else if (index == 2) { + if (clockwise) { + tap_code(KC_F21); + } else { + tap_code(KC_F22); + } + // Forth encoder (E4) + } else if (index == 3) { + if (clockwise) { + tap_code(KC_F23); + } else { + tap_code(KC_F24); + } + } +} diff --git a/keyboards/keycapsss/plaid_pad/keymaps/via/rules.mk b/keyboards/keycapsss/plaid_pad/keymaps/via/rules.mk new file mode 100644 index 000000000000..00c11acccda3 --- /dev/null +++ b/keyboards/keycapsss/plaid_pad/keymaps/via/rules.mk @@ -0,0 +1,4 @@ +VIA_ENABLE = yes +LTO_ENABLE = yes +EXTRAKEY_ENABLE = no +MOUSEKEY_ENABLE = no diff --git a/keyboards/keycapsss/plaid_pad/plaid_pad.c b/keyboards/keycapsss/plaid_pad/plaid_pad.c index befddf42a994..127b80a5f902 100644 --- a/keyboards/keycapsss/plaid_pad/plaid_pad.c +++ b/keyboards/keycapsss/plaid_pad/plaid_pad.c @@ -1 +1,17 @@ +/* Copyright 2020 Ben Roesner (keycapsss.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 "plaid_pad.h" diff --git a/keyboards/keycapsss/plaid_pad/plaid_pad.h b/keyboards/keycapsss/plaid_pad/plaid_pad.h index fae9b132a873..4ac26bf45caf 100644 --- a/keyboards/keycapsss/plaid_pad/plaid_pad.h +++ b/keyboards/keycapsss/plaid_pad/plaid_pad.h @@ -1,3 +1,19 @@ +/* Copyright 2020 Ben Roesner (keycapsss.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" diff --git a/keyboards/keycapsss/plaid_pad/readme.md b/keyboards/keycapsss/plaid_pad/readme.md index 76b4fa8e8e9e..e8a8044a2a28 100644 --- a/keyboards/keycapsss/plaid_pad/readme.md +++ b/keyboards/keycapsss/plaid_pad/readme.md @@ -2,24 +2,66 @@ -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. +A 4x4 numpad/macro pad with only through hole components. It supports up to 4 rotary encoder. The positions for the encoder are interchangeable with keyboard switches. + +Below you can see the possible positions for the 4 rotary encoder (Rev1 only 2). +*If you place a encoder in the top left corner (E1), you can't use another encoder in the lower right corner.* +``` +Rev1.1 Rev1 +,-----------------------, ,-----------------------, +| E1 | E2 | E3 | E4 | | E1 | | | E2 | +|-----+-----+-----+-----| |-----+-----+-----+-----| +| | | | E3 | | | | | | +|-----+-----+-----+-----| |-----+-----+-----+-----| +| | | | E2 | | | | | | +|-----+-----+-----+-----| |-----+-----+-----+-----| +| | | | E1 | | | | | | +`-----------------------' `-----------------------' +``` + +- Encoder E1 performs a tap on `KC_F17` and `KC_F18`. +- Encoder E2 performs a tap on `KC_F19` and `KC_F20`. +- Encoder E3 performs a tap on `KC_F21` and `KC_F22`. +- Encoder E4 performs a tap on `KC_F23` and `KC_F24`. +*The F17-F24 keys are intended to be customized via [Karabiner-Elements (OSX)](https://github.com/pqrs-org/Karabiner-Elements), or [AutoHotkey](https://github.com/Lexikos/AutoHotkey_L) (WIN)* + +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): +## QMK Firmware +_Bootloader and Firmware ([default keymap](https://github.com/qmk/qmk_firmware/tree/master/keyboards/keycapsss/plaid_pad)) are already on the ATmega328P chip._ + +Make example for this keyboard (after [setting up your build environment](https://docs.qmk.fm/#/getting_started_build_tools)): make keycapsss/plaid_pad:default + // or + qmk compile -kb keycapsss/plaid_pad -km default Flashing example for this keyboard: make keycapsss/plaid_pad:default:flash + // or + qmk flash -kb keycapsss/plaid_pad -km 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). ## 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)) +- same `usbasploader` as used for Plaid ([Instructions](https://github.com/hsgw/plaid/blob/master/doc/en/bootloader.md), [Repository](https://github.com/hsgw/USBaspLoader/tree/plaid)) ---- +### Enter bootloader mode (to flash a new firmware) +- Plug in the USB cable +- Push and hold RESET switch +- Push and hold BOOT switch +- Release RESET switch +- Release BOOT switch -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). +or an alternative method: +- Unplug the USB cable +- Hold down the BOOT switch +- Plug in the USB cable +- Release the BOOT switch + +If you succeed to enter bootloader mode, you can see usbasp in device manager, or `*** USBAsp device connected` in [QMK Toolbox](https://github.com/qmk/qmk_toolbox). diff --git a/keyboards/keycapsss/plaid_pad/rev1/config.h b/keyboards/keycapsss/plaid_pad/rev1/config.h new file mode 100644 index 000000000000..eeb56503af52 --- /dev/null +++ b/keyboards/keycapsss/plaid_pad/rev1/config.h @@ -0,0 +1,25 @@ +/* Copyright 2020 Ben Roesner (keycapsss.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 + +#define PRODUCT Plaid-Pad Rev1 +#define DEVICE_VER 0x0001 + +#define UNUSED_PINS { B3, B4, B5, D4} + +#define ENCODERS_PAD_A { D1, B2 } +#define ENCODERS_PAD_B { D0, B1 } diff --git a/keyboards/keycapsss/plaid_pad/rev1/rev1.c b/keyboards/keycapsss/plaid_pad/rev1/rev1.c new file mode 100644 index 000000000000..7d21ede28681 --- /dev/null +++ b/keyboards/keycapsss/plaid_pad/rev1/rev1.c @@ -0,0 +1,17 @@ +/* Copyright 2020 Ben Roesner (keycapsss.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 "rev1.h" diff --git a/keyboards/keycapsss/plaid_pad/rev1/rev1.h b/keyboards/keycapsss/plaid_pad/rev1/rev1.h new file mode 100644 index 000000000000..4a42622ba526 --- /dev/null +++ b/keyboards/keycapsss/plaid_pad/rev1/rev1.h @@ -0,0 +1,19 @@ +/* Copyright 2020 Ben Roesner (keycapsss.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 "plaid_pad.h" diff --git a/keyboards/keycapsss/plaid_pad/rev1/rules.mk b/keyboards/keycapsss/plaid_pad/rev1/rules.mk new file mode 100644 index 000000000000..5af1ba85367f --- /dev/null +++ b/keyboards/keycapsss/plaid_pad/rev1/rules.mk @@ -0,0 +1 @@ +ENCODER_ENABLE = yes diff --git a/keyboards/keycapsss/plaid_pad/rev2/config.h b/keyboards/keycapsss/plaid_pad/rev2/config.h new file mode 100644 index 000000000000..1f1277711931 --- /dev/null +++ b/keyboards/keycapsss/plaid_pad/rev2/config.h @@ -0,0 +1,25 @@ +/* Copyright 2020 Ben Roesner (keycapsss.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 + +#define PRODUCT Plaid-Pad Rev2 +#define DEVICE_VER 0x0002 + +#define UNUSED_PINS { } + +#define ENCODERS_PAD_A { D1, B2, B4, D4 } +#define ENCODERS_PAD_B { D0, B1, B3, B5 } diff --git a/keyboards/keycapsss/plaid_pad/rev2/rev2.c b/keyboards/keycapsss/plaid_pad/rev2/rev2.c new file mode 100644 index 000000000000..7a830676bef5 --- /dev/null +++ b/keyboards/keycapsss/plaid_pad/rev2/rev2.c @@ -0,0 +1,17 @@ +/* Copyright 2020 Ben Roesner (keycapsss.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 "rev2.h" diff --git a/keyboards/keycapsss/plaid_pad/rev2/rev2.h b/keyboards/keycapsss/plaid_pad/rev2/rev2.h new file mode 100644 index 000000000000..4a42622ba526 --- /dev/null +++ b/keyboards/keycapsss/plaid_pad/rev2/rev2.h @@ -0,0 +1,19 @@ +/* Copyright 2020 Ben Roesner (keycapsss.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 "plaid_pad.h" diff --git a/keyboards/keycapsss/plaid_pad/rev2/rules.mk b/keyboards/keycapsss/plaid_pad/rev2/rules.mk new file mode 100644 index 000000000000..5af1ba85367f --- /dev/null +++ b/keyboards/keycapsss/plaid_pad/rev2/rules.mk @@ -0,0 +1 @@ +ENCODER_ENABLE = yes diff --git a/keyboards/keycapsss/plaid_pad/rules.mk b/keyboards/keycapsss/plaid_pad/rules.mk index 08ad3555d6a0..d4485d939f47 100644 --- a/keyboards/keycapsss/plaid_pad/rules.mk +++ b/keyboards/keycapsss/plaid_pad/rules.mk @@ -2,19 +2,12 @@ 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 # 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 @@ -23,15 +16,11 @@ COMMAND_ENABLE = no # 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 = 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 -UNICODE_ENABLE = no # Unicode -BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID -AUDIO_ENABLE = 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 +BLUETOOTH_ENABLE = no # Enable Bluetooth +AUDIO_ENABLE = no # Audio output LAYOUTS = ortho_4x4 -LAYOUTS_HAS_RGB = no + +DEFAULT_FOLDER = keycapsss/plaid_pad/rev1 From 7141de19d98be604587f269a2dc9a85b0a211e6f Mon Sep 17 00:00:00 2001 From: TheLibra23 <32517360+TheLibra23@users.noreply.github.com> Date: Sat, 12 Sep 2020 15:55:52 +0800 Subject: [PATCH 779/930] added VIA keymap for Keebio Viterbi (#10168) * added via keymap * replaced PRODUCT_ID 0x1157 with PRODUCT_ID 0x2157 replaced product id to distinguish rev2 from rev1. bakingpy gave me permission through discord chat. * Update keyboards/keebio/viterbi/keymaps/via/keymap.c * Update keyboards/keebio/viterbi/keymaps/via/rules.mk * made a simplier keymap.c for via folder Based from the default keymap, removed unnecessary codes. --- keyboards/keebio/viterbi/keymaps/via/keymap.c | 38 +++++++++++++++++++ keyboards/keebio/viterbi/keymaps/via/rules.mk | 2 + 2 files changed, 40 insertions(+) create mode 100644 keyboards/keebio/viterbi/keymaps/via/keymap.c create mode 100644 keyboards/keebio/viterbi/keymaps/via/rules.mk diff --git a/keyboards/keebio/viterbi/keymaps/via/keymap.c b/keyboards/keebio/viterbi/keymaps/via/keymap.c new file mode 100644 index 000000000000..6360202ee016 --- /dev/null +++ b/keyboards/keebio/viterbi/keymaps/via/keymap.c @@ -0,0 +1,38 @@ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + + LAYOUT_ortho_5x14( + KC_INS, 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_TAB , KC_Q , KC_W , KC_E , KC_R , KC_T , KC_Y , KC_U , KC_I , KC_O , KC_P , KC_LBRC, KC_RBRC, + KC_EQL, 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_PGUP, 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_END , + KC_PGDN, MO(3) , KC_LCTL, KC_LALT, KC_LGUI, MO(1) , KC_SPC , KC_SPC , MO(2) , KC_LEFT, KC_DOWN, KC_UP , KC_RGHT, KC_BSLS + ), + + LAYOUT_ortho_5x14( + _______, 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_UNDS, _______, KC_EXLM, KC_AT , KC_HASH, KC_DLR , KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_LCBR, KC_RCBR, + KC_PLUS, _______, 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_MNXT, KC_VOLD, KC_VOLU, KC_MPLY, KC_MUTE + ), + + LAYOUT_ortho_5x14( + _______, 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_UNDS, _______, KC_1 , KC_2 , KC_3 , KC_4 , KC_5 , KC_6 , KC_7 , KC_8 , KC_9 , KC_0 , KC_LCBR, KC_RCBR, + KC_PLUS, _______, KC_F1 , KC_F2 , KC_F3 , KC_F4 , KC_F5 , KC_F6 , KC_MINS, KC_EQL , KC_LBRC, KC_RBRC, _______, _______, + _______, _______, KC_F7 , KC_F8 , KC_F9 , KC_F10 , KC_F11 , KC_F12 , KC_NUHS, KC_NUBS, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY, KC_MUTE + ), + + LAYOUT_ortho_5x14( + _______, 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_HUD, RGB_HUI, RGB_SAD, RGB_SAI, RGB_VAD, RGB_VAI, _______, KC_DEL, _______, + _______, _______, _______, _______, AU_ON, AU_OFF, AG_NORM, AG_SWAP, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ) + +}; diff --git a/keyboards/keebio/viterbi/keymaps/via/rules.mk b/keyboards/keebio/viterbi/keymaps/via/rules.mk new file mode 100644 index 000000000000..36b7ba9cbc98 --- /dev/null +++ b/keyboards/keebio/viterbi/keymaps/via/rules.mk @@ -0,0 +1,2 @@ +VIA_ENABLE = yes +LTO_ENABLE = yes From e4d46a1c00f60fa97d779f0c468c502416d29f02 Mon Sep 17 00:00:00 2001 From: binepad <69730862+binepad@users.noreply.github.com> Date: Sat, 12 Sep 2020 15:41:30 +0530 Subject: [PATCH 780/930] [Keyboard] add binepad/bn003 (#10276) * ADD BINEPAD/BN003 * Update keyboards/binepad/bn003/config.h * Update keyboards/binepad/bn003/config.h * Update keyboards/binepad/bn003/rules.mk * Update keyboards/binepad/bn003/keymaps/via/keymap.c * Update readme.md added macro pad info * Update keyboards/binepad/bn003/readme.md * Update keyboards/binepad/bn003/bn003.c * Update keyboards/binepad/bn003/config.h * Update keyboards/binepad/bn003/config.h * Update keyboards/binepad/bn003/info.json * Update keyboards/binepad/bn003/rules.mk * Update keyboards/binepad/bn003/rules.mk * Update keyboards/binepad/bn003/rules.mk * Update bn003.c * Update keyboards/binepad/bn003/readme.md * Update keyboards/binepad/bn003/rules.mk * Update keyboards/binepad/bn003/config.h * Update keyboards/binepad/bn003/keymaps/via/rules.mk * Update keyboards/binepad/bn003/rules.mk --- keyboards/binepad/bn003/bn003.c | 16 ++++ keyboards/binepad/bn003/bn003.h | 23 +++++ keyboards/binepad/bn003/config.h | 89 +++++++++++++++++++ keyboards/binepad/bn003/info.json | 28 ++++++ .../binepad/bn003/keymaps/default/keymap.c | 19 ++++ .../binepad/bn003/keymaps/default/readme.md | 1 + keyboards/binepad/bn003/keymaps/via/keymap.c | 24 +++++ keyboards/binepad/bn003/keymaps/via/rules.mk | 1 + keyboards/binepad/bn003/readme.md | 15 ++++ keyboards/binepad/bn003/rules.mk | 22 +++++ 10 files changed, 238 insertions(+) create mode 100644 keyboards/binepad/bn003/bn003.c create mode 100644 keyboards/binepad/bn003/bn003.h create mode 100644 keyboards/binepad/bn003/config.h create mode 100644 keyboards/binepad/bn003/info.json create mode 100644 keyboards/binepad/bn003/keymaps/default/keymap.c create mode 100644 keyboards/binepad/bn003/keymaps/default/readme.md create mode 100644 keyboards/binepad/bn003/keymaps/via/keymap.c create mode 100644 keyboards/binepad/bn003/keymaps/via/rules.mk create mode 100644 keyboards/binepad/bn003/readme.md create mode 100644 keyboards/binepad/bn003/rules.mk diff --git a/keyboards/binepad/bn003/bn003.c b/keyboards/binepad/bn003/bn003.c new file mode 100644 index 000000000000..80a6d384c09c --- /dev/null +++ b/keyboards/binepad/bn003/bn003.c @@ -0,0 +1,16 @@ +/* Copyright 2020 BINEPAD + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#include "bn003.h" diff --git a/keyboards/binepad/bn003/bn003.h b/keyboards/binepad/bn003/bn003.h new file mode 100644 index 000000000000..15311b534813 --- /dev/null +++ b/keyboards/binepad/bn003/bn003.h @@ -0,0 +1,23 @@ +/* Copyright 2020 BINEPAD + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public 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( \ + K00, K01, K02 \ +) { \ + { K00, K01, K02 } \ +} + diff --git a/keyboards/binepad/bn003/config.h b/keyboards/binepad/bn003/config.h new file mode 100644 index 000000000000..de5fb533a098 --- /dev/null +++ b/keyboards/binepad/bn003/config.h @@ -0,0 +1,89 @@ +/* Copyright 2020 BINEPAD + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License 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 0x4249 // Binepad +#define PRODUCT_ID 0x4287 +#define DEVICE_VER 0x0001 +#define MANUFACTURER Binepad +#define PRODUCT BN003 + +/* Key matrix size */ +#define MATRIX_ROWS 1 +#define MATRIX_COLS 3 + +#define MATRIX_ROW_PINS { C6 } +#define MATRIX_COL_PINS { B4, B5, B6 } +#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. + * + */ diff --git a/keyboards/binepad/bn003/info.json b/keyboards/binepad/bn003/info.json new file mode 100644 index 000000000000..fdf7e3fbb969 --- /dev/null +++ b/keyboards/binepad/bn003/info.json @@ -0,0 +1,28 @@ +{ + "keyboard_name": "BN003", + "url": "https://binepad.com", + "maintainer": "binepad", + "width": 3, + "height": 1, + "layouts": { + "LAYOUT": { + "layout": [ + { + "label": "K0", + "x": 0, + "y": 0 + }, + { + "label": "K1", + "x": 1, + "y": 0 + }, + { + "label": "K2", + "x": 2, + "y": 0 + } + ] + } + } +} diff --git a/keyboards/binepad/bn003/keymaps/default/keymap.c b/keyboards/binepad/bn003/keymaps/default/keymap.c new file mode 100644 index 000000000000..8e73f05bb447 --- /dev/null +++ b/keyboards/binepad/bn003/keymaps/default/keymap.c @@ -0,0 +1,19 @@ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT( + KC_0, + KC_1, + KC_2 + ), + [1] = LAYOUT( + KC_NO, + KC_NO, + KC_NO + ), + [2] = LAYOUT( + KC_NO, + KC_NO, + KC_NO + ) +}; diff --git a/keyboards/binepad/bn003/keymaps/default/readme.md b/keyboards/binepad/bn003/keymaps/default/readme.md new file mode 100644 index 000000000000..be0a7d956eaa --- /dev/null +++ b/keyboards/binepad/bn003/keymaps/default/readme.md @@ -0,0 +1 @@ +# bn003 - Default layout diff --git a/keyboards/binepad/bn003/keymaps/via/keymap.c b/keyboards/binepad/bn003/keymaps/via/keymap.c new file mode 100644 index 000000000000..e0ffb3f80b19 --- /dev/null +++ b/keyboards/binepad/bn003/keymaps/via/keymap.c @@ -0,0 +1,24 @@ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT( + KC_0, + KC_1, + KC_2 + ), + [1] = LAYOUT( + KC_NO, + KC_NO, + KC_NO + ), + [2] = LAYOUT( + KC_NO, + KC_NO, + KC_NO + ), + [3] = LAYOUT( + KC_NO, + KC_NO, + KC_NO + ) +}; diff --git a/keyboards/binepad/bn003/keymaps/via/rules.mk b/keyboards/binepad/bn003/keymaps/via/rules.mk new file mode 100644 index 000000000000..1e5b99807cb7 --- /dev/null +++ b/keyboards/binepad/bn003/keymaps/via/rules.mk @@ -0,0 +1 @@ +VIA_ENABLE = yes diff --git a/keyboards/binepad/bn003/readme.md b/keyboards/binepad/bn003/readme.md new file mode 100644 index 000000000000..daf406dbefc5 --- /dev/null +++ b/keyboards/binepad/bn003/readme.md @@ -0,0 +1,15 @@ +# BINEPAD BN003 + +![BINEPAD BN003](https://imgur.com/q8JPcNEl.jpg) + +A 3% macropad. + +* Keyboard Maintainer: [BINEPAD] +* Hardware Supported: BN003 PCB (ATmega32U4) +* Hardware Availability: [Interest Check](https://www.binepad.com/bn003) + +Make example for this keyboard (after setting up your build environment): + + make binepad/bn003: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/binepad/bn003/rules.mk b/keyboards/binepad/bn003/rules.mk new file mode 100644 index 000000000000..7b15ae06513f --- /dev/null +++ b/keyboards/binepad/bn003/rules.mk @@ -0,0 +1,22 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +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 = 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 +BLUETOOTH_ENABLE = no # Enable Bluetooth +AUDIO_ENABLE = no # Audio output From 9e99a9b98c2e57ce5a4ada41446e8555bc05b1ad Mon Sep 17 00:00:00 2001 From: Darren Meehan Date: Sat, 12 Sep 2020 20:40:31 +0100 Subject: [PATCH 781/930] Remove use of sudo in lily58 make docs (#10301) --- keyboards/lily58/readme.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/keyboards/lily58/readme.md b/keyboards/lily58/readme.md index cbf0c1eeb02a..1aedab6e1796 100644 --- a/keyboards/lily58/readme.md +++ b/keyboards/lily58/readme.md @@ -10,6 +10,6 @@ Hardware Availability: [PCB & Case Data](https://github.com/kata0510/Lily58) Make example for this keyboard (after setting up your build environment): - sudo make lily58:default + make lily58: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 +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 2b9f200a2a0f0430e80df75b8a4d5757e6ca0374 Mon Sep 17 00:00:00 2001 From: Frans de Jonge Date: Sun, 13 Sep 2020 03:17:47 +0200 Subject: [PATCH 782/930] [fix] dfu-programmer <0.7 doesn't support --force flag (#10292) Fixes . --- tmk_core/avr.mk | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tmk_core/avr.mk b/tmk_core/avr.mk index 3cb34dc66503..336a83e9d314 100644 --- a/tmk_core/avr.mk +++ b/tmk_core/avr.mk @@ -122,13 +122,14 @@ define EXEC_DFU if [ "$(1)" ]; then \ $(DFU_PROGRAMMER) $(MCU) flash --force --eeprom $(QUANTUM_PATH)/split_common/$(1);\ fi; \ + $(DFU_PROGRAMMER) $(MCU) flash --force $(BUILD_DIR)/$(TARGET).hex;\ else \ $(DFU_PROGRAMMER) $(MCU) erase; \ if [ "$(1)" ]; then \ $(DFU_PROGRAMMER) $(MCU) flash-eeprom $(QUANTUM_PATH)/split_common/$(1);\ fi; \ + $(DFU_PROGRAMMER) $(MCU) flash $(BUILD_DIR)/$(TARGET).hex;\ fi; \ - $(DFU_PROGRAMMER) $(MCU) flash --force $(BUILD_DIR)/$(TARGET).hex;\ $(DFU_PROGRAMMER) $(MCU) reset endef From 6499eb6a3c512ded96443649d66274ce1064df0f Mon Sep 17 00:00:00 2001 From: undermark5 <31358071+undermark5@users.noreply.github.com> Date: Sun, 13 Sep 2020 08:28:30 -0500 Subject: [PATCH 783/930] Fixed typo in vscode docs (#10303) .vscode/c_cpp_properies.json -> .vscode/c_cpp_properties.json --- docs/other_vscode.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/other_vscode.md b/docs/other_vscode.md index d98b96bdf189..d132afaab6e7 100644 --- a/docs/other_vscode.md +++ b/docs/other_vscode.md @@ -48,7 +48,7 @@ This part is super simple. However, there is some configuration that we need to ### Configuring VS Code -First, we need to set up IntelliSense. This isn't strictly required, but it will make your life a LOT easier. To do this, we need to create the `.vscode/c_cpp_properies.json` file in the QMK Firmware folder, You can do this all manually, but I've done most of the work already. +First, we need to set up IntelliSense. This isn't strictly required, but it will make your life a LOT easier. To do this, we need to create the `.vscode/c_cpp_properties.json` file in the QMK Firmware folder, You can do this all manually, but I've done most of the work already. Grab [this file](https://gist.github.com/drashna/48e2c49ce877be592a1650f91f8473e8) and save it. You may need to edit this file, if you didn't install MSYS2 to the default location, or are using WSL/LxSS. From 02551ae4991d818adb824fe39a82437281ee5306 Mon Sep 17 00:00:00 2001 From: LSChyi Date: Mon, 14 Sep 2020 18:33:43 +0800 Subject: [PATCH 784/930] [Keyboard] add Phoenix keyboard (#10256) * setup keyboard * fit v1 board setting * remove unused def and add ergodox_pretty * add user hooks * add ergodox_pretty to info * apply suggestions * use default split usb timeout --- keyboards/phoenix/chconf.h | 714 +++++++++++++++++++++ keyboards/phoenix/config.h | 50 ++ keyboards/phoenix/halconf.h | 525 +++++++++++++++ keyboards/phoenix/info.json | 58 ++ keyboards/phoenix/keymaps/default/keymap.c | 129 ++++ keyboards/phoenix/mcuconf.h | 253 ++++++++ keyboards/phoenix/phoenix.c | 85 +++ keyboards/phoenix/phoenix.h | 94 +++ keyboards/phoenix/readme.md | 15 + keyboards/phoenix/rules.mk | 48 ++ 10 files changed, 1971 insertions(+) create mode 100644 keyboards/phoenix/chconf.h create mode 100644 keyboards/phoenix/config.h create mode 100644 keyboards/phoenix/halconf.h create mode 100644 keyboards/phoenix/info.json create mode 100644 keyboards/phoenix/keymaps/default/keymap.c create mode 100644 keyboards/phoenix/mcuconf.h create mode 100644 keyboards/phoenix/phoenix.c create mode 100644 keyboards/phoenix/phoenix.h create mode 100644 keyboards/phoenix/readme.md create mode 100644 keyboards/phoenix/rules.mk diff --git a/keyboards/phoenix/chconf.h b/keyboards/phoenix/chconf.h new file mode 100644 index 000000000000..7dc4f84a8a00 --- /dev/null +++ b/keyboards/phoenix/chconf.h @@ -0,0 +1,714 @@ +/* + 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. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +/** + * @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. + * + * @addtogroup config + * @details Kernel related settings and hooks. + * @{ + */ + +#ifndef CHCONF_H +#define CHCONF_H + +#define _CHIBIOS_RT_CONF_ +#define _CHIBIOS_RT_CONF_VER_6_0_ + +/*===========================================================================*/ +/** + * @name System timers settings + * @{ + */ +/*===========================================================================*/ + +/** + * @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. + * @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. + */ +#if !defined(CH_CFG_ST_TIMEDELTA) +#define CH_CFG_ST_TIMEDELTA 2 +#endif + +/** @} */ + +/*===========================================================================*/ +/** + * @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. + */ +#if !defined(CH_CFG_TIME_QUANTUM) +#define CH_CFG_TIME_QUANTUM 0 +#endif + +/** + * @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. + */ +#if !defined(CH_CFG_MEMCORE_SIZE) +#define CH_CFG_MEMCORE_SIZE 0 +#endif + +/** + * @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. + */ +#if !defined(CH_CFG_NO_IDLE_THREAD) +#define CH_CFG_NO_IDLE_THREAD FALSE +#endif + +/** @} */ + +/*===========================================================================*/ +/** + * @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. + */ +#if !defined(CH_CFG_OPTIMIZE_SPEED) +#define CH_CFG_OPTIMIZE_SPEED TRUE +#endif + +/** @} */ + +/*===========================================================================*/ +/** + * @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. + */ +#if !defined(CH_CFG_USE_TM) +#define CH_CFG_USE_TM TRUE +#endif + +/** + * @brief Threads registry APIs. + * @details If enabled then the registry APIs are included in the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_REGISTRY) +#define CH_CFG_USE_REGISTRY TRUE +#endif + +/** + * @brief Threads synchronization APIs. + * @details If enabled then the @p chThdWait() function is included in + * the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_WAITEXIT) +#define CH_CFG_USE_WAITEXIT TRUE +#endif + +/** + * @brief Semaphores APIs. + * @details If enabled then the Semaphores APIs are included in the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_SEMAPHORES) +#define CH_CFG_USE_SEMAPHORES TRUE +#endif + +/** + * @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. + */ +#if !defined(CH_CFG_USE_SEMAPHORES_PRIORITY) +#define CH_CFG_USE_SEMAPHORES_PRIORITY FALSE +#endif + +/** + * @brief Mutexes APIs. + * @details If enabled then the mutexes APIs are included in the kernel. + * + * @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. + * @note Recursive mutexes are heavier and have an increased + * memory footprint. + * + * @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. + * @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. + */ +#if !defined(CH_CFG_USE_CONDVARS) +#define CH_CFG_USE_CONDVARS TRUE +#endif + +/** + * @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. + */ +#if !defined(CH_CFG_USE_CONDVARS_TIMEOUT) +#define CH_CFG_USE_CONDVARS_TIMEOUT TRUE +#endif + +/** + * @brief Events Flags APIs. + * @details If enabled then the event flags APIs are included in the kernel. + * + * @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. + * @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. + */ +#if !defined(CH_CFG_USE_EVENTS_TIMEOUT) +#define CH_CFG_USE_EVENTS_TIMEOUT TRUE +#endif + +/** + * @brief Synchronous Messages APIs. + * @details If enabled then the synchronous messages APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_MESSAGES) +#define CH_CFG_USE_MESSAGES TRUE +#endif + +/** + * @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. + */ +#if !defined(CH_CFG_USE_MESSAGES_PRIORITY) +#define CH_CFG_USE_MESSAGES_PRIORITY FALSE +#endif + +/** + * @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. + */ +#if !defined(CH_CFG_USE_MAILBOXES) +#define CH_CFG_USE_MAILBOXES TRUE +#endif + +/** + * @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. + */ +#if !defined(CH_CFG_USE_MEMCORE) +#define CH_CFG_USE_MEMCORE TRUE +#endif + +/** + * @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. + */ +#if !defined(CH_CFG_USE_HEAP) +#define CH_CFG_USE_HEAP TRUE +#endif + +/** + * @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. + */ +#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. + * @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. + */ +#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 + +/** @} */ + +/*===========================================================================*/ +/** + * @name Debug options + * @{ + */ +/*===========================================================================*/ + +/** + * @brief Debug option, kernel statistics. + * + * @note The default is @p FALSE. + */ +#if !defined(CH_DBG_STATISTICS) +#define CH_DBG_STATISTICS FALSE +#endif + +/** + * @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. + */ +#if !defined(CH_DBG_SYSTEM_STATE_CHECK) +#define CH_DBG_SYSTEM_STATE_CHECK FALSE +#endif + +/** + * @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. + */ +#if !defined(CH_DBG_ENABLE_CHECKS) +#define CH_DBG_ENABLE_CHECKS FALSE +#endif + +/** + * @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. + */ +#if !defined(CH_DBG_ENABLE_ASSERTS) +#define CH_DBG_ENABLE_ASSERTS FALSE +#endif + +/** + * @brief Debug option, trace buffer. + * @details If enabled then the trace buffer is activated. + * + * @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. + * @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. + */ +#if !defined(CH_DBG_ENABLE_STACK_CHECK) +#define CH_DBG_ENABLE_STACK_CHECK FALSE +#endif + +/** + * @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. + */ +#if !defined(CH_DBG_FILL_THREADS) +#define CH_DBG_FILL_THREADS FALSE +#endif + +/** + * @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. + */ +#if !defined(CH_DBG_THREADS_PROFILING) +#define CH_DBG_THREADS_PROFILING FALSE +#endif + +/** @} */ + +/*===========================================================================*/ +/** + * @name Kernel hooks + * @{ + */ +/*===========================================================================*/ + +/** + * @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. + */ +#define CH_CFG_THREAD_EXTRA_FIELDS \ + /* Add threads custom fields here.*/ + +/** + * @brief Threads initialization hook. + * @details User initialization code added to the @p _thread_init() function. + * + * @note It is invoked from within @p _thread_init() 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/phoenix/config.h b/keyboards/phoenix/config.h new file mode 100644 index 000000000000..81fc3677ffcc --- /dev/null +++ b/keyboards/phoenix/config.h @@ -0,0 +1,50 @@ + +/* 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" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0x456B +#define PRODUCT_ID 0x0001 +#define DEVICE_VER 0x0001 +#define MANUFACTURER ErgoKB +#define PRODUCT Phoenix + +/* key matrix size */ +#define MATRIX_ROWS 12 +#define MATRIX_COLS 7 + +#define MOUSEKEY_INTERVAL 10 +#define MOUSEKEY_DELAY 0 +#define MOUSEKEY_TIME_TO_MAX 60 +#define MOUSEKEY_MAX_SPEED 7 +#define MOUSEKEY_WHEEL_DELAY 0 + +#define DIODE_DIRECTION ROW2COL + +/* Locking resynchronize hack */ +#define LOCKING_RESYNC_ENABLE + +#define MATRIX_ROW_PINS { B1, B0, A7, A6, A5, B7 } +#define MATRIX_COL_PINS { B10, B12, B13, B14, B15, A8, A10 } + +#define HAL_USE_SERIAL TRUE +#define SPLIT_HAND_PIN B9 +#define SOFT_SERIAL_PIN A9 +#define SERIAL_USART_DRIVER SD1 +#define SERIAL_USART_TX_PAL_MODE 7 diff --git a/keyboards/phoenix/halconf.h b/keyboards/phoenix/halconf.h new file mode 100644 index 000000000000..a8db392aaa6c --- /dev/null +++ b/keyboards/phoenix/halconf.h @@ -0,0 +1,525 @@ +/* + 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. + 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 + +#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 +#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 cryptographic subsystem. + */ +#if !defined(HAL_USE_CRY) || defined(__DOXYGEN__) +#define HAL_USE_CRY FALSE +#endif + +/** + * @brief Enables the DAC subsystem. + */ +#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 +#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 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 +#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 +#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 + +/** + * @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. */ +/*===========================================================================*/ + +/** + * @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 + +/** + * @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. */ +/*===========================================================================*/ + +/** + * @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 the zero-copy API. + */ +#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 + +/** + * @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. */ +/*===========================================================================*/ + +/** + * @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 16 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 256 bytes for both the transmission and receive + * buffers. + */ +#if !defined(SERIAL_USB_BUFFERS_SIZE) || defined(__DOXYGEN__) +#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 + +/*===========================================================================*/ +/* 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 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 +#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. */ +/*===========================================================================*/ + +/** + * @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 + +/*===========================================================================*/ +/* 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/phoenix/info.json b/keyboards/phoenix/info.json new file mode 100644 index 000000000000..f1275b9de613 --- /dev/null +++ b/keyboards/phoenix/info.json @@ -0,0 +1,58 @@ +{ + "keyboard_name": "Phoenix", + "url": "ergokb.tw", + "maintainer": "ErgoKB via lschyi", + "manufacturer": "ErgoKB", + "width": 17, + "height": 8, + + "layouts": { + "LAYOUT_ergodox": { + "layout": [ + {"x":0, "y":0.375, "w":1.5}, {"x":1.5, "y":0.375}, {"x":2.5, "y":0.125}, {"x":3.5, "y":0}, {"x":4.5, "y":0.125}, {"x":5.5, "y":0.25}, {"x":6.5, "y":0.25}, + {"x":0, "y":1.375, "w":1.5}, {"x":1.5, "y":1.375}, {"x":2.5, "y":1.125}, {"x":3.5, "y":1}, {"x":4.5, "y":1.125}, {"x":5.5, "y":1.25}, {"x":6.5, "y":1.25, "h":1.5}, + {"x":0, "y":2.375, "w":1.5}, {"x":1.5, "y":2.375}, {"x":2.5, "y":2.125}, {"x":3.5, "y":2}, {"x":4.5, "y":2.125}, {"x":5.5, "y":2.25}, + {"x":0, "y":3.375, "w":1.5}, {"x":1.5, "y":3.375}, {"x":2.5, "y":3.125}, {"x":3.5, "y":3}, {"x":4.5, "y":3.125}, {"x":5.5, "y":3.25}, {"x":6.5, "y":2.75, "h":1.5}, + {"x":0.5, "y":4.375}, {"x":1.5, "y":4.375}, {"x":2.5, "y":4.125}, {"x":3.5, "y":4}, {"x":4.5, "y":4.125}, + + {"x":6, "y":5}, {"x":7, "y":5}, + {"x":7, "y":6}, + {"x":5, "y":6, "h":2}, {"x":6, "y":6, "h":2}, {"x":7, "y":7}, + + + {"x":9.5, "y":0.25}, {"x":10.5, "y":0.25}, {"x":11.5, "y":0.125}, {"x":12.5, "y":0}, {"x":13.5, "y":0.125}, {"x":14.5, "y":0.375}, {"x":15.5, "y":0.375, "w":1.5}, + {"x":9.5, "y":1.25, "h":1.5}, {"x":10.5, "y":1.25}, {"x":11.5, "y":1.125}, {"x":12.5, "y":1}, {"x":13.5, "y":1.125}, {"x":14.5, "y":1.375}, {"x":15.5, "y":1.375, "w":1.5}, + {"x":10.5, "y":2.25}, {"x":11.5, "y":2.125}, {"x":12.5, "y":2}, {"x":13.5, "y":2.125}, {"x":14.5, "y":2.375}, {"x":15.5, "y":2.375, "w":1.5}, + {"x":9.5, "y":2.75, "h":1.5}, {"x":10.5, "y":3.25}, {"x":11.5, "y":3.125}, {"x":12.5, "y":3}, {"x":13.5, "y":3.125}, {"x":14.5, "y":3.375}, {"x":15.5, "y":3.375, "w":1.5}, + {"x":11.5, "y":4.125}, {"x":12.5, "y":4}, {"x":13.5, "y":4.125}, {"x":14.5, "y":4.375}, {"x":15.5, "y":4.375}, + + + {"x":9, "y":5}, {"x":10, "y":5}, + {"x":9, "y":6}, + {"x":9, "y":7}, {"x":10, "y":6, "h":2}, {"x":11, "y":6, "h":2} + ] + }, + "LAYOUT_ergodox_pretty": { + "layout": [ + {"x":0, "y":0.375, "w":1.5}, {"x":1.5, "y":0.375}, {"x":2.5, "y":0.125}, {"x":3.5, "y":0}, {"x":4.5, "y":0.125}, {"x":5.5, "y":0.25}, {"x":6.5, "y":0.25}, + {"x":9.5, "y":0.25}, {"x":10.5, "y":0.25}, {"x":11.5, "y":0.125}, {"x":12.5, "y":0}, {"x":13.5, "y":0.125}, {"x":14.5, "y":0.375}, {"x":15.5, "y":0.375, "w":1.5}, + + {"x":0, "y":1.375, "w":1.5}, {"x":1.5, "y":1.375}, {"x":2.5, "y":1.125}, {"x":3.5, "y":1}, {"x":4.5, "y":1.125}, {"x":5.5, "y":1.25}, {"x":6.5, "y":1.25, "h":1.5}, + {"x":9.5, "y":1.25, "h":1.5}, {"x":10.5, "y":1.25}, {"x":11.5, "y":1.125}, {"x":12.5, "y":1}, {"x":13.5, "y":1.125}, {"x":14.5, "y":1.375}, {"x":15.5, "y":1.375, "w":1.5}, + + {"x":0, "y":2.375, "w":1.5}, {"x":1.5, "y":2.375}, {"x":2.5, "y":2.125}, {"x":3.5, "y":2}, {"x":4.5, "y":2.125}, {"x":5.5, "y":2.25}, + {"x":10.5, "y":2.25}, {"x":11.5, "y":2.125}, {"x":12.5, "y":2}, {"x":13.5, "y":2.125}, {"x":14.5, "y":2.375}, {"x":15.5, "y":2.375, "w":1.5}, + + {"x":0, "y":3.375, "w":1.5}, {"x":1.5, "y":3.375}, {"x":2.5, "y":3.125}, {"x":3.5, "y":3}, {"x":4.5, "y":3.125}, {"x":5.5, "y":3.25}, {"x":6.5, "y":2.75, "h":1.5}, + {"x":9.5, "y":2.75, "h":1.5}, {"x":10.5, "y":3.25}, {"x":11.5, "y":3.125}, {"x":12.5, "y":3}, {"x":13.5, "y":3.125}, {"x":14.5, "y":3.375}, {"x":15.5, "y":3.375, "w":1.5}, + + {"x":0.5, "y":4.375}, {"x":1.5, "y":4.375}, {"x":2.5, "y":4.125}, {"x":3.5, "y":4}, {"x":4.5, "y":4.125}, + {"x":11.5, "y":4.125}, {"x":12.5, "y":4}, {"x":13.5, "y":4.125}, {"x":14.5, "y":4.375}, {"x":15.5, "y":4.375}, + + {"x":6, "y":5}, {"x":7, "y":5}, {"x":9, "y":5}, {"x":10, "y":5}, + {"x":7, "y":6}, {"x":9, "y":6}, + {"x":5, "y":6, "h":2}, {"x":6, "y":6, "h":2}, {"x":7, "y":7}, {"x":9, "y":7}, {"x":10, "y":6, "h":2}, {"x":11, "y":6, "h":2} + ] + } + } +} diff --git a/keyboards/phoenix/keymaps/default/keymap.c b/keyboards/phoenix/keymaps/default/keymap.c new file mode 100644 index 000000000000..909e1dbb6057 --- /dev/null +++ b/keyboards/phoenix/keymaps/default/keymap.c @@ -0,0 +1,129 @@ +#include QMK_KEYBOARD_H + +enum layers { + BASE, // default layer + ARROW, // arrows + MOUSE, // mouse keys +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +/* Keymap 0: Basic layer + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * | ESC | 1 | 2 | 3 | 4 | 5 | ~ | | EQL | 6 | 7 | 8 | 9 | 0 | DEL | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | TAB | Q | W | E | R | T | LCTL | | EQL | Y | U | I | O | P | \ | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | LCTL | A | S | D | F | G |------| |------| H | J | K | L | ; | ' | + * |--------+------+------+------+------+------| LSFT | | MIN |------+------+------+------+------+--------| + * | LShift | Z | X | C | V | B | | | | N | M | , | . | / | RShift | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * | MUTE |TG(2) | LSFT | LCTL | LALT | | EQL | MIN | [ | ] | TG(1) | + * `----------------------------------' `----------------------------------' + * ,-------------. ,---------------. + * | VOLD | VOL_U| | F10 | F12 | + * ,------|------|------| |------+--------+------. + * | | | LCTL | | F11 | | | + * | Space| LGUI |------| |------| MO(1) |Enter | + * | | | LSFT | | ESC | | | + * `--------------------' `----------------------' + */ +[BASE] = LAYOUT_ergodox( + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_GRV, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_LCTL, + KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_LSFT, + KC_MUTE, TG(2), KC_LSFT, KC_LCTL, KC_LALT, + KC_VOLD, KC_VOLU, + KC_LCTL, + KC_SPC, KC_LGUI, KC_LSFT, + + KC_EQL, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL, + KC_EQL, 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_MINS, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, + KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, TG(1), + KC_F10, KC_F12, + KC_F11, + KC_ESC, MO(1), KC_ENT), + +/* Keymap 1: Arrow layer + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * | | | | | | | | | | | | | | | | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | | | | | | | | | | | PgDn | PgUp | | [ | | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | | | | ~ | |------| |------| LEFT | DOWN | UP |RIGHT |Backsp| ] | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | | | | | | | | | | | | | | | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * | | | | | | | | | | | | + * `----------------------------------' `----------------------------------' + * ,-------------. ,---------------. + * | | | | | | + * ,------|------|------| |------+--------+------. + * | | | | | | | | + * | | |------| |------| | | + * | | | | | | | | + * `--------------------' `----------------------' + */ +[ARROW] = LAYOUT_ergodox( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TILD, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, + KC_TRNS, + KC_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_PGUP, KC_TRNS, KC_LBRC, KC_TRNS, + KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_BSPC, 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), + +/* Keymap 2: Mouse layer + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * | | | | | | | | | | | | | | | | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | | | | | | | | | | | | | | | | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | | | | | |------| |------| | | | | | | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | | | | | | | | | | | WH_U | | | | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * | | | | | | | WH_L | WH_D | WH_R | | | + * `----------------------------------' `----------------------------------' + * ,-------------. ,---------------. + * | | | | | | + * ,------|------|------| |------+--------+------. + * | | | | | | | | + * | BTN1 | |------| |------| | | + * | | | | | | | | + * `--------------------' `----------------------' + */ +[MOUSE] = LAYOUT_ergodox( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, + KC_TRNS, + KC_BTN1, KC_TRNS, KC_TRNS, + + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_MS_U, KC_TRNS, KC_TRNS, KC_TRNS, + KC_MS_L, KC_MS_D, KC_MS_R, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, + KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS), +}; diff --git a/keyboards/phoenix/mcuconf.h b/keyboards/phoenix/mcuconf.h new file mode 100644 index 000000000000..7758cf476887 --- /dev/null +++ b/keyboards/phoenix/mcuconf.h @@ -0,0 +1,253 @@ +/* + 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. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#ifndef MCUCONF_H +#define MCUCONF_H + +/* + * STM32F4xx 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: + * 15...0 Lowest...Highest. + * + * DMA priorities: + * 0...3 Lowest...Highest. + */ + +#define STM32F4xx_MCUCONF + +/* + * HAL driver system settings. + */ +#define STM32_NO_INIT FALSE +#define STM32_HSI_ENABLED TRUE +#define STM32_LSI_ENABLED TRUE +#define STM32_HSE_ENABLED TRUE +#define STM32_LSE_ENABLED FALSE +#define STM32_CLOCK48_REQUIRED TRUE +#define STM32_SW STM32_SW_PLL +#define STM32_PLLSRC STM32_PLLSRC_HSE +#define STM32_PLLM_VALUE 25 +#define STM32_PLLN_VALUE 336 +#define STM32_PLLP_VALUE 4 +#define STM32_PLLQ_VALUE 7 +#define STM32_HPRE STM32_HPRE_DIV1 +#define STM32_PPRE1 STM32_PPRE1_DIV4 +#define STM32_PPRE2 STM32_PPRE2_DIV2 +#define STM32_RTCSEL STM32_RTCSEL_LSI +#define STM32_RTCPRE_VALUE 8 +#define STM32_MCO1SEL STM32_MCO1SEL_HSI +#define STM32_MCO1PRE STM32_MCO1PRE_DIV1 +#define STM32_MCO2SEL STM32_MCO2SEL_SYSCLK +#define STM32_MCO2PRE STM32_MCO2PRE_DIV5 +#define STM32_I2SSRC STM32_I2SSRC_CKIN +#define STM32_PLLI2SN_VALUE 192 +#define STM32_PLLI2SR_VALUE 5 +#define STM32_PVD_ENABLE FALSE +#define STM32_PLS STM32_PLS_LEV0 +#define STM32_BKPRAM_ENABLE FALSE + +/* + * 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 6 +#define STM32_IRQ_EXTI20_PRIORITY 6 +#define STM32_IRQ_EXTI21_PRIORITY 15 +#define STM32_IRQ_EXTI22_PRIORITY 15 + +/* + * ADC driver system settings. + */ +#define STM32_ADC_ADCPRE ADC_CCR_ADCPRE_DIV4 +#define STM32_ADC_USE_ADC1 FALSE +#define STM32_ADC_ADC1_DMA_STREAM STM32_DMA_STREAM_ID(2, 4) +#define STM32_ADC_ADC1_DMA_PRIORITY 2 +#define STM32_ADC_IRQ_PRIORITY 6 +#define STM32_ADC_ADC1_DMA_IRQ_PRIORITY 6 + +/* + * 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_TIM4 FALSE +#define STM32_GPT_USE_TIM5 FALSE +#define STM32_GPT_USE_TIM9 FALSE +#define STM32_GPT_USE_TIM11 FALSE +#define STM32_GPT_TIM1_IRQ_PRIORITY 7 +#define STM32_GPT_TIM2_IRQ_PRIORITY 7 +#define STM32_GPT_TIM3_IRQ_PRIORITY 7 +#define STM32_GPT_TIM4_IRQ_PRIORITY 7 +#define STM32_GPT_TIM5_IRQ_PRIORITY 7 +#define STM32_GPT_TIM9_IRQ_PRIORITY 7 +#define STM32_GPT_TIM11_IRQ_PRIORITY 7 + +/* + * I2C driver system settings. + */ +#define STM32_I2C_USE_I2C1 FALSE +#define STM32_I2C_USE_I2C2 FALSE +#define STM32_I2C_USE_I2C3 FALSE +#define STM32_I2C_BUSY_TIMEOUT 50 +#define STM32_I2C_I2C1_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 0) +#define STM32_I2C_I2C1_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 6) +#define STM32_I2C_I2C2_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 2) +#define STM32_I2C_I2C2_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 7) +#define STM32_I2C_I2C3_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 2) +#define STM32_I2C_I2C3_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 4) +#define STM32_I2C_I2C1_IRQ_PRIORITY 5 +#define STM32_I2C_I2C2_IRQ_PRIORITY 5 +#define STM32_I2C_I2C3_IRQ_PRIORITY 5 +#define STM32_I2C_I2C1_DMA_PRIORITY 3 +#define STM32_I2C_I2C2_DMA_PRIORITY 3 +#define STM32_I2C_I2C3_DMA_PRIORITY 3 +#define STM32_I2C_DMA_ERROR_HOOK(i2cp) osalSysHalt("DMA failure") + +/* + * I2S driver system settings. + */ +#define STM32_I2S_USE_SPI2 FALSE +#define STM32_I2S_USE_SPI3 FALSE +#define STM32_I2S_SPI2_IRQ_PRIORITY 10 +#define STM32_I2S_SPI3_IRQ_PRIORITY 10 +#define STM32_I2S_SPI2_DMA_PRIORITY 1 +#define STM32_I2S_SPI3_DMA_PRIORITY 1 +#define STM32_I2S_SPI2_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 3) +#define STM32_I2S_SPI2_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 4) +#define STM32_I2S_SPI3_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 0) +#define STM32_I2S_SPI3_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 7) +#define STM32_I2S_DMA_ERROR_HOOK(i2sp) 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_USE_TIM4 FALSE +#define STM32_ICU_USE_TIM5 FALSE +#define STM32_ICU_USE_TIM9 FALSE +#define STM32_ICU_TIM1_IRQ_PRIORITY 7 +#define STM32_ICU_TIM2_IRQ_PRIORITY 7 +#define STM32_ICU_TIM3_IRQ_PRIORITY 7 +#define STM32_ICU_TIM4_IRQ_PRIORITY 7 +#define STM32_ICU_TIM5_IRQ_PRIORITY 7 +#define STM32_ICU_TIM9_IRQ_PRIORITY 7 + +/* + * 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_USE_TIM4 FALSE +#define STM32_PWM_USE_TIM5 FALSE +#define STM32_PWM_USE_TIM9 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_TIM5_IRQ_PRIORITY 7 +#define STM32_PWM_TIM9_IRQ_PRIORITY 7 + +/* + * SERIAL driver system settings. + */ +#define STM32_SERIAL_USE_USART1 TRUE +#define STM32_SERIAL_USE_USART2 FALSE +#define STM32_SERIAL_USE_USART6 FALSE +#define STM32_SERIAL_USART1_PRIORITY 12 +#define STM32_SERIAL_USART2_PRIORITY 12 +#define STM32_SERIAL_USART6_PRIORITY 12 + +/* + * SPI driver system settings. + */ +#define STM32_SPI_USE_SPI1 FALSE +#define STM32_SPI_USE_SPI2 FALSE +#define STM32_SPI_USE_SPI3 FALSE +#define STM32_SPI_SPI1_RX_DMA_STREAM STM32_DMA_STREAM_ID(2, 0) +#define STM32_SPI_SPI1_TX_DMA_STREAM STM32_DMA_STREAM_ID(2, 3) +#define STM32_SPI_SPI2_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 3) +#define STM32_SPI_SPI2_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 4) +#define STM32_SPI_SPI3_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 0) +#define STM32_SPI_SPI3_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 7) +#define STM32_SPI_SPI1_DMA_PRIORITY 1 +#define STM32_SPI_SPI2_DMA_PRIORITY 1 +#define STM32_SPI_SPI3_DMA_PRIORITY 1 +#define STM32_SPI_SPI1_IRQ_PRIORITY 10 +#define STM32_SPI_SPI2_IRQ_PRIORITY 10 +#define STM32_SPI_SPI3_IRQ_PRIORITY 10 +#define STM32_SPI_DMA_ERROR_HOOK(spip) osalSysHalt("DMA failure") + +/* + * ST driver system settings. + */ +#define STM32_ST_IRQ_PRIORITY 8 +#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_USE_USART6 FALSE +#define STM32_UART_USART1_RX_DMA_STREAM STM32_DMA_STREAM_ID(2, 5) +#define STM32_UART_USART1_TX_DMA_STREAM STM32_DMA_STREAM_ID(2, 7) +#define STM32_UART_USART2_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 5) +#define STM32_UART_USART2_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 6) +#define STM32_UART_USART6_RX_DMA_STREAM STM32_DMA_STREAM_ID(2, 2) +#define STM32_UART_USART6_TX_DMA_STREAM STM32_DMA_STREAM_ID(2, 7) +#define STM32_UART_USART1_IRQ_PRIORITY 12 +#define STM32_UART_USART2_IRQ_PRIORITY 12 +#define STM32_UART_USART6_IRQ_PRIORITY 12 +#define STM32_UART_USART1_DMA_PRIORITY 0 +#define STM32_UART_USART2_DMA_PRIORITY 0 +#define STM32_UART_USART6_DMA_PRIORITY 0 +#define STM32_UART_DMA_ERROR_HOOK(uartp) osalSysHalt("DMA failure") + +/* + * USB driver system settings. + */ +#define STM32_USB_USE_OTG1 TRUE +#define STM32_USB_OTG1_IRQ_PRIORITY 14 +#define STM32_USB_OTG1_RX_FIFO_SIZE 512 +#define STM32_USB_OTG_THREAD_PRIO NORMALPRIO+1 +#define STM32_USB_OTG_THREAD_STACK_SIZE 128 +#define STM32_USB_OTGFIFO_FILL_BASEPRI 0 + +/* + * WDG driver system settings. + */ +#define STM32_WDG_USE_IWDG FALSE + +#endif /* MCUCONF_H */ diff --git a/keyboards/phoenix/phoenix.c b/keyboards/phoenix/phoenix.c new file mode 100644 index 000000000000..e79b35b1591f --- /dev/null +++ b/keyboards/phoenix/phoenix.c @@ -0,0 +1,85 @@ +#include "hal.h" +#include "usb_main.h" +#include "phoenix.h" + +void bootmagic_lite(void) { + matrix_scan(); + wait_ms(5); + matrix_scan(); + + if ((matrix_get_row(0) & 1) || (matrix_get_row(6) & 1)) { + palSetPadMode(GPIOB, 8, PAL_MODE_OUTPUT_PUSHPULL); + palSetPadMode(GPIOB, 5, PAL_MODE_OUTPUT_PUSHPULL); + palSetPadMode(GPIOB, 6, PAL_MODE_OUTPUT_PUSHPULL); + led1_off(); + led2_off(); + led3_off(); + + led3_on(); + wait_ms(50); + led2_on(); + wait_ms(50); + led1_on(); + wait_ms(50); + + led3_off(); + wait_ms(50); + led2_off(); + wait_ms(50); + led1_off(); + wait_ms(50); + + bootloader_jump(); + } +} + +void keyboard_pre_init_kb(void) { + palSetPadMode(GPIOB, 8, PAL_MODE_OUTPUT_PUSHPULL); + palSetPadMode(GPIOB, 5, PAL_MODE_OUTPUT_PUSHPULL); + palSetPadMode(GPIOB, 6, PAL_MODE_OUTPUT_PUSHPULL); + led1_off(); + led2_off(); + led3_off(); + + keyboard_pre_init_user(); +} + +void keyboard_post_init_kb(void) { + led1_on(); + wait_ms(50); + led2_on(); + wait_ms(50); + led3_on(); + wait_ms(50); + + led1_off(); + wait_ms(50); + led2_off(); + wait_ms(50); + led3_off(); + wait_ms(50); + + keyboard_post_init_user(); +} + +void manipulate_led(uint32_t led, bool on) { + switch (led) { + case 1: + on ? led1_on() : led1_off(); + case 2: + on ? led2_on() : led2_off(); + case 3: + on ? led3_on() : led3_off(); + } +} + + +layer_state_t layer_state_set_kb(uint32_t state) { + state = layer_state_set_user(state); + + uint8_t layer = get_highest_layer(state); + manipulate_led(1, layer & 1); + manipulate_led(2, layer >> 1 & 1); + manipulate_led(3, layer >> 2 & 1); + return state; +} diff --git a/keyboards/phoenix/phoenix.h b/keyboards/phoenix/phoenix.h new file mode 100644 index 000000000000..bd8e4a30ab4e --- /dev/null +++ b/keyboards/phoenix/phoenix.h @@ -0,0 +1,94 @@ +/* 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" + +inline void led_pin_on(uint8_t pin) { palSetPad(GPIOB, pin); }; +inline void led_pin_off(uint8_t pin) { palClearPad(GPIOB, pin); }; + +inline void led1_on(void) { led_pin_on(8); }; +inline void led2_on(void) { led_pin_on(5); }; +inline void led3_on(void) { led_pin_on(6); }; + +inline void led1_off(void) { led_pin_off(8); }; +inline void led2_off(void) { led_pin_off(5); }; +inline void led3_off(void) { led_pin_off(6); }; + +#define LAYOUT_ergodox( \ + k00,k01,k02,k03,k04,k05,k06, \ + k10,k11,k12,k13,k14,k15,k16, \ + k20,k21,k22,k23,k24,k25, \ + k30,k31,k32,k33,k34,k35,k36, \ + k40,k41,k42,k43,k44, \ + k55,k56, \ + k54, \ + k53,k52,k51, \ + \ + k07,k08,k09,k0A,k0B,k0C,k0D, \ + k17,k18,k19,k1A,k1B,k1C,k1D, \ + k28,k29,k2A,k2B,k2C,k2D, \ + k37,k38,k39,k3A,k3B,k3C,k3D, \ + k49,k4A,k4B,k4C,k4D, \ + k57,k58, \ + k59, \ + k5C,k5B,k5A ) \ + \ + /* matrix positions */ \ + { \ + { k00, k01, k02, k03, k04, k05, k06 }, \ + { k10, k11, k12, k13, k14, k15, k16 }, \ + { k20, k21, k22, k23, k24, k25 }, \ + { k30, k31, k32, k33, k34, k35, k36 }, \ + { k40, k41, k42, k43, k44 }, \ + { k53, k52, k51, k55, k56, k54 }, \ + \ + { k0D, k0C, k0B, k0A, k09, k08, k07 }, \ + { k1D, k1C, k1B, k1A, k19, k18, k17 }, \ + { k2D, k2C, k2B, k2A, k29, k28 }, \ + { k3D, k3C, k3B, k3A, k39, k38, k37 }, \ + { k4D, k4C, k4B, k4A, k49 }, \ + { k5A, k5B, k5C, k58, k57, k59 }, \ + } + +/* ---------- LEFT HAND ----------- ---------- RIGHT HAND ---------- */ +#define LAYOUT_ergodox_pretty( \ + 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, 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, R42,R43,R44,R45,R46, \ + L55,L56, R50,R51, \ + L54, R52, \ + L53,L52,L51, R55,R54,R53 ) \ + \ + /* matrix positions */ \ + { \ + { L00, L10, L02, L03, L04, L05, L06 },\ + { L10, L11, L12, L13, L14, L15, L16 },\ + { L20, L21, L22, L23, L24, L25 }, \ + { L30, L31, L32, L33, L34, L35, L36 },\ + { L40, L41, L42, L43, L44 }, \ + { L53, L52, L51, L55, L56, L54 }, \ + \ + { R00, R01, R02, R03, R04, R05, R06 },\ + { R10, R11, R12, R13, R14, R15, R16 },\ + { R20, R21, R22, R23, R24, R25 }, \ + { R30, R31, R32, R33, R34, R35, R36 },\ + { R40, R41, R42, R43, R44 }, \ + { R53, R54, R55, R51, R50, R52 }, \ + } diff --git a/keyboards/phoenix/readme.md b/keyboards/phoenix/readme.md new file mode 100644 index 000000000000..a39f52359b7b --- /dev/null +++ b/keyboards/phoenix/readme.md @@ -0,0 +1,15 @@ +# Phoenix + +![Phoenix](https://imgur.com/adJiuMHl.jpg) + +A reborn version of Ergodox with several improved features. [More info on ErgoKB](https://www.ergokb.tw/) + +* Keyboard Maintainer: [lschyi](https://github.com/lschyi) +* Hardware Supported: Phoenix Mechanical Keyboard PCB +* Hardware Availability: [ErgoKB](https://www.ergokb.tw/products/phoenix/) + +Make example for this keyboard (after setting up your build environment): + + make phoenix: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/phoenix/rules.mk b/keyboards/phoenix/rules.mk new file mode 100644 index 000000000000..6c6c8446ab6c --- /dev/null +++ b/keyboards/phoenix/rules.mk @@ -0,0 +1,48 @@ +# 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 +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend, do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +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 +BLUETOOTH_ENABLE = no # Enable Bluetooth +AUDIO_ENABLE = no # Audio output +STENO_ENABLE = no +SPLIT_KEYBOARD = yes +SERIAL_DRIVER = usart +KEYBOARD_SHARED_EP = yes + +## chip/board settings +# the next two should match the directories in +# /os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES) +MCU_FAMILY = STM32 +MCU_SERIES = STM32F4xx +# linker script to use +# it should exist either in /os/common/ports/ARMCMx/compilers/GCC/ld/ +# or /ld/ +MCU_LDSCRIPT = STM32F401xC +# startup code to use +# is should exist in /os/common/ports/ARMCMx/compilers/GCC/mk/ +MCU_STARTUP = stm32f4xx +# it should exist either in /os/hal/boards/ +# or /boards +BOARD = BLACKPILL_STM32_F401 +# 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 +ARMV = 7 +USE_FPU = yes +# Address of the booloader in system memory +STM32_BOOTLOADER_ADDRESS = 0x1FFF0000 + +# 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 + +OPT_DEFS += -DSTM32_DMA_REQUIRED=TRUE From b58f9ef1e29c1de848f8896078111e55d6d62a65 Mon Sep 17 00:00:00 2001 From: Nick Blyumberg Date: Mon, 14 Sep 2020 21:15:25 -0400 Subject: [PATCH 785/930] [Keymap] Hub16 AutoHotKey Companion (#10159) * Hub16 AutoHotKey Companion * Revised after PR comments by Drashna * Update keyboards/hub16/keymaps/ahk_companion/readme.md Co-authored-by: James Young <18669334+noroadsleft@users.noreply.github.com> * Update keyboards/hub16/keymaps/ahk_companion/readme.md Co-authored-by: James Young <18669334+noroadsleft@users.noreply.github.com> * Update keyboards/hub16/keymaps/ahk_companion/readme.md Co-authored-by: James Young <18669334+noroadsleft@users.noreply.github.com> * Update keyboards/hub16/keymaps/ahk_companion/readme.md Co-authored-by: James Young <18669334+noroadsleft@users.noreply.github.com> * Update keyboards/hub16/keymaps/ahk_companion/readme.md Co-authored-by: James Young <18669334+noroadsleft@users.noreply.github.com> * Update keyboards/hub16/keymaps/ahk_companion/keymap.c Co-authored-by: Drashna Jaelre Co-authored-by: James Young <18669334+noroadsleft@users.noreply.github.com> Co-authored-by: Drashna Jaelre --- .../keymaps/ahk_companion/ahk_companion.ahk | 104 +++++++++++ .../hub16/keymaps/ahk_companion/config.h | 57 ++++++ .../hub16/keymaps/ahk_companion/keymap.c | 168 ++++++++++++++++++ .../hub16/keymaps/ahk_companion/readme.md | 71 ++++++++ .../hub16/keymaps/ahk_companion/rules.mk | 3 + 5 files changed, 403 insertions(+) create mode 100644 keyboards/hub16/keymaps/ahk_companion/ahk_companion.ahk create mode 100644 keyboards/hub16/keymaps/ahk_companion/config.h create mode 100644 keyboards/hub16/keymaps/ahk_companion/keymap.c create mode 100644 keyboards/hub16/keymaps/ahk_companion/readme.md create mode 100755 keyboards/hub16/keymaps/ahk_companion/rules.mk diff --git a/keyboards/hub16/keymaps/ahk_companion/ahk_companion.ahk b/keyboards/hub16/keymaps/ahk_companion/ahk_companion.ahk new file mode 100644 index 000000000000..becab49e5cc5 --- /dev/null +++ b/keyboards/hub16/keymaps/ahk_companion/ahk_companion.ahk @@ -0,0 +1,104 @@ +#Persistent +#SingleInstance force + +;================================================================= +; Macro Pad Shortcuts ; +;================================================================= + +;================================================================= +; Layer 0 +;;================================================================= +;Row 1 + +F13::Send a +F14::Send b +F15::Send c +F16::Send d + +;Row 2 + +F17::Send e +F18::Send f +F19::Send g +F20::Send h + +;Row 3 + +F21::Send i +F22::Send j +F23::Send k +F24::Send l + + +;================================================================= +; Layer 1 +;;================================================================= +;Row 1 + +!F13::Send m +!F14::Send n +!F15::Send o +!F16::Send p + +;Row 2 + +!F17::Send q +!F18::Send r +!F19::Send s +!F20::Send t + +;Row 3 + +!F21::Send u +!F22::Send v +!F23::Send w +!F24::Send x + + +;================================================================= +; Layer 2 +;;================================================================= +;Row 1 + ++F13::Send y ++F14::Send z ++F15::Send A ++F16::Send B + +;Row 2 + ++F17::Send C ++F18::Send D ++F19::Send E ++F20::Send F + +;Row 3 + ++F21::Send G ++F22::Send H ++F23::Send I ++F24::Send J + +;================================================================= +; Layer 3 +;;================================================================= +;Row 1 + +^F13::Send K +^F14::Send L +^F15::Send M +^F16::Send N + +;Row 2 + +^F17::Send O +^F18::Send P +^F19::Send Q +^F20::Send R + +;Row 3 + +^F21::Send S +^F22::Send T +^F23::Send U +^F24::Send V diff --git a/keyboards/hub16/keymaps/ahk_companion/config.h b/keyboards/hub16/keymaps/ahk_companion/config.h new file mode 100644 index 000000000000..aa9e081c7560 --- /dev/null +++ b/keyboards/hub16/keymaps/ahk_companion/config.h @@ -0,0 +1,57 @@ +/* +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 + +#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 + +// Time out one shot layers after 3 seconds +#define ONESHOT_TIMEOUT 3000 + +// Undef and redefine default brightness to half of 255 +#undef RGBLIGHT_LIMIT_VAL +#define RGBLIGHT_LIMIT_VAL 255 + +//Define a preview timeout for RGB reviews +#define PREVIEW_TIMEOUT 5000 + +// Enable Light Layers implementation +#define RGBLIGHT_LAYERS +// Allow Light Layers to override RGB off configuration +#define RGBLIGHT_LAYERS_OVERRIDE_RGB_OFF diff --git a/keyboards/hub16/keymaps/ahk_companion/keymap.c b/keyboards/hub16/keymaps/ahk_companion/keymap.c new file mode 100644 index 000000000000..bbc2ac09a112 --- /dev/null +++ b/keyboards/hub16/keymaps/ahk_companion/keymap.c @@ -0,0 +1,168 @@ +/* +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 + +#if defined(RGBLIGHT_ENABLE) && defined(RGBLIGHT_LAYERS) +static uint32_t rgb_preview_timer = 0; +#endif + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + //Layer 0 - Base Layer (F13 to F24, and One Shot Layer 1,2,3 or Toggle Layer 4) + [0] = LAYOUT( + KC_MPLY, KC_MUTE, + KC_F13, KC_F14, KC_F15, KC_F16, + KC_F17, KC_F18, KC_F19, KC_F20, + KC_F21, KC_F22, KC_F23, KC_F24, + OSL(1), OSL(2), OSL(3), TG(4) //Transparent to let you go between layers + ), + + [1] = LAYOUT( + KC_MPLY, KC_MUTE, + LALT(KC_F13), LALT(KC_F14), LALT(KC_F15), LALT(KC_F16), + LALT(KC_F17), LALT(KC_F18), LALT(KC_F19), LALT(KC_F20), + LALT(KC_F21), LALT(KC_F22), LALT(KC_F23), LALT(KC_F24), + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS //Transparent to let you go between layers + ), + + //Layer 2 - Shift + Function Key Layer + [2] = LAYOUT( + KC_MPLY, KC_MUTE, + LSFT(KC_F13), LSFT(KC_F14), LSFT(KC_F15), LSFT(KC_F16), + LSFT(KC_F17), LSFT(KC_F18), LSFT(KC_F19), LSFT(KC_F20), + LSFT(KC_F21), LSFT(KC_F22), LSFT(KC_F23), LSFT(KC_F24), + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS //Transparent to let you go between layers + ), + + //Layer 3 - Control + Function Key + [3] = LAYOUT( + KC_MPLY, KC_MUTE, + LCTL(KC_F13), LCTL(KC_F14), LCTL(KC_F15), LCTL(KC_F16), + LCTL(KC_F17), LCTL(KC_F18), LCTL(KC_F19), LCTL(KC_F20), + LCTL(KC_F21), LCTL(KC_F22), LCTL(KC_F23), LCTL(KC_F24), + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS //Transparent to let you go between layers + ), + + //Layer 4 - Multimedia + [4] = LAYOUT( + KC_MPLY, KC_MUTE, + KC_MPRV, KC_MPLY, KC_U, KC_K, + KC_NO, KC_NO, KC_ENT, KC_X, + KC_NO, RESET, LSFT(KC_HASH), KC_J, + TG(5), KC_TRNS, KC_TRNS, KC_TRNS //Transparent to let you go between layers + ), + + //Layer 5 - Keyboard Lights, Programming and Special Functions + [5] = LAYOUT( + KC_MPLY, KC_MUTE, + RGB_MOD, RGB_HUI, RGB_SAI, RGB_VAI, + RGB_RMOD, RGB_HUD, RGB_SAD, RGB_VAD, + RGB_TOG, EEP_RST, RESET, KC_LSHIFT, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS //Transparent to let you go between layers + ), +}; + +const rgblight_segment_t PROGMEM my_layer0_layer[] = RGBLIGHT_LAYER_SEGMENTS( + {0,16,HSV_ORANGE} + ); +const rgblight_segment_t PROGMEM my_layer1_layer[] = RGBLIGHT_LAYER_SEGMENTS( + {0,16,HSV_GREEN} + ); +const rgblight_segment_t PROGMEM my_layer2_layer[] = RGBLIGHT_LAYER_SEGMENTS( + {0,16,HSV_RED} + ); +const rgblight_segment_t PROGMEM my_layer3_layer[] = RGBLIGHT_LAYER_SEGMENTS( + {0,16,HSV_BLUE} + ); +const rgblight_segment_t PROGMEM my_layer4_layer[] = RGBLIGHT_LAYER_SEGMENTS( + {0,16,HSV_WHITE} + ); +const rgblight_segment_t PROGMEM my_layer5_layer[] = RGBLIGHT_LAYER_SEGMENTS( + {0,16,HSV_TEAL} + ); +const rgblight_segment_t* const PROGMEM my_rgb_layers[] = RGBLIGHT_LAYERS_LIST( + my_layer0_layer, + my_layer1_layer, + my_layer2_layer, + my_layer3_layer, + my_layer4_layer, + my_layer5_layer + ); + +void encoder_update_user(uint8_t index, bool clockwise) { + if (index == 0) { /* Left Encoder */ + if (clockwise) { + tap_code(KC_MPRV); + } else { + tap_code(KC_MNXT); + } + } else if (index == 1) { /* Right Encoder */ + if (clockwise) { + tap_code(KC_VOLD); + } else { + tap_code(KC_VOLU); + } + } +} +void post_process_record_user(uint16_t keycode, keyrecord_t *record) { + // Allow for a preview of changes when modifying RGB +# if defined(RGBLIGHT_ENABLE) && defined(RGBLIGHT_LAYERS) + switch (keycode) { + case RGB_TOG ... VLK_TOG: + for (uint8_t i = 0; i < RGBLIGHT_MAX_LAYERS; i++) { + rgblight_set_layer_state(i, false); + } + rgb_preview_timer = timer_read32(); + break; + } +# endif + return; +} + +//Set the appropriate layer color +layer_state_t layer_state_set_user(layer_state_t state) { + rgblight_set_layer_state(1, layer_state_cmp(state, 1)); + rgblight_set_layer_state(2, layer_state_cmp(state, 2)); + rgblight_set_layer_state(3, layer_state_cmp(state, 3)); + rgblight_set_layer_state(4, layer_state_cmp(state, 4)); + rgblight_set_layer_state(5, layer_state_cmp(state, 5)); + return state; +} + +void keyboard_post_init_user(void) { + //Enable the LED layers + rgblight_layers = my_rgb_layers; + layer_state_set_user(layer_state); +} + +void matrix_scan_user(void) { +# if defined(RGBLIGHT_ENABLE) && defined(RGBLIGHT_LAYERS) + // Allow preview for + if (rgb_preview_timer && TIMER_DIFF_32(timer_read32(), rgb_preview_timer) > PREVIEW_TIMEOUT) { + rgb_preview_timer = 0; + default_layer_state_set_user(default_layer_state); + layer_state_set_user(layer_state); + led_update_user((led_t) host_keyboard_leds()); + } +# endif +} + +//EEPROM Reset Function +void eeconfig_init_user(void) { + rgblight_enable(); // Enable RGB by default + rgblight_sethsv_orange(); // Set it to orange by default +} diff --git a/keyboards/hub16/keymaps/ahk_companion/readme.md b/keyboards/hub16/keymaps/ahk_companion/readme.md new file mode 100644 index 000000000000..6e8f9f2d2a25 --- /dev/null +++ b/keyboards/hub16/keymaps/ahk_companion/readme.md @@ -0,0 +1,71 @@ +# AutoHotKey Companion + +## Overview +AutoHotKey Companion Keymap for Hub16 macropad is designed be a quick and easy way to get started with AutoHotKey and to provide a foundation for customizing your own macropad. I upgraded to the Super16 from a Super16 because it kept the RGB underglow lights for an easy way (RGB) to identify what layer I was on with a quick glance or peripheral vision and added 2 rotary encoders and a USB 2.0 hub with USB-C ports. The F13 to F24 keys were selected as they are rarely used so you won't run into conflicts with existing application shortcuts and AutoHotKey recognizes them without any issues. *Note:* MacOS does not support/recognize F21 to F24 so these would need to be remapped for Mac users. + +Same functionality can be accomplished with other similar applications on the host system like Keyboard Maestro, AutoIt, etc. + +* AutoHotKey(Windows) +* AutoIT (Windows) +* Keyboard Maestro(Mac) +* AutoKey(Linux) + +This keymap allows for a total of 48 Function/Macro keys that are accessible within 2 sequential key presses (or more when extended with your own code and additional layers) + +## Encoders +Encoder functionality was made based on my needs but it can be remapped as desired by changing the keycodes. + +Left Encoder: + * Counter clockwise: Previous Multimedia + * Clockwise: Next Multimedia + * Click: Play/Pause + + Right Encoder: + * Counter clockwise: Volume Down + * Clockwise: Volume Up + * Click: Mute/Unmute + +## Alternate Implementations +I chose to use QMK OSL (One Shot Layer) functionality to avoid having to hold a key while selecting the next key and to have my layers always go back to the default layer as the starting point. This also helps me avoid having to cognitively remember what layer I am on. + +If persistent behavior is prefered, OSL can be swapped for TG which will toggle the layer on/off with a key press instead of clearing the layer once the Function key is pressed. This is useful if a layer contains several keys that need to be used in sequence. I also added a OSL timeout of 3 seconds, so that if the key is not pressed within 3 seconds the layer will go back to default. This can be adjusted in the config.h file by increasing 3000 to a desired value: `#define ONESHOT_TIMEOUT 3000` + + + + +## Layers + +While the first 5 layers are accessible with only 1 key press at most, the 5th (less frequently used) layer is accessed by first going to the 4th layer, which makes the TG(5) button available on the bottom left. Space for additional 2 more layer toggles is available on the 2 middle buttons on the bottom row. Please refer to the layer diagrams. + + +* Layer 0 (Base Layer) - the default layer and functions like sending the F13 to F24 keys along with the bottom row to activate another 4 layers. + + ![Image of Base Layer ](https://i.imgur.com/0LhityX.png) + +* Layer 1 (Alt Layer) - Equivalent to Alt+Fxx key being pressed + + ![Image of Layer 1 ](https://i.imgur.com/ZblqLZt.png) + +* Layer 2 (Shift Layer) - Equivalent to Shift+Fxx key being pressed + + ![Image of Layer 2 ](https://i.imgur.com/ZQHwLC0.png) + +* Layer 3 (Control Layer) - Equivalent to Ctrl+Fxx key being pressed + + ![Image of Layer 3 ](https://i.imgur.com/JkM8bqV.png) + +* Layer 4 (Config Layer) - Layer for multimedia. You can replace the KC_TRNS on this layer in keymap.c to TG(x) to enable additional layers. + + ![Image of Layer 4 ](https://i.imgur.com/srDp5Lv.png) + +* Layer 5 (RGB Control/QMK) - RGB control layer and Quantum functions (Reset, EEPROM Reset, ) + + ![Image of Layer 5 ](https://i.imgur.com/Os3n8dx.png) + +## Host Configuration + +Once the keymap has been flashed to the Super16, you can download the accompanying AutoHotKey file or create your own and have it start automatically either via a Windows Task or another way. Using AutoHotKey allows adjustment of functionality of the buttons without the need to change your map and reflash the macropad every time. +Starting the AHK file can be done either by: +* Creating a Windows Task +* Adding the AHK to the startup folder +* Launch manually diff --git a/keyboards/hub16/keymaps/ahk_companion/rules.mk b/keyboards/hub16/keymaps/ahk_companion/rules.mk new file mode 100755 index 000000000000..022a3eeeed0d --- /dev/null +++ b/keyboards/hub16/keymaps/ahk_companion/rules.mk @@ -0,0 +1,3 @@ +TAP_DANCE_ENABLE = no # Support for tap dancing + + From 0050033acaec3eaccb972d9d87ef64b713b3e7f2 Mon Sep 17 00:00:00 2001 From: Lasse Bjerre Date: Tue, 15 Sep 2020 03:41:30 +0200 Subject: [PATCH 786/930] Add ISO layouts for YMD75 (#10244) * Update rev2.h * Update info.json * Create keymap.c * Add ISO layout to rev1 * Removed redundant keycount * Add fix for rev1 board + additional key * Updated default iso keymap * Add layout with 1.5u keys to the right of spacebar * Fixed rev2 rwkl and added default layout --- keyboards/ymd75/info.json | 177 ++++++++++++++++++ keyboards/ymd75/keymaps/default_iso/keymap.c | 36 ++++ .../ymd75/keymaps/default_iso_rwkl/keymap.c | 36 ++++ keyboards/ymd75/rev1/rev1.h | 64 +++++-- keyboards/ymd75/rev2/rev2.h | 32 ++++ 5 files changed, 331 insertions(+), 14 deletions(-) create mode 100644 keyboards/ymd75/keymaps/default_iso/keymap.c create mode 100644 keyboards/ymd75/keymaps/default_iso_rwkl/keymap.c diff --git a/keyboards/ymd75/info.json b/keyboards/ymd75/info.json index a0610afa3f62..64412dd2fcc2 100644 --- a/keyboards/ymd75/info.json +++ b/keyboards/ymd75/info.json @@ -7,6 +7,183 @@ "layouts": { "LAYOUT": { "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":"Del", "x":14, "y":0}, {"label":"Fn", "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":"End", "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 Up", "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":"Page Down", "x":15, "y":4}, {"label":"Ctrl", "x":0, "y":5, "w":1.25}, {"label":"GUI", "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": { + "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":"AltGr", "x":10, "y":5}, + {"label":"Menu", "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_rwkl": { + "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":"AltGr", "x":10, "y":5, "w":1.5}, + {"label":"Ctrl", "x":11.5, "y":5, "w":1.5}, + {"label":"Left", "x":13, "y":5}, + {"label":"Down", "x":14, "y":5}, + {"label":"Right", "x":15, "y":5} + ] } } } diff --git a/keyboards/ymd75/keymaps/default_iso/keymap.c b/keyboards/ymd75/keymaps/default_iso/keymap.c new file mode 100644 index 000000000000..86af81e22016 --- /dev/null +++ b/keyboards/ymd75/keymaps/default_iso/keymap.c @@ -0,0 +1,36 @@ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [0] = LAYOUT_75_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_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_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_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_RCTL, KC_LEFT, KC_DOWN, KC_RGHT + /* └───────────┴───────────┴───────────┴───────────────────────────────────────────────────────────────┴─────────┴─────────┴─────────┴─────────┴─────────┴─────────┘ */ + ), + + [1] = LAYOUT_75_iso( + /* ┌─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┐ */ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MPLY, KC_MPRV, KC_MNXT, + /* ├─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┴─────────┼─────────┤ */ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_VOLU, + /* ├─────────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬──────────────┼─────────┤ */ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_VOLD, + /* ├──────────────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬ ├─────────┤ */ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + /* ├───────────┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴─────────┴─┬─────────┼─────────┤ */ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + /* ├───────────┼─────────┴─┬───────┴───┬─────┴─────────┴─────────┴─────────┴─────────┴─────────┴───────┬─┴───────┬─┴───────┬─┴───────┬─────────┼─────────┼─────────┤ */ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + /* └───────────┴───────────┴───────────┴───────────────────────────────────────────────────────────────┴─────────┴─────────┴─────────┴─────────┴─────────┴─────────┘ */ + ) +}; diff --git a/keyboards/ymd75/keymaps/default_iso_rwkl/keymap.c b/keyboards/ymd75/keymaps/default_iso_rwkl/keymap.c new file mode 100644 index 000000000000..0db1c8d288d3 --- /dev/null +++ b/keyboards/ymd75/keymaps/default_iso_rwkl/keymap.c @@ -0,0 +1,36 @@ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [0] = LAYOUT_75_iso_rwkl( + /* ┌─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┐ */ + 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_DEL, 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_BSPC, KC_END, + /* ├─────────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬──────────────┼─────────┤ */ + KC_TAB, KC_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, MO(1), + /* ├───────────┼─────────┴─┬───────┴───┬─────┴─────────┴─────────┴─────────┴─────────┴─────────┴───────┬─┴─────────┴──┬──────┴───────┬─────────┼─────────┼─────────┤ */ + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT + /* └───────────┴───────────┴───────────┴───────────────────────────────────────────────────────────────┴──────────────┴──────────────┴─────────┴─────────┴─────────┘ */ + ), + + [1] = LAYOUT_75_iso_rwkl( + /* ┌─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┐ */ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MPLY, KC_MPRV, KC_MNXT, + /* ├─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┴─────────┼─────────┤ */ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + /* ├─────────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬──────────────┼─────────┤ */ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_VOLU, + /* ├──────────────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬ ├─────────┤ */ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_VOLD, + /* ├───────────┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴─────────┴─┬─────────┼─────────┤ */ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + /* ├───────────┼─────────┴─┬───────┴───┬─────┴─────────┴─────────┴─────────┴─────────┴─────────┴───────┬─┴─────────┴──┬──────┴───────┬─────────┼─────────┼─────────┤ */ + _______, _______, _______, _______, _______, _______, _______, _______, _______ + /* └───────────┴───────────┴───────────┴───────────────────────────────────────────────────────────────┴──────────────┴──────────────┴─────────┴─────────┴─────────┘ */ + ) +}; diff --git a/keyboards/ymd75/rev1/rev1.h b/keyboards/ymd75/rev1/rev1.h index 0a426ffa5718..d88e8fb802a0 100644 --- a/keyboards/ymd75/rev1/rev1.h +++ b/keyboards/ymd75/rev1/rev1.h @@ -21,19 +21,55 @@ along with this program. If not, see . #include "quantum.h" #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, \ -K03, K13, K23, K33, K43, K53, K26, KC6, KC7, K27, KA3, KB3, KC3, KD3, K67, \ -K02, K12, K22, K32, K42, K52, K36, KD6, KD7, K37, KA2, KB2, KD2, KE0, \ -K01, K11, K21, K31, K41, K51, K46, KE6, KE7, K47, KA1, KB1, K86, K77, \ -K00, K10, K20, K56, K57, KB0, KC0, K96, K76, K66 \ + 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, \ + K03, K13, K23, K33, K43, K53, K26, KC6, KC7, K27, KA3, KB3, KC3, KD3, K67, \ + K02, K12, K22, K32, K42, K52, K36, KD6, KD7, K37, KA2, KB2, KD2, KE0, \ + K01, K11, K21, K31, K41, K51, K46, KE6, KE7, K47, KA1, KB1, K86, K77, \ + K00, K10, K20, K56, K57, KB0, KC0, K96, K76, K66 \ ){ \ -{ K00, K10, K20, KC_NO, KC_NO, KC_NO, 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, KD1, KE1 }, \ -{ K02, K12, K22, K32, K42, K52, KC_NO, KC_NO, KC_NO, KC_NO, KA2, KB2, KC_NO, KD2, KE2 }, \ -{ 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, KC_NO, KE4 }, \ -{ K05, KC_NO, K25, K35, K45, K55, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KB5, KC5, KD5, KE5 }, \ -{ K06, K16, K26, K36, K46, K56, K66, K76, K86, K96, KA6, KB6, KC6, KD6, KE6 }, \ -{ K07, K17, K27, K37, K47, K57, K67, K77, KE0, KC_NO, KA7, KB7, KC7, KD7, KE7 } \ + { K00, K10, K20, KC_NO, KC_NO, KC_NO, 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, KD1, KE1 }, \ + { K02, K12, K22, K32, K42, K52, KC_NO, KC_NO, KC_NO, KC_NO, KA2, KB2, KC_NO, KD2, KE2 }, \ + { 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, KC_NO, KE4 }, \ + { K05, KC_NO, K25, K35, K45, K55, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KB5, KC5, KD5, KE5 }, \ + { K06, K16, K26, K36, K46, K56, K66, K76, K86, K96, KA6, KB6, KC6, KD6, KE6 }, \ + { K07, K17, K27, K37, K47, K57, K67, K77, KE0, KC_NO, KA7, KB7, KC7, KD7, KE7 } \ +} + +#define LAYOUT_75_iso( \ + K50, K52, K53, K54, K55, K60, K6A, K7A, K70, K5B, K5C, K5D, K5E, K1D, K1E, K2E, \ + K40, K41, K42, K43, K44, K45, K61, K6B, K7B, K71, K4A, K4B, K4C, K4E, K0D, \ + K30, K31, K32, K33, K34, K35, K62, K6C, K7C, K72, K3A, K3B, K3C, K76, \ + K20, K21, K22, K23, K24, K25, K63, K6D, K7D, K73, K2A, K2B, K2C, K2D, K0E, \ + K10, K03, K11, K12, K13, K14, K15, K64, K6E, K7E, K74, K1A, K1B, K68, K77, \ + K00, K01, K02, K65, K75, K0B, K0C, K69, K67, K66 \ +){ \ + { K00, K01, K02, K03, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, K0B, K0C, K0D, KC_NO }, \ + { K10, K11, K12, K13, K14, K15, KC_NO, KC_NO, KC_NO, KC_NO, K1A, K1B, KC_NO, K1D, K1E }, \ + { K20, K21, K22, K23, K24, K25, KC_NO, KC_NO, KC_NO, KC_NO, K2A, K2B, K2C, K2D, K2E }, \ + { K30, K31, K32, K33, K34, K35, KC_NO, KC_NO, KC_NO, KC_NO, K3A, K3B, K3C, KC_NO, KC_NO }, \ + { K40, K41, K42, K43, K44, K45, KC_NO, KC_NO, KC_NO, KC_NO, K4A, K4B, K4C, KC_NO, K4E }, \ + { K50, KC_NO, K52, K53, K54, K55, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, K5B, K5C, K5D, K5E }, \ + { K60, K61, K62, K63, K64, K65, K66, K67, K68, K69, K6A, K6B, K6C, K6D, K6E }, \ + { K70, K71, K72, K73, K74, K75, K76, K77, K0E, KC_NO, K7A, K7B, K7C, K7D, K7E } \ +} + +#define LAYOUT_75_iso_rwkl( \ + K50, K52, K53, K54, K55, K60, K6A, K7A, K70, K5B, K5C, K5D, K5E, K1D, K1E, K2E, \ + K40, K41, K42, K43, K44, K45, K61, K6B, K7B, K71, K4A, K4B, K4C, K4E, K0D, \ + K30, K31, K32, K33, K34, K35, K62, K6C, K7C, K72, K3A, K3B, K3C, K76, \ + K20, K21, K22, K23, K24, K25, K63, K6D, K7D, K73, K2A, K2B, K2C, K2D, K0E, \ + K10, K03, K11, K12, K13, K14, K15, K64, K6E, K7E, K74, K1A, K1B, K68, K77, \ + K00, K01, K02, K65, K75, K0C, K69, K67, K66 \ +){ \ + { K00, K01, K02, K03, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, K0C, K0D, KC_NO }, \ + { K10, K11, K12, K13, K14, K15, KC_NO, KC_NO, KC_NO, KC_NO, K1A, K1B, KC_NO, K1D, K1E }, \ + { K20, K21, K22, K23, K24, K25, KC_NO, KC_NO, KC_NO, KC_NO, K2A, K2B, K2C, K2D, K2E }, \ + { K30, K31, K32, K33, K34, K35, KC_NO, KC_NO, KC_NO, KC_NO, K3A, K3B, K3C, KC_NO, KC_NO }, \ + { K40, K41, K42, K43, K44, K45, KC_NO, KC_NO, KC_NO, KC_NO, K4A, K4B, K4C, KC_NO, K4E }, \ + { K50, KC_NO, K52, K53, K54, K55, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, K5B, K5C, K5D, K5E }, \ + { K60, K61, K62, K63, K64, K65, K66, K67, K68, K69, K6A, K6B, K6C, K6D, K6E }, \ + { K70, K71, K72, K73, K74, K75, K76, K77, K0E, KC_NO, K7A, K7B, K7C, K7D, K7E } \ } diff --git a/keyboards/ymd75/rev2/rev2.h b/keyboards/ymd75/rev2/rev2.h index b2dd7b8e1cd4..85e07c57669b 100644 --- a/keyboards/ymd75/rev2/rev2.h +++ b/keyboards/ymd75/rev2/rev2.h @@ -16,3 +16,35 @@ { K400, KC_NO, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, K412, K413, K414 }, \ { K500, K501, K502, KC_NO, KC_NO, K505, K506, K507, K508, K509, K510, K511, KC_NO, K513, K514 } \ } + +#define LAYOUT_75_iso( \ + K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, K514, \ + K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K114, K513, \ + 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, K314, \ + K400, K401, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, K412, K413, K414, \ + K500, K501, K502, K505, K506, K507, K508, K509, K510, K511 \ +) { \ + { 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, KC_NO, 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, K314 }, \ + { K400, K401, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, K412, K413, K414 }, \ + { K500, K501, K502, KC_NO, KC_NO, K505, K506, K507, K508, K509, K510, K511, KC_NO, K513, K514 } \ +} + +#define LAYOUT_75_iso_rwkl( \ + K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, K514, \ + K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K114, K513, \ + 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, K314, \ + K400, K401, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, K412, K413, K414, \ + K500, K501, K502, K505, K506, K508, K509, K510, K511 \ +) { \ + { 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, KC_NO, 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, K314 }, \ + { K400, K401, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, K412, K413, K414 }, \ + { K500, K501, K502, KC_NO, KC_NO, K505, K506, KC_NO, K508, K509, K510, K511, KC_NO, K513, K514 } \ +} From 06d4c0a3968f3f0ae0fc5deb36cb4b8de44b1428 Mon Sep 17 00:00:00 2001 From: vattern Date: Tue, 15 Sep 2020 08:57:55 +0100 Subject: [PATCH 787/930] [Keyboard] add Stoutgat v2; move Stoutgat v1 (#10233) * initial add * stoutgat working * Ready for release * Ready for release * Ready for release * Ready for release * Ready for release * fix typos * update flash instructions in readme * update copyright * Update keyboards/tkw/stoutgatv2/keymaps/default/keymap.c * Apply suggestions from code review * Fix typo * Update lib/vusb * Update keyboards/tkw/stoutgatv2/rules.mk * Update desc add v2 * Add ANSI * Move to v1 and v2 folders * fix typo * fix v1 readme * Fix copypasta from v1 keymap * fix missing trailing slash * Delete keymap.json * Apply suggestions from code review Fixed layout and removed erroneous keymap.json --- .../{stoutgat => tkw/stoutgat/v1}/config.h | 0 .../{stoutgat => tkw/stoutgat/v1}/info.json | 0 .../stoutgat/v1}/keymaps/default/keymap.c | 0 .../stoutgat/v1}/keymaps/default/readme.md | 0 .../{stoutgat => tkw/stoutgat/v1}/readme.md | 2 +- .../{stoutgat => tkw/stoutgat/v1}/rules.mk | 0 .../stoutgat.c => tkw/stoutgat/v1/v1.c} | 0 .../stoutgat.h => tkw/stoutgat/v1/v1.h} | 0 keyboards/tkw/stoutgat/v2/config.h | 69 ++ keyboards/tkw/stoutgat/v2/f411/chconf.h | 714 ++++++++++++++++++ keyboards/tkw/stoutgat/v2/f411/halconf.h | 525 +++++++++++++ keyboards/tkw/stoutgat/v2/f411/mcuconf.h | 253 +++++++ keyboards/tkw/stoutgat/v2/f411/rules.mk | 27 + keyboards/tkw/stoutgat/v2/info.json | 89 +++ .../tkw/stoutgat/v2/keymaps/ansi/keymap.c | 72 ++ .../tkw/stoutgat/v2/keymaps/default/keymap.c | 79 ++ keyboards/tkw/stoutgat/v2/readme.md | 15 + keyboards/tkw/stoutgat/v2/rules.mk | 24 + keyboards/tkw/stoutgat/v2/v2.c | 16 + keyboards/tkw/stoutgat/v2/v2.h | 75 ++ 20 files changed, 1959 insertions(+), 1 deletion(-) rename keyboards/{stoutgat => tkw/stoutgat/v1}/config.h (100%) rename keyboards/{stoutgat => tkw/stoutgat/v1}/info.json (100%) rename keyboards/{stoutgat => tkw/stoutgat/v1}/keymaps/default/keymap.c (100%) rename keyboards/{stoutgat => tkw/stoutgat/v1}/keymaps/default/readme.md (100%) rename keyboards/{stoutgat => tkw/stoutgat/v1}/readme.md (95%) rename keyboards/{stoutgat => tkw/stoutgat/v1}/rules.mk (100%) rename keyboards/{stoutgat/stoutgat.c => tkw/stoutgat/v1/v1.c} (100%) rename keyboards/{stoutgat/stoutgat.h => tkw/stoutgat/v1/v1.h} (100%) create mode 100644 keyboards/tkw/stoutgat/v2/config.h create mode 100644 keyboards/tkw/stoutgat/v2/f411/chconf.h create mode 100644 keyboards/tkw/stoutgat/v2/f411/halconf.h create mode 100644 keyboards/tkw/stoutgat/v2/f411/mcuconf.h create mode 100644 keyboards/tkw/stoutgat/v2/f411/rules.mk create mode 100644 keyboards/tkw/stoutgat/v2/info.json create mode 100644 keyboards/tkw/stoutgat/v2/keymaps/ansi/keymap.c create mode 100644 keyboards/tkw/stoutgat/v2/keymaps/default/keymap.c create mode 100644 keyboards/tkw/stoutgat/v2/readme.md create mode 100644 keyboards/tkw/stoutgat/v2/rules.mk create mode 100644 keyboards/tkw/stoutgat/v2/v2.c create mode 100644 keyboards/tkw/stoutgat/v2/v2.h diff --git a/keyboards/stoutgat/config.h b/keyboards/tkw/stoutgat/v1/config.h similarity index 100% rename from keyboards/stoutgat/config.h rename to keyboards/tkw/stoutgat/v1/config.h diff --git a/keyboards/stoutgat/info.json b/keyboards/tkw/stoutgat/v1/info.json similarity index 100% rename from keyboards/stoutgat/info.json rename to keyboards/tkw/stoutgat/v1/info.json diff --git a/keyboards/stoutgat/keymaps/default/keymap.c b/keyboards/tkw/stoutgat/v1/keymaps/default/keymap.c similarity index 100% rename from keyboards/stoutgat/keymaps/default/keymap.c rename to keyboards/tkw/stoutgat/v1/keymaps/default/keymap.c diff --git a/keyboards/stoutgat/keymaps/default/readme.md b/keyboards/tkw/stoutgat/v1/keymaps/default/readme.md similarity index 100% rename from keyboards/stoutgat/keymaps/default/readme.md rename to keyboards/tkw/stoutgat/v1/keymaps/default/readme.md diff --git a/keyboards/stoutgat/readme.md b/keyboards/tkw/stoutgat/v1/readme.md similarity index 95% rename from keyboards/stoutgat/readme.md rename to keyboards/tkw/stoutgat/v1/readme.md index 13953e231908..0904b5127170 100644 --- a/keyboards/stoutgat/readme.md +++ b/keyboards/tkw/stoutgat/v1/readme.md @@ -11,6 +11,6 @@ Inspired by the cftkb Discipline. Make example for this keyboard (after setting up your build environment): - make stoutgat:default + make tkw/stoutgat/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/stoutgat/rules.mk b/keyboards/tkw/stoutgat/v1/rules.mk similarity index 100% rename from keyboards/stoutgat/rules.mk rename to keyboards/tkw/stoutgat/v1/rules.mk diff --git a/keyboards/stoutgat/stoutgat.c b/keyboards/tkw/stoutgat/v1/v1.c similarity index 100% rename from keyboards/stoutgat/stoutgat.c rename to keyboards/tkw/stoutgat/v1/v1.c diff --git a/keyboards/stoutgat/stoutgat.h b/keyboards/tkw/stoutgat/v1/v1.h similarity index 100% rename from keyboards/stoutgat/stoutgat.h rename to keyboards/tkw/stoutgat/v1/v1.h diff --git a/keyboards/tkw/stoutgat/v2/config.h b/keyboards/tkw/stoutgat/v2/config.h new file mode 100644 index 000000000000..1c0a66f3c684 --- /dev/null +++ b/keyboards/tkw/stoutgat/v2/config.h @@ -0,0 +1,69 @@ +/* Copyright 2020 Thys de Wet + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License 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 0x7811 +#define DEVICE_VER 0x0002 +#define MANUFACTURER TKW +#define PRODUCT Stoutgat v2 65% + +/* key matrix size */ +#define MATRIX_ROWS 5 +#define MATRIX_COLS 15 + + + +#define MATRIX_COL_PINS { B0, A7, A6, A5, A4, A3, A1, A0, C15, C14, C13, A15, B3, B4, B5} +#define MATRIX_ROW_PINS { B6, A2, B7, B9, B8 } +/* COL2ROW, ROW2COL*/ +#define DIODE_DIRECTION COL2ROW + +#define MATRIX_IO_DELAY 5 +#define TAP_CODE_DELAY 10 + +#define ENCODERS_PAD_A { B14, B12} +#define ENCODERS_PAD_B { B15, B13 } + +#define RGB_DI_PIN B1 +#define RGBLED_NUM 13 +#define RGBLIGHT_LIMIT_VAL 120 +#define RGBLIGHT_ANIMATIONS + +#define WS2812_PWM_DRIVER PWMD3 +#define WS2812_PWM_CHANNEL 4 +#define WS2812_PWM_PAL_MODE 2 +#define WS2812_DMA_STREAM STM32_DMA1_STREAM2 +#define WS2812_DMA_CHANNEL 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 + +/* disable these deprecated features by default */ +#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/tkw/stoutgat/v2/f411/chconf.h b/keyboards/tkw/stoutgat/v2/f411/chconf.h new file mode 100644 index 000000000000..0b8b69b0e02c --- /dev/null +++ b/keyboards/tkw/stoutgat/v2/f411/chconf.h @@ -0,0 +1,714 @@ +/* + 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. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +/** + * @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. + * + * @addtogroup config + * @details Kernel related settings and hooks. + * @{ + */ + +#ifndef CHCONF_H +#define CHCONF_H + +#define _CHIBIOS_RT_CONF_ +#define _CHIBIOS_RT_CONF_VER_6_0_ + +/*===========================================================================*/ +/** + * @name System timers settings + * @{ + */ +/*===========================================================================*/ + +/** + * @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. + * @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. + */ +#if !defined(CH_CFG_ST_TIMEDELTA) +#define CH_CFG_ST_TIMEDELTA 2 +#endif + +/** @} */ + +/*===========================================================================*/ +/** + * @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. + */ +#if !defined(CH_CFG_TIME_QUANTUM) +#define CH_CFG_TIME_QUANTUM 0 +#endif + +/** + * @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. + */ +#if !defined(CH_CFG_MEMCORE_SIZE) +#define CH_CFG_MEMCORE_SIZE 0 +#endif + +/** + * @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. + */ +#if !defined(CH_CFG_NO_IDLE_THREAD) +#define CH_CFG_NO_IDLE_THREAD FALSE +#endif + +/** @} */ + +/*===========================================================================*/ +/** + * @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. + */ +#if !defined(CH_CFG_OPTIMIZE_SPEED) +#define CH_CFG_OPTIMIZE_SPEED TRUE +#endif + +/** @} */ + +/*===========================================================================*/ +/** + * @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. + */ +#if !defined(CH_CFG_USE_TM) +#define CH_CFG_USE_TM TRUE +#endif + +/** + * @brief Threads registry APIs. + * @details If enabled then the registry APIs are included in the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_REGISTRY) +#define CH_CFG_USE_REGISTRY TRUE +#endif + +/** + * @brief Threads synchronization APIs. + * @details If enabled then the @p chThdWait() function is included in + * the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_WAITEXIT) +#define CH_CFG_USE_WAITEXIT TRUE +#endif + +/** + * @brief Semaphores APIs. + * @details If enabled then the Semaphores APIs are included in the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_SEMAPHORES) +#define CH_CFG_USE_SEMAPHORES TRUE +#endif + +/** + * @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. + */ +#if !defined(CH_CFG_USE_SEMAPHORES_PRIORITY) +#define CH_CFG_USE_SEMAPHORES_PRIORITY FALSE +#endif + +/** + * @brief Mutexes APIs. + * @details If enabled then the mutexes APIs are included in the kernel. + * + * @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. + * @note Recursive mutexes are heavier and have an increased + * memory footprint. + * + * @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. + * @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. + */ +#if !defined(CH_CFG_USE_CONDVARS) +#define CH_CFG_USE_CONDVARS TRUE +#endif + +/** + * @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. + */ +#if !defined(CH_CFG_USE_CONDVARS_TIMEOUT) +#define CH_CFG_USE_CONDVARS_TIMEOUT TRUE +#endif + +/** + * @brief Events Flags APIs. + * @details If enabled then the event flags APIs are included in the kernel. + * + * @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. + * @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. + */ +#if !defined(CH_CFG_USE_EVENTS_TIMEOUT) +#define CH_CFG_USE_EVENTS_TIMEOUT TRUE +#endif + +/** + * @brief Synchronous Messages APIs. + * @details If enabled then the synchronous messages APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_MESSAGES) +#define CH_CFG_USE_MESSAGES TRUE +#endif + +/** + * @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. + */ +#if !defined(CH_CFG_USE_MESSAGES_PRIORITY) +#define CH_CFG_USE_MESSAGES_PRIORITY FALSE +#endif + +/** + * @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. + */ +#if !defined(CH_CFG_USE_MAILBOXES) +#define CH_CFG_USE_MAILBOXES TRUE +#endif + +/** + * @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. + */ +#if !defined(CH_CFG_USE_MEMCORE) +#define CH_CFG_USE_MEMCORE TRUE +#endif + +/** + * @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. + */ +#if !defined(CH_CFG_USE_HEAP) +#define CH_CFG_USE_HEAP TRUE +#endif + +/** + * @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. + */ +#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. + * @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. + */ +#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 + +/** @} */ + +/*===========================================================================*/ +/** + * @name Debug options + * @{ + */ +/*===========================================================================*/ + +/** + * @brief Debug option, kernel statistics. + * + * @note The default is @p FALSE. + */ +#if !defined(CH_DBG_STATISTICS) +#define CH_DBG_STATISTICS FALSE +#endif + +/** + * @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. + */ +#if !defined(CH_DBG_SYSTEM_STATE_CHECK) +#define CH_DBG_SYSTEM_STATE_CHECK FALSE +#endif + +/** + * @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. + */ +#if !defined(CH_DBG_ENABLE_CHECKS) +#define CH_DBG_ENABLE_CHECKS FALSE +#endif + +/** + * @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. + */ +#if !defined(CH_DBG_ENABLE_ASSERTS) +#define CH_DBG_ENABLE_ASSERTS FALSE +#endif + +/** + * @brief Debug option, trace buffer. + * @details If enabled then the trace buffer is activated. + * + * @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. + * @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. + */ +#if !defined(CH_DBG_ENABLE_STACK_CHECK) +#define CH_DBG_ENABLE_STACK_CHECK FALSE +#endif + +/** + * @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. + */ +#if !defined(CH_DBG_FILL_THREADS) +#define CH_DBG_FILL_THREADS FALSE +#endif + +/** + * @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. + */ +#if !defined(CH_DBG_THREADS_PROFILING) +#define CH_DBG_THREADS_PROFILING FALSE +#endif + +/** @} */ + +/*===========================================================================*/ +/** + * @name Kernel hooks + * @{ + */ +/*===========================================================================*/ + +/** + * @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. + */ +#define CH_CFG_THREAD_EXTRA_FIELDS \ + /* Add threads custom fields here.*/ + +/** + * @brief Threads initialization hook. + * @details User initialization code added to the @p _thread_init() function. + * + * @note It is invoked from within @p _thread_init() 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/tkw/stoutgat/v2/f411/halconf.h b/keyboards/tkw/stoutgat/v2/f411/halconf.h new file mode 100644 index 000000000000..1f8df5dbbd55 --- /dev/null +++ b/keyboards/tkw/stoutgat/v2/f411/halconf.h @@ -0,0 +1,525 @@ +/* + 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. + 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 + +#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 +#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 cryptographic subsystem. + */ +#if !defined(HAL_USE_CRY) || defined(__DOXYGEN__) +#define HAL_USE_CRY FALSE +#endif + +/** + * @brief Enables the DAC subsystem. + */ +#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 +#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 TRUE +#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 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 +#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 +#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 + +/** + * @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. */ +/*===========================================================================*/ + +/** + * @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 + +/** + * @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. */ +/*===========================================================================*/ + +/** + * @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 the zero-copy API. + */ +#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 + +/** + * @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. */ +/*===========================================================================*/ + +/** + * @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 16 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 256 bytes for both the transmission and receive + * buffers. + */ +#if !defined(SERIAL_USB_BUFFERS_SIZE) || defined(__DOXYGEN__) +#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 + +/*===========================================================================*/ +/* 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 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 +#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. */ +/*===========================================================================*/ + +/** + * @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 + +/*===========================================================================*/ +/* 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/tkw/stoutgat/v2/f411/mcuconf.h b/keyboards/tkw/stoutgat/v2/f411/mcuconf.h new file mode 100644 index 000000000000..f3a017731c4a --- /dev/null +++ b/keyboards/tkw/stoutgat/v2/f411/mcuconf.h @@ -0,0 +1,253 @@ +/* + 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. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#ifndef MCUCONF_H +#define MCUCONF_H + +/* + * STM32F4xx 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: + * 15...0 Lowest...Highest. + * + * DMA priorities: + * 0...3 Lowest...Highest. + */ + +#define STM32F4xx_MCUCONF + +/* + * HAL driver system settings. + */ +#define STM32_NO_INIT FALSE +#define STM32_HSI_ENABLED TRUE +#define STM32_LSI_ENABLED TRUE +#define STM32_HSE_ENABLED TRUE +#define STM32_LSE_ENABLED FALSE +#define STM32_CLOCK48_REQUIRED TRUE +#define STM32_SW STM32_SW_PLL +#define STM32_PLLSRC STM32_PLLSRC_HSE +#define STM32_PLLM_VALUE 25 +#define STM32_PLLN_VALUE 384 +#define STM32_PLLP_VALUE 4 +#define STM32_PLLQ_VALUE 8 +#define STM32_HPRE STM32_HPRE_DIV1 +#define STM32_PPRE1 STM32_PPRE1_DIV4 +#define STM32_PPRE2 STM32_PPRE2_DIV2 +#define STM32_RTCSEL STM32_RTCSEL_LSI +#define STM32_RTCPRE_VALUE 8 +#define STM32_MCO1SEL STM32_MCO1SEL_HSI +#define STM32_MCO1PRE STM32_MCO1PRE_DIV1 +#define STM32_MCO2SEL STM32_MCO2SEL_SYSCLK +#define STM32_MCO2PRE STM32_MCO2PRE_DIV5 +#define STM32_I2SSRC STM32_I2SSRC_CKIN +#define STM32_PLLI2SN_VALUE 192 +#define STM32_PLLI2SR_VALUE 5 +#define STM32_PVD_ENABLE FALSE +#define STM32_PLS STM32_PLS_LEV0 +#define STM32_BKPRAM_ENABLE FALSE + +/* + * 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 6 +#define STM32_IRQ_EXTI20_PRIORITY 6 +#define STM32_IRQ_EXTI21_PRIORITY 15 +#define STM32_IRQ_EXTI22_PRIORITY 15 + +/* + * ADC driver system settings. + */ +#define STM32_ADC_ADCPRE ADC_CCR_ADCPRE_DIV4 +#define STM32_ADC_USE_ADC1 FALSE +#define STM32_ADC_ADC1_DMA_STREAM STM32_DMA_STREAM_ID(2, 4) +#define STM32_ADC_ADC1_DMA_PRIORITY 2 +#define STM32_ADC_IRQ_PRIORITY 6 +#define STM32_ADC_ADC1_DMA_IRQ_PRIORITY 6 + +/* + * 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_TIM4 FALSE +#define STM32_GPT_USE_TIM5 FALSE +#define STM32_GPT_USE_TIM9 FALSE +#define STM32_GPT_USE_TIM11 FALSE +#define STM32_GPT_TIM1_IRQ_PRIORITY 7 +#define STM32_GPT_TIM2_IRQ_PRIORITY 7 +#define STM32_GPT_TIM3_IRQ_PRIORITY 7 +#define STM32_GPT_TIM4_IRQ_PRIORITY 7 +#define STM32_GPT_TIM5_IRQ_PRIORITY 7 +#define STM32_GPT_TIM9_IRQ_PRIORITY 7 +#define STM32_GPT_TIM11_IRQ_PRIORITY 7 + +/* + * I2C driver system settings. + */ +#define STM32_I2C_USE_I2C1 FALSE +#define STM32_I2C_USE_I2C2 FALSE +#define STM32_I2C_USE_I2C3 FALSE +#define STM32_I2C_BUSY_TIMEOUT 50 +#define STM32_I2C_I2C1_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 0) +#define STM32_I2C_I2C1_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 6) +#define STM32_I2C_I2C2_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 2) +#define STM32_I2C_I2C2_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 7) +#define STM32_I2C_I2C3_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 2) +#define STM32_I2C_I2C3_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 4) +#define STM32_I2C_I2C1_IRQ_PRIORITY 5 +#define STM32_I2C_I2C2_IRQ_PRIORITY 5 +#define STM32_I2C_I2C3_IRQ_PRIORITY 5 +#define STM32_I2C_I2C1_DMA_PRIORITY 3 +#define STM32_I2C_I2C2_DMA_PRIORITY 3 +#define STM32_I2C_I2C3_DMA_PRIORITY 3 +#define STM32_I2C_DMA_ERROR_HOOK(i2cp) osalSysHalt("DMA failure") + +/* + * I2S driver system settings. + */ +#define STM32_I2S_USE_SPI2 FALSE +#define STM32_I2S_USE_SPI3 FALSE +#define STM32_I2S_SPI2_IRQ_PRIORITY 10 +#define STM32_I2S_SPI3_IRQ_PRIORITY 10 +#define STM32_I2S_SPI2_DMA_PRIORITY 1 +#define STM32_I2S_SPI3_DMA_PRIORITY 1 +#define STM32_I2S_SPI2_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 3) +#define STM32_I2S_SPI2_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 4) +#define STM32_I2S_SPI3_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 0) +#define STM32_I2S_SPI3_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 7) +#define STM32_I2S_DMA_ERROR_HOOK(i2sp) 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_USE_TIM4 FALSE +#define STM32_ICU_USE_TIM5 FALSE +#define STM32_ICU_USE_TIM9 FALSE +#define STM32_ICU_TIM1_IRQ_PRIORITY 7 +#define STM32_ICU_TIM2_IRQ_PRIORITY 7 +#define STM32_ICU_TIM3_IRQ_PRIORITY 7 +#define STM32_ICU_TIM4_IRQ_PRIORITY 7 +#define STM32_ICU_TIM5_IRQ_PRIORITY 7 +#define STM32_ICU_TIM9_IRQ_PRIORITY 7 + +/* + * 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_USE_TIM4 FALSE +#define STM32_PWM_USE_TIM5 FALSE +#define STM32_PWM_USE_TIM9 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_TIM5_IRQ_PRIORITY 7 +#define STM32_PWM_TIM9_IRQ_PRIORITY 7 + +/* + * SERIAL driver system settings. + */ +#define STM32_SERIAL_USE_USART1 TRUE +#define STM32_SERIAL_USE_USART2 FALSE +#define STM32_SERIAL_USE_USART6 FALSE +#define STM32_SERIAL_USART1_PRIORITY 12 +#define STM32_SERIAL_USART2_PRIORITY 12 +#define STM32_SERIAL_USART6_PRIORITY 12 + +/* + * SPI driver system settings. + */ +#define STM32_SPI_USE_SPI1 FALSE +#define STM32_SPI_USE_SPI2 FALSE +#define STM32_SPI_USE_SPI3 FALSE +#define STM32_SPI_SPI1_RX_DMA_STREAM STM32_DMA_STREAM_ID(2, 0) +#define STM32_SPI_SPI1_TX_DMA_STREAM STM32_DMA_STREAM_ID(2, 3) +#define STM32_SPI_SPI2_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 3) +#define STM32_SPI_SPI2_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 4) +#define STM32_SPI_SPI3_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 0) +#define STM32_SPI_SPI3_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 7) +#define STM32_SPI_SPI1_DMA_PRIORITY 1 +#define STM32_SPI_SPI2_DMA_PRIORITY 1 +#define STM32_SPI_SPI3_DMA_PRIORITY 1 +#define STM32_SPI_SPI1_IRQ_PRIORITY 10 +#define STM32_SPI_SPI2_IRQ_PRIORITY 10 +#define STM32_SPI_SPI3_IRQ_PRIORITY 10 +#define STM32_SPI_DMA_ERROR_HOOK(spip) osalSysHalt("DMA failure") + +/* + * ST driver system settings. + */ +#define STM32_ST_IRQ_PRIORITY 8 +#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_USE_USART6 FALSE +#define STM32_UART_USART1_RX_DMA_STREAM STM32_DMA_STREAM_ID(2, 5) +#define STM32_UART_USART1_TX_DMA_STREAM STM32_DMA_STREAM_ID(2, 7) +#define STM32_UART_USART2_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 5) +#define STM32_UART_USART2_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 6) +#define STM32_UART_USART6_RX_DMA_STREAM STM32_DMA_STREAM_ID(2, 2) +#define STM32_UART_USART6_TX_DMA_STREAM STM32_DMA_STREAM_ID(2, 7) +#define STM32_UART_USART1_IRQ_PRIORITY 12 +#define STM32_UART_USART2_IRQ_PRIORITY 12 +#define STM32_UART_USART6_IRQ_PRIORITY 12 +#define STM32_UART_USART1_DMA_PRIORITY 0 +#define STM32_UART_USART2_DMA_PRIORITY 0 +#define STM32_UART_USART6_DMA_PRIORITY 0 +#define STM32_UART_DMA_ERROR_HOOK(uartp) osalSysHalt("DMA failure") + +/* + * USB driver system settings. + */ +#define STM32_USB_USE_OTG1 TRUE +#define STM32_USB_OTG1_IRQ_PRIORITY 14 +#define STM32_USB_OTG1_RX_FIFO_SIZE 512 +#define STM32_USB_OTG_THREAD_PRIO NORMALPRIO+1 +#define STM32_USB_OTG_THREAD_STACK_SIZE 128 +#define STM32_USB_OTGFIFO_FILL_BASEPRI 0 + +/* + * WDG driver system settings. + */ +#define STM32_WDG_USE_IWDG FALSE + +#endif /* MCUCONF_H */ diff --git a/keyboards/tkw/stoutgat/v2/f411/rules.mk b/keyboards/tkw/stoutgat/v2/f411/rules.mk new file mode 100644 index 000000000000..61add3aed53b --- /dev/null +++ b/keyboards/tkw/stoutgat/v2/f411/rules.mk @@ -0,0 +1,27 @@ +## chip/board settings +# the next two should match the directories in +# /os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES) +MCU_FAMILY = STM32 +MCU_SERIES = STM32F4xx +# linker script to use +# it should exist either in /os/common/ports/ARMCMx/compilers/GCC/ld/ +# or /ld/ +MCU_LDSCRIPT = STM32F411xE +# startup code to use +# is should exist in /os/common/ports/ARMCMx/compilers/GCC/mk/ +MCU_STARTUP = stm32f4xx +# it should exist either in /os/hal/boards/ +# or /boards +BOARD = BLACKPILL_STM32_F411 +# 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 +ARMV = 7 +USE_FPU = yes +# Address of the booloader in system memory +STM32_BOOTLOADER_ADDRESS = 0x1FFF0000 + +# 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 diff --git a/keyboards/tkw/stoutgat/v2/info.json b/keyboards/tkw/stoutgat/v2/info.json new file mode 100644 index 000000000000..48288096b151 --- /dev/null +++ b/keyboards/tkw/stoutgat/v2/info.json @@ -0,0 +1,89 @@ +{ + "keyboard_name": "stoutgat/v2", + "url": "https://github.com/vattern/stoutgatv2", + "maintainer": "vattern", + "manufacturer": "tkw", + "width": 17.25, + "height": 5, + "layouts": { + "LAYOUT_encoder": { + "layout": [ + {"x": 1.25, "y": 0}, + {"x": 2.25, "y": 0}, + {"x": 3.25, "y": 0}, + {"x": 4.25, "y": 0}, + {"x": 5.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.25, "y": 0}, + {"x": 11.25, "y": 0}, + {"x": 12.25, "y": 0}, + {"x": 13.25, "y": 0}, + {"x": 14.25, "y": 0, "w": 2}, + {"x": 16.25, "y": 0}, + + {"x": 1.25, "y": 1, "w": 1.5}, + {"x": 2.75, "y": 1}, + {"x": 3.75, "y": 1}, + {"x": 4.75, "y": 1}, + {"x": 5.75, "y": 1}, + {"x": 6.75, "y": 1}, + {"x": 7.75, "y": 1}, + {"x": 8.75, "y": 1}, + {"x": 9.75, "y": 1}, + {"x": 10.75, "y": 1}, + {"x": 11.75, "y": 1}, + {"x": 12.75, "y": 1}, + {"x": 13.75, "y": 1}, + {"x": 16.25, "y": 1}, + + {"x": 1.25, "y": 2, "w": 1.75}, + {"x": 3.0, "y": 2}, + {"x": 4.0, "y": 2}, + {"x": 5.0, "y": 2}, + {"x": 6.0, "y": 2}, + {"x": 7.0, "y": 2}, + {"x": 8.0, "y": 2}, + {"x": 9.0, "y": 2}, + {"x": 10.0, "y": 2}, + {"x": 11.0, "y": 2}, + {"x": 12.0, "y": 2}, + {"x": 13.0, "y": 2}, + {"x": 14.0, "y": 2}, + {"x": 15.0, "y": 1, "w": 1.25, "h": 2}, + {"x": 16.25, "y": 2}, + + {"x": 0, "y": 3}, + + {"x": 1.25, "y": 3, "w": 1.25}, + {"x": 2.5, "y": 3}, + {"x": 3.5, "y": 3}, + {"x": 4.5, "y": 3}, + {"x": 5.5, "y": 3}, + {"x": 6.5, "y": 3}, + {"x": 7.5, "y": 3}, + {"x": 8.5, "y": 3}, + {"x": 9.5, "y": 3}, + {"x": 10.5, "y": 3}, + {"x": 11.5, "y": 3}, + {"x": 12.5, "y": 3}, + {"x": 13.5, "y": 3, "w": 1.75}, + {"x": 15.25, "y": 3}, + {"x": 16.25, "y": 3}, + + {"x": 1.25, "y": 4, "w": 1.25}, + {"x": 2.5, "y": 4, "w": 1.25}, + {"x": 3.75, "y": 4, "w": 1.25}, + {"x": 5.0, "y": 4, "w": 6.25}, + {"x": 11.25, "y": 4}, + {"x": 12.25, "y": 4}, + {"x": 13.25, "y": 4}, + {"x": 14.25, "y": 4}, + {"x": 15.25, "y": 4}, + {"x": 16.25, "y": 4} + ] + } + } +} diff --git a/keyboards/tkw/stoutgat/v2/keymaps/ansi/keymap.c b/keyboards/tkw/stoutgat/v2/keymaps/ansi/keymap.c new file mode 100644 index 000000000000..618d336cdb92 --- /dev/null +++ b/keyboards/tkw/stoutgat/v2/keymaps/ansi/keymap.c @@ -0,0 +1,72 @@ +#include QMK_KEYBOARD_H + +enum layers { + _BL, + _FL, +}; + +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_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_LEFT, KC_DOWN, KC_RIGHT), + + [1] = LAYOUT_65_ansi_blocker( + /* esc 1 2 3 4 5 6 7 8 9 0 - = bkspc `~ */ + 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, RESET, + /* tab Q W E R T Y U I O P [ ] \ delete*/ + RGB_MOD, RGB_VAI, RGB_SAI, RGB_HUI, RESET, KC_TRNS,KC_TRNS,KC_TRNS,KC_INS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PAUS, KC_TRNS, KC_TRNS, + /* caps A S D F G H J K L ; ' enter pg up*/ + RGB_TOG, RGB_VAD, RGB_SAD, RGB_HUD, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_INS, KC_HOME, + /* shift Z X C V B N M , . / shift up pg dn*/ + KC_LSFT, KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_MUTE, KC_TRNS, KC_TRNS, KC_TRNS, KC_RSFT, KC_VOLU, KC_END, + /* ctrl win alt space alt fn ctrl left down right*/ + KC_LCTL, KC_LGUI, KC_LALT, KC_TRNS, KC_RALT, KC_TRNS, KC_TRNS, KC_VOLD, KC_TRNS) +}; + +#ifdef ENCODER_ENABLE +void encoder_update_user(uint8_t index, bool clockwise){ + + if (index == 0) { + switch (get_highest_layer(layer_state)) { + case _BL: + // Move whole words. Hold shift to select while moving. + if (clockwise) { + tap_code16(C(KC_RGHT)); + } else { + tap_code16(C(KC_LEFT)); + } + break; + default: + // History scrubbing. For Adobe products, hold shift while moving + // backward to go forward instead. + if (clockwise) { + tap_code16(C(KC_Z)); + } else { + tap_code16(C(KC_Y)); + } + break; + } + } else if (index == 1) { + switch (get_highest_layer(layer_state)) { + case _BL: + // Scrolling with PageUp and PgDn. + if (clockwise) { + tap_code16(KC_PGDN); + } else { + tap_code16(KC_PGUP); + } + break; + default: + if (clockwise) { + tap_code16(A(KC_TAB)); + } else { + tap_code16(A(S(KC_TAB))); + } + break; + } + } +} +#endif diff --git a/keyboards/tkw/stoutgat/v2/keymaps/default/keymap.c b/keyboards/tkw/stoutgat/v2/keymaps/default/keymap.c new file mode 100644 index 000000000000..c794c9c64327 --- /dev/null +++ b/keyboards/tkw/stoutgat/v2/keymaps/default/keymap.c @@ -0,0 +1,79 @@ +#include QMK_KEYBOARD_H + +enum layers { + _BL, + _FL, +}; + + + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_encoder( + 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_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_MPLY, 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_RCTL, KC_LEFT, KC_DOWN, KC_RGHT + ), + + [1] = LAYOUT_encoder( + /* esc 1 2 3 4 5 6 7 8 9 0 - = bkspc `~ */ + 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, RESET, + /* tab Q W E R T Y U I O P [ ] delete */ + RGB_MOD, RGB_VAI, RGB_SAI, RGB_HUI, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_INS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PAUS, KC_TRNS, + /* caps A S D F G H J K L ; ' # enter pg up */ + RGB_TOG, RGB_VAD, RGB_SAD, RGB_HUD, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_INS, KC_TRNS, KC_HOME, + /* shift \ Z X C V B N M , . / shift up pg dn */ + KC_MPLY, KC_LSFT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MUTE, KC_TRNS, KC_TRNS, KC_TRNS, KC_RSFT, KC_VOLU, KC_END, + /* ctrl win alt space alt fn ctrl left down right */ + KC_LCTL, KC_LGUI, KC_LALT, KC_TRNS, KC_RALT, KC_TRNS, KC_RCTL, KC_TRNS, KC_VOLD, KC_TRNS + ) +}; + + + + +#ifdef ENCODER_ENABLE +void encoder_update_user(uint8_t index, bool clockwise){ + + if (index == 0) { + switch (get_highest_layer(layer_state)) { + case _BL: + // Move whole words. Hold shift to select while moving. + if (clockwise) { + tap_code16(C(KC_RGHT)); + } else { + tap_code16(C(KC_LEFT)); + } + break; + default: + // History scrubbing. For Adobe products, hold shift while moving + // backward to go forward instead. + if (clockwise) { + tap_code16(C(KC_Z)); + } else { + tap_code16(C(KC_Y)); + } + break; + } + } else if (index == 1) { + switch (get_highest_layer(layer_state)) { + case _BL: + // Scrolling with PageUp and PgDn. + if (clockwise) { + tap_code16(KC_PGDN); + } else { + tap_code16(KC_PGUP); + } + break; + default: + if (clockwise) { + tap_code16(A(KC_TAB)); + } else { + tap_code16(A(S(KC_TAB))); + } + break; + } + } +} +#endif diff --git a/keyboards/tkw/stoutgat/v2/readme.md b/keyboards/tkw/stoutgat/v2/readme.md new file mode 100644 index 000000000000..192fca3d16f3 --- /dev/null +++ b/keyboards/tkw/stoutgat/v2/readme.md @@ -0,0 +1,15 @@ +# stoutgat v2 + +![stoutgatv2](https://i.imgur.com/CCiP2Ffl.jpg) + +ARM 65% mechanical keyboard with RGB underglow and dual encoders. + +* Keyboard Maintainer: [vattern](https://github.com/vattern) +* Hardware Supported: f411 blackpill +* Hardware Availability: [stoutgatv2](https://github.com/vattern/stoutgatv2) + +Make example for this keyboard (after setting up your build environment): + + qmk flash -kb tkw/stoutgat/v2 -km 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/tkw/stoutgat/v2/rules.mk b/keyboards/tkw/stoutgat/v2/rules.mk new file mode 100644 index 000000000000..587a17780a63 --- /dev/null +++ b/keyboards/tkw/stoutgat/v2/rules.mk @@ -0,0 +1,24 @@ +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +KEYBOARD_SHARED_EP = yes # Free up some extra endpoints - needed if console+mouse+extra +MOUSEKEY_ENABLE = yes # 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 +ENCODER_ENABLE = yes # Enable rotary encoder support +BLUETOOTH_ENABLE = no # Enable Bluetooth +AUDIO_ENABLE = no # Audio output + +WS2812_DRIVER = pwm +OPT_DEFS += -DSTM32_DMA_REQUIRED=TRUE + +DEFAULT_FOLDER = tkw/stoutgat/v2/f411 +LAYOUTS = 65_iso 65_ansi diff --git a/keyboards/tkw/stoutgat/v2/v2.c b/keyboards/tkw/stoutgat/v2/v2.c new file mode 100644 index 000000000000..030f056abf2a --- /dev/null +++ b/keyboards/tkw/stoutgat/v2/v2.c @@ -0,0 +1,16 @@ +/* Copyright 2020 Thys de Wet + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#include "v2.h" diff --git a/keyboards/tkw/stoutgat/v2/v2.h b/keyboards/tkw/stoutgat/v2/v2.h new file mode 100644 index 000000000000..ff44742ff564 --- /dev/null +++ b/keyboards/tkw/stoutgat/v2/v2.h @@ -0,0 +1,75 @@ +/* Copyright 2020 Thys de Wet + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License 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 _x_ KC_NO + +#include "quantum.h" + +#define LAYOUT_encoder( \ + 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, K2D, K1D, K2E, \ + K44, K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E, \ + K40, K41, K42, K46, 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, K1D, K1E }, \ +{ K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2D, _x_, K2E }, \ +{ K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E }, \ +{ K40, K41, K42, _x_, K44, _x_, K46, _x_, _x_, K49, K4A, K4B, K4C, K4D, K4E } \ +} +#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, K2D, K1D, K2E, \ + K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E, \ + K40, K41, K42, K46, 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, K1D, K1E }, \ +{ K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2D, _x_, K2E }, \ +{ K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E }, \ +{ K40, K41, K42, _x_, _x_, _x_, K46, _x_, _x_, K49, K4A, K4B, K4C, K4D, K4E } \ +} + +#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, K46, 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, K1D, K1E }, \ +{ K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, _x_, K2D, K2E }, \ +{ K30, _x_, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E }, \ +{ K40, K41, K42, _x_, _x_, _x_, K46, _x_, _x_, K49, K4A, K4B, K4C, K4D, K4E} \ +} + +#define LAYOUT_65_ansi_blocker( \ + 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, K46, K49, 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, K2D, _x_, K2E }, \ +{ K30, _x_, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E }, \ +{ K40, K41, K42, _x_, _x_, _x_, K46, _x_, _x_, K49, _x_, K4B, K4C, K4D, K4E} \ +} From 97122d203bf443eda8ff63865223cc96bcc695f4 Mon Sep 17 00:00:00 2001 From: Xelus22 <17491233+Xelus22@users.noreply.github.com> Date: Wed, 16 Sep 2020 16:16:01 +1000 Subject: [PATCH 788/930] [Core] DYNAMIC_KEYMAP_EEPROM_MAX_ADDR check (#10315) * add error check * remove quotes * update error message Co-authored-by: Ryan Co-authored-by: Ryan --- quantum/dynamic_keymap.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/quantum/dynamic_keymap.c b/quantum/dynamic_keymap.c index 27ee6a284055..0608b469c088 100644 --- a/quantum/dynamic_keymap.c +++ b/quantum/dynamic_keymap.c @@ -42,6 +42,11 @@ # endif #endif +// Due to usage of uint16_t check for max 65535 +#if DYNAMIC_KEYMAP_EEPROM_MAX_ADDR > 65535 +# error DYNAMIC_KEYMAP_EEPROM_MAX_ADDR must be less than 65536 +#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 From 424eeb8af738697e05446c0949099416955df226 Mon Sep 17 00:00:00 2001 From: Adam Gwilliam Date: Wed, 16 Sep 2020 18:57:09 -0500 Subject: [PATCH 789/930] add VIA support for boardsource/5x12 (#10236) * add via support for boardsource/5x12 * make product id for 5x12 unique (there is already an 0x0512) by setting it to 0x5012 * un-swap the readme's for 3x4 and 5x12 * Update keyboards/boardsource/5x12/config.h update vendor id * Update keyboards/boardsource/5x12/keymaps/via/keymap.c use correct number of layers for VIA * update product id to use same pattern as others * Update keyboards/boardsource/5x12/keymaps/via/readme.md * Update keyboards/boardsource/5x12/keymaps/via/readme.md --- keyboards/boardsource/5x12/config.h | 4 +- .../boardsource/5x12/keymaps/via/keymap.c | 46 +++++++++++++++++++ .../boardsource/5x12/keymaps/via/readme.md | 5 ++ .../boardsource/5x12/keymaps/via/rules.mk | 1 + 4 files changed, 54 insertions(+), 2 deletions(-) create mode 100644 keyboards/boardsource/5x12/keymaps/via/keymap.c create mode 100644 keyboards/boardsource/5x12/keymaps/via/readme.md create mode 100644 keyboards/boardsource/5x12/keymaps/via/rules.mk diff --git a/keyboards/boardsource/5x12/config.h b/keyboards/boardsource/5x12/config.h index 1cd7101589aa..05a8ce2b0612 100644 --- a/keyboards/boardsource/5x12/config.h +++ b/keyboards/boardsource/5x12/config.h @@ -3,8 +3,8 @@ #include "config_common.h" /* USB Device descriptor parameter */ -#define VENDOR_ID 0xF7E0 -#define PRODUCT_ID 0x0412 +#define VENDOR_ID 0x4273 // "Bs" - Boardsource +#define PRODUCT_ID 0x0512 #define DEVICE_VER 0x0000 #define MANUFACTURER Boardsource #define PRODUCT 5x12 diff --git a/keyboards/boardsource/5x12/keymaps/via/keymap.c b/keyboards/boardsource/5x12/keymaps/via/keymap.c new file mode 100644 index 000000000000..5b97e9951da4 --- /dev/null +++ b/keyboards/boardsource/5x12/keymaps/via/keymap.c @@ -0,0 +1,46 @@ +#include QMK_KEYBOARD_H + +enum layers { + _MAIN, + _RAISE, + _LOWER, +}; + +// Readability keycodes +#define LOWER MO(_LOWER) +#define RAISE MO(_RAISE) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [_MAIN] = LAYOUT_ortho_5x12( + 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, KC_ENT, + KC_PIPE, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT + ), + + [_RAISE] = LAYOUT_ortho_5x12( + 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_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, + RESET, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY + ), + + [_LOWER] = LAYOUT_ortho_5x12( + 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_UP, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, + KC_CAPS, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + RESET, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY + ), + [3] = LAYOUT_ortho_5x12( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + ) + +}; diff --git a/keyboards/boardsource/5x12/keymaps/via/readme.md b/keyboards/boardsource/5x12/keymaps/via/readme.md new file mode 100644 index 000000000000..d088e0a64cf1 --- /dev/null +++ b/keyboards/boardsource/5x12/keymaps/via/readme.md @@ -0,0 +1,5 @@ +# The via keymap for boardsource 5x12 ortholinear keyboard + +This folder contains the [VIA](https://caniusevia.com/) configuration for the boardsource 5x12 ortholinear keyboard + +Maintained by: [gwillad](https://github.com/gwillad) diff --git a/keyboards/boardsource/5x12/keymaps/via/rules.mk b/keyboards/boardsource/5x12/keymaps/via/rules.mk new file mode 100644 index 000000000000..036bd6d1c3ec --- /dev/null +++ b/keyboards/boardsource/5x12/keymaps/via/rules.mk @@ -0,0 +1 @@ +VIA_ENABLE = yes \ No newline at end of file From e9b3a12c6e43444f5f6a6e3f63b5e4ece80740eb Mon Sep 17 00:00:00 2001 From: Joel Challis Date: Thu, 17 Sep 2020 01:42:24 +0100 Subject: [PATCH 790/930] Fix ssd1306 compilation on avr-gcc 10 (#9267) --- drivers/avr/ssd1306.c | 2 ++ drivers/avr/ssd1306.h | 2 +- keyboards/claw44/ssd1306.c | 2 ++ keyboards/claw44/ssd1306.h | 2 +- keyboards/comet46/ssd1306.c | 2 ++ keyboards/comet46/ssd1306.h | 2 +- keyboards/crkbd/ssd1306.c | 2 ++ keyboards/crkbd/ssd1306.h | 2 +- keyboards/helix/local_drivers/ssd1306.c | 2 ++ keyboards/helix/local_drivers/ssd1306.h | 2 +- keyboards/yosino58/ssd1306.c | 2 ++ keyboards/yosino58/ssd1306.h | 2 +- 12 files changed, 18 insertions(+), 6 deletions(-) diff --git a/drivers/avr/ssd1306.c b/drivers/avr/ssd1306.c index 205f749502b8..1a09a2bcb789 100644 --- a/drivers/avr/ssd1306.c +++ b/drivers/avr/ssd1306.c @@ -11,6 +11,8 @@ # include "sendchar.h" # include "timer.h" +struct CharacterMatrix display; + // 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 diff --git a/drivers/avr/ssd1306.h b/drivers/avr/ssd1306.h index 9669d1b7e77e..9131afcf6122 100644 --- a/drivers/avr/ssd1306.h +++ b/drivers/avr/ssd1306.h @@ -66,7 +66,7 @@ struct CharacterMatrix { bool dirty; }; -struct CharacterMatrix display; +extern struct CharacterMatrix display; bool iota_gfx_init(void); void iota_gfx_task(void); diff --git a/keyboards/claw44/ssd1306.c b/keyboards/claw44/ssd1306.c index e04a431357c3..7dea1cc176f0 100644 --- a/keyboards/claw44/ssd1306.c +++ b/keyboards/claw44/ssd1306.c @@ -10,6 +10,8 @@ #include "sendchar.h" #include "timer.h" +struct CharacterMatrix display; + extern const unsigned char font[] PROGMEM; // Set this to 1 to help diagnose early startup problems diff --git a/keyboards/claw44/ssd1306.h b/keyboards/claw44/ssd1306.h index 0ca093093a17..11a3cc67f449 100644 --- a/keyboards/claw44/ssd1306.h +++ b/keyboards/claw44/ssd1306.h @@ -65,7 +65,7 @@ struct CharacterMatrix { bool dirty; }; -struct CharacterMatrix display; +extern struct CharacterMatrix display; bool iota_gfx_init(bool rotate); void iota_gfx_task(void); diff --git a/keyboards/comet46/ssd1306.c b/keyboards/comet46/ssd1306.c index abbed4a49fb9..4bd2d80bc4d4 100644 --- a/keyboards/comet46/ssd1306.c +++ b/keyboards/comet46/ssd1306.c @@ -10,6 +10,8 @@ #include "sendchar.h" #include "timer.h" +struct CharacterMatrix display; + extern const unsigned char font[] PROGMEM; // Set this to 1 to help diagnose early startup problems diff --git a/keyboards/comet46/ssd1306.h b/keyboards/comet46/ssd1306.h index 0ca093093a17..11a3cc67f449 100644 --- a/keyboards/comet46/ssd1306.h +++ b/keyboards/comet46/ssd1306.h @@ -65,7 +65,7 @@ struct CharacterMatrix { bool dirty; }; -struct CharacterMatrix display; +extern struct CharacterMatrix display; bool iota_gfx_init(bool rotate); void iota_gfx_task(void); diff --git a/keyboards/crkbd/ssd1306.c b/keyboards/crkbd/ssd1306.c index b2676f386f24..4ec8a9a00f0a 100644 --- a/keyboards/crkbd/ssd1306.c +++ b/keyboards/crkbd/ssd1306.c @@ -10,6 +10,8 @@ #include "sendchar.h" #include "timer.h" +struct CharacterMatrix display; + extern const unsigned char font[] PROGMEM; #ifndef OLED_BLANK_CHAR diff --git a/keyboards/crkbd/ssd1306.h b/keyboards/crkbd/ssd1306.h index 0ca093093a17..11a3cc67f449 100644 --- a/keyboards/crkbd/ssd1306.h +++ b/keyboards/crkbd/ssd1306.h @@ -65,7 +65,7 @@ struct CharacterMatrix { bool dirty; }; -struct CharacterMatrix display; +extern struct CharacterMatrix display; bool iota_gfx_init(bool rotate); void iota_gfx_task(void); diff --git a/keyboards/helix/local_drivers/ssd1306.c b/keyboards/helix/local_drivers/ssd1306.c index 00b2fb0eec36..c6fc4b78544f 100644 --- a/keyboards/helix/local_drivers/ssd1306.c +++ b/keyboards/helix/local_drivers/ssd1306.c @@ -16,6 +16,8 @@ #include "sendchar.h" #include "timer.h" +struct CharacterMatrix display; + // 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 diff --git a/keyboards/helix/local_drivers/ssd1306.h b/keyboards/helix/local_drivers/ssd1306.h index f9f91c6fedf5..bcb30f88595d 100644 --- a/keyboards/helix/local_drivers/ssd1306.h +++ b/keyboards/helix/local_drivers/ssd1306.h @@ -66,7 +66,7 @@ struct CharacterMatrix { bool dirty; }; -struct CharacterMatrix display; +extern struct CharacterMatrix display; bool iota_gfx_init(bool rotate); void iota_gfx_task(void); diff --git a/keyboards/yosino58/ssd1306.c b/keyboards/yosino58/ssd1306.c index ff6ba210d1fb..abd9de2f7a08 100644 --- a/keyboards/yosino58/ssd1306.c +++ b/keyboards/yosino58/ssd1306.c @@ -10,6 +10,8 @@ #include "sendchar.h" #include "timer.h" +struct CharacterMatrix display; + extern const unsigned char font[] PROGMEM; // Set this to 1 to help diagnose early startup problems diff --git a/keyboards/yosino58/ssd1306.h b/keyboards/yosino58/ssd1306.h index acaf6217ef05..35e4c144cc7b 100644 --- a/keyboards/yosino58/ssd1306.h +++ b/keyboards/yosino58/ssd1306.h @@ -70,7 +70,7 @@ struct CharacterMatrix { bool dirty; }; -struct CharacterMatrix display; +extern struct CharacterMatrix display; bool iota_gfx_init(bool rotate); void iota_gfx_task(void); From 410d09675a58f1890c24068066bb8eace21c2416 Mon Sep 17 00:00:00 2001 From: Joel Challis Date: Thu, 17 Sep 2020 01:45:07 +0100 Subject: [PATCH 791/930] Fix TWIlib compilation on avr-gcc 10 (#9273) --- keyboards/lfkeyboards/TWIlib.c | 13 +++++++++++++ keyboards/lfkeyboards/TWIlib.h | 12 +----------- keyboards/meira/TWIlib.c | 13 +++++++++++++ keyboards/meira/TWIlib.h | 12 +----------- 4 files changed, 28 insertions(+), 22 deletions(-) diff --git a/keyboards/lfkeyboards/TWIlib.c b/keyboards/lfkeyboards/TWIlib.c index abb12cc87ace..dc4fbf016bbf 100644 --- a/keyboards/lfkeyboards/TWIlib.c +++ b/keyboards/lfkeyboards/TWIlib.c @@ -11,6 +11,19 @@ #include "util/delay.h" #include "print.h" +// Global transmit buffer +volatile uint8_t *TWITransmitBuffer; +// Global receive buffer +volatile uint8_t TWIReceiveBuffer[RXMAXBUFLEN]; +// Buffer indexes +volatile int TXBuffIndex; // Index of the transmit buffer. Is volatile, can change at any time. +int RXBuffIndex; // Current index in the receive buffer +// Buffer lengths +int TXBuffLen; // The total length of the transmit buffer +int RXBuffLen; // The total number of bytes to read (should be less than RXMAXBUFFLEN) + +TWIInfoStruct TWIInfo; + void TWIInit() { TWIInfo.mode = Ready; diff --git a/keyboards/lfkeyboards/TWIlib.h b/keyboards/lfkeyboards/TWIlib.h index 6db3cc9513e0..8ba261c6e554 100644 --- a/keyboards/lfkeyboards/TWIlib.h +++ b/keyboards/lfkeyboards/TWIlib.h @@ -16,16 +16,6 @@ #define TXMAXBUFLEN 20 // Receive buffer length #define RXMAXBUFLEN 20 -// Global transmit buffer -volatile uint8_t *TWITransmitBuffer; -// Global receive buffer -volatile uint8_t TWIReceiveBuffer[RXMAXBUFLEN]; -// Buffer indexes -volatile int TXBuffIndex; // Index of the transmit buffer. Is volatile, can change at any time. -int RXBuffIndex; // Current index in the receive buffer -// Buffer lengths -int TXBuffLen; // The total length of the transmit buffer -int RXBuffLen; // The total number of bytes to read (should be less than RXMAXBUFFLEN) typedef enum { Ready, @@ -42,8 +32,8 @@ typedef enum { uint8_t errorCode; uint8_t repStart; }TWIInfoStruct; -TWIInfoStruct TWIInfo; +extern TWIInfoStruct TWIInfo; // TWI Status Codes #define TWI_START_SENT 0x08 // Start sent diff --git a/keyboards/meira/TWIlib.c b/keyboards/meira/TWIlib.c index 8e0c974381f1..4091429b4efe 100755 --- a/keyboards/meira/TWIlib.c +++ b/keyboards/meira/TWIlib.c @@ -11,6 +11,19 @@ #include "util/delay.h" #include "print.h" +// Global transmit buffer +volatile uint8_t *TWITransmitBuffer; +// Global receive buffer +volatile uint8_t TWIReceiveBuffer[RXMAXBUFLEN]; +// Buffer indexes +volatile int TXBuffIndex; // Index of the transmit buffer. Is volatile, can change at any time. +int RXBuffIndex; // Current index in the receive buffer +// Buffer lengths +int TXBuffLen; // The total length of the transmit buffer +int RXBuffLen; // The total number of bytes to read (should be less than RXMAXBUFFLEN) + +TWIInfoStruct TWIInfo; + void TWIInit() { TWIInfo.mode = Ready; diff --git a/keyboards/meira/TWIlib.h b/keyboards/meira/TWIlib.h index 6db3cc9513e0..8ba261c6e554 100755 --- a/keyboards/meira/TWIlib.h +++ b/keyboards/meira/TWIlib.h @@ -16,16 +16,6 @@ #define TXMAXBUFLEN 20 // Receive buffer length #define RXMAXBUFLEN 20 -// Global transmit buffer -volatile uint8_t *TWITransmitBuffer; -// Global receive buffer -volatile uint8_t TWIReceiveBuffer[RXMAXBUFLEN]; -// Buffer indexes -volatile int TXBuffIndex; // Index of the transmit buffer. Is volatile, can change at any time. -int RXBuffIndex; // Current index in the receive buffer -// Buffer lengths -int TXBuffLen; // The total length of the transmit buffer -int RXBuffLen; // The total number of bytes to read (should be less than RXMAXBUFFLEN) typedef enum { Ready, @@ -42,8 +32,8 @@ typedef enum { uint8_t errorCode; uint8_t repStart; }TWIInfoStruct; -TWIInfoStruct TWIInfo; +extern TWIInfoStruct TWIInfo; // TWI Status Codes #define TWI_START_SENT 0x08 // Start sent From f650b03fb77530eb6aa7eab541f6a28c98e0ced6 Mon Sep 17 00:00:00 2001 From: Dan White Date: Wed, 16 Sep 2020 22:03:28 -0600 Subject: [PATCH 792/930] [Keymap] Badger keymaps/userspace (#10239) * Badger keymaps * bug fix - linter * code review feedback and ortholinear bugs * cleanup * backing out suspect bug after doing additional research * code review feedback * code review feedback * changing default badger keymap and small bugfix --- .../1up60hte/keymaps/badger/keymap.c | 59 +++++++ keyboards/1upkeyboards/1up60rgb/1up60rgb.h | 30 ++++ keyboards/1upkeyboards/1up60rgb/info.json | 56 ++++++- .../1up60rgb/keymaps/badger/keymap.c | 59 +++++++ .../clueboard/66/keymaps/badger/keymap.c | 53 ++++++ .../dz60rgb_ansi/keymaps/badger/keymap.c | 60 +++++++ keyboards/planck/keymaps/badger/keymap.c | 60 +++++++ keyboards/preonic/keymaps/badger/keymap.c | 74 +++++++++ keyboards/preonic/keymaps/badger/readme.md | 21 +++ users/badger/README.md | 31 ++++ users/badger/badger.c | 49 ++++++ users/badger/badger.h | 109 +++++++++++++ users/badger/ortho.c | 151 ++++++++++++++++++ users/badger/ortho.h | 58 +++++++ users/badger/rules.mk | 2 + 15 files changed, 867 insertions(+), 5 deletions(-) create mode 100644 keyboards/1upkeyboards/1up60hte/keymaps/badger/keymap.c create mode 100644 keyboards/1upkeyboards/1up60rgb/keymaps/badger/keymap.c create mode 100644 keyboards/clueboard/66/keymaps/badger/keymap.c create mode 100644 keyboards/dztech/dz60rgb_ansi/keymaps/badger/keymap.c create mode 100644 keyboards/planck/keymaps/badger/keymap.c create mode 100644 keyboards/preonic/keymaps/badger/keymap.c create mode 100644 keyboards/preonic/keymaps/badger/readme.md create mode 100644 users/badger/README.md create mode 100644 users/badger/badger.c create mode 100644 users/badger/badger.h create mode 100644 users/badger/ortho.c create mode 100644 users/badger/ortho.h create mode 100644 users/badger/rules.mk diff --git a/keyboards/1upkeyboards/1up60hte/keymaps/badger/keymap.c b/keyboards/1upkeyboards/1up60hte/keymaps/badger/keymap.c new file mode 100644 index 000000000000..8e64c543d524 --- /dev/null +++ b/keyboards/1upkeyboards/1up60hte/keymaps/badger/keymap.c @@ -0,0 +1,59 @@ +/* +Copyright 2020 Dan White + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ +#include "badger.h" + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_QWERTY_MAC] = LAYOUT_tsangan(\ + 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_TAB, KC_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, \ + MOVE_MAC, 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, CFG_MAC, \ + KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, ADJUST, KC_RALT, KC_RGUI), + + [_MOVE_MAC] = LAYOUT_tsangan(\ + MAC_FRC, MM_LEFT, MM_RGHT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_0, IJ_TOP, IJ_BOTT, _______, _______, \ + KC_BACK, IJ_STEP, IJ_INTO, IJ_OUT, IJ_RUN, IJ_STOP, _______, WD_BACK, KC_HOME, KC_END, WD_FRWD, IJ_BACK, IJ_FWD, KC_NEXT, \ + _______, MM_LH, MM_MAX, MM_RH, IJ_FIND, IJ_IMPS, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, CM_RIGHT, CM_DOWN, _______, \ + _______, MM_UH, MM_BH, MAC_CPY, MAC_PST, IJ_IMPH, _______, IJ_REN, IJ_IMPL, IJ_DECL, IJ_USAG, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______), + + [_QWERTY_LINUX] = LAYOUT_tsangan(\ + 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_TAB, KC_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, \ + MOVE, 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, CFG_LNX, \ + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, ADJUST, KC_RALT, KC_RGUI), + + [_MOVE_LINUX] = LAYOUT_tsangan(\ + KC_GRV, VD_1, VD_2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______, \ + KC_BACK, WM_VD1, WM_UH, WM_VD2, RESET, KC_MSTP, KC_MPLY, KC_PGUP, KC_HOME, KC_END, KC_PGDN, _______, _______, KC_NEXT, \ + _______, WM_LH, WM_MAX, WM_RH, WD_FRWD, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, CS_RIGHT, CS_DOWN, _______, \ + _______, WM_VD3, WM_BH, OS_COPY, OS_PAST, WD_BACK, KC_MNXT, KC_MUTE, KC_WBAK, KC_WFWD, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______), + + [_ADJUST] = LAYOUT_tsangan(\ + 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_WREF, KC_MSTP, KC_MPLY, KC_PGUP, _______, _______, KC_PGDN, KC_VOLD, KC_VOLU, KC_INS, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, KC_CAPS, _______, KC_MPRV, KC_MNXT, KC_MUTE, KC_WBAK, KC_WFWD, KC_WSCH, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______), + + [_CONFIG] = LAYOUT_tsangan(\ + _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______, \ + _______, NK_ON, NK_OFF, EEP_RST, RESET, _______, _______, _______, _______, _______, _______, _______, _______, KC_INS, \ + _______, GE_SWAP, GE_NORM, DEBUG, RGB_MOD, RGB_HUI, RGB_SAI, RGB_SPI, RGB_M_B, _______, _______, RGB_TOG, _______, \ + _______, DF_1, DF_2, _______, RGB_RMOD, RGB_HUD, RGB_SAD, RGB_SPD, RGB_M_K, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______) +}; diff --git a/keyboards/1upkeyboards/1up60rgb/1up60rgb.h b/keyboards/1upkeyboards/1up60rgb/1up60rgb.h index 61d064abb7a2..5ee6c12bcf5b 100644 --- a/keyboards/1upkeyboards/1up60rgb/1up60rgb.h +++ b/keyboards/1upkeyboards/1up60rgb/1up60rgb.h @@ -33,6 +33,21 @@ { k40, k41, XXX, k43, XXX, XXX, k46, XXX, XXX, XXX, k4A, k4B, XXX, k4D, k4E } \ } +/* ANSI-Tsangan variant, with split right shift key */ +#define LAYOUT_60_ansi_tsangan_split_rshift( \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, \ + 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, k2E, \ + k30, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3D, k3E, \ + k40, k41, k43, k46, k4B, k4D, k4E \ +) { \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0D }, \ + { k10, XXX, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, k1E }, \ + { k20, XXX, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2E, XXX }, \ + { k30, XXX, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, XXX, k3D, k3E }, \ + { k40, k41, XXX, k43, XXX, XXX, k46, XXX, XXX, XXX, XXX, k4B, XXX, k4D, k4E } \ +} + /* ISO variant. Remove useless ANSI keys */ #define LAYOUT_60_iso( \ k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, \ @@ -63,6 +78,21 @@ { k40, k41, XXX, k43, XXX, XXX, k46, XXX, XXX, XXX, k4A, k4B, XXX, k4D, k4E } \ } +/* ANSI Variant */ +#define LAYOUT_60_ansi_split_rshift( \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, \ + 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, k2E, \ + 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, k0D, k0D }, \ + { k10, XXX, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, k1E }, \ + { k20, XXX, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2E, XXX }, \ + { k30, XXX, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, XXX, k3D, k3E }, \ + { k40, k41, XXX, k43, XXX, XXX, k46, XXX, XXX, XXX, k4A, k4B, XXX, k4D, k4E } \ +} + /* HHKB Variant */ #define LAYOUT_60_hhkb( \ k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E, \ diff --git a/keyboards/1upkeyboards/1up60rgb/info.json b/keyboards/1upkeyboards/1up60rgb/info.json index 2185f0bb1910..9f6ed62189ff 100644 --- a/keyboards/1upkeyboards/1up60rgb/info.json +++ b/keyboards/1upkeyboards/1up60rgb/info.json @@ -6,22 +6,68 @@ "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":"~", "x":13, "y":0}, {"label":"Del", "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}, {"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": [ + {"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":"~", "x":13, "y":0}, {"label":"Del", "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}, {"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_ansi": { - "layout": [{"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", "w":2}, {"x":0, "y":1, "label":"Tab", "w":1.5}, {"x":1.5, "y":1, "label":"Q"}, {"x":2.5, "y":1, "label":"W"}, {"x":3.5, "y":1, "label":"E"}, {"x":4.5, "y":1, "label":"R"}, {"x":5.5, "y":1, "label":"T"}, {"x":6.5, "y":1, "label":"Y"}, {"x":7.5, "y":1, "label":"U"}, {"x":8.5, "y":1, "label":"I"}, {"x":9.5, "y":1, "label":"O"}, {"x":10.5, "y":1, "label":"P"}, {"x":11.5, "y":1, "label":"{"}, {"x":12.5, "y":1, "label":"}"}, {"x":13.5, "y":1, "label":"|", "w":1.5}, {"x":0, "y":2, "label":"Caps Lock", "w":1.75}, {"x":1.75, "y":2, "label":"A"}, {"x":2.75, "y":2, "label":"S"}, {"x":3.75, "y":2, "label":"D"}, {"x":4.75, "y":2, "label":"F"}, {"x":5.75, "y":2, "label":"G"}, {"x":6.75, "y":2, "label":"H"}, {"x":7.75, "y":2, "label":"J"}, {"x":8.75, "y":2, "label":"K"}, {"x":9.75, "y":2, "label":"L"}, {"x":10.75, "y":2, "label":":"}, {"x":11.75, "y":2, "label":"\""}, {"x":12.75, "y":2, "label":"Enter", "w":2.25}, {"x":0, "y":3, "label":"Shift", "w":2.25}, {"x":2.25, "y":3, "label":"Z"}, {"x":3.25, "y":3, "label":"X"}, {"x":4.25, "y":3, "label":"C"}, {"x":5.25, "y":3, "label":"V"}, {"x":6.25, "y":3, "label":"B"}, {"x":7.25, "y":3, "label":"N"}, {"x":8.25, "y":3, "label":"M"}, {"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", "w":2.75}, {"x":0, "y":4, "label":"Ctrl", "w":1.25}, {"x":1.25, "y":4, "label":"Win", "w":1.25}, {"x":2.5, "y":4, "label":"Alt", "w":1.25}, {"x":3.75, "y":4, "w":6.25}, {"x":10, "y":4, "label":"Alt", "w":1.25}, {"x":11.25, "y":4, "label":"Win", "w":1.25}, {"x":12.5, "y":4, "label":"Menu", "w":1.25}, {"x":13.75, "y":4, "label":"Ctrl", "w":1.25}] + "layout": [ + {"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", "w":2}, + {"x":0, "y":1, "label":"Tab", "w":1.5}, {"x":1.5, "y":1, "label":"Q"}, {"x":2.5, "y":1, "label":"W"}, {"x":3.5, "y":1, "label":"E"}, {"x":4.5, "y":1, "label":"R"}, {"x":5.5, "y":1, "label":"T"}, {"x":6.5, "y":1, "label":"Y"}, {"x":7.5, "y":1, "label":"U"}, {"x":8.5, "y":1, "label":"I"}, {"x":9.5, "y":1, "label":"O"}, {"x":10.5, "y":1, "label":"P"}, {"x":11.5, "y":1, "label":"{"}, {"x":12.5, "y":1, "label":"}"}, {"x":13.5, "y":1, "label":"|", "w":1.5}, + {"x":0, "y":2, "label":"Caps Lock", "w":1.75}, {"x":1.75, "y":2, "label":"A"}, {"x":2.75, "y":2, "label":"S"}, {"x":3.75, "y":2, "label":"D"}, {"x":4.75, "y":2, "label":"F"}, {"x":5.75, "y":2, "label":"G"}, {"x":6.75, "y":2, "label":"H"}, {"x":7.75, "y":2, "label":"J"}, {"x":8.75, "y":2, "label":"K"}, {"x":9.75, "y":2, "label":"L"}, {"x":10.75, "y":2, "label":":"}, {"x":11.75, "y":2, "label":"\""}, {"x":12.75, "y":2, "label":"Enter", "w":2.25}, + {"x":0, "y":3, "label":"Shift", "w":2.25}, {"x":2.25, "y":3, "label":"Z"}, {"x":3.25, "y":3, "label":"X"}, {"x":4.25, "y":3, "label":"C"}, {"x":5.25, "y":3, "label":"V"}, {"x":6.25, "y":3, "label":"B"}, {"x":7.25, "y":3, "label":"N"}, {"x":8.25, "y":3, "label":"M"}, {"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", "w":2.75}, + {"x":0, "y":4, "label":"Ctrl", "w":1.25}, {"x":1.25, "y":4, "label":"Win", "w":1.25}, {"x":2.5, "y":4, "label":"Alt", "w":1.25}, {"x":3.75, "y":4, "w":6.25}, {"x":10, "y":4, "label":"Alt", "w":1.25}, {"x":11.25, "y":4, "label":"Win", "w":1.25}, {"x":12.5, "y":4, "label":"Menu", "w":1.25}, {"x":13.75, "y":4, "label":"Ctrl", "w":1.25}] }, "LAYOUT_60_iso": { - "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}, {"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": [ + {"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}] }, "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.5}, {"label":"Win", "x":1.5, "y":4}, {"label":"Alt", "x":2.5, "y":4, "w":1.5}, {"x":4, "y":4, "w":6}, {"label":"Alt", "x":10, "y":4, "w":1.5}, {"label":"Win", "x":11.5, "y":4}, {"label":"Menu", "x":12.5, "y":4}, {"label":"Ctrl", "x":13.5, "y":4, "w":1.5}] + "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.5}, {"label":"Win", "x":1.5, "y":4}, {"label":"Alt", "x":2.5, "y":4, "w":1.5}, {"x":4, "y":4, "w":6}, {"label":"Alt", "x":10, "y":4, "w":1.5}, {"label":"Win", "x":11.5, "y":4}, {"label":"Menu", "x":12.5, "y":4}, {"label":"Ctrl", "x":13.5, "y":4, "w":1.5}] }, + + "LAYOUT_60_ansi_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}, {"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":"Esc", "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":"Alt", "x":1.25, "y":4, "w": 1.25}, {"label":"Gui", "x":2.5, "y":4, "w":1.25}, {"label": "Space", "x":3.75, "y":4, "w":6.25}, {"label":"Fn", "x":10, "y":4, "w":1.25}, {"label":"Gui", "x":11.25, "y":4, "w": 1.25}, {"label":"Alt", "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": "Bksp", "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":"Esc", "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": "Alt Gr", "x":14, "y":3}, + {"label":"Ctrl", "x":0, "y":4, "w":1.5}, {"label":"Alt", "x":1.5, "y":4}, {"label":"GUI", "x":2.5, "y":4, "w":1.5}, {"label":"space", "x":4, "y":4, "w":7}, {"label":"Fn", "x":11, "y":4, "w":1.5}, {"label":"Alt", "x":12.5, "y":4}, {"label":"GUI", "x":13.5, "y":4, "w": 1.5} + ] + }, + "LAYOUT_60_hhkb": { - "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":"Delete", "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":"Os", "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":"Os", "x":12.5, "y":4}] + "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":"Delete", "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":"Os", "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":"Os", "x":12.5, "y":4}] } } } diff --git a/keyboards/1upkeyboards/1up60rgb/keymaps/badger/keymap.c b/keyboards/1upkeyboards/1up60rgb/keymaps/badger/keymap.c new file mode 100644 index 000000000000..5229657bc6bd --- /dev/null +++ b/keyboards/1upkeyboards/1up60rgb/keymaps/badger/keymap.c @@ -0,0 +1,59 @@ +/* +Copyright 2020 Dan White +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ +#include "badger.h" + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_QWERTY_MAC] = LAYOUT_60_ansi_tsangan_split_rshift(\ + 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, \ + MOVE_MAC, 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, CFG_MAC, \ + KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, ADJUST, KC_RALT, KC_RGUI), + + [_MOVE_MAC] = LAYOUT_60_ansi_tsangan_split_rshift(\ + MAC_FRC, MM_LEFT, MM_RGHT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_0, IJ_TOP, IJ_BOTT, KC_DEL, \ + KC_BACK, IJ_STEP, IJ_INTO, IJ_OUT, IJ_RUN, IJ_STOP, _______, WD_BACK, KC_HOME, KC_END, WD_FRWD, IJ_BACK, IJ_FWD, KC_NEXT, \ + _______, MM_LH, MM_MAX, MM_RH, IJ_FIND, IJ_IMPS, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, CM_RIGHT, CM_DOWN, _______, \ + _______, MM_UH, MM_BH, MAC_CPY, MAC_PST, IJ_IMPH, _______, IJ_REN, IJ_IMPL, IJ_DECL, IJ_USAG, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______), + + [_QWERTY_LINUX] = LAYOUT_60_ansi_tsangan_split_rshift(\ + 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, \ + MOVE, 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, CFG_LNX, \ + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, ADJUST, KC_LALT, KC_RGUI), + + [_MOVE_LINUX] = LAYOUT_60_ansi_tsangan_split_rshift(\ + KC_GRV, VD_1, VD_2, VD_3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL, \ + KC_BACK, WM_VD1, WM_UH, WM_VD2, RESET, KC_MSTP, KC_MPLY, KC_PGUP, KC_HOME, KC_END, KC_PGDN, _______, _______, KC_NEXT, \ + _______, WM_LH, WM_MAX, WM_RH, WD_FRWD, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, CS_RIGHT, CS_DOWN, _______, \ + _______, WM_VD3, WM_BH, OS_COPY, OS_PAST, WD_BACK, KC_MNXT, KC_MUTE, KC_WBAK, KC_WFWD, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______), + + [_ADJUST] = LAYOUT_60_ansi_tsangan_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_DEL, \ + _______, _______, _______, _______, KC_WREF, KC_MSTP, KC_MPLY, KC_PGUP, _______, _______, KC_PGDN, KC_VOLD, KC_VOLU, KC_INS, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, DF_1, DF_2, KC_CAPS, _______, KC_MPRV, KC_MNXT, KC_MUTE, KC_WBAK, KC_WFWD, KC_WSCH, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______), + + [_CONFIG] = LAYOUT_60_ansi_tsangan_split_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_DEL, \ + _______, NK_ON, NK_OFF, EEP_RST, RESET, _______, _______, _______, _______, _______, _______, _______, _______, KC_INS, \ + _______, GE_SWAP, GE_NORM, DEBUG, RGB_MOD, RGB_HUI, RGB_SAI, RGB_SPI, RGB_M_B, _______, _______, RGB_TOG, _______, \ + _______, LAG_SWP, LAG_NRM, _______, RGB_RMOD, RGB_HUD, RGB_SAD, RGB_SPD, RGB_M_K, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______) +}; + diff --git a/keyboards/clueboard/66/keymaps/badger/keymap.c b/keyboards/clueboard/66/keymaps/badger/keymap.c new file mode 100644 index 000000000000..74fec0b58e67 --- /dev/null +++ b/keyboards/clueboard/66/keymaps/badger/keymap.c @@ -0,0 +1,53 @@ +/* +Copyright 2020 Dan White + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ +#include "badger.h" + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_QWERTY_LINUX] = LAYOUT_66_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_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, \ + MOVE, 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, ADJUST, KC_RGUI, KC_LALT, KC_LEFT, KC_DOWN, KC_RGHT), + + [_MOVE_LINUX] = LAYOUT_66_ansi(\ + KC_ESC, VD_1, VD_2, VD_3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, IJ_UP, IJ_DOWN, KC_DEL, KC_PGUP, \ + _______, IJ_STEP, IJ_INTO, IJ_OUT, IJ_RUN, IJ_STOP, IJ_OUT, KC_PGUP, KC_HOME, KC_END, KC_PGDN, IJ_BACK, IJ_FWD, KC_INS, KC_PGDN, \ + _______, WM_LH, WM_UH, WM_RH, WD_FRWD, MAC_POP, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, CS_RIGHT, CS_DOWN, _______, \ + _______, MM_UH, MM_BH, MAC_CPY, MAC_PST, WD_BACK, KC_MNXT, IJ_REN, IJ_IMPL, IJ_DECL, IJ_USAG, _______, KC_BRIU, \ + _______, _______, _______, _______, _______, _______, _______, KC_HOME, KC_BRID, KC_END), + + [_QWERTY_MAC] = LAYOUT_66_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_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, \ + MOVE_MAC, 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, ADJUST, KC_RGUI, KC_LALT, KC_LEFT, KC_DOWN, KC_RGHT), + + [_MOVE_MAC] = LAYOUT_66_ansi(\ + KC_ESC, M_VD1, M_VD2, M_VD3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, IJ_UP, IJ_DOWN, KC_DEL, KC_PGUP, \ + _______, IJ_STEP, IJ_INTO, IJ_OUT, IJ_RUN, IJ_STOP, IJ_OUT, KC_PGUP, KC_HOME, KC_END, KC_PGDN, IJ_BACK, IJ_FWD, KC_INS, KC_PGDN, \ + _______, MM_LH, MM_MAX, MM_RH, WD_FRWD, MAC_POP, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, CM_RIGHT, CM_DOWN, _______, \ + _______, MM_UH, MM_BH, MAC_CPY, MAC_PST, WD_BACK, KC_MNXT, IJ_REN, IJ_IMPL, IJ_DECL, IJ_USAG, _______, KC_BRIU, \ + _______, _______, _______, _______, _______, _______, _______, KC_HOME, KC_BRID, KC_END), + + [_ADJUST] = LAYOUT_66_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_VOLU, \ + _______, NK_ON, NK_OFF, EEP_RST, RESET, KC_MSTP, KC_MPLY, KC_PGUP, KC_HOME, KC_END, KC_PGDN, AG_SWAP, AG_NORM, KC_INS, KC_VOLD, \ + _______, GE_SWAP, GE_NORM, DEBUG, AG_SWAP, AG_NORM, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, _______, _______, _______, \ + _______, DF_1, DF_2, KC_CAPS, _______, KC_MPRV, KC_MNXT, KC_MUTE, KC_WBAK, KC_WFWD, _______, _______, KC_BRIU, \ + _______, _______, _______, _______, _______, _______, _______, KC_HOME, KC_BRID, KC_END) +}; + diff --git a/keyboards/dztech/dz60rgb_ansi/keymaps/badger/keymap.c b/keyboards/dztech/dz60rgb_ansi/keymaps/badger/keymap.c new file mode 100644 index 000000000000..1d2144d7f427 --- /dev/null +++ b/keyboards/dztech/dz60rgb_ansi/keymaps/badger/keymap.c @@ -0,0 +1,60 @@ +/* +Copyright 2020 Dan White + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ +#include "badger.h" + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_QWERTY_MAC] = 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, \ + MOVE_MAC, 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, ADJUST, KC_RGUI, KC_RALT, MAC_POP), + + [_MOVE_MAC] = LAYOUT_60_ansi(\ + MAC_FRC, MM_LEFT, MM_RGHT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_0, IJ_TOP, IJ_BOTT, KC_DEL, \ + KC_BACK, IJ_STEP, IJ_INTO, IJ_OUT, IJ_RUN, IJ_STOP, _______, WD_BACK, KC_HOME, KC_END, WD_FRWD, IJ_BACK, IJ_FWD, KC_NEXT, \ + _______, MM_LH, MM_MAX, MM_RH, IJ_FIND, IJ_IMPS, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, CM_RIGHT, CM_DOWN, _______, \ + _______, MM_UH, MM_BH, MAC_CPY, MAC_PST, IJ_IMPH, _______, IJ_REN, IJ_IMPL, IJ_DECL, IJ_USAG, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______), + + [_QWERTY_LINUX] = 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, \ + MOVE, 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, ADJUST, KC_LALT, KC_RGUI, KC_RCTL), + + [_MOVE_LINUX] = LAYOUT_60_ansi(\ + KC_GRV, VD_1, VD_2, VD_3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL, \ + KC_BACK, WM_VD1, WM_UH, WM_VD2, RESET, KC_MSTP, KC_MPLY, KC_PGUP, KC_HOME, KC_END, KC_PGDN, _______, _______, KC_NEXT, \ + _______, WM_LH, WM_MAX, WM_RH, WD_FRWD, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, CS_RIGHT, CS_DOWN, _______, \ + _______, WM_VD3, WM_BH, OS_COPY, OS_PAST, WD_BACK, KC_MNXT, KC_MUTE, KC_WBAK, KC_WFWD, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______), + + [_ADJUST] = 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_WREF, KC_MSTP, KC_MPLY, KC_PGUP, _______, _______, KC_PGDN, KC_VOLD, KC_VOLU, KC_INS, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, DF_1, DF_2, KC_CAPS, _______, KC_MPRV, KC_MNXT, KC_MUTE, KC_WBAK, KC_WFWD, KC_WSCH, _______, \ + _______, _______, _______, _______, _______, _______, _______, MO(_CONFIG)), + + [_CONFIG] = 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, \ + _______, NK_ON, NK_OFF, EEP_RST, RESET, _______, _______, _______, _______, _______, _______, _______, _______, KC_INS, \ + _______, GE_SWAP, GE_NORM, DEBUG, RGB_MOD, RGB_HUI, RGB_SAI, RGB_SPI, RGB_M_B, _______, _______, RGB_TOG, _______, \ + _______, LAG_SWP, LAG_NRM, _______, RGB_RMOD, RGB_HUD, RGB_SAD, RGB_SPD, RGB_M_K, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______) +}; + diff --git a/keyboards/planck/keymaps/badger/keymap.c b/keyboards/planck/keymaps/badger/keymap.c new file mode 100644 index 000000000000..332142519027 --- /dev/null +++ b/keyboards/planck/keymaps/badger/keymap.c @@ -0,0 +1,60 @@ +/* +Copyright 2020 Dan White + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#include "ortho.h" + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_QWERTY_MAC_ORTHO] = 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_BSLS, \ + MOMAC, 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, RAISE, P_ADJ, KC_SPC, LOWER, KC_NO, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC), + + [_MOVE_MAC_ORTHO] = LAYOUT_ortho_4x12( + KC_BACK, IJ_STEP, IJ_INTO, IJ_OUT, IJ_RUN, IJ_STOP, _______, WD_BACK, KC_HOME, KC_END, WD_FRWD, KC_NEXT, \ + _______, MM_LH, MM_MAX, MM_RH, IJ_FIND, IJ_IMPS, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, CM_RIGHT, CM_DOWN, \ + _______, MM_UH, MM_BH, MAC_CPY, MAC_PST, IJ_IMPH, _______, IJ_REN, IJ_IMPL, IJ_DECL, IJ_USAG, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______), + + [_QWERTY_LINUX_ORTHO] = 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_BSLS, \ + MOLNX, 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, RAISE, P_ADJ, KC_SPC, LOWER, KC_NO, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC), + + [_MOVE_LINUX_ORTHO] = LAYOUT_ortho_4x12( + _______, WM_VD1, WM_UH, WM_VD2, KC_MAC1, KC_MSTP, KC_MPLY, KC_PGUP, KC_HOME, KC_END, KC_PGDN, KC_INS, \ + _______, WM_LH, WM_MAX, WM_RH, KC_MAC2, KC_PSCR, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, CS_RIGHT, CS_DOWN, \ + _______, WM_VD3, WM_BH, OS_COPY, OS_PAST, KC_MPRV, KC_MNXT, KC_MUTE, KC_WBAK, KC_WFWD, KC_WSCH, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______), + + [_RAISE] = 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_PIPE, \ + _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_DQUO, \ + _______, KC_UNDO, KC_CUT, OS_COPY, OS_PAST, KC_MPRV, KC_MNXT, KC_MUTE, KC_LT, KC_GT, KC_QUES, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______), + + [_LOWER] = 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_BSLS, \ + _______, KC_4, KC_5, KC_6, KC_PMNS, KC_PSCR, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_SCLN, KC_QUOT, \ + _______, KC_1, KC_2, KC_3, KC_PPLS, KC_NO, KC_NO, KC_WHOM, KC_WBAK, KC_WFWD, KC_WSCH, _______, \ + _______, KC_0, KC_DOT, KC_ENT, _______, _______, _______, _______, _______, _______, _______, _______), + + [_ADJUST] = LAYOUT_ortho_4x12( + _______, NK_ON, NK_OFF, EEP_RST, RESET, KC_MSTP, KC_WH_L, KC_WH_D, KC_WH_U, KC_WH_R, KC_BTN2, KC_INS, \ + _______, GE_SWAP, GE_NORM, DEBUG, AG_SWAP, AG_NORM, KC_MS_L, KC_MS_D, KC_MS_U, KC_MS_R, KC_BTN1, _______, \ + _______, KC_LYRC, KC_FIRST, KC_CAPS, KC_NO, KC_MPRV, KC_MNXT, KC_MUTE, KC_ACL0, KC_ACL1, KC_ACL2, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______) +}; diff --git a/keyboards/preonic/keymaps/badger/keymap.c b/keyboards/preonic/keymaps/badger/keymap.c new file mode 100644 index 000000000000..495cf28c455a --- /dev/null +++ b/keyboards/preonic/keymaps/badger/keymap.c @@ -0,0 +1,74 @@ +/* +Copyright 2020 Dan White + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +// if not REV3, just compile the default keymaps +#ifndef REV3_CONFIG_H +#include "../default/keymap.c" +#else + +#include "ortho.h" + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_QWERTY_MAC_ORTHO] = 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_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, \ + MOMAC, 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, RAISE, P_ADJ, KC_SPC, LOWER, KC_RGUI, KC_RALT, MAC_POP), + + [_MOVE_MAC_ORTHO] = LAYOUT_preonic_2x2u( + MAC_FRC, MM_LEFT, MM_RGHT, IJ_TOP, IJ_BOTT, _______, _______, IJ_UP, IJ_DOWN, IJ_BACK, IJ_FWD, KC_BSPC, \ + KC_BACK, IJ_STEP, IJ_INTO, IJ_OUT, IJ_RUN, IJ_STOP, _______, WD_BACK, KC_HOME, KC_END, WD_FRWD, KC_NEXT, \ + _______, MM_LH, MM_MAX, MM_RH, IJ_FIND, IJ_IMPS, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, CM_RIGHT, CM_DOWN, \ + _______, MM_UH, MM_BH, MAC_CPY, MAC_PST, IJ_IMPH, _______, IJ_REN, IJ_IMPL, IJ_DECL, IJ_USAG, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______), + + [_QWERTY_LINUX_ORTHO] = 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_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, \ + MOLNX, 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, RAISE, P_ADJ, KC_SPC, LOWER, KC_RALT, KC_RGUI, OS_POP), + + [_MOVE_LINUX_ORTHO] = LAYOUT_preonic_2x2u( + KC_ESC, VD_1, VD_2, VD_3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_DEL, \ + _______, WM_VD1, WM_UH, WM_VD2, KC_MAC1, KC_MSTP, KC_MPLY, KC_PGUP, KC_HOME, KC_END, KC_PGDN, KC_INS, \ + _______, WM_LH, WM_MAX, WM_RH, KC_MAC2, KC_PSCR, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, CS_RIGHT, CS_DOWN, \ + _______, WM_VD3, WM_BH, OS_COPY, OS_PAST, KC_MPRV, KC_MNXT, KC_MUTE, KC_WBAK, KC_WFWD, KC_WSCH, _______, \ + _______, KC_LCTL, KC_LALT, KC_LGUI, _______, _______, _______, _______, _______, _______), + + [_RAISE] = LAYOUT_preonic_2x2u( + 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_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, \ + _______, KC_AGIN, KC_STOP, KC_MENU, KC_FIND, KC_MPLY, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_COLN, KC_DQUO, \ + _______, KC_UNDO, KC_CUT, OS_COPY, OS_PAST, KC_MPRV, KC_MNXT, KC_MUTE, KC_LT, KC_GT, KC_QUES, KC_TRNS, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______), + + [_LOWER] = LAYOUT_preonic_2x2u( + 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_7, KC_8, KC_9, KC_PMNS, KC_VOLD, KC_VOLU, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, \ + _______, KC_4, KC_5, KC_6, KC_PPLS, KC_PSCR, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_SCLN, KC_QUOT, \ + _______, KC_1, KC_2, KC_3, KC_PAST, KC_NO, KC_NO, KC_WHOM, KC_WBAK, KC_WFWD, KC_WSCH, _______, \ + _______, KC_0, KC_DOT, KC_ENT, _______, _______, _______, _______, _______, _______), + + [_ADJUST_ORTHO] = LAYOUT_preonic_2x2u( + KC_ESC, AU_ON, AU_OFF, CK_TOGG, CK_UP, CK_DOWN, CK_RST, MU_ON, MU_OFF, MU_TOG, MU_MOD, KC_DEL, \ + _______, NK_ON, NK_OFF, EEP_RST, RESET, KC_MSTP, KC_WH_L, KC_WH_D, KC_WH_U, KC_WH_R, KC_BTN2, KC_INS, \ + _______, GE_SWAP, GE_NORM, DEBUG, AG_SWAP, AG_NORM, KC_MS_L, KC_MS_D, KC_MS_U, KC_MS_R, KC_BTN1, _______, \ + _______, KC_LYRC, KC_FIRST, KC_CAPS, KC_NO, KC_MPRV, KC_MNXT, KC_MUTE, KC_ACL0, KC_ACL1, KC_ACL2, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______) +}; + +#endif diff --git a/keyboards/preonic/keymaps/badger/readme.md b/keyboards/preonic/keymaps/badger/readme.md new file mode 100644 index 000000000000..5e16979605ea --- /dev/null +++ b/keyboards/preonic/keymaps/badger/readme.md @@ -0,0 +1,21 @@ +# A QWERTY-centric preonic layout by [BlueTufa](https://github.com/BlueTufa) + +## Layouts + +### QWERTY +Standard QWERTY layer, but ESC maps to MOVE layer when held down. Dedicated modifier for Adjust layer and a dedicated OS action key. +### RAISE layer +Access to function keys and shifted characters not on Preonic layout. Effort is taken to keep Function keys aligned with corresponding number. Some OS action keys are available in this layer. + +### LOWER layer +Numpad behavior and access to characters not present on Preonic layout. + +### MOVE layer +OS-specific convenience shortcuts. Macros are used to make it easier to adapt these to other operating systems. +Window move and resize, and option to move to a specific virtual desktop. + +### ADJUST layer +The first row is focused on audio config. +Take advantage of the mouse movement keys, as well as toggling common keyboard config settings. +Flash settings are accessed here as well. + diff --git a/users/badger/README.md b/users/badger/README.md new file mode 100644 index 000000000000..fca1028a59f0 --- /dev/null +++ b/users/badger/README.md @@ -0,0 +1,31 @@ +# A multi-OS keyboard layout with support for both Linux (KDE) and MacOS-specific QWERTY layouts for many 60-ish% keyboards ( + +## Author: [BlueTufa](https://github.com/BlueTufa) + +> Supported Keyboards: 1up RGB and HTE, Clueboard 66, dztech 60 RGB, and partial support for Preonic and Planck ortholinear keyboards. + +## Layouts + +### QWERTY +Default layer: Standard QWERTY layer with CAPS lock mapped to ESC. ESC is a Layer toggle, when held down it maps to KDE-specific MOVE layer. Dedicated Function key for ADJUST layer. I also take advantage of the AG_SWAP when using this keyboard on Linux, which swaps between ALT and GUI on both sides. + +Mac layer: Mostly the same as the default layer, except that the ESC key maps to a MacOS specific set of MOVE layer shortcuts. These leverage a piece of software called Rectangle, which makes up for some of the tiling shortcomings of MacOS. + +### MOVE layer +OS-specific convenience shortcuts. Macros are defined to make it easier to adapt these to other operating systems. The macros also help maintain the spacing that helps with the readability of the layers in source control. + +The main goal of the MOVE layer is to manage window move and resize, and jump to a specific virtual desktop. The other function is to expose VIM-style move keys as arrow keys to other applications. Some keys from ADJUST layer are also redefined here. + +Care was taken to keep the tiling and virtual desktop shortcuts as similar as possible between Linux and MacOS in this MOVE layer. The most notable difference is that I haven't found a good way to do corner tiling in Linux the way that it's supported in MacOS Rectangle. + +REMINDER: The 9-key left-hand pattern requires the installation of the MacOS rectangle app: + +```bash +brew cask install rectangle +``` + +### ADJUST layer +Access to function keys as well as media controls and keyboard settings. Some useful OS action keys are defined here as well. + +### Config layer +Access to Quantum keyboard controls as well as RGB configuration. If audio is supported it would belong in this layer as well. diff --git a/users/badger/badger.c b/users/badger/badger.c new file mode 100644 index 000000000000..455184061046 --- /dev/null +++ b/users/badger/badger.c @@ -0,0 +1,49 @@ +/* +Copyright 2020 Dan White + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ +#include "badger.h" + +bool _capsLockState; + +__attribute__ ((weak)) +void keyboard_post_init_user(void) { + _capsLockState = false; +} + +__attribute__ ((weak)) +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case CS_RIGHT: + if (record->event.pressed) { + SEND_STRING(SS_LALT(SS_TAP(X_B)SS_TAP(X_ENTER))); + return false; + } + break; + case CS_DOWN: + if (record->event.pressed) { + SEND_STRING(SS_LALT(SS_TAP(X_V)SS_TAP(X_ENTER))); + return false; + } + break; + case KC_CAPS: + if (record->event.pressed) { + _capsLockState = !_capsLockState; + return true; + } + break; + default: + return true; + } + return true; +} diff --git a/users/badger/badger.h b/users/badger/badger.h new file mode 100644 index 000000000000..bb2dcd0bd3a8 --- /dev/null +++ b/users/badger/badger.h @@ -0,0 +1,109 @@ +/* +Copyright 2020 Dan White + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License 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 layers { + _QWERTY_MAC, + _MOVE_MAC, + _QWERTY_LINUX, + _MOVE_LINUX, + _ADJUST, + _CONFIG +}; + +enum CustomKeys { + CS_RIGHT = SAFE_RANGE, + CS_DOWN +}; + +#define OS_POP LCTL(KC_F10) +#define MAC_POP LCTL(KC_UP) +#define MAC_FRC LGUI(LALT(KC_ESC)) +#define OS_COPY LSFT(LCTL(KC_C)) +#define OS_PAST LSFT(LCTL(KC_V)) +#define MAC_PST LGUI(KC_V) +#define MAC_CPY LGUI(KC_C) +#define KC_BACK LCTL(LSFT(KC_LBRC)) +#define KC_NEXT LCTL(LSFT(KC_RBRC)) + +#define MOVE LT(_MOVE_LINUX, KC_ESC) +#define MOVE_MAC LT(_MOVE_MAC, KC_ESC) +#define ADJUST MO(_ADJUST) +#define CFG_MAC LT(_CONFIG, MAC_POP) +#define CFG_LNX LT(_CONFIG, OS_POP) + +#define WD_BACK LALT(KC_LEFT) +#define WD_FRWD LALT(KC_RIGHT) + +#define VD_1 LCTL(KC_F1) +#define VD_2 LCTL(KC_F2) +#define VD_3 LCTL(KC_F3) + +#define WM_UH LGUI(KC_UP) +#define WM_BH LGUI(KC_DOWN) +#define WM_LH LGUI(KC_LEFT) +#define WM_RH LGUI(KC_RIGHT) +#define WM_MAX LGUI(KC_PGUP) + +#define CM_RIGHT LGUI(KC_D) +#define CM_DOWN LGUI(LSFT(KC_D)) + +/* THESE are not defaults in KDE and must be set manually */ +#define WM_VD1 HYPR(KC_1) +#define WM_VD2 HYPR(KC_2) +#define WM_VD3 HYPR(KC_3) + +/* IntelliJ / JetBrains shortcuts with Mac keymap */ +#define IJ_BACK LGUI(LALT(KC_LEFT)) +#define IJ_FWD LGUI(LALT(KC_RIGHT)) +#define IJ_UP LGUI(LALT(KC_UP)) +#define IJ_DOWN LGUI(LALT(KC_DOWN)) +#define IJ_IMPL LGUI(LALT(KC_B)) +#define IJ_DECL LGUI(KC_B) +#define IJ_REN LSFT(KC_F6) +#define IJ_USAG LALT(KC_F7) +#define IJ_RUN KC_F9 +#define IJ_STEP KC_F8 +#define IJ_INTO LSFT(KC_F7) +#define IJ_OUT LSFT(KC_F8) +#define IJ_STOP LGUI(KC_F2) +#define IJ_IMPS LCTL(LALT(LSFT(KC_EQUAL))) +#define IJ_IMPH LCTL(LALT(LSFT(KC_MINUS))) +#define IJ_TOP LGUI(KC_HOME) +#define IJ_BOTT LGUI(KC_END) +#define IJ_FIND LGUI(LSFT(KC_F)) + +/* MacOS virtual desktop shortcuts */ +#define M_VD1 LCTL(KC_1) +#define M_VD2 LCTL(KC_2) +#define M_VD3 LCTL(KC_3) + +/* rectangle shortcuts */ +#define MM_ULCN LCTL(LGUI(KC_LEFT)) +#define MM_URCN LCTL(LGUI(KC_RIGHT)) +#define MM_LLCN LCTL(LSFT(LGUI(KC_LEFT))) +#define MM_LRCN LCTL(LSFT(LGUI(KC_RIGHT))) +#define MM_MAX LALT(LGUI(KC_F)) +#define MM_LH HYPR(KC_LBRC) +#define MM_RH HYPR(KC_RBRC) +#define MM_UH LALT(LGUI(KC_UP)) +#define MM_BH LALT(LGUI(KC_DOWN)) +#define MM_LEFT LCTL(LALT(LGUI(KC_LEFT))) +#define MM_RGHT LCTL(LALT(LGUI(KC_RIGHT))) + +#define DF_1 DF(_QWERTY_MAC) +#define DF_2 DF(_QWERTY_LINUX) diff --git a/users/badger/ortho.c b/users/badger/ortho.c new file mode 100644 index 000000000000..ff84e1706f06 --- /dev/null +++ b/users/badger/ortho.c @@ -0,0 +1,151 @@ +/* +Copyright 2020 Dan White + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ +#include "ortho.h" +#include "badger.h" + +int _currentLayer; +bool _capsLock; + +#ifdef AUDIO_ENABLE +float capsOnSong[][2] = SONG(CAPS_ON); +float capsOffSong[][2] = SONG(CAPS_OFF); +float defaultLayerSong[][2] = SONG(QWERTY_LAYER_SONG); +float moveLayerSong[][2] = SONG(MOVE_LAYER_SONG); +float macLayerSong[][2] = SONG(MAC_LAYER_SONG); +float raiseLayerSong[][2] = SONG(RAISE_LAYER_SONG); +float lowerLayerSong[][2] = SONG(LOWER_LAYER_SONG); +float agSwapSong[][2] = SONG(LONG_AG_SWAP); +float agNormSong[][2] = SONG(LONG_AG_NORM); +#endif + +__attribute__ ((weak)) +void keyboard_post_init_user(void) { + _capsLock = false; + _currentLayer = _QWERTY_MAC_ORTHO; + layer_on(_currentLayer); +} + +__attribute__ ((weak)) +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + dprintf("Key event recorded. KEYCODE: %u , event: %u\n", keycode, record->event.pressed); + switch (keycode) { + case CS_RIGHT: + if (record->event.pressed) { + SEND_STRING(SS_LALT(SS_TAP(X_B)SS_TAP(X_ENTER))); + return false; + } + break; + case CS_DOWN: + if (record->event.pressed) { + SEND_STRING(SS_LALT(SS_TAP(X_V)SS_TAP(X_ENTER))); + return false; + } + break; + case KC_CAPS: + if (record->event.pressed) { + dprintf("CAPS_LOCK state: %u\n", _capsLock); + _capsLock = !_capsLock; + #ifdef AUDIO_ENABLE + _capsLock ? PLAY_SONG(capsOnSong) : PLAY_SONG(capsOffSong); + #endif + return true; + } + break; + case AG_SWAP: + #ifdef AUDIO_ENABLE + PLAY_SONG(agSwapSong); + #endif + return true; + break; + case AG_NORM: + #ifdef AUDIO_ENABLE + PLAY_SONG(agNormSong); + #endif + return true; + break; + case KC_MAC2: + if (record->event.pressed) { + SEND_STRING("ll\n"); + return false; + } + break; + case KC_MAC1: + if (record->event.pressed) { + SEND_STRING("open https://www.reddit.com/r/mechanicalkeyboards\n"); + return false; + } + break; + case KC_FIRST: + if (record->event.pressed) { + // don't turn off the QWERTY layer + if (_currentLayer != _QWERTY_MAC_ORTHO) { + layer_off(_currentLayer); + } + _currentLayer = _QWERTY_MAC_ORTHO; + layer_on(_currentLayer); + playSongForLayer(_currentLayer); + return false; + } + break; + case KC_LYRC: + if (record->event.pressed) { + dprintf("LYR CYCLE pressed %u, CURRENT_LAYER: %u\n", keycode, _currentLayer); + // don't turn off the QWERTY layer or the ADJUST layer + if (_currentLayer != _QWERTY_MAC_ORTHO) { + layer_off(_currentLayer); + } + // don't lock the ADJUST layer + // since this key is accessible via the ADJUST + // layer, as it will require tricky state management + if (++_currentLayer == _ADJUST_ORTHO) { + _currentLayer = _QWERTY_MAC_ORTHO; + } else { + layer_on(_currentLayer); + } + + playSongForLayer(_currentLayer); + return false; + } + break; + } + return true; +} + +void playSongForLayer(int currentLayer) { + #ifdef AUDIO_ENABLE + switch (currentLayer) { + case _QWERTY_LINUX: + PLAY_SONG(defaultLayerSong); + break; + case _MOVE_LINUX: + PLAY_SONG(moveLayerSong); + break; + case _QWERTY_MAC: + PLAY_SONG(macLayerSong); + break; + case _MOVE_MAC: + PLAY_SONG(moveLayerSong); + break; + case _RAISE: + PLAY_SONG(raiseLayerSong); + break; + case _LOWER: + PLAY_SONG(lowerLayerSong); + break; + default: + break; + } + #endif +} \ No newline at end of file diff --git a/users/badger/ortho.h b/users/badger/ortho.h new file mode 100644 index 000000000000..207f2e2822ec --- /dev/null +++ b/users/badger/ortho.h @@ -0,0 +1,58 @@ +/* +Copyright 2020 Dan White + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License 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 "badger.h" + +enum OrthoLayers { + _QWERTY_MAC_ORTHO, + _MOVE_MAC_ORTHO, + _QWERTY_LINUX_ORTHO, + _MOVE_LINUX_ORTHO, + _RAISE, + _LOWER, + _ADJUST_ORTHO +}; + +enum OrthoKeys { + KC_MAC1 = CS_DOWN + 1, + KC_MAC2, + KC_LYRC, + KC_FIRST +}; + +#define P_ADJ LT(_ADJUST_ORTHO, KC_BSPC) +#define RAISE MO(_RAISE) +#define LOWER MO(_LOWER) +#define MOMAC LT(_MOVE_MAC_ORTHO, KC_ESC) +#define MOLNX LT(_MOVE_LINUX_ORTHO, KC_ESC) + +void playSongForLayer(int currentLayer); + +#ifdef AUDIO_ENABLE +#define QWERTY_LAYER_SONG H__NOTE(_G6), H__NOTE(_D6), Q__NOTE(_A5), Q__NOTE(_E5), +#define MAC_LAYER_SONG H__NOTE(_E5), H__NOTE(_A5), Q__NOTE(_D6), Q__NOTE(_G6), \ + ED_NOTE(_E7), E__NOTE(_CS7), E__NOTE(_E6), E__NOTE(_A6), M__NOTE(_CS7, 20), +#define LONG_AG_SWAP Q__NOTE(_G5), Q__NOTE(_D6), Q__NOTE(_A6), Q__NOTE(_E7), \ + SD_NOTE(_B5), SD_NOTE(_A5), SD_NOTE(_B5), SD_NOTE(_A5), +#define LONG_AG_NORM Q__NOTE(_DS4), Q__NOTE(_DS4), B__NOTE(_C5), +#define MOVE_LAYER_SONG E__NOTE(_GS6), E__NOTE(_A6), S__NOTE(_REST), ED_NOTE(_E7), \ + S__NOTE(_REST), ED_NOTE(_GS7), +#define RAISE_LAYER_SONG W__NOTE(_BF5), Q__NOTE(_A5), W__NOTE(_BF5), Q__NOTE(_A5), W__NOTE(_E6), Q__NOTE(_B5), +#define LOWER_LAYER_SONG Q__NOTE(_DS4), E__NOTE(_DS4), E__NOTE(_DS6), Q__NOTE(_DS5), \ + E__NOTE(_DS5), E__NOTE(_DS6), Q__NOTE(_E5), E__NOTE(_E5), E__NOTE(_DS6), Q__NOTE(_DS5), +#define CAPS_ON W__NOTE(_E5), Q__NOTE(_BF5), W__NOTE(_E5), Q__NOTE(_BF5), W__NOTE(_E5), Q__NOTE(_BF5), +#define CAPS_OFF W__NOTE(_E5), Q__NOTE(_BF5), +#endif diff --git a/users/badger/rules.mk b/users/badger/rules.mk new file mode 100644 index 000000000000..4f1507b8f318 --- /dev/null +++ b/users/badger/rules.mk @@ -0,0 +1,2 @@ +SRC += badger.c +SRC += ortho.c From f37a134f712891db64b1391a250b0d752206f520 Mon Sep 17 00:00:00 2001 From: Drashna Jaelre Date: Thu, 17 Sep 2020 00:41:55 -0700 Subject: [PATCH 793/930] [Keyboard] Convert Corne Keyboard to Split Common (#6001) * [Keyboard] Convert Corne Keyboard to Split Common * Add VIA Support * Makes sure that ol(e)d and new OLED implementation can't coexist * Add licensing header to files * Add changes based on feedback from foostan * Fixes --- keyboards/crkbd/config.h | 54 ++- keyboards/crkbd/crkbd.c | 26 +- keyboards/crkbd/crkbd.h | 21 +- keyboards/crkbd/keymaps/default/keymap.c | 18 + keyboards/crkbd/keymaps/oled_sample/config.h | 48 +++ keyboards/crkbd/keymaps/oled_sample/keymap.c | 208 ++++++++++ keyboards/crkbd/keymaps/oled_sample/rules.mk | 7 + keyboards/crkbd/rev1/common/common.c | 21 + keyboards/crkbd/rev1/common/common.h | 24 ++ keyboards/crkbd/rev1/common/config.h | 30 ++ .../crkbd/rev1/common/keymaps/via/config.h | 46 +++ .../crkbd/rev1/common/keymaps/via/keymap.c | 193 ++++++++++ .../crkbd/rev1/common/keymaps/via/rules.mk | 5 + keyboards/crkbd/rev1/common/rules.mk | 2 + keyboards/crkbd/rev1/common/ssd1306.c | 360 ++++++++++++++++++ keyboards/crkbd/rev1/config.h | 61 +-- keyboards/crkbd/rev1/legacy/config.h | 23 ++ keyboards/crkbd/{ => rev1/legacy}/i2c.c | 2 +- keyboards/crkbd/{ => rev1/legacy}/i2c.h | 0 keyboards/crkbd/rev1/legacy/legacy.c | 19 + keyboards/crkbd/rev1/legacy/legacy.h | 21 + keyboards/crkbd/rev1/{ => legacy}/matrix.c | 0 keyboards/crkbd/rev1/legacy/post_config.h | 27 ++ keyboards/crkbd/rev1/legacy/rules.mk | 7 + keyboards/crkbd/{ => rev1/legacy}/serial.c | 0 keyboards/crkbd/{ => rev1/legacy}/serial.h | 0 keyboards/crkbd/rev1/legacy/serial_config.h | 22 ++ .../rev1/legacy/serial_config_simpleapi.h | 23 ++ .../crkbd/rev1/{ => legacy}/split_scomm.c | 18 + .../crkbd/rev1/{ => legacy}/split_scomm.h | 18 + .../crkbd/rev1/{ => legacy}/split_util.c | 22 +- keyboards/crkbd/rev1/legacy/split_util.h | 37 ++ keyboards/crkbd/{ => rev1/legacy}/ssd1306.c | 12 +- keyboards/crkbd/rev1/rev1.c | 32 +- keyboards/crkbd/rev1/rev1.h | 42 +- keyboards/crkbd/rev1/rules.mk | 6 +- keyboards/crkbd/rev1/serial_config.h | 4 - .../crkbd/rev1/serial_config_simpleapi.h | 5 - keyboards/crkbd/rev1/split_util.h | 19 - keyboards/crkbd/{ => rev1}/ssd1306.h | 0 keyboards/crkbd/rules.mk | 8 +- 41 files changed, 1359 insertions(+), 132 deletions(-) create mode 100644 keyboards/crkbd/keymaps/oled_sample/config.h create mode 100644 keyboards/crkbd/keymaps/oled_sample/keymap.c create mode 100644 keyboards/crkbd/keymaps/oled_sample/rules.mk create mode 100644 keyboards/crkbd/rev1/common/common.c create mode 100644 keyboards/crkbd/rev1/common/common.h create mode 100644 keyboards/crkbd/rev1/common/config.h create mode 100644 keyboards/crkbd/rev1/common/keymaps/via/config.h create mode 100644 keyboards/crkbd/rev1/common/keymaps/via/keymap.c create mode 100644 keyboards/crkbd/rev1/common/keymaps/via/rules.mk create mode 100644 keyboards/crkbd/rev1/common/rules.mk create mode 100644 keyboards/crkbd/rev1/common/ssd1306.c create mode 100644 keyboards/crkbd/rev1/legacy/config.h rename keyboards/crkbd/{ => rev1/legacy}/i2c.c (98%) rename keyboards/crkbd/{ => rev1/legacy}/i2c.h (100%) create mode 100644 keyboards/crkbd/rev1/legacy/legacy.c create mode 100644 keyboards/crkbd/rev1/legacy/legacy.h rename keyboards/crkbd/rev1/{ => legacy}/matrix.c (100%) create mode 100644 keyboards/crkbd/rev1/legacy/post_config.h create mode 100644 keyboards/crkbd/rev1/legacy/rules.mk rename keyboards/crkbd/{ => rev1/legacy}/serial.c (100%) rename keyboards/crkbd/{ => rev1/legacy}/serial.h (100%) create mode 100644 keyboards/crkbd/rev1/legacy/serial_config.h create mode 100644 keyboards/crkbd/rev1/legacy/serial_config_simpleapi.h rename keyboards/crkbd/rev1/{ => legacy}/split_scomm.c (79%) rename keyboards/crkbd/rev1/{ => legacy}/split_scomm.h (51%) rename keyboards/crkbd/rev1/{ => legacy}/split_util.c (76%) create mode 100644 keyboards/crkbd/rev1/legacy/split_util.h rename keyboards/crkbd/{ => rev1/legacy}/ssd1306.c (99%) delete mode 100644 keyboards/crkbd/rev1/serial_config.h delete mode 100644 keyboards/crkbd/rev1/serial_config_simpleapi.h delete mode 100644 keyboards/crkbd/rev1/split_util.h rename keyboards/crkbd/{ => rev1}/ssd1306.h (100%) diff --git a/keyboards/crkbd/config.h b/keyboards/crkbd/config.h index fb1cdf3962a1..a2dd710714b7 100644 --- a/keyboards/crkbd/config.h +++ b/keyboards/crkbd/config.h @@ -1,6 +1,6 @@ /* -Copyright 2012 Jun Wako -Copyright 2015 Jack Humbert +Copyright 2019 @foostan +Copyright 2020 Drashna Jaelre <@drashna> This 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,9 +19,55 @@ along with this program. If not, see . #pragma once #include "config_common.h" -#include -#define USE_I2C +/* USB Device descriptor parameter */ +#define VENDOR_ID 0x4653 +#define PRODUCT_ID 0x0001 +#define DEVICE_VER 0x0001 +#define MANUFACTURER foostan + +/* key matrix size */ +// Rows are doubled-up +#define MATRIX_ROWS 8 +#define MATRIX_COLS 6 +#define MATRIX_ROW_PINS { D4, C6, D7, E6 } + +// wiring of each half +#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 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 + + +/* + * 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 USE_SERIAL #define NO_ACTION_MACRO diff --git a/keyboards/crkbd/crkbd.c b/keyboards/crkbd/crkbd.c index 7417ad604788..af0ef8a345b6 100644 --- a/keyboards/crkbd/crkbd.c +++ b/keyboards/crkbd/crkbd.c @@ -1,9 +1,19 @@ -#include "crkbd.h" +/* +Copyright 2019 @foostan +Copyright 2020 Drashna Jaelre <@drashna> + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. -bool process_record_kb(uint16_t keycode, keyrecord_t *record) { -#ifdef SSD1306OLED - return process_record_gfx(keycode,record) && process_record_user(keycode, record); -#else - return process_record_user(keycode, record); -#endif -} +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#include "crkbd.h" diff --git a/keyboards/crkbd/crkbd.h b/keyboards/crkbd/crkbd.h index 73f2a3f07462..4ba9397043da 100644 --- a/keyboards/crkbd/crkbd.h +++ b/keyboards/crkbd/crkbd.h @@ -1,5 +1,24 @@ +/* +Copyright 2019 @foostan +Copyright 2020 Drashna Jaelre <@drashna> + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ #pragma once #ifdef KEYBOARD_crkbd_rev1 - #include "rev1.h" +# include "rev1.h" #endif + +#include "quantum.h" diff --git a/keyboards/crkbd/keymaps/default/keymap.c b/keyboards/crkbd/keymaps/default/keymap.c index 4dd0be899274..a3a9d9535102 100644 --- a/keyboards/crkbd/keymaps/default/keymap.c +++ b/keyboards/crkbd/keymaps/default/keymap.c @@ -1,3 +1,21 @@ +/* +Copyright 2019 @foostan +Copyright 2020 Drashna Jaelre <@drashna> + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public 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 diff --git a/keyboards/crkbd/keymaps/oled_sample/config.h b/keyboards/crkbd/keymaps/oled_sample/config.h new file mode 100644 index 000000000000..41568c5916bc --- /dev/null +++ b/keyboards/crkbd/keymaps/oled_sample/config.h @@ -0,0 +1,48 @@ +/* +Copyright 2019 @foostan +Copyright 2020 Drashna Jaelre <@drashna> + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License 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 +#ifdef KEYBOARD_crkbd_rev1_common +# undef USE_I2C +# define USE_SERIAL +#endif + +/* Select hand configuration */ + +#define MASTER_LEFT +// #define MASTER_RIGHT +// #define EE_HANDS + +#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 + +#define OLED_FONT_H "keyboards/crkbd/lib/glcdfont.c" diff --git a/keyboards/crkbd/keymaps/oled_sample/keymap.c b/keyboards/crkbd/keymaps/oled_sample/keymap.c new file mode 100644 index 000000000000..f2d5770b63e7 --- /dev/null +++ b/keyboards/crkbd/keymaps/oled_sample/keymap.c @@ -0,0 +1,208 @@ +/* +Copyright 2019 @foostan +Copyright 2020 Drashna Jaelre <@drashna> + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public 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. +enum crkbd_layers { + _QWERTY, + _LOWER, + _RAISE, + _ADJUST, +}; + + +#define RAISE MO(_RAISE) +#define LOWER MO(_LOWER) +#define CTLTB CTL_T(KC_TAB) +#define GUIEI GUI_T(KC_LANG2) +#define ALTKN ALT_T(KC_LANG1) + +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, + CTLTB, 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, + GUIEI, LOWER, KC_SPC, KC_ENT, RAISE, ALTKN + ), + + [_LOWER] = 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, + CTLTB, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, XXXXXXX, + KC_LSFT, KC_F11, KC_F12, KC_F13, KC_F14, KC_F15, KC_F16, KC_F17, KC_F18, KC_F19, KC_F20, XXXXXXX, + GUIEI, LOWER, KC_SPC, KC_ENT, RAISE, ALTKN + ), + + [_RAISE] = 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, + CTLTB, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, 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, + GUIEI, LOWER, KC_SPC, KC_ENT, RAISE, ALTKN + + ), + + [_ADJUST] = LAYOUT( + RESET, 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, + RGB_MOD, RGB_HUD, RGB_SAD, RGB_VAD, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + GUIEI, LOWER, KC_SPC, KC_ENT, RAISE, ALTKN + ) +}; + +layer_state_t layer_state_set_user(layer_state_t state) { + state = update_tri_layer_state(state, _RAISE, _LOWER, _ADJUST); + return state; +} + + +#ifdef OLED_DRIVER_ENABLE +oled_rotation_t oled_init_user(oled_rotation_t rotation) { + if (is_keyboard_master()) { + return OLED_ROTATION_270; + } else { + return rotation; + } +} + +void render_crkbd_logo(void) { + static const char PROGMEM crkbd_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(crkbd_logo, false); +} + +# define KEYLOG_LEN 5 +char keylog_str[KEYLOG_LEN] = {}; +uint8_t keylogs_str_idx = 0; +uint16_t log_timer = 0; + +const char code_to_name[60] = { + ' ', ' ', ' ', ' ', 'a', 'b', 'c', 'd', 'e', 'f', + 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', + 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', + '1', '2', '3', '4', '5', '6', '7', '8', '9', '0', + 'R', 'E', 'B', 'T', '_', '-', '=', '[', ']', '\\', + '#', ';', '\'', '`', ',', '.', '/', ' ', ' ', ' '}; + +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 = keycode & 0xFF; + } + + for (uint8_t i = KEYLOG_LEN - 1; i > 0; i--) { + keylog_str[i] = keylog_str[i - 1]; + } + if (keycode < 60) { + keylog_str[0] = code_to_name[keycode]; + } + keylog_str[KEYLOG_LEN - 1] = 0; + + log_timer = timer_read(); +} + +void update_log(void) { + if (timer_elapsed(log_timer) > 750) { + add_keylog(0); + } +} + +void render_keylogger_status(void) { + oled_write_P(PSTR("KLogr"), 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; + } +} + +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)); +} + +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_status_main(void) { + /* Show Keyboard Layout */ + render_default_layer_state(); + render_keylock_status(host_keyboard_leds()); + render_mod_status(get_mods()); + render_bootmagic_status(); + + render_keylogger_status(); +} + +void oled_task_user(void) { + update_log(); + if (is_master) { + render_status_main(); // Renders the current keyboard state (layer, lock, caps, scroll, etc) + } else { + render_crkbd_logo(); + } +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + if (record->event.pressed) { + add_keylog(keycode); + } + return true; +} +#endif diff --git a/keyboards/crkbd/keymaps/oled_sample/rules.mk b/keyboards/crkbd/keymaps/oled_sample/rules.mk new file mode 100644 index 000000000000..fb480bba88c9 --- /dev/null +++ b/keyboards/crkbd/keymaps/oled_sample/rules.mk @@ -0,0 +1,7 @@ + +# 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 +# +RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. +OLED_DRIVER_ENABLE = yes diff --git a/keyboards/crkbd/rev1/common/common.c b/keyboards/crkbd/rev1/common/common.c new file mode 100644 index 000000000000..5ea7347de884 --- /dev/null +++ b/keyboards/crkbd/rev1/common/common.c @@ -0,0 +1,21 @@ +/* +Copyright 2019 @foostan +Copyright 2020 Drashna Jaelre <@drashna> + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#include "common.h" + +uint8_t is_master; diff --git a/keyboards/crkbd/rev1/common/common.h b/keyboards/crkbd/rev1/common/common.h new file mode 100644 index 000000000000..af1795f48086 --- /dev/null +++ b/keyboards/crkbd/rev1/common/common.h @@ -0,0 +1,24 @@ +/* +Copyright 2019 @foostan +Copyright 2020 Drashna Jaelre <@drashna> + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License 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 "rev1.h" + +#define has_usb() is_keyboard_master() +extern uint8_t is_master; diff --git a/keyboards/crkbd/rev1/common/config.h b/keyboards/crkbd/rev1/common/config.h new file mode 100644 index 000000000000..12f5f7576649 --- /dev/null +++ b/keyboards/crkbd/rev1/common/config.h @@ -0,0 +1,30 @@ +/* +Copyright 2019 @foostan +Copyright 2020 Drashna Jaelre <@drashna> + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License 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 PRODUCT Corne Keyboard Rev.1 (Split Common) + +#define USE_SERIAL +#define SOFT_SERIAL_PIN D2 + +#ifdef RGB_MATRIX_ENABLE +# define RGB_MATRIX_SPLIT { 27, 27 } +#endif + +#define DIODE_DIRECTION COL2ROW diff --git a/keyboards/crkbd/rev1/common/keymaps/via/config.h b/keyboards/crkbd/rev1/common/keymaps/via/config.h new file mode 100644 index 000000000000..aa2d45e56d43 --- /dev/null +++ b/keyboards/crkbd/rev1/common/keymaps/via/config.h @@ -0,0 +1,46 @@ +/* +Copyright 2019 @foostan +Copyright 2020 Drashna Jaelre <@drashna> + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License 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 +#ifdef KEYBOARD_crkbd_rev1_legacy +# undef USE_I2C +# define USE_SERIAL +#endif + +/* Select hand configuration */ + +#define MASTER_LEFT +// #define MASTER_RIGHT +// #define EE_HANDS + +#define USE_SERIAL_PD2 + + +#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 + +#define OLED_FONT_H "keyboards/crkbd/lib/glcdfont.c" diff --git a/keyboards/crkbd/rev1/common/keymaps/via/keymap.c b/keyboards/crkbd/rev1/common/keymaps/via/keymap.c new file mode 100644 index 000000000000..a3b2e52ce556 --- /dev/null +++ b/keyboards/crkbd/rev1/common/keymaps/via/keymap.c @@ -0,0 +1,193 @@ +/* +Copyright 2019 @foostan +Copyright 2020 Drashna Jaelre <@drashna> + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public 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_split_3x6_3( \ + //,-----------------------------------------------------. ,-----------------------------------------------------. + 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_ESC, + //|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| + KC_LGUI, FN_MO13, KC_SPC, KC_ENT, FN_MO23, KC_RALT + //`--------------------------' `--------------------------' + + ), + + [1] = LAYOUT_split_3x6_3( \ + //,-----------------------------------------------------. ,-----------------------------------------------------. + 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_LCTL, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_LEFT, KC_DOWN, KC_UP,KC_RIGHT, XXXXXXX, XXXXXXX, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + KC_LSFT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + //|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| + KC_LGUI, _______, KC_SPC, KC_ENT, _______, KC_RALT\ + //`--------------------------' `--------------------------' + ), + + [2] = LAYOUT_split_3x6_3( \ + //,-----------------------------------------------------. ,-----------------------------------------------------. + 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_LCTL, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, KC_GRV, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + KC_LSFT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, KC_TILD, + //|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| + KC_LGUI, _______, KC_SPC, KC_ENT, _______, KC_RALT + //`--------------------------' `--------------------------' + ), + + [3] = LAYOUT_split_3x6_3( \ + //,-----------------------------------------------------. ,-----------------------------------------------------. + RESET, 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,\ + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + RGB_MOD, RGB_HUD, RGB_SAD, RGB_VAD, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,\ + //|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| + KC_LGUI, _______, KC_SPC, KC_ENT, _______, KC_RALT\ + //`--------------------------' `--------------------------' + ) +}; + +#ifdef OLED_DRIVER_ENABLE +oled_rotation_t oled_init_user(oled_rotation_t rotation) { + if (!is_master) { + return OLED_ROTATION_180; // flips the display 180 degrees if offhand + } + return rotation; +} + +#define L_BASE 0 +#define L_LOWER 2 +#define L_RAISE 4 +#define L_ADJUST 8 + +void oled_render_layer_state(void) { + oled_write_P("Layer: ", false); + switch (layer_state) { + case L_BASE: + oled_write_ln_P("Default", false); + break; + case L_LOWER: + oled_write_ln_P("Lower", false); + break; + case L_RAISE: + oled_write_ln_P("Raise", false); + break; + case L_ADJUST: + case L_ADJUST|L_LOWER: + case L_ADJUST|L_RAISE: + case L_ADJUST|L_LOWER|L_RAISE: + oled_write_ln_P("Adjust", false); + break; + } +} + + +char keylog_str[24] = {}; +char keylogs_str[21] = {}; +int keylogs_str_idx = 0; + +const char code_to_name[60] = { + ' ', ' ', ' ', ' ', 'a', 'b', 'c', 'd', 'e', 'f', + 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', + 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', + '1', '2', '3', '4', '5', '6', '7', '8', '9', '0', + 'R', 'E', 'B', 'T', '_', '-', '=', '[', ']', '\\', + '#', ';', '\'', '`', ',', '.', '/', ' ', ' ', ' '}; + +void set_keylog(uint16_t keycode, keyrecord_t *record) { + char name = ' '; + if ((keycode >= QK_MOD_TAP && keycode <= QK_MOD_TAP_MAX) || + (keycode >= QK_LAYER_TAP && keycode <= QK_LAYER_TAP_MAX)) { keycode = keycode & 0xFF; } + if (keycode < 60) { + name = code_to_name[keycode]; + } + + // update keylog + snprintf(keylog_str, sizeof(keylog_str), "%dx%d, k%2d : %c", + record->event.key.row, record->event.key.col, + keycode, name); + + // update keylogs + if (keylogs_str_idx == sizeof(keylogs_str) - 1) { + keylogs_str_idx = 0; + for (int i = 0; i < sizeof(keylogs_str) - 1; i++) { + keylogs_str[i] = ' '; + } + } + + keylogs_str[keylogs_str_idx] = name; + keylogs_str_idx++; +} + +void oled_render_keylog(void) { + oled_write(keylog_str, false); +} +void oled_render_keylogs(void) { + oled_write(keylogs_str, false); +} + +void render_bootmagic_status(bool status) { + /* Show Ctrl-Gui Swap options */ + static const char PROGMEM logo[][2][3] = { + {{0x97, 0x98, 0}, {0xb7, 0xb8, 0}}, + {{0x95, 0x96, 0}, {0xb5, 0xb6, 0}}, + }; + if (status) { + oled_write_ln_P(logo[0][0], false); + oled_write_ln_P(logo[0][1], false); + } else { + oled_write_ln_P(logo[1][0], false); + oled_write_ln_P(logo[1][1], false); + } +} + +void oled_render_logo(void) { + static const char PROGMEM crkbd_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(crkbd_logo, false); +} + +void oled_task_user(void) { + if (is_master) { + oled_render_layer_state(); + oled_render_keylog(); + // oled_render_keylogs(); + // oled_renger_bootmagic_icon(keymap_config.swap_lalt_lgui); + } else { + oled_render_logo(); + } +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + if (record->event.pressed) { + set_keylog(keycode, record); + // set_timelog(); + } + return true; +} +#endif // OLED_DRIVER_ENABLE diff --git a/keyboards/crkbd/rev1/common/keymaps/via/rules.mk b/keyboards/crkbd/rev1/common/keymaps/via/rules.mk new file mode 100644 index 000000000000..93b2afed4470 --- /dev/null +++ b/keyboards/crkbd/rev1/common/keymaps/via/rules.mk @@ -0,0 +1,5 @@ +MOUSEKEY_ENABLE = no # Mouse keys +RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. +VIA_ENABLE = yes # Enable VIA +OLED_DRIVER_ENABLE = yes +LTO_ENABLE = yes diff --git a/keyboards/crkbd/rev1/common/rules.mk b/keyboards/crkbd/rev1/common/rules.mk new file mode 100644 index 000000000000..0b8106e3f295 --- /dev/null +++ b/keyboards/crkbd/rev1/common/rules.mk @@ -0,0 +1,2 @@ +SPLIT_KEYBOARD = yes +SPLIT_TRANSPORT = mirror # for when Split Mirroring drops, it will maintain mirroring functionality diff --git a/keyboards/crkbd/rev1/common/ssd1306.c b/keyboards/crkbd/rev1/common/ssd1306.c new file mode 100644 index 000000000000..4a889da6738f --- /dev/null +++ b/keyboards/crkbd/rev1/common/ssd1306.c @@ -0,0 +1,360 @@ +#ifdef SSD1306OLED + +#include "ssd1306.h" +#include "i2c_master.h" +#include +#include "print.h" +#ifdef ADAFRUIT_BLE_ENABLE +#include "adafruit_ble.h" +#endif +#ifdef PROTOCOL_LUFA +#include "lufa.h" +#endif +#include "sendchar.h" +#include "timer.h" + +struct CharacterMatrix display; + +extern const unsigned char font[] PROGMEM; + +#ifndef OLED_BLANK_CHAR +#define OLED_BLANK_CHAR ' ' +#endif + +#ifndef OLED_BITS_FILTER +#define OLED_BITS_FILTER +#endif + +// 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 +#ifndef ScreenOffInterval +#define ScreenOffInterval 60000 /* milliseconds */ +#endif + +#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(SSD1306_ADDRESS, 100)) { + xprintf("failed to start write to %d\n", SSD1306_ADDRESS); + goto done; + } + + if (i2c_write(0x0 /* command byte follows */, 100)) { + print("failed to write control byte\n"); + + goto done; + } + + if (i2c_write(cmd, 100)) { + xprintf("failed to write command %d\n", cmd); + goto done; + } + res = true; +done: + i2c_stop(); + return res; +} + +#define send_cmd1(c) if (!_send_cmd1(c)) {goto done;} +#define send_cmds(c) if (!_send_cmds(c,sizeof(c))) {goto done;} +#define cmd1(X) X +#define cmd2(X,Y) X,Y +#define cmd3(X,Y,Z) X,Y,Z + +static bool _send_cmds(const uint8_t* p,uint8_t sz) { + for(uint8_t i=sz;i;i--) { + send_cmd1( pgm_read_byte(p++) ); + } + return true; +done: + return false; +} + +#define SEND_CMDS(...) {static const uint8_t _cmds[] PROGMEM = { __VA_ARGS__,0 };send_cmds(_cmds);} + +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_CMDS( + cmd3(PageAddr, 0, (DisplayHeight / 8) - 1), + cmd3(ColumnAddr, 0, DisplayWidth - 1) + ); + + if (i2c_start(SSD1306_ADDRESS, 100)) { + goto done; + } + if (i2c_write(0x40, 100)) { + // Data mode + goto done; + } + for (uint8_t row = MatrixRows;row; row--) { + for (uint8_t col = DisplayWidth; col; col--) { + i2c_write(0, 100); + } + } + + display.dirty = false; + +done: + i2c_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_init(); + SEND_CMDS( + cmd1(DisplayOff), + cmd2(SetDisplayClockDiv, 0x80), + cmd2(SetMultiPlex, DisplayHeight - 1), + cmd2(SetDisplayOffset, 0), + cmd1(SetStartLine | 0x0), + cmd2(SetChargePump, 0x14 /* Enable */), + cmd2(SetMemoryMode, 0 /* horizontal addressing */) + ); + + if(rotate){ + // the following Flip the display orientation 180 degrees + SEND_CMDS( + cmd1(SegRemap), + cmd1(ComScanInc) + ); + }else{ + // Flips the display orientation 0 degrees + SEND_CMDS( + cmd1(SegRemap | 0x1), + cmd1(ComScanDec) + ); + } + + SEND_CMDS( +#ifdef SSD1306_128X64 + cmd2(SetComPins, 0x12), +#else + cmd2(SetComPins, 0x2), +#endif + cmd2(SetContrast, 0x8f), + cmd2(SetPreCharge, 0xf1), + cmd2(SetVComDetect, 0x40), + cmd1(DisplayAllOnResume), + cmd1(NormalDisplay), + cmd1(DeActivateScroll), + cmd1(DisplayOn), + + 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, OLED_BLANK_CHAR, 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, OLED_BLANK_CHAR); + } + 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) { + while (*data) { + matrix_write_char(matrix, *data); + ++data; + } +} + +void matrix_write_ln(struct CharacterMatrix *matrix, const char *data) { + matrix_write(matrix, data); + matrix_write(matrix, "\n"); +} + +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, OLED_BLANK_CHAR, 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_CMDS( + cmd3(PageAddr, 0, MatrixRows - 1), + cmd3(ColumnAddr, 0, (MatrixCols * FontWidth) - 1) + ); + + if (i2c_write(SSD1306_ADDRESS, 100)) { + goto done; + } + if (i2c_write(0x40, 100)) { + // 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_write(colBits OLED_BITS_FILTER, 100); + } + + // 1 column of space between chars (it's not included in the glyph) + //i2c_master_write(0); + } + } + + matrix->dirty = false; + +done: + i2c_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 (ScreenOffInterval !=0 && 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/crkbd/rev1/config.h b/keyboards/crkbd/rev1/config.h index f7f278f2c0f6..60bd379724eb 100644 --- a/keyboards/crkbd/rev1/config.h +++ b/keyboards/crkbd/rev1/config.h @@ -1,6 +1,6 @@ /* -Copyright 2012 Jun Wako -Copyright 2015 Jack Humbert +Copyright 2019 @foostan +Copyright 2020 Drashna Jaelre <@drashna> This 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,64 +18,15 @@ along with this program. If not, see . #pragma once -/* USB Device descriptor parameter */ -#define VENDOR_ID 0xFEED -#define PRODUCT_ID 0x3060 -#define DEVICE_VER 0x0001 -#define MANUFACTURER foostan -#define PRODUCT Corne Keyboard (crkbd) -#define DESCRIPTION A split keyboard with 3x6 vertically staggered keys and 3 thumb keys - -/* key matrix size */ -// Rows are doubled-up -#define MATRIX_ROWS 8 -#define MATRIX_COLS 6 -#define MATRIX_ROW_PINS { D4, C6, D7, E6 } - -// wiring of each half -#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 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 #ifdef RGBLIGHT_ENABLE -#define RGBLED_NUM 12 // Number of LEDs +# define RGBLED_NUM 12 // Number of LEDs +# define RGBLIGHT_SPLIT #endif #ifdef RGB_MATRIX_ENABLE -#define RGBLED_NUM 54 // Number of LEDs -#define DRIVER_LED_TOTAL RGBLED_NUM +# define RGBLED_NUM 54 // Number of LEDs +# define DRIVER_LED_TOTAL RGBLED_NUM #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/crkbd/rev1/legacy/config.h b/keyboards/crkbd/rev1/legacy/config.h new file mode 100644 index 000000000000..9e3676414c96 --- /dev/null +++ b/keyboards/crkbd/rev1/legacy/config.h @@ -0,0 +1,23 @@ +/* +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 + +#define PRODUCT Corne Keyboard Rev.1 (Legacy Split) diff --git a/keyboards/crkbd/i2c.c b/keyboards/crkbd/rev1/legacy/i2c.c similarity index 98% rename from keyboards/crkbd/i2c.c rename to keyboards/crkbd/rev1/legacy/i2c.c index 4bee5c639829..7b45c3f86664 100644 --- a/keyboards/crkbd/i2c.c +++ b/keyboards/crkbd/rev1/legacy/i2c.c @@ -6,7 +6,7 @@ #include #include "i2c.h" -#ifdef USE_I2C +#if defined(USE_I2C) || defined(USE_MATRIX_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 diff --git a/keyboards/crkbd/i2c.h b/keyboards/crkbd/rev1/legacy/i2c.h similarity index 100% rename from keyboards/crkbd/i2c.h rename to keyboards/crkbd/rev1/legacy/i2c.h diff --git a/keyboards/crkbd/rev1/legacy/legacy.c b/keyboards/crkbd/rev1/legacy/legacy.c new file mode 100644 index 000000000000..595ff1eaf748 --- /dev/null +++ b/keyboards/crkbd/rev1/legacy/legacy.c @@ -0,0 +1,19 @@ +/* +Copyright 2019 @foostan +Copyright 2020 Drashna Jaelre <@drashna> + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#include "legacy.h" diff --git a/keyboards/crkbd/rev1/legacy/legacy.h b/keyboards/crkbd/rev1/legacy/legacy.h new file mode 100644 index 000000000000..6c6308e592c9 --- /dev/null +++ b/keyboards/crkbd/rev1/legacy/legacy.h @@ -0,0 +1,21 @@ +/* +Copyright 2019 @foostan +Copyright 2020 Drashna Jaelre <@drashna> + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License 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 "rev1.h" diff --git a/keyboards/crkbd/rev1/matrix.c b/keyboards/crkbd/rev1/legacy/matrix.c similarity index 100% rename from keyboards/crkbd/rev1/matrix.c rename to keyboards/crkbd/rev1/legacy/matrix.c diff --git a/keyboards/crkbd/rev1/legacy/post_config.h b/keyboards/crkbd/rev1/legacy/post_config.h new file mode 100644 index 000000000000..b3d6346cc8cf --- /dev/null +++ b/keyboards/crkbd/rev1/legacy/post_config.h @@ -0,0 +1,27 @@ +/* +Copyright 2019 @foostan +Copyright 2020 Drashna Jaelre <@drashna> + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#pragma once + +#ifdef SSD1306OLED +# define USE_I2C +#endif + +#if defined(OLED_DRIVER_ENABLE) && (defined(USE_I2C) || defined(USE_MATRIX_I2C)) +# error Cannot use both legacy i2c driver and new i2c_master driver at the same time. Undefine USE_I2C and/or USE_MATRIX_I2C +#endif diff --git a/keyboards/crkbd/rev1/legacy/rules.mk b/keyboards/crkbd/rev1/legacy/rules.mk new file mode 100644 index 000000000000..2bef242977ae --- /dev/null +++ b/keyboards/crkbd/rev1/legacy/rules.mk @@ -0,0 +1,7 @@ +CUSTOM_MATRIX = yes + +SRC += matrix.c \ + split_util.c \ + split_scomm.c + +QUANTUM_LIB_SRC += i2c.c serial.c diff --git a/keyboards/crkbd/serial.c b/keyboards/crkbd/rev1/legacy/serial.c similarity index 100% rename from keyboards/crkbd/serial.c rename to keyboards/crkbd/rev1/legacy/serial.c diff --git a/keyboards/crkbd/serial.h b/keyboards/crkbd/rev1/legacy/serial.h similarity index 100% rename from keyboards/crkbd/serial.h rename to keyboards/crkbd/rev1/legacy/serial.h diff --git a/keyboards/crkbd/rev1/legacy/serial_config.h b/keyboards/crkbd/rev1/legacy/serial_config.h new file mode 100644 index 000000000000..40d11d4de298 --- /dev/null +++ b/keyboards/crkbd/rev1/legacy/serial_config.h @@ -0,0 +1,22 @@ +/* +Copyright 2019 @foostan +Copyright 2020 Drashna Jaelre <@drashna> + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General 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 SOFT_SERIAL_PIN +#define SOFT_SERIAL_PIN D2 +#define SERIAL_USE_MULTI_TRANSACTION +#endif diff --git a/keyboards/crkbd/rev1/legacy/serial_config_simpleapi.h b/keyboards/crkbd/rev1/legacy/serial_config_simpleapi.h new file mode 100644 index 000000000000..bd152ddda34b --- /dev/null +++ b/keyboards/crkbd/rev1/legacy/serial_config_simpleapi.h @@ -0,0 +1,23 @@ +/* +Copyright 2019 @foostan +Copyright 2020 Drashna Jaelre <@drashna> + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License 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 SERIAL_USE_MULTI_TRANSACTION +#define SERIAL_SLAVE_BUFFER_LENGTH MATRIX_ROWS/2 +#define SERIAL_MASTER_BUFFER_LENGTH MATRIX_ROWS/2 diff --git a/keyboards/crkbd/rev1/split_scomm.c b/keyboards/crkbd/rev1/legacy/split_scomm.c similarity index 79% rename from keyboards/crkbd/rev1/split_scomm.c rename to keyboards/crkbd/rev1/legacy/split_scomm.c index 12b00f6840f6..c14bb32a4343 100644 --- a/keyboards/crkbd/rev1/split_scomm.c +++ b/keyboards/crkbd/rev1/legacy/split_scomm.c @@ -1,3 +1,21 @@ +/* +Copyright 2019 @foostan +Copyright 2020 Drashna Jaelre <@drashna> + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + #ifdef USE_SERIAL #ifdef SERIAL_USE_MULTI_TRANSACTION /* --- USE flexible API (using multi-type transaction function) --- */ diff --git a/keyboards/crkbd/rev1/split_scomm.h b/keyboards/crkbd/rev1/legacy/split_scomm.h similarity index 51% rename from keyboards/crkbd/rev1/split_scomm.h rename to keyboards/crkbd/rev1/legacy/split_scomm.h index 873d8939d81f..47f0ca1b9d16 100644 --- a/keyboards/crkbd/rev1/split_scomm.h +++ b/keyboards/crkbd/rev1/legacy/split_scomm.h @@ -1,3 +1,21 @@ +/* +Copyright 2019 @foostan +Copyright 2020 Drashna Jaelre <@drashna> + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General 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 SPLIT_COMM_H #define SPLIT_COMM_H diff --git a/keyboards/crkbd/rev1/split_util.c b/keyboards/crkbd/rev1/legacy/split_util.c similarity index 76% rename from keyboards/crkbd/rev1/split_util.c rename to keyboards/crkbd/rev1/legacy/split_util.c index b642a734cc52..d0fee04ad648 100644 --- a/keyboards/crkbd/rev1/split_util.c +++ b/keyboards/crkbd/rev1/legacy/split_util.c @@ -1,3 +1,21 @@ +/* +Copyright 2019 @foostan +Copyright 2020 Drashna Jaelre <@drashna> + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public 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 @@ -14,7 +32,7 @@ #endif #ifdef USE_MATRIX_I2C -# include "i2c.h" +# include "i2c_master.h" #else # include "split_scomm.h" #endif @@ -81,7 +99,7 @@ __attribute__((weak)) bool has_usb(void) { static void keyboard_master_setup(void) { #ifdef USE_MATRIX_I2C - i2c_master_init(); + i2c_init(); #else serial_master_init(); #endif diff --git a/keyboards/crkbd/rev1/legacy/split_util.h b/keyboards/crkbd/rev1/legacy/split_util.h new file mode 100644 index 000000000000..414763bff268 --- /dev/null +++ b/keyboards/crkbd/rev1/legacy/split_util.h @@ -0,0 +1,37 @@ +/* +Copyright 2019 @foostan +Copyright 2020 Drashna Jaelre <@drashna> + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General 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 SPLIT_KEYBOARD_UTIL_H +#define SPLIT_KEYBOARD_UTIL_H + +#include +#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 diff --git a/keyboards/crkbd/ssd1306.c b/keyboards/crkbd/rev1/legacy/ssd1306.c similarity index 99% rename from keyboards/crkbd/ssd1306.c rename to keyboards/crkbd/rev1/legacy/ssd1306.c index 4ec8a9a00f0a..b04b7e15c1ad 100644 --- a/keyboards/crkbd/ssd1306.c +++ b/keyboards/crkbd/rev1/legacy/ssd1306.c @@ -134,7 +134,7 @@ bool iota_gfx_init(bool rotate) { bool success = false; i2c_master_init(); - SEND_CMDS( + SEND_CMDS( cmd1(DisplayOff), cmd2(SetDisplayClockDiv, 0x80), cmd2(SetMultiPlex, DisplayHeight - 1), @@ -146,19 +146,19 @@ bool iota_gfx_init(bool rotate) { if(rotate){ // the following Flip the display orientation 180 degrees - SEND_CMDS( + SEND_CMDS( cmd1(SegRemap), cmd1(ComScanInc) ); }else{ // Flips the display orientation 0 degrees - SEND_CMDS( + SEND_CMDS( cmd1(SegRemap | 0x1), cmd1(ComScanDec) ); } - SEND_CMDS( + SEND_CMDS( #ifdef SSD1306_128X64 cmd2(SetComPins, 0x12), #else @@ -171,10 +171,10 @@ bool iota_gfx_init(bool rotate) { cmd1(NormalDisplay), cmd1(DeActivateScroll), cmd1(DisplayOn), - + cmd2(SetContrast, 0) // Dim ); - + clear_display(); success = true; diff --git a/keyboards/crkbd/rev1/rev1.c b/keyboards/crkbd/rev1/rev1.c index b26292af5bfd..5e4e6560f00b 100644 --- a/keyboards/crkbd/rev1/rev1.c +++ b/keyboards/crkbd/rev1/rev1.c @@ -1,4 +1,21 @@ -#include "crkbd.h" +/* +Copyright 2019 @foostan +Copyright 2020 Drashna Jaelre <@drashna> + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public 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" #ifdef RGB_MATRIX_ENABLE @@ -68,11 +85,12 @@ led_config_t g_led_config = { { } }; #endif -__attribute__((weak)) -void matrix_init_user(void) {} - void matrix_init_kb(void) { +#ifdef KEYBOARD_crkbd_rev1_common + is_master = (uint8_t)is_keyboard_master(); +#endif + #ifdef RGB_MATRIX_ENABLE if (!isLeftHand) { g_led_config = (led_config_t){ { @@ -107,3 +125,9 @@ void matrix_init_kb(void) { #endif matrix_init_user(); } + +#ifdef SSD1306OLED +bool process_record_kb(uint16_t keycode, keyrecord_t *record) { + return process_record_gfx(keycode,record) && process_record_user(keycode, record); +} +#endif diff --git a/keyboards/crkbd/rev1/rev1.h b/keyboards/crkbd/rev1/rev1.h index 2244b87f177b..ce88068e64af 100644 --- a/keyboards/crkbd/rev1/rev1.h +++ b/keyboards/crkbd/rev1/rev1.h @@ -1,25 +1,41 @@ +/* +Copyright 2019 @foostan +Copyright 2020 Drashna Jaelre <@drashna> + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + #pragma once +extern uint8_t is_master; + #include "crkbd.h" +#if defined(KEYBOARD_crkbd_rev1_legacy) +# include "legacy.h" +#elif defined(KEYBOARD_crkbd_rev1_common) +# include "common.h" +#endif #include "quantum.h" - +#include "split_util.h" #ifdef PROTOCOL_LUFA - #include "lufa.h" - #include "split_util.h" +# include "lufa.h" #endif - #ifdef SSD1306OLED - #include "ssd1306.h" +# include "ssd1306.h" #endif -#ifdef USE_I2C - #include - #ifdef __AVR__ - #include - #include - #endif -#endif // clang-format off #define LAYOUT_split_3x6_3( \ @@ -62,7 +78,7 @@ L20, L21, L22, L23, L24, L25, R20, R21, R22, R23, R24, R25, \ L30, L31, L32, R30, R31, R32 \ ) \ - LAYOUT( \ + LAYOUT_split_3x6_3( \ KC_##L00, KC_##L01, KC_##L02, KC_##L03, KC_##L04, KC_##L05, KC_##R00, KC_##R01, KC_##R02, KC_##R03, KC_##R04, KC_##R05, \ KC_##L10, KC_##L11, KC_##L12, KC_##L13, KC_##L14, KC_##L15, KC_##R10, KC_##R11, KC_##R12, KC_##R13, KC_##R14, KC_##R15, \ KC_##L20, KC_##L21, KC_##L22, KC_##L23, KC_##L24, KC_##L25, KC_##R20, KC_##R21, KC_##R22, KC_##R23, KC_##R24, KC_##R25, \ diff --git a/keyboards/crkbd/rev1/rules.mk b/keyboards/crkbd/rev1/rules.mk index 21cee6bcf719..6bc5a5b03890 100644 --- a/keyboards/crkbd/rev1/rules.mk +++ b/keyboards/crkbd/rev1/rules.mk @@ -1,5 +1,3 @@ -SRC += matrix.c \ - split_util.c \ - split_scomm.c +LIB_SRC += ssd1306.c -LAYOUTS = split_3x5_3 split_3x6_3 +DEFAULT_FOLDER = crkbd/rev1/legacy diff --git a/keyboards/crkbd/rev1/serial_config.h b/keyboards/crkbd/rev1/serial_config.h deleted file mode 100644 index 4fab8e8ddfcf..000000000000 --- a/keyboards/crkbd/rev1/serial_config.h +++ /dev/null @@ -1,4 +0,0 @@ -#ifndef SOFT_SERIAL_PIN -#define SOFT_SERIAL_PIN D2 -#define SERIAL_USE_MULTI_TRANSACTION -#endif diff --git a/keyboards/crkbd/rev1/serial_config_simpleapi.h b/keyboards/crkbd/rev1/serial_config_simpleapi.h deleted file mode 100644 index 0e1dd9e4acb2..000000000000 --- a/keyboards/crkbd/rev1/serial_config_simpleapi.h +++ /dev/null @@ -1,5 +0,0 @@ -#pragma once - -#undef SERIAL_USE_MULTI_TRANSACTION -#define SERIAL_SLAVE_BUFFER_LENGTH MATRIX_ROWS/2 -#define SERIAL_MASTER_BUFFER_LENGTH MATRIX_ROWS/2 diff --git a/keyboards/crkbd/rev1/split_util.h b/keyboards/crkbd/rev1/split_util.h deleted file mode 100644 index 687ca19bd3e5..000000000000 --- a/keyboards/crkbd/rev1/split_util.h +++ /dev/null @@ -1,19 +0,0 @@ -#ifndef SPLIT_KEYBOARD_UTIL_H -#define SPLIT_KEYBOARD_UTIL_H - -#include -#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 diff --git a/keyboards/crkbd/ssd1306.h b/keyboards/crkbd/rev1/ssd1306.h similarity index 100% rename from keyboards/crkbd/ssd1306.h rename to keyboards/crkbd/rev1/ssd1306.h diff --git a/keyboards/crkbd/rules.mk b/keyboards/crkbd/rules.mk index 16d05b589d62..30de5b388db2 100644 --- a/keyboards/crkbd/rules.mk +++ b/keyboards/crkbd/rules.mk @@ -31,12 +31,8 @@ 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 -CUSTOM_MATRIX = yes -QUANTUM_LIB_SRC += i2c.c \ - serial.c -SRC += ssd1306.c - # if firmware size over limit, try this option # CFLAGS += -flto +LAYOUTS = split_3x5_3 split_3x6_3 -DEFAULT_FOLDER = crkbd/rev1 +DEFAULT_FOLDER = crkbd/rev1/legacy From bc15c4f4ab81c1e2950dfc1c38cf86dc626573c9 Mon Sep 17 00:00:00 2001 From: TJ Date: Thu, 17 Sep 2020 12:45:42 -0500 Subject: [PATCH 794/930] Update led_conf_t example (#10327) --- docs/feature_rgb_matrix.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/feature_rgb_matrix.md b/docs/feature_rgb_matrix.md index a8fad59a191a..b70a5fcba082 100644 --- a/docs/feature_rgb_matrix.md +++ b/docs/feature_rgb_matrix.md @@ -129,7 +129,7 @@ Configure the hardware via your `config.h`: From this point forward the configuration is the same for all the drivers. The `led_config_t` struct provides a key electrical matrix to led index lookup table, what the physical position of each LED is on the board, and what type of key or usage the LED if the LED represents. Here is a brief example: ```c -const led_config_t g_led_config = { { +led_config_t g_led_config = { { // Key Matrix to LED Index { 5, NO_LED, NO_LED, 0 }, { NO_LED, NO_LED, NO_LED, NO_LED }, From bc010d62cab9a632d6338218e648aa37a8814c1d Mon Sep 17 00:00:00 2001 From: umi <57262844+umi-umi@users.noreply.github.com> Date: Fri, 18 Sep 2020 04:04:07 +0900 Subject: [PATCH 795/930] [Docs] Japanese translation of docs/tap_hold.md (#10017) * add tap_hold.md translation * update based on comment * update based on comment * update based on comment --- docs/ja/tap_hold.md | 195 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 195 insertions(+) create mode 100644 docs/ja/tap_hold.md diff --git a/docs/ja/tap_hold.md b/docs/ja/tap_hold.md new file mode 100644 index 000000000000..a0f08976283c --- /dev/null +++ b/docs/ja/tap_hold.md @@ -0,0 +1,195 @@ +# タップホールド設定オプション + + + +タップホールドオプションは素晴らしいものですが、問題が無いわけではありません。デフォルト設定を適切なものにしようとしましたが、一部の人にとってまだ問題を引き起こすかもしれません。 + +次のオプションによりタップホールドキーの挙動を変更することができます。 + +## タッピング時間 + +以下の機能の全ての核心は、タッピング時間の設定です。これにより、何をタップとし、何をホールドとするかが決まります。これが自然に感じられるぴったりのタイミングは、キーボードごと、スイッチごと、あるいはキーごとに異ることもありえます。 + +`config.h` に以下の設定を追加することで、この時間を全体的に設定することができます: + +```c +#define TAPPING_TERM 200 +``` + +この設定はミリ秒で定義され、デフォルトは 200ms です。これは大多数の人にとっての適切な平均値です。 + +この機能をより細かく制御するために、以下を `config.h` に追加することができます: +```c +#define TAPPING_TERM_PER_KEY +``` + +そして、以下の関数をキーマップに追加します: + +```c +uint16_t get_tapping_term(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case SFT_T(KC_SPC): + return TAPPING_TERM + 1250; + case LT(1, KC_GRV): + return 130; + default: + return TAPPING_TERM; + } +} +``` + + +## 許容ホールド + +[PR#1359](https://github.com/qmk/qmk_firmware/pull/1359/) 以降、新しい `config.h` オプションがあります: + +```c +#define PERMISSIVE_HOLD +``` + +これは高速なタイピストや高い `TAPPING_TERM` 設定に対して、タップとホールドキー(モッドタップのような)の動作を向上させます。 + +モッドタップキーを押し、他のキーをタップ(押して放す)して、モッドタップキーを放すという動作の全てをタッピング時間内に行うと、両方のキーの「タッピング」機能が出力されます。 + +例えば: + +- `SFT_T(KC_A)` を押す +- `KC_X` を押す +- `KC_X` を放す +- `SFT_T(KC_A)` を放す + +通常、これら全てを `TAPPING_TERM` (デフォルト: 200ms) 内で行うと、ファームウェアとホストシステムによって `ax` として登録されます。許容ホールドを有効にすると、別のキーがタップされた場合にモッドタップキーを修飾キーと見なすように処理を変更し、 `X` (`SHIFT`+`x`) と登録されます。 + +?> `モッドタップ割り込みの無視`を有効にしている場合、これにより両方の動きが変更されます。通常のキーには、最初のキーが最初に放された場合、あるいは両方のキーが `TAPPING_TERM` より長くホールドされた場合に、修飾キーが追加されます。 + +この機能をより細かく制御するために、以下を `config.h` に追加することができます: + +```c +#define PERMISSIVE_HOLD_PER_KEY +``` + +そして、以下の関数をキーマップに追加します: + +```c +bool get_permissive_hold(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case LT(1, KC_BSPC): + return true; + default: + return false; + } +} +``` + +## モッドタップ割り込みの無視 + +この設定を有効にするには、これを `config.h` に追加してください: + +```c +#define IGNORE_MOD_TAP_INTERRUPT +``` + +許容ホールドと同様に、これは高速なタイピストのためのファームウェアの処理方法を変更します。モッドタップキーを押し、他のキーを押し、モッドタップキーを放し、通常のキーを放すと、通常は両方のキーの「タッピング」機能が出力されます。これはローリングコンボキーには望ましくないかもしれません。 + +`モッドタップ割り込みの無視`を設定するには、両方のキーを `TAPPING_TERM` の間ホールドすると、(その修飾キーの)ホールド機能を実行する必要があります。 + +例えば: + +- `SFT_T(KC_A)` を押す +- `KC_X` を押す +- `SFT_T(KC_A)` を放す +- `KC_X` を放す + +通常、これは `X` (`SHIFT`+`x`) を送信します。`モッドタップ割り込みの無視` を有効にすると、ホールドアクションを登録するには、両方のキーを `TAPPING_TERM` の間ホールドする必要があります。この場合、素早いタップは `ax` を送信しますが、両方をホールドすると、`X` (`SHIFT`+`x`) を出力します。 + + +?> __注意__: これはモディファイアにのみ関係し、レイヤー切り替えキーには関係しません。 + +?> `許容ホールド`を有効にすると、これは両方がどのように動作するかを変更します。通常のキーには、最初のキーが最初に放された場合、あるいは両方のキーが `TAPPING_TERM` より長くホールドされた場合に、修飾キーが追加されます。 + +この機能をより細かく制御するために、以下を `config.h` に追加することができます: + +```c +#define IGNORE_MOD_TAP_INTERRUPT_PER_KEY +``` + +そして、以下の関数をキーマップに追加します: + +```c +bool get_ignore_mod_tap_interrupt(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case SFT_T(KC_SPC): + return true; + default: + return false; + } +} +``` + +## タッピング強制ホールド + +`タッピング強制ホールド` を有効にするには、以下を `config.h` に追加します: + +```c +#define TAPPING_FORCE_HOLD +``` + +タップの後でユーザがキーをホールドすると、これは修飾キーをホールドするかわりにタップされたキーを繰り返します。これにより、タップされたキーのために自動繰り返しを使うことができます。 + +例: + +- SFT_T(KC_A) を押す +- SFT_T(KC_A) を放す +- SFT_T(KC_A) を押す +- タッピング時間より長く待ちます... +- SFT_T(KC_A) を放す + +デフォルトの設定では、最初に放したときに `a` が送信され、2回目の押下で `a` が送信され、コンピュータに自動リピート機能を作動させることができます。 + +`TAPPING_FORCE_HOLD` を使うと、2回目の押下は Shift として解釈され、それをタップして使った後ですぐに修飾キーとして使うことができます。 + +!> `TAPPING_FORCE_HOLD` はタッピングトグル(`TT` レイヤーキーコード、ワンショットタッピングトグルなど)を使うものをすべて破壊します。 + +この機能をより細かく制御するために、以下を `config.h` に追加することができます: + +```c +#define TAPPING_FORCE_HOLD_PER_KEY +``` + +そして、以下の関数をキーマップに追加します: + +```c +bool get_tapping_force_hold(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case LT(1, KC_BSPC): + return true; + default: + return false; + } +} +``` + +## レトロタッピング + +`レトロタッピング`を有効にするには、以下を `config.h` に追加してください: + +```c +#define RETRO_TAPPING +``` + +他のキーを押さずにデュアルファンクションキーを押して放しても何も起こりません。レトロタッピングを有効にすると、他のキーを押さずにキーを放すと、元のキーコードがタッピング時間外であっても送信されます。 + +例えば、他のキーを押すことなく `LT(2, KC_SPACE)` を押したり放したりしても何も起こりません。これを有効にすると、代わりに `KC_SPACE` を送信します。 + +## キー別の関数にキーレコードを含めるのはなぜですか? + +「キー別」の関数全てにキーレコードを含んでいることに気付いたかもしれません。そしてなぜそうしたのか不思議に思っているかもしれません。 + +まぁ、それは単純に本当にカスタマイズのためです。ただし、具体的には、それはキーボードの配線方法によって異なります。例えば、各行が実際にキーボードのマトリックスの1行を使っている場合、キーコード全体をチェックする代わりに、`if (record->event.row == 3)` を使うほうが簡単かもしれません。これは、ホームキー行でタップホールドタイプのキーを使っている人にとって特に便利です。そのため、通常のタイピングを妨げないように微調整することができるのではないでしょうか。 + +## `*_kb` や `*_user` 関数が無いのはなぜですか? + +QMK にある他の多くの関数とは異なり、quantum あるいはキーボードレベルの関数を持つ必要はありません (または理由さえありません)。ここではユーザレベルの関数だけが有用なため、そのようにマークする必要はありません。 From abec529e62ed200313af0629377f8bc60ec83367 Mon Sep 17 00:00:00 2001 From: spotpuff <32026605+spotpuff@users.noreply.github.com> Date: Thu, 17 Sep 2020 17:55:19 -0400 Subject: [PATCH 796/930] [Keymap] coppertop and spotpuff keymaps for DZ60 (#10216) * initial keymap commit * Keymap for coppertop commit * removed define for layers/kc_no/kc_trns * Modified keymap to remove definitions and add layer enum * initial keymap commit * Keymap for coppertop commit * removed define for layers/kc_no/kc_trns * Modified keymap to remove definitions and add layer enum * Changed KC_NO and KC_TRNS to 7X and 7_ * Fixed spacing on keymaps * TMO50: use layer_state_set_kb at keyboard level (#10150) * Change TMO to use layer_state_set_kb as is customary at the keyboard level. This also factors out `process_indicator_led` to a separate method. * [Keymap] update dz60:mrsendyyk (#10160) Update DZ60 Personal readme.md and keymap.c * Update readme.md * Update keymap.c * Update keymap.c * Update readme.md * Update readme.md * Update readme.md * Update keymap.c * Update readme.md * Update * Update readme.md * Update keymap.c * Update readme.md * [Keyboard] YMDK NP21 refactor (#10181) * [Keyboard] 1upkeyboards/1up60rgb: fix broken Enter (#10188) The recent change to unnest macros put the enter on the wrong matrix key. On the 1uprgb, the ANSI and ISO enters share the same cell as does the ANSI and ISO backslash. * no idea what this is * Update keyboards/dz60/keymaps/coppertop/keymap.c * Update keyboards/dz60/keymaps/coppertop/keymap.c * Update keyboards/dz60/keymaps/coppertop/keymap.c * Update keyboards/dz60/keymaps/spotpuff/keymap.c * Update keyboards/dz60/keymaps/spotpuff/keymap.c * Update keyboards/dz60/keymaps/spotpuff/keymap.c * Added Trns labels to keymap comments. * Revert "no idea what this is" This reverts commit dd950f9eb3bad365961d2aa6c97c9dfbdd6219db. * Reverted dd950f9eb3bad365961d2aa6c97c9dfbdd6219db * fix vusb submodule * Update keyboards/dz60/keymaps/coppertop/rules.mk * Update keyboards/dz60/keymaps/spotpuff/rules.mk * Update users/spotpuff/rules.mk * Added GNU copyright license text --- keyboards/dz60/keymaps/coppertop/keymap.c | 95 +++++++++++++++++++++++ keyboards/dz60/keymaps/coppertop/rules.mk | 1 + keyboards/dz60/keymaps/spotpuff/keymap.c | 95 +++++++++++++++++++++++ keyboards/dz60/keymaps/spotpuff/rules.mk | 1 + users/spotpuff/rules.mk | 1 + 5 files changed, 193 insertions(+) create mode 100644 keyboards/dz60/keymaps/coppertop/keymap.c create mode 100644 keyboards/dz60/keymaps/coppertop/rules.mk create mode 100644 keyboards/dz60/keymaps/spotpuff/keymap.c create mode 100644 keyboards/dz60/keymaps/spotpuff/rules.mk create mode 100644 users/spotpuff/rules.mk diff --git a/keyboards/dz60/keymaps/coppertop/keymap.c b/keyboards/dz60/keymaps/coppertop/keymap.c new file mode 100644 index 000000000000..8586f920f9d8 --- /dev/null +++ b/keyboards/dz60/keymaps/coppertop/keymap.c @@ -0,0 +1,95 @@ + /* Copyright 2020 Philip Chan + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public 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 + +//Layers +enum layer_names { + _QWERTY, + _FN, + _MEDIA, +}; + +//Custom Keymap Definitions +#define KC_CAD LALT(LCTL(KC_DEL)) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +/* Qwerty Base layer + * ,-----------------------------------------------------------------------------------------. + * | Esc | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | BSpc| Del | + * |-----------------------------------------------------------------------------------------+ + * | Tab | Q | W | E | R | T | Y | U | I | O | P | [ | ] | \ | + * |-----------------------------------------------------------------------------------------+ + * | `/_Media| A | S | D | F | G | H | J | K | L | ; | ' | Enter | + * |-----------------------------------------------------------------------------------------+ + * | Shift | Z | X | C | V | B | N | M | , | . | / |Home | Up |End | + * |-----------------------------------------------------------------------------------------+ + * | LCtrl | LGui | LAlt | Space | Fn | Space | F7 | F10 |Left |Down |Right| + * `----------------------------------------------------------------------------------------' + */ + + [_QWERTY] = LAYOUT_directional( + 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, + LT(_MEDIA,KC_GRV), 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_HOME, KC_UP, KC_END, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, MO(_FN), KC_SPC, KC_F7, KC_F10, KC_LEFT, KC_DOWN, KC_RGHT + ), + +/* F-Key/Lighting/whatever layer + * ,-----------------------------------------------------------------------------------------. + * | | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F0 | F11 | F12 | | Ins | + * |-----------------------------------------------------------------------------------------+ + * | |R_Tog|R_HUI|R_SAI|R_VAI| | | | | | | | | KC_CAD | + * |-----------------------------------------------------------------------------------------+ + * | Caps | |R_HUD|R_SAD| | | | | | | SLCK|PAUSE| Print Screen| + * |-----------------------------------------------------------------------------------------+ + * | |R_M_P|R_M_B|R_M_R|R_M_SW|R_M_S|R_M_K|R_M_X|R_M_G| | |PgUp |BLUP |PgDn | + * |-----------------------------------------------------------------------------------------+ + * | | | | | | | | |BLTog|BLDN |BLInc| + * `----------------------------------------------------------------------------------------' + */ + + [_FN] = LAYOUT_directional( + 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, KC_INS, + XXXXXXX, RGB_TOG, RGB_HUI, RGB_SAI, RGB_VAI, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_CAD, + KC_CAPS, XXXXXXX, RGB_HUD, RGB_SAD, RGB_VAD, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_SLCK, KC_PAUS, KC_PSCR, + _______, RGB_M_P, RGB_M_B, RGB_M_R, RGB_M_SW, RGB_M_SN, RGB_M_K, RGB_M_X, RGB_M_G, XXXXXXX, XXXXXXX, KC_PGUP, BL_INC, KC_PGDN, + _______, _______, _______, XXXXXXX, _______, XXXXXXX, XXXXXXX, XXXXXXX, BL_TOGG, BL_DEC, BL_STEP + ), + +/* SFX/Multimedia/Numpad layer + * ,-----------------------------------------------------------------------------------------. + * | | | | | | | | | / | * | - | = | |Trns |Trns | + * |-----------------------------------------------------------------------------------------+ + * | | | Prev | Play| Next| | | 7 | 8 | 9 | + | | | RESET | + * |-----------------------------------------------------------------------------------------+ + * | | |Mute | VUp | VDn | | | 4 | 5 | 6 | + | | Trns | + * |-----------------------------------------------------------------------------------------+ + * | | | | | | | | 1 | 2 | 3 |NumEN| | | | + * |-----------------------------------------------------------------------------------------+ + * | Trns | Trns | Trns | Trns | | 0 | . | | | | | + * `----------------------------------------------------------------------------------------' + */ + + [_MEDIA] = LAYOUT_directional( + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_PSLS, KC_PAST, KC_PMNS, KC_PEQL, XXXXXXX, _______, _______, + XXXXXXX, XXXXXXX, KC_MPRV, KC_MPLY, KC_MNXT, XXXXXXX, XXXXXXX, KC_P7, KC_P8, KC_P9, KC_PPLS, XXXXXXX, XXXXXXX, RESET, + _______, XXXXXXX, KC_MUTE, KC_VOLD, KC_VOLU, XXXXXXX, XXXXXXX, KC_P4, KC_P5, KC_P6, KC_PPLS, XXXXXXX, _______, + _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_P1, KC_P2, KC_P3, KC_PENT, XXXXXXX, XXXXXXX, XXXXXXX, + _______, _______, _______, _______, _______, KC_P0, KC_PDOT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX + ) +}; diff --git a/keyboards/dz60/keymaps/coppertop/rules.mk b/keyboards/dz60/keymaps/coppertop/rules.mk new file mode 100644 index 000000000000..27905483738a --- /dev/null +++ b/keyboards/dz60/keymaps/coppertop/rules.mk @@ -0,0 +1 @@ +BOOTMAGIC_ENABLE = no diff --git a/keyboards/dz60/keymaps/spotpuff/keymap.c b/keyboards/dz60/keymaps/spotpuff/keymap.c new file mode 100644 index 000000000000..edbe635e39a4 --- /dev/null +++ b/keyboards/dz60/keymaps/spotpuff/keymap.c @@ -0,0 +1,95 @@ + /* Copyright 2020 Philip Chan + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public 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 + +//Layers +enum layer_names { + _QWERTY, + _FN, + _MEDIA, +}; + +//Custom Keymap Definitions +#define KC_CAD LALT(LCTL(KC_DEL)) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +/* Qwerty Base layer + * ,-----------------------------------------------------------------------------------------. + * | Esc | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | BSpc| Del | + * |-----------------------------------------------------------------------------------------+ + * | Tab | Q | W | E | R | T | Y | U | I | O | P | [ | ] | \ | + * |-----------------------------------------------------------------------------------------+ + * | `/_Media| A | S | D | F | G | H | J | K | L | ; | ' | Enter | + * |-----------------------------------------------------------------------------------------+ + * | Shift | Z | X | C | V | B | N | M | , | . | / |PgUp | Up |PgDn | + * |-----------------------------------------------------------------------------------------+ + * | LCtrl | LGui | LAlt | Space | Fn | Space |Home | End |Left |Down |Right| + * `----------------------------------------------------------------------------------------' + */ + + [_QWERTY] = LAYOUT_directional( + 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, + LT(_MEDIA,KC_GRV), 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_PGUP, KC_UP, KC_PGDN, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, MO(_FN), KC_SPC, KC_HOME, KC_END, KC_LEFT, KC_DOWN, KC_RGHT + ), + +/* F-Key/Lighting/whatever layer + * ,-----------------------------------------------------------------------------------------. + * | | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F0 | F11 | F12 | | Ins | + * |-----------------------------------------------------------------------------------------+ + * | |R_Tog|R_HUI|R_SAI|R_VAI| | | | | | | | | KC_CAD | + * |-----------------------------------------------------------------------------------------+ + * | Caps | |R_HUD|R_SAD| | | | | | | SLCK|PAUSE| Print Screen| + * |-----------------------------------------------------------------------------------------+ + * | Trns |R_M_P|R_M_B|R_M_R|R_M_SW|R_M_S|R_M_K|R_M_X|R_M_G| | | |BLUP | | + * |-----------------------------------------------------------------------------------------+ + * | Trns | Trns | Trns | | Trns | | | |BLTog|BLDN |BLInc| + * `----------------------------------------------------------------------------------------' + */ + + [_FN] = LAYOUT_directional( + 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, KC_INS, + XXXXXXX, RGB_TOG, RGB_HUI, RGB_SAI, RGB_VAI, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_CAD, + KC_CAPS, XXXXXXX, RGB_HUD, RGB_SAD, RGB_VAD, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_SLCK, KC_PAUS, KC_PSCR, + _______, RGB_M_P, RGB_M_B, RGB_M_R, RGB_M_SW, RGB_M_SN, RGB_M_K, RGB_M_X, RGB_M_G, XXXXXXX, XXXXXXX, XXXXXXX, BL_INC, XXXXXXX, + _______, _______, _______, XXXXXXX, _______, XXXXXXX, XXXXXXX, XXXXXXX, BL_TOGG, BL_DEC, BL_STEP + ), + +/* SFX/Multimedia/Numpad layer + * ,-----------------------------------------------------------------------------------------. + * | | | | | | |NumLk| | / | * | - | = | |Trns |Trns | + * |-----------------------------------------------------------------------------------------+ + * | | | Prev | Play| Next| | | 7 | 8 | 9 | + | | | RESET | + * |-----------------------------------------------------------------------------------------+ + * | Trns | |Mute | VUp | VDn | | | 4 | 5 | 6 | + | | Trns | + * |-----------------------------------------------------------------------------------------+ + * | Trns | | | | | | | 1 | 2 | 3 |NumEN| | | | + * |-----------------------------------------------------------------------------------------+ + * | Trns | Trns | Trns | Trns | Trns | 0 | . | | | | | + * `----------------------------------------------------------------------------------------' + */ + + [_MEDIA] = LAYOUT_directional( + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_NLCK, XXXXXXX, KC_PSLS, KC_PAST, KC_PMNS, KC_PEQL, XXXXXXX, _______, _______, + XXXXXXX, XXXXXXX, KC_MPRV, KC_MPLY, KC_MNXT, XXXXXXX, XXXXXXX, KC_P7, KC_P8, KC_P9, KC_PPLS, XXXXXXX, XXXXXXX, RESET, + _______, XXXXXXX, KC_MUTE, KC_VOLD, KC_VOLU, XXXXXXX, XXXXXXX, KC_P4, KC_P5, KC_P6, KC_PPLS, XXXXXXX, _______, + _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_P1, KC_P2, KC_P3, KC_PENT, XXXXXXX, XXXXXXX, XXXXXXX, + _______, _______, _______, _______, _______, KC_P0, KC_PDOT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX + ) +}; diff --git a/keyboards/dz60/keymaps/spotpuff/rules.mk b/keyboards/dz60/keymaps/spotpuff/rules.mk new file mode 100644 index 000000000000..27905483738a --- /dev/null +++ b/keyboards/dz60/keymaps/spotpuff/rules.mk @@ -0,0 +1 @@ +BOOTMAGIC_ENABLE = no diff --git a/users/spotpuff/rules.mk b/users/spotpuff/rules.mk new file mode 100644 index 000000000000..27905483738a --- /dev/null +++ b/users/spotpuff/rules.mk @@ -0,0 +1 @@ +BOOTMAGIC_ENABLE = no From b846480d5a83171e85dba48422b42aa95e29d31a Mon Sep 17 00:00:00 2001 From: David Cuthbert Date: Thu, 17 Sep 2020 15:14:39 -0700 Subject: [PATCH 797/930] Output an error message if LINK_TIME_OPTIMIZATION_ENABLE is set but LTO_ENABLE is not (#10217) * Output an error message if LINK_TIME_OPTIMIZATION_ENABLE is set but LTO_ENABLE is not. * Update common.mk Specify that LINK_TIME_OPTIMZATION_ENABLE has been renamed, not deprecated. --- tmk_core/common.mk | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tmk_core/common.mk b/tmk_core/common.mk index 3c9de33c9940..c60a1c405254 100644 --- a/tmk_core/common.mk +++ b/tmk_core/common.mk @@ -161,6 +161,8 @@ ifeq ($(strip $(LTO_ENABLE)), yes) EXTRAFLAGS += -flto TMK_COMMON_DEFS += -DLTO_ENABLE TMK_COMMON_DEFS += -DLINK_TIME_OPTIMIZATON_ENABLE +else ifdef LINK_TIME_OPTIMIZATION_ENABLE + $(error The LINK_TIME_OPTIMIZATION_ENABLE flag has been renamed to LTO_ENABLE.) endif # Search Path From f079dd90ed88fd29b7e5bbdd3496742f3afeff4e Mon Sep 17 00:00:00 2001 From: holtenc Date: Thu, 17 Sep 2020 22:17:22 -0500 Subject: [PATCH 798/930] Meridian initial commit (#10196) * Meridian initial commit * requested changes * Update keyboards/primekb/meridian/config.h Co-authored-by: Ryan * Update keyboards/primekb/meridian/rules.mk Co-authored-by: Ryan * made requested changes * Update meridian.c * Update keyboards/primekb/meridian/readme.md Co-authored-by: James Young <18669334+noroadsleft@users.noreply.github.com> Co-authored-by: Ryan Co-authored-by: James Young <18669334+noroadsleft@users.noreply.github.com> --- keyboards/primekb/meridian/chconf.h | 714 ++++++++++++++++++ keyboards/primekb/meridian/config.h | 46 ++ keyboards/primekb/meridian/halconf.h | 525 +++++++++++++ keyboards/primekb/meridian/info.json | 15 + .../primekb/meridian/keymaps/default/keymap.c | 35 + .../primekb/meridian/keymaps/via/keymap.c | 49 ++ .../primekb/meridian/keymaps/via/rules.mk | 1 + keyboards/primekb/meridian/mcuconf.h | 176 +++++ keyboards/primekb/meridian/meridian.c | 68 ++ keyboards/primekb/meridian/meridian.h | 52 ++ keyboards/primekb/meridian/readme.md | 12 + keyboards/primekb/meridian/rules.mk | 23 + 12 files changed, 1716 insertions(+) create mode 100644 keyboards/primekb/meridian/chconf.h create mode 100644 keyboards/primekb/meridian/config.h create mode 100644 keyboards/primekb/meridian/halconf.h create mode 100644 keyboards/primekb/meridian/info.json create mode 100644 keyboards/primekb/meridian/keymaps/default/keymap.c create mode 100644 keyboards/primekb/meridian/keymaps/via/keymap.c create mode 100644 keyboards/primekb/meridian/keymaps/via/rules.mk create mode 100644 keyboards/primekb/meridian/mcuconf.h create mode 100644 keyboards/primekb/meridian/meridian.c create mode 100644 keyboards/primekb/meridian/meridian.h create mode 100644 keyboards/primekb/meridian/readme.md create mode 100644 keyboards/primekb/meridian/rules.mk diff --git a/keyboards/primekb/meridian/chconf.h b/keyboards/primekb/meridian/chconf.h new file mode 100644 index 000000000000..03f63da36a88 --- /dev/null +++ b/keyboards/primekb/meridian/chconf.h @@ -0,0 +1,714 @@ +/* + 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. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +/** + * @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. + * + * @addtogroup config + * @details Kernel related settings and hooks. + * @{ + */ + +#ifndef CHCONF_H +#define CHCONF_H + +#define _CHIBIOS_RT_CONF_ +#define _CHIBIOS_RT_CONF_VER_6_0_ + +/*===========================================================================*/ +/** + * @name System timers settings + * @{ + */ +/*===========================================================================*/ + +/** + * @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. + * @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. + */ +#if !defined(CH_CFG_ST_TIMEDELTA) +#define CH_CFG_ST_TIMEDELTA 2 +#endif + +/** @} */ + +/*===========================================================================*/ +/** + * @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. + */ +#if !defined(CH_CFG_TIME_QUANTUM) +#define CH_CFG_TIME_QUANTUM 0 +#endif + +/** + * @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. + */ +#if !defined(CH_CFG_MEMCORE_SIZE) +#define CH_CFG_MEMCORE_SIZE 0 +#endif + +/** + * @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. + */ +#if !defined(CH_CFG_NO_IDLE_THREAD) +#define CH_CFG_NO_IDLE_THREAD FALSE +#endif + +/** @} */ + +/*===========================================================================*/ +/** + * @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. + */ +#if !defined(CH_CFG_OPTIMIZE_SPEED) +#define CH_CFG_OPTIMIZE_SPEED FALSE +#endif + +/** @} */ + +/*===========================================================================*/ +/** + * @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. + */ +#if !defined(CH_CFG_USE_TM) +#define CH_CFG_USE_TM FALSE +#endif + +/** + * @brief Threads registry APIs. + * @details If enabled then the registry APIs are included in the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_REGISTRY) +#define CH_CFG_USE_REGISTRY TRUE +#endif + +/** + * @brief Threads synchronization APIs. + * @details If enabled then the @p chThdWait() function is included in + * the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_WAITEXIT) +#define CH_CFG_USE_WAITEXIT TRUE +#endif + +/** + * @brief Semaphores APIs. + * @details If enabled then the Semaphores APIs are included in the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_SEMAPHORES) +#define CH_CFG_USE_SEMAPHORES TRUE +#endif + +/** + * @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. + */ +#if !defined(CH_CFG_USE_SEMAPHORES_PRIORITY) +#define CH_CFG_USE_SEMAPHORES_PRIORITY FALSE +#endif + +/** + * @brief Mutexes APIs. + * @details If enabled then the mutexes APIs are included in the kernel. + * + * @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. + * @note Recursive mutexes are heavier and have an increased + * memory footprint. + * + * @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. + * @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. + */ +#if !defined(CH_CFG_USE_CONDVARS) +#define CH_CFG_USE_CONDVARS TRUE +#endif + +/** + * @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. + */ +#if !defined(CH_CFG_USE_CONDVARS_TIMEOUT) +#define CH_CFG_USE_CONDVARS_TIMEOUT FALSE +#endif + +/** + * @brief Events Flags APIs. + * @details If enabled then the event flags APIs are included in the kernel. + * + * @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. + * @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. + */ +#if !defined(CH_CFG_USE_EVENTS_TIMEOUT) +#define CH_CFG_USE_EVENTS_TIMEOUT TRUE +#endif + +/** + * @brief Synchronous Messages APIs. + * @details If enabled then the synchronous messages APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_MESSAGES) +#define CH_CFG_USE_MESSAGES TRUE +#endif + +/** + * @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. + */ +#if !defined(CH_CFG_USE_MESSAGES_PRIORITY) +#define CH_CFG_USE_MESSAGES_PRIORITY FALSE +#endif + +/** + * @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. + */ +#if !defined(CH_CFG_USE_MAILBOXES) +#define CH_CFG_USE_MAILBOXES TRUE +#endif + +/** + * @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. + */ +#if !defined(CH_CFG_USE_MEMCORE) +#define CH_CFG_USE_MEMCORE TRUE +#endif + +/** + * @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. + */ +#if !defined(CH_CFG_USE_HEAP) +#define CH_CFG_USE_HEAP FALSE +#endif + +/** + * @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. + */ +#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. + * @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. + */ +#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 + +/** @} */ + +/*===========================================================================*/ +/** + * @name Debug options + * @{ + */ +/*===========================================================================*/ + +/** + * @brief Debug option, kernel statistics. + * + * @note The default is @p FALSE. + */ +#if !defined(CH_DBG_STATISTICS) +#define CH_DBG_STATISTICS FALSE +#endif + +/** + * @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. + */ +#if !defined(CH_DBG_SYSTEM_STATE_CHECK) +#define CH_DBG_SYSTEM_STATE_CHECK FALSE +#endif + +/** + * @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. + */ +#if !defined(CH_DBG_ENABLE_CHECKS) +#define CH_DBG_ENABLE_CHECKS FALSE +#endif + +/** + * @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. + */ +#if !defined(CH_DBG_ENABLE_ASSERTS) +#define CH_DBG_ENABLE_ASSERTS FALSE +#endif + +/** + * @brief Debug option, trace buffer. + * @details If enabled then the trace buffer is activated. + * + * @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. + * @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. + */ +#if !defined(CH_DBG_ENABLE_STACK_CHECK) +#define CH_DBG_ENABLE_STACK_CHECK FALSE +#endif + +/** + * @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. + */ +#if !defined(CH_DBG_FILL_THREADS) +#define CH_DBG_FILL_THREADS FALSE +#endif + +/** + * @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. + */ +#if !defined(CH_DBG_THREADS_PROFILING) +#define CH_DBG_THREADS_PROFILING FALSE +#endif + +/** @} */ + +/*===========================================================================*/ +/** + * @name Kernel hooks + * @{ + */ +/*===========================================================================*/ + +/** + * @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. + */ +#define CH_CFG_THREAD_EXTRA_FIELDS \ + /* Add threads custom fields here.*/ + +/** + * @brief Threads initialization hook. + * @details User initialization code added to the @p _thread_init() function. + * + * @note It is invoked from within @p _thread_init() 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/primekb/meridian/config.h b/keyboards/primekb/meridian/config.h new file mode 100644 index 000000000000..9194023abb33 --- /dev/null +++ b/keyboards/primekb/meridian/config.h @@ -0,0 +1,46 @@ +/* +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 + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0x5052 +#define PRODUCT_ID 0x004D +#define DEVICE_VER 0x0001 +#define MANUFACTURER Prime Keyboards +#define PRODUCT Meridian + +/* key matrix size */ +#define MATRIX_ROWS 5 +#define MATRIX_COLS 14 + +#define MATRIX_COL_PINS { B11, B10, B2, B1, B0, A7, B9, B8, B7, B6, B5, B4, B3, A15 } +#define MATRIX_ROW_PINS { A6, A5, A4, A3, A2 } +#define DIODE_DIRECTION COL2ROW + +#define RGB_DI_PIN B15 +#define RGBLED_NUM 3 +#define WS2812_SPI SPID2 +#define WS2812_SPI_MOSI_PAL_MODE 0 + +/* 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/primekb/meridian/halconf.h b/keyboards/primekb/meridian/halconf.h new file mode 100644 index 000000000000..adb1a907154b --- /dev/null +++ b/keyboards/primekb/meridian/halconf.h @@ -0,0 +1,525 @@ +/* + 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. + 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 + +#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 +#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 cryptographic subsystem. + */ +#if !defined(HAL_USE_CRY) || defined(__DOXYGEN__) +#define HAL_USE_CRY FALSE +#endif + +/** + * @brief Enables the DAC subsystem. + */ +#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 +#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 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 +#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 +#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 + +/** + * @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. */ +/*===========================================================================*/ + +/** + * @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 + +/** + * @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. */ +/*===========================================================================*/ + +/** + * @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 the zero-copy API. + */ +#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 + +/** + * @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. */ +/*===========================================================================*/ + +/** + * @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 16 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 256 bytes for both the transmission and receive + * buffers. + */ +#if !defined(SERIAL_USB_BUFFERS_SIZE) || defined(__DOXYGEN__) +#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 + +/*===========================================================================*/ +/* 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 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 +#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. */ +/*===========================================================================*/ + +/** + * @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 + +/*===========================================================================*/ +/* 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/primekb/meridian/info.json b/keyboards/primekb/meridian/info.json new file mode 100644 index 000000000000..3397ae500a99 --- /dev/null +++ b/keyboards/primekb/meridian/info.json @@ -0,0 +1,15 @@ +{ + "keyboard_name": "Meridian", + "url": "https://www.primekb.com", + "maintainer": "holtenc", + "width": 16.5, + "height": 5, + "layouts": { + "LAYOUT_unified_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":8.5, "y":0}, {"label":"*", "x":9.5, "y":0}, {"label":"(", "x":10.5, "y":0}, {"label":")", "x":11.5, "y":0}, {"label":"_", "x":12.5, "y":0}, {"label":"+", "x":13.5, "y":0}, {"label":"Backspace", "x":14.5, "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":8, "y":1}, {"label":"U", "x":9, "y":1}, {"label":"I", "x":10, "y":1}, {"label":"O", "x":11, "y":1}, {"label":"P", "x":12, "y":1}, {"label":"{", "x":13, "y":1}, {"label":"}", "x":14, "y":1}, {"label":"|", "x":15, "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":8.25, "y":2}, {"label":"J", "x":9.25, "y":2}, {"label":"K", "x":10.25, "y":2}, {"label":"L", "x":11.25, "y":2}, {"label":":", "x":12.25, "y":2}, {"label":"\"", "x":13.25, "y":2}, {"label":"Enter", "x":14.25, "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":"B", "x":7.75, "y":3}, {"label":"N", "x":8.75, "y":3}, {"label":"M", "x":9.75, "y":3}, {"label":"<", "x":10.75, "y":3}, {"label":">", "x":11.75, "y":3}, {"label":"?", "x":12.75, "y":3}, {"label":"Shift", "x":13.75, "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":3.75, "y":4, "w":1.25}, {"x":5, "y":4, "w":2.25}, {"x":7.75, "y":4, "w":2.75}, {"label":"Alt", "x":10.5, "y":4, "w":1.25}, {"label":"Win", "x":12.75, "y":4, "w":1.25}, {"label":"Menu", "x":14, "y":4, "w":1.25}, {"label":"Ctrl", "x":15.25, "y":4, "w":1.25}] + }, + "LAYOUT_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":8.5, "y":0}, {"label":"*", "x":9.5, "y":0}, {"label":"(", "x":10.5, "y":0}, {"label":")", "x":11.5, "y":0}, {"label":"_", "x":12.5, "y":0}, {"label":"+", "x":13.5, "y":0}, {"label":"Del", "x":14.5, "y":0}, {"label":"Backspace", "x":15.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":8, "y":1}, {"label":"U", "x":9, "y":1}, {"label":"I", "x":10, "y":1}, {"label":"O", "x":11, "y":1}, {"label":"P", "x":12, "y":1}, {"label":"{", "x":13, "y":1}, {"label":"}", "x":14, "y":1}, {"label":"|", "x":15, "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":8.25, "y":2}, {"label":"J", "x":9.25, "y":2}, {"label":"K", "x":10.25, "y":2}, {"label":"L", "x":11.25, "y":2}, {"label":":", "x":12.25, "y":2}, {"label":"\"", "x":13.25, "y":2}, {"label":"Enter", "x":14.25, "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":"B", "x":7.75, "y":3}, {"label":"N", "x":8.75, "y":3}, {"label":"M", "x":9.75, "y":3}, {"label":"<", "x":10.75, "y":3}, {"label":">", "x":11.75, "y":3}, {"label":"?", "x":12.75, "y":3}, {"label":"Shift", "x":13.75, "y":3, "w":1.75}, {"label":"Fn", "x":15.5, "y":3}, {"label":"Ctrl", "x":0, "y":4, "w":1.25}, {"label":"Win", "x":1.25, "y":4, "w":1.25}, {"label":"Alt", "x":3.75, "y":4, "w":1.25}, {"x":5, "y":4, "w":2.25}, {"x":7.75, "y":4, "w":2.75}, {"label":"Alt", "x":10.5, "y":4, "w":1.25}, {"label":"Win", "x":12.75, "y":4, "w":1.25}, {"label":"Menu", "x":14, "y":4, "w":1.25}, {"label":"Ctrl", "x":15.25, "y":4, "w":1.25}] + } + } +} diff --git a/keyboards/primekb/meridian/keymaps/default/keymap.c b/keyboards/primekb/meridian/keymaps/default/keymap.c new file mode 100644 index 000000000000..2ea91eeb133d --- /dev/null +++ b/keyboards/primekb/meridian/keymaps/default/keymap.c @@ -0,0 +1,35 @@ +/* +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_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_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_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_LGUI, KC_LALT, MO(1), KC_SPC, KC_RALT, KC_RGUI, KC_RGUI, KC_RCTL + ), + [1] = LAYOUT_split_bs_rshift( + 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, _______, + _______, KC_HOME, KC_PGDN, KC_END, _______, KC_VOLD, KC_VOLU, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_PSCR, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______ + ) +}; diff --git a/keyboards/primekb/meridian/keymaps/via/keymap.c b/keyboards/primekb/meridian/keymaps/via/keymap.c new file mode 100644 index 000000000000..9c314d657c51 --- /dev/null +++ b/keyboards/primekb/meridian/keymaps/via/keymap.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 QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_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_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_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_LGUI, KC_LALT, MO(1), KC_SPC, KC_RALT, KC_RGUI, KC_RGUI, KC_RCTL + ), + [1] = LAYOUT_split_bs_rshift( + 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, _______, + _______, KC_HOME, KC_PGDN, KC_END, _______, KC_VOLD, KC_VOLU, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_PSCR, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + [2] = LAYOUT_split_bs_rshift( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + [3] = LAYOUT_split_bs_rshift( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______ + ) +}; diff --git a/keyboards/primekb/meridian/keymaps/via/rules.mk b/keyboards/primekb/meridian/keymaps/via/rules.mk new file mode 100644 index 000000000000..1e5b99807cb7 --- /dev/null +++ b/keyboards/primekb/meridian/keymaps/via/rules.mk @@ -0,0 +1 @@ +VIA_ENABLE = yes diff --git a/keyboards/primekb/meridian/mcuconf.h b/keyboards/primekb/meridian/mcuconf.h new file mode 100644 index 000000000000..048eb4df650d --- /dev/null +++ b/keyboards/primekb/meridian/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/primekb/meridian/meridian.c b/keyboards/primekb/meridian/meridian.c new file mode 100644 index 000000000000..8d94faf9eab9 --- /dev/null +++ b/keyboards/primekb/meridian/meridian.c @@ -0,0 +1,68 @@ +/* +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 "meridian.h" + +//Initialize B12 for in-switch caps lock +void keyboard_pre_init_kb(void){ + setPinOutput(B12); + keyboard_pre_init_user(); +} + +//Initialize all RGB indicators to 'off' +__attribute__((weak)) +void keyboard_post_init_user(void) { + rgblight_setrgb_at(0, 0, 0, 0); // [..., 0] = top LED + rgblight_setrgb_at(0, 0, 0, 1); // [..., 1] = middle LED + rgblight_setrgb_at(0, 0, 0, 2); // [..., 2] = bottom LED +} + +//Indicator light function +bool led_update_kb(led_t led_state) { + bool res = led_update_user(led_state); + if (res) { + // writePin(B12, !led_state.caps_lock); //Un-comment this line to enable in-switch capslock indicator + if (led_state.caps_lock) { + rgblight_setrgb_at(0, 255, 0, 0); //green + } else { + rgblight_setrgb_at(0, 0, 0, 0); + } + if (led_state.num_lock) { + rgblight_setrgb_at(0, 0, 255, 1); //blue + } else { + rgblight_setrgb_at(0, 0, 0, 1); + } + if (led_state.scroll_lock) { + rgblight_setrgb_at(255, 0, 0, 2); //red + } else { + rgblight_setrgb_at(0, 0, 0, 2); + } +} + return res; +} + +//Below is an exmaple of layer indication using one of the RGB indicatiors. As configured, uses the bottom indicator (2) to light up red when layer 1 is in use. +/* +layer_state_t layer_state_set_kb(layer_state_t state) { + if (get_highest_layer(state) == 1) { + rgblight_setrgb_at(255, 0, 0, 2); + } else { + rgblight_setrgb_at(0, 0, 0, 2); + } + return state; +} +*/ diff --git a/keyboards/primekb/meridian/meridian.h b/keyboards/primekb/meridian/meridian.h new file mode 100644 index 000000000000..e6a155ddec9c --- /dev/null +++ b/keyboards/primekb/meridian/meridian.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 "quantum.h" + +#define K_NO KC_NO + +#define LAYOUT_unified_bs_rshift( \ + 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, K213, \ + K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, \ + K400, K401, K402, K404, K407, K409, 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, K_NO, K213 }, \ + { K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K_NO}, \ + { K400, K401, K402, K_NO, K404, K_NO, K_NO, K407, K_NO, K409, K_NO, K411, K412, K413 } \ +} + +#define LAYOUT_split_bs_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, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, \ + K400, K401, K402, K404, K407, K409, 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, K_NO, K404, K_NO, K_NO, K407, K_NO, K409, K_NO, K411, K412, K413 } \ +} diff --git a/keyboards/primekb/meridian/readme.md b/keyboards/primekb/meridian/readme.md new file mode 100644 index 000000000000..0e3339a59743 --- /dev/null +++ b/keyboards/primekb/meridian/readme.md @@ -0,0 +1,12 @@ +# ai03 x PrimeKB Meridian + +![Meridian](https://i.imgur.com/c90ZTJJl.jpg) + +* Keyboard Maintainer: [Holten Campbell](https://github.com/holtenc) +* Hardware Supported: STM32F072CBT6 + +Make example for this keyboard (after setting up your build environment): + + make primekb/meridian: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/meridian/rules.mk b/keyboards/primekb/meridian/rules.mk new file mode 100644 index 000000000000..9e2f958bee89 --- /dev/null +++ b/keyboards/primekb/meridian/rules.mk @@ -0,0 +1,23 @@ +# 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 = 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 = yes # Enable keyboard RGB underglow +BLUETOOTH_ENABLE = no # Enable Bluetooth +AUDIO_ENABLE = no # Audio output +WS2812_DRIVER = spi + +# Enter lower-power sleep mode when on the ChibiOS idle thread +OPT_DEFS += -DCORTEX_ENABLE_WFI_IDLE=TRUE From 9eeb6048ff507185e3e788f0288c8341c5c14ce2 Mon Sep 17 00:00:00 2001 From: yossiyossy <70216843+yossiyossy@users.noreply.github.com> Date: Sat, 19 Sep 2020 04:01:43 +0900 Subject: [PATCH 799/930] [Keyboard] Add maJIStic keyboard (#10258) * add maJIStic * fix for format * fix directory name * rm old directory of maJIStic * fix for comment * ISO/JIS Enter move to the home row. --- keyboards/majistic/config.h | 57 ++++++++++++++ keyboards/majistic/info.json | 78 ++++++++++++++++++++ keyboards/majistic/keymaps/default/config.h | 17 +++++ keyboards/majistic/keymaps/default/keymap.c | 45 +++++++++++ keyboards/majistic/keymaps/default/readme.md | 1 + keyboards/majistic/majistic.c | 17 +++++ keyboards/majistic/majistic.h | 47 ++++++++++++ keyboards/majistic/readme.md | 15 ++++ keyboards/majistic/rules.mk | 24 ++++++ 9 files changed, 301 insertions(+) create mode 100644 keyboards/majistic/config.h create mode 100644 keyboards/majistic/info.json create mode 100644 keyboards/majistic/keymaps/default/config.h create mode 100644 keyboards/majistic/keymaps/default/keymap.c create mode 100644 keyboards/majistic/keymaps/default/readme.md create mode 100644 keyboards/majistic/majistic.c create mode 100644 keyboards/majistic/majistic.h create mode 100644 keyboards/majistic/readme.md create mode 100644 keyboards/majistic/rules.mk diff --git a/keyboards/majistic/config.h b/keyboards/majistic/config.h new file mode 100644 index 000000000000..4ced5dd890f1 --- /dev/null +++ b/keyboards/majistic/config.h @@ -0,0 +1,57 @@ + +/* +Copyright 2020 yossiyossy + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License 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 0x6E55 +#define DEVICE_VER 0x0001 +#define MANUFACTURER yossiyossy +#define PRODUCT maJIStic + +/* key matrix size */ +#define MATRIX_ROWS 10 +#define MATRIX_COLS 8 + +#define MATRIX_ROW_PINS { F6, F7, B1, B3, B2 } +#define MATRIX_COL_PINS { D4, C6, D7, E6, B4, B5, F4, F5 } // F4, F5 is dummy +#define MATRIX_ROW_PINS_RIGHT { D4, C6, D7, E6, B4 } +#define MATRIX_COL_PINS_RIGHT { B6, B2, B3, B1, F7, F6, F5, F4 } + +/* 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 + +/* 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 */ +#define NO_ACTION_MACRO +#define NO_ACTION_FUNCTION diff --git a/keyboards/majistic/info.json b/keyboards/majistic/info.json new file mode 100644 index 000000000000..2ae92678823c --- /dev/null +++ b/keyboards/majistic/info.json @@ -0,0 +1,78 @@ +{ + "keyboard_name": "maJIStic", + "url": "https://github.com/yossiyossy/maJIStic", + "maintainer": "yossiyossy", + "width": 15.5, + "height": 5, + "layouts": { + "LAYOUT": { + "layout": [ + {"label":"1", "x":0, "y":0, "w":1.5}, + {"label":"2", "x":1.5, "y":0}, + {"label":"3", "x":2.5, "y":0}, + {"label":"4", "x":3.5, "y":0}, + {"label":"5", "x":4.5, "y":0}, + {"label":"6", "x":5.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":"0", "x":10.5, "y":0}, + {"label":"-", "x":11.5, "y":0}, + {"label":"^", "x":12.5, "y":0}, + {"label":"\\", "x":13.5, "y":0}, + {"label":"BS", "x":14.5, "y":0}, + {"label":"Tab", "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":"Y", "x":7, "y":1}, + {"label":"U", "x":8, "y":1}, + {"label":"I", "x":9, "y":1}, + {"label":"O", "x":10, "y":1}, + {"label":"P", "x":11, "y":1}, + {"label":"@", "x":12, "y":1}, + {"label":"[", "x":13, "y":1}, + {"label":"Caps Lock", "x":0, "y":2, "w":1.25}, + {"label":"A", "x":1.25, "y":2}, + {"label":"S", "x":2.25, "y":2}, + {"label":"D", "x":3.25, "y":2}, + {"label":"F", "x":4.25, "y":2}, + {"label":"G", "x":5.25, "y":2}, + {"label":"H", "x":7.25, "y":2}, + {"label":"J", "x":8.25, "y":2}, + {"label":"K", "x":9.25, "y":2}, + {"label":"L", "x":10.25, "y":2}, + {"label":";", "x":11.25, "y":2}, + {"label":":", "x":12.25, "y":2}, + {"label":"]", "x":13.25, "y":2}, + {"label":"Enter", "x":14.25, "y":1, "w":1.25, "h":2}, + {"label":"Shift", "x":0, "y":3, "w":1.75}, + {"label":"Z", "x":1.75, "y":3}, + {"label":"X", "x":2.75, "y":3}, + {"label":"C", "x":3.75, "y":3}, + {"label":"V", "x":4.75, "y":3}, + {"label":"B", "x":5.75, "y":3}, + {"label":"N", "x":7.75, "y":3}, + {"label":"M", "x":8.75, "y":3}, + {"label":",", "x":9.75, "y":3}, + {"label":".", "x":10.75, "y":3}, + {"label":"/", "x":11.75, "y":3}, + {"label":"up", "x":12.75, "y":3}, + {"label":"Shift", "x":13.75, "y":3, "w":1.75}, + {"label":"Ctrl", "x":0, "y":4}, + {"label":"Alt", "x":1, "y":4}, + {"label":"command", "x":2, "y":4, "w":1.25}, + {"label":"EISU", "x":3.25, "y":4, "w":1.25}, + {"label":"", "x":4.5, "y":4, "w":1.75}, + {"label":"", "x":7.25, "y":4, "w":1.5}, + {"label":"KANA", "x":8.75, "y":4, "w":1.5}, + {"label":"command", "x":10.25, "y":4, "w":1.5}, + {"label":"left", "x":11.75, "y":4}, + {"label":"down", "x":12.75, "y":4}, + {"label":"right", "x":13.75, "y":4} + ] + } + } +} diff --git a/keyboards/majistic/keymaps/default/config.h b/keyboards/majistic/keymaps/default/config.h new file mode 100644 index 000000000000..4db5715cbacc --- /dev/null +++ b/keyboards/majistic/keymaps/default/config.h @@ -0,0 +1,17 @@ +/* Copyright 2020 yossiyossy + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License 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/majistic/keymaps/default/keymap.c b/keyboards/majistic/keymaps/default/keymap.c new file mode 100644 index 000000000000..e26a631d719d --- /dev/null +++ b/keyboards/majistic/keymaps/default/keymap.c @@ -0,0 +1,45 @@ +/* Copyright 2020 yossiyossy + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public 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" + +// Defines names for use in layer keycodes and the keymap +enum layer_names { + _BASE, + _LOWER, +}; + +enum custom_keycodes { + L_SPC = SAFE_RANGE, +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* Base */ + [_BASE] = LAYOUT( + JP_1, JP_2, JP_3, JP_4, JP_5, JP_6, JP_7, JP_8, JP_9, JP_0, JP_MINS, JP_CIRC, JP_YEN, KC_BSPC, \ + 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_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_ENT , \ + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, JP_COMM, JP_DOT, JP_SLSH, KC_UP, KC_RSFT, \ + KC_LCTL, KC_LALT, KC_LGUI, KC_LANG2, LT(_LOWER, KC_SPC), LT(_LOWER, KC_SPC), KC_LANG1, KC_RGUI, KC_LEFT, KC_DOWN, KC_RIGHT \ + ), + [_LOWER] = 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_ESC, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, JP_UNDS, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_BRMU, KC_VOLU, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, KC_BRMD, KC_VOLD, _______ \ + ), +}; diff --git a/keyboards/majistic/keymaps/default/readme.md b/keyboards/majistic/keymaps/default/readme.md new file mode 100644 index 000000000000..65ee11cd798e --- /dev/null +++ b/keyboards/majistic/keymaps/default/readme.md @@ -0,0 +1 @@ +# The default keymap for maJIStic diff --git a/keyboards/majistic/majistic.c b/keyboards/majistic/majistic.c new file mode 100644 index 000000000000..7ceba7cf2899 --- /dev/null +++ b/keyboards/majistic/majistic.c @@ -0,0 +1,17 @@ +/* Copyright 2020 yossiyossy + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#include "majistic.h" diff --git a/keyboards/majistic/majistic.h b/keyboards/majistic/majistic.h new file mode 100644 index 000000000000..77c4a4912146 --- /dev/null +++ b/keyboards/majistic/majistic.h @@ -0,0 +1,47 @@ +/* Copyright 2020 yossiyossy + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License 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, r00, r01, r02, r03, r04, r05, r06, r07, \ + l10, l11, l12, l13, l14, l15, r10, r11, r12, r13, r14, r15, r16, \ + l20, l21, l22, l23, l24, l25, r20, r21, r22, r23, r24, r25, r26, r17, \ + l30, l31, l32, l33, l34, l35, r30, r31, r32, r33, r34, r35, r36, \ + l40, l41, l42, l43, l44, r40, r41, r42, r43, r44, r45 \ +) {\ + { l00, l01, l02, l03, l04, l05, KC_NO, KC_NO }, \ + { l10, l11, l12, l13, l14, l15, KC_NO, KC_NO }, \ + { l20, l21, l22, l23, l24, l25, KC_NO, KC_NO}, \ + { l30, l31, l32, l33, l34, l35, KC_NO, KC_NO}, \ + { l40, l41, l42, l43, l44, KC_NO, KC_NO, KC_NO}, \ + { r00, r01, r02, r03, r04, r05, r06, r07 }, \ + { r10, r11, r12, r13, r14, r15, r16, r17 }, \ + { r20, r21, r22, r23, r24, r25, r26, KC_NO }, \ + { r30, r31, r32, r33, r34, r35, r36, KC_NO }, \ + { r40, r41, r42, r43, r44, r45, KC_NO, KC_NO } \ +} diff --git a/keyboards/majistic/readme.md b/keyboards/majistic/readme.md new file mode 100644 index 000000000000..05916af4e5f7 --- /dev/null +++ b/keyboards/majistic/readme.md @@ -0,0 +1,15 @@ +# maJIStic + +![maJIStic](https://raw.githubusercontent.com/yossiyossy/maJIStic/master/images/main_image.jpg) + +maJIStic is a split, JIS, magic keyboard like, hot-swappable keybaord! + +* Keyboard Maintainer: [yossiyossy](https://github.com/yossiyossy) +* Hardware Supported: [pcb](https://github.com/yossiyossy/maJIStic/tree/master/pcb), [case](https://github.com/yossiyossy/maJIStic/tree/master/case/dxf) +* Hardware Availability: [booth](https://yossiyossy.booth.pm/items/2325429) + +Make example for this keyboard (after setting up your build environment): + + make majistic: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/majistic/rules.mk b/keyboards/majistic/rules.mk new file mode 100644 index 000000000000..2440fc903d5d --- /dev/null +++ b/keyboards/majistic/rules.mk @@ -0,0 +1,24 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +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 = 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 +BLUETOOTH_ENABLE = no # Enable Bluetooth +AUDIO_ENABLE = no # Audio output + +SPLIT_KEYBOARD = yes From a21e487fbc8bf81d66f32224477f0db52b34a3f3 Mon Sep 17 00:00:00 2001 From: fauxpark Date: Fri, 10 Jul 2020 13:15:37 +1000 Subject: [PATCH 800/930] Consolidate udev rules into a single file --- docs/faq_build.md | 123 ++++++++++++++++------------------------------ 1 file changed, 43 insertions(+), 80 deletions(-) diff --git a/docs/faq_build.md b/docs/faq_build.md index e2d0f9b27a53..990ebe3aff51 100644 --- a/docs/faq_build.md +++ b/docs/faq_build.md @@ -13,63 +13,66 @@ An example of using `sudo`, when your controller is ATMega32u4: or just: - $ sudo make ::dfu + $ sudo make ::flash Note that running `make` with `sudo` is generally ***not*** a good idea, and you should use one of the former methods, if possible. ### Linux `udev` Rules -On Linux, you'll need proper privileges to access the MCU. You can either use -`sudo` when flashing firmware, or place these files in `/etc/udev/rules.d/`. Once added run the following: -```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", TAG+="uaccess", RUN{builtin}+="uaccess" -# Atmel USBKEY AT90USB1287 -SUBSYSTEMS=="usb", ATTRS{idVendor}=="03eb", ATTRS{idProduct}=="2ffb", TAG+="uaccess", RUN{builtin}+="uaccess" -# Atmel ATMega32U2 -SUBSYSTEMS=="usb", ATTRS{idVendor}=="03eb", ATTRS{idProduct}=="2ff0", TAG+="uaccess", RUN{builtin}+="uaccess" +On Linux, you'll need proper privileges to communicate with the bootloader device. You can either use `sudo` when flashing firmware, or place this file in `/etc/udev/rules.d/`: + +**/etc/udev/rules.d/50-qmk.rules:** ``` +# Atmel DFU +# ATmega16U2 +SUBSYSTEMS=="usb", ATTRS{idVendor}=="03EB", ATTRS{idProduct}=="2FEF", TAG+="uaccess", RUN{builtin}+="uaccess" +# ATmega32U2 +SUBSYSTEMS=="usb", ATTRS{idVendor}=="03EB", ATTRS{idProduct}=="2FF0", TAG+="uaccess", RUN{builtin}+="uaccess" +# ATmega16U4 +SUBSYSTEMS=="usb", ATTRS{idVendor}=="03EB", ATTRS{idProduct}=="2FF3", TAG+="uaccess", RUN{builtin}+="uaccess" +# ATmega32U4 +SUBSYSTEMS=="usb", ATTRS{idVendor}=="03EB", ATTRS{idProduct}=="2FF4", TAG+="uaccess", RUN{builtin}+="uaccess" +# AT90USB128 +SUBSYSTEMS=="usb", ATTRS{idVendor}=="03EB", ATTRS{idProduct}=="2FF9", TAG+="uaccess", RUN{builtin}+="uaccess" +# AT90USB128 +SUBSYSTEMS=="usb", ATTRS{idVendor}=="03EB", ATTRS{idProduct}=="2FFB", TAG+="uaccess", RUN{builtin}+="uaccess" -**/etc/udev/rules.d/54-input-club-keyboard.rules:** +# Input Club +SUBSYSTEMS=="usb", ATTRS{idVendor}=="1C11", ATTRS{idProduct}=="B007", TAG+="uaccess", RUN{builtin}+="uaccess" -``` -# Input Club keyboard bootloader -SUBSYSTEMS=="usb", ATTRS{idVendor}=="1c11", ATTRS{idProduct}=="b007", TAG+="uaccess", RUN{builtin}+="uaccess" -``` +# STM32duino +SUBSYSTEMS=="usb", ATTRS{idVendor}=="1EAF", ATTRS{idProduct}=="0003", TAG+="uaccess", RUN{builtin}+="uaccess" +# STM32 DFU +SUBSYSTEMS=="usb", ATTRS{idVendor}=="0483", ATTRS{idProduct}=="DF11", TAG+="uaccess", RUN{builtin}+="uaccess" + +# BootloadHID +SUBSYSTEMS=="usb", ATTRS{idVendor}=="16C0", ATTRS{idProduct}=="05DF", TAG+="uaccess", RUN{builtin}+="uaccess" + +# USBAspLoader +SUBSYSTEMS=="usb", ATTRS{idVendor}=="16C0", ATTRS{idProduct}=="05DC", TAG+="uaccess", RUN{builtin}+="uaccess" -**/etc/udev/rules.d/55-caterina.rules:** -``` # ModemManager should ignore the following devices -SUBSYSTEMS=="usb", ATTRS{idVendor}=="2a03", ATTRS{idProduct}=="0036", TAG+="uaccess", RUN{builtin}+="uaccess", ENV{ID_MM_DEVICE_IGNORE}="1" -SUBSYSTEMS=="usb", ATTRS{idVendor}=="2341", ATTRS{idProduct}=="0036", TAG+="uaccess", RUN{builtin}+="uaccess", ENV{ID_MM_DEVICE_IGNORE}="1" -SUBSYSTEMS=="usb", ATTRS{idVendor}=="1b4f", ATTRS{idProduct}=="9205", TAG+="uaccess", RUN{builtin}+="uaccess", ENV{ID_MM_DEVICE_IGNORE}="1" -SUBSYSTEMS=="usb", ATTRS{idVendor}=="1b4f", ATTRS{idProduct}=="9203", TAG+="uaccess", RUN{builtin}+="uaccess", ENV{ID_MM_DEVICE_IGNORE}="1" +# Atmel SAM-BA (Massdrop) +SUBSYSTEMS=="usb", ATTRS{idVendor}=="03EB" ATTRS{idProduct}=="6124" TAG+="uaccess", RUN{builtin}+="uaccess", ENV{ID_MM_DEVICE_IGNORE}="1" +# Caterina +SUBSYSTEMS=="usb", ATTRS{idVendor}=="2A03" TAG+="uaccess", RUN{builtin}+="uaccess", ENV{ID_MM_DEVICE_IGNORE}="1" +SUBSYSTEMS=="usb", ATTRS{idVendor}=="2341" TAG+="uaccess", RUN{builtin}+="uaccess", ENV{ID_MM_DEVICE_IGNORE}="1" +SUBSYSTEMS=="usb", ATTRS{idVendor}=="1B4F" TAG+="uaccess", RUN{builtin}+="uaccess", ENV{ID_MM_DEVICE_IGNORE}="1" ``` -**Note:** With older (before 1.12) ModemManager, filtering only works when not in strict mode, the following commands can update that settings: -```console -printf '[Service]\nExecStart=\nExecStart=/usr/sbin/ModemManager --filter-policy=default' | sudo tee /etc/systemd/system/ModemManager.service.d/policy.conf -sudo systemctl daemon-reload -sudo systemctl restart ModemManager -``` +Once added, run the following: -**/etc/udev/rules.d/56-dfu-util.rules:** ``` -# stm32duino -SUBSYSTEMS=="usb", ATTRS{idVendor}=="1eaf", ATTRS{idProduct}=="0003", TAG+="uaccess", RUN{builtin}+="uaccess" -# Generic stm32 -SUBSYSTEMS=="usb", ATTRS{idVendor}=="0483", ATTRS{idProduct}=="df11", TAG+="uaccess", RUN{builtin}+="uaccess" +sudo udevadm control --reload-rules +sudo udevadm trigger ``` -**/etc/udev/rules.d/57-bootloadhid.rules:** +**Note:** With older versions of ModemManager (< 1.12), filtering only works when not in strict mode. The following commands can update that setting: + ``` -# bootloadHID -SUBSYSTEMS=="usb", ATTRS{idVendor}=="16c0", ATTRS{idProduct}=="05df", TAG+="uaccess", RUN{builtin}+="uaccess" +printf '[Service]\nExecStart=\nExecStart=/usr/sbin/ModemManager --filter-policy=default' | sudo tee /etc/systemd/system/ModemManager.service.d/policy.conf +sudo systemctl daemon-reload +sudo systemctl restart ModemManager ``` ### Serial device is not detected in bootloader mode on Linux @@ -96,46 +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 -## BOOTLOADER_SIZE for AVR -Note that Teensy2.0++ bootloader size is 2048byte. Some Makefiles may have wrong comment. - -``` -# 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 -``` - -## `avr-gcc: internal compiler error: Abort trap: 6 (program cc1)` on MacOS - -This is an issue with updating on brew, causing symlinks that avr-gcc depend on getting mangled. - -The solution is to remove and reinstall all affected modules. - -``` -brew rm avr-gcc avr-gcc@8 dfu-programmer dfu-util gcc-arm-none-eabi arm-gcc-bin@8 avrdude qmk -brew install qmk/qmk/qmk -brew link --force avr-gcc@8 -brew link --force arm-gcc-bin@8 -``` - -### `avr-gcc` and LUFA - -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 8 in Homebrew. - -``` -brew uninstall --force avr-gcc -brew install avr-gcc@8 -brew link --force avr-gcc@8 -``` - ### I just flashed my keyboard and it does nothing/keypresses don't register - it's also ARM (rev6 planck, clueboard 60, hs60v2, etc...) (Feb 2019) Due to how EEPROM works on ARM based chips, saved settings may no longer be valid. This affects the default layers, and *may*, under certain circumstances we are still figuring out, make the keyboard unusable. Resetting the EEPROM will correct this. From 07e37c857c76154325774d56af53d94d99016cff Mon Sep 17 00:00:00 2001 From: fauxpark Date: Sat, 11 Jul 2020 12:37:01 +1000 Subject: [PATCH 801/930] Update rules in doctor.py --- docs/faq_build.md | 4 ++-- lib/python/qmk/cli/doctor.py | 33 ++++++++++++++++++++++++--------- 2 files changed, 26 insertions(+), 11 deletions(-) diff --git a/docs/faq_build.md b/docs/faq_build.md index 990ebe3aff51..41a11bb58d54 100644 --- a/docs/faq_build.md +++ b/docs/faq_build.md @@ -32,7 +32,7 @@ SUBSYSTEMS=="usb", ATTRS{idVendor}=="03EB", ATTRS{idProduct}=="2FF0", TAG+="uacc SUBSYSTEMS=="usb", ATTRS{idVendor}=="03EB", ATTRS{idProduct}=="2FF3", TAG+="uaccess", RUN{builtin}+="uaccess" # ATmega32U4 SUBSYSTEMS=="usb", ATTRS{idVendor}=="03EB", ATTRS{idProduct}=="2FF4", TAG+="uaccess", RUN{builtin}+="uaccess" -# AT90USB128 +# AT90USB64 SUBSYSTEMS=="usb", ATTRS{idVendor}=="03EB", ATTRS{idProduct}=="2FF9", TAG+="uaccess", RUN{builtin}+="uaccess" # AT90USB128 SUBSYSTEMS=="usb", ATTRS{idVendor}=="03EB", ATTRS{idProduct}=="2FFB", TAG+="uaccess", RUN{builtin}+="uaccess" @@ -54,7 +54,7 @@ SUBSYSTEMS=="usb", ATTRS{idVendor}=="16C0", ATTRS{idProduct}=="05DC", TAG+="uacc # ModemManager should ignore the following devices # Atmel SAM-BA (Massdrop) SUBSYSTEMS=="usb", ATTRS{idVendor}=="03EB" ATTRS{idProduct}=="6124" TAG+="uaccess", RUN{builtin}+="uaccess", ENV{ID_MM_DEVICE_IGNORE}="1" -# Caterina +# Caterina (Pro Micro) SUBSYSTEMS=="usb", ATTRS{idVendor}=="2A03" TAG+="uaccess", RUN{builtin}+="uaccess", ENV{ID_MM_DEVICE_IGNORE}="1" SUBSYSTEMS=="usb", ATTRS{idVendor}=="2341" TAG+="uaccess", RUN{builtin}+="uaccess", ENV{ID_MM_DEVICE_IGNORE}="1" SUBSYSTEMS=="usb", ATTRS{idVendor}=="1B4F" TAG+="uaccess", RUN{builtin}+="uaccess", ENV{ID_MM_DEVICE_IGNORE}="1" diff --git a/lib/python/qmk/cli/doctor.py b/lib/python/qmk/cli/doctor.py index 4d7ba52181da..46a2180b22d4 100755 --- a/lib/python/qmk/cli/doctor.py +++ b/lib/python/qmk/cli/doctor.py @@ -149,15 +149,30 @@ def check_udev_rules(): ok = True udev_dir = Path("/etc/udev/rules.d/") desired_rules = { - 'dfu': {_udev_rule("03eb", "2ff4"), _udev_rule("03eb", "2ffb"), _udev_rule("03eb", "2ff0")}, - 'input_club': {_udev_rule("1c11", "b007")}, - 'stm32': {_udev_rule("1eaf", "0003"), _udev_rule("0483", "df11")}, - 'bootloadhid': {_udev_rule("16c0", "05df")}, - 'caterina': { - _udev_rule("2341", "0036", 'ENV{ID_MM_DEVICE_IGNORE}="1"'), - _udev_rule("1b4f", "9205", 'ENV{ID_MM_DEVICE_IGNORE}="1"'), - _udev_rule("1b4f", "9203", 'ENV{ID_MM_DEVICE_IGNORE}="1"'), - _udev_rule("2a03", "0036", 'ENV{ID_MM_DEVICE_IGNORE}="1"') + 'qmk': { + # Atmel DFU + _udev_rule("03EB", "2FEF"), # ATmega16U2 + _udev_rule("03EB", "2FF0"), # ATmega32U2 + _udev_rule("03EB", "2FF3"), # ATmega16U4 + _udev_rule("03EB", "2FF4"), # ATmega32U4 + _udev_rule("03EB", "2FF9"), # AT90USB64 + _udev_rule("03EB", "2FFB"), # AT90USB128 + # Kiibohd bootloader + _udev_rule("1C11", "B007"), + # STM32duino + _udev_rule("1EAF", "0003"), + # STM32 DFU + _udev_rule("0483", "DF11"), + # BootloadHID + _udev_rule("16C0", "05DF"), + # USBAspLoader + _udev_rule("16C0", "05DC"), + # Atmel SAM-Ba (Massdrop) + _udev_rule("03EB", "6124"), + # Caterina (Pro Micro) + _udev_rule("1B4F", None, 'ENV{ID_MM_DEVICE_IGNORE}="1"'), # Sparkfun + _udev_rule("2341", None, 'ENV{ID_MM_DEVICE_IGNORE}="1"'), # Arduino SA + _udev_rule("2A03", None, 'ENV{ID_MM_DEVICE_IGNORE}="1"') # dog hunter AG } } From 510138f525a5ba216a170a0e0e94a4cf940a0c67 Mon Sep 17 00:00:00 2001 From: fauxpark Date: Sat, 11 Jul 2020 12:52:36 +1000 Subject: [PATCH 802/930] Simplify doctor rule checking --- lib/python/qmk/cli/doctor.py | 67 +++++++++++++++++------------------- 1 file changed, 32 insertions(+), 35 deletions(-) diff --git a/lib/python/qmk/cli/doctor.py b/lib/python/qmk/cli/doctor.py index 46a2180b22d4..81b27216ef72 100755 --- a/lib/python/qmk/cli/doctor.py +++ b/lib/python/qmk/cli/doctor.py @@ -149,31 +149,29 @@ def check_udev_rules(): ok = True udev_dir = Path("/etc/udev/rules.d/") desired_rules = { - 'qmk': { - # Atmel DFU - _udev_rule("03EB", "2FEF"), # ATmega16U2 - _udev_rule("03EB", "2FF0"), # ATmega32U2 - _udev_rule("03EB", "2FF3"), # ATmega16U4 - _udev_rule("03EB", "2FF4"), # ATmega32U4 - _udev_rule("03EB", "2FF9"), # AT90USB64 - _udev_rule("03EB", "2FFB"), # AT90USB128 - # Kiibohd bootloader - _udev_rule("1C11", "B007"), - # STM32duino - _udev_rule("1EAF", "0003"), - # STM32 DFU - _udev_rule("0483", "DF11"), - # BootloadHID - _udev_rule("16C0", "05DF"), - # USBAspLoader - _udev_rule("16C0", "05DC"), - # Atmel SAM-Ba (Massdrop) - _udev_rule("03EB", "6124"), - # Caterina (Pro Micro) - _udev_rule("1B4F", None, 'ENV{ID_MM_DEVICE_IGNORE}="1"'), # Sparkfun - _udev_rule("2341", None, 'ENV{ID_MM_DEVICE_IGNORE}="1"'), # Arduino SA - _udev_rule("2A03", None, 'ENV{ID_MM_DEVICE_IGNORE}="1"') # dog hunter AG - } + # Atmel DFU + _udev_rule("03EB", "2FEF"), # ATmega16U2 + _udev_rule("03EB", "2FF0"), # ATmega32U2 + _udev_rule("03EB", "2FF3"), # ATmega16U4 + _udev_rule("03EB", "2FF4"), # ATmega32U4 + _udev_rule("03EB", "2FF9"), # AT90USB64 + _udev_rule("03EB", "2FFB"), # AT90USB128 + # Kiibohd bootloader + _udev_rule("1C11", "B007"), + # STM32duino + _udev_rule("1EAF", "0003"), + # STM32 DFU + _udev_rule("0483", "DF11"), + # BootloadHID + _udev_rule("16C0", "05DF"), + # USBAspLoader + _udev_rule("16C0", "05DC"), + # Atmel SAM-Ba (Massdrop) + _udev_rule("03EB", "6124"), + # Caterina (Pro Micro) + _udev_rule("1B4F", None, 'ENV{ID_MM_DEVICE_IGNORE}="1"'), # Sparkfun + _udev_rule("2341", None, 'ENV{ID_MM_DEVICE_IGNORE}="1"'), # Arduino SA + _udev_rule("2A03", None, 'ENV{ID_MM_DEVICE_IGNORE}="1"') # dog hunter AG } # These rules are no longer recommended, only use them to check for their presence. @@ -197,18 +195,17 @@ def check_udev_rules(): current_rules.add(line) # Check if the desired rules are among the currently present rules - for bootloader, rules in desired_rules.items(): + for rules in desired_rules.items(): # For caterina, check if ModemManager is running - if bootloader == "caterina": - if check_modem_manager(): - ok = False - cli.log.warn("{bg_yellow}Detected ModemManager without the necessary udev rules. Please either disable it or set the appropriate udev rules if you are using a Pro Micro.") + if check_modem_manager(): + ok = False + cli.log.warn("{bg_yellow}Detected ModemManager without the necessary udev rules. Please either disable it or set the appropriate udev rules if you are using a Pro Micro.") if not rules.issubset(current_rules): - deprecated_rule = deprecated_rules.get(bootloader) - if deprecated_rule and deprecated_rule.issubset(current_rules): - cli.log.warn("{bg_yellow}Found old, deprecated udev rules for '%s' boards. The new rules on https://docs.qmk.fm/#/faq_build?id=linux-udev-rules offer better security with the same functionality.", bootloader) - else: - cli.log.warn("{bg_yellow}Missing udev rules for '%s' boards. You'll need to use `sudo` in order to flash them.", bootloader) + for bootloader, rules in deprecated_rules.items(): + if deprecated_rule and deprecated_rule.issubset(current_rules): + cli.log.warn("{bg_yellow}Found old, deprecated udev rules for '%s' boards. The new rules on https://docs.qmk.fm/#/faq_build?id=linux-udev-rules offer better security with the same functionality.", bootloader) + 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 From eee6dd35446542c40c0f2a7827d9754aefd248e9 Mon Sep 17 00:00:00 2001 From: fauxpark Date: Sat, 11 Jul 2020 21:05:26 +1000 Subject: [PATCH 803/930] Fix errors --- lib/python/qmk/cli/doctor.py | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/lib/python/qmk/cli/doctor.py b/lib/python/qmk/cli/doctor.py index 81b27216ef72..89ac7c82a0c9 100755 --- a/lib/python/qmk/cli/doctor.py +++ b/lib/python/qmk/cli/doctor.py @@ -150,12 +150,12 @@ def check_udev_rules(): udev_dir = Path("/etc/udev/rules.d/") desired_rules = { # Atmel DFU - _udev_rule("03EB", "2FEF"), # ATmega16U2 - _udev_rule("03EB", "2FF0"), # ATmega32U2 - _udev_rule("03EB", "2FF3"), # ATmega16U4 - _udev_rule("03EB", "2FF4"), # ATmega32U4 - _udev_rule("03EB", "2FF9"), # AT90USB64 - _udev_rule("03EB", "2FFB"), # AT90USB128 + _udev_rule("03EB", "2FEF"), # ATmega16U2 + _udev_rule("03EB", "2FF0"), # ATmega32U2 + _udev_rule("03EB", "2FF3"), # ATmega16U4 + _udev_rule("03EB", "2FF4"), # ATmega32U4 + _udev_rule("03EB", "2FF9"), # AT90USB64 + _udev_rule("03EB", "2FFB"), # AT90USB128 # Kiibohd bootloader _udev_rule("1C11", "B007"), # STM32duino @@ -169,9 +169,9 @@ def check_udev_rules(): # Atmel SAM-Ba (Massdrop) _udev_rule("03EB", "6124"), # Caterina (Pro Micro) - _udev_rule("1B4F", None, 'ENV{ID_MM_DEVICE_IGNORE}="1"'), # Sparkfun - _udev_rule("2341", None, 'ENV{ID_MM_DEVICE_IGNORE}="1"'), # Arduino SA - _udev_rule("2A03", None, 'ENV{ID_MM_DEVICE_IGNORE}="1"') # dog hunter AG + _udev_rule("1B4F", None, 'ENV{ID_MM_DEVICE_IGNORE}="1"'), # Sparkfun + _udev_rule("2341", None, 'ENV{ID_MM_DEVICE_IGNORE}="1"'), # Arduino SA + _udev_rule("2A03", None, 'ENV{ID_MM_DEVICE_IGNORE}="1"') # dog hunter AG } # These rules are no longer recommended, only use them to check for their presence. @@ -201,8 +201,8 @@ def check_udev_rules(): ok = False cli.log.warn("{bg_yellow}Detected ModemManager without the necessary udev rules. Please either disable it or set the appropriate udev rules if you are using a Pro Micro.") if not rules.issubset(current_rules): - for bootloader, rules in deprecated_rules.items(): - if deprecated_rule and deprecated_rule.issubset(current_rules): + for bootloader, rule in deprecated_rules.items(): + if rule and rule.issubset(current_rules): cli.log.warn("{bg_yellow}Found old, deprecated udev rules for '%s' boards. The new rules on https://docs.qmk.fm/#/faq_build?id=linux-udev-rules offer better security with the same functionality.", bootloader) else: cli.log.warn("{bg_yellow}Missing udev rules for '%s' boards. You'll need to use `sudo` in order to flash them.", bootloader) From 72b1ff5899763cf76b1cc1669c684fbc45cee7c4 Mon Sep 17 00:00:00 2001 From: fauxpark Date: Mon, 13 Jul 2020 01:24:28 +1000 Subject: [PATCH 804/930] Add TMK "FEED" VID to list of deprecated udev rules --- docs/faq_debug.md | 14 -------------- lib/python/qmk/cli/doctor.py | 1 + 2 files changed, 1 insertion(+), 14 deletions(-) diff --git a/docs/faq_debug.md b/docs/faq_debug.md index 08c84fe4fd3d..7d5473678b3c 100644 --- a/docs/faq_debug.md +++ b/docs/faq_debug.md @@ -31,20 +31,6 @@ Check: - try using 'print' function instead of debug print. See **common/print.h**. - disconnect other devices with console function. See [Issue #97](https://github.com/tmk/tmk_keyboard/issues/97). -## Linux or UNIX Like System Requires Super User Privilege -Just use 'sudo' to execute *hid_listen* with privilege. -``` -$ sudo hid_listen -``` - -Or add an *udev rule* for TMK devices with placing a file in rules directory. The directory may vary on each system. - -File: /etc/udev/rules.d/52-tmk-keyboard.rules(in case of Ubuntu) -``` -# tmk keyboard products https://github.com/tmk/tmk_keyboard -SUBSYSTEMS=="usb", ATTRS{idVendor}=="feed", MODE:="0666" -``` - *** # Miscellaneous diff --git a/lib/python/qmk/cli/doctor.py b/lib/python/qmk/cli/doctor.py index 89ac7c82a0c9..1bfec6349bf8 100755 --- a/lib/python/qmk/cli/doctor.py +++ b/lib/python/qmk/cli/doctor.py @@ -181,6 +181,7 @@ def check_udev_rules(): 'stm32': {_deprecated_udev_rule("1eaf", "0003"), _deprecated_udev_rule("0483", "df11")}, 'bootloadhid': {_deprecated_udev_rule("16c0", "05df")}, 'caterina': {'ATTRS{idVendor}=="2a03", ENV{ID_MM_DEVICE_IGNORE}="1"', 'ATTRS{idVendor}=="2341", ENV{ID_MM_DEVICE_IGNORE}="1"'} + 'tmk': {_deprecated_udev_rule("feed")} } if udev_dir.exists(): From 7921c5d9b8d5726a916a89e01e7aa92d82fed067 Mon Sep 17 00:00:00 2001 From: fauxpark Date: Mon, 13 Jul 2020 01:26:46 +1000 Subject: [PATCH 805/930] A comma would be nice --- 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 1bfec6349bf8..a431a160ccdb 100755 --- a/lib/python/qmk/cli/doctor.py +++ b/lib/python/qmk/cli/doctor.py @@ -180,7 +180,7 @@ def check_udev_rules(): 'input_club': {_deprecated_udev_rule("1c11")}, 'stm32': {_deprecated_udev_rule("1eaf", "0003"), _deprecated_udev_rule("0483", "df11")}, 'bootloadhid': {_deprecated_udev_rule("16c0", "05df")}, - '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"'}, 'tmk': {_deprecated_udev_rule("feed")} } From 4bee445c2f086a31e34135c2a08cf4fbfe7daf94 Mon Sep 17 00:00:00 2001 From: fauxpark Date: Mon, 13 Jul 2020 01:33:43 +1000 Subject: [PATCH 806/930] Split rules back up into bootloaders --- lib/python/qmk/cli/doctor.py | 75 ++++++++++++++++++++---------------- 1 file changed, 41 insertions(+), 34 deletions(-) diff --git a/lib/python/qmk/cli/doctor.py b/lib/python/qmk/cli/doctor.py index a431a160ccdb..dac1533ac61c 100755 --- a/lib/python/qmk/cli/doctor.py +++ b/lib/python/qmk/cli/doctor.py @@ -149,35 +149,41 @@ def check_udev_rules(): ok = True udev_dir = Path("/etc/udev/rules.d/") desired_rules = { - # Atmel DFU - _udev_rule("03EB", "2FEF"), # ATmega16U2 - _udev_rule("03EB", "2FF0"), # ATmega32U2 - _udev_rule("03EB", "2FF3"), # ATmega16U4 - _udev_rule("03EB", "2FF4"), # ATmega32U4 - _udev_rule("03EB", "2FF9"), # AT90USB64 - _udev_rule("03EB", "2FFB"), # AT90USB128 - # Kiibohd bootloader - _udev_rule("1C11", "B007"), - # STM32duino - _udev_rule("1EAF", "0003"), - # STM32 DFU - _udev_rule("0483", "DF11"), - # BootloadHID - _udev_rule("16C0", "05DF"), - # USBAspLoader - _udev_rule("16C0", "05DC"), - # Atmel SAM-Ba (Massdrop) - _udev_rule("03EB", "6124"), - # Caterina (Pro Micro) - _udev_rule("1B4F", None, 'ENV{ID_MM_DEVICE_IGNORE}="1"'), # Sparkfun - _udev_rule("2341", None, 'ENV{ID_MM_DEVICE_IGNORE}="1"'), # Arduino SA - _udev_rule("2A03", None, 'ENV{ID_MM_DEVICE_IGNORE}="1"') # dog hunter AG + 'atmel-dfu': { + _udev_rule("03EB", "2FEF"), # ATmega16U2 + _udev_rule("03EB", "2FF0"), # ATmega32U2 + _udev_rule("03EB", "2FF3"), # ATmega16U4 + _udev_rule("03EB", "2FF4"), # ATmega32U4 + _udev_rule("03EB", "2FF9"), # AT90USB64 + _udev_rule("03EB", "2FFB") # AT90USB128 + }, + 'kiibohd': { + _udev_rule("1C11", "B007") + }, + 'stm32': { + _udev_rule("1EAF", "0003"), # STM32duino + _udev_rule("0483", "DF11") # STM32 DFU + }, + 'bootloadhid': { + _udev_rule("16C0", "05DF") + }, + 'usbasploader': { + _udev_rule("16C0", "05DC") + }, + 'massdrop': { + _udev_rule("03EB", "6124") + }, + 'caterina': { + _udev_rule("1B4F", None, 'ENV{ID_MM_DEVICE_IGNORE}="1"'), # Sparkfun + _udev_rule("2341", None, 'ENV{ID_MM_DEVICE_IGNORE}="1"'), # Arduino SA + _udev_rule("2A03", None, 'ENV{ID_MM_DEVICE_IGNORE}="1"') # dog hunter AG + } } # These rules are no longer recommended, only use them to check for their presence. deprecated_rules = { - 'dfu': {_deprecated_udev_rule("03eb", "2ff4"), _deprecated_udev_rule("03eb", "2ffb"), _deprecated_udev_rule("03eb", "2ff0")}, - 'input_club': {_deprecated_udev_rule("1c11")}, + 'atmel-dfu': {_deprecated_udev_rule("03eb", "2ff4"), _deprecated_udev_rule("03eb", "2ffb"), _deprecated_udev_rule("03eb", "2ff0")}, + 'kiibohd': {_deprecated_udev_rule("1c11")}, 'stm32': {_deprecated_udev_rule("1eaf", "0003"), _deprecated_udev_rule("0483", "df11")}, 'bootloadhid': {_deprecated_udev_rule("16c0", "05df")}, 'caterina': {'ATTRS{idVendor}=="2a03", ENV{ID_MM_DEVICE_IGNORE}="1"', 'ATTRS{idVendor}=="2341", ENV{ID_MM_DEVICE_IGNORE}="1"'}, @@ -196,17 +202,18 @@ def check_udev_rules(): current_rules.add(line) # Check if the desired rules are among the currently present rules - for rules in desired_rules.items(): + for bootloader, rules in desired_rules.items(): # For caterina, check if ModemManager is running - if check_modem_manager(): - ok = False - cli.log.warn("{bg_yellow}Detected ModemManager without the necessary udev rules. Please either disable it or set the appropriate udev rules if you are using a Pro Micro.") + if bootloader == "caterina": + if check_modem_manager(): + ok = False + cli.log.warn("{bg_yellow}Detected ModemManager without the necessary udev rules. Please either disable it or set the appropriate udev rules if you are using a Pro Micro.") if not rules.issubset(current_rules): - for bootloader, rule in deprecated_rules.items(): - if rule and rule.issubset(current_rules): - cli.log.warn("{bg_yellow}Found old, deprecated udev rules for '%s' boards. The new rules on https://docs.qmk.fm/#/faq_build?id=linux-udev-rules offer better security with the same functionality.", bootloader) - else: - cli.log.warn("{bg_yellow}Missing udev rules for '%s' boards. You'll need to use `sudo` in order to flash them.", bootloader) + deprecated_rule = deprecated_rules.get(bootloader) + if deprecated_rule and deprecated_rule.issubset(current_rules): + cli.log.warn("{bg_yellow}Found old, deprecated udev rules for '%s' boards. The new rules on https://docs.qmk.fm/#/faq_build?id=linux-udev-rules offer better security with the same functionality.", bootloader) + 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 From ef1b050b32b7a6ec5037489503caa92a527f6ab3 Mon Sep 17 00:00:00 2001 From: fauxpark Date: Mon, 13 Jul 2020 01:37:31 +1000 Subject: [PATCH 807/930] Link to docs page in "missing" case --- 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 dac1533ac61c..beb884a36f50 100755 --- a/lib/python/qmk/cli/doctor.py +++ b/lib/python/qmk/cli/doctor.py @@ -213,7 +213,7 @@ def check_udev_rules(): if deprecated_rule and deprecated_rule.issubset(current_rules): cli.log.warn("{bg_yellow}Found old, deprecated udev rules for '%s' boards. The new rules on https://docs.qmk.fm/#/faq_build?id=linux-udev-rules offer better security with the same functionality.", bootloader) else: - cli.log.warn("{bg_yellow}Missing udev rules for '%s' boards. You'll need to use `sudo` in order to flash them.", bootloader) + cli.log.warn("{bg_yellow}Missing udev rules for '%s' boards. See https://docs.qmk.fm/#/faq_build?id=linux-udev-rules for more details.", bootloader) return ok From c2a0cebf8b8e42323d913c5c4b536578c07e0864 Mon Sep 17 00:00:00 2001 From: fauxpark Date: Thu, 27 Aug 2020 13:13:30 +1000 Subject: [PATCH 808/930] Add Pololu VID --- docs/faq_build.md | 8 +++++--- lib/python/qmk/cli/doctor.py | 4 +++- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/docs/faq_build.md b/docs/faq_build.md index 41a11bb58d54..7429446f29de 100644 --- a/docs/faq_build.md +++ b/docs/faq_build.md @@ -55,9 +55,11 @@ SUBSYSTEMS=="usb", ATTRS{idVendor}=="16C0", ATTRS{idProduct}=="05DC", TAG+="uacc # Atmel SAM-BA (Massdrop) SUBSYSTEMS=="usb", ATTRS{idVendor}=="03EB" ATTRS{idProduct}=="6124" TAG+="uaccess", RUN{builtin}+="uaccess", ENV{ID_MM_DEVICE_IGNORE}="1" # Caterina (Pro Micro) -SUBSYSTEMS=="usb", ATTRS{idVendor}=="2A03" TAG+="uaccess", RUN{builtin}+="uaccess", ENV{ID_MM_DEVICE_IGNORE}="1" -SUBSYSTEMS=="usb", ATTRS{idVendor}=="2341" TAG+="uaccess", RUN{builtin}+="uaccess", ENV{ID_MM_DEVICE_IGNORE}="1" -SUBSYSTEMS=="usb", ATTRS{idVendor}=="1B4F" TAG+="uaccess", RUN{builtin}+="uaccess", ENV{ID_MM_DEVICE_IGNORE}="1" +SUBSYSTEMS=="usb", ATTRS{idVendor}=="1B4F" TAG+="uaccess", RUN{builtin}+="uaccess", ENV{ID_MM_DEVICE_IGNORE}="1" # Spark Fun Electronics +SUBSYSTEMS=="usb", ATTRS{idVendor}=="1FFB" TAG+="uaccess", RUN{builtin}+="uaccess", ENV{ID_MM_DEVICE_IGNORE}="1" # Pololu Electronics +SUBSYSTEMS=="usb", ATTRS{idVendor}=="2341" TAG+="uaccess", RUN{builtin}+="uaccess", ENV{ID_MM_DEVICE_IGNORE}="1" # Arduino SA +SUBSYSTEMS=="usb", ATTRS{idVendor}=="239A" TAG+="uaccess", RUN{builtin}+="uaccess", ENV{ID_MM_DEVICE_IGNORE}="1" # Adafruit Industries LLC +SUBSYSTEMS=="usb", ATTRS{idVendor}=="2A03" TAG+="uaccess", RUN{builtin}+="uaccess", ENV{ID_MM_DEVICE_IGNORE}="1" # dog hunter AG ``` Once added, run the following: diff --git a/lib/python/qmk/cli/doctor.py b/lib/python/qmk/cli/doctor.py index beb884a36f50..c1284bb898c0 100755 --- a/lib/python/qmk/cli/doctor.py +++ b/lib/python/qmk/cli/doctor.py @@ -174,8 +174,10 @@ def check_udev_rules(): _udev_rule("03EB", "6124") }, 'caterina': { - _udev_rule("1B4F", None, 'ENV{ID_MM_DEVICE_IGNORE}="1"'), # Sparkfun + _udev_rule("1B4F", None, 'ENV{ID_MM_DEVICE_IGNORE}="1"'), # Spark Fun Electronics + _udev_rule("1FFB", None, 'ENV{ID_MM_DEVICE_IGNORE}="1"'), # Pololu Electronics _udev_rule("2341", None, 'ENV{ID_MM_DEVICE_IGNORE}="1"'), # Arduino SA + _udev_rule("239A", None, 'ENV{ID_MM_DEVICE_IGNORE}="1"'), # Adafruit Industries LLC _udev_rule("2A03", None, 'ENV{ID_MM_DEVICE_IGNORE}="1"') # dog hunter AG } } From a0305f5e7e1ffc19ef2dba077d000915f2fdf35b Mon Sep 17 00:00:00 2001 From: fauxpark Date: Sat, 19 Sep 2020 05:40:25 +1000 Subject: [PATCH 809/930] Be more specific about Caterina devices, and add LilyPad PID --- docs/faq_build.md | 42 ++++++++++++++++++++---------------- lib/python/qmk/cli/doctor.py | 21 +++++++++++++----- 2 files changed, 40 insertions(+), 23 deletions(-) diff --git a/docs/faq_build.md b/docs/faq_build.md index 7429446f29de..131844a2b76c 100644 --- a/docs/faq_build.md +++ b/docs/faq_build.md @@ -24,18 +24,12 @@ On Linux, you'll need proper privileges to communicate with the bootloader devic **/etc/udev/rules.d/50-qmk.rules:** ``` # Atmel DFU -# ATmega16U2 -SUBSYSTEMS=="usb", ATTRS{idVendor}=="03EB", ATTRS{idProduct}=="2FEF", TAG+="uaccess", RUN{builtin}+="uaccess" -# ATmega32U2 -SUBSYSTEMS=="usb", ATTRS{idVendor}=="03EB", ATTRS{idProduct}=="2FF0", TAG+="uaccess", RUN{builtin}+="uaccess" -# ATmega16U4 -SUBSYSTEMS=="usb", ATTRS{idVendor}=="03EB", ATTRS{idProduct}=="2FF3", TAG+="uaccess", RUN{builtin}+="uaccess" -# ATmega32U4 -SUBSYSTEMS=="usb", ATTRS{idVendor}=="03EB", ATTRS{idProduct}=="2FF4", TAG+="uaccess", RUN{builtin}+="uaccess" -# AT90USB64 -SUBSYSTEMS=="usb", ATTRS{idVendor}=="03EB", ATTRS{idProduct}=="2FF9", TAG+="uaccess", RUN{builtin}+="uaccess" -# AT90USB128 -SUBSYSTEMS=="usb", ATTRS{idVendor}=="03EB", ATTRS{idProduct}=="2FFB", TAG+="uaccess", RUN{builtin}+="uaccess" +SUBSYSTEMS=="usb", ATTRS{idVendor}=="03EB", ATTRS{idProduct}=="2FEF", TAG+="uaccess", RUN{builtin}+="uaccess" # ATmega16U2 +SUBSYSTEMS=="usb", ATTRS{idVendor}=="03EB", ATTRS{idProduct}=="2FF0", TAG+="uaccess", RUN{builtin}+="uaccess" # ATmega32U2 +SUBSYSTEMS=="usb", ATTRS{idVendor}=="03EB", ATTRS{idProduct}=="2FF3", TAG+="uaccess", RUN{builtin}+="uaccess" # ATmega16U4 +SUBSYSTEMS=="usb", ATTRS{idVendor}=="03EB", ATTRS{idProduct}=="2FF4", TAG+="uaccess", RUN{builtin}+="uaccess" # ATmega32U4 +SUBSYSTEMS=="usb", ATTRS{idVendor}=="03EB", ATTRS{idProduct}=="2FF9", TAG+="uaccess", RUN{builtin}+="uaccess" # AT90USB64 +SUBSYSTEMS=="usb", ATTRS{idVendor}=="03EB", ATTRS{idProduct}=="2FFB", TAG+="uaccess", RUN{builtin}+="uaccess" # AT90USB128 # Input Club SUBSYSTEMS=="usb", ATTRS{idVendor}=="1C11", ATTRS{idProduct}=="B007", TAG+="uaccess", RUN{builtin}+="uaccess" @@ -53,13 +47,25 @@ SUBSYSTEMS=="usb", ATTRS{idVendor}=="16C0", ATTRS{idProduct}=="05DC", TAG+="uacc # ModemManager should ignore the following devices # Atmel SAM-BA (Massdrop) -SUBSYSTEMS=="usb", ATTRS{idVendor}=="03EB" ATTRS{idProduct}=="6124" TAG+="uaccess", RUN{builtin}+="uaccess", ENV{ID_MM_DEVICE_IGNORE}="1" +SUBSYSTEMS=="usb", ATTRS{idVendor}=="03EB", ATTRS{idProduct}=="6124", TAG+="uaccess", RUN{builtin}+="uaccess", ENV{ID_MM_DEVICE_IGNORE}="1" + # Caterina (Pro Micro) -SUBSYSTEMS=="usb", ATTRS{idVendor}=="1B4F" TAG+="uaccess", RUN{builtin}+="uaccess", ENV{ID_MM_DEVICE_IGNORE}="1" # Spark Fun Electronics -SUBSYSTEMS=="usb", ATTRS{idVendor}=="1FFB" TAG+="uaccess", RUN{builtin}+="uaccess", ENV{ID_MM_DEVICE_IGNORE}="1" # Pololu Electronics -SUBSYSTEMS=="usb", ATTRS{idVendor}=="2341" TAG+="uaccess", RUN{builtin}+="uaccess", ENV{ID_MM_DEVICE_IGNORE}="1" # Arduino SA -SUBSYSTEMS=="usb", ATTRS{idVendor}=="239A" TAG+="uaccess", RUN{builtin}+="uaccess", ENV{ID_MM_DEVICE_IGNORE}="1" # Adafruit Industries LLC -SUBSYSTEMS=="usb", ATTRS{idVendor}=="2A03" TAG+="uaccess", RUN{builtin}+="uaccess", ENV{ID_MM_DEVICE_IGNORE}="1" # dog hunter AG +# Spark Fun Electronics +SUBSYSTEMS=="usb", ATTRS{idVendor}=="1B4F", ATTRS{idProduct}=="9203", TAG+="uaccess", RUN{builtin}+="uaccess", ENV{ID_MM_DEVICE_IGNORE}="1" # Pro Micro 3V3/8MHz +SUBSYSTEMS=="usb", ATTRS{idVendor}=="1B4F", ATTRS{idProduct}=="9205", TAG+="uaccess", RUN{builtin}+="uaccess", ENV{ID_MM_DEVICE_IGNORE}="1" # Pro Micro 5V/16MHz +SUBSYSTEMS=="usb", ATTRS{idVendor}=="1B4F", ATTRS{idProduct}=="9207", TAG+="uaccess", RUN{builtin}+="uaccess", ENV{ID_MM_DEVICE_IGNORE}="1" # LilyPad 3V3/8MHz (and some Pro Micro clones) +# Pololu Electronics +SUBSYSTEMS=="usb", ATTRS{idVendor}=="1FFB", ATTRS{idProduct}=="0101", TAG+="uaccess", RUN{builtin}+="uaccess", ENV{ID_MM_DEVICE_IGNORE}="1" # A-Star 32U4 +# Arduino SA +SUBSYSTEMS=="usb", ATTRS{idVendor}=="2341", ATTRS{idProduct}=="0036", TAG+="uaccess", RUN{builtin}+="uaccess", ENV{ID_MM_DEVICE_IGNORE}="1" # Leonardo +SUBSYSTEMS=="usb", ATTRS{idVendor}=="2341", ATTRS{idProduct}=="0037", TAG+="uaccess", RUN{builtin}+="uaccess", ENV{ID_MM_DEVICE_IGNORE}="1" # Micro +# Adafruit Industries LLC +SUBSYSTEMS=="usb", ATTRS{idVendor}=="239A", ATTRS{idProduct}=="000C", TAG+="uaccess", RUN{builtin}+="uaccess", ENV{ID_MM_DEVICE_IGNORE}="1" # Feather 32U4 +SUBSYSTEMS=="usb", ATTRS{idVendor}=="239A", ATTRS{idProduct}=="000D", TAG+="uaccess", RUN{builtin}+="uaccess", ENV{ID_MM_DEVICE_IGNORE}="1" # ItsyBitsy 32U4 3V3/8MHz +SUBSYSTEMS=="usb", ATTRS{idVendor}=="239A", ATTRS{idProduct}=="000E", TAG+="uaccess", RUN{builtin}+="uaccess", ENV{ID_MM_DEVICE_IGNORE}="1" # ItsyBitsy 32U4 5V/16MHz +# dog hunter AG +SUBSYSTEMS=="usb", ATTRS{idVendor}=="2A03", ATTRS{idProduct}=="0036", TAG+="uaccess", RUN{builtin}+="uaccess", ENV{ID_MM_DEVICE_IGNORE}="1" # Leonardo +SUBSYSTEMS=="usb", ATTRS{idVendor}=="2A03", ATTRS{idProduct}=="0037", TAG+="uaccess", RUN{builtin}+="uaccess", ENV{ID_MM_DEVICE_IGNORE}="1" # Micro ``` Once added, run the following: diff --git a/lib/python/qmk/cli/doctor.py b/lib/python/qmk/cli/doctor.py index c1284bb898c0..57ac0835b3e8 100755 --- a/lib/python/qmk/cli/doctor.py +++ b/lib/python/qmk/cli/doctor.py @@ -174,11 +174,22 @@ def check_udev_rules(): _udev_rule("03EB", "6124") }, 'caterina': { - _udev_rule("1B4F", None, 'ENV{ID_MM_DEVICE_IGNORE}="1"'), # Spark Fun Electronics - _udev_rule("1FFB", None, 'ENV{ID_MM_DEVICE_IGNORE}="1"'), # Pololu Electronics - _udev_rule("2341", None, 'ENV{ID_MM_DEVICE_IGNORE}="1"'), # Arduino SA - _udev_rule("239A", None, 'ENV{ID_MM_DEVICE_IGNORE}="1"'), # Adafruit Industries LLC - _udev_rule("2A03", None, 'ENV{ID_MM_DEVICE_IGNORE}="1"') # dog hunter AG + # Spark Fun Electronics + _udev_rule("1B4F", "9203", 'ENV{ID_MM_DEVICE_IGNORE}="1"'), # Pro Micro 3V3/8MHz + _udev_rule("1B4F", "9205", 'ENV{ID_MM_DEVICE_IGNORE}="1"'), # Pro Micro 5V/16MHz + _udev_rule("1B4F", "9207", 'ENV{ID_MM_DEVICE_IGNORE}="1"'), # LilyPad 3V3/8MHz (and some Pro Micro clones) + # Pololu Electronics + _udev_rule("1FFB", "0101", 'ENV{ID_MM_DEVICE_IGNORE}="1"'), # A-Star 32U4 + # Arduino SA + _udev_rule("2341", "0036", 'ENV{ID_MM_DEVICE_IGNORE}="1"'), # Leonardo + _udev_rule("2341", "0037", 'ENV{ID_MM_DEVICE_IGNORE}="1"'), # Micro + # Adafruit Industries LLC + _udev_rule("239A", "000C", 'ENV{ID_MM_DEVICE_IGNORE}="1"'), # Feather 32U4 + _udev_rule("239A", "000D", 'ENV{ID_MM_DEVICE_IGNORE}="1"'), # ItsyBitsy 32U4 3V3/8MHz + _udev_rule("239A", "000E", 'ENV{ID_MM_DEVICE_IGNORE}="1"'), # ItsyBitsy 32U4 5V/16MHz + # dog hunter AG + _udev_rule("2A03", "0036", 'ENV{ID_MM_DEVICE_IGNORE}="1"'), # Leonardo + _udev_rule("2A03", "0037", 'ENV{ID_MM_DEVICE_IGNORE}="1"') # Micro } } From ccbbf1638947f90caa425ae792be71e6383569c6 Mon Sep 17 00:00:00 2001 From: Rys Sommefeldt Date: Sat, 19 Sep 2020 01:56:38 +0100 Subject: [PATCH 810/930] Matrix Noah 6.25U bottom row plus personal keymap using it (#10134) * 6.25U bottom row ISO layout for Matrix Noah * Personal map for Matrix Noah using new 6.25U bottom row ISO * Switch to 65_iso_blocker and add that to info.json * Switch to 65_iso_blocker for the new layout * Fix whitespace issues --- keyboards/matrix/noah/info.json | 3 ++ keyboards/matrix/noah/keymaps/rys/keymap.c | 59 ++++++++++++++++++++++ keyboards/matrix/noah/noah.h | 14 +++++ keyboards/matrix/noah/rules.mk | 2 + 4 files changed, 78 insertions(+) create mode 100644 keyboards/matrix/noah/keymaps/rys/keymap.c diff --git a/keyboards/matrix/noah/info.json b/keyboards/matrix/noah/info.json index f35bbd5808ec..69fc0fccfcb3 100644 --- a/keyboards/matrix/noah/info.json +++ b/keyboards/matrix/noah/info.json @@ -1426,6 +1426,9 @@ "y": 4 } ] + }, + "LAYOUT_65_iso_blocker": { + "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":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}, {"x":13.75, "y":1, "w":1.25, "h":2}, {"x":15, "y":2}, {"x":0, "y":3, "w":1.25}, {"x":1.25, "y":3}, {"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, "w":1.25}, {"x":11.25, "y":4, "w":1.25}, {"x":13, "y":4}, {"x":14, "y":4}, {"x":15, "y":4}] } } } diff --git a/keyboards/matrix/noah/keymaps/rys/keymap.c b/keyboards/matrix/noah/keymaps/rys/keymap.c new file mode 100644 index 000000000000..73ee8e1fec5c --- /dev/null +++ b/keyboards/matrix/noah/keymaps/rys/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 i s distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public 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│ + * ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬─┬───┼───┼───┤ + * │LCtl│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/matrix/noah/noah.h b/keyboards/matrix/noah/noah.h index 5d0da798dbea..15810c70638f 100644 --- a/keyboards/matrix/noah/noah.h +++ b/keyboards/matrix/noah/noah.h @@ -48,6 +48,20 @@ {k40, k41, k42,KC_NO,k43,KC_NO,KC_NO, k45, k46, k47, k48, k1e, k2e, k3e, k0f} \ } +#define LAYOUT_65_iso_blocker( \ + 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, 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 \ +) { \ + {k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c,KC_NO, k0e}, \ + {k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c,KC_NO, KC_NO}, \ + {k20, k21, 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, KC_NO}, \ + {k40, k41, k42,KC_NO,k43,KC_NO,k44, k45, k46, k47, k48, k1e, k2e, k3e, k0f} \ +} + #define LAYOUT_default_splitspace( \ 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, k1d, k1e, \ diff --git a/keyboards/matrix/noah/rules.mk b/keyboards/matrix/noah/rules.mk index 80854e67e1fc..094364e11bc1 100644 --- a/keyboards/matrix/noah/rules.mk +++ b/keyboards/matrix/noah/rules.mk @@ -52,3 +52,5 @@ RGBLIGHT_CUSTOM_DRIVER = yes CUSTOM_MATRIX = yes # project specific files SRC += ws2812.c matrix.c + +LAYOUTS = 65_iso_blocker From b0024470ed347271e29b2de4d0442f855a26345c Mon Sep 17 00:00:00 2001 From: 4pplet <4pplet@protonmail.com> Date: Sat, 19 Sep 2020 04:31:44 +0200 Subject: [PATCH 811/930] [Keyboard] 4pplet keyboards (#10251) * added 4pplet keyboards added 4pplet keyboards * Update keyboards/4pplet/aekiso60_rev_a/aekiso60_rev_a.h Co-Authored-By: Ryan * Update keyboards/4pplet/aekiso60_rev_a/config.h Co-Authored-By: Ryan * Update keyboards/4pplet/aekiso60_rev_a/config.h Co-Authored-By: Ryan * Update keyboards/4pplet/waffling60_rev_a/config.h Co-Authored-By: Ryan * Update keyboards/4pplet/aekiso60_rev_a/rules.mk Co-Authored-By: Ryan * Update keyboards/4pplet/aekiso60_rev_a/rules.mk Co-Authored-By: Ryan * Update keyboards/4pplet/waffling60_rev_a/rules.mk Co-Authored-By: Ryan * Update keyboards/4pplet/waffling60_rev_a/rules.mk Co-Authored-By: Ryan * Update keyboards/4pplet/steezy60_rev_a/config.h Co-Authored-By: Ryan * Delete info.json * Delete info.json * Delete info.json * removed VIA_ENABLE * Update config.h * Update rules.mk * Update steezy60_rev_a.h * Update config.h * Removed VIA_ENABLE * Update keyboards/4pplet/steezy60_rev_a/rules.mk Co-Authored-By: Ryan * Removed VIA_ENABLE * Update config.h * Update config.h * Update config.h * adding fauxpark suggestion * Update keyboards/4pplet/aekiso60_rev_a/config.h Co-Authored-By: James Young <18669334+noroadsleft@users.noreply.github.com> * Update keyboards/4pplet/aekiso60_rev_a/rules.mk Co-Authored-By: James Young <18669334+noroadsleft@users.noreply.github.com> * some updates recommended by noroadsleft, still work in progress some updates recommended by noroadsleft, still work in progress * made directorys for revisions per noroadsleft suggestion made directorys for revisions per noroadsleft suggestion * renamed keyboard_pre_init_user to keyboard_pre_init_kb * Update keyboards/4pplet/aekiso60/rev_a/config.h Co-Authored-By: Drashna Jaelre * Update keyboards/4pplet/waffling60/rev_a/rev_a.c Co-Authored-By: Drashna Jaelre * Update keyboards/4pplet/waffling60/rev_a/rev_a.c Co-Authored-By: Drashna Jaelre * started working on refactoring led function for waffling60 * removed LED functionality * Update keyboards/wilba_tech/zeal60/rules.mk Co-authored-by: Drashna Jaelre * Update keyboards/wilba_tech/zeal60/rules.mk Co-authored-by: Ryan * Update keyboards/4pplet/waffling60/rev_a/rules.mk Co-authored-by: Ryan * Update keyboards/4pplet/steezy60/rev_a/rules.mk Co-authored-by: Ryan * Update keyboards/4pplet/aekiso60/keymaps/via/keymap.c Co-authored-by: Ryan * Update keyboards/4pplet/aekiso60/rev_a/rules.mk Co-authored-by: Ryan * Update config.h added debounce to prevent stuttering with some switches * Update README.md * Adding masterwork classy_tkl * Update keyboards/masterwork/classy_tkl/rev_a/rev_a.c Co-authored-by: Drashna Jaelre * Update keyboards/masterwork/classy_tkl/rev_a/rules.mk Co-authored-by: Drashna Jaelre * Update keyboards/masterwork/classy_tkl/rev_a/rules.mk Co-authored-by: Drashna Jaelre * Update rev_a.c * Update rev_a.c * updated name from masterwork to masterworks * Update keyboards/masterworks/classy_tkl/info.json Co-authored-by: Drashna Jaelre * Update keyboards/masterworks/classy_tkl/info.json Co-authored-by: Drashna Jaelre * Update keyboards/masterworks/classy_tkl/info.json Co-authored-by: Drashna Jaelre * added license header to keymap * Update keyboards/masterworks/classy_tkl/info.json Co-authored-by: James Young <18669334+noroadsleft@users.noreply.github.com> * Update keyboards/masterworks/classy_tkl/rev_a/config.h Co-authored-by: James Young <18669334+noroadsleft@users.noreply.github.com> * Update keyboards/masterworks/classy_tkl/rev_a/rev_a.c Co-authored-by: James Young <18669334+noroadsleft@users.noreply.github.com> * Update keyboards/masterworks/classy_tkl/rev_a/rules.mk Co-authored-by: James Young <18669334+noroadsleft@users.noreply.github.com> * Update keyboards/masterworks/classy_tkl/rev_a/rules.mk Co-authored-by: James Young <18669334+noroadsleft@users.noreply.github.com> * Update keyboards/masterworks/classy_tkl/readme.md Co-authored-by: James Young <18669334+noroadsleft@users.noreply.github.com> * Update keyboards/masterworks/classy_tkl/rev_a/rev_a.h Co-authored-by: James Young <18669334+noroadsleft@users.noreply.github.com> * Update keyboards/masterworks/classy_tkl/readme.md Co-authored-by: James Young <18669334+noroadsleft@users.noreply.github.com> Co-authored-by: Ryan Co-authored-by: James Young <18669334+noroadsleft@users.noreply.github.com> Co-authored-by: Drashna Jaelre --- keyboards/masterworks/classy_tkl/info.json | 279 ++++++++++++++++++ .../classy_tkl/keymaps/default/config.h | 19 ++ .../classy_tkl/keymaps/default/keymap.c | 29 ++ .../classy_tkl/keymaps/default/readme.md | 1 + .../keymaps/default_tkl_ansi_wkl/config.h | 19 ++ .../keymaps/default_tkl_ansi_wkl/keymap.c | 29 ++ .../keymaps/default_tkl_ansi_wkl/readme.md | 1 + .../keymaps/default_tkl_iso_wkl/config.h | 19 ++ .../keymaps/default_tkl_iso_wkl/keymap.c | 29 ++ .../keymaps/default_tkl_iso_wkl/readme.md | 1 + .../classy_tkl/keymaps/via/keymap.c | 50 ++++ .../classy_tkl/keymaps/via/rules.mk | 1 + keyboards/masterworks/classy_tkl/readme.md | 15 + .../masterworks/classy_tkl/rev_a/config.h | 58 ++++ .../masterworks/classy_tkl/rev_a/rev_a.c | 42 +++ .../masterworks/classy_tkl/rev_a/rev_a.h | 79 +++++ .../masterworks/classy_tkl/rev_a/rules.mk | 26 ++ 17 files changed, 697 insertions(+) create mode 100644 keyboards/masterworks/classy_tkl/info.json create mode 100644 keyboards/masterworks/classy_tkl/keymaps/default/config.h create mode 100644 keyboards/masterworks/classy_tkl/keymaps/default/keymap.c create mode 100644 keyboards/masterworks/classy_tkl/keymaps/default/readme.md create mode 100644 keyboards/masterworks/classy_tkl/keymaps/default_tkl_ansi_wkl/config.h create mode 100644 keyboards/masterworks/classy_tkl/keymaps/default_tkl_ansi_wkl/keymap.c create mode 100644 keyboards/masterworks/classy_tkl/keymaps/default_tkl_ansi_wkl/readme.md create mode 100644 keyboards/masterworks/classy_tkl/keymaps/default_tkl_iso_wkl/config.h create mode 100644 keyboards/masterworks/classy_tkl/keymaps/default_tkl_iso_wkl/keymap.c create mode 100644 keyboards/masterworks/classy_tkl/keymaps/default_tkl_iso_wkl/readme.md create mode 100644 keyboards/masterworks/classy_tkl/keymaps/via/keymap.c create mode 100644 keyboards/masterworks/classy_tkl/keymaps/via/rules.mk create mode 100644 keyboards/masterworks/classy_tkl/readme.md create mode 100644 keyboards/masterworks/classy_tkl/rev_a/config.h create mode 100644 keyboards/masterworks/classy_tkl/rev_a/rev_a.c create mode 100644 keyboards/masterworks/classy_tkl/rev_a/rev_a.h create mode 100644 keyboards/masterworks/classy_tkl/rev_a/rules.mk diff --git a/keyboards/masterworks/classy_tkl/info.json b/keyboards/masterworks/classy_tkl/info.json new file mode 100644 index 000000000000..5cf93dfbd94e --- /dev/null +++ b/keyboards/masterworks/classy_tkl/info.json @@ -0,0 +1,279 @@ +{ + "keyboard_name": "Classy TKL", + "url": "https://geekhack.org/index.php?topic=105933", + "maintainer": "qmk", + "width": 18.25, + "height": 6.5, + "layouts": { + "LAYOUT_all": { + "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": "PrtSc", "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": "!", "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": "Backspace", "x": 13, "y": 1.5 }, + { "label": "Backspace2", "x": 14, "y": 1.5 }, + { "label": "Insert", "x": 15.25, "y": 1.5 }, + { "label": "Home", "x": 16.25, "y": 1.5 }, + { "label": "PgUp", "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": "|", "x": 13.5, "y": 2.5, "w": 1.5 }, + { "label": "Delete", "x": 15.25, "y": 2.5 }, + { "label": "End", "x": 16.25, "y": 2.5 }, + { "label": "PgDn", "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": "Enter", "x": 12.75, "y": 3.5, "w": 2.25 }, + { "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": 1.75 }, + { "label": "Shift2", "x": 14, "y": 4.5, "w": 1 }, + { "label": "Up", "x": 16.25, "y": 4.5 }, + { "label": "Ctrl", "x": 0, "y": 5.5, "w": 1.5 }, + { "label": "Win", "x": 1.5, "y": 5.5, "w": 1 }, + { "label": "Alt", "x": 2.5, "y": 5.5, "w": 1.5 }, + { "label": "Space", "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, "w": 1 }, + { "label": "Ctrl", "x": 13.5, "y": 5.5, "w": 1.5 }, + { "label": "Left", "x": 15.25, "y": 5.5 }, + { "label": "Down", "x": 16.25, "y": 5.5 }, + { "label": "Right", "x": 17.25, "y": 5.5 } + ] + }, + "LAYOUT_tkl_ansi_wkl": { + "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": "PrtSc", "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": "!", "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": "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": "PgUp", "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": "|", "x": 13.5, "y": 2.5, "w": 1.5 }, + { "label": "Delete", "x": 15.25, "y": 2.5 }, + { "label": "End", "x": 16.25, "y": 2.5 }, + { "label": "PgDn", "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": "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": 2.75 }, + { "label": "Up", "x": 16.25, "y": 4.5 }, + { "label": "Ctrl", "x": 0, "y": 5.5, "w": 1.5 }, + { "label": "Alt", "x": 2.5, "y": 5.5, "w": 1.5 }, + { "label": "Space", "x": 4, "y": 5.5, "w": 7 }, + { "label": "Alt", "x": 11, "y": 5.5, "w": 1.5 }, + { "label": "Ctrl", "x": 13.5, "y": 5.5, "w": 1.5 }, + { "label": "Left", "x": 15.25, "y": 5.5 }, + { "label": "Down", "x": 16.25, "y": 5.5 }, + { "label": "Right", "x": 17.25, "y": 5.5 } + ] + }, + "LAYOUT_tkl_iso_wkl": { + "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": "PrtSc", "x": 15.25, "y": 0 }, + { "label": "Scroll Lock", "x": 16.25, "y": 0 }, + { "label": "Pause", "x": 17.25, "y": 0 }, + { "label": "\u00ac", "x": 0, "y": 1.5 }, + { "label": "!", "x": 1, "y": 1.5 }, + { "label": "\"", "x": 2, "y": 1.5 }, + { "label": "\u00a3", "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": "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": "PgUp", "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": "PgDn", "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": "Up", "x": 16.25, "y": 4.5 }, + { "label": "Ctrl", "x": 0, "y": 5.5, "w": 1.5 }, + { "label": "Alt", "x": 2.5, "y": 5.5, "w": 1.5 }, + { "label": "Space", "x": 4, "y": 5.5, "w": 7 }, + { "label": "AltGr", "x": 11, "y": 5.5, "w": 1.5 }, + { "label": "Ctrl", "x": 13.5, "y": 5.5, "w": 1.5 }, + { "label": "Left", "x": 15.25, "y": 5.5 }, + { "label": "Down", "x": 16.25, "y": 5.5 }, + { "label": "Right", "x": 17.25, "y": 5.5 } + ] + } + } +} diff --git a/keyboards/masterworks/classy_tkl/keymaps/default/config.h b/keyboards/masterworks/classy_tkl/keymaps/default/config.h new file mode 100644 index 000000000000..e328e5a3b04c --- /dev/null +++ b/keyboards/masterworks/classy_tkl/keymaps/default/config.h @@ -0,0 +1,19 @@ +/* Copyright 2020 Mathias Andersson + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License 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/masterworks/classy_tkl/keymaps/default/keymap.c b/keyboards/masterworks/classy_tkl/keymaps/default/keymap.c new file mode 100644 index 000000000000..a87656059c68 --- /dev/null +++ b/keyboards/masterworks/classy_tkl/keymaps/default/keymap.c @@ -0,0 +1,29 @@ +/* +Copyright 2020 Mathias Andersson + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public 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 + +// clang-format off +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_NO, 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_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_UP, + KC_LCTL, KC_NO, KC_LALT, KC_SPC, KC_RALT, KC_NO, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT) +}; +// clang-format on diff --git a/keyboards/masterworks/classy_tkl/keymaps/default/readme.md b/keyboards/masterworks/classy_tkl/keymaps/default/readme.md new file mode 100644 index 000000000000..72b4eb54a072 --- /dev/null +++ b/keyboards/masterworks/classy_tkl/keymaps/default/readme.md @@ -0,0 +1 @@ +# The default winkeyless ANSI keymap for the Classy TKL diff --git a/keyboards/masterworks/classy_tkl/keymaps/default_tkl_ansi_wkl/config.h b/keyboards/masterworks/classy_tkl/keymaps/default_tkl_ansi_wkl/config.h new file mode 100644 index 000000000000..e328e5a3b04c --- /dev/null +++ b/keyboards/masterworks/classy_tkl/keymaps/default_tkl_ansi_wkl/config.h @@ -0,0 +1,19 @@ +/* Copyright 2020 Mathias Andersson + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License 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/masterworks/classy_tkl/keymaps/default_tkl_ansi_wkl/keymap.c b/keyboards/masterworks/classy_tkl/keymaps/default_tkl_ansi_wkl/keymap.c new file mode 100644 index 000000000000..bb7b256fdadd --- /dev/null +++ b/keyboards/masterworks/classy_tkl/keymaps/default_tkl_ansi_wkl/keymap.c @@ -0,0 +1,29 @@ +/* +Copyright 2020 Mathias Andersson + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public 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 + +// clang-format off +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_tkl_ansi_wkl( + 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_LALT, KC_SPC, KC_RALT, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT) +}; +// clang-format on diff --git a/keyboards/masterworks/classy_tkl/keymaps/default_tkl_ansi_wkl/readme.md b/keyboards/masterworks/classy_tkl/keymaps/default_tkl_ansi_wkl/readme.md new file mode 100644 index 000000000000..72b4eb54a072 --- /dev/null +++ b/keyboards/masterworks/classy_tkl/keymaps/default_tkl_ansi_wkl/readme.md @@ -0,0 +1 @@ +# The default winkeyless ANSI keymap for the Classy TKL diff --git a/keyboards/masterworks/classy_tkl/keymaps/default_tkl_iso_wkl/config.h b/keyboards/masterworks/classy_tkl/keymaps/default_tkl_iso_wkl/config.h new file mode 100644 index 000000000000..e328e5a3b04c --- /dev/null +++ b/keyboards/masterworks/classy_tkl/keymaps/default_tkl_iso_wkl/config.h @@ -0,0 +1,19 @@ +/* Copyright 2020 Mathias Andersson + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License 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/masterworks/classy_tkl/keymaps/default_tkl_iso_wkl/keymap.c b/keyboards/masterworks/classy_tkl/keymaps/default_tkl_iso_wkl/keymap.c new file mode 100644 index 000000000000..1456ee02a204 --- /dev/null +++ b/keyboards/masterworks/classy_tkl/keymaps/default_tkl_iso_wkl/keymap.c @@ -0,0 +1,29 @@ +/* +Copyright 2020 Mathias Andersson + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public 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 + +// clang-format off +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_tkl_iso_wkl( + 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_NUHS, 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_UP, + KC_LCTL, KC_LALT, KC_SPC, KC_RALT, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT) +}; +// clang-format on diff --git a/keyboards/masterworks/classy_tkl/keymaps/default_tkl_iso_wkl/readme.md b/keyboards/masterworks/classy_tkl/keymaps/default_tkl_iso_wkl/readme.md new file mode 100644 index 000000000000..a4b8c86b1dcd --- /dev/null +++ b/keyboards/masterworks/classy_tkl/keymaps/default_tkl_iso_wkl/readme.md @@ -0,0 +1 @@ +# The default winkeyless ISO keymap for the Classy TKL diff --git a/keyboards/masterworks/classy_tkl/keymaps/via/keymap.c b/keyboards/masterworks/classy_tkl/keymaps/via/keymap.c new file mode 100644 index 000000000000..c26f147eacd5 --- /dev/null +++ b/keyboards/masterworks/classy_tkl/keymaps/via/keymap.c @@ -0,0 +1,50 @@ +/* +Copyright 2020 Mathias Andersson + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public 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 + +// clang-format off +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_NO, 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_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_UP, + KC_LCTL, KC_NO, KC_LALT, KC_SPC, KC_RALT, KC_NO, 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), + [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), + [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) +}; +// clang-format on diff --git a/keyboards/masterworks/classy_tkl/keymaps/via/rules.mk b/keyboards/masterworks/classy_tkl/keymaps/via/rules.mk new file mode 100644 index 000000000000..1e5b99807cb7 --- /dev/null +++ b/keyboards/masterworks/classy_tkl/keymaps/via/rules.mk @@ -0,0 +1 @@ +VIA_ENABLE = yes diff --git a/keyboards/masterworks/classy_tkl/readme.md b/keyboards/masterworks/classy_tkl/readme.md new file mode 100644 index 000000000000..0557ed7f4c4c --- /dev/null +++ b/keyboards/masterworks/classy_tkl/readme.md @@ -0,0 +1,15 @@ +# Classy TKL + +![Classy TKL](https://i.imgur.com/p1dxfYKl.jpg) + +A short description of the keyboard/project + +* Keyboard Maintainer: [Mathias Andersson](https://github.com/wraul) +* Hardware Supported: [Classy TKL PCB](https://github.com/4pplet/classyTKL) +* Hardware Availability: https://geekhack.org/index.php?topic=105933 + +Make example for this keyboard (after setting up your build environment): + + make masterworks/classy_tkl: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/masterworks/classy_tkl/rev_a/config.h b/keyboards/masterworks/classy_tkl/rev_a/config.h new file mode 100644 index 000000000000..0821b1dfcec8 --- /dev/null +++ b/keyboards/masterworks/classy_tkl/rev_a/config.h @@ -0,0 +1,58 @@ +/* +Copyright 2020 Mathias Andersson + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License 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 0x4D57 // "MW" = Masterworks +#define PRODUCT_ID 0x0001 +#define DEVICE_VER 0x0001 +#define MANUFACTURER Masterworks +#define PRODUCT Classy TKL + +/* 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 \ + { C7, F0, F1, F4, F5, F6 } +#define MATRIX_COL_PINS \ + { B4, D7, D6, D4, C6, D5, D3, D2, D1, D0, B7, B3, B2, B1, B0, E6, F7 } +#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/masterworks/classy_tkl/rev_a/rev_a.c b/keyboards/masterworks/classy_tkl/rev_a/rev_a.c new file mode 100644 index 000000000000..58c0393db7e3 --- /dev/null +++ b/keyboards/masterworks/classy_tkl/rev_a/rev_a.c @@ -0,0 +1,42 @@ +/* Copyright 2020 Mathias Andersson + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#include "rev_a.h" + +#define CAPS_PIN B5 +#define SCROLL_PIN B6 + +// 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(CAPS_PIN); + setPinOutput(SCROLL_PIN); + + matrix_init_user(); +} + +bool led_update_kb(led_t led_state) { + bool res = led_update_user(led_state); + if(res) { + writePin(CAPS_PIN, led_state.caps_lock); + writePin(SCROLL_PIN, led_state.scroll_lock); + } + return res; +} diff --git a/keyboards/masterworks/classy_tkl/rev_a/rev_a.h b/keyboards/masterworks/classy_tkl/rev_a/rev_a.h new file mode 100644 index 000000000000..73e68b598d07 --- /dev/null +++ b/keyboards/masterworks/classy_tkl/rev_a/rev_a.h @@ -0,0 +1,79 @@ +/* Copyright 2020 Mathias Andersson + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License 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. + */ +// clang-format off +#define LAYOUT_all( \ + k00, 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, k3D, 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, \ + k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, k4A, k4B, k4C, k4D, k4F, \ + k50, k52, k53, k57, k5B, k5C, k5D, k5E, k5F, k5G \ +) \ +{ \ + { k00, KC_NO, 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, k4F, KC_NO }, \ + { k50, KC_NO, k52, k53, KC_NO, KC_NO, KC_NO, k57, KC_NO, KC_NO, KC_NO, k5B, k5C, k5D, k5E, k5F, k5G }, \ +} + +#define LAYOUT_tkl_ansi_wkl( \ + k00, 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, k3D, 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, \ + k40, k42, k43, k44, k45, k46, k47, k48, k49, k4A, k4B, k4C, k4F, \ + k50, k53, k57, k5B, k5D, k5E, k5F, k5G \ +) \ +{ \ + { k00, KC_NO, 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, KC_NO, 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, KC_NO, k42, k43, k44, k45, k46, k47, k48, k49, k4A, k4B, k4C, KC_NO, KC_NO, k4F, KC_NO }, \ + { k50, KC_NO, KC_NO, k53, KC_NO, KC_NO, KC_NO, k57, KC_NO, KC_NO, KC_NO, k5B, KC_NO, k5D, k5E, k5F, k5G }, \ +} + +#define LAYOUT_tkl_iso_wkl( \ + k00, 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, k3D, 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, k2D, \ + k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, k4A, k4B, k4C, k4F, \ + k50, k53, k57, k5B, k5D, k5E, k5F, k5G \ +) \ +{ \ + { k00, KC_NO, 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, KC_NO, 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, KC_NO, KC_NO, k4F, KC_NO }, \ + { k50, KC_NO, KC_NO, k53, KC_NO, KC_NO, KC_NO, k57, KC_NO, KC_NO, KC_NO, k5B, KC_NO, k5D, k5E, k5F, k5G }, \ +} +// clang-format on diff --git a/keyboards/masterworks/classy_tkl/rev_a/rules.mk b/keyboards/masterworks/classy_tkl/rev_a/rules.mk new file mode 100644 index 000000000000..34bcd87a4aaa --- /dev/null +++ b/keyboards/masterworks/classy_tkl/rev_a/rules.mk @@ -0,0 +1,26 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +BOOTLOADER = atmel-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 = 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 +BLUETOOTH_ENABLE = no # Enable Bluetooth +AUDIO_ENABLE = no # Audio output + +# Supported layouts +LAYOUTS = tkl_ansi_wkl tkl_iso_wkl From 0140baf7e0b041df841f8782743344a4ebe4ebe1 Mon Sep 17 00:00:00 2001 From: Ryan Date: Sat, 19 Sep 2020 13:00:18 +1000 Subject: [PATCH 812/930] Add STM32F401/F411 to mcu_selection.mk (#10278) * Reorder STM32 MCUs * Add STM32F4xx to mcu_selection.mk * Set MCU for phoenix and tkw/stoutgat/v2/f411 --- .../handwired/onekey/blackpill_f401/rules.mk | 30 +---- .../handwired/onekey/blackpill_f411/rules.mk | 30 +---- keyboards/handwired/riblee_f401/rules.mk | 32 +---- keyboards/matrix/m20add/rules.mk | 27 +--- keyboards/matrix/noah/rules.mk | 27 +--- keyboards/phoenix/rules.mk | 34 +---- keyboards/tkw/stoutgat/v2/f411/rules.mk | 30 +---- keyboards/zvecr/zv48/f401/rules.mk | 30 +---- keyboards/zvecr/zv48/f411/rules.mk | 30 +---- quantum/mcu_selection.mk | 126 +++++++++++++----- 10 files changed, 131 insertions(+), 265 deletions(-) diff --git a/keyboards/handwired/onekey/blackpill_f401/rules.mk b/keyboards/handwired/onekey/blackpill_f401/rules.mk index 609262049cad..6eb37a581d61 100644 --- a/keyboards/handwired/onekey/blackpill_f401/rules.mk +++ b/keyboards/handwired/onekey/blackpill_f401/rules.mk @@ -1,30 +1,8 @@ -## chip/board settings -# the next two should match the directories in -# /os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES) -MCU_FAMILY = STM32 -MCU_SERIES = STM32F4xx -# linker script to use -# it should exist either in /os/common/ports/ARMCMx/compilers/GCC/ld/ -# or /ld/ -MCU_LDSCRIPT = STM32F401xC -# startup code to use -# is should exist in /os/common/ports/ARMCMx/compilers/GCC/mk/ -MCU_STARTUP = stm32f4xx -# it should exist either in /os/hal/boards/ -# or /boards -BOARD = BLACKPILL_STM32_F401 -# 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 -ARMV = 7 -USE_FPU = yes -# Address of the booloader in system memory -STM32_BOOTLOADER_ADDRESS = 0x1FFF0000 +# MCU name +MCU = STM32F401 -# 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 +# Address of the bootloader in system memory +STM32_BOOTLOADER_ADDRESS = 0x1FFF0000 # Build Options # change yes to no to disable diff --git a/keyboards/handwired/onekey/blackpill_f411/rules.mk b/keyboards/handwired/onekey/blackpill_f411/rules.mk index f2e0f2b4f956..7cf886431fb7 100644 --- a/keyboards/handwired/onekey/blackpill_f411/rules.mk +++ b/keyboards/handwired/onekey/blackpill_f411/rules.mk @@ -1,30 +1,8 @@ -## chip/board settings -# the next two should match the directories in -# /os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES) -MCU_FAMILY = STM32 -MCU_SERIES = STM32F4xx -# linker script to use -# it should exist either in /os/common/ports/ARMCMx/compilers/GCC/ld/ -# or /ld/ -MCU_LDSCRIPT = STM32F411xE -# startup code to use -# is should exist in /os/common/ports/ARMCMx/compilers/GCC/mk/ -MCU_STARTUP = stm32f4xx -# it should exist either in /os/hal/boards/ -# or /boards -BOARD = BLACKPILL_STM32_F411 -# 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 -ARMV = 7 -USE_FPU = yes -# Address of the booloader in system memory -STM32_BOOTLOADER_ADDRESS = 0x1FFF0000 +# MCU name +MCU = STM32F411 -# 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 +# Address of the bootloader in system memory +STM32_BOOTLOADER_ADDRESS = 0x1FFF0000 # Build Options # change yes to no to disable diff --git a/keyboards/handwired/riblee_f401/rules.mk b/keyboards/handwired/riblee_f401/rules.mk index eab426a375cd..2cb1d380e116 100644 --- a/keyboards/handwired/riblee_f401/rules.mk +++ b/keyboards/handwired/riblee_f401/rules.mk @@ -1,30 +1,8 @@ -## chip/board settings -# the next two should match the directories in -# /os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES) -MCU_FAMILY = STM32 -MCU_SERIES = STM32F4xx -# linker script to use -# it should exist either in /os/common/ports/ARMCMx/compilers/GCC/ld/ -# or /ld/ -MCU_LDSCRIPT = STM32F401xC -# startup code to use -# is should exist in /os/common/ports/ARMCMx/compilers/GCC/mk/ -MCU_STARTUP = stm32f4xx -# it should exist either in /os/hal/boards/ -# or /boards -BOARD = BLACKPILL_STM32_F401 -# 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 -ARMV = 7 -USE_FPU = yes -# Address of the booloader in system memory -STM32_BOOTLOADER_ADDRESS = 0x1FFF0000 +# MCU name +MCU = STM32F401 -# 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 +# Address of the bootloader in system memory +STM32_BOOTLOADER_ADDRESS = 0x1FFF0000 # Build Options # change yes to no to disable @@ -43,4 +21,4 @@ BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality BACKLIGHT_DRIVER = software RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow BLUETOOTH_ENABLE = no # Enable Bluetooth -AUDIO_ENABLE = no # Audio output \ No newline at end of file +AUDIO_ENABLE = no # Audio output diff --git a/keyboards/matrix/m20add/rules.mk b/keyboards/matrix/m20add/rules.mk index 6dba153932cb..fb97c1d3c8f2 100644 --- a/keyboards/matrix/m20add/rules.mk +++ b/keyboards/matrix/m20add/rules.mk @@ -1,38 +1,15 @@ -## chip/board settings -# - the next two should match the directories in -# /os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES) -MCU_FAMILY = STM32 -MCU_SERIES = STM32F4xx +# MCU name +MCU = STM32F411 # Linker script to use # - it should exist either in /os/common/ports/ARMCMx/compilers/GCC/ld/ # or /ld/ MCU_LDSCRIPT = m20add_boot -# Startup code to use -# - it should exist in /os/common/startup/ARMCMx/compilers/GCC/mk/ -MCU_STARTUP = stm32f4xx - # Board: it should exist either in /os/hal/boards/ # or /boards BOARD = m20add_bd -# 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.*/ -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 - # Build Options # comment out to disable the options. # diff --git a/keyboards/matrix/noah/rules.mk b/keyboards/matrix/noah/rules.mk index 094364e11bc1..19e432d2a0e2 100644 --- a/keyboards/matrix/noah/rules.mk +++ b/keyboards/matrix/noah/rules.mk @@ -1,38 +1,15 @@ -## chip/board settings -# - the next two should match the directories in -# /os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES) -MCU_FAMILY = STM32 -MCU_SERIES = STM32F4xx +# MCU name +MCU = STM32F411 # Linker script to use # - it should exist either in /os/common/ports/ARMCMx/compilers/GCC/ld/ # or /ld/ MCU_LDSCRIPT = noah_boot -# Startup code to use -# - it should exist in /os/common/startup/ARMCMx/compilers/GCC/mk/ -MCU_STARTUP = stm32f4xx - # Board: it should exist either in /os/hal/boards/ # or /boards BOARD = noah_bd -# 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.*/ -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 - # Build Options # comment out to disable the options. # diff --git a/keyboards/phoenix/rules.mk b/keyboards/phoenix/rules.mk index 6c6c8446ab6c..968c6548c05d 100644 --- a/keyboards/phoenix/rules.mk +++ b/keyboards/phoenix/rules.mk @@ -1,3 +1,9 @@ +# MCU name +MCU = STM32F401 + +# Address of the bootloader in system memory +STM32_BOOTLOADER_ADDRESS = 0x1FFF0000 + # Build Options # change yes to no to disable # @@ -17,32 +23,4 @@ SPLIT_KEYBOARD = yes SERIAL_DRIVER = usart KEYBOARD_SHARED_EP = yes -## chip/board settings -# the next two should match the directories in -# /os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES) -MCU_FAMILY = STM32 -MCU_SERIES = STM32F4xx -# linker script to use -# it should exist either in /os/common/ports/ARMCMx/compilers/GCC/ld/ -# or /ld/ -MCU_LDSCRIPT = STM32F401xC -# startup code to use -# is should exist in /os/common/ports/ARMCMx/compilers/GCC/mk/ -MCU_STARTUP = stm32f4xx -# it should exist either in /os/hal/boards/ -# or /boards -BOARD = BLACKPILL_STM32_F401 -# 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 -ARMV = 7 -USE_FPU = yes -# Address of the booloader in system memory -STM32_BOOTLOADER_ADDRESS = 0x1FFF0000 - -# 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 - OPT_DEFS += -DSTM32_DMA_REQUIRED=TRUE diff --git a/keyboards/tkw/stoutgat/v2/f411/rules.mk b/keyboards/tkw/stoutgat/v2/f411/rules.mk index 61add3aed53b..4f7f52e62bf9 100644 --- a/keyboards/tkw/stoutgat/v2/f411/rules.mk +++ b/keyboards/tkw/stoutgat/v2/f411/rules.mk @@ -1,27 +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 = STM32F4xx -# linker script to use -# it should exist either in /os/common/ports/ARMCMx/compilers/GCC/ld/ -# or /ld/ -MCU_LDSCRIPT = STM32F411xE -# startup code to use -# is should exist in /os/common/ports/ARMCMx/compilers/GCC/mk/ -MCU_STARTUP = stm32f4xx -# it should exist either in /os/hal/boards/ -# or /boards -BOARD = BLACKPILL_STM32_F411 -# 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 -ARMV = 7 -USE_FPU = yes -# Address of the booloader in system memory -STM32_BOOTLOADER_ADDRESS = 0x1FFF0000 +# MCU name +MCU = STM32F411 -# 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 +# Address of the bootloader in system memory +STM32_BOOTLOADER_ADDRESS = 0x1FFF0000 diff --git a/keyboards/zvecr/zv48/f401/rules.mk b/keyboards/zvecr/zv48/f401/rules.mk index e41d5ef7a2ea..950442af96fb 100644 --- a/keyboards/zvecr/zv48/f401/rules.mk +++ b/keyboards/zvecr/zv48/f401/rules.mk @@ -1,27 +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 = STM32F4xx -# linker script to use -# it should exist either in /os/common/ports/ARMCMx/compilers/GCC/ld/ -# or /ld/ -MCU_LDSCRIPT = STM32F401xC -# startup code to use -# is should exist in /os/common/ports/ARMCMx/compilers/GCC/mk/ -MCU_STARTUP = stm32f4xx -# it should exist either in /os/hal/boards/ -# or /boards -BOARD = BLACKPILL_STM32_F401 -# 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 -ARMV = 7 -USE_FPU = yes -# Address of the booloader in system memory -STM32_BOOTLOADER_ADDRESS = 0x1FFF0000 +# MCU name +MCU = STM32F401 -# 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 +# Address of the bootloader in system memory +STM32_BOOTLOADER_ADDRESS = 0x1FFF0000 diff --git a/keyboards/zvecr/zv48/f411/rules.mk b/keyboards/zvecr/zv48/f411/rules.mk index 61add3aed53b..4f7f52e62bf9 100644 --- a/keyboards/zvecr/zv48/f411/rules.mk +++ b/keyboards/zvecr/zv48/f411/rules.mk @@ -1,27 +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 = STM32F4xx -# linker script to use -# it should exist either in /os/common/ports/ARMCMx/compilers/GCC/ld/ -# or /ld/ -MCU_LDSCRIPT = STM32F411xE -# startup code to use -# is should exist in /os/common/ports/ARMCMx/compilers/GCC/mk/ -MCU_STARTUP = stm32f4xx -# it should exist either in /os/hal/boards/ -# or /boards -BOARD = BLACKPILL_STM32_F411 -# 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 -ARMV = 7 -USE_FPU = yes -# Address of the booloader in system memory -STM32_BOOTLOADER_ADDRESS = 0x1FFF0000 +# MCU name +MCU = STM32F411 -# 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 +# Address of the bootloader in system memory +STM32_BOOTLOADER_ADDRESS = 0x1FFF0000 diff --git a/quantum/mcu_selection.mk b/quantum/mcu_selection.mk index 33a0cabc84e5..6ec5dff5f512 100644 --- a/quantum/mcu_selection.mk +++ b/quantum/mcu_selection.mk @@ -82,37 +82,37 @@ ifneq ($(findstring MK20DX256, $(MCU)),) BOARD ?= PJRC_TEENSY_3_1 endif -ifneq ($(findstring STM32F303, $(MCU)),) +ifneq ($(findstring STM32F042, $(MCU)),) # Cortex version - MCU = cortex-m4 + MCU = cortex-m0 # ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7 - ARMV = 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 = STM32F3xx + MCU_SERIES = STM32F0xx # Linker script to use # - it should exist either in /os/common/ports/ARMCMx/compilers/GCC/ld/ # or /ld/ - MCU_LDSCRIPT ?= STM32F303xC + MCU_LDSCRIPT ?= STM32F042x6 # Startup code to use # - it should exist in /os/common/startup/ARMCMx/compilers/GCC/mk/ - MCU_STARTUP ?= stm32f3xx + MCU_STARTUP ?= stm32f0xx # Board: it should exist either in /os/hal/boards/, # /boards/, or drivers/boards/ - BOARD ?= GENERIC_STM32_F303XC + BOARD ?= GENERIC_STM32_F042X6 - USE_FPU ?= yes + 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 + DFU_ARGS ?= -d 0483:DF11 -a 0 -s 0x08000000:leave + DFU_SUFFIX_ARGS ?= -v 0483 -p DF11 endif ifneq ($(findstring STM32F072, $(MCU)),) @@ -144,46 +144,46 @@ ifneq ($(findstring STM32F072, $(MCU)),) 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 + DFU_ARGS ?= -d 0483:DF11 -a 0 -s 0x08000000:leave + DFU_SUFFIX_ARGS ?= -v 0483 -p DF11 endif -ifneq ($(findstring STM32F042, $(MCU)),) +ifneq ($(findstring STM32F103, $(MCU)),) # Cortex version - MCU = cortex-m0 + MCU = cortex-m3 # ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7 - ARMV = 6 + 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 = STM32F0xx + MCU_SERIES = STM32F1xx # Linker script to use # - it should exist either in /os/common/ports/ARMCMx/compilers/GCC/ld/ # or /ld/ - MCU_LDSCRIPT ?= STM32F042x6 + MCU_LDSCRIPT ?= STM32F103x8 # Startup code to use # - it should exist in /os/common/startup/ARMCMx/compilers/GCC/mk/ - MCU_STARTUP ?= stm32f0xx + MCU_STARTUP ?= stm32f1xx # Board: it should exist either in /os/hal/boards/, # /boards/, or drivers/boards/ - BOARD ?= GENERIC_STM32_F042X6 + BOARD ?= GENERIC_STM32_F103 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 + DFU_ARGS ?= -d 0483:DF11 -a 0 -s 0x08000000:leave + DFU_SUFFIX_ARGS ?= -v 0483 -p DF11 endif -ifneq ($(findstring STM32F103, $(MCU)),) +ifneq ($(findstring STM32F303, $(MCU)),) # Cortex version - MCU = cortex-m3 + MCU = cortex-m4 # ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7 ARMV = 7 @@ -192,26 +192,92 @@ ifneq ($(findstring STM32F103, $(MCU)),) # - the next two should match the directories in # /os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES) MCU_FAMILY = STM32 - MCU_SERIES = STM32F1xx + MCU_SERIES = STM32F3xx # Linker script to use # - it should exist either in /os/common/ports/ARMCMx/compilers/GCC/ld/ # or /ld/ - MCU_LDSCRIPT ?= STM32F103x8 + MCU_LDSCRIPT ?= STM32F303xC # Startup code to use # - it should exist in /os/common/startup/ARMCMx/compilers/GCC/mk/ - MCU_STARTUP ?= stm32f1xx + MCU_STARTUP ?= stm32f3xx # Board: it should exist either in /os/hal/boards/, # /boards/, or drivers/boards/ - BOARD ?= GENERIC_STM32_F103 + BOARD ?= GENERIC_STM32_F303XC - USE_FPU ?= no + 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 STM32F401, $(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 = STM32F4xx + + # Linker script to use + # - it should exist either in /os/common/ports/ARMCMx/compilers/GCC/ld/ + # or /ld/ + MCU_LDSCRIPT ?= STM32F401xC + + # Startup code to use + # - it should exist in /os/common/startup/ARMCMx/compilers/GCC/mk/ + MCU_STARTUP ?= stm32f4xx + + # Board: it should exist either in /os/hal/boards/, + # /boards/, or drivers/boards/ + BOARD ?= BLACKPILL_STM32_F401 + + 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 STM32F411, $(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 = STM32F4xx + + # Linker script to use + # - it should exist either in /os/common/ports/ARMCMx/compilers/GCC/ld/ + # or /ld/ + MCU_LDSCRIPT ?= STM32F411xE + + # Startup code to use + # - it should exist in /os/common/startup/ARMCMx/compilers/GCC/mk/ + MCU_STARTUP ?= stm32f4xx + + # Board: it should exist either in /os/hal/boards/, + # /boards/, or drivers/boards/ + BOARD ?= BLACKPILL_STM32_F411 + + 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 + DFU_ARGS ?= -d 0483:DF11 -a 0 -s 0x08000000:leave + DFU_SUFFIX_ARGS ?= -v 0483 -p DF11 endif ifneq (,$(filter $(MCU),atmega16u2 atmega32u2 atmega16u4 atmega32u4 at90usb646 at90usb1286)) From bbfb709a6a5d6429166f7b9b60610613fb647ca5 Mon Sep 17 00:00:00 2001 From: Ryan Date: Sat, 19 Sep 2020 13:48:02 +1000 Subject: [PATCH 813/930] Add STM32F401/F411 to ARM_PROCESSORS (#10362) --- lib/python/qmk/constants.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/python/qmk/constants.py b/lib/python/qmk/constants.py index 36a20adf4be1..0a4708e4ce76 100644 --- a/lib/python/qmk/constants.py +++ b/lib/python/qmk/constants.py @@ -9,7 +9,7 @@ MAX_KEYBOARD_SUBFOLDERS = 5 # Supported processor types -ARM_PROCESSORS = 'cortex-m0', 'cortex-m0plus', 'cortex-m3', 'cortex-m4', 'MKL26Z64', 'MK20DX128', 'MK20DX256', 'STM32F042', 'STM32F072', 'STM32F103', 'STM32F303' +ARM_PROCESSORS = 'cortex-m0', 'cortex-m0plus', 'cortex-m3', 'cortex-m4', 'MKL26Z64', 'MK20DX128', 'MK20DX256', 'STM32F042', 'STM32F072', 'STM32F103', 'STM32F303', 'STM32F401', 'STM32F411' AVR_PROCESSORS = 'at90usb1286', 'at90usb646', 'atmega16u2', 'atmega328p', 'atmega32a', 'atmega32u2', 'atmega32u4', None ALL_PROCESSORS = ARM_PROCESSORS + AVR_PROCESSORS VUSB_PROCESSORS = 'atmega328p', 'atmega32a', 'atmega328', 'attiny85' From a0efe932394492ddd79212c2e652306aae9cf72d Mon Sep 17 00:00:00 2001 From: Baris Tosun Date: Sat, 19 Sep 2020 05:54:08 +0200 Subject: [PATCH 814/930] Refactored the Katana60 folders under a rominronin parent folder (#10255) * refactored the Katana60 folders under a rominronin parent folder * Update keyboards/rominronin/katana60/info.json removed 'keyboard_folder' line * Update keyboards/rominronin/katana60/info.json removed 'key_count' line * Update keyboards/rominronin/katana60_rev2/config.h removed '#define DESCRIPTION' line * Update keyboards/rominronin/katana60_rev2/rules.mk Removed more attributes * Update keyboards/rominronin/katana60_rev2/rules.mk removed 'FAUXCLICKY_ENABLE' line * Update keyboards/rominronin/katana60_rev2/rules.mk Updated some comments * Update keyboards/rominronin/katana60_rev2/config.h Removed redundant comments * Update keyboards/rominronin/katana60_rev2/config.h removed redundant comments * Update keyboards/rominronin/katana60_rev2/config.h removed redundant comments * Update keyboards/rominronin/katana60/keymaps/default/keymap.c Fixed a non-standard keycode * Update keyboards/rominronin/katana60/keymaps/rominronin/keymap.c Removed deprecated code * Update keyboards/rominronin/katana60/rules.mk removed redundant comments * Update keyboards/rominronin/katana60_rev2/katana60_rev2.c removed redundant code * Update keyboards/rominronin/katana60_rev2/keymaps/rominronin_7u/keymap.c removed redundant code * Update keyboards/rominronin/katana60_rev2/rules.mk removed redundant comments * Update keyboards/rominronin/katana60_rev2/rules.mk updated some comments * Update keyboards/rominronin/katana60_rev2/rules.mk removed redundant code * Update keyboards/rominronin/katana60_rev2/keymaps/rominronin_7u/keymap.c optimised the layers definition * Update keyboards/rominronin/katana60/rules.mk removed redundant code * added the info.json file for every Tsuka60 layout * updated the info.json file details * removed broken keymap file, updated other files * updated the Katana60 rev2 info.json file * split katana60 into revisions * assign unique Vendor/Product ID pairings * modernize codebase #pragma once on included files; rules.mk templating * fix rev2 layout macros * updated the keymaps for correct automated building. * updated the default layout file * updated default rominronin 7u layout file * Update keyboards/rominronin/katana60/rev1/readme.md resized an image * Update keyboards/rominronin/katana60/rev2/readme.md resized an image * remove dead space from rev2 info.json file --- keyboards/katana60/info.json | 13 - keyboards/katana60/readme.md | 17 - .../katana60/rev1}/config.h | 89 +-- keyboards/rominronin/katana60/rev1/info.json | 83 +++ .../katana60/rev1}/keymaps/colemak/config.h | 0 .../katana60/rev1}/keymaps/colemak/keymap.c | 2 +- .../katana60/rev1}/keymaps/colemak/readme.md | 0 .../katana60/rev1}/keymaps/default/config.h | 0 .../katana60/rev1}/keymaps/default/keymap.c | 0 .../katana60/rev1}/keymaps/default/readme.md | 0 .../rev1}/keymaps/josefadamcik/config.h | 0 .../rev1}/keymaps/josefadamcik/keymap.c | 0 .../rev1}/keymaps/josefadamcik/readme.md | 0 .../katana60/rev1}/keymaps/msiu/config.h | 0 .../katana60/rev1}/keymaps/msiu/keymap.c | 0 .../katana60/rev1}/keymaps/msiu/readme.md | 0 .../rev1}/keymaps/rominronin/config.h | 0 .../rev1}/keymaps/rominronin/keymap.c | 3 +- .../rev1}/keymaps/rominronin/readme.md | 0 keyboards/rominronin/katana60/rev1/readme.md | 17 + .../katana60/rev1/rev1.c} | 29 +- .../katana60/rev1/rev1.h} | 5 +- .../katana60/rev1}/rules.mk | 19 +- keyboards/rominronin/katana60/rev2/config.h | 105 ++++ keyboards/rominronin/katana60/rev2/info.json | 579 ++++++++++++++++++ .../katana60/rev2/keymaps/default/config.h | 19 + .../katana60/rev2/keymaps/default/keymap.c | 71 +++ .../katana60/rev2/keymaps/default/readme.md | 1 + .../rev2/keymaps/rominronin_7u/config.h | 19 + .../rev2/keymaps/rominronin_7u/keymap.c | 79 +++ .../rev2/keymaps/rominronin_7u/readme.md | 1 + keyboards/rominronin/katana60/rev2/readme.md | 17 + keyboards/rominronin/katana60/rev2/rev2.c | 16 + keyboards/rominronin/katana60/rev2/rev2.h | 238 +++++++ keyboards/rominronin/katana60/rev2/rules.mk | 22 + 35 files changed, 1281 insertions(+), 163 deletions(-) delete mode 100644 keyboards/katana60/info.json delete mode 100644 keyboards/katana60/readme.md rename keyboards/{katana60 => rominronin/katana60/rev1}/config.h (54%) create mode 100644 keyboards/rominronin/katana60/rev1/info.json rename keyboards/{katana60 => rominronin/katana60/rev1}/keymaps/colemak/config.h (100%) rename keyboards/{katana60 => rominronin/katana60/rev1}/keymaps/colemak/keymap.c (99%) rename keyboards/{katana60 => rominronin/katana60/rev1}/keymaps/colemak/readme.md (100%) rename keyboards/{katana60 => rominronin/katana60/rev1}/keymaps/default/config.h (100%) rename keyboards/{katana60 => rominronin/katana60/rev1}/keymaps/default/keymap.c (100%) rename keyboards/{katana60 => rominronin/katana60/rev1}/keymaps/default/readme.md (100%) rename keyboards/{katana60 => rominronin/katana60/rev1}/keymaps/josefadamcik/config.h (100%) rename keyboards/{katana60 => rominronin/katana60/rev1}/keymaps/josefadamcik/keymap.c (100%) rename keyboards/{katana60 => rominronin/katana60/rev1}/keymaps/josefadamcik/readme.md (100%) rename keyboards/{katana60 => rominronin/katana60/rev1}/keymaps/msiu/config.h (100%) rename keyboards/{katana60 => rominronin/katana60/rev1}/keymaps/msiu/keymap.c (100%) rename keyboards/{katana60 => rominronin/katana60/rev1}/keymaps/msiu/readme.md (100%) rename keyboards/{katana60 => rominronin/katana60/rev1}/keymaps/rominronin/config.h (100%) rename keyboards/{katana60 => rominronin/katana60/rev1}/keymaps/rominronin/keymap.c (99%) rename keyboards/{katana60 => rominronin/katana60/rev1}/keymaps/rominronin/readme.md (100%) create mode 100644 keyboards/rominronin/katana60/rev1/readme.md rename keyboards/{katana60/katana60.c => rominronin/katana60/rev1/rev1.c} (51%) rename keyboards/{katana60/katana60.h => rominronin/katana60/rev1/rev1.h} (97%) rename keyboards/{katana60 => rominronin/katana60/rev1}/rules.mk (56%) create mode 100644 keyboards/rominronin/katana60/rev2/config.h create mode 100644 keyboards/rominronin/katana60/rev2/info.json create mode 100644 keyboards/rominronin/katana60/rev2/keymaps/default/config.h create mode 100644 keyboards/rominronin/katana60/rev2/keymaps/default/keymap.c create mode 100644 keyboards/rominronin/katana60/rev2/keymaps/default/readme.md create mode 100644 keyboards/rominronin/katana60/rev2/keymaps/rominronin_7u/config.h create mode 100644 keyboards/rominronin/katana60/rev2/keymaps/rominronin_7u/keymap.c create mode 100644 keyboards/rominronin/katana60/rev2/keymaps/rominronin_7u/readme.md create mode 100644 keyboards/rominronin/katana60/rev2/readme.md create mode 100644 keyboards/rominronin/katana60/rev2/rev2.c create mode 100644 keyboards/rominronin/katana60/rev2/rev2.h create mode 100644 keyboards/rominronin/katana60/rev2/rules.mk diff --git a/keyboards/katana60/info.json b/keyboards/katana60/info.json deleted file mode 100644 index bbb868103495..000000000000 --- a/keyboards/katana60/info.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "keyboard_name": "Katana60", - "url": "", - "maintainer": "qmk", - "width": 15, - "height": 5, - "layouts": { - "LAYOUT": { - "key_count": 70, - "layout": [{"label":"k40", "x":0, "y":0}, {"label":"k41", "x":1, "y":0}, {"label":"k42", "x":2, "y":0}, {"label":"k43", "x":3, "y":0}, {"label":"k44", "x":4, "y":0}, {"label":"k45", "x":5, "y":0}, {"label":"k46", "x":6, "y":0}, {"label":"k47", "x":7, "y":0}, {"label":"k48", "x":8, "y":0}, {"label":"k49", "x":9, "y":0}, {"label":"k4a", "x":10, "y":0}, {"label":"k4b", "x":11, "y":0}, {"label":"k4c", "x":12, "y":0}, {"label":"k4d", "x":13, "y":0}, {"label":"k4e", "x":14, "y":0}, {"label":"k30", "x":0, "y":1, "w":1.5}, {"label":"k31", "x":1.5, "y":1}, {"label":"k32", "x":2.5, "y":1}, {"label":"k33", "x":3.5, "y":1}, {"label":"k34", "x":4.5, "y":1}, {"label":"k35", "x":5.5, "y":1}, {"label":"k36", "x":6.5, "y":1}, {"label":"k37", "x":7.5, "y":1}, {"label":"k38", "x":8.5, "y":1}, {"label":"k39", "x":9.5, "y":1}, {"label":"k3a", "x":10.5, "y":1}, {"label":"k3b", "x":11.5, "y":1}, {"label":"k3c", "x":12.5, "y":1}, {"label":"k3d", "x":13.5, "y":1, "w":1.5}, {"label":"k20", "x":0, "y":2, "w":1.25}, {"label":"k21", "x":1.25, "y":2}, {"label":"k22", "x":2.25, "y":2}, {"label":"k23", "x":3.25, "y":2}, {"label":"k24", "x":4.25, "y":2}, {"label":"k25", "x":5.25, "y":2}, {"label":"k26", "x":6.25, "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":"k10", "x":0, "y":3}, {"label":"k11", "x":1, "y":3}, {"label":"k12", "x":2, "y":3}, {"label":"k13", "x":3, "y":3}, {"label":"k14", "x":4, "y":3}, {"label":"k15", "x":5, "y":3}, {"label":"k16", "x":6, "y":3}, {"label":"k17", "x":7, "y":3}, {"label":"k18", "x":8, "y":3}, {"label":"k19", "x":9, "y":3}, {"label":"k1a", "x":10, "y":3}, {"label":"k1b", "x":11, "y":3}, {"label":"k1c", "x":12, "y":3}, {"label":"k1d", "x":13, "y":3}, {"label":"k1e", "x":14, "y":3}, {"label":"k00", "x":0, "y":4}, {"label":"k01", "x":1, "y":4, "w":1.25}, {"label":"k02", "x":2.25, "y":4, "w":1.25}, {"label":"k03", "x":3.5, "y":4, "w":1.25}, {"label":"k04", "x":4.75, "y":4, "w":2.25}, {"label":"k05", "x":7, "y":4}, {"label":"k06", "x":8, "y":4, "w":2}, {"label":"k09", "x":10, "y":4}, {"label":"k0a", "x":11, "y":4}, {"label":"k0b", "x":12, "y":4}, {"label":"k0c", "x":13, "y":4}, {"label":"k0d", "x":14, "y":4}] - } - } -} diff --git a/keyboards/katana60/readme.md b/keyboards/katana60/readme.md deleted file mode 100644 index 5e1c7d39060c..000000000000 --- a/keyboards/katana60/readme.md +++ /dev/null @@ -1,17 +0,0 @@ -# Katana60 - -![Katana60](https://i.imgur.com/xVkODOu.jpg) - -A 60% keyboard with a symmetrical staggered layout, sold by CandyKeys.com. - -Keyboard Maintainer: [Baris Tosun](https://github.com/rominronin) -Hardware Supported: Katana60 PCB v1, Teensy 2.0 -Hardware Availability: [CandyKeys.com](https://CandyKeys.com) - -Make example for this keyboard (after setting up your build environment): - - make katana60: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. - -There is also ongoing discussion for the extend layer, at the [Colemak Forum](https://forum.colemak.com/topic/2327-developing-an-extend-layer-for-the-katana60/) \ No newline at end of file diff --git a/keyboards/katana60/config.h b/keyboards/rominronin/katana60/rev1/config.h similarity index 54% rename from keyboards/katana60/config.h rename to keyboards/rominronin/katana60/rev1/config.h index 3385ddb9cb7b..fe10d1a533d7 100644 --- a/keyboards/katana60/config.h +++ b/keyboards/rominronin/katana60/rev1/config.h @@ -15,18 +15,16 @@ 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 VENDOR_ID 0x7272 // "rr" - rominronin +#define PRODUCT_ID 0x0C2C #define DEVICE_VER 0x0001 #define MANUFACTURER RominRonin CandyKeys -#define PRODUCT Katana60 -#define DESCRIPTION QMK keyboard firmware for Katana60 +#define PRODUCT Katana60 rev1 /* key matrix size */ #define MATRIX_ROWS 5 @@ -49,18 +47,12 @@ along with this program. If not, see . /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION ROW2COL -// #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 -/* 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 */ @@ -92,56 +84,8 @@ along with this program. If not, see . */ //#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. - * - */ - #define TAPPING_TERM 200 -/* 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_HELP1 H -//#define MAGIC_KEY_HELP2 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_ALT1 ESC -//#define MAGIC_KEY_LAYER0_ALT2 GRAVE -//#define MAGIC_KEY_LAYER0 0 -//#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 PAUSE -//#define MAGIC_KEY_LOCK CAPS -//#define MAGIC_KEY_EEPROM E -//#define MAGIC_KEY_NKRO N -//#define MAGIC_KEY_SLEEP_LED Z - /* * Feature disable options * These options are also useful to firmware size reduction. @@ -159,28 +103,3 @@ along with this program. If not, see . //#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 - -#endif diff --git a/keyboards/rominronin/katana60/rev1/info.json b/keyboards/rominronin/katana60/rev1/info.json new file mode 100644 index 000000000000..fa0aa93d67ba --- /dev/null +++ b/keyboards/rominronin/katana60/rev1/info.json @@ -0,0 +1,83 @@ +{ + "keyboard_name": "Katana60 rev1", + "url": "", + "maintainer": "rominronin", + "width": 15, + "height": 5, + "layouts": { + "LAYOUT": { + "layout": [ + {"label":"k40", "x":0, "y":0}, + {"label":"k41", "x":1, "y":0}, + {"label":"k42", "x":2, "y":0}, + {"label":"k43", "x":3, "y":0}, + {"label":"k44", "x":4, "y":0}, + {"label":"k45", "x":5, "y":0}, + {"label":"k46", "x":6, "y":0}, + {"label":"k47", "x":7, "y":0}, + {"label":"k48", "x":8, "y":0}, + {"label":"k49", "x":9, "y":0}, + {"label":"k4a", "x":10, "y":0}, + {"label":"k4b", "x":11, "y":0}, + {"label":"k4c", "x":12, "y":0}, + {"label":"k4d", "x":13, "y":0}, + {"label":"k4e", "x":14, "y":0}, + {"label":"k30", "x":0, "y":1, "w":1.5}, + {"label":"k31", "x":1.5, "y":1}, + {"label":"k32", "x":2.5, "y":1}, + {"label":"k33", "x":3.5, "y":1}, + {"label":"k34", "x":4.5, "y":1}, + {"label":"k35", "x":5.5, "y":1}, + {"label":"k36", "x":6.5, "y":1}, + {"label":"k37", "x":7.5, "y":1}, + {"label":"k38", "x":8.5, "y":1}, + {"label":"k39", "x":9.5, "y":1}, + {"label":"k3a", "x":10.5, "y":1}, + {"label":"k3b", "x":11.5, "y":1}, + {"label":"k3c", "x":12.5, "y":1}, + {"label":"k3d", "x":13.5, "y":1, "w":1.5}, + {"label":"k20", "x":0, "y":2, "w":1.25}, + {"label":"k21", "x":1.25, "y":2}, + {"label":"k22", "x":2.25, "y":2}, + {"label":"k23", "x":3.25, "y":2}, + {"label":"k24", "x":4.25, "y":2}, + {"label":"k25", "x":5.25, "y":2}, + {"label":"k26", "x":6.25, "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":"k10", "x":0, "y":3}, + {"label":"k11", "x":1, "y":3}, + {"label":"k12", "x":2, "y":3}, + {"label":"k13", "x":3, "y":3}, + {"label":"k14", "x":4, "y":3}, + {"label":"k15", "x":5, "y":3}, + {"label":"k16", "x":6, "y":3}, + {"label":"k17", "x":7, "y":3}, + {"label":"k18", "x":8, "y":3}, + {"label":"k19", "x":9, "y":3}, + {"label":"k1a", "x":10, "y":3}, + {"label":"k1b", "x":11, "y":3}, + {"label":"k1c", "x":12, "y":3}, + {"label":"k1d", "x":13, "y":3}, + {"label":"k1e", "x":14, "y":3}, + {"label":"k00", "x":0, "y":4}, + {"label":"k01", "x":1, "y":4, "w":1.25}, + {"label":"k02", "x":2.25, "y":4, "w":1.25}, + {"label":"k03", "x":3.5, "y":4, "w":1.25}, + {"label":"k04", "x":4.75, "y":4, "w":2.25}, + {"label":"k05", "x":7, "y":4}, + {"label":"k06", "x":8, "y":4, "w":2}, + {"label":"k09", "x":10, "y":4}, + {"label":"k0a", "x":11, "y":4}, + {"label":"k0b", "x":12, "y":4}, + {"label":"k0c", "x":13, "y":4}, + {"label":"k0d", "x":14, "y":4} + ] + } + } +} diff --git a/keyboards/katana60/keymaps/colemak/config.h b/keyboards/rominronin/katana60/rev1/keymaps/colemak/config.h similarity index 100% rename from keyboards/katana60/keymaps/colemak/config.h rename to keyboards/rominronin/katana60/rev1/keymaps/colemak/config.h diff --git a/keyboards/katana60/keymaps/colemak/keymap.c b/keyboards/rominronin/katana60/rev1/keymaps/colemak/keymap.c similarity index 99% rename from keyboards/katana60/keymaps/colemak/keymap.c rename to keyboards/rominronin/katana60/rev1/keymaps/colemak/keymap.c index b0ed04185435..91128bd5c43f 100644 --- a/keyboards/katana60/keymaps/colemak/keymap.c +++ b/keyboards/rominronin/katana60/rev1/keymaps/colemak/keymap.c @@ -34,7 +34,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [BASE] = LAYOUT( /* Base */ - KC_ESC, KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, DF(1), KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_PLUS, + KC_ESC, KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, DF(1), KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_LBRC, KC_RBRC, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSPC, MO(3), KC_A, KC_R, KC_S, KC_T, KC_D, KC_HOME, KC_PGUP, 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_END, KC_DEL, KC_PGDN, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, diff --git a/keyboards/katana60/keymaps/colemak/readme.md b/keyboards/rominronin/katana60/rev1/keymaps/colemak/readme.md similarity index 100% rename from keyboards/katana60/keymaps/colemak/readme.md rename to keyboards/rominronin/katana60/rev1/keymaps/colemak/readme.md diff --git a/keyboards/katana60/keymaps/default/config.h b/keyboards/rominronin/katana60/rev1/keymaps/default/config.h similarity index 100% rename from keyboards/katana60/keymaps/default/config.h rename to keyboards/rominronin/katana60/rev1/keymaps/default/config.h diff --git a/keyboards/katana60/keymaps/default/keymap.c b/keyboards/rominronin/katana60/rev1/keymaps/default/keymap.c similarity index 100% rename from keyboards/katana60/keymaps/default/keymap.c rename to keyboards/rominronin/katana60/rev1/keymaps/default/keymap.c diff --git a/keyboards/katana60/keymaps/default/readme.md b/keyboards/rominronin/katana60/rev1/keymaps/default/readme.md similarity index 100% rename from keyboards/katana60/keymaps/default/readme.md rename to keyboards/rominronin/katana60/rev1/keymaps/default/readme.md diff --git a/keyboards/katana60/keymaps/josefadamcik/config.h b/keyboards/rominronin/katana60/rev1/keymaps/josefadamcik/config.h similarity index 100% rename from keyboards/katana60/keymaps/josefadamcik/config.h rename to keyboards/rominronin/katana60/rev1/keymaps/josefadamcik/config.h diff --git a/keyboards/katana60/keymaps/josefadamcik/keymap.c b/keyboards/rominronin/katana60/rev1/keymaps/josefadamcik/keymap.c similarity index 100% rename from keyboards/katana60/keymaps/josefadamcik/keymap.c rename to keyboards/rominronin/katana60/rev1/keymaps/josefadamcik/keymap.c diff --git a/keyboards/katana60/keymaps/josefadamcik/readme.md b/keyboards/rominronin/katana60/rev1/keymaps/josefadamcik/readme.md similarity index 100% rename from keyboards/katana60/keymaps/josefadamcik/readme.md rename to keyboards/rominronin/katana60/rev1/keymaps/josefadamcik/readme.md diff --git a/keyboards/katana60/keymaps/msiu/config.h b/keyboards/rominronin/katana60/rev1/keymaps/msiu/config.h similarity index 100% rename from keyboards/katana60/keymaps/msiu/config.h rename to keyboards/rominronin/katana60/rev1/keymaps/msiu/config.h diff --git a/keyboards/katana60/keymaps/msiu/keymap.c b/keyboards/rominronin/katana60/rev1/keymaps/msiu/keymap.c similarity index 100% rename from keyboards/katana60/keymaps/msiu/keymap.c rename to keyboards/rominronin/katana60/rev1/keymaps/msiu/keymap.c diff --git a/keyboards/katana60/keymaps/msiu/readme.md b/keyboards/rominronin/katana60/rev1/keymaps/msiu/readme.md similarity index 100% rename from keyboards/katana60/keymaps/msiu/readme.md rename to keyboards/rominronin/katana60/rev1/keymaps/msiu/readme.md diff --git a/keyboards/katana60/keymaps/rominronin/config.h b/keyboards/rominronin/katana60/rev1/keymaps/rominronin/config.h similarity index 100% rename from keyboards/katana60/keymaps/rominronin/config.h rename to keyboards/rominronin/katana60/rev1/keymaps/rominronin/config.h diff --git a/keyboards/katana60/keymaps/rominronin/keymap.c b/keyboards/rominronin/katana60/rev1/keymaps/rominronin/keymap.c similarity index 99% rename from keyboards/katana60/keymaps/rominronin/keymap.c rename to keyboards/rominronin/katana60/rev1/keymaps/rominronin/keymap.c index 754b552b24e0..5666dba9d569 100644 --- a/keyboards/katana60/keymaps/rominronin/keymap.c +++ b/keyboards/rominronin/katana60/rev1/keymaps/rominronin/keymap.c @@ -34,7 +34,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [BASE] = LAYOUT( /* Base */ - KC_ESC, KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, DF(1), KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_PLUS, + KC_ESC, KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, DF(1), KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_B, KC_LBRC, KC_RBRC, KC_J, KC_L, KC_U, KC_Y, KC_QUOT, KC_BSPC, MO(3), KC_A, KC_R, KC_S, KC_T, KC_G, KC_HOME, KC_PGUP, KC_M, KC_N, KC_E, KC_I, KC_O, KC_ENT, KC_LSFT, KC_Z, KC_X, KC_C, KC_D, KC_V, KC_END, KC_DEL, KC_PGDN, KC_K, KC_H, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, @@ -64,6 +64,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { }; + void matrix_init_user(void) { } diff --git a/keyboards/katana60/keymaps/rominronin/readme.md b/keyboards/rominronin/katana60/rev1/keymaps/rominronin/readme.md similarity index 100% rename from keyboards/katana60/keymaps/rominronin/readme.md rename to keyboards/rominronin/katana60/rev1/keymaps/rominronin/readme.md diff --git a/keyboards/rominronin/katana60/rev1/readme.md b/keyboards/rominronin/katana60/rev1/readme.md new file mode 100644 index 000000000000..d41548b18d71 --- /dev/null +++ b/keyboards/rominronin/katana60/rev1/readme.md @@ -0,0 +1,17 @@ +# Katana60 rev1 + +![Katana60 rev1](https://i.imgur.com/xVkODOul.jpg) + +A 60% keyboard with a symmetrical staggered layout, sold by CandyKeys.com. + +Keyboard Maintainer: [Baris Tosun](https://github.com/rominronin) +Hardware Supported: Katana60 PCB rev1 +Hardware Availability: the rev1 is no longer available, the rev2 can be found at [candykeys.com](https://candykeys.com/product/katana60-pcb-V2) + +Make example for this keyboard (after setting up your build environment): + + make rominronin/katana60/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). + +There is also ongoing discussion for the extend layer, at the [Colemak Forum](https://forum.colemak.com/topic/2327-developing-an-extend-layer-for-the-katana60/) diff --git a/keyboards/katana60/katana60.c b/keyboards/rominronin/katana60/rev1/rev1.c similarity index 51% rename from keyboards/katana60/katana60.c rename to keyboards/rominronin/katana60/rev1/rev1.c index e8d4fef1936d..e57ae2bbcbab 100644 --- a/keyboards/katana60/katana60.c +++ b/keyboards/rominronin/katana60/rev1/rev1.c @@ -13,31 +13,4 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -#include "katana60.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 "rev1.h" diff --git a/keyboards/katana60/katana60.h b/keyboards/rominronin/katana60/rev1/rev1.h similarity index 97% rename from keyboards/katana60/katana60.h rename to keyboards/rominronin/katana60/rev1/rev1.h index 904ba56210a3..52926cc35e00 100644 --- a/keyboards/katana60/katana60.h +++ b/keyboards/rominronin/katana60/rev1/rev1.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 KATANA60_H -#define KATANA60_H +#pragma once #include "quantum.h" @@ -36,5 +35,3 @@ { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d, KC_NO }, \ { k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, k4a, k4b, k4c, k4d, k4e }, \ } - -#endif diff --git a/keyboards/katana60/rules.mk b/keyboards/rominronin/katana60/rev1/rules.mk similarity index 56% rename from keyboards/katana60/rules.mk rename to keyboards/rominronin/katana60/rev1/rules.mk index e41c168c4fc3..7b69908b1ba9 100644 --- a/keyboards/katana60/rules.mk +++ b/keyboards/rominronin/katana60/rev1/rules.mk @@ -2,19 +2,12 @@ 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 +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 @@ -23,9 +16,7 @@ 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 = 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 +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +BLUETOOTH_ENABLE = no # Enable Bluetooth +AUDIO_ENABLE = no # Audio output diff --git a/keyboards/rominronin/katana60/rev2/config.h b/keyboards/rominronin/katana60/rev2/config.h new file mode 100644 index 000000000000..7eff68a7f492 --- /dev/null +++ b/keyboards/rominronin/katana60/rev2/config.h @@ -0,0 +1,105 @@ +/* +Copyright 2019 rominronin + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License 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 0x7272 // "rr" - rominronin +#define PRODUCT_ID 0xF03B +#define DEVICE_VER 0x0001 +#define MANUFACTURER RominRonin CandyKeys +#define PRODUCT Katana60 rev2 + +/* 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 { B0, E6, D5, B4, B5 } +#define MATRIX_COL_PINS { F0, F1, F4, F5, F6, F7, C7, C6, B6, D6, D4, D3, D2, D1, D0 } +#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 + +#define TAPPING_TERM 200 + +/* + * 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/rominronin/katana60/rev2/info.json b/keyboards/rominronin/katana60/rev2/info.json new file mode 100644 index 000000000000..bc31ae64910b --- /dev/null +++ b/keyboards/rominronin/katana60/rev2/info.json @@ -0,0 +1,579 @@ +{ + "keyboard_name": "Katana60 rev2", + "url": "https://candykeys.com/product/katana60-pcb-V2", + "maintainer": "rominronin", + "width": 15, + "height": 5, + "layouts": { + "LAYOUT_7u_a": { + "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}, + {"label":"k0e","x":14,"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":"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":"k1e","x":13.5,"y":1,"w":1.5}, + {"label":"k20","x":0,"y":2,"w":1.25}, + {"label":"k21","x":1.25,"y":2}, + {"label":"k22","x":2.25,"y":2}, + {"label":"k23","x":3.25,"y":2}, + {"label":"k24","x":4.25,"y":2}, + {"label":"k25","x":5.25,"y":2}, + {"label":"k26","x":6.25,"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":"k2d","x":12.75,"y":2}, + {"label":"k2e","x":13.75,"y":2,"w":1.25}, + {"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":"k34","x":4,"y":3}, + {"label":"k35","x":5,"y":3}, + {"label":"k36","x":6,"y":3}, + {"label":"k37","x":7,"y":3}, + {"label":"k38","x":8,"y":3}, + {"label":"k39","x":9,"y":3}, + {"label":"k3a","x":10,"y":3}, + {"label":"k3b","x":11,"y":3}, + {"label":"k3c","x":12,"y":3}, + {"label":"k3d","x":13,"y":3}, + {"label":"k3e","x":14,"y":3}, + {"label":"k41","x":0,"y":4,"w":1.5}, + {"label":"k42","x":1.5,"y":4}, + {"label":"k43","x":2.5,"y":4,"w":1.5}, + {"label":"k47","x":4,"y":4,"w":7}, + {"label":"k4b","x":11,"y":4}, + {"label":"k4c","x":12,"y":4}, + {"label":"k4d","x":13,"y":4}, + {"label":"k4e","x":14,"y":4} + ] + }, + "LAYOUT_7u_b": { + "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}, + {"label":"k0e","x":14,"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":"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":"k1e","x":13.5,"y":1,"w":1.5}, + {"label":"k20","x":0,"y":2,"w":1.25}, + {"label":"k21","x":1.25,"y":2}, + {"label":"k22","x":2.25,"y":2}, + {"label":"k23","x":3.25,"y":2}, + {"label":"k24","x":4.25,"y":2}, + {"label":"k25","x":5.25,"y":2}, + {"label":"k26","x":6.25,"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":"k2d","x":12.75,"y":2}, + {"label":"k2e","x":13.75,"y":2,"w":1.25}, + {"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":"k34","x":4,"y":3}, + {"label":"k35","x":5,"y":3}, + {"label":"k36","x":6,"y":3}, + {"label":"k37","x":7,"y":3}, + {"label":"k38","x":8,"y":3}, + {"label":"k39","x":9,"y":3}, + {"label":"k3a","x":10,"y":3}, + {"label":"k3b","x":11,"y":3}, + {"label":"k3c","x":12,"y":3}, + {"label":"k3d","x":13,"y":3}, + {"label":"k3e","x":14,"y":3}, + {"label":"k41","x":0,"y":4,"w":1.5}, + {"label":"k42","x":1.5,"y":4}, + {"label":"k43","x":2.5,"y":4,"w":1.5}, + {"label":"k47","x":4,"y":4,"w":7}, + {"label":"k17","x":11,"y":4,"w":1.5}, + {"label":"k27","x":12.5,"y":4}, + {"label":"k48","x":13.5,"y":4,"w":1.5} + ] + }, + "LAYOUT_1_a": { + "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}, + {"label":"k0e","x":14,"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":"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":"k1e","x":13.5,"y":1,"w":1.5}, + {"label":"k20","x":0,"y":2,"w":1.25}, + {"label":"k21","x":1.25,"y":2}, + {"label":"k22","x":2.25,"y":2}, + {"label":"k23","x":3.25,"y":2}, + {"label":"k24","x":4.25,"y":2}, + {"label":"k25","x":5.25,"y":2}, + {"label":"k26","x":6.25,"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":"k2d","x":12.75,"y":2}, + {"label":"k2e","x":13.75,"y":2,"w":1.25}, + {"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":"k34","x":4,"y":3}, + {"label":"k35","x":5,"y":3}, + {"label":"k36","x":6,"y":3}, + {"label":"k37","x":7,"y":3}, + {"label":"k38","x":8,"y":3}, + {"label":"k39","x":9,"y":3}, + {"label":"k3a","x":10,"y":3}, + {"label":"k3b","x":11,"y":3}, + {"label":"k3c","x":12,"y":3}, + {"label":"k3d","x":13,"y":3}, + {"label":"k3e","x":14,"y":3}, + {"label":"k40","x":0,"y":4}, + {"label":"k41","x":1,"y":4,"w":1.25}, + {"label":"k42","x":2.25,"y":4,"w":1.25}, + {"label":"k43","x":3.5,"y":4,"w":1.25}, + {"label":"k44","x":4.75,"y":4,"w":2.25}, + {"label":"k47","x":7,"y":4}, + {"label":"k49","x":8,"y":4,"w":2}, + {"label":"k4a","x":10,"y":4}, + {"label":"k4b","x":11,"y":4}, + {"label":"k4c","x":12,"y":4}, + {"label":"k4d","x":13,"y":4}, + {"label":"k4e","x":14,"y":4} + ] + }, + "LAYOUT_1_b": { + "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}, + {"label":"k0e","x":14,"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":"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":"k1e","x":13.5,"y":1,"w":1.5}, + {"label":"k20","x":0,"y":2,"w":1.25}, + {"label":"k21","x":1.25,"y":2}, + {"label":"k22","x":2.25,"y":2}, + {"label":"k23","x":3.25,"y":2}, + {"label":"k24","x":4.25,"y":2}, + {"label":"k25","x":5.25,"y":2}, + {"label":"k26","x":6.25,"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":"k2d","x":12.75,"y":2}, + {"label":"k2e","x":13.75,"y":2,"w":1.25}, + {"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":"k34","x":4,"y":3}, + {"label":"k35","x":5,"y":3}, + {"label":"k36","x":6,"y":3}, + {"label":"k37","x":7,"y":3}, + {"label":"k38","x":8,"y":3}, + {"label":"k39","x":9,"y":3}, + {"label":"k3a","x":10,"y":3}, + {"label":"k3b","x":11,"y":3}, + {"label":"k3c","x":12,"y":3}, + {"label":"k3d","x":13,"y":3}, + {"label":"k3e","x":14,"y":3}, + {"label":"k40","x":0,"y":4}, + {"label":"k41","x":1,"y":4,"w":1.25}, + {"label":"k42","x":2.25,"y":4,"w":1.25}, + {"label":"k43","x":3.5,"y":4,"w":1.25}, + {"label":"k44","x":4.75,"y":4,"w":2.25}, + {"label":"k47","x":7,"y":4}, + {"label":"k49","x":8,"y":4,"w":2.75}, + {"label":"k17","x":10.75,"y":4,"w":2}, + {"label":"k48","x":12.75,"y":4,"w":2.25} + ] + }, + "LAYOUT_1_c": { + "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}, + {"label":"k0e","x":14,"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":"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":"k1e","x":13.5,"y":1,"w":1.5}, + {"label":"k20","x":0,"y":2,"w":1.25}, + {"label":"k21","x":1.25,"y":2}, + {"label":"k22","x":2.25,"y":2}, + {"label":"k23","x":3.25,"y":2}, + {"label":"k24","x":4.25,"y":2}, + {"label":"k25","x":5.25,"y":2}, + {"label":"k26","x":6.25,"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":"k2d","x":12.75,"y":2}, + {"label":"k2e","x":13.75,"y":2,"w":1.25}, + {"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":"k34","x":4,"y":3}, + {"label":"k35","x":5,"y":3}, + {"label":"k36","x":6,"y":3}, + {"label":"k37","x":7,"y":3}, + {"label":"k38","x":8,"y":3}, + {"label":"k39","x":9,"y":3}, + {"label":"k3a","x":10,"y":3}, + {"label":"k3b","x":11,"y":3}, + {"label":"k3c","x":12,"y":3}, + {"label":"k3d","x":13,"y":3}, + {"label":"k3e","x":14,"y":3}, + {"label":"k40","x":0,"y":4}, + {"label":"k41","x":1,"y":4,"w":1.25}, + {"label":"k42","x":2.25,"y":4,"w":1.25}, + {"label":"k43","x":3.5,"y":4,"w":1.25}, + {"label":"k44","x":4.75,"y":4,"w":2.25}, + {"label":"k47","x":7,"y":4}, + {"label":"k49","x":8,"y":4,"w":2}, + {"label":"k45","x":10,"y":4,"w":1.5}, + {"label":"k27","x":11.5,"y":4,"w":1.25}, + {"label":"k48","x":12.75,"y":4,"w":2.25} + ] + }, + "LAYOUT_2_a": { + "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}, + {"label":"k0e","x":14,"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":"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":"k1e","x":13.5,"y":1,"w":1.5}, + {"label":"k20","x":0,"y":2,"w":1.25}, + {"label":"k21","x":1.25,"y":2}, + {"label":"k22","x":2.25,"y":2}, + {"label":"k23","x":3.25,"y":2}, + {"label":"k24","x":4.25,"y":2}, + {"label":"k25","x":5.25,"y":2}, + {"label":"k26","x":6.25,"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":"k2d","x":12.75,"y":2}, + {"label":"k2e","x":13.75,"y":2,"w":1.25}, + {"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":"k34","x":4,"y":3}, + {"label":"k35","x":5,"y":3}, + {"label":"k36","x":6,"y":3}, + {"label":"k37","x":7,"y":3}, + {"label":"k38","x":8,"y":3}, + {"label":"k39","x":9,"y":3}, + {"label":"k3a","x":10,"y":3}, + {"label":"k3b","x":11,"y":3}, + {"label":"k3c","x":12,"y":3}, + {"label":"k3d","x":13,"y":3}, + {"label":"k3e","x":14,"y":3}, + {"label":"k41","x":0,"y":4,"w":1.5}, + {"label":"k42","x":1.5,"y":4,"w":1.25}, + {"label":"k43","x":2.75,"y":4,"w":1.5}, + {"label":"k44","x":4.25,"y":4,"w":2.75}, + {"label":"k47","x":7,"y":4}, + {"label":"k49","x":8,"y":4,"w":2}, + {"label":"k4a","x":10,"y":4}, + {"label":"k4b","x":11,"y":4}, + {"label":"k4c","x":12,"y":4}, + {"label":"k4d","x":13,"y":4}, + {"label":"k4e","x":14,"y":4} + ] + }, + "LAYOUT_2_b": { + "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}, + {"label":"k0e","x":14,"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":"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":"k1e","x":13.5,"y":1,"w":1.5}, + {"label":"k20","x":0,"y":2,"w":1.25}, + {"label":"k21","x":1.25,"y":2}, + {"label":"k22","x":2.25,"y":2}, + {"label":"k23","x":3.25,"y":2}, + {"label":"k24","x":4.25,"y":2}, + {"label":"k25","x":5.25,"y":2}, + {"label":"k26","x":6.25,"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":"k2d","x":12.75,"y":2}, + {"label":"k2e","x":13.75,"y":2,"w":1.25}, + {"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":"k34","x":4,"y":3}, + {"label":"k35","x":5,"y":3}, + {"label":"k36","x":6,"y":3}, + {"label":"k37","x":7,"y":3}, + {"label":"k38","x":8,"y":3}, + {"label":"k39","x":9,"y":3}, + {"label":"k3a","x":10,"y":3}, + {"label":"k3b","x":11,"y":3}, + {"label":"k3c","x":12,"y":3}, + {"label":"k3d","x":13,"y":3}, + {"label":"k3e","x":14,"y":3}, + {"label":"k41","x":0,"y":4,"w":1.5}, + {"label":"k42","x":1.5,"y":4,"w":1.25}, + {"label":"k43","x":2.75,"y":4,"w":1.5}, + {"label":"k44","x":4.25,"y":4,"w":2.75}, + {"label":"k47","x":7,"y":4}, + {"label":"k49","x":8,"y":4,"w":2.75}, + {"label":"k17","x":10.75,"y":4,"w":2}, + {"label":"k48","x":12.75,"y":4,"w":2.25} + ] + }, + "LAYOUT_2_c": { + "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}, + {"label":"k0e","x":14,"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":"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":"k1e","x":13.5,"y":1,"w":1.5}, + {"label":"k20","x":0,"y":2,"w":1.25}, + {"label":"k21","x":1.25,"y":2}, + {"label":"k22","x":2.25,"y":2}, + {"label":"k23","x":3.25,"y":2}, + {"label":"k24","x":4.25,"y":2}, + {"label":"k25","x":5.25,"y":2}, + {"label":"k26","x":6.25,"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":"k2d","x":12.75,"y":2}, + {"label":"k2e","x":13.75,"y":2,"w":1.25}, + {"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":"k34","x":4,"y":3}, + {"label":"k35","x":5,"y":3}, + {"label":"k36","x":6,"y":3}, + {"label":"k37","x":7,"y":3}, + {"label":"k38","x":8,"y":3}, + {"label":"k39","x":9,"y":3}, + {"label":"k3a","x":10,"y":3}, + {"label":"k3b","x":11,"y":3}, + {"label":"k3c","x":12,"y":3}, + {"label":"k3d","x":13,"y":3}, + {"label":"k3e","x":14,"y":3}, + {"label":"k41","x":0,"y":4,"w":1.5}, + {"label":"k42","x":1.5,"y":4,"w":1.25}, + {"label":"k43","x":2.75,"y":4,"w":1.5}, + {"label":"k44","x":4.25,"y":4,"w":2.75}, + {"label":"k47","x":7,"y":4}, + {"label":"k49","x":8,"y":4,"w":2}, + {"label":"k45","x":10,"y":4,"w":1.5}, + {"label":"k27","x":11.5,"y":4,"w":1.25}, + {"label":"k48","x":12.75,"y":4,"w":2.25} + ] + } + } +} diff --git a/keyboards/rominronin/katana60/rev2/keymaps/default/config.h b/keyboards/rominronin/katana60/rev2/keymaps/default/config.h new file mode 100644 index 000000000000..068967640261 --- /dev/null +++ b/keyboards/rominronin/katana60/rev2/keymaps/default/config.h @@ -0,0 +1,19 @@ +/* Copyright 2019 rominronin + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License 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/rominronin/katana60/rev2/keymaps/default/keymap.c b/keyboards/rominronin/katana60/rev2/keymaps/default/keymap.c new file mode 100644 index 000000000000..d9c9b6d4ed42 --- /dev/null +++ b/keyboards/rominronin/katana60/rev2/keymaps/default/keymap.c @@ -0,0 +1,71 @@ +/* Copyright 2019 rominronin + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public 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 + +// MacOS based definitions. +#define K_SPCFN LT(SYMB, KC_SPACE) // Tap for space, hold for symbols layer +#define K_PRVWD LALT(KC_LEFT) // Previous word +#define K_NXTWD LALT(KC_RIGHT) // Next word +#define K_LSTRT LGUI(KC_LEFT) // Start of line +#define K_LEND LGUI(KC_RIGHT) // End of line +#define UNDO LGUI(KC_Z) // UNDO +#define CUT LGUI(KC_X) // CUT +#define COPY LGUI(KC_C) // COPY +#define PASTE LGUI(KC_V) // PASTE + +enum layer_names { + BASE, + NUMB, + SYMB, + CURS, +}; + +// 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] = { + [BASE] = LAYOUT_1_a(/* Base */ + KC_ESC, KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, DF(1), KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, + 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_BSPC, + MO(3), 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_DEL, KC_PGDN, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, + MO(2), KC_LCTL, KC_LGUI, KC_LALT, KC_BSPC, KC_ENT, K_SPCFN, KC_RGUI, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT + ), + [NUMB] = LAYOUT_1_a( + _______, _______, _______, _______, _______, _______, _______, DF(0), _______, _______, KC_PEQL, KC_PSLS, KC_PAST, _______, _______, + _______, _______, _______, KC_MS_U, _______, _______, _______, _______, _______, KC_P7, KC_P8, KC_P9, KC_PMNS, _______, + _______, KC_BTN2, KC_MS_L, KC_MS_D, KC_MS_R, _______, _______, _______, _______, KC_P4, KC_P5, KC_P6, KC_PPLS, _______, + _______, _______, KC_ACL0, KC_ACL1, KC_ACL2, _______, _______, _______, _______, _______, KC_P1, KC_P2, KC_P3, KC_PENT, _______, + _______, _______, _______, _______, _______, KC_P0, _______, _______, KC_PDOT, KC_PENT, _______, _______ + ), + [SYMB] = LAYOUT_1_a( + 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_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_VOLD, KC_VOLU, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, _______, + _______, KC_PLUS, KC_MINS, KC_EQL, KC_LCBR, KC_RCBR, KC_MPRV, KC_MPLY, KC_MNXT, KC_LBRC, KC_RBRC, KC_SCLN, KC_COLN, KC_BSLS, _______, + _______, _______, _______, _______, _______, _______, KC_DEL, _______, _______, _______, _______, _______ + ), + [CURS] = LAYOUT_1_a( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, K_PRVWD, KC_UP, K_NXTWD, _______, _______, + _______, _______, KC_LCTL, KC_LALT, KC_LSFT, _______, _______, _______, KC_BSPC, KC_LEFT, KC_DOWN, KC_RIGHT,KC_DEL, _______, + _______, UNDO, CUT, COPY, PASTE, _______, _______, _______, _______, _______, K_LSTRT, _______, K_LEND, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ) +}; diff --git a/keyboards/rominronin/katana60/rev2/keymaps/default/readme.md b/keyboards/rominronin/katana60/rev2/keymaps/default/readme.md new file mode 100644 index 000000000000..6d0bbe8b2d15 --- /dev/null +++ b/keyboards/rominronin/katana60/rev2/keymaps/default/readme.md @@ -0,0 +1 @@ +# The default keymap for katana60_rev2 diff --git a/keyboards/rominronin/katana60/rev2/keymaps/rominronin_7u/config.h b/keyboards/rominronin/katana60/rev2/keymaps/rominronin_7u/config.h new file mode 100644 index 000000000000..068967640261 --- /dev/null +++ b/keyboards/rominronin/katana60/rev2/keymaps/rominronin_7u/config.h @@ -0,0 +1,19 @@ +/* Copyright 2019 rominronin + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License 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/rominronin/katana60/rev2/keymaps/rominronin_7u/keymap.c b/keyboards/rominronin/katana60/rev2/keymaps/rominronin_7u/keymap.c new file mode 100644 index 000000000000..5450892123b6 --- /dev/null +++ b/keyboards/rominronin/katana60/rev2/keymaps/rominronin_7u/keymap.c @@ -0,0 +1,79 @@ +/* Copyright 2019 rominronin + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public 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 + +// MacOS based definitions. +#define K_SPCFN LT(SYMB, KC_SPACE) // Tap for space, hold for symbols layer +#define K_PRVWD LALT(KC_LEFT) // Previous word +#define K_NXTWD LALT(KC_RIGHT) // Next word +#define K_LSTRT LGUI(KC_LEFT) // Start of line +#define K_LEND LGUI(KC_RIGHT) // End of line +#define UNDO LGUI(KC_Z) // UNDO +#define CUT LGUI(KC_X) // CUT +#define COPY LGUI(KC_C) // COPY +#define PASTE LGUI(KC_V) // PASTE + +enum layer_names { + BASE, + NUMB, + SYMB, + CURS, + BASE2, +}; + +// 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] = { + [BASE] = LAYOUT_7u_a(/* Base */ + KC_ESC, KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, DF(4), KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, + KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_B, KC_LBRC, KC_RBRC, KC_J, KC_L, KC_U, KC_Y, KC_QUOT, KC_BSPC, + MO(3), KC_A, KC_R, KC_S, KC_T, KC_G, KC_HOME, KC_PGUP, KC_M, KC_N, KC_E, KC_I, KC_O, KC_ENT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_D, KC_V, KC_END, KC_DEL, KC_PGDN, KC_K, KC_H, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, + KC_LCTL, KC_LALT, KC_LGUI, K_SPCFN, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT + ), + [NUMB] = LAYOUT_7u_a( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_PEQL, KC_PSLS, KC_PAST, _______, _______, + _______, _______, _______, KC_MS_U, _______, _______, _______, _______, _______, KC_P7, KC_P8, KC_P9, KC_PMNS, _______, + DF(0), KC_BTN2, KC_MS_L, KC_MS_D, KC_MS_R, _______, _______, _______, _______, KC_P4, KC_P5, KC_P6, KC_PPLS, _______, + _______, _______, KC_ACL0, KC_ACL1, KC_ACL2, _______, _______, _______, _______, _______, KC_P1, KC_P2, KC_P3, KC_PENT, _______, + _______, _______, _______, KC_P0, KC_PDOT, KC_PENT, _______, _______ + ), + [SYMB] = LAYOUT_7u_a( + 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_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_VOLD, KC_VOLU, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, _______, + _______, KC_PLUS, KC_MINS, KC_EQL, KC_LCBR, KC_RCBR, KC_MPRV, KC_MPLY, KC_MNXT, KC_LBRC, KC_RBRC, KC_SCLN, KC_COLN, KC_BSLS, _______, + _______, _______, _______, KC_DEL, _______, _______, _______, _______ + ), + [CURS] = LAYOUT_7u_a( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, K_PRVWD, KC_UP, K_NXTWD, _______, _______, + _______, _______, KC_LCTL, KC_LALT, KC_LSFT, _______, _______, _______, KC_BSPC, KC_LEFT, KC_DOWN, KC_RIGHT,KC_DEL, _______, + _______, UNDO, CUT, COPY, PASTE, _______, _______, _______, _______, _______, K_LSTRT, _______, K_LEND, _______, _______, + _______, _______, _______, DF(1), _______, _______, _______, _______ + ), + [BASE2] = LAYOUT_7u_a(/* Base */ + KC_ESC, KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, DF(0), KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, + KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_B, KC_LBRC, KC_RBRC, KC_J, KC_L, KC_U, KC_Y, KC_QUOT, KC_BSPC, + KC_CAPS, KC_A, KC_R, KC_S, KC_T, KC_G, KC_HOME, KC_PGUP, KC_M, KC_N, KC_E, KC_I, KC_O, KC_ENT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_D, KC_V, KC_END, KC_DEL, KC_PGDN, KC_K, KC_H, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, + KC_LCTL, KC_LALT, KC_LGUI, KC_SPACE, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT + ) +}; diff --git a/keyboards/rominronin/katana60/rev2/keymaps/rominronin_7u/readme.md b/keyboards/rominronin/katana60/rev2/keymaps/rominronin_7u/readme.md new file mode 100644 index 000000000000..6d0bbe8b2d15 --- /dev/null +++ b/keyboards/rominronin/katana60/rev2/keymaps/rominronin_7u/readme.md @@ -0,0 +1 @@ +# The default keymap for katana60_rev2 diff --git a/keyboards/rominronin/katana60/rev2/readme.md b/keyboards/rominronin/katana60/rev2/readme.md new file mode 100644 index 000000000000..2f2abad7096c --- /dev/null +++ b/keyboards/rominronin/katana60/rev2/readme.md @@ -0,0 +1,17 @@ +# Katana60 rev2 + +![Katana60 rev2](https://i.imgur.com/3hBsSvBl.jpg) + +A 60% keyboard with a symmetrical staggered layout, sold by CandyKeys.com. + +Keyboard Maintainer: [Baris Tosun](https://github.com/rominronin) +Hardware Supported: Katana60 PCB rev2 +Hardware Availability: [candykeys.com](https://candykeys.com/product/katana60-pcb-V2) + +Make example for this keyboard (after setting up your build environment): + + make rominronin/katana60/rev2: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). + +There is also ongoing discussion for the extend layer, at the [Colemak Forum](https://forum.colemak.com/topic/2327-developing-an-extend-layer-for-the-katana60/) diff --git a/keyboards/rominronin/katana60/rev2/rev2.c b/keyboards/rominronin/katana60/rev2/rev2.c new file mode 100644 index 000000000000..3336fd0dc703 --- /dev/null +++ b/keyboards/rominronin/katana60/rev2/rev2.c @@ -0,0 +1,16 @@ +/* Copyright 2019 rominronin + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#include "rev2.h" diff --git a/keyboards/rominronin/katana60/rev2/rev2.h b/keyboards/rominronin/katana60/rev2/rev2.h new file mode 100644 index 000000000000..35a45b438a9a --- /dev/null +++ b/keyboards/rominronin/katana60/rev2/rev2.h @@ -0,0 +1,238 @@ +/* Copyright 2019 rominronin + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License 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 + +/* LAYOUT_7u_a + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐ + * │00 │01 │02 │03 │04 │05 │06 │07 │08 │09 │0A │0B │0C │0D │0E │ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┤ + * │10 │11 │12 │13 │14 │15 │16 │18 │19 │1A │1B │1C │1D │1E │ + * ├────┬┴──┬┴──┬┴──┬┴──┬┴──┬┴──┬┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬────┤ + * │20 │21 │22 │23 │24 │25 │26 │ │28 │29 │2A │2B │2C │2D │2E │ + * ├───┬┴──┬┴──┬┴──┬┴──┬┴──┬┴──┬┴─┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬───┤ + * │30 │31 │32 │33 │34 │35 │36 │37 │38 │39 │3A │3B │3C │3D │3E │ + * ├───┴─┬─┴─┬─┴───┼───┴───┴───┴───┴───┴───┴───┼───┼───┼───┼───┤ + * │41 │42 │43 │ 47 │4B │4C │4D │4E │ + * └─────┴───┴─────┴───────────────────────────┴───┴───┴───┴───┘ + */ +#define LAYOUT_7u_a( \ + Q00, Q01, Q02, Q03, Q04, Q05, Q06, Q07, Q08, Q09, Q0A, Q0B, Q0C, Q0D, Q0E, \ + Q10, Q11, Q12, Q13, Q14, Q15, Q16, Q18, Q19, Q1A, Q1B, Q1C, Q1D, Q1E, \ + Q20, Q21, Q22, Q23, Q24, Q25, Q26, Q28, Q29, Q2A, Q2B, Q2C, Q2D, Q2E, \ + Q30, Q31, Q32, Q33, Q34, Q35, Q36, Q37, Q38, Q39, Q3A, Q3B, Q3C, Q3D, Q3E, \ + Q41, Q42, Q43, Q47, Q4B, Q4C, Q4D, Q4E \ +) { \ + { Q00, Q01, Q02, Q03, Q04, Q05, Q06, Q07, Q08, Q09, Q0A, Q0B, Q0C, Q0D, Q0E }, \ + { Q10, Q11, Q12, Q13, Q14, Q15, Q16, XXX, Q18, Q19, Q1A, Q1B, Q1C, Q1D, Q1E }, \ + { Q20, Q21, Q22, Q23, Q24, Q25, Q26, XXX, Q28, Q29, Q2A, Q2B, Q2C, Q2D, Q2E }, \ + { Q30, Q31, Q32, Q33, Q34, Q35, Q36, Q37, Q38, Q39, Q3A, Q3B, Q3C, Q3D, Q3E }, \ + { XXX, Q41, Q42, Q43, XXX, XXX, XXX, Q47, XXX, XXX, XXX, Q4B, Q4C, Q4D, Q4E } \ +} + +/* LAYOUT_7u_b + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐ + * │00 │01 │02 │03 │04 │05 │06 │07 │08 │09 │0A │0B │0C │0D │0E │ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┤ + * │10 │11 │12 │13 │14 │15 │16 │18 │19 │1A │1B │1C │1D │1E │ + * ├────┬┴──┬┴──┬┴──┬┴──┬┴──┬┴──┬┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬────┤ + * │20 │21 │22 │23 │24 │25 │26 │ │28 │29 │2A │2B │2C │2D │2E │ + * ├───┬┴──┬┴──┬┴──┬┴──┬┴──┬┴──┬┴─┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬───┤ + * │30 │31 │32 │33 │34 │35 │36 │37 │38 │39 │3A │3B │3C │3D │3E │ + * ├───┴─┬─┴─┬─┴───┼───┴───┴───┴───┴───┴───┴───┼───┴─┬─┴─┬─┴───┤ + * │41 │42 │43 │ 47 │17 │27 │48 │ + * └─────┴───┴─────┴───────────────────────────┴─────┴───┴─────┘ + */ +#define LAYOUT_7u_b( \ + Q00, Q01, Q02, Q03, Q04, Q05, Q06, Q07, Q08, Q09, Q0A, Q0B, Q0C, Q0D, Q0E, \ + Q10, Q11, Q12, Q13, Q14, Q15, Q16, Q18, Q19, Q1A, Q1B, Q1C, Q1D, Q1E, \ + Q20, Q21, Q22, Q23, Q24, Q25, Q26, Q28, Q29, Q2A, Q2B, Q2C, Q2D, Q2E, \ + Q30, Q31, Q32, Q33, Q34, Q35, Q36, Q37, Q38, Q39, Q3A, Q3B, Q3C, Q3D, Q3E, \ + Q41, Q42, Q43, Q47, Q17, Q27, Q48 \ +) { \ + { Q00, Q01, Q02, Q03, Q04, Q05, Q06, Q07, Q08, Q09, Q0A, Q0B, Q0C, Q0D, Q0E }, \ + { Q10, Q11, Q12, Q13, Q14, Q15, Q16, Q17, Q18, Q19, Q1A, Q1B, Q1C, Q1D, Q1E }, \ + { Q20, Q21, Q22, Q23, Q24, Q25, Q26, Q27, Q28, Q29, Q2A, Q2B, Q2C, Q2D, Q2E }, \ + { Q30, Q31, Q32, Q33, Q34, Q35, Q36, Q37, Q38, Q39, Q3A, Q3B, Q3C, Q3D, Q3E }, \ + { XXX, Q41, Q42, Q43, XXX, XXX, XXX, Q47, Q48, XXX, XXX, XXX, XXX, XXX, XXX } \ +} + +/* LAYOUT_1_a + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐ + * │00 │01 │02 │03 │04 │05 │06 │07 │08 │09 │0A │0B │0C │0D │0E │ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┤ + * │10 │11 │12 │13 │14 │15 │16 │18 │19 │1A │1B │1C │1D │1E │ + * ├────┬┴──┬┴──┬┴──┬┴──┬┴──┬┴──┬┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬────┤ + * │20 │21 │22 │23 │24 │25 │26 │ │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 │43 │ 44 │47 │ 49 │4A │4B │4C │4D │4E │ + * └───┴────┴────┴────┴────────┴───┴───────┴───┴───┴───┴───┴───┘ + */ +#define LAYOUT_1_a( \ + Q00, Q01, Q02, Q03, Q04, Q05, Q06, Q07, Q08, Q09, Q0A, Q0B, Q0C, Q0D, Q0E, \ + Q10, Q11, Q12, Q13, Q14, Q15, Q16, Q18, Q19, Q1A, Q1B, Q1C, Q1D, Q1E, \ + Q20, Q21, Q22, Q23, Q24, Q25, Q26, Q28, Q29, Q2A, Q2B, Q2C, Q2D, Q2E, \ + Q30, Q31, Q32, Q33, Q34, Q35, Q36, Q37, Q38, Q39, Q3A, Q3B, Q3C, Q3D, Q3E, \ + Q40, Q41, Q42, Q43, Q44, Q47, Q49, Q4A, Q4B, Q4C, Q4D, Q4E \ +) { \ + { Q00, Q01, Q02, Q03, Q04, Q05, Q06, Q07, Q08, Q09, Q0A, Q0B, Q0C, Q0D, Q0E }, \ + { Q10, Q11, Q12, Q13, Q14, Q15, Q16, XXX, Q18, Q19, Q1A, Q1B, Q1C, Q1D, Q1E }, \ + { Q20, Q21, Q22, Q23, Q24, Q25, Q26, XXX, Q28, Q29, Q2A, Q2B, Q2C, Q2D, Q2E }, \ + { Q30, Q31, Q32, Q33, Q34, Q35, Q36, Q37, Q38, Q39, Q3A, Q3B, Q3C, Q3D, Q3E }, \ + { Q40, Q41, Q42, Q43, Q44, XXX, XXX, Q47, XXX, Q49, Q4A, Q4B, Q4C, Q4D, Q4E } \ +} + +/* LAYOUT_1_b + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐ + * │00 │01 │02 │03 │04 │05 │06 │07 │08 │09 │0A │0B │0C │0D │0E │ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┤ + * │10 │11 │12 │13 │14 │15 │16 │18 │19 │1A │1B │1C │1D │1E │ + * ├────┬┴──┬┴──┬┴──┬┴──┬┴──┬┴──┬┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬────┤ + * │20 │21 │22 │23 │24 │25 │26 │ │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 │43 │ 44 │47 │ 49 │17 │48 │ + * └───┴────┴────┴────┴────────┴───┴──────────┴───────┴────────┘ + */ +#define LAYOUT_1_b( \ + Q00, Q01, Q02, Q03, Q04, Q05, Q06, Q07, Q08, Q09, Q0A, Q0B, Q0C, Q0D, Q0E, \ + Q10, Q11, Q12, Q13, Q14, Q15, Q16, Q18, Q19, Q1A, Q1B, Q1C, Q1D, Q1E, \ + Q20, Q21, Q22, Q23, Q24, Q25, Q26, Q28, Q29, Q2A, Q2B, Q2C, Q2D, Q2E, \ + Q30, Q31, Q32, Q33, Q34, Q35, Q36, Q37, Q38, Q39, Q3A, Q3B, Q3C, Q3D, Q3E, \ + Q40, Q41, Q42, Q43, Q44, Q47, Q49, Q17, Q48 \ +) { \ + { Q00, Q01, Q02, Q03, Q04, Q05, Q06, Q07, Q08, Q09, Q0A, Q0B, Q0C, Q0D, Q0E }, \ + { Q10, Q11, Q12, Q13, Q14, Q15, Q16, Q17, Q18, Q19, Q1A, Q1B, Q1C, Q1D, Q1E }, \ + { Q20, Q21, Q22, Q23, Q24, Q25, Q26, XXX, Q28, Q29, Q2A, Q2B, Q2C, Q2D, Q2E }, \ + { Q30, Q31, Q32, Q33, Q34, Q35, Q36, Q37, Q38, Q39, Q3A, Q3B, Q3C, Q3D, Q3E }, \ + { Q40, Q41, Q42, Q43, Q44, XXX, XXX, Q47, Q48, Q49, XXX, XXX, XXX, XXX, XXX } \ +} + +/* LAYOUT_1_c + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐ + * │00 │01 │02 │03 │04 │05 │06 │07 │08 │09 │0A │0B │0C │0D │0E │ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┤ + * │10 │11 │12 │13 │14 │15 │16 │18 │19 │1A │1B │1C │1D │1E │ + * ├────┬┴──┬┴──┬┴──┬┴──┬┴──┬┴──┬┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬────┤ + * │20 │21 │22 │23 │24 │25 │26 │ │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 │43 │ 44 │47 │ 49 │45 │27 │48 │ + * └───┴────┴────┴────┴────────┴───┴───────┴─────┴────┴────────┘ + */ +#define LAYOUT_1_c( \ + Q00, Q01, Q02, Q03, Q04, Q05, Q06, Q07, Q08, Q09, Q0A, Q0B, Q0C, Q0D, Q0E, \ + Q10, Q11, Q12, Q13, Q14, Q15, Q16, Q18, Q19, Q1A, Q1B, Q1C, Q1D, Q1E, \ + Q20, Q21, Q22, Q23, Q24, Q25, Q26, Q28, Q29, Q2A, Q2B, Q2C, Q2D, Q2E, \ + Q30, Q31, Q32, Q33, Q34, Q35, Q36, Q37, Q38, Q39, Q3A, Q3B, Q3C, Q3D, Q3E, \ + Q40, Q41, Q42, Q43, Q44, Q47, Q49, Q45, Q27, Q48 \ +) { \ + { Q00, Q01, Q02, Q03, Q04, Q05, Q06, Q07, Q08, Q09, Q0A, Q0B, Q0C, Q0D, Q0E }, \ + { Q10, Q11, Q12, Q13, Q14, Q15, Q16, XXX, Q18, Q19, Q1A, Q1B, Q1C, Q1D, Q1E }, \ + { Q20, Q21, Q22, Q23, Q24, Q25, Q26, Q27, Q28, Q29, Q2A, Q2B, Q2C, Q2D, Q2E }, \ + { Q30, Q31, Q32, Q33, Q34, Q35, Q36, Q37, Q38, Q39, Q3A, Q3B, Q3C, Q3D, Q3E }, \ + { Q40, Q41, Q42, Q43, Q44, Q45, XXX, Q47, Q48, Q49, XXX, XXX, XXX, XXX, XXX } \ +} + + +/* LAYOUT_2_a + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐ + * │00 │01 │02 │03 │04 │05 │06 │07 │08 │09 │0A │0B │0C │0D │0E │ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┤ + * │10 │11 │12 │13 │14 │15 │16 │18 │19 │1A │1B │1C │1D │1E │ + * ├────┬┴──┬┴──┬┴──┬┴──┬┴──┬┴──┬┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬────┤ + * │20 │21 │22 │23 │24 │25 │26 │ │28 │29 │2A │2B │2C │2D │2E │ + * ├───┬┴──┬┴──┬┴──┬┴──┬┴──┬┴──┬┴─┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬───┤ + * │30 │31 │32 │33 │34 │35 │36 │37 │38 │39 │3A │3B │3C │3D │3E │ + * ├───┴─┬─┴──┬┴───┴┬──┴───┴───┼───┼───┴───┼───┼───┼───┼───┼───┤ + * │41 │42 │43 │ 44 │47 │ 49 │4A │4B │4C │4D │4E │ + * └─────┴────┴─────┴──────────┴───┴───────┴───┴───┴───┴───┴───┘ + */ +#define LAYOUT_2_a( \ + Q00, Q01, Q02, Q03, Q04, Q05, Q06, Q07, Q08, Q09, Q0A, Q0B, Q0C, Q0D, Q0E, \ + Q10, Q11, Q12, Q13, Q14, Q15, Q16, Q18, Q19, Q1A, Q1B, Q1C, Q1D, Q1E, \ + Q20, Q21, Q22, Q23, Q24, Q25, Q26, Q28, Q29, Q2A, Q2B, Q2C, Q2D, Q2E, \ + Q30, Q31, Q32, Q33, Q34, Q35, Q36, Q37, Q38, Q39, Q3A, Q3B, Q3C, Q3D, Q3E, \ + Q41, Q42, Q43, Q44, Q47, Q49, Q4A, Q4B, Q4C, Q4D, Q4E \ +) { \ + { Q00, Q01, Q02, Q03, Q04, Q05, Q06, Q07, Q08, Q09, Q0A, Q0B, Q0C, Q0D, Q0E }, \ + { Q10, Q11, Q12, Q13, Q14, Q15, Q16, XXX, Q18, Q19, Q1A, Q1B, Q1C, Q1D, Q1E }, \ + { Q20, Q21, Q22, Q23, Q24, Q25, Q26, XXX, Q28, Q29, Q2A, Q2B, Q2C, Q2D, Q2E }, \ + { Q30, Q31, Q32, Q33, Q34, Q35, Q36, Q37, Q38, Q39, Q3A, Q3B, Q3C, Q3D, Q3E }, \ + { XXX, Q41, Q42, Q43, Q44, XXX, XXX, Q47, XXX, Q49, Q4A, Q4B, Q4C, Q4D, Q4E } \ +} + + + +/* LAYOUT_2_b + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐ + * │00 │01 │02 │03 │04 │05 │06 │07 │08 │09 │0A │0B │0C │0D │0E │ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┤ + * │10 │11 │12 │13 │14 │15 │16 │18 │19 │1A │1B │1C │1D │1E │ + * ├────┬┴──┬┴──┬┴──┬┴──┬┴──┬┴──┬┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬────┤ + * │20 │21 │22 │23 │24 │25 │26 │ │28 │29 │2A │2B │2C │2D │2E │ + * ├───┬┴──┬┴──┬┴──┬┴──┬┴──┬┴──┬┴─┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬───┤ + * │30 │31 │32 │33 │34 │35 │36 │37 │38 │39 │3A │3B │3C │3D │3E │ + * ├───┴─┬─┴──┬┴───┴┬──┴───┴───┼───┼───┴───┴──┬┴───┴──┬┴───┴───┤ + * │41 │42 │43 │ 44 │47 │ 49 │17 │48 │ + * └─────┴────┴─────┴──────────┴───┴──────────┴───────┴────────┘ + */ +#define LAYOUT_2_b( \ + Q00, Q01, Q02, Q03, Q04, Q05, Q06, Q07, Q08, Q09, Q0A, Q0B, Q0C, Q0D, Q0E, \ + Q10, Q11, Q12, Q13, Q14, Q15, Q16, Q18, Q19, Q1A, Q1B, Q1C, Q1D, Q1E, \ + Q20, Q21, Q22, Q23, Q24, Q25, Q26, Q28, Q29, Q2A, Q2B, Q2C, Q2D, Q2E, \ + Q30, Q31, Q32, Q33, Q34, Q35, Q36, Q37, Q38, Q39, Q3A, Q3B, Q3C, Q3D, Q3E, \ + Q41, Q42, Q43, Q44, Q47, Q49, Q17, Q48 \ +) { \ + { Q00, Q01, Q02, Q03, Q04, Q05, Q06, Q07, Q08, Q09, Q0A, Q0B, Q0C, Q0D, Q0E }, \ + { Q10, Q11, Q12, Q13, Q14, Q15, Q16, Q17, Q18, Q19, Q1A, Q1B, Q1C, Q1D, Q1E }, \ + { Q20, Q21, Q22, Q23, Q24, Q25, Q26, XXX, Q28, Q29, Q2A, Q2B, Q2C, Q2D, Q2E }, \ + { Q30, Q31, Q32, Q33, Q34, Q35, Q36, Q37, Q38, Q39, Q3A, Q3B, Q3C, Q3D, Q3E }, \ + { XXX, Q41, Q42, Q43, Q44, XXX, XXX, Q47, Q48, Q49, XXX, XXX, XXX, XXX, XXX } \ +} + +/* LAYOUT_2_c + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐ + * │00 │01 │02 │03 │04 │05 │06 │07 │08 │09 │0A │0B │0C │0D │0E │ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┤ + * │10 │11 │12 │13 │14 │15 │16 │18 │19 │1A │1B │1C │1D │1E │ + * ├────┬┴──┬┴──┬┴──┬┴──┬┴──┬┴──┬┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬────┤ + * │20 │21 │22 │23 │24 │25 │26 │ │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 │43 │ 44 │47 │ 49 │45 │27 │48 │ + * └───┴────┴────┴────┴────────┴───┴───────┴─────┴────┴────────┘ + */ +#define LAYOUT_2_c( \ + Q00, Q01, Q02, Q03, Q04, Q05, Q06, Q07, Q08, Q09, Q0A, Q0B, Q0C, Q0D, Q0E, \ + Q10, Q11, Q12, Q13, Q14, Q15, Q16, Q18, Q19, Q1A, Q1B, Q1C, Q1D, Q1E, \ + Q20, Q21, Q22, Q23, Q24, Q25, Q26, Q28, Q29, Q2A, Q2B, Q2C, Q2D, Q2E, \ + Q30, Q31, Q32, Q33, Q34, Q35, Q36, Q37, Q38, Q39, Q3A, Q3B, Q3C, Q3D, Q3E, \ + Q41, Q42, Q43, Q44, Q47, Q49, Q45, Q27, Q48 \ +) { \ + { Q00, Q01, Q02, Q03, Q04, Q05, Q06, Q07, Q08, Q09, Q0A, Q0B, Q0C, Q0D, Q0E }, \ + { Q10, Q11, Q12, Q13, Q14, Q15, Q16, XXX, Q18, Q19, Q1A, Q1B, Q1C, Q1D, Q1E }, \ + { Q20, Q21, Q22, Q23, Q24, Q25, Q26, Q27, Q28, Q29, Q2A, Q2B, Q2C, Q2D, Q2E }, \ + { Q30, Q31, Q32, Q33, Q34, Q35, Q36, Q37, Q38, Q39, Q3A, Q3B, Q3C, Q3D, Q3E }, \ + { XXX, Q41, Q42, Q43, Q44, Q45, XXX, Q47, Q48, Q49, XXX, XXX, XXX, XXX, XXX } \ +} diff --git a/keyboards/rominronin/katana60/rev2/rules.mk b/keyboards/rominronin/katana60/rev2/rules.mk new file mode 100644 index 000000000000..000f55911ad3 --- /dev/null +++ b/keyboards/rominronin/katana60/rev2/rules.mk @@ -0,0 +1,22 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +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 = 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 +BLUETOOTH_ENABLE = no # Enable Bluetooth +AUDIO_ENABLE = no # Audio output From bdb1b10e9900c12d21926793b8e1006b2b414e14 Mon Sep 17 00:00:00 2001 From: Xyverz Date: Sat, 19 Sep 2020 12:59:45 -0700 Subject: [PATCH 815/930] Update Xyverz ortho_5x12 keymap (#10346) * Fixing my 5x12 Ortho layout Minor fixes. --- layouts/community/ortho_5x12/xyverz/keymap.c | 25 +++++++++++--------- 1 file changed, 14 insertions(+), 11 deletions(-) diff --git a/layouts/community/ortho_5x12/xyverz/keymap.c b/layouts/community/ortho_5x12/xyverz/keymap.c index 00fca1b48e49..22147c3a0ab8 100644 --- a/layouts/community/ortho_5x12/xyverz/keymap.c +++ b/layouts/community/ortho_5x12/xyverz/keymap.c @@ -8,6 +8,9 @@ enum custom_keycodes { QWERTY = SAFE_RANGE, COLEMAK, DVORAK, LOWER, RAISE, ADJUS #define GUIBSPC GUI_T(KC_BSPC) // GUI when held, BSPC when tapped. #define RGB_SWR RGB_M_SW // Swirl Animation alias #define RGB_SNK RGB_M_SN // Snake Animation alias +#define MACLOCK LGUI(LCTL(KC_Q)) // Lock my MacBook! +#define RAISE MO(_RAISE) +#define LOWER MO(_LOWER) // clang-format off const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { @@ -18,7 +21,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |------+------+------+------+------+------+------+------+------+------+------+------| * | Tab | Q | W | E | R | T | Y | U | I | O | P | Del | * |------+------+------+------+------+-------------+------+------+------+------+------| - * | - | A | S | D | F | G | H | J | K | L | ; | " | + * | ` | A | S | D | F | G | H | J | K | L | ; | " | * |------+------+------+------+------+------|------+------+------+------+------+------| * | Shift| Z | X | C | V | B | N | M | , | . | / | Shift| * |------+------+------+------+------+------+------+------+------+------+------+------| @@ -26,16 +29,16 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `-----------------------------------------------------------------------------------' */ [_QWERTY] = LAYOUT_ortho_5x12 ( \ - 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_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_GRV, 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_LEFT, KC_RGHT, LOWER, GUIBSPC, KC_SPC, RAISE, KC_UP, KC_DOWN, KC_RGUI, KC_ENT \ ), /* Colemak * ,-----------------------------------------------------------------------------------. - * | Esc | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | + * | Esc | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Grv | * |------+------+------+------+------+------+------+------+------+------+------+------| * | Tab | Q | W | F | P | G | J | L | U | Y | ; | Del | * |------+------+------+------+------+-------------+------+------+------+------+------| @@ -47,9 +50,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `-----------------------------------------------------------------------------------' */ [_COLEMAK] = LAYOUT_ortho_5x12 ( \ - 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_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_GRV, \ 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_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, KC_RSFT, \ KC_LCTL, KC_LALT, KC_LEFT, KC_RGHT, LOWER, GUIBSPC, KC_SPC, RAISE, KC_UP, KC_DOWN, KC_RGUI, KC_ENT \ ), @@ -60,7 +63,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |------+------+------+------+------+------+------+------+------+------+------+------| * | Tab | " | , | . | P | Y | F | G | C | R | L | / | * |------+------+------+------+------+-------------+------+------+------+------+------| - * | Esc | A | O | E | U | I | D | H | T | N | S | - | + * | ` | A | O | E | U | I | D | H | T | N | S | - | * |------+------+------+------+------+------|------+------+------+------+------+------| * | Shift| ; | Q | J | K | X | B | M | W | V | Z | Shift| * |------+------+------+------+------+------+------+------+------+------+------+------| @@ -68,9 +71,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `-----------------------------------------------------------------------------------' */ [_DVORAK] = LAYOUT_ortho_5x12 ( \ - KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, 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_BSLS, \ 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, \ + KC_GRV, 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, KC_RSFT, \ KC_LCTL, KC_LALT, KC_LEFT, KC_RGHT, LOWER, GUIBSPC, KC_SPC, RAISE, KC_UP, KC_DOWN, KC_RGUI, KC_ENT \ ), @@ -127,7 +130,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |------+------+------+------+------+------|------+------+------+------+------+------| * |RGB ON| MODE |RGB SW|RGB KN|RGB GR| HUE- | HUE+ | HUE- | SAT+ | SAT- | VAL+ | VAL- | * |------+------+------+------+------+------+------+------+------+------+------+------| - * | | | | | | | | | | | | + * | | | | | | | | | | |MACLCK| * `-----------------------------------------------------------------------------------' */ [_ADJUST] = LAYOUT_ortho_5x12 ( \ @@ -135,7 +138,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { _______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ _______, _______, RGB_M_P, RGB_M_B, RGB_M_R, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, _______, _______, \ RGB_TOG, RGB_MOD, RGB_SWR, RGB_M_K, RGB_M_G, RGB_HUI, RGB_HUD, RGB_HUI, RGB_SAD, RGB_SAI, RGB_VAD, RGB_VAI, \ - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, MACLOCK \ ) }; From 12fe78ee57aca9d8fb9e85c2ee4176284ce26817 Mon Sep 17 00:00:00 2001 From: jrdsgl Date: Sat, 19 Sep 2020 13:02:35 -0700 Subject: [PATCH 816/930] Align RoMac+ vendor and product info (#10349) * Update config.h adding vendor and product info so VIA will recognize it. * Update keyboards/kingly_keys/romac_plus/config.h thank you for this. commiting suggestion. Co-authored-by: Ryan Co-authored-by: Ryan --- keyboards/kingly_keys/romac_plus/config.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/keyboards/kingly_keys/romac_plus/config.h b/keyboards/kingly_keys/romac_plus/config.h index 503a463f5119..5ea8321de210 100644 --- a/keyboards/kingly_keys/romac_plus/config.h +++ b/keyboards/kingly_keys/romac_plus/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 +#define PRODUCT_ID 0x0002 #define DEVICE_VER 0x0001 #define MANUFACTURER TheRoyalSweatshirt #define PRODUCT RoMac+ From 08ef4b4a96e5b6b5bd857a6570fdddd9d6fcaac7 Mon Sep 17 00:00:00 2001 From: Patricio Gonzalez del Valle Date: Sat, 19 Sep 2020 20:00:45 -0300 Subject: [PATCH 817/930] [Keymap] Adds pagondel layout for dz65rgb v2 (#9914) * Adds pagondel layout for dz65rgb v2 * Adds license information * replaces define by enums * Update license year Co-authored-by: James Young <18669334+noroadsleft@users.noreply.github.com> Co-authored-by: James Young <18669334+noroadsleft@users.noreply.github.com> --- .../dztech/dz65rgb/keymaps/pagondel/keymap.c | 65 +++++++++++++++++++ .../dztech/dz65rgb/keymaps/pagondel/readme.md | 35 ++++++++++ 2 files changed, 100 insertions(+) create mode 100644 keyboards/dztech/dz65rgb/keymaps/pagondel/keymap.c create mode 100644 keyboards/dztech/dz65rgb/keymaps/pagondel/readme.md diff --git a/keyboards/dztech/dz65rgb/keymaps/pagondel/keymap.c b/keyboards/dztech/dz65rgb/keymaps/pagondel/keymap.c new file mode 100644 index 000000000000..277323987c8b --- /dev/null +++ b/keyboards/dztech/dz65rgb/keymaps/pagondel/keymap.c @@ -0,0 +1,65 @@ +/* Copyright 2020 pagondel + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public 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 { + _BL, + _FL, +}; + +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 | + * |-----------------------------------------------------------------------------| + * |FN | 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, + 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_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 + ), + /* Keymap _FL: Function Layer + * ,-----------------------------------------------------------------------------. + * |Esc | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 |F10 |F11 |F12 |DEL |PNTS| + * |-----------------------------------------------------------------------------| + * | |RgbT|RgbM|Hue+|Hue-|Sat+|Sat-|BR+ |BR- | | |SLCK|Paus|RST | | + * |-----------------------------------------------------------------------------| + * | |Eff+|Eff-| | | | | | | | | |EEP RST | | + * |-----------------------------------------------------------------------------| + * |Shift | | | | | |NK T|Mute|Vol-|Vol+| | |PgUp| | + * |-----------------------------------------------------------------------------| + * | | | | Play | | | |Home|PgDn|End | + * `-----------------------------------------------------------------------------' + */ + [_FL] = LAYOUT_65_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_PSCR, + _______, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, _______, _______, KC_SLCK, KC_PAUS, RESET, _______, + _______, RGB_SPI, RGB_SPD, _______, _______, _______, _______, _______, _______, _______, _______, _______, EEP_RST, _______, + KC_LSFT, _______, _______, _______, _______, _______, NK_TOGG, KC_MUTE, KC_VOLD, KC_VOLU, _______, _______, KC_PGUP, _______, + _______, _______, _______, KC_MPLY, _______, _______, _______, KC_HOME, KC_VOLD, KC_END + ) +}; diff --git a/keyboards/dztech/dz65rgb/keymaps/pagondel/readme.md b/keyboards/dztech/dz65rgb/keymaps/pagondel/readme.md new file mode 100644 index 000000000000..8f55ce428a6a --- /dev/null +++ b/keyboards/dztech/dz65rgb/keymaps/pagondel/readme.md @@ -0,0 +1,35 @@ +# pagondel's DZ65RGB v2 layout + +``` + Keymap 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 | + |-----------------------------------------------------------------------------| + |FN | 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 | + `-----------------------------------------------------------------------------' +``` + +``` + Keymap Function Layer + ,-----------------------------------------------------------------------------. + |Esc | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 |F10 |F11 |F12 |DEL |PNTS| + |-----------------------------------------------------------------------------| + | |RgbT|RgbM|Hue+|Hue-|Sat+|Sat-|BR+ |BR- | | |SLCK|Paus|RST | | + |-----------------------------------------------------------------------------| + | |Eff+|Eff-| | | | | | | | | |EEP RST | | + |-----------------------------------------------------------------------------| + |Shift | | | | | |NK T|Mute|Vol-|Vol+| | |PgUp| | + |-----------------------------------------------------------------------------| + | | | | Play | | | |Home|PgDn|End | + `-----------------------------------------------------------------------------' +``` + +### Build layout + +```qmk compile -kb dztech/dz65rgb/v2 -km pagondel``` From 6eab8a0b619b55ca612d9cf048d365b1ba442328 Mon Sep 17 00:00:00 2001 From: Joakim Tufvegren Date: Sun, 20 Sep 2020 01:25:20 +0200 Subject: [PATCH 818/930] [Keyboard] Make WPM sync between halves on Ergodox Infinity (#9526) * Make WPM able to sync between keyboard halves on Ergodox Infinity. * Fix mixed indentation in ergodox_infinity.c. --- keyboards/ergodox_infinity/ergodox_infinity.c | 85 +++++++++++++------ 1 file changed, 57 insertions(+), 28 deletions(-) diff --git a/keyboards/ergodox_infinity/ergodox_infinity.c b/keyboards/ergodox_infinity/ergodox_infinity.c index 9fda7991f13f..c69c1eb36f4f 100644 --- a/keyboards/ergodox_infinity/ergodox_infinity.c +++ b/keyboards/ergodox_infinity/ergodox_infinity.c @@ -6,6 +6,17 @@ #include "lcd_backlight.h" #endif +#ifdef WPM_ENABLE +# include "serial_link/protocol/transport.h" +# include "wpm.h" + +MASTER_TO_ALL_SLAVES_OBJECT(current_wpm, uint8_t); +static remote_object_t* remote_objects[] = { + REMOTE_OBJECT(current_wpm), +}; +static uint8_t last_sent_wpm = 0; +#endif + void init_serial_link_hal(void) { PORTA->PCR[1] = PORTx_PCRn_PE | PORTx_PCRn_PS | PORTx_PCRn_PFE | PORTx_PCRn_MUX(2); PORTA->PCR[2] = PORTx_PCRn_DSE | PORTx_PCRn_SRE | PORTx_PCRn_MUX(2); @@ -39,30 +50,30 @@ void init_serial_link_hal(void) { // Which will reduce the brightness range #define PRESCALAR_DEFINE 0 void lcd_backlight_hal_init(void) { - // Setup Backlight + // Setup Backlight SIM->SCGC6 |= SIM_SCGC6_FTM0; FTM0->CNT = 0; // Reset counter - // PWM Period - // 16-bit maximum - FTM0->MOD = 0xFFFF; + // PWM Period + // 16-bit maximum + FTM0->MOD = 0xFFFF; - // Set FTM to PWM output - Edge Aligned, Low-true pulses + // Set FTM to PWM output - Edge Aligned, Low-true pulses #define CNSC_MODE FTM_SC_CPWMS | FTM_SC_PS(4) | FTM_SC_CLKS(0) - CHANNEL_RED.CnSC = CNSC_MODE; - CHANNEL_GREEN.CnSC = CNSC_MODE; - CHANNEL_BLUE.CnSC = CNSC_MODE; + CHANNEL_RED.CnSC = CNSC_MODE; + CHANNEL_GREEN.CnSC = CNSC_MODE; + CHANNEL_BLUE.CnSC = CNSC_MODE; - // System clock, /w prescalar setting - FTM0->SC = FTM_SC_CLKS(1) | FTM_SC_PS(PRESCALAR_DEFINE); + // System clock, /w prescalar setting + FTM0->SC = FTM_SC_CLKS(1) | FTM_SC_PS(PRESCALAR_DEFINE); - CHANNEL_RED.CnV = 0; - CHANNEL_GREEN.CnV = 0; - CHANNEL_BLUE.CnV = 0; + CHANNEL_RED.CnV = 0; + CHANNEL_GREEN.CnV = 0; + CHANNEL_BLUE.CnV = 0; - RGB_PORT_GPIO->PDDR |= (1 << RED_PIN); - RGB_PORT_GPIO->PDDR |= (1 << GREEN_PIN); - RGB_PORT_GPIO->PDDR |= (1 << BLUE_PIN); + RGB_PORT_GPIO->PDDR |= (1 << RED_PIN); + RGB_PORT_GPIO->PDDR |= (1 << GREEN_PIN); + RGB_PORT_GPIO->PDDR |= (1 << BLUE_PIN); #define RGB_MODE PORTx_PCRn_SRE | PORTx_PCRn_DSE | PORTx_PCRn_MUX(4) RGB_PORT->PCR[RED_PIN] = RGB_MODE; @@ -94,9 +105,9 @@ static uint16_t cie_lightness(uint16_t v) { } void lcd_backlight_hal_color(uint16_t r, uint16_t g, uint16_t b) { - CHANNEL_RED.CnV = cie_lightness(r); - CHANNEL_GREEN.CnV = cie_lightness(g); - CHANNEL_BLUE.CnV = cie_lightness(b); + CHANNEL_RED.CnV = cie_lightness(r); + CHANNEL_GREEN.CnV = cie_lightness(g); + CHANNEL_BLUE.CnV = cie_lightness(b); } __attribute__ ((weak)) @@ -109,21 +120,39 @@ void matrix_scan_user(void) { void matrix_init_kb(void) { - // put your keyboard start-up code here - // runs once when the firmware starts up + // put your keyboard start-up code here + // runs once when the firmware starts up - matrix_init_user(); - // The backlight always has to be initialized, otherwise it will stay lit + matrix_init_user(); + // The backlight always has to be initialized, otherwise it will stay lit #ifndef VISUALIZER_ENABLE - lcd_backlight_hal_init(); + lcd_backlight_hal_init(); +#endif +#ifdef WPM_ENABLE + add_remote_objects(remote_objects, sizeof(remote_objects) / sizeof(remote_object_t*)); #endif } void matrix_scan_kb(void) { - // put your looping keyboard code here - // runs every cycle (a lot) - - matrix_scan_user(); + // put your looping keyboard code here + // runs every cycle (a lot) + +#ifdef WPM_ENABLE + if (is_serial_link_master()) { + uint8_t current_wpm = get_current_wpm(); + if (current_wpm != last_sent_wpm) { + *begin_write_current_wpm() = current_wpm; + end_write_current_wpm(); + last_sent_wpm = current_wpm; + } + } else if (is_serial_link_connected()) { + uint8_t* new_wpm = read_current_wpm(); + if (new_wpm) { + set_current_wpm(*new_wpm); + } + } +#endif + matrix_scan_user(); } bool is_keyboard_master(void) { From 3abb60934886289725a18c7ea96b246e70f7af3a Mon Sep 17 00:00:00 2001 From: Stephen Huan Date: Sat, 19 Sep 2020 20:30:46 -0400 Subject: [PATCH 819/930] Add stephen-huan keymap and fix LED problem in the default Plaid keymap (#9306) * change layers, add pinmode to fix LEDs * fix LEDs by setting the pin mode * edit README * edit GPIO documentation, edit keymap * add markov chain * simplify LED logic * undo documentation changes * keymap changes, fix LED enum logic --- .../dm9records/plaid/keymaps/default/keymap.c | 4 + .../plaid/keymaps/stephen-huan/config.h | 19 + .../plaid/keymaps/stephen-huan/keymap.c | 356 ++++++++++++++++++ .../plaid/keymaps/stephen-huan/readme.md | 1 + 4 files changed, 380 insertions(+) create mode 100644 keyboards/dm9records/plaid/keymaps/stephen-huan/config.h create mode 100644 keyboards/dm9records/plaid/keymaps/stephen-huan/keymap.c create mode 100644 keyboards/dm9records/plaid/keymaps/stephen-huan/readme.md diff --git a/keyboards/dm9records/plaid/keymaps/default/keymap.c b/keyboards/dm9records/plaid/keymaps/default/keymap.c index 6a858a4a7302..c5075b0e0c47 100644 --- a/keyboards/dm9records/plaid/keymaps/default/keymap.c +++ b/keyboards/dm9records/plaid/keymaps/default/keymap.c @@ -214,6 +214,10 @@ led_config_t led_config; //Set leds to saved state during powerup void keyboard_post_init_user(void) { + // set LED pin modes + setPinOutput(LED_RED); + setPinOutput(LED_GREEN); + // Call the post init code. led_config.raw = eeconfig_read_user(); diff --git a/keyboards/dm9records/plaid/keymaps/stephen-huan/config.h b/keyboards/dm9records/plaid/keymaps/stephen-huan/config.h new file mode 100644 index 000000000000..5733b9e4b046 --- /dev/null +++ b/keyboards/dm9records/plaid/keymaps/stephen-huan/config.h @@ -0,0 +1,19 @@ +/* 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 + +// place overrides here diff --git a/keyboards/dm9records/plaid/keymaps/stephen-huan/keymap.c b/keyboards/dm9records/plaid/keymaps/stephen-huan/keymap.c new file mode 100644 index 000000000000..c8d48c395512 --- /dev/null +++ b/keyboards/dm9records/plaid/keymaps/stephen-huan/keymap.c @@ -0,0 +1,356 @@ +/* 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 + + +enum plaid_layers { + _QWERTY, + _LOWER, + _RAISE, + _ADJUST +}; + +enum plaid_keycodes { + QWERTY = SAFE_RANGE, + LED_1, + LED_2, + LED_3, + LED_4, + LED_5, + LED_6, + LED_7, + LED_8, + LED_9, + LED_0 +}; + +#define LOWER MO(_LOWER) +#define RAISE MO(_RAISE) + +// array of keys considered modifiers for led purposes +const uint16_t modifiers[] = { + KC_LCTL, + KC_RCTL, + KC_LALT, + KC_RALT, + KC_LSFT, + KC_RSFT, + KC_LGUI, + KC_RGUI, + LOWER, + RAISE +}; + +//Setup consts for LED modes +#define LEDMODE_ON 1 //always on +#define LEDMODE_OFF 0 //always off +#define LEDMODE_MODS 2 //On with modifiers +#define LEDMODE_BLINKIN 3 //blinkinlights - % chance toggle on keypress +#define LEDMODE_KEY 4 //On with any keypress, off with key release +#define LEDMODE_ENTER 5 // On with enter key + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +/* Qwerty + * ,-----------------------------------------------------------------------------------. + * | Tab | Q | W | E | R | T | Y | U | I | O | P | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * |Esc/hy| A | S | D | F | G | H | J | K | L | ; | " | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | Shift| Z | X | C | V | B | N | M | , | . | / |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Ctrl | fn | Alt | GUI |Lower | Space |Raise | GUI | Alt |Shift | Ctrl | + * `-----------------------------------------------------------------------------------' + * (karabiner remaps Caps lock -> fn) + */ +[_QWERTY] = LAYOUT_plaid_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, + HYPR_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_RSFT , 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_CAPS, KC_RALT, KC_RGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_RGUI, KC_RALT, KC_RSFT, KC_RCTL +), + +/* Lower + * ,-----------------------------------------------------------------------------------. + * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | F1 | F2 | F3 | F4 | F5 | F6 | - | = | [ | ] | \ | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | F7 | F8 | F9 | F10 | F11 | F12 | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | Prev | Vol- | Play | + * `-----------------------------------------------------------------------------------' + * volume up key repeats randomly on mac, have to use mac specific volume + */ +[_LOWER] = LAYOUT_plaid_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_MPRV, KC__VOLDOWN, KC_MPLY +), + +/* Raise + * ,-----------------------------------------------------------------------------------. + * | ~ | | | End | | | |Pg Up | | | | Del | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | Home | |Pg Dn | | | Left | Down | Up |Right | | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | | | Copy |Paste | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | Next | Vol+ | Mute | + * `-----------------------------------------------------------------------------------' + */ +[_RAISE] = LAYOUT_plaid_grid( + KC_TILD, _______, _______, KC_END, _______, _______, _______, KC_PGUP, _______, _______, _______ , KC_DEL , + _______, KC_HOME, _______, KC_PGDN, _______, _______, KC_LEFT, KC_DOWN, KC_UP , KC_RGHT, _______ , _______, + _______, _______, _______, KC_COPY, KC_PSTE, KC_PGDN, _______, _______, _______, _______, _______ , _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC__VOLUP, KC_MUTE +), + +/* Adjust (Lower + Raise) + * ,-----------------------------------------------------------------------------------. + * |Reset | Red |Green | Rmod | Gmod |Rblink|Gblink| Rkey | Gkey | Rcar | Gcar | | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | |Power |Sleep |Wake |Eject | | | | | | | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | | | | | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | + * `-----------------------------------------------------------------------------------' + */ +[_ADJUST] = LAYOUT_plaid_grid( + RESET , LED_1 , LED_2 , LED_3 , LED_4 , LED_5 ,LED_6 , LED_7 , LED_8 , LED_9 , LED_0 , _______ , + _______, KC_PWR , KC_SLEP, KC_WAKE, KC_EJCT, _______, _______, _______, _______, _______, _______, _______ , + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ , + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ +) + + +}; + +//Setup config struct for LED +typedef union { + uint32_t raw; + struct { + uint8_t red_mode :8; + uint8_t green_mode :8; + }; +} led_config_t; +led_config_t led_config; + +//Set leds to saved state during powerup +void keyboard_post_init_user(void) { + // set LED pin modes + setPinOutput(LED_RED); + setPinOutput(LED_GREEN); + + // Call the post init code. + led_config.raw = eeconfig_read_user(); + + if(led_config.red_mode == LEDMODE_ON) { + writePinHigh(LED_RED); + } + + if(led_config.green_mode == LEDMODE_ON) { + writePinHigh(LED_GREEN); + } +} + +void eeconfig_init_user(void) { // EEPROM is getting reset! + led_config.raw = 0; + led_config.red_mode = LEDMODE_ON; + led_config.green_mode = LEDMODE_MODS; + eeconfig_update_user(led_config.raw); +} + +layer_state_t layer_state_set_user(layer_state_t state) { + return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST); +} + +void led_keypress_update(uint8_t led, uint8_t led_mode, uint16_t keycode, keyrecord_t *record) { + switch (led_mode) { + case LEDMODE_MODS: + for (int i=0;ievent.pressed) { + writePinHigh(led); + } + else { + writePinLow(led); + } + } + } + break; + case LEDMODE_BLINKIN: + if (record->event.pressed) { + + /* Markov Chain + * + * 1 - x 1 - y + * /---\ /---\ + * v | v | + * /------\ x /------\ + * | |------>| | + * | on | y | off | + * | |<------| | + * \------/ \------/ + */ + + /* Non-homogeneous Markov Chain + * + * /-----\ 1 - x0 /-----\ 1 - x1 /-----\ + * |on 0|------->|on 1|------->|on 2|----> ... + * \-----/\ /\-----/\ /\-----/\ + * \ / \ / . + * x0\ / x1\ / . + * \/ \/ . + * /\ /\ + * y0/ \ y1/ \ . + * / \ / \ . + * / \ / \ . + * /-----\ 1 - y0 /-----\ 1 - y1 /-----\/ + * |off 0|------->|off 1|------->|off 2|----> ... + * \-----/ \-----/ \-----/ + * + * + * if x = 1/4 and y 1/4, behavior is equivalent to the original code + * and converges to a steady state at the rate of 1/2^k + * where k is the number of key presses + * (the distance from a given vector to the steady state, [1/2, 1/2], + * is cut in half every key press) + * + * if x = y, then it is guaranteed that the steady state is still + * [1/2, 1/2], but the rate at which it converges is variable + * + * if x != y, then there is no well-defined steady state + */ + + double x = (1.0*rand())/RAND_MAX; + double y = x; + + double p = (readPin(led)) ? x : y; + if (rand() < p*RAND_MAX) { + togglePin(led); + } + + /* following code is restriced to x + y <= 1 + * if(rand() % 2 == 1) { */ + /* if(rand() % 2 == 0) { */ + /* writePinLow(led); */ + /* } */ + /* else { */ + /* writePinHigh(led); */ + /* } */ + /* } */ + } + break; + case LEDMODE_KEY: + if (record->event.pressed) { + writePinHigh(led); + return; + } + else { + writePinLow(led); + return; + } + break; + case LEDMODE_ENTER: + if (keycode==KC_ENT) { + writePinHigh(led); + } + else { + writePinLow(led); + } + break; + + } +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + /* If the either led mode is keypressed based, call the led updater + then let it fall through the keypress handlers. Just to keep + the logic out of this procedure */ + if (led_config.red_mode >= LEDMODE_MODS && led_config.red_mode <= LEDMODE_ENTER) { + led_keypress_update(LED_RED, led_config.red_mode, keycode, record); + } + if (led_config.green_mode >= LEDMODE_MODS && led_config.green_mode <= LEDMODE_ENTER) { + led_keypress_update(LED_GREEN, led_config.green_mode, keycode, 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 LED_1: + if (record->event.pressed) { + if (led_config.red_mode==LEDMODE_ON) { + led_config.red_mode=LEDMODE_OFF; + writePinLow(LED_RED); + } + else { + led_config.red_mode=LEDMODE_ON; + writePinHigh(LED_RED); + } + } + break; + case LED_2: + if (record->event.pressed) { + if (led_config.green_mode==LEDMODE_ON) { + led_config.green_mode=LEDMODE_OFF; + writePinLow(LED_GREEN); + } + else { + led_config.green_mode=LEDMODE_ON; + writePinHigh(LED_GREEN); + } + } + break; + case LED_3: + led_config.red_mode=LEDMODE_MODS; + break; + case LED_4: + led_config.green_mode=LEDMODE_MODS; + break; + case LED_5: + led_config.red_mode=LEDMODE_BLINKIN; + break; + case LED_6: + led_config.green_mode=LEDMODE_BLINKIN; + break; + case LED_7: + led_config.red_mode=LEDMODE_KEY; + break; + case LED_8: + led_config.green_mode=LEDMODE_KEY; + break; + case LED_9: + led_config.red_mode=LEDMODE_ENTER; + break; + case LED_0: + led_config.green_mode=LEDMODE_ENTER; + break; + } + + if (keycode >= LED_1 && keycode <= LED_0) { + eeconfig_update_user(led_config.raw); + } + + return true; +} diff --git a/keyboards/dm9records/plaid/keymaps/stephen-huan/readme.md b/keyboards/dm9records/plaid/keymaps/stephen-huan/readme.md new file mode 100644 index 000000000000..e52d24c3dfd6 --- /dev/null +++ b/keyboards/dm9records/plaid/keymaps/stephen-huan/readme.md @@ -0,0 +1 @@ +# stephen-huan's keymap for Plaid From 741856dd57735dcd143987eb954ecc4a5ca2fc96 Mon Sep 17 00:00:00 2001 From: pabile <1162412+pabile@users.noreply.github.com> Date: Sun, 20 Sep 2020 08:42:56 +0800 Subject: [PATCH 820/930] [Keyboard] add P40 Ortho, P42, and P20 ver2 by pabile (#9980) * Add files via upload * removed * Add files via upload * Rename pabile40.c to p40.c * Rename pabile40.h to p40.h * Add files via upload * Update p40.c * Update p40.h * Update README.md * Update README.md * Update README.md * Update README.md * Updated readme file * Updated readme file * Add files via upload * modified: keyboards/pabile/p18/config.h modified: keyboards/pabile/p18/keymaps/default/keymap.c modified: keyboards/pabile/p18/p18.h modified: keyboards/pabile/p18/rules.mk modified: keyboards/pabile/p40/config.h modified: keyboards/pabile/p40/keymaps/default/keymap.c * config update * Delete README.md.save * Delete keymap.c.save * Delete keymaps.c * modified: keyboards/pabile/p18/keymaps/default/keymap.c * Update p18.h * testing layout config * Create info.json * Create info.json * Create readme.md * Update readme.md * Updated description * Updated description * Update config.h updated vendor ID to 0000 * Update keymap.c removed unnecessary comments * Update keyboards/pabile/p18/p18.h Co-Authored-By: ridingqwerty * Update keyboards/pabile/p18/p18.h Co-Authored-By: ridingqwerty * Update p18.h removed unnecessary comments * Update keyboards/pabile/p18/rules.mk Co-Authored-By: ridingqwerty * Update keyboards/pabile/p18/rules.mk Co-Authored-By: ridingqwerty * Update config.h updated vendor id and removed unnecessary comments * Update keyboards/pabile/p40/info.json Co-Authored-By: ridingqwerty * Update keyboards/pabile/p40/keymaps/default/keymap.c Co-Authored-By: ridingqwerty * Update keyboards/pabile/p40/p40.h Co-Authored-By: ridingqwerty * Update keyboards/pabile/p40/p40.h Co-Authored-By: ridingqwerty * Update keyboards/pabile/p40/p40.h Co-Authored-By: ridingqwerty * Update keyboards/pabile/p40/rules.mk Co-Authored-By: ridingqwerty * Update keyboards/pabile/p40/rules.mk Co-Authored-By: ridingqwerty * Added p20 macropad * Update README.md * Updated VID and PID * Updated VID and PID * Update rules.mk * Update config.h * Update config.h * Update config.h * Update keymap.c * Replaced blank keys with KC_NO * Update keyboards/pabile/p18/keymaps/default/keymap.c Co-Authored-By: Drashna Jaelre * Update keyboards/pabile/p18/p18.h Co-Authored-By: Drashna Jaelre * Update keyboards/pabile/p18/rules.mk Co-Authored-By: Drashna Jaelre * Update keyboards/pabile/p20/keymaps/default/keymap.c Co-Authored-By: Drashna Jaelre * Update keymap.c * Update keymap.c * Update keyboards/pabile/p20/rules.mk Co-Authored-By: Drashna Jaelre * Update keyboards/pabile/p40/info.json Co-Authored-By: Drashna Jaelre * Update keyboards/pabile/p20/p20.h Co-Authored-By: Drashna Jaelre * Updated product ID * Updated product ID * Update keyboards/pabile/p20/config.h Co-authored-by: James Young <18669334+noroadsleft@users.noreply.github.com> * Update keyboards/pabile/p20/p20.h Co-authored-by: James Young <18669334+noroadsleft@users.noreply.github.com> * Update keyboards/pabile/p20/p20.h Co-authored-by: James Young <18669334+noroadsleft@users.noreply.github.com> * Update keyboards/pabile/p20/keymaps/default/keymap.c Co-authored-by: James Young <18669334+noroadsleft@users.noreply.github.com> * Update keyboards/pabile/p18/readme.md Co-authored-by: James Young <18669334+noroadsleft@users.noreply.github.com> * Update keyboards/pabile/p20/README.md Co-authored-by: James Young <18669334+noroadsleft@users.noreply.github.com> * Update keyboards/pabile/p20/rules.mk Co-authored-by: James Young <18669334+noroadsleft@users.noreply.github.com> * Update keyboards/pabile/p20/rules.mk Co-authored-by: James Young <18669334+noroadsleft@users.noreply.github.com> * Update keyboards/pabile/p20/rules.mk Co-authored-by: James Young <18669334+noroadsleft@users.noreply.github.com> * Update keyboards/pabile/p20/rules.mk Co-authored-by: James Young <18669334+noroadsleft@users.noreply.github.com> * Update keyboards/pabile/p40/README.md Co-authored-by: James Young <18669334+noroadsleft@users.noreply.github.com> * Update keyboards/pabile/p40/rules.mk Co-authored-by: James Young <18669334+noroadsleft@users.noreply.github.com> * Update keyboards/pabile/p40/rules.mk Co-authored-by: James Young <18669334+noroadsleft@users.noreply.github.com> * Update keyboards/pabile/p18/rules.mk Co-authored-by: James Young <18669334+noroadsleft@users.noreply.github.com> * Update keyboards/pabile/p18/rules.mk Co-authored-by: James Young <18669334+noroadsleft@users.noreply.github.com> * Update keyboards/pabile/p40/config.h Co-authored-by: James Young <18669334+noroadsleft@users.noreply.github.com> * Update keyboards/pabile/p40/config.h Co-authored-by: James Young <18669334+noroadsleft@users.noreply.github.com> * Update keyboards/pabile/p18/readme.md Co-authored-by: James Young <18669334+noroadsleft@users.noreply.github.com> * Changed to lowercase filename * Rename README.md to readme.md * Update keyboards/pabile/p18/rules.mk Co-authored-by: James Young <18669334+noroadsleft@users.noreply.github.com> * Add files via upload * typo * New keyboard * Updated image link * Updated default ortho keymap * Update keymap.c * Update readme.md * Update keymap.c * Update keymap.c * default firmware * Delete pabile_p40_ortho.hex * Update keymap.c added KC_SPC to make keymap compatible with both grid and MIT. keymap is designed for MIT. * Update keymap.c * Update info.json added MIT layout * Update p40.h added MIT layout option * Added support for version 2 PCB New/corrected pin locations. (Backlight) LED pin now on B6. Up to 3 rotary encoder support. * Update readme.md update for PCB v2 * Update readme.md updated link * Update readme.md * Update readme.md * Update readme.md * Update config.h removed backlight pins * Update keymap.c added encoder. simplified layout. * Update keymap.c * Update p42.h * Update keymap.c simplified * Update keymap.c * Update readme.md replaced photo * Added new keyboard Initially placed under p40. separated as a new keyboard following an advise from gh. * start rename * removed old folder * reverted to last merge * revert to last merge * Update p40.h reverted to last merge * Update keymap.c * Update keymap.c removed encoder support * Update config.h removed encoder support * Update config.h removed encoder support * Update keymap.c removed encoder support * Update readme.md removed encoder support * Update info.json * Update keymap.c * Update keymap.c * Update keyboards/pabile/p20/rules.mk added numpad option Co-authored-by: Drashna Jaelre * added numpad option * Update keyboards/pabile/p40/keymaps/ortho/config.h Co-authored-by: Drashna Jaelre * Update keyboards/pabile/p18/config.h Co-authored-by: Drashna Jaelre * Update keyboards/pabile/p20/config.h Co-authored-by: Drashna Jaelre * moved to p40_ortho keyboard rather than a keymap * moved to p40_ortho keyboard rather than a keymap * moved to p40_ortho keyboard rather than a keymap * Update config.h Added copyright details. * Update keyboards/pabile/p20/p20.h Co-authored-by: Drashna Jaelre * Update keyboards/pabile/p20/p20.h Co-authored-by: James Young <18669334+noroadsleft@users.noreply.github.com> * Update keymap.c alignment * Update keyboards/pabile/p42/rules.mk Co-authored-by: James Young <18669334+noroadsleft@users.noreply.github.com> * Update keyboards/pabile/p42/rules.mk Co-authored-by: James Young <18669334+noroadsleft@users.noreply.github.com> * Update keyboards/pabile/p40_ortho/config.h Co-authored-by: James Young <18669334+noroadsleft@users.noreply.github.com> * Update keyboards/pabile/p40_ortho/info.json Co-authored-by: James Young <18669334+noroadsleft@users.noreply.github.com> * Update keyboards/pabile/p40_ortho/keymaps/default/keymap.c Co-authored-by: James Young <18669334+noroadsleft@users.noreply.github.com> * Update keyboards/pabile/p42/p42.h Co-authored-by: James Young <18669334+noroadsleft@users.noreply.github.com> * Update keyboards/pabile/p40_ortho/keymaps/default/keymap.c Co-authored-by: James Young <18669334+noroadsleft@users.noreply.github.com> * Update keyboards/pabile/p40_ortho/keymaps/default/keymap.c Co-authored-by: James Young <18669334+noroadsleft@users.noreply.github.com> * Update keyboards/pabile/p42/keymaps/default/keymap.c Co-authored-by: James Young <18669334+noroadsleft@users.noreply.github.com> * Update keyboards/pabile/p40_ortho/keymaps/default/keymap.c Co-authored-by: James Young <18669334+noroadsleft@users.noreply.github.com> * Update keyboards/pabile/p40_ortho/keymaps/default/keymap.c Co-authored-by: James Young <18669334+noroadsleft@users.noreply.github.com> * Update keyboards/pabile/p40_ortho/p40_ortho.h Co-authored-by: James Young <18669334+noroadsleft@users.noreply.github.com> * Update keyboards/pabile/p40_ortho/p40_ortho.h Co-authored-by: James Young <18669334+noroadsleft@users.noreply.github.com> * Update keyboards/pabile/p42/keymaps/default/keymap.c Co-authored-by: James Young <18669334+noroadsleft@users.noreply.github.com> * Update keyboards/pabile/p42/keymaps/default/keymap.c Co-authored-by: James Young <18669334+noroadsleft@users.noreply.github.com> * Update keyboards/pabile/p42/keymaps/default/keymap.c Co-authored-by: James Young <18669334+noroadsleft@users.noreply.github.com> * Update keyboards/pabile/p42/keymaps/default/keymap.c Co-authored-by: James Young <18669334+noroadsleft@users.noreply.github.com> * Update keyboards/pabile/p42/info.json Co-authored-by: James Young <18669334+noroadsleft@users.noreply.github.com> * Update keyboards/pabile/p42/config.h Co-authored-by: James Young <18669334+noroadsleft@users.noreply.github.com> * Update keyboards/pabile/p40_ortho/rules.mk Co-authored-by: James Young <18669334+noroadsleft@users.noreply.github.com> * Update keyboards/pabile/p40_ortho/rules.mk Co-authored-by: James Young <18669334+noroadsleft@users.noreply.github.com> * Update keyboards/pabile/p40_ortho/rules.mk Co-authored-by: James Young <18669334+noroadsleft@users.noreply.github.com> * Update keyboards/pabile/p20/keymaps/ver2/config.h Co-authored-by: Drashna Jaelre * Update config.h Added copyright statement * Update config.h Added copyright statement * Update config.h Added license header * Update keymap.c Added license header * Update p20.h Added license header * Update p40_ortho.c Added license header * Update p40_ortho.h Added license header * Update keymap.c Added license header * Update keyboards/pabile/p42/rules.mk Co-authored-by: James Young <18669334+noroadsleft@users.noreply.github.com> * Update keymap.c Updated LAYOUT to LAYOUT_default in response to Run failed: PR Lint keyboards - master (0f278a2) * Update p42.h Updated LAYOUT to LAYOUT_default in response to Run failed: PR Lint keyboards - master (0f278a2) * Update p42.h Added license header * Update keyboards/pabile/p42/p42.h Co-authored-by: James Young <18669334+noroadsleft@users.noreply.github.com> * Update keyboards/pabile/p42/keymaps/default/keymap.c Co-authored-by: James Young <18669334+noroadsleft@users.noreply.github.com> * Update keyboards/pabile/p42/keymaps/default/keymap.c Co-authored-by: James Young <18669334+noroadsleft@users.noreply.github.com> * Update keyboards/pabile/p42/keymaps/default/keymap.c Co-authored-by: James Young <18669334+noroadsleft@users.noreply.github.com> * Update keyboards/pabile/p42/keymaps/default/keymap.c Co-authored-by: James Young <18669334+noroadsleft@users.noreply.github.com> * Update keyboards/pabile/p42/keymaps/default/keymap.c Co-authored-by: James Young <18669334+noroadsleft@users.noreply.github.com> * add pabile/p20/ver2 * add missing license header * Update keyboards/pabile/p20/ver2/keymaps/default/keymap.c Co-authored-by: Drashna Jaelre * Update keyboards/pabile/p20/ver1/ver1.c Co-authored-by: James Young <18669334+noroadsleft@users.noreply.github.com> Co-authored-by: root Co-authored-by: ridingqwerty Co-authored-by: Drashna Jaelre Co-authored-by: James Young <18669334+noroadsleft@users.noreply.github.com> --- keyboards/pabile/p18/config.h | 18 +++++ keyboards/pabile/p20/config.h | 26 ------ keyboards/pabile/p20/p20.c | 1 - keyboards/pabile/p20/p20.h | 18 ----- keyboards/pabile/p20/readme.md | 10 +-- keyboards/pabile/p20/ver1/config.h | 42 ++++++++++ .../p20/{ => ver1}/keymaps/default/keymap.c | 0 keyboards/pabile/p20/{ => ver1}/rules.mk | 17 +--- keyboards/pabile/p20/ver1/ver1.c | 18 +++++ keyboards/pabile/p20/ver1/ver1.h | 50 ++++++++++++ keyboards/pabile/p20/ver2/config.h | 39 +++++++++ .../pabile/p20/ver2/keymaps/default/keymap.c | 43 ++++++++++ keyboards/pabile/p20/ver2/rules.mk | 28 +++++++ keyboards/pabile/p20/ver2/ver2.c | 18 +++++ keyboards/pabile/p20/ver2/ver2.h | 50 ++++++++++++ keyboards/pabile/p40/config.h | 17 ++++ keyboards/pabile/p40/info.json | 80 +++++++++---------- keyboards/pabile/p40/readme.md | 3 +- keyboards/pabile/p40_ortho/config.h | 40 ++++++++++ keyboards/pabile/p40_ortho/info.json | 52 ++++++++++++ .../pabile/p40_ortho/keymaps/default/keymap.c | 46 +++++++++++ keyboards/pabile/p40_ortho/p40_ortho.c | 18 +++++ keyboards/pabile/p40_ortho/p40_ortho.h | 45 +++++++++++ keyboards/pabile/p40_ortho/readme.md | 15 ++++ keyboards/pabile/p40_ortho/rules.mk | 24 ++++++ keyboards/pabile/p42/config.h | 45 +++++++++++ keyboards/pabile/p42/info.json | 13 +++ keyboards/pabile/p42/keymaps/default/keymap.c | 29 +++++++ keyboards/pabile/p42/p42.c | 1 + keyboards/pabile/p42/p42.h | 33 ++++++++ keyboards/pabile/p42/readme.md | 15 ++++ keyboards/pabile/p42/rules.mk | 24 ++++++ 32 files changed, 774 insertions(+), 104 deletions(-) delete mode 100644 keyboards/pabile/p20/config.h delete mode 100644 keyboards/pabile/p20/p20.c delete mode 100644 keyboards/pabile/p20/p20.h create mode 100644 keyboards/pabile/p20/ver1/config.h rename keyboards/pabile/p20/{ => ver1}/keymaps/default/keymap.c (100%) rename keyboards/pabile/p20/{ => ver1}/rules.mk (64%) create mode 100644 keyboards/pabile/p20/ver1/ver1.c create mode 100644 keyboards/pabile/p20/ver1/ver1.h create mode 100644 keyboards/pabile/p20/ver2/config.h create mode 100644 keyboards/pabile/p20/ver2/keymaps/default/keymap.c create mode 100644 keyboards/pabile/p20/ver2/rules.mk create mode 100644 keyboards/pabile/p20/ver2/ver2.c create mode 100644 keyboards/pabile/p20/ver2/ver2.h create mode 100644 keyboards/pabile/p40_ortho/config.h create mode 100644 keyboards/pabile/p40_ortho/info.json create mode 100644 keyboards/pabile/p40_ortho/keymaps/default/keymap.c create mode 100644 keyboards/pabile/p40_ortho/p40_ortho.c create mode 100644 keyboards/pabile/p40_ortho/p40_ortho.h create mode 100644 keyboards/pabile/p40_ortho/readme.md create mode 100644 keyboards/pabile/p40_ortho/rules.mk create mode 100644 keyboards/pabile/p42/config.h create mode 100644 keyboards/pabile/p42/info.json create mode 100644 keyboards/pabile/p42/keymaps/default/keymap.c create mode 100644 keyboards/pabile/p42/p42.c create mode 100644 keyboards/pabile/p42/p42.h create mode 100644 keyboards/pabile/p42/readme.md create mode 100644 keyboards/pabile/p42/rules.mk diff --git a/keyboards/pabile/p18/config.h b/keyboards/pabile/p18/config.h index f7c258a56540..d8d5a95f2d0b 100644 --- a/keyboards/pabile/p18/config.h +++ b/keyboards/pabile/p18/config.h @@ -1,3 +1,21 @@ +/* +Copyright 2020 Pabile + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License 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/pabile/p20/config.h b/keyboards/pabile/p20/config.h deleted file mode 100644 index 8a52c1bf1c50..000000000000 --- a/keyboards/pabile/p20/config.h +++ /dev/null @@ -1,26 +0,0 @@ -#pragma once - -#include "config_common.h" - -/* USB Device descriptor parameter */ -#define VENDOR_ID 0x6666 -#define PRODUCT_ID 0x6667 -#define DEVICE_VER 0x0001 -#define MANUFACTURER Pabile -#define PRODUCT P20 -#define DESCRIPTION 5x4 Macropad - -/* key matrix size */ -#define MATRIX_ROWS 5 -#define MATRIX_COLS 4 - -/* pin-out */ -#define MATRIX_ROW_PINS { B3, B4, B5, D7, E6 } -#define MATRIX_COL_PINS { D0, B2, D4, B6 } -#define UNUSED_PINS - -#define ENCODERS_PAD_A { F5, F7 } -#define ENCODERS_PAD_B { F6, B1 } - -/* COL2ROW or ROW2COL */ -#define DIODE_DIRECTION COL2ROW diff --git a/keyboards/pabile/p20/p20.c b/keyboards/pabile/p20/p20.c deleted file mode 100644 index c17efac9b162..000000000000 --- a/keyboards/pabile/p20/p20.c +++ /dev/null @@ -1 +0,0 @@ -#include "p20.h" diff --git a/keyboards/pabile/p20/p20.h b/keyboards/pabile/p20/p20.h deleted file mode 100644 index b7467dc150ec..000000000000 --- a/keyboards/pabile/p20/p20.h +++ /dev/null @@ -1,18 +0,0 @@ -#pragma once - -#include "quantum.h" - -#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} \ -} diff --git a/keyboards/pabile/p20/readme.md b/keyboards/pabile/p20/readme.md index 256a4772ecd5..e94005b0d4db 100644 --- a/keyboards/pabile/p20/readme.md +++ b/keyboards/pabile/p20/readme.md @@ -1,16 +1,16 @@ # P20 ![Linear grid](https://github.com/pabile/Pabile20/blob/master/_bak/layout-grid.jpg) -![Numeric pad](https://github.com/pabile/Pabile20/blob/master/_bak/layout-numpad.jpg) -A 5x4 grid keyboard with 2 rotary encoders. +A 5x4 grid macro numeric pad with up to 3 optional rotary encoders. * Keyboard Maintainer: [pabile](https://github.com/pabile) -* Hardware Supported: Pabile P20 PCB, Pro Micro -* Hardware Availability: [Info at pabileonline.blogspot.com](https://pabileonline.blogspot.com/search/label/pabile20) +* Hardware Supported: Pabile P20 PCB, Pro Micro, Rotary Encoders, Alps/MX Switches +* Hardware Availability: [pabileonline.blogspot.com](https://pabileonline.blogspot.com/search/label/p20) Make example for this keyboard (after setting up your build environment): - make pabile/p20:default + make pabile/p20/ver1:default # for ver1 + make pabile/p20/ver2:default # for ver2 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/pabile/p20/ver1/config.h b/keyboards/pabile/p20/ver1/config.h new file mode 100644 index 000000000000..94c600106b06 --- /dev/null +++ b/keyboards/pabile/p20/ver1/config.h @@ -0,0 +1,42 @@ +/* +Copyright 2020 Pabile + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License 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 0x6666 +#define PRODUCT_ID 0x6667 +#define DEVICE_VER 0x0001 +#define MANUFACTURER Pabile +#define PRODUCT P20 ver1 + +/* key matrix size */ +#define MATRIX_ROWS 5 +#define MATRIX_COLS 4 + +/* pin-out */ +#define MATRIX_ROW_PINS { B3, B4, B5, D7, E6 } +#define MATRIX_COL_PINS { D0, B2, D4, B6 } +#define UNUSED_PINS + +#define ENCODERS_PAD_A { F5, F7 } +#define ENCODERS_PAD_B { F6, B1 } + +/* COL2ROW or ROW2COL */ +#define DIODE_DIRECTION COL2ROW \ No newline at end of file diff --git a/keyboards/pabile/p20/keymaps/default/keymap.c b/keyboards/pabile/p20/ver1/keymaps/default/keymap.c similarity index 100% rename from keyboards/pabile/p20/keymaps/default/keymap.c rename to keyboards/pabile/p20/ver1/keymaps/default/keymap.c diff --git a/keyboards/pabile/p20/rules.mk b/keyboards/pabile/p20/ver1/rules.mk similarity index 64% rename from keyboards/pabile/p20/rules.mk rename to keyboards/pabile/p20/ver1/rules.mk index d4fa25323ade..d8e01b847ff7 100644 --- a/keyboards/pabile/p20/rules.mk +++ b/keyboards/pabile/p20/ver1/rules.mk @@ -2,13 +2,6 @@ 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 @@ -25,13 +18,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 -BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID -AUDIO_ENABLE = no # Audio output on port C6 -FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches -HD44780_ENABLE = no # Enable support for HD44780 based LCDs +BLUETOOTH_ENABLE = no # Enable Bluetooth +AUDIO_ENABLE = no # Audio output + UNICODE_ENABLE = yes # Unicode IOS_DEVICE_ENABLE = no # connect to IOS Device ENCODER_ENABLE = yes -LAYOUTS = ortho_5x4 +LAYOUTS = ortho_5x4 numpad_5x4 diff --git a/keyboards/pabile/p20/ver1/ver1.c b/keyboards/pabile/p20/ver1/ver1.c new file mode 100644 index 000000000000..65e11630bc88 --- /dev/null +++ b/keyboards/pabile/p20/ver1/ver1.c @@ -0,0 +1,18 @@ +/* +Copyright 2020 Pabile + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#include "ver1.h" diff --git a/keyboards/pabile/p20/ver1/ver1.h b/keyboards/pabile/p20/ver1/ver1.h new file mode 100644 index 000000000000..36ec781fa1f5 --- /dev/null +++ b/keyboards/pabile/p20/ver1/ver1.h @@ -0,0 +1,50 @@ +/* +Copyright 2020 Pabile + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License 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_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} \ +} + +#define LAYOUT_numpad_5x4( \ + k00, k01, k02, k03, \ + k10, k11, k12, \ + k20, k21, k22, k23, \ + k30, k31, k32, \ + k40, k42, k43 \ +) \ +{ \ + {k00, k01, k02, k03}, \ + {k10, k11, k12, KC_NO}, \ + {k20, k21, k22, k23}, \ + {k30, k31, k32, KC_NO}, \ + {k40, KC_NO, k42, k43} \ +} diff --git a/keyboards/pabile/p20/ver2/config.h b/keyboards/pabile/p20/ver2/config.h new file mode 100644 index 000000000000..099700183650 --- /dev/null +++ b/keyboards/pabile/p20/ver2/config.h @@ -0,0 +1,39 @@ +/* +Copyright 2020 Pabile + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License 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 0x6666 +#define PRODUCT_ID 0x6667 +#define DEVICE_VER 0x0002 +#define MANUFACTURER Pabile +#define PRODUCT P20 ver2 + +/* key matrix size */ +#define MATRIX_ROWS 5 +#define MATRIX_COLS 4 + +/* pin-out */ +#define MATRIX_ROW_PINS { C6, D7, E6, B4, B5 } +#define MATRIX_COL_PINS { D1, D0, D4, B2 } +#define UNUSED_PINS + +/* COL2ROW or ROW2COL */ +#define DIODE_DIRECTION COL2ROW diff --git a/keyboards/pabile/p20/ver2/keymaps/default/keymap.c b/keyboards/pabile/p20/ver2/keymaps/default/keymap.c new file mode 100644 index 000000000000..2c2af0da8a6b --- /dev/null +++ b/keyboards/pabile/p20/ver2/keymaps/default/keymap.c @@ -0,0 +1,43 @@ +/* +Copyright 2020 Pabile + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public 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 { + DBLZERO = SAFE_RANGE, +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case DBLZERO: + if (record->event.pressed) { + tap_code(KC_P0); + tap_code(KC_P0); + } + break; + } + return true; +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_ortho_5x4( + KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS, + KC_P7, KC_P8, KC_P9, KC_TAB, + KC_P4, KC_P5, KC_P6, KC_PPLS, + KC_P1, KC_P2, KC_P3, KC_DEL, + KC_P0, DBLZERO, KC_PDOT, KC_PENT) +}; diff --git a/keyboards/pabile/p20/ver2/rules.mk b/keyboards/pabile/p20/ver2/rules.mk new file mode 100644 index 000000000000..da59201fcaed --- /dev/null +++ b/keyboards/pabile/p20/ver2/rules.mk @@ -0,0 +1,28 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +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 = no # Console for debug +COMMAND_ENABLE = no # Commands for debug and configuration +# 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 +BLUETOOTH_ENABLE = no # Enable Bluetooth +AUDIO_ENABLE = no # Audio output + +UNICODE_ENABLE = yes # Unicode +IOS_DEVICE_ENABLE = no # connect to IOS Device +ENCODER_ENABLE = no + +LAYOUTS = ortho_5x4 numpad_5x4 diff --git a/keyboards/pabile/p20/ver2/ver2.c b/keyboards/pabile/p20/ver2/ver2.c new file mode 100644 index 000000000000..fa7e1f2e395d --- /dev/null +++ b/keyboards/pabile/p20/ver2/ver2.c @@ -0,0 +1,18 @@ +/* +Copyright 2020 Pabile + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#include "ver2.h" diff --git a/keyboards/pabile/p20/ver2/ver2.h b/keyboards/pabile/p20/ver2/ver2.h new file mode 100644 index 000000000000..36ec781fa1f5 --- /dev/null +++ b/keyboards/pabile/p20/ver2/ver2.h @@ -0,0 +1,50 @@ +/* +Copyright 2020 Pabile + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License 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_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} \ +} + +#define LAYOUT_numpad_5x4( \ + k00, k01, k02, k03, \ + k10, k11, k12, \ + k20, k21, k22, k23, \ + k30, k31, k32, \ + k40, k42, k43 \ +) \ +{ \ + {k00, k01, k02, k03}, \ + {k10, k11, k12, KC_NO}, \ + {k20, k21, k22, k23}, \ + {k30, k31, k32, KC_NO}, \ + {k40, KC_NO, k42, k43} \ +} diff --git a/keyboards/pabile/p40/config.h b/keyboards/pabile/p40/config.h index f4252f7ab03e..02ebb67e6baa 100644 --- a/keyboards/pabile/p40/config.h +++ b/keyboards/pabile/p40/config.h @@ -1,3 +1,20 @@ +/* +Copyright 2020 Pabile + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License 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/pabile/p40/info.json b/keyboards/pabile/p40/info.json index 42f9b4823e16..d05d773282a0 100644 --- a/keyboards/pabile/p40/info.json +++ b/keyboards/pabile/p40/info.json @@ -7,46 +7,46 @@ "layouts": { "LAYOUT_ortho_4x10": { "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":0.25, "y":1}, - {"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":0.5, "y":2}, - {"x":1.5, "y":2}, - {"x":2.5, "y":2}, - {"x":3.5, "y":2}, - {"x":4.5, "y":2}, - {"x":5.5, "y":2}, - {"x":6.5, "y":2}, - {"x":7.5, "y":2}, - {"x":8.5, "y":2}, - {"x":9.5, "y":2}, - {"x":0.75, "y":3}, - {"x":1.75, "y":3}, - {"x":2.75, "y":3}, - {"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}] + {"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":4, "y":0}, + {"w":1, "x":5, "y":0}, + {"w":1, "x":6, "y":0}, + {"w":1, "x":7, "y":0}, + {"w":1, "x":8, "y":0}, + {"w":1, "x":9, "y":0}, + {"w":1, "x":0.25, "y":1}, + {"w":1, "x":1.25, "y":1}, + {"w":1, "x":2.25, "y":1}, + {"w":1, "x":3.25, "y":1}, + {"w":1, "x":4.25, "y":1}, + {"w":1, "x":5.25, "y":1}, + {"w":1, "x":6.25, "y":1}, + {"w":1, "x":7.25, "y":1}, + {"w":1, "x":8.25, "y":1}, + {"w":1, "x":9.25, "y":1}, + {"w":1, "x":0.5, "y":2}, + {"w":1, "x":1.5, "y":2}, + {"w":1, "x":2.5, "y":2}, + {"w":1, "x":3.5, "y":2}, + {"w":1, "x":4.5, "y":2}, + {"w":1, "x":5.5, "y":2}, + {"w":1, "x":6.5, "y":2}, + {"w":1, "x":7.5, "y":2}, + {"w":1, "x":8.5, "y":2}, + {"w":1, "x":9.5, "y":2}, + {"w":1, "x":0.75, "y":3}, + {"w":1, "x":1.75, "y":3}, + {"w":1, "x":2.75, "y":3}, + {"w":1, "x":3.75, "y":3}, + {"w":1, "x":4.75, "y":3}, + {"w":1, "x":5.75, "y":3}, + {"w":1, "x":6.75, "y":3}, + {"w":1, "x":7.75, "y":3}, + {"w":1, "x":8.75, "y":3}, + {"w":1, "x":9.75, "y":3}] } } } diff --git a/keyboards/pabile/p40/readme.md b/keyboards/pabile/p40/readme.md index 33a657f384c4..14673d75a202 100644 --- a/keyboards/pabile/p40/readme.md +++ b/keyboards/pabile/p40/readme.md @@ -6,10 +6,11 @@ A compact 4x10 (40%) staggered DIY keyboard kit. * Keyboard Maintainer: [pabile](https://github.com/pabile) * Hardware Supported: Pabile P40 PCB, Pro Micro -* Hardware Availability: [Info at pabileonline.blogspot.com](https://pabileonline.blogspot.com/search/label/pabile40) +* Hardware Availability: [Info at pabileonline.blogspot.com](https://pabileonline.blogspot.com/search/label/p40) Make example for this keyboard (after setting up your build environment): make pabile/p40: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/pabile/p40_ortho/config.h b/keyboards/pabile/p40_ortho/config.h new file mode 100644 index 000000000000..4fd8e7a533ba --- /dev/null +++ b/keyboards/pabile/p40_ortho/config.h @@ -0,0 +1,40 @@ +/* +Copyright 2020 Pabile + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License 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 0x6666 +#define PRODUCT_ID 0x6669 +#define DEVICE_VER 0x0001 +#define MANUFACTURER Pabile +#define PRODUCT P40 Ortho Keyboard + +/* key matrix size */ +#define MATRIX_ROWS 4 +#define MATRIX_COLS 10 + +/* pin-out */ +#define MATRIX_ROW_PINS { D1, D0, F4, F5 } +#define MATRIX_COL_PINS { D4, C6, D7, E6, B4, B2, B3, B1, F7, F6 } + +#define UNUSED_PINS + +/* COL2ROW or ROW2COL */ +#define DIODE_DIRECTION COL2ROW diff --git a/keyboards/pabile/p40_ortho/info.json b/keyboards/pabile/p40_ortho/info.json new file mode 100644 index 000000000000..a4d757be9276 --- /dev/null +++ b/keyboards/pabile/p40_ortho/info.json @@ -0,0 +1,52 @@ +{ + "keyboard_name": "", + "url": "", + "maintainer": "qmk", + "width": 10, + "height": 4, + "layouts": { + "LAYOUT_ortho_4x10": { + "layout": [ + {"label":"Q", "x":0, "y":0}, + {"label":"W", "x":1, "y":0}, + {"label":"E", "x":2, "y":0}, + {"label":"R", "x":3, "y":0}, + {"label":"T", "x":4, "y":0}, + {"label":"Y", "x":5, "y":0}, + {"label":"U", "x":6, "y":0}, + {"label":"I", "x":7, "y":0}, + {"label":"O", "x":8, "y":0}, + {"label":"P", "x":9, "y":0}, + {"label":"A", "x":0, "y":1}, + {"label":"S", "x":1, "y":1}, + {"label":"D", "x":2, "y":1}, + {"label":"F", "x":3, "y":1}, + {"label":"G", "x":4, "y":1}, + {"label":"H", "x":5, "y":1}, + {"label":"J", "x":6, "y":1}, + {"label":"K", "x":7, "y":1}, + {"label":"L", "x":8, "y":1}, + {"label":"-", "x":9, "y":1}, + {"label":"Z", "x":0, "y":2}, + {"label":"X", "x":1, "y":2}, + {"label":"C", "x":2, "y":2}, + {"label":"V", "x":3, "y":2}, + {"label":"B", "x":4, "y":2}, + {"label":"N", "x":5, "y":2}, + {"label":"M", "x":6, "y":2}, + {"label":",", "x":7, "y":2}, + {"label":".", "x":8, "y":2}, + {"label":"?", "x":9, "y":2}, + {"label":"Ctrl", "x":0, "y":3}, + {"label":"Win", "x":1, "y":3}, + {"label":"Alt", "x":2, "y":3}, + {"label":"Shift", "x":3, "y":3}, + {"label":"←", "x":4, "y":3}, + {"x":5, "y":3}, + {"label":"Enter", "x":6, "y":3}, + {"label":"Alt", "x":7, "y":3}, + {"label":"Super", "x":8, "y":3}, + {"label":"Ctrl", "x":9, "y":3}] + } + } +} diff --git a/keyboards/pabile/p40_ortho/keymaps/default/keymap.c b/keyboards/pabile/p40_ortho/keymaps/default/keymap.c new file mode 100644 index 000000000000..ac41acf2daad --- /dev/null +++ b/keyboards/pabile/p40_ortho/keymaps/default/keymap.c @@ -0,0 +1,46 @@ +/* +Copyright 2020 Pabile + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public 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_4x10( + 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, LT(3,KC_MINS), + KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, LT(4,KC_SLSH), + KC_LCTL, KC_LGUI, KC_LALT, KC_LSFT, LT(2,KC_BSPC), LT(1,KC_SPC), KC_ENT, KC_APP, KC_DEL, KC_ESC), + [1] = LAYOUT_ortho_4x10( + KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, + KC_TAB, KC_NO, KC_NO, KC_GRV, KC_LBRC, KC_RBRC, KC_BSLS, KC_SCLN, KC_QUOT, KC_MINS, + KC_NO, KC_NO, KC_NO, KC_NO, KC_EQL, KC_MINS, KC_NO, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_NO, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), + [2] = LAYOUT_ortho_4x10( + KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, + KC_TAB, KC_F11, KC_F12, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_CAPS, KC_PSCR, KC_SLCK, KC_PAUS, KC_NO, KC_NLCK, KC_NO, KC_VOLD, KC_VOLU, KC_MUTE, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO), + [3] = LAYOUT_ortho_4x10( + KC_ESC, KC_NO, KC_NO, KC_NO, KC_NO, KC_INS, KC_PGUP, KC_UP, KC_PGDN, KC_DEL, + KC_TAB, KC_NO, KC_NO, KC_NO, KC_NO, KC_HOME, KC_LEFT, KC_DOWN, KC_RGHT, KC_NO, + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_END, KC_NO, KC_NO, KC_NO, KC_NO, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_BSPC, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO), + [4] = LAYOUT_ortho_4x10( + KC_ESC, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_BTN1, KC_MS_U, KC_BTN2, KC_DEL, + KC_TAB, KC_NO, KC_NO, KC_NO, KC_NO, KC_WH_U, KC_MS_L, KC_MS_D, KC_MS_R, KC_NO, + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_WH_D, KC_NO, KC_NO, KC_NO, KC_NO, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_BSPC, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO) +}; diff --git a/keyboards/pabile/p40_ortho/p40_ortho.c b/keyboards/pabile/p40_ortho/p40_ortho.c new file mode 100644 index 000000000000..b6573bd8025c --- /dev/null +++ b/keyboards/pabile/p40_ortho/p40_ortho.c @@ -0,0 +1,18 @@ +/* +Copyright 2020 Pabile + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#include "p40_ortho.h" diff --git a/keyboards/pabile/p40_ortho/p40_ortho.h b/keyboards/pabile/p40_ortho/p40_ortho.h new file mode 100644 index 000000000000..dd2c899daa07 --- /dev/null +++ b/keyboards/pabile/p40_ortho/p40_ortho.h @@ -0,0 +1,45 @@ +/* +Copyright 2020 Pabile + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License 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_4x10( \ + 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 \ +) \ +{ \ + {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} \ +} +#define LAYOUT_ortho_4x10_1x2u_c( \ + 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, k36, k37, k38, k39 \ +) \ +{ \ + {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, KC_NO, k36, k37, k38, k39} \ +} diff --git a/keyboards/pabile/p40_ortho/readme.md b/keyboards/pabile/p40_ortho/readme.md new file mode 100644 index 000000000000..736c5b497f98 --- /dev/null +++ b/keyboards/pabile/p40_ortho/readme.md @@ -0,0 +1,15 @@ +# P40 Ortho + +![prototype photo1](https://github.com/pabile/p40_ortho/blob/master/files/p40-ortho-003.jpg) + +A compact 4x10 (40%) ortho-linear DIY keyboard kit. + +* Keyboard Maintainer: [pabile](https://github.com/pabile) +* Hardware Supported: Pabile P40 PCB, Pro Micro, ALPS / MX Switches +* Hardware Availability: [pabileonline.blogspot.com](https://pabileonline.blogspot.com/search/label/pabile40) + +Make example for this keyboard (after setting up your build environment): + + make pabile/p40_ortho: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/pabile/p40_ortho/rules.mk b/keyboards/pabile/p40_ortho/rules.mk new file mode 100644 index 000000000000..ba0ad23c8a45 --- /dev/null +++ b/keyboards/pabile/p40_ortho/rules.mk @@ -0,0 +1,24 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +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 = no # Console for debug +COMMAND_ENABLE = no # Commands for debug and configuration +# 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 +BLUETOOTH_ENABLE = no # Enable Bluetooth +AUDIO_ENABLE = no # Audio output +UNICODE_ENABLE = yes # Unicode +IOS_DEVICE_ENABLE = no # connect to IOS Device diff --git a/keyboards/pabile/p42/config.h b/keyboards/pabile/p42/config.h new file mode 100644 index 000000000000..2f7c5ce30a9c --- /dev/null +++ b/keyboards/pabile/p42/config.h @@ -0,0 +1,45 @@ +/* +Copyright 2020 Pabile + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License 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 0x6666 +#define PRODUCT_ID 0x6670 +#define DEVICE_VER 0x0001 +#define MANUFACTURER Pabile +#define PRODUCT P42 Keyboard + +/* key matrix size */ +#define MATRIX_ROWS 4 +#define MATRIX_COLS 11 + +/* pin-out for PROMICRO */ +#define MATRIX_ROW_PINS { D1, D0, D4, C6 } +#define MATRIX_COL_PINS { D7, E6, B4, B5, D2, D3, F7, B1, B3, B2, B6 } + +/* pin-out for BLUEFRUIT +#define MATRIX_ROW_PINS { F7, F6, F5, F4 } +#define MATRIX_COL_PINS { F1, F0, B1, B2, B3, D2, C7, D6, B7, B6, B5 } +*/ + +#define UNUSED_PINS + +/* COL2ROW or ROW2COL */ +#define DIODE_DIRECTION COL2ROW diff --git a/keyboards/pabile/p42/info.json b/keyboards/pabile/p42/info.json new file mode 100644 index 000000000000..77bce4bab28c --- /dev/null +++ b/keyboards/pabile/p42/info.json @@ -0,0 +1,13 @@ +{ + "keyboard_name": "P42", + "url": "https://pabileonline.blogspot.com/", + "maintainer": "Pabile", + "width": 11.25, + "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":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":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}, {"label":",", "x":7, "y":2}, {"label":".", "x":8, "y":2}, {"x":9, "y":2}, {"x":10.25, "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.25, "y":3}] + } + } +} diff --git a/keyboards/pabile/p42/keymaps/default/keymap.c b/keyboards/pabile/p42/keymaps/default/keymap.c new file mode 100644 index 000000000000..39c9e639e426 --- /dev/null +++ b/keyboards/pabile/p42/keymaps/default/keymap.c @@ -0,0 +1,29 @@ +#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, LT(3,KC_MINS), + 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_LSFT, LT(2,KC_BSPC), LT(1,KC_SPC), LT(4,KC_ENT), KC_DEL, KC_RALT, KC_RCTL, KC_ESC), + [1] = LAYOUT( + KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, + KC_TAB, KC_NO, KC_NO, KC_GRV, KC_LBRC, KC_RBRC, KC_BSLS, KC_SCLN, KC_QUOT, KC_MINS, + KC_NO, KC_NO, KC_NO, KC_NO, KC_EQL, KC_MINS, KC_NO, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_NO, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), + [2] = LAYOUT( + KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, + KC_TAB, KC_F11, KC_F12, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_CAPS, KC_PSCR, KC_SLCK, KC_PAUS, KC_NO, KC_NLCK, KC_NO, KC_VOLD, KC_VOLU, KC_MUTE, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_NO, KC_NO, KC_NO, KC_NO, KC_TRNS), + [3] = LAYOUT( + KC_ESC, KC_NO, KC_NO, KC_NO, KC_NO, KC_INS, KC_PGUP, KC_UP, KC_PGDN, KC_DEL, + KC_TAB, KC_NO, KC_NO, KC_NO, KC_NO, KC_HOME, KC_LEFT, KC_DOWN, KC_RGHT, KC_NO, + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_END, KC_NO, KC_NO, KC_NO, KC_NO, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_BSPC, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_TRNS), + [4] = LAYOUT( + KC_ESC, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_BTN1, KC_MS_U, KC_BTN2, KC_DEL, + KC_TAB, KC_NO, KC_NO, KC_NO, KC_NO, KC_WH_U, KC_MS_L, KC_MS_D, KC_MS_R, KC_NO, + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_WH_D, KC_NO, KC_NO, KC_NO, KC_NO, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_BSPC, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_TRNS) +}; diff --git a/keyboards/pabile/p42/p42.c b/keyboards/pabile/p42/p42.c new file mode 100644 index 000000000000..63bf51bd581c --- /dev/null +++ b/keyboards/pabile/p42/p42.c @@ -0,0 +1 @@ +#include "p42.h" diff --git a/keyboards/pabile/p42/p42.h b/keyboards/pabile/p42/p42.h new file mode 100644 index 000000000000..41aed042a20b --- /dev/null +++ b/keyboards/pabile/p42/p42.h @@ -0,0 +1,33 @@ +/* +Copyright 2020 Pabile + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License 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, \ + k100, k101, k102, k103, k104, k105, k106, k107, k108, k109, \ + k200, k201, k202, k203, k204, k205, k206, k207, k208, k209, k210,\ + k300, k301, k302, k303, k304, k305, k306, k307, k308, k309, k310 \ +) \ +{ \ + {k000, k001, k002, k003, k004, k005, k006, k007, k008, k009, KC_NO}, \ + {k100, k101, k102, k103, k104, k105, k106, k107, k108, k109, KC_NO}, \ + {k200, k201, k202, k203, k204, k205, k206, k207, k208, k209, k210}, \ + {k300, k301, k302, k303, k304, k305, k306, k307, k308, k309, k310} \ +} diff --git a/keyboards/pabile/p42/readme.md b/keyboards/pabile/p42/readme.md new file mode 100644 index 000000000000..5ad0036bff62 --- /dev/null +++ b/keyboards/pabile/p42/readme.md @@ -0,0 +1,15 @@ +# P42 + +![prototype photo1](https://github.com/pabile/P42/blob/master/docs/p42-001-small.jpg) + +42-key Ortho-linear keyboard + +* Keyboard Maintainer: [pabile](https://github.com/pabile) +* Hardware Supported: Pabile P42 PCB, Pro Micro, Bluefruit LE, Hotswap Sockets +* Hardware Availability: [pabileonline.blogspot.com](https://pabileonline.blogspot.com/) + +Make example for this keyboard (after setting up your build environment): + + make pabile/p42: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/pabile/p42/rules.mk b/keyboards/pabile/p42/rules.mk new file mode 100644 index 000000000000..ba0ad23c8a45 --- /dev/null +++ b/keyboards/pabile/p42/rules.mk @@ -0,0 +1,24 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +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 = no # Console for debug +COMMAND_ENABLE = no # Commands for debug and configuration +# 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 +BLUETOOTH_ENABLE = no # Enable Bluetooth +AUDIO_ENABLE = no # Audio output +UNICODE_ENABLE = yes # Unicode +IOS_DEVICE_ENABLE = no # connect to IOS Device From e1437c1859b088c4da7ffb517f8034723172cd82 Mon Sep 17 00:00:00 2001 From: Richard Titmuss Date: Sun, 20 Sep 2020 02:48:43 +0200 Subject: [PATCH 821/930] [Keyboard] Add Torn keyboard (#10207) * Add Torn keyboard * Apply suggestions from code review Co-authored-by: Nick Brassel * Remove via json file * Add mcp23081_pin_t * Apply suggestions from code review 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> * Apply suggestions from code review Co-authored-by: Drashna Jaelre * Apply suggestions from code review Co-authored-by: Ryan Co-authored-by: Richard Titmuss Co-authored-by: Nick Brassel Co-authored-by: James Young <18669334+noroadsleft@users.noreply.github.com> Co-authored-by: Drashna Jaelre Co-authored-by: Ryan --- keyboards/torn/config.h | 68 ++++++++++++++ keyboards/torn/info.json | 57 ++++++++++++ keyboards/torn/keymaps/default/keymap.c | 119 ++++++++++++++++++++++++ keyboards/torn/keymaps/via/keymap.c | 119 ++++++++++++++++++++++++ keyboards/torn/keymaps/via/rules.mk | 2 + keyboards/torn/matrix.c | 113 ++++++++++++++++++++++ keyboards/torn/mcp23018.c | 63 +++++++++++++ keyboards/torn/mcp23018.h | 32 +++++++ keyboards/torn/readme.md | 21 +++++ keyboards/torn/rules.mk | 27 ++++++ keyboards/torn/torn.c | 50 ++++++++++ keyboards/torn/torn.h | 41 ++++++++ keyboards/torn/torn_encoder.c | 86 +++++++++++++++++ keyboards/torn/torn_oled.c | 63 +++++++++++++ 14 files changed, 861 insertions(+) create mode 100644 keyboards/torn/config.h create mode 100644 keyboards/torn/info.json create mode 100644 keyboards/torn/keymaps/default/keymap.c create mode 100644 keyboards/torn/keymaps/via/keymap.c create mode 100644 keyboards/torn/keymaps/via/rules.mk create mode 100644 keyboards/torn/matrix.c create mode 100644 keyboards/torn/mcp23018.c create mode 100644 keyboards/torn/mcp23018.h create mode 100644 keyboards/torn/readme.md create mode 100644 keyboards/torn/rules.mk create mode 100644 keyboards/torn/torn.c create mode 100644 keyboards/torn/torn.h create mode 100644 keyboards/torn/torn_encoder.c create mode 100644 keyboards/torn/torn_oled.c diff --git a/keyboards/torn/config.h b/keyboards/torn/config.h new file mode 100644 index 000000000000..6cd6c2808e88 --- /dev/null +++ b/keyboards/torn/config.h @@ -0,0 +1,68 @@ +/* + * Copyright 2020 Richard Titmuss + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License 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 0x7274 +#define PRODUCT_ID 0x0001 +#define DEVICE_VER 0x0000 +#define MANUFACTURER richard.titmuss +#define PRODUCT Torn + +/* 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 \ + { D4, D1, D0, D5 } +#define MATRIX_COL_PINS \ + { B3, B4, B5, B0, D7, D6 } +#define UNUSED_PINS + +#define SECONDARY_ROW_PINS \ + { (1 << 5), (1 << 6), (1 << 7), (1 << 4) } +#define SECONDARY_COL_PINS \ + { (1 << 3), (1 << 2), (1 << 1), (1 << 0), (1 << 15), (1 << 14) } + +/* COL2ROW, ROW2COL*/ +#define DIODE_DIRECTION COL2ROW + +#define ENCODERS_PAD_A \ + { B2 } +#define ENCODERS_PAD_B \ + { B1 } + +#define USB_MAX_POWER_CONSUMPTION 100 + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCE 5 + +#define OLED_TIMEOUT 60000 diff --git a/keyboards/torn/info.json b/keyboards/torn/info.json new file mode 100644 index 000000000000..340eb73597dc --- /dev/null +++ b/keyboards/torn/info.json @@ -0,0 +1,57 @@ +{ + "keyboard_name": "Torn / Split Through Hole", + "url": "https://github.com/rtitmuss/torn", + "maintainer": "rtitmuss", + "width": 15, + "height": 4.55, + "layouts": { + "LAYOUT_split_3x6_4": { + "layout": [ + {"label":"SW1", "x":0, "y":0.375}, + {"label":"SW2", "x":1, "y":0.375}, + {"label":"SW3", "x":2, "y":0.125}, + {"label":"SW4", "x":3, "y":0}, + {"label":"SW5", "x":4, "y":0.125}, + {"label":"SW6", "x":5, "y":0.25}, + {"label":"SW23", "x":9, "y":0.25}, + {"label":"SW24", "x":10, "y":0.125}, + {"label":"SW25", "x":11, "y":0}, + {"label":"SW26", "x":12, "y":0.125}, + {"label":"SW27", "x":13, "y":0.375}, + {"label":"SW28", "x":14, "y":0.375}, + {"label":"SW7", "x":0, "y":1.375}, + {"label":"SW8", "x":1, "y":1.375}, + {"label":"SW9", "x":2, "y":1.125}, + {"label":"SW10", "x":3, "y":1}, + {"label":"SW11", "x":4, "y":1.125}, + {"label":"SW12", "x":5, "y":1.25}, + {"label":"SW29", "x":9, "y":1.25}, + {"label":"SW30", "x":10, "y":1.125}, + {"label":"SW31", "x":11, "y":1}, + {"label":"SW32", "x":12, "y":1.125}, + {"label":"SW33", "x":13, "y":1.375}, + {"label":"SW34", "x":14, "y":1.375}, + {"label":"SW13", "x":0, "y":2.375}, + {"label":"SW14", "x":1, "y":2.375}, + {"label":"SW15", "x":2, "y":2.125}, + {"label":"SW16", "x":3, "y":2}, + {"label":"SW17", "x":4, "y":2.125}, + {"label":"SW18", "x":5, "y":2.25}, + {"label":"SW35", "x":9, "y":2.25}, + {"label":"SW36", "x":10, "y":2.125}, + {"label":"SW37", "x":11, "y":2}, + {"label":"SW38", "x":12, "y":2.125}, + {"label":"SW39", "x":13, "y":2.375}, + {"label":"SW40", "x":14, "y":2.375}, + {"label":"SW19", "x":3, "y":3.1}, + {"label":"SW20", "x":4, "y":3.25}, + {"label":"SW21", "x":5, "y":3.40}, + {"label":"SW22", "x":6, "y":3.55}, + {"label":"SW41", "x":8, "y":3.55}, + {"label":"SW42", "x":9, "y":3.40}, + {"label":"SW43", "x":10, "y":3.25}, + {"label":"SW44", "x":11, "y":3.1} + ] + } + } +} diff --git a/keyboards/torn/keymaps/default/keymap.c b/keyboards/torn/keymaps/default/keymap.c new file mode 100644 index 000000000000..7c91325bdc30 --- /dev/null +++ b/keyboards/torn/keymaps/default/keymap.c @@ -0,0 +1,119 @@ +/* Copyright 2020 Richard Titmuss (richard.titmuss@gmail.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 + +enum torn_layers { _QWERTY, _LOWER, _RAISE, _ADJUST }; + +#define S_BSPC LSFT_T(KC_BSPC) +#define R_DEL LT(_RAISE, KC_DEL) +#define G_ENT LGUI_T(KC_ENT) +#define L_SPC LT(_LOWER, KC_SPC) + +// clang-format off +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +/* Qwerty + * ,-----------------------------------------. ,-----------------------------------------. + * | Tab | 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 | , | . | / | ] | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | ____ | Ctrl | Bksp | Del | |Enter |Space | Alt | ____ | + * | | |Shift |Raise | | Gui |Lower | | | + * `---------------------------' `---------------------------' + */ +[_QWERTY] = LAYOUT_split_3x6_4( + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_QUOT, + KC_GRV, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_LBRC, + KC_BSLS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RBRC , + _______, KC_LCTL, S_BSPC, R_DEL, G_ENT, L_SPC, KC_RALT, _______ +), + +/* Lower + * ,-----------------------------------------. ,-----------------------------------------. + * | Esc | ! | @ | # | $ | % | | ^ | & | * | ( | ) | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | = | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | - | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | _ | | | | | | | | | , | . | / | + | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | ____ | Ctrl | Bksp | Del | |Enter |Space | Alt | ____ | + * | | |Shift |Raise | | Gui |Lower | | | + * `---------------------------' `---------------------------' + */ +[_LOWER] = LAYOUT_split_3x6_4( + KC_ESC, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, _______, + KC_EQL, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_PMNS, + KC_UNDS, _______, _______, _______, _______, _______, _______, _______, KC_COMM, KC_DOT, KC_SLSH, KC_PPLS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS +), + +/* Raise + * ,-----------------------------------------. ,-----------------------------------------. + * | | F1 | F2 | F3 | F4 | F5 | | | & | * | ( | ) | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | F6 | F7 | F8 | F9 | F10 | | Home | Left | Down | Right| End | PgUp | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | F11 | F12 | | | | | | | | | | PgDn | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | ____ | Ctrl | Bksp | Del | |Enter |Space | Alt | ____ | + * | | |Shift |Raise | | Gui |Lower | | | + * `---------------------------' `---------------------------' + */ +[_RAISE] = LAYOUT_split_3x6_4( + _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, _______, S(A(KC_LEFT)), KC_UP, S(A(KC_RGHT)), _______, _______, + _______, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_HOME, KC_LEFT, KC_DOWN, KC_RGHT, KC_END, KC_PGUP, + _______, KC_F11, KC_F12, _______, _______, _______, A(KC_BSPC), A(KC_LEFT), S(KC_DOWN), A(KC_RGHT), _______, KC_PGDN , + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS +), + +/* Adjust (Lower + Raise) + * ,-----------------------------------------. ,-----------------------------------------. + * | | | | | | | | | | | | | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | | | | | | | | | | | | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | | | | | | | | | | | | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | ____ | Ctrl | Bksp | Del | |Enter |Space | Alt | ____ | + * | | |Shift |Raise | | Gui |Lower | | | + * `---------------------------' `---------------------------' + */ +[_ADJUST] = LAYOUT_split_3x6_4( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS +) + +}; + +const uint16_t PROGMEM encoder_keymaps[][2][2] = { + [_QWERTY] = { { C(S(KC_TAB)), C(KC_TAB) }, { KC_PGDN, KC_PGUP } }, + [_LOWER] = { { C(KC_LEFT), C(KC_RGHT) }, { KC__VOLDOWN, KC__VOLUP } }, + [_RAISE] = { { KC_TRNS, KC_TRNS }, { G(KC_TAB), G(S(KC_TAB)) } }, + [_ADJUST] = { { KC_TRNS, KC_TRNS }, { KC_TRNS, KC_TRNS } }, +}; +// clang-format on + +layer_state_t layer_state_set_user(layer_state_t state) { + torn_set_led(0, IS_LAYER_ON_STATE(state, _RAISE)); + torn_set_led(1, IS_LAYER_ON_STATE(state, _LOWER)); + return state; +} diff --git a/keyboards/torn/keymaps/via/keymap.c b/keyboards/torn/keymaps/via/keymap.c new file mode 100644 index 000000000000..7c91325bdc30 --- /dev/null +++ b/keyboards/torn/keymaps/via/keymap.c @@ -0,0 +1,119 @@ +/* Copyright 2020 Richard Titmuss (richard.titmuss@gmail.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 + +enum torn_layers { _QWERTY, _LOWER, _RAISE, _ADJUST }; + +#define S_BSPC LSFT_T(KC_BSPC) +#define R_DEL LT(_RAISE, KC_DEL) +#define G_ENT LGUI_T(KC_ENT) +#define L_SPC LT(_LOWER, KC_SPC) + +// clang-format off +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +/* Qwerty + * ,-----------------------------------------. ,-----------------------------------------. + * | Tab | 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 | , | . | / | ] | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | ____ | Ctrl | Bksp | Del | |Enter |Space | Alt | ____ | + * | | |Shift |Raise | | Gui |Lower | | | + * `---------------------------' `---------------------------' + */ +[_QWERTY] = LAYOUT_split_3x6_4( + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_QUOT, + KC_GRV, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_LBRC, + KC_BSLS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RBRC , + _______, KC_LCTL, S_BSPC, R_DEL, G_ENT, L_SPC, KC_RALT, _______ +), + +/* Lower + * ,-----------------------------------------. ,-----------------------------------------. + * | Esc | ! | @ | # | $ | % | | ^ | & | * | ( | ) | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | = | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | - | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | _ | | | | | | | | | , | . | / | + | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | ____ | Ctrl | Bksp | Del | |Enter |Space | Alt | ____ | + * | | |Shift |Raise | | Gui |Lower | | | + * `---------------------------' `---------------------------' + */ +[_LOWER] = LAYOUT_split_3x6_4( + KC_ESC, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, _______, + KC_EQL, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_PMNS, + KC_UNDS, _______, _______, _______, _______, _______, _______, _______, KC_COMM, KC_DOT, KC_SLSH, KC_PPLS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS +), + +/* Raise + * ,-----------------------------------------. ,-----------------------------------------. + * | | F1 | F2 | F3 | F4 | F5 | | | & | * | ( | ) | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | F6 | F7 | F8 | F9 | F10 | | Home | Left | Down | Right| End | PgUp | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | F11 | F12 | | | | | | | | | | PgDn | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | ____ | Ctrl | Bksp | Del | |Enter |Space | Alt | ____ | + * | | |Shift |Raise | | Gui |Lower | | | + * `---------------------------' `---------------------------' + */ +[_RAISE] = LAYOUT_split_3x6_4( + _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, _______, S(A(KC_LEFT)), KC_UP, S(A(KC_RGHT)), _______, _______, + _______, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_HOME, KC_LEFT, KC_DOWN, KC_RGHT, KC_END, KC_PGUP, + _______, KC_F11, KC_F12, _______, _______, _______, A(KC_BSPC), A(KC_LEFT), S(KC_DOWN), A(KC_RGHT), _______, KC_PGDN , + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS +), + +/* Adjust (Lower + Raise) + * ,-----------------------------------------. ,-----------------------------------------. + * | | | | | | | | | | | | | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | | | | | | | | | | | | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | | | | | | | | | | | | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | ____ | Ctrl | Bksp | Del | |Enter |Space | Alt | ____ | + * | | |Shift |Raise | | Gui |Lower | | | + * `---------------------------' `---------------------------' + */ +[_ADJUST] = LAYOUT_split_3x6_4( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS +) + +}; + +const uint16_t PROGMEM encoder_keymaps[][2][2] = { + [_QWERTY] = { { C(S(KC_TAB)), C(KC_TAB) }, { KC_PGDN, KC_PGUP } }, + [_LOWER] = { { C(KC_LEFT), C(KC_RGHT) }, { KC__VOLDOWN, KC__VOLUP } }, + [_RAISE] = { { KC_TRNS, KC_TRNS }, { G(KC_TAB), G(S(KC_TAB)) } }, + [_ADJUST] = { { KC_TRNS, KC_TRNS }, { KC_TRNS, KC_TRNS } }, +}; +// clang-format on + +layer_state_t layer_state_set_user(layer_state_t state) { + torn_set_led(0, IS_LAYER_ON_STATE(state, _RAISE)); + torn_set_led(1, IS_LAYER_ON_STATE(state, _LOWER)); + return state; +} diff --git a/keyboards/torn/keymaps/via/rules.mk b/keyboards/torn/keymaps/via/rules.mk new file mode 100644 index 000000000000..36b7ba9cbc98 --- /dev/null +++ b/keyboards/torn/keymaps/via/rules.mk @@ -0,0 +1,2 @@ +VIA_ENABLE = yes +LTO_ENABLE = yes diff --git a/keyboards/torn/matrix.c b/keyboards/torn/matrix.c new file mode 100644 index 000000000000..dd7fa1e2e1c3 --- /dev/null +++ b/keyboards/torn/matrix.c @@ -0,0 +1,113 @@ +/* + * Copyright 2020 Richard Titmuss (richard.titmuss@gmail.com) + * 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 QMK_KEYBOARD_H +#include "mcp23018.h" + +#define SPLIT_MATRIX_COLS (MATRIX_COLS / 2) +#define SECONDARY_ROW_OFFSET (MATRIX_ROWS / 2) + +typedef uint16_t mcp23018_pin_t; + +static const pin_t row_pins[MATRIX_ROWS] = MATRIX_ROW_PINS; +static const pin_t col_pins[SPLIT_MATRIX_COLS] = MATRIX_COL_PINS; +static const mcp23018_pin_t secondary_row_pins[MATRIX_ROWS] = SECONDARY_ROW_PINS; +static const mcp23018_pin_t secondary_col_pins[SPLIT_MATRIX_COLS] = SECONDARY_COL_PINS; + +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 select_secondary_row(uint8_t row) { + uint8_t gpioa = 0xFF & ~secondary_row_pins[row]; + mcp23018_writeReg(GPIOA, &gpioa, 1); +} + +static void init_pins(void) { + unselect_rows(); + for (uint8_t x = 0; x < SPLIT_MATRIX_COLS; x++) { + setPinInputHigh(col_pins[x]); + } +} + +static matrix_row_t read_cols(void) { + matrix_row_t state = 0; + + // For each col... + for (uint8_t col_index = 0; col_index < SPLIT_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 + state |= pin_state ? 0 : (MATRIX_ROW_SHIFTER << col_index); + } + + return state; +} + +static matrix_row_t read_secondary_cols(void) { + matrix_row_t state = 0; + + uint8_t mcp23018_pin_state[2]; + if (mcp23018_readReg(GPIOA, mcp23018_pin_state, 2)) { + return 0; + } + + uint16_t pins = mcp23018_pin_state[0] | (mcp23018_pin_state[1] << 8); + + for (uint8_t col_index = 0; col_index < SPLIT_MATRIX_COLS; col_index++) { + uint16_t pin_state = pins & (secondary_col_pins[col_index]); + state |= pin_state ? 0 : (MATRIX_ROW_SHIFTER << col_index); + } + + return state; +} + +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]; + + select_row(current_row); + select_secondary_row(current_row); + + current_matrix[current_row] = read_cols() | (read_secondary_cols() << 6); + + unselect_row(current_row); + + return (last_row_value != current_matrix[current_row]); +} + +void matrix_init_custom(void) { init_pins(); } + +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); + } + + return changed; +} diff --git a/keyboards/torn/mcp23018.c b/keyboards/torn/mcp23018.c new file mode 100644 index 000000000000..c180f1dae5a3 --- /dev/null +++ b/keyboards/torn/mcp23018.c @@ -0,0 +1,63 @@ +/* + * Copyright 2020 Richard Titmuss (richard.titmuss@gmail.com) + * 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 QMK_KEYBOARD_H +#include "i2c_master.h" +#include "mcp23018.h" + +#define MCP23018_ADDR 0b0100000 + +#define MCP23018_TIMEOUT 100 + +static i2c_status_t mcp23018_status = I2C_STATUS_ERROR; + +void msp23018_init(void) { + mcp23018_status = I2C_STATUS_SUCCESS; + + // Set pin direction + uint8_t iodir[] = {0b00001111, 0b11111111}; + mcp23018_writeReg(IODIRA, iodir, 2); + + // Set pull-up + uint8_t gppu[] = {0b00001111, 0b11111000}; + mcp23018_writeReg(GPPUA, gppu, 2); + + // LEDs output high + uint8_t gpio[] = {0b00000000, 0b00000111}; + mcp23018_writeReg(GPIOA, gpio, 2); +} + +bool mcp23018_reset_required(void) { return mcp23018_status != I2C_STATUS_SUCCESS; } + +i2c_status_t mcp23018_writeReg(uint8_t regaddr, const uint8_t* data, uint16_t length) { + if (mcp23018_status) { + return mcp23018_status; + } + + mcp23018_status = i2c_writeReg((MCP23018_ADDR << 1), regaddr, data, length, MCP23018_TIMEOUT); + return mcp23018_status; +} + +i2c_status_t mcp23018_readReg(uint8_t regaddr, uint8_t* data, uint16_t length) { + if (mcp23018_status) { + return mcp23018_status; + } + + mcp23018_status = i2c_readReg((MCP23018_ADDR << 1), regaddr, data, length, MCP23018_TIMEOUT); + return mcp23018_status; +} diff --git a/keyboards/torn/mcp23018.h b/keyboards/torn/mcp23018.h new file mode 100644 index 000000000000..17ecaa5a7c3b --- /dev/null +++ b/keyboards/torn/mcp23018.h @@ -0,0 +1,32 @@ +/* + * Copyright 2020 Richard Titmuss (richard.titmuss@gmail.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 + +#define IODIRA 0x00 +#define IODIRB 0x01 +#define GPPUA 0x0C +#define GPPUB 0x0D +#define GPIOA 0x12 +#define GPIOB 0x13 + +typedef int16_t mcp23018_status_t; + +void msp23018_init(void); +bool mcp23018_reset_required(void); +mcp23018_status_t mcp23018_writeReg(uint8_t regaddr, const uint8_t* data, uint16_t length); +mcp23018_status_t mcp23018_readReg(uint8_t regaddr, uint8_t* data, uint16_t length); diff --git a/keyboards/torn/readme.md b/keyboards/torn/readme.md new file mode 100644 index 000000000000..ffe9a2d9c2b7 --- /dev/null +++ b/keyboards/torn/readme.md @@ -0,0 +1,21 @@ +# TORN// Split Through Hole + +![torn](https://raw.githubusercontent.com/rtitmuss/torn/master/doc/img/torn.jpg) + +The split keyboard kit made by through hole components only. + +The design has been inspired by the Corne, Plaid and Discipline keyboards. + +* Keyboard Maintainer: [rtitmuss](https://github.com/rtitmuss) +* Hardware Supported: TORN, atmega328p +* Hardware Availability: [GitHub](https://github.com/rtitmuss/torn) + +Make example for this keyboard (after setting up your build environment): + + make torn:default + +Flashing example for this keyboard: + + make torn: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). diff --git a/keyboards/torn/rules.mk b/keyboards/torn/rules.mk new file mode 100644 index 000000000000..caf544d1370c --- /dev/null +++ b/keyboards/torn/rules.mk @@ -0,0 +1,27 @@ +# MCU name +MCU = atmega328p + +# Bootloader selection +BOOTLOADER = USBasp + +# 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 +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +ENCODER_ENABLE = yes # Enable rotary encoder +OLED_DRIVER_ENABLE = yes +CUSTOM_MATRIX = lite + +SRC += matrix.c \ + mcp23018.c \ + torn_encoder.c \ + torn_oled.c +QUANTUM_LIB_SRC += i2c_master.c diff --git a/keyboards/torn/torn.c b/keyboards/torn/torn.c new file mode 100644 index 000000000000..ef5060e6028b --- /dev/null +++ b/keyboards/torn/torn.c @@ -0,0 +1,50 @@ +/* + * Copyright 2020 Richard Titmuss + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#include "torn.h" +#include "i2c_master.h" +#include "mcp23018.h" + +static uint8_t led_state[3] = {1, 1, 1}; + +void matrix_init_kb(void) { + // put your keyboard start-up code here + // runs once when the firmware starts up + i2c_init(); + + matrix_init_user(); +} + +void matrix_scan_kb(void) { + // put your looping keyboard code here + // runs every cycle (a lot) + if (mcp23018_reset_required()) { + msp23018_init(); + secondary_encoder_init(); + // torn_set_led(2, 1); + } + + matrix_scan_user(); + secondary_encoder_read(); +} + +void torn_set_led(uint8_t led, bool state) { + led_state[led] = !state; + + // toggle leds by setting the pin direction + uint8_t iodir = 0b11111000 | led_state[0] << 2 | led_state[1] << 1 | led_state[2]; + mcp23018_writeReg(IODIRB, &iodir, 1); +} diff --git a/keyboards/torn/torn.h b/keyboards/torn/torn.h new file mode 100644 index 000000000000..c25b5c2a0c29 --- /dev/null +++ b/keyboards/torn/torn.h @@ -0,0 +1,41 @@ +/* + * Copyright 2020 Richard Titmuss + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License 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 + +// clang-format off +#define LAYOUT_split_3x6_4( \ + 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, \ + k32, k33, k34, k35, k36, 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, k1b }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b }, \ + { ___, ___, k32, k33, k34, k35, k36, k37, k38, k39, ___, ___ } \ +} +// clang-format on + +void torn_set_led(uint8_t led, bool on); + +void secondary_encoder_read(void); +void secondary_encoder_init(void); diff --git a/keyboards/torn/torn_encoder.c b/keyboards/torn/torn_encoder.c new file mode 100644 index 000000000000..ef9b0873fb84 --- /dev/null +++ b/keyboards/torn/torn_encoder.c @@ -0,0 +1,86 @@ +/* + * Copyright 2020 Richard Titmuss + * 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 "torn.h" +#include "mcp23018.h" + +#ifndef ENCODER_RESOLUTION +# define ENCODER_RESOLUTION 4 +#endif + +#define ENCODER_CLOCKWISE true +#define ENCODER_COUNTER_CLOCKWISE false + +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 = 0; +static int8_t encoder_pulses = 0; + +extern const uint16_t PROGMEM encoder_keymaps[][2][2]; + +/** + * Tap on encoder updates using the encoder keymap + */ +void encoder_update_kb(uint8_t index, bool clockwise) { + int layer = get_highest_layer(layer_state); + + uint16_t code; + do { + code = pgm_read_word(&encoder_keymaps[layer--][index][clockwise]); + } while (code == KC_TRNS); + + tap_code16(code); +} + +static bool encoder_read_state(uint8_t *state) { + uint8_t mcp23018_pin_state; + mcp23018_status_t status = mcp23018_readReg(GPIOB, &mcp23018_pin_state, 1); + if (status == 0) { + *state = (mcp23018_pin_state & 0b110000) >> 4; + return true; + } + return false; +} + +static void encoder_update(int8_t index, uint8_t state) { + encoder_pulses += encoder_LUT[state & 0xF]; + if (encoder_pulses >= ENCODER_RESOLUTION) { + encoder_update_kb(index, ENCODER_CLOCKWISE); + } + if (encoder_pulses <= -ENCODER_RESOLUTION) { // direction is arbitrary here, but this clockwise + encoder_update_kb(index, ENCODER_COUNTER_CLOCKWISE); + } + encoder_pulses %= ENCODER_RESOLUTION; +} + +/** + * Read the secondary encoder over i2c + */ +void secondary_encoder_read(void) { + uint8_t state; + if (encoder_read_state(&state)) { + encoder_state <<= 2; + encoder_state |= state; + encoder_update(1, encoder_state); + } +} + +/** + * Initialize the secondary encoder over i2c + */ +void secondary_encoder_init(void) { encoder_read_state(&encoder_state); } diff --git a/keyboards/torn/torn_oled.c b/keyboards/torn/torn_oled.c new file mode 100644 index 000000000000..834abf96ceb1 --- /dev/null +++ b/keyboards/torn/torn_oled.c @@ -0,0 +1,63 @@ +/* + * Copyright 2020 Richard Titmuss + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public 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 + +#ifdef OLED_DRIVER_ENABLE + +// clang-format off +__attribute__((weak)) +void oled_task_user(void) { + static const char PROGMEM torn_logo[] = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, 0xf8, 0x98, 0x98, 0x98, 0x98, 0x98, 0x18, 0x18, 0x98, + 0x98, 0x98, 0x98, 0x98, 0xf8, 0xf8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x80, 0xc0, 0x60, 0x30, 0x30, 0x18, 0x98, 0x98, 0x98, 0x98, 0x98, 0x98, 0x98, + 0x18, 0x30, 0x30, 0x60, 0xc0, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0xf8, 0xf8, 0x18, 0x18, 0x98, 0x98, 0x98, 0x98, 0x98, 0x98, 0x18, 0x38, + 0x70, 0xe0, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xf8, 0xf8, 0x38, 0x70, 0xe0, 0xc0, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xf8, 0xf8, 0x18, 0x18, 0xf8, 0xf8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0xff, 0xff, 0x00, 0x00, 0xff, + 0xff, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xf8, 0xfe, 0x07, 0x01, 0xf0, 0xfc, 0x0e, 0x03, 0x03, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, + 0x03, 0x03, 0x0e, 0xfc, 0xf0, 0x01, 0x07, 0xfe, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, 0xc1, 0xc1, 0xc1, 0x63, 0x3f, 0x1c, + 0xc0, 0xe1, 0x7f, 0x1e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xff, 0xff, 0x00, 0x00, 0xf8, 0xf1, 0xe3, 0xc7, 0x8e, 0x1c, 0x38, 0x70, 0xe0, 0xc0, 0x80, 0x00, + 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0xff, + 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x0f, 0x3f, 0x70, 0xc0, 0x87, 0x1f, 0x38, 0x60, 0x60, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0x60, 0x60, 0x38, 0x1f, 0x87, 0xc0, 0xf0, 0x7f, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0xfe, 0xfe, 0x0e, 0x3c, 0x78, 0xe2, 0xc7, 0x1f, + 0x39, 0xe0, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, 0x00, 0x01, 0x03, 0x07, 0x0e, 0x1c, 0x38, 0x71, 0xe3, 0xc7, + 0x8f, 0x1f, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x0f, 0x0c, 0x0c, 0x0f, + 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x01, 0x03, 0x06, 0x06, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, + 0x0c, 0x06, 0x06, 0x03, 0x03, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x0f, 0x0f, 0x0c, 0x0c, 0x0f, 0x0f, 0x00, 0x00, 0x00, 0x01, 0x07, 0x0f, + 0x0c, 0x0c, 0x0f, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x0f, 0x0f, 0x0c, 0x0c, 0x0f, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, + 0x03, 0x07, 0x0e, 0x0c, 0x0f, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }; + + oled_write_raw_P(torn_logo, sizeof(torn_logo)); +} +// clang-format on + +#endif From ed2ba645c05fe3a0b8dcf5ac8be4ec2426c4917c Mon Sep 17 00:00:00 2001 From: muuko <39163197+muuko@users.noreply.github.com> Date: Sat, 19 Sep 2020 22:07:50 -0400 Subject: [PATCH 822/930] [Keymap] Add lily58/muuko keymap (#10355) * lily58 layout with working bongo cat timeout * lily58 layout with working bongo cat timeout * spacing * spacing * spacing * spacing * spacing * layout * spacing * keymap * keymap * spacing * keymap * spacing * Update keyboards/lily58/keymaps/muuko/config.h Co-authored-by: Drashna Jaelre * Update keyboards/lily58/keymaps/muuko/rules.mk Co-authored-by: Drashna Jaelre * review * spacing * remove unnecessary func * changed proximity of layer button Co-authored-by: Drashna Jaelre --- keyboards/lily58/keymaps/muuko/config.h | 42 ++++++ keyboards/lily58/keymaps/muuko/keymap.c | 184 ++++++++++++++++++++++++ keyboards/lily58/keymaps/muuko/rules.mk | 4 + 3 files changed, 230 insertions(+) create mode 100644 keyboards/lily58/keymaps/muuko/config.h create mode 100644 keyboards/lily58/keymaps/muuko/keymap.c create mode 100644 keyboards/lily58/keymaps/muuko/rules.mk diff --git a/keyboards/lily58/keymaps/muuko/config.h b/keyboards/lily58/keymaps/muuko/config.h new file mode 100644 index 000000000000..e963355bd5c9 --- /dev/null +++ b/keyboards/lily58/keymaps/muuko/config.h @@ -0,0 +1,42 @@ +/* +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 EE_HANDS +#define USE_SERIAL_PD2 + +#define OLED_TIMEOUT 300000 + +#define NO_MUSIC_MODE + +#define PERMISSIVE_HOLD +#define IGNORE_MOD_TAP_INTERRUPT + +#ifdef TAPPING_TERM +#undef TAPPING_TERM +#endif +#define TAPPING_TERM 120 + +#ifdef COMBO_COUNT +#undef COMBO_COUNT +#endif +#define COMBO_COUNT 2 +#define COMBO_TERM 20 diff --git a/keyboards/lily58/keymaps/muuko/keymap.c b/keyboards/lily58/keymaps/muuko/keymap.c new file mode 100644 index 000000000000..b8afa0aa4c49 --- /dev/null +++ b/keyboards/lily58/keymaps/muuko/keymap.c @@ -0,0 +1,184 @@ +/* Copyright 2020 @muuko + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public 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 +#include + +#define IDLE_FRAMES 5 +#define IDLE_SPEED 20 +#define TAP_FRAMES 2 +#define TAP_SPEED 40 +#define ANIM_FRAME_DURATION 200 +#define ANIM_SIZE 512 + +char wpm[16]; +uint32_t anim_timer = 0; +uint32_t anim_sleep = 0; +uint8_t current_idle_frame = 0; +uint8_t current_tap_frame = 0; + +static long int oled_timeout = 300000; + +enum combos { ESCAPE_COMBO, DELETE_COMBO }; +const uint16_t PROGMEM escape_combo[] = { KC_GRV, KC_1, COMBO_END }; +const uint16_t PROGMEM delete_combo[] = { KC_DOT, KC_SLSH, COMBO_END }; +combo_t key_combos[COMBO_COUNT] = { + [ESCAPE_COMBO] = COMBO(escape_combo, KC_ESC), + [DELETE_COMBO] = COMBO(delete_combo, KC_DEL) +}; + +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, LCA_T(KC_MINS), + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, RGUI_T(KC_EQL), + KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, RCTL_T(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, RSFT_T(KC_BSLS), + KC_LGUI, KC_LALT, LT(1, KC_DEL), KC_SPC, KC_ENT, KC_BSPC, MO(1), TG(1) + ), + [1] = 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_TAB, KC_MNXT, KC_HOME, KC_UP, KC_PGUP, KC_VOLU, KC_PMNS, KC_P7, KC_P8, KC_P9, KC_PSLS, LCTL(KC_RGUI), + KC_LCTL, KC_MPLY, KC_LEFT, KC_DOWN, KC_RGHT, KC_VOLD, KC_PPLS, KC_P4, KC_P5, KC_P6, KC_PAST, RCTL_T(KC_PEQL), + KC_LSFT, KC_MPRV, KC_END, KC_DEL, KC_PGDN, KC_MUTE, KC_LPRN, KC_RPRN, KC_P0, KC_P1, KC_P2, KC_P3, C_S_T(KC_PDOT), KC_RSFT, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ) +}; + +#ifdef OLED_DRIVER_ENABLE +oled_rotation_t oled_init_user(oled_rotation_t rotation) { + if (!is_keyboard_master()) return OLED_ROTATION_180; + else return rotation; +} + +static void render_status(void) { + oled_write_P(PSTR(" layer "), false); + + switch (get_highest_layer(layer_state)) { + case 0: + oled_write_P(PSTR(" 0"), false); + break; + case 1: + oled_write_P(PSTR(" 1"), false); + break; + default: + oled_write_P(PSTR(" ?"), false); + break; + } + + oled_write_P(PSTR("\n\n "), false); + sprintf(wpm, "%03d", get_current_wpm()); + oled_write(wpm, false); + oled_write_P(PSTR(" wpm"), false); +} + +static void render_anim(void) { + static const char PROGMEM idle[IDLE_FRAMES][ANIM_SIZE] = { + { + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,128,64,64,32,32,32,32,16,16,16,16,16,8,8,4,4,4,8,48,64,128,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,128,128,128,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,24,100,130,2,2,2,2,2,1,0,0,0,0,128,128,0,0,0,0,0,0,0,0,0,128,0,48,48,0,192,193,193,194,4,8,16,32,64,128,0,0,0,128,128,128,128,64,64, + 64,64,32,32,32,32,16,16,16,16,8,8,8,8,8,4,4,4,4,4,2,2,2,2,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,0,0,0,0,0,0,0,0,0,0,0,0,0,0,192,56,4,3,0,0,0,0,0,0,0,12,12,12,13,1,0,64,160,33,34,18,17,17,17,9,8,8,8,8,4,4,8,8,16,16,16,16,16,17,15,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,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,128,128,128,128,128,64,64,64,64,64,32,32,32,32,32,16,16,16,16,16,8,8,8,8,8,4,4,4,4,4,2,3,2,2,1,1,1,1,1,1,2,2,4,4,8,8,8,8,8,7, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 + }, + { + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,128,64,64,32,32,32,32,16,16,16,16,16,8,8,4,4,4,8,48,64,128,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,128,128,128,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,24,100,130,2,2,2,2,2,1,0,0,0,0,128,128,0,0,0,0,0,0,0,0,0,128,0,48,48,0,192,193,193,194,4,8,16,32,64,128,0,0,0,128,128,128,128,64,64, + 64,64,32,32,32,32,16,16,16,16,8,8,8,8,8,4,4,4,4,4,2,2,2,2,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,0,0,0,0,0,0,0,0,0,0,0,0,0,0,192,56,4,3,0,0,0,0,0,0,0,12,12,12,13,1,0,64,160,33,34,18,17,17,17,9,8,8,8,8,4,4,8,8,16,16,16,16,16,17,15,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,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,128,128,128,128,128,64,64,64,64,64,32,32,32,32,32,16,16,16,16,16,8,8,8,8,8,4,4,4,4,4,2,3,2,2,1,1,1,1,1,1,2,2,4,4,8,8,8,8,8, + 7,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 + }, + { + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,128,128,64,64,64,64,32,32,32,32,16,8,4,2,2,4,24,96,128,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,128,128,128,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,60,194,1,1,2,2,4,4,2,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,96,96,0,129,130,130,132,8,16,32,64,128,0,0,0,0,128,128,128,128,64,64,64,64,32, + 32,32,32,16,16,16,16,8,8,8,8,8,4,4,4,4,4,2,2,2,2,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,0,0,0,0,0,0,0,0,0,0,0,0,0,0,128,112,25,6,0,0,0,0,0,0,0,24,24,24,27,3,0,64,160,34,36,20,18,18,18,11,8,8,8,8,5,5,9,9,16,16,16,16,16,17,15,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,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,128,128,128,128,128,64,64,64,64,64,32,32,32,32,32,16,16,16,16,16,8,8,8,8,8,4,4,4,4,4,2,3,2,2,1,1,1,1,1,1,2,2,4,4,8,8,8,8,8,7,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 + }, + { + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,128,128,0,0,0,0,0,128,64,64,32,32,32,32,16,16,16,16,8,4,2,1,1,2,12,48,64,128,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,128,128,128,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,30,225,0,0,1,1,2,2,1,0,0,0,0,128,128,0,0,0,0,0,0,0,0,0,128,0,48,48,0,192,193,193,194,4,8,16,32,64,128,0,0,0,128,128,128,128,64,64, + 64,64,32,32,32,32,16,16,16,16,8,8,8,8,8,4,4,4,4,4,2,2,2,2,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,0,0,0,0,0,0,0,0,0,0,0,0,0,0,128,112,12,3,0,0,0,0,0,0,0,12,12,12,13,1,0,64,160,33,34,18,17,17,17,9,8,8,8,8,4,4,8,8,16,16,16,16,16,17,15,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,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,128,128,128,128,128,64,64,64,64,64,32,32,32,32,32,16,16,16,16,16,8,8,8,8,8,4,4,4,4,4,2,3,2,2,1,1,1,1,1,1,2,2,4,4,8,8,8,8,8, + 7,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 + }, + { + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,128,64,64,32,32,32,32,16,16,16,16,8,8,4,2,2,2,4,56,64,128,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,128,128,128,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,28,226,1,1,2,2,2,2,1,0,0,0,0,128,128,0,0,0,0,0,0,0,0,0,128,0,48,48,0,192,193,193,194,4,8,16,32,64,128,0,0,0,128,128,128,128,64,64,64,64, + 32,32,32,32,16,16,16,16,8,8,8,8,8,4,4,4,4,4,2,2,2,2,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,0,0,0,0,0,0,0,0,0,0,0,0,0,0,128,112,12,3,0,0,0,0,0,0,0,12,12,12,13,1,0,64,160,33,34,18,17,17,17,9,8,8,8,8,4,4,8,8,16,16,16,16,16,17,15,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,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,128,128,128,128,128,64,64,64,64,64,32,32,32,32,32,16,16,16,16,16,8,8,8,8,8,4,4,4,4,4,2,3,2,2,1,1,1,1,1,1,2,2,4,4,8,8,8,8,8,7,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 + } + }; + static const char PROGMEM prep[][ANIM_SIZE] = { + { + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,128,128,0,0,0,0,0,128,64,64,32,32,32,32,16,16,16,16,8,4,2,1,1,2,12,48,64,128,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,128,128,128,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,30,225,0,0,1,1,2,2,129,128,128,0,0,128,128,0,0,0,0,0,0,0,0,0,128,0,48,48,0,0,1,225,26,6,9,49,53,1,138,124,0,0,128,128,128,128,64,64, + 64,64,32,32,32,32,16,16,16,16,8,8,8,8,8,4,4,4,4,4,2,2,2,2,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,0,0,0,0,0,0,0,0,0,0,0,0,0,0,128,112,12,3,0,0,24,6,5,152,153,132,195,124,65,65,64,64,32,33,34,18,17,17,17,9,8,8,8,8,4,4,4,4,4,4,2,2,2,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,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,128,128,128,128,128,64,64,64,64,64,32,32,32,32,32,16,16,16,16,16,8,8,8,8,8,4,4,4,4,4,2,3,2,2,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,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 + } + }; + static const char PROGMEM tap[TAP_FRAMES][ANIM_SIZE] = { + { + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,128,128,0,0,0,0,0,128,64,64,32,32,32,32,16,16,16,16,8,4,2,1,1,2,12,48,64,128,0,0,0,0,0,0,0,248,248,248,248,0,0,0,0,0,128,128,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,128,128,128,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,30,225,0,0,1,1,2,2,129,128,128,0,0,128,128,0,0,0,0,0,0,0,0,0,128,0,48,48,0,0,1,1,2,4,8,16,32,67,135,7,1,0,184,188,190,159, + 95,95,79,76,32,32,32,32,16,16,16,16,8,8,8,8,8,4,4,4,4,4,2,2,2,2,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,0,0,0,0,0,0,0,0,0,0,0,0,0,0,128,112,12,3,0,0,24,6,5,152,153,132,67,124,65,65,64,64,32,33,34,18,17,17,17,9,8,8,8,8,4,4,8,8,16,16,16,16,16,17,15,1,61,124,252,252,252,252,252,60,12,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,128,128,128,128,128,64,64,64,64,64,32,32,32,32,32,16,16,16,16,16,8,8,8,8,8,4,4,4,4,4,2,3,2,2,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,1,3,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 + }, + { + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,128,128,0,0,0,0,0,128,64,64,32,32,32,32,16,16,16,16,8,4,2,1,1,2,12,48,64,128,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,128,128,128,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,30,225,0,0,1,1,2,2,1,0,0,0,0,128,128,0,0,0,0,0,0,0,0,0,128,0,48,48,0,0,1,225,26,6,9,49,53,1,138,124,0,0,128,128,128,128,64,64,64,64,32, + 32,32,32,16,16,16,16,8,8,8,8,8,4,4,4,4,4,2,2,2,2,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,0,0,0,0,0,0,0,0,0,0,0,0,0,0,128,112,12,3,0,0,0,0,0,0,0,0,0,0,1,1,0,64,160,33,34,18,17,17,17,9,8,8,8,8,4,4,4,4,4,4,2,2,2,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,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,128,128,128,128,128,64,64,64,64,64,32,32,32,32,32,16,16,16,16,16,8,8,8,8,8,4,4,4,4,4,2,3,122,122,121,121,121,121,57,49,2,2,4,4,8,8,8,136,136,135,128, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 + } + }; + + void animation_phase(void) { + if (get_current_wpm() <= IDLE_SPEED) { + current_idle_frame = (current_idle_frame + 1) % IDLE_FRAMES; + + oled_write_raw_P(idle[abs((IDLE_FRAMES - 1) - current_idle_frame)], ANIM_SIZE); + } + + if (get_current_wpm() > IDLE_SPEED && get_current_wpm() < TAP_SPEED) { + oled_write_raw_P(prep[0], ANIM_SIZE); + } + + if (get_current_wpm() >= TAP_SPEED) { + current_tap_frame = (current_tap_frame + 1) % TAP_FRAMES; + + oled_write_raw_P(tap[abs((TAP_FRAMES - 1) - current_tap_frame)], ANIM_SIZE); + } + } + + sprintf(wpm, "%03d", get_current_wpm()); + + if (strcmp(wpm, "000") != 0) { + anim_sleep = timer_read32(); + } else { + if (timer_elapsed32(anim_sleep) > oled_timeout) { + anim_sleep = 0; + } + } + + if (timer_elapsed32(anim_sleep) > oled_timeout) { + oled_off(); + } else { + oled_on(); + + if (timer_elapsed32(anim_timer) > ANIM_FRAME_DURATION) { + anim_timer = timer_read32(); + + animation_phase(); + } + } +} + +void oled_task_user(void) { + if (is_keyboard_master()) { + render_status(); + } else { + render_anim(); + } +} +#endif diff --git a/keyboards/lily58/keymaps/muuko/rules.mk b/keyboards/lily58/keymaps/muuko/rules.mk new file mode 100644 index 000000000000..3f958dff35b0 --- /dev/null +++ b/keyboards/lily58/keymaps/muuko/rules.mk @@ -0,0 +1,4 @@ +OLED_DRIVER_ENABLE = yes +WPM_ENABLE = yes +EXTRAKEY_ENABLE = yes +COMBO_ENABLE = yes From a2ff3c4d145a528d6b6aaf309b46228f184f0bd5 Mon Sep 17 00:00:00 2001 From: coseyfannitutti <43188488+coseyfannitutti@users.noreply.github.com> Date: Sat, 19 Sep 2020 22:40:15 -0400 Subject: [PATCH 823/930] [Keyboard] add iso compatibility for mysterium rev1.1 pcb (#10348) --- keyboards/coseyfannitutti/mysterium/info.json | 8 ++++- .../keymaps/{tsangan => ansi_7u}/keymap.c | 4 +-- .../mysterium/keymaps/iso/keymap.c | 34 ++++++++++++++++++ .../mysterium/keymaps/via/keymap.c | 34 +++++++++--------- .../mysterium/keymaps/via/rules.mk | 2 -- .../coseyfannitutti/mysterium/mysterium.h | 36 ++++++++++++++++++- 6 files changed, 95 insertions(+), 23 deletions(-) rename keyboards/coseyfannitutti/mysterium/keymaps/{tsangan => ansi_7u}/keymap.c (97%) create mode 100644 keyboards/coseyfannitutti/mysterium/keymaps/iso/keymap.c diff --git a/keyboards/coseyfannitutti/mysterium/info.json b/keyboards/coseyfannitutti/mysterium/info.json index 1b993a2edc66..4c180b7d5f35 100644 --- a/keyboards/coseyfannitutti/mysterium/info.json +++ b/keyboards/coseyfannitutti/mysterium/info.json @@ -8,8 +8,14 @@ "LAYOUT_tkl_ansi": { "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":"PrtSc", "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.25}, {"label":"!", "x":1, "y":1.25}, {"label":"@", "x":2, "y":1.25}, {"label":"#", "x":3, "y":1.25}, {"label":"$", "x":4, "y":1.25}, {"label":"%", "x":5, "y":1.25}, {"label":"^", "x":6, "y":1.25}, {"label":"&", "x":7, "y":1.25}, {"label":"*", "x":8, "y":1.25}, {"label":"(", "x":9, "y":1.25}, {"label":")", "x":10, "y":1.25}, {"label":"_", "x":11, "y":1.25}, {"label":"+", "x":12, "y":1.25}, {"label":"Backspace", "x":13, "y":1.25, "w":2}, {"label":"Insert", "x":15.25, "y":1.25}, {"label":"Home", "x":16.25, "y":1.25}, {"label":"PgUp", "x":17.25, "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":"Delete", "x":15.25, "y":2.25}, {"label":"End", "x":16.25, "y":2.25}, {"label":"PgDn", "x":17.25, "y":2.25}, {"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":"Shift", "x":0, "y":4.25, "w":2.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":2.75}, {"label":"\u2191", "x":16.25, "y":4.25}, {"label":"Ctrl", "x":0, "y":5.25, "w":1.25}, {"label":"Win", "x":1.25, "y":5.25, "w":1.25}, {"label":"Alt", "x":2.5, "y":5.25, "w":1.25}, {"x":3.75, "y":5.25, "w":6.25}, {"label":"Alt", "x":10, "y":5.25, "w":1.25}, {"label":"Menu", "x":11.25, "y":5.25, "w":1.25}, {"label":"Fn", "x":12.5, "y":5.25, "w":1.25}, {"label":"Ctrl", "x":13.75, "y":5.25, "w":1.25}, {"label":"\u2190", "x":15.25, "y":5.25}, {"label":"\u2193", "x":16.25, "y":5.25}, {"label":"\u2192", "x":17.25, "y":5.25}] }, - "LAYOUT_tkl_ansi_tsangan": { + "LAYOUT_tkl_ansi_7u": { "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":"PrtSc", "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.25}, {"label":"!", "x":1, "y":1.25}, {"label":"@", "x":2, "y":1.25}, {"label":"#", "x":3, "y":1.25}, {"label":"$", "x":4, "y":1.25}, {"label":"%", "x":5, "y":1.25}, {"label":"^", "x":6, "y":1.25}, {"label":"&", "x":7, "y":1.25}, {"label":"*", "x":8, "y":1.25}, {"label":"(", "x":9, "y":1.25}, {"label":")", "x":10, "y":1.25}, {"label":"_", "x":11, "y":1.25}, {"label":"+", "x":12, "y":1.25}, {"label":"Backspace", "x":13, "y":1.25, "w":2}, {"label":"Insert", "x":15.25, "y":1.25}, {"label":"Home", "x":16.25, "y":1.25}, {"label":"PgUp", "x":17.25, "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":"Delete", "x":15.25, "y":2.25}, {"label":"End", "x":16.25, "y":2.25}, {"label":"PgDn", "x":17.25, "y":2.25}, {"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":"Shift", "x":0, "y":4.25, "w":2.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":2.75}, {"label":"\u2191", "x":16.25, "y":4.25}, {"label":"Ctrl", "x":0, "y":5.25, "w":1.5}, {"label":"Win", "x":1.5, "y":5.25}, {"label":"Alt", "x":2.5, "y":5.25, "w":1.5}, {"x":4, "y":5.25, "w":7}, {"label":"Alt", "x":11, "y":5.25, "w":1.5}, {"label":"Fn", "x":12.5, "y":5.25}, {"label":"Ctrl", "x":13.5, "y":5.25, "w":1.5}, {"label":"\u2190", "x":15.25, "y":5.25}, {"label":"\u2193", "x":16.25, "y":5.25}, {"label":"\u2192", "x":17.25, "y":5.25}] + }, + "LAYOUT_tkl_iso": { + "layout": [{"x":0, "y":0.25}, {"x":2, "y":0.25}, {"x":3, "y":0.25}, {"x":4, "y":0.25}, {"x":5, "y":0.25}, {"x":6.5, "y":0.25}, {"x":7.5, "y":0.25}, {"x":8.5, "y":0.25}, {"x":9.5, "y":0.25}, {"x":11, "y":0.25}, {"x":12, "y":0.25}, {"x":13, "y":0.25}, {"x":14, "y":0.25}, {"x":15.25, "y":0.25}, {"x":16.25, "y":0.25}, {"x":17.25, "y":0.25}, {"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.75, "y":2.5, "w":1.25, "h":2}, {"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}, {"x":0, "y":4.5, "w":1.25}, {"x":1.25, "y":4.5}, {"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}] + }, + "LAYOUT_tkl_iso_7u": { + "layout": [{"x":0, "y":0.25}, {"x":2, "y":0.25}, {"x":3, "y":0.25}, {"x":4, "y":0.25}, {"x":5, "y":0.25}, {"x":6.5, "y":0.25}, {"x":7.5, "y":0.25}, {"x":8.5, "y":0.25}, {"x":9.5, "y":0.25}, {"x":11, "y":0.25}, {"x":12, "y":0.25}, {"x":13, "y":0.25}, {"x":14, "y":0.25}, {"x":15.25, "y":0.25}, {"x":16.25, "y":0.25}, {"x":17.25, "y":0.25}, {"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.75, "y":2.5, "w":1.25, "h":2}, {"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}, {"x":0, "y":4.5, "w":1.25}, {"x":1.25, "y":4.5}, {"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}] } } } \ No newline at end of file diff --git a/keyboards/coseyfannitutti/mysterium/keymaps/tsangan/keymap.c b/keyboards/coseyfannitutti/mysterium/keymaps/ansi_7u/keymap.c similarity index 97% rename from keyboards/coseyfannitutti/mysterium/keymaps/tsangan/keymap.c rename to keyboards/coseyfannitutti/mysterium/keymaps/ansi_7u/keymap.c index 883de97ffb1b..35487eee551c 100644 --- a/keyboards/coseyfannitutti/mysterium/keymaps/tsangan/keymap.c +++ b/keyboards/coseyfannitutti/mysterium/keymaps/ansi_7u/keymap.c @@ -16,7 +16,7 @@ #include QMK_KEYBOARD_H const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [0] = LAYOUT_tkl_ansi_tsangan( + [0] = LAYOUT_tkl_ansi_7u( 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_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, @@ -24,7 +24,7 @@ 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_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RIGHT), - [1] = LAYOUT_tkl_ansi_tsangan( + [1] = LAYOUT_tkl_ansi_7u( KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,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, diff --git a/keyboards/coseyfannitutti/mysterium/keymaps/iso/keymap.c b/keyboards/coseyfannitutti/mysterium/keymaps/iso/keymap.c new file mode 100644 index 000000000000..bad4dc2f42e6 --- /dev/null +++ b/keyboards/coseyfannitutti/mysterium/keymaps/iso/keymap.c @@ -0,0 +1,34 @@ +/* Copyright 2019 COSEYFANNITUTTI + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public 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_iso( + 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_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_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_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, MO(1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RIGHT), + + [1] = LAYOUT_tkl_iso( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,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_VOLU, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_VOLD, KC_TRNS) +}; diff --git a/keyboards/coseyfannitutti/mysterium/keymaps/via/keymap.c b/keyboards/coseyfannitutti/mysterium/keymaps/via/keymap.c index bd8de69a04a8..f7baaea8fc26 100644 --- a/keyboards/coseyfannitutti/mysterium/keymaps/via/keymap.c +++ b/keyboards/coseyfannitutti/mysterium/keymaps/via/keymap.c @@ -16,35 +16,35 @@ #include QMK_KEYBOARD_H const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [0] = LAYOUT_tkl_ansi( + [0] = LAYOUT_tkl_iso( 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_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_RIGHT), + KC_TAB, KC_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_ENT, KC_BSLS, + 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, MO(1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RIGHT), - [1] = LAYOUT_tkl_ansi( + [1] = LAYOUT_tkl_iso( KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,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_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_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_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, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_VOLD, KC_TRNS), - [2] = LAYOUT_tkl_ansi( + [2] = LAYOUT_tkl_iso( KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 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_tkl_ansi( + [3] = LAYOUT_tkl_iso( KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 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/coseyfannitutti/mysterium/keymaps/via/rules.mk b/keyboards/coseyfannitutti/mysterium/keymaps/via/rules.mk index d0e4977b849b..36b7ba9cbc98 100644 --- a/keyboards/coseyfannitutti/mysterium/keymaps/via/rules.mk +++ b/keyboards/coseyfannitutti/mysterium/keymaps/via/rules.mk @@ -1,4 +1,2 @@ VIA_ENABLE = yes LTO_ENABLE = yes -EXTRAKEY_ENABLE = no -MOUSEKEY_ENABLE = no \ No newline at end of file diff --git a/keyboards/coseyfannitutti/mysterium/mysterium.h b/keyboards/coseyfannitutti/mysterium/mysterium.h index c5deacd833c3..b705f04c0d4c 100644 --- a/keyboards/coseyfannitutti/mysterium/mysterium.h +++ b/keyboards/coseyfannitutti/mysterium/mysterium.h @@ -37,7 +37,7 @@ { K50, K51, K52, _x_, _x_, _x_, K56, _x_, _x_, K59, K5A, _x_, K5C, _x_, K5E, K5F, K5G, K5H } \ } -#define LAYOUT_tkl_ansi_tsangan( \ +#define LAYOUT_tkl_ansi_7u( \ K00, K02, K03, K04, K05, K06, K07, K08, K09, K0B, K0C, K0D, K0E, K0F, K0G, K0H, \ K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1F, K1G, K1H, \ K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, K2F, K2G, K2H, \ @@ -53,3 +53,37 @@ { K40, K41, K42, K43, K44, K45, K46, K47, K48, K49, K4A, _x_, _x_, K4D, _x_, _x_, K4G, _x_ }, \ { K50, K51, K52, _x_, _x_, _x_, K56, _x_, _x_, _x_, K5A, _x_, K5C, _x_, K5E, K5F, K5G, K5H } \ } + +#define LAYOUT_tkl_iso( \ + K00, K02, K03, K04, K05, K06, K07, K08, K09, K0B, K0C, K0D, K0E, K0F, K0G, K0H, \ + K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1F, K1G, K1H, \ + K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2F, K2G, K2H, \ + K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3D, K2D, \ + K40, K01, K41, K42, K43, K44, K45, K46, K47, K48, K49, K4A, K4D, K4G, \ + K50, K51, K52, K56, K59, K5A, K5C, K5E, K5F, K5G, K5H \ +) \ +{ \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, _x_, K0B, K0C, K0D, K0E, K0F, K0G, K0H }, \ + { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, _x_, K1F, K1G, K1H }, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, _x_, K2F, K2G, K2H }, \ + { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, _x_, K3D, _x_, _x_, _x_, _x_ }, \ + { K40, K41, K42, K43, K44, K45, K46, K47, K48, K49, K4A, _x_, _x_, K4D, _x_, _x_, K4G, _x_ }, \ + { K50, K51, K52, _x_, _x_, _x_, K56, _x_, _x_, K59, K5A, _x_, K5C, _x_, K5E, K5F, K5G, K5H } \ +} + +#define LAYOUT_tkl_iso_7u( \ + K00, K02, K03, K04, K05, K06, K07, K08, K09, K0B, K0C, K0D, K0E, K0F, K0G, K0H, \ + K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1F, K1G, K1H, \ + K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2F, K2G, K2H, \ + K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3D, K2D, \ + K40, K01, K41, K42, K43, K44, K45, K46, K47, K48, K49, K4A, K4D, K4G, \ + K50, K51, K52, K56, K5A, K5C, K5E, K5F, K5G, K5H \ +) \ +{ \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, _x_, K0B, K0C, K0D, K0E, K0F, K0G, K0H }, \ + { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, _x_, K1F, K1G, K1H }, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, _x_, K2F, K2G, K2H }, \ + { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, _x_, K3D, _x_, _x_, _x_, _x_ }, \ + { K40, K41, K42, K43, K44, K45, K46, K47, K48, K49, K4A, _x_, _x_, K4D, _x_, _x_, K4G, _x_ }, \ + { K50, K51, K52, _x_, _x_, _x_, K56, _x_, _x_, _x_, K5A, _x_, K5C, _x_, K5E, K5F, K5G, K5H } \ +} From fb4a6ad30ea7a648acd59793ed4a30c3a8d8dc32 Mon Sep 17 00:00:00 2001 From: James Young <18669334+noroadsleft@users.noreply.github.com> Date: Sat, 19 Sep 2020 23:37:31 -0700 Subject: [PATCH 824/930] KBD67 MkII Soldered: ISO layout patches (#10367) * KBD67 MkII Soldered: Fix ISO blocker layout Matrix data was wrong; KC_NUHS key did not work. * KBD67 MkII Soldered: Add ISO blocker with Split Backspace layout --- .../kbdfans/kbd67/mkii_soldered/info.json | 72 +++++++++++++++++++ .../kbd67/mkii_soldered/mkii_soldered.h | 21 +++++- 2 files changed, 90 insertions(+), 3 deletions(-) diff --git a/keyboards/kbdfans/kbd67/mkii_soldered/info.json b/keyboards/kbdfans/kbd67/mkii_soldered/info.json index 72c851e35af9..cb012517aa39 100644 --- a/keyboards/kbdfans/kbd67/mkii_soldered/info.json +++ b/keyboards/kbdfans/kbd67/mkii_soldered/info.json @@ -290,6 +290,78 @@ {"label":"\u2193", "x":14, "y":4}, {"label":"\u2192", "x":15, "y":4} ] + }, + "LAYOUT_65_iso_blocker_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":"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":"End", "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":"PgUp", "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":"\u2191", "x":14, "y":3}, + {"label":"PgDn", "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":"Ctrl", "x":11.25, "y":4, "w":1.25}, + {"label":"\u2190", "x":13, "y":4}, + {"label":"\u2193", "x":14, "y":4}, + {"label":"\u2192", "x":15, "y":4} + ] } } } diff --git a/keyboards/kbdfans/kbd67/mkii_soldered/mkii_soldered.h b/keyboards/kbdfans/kbd67/mkii_soldered/mkii_soldered.h index 6b80aa20b6ba..48268d0be77e 100644 --- a/keyboards/kbdfans/kbd67/mkii_soldered/mkii_soldered.h +++ b/keyboards/kbdfans/kbd67/mkii_soldered/mkii_soldered.h @@ -74,14 +74,29 @@ #define LAYOUT_65_iso_blocker( \ 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, K114, \ - K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K214, \ + K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K113, K213, K214, \ K300, K404, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K313, K314, \ K400, K401, K402, K405, K409, K410, K411, K413, K414 \ ) \ { \ { 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, KC_NO, K114 }, \ - { K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K214 }, \ + { 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, KC_NO, K213, K214 }, \ { K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, KC_NO, K313, K314 }, \ { K400, K401, K402, KC_NO, K404, K405, KC_NO, KC_NO, KC_NO, K409, K410, K411, KC_NO, K413, K414 } \ } + +#define LAYOUT_65_iso_blocker_split_bs( \ + K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K212, K014, \ + K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K114, \ + K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K113, K213, K214, \ + K300, K404, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K313, K314, \ + K400, K401, K402, K405, K409, K410, K411, K413, K414 \ +) \ +{ \ + { 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, K213, K214 }, \ + { K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, KC_NO, K313, K314 }, \ + { K400, K401, K402, KC_NO, K404, K405, KC_NO, KC_NO, KC_NO, K409, K410, K411, KC_NO, K413, K414 } \ +} From fee953c4f872894e53723c27686568a69b0a71ee Mon Sep 17 00:00:00 2001 From: Sergey Vlasov Date: Sun, 20 Sep 2020 22:50:52 +0300 Subject: [PATCH 825/930] Disable the command feature for onekeys (#10366) There is no way to invoke the command feature while having just a single physical key, and disabling that feature fixes build for keymaps like `handwired/onekey/promicro:rgb` without resorting to LTO (the command feature consumes more than 4900 bytes with avr-gcc 8.4.0). --- keyboards/handwired/onekey/rules.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/keyboards/handwired/onekey/rules.mk b/keyboards/handwired/onekey/rules.mk index 968e338e211d..ac343e166388 100644 --- a/keyboards/handwired/onekey/rules.mk +++ b/keyboards/handwired/onekey/rules.mk @@ -5,7 +5,7 @@ BOOTMAGIC_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 +COMMAND_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 From 9f0a2a78a0117ad0bcff4f276b62749324932585 Mon Sep 17 00:00:00 2001 From: Spaceman Date: Sun, 20 Sep 2020 15:54:16 -0400 Subject: [PATCH 826/930] Fix media keys in via keymap for 2% milk (#10357) * Allow media keys in milk via * Update rules.mk * Update rules.mk * Update rules.mk --- keyboards/spaceman/2_milk/keymaps/via/rules.mk | 2 +- keyboards/spaceman/2_milk/rules.mk | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/keyboards/spaceman/2_milk/keymaps/via/rules.mk b/keyboards/spaceman/2_milk/keymaps/via/rules.mk index 43061db1dd46..36b7ba9cbc98 100644 --- a/keyboards/spaceman/2_milk/keymaps/via/rules.mk +++ b/keyboards/spaceman/2_milk/keymaps/via/rules.mk @@ -1,2 +1,2 @@ VIA_ENABLE = yes -LTO_ENABLE = yes \ No newline at end of file +LTO_ENABLE = yes diff --git a/keyboards/spaceman/2_milk/rules.mk b/keyboards/spaceman/2_milk/rules.mk index 4e6c5f7039a5..b93e8d3a4858 100644 --- a/keyboards/spaceman/2_milk/rules.mk +++ b/keyboards/spaceman/2_milk/rules.mk @@ -16,7 +16,7 @@ BOOTLOADER = caterina # BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration MOUSEKEY_ENABLE = no # Mouse keys -EXTRAKEY_ENABLE = no # Audio control and System control +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 From 7f34a6b6357718e942fa86433c72871fb22517b6 Mon Sep 17 00:00:00 2001 From: worldspawn00 Date: Sun, 20 Sep 2020 23:39:02 -0400 Subject: [PATCH 827/930] [Keyboard] adding V2 support (#10309) updating image for V2 options --- keyboards/wsk/sl40/readme.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/keyboards/wsk/sl40/readme.md b/keyboards/wsk/sl40/readme.md index 5c74b7c2d416..113a09af54d7 100644 --- a/keyboards/wsk/sl40/readme.md +++ b/keyboards/wsk/sl40/readme.md @@ -1,6 +1,6 @@ # SL40 -![SL40](https://i.imgur.com/HeeUwVj.png) +![SL40](https://i.imgur.com/DX5Znfd.png) The SL40 is a 14 column staggered 40% keyboard. From bc7a745227d453dd68ae2f40b0c4ff98c082212f Mon Sep 17 00:00:00 2001 From: Wilba Date: Mon, 21 Sep 2020 21:21:19 +1000 Subject: [PATCH 828/930] Fix typo in via.c (#10000) --- quantum/via.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/quantum/via.c b/quantum/via.c index f2599d1d21b6..7c3b7f924803 100644 --- a/quantum/via.c +++ b/quantum/via.c @@ -186,7 +186,7 @@ bool process_record_via(uint16_t keycode, keyrecord_t *record) { // 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. +// DO NOT call raw_hid_send() in the override function. __attribute__((weak)) void raw_hid_receive_kb(uint8_t *data, uint8_t length) { uint8_t *command_id = &(data[0]); *command_id = id_unhandled; From 0384237544a1d377ff0946e59f564529a717e341 Mon Sep 17 00:00:00 2001 From: Thierry Michel Philippe Kleist Date: Mon, 21 Sep 2020 20:12:22 +0200 Subject: [PATCH 829/930] [Keyboard] knife66 added (#9877) * feat: keyboard knife66 added * fix: requested changes applied * docs: updated readme * feat: added support for ws2812 * fix: adjusted headers and readme * fix: moved to LAYOUT_all --- keyboards/misterknife/knife66/chconf.h | 714 ++++++++++++++++++ keyboards/misterknife/knife66/config.h | 55 ++ keyboards/misterknife/knife66/halconf.h | 525 +++++++++++++ keyboards/misterknife/knife66/info.json | 12 + .../knife66/keymaps/default/keymap.c | 39 + keyboards/misterknife/knife66/knife66.c | 17 + keyboards/misterknife/knife66/knife66.h | 35 + keyboards/misterknife/knife66/mcuconf.h | 176 +++++ keyboards/misterknife/knife66/readme.md | 18 + keyboards/misterknife/knife66/rules.mk | 23 + 10 files changed, 1614 insertions(+) create mode 100644 keyboards/misterknife/knife66/chconf.h create mode 100644 keyboards/misterknife/knife66/config.h create mode 100644 keyboards/misterknife/knife66/halconf.h create mode 100644 keyboards/misterknife/knife66/info.json create mode 100644 keyboards/misterknife/knife66/keymaps/default/keymap.c create mode 100644 keyboards/misterknife/knife66/knife66.c create mode 100644 keyboards/misterknife/knife66/knife66.h create mode 100644 keyboards/misterknife/knife66/mcuconf.h create mode 100644 keyboards/misterknife/knife66/readme.md create mode 100644 keyboards/misterknife/knife66/rules.mk diff --git a/keyboards/misterknife/knife66/chconf.h b/keyboards/misterknife/knife66/chconf.h new file mode 100644 index 000000000000..03f63da36a88 --- /dev/null +++ b/keyboards/misterknife/knife66/chconf.h @@ -0,0 +1,714 @@ +/* + 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. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +/** + * @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. + * + * @addtogroup config + * @details Kernel related settings and hooks. + * @{ + */ + +#ifndef CHCONF_H +#define CHCONF_H + +#define _CHIBIOS_RT_CONF_ +#define _CHIBIOS_RT_CONF_VER_6_0_ + +/*===========================================================================*/ +/** + * @name System timers settings + * @{ + */ +/*===========================================================================*/ + +/** + * @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. + * @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. + */ +#if !defined(CH_CFG_ST_TIMEDELTA) +#define CH_CFG_ST_TIMEDELTA 2 +#endif + +/** @} */ + +/*===========================================================================*/ +/** + * @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. + */ +#if !defined(CH_CFG_TIME_QUANTUM) +#define CH_CFG_TIME_QUANTUM 0 +#endif + +/** + * @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. + */ +#if !defined(CH_CFG_MEMCORE_SIZE) +#define CH_CFG_MEMCORE_SIZE 0 +#endif + +/** + * @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. + */ +#if !defined(CH_CFG_NO_IDLE_THREAD) +#define CH_CFG_NO_IDLE_THREAD FALSE +#endif + +/** @} */ + +/*===========================================================================*/ +/** + * @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. + */ +#if !defined(CH_CFG_OPTIMIZE_SPEED) +#define CH_CFG_OPTIMIZE_SPEED FALSE +#endif + +/** @} */ + +/*===========================================================================*/ +/** + * @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. + */ +#if !defined(CH_CFG_USE_TM) +#define CH_CFG_USE_TM FALSE +#endif + +/** + * @brief Threads registry APIs. + * @details If enabled then the registry APIs are included in the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_REGISTRY) +#define CH_CFG_USE_REGISTRY TRUE +#endif + +/** + * @brief Threads synchronization APIs. + * @details If enabled then the @p chThdWait() function is included in + * the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_WAITEXIT) +#define CH_CFG_USE_WAITEXIT TRUE +#endif + +/** + * @brief Semaphores APIs. + * @details If enabled then the Semaphores APIs are included in the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_SEMAPHORES) +#define CH_CFG_USE_SEMAPHORES TRUE +#endif + +/** + * @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. + */ +#if !defined(CH_CFG_USE_SEMAPHORES_PRIORITY) +#define CH_CFG_USE_SEMAPHORES_PRIORITY FALSE +#endif + +/** + * @brief Mutexes APIs. + * @details If enabled then the mutexes APIs are included in the kernel. + * + * @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. + * @note Recursive mutexes are heavier and have an increased + * memory footprint. + * + * @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. + * @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. + */ +#if !defined(CH_CFG_USE_CONDVARS) +#define CH_CFG_USE_CONDVARS TRUE +#endif + +/** + * @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. + */ +#if !defined(CH_CFG_USE_CONDVARS_TIMEOUT) +#define CH_CFG_USE_CONDVARS_TIMEOUT FALSE +#endif + +/** + * @brief Events Flags APIs. + * @details If enabled then the event flags APIs are included in the kernel. + * + * @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. + * @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. + */ +#if !defined(CH_CFG_USE_EVENTS_TIMEOUT) +#define CH_CFG_USE_EVENTS_TIMEOUT TRUE +#endif + +/** + * @brief Synchronous Messages APIs. + * @details If enabled then the synchronous messages APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_MESSAGES) +#define CH_CFG_USE_MESSAGES TRUE +#endif + +/** + * @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. + */ +#if !defined(CH_CFG_USE_MESSAGES_PRIORITY) +#define CH_CFG_USE_MESSAGES_PRIORITY FALSE +#endif + +/** + * @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. + */ +#if !defined(CH_CFG_USE_MAILBOXES) +#define CH_CFG_USE_MAILBOXES TRUE +#endif + +/** + * @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. + */ +#if !defined(CH_CFG_USE_MEMCORE) +#define CH_CFG_USE_MEMCORE TRUE +#endif + +/** + * @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. + */ +#if !defined(CH_CFG_USE_HEAP) +#define CH_CFG_USE_HEAP FALSE +#endif + +/** + * @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. + */ +#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. + * @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. + */ +#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 + +/** @} */ + +/*===========================================================================*/ +/** + * @name Debug options + * @{ + */ +/*===========================================================================*/ + +/** + * @brief Debug option, kernel statistics. + * + * @note The default is @p FALSE. + */ +#if !defined(CH_DBG_STATISTICS) +#define CH_DBG_STATISTICS FALSE +#endif + +/** + * @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. + */ +#if !defined(CH_DBG_SYSTEM_STATE_CHECK) +#define CH_DBG_SYSTEM_STATE_CHECK FALSE +#endif + +/** + * @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. + */ +#if !defined(CH_DBG_ENABLE_CHECKS) +#define CH_DBG_ENABLE_CHECKS FALSE +#endif + +/** + * @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. + */ +#if !defined(CH_DBG_ENABLE_ASSERTS) +#define CH_DBG_ENABLE_ASSERTS FALSE +#endif + +/** + * @brief Debug option, trace buffer. + * @details If enabled then the trace buffer is activated. + * + * @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. + * @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. + */ +#if !defined(CH_DBG_ENABLE_STACK_CHECK) +#define CH_DBG_ENABLE_STACK_CHECK FALSE +#endif + +/** + * @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. + */ +#if !defined(CH_DBG_FILL_THREADS) +#define CH_DBG_FILL_THREADS FALSE +#endif + +/** + * @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. + */ +#if !defined(CH_DBG_THREADS_PROFILING) +#define CH_DBG_THREADS_PROFILING FALSE +#endif + +/** @} */ + +/*===========================================================================*/ +/** + * @name Kernel hooks + * @{ + */ +/*===========================================================================*/ + +/** + * @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. + */ +#define CH_CFG_THREAD_EXTRA_FIELDS \ + /* Add threads custom fields here.*/ + +/** + * @brief Threads initialization hook. + * @details User initialization code added to the @p _thread_init() function. + * + * @note It is invoked from within @p _thread_init() 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/misterknife/knife66/config.h b/keyboards/misterknife/knife66/config.h new file mode 100644 index 000000000000..0dd85dfdfc8d --- /dev/null +++ b/keyboards/misterknife/knife66/config.h @@ -0,0 +1,55 @@ +/* +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 + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xAC11 +#define PRODUCT_ID 0x4172 +#define DEVICE_VER 0x0001 +#define MANUFACTURER MisterKnife +#define PRODUCT Knife66 + +#define MATRIX_ROWS 5 +#define MATRIX_COLS 15 + +#define MATRIX_COL_PINS { B2, B1, B0, A7, A6, A5, A4, B9, B8, B7, B6, B5, B4, B3, A15 } +#define MATRIX_ROW_PINS { B15, A8, A3, A2, A1 } +#define DIODE_DIRECTION COL2ROW + +#define RGB_DI_PIN A9 + +#ifdef RGB_DI_PIN +#define RGBLIGHT_ANIMATIONS +#define RGBLIGHT_SLEEP +#define RGBLED_NUM 6 +#define RGBLIGHT_HUE_STEP 8 +#define RGBLIGHT_SAT_STEP 8 +#define RGBLIGHT_VAL_STEP 8 +#define RGBLIGHT_LIMIT_VAL 200 +#endif + +/* Set 0 if debouncing isn't needed */ +#define DEBOUNCE 5 + +#define WS2812_PWM_DRIVER PWMD1 // default: PWMD1 +#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_STREAM5 // DMA Stream for TIMx_UP, see the respective reference manual for the appropriate values for your MCU. +#define WS2812_DMA_CHANNEL 5 // DMA Channel for TIMx_UP, see the respective reference manual for the appropriate values for your MCU. diff --git a/keyboards/misterknife/knife66/halconf.h b/keyboards/misterknife/knife66/halconf.h new file mode 100644 index 000000000000..adb1a907154b --- /dev/null +++ b/keyboards/misterknife/knife66/halconf.h @@ -0,0 +1,525 @@ +/* + 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. + 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 + +#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 +#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 cryptographic subsystem. + */ +#if !defined(HAL_USE_CRY) || defined(__DOXYGEN__) +#define HAL_USE_CRY FALSE +#endif + +/** + * @brief Enables the DAC subsystem. + */ +#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 +#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 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 +#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 +#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 + +/** + * @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. */ +/*===========================================================================*/ + +/** + * @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 + +/** + * @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. */ +/*===========================================================================*/ + +/** + * @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 the zero-copy API. + */ +#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 + +/** + * @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. */ +/*===========================================================================*/ + +/** + * @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 16 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 256 bytes for both the transmission and receive + * buffers. + */ +#if !defined(SERIAL_USB_BUFFERS_SIZE) || defined(__DOXYGEN__) +#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 + +/*===========================================================================*/ +/* 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 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 +#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. */ +/*===========================================================================*/ + +/** + * @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 + +/*===========================================================================*/ +/* 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/misterknife/knife66/info.json b/keyboards/misterknife/knife66/info.json new file mode 100644 index 000000000000..3f61398c6379 --- /dev/null +++ b/keyboards/misterknife/knife66/info.json @@ -0,0 +1,12 @@ +{ + "keyboard_name": "Knife66", + "url": "", + "maintainer": "qmk", + "width": 16.5, + "height": 5.25, + "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":15.5, "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.5, "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.5, "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.25, "y":3.25}, {"x":15.5, "y":3}, {"x":0, "y":4, "w":1.25}, {"x":2.25, "y":4}, {"x":3.25, "y":4, "w":1.25}, {"x":4.5, "y":4, "w":2.25}, {"x":6.75, "y":4, "w":2.75}, {"x":9.5, "y":4, "w":1.25}, {"x":10.75, "y":4}, {"x":11.75, "y":4, "w":1.25}, {"x":13.25, "y":4.25}, {"x":14.25, "y":4.25}, {"x":15.25, "y":4.25}] + } + } +} diff --git a/keyboards/misterknife/knife66/keymaps/default/keymap.c b/keyboards/misterknife/knife66/keymaps/default/keymap.c new file mode 100644 index 000000000000..831efca1779d --- /dev/null +++ b/keyboards/misterknife/knife66/keymaps/default/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 + +// 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] = 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_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_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, + MO(1), KC_LALT, KC_LGUI, KC_LGUI, LT(1, KC_SPC), KC_LGUI, MO(1), KC_LGUI, KC_LEFT, KC_DOWN, KC_RGHT ), + + [_FN] = 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_DEL, KC_DEL, RGB_TOG, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MPLY, KC_MPRV, KC_MNXT, KC_TRNS, RGB_MOD, + 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_INS, RGB_SPI, + KC_CAPS, 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_SPD, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MUTE, KC_VOLD, KC_TRNS ), +}; diff --git a/keyboards/misterknife/knife66/knife66.c b/keyboards/misterknife/knife66/knife66.c new file mode 100644 index 000000000000..0e261b3a81eb --- /dev/null +++ b/keyboards/misterknife/knife66/knife66.c @@ -0,0 +1,17 @@ +/* Copyright 2020 Thierry Kleist + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + + #include "knife66.h" diff --git a/keyboards/misterknife/knife66/knife66.h b/keyboards/misterknife/knife66/knife66.h new file mode 100644 index 000000000000..8868aa3aef02 --- /dev/null +++ b/keyboards/misterknife/knife66/knife66.h @@ -0,0 +1,35 @@ +/* Copyright 2020 Thierry Kleist + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License 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 + +#define LAYOUT_all( \ + K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, K114, \ + K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K214, \ + K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K314, \ + K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K414, \ + K400, K401, K402, K404, K405, K407, K408, K409, K410, 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, ____, K214 }, \ + { K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, ____, K314 }, \ + { K400, K401, K402, ____, K404, K405, ____, K407, K408, K409, K410, ____, K412, K413, K414 } \ +} diff --git a/keyboards/misterknife/knife66/mcuconf.h b/keyboards/misterknife/knife66/mcuconf.h new file mode 100644 index 000000000000..00292cab1f6d --- /dev/null +++ b/keyboards/misterknife/knife66/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 TRUE +#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 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/misterknife/knife66/readme.md b/keyboards/misterknife/knife66/readme.md new file mode 100644 index 000000000000..3ced6adafd1d --- /dev/null +++ b/keyboards/misterknife/knife66/readme.md @@ -0,0 +1,18 @@ +# Knife66 + +![Knife66](https://i.imgur.com/p7G2g81l.png) + +This is a replacement board for the CA66 keyboard + +* Keyboard Maintainer: [afewyards](https://github.com/afewyards) +* Hardware Availability: [Geekhack](https://geekhack.org/index.php?topic=107331.0) + +Make example for this keyboard (after setting up your build environment): + + make misterknife/knife66:default + +Flashing example for this keyboard: + + make misterknife/knife66: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). diff --git a/keyboards/misterknife/knife66/rules.mk b/keyboards/misterknife/knife66/rules.mk new file mode 100644 index 000000000000..540a423f2e4b --- /dev/null +++ b/keyboards/misterknife/knife66/rules.mk @@ -0,0 +1,23 @@ +# 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 = yes # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow +BLUETOOTH_ENABLE = no # Enable Bluetooth +AUDIO_ENABLE = no # Audio output + +# Enter lower-power sleep mode when on the ChibiOS idle thread +OPT_DEFS += -DCORTEX_ENABLE_WFI_IDLE=TRUE +WS2812_DRIVER = pwm From 2f637e4ea124e8235e336c009d0671bed88aca4c Mon Sep 17 00:00:00 2001 From: Dustin Bosveld Date: Mon, 21 Sep 2020 12:35:26 -0600 Subject: [PATCH 830/930] [Docs] Clarify functionality of update_tri_layer_state (#10370) * Add information to docs - If layer z is not a higher layer than both x and y, the layer change code does not function correctly. * Update docs/ref_functions.md * Update docs/ref_functions.md * Update docs/ref_functions.md --- docs/ref_functions.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/docs/ref_functions.md b/docs/ref_functions.md index 997c3fa2ee37..176095070b18 100644 --- a/docs/ref_functions.md +++ b/docs/ref_functions.md @@ -43,7 +43,9 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { ### `update_tri_layer_state(state, x, y, z)` The other function is `update_tri_layer_state(state, x, y, z)`. This function is meant to be called from the [`layer_state_set_*` functions](custom_quantum_functions.md#layer-change-code). This means that any time that you use a keycode to change the layer, this will be checked. So you could use `LT(layer, kc)` to change the layer and it will trigger the same layer check. -The caveat to this method is that you cannot access the `z` layer without having `x` and `y` layers on, since if you try to activate just layer `z`, it will run this code and turn off layer `z` before you could use it. +There are a couple of caveats to this method: +1. You cannot access the `z` layer without having `x` and `y` layers on, since if you try to activate just layer `z`, it will run this code and turn off layer `z` before you could use it. +2. Because layers are processed from the highest number `z` should be a higher layer than `x` and `y` or you may not be able to access it. #### Example @@ -97,7 +99,7 @@ To wipe the EEPROM, run `eeconfig_init()` from your function or macro to reset m ## Tap random key -If you want to send a random character to the host computer, you can use the `tap_random_base64()` function. This [pseudorandomly](https://en.wikipedia.org/wiki/Pseudorandom_number_generator) selects a number between 0 and 63, and then sends a key press based on that selection. (0–25 is `A`–`Z`, 26–51 is `a`–`z`, 52–61 is `0`–`9`, 62 is `+` and 63 is `/`). +If you want to send a random character to the host computer, you can use the `tap_random_base64()` function. This [pseudorandomly](https://en.wikipedia.org/wiki/Pseudorandom_number_generator) selects a number between 0 and 63, and then sends a key press based on that selection. (0–25 is `A`–`Z`, 26–51 is `a`–`z`, 52–61 is `0`–`9`, 62 is `+` and 63 is `/`). ?> Needless to say, but this is _not_ a cryptographically secure method of generating random Base64 keys or passwords. From becaf325a3f1095913757480b379a7ee31a5241f Mon Sep 17 00:00:00 2001 From: Sendy YK Date: Tue, 22 Sep 2020 03:34:06 +0700 Subject: [PATCH 831/930] Minor updates 60_ansi_arrow (#10332) * Minor updates 60_ansi_arrow * Update keymap.c * Update keymap.c * Minnor updates * Minnor updates * Update readme.md --- .../60_ansi_arrow/mrsendyyk/keymap.c | 187 ++++++++---------- .../60_ansi_arrow/mrsendyyk/readme.md | 119 +++++++---- layouts/community/60_ansi_arrow/readme.md | 136 ++++++------- .../default_60_ansi_arrow/keymap.c | 109 +++++----- layouts/default/60_ansi_arrow/info.json | 4 +- layouts/default/60_ansi_arrow/readme.md | 71 +++---- 6 files changed, 290 insertions(+), 336 deletions(-) diff --git a/layouts/community/60_ansi_arrow/mrsendyyk/keymap.c b/layouts/community/60_ansi_arrow/mrsendyyk/keymap.c index 4b0b33e2c880..80d03922b9a7 100644 --- a/layouts/community/60_ansi_arrow/mrsendyyk/keymap.c +++ b/layouts/community/60_ansi_arrow/mrsendyyk/keymap.c @@ -1,115 +1,98 @@ +/* Copyright (C) 2020 Sendy YK (https://mr.sendyyk.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 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public 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] = { - - /* - * Default Layer [0] - * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ - * │Esc│1 │2 │3 │4 │5 │6 │7 │8 │9 │0 │- │= │Bspc │ - * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ - * │Tab │Q │W │E │R │T │Y │U │I │O │P │[ │] │\ │ - * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤ - * │Caps L│A │S │D │F │G │H │J │K │L │; │' │Enter │ - * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴┬───┬───┤ - * │Shift │Z │X │C │V │B │N │M │, │. │Shift │↑ │/ │ - * ├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴──┬┴──┬───┼───┼───┤ - * │Ctl │OS │Alt │ Space │Alt│Ctl│← │↓ │→ │ - * └────┴────┴────┴────────────────────────┴───┴───┴───┴───┴───┘ - */ - [0] = LAYOUT_60_ansi_arrow(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_RSFT, KC_UP, KC_SLSH, - KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, LT(2, KC_RALT), LT(1, KC_RCTL), KC_LEFT, KC_DOWN, KC_RGHT - ), - - /* - * Fn Layer [1] - * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ - * │` │F1 │F2 │F3 │F4 │F5 │F6 │F7 │F8 │F9 │F10│F11│F12│Delete │ - * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ - * │Bri+ │ │ │End│Rst│ │ │ │Ins│ │P S│ │ │Eject│ - * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤ - * │Bri- │ │S L│ │ │ │Hm │ │ │ │ │ │Mute │ - * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴┬───┬───┤ - * │Vol+ │ │ │Cal│ │ │N L│Ml │ │ │Pause │P U│ │ - * ├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴──┬┴──┬───┼───┼───┤ - * │Vol-│Rwd │F FD│ Play │Stp│ │Prv│P D│Nxt│ - * └────┴────┴────┴────────────────────────┴───┴───┴───┴───┴───┘ - */ - [1] = LAYOUT_60_ansi_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_BRIU, KC_TRNS, KC_TRNS, KC_END, RESET, KC_TRNS, KC_TRNS, KC_TRNS, KC_INS, KC_TRNS, KC_PSCR, KC_TRNS, KC_TRNS, KC_EJCT, - KC_BRID, KC_TRNS, KC_SLCK, KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MUTE, - KC_VOLU, KC_TRNS, KC_TRNS, KC_CALC, KC_TRNS, KC_TRNS, KC_NLCK, KC_MAIL, KC_TRNS, KC_TRNS, KC_PAUS, KC_PGUP, KC_TRNS, - KC_VOLD, KC_MRWD, KC_MFFD, KC_MPLY, KC_MSTP, KC_TRNS, KC_MPRV, KC_PGDN, KC_MNXT - ), +enum layer_names { + _BASE, // Default Layer + _FN, // Fn Layer 1 + _SETTINGS // Fn Layer 2 +}; - /* - * Fn Layer [2] - * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ - * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ - * │ │R T│R M│Hu+│Hu-│Sa+│Sa-│Br+│Br-│ │ │ │ │ │ - * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤ - * │ │ │ │ │ │ │ │ │ │ │ │ │ │ - * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴┬───┬───┤ - * │ │ │ │ │BL-│B T│BL+│B C│ │ │ │ │ │ - * ├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴──┬┴──┬───┼───┼───┤ - * │ │ │ │ │ │ │ │ │ │ - * └────┴────┴────┴────────────────────────┴───┴───┴───┴───┴───┘ - */ - [2] = LAYOUT_60_ansi_arrow(KC_TRNS, KC_TRNS, KC_TRNS, 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_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, 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 - ) +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + // Default Layer + [_BASE] = LAYOUT_60_ansi_arrow( + 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_RSFT, KC_UP, KC_SLSH, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, LT(2, KC_RALT), LT(1, KC_RCTL), KC_LEFT, KC_DOWN, KC_RGHT + ), + // Fn Layer 1 + [_FN] = LAYOUT_60_ansi_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_BRIU, KC_TRNS, KC_TRNS, KC_END, RESET, KC_TRNS, KC_TRNS, KC_TRNS, KC_INS, KC_TRNS, KC_PSCR, KC_TRNS, KC_TRNS, KC_EJCT, + KC_BRID, KC_TRNS, KC_SLCK, KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MUTE, + KC_VOLU, KC_TRNS, KC_TRNS, KC_CALC, KC_TRNS, KC_TRNS, KC_NLCK, KC_MAIL, KC_TRNS, KC_TRNS, KC_PAUS, KC_PGUP, KC_TRNS, + KC_VOLD, KC_MRWD, KC_MFFD, KC_MPLY, KC_MSTP, KC_TRNS, KC_MPRV, KC_PGDN, KC_MNXT + ), + // Fn Layer 2 + [_SETTINGS] = LAYOUT_60_ansi_arrow( + KC_TRNS, KC_TRNS, KC_TRNS, 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_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, 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 + ) }; void keyboard_post_init_user(void) { - rgblight_enable_noeeprom(); - rgblight_sethsv_noeeprom(0, 0, 0); + rgblight_enable_noeeprom(); + rgblight_sethsv_noeeprom(0, 0, 0); } -/* RGB Lighting/LED/Underglow as Caps Lock, Num Lock, Scroll Lock, and Layer indicator */ - void update_led(void) { - /* Num Lock Indicator */ - if (host_keyboard_led_state().num_lock) { - rgblight_setrgb(225, 8, 0); - } - /* Scroll Lock Indicator */ - if (host_keyboard_led_state().scroll_lock) { - rgblight_setrgb(0, 100, 255); - } - } +// RGB Lighting/LED/Underglow as Caps Lock, Num Lock, Scroll Lock, and Layer Indicator +void update_led(void) { + // Num Lock Indicator + if (host_keyboard_led_state().num_lock) { + rgblight_setrgb(225, 8, 0); + } + // Scroll Lock Indicator + if (host_keyboard_led_state().scroll_lock) { + rgblight_setrgb(255, 110, 0); + } +} - void led_set_user(uint8_t usb_led) { - /* Caps Lock Indicator */ - if (IS_LED_ON(usb_led, USB_LED_CAPS_LOCK)) { - writePinLow(B2); - rgblight_setrgb(100, 255, 100); - } - /* Layer Indicator */ - else { - switch (get_highest_layer(layer_state)) { - /* Fn Layer [1] Indicator */ - case 1: - rgblight_setrgb(255, 110, 0); - break; - /* Fn Layer [2] Indicator */ - case 2: - rgblight_setrgb(255, 110, 0); - break; - /* Default Layer [0] Indicator */ - default: - rgblight_setrgb(0, 0, 0); - break; - } - update_led(); +void led_set_user(uint8_t usb_led) { + // Caps Lock Indicator + if (IS_LED_ON(usb_led, USB_LED_CAPS_LOCK)) { + writePinLow(B2); + rgblight_setrgb(100, 255, 100); + } + // Layer Indicator + else { + switch (get_highest_layer(layer_state)) { + // Fn Layer 1 Indicator + case _FN: + rgblight_setrgb(100, 255, 100); + break; + // Fn Layer 2 Indicator + case _SETTINGS: + rgblight_setrgb(100, 255, 100); + break; + // Default Layer Indicator + case _BASE: + rgblight_setrgb(0, 0, 0); + break; } - } + update_led(); + } +} layer_state_t layer_state_set_user(layer_state_t state) { - update_led(); - return state; + update_led(); + return state; } diff --git a/layouts/community/60_ansi_arrow/mrsendyyk/readme.md b/layouts/community/60_ansi_arrow/mrsendyyk/readme.md index 4ddd6703d7a4..838630221852 100644 --- a/layouts/community/60_ansi_arrow/mrsendyyk/readme.md +++ b/layouts/community/60_ansi_arrow/mrsendyyk/readme.md @@ -1,50 +1,85 @@ -# [Sendy YK](https://mr.sendyyk.com)'s 60_ansi_arrow Keymap -`LAYOUT_60_ansi_arrow` with RGB Lighting/LED/Underglow as Caps Lock, Num Lock, Scroll Lock, and Layer indicator. +# Sendy YK's 60% ANSI Arrow Layout and Keymap -### Default Layer [0] +[https://mr.sendyyk.com](https://mr.sendyyk.com) -``` -┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ -│Esc│1 │2 │3 │4 │5 │6 │7 │8 │9 │0 │- │= │Bspc │ -├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ -│Tab │Q │W │E │R │T │Y │U │I │O │P │[ │] │\ │ -├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤ -│Caps L│A │S │D │F │G │H │J │K │L │; │' │Enter │ -├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴┬───┬───┤ -│Shift │Z │X │C │V │B │N │M │, │. │Shift │↑ │/ │ -├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴──┬┴──┬───┼───┼───┤ -│Ctl │OS │Alt │ Space │Alt│Ctl│← │↓ │→ │ -└────┴────┴────┴────────────────────────┴───┴───┴───┴───┴───┘ -``` +## 60% ANSI Arrow Layout + +![LAYOUT_60_ansi_arrow](https://raw.githubusercontent.com/mrsendyyk/my_qmk/master/dz60/assets/layout-60-ansi-arrow.png) + +## Keymap + +### Default Layer + +![_BASE](https://raw.githubusercontent.com/mrsendyyk/my_qmk/master/dz60/assets/layout-60-ansi-arrow-keymap---layer-0.png) + +### Fn Layer 1 + +Press and hold *right* **Ctrl** key. + +![_FN](https://raw.githubusercontent.com/mrsendyyk/my_qmk/master/dz60/assets/layout-60-ansi-arrow-keymap---layer-1.png) + +### Fn Layer 2 + +Press and hold *right* **Alt** key. -### Fn Layer [1] -Press and hold *right* **Ctl** key. +![_SETTINGS](https://raw.githubusercontent.com/mrsendyyk/my_qmk/master/dz60/assets/layout-60-ansi-arrow-keymap---layer-2.png) + +### RGB Lighting/LED/Underglow as Caps Lock, Num Lock, Scroll Lock, and Layer Indicator + +#### Caps Lock Indicator + +```c + // Caps Lock Indicator + if (IS_LED_ON(usb_led, USB_LED_CAPS_LOCK)) { + writePinLow(B2); + rgblight_setrgb(100, 255, 100); + } ``` -┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ -│` │F1 │F2 │F3 │F4 │F5 │F6 │F7 │F8 │F9 │F10│F11│F12│Delete │ -├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ -│Bri+ │ │ │End│Rst│ │ │ │Ins│ │P S│ │ │Eject│ -├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤ -│Bri- │ │S L│ │ │ │Hm │ │ │ │ │ │Mute │ -├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴┬───┬───┤ -│Vol+ │ │ │Cal│ │ │N L│Ml │ │ │Pause │P U│ │ -├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴──┬┴──┬───┼───┼───┤ -│Vol-│Rwd │F FD│ Play │Stp│ │Prv│P D│Nxt│ -└────┴────┴────┴────────────────────────┴───┴───┴───┴───┴───┘ + +#### Num Lock Indicator + +```c + // Num Lock Indicator + if (host_keyboard_led_state().num_lock) { + rgblight_setrgb(225, 8, 0); + } ``` -### Fn Layer [2] -Press and hold *right* **Alt** key. +#### Scroll Lock Indicator +```c + // Scroll Lock Indicator + if (host_keyboard_led_state().scroll_lock) { + rgblight_setrgb(255, 110, 0); + } ``` -┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ -│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ -│ │R T│R M│Hu+│Hu-│Sa+│Sa-│Br+│Br-│ │ │ │ │ │ -├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤ -│ │ │ │ │ │ │ │ │ │ │ │ │ │ -├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴┬───┬───┤ -│ │ │ │ │BL-│B T│BL+│B C│ │ │ │ │ │ -├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴──┬┴──┬───┼───┼───┤ -│ │ │ │ │ │ │ │ │ │ -└────┴────┴────┴────────────────────────┴───┴───┴───┴───┴───┘ + +#### Layer Indicator + +```c + // Layer Indicator + else { + switch (get_highest_layer(layer_state)) { + // Fn Layer 1 Indicator + case _FN: + rgblight_setrgb(100, 255, 100); + break; + // Fn Layer 2 Indicator + case _SETTINGS: + rgblight_setrgb(100, 255, 100); + break; + // Default Layer Indicator + case _BASE: + rgblight_setrgb(0, 0, 0); + break; + } + update_led(); + } ``` + +## Build The Firmware + +You will need to build the firmware. To do so go to your terminal window and run the compile command: + + qmk compile -kb dz60 -km mrsendyyk + +See [The Complete Newbs Guide To QMK](https://docs.qmk.fm/#/newbs). diff --git a/layouts/community/60_ansi_arrow/readme.md b/layouts/community/60_ansi_arrow/readme.md index 358740f30e22..2fc165376e18 100644 --- a/layouts/community/60_ansi_arrow/readme.md +++ b/layouts/community/60_ansi_arrow/readme.md @@ -1,25 +1,14 @@ # 60_ansi_arrow + This is the 60% ANSI Arrow keyboard layout. ## Requirements ### 1. Layout Defined + A keyboard's `.h` file needs to have `LAYOUT_60_ansi_arrow` defined + ```c -/* - * LAYOUT_60_ansi_arrow - * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ - * │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 │1e │ - * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤ - * │20 │22 │23 │24 │25 │26 │27 │28 │29 │2a │2b │2c │2d │ - * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴┬───┬───┤ - * │30 │32 │33 │34 │35 │36 │37 │38 │39 │3a │3c │3d │3e │ - * ├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴──┬┴──┬───┼───┼───┤ - * │40 │41 │43 │46 │4a │4b │4c │4d │4e │ - * └────┴────┴────┴────────────────────────┴───┴───┴───┴───┴───┘ - */ #define LAYOUT_60_ansi_arrow( \ 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, \ @@ -35,80 +24,71 @@ A keyboard's `.h` file needs to have `LAYOUT_60_ansi_arrow` defined } ``` +![LAYOUT_60_ansi_arrow](https://raw.githubusercontent.com/mrsendyyk/my_qmk/master/dz60/assets/layout-60-ansi-arrow.png) + ### 2. Configuring rules.mk + `rules.mk` needs to have the following line: LAYOUTS = 60_ansi_arrow ### 3. Defining a Keymap + A keymap must be defined at qmk_firmware/layouts/community/60_ansi_arrow/yourfoldername/keymap.c + This keymap must have a `LAYOUT_60_ansi_arrow` layout defined. + ```c -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - - /* - * Default Layer [0] - * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ - * │Esc│1 │2 │3 │4 │5 │6 │7 │8 │9 │0 │- │= │Bspc │ - * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ - * │Tab │Q │W │E │R │T │Y │U │I │O │P │[ │] │\ │ - * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤ - * │Caps L│A │S │D │F │G │H │J │K │L │; │' │Enter │ - * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴┬───┬───┤ - * │Shift │Z │X │C │V │B │N │M │, │. │Shift │↑ │/ │ - * ├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴──┬┴──┬───┼───┼───┤ - * │Ctl │OS │Alt │ Space │Alt│Ctl│← │↓ │→ │ - * └────┴────┴────┴────────────────────────┴───┴───┴───┴───┴───┘ - */ - [0] = LAYOUT_60_ansi_arrow(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_RSFT, KC_UP, KC_SLSH, - KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, LT(2, KC_RALT), LT(1, KC_RCTL), KC_LEFT, KC_DOWN, KC_RGHT - ), - - /* - * Fn Layer [1] - * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ - * │` │F1 │F2 │F3 │F4 │F5 │F6 │F7 │F8 │F9 │F10│F11│F12│Delete │ - * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ - * │Bri+ │ │ │End│Rst│ │ │ │Ins│ │P S│ │ │Eject│ - * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤ - * │Bri- │ │S L│ │ │ │Hm │ │ │ │ │ │Mute │ - * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴┬───┬───┤ - * │Vol+ │ │ │Cal│ │ │N L│Ml │ │ │Pause │P U│ │ - * ├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴──┬┴──┬───┼───┼───┤ - * │Vol-│Rwd │F FD│ Play │Stp│ │Prv│P D│Nxt│ - * └────┴────┴────┴────────────────────────┴───┴───┴───┴───┴───┘ - */ - [1] = LAYOUT_60_ansi_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_BRIU, KC_TRNS, KC_TRNS, KC_END, RESET, KC_TRNS, KC_TRNS, KC_TRNS, KC_INS, KC_TRNS, KC_PSCR, KC_TRNS, KC_TRNS, KC_EJCT, - KC_BRID, KC_TRNS, KC_SLCK, KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MUTE, - KC_VOLU, KC_TRNS, KC_TRNS, KC_CALC, KC_TRNS, KC_TRNS, KC_NLCK, KC_MAIL, KC_TRNS, KC_TRNS, KC_PAUS, KC_PGUP, KC_TRNS, - KC_VOLD, KC_MRWD, KC_MFFD, KC_MPLY, KC_MSTP, KC_TRNS, KC_MPRV, KC_PGDN, KC_MNXT - ), - - /* - * Fn Layer [2] - * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ - * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ - * │ │R T│R M│Hu+│Hu-│Sa+│Sa-│Br+│Br-│ │ │ │ │ │ - * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤ - * │ │ │ │ │ │ │ │ │ │ │ │ │ │ - * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴┬───┬───┤ - * │ │ │ │ │BL-│B T│BL+│B C│ │ │ │ │ │ - * ├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴──┬┴──┬───┼───┼───┤ - * │ │ │ │ │ │ │ │ │ │ - * └────┴────┴────┴────────────────────────┴───┴───┴───┴───┴───┘ - */ - [2] = LAYOUT_60_ansi_arrow(KC_TRNS, KC_TRNS, KC_TRNS, 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_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, 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 - ) +#include QMK_KEYBOARD_H + +enum layer_names { + _BASE, // Default Layer + _FN, // Fn Layer 1 + _SETTINGS // Fn Layer 2 +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + // Default Layer + [_BASE] = LAYOUT_60_ansi_arrow( + 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_RSFT, KC_UP, KC_SLSH, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, LT(2, KC_RALT), LT(1, KC_RCTL), KC_LEFT, KC_DOWN, KC_RGHT + ), + // Fn Layer 1 + [_FN] = LAYOUT_60_ansi_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_BRIU, KC_TRNS, KC_TRNS, KC_END, RESET, KC_TRNS, KC_TRNS, KC_TRNS, KC_INS, KC_TRNS, KC_PSCR, KC_TRNS, KC_TRNS, KC_EJCT, + KC_BRID, KC_TRNS, KC_SLCK, KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MUTE, + KC_VOLU, KC_TRNS, KC_TRNS, KC_CALC, KC_TRNS, KC_TRNS, KC_NLCK, KC_MAIL, KC_TRNS, KC_TRNS, KC_PAUS, KC_PGUP, KC_TRNS, + KC_VOLD, KC_MRWD, KC_MFFD, KC_MPLY, KC_MSTP, KC_TRNS, KC_MPRV, KC_PGDN, KC_MNXT + ), + // Fn Layer 2 + [_SETTINGS] = LAYOUT_60_ansi_arrow( + KC_TRNS, KC_TRNS, KC_TRNS, 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_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, 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 + ) }; ``` + +### Default Layer + +![_BASE](https://raw.githubusercontent.com/mrsendyyk/my_qmk/master/dz60/assets/layout-60-ansi-arrow-keymap---layer-0.png) + +### Fn Layer 1 + +Press and hold *right* **Ctrl** key. + +![_FN](https://raw.githubusercontent.com/mrsendyyk/my_qmk/master/dz60/assets/layout-60-ansi-arrow-keymap---layer-1.png) + +### Fn Layer 2 + +Press and hold *right* **Alt** key. + +![_SETTINGS](https://raw.githubusercontent.com/mrsendyyk/my_qmk/master/dz60/assets/layout-60-ansi-arrow-keymap---layer-2.png) diff --git a/layouts/default/60_ansi_arrow/default_60_ansi_arrow/keymap.c b/layouts/default/60_ansi_arrow/default_60_ansi_arrow/keymap.c index acbf16ad93b0..4330c9ceedaa 100644 --- a/layouts/default/60_ansi_arrow/default_60_ansi_arrow/keymap.c +++ b/layouts/default/60_ansi_arrow/default_60_ansi_arrow/keymap.c @@ -1,67 +1,50 @@ -#include QMK_KEYBOARD_H +/* Copyright (C) 2020 Sendy YK (https://mr.sendyyk.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 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - - /* - * Default Layer [0] - * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ - * │Esc│1 │2 │3 │4 │5 │6 │7 │8 │9 │0 │- │= │Bspc │ - * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ - * │Tab │Q │W │E │R │T │Y │U │I │O │P │[ │] │\ │ - * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤ - * │Caps L│A │S │D │F │G │H │J │K │L │; │' │Enter │ - * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴┬───┬───┤ - * │Shift │Z │X │C │V │B │N │M │, │. │Shift │↑ │/ │ - * ├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴──┬┴──┬───┼───┼───┤ - * │Ctl │OS │Alt │ Space │Alt│Ctl│← │↓ │→ │ - * └────┴────┴────┴────────────────────────┴───┴───┴───┴───┴───┘ - */ - [0] = LAYOUT_60_ansi_arrow(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_RSFT, KC_UP, KC_SLSH, - KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, LT(2, KC_RALT), LT(1, KC_RCTL), KC_LEFT, KC_DOWN, KC_RGHT - ), +#include QMK_KEYBOARD_H - /* - * Fn Layer [1] - * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ - * │` │F1 │F2 │F3 │F4 │F5 │F6 │F7 │F8 │F9 │F10│F11│F12│Delete │ - * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ - * │Bri+ │ │ │End│Rst│ │ │ │Ins│ │P S│ │ │Eject│ - * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤ - * │Bri- │ │S L│ │ │ │Hm │ │ │ │ │ │Mute │ - * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴┬───┬───┤ - * │Vol+ │ │ │Cal│ │ │N L│Ml │ │ │Pause │P U│ │ - * ├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴──┬┴──┬───┼───┼───┤ - * │Vol-│Rwd │F FD│ Play │Stp│ │Prv│P D│Nxt│ - * └────┴────┴────┴────────────────────────┴───┴───┴───┴───┴───┘ - */ - [1] = LAYOUT_60_ansi_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_BRIU, KC_TRNS, KC_TRNS, KC_END, RESET, KC_TRNS, KC_TRNS, KC_TRNS, KC_INS, KC_TRNS, KC_PSCR, KC_TRNS, KC_TRNS, KC_EJCT, - KC_BRID, KC_TRNS, KC_SLCK, KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MUTE, - KC_VOLU, KC_TRNS, KC_TRNS, KC_CALC, KC_TRNS, KC_TRNS, KC_NLCK, KC_MAIL, KC_TRNS, KC_TRNS, KC_PAUS, KC_PGUP, KC_TRNS, - KC_VOLD, KC_MRWD, KC_MFFD, KC_MPLY, KC_MSTP, KC_TRNS, KC_MPRV, KC_PGDN, KC_MNXT - ), +enum layer_names { + _BASE, // Default Layer + _FN, // Fn Layer 1 + _SETTINGS // Fn Layer 2 +}; - /* - * Fn Layer [2] - * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ - * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ - * │ │R T│R M│Hu+│Hu-│Sa+│Sa-│Br+│Br-│ │ │ │ │ │ - * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤ - * │ │ │ │ │ │ │ │ │ │ │ │ │ │ - * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴┬───┬───┤ - * │ │ │ │ │BL-│B T│BL+│B C│ │ │ │ │ │ - * ├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴──┬┴──┬───┼───┼───┤ - * │ │ │ │ │ │ │ │ │ │ - * └────┴────┴────┴────────────────────────┴───┴───┴───┴───┴───┘ - */ - [2] = LAYOUT_60_ansi_arrow(KC_TRNS, KC_TRNS, KC_TRNS, 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_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, 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 - ) +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + // Default Layer + [_BASE] = LAYOUT_60_ansi_arrow( + 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_RSFT, KC_UP, KC_SLSH, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, LT(2, KC_RALT), LT(1, KC_RCTL), KC_LEFT, KC_DOWN, KC_RGHT + ), + // Fn Layer 1 + [_FN] = LAYOUT_60_ansi_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_BRIU, KC_TRNS, KC_TRNS, KC_END, RESET, KC_TRNS, KC_TRNS, KC_TRNS, KC_INS, KC_TRNS, KC_PSCR, KC_TRNS, KC_TRNS, KC_EJCT, + KC_BRID, KC_TRNS, KC_SLCK, KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MUTE, + KC_VOLU, KC_TRNS, KC_TRNS, KC_CALC, KC_TRNS, KC_TRNS, KC_NLCK, KC_MAIL, KC_TRNS, KC_TRNS, KC_PAUS, KC_PGUP, KC_TRNS, + KC_VOLD, KC_MRWD, KC_MFFD, KC_MPLY, KC_MSTP, KC_TRNS, KC_MPRV, KC_PGDN, KC_MNXT + ), + // Fn Layer 2 + [_SETTINGS] = LAYOUT_60_ansi_arrow( + KC_TRNS, KC_TRNS, KC_TRNS, 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_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, 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 + ) }; diff --git a/layouts/default/60_ansi_arrow/info.json b/layouts/default/60_ansi_arrow/info.json index 6bd85a6b9c0b..14c46a43d0f5 100644 --- a/layouts/default/60_ansi_arrow/info.json +++ b/layouts/default/60_ansi_arrow/info.json @@ -1,7 +1,7 @@ { "keyboard_name": "60% ANSI Arrow Layout", - "url": "", - "maintainer": "qmk", + "url": "https://mr.sendyyk.com", + "maintainer": "Sendy YK", "width": 15, "height": 5, "layouts": { diff --git a/layouts/default/60_ansi_arrow/readme.md b/layouts/default/60_ansi_arrow/readme.md index 8d6e6c455321..1a92c31de591 100644 --- a/layouts/default/60_ansi_arrow/readme.md +++ b/layouts/default/60_ansi_arrow/readme.md @@ -1,50 +1,23 @@ -# 60_ansi_arrow -`LAYOUT_60_ansi_arrow` - -### Default Layer [0] - -``` -┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ -│Esc│1 │2 │3 │4 │5 │6 │7 │8 │9 │0 │- │= │Bspc │ -├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ -│Tab │Q │W │E │R │T │Y │U │I │O │P │[ │] │\ │ -├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤ -│Caps L│A │S │D │F │G │H │J │K │L │; │' │Enter │ -├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴┬───┬───┤ -│Shift │Z │X │C │V │B │N │M │, │. │Shift │↑ │/ │ -├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴──┬┴──┬───┼───┼───┤ -│Ctl │OS │Alt │ Space │Alt│Ctl│← │↓ │→ │ -└────┴────┴────┴────────────────────────┴───┴───┴───┴───┴───┘ -``` - -### Fn Layer [1] -Press and hold *right* **Ctl** key. -``` -┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ -│` │F1 │F2 │F3 │F4 │F5 │F6 │F7 │F8 │F9 │F10│F11│F12│Delete │ -├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ -│Bri+ │ │ │End│Rst│ │ │ │Ins│ │P S│ │ │Eject│ -├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤ -│Bri- │ │S L│ │ │ │Hm │ │ │ │ │ │Mute │ -├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴┬───┬───┤ -│Vol+ │ │ │Cal│ │ │N L│Ml │ │ │Pause │P U│ │ -├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴──┬┴──┬───┼───┼───┤ -│Vol-│Rwd │F FD│ Play │Stp│ │Prv│P D│Nxt│ -└────┴────┴────┴────────────────────────┴───┴───┴───┴───┴───┘ -``` - -### Fn Layer [2] +# 60_ansi_arrow and Keymap + +## 60% ANSI Arrow Layout + +![LAYOUT_60_ansi_arrow](https://raw.githubusercontent.com/mrsendyyk/my_qmk/master/dz60/assets/layout-60-ansi-arrow.png) + +## Keymap + +### Default Layer + +![_BASE](https://raw.githubusercontent.com/mrsendyyk/my_qmk/master/dz60/assets/layout-60-ansi-arrow-keymap---layer-0.png) + +### Fn Layer 1 + +Press and hold *right* **Ctrl** key. + +![_FN](https://raw.githubusercontent.com/mrsendyyk/my_qmk/master/dz60/assets/layout-60-ansi-arrow-keymap---layer-1.png) + +### Fn Layer 2 + Press and hold *right* **Alt** key. -``` -┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ -│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ -│ │R T│R M│Hu+│Hu-│Sa+│Sa-│Br+│Br-│ │ │ │ │ │ -├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤ -│ │ │ │ │ │ │ │ │ │ │ │ │ │ -├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴┬───┬───┤ -│ │ │ │ │BL-│B T│BL+│B C│ │ │ │ │ │ -├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴──┬┴──┬───┼───┼───┤ -│ │ │ │ │ │ │ │ │ │ -└────┴────┴────┴────────────────────────┴───┴───┴───┴───┴───┘ -``` + +![_SETTINGS](https://raw.githubusercontent.com/mrsendyyk/my_qmk/master/dz60/assets/layout-60-ansi-arrow-keymap---layer-2.png) From c4eb0df428946402247fbf3b0590bc6921661e75 Mon Sep 17 00:00:00 2001 From: Sendy YK Date: Tue, 22 Sep 2020 03:34:57 +0700 Subject: [PATCH 832/930] Minor updates dz60:mrsendyyk (#10334) * Minor updates dz60:mrsendyyk * Update keymap.c * Update keymap.c * Update readme.md --- keyboards/dz60/keymaps/mrsendyyk/keymap.c | 151 ++++++++++++--------- keyboards/dz60/keymaps/mrsendyyk/readme.md | 78 +++++------ 2 files changed, 123 insertions(+), 106 deletions(-) diff --git a/keyboards/dz60/keymaps/mrsendyyk/keymap.c b/keyboards/dz60/keymaps/mrsendyyk/keymap.c index 58e10490da88..80d03922b9a7 100644 --- a/keyboards/dz60/keymaps/mrsendyyk/keymap.c +++ b/keyboards/dz60/keymaps/mrsendyyk/keymap.c @@ -1,81 +1,98 @@ -/* - * Based on Sendy YK's 60% ANSI Arrow Layout and Keymap - * https://github.com/qmk/qmk_firmware/blob/master/layouts/default/60_ansi_arrow/info.json - * https://github.com/qmk/qmk_firmware/blob/master/layouts/community/60_ansi_arrow/mrsendyyk/keymap.c - * - * https://github.com/mrsendyyk +/* Copyright (C) 2020 Sendy YK (https://mr.sendyyk.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 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public 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, // Default Layer + _FN, // Fn Layer 1 + _SETTINGS // Fn Layer 2 +}; + const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - /* Default Layer [0] */ - [0] = LAYOUT_60_ansi_arrow(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_RSFT, KC_UP, KC_SLSH, - KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, LT(2, KC_RALT), LT(1, KC_RCTL), KC_LEFT, KC_DOWN, KC_RGHT - ), - /* Fn Layer [1] */ - [1] = LAYOUT_60_ansi_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_BRIU, KC_TRNS, KC_TRNS, KC_END, RESET, KC_TRNS, KC_TRNS, KC_TRNS, KC_INS, KC_TRNS, KC_PSCR, KC_TRNS, KC_TRNS, KC_EJCT, - KC_BRID, KC_TRNS, KC_SLCK, KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MUTE, - KC_VOLU, KC_TRNS, KC_TRNS, KC_CALC, KC_TRNS, KC_TRNS, KC_NLCK, KC_MAIL, KC_TRNS, KC_TRNS, KC_PAUS, KC_PGUP, KC_TRNS, - KC_VOLD, KC_MRWD, KC_MFFD, KC_MPLY, KC_MSTP, KC_TRNS, KC_MPRV, KC_PGDN, KC_MNXT - ), - /* Fn Layer [2] */ - [2] = LAYOUT_60_ansi_arrow(KC_TRNS, KC_TRNS, KC_TRNS, 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_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, 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 - ) + // Default Layer + [_BASE] = LAYOUT_60_ansi_arrow( + 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_RSFT, KC_UP, KC_SLSH, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, LT(2, KC_RALT), LT(1, KC_RCTL), KC_LEFT, KC_DOWN, KC_RGHT + ), + // Fn Layer 1 + [_FN] = LAYOUT_60_ansi_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_BRIU, KC_TRNS, KC_TRNS, KC_END, RESET, KC_TRNS, KC_TRNS, KC_TRNS, KC_INS, KC_TRNS, KC_PSCR, KC_TRNS, KC_TRNS, KC_EJCT, + KC_BRID, KC_TRNS, KC_SLCK, KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MUTE, + KC_VOLU, KC_TRNS, KC_TRNS, KC_CALC, KC_TRNS, KC_TRNS, KC_NLCK, KC_MAIL, KC_TRNS, KC_TRNS, KC_PAUS, KC_PGUP, KC_TRNS, + KC_VOLD, KC_MRWD, KC_MFFD, KC_MPLY, KC_MSTP, KC_TRNS, KC_MPRV, KC_PGDN, KC_MNXT + ), + // Fn Layer 2 + [_SETTINGS] = LAYOUT_60_ansi_arrow( + KC_TRNS, KC_TRNS, KC_TRNS, 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_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, 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 + ) }; void keyboard_post_init_user(void) { - rgblight_enable_noeeprom(); - rgblight_sethsv_noeeprom(0, 0, 0); + rgblight_enable_noeeprom(); + rgblight_sethsv_noeeprom(0, 0, 0); } -/* RGB Lighting/LED/Underglow as Caps Lock, Num Lock, Scroll Lock, and Layer Indicator */ - void update_led(void) { - /* Num Lock Indicator */ - if (host_keyboard_led_state().num_lock) { - rgblight_setrgb(225, 8, 0); - } - /* Scroll Lock Indicator */ - if (host_keyboard_led_state().scroll_lock) { - rgblight_setrgb(241, 190, 72); - } - } +// RGB Lighting/LED/Underglow as Caps Lock, Num Lock, Scroll Lock, and Layer Indicator +void update_led(void) { + // Num Lock Indicator + if (host_keyboard_led_state().num_lock) { + rgblight_setrgb(225, 8, 0); + } + // Scroll Lock Indicator + if (host_keyboard_led_state().scroll_lock) { + rgblight_setrgb(255, 110, 0); + } +} - void led_set_user(uint8_t usb_led) { - /* Caps Lock Indicator */ - if (IS_LED_ON(usb_led, USB_LED_CAPS_LOCK)) { - writePinLow(B2); - rgblight_setrgb(100, 255, 100); +void led_set_user(uint8_t usb_led) { + // Caps Lock Indicator + if (IS_LED_ON(usb_led, USB_LED_CAPS_LOCK)) { + writePinLow(B2); + rgblight_setrgb(100, 255, 100); + } + // Layer Indicator + else { + switch (get_highest_layer(layer_state)) { + // Fn Layer 1 Indicator + case _FN: + rgblight_setrgb(100, 255, 100); + break; + // Fn Layer 2 Indicator + case _SETTINGS: + rgblight_setrgb(100, 255, 100); + break; + // Default Layer Indicator + case _BASE: + rgblight_setrgb(0, 0, 0); + break; } - /* Layer Indicator */ - else { - switch (get_highest_layer(layer_state)) { - /* Fn Layer [1] Indicator */ - case 1: - rgblight_setrgb(255, 110, 0); - break; - /* Fn Layer [2] Indicator */ - case 2: - rgblight_setrgb(255, 110, 0); - break; - /* Default Layer [0] Indicator */ - default: - rgblight_setrgb(0, 0, 0); - break; - } - update_led(); - } - } + update_led(); + } +} layer_state_t layer_state_set_user(layer_state_t state) { - update_led(); - return state; + update_led(); + return state; } diff --git a/keyboards/dz60/keymaps/mrsendyyk/readme.md b/keyboards/dz60/keymaps/mrsendyyk/readme.md index ae5ad2228859..838630221852 100644 --- a/keyboards/dz60/keymaps/mrsendyyk/readme.md +++ b/keyboards/dz60/keymaps/mrsendyyk/readme.md @@ -1,79 +1,79 @@ # Sendy YK's 60% ANSI Arrow Layout and Keymap -This is Sendy YK's [60% ANSI Arrow Layout](https://github.com/qmk/qmk_firmware/blob/master/layouts/default/60_ansi_arrow/info.json) and [Keymap (with RGB Lighting/LED/Underglow as Caps Lock, Num Lock, Scroll Lock, and Layer Indicator)](https://github.com/qmk/qmk_firmware/blob/master/layouts/community/60_ansi_arrow/mrsendyyk/keymap.c). +[https://mr.sendyyk.com](https://mr.sendyyk.com) ## 60% ANSI Arrow Layout -![LAYOUT_60_ansi_arrow](https://raw.githubusercontent.com/mrsendyyk/my_qmk/master/kbdfans_tofu_60_keyboard/assets/dz60_layout_60_ansi_arrow.png) +![LAYOUT_60_ansi_arrow](https://raw.githubusercontent.com/mrsendyyk/my_qmk/master/dz60/assets/layout-60-ansi-arrow.png) ## Keymap -### Default Layer [0] +### Default Layer -![Default Layer [0]](https://raw.githubusercontent.com/mrsendyyk/my_qmk/master/kbdfans_tofu_60_keyboard/assets/dz60_mrsendyyk_0.png) +![_BASE](https://raw.githubusercontent.com/mrsendyyk/my_qmk/master/dz60/assets/layout-60-ansi-arrow-keymap---layer-0.png) -### Fn Layer [1] +### Fn Layer 1 Press and hold *right* **Ctrl** key. -![Fn Layer [1]](https://raw.githubusercontent.com/mrsendyyk/my_qmk/master/kbdfans_tofu_60_keyboard/assets/dz60_mrsendyyk_1.png) +![_FN](https://raw.githubusercontent.com/mrsendyyk/my_qmk/master/dz60/assets/layout-60-ansi-arrow-keymap---layer-1.png) -### Fn Layer [2] +### Fn Layer 2 Press and hold *right* **Alt** key. -![Fn Layer [2]](https://raw.githubusercontent.com/mrsendyyk/my_qmk/master/kbdfans_tofu_60_keyboard/assets/dz60_mrsendyyk_2.png) +![_SETTINGS](https://raw.githubusercontent.com/mrsendyyk/my_qmk/master/dz60/assets/layout-60-ansi-arrow-keymap---layer-2.png) ### RGB Lighting/LED/Underglow as Caps Lock, Num Lock, Scroll Lock, and Layer Indicator #### Caps Lock Indicator ```c -/* Caps Lock Indicator */ - if (IS_LED_ON(usb_led, USB_LED_CAPS_LOCK)) { - writePinLow(B2); - rgblight_setrgb(100, 255, 100); - } + // Caps Lock Indicator + if (IS_LED_ON(usb_led, USB_LED_CAPS_LOCK)) { + writePinLow(B2); + rgblight_setrgb(100, 255, 100); + } ``` #### Num Lock Indicator ```c -/* Num Lock Indicator */ - if (host_keyboard_led_state().num_lock) { - rgblight_setrgb(225, 8, 0); - } + // Num Lock Indicator + if (host_keyboard_led_state().num_lock) { + rgblight_setrgb(225, 8, 0); + } ``` #### Scroll Lock Indicator ```c -/* Scroll Lock Indicator */ - if (host_keyboard_led_state().scroll_lock) { - rgblight_setrgb(241, 190, 72); - } + // Scroll Lock Indicator + if (host_keyboard_led_state().scroll_lock) { + rgblight_setrgb(255, 110, 0); + } ``` #### Layer Indicator ```c -/* Layer Indicator */ - else { - switch (get_highest_layer(layer_state)) { - /* Fn Layer [1] Indicator */ - case 1: - rgblight_setrgb(255, 110, 0); - break; - /* Fn Layer [2] Indicator */ - case 2: - rgblight_setrgb(255, 110, 0); - break; - /* Default Layer [0] Indicator */ - default: - rgblight_setrgb(0, 0, 0); - break; - } - update_led(); - } + // Layer Indicator + else { + switch (get_highest_layer(layer_state)) { + // Fn Layer 1 Indicator + case _FN: + rgblight_setrgb(100, 255, 100); + break; + // Fn Layer 2 Indicator + case _SETTINGS: + rgblight_setrgb(100, 255, 100); + break; + // Default Layer Indicator + case _BASE: + rgblight_setrgb(0, 0, 0); + break; + } + update_led(); + } ``` ## Build The Firmware From b3508271f86c553b96eb3d2537d6d46423157e15 Mon Sep 17 00:00:00 2001 From: MakotoKurauchi Date: Tue, 22 Sep 2020 05:40:53 +0900 Subject: [PATCH 833/930] add VIA support for Quick7 (#10281) * update "Hardware Availability" * add a section of "How to build" * update "Hardware Supported" * add VIA keymaps * add 2 layers to VIA keymaps Co-authored-by: keyaki-namiki <28521374+keyaki-namiki@users.noreply.github.com> --- .../yushakobo/quick7/keymaps/via/keymap.c | 84 +++++++++++++++++++ .../yushakobo/quick7/keymaps/via/readme.md | 27 ++++++ .../yushakobo/quick7/keymaps/via/rules.mk | 1 + 3 files changed, 112 insertions(+) create mode 100644 keyboards/yushakobo/quick7/keymaps/via/keymap.c create mode 100644 keyboards/yushakobo/quick7/keymaps/via/readme.md create mode 100644 keyboards/yushakobo/quick7/keymaps/via/rules.mk diff --git a/keyboards/yushakobo/quick7/keymaps/via/keymap.c b/keyboards/yushakobo/quick7/keymaps/via/keymap.c new file mode 100644 index 000000000000..9c64042bc5d6 --- /dev/null +++ b/keyboards/yushakobo/quick7/keymaps/via/keymap.c @@ -0,0 +1,84 @@ +/* Copyright 2020 yushakobo + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public 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, + _FUNC1, + _VIA1, + _VIA2 +}; + +// Defines the keycodes used by our macros in process_record_user +enum custom_keycodes { + YUSHAURL = SAFE_RANGE +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* Base */ + [_BASE] = LAYOUT( + KC_MUTE, MO(_FUNC1), RGB_MOD, + S(KC_TAB), KC_UP, KC_TAB, + KC_LEFT, KC_DOWN, KC_RGHT + ), + [_FUNC1] = LAYOUT( + RESET, KC_TRNS, RGB_TOG, + KC_HOME, KC_VOLU, KC_END, + KC_MPRV, KC_VOLD, KC_MNXT + ), + [_VIA1] = LAYOUT( + YUSHAURL,XXXXXXX, XXXXXXX, + XXXXXXX, XXXXXXX, XXXXXXX, + XXXXXXX, XXXXXXX, XXXXXXX + ), + [_VIA2] = LAYOUT( + XXXXXXX, XXXXXXX, XXXXXXX, + XXXXXXX, XXXXXXX, XXXXXXX, + XXXXXXX, XXXXXXX, XXXXXXX + ) +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case YUSHAURL: + if (record->event.pressed) { + // when keycode QMKURL is pressed + SEND_STRING("https://yushakobo.jp/\n"); + } else { + // when keycode QMKURL is released + } + break; + } + return true; +} + +void encoder_update_user(uint8_t index, bool clockwise) { + if (index == 0) { // Left encoder + if (clockwise) { + tap_code(KC_VOLU); + } else { + tap_code(KC_VOLD); + } + } + else if (index == 1) { // Right encoder + if (clockwise) { + rgblight_decrease_hue_noeeprom(); + } else { + rgblight_increase_hue_noeeprom(); + } + } +} diff --git a/keyboards/yushakobo/quick7/keymaps/via/readme.md b/keyboards/yushakobo/quick7/keymaps/via/readme.md new file mode 100644 index 000000000000..ff0978780e12 --- /dev/null +++ b/keyboards/yushakobo/quick7/keymaps/via/readme.md @@ -0,0 +1,27 @@ +# The default VIA keymap for quick7 + +#### Rotary Encoder is not configurable through VIA + +### Base Layer +``` +Left Encoder(CW: Vol+, CCW: Vol-) +Right Encoder(CW: RGB HUE-, CCW: RGB HUE+) +,----------- --------- ------------, +| MUTE | Func1 | RGB MODE | + ----------- --------- ------------ +| Shift+Tab | UP | TAB | + ----------- --------- ------------ +| LEFT | DOWN | RIGHT | +`----------- --------- ------------' +``` + +### Func1 Layer +``` +,----------- --------- ------------, +| RESET | Func1 | RGB TOGGLE | + ----------- --------- ------------ +| HOME | VOL+ | END | + ----------- --------- ------------ +| MEDIA << | VOL- | MEDIA >> | +`----------- --------- ------------' +``` \ No newline at end of file diff --git a/keyboards/yushakobo/quick7/keymaps/via/rules.mk b/keyboards/yushakobo/quick7/keymaps/via/rules.mk new file mode 100644 index 000000000000..036bd6d1c3ec --- /dev/null +++ b/keyboards/yushakobo/quick7/keymaps/via/rules.mk @@ -0,0 +1 @@ +VIA_ENABLE = yes \ No newline at end of file From e4cf0a40a5f42d04bc4b969935fba96018f6e1be Mon Sep 17 00:00:00 2001 From: Dan <14043624+delivrance@users.noreply.github.com> Date: Mon, 21 Sep 2020 23:06:51 +0200 Subject: [PATCH 834/930] [Keymap] Add delivrance's keymap for 40percentclub/mf68 (#10294) --- .../mf68/keymaps/delivrance/config.h | 42 ++++ .../mf68/keymaps/delivrance/keymap.c | 232 ++++++++++++++++++ .../mf68/keymaps/delivrance/readme.md | 38 +++ .../mf68/keymaps/delivrance/rules.mk | 10 + 4 files changed, 322 insertions(+) create mode 100644 keyboards/40percentclub/mf68/keymaps/delivrance/config.h create mode 100644 keyboards/40percentclub/mf68/keymaps/delivrance/keymap.c create mode 100644 keyboards/40percentclub/mf68/keymaps/delivrance/readme.md create mode 100644 keyboards/40percentclub/mf68/keymaps/delivrance/rules.mk diff --git a/keyboards/40percentclub/mf68/keymaps/delivrance/config.h b/keyboards/40percentclub/mf68/keymaps/delivrance/config.h new file mode 100644 index 000000000000..7ae880576586 --- /dev/null +++ b/keyboards/40percentclub/mf68/keymaps/delivrance/config.h @@ -0,0 +1,42 @@ +/* + * Dan's Magicforce 68 (MF68) QMK Keyboard + * Copyright (C) Dan + * + * This file is part of Dan's MF68 QMK Keyboard. + * + * Dan's MF68 QMK Keyboard is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Dan's MF68 QMK Keyboard is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Dan's MF68 QMK Keyboard. If not, see . + */ + +#pragma once + +#undef MANUFACTURER +#define MANUFACTURER Dan + +#undef PRODUCT +#define PRODUCT Magicforce 68 QMK + +#undef BACKLIGHT_LEVELS +#define BACKLIGHT_LEVELS 20 + +// Disable backlight breathing +#undef BACKLIGHT_BREATHING + +// Set USB polling rate to 1000 Hz +#define USB_POLLING_INTERVAL_MS 1 + +// Enable NKRO on boot +#define FORCE_NKRO + +// Backlight idle timeout in seconds +#define BACKLIGHT_IDLE_TIMEOUT 1200 \ No newline at end of file diff --git a/keyboards/40percentclub/mf68/keymaps/delivrance/keymap.c b/keyboards/40percentclub/mf68/keymaps/delivrance/keymap.c new file mode 100644 index 000000000000..6f9179926c02 --- /dev/null +++ b/keyboards/40percentclub/mf68/keymaps/delivrance/keymap.c @@ -0,0 +1,232 @@ +/* + * Dan's Magicforce 68 (MF68) QMK Keyboard + * Copyright (C) Dan + * + * This file is part of Dan's MF68 QMK Keyboard. + * + * Dan's MF68 QMK Keyboard is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Dan's MF68 QMK Keyboard is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Dan's MF68 QMK Keyboard. If not, see . + */ + +#include QMK_KEYBOARD_H + +#define KC_ KC_TRNS + +#define KC_FN1 MO(_FN) +#define KC_FN2 LT(_FN, KC_CAPS) + +#define KC_BLUP BL_INC // Backlight increase +#define KC_BLDN BL_DEC // Backlight decrease +#define KC_BLTOG BL_TOGG // Backlight toggle +#define KC_TERM TERM_ON // Terminal mode on +#define KC_REC1 DM_REC1 // Record macro 1 +#define KC_PLY1 DM_PLY1 // Play macro 1 +#define KC_REC2 DM_REC2 // Record macro 2 +#define KC_PLY2 DM_PLY2 // Play macro 1 +#define KC_RSTP DM_RSTP // Stop macro recording + +enum { + _QWERTY, + _FN +}; + +/* ┏━━━━┳━━━━┳━━━━┳━━━━┳━━━━┳━━━━┳━━━━┳━━━━┳━━━━┳━━━━┳━━━━┳━━━━┳━━━━┳━━━━━━━━┓ ┏━━━━┳━━━━┓ + ┃Esc ┃ 1! ┃ 2@ ┃ 3# ┃ 4$ ┃ 5% ┃ 6^ ┃ 7& ┃ 8* ┃ 9( ┃ 0) ┃ -_ ┃ =+ ┃ ←─ ┃ ┃Ins ┃PgUp┃ + ┣━━━━┻━┳━━┻━┳━━┻━┳━━┻━┳━━┻━┳━━┻━┳━━┻━┳━━┻━┳━━┻━┳━━┻━┳━━┻━┳━━┻━┳━━┻━┳━━━━━━┫ ┣━━━━╋━━━━┫ + ┃ Tab ┃ Q ┃ W ┃ E ┃ R ┃ T ┃ Y ┃ U ┃ I ┃ O ┃ P ┃ [{ ┃ ]} ┃ \| ┃ ┃Del ┃PgDn┃ + ┣━━━━━━┻━┳━━┻━┳━━┻━┳━━┻━┳━━┻━┳━━┻━┳━━┻━┳━━┻━┳━━┻━┳━━┻━┳━━┻━┳━━┻━┳━━┻━━━━━━┫ ┗━━━━┻━━━━┛ + ┃ Caps ┃ A ┃ S ┃ D ┃ F ┃ G ┃ H ┃ J ┃ K ┃ L ┃ ;: ┃ '" ┃ Enter ┃ Magicforce + ┣━━━━━━━━┻━┳━━┻━┳━━┻━┳━━┻━┳━━┻━┳━━┻━┳━━┻━┳━━┻━┳━━┻━┳━━┻━┳━━┻━┳━━┻━━━━━━━━━┫ ┏━━━━┓ + ┃ Shift ┃ Z ┃ X ┃ C ┃ V ┃ B ┃ N ┃ M ┃ ,< ┃ .> ┃ /? ┃ Shift ┃ ┃ ↑ ┃ Dan + ┣━━━━━┳━━━━┻┳━━━┻━┳━━┻━━━━┻━━━━┻━━━━┻━━━━┻━━━━┻━━━┳┻━━━━╋━━━━┻┳━━━━━┳━━┳━━┻━╋━━━━╋━━━━┓ + ┃Ctrl ┃ GUI ┃ Alt ┃ ━━━━━ ┃ Alt ┃ Fn ┃Ctrl ┃ ┃ ← ┃ ↓ ┃ → ┃ + ┗━━━━━┻━━━━━┻━━━━━┻━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┻━━━━━┻━━━━━┻━━━━━┛ ┗━━━━┻━━━━┻━━━━┛ */ + +// clang-format off +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +[_QWERTY] = LAYOUT_kc( /* Default layer + ┏━━━━┳━━━━┳━━━━┳━━━━┳━━━━┳━━━━┳━━━━┳━━━━┳━━━━┳━━━━┳━━━━┳━━━━┳━━━━┳━━━━━━━━┓ ┏━━━━┳━━━━┓ */ + GESC, 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 0 ,MINS,EQL , BSPC , INS ,PGUP, /* + ┣━━━━┻━┳━━┻━┳━━┻━┳━━┻━┳━━┻━┳━━┻━┳━━┻━┳━━┻━┳━━┻━┳━━┻━┳━━┻━┳━━┻━┳━━┻━┳━━━━━━┫ ┣━━━━╋━━━━┫ */ + TAB , Q , W , E , R , T , Y , U , I , O , P ,LBRC,RBRC, BSLS , DEL ,PGDN, /* + ┣━━━━━━┻━┳━━┻━┳━━┻━┳━━┻━┳━━┻━┳━━┻━┳━━┻━┳━━┻━┳━━┻━┳━━┻━┳━━┻━┳━━┻━┳━━┻━━━━━━┫ ┗━━━━┻━━━━┛ */ + FN2 , A , S , D , F , G , H , J , K , L ,SCLN,QUOT, ENTER , /* + ┣━━━━━━━━┻━┳━━┻━┳━━┻━┳━━┻━┳━━┻━┳━━┻━┳━━┻━┳━━┻━┳━━┻━┳━━┻━┳━━┻━┳━━┻━━━━━━━━━┫ ┏━━━━┓ */ + LSFT , Z , X , C , V , B , N , M ,COMM,DOT ,SLSH, RSFT , UP , /* + ┣━━━━━┳━━━━┻┳━━━┻━┳━━┻━━━━┻━━━━┻━━━━┻━━━━┻━━━━┻━━━┳┻━━━━╋━━━━┻┳━━━━━┳━━┳━━┻━╋━━━━╋━━━━┓ */ + LCTL ,LGUI ,LALT , SPACE ,RALT , FN1 ,RCTL , LEFT,DOWN,RGHT /* + ┗━━━━━┻━━━━━┻━━━━━┻━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┻━━━━━┻━━━━━┻━━━━━┛ ┗━━━━┻━━━━┻━━━━┛ */), + +[_FN] = LAYOUT_kc( /* FN & CAPS layer + ┏━━━━┳━━━━┳━━━━┳━━━━┳━━━━┳━━━━┳━━━━┳━━━━┳━━━━┳━━━━┳━━━━┳━━━━┳━━━━┳━━━━━━━━┓ ┏━━━━┳━━━━┓ */ + GRV , F1 , F2 , F3 , F4 , F5 , F6 , F7 , F8 , F9 , F10, F11, F12, RSTP , PSCR,HOME, /* + ┣Esc ┻ 1! ┻ 2@ ┻ 3# ┻ 4$ ┻ 5% ┻ 6^ ┻ 7& ┻ 8* ┻ 9( ┻ 0) ┻ -_ ┻ =+ ┻━┳━ ←─ ━┫ ┣Ins ╋PgUp┫ */ + ,PLY1,PLY2, , , , , , 7 , 8 , 9 ,BLDN,BLUP,BLTOG , ,END , /* + ┣ Tab ━┻ Q ━┻ W ━┻ E ━┻ R ━┻ T ━┻ Y ━┻ U ━┻ I ━┻ O ━┻ P ━┻ [{ ┻ ]} ┻━ \| ━┫ ┗Del ┻PgDn┛ */ + , , , , , , , , 4 , 5 , 6 , , TERM , /* + ┣━ Caps ━┻ A ━┻ S ━┻ D ━┻ F ━┻ G ━┻ H ━┻ J ━┻ K ━┻ L ━┻ ;: ┻ '" ┻━ Enter ━┫ ┏━━━━┓ */ + ,REC1,REC2, , ,MSTP, ,MUTE, 1 , 2 , 3 , , VOLU, /* + ┣━━ Shift ━┻ Z ━┻ X ━┻ C ━┻ V ━┻ B ━┻ N ━┻ M ━┻ ,< ┻ .> ╋ /? ┻┳━━ Shift ━━┻━╋ ↑ ━╋━━━━┓ */ + , , , MPLY , 0 , , , MPRV,VOLD,MNXT /* + ┗Ctrl ┻ GUI ┻ Alt ┻━━━━━━━━━━━━ Space ━━━━━━━━━━━━┻ Alt ┻ Fn ━┻Ctrl ┛ ┗ ← ━┻ ↓ ━┻ → ━┛ */) +}; +// clang-format on + +// Initialization code +// ------------------- + +void keyboard_post_init_user(void) { + backlight_level(2); +} + +// Custom backlight driver +// ----------------------- + +// http://jared.geek.nz/2013/feb/linear-led-pwm +float cie1931(float x) { + x *= 100.0 / BACKLIGHT_LEVELS; + float y; + + if (x < 8) { + y = x / 902.3; + } else { + y = (x + 16.0) / 116.0; + y = y * y * y; + } + + return round(y * 255); +} + +void backlight_init_ports(void) { + setPinOutput(BACKLIGHT_PIN); + writePinLow(BACKLIGHT_PIN); + + TCCR1A = _BV(COM1A1) | _BV(WGM11); + TCCR1B = _BV(WGM13) | _BV(WGM12) | _BV(CS10); + + ICR1 = 0xFFU; // Set PWM levels to 255 (enables high-frequency PWM) +} + +void backlight_set(uint8_t level) { + if (level > BACKLIGHT_LEVELS) { + level = BACKLIGHT_LEVELS; + } + + if (level == 0) { + TCCR1A &= ~(_BV(COM1A1)); // Disable PWM + } else { + TCCR1A |= _BV(COM1A1); // Enable PWM + } + + OCR1A = cie1931(level); +} + +// Custom macro hooks +// ------------------ + +// Redefine with lower delay +void led_blink(void) { + backlight_toggle(); + wait_ms(25); + backlight_toggle(); +} + +void dynamic_macro_record_start_user(void) { + led_blink(); +} + +void dynamic_macro_play_user(int8_t direction) { + led_blink(); +} + +void dynamic_macro_record_key_user(int8_t direction, keyrecord_t *record) { + led_blink(); +} + +void dynamic_macro_record_end_user(int8_t direction) { + led_blink(); +} + +// Custom Caps Lock backlight behaviour +// ------------------------------------ + +void led_set_user(uint8_t usb_led) { + // This exists because I don't like the backlight to turn OFF when the Caps Lock is ON. + // That is, this will turn the backlight ON (at half the brightness) when the Caps Lock is ON as well. + static bool prev_is_caps_on; + bool is_caps_on = IS_LED_ON(usb_led, USB_LED_CAPS_LOCK); + + if (prev_is_caps_on != is_caps_on) { + prev_is_caps_on = is_caps_on; + + if (is_caps_on) { + backlight_set(BACKLIGHT_LEVELS / 2); + } else { + if (is_backlight_enabled()) { + backlight_set(get_backlight_level()); + } else { + backlight_set(0); + } + } + } + + // Turn on the Pro Micro's on-board LEDs for Caps Lock + if (IS_LED_ON(usb_led, USB_LED_CAPS_LOCK)) { + // Set to low + setPinOutput(B0); + writePinLow(B0); + setPinOutput(D5); + writePinLow(D5); + } else { + // Set to Hi-Z + setPinInput(B0); + setPinInput(D5); + } +} + +// Backlight idle timeout feature +// ------------------------------ + +static uint32_t timer; +static bool is_idle; + +void matrix_scan_user() { + // Check the timer only if the keyboard is not idle + if (!is_idle) { + if (timer_elapsed32(timer) >= (uint32_t) BACKLIGHT_IDLE_TIMEOUT * 1000) { + is_idle = true; + + // Both backlight_level and backlight_level_noeeprom modify the global backlight config (not useful) + // Instead, use backlight_set in order to restore the current backlight level later on + backlight_set(0); + } + } +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + // Reset timer on each keypress + timer = timer_read32(); + + // Enable backlight back only when keyboard is idling (which implies the backlight was turned off previously) + if (is_idle) { + is_idle = false; + + // Set back the original backlight level only if it is actually enabled globally + if (is_backlight_enabled()) { + // The current backlight level can be obtained with get_backlight_level + backlight_set(get_backlight_level()); + } + } + + return true; +} diff --git a/keyboards/40percentclub/mf68/keymaps/delivrance/readme.md b/keyboards/40percentclub/mf68/keymaps/delivrance/readme.md new file mode 100644 index 000000000000..158235b5ef30 --- /dev/null +++ b/keyboards/40percentclub/mf68/keymaps/delivrance/readme.md @@ -0,0 +1,38 @@ +# Dan's Magicforce 68 (MF68) QMK Keyboard + +> https://github.com/delivrance + +``` +┏━━━━┳━━━━┳━━━━┳━━━━┳━━━━┳━━━━┳━━━━┳━━━━┳━━━━┳━━━━┳━━━━┳━━━━┳━━━━┳━━━━━━━━┓ ┏━━━━┳━━━━┓ +┃Esc ┃ 1! ┃ 2@ ┃ 3# ┃ 4$ ┃ 5% ┃ 6^ ┃ 7& ┃ 8* ┃ 9( ┃ 0) ┃ -_ ┃ =+ ┃ ←─ ┃ ┃Ins ┃PgUp┃ +┣━━━━┻━┳━━┻━┳━━┻━┳━━┻━┳━━┻━┳━━┻━┳━━┻━┳━━┻━┳━━┻━┳━━┻━┳━━┻━┳━━┻━┳━━┻━┳━━━━━━┫ ┣━━━━╋━━━━┫ +┃ Tab ┃ Q ┃ W ┃ E ┃ R ┃ T ┃ Y ┃ U ┃ I ┃ O ┃ P ┃ [{ ┃ ]} ┃ \| ┃ ┃Del ┃PgDn┃ +┣━━━━━━┻━┳━━┻━┳━━┻━┳━━┻━┳━━┻━┳━━┻━┳━━┻━┳━━┻━┳━━┻━┳━━┻━┳━━┻━┳━━┻━┳━━┻━━━━━━┫ ┗━━━━┻━━━━┛ +┃ Caps ┃ A ┃ S ┃ D ┃ F ┃ G ┃ H ┃ J ┃ K ┃ L ┃ ;: ┃ '" ┃ Enter ┃ Magicforce +┣━━━━━━━━┻━┳━━┻━┳━━┻━┳━━┻━┳━━┻━┳━━┻━┳━━┻━┳━━┻━┳━━┻━┳━━┻━┳━━┻━┳━━┻━━━━━━━━━┫ ┏━━━━┓ +┃ Shift ┃ Z ┃ X ┃ C ┃ V ┃ B ┃ N ┃ M ┃ ,< ┃ .> ┃ /? ┃ Shift ┃ ┃ ↑ ┃ Dan +┣━━━━━┳━━━━┻┳━━━┻━┳━━┻━━━━┻━━━━┻━━━━┻━━━━┻━━━━┻━━━┳┻━━━━╋━━━━┻┳━━━━━┳━━┳━━┻━╋━━━━╋━━━━┓ +┃Ctrl ┃ GUI ┃ Alt ┃ ━━━━━ ┃ Alt ┃ Fn ┃Ctrl ┃ ┃ ← ┃ ↓ ┃ → ┃ +┗━━━━━┻━━━━━┻━━━━━┻━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┻━━━━━┻━━━━━┻━━━━━┛ ┗━━━━┻━━━━┻━━━━┛ +``` + +## Features + +- Right ALT and FN keys swapped. +- USB Polling rate set to 1000 Hz (1 ms). +- Dynamic macros enabled (2 macros). +- Transient EEPROM to avoid wearing (r/w from/to RAM). +- NKRO enabled on boot (up to 248 keys at once). +- CAPS LOCK key used as alias to the FN key. +- Pro Micro's on-board LEDs used for CAPS LOCK status. +- Backlight also used as CAPS LOCK status indicator. +- Both Grave and Tilde characters embedded in ESC. +- Media control keys and extra number keys (numpad). +- Flicker-free backlight thanks to high-frequency PWM mode. +- Linear backlight brightness intensity (better for human eyes). +- Backlight turns off automatically after 20 minutes idle. +- Backlight brightness levels set to 20 (5% steps) + 1 (off). +- Backlight breathing completely disabled. +- Link Time Optimizations to reduce compiled size. +- QMK Terminal enabled for fun (pretty useless in practice). +- Performing ~1550 matrix scans per second. diff --git a/keyboards/40percentclub/mf68/keymaps/delivrance/rules.mk b/keyboards/40percentclub/mf68/keymaps/delivrance/rules.mk new file mode 100644 index 000000000000..5ac2ce5ccbfc --- /dev/null +++ b/keyboards/40percentclub/mf68/keymaps/delivrance/rules.mk @@ -0,0 +1,10 @@ +BACKLIGHT_DRIVER = custom +NKRO_ENABLE = yes +TERMINAL_ENABLE = yes +DYNAMIC_MACRO_ENABLE = yes + +# Use RAM (fake EEPROM, transient) instead of real EEPROM +EEPROM_DRIVER = transient + +# LTO: Link Time Optimizations. Reduce compiled size +LTO_ENABLE = yes \ No newline at end of file From 6bebb1233dfe2f6f939850e6c42b1babc8efbf38 Mon Sep 17 00:00:00 2001 From: Brandon Schlack Date: Mon, 21 Sep 2020 14:44:18 -0700 Subject: [PATCH 835/930] Enable Extrakey in VIA for CFTKB keyboards (#10308) --- keyboards/coseyfannitutti/discipad/keymaps/via/rules.mk | 1 - keyboards/coseyfannitutti/discipline/keymaps/via/rules.mk | 3 +-- keyboards/coseyfannitutti/romeo/keymaps/via/rules.mk | 3 +-- 3 files changed, 2 insertions(+), 5 deletions(-) diff --git a/keyboards/coseyfannitutti/discipad/keymaps/via/rules.mk b/keyboards/coseyfannitutti/discipad/keymaps/via/rules.mk index 00c11acccda3..fcb7b9eab6a7 100644 --- a/keyboards/coseyfannitutti/discipad/keymaps/via/rules.mk +++ b/keyboards/coseyfannitutti/discipad/keymaps/via/rules.mk @@ -1,4 +1,3 @@ VIA_ENABLE = yes LTO_ENABLE = yes -EXTRAKEY_ENABLE = no MOUSEKEY_ENABLE = no diff --git a/keyboards/coseyfannitutti/discipline/keymaps/via/rules.mk b/keyboards/coseyfannitutti/discipline/keymaps/via/rules.mk index d0e4977b849b..fcb7b9eab6a7 100644 --- a/keyboards/coseyfannitutti/discipline/keymaps/via/rules.mk +++ b/keyboards/coseyfannitutti/discipline/keymaps/via/rules.mk @@ -1,4 +1,3 @@ VIA_ENABLE = yes LTO_ENABLE = yes -EXTRAKEY_ENABLE = no -MOUSEKEY_ENABLE = no \ No newline at end of file +MOUSEKEY_ENABLE = no diff --git a/keyboards/coseyfannitutti/romeo/keymaps/via/rules.mk b/keyboards/coseyfannitutti/romeo/keymaps/via/rules.mk index d0e4977b849b..fcb7b9eab6a7 100644 --- a/keyboards/coseyfannitutti/romeo/keymaps/via/rules.mk +++ b/keyboards/coseyfannitutti/romeo/keymaps/via/rules.mk @@ -1,4 +1,3 @@ VIA_ENABLE = yes LTO_ENABLE = yes -EXTRAKEY_ENABLE = no -MOUSEKEY_ENABLE = no \ No newline at end of file +MOUSEKEY_ENABLE = no From ebbcb8399824cc66103b5f7362d84a9bb40874ba Mon Sep 17 00:00:00 2001 From: Dan Date: Mon, 21 Sep 2020 17:47:46 -0400 Subject: [PATCH 836/930] Add Amethyst keybindings for some dcompact implementations (#10345) * Fix missing VAI * Add amethyst keybindings * Add amethyst bindings for planck --- .../keebio/iris/keymaps/dcompact/keymap.c | 21 ++++++++++++--- keyboards/planck/keymaps/dcompact/keymap.c | 26 ++++++++++++++----- 2 files changed, 37 insertions(+), 10 deletions(-) diff --git a/keyboards/keebio/iris/keymaps/dcompact/keymap.c b/keyboards/keebio/iris/keymaps/dcompact/keymap.c index ec1ffac8c18e..90e48c9c925a 100644 --- a/keyboards/keebio/iris/keymaps/dcompact/keymap.c +++ b/keyboards/keebio/iris/keymaps/dcompact/keymap.c @@ -9,6 +9,19 @@ #define WKSP_U LALT(LCTL(KC_UP)) #define WKSP_R LALT(LCTL(KC_RGHT)) +#define AM_CYC A(S(KC_SPC)) +#define AM_SHR A(S(KC_COMM)) +#define AM_GRW A(S(KC_DOT)) +#define AM_REL A(S(KC_Z)) +#define AM_LFT A(S(KC_H)) +#define AM_RGH A(S(KC_L)) +#define AM_CW A(S(KC_K)) +#define AM_CCW A(S(KC_J)) +#define AM_TLL A(S(KC_1)) +#define AM_TLW A(S(KC_2)) +#define AM_BSP A(S(KC_3)) +#define AM_FUL A(S(KC_4)) + enum custom_layers { _BASE, _LOWER, @@ -52,11 +65,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_LOWER] = LAYOUT( //┌────────┬────────┬────────┬────────┬────────┬────────┐ ┌────────┬────────┬────────┬────────┬────────┬────────┐ - XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_HOME, KC_PGDN, KC_PGUP, KC_END, XXXXXXX, + XXXXXXX, AM_CYC, AM_SHR, AM_GRW, AM_REL, 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, AM_LFT, AM_CCW, AM_CW, AM_RGH, 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, AM_TLL, AM_TLW, AM_BSP, AM_FUL, XXXXXXX, XXXXXXX, WKSP_L, WKSP_D, WKSP_U, WKSP_R, XXXXXXX, //├────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┤ _______, XXXXXXX, _______, _______, _______, _______, XXXXXXX, XXXXXXX, XXXXXXX, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, //└────────┴────────┴────────┴───┬────┴───┬────┴───┬────┴───┬────┘ └───┬────┴───┬────┴───┬────┴───┬────┴────────┴────────┴────────┘ @@ -138,7 +151,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { //┌────────┬────────┬────────┬────────┬────────┬────────┐ ┌────────┬────────┬────────┬────────┬────────┬────────┐ _______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL, //├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤ - _______, _______, _______, _______, _______, BL_STEP, RGB_TOG, RGB_HUI, RGB_SAI, RGB_SAI, _______, _______, + _______, _______, _______, _______, _______, BL_STEP, RGB_TOG, RGB_HUI, RGB_SAI, RGB_VAI, _______, _______, //├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤ _______, _______, _______, _______, _______, BL_BRTG, RGB_MOD, RGB_HUD, RGB_SAD, RGB_VAD, _______, _______, //├────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┤ diff --git a/keyboards/planck/keymaps/dcompact/keymap.c b/keyboards/planck/keymaps/dcompact/keymap.c index cb4cd3f5b9e1..0b48f30ac44f 100644 --- a/keyboards/planck/keymaps/dcompact/keymap.c +++ b/keyboards/planck/keymaps/dcompact/keymap.c @@ -26,6 +26,20 @@ #define WKSP_U LALT(LCTL(KC_UP)) #define WKSP_R LALT(LCTL(KC_RGHT)) +#define AM_CYC A(S(KC_SPC)) +#define AM_SHR A(S(KC_COMM)) +#define AM_GRW A(S(KC_DOT)) +#define AM_REL A(S(KC_Z)) +#define AM_LFT A(S(KC_H)) +#define AM_RGH A(S(KC_L)) +#define AM_CW A(S(KC_K)) +#define AM_CCW A(S(KC_J)) +#define AM_TLL A(S(KC_1)) +#define AM_TLW A(S(KC_2)) +#define AM_BSP A(S(KC_3)) +#define AM_FUL A(S(KC_4)) + + extern keymap_config_t keymap_config; enum planck_layers { @@ -78,19 +92,19 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Lower * ,-----------------------------------------------------------------------------------. - * | | | | | | | | Home |PgDwn | PgUp | End | | + * | |AmCycl|AmShrk|AmGrow|AmReld| | | Home |PgDwn | PgUp | End | | * |------+------+------+------+------+-------------+------+------+------+------+------| - * | |PrScr | Menu | | | | | Left | Down | Up |Right | | + * | |AmLeft|AmCcw |AmCw |AmRght| | | Left | Down | Up |Right | | * |------+------+------+------+------+------|------+------+------+------+------+------| - * | |CapsLk|NumLck| Ins | | | |WkLeft|WkDown| WkUp |WkRigh| | + * | |AmTall|AmTllW|AmBsp |AmFull| | |WkLeft|WkDown| WkUp |WkRigh| | * |------+------+------+------+------+------+------+------+------+------+------+------| * | | | | | | | |Raise | | | | | * `-----------------------------------------------------------------------------------' */ [_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, AM_CYC, AM_SHR, AM_GRW, AM_REL, XXXXXXX, XXXXXXX, KC_HOME, KC_PGDN, KC_PGUP, KC_END, XXXXXXX, + XXXXXXX, AM_LFT, AM_CCW, AM_CW, AM_RGH, XXXXXXX, XXXXXXX, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, XXXXXXX, + XXXXXXX, AM_TLL, AM_TLW, AM_BSP, AM_FUL, XXXXXXX, XXXXXXX, WKSP_L, WKSP_D, WKSP_U, WKSP_R, XXXXXXX, _______, XXXXXXX, _______, _______, _______, _______, XXXXXXX, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX ), From e3f9569acd42854bbadfbf27a0f8b59271d09284 Mon Sep 17 00:00:00 2001 From: Samuel Baumgartner Date: Tue, 22 Sep 2020 02:25:29 +0200 Subject: [PATCH 837/930] bm60rgb_iso: add underglow support (#10307) * add underglow definition --- keyboards/bm60rgb_iso/bm60rgb_iso.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/keyboards/bm60rgb_iso/bm60rgb_iso.c b/keyboards/bm60rgb_iso/bm60rgb_iso.c index 3fa1bc89825b..4e292bc54966 100644 --- a/keyboards/bm60rgb_iso/bm60rgb_iso.c +++ b/keyboards/bm60rgb_iso/bm60rgb_iso.c @@ -32,7 +32,9 @@ led_config_t g_led_config = { { // LShift, <, Z, X, C, V, B, N, M, ,, ., /, Shift, Up, { 3, 48 }, { 22, 48 }, { 33, 48 }, { 48, 48 }, { 63, 48 }, { 78, 48 }, { 93, 48 }, { 108, 48 }, { 123, 48 }, { 138, 48 }, { 153, 48 }, { 168, 48 }, { 194, 48 }, { 213, 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 } + { 3, 64 }, { 22, 64 }, { 33, 64 }, { 101, 64 }, { 135, 64 }, { 153, 64 }, { 195, 64 }, { 210, 64 }, { 225, 64 }, + // UNDERGLOW + { 216, 32 }, { 180, 32 }, { 144, 32 }, { 108, 32 }, { 72, 32 }, { 36, 32 } }, { // 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, @@ -43,6 +45,8 @@ led_config_t g_led_config = { { // LShift,<, Z, X, C, V, B, N, M, ,, ., Shift, Up, / 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 4, // Ctrl, GUI, Alt, Space, RAlt, FN, Left, Down, Right - 1, 1, 1, 4, 1, 1, 1, 1, 1 + 1, 1, 1, 4, 1, 1, 1, 1, 1, + // UNDERGLOW + 2, 2, 2, 2, 2, 2 } }; #endif From bc8fe91fd10b290c43c25c2890ad64e73948db47 Mon Sep 17 00:00:00 2001 From: "Eric N. Vander Weele" Date: Mon, 21 Sep 2020 20:29:04 -0400 Subject: [PATCH 838/930] massdrop/alt: Remove unused user functions and config in default keymaps (#10313) The default keymaps don't make use of the global `keymap_config` variable nor the `matrix_*_user()` functions. Therefore, remove them to avoid confusion for future keymap authors. --- keyboards/massdrop/alt/keymaps/default/keymap.c | 10 ---------- keyboards/massdrop/alt/keymaps/default_md/keymap.c | 14 ++------------ keyboards/massdrop/alt/keymaps/mac/keymap.c | 10 ---------- keyboards/massdrop/alt/keymaps/mac_md/keymap.c | 10 ---------- 4 files changed, 2 insertions(+), 42 deletions(-) diff --git a/keyboards/massdrop/alt/keymaps/default/keymap.c b/keyboards/massdrop/alt/keymaps/default/keymap.c index 52fd35b45476..0d3e7ccb7a37 100644 --- a/keyboards/massdrop/alt/keymaps/default/keymap.c +++ b/keyboards/massdrop/alt/keymaps/default/keymap.c @@ -10,8 +10,6 @@ enum alt_keycodes { MD_BOOT, //Restart into bootloader after hold timeout }; -keymap_config_t keymap_config; - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [0] = LAYOUT_65_ansi_blocker( 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, \ @@ -38,14 +36,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ }; -// 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) { -}; - #define MODS_SHIFT (get_mods() & MOD_BIT(KC_LSHIFT) || get_mods() & MOD_BIT(KC_RSHIFT)) #define MODS_CTRL (get_mods() & MOD_BIT(KC_LCTL) || get_mods() & MOD_BIT(KC_RCTRL)) #define MODS_ALT (get_mods() & MOD_BIT(KC_LALT) || get_mods() & MOD_BIT(KC_RALT)) diff --git a/keyboards/massdrop/alt/keymaps/default_md/keymap.c b/keyboards/massdrop/alt/keymaps/default_md/keymap.c index 6523790f6da7..9894caf48eea 100644 --- a/keyboards/massdrop/alt/keymaps/default_md/keymap.c +++ b/keyboards/massdrop/alt/keymaps/default_md/keymap.c @@ -21,8 +21,6 @@ enum alt_keycodes { MD_BOOT //Restart into bootloader after hold timeout //Working }; -keymap_config_t keymap_config; - 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_DEL, \ @@ -49,14 +47,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ }; -// 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) { -}; - #define MODS_SHIFT (get_mods() & MOD_BIT(KC_LSHIFT) || get_mods() & MOD_BIT(KC_RSHIFT)) #define MODS_CTRL (get_mods() & MOD_BIT(KC_LCTL) || get_mods() & MOD_BIT(KC_RCTRL)) #define MODS_ALT (get_mods() & MOD_BIT(KC_LALT) || get_mods() & MOD_BIT(KC_RALT)) @@ -186,7 +176,7 @@ led_instruction_t led_instructions[] = { //Flags can be found in tmk_core/protocol/arm_atsam/led_matrix.h (prefixed with LED_FLAG_) //LED IDs can be found in config_led.h in the keyboard's directory //Examples are below - + //All LEDs use the user's selected pattern (this is the factory default) { .flags = LED_FLAG_USE_ROTATE_PATTERN }, @@ -195,7 +185,7 @@ led_instruction_t led_instructions[] = { //Specific LEDs use specified RGB values while all others are off // { .flags = LED_FLAG_MATCH_ID | LED_FLAG_USE_RGB, .id0 = 0xFF, .id1 = 0x00FF, .id2 = 0x0000FF00, .id3 = 0xFF000000, .r = 75, .g = 150, .b = 225 }, - + //All LEDs use the user's selected pattern //On layer 1, all key LEDs (except the top row which keeps active pattern) are red while all edge LEDs are green //When layer 1 is active, key LEDs use red (id0 32 - 16: 1111 1111 1111 1111 1000 0000 0000 0000 = 0xFFFF8000) (except top row 15 - 1) diff --git a/keyboards/massdrop/alt/keymaps/mac/keymap.c b/keyboards/massdrop/alt/keymaps/mac/keymap.c index 9f575b4f126a..70ce6198b48e 100644 --- a/keyboards/massdrop/alt/keymaps/mac/keymap.c +++ b/keyboards/massdrop/alt/keymaps/mac/keymap.c @@ -10,8 +10,6 @@ enum alt_keycodes { MD_BOOT, //Restart into bootloader after hold timeout }; -keymap_config_t keymap_config; - 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_DEL, \ @@ -38,14 +36,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ }; -// 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) { -}; - #define MODS_SHIFT (get_mods() & MOD_BIT(KC_LSHIFT) || get_mods() & MOD_BIT(KC_RSHIFT)) #define MODS_CTRL (get_mods() & MOD_BIT(KC_LCTL) || get_mods() & MOD_BIT(KC_RCTRL)) #define MODS_ALT (get_mods() & MOD_BIT(KC_LALT) || get_mods() & MOD_BIT(KC_RALT)) diff --git a/keyboards/massdrop/alt/keymaps/mac_md/keymap.c b/keyboards/massdrop/alt/keymaps/mac_md/keymap.c index 439e79399704..b3626c1b6113 100644 --- a/keyboards/massdrop/alt/keymaps/mac_md/keymap.c +++ b/keyboards/massdrop/alt/keymaps/mac_md/keymap.c @@ -21,8 +21,6 @@ enum alt_keycodes { MD_BOOT //Restart into bootloader after hold timeout //Working }; -keymap_config_t keymap_config; - 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_DEL, \ @@ -49,14 +47,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ }; -// 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) { -}; - #define MODS_SHIFT (get_mods() & MOD_BIT(KC_LSHIFT) || get_mods() & MOD_BIT(KC_RSHIFT)) #define MODS_CTRL (get_mods() & MOD_BIT(KC_LCTL) || get_mods() & MOD_BIT(KC_RCTRL)) #define MODS_ALT (get_mods() & MOD_BIT(KC_LALT) || get_mods() & MOD_BIT(KC_RALT)) From b86fa3daf3e9106177f627365c9540fdc47c6970 Mon Sep 17 00:00:00 2001 From: 2Moons-JP <57225836+2Moons-JP@users.noreply.github.com> Date: Tue, 22 Sep 2020 09:33:17 +0900 Subject: [PATCH 839/930] Copyright Updates for basekeys/slice (#10383) * Copyright Updates * Copyright Updates --- keyboards/basekeys/slice/config.h | 4 +-- .../basekeys/slice/keymaps/default/config.h | 30 +++++++++---------- .../basekeys/slice/keymaps/default/keymap.c | 15 ++++++++++ .../keymaps/default_split_left_space/config.h | 30 +++++++++---------- .../keymaps/default_split_left_space/keymap.c | 15 ++++++++++ keyboards/basekeys/slice/rev1/config.h | 3 +- .../slice/rev1/keymaps/2moons/config.h | 30 +++++++++---------- .../slice/rev1/keymaps/2moons/keymap.c | 15 ++++++++++ .../slice/rev1/keymaps/default_all/config.h | 30 +++++++++---------- .../slice/rev1/keymaps/default_all/keymap.c | 15 ++++++++++ .../keymaps/default_split_backspace/config.h | 30 +++++++++---------- .../keymaps/default_split_backspace/keymap.c | 15 ++++++++++ keyboards/basekeys/slice/rev1/rev1.c | 15 ++++++++++ keyboards/basekeys/slice/rev1/rev1.h | 15 ++++++++++ keyboards/basekeys/slice/rev1_rgb/config.h | 4 +-- .../rev1_rgb/keymaps/2moons_rgb/config.h | 30 +++++++++---------- .../rev1_rgb/keymaps/2moons_rgb/keymap.c | 15 ++++++++++ keyboards/basekeys/slice/rev1_rgb/rev1_rgb.c | 15 ++++++++++ keyboards/basekeys/slice/rev1_rgb/rev1_rgb.h | 15 ++++++++++ keyboards/basekeys/slice/slice.c | 15 ++++++++++ keyboards/basekeys/slice/slice.h | 15 ++++++++++ keyboards/basekeys/slice/slice_font.c | 15 ++++++++++ 22 files changed, 288 insertions(+), 98 deletions(-) diff --git a/keyboards/basekeys/slice/config.h b/keyboards/basekeys/slice/config.h index cfb6bf4ffccd..e7e65de3b9d6 100644 --- a/keyboards/basekeys/slice/config.h +++ b/keyboards/basekeys/slice/config.h @@ -1,6 +1,5 @@ /* -Copyright 2012 Jun Wako -Copyright 2015 Jack Humbert +Copyright 2020 2Moons This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -15,7 +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 . */ - #pragma once #include "config_common.h" diff --git a/keyboards/basekeys/slice/keymaps/default/config.h b/keyboards/basekeys/slice/keymaps/default/config.h index d3acebb7e35f..3dc07fdac1d2 100644 --- a/keyboards/basekeys/slice/keymaps/default/config.h +++ b/keyboards/basekeys/slice/keymaps/default/config.h @@ -1,19 +1,19 @@ -/* Copyright 2020 2Moons - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General 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 2Moons +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License 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 */ diff --git a/keyboards/basekeys/slice/keymaps/default/keymap.c b/keyboards/basekeys/slice/keymaps/default/keymap.c index d6e5cefaee78..ffb64998e269 100644 --- a/keyboards/basekeys/slice/keymaps/default/keymap.c +++ b/keyboards/basekeys/slice/keymaps/default/keymap.c @@ -1,3 +1,18 @@ +/* Copyright 2020 2Moons + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public 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 "split_util.h" // Each layer gets a name for readability, which is then used in the keymap matrix below. diff --git a/keyboards/basekeys/slice/keymaps/default_split_left_space/config.h b/keyboards/basekeys/slice/keymaps/default_split_left_space/config.h index d3acebb7e35f..3dc07fdac1d2 100644 --- a/keyboards/basekeys/slice/keymaps/default_split_left_space/config.h +++ b/keyboards/basekeys/slice/keymaps/default_split_left_space/config.h @@ -1,19 +1,19 @@ -/* Copyright 2020 2Moons - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General 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 2Moons +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License 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 */ diff --git a/keyboards/basekeys/slice/keymaps/default_split_left_space/keymap.c b/keyboards/basekeys/slice/keymaps/default_split_left_space/keymap.c index 40d55bdc63fe..331dfc0fe435 100644 --- a/keyboards/basekeys/slice/keymaps/default_split_left_space/keymap.c +++ b/keyboards/basekeys/slice/keymaps/default_split_left_space/keymap.c @@ -1,3 +1,18 @@ +/* Copyright 2020 2Moons + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public 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 "split_util.h" // Each layer gets a name for readability, which is then used in the keymap matrix below. diff --git a/keyboards/basekeys/slice/rev1/config.h b/keyboards/basekeys/slice/rev1/config.h index d151d5873fa9..ea4d5d3dc3b4 100644 --- a/keyboards/basekeys/slice/rev1/config.h +++ b/keyboards/basekeys/slice/rev1/config.h @@ -1,6 +1,5 @@ /* -Copyright 2012 Jun Wako -Copyright 2015 Jack Humbert +Copyright 2020 2Moons This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/keyboards/basekeys/slice/rev1/keymaps/2moons/config.h b/keyboards/basekeys/slice/rev1/keymaps/2moons/config.h index 62ee1d1a9018..8f38938b10da 100644 --- a/keyboards/basekeys/slice/rev1/keymaps/2moons/config.h +++ b/keyboards/basekeys/slice/rev1/keymaps/2moons/config.h @@ -1,19 +1,19 @@ -/* Copyright 2020 2Moons - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General 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 2Moons +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License 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 */ diff --git a/keyboards/basekeys/slice/rev1/keymaps/2moons/keymap.c b/keyboards/basekeys/slice/rev1/keymaps/2moons/keymap.c index 5a9b14606d6f..97f7039a79cd 100644 --- a/keyboards/basekeys/slice/rev1/keymaps/2moons/keymap.c +++ b/keyboards/basekeys/slice/rev1/keymaps/2moons/keymap.c @@ -1,3 +1,18 @@ +/* Copyright 2020 2Moons + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public 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" diff --git a/keyboards/basekeys/slice/rev1/keymaps/default_all/config.h b/keyboards/basekeys/slice/rev1/keymaps/default_all/config.h index d3acebb7e35f..3dc07fdac1d2 100644 --- a/keyboards/basekeys/slice/rev1/keymaps/default_all/config.h +++ b/keyboards/basekeys/slice/rev1/keymaps/default_all/config.h @@ -1,19 +1,19 @@ -/* Copyright 2020 2Moons - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General 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 2Moons +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License 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 */ diff --git a/keyboards/basekeys/slice/rev1/keymaps/default_all/keymap.c b/keyboards/basekeys/slice/rev1/keymaps/default_all/keymap.c index 198c449b7ff4..34e1b7c43adb 100644 --- a/keyboards/basekeys/slice/rev1/keymaps/default_all/keymap.c +++ b/keyboards/basekeys/slice/rev1/keymaps/default_all/keymap.c @@ -1,3 +1,18 @@ +/* Copyright 2020 2Moons + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public 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 extern uint8_t is_master; diff --git a/keyboards/basekeys/slice/rev1/keymaps/default_split_backspace/config.h b/keyboards/basekeys/slice/rev1/keymaps/default_split_backspace/config.h index d3acebb7e35f..3dc07fdac1d2 100644 --- a/keyboards/basekeys/slice/rev1/keymaps/default_split_backspace/config.h +++ b/keyboards/basekeys/slice/rev1/keymaps/default_split_backspace/config.h @@ -1,19 +1,19 @@ -/* Copyright 2020 2Moons - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General 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 2Moons +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License 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 */ diff --git a/keyboards/basekeys/slice/rev1/keymaps/default_split_backspace/keymap.c b/keyboards/basekeys/slice/rev1/keymaps/default_split_backspace/keymap.c index b1423378ef9b..772f9f6f1f2c 100644 --- a/keyboards/basekeys/slice/rev1/keymaps/default_split_backspace/keymap.c +++ b/keyboards/basekeys/slice/rev1/keymaps/default_split_backspace/keymap.c @@ -1,3 +1,18 @@ +/* Copyright 2020 2Moons + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public 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 extern uint8_t is_master; diff --git a/keyboards/basekeys/slice/rev1/rev1.c b/keyboards/basekeys/slice/rev1/rev1.c index 520a869e57ba..a3c8f66fe098 100644 --- a/keyboards/basekeys/slice/rev1/rev1.c +++ b/keyboards/basekeys/slice/rev1/rev1.c @@ -1 +1,16 @@ +/* Copyright 2020 2Moons + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public 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/basekeys/slice/rev1/rev1.h b/keyboards/basekeys/slice/rev1/rev1.h index ae417d99c7b3..26a5da31bcf6 100644 --- a/keyboards/basekeys/slice/rev1/rev1.h +++ b/keyboards/basekeys/slice/rev1/rev1.h @@ -1,3 +1,18 @@ +/* Copyright 2020 2Moons + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License 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 "slice.h" diff --git a/keyboards/basekeys/slice/rev1_rgb/config.h b/keyboards/basekeys/slice/rev1_rgb/config.h index 1145d086470c..08afff765ae0 100644 --- a/keyboards/basekeys/slice/rev1_rgb/config.h +++ b/keyboards/basekeys/slice/rev1_rgb/config.h @@ -1,6 +1,5 @@ /* -Copyright 2012 Jun Wako -Copyright 2015 Jack Humbert +Copyright 2020 2Moons This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -15,7 +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 . */ - #pragma once /* USB Device descriptor parameter */ diff --git a/keyboards/basekeys/slice/rev1_rgb/keymaps/2moons_rgb/config.h b/keyboards/basekeys/slice/rev1_rgb/keymaps/2moons_rgb/config.h index 62ee1d1a9018..8f38938b10da 100644 --- a/keyboards/basekeys/slice/rev1_rgb/keymaps/2moons_rgb/config.h +++ b/keyboards/basekeys/slice/rev1_rgb/keymaps/2moons_rgb/config.h @@ -1,19 +1,19 @@ -/* Copyright 2020 2Moons - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General 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 2Moons +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License 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 */ diff --git a/keyboards/basekeys/slice/rev1_rgb/keymaps/2moons_rgb/keymap.c b/keyboards/basekeys/slice/rev1_rgb/keymaps/2moons_rgb/keymap.c index d9e5808a6f81..36bfb79abdd1 100644 --- a/keyboards/basekeys/slice/rev1_rgb/keymaps/2moons_rgb/keymap.c +++ b/keyboards/basekeys/slice/rev1_rgb/keymaps/2moons_rgb/keymap.c @@ -1,3 +1,18 @@ +/* Copyright 2020 2Moons + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public 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 "split_util.h" diff --git a/keyboards/basekeys/slice/rev1_rgb/rev1_rgb.c b/keyboards/basekeys/slice/rev1_rgb/rev1_rgb.c index 3cdec58c50dc..9ab3d2539a3a 100644 --- a/keyboards/basekeys/slice/rev1_rgb/rev1_rgb.c +++ b/keyboards/basekeys/slice/rev1_rgb/rev1_rgb.c @@ -1 +1,16 @@ +/* Copyright 2020 2Moons + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public 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_rgb.h" diff --git a/keyboards/basekeys/slice/rev1_rgb/rev1_rgb.h b/keyboards/basekeys/slice/rev1_rgb/rev1_rgb.h index 809c278db70e..31110018d357 100644 --- a/keyboards/basekeys/slice/rev1_rgb/rev1_rgb.h +++ b/keyboards/basekeys/slice/rev1_rgb/rev1_rgb.h @@ -1,3 +1,18 @@ +/* Copyright 2020 2Moons + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License 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 "slice.h" diff --git a/keyboards/basekeys/slice/slice.c b/keyboards/basekeys/slice/slice.c index 6aaf7217907a..2d7d111f9ae6 100644 --- a/keyboards/basekeys/slice/slice.c +++ b/keyboards/basekeys/slice/slice.c @@ -1 +1,16 @@ +/* Copyright 2020 2Moons + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ #include "slice.h" diff --git a/keyboards/basekeys/slice/slice.h b/keyboards/basekeys/slice/slice.h index 7d4f7ee5134c..bc3eb813a21a 100644 --- a/keyboards/basekeys/slice/slice.h +++ b/keyboards/basekeys/slice/slice.h @@ -1,3 +1,18 @@ +/* Copyright 2020 2Moons + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License 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" diff --git a/keyboards/basekeys/slice/slice_font.c b/keyboards/basekeys/slice/slice_font.c index f969f85c7ab1..b59fbcf5b94e 100644 --- a/keyboards/basekeys/slice/slice_font.c +++ b/keyboards/basekeys/slice/slice_font.c @@ -1,3 +1,18 @@ +/* Copyright 2020 2Moons + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ // This is the 'classic' fixed-space bitmap font for Adafruit_GFX since 1.0. // See gfxfont.h for newer custom bitmap font info. From dc037f139135e2321a71dda90ecee4535d363f28 Mon Sep 17 00:00:00 2001 From: Adam Gwilliam Date: Mon, 21 Sep 2020 19:57:00 -0500 Subject: [PATCH 840/930] update vendor id of 4x12 to match 3x4 and 5x12 for boardsource (#10306) --- keyboards/boardsource/4x12/config.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/keyboards/boardsource/4x12/config.h b/keyboards/boardsource/4x12/config.h index e8f858586cc6..b1314ca7f249 100644 --- a/keyboards/boardsource/4x12/config.h +++ b/keyboards/boardsource/4x12/config.h @@ -3,7 +3,7 @@ #include "config_common.h" /* USB Device descriptor parameter */ -#define VENDOR_ID 0xF7E0 +#define VENDOR_ID 0x4273 // "Bs" - Boardsource #define PRODUCT_ID 0x0412 #define DEVICE_VER 0x0000 #define MANUFACTURER Boardsource From c23667608c6ebb8f6d8a7f9b115144abd8794e00 Mon Sep 17 00:00:00 2001 From: Fred Silberberg Date: Mon, 21 Sep 2020 18:39:50 -0700 Subject: [PATCH 841/930] Add OLED driver function to determine if the screen is currently on (#10382) --- docs/feature_oled_driver.md | 4 ++++ drivers/oled/oled_driver.c | 2 ++ drivers/oled/oled_driver.h | 4 ++++ 3 files changed, 10 insertions(+) diff --git a/docs/feature_oled_driver.md b/docs/feature_oled_driver.md index d106d3d13ee0..9e33a321ce0d 100644 --- a/docs/feature_oled_driver.md +++ b/docs/feature_oled_driver.md @@ -300,6 +300,10 @@ bool oled_on(void); // Returns true if the screen was off or turns off bool oled_off(void); +// Returns true if the oled is currently on, false if it is +// not +bool is_oled_on(void); + // Basically it's oled_render, but with timeout management and oled_task_user calling! void oled_task(void); diff --git a/drivers/oled/oled_driver.c b/drivers/oled/oled_driver.c index 9ae737ca2d39..0e15c3c4b21a 100644 --- a/drivers/oled/oled_driver.c +++ b/drivers/oled/oled_driver.c @@ -534,6 +534,8 @@ bool oled_off(void) { return !oled_active; } +bool is_oled_on(void) { return oled_active; } + // Set the specific 8 lines rows of the screen to scroll. // 0 is the default for start, and 7 for end, which is the entire // height of the screen. For 128x32 screens, rows 4-7 are not used. diff --git a/drivers/oled/oled_driver.h b/drivers/oled/oled_driver.h index 9a4b98d2fdde..58e2bb7386e1 100644 --- a/drivers/oled/oled_driver.h +++ b/drivers/oled/oled_driver.h @@ -257,6 +257,10 @@ bool oled_on(void); // Returns true if the screen was off or turns off bool oled_off(void); +// Returns true if the oled is currently on, false if it is +// not +bool is_oled_on(void); + // Basically it's oled_render, but with timeout management and oled_task_user calling! void oled_task(void); From ccab502241f3028c2c10f20f0e319fb41dd965ca Mon Sep 17 00:00:00 2001 From: codecoffeecode Date: Mon, 21 Sep 2020 18:41:36 -0700 Subject: [PATCH 842/930] [Keymap] add codecoffeecode keymap for Preonic (#10364) * Adding preonic layout * deleting unnecessary files * Fixing spacing * I need to not commit things while I'm not sober * Update keyboards/preonic/keymaps/codecoffeecode/keymap.c * Update keyboards/preonic/keymaps/codecoffeecode/keymap.c * Update keyboards/preonic/keymaps/codecoffeecode/keymap.c * Adding license header --- .../preonic/keymaps/codecoffeecode/keymap.c | 81 +++++++++++++++++++ .../preonic/keymaps/codecoffeecode/readme.md | 1 + 2 files changed, 82 insertions(+) create mode 100644 keyboards/preonic/keymaps/codecoffeecode/keymap.c create mode 100644 keyboards/preonic/keymaps/codecoffeecode/readme.md diff --git a/keyboards/preonic/keymaps/codecoffeecode/keymap.c b/keyboards/preonic/keymaps/codecoffeecode/keymap.c new file mode 100644 index 000000000000..9264927ecb14 --- /dev/null +++ b/keyboards/preonic/keymaps/codecoffeecode/keymap.c @@ -0,0 +1,81 @@ +/* Copyright 2020 codecoffeecode + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public 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] = { + +/* Main Layer + * ,-----------------------------------------------------------------------------------. + * | Esc | 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 | Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | + * `-----------------------------------------------------------------------------------' + */ +[0] = LAYOUT_preonic_1x2uC( + 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_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_LCTL, KC_LALT, KC_LGUI, MO(1), KC_SPC, MO(2), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT +), + +/* Lower + * ,-----------------------------------------------------------------------------------. + * | ` | | | | | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | | | | | | | - | | | | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | | | | | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | Next | Vol- | Vol+ | Play | + * `-----------------------------------------------------------------------------------' + */ +[1] = LAYOUT_preonic_1x2uC( + KC_GRV, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY +), + +/* Raise + * ,-----------------------------------------------------------------------------------. + * | | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | Reset| | | | | | - | = | [ | ] | \ | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | | | | | | | | | | | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | | | | | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | + * `-----------------------------------------------------------------------------------' + */ +[2] = LAYOUT_preonic_1x2uC( + _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, + _______, RESET, DEBUG, _______, _______, _______, _______, _______, _______, _______, KC_F12, _______, + _______, _______, _______, _______, _______, _______, _______, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ +)}; diff --git a/keyboards/preonic/keymaps/codecoffeecode/readme.md b/keyboards/preonic/keymaps/codecoffeecode/readme.md new file mode 100644 index 000000000000..9ec7e95490ba --- /dev/null +++ b/keyboards/preonic/keymaps/codecoffeecode/readme.md @@ -0,0 +1 @@ +# This layout is largely based on codecoffeecode's niu_mini layout \ No newline at end of file From 924823cfb420a61986b5bb816b2c82ba6c0210a1 Mon Sep 17 00:00:00 2001 From: jotix <69703151+jotix@users.noreply.github.com> Date: Mon, 21 Sep 2020 22:54:09 -0300 Subject: [PATCH 843/930] update jotix ortho_4x12 keymap: add some missing keycodes (#10289) --- layouts/community/ortho_4x12/jotix/keymap.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/layouts/community/ortho_4x12/jotix/keymap.c b/layouts/community/ortho_4x12/jotix/keymap.c index 867e40a380f0..63a0494742d9 100644 --- a/layouts/community/ortho_4x12/jotix/keymap.c +++ b/layouts/community/ortho_4x12/jotix/keymap.c @@ -40,7 +40,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { // ├───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┤ _______,KC_MPRV,KC_MPLY,KC_MNXT,KC_END, KC_PGDN,KC_UNDS,KC_PLUS,KC_WH_U,KC_BTN1,KC_MS_U,KC_BTN2, // ├───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┤ - _______,_______,_______,_______,_______,_______,TGRAISE,_______,KC_WH_D,KC_MS_L,KC_MS_D,KC_MS_R + _______,_______,_______,_______,_______,_______,_______,_______,KC_WH_D,KC_MS_L,KC_MS_D,KC_MS_R // └───────┴───────┴───────┴───────┴───────┴───────┴───────┴───────┴───────┴───────┴───────┴───────┘ ), @@ -52,19 +52,19 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { // ├───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┤ _______,DM_REC1,DM_REC2,DM_RSTP,DM_PLY1,DM_PLY2,KC_MINS,KC_EQL, _______,_______,_______,_______, // ├───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┤ - _______,_______,_______,_______,_______,TGLOWER,_______,_______,_______,_______,_______,_______ + _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______ // └───────┴───────┴───────┴───────┴───────┴───────┴───────┴───────┴───────┴───────┴───────┴───────┘ ), [_FN] = LAYOUT_ortho_4x12 ( // ┌───────┬───────┬───────┬───────┬───────┬───────┬───────┬───────┬───────┬───────┬───────┬───────┐ - _______,KC_F1, KC_F2, KC_F3, KC_F4, _______,_______,KC_P7, KC_P8, KC_P9, KC_PMNS,_______, + _______,KC_F1, KC_F2, KC_F3, KC_F4, KC_PSCR,KC_INS, KC_P7, KC_P8, KC_P9, KC_PMNS,_______, // ├───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┤ - _______,KC_F5, KC_F6, KC_F7, KC_F8, _______,_______,KC_P4, KC_P5, KC_P6, KC_PPLS,KC_PENT, + _______,KC_F5, KC_F6, KC_F7, KC_F8, KC_SLCK,KC_APP, KC_P4, KC_P5, KC_P6, KC_PPLS,KC_PENT, // ├───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┤ - _______,KC_F9, KC_F10, KC_F11, KC_F12, _______,_______,KC_P1, KC_P2, KC_P3, KC_PAST,KC_PSLS, + _______,KC_F9, KC_F10, KC_F11, KC_F12, KC_PAUS,KC_NLCK,KC_P1, KC_P2, KC_P3, KC_PAST,KC_PSLS, // ├───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┤ - _______,_______,_______,_______,_______,_______,_______,_______,KC_P0, KC_PDOT,KC_LPRN,KC_RPRN + _______,_______,_______,_______,TGLOWER,_______,_______,TGRAISE,KC_P0, KC_PDOT,KC_LPRN,KC_RPRN // └───────┴───────┴───────┴───────┴───────┴───────┴───────┴───────┴───────┴───────┴───────┴───────┘ ), }; From 0b2eae768637bc9230fec5d5167f617b21f4e179 Mon Sep 17 00:00:00 2001 From: marksard <38324387+marksard@users.noreply.github.com> Date: Tue, 22 Sep 2020 11:16:43 +0900 Subject: [PATCH 844/930] Fixed info.json file for treadstone48/rev2 (#10290) * 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 * Fixed info.json file. --- keyboards/treadstone48/rev2/info.json | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/keyboards/treadstone48/rev2/info.json b/keyboards/treadstone48/rev2/info.json index 1771a6a9d145..991a83019960 100644 --- a/keyboards/treadstone48/rev2/info.json +++ b/keyboards/treadstone48/rev2/info.json @@ -191,11 +191,6 @@ "x": 12.75, "y": 2 }, - { - "label": "Shift", - "x": 13.75, - "y": 2 - }, { "label": "Ctrl", "x": 0.75, @@ -256,6 +251,11 @@ "label": "\u2192", "x": 13.75, "y": 3 + }, + { + "label": "Shift", + "x": 13.75, + "y": 2 } ] } From 342ab6ab80ce4a3c1a12c1a8621afdacae82e674 Mon Sep 17 00:00:00 2001 From: Jonathan Rascher Date: Mon, 21 Sep 2020 22:32:56 -0500 Subject: [PATCH 845/930] Update bcat keymaps for crkbd and lily58(#10298) * Swap ergo lower layer shortcuts for zoom keys --- keyboards/crkbd/keymaps/bcat/keymap.c | 8 ++++---- keyboards/crkbd/keymaps/bcat/readme.md | 9 +++++---- keyboards/lily58/keymaps/bcat/keymap.c | 8 ++++---- keyboards/lily58/keymaps/bcat/readme.md | 2 +- 4 files changed, 14 insertions(+), 13 deletions(-) diff --git a/keyboards/crkbd/keymaps/bcat/keymap.c b/keyboards/crkbd/keymaps/bcat/keymap.c index 6018835c247f..7b8329fea923 100644 --- a/keyboards/crkbd/keymaps/bcat/keymap.c +++ b/keyboards/crkbd/keymaps/bcat/keymap.c @@ -13,9 +13,9 @@ enum layer { #define LY_RSE MO(LAYER_RAISE) #define KY_CSPC LCTL(KC_SPC) -#define KY_LOCK LGUI(KC_L) -#define KY_WINL LGUI(KC_LEFT) -#define KY_WINR LGUI(KC_RGHT) +#define KY_ZMIN LCTL(KC_EQL) +#define KY_ZMOUT LCTL(KC_MINS) +#define KY_ZMRST LCTL(KC_0) const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Default layer: http://www.keyboard-layout-editor.com/#/gists/08d9827d916662a9414f48805aa895a5 */ @@ -29,7 +29,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Lower layer: http://www.keyboard-layout-editor.com/#/gists/c3fba5eaa2cd70fdfbdbc0f9e34d3bc0 */ [LAYER_LOWER] = LAYOUT( MC_ALTT, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, _______, - KY_CSPC, KY_WINL, KY_WINR, KY_LOCK, KC_WBAK, KC_WFWD, KC_PIPE, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_TILD, + KY_CSPC, KY_ZMRST, KY_ZMOUT, KY_ZMIN, KC_WBAK, KC_WFWD, KC_PIPE, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_TILD, _______, KC_APP, KC_PSCR, KC_SLCK, KC_PAUS, KC_LGUI, KC_BSLS, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_GRV, _______, _______, _______, _______, _______, _______ ), diff --git a/keyboards/crkbd/keymaps/bcat/readme.md b/keyboards/crkbd/keymaps/bcat/readme.md index 743a6572d26a..4ffb1562bfcf 100644 --- a/keyboards/crkbd/keymaps/bcat/readme.md +++ b/keyboards/crkbd/keymaps/bcat/readme.md @@ -50,7 +50,7 @@ elimination. ## Lower layer -![Lower layer layout](https://i.imgur.com/djIkwsa.png) +![Lower layer layout](https://i.imgur.com/vaIc9JY.png) ([KLE](http://www.keyboard-layout-editor.com/#/gists/c3fba5eaa2cd70fdfbdbc0f9e34d3bc0)) @@ -74,8 +74,8 @@ And yup, the shifted versions are above the unshifted versions. * Remaining keys from a TKL are placed out of the way on the bottom row of the left half. -* The home row on the left half contains handy shortcuts for window movement, -and browser navigation, and screen lock. +* The home row on the left half contains handy shortcuts for zooming and browser +navigation. * Lower+Esc is bound to Ctrl+Space because the Ctrl and Space keys are both on the left thumb, so this key combination (which I use for tmux prefix and editor @@ -109,7 +109,8 @@ keys (F1–F5) on the home row.) * Insert and Delete are on the rightmost column, because there didn't seem to be a better place to put them. -* Caps Lock is bound in the same position as on an HHKB, for lack of an obvious better location. +* Caps Lock is bound in the same position as on an HHKB, for lack of an obvious +better location. ## Adjust layer diff --git a/keyboards/lily58/keymaps/bcat/keymap.c b/keyboards/lily58/keymaps/bcat/keymap.c index 294f9e6c5a30..69864cd08550 100644 --- a/keyboards/lily58/keymaps/bcat/keymap.c +++ b/keyboards/lily58/keymaps/bcat/keymap.c @@ -13,9 +13,9 @@ enum layer { #define LY_RSE MO(LAYER_RAISE) #define KY_CSPC LCTL(KC_SPC) -#define KY_LOCK LGUI(KC_L) -#define KY_WINL LGUI(KC_LEFT) -#define KY_WINR LGUI(KC_RGHT) +#define KY_ZMIN LCTL(KC_EQL) +#define KY_ZMOUT LCTL(KC_MINS) +#define KY_ZMRST LCTL(KC_0) const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Default layer: http://www.keyboard-layout-editor.com/#/gists/e0eb3af65961e9fd612dcff3ddd88e4f */ @@ -31,7 +31,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [LAYER_LOWER] = LAYOUT( _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, MC_ALTT, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, _______, - KY_CSPC, KY_WINL, KY_WINR, KY_LOCK, KC_WBAK, KC_WFWD, KC_PIPE, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_TILD, + KY_CSPC, KY_ZMRST, KY_ZMOUT, KY_ZMIN, KC_WBAK, KC_WFWD, KC_PIPE, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_TILD, _______, KC_APP, KC_PSCR, KC_SLCK, KC_PAUS, KC_LGUI, _______, _______, KC_BSLS, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_GRV, _______, _______, _______, _______, _______, _______, _______, _______ ), diff --git a/keyboards/lily58/keymaps/bcat/readme.md b/keyboards/lily58/keymaps/bcat/readme.md index 6235ff13fcdf..84c2fc335fa0 100644 --- a/keyboards/lily58/keymaps/bcat/readme.md +++ b/keyboards/lily58/keymaps/bcat/readme.md @@ -22,7 +22,7 @@ browser back/forward navigation keys. ## Lower layer -![Lower layer layout](https://i.imgur.com/JVF1p1Q.png) +![Lower layer layout](https://i.imgur.com/sNKWpUC.png) ([KLE](http://www.keyboard-layout-editor.com/#/gists/19ad0d3b5d745fbb2818db09740f5a11)) From 967ed19d77ce6793dac6cd94e294fe9edff5a39b Mon Sep 17 00:00:00 2001 From: Ole Westendorff Date: Tue, 22 Sep 2020 05:35:51 +0200 Subject: [PATCH 846/930] [keyboard] xd60: add split layout for ansi and iso (#10337) --- keyboards/xd60/info.json | 153 ++++++++++++++++++++++++++++++++++- keyboards/xd60/rev2/rules.mk | 4 +- keyboards/xd60/rev3/rules.mk | 2 +- keyboards/xd60/xd60.h | 28 +++++++ 4 files changed, 180 insertions(+), 7 deletions(-) diff --git a/keyboards/xd60/info.json b/keyboards/xd60/info.json index c69e8a78872f..dbe9a79880a8 100644 --- a/keyboards/xd60/info.json +++ b/keyboards/xd60/info.json @@ -1,8 +1,8 @@ { - "keyboard_name": "XD60", - "maintainer": "qmk", - "width": 15, - "height": 5, + "keyboard_name": "XD60", + "maintainer": "qmk", + "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}, {"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}, {"x":12.75, "y":2}, {"label":"Enter", "x":13.75, "y":2, "w":1.25}, {"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":"Alt", "x":10, "y":4}, {"label":"Win", "x":11, "y":4}, {"label":"Menu", "x":12, "y":4}, {"label":"Ctrl", "x":13, "y":4}, {"x":14, "y":4}] @@ -12,8 +12,153 @@ "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_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":"BS", "x":13, "y":0, "w":1}, + {"label":"BS", "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":1.75}, + {"label":"FN", "x":14, "y":3, "w":1}, + + {"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": { "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":"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":"AltGr", "x":10, "y":4, "w":1.25}, {"label":"GUI", "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": { + "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":"BS", "x":13, "y":0, "w":1}, + {"label":"BS", "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":"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, "w":1}, + + {"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":"AltGr", "x":10, "y":4, "w":1.25}, + {"label":"GUI", "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/xd60/rev2/rules.mk b/keyboards/xd60/rev2/rules.mk index 1c96804e77aa..56a01b3c52e0 100644 --- a/keyboards/xd60/rev2/rules.mk +++ b/keyboards/xd60/rev2/rules.mk @@ -23,7 +23,7 @@ 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_ENABLE = yes # Enable WS2812 RGB underlight. SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -LAYOUTS = 60_ansi 60_iso +LAYOUTS = 60_ansi 60_ansi_split_bs_rshift 60_iso 60_iso_split_bs_rshift diff --git a/keyboards/xd60/rev3/rules.mk b/keyboards/xd60/rev3/rules.mk index 3c7c967124bf..56a01b3c52e0 100644 --- a/keyboards/xd60/rev3/rules.mk +++ b/keyboards/xd60/rev3/rules.mk @@ -26,4 +26,4 @@ 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 = 60_ansi 60_iso +LAYOUTS = 60_ansi 60_ansi_split_bs_rshift 60_iso 60_iso_split_bs_rshift diff --git a/keyboards/xd60/xd60.h b/keyboards/xd60/xd60.h index 3946138c3810..dc6a1080f9a2 100644 --- a/keyboards/xd60/xd60.h +++ b/keyboards/xd60/xd60.h @@ -46,6 +46,20 @@ inline void xd60_bl_led_off(void) { DDRF &= ~(1<<5); PORTF &= ~(1<<5); } { K40, K41, K42, KC_NO, KC_NO, K45, KC_NO, KC_NO, KC_NO, KC_NO, K4A, K4B, K4C, K4D } \ } +#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 }, \ + { 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, KC_NO, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D }, \ + { K40, K41, K42, KC_NO, KC_NO, K45, KC_NO, KC_NO, KC_NO, 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, \ @@ -59,3 +73,17 @@ inline void xd60_bl_led_off(void) { DDRF &= ~(1<<5); PORTF &= ~(1<<5); } { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, KC_NO, K3D }, \ { K40, K41, K42, KC_NO, KC_NO, K45, KC_NO, KC_NO, KC_NO, KC_NO, K4A, K4B, K4C, K4D } \ } + +#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, KC_NO }, \ + { 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, KC_NO, KC_NO, K45, KC_NO, KC_NO, KC_NO, K49, K4A, K4B, K4C, K4D } \ +} From bfbcfbc83e9c496abff002726f7cc07108d99003 Mon Sep 17 00:00:00 2001 From: dezli <29718605+dezlidezlidezli@users.noreply.github.com> Date: Tue, 22 Sep 2020 13:03:03 +0800 Subject: [PATCH 847/930] [Keyboard] Add miniMACRO5 Macropad (#10392) * add miniMACRO5 add all nessecary files for the miniMACRO5 I have rewritten the readme, and changed the keymaps to be more simple. I have tested compiling, and everything works perfectly. * update miniMACRO5 readme add the make example into the readme file * Update keyboards/minimacro5/config.h Co-authored-by: Ryan * Update keyboards/minimacro5/keymaps/default/keymap.c Co-authored-by: Ryan * Update keyboards/minimacro5/keymaps/media/keymap.c Co-authored-by: Ryan * Update keyboards/minimacro5/keymaps/media/keymap.c Co-authored-by: Ryan * Update keyboards/minimacro5/minimacro5.c Co-authored-by: Ryan * Update keyboards/minimacro5/info.json Co-authored-by: Ryan * Apply suggestions from code review applied all suggestions. Co-authored-by: Ryan * drashna suggestions - enum rather than define committed enum update by drashna Co-authored-by: Drashna Jaelre * update keymap.c incorrect brackets Co-authored-by: dezli Co-authored-by: Ryan Co-authored-by: Drashna Jaelre --- keyboards/minimacro5/config.h | 62 +++++++++++++++++++ keyboards/minimacro5/info.json | 12 ++++ keyboards/minimacro5/keymaps/default/keymap.c | 46 ++++++++++++++ keyboards/minimacro5/keymaps/media/keymap.c | 43 +++++++++++++ keyboards/minimacro5/minimacro5.c | 1 + keyboards/minimacro5/minimacro5.h | 9 +++ keyboards/minimacro5/readme.md | 15 +++++ keyboards/minimacro5/rules.mk | 23 +++++++ 8 files changed, 211 insertions(+) create mode 100644 keyboards/minimacro5/config.h create mode 100644 keyboards/minimacro5/info.json create mode 100644 keyboards/minimacro5/keymaps/default/keymap.c create mode 100644 keyboards/minimacro5/keymaps/media/keymap.c create mode 100644 keyboards/minimacro5/minimacro5.c create mode 100644 keyboards/minimacro5/minimacro5.h create mode 100644 keyboards/minimacro5/readme.md create mode 100644 keyboards/minimacro5/rules.mk diff --git a/keyboards/minimacro5/config.h b/keyboards/minimacro5/config.h new file mode 100644 index 000000000000..b48b5df21ef2 --- /dev/null +++ b/keyboards/minimacro5/config.h @@ -0,0 +1,62 @@ +/* +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 0xCEEB +#define PRODUCT_ID 0x0007 +#define DEVICE_VER 0x0001 +#define MANUFACTURER leafcutterlabs +#define PRODUCT miniMACRO5 + +/* key matrix size */ +#define MATRIX_ROWS 1 +#define MATRIX_COLS 5 + +/* + * 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) + * NO_DIODE = switches are directly connected to AVR pins + * +*/ +// #define MATRIX_ROW_PINS { D0, D5 } +// #define MATRIX_COL_PINS { F1, F0, B0 } +#define DIRECT_PINS { \ + { F4, B6, B2, D7, B4 } \ +} +//speed for double tap +#define TAPPING_TERM 200 + +#define UNUSED_PINS + +/* rotary encoder 1,2,3 closest to usb port is 0*/ +#define ENCODERS_PAD_B { D3, F6, F7, D4, C6} +#define ENCODERS_PAD_A { F5, D2, D1, D0, E6} +#define ENCODER_RESOLUTION 2 //default/suggested + +/* ws2812 RGB LED */ +#define RGB_DI_PIN B5 +#define RGBLIGHT_ANIMATIONS +#define RGBLED_NUM 5 // Number of LEDs diff --git a/keyboards/minimacro5/info.json b/keyboards/minimacro5/info.json new file mode 100644 index 000000000000..1cc2a2e41ce3 --- /dev/null +++ b/keyboards/minimacro5/info.json @@ -0,0 +1,12 @@ +{ + "keyboard_name": "minimacro5", + "url": "", + "maintainer": "qmk", + "width": 5, + "height": 1, + "layouts": { + "LAYOUT_ortho_1x5": { + "layout": [{"x":0, "y":0}, {"x":1, "y":0}, {"x":2, "y":0}, {"x":3, "y":0}, {"x":5, "y":0}] + } + } +} diff --git a/keyboards/minimacro5/keymaps/default/keymap.c b/keyboards/minimacro5/keymaps/default/keymap.c new file mode 100644 index 000000000000..acd7f3283110 --- /dev/null +++ b/keyboards/minimacro5/keymaps/default/keymap.c @@ -0,0 +1,46 @@ +#include QMK_KEYBOARD_H + +enum layers { + _MAIN, +}; + +void encoder_update_user(uint8_t index, bool clockwise) { + if (index == 0) { /* First encoder*/ + if (clockwise) { + tap_code(KC_1); + } else { + tap_code(KC_2); + } + } else if (index == 1) { /* Second encoder*/ + if (clockwise) { + tap_code(KC_3); + } else { + tap_code(KC_4); + } + } else if (index == 2) { /* Third encoder*/ + if (clockwise) { + tap_code(KC_5); + } else { + tap_code(KC_6); + } + } else if (index == 3) { /* Fourth encoder*/ + if (clockwise) { + tap_code(KC_7); + } else { + tap_code(KC_8); + } + } else if (index == 4) { /* Fifth encoder*/ + if (clockwise) { + tap_code(KC_9); + } else { + tap_code(KC_0); + } + } +} + +// +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { //buttion closest to usb is first + [_MAIN] = LAYOUT_ortho_1x5( + KC_A, KC_B, KC_C, KC_D, KC_E + ) +}; diff --git a/keyboards/minimacro5/keymaps/media/keymap.c b/keyboards/minimacro5/keymaps/media/keymap.c new file mode 100644 index 000000000000..f36954b07479 --- /dev/null +++ b/keyboards/minimacro5/keymaps/media/keymap.c @@ -0,0 +1,43 @@ +#include QMK_KEYBOARD_H + +#define _MAIN 0 + +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_3); + } else { + tap_code(KC_4); + } + } else if (index == 2) { /* Third encoder*/ + if (clockwise) { + tap_code(KC_5); + } else { + tap_code(KC_6); + } + } else if (index == 3) { /* Fourth encoder*/ + if (clockwise) { + tap_code(KC_7); + } else { + tap_code(KC_8); + } + } else if (index == 4) { /* Fifth encoder*/ + if (clockwise) { + tap_code(KC_9); + } else { + tap_code(KC_0); + } + } +} + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { //buttion closest to usb is first + [_MAIN] = LAYOUT_ortho_1x5( + KC_MUTE, KC_MEDIA_PREV_TRACK, KC_MEDIA_NEXT_TRACK, KC_MEDIA_PLAY_PAUSE, KC_MEDIA_STOP + ) +}; diff --git a/keyboards/minimacro5/minimacro5.c b/keyboards/minimacro5/minimacro5.c new file mode 100644 index 000000000000..7f9c5af1c783 --- /dev/null +++ b/keyboards/minimacro5/minimacro5.c @@ -0,0 +1 @@ +#include "minimacro5.h" diff --git a/keyboards/minimacro5/minimacro5.h b/keyboards/minimacro5/minimacro5.h new file mode 100644 index 000000000000..2d61ed893bb1 --- /dev/null +++ b/keyboards/minimacro5/minimacro5.h @@ -0,0 +1,9 @@ +#pragma once + +#include "quantum.h" + +#define LAYOUT_ortho_1x5( \ + k01, k02, k03, k04, k05\ + ) { \ + { k01, k02, k03, k04, k05 } \ +} diff --git a/keyboards/minimacro5/readme.md b/keyboards/minimacro5/readme.md new file mode 100644 index 000000000000..6266d2ba3509 --- /dev/null +++ b/keyboards/minimacro5/readme.md @@ -0,0 +1,15 @@ +# miniMACRO5 + +A 5 key Macropad based on Arduino Pro Micro with support for a combination of rotary encoders and mechanical switches. + +![](https://i.imgur.com/lxA8DSCl.jpg) + +* Keyboard Maintainer: [LeafCutterLabs](https://github.com/LeafCutterLabs) +* Hardware Supported: Pro Micro 5V/16MHz and compatible. +* Hardware availability: PCB Files are available [here](https://github.com/LeafCutterLabs/miniMACRO5), which you can get produced. + +Make example for this keyboard (after setting up your build environment): + + make minimacro5: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/minimacro5/rules.mk b/keyboards/minimacro5/rules.mk new file mode 100644 index 000000000000..dd66c4fbd8c3 --- /dev/null +++ b/keyboards/minimacro5/rules.mk @@ -0,0 +1,23 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +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 = no # Console for debug +COMMAND_ENABLE = no # Commands for debug and configuration +# 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 +BLUETOOTH_ENABLE = no # Enable Bluetooth +AUDIO_ENABLE = no # Audio output +ENCODER_ENABLE = yes #enable rotary encoders From ea0cf42eef81c137b6483cb0d33336bc98847981 Mon Sep 17 00:00:00 2001 From: Rustam Zagirov Date: Tue, 22 Sep 2020 08:12:29 +0300 Subject: [PATCH 848/930] [Keymap] Add stamm layout for ergodox_ez (#10365) Co-authored-by: Drashna Jaelre --- keyboards/ergodox_ez/keymaps/stamm/config.h | 40 +++ keyboards/ergodox_ez/keymaps/stamm/keymap.c | 308 +++++++++++++++++++ keyboards/ergodox_ez/keymaps/stamm/readme.md | 117 +++++++ keyboards/ergodox_ez/keymaps/stamm/rules.mk | 8 + 4 files changed, 473 insertions(+) create mode 100644 keyboards/ergodox_ez/keymaps/stamm/config.h create mode 100644 keyboards/ergodox_ez/keymaps/stamm/keymap.c create mode 100644 keyboards/ergodox_ez/keymaps/stamm/readme.md create mode 100644 keyboards/ergodox_ez/keymaps/stamm/rules.mk diff --git a/keyboards/ergodox_ez/keymaps/stamm/config.h b/keyboards/ergodox_ez/keymaps/stamm/config.h new file mode 100644 index 000000000000..e1db3d9002e2 --- /dev/null +++ b/keyboards/ergodox_ez/keymaps/stamm/config.h @@ -0,0 +1,40 @@ +/* Copyright 2020 Rustam Zagirov + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +/* + 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 ORYX_CONFIGURATOR +#define LEADER_TIMEOUT 500 +#define LEADER_PER_KEY_TIMING + +#define TAPPING_TERM 200 +#define TAPPING_TERM_PER_KEY +#define PERMISSIVE_HOLD +/* #define PERMISSIVE_HOLD_PER_KEY */ + +#define IGNORE_MOD_TAP_INTERRUPT +#define IGNORE_MOD_TAP_INTERRUPT_PER_KEY + +#define TAPPING_FORCE_HOLD +#define TAPPING_FORCE_HOLD_PER_KEY + +/* #define RETRO_TAPPING */ +#undef LED_BRIGHTNESS_DEFAULT +#define LED_BRIGHTNESS_DEFAULT (LED_BRIGHTNESS_LO) diff --git a/keyboards/ergodox_ez/keymaps/stamm/keymap.c b/keyboards/ergodox_ez/keymaps/stamm/keymap.c new file mode 100644 index 000000000000..e2d9964ba53d --- /dev/null +++ b/keyboards/ergodox_ez/keymaps/stamm/keymap.c @@ -0,0 +1,308 @@ +/* Copyright 2020 Rustam Zagirov + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public 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 "version.h" + +#define KC_MAC_UNDO LGUI(KC_Z) +#define KC_MAC_CUT LGUI(KC_X) +#define KC_MAC_COPY LGUI(KC_C) +#define KC_MAC_PASTE LGUI(KC_V) +#define KC_PC_UNDO LCTL(KC_Z) +#define KC_PC_CUT LCTL(KC_X) +#define KC_PC_COPY LCTL(KC_C) +#define KC_PC_PASTE LCTL(KC_V) +#define ES_LESS_MAC KC_GRAVE +#define ES_GRTR_MAC LSFT(KC_GRAVE) +#define ES_BSLS_MAC ALGR(KC_6) +#define NO_PIPE_ALT KC_GRAVE +#define NO_BSLS_ALT KC_EQUAL +#define LSA_T(kc) MT(MOD_LSFT | MOD_LALT, kc) + +#define E_NUMBERS LT(_3_NUMBERS,KC_E) +#define R_MOUSE LT(_4_MOUSE,KC_R) +#define O_NUMBERS LT(_3_NUMBERS,KC_O) +#define U_MOUSE LT(_4_MOUSE,KC_U) +#define R_NUMBERS LT(_3_NUMBERS,KC_R) +#define W_MOUSE LT(_4_MOUSE,KC_W) +#define LEFT_NUMBERS LT(_3_NUMBERS, KC_LEFT) +#define RIGHT_MOUSE LT(_4_MOUSE, KC_RIGHT) + +enum custom_keycodes { + RGB_SLD = EZ_SAFE_RANGE, + 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 layers { + _0_BASE, + _1_BEAKL, + _2_WORKMAN, + _3_NUMBERS, + _4_MOUSE, +}; + + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +[_0_BASE] = LAYOUT_ergodox( + KC_NONUS_BSLASH, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_AUDIO_MUTE, + KC_LEAD, KC_Q, KC_W, E_NUMBERS, R_MOUSE, KC_T, TG(_1_BEAKL), + LCTL(KC_B), LSFT_T(KC_A), LCTL_T(KC_S), LALT_T(KC_D), LGUI_T(KC_F), KC_G, + KC_BSLASH, KC_Z, KC_X, KC_C, KC_V, KC_B, TG(_2_WORKMAN), + ALT_TAB, XXXXXXX, XXXXXXX, LEFT_NUMBERS, RIGHT_MOUSE, + KC_AUDIO_VOL_DOWN, KC_AUDIO_VOL_UP, + XXXXXXX, + KC_ENTER, KC_TAB, KC_ESCAPE, + KC_CAPSLOCK, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_MINUS, + XXXXXXX, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRACKET, + KC_H, RGUI_T(KC_J), RALT_T(KC_K), RCTL_T(KC_L), RSFT_T(KC_SCOLON), KC_QUOTE, + KC_RBRACKET, KC_N, KC_M, KC_COMMA, KC_DOT, KC_SLASH, KC_EQUAL, + KC_DOWN, KC_UP, XXXXXXX, XXXXXXX, XXXXXXX, + KC_MEDIA_PLAY_PAUSE, KC_MEDIA_NEXT_TRACK, + XXXXXXX, + KC_ESCAPE, KC_BSPACE, KC_SPACE +), +[_1_BEAKL] = LAYOUT_ergodox( + _______, _______, _______, _______, _______, _______, _______, + _______, _______, KC_H, O_NUMBERS, U_MOUSE, KC_X, _______, + _______, LSFT_T(KC_Y), LCTL_T(KC_I), LALT_T(KC_E), LGUI_T(KC_A), KC_DOT, + _______, KC_J, KC_SLASH, KC_COMMA, KC_K, KC_QUOTE, _______, + _______, _______, _______, _______, _______, + _______, _______, + _______, + _______, _______, _______, + + _______, _______, _______, _______, _______, _______, _______, + _______, KC_G, KC_C, KC_R, KC_F, KC_Z, _______, + KC_D, RGUI_T(KC_S), RALT_T(KC_T), RCTL_T(KC_N), RSFT_T(KC_B), KC_SCOLON, + _______, KC_W, _______, KC_L, KC_P, KC_V, _______, + _______, _______, _______, _______, _______, + _______, _______, + _______, + _______, _______, _______ +), +[_2_WORKMAN] = LAYOUT_ergodox( + _______, _______, _______, _______, _______, _______, _______, + _______, _______, KC_D, R_NUMBERS, W_MOUSE, KC_B, _______, + _______, _______, _______, LALT_T(KC_H), LGUI_T(KC_T), _______, + _______, _______, _______, KC_M, KC_C, KC_V, _______, + _______, _______, _______, _______, _______, + _______, _______, + _______, + _______, _______, _______, + + _______, _______, _______, _______, _______, _______, _______, + _______, KC_J, KC_F, KC_U, KC_P, KC_SCOLON, _______, + KC_Y, RGUI_T(KC_N), RALT_T(KC_E), RCTL_T(KC_O), RSFT_T(KC_I), _______, + _______, KC_K, KC_L, _______, _______, _______, _______, + _______, _______, _______, _______, _______, + _______, _______, + _______, + _______, _______, _______ +), +[_3_NUMBERS] = LAYOUT_ergodox( + _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, _______, + _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, + RESET, _______, _______, _______, _______, + _______, _______, + _______, + _______, _______, _______, + + _______, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, + _______, _______, KC_7, KC_8, KC_9, KC_ASTR, KC_F12, + _______, KC_4, KC_5, KC_6, KC_PLUS, _______, + _______, _______, KC_1, KC_2, KC_3, KC_BSLASH, _______, + KC_0, KC_KP_DOT, _______, KC_EQUAL, _______, + _______, _______, + _______, + _______, _______, _______ +), +[_4_MOUSE] = LAYOUT_ergodox( + _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, + + RGB_HUI, RGB_HUD, + _______, + _______, _______, _______, + + _______, _______, _______, _______, _______, _______, _______, + RGB_MOD, RGB_TOG, KC_MS_BTN1, KC_MS_UP, KC_MS_BTN2, _______, _______, + RGB_SLD, KC_MS_LEFT, KC_MS_DOWN, KC_MS_RIGHT, _______, _______, + TOGGLE_LAYER_COLOR, _______, KC_MS_WH_UP, _______, KC_MS_WH_DOWN, _______, _______, + _______, _______, _______, _______, _______, + + RGB_VAD, RGB_VAI, + _______, + _______, _______, +), +}; + + +/* bool suspended = false; */ + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case RGB_SLD: + if (record->event.pressed) { + rgblight_mode(1); + } + return false; + case ALT_TAB: + if (record->event.pressed) { + if (!is_alt_tab_active) { + is_alt_tab_active = true; + register_code(KC_LGUI); + } + alt_tab_timer = timer_read(); + register_code(KC_TAB); + } else { + unregister_code(KC_TAB); + } + break; + } + return true; +} + +layer_state_t layer_state_set_user(layer_state_t state) { + ergodox_led_all_off(); + switch (get_highest_layer(state)) { + case _1_BEAKL: + ergodox_right_led_1_on(); + break; + case _2_WORKMAN: + ergodox_right_led_2_on(); + break; + case _3_NUMBERS: + ergodox_right_led_3_on(); + break; + case _4_MOUSE: + ergodox_right_led_1_on(); + ergodox_right_led_2_on(); + break; + /* case 6: */ + /* ergodox_right_led_2_on(); */ + /* ergodox_right_led_3_on(); */ + /* break; */ + /* case 7: */ + /* ergodox_right_led_1_on(); */ + /* ergodox_right_led_2_on(); */ + /* ergodox_right_led_3_on(); */ + /* break; */ + default: + break; + } + return state; + +}; + + +uint16_t get_tapping_term(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + /* case SFT_T(KC_SPC): */ + /* return TAPPING_TERM + 1250; */ + case LT(_3_NUMBERS, KC_E): + return 200; + case LT(_4_MOUSE, KC_R): + return 200; + /* case LGUI_T(KC_F): */ + /* return 50; */ + default: + return TAPPING_TERM; + } +} +bool get_ignore_mod_tap_interrupt(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case LT(_3_NUMBERS, KC_E): + case LT(_4_MOUSE, KC_R): + case LSFT_T(KC_A): + case LCTL_T(KC_S): + case LALT_T(KC_D): + case LGUI_T(KC_F): + case RGUI_T(KC_J): + case RALT_T(KC_K): + case RCTL_T(KC_L): + case RSFT_T(KC_SCOLON): + case LEFT_NUMBERS: + case RIGHT_MOUSE: + return true; + default: + return false; + } +} + + +bool get_tapping_force_hold(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case LT(_3_NUMBERS, KC_E): + case LT(_4_MOUSE, KC_R): + case LSFT_T(KC_A): + case LCTL_T(KC_S): + case LALT_T(KC_D): + case LGUI_T(KC_F): + case RGUI_T(KC_J): + case RALT_T(KC_K): + case RCTL_T(KC_L): + case RSFT_T(KC_SCOLON): + case LEFT_NUMBERS: + case RIGHT_MOUSE: + return false; + default: + return true; + } +} + + + +LEADER_EXTERNS(); + +void matrix_scan_user(void) { + if (is_alt_tab_active) { + if (timer_elapsed(alt_tab_timer) > 1000) { + unregister_code(KC_LGUI); + is_alt_tab_active = false; + } + } + LEADER_DICTIONARY() { + leading = false; + leader_end(); + + SEQ_ONE_KEY(KC_F) { + SEND_STRING (QMK_KEYBOARD "/" QMK_KEYMAP " @ " QMK_VERSION); + } + SEQ_ONE_KEY(KC_S) { + SEND_STRING ("sudo -i\n"); + } + SEQ_TWO_KEYS(KC_D, KC_D) { + SEND_STRING(SS_LGUI("ac")); + /* SEND_STRING(SS_LGUI("a") SS_LGUI("c")); */ + } + SEQ_THREE_KEYS(KC_D, KC_D, KC_S) { + SEND_STRING("https://start.duckduckgo.com\n"); + } + SEQ_TWO_KEYS(KC_A, KC_S) { + register_code(KC_LGUI); + register_code(KC_S); + unregister_code(KC_S); + unregister_code(KC_LGUI); + } + } +} diff --git a/keyboards/ergodox_ez/keymaps/stamm/readme.md b/keyboards/ergodox_ez/keymaps/stamm/readme.md new file mode 100644 index 000000000000..f2cdc7ea1a8b --- /dev/null +++ b/keyboards/ergodox_ez/keymaps/stamm/readme.md @@ -0,0 +1,117 @@ +# Stamm layouts for ergodox_ez + +5 layers: + +* QUERTY +* BEAKL15 +* WORKMAN +* Numbers +* Mouse + +On home row there are hold dual keys: +- shift, ctrl, alt, cmd — on the fingers on the left hand +- cmd, alt, ctrl, shift — mirrored on the finger on the righ hand + +Top row behaves like shifter numbers row. +Hold E switch to layer with numbers. +Hold R switch to mouse controll layer. + +``` + 0 Base +╭────────┬─────┬─────┬─────┬─────┬─────┬─────╮ ╭─────┬─────┬─────┬─────┬─────┬─────┬────────╮ +│ ` │ ! │ @ │ # │ $ │ % │Mute │ │Capsl│ ^ │ & │ * │ ( │ ) │ - │ +├────────┼─────┼─────┼─────┼─────┼─────┼─────┤ ├─────┼─────┼─────┼─────┼─────┼─────┼────────┤ +│ Lead │ Q │ W │E|LT3│R|LT4│ T │ TG1 │ │ │ Y │ U │ I │ O │ P │ [ │ +├────────┼─────┼─────┼─────┼─────┼─────┤ │ │ ├─────┼─────┼─────┼─────┼─────┼────────┤ +│Ctrl + B│A | ⇧│S | ⌃│D | ⌥│F | ⌘│ G ├─────┤ ├─────┤ H │J | ⌘│K | ⌥│L | ⌃│; | ⇧│ ' │ +├────────┼─────┼─────┼─────┼─────┼─────┤ TG2 │ │ ] ├─────┼─────┼─────┼─────┼─────┼────────┤ +│ \ │ Z │ X │ C │ V │ B │ │ │ │ N │ M │ , │ . │ / │ = │ +╰──┬─────┼─────┼─────┼─────┼─────┼─────┴─────╯ ╰─────┴─────┼─────┼─────┼─────┼─────┼─────┬──╯ + │⎇ + T│ │ │←|LT3│→|LT4│ │ ↓ │ ↑ │ │ │ │ + ╰─────┴─────┴─────┴─────┴─────╯ ╭─────┬─────╮ ╭─────┬─────╮ ╰─────┴─────┴─────┴─────┴─────╯ + │Vol- │Vol+ │ │Play │Next │ + ╭─────┼─────┼─────┤ ├─────┼─────┼─────╮ + │ │ │ │ │ │ │ │ + │Enter│ Tab ├─────┤ ├─────┤Bspac│ ⎵ │ + │ │ │ Esc │ │ Esc │ │ │ + ╰─────┴─────┴─────╯ ╰─────┴─────┴─────╯ + + 1 Beakl +╭────────┬─────┬─────┬─────┬─────┬─────┬─────╮ ╭─────┬─────┬─────┬─────┬─────┬─────┬────────╮ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +├────────┼─────┼─────┼─────┼─────┼─────┼─────┤ ├─────┼─────┼─────┼─────┼─────┼─────┼────────┤ +│ │ │ H │O|LT3│U|LT4│ X │ │ │ │ G │ C │ R │ F │ Z │ │ +├────────┼─────┼─────┼─────┼─────┼─────┤ │ │ ├─────┼─────┼─────┼─────┼─────┼────────┤ +│ │Y | ⇧│I | ⌃│E | ⌥│A | ⌘│ . ├─────┤ ├─────┤ D │S | ⌘│T | ⌥│N | ⌃│B | ⇧│ ; │ +├────────┼─────┼─────┼─────┼─────┼─────┤ │ │ ├─────┼─────┼─────┼─────┼─────┼────────┤ +│ │ J │ / │ , │ K │ ' │ │ │ │ W │ │ L │ P │ V │ │ +╰──┬─────┼─────┼─────┼─────┼─────┼─────┴─────╯ ╰─────┴─────┼─────┼─────┼─────┼─────┼─────┬──╯ + │ │ │ │ │ │ │ │ │ │ │ │ + ╰─────┴─────┴─────┴─────┴─────╯ ╭─────┬─────╮ ╭─────┬─────╮ ╰─────┴─────┴─────┴─────┴─────╯ + │ │ │ │ │ │ + ╭─────┼─────┼─────┤ ├─────┼─────┼─────╮ + │ │ │ │ │ │ │ │ + │ │ ├─────┤ ├─────┤ │ │ + │ │ │ │ │ │ │ │ + ╰─────┴─────┴─────╯ ╰─────┴─────┴─────╯ + + 2 Workman +╭────────┬─────┬─────┬─────┬─────┬─────┬─────╮ ╭─────┬─────┬─────┬─────┬─────┬─────┬────────╮ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +├────────┼─────┼─────┼─────┼─────┼─────┼─────┤ ├─────┼─────┼─────┼─────┼─────┼─────┼────────┤ +│ │ │ D │R|LT3│W|LT4│ B │ │ │ │ J │ F │ U │ P │ ; │ │ +├────────┼─────┼─────┼─────┼─────┼─────┤ │ │ ├─────┼─────┼─────┼─────┼─────┼────────┤ +│ │ │ │H | ⌥│T | ⌘│ ├─────┤ ├─────┤ Y │N | ⌘│E | ⌥│O | ⌃│I | ⇧│ │ +├────────┼─────┼─────┼─────┼─────┼─────┤ │ │ ├─────┼─────┼─────┼─────┼─────┼────────┤ +│ │ │ │ M │ C │ V │ │ │ │ K │ L │ │ │ │ │ +╰──┬─────┼─────┼─────┼─────┼─────┼─────┴─────╯ ╰─────┴─────┼─────┼─────┼─────┼─────┼─────┬──╯ + │ │ │ │ │ │ │ │ │ │ │ │ + ╰─────┴─────┴─────┴─────┴─────╯ ╭─────┬─────╮ ╭─────┬─────╮ ╰─────┴─────┴─────┴─────┴─────╯ + │ │ │ │ │ │ + ╭─────┼─────┼─────┤ ├─────┼─────┼─────╮ + │ │ │ │ │ │ │ │ + │ │ ├─────┤ ├─────┤ │ │ + │ │ │ │ │ │ │ │ + ╰─────┴─────┴─────╯ ╰─────┴─────┴─────╯ + + 3 Numbers +╭────────┬─────┬─────┬─────┬─────┬─────┬─────╮ ╭─────┬─────┬─────┬─────┬─────┬─────┬────────╮ +│ │ F1 │ F2 │ F3 │ F4 │ F5 │ │ │ │ F6 │ F7 │ F8 │ F9 │ F10 │ F11 │ +├────────┼─────┼─────┼─────┼─────┼─────┼─────┤ ├─────┼─────┼─────┼─────┼─────┼─────┼────────┤ +│ │ │ │ │ │ │ │ │ │ │ 7 │ 8 │ 9 │ * │ F12 │ +├────────┼─────┼─────┼─────┼─────┼─────┤ │ │ ├─────┼─────┼─────┼─────┼─────┼────────┤ +│ │ │ │ │ │ ├─────┤ ├─────┤ │ 4 │ 5 │ 6 │ + │ │ +├────────┼─────┼─────┼─────┼─────┼─────┤ │ │ ├─────┼─────┼─────┼─────┼─────┼────────┤ +│ │ │ │ │ │ │ │ │ │ │ 1 │ 2 │ 3 │ \ │ │ +╰──┬─────┼─────┼─────┼─────┼─────┼─────┴─────╯ ╰─────┴─────┼─────┼─────┼─────┼─────┼─────┬──╯ + │Reset│ │ │ │ │ │ 0 │ . │ │ = │ │ + ╰─────┴─────┴─────┴─────┴─────╯ ╭─────┬─────╮ ╭─────┬─────╮ ╰─────┴─────┴─────┴─────┴─────╯ + │ │ │ │ │ │ + ╭─────┼─────┼─────┤ ├─────┼─────┼─────╮ + │ │ │ │ │ │ │ │ + │ │ ├─────┤ ├─────┤ │ │ + │ │ │ │ │ │ │ │ + ╰─────┴─────┴─────╯ ╰─────┴─────┴─────╯ + + 4 Mouse +╭────────┬─────┬─────┬─────┬─────┬─────┬─────╮ ╭─────┬─────┬─────┬─────┬─────┬─────┬────────╮ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +├────────┼─────┼─────┼─────┼─────┼─────┼─────┤ ├─────┼─────┼─────┼─────┼─────┼─────┼────────┤ +│ │ │ │ │ │ │ │ │RgbMo│RgbTo│MsBtn│MsUp │MsBtn│ │ │ +├────────┼─────┼─────┼─────┼─────┼─────┤ │ │ ├─────┼─────┼─────┼─────┼─────┼────────┤ +│ │ │ │ │ │ ├─────┤ ├─────┤RgbSl│MsLef│MsDow│MsRig│ │ │ +├────────┼─────┼─────┼─────┼─────┼─────┤ │ │Toggl├─────┼─────┼─────┼─────┼─────┼────────┤ +│ │ │ │ │ │ │ │ │ │ │MsWhU│ │MsWhD│ │ │ +╰──┬─────┼─────┼─────┼─────┼─────┼─────┴─────╯ ╰─────┴─────┼─────┼─────┼─────┼─────┼─────┬──╯ + │ │ │ │ │ │ │ │ │ │ │ │ + ╰─────┴─────┴─────┴─────┴─────╯ ╭─────┬─────╮ ╭─────┬─────╮ ╰─────┴─────┴─────┴─────┴─────╯ + │RgbHu│RgbHu│ │RgbVa│RgbVa│ + ╭─────┼─────┼─────┤ ├─────┼─────┼─────╮ + │ │ │ │ │ │ │ │ + │ │ ├─────┤ ├─────┤ │ 75 │ + │ │ │ │ │ │ │ │ + ╰─────┴─────┴─────╯ ╰─────┴─────┴─────╯ + +``` + +Copyright © 2020 Rustam Zagirov. Released under [GPL-2.0](/LICENSE). diff --git a/keyboards/ergodox_ez/keymaps/stamm/rules.mk b/keyboards/ergodox_ez/keymaps/stamm/rules.mk new file mode 100644 index 000000000000..619224bef45b --- /dev/null +++ b/keyboards/ergodox_ez/keymaps/stamm/rules.mk @@ -0,0 +1,8 @@ +# 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 +COMMAND_ENABLE = no +LEADER_ENABLE = yes +RGBLIGHT_ENABLE = yes + +TAP_DANCE_ENABLE = no From 7ddae97c89905f8826c2efe0331d681d6a75876a Mon Sep 17 00:00:00 2001 From: Sergey Vlasov Date: Tue, 22 Sep 2020 08:50:39 +0300 Subject: [PATCH 849/930] Fix backlight for F401/F411 blackpill onekey examples (#10320) Fix configs to make the `handwired/onekey/blackpill_f401:backlight` and `handwired/onekey/blackpill_f411:backlight` examples actually compile and work: - Use `PWMD5` instead of `PWMD2` for backlight, which matches the default value of `BACKLIGHT_PAL_MODE` (AF02 for pin A0 is `TIM5_CH1`) and does not conflict with the default value of `STM32_ST_USE_TIMER`. - Enable `HAL_USE_PWM` in halconf.h and `STM32_PWM_USE_TIM5` in mcuconf.h, so that `PWMD5` could be used. --- keyboards/handwired/onekey/blackpill_f401/config.h | 2 +- keyboards/handwired/onekey/blackpill_f401/halconf.h | 1 + keyboards/handwired/onekey/blackpill_f401/mcuconf.h | 3 +++ keyboards/handwired/onekey/blackpill_f411/config.h | 2 +- keyboards/handwired/onekey/blackpill_f411/halconf.h | 1 + keyboards/handwired/onekey/blackpill_f411/mcuconf.h | 3 +++ 6 files changed, 10 insertions(+), 2 deletions(-) diff --git a/keyboards/handwired/onekey/blackpill_f401/config.h b/keyboards/handwired/onekey/blackpill_f401/config.h index c6166380cf26..829e84677f5f 100644 --- a/keyboards/handwired/onekey/blackpill_f401/config.h +++ b/keyboards/handwired/onekey/blackpill_f401/config.h @@ -23,7 +23,7 @@ #define UNUSED_PINS #define BACKLIGHT_PIN A0 -#define BACKLIGHT_PWM_DRIVER PWMD2 +#define BACKLIGHT_PWM_DRIVER PWMD5 #define BACKLIGHT_PWM_CHANNEL 1 #define RGB_DI_PIN A1 diff --git a/keyboards/handwired/onekey/blackpill_f401/halconf.h b/keyboards/handwired/onekey/blackpill_f401/halconf.h index d73c214ec64c..ae08512d4928 100644 --- a/keyboards/handwired/onekey/blackpill_f401/halconf.h +++ b/keyboards/handwired/onekey/blackpill_f401/halconf.h @@ -16,5 +16,6 @@ #pragma once #define HAL_USE_I2C TRUE +#define HAL_USE_PWM TRUE #include_next "halconf.h" diff --git a/keyboards/handwired/onekey/blackpill_f401/mcuconf.h b/keyboards/handwired/onekey/blackpill_f401/mcuconf.h index 33e07847b413..034a022db4dc 100644 --- a/keyboards/handwired/onekey/blackpill_f401/mcuconf.h +++ b/keyboards/handwired/onekey/blackpill_f401/mcuconf.h @@ -19,3 +19,6 @@ #undef STM32_I2C_USE_I2C1 #define STM32_I2C_USE_I2C1 TRUE + +#undef STM32_PWM_USE_TIM5 +#define STM32_PWM_USE_TIM5 TRUE diff --git a/keyboards/handwired/onekey/blackpill_f411/config.h b/keyboards/handwired/onekey/blackpill_f411/config.h index c6166380cf26..829e84677f5f 100644 --- a/keyboards/handwired/onekey/blackpill_f411/config.h +++ b/keyboards/handwired/onekey/blackpill_f411/config.h @@ -23,7 +23,7 @@ #define UNUSED_PINS #define BACKLIGHT_PIN A0 -#define BACKLIGHT_PWM_DRIVER PWMD2 +#define BACKLIGHT_PWM_DRIVER PWMD5 #define BACKLIGHT_PWM_CHANNEL 1 #define RGB_DI_PIN A1 diff --git a/keyboards/handwired/onekey/blackpill_f411/halconf.h b/keyboards/handwired/onekey/blackpill_f411/halconf.h index d73c214ec64c..ae08512d4928 100644 --- a/keyboards/handwired/onekey/blackpill_f411/halconf.h +++ b/keyboards/handwired/onekey/blackpill_f411/halconf.h @@ -16,5 +16,6 @@ #pragma once #define HAL_USE_I2C TRUE +#define HAL_USE_PWM TRUE #include_next "halconf.h" diff --git a/keyboards/handwired/onekey/blackpill_f411/mcuconf.h b/keyboards/handwired/onekey/blackpill_f411/mcuconf.h index 33e07847b413..034a022db4dc 100644 --- a/keyboards/handwired/onekey/blackpill_f411/mcuconf.h +++ b/keyboards/handwired/onekey/blackpill_f411/mcuconf.h @@ -19,3 +19,6 @@ #undef STM32_I2C_USE_I2C1 #define STM32_I2C_USE_I2C1 TRUE + +#undef STM32_PWM_USE_TIM5 +#define STM32_PWM_USE_TIM5 TRUE From e4a4ed3b0c053ebed902a28b2a8f68cdf78597f5 Mon Sep 17 00:00:00 2001 From: Croktopus <39040552+Croktopus@users.noreply.github.com> Date: Mon, 21 Sep 2020 22:54:55 -0700 Subject: [PATCH 850/930] moved encoder code to timberwolf.c (#10317) * moved encoder code to timberwolf.c * Update keyboards/metamechs/timberwolf/timberwolf.c Co-authored-by: Drashna Jaelre Co-authored-by: Drashna Jaelre --- keyboards/metamechs/timberwolf/keymaps/a_ansi/keymap.c | 10 +--------- keyboards/metamechs/timberwolf/keymaps/a_iso/keymap.c | 10 +--------- keyboards/metamechs/timberwolf/keymaps/b_ansi/keymap.c | 10 +--------- keyboards/metamechs/timberwolf/keymaps/b_iso/keymap.c | 10 +--------- .../metamechs/timberwolf/keymaps/default/keymap.c | 10 +--------- .../metamechs/timberwolf/keymaps/prime_ansi/keymap.c | 10 +--------- .../metamechs/timberwolf/keymaps/prime_iso/keymap.c | 10 +--------- keyboards/metamechs/timberwolf/keymaps/via/keymap.c | 10 +--------- keyboards/metamechs/timberwolf/timberwolf.c | 9 +++++++++ 9 files changed, 17 insertions(+), 72 deletions(-) diff --git a/keyboards/metamechs/timberwolf/keymaps/a_ansi/keymap.c b/keyboards/metamechs/timberwolf/keymaps/a_ansi/keymap.c index 0e4f99442d37..7d66af49bc62 100644 --- a/keyboards/metamechs/timberwolf/keymaps/a_ansi/keymap.c +++ b/keyboards/metamechs/timberwolf/keymaps/a_ansi/keymap.c @@ -33,12 +33,4 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { _______,_______ ,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______, _______, MO(1) ,_______,_______,_______ ,_______ ,_______,_______, _______,_______,_______,_______ ) -}; - -void encoder_update_user(uint8_t index, bool clockwise) { - if (clockwise) { - tap_code(KC_VOLU); - } else { - tap_code(KC_VOLD); - } -} \ No newline at end of file +}; \ No newline at end of file diff --git a/keyboards/metamechs/timberwolf/keymaps/a_iso/keymap.c b/keyboards/metamechs/timberwolf/keymaps/a_iso/keymap.c index 91d38316280a..78a77d0f83b9 100644 --- a/keyboards/metamechs/timberwolf/keymaps/a_iso/keymap.c +++ b/keyboards/metamechs/timberwolf/keymaps/a_iso/keymap.c @@ -33,12 +33,4 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______, _______, MO(1) ,_______,_______,_______ ,_______ ,_______,_______, _______,_______,_______,_______ ) -}; - -void encoder_update_user(uint8_t index, bool clockwise) { - if (clockwise) { - tap_code(KC_VOLU); - } else { - tap_code(KC_VOLD); - } -} \ No newline at end of file +}; \ No newline at end of file diff --git a/keyboards/metamechs/timberwolf/keymaps/b_ansi/keymap.c b/keyboards/metamechs/timberwolf/keymaps/b_ansi/keymap.c index 0b33e2e480b0..9f435715d549 100644 --- a/keyboards/metamechs/timberwolf/keymaps/b_ansi/keymap.c +++ b/keyboards/metamechs/timberwolf/keymaps/b_ansi/keymap.c @@ -33,12 +33,4 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { _______,_______ ,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______ ,_______, MO(1) ,_______,_______,_______ ,_______ ,_______,_______,_______ ,_______,_______,_______ ) -}; - -void encoder_update_user(uint8_t index, bool clockwise) { - if (clockwise) { - tap_code(KC_VOLU); - } else { - tap_code(KC_VOLD); - } -} \ No newline at end of file +}; \ No newline at end of file diff --git a/keyboards/metamechs/timberwolf/keymaps/b_iso/keymap.c b/keyboards/metamechs/timberwolf/keymaps/b_iso/keymap.c index 137fa4a50750..85217a940b5b 100644 --- a/keyboards/metamechs/timberwolf/keymaps/b_iso/keymap.c +++ b/keyboards/metamechs/timberwolf/keymaps/b_iso/keymap.c @@ -33,12 +33,4 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______, MO(1) ,_______,_______,_______ ,_______ ,_______,_______,_______ ,_______,_______,_______ ) -}; - -void encoder_update_user(uint8_t index, bool clockwise) { - if (clockwise) { - tap_code(KC_VOLU); - } else { - tap_code(KC_VOLD); - } -} \ No newline at end of file +}; \ No newline at end of file diff --git a/keyboards/metamechs/timberwolf/keymaps/default/keymap.c b/keyboards/metamechs/timberwolf/keymaps/default/keymap.c index 4870eaa3f51b..85b79f168c56 100644 --- a/keyboards/metamechs/timberwolf/keymaps/default/keymap.c +++ b/keyboards/metamechs/timberwolf/keymaps/default/keymap.c @@ -33,12 +33,4 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, MO(1) ,_______,_______,_______ ,_______ ,_______,_______,_______,_______,_______,_______,_______,_______ ) -}; - -void encoder_update_user(uint8_t index, bool clockwise) { - if (clockwise) { - tap_code(KC_VOLU); - } else { - tap_code(KC_VOLD); - } -} \ No newline at end of file +}; \ No newline at end of file diff --git a/keyboards/metamechs/timberwolf/keymaps/prime_ansi/keymap.c b/keyboards/metamechs/timberwolf/keymaps/prime_ansi/keymap.c index 89c1db021db6..4a49bdf0ade1 100644 --- a/keyboards/metamechs/timberwolf/keymaps/prime_ansi/keymap.c +++ b/keyboards/metamechs/timberwolf/keymaps/prime_ansi/keymap.c @@ -33,12 +33,4 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { _______,_______ ,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______ ,_______, MO(1) ,_______,_______,_______ ,_______ ,_______,_______,_______ ,_______,_______,_______ ) -}; - -void encoder_update_user(uint8_t index, bool clockwise) { - if (clockwise) { - tap_code(KC_VOLU); - } else { - tap_code(KC_VOLD); - } -} \ No newline at end of file +}; \ No newline at end of file diff --git a/keyboards/metamechs/timberwolf/keymaps/prime_iso/keymap.c b/keyboards/metamechs/timberwolf/keymaps/prime_iso/keymap.c index 5716cdacc710..1818ea4a3b96 100644 --- a/keyboards/metamechs/timberwolf/keymaps/prime_iso/keymap.c +++ b/keyboards/metamechs/timberwolf/keymaps/prime_iso/keymap.c @@ -33,12 +33,4 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______, MO(1) ,_______,_______,_______ ,_______ ,_______,_______,_______ ,_______,_______,_______ ) -}; - -void encoder_update_user(uint8_t index, bool clockwise) { - if (clockwise) { - tap_code(KC_VOLU); - } else { - tap_code(KC_VOLD); - } -} \ No newline at end of file +}; \ No newline at end of file diff --git a/keyboards/metamechs/timberwolf/keymaps/via/keymap.c b/keyboards/metamechs/timberwolf/keymaps/via/keymap.c index e19d3bbae777..6246ffd2e283 100644 --- a/keyboards/metamechs/timberwolf/keymaps/via/keymap.c +++ b/keyboards/metamechs/timberwolf/keymaps/via/keymap.c @@ -49,12 +49,4 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______,_______,_______,_______ ,_______ ,_______,_______,_______,_______,_______,_______,_______,_______ ) -}; - -void encoder_update_user(uint8_t index, bool clockwise) { - if (clockwise) { - tap_code(KC_VOLU); - } else { - tap_code(KC_VOLD); - } -} \ No newline at end of file +}; \ No newline at end of file diff --git a/keyboards/metamechs/timberwolf/timberwolf.c b/keyboards/metamechs/timberwolf/timberwolf.c index c9a750f45c9e..af6d42a54ec3 100644 --- a/keyboards/metamechs/timberwolf/timberwolf.c +++ b/keyboards/metamechs/timberwolf/timberwolf.c @@ -27,3 +27,12 @@ bool led_update_kb(led_t led_state) { } return runDefault; } + +__attribute__((weak)) +void encoder_update_user(uint8_t index, bool clockwise) { + if (clockwise) { + tap_code(KC_VOLU); + } else { + tap_code(KC_VOLD); + } +} From 4a37af79e90dbbc7df65d0c8011311c5e54d4d4f Mon Sep 17 00:00:00 2001 From: DonutCables Date: Tue, 22 Sep 2020 02:44:23 -0400 Subject: [PATCH 851/930] [Keyboard] Budget96 info cleanup and updates (#10268) * Cleanup/updates to Budget96 info * Add personal keymap * Requested config.h update Co-authored-by: Ryan * Requested rules.mk update Co-authored-by: Ryan * Requested keymap.c update * Requested config.h update Co-authored-by: Ryan Co-authored-by: Ryan --- keyboards/donutcables/budget96/config.h | 10 +- .../budget96/keymaps/donut/config.h | 28 +++ .../budget96/keymaps/donut/keymap.c | 171 ++++++++++++++++++ .../budget96/keymaps/donut/readme.md | 3 + .../budget96/keymaps/donut/rules.mk | 7 + keyboards/donutcables/budget96/readme.md | 6 +- 6 files changed, 217 insertions(+), 8 deletions(-) create mode 100644 keyboards/donutcables/budget96/keymaps/donut/config.h create mode 100644 keyboards/donutcables/budget96/keymaps/donut/keymap.c create mode 100644 keyboards/donutcables/budget96/keymaps/donut/readme.md create mode 100644 keyboards/donutcables/budget96/keymaps/donut/rules.mk diff --git a/keyboards/donutcables/budget96/config.h b/keyboards/donutcables/budget96/config.h index 9482867fa725..7154a67a8cf9 100644 --- a/keyboards/donutcables/budget96/config.h +++ b/keyboards/donutcables/budget96/config.h @@ -1,5 +1,5 @@ /* -Copyright 2017 Luiz Ribeiro +Copyright 2020 DonutCables This 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,11 +19,11 @@ along with this program. If not, see . #include "config_common.h" -#define VENDOR_ID 0x20A0 -#define PRODUCT_ID 0x422D -#define DEVICE_VER 0x0200 +#define VENDOR_ID 0xDCDC +#define PRODUCT_ID 0x0002 +#define DEVICE_VER 0x0001 #define MANUFACTURER DonutCables -#define PRODUCT budget96 +#define PRODUCT Budget96 #define RGBLED_NUM 18 diff --git a/keyboards/donutcables/budget96/keymaps/donut/config.h b/keyboards/donutcables/budget96/keymaps/donut/config.h new file mode 100644 index 000000000000..da538e7b80ef --- /dev/null +++ b/keyboards/donutcables/budget96/keymaps/donut/config.h @@ -0,0 +1,28 @@ +/* +Copyright 2020 DonutCables + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License 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 RGBLIGHT_ANIMATIONS +#define RGBLIGHT_EFFECT_BREATHING +#define RGBLIGHT_EFFECT_RAINBOW_MOOD +#define RGBLIGHT_EFFECT_RAINBOW_SWIRL +#define RGBLIGHT_EFFECT_SNAKE + +#define UNICODE_KEY_WINC KC_RGUI diff --git a/keyboards/donutcables/budget96/keymaps/donut/keymap.c b/keyboards/donutcables/budget96/keymaps/donut/keymap.c new file mode 100644 index 000000000000..53e77437ff3f --- /dev/null +++ b/keyboards/donutcables/budget96/keymaps/donut/keymap.c @@ -0,0 +1,171 @@ +/* +Copyright 2020 DonutCables + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public 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, + _B, + _FN1, + _FN2, +}; + +enum custom_keycodes { + img = SAFE_RANGE, + xkcd, + CD, + AES, + /* Unicode strings maps */ + ALT0, + ALT1, + ALT2, + ALT3, + ALT4, + ALT5, + ALT6, + ALT7, + /* Discord emotes maps */ + B, + X, +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* Base */ + [_BASE] = LAYOUT_96_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_HOME, KC_INS, KC_END, KC_MPRV, KC_MPLY, KC_MNXT, + 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_PSCR, KC_PSLS, KC_PAST, + KC_TAB, KC_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, + 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_P4, KC_P5, KC_P6, KC_PPLS, + 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_LCTL, MO(2), KC_RALT, KC_SPC, KC_CALC, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT, KC_P0, KC_PDOT, KC_PENT), + + /* (1) Bmode layer */ + [_B] = LAYOUT_96_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, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, B, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + 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) Fn 1 */ + [_FN1] = LAYOUT_96_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_PGDN, TG(1), KC_PGUP, KC_VOLD, KC_MUTE, KC_VOLU, + ALT0, KC_TRNS, KC_TRNS, ALT1, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, ALT2, KC_TRNS, KC_TRNS, KC_NLCK, KC_TRNS, KC_TRNS, + KC_TRNS, CD, KC_TRNS, KC_TRNS, KC_TRNS, ALT3, KC_TRNS, KC_TRNS, KC_TRNS, ALT4, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, AES, xkcd, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_CLCK, KC_TRNS, X, KC_TRNS, img, B, KC_TRNS, ALT7, ALT5, ALT6, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_LALT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), + + /* (3) Fn 2 */ + [_FN2] = LAYOUT_96_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, UC_M_WC, EEP_RST, RESET, + VLK_TOG, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, 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_TOG, RGB_MOD, RGB_HUI, RGB_SAI, RGB_VAI, KC_NO, KC_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, RGB_RMOD, RGB_HUD, RGB_SAD, RGB_VAD, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + 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) { + switch (keycode) { + case xkcd: + if (record->event.pressed) { + SEND_STRING("https://xkcd.com/927/"); + } + return true; + case CD: + if (record->event.pressed) { + SEND_STRING("cd d:/keyboard_stuff/gits/qmk_firmware"); + } + return true; + case AES: + if (record->event.pressed) { + SEND_STRING("***A E S T H E T I C S***"); + } + return true; + case img: + if (record->event.pressed) { + SEND_STRING("[url=" SS_LCTL("v") "][img]" SS_LCTL("v") "[/img][/url]"); + } + return true; + case ALT0: + if (record->event.pressed) { + send_unicode_string("≈"); + } + return true; + case ALT1: + if (record->event.pressed) { + send_unicode_string("π"); + } + return true; + case ALT2: + if (record->event.pressed) { + send_unicode_string("±"); + } + return true; + case ALT3: + if (record->event.pressed) { + send_unicode_string("™"); + } + return true; + case ALT4: + if (record->event.pressed) { + send_unicode_string("Ω"); + } + return true; + case ALT5: + if (record->event.pressed) { + send_unicode_string("≤"); + } + return true; + case ALT6: + if (record->event.pressed) { + send_unicode_string("≥"); + } + return true; + case ALT7: + if (record->event.pressed) { + send_unicode_string("ゴ"); + } + return true; + case B: + if (record->event.pressed) { + SEND_STRING(":b:"); + } + return true; + case X: + if (record->event.pressed) { + SEND_STRING(":x:"); + } + return true; + case KC_A ... KC_Z: + case KC_1 ... KC_0: + if (layer_state_is(1)) { + if (record->event.pressed) { + register_code(KC_F13); + tap_code(keycode); + unregister_code(KC_F13); + } + } else { + return true; + } + return false; + } + return true; +} diff --git a/keyboards/donutcables/budget96/keymaps/donut/readme.md b/keyboards/donutcables/budget96/keymaps/donut/readme.md new file mode 100644 index 000000000000..3e1ca1361ac4 --- /dev/null +++ b/keyboards/donutcables/budget96/keymaps/donut/readme.md @@ -0,0 +1,3 @@ +# My personal keymap for Budget96 + +My daily map for the Budget96. Includes unicode and masked characters for AHK pickup. \ No newline at end of file diff --git a/keyboards/donutcables/budget96/keymaps/donut/rules.mk b/keyboards/donutcables/budget96/keymaps/donut/rules.mk new file mode 100644 index 000000000000..7d48394b23d3 --- /dev/null +++ b/keyboards/donutcables/budget96/keymaps/donut/rules.mk @@ -0,0 +1,7 @@ +VELOCIKEY_ENABLE = yes +UNICODE_ENABLE = yes +BACKLIGHT_ENABLE = no +MOUSEKEY_ENABLE = no +COMMAND_ENABLE = no +SPACE_CADET_ENABLE = no +GRAVE_ESC_ENABLE = no diff --git a/keyboards/donutcables/budget96/readme.md b/keyboards/donutcables/budget96/readme.md index 11c49b983403..9cdb3a01bf68 100644 --- a/keyboards/donutcables/budget96/readme.md +++ b/keyboards/donutcables/budget96/readme.md @@ -1,8 +1,8 @@ -# budget96 +# Budget96 -96 key atmega32a keyboard. +A budget-oriented 96 key atmega32a keyboard. Runs ps2avrgb by default. -* Keyboard Maintainer: [MechMerlin](https://github.com/mechmerlin) +* Keyboard Maintainer: [MechMerlin](https://github.com/mechmerlin), [DonutCables](https://github.com/DonutCables) * Hardware Supported: Budget96 PCB * Hardware Availability: [DonutCables](https://donutcables.com/) From 207f0b00fa14c853b0015c30b7c5482a19afc25a Mon Sep 17 00:00:00 2001 From: Spaceman Date: Tue, 22 Sep 2020 03:33:39 -0400 Subject: [PATCH 852/930] [Keyboard] add Handwired/Curiosity (#10369) * Add curiosity * Add default keymap * Update config.h * Apply suggestions from code review * Update keyboards/handwired/curiosity/rules.mk * Update keymap.c * Apply suggestions from code review --- keyboards/handwired/curiosity/config.h | 44 +++++++++++++++++++ keyboards/handwired/curiosity/curiosity.c | 16 +++++++ keyboards/handwired/curiosity/curiosity.h | 41 +++++++++++++++++ keyboards/handwired/curiosity/info.json | 25 +++++++++++ .../curiosity/keymaps/default/keymap.c | 33 ++++++++++++++ keyboards/handwired/curiosity/readme.md | 13 ++++++ keyboards/handwired/curiosity/rules.mk | 23 ++++++++++ 7 files changed, 195 insertions(+) create mode 100644 keyboards/handwired/curiosity/config.h create mode 100644 keyboards/handwired/curiosity/curiosity.c create mode 100644 keyboards/handwired/curiosity/curiosity.h create mode 100644 keyboards/handwired/curiosity/info.json create mode 100644 keyboards/handwired/curiosity/keymaps/default/keymap.c create mode 100644 keyboards/handwired/curiosity/readme.md create mode 100644 keyboards/handwired/curiosity/rules.mk diff --git a/keyboards/handwired/curiosity/config.h b/keyboards/handwired/curiosity/config.h new file mode 100644 index 000000000000..8b632a5ec48b --- /dev/null +++ b/keyboards/handwired/curiosity/config.h @@ -0,0 +1,44 @@ +/* +Copyright 2020 Spaceman + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License 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 0x5342 // "SB" +#define PRODUCT_ID 0x4355 // "CU" +#define DEVICE_VER 0x0001 +#define MANUFACTURER Spaceman +#define PRODUCT Curiosity + +/* key matrix size */ +#define MATRIX_ROWS 4 +#define MATRIX_COLS 12 + +/* key matrix pins */ +#define MATRIX_ROW_PINS { D0, F7, F6, F5 } +#define MATRIX_COL_PINS { D3, D4, F4, C6, D7, E6, B5, B4, B1, B3, B2, B6 } +#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 +/* Locking resynchronize hack */ +#define LOCKING_RESYNC_ENABLE diff --git a/keyboards/handwired/curiosity/curiosity.c b/keyboards/handwired/curiosity/curiosity.c new file mode 100644 index 000000000000..e0a6e130e7d7 --- /dev/null +++ b/keyboards/handwired/curiosity/curiosity.c @@ -0,0 +1,16 @@ +/* Copyright 2020 Spaceman + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#include "curiosity.h" \ No newline at end of file diff --git a/keyboards/handwired/curiosity/curiosity.h b/keyboards/handwired/curiosity/curiosity.h new file mode 100644 index 000000000000..a79bfa6633ae --- /dev/null +++ b/keyboards/handwired/curiosity/curiosity.h @@ -0,0 +1,41 @@ +/* Copyright 2020 Spaceman + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License 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_small_mods( \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k3b, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k3a, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k39, \ + k30, k31, k32, k33, k34, k35, k36, k37, k38 \ +) { \ + { 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_large_mods( \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k3b, \ + 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 \ +) { \ + { 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, KC_NO, KC_NO, k3b }, \ +} diff --git a/keyboards/handwired/curiosity/info.json b/keyboards/handwired/curiosity/info.json new file mode 100644 index 000000000000..333868e1a7b9 --- /dev/null +++ b/keyboards/handwired/curiosity/info.json @@ -0,0 +1,25 @@ +{ + "keyboard_name": "Curiosity", + "url": "", + "maintainer": "Spaceman", + "width": 13.5, + "height": 4, + "layouts": { + "LAYOUT_small_mods": { + "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, "w":1.5}, + {"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.25}, + {"x":0, "y":2, "w":1.5}, {"x":1.5, "y":2}, {"x":2.5, "y":2}, {"x":3.5, "y":2}, {"x":4.5, "y":2}, {"x":5.5, "y":2}, {"x":6.5, "y":2}, {"x":7.5, "y":2}, {"x":8.5, "y":2}, {"x":9.5, "y":2}, {"x":10.5, "y":2}, {"x":11.5, "y":2}, {"x":12.5, "y":2}, + {"x":0.75, "y":3, "w":1.25}, {"x":2, "y":3, "w":1.25}, {"x":3.25, "y":3, "w":1.25}, {"x":4.5, "y":3, "w":2}, {"x":6.5, "y":3, "w":2.25}, {"x":8.75, "y":3}, {"x":9.75, "y":3}, {"x":10.75, "y":3}, {"x":11.75, "y":3} + ] + }, + "LAYOUT_large_mods": { + "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, "w":1.5}, + {"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":2.25}, + {"x":0, "y":2, "w":1.5}, {"x":1.5, "y":2}, {"x":2.5, "y":2}, {"x":3.5, "y":2}, {"x":4.5, "y":2}, {"x":5.5, "y":2}, {"x":6.5, "y":2}, {"x":7.5, "y":2}, {"x":8.5, "y":2}, {"x":9.5, "y":2}, {"x":10.5, "y":2}, {"x":11.5, "y":2, "w":2}, + {"x":0.75, "y":3, "w":1.25}, {"x":2, "y":3, "w":1.25}, {"x":3.25, "y":3, "w":1.25}, {"x":4.5, "y":3, "w":2}, {"x":6.5, "y":3, "w":2.25}, {"x":8.75, "y":3}, {"x":9.75, "y":3}, {"x":10.75, "y":3}, {"x":11.75, "y":3} + ] + } + } +} diff --git a/keyboards/handwired/curiosity/keymaps/default/keymap.c b/keyboards/handwired/curiosity/keymaps/default/keymap.c new file mode 100644 index 000000000000..741ad387db16 --- /dev/null +++ b/keyboards/handwired/curiosity/keymaps/default/keymap.c @@ -0,0 +1,33 @@ +/* Copyright 2020 Spaceman + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public 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_small_mods( + 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_ENT, + KC_NO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, MO(1), KC_RSFT, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_SPC, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT + ), + + [1] = LAYOUT_small_mods( + KC_TRNS, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 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/curiosity/readme.md b/keyboards/handwired/curiosity/readme.md new file mode 100644 index 000000000000..eaf608e22105 --- /dev/null +++ b/keyboards/handwired/curiosity/readme.md @@ -0,0 +1,13 @@ +# The Curiosity + +40% Keyboard + +* Keyboard Maintainer: [Spaceman](https://github.com/Spaceman) +* Hardware Supported: Curiosity PCB +* Hardware Availability: N/A + +Make example for this keyboard (after setting up your build environment): + + make handwired/curiosity: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/curiosity/rules.mk b/keyboards/handwired/curiosity/rules.mk new file mode 100644 index 000000000000..dace27ef326d --- /dev/null +++ b/keyboards/handwired/curiosity/rules.mk @@ -0,0 +1,23 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +BOOTLOADER = caterina + +# 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 +BLUETOOTH_ENABLE = no # Enable Bluetooth +AUDIO_ENABLE = no # Audio output +LTO_ENABLE = no # Use link time optimization From 0976db7e5e6c701bc3414556d20fbb6c7d19aa39 Mon Sep 17 00:00:00 2001 From: moyi4681 Date: Tue, 22 Sep 2020 15:48:55 +0800 Subject: [PATCH 853/930] [Keyboard] add Bella soldered keyboard (#10381) * Add bella soldered keyboard * Create info.json * Update keyboards/kbdfans/bella/soldered/rules.mk * Update keyboards/kbdfans/bella/soldered/rules.mk * Update keyboards/kbdfans/bella/soldered/rules.mk * Update keyboards/kbdfans/bella/soldered/rules.mk * Update keyboards/kbdfans/bella/soldered/info.json --- keyboards/kbdfans/bella/soldered/config.h | 42 +++++++++++++++ keyboards/kbdfans/bella/soldered/info.json | 12 +++++ .../bella/soldered/keymaps/default/keymap.c | 36 +++++++++++++ .../bella/soldered/keymaps/via/keymap.c | 51 +++++++++++++++++++ .../bella/soldered/keymaps/via/rules.mk | 2 + keyboards/kbdfans/bella/soldered/rules.mk | 22 ++++++++ keyboards/kbdfans/bella/soldered/soldered.c | 28 ++++++++++ keyboards/kbdfans/bella/soldered/soldered.h | 34 +++++++++++++ 8 files changed, 227 insertions(+) create mode 100755 keyboards/kbdfans/bella/soldered/config.h create mode 100644 keyboards/kbdfans/bella/soldered/info.json create mode 100755 keyboards/kbdfans/bella/soldered/keymaps/default/keymap.c create mode 100755 keyboards/kbdfans/bella/soldered/keymaps/via/keymap.c create mode 100644 keyboards/kbdfans/bella/soldered/keymaps/via/rules.mk create mode 100755 keyboards/kbdfans/bella/soldered/rules.mk create mode 100755 keyboards/kbdfans/bella/soldered/soldered.c create mode 100755 keyboards/kbdfans/bella/soldered/soldered.h diff --git a/keyboards/kbdfans/bella/soldered/config.h b/keyboards/kbdfans/bella/soldered/config.h new file mode 100755 index 000000000000..0d729bebe8f8 --- /dev/null +++ b/keyboards/kbdfans/bella/soldered/config.h @@ -0,0 +1,42 @@ +/* Copyright 2020 dztech + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License 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 0x4B42 +#define PRODUCT_ID 0x0007 +#define DEVICE_VER 0x0001 +#define MANUFACTURER KBDFANS +#define PRODUCT BELLA SOLDERED +/* key matrix size */ +#define MATRIX_ROWS 6 +#define MATRIX_COLS 16 + +#define MATRIX_ROW_PINS { B0, B1, B2, B3, D1, B6 } +#define MATRIX_COL_PINS { C6, C7, F7, F6, F5, F4, F1, F0, D2, D3, D5, D4, D6, D7, B4, B5 } +#define UNUSED_PINS + +#define DIODE_DIRECTION COL2ROW + +#define BACKLIGHT_PIN B7 +#ifdef BACKLIGHT_PIN +#define BACKLIGHT_LEVELS 3 +#endif + +#define DEBOUNCE 5 +#define LOCKING_SUPPORT_ENABLE +#define LOCKING_RESYNC_ENABLE diff --git a/keyboards/kbdfans/bella/soldered/info.json b/keyboards/kbdfans/bella/soldered/info.json new file mode 100644 index 000000000000..c031c117d84d --- /dev/null +++ b/keyboards/kbdfans/bella/soldered/info.json @@ -0,0 +1,12 @@ +{ + "keyboard_name": "bella_soldered", + "url": "", + "maintainer": "kbdfans", + "width": 16.25, + "height": 6.5, + "layouts": { + "LAYOUT_all": { + "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}, {"x":15.25, "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}, {"x":13, "y":1.5}, {"label":"Backspace", "x":14, "y":1.5}, {"x":15.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":"|", "x":13.5, "y":2.5, "w":1.5}, {"x":15.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":"Enter", "x":12.75, "y":3.5, "w":2.25}, {"x":15.25, "y":3.5}, {"label":"Shift", "x":0, "y":4.5, "w":1.25}, {"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":1.75}, {"label":"\u2191", "x":14.25, "y":4.5}, {"label":"Ctrl", "x":0, "y":5.5, "w":1.25}, {"label":"Alt", "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":"Alt", "x":10, "y":5.5, "w":1.5}, {"label":"Win", "x":11.5, "y":5.5, "w":1.5}, {"label":"\u2190", "x":13.25, "y":5.5}, {"label":"\u2193", "x":14.25, "y":5.5}, {"label":"\u2192", "x":15.25, "y":5.5}] + } + } +} diff --git a/keyboards/kbdfans/bella/soldered/keymaps/default/keymap.c b/keyboards/kbdfans/bella/soldered/keymaps/default/keymap.c new file mode 100755 index 000000000000..fc93b5ded1a0 --- /dev/null +++ b/keyboards/kbdfans/bella/soldered/keymaps/default/keymap.c @@ -0,0 +1,36 @@ +/* Copyright 2020 dztech + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public 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( + 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_PGUP, + 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_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_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_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_LCTL, KC_LALT, KC_LALT, KC_SPC, KC_RALT, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT), + + 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) + +}; diff --git a/keyboards/kbdfans/bella/soldered/keymaps/via/keymap.c b/keyboards/kbdfans/bella/soldered/keymaps/via/keymap.c new file mode 100755 index 000000000000..b9c77ce91194 --- /dev/null +++ b/keyboards/kbdfans/bella/soldered/keymaps/via/keymap.c @@ -0,0 +1,51 @@ +/* Copyright 2020 dztech + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public 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( + 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_PGUP, + 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_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_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_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_LCTL, KC_LALT, KC_LALT, KC_SPC, KC_RALT, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT), + + 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), + + 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), + + 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) +}; diff --git a/keyboards/kbdfans/bella/soldered/keymaps/via/rules.mk b/keyboards/kbdfans/bella/soldered/keymaps/via/rules.mk new file mode 100644 index 000000000000..36b7ba9cbc98 --- /dev/null +++ b/keyboards/kbdfans/bella/soldered/keymaps/via/rules.mk @@ -0,0 +1,2 @@ +VIA_ENABLE = yes +LTO_ENABLE = yes diff --git a/keyboards/kbdfans/bella/soldered/rules.mk b/keyboards/kbdfans/bella/soldered/rules.mk new file mode 100755 index 000000000000..b0ed9e41e578 --- /dev/null +++ b/keyboards/kbdfans/bella/soldered/rules.mk @@ -0,0 +1,22 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +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 +BLUETOOTH_ENABLE = no # Enable Bluetooth +AUDIO_ENABLE = no # Audio output diff --git a/keyboards/kbdfans/bella/soldered/soldered.c b/keyboards/kbdfans/bella/soldered/soldered.c new file mode 100755 index 000000000000..602543af2b23 --- /dev/null +++ b/keyboards/kbdfans/bella/soldered/soldered.c @@ -0,0 +1,28 @@ +/* Copyright 2020 dztech + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#include "soldered.h" +void matrix_init_kb(void) { + setPinOutput(E6); + matrix_init_user(); +} + +bool led_update_kb(led_t led_state) { + bool res = led_update_user(led_state); + if(res) { + writePin(E6, !led_state.caps_lock); + } + return res; +} diff --git a/keyboards/kbdfans/bella/soldered/soldered.h b/keyboards/kbdfans/bella/soldered/soldered.h new file mode 100755 index 000000000000..cebfc1bc6107 --- /dev/null +++ b/keyboards/kbdfans/bella/soldered/soldered.h @@ -0,0 +1,34 @@ +/* Copyright 2020 dztech + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License 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( \ + K000, K002, K003, K004, K005, K006, K007, K008, K009, 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, K304, K305, K306, K307, K308, K309, K310, K311, K313, K315, \ + K400, K401, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, K412, K414, \ + K500, K501, K502, K506, K510, K511, K513, K514, K515 \ +) { \ + { K000, KC_NO, K002, K003, K004, K005, K006, K007, K008, K009, KC_NO, 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, K304, K305, K306, K307, K308, K309, K310, K311, KC_NO, K313, KC_NO, K315 }, \ + { K400, K401, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, K412, KC_NO, K414, KC_NO }, \ + { K500, K501, K502, KC_NO, KC_NO, KC_NO, K506, KC_NO, KC_NO, KC_NO, K510, K511, KC_NO, K513, K514, K515 } \ +} From 0fbb1e550a1c65fcc07b206aec449811e71642ff Mon Sep 17 00:00:00 2001 From: Peter Landoll Date: Tue, 22 Sep 2020 08:31:37 -0400 Subject: [PATCH 854/930] Add description in Bluetooth docs for requiring NKRO to be disabled (#10359) --- docs/feature_bluetooth.md | 5 ++++- tmk_core/common.mk | 10 +++++++--- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/docs/feature_bluetooth.md b/docs/feature_bluetooth.md index 7b450b1ac8fc..08e5f24ac558 100644 --- a/docs/feature_bluetooth.md +++ b/docs/feature_bluetooth.md @@ -26,7 +26,10 @@ A Bluefruit UART friend can be converted to an SPI friend, however this [require ## Bluetooth Rules.mk Options -Use only one of these + +The currently supported Bluetooth chipsets do not support [N-Key Rollover (NKRO)](reference_glossary.md#n-key-rollover-nkro), so `rules.mk` must contain `NKRO_ENABLE = no`. + +Use only one of these to enable Bluetooth: * BLUETOOTH_ENABLE = yes (Legacy Option) * BLUETOOTH = RN42 * BLUETOOTH = AdafruitBLE diff --git a/tmk_core/common.mk b/tmk_core/common.mk index c60a1c405254..fdf2aa09727f 100644 --- a/tmk_core/common.mk +++ b/tmk_core/common.mk @@ -99,11 +99,15 @@ ifeq ($(strip $(COMMAND_ENABLE)), yes) endif ifeq ($(strip $(NKRO_ENABLE)), yes) - ifneq ($(PROTOCOL),VUSB) + ifeq ($(PROTOCOL), VUSB) + $(info NKRO is not currently supported on V-USB, and has been disabled.) + else ifeq ($(strip $(BLUETOOTH_ENABLE)), yes) + $(info NKRO is not currently supported with Bluetooth, and has been disabled.) + else ifneq ($(BLUETOOTH),) + $(info NKRO is not currently supported with Bluetooth, and has been disabled.) + else TMK_COMMON_DEFS += -DNKRO_ENABLE SHARED_EP_ENABLE = yes - else - $(info NKRO is not currently supported on V-USB, and has been disabled.) endif endif From 7a3a57e457aa28afa62448deca838a2582e86587 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Reibl=20J=C3=A1nos=20D=C3=A1niel?= Date: Tue, 22 Sep 2020 20:39:07 +0200 Subject: [PATCH 855/930] Updates to handwired/riblee_f401 keymaps (#10376) * Add new keymap with Hungarian accent support Add flashing support * Remove unnecessary mcu config * Use bootmagic instead of custom macros --- keyboards/handwired/riblee_f401/config.h | 8 +- .../riblee_f401/keymaps/default/keymap.c | 33 +- .../riblee_f401/keymaps/riblee/keymap.c | 341 ++++++++++++++++++ .../riblee_f401/keymaps/riblee/readme.md | 85 +++++ .../riblee_f401/keymaps/riblee/rules.mk | 2 + keyboards/handwired/riblee_f401/rules.mk | 4 +- 6 files changed, 450 insertions(+), 23 deletions(-) create mode 100644 keyboards/handwired/riblee_f401/keymaps/riblee/keymap.c create mode 100644 keyboards/handwired/riblee_f401/keymaps/riblee/readme.md create mode 100644 keyboards/handwired/riblee_f401/keymaps/riblee/rules.mk diff --git a/keyboards/handwired/riblee_f401/config.h b/keyboards/handwired/riblee_f401/config.h index d8e7e7d62113..6e5c079799d0 100644 --- a/keyboards/handwired/riblee_f401/config.h +++ b/keyboards/handwired/riblee_f401/config.h @@ -27,10 +27,6 @@ #define MATRIX_ROWS 5 #define MATRIX_COLS 12 -// Testing with onekey -// #define MATRIX_ROW_PINS { A7 } -// #define MATRIX_COL_PINS { B0 } - #define MATRIX_ROW_PINS { A6, A5, A4, A3, A2 } #define MATRIX_COL_PINS { B10, B1, B0, B15, A8, B3, B4, B5, B6, B7, B8, B9 } #define UNUSED_PINS @@ -39,3 +35,7 @@ #define BACKLIGHT_PIN A0 #define BACKLIGHT_LEVELS 5 + +#define MOUSEKEY_INTERVAL 32 + +#define TAPPING_TERM 175 \ No newline at end of file diff --git a/keyboards/handwired/riblee_f401/keymaps/default/keymap.c b/keyboards/handwired/riblee_f401/keymaps/default/keymap.c index 40f64e189977..4bb18634eba2 100644 --- a/keyboards/handwired/riblee_f401/keymaps/default/keymap.c +++ b/keyboards/handwired/riblee_f401/keymaps/default/keymap.c @@ -40,7 +40,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Qwerty * ,-----------------------------------------------------------------------------------. - * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | + * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | * |------+------+------+------+------+------+------+------+------+------+------+------| * | Tab | Q | W | E | R | T | Y | U | I | O | P | Del | * |------+------+------+------+------+-------------+------+------+------+------+------| @@ -48,15 +48,15 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |------+------+------+------+------+------|------+------+------+------+------+------| * | Shift| Z | X | C | V | B | N | M | , | . | / |Enter | * |------+------+------+------+------+------+------+------+------+------+------+------| - * | Brite| Ctrl | Alt | GUI |Lower | Bksp |Space |Raise | Left | Down | Up |Right | + * | Brite| Ctrl | Alt | GUI |Lower |Space |Space |Raise | Left | Down | Up |Right | * `-----------------------------------------------------------------------------------' */ [_QWERTY] = LAYOUT_ortho_5x12( - 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_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, KC_ENT, - BACKLIT, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_BSPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT + BACKLIT, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT ), /* Colemak @@ -111,7 +111,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |------+------+------+------+------+------|------+------+------+------+------+------| * | | F7 | F8 | F9 | F10 | F11 | F12 |ISO ~ |ISO | | | | | * |------+------+------+------+------+------+------+------+------+------+------+------| - * | | | | | | | | Next | Vol- | Vol+ | Play | + * | | | | | | BTN1 | BTN2 | | MS_L | MS_D | MS_U | MS_R | * `-----------------------------------------------------------------------------------' */ [_LOWER] = LAYOUT_ortho_5x12( @@ -119,7 +119,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { 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 + _______, _______, _______, _______, _______, KC_BTN1, KC_BTN2, _______, KC_MS_L, KC_MS_D, KC_MS_U, KC_MS_R ), /* Raise @@ -147,24 +147,23 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * ,-----------------------------------------------------------------------------------. * | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | * |------+------+------+------+------+------+------+------+------+------+------+------| - * | | Reset| | | | | | | | | | Del | + * | |Reset |Debug | | | | | | | | | Del | * |------+------+------+------+------+-------------+------+------+------+------+------| - * | | | |Aud on|AudOff|AGnorm|AGswap|Qwerty|Colemk|Dvorak| | | + * | | |Mu mod|Aud on|AudOff|AGnorm|AGswap|Qwerty|Colemk|Dvorak| | | * |------+------+------+------+------+------|------+------+------+------+------+------| - * | |Voice-|Voice+|Mus on|MusOff|MidiOn|MidOff| | | | | | + * | | | | | | | NKRO | Swap |Un swp| | | | * |------+------+------+------+------+------+------+------+------+------+------+------| * | | | | | | | | | | | | * `-----------------------------------------------------------------------------------' */ [_ADJUST] = LAYOUT_ortho_5x12( - 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, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + 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, _______, _______, + _______, _______, _______, _______, _______, _______, NK_TOGG, LCG_SWP, LCG_NRM, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ ) - }; layer_state_t layer_state_set_user(layer_state_t state) { @@ -193,12 +192,12 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { break; case BACKLIT: if (record->event.pressed) { - register_code(KC_RSFT); + register_code(keycode_config(KC_LGUI)); #ifdef BACKLIGHT_ENABLE backlight_step(); #endif } else { - unregister_code(KC_RSFT); + unregister_code(keycode_config(KC_LGUI)); } return false; break; diff --git a/keyboards/handwired/riblee_f401/keymaps/riblee/keymap.c b/keyboards/handwired/riblee_f401/keymaps/riblee/keymap.c new file mode 100644 index 000000000000..33319542a71b --- /dev/null +++ b/keyboards/handwired/riblee_f401/keymaps/riblee/keymap.c @@ -0,0 +1,341 @@ +/* Copyright 2015-2017 Jack Humbert + * Copyright 2020 Daniel Reibl + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public 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 preonic_layers { + _QWERTY, + _COLEMAK, + _DVORAK, + _LOWER, + _RAISE, + _ADJUST +}; + +enum preonic_keycodes { + QWERTY = SAFE_RANGE, + COLEMAK, + DVORAK, + BACKLIT +}; + +#define LOWER MO(_LOWER) +#define RAISE MO(_RAISE) + +// Tap Dance declarations +enum { + TD_A, + TD_E, + TD_I, + TD_O, + TD_U, +}; + +const uint8_t shift = MOD_BIT(KC_LSFT) | MOD_BIT(KC_RSFT); + +// Tap Dance functions +void dance_key_a (qk_tap_dance_state_t *state, void *user_data) { + if (state->count == 1) { + SEND_STRING("a"); + reset_tap_dance(state); + } else if (state->count == 2) { + if (!(keyboard_report->mods & shift)) { + send_unicode_string("á"); + } else { + send_unicode_string("Á"); + } + + reset_tap_dance(state); + } +} + +void dance_key_e (qk_tap_dance_state_t *state, void *user_data) { + if (state->count == 1) { + SEND_STRING("e"); + reset_tap_dance(state); + } else if (state->count == 2) { + if (!(keyboard_report->mods & shift)) { + send_unicode_string("é"); + } else { + send_unicode_string("É"); + } + + reset_tap_dance(state); + } +} + +void dance_key_i (qk_tap_dance_state_t *state, void *user_data) { + if (state->count == 1) { + SEND_STRING("i"); + reset_tap_dance(state); + } else if (state->count == 2) { + if (!(keyboard_report->mods & shift)) { + send_unicode_string("í"); + } else { + send_unicode_string("Í"); + } + + reset_tap_dance(state); + } +} + +void dance_key_o (qk_tap_dance_state_t *state, void *user_data) { + if (state->count == 1) { + SEND_STRING("o"); + reset_tap_dance(state); + } else if (state->count == 2) { + if (!(keyboard_report->mods & shift)) { + send_unicode_string("ó"); + } else { + send_unicode_string("Ó"); + } + + reset_tap_dance(state); + } else if (state->count == 3) { + if (!(keyboard_report->mods & shift)) { + send_unicode_string("ö"); + } else { + send_unicode_string("Ö"); + } + + reset_tap_dance(state); + } else if (state->count == 4) { + if (!(keyboard_report->mods & shift)) { + send_unicode_string("ő"); + } else { + send_unicode_string("Ő"); + } + + reset_tap_dance(state); + } +} + +void dance_key_u (qk_tap_dance_state_t *state, void *user_data) { + if (state->count == 1) { + SEND_STRING("u"); + reset_tap_dance(state); + } else if (state->count == 2) { + if (!(keyboard_report->mods & shift)) { + send_unicode_string("ú"); + } else { + send_unicode_string("Ú"); + } + + reset_tap_dance(state); + } else if (state->count == 3) { + if (!(keyboard_report->mods & shift)) { + send_unicode_string("ü"); + } else { + send_unicode_string("Ü"); + } + + reset_tap_dance(state); + } else if (state->count == 4) { + if (!(keyboard_report->mods & shift)) { + send_unicode_string("ű"); + } else { + send_unicode_string("Ű"); + } + + reset_tap_dance(state); + } +} + +// Tap Dance definitions +qk_tap_dance_action_t tap_dance_actions[] = { + [TD_A] = ACTION_TAP_DANCE_FN(dance_key_a), + [TD_E] = ACTION_TAP_DANCE_FN(dance_key_e), + [TD_I] = ACTION_TAP_DANCE_FN(dance_key_i), + [TD_O] = ACTION_TAP_DANCE_FN(dance_key_o), + [TD_U] = ACTION_TAP_DANCE_FN(dance_key_u), +}; + +// Tap Dance keys +#define C_KC_A TD(TD_A) +#define C_KC_E TD(TD_E) +#define C_KC_I TD(TD_I) +#define C_KC_O TD(TD_O) +#define C_KC_U TD(TD_U) + +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 |Space |Raise | Left | Down | Up |Right | + * `-----------------------------------------------------------------------------------' + */ +[_QWERTY] = LAYOUT_ortho_5x12( + 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, C_KC_E, KC_R, KC_T, KC_Y, C_KC_U, C_KC_I, C_KC_O, KC_P, KC_DEL, + KC_ESC, C_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_ortho_5x12( + 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_ortho_5x12( + 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 |ISO ~ |ISO | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | BTN1 | BTN2 | | MS_L | MS_D | MS_U | MS_R | + * `-----------------------------------------------------------------------------------' + */ +[_LOWER] = LAYOUT_ortho_5x12( + 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_BTN1, KC_BTN2, _______, KC_MS_L, KC_MS_D, KC_MS_U, KC_MS_R +), + +/* Raise + * ,-----------------------------------------------------------------------------------. + * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Del | F1 | F2 | F3 | F4 | F5 | F6 | - | = | [ | ] | \ | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | Shift| F7 | F8 | F9 | F10 | F11 | F12 |ISO # |ISO / | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | Next | Vol- | Vol+ | Play | + * `-----------------------------------------------------------------------------------' + */ +[_RAISE] = LAYOUT_ortho_5x12( + 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_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_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_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 |Debug | | | | | | | | | Del | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | |Mu mod|Aud on|AudOff|AGnorm|AGswap|Qwerty|Colemk|Dvorak| | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | | | | | | NKRO | Swap |Un swp| | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | + * `-----------------------------------------------------------------------------------' + */ +[_ADJUST] = LAYOUT_ortho_5x12( + 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, _______, _______, + _______, _______, _______, _______, _______, _______, NK_TOGG, LCG_SWP, LCG_NRM, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ +) + +}; + +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; + 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(keycode_config(KC_LGUI)); + #ifdef BACKLIGHT_ENABLE + backlight_step(); + #endif + } else { + unregister_code(keycode_config(KC_LGUI)); + } + return false; + break; + } + return true; +}; diff --git a/keyboards/handwired/riblee_f401/keymaps/riblee/readme.md b/keyboards/handwired/riblee_f401/keymaps/riblee/readme.md new file mode 100644 index 000000000000..1045c9881863 --- /dev/null +++ b/keyboards/handwired/riblee_f401/keymaps/riblee/readme.md @@ -0,0 +1,85 @@ +# Riblee preonic + +This layout is modified to support accent Hungarian keys via Unicode and Tap Dance + +``` + +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 |Space |Raise | Left | Down | Up |Right | +`-----------------------------------------------------------------------------------' + +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 | +`-----------------------------------------------------------------------------------' + +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 | +`-----------------------------------------------------------------------------------' + +Lower +,-----------------------------------------------------------------------------------. +| ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Bksp | +|------+------+------+------+------+-------------+------+------+------+------+------| +| ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Del | +|------+------+------+------+------+-------------+------+------+------+------+------| +| Del | F1 | F2 | F3 | F4 | F5 | F6 | _ | + | { | } | | | +|------+------+------+------+------+------|------+------+------+------+------+------| +| | F7 | F8 | F9 | F10 | F11 | F12 |ISO ~ |ISO | | | | | +|------+------+------+------+------+------+------+------+------+------+------+------| +| | | | | | BTN1 | BTN2 | | MS_L | MS_D | MS_U | MS_R | +`-----------------------------------------------------------------------------------' + +Raise +,-----------------------------------------------------------------------------------. +| ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | +|------+------+------+------+------+------+------+------+------+------+------+------| +| F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | +|------+------+------+------+------+-------------+------+------+------+------+------| +| Del | F1 | F2 | F3 | F4 | F5 | F6 | - | = | [ | ] | \ | +|------+------+------+------+------+------|------+------+------+------+------+------| +| Shift| F7 | F8 | F9 | F10 | F11 | F12 |ISO # |ISO / | | | | +|------+------+------+------+------+------+------+------+------+------+------+------| +| | | | | | | | Next | Vol- | Vol+ | Play | +`-----------------------------------------------------------------------------------' + +Adjust (Lower + Raise) +,-----------------------------------------------------------------------------------. +| F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | +|------+------+------+------+------+------+------+------+------+------+------+------| +| |Reset |Debug | | | | | | | | | Del | +|------+------+------+------+------+-------------+------+------+------+------+------| +| | |Mu mod|Aud on|AudOff|AGnorm|AGswap|Qwerty|Colemk|Dvorak| | | +|------+------+------+------+------+------|------+------+------+------+------+------| +| | | | | | | NKRO | Swap |Un swp| | | | +|------+------+------+------+------+------+------+------+------+------+------+------| +| | | | | | | | | | | | +`-----------------------------------------------------------------------------------' + +``` \ No newline at end of file diff --git a/keyboards/handwired/riblee_f401/keymaps/riblee/rules.mk b/keyboards/handwired/riblee_f401/keymaps/riblee/rules.mk new file mode 100644 index 000000000000..517f2700e142 --- /dev/null +++ b/keyboards/handwired/riblee_f401/keymaps/riblee/rules.mk @@ -0,0 +1,2 @@ +UNICODE_ENABLE = yes +TAP_DANCE_ENABLE = yes \ No newline at end of file diff --git a/keyboards/handwired/riblee_f401/rules.mk b/keyboards/handwired/riblee_f401/rules.mk index 2cb1d380e116..bd4592d504c9 100644 --- a/keyboards/handwired/riblee_f401/rules.mk +++ b/keyboards/handwired/riblee_f401/rules.mk @@ -7,7 +7,7 @@ STM32_BOOTLOADER_ADDRESS = 0x1FFF0000 # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = full # Virtual DIP switch configuration MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control KEYBOARD_SHARED_EP = yes @@ -16,7 +16,7 @@ COMMAND_ENABLE = no # Commands for debug and configuration # 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 +NKRO_ENABLE = yes # USB Nkey Rollover BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality BACKLIGHT_DRIVER = software RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow From e3395beda02d555090e6ccc9b193530351eb71f4 Mon Sep 17 00:00:00 2001 From: Seaton Jiang Date: Wed, 23 Sep 2020 02:44:51 +0800 Subject: [PATCH 856/930] [Keyboard] Add Longnald Corin Keyboard (#10280) * [Keyboard] Add Longnald Corin * feat: optimized firmware * feat: optimized firmware * fix: keyboards/longnald/corin/rules.mk * feat: rename layout macros * feat: rename layout macros * feat: rename layout macros * feat: rename layout macros * feat: rename layout macros * feat: rename layout macros * feat: rename layout macros --- keyboards/longnald/corin/config.h | 52 +++++++++++++ keyboards/longnald/corin/corin.c | 19 +++++ keyboards/longnald/corin/corin.h | 35 +++++++++ keyboards/longnald/corin/info.json | 77 +++++++++++++++++++ .../longnald/corin/keymaps/default/keymap.c | 49 ++++++++++++ keyboards/longnald/corin/readme.md | 15 ++++ keyboards/longnald/corin/rules.mk | 22 ++++++ 7 files changed, 269 insertions(+) create mode 100644 keyboards/longnald/corin/config.h create mode 100644 keyboards/longnald/corin/corin.c create mode 100644 keyboards/longnald/corin/corin.h create mode 100644 keyboards/longnald/corin/info.json create mode 100644 keyboards/longnald/corin/keymaps/default/keymap.c create mode 100644 keyboards/longnald/corin/readme.md create mode 100644 keyboards/longnald/corin/rules.mk diff --git a/keyboards/longnald/corin/config.h b/keyboards/longnald/corin/config.h new file mode 100644 index 000000000000..12be8ba27b3d --- /dev/null +++ b/keyboards/longnald/corin/config.h @@ -0,0 +1,52 @@ +/* + * Copyright (C) 2020 Longnald + * Copyright (C) 2020 Seaton Jiang + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License 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 0x5633 +#define PRODUCT_ID 0x1024 +#define DEVICE_VER 0x0004 +#define MANUFACTURER Longnald +#define PRODUCT Corin + +/* key matrix size */ +#define MATRIX_ROWS 5 +#define MATRIX_COLS 15 + +/* Keyboard Matrix Assignments */ +#define MATRIX_ROW_PINS { F4, F0, B2, B3, D5 } +#define MATRIX_COL_PINS { F7, F6, F1, F5, B1, E6, D4, B7, D1, D2, D0, B4, B6, C6, C7 } + +#define DIODE_DIRECTION COL2ROW + +#define RGB_DI_PIN D3 +#ifdef RGB_DI_PIN +# define RGBLED_NUM 64 +# define RGBLIGHT_HUE_STEP 20 +# define RGBLIGHT_SAT_STEP 20 +# define RGBLIGHT_VAL_STEP 40 +# define RGBLIGHT_LIMIT_VAL 200 +# define RGBLIGHT_SLEEP +# define RGBLIGHT_EFFECT_BREATHING +# define RGBLIGHT_EFFECT_RAINBOW_SWIRL +# define RGBLIGHT_EFFECT_SNAKE +# define RGBLIGHT_EFFECT_STATIC_GRADIENT +#endif diff --git a/keyboards/longnald/corin/corin.c b/keyboards/longnald/corin/corin.c new file mode 100644 index 000000000000..fabe3686d841 --- /dev/null +++ b/keyboards/longnald/corin/corin.c @@ -0,0 +1,19 @@ +/* + * Copyright (C) 2020 Longnald + * Copyright (C) 2020 Seaton Jiang + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#include "corin.h" \ No newline at end of file diff --git a/keyboards/longnald/corin/corin.h b/keyboards/longnald/corin/corin.h new file mode 100644 index 000000000000..fa727c3c7897 --- /dev/null +++ b/keyboards/longnald/corin/corin.h @@ -0,0 +1,35 @@ +/* + * Copyright (C) 2020 Longnald + * Copyright (C) 2020 Seaton Jiang + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License 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_64_ansi( \ + 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, \ + 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 }, \ + { KC_NO, 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 } \ +} diff --git a/keyboards/longnald/corin/info.json b/keyboards/longnald/corin/info.json new file mode 100644 index 000000000000..e0faf22090eb --- /dev/null +++ b/keyboards/longnald/corin/info.json @@ -0,0 +1,77 @@ +{ + "keyboard_name": "Corin", + "url": "https://github.com/longnald/corin", + "maintainer": "Seaton Jiang ", + "width": 15, + "height": 5, + "layouts": { + "LAYOUT_64_ansi": { + "layout": [ + { "label": "K00 (F4,F7)", "x": 0, "y": 0 }, + { "label": "K01 (F4,F6)", "x": 1, "y": 0 }, + { "label": "K02 (F4,F1)", "x": 2, "y": 0 }, + { "label": "K03 (F4,F5)", "x": 3, "y": 0 }, + { "label": "K04 (F4,B1)", "x": 4, "y": 0 }, + { "label": "K05 (F4,E6)", "x": 5, "y": 0 }, + { "label": "K06 (F4,D6)", "x": 6, "y": 0 }, + { "label": "K07 (F4,B7)", "x": 7, "y": 0 }, + { "label": "K08 (F4,D1)", "x": 8, "y": 0 }, + { "label": "K09 (F4,D2)", "x": 9, "y": 0 }, + { "label": "K0A (F4,D0)", "x": 10, "y": 0 }, + { "label": "K0B (F4,B4)", "x": 11, "y": 0 }, + { "label": "K0C (F4,B6)", "x": 12, "y": 0 }, + { "label": "K0E (F4,C7)", "x": 13, "y": 0, "w": 2 }, + { "label": "K10 (F0,F7)", "x": 0, "y": 1, "w": 1.5 }, + { "label": "K12 (F0,F1)", "x": 1.5, "y": 1 }, + { "label": "K13 (F0,F5)", "x": 2.5, "y": 1 }, + { "label": "K14 (F0,B1)", "x": 3.5, "y": 1 }, + { "label": "K15 (F0,E6)", "x": 4.5, "y": 1 }, + { "label": "K16 (F0,D6)", "x": 5.5, "y": 1 }, + { "label": "K17 (F0,B7)", "x": 6.5, "y": 1 }, + { "label": "K18 (F0,D1)", "x": 7.5, "y": 1 }, + { "label": "K19 (F0,D2)", "x": 8.5, "y": 1 }, + { "label": "K1A (F0,D0)", "x": 9.5, "y": 1 }, + { "label": "K1B (F0,B4)", "x": 10.5, "y": 1 }, + { "label": "K1C (F0,B6)", "x": 11.5, "y": 1 }, + { "label": "K1D (F0,C6)", "x": 12.5, "y": 1 }, + { "label": "K1E (F0,C7)", "x": 13.5, "y": 1, "w": 1.5 }, + { "label": "K20 (B2,F7)", "x": 0, "y": 2, "w": 1.75 }, + { "label": "K22 (B2,F1)", "x": 1.75, "y": 2 }, + { "label": "K23 (B2,F5)", "x": 2.75, "y": 2 }, + { "label": "K24 (B2,B1)", "x": 3.75, "y": 2 }, + { "label": "K25 (B2,E6)", "x": 4.75, "y": 2 }, + { "label": "K26 (B2,D6)", "x": 5.75, "y": 2 }, + { "label": "K27 (B2,B7)", "x": 6.75, "y": 2 }, + { "label": "K28 (B2,D1)", "x": 7.75, "y": 2 }, + { "label": "K29 (B2,D2)", "x": 8.75, "y": 2 }, + { "label": "K2A (B2,D0)", "x": 9.75, "y": 2 }, + { "label": "K2B (B2,B4)", "x": 10.75, "y": 2 }, + { "label": "K2C (B2,B6)", "x": 11.75, "y": 2 }, + { "label": "K2D (B2,C6)", "x": 12.75, "y": 2, "w": 2.25 }, + { "label": "K31 (B3,F6)", "x": 0, "y": 3, "w": 2 }, + { "label": "K32 (B3,F1)", "x": 2, "y": 3 }, + { "label": "K33 (B3,F5)", "x": 3, "y": 3 }, + { "label": "K34 (B3,B1)", "x": 4, "y": 3 }, + { "label": "K35 (B3,E6)", "x": 5, "y": 3 }, + { "label": "K36 (B3,D6)", "x": 6, "y": 3 }, + { "label": "K37 (B3,B7)", "x": 7, "y": 3 }, + { "label": "K38 (B3,D1)", "x": 8, "y": 3 }, + { "label": "K39 (B3,D2)", "x": 9, "y": 3 }, + { "label": "K3A (B3,D0)", "x": 10, "y": 3 }, + { "label": "K3B (B3,B4)", "x": 11, "y": 3 }, + { "label": "K3C (B3,B6)", "x": 12, "y": 3 }, + { "label": "K3D (B3,C6)", "x": 13, "y": 3 }, + { "label": "K3E (B3,C7)", "x": 14, "y": 3 }, + { "label": "K40 (D5,F7)", "x": 0, "y": 4, "w": 1.25 }, + { "label": "K41 (D5,F6)", "x": 1.25, "y": 4, "w": 1.25 }, + { "label": "K43 (D5,F5)", "x": 2.5, "y": 4, "w": 1.25 }, + { "label": "K46 (D5,D6)", "x": 3.75, "y": 4, "w": 6.25 }, + { "label": "K4A (D5,D0)", "x": 10, "y": 4 }, + { "label": "K4B (D5,B4)", "x": 11, "y": 4 }, + { "label": "K4C (D5,B6)", "x": 12, "y": 4 }, + { "label": "K4D (D5,C6)", "x": 13, "y": 4 }, + { "label": "K4E (D5,C7)", "x": 14, "y": 4 } + ] + } + } +} diff --git a/keyboards/longnald/corin/keymaps/default/keymap.c b/keyboards/longnald/corin/keymaps/default/keymap.c new file mode 100644 index 000000000000..c8906efc596f --- /dev/null +++ b/keyboards/longnald/corin/keymaps/default/keymap.c @@ -0,0 +1,49 @@ +/* + * Copyright (C) 2020 Longnald + * Copyright (C) 2020 Seaton Jiang + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public 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_64_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_HOME, KC_UP, KC_END, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, MO(2), MO(1), KC_LEFT, KC_DOWN, KC_RGHT + ), + [1] = LAYOUT_64_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_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_INS, KC_NO, KC_PSCR, KC_SLCK, KC_PAUS, KC_NO, + KC_NO, KC_NO, KC_NO, KC_NO, 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_PGUP, KC_NO, KC_PGDN, + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO + ), + [2] = LAYOUT_64_ansi( + KC_NO, RGB_TOG, RGB_M_P, RGB_M_B, RGB_M_G, RGB_M_SW, RGB_M_SN, KC_NO, KC_NO, RGB_HUD, RGB_HUI, RGB_VAD, RGB_VAI, KC_NO, + KC_NO, KC_NO, LAG_NRM, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, LAG_SWP, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + MO(3), KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO + ), + [3] = LAYOUT_64_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, 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_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO + ), +}; diff --git a/keyboards/longnald/corin/readme.md b/keyboards/longnald/corin/readme.md new file mode 100644 index 000000000000..116baa7d2811 --- /dev/null +++ b/keyboards/longnald/corin/readme.md @@ -0,0 +1,15 @@ +# Corin + +![Corin view](https://github.com/longnald/corin/raw/master/view/view-1.jpg) + +Corin is a 64-key keyboard that adds 4 more arrow keys than a regular 60% keyboard made and sold by Seaton Jiang. + +- Keyboard Maintainer: [Longnald](https://github.com/longnald) & [Seaton Jiang](https://github.com/seatonjiang) +- Hardware Supported: [Corin PCB (uses 32U4)](https://github.com/longnald/corin) +- Hardware Availability: [wwww.longnald.com](https://wwww.longnald.com/) + +Make example for this keyboard (after setting up your build environment): + + make longnald/corin: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. diff --git a/keyboards/longnald/corin/rules.mk b/keyboards/longnald/corin/rules.mk new file mode 100644 index 000000000000..965087c1a6a6 --- /dev/null +++ b/keyboards/longnald/corin/rules.mk @@ -0,0 +1,22 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +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 = yes # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow +BLUETOOTH_ENABLE = no # Enable Bluetooth +AUDIO_ENABLE = no # Audio output From 57dd756507094224bc68bbd6b6fac0f0ad7f8084 Mon Sep 17 00:00:00 2001 From: Ethan Nguyen Date: Tue, 22 Sep 2020 19:47:03 +0100 Subject: [PATCH 857/930] [Keymap] Add ethan605 keymap for kbd75 (#10343) * Add my KBD75 keymaps * Acknowledge PR reviews * Acknowledge PR reviews --- .../kbdfans/kbd75/keymaps/ethan605/keymap.c | 67 +++++++++++++++++++ 1 file changed, 67 insertions(+) create mode 100644 keyboards/kbdfans/kbd75/keymaps/ethan605/keymap.c diff --git a/keyboards/kbdfans/kbd75/keymaps/ethan605/keymap.c b/keyboards/kbdfans/kbd75/keymaps/ethan605/keymap.c new file mode 100644 index 000000000000..4a987b9a900d --- /dev/null +++ b/keyboards/kbdfans/kbd75/keymaps/ethan605/keymap.c @@ -0,0 +1,67 @@ +/* Copyright 2020 @ethan605 + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public 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: Qwerty layer + * ┌─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┐ + * │ ESC │ F1 │ F2 │ F3 │ F4 │ F5 │ F6 │ F7 │ F8 │ F9 │ F10 │ F11 │ F12 │ INS │ DEL │ FN │ + * ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┴─────┼─────┤ + * │ ` │ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ - │ = │ BSPC │HOME │ + * ├─────┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬────────┼─────┤ + * │ TAB │ Q │ W │ E │ R │ T │ Y │ U │ I │ O │ P │ [ │ ] │ BSLS │END │ + * ├────────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┴────────┼─────┤ + * │ LCTRL │ A │ S │ D │ F │ G │ H │ J │ K │ L │ ; │ ' │ ENTER │PGUP │ + * ├─────────┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴───────┬─────┼─────┤ + * │ LSHFT │ Z │ X │ C │ V │ B │ N │ M │ , │ . │ / │ RSHFT │ UP │PGDN │ + * ├──────┬─────┴─┬───┴──┬──┴─────┴─────┴─────┴─────┴─────┴────┬┴────┬┴────┬┴────┬─────┼─────┼─────┤ + * │ CAPS │ LALT │ LCMD │ SPC │RCMD │RALT │RCTL │LEFT │DOWN │RIGHT│ + * └──────┴───────┴──────┴─────────────────────────────────────┴─────┴─────┴─────┴─────┴─────┴─────┘ + */ + [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, 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_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_END, + 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, 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_PGDN, + KC_CAPS, KC_LALT, KC_LCMD, KC_SPC, KC_SPC, KC_SPC, KC_RCMD, KC_RALT, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT + ), + + /* 1: Function layer + * ┌─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┐ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ FN │ + * ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┴─────┼─────┤ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │ RESET │ │ + * ├─────┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬────────┼─────┤ + * │ │ TOG │ MOD │ HU+ │ HU- │ SA+ │ SA- │ VA+ │ VA- │ │ │ │ │ │ │ // RGB controls + * ├────────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┴────────┼─────┤ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + * ├─────────┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴───────┬─────┼─────┤ + * │ │ │ │ │ DEC │ TOG │ INC │STEP │ │ │ │ │ │ │ // Backlight controls + * ├──────┬─────┴─┬───┴──┬──┴─────┴─────┴─────┴─────┴─────┴────┬┴────┬┴────┬┴────┬─────┼─────┼─────┤ + * │ │ │ │ │ │ │ │ │ │ │ + * └──────┴───────┴──────┴─────────────────────────────────────┴─────┴─────┴─────┴─────┴─────┴─────┘ + */ + [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, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), +}; From 539cc45fba6e535781cd1711da0f1a5ce9b3ce63 Mon Sep 17 00:00:00 2001 From: Dmitry Nosachev Date: Tue, 22 Sep 2020 22:26:19 +0300 Subject: [PATCH 858/930] [Keyboard] Fujitsu T111 keyboard (#10262) * Fujitsu T111 keyboard * info.json: fixed missing key on top row * info.json: fixed name and maintaner fields * Update keyboards/handwired/t111/keymaps/oleg/keymap.c * Update keyboards/handwired/t111/config.h * Update keyboards/handwired/t111/keymaps/oleg/keymap.c * Update keyboards/handwired/t111/keymaps/oleg/keymap.c * Apply suggestions from code review * Update keyboards/handwired/t111/readme.md --- keyboards/handwired/t111/chconf.h | 714 ++++++++++++++++++ keyboards/handwired/t111/config.h | 92 +++ keyboards/handwired/t111/halconf.h | 525 +++++++++++++ keyboards/handwired/t111/info.json | 12 + .../handwired/t111/keymaps/default/keymap.c | 50 ++ .../handwired/t111/keymaps/oleg/config.h | 20 + .../handwired/t111/keymaps/oleg/keymap.c | 145 ++++ .../handwired/t111/keymaps/oleg/rules.mk | 1 + keyboards/handwired/t111/mcuconf.h | 209 +++++ keyboards/handwired/t111/readme.md | 45 ++ keyboards/handwired/t111/rules.mk | 29 + keyboards/handwired/t111/t111.c | 17 + keyboards/handwired/t111/t111.h | 57 ++ 13 files changed, 1916 insertions(+) create mode 100644 keyboards/handwired/t111/chconf.h create mode 100644 keyboards/handwired/t111/config.h create mode 100644 keyboards/handwired/t111/halconf.h create mode 100644 keyboards/handwired/t111/info.json create mode 100644 keyboards/handwired/t111/keymaps/default/keymap.c create mode 100644 keyboards/handwired/t111/keymaps/oleg/config.h create mode 100644 keyboards/handwired/t111/keymaps/oleg/keymap.c create mode 100644 keyboards/handwired/t111/keymaps/oleg/rules.mk create mode 100644 keyboards/handwired/t111/mcuconf.h create mode 100644 keyboards/handwired/t111/readme.md create mode 100644 keyboards/handwired/t111/rules.mk create mode 100644 keyboards/handwired/t111/t111.c create mode 100644 keyboards/handwired/t111/t111.h diff --git a/keyboards/handwired/t111/chconf.h b/keyboards/handwired/t111/chconf.h new file mode 100644 index 000000000000..f5e471640c56 --- /dev/null +++ b/keyboards/handwired/t111/chconf.h @@ -0,0 +1,714 @@ +/* + 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. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +/** + * @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. + * + * @addtogroup config + * @details Kernel related settings and hooks. + * @{ + */ + +#ifndef CHCONF_H +#define CHCONF_H + +#define _CHIBIOS_RT_CONF_ +#define _CHIBIOS_RT_CONF_VER_6_0_ + +/*===========================================================================*/ +/** + * @name System timers settings + * @{ + */ +/*===========================================================================*/ + +/** + * @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. + * @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. + */ +#if !defined(CH_CFG_ST_TIMEDELTA) +#define CH_CFG_ST_TIMEDELTA 0 +#endif + +/** @} */ + +/*===========================================================================*/ +/** + * @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. + */ +#if !defined(CH_CFG_TIME_QUANTUM) +#define CH_CFG_TIME_QUANTUM 0 +#endif + +/** + * @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. + */ +#if !defined(CH_CFG_MEMCORE_SIZE) +#define CH_CFG_MEMCORE_SIZE 0 +#endif + +/** + * @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. + */ +#if !defined(CH_CFG_NO_IDLE_THREAD) +#define CH_CFG_NO_IDLE_THREAD FALSE +#endif + +/** @} */ + +/*===========================================================================*/ +/** + * @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. + */ +#if !defined(CH_CFG_OPTIMIZE_SPEED) +#define CH_CFG_OPTIMIZE_SPEED TRUE +#endif + +/** @} */ + +/*===========================================================================*/ +/** + * @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. + */ +#if !defined(CH_CFG_USE_TM) +#define CH_CFG_USE_TM FALSE +#endif + +/** + * @brief Threads registry APIs. + * @details If enabled then the registry APIs are included in the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_REGISTRY) +#define CH_CFG_USE_REGISTRY TRUE +#endif + +/** + * @brief Threads synchronization APIs. + * @details If enabled then the @p chThdWait() function is included in + * the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_WAITEXIT) +#define CH_CFG_USE_WAITEXIT TRUE +#endif + +/** + * @brief Semaphores APIs. + * @details If enabled then the Semaphores APIs are included in the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_SEMAPHORES) +#define CH_CFG_USE_SEMAPHORES TRUE +#endif + +/** + * @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. + */ +#if !defined(CH_CFG_USE_SEMAPHORES_PRIORITY) +#define CH_CFG_USE_SEMAPHORES_PRIORITY FALSE +#endif + +/** + * @brief Mutexes APIs. + * @details If enabled then the mutexes APIs are included in the kernel. + * + * @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. + * @note Recursive mutexes are heavier and have an increased + * memory footprint. + * + * @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. + * @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. + */ +#if !defined(CH_CFG_USE_CONDVARS) +#define CH_CFG_USE_CONDVARS TRUE +#endif + +/** + * @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. + */ +#if !defined(CH_CFG_USE_CONDVARS_TIMEOUT) +#define CH_CFG_USE_CONDVARS_TIMEOUT FALSE +#endif + +/** + * @brief Events Flags APIs. + * @details If enabled then the event flags APIs are included in the kernel. + * + * @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. + * @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. + */ +#if !defined(CH_CFG_USE_EVENTS_TIMEOUT) +#define CH_CFG_USE_EVENTS_TIMEOUT TRUE +#endif + +/** + * @brief Synchronous Messages APIs. + * @details If enabled then the synchronous messages APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_MESSAGES) +#define CH_CFG_USE_MESSAGES TRUE +#endif + +/** + * @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. + */ +#if !defined(CH_CFG_USE_MESSAGES_PRIORITY) +#define CH_CFG_USE_MESSAGES_PRIORITY FALSE +#endif + +/** + * @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. + */ +#if !defined(CH_CFG_USE_MAILBOXES) +#define CH_CFG_USE_MAILBOXES TRUE +#endif + +/** + * @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. + */ +#if !defined(CH_CFG_USE_MEMCORE) +#define CH_CFG_USE_MEMCORE TRUE +#endif + +/** + * @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. + */ +#if !defined(CH_CFG_USE_HEAP) +#define CH_CFG_USE_HEAP TRUE +#endif + +/** + * @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. + */ +#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. + * @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. + */ +#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 + +/** @} */ + +/*===========================================================================*/ +/** + * @name Debug options + * @{ + */ +/*===========================================================================*/ + +/** + * @brief Debug option, kernel statistics. + * + * @note The default is @p FALSE. + */ +#if !defined(CH_DBG_STATISTICS) +#define CH_DBG_STATISTICS FALSE +#endif + +/** + * @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. + */ +#if !defined(CH_DBG_SYSTEM_STATE_CHECK) +#define CH_DBG_SYSTEM_STATE_CHECK FALSE +#endif + +/** + * @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. + */ +#if !defined(CH_DBG_ENABLE_CHECKS) +#define CH_DBG_ENABLE_CHECKS FALSE +#endif + +/** + * @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. + */ +#if !defined(CH_DBG_ENABLE_ASSERTS) +#define CH_DBG_ENABLE_ASSERTS FALSE +#endif + +/** + * @brief Debug option, trace buffer. + * @details If enabled then the trace buffer is activated. + * + * @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. + * @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. + */ +#if !defined(CH_DBG_ENABLE_STACK_CHECK) +#define CH_DBG_ENABLE_STACK_CHECK FALSE +#endif + +/** + * @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. + */ +#if !defined(CH_DBG_FILL_THREADS) +#define CH_DBG_FILL_THREADS FALSE +#endif + +/** + * @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. + */ +#if !defined(CH_DBG_THREADS_PROFILING) +#define CH_DBG_THREADS_PROFILING FALSE +#endif + +/** @} */ + +/*===========================================================================*/ +/** + * @name Kernel hooks + * @{ + */ +/*===========================================================================*/ + +/** + * @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. + */ +#define CH_CFG_THREAD_EXTRA_FIELDS \ + /* Add threads custom fields here.*/ + +/** + * @brief Threads initialization hook. + * @details User initialization code added to the @p _thread_init() function. + * + * @note It is invoked from within @p _thread_init() 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/handwired/t111/config.h b/keyboards/handwired/t111/config.h new file mode 100644 index 000000000000..e459e7659eb8 --- /dev/null +++ b/keyboards/handwired/t111/config.h @@ -0,0 +1,92 @@ +/* +Copyright 2020 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 0x6FAA +#define DEVICE_VER 0x0001 +#define MANUFACTURER FUJITSU +#define PRODUCT T111 + +/* key matrix size */ +#define MATRIX_ROWS 8 +#define MATRIX_COLS 14 + +#define MATRIX_ROW_PINS { A15, B6, B5, B4, B3, B9, B8, B7 } +/* 0 1 2 3 4 5 6 7*/ +#define MATRIX_COL_PINS { B15, B11, B10, B1, B0, A10, A9, A7, A6, A5, A4, A8, B13, B14 } +/* 0 1 2 3 4 5 6 7 8 9 A B C D*/ + +#define UNUSED_PINS + +/* COL2ROW, ROW2COL */ +#define DIODE_DIRECTION ROW2COL + +/* 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 + +/* + * 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 + +/* disable these deprecated features by default */ +#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/handwired/t111/halconf.h b/keyboards/handwired/t111/halconf.h new file mode 100644 index 000000000000..ff5ae7e8a5f6 --- /dev/null +++ b/keyboards/handwired/t111/halconf.h @@ -0,0 +1,525 @@ +/* + 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. + 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 + +#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 +#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 cryptographic subsystem. + */ +#if !defined(HAL_USE_CRY) || defined(__DOXYGEN__) +#define HAL_USE_CRY FALSE +#endif + +/** + * @brief Enables the DAC subsystem. + */ +#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 +#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 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 +#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 +#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 + +/** + * @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. */ +/*===========================================================================*/ + +/** + * @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 + +/** + * @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. */ +/*===========================================================================*/ + +/** + * @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 the zero-copy API. + */ +#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 + +/** + * @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. */ +/*===========================================================================*/ + +/** + * @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 16 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 256 bytes for both the transmission and receive + * buffers. + */ +#if !defined(SERIAL_USB_BUFFERS_SIZE) || defined(__DOXYGEN__) +#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 + +/*===========================================================================*/ +/* 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 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 +#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. */ +/*===========================================================================*/ + +/** + * @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 + +/*===========================================================================*/ +/* 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/t111/info.json b/keyboards/handwired/t111/info.json new file mode 100644 index 000000000000..b31fed51631d --- /dev/null +++ b/keyboards/handwired/t111/info.json @@ -0,0 +1,12 @@ +{ + "keyboard_name": "t111", + "url": "", + "maintainer": "DmNosachev", + "width": 21.75, + "height": 6.5, + "layouts": { + "LAYOUT": { + "layout": [{"label":"Break", "x":0, "y":0}, {"label":"PF1", "x":2, "y":0}, {"label":"PF2", "x":3, "y":0}, {"label":"PF3", "x":4, "y":0}, {"label":"PF4", "x":5, "y":0}, {"label":"PF5", "x":6, "y":0}, {"label":"PF6", "x":7, "y":0}, {"label":"PF7", "x":8, "y":0}, {"label":"PF8", "x":9, "y":0}, {"label":"PF9", "x":10, "y":0}, {"label":"PF10", "x":11, "y":0}, {"label":"PF11", "x":12, "y":0}, {"label":"PF12", "x":13, "y":0}, {"label":"PF13", "x":14, "y":0}, {"label":"PF14", "x":15, "y":0}, {"label":"PF15", "x":16, "y":0}, {"label":"PF16", "x":17, "y":0}, {"label":"Esc", "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":"bkspc", "x":14, "y":1.5, "w":1.25}, {"label":"Ins", "x":15.5, "y":1.5}, {"label":"Cls", "x":16.5, "y":1.5}, {"label":"*", "x":17.75, "y":1.5}, {"label":"/", "x":18.75, "y":1.5}, {"label":"+", "x":19.75, "y":1.5}, {"label":"-", "x":20.75, "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":"El", "x":15.5, "y":2.5}, {"label":"Dup", "x":16.5, "y":2.5}, {"label":"7", "x":17.75, "y":2.5}, {"label":"8", "x":18.75, "y":2.5}, {"label":"9", "x":19.75, "y":2.5}, {"label":"=", "x":20.75, "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.5, "h":2}, {"label":"Del", "x":15.5, "y":3.5}, {"label":"Home", "x":16.5, "y":3.5}, {"label":"4", "x":17.75, "y":3.5}, {"label":"5", "x":18.75, "y":3.5}, {"label":"6", "x":19.75, "y":3.5}, {"label":",", "x":20.75, "y":3.5}, {"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}, {"x":12.25, "y":4.5}, {"label":"Shift", "x":13.25, "y":4.5, "w":2}, {"label":"\u0432\u2020\u2018", "x":15.5, "y":4.5}, {"label":"\u0432\u2020\u201c", "x":16.5, "y":4.5}, {"label":"1", "x":17.75, "y":4.5}, {"label":"2", "x":18.75, "y":4.5}, {"label":"3", "x":19.75, "y":4.5}, {"label":"Enter", "x":20.75, "y":4.5, "h":2}, {"label":"Caps", "x":1.75, "y":5.5}, {"label":"Graph", "x":2.75, "y":5.5, "w":1.5}, {"x":4.25, "y":5.5, "w":8}, {"label":"Alt", "x":12.25, "y":5.5, "w":1.5}, {"label":"\u0432\u2020\u0452", "x":15.5, "y":5.5}, {"label":"\u0432\u2020\u2019", "x":16.5, "y":5.5}, {"label":"0", "x":17.75, "y":5.5, "w":2}, {"label":".", "x":19.75, "y":5.5}] + } + } +} diff --git a/keyboards/handwired/t111/keymaps/default/keymap.c b/keyboards/handwired/t111/keymaps/default/keymap.c new file mode 100644 index 000000000000..e76a837db2f1 --- /dev/null +++ b/keyboards/handwired/t111/keymaps/default/keymap.c @@ -0,0 +1,50 @@ +/* Copyright 2020 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 + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +/* + * ,-------------------------------------------------------------------------------------------------------------------------------------. + * | xxx | | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | xxx |PrnSc| ScLk|Pause| | + * |-------------------------------------------------------------------------------------------------------------------------------------| + * | esc | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | ~ |backspc| | ins | del | |NumLk| / | * | - | + * |-------------------------------------------------------------------------------------------------------------------------------------| + * | tab | Q | W | E | R | T | Y | U | I | O | P | [ | ] | enter | PgUp| PgDn| | 7 | 8 | 9 | += | + * |-------------------------------------------------------------------------------- |--------------------------------------| + * | ctrl | A | S | D | F | G | H | J | K | L | ;: | '" | |\ | | home| end | | 4 | 5 | 6 | + | + * |-------------------------------------------------------------------------------------------------------------------------------------| + * | shift | Z | X | C | V | B | N | M | , | . | /? | ctrl| shift | up | down| | 1 | 2 | 3 |enter| + * |-------------------------------------------------------------------------------------------------------------------------------| | + * | | gui | alt | Space | alt | | left|right| | 0 | . | | + * `-------------------------------------------------------------------------------------------------------------------------------------' +*/ + [0] = LAYOUT( + KC_NO, KC_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_PSCR, KC_SLCK, KC_PAUS, + 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_INS, 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_PGUP, KC_PGDN, KC_P7, KC_P8, KC_P9, KC_EQL, + 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_BSLS, KC_ENT, KC_HOME, KC_END, KC_P4, KC_P5, KC_P6, KC_PPLS, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RCTRL, KC_RSFT, KC_UP, KC_DOWN, KC_P1, KC_P2, KC_P3, KC_PENT, + KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_LEFT, KC_RGHT, KC_P0, KC_PDOT + ) +}; + +void keyboard_post_init_user(void) { + // Customise these values to desired behaviour + debug_enable=true; + debug_matrix=true; + //debug_keyboard=true; + //debug_mouse=true; +} diff --git a/keyboards/handwired/t111/keymaps/oleg/config.h b/keyboards/handwired/t111/keymaps/oleg/config.h new file mode 100644 index 000000000000..22ae5bcf4cba --- /dev/null +++ b/keyboards/handwired/t111/keymaps/oleg/config.h @@ -0,0 +1,20 @@ +/* +Copyright 2020 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 + +#define UNICODE_SELECTED_MODES UC_WIN, UC_WINC \ No newline at end of file diff --git a/keyboards/handwired/t111/keymaps/oleg/keymap.c b/keyboards/handwired/t111/keymaps/oleg/keymap.c new file mode 100644 index 000000000000..63342af79fdc --- /dev/null +++ b/keyboards/handwired/t111/keymaps/oleg/keymap.c @@ -0,0 +1,145 @@ +/* Copyright 2020 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 +#include "debug.h" +#include "version.h" + +enum custom_keycodes { + VRSN = SAFE_RANGE, + MC1 +}; + +enum unicode_names { + USCT, + ULSB, + URSB, + USCO, + UAPO, + UCOM, + UDOT, + USLS, + ULCB, + URCB, + UCLN, + UQOT, + ULTH, + UGTH, + UQUE, + UGRV, + UTLD, + UAT, + UHSH, + UDLR, + UPCT, + UCFX, + UAMP, + UAST +}; + +const uint32_t PROGMEM unicode_map[] = { + [USCT] = 0x00A7, // § + [ULSB] = 0x005B, // [ + [URSB] = 0x005D, // ] + [USCO] = 0x003B, // ; + [UAPO] = 0x0027, // ' + [UCOM] = 0x002C, // , + [UDOT] = 0x002E, // . + [USLS] = 0x002F, // slash + [ULCB] = 0x007B, // { + [URCB] = 0x007D, // } + [UCLN] = 0x003A, // : + [UQOT] = 0x0022, // " + [ULTH] = 0x003C, // < + [UGTH] = 0x003E, // > + [UQUE] = 0x003F, // ? + [UGRV] = 0x0060, // ` + [UTLD] = 0x007E, // ~ + [UAT] = 0x0040, // at + [UHSH] = 0x0023, // hash + [UDLR] = 0x0024, // dollar + [UPCT] = 0x0025, // percent + [UCFX] = 0x005E, // ^ + [UAMP] = 0x0026, // & + [UAST] = 0x002A, // asterisk +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +/* + * ,-------------------------------------------------------------------------------------------------------------------------------------. + * | gui | | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | Vol-| Vol+| Mute|Pause| | + * |-------------------------------------------------------------------------------------------------------------------------------------| + * | esc | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | ~ |backspc| | PgUp| Home| |NumLk| / | * | - | + * |-------------------------------------------------------------------------------------------------------------------------------------| + * | tab | Q | W | E | R | T | Y | U | I | O | P | [ | ] | enter | PgDn| End| | 7 | 8 | 9 | += | + * |-------------------------------------------------------------------------------- |--------------------------------------| + * | ctrl | A | S | D | F | G | H | J | K | L | ;: | '" | |\ | | Del |NumLk| | 4 | 5 | 6 | + | + * |-------------------------------------------------------------------------------------------------------------------------------------| + * | shift | Z | X | C | V | B | N | M | , | . | /? | [] | shift | up | down| | 1 | 2 | 3 |enter| + * |-------------------------------------------------------------------------------------------------------------------------------| | + * | | caps | alt | Space | Fn | | left|right| | 0 | . | | + * `-------------------------------------------------------------------------------------------------------------------------------------' +*/ + [0] = LAYOUT( + 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_F12, KC_VOLD, KC_VOLU, KC_MUTE, KC_PSCR, + 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_PGUP, KC_HOME, 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_ENT, KC_PGDN, KC_END, KC_P7, KC_P8, KC_P9, KC_EQL, + 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_BSLS, KC_DEL, KC_NLCK, KC_P4, KC_P5, KC_P6, KC_PPLS, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, MC1, KC_RSFT, KC_UP, KC_DOWN, KC_P1, KC_P2, KC_P3, KC_PENT, + KC_CAPS, KC_LALT, KC_SPC, MO(1), KC_LEFT, KC_RGHT, KC_P0, KC_PDOT + ), +/* + * ,-------------------------------------------------------------------------------------------------------------------------------------. + * | VRSN| |Sleep| |Umode| | | | | | | | | | | | | | | + * |-------------------------------------------------------------------------------------------------------------------------------------| + * | | | @ | # | $ | § | ^ | & | * | | | | | | | | | | |Calc | | | | + * |-------------------------------------------------------------------------------------------------------------------------------------| + * | | mb1 | m↑ | mb2 | mb3 | | | |SysRq|ScrLk|Pause| | | | | | | | | | | + * |-------------------------------------------------------------------------------- |--------------------------------------| + * | | m← | m↓ | m→ | mb5 | | | | | | | | | | | | | | | | | + * |-------------------------------------------------------------------------------------------------------------------------------------| + * | | | | mb4 | | | | | | | | | | | | | | | | | + * |-------------------------------------------------------------------------------------------------------------------------------| | + * | | | | | | | | | | | | | + * `-------------------------------------------------------------------------------------------------------------------------------------' +*/ + [1] = LAYOUT( + VRSN, KC_SLEP, _______, UC_MOD, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, X(UAT), X(UHSH), X(UDLR), X(USCT), X(UCFX), X(UAMP), X(UAST), _______, _______, _______, _______, _______, _______, _______, _______, KC_CALC, _______, _______, _______, + _______, KC_BTN1, KC_MS_U, KC_BTN2, KC_BTN3, _______, _______, _______, KC_SYSREQ, KC_SLCK, KC_PAUS, XP(ULSB, ULCB), XP(URSB, URCB), _______, _______, _______, _______, _______, _______, _______, + _______, KC_MS_L, KC_MS_D, KC_MS_R, KC_BTN5, _______, _______, _______, _______, _______, XP(USCO, UCLN), XP(UAPO, UQOT), _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, KC_BTN4, _______, _______, _______, _______, XP(UCOM, ULTH), XP(UDOT, UGTH), XP(USLS, UQUE), KC_APP, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______ + ) +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case VRSN: + if (record->event.pressed) { + SEND_STRING (QMK_KEYBOARD "/" QMK_KEYMAP " @ " QMK_VERSION); + } + return false; + break; + + case MC1: + if (record->event.pressed) { + send_unicode_string("[]"); + } + return false; + break; + } + return true; +} diff --git a/keyboards/handwired/t111/keymaps/oleg/rules.mk b/keyboards/handwired/t111/keymaps/oleg/rules.mk new file mode 100644 index 000000000000..0517619ed13f --- /dev/null +++ b/keyboards/handwired/t111/keymaps/oleg/rules.mk @@ -0,0 +1 @@ +UNICODEMAP_ENABLE = yes \ No newline at end of file diff --git a/keyboards/handwired/t111/mcuconf.h b/keyboards/handwired/t111/mcuconf.h new file mode 100644 index 000000000000..60d9931c3536 --- /dev/null +++ b/keyboards/handwired/t111/mcuconf.h @@ -0,0 +1,209 @@ +/* + 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_ + +#define STM32F103_MCUCONF + +/* + * STM32F103 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: + * 15...0 Lowest...Highest. + * + * DMA priorities: + * 0...3 Lowest...Highest. + */ + +/* + * HAL driver system settings. + */ +#define STM32_NO_INIT FALSE +#define STM32_HSI_ENABLED TRUE +#define STM32_LSI_ENABLED FALSE +#define STM32_HSE_ENABLED TRUE +#define STM32_LSE_ENABLED FALSE +#define STM32_SW STM32_SW_PLL +#define STM32_PLLSRC STM32_PLLSRC_HSE +#define STM32_PLLXTPRE STM32_PLLXTPRE_DIV1 +#define STM32_PLLMUL_VALUE 9 +#define STM32_HPRE STM32_HPRE_DIV1 +#define STM32_PPRE1 STM32_PPRE1_DIV2 +#define STM32_PPRE2 STM32_PPRE2_DIV2 +#define STM32_ADCPRE STM32_ADCPRE_DIV4 +#define STM32_USB_CLOCK_REQUIRED TRUE +#define STM32_USBPRE STM32_USBPRE_DIV1P5 +#define STM32_MCOSEL STM32_MCOSEL_NOCLOCK +#define STM32_RTCSEL STM32_RTCSEL_HSEDIV +#define STM32_PVD_ENABLE FALSE +#define STM32_PLS STM32_PLS_LEV0 + +/* + * ADC driver system settings. + */ +#define STM32_ADC_USE_ADC1 FALSE +#define STM32_ADC_ADC1_DMA_PRIORITY 2 +#define STM32_ADC_ADC1_IRQ_PRIORITY 6 + +/* + * CAN driver system settings. + */ +#define STM32_CAN_USE_CAN1 FALSE +#define STM32_CAN_CAN1_IRQ_PRIORITY 11 + +/* + * 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 + +/* + * 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_TIM4 FALSE +#define STM32_GPT_USE_TIM5 FALSE +#define STM32_GPT_USE_TIM8 FALSE +#define STM32_GPT_TIM1_IRQ_PRIORITY 7 +#define STM32_GPT_TIM2_IRQ_PRIORITY 7 +#define STM32_GPT_TIM3_IRQ_PRIORITY 7 +#define STM32_GPT_TIM4_IRQ_PRIORITY 7 +#define STM32_GPT_TIM5_IRQ_PRIORITY 7 +#define STM32_GPT_TIM8_IRQ_PRIORITY 7 + +/* + * 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 5 +#define STM32_I2C_I2C2_IRQ_PRIORITY 5 +#define STM32_I2C_I2C1_DMA_PRIORITY 3 +#define STM32_I2C_I2C2_DMA_PRIORITY 3 +#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_USE_TIM4 FALSE +#define STM32_ICU_USE_TIM5 FALSE +#define STM32_ICU_USE_TIM8 FALSE +#define STM32_ICU_TIM1_IRQ_PRIORITY 7 +#define STM32_ICU_TIM2_IRQ_PRIORITY 7 +#define STM32_ICU_TIM3_IRQ_PRIORITY 7 +#define STM32_ICU_TIM4_IRQ_PRIORITY 7 +#define STM32_ICU_TIM5_IRQ_PRIORITY 7 +#define STM32_ICU_TIM8_IRQ_PRIORITY 7 + +/* + * 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_USE_TIM4 TRUE +#define STM32_PWM_USE_TIM5 FALSE +#define STM32_PWM_USE_TIM8 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_TIM5_IRQ_PRIORITY 7 +#define STM32_PWM_TIM8_IRQ_PRIORITY 7 + +/* + * RTC driver system settings. + */ +#define STM32_RTC_IRQ_PRIORITY 15 + +/* + * SERIAL driver system settings. + */ +#define STM32_SERIAL_USE_USART1 FALSE +#define STM32_SERIAL_USE_USART2 FALSE +#define STM32_SERIAL_USE_USART3 FALSE +#define STM32_SERIAL_USE_UART4 FALSE +#define STM32_SERIAL_USE_UART5 FALSE +#define STM32_SERIAL_USART1_PRIORITY 12 +#define STM32_SERIAL_USART2_PRIORITY 12 +#define STM32_SERIAL_USART3_PRIORITY 12 +#define STM32_SERIAL_UART4_PRIORITY 12 +#define STM32_SERIAL_UART5_PRIORITY 12 + +/* + * SPI driver system settings. + */ +#define STM32_SPI_USE_SPI1 FALSE +#define STM32_SPI_USE_SPI2 FALSE +#define STM32_SPI_USE_SPI3 FALSE +#define STM32_SPI_SPI1_DMA_PRIORITY 1 +#define STM32_SPI_SPI2_DMA_PRIORITY 1 +#define STM32_SPI_SPI3_DMA_PRIORITY 1 +#define STM32_SPI_SPI1_IRQ_PRIORITY 10 +#define STM32_SPI_SPI2_IRQ_PRIORITY 10 +#define STM32_SPI_SPI3_IRQ_PRIORITY 10 +#define STM32_SPI_DMA_ERROR_HOOK(spip) osalSysHalt("DMA failure") + +/* + * ST driver system settings. + */ +#define STM32_ST_IRQ_PRIORITY 8 +#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_USE_USART3 FALSE +#define STM32_UART_USART1_IRQ_PRIORITY 12 +#define STM32_UART_USART2_IRQ_PRIORITY 12 +#define STM32_UART_USART3_IRQ_PRIORITY 12 +#define STM32_UART_USART1_DMA_PRIORITY 0 +#define STM32_UART_USART2_DMA_PRIORITY 0 +#define STM32_UART_USART3_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_HP_IRQ_PRIORITY 13 +#define STM32_USB_USB1_LP_IRQ_PRIORITY 14 + +#endif /* _MCUCONF_H_ */ \ No newline at end of file diff --git a/keyboards/handwired/t111/readme.md b/keyboards/handwired/t111/readme.md new file mode 100644 index 000000000000..31bbc2a728dc --- /dev/null +++ b/keyboards/handwired/t111/readme.md @@ -0,0 +1,45 @@ +# QMK-based firmware for Fujitsu N860-2500-T111 keyboard + +![Fujitsu T111](https://i.imgur.com/aGtg7FMl.jpg) + +Fujitsu N860-2500-T111 keyboard conversion project: direct connection of Black Pill to the matrix. + +* Keyboard Maintainer: [DmNosachev](https://github.com/DmNosachev) +* Hardware Supported: [Fujitsu N860-2500-T111](https://deskthority.net/viewtopic.php?t=17087), Black Pill STM32F103C8T6 MCU board. Alternatively you can use any MCU which is supported by QMK and has 22 or more IO pins: Arduino Micro, Teensy 2.0, Teensy 2.0++, Blue Pill, etc. +* Thanks to Deskthority user *OldIsNew* for the matrix decoding. + +Make example for this keyboard (after setting up your build environment): + + make handwired/t111: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 + +Fujitsu N860-2500-T111 has 14x8 matrix. It's ghost-free thanks to the diodes. + +Rows (0-7) and columns (0-D): +![T111 rows and columns](https://i.imgur.com/37MxQG8h.jpg) + +## Black Pill +Suggested mount position for the Black Pill (view from the top side of the PCB): + +``` + C1 C2 C3 C4 C7 C8 C9 CA R5 R6 +,--------------------------------------------------------------------, +|B11 B10 B1 B0 A7 A6 A5 A4 A3 A2 A1 A0 RST C13 B9 B8 GND |---, +| |USB| +|B12 B13 B14 B15 A8 A9 A10 A11 A12 A15 B3 B4 B5 B6 B7 3V3 GND |---' +'--------------------------------------------------------------------' + CC CD C0 CB C6 C5 R0 R4 R3 R2 R1 R7 +``` + +![Black Pill](https://i.imgur.com/lJfdAQTh.jpg) + +1. Desolder all ICs, capacitors and resistors. +1. Solder 4-pin SWD header to Black Pill. +2. Burn [STM32duino bootloader](https://github.com/rogerclarkmelbourne/STM32duino-bootloader/blob/master/bootloader_only_binaries/generic_boot20_pb12.bin) to Black Pill. +3. Compile and flash the firmware: `make handwired/t111:default:flash` +4. Connect rows and columns to the corresponding pins of the Black Pill. diff --git a/keyboards/handwired/t111/rules.mk b/keyboards/handwired/t111/rules.mk new file mode 100644 index 000000000000..e6776a643cbd --- /dev/null +++ b/keyboards/handwired/t111/rules.mk @@ -0,0 +1,29 @@ +MCU = STM32F103 + +# GENERIC STM32F103C8T6 board - stm32duino bootloader +MCU_LDSCRIPT = STM32F103x8_stm32duino_bootloader +BOARD = STM32_F103_STM32DUINO +STM32_BOOTLOADER_ADDRESS = 0x80000000 + +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 + +# 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 = no # Commands for debug and configuration +# 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 +BLUETOOTH_ENABLE = no # Enable Bluetooth +AUDIO_ENABLE = no # Audio output diff --git a/keyboards/handwired/t111/t111.c b/keyboards/handwired/t111/t111.c new file mode 100644 index 000000000000..f61e34240e26 --- /dev/null +++ b/keyboards/handwired/t111/t111.c @@ -0,0 +1,17 @@ +/* Copyright 2020 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 "t111.h" diff --git a/keyboards/handwired/t111/t111.h b/keyboards/handwired/t111/t111.h new file mode 100644 index 000000000000..35651f635db3 --- /dev/null +++ b/keyboards/handwired/t111/t111.h @@ -0,0 +1,57 @@ +/* Copyright 2020 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 + +/* +,-------------------------------------------------------------------------------------------------------------------------------------. +|break| | PF1 | PF2 | PF3 | PF4 | PF5 | PF6 | PF7 | PF8 | PF9 | PF10| PF11| PF12| PF13| PF14| PF15| PF16| | +|-------------------------------------------------------------------------------------------------------------------------------------| +| esc | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | ~ |backspc| | ins | cls | | * | / | + | - | +|-------------------------------------------------------------------------------------------------------------------------------------| +| tab | Q | W | E | R | T | Y | U | I | O | P | [ | ] | enter | el | dup | | 7 | 8 | 9 | = | +|-------------------------------------------------------------------------------- |--------------------------------------| +| ctrl | A | S | D | F | G | H | J | K | L | ;: | '" | |\ | | del | home| | 4 | 5 | 6 | , | +|-------------------------------------------------------------------------------------------------------------------------------------| +| shift | Z | X | C | V | B | N | M | , | . | /? |blank| shift | up | down| | 1 | 2 | 3 |enter| +|-------------------------------------------------------------------------------------------------------------------------------| | +| | caps| graph | Space | alt | | left|right| | 0 | . | | +`-------------------------------------------------------------------------------------------------------------------------------------' +*/ + +#define LAYOUT( \ + K30, K40, K11, K21, K31, K41, K51, K61, K71, K01, K12, K22, K32, K42, K52, K62, K72, \ + K20, K13, K23, K33, K43, K53, K63, K73, K03, K14, K24, K34, K44, K54, K58, K64, K74, K15, K06, K76, K66, \ + K10, K17, K27, K37, K47, K57, K67, K77, K07, K18, K28, K38, K48, K68, K78, K1B, K00, K70, K60, \ + K0A, K19, K29, K39, K49, K59, K69, K79, K09, K1A, K2A, K3A, K4A, K5A, K6A, K7A, K2B, K3B, K4B, K5B, \ + K0D, K1C, K2C, K3C, K4C, K5C, K6C, K7C, K0C, K1D, K2D, K3D, K04, K6D, K7D, K25, K35, K45, K55, \ + K08, K0B, K50, K05, K6B, K7B, K65, K75 \ +) \ +{ \ +/* 0 */ { K00, K01, XXX, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D }, \ +/* 1 */ { K10, K11, K12, K13, K14, K15, XXX, K17, K18, K19, K1A, K1B, K1C, K1D }, \ +/* 2 */ { K20, K21, K22, K23, K24, K25, XXX, K27, K28, K29, K2A, K2B, K2C, K2D }, \ +/* 3 */ { K30, K31, K32, K33, K34, K35, XXX, K37, K38, K39, K3A, K3B, K3C, K3D }, \ +/* 4 */ { K40, K41, K42, K43, K44, K45, XXX, K47, K48, K49, K4A, K4B, K4C, XXX }, \ +/* 5 */ { K50, K51, K52, K53, K54, K55, XXX, K57, K58, K59, K5A, K5B, K5C, XXX }, \ +/* 6 */ { K60, K61, K62, K63, K64, K65, K66, K67, K68, K69, K6A, K6B, K6C, K6D }, \ +/* 7 */ { K70, K71, K72, K73, K74, K75, K76, K77, K78, K79, K7A, K7B, K7C, K7D } \ +} +/* 0 1 2 3 4 5 6 7 8 9 A B C D */ From e52fc935b020f1f6781a7ee0d893705eca78ae12 Mon Sep 17 00:00:00 2001 From: 2Moons-JP <57225836+2Moons-JP@users.noreply.github.com> Date: Wed, 23 Sep 2020 04:28:54 +0900 Subject: [PATCH 859/930] Add VIA Support for Basekeys Slice rev1 (#10385) * Slice Via * Keymap Update * Update keyboards/basekeys/slice/rev1/keymaps/via/keymap.c --- .../basekeys/slice/rev1/keymaps/via/config.h | 22 +++++ .../basekeys/slice/rev1/keymaps/via/keymap.c | 85 +++++++++++++++++++ .../basekeys/slice/rev1/keymaps/via/rules.mk | 3 + 3 files changed, 110 insertions(+) create mode 100644 keyboards/basekeys/slice/rev1/keymaps/via/config.h create mode 100644 keyboards/basekeys/slice/rev1/keymaps/via/keymap.c create mode 100644 keyboards/basekeys/slice/rev1/keymaps/via/rules.mk diff --git a/keyboards/basekeys/slice/rev1/keymaps/via/config.h b/keyboards/basekeys/slice/rev1/keymaps/via/config.h new file mode 100644 index 000000000000..3dc07fdac1d2 --- /dev/null +++ b/keyboards/basekeys/slice/rev1/keymaps/via/config.h @@ -0,0 +1,22 @@ +/* +Copyright 2020 2Moons + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License 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/basekeys/slice/rev1/keymaps/via/keymap.c b/keyboards/basekeys/slice/rev1/keymaps/via/keymap.c new file mode 100644 index 000000000000..900f1b3ba706 --- /dev/null +++ b/keyboards/basekeys/slice/rev1/keymaps/via/keymap.c @@ -0,0 +1,85 @@ +/* Copyright 2020 2Moons + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public 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" +// 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 = 0, + _FN, + _LOWER, + _RAISE, +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_QWERTY] = LAYOUT_all( + //,------------------------------------------------------------------------| |--------------------------------------------------------------------------------------. + KC_ESC, 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_BSPACE, KC_BSPACE, KC_BSPACE, + //|------------------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+----------+----------+----------| + RGB_MODE_FORWARD, KC_TAB, KC_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, + //|------------------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+----------+----------+----------| + RGB_MODE_GRADIENT, 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, + //|------------------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+----------+----------+----------| + RGB_MODE_XMAS, 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_RSFT, + //|------------------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+----------+----------+----------| + RGB_TOG, KC_LCTL, KC_LALT, KC_LALT, KC_SPC, KC_SPC, KC_SPC, KC_SPC, KC_SPC, KC_RALT, KC_RCTL, MO(_FN) + //`------------------------------------------------------------------------| |--------------------------------------------------------------------------------------' + ), + + [_FN] = LAYOUT_all( + //,------------------------------------------------------------------------| |--------------------------------------------------------------------------------------. + KC_ESC, 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_INS, KC_BSPACE, KC_DEL, + //|------------------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+----------+----------+----------| + _______, _______, _______, _______, _______, _______, _______, _______, KC_PSCR, KC_SLCK, KC_PAUSE, KC_UP, _______, _______, _______, + //|------------------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+----------+----------+----------| + _______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGUP, KC_LEFT,KC_RIGHT, _______, _______, + //|------------------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+----------+----------+----------| + _______, _______, _______, _______, _______, _______, _______, _______, KC_END, KC_PGDN, KC_DOWN, _______, _______, _______, _______, _______, + //|------------------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+----------+----------+----------| + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + //`------------------------------------------------------------------------| |--------------------------------------------------------------------------------------' + ), + + [_LOWER] = LAYOUT_all( + //,------------------------------------------------------------------------| |--------------------------------------------------------------------------------------. + KC_ESC, 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_BSPACE, KC_BSPACE, KC_BSPACE, + //|------------------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+----------+----------+----------| + RGB_MODE_FORWARD, KC_TAB, KC_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, + //|------------------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+----------+----------+----------| + RGB_MODE_GRADIENT, 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, + //|------------------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+----------+----------+----------| + RGB_MODE_XMAS, 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_RSFT, + //|------------------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+----------+----------+----------| + RGB_TOG, KC_LCTL, KC_LALT, KC_LALT, KC_SPC, KC_SPC, KC_SPC, KC_SPC, KC_SPC, KC_RALT, KC_RCTL, MO(_FN) + //`------------------------------------------------------------------------| |--------------------------------------------------------------------------------------' + ), + + [_RAISE] = LAYOUT_all( + //,------------------------------------------------------------------------| |--------------------------------------------------------------------------------------. + KC_ESC, 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_BSPACE, KC_BSPACE, KC_BSPACE, + //|------------------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+----------+----------+----------| + RGB_MODE_FORWARD, KC_TAB, KC_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, + //|------------------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+----------+----------+----------| + RGB_MODE_GRADIENT, 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, + //|------------------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+----------+----------+----------| + RGB_MODE_XMAS, 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_RSFT, + //|------------------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+----------+----------+----------| + RGB_TOG, KC_LCTL, KC_LALT, KC_LALT, KC_SPC, KC_SPC, KC_SPC, KC_SPC, KC_SPC, KC_RALT, KC_RCTL, MO(_FN) + //`------------------------------------------------------------------------| |--------------------------------------------------------------------------------------' + ) +}; diff --git a/keyboards/basekeys/slice/rev1/keymaps/via/rules.mk b/keyboards/basekeys/slice/rev1/keymaps/via/rules.mk new file mode 100644 index 000000000000..fe10d4e09326 --- /dev/null +++ b/keyboards/basekeys/slice/rev1/keymaps/via/rules.mk @@ -0,0 +1,3 @@ +TAP_DANCE_ENABLE = no +VIA_ENABLE = yes +BACKLIGHT_ENABLE = no \ No newline at end of file From 1ff51579ec2de8f4721fb918d10dc07454217b31 Mon Sep 17 00:00:00 2001 From: Roman Bange <13252574+rbange@users.noreply.github.com> Date: Tue, 22 Sep 2020 21:39:50 +0200 Subject: [PATCH 860/930] Add VIA support for YD60MQ (#10321) * add via support for yd60mq * switch to bootmagic lite, to decrease firmware size * Update PRODUCT_ID comment * add license header --- keyboards/yd60mq/config.h | 4 +- keyboards/yd60mq/keymaps/via/keymap.c | 53 +++++++++++++++++++++++++++ keyboards/yd60mq/keymaps/via/rules.mk | 2 + keyboards/yd60mq/rules.mk | 2 +- 4 files changed, 58 insertions(+), 3 deletions(-) create mode 100644 keyboards/yd60mq/keymaps/via/keymap.c create mode 100644 keyboards/yd60mq/keymaps/via/rules.mk diff --git a/keyboards/yd60mq/config.h b/keyboards/yd60mq/config.h index 26c39a5b0280..54aed0c96870 100644 --- a/keyboards/yd60mq/config.h +++ b/keyboards/yd60mq/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 0x594D // "YM" +#define PRODUCT_ID 0x604D // 60 "M" #define MANUFACTURER YMDK #define PRODUCT YD60MQ #define DESCRIPTION Keyboard diff --git a/keyboards/yd60mq/keymaps/via/keymap.c b/keyboards/yd60mq/keymaps/via/keymap.c new file mode 100644 index 000000000000..ab503ee277ee --- /dev/null +++ b/keyboards/yd60mq/keymaps/via/keymap.c @@ -0,0 +1,53 @@ +/* Copyright 2020 rbange https://github.com/rbange + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public 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_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_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, 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_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_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, 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 + ), + + [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 + ), + + [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 + ), + +}; diff --git a/keyboards/yd60mq/keymaps/via/rules.mk b/keyboards/yd60mq/keymaps/via/rules.mk new file mode 100644 index 000000000000..36b7ba9cbc98 --- /dev/null +++ b/keyboards/yd60mq/keymaps/via/rules.mk @@ -0,0 +1,2 @@ +VIA_ENABLE = yes +LTO_ENABLE = yes diff --git a/keyboards/yd60mq/rules.mk b/keyboards/yd60mq/rules.mk index 3e4d8eaa0f5d..615e4865a9da 100644 --- a/keyboards/yd60mq/rules.mk +++ b/keyboards/yd60mq/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -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 = no # Console for debug From 9c31a7adbabccbe34b12affd6b3f582c0cce10a5 Mon Sep 17 00:00:00 2001 From: Brian Marsh Date: Tue, 22 Sep 2020 15:02:01 -0500 Subject: [PATCH 861/930] [Keymap] Add pezhore preonic keymap (#10269) * Squashing commits - adding preonic keymap This adds a custom keymap, including numpad layer, emoji, and kamoji key mappings. * Removing unnecessary trailing backslash characters * removing the unnecessary json keymap * removing unnecessary trailing slashes from the default keymap * switching to tap_code * Apply suggestions from code review This should enable a toggleable numpad * adding license * Stripping out FN keycodes in favor of a momentary layer --- keyboards/preonic/keymaps/default/keymap.c | 72 ++--- keyboards/preonic/keymaps/pezhore/config.h | 53 ++++ keyboards/preonic/keymaps/pezhore/keymap.c | 307 ++++++++++++++++++++ keyboards/preonic/keymaps/pezhore/readme.md | 1 + keyboards/preonic/keymaps/pezhore/rules.mk | 3 + 5 files changed, 400 insertions(+), 36 deletions(-) create mode 100644 keyboards/preonic/keymaps/pezhore/config.h create mode 100644 keyboards/preonic/keymaps/pezhore/keymap.c create mode 100644 keyboards/preonic/keymaps/pezhore/readme.md create mode 100644 keyboards/preonic/keymaps/pezhore/rules.mk diff --git a/keyboards/preonic/keymaps/default/keymap.c b/keyboards/preonic/keymaps/default/keymap.c index d8bb2d5f7541..7ee985ea186d 100644 --- a/keyboards/preonic/keymaps/default/keymap.c +++ b/keyboards/preonic/keymaps/default/keymap.c @@ -50,12 +50,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | Brite| Ctrl | Alt | GUI |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, 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_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, KC_ENT, + BACKLIT, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT ), /* Colemak @@ -71,12 +71,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | 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 \ +[_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 @@ -92,12 +92,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | 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 \ +[_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 @@ -113,12 +113,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | | 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 \ +[_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 @@ -134,12 +134,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | | 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 \ +[_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) @@ -155,12 +155,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | | | | | | * `-----------------------------------------------------------------------------------' */ -[_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, _______, _______, _______, _______, _______, \ - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ +[_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, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ ) diff --git a/keyboards/preonic/keymaps/pezhore/config.h b/keyboards/preonic/keymaps/pezhore/config.h new file mode 100644 index 000000000000..8b541544b13e --- /dev/null +++ b/keyboards/preonic/keymaps/pezhore/config.h @@ -0,0 +1,53 @@ +/* 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 . + */ + +#pragma once +#define UNICODE_SELECTED_MODES UC_WINC, UC_LNX, UC_MAC +#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/pezhore/keymap.c b/keyboards/preonic/keymaps/pezhore/keymap.c new file mode 100644 index 000000000000..39b045d6d38d --- /dev/null +++ b/keyboards/preonic/keymaps/pezhore/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, + _FN, + _NUMPAD, + _LOWER, + _RAISE, + _ADJUST +}; + +enum preonic_keycodes { + LOWER = SAFE_RANGE, + RAISE, + SHRUG, // ¯\_(ツ)_/¯ + TFLIP, // (╯°□°)╯︵ ┻━┻ + POOP, // 💩 + DPOINT, // (ಠ_ಠ) + STRUT // ᕕ( ᐛ )ᕗ +}; + +#define TG_NUMP TG(_NUMPAD) + +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 | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | FN | Ctrl | GUI | ALT |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, KC_ENT, + MO(_FN), KC_LCTL, KC_LGUI, KC_LALT, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT +), + +/* FN + * ,-----------------------------------------------------------------------------------. + * |RGBTgl|Brigt-|Brigt+| | | | | | | | | POOP | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | RGB+ | Hue- | Hue+ | | | | | | | |PrtScr|UC_MOD| + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | RGB- | Sat- | Sat+ | | | | | | | | |UC_Wnc| + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | |Effct-|Effct+| | | | | | | | |UC_Lin| + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | |SHRUG |TFLIP |DPOINT|STRUT | | | | |TgNmpd| |UC_Mac| + * `-----------------------------------------------------------------------------------' + */ +[_FN] = LAYOUT_preonic_grid( + RGB_TOG, RGB_VAD, RGB_VAI, _______, _______, _______, _______, _______, _______, _______, _______, POOP, + RGB_MOD, RGB_HUD, RGB_HUI, _______, _______, _______, _______, _______, _______, _______, KC_PSCR, UC_MOD, + RGB_RMOD, RGB_SAD, RGB_SAI, _______, _______, _______, _______, _______, _______, _______, _______, UC_M_WC, + _______, RGB_SPD, RGB_SPI, _______, _______, _______, _______, _______, _______, _______, _______, UC_M_LN, + _______, SHRUG, TFLIP, DPOINT, STRUT, _______, _______, _______, _______, TG_NUMP, _______, UC_M_MA +), + +/* Numpad + * ,-----------------------------------------------------------------------------------. + * | | | | | | |NumLk | 7 | 8 | 9 | / | Bksp | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Tab | | | | | | | 4 | 5 | 6 | * | Del | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Esc | | | | | | | 1 | 2 | 3 | - | / | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | | | | | | | 0 | . | = | + |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | | + * `-----------------------------------------------------------------------------------' + */ +[_NUMPAD] = LAYOUT_preonic_grid( + _______, _______, _______, _______, _______, _______, KC_NLCK, KC_P7, KC_P8, KC_P9, KC_PSLS, KC_BSPC, + KC_ESC, _______, _______, _______, _______, _______, _______, KC_P4, KC_P5, KC_P6, KC_PAST, KC_DEL, + KC_TAB, _______, _______, _______, _______, _______, _______, KC_P1, KC_P2, KC_P3, KC_PMNS, _______, + _______, _______, _______, _______, _______, _______, _______, KC_P0, KC_PDOT, KC_PEQL, KC_PPLS, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ +), + +/* Lower + * ,-----------------------------------------------------------------------------------. + * | | | | | | | | | | | | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | | | | | | | | | | | Del | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Del | F1 | F2 | F3 | F4 | F5 | F6 | _ | + | { | } | | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | F7 | F8 | F9 | F10 | F11 | F12 | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | |Raise | Home | PgDn | PgUp | End | + * `-----------------------------------------------------------------------------------' + */ +[_LOWER] = LAYOUT_preonic_grid( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_BSPC, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, 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_PGDN, KC_PGUP, KC_END +), + +/* Raise + * ,-----------------------------------------------------------------------------------. + * | | | | | | | | | | | | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | | | | | | | | | | | Del | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Del | F1 | F2 | F3 | F4 | F5 | F6 | - | = | [ | ] | \ | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | F7 | F8 | F9 | F10 | F11 | F12 | | Prev | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | |Lower | | | | Next | Vol- | Vol+ | Play | + * `-----------------------------------------------------------------------------------' + */ +[_RAISE] = LAYOUT_preonic_grid( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_BSPC, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, 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_MPRV, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, 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| | | | | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | |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, _______, _______, _______, _______, _______, + _______, 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 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 SHRUG: + if (record->event.pressed) { + send_unicode_string("¯\\_(ツ)_/¯"); + } + return false; + break; + case TFLIP: + if (record->event.pressed) { + send_unicode_string("(╯°□°)╯︵ ┻━┻"); + } + return false; + break; + case POOP: + if (record->event.pressed) { + send_unicode_string("💩"); + } + return false; + break; + case DPOINT: + if (record->event.pressed) { + send_unicode_string("(ಠ_ಠ)"); + } + return false; + break; + case STRUT: + if (record->event.pressed) { + send_unicode_string("ᕕ( ᐛ )ᕗ"); + } + 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/pezhore/readme.md b/keyboards/preonic/keymaps/pezhore/readme.md new file mode 100644 index 000000000000..e911968dd964 --- /dev/null +++ b/keyboards/preonic/keymaps/pezhore/readme.md @@ -0,0 +1 @@ +# The default Preonic layout - largely based on the Planck's \ No newline at end of file diff --git a/keyboards/preonic/keymaps/pezhore/rules.mk b/keyboards/preonic/keymaps/pezhore/rules.mk new file mode 100644 index 000000000000..23198218b43f --- /dev/null +++ b/keyboards/preonic/keymaps/pezhore/rules.mk @@ -0,0 +1,3 @@ +SRC += muse.c +#UNICODEMAP_ENABLE = yes +UNICODE_ENABLE = yes \ No newline at end of file From 2fbf68f2d2a807e4009e3800f7d6dace82940646 Mon Sep 17 00:00:00 2001 From: Max Drasbeck Date: Tue, 22 Sep 2020 23:42:55 +0200 Subject: [PATCH 862/930] [Keymap] Adding drasbeck keymaps for lily58pro and preonic (#10013) * added danskish keymap * Added readme.md * Clean up in keymap.c * Added license * Changed name of keymap * adjusting tapping term * added encoder functionality * housekeeping * layouts resemble the layout now * implemented suggestions from drashna * added keymap for preonic rev3 * added default layer to readme.md * removed backslashes * Update keyboards/lily58/keymaps/drasbeck/keymap.c * Update keyboards/preonic/keymaps/drasbeck/readme.md * Update keyboards/lily58/keymaps/drasbeck/rules.mk * Update keyboards/preonic/keymaps/drasbeck/keymap.c * Update keyboards/preonic/keymaps/drasbeck/keymap.c * Update keyboards/preonic/keymaps/drasbeck/keymap.c * Update keyboards/preonic/keymaps/drasbeck/keymap.c * Update keyboards/lily58/keymaps/drasbeck/rules.mk * Update keyboards/lily58/keymaps/drasbeck/rules.mk * Update keyboards/lily58/keymaps/drasbeck/rules.mk * Update keyboards/preonic/keymaps/drasbeck/rules.mk --- keyboards/lily58/keymaps/drasbeck/config.h | 46 ++++ keyboards/lily58/keymaps/drasbeck/keymap.c | 166 +++++++++++++ keyboards/lily58/keymaps/drasbeck/readme.md | 14 ++ keyboards/lily58/keymaps/drasbeck/rules.mk | 28 +++ keyboards/preonic/keymaps/drasbeck/config.h | 49 ++++ keyboards/preonic/keymaps/drasbeck/keymap.c | 240 +++++++++++++++++++ keyboards/preonic/keymaps/drasbeck/readme.md | 17 ++ keyboards/preonic/keymaps/drasbeck/rules.mk | 1 + 8 files changed, 561 insertions(+) create mode 100644 keyboards/lily58/keymaps/drasbeck/config.h create mode 100644 keyboards/lily58/keymaps/drasbeck/keymap.c create mode 100644 keyboards/lily58/keymaps/drasbeck/readme.md create mode 100644 keyboards/lily58/keymaps/drasbeck/rules.mk create mode 100644 keyboards/preonic/keymaps/drasbeck/config.h create mode 100644 keyboards/preonic/keymaps/drasbeck/keymap.c create mode 100644 keyboards/preonic/keymaps/drasbeck/readme.md create mode 100644 keyboards/preonic/keymaps/drasbeck/rules.mk diff --git a/keyboards/lily58/keymaps/drasbeck/config.h b/keyboards/lily58/keymaps/drasbeck/config.h new file mode 100644 index 000000000000..ffaf5f4bc3fa --- /dev/null +++ b/keyboards/lily58/keymaps/drasbeck/config.h @@ -0,0 +1,46 @@ +/* +Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) 2020 Max Drasbeck + * + * You are free to: + * + * Share — copy and redistribute the material in any medium or format + * Adapt — remix, transform, and build upon the material + * for any purpose, even commercially. + * + * The licensor cannot revoke these freedoms as long as you follow the license terms. +*/ + +#pragma once + +//#define USE_MATRIX_I2C + +/* Select hand configuration */ + +#define MASTER_LEFT +// #define MASTER_RIGHT +// #define EE_HANDS + +#define USE_SERIAL_PD2 + +#define ENCODERS_PAD_A { F4 } +#define ENCODERS_PAD_B { F5 } +#define ENCODER_RESOLUTION 4 + +#define TAPPING_FORCE_HOLD +#define TAPPING_TERM 180 + +#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 +*/ diff --git a/keyboards/lily58/keymaps/drasbeck/keymap.c b/keyboards/lily58/keymaps/drasbeck/keymap.c new file mode 100644 index 000000000000..0fc1bfb7946e --- /dev/null +++ b/keyboards/lily58/keymaps/drasbeck/keymap.c @@ -0,0 +1,166 @@ +/* Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) 2020 Max Drasbeck + * + * You are free to: + * + * Share — copy and redistribute the material in any medium or format + * Adapt — remix, transform, and build upon the material + * for any purpose, even commercially. + * + * The licensor cannot revoke these freedoms as long as you follow the license terms. + */ + +#include QMK_KEYBOARD_H + +extern uint8_t is_master; + +enum layers { + _QWERTY, + _LOWER, + _RAISE, + _ADJUST, +}; + +enum custom_keycodes { + QWERTY = SAFE_RANGE, + LOWER, + RAISE, + ADJUST, +}; + + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [_QWERTY] = LAYOUT( + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, + 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_NO, KC_MUTE, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_SFTENT, + KC_LALT, KC_LGUI, MO(1), KC_SPC, KC_SPC, MO(2), KC_NUBS, KC_LCTL + ), + + [_LOWER] = LAYOUT( + 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_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_PGUP, KC_MINS, KC_EQL, KC_RBRC, + KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_NO, KC_HOME, KC_PGDN, KC_END, KC_NO, KC_NUHS, + 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_RO, KC_ENT, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ), + + [_RAISE] = LAYOUT( + KC_TRNS, RALT(KC_1), RALT(KC_2), RALT(KC_3), RALT(KC_4), RALT(KC_5), RALT(KC_6), RALT(KC_7), RALT(KC_8), RALT(KC_9), RALT(KC_0), KC_DEL, + KC_TRNS, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_UP, KC_MINS, KC_EQL, KC_RBRC, + KC_ESC, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_LEFT, KC_DOWN, KC_RGHT, KC_NO, KC_NUHS, + KC_LSFT, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_VOLD, KC_VOLU, KC_MUTE, KC_RO, KC_SFTENT, + KC_RALT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RALT(KC_NUBS), KC_TRNS + ), + + [_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; + +void matrix_init_user(void) { +#ifdef RGBLIGHT_ENABLE + RGB_current_mode = rgblight_config.mode; +#endif +} + +//SSD1306 OLED update loop, make sure to enable OLED_DRIVER_ENABLE=yes in rules.mk +#ifdef OLED_DRIVER_ENABLE + +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; +} + +// When you 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 oled_task_user(void) { + if (is_keyboard_master()) { + // If you want to change the display of OLED, you need to change here + oled_write_ln(read_layer_state(), false); + //oled_write_ln(read_keylog(), false); + //oled_write_ln(read_keylogs(), false); + //oled_write_ln(read_mode_icon(keymap_config.swap_lalt_lgui), false); + //oled_write_ln(read_host_led_state(), false); + //oled_write_ln(read_timelog(), false); + } else { + oled_write(read_logo(), false); + } +} +#endif // OLED_DRIVER_ENABLE + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + if (record->event.pressed) { +#ifdef OLED_DRIVER_ENABLE + 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); + } else { + layer_off(_LOWER); + } + update_tri_layer(_LOWER, _RAISE, _ADJUST); + return false; + break; + case RAISE: + if (record->event.pressed) { + layer_on(_RAISE); + } 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; +} + +#ifdef ENCODER_ENABLE +void encoder_update_user(uint8_t index, bool clockwise) { + // index 1 == minion side + if (index == 1) { + if (clockwise) { + tap_code(KC_VOLD); + } else { + tap_code(KC_VOLU); + } + } +} +#endif diff --git a/keyboards/lily58/keymaps/drasbeck/readme.md b/keyboards/lily58/keymaps/drasbeck/readme.md new file mode 100644 index 000000000000..51d0991072bd --- /dev/null +++ b/keyboards/lily58/keymaps/drasbeck/readme.md @@ -0,0 +1,14 @@ +## Danish (Dansk) layout for the Lily58 Pro +Keyboard: Lily58 Pro +Keys: Lily58 Pro is 6×4+5keys column-staggered split keyboard, optinal with a rotary encoder. +Flash instructions: Flash each side of the keyboard, minding whether the side uses a Pro Micro or Elite-C controller. + +### Layout +Danish special characters on main layer, moving other characters to mainly raised layer. + +Layer 0 = default +Layer 1 = lower +Layer 2 = raise + +![keymap](https://drasbeck.dk/public/keymap_lily58pro_danskish.png) + diff --git a/keyboards/lily58/keymaps/drasbeck/rules.mk b/keyboards/lily58/keymaps/drasbeck/rules.mk new file mode 100644 index 000000000000..ff8b816e3f47 --- /dev/null +++ b/keyboards/lily58/keymaps/drasbeck/rules.mk @@ -0,0 +1,28 @@ +# 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 +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 +AUDIO_ENABLE = no # Audio output +BLUETOOTH_ENABLE = no # Enable Bluetooth +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +SWAP_HANDS_ENABLE = no # Enable one-hand typing +OLED_DRIVER_ENABLE = yes # OLED display +ENCODER_ENABLE = yes # Enable encoder + +# 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 want to change the display of OLED, you need to change here +SRC += ./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 \ diff --git a/keyboards/preonic/keymaps/drasbeck/config.h b/keyboards/preonic/keymaps/drasbeck/config.h new file mode 100644 index 000000000000..042096f16469 --- /dev/null +++ b/keyboards/preonic/keymaps/drasbeck/config.h @@ -0,0 +1,49 @@ +/* +Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) 2020 Max Drasbeck + * + * You are free to: + * + * Share — copy and redistribute the material in any medium or format + * Adapt — remix, transform, and build upon the material + * for any purpose, even commercially. + * + * The licensor cannot revoke these freedoms as long as you follow the license terms. +*/ + +#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/drasbeck/keymap.c b/keyboards/preonic/keymaps/drasbeck/keymap.c new file mode 100644 index 000000000000..d2d30ffa1586 --- /dev/null +++ b/keyboards/preonic/keymaps/drasbeck/keymap.c @@ -0,0 +1,240 @@ +/* Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) 2020 Max Drasbeck + * + * You are free to: + * + * Share — copy and redistribute the material in any medium or format + * Adapt — remix, transform, and build upon the material + * for any purpose, even commercially. + * + * The licensor cannot revoke these freedoms as long as you follow the license terms. + */ + +#include QMK_KEYBOARD_H +#include "muse.h" + +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] = 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_LBRC, + 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_SFTENT, + KC_LCTL, KC_NO, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_NUBS, KC_LCTL, KC_NO, KC_NO +), + +[_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] = 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] = LAYOUT_preonic_grid( + 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_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO , KC_PGUP, KC_MINS, KC_EQL, KC_RBRC, + KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_NO, KC_HOME, KC_PGDN, KC_END, KC_NO, KC_NUHS, + KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_NO, KC_NO, KC_NO, KC_NO, KC_RO, KC_ENT, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_VOLD, KC_VOLU, KC_MPLY +), + +[_RAISE] = LAYOUT_preonic_grid( + KC_TRNS, RALT(KC_1), RALT(KC_2), RALT(KC_3), RALT(KC_4), RALT(KC_5), RALT(KC_6), RALT(KC_7), RALT(KC_8), RALT(KC_9), RALT(KC_0), KC_DEL, + KC_TRNS, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_UP, KC_MINS, KC_EQL, KC_RBRC, + KC_ESC, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_LEFT, KC_DOWN, KC_RGHT, KC_NO, KC_NUHS, + KC_LSFT, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_VOLD, KC_VOLU, KC_MUTE, KC_RO, KC_SFTENT, + KC_TRNS, KC_TRNS, KC_TRNS, KC_RALT, KC_TRNS, KC_TRNS, KC_TRNS, RALT(KC_NUBS), KC_TRNS, 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, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ +) + + +}; + +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/drasbeck/readme.md b/keyboards/preonic/keymaps/drasbeck/readme.md new file mode 100644 index 000000000000..4975ae8b7087 --- /dev/null +++ b/keyboards/preonic/keymaps/drasbeck/readme.md @@ -0,0 +1,17 @@ +# drasbeck's Preonic keymap +Danish layout with Danish characters on default layer. + +``` +Default +,-----------------------------------------------------------------------------------. +|KC_GRV| 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | BSPC | +|------+------+------+------+------+------+------+------+------+------+------+------| +| TAB | q | w | e | r | t | y | u | i | o | p | å | +|------+------+------+------+------+-------------+------+------+------+------+------| +| ESC | a | s | d | f | g | h | j | k | l | æ | ø | +|------+------+------+------+------+------|------+------+------+------+------+------| +|L SHFT| z | x | c | v | b | n | m | , | . | - |SFTENT| +|------+------+------+------+------+------+------+------+------+------+------+------| +|L CTRL| | L ALT| L GUI| LOWER| SPACE | RAISE| NUBS | L CTL| | | +`-----------------------------------------------------------------------------------' +``` diff --git a/keyboards/preonic/keymaps/drasbeck/rules.mk b/keyboards/preonic/keymaps/drasbeck/rules.mk new file mode 100644 index 000000000000..dcf16bef3994 --- /dev/null +++ b/keyboards/preonic/keymaps/drasbeck/rules.mk @@ -0,0 +1 @@ +SRC += muse.c From 4bf5f9424ed167af5881f1c7087dc80321541f06 Mon Sep 17 00:00:00 2001 From: umi <57262844+umi-umi@users.noreply.github.com> Date: Wed, 23 Sep 2020 06:54:33 +0900 Subject: [PATCH 863/930] [Docs] Japanese translation of docs/understanding_qmk.md (#10136) * add understanding_qmk.md translation * update based on comment * update based on comment * update based on comment * update based on comment * update based on comment --- docs/ja/understanding_qmk.md | 195 +++++++++++++++++++++++++++++++++++ 1 file changed, 195 insertions(+) create mode 100644 docs/ja/understanding_qmk.md diff --git a/docs/ja/understanding_qmk.md b/docs/ja/understanding_qmk.md new file mode 100644 index 000000000000..74b37398f84a --- /dev/null +++ b/docs/ja/understanding_qmk.md @@ -0,0 +1,195 @@ +# QMK のコードの理解 + + + +このドキュメントでは、QMK ファームウェアがどのように機能するかを非常に高いレベルから説明しようとしています。基本的なプログラミングの概念を理解していることを前提としていますが、(実例を示す必要がある場合を除き) C に精通していることを前提にはしていません。以下のドキュメントの基本的な知識があることを前提としています。 + +* [入門](ja/getting_started_introduction.md) +* [キーボードがどのように動作するか](ja/how_keyboards_work.md) +* [FAQ](ja/faq.md) + +## スタートアップ + +QMK は他のコンピュータプログラムと何ら変わりないと考えることができます。開始され、タスクを実行し、そして終了します。プログラムのエントリーポイントは、他の C プログラムと同様に、`main()` 関数です。ただし、QMK を初めて触る人は、`main()` 関数が複数の場所に現れるため、混乱するかもしれません。また、どれを見ればよいか分かりにくいかもしれません。 + +複数ある理由は、QMK は様々なプラットフォームをサポートするからです。最も一般的なプラットフォームは `lufa` です。これは atmega32u4 のような AVR プロセッサ上で実行されます。また、`chibios` および `vusb` もサポートします。 + +ここでは AVR プロセッサに焦点を当てます。これは `lufa` プラットフォームを使います。`main()` 関数は [tmk_core/protocol/lufa/lufa.c](https://github.com/qmk/qmk_firmware/blob/e1203a222bb12ab9733916164a000ef3ac48da93/tmk_core/protocol/lufa/lufa.c#L1028) にあります。関数にざっと目を通すと、(ホストへの USB も含めて)設定された全てのハードウェアが初期化され、プログラムのコア部分が [`while(1)`](https://github.com/qmk/qmk_firmware/blob/e1203a222bb12ab9733916164a000ef3ac48da93/tmk_core/protocol/lufa/lufa.c#L1069) で開始されることが分かります。これが[メインループ](#the-main-loop)です。 + +## メインループ + +コードのこの部分は、同じ命令セットを永久にループ処理するため、「メインループ」と呼ばれます。ここはキーボードに必要なことを実行させる関数を QMK が呼び出す場所です。一見、多くの機能を持つように見えるかもしれませんが、大抵の場合、コードは `#define` によって無効にされます。 + +``` + keyboard_task(); +``` + +ここで、全てのキーボードの固有の機能が実行されます。`keyboard_task()` のソースコードは [tmk_core/common/keyboard.c](https://github.com/qmk/qmk_firmware/blob/e1203a222bb12ab9733916164a000ef3ac48da93/tmk_core/common/keyboard.c#L216) にあり、マトリックスの変化を検知し、LED の状態をオンオフする責任があります。 + +`keyboard_task()` に以下を処理するコードがあります: + +* [マトリックスのスキャン](#matrix-scanning) +* マウスの処理 +* シリアルリンク +* ビジュアライザ +* キーボードの状態の LED (Caps Lock, Num Lock, Scroll Lock) + +#### マトリックスのスキャン + +マトリックスのスキャンはキーボードファームウェアのコアの機能です。これは今どのキーが押されているかを検知するプロセスであり、キーボードはこの機能を1秒間に何度も何度も実行します。ファームウェアの CPU 時間の 99% はマトリックスのスキャンに費やされていると言っても過言ではありません。 + +実際のマトリックスの検知には様々な方法がありますが、それはこのドキュメントの対象外です。マトリックスのスキャンをブラックボックスとして扱っても問題ありません。マトリックスの現在の状態を求めると、以下のようなデータ構造を取得します: + + +``` +{ + {0,0,0,0}, + {0,0,0,0}, + {0,0,0,0}, + {0,0,0,0}, + {0,0,0,0} +} +``` + +これは 4行x5列のテンキー(訳注: 5行x4列の間違いと思われます)のマトリックスを表す直接的な表現のデータ構造です。キーが押されると、マトリックス内のそのキーの位置が、 `0` ではなく `1` として返されます。 + +マトリックスのスキャンは1秒間に何度も実行されます。正確なレートは様々ですが、知覚できるような遅延を避けるために、秒間に少なくとも10回実行します。 + +##### マトリックスから物理的なレイアウトへのマップ + +キーボード上の各スイッチの状態が分かると、それをキーコードへマップする必要があります。QMK ではキーコードへのマップは C マクロを使うことで行われ、C マクロにより物理的なレイアウトの定義はキーコードの定義から分離されています。(訳注:「キーコードの定義」は「キーコードのマトリクス配列による定義」と思われる) + +キーボードレベルで、キーボードのマトリックスを物理キーにマップする C マクロ (一般的には、`LAYOUT()` という名前)を定義します。マトリックスにスイッチがない場所がある場合、このマクロを使って KC_NO を事前に埋め込むことができ、キーマップの定義を扱いやすくすることができます。以下は、テンキー用の `LAYOUT()` マクロです: + +```c +#define LAYOUT( \ + k00, k01, k02, k03, \ + k10, k11, k12, k13, \ + k20, k21, k22, \ + k30, k31, k32, k33, \ + k40, k42 \ +) { \ + { k00, k01, k02, k03, }, \ + { k10, k11, k12, k13, }, \ + { k20, k21, k22, KC_NO, }, \ + { k30, k31, k32, k33, }, \ + { k40, KC_NO, k42, KC_NO } \ +} +``` + +`LAYOUT()` マクロの2つ目のブロックが、上記のマトリックススキャン配列とどのように一致しているかに注目してください。このマクロはマトリックスのスキャン配列をキーコードにマップするものです。ただし、17キーのテンキーを見ると、マトリックスにはスイッチが置けるが、キーが大きいために実際にはスイッチが無い箇所が3つあることが分かります。これらのスペースに `KC_NO` を設定したので、キーマップ定義には必要ありません。 + +このマクロを使って、少し変わったマトリックスのレイアウト、例えば [Clueboard rev 2](https://github.com/qmk/qmk_firmware/blob/e1203a222bb12ab9733916164a000ef3ac48da93/keyboards/clueboard/66/rev2/rev2.h) を扱うこともできます。その説明はこのドキュメントの範囲外です。 + +##### キーコードの割り当て + +キーマップレべルでは、上記の `LAYOUT()` マクロを使って、物理的な場所からマトリックスの場所にマッピングします。以下のようになります: + +``` +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +[0] = LAYOUT( + KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS, \ + KC_P7, KC_P8, KC_P9, KC_PPLS, \ + KC_P4, KC_P5, KC_P6, \ + KC_P1, KC_P2, KC_P3, KC_PENT, \ + KC_P0, KC_PDOT) +} +``` + +これら全ての引数が、前のセクションの `LAYOUT()` マクロの前半とどのように一致しているかについて注目してください。このようにして、キーコードを取得して、それを前述のマトリックススキャンにマップします。 + +##### 状態変更の検知 + +上記のマトリックススキャンはある時点のマトリックスの状態を伝えますが、コンピュータは変更のみを知りたいだけで、現在の状態を気にしません。QMK は最後のマトリックススキャンの結果を格納し、このマトリックスから結果を比較して、いつキーが押されたか放されたかを決定します。 + +例を見てみましょう。キーボードスキャンループの途中に移動して、前のスキャンが以下のようになっていることがわかったとします: + +``` +{ + {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} +} +``` + +キーマップと比較すると、押されたキーが KC_NLCK であることが分かります。ここから、`process_record` 関数群を呼び出します。 + + + +##### Process Record + +`process_record()` 関数自体は一見簡単に見えますが、その内部は QMK の様々なレベルで機能を上書きするためのゲートウェイが隠されています。キーボード/キーマップレベルの機能について調べる必要があるときは、以下に列挙した一連のイベントを手引帳として使います。`rules.mk` またはほかの場所で設定されたオプションに応じて、最終的なファームウェアに以下の関数のサブセットのみが含まれます。 + +* [`void process_record(keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/e1203a222bb12ab9733916164a000ef3ac48da93/tmk_core/common/action.c#L172) + * [`bool process_record_quantum(keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/e1203a222bb12ab9733916164a000ef3ac48da93/quantum/quantum.c#L206) + * [このレコードをキーコードにマップする](https://github.com/qmk/qmk_firmware/blob/e1203a222bb12ab9733916164a000ef3ac48da93/quantum/quantum.c#L226) + * [`void velocikey_accelerate(void)`](https://github.com/qmk/qmk_firmware/blob/c1c5922aae7b60b7c7d13d3769350eed9dda17ab/quantum/velocikey.c#L27) + * [`void preprocess_tap_dance(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/e1203a222bb12ab9733916164a000ef3ac48da93/quantum/process_keycode/process_tap_dance.c#L119) + * [`bool process_key_lock(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/e1203a222bb12ab9733916164a000ef3ac48da93/quantum/process_keycode/process_key_lock.c#L62) + * [`bool process_clicky(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/e1203a222bb12ab9733916164a000ef3ac48da93/quantum/process_keycode/process_clicky.c#L79) + * [`bool process_haptic(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/2cee371bf125a6ec541dd7c5a809573facc7c456/drivers/haptic/haptic.c#L216) + * [`bool process_record_kb(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/e1203a222bb12ab9733916164a000ef3ac48da93/keyboards/clueboard/card/card.c#L20) + * [`bool process_record_user(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/e1203a222bb12ab9733916164a000ef3ac48da93/keyboards/clueboard/card/keymaps/default/keymap.c#L58) + * [`bool process_rgb_matrix(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/e1203a222bb12ab9733916164a000ef3ac48da93/quantum/rgb_matrix.c#L139) + * [`bool process_midi(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/e1203a222bb12ab9733916164a000ef3ac48da93/quantum/process_keycode/process_midi.c#L81) + * [`bool process_audio(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/e1203a222bb12ab9733916164a000ef3ac48da93/quantum/process_keycode/process_audio.c#L19) + * [`bool process_steno(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/e1203a222bb12ab9733916164a000ef3ac48da93/quantum/process_keycode/process_steno.c#L160) + * [`bool process_music(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/e1203a222bb12ab9733916164a000ef3ac48da93/quantum/process_keycode/process_music.c#L114) + * [`bool process_tap_dance(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/e1203a222bb12ab9733916164a000ef3ac48da93/quantum/process_keycode/process_tap_dance.c#L141) + * [`bool process_unicode_common(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/e1203a222bb12ab9733916164a000ef3ac48da93/quantum/process_keycode/process_unicode_common.c#L169) は、以下のいずれかを呼び出します: + * [`bool process_unicode(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/e1203a222bb12ab9733916164a000ef3ac48da93/quantum/process_keycode/process_unicode.c#L20) + * [`bool process_unicodemap(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/e1203a222bb12ab9733916164a000ef3ac48da93/quantum/process_keycode/process_unicodemap.c#L46) + * [`bool process_ucis(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/e1203a222bb12ab9733916164a000ef3ac48da93/quantum/process_keycode/process_ucis.c#L95) + * [`bool process_leader(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/e1203a222bb12ab9733916164a000ef3ac48da93/quantum/process_keycode/process_leader.c#L51) + * [`bool process_combo(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/e1203a222bb12ab9733916164a000ef3ac48da93/quantum/process_keycode/process_combo.c#L115) + * [`bool process_printer(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/e1203a222bb12ab9733916164a000ef3ac48da93/quantum/process_keycode/process_printer.c#L77) + * [`bool process_auto_shift(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/e1203a222bb12ab9733916164a000ef3ac48da93/quantum/process_keycode/process_auto_shift.c#L94) + * [`bool process_terminal(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/e1203a222bb12ab9733916164a000ef3ac48da93/quantum/process_keycode/process_terminal.c#L264) + * [Quantum 固有のキーコードを識別して処理する](https://github.com/qmk/qmk_firmware/blob/e1203a222bb12ab9733916164a000ef3ac48da93/quantum/quantum.c#L291) + +この一連のイベントの中の任意のステップで (`process_record_kb()` のような)関数は `false` を返して、以降の処理を停止することができます。 + +この呼び出しの後で、`post_process_record()` が呼ばれます。これはキーコードが通常処理された後に実行する必要がある追加のクリーンアップを処理するために使うことができます。 + +* [`void post_process_record(keyrecord_t *record)`]() + * [`void post_process_record_quantum(keyrecord_t *record)`]() + * [このレコードをキーコードにマップする]() + * [`void post_process_clicky(uint16_t keycode, keyrecord_t *record)`]() + * [`void post_process_record_kb(uint16_t keycode, keyrecord_t *record)`]() + * [`void post_process_record_user(uint16_t keycode, keyrecord_t *record)`]() + + From 5faf5383ad4f651fd3d576a4d0932679f14c752e Mon Sep 17 00:00:00 2001 From: Brandon Claveria <48102030+swiftrax@users.noreply.github.com> Date: Tue, 22 Sep 2020 15:39:09 -0700 Subject: [PATCH 864/930] add handwired/swiftrax/retropad (#10331) * add retropad * fix indicator leds * fix bootmagic * fix led indicators * fix keymap * fix keymap * fix keymap * fix keymap * fix license headers * Apply suggestions from code review Co-authored-by: Drashna Jaelre * Apply suggestions from code review Co-authored-by: Ryan Co-authored-by: Swiftrax Co-authored-by: Drashna Jaelre Co-authored-by: Ryan --- .../handwired/swiftrax/retropad/config.h | 64 +++++++++++++++++ .../handwired/swiftrax/retropad/info.json | 12 ++++ .../retropad/keymaps/default/keymap.c | 69 +++++++++++++++++++ .../swiftrax/retropad/keymaps/via/keymap.c | 69 +++++++++++++++++++ .../swiftrax/retropad/keymaps/via/rules.mk | 1 + .../handwired/swiftrax/retropad/readme.md | 13 ++++ .../handwired/swiftrax/retropad/retropad.c | 16 +++++ .../handwired/swiftrax/retropad/retropad.h | 31 +++++++++ .../handwired/swiftrax/retropad/rules.mk | 23 +++++++ 9 files changed, 298 insertions(+) create mode 100644 keyboards/handwired/swiftrax/retropad/config.h create mode 100644 keyboards/handwired/swiftrax/retropad/info.json create mode 100644 keyboards/handwired/swiftrax/retropad/keymaps/default/keymap.c create mode 100644 keyboards/handwired/swiftrax/retropad/keymaps/via/keymap.c create mode 100644 keyboards/handwired/swiftrax/retropad/keymaps/via/rules.mk create mode 100644 keyboards/handwired/swiftrax/retropad/readme.md create mode 100644 keyboards/handwired/swiftrax/retropad/retropad.c create mode 100644 keyboards/handwired/swiftrax/retropad/retropad.h create mode 100644 keyboards/handwired/swiftrax/retropad/rules.mk diff --git a/keyboards/handwired/swiftrax/retropad/config.h b/keyboards/handwired/swiftrax/retropad/config.h new file mode 100644 index 000000000000..e604eda41939 --- /dev/null +++ b/keyboards/handwired/swiftrax/retropad/config.h @@ -0,0 +1,64 @@ +/* +Copyright 2020 Swiftrax + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License 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 0xEB0C +#define DEVICE_VER 0x0001 +#define MANUFACTURER Swiftrax +#define PRODUCT Retropad + +/* key matrix size */ +#define MATRIX_ROWS 3 +#define MATRIX_COLS 2 + +// ROWS: Top to bottom, COLS: Left to right + +#define MATRIX_ROW_PINS { C7, C6, B5 } +#define MATRIX_COL_PINS { B4, D2 } + +#define ENCODERS_PAD_A { D0 } +#define ENCODERS_PAD_B { D1 } + +/* COL2ROW or ROW2COL */ +#define DIODE_DIRECTION COL2ROW + +#define RGB_DI_PIN B7 +#ifdef RGB_DI_PIN +#define RGBLIGHT_ANIMATIONS +#define RGBLED_NUM 6 +#define RGBLIGHT_HUE_STEP 8 +#define RGBLIGHT_SAT_STEP 8 +#define RGBLIGHT_VAL_STEP 8 +#endif + +/* define if matrix has ghost */ +//#define MATRIX_HAS_GHOST + +/* Set 0 if debouncing isn't needed */ +#define DEBOUNCE 5 + +/*EEPROM for via*/ +#define DYNAMIC_KEYMAP_LAYER_COUNT 3 + +/* bootmagic row col assignment */ +#define BOOTMAGIC_LITE_ROW 1 +#define BOOTMAGIC_LITE_COLUMN 0 diff --git a/keyboards/handwired/swiftrax/retropad/info.json b/keyboards/handwired/swiftrax/retropad/info.json new file mode 100644 index 000000000000..9637c7b3f73f --- /dev/null +++ b/keyboards/handwired/swiftrax/retropad/info.json @@ -0,0 +1,12 @@ +{ + "keyboard_name": "Retropad", + "url": "https://github.com/swiftrax", + "maintainer": "swiftrax", + "width": 2, + "height": 3.5, + "layouts": { + "LAYOUT": { + "layout": [{"label":"0,1", "x":0.5, "y":0}, {"label":"1,0", "x":0, "y":1.5}, {"label":"1,1", "x":1, "y":1.5}, {"label":"2,0", "x":0, "y":2.5}, {"label":"2,1", "x":1, "y":2.5}] + } + } +} \ No newline at end of file diff --git a/keyboards/handwired/swiftrax/retropad/keymaps/default/keymap.c b/keyboards/handwired/swiftrax/retropad/keymaps/default/keymap.c new file mode 100644 index 000000000000..8b9992e1d731 --- /dev/null +++ b/keyboards/handwired/swiftrax/retropad/keymaps/default/keymap.c @@ -0,0 +1,69 @@ + /* Copyright 2020 swiftrax + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public 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( + TO(1), //windows + KC_MSTP, KC_MPLY, + KC_MPRV, KC_MNXT), + +[1] = LAYOUT( //macOS + TO(2), + KC_MSTP, KC_MPLY, + KC_MRWD, KC_MFFD), + +[2] = LAYOUT( + TO(0), + KC_HOME, KC_PGUP, + KC_END, KC_PGDN), +}; + +void encoder_update_user(uint8_t index, bool clockwise) { + if(IS_LAYER_ON(2)){ + if (clockwise) + tap_code(KC_LEFT); + else + tap_code(KC_RGHT); + } + else{ + if(clockwise) + tap_code(KC_VOLU); + else + tap_code(KC_VOLD); + } +} + +void matrix_init_user(void) { + // set top LED to output and off (active low) + setPinOutput(D5); + writePinHigh(D5); + // set middle LED to output and off (active low) + setPinOutput(D4); + writePinHigh(D4); + // set bottom LED to output and off (active low) + setPinOutput(D3); + writePinHigh(D3); +} + +// write to above indicators in a binary fashion based on current layer +layer_state_t layer_state_set_user(layer_state_t state) { + writePin(D5, get_highest_layer(state)); + writePin(D4, !layer_state_cmp(state, 1)); + writePin(D3, !layer_state_cmp(state, 2)); + return state; +} \ No newline at end of file diff --git a/keyboards/handwired/swiftrax/retropad/keymaps/via/keymap.c b/keyboards/handwired/swiftrax/retropad/keymaps/via/keymap.c new file mode 100644 index 000000000000..8b9992e1d731 --- /dev/null +++ b/keyboards/handwired/swiftrax/retropad/keymaps/via/keymap.c @@ -0,0 +1,69 @@ + /* Copyright 2020 swiftrax + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public 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( + TO(1), //windows + KC_MSTP, KC_MPLY, + KC_MPRV, KC_MNXT), + +[1] = LAYOUT( //macOS + TO(2), + KC_MSTP, KC_MPLY, + KC_MRWD, KC_MFFD), + +[2] = LAYOUT( + TO(0), + KC_HOME, KC_PGUP, + KC_END, KC_PGDN), +}; + +void encoder_update_user(uint8_t index, bool clockwise) { + if(IS_LAYER_ON(2)){ + if (clockwise) + tap_code(KC_LEFT); + else + tap_code(KC_RGHT); + } + else{ + if(clockwise) + tap_code(KC_VOLU); + else + tap_code(KC_VOLD); + } +} + +void matrix_init_user(void) { + // set top LED to output and off (active low) + setPinOutput(D5); + writePinHigh(D5); + // set middle LED to output and off (active low) + setPinOutput(D4); + writePinHigh(D4); + // set bottom LED to output and off (active low) + setPinOutput(D3); + writePinHigh(D3); +} + +// write to above indicators in a binary fashion based on current layer +layer_state_t layer_state_set_user(layer_state_t state) { + writePin(D5, get_highest_layer(state)); + writePin(D4, !layer_state_cmp(state, 1)); + writePin(D3, !layer_state_cmp(state, 2)); + return state; +} \ No newline at end of file diff --git a/keyboards/handwired/swiftrax/retropad/keymaps/via/rules.mk b/keyboards/handwired/swiftrax/retropad/keymaps/via/rules.mk new file mode 100644 index 000000000000..036bd6d1c3ec --- /dev/null +++ b/keyboards/handwired/swiftrax/retropad/keymaps/via/rules.mk @@ -0,0 +1 @@ +VIA_ENABLE = yes \ No newline at end of file diff --git a/keyboards/handwired/swiftrax/retropad/readme.md b/keyboards/handwired/swiftrax/retropad/readme.md new file mode 100644 index 000000000000..5dd2e2dff5f1 --- /dev/null +++ b/keyboards/handwired/swiftrax/retropad/readme.md @@ -0,0 +1,13 @@ +# Retropad + +2x2 macro pad with a rotary encoder + +* Keyboard Maintainer: Swiftrax +* Hardware Supported: Retropad PCB +* Hardware Availability: https://github.com/swiftrax + +Make example for this keyboard (after setting up your build environment): + + make handwired/swiftrax/retropad: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/swiftrax/retropad/retropad.c b/keyboards/handwired/swiftrax/retropad/retropad.c new file mode 100644 index 000000000000..3ffe29528f16 --- /dev/null +++ b/keyboards/handwired/swiftrax/retropad/retropad.c @@ -0,0 +1,16 @@ +/* Copyright 2020 swiftrax + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#include "retropad.h" \ No newline at end of file diff --git a/keyboards/handwired/swiftrax/retropad/retropad.h b/keyboards/handwired/swiftrax/retropad/retropad.h new file mode 100644 index 000000000000..e7527d5c004f --- /dev/null +++ b/keyboards/handwired/swiftrax/retropad/retropad.h @@ -0,0 +1,31 @@ +/* Copyright 2020 swiftrax + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License 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" + +// readability +#define XXX KC_NO + +#define LAYOUT( \ + K001, \ + K100, K101, \ + K200, K201 \ +) { \ + { XXX, K001, }, \ + { K100, K101, }, \ + { K200, K201, } \ +} diff --git a/keyboards/handwired/swiftrax/retropad/rules.mk b/keyboards/handwired/swiftrax/retropad/rules.mk new file mode 100644 index 000000000000..8771c701de78 --- /dev/null +++ b/keyboards/handwired/swiftrax/retropad/rules.mk @@ -0,0 +1,23 @@ +# MCU name +MCU = atmega32u2 + +# Bootloader selection +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 = yes # Enable keyboard RGB underglow +BLUETOOTH_ENABLE = no # Enable Bluetooth +AUDIO_ENABLE = no # Audio output +ENCODER_ENABLE = yes From afb9179b6532d2968923d9991e9d2d5d3e506e06 Mon Sep 17 00:00:00 2001 From: Isaac Date: Tue, 22 Sep 2020 20:35:04 -0400 Subject: [PATCH 865/930] Add swap hands config for kyria (#10397) * add swap hands config * move to rev1 --- keyboards/kyria/kyria.c | 1 + keyboards/kyria/rev1/rev1.c | 18 +++++++++++++++++- 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/keyboards/kyria/kyria.c b/keyboards/kyria/kyria.c index 21ed5e84c8f9..1692093fb25c 100644 --- a/keyboards/kyria/kyria.c +++ b/keyboards/kyria/kyria.c @@ -14,3 +14,4 @@ * along with this program. If not, see . */ #include "kyria.h" + diff --git a/keyboards/kyria/rev1/rev1.c b/keyboards/kyria/rev1/rev1.c index 9aedcc130ac3..970a359e7165 100644 --- a/keyboards/kyria/rev1/rev1.c +++ b/keyboards/kyria/rev1/rev1.c @@ -1 +1,17 @@ -#include "rev1.h" \ No newline at end of file +#include "rev1.h" + +#ifdef SWAP_HANDS_ENABLE +__attribute__ ((weak)) + +const keypos_t hand_swap_config[MATRIX_ROWS][MATRIX_COLS] = { + {{0, 4}, {1, 4}, {2, 4}, {3, 4}, {4, 4}, {5, 4}, {6, 4}, {7, 4}}, + {{0, 5}, {1, 5}, {2, 5}, {3, 5}, {4, 5}, {5, 5}, {6, 5}, {7, 5}}, + {{0, 6}, {1, 6}, {2, 6}, {3, 6}, {4, 6}, {5, 6}, {6, 6}, {7, 6}}, + {{0, 7}, {1, 7}, {2, 7}, {3, 7}, {4, 7}, {5, 7}, {6, 7}, {7, 7}}, + {{0, 0}, {1, 0}, {2, 0}, {3, 0}, {4, 0}, {5, 0}, {6, 0}, {7, 0}}, + {{0, 1}, {1, 1}, {2, 1}, {3, 1}, {4, 1}, {5, 1}, {6, 1}, {7, 1}}, + {{0, 2}, {1, 2}, {2, 2}, {3, 2}, {4, 2}, {5, 2}, {6, 2}, {7, 2}}, + {{0, 3}, {1, 3}, {2, 3}, {3, 3}, {4, 3}, {5, 3}, {6, 3}, {7, 3}} +}; + +#endif From d828e991a91e85949d1aa43bcc7b79c24d30e05a Mon Sep 17 00:00:00 2001 From: kingwangwong <31333140+kingwangwong@users.noreply.github.com> Date: Tue, 22 Sep 2020 19:58:45 -0500 Subject: [PATCH 866/930] [Keymap] update to king keymaps by kingwangwong (#10299) Adding my kbd67mkii keymap and some changes to kumo Keymaps for kbdfans/kbd67/mkii_soldered and thevankeyboards/minivan * Changes to minivan layout * KBD67 keymap * commiting my files --- .../kbd67/mkii_soldered/keymaps/king/keymap.c | 65 +++++++++++++++++++ .../minivan/keymaps/king/keymap.c | 30 +++++++-- 2 files changed, 88 insertions(+), 7 deletions(-) create mode 100644 keyboards/kbdfans/kbd67/mkii_soldered/keymaps/king/keymap.c diff --git a/keyboards/kbdfans/kbd67/mkii_soldered/keymaps/king/keymap.c b/keyboards/kbdfans/kbd67/mkii_soldered/keymaps/king/keymap.c new file mode 100644 index 000000000000..70e2237d3afc --- /dev/null +++ b/keyboards/kbdfans/kbd67/mkii_soldered/keymaps/king/keymap.c @@ -0,0 +1,65 @@ + /* Copyright 2020 King Wang Wong + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public 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: _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_GRV│ KC_INS│ 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 │ + * ├──────────────┴─┬───────┴─┬───────┴─┬───────┴─┬───────┴─┬───────┴─┬───────┴─┬───────┴─┬───────┴─┬───────┴─┬───────┴─┬───────┴─┬───────┴──────────┼─────────┤ + * │ CTRL │ 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 │ MO(1) │ + * ├───────────┬─────────┴─┬───────┴───┬─────┴─────────┴───────┬─┴─────────┼─────────┴─────────┴───────┬─┴───────┬─┴───────┬─┴───┬─────────┼─────────┼─────────┤ + * │ KC_LCTL │ KC_LGUI │ KC_LALT │ KC_SPC │ MO(1) │ KC_BSPC │ KC_RALT │ KC_RCTL │ │ KC_LEFT │ KC_DOWN │ KC_RGHT │ + * └───────────┴───────────┴───────────┴───────────────────────┴───────────┴───────────────────────────┴─────────┴─────────┴─────┴─────────┴─────────┴─────────┘ + */ + [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_GRV, KC_INS, 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_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_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, MO(1), + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, MO(1), KC_BSPC, KC_RALT, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT + ), + + /* 1: _FN1 + * ┌─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬───────┬───────┬─────────┐ + * │ 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 │ ____│__ (2) │ RESET │ + * ├─────────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬──┴───────┼─────────┤ + * │ _______ │ _______ │ _______ │ _______ │ _______ │ _______ │ _______ │ _______ │ _______ │ _______ │ _______ │ _______ │ _______ │ _______ │ KC_VOLU │ + * ├──────────────┴─┬───────┴─┬───────┴─┬───────┴─┬───────┴─┬───────┴─┬───────┴─┬───────┴─┬───────┴─┬───────┴─┬───────┴─┬───────┴─┬───────┴──────────┼─────────┤ + * │ CAPS │ _______ │ _______ │ _______ │ _______ │ _______ │ _______ │ _______ │ _______ │ _______ │ _______ │ _______ │ _______ │ KC_VOLD │ + * ├────────────────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────────┬─────────┼─────────┤ + * │ _______ │ _______ │ _______ │ _______ │ _______ │ _______ │ _______ │ _______ │ _______ │ _______ │ _______ │ _______ │ _______ │ _______ │ + * ├───────────┬─────────┴─┬───────┴───┬─────┴─────────┴─────────┴─────────┴─────────┴─────────┴───────┬─┴───────┬─┴───────┬─┴───┬─────────┼─────────┼─────────┤ + * │ _______ │ _______ │ _______ │ _______ │ _______ │ _______ │ │ _______ │ _______ │ _______ │ + * └───────────┴───────────┴───────────┴───────────────────────────────────────────────────────────────┴─────────┴─────────┴─────┴─────────┴─────────┴─────────┘ + */ + [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, _______, _______, KC_MUTE, + _______, _______, KC_HOME, KC_UP, KC_END, KC_PGUP, _______, _______, _______, _______, _______, _______, _______, _______, KC_VOLU, + KC_CAPS, _______, KC_LEFT, KC_DOWN, KC_RIGHT, KC_PGDN, _______, _______, _______, _______, _______, _______, _______, KC_VOLD, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ) +}; \ No newline at end of file diff --git a/keyboards/thevankeyboards/minivan/keymaps/king/keymap.c b/keyboards/thevankeyboards/minivan/keymaps/king/keymap.c index bcfbad2e0b1f..032aaf5c730d 100644 --- a/keyboards/thevankeyboards/minivan/keymaps/king/keymap.c +++ b/keyboards/thevankeyboards/minivan/keymaps/king/keymap.c @@ -1,3 +1,19 @@ + /* Copyright 2020 King Wang Wong + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public 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 @@ -17,17 +33,17 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * ┌─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────────┐ * │ ESC │ Q │ W │ E │ R │ T │ Y │ U │ I │ O │ P │BKSPC │ * ├─────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────────┤ - * │ TAB │ A │ S │ D │ F │ G │ H │ J │ K │ L │ ; │' │ + * │ TAB │ A │ S │ D │ F │ G │ H │ J │ K │ L │ ; │ENTER │ * ├──────┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬─────┤ - * │ LSHFT │ Z │ X │ C │ V │ B │ N │ M │ , │ . │ / │ENTER│ + * │ LSHFT │ Z │ X │ C │ V │ B │ N │ M │ , │ . │ / │' │ * ├────────┬┴─────┴─┬───┴─┬───┴─────┴──┬──┴─────┴─────┴─┬───┴─┬───┴─┬───┴─────┤ - * │LCTRL │ LGUI │ LALT│SPACE(_NL) │MO(_NL) │MO SL│ │MO(RL │ + * │LCTRL │ LGUI │ LALT│SPACE(_NL) │MO(_NL) │MO_SL│ │MO(RL │ * └────────┴────────┴─────┴────────────┴────────────────┴─────┴─────┴─────────┘ */ [_ML] = 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_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_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, SPC_FUN, MO(_NL), MO(_SL), XXXXXXX, MO(_RL) ), @@ -36,7 +52,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * ┌─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────────┐ * │ │ │HOME │ UP │END │PGUP │ │ F1 │ F2 │ F3 │ F4 │ │ * ├─────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────────┤ - * │ CAPS │ │LEFT │DOWN │RIGHT│PGDN │ │ F5 │ F6 │ F7 │ F8 │ │ + * │ CAPS │ │LEFT │DOWN │RIGHT│PGDN │ │ F5 │ F6 │ F7 │ F8 │ QUOT │ * ├──────┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬─────┤ * │ │ │ │ DEL │ INS │ │ │ F9 │ F10 │ F11 │ F12 │ │ * ├────────┬┴─────┴─┬───┴─┬───┴─────┴──┬──┴─────┴─────┴─┬───┴─┬───┴─┬───┴─────┤ @@ -45,7 +61,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ [_FL] = LAYOUT( _______, XXXXXXX, KC_HOME, KC_UP, KC_END, KC_PGUP, XXXXXXX, KC_F1, KC_F2, KC_F3, KC_F4, _______, - KC_CAPS, XXXXXXX, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGDN, XXXXXXX, KC_F5, KC_F6, KC_F7, KC_F8, _______, + KC_CAPS, XXXXXXX, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGDN, XXXXXXX, KC_F5, KC_F6, KC_F7, KC_F8, KC_QUOT, _______, XXXXXXX, XXXXXXX, KC_DEL, KC_INS, XXXXXXX, XXXXXXX, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______, _______, _______, _______, _______, _______, _______, _______ ), From 96101adea9a41f8c0b2b043c898026808cfff37f Mon Sep 17 00:00:00 2001 From: Sendy YK Date: Wed, 23 Sep 2020 08:31:05 +0700 Subject: [PATCH 867/930] Minor updates ai03/soyuz:mrsendyyk (#10333) * Minor updates ai03/soyuz:mrsendyyk * Update keymap.c * Update readme.md * Update keymap.c * Update readme.md --- .../ai03/soyuz/keymaps/mrsendyyk/keymap.c | 32 ++++++++++++++++--- .../ai03/soyuz/keymaps/mrsendyyk/readme.md | 12 +++++-- 2 files changed, 37 insertions(+), 7 deletions(-) diff --git a/keyboards/ai03/soyuz/keymaps/mrsendyyk/keymap.c b/keyboards/ai03/soyuz/keymaps/mrsendyyk/keymap.c index a1d2596a6ac7..0b9793484f66 100644 --- a/keyboards/ai03/soyuz/keymaps/mrsendyyk/keymap.c +++ b/keyboards/ai03/soyuz/keymaps/mrsendyyk/keymap.c @@ -1,9 +1,31 @@ +/* Copyright (C) 2020 Sendy YK (https://mr.sendyyk.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 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public 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 +}; + const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [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) + [_BASE] = 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/ai03/soyuz/keymaps/mrsendyyk/readme.md b/keyboards/ai03/soyuz/keymaps/mrsendyyk/readme.md index e1f1b7ce36ee..0e5007e6fa9f 100644 --- a/keyboards/ai03/soyuz/keymaps/mrsendyyk/readme.md +++ b/keyboards/ai03/soyuz/keymaps/mrsendyyk/readme.md @@ -1,6 +1,14 @@ -# [Sendy YK's Keymap](https://github.com/mrsendyyk/my_qmk/tree/master/ai03_soyuz_numpad) +# Sendy YK's Numpad 5x4 Layout and Keymap -![Default Layer [0]](https://raw.githubusercontent.com/mrsendyyk/my_qmk/master/ai03_soyuz_numpad/assets/ai03_soyuz_mrsendyyk.png) +[https://mr.sendyyk.com](https://mr.sendyyk.com) + +## Numpad 5x4 Layout + +![LAYOUT_numpad_5x4](https://raw.githubusercontent.com/mrsendyyk/my_qmk/master/soyuz/assets/layout-numpad-5x4.png) + +## Keymap + +![_BASE](https://raw.githubusercontent.com/mrsendyyk/my_qmk/master/soyuz/assets/layout-numpad-5x4-keymap.png) ## Build The Firmware From 8b9617f93dce6fdf1b4e003da3e120f9c6853d23 Mon Sep 17 00:00:00 2001 From: myfreeweb Date: Wed, 23 Sep 2020 07:17:36 +0300 Subject: [PATCH 868/930] [Keyboard] Add Spider Island split 78 key ps2avrGB based keyboard (#9900) --- keyboards/spiderisland/split78/config.h | 35 ++++ keyboards/spiderisland/split78/info.json | 94 +++++++++++ .../split78/keymaps/default/keymap.c | 41 +++++ keyboards/spiderisland/split78/matrix.c | 155 ++++++++++++++++++ keyboards/spiderisland/split78/readme.md | 25 +++ keyboards/spiderisland/split78/rules.mk | 24 +++ keyboards/spiderisland/split78/split78.c | 17 ++ keyboards/spiderisland/split78/split78.h | 36 ++++ 8 files changed, 427 insertions(+) create mode 100644 keyboards/spiderisland/split78/config.h create mode 100644 keyboards/spiderisland/split78/info.json create mode 100644 keyboards/spiderisland/split78/keymaps/default/keymap.c create mode 100644 keyboards/spiderisland/split78/matrix.c create mode 100644 keyboards/spiderisland/split78/readme.md create mode 100644 keyboards/spiderisland/split78/rules.mk create mode 100644 keyboards/spiderisland/split78/split78.c create mode 100644 keyboards/spiderisland/split78/split78.h diff --git a/keyboards/spiderisland/split78/config.h b/keyboards/spiderisland/split78/config.h new file mode 100644 index 000000000000..a7ec160fafb9 --- /dev/null +++ b/keyboards/spiderisland/split78/config.h @@ -0,0 +1,35 @@ +/* +Copyright 2020 unrelenting.technology + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License 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 0xF4E4 +#define DEVICE_VER 0x0001 +#define MANUFACTURER SpiderIsland +#define PRODUCT Split 78-key + +/* key matrix size */ +#define MATRIX_ROWS 8 +#define MATRIX_COLS 14 + +#define BACKLIGHT_PIN D4 +#define BACKLIGHT_LEVELS 3 +#define BACKLIGHT_BREATHING diff --git a/keyboards/spiderisland/split78/info.json b/keyboards/spiderisland/split78/info.json new file mode 100644 index 000000000000..7a96efe7623b --- /dev/null +++ b/keyboards/spiderisland/split78/info.json @@ -0,0 +1,94 @@ +{ + "keyboard_name": "Spider Island 78-key split", + "url": "", + "maintainer": "qmk", + "width": 16, + "height": 6.25, + "layouts": { + "LAYOUT": { + "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": 8.5, "y": 0}, + {"x": 9.5, "y": 0}, + {"x": 10.5, "y": 0}, + {"x": 12, "y": 0}, + {"x": 13, "y": 0}, + {"x": 14, "y": 0}, + {"x": 15, "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": 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}, + {"x": 14, "y": 1.25, "w": 2}, + {"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": 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}, + {"x": 14.5, "y": 2.25, "w": 1.5}, + + {"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": 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": 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": 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": 15, "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": 1.25}, + {"x": 5, "y": 5.25, "w": 2.25}, + {"x": 8.25, "y": 5.25, "w": 2.25}, + {"x": 10.5, "y": 5.25, "w": 1.25}, + {"x": 11.75, "y": 5.25, "w": 1.25}, + {"x": 13, "y": 5.25}, + {"x": 14, "y": 5.25}, + {"x": 15, "y": 5.25} + ] + } + } +} diff --git a/keyboards/spiderisland/split78/keymaps/default/keymap.c b/keyboards/spiderisland/split78/keymaps/default/keymap.c new file mode 100644 index 000000000000..761648d9580c --- /dev/null +++ b/keyboards/spiderisland/split78/keymaps/default/keymap.c @@ -0,0 +1,41 @@ +/* Copyright 2020 unrelenting.technology + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public 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] = LAYOUT( + 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_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_QUOT, 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_RSFT, KC_UP, KC_SLSH, + KC_LCTL, KC_LGUI, KC_LALT, TT(_FN), KC_SPC, KC_SPC, KC_RALT, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT + ), + [_FN] = LAYOUT( + RESET, 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, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, BL_DEC, BL_INC, KC_DEL, + KC_NLCK, XXXXXXX, KC_UP, XXXXXXX, XXXXXXX, XXXXXXX, KC_P7, KC_P8, KC_P9, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + BL_TOGG, KC_LEFT, KC_DOWN, KC_RGHT, XXXXXXX, XXXXXXX, KC_P4, KC_P5, KC_P6, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + KC_SLCK, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_P1, KC_P2, KC_P3, XXXXXXX, KC_SLSH, KC_PGUP, XXXXXXX, + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_P0, KC_PDOT, KC_PENT, KC_HOME, KC_PGDN, KC_END + ) +}; diff --git a/keyboards/spiderisland/split78/matrix.c b/keyboards/spiderisland/split78/matrix.c new file mode 100644 index 000000000000..b5c7028fdf5f --- /dev/null +++ b/keyboards/spiderisland/split78/matrix.c @@ -0,0 +1,155 @@ +/* +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 "quantum.h" +#include "i2c_master.h" +#include "split78.h" + +#define RIGHT_HALF + + +void matrix_set_row_status(uint8_t row); + + +#if defined(RIGHT_HALF) +#define I2C_TIMEOUT 10 +#define MCP23018_TWI_ADDRESS 0b0100000 +#define TW_READ 1 +#define TW_WRITE 0 +#define TWI_ADDR_WRITE ( (MCP23018_TWI_ADDRESS<<1) | TW_WRITE ) +#define TWI_ADDR_READ ( (MCP23018_TWI_ADDRESS<<1) | TW_READ ) +#define IODIRA 0x00 // i/o direction register +#define IODIRB 0x01 +#define IODIRA 0x00 // i/o direction register +#define IODIRB 0x01 +#define GPPUA 0x0C // GPIO pull-up resistor register +#define GPPUB 0x0D +#define GPIOA 0x12 // general purpose i/o port register (write modifies OLAT) +#define GPIOB 0x13 +#define OLATA 0x14 // output latch register +#define OLATB 0x15 +#define MCP_ROWS_START 8 + +static uint8_t mcp23018_init(void) { + uint8_t ret; + uint8_t data[3]; + // set pin direction + // - unused : input : 1 + // - input : input : 1 + // - driving : output : 0 + data[0] = IODIRA; + data[1] = 0b00000000; // IODIRA + data[2] = (0b11111111); // IODIRB + + ret = i2c_transmit(TWI_ADDR_WRITE, (uint8_t *)data, 3, I2C_TIMEOUT); + if (ret) goto out; // make sure we got an ACK + + // set pull-up + // - unused : on : 1 + // - input : on : 1 + // - driving : off : 0 + data[0] = GPPUA; + data[1] = 0b00000000; // IODIRA + data[2] = (0b11111111); // IODIRB + + ret = i2c_transmit(TWI_ADDR_WRITE, (uint8_t *)data, 3, I2C_TIMEOUT); + if (ret) goto out; // make sure we got an ACK + + // set logical value (doesn't matter on inputs) + // - unused : hi-Z : 1 + // - input : hi-Z : 1 + // - driving : hi-Z : 1 + data[0] = OLATA; + data[1] = 0b11111111; // IODIRA + data[2] = (0b11111111); // IODIRB + + ret = i2c_transmit(TWI_ADDR_WRITE, (uint8_t *)data, 3, I2C_TIMEOUT); + +out: + return ret; +} +#endif + +void matrix_init_custom(void) { + // Set rows as output starting high + DDRB = 0xFF; + PORTB = 0xFF; + + // Set columns as inputs with pull-up enabled + DDRA = 0x00; + PORTA = 0xFF; + + // Initialize i2c communication + i2c_init(); + +#if defined(RIGHT_HALF) + // Initialize the chip on the other half + mcp23018_init(); +#endif + +} + +bool matrix_scan_custom(matrix_row_t current_matrix[]) { + bool matrix_has_changed = false; + + for (uint8_t row = 0; row < MATRIX_ROWS; row++) { + // Store last value of row prior to reading + matrix_row_t last_row_value = current_matrix[row]; + + matrix_row_t cols = 0; + // Select the row to scan + matrix_set_row_status(row); + + matrix_io_delay(); + //Set the local row + +#if defined(RIGHT_HALF) + // Initialize to 0x7F in case I2C read fails, + // as 0x75 would be no keys pressed + uint8_t data = 0x7F; + // Receive the columns from right half + i2c_receive(TWI_ADDR_WRITE, &data, 1, I2C_TIMEOUT); +#endif + + cols |= ((~(PINA | 0x80)) & 0x7F); +#if defined(RIGHT_HALF) + cols |= (((~(data | 0x80)) & 0x7F) << 7); +#endif + + current_matrix[row] = cols; + matrix_has_changed |= (last_row_value != current_matrix[row]); + } + + return matrix_has_changed; +} + +void matrix_set_row_status(uint8_t row) { +#if defined(RIGHT_HALF) + uint8_t txdata[3]; + + //Set the remote row on port A + txdata[0] = (GPIOA); + txdata[1] = ( 0xFF & ~(1<. + */ + +#include "split78.h" diff --git a/keyboards/spiderisland/split78/split78.h b/keyboards/spiderisland/split78/split78.h new file mode 100644 index 000000000000..2f6252f0c922 --- /dev/null +++ b/keyboards/spiderisland/split78/split78.h @@ -0,0 +1,36 @@ +/* Copyright 2020 unrelenting.technology + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License 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( \ + l00, l01, l02, l03, l04, l05, r00, r01, r02, r03, r04, r05, r06, \ + l06, l07, l08, l09, l10, l11, l12, r07, r08, r09, r10, r11, r12, r13, \ + l13, l14, l15, l16, l17, l18, r14, r15, r16, r17, r18, r19, r20, r21, \ + l19, l20, l21, l22, l23, l24, r22, r23, r24, r25, r26, r27, r28, \ + l25, l26, l27, l28, l29, l30, r29, r30, r31, r32, r33, r34, r35, \ + l31, l32, l33, l34, l35, r36, r37, r38, r39, r40, r41 \ +) { \ + { l00, l06, l13, l19, l25, l31, KC_NO, r00, r07, r14, r22, r29, r21 }, \ + { l01, l07, l14, l20, l26, l32, KC_NO, r01, r08, r15, r23, r30, r36 }, \ + { l02, l08, l15, l21, l27, l33, KC_NO, r02, r09, r16, r24, r31, r37 }, \ + { l03, l09, l16, l22, l28, l34, KC_NO, r03, r10, r17, r25, r32, r38 }, \ + { l04, l10, l17, l23, l29, l35, KC_NO, r04, r11, r18, r27, r33, r39 }, \ + { l05, l11, l18, l24, l30, l12, KC_NO, r05, r12, r19, r26, r34, r40 }, \ + { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, r06, r13, r20, r28, r35, r41 }, \ +} From f2dec4d3cf244a56bbe650c532adf69affbf6e94 Mon Sep 17 00:00:00 2001 From: MelGeek <65591833+melgeek001365@users.noreply.github.com> Date: Thu, 24 Sep 2020 09:45:43 +0800 Subject: [PATCH 869/930] [Keyboard] add MelGeek MJ61 (#10341) * [Keyboard] Support MJ61 which is a 60% ANSI STD Hotswap RGB keyboard * Update keyboards/melgeek/mj61/mj61.c * Update keyboards/melgeek/mj61/mj61.c * [Keyboard] MJ61 Add license header for files and the link for readme * Update keyboards/melgeek/mj61/readme.md * Update keyboards/melgeek/mj61/rev1/config.h * Update keyboards/melgeek/mj61/rev1/rules.mk * Update keyboards/melgeek/mj61/mj61.c * Update keyboards/melgeek/mj61/mj61.c --- keyboards/melgeek/mj61/config.h | 19 +++ keyboards/melgeek/mj61/info.json | 78 +++++++++++ .../melgeek/mj61/keymaps/default/keymap.c | 42 ++++++ keyboards/melgeek/mj61/keymaps/via/keymap.c | 49 +++++++ keyboards/melgeek/mj61/keymaps/via/rules.mk | 2 + keyboards/melgeek/mj61/mj61.c | 124 ++++++++++++++++++ keyboards/melgeek/mj61/mj61.h | 35 +++++ keyboards/melgeek/mj61/readme.md | 15 +++ keyboards/melgeek/mj61/rev1/config.h | 70 ++++++++++ keyboards/melgeek/mj61/rev1/rules.mk | 20 +++ 10 files changed, 454 insertions(+) create mode 100644 keyboards/melgeek/mj61/config.h create mode 100644 keyboards/melgeek/mj61/info.json create mode 100644 keyboards/melgeek/mj61/keymaps/default/keymap.c create mode 100644 keyboards/melgeek/mj61/keymaps/via/keymap.c create mode 100644 keyboards/melgeek/mj61/keymaps/via/rules.mk create mode 100644 keyboards/melgeek/mj61/mj61.c create mode 100644 keyboards/melgeek/mj61/mj61.h create mode 100644 keyboards/melgeek/mj61/readme.md create mode 100644 keyboards/melgeek/mj61/rev1/config.h create mode 100644 keyboards/melgeek/mj61/rev1/rules.mk diff --git a/keyboards/melgeek/mj61/config.h b/keyboards/melgeek/mj61/config.h new file mode 100644 index 000000000000..452b1c8728ec --- /dev/null +++ b/keyboards/melgeek/mj61/config.h @@ -0,0 +1,19 @@ +/* Copyright 2020 MelGeek + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License 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/melgeek/mj61/info.json b/keyboards/melgeek/mj61/info.json new file mode 100644 index 000000000000..460858474c48 --- /dev/null +++ b/keyboards/melgeek/mj61/info.json @@ -0,0 +1,78 @@ +{ + "keyboard_name": "MJ61", + "url": "", + "maintainer": "melgeek001365", + "width": 15, + "height": 5, + "layouts": { + "LAYOUT_60_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":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/melgeek/mj61/keymaps/default/keymap.c b/keyboards/melgeek/mj61/keymaps/default/keymap.c new file mode 100644 index 000000000000..2237851fbebc --- /dev/null +++ b/keyboards/melgeek/mj61/keymaps/default/keymap.c @@ -0,0 +1,42 @@ +/* Copyright 2020 MelGeek + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public 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_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, 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, EEP_RST, + KC_MPRV, KC_VOLD, KC_VOLU, KC_MUTE, _______, _______, NK_TOGG, _______, _______, KC_END, KC_PGDN, KC_MNXT, + _______, _______, _______, _______, _______, _______, _______, _______ + ), + [2] = LAYOUT_60_ansi( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, RGB_TOG, _______, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, RGB_MOD, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, RGB_SPI, RGB_SPD, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______ + ) +}; + diff --git a/keyboards/melgeek/mj61/keymaps/via/keymap.c b/keyboards/melgeek/mj61/keymaps/via/keymap.c new file mode 100644 index 000000000000..409a37c9b10c --- /dev/null +++ b/keyboards/melgeek/mj61/keymaps/via/keymap.c @@ -0,0 +1,49 @@ +/* Copyright 2020 MelGeek + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public 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_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, 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, EEP_RST, + KC_MPRV, KC_VOLD, KC_VOLU, KC_MUTE, _______, _______, NK_TOGG, _______, _______, KC_END, KC_PGDN, KC_MNXT, + _______, _______, _______, _______, _______, _______, _______, _______ + ), + [2] = LAYOUT_60_ansi( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, RGB_TOG, _______, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, RGB_MOD, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, RGB_SPI, RGB_SPD, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______ + ), + [3] = LAYOUT_60_ansi( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______ + ) +}; + diff --git a/keyboards/melgeek/mj61/keymaps/via/rules.mk b/keyboards/melgeek/mj61/keymaps/via/rules.mk new file mode 100644 index 000000000000..36b7ba9cbc98 --- /dev/null +++ b/keyboards/melgeek/mj61/keymaps/via/rules.mk @@ -0,0 +1,2 @@ +VIA_ENABLE = yes +LTO_ENABLE = yes diff --git a/keyboards/melgeek/mj61/mj61.c b/keyboards/melgeek/mj61/mj61.c new file mode 100644 index 000000000000..21853019f0e8 --- /dev/null +++ b/keyboards/melgeek/mj61/mj61.c @@ -0,0 +1,124 @@ +/* Copyright 2020 MelGeek + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#include "mj61.h" + +#ifdef RGB_MATRIX_ENABLE +const is31_led g_is31_leds[DRIVER_LED_TOTAL] = { + {0, CS12_SW1, CS11_SW1, CS10_SW1}, /* RGB1 */ + {0, CS12_SW2, CS11_SW2, CS10_SW2}, /* RGB2 */ + {0, CS12_SW3, CS11_SW3, CS10_SW3}, /* RGB3 */ + {0, CS12_SW4, CS11_SW4, CS10_SW4}, /* RGB4 */ + {0, CS12_SW5, CS11_SW5, CS10_SW5}, /* RGB5 */ + {0, CS12_SW6, CS11_SW6, CS10_SW6}, /* RGB6 */ + {0, CS12_SW7, CS11_SW7, CS10_SW7}, /* RGB7 */ + {0, CS12_SW8, CS11_SW8, CS10_SW8}, /* RGB8 */ + {0, CS12_SW9, CS11_SW9, CS10_SW9}, /* RGB9 */ + {0, CS15_SW1, CS14_SW1, CS13_SW1}, /* RGB10 */ + {0, CS15_SW2, CS14_SW2, CS13_SW2}, /* RGB11 */ + {0, CS15_SW3, CS14_SW3, CS13_SW3}, /* RGB12 */ + {0, CS15_SW4, CS14_SW4, CS13_SW4}, /* RGB13 */ + {0, CS15_SW5, CS14_SW5, CS13_SW5}, /* RGB14 */ + {0, CS15_SW6, CS14_SW6, CS13_SW6}, /* RGB15 */ + {0, CS15_SW7, CS14_SW7, CS13_SW7}, /* RGB16 */ + {0, CS15_SW8, CS14_SW8, CS13_SW8}, /* RGB17 */ + {0, CS15_SW9, CS14_SW9, CS13_SW9}, /* RGB18 */ + {0, CS18_SW1, CS17_SW1, CS16_SW1}, /* RGB19 */ + {0, CS18_SW2, CS17_SW2, CS16_SW2}, /* RGB20 */ + {0, CS18_SW3, CS17_SW3, CS16_SW3}, /* RGB21 */ + {0, CS18_SW4, CS17_SW4, CS16_SW4}, /* RGB22 */ + {0, CS18_SW5, CS17_SW5, CS16_SW5}, /* RGB23 */ + {0, CS18_SW6, CS17_SW6, CS16_SW6}, /* RGB24 */ + {0, CS18_SW7, CS17_SW7, CS16_SW7}, /* RGB25 */ + {0, CS18_SW8, CS17_SW8, CS16_SW8}, /* RGB26 */ + {0, CS18_SW9, CS17_SW9, CS16_SW9}, /* RGB27 */ + {0, CS21_SW1, CS20_SW1, CS19_SW1}, /* RGB28 */ + {0, CS21_SW2, CS20_SW2, CS19_SW2}, /* RGB29 */ + {0, CS21_SW3, CS20_SW3, CS19_SW3}, /* RGB30 */ + {0, CS21_SW4, CS20_SW4, CS19_SW4}, /* RGB31 */ + {0, CS21_SW5, CS20_SW5, CS19_SW5}, /* RGB32 */ + {0, CS21_SW6, CS20_SW6, CS19_SW6}, /* RGB33 */ + {0, CS21_SW7, CS20_SW7, CS19_SW7}, /* RGB34 */ + {0, CS21_SW8, CS20_SW8, CS19_SW8}, /* RGB35 */ + {0, CS21_SW9, CS20_SW9, CS19_SW9}, /* RGB36 */ + {0, CS24_SW1, CS23_SW1, CS22_SW1}, /* RGB37 */ + {0, CS24_SW2, CS23_SW2, CS22_SW2}, /* RGB38 */ + {0, CS24_SW3, CS23_SW3, CS22_SW3}, /* RGB39 */ + {0, CS24_SW4, CS23_SW4, CS22_SW4}, /* RGB40 */ + {0, CS24_SW5, CS23_SW5, CS22_SW5}, /* RGB41 */ + {0, CS24_SW6, CS23_SW6, CS22_SW6}, /* RGB42 */ + {0, CS24_SW7, CS23_SW7, CS22_SW7}, /* RGB43 */ + {0, CS24_SW8, CS23_SW8, CS22_SW8}, /* RGB44 */ + {0, CS24_SW9, CS23_SW9, CS22_SW9}, /* RGB45 */ + {0, CS27_SW1, CS26_SW1, CS25_SW1}, /* RGB46 */ + {0, CS27_SW2, CS26_SW2, CS25_SW2}, /* RGB47 */ + {0, CS27_SW3, CS26_SW3, CS25_SW3}, /* RGB48 */ + {0, CS27_SW4, CS26_SW4, CS25_SW4}, /* RGB49 */ + {0, CS27_SW5, CS26_SW5, CS25_SW5}, /* RGB50 */ + {0, CS27_SW6, CS26_SW6, CS25_SW6}, /* RGB51 */ + {0, CS27_SW7, CS26_SW7, CS25_SW7}, /* RGB52 */ + {0, CS27_SW8, CS26_SW8, CS25_SW8}, /* RGB53 */ + {0, CS27_SW9, CS26_SW9, CS25_SW9}, /* RGB54 */ + {0, CS30_SW1, CS29_SW1, CS28_SW1}, /* RGB55 */ + {0, CS30_SW2, CS29_SW2, CS28_SW2}, /* RGB56 */ + {0, CS30_SW3, CS29_SW3, CS28_SW3}, /* RGB57 */ + {0, CS30_SW4, CS29_SW4, CS28_SW4}, /* RGB58 */ + {0, CS30_SW5, CS29_SW5, CS28_SW5}, /* RGB59 */ + {0, CS30_SW6, CS29_SW6, CS28_SW6}, /* RGB60 */ + {0, CS30_SW7, CS29_SW7, CS28_SW7}, /* RGB61 */ + {0, CS30_SW8, CS29_SW8, CS28_SW8}, /* RGB62 */ + {0, CS30_SW9, CS29_SW9, CS28_SW9}, /* RGB63 */ +}; + +led_config_t g_led_config = { + { + /* C0 C1 C2 C3 C4 C5 C6 C7 C8 C9 C10 C11 C12 C13 */ + { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13 }, /* R0 */ + { 27, 26, 25, 24, 23, 22, 21, 20, 19, 18, 17, 16, 15, 14 }, /* R1 */ + { 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, NO_LED,}, /* R2 */ + { 52, NO_LED, 51, 50, 49, 48, 47, 46, 45, 44, 43, 42, 41, NO_LED }, /* R3 */ + { 53, 54, NO_LED, 55, 61, 56, 62, NO_LED, NO_LED, 57, 58, 59, 60, NO_LED }, /* R4 */ + }, { + {0, 0}, {16, 0}, {32, 0}, {48, 0}, {64, 0}, {80, 0}, {96, 0}, {112, 0}, {128, 0}, {144, 0}, {160, 0}, {176, 0}, {192, 0}, {208, 0}, + {0, 16}, {16, 16}, {32, 16}, {48, 16}, {64, 16}, {80, 16}, {96, 16}, {112, 16}, {128, 16}, {144, 16}, {160, 16}, {176, 16}, {192, 16}, {208, 16}, + {0, 32}, {16, 32}, {32, 32}, {48, 32}, {64, 32}, {80, 32}, {96, 32}, {112, 32}, {128, 32}, {144, 32}, {160, 32}, {176, 32}, {192, 32}, + {0, 48}, {16, 48}, {32, 48}, {48, 48}, {64, 48}, {80, 48}, {96, 48}, {112, 48}, {128, 48}, {144, 48}, {160, 48}, {176, 48}, + {0, 64}, {16, 64}, {32, 64}, {48, 64}, {64, 64}, {80, 64}, {96, 64}, {112, 64}, {128, 64}, {144, 64}, + }, { + 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, + } +}; + +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(); +} + +void keyboard_pre_init_kb(void) { + setPinOutput(A2); + writePinHigh(A2); + keyboard_pre_init_user(); +} +#endif diff --git a/keyboards/melgeek/mj61/mj61.h b/keyboards/melgeek/mj61/mj61.h new file mode 100644 index 000000000000..1881196dba4c --- /dev/null +++ b/keyboards/melgeek/mj61/mj61.h @@ -0,0 +1,35 @@ +/* Copyright 2020 MelGeek + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License 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 + +#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, K2C, \ + K30, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, \ + K40, K41, K43, 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 }, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, XXX }, \ + { K30, XXX, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, XXX }, \ + { K40, K41, XXX, K43, XXX, K45, XXX, XXX, XXX, K49, K4A, K4B, XXX, K4D } \ +} diff --git a/keyboards/melgeek/mj61/readme.md b/keyboards/melgeek/mj61/readme.md new file mode 100644 index 000000000000..2db0e71b6f9f --- /dev/null +++ b/keyboards/melgeek/mj61/readme.md @@ -0,0 +1,15 @@ +# MelGeek MJ61 + +![MJ61](https://cdn.shopifycdn.net/s/files/1/0078/2863/5712/products/a0ebad495be43c4c42403878b4af4ac2_1024x1024@2x.jpg?v=1600672895) + +A hotswap 60% RGB Custom Mechanical keyboard. + +* Keyboard Maintainer: [melgeek](https://github.com/melgeek001365) +* Hardware Supported: MJ61 V1.1.2 20200612 +* Hardware Availability: [MelGeek](https://www.melgeek.com/) + +Make example for this keyboard (after setting up your build environment): + + make melgeek/mj61/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/melgeek/mj61/rev1/config.h b/keyboards/melgeek/mj61/rev1/config.h new file mode 100644 index 000000000000..a0ba953b0e99 --- /dev/null +++ b/keyboards/melgeek/mj61/rev1/config.h @@ -0,0 +1,70 @@ +/* Copyright 2020 MelGeek + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License 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 0xED61 +#define DEVICE_VER 0x0001 +#define MANUFACTURER MelGeek +#define PRODUCT MJ61 + +/* 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 { B12, B11, B10, B1, A3 } +#define MATRIX_COL_PINS { B15, A8, A10, A15, B3, B4, B5, B8, B9, C13, C14, C15, A0, A1 } +#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 */ +#define NO_ACTION_MACRO +#define NO_ACTION_FUNCTION + +#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_SOLID_COLOR +#define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_CYCLE_ALL +#define DRIVER_ADDR_1 0b0110000 +#define DRIVER_ADDR_2 0b0110000 // this is here for compliancy reasons. +#define DRIVER_COUNT 1 +#define DRIVER_1_LED_TOTAL 63 +#define DRIVER_LED_TOTAL DRIVER_1_LED_TOTAL +#define DRIVER_INDICATOR_LED_TOTAL 0 diff --git a/keyboards/melgeek/mj61/rev1/rules.mk b/keyboards/melgeek/mj61/rev1/rules.mk new file mode 100644 index 000000000000..ba7f9eac25af --- /dev/null +++ b/keyboards/melgeek/mj61/rev1/rules.mk @@ -0,0 +1,20 @@ +# MCU name +MCU = STM32F303 + +# 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 +BLUETOOTH_ENABLE = no # Enable Bluetooth +RGB_MATRIX_ENABLE = IS31FL3741 # Use RGB matrix +NO_USB_STARTUP_CHECK = no # Disable initialization only when usb is plugged in From 940c294d26dfe5ab51b094db4f76cc819cdb18f5 Mon Sep 17 00:00:00 2001 From: 2Moons-JP <57225836+2Moons-JP@users.noreply.github.com> Date: Thu, 24 Sep 2020 10:47:27 +0900 Subject: [PATCH 870/930] [Keyboard] add Basekeys Trifecta (#10375) * Trifecta 09-20 * Update keyboards/basekeys/trifecta/config.h * Update keyboards/basekeys/trifecta/config.h * Update keyboards/basekeys/trifecta/config.h * Update keyboards/basekeys/trifecta/keymaps/default/keymap.c * Update keyboards/basekeys/trifecta/keymaps/via/keymap.c * Update keyboards/basekeys/trifecta/rules.mk * Update rules.mk Suggested Changes * Update keyboards/basekeys/trifecta/readme.md * Update keyboards/basekeys/trifecta/readme.md * Tap Dance Removal * Update keyboards/basekeys/trifecta/keymaps/default/keymap.c * Update keyboards/basekeys/trifecta/keymaps/default/keymap.c * Update keyboards/basekeys/trifecta/keymaps/via/keymap.c --- keyboards/basekeys/trifecta/config.h | 123 ++++++++++++++++++ keyboards/basekeys/trifecta/info.json | 12 ++ .../trifecta/keymaps/default/keymap.c | 71 ++++++++++ .../trifecta/keymaps/default/rules.mk | 2 + .../basekeys/trifecta/keymaps/via/keymap.c | 71 ++++++++++ .../basekeys/trifecta/keymaps/via/rules.mk | 3 + keyboards/basekeys/trifecta/readme.md | 17 +++ keyboards/basekeys/trifecta/rules.mk | 24 ++++ keyboards/basekeys/trifecta/trifecta.c | 61 +++++++++ keyboards/basekeys/trifecta/trifecta.h | 48 +++++++ 10 files changed, 432 insertions(+) create mode 100644 keyboards/basekeys/trifecta/config.h create mode 100644 keyboards/basekeys/trifecta/info.json create mode 100644 keyboards/basekeys/trifecta/keymaps/default/keymap.c create mode 100644 keyboards/basekeys/trifecta/keymaps/default/rules.mk create mode 100644 keyboards/basekeys/trifecta/keymaps/via/keymap.c create mode 100644 keyboards/basekeys/trifecta/keymaps/via/rules.mk create mode 100644 keyboards/basekeys/trifecta/readme.md create mode 100644 keyboards/basekeys/trifecta/rules.mk create mode 100644 keyboards/basekeys/trifecta/trifecta.c create mode 100644 keyboards/basekeys/trifecta/trifecta.h diff --git a/keyboards/basekeys/trifecta/config.h b/keyboards/basekeys/trifecta/config.h new file mode 100644 index 000000000000..8a9529126013 --- /dev/null +++ b/keyboards/basekeys/trifecta/config.h @@ -0,0 +1,123 @@ +/* Copyright 2020 Swiftrax and Basekeys.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 */ +#define VENDOR_ID 0x04D8 +#define PRODUCT_ID 0xEAF3 +#define DEVICE_VER 0x0001 +#define MANUFACTURER Swiftrax +#define PRODUCT Trifecta + +/* key matrix size */ +#define MATRIX_ROWS 10 +#define MATRIX_COLS 8 + +/* key matrix pins */ + +#define MATRIX_ROW_PINS { B0, B7, F7, B1, B6, C6, C7, B5, F6, D2 } +#define MATRIX_COL_PINS { F0, F1, F4, F5, D1, B2, D0, B3 } + + +#define ENCODERS_PAD_A { D4, D6, D7 } +#define ENCODERS_PAD_B { B4, D3, D5 } + +/* COL2ROW, ROW2COL*/ +#define DIODE_DIRECTION COL2ROW + + +#define RGB_DI_PIN E6 +#define DRIVER_LED_TOTAL 80 + +/* RGB LED */ +#ifdef RGBLIGHT_ENABLE +#define RGB_DI_PIN E6 +#define RGBLED_NUM 80 // Number of LEDs. backlight x69 +#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 + +/* Limits the brightness of the LEDS range of 255-0 (255 is default)*/ +#define RGBLIGHT_LIMIT_VAL 128 + +/* 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 + +/* EEPROM for via */ +#define DYNAMIC_KEYMAP_LAYER_COUNT 3 + +/* bootmagic row col assignment */ +#define BOOTMAGIC_LITE_ROW 1 +#define BOOTMAGIC_LITE_COLUMN 0 + +#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 diff --git a/keyboards/basekeys/trifecta/info.json b/keyboards/basekeys/trifecta/info.json new file mode 100644 index 000000000000..3badb40d20f3 --- /dev/null +++ b/keyboards/basekeys/trifecta/info.json @@ -0,0 +1,12 @@ +{ + "keyboard_name": "Trifecta", + "url": "https://www.basekeys.com", + "maintainer": "Swiftrax", + "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/basekeys/trifecta/keymaps/default/keymap.c b/keyboards/basekeys/trifecta/keymaps/default/keymap.c new file mode 100644 index 000000000000..727ebf381ae7 --- /dev/null +++ b/keyboards/basekeys/trifecta/keymaps/default/keymap.c @@ -0,0 +1,71 @@ +/* Copyright 2020 Swiftrax and Basekeys.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 + +// Defines names for use in layer keycodes and the keymap +enum layer_names { + _BASE, + _FN, + _MEDIA }; + +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_BSPC, KC_DEL, 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, + 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, MO(_MEDIA), KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_SPC, KC_RGUI, KC_RCTL, MO(_FN), 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, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, 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( + 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_MOD, RGB_HUI, RGB_SAI, RGB_VAI, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, RGB_TOG, RGB_HUD, RGB_SAD, RGB_VAD, _______, _______, _______, _______, _______, _______, _______, _______, KC_PGUP, + _______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_END + ) +}; + +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_MNXT); + } else { + tap_code(KC_MPRV); + } + } else if (index == 2) { /* Third encoder */ + if (clockwise) { + tap_code(KC_RGHT); + } else { + tap_code(KC_LEFT); + } + } +} diff --git a/keyboards/basekeys/trifecta/keymaps/default/rules.mk b/keyboards/basekeys/trifecta/keymaps/default/rules.mk new file mode 100644 index 000000000000..910bd64a5967 --- /dev/null +++ b/keyboards/basekeys/trifecta/keymaps/default/rules.mk @@ -0,0 +1,2 @@ +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = no \ No newline at end of file diff --git a/keyboards/basekeys/trifecta/keymaps/via/keymap.c b/keyboards/basekeys/trifecta/keymaps/via/keymap.c new file mode 100644 index 000000000000..777a9c53fbf3 --- /dev/null +++ b/keyboards/basekeys/trifecta/keymaps/via/keymap.c @@ -0,0 +1,71 @@ +/* Copyright 2020 Swiftrax and Basekeys.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 + +// Defines names for use in layer keycodes and the keymap +enum layer_names { + _BASE, + _FN, + _MEDIA }; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_BASE] = LAYOUT( + KC_ESC, RGB_TOG, 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_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, + 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, MO(_MEDIA), KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_SPC, KC_RGUI, KC_RCTL, MO(_FN), 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, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, 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( + 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_MOD, RGB_HUI, RGB_SAI, RGB_VAI, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, RGB_TOG, RGB_HUD, RGB_SAD, RGB_VAD, _______, _______, _______, _______, _______, _______, _______, _______, KC_PGUP, + _______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_END + ) +}; + +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_RGHT); + } else { + tap_code(KC_LEFT); + } + } else if (index == 2) { /* Third encoder */ + if (clockwise) { + rgblight_step(); + } else { + rgblight_step_reverse(); + } + } +} diff --git a/keyboards/basekeys/trifecta/keymaps/via/rules.mk b/keyboards/basekeys/trifecta/keymaps/via/rules.mk new file mode 100644 index 000000000000..32f462d06cac --- /dev/null +++ b/keyboards/basekeys/trifecta/keymaps/via/rules.mk @@ -0,0 +1,3 @@ +VIA_ENABLE = yes +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = no \ No newline at end of file diff --git a/keyboards/basekeys/trifecta/readme.md b/keyboards/basekeys/trifecta/readme.md new file mode 100644 index 000000000000..efe6fb0abec6 --- /dev/null +++ b/keyboards/basekeys/trifecta/readme.md @@ -0,0 +1,17 @@ +# Trifecta + +![Trifecta](https://i.imgur.com/tlIwQowl.jpeg) + +An Alice style board with arrowkeys, based on the Fate Arisu layout. + +* Keyboard Maintainer: [swiftrax](https://github.com/swiftrax) +* Hardware Supported: Trifecta PCB, ATMEGA32U4-AU +* Hardware Availability: [Website](https://mykeyboard.eu/catalogue/) + +Make example for this keyboard (after setting up your build environment): + + make basekeys/trifecta: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://www.basekeys.com/category/build-guides/) diff --git a/keyboards/basekeys/trifecta/rules.mk b/keyboards/basekeys/trifecta/rules.mk new file mode 100644 index 000000000000..975fe8462070 --- /dev/null +++ b/keyboards/basekeys/trifecta/rules.mk @@ -0,0 +1,24 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +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 = 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 +BLUETOOTH_ENABLE = no # Enable Bluetooth +AUDIO_ENABLE = no # Audio output + +ENCODER_ENABLE = yes diff --git a/keyboards/basekeys/trifecta/trifecta.c b/keyboards/basekeys/trifecta/trifecta.c new file mode 100644 index 000000000000..e7aca201ce42 --- /dev/null +++ b/keyboards/basekeys/trifecta/trifecta.c @@ -0,0 +1,61 @@ +/* Copyright 2020 Swiftrax and Basekeys.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 "trifecta.h" + +#ifdef RGB_MATRIX_ENABLE + +led_config_t g_led_config = { { + { NO_LED, 70, 61, 52, 43, 34, 24, 14 }, + { 79, 69, 60, 51, 42, 33, 23, NO_LED }, + { NO_LED, 71, 62, 53, 44, 35, 25, 15 }, + { 78, 68, 59, 50, 41, 32, 22, NO_LED }, + { 77, 67, 58, 49, 40, 31, NO_LED, 16 }, + { NO_LED, 72, 63, 54, 45, 36, 26, NO_LED }, + { NO_LED, 73, 64, 55, 46, 37, 27, 17 }, + { 76, 66, 57, 48, 39, 30, 21, NO_LED }, + { NO_LED, 74, 56, NO_LED, NO_LED, 38, 28, 18 }, + { 75, 65, NO_LED, NO_LED, 47, 29, 20, 19 } +}, { + // Underglow + { 218, 7 }, { 214, 45 }, { 180, 47 }, { 147, 50 }, { 94, 62 }, { 37, 51 }, { 4, 8 }, { 36, 15 }, + { 62, 18 }, { 78, 5 }, { 119, 7 }, { 145, 16 }, { 166, 3 }, { 200, 16 }, + + //Per Key + { 185, 11 }, { 191, 22 }, { 188, 33 }, { 200, 46 }, { 200, 57 }, { 212, 57 }, { 188, 57 }, { 181, 44 }, + { 176, 22 }, { 168, 11 }, { 155, 11 }, { 164, 22 }, { 169, 32 }, { 165, 44 }, { 172, 55 }, { 157, 54 }, + { 153, 44 }, { 156, 33 }, { 153, 22 }, { 142, 12 }, { 130, 13 }, { 138, 23 }, { 143, 33 }, { 140, 45 }, + { 137, 56 }, { 128, 47 }, { 132, 35 }, { 127, 25 }, { 119, 16 }, { 107, 17 }, { 115, 27 }, { 120, 37 }, + { 116, 48 }, { 117, 59 }, { 104, 51 }, { 109, 39 }, { 104, 29 }, { 86, 19 }, { 74, 16 }, { 78, 28 }, + { 79, 39 }, { 82, 50 }, { 73, 60 }, { 71, 48 }, { 67, 37 }, { 66, 26 }, { 63, 15 }, { 50, 12 }, + { 55, 24 }, { 55, 35 }, { 59, 47 }, { 50, 56 }, { 47, 45 }, { 43, 33 }, { 43, 22 }, { 39, 10 }, + { 25, 11 }, { 29, 22 }, { 30, 33 }, { 34, 44 }, { 24, 54 }, { 9, 55 }, { 15, 44 }, { 14, 33 }, + { 14, 22 }, { 14, 11 } +}, { + 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, + + 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4 +} }; +#endif \ No newline at end of file diff --git a/keyboards/basekeys/trifecta/trifecta.h b/keyboards/basekeys/trifecta/trifecta.h new file mode 100644 index 000000000000..ed337813c657 --- /dev/null +++ b/keyboards/basekeys/trifecta/trifecta.h @@ -0,0 +1,48 @@ +/* Copyright 2020 Swiftrax and Basekeys.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 XXX KC_NO//readabilty + +/* 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( \ + k10, k01, k11, k02, k12, k03, k13, k04, k14, k05, k15, k06, k16, k07, k17, k37, \ + k30, k21, k31, k22, k32, k23, k33, k24, k34, k25, k35, k26, k36, k27, k57, \ + k40, k51, k41, k52, k42, k53, k43, k54, k44, k55, k45, k56, k47, k77, \ + k70, k61, k71, k62, k72, k63, k73, k64, k74, k65, k75, k66, k76, k67, \ + k90, k81, k91, k82, k94, k85, k95, k86, k96, k87, k97 \ +) \ +{ \ + { XXX, k01, k02, k03, k04, k05, k06, k07}, \ + { k10, k11, k12, k13, k14, k15, k16, k17}, \ + { XXX, k21, k22, k23, k24, k25, k26, k27}, \ + { k30, k31, k32, k33, k34, k35, k36, k37}, \ + { k40, k41, k42, k43, k44, k45, XXX, k47}, \ + { XXX, k51, k52, k53, k54, k55, k56, k57}, \ + { XXX, k61, k62, k63, k64, k65, k66, k67}, \ + { k70, k71, k72, k73, k74, k75, k76, k77}, \ + { XXX, k81, k82, XXX, XXX, k85, k86, k87}, \ + { k90, k91, XXX, XXX, k94, k95, k96, k97} \ +} From 940280c43594833e2208d8514452b8ab88c14a9c Mon Sep 17 00:00:00 2001 From: MechMerlin <30334081+mechmerlin@users.noreply.github.com> Date: Wed, 23 Sep 2020 18:52:04 -0700 Subject: [PATCH 871/930] VIA Support for flehrad Big Switch (#10325) * add VIA keymap * Update keyboards/flehrad/bigswitch/keymaps/via/keymap.c --- .../flehrad/bigswitch/keymaps/via/keymap.c | 29 +++++++++++++++++++ .../flehrad/bigswitch/keymaps/via/rules.mk | 2 ++ 2 files changed, 31 insertions(+) create mode 100644 keyboards/flehrad/bigswitch/keymaps/via/keymap.c create mode 100644 keyboards/flehrad/bigswitch/keymaps/via/rules.mk diff --git a/keyboards/flehrad/bigswitch/keymaps/via/keymap.c b/keyboards/flehrad/bigswitch/keymaps/via/keymap.c new file mode 100644 index 000000000000..f253f4b12e03 --- /dev/null +++ b/keyboards/flehrad/bigswitch/keymaps/via/keymap.c @@ -0,0 +1,29 @@ +/* +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_TRNS), + + [1] = LAYOUT(KC_TRNS), + + [2] = LAYOUT(KC_TRNS), + + [3] = LAYOUT(KC_TRNS) +}; diff --git a/keyboards/flehrad/bigswitch/keymaps/via/rules.mk b/keyboards/flehrad/bigswitch/keymaps/via/rules.mk new file mode 100644 index 000000000000..36b7ba9cbc98 --- /dev/null +++ b/keyboards/flehrad/bigswitch/keymaps/via/rules.mk @@ -0,0 +1,2 @@ +VIA_ENABLE = yes +LTO_ENABLE = yes From 30ffae2317936ece2f3275f6fab5a5df212afb85 Mon Sep 17 00:00:00 2001 From: gooberpsycho <64438496+gooberpsycho@users.noreply.github.com> Date: Wed, 23 Sep 2020 22:32:33 -0400 Subject: [PATCH 872/930] [Keyboard] add 3dp660 handwired (#10296) * Create keymap.c * Add files via upload * Added files for handwired 3d printed clueboard 660 * create via layout files * added layout files for via * updated product ID to fix id conflicts * change product ID to fix ID conflicts. * fixed capitalization error that was causing issues * fixed capitalization issues. * fix syntax errors * Fixed syntax errors (stray punctuation) * Compatibility fixes * Compatibility fixes * Compatibility fixes * Compatibility fixes * capitalization fixes * Compatibility fixes * Compatibility fixes * Compatibility Fixes * Compatibility fixes * Compatibility fixes * Compatibility changes * upkeep, fixing typos * Update keyboards/handwired/3dp660/config.h Removed Description line * Update keyboards/handwired/3dp660/rules.mk correct bootloader * Update keyboards/handwired/3dp660/3dp660.h fix case sensitive typos * Update keyboards/handwired/3dp660/keymaps/default/keymap.c change tab indentation to space indentations. * Update keyboards/handwired/3dp660/keymaps/via/keymap.c change tab indentations to space indentations * Delete 3dp660.json This file was for VIA, and shouldn't be in this repo. I placed it here so I wouldn't misplace it in my filesystem. My apologies. * Update info.json change suggestions to other file said to lowercase "ansi", caused reference issues, changed all instances of "ANSI" to "ansi". * Update keymap.c change suggestions to other file said to lowercase "ansi", caused reference issues, changed all instances of "ANSI" to "ansi". * Update keymap.c more capitalization fixes * Update keyboards/handwired/3dp660/readme.md shortened imgur url * Update keyboards/handwired/3dp660/rules.mk remove extraneous comments * Delete config.h * Update keyboards/handwired/3dp660/rules.mk * Update 3dp660.c add license headers to all .c and .h files * Update 3dp660.h added license header to all .c and .h files. * Update keymap.c added license header to all .c and .h files. * Update keymap.c added license header to all .c and .h files. * Update keyboards/handwired/3dp660/readme.md Add maintainer URL * Update keyboards/handwired/3dp660/keymaps/default/keymap.c remove extraneous default keymap layers * Update keyboards/handwired/3dp660/keymaps/default/rules.mk * Update rules.mk Moved LTO to keyboard level. * Update rules.mk Moved LTO to keyboard level. * Delete rules.mk Made obsolete by LTO move to keyboard level. * Update keyboards/handwired/3dp660/rules.mk capitalization errors. * Apply suggestions from code review Housekeeping, changing code for readability. --- keyboards/handwired/3dp660/3dp660.c | 17 ++++ keyboards/handwired/3dp660/3dp660.h | 35 ++++++++ keyboards/handwired/3dp660/config.h | 51 ++++++++++++ keyboards/handwired/3dp660/info.json | 80 +++++++++++++++++++ .../handwired/3dp660/keymaps/default/keymap.c | 34 ++++++++ .../handwired/3dp660/keymaps/via/keymap.c | 48 +++++++++++ .../handwired/3dp660/keymaps/via/rules.mk | 1 + keyboards/handwired/3dp660/readme.md | 24 ++++++ keyboards/handwired/3dp660/rules.mk | 23 ++++++ 9 files changed, 313 insertions(+) create mode 100644 keyboards/handwired/3dp660/3dp660.c create mode 100644 keyboards/handwired/3dp660/3dp660.h create mode 100644 keyboards/handwired/3dp660/config.h create mode 100644 keyboards/handwired/3dp660/info.json create mode 100644 keyboards/handwired/3dp660/keymaps/default/keymap.c create mode 100644 keyboards/handwired/3dp660/keymaps/via/keymap.c create mode 100644 keyboards/handwired/3dp660/keymaps/via/rules.mk create mode 100644 keyboards/handwired/3dp660/readme.md create mode 100644 keyboards/handwired/3dp660/rules.mk diff --git a/keyboards/handwired/3dp660/3dp660.c b/keyboards/handwired/3dp660/3dp660.c new file mode 100644 index 000000000000..383f88129c49 --- /dev/null +++ b/keyboards/handwired/3dp660/3dp660.c @@ -0,0 +1,17 @@ + /* Copyright 2020 gooberpsycho + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#include "3dp660.h" diff --git a/keyboards/handwired/3dp660/3dp660.h b/keyboards/handwired/3dp660/3dp660.h new file mode 100644 index 000000000000..67288b1fc8d3 --- /dev/null +++ b/keyboards/handwired/3dp660/3dp660.h @@ -0,0 +1,35 @@ + /* Copyright 2020 gooberpsycho + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License 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" + +// The first section contains all of the arguments +// The second converts the arguments into a two-dimensional array +#define LAYOUT_66_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, k2C, \ + k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3C, k3D, \ + 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, k1D, k1E}, \ + {k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, KC_NO, KC_NO}, \ + {k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, KC_NO, k3C, k3D, KC_NO}, \ + {k40, k41, k42, KC_NO, KC_NO, k45, KC_NO, KC_NO, KC_NO, k49, k4A, k4B, k4C, k4D, k4E} \ +} diff --git a/keyboards/handwired/3dp660/config.h b/keyboards/handwired/3dp660/config.h new file mode 100644 index 000000000000..e719cf2c255d --- /dev/null +++ b/keyboards/handwired/3dp660/config.h @@ -0,0 +1,51 @@ +/* +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 0x6075 +#define DEVICE_VER 0x0001 +#define MANUFACTURER Handwired +#define PRODUCT 3dp660 + +#define TAPPING_TERM 400 + +/* key matrix size */ +#define MATRIX_ROWS 5 +#define MATRIX_COLS 15 + +// ROWS: Top to bottom, COLS: Left to right + +#define MATRIX_ROW_PINS { B0, B1, B2, B3, B7 } +#define MATRIX_COL_PINS { D2, D3, C6, C7, D5, D4, D7, B4, B5, B6, F7, F6, F5, F4, F1 } +#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/3dp660/info.json b/keyboards/handwired/3dp660/info.json new file mode 100644 index 000000000000..60afa1a7180f --- /dev/null +++ b/keyboards/handwired/3dp660/info.json @@ -0,0 +1,80 @@ +{ + "keyboard_name": "3dp660", + "url": "", + "maintainer": "qmk", + "width": 15, + "height": 5, + "layouts": { + "LAYOUT_66_ansi": { + + "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":"BKSP", "x":13, "y":0, "w":2}, + {"label":"Insert", "x":15.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":"Del", "x":15.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":"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.25}, + {"label":"Up", "x":14.5, "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, "w":1.25}, + {"label":"MO(1)", "x":11.25, "y":4}, + {"label":"CTRL", "x":12.25, "y":4, "w":1.25}, + {"label":"Left", "x":13.5, "y":4}, + {"label":"Down", "x":14.5, "y":4}, + {"label":"Right", "x":15.5, "y":4} + ] + } + } +} diff --git a/keyboards/handwired/3dp660/keymaps/default/keymap.c b/keyboards/handwired/3dp660/keymaps/default/keymap.c new file mode 100644 index 000000000000..e9eee115eba1 --- /dev/null +++ b/keyboards/handwired/3dp660/keymaps/default/keymap.c @@ -0,0 +1,34 @@ + /* Copyright 2020 gooberpsycho + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public 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_66_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_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, + 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_66_ansi( + 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_VOLU, + KC_TRNS, KC_TRNS, KC_TRNS, KC_MPLY, KC_TRNS, KC_TRNS, KC_TRNS, KC_MPRV, KC_VOLD, KC_MNXT + ), +}; diff --git a/keyboards/handwired/3dp660/keymaps/via/keymap.c b/keyboards/handwired/3dp660/keymaps/via/keymap.c new file mode 100644 index 000000000000..b39eabe49f19 --- /dev/null +++ b/keyboards/handwired/3dp660/keymaps/via/keymap.c @@ -0,0 +1,48 @@ + /* Copyright 2020 gooberpsycho + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public 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_66_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_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, + 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_66_ansi( + 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_VOLU, + KC_TRNS, KC_TRNS, KC_TRNS, KC_MPLY, KC_TRNS, KC_TRNS, KC_TRNS, KC_MPRV, KC_VOLD, KC_MNXT + ), + [2] = LAYOUT_66_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 + ), + [3] = LAYOUT_66_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 + ) +}; diff --git a/keyboards/handwired/3dp660/keymaps/via/rules.mk b/keyboards/handwired/3dp660/keymaps/via/rules.mk new file mode 100644 index 000000000000..1e5b99807cb7 --- /dev/null +++ b/keyboards/handwired/3dp660/keymaps/via/rules.mk @@ -0,0 +1 @@ +VIA_ENABLE = yes diff --git a/keyboards/handwired/3dp660/readme.md b/keyboards/handwired/3dp660/readme.md new file mode 100644 index 000000000000..dfece8ed46d1 --- /dev/null +++ b/keyboards/handwired/3dp660/readme.md @@ -0,0 +1,24 @@ +# 3dp660 + +![](https://i.imgur.com/KWyU57el.jpg) + +### Teensy 2.0 Pinout +| rows | 0 | 1 | 2 | 3 | 4 | +| --------------- | --- | --- | --- | --- | --- | +| Teensy/QMK pin | B0 | B1 | B2 | B3 | B7 | + +| columns | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | +| --------------- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | +| Teensy/QMK pin | D2 | D3 | C6 | C7 | D5 | D4 | D7 | B4 | B5 | B6 | F7 | F6 | F5 | F4 | F1 | + + +Make example for this keyboard (after setting up your build environment): + + make handwired/3dp660:default + +**Reset Key:** Hold down the key located at `k00`, commonly programmed as Escape while plugging in the keyboard. + +* Keyboard Maintainer: [gooberpsycho](https://github.com/gooberpsycho) +* Hardware Availability: [Casefile](https://www.thingiverse.com/thing:2897260) + +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/3dp660/rules.mk b/keyboards/handwired/3dp660/rules.mk new file mode 100644 index 000000000000..d97f13a39d8e --- /dev/null +++ b/keyboards/handwired/3dp660/rules.mk @@ -0,0 +1,23 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +BOOTLOADER = halfkay + +# 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 = yes # USB Nkey Rollover +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +BLUETOOTH_ENABLE = no # Enable Bluetooth +AUDIO_ENABLE = no # Audio output +LTO_ENABLE = yes From ec7ce15c111b14c04b826a7adad1ea089cc18be0 Mon Sep 17 00:00:00 2001 From: Sendy YK <69058604+mrsendyyk@users.noreply.github.com> Date: Thu, 24 Sep 2020 09:34:22 +0700 Subject: [PATCH 873/930] Add ai03/soyuz VIA Support (#10336) * Add ai03/soyuz:via * Update config.h * Update keymap.c * Revert "Update keymap.c" This reverts commit e3766b3b603aecca82b337e5ae8d5613f47526d6. * Update keymap.c * Update keymap.c * Update keyboards/ai03/soyuz/config.h --- keyboards/ai03/soyuz/config.h | 79 +---------------------- keyboards/ai03/soyuz/keymaps/via/keymap.c | 59 +++++++++++++++++ keyboards/ai03/soyuz/keymaps/via/rules.mk | 1 + 3 files changed, 61 insertions(+), 78 deletions(-) create mode 100644 keyboards/ai03/soyuz/keymaps/via/keymap.c create mode 100644 keyboards/ai03/soyuz/keymaps/via/rules.mk diff --git a/keyboards/ai03/soyuz/config.h b/keyboards/ai03/soyuz/config.h index 213b6509b4d4..feb55107c3f3 100644 --- a/keyboards/ai03/soyuz/config.h +++ b/keyboards/ai03/soyuz/config.h @@ -21,11 +21,10 @@ along with this program. If not, see . /* USB Device descriptor parameter */ #define VENDOR_ID 0xA103 -#define PRODUCT_ID 0x0004 +#define PRODUCT_ID 0x0018 #define DEVICE_VER 0x0001 #define MANUFACTURER ai03 Design Studio #define PRODUCT Soyuz -#define DESCRIPTION Single-PCB Numpad Kit /* key matrix size */ #define MATRIX_ROWS 5 @@ -118,59 +117,6 @@ along with this program. If not, see . */ //#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. @@ -189,29 +135,6 @@ along with this program. If not, see . //#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 0 diff --git a/keyboards/ai03/soyuz/keymaps/via/keymap.c b/keyboards/ai03/soyuz/keymaps/via/keymap.c new file mode 100644 index 000000000000..9b62ca21725d --- /dev/null +++ b/keyboards/ai03/soyuz/keymaps/via/keymap.c @@ -0,0 +1,59 @@ +/* Copyright (C) 2020 Sendy YK (https://mr.sendyyk.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 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public 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, // Default Layer + _FN, // Fn Layer 1 + _FN2, // Fn Layer 2 + _FN3 // Fn Layer 3 +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + // Default Layer + [_BASE] = LAYOUT_ortho_5x4( + 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 + ), + // Fn Layer 1 + [_FN] = LAYOUT_ortho_5x4( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + 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 Layer 2 + [_FN2] = LAYOUT_ortho_5x4( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + 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 Layer 3 + [_FN3] = LAYOUT_ortho_5x4( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + 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/ai03/soyuz/keymaps/via/rules.mk b/keyboards/ai03/soyuz/keymaps/via/rules.mk new file mode 100644 index 000000000000..1e5b99807cb7 --- /dev/null +++ b/keyboards/ai03/soyuz/keymaps/via/rules.mk @@ -0,0 +1 @@ +VIA_ENABLE = yes From 860deb774e1c30188d11640a01e537cd3e4a07dd Mon Sep 17 00:00:00 2001 From: QMK Bot Date: Thu, 24 Sep 2020 02:35:14 +0000 Subject: [PATCH 874/930] format code according to conventions [skip ci] --- keyboards/handwired/3dp660/3dp660.c | 34 +++--- keyboards/handwired/3dp660/info.json | 160 +++++++++++++-------------- 2 files changed, 97 insertions(+), 97 deletions(-) diff --git a/keyboards/handwired/3dp660/3dp660.c b/keyboards/handwired/3dp660/3dp660.c index 383f88129c49..3f655d359f5f 100644 --- a/keyboards/handwired/3dp660/3dp660.c +++ b/keyboards/handwired/3dp660/3dp660.c @@ -1,17 +1,17 @@ - /* Copyright 2020 gooberpsycho - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -#include "3dp660.h" + /* Copyright 2020 gooberpsycho + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#include "3dp660.h" diff --git a/keyboards/handwired/3dp660/info.json b/keyboards/handwired/3dp660/info.json index 60afa1a7180f..5b7825088519 100644 --- a/keyboards/handwired/3dp660/info.json +++ b/keyboards/handwired/3dp660/info.json @@ -1,80 +1,80 @@ -{ - "keyboard_name": "3dp660", - "url": "", - "maintainer": "qmk", - "width": 15, - "height": 5, - "layouts": { - "LAYOUT_66_ansi": { - - "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":"BKSP", "x":13, "y":0, "w":2}, - {"label":"Insert", "x":15.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":"Del", "x":15.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":"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.25}, - {"label":"Up", "x":14.5, "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, "w":1.25}, - {"label":"MO(1)", "x":11.25, "y":4}, - {"label":"CTRL", "x":12.25, "y":4, "w":1.25}, - {"label":"Left", "x":13.5, "y":4}, - {"label":"Down", "x":14.5, "y":4}, - {"label":"Right", "x":15.5, "y":4} - ] - } - } -} +{ + "keyboard_name": "3dp660", + "url": "", + "maintainer": "qmk", + "width": 15, + "height": 5, + "layouts": { + "LAYOUT_66_ansi": { + + "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":"BKSP", "x":13, "y":0, "w":2}, + {"label":"Insert", "x":15.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":"Del", "x":15.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":"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.25}, + {"label":"Up", "x":14.5, "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, "w":1.25}, + {"label":"MO(1)", "x":11.25, "y":4}, + {"label":"CTRL", "x":12.25, "y":4, "w":1.25}, + {"label":"Left", "x":13.5, "y":4}, + {"label":"Down", "x":14.5, "y":4}, + {"label":"Right", "x":15.5, "y":4} + ] + } + } +} From cd64425fdddbc5fd46f8ce3e0516dc320102905f Mon Sep 17 00:00:00 2001 From: MechMerlin <30334081+mechmerlin@users.noreply.github.com> Date: Wed, 23 Sep 2020 20:53:08 -0700 Subject: [PATCH 875/930] VIA Support: Gray Studio HB85 (#10329) * edit vid and pid * add VIA keymap * add my name to the readme * Update keyboards/gray_studio/hb85/keymaps/via/config.h * we have a third endpoint, no need to disable mousekeys * Update keyboards/gray_studio/hb85/keymaps/via/keymap.c * add license header --- keyboards/gray_studio/hb85/config.h | 4 +- .../gray_studio/hb85/keymaps/via/config.h | 20 +++++++ .../gray_studio/hb85/keymaps/via/keymap.c | 56 +++++++++++++++++++ .../gray_studio/hb85/keymaps/via/rules.mk | 2 + keyboards/gray_studio/hb85/readme.md | 2 +- 5 files changed, 81 insertions(+), 3 deletions(-) create mode 100644 keyboards/gray_studio/hb85/keymaps/via/config.h create mode 100644 keyboards/gray_studio/hb85/keymaps/via/keymap.c create mode 100644 keyboards/gray_studio/hb85/keymaps/via/rules.mk diff --git a/keyboards/gray_studio/hb85/config.h b/keyboards/gray_studio/hb85/config.h index f3fb20ec6b39..9309012a4105 100644 --- a/keyboards/gray_studio/hb85/config.h +++ b/keyboards/gray_studio/hb85/config.h @@ -17,8 +17,8 @@ along with this program. If not, see . #pragma once -#define VENDOR_ID 0x20A0 -#define PRODUCT_ID 0x422F +#define VENDOR_ID 0x4753 +#define PRODUCT_ID 0x2000 #define DEVICE_VER 0x0200 #define MANUFACTURER Gray Studio #define PRODUCT HB85 diff --git a/keyboards/gray_studio/hb85/keymaps/via/config.h b/keyboards/gray_studio/hb85/keymaps/via/config.h new file mode 100644 index 000000000000..c81bd53bb7f5 --- /dev/null +++ b/keyboards/gray_studio/hb85/keymaps/via/config.h @@ -0,0 +1,20 @@ +/* +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 + +#define DYNAMIC_KEYMAP_LAYER_COUNT 3 diff --git a/keyboards/gray_studio/hb85/keymaps/via/keymap.c b/keyboards/gray_studio/hb85/keymaps/via/keymap.c new file mode 100644 index 000000000000..febf4715b8df --- /dev/null +++ b/keyboards/gray_studio/hb85/keymaps/via/keymap.c @@ -0,0 +1,56 @@ +/* +Copyright 2019 Felipe Coury + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public 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_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_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_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_LSFT, KC_NO , KC_Z , KC_Z , KC_X , 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_LCTL, KC_LALT, KC_SPC , KC_RALT, KC_RGUI, KC_LEFT, KC_DOWN, KC_RGHT, KC_P0 , KC_PDOT + ), + + [1] = LAYOUT_all( + RESET , _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, +_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, +_______, 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/hb85/keymaps/via/rules.mk b/keyboards/gray_studio/hb85/keymaps/via/rules.mk new file mode 100644 index 000000000000..36b7ba9cbc98 --- /dev/null +++ b/keyboards/gray_studio/hb85/keymaps/via/rules.mk @@ -0,0 +1,2 @@ +VIA_ENABLE = yes +LTO_ENABLE = yes diff --git a/keyboards/gray_studio/hb85/readme.md b/keyboards/gray_studio/hb85/readme.md index 7e39f327c154..523f774c83da 100644 --- a/keyboards/gray_studio/hb85/readme.md +++ b/keyboards/gray_studio/hb85/readme.md @@ -4,7 +4,7 @@ A Sony HitBit MSX Computer inspired Keyboard. -* Keyboard Maintainer: [Felipe Coury](https://github.com/fcoury) +* Keyboard Maintainer: [Felipe Coury](https://github.com/fcoury), [MechMerlin](https://github.com/mechmerlin) * Hardware Supported: Gray Studio HB85 * Hardware Availability: [Group buy](https://en.zfrontier.com/products/gray-hb85) finished From 9c596c1c5bcdc1e3912167fec19d8653b12508f0 Mon Sep 17 00:00:00 2001 From: George Mao Date: Wed, 23 Sep 2020 21:10:40 -0700 Subject: [PATCH 876/930] Adding Bear 65 Ergo Keyboard To QMK (#10384) Co-authored-by: Drashna Jaelre Co-authored-by: James Young <18669334+noroadsleft@users.noreply.github.com> --- keyboards/bear_65/bear_65.c | 17 +++++ keyboards/bear_65/bear_65.h | 46 +++++++++++++ keyboards/bear_65/config.h | 76 +++++++++++++++++++++ keyboards/bear_65/info.json | 15 ++++ keyboards/bear_65/keymaps/default/keymap.c | 39 +++++++++++ keyboards/bear_65/keymaps/default/readme.md | 1 + keyboards/bear_65/keymaps/via/keymap.c | 47 +++++++++++++ keyboards/bear_65/keymaps/via/readme.md | 1 + keyboards/bear_65/keymaps/via/rules.mk | 1 + keyboards/bear_65/readme.md | 19 ++++++ keyboards/bear_65/rules.mk | 24 +++++++ 11 files changed, 286 insertions(+) create mode 100644 keyboards/bear_65/bear_65.c create mode 100644 keyboards/bear_65/bear_65.h create mode 100644 keyboards/bear_65/config.h create mode 100644 keyboards/bear_65/info.json create mode 100644 keyboards/bear_65/keymaps/default/keymap.c create mode 100644 keyboards/bear_65/keymaps/default/readme.md create mode 100644 keyboards/bear_65/keymaps/via/keymap.c create mode 100644 keyboards/bear_65/keymaps/via/readme.md create mode 100644 keyboards/bear_65/keymaps/via/rules.mk create mode 100644 keyboards/bear_65/readme.md create mode 100644 keyboards/bear_65/rules.mk diff --git a/keyboards/bear_65/bear_65.c b/keyboards/bear_65/bear_65.c new file mode 100644 index 000000000000..a2ae572b82da --- /dev/null +++ b/keyboards/bear_65/bear_65.c @@ -0,0 +1,17 @@ +/* Copyright 2020 MudkipMao + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#include "bear_65.h" diff --git a/keyboards/bear_65/bear_65.h b/keyboards/bear_65/bear_65.h new file mode 100644 index 000000000000..94ec89c889db --- /dev/null +++ b/keyboards/bear_65/bear_65.h @@ -0,0 +1,46 @@ +/* Copyright 2020 MudkipMao + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License 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( \ + K31, K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, K4E, \ + 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, K2D, \ + K30, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E, \ + K40, K43, K45, K46, K48, 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, K1E }, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, KC_NO, K2D, K2E }, \ + { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E }, \ + { K40, KC_NO, KC_NO, K43, KC_NO, K45, K46, KC_NO, K48, KC_NO, K4A, K4B, K4C, K4D, K4E }, \ +} + +#define LAYOUT_full_bs( \ + K31, K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K4E, \ + 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, K2D, \ + K30, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E, \ + K40, K43, K45, K46, K48, K4A, K4B, K4C, K4D \ +) { \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, KC_NO }, \ + { 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, KC_NO, K2D, K2E }, \ + { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E }, \ + { K40, KC_NO, KC_NO, K43, KC_NO, K45, K46, KC_NO, K48, KC_NO, K4A, K4B, K4C, K4D, K4E }, \ +} diff --git a/keyboards/bear_65/config.h b/keyboards/bear_65/config.h new file mode 100644 index 000000000000..1b7524f074bb --- /dev/null +++ b/keyboards/bear_65/config.h @@ -0,0 +1,76 @@ +/* +Copyright 2020 MudkipMao + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License 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 0xA13B // Jacky's vendor ID, arbitrarily selected by MudkipMao +#define PRODUCT_ID 0x000A +#define DEVICE_VER 0x0001 +#define MANUFACTURER Jacky +#define PRODUCT Jacky Bear 65 Ergo + +/* 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 { B0, B1, B2, B3, B7 } +#define MATRIX_COL_PINS { D0, D1, D2, D3, D5, D4, D6, D7, B4, F7, F6, F5, F4, F1, F0 } + +/* Setting the matrix value of top left key for bootmagic lite */ +#define BOOTMAGIC_LITE_ROW 3 +#define BOOTMAGIC_LITE_COLUMN 1 + +#define DIODE_DIRECTION ROW2COL + +#define BACKLIGHT_PIN B6 +#define BACKLIGHT_BREATHING +#define BACKLIGHT_LEVELS 4 + +#define RGB_DI_PIN E2 +#ifdef RGB_DI_PIN + #define RGBLED_NUM 15 + #define RGBLIGHT_HUE_STEP 8 + #define RGBLIGHT_SAT_STEP 8 + #define RGBLIGHT_VAL_STEP 8 + #define RGBLIGHT_LIMIT_VAL 139 /* 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 diff --git a/keyboards/bear_65/info.json b/keyboards/bear_65/info.json new file mode 100644 index 000000000000..67fc090af832 --- /dev/null +++ b/keyboards/bear_65/info.json @@ -0,0 +1,15 @@ +{ + "keyboard_name": "Bear 65", + "url": "https://qmk.fm/keyboards", + "maintainer": "qmk", + "width": 20.75, + "height": 5, + "layouts": { + "LAYOUT_all": { + "layout": [{"label":"Esc", "x":0.5, "y":0}, {"label":"~", "x":1.75, "y":0}, {"label":"!", "x":2.75, "y":0}, {"label":"@", "x":3.75, "y":0}, {"label":"#", "x":4.75, "y":0}, {"label":"$", "x":5.75, "y":0}, {"label":"%", "x":6.75, "y":0}, {"label":"^", "x":7.75, "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":"_", "x":15.25, "y":0}, {"label":"+", "x":16.25, "y":0}, {"label":"|", "x":17.25, "y":0}, {"label":"~", "x":18.25, "y":0}, {"label":"Del", "x":19.75, "y":0}, {"label":"PgUp", "x":0.25, "y":1}, {"label":"Tab", "x":1.75, "y":1, "w":1.5}, {"label":"Q", "x":3.25, "y":1}, {"label":"W", "x":4.25, "y":1}, {"label":"E", "x":5.25, "y":1}, {"label":"R", "x":6.25, "y":1}, {"label":"T", "x":7.25, "y":1}, {"label":"Y", "x":10.75, "y":1}, {"label":"U", "x":11.75, "y":1}, {"label":"I", "x":12.75, "y":1}, {"label":"O", "x":13.75, "y":1}, {"label":"P", "x":14.75, "y":1}, {"label":"{", "x":15.75, "y":1}, {"label":"}", "x":16.75, "y":1}, {"label":"Backspace", "x":17.75, "y":1, "w":1.5}, {"label":"PgDn", "x":0, "y":2}, {"label":"Caps Lock", "x":1.75, "y":2, "w":1.75}, {"label":"A", "x":3.5, "y":2}, {"label":"S", "x":4.5, "y":2}, {"label":"D", "x":5.5, "y":2}, {"label":"F", "x":6.5, "y":2}, {"label":"G", "x":7.5, "y":2}, {"label":"H", "x":11, "y":2}, {"label":"J", "x":12, "y":2}, {"label":"K", "x":13, "y":2}, {"label":"L", "x":14, "y":2}, {"label":":", "x":15, "y":2}, {"label":"\"", "x":16, "y":2}, {"label":"Enter", "x":17, "y":2, "w":2.25}, {"label":"Shift", "x":1.75, "y":3, "w":2.25}, {"label":"Z", "x":4, "y":3}, {"label":"X", "x":5, "y":3}, {"label":"C", "x":6, "y":3}, {"label":"V", "x":7, "y":3}, {"label":"B", "x":8, "y":3}, {"label":"B", "x":10.5, "y":3}, {"label":"N", "x":11.5, "y":3}, {"label":"M", "x":12.5, "y":3}, {"label":"<", "x":13.5, "y":3}, {"label":">", "x":14.5, "y":3}, {"label":"?", "x":15.5, "y":3}, {"label":"Shift", "x":16.5, "y":3, "w":1.75}, {"label":"Up", "x":18.25, "y":3}, {"label":"Ctrl", "x":1.75, "y":4, "w":1.5}, {"label":"Alt", "x":4.75, "y":4, "w":1.25}, {"x":6, "y":4, "w":2.25}, {"label":"Win", "x":8.25, "y":4}, {"x":10.5, "y":4, "w":2.75}, {"label":"Alt", "x":13.25, "y":4, "w":1.5}, {"label":"Left", "x":17.25, "y":4}, {"label":"Down", "x":18.25, "y":4}, {"label":"Right", "x":19.25, "y":4}] + }, + "LAYOUT_full_bs": { + "layout": [{"label":"Esc", "x":0.5, "y":0}, {"label":"~", "x":1.75, "y":0}, {"label":"!", "x":2.75, "y":0}, {"label":"@", "x":3.75, "y":0}, {"label":"#", "x":4.75, "y":0}, {"label":"$", "x":5.75, "y":0}, {"label":"%", "x":6.75, "y":0}, {"label":"^", "x":7.75, "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":"_", "x":15.25, "y":0}, {"label":"+", "x":16.25, "y":0}, {"label":"Backspace", "x":17.25, "y":0, "w":2}, {"label":"Del", "x":19.75, "y":0}, {"label":"PgUp", "x":0.25, "y":1}, {"label":"Tab", "x":1.75, "y":1, "w":1.5}, {"label":"Q", "x":3.25, "y":1}, {"label":"W", "x":4.25, "y":1}, {"label":"E", "x":5.25, "y":1}, {"label":"R", "x":6.25, "y":1}, {"label":"T", "x":7.25, "y":1}, {"label":"Y", "x":10.75, "y":1}, {"label":"U", "x":11.75, "y":1}, {"label":"I", "x":12.75, "y":1}, {"label":"O", "x":13.75, "y":1}, {"label":"P", "x":14.75, "y":1}, {"label":"{", "x":15.75, "y":1}, {"label":"}", "x":16.75, "y":1}, {"label":"|", "x":17.75, "y":1, "w":1.5}, {"label":"PgDn", "x":0, "y":2}, {"label":"Caps Lock", "x":1.75, "y":2, "w":1.75}, {"label":"A", "x":3.5, "y":2}, {"label":"S", "x":4.5, "y":2}, {"label":"D", "x":5.5, "y":2}, {"label":"F", "x":6.5, "y":2}, {"label":"G", "x":7.5, "y":2}, {"label":"H", "x":11, "y":2}, {"label":"J", "x":12, "y":2}, {"label":"K", "x":13, "y":2}, {"label":"L", "x":14, "y":2}, {"label":":", "x":15, "y":2}, {"label":"\"", "x":16, "y":2}, {"label":"Enter", "x":17, "y":2, "w":2.25}, {"label":"Shift", "x":1.75, "y":3, "w":2.25}, {"label":"Z", "x":4, "y":3}, {"label":"X", "x":5, "y":3}, {"label":"C", "x":6, "y":3}, {"label":"V", "x":7, "y":3}, {"label":"B", "x":8, "y":3}, {"label":"B", "x":10.5, "y":3}, {"label":"N", "x":11.5, "y":3}, {"label":"M", "x":12.5, "y":3}, {"label":"<", "x":13.5, "y":3}, {"label":">", "x":14.5, "y":3}, {"label":"?", "x":15.5, "y":3}, {"label":"Shift", "x":16.5, "y":3, "w":1.75}, {"label":"Up", "x":18.25, "y":3}, {"label":"Ctrl", "x":1.75, "y":4, "w":1.5}, {"label":"Alt", "x":4.75, "y":4, "w":1.25}, {"x":6, "y":4, "w":2.25}, {"label":"Win", "x":8.25, "y":4}, {"x":10.5, "y":4, "w":2.75}, {"label":"Alt", "x":13.25, "y":4, "w":1.5}, {"label":"Left", "x":17.25, "y":4}, {"label":"Down", "x":18.25, "y":4}, {"label":"Right", "x":19.25, "y":4}] + } + } +} diff --git a/keyboards/bear_65/keymaps/default/keymap.c b/keyboards/bear_65/keymaps/default/keymap.c new file mode 100644 index 000000000000..b7d5cdf61cc9 --- /dev/null +++ b/keyboards/bear_65/keymaps/default/keymap.c @@ -0,0 +1,39 @@ +/* Copyright 2020 MudkipMao + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public 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] = LAYOUT_all( + 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_GRV, 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_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_UP, + KC_LCTL, KC_LALT, KC_SPC, KC_LGUI, KC_SPC, MO(_FN), KC_LEFT, KC_DOWN, KC_RGHT + ), + [_FN] = 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_MOD, _______, KC_BRID, KC_BRIU, _______, _______, _______, _______, _______, _______, _______, _______, RGB_VAD, RGB_VAI, _______, + RGB_TOG, _______, KC_VOLD, KC_VOLU, KC_MUTE, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, KC_MPRV, KC_MPLY, KC_MNXT, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______,_______ + ) +}; diff --git a/keyboards/bear_65/keymaps/default/readme.md b/keyboards/bear_65/keymaps/default/readme.md new file mode 100644 index 000000000000..d51734855773 --- /dev/null +++ b/keyboards/bear_65/keymaps/default/readme.md @@ -0,0 +1 @@ +# The default keymap for bear_65 diff --git a/keyboards/bear_65/keymaps/via/keymap.c b/keyboards/bear_65/keymaps/via/keymap.c new file mode 100644 index 000000000000..2ddc5b43d8b7 --- /dev/null +++ b/keyboards/bear_65/keymaps/via/keymap.c @@ -0,0 +1,47 @@ +/* Copyright 2020 MudkipMao + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public 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_full_bs( + 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_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_UP, + KC_LCTL, KC_LALT, KC_SPC, KC_LGUI, KC_SPC, MO(1), KC_LEFT, KC_DOWN, KC_RGHT + ), + [1] = LAYOUT_full_bs( + 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_MOD, _______, KC_BRID, KC_BRIU, _______, _______, _______, _______, _______, _______, _______, _______, RGB_VAD, RGB_VAI, _______, + RGB_TOG, _______, KC_VOLD, KC_VOLU, KC_MUTE, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, KC_MPRV, KC_MPLY, KC_MNXT, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______,_______ + ), + [2] = LAYOUT_full_bs( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______,_______ + ), + [3] = LAYOUT_full_bs( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______,_______ + ) +}; diff --git a/keyboards/bear_65/keymaps/via/readme.md b/keyboards/bear_65/keymaps/via/readme.md new file mode 100644 index 000000000000..5cb67ab25f39 --- /dev/null +++ b/keyboards/bear_65/keymaps/via/readme.md @@ -0,0 +1 @@ +# The via keymap for bear_65 diff --git a/keyboards/bear_65/keymaps/via/rules.mk b/keyboards/bear_65/keymaps/via/rules.mk new file mode 100644 index 000000000000..1e5b99807cb7 --- /dev/null +++ b/keyboards/bear_65/keymaps/via/rules.mk @@ -0,0 +1 @@ +VIA_ENABLE = yes diff --git a/keyboards/bear_65/readme.md b/keyboards/bear_65/readme.md new file mode 100644 index 000000000000..44a5e95537e1 --- /dev/null +++ b/keyboards/bear_65/readme.md @@ -0,0 +1,19 @@ +# Bear 65 + +![Bear 65](https://i.imgur.com/W1sVP1Tl.jpg) + +A gasket-mounted 65% keyboard inspired by the [TGR Alice](https://github.com/qmk/qmk_firmware/tree/master/keyboards/tgr/alice). Designed and produced by [jacky](https://geekhack.org/index.php?action=profile;u=63864) from Geekhack. + +* Keyboard Maintainer: QMK Community +* Hardware Supported: Bear 65 +* Hardware Availability: The GB happened July 15th 2020, units are still in production + +Make example for this keyboard (after setting up your build environment): + + make bear_65:default + +Flashing example for this keyboard: + + make bear_65: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). diff --git a/keyboards/bear_65/rules.mk b/keyboards/bear_65/rules.mk new file mode 100644 index 000000000000..339c37c7ee03 --- /dev/null +++ b/keyboards/bear_65/rules.mk @@ -0,0 +1,24 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +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 +BLUETOOTH_ENABLE = no # Enable Bluetooth +AUDIO_ENABLE = no # Audio output + +LTO_ENABLE = yes # Use LTO flags to reduce firmware size From 086c9c714e0cf8b320d603c088e715dc199e6a39 Mon Sep 17 00:00:00 2001 From: Albert Dong Date: Wed, 23 Sep 2020 22:15:18 -0700 Subject: [PATCH 877/930] Add Wyvern Keyboard (#10378) Co-authored-by: James Young <18669334+noroadsleft@users.noreply.github.com> --- keyboards/mysticworks/wyvern/config.h | 46 ++ keyboards/mysticworks/wyvern/info.json | 477 ++++++++++++++++++ .../wyvern/keymaps/default/keymap.c | 33 ++ .../wyvern/keymaps/default/readme.md | 3 + .../mysticworks/wyvern/keymaps/via/keymap.c | 47 ++ .../mysticworks/wyvern/keymaps/via/readme.md | 3 + .../mysticworks/wyvern/keymaps/via/rules.mk | 2 + keyboards/mysticworks/wyvern/readme.md | 18 + keyboards/mysticworks/wyvern/rules.mk | 22 + keyboards/mysticworks/wyvern/wyvern.c | 17 + keyboards/mysticworks/wyvern/wyvern.h | 129 +++++ 11 files changed, 797 insertions(+) create mode 100644 keyboards/mysticworks/wyvern/config.h create mode 100644 keyboards/mysticworks/wyvern/info.json create mode 100644 keyboards/mysticworks/wyvern/keymaps/default/keymap.c create mode 100644 keyboards/mysticworks/wyvern/keymaps/default/readme.md create mode 100644 keyboards/mysticworks/wyvern/keymaps/via/keymap.c create mode 100644 keyboards/mysticworks/wyvern/keymaps/via/readme.md create mode 100644 keyboards/mysticworks/wyvern/keymaps/via/rules.mk create mode 100644 keyboards/mysticworks/wyvern/readme.md create mode 100644 keyboards/mysticworks/wyvern/rules.mk create mode 100644 keyboards/mysticworks/wyvern/wyvern.c create mode 100644 keyboards/mysticworks/wyvern/wyvern.h diff --git a/keyboards/mysticworks/wyvern/config.h b/keyboards/mysticworks/wyvern/config.h new file mode 100644 index 000000000000..82b4939fcf8d --- /dev/null +++ b/keyboards/mysticworks/wyvern/config.h @@ -0,0 +1,46 @@ +/* Copyright 2020 Albert Dong + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License 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 0x4D59 // "MY" - Mystic Works +#define PRODUCT_ID 0x0001 +#define DEVICE_VER 0x0001 +#define MANUFACTURER Mystic Works +#define PRODUCT Wyvern + +/* Key Matrix Size */ +#define MATRIX_ROWS 10 +#define MATRIX_COLS 10 + +/* Keyboard Matrix Assignments */ +#define MATRIX_ROW_PINS {D0,D1,D5,D3,F7,F6,F5,F4,F1,F0} +#define MATRIX_COL_PINS {E6,B0,D4,D6,D7,B4,B5,B6,C6,C7} +#define UNUSED_PINS {B7,D2} + +/* 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/mysticworks/wyvern/info.json b/keyboards/mysticworks/wyvern/info.json new file mode 100644 index 000000000000..ccf2e6d6e687 --- /dev/null +++ b/keyboards/mysticworks/wyvern/info.json @@ -0,0 +1,477 @@ +{ + "keyboard_name": "Wyvern", + "url": "https://mysticworks.xyz", + "maintainer": "mysticworks", + "width": 20.75, + "height": 5.25, + "layouts": { + "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.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.25, "y":0}, + {"x":11.25, "y":0}, + {"x":12.25, "y":0}, + {"x":13.25, "y":0}, + {"x":14.25, "y":0}, + {"x":15.25, "y":0}, + {"x":16.25, "y":0}, + {"x":17.25, "y":0}, + {"x":18.25, "y":0}, + {"x":19.75, "y":0}, + + {"x":0, "y":1}, + {"x":1, "y":1}, + {"x":2, "y":1}, + {"x":3, "y":1}, + {"x":4.25, "y":1, "w":1.5}, + {"x":5.75, "y":1}, + {"x":6.75, "y":1}, + {"x":7.75, "y":1}, + {"x":8.75, "y":1}, + {"x":9.75, "y":1}, + {"x":10.75, "y":1}, + {"x":11.75, "y":1}, + {"x":12.75, "y":1}, + {"x":13.75, "y":1}, + {"x":14.75, "y":1}, + {"x":15.75, "y":1}, + {"x":16.75, "y":1}, + {"x":17.75, "y":1, "w":1.5}, + {"x":19.75, "y":1}, + + {"x":0, "y":2}, + {"x":1, "y":2}, + {"x":2, "y":2}, + {"x":3, "y":2}, + {"x":4.25, "y":2, "w":1.75}, + {"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":12, "y":2}, + {"x":13, "y":2}, + {"x":14, "y":2}, + {"x":15, "y":2}, + {"x":16, "y":2}, + {"x":17, "y":2}, + {"x":18, "y":2, "w":1.25}, + {"x":19.75, "y":2}, + + {"x":0, "y":3}, + {"x":1, "y":3}, + {"x":2, "y":3}, + {"x":3, "y":3}, + {"x":4.25, "y":3, "w":1.25}, + {"x":5.5, "y":3}, + {"x":6.5, "y":3}, + {"x":7.5, "y":3}, + {"x":8.5, "y":3}, + {"x":9.5, "y":3}, + {"x":10.5, "y":3}, + {"x":11.5, "y":3}, + {"x":12.5, "y":3}, + {"x":13.5, "y":3}, + {"x":14.5, "y":3}, + {"x":15.5, "y":3}, + {"x":16.5, "y":3, "w":1.75}, + {"x":18.5, "y":3.25}, + {"x":19.75, "y":3}, + + {"x":0, "y":4}, + {"x":1, "y":4}, + {"x":2, "y":4}, + {"x":3, "y":4}, + {"x":4.25, "y":4, "w":1.25}, + {"x":5.5, "y":4, "w":1.25}, + {"x":6.75, "y":4, "w":1.25}, + {"x":8, "y":4, "w":6.25}, + {"x":14.25, "y":4, "w":1.5}, + {"x":15.75, "y":4, "w":1.5}, + {"x":17.5, "y":4.25}, + {"x":18.5, "y":4.25}, + {"x":19.5, "y":4.25} + ] + }, + "LAYOUT_ansi_numpad_right": { + "layout": [ + {"x":0, "y":0}, + {"x":1, "y":0}, + {"x":2, "y":0}, + {"x":3, "y":0}, + {"x":4.25, "y":0}, + {"x":5.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.25, "y":0}, + {"x":11.25, "y":0}, + {"x":12.25, "y":0}, + {"x":13.25, "y":0}, + {"x":14.25, "y":0}, + {"x":15.25, "y":0}, + {"x":16.25, "y":0}, + {"x":17.25, "y":0, "w":2}, + {"x":19.75, "y":0}, + + {"x":0, "y":1}, + {"x":1, "y":1}, + {"x":2, "y":1}, + {"x":3, "y":1, "h":2}, + {"x":4.25, "y":1, "w":1.5}, + {"x":5.75, "y":1}, + {"x":6.75, "y":1}, + {"x":7.75, "y":1}, + {"x":8.75, "y":1}, + {"x":9.75, "y":1}, + {"x":10.75, "y":1}, + {"x":11.75, "y":1}, + {"x":12.75, "y":1}, + {"x":13.75, "y":1}, + {"x":14.75, "y":1}, + {"x":15.75, "y":1}, + {"x":16.75, "y":1}, + {"x":17.75, "y":1, "w":1.5}, + {"x":19.75, "y":1}, + + {"x":0, "y":2}, + {"x":1, "y":2}, + {"x":2, "y":2}, + {"x":4.25, "y":2, "w":1.75}, + {"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":12, "y":2}, + {"x":13, "y":2}, + {"x":14, "y":2}, + {"x":15, "y":2}, + {"x":16, "y":2}, + {"x":17, "y":2, "w":2.25}, + {"x":19.75, "y":2}, + + {"x":0, "y":3}, + {"x":1, "y":3}, + {"x":2, "y":3}, + {"x":3, "y":3, "h":2}, + {"x":4.25, "y":3, "w":2.25}, + {"x":6.5, "y":3}, + {"x":7.5, "y":3}, + {"x":8.5, "y":3}, + {"x":9.5, "y":3}, + {"x":10.5, "y":3}, + {"x":11.5, "y":3}, + {"x":12.5, "y":3}, + {"x":13.5, "y":3}, + {"x":14.5, "y":3}, + {"x":15.5, "y":3}, + {"x":16.5, "y":3, "w":1.75}, + {"x":18.5, "y":3.25}, + {"x":19.75, "y":3}, + + {"x":0, "y":4, "w":2}, + {"x":2, "y":4}, + {"x":4.25, "y":4, "w":1.25}, + {"x":5.5, "y":4, "w":1.25}, + {"x":6.75, "y":4, "w":1.25}, + {"x":8, "y":4, "w":6.25}, + {"x":14.25, "y":4, "w":1.5}, + {"x":15.75, "y":4, "w":1.5}, + {"x":17.5, "y":4.25}, + {"x":18.5, "y":4.25}, + {"x":19.5, "y":4.25} + ] + }, + "LAYOUT_ansi_numpad_left": { + "layout": [ + {"x":0, "y":0}, + {"x":1, "y":0}, + {"x":2, "y":0}, + {"x":3, "y":0}, + {"x":4.25, "y":0}, + {"x":5.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.25, "y":0}, + {"x":11.25, "y":0}, + {"x":12.25, "y":0}, + {"x":13.25, "y":0}, + {"x":14.25, "y":0}, + {"x":15.25, "y":0}, + {"x":16.25, "y":0}, + {"x":17.25, "y":0, "w":2}, + {"x":19.75, "y":0}, + + {"x":0, "y":1, "h":2}, + {"x":1, "y":1}, + {"x":2, "y":1}, + {"x":3, "y":1}, + {"x":4.25, "y":1, "w":1.5}, + {"x":5.75, "y":1}, + {"x":6.75, "y":1}, + {"x":7.75, "y":1}, + {"x":8.75, "y":1}, + {"x":9.75, "y":1}, + {"x":10.75, "y":1}, + {"x":11.75, "y":1}, + {"x":12.75, "y":1}, + {"x":13.75, "y":1}, + {"x":14.75, "y":1}, + {"x":15.75, "y":1}, + {"x":16.75, "y":1}, + {"x":17.75, "y":1, "w":1.5}, + {"x":19.75, "y":1}, + + {"x":1, "y":2}, + {"x":2, "y":2}, + {"x":3, "y":2}, + {"x":4.25, "y":2, "w":1.75}, + {"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":12, "y":2}, + {"x":13, "y":2}, + {"x":14, "y":2}, + {"x":15, "y":2}, + {"x":16, "y":2}, + {"x":17, "y":2, "w":2.25}, + {"x":19.75, "y":2}, + + {"x":0, "y":3, "h":2}, + {"x":1, "y":3}, + {"x":2, "y":3}, + {"x":3, "y":3}, + {"x":4.25, "y":3, "w":2.25}, + {"x":6.5, "y":3}, + {"x":7.5, "y":3}, + {"x":8.5, "y":3}, + {"x":9.5, "y":3}, + {"x":10.5, "y":3}, + {"x":11.5, "y":3}, + {"x":12.5, "y":3}, + {"x":13.5, "y":3}, + {"x":14.5, "y":3}, + {"x":15.5, "y":3}, + {"x":16.5, "y":3, "w":1.75}, + {"x":18.5, "y":3.25}, + {"x":19.75, "y":3}, + + {"x":1, "y":4}, + {"x":2, "y":4, "w":2}, + {"x":4.25, "y":4, "w":1.25}, + {"x":5.5, "y":4, "w":1.25}, + {"x":6.75, "y":4, "w":1.25}, + {"x":8, "y":4, "w":6.25}, + {"x":14.25, "y":4, "w":1.5}, + {"x":15.75, "y":4, "w":1.5}, + {"x":17.5, "y":4.25}, + {"x":18.5, "y":4.25}, + {"x":19.5, "y":4.25} + ] + }, + "LAYOUT_iso_numpad_right": { + "layout": [ + {"x":0, "y":0}, + {"x":1, "y":0}, + {"x":2, "y":0}, + {"x":3, "y":0}, + {"x":4.25, "y":0}, + {"x":5.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.25, "y":0}, + {"x":11.25, "y":0}, + {"x":12.25, "y":0}, + {"x":13.25, "y":0}, + {"x":14.25, "y":0}, + {"x":15.25, "y":0}, + {"x":16.25, "y":0}, + {"x":17.25, "y":0, "w":2}, + {"x":19.75, "y":0}, + + {"x":0, "y":1}, + {"x":1, "y":1}, + {"x":2, "y":1}, + {"x":3, "y":1, "h":2}, + {"x":4.25, "y":1, "w":1.5}, + {"x":5.75, "y":1}, + {"x":6.75, "y":1}, + {"x":7.75, "y":1}, + {"x":8.75, "y":1}, + {"x":9.75, "y":1}, + {"x":10.75, "y":1}, + {"x":11.75, "y":1}, + {"x":12.75, "y":1}, + {"x":13.75, "y":1}, + {"x":14.75, "y":1}, + {"x":15.75, "y":1}, + {"x":16.75, "y":1}, + {"x":19.75, "y":1}, + + {"x":0, "y":2}, + {"x":1, "y":2}, + {"x":2, "y":2}, + {"x":4.25, "y":2, "w":1.75}, + {"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":12, "y":2}, + {"x":13, "y":2}, + {"x":14, "y":2}, + {"x":15, "y":2}, + {"x":16, "y":2}, + {"x":17, "y":2}, + {"x":18, "y":1, "w":1.25, "h":2}, + {"x":19.75, "y":2}, + + {"x":0, "y":3}, + {"x":1, "y":3}, + {"x":2, "y":3}, + {"x":3, "y":3, "h":2}, + {"x":4.25, "y":3, "w":1.25}, + {"x":5.5, "y":3}, + {"x":6.5, "y":3}, + {"x":7.5, "y":3}, + {"x":8.5, "y":3}, + {"x":9.5, "y":3}, + {"x":10.5, "y":3}, + {"x":11.5, "y":3}, + {"x":12.5, "y":3}, + {"x":13.5, "y":3}, + {"x":14.5, "y":3}, + {"x":15.5, "y":3}, + {"x":16.5, "y":3, "w":1.75}, + {"x":18.5, "y":3.25}, + {"x":19.75, "y":3}, + + {"x":0, "y":4, "w":2}, + {"x":2, "y":4}, + {"x":4.25, "y":4, "w":1.25}, + {"x":5.5, "y":4, "w":1.25}, + {"x":6.75, "y":4, "w":1.25}, + {"x":8, "y":4, "w":6.25}, + {"x":14.25, "y":4, "w":1.5}, + {"x":15.75, "y":4, "w":1.5}, + {"x":17.5, "y":4.25}, + {"x":18.5, "y":4.25}, + {"x":19.5, "y":4.25} + ] + }, + "LAYOUT_iso_numpad_left": { + "layout": [ + {"x":0, "y":0}, + {"x":1, "y":0}, + {"x":2, "y":0}, + {"x":3, "y":0}, + {"x":4.25, "y":0}, + {"x":5.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.25, "y":0}, + {"x":11.25, "y":0}, + {"x":12.25, "y":0}, + {"x":13.25, "y":0}, + {"x":14.25, "y":0}, + {"x":15.25, "y":0}, + {"x":16.25, "y":0}, + {"x":17.25, "y":0, "w":2}, + {"x":19.75, "y":0}, + + {"x":0, "y":1, "h":2}, + {"x":1, "y":1}, + {"x":2, "y":1}, + {"x":3, "y":1}, + {"x":4.25, "y":1, "w":1.5}, + {"x":5.75, "y":1}, + {"x":6.75, "y":1}, + {"x":7.75, "y":1}, + {"x":8.75, "y":1}, + {"x":9.75, "y":1}, + {"x":10.75, "y":1}, + {"x":11.75, "y":1}, + {"x":12.75, "y":1}, + {"x":13.75, "y":1}, + {"x":14.75, "y":1}, + {"x":15.75, "y":1}, + {"x":16.75, "y":1}, + {"x":19.75, "y":1}, + + {"x":1, "y":2}, + {"x":2, "y":2}, + {"x":3, "y":2}, + {"x":4.25, "y":2, "w":1.75}, + {"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":12, "y":2}, + {"x":13, "y":2}, + {"x":14, "y":2}, + {"x":15, "y":2}, + {"x":16, "y":2}, + {"x":17, "y":2}, + {"x":18, "y":1, "w":1.25, "h":2}, + {"x":19.75, "y":2}, + + {"x":0, "y":3, "h":2}, + {"x":1, "y":3}, + {"x":2, "y":3}, + {"x":3, "y":3}, + {"x":4.25, "y":3, "w":1.25}, + {"x":5.5, "y":3}, + {"x":6.5, "y":3}, + {"x":7.5, "y":3}, + {"x":8.5, "y":3}, + {"x":9.5, "y":3}, + {"x":10.5, "y":3}, + {"x":11.5, "y":3}, + {"x":12.5, "y":3}, + {"x":13.5, "y":3}, + {"x":14.5, "y":3}, + {"x":15.5, "y":3}, + {"x":16.5, "y":3, "w":1.75}, + {"x":18.5, "y":3.25}, + {"x":19.75, "y":3}, + + {"x":1, "y":4}, + {"x":2, "y":4, "w":2}, + {"x":4.25, "y":4, "w":1.25}, + {"x":5.5, "y":4, "w":1.25}, + {"x":6.75, "y":4, "w":1.25}, + {"x":8, "y":4, "w":6.25}, + {"x":14.25, "y":4, "w":1.5}, + {"x":15.75, "y":4, "w":1.5}, + {"x":17.5, "y":4.25}, + {"x":18.5, "y":4.25}, + {"x":19.5, "y":4.25} + ] + } + } +} \ No newline at end of file diff --git a/keyboards/mysticworks/wyvern/keymaps/default/keymap.c b/keyboards/mysticworks/wyvern/keymaps/default/keymap.c new file mode 100644 index 000000000000..9c927e7f2a38 --- /dev/null +++ b/keyboards/mysticworks/wyvern/keymaps/default/keymap.c @@ -0,0 +1,33 @@ +/* Copyright 2020 Albert Dong + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public 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_NLCK, KC_PSLS, KC_PAST, KC_PMNS, 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_BSPC, KC_DEL, + 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_PGUP, + 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_NUBS, KC_ENT, KC_PGDN, + KC_P1, KC_P2, KC_P3, KC_PENT, 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, MO(1), + KC_P0, KC_P0, KC_PDOT, KC_PENT, KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RCTL, 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, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), +}; \ No newline at end of file diff --git a/keyboards/mysticworks/wyvern/keymaps/default/readme.md b/keyboards/mysticworks/wyvern/keymaps/default/readme.md new file mode 100644 index 000000000000..1d4604ba5d7b --- /dev/null +++ b/keyboards/mysticworks/wyvern/keymaps/default/readme.md @@ -0,0 +1,3 @@ +# Wyvern Default Keymap + +Default keymap for Wyvern- Normal numpad, ANSI layout with 6.25u. F-keys on second layer. diff --git a/keyboards/mysticworks/wyvern/keymaps/via/keymap.c b/keyboards/mysticworks/wyvern/keymaps/via/keymap.c new file mode 100644 index 000000000000..d92fb562e298 --- /dev/null +++ b/keyboards/mysticworks/wyvern/keymaps/via/keymap.c @@ -0,0 +1,47 @@ +/* Copyright 2020 Albert Dong + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public 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_NLCK, KC_PSLS, KC_PAST, KC_PMNS, 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_BSPC, KC_DEL, + 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_PGUP, + 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_NUBS, KC_ENT, KC_PGDN, + KC_P1, KC_P2, KC_P3, KC_PENT, 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, MO(1), + KC_P0, KC_P0, KC_PDOT, KC_PENT, KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RCTL, 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, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + [2] = LAYOUT_all( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + [3] = LAYOUT_all( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), +}; \ No newline at end of file diff --git a/keyboards/mysticworks/wyvern/keymaps/via/readme.md b/keyboards/mysticworks/wyvern/keymaps/via/readme.md new file mode 100644 index 000000000000..02b3ae2a6efd --- /dev/null +++ b/keyboards/mysticworks/wyvern/keymaps/via/readme.md @@ -0,0 +1,3 @@ +# Wyvern VIA Keymap + +Keymap for VIA Configurator usage- supports all layouts possible. diff --git a/keyboards/mysticworks/wyvern/keymaps/via/rules.mk b/keyboards/mysticworks/wyvern/keymaps/via/rules.mk new file mode 100644 index 000000000000..36b7ba9cbc98 --- /dev/null +++ b/keyboards/mysticworks/wyvern/keymaps/via/rules.mk @@ -0,0 +1,2 @@ +VIA_ENABLE = yes +LTO_ENABLE = yes diff --git a/keyboards/mysticworks/wyvern/readme.md b/keyboards/mysticworks/wyvern/readme.md new file mode 100644 index 000000000000..6587d72bfd16 --- /dev/null +++ b/keyboards/mysticworks/wyvern/readme.md @@ -0,0 +1,18 @@ +# Wyvern + +A 65% + Southpaw Numpad designed and sold by [Mystic Works](https://mysticworks.xyz). + +## Support +* Keyboard Maintainer: [mysticworks](https://github.com/mysticworks) +* Hardware Supported: Wyvern +* Hardware Availability: Will be posted [here](https://mysticworks.xyz/) + +Make example for this keyboard (after setting up your build environment): + + make mysticworks/wyvern:default + +Flashing example for this keyboard: + + make mysticworks/wyvern: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). diff --git a/keyboards/mysticworks/wyvern/rules.mk b/keyboards/mysticworks/wyvern/rules.mk new file mode 100644 index 000000000000..6bd8b89327ed --- /dev/null +++ b/keyboards/mysticworks/wyvern/rules.mk @@ -0,0 +1,22 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +BOOTLOADER = qmk-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 +BLUETOOTH_ENABLE = no # Enable Bluetooth +AUDIO_ENABLE = no # Audio output diff --git a/keyboards/mysticworks/wyvern/wyvern.c b/keyboards/mysticworks/wyvern/wyvern.c new file mode 100644 index 000000000000..015fb5ff05c6 --- /dev/null +++ b/keyboards/mysticworks/wyvern/wyvern.c @@ -0,0 +1,17 @@ +/* Copyright 2020 Albert Dong + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#include "wyvern.h" + diff --git a/keyboards/mysticworks/wyvern/wyvern.h b/keyboards/mysticworks/wyvern/wyvern.h new file mode 100644 index 000000000000..ea5b4b305eac --- /dev/null +++ b/keyboards/mysticworks/wyvern/wyvern.h @@ -0,0 +1,129 @@ +/* Copyright 2020 Albert Dong + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License 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 XXX KC_NO + +#define LAYOUT_all( \ + k00, k10, k01, k11, k02, k12, k03, k13, k04, k14, k05, k15, k06, k16, k07, k17, k08, k18, k09, k19, \ + k20, k30, k21, k31, k22, k32, k23, k33, k24, k34, k25, k35, k26, k36, k27, k37, k28, k29, k39, \ + k40, k50, k41, k51, k42, k52, k43, k53, k44, k54, k45, k55, k46, k56, k47, k57, k58, k49, k59, \ + k60, k70, k61, k71, k62, k72, k63, k73, k64, k74, k65, k75, k66, k76, k67, k77, k68, k69, k79, \ + k80, k90, k81, k91, k82, k92, k83, k85, k87, k97, 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, XXX, k39 }, \ + { k40, k41, k42, k43, k44, k45, k46, k47, XXX, 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, XXX, k79 }, \ + { k80, k81, k82, k83, XXX, k85, XXX, k87, XXX, k89 }, \ + { k90, k91, k92, XXX, XXX, XXX, XXX, k97, k98, k99 } \ +} + +#define LAYOUT_ansi_numpad_right( \ + k00, k10, k01, k11, k02, k12, k03, k13, k04, k14, k05, k15, k06, k16, k07, k17, k08, k09, k19, \ + k20, k30, k21, k31, k22, k32, k23, k33, k24, k34, k25, k35, k26, k36, k27, k37, k28, k29, k39, \ + k40, k50, k41, k42, k52, k43, k53, k44, k54, k45, k55, k46, k56, k47, k57, k49, k59, \ + k60, k70, k61, k71, k62, k63, k73, k64, k74, k65, k75, k66, k76, k67, k77, k68, k69, k79, \ + k80, k81, k82, k92, k83, k85, k87, k97, k98, k89, k99 \ +) \ +{ \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09 }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, XXX, k19 }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29 }, \ + { k30, k31, k32, k33, k34, k35, k36, k37, XXX, k39 }, \ + { k40, k41, k42, k43, k44, k45, k46, k47, XXX, k49 }, \ + { k50, XXX, k52, k53, k54, k55, k56, k57, XXX, k59 }, \ + { k60, k61, k62, k63, k64, k65, k66, k67, k68, k69 }, \ + { k70, k71, k72, k73, k74, k75, k76, k77, XXX, k79 }, \ + { k80, k81, k82, k83, XXX, k85, XXX, k87, XXX, k89 }, \ + { XXX, XXX, k92, XXX, XXX, XXX, XXX, k97, k98, k99 } \ +} + +#define LAYOUT_ansi_numpad_left( \ + k00, k10, k01, k11, k02, k12, k03, k13, k04, k14, k05, k15, k06, k16, k07, k17, k08, k09, k19, \ + k20, k30, k21, k31, k22, k32, k23, k33, k24, k34, k25, k35, k26, k36, k27, k37, k28, k29, k39, \ + k50, k41, k51, k42, k52, k43, k53, k44, k54, k45, k55, k46, k56, k47, k57, k49, k59, \ + k60, k70, k61, k71, k62, k63, k73, k64, k74, k65, k75, k66, k76, k67, k77, k68, k69, k79, \ + k90, k91, k82, k92, k83, k85, k87, k97, k98, k89, k99 \ +) \ +{ \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09 }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, XXX, k19 }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29 }, \ + { k30, k31, k32, k33, k34, k35, k36, k37, XXX, k39 }, \ + { XXX, k41, k42, k43, k44, k45, k46, k47, XXX, k49 }, \ + { k50, k51, k52, k53, k54, k55, k56, k57, XXX, k59 }, \ + { k60, k61, k62, k63, k64, k65, k66, k67, k68, k69 }, \ + { k70, k71, XXX, k73, k74, k75, k76, k77, XXX, k79 }, \ + { XXX, XXX, k82, k83, XXX, k85, XXX, k87, XXX, k89 }, \ + { k90, k91, k92, XXX, XXX, XXX, XXX, k97, k98, k99 } \ +} + +#define LAYOUT_iso_numpad_right( \ + k00, k10, k01, k11, k02, k12, k03, k13, k04, k14, k05, k15, k06, k16, k07, k17, k08, k09, k19, \ + k20, k30, k21, k31, k22, k32, k23, k33, k24, k34, k25, k35, k26, k36, k27, k37, k28, k39, \ + k40, k50, k41, k42, k52, k43, k53, k44, k54, k45, k55, k46, k56, k47, k57, k58, k49, k59, \ + k60, k70, k61, k71, k62, k72, k63, k73, k64, k74, k65, k75, k66, k76, k67, k77, k68, k69, k79, \ + k80, k81, k82, k92, k83, k85, k87, k97, k98, k89, k99 \ +) \ +{ \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09 }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, XXX, k19 }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, XXX }, \ + { k30, k31, k32, k33, k34, k35, k36, k37, XXX, k39 }, \ + { k40, k41, k42, k43, k44, k45, k46, k47, XXX, k49 }, \ + { k50, XXX, 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, XXX, k79 }, \ + { k80, k81, k82, k83, XXX, k85, XXX, k87, XXX, k89 }, \ + { XXX, XXX, k92, XXX, XXX, XXX, XXX, k97, k98, k99 } \ +} + +#define LAYOUT_iso_numpad_left( \ + k00, k10, k01, k11, k02, k12, k03, k13, k04, k14, k05, k15, k06, k16, k07, k17, k08, k09, k19, \ + k20, k30, k21, k31, k22, k32, k23, k33, k24, k34, k25, k35, k26, k36, k27, k37, k28, k39, \ + k50, k41, k51, k42, k52, k43, k53, k44, k54, k45, k55, k46, k56, k47, k57, k58, k49, k59, \ + k60, k70, k61, k71, k62, k72, k63, k73, k64, k74, k65, k75, k66, k76, k67, k77, k68, k69, k79, \ + k90, k91, k82, k92, k83, k85, k87, k97, k98, k89, k99 \ +) \ +{ \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09 }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, XXX, k19 }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, XXX }, \ + { k30, k31, k32, k33, k34, k35, k36, k37, XXX, k39 }, \ + { XXX, k41, k42, k43, k44, k45, k46, k47, XXX, 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, XXX, k79 }, \ + { XXX, XXX, k82, k83, XXX, k85, XXX, k87, XXX, k89 }, \ + { k90, k91, k92, XXX, XXX, XXX, XXX, k97, k98, k99 } \ +} From 5f23f2121664cb84678c305de12497defecf6d7e Mon Sep 17 00:00:00 2001 From: Ryan Date: Thu, 24 Sep 2020 15:16:00 +1000 Subject: [PATCH 878/930] CLI/Doctor: Print QMK_HOME (#10398) --- lib/python/qmk/cli/doctor.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/python/qmk/cli/doctor.py b/lib/python/qmk/cli/doctor.py index 4d7ba52181da..920615396e18 100755 --- a/lib/python/qmk/cli/doctor.py +++ b/lib/python/qmk/cli/doctor.py @@ -10,6 +10,7 @@ from milc import cli from qmk import submodules +from qmk.constants import QMK_FIRMWARE from qmk.questions import yesno from qmk.commands import run @@ -291,6 +292,8 @@ def doctor(cli): cli.log.error('Unsupported OS detected: %s', platform_id) ok = False + cli.log.info('QMK home: {fg_cyan}%s', QMK_FIRMWARE) + # Make sure the basic CLI tools we need are available and can be executed. bin_ok = check_binaries() From 4511201d809fca8777bff9f7bcbc89e260fd73b4 Mon Sep 17 00:00:00 2001 From: Felix Jen Date: Thu, 24 Sep 2020 01:55:59 -0500 Subject: [PATCH 879/930] [Keyboard] added Bolsa65 keyboard by FJLabs (#10394) * Modifed for BKS65 * Added test board * attempts * Working compile * updated rules for processor frequency and documented * Disabed some deprecated features * Removed extraneous code * remove test code * Renamed board * LED and layer code * Added via support * Update keyboards/fjlabs/bolsa65/bolsa65.c Fixed indentation as suggested. * Update keyboards/fjlabs/bolsa65/config.h Removed extraneous defaults * Update keyboards/fjlabs/bolsa65/keymaps/default/keymap.c Different layer enumeration method * Update keyboards/fjlabs/bolsa65/keymaps/via/keymap.c New layer enumeration method. * Update keyboards/fjlabs/bolsa65/config.h Removed extraneous description. * Update keyboards/fjlabs/bolsa65/keymaps/via/rules.mk Removed extraneous bootmagic * Update keyboards/fjlabs/bolsa65/rules.mk Updated rules * Update keyboards/fjlabs/bolsa65/readme.md Markdown list formatting * Update keyboards/fjlabs/bolsa65/bolsa65.h Changed layout name * Update keyboards/fjlabs/bolsa65/info.json Changed layout name * Update keyboards/fjlabs/bolsa65/keymaps/via/keymap.c Changed Layout name * Update keyboards/fjlabs/bolsa65/keymaps/via/keymap.c Change layout name * Changed layout names * Updated readme to reflect new keyboard name * Update keyboards/fjlabs/bolsa65/config.h Removed extraneous code * Added license file header * Removed VSCode folder * Update keyboards/fjlabs/bolsa65/keymaps/via/keymap.c * Update keyboards/fjlabs/bolsa65/info.json * Update keyboards/fjlabs/bolsa65/keymaps/via/keymap.c --- keyboards/fjlabs/bolsa65/bolsa65.c | 28 +++++ keyboards/fjlabs/bolsa65/bolsa65.h | 32 ++++++ keyboards/fjlabs/bolsa65/config.h | 108 ++++++++++++++++++ keyboards/fjlabs/bolsa65/info.json | 84 ++++++++++++++ .../fjlabs/bolsa65/keymaps/default/keymap.c | 39 +++++++ keyboards/fjlabs/bolsa65/keymaps/via/keymap.c | 58 ++++++++++ keyboards/fjlabs/bolsa65/keymaps/via/rules.mk | 1 + keyboards/fjlabs/bolsa65/readme.md | 12 ++ keyboards/fjlabs/bolsa65/rules.mk | 28 +++++ 9 files changed, 390 insertions(+) create mode 100644 keyboards/fjlabs/bolsa65/bolsa65.c create mode 100644 keyboards/fjlabs/bolsa65/bolsa65.h create mode 100644 keyboards/fjlabs/bolsa65/config.h create mode 100644 keyboards/fjlabs/bolsa65/info.json create mode 100644 keyboards/fjlabs/bolsa65/keymaps/default/keymap.c create mode 100644 keyboards/fjlabs/bolsa65/keymaps/via/keymap.c create mode 100644 keyboards/fjlabs/bolsa65/keymaps/via/rules.mk create mode 100644 keyboards/fjlabs/bolsa65/readme.md create mode 100644 keyboards/fjlabs/bolsa65/rules.mk diff --git a/keyboards/fjlabs/bolsa65/bolsa65.c b/keyboards/fjlabs/bolsa65/bolsa65.c new file mode 100644 index 000000000000..1d094ac8ebd7 --- /dev/null +++ b/keyboards/fjlabs/bolsa65/bolsa65.c @@ -0,0 +1,28 @@ +/* +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 "bolsa65.h" + +void matrix_init_kb(void) { + // Initialize indicator LEDs to output + setPinOutput(F7); // Caps + matrix_init_user(); +} + +bool led_update_kb(led_t led_state) { + bool res = led_update_user(led_state); + if(res) { + writePin(F7, led_state.caps_lock); + } + return res; +} diff --git a/keyboards/fjlabs/bolsa65/bolsa65.h b/keyboards/fjlabs/bolsa65/bolsa65.h new file mode 100644 index 000000000000..24325d0f195e --- /dev/null +++ b/keyboards/fjlabs/bolsa65/bolsa65.h @@ -0,0 +1,32 @@ +/* +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" + +/* Bolsa65 Keymap Definitions */ +#define LAYOUT_65_ansi_blocker( \ + 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, K2E, \ + K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3D, K3E, \ + K40, K41, K42, K44, 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, KC_NO, KC_NO, KC_NO, KC_NO, K49, K4A, KC_NO, K4C, K4D, K4E } \ +} diff --git a/keyboards/fjlabs/bolsa65/config.h b/keyboards/fjlabs/bolsa65/config.h new file mode 100644 index 000000000000..c38da97076a2 --- /dev/null +++ b/keyboards/fjlabs/bolsa65/config.h @@ -0,0 +1,108 @@ +/* +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 0x7074 // FJLabs +#define PRODUCT_ID 0x0001 // Bolsa65 +#define DEVICE_VER 0x0001 // Version 1 +#define MANUFACTURER FJLabs +#define PRODUCT bolsa65 + +/* 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) + * +*/ + +// Checked with Eagle Schematic +#define MATRIX_ROW_PINS { F1, F0, F6, F5, F4 } +#define MATRIX_COL_PINS { C7, B1, B2, B3, B7, D0, D1, D2, D3, D5, D4, D6, D7, B4, B5 } +#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 + +/* 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 RGB Underglow +#define RGB_DI_PIN B0 +#define RGBLED_NUM 24 +#define RGBLIGHT_ANIMATIONS */ +/* #define RGBLIGHT_LAYER_BLINK*/ + +/* Define less important options */ + +/* + * 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 diff --git a/keyboards/fjlabs/bolsa65/info.json b/keyboards/fjlabs/bolsa65/info.json new file mode 100644 index 000000000000..2485c29f5c81 --- /dev/null +++ b/keyboards/fjlabs/bolsa65/info.json @@ -0,0 +1,84 @@ +{ + "keyboard_name": "Bolsa65", + "url": "https://www.bolsakeyboardsupply.com", + "maintainer": "FJLabs", + "width": 16, + "height": 5, + "layouts": { + "LAYOUT_65_ansi_blocker": { + "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, "w": 1.25}, + {"x": 11.25, "y": 4, "w": 1.25}, + {"x": 13, "y": 4}, + {"x": 14, "y": 4}, + {"x": 15, "y": 4} + ] + } + } +} diff --git a/keyboards/fjlabs/bolsa65/keymaps/default/keymap.c b/keyboards/fjlabs/bolsa65/keymaps/default/keymap.c new file mode 100644 index 000000000000..d36898e0c612 --- /dev/null +++ b/keyboards/fjlabs/bolsa65/keymaps/default/keymap.c @@ -0,0 +1,39 @@ +/* +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 QMK_KEYBOARD_H + +enum layers { + _LAYER0, + _LAYER1, +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [_LAYER0] = LAYOUT_65_ansi_blocker( + 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, TG(1), + KC_TAB, KC_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_ESC , + KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, KC_RGUI, KC_RALT, KC_LEFT, KC_DOWN, KC_RGHT + ), + + [_LAYER1] = LAYOUT_65_ansi_blocker( + 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_TRNS, TG(1), + KC_TRNS, RGB_TOG, RGB_RMOD, RGB_MOD, RGB_HUD, RGB_HUI, RGB_SAD, RGB_SAI, RGB_VAD, RGB_SPI, RGB_SPD, RGB_SPI, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, 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, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 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/fjlabs/bolsa65/keymaps/via/keymap.c b/keyboards/fjlabs/bolsa65/keymaps/via/keymap.c new file mode 100644 index 000000000000..0db9e52210a6 --- /dev/null +++ b/keyboards/fjlabs/bolsa65/keymaps/via/keymap.c @@ -0,0 +1,58 @@ +/* +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 QMK_KEYBOARD_H + +enum layers { + _LAYER0, + _LAYER1, + _LAYER2, + _LAYER3, +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [_LAYER0] = LAYOUT_65_ansi_blocker( + 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, TG(1), + KC_TAB, KC_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_ESC , + KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, KC_RGUI, KC_RALT, KC_LEFT, KC_DOWN, KC_RGHT + ), + + [_LAYER1] = LAYOUT_65_ansi_blocker( + 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_TRNS, TG(1), + KC_TRNS, RGB_TOG, RGB_RMOD, RGB_MOD, RGB_HUD, RGB_HUI, RGB_SAD, RGB_SAI, RGB_VAD, RGB_SPI, RGB_SPD, RGB_SPI, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, 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, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ), + + [_LAYER2] = 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 + ), + + [_LAYER3] = 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/fjlabs/bolsa65/keymaps/via/rules.mk b/keyboards/fjlabs/bolsa65/keymaps/via/rules.mk new file mode 100644 index 000000000000..1e5b99807cb7 --- /dev/null +++ b/keyboards/fjlabs/bolsa65/keymaps/via/rules.mk @@ -0,0 +1 @@ +VIA_ENABLE = yes diff --git a/keyboards/fjlabs/bolsa65/readme.md b/keyboards/fjlabs/bolsa65/readme.md new file mode 100644 index 000000000000..e668f4b8c875 --- /dev/null +++ b/keyboards/fjlabs/bolsa65/readme.md @@ -0,0 +1,12 @@ +# bolsa65 + +The following is the QMK Firmware for the [BolsaKeyboardSupply](https://www.bolsakeyboardsupply.com) Bolsa65 mechanical keyboard. + +* Keyboard Maintainer: FJLabs +* Hardware Supported: Bolsa65 + +Make example for this keyboard (after setting up your build environment): + + make fjlabs/bolsa65: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/fjlabs/bolsa65/rules.mk b/keyboards/fjlabs/bolsa65/rules.mk new file mode 100644 index 000000000000..945e7be2eeb0 --- /dev/null +++ b/keyboards/fjlabs/bolsa65/rules.mk @@ -0,0 +1,28 @@ +# MCU name +MCU = atmega32u4 + +# Processor frequency +F_CPU = 8000000 + +# Bootloader selection +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 = no # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +BLUETOOTH_ENABLE = no # Enable Bluetooth +AUDIO_ENABLE = no # Audio output +KEYBOARD_LOCK_ENABLE = yes + +LAYOUTS = 65_ansi_blocker From 9570b1bbb4ce2358efedf4a25233ee2c15b8745b Mon Sep 17 00:00:00 2001 From: Drashna Jaelre Date: Fri, 25 Sep 2020 12:34:38 -0700 Subject: [PATCH 880/930] Fix Belgian sendstring file (#10443) Specifically, the `BE_CIRC` is an alt-ed keycode, which means it doesn't fit into the 8 bit keycode range... It should be `BE_SECT`, as it is already alt-ed by the alt lut. Confirmed that this change fixes compilation warnings and works correctly, on reddit. https://www.reddit.com/r/olkb/comments/iywin1/unsigned_conversion_from_int_to_unsigned_char/g6jvfgl/ --- quantum/keymap_extras/sendstring_belgian.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/quantum/keymap_extras/sendstring_belgian.h b/quantum/keymap_extras/sendstring_belgian.h index 5e9a079a9561..c537a361be40 100644 --- a/quantum/keymap_extras/sendstring_belgian.h +++ b/quantum/keymap_extras/sendstring_belgian.h @@ -88,7 +88,7 @@ const uint8_t ascii_to_keycode_lut[128] PROGMEM = { // P Q R S T U V W BE_P, BE_Q, BE_R, BE_S, BE_T, BE_U, BE_V, BE_W, // X Y Z [ \ ] ^ _ - BE_X, BE_Y, BE_Z, BE_CIRC, BE_LABK, BE_DLR, BE_SECT, BE_MINS, + BE_X, BE_Y, BE_Z, BE_SECT, BE_LABK, BE_DLR, BE_SECT, BE_MINS, // ` a b c d e f g BE_MICR, BE_A, BE_B, BE_C, BE_D, BE_E, BE_F, BE_G, // h i j k l m n o From 4a83021fe0d07888e0e3bf161882c4ab7221a4a6 Mon Sep 17 00:00:00 2001 From: doodboard Date: Sat, 26 Sep 2020 06:30:52 +0900 Subject: [PATCH 881/930] [Keyboard] add duckboard by doodboard (#10318) * Adding duckboard to QMK Adding duckboard support to QMK * added duckboard under doodboard * changed debouncing delay to debounce * Update keyboards/doodboard/duckboard/config.h * Update keyboards/doodboard/duckboard/config.h * Update keyboards/doodboard/duckboard/kb.h * Update keyboards/doodboard/duckboard/keymaps/default/keymap.c * Update keyboards/doodboard/duckboard/rules.mk * Update keyboards/doodboard/duckboard/kb.h * Update keyboards/doodboard/duckboard/kb.c * Update code per review Update code per review * folder name errod folder name errod * Update keyboards/doodboard/duckboard/config.h * Update keyboards/doodboard/duckboard/rules.mk * Update keyboards/doodboard/duckboard/rules.mk * Update keyboards/doodboard/duckboard/config.h * Create info.json * Update keyboards/doodboard/duckboard/duckboard.h * Update keyboards/doodboard/duckboard/info.json * Update keyboards/doodboard/duckboard/info.json * Update keyboards/doodboard/duckboard/duckboard.h * Update keyboards/doodboard/duckboard/readme.md --- keyboards/doodboard/duckboard/config.h | 57 +++++++++ keyboards/doodboard/duckboard/duckboard.c | 17 +++ keyboards/doodboard/duckboard/duckboard.h | 34 +++++ keyboards/doodboard/duckboard/info.json | 36 ++++++ .../duckboard/keymaps/default/keymap.c | 118 ++++++++++++++++++ keyboards/doodboard/duckboard/readme.md | 17 +++ keyboards/doodboard/duckboard/rules.mk | 25 ++++ 7 files changed, 304 insertions(+) create mode 100644 keyboards/doodboard/duckboard/config.h create mode 100644 keyboards/doodboard/duckboard/duckboard.c create mode 100644 keyboards/doodboard/duckboard/duckboard.h create mode 100644 keyboards/doodboard/duckboard/info.json create mode 100644 keyboards/doodboard/duckboard/keymaps/default/keymap.c create mode 100644 keyboards/doodboard/duckboard/readme.md create mode 100644 keyboards/doodboard/duckboard/rules.mk diff --git a/keyboards/doodboard/duckboard/config.h b/keyboards/doodboard/duckboard/config.h new file mode 100644 index 000000000000..ea8a8ae5ddad --- /dev/null +++ b/keyboards/doodboard/duckboard/config.h @@ -0,0 +1,57 @@ +/* Copyright 2020 doodboard + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License 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 0xFF44 +#define DEVICE_VER 0x0001 +#define MANUFACTURER doodboard +#define PRODUCT duckboard + +/* key matrix size */ +#define MATRIX_ROWS 5 +#define MATRIX_COLS 5 + +/* key matrix pins */ +#define MATRIX_ROW_PINS { C6, D7, E6, B4, B5 } +#define MATRIX_COL_PINS { F7, B1, B3, B2, B6 } +#define UNUSED_PINS + +#define ENCODERS_PAD_A { F5 } +#define ENCODERS_PAD_B { F6 } +#define ENCODER_RESOLUTION 2 + +/* media key slowdown for windows */ +#define TAP_CODE_DELAY 20 + +/* COL2ROW or ROW2COL */ +#define DIODE_DIRECTION COL2ROW + +/* number of backlight levels */ + +/* ws2812 RGB LED */ +#define RGB_DI_PIN D3 + +#ifdef RGBLIGHT_ENABLE +#define RGBLED_NUM 8 // Number of LEDs +#endif + +/* Set 0 if debouncing isn't needed */ +#define DEBOUNCE 5 diff --git a/keyboards/doodboard/duckboard/duckboard.c b/keyboards/doodboard/duckboard/duckboard.c new file mode 100644 index 000000000000..af0cb24beb55 --- /dev/null +++ b/keyboards/doodboard/duckboard/duckboard.c @@ -0,0 +1,17 @@ +/* Copyright 2020 doodboard + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#include "duckboard.h" diff --git a/keyboards/doodboard/duckboard/duckboard.h b/keyboards/doodboard/duckboard/duckboard.h new file mode 100644 index 000000000000..0e753d445ef8 --- /dev/null +++ b/keyboards/doodboard/duckboard/duckboard.h @@ -0,0 +1,34 @@ +/* Copyright 2020 doodboard + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License 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( \ + K01, K02, K03, K04, \ + K11, K12, K13, \ + K21, K22, K23, K24, \ + K31, K32, K33, \ + K40, K41, K42, K43, K44 \ +) { \ + { KC_NO, K01, K02, K03, K04 }, \ + { KC_NO, K11, K12, K13, KC_NO }, \ + { KC_NO, K21, K22, K23, K24 }, \ + { KC_NO, K31, K32, K33, KC_NO }, \ + { K40, K41, K42, K43, K44 } \ +} diff --git a/keyboards/doodboard/duckboard/info.json b/keyboards/doodboard/duckboard/info.json new file mode 100644 index 000000000000..ff043779f662 --- /dev/null +++ b/keyboards/doodboard/duckboard/info.json @@ -0,0 +1,36 @@ +{ + "keyboard_name": "duckboard", + "url": "", + "maintainer": "doodboard", + "width": 5, + "height": 5, + "layouts": { + "LAYOUT": { + "layout": [ + {"x": 1, "y": 0}, + {"x": 2, "y": 0}, + {"x": 3, "y": 0}, + {"x": 4, "y": 0}, + + {"x": 1, "y": 1}, + {"x": 2, "y": 1}, + {"x": 3, "y": 1}, + + {"x": 1, "y": 2}, + {"x": 2, "y": 2}, + {"x": 3, "y": 2}, + {"x": 4, "y": 2}, + + {"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": 4, "y": 4} + ] + } + } +} diff --git a/keyboards/doodboard/duckboard/keymaps/default/keymap.c b/keyboards/doodboard/duckboard/keymaps/default/keymap.c new file mode 100644 index 000000000000..6684e9863394 --- /dev/null +++ b/keyboards/doodboard/duckboard/keymaps/default/keymap.c @@ -0,0 +1,118 @@ +/* Copyright 2020 doodboard + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public 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( + TG(1), 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_BSPC, KC_MUTE, KC_P0, KC_PDOT, KC_PENT), + [1] = LAYOUT( + TG(1), KC_TRNS, KC_TRNS, KC_TRNS, + KC_HOME, KC_UP, KC_PGUP, + KC_LEFT, KC_TRNS, KC_RGHT, KC_TRNS, + KC_END, KC_DOWN, KC_PGDN, + TG(2), KC_TRNS, KC_INS, KC_DEL, KC_TRNS), + [2] = LAYOUT( + KC_TRNS, RGB_TOG, RGB_MOD, KC_TRNS, + RGB_HUI, RGB_SAI, RGB_VAI, + RGB_HUD, RGB_SAD, RGB_VAD, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, + TG(2), RESET, KC_TRNS, KC_TRNS, 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); + } +} +} + + +#ifdef OLED_DRIVER_ENABLE +oled_rotation_t oled_init_user(oled_rotation_t rotation) { return OLED_ROTATION_270; } + + +// WPM-responsive animation stuff here +#define IDLE_FRAMES 2 +#define IDLE_SPEED 40 // below this wpm value your animation will idle + +#define ANIM_FRAME_DURATION 200 // how long each frame lasts in ms +// #define SLEEP_TIMER 60000 // should sleep after this period of 0 wpm, needs fixing +#define ANIM_SIZE 636 // number of bytes in array, minimize for adequate firmware size, max is 1024 + +uint32_t anim_timer = 0; +uint32_t anim_sleep = 0; +uint8_t current_idle_frame = 0; + +// Credit to u/Pop-X- for the initial code. You can find his commit here https://github.com/qmk/qmk_firmware/pull/9264/files#diff-303f6e3a7a5ee54be0a9a13630842956R196-R333. +static void render_anim(void) { + static const char PROGMEM idle[IDLE_FRAMES][ANIM_SIZE] = { + { + 0, 0,192,192,192,192,192,192,192,248,248, 30, 30,254,254,248, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 3, 3, 3, 3,255,255,255,255,255,255,255,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,127,127,255,255,255,255,255,159,159,135,135,129,129,129, 97, 97, 25, 25, 7, 7, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 97, 97,127, 1, 1, 97, 97,127, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0 + }, + { + 0, 0,128,128,128,128,128,128,128,240,240, 60, 60,252,252,240, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 7, 7, 7, 7, 7,255,255,254,254,255,255,255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,255,255,255,255,255,255,255, 63, 63, 15, 15, 3, 3, 3,195,195, 51, 51, 15, 15, 3, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 3, 99, 99,127, 3, 3, 99, 99,127, 3, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0 + } + }; + + //assumes 1 frame prep stage + void animation_phase(void) { + current_idle_frame = (current_idle_frame + 1) % IDLE_FRAMES; + oled_write_raw_P(idle[abs((IDLE_FRAMES-1)-current_idle_frame)], ANIM_SIZE); + } + + if(timer_elapsed32(anim_timer) > ANIM_FRAME_DURATION) { + anim_timer = timer_read32(); + animation_phase(); + } + } + +void oled_task_user(void) { + render_anim(); + oled_set_cursor(0,6); + oled_write_P(PSTR("DUCK\nBOARD\n"), false); + oled_write_P(PSTR("-----\n"), false); + // Host Keyboard Layer Status + oled_write_P(PSTR("MODE\n"), false); + oled_write_P(PSTR("\n"), false); + + switch (get_highest_layer(layer_state)) { + case 0: + oled_write_P(PSTR("BASE\n"), false); + break; + case 1: + oled_write_P(PSTR("FUNC\n"), false); + break; + case 2: + oled_write_P(PSTR("RGB\n"), false); + break; + } +} +#endif + +void keyboard_post_init_user(void) { + //Customise these values to debug + //debug_enable=true; + //debug_matrix=true; + //debug_keyboard=true; + //debug_mouse=true; +} diff --git a/keyboards/doodboard/duckboard/readme.md b/keyboards/doodboard/duckboard/readme.md new file mode 100644 index 000000000000..d2b799ab61bc --- /dev/null +++ b/keyboards/doodboard/duckboard/readme.md @@ -0,0 +1,17 @@ +# duckboard + +An 18-key numpad with rotary encoder and OLED support. + +* Keyboard Maintainer: [doodboard](https://github.com/doodboard) +* Hardware Supported: duckboard PCB +* Hardware Availability: Private Group Buy + +Make example for this keyboard (after setting up your build environment): + + make doodboard/duckboard:default + +Flashing example for this keyboard: + + make doodboard/duckboard: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). diff --git a/keyboards/doodboard/duckboard/rules.mk b/keyboards/doodboard/duckboard/rules.mk new file mode 100644 index 000000000000..09a60d8a7956 --- /dev/null +++ b/keyboards/doodboard/duckboard/rules.mk @@ -0,0 +1,25 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +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 = no # Commands for debug and configuration +# 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 +BLUETOOTH_ENABLE = no # Enable Bluetooth +AUDIO_ENABLE = no # Audio output + +ENCODER_ENABLE = yes +OLED_DRIVER_ENABLE = yes From 603c8d1f060873114fe6418216bf4ff9ef5029f9 Mon Sep 17 00:00:00 2001 From: jackytrabbit Date: Sat, 26 Sep 2020 09:45:36 +0800 Subject: [PATCH 882/930] Add VIA support for lazydesigners/the30 (#10374) * Create rules.mk * Add files via upload * Update keyboards/lazydesigners/the30/keymaps/via/keymap.c --- .../lazydesigners/the30/keymaps/via/keymap.c | 39 +++++++++++++++++++ .../lazydesigners/the30/keymaps/via/rules.mk | 2 + 2 files changed, 41 insertions(+) create mode 100644 keyboards/lazydesigners/the30/keymaps/via/keymap.c create mode 100644 keyboards/lazydesigners/the30/keymaps/via/rules.mk diff --git a/keyboards/lazydesigners/the30/keymaps/via/keymap.c b/keyboards/lazydesigners/the30/keymaps/via/keymap.c new file mode 100644 index 000000000000..1a1b10fd5182 --- /dev/null +++ b/keyboards/lazydesigners/the30/keymaps/via/keymap.c @@ -0,0 +1,39 @@ +/* Copyright 2020 LAZYDESIGNERS + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public 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_3x10( + 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_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, MO(1) + ), + [1] = LAYOUT_ortho_3x10( + 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 + ), + [2] = LAYOUT_ortho_3x10( + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO + ), + [3] = LAYOUT_ortho_3x10( + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO + ), +}; diff --git a/keyboards/lazydesigners/the30/keymaps/via/rules.mk b/keyboards/lazydesigners/the30/keymaps/via/rules.mk new file mode 100644 index 000000000000..36b7ba9cbc98 --- /dev/null +++ b/keyboards/lazydesigners/the30/keymaps/via/rules.mk @@ -0,0 +1,2 @@ +VIA_ENABLE = yes +LTO_ENABLE = yes From b6f9ca3b0970cbe84a434b4cfe972d97aa432547 Mon Sep 17 00:00:00 2001 From: Ryan Date: Sat, 26 Sep 2020 14:14:34 +1000 Subject: [PATCH 883/930] Fix Belgian sendstring properly (#10444) --- quantum/keymap_extras/sendstring_belgian.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/quantum/keymap_extras/sendstring_belgian.h b/quantum/keymap_extras/sendstring_belgian.h index c537a361be40..5e7218a2fa73 100644 --- a/quantum/keymap_extras/sendstring_belgian.h +++ b/quantum/keymap_extras/sendstring_belgian.h @@ -88,7 +88,7 @@ const uint8_t ascii_to_keycode_lut[128] PROGMEM = { // P Q R S T U V W BE_P, BE_Q, BE_R, BE_S, BE_T, BE_U, BE_V, BE_W, // X Y Z [ \ ] ^ _ - BE_X, BE_Y, BE_Z, BE_SECT, BE_LABK, BE_DLR, BE_SECT, BE_MINS, + BE_X, BE_Y, BE_Z, BE_DCIR, BE_LABK, BE_DLR, BE_SECT, BE_MINS, // ` a b c d e f g BE_MICR, BE_A, BE_B, BE_C, BE_D, BE_E, BE_F, BE_G, // h i j k l m n o From c4cc697aeff1d2591dc107e2106019906e3b0133 Mon Sep 17 00:00:00 2001 From: mechlovin <57231893+mechlovin@users.noreply.github.com> Date: Sat, 26 Sep 2020 12:33:49 +0700 Subject: [PATCH 884/930] [Keyboard] add hannah65 by Team Mechlovin (#10284) * add hannah65 * add iso layout, ansi layout * Update readme.md * add mechlovin9 * update * update * update * Update keyboards/mechlovin/hannah65/mechlovin9/info.json * Update keyboards/mechlovin/hannah65/mechlovin9/info.json * Update keyboards/mechlovin/hannah65/mechlovin9/readme.md * Update keyboards/mechlovin/hannah65/readme.md * Update keyboards/mechlovin/hannah65/rev1/info.json * Update keyboards/mechlovin/hannah65/rev1/info.json * Update keyboards/mechlovin/hannah65/rev1/rev1.h * Update keyboards/mechlovin/hannah65/rev1/rev1.h * Update keyboards/mechlovin/hannah65/mechlovin9/info.json * update * Update keyboards/mechlovin/hannah65/mechlovin9/info.json * Update keyboards/mechlovin/hannah65/mechlovin9/info.json --- keyboards/mechlovin/hannah65/config.h | 49 ++++ keyboards/mechlovin/hannah65/hannah65.c | 35 +++ keyboards/mechlovin/hannah65/hannah65.h | 25 ++ .../mechlovin/hannah65/mechlovin9/config.h | 5 + .../mechlovin/hannah65/mechlovin9/info.json | 80 +++++++ .../mechlovin9/keymaps/default/keymap.c | 29 +++ .../mechlovin9/keymaps/default/readme.md | 1 + .../hannah65/mechlovin9/keymaps/via/keymap.c | 50 ++++ .../hannah65/mechlovin9/keymaps/via/rules.mk | 1 + .../hannah65/mechlovin9/mechlovin9.h | 33 +++ .../mechlovin/hannah65/mechlovin9/readme.md | 15 ++ .../mechlovin/hannah65/mechlovin9/rules.mk | 0 keyboards/mechlovin/hannah65/readme.md | 15 ++ keyboards/mechlovin/hannah65/rev1/config.h | 5 + keyboards/mechlovin/hannah65/rev1/info.json | 225 ++++++++++++++++++ .../hannah65/rev1/keymaps/default/keymap.c | 29 +++ .../hannah65/rev1/keymaps/default/readme.md | 1 + .../hannah65/rev1/keymaps/via/keymap.c | 50 ++++ .../hannah65/rev1/keymaps/via/rules.mk | 1 + keyboards/mechlovin/hannah65/rev1/rev1.h | 61 +++++ keyboards/mechlovin/hannah65/rev1/rules.mk | 0 keyboards/mechlovin/hannah65/rules.mk | 21 ++ 22 files changed, 731 insertions(+) create mode 100644 keyboards/mechlovin/hannah65/config.h create mode 100644 keyboards/mechlovin/hannah65/hannah65.c create mode 100644 keyboards/mechlovin/hannah65/hannah65.h create mode 100644 keyboards/mechlovin/hannah65/mechlovin9/config.h create mode 100644 keyboards/mechlovin/hannah65/mechlovin9/info.json create mode 100644 keyboards/mechlovin/hannah65/mechlovin9/keymaps/default/keymap.c create mode 100644 keyboards/mechlovin/hannah65/mechlovin9/keymaps/default/readme.md create mode 100644 keyboards/mechlovin/hannah65/mechlovin9/keymaps/via/keymap.c create mode 100644 keyboards/mechlovin/hannah65/mechlovin9/keymaps/via/rules.mk create mode 100644 keyboards/mechlovin/hannah65/mechlovin9/mechlovin9.h create mode 100644 keyboards/mechlovin/hannah65/mechlovin9/readme.md create mode 100644 keyboards/mechlovin/hannah65/mechlovin9/rules.mk create mode 100644 keyboards/mechlovin/hannah65/readme.md create mode 100644 keyboards/mechlovin/hannah65/rev1/config.h create mode 100644 keyboards/mechlovin/hannah65/rev1/info.json create mode 100644 keyboards/mechlovin/hannah65/rev1/keymaps/default/keymap.c create mode 100644 keyboards/mechlovin/hannah65/rev1/keymaps/default/readme.md create mode 100644 keyboards/mechlovin/hannah65/rev1/keymaps/via/keymap.c create mode 100644 keyboards/mechlovin/hannah65/rev1/keymaps/via/rules.mk create mode 100644 keyboards/mechlovin/hannah65/rev1/rev1.h create mode 100644 keyboards/mechlovin/hannah65/rev1/rules.mk create mode 100644 keyboards/mechlovin/hannah65/rules.mk diff --git a/keyboards/mechlovin/hannah65/config.h b/keyboards/mechlovin/hannah65/config.h new file mode 100644 index 000000000000..6801c30a3d36 --- /dev/null +++ b/keyboards/mechlovin/hannah65/config.h @@ -0,0 +1,49 @@ +/* +Copyright 2020 Team 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 +#define MANUFACTURER Team Mechlovin + +#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 { A4, A5, A3, A2, A1 } +#define MATRIX_COL_PINS { B11, B10, B2, B1, B0, A7, A6, A0, C15, B4, B5, B3, C13, C14, A13 } + +#define DIODE_DIRECTION COL2ROW + +#define BACKLIGHT_PIN B8 +#define BACKLIGHT_BREATHING +#define BACKLIGHT_PWM_DRIVER PWMD3 +#define BACKLIGHT_PWM_CHANNEL 3 + +#define BACKLIGHT_LEVELS 3 diff --git a/keyboards/mechlovin/hannah65/hannah65.c b/keyboards/mechlovin/hannah65/hannah65.c new file mode 100644 index 000000000000..4f937d8a2af5 --- /dev/null +++ b/keyboards/mechlovin/hannah65/hannah65.c @@ -0,0 +1,35 @@ +/* Copyright 2020 Team 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 "hannah65.h" + +void matrix_init_kb(void) { + matrix_init_user(); + led_init_ports(); +} + +void led_init_ports(void) { + setPinOutput(B9); + writePinLow(B9); +} + +bool led_update_kb(led_t led_state) { + if(led_update_user(led_state)) { + writePin(B9, led_state.caps_lock); + } + + return true; +} diff --git a/keyboards/mechlovin/hannah65/hannah65.h b/keyboards/mechlovin/hannah65/hannah65.h new file mode 100644 index 000000000000..576a78510d8a --- /dev/null +++ b/keyboards/mechlovin/hannah65/hannah65.h @@ -0,0 +1,25 @@ +/* Copyright 2020 Team 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" + +#if defined(KEYBOARD_mechlovin_hannah65_rev1) +# include "rev1.h" +#elif defined(KEYBOARD_mechlovin_hannah65_mechlovin9) +# include "mechlovin9.h" +#endif \ No newline at end of file diff --git a/keyboards/mechlovin/hannah65/mechlovin9/config.h b/keyboards/mechlovin/hannah65/mechlovin9/config.h new file mode 100644 index 000000000000..df917e3d1027 --- /dev/null +++ b/keyboards/mechlovin/hannah65/mechlovin9/config.h @@ -0,0 +1,5 @@ +#pragma once + +#define PRODUCT_ID 0x6501 +#define DEVICE_VER 0x0001 +#define PRODUCTION Mechlovin9 \ No newline at end of file diff --git a/keyboards/mechlovin/hannah65/mechlovin9/info.json b/keyboards/mechlovin/hannah65/mechlovin9/info.json new file mode 100644 index 000000000000..24585920a2a7 --- /dev/null +++ b/keyboards/mechlovin/hannah65/mechlovin9/info.json @@ -0,0 +1,80 @@ +{ + "keyboard_name": "mechlovin9", + "url": "", + "maintainer": "Team Mechlovin", + "width": 16, + "height": 5, + "layouts": { + "LAYOUT_all": { + "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":"K1D (B1,D2)", "x":14, "y":0}, + {"label":"K0E (B0,D3)", "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":"K2C (B2,D1)", "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":"K2D (B2,D2)", "x":12.75, "y":2, "w":2.25}, + {"label":"K2E (B2,D3)", "x":15, "y":2}, + {"label":"K30 (B3,B5)", "x":0, "y":3, "w":2.25}, + {"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.5}, + {"label":"K41 (B4,B6)", "x":1.5, "y":4}, + {"label":"K42 (B4,B7)", "x":2.5, "y":4, "w":1.5}, + {"label":"K46 (B4,C3)", "x":4, "y":4, "w":7}, + {"label":"K4B (B4,D0)", "x":11, "y":4, "w":1.5}, + {"label":"K4C (B4,D1)", "x":13, "y":4}, + {"label":"K4D (B4,D2)", "x":14, "y":4}, + {"label":"K4E (B4,D3)", "x":15, "y":4} + ] + } + } +} diff --git a/keyboards/mechlovin/hannah65/mechlovin9/keymaps/default/keymap.c b/keyboards/mechlovin/hannah65/mechlovin9/keymaps/default/keymap.c new file mode 100644 index 000000000000..97a2c807231f --- /dev/null +++ b/keyboards/mechlovin/hannah65/mechlovin9/keymaps/default/keymap.c @@ -0,0 +1,29 @@ +/* Copyright 2020 Team 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_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_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_LSFT, KC_UP, KC_END, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT + ), + + +}; + diff --git a/keyboards/mechlovin/hannah65/mechlovin9/keymaps/default/readme.md b/keyboards/mechlovin/hannah65/mechlovin9/keymaps/default/readme.md new file mode 100644 index 000000000000..324467b059ee --- /dev/null +++ b/keyboards/mechlovin/hannah65/mechlovin9/keymaps/default/readme.md @@ -0,0 +1 @@ +# The default keymap for mechlovin9 diff --git a/keyboards/mechlovin/hannah65/mechlovin9/keymaps/via/keymap.c b/keyboards/mechlovin/hannah65/mechlovin9/keymaps/via/keymap.c new file mode 100644 index 000000000000..0fae908c2454 --- /dev/null +++ b/keyboards/mechlovin/hannah65/mechlovin9/keymaps/via/keymap.c @@ -0,0 +1,50 @@ +/* Copyright 2020 Team 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_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_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_LSFT, KC_UP, KC_END, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, 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 + ), + [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 + ), + [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/mechlovin/hannah65/mechlovin9/keymaps/via/rules.mk b/keyboards/mechlovin/hannah65/mechlovin9/keymaps/via/rules.mk new file mode 100644 index 000000000000..036bd6d1c3ec --- /dev/null +++ b/keyboards/mechlovin/hannah65/mechlovin9/keymaps/via/rules.mk @@ -0,0 +1 @@ +VIA_ENABLE = yes \ No newline at end of file diff --git a/keyboards/mechlovin/hannah65/mechlovin9/mechlovin9.h b/keyboards/mechlovin/hannah65/mechlovin9/mechlovin9.h new file mode 100644 index 000000000000..4aebaad0f34e --- /dev/null +++ b/keyboards/mechlovin/hannah65/mechlovin9/mechlovin9.h @@ -0,0 +1,33 @@ +/* Copyright 2020 Team 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, K1D, K0E, \ + K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K2C, 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, K46, 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, KC_NO, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E }, \ + { K40, K41, K42, KC_NO, KC_NO, KC_NO, K46, KC_NO, KC_NO, KC_NO, KC_NO, K4B, K4C, K4D, K4E }, \ +} diff --git a/keyboards/mechlovin/hannah65/mechlovin9/readme.md b/keyboards/mechlovin/hannah65/mechlovin9/readme.md new file mode 100644 index 000000000000..aa6bdc1cad3d --- /dev/null +++ b/keyboards/mechlovin/hannah65/mechlovin9/readme.md @@ -0,0 +1,15 @@ +# mechlovin9 + +![mechlovin9](https://i.imgur.com/T5Lm6OYl.png) + +A 65% PCB, compatible with Kyuu. + +* Keyboard Maintainer: [Team Mechlovin](https://github.com/mechlovin) +* Hardware Supported: Kyuu Keyboard. +* Hardware Availability: [Reddit GB](https://www.reddit.com/r/mechmarket/comments/i61par/gb_mechlovin_9_a_kyuu_65_keyboard_compatible_pcb/) + +Make example for this keyboard (after setting up your build environment): + + make mechlovin/hannah65/mechlovin9: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/hannah65/mechlovin9/rules.mk b/keyboards/mechlovin/hannah65/mechlovin9/rules.mk new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/keyboards/mechlovin/hannah65/readme.md b/keyboards/mechlovin/hannah65/readme.md new file mode 100644 index 000000000000..25fcd18d8d12 --- /dev/null +++ b/keyboards/mechlovin/hannah65/readme.md @@ -0,0 +1,15 @@ +# hannah65 + +![hannah65](https://i.imgur.com/qf0BYI2l.png) + +A 65% PCB, compatible with E6.5, Kyuu,... + +* Keyboard Maintainer: [Team Mechlovin](https://github.com/mechlovin) +* Hardware Supported: Hannah65, STM32F303 +* Hardware Availability: [Mechlovin Store](https://mechlove.com/) + +Make example for this keyboard (after setting up your build environment): + + make mechlovin/hannah65/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/hannah65/rev1/config.h b/keyboards/mechlovin/hannah65/rev1/config.h new file mode 100644 index 000000000000..8d90908c20e3 --- /dev/null +++ b/keyboards/mechlovin/hannah65/rev1/config.h @@ -0,0 +1,5 @@ +#pragma once + +#define PRODUCT_ID 0x6500 +#define DEVICE_VER 0x0001 +#define PRODUCTION Hannah65 \ No newline at end of file diff --git a/keyboards/mechlovin/hannah65/rev1/info.json b/keyboards/mechlovin/hannah65/rev1/info.json new file mode 100644 index 000000000000..ceb7aceb383f --- /dev/null +++ b/keyboards/mechlovin/hannah65/rev1/info.json @@ -0,0 +1,225 @@ +{ + "keyboard_name": "hannah65-rev1", + "url": "", + "maintainer": "Team Mechlovin", + "width": 16, + "height": 5, + "layouts": { + "LAYOUT_all": { + "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":"K1D (B1,D2)", "x":14, "y":0}, + {"label":"K0E (B0,D3)", "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":"K2C (B2,D1)", "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":"K2D (B2,D2)", "x":12.75, "y":2, "w":2.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":"K46 (B4,C3)", "x":3.75, "y":4, "w":6.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} + ] + }, + "LAYOUT_65_ansi_blocker": { + "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, "w":2}, + {"label":"K0E (B0,D3)", "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":"K2C (B2,D1)", "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":"K2D (B2,D2)", "x":12.75, "y":2, "w":2.25}, + {"label":"K2E (B2,D3)", "x":15, "y":2}, + {"label":"K30 (B3,B5)", "x":0, "y":3, "w":2.25}, + {"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":"K46 (B4,C3)", "x":3.75, "y":4, "w":6.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} + ] + }, + "LAYOUT_65_iso_blocker": { + "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, "w":2}, + {"label":"K0E (B0,D3)", "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":"K2D (B2,D2)", "x":13.75, "y":1, "w":1.25, "h":2}, + {"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":"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":"K46 (B4,C3)", "x":3.75, "y":4, "w":6.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} + ] + } + } +} diff --git a/keyboards/mechlovin/hannah65/rev1/keymaps/default/keymap.c b/keyboards/mechlovin/hannah65/rev1/keymaps/default/keymap.c new file mode 100644 index 000000000000..e4960b54f96d --- /dev/null +++ b/keyboards/mechlovin/hannah65/rev1/keymaps/default/keymap.c @@ -0,0 +1,29 @@ +/* Copyright 2020 Team 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_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_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_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_END, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT + ), + + +}; + diff --git a/keyboards/mechlovin/hannah65/rev1/keymaps/default/readme.md b/keyboards/mechlovin/hannah65/rev1/keymaps/default/readme.md new file mode 100644 index 000000000000..1e8f0ec1fa23 --- /dev/null +++ b/keyboards/mechlovin/hannah65/rev1/keymaps/default/readme.md @@ -0,0 +1 @@ +# The default keymap for hannah65 diff --git a/keyboards/mechlovin/hannah65/rev1/keymaps/via/keymap.c b/keyboards/mechlovin/hannah65/rev1/keymaps/via/keymap.c new file mode 100644 index 000000000000..34a9cf8264de --- /dev/null +++ b/keyboards/mechlovin/hannah65/rev1/keymaps/via/keymap.c @@ -0,0 +1,50 @@ +/* Copyright 2020 Team 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_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_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_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_END, + KC_LCTL, KC_LGUI, KC_LALT, 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 + ), + [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 + ), + [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 + ), + + +}; + diff --git a/keyboards/mechlovin/hannah65/rev1/keymaps/via/rules.mk b/keyboards/mechlovin/hannah65/rev1/keymaps/via/rules.mk new file mode 100644 index 000000000000..036bd6d1c3ec --- /dev/null +++ b/keyboards/mechlovin/hannah65/rev1/keymaps/via/rules.mk @@ -0,0 +1 @@ +VIA_ENABLE = yes \ No newline at end of file diff --git a/keyboards/mechlovin/hannah65/rev1/rev1.h b/keyboards/mechlovin/hannah65/rev1/rev1.h new file mode 100644 index 000000000000..0b6b863d56b1 --- /dev/null +++ b/keyboards/mechlovin/hannah65/rev1/rev1.h @@ -0,0 +1,61 @@ +/* Copyright 2020 Team 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, K1D, K0E, \ + K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K2C, 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, K3C, K3D, K3E, \ + K40, K41, K42, K46, 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, KC_NO, KC_NO, KC_NO, K46, KC_NO, KC_NO, KC_NO, K4A, K4B, K4C, K4D, K4E }, \ +} + +#define LAYOUT_65_ansi_blocker( \ + 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, \ + 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, K46, 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, KC_NO, K1E }, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, K2E }, \ + { K30, KC_NO, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E }, \ + { K40, K41, K42, KC_NO, KC_NO, KC_NO, K46, KC_NO, KC_NO, KC_NO, K4A, K4B, K4C, K4D, K4E }, \ +} + +#define LAYOUT_65_iso_blocker( \ + 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, K2D, K1E, \ + K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2E, \ + K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E, \ + K40, K41, K42, K46, 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, KC_NO, 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, KC_NO, KC_NO, KC_NO, K46, KC_NO, KC_NO, KC_NO, K4A, K4B, K4C, K4D, K4E }, \ +} diff --git a/keyboards/mechlovin/hannah65/rev1/rules.mk b/keyboards/mechlovin/hannah65/rev1/rules.mk new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/keyboards/mechlovin/hannah65/rules.mk b/keyboards/mechlovin/hannah65/rules.mk new file mode 100644 index 000000000000..74157ae7150a --- /dev/null +++ b/keyboards/mechlovin/hannah65/rules.mk @@ -0,0 +1,21 @@ +# MCU name +MCU = STM32F303 + +# 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 = yes # USB Nkey Rollover +BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +BLUETOOTH_ENABLE = no # Enable Bluetooth +AUDIO_ENABLE = no # Audio output + +DEFAULT_FOLDER = mechlovin/hannah65/rev1 \ No newline at end of file From 1b7101f0654a4e6afd3998117bc5c040f86bb776 Mon Sep 17 00:00:00 2001 From: Evy Dekkers <17366381+evyd13@users.noreply.github.com> Date: Sat, 26 Sep 2020 07:39:14 +0200 Subject: [PATCH 885/930] [Keyboard] add Percent Canoe Gen2 (#10344) * Add Canoe Gen2 * Fix info.json * Update info.json * Changes * Move canoegen2 to canoe_gen2 * Update canoe_gen2.h --- keyboards/percent/canoe_gen2/canoe_gen2.c | 141 +++++++++++++++ keyboards/percent/canoe_gen2/canoe_gen2.h | 54 ++++++ keyboards/percent/canoe_gen2/config.h | 67 ++++++++ keyboards/percent/canoe_gen2/info.json | 162 ++++++++++++++++++ .../canoe_gen2/keymaps/default/keymap.c | 36 ++++ .../percent/canoe_gen2/keymaps/via/keymap.c | 50 ++++++ .../percent/canoe_gen2/keymaps/via/rules.mk | 1 + keyboards/percent/canoe_gen2/readme.md | 17 ++ .../percent/canoe_gen2/rgb_matrix_kb.inc | 65 +++++++ keyboards/percent/canoe_gen2/rules.mk | 26 +++ 10 files changed, 619 insertions(+) create mode 100644 keyboards/percent/canoe_gen2/canoe_gen2.c create mode 100644 keyboards/percent/canoe_gen2/canoe_gen2.h create mode 100644 keyboards/percent/canoe_gen2/config.h create mode 100644 keyboards/percent/canoe_gen2/info.json create mode 100644 keyboards/percent/canoe_gen2/keymaps/default/keymap.c create mode 100644 keyboards/percent/canoe_gen2/keymaps/via/keymap.c create mode 100644 keyboards/percent/canoe_gen2/keymaps/via/rules.mk create mode 100644 keyboards/percent/canoe_gen2/readme.md create mode 100644 keyboards/percent/canoe_gen2/rgb_matrix_kb.inc create mode 100644 keyboards/percent/canoe_gen2/rules.mk diff --git a/keyboards/percent/canoe_gen2/canoe_gen2.c b/keyboards/percent/canoe_gen2/canoe_gen2.c new file mode 100644 index 000000000000..47ade5dd4f5a --- /dev/null +++ b/keyboards/percent/canoe_gen2/canoe_gen2.c @@ -0,0 +1,141 @@ +/* +Copyright 2020 Evy 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 "canoe_gen2.h" + +void keyboard_pre_init_kb(void) { + setPinOutput(E6); + writePinHigh(E6); +} + +bool led_update_kb(led_t led_state) { + if(led_update_user(led_state)) { + writePin(E6, !led_state.caps_lock); + } + + return true; +} + +#ifdef RGB_MATRIX_ENABLE +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(); +} + +led_config_t g_led_config = { { + // Key Matrix to LED Index + // 15, 44, 46, 48, + // 74, 75, 76 + { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 14, 16 }, + { 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 13, 31 }, + { 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 30, 45, 47 }, + { 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63 }, + { 64, 65, 66, NO_LED, NO_LED, NO_LED, 67, NO_LED, NO_LED, 69, 70, NO_LED, 71, 72, 73 } +}, { + // LED Index to Physical Position + { 7, 8 }, // Esc + { 22, 8 }, // 1 + { 37, 8 }, // 2 + { 52, 8 }, // 3 + { 67, 8 }, // 4 + { 82, 8 }, // 5 + { 97, 8 }, // 6 + { 112, 8 }, // 7 + { 127, 8 }, // 8 + { 142, 8 }, // 9 + { 157, 8 }, // 0 + { 172, 8 }, // - + { 187, 8 }, // = + { 202, 8 }, // split bs + { 209, 8 }, // bs + { 217, 8 }, // split bs + { 231, 8 }, // ins + { 11, 24 }, // tab + { 30, 24 }, // q + { 45, 24 }, // w + { 60, 24 }, // e + { 75, 24 }, // r + { 90, 24 }, // t + { 104, 24 }, // y + { 119, 24 }, // u + { 134, 24 }, // i + { 149, 24 }, // o + { 164, 24 }, // p + { 179, 24 }, // [ + { 194, 24 }, // ] + { 212, 24 }, // backslash + { 231, 24 }, // del + { 11, 40 }, // caps + { 34, 40 }, // a + { 49, 40 }, // s + { 64, 40 }, // d + { 79, 40 }, // f + { 94, 40 }, // g + { 108, 40 }, // h + { 123, 40 }, // j + { 138, 40 }, // k + { 153, 40 }, // l + { 168, 40 }, // ; + { 183, 40 }, // ' + { 198, 40 }, // iso hash + { 200, 40 }, // ansi enter + { 215, 32 }, // iso enter + { 231, 40 }, // pgup + { 9, 56 }, // iso shift + { 17, 56 }, // ansi shift + { 26, 56 }, // iso nubs + { 41, 56 }, // z + { 56, 56 }, // x + { 71, 56 }, // c + { 86, 56 }, // v + { 101, 56 }, // b + { 116, 56 }, // n + { 131, 56 }, // m + { 146, 56 }, // , + { 161, 56 }, // . + { 175, 56 }, // ? + { 196, 56 }, // shift + { 217, 56 }, // up + { 231, 56 }, // pgdn + { 10, 72 }, // ctrl + { 29, 72 }, // win + { 48, 72 }, // alt + { 103, 72 }, // space + { 112, 72 }, // space + { 161, 72 }, // alt + { 176, 72 }, // fn + { 202, 72 }, // left + { 217, 72 }, // down + { 231, 72 }, // right + { 7, 40 }, // top 1 + { 119, 40 }, // top 2 + { 231, 40 } // top 3 +}, { + // LED Index to Flag + 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1, 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, 1, + 1, 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1, 1, + 1, 1, 1, 4, 4, 1, 1, 1, 1, 1, + 2, 2, 2 +} }; +#endif diff --git a/keyboards/percent/canoe_gen2/canoe_gen2.h b/keyboards/percent/canoe_gen2/canoe_gen2.h new file mode 100644 index 000000000000..d4582eef250e --- /dev/null +++ b/keyboards/percent/canoe_gen2/canoe_gen2.h @@ -0,0 +1,54 @@ +/* +Copyright 2020 Evy 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" + +// readability +#define ___ KC_NO + +#define LAYOUT_all LAYOUT_65_iso_blocker_split_bs + +#define LAYOUT_65_ansi_blocker_split_bs( \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k1d, k0d, k0e, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k2c, 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, k46, 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, k2d, k2e}, \ + {k30, ___, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d, k3e}, \ + {k40, k41, k42, ___, ___, ___, k46, ___, ___, k49, k4a, ___, k4c, k4d, k4e} \ +} + +#define LAYOUT_65_iso_blocker_split_bs( \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k1d, 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, k46, 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, k2d, k2e}, \ + {k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d, k3e}, \ + {k40, k41, k42, ___, ___, ___, k46, ___, ___, k49, k4a, ___, k4c, k4d, k4e} \ +} diff --git a/keyboards/percent/canoe_gen2/config.h b/keyboards/percent/canoe_gen2/config.h new file mode 100644 index 000000000000..bac5ebb3f3ab --- /dev/null +++ b/keyboards/percent/canoe_gen2/config.h @@ -0,0 +1,67 @@ +/* +Copyright 2020 Evy 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 0x9C12 +#define PRODUCT_ID 0x89F0 +#define DEVICE_VER 0x0001 +#define MANUFACTURER Percent Studio +#define PRODUCT Canoe Gen2 + +/* key matrix size */ +#define MATRIX_ROWS 5 +#define MATRIX_COLS 15 + +// ROWS: Top to bottom, COLS: Left to right + +#define MATRIX_ROW_PINS {B1,B3,B2,F5,F4} +#define MATRIX_COL_PINS {B0,D0,C6,B6,B5,B4,D7,D6,D4,D5,D3,D2,D1,F6,F7} +#define UNUSED_PINS + +/* Uncomment if your encoder doesn't react to every turn or skips */ +//#define ENCODER_RESOLUTION 2 + +/* 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 + +/* 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 + +/* Backlight configuration + */ +#define RGB_DI_PIN B7 +#define DRIVER_LED_TOTAL 77 +#define RGB_MATRIX_MAXIMUM_BRIGHTNESS 150 + +#define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_CYCLE_LEFT_RIGHT +#define RGB_MATRIX_STARTUP_HUE 0 +#define RGB_MATRIX_STARTUP_SAT 255 +#define RGB_MATRIX_STARTUP_VAL RGB_MATRIX_MAXIMUM_BRIGHTNESS +#define RGB_MATRIX_STARTUP_SPD 127 +#define RGB_DISABLE_WHEN_USB_SUSPENDED true diff --git a/keyboards/percent/canoe_gen2/info.json b/keyboards/percent/canoe_gen2/info.json new file mode 100644 index 000000000000..fc8ba3e0f9ec --- /dev/null +++ b/keyboards/percent/canoe_gen2/info.json @@ -0,0 +1,162 @@ +{ + "keyboard_name": "Canoe Gen2", + "url": "", + "maintainer": "evyd13", + "width": 16, + "height": 5, + "layouts": { + "LAYOUT_65_ansi_blocker_split_bs": { + "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, "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, "w":1.25}, + {"x":11.25, "y":4, "w":1.25}, + {"x":13, "y":4}, + {"x":14, "y":4}, + {"x":15, "y":4} + ] + }, + "LAYOUT_65_iso_blocker_split_bs": { + "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, "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":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}, + {"x":13.75, "y":1, "w":1.25, "h":2}, + {"x":15, "y":2}, + + {"x":0, "y":3, "w":1.25}, + {"x":1.25, "y":3}, + {"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, "w":1.25}, + {"x":11.25, "y":4, "w":1.25}, + {"x":13, "y":4}, + {"x":14, "y":4}, + {"x":15, "y":4} + ] + } + } +} \ No newline at end of file diff --git a/keyboards/percent/canoe_gen2/keymaps/default/keymap.c b/keyboards/percent/canoe_gen2/keymaps/default/keymap.c new file mode 100644 index 000000000000..bd30836d367a --- /dev/null +++ b/keyboards/percent/canoe_gen2/keymaps/default/keymap.c @@ -0,0 +1,36 @@ +/* +Copyright 2020 Evy 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 + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +[0] = LAYOUT_65_ansi_blocker_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_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_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_split_bs( + 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, _______, _______, _______, + RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, RGB_TOG, RGB_MOD, _______, _______, _______, _______, _______, KC_VOLD, KC_VOLU, KC_MUTE, _______, _______, _______, + _______, _______, _______, _______, RGB_MOD, _______, _______, _______, _______), + +}; diff --git a/keyboards/percent/canoe_gen2/keymaps/via/keymap.c b/keyboards/percent/canoe_gen2/keymaps/via/keymap.c new file mode 100644 index 000000000000..20fcddd5e201 --- /dev/null +++ b/keyboards/percent/canoe_gen2/keymaps/via/keymap.c @@ -0,0 +1,50 @@ +/* +Copyright 2020 Evy 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 + +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_BSLS, 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_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_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_all( + 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, _______, _______, _______, + RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, RGB_TOG, RGB_MOD, _______, _______, _______, _______, _______, KC_VOLD, KC_VOLU, KC_MUTE, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______), + +[2] = LAYOUT_all( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______), + +[3] = LAYOUT_all( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______), + +}; diff --git a/keyboards/percent/canoe_gen2/keymaps/via/rules.mk b/keyboards/percent/canoe_gen2/keymaps/via/rules.mk new file mode 100644 index 000000000000..1e5b99807cb7 --- /dev/null +++ b/keyboards/percent/canoe_gen2/keymaps/via/rules.mk @@ -0,0 +1 @@ +VIA_ENABLE = yes diff --git a/keyboards/percent/canoe_gen2/readme.md b/keyboards/percent/canoe_gen2/readme.md new file mode 100644 index 000000000000..ae8bf7f1827e --- /dev/null +++ b/keyboards/percent/canoe_gen2/readme.md @@ -0,0 +1,17 @@ +# Canoe Gen2 + +Canoe Gen2 is a 65% from Percent with per key RGB and an adjustable foot angle. The PCB can be put into reset mode by pressing the button on the back. + +* Keyboard Maintainer: [Evyd13](https://github.com/evyd13) +* Hardware Supported: (Black) Canoe Gen2 PCB +* Hardware Availability: https://percent.studio/products/canoe-gen2 + +Make example for this keyboard (after setting up your build environment): + + make percent/canoe_gen2:default + +Flashing example for this keyboard: + + make percent/canoe_gen2: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). diff --git a/keyboards/percent/canoe_gen2/rgb_matrix_kb.inc b/keyboards/percent/canoe_gen2/rgb_matrix_kb.inc new file mode 100644 index 000000000000..7a49edd3b3c0 --- /dev/null +++ b/keyboards/percent/canoe_gen2/rgb_matrix_kb.inc @@ -0,0 +1,65 @@ +/* +Copyright 2020 Evy 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 . +*/ + +RGB_MATRIX_EFFECT(indicator_gradient) +RGB_MATRIX_EFFECT(indicator_cycle_all) +RGB_MATRIX_EFFECT(indicator_static) + +#ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS + +static bool indicator_static(effect_params_t* params) { + RGB_MATRIX_USE_LIMITS(led_min, led_max); + for (uint8_t i = led_min ; i < 74; i++) { + rgb_matrix_set_color(i, 0x00, 0x00, 0x00); + } + for (uint8_t i = 74 ; i < led_max; i++) { + rgb_matrix_set_color(i, 0xff, 0xff, 0xff); + } + return led_max < DRIVER_LED_TOTAL; +} + +bool effect_runner_indicator(effect_params_t* params, i_f effect_func) { + RGB_MATRIX_USE_LIMITS(led_min, led_max); + + uint8_t time = scale16by8(g_rgb_timer, rgb_matrix_config.speed / 16); + for (uint8_t i = led_min; i < led_max; i++) { + if (i < 74) { + rgb_matrix_set_color(i, 0x00, 0x00, 0x00); + } else { + RGB_MATRIX_TEST_LED_FLAGS(); + RGB rgb = hsv_to_rgb(effect_func(rgb_matrix_config.hsv, (i - 74), time)); + rgb_matrix_set_color(i, rgb.r, rgb.g, rgb.b); + } + } + return led_max < DRIVER_LED_TOTAL; +} + +static HSV indicator_gradient_math(HSV hsv, uint8_t i, uint8_t time) { + hsv.h = g_led_config.point[i].x - time; + return hsv; +} + +bool indicator_gradient(effect_params_t* params) { return effect_runner_indicator(params, &indicator_gradient_math); } + +static HSV indicator_cycle_all_math(HSV hsv, uint8_t i, uint8_t time) { + hsv.h = time; + return hsv; +} + +bool indicator_cycle_all(effect_params_t* params) { return effect_runner_indicator(params, &indicator_cycle_all_math); } + +#endif // RGB_MATRIX_CUSTOM_EFFECT_IMPLS diff --git a/keyboards/percent/canoe_gen2/rules.mk b/keyboards/percent/canoe_gen2/rules.mk new file mode 100644 index 000000000000..bde9a08fe16b --- /dev/null +++ b/keyboards/percent/canoe_gen2/rules.mk @@ -0,0 +1,26 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +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 = 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 = no # Enable keyboard RGB underglow +BLUETOOTH_ENABLE = no # Enable Bluetooth +AUDIO_ENABLE = no # Audio output +RGB_MATRIX_ENABLE = WS2812 + +LAYOUTS = 65_ansi_blocker_split_bs 65_iso_blocker_split_bs +RGB_MATRIX_CUSTOM_KB = yes From c16ee227843dbdb23907fec50fdcad327aa359d7 Mon Sep 17 00:00:00 2001 From: Ryan Date: Sun, 27 Sep 2020 04:42:40 +1000 Subject: [PATCH 886/930] `setrgb()`: Use arrow operator (#10451) --- keyboards/mxss/rgblight.c | 14 +++++++------- quantum/rgblight.c | 8 ++++---- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/keyboards/mxss/rgblight.c b/keyboards/mxss/rgblight.c index ec4d70e17cd0..130945857f9f 100644 --- a/keyboards/mxss/rgblight.c +++ b/keyboards/mxss/rgblight.c @@ -110,9 +110,9 @@ extern LED_TYPE fleds[2]; hs_set fled_hs[2]; void copyrgb(LED_TYPE *src, LED_TYPE *dst) { - (*dst).r = (*src).r; - (*dst).g = (*src).g; - (*dst).b = (*src).b; + dst->r = src->r; + dst->g = src->g; + dst->b = src->b; } void rgblight_set_clipping_range(uint8_t start_pos, uint8_t num_leds) { @@ -145,11 +145,11 @@ void sethsv_raw(uint8_t hue, uint8_t sat, uint8_t val, LED_TYPE *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; + led1->w = 0; #endif } diff --git a/quantum/rgblight.c b/quantum/rgblight.c index 211ec975a6df..76bb6eb8cb9a 100644 --- a/quantum/rgblight.c +++ b/quantum/rgblight.c @@ -132,11 +132,11 @@ void sethsv_raw(uint8_t hue, uint8_t sat, uint8_t val, LED_TYPE *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; + led1->w = 0; #endif } From 28ff51175b6d45ce5a8dbfe7ed6e7a12df3bc8a8 Mon Sep 17 00:00:00 2001 From: precondition <57645186+precondition@users.noreply.github.com> Date: Sat, 26 Sep 2020 23:11:40 +0000 Subject: [PATCH 887/930] [Docs] Wording & formatting changes in the Tapping Force Hold section of the Tap Hold page + removed trailing whitespaces (#10391) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Wording & formatting changes in Tapping Force Hold The Permissive Hold and the Ignore Mod Tap Interrupt sections were also modified to remove the quotes around "tapping". * Removed all trailing whitespaces from tap hold doc * "it's simply really:" → "it's simple really:" * "This allows to keep the ability" → "This allows keeping the ability" Used the gerund form of "to keep" in the Tapping Force Hold section of the Tap Hold docs. Co-authored-by: ridingqwerty Co-authored-by: ridingqwerty --- docs/tap_hold.md | 42 +++++++++++++++++++++--------------------- 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/docs/tap_hold.md b/docs/tap_hold.md index 589ec3181609..9ffbfde8fc19 100644 --- a/docs/tap_hold.md +++ b/docs/tap_hold.md @@ -1,22 +1,22 @@ # Tap-Hold Configuration Options -While Tap-Hold options are fantastic, they are not without their issues. We have tried to configure them with reasonable defaults, but that may still cause issues for some people. +While Tap-Hold options are fantastic, they are not without their issues. We have tried to configure them with reasonable defaults, but that may still cause issues for some people. These options let you modify the behavior of the Tap-Hold keys. ## Tapping Term -The crux of all of the following features is the tapping term setting. This determines what is a tap and what is a hold. And the exact timing for this to feel natural can vary from keyboard to keyboard, from switch to switch, and from key to key. +The crux of all of the following features is the tapping term setting. This determines what is a tap and what is a hold. And the exact timing for this to feel natural can vary from keyboard to keyboard, from switch to switch, and from key to key. -You can set the global time for this by adding the following setting to your `config.h`: +You can set the global time for this by adding the following setting to your `config.h`: ```c #define TAPPING_TERM 200 ``` -This setting is defined in milliseconds, and does default to 200ms. This is a good average for a majority of people. +This setting is defined in milliseconds, and does default to 200ms. This is a good average for a majority of people. -For more granular control of this feature, you can add the following to your `config.h`: +For more granular control of this feature, you can add the following to your `config.h`: ```c #define TAPPING_TERM_PER_KEY ``` @@ -45,9 +45,9 @@ As of [PR#1359](https://github.com/qmk/qmk_firmware/pull/1359/), there is a new #define PERMISSIVE_HOLD ``` -This makes tap and hold keys (like Mod Tap) work better for fast typists, or for high `TAPPING_TERM` settings. +This makes tap and hold keys (like Mod Tap) work better for fast typists, or for high `TAPPING_TERM` settings. -If you press a Mod Tap key, tap another key (press and release) and then release the Mod Tap key, all within the tapping term, it will output the "tapping" function for both keys. +If you press a Mod Tap key, tap another key (press and release) and then release the Mod Tap key, all within the tapping term, it will output the tapping function for both keys. For Instance: @@ -56,7 +56,7 @@ For Instance: - `KC_X` Up - `SFT_T(KC_A)` Up -Normally, if you do all this within the `TAPPING_TERM` (default: 200ms) this will be registered as `ax` by the firmware and host system. With permissive hold enabled, this modifies how this is handled by considering the Mod Tap keys as a Mod if another key is tapped, and would registered as `X` (`SHIFT`+`x`). +Normally, if you do all this within the `TAPPING_TERM` (default: 200ms) this will be registered as `ax` by the firmware and host system. With permissive hold enabled, this modifies how this is handled by considering the Mod Tap keys as a Mod if another key is tapped, and would registered as `X` (`SHIFT`+`x`). ?> 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`. @@ -87,7 +87,7 @@ To enable this setting, add this to your `config.h`: #define IGNORE_MOD_TAP_INTERRUPT ``` -Similar to Permissive Hold, this alters how the firmware processes inputs for fast typists. If you press a Mod Tap key, press another key, release the Mod Tap key, and then release the normal key, it would normally output the "tapping" function for both keys. This may not be desirable for rolling combo keys. +Similar to Permissive Hold, this alters how the firmware processes inputs for fast typists. If you press a Mod Tap key, press another key, release the Mod Tap key, and then release the normal key, it would normally output the tapping function for both keys. This may not be desirable for rolling combo keys. Setting `Ignore Mod Tap Interrupt` requires holding both keys for the `TAPPING_TERM` to trigger the hold function (the mod). @@ -126,27 +126,27 @@ bool get_ignore_mod_tap_interrupt(uint16_t keycode, keyrecord_t *record) { ## Tapping Force Hold -To enable `tapping force hold`, add the following to your `config.h`: +To enable `tapping force hold`, add the following to your `config.h`: ```c #define TAPPING_FORCE_HOLD ``` -When the user holds a key after tap, this repeats the tapped key rather to hold a modifier key. This allows to use auto repeat for the tapped key. +When the user holds a key after tapping it, the tapping function is repeated by default, rather than activating the hold function. This allows keeping the ability to auto-repeat the tapping function of a dual-role key. `TAPPING_FORCE_HOLD` removes that ability to let the user activate the hold function instead, in the case of holding the dual-role key after having tapped it. Example: -- SFT_T(KC_A) Down -- SFT_T(KC_A) Up -- SFT_T(KC_A) Down -- wait more than tapping term... -- SFT_T(KC_A) Up +- `SFT_T(KC_A)` Down +- `SFT_T(KC_A)` Up +- `SFT_T(KC_A)` Down +- wait until the tapping term expires... +- `SFT_T(KC_A)` Up With default settings, `a` will be sent on the first release, then `a` will be sent on the second press allowing the computer to trigger its auto repeat function. With `TAPPING_FORCE_HOLD`, the second press will be interpreted as a Shift, allowing to use it as a modifier shortly after having used it as a tap. -!> `TAPPING_FORCE_HOLD` will break anything that uses tapping toggles (Such as the `TT` layer keycode, and the One Shot Tapping Toggle). +!> `TAPPING_FORCE_HOLD` will break anything that uses tapping toggles (Such as the `TT` layer keycode, and the One Shot Tap Toggle). For more granular control of this feature, you can add the following to your `config.h`: @@ -169,7 +169,7 @@ bool get_tapping_force_hold(uint16_t keycode, keyrecord_t *record) { ## Retro Tapping -To enable `retro tapping`, add the following to your `config.h`: +To enable `retro tapping`, add the following to your `config.h`: ```c #define RETRO_TAPPING @@ -179,11 +179,11 @@ Holding and releasing a dual function key without pressing another key will resu For instance, holding and releasing `LT(2, KC_SPACE)` without hitting another key will result in nothing happening. With this enabled, it will send `KC_SPACE` instead. -## Why do we include the key record for the per key functions? +## Why do we include the key record for the per key functions? -One thing that you may notice is that we include the key record for all of the "per key" functions, and may be wondering why we do that. +One thing that you may notice is that we include the key record for all of the "per key" functions, and may be wondering why we do that. -Well, it's simply really: customization. But specifically, it depends on how your keyboard is wired up. For instance, if each row is actually using a row in the keyboard's matrix, then it may be simpler to use `if (record->event.row == 3)` instead of checking a whole bunch of keycodes. Which is especially good for those people using the Tap Hold type keys on the home row. So you could fine tune those to not interfere with your normal typing. +Well, it's simple really: customization. But specifically, it depends on how your keyboard is wired up. For instance, if each row is actually using a row in the keyboard's matrix, then it may be simpler to use `if (record->event.row == 3)` instead of checking a whole bunch of keycodes. Which is especially good for those people using the Tap Hold type keys on the home row. So you could fine tune those to not interfere with your normal typing. ## Why is there no `*_kb` or `*_user` functions?! From 323c6dfe72fd29dd2349d209346d54cfd36425d5 Mon Sep 17 00:00:00 2001 From: 2Moons-JP Date: Sun, 27 Sep 2020 13:19:49 +0900 Subject: [PATCH 888/930] Trifecta Keymap --- keyboards/basekeys/trifecta/keymaps/via/keymap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/keyboards/basekeys/trifecta/keymaps/via/keymap.c b/keyboards/basekeys/trifecta/keymaps/via/keymap.c index 777a9c53fbf3..e1f401bc2401 100644 --- a/keyboards/basekeys/trifecta/keymaps/via/keymap.c +++ b/keyboards/basekeys/trifecta/keymaps/via/keymap.c @@ -24,7 +24,7 @@ enum layer_names { const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_BASE] = LAYOUT( - KC_ESC, RGB_TOG, 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_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_DEL, 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, 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, MO(_MEDIA), KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, From 70fce6564fe691912387d09344efa1d1ce5b949e Mon Sep 17 00:00:00 2001 From: Ryan Date: Sun, 27 Sep 2020 20:33:03 +1000 Subject: [PATCH 889/930] Add logic for AT90USBxx7 where needed (#10203) --- bootloader.mk | 12 ++++++------ lib/python/qmk/constants.py | 2 +- quantum/config_common.h | 4 ++-- quantum/keymap.h | 4 ++++ quantum/mcu_selection.mk | 2 +- 5 files changed, 14 insertions(+), 10 deletions(-) diff --git a/bootloader.mk b/bootloader.mk index d5f803f896f5..a7e596e4761c 100644 --- a/bootloader.mk +++ b/bootloader.mk @@ -35,30 +35,30 @@ ifeq ($(strip $(BOOTLOADER)), atmel-dfu) OPT_DEFS += -DBOOTLOADER_ATMEL_DFU OPT_DEFS += -DBOOTLOADER_DFU - ifneq (,$(filter $(MCU), at90usb646 atmega16u2 atmega16u4 atmega32u2 atmega32u4)) + ifneq (,$(filter $(MCU), atmega16u2 atmega32u2 atmega16u4 atmega32u4 at90usb646 at90usb647)) BOOTLOADER_SIZE = 4096 endif - ifeq ($(strip $(MCU)), at90usb1286) + ifneq (,$(filter $(MCU), at90usb1286 at90usb1287)) BOOTLOADER_SIZE = 8192 endif endif ifeq ($(strip $(BOOTLOADER)), lufa-dfu) OPT_DEFS += -DBOOTLOADER_LUFA_DFU OPT_DEFS += -DBOOTLOADER_DFU - ifneq (,$(filter $(MCU), at90usb646 atmega16u2 atmega16u4 atmega32u2 atmega32u4)) + ifneq (,$(filter $(MCU), atmega16u2 atmega32u2 atmega16u4 atmega32u4 at90usb646 at90usb647)) BOOTLOADER_SIZE = 4096 endif - ifeq ($(strip $(MCU)), at90usb1286) + ifneq (,$(filter $(MCU), at90usb1286 at90usb1287)) BOOTLOADER_SIZE = 8192 endif endif ifeq ($(strip $(BOOTLOADER)), qmk-dfu) OPT_DEFS += -DBOOTLOADER_QMK_DFU OPT_DEFS += -DBOOTLOADER_DFU - ifneq (,$(filter $(MCU), at90usb646 atmega16u2 atmega16u4 atmega32u2 atmega32u4)) + ifneq (,$(filter $(MCU), atmega16u2 atmega32u2 atmega16u4 atmega32u4 at90usb646 at90usb647)) BOOTLOADER_SIZE = 4096 endif - ifeq ($(strip $(MCU)), at90usb1286) + ifneq (,$(filter $(MCU), at90usb1286 at90usb1287)) BOOTLOADER_SIZE = 8192 endif endif diff --git a/lib/python/qmk/constants.py b/lib/python/qmk/constants.py index 0a4708e4ce76..0450724df4e1 100644 --- a/lib/python/qmk/constants.py +++ b/lib/python/qmk/constants.py @@ -10,6 +10,6 @@ # Supported processor types ARM_PROCESSORS = 'cortex-m0', 'cortex-m0plus', 'cortex-m3', 'cortex-m4', 'MKL26Z64', 'MK20DX128', 'MK20DX256', 'STM32F042', 'STM32F072', 'STM32F103', 'STM32F303', 'STM32F401', 'STM32F411' -AVR_PROCESSORS = 'at90usb1286', 'at90usb646', 'atmega16u2', 'atmega328p', 'atmega32a', 'atmega32u2', 'atmega32u4', None +AVR_PROCESSORS = 'atmega16u2', 'atmega32u2', 'atmega16u4', 'atmega32u4', 'at90usb646', 'at90usb647', 'at90usb1286', 'at90usb1287', 'atmega328p', 'atmega32a', None ALL_PROCESSORS = ARM_PROCESSORS + AVR_PROCESSORS VUSB_PROCESSORS = 'atmega328p', 'atmega32a', 'atmega328', 'attiny85' diff --git a/quantum/config_common.h b/quantum/config_common.h index 84edc46395e6..c1e6698e5053 100644 --- a/quantum/config_common.h +++ b/quantum/config_common.h @@ -44,7 +44,7 @@ # define PINB_ADDRESS 0x3 # define PINC_ADDRESS 0x6 # define PIND_ADDRESS 0x9 -# elif defined(__AVR_AT90USB1286__) || defined(__AVR_AT90USB646__) +# elif defined(__AVR_AT90USB646__) || defined(__AVR_AT90USB647__) || defined(__AVR_AT90USB1286__) || defined(__AVR_AT90USB1287__) # define ADDRESS_BASE 0x00 # define PINA_ADDRESS 0x0 # define PINB_ADDRESS 0x3 @@ -307,7 +307,7 @@ UCSR1C = _BV(UCSZ11) | _BV(UCSZ10); \ sei(); \ } while (0) -# elif (defined(__AVR_AT90USB646__) || defined(__AVR_AT90USB1286__)) +# elif defined(__AVR_AT90USB646__) || defined(__AVR_AT90USB647__) || defined(__AVR_AT90USB1286__) || defined(__AVR_AT90USB1287__) # define SERIAL_UART_BAUD 115200 # define SERIAL_UART_DATA UDR1 /* UBRR should result in ~16 and set UCSR1A = _BV(U2X1) as per rn42 documentation. HC05 needs baudrate configured accordingly */ diff --git a/quantum/keymap.h b/quantum/keymap.h index 34a9c8f8c652..de3bece11e2b 100644 --- a/quantum/keymap.h +++ b/quantum/keymap.h @@ -40,6 +40,10 @@ along with this program. If not, see . #if defined(PROTOCOL_CHIBIOS) # define RESET QK_RESET #endif +// Gross hack, remove me and change RESET keycode to QK_BOOT +#if defined(__AVR_AT90USB647__) || defined(__AVR_AT90USB1287__) +# undef RESET +#endif #include "quantum_keycodes.h" diff --git a/quantum/mcu_selection.mk b/quantum/mcu_selection.mk index 6ec5dff5f512..295dfd3189e5 100644 --- a/quantum/mcu_selection.mk +++ b/quantum/mcu_selection.mk @@ -280,7 +280,7 @@ ifneq ($(findstring STM32F411, $(MCU)),) DFU_SUFFIX_ARGS ?= -v 0483 -p DF11 endif -ifneq (,$(filter $(MCU),atmega16u2 atmega32u2 atmega16u4 atmega32u4 at90usb646 at90usb1286)) +ifneq (,$(filter $(MCU),atmega16u2 atmega32u2 atmega16u4 atmega32u4 at90usb646 at90usb647 at90usb1286 at90usb1287)) PROTOCOL = LUFA # Processor frequency. From 50835bb13875843cac0236995afe86508744e595 Mon Sep 17 00:00:00 2001 From: Joel Challis Date: Sun, 27 Sep 2020 13:04:27 +0100 Subject: [PATCH 890/930] [keyboard] Add SP-111 support (#10193) * Initial sp111 support * Align with template --- keyboards/sp111/config.h | 83 +++++++++++ keyboards/sp111/info.json | 19 +++ keyboards/sp111/keymaps/default/keymap.c | 57 ++++++++ keyboards/sp111/keymaps/via/config.h | 18 +++ keyboards/sp111/keymaps/via/keymap.c | 42 ++++++ keyboards/sp111/keymaps/via/rules.mk | 1 + keyboards/sp111/matrix.c | 178 +++++++++++++++++++++++ keyboards/sp111/mcp23018.c | 120 +++++++++++++++ keyboards/sp111/mcp23018.h | 34 +++++ keyboards/sp111/readme.md | 21 +++ keyboards/sp111/rules.mk | 30 ++++ keyboards/sp111/sp111.c | 42 ++++++ keyboards/sp111/sp111.h | 41 ++++++ 13 files changed, 686 insertions(+) create mode 100644 keyboards/sp111/config.h create mode 100644 keyboards/sp111/info.json create mode 100644 keyboards/sp111/keymaps/default/keymap.c create mode 100644 keyboards/sp111/keymaps/via/config.h create mode 100644 keyboards/sp111/keymaps/via/keymap.c create mode 100644 keyboards/sp111/keymaps/via/rules.mk create mode 100644 keyboards/sp111/matrix.c create mode 100644 keyboards/sp111/mcp23018.c create mode 100644 keyboards/sp111/mcp23018.h create mode 100644 keyboards/sp111/readme.md create mode 100644 keyboards/sp111/rules.mk create mode 100644 keyboards/sp111/sp111.c create mode 100644 keyboards/sp111/sp111.h diff --git a/keyboards/sp111/config.h b/keyboards/sp111/config.h new file mode 100644 index 000000000000..ee765dc8fb3e --- /dev/null +++ b/keyboards/sp111/config.h @@ -0,0 +1,83 @@ +/* Copyright 2020 blindassassin111 + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License 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 0x544B //TK +#define PRODUCT_ID 0x5111 +#define DEVICE_VER 0x0001 +#define MANUFACTURER The Key Company +#define PRODUCT SP111 + +/* key matrix size */ +#define MATRIX_ROWS 6*2 +#define MATRIX_COLS 11 + +/* 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 useful 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 + +/* + * 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 */ +#define NO_ACTION_MACRO +#define NO_ACTION_FUNCTION diff --git a/keyboards/sp111/info.json b/keyboards/sp111/info.json new file mode 100644 index 000000000000..e478a3220828 --- /dev/null +++ b/keyboards/sp111/info.json @@ -0,0 +1,19 @@ +{ + "keyboard_name": "SP-111", + "url": "https://thekey.company/products/sp-111", + "maintainer": "blindassassin111", + "width": 22.5, + "height": 6.75, + "layouts": { + "LAYOUT_all": { + "layout": [ + {"label":"F13", "x":0, "y":0}, {"label":"F14", "x":1, "y":0}, {"label":"F15", "x":2, "y":0}, {"label":"F16", "x":3, "y":0}, {"label":"Esc", "x":4.5, "y":0}, {"label":"F1", "x":5.75, "y":0}, {"label":"F2", "x":6.75, "y":0}, {"label":"F3", "x":7.75, "y":0}, {"label":"F4", "x":8.75, "y":0}, {"label":"F5", "x":10, "y":0}, {"label":"F6", "x":11, "y":0}, {"label":"F7", "x":12.75, "y":0}, {"label":"F8", "x":13.75, "y":0}, {"label":"F9", "x":15, "y":0}, {"label":"F10", "x":16, "y":0}, {"label":"F11", "x":17, "y":0}, {"label":"F12", "x":18, "y":0}, {"label":"Prt Scn", "x":19.25, "y":0}, {"label":"Scl Lck", "x":20.5, "y":0}, {"label":"Pause", "x":21.5, "y":0}, + {"label":"Num Lock", "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.5, "y":1.5}, {"label":"!", "x":5.5, "y":1.5}, {"label":"@", "x":6.5, "y":1.5}, {"label":"#", "x":7.5, "y":1.5}, {"label":"$", "x":8.5, "y":1.5}, {"label":"%", "x":9.5, "y":1.5}, {"label":"^", "x":10.5, "y":1.5}, {"label":"&", "x":12.25, "y":1.5}, {"label":"*", "x":13.25, "y":1.5}, {"label":"(", "x":14.25, "y":1.5}, {"label":")", "x":15.25, "y":1.5}, {"label":"_", "x":16.25, "y":1.5}, {"label":"+", "x":17.25, "y":1.5}, {"label":"Backspace", "x":18.25, "y":1.5}, {"label":"Backspace2", "x":19.25, "y":1.5}, {"label":"Home", "x":20.5, "y":1.5}, {"label":"Insert", "x":21.5, "y":1.5}, + {"label":"7", "x":0, "y":2.5}, {"label":"8", "x":1, "y":2.5}, {"label":"9", "x":2, "y":2.5}, {"label":"+", "x":3, "y":2.5}, {"label":"Tab", "x":4.5, "y":2.5, "w":1.5}, {"label":"Q", "x":6, "y":2.5}, {"label":"W", "x":7, "y":2.5}, {"label":"E", "x":8, "y":2.5}, {"label":"R", "x":9, "y":2.5}, {"label":"T", "x":10, "y":2.5}, {"label":"Y", "x":11.75, "y":2.5}, {"label":"U", "x":12.75, "y":2.5}, {"label":"I", "x":13.75, "y":2.5}, {"label":"O", "x":14.75, "y":2.5}, {"label":"P", "x":15.75, "y":2.5}, {"label":"{", "x":16.75, "y":2.5}, {"label":"}", "x":17.75, "y":2.5}, {"label":"|", "x":18.75, "y":2.5, "w":1.5}, {"label":"End", "x":20.5, "y":2.5}, {"label":"Delete", "x":21.5, "y":2.5}, + {"label":"4", "x":0, "y":3.5}, {"label":"5", "x":1, "y":3.5}, {"label":"6", "x":2, "y":3.5}, {"label":"=", "x":3, "y":3.5}, {"label":"Caps Lock", "x":4.5, "y":3.5, "w":1.75}, {"label":"A", "x":6.25, "y":3.5}, {"label":"S", "x":7.25, "y":3.5}, {"label":"D", "x":8.25, "y":3.5}, {"label":"F", "x":9.25, "y":3.5}, {"label":"G", "x":10.25, "y":3.5}, {"label":"H", "x":12, "y":3.5}, {"label":"J", "x":13, "y":3.5}, {"label":"K", "x":14, "y":3.5}, {"label":"L", "x":15, "y":3.5}, {"label":":", "x":16, "y":3.5}, {"label":"\"", "x":17, "y":3.5}, {"label":"Enter", "x":18, "y":3.5, "w":2.25}, {"label":"PgUp", "x":20.5, "y":3.5}, {"label":"PgDn", "x":21.5, "y":3.5}, + {"label":"1", "x":0, "y":4.5}, {"label":"2", "x":1, "y":4.5}, {"label":"3", "x":2, "y":4.5}, {"label":"Enter", "x":3, "y":4.5}, {"label":"Shift", "x":4.5, "y":4.5, "w":1.25}, {"label":"numbs", "x":5.75, "y":4.5, "w":1}, {"label":"Z", "x":6.75, "y":4.5}, {"label":"X", "x":7.75, "y":4.5}, {"label":"C", "x":8.75, "y":4.5}, {"label":"V", "x":9.75, "y":4.5}, {"label":"B", "x":10.75, "y":4.5}, {"label":"N", "x":12.5, "y":4.5}, {"label":"M", "x":13.5, "y":4.5}, {"label":"<", "x":14.5, "y":4.5}, {"label":">", "x":15.5, "y":4.5}, {"label":"?", "x":16.5, "y":4.5}, {"label":"Shift", "x":17.5, "y":4.5, "w":1.75}, {"label":"Fn", "x":19.25, "y":4.5}, {"label":"\u2191", "x":20.5, "y":4.75}, + {"label":"0", "x":0, "y":5.5}, {"label":"00", "x":1, "y":5.5}, {"label":".", "x":2, "y":5.5}, {"label":"..", "x":3, "y":5.5}, {"label":"Ctrl", "x":4.5, "y":5.5, "w":1.25}, {"label":"Code", "x":5.75, "y":5.5, "w":1.25}, {"label":"Alt", "x":7, "y":5.5, "w":1.25}, {"label":"Fn", "x":8.25, "y":5.5, "w":1}, {"label":"", "x":9.25, "y":5.5, "w":2.25}, {"label":"", "x":12.25, "y":5.5, "w":2.25}, {"label":"", "x":14.5, "y":5.5, "w":1}, {"label":"Alt", "x":15.5, "y":5.5, "w":1.25}, {"label":"Code", "x":16.75, "y":5.5, "w":1.25}, {"label":"Ctrl", "x":18, "y":5.5, "w":1.25}, {"label":"\u2190", "x":19.5, "y":5.75}, {"label":"\u2193", "x":20.5, "y":5.75}, {"label":"\u2192", "x":21.5, "y":5.75} + ] + } + } +} diff --git a/keyboards/sp111/keymaps/default/keymap.c b/keyboards/sp111/keymaps/default/keymap.c new file mode 100644 index 000000000000..0cb29f42a09c --- /dev/null +++ b/keyboards/sp111/keymaps/default/keymap.c @@ -0,0 +1,57 @@ +/* Copyright 2020 blindassassin111 + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public 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 { + KC_P00 = SAFE_RANGE +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_BASE] = LAYOUT_all( + KC_MUTE, KC_MPRV, KC_MPLY, KC_MNXT, 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_DEL, KC_HOME, KC_INS, + 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_END, KC_DEL, + KC_P4, KC_P5, KC_P6, KC_PEQL, 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_PGDN, + KC_P1, KC_P2, KC_P3, KC_PENT, 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_P0, KC_P0, KC_P00, KC_PDOT, KC_LCTL, KC_LGUI, KC_LALT, KC_MUTE, KC_SPC, KC_SPC, KC_APP, KC_RALT, KC_RGUI, KC_RCTL, KC_LEFT, KC_DOWN, KC_RIGHT), + + [_FN] = LAYOUT_all( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______), +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + if (record->event.pressed) { + switch (keycode) { + case KC_P00: + tap_code(KC_P0); + tap_code(KC_P0); + return false; + } + } + return true; +} diff --git a/keyboards/sp111/keymaps/via/config.h b/keyboards/sp111/keymaps/via/config.h new file mode 100644 index 000000000000..e16379c5d938 --- /dev/null +++ b/keyboards/sp111/keymaps/via/config.h @@ -0,0 +1,18 @@ +/* Copyright 2020 blindassassin111 + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License 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 DYNAMIC_KEYMAP_LAYER_COUNT 3 diff --git a/keyboards/sp111/keymaps/via/keymap.c b/keyboards/sp111/keymaps/via/keymap.c new file mode 100644 index 000000000000..1cb4380dd5ed --- /dev/null +++ b/keyboards/sp111/keymaps/via/keymap.c @@ -0,0 +1,42 @@ +/* Copyright 2020 blindassassin111 + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public 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_MUTE, KC_MPRV, KC_MPLY, KC_MNXT, 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_DEL, KC_HOME, KC_INS, + 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_END, KC_DEL, + KC_P4, KC_P5, KC_P6, KC_PEQL, 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_PGDN, + KC_P1, KC_P2, KC_P3, KC_PENT, 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_P0, KC_P0, KC_P0, KC_PDOT, KC_LCTL, KC_LGUI, KC_LALT, KC_MUTE, KC_SPC, KC_SPC, KC_APP, KC_RALT, KC_RGUI, KC_RCTL, KC_LEFT, KC_DOWN, KC_RIGHT), + + [1] = LAYOUT_all( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______), + + [2] = LAYOUT_all( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______), +}; diff --git a/keyboards/sp111/keymaps/via/rules.mk b/keyboards/sp111/keymaps/via/rules.mk new file mode 100644 index 000000000000..1e5b99807cb7 --- /dev/null +++ b/keyboards/sp111/keymaps/via/rules.mk @@ -0,0 +1 @@ +VIA_ENABLE = yes diff --git a/keyboards/sp111/matrix.c b/keyboards/sp111/matrix.c new file mode 100644 index 000000000000..33b232dca77b --- /dev/null +++ b/keyboards/sp111/matrix.c @@ -0,0 +1,178 @@ +/* Copyright 2020 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 . + */ +#include "mcp23018.h" +#include "quantum.h" + +// Optimize scanning code for speed as a slight mitigation for the port expander +#pragma GCC push_options +#pragma GCC optimize("-O3") + +#define I2C_ADDR 0x20 + +static uint16_t mcp23018_reset_loop = 0; +static uint8_t mcp23018_errors = 0; + +static const pin_t row_pins[MATRIX_ROWS / 2] = {B1, D5, D4, D6, D7, B4}; +static const pin_t col_pins[MATRIX_COLS] = {F5, F6, F7, C7, C6, B6, B5, D3, D2, B3, B2}; + +//_____REGULAR funcs____________________________________________________________ + +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 / 2; 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 + matrix_row_t current_row_value = 0; + + // Select row and wait for row selection to stabilize + select_row(current_row); + wait_us(5); + + // 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_row_value |= pin_state ? 0 : (MATRIX_ROW_SHIFTER << col_index); + } + + // Unselect row + unselect_row(current_row); + + if (last_row_value == current_row_value) { + return false; + } + + current_matrix[current_row] = current_row_value; + return true; +} + +//_____MCP23018 funcs___________________________________________________________ + +static void init_pins_MCP23018(void) { + mcp23018_errors += !mcp23018_set_config(I2C_ADDR, mcp23018_PORTA, 0b11111111); + mcp23018_errors += !mcp23018_set_config(I2C_ADDR, mcp23018_PORTB, 0b01100000); +} + +static void select_row_MCP23018(uint8_t row) { + uint8_t mask = 0; + + switch (row) { + case 6: + mask = 0b10000000; + break; + case 7: + mask = 0b00000001; + break; + case 8: + mask = 0b00000010; + break; + case 9: + mask = 0b00000100; + break; + case 10: + mask = 0b00001000; + break; + case 11: + mask = 0b00010000; + break; + } + + mcp23018_errors += !mcp23018_set_output(I2C_ADDR, mcp23018_PORTB, ~mask); +} + +static uint16_t read_cols_MCP23018(void) { + uint16_t tmp = 0xFFFF; + mcp23018_errors += !mcp23018_readPins_all(I2C_ADDR, &tmp); + + uint16_t state = ((tmp & 0b11111111) << 2) | ((tmp & 0b0110000000000000) >> 13); + return (~state) & 0b1111111111; +} + +static bool read_cols_on_row_MCP23018(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]; + + // No need to Clear data in matrix row as we just replace in one go + + // Select row and wait for row selection to stabilize + select_row_MCP23018(current_row); + + matrix_row_t current_row_value = read_cols_MCP23018(); + + // No need to Unselect row as the next `select_row` will blank everything + + if (last_row_value == current_row_value) { + return false; + } + + current_matrix[current_row] = current_row_value; + return true; +} + +//_____CUSTOM MATRIX IMPLEMENTATION____________________________________________________ + +void matrix_init_custom(void) { + mcp23018_init(I2C_ADDR); + + init_pins(); + init_pins_MCP23018(); +} + +bool matrix_scan_custom(matrix_row_t current_matrix[]) { + bool changed = false; + for (uint8_t current_row = 0; current_row < MATRIX_ROWS / 2; current_row++) { + changed |= read_cols_on_row(current_matrix, current_row); + } + + if (mcp23018_errors) { + if (++mcp23018_reset_loop > 0x7FFF) { + // tuned to about 5s given the current scan rate + print("trying to reset mcp23018\n"); + mcp23018_reset_loop = 0; + mcp23018_errors = 0; + init_pins_MCP23018(); + } + return changed; + } + + for (uint8_t current_row = MATRIX_ROWS / 2; current_row < MATRIX_ROWS; current_row++) { + changed |= read_cols_on_row_MCP23018(current_matrix, current_row); + } + return changed; +} +#pragma GCC pop_options diff --git a/keyboards/sp111/mcp23018.c b/keyboards/sp111/mcp23018.c new file mode 100644 index 000000000000..f1d8e568d29d --- /dev/null +++ b/keyboards/sp111/mcp23018.c @@ -0,0 +1,120 @@ +/* Copyright 2020 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 . + */ +#include "mcp23018.h" +#include "i2c_master.h" +#include "wait.h" +#include "debug.h" + +#define SLAVE_TO_ADDR(n) (n << 1) +#define TIMEOUT 100 + +enum { + CMD_IODIRA = 0x00, // i/o direction register + CMD_IODIRB = 0x01, + CMD_GPPUA = 0x0C, // GPIO pull-up resistor register + CMD_GPPUB = 0x0D, + CMD_GPIOA = 0x12, // general purpose i/o port register (write modifies OLAT) + CMD_GPIOB = 0x13, +}; + +void mcp23018_init(uint8_t addr) { + static uint8_t s_init = 0; + if (!s_init) { + i2c_init(); + wait_ms(1000); + + s_init = 1; + } +} + +bool mcp23018_set_config(uint8_t slave_addr, uint8_t port, uint8_t conf) { + uint8_t addr = SLAVE_TO_ADDR(slave_addr); + uint8_t cmdDirection = port ? CMD_IODIRB : CMD_IODIRA; + uint8_t cmdPullup = port ? CMD_GPPUB : CMD_GPPUA; + + i2c_status_t ret = i2c_writeReg(addr, cmdDirection, &conf, sizeof(conf), TIMEOUT); + if (ret != I2C_STATUS_SUCCESS) { + dprintf("mcp23018_set_config::directionFAILED::%u\n", ret); + return false; + } + + ret = i2c_writeReg(addr, cmdPullup, &conf, sizeof(conf), TIMEOUT); + if (ret != I2C_STATUS_SUCCESS) { + dprintf("mcp23018_set_config::pullupFAILED::%u\n", ret); + return false; + } + + return true; +} + +bool mcp23018_set_output(uint8_t slave_addr, uint8_t port, uint8_t conf) { + uint8_t addr = SLAVE_TO_ADDR(slave_addr); + uint8_t cmd = port ? CMD_GPIOB : CMD_GPIOA; + + i2c_status_t ret = i2c_writeReg(addr, cmd, &conf, sizeof(conf), TIMEOUT); + if (ret != I2C_STATUS_SUCCESS) { + dprintf("mcp23018_set_output::FAILED::%u\n", ret); + return false; + } + + return true; +} + +bool mcp23018_set_output_all(uint8_t slave_addr, uint8_t confA, uint8_t confB) { + uint8_t addr = SLAVE_TO_ADDR(slave_addr); + uint8_t conf[2] = {confA, confB}; + + i2c_status_t ret = i2c_writeReg(addr, CMD_GPIOA, &conf[0], sizeof(conf), TIMEOUT); + if (ret != I2C_STATUS_SUCCESS) { + dprintf("mcp23018_set_output::FAILED::%u\n", ret); + return false; + } + + return true; +} + +bool mcp23018_readPins(uint8_t slave_addr, uint8_t port, uint8_t* out) { + uint8_t addr = SLAVE_TO_ADDR(slave_addr); + uint8_t cmd = port ? CMD_GPIOB : CMD_GPIOA; + + i2c_status_t ret = i2c_readReg(addr, cmd, out, sizeof(uint8_t), TIMEOUT); + if (ret != I2C_STATUS_SUCCESS) { + dprintf("mcp23018_readPins::FAILED::%u\n", ret); + return false; + } + + return true; +} + +bool mcp23018_readPins_all(uint8_t slave_addr, uint16_t* out) { + uint8_t addr = SLAVE_TO_ADDR(slave_addr); + + typedef union { + uint8_t u8[2]; + uint16_t u16; + } data16; + + data16 data = {.u16 = 0}; + + i2c_status_t ret = i2c_readReg(addr, CMD_GPIOA, &data.u8[0], sizeof(data), TIMEOUT); + if (ret != I2C_STATUS_SUCCESS) { + dprintf("mcp23018_readPins::FAILED::%u\n", ret); + return false; + } + + *out = data.u16; + return true; +} diff --git a/keyboards/sp111/mcp23018.h b/keyboards/sp111/mcp23018.h new file mode 100644 index 000000000000..dc2251b72ff1 --- /dev/null +++ b/keyboards/sp111/mcp23018.h @@ -0,0 +1,34 @@ +/* Copyright 2020 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 +#include + +#define mcp23018_PORTA 0 +#define mcp23018_PORTB 1 + +#define ALL_OUTPUT 0 +#define ALL_INPUT 0xFF +#define ALL_LOW 0 +#define ALL_HIGH 0xFF + +void mcp23018_init(uint8_t addr); +bool mcp23018_set_config(uint8_t slave_addr, uint8_t port, uint8_t conf); +bool mcp23018_set_output(uint8_t slave_addr, uint8_t port, uint8_t conf); +bool mcp23018_set_output_all(uint8_t slave_addr, uint8_t confA, uint8_t confB); +bool mcp23018_readPins(uint8_t slave_addraddr, uint8_t port, uint8_t* ret); +bool mcp23018_readPins_all(uint8_t slave_addr, uint16_t* ret); diff --git a/keyboards/sp111/readme.md b/keyboards/sp111/readme.md new file mode 100644 index 000000000000..b9f8f02e07a8 --- /dev/null +++ b/keyboards/sp111/readme.md @@ -0,0 +1,21 @@ +# SP-111 + +![SP-111](https://i.imgur.com/RPFv9KKl.jpg) + +Southpaw (left sided numpad) allows you to use the numpad and mouse at the same time. +Split allows placement in a comfortable manner for long sessions. +Right side layout to maintain the functionality of a full size board in a much more compact manner. + +* Keyboard Maintainer: [zvecr](https://github.com/zvecr), blindassassin111 +* Hardware Supported: SP-111 +* Hardware Availability: + +Make example for this keyboard (after setting up your build environment): + + make sp111:default + +Flashing example for this keyboard: + + make sp111: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). diff --git a/keyboards/sp111/rules.mk b/keyboards/sp111/rules.mk new file mode 100644 index 000000000000..6aab680742ca --- /dev/null +++ b/keyboards/sp111/rules.mk @@ -0,0 +1,30 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +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 = no # Enable keyboard RGB underglow +BLUETOOTH_ENABLE = no # Enable Bluetooth +AUDIO_ENABLE = no # Audio output +LTO_ENABLE = yes # Smaller (and slightly faster) firmware + + +# custom matrix setup +CUSTOM_MATRIX = lite + +SRC += mcp23018.c matrix.c +QUANTUM_LIB_SRC += i2c_master.c diff --git a/keyboards/sp111/sp111.c b/keyboards/sp111/sp111.c new file mode 100644 index 000000000000..737334998d1b --- /dev/null +++ b/keyboards/sp111/sp111.c @@ -0,0 +1,42 @@ +/* Copyright 2020 blindassassin111 + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#include "sp111.h" + +void keyboard_pre_init_kb(void) { + // enable built in pullups to avoid timeouts when right hand not connected + setPinInputHigh(D0); + setPinInputHigh(D1); + + keyboard_pre_init_user(); +} + +void matrix_init_kb(void) { + setPinOutput(F0); + setPinOutput(F1); + setPinOutput(F4); + + matrix_init_user(); +} + +bool led_update_kb(led_t led_state) { + bool res = led_update_user(led_state); + if (res) { + writePin(F0, led_state.num_lock); + writePin(F1, led_state.caps_lock); + writePin(F4, led_state.scroll_lock); + } + return res; +} diff --git a/keyboards/sp111/sp111.h b/keyboards/sp111/sp111.h new file mode 100644 index 000000000000..fb7e3394ac03 --- /dev/null +++ b/keyboards/sp111/sp111.h @@ -0,0 +1,41 @@ +/* Copyright 2020 blindassassin111 + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License 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 + +#define LAYOUT_all( \ + L00, L01, L02, L03, L04, L05, L06, L07, L08, L09, L0A, R01, R02, R03, R04, R05, R06, R07, R08, R09, \ + L10, L11, L12, L13, L14, L15, L16, L17, L18, L19, L0B, R10, R11, R12, R13, R14, R15, R16, R17, R18, R19, \ + L20, L21, L22, L23, L24, L25, L26, L27, L28, L29, R20, R21, R22, R23, R24, R25, R26, R27, R28, R29, \ + L30, L31, L32, L33, L34, L35, L36, L37, L38, L39, R30, R31, R32, R33, R34, R35, R36, R37, R38, R39, \ + L40, L41, L42, L43, L44, L45, L46, L47, L48, L49, R41, R42, R43, R44, R45, R46, R47, R48, \ + L50, L51, L52, L53, L54, L55, L56, L57, L58, R52, R53, R54, R55, R56, R57, R49, R59 \ +) { \ + { L00, L01, L02, L03, L04, L05, L06, L07, L08, L09, L0A }, \ + { L10, L11, L12, L13, L14, L15, L16, L17, L18, L19, L0B }, \ + { L20, L21, L22, L23, L24, L25, L26, L27, L28, L29, ___ }, \ + { L30, L31, L32, L33, L34, L35, L36, L37, L38, L39, ___ }, \ + { L40, L41, L42, L43, L44, L45, L46, L47, L48, L49, ___ }, \ + { L50, L51, L52, L53, L54, L55, L56, L57, L58, ___, ___ }, \ + { ___, R01, R02, R03, R04, R05, R06, R07, R08, R09, ___ }, \ + { R10, R11, R12, R13, R14, R15, R16, R17, R18, R19, ___ }, \ + { R20, R21, R22, R23, R24, R25, R26, R27, R28, R29, ___ }, \ + { R30, R31, R32, R33, R34, R35, R36, R37, R38, R39, ___ }, \ + { ___, R41, R42, R43, R44, R45, R46, R47, R48, ___, ___ }, \ + { ___, ___, R52, R53, R54, R55, R56, R57, R49, R59, ___ } \ +} From 34b9c51d9cb9694e2e1d0667758f33054a2aad81 Mon Sep 17 00:00:00 2001 From: ridingqwerty Date: Sun, 27 Sep 2020 18:04:24 -0400 Subject: [PATCH 891/930] Keyboard update: SL40 (#10445) * adding alpha variants * adding cajal layouts * adding V2 PCB support adding additional layouts for new PCB version, and correecting incorrect image in info file * Cleanup master -- remove alpha9 * Cleanup master -- remove g4m3ralpha * Cleanup master -- remove cajal & sl40 * Master cleanup -- re-add sl40 * Master cleanup -- correct SL40 image * Keyboard addenda: Production version of sl40 Co-authored-by: worldspawn00 --- keyboards/wsk/sl40/config.h | 16 +++++++ keyboards/wsk/sl40/info.json | 4 ++ keyboards/wsk/sl40/keymaps/default/keymap.c | 45 ++++++++++++++----- keyboards/wsk/sl40/keymaps/prototype/keymap.c | 35 +++++++++++++++ keyboards/wsk/sl40/readme.md | 4 ++ keyboards/wsk/sl40/sl40.c | 16 +++++++ keyboards/wsk/sl40/sl40.h | 45 +++++++++++++++---- 7 files changed, 146 insertions(+), 19 deletions(-) create mode 100644 keyboards/wsk/sl40/keymaps/prototype/keymap.c diff --git a/keyboards/wsk/sl40/config.h b/keyboards/wsk/sl40/config.h index 523e82b478ce..0eb6a625fff4 100644 --- a/keyboards/wsk/sl40/config.h +++ b/keyboards/wsk/sl40/config.h @@ -1,3 +1,19 @@ +/* Copyright 2020 Worldspawn + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License 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/wsk/sl40/info.json b/keyboards/wsk/sl40/info.json index 98fd353d756f..15b2822b643e 100644 --- a/keyboards/wsk/sl40/info.json +++ b/keyboards/wsk/sl40/info.json @@ -7,6 +7,10 @@ "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}] + }, + "LAYOUT_all": { + "layout": [{"label":"Esc", "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":"Y", "x":6, "y":1}, {"label":"U", "x":7, "y":1}, {"label":"I", "x":8, "y":1}, {"label":"O", "x":9, "y":1}, {"label":"P", "x":10, "y":1}, {"label":"{", "x":11, "y":1}, {"label":"}", "x":12, "y":1}, {"label":"BS", "x":13, "y":1}, {"label":"Tab", "x":0, "y":2, "w":1.25}, {"label":"A", "x":1.25, "y":2}, {"label":"S", "x":2.25, "y":2}, {"label":"D", "x":3.25, "y":2}, {"label":"F", "x":4.25, "y":2}, {"label":"G", "x":5.25, "y":2}, {"label":"H", "x":6.25, "y":2}, {"label":"J", "x":7.25, "y":2}, {"label":"K", "x":8.25, "y":2}, {"label":"L", "x":9.25, "y":2}, {"label":":", "x":10.25, "y":2}, {"label":"\"", "x":11.25, "y":2}, {"label":"Enter", "x":12.25, "y":2, "w":1.75}, {"label":"Shift", "x":0, "y":3, "w":1.75}, {"label":"Z", "x":1.75, "y":3}, {"label":"X", "x":2.75, "y":3}, {"label":"C", "x":3.75, "y":3}, {"label":"V", "x":4.75, "y":3}, {"label":"B", "x":5.75, "y":3}, {"label":"N", "x":6.75, "y":3}, {"label":"M", "x":7.75, "y":3}, {"label":"<", "x":8.75, "y":3}, {"label":">", "x":9.75, "y":3}, {"label":"?", "x":10.75, "y":3}, {"x":11.75, "y":3}, {"label":"Shift", "x":12.75, "y":3, "w":1.25}, {"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}, {"x":4.75, "y":4, "w":2.25}, {"x":7, "y":4, "w":2}, {"x":9, "y":4}, {"label":"Alt", "x":10, "y":4}, {"label":"Win", "x":11, "y":4}, {"label":"Menu", "x":12, "y":4}, {"label":"Ctrl", "x":13, "y":4}] } } } + diff --git a/keyboards/wsk/sl40/keymaps/default/keymap.c b/keyboards/wsk/sl40/keymaps/default/keymap.c index 97bf62762233..8055d7fd9d5b 100644 --- a/keyboards/wsk/sl40/keymaps/default/keymap.c +++ b/keyboards/wsk/sl40/keymaps/default/keymap.c @@ -1,19 +1,42 @@ +/* Copyright 2020 Worldspawn + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public 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_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), + [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_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, MO(1), KC_SPC, KC_BSPC, MO(2), 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) + [1] = 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_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_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_PGDN, KC_END + ), + [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 + ) }; - diff --git a/keyboards/wsk/sl40/keymaps/prototype/keymap.c b/keyboards/wsk/sl40/keymaps/prototype/keymap.c new file mode 100644 index 000000000000..cc5a2eb8a1d9 --- /dev/null +++ b/keyboards/wsk/sl40/keymaps/prototype/keymap.c @@ -0,0 +1,35 @@ +/* Copyright 2020 Worldspawn + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public 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_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 index 113a09af54d7..86fab353d3d8 100644 --- a/keyboards/wsk/sl40/readme.md +++ b/keyboards/wsk/sl40/readme.md @@ -12,5 +12,9 @@ Make example for this keyboard (after setting up your build environment): make wsk/sl40:default +Flashing example for this keyboard (after setting up your build environment): + + make wsk/sl40: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). diff --git a/keyboards/wsk/sl40/sl40.c b/keyboards/wsk/sl40/sl40.c index 22b3bd41ab4f..6367367afb61 100644 --- a/keyboards/wsk/sl40/sl40.c +++ b/keyboards/wsk/sl40/sl40.c @@ -1 +1,17 @@ +/* Copyright 2020 Worldspawn + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + #include "sl40.h" diff --git a/keyboards/wsk/sl40/sl40.h b/keyboards/wsk/sl40/sl40.h index 94543c1f64d1..e0c28629a137 100644 --- a/keyboards/wsk/sl40/sl40.h +++ b/keyboards/wsk/sl40/sl40.h @@ -1,16 +1,45 @@ +/* Copyright 2020 Worldspawn + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License 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, \ - 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 \ + 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, K22, K23, K24, K25, K26, K27, K28, K29, K2a, K2b, K2c, K2d, \ + K30, K31, K32, K36, K3a, K3b, K3c, K3d \ ) { \ - { 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 } \ + { 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, KC_NO, K22, K23, K24, K25, K26, K27, K28, K29, K2a, K2b, K2c, K2d }, \ + { K30, K31, K32, KC_NO, KC_NO, KC_NO, K36, KC_NO, KC_NO, KC_NO, K3a, K3b, K3c, K3d } \ +} + +#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, K1d, \ + K20, K22, K23, K24, K25, K26, K27, K28, K29, K2a, K2b, K2c, K2d, \ + K30, K31, K32, K34, K36, K38, 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, KC_NO, K22, K23, K24, K25, K26, K27, K28, K29, K2a, K2b, K2c, K2d }, \ + { K30, K31, K32, KC_NO, K34, KC_NO, K36, KC_NO, K38, K39, K3a, K3b, K3c, K3d } \ } From fbdc65e2e956e9d51c94fecdbce1f0abc2817950 Mon Sep 17 00:00:00 2001 From: Drashna Jaelre Date: Sun, 27 Sep 2020 15:11:41 -0700 Subject: [PATCH 892/930] [Keyboard] Add PloopyCo devices (#7935) * Initial Commit for Ploopyco Trackball This is a WIP at this point. Most of it compiles, but the SPI commands are non-functioning as they come from Arduino, so don't exist in LUFA * Convert SPI commands from arduino to LUFA But I have no idea if this is actually correct or not * Update keyboard readme * Clean up ploopyco trackball * Update readme * Update mouse key stuff * last minutue cleanup * Add caveat about scroll wheel * Fixup to code * Additional fixup * Add movement multiplier * Rename folders * mid changes * temp * Got it working!!!!! * Additional cleanup of code * Make unused pin calls more compact * Rotation info * Add debouncing checks * Make everything replaceable * Add info.json * Include ISP flashing info * Better handling for user customization * Reconfigure CPI stuff * fix issues with debug printing * Fix tiny scroll issue * Add and update scroll code from ploopy mouse * Update licensing * Add PloopyCo Mouse * Cleanup and layout stuff * Move common files to main folder for reuse * Increase polling rate * Update image for mouse * Apply changes from code review * Add VIA support --- keyboards/ploopyco/mouse/config.h | 73 +++++ keyboards/ploopyco/mouse/info.json | 21 ++ .../ploopyco/mouse/keymaps/default/keymap.c | 23 ++ .../ploopyco/mouse/keymaps/default/readme.md | 1 + keyboards/ploopyco/mouse/keymaps/via/keymap.c | 26 ++ keyboards/ploopyco/mouse/keymaps/via/rules.mk | 1 + keyboards/ploopyco/mouse/mouse.c | 237 ++++++++++++++ keyboards/ploopyco/mouse/mouse.h | 40 +++ keyboards/ploopyco/mouse/readme.md | 68 ++++ keyboards/ploopyco/mouse/rules.mk | 30 ++ keyboards/ploopyco/opt_encoder.c | 211 ++++++++++++ keyboards/ploopyco/opt_encoder.h | 66 ++++ keyboards/ploopyco/pmw3600.c | 222 +++++++++++++ keyboards/ploopyco/pmw3600.h | 103 ++++++ keyboards/ploopyco/pmw3600_firmware.h | 300 ++++++++++++++++++ keyboards/ploopyco/trackball/config.h | 69 ++++ keyboards/ploopyco/trackball/info.json | 18 ++ .../trackball/keymaps/default/keymap.c | 26 ++ .../trackball/keymaps/default/readme.md | 1 + .../ploopyco/trackball/keymaps/via/keymap.c | 26 ++ .../ploopyco/trackball/keymaps/via/rules.mk | 1 + keyboards/ploopyco/trackball/readme.md | 68 ++++ keyboards/ploopyco/trackball/rules.mk | 30 ++ keyboards/ploopyco/trackball/trackball.c | 237 ++++++++++++++ keyboards/ploopyco/trackball/trackball.h | 40 +++ 25 files changed, 1938 insertions(+) create mode 100644 keyboards/ploopyco/mouse/config.h create mode 100644 keyboards/ploopyco/mouse/info.json create mode 100644 keyboards/ploopyco/mouse/keymaps/default/keymap.c create mode 100644 keyboards/ploopyco/mouse/keymaps/default/readme.md create mode 100644 keyboards/ploopyco/mouse/keymaps/via/keymap.c create mode 100644 keyboards/ploopyco/mouse/keymaps/via/rules.mk create mode 100644 keyboards/ploopyco/mouse/mouse.c create mode 100644 keyboards/ploopyco/mouse/mouse.h create mode 100644 keyboards/ploopyco/mouse/readme.md create mode 100644 keyboards/ploopyco/mouse/rules.mk create mode 100644 keyboards/ploopyco/opt_encoder.c create mode 100644 keyboards/ploopyco/opt_encoder.h create mode 100644 keyboards/ploopyco/pmw3600.c create mode 100644 keyboards/ploopyco/pmw3600.h create mode 100644 keyboards/ploopyco/pmw3600_firmware.h create mode 100644 keyboards/ploopyco/trackball/config.h create mode 100644 keyboards/ploopyco/trackball/info.json create mode 100644 keyboards/ploopyco/trackball/keymaps/default/keymap.c create mode 100644 keyboards/ploopyco/trackball/keymaps/default/readme.md create mode 100644 keyboards/ploopyco/trackball/keymaps/via/keymap.c create mode 100644 keyboards/ploopyco/trackball/keymaps/via/rules.mk create mode 100644 keyboards/ploopyco/trackball/readme.md create mode 100644 keyboards/ploopyco/trackball/rules.mk create mode 100644 keyboards/ploopyco/trackball/trackball.c create mode 100644 keyboards/ploopyco/trackball/trackball.h diff --git a/keyboards/ploopyco/mouse/config.h b/keyboards/ploopyco/mouse/config.h new file mode 100644 index 000000000000..787eb9a85eef --- /dev/null +++ b/keyboards/ploopyco/mouse/config.h @@ -0,0 +1,73 @@ +/* Copyright 2020 Christopher Courtney, aka Drashna Jael're (@drashna) + * Copyright 2019 Sunjun Kim + * Copyright 2020 Ploopy Corporation + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License 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 0x5043 +#define PRODUCT_ID 0x4D6F +#define DEVICE_VER 0x0001 +#define MANUFACTURER Ploopyco +#define PRODUCT Mouse + +/* key matrix size */ +#define MATRIX_ROWS 1 +#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 DIRECT_PINS \ + { \ + { D4, D2, E6, B6, D7, C6, C7, B7 } \ + } + +// These pins are not broken out, and cannot be used normally. +// They are set as output and pulled high, by default +#define UNUSED_PINS \ + { B4, D6, F1, F5, F6, F7 } + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCE 5 + +/* Much more so than a keyboard, speed matters for a mouse. So we'll go for as high + a polling rate as possible. */ +#define USB_POLLING_INTERVAL_MS 1 + +/* define if matrix has ghost (lacks anti-ghosting diodes) */ +//#define MATRIX_HAS_GHOST + +/* 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 3 diff --git a/keyboards/ploopyco/mouse/info.json b/keyboards/ploopyco/mouse/info.json new file mode 100644 index 000000000000..6763838dcf0c --- /dev/null +++ b/keyboards/ploopyco/mouse/info.json @@ -0,0 +1,21 @@ +{ + "keyboard_name": "PloopyCo Mouse", + "url": "", + "maintainer": "drashna", + "width": 8, + "height": 3, + "layouts": { + "LAYOUT": { + "layout": [ + {"x":1, "y":0, "h":2}, + {"x":2, "y":0, "h":2}, + {"x":3, "y":0.25, "h":1.25}, + {"x":4, "y":0, "h":2}, + {"x":5, "y":0, "h":2}, + {"x":0, "y":0}, + {"x":0, "y":1}, + {"x":3, "y":1.5} + ] + } + } +} diff --git a/keyboards/ploopyco/mouse/keymaps/default/keymap.c b/keyboards/ploopyco/mouse/keymaps/default/keymap.c new file mode 100644 index 000000000000..c02d23d2abdc --- /dev/null +++ b/keyboards/ploopyco/mouse/keymaps/default/keymap.c @@ -0,0 +1,23 @@ +/* Copyright 2020 Christopher Courtney, aka Drashna Jael're (@drashna) + * Copyright 2019 Sunjun Kim + * Copyright 2020 Ploopy Corporation + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public 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 */ + C(KC_C), KC_BTN1, KC_BTN3, KC_BTN2, C(KC_C), KC_BTN4, KC_BTN5, C(KC_Z)), +}; diff --git a/keyboards/ploopyco/mouse/keymaps/default/readme.md b/keyboards/ploopyco/mouse/keymaps/default/readme.md new file mode 100644 index 000000000000..f965ef3c3263 --- /dev/null +++ b/keyboards/ploopyco/mouse/keymaps/default/readme.md @@ -0,0 +1 @@ +# The default keymap for Ploopyco Trackball diff --git a/keyboards/ploopyco/mouse/keymaps/via/keymap.c b/keyboards/ploopyco/mouse/keymaps/via/keymap.c new file mode 100644 index 000000000000..27a038438116 --- /dev/null +++ b/keyboards/ploopyco/mouse/keymaps/via/keymap.c @@ -0,0 +1,26 @@ +/* Copyright 2020 Christopher Courtney, aka Drashna Jael're (@drashna) + * Copyright 2019 Sunjun Kim + * Copyright 2020 Ploopy Corporation + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public 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 */ + C(KC_C), KC_BTN1, KC_BTN3, KC_BTN2, C(KC_C), KC_BTN4, KC_BTN5, C(KC_Z)), + [1] = LAYOUT(_______, _______, _______, _______, _______, _______, _______, _______), + [2] = LAYOUT(_______, _______, _______, _______, _______, _______, _______, _______), + [3] = LAYOUT(_______, _______, _______, _______, _______, _______, _______, _______), +}; diff --git a/keyboards/ploopyco/mouse/keymaps/via/rules.mk b/keyboards/ploopyco/mouse/keymaps/via/rules.mk new file mode 100644 index 000000000000..1e5b99807cb7 --- /dev/null +++ b/keyboards/ploopyco/mouse/keymaps/via/rules.mk @@ -0,0 +1 @@ +VIA_ENABLE = yes diff --git a/keyboards/ploopyco/mouse/mouse.c b/keyboards/ploopyco/mouse/mouse.c new file mode 100644 index 000000000000..6a9bffbffedd --- /dev/null +++ b/keyboards/ploopyco/mouse/mouse.c @@ -0,0 +1,237 @@ +/* Copyright 2020 Christopher Courtney, aka Drashna Jael're (@drashna) + * Copyright 2019 Sunjun Kim + * Copyright 2020 Ploopy Corporation + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public 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 + +#ifndef OPT_DEBOUNCE +# define OPT_DEBOUNCE 5 // (ms) Time between scroll events +#endif +#ifndef SCROLL_BUTT_DEBOUNCE +# define SCROLL_BUTT_DEBOUNCE 100 // (ms) Time between scroll events +#endif +#ifndef OPT_THRES +# define OPT_THRES 150 // (0-1024) Threshold for actication +#endif +#ifndef OPT_SCALE +# define OPT_SCALE 1 // Multiplier for wheel +#endif + +// TODO: Implement libinput profiles +// https://wayland.freedesktop.org/libinput/doc/latest/pointer-acceleration.html +// Compile time accel selection +// Valid options are ACC_NONE, ACC_LINEAR, ACC_CUSTOM, ACC_QUADRATIC + +// Trackball State +bool is_scroll_clicked = false; +bool BurstState = false; // init burst state for Trackball module +uint16_t MotionStart = 0; // Timer for accel, 0 is resting state +uint16_t lastScroll = 0; // Previous confirmed wheel event +uint16_t lastMidClick = 0; // Stops scrollwheel from being read if it was pressed +uint8_t OptLowPin = OPT_ENC1; +bool debug_encoder = false; + +__attribute__((weak)) void process_wheel_user(report_mouse_t* mouse_report, int16_t h, int16_t v) { + mouse_report->h = h; + mouse_report->v = v; +} + +__attribute__((weak)) void process_wheel(report_mouse_t* mouse_report) { + // TODO: Replace this with interrupt driven code, polling is S L O W + // Lovingly ripped from the Ploopy Source + + // If the mouse wheel was just released, do not scroll. + if (timer_elapsed(lastMidClick) < SCROLL_BUTT_DEBOUNCE) { + return; + } + + // Limit the number of scrolls per unit time. + if (timer_elapsed(lastScroll) < OPT_DEBOUNCE) { + return; + } + + // Don't scroll if the middle button is depressed. + if (is_scroll_clicked) { +#ifndef IGNORE_SCROLL_CLICK + return; +#endif + } + + lastScroll = timer_read(); + uint16_t p1 = adc_read(OPT_ENC1_MUX); + uint16_t p2 = adc_read(OPT_ENC2_MUX); + if (debug_encoder) dprintf("OPT1: %d, OPT2: %d\n", p1, p2); + + uint8_t dir = opt_encoder_handler(p1, p2); + + if (dir == 0) return; + process_wheel_user(mouse_report, mouse_report->h, (int)(mouse_report->v + (dir * OPT_SCALE))); +} + +__attribute__((weak)) void process_mouse_user(report_mouse_t* mouse_report, int16_t x, int16_t y) { + mouse_report->x = x; + mouse_report->y = y; +} + +__attribute__((weak)) void process_mouse(report_mouse_t* mouse_report) { + report_pmw_t data = pmw_read_burst(); + if (data.isOnSurface && data.isMotion) { + // Reset timer if stopped moving + if (!data.isMotion) { + if (MotionStart != 0) MotionStart = 0; + return; + } + + // Set timer if new motion + if ((MotionStart == 0) && data.isMotion) { + if (debug_mouse) dprintf("Starting motion.\n"); + MotionStart = timer_read(); + } + + if (debug_mouse) { + dprintf("Delt] d: %d t: %u\n", abs(data.dx) + abs(data.dy), MotionStart); + } + if (debug_mouse) { + dprintf("Pre ] X: %d, Y: %d\n", data.dx, data.dy); + } +#if defined(PROFILE_LINEAR) + float scale = float(timer_elaspsed(MotionStart)) / 1000.0; + data.dx *= scale; + data.dy *= scale; +#elif defined(PROFILE_INVERSE) + // TODO +#else + // no post processing +#endif + // apply multiplier + // data.dx *= mouse_multiplier; + // data.dy *= mouse_multiplier; + + // Wrap to HID size + data.dx = constrain(data.dx, -127, 127); + data.dy = constrain(data.dy, -127, 127); + if (debug_mouse) dprintf("Cons] X: %d, Y: %d\n", data.dx, data.dy); + // dprintf("Elapsed:%u, X: %f Y: %\n", i, pgm_read_byte(firmware_data+i)); + + process_mouse_user(mouse_report, data.dx, data.dy); + } +} + +bool process_record_kb(uint16_t keycode, keyrecord_t* record) { + if (debug_mouse) { + dprintf("KL: kc: %u, col: %u, row: %u, pressed: %u\n", keycode, record->event.key.col, record->event.key.row, record->event.pressed); + } + + // Update Timer to prevent accidental scrolls + if ((record->event.key.col == 2) && (record->event.key.row == 0)) { + lastMidClick = timer_read(); + is_scroll_clicked = record->event.pressed; + } + +/* If Mousekeys is disabled, then use handle the mouse button + * keycodes. This makes things simpler, and allows usage of + * the keycodes in a consistent manner. But only do this if + * Mousekeys is not enable, so it's not handled twice. + */ +#ifndef MOUSEKEY_ENABLE + if (IS_MOUSEKEY_BUTTON(keycode)) { + report_mouse_t currentReport = pointing_device_get_report(); + if (record->event.pressed) { + if (keycode == KC_MS_BTN1) + currentReport.buttons |= MOUSE_BTN1; + else if (keycode == KC_MS_BTN2) + currentReport.buttons |= MOUSE_BTN2; + else if (keycode == KC_MS_BTN3) + currentReport.buttons |= MOUSE_BTN3; + else if (keycode == KC_MS_BTN4) + currentReport.buttons |= MOUSE_BTN4; + else if (keycode == KC_MS_BTN5) + currentReport.buttons |= MOUSE_BTN5; + } else { + if (keycode == KC_MS_BTN1) + currentReport.buttons &= ~MOUSE_BTN1; + else if (keycode == KC_MS_BTN2) + currentReport.buttons &= ~MOUSE_BTN2; + else if (keycode == KC_MS_BTN3) + currentReport.buttons &= ~MOUSE_BTN3; + else if (keycode == KC_MS_BTN4) + currentReport.buttons &= ~MOUSE_BTN4; + else if (keycode == KC_MS_BTN5) + currentReport.buttons &= ~MOUSE_BTN5; + } + pointing_device_set_report(currentReport); + } +#endif + + return process_record_user(keycode, record); +} + +// Hardware Setup +void keyboard_pre_init_kb(void) { + // debug_enable = true; + // debug_matrix = true; + // debug_mouse = true; + // debug_encoder = true; + + setPinInput(OPT_ENC1); + setPinInput(OPT_ENC2); + + // This is the debug LED. + setPinOutput(F7); + writePin(F7, debug_enable); + + /* Ground all output pins connected to ground. This provides additional + * pathways to ground. If you're messing with this, know this: driving ANY + * of these pins high will cause a short. On the MCU. Ka-blooey. + */ +#ifdef UNUSED_PINS + const pin_t unused_pins[] = UNUSED_PINS; + + for (uint8_t i = 0; i < (sizeof(unused_pins) / sizeof(pin_t)); i++) { + setPinOutput(unused_pins[i]); + writePinLow(unused_pins[i]); + } +#endif + keyboard_pre_init_user(); +} + +void pointing_device_init(void) { + // initialize ball sensor + pmw_spi_init(); + // initialize the scroll wheel's optical encoder + opt_encoder_init(); +} + +bool has_report_changed (report_mouse_t first, report_mouse_t second) { + return !( + (!first.buttons && first.buttons == second.buttons) && + (!first.x && first.x == second.x) && + (!first.y && first.y == second.y) && + (!first.h && first.h == second.h) && + (!first.v && first.v == second.v) ); +} + +void pointing_device_task(void) { + report_mouse_t mouse_report = pointing_device_get_report(); + process_wheel(&mouse_report); + process_mouse(&mouse_report); + + pointing_device_set_report(mouse_report); + if (has_report_changed(mouse_report, pointing_device_get_report())) { + pointing_device_send(); + } +} diff --git a/keyboards/ploopyco/mouse/mouse.h b/keyboards/ploopyco/mouse/mouse.h new file mode 100644 index 000000000000..3c89d64d8c0d --- /dev/null +++ b/keyboards/ploopyco/mouse/mouse.h @@ -0,0 +1,40 @@ +/* Copyright 2020 Christopher Courtney, aka Drashna Jael're (@drashna) + * Copyright 2019 Sunjun Kim + * Copyright 2020 Ploopy Corporation + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License 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 "spi_master.h" +#include "pmw3600.h" +#include "analog.h" +#include "opt_encoder.h" +#include "pointing_device.h" + +// Sensor defs +#define OPT_ENC1 F0 +#define OPT_ENC2 F4 +#define OPT_ENC1_MUX 0 +#define OPT_ENC2_MUX 4 + +void process_mouse(report_mouse_t* mouse_report); +void process_mouse_user(report_mouse_t* mouse_report, int16_t x, int16_t y); +void process_wheel(report_mouse_t* mouse_report); +void process_wheel_user(report_mouse_t* mouse_report, int16_t h, int16_t v); + +#define LAYOUT(BLL, BL, BM, BR, BRR, BF, BB, BDPI) \ + { {BL, BM, BR, BF, BB, BRR, BLL, BDPI}, } diff --git a/keyboards/ploopyco/mouse/readme.md b/keyboards/ploopyco/mouse/readme.md new file mode 100644 index 000000000000..abfa643a44a9 --- /dev/null +++ b/keyboards/ploopyco/mouse/readme.md @@ -0,0 +1,68 @@ +# Ploopyco Mouse + +![Ploopyco Mouse](https://i.redd.it/bf7bkzqzeti51.jpg) + +It's a DIY, QMK Powered Trackball!!!! + +Everything works. However the scroll wheel has some issues and acts very odd. + +* Keyboard Maintainer: [PloopyCo](https://github.com/ploopyco), [Drashna Jael're](https://github.com/drashna/), [Germ](https://github.com/germ/) +* Hardware Supported: ATMega32u4 8MHz(3.3v) +* Hardware Availability: [Store](https://ploopy.co), [GitHub](https://github.com/ploopyco) + +Make example for this keyboard (after setting up your build environment): + + make ploopyco/mouse:default:flash + +To jump to the bootloader, hold down "Button 4" (immediate right of the Mouse) + +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). + +# Customzing your PloopyCo Trackball + +While the defaults are designed so that it can be plugged in and used right away, there are a number of things that you may want to change. Such as adding DPI control, or to use the ball to scroll while holding a button. To allow for this sort of control, there is a callback for both the scroll wheel and the mouse censor. + +The default behavior for this is: + +```c +void process_wheel_user(report_mouse_t* mouse_report, int16_t h, int16_t v) { + mouse_report->h = h; + mouse_report->v = v; +} + +void process_mouse_user(report_mouse_t* mouse_report, int16_t x, int16_t y) { + mouse_report->x = x; + mouse_report->y = y; +} +``` + +This should allow you to more heavily customize the behavior. + +Alternatively, the `process_wheel` and `process_mouse` functions can both be replaced too, to allow for even more functionality. + +Additionally, you can change the DPI/CPI or speed of the Mouse by calling `pmw_set_cpi` at any time. And tThe default can be changed by adding a define to the keymap's `config.h` file: + + #define PMW_CPI 1600 + +# Programming QMK-DFU onto the PloopyCo Mouse + +If you would rather have DFU on this board, you can use the QMK-DFU bootloader on the device. To do so, you want to run: + + make ploopyco/trackball:default:production + +Once you have that, you'll need to [ISP Flash](https://docs.qmk.fm/#/isp_flashing_guide) the chip with the new bootloader hex file created (or the production hex), and set the fuses: + + +| Fuse | Setting | +|----------|------------------| +| Low | `0xDF` | +| High | `0xD8` or `0x98` | +| Extended | `0xCB` | + +Original (Caterina) settings: + +| Fuse | Setting | +|----------|------------------| +| Low | `0xFF` | +| High | `0xD8` | +| Extended | `0xFE` | diff --git a/keyboards/ploopyco/mouse/rules.mk b/keyboards/ploopyco/mouse/rules.mk new file mode 100644 index 000000000000..d77431b676da --- /dev/null +++ b/keyboards/ploopyco/mouse/rules.mk @@ -0,0 +1,30 @@ +# MCU name +MCU = atmega32u4 + +# Processor frequency +F_CPU = 8000000 + +# Bootloader selection +BOOTLOADER = caterina + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +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 +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth +AUDIO_ENABLE = no # Audio output +POINTING_DEVICE_ENABLE = yes +MOUSEKEY_ENABLE = no # Mouse keys + +QUANTUM_LIB_SRC += analog.c spi_master.c +SRC += pmw3600.c opt_encoder.c diff --git a/keyboards/ploopyco/opt_encoder.c b/keyboards/ploopyco/opt_encoder.c new file mode 100644 index 000000000000..44bcd5eb8883 --- /dev/null +++ b/keyboards/ploopyco/opt_encoder.c @@ -0,0 +1,211 @@ +/* Copyright 2020 Christopher Courtney, aka Drashna Jael're (@drashna) + * Copyright 2020 Ploopy Corporation + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#include "opt_encoder.h" + +/* Setup function for the scroll wheel. Initializes + the relevant variables. */ +void opt_encoder_init(void) { + state = HIHI; + lohif = false; + hilof = false; + lowA = 1023; + highA = 0; + cLowA = false; + cHighA = false; + lowIndexA = 0; + highIndexA = 0; + lowOverflowA = false; + highOverflowA = false; + lowB = 1023; + highB = 0; + cLowB = false; + cHighB = false; + lowIndexB = 0; + highIndexB = 0; + lowOverflowB = false; + highOverflowB = false; + scrollThresholdA = 0; + scrollThresholdB = 0; +} + +int opt_encoder_handler(int curA, int curB) { + if (lowOverflowA == false || highOverflowA == false) calculateThresholdA(curA); + if (lowOverflowB == false || highOverflowB == false) calculateThresholdB(curB); + + bool LO = false; + bool HI = true; + bool sA, sB; + int ret = 0; + + if (curA < scrollThresholdA) + sA = LO; + else + sA = HI; + + if (curB < scrollThresholdB) + sB = LO; + else + sB = HI; + + if (state == HIHI) { + if (sA == LO && sB == HI) { + state = LOHI; + if (hilof) { + ret = 1; + hilof = false; + } + } else if (sA == HI && sB == LO) { + state = HILO; + if (lohif) { + ret = -1; + lohif = false; + } + } + } + + else if (state == HILO) { + if (sA == HI && sB == HI) { + state = HIHI; + hilof = true; + lohif = false; + } else if (sA == LO && sB == LO) { + state = LOLO; + hilof = true; + lohif = false; + } + } + + else if (state == LOLO) { + if (sA == HI && sB == LO) { + state = HILO; + if (lohif) { + ret = 1; + lohif = false; + } + } else if (sA == LO && sB == HI) { + state = LOHI; + if (hilof) { + ret = -1; + hilof = false; + } + } + } + + else { // state must be LOHI + if (sA == HI && sB == HI) { + state = HIHI; + lohif = true; + hilof = false; + } else if (sA == LO && sB == LO) { + state = LOLO; + lohif = true; + hilof = false; + } + } + + return ret; +} + +void calculateThresholdA(int curA) { scrollThresholdA = calculateThreshold(curA, &lowA, &highA, &cLowA, &cHighA, arLowA, arHighA, &lowIndexA, &highIndexA, &lowOverflowA, &highOverflowA); } + +void calculateThresholdB(int curB) { scrollThresholdB = calculateThreshold(curB, &lowB, &highB, &cLowB, &cHighB, arLowB, arHighB, &lowIndexB, &highIndexB, &lowOverflowB, &highOverflowB); } + +int calculateThreshold(int cur, int* low, int* high, bool* cLow, bool* cHigh, int arLow[], int arHigh[], int* lowIndex, int* highIndex, bool* lowOverflow, bool* highOverflow) { + if (cur < *low) *low = cur; + if (cur > *high) *high = cur; + + int curThresh = thresholdEquation(*low, *high); + int range = *high - *low; + + // The range is enforced to be over a certain limit because noise + // can cause erroneous readings, making these calculations unstable. + if (range >= SCROLL_THRESH_RANGE_LIM) { + if (cur < curThresh) { + if (*cHigh == true) { + // We were just high, and now we crossed to low. + // high reflects a sample of a high reading. + arHigh[*highIndex] = *high; + incrementIndex(highIndex, highOverflow); + int midpoint = ((*high - *low) / 2) + *low; + *low = midpoint; + *high = midpoint; + *cLow = false; + *cHigh = false; + } else { + *cLow = true; + } + } + if (cur > curThresh) { + if (*cLow == true) { + // We were just low, and now we crossed to high. + // low reflects a sample of a low reading. + arLow[*lowIndex] = *low; + incrementIndex(lowIndex, lowOverflow); + int midpoint = ((*high - *low) / 2) + *low; + *low = midpoint; + *high = midpoint; + *cLow = false; + *cHigh = false; + } else { + *cHigh = true; + } + } + } + + int calcHigh = 0; + if (*highOverflow == true) { + for (int i = 0; i < SCROLLER_AR_SIZE; i++) { + calcHigh += arHigh[i]; + } + calcHigh = calcHigh / SCROLLER_AR_SIZE; + } else if (*highIndex != 0) { + for (int i = 0; i < *highIndex; i++) { + calcHigh += arHigh[i]; + } + calcHigh = calcHigh / *highIndex; + } else { + calcHigh = *high; + } + + int calcLow = 0; + if (*lowOverflow == true) { + for (int i = 0; i < SCROLLER_AR_SIZE; i++) { + calcLow += arLow[i]; + } + calcLow = calcLow / SCROLLER_AR_SIZE; + } else if (*lowIndex != 0) { + for (int i = 0; i < *lowIndex; i++) { + calcLow += arLow[i]; + } + calcLow = calcLow / *lowIndex; + } else { + calcLow = *low; + } + + return thresholdEquation(calcLow, calcHigh); +} + +int thresholdEquation(int lo, int hi) { return ((hi - lo) / 3) + lo; } + +void incrementIndex(int* index, bool* ovflw) { + if (*index < SCROLLER_AR_SIZE - 1) + (*index)++; + else { + *index = 0; + *ovflw = true; + } +} diff --git a/keyboards/ploopyco/opt_encoder.h b/keyboards/ploopyco/opt_encoder.h new file mode 100644 index 000000000000..23a170d59f89 --- /dev/null +++ b/keyboards/ploopyco/opt_encoder.h @@ -0,0 +1,66 @@ +/* Copyright 2020 Christopher Courtney, aka Drashna Jael're (@drashna) + * Copyright 2020 Ploopy Corporation + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License 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 + +#ifndef SCROLLER_AR_SIZE +# define SCROLLER_AR_SIZE 31 +#endif + +#ifndef SCROLL_THRESH_RANGE_LIM +# define SCROLL_THRESH_RANGE_LIM 10 +#endif + +enum State { HIHI, HILO, LOLO, LOHI }; + +enum State state; + +/* Variables used for scroll wheel functionality. */ +bool lohif; +bool hilof; +int lowA; +int highA; +bool cLowA; +bool cHighA; +int lowIndexA; +int highIndexA; +bool lowOverflowA; +bool highOverflowA; +int lowB; +int highB; +bool cLowB; +bool cHighB; +int lowIndexB; +int highIndexB; +bool lowOverflowB; +bool highOverflowB; +int scrollThresholdA; +int scrollThresholdB; +int arLowA[SCROLLER_AR_SIZE]; +int arHighA[SCROLLER_AR_SIZE]; +int arLowB[SCROLLER_AR_SIZE]; +int arHighB[SCROLLER_AR_SIZE]; + +void calculateThresholdA(int curA); +void calculateThresholdB(int curB); +int calculateThreshold(int cur, int* low, int* high, bool* cLow, bool* cHigh, int arLow[], int arHigh[], int* lowIndex, int* highIndex, bool* lowOverflow, bool* highOverflow); +int thresholdEquation(int lo, int hi); +void incrementIndex(int* index, bool* ovflw); + +void opt_encoder_init(void); +int opt_encoder_handler(int curA, int curB); diff --git a/keyboards/ploopyco/pmw3600.c b/keyboards/ploopyco/pmw3600.c new file mode 100644 index 000000000000..93b47078acff --- /dev/null +++ b/keyboards/ploopyco/pmw3600.c @@ -0,0 +1,222 @@ +/* Copyright 2020 Christopher Courtney, aka Drashna Jael're (@drashna) + * Copyright 2019 Sunjun Kim + * Copyright 2020 Ploopy Corporation + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + + +#include "pmw3600.h" +#include "pmw3600_firmware.h" +#ifdef CONSOLE_ENABLE +# include "print.h" +#endif +bool _inBurst = false; + +#ifndef PMW_CPI +# define PMW_CPI 1600 +#endif +#ifndef SPI_DIVISOR +# define SPI_DIVISOR 2 +#endif + +static const int8_t ROTATIONAL_TRANSFORM_ANGLE = 20; + +#ifdef CONSOLE_ENABLE +void print_byte(uint8_t byte) { dprintf("%c%c%c%c%c%c%c%c|", (byte & 0x80 ? '1' : '0'), (byte & 0x40 ? '1' : '0'), (byte & 0x20 ? '1' : '0'), (byte & 0x10 ? '1' : '0'), (byte & 0x08 ? '1' : '0'), (byte & 0x04 ? '1' : '0'), (byte & 0x02 ? '1' : '0'), (byte & 0x01 ? '1' : '0')); } +#endif + + +bool spi_start_adv(void) { + bool status = spi_start(SPI_SS_PIN, false, 3, SPI_DIVISOR); + wait_us(1); + return status; +} + +void spi_stop_adv(void) { + wait_us(1); + spi_stop(); +} + +spi_status_t spi_write_adv(uint8_t reg_addr, uint8_t data) { + if (reg_addr != REG_Motion_Burst) { + _inBurst = false; + } + + spi_start_adv(); + // send address of the register, with MSBit = 1 to indicate it's a write + spi_status_t status = spi_write(reg_addr | 0x80); + status = spi_write(data); + + // tSCLK-NCS for write operation + wait_us(20); + + // tSWW/tSWR (=120us) minus tSCLK-NCS. Could be shortened, but is looks like a safe lower bound + wait_us(100); + spi_stop(); + return status; +} + +uint8_t spi_read_adv(uint8_t reg_addr) { + spi_start_adv(); + // send adress of the register, with MSBit = 0 to indicate it's a read + spi_write(reg_addr & 0x7f); + + uint8_t data = spi_read(); + + // tSCLK-NCS for read operation is 120ns + wait_us(1); + + // tSRW/tSRR (=20us) minus tSCLK-NCS + wait_us(19); + + spi_stop(); + return data; +} + +void pmw_set_cpi(uint16_t cpi) { + int cpival = constrain((cpi / 100) - 1, 0, 0x77); // limits to 0--119 + + spi_start_adv(); + spi_write_adv(REG_Config1, cpival); + spi_stop(); +} + +bool pmw_spi_init(void) { + spi_init(); + _inBurst = false; + + spi_stop(); + spi_start_adv(); + spi_stop(); + + spi_write_adv(REG_Shutdown, 0xb6); // Shutdown first + wait_ms(300); + + spi_start_adv(); + wait_us(40); + spi_stop_adv(); + wait_us(40); + + spi_write_adv(REG_Power_Up_Reset, 0x5a); + wait_ms(50); + + spi_read_adv(REG_Motion); + spi_read_adv(REG_Delta_X_L); + spi_read_adv(REG_Delta_X_H); + spi_read_adv(REG_Delta_Y_L); + spi_read_adv(REG_Delta_Y_H); + + pmw_upload_firmware(); + + spi_write_adv(REG_Angle_Tune, constrain(ROTATIONAL_TRANSFORM_ANGLE, -30, 30)); + spi_stop_adv(); + + wait_ms(10); + pmw_set_cpi(PMW_CPI); + + wait_ms(1); + + return pmw_check_signature(); +} + +void pmw_upload_firmware(void) { + spi_write_adv(REG_Config2, 0x00); + + spi_write_adv(REG_SROM_Enable, 0x1d); + + wait_ms(10); + + spi_write_adv(REG_SROM_Enable, 0x18); + + spi_start_adv(); + spi_write(REG_SROM_Load_Burst | 0x80); + wait_us(15); + + unsigned char c; + for (int i = 0; i < firmware_length; i++) { + c = (unsigned char)pgm_read_byte(firmware_data + i); + spi_write(c); + wait_us(15); + } + wait_us(200); + + spi_read_adv(REG_SROM_ID); + + spi_write_adv(REG_Config2, 0x00); + + spi_stop(); + wait_ms(10); +} + +bool pmw_check_signature(void) { + uint8_t pid = spi_read_adv(REG_Product_ID); + uint8_t iv_pid = spi_read_adv(REG_Inverse_Product_ID); + uint8_t SROM_ver = spi_read_adv(REG_SROM_ID); + return (pid == 0x42 && iv_pid == 0xBD && SROM_ver == 0x04); // signature for SROM 0x04 +} + +report_pmw_t pmw_read_burst(void) { + if (!_inBurst) { +#ifdef CONSOLE_ENABLE + dprintf("burst on"); +#endif + spi_write_adv(REG_Motion_Burst, 0x00); + _inBurst = true; + } + + spi_start_adv(); + spi_write(REG_Motion_Burst); + wait_us(35); // waits for tSRAD + + report_pmw_t data; + data.motion = 0; + data.dx = 0; + data.mdx = 0; + data.dy = 0; + data.mdx = 0; + + data.motion = spi_read(); + spi_write(0x00); // skip Observation + data.dx = spi_read(); + data.mdx = spi_read(); + data.dy = spi_read(); + data.mdy = spi_read(); + + spi_stop(); + +#ifdef CONSOLE_ENABLE + print_byte(data.motion); + print_byte(data.dx); + print_byte(data.mdx); + print_byte(data.dy); + print_byte(data.mdy); + dprintf("\n"); +#endif + + data.isMotion = (data.motion & 0x80) != 0; + data.isOnSurface = (data.motion & 0x08) == 0; + data.dx |= (data.mdx << 8); + data.dx = data.dx * -1; + data.dy |= (data.mdy << 8); + // data.dy = data.dy * -1; + + spi_stop(); + + if (data.motion & 0b111) { // panic recovery, sometimes burst mode works weird. + _inBurst = false; + } + + return data; +} diff --git a/keyboards/ploopyco/pmw3600.h b/keyboards/ploopyco/pmw3600.h new file mode 100644 index 000000000000..c1d5e3badbea --- /dev/null +++ b/keyboards/ploopyco/pmw3600.h @@ -0,0 +1,103 @@ +/* Copyright 2020 Christopher Courtney, aka Drashna Jael're (@drashna) + * Copyright 2019 Sunjun Kim + * Copyright 2020 Ploopy Corporation + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License 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 "spi_master.h" + +// Registers +#define REG_Product_ID 0x00 +#define REG_Revision_ID 0x01 +#define REG_Motion 0x02 +#define REG_Delta_X_L 0x03 +#define REG_Delta_X_H 0x04 +#define REG_Delta_Y_L 0x05 +#define REG_Delta_Y_H 0x06 +#define REG_SQUAL 0x07 +#define REG_Raw_Data_Sum 0x08 +#define REG_Maximum_Raw_data 0x09 +#define REG_Minimum_Raw_data 0x0A +#define REG_Shutter_Lower 0x0B +#define REG_Shutter_Upper 0x0C +#define REG_Control 0x0D +#define REG_Config1 0x0F +#define REG_Config2 0x10 +#define REG_Angle_Tune 0x11 +#define REG_Frame_Capture 0x12 +#define REG_SROM_Enable 0x13 +#define REG_Run_Downshift 0x14 +#define REG_Rest1_Rate_Lower 0x15 +#define REG_Rest1_Rate_Upper 0x16 +#define REG_Rest1_Downshift 0x17 +#define REG_Rest2_Rate_Lower 0x18 +#define REG_Rest2_Rate_Upper 0x19 +#define REG_Rest2_Downshift 0x1A +#define REG_Rest3_Rate_Lower 0x1B +#define REG_Rest3_Rate_Upper 0x1C +#define REG_Observation 0x24 +#define REG_Data_Out_Lower 0x25 +#define REG_Data_Out_Upper 0x26 +#define REG_Raw_Data_Dump 0x29 +#define REG_SROM_ID 0x2A +#define REG_Min_SQ_Run 0x2B +#define REG_Raw_Data_Threshold 0x2C +#define REG_Config5 0x2F +#define REG_Power_Up_Reset 0x3A +#define REG_Shutdown 0x3B +#define REG_Inverse_Product_ID 0x3F +#define REG_LiftCutoff_Tune3 0x41 +#define REG_Angle_Snap 0x42 +#define REG_LiftCutoff_Tune1 0x4A +#define REG_Motion_Burst 0x50 +#define REG_LiftCutoff_Tune_Timeout 0x58 +#define REG_LiftCutoff_Tune_Min_Length 0x5A +#define REG_SROM_Load_Burst 0x62 +#define REG_Lift_Config 0x63 +#define REG_Raw_Data_Burst 0x64 +#define REG_LiftCutoff_Tune2 0x65 + +#ifdef CONSOLE_ENABLE +void print_byte(uint8_t byte); +#endif + +typedef struct { + int8_t motion; + bool isMotion; // True if a motion is detected. + bool isOnSurface; // True when a chip is on a surface + int16_t dx; // displacement on x directions. Unit: Count. (CPI * Count = Inch value) + int8_t mdx; + int16_t dy; // displacement on y directions. + int8_t mdy; +} report_pmw_t; + + + +bool spi_start_adv(void); +void spi_stop_adv(void); +spi_status_t spi_write_adv(uint8_t reg_addr, uint8_t data); +uint8_t spi_read_adv(uint8_t reg_addr); +bool pmw_spi_init(void); +void pmw_set_cpi(uint16_t cpi); +void pmw_upload_firmware(void); +bool pmw_check_signature(void); +report_pmw_t pmw_read_burst(void); + + +#define degToRad(angleInDegrees) ((angleInDegrees)*M_PI / 180.0) +#define radToDeg(angleInRadians) ((angleInRadians)*180.0 / M_PI) +#define constrain(amt, low, high) ((amt) < (low) ? (low) : ((amt) > (high) ? (high) : (amt))) diff --git a/keyboards/ploopyco/pmw3600_firmware.h b/keyboards/ploopyco/pmw3600_firmware.h new file mode 100644 index 000000000000..cca5a6a4d877 --- /dev/null +++ b/keyboards/ploopyco/pmw3600_firmware.h @@ -0,0 +1,300 @@ +/* Copyright 2020 Christopher Courtney, aka Drashna Jael're (@drashna) + * Copyright 2019 Sunjun Kim + * Copyright 2020 Ploopy Corporation + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#pragma once + +// clang-format off +// Firmware Blob foor PMW3360 +const uint16_t firmware_length = 4094; +// clang-format off +const uint8_t firmware_data[] PROGMEM = { // SROM 0x04 +0x01, 0x04, 0x8e, 0x96, 0x6e, 0x77, 0x3e, 0xfe, 0x7e, 0x5f, 0x1d, 0xb8, 0xf2, 0x66, 0x4e, +0xff, 0x5d, 0x19, 0xb0, 0xc2, 0x04, 0x69, 0x54, 0x2a, 0xd6, 0x2e, 0xbf, 0xdd, 0x19, 0xb0, +0xc3, 0xe5, 0x29, 0xb1, 0xe0, 0x23, 0xa5, 0xa9, 0xb1, 0xc1, 0x00, 0x82, 0x67, 0x4c, 0x1a, +0x97, 0x8d, 0x79, 0x51, 0x20, 0xc7, 0x06, 0x8e, 0x7c, 0x7c, 0x7a, 0x76, 0x4f, 0xfd, 0x59, +0x30, 0xe2, 0x46, 0x0e, 0x9e, 0xbe, 0xdf, 0x1d, 0x99, 0x91, 0xa0, 0xa5, 0xa1, 0xa9, 0xd0, +0x22, 0xc6, 0xef, 0x5c, 0x1b, 0x95, 0x89, 0x90, 0xa2, 0xa7, 0xcc, 0xfb, 0x55, 0x28, 0xb3, +0xe4, 0x4a, 0xf7, 0x6c, 0x3b, 0xf4, 0x6a, 0x56, 0x2e, 0xde, 0x1f, 0x9d, 0xb8, 0xd3, 0x05, +0x88, 0x92, 0xa6, 0xce, 0x1e, 0xbe, 0xdf, 0x1d, 0x99, 0xb0, 0xe2, 0x46, 0xef, 0x5c, 0x07, +0x11, 0x5d, 0x98, 0x0b, 0x9d, 0x94, 0x97, 0xee, 0x4e, 0x45, 0x33, 0x6b, 0x44, 0xc7, 0x29, +0x56, 0x27, 0x30, 0xc6, 0xa7, 0xd5, 0xf2, 0x56, 0xdf, 0xb4, 0x38, 0x62, 0xcb, 0xa0, 0xb6, +0xe3, 0x0f, 0x84, 0x06, 0x24, 0x05, 0x65, 0x6f, 0x76, 0x89, 0xb5, 0x77, 0x41, 0x27, 0x82, +0x66, 0x65, 0x82, 0xcc, 0xd5, 0xe6, 0x20, 0xd5, 0x27, 0x17, 0xc5, 0xf8, 0x03, 0x23, 0x7c, +0x5f, 0x64, 0xa5, 0x1d, 0xc1, 0xd6, 0x36, 0xcb, 0x4c, 0xd4, 0xdb, 0x66, 0xd7, 0x8b, 0xb1, +0x99, 0x7e, 0x6f, 0x4c, 0x36, 0x40, 0x06, 0xd6, 0xeb, 0xd7, 0xa2, 0xe4, 0xf4, 0x95, 0x51, +0x5a, 0x54, 0x96, 0xd5, 0x53, 0x44, 0xd7, 0x8c, 0xe0, 0xb9, 0x40, 0x68, 0xd2, 0x18, 0xe9, +0xdd, 0x9a, 0x23, 0x92, 0x48, 0xee, 0x7f, 0x43, 0xaf, 0xea, 0x77, 0x38, 0x84, 0x8c, 0x0a, +0x72, 0xaf, 0x69, 0xf8, 0xdd, 0xf1, 0x24, 0x83, 0xa3, 0xf8, 0x4a, 0xbf, 0xf5, 0x94, 0x13, +0xdb, 0xbb, 0xd8, 0xb4, 0xb3, 0xa0, 0xfb, 0x45, 0x50, 0x60, 0x30, 0x59, 0x12, 0x31, 0x71, +0xa2, 0xd3, 0x13, 0xe7, 0xfa, 0xe7, 0xce, 0x0f, 0x63, 0x15, 0x0b, 0x6b, 0x94, 0xbb, 0x37, +0x83, 0x26, 0x05, 0x9d, 0xfb, 0x46, 0x92, 0xfc, 0x0a, 0x15, 0xd1, 0x0d, 0x73, 0x92, 0xd6, +0x8c, 0x1b, 0x8c, 0xb8, 0x55, 0x8a, 0xce, 0xbd, 0xfe, 0x8e, 0xfc, 0xed, 0x09, 0x12, 0x83, +0x91, 0x82, 0x51, 0x31, 0x23, 0xfb, 0xb4, 0x0c, 0x76, 0xad, 0x7c, 0xd9, 0xb4, 0x4b, 0xb2, +0x67, 0x14, 0x09, 0x9c, 0x7f, 0x0c, 0x18, 0xba, 0x3b, 0xd6, 0x8e, 0x14, 0x2a, 0xe4, 0x1b, +0x52, 0x9f, 0x2b, 0x7d, 0xe1, 0xfb, 0x6a, 0x33, 0x02, 0xfa, 0xac, 0x5a, 0xf2, 0x3e, 0x88, +0x7e, 0xae, 0xd1, 0xf3, 0x78, 0xe8, 0x05, 0xd1, 0xe3, 0xdc, 0x21, 0xf6, 0xe1, 0x9a, 0xbd, +0x17, 0x0e, 0xd9, 0x46, 0x9b, 0x88, 0x03, 0xea, 0xf6, 0x66, 0xbe, 0x0e, 0x1b, 0x50, 0x49, +0x96, 0x40, 0x97, 0xf1, 0xf1, 0xe4, 0x80, 0xa6, 0x6e, 0xe8, 0x77, 0x34, 0xbf, 0x29, 0x40, +0x44, 0xc2, 0xff, 0x4e, 0x98, 0xd3, 0x9c, 0xa3, 0x32, 0x2b, 0x76, 0x51, 0x04, 0x09, 0xe7, +0xa9, 0xd1, 0xa6, 0x32, 0xb1, 0x23, 0x53, 0xe2, 0x47, 0xab, 0xd6, 0xf5, 0x69, 0x5c, 0x3e, +0x5f, 0xfa, 0xae, 0x45, 0x20, 0xe5, 0xd2, 0x44, 0xff, 0x39, 0x32, 0x6d, 0xfd, 0x27, 0x57, +0x5c, 0xfd, 0xf0, 0xde, 0xc1, 0xb5, 0x99, 0xe5, 0xf5, 0x1c, 0x77, 0x01, 0x75, 0xc5, 0x6d, +0x58, 0x92, 0xf2, 0xb2, 0x47, 0x00, 0x01, 0x26, 0x96, 0x7a, 0x30, 0xff, 0xb7, 0xf0, 0xef, +0x77, 0xc1, 0x8a, 0x5d, 0xdc, 0xc0, 0xd1, 0x29, 0x30, 0x1e, 0x77, 0x38, 0x7a, 0x94, 0xf1, +0xb8, 0x7a, 0x7e, 0xef, 0xa4, 0xd1, 0xac, 0x31, 0x4a, 0xf2, 0x5d, 0x64, 0x3d, 0xb2, 0xe2, +0xf0, 0x08, 0x99, 0xfc, 0x70, 0xee, 0x24, 0xa7, 0x7e, 0xee, 0x1e, 0x20, 0x69, 0x7d, 0x44, +0xbf, 0x87, 0x42, 0xdf, 0x88, 0x3b, 0x0c, 0xda, 0x42, 0xc9, 0x04, 0xf9, 0x45, 0x50, 0xfc, +0x83, 0x8f, 0x11, 0x6a, 0x72, 0xbc, 0x99, 0x95, 0xf0, 0xac, 0x3d, 0xa7, 0x3b, 0xcd, 0x1c, +0xe2, 0x88, 0x79, 0x37, 0x11, 0x5f, 0x39, 0x89, 0x95, 0x0a, 0x16, 0x84, 0x7a, 0xf6, 0x8a, +0xa4, 0x28, 0xe4, 0xed, 0x83, 0x80, 0x3b, 0xb1, 0x23, 0xa5, 0x03, 0x10, 0xf4, 0x66, 0xea, +0xbb, 0x0c, 0x0f, 0xc5, 0xec, 0x6c, 0x69, 0xc5, 0xd3, 0x24, 0xab, 0xd4, 0x2a, 0xb7, 0x99, +0x88, 0x76, 0x08, 0xa0, 0xa8, 0x95, 0x7c, 0xd8, 0x38, 0x6d, 0xcd, 0x59, 0x02, 0x51, 0x4b, +0xf1, 0xb5, 0x2b, 0x50, 0xe3, 0xb6, 0xbd, 0xd0, 0x72, 0xcf, 0x9e, 0xfd, 0x6e, 0xbb, 0x44, +0xc8, 0x24, 0x8a, 0x77, 0x18, 0x8a, 0x13, 0x06, 0xef, 0x97, 0x7d, 0xfa, 0x81, 0xf0, 0x31, +0xe6, 0xfa, 0x77, 0xed, 0x31, 0x06, 0x31, 0x5b, 0x54, 0x8a, 0x9f, 0x30, 0x68, 0xdb, 0xe2, +0x40, 0xf8, 0x4e, 0x73, 0xfa, 0xab, 0x74, 0x8b, 0x10, 0x58, 0x13, 0xdc, 0xd2, 0xe6, 0x78, +0xd1, 0x32, 0x2e, 0x8a, 0x9f, 0x2c, 0x58, 0x06, 0x48, 0x27, 0xc5, 0xa9, 0x5e, 0x81, 0x47, +0x89, 0x46, 0x21, 0x91, 0x03, 0x70, 0xa4, 0x3e, 0x88, 0x9c, 0xda, 0x33, 0x0a, 0xce, 0xbc, +0x8b, 0x8e, 0xcf, 0x9f, 0xd3, 0x71, 0x80, 0x43, 0xcf, 0x6b, 0xa9, 0x51, 0x83, 0x76, 0x30, +0x82, 0xc5, 0x6a, 0x85, 0x39, 0x11, 0x50, 0x1a, 0x82, 0xdc, 0x1e, 0x1c, 0xd5, 0x7d, 0xa9, +0x71, 0x99, 0x33, 0x47, 0x19, 0x97, 0xb3, 0x5a, 0xb1, 0xdf, 0xed, 0xa4, 0xf2, 0xe6, 0x26, +0x84, 0xa2, 0x28, 0x9a, 0x9e, 0xdf, 0xa6, 0x6a, 0xf4, 0xd6, 0xfc, 0x2e, 0x5b, 0x9d, 0x1a, +0x2a, 0x27, 0x68, 0xfb, 0xc1, 0x83, 0x21, 0x4b, 0x90, 0xe0, 0x36, 0xdd, 0x5b, 0x31, 0x42, +0x55, 0xa0, 0x13, 0xf7, 0xd0, 0x89, 0x53, 0x71, 0x99, 0x57, 0x09, 0x29, 0xc5, 0xf3, 0x21, +0xf8, 0x37, 0x2f, 0x40, 0xf3, 0xd4, 0xaf, 0x16, 0x08, 0x36, 0x02, 0xfc, 0x77, 0xc5, 0x8b, +0x04, 0x90, 0x56, 0xb9, 0xc9, 0x67, 0x9a, 0x99, 0xe8, 0x00, 0xd3, 0x86, 0xff, 0x97, 0x2d, +0x08, 0xe9, 0xb7, 0xb3, 0x91, 0xbc, 0xdf, 0x45, 0xc6, 0xed, 0x0f, 0x8c, 0x4c, 0x1e, 0xe6, +0x5b, 0x6e, 0x38, 0x30, 0xe4, 0xaa, 0xe3, 0x95, 0xde, 0xb9, 0xe4, 0x9a, 0xf5, 0xb2, 0x55, +0x9a, 0x87, 0x9b, 0xf6, 0x6a, 0xb2, 0xf2, 0x77, 0x9a, 0x31, 0xf4, 0x7a, 0x31, 0xd1, 0x1d, +0x04, 0xc0, 0x7c, 0x32, 0xa2, 0x9e, 0x9a, 0xf5, 0x62, 0xf8, 0x27, 0x8d, 0xbf, 0x51, 0xff, +0xd3, 0xdf, 0x64, 0x37, 0x3f, 0x2a, 0x6f, 0x76, 0x3a, 0x7d, 0x77, 0x06, 0x9e, 0x77, 0x7f, +0x5e, 0xeb, 0x32, 0x51, 0xf9, 0x16, 0x66, 0x9a, 0x09, 0xf3, 0xb0, 0x08, 0xa4, 0x70, 0x96, +0x46, 0x30, 0xff, 0xda, 0x4f, 0xe9, 0x1b, 0xed, 0x8d, 0xf8, 0x74, 0x1f, 0x31, 0x92, 0xb3, +0x73, 0x17, 0x36, 0xdb, 0x91, 0x30, 0xd6, 0x88, 0x55, 0x6b, 0x34, 0x77, 0x87, 0x7a, 0xe7, +0xee, 0x06, 0xc6, 0x1c, 0x8c, 0x19, 0x0c, 0x48, 0x46, 0x23, 0x5e, 0x9c, 0x07, 0x5c, 0xbf, +0xb4, 0x7e, 0xd6, 0x4f, 0x74, 0x9c, 0xe2, 0xc5, 0x50, 0x8b, 0xc5, 0x8b, 0x15, 0x90, 0x60, +0x62, 0x57, 0x29, 0xd0, 0x13, 0x43, 0xa1, 0x80, 0x88, 0x91, 0x00, 0x44, 0xc7, 0x4d, 0x19, +0x86, 0xcc, 0x2f, 0x2a, 0x75, 0x5a, 0xfc, 0xeb, 0x97, 0x2a, 0x70, 0xe3, 0x78, 0xd8, 0x91, +0xb0, 0x4f, 0x99, 0x07, 0xa3, 0x95, 0xea, 0x24, 0x21, 0xd5, 0xde, 0x51, 0x20, 0x93, 0x27, +0x0a, 0x30, 0x73, 0xa8, 0xff, 0x8a, 0x97, 0xe9, 0xa7, 0x6a, 0x8e, 0x0d, 0xe8, 0xf0, 0xdf, +0xec, 0xea, 0xb4, 0x6c, 0x1d, 0x39, 0x2a, 0x62, 0x2d, 0x3d, 0x5a, 0x8b, 0x65, 0xf8, 0x90, +0x05, 0x2e, 0x7e, 0x91, 0x2c, 0x78, 0xef, 0x8e, 0x7a, 0xc1, 0x2f, 0xac, 0x78, 0xee, 0xaf, +0x28, 0x45, 0x06, 0x4c, 0x26, 0xaf, 0x3b, 0xa2, 0xdb, 0xa3, 0x93, 0x06, 0xb5, 0x3c, 0xa5, +0xd8, 0xee, 0x8f, 0xaf, 0x25, 0xcc, 0x3f, 0x85, 0x68, 0x48, 0xa9, 0x62, 0xcc, 0x97, 0x8f, +0x7f, 0x2a, 0xea, 0xe0, 0x15, 0x0a, 0xad, 0x62, 0x07, 0xbd, 0x45, 0xf8, 0x41, 0xd8, 0x36, +0xcb, 0x4c, 0xdb, 0x6e, 0xe6, 0x3a, 0xe7, 0xda, 0x15, 0xe9, 0x29, 0x1e, 0x12, 0x10, 0xa0, +0x14, 0x2c, 0x0e, 0x3d, 0xf4, 0xbf, 0x39, 0x41, 0x92, 0x75, 0x0b, 0x25, 0x7b, 0xa3, 0xce, +0x39, 0x9c, 0x15, 0x64, 0xc8, 0xfa, 0x3d, 0xef, 0x73, 0x27, 0xfe, 0x26, 0x2e, 0xce, 0xda, +0x6e, 0xfd, 0x71, 0x8e, 0xdd, 0xfe, 0x76, 0xee, 0xdc, 0x12, 0x5c, 0x02, 0xc5, 0x3a, 0x4e, +0x4e, 0x4f, 0xbf, 0xca, 0x40, 0x15, 0xc7, 0x6e, 0x8d, 0x41, 0xf1, 0x10, 0xe0, 0x4f, 0x7e, +0x97, 0x7f, 0x1c, 0xae, 0x47, 0x8e, 0x6b, 0xb1, 0x25, 0x31, 0xb0, 0x73, 0xc7, 0x1b, 0x97, +0x79, 0xf9, 0x80, 0xd3, 0x66, 0x22, 0x30, 0x07, 0x74, 0x1e, 0xe4, 0xd0, 0x80, 0x21, 0xd6, +0xee, 0x6b, 0x6c, 0x4f, 0xbf, 0xf5, 0xb7, 0xd9, 0x09, 0x87, 0x2f, 0xa9, 0x14, 0xbe, 0x27, +0xd9, 0x72, 0x50, 0x01, 0xd4, 0x13, 0x73, 0xa6, 0xa7, 0x51, 0x02, 0x75, 0x25, 0xe1, 0xb3, +0x45, 0x34, 0x7d, 0xa8, 0x8e, 0xeb, 0xf3, 0x16, 0x49, 0xcb, 0x4f, 0x8c, 0xa1, 0xb9, 0x36, +0x85, 0x39, 0x75, 0x5d, 0x08, 0x00, 0xae, 0xeb, 0xf6, 0xea, 0xd7, 0x13, 0x3a, 0x21, 0x5a, +0x5f, 0x30, 0x84, 0x52, 0x26, 0x95, 0xc9, 0x14, 0xf2, 0x57, 0x55, 0x6b, 0xb1, 0x10, 0xc2, +0xe1, 0xbd, 0x3b, 0x51, 0xc0, 0xb7, 0x55, 0x4c, 0x71, 0x12, 0x26, 0xc7, 0x0d, 0xf9, 0x51, +0xa4, 0x38, 0x02, 0x05, 0x7f, 0xb8, 0xf1, 0x72, 0x4b, 0xbf, 0x71, 0x89, 0x14, 0xf3, 0x77, +0x38, 0xd9, 0x71, 0x24, 0xf3, 0x00, 0x11, 0xa1, 0xd8, 0xd4, 0x69, 0x27, 0x08, 0x37, 0x35, +0xc9, 0x11, 0x9d, 0x90, 0x1c, 0x0e, 0xe7, 0x1c, 0xff, 0x2d, 0x1e, 0xe8, 0x92, 0xe1, 0x18, +0x10, 0x95, 0x7c, 0xe0, 0x80, 0xf4, 0x96, 0x43, 0x21, 0xf9, 0x75, 0x21, 0x64, 0x38, 0xdd, +0x9f, 0x1e, 0x95, 0x16, 0xda, 0x56, 0x1d, 0x4f, 0x9a, 0x53, 0xb2, 0xe2, 0xe4, 0x18, 0xcb, +0x6b, 0x1a, 0x65, 0xeb, 0x56, 0xc6, 0x3b, 0xe5, 0xfe, 0xd8, 0x26, 0x3f, 0x3a, 0x84, 0x59, +0x72, 0x66, 0xa2, 0xf3, 0x75, 0xff, 0xfb, 0x60, 0xb3, 0x22, 0xad, 0x3f, 0x2d, 0x6b, 0xf9, +0xeb, 0xea, 0x05, 0x7c, 0xd8, 0x8f, 0x6d, 0x2c, 0x98, 0x9e, 0x2b, 0x93, 0xf1, 0x5e, 0x46, +0xf0, 0x87, 0x49, 0x29, 0x73, 0x68, 0xd7, 0x7f, 0xf9, 0xf0, 0xe5, 0x7d, 0xdb, 0x1d, 0x75, +0x19, 0xf3, 0xc4, 0x58, 0x9b, 0x17, 0x88, 0xa8, 0x92, 0xe0, 0xbe, 0xbd, 0x8b, 0x1d, 0x8d, +0x9f, 0x56, 0x76, 0xad, 0xaf, 0x29, 0xe2, 0xd9, 0xd5, 0x52, 0xf6, 0xb5, 0x56, 0x35, 0x57, +0x3a, 0xc8, 0xe1, 0x56, 0x43, 0x19, 0x94, 0xd3, 0x04, 0x9b, 0x6d, 0x35, 0xd8, 0x0b, 0x5f, +0x4d, 0x19, 0x8e, 0xec, 0xfa, 0x64, 0x91, 0x0a, 0x72, 0x20, 0x2b, 0xbc, 0x1a, 0x4a, 0xfe, +0x8b, 0xfd, 0xbb, 0xed, 0x1b, 0x23, 0xea, 0xad, 0x72, 0x82, 0xa1, 0x29, 0x99, 0x71, 0xbd, +0xf0, 0x95, 0xc1, 0x03, 0xdd, 0x7b, 0xc2, 0xb2, 0x3c, 0x28, 0x54, 0xd3, 0x68, 0xa4, 0x72, +0xc8, 0x66, 0x96, 0xe0, 0xd1, 0xd8, 0x7f, 0xf8, 0xd1, 0x26, 0x2b, 0xf7, 0xad, 0xba, 0x55, +0xca, 0x15, 0xb9, 0x32, 0xc3, 0xe5, 0x88, 0x97, 0x8e, 0x5c, 0xfb, 0x92, 0x25, 0x8b, 0xbf, +0xa2, 0x45, 0x55, 0x7a, 0xa7, 0x6f, 0x8b, 0x57, 0x5b, 0xcf, 0x0e, 0xcb, 0x1d, 0xfb, 0x20, +0x82, 0x77, 0xa8, 0x8c, 0xcc, 0x16, 0xce, 0x1d, 0xfa, 0xde, 0xcc, 0x0b, 0x62, 0xfe, 0xcc, +0xe1, 0xb7, 0xf0, 0xc3, 0x81, 0x64, 0x73, 0x40, 0xa0, 0xc2, 0x4d, 0x89, 0x11, 0x75, 0x33, +0x55, 0x33, 0x8d, 0xe8, 0x4a, 0xfd, 0xea, 0x6e, 0x30, 0x0b, 0xd7, 0x31, 0x2c, 0xde, 0x47, +0xe3, 0xbf, 0xf8, 0x55, 0x42, 0xe2, 0x7f, 0x59, 0xe5, 0x17, 0xef, 0x99, 0x34, 0x69, 0x91, +0xb1, 0x23, 0x8e, 0x20, 0x87, 0x2d, 0xa8, 0xfe, 0xd5, 0x8a, 0xf3, 0x84, 0x3a, 0xf0, 0x37, +0xe4, 0x09, 0x00, 0x54, 0xee, 0x67, 0x49, 0x93, 0xe4, 0x81, 0x70, 0xe3, 0x90, 0x4d, 0xef, +0xfe, 0x41, 0xb7, 0x99, 0x7b, 0xc1, 0x83, 0xba, 0x62, 0x12, 0x6f, 0x7d, 0xde, 0x6b, 0xaf, +0xda, 0x16, 0xf9, 0x55, 0x51, 0xee, 0xa6, 0x0c, 0x2b, 0x02, 0xa3, 0xfd, 0x8d, 0xfb, 0x30, +0x17, 0xe4, 0x6f, 0xdf, 0x36, 0x71, 0xc4, 0xca, 0x87, 0x25, 0x48, 0xb0, 0x47, 0xec, 0xea, +0xb4, 0xbf, 0xa5, 0x4d, 0x9b, 0x9f, 0x02, 0x93, 0xc4, 0xe3, 0xe4, 0xe8, 0x42, 0x2d, 0x68, +0x81, 0x15, 0x0a, 0xeb, 0x84, 0x5b, 0xd6, 0xa8, 0x74, 0xfb, 0x7d, 0x1d, 0xcb, 0x2c, 0xda, +0x46, 0x2a, 0x76, 0x62, 0xce, 0xbc, 0x5c, 0x9e, 0x8b, 0xe7, 0xcf, 0xbe, 0x78, 0xf5, 0x7c, +0xeb, 0xb3, 0x3a, 0x9c, 0xaa, 0x6f, 0xcc, 0x72, 0xd1, 0x59, 0xf2, 0x11, 0x23, 0xd6, 0x3f, +0x48, 0xd1, 0xb7, 0xce, 0xb0, 0xbf, 0xcb, 0xea, 0x80, 0xde, 0x57, 0xd4, 0x5e, 0x97, 0x2f, +0x75, 0xd1, 0x50, 0x8e, 0x80, 0x2c, 0x66, 0x79, 0xbf, 0x72, 0x4b, 0xbd, 0x8a, 0x81, 0x6c, +0xd3, 0xe1, 0x01, 0xdc, 0xd2, 0x15, 0x26, 0xc5, 0x36, 0xda, 0x2c, 0x1a, 0xc0, 0x27, 0x94, +0xed, 0xb7, 0x9b, 0x85, 0x0b, 0x5e, 0x80, 0x97, 0xc5, 0xec, 0x4f, 0xec, 0x88, 0x5d, 0x50, +0x07, 0x35, 0x47, 0xdc, 0x0b, 0x3b, 0x3d, 0xdd, 0x60, 0xaf, 0xa8, 0x5d, 0x81, 0x38, 0x24, +0x25, 0x5d, 0x5c, 0x15, 0xd1, 0xde, 0xb3, 0xab, 0xec, 0x05, 0x69, 0xef, 0x83, 0xed, 0x57, +0x54, 0xb8, 0x64, 0x64, 0x11, 0x16, 0x32, 0x69, 0xda, 0x9f, 0x2d, 0x7f, 0x36, 0xbb, 0x44, +0x5a, 0x34, 0xe8, 0x7f, 0xbf, 0x03, 0xeb, 0x00, 0x7f, 0x59, 0x68, 0x22, 0x79, 0xcf, 0x73, +0x6c, 0x2c, 0x29, 0xa7, 0xa1, 0x5f, 0x38, 0xa1, 0x1d, 0xf0, 0x20, 0x53, 0xe0, 0x1a, 0x63, +0x14, 0x58, 0x71, 0x10, 0xaa, 0x08, 0x0c, 0x3e, 0x16, 0x1a, 0x60, 0x22, 0x82, 0x7f, 0xba, +0xa4, 0x43, 0xa0, 0xd0, 0xac, 0x1b, 0xd5, 0x6b, 0x64, 0xb5, 0x14, 0x93, 0x31, 0x9e, 0x53, +0x50, 0xd0, 0x57, 0x66, 0xee, 0x5a, 0x4f, 0xfb, 0x03, 0x2a, 0x69, 0x58, 0x76, 0xf1, 0x83, +0xf7, 0x4e, 0xba, 0x8c, 0x42, 0x06, 0x60, 0x5d, 0x6d, 0xce, 0x60, 0x88, 0xae, 0xa4, 0xc3, +0xf1, 0x03, 0xa5, 0x4b, 0x98, 0xa1, 0xff, 0x67, 0xe1, 0xac, 0xa2, 0xb8, 0x62, 0xd7, 0x6f, +0xa0, 0x31, 0xb4, 0xd2, 0x77, 0xaf, 0x21, 0x10, 0x06, 0xc6, 0x9a, 0xff, 0x1d, 0x09, 0x17, +0x0e, 0x5f, 0xf1, 0xaa, 0x54, 0x34, 0x4b, 0x45, 0x8a, 0x87, 0x63, 0xa6, 0xdc, 0xf9, 0x24, +0x30, 0x67, 0xc6, 0xb2, 0xd6, 0x61, 0x33, 0x69, 0xee, 0x50, 0x61, 0x57, 0x28, 0xe7, 0x7e, +0xee, 0xec, 0x3a, 0x5a, 0x73, 0x4e, 0xa8, 0x8d, 0xe4, 0x18, 0xea, 0xec, 0x41, 0x64, 0xc8, +0xe2, 0xe8, 0x66, 0xb6, 0x2d, 0xb6, 0xfb, 0x6a, 0x6c, 0x16, 0xb3, 0xdd, 0x46, 0x43, 0xb9, +0x73, 0x00, 0x6a, 0x71, 0xed, 0x4e, 0x9d, 0x25, 0x1a, 0xc3, 0x3c, 0x4a, 0x95, 0x15, 0x99, +0x35, 0x81, 0x14, 0x02, 0xd6, 0x98, 0x9b, 0xec, 0xd8, 0x23, 0x3b, 0x84, 0x29, 0xaf, 0x0c, +0x99, 0x83, 0xa6, 0x9a, 0x34, 0x4f, 0xfa, 0xe8, 0xd0, 0x3c, 0x4b, 0xd0, 0xfb, 0xb6, 0x68, +0xb8, 0x9e, 0x8f, 0xcd, 0xf7, 0x60, 0x2d, 0x7a, 0x22, 0xe5, 0x7d, 0xab, 0x65, 0x1b, 0x95, +0xa7, 0xa8, 0x7f, 0xb6, 0x77, 0x47, 0x7b, 0x5f, 0x8b, 0x12, 0x72, 0xd0, 0xd4, 0x91, 0xef, +0xde, 0x19, 0x50, 0x3c, 0xa7, 0x8b, 0xc4, 0xa9, 0xb3, 0x23, 0xcb, 0x76, 0xe6, 0x81, 0xf0, +0xc1, 0x04, 0x8f, 0xa3, 0xb8, 0x54, 0x5b, 0x97, 0xac, 0x19, 0xff, 0x3f, 0x55, 0x27, 0x2f, +0xe0, 0x1d, 0x42, 0x9b, 0x57, 0xfc, 0x4b, 0x4e, 0x0f, 0xce, 0x98, 0xa9, 0x43, 0x57, 0x03, +0xbd, 0xe7, 0xc8, 0x94, 0xdf, 0x6e, 0x36, 0x73, 0x32, 0xb4, 0xef, 0x2e, 0x85, 0x7a, 0x6e, +0xfc, 0x6c, 0x18, 0x82, 0x75, 0x35, 0x90, 0x07, 0xf3, 0xe4, 0x9f, 0x3e, 0xdc, 0x68, 0xf3, +0xb5, 0xf3, 0x19, 0x80, 0x92, 0x06, 0x99, 0xa2, 0xe8, 0x6f, 0xff, 0x2e, 0x7f, 0xae, 0x42, +0xa4, 0x5f, 0xfb, 0xd4, 0x0e, 0x81, 0x2b, 0xc3, 0x04, 0xff, 0x2b, 0xb3, 0x74, 0x4e, 0x36, +0x5b, 0x9c, 0x15, 0x00, 0xc6, 0x47, 0x2b, 0xe8, 0x8b, 0x3d, 0xf1, 0x9c, 0x03, 0x9a, 0x58, +0x7f, 0x9b, 0x9c, 0xbf, 0x85, 0x49, 0x79, 0x35, 0x2e, 0x56, 0x7b, 0x41, 0x14, 0x39, 0x47, +0x83, 0x26, 0xaa, 0x07, 0x89, 0x98, 0x11, 0x1b, 0x86, 0xe7, 0x73, 0x7a, 0xd8, 0x7d, 0x78, +0x61, 0x53, 0xe9, 0x79, 0xf5, 0x36, 0x8d, 0x44, 0x92, 0x84, 0xf9, 0x13, 0x50, 0x58, 0x3b, +0xa4, 0x6a, 0x36, 0x65, 0x49, 0x8e, 0x3c, 0x0e, 0xf1, 0x6f, 0xd2, 0x84, 0xc4, 0x7e, 0x8e, +0x3f, 0x39, 0xae, 0x7c, 0x84, 0xf1, 0x63, 0x37, 0x8e, 0x3c, 0xcc, 0x3e, 0x44, 0x81, 0x45, +0xf1, 0x4b, 0xb9, 0xed, 0x6b, 0x36, 0x5d, 0xbb, 0x20, 0x60, 0x1a, 0x0f, 0xa3, 0xaa, 0x55, +0x77, 0x3a, 0xa9, 0xae, 0x37, 0x4d, 0xba, 0xb8, 0x86, 0x6b, 0xbc, 0x08, 0x50, 0xf6, 0xcc, +0xa4, 0xbd, 0x1d, 0x40, 0x72, 0xa5, 0x86, 0xfa, 0xe2, 0x10, 0xae, 0x3d, 0x58, 0x4b, 0x97, +0xf3, 0x43, 0x74, 0xa9, 0x9e, 0xeb, 0x21, 0xb7, 0x01, 0xa4, 0x86, 0x93, 0x97, 0xee, 0x2f, +0x4f, 0x3b, 0x86, 0xa1, 0x41, 0x6f, 0x41, 0x26, 0x90, 0x78, 0x5c, 0x7f, 0x30, 0x38, 0x4b, +0x3f, 0xaa, 0xec, 0xed, 0x5c, 0x6f, 0x0e, 0xad, 0x43, 0x87, 0xfd, 0x93, 0x35, 0xe6, 0x01, +0xef, 0x41, 0x26, 0x90, 0x99, 0x9e, 0xfb, 0x19, 0x5b, 0xad, 0xd2, 0x91, 0x8a, 0xe0, 0x46, +0xaf, 0x65, 0xfa, 0x4f, 0x84, 0xc1, 0xa1, 0x2d, 0xcf, 0x45, 0x8b, 0xd3, 0x85, 0x50, 0x55, +0x7c, 0xf9, 0x67, 0x88, 0xd4, 0x4e, 0xe9, 0xd7, 0x6b, 0x61, 0x54, 0xa1, 0xa4, 0xa6, 0xa2, +0xc2, 0xbf, 0x30, 0x9c, 0x40, 0x9f, 0x5f, 0xd7, 0x69, 0x2b, 0x24, 0x82, 0x5e, 0xd9, 0xd6, +0xa7, 0x12, 0x54, 0x1a, 0xf7, 0x55, 0x9f, 0x76, 0x50, 0xa9, 0x95, 0x84, 0xe6, 0x6b, 0x6d, +0xb5, 0x96, 0x54, 0xd6, 0xcd, 0xb3, 0xa1, 0x9b, 0x46, 0xa7, 0x94, 0x4d, 0xc4, 0x94, 0xb4, +0x98, 0xe3, 0xe1, 0xe2, 0x34, 0xd5, 0x33, 0x16, 0x07, 0x54, 0xcd, 0xb7, 0x77, 0x53, 0xdb, +0x4f, 0x4d, 0x46, 0x9d, 0xe9, 0xd4, 0x9c, 0x8a, 0x36, 0xb6, 0xb8, 0x38, 0x26, 0x6c, 0x0e, +0xff, 0x9c, 0x1b, 0x43, 0x8b, 0x80, 0xcc, 0xb9, 0x3d, 0xda, 0xc7, 0xf1, 0x8a, 0xf2, 0x6d, +0xb8, 0xd7, 0x74, 0x2f, 0x7e, 0x1e, 0xb7, 0xd3, 0x4a, 0xb4, 0xac, 0xfc, 0x79, 0x48, 0x6c, +0xbc, 0x96, 0xb6, 0x94, 0x46, 0x57, 0x2d, 0xb0, 0xa3, 0xfc, 0x1e, 0xb9, 0x52, 0x60, 0x85, +0x2d, 0x41, 0xd0, 0x43, 0x01, 0x1e, 0x1c, 0xd5, 0x7d, 0xfc, 0xf3, 0x96, 0x0d, 0xc7, 0xcb, +0x2a, 0x29, 0x9a, 0x93, 0xdd, 0x88, 0x2d, 0x37, 0x5d, 0xaa, 0xfb, 0x49, 0x68, 0xa0, 0x9c, +0x50, 0x86, 0x7f, 0x68, 0x56, 0x57, 0xf9, 0x79, 0x18, 0x39, 0xd4, 0xe0, 0x01, 0x84, 0x33, +0x61, 0xca, 0xa5, 0xd2, 0xd6, 0xe4, 0xc9, 0x8a, 0x4a, 0x23, 0x44, 0x4e, 0xbc, 0xf0, 0xdc, +0x24, 0xa1, 0xa0, 0xc4, 0xe2, 0x07, 0x3c, 0x10, 0xc4, 0xb5, 0x25, 0x4b, 0x65, 0x63, 0xf4, +0x80, 0xe7, 0xcf, 0x61, 0xb1, 0x71, 0x82, 0x21, 0x87, 0x2c, 0xf5, 0x91, 0x00, 0x32, 0x0c, +0xec, 0xa9, 0xb5, 0x9a, 0x74, 0x85, 0xe3, 0x36, 0x8f, 0x76, 0x4f, 0x9c, 0x6d, 0xce, 0xbc, +0xad, 0x0a, 0x4b, 0xed, 0x76, 0x04, 0xcb, 0xc3, 0xb9, 0x33, 0x9e, 0x01, 0x93, 0x96, 0x69, +0x7d, 0xc5, 0xa2, 0x45, 0x79, 0x9b, 0x04, 0x5c, 0x84, 0x09, 0xed, 0x88, 0x43, 0xc7, 0xab, +0x93, 0x14, 0x26, 0xa1, 0x40, 0xb5, 0xce, 0x4e, 0xbf, 0x2a, 0x42, 0x85, 0x3e, 0x2c, 0x3b, +0x54, 0xe8, 0x12, 0x1f, 0x0e, 0x97, 0x59, 0xb2, 0x27, 0x89, 0xfa, 0xf2, 0xdf, 0x8e, 0x68, +0x59, 0xdc, 0x06, 0xbc, 0xb6, 0x85, 0x0d, 0x06, 0x22, 0xec, 0xb1, 0xcb, 0xe5, 0x04, 0xe6, +0x3d, 0xb3, 0xb0, 0x41, 0x73, 0x08, 0x3f, 0x3c, 0x58, 0x86, 0x63, 0xeb, 0x50, 0xee, 0x1d, +0x2c, 0x37, 0x74, 0xa9, 0xd3, 0x18, 0xa3, 0x47, 0x6e, 0x93, 0x54, 0xad, 0x0a, 0x5d, 0xb8, +0x2a, 0x55, 0x5d, 0x78, 0xf6, 0xee, 0xbe, 0x8e, 0x3c, 0x76, 0x69, 0xb9, 0x40, 0xc2, 0x34, +0xec, 0x2a, 0xb9, 0xed, 0x7e, 0x20, 0xe4, 0x8d, 0x00, 0x38, 0xc7, 0xe6, 0x8f, 0x44, 0xa8, +0x86, 0xce, 0xeb, 0x2a, 0xe9, 0x90, 0xf1, 0x4c, 0xdf, 0x32, 0xfb, 0x73, 0x1b, 0x6d, 0x92, +0x1e, 0x95, 0xfe, 0xb4, 0xdb, 0x65, 0xdf, 0x4d, 0x23, 0x54, 0x89, 0x48, 0xbf, 0x4a, 0x2e, +0x70, 0xd6, 0xd7, 0x62, 0xb4, 0x33, 0x29, 0xb1, 0x3a, 0x33, 0x4c, 0x23, 0x6d, 0xa6, 0x76, +0xa5, 0x21, 0x63, 0x48, 0xe6, 0x90, 0x5d, 0xed, 0x90, 0x95, 0x0b, 0x7a, 0x84, 0xbe, 0xb8, +0x0d, 0x5e, 0x63, 0x0c, 0x62, 0x26, 0x4c, 0x14, 0x5a, 0xb3, 0xac, 0x23, 0xa4, 0x74, 0xa7, +0x6f, 0x33, 0x30, 0x05, 0x60, 0x01, 0x42, 0xa0, 0x28, 0xb7, 0xee, 0x19, 0x38, 0xf1, 0x64, +0x80, 0x82, 0x43, 0xe1, 0x41, 0x27, 0x1f, 0x1f, 0x90, 0x54, 0x7a, 0xd5, 0x23, 0x2e, 0xd1, +0x3d, 0xcb, 0x28, 0xba, 0x58, 0x7f, 0xdc, 0x7c, 0x91, 0x24, 0xe9, 0x28, 0x51, 0x83, 0x6e, +0xc5, 0x56, 0x21, 0x42, 0xed, 0xa0, 0x56, 0x22, 0xa1, 0x40, 0x80, 0x6b, 0xa8, 0xf7, 0x94, +0xca, 0x13, 0x6b, 0x0c, 0x39, 0xd9, 0xfd, 0xe9, 0xf3, 0x6f, 0xa6, 0x9e, 0xfc, 0x70, 0x8a, +0xb3, 0xbc, 0x59, 0x3c, 0x1e, 0x1d, 0x6c, 0xf9, 0x7c, 0xaf, 0xf9, 0x88, 0x71, 0x95, 0xeb, +0x57, 0x00, 0xbd, 0x9f, 0x8c, 0x4f, 0xe1, 0x24, 0x83, 0xc5, 0x22, 0xea, 0xfd, 0xd3, 0x0c, +0xe2, 0x17, 0x18, 0x7c, 0x6a, 0x4c, 0xde, 0x77, 0xb4, 0x53, 0x9b, 0x4c, 0x81, 0xcd, 0x23, +0x60, 0xaa, 0x0e, 0x25, 0x73, 0x9c, 0x02, 0x79, 0x32, 0x30, 0xdf, 0x74, 0xdf, 0x75, 0x19, +0xf4, 0xa5, 0x14, 0x5c, 0xf7, 0x7a, 0xa8, 0xa5, 0x91, 0x84, 0x7c, 0x60, 0x03, 0x06, 0x3b, +0xcd, 0x50, 0xb6, 0x27, 0x9c, 0xfe, 0xb1, 0xdd, 0xcc, 0xd3, 0xb0, 0x59, 0x24, 0xb2, 0xca, +0xe2, 0x1c, 0x81, 0x22, 0x9d, 0x07, 0x8f, 0x8e, 0xb9, 0xbe, 0x4e, 0xfa, 0xfc, 0x39, 0x65, +0xba, 0xbf, 0x9d, 0x12, 0x37, 0x5e, 0x97, 0x7e, 0xf3, 0x89, 0xf5, 0x5d, 0xf5, 0xe3, 0x09, +0x8c, 0x62, 0xb5, 0x20, 0x9d, 0x0c, 0x53, 0x8a, 0x68, 0x1b, 0xd2, 0x8f, 0x75, 0x17, 0x5d, +0xd4, 0xe5, 0xda, 0x75, 0x62, 0x19, 0x14, 0x6a, 0x26, 0x2d, 0xeb, 0xf8, 0xaf, 0x37, 0xf0, +0x6c, 0xa4, 0x55, 0xb1, 0xbc, 0xe2, 0x33, 0xc0, 0x9a, 0xca, 0xb0, 0x11, 0x49, 0x4f, 0x68, +0x9b, 0x3b, 0x6b, 0x3c, 0xcc, 0x13, 0xf6, 0xc7, 0x85, 0x61, 0x68, 0x42, 0xae, 0xbb, 0xdd, +0xcd, 0x45, 0x16, 0x29, 0x1d, 0xea, 0xdb, 0xc8, 0x03, 0x94, 0x3c, 0xee, 0x4f, 0x82, 0x11, +0xc3, 0xec, 0x28, 0xbd, 0x97, 0x05, 0x99, 0xde, 0xd7, 0xbb, 0x5e, 0x22, 0x1f, 0xd4, 0xeb, +0x64, 0xd9, 0x92, 0xd9, 0x85, 0xb7, 0x6a, 0x05, 0x6a, 0xe4, 0x24, 0x41, 0xf1, 0xcd, 0xf0, +0xd8, 0x3f, 0xf8, 0x9e, 0x0e, 0xcd, 0x0b, 0x7a, 0x70, 0x6b, 0x5a, 0x75, 0x0a, 0x6a, 0x33, +0x88, 0xec, 0x17, 0x75, 0x08, 0x70, 0x10, 0x2f, 0x24, 0xcf, 0xc4, 0xe9, 0x42, 0x00, 0x61, +0x94, 0xca, 0x1f, 0x3a, 0x76, 0x06, 0xfa, 0xd2, 0x48, 0x81, 0xf0, 0x77, 0x60, 0x03, 0x45, +0xd9, 0x61, 0xf4, 0xa4, 0x6f, 0x3d, 0xd9, 0x30, 0xc3, 0x04, 0x6b, 0x54, 0x2a, 0xb7, 0xec, +0x3b, 0xf4, 0x4b, 0xf5, 0x68, 0x52, 0x26, 0xce, 0xff, 0x5d, 0x19, 0x91, 0xa0, 0xa3, 0xa5, +0xa9, 0xb1, 0xe0, 0x23, 0xc4, 0x0a, 0x77, 0x4d, 0xf9, 0x51, 0x20, 0xa3, 0xa5, 0xa9, 0xb1, +0xc1, 0x00, 0x82, 0x86, 0x8e, 0x7f, 0x5d, 0x19, 0x91, 0xa0, 0xa3, 0xc4, 0xeb, 0x54, 0x0b, +0x75, 0x68, 0x52, 0x07, 0x8c, 0x9a, 0x97, 0x8d, 0x79, 0x70, 0x62, 0x46, 0xef, 0x5c, 0x1b, +0x95, 0x89, 0x71, 0x41, 0xe1, 0x21, 0xa1, 0xa1, 0xa1, 0xc0, 0x02, 0x67, 0x4c, 0x1a, 0xb6, +0xcf, 0xfd, 0x78, 0x53, 0x24, 0xab, 0xb5, 0xc9, 0xf1, 0x60, 0x23, 0xa5, 0xc8, 0x12, 0x87, +0x6d, 0x58, 0x13, 0x85, 0x88, 0x92, 0x87, 0x6d, 0x58, 0x32, 0xc7, 0x0c, 0x9a, 0x97, 0xac, +0xda, 0x36, 0xee, 0x5e, 0x3e, 0xdf, 0x1d, 0xb8, 0xf2, 0x66, 0x2f, 0xbd, 0xf8, 0x72, 0x47, +0xed, 0x58, 0x13, 0x85, 0x88, 0x92, 0x87, 0x8c, 0x7b, 0x55, 0x09, 0x90, 0xa2, 0xc6, 0xef, +0x3d, 0xf8, 0x53, 0x24, 0xab, 0xd4, 0x2a, 0xb7, 0xec, 0x5a, 0x36, 0xee, 0x5e, 0x3e, 0xdf, +0x3c, 0xfa, 0x76, 0x4f, 0xfd, 0x59, 0x30, 0xe2, 0x46, 0xef, 0x3d, 0xf8, 0x53, 0x05, 0x69, +0x31, 0xc1, 0x00, 0x82, 0x86, 0x8e, 0x7f, 0x5d, 0x19, 0xb0, 0xe2, 0x27, 0xcc, 0xfb, 0x74, +0x4b, 0x14, 0x8b, 0x94, 0x8b, 0x75, 0x68, 0x33, 0xc5, 0x08, 0x92, 0x87, 0x8c, 0x9a, 0xb6, +0xcf, 0x1c, 0xba, 0xd7, 0x0d, 0x98, 0xb2, 0xe6, 0x2f, 0xdc, 0x1b, 0x95, 0x89, 0x71, 0x60, +0x23, 0xc4, 0x0a, 0x96, 0x8f, 0x9c, 0xba, 0xf6, 0x6e, 0x3f, 0xfc, 0x5b, 0x15, 0xa8, 0xd2, +0x26, 0xaf, 0xbd, 0xf8, 0x72, 0x66, 0x2f, 0xdc, 0x1b, 0xb4, 0xcb, 0x14, 0x8b, 0x94, 0xaa, +0xb7, 0xcd, 0xf9, 0x51, 0x01, 0x80, 0x82, 0x86, 0x6f, 0x3d, 0xd9, 0x30, 0xe2, 0x27, 0xcc, +0xfb, 0x74, 0x4b, 0x14, 0xaa, 0xb7, 0xcd, 0xf9, 0x70, 0x43, 0x04, 0x6b, 0x35, 0xc9, 0xf1, +0x60, 0x23, 0xa5, 0xc8, 0xf3, 0x45, 0x08, 0x92, 0x87, 0x6d, 0x58, 0x32, 0xe6, 0x2f, 0xbd, +0xf8, 0x72, 0x66, 0x4e, 0x1e, 0xbe, 0xfe, 0x7e, 0x7e, 0x7e, 0x5f, 0x1d, 0x99, 0x91, 0xa0, +0xa3, 0xc4, 0x0a, 0x77, 0x4d, 0x18, 0x93, 0xa4, 0xab, 0xd4, 0x0b, 0x75, 0x49, 0x10, 0xa2, +0xc6, 0xef, 0x3d, 0xf8, 0x53, 0x24, 0xab, 0xb5, 0xe8, 0x33, 0xe4, 0x4a, 0x16, 0xae, 0xde, +0x1f, 0xbc, 0xdb, 0x15, 0xa8, 0xb3, 0xc5, 0x08, 0x73, 0x45, 0xe9, 0x31, 0xc1, 0xe1, 0x21, +0xa1, 0xa1, 0xa1, 0xc0, 0x02, 0x86, 0x6f, 0x5c, 0x3a, 0xd7, 0x0d, 0x98, 0x93, 0xa4, 0xca, +0x16, 0xae, 0xde, 0x1f, 0x9d, 0x99, 0xb0, 0xe2, 0x46, 0xef, 0x3d, 0xf8, 0x72, 0x47, 0x0c, +0x9a, 0xb6, 0xcf, 0xfd, 0x59, 0x11, 0xa0, 0xa3, 0xa5, 0xc8, 0xf3, 0x45, 0x08, 0x92, 0x87, +0x6d, 0x39, 0xf0, 0x43, 0x04, 0x8a, 0x96, 0xae, 0xde, 0x3e, 0xdf, 0x1d, 0x99, 0x91, 0xa0, +0xc2, 0x06, 0x6f, 0x3d, 0xf8, 0x72, 0x47, 0x0c, 0x9a, 0x97, 0x8d, 0x98, 0x93, 0x85, 0x88, +0x73, 0x45, 0xe9, 0x31, 0xe0, 0x23, 0xa5, 0xa9, 0xd0, 0x03, 0x84, 0x8a, 0x96, 0xae, 0xde, +0x1f, 0xbc, 0xdb, 0x15, 0xa8, 0xd2, 0x26, 0xce, 0xff, 0x5d, 0x19, 0x91, 0x81, 0x80, 0x82, +0x67, 0x2d, 0xd8, 0x13, 0xa4, 0xab, 0xd4, 0x0b, 0x94, 0xaa, 0xb7, 0xcd, 0xf9, 0x51, 0x20, +0xa3, 0xa5, 0xc8, 0xf3, 0x45, 0xe9, 0x50, 0x22, 0xc6, 0xef, 0x5c, 0x3a, 0xd7, 0x0d, 0x98, +0x93, 0x85, 0x88, 0x73, 0x64, 0x4a, 0xf7, 0x4d, 0xf9, 0x51, 0x20, 0xa3, 0xc4, 0x0a, 0x96, +0xae, 0xde, 0x3e, 0xfe, 0x7e, 0x7e, 0x7e, 0x5f, 0x3c, 0xfa, 0x76, 0x4f, 0xfd, 0x78, 0x72, +0x66, 0x2f, 0xbd, 0xd9, 0x30, 0xc3, 0xe5, 0x48, 0x12, 0x87, 0x8c, 0x7b, 0x55, 0x28, 0xd2, +0x07, 0x8c, 0x9a, 0x97, 0xac, 0xda, 0x17, 0x8d, 0x79, 0x51, 0x20, 0xa3, 0xc4, 0xeb, 0x54, +0x0b, 0x94, 0x8b, 0x94, 0xaa, 0xd6, 0x2e, 0xbf, 0xfc, 0x5b, 0x15, 0xa8, 0xd2, 0x26, 0xaf, +0xdc, 0x1b, 0xb4, 0xea, 0x37, 0xec, 0x3b, 0xf4, 0x6a, 0x37, 0xcd, 0x18, 0x93, 0x85, 0x69, +0x31, 0xc1, 0xe1, 0x40, 0xe3, 0x25, 0xc8, 0x12, 0x87, 0x8c, 0x9a, 0xb6, 0xcf, 0xfd, 0x59, +0x11, 0xa0, 0xc2, 0x06, 0x8e, 0x7f, 0x5d, 0x38, 0xf2, 0x47, 0x0c, 0x7b, 0x74, 0x6a, 0x37, +0xec, 0x5a, 0x36, 0xee, 0x3f, 0xfc, 0x7a, 0x76, 0x4f, 0x1c, 0x9b, 0x95, 0x89, 0x71, 0x41, +0x00, 0x63, 0x44, 0xeb, 0x54, 0x2a, 0xd6, 0x0f, 0x9c, 0xba, 0xd7, 0x0d, 0x98, 0x93, 0x85, +0x69, 0x31, 0xc1, 0x00, 0x82, 0x86, 0x8e, 0x9e, 0xbe, 0xdf, 0x3c, 0xfa, 0x57, 0x2c, 0xda, +0x36, 0xee, 0x3f, 0xfc, 0x5b, 0x15, 0x89, 0x71, 0x41, 0x00, 0x82, 0x86, 0x8e, 0x7f, 0x5d, +0x38, 0xf2, 0x47, 0xed, 0x58, 0x13, 0xa4, 0xca, 0xf7, 0x4d, 0xf9, 0x51, 0x01, 0x80, 0x63, +0x44, 0xeb, 0x54, 0x2a, 0xd6, 0x2e, 0xbf, 0xdd, 0x19, 0x91, 0xa0, 0xa3, 0xa5, 0xa9, 0xb1, +0xe0, 0x42, 0x06, 0x8e, 0x7f, 0x5d, 0x19, 0x91, 0xa0, 0xa3, 0xc4, 0x0a, 0x96, 0x8f, 0x7d, +0x78, 0x72, 0x47, 0x0c, 0x7b, 0x74, 0x6a, 0x56, 0x2e, 0xde, 0x1f, 0xbc, 0xfa, 0x57, 0x0d, +0x79, 0x51, 0x01, 0x61, 0x21, 0xa1, 0xc0, 0xe3, 0x25, 0xa9, 0xb1, 0xc1, 0xe1, 0x40, 0x02, +0x67, 0x4c, 0x1a, 0x97, 0x8d, 0x98, 0x93, 0xa4, 0xab, 0xd4, 0x2a, 0xd6, 0x0f, 0x9c, 0x9b, +0xb4, 0xcb, 0x14, 0xaa, 0xb7, 0xcd, 0xf9, 0x51, 0x20, 0xa3, 0xc4, 0xeb, 0x35, 0xc9, 0xf1, +0x60, 0x42, 0x06, 0x8e, 0x7f, 0x7c, 0x7a, 0x76, 0x6e, 0x3f, 0xfc, 0x7a, 0x76, 0x6e, 0x5e, +0x3e, 0xfe, 0x7e, 0x5f, 0x3c, 0xdb, 0x15, 0x89, 0x71, 0x41, 0xe1, 0x21, 0xc0, 0xe3, 0x44, +0xeb, 0x54, 0x2a, 0xb7, 0xcd, 0xf9, 0x70, 0x62, 0x27, 0xad, 0xd8, 0x32, 0xc7, 0x0c, 0x7b, +0x74, 0x4b, 0x14, 0xaa, 0xb7, 0xec, 0x3b, 0xd5, 0x28, 0xd2, 0x07, 0x6d, 0x39, 0xd1, 0x20, +0xc2, 0xe7, 0x4c, 0x1a, 0x97, 0x8d, 0x98, 0xb2, 0xc7, 0x0c, 0x59, 0x28, 0xf3, 0x9b }; + +// clang-format off diff --git a/keyboards/ploopyco/trackball/config.h b/keyboards/ploopyco/trackball/config.h new file mode 100644 index 000000000000..57113d965b72 --- /dev/null +++ b/keyboards/ploopyco/trackball/config.h @@ -0,0 +1,69 @@ +/* Copyright 2020 Christopher Courtney, aka Drashna Jael're (@drashna) + * Copyright 2019 Sunjun Kim + * Copyright 2020 Ploopy Corporation + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License 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 0x5043 +#define PRODUCT_ID 0x5442 +#define DEVICE_VER 0x0001 +#define MANUFACTURER Ploopyco +#define PRODUCT Trackball + +/* key matrix size */ +#define MATRIX_ROWS 1 +#define MATRIX_COLS 5 + +/* + * 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 DIRECT_PINS { { D4, D2, E6, B5, D7 } } + +// These pins are not broken out, and cannot be used normally. +// They are set as output and pulled high, by default +#define UNUSED_PINS { D1, D3, B4, B6, B7, D6, C7, F6, F5, F3 } + +/* 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 + +/* disable action features */ +//#define NO_ACTION_LAYER +//#define NO_ACTION_TAPPING +//#define NO_ACTION_ONESHOT +#define NO_ACTION_MACRO +#define NO_ACTION_FUNCTION + +/* Much more so than a keyboard, speed matters for a mouse. So we'll go for as high + a polling rate as possible. */ +#define USB_POLLING_INTERVAL_MS 1 + +/* Bootmagic Lite key configuration */ +#define BOOTMAGIC_LITE_ROW 0 +#define BOOTMAGIC_LITE_COLUMN 3 diff --git a/keyboards/ploopyco/trackball/info.json b/keyboards/ploopyco/trackball/info.json new file mode 100644 index 000000000000..84d512d8ddc6 --- /dev/null +++ b/keyboards/ploopyco/trackball/info.json @@ -0,0 +1,18 @@ +{ + "keyboard_name": "PloopyCo Trackball", + "url": "", + "maintainer": "drashna", + "width": 8, + "height": 3, + "layouts": { + "LAYOUT": { + "layout": [ + {"x":0, "y":0, "h":2}, + {"x":1, "y":0.25, "h":1.5}, + {"x":2, "y":0, "h":2}, + {"x":3.5, "y":0, "h":2}, + {"x":4.5, "y":0, "h":2} + ] + } + } +} diff --git a/keyboards/ploopyco/trackball/keymaps/default/keymap.c b/keyboards/ploopyco/trackball/keymaps/default/keymap.c new file mode 100644 index 000000000000..dc1ad1439f04 --- /dev/null +++ b/keyboards/ploopyco/trackball/keymaps/default/keymap.c @@ -0,0 +1,26 @@ +/* Copyright 2020 Christopher Courtney, aka Drashna Jael're (@drashna) + * Copyright 2019 Sunjun Kim + * Copyright 2020 Ploopy Corporation + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public 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_BTN1, KC_BTN3, KC_BTN2, + KC_BTN4, KC_BTN5 + ), +}; diff --git a/keyboards/ploopyco/trackball/keymaps/default/readme.md b/keyboards/ploopyco/trackball/keymaps/default/readme.md new file mode 100644 index 000000000000..f965ef3c3263 --- /dev/null +++ b/keyboards/ploopyco/trackball/keymaps/default/readme.md @@ -0,0 +1 @@ +# The default keymap for Ploopyco Trackball diff --git a/keyboards/ploopyco/trackball/keymaps/via/keymap.c b/keyboards/ploopyco/trackball/keymaps/via/keymap.c new file mode 100644 index 000000000000..dc1ad1439f04 --- /dev/null +++ b/keyboards/ploopyco/trackball/keymaps/via/keymap.c @@ -0,0 +1,26 @@ +/* Copyright 2020 Christopher Courtney, aka Drashna Jael're (@drashna) + * Copyright 2019 Sunjun Kim + * Copyright 2020 Ploopy Corporation + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public 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_BTN1, KC_BTN3, KC_BTN2, + KC_BTN4, KC_BTN5 + ), +}; diff --git a/keyboards/ploopyco/trackball/keymaps/via/rules.mk b/keyboards/ploopyco/trackball/keymaps/via/rules.mk new file mode 100644 index 000000000000..1e5b99807cb7 --- /dev/null +++ b/keyboards/ploopyco/trackball/keymaps/via/rules.mk @@ -0,0 +1 @@ +VIA_ENABLE = yes diff --git a/keyboards/ploopyco/trackball/readme.md b/keyboards/ploopyco/trackball/readme.md new file mode 100644 index 000000000000..76b9d6a76261 --- /dev/null +++ b/keyboards/ploopyco/trackball/readme.md @@ -0,0 +1,68 @@ +# Ploopyco Trackball + +![Ploopyco Trackball](https://i.redd.it/j7z0y83txps31.jpg) + +It's a DIY, QMK Powered Trackball!!!! + +Everything works. However the scroll wheel has some issues and acts very odd. + +* Keyboard Maintainer: [PloopyCo](https://github.com/ploopyco), [Drashna Jael're](https://github.com/drashna/), [Germ](https://github.com/germ/) +* Hardware Supported: ATMega32u4 8MHz(3.3v) +* Hardware Availability: [Store](https://ploopy.co), [GitHub](https://github.com/ploopyco) + +Make example for this keyboard (after setting up your build environment): + + make ploopyco/trackball:default:flash + +To jump to the bootloader, hold down "Button 4" (immediate right of the trackball) + +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). + +# Customzing your PloopyCo Trackball + +While the defaults are designed so that it can be plugged in and used right away, there are a number of things that you may want to change. Such as adding DPI control, or to use the ball to scroll while holding a button. To allow for this sort of control, there is a callback for both the scroll wheel and the mouse censor. + +The default behavior for this is: + +```c +void process_wheel_user(report_mouse_t* mouse_report, int16_t h, int16_t v) { + mouse_report->h = h; + mouse_report->v = v; +} + +void process_mouse_user(report_mouse_t* mouse_report, int16_t x, int16_t y) { + mouse_report->x = x; + mouse_report->y = y; +} +``` + +This should allow you to more heavily customize the behavior. + +Alternatively, the `process_wheel` and `process_mouse` functions can both be replaced too, to allow for even more functionality. + +Additionally, you can change the DPI/CPI or speed of the trackball by calling `pmw_set_cpi` at any time. And tThe default can be changed by adding a define to the keymap's `config.h` file: + + #define PMW_CPI 1600 + +# Programming QMK-DFU onto the PloopyCo Trackball + +If you would rather have DFU on this board, you can use the QMK-DFU bootloader on the device. To do so, you want to run: + + make ploopyco/trackball:default:production + +Once you have that, you'll need to [ISP Flash](https://docs.qmk.fm/#/isp_flashing_guide) the chip with the new bootloader hex file created (or the production hex), and set the fuses: + + +| Fuse | Setting | +|----------|------------------| +| Low | `0xDF` | +| High | `0xD8` or `0x98` | +| Extended | `0xCB` | + +Original (Caterina) settings: + +| Fuse | Setting | +|----------|------------------| +| Low | `0xFF` | +| High | `0xD8` | +| Extended | `0xFE` | diff --git a/keyboards/ploopyco/trackball/rules.mk b/keyboards/ploopyco/trackball/rules.mk new file mode 100644 index 000000000000..d77431b676da --- /dev/null +++ b/keyboards/ploopyco/trackball/rules.mk @@ -0,0 +1,30 @@ +# MCU name +MCU = atmega32u4 + +# Processor frequency +F_CPU = 8000000 + +# Bootloader selection +BOOTLOADER = caterina + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +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 +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth +AUDIO_ENABLE = no # Audio output +POINTING_DEVICE_ENABLE = yes +MOUSEKEY_ENABLE = no # Mouse keys + +QUANTUM_LIB_SRC += analog.c spi_master.c +SRC += pmw3600.c opt_encoder.c diff --git a/keyboards/ploopyco/trackball/trackball.c b/keyboards/ploopyco/trackball/trackball.c new file mode 100644 index 000000000000..6a9bffbffedd --- /dev/null +++ b/keyboards/ploopyco/trackball/trackball.c @@ -0,0 +1,237 @@ +/* Copyright 2020 Christopher Courtney, aka Drashna Jael're (@drashna) + * Copyright 2019 Sunjun Kim + * Copyright 2020 Ploopy Corporation + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public 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 + +#ifndef OPT_DEBOUNCE +# define OPT_DEBOUNCE 5 // (ms) Time between scroll events +#endif +#ifndef SCROLL_BUTT_DEBOUNCE +# define SCROLL_BUTT_DEBOUNCE 100 // (ms) Time between scroll events +#endif +#ifndef OPT_THRES +# define OPT_THRES 150 // (0-1024) Threshold for actication +#endif +#ifndef OPT_SCALE +# define OPT_SCALE 1 // Multiplier for wheel +#endif + +// TODO: Implement libinput profiles +// https://wayland.freedesktop.org/libinput/doc/latest/pointer-acceleration.html +// Compile time accel selection +// Valid options are ACC_NONE, ACC_LINEAR, ACC_CUSTOM, ACC_QUADRATIC + +// Trackball State +bool is_scroll_clicked = false; +bool BurstState = false; // init burst state for Trackball module +uint16_t MotionStart = 0; // Timer for accel, 0 is resting state +uint16_t lastScroll = 0; // Previous confirmed wheel event +uint16_t lastMidClick = 0; // Stops scrollwheel from being read if it was pressed +uint8_t OptLowPin = OPT_ENC1; +bool debug_encoder = false; + +__attribute__((weak)) void process_wheel_user(report_mouse_t* mouse_report, int16_t h, int16_t v) { + mouse_report->h = h; + mouse_report->v = v; +} + +__attribute__((weak)) void process_wheel(report_mouse_t* mouse_report) { + // TODO: Replace this with interrupt driven code, polling is S L O W + // Lovingly ripped from the Ploopy Source + + // If the mouse wheel was just released, do not scroll. + if (timer_elapsed(lastMidClick) < SCROLL_BUTT_DEBOUNCE) { + return; + } + + // Limit the number of scrolls per unit time. + if (timer_elapsed(lastScroll) < OPT_DEBOUNCE) { + return; + } + + // Don't scroll if the middle button is depressed. + if (is_scroll_clicked) { +#ifndef IGNORE_SCROLL_CLICK + return; +#endif + } + + lastScroll = timer_read(); + uint16_t p1 = adc_read(OPT_ENC1_MUX); + uint16_t p2 = adc_read(OPT_ENC2_MUX); + if (debug_encoder) dprintf("OPT1: %d, OPT2: %d\n", p1, p2); + + uint8_t dir = opt_encoder_handler(p1, p2); + + if (dir == 0) return; + process_wheel_user(mouse_report, mouse_report->h, (int)(mouse_report->v + (dir * OPT_SCALE))); +} + +__attribute__((weak)) void process_mouse_user(report_mouse_t* mouse_report, int16_t x, int16_t y) { + mouse_report->x = x; + mouse_report->y = y; +} + +__attribute__((weak)) void process_mouse(report_mouse_t* mouse_report) { + report_pmw_t data = pmw_read_burst(); + if (data.isOnSurface && data.isMotion) { + // Reset timer if stopped moving + if (!data.isMotion) { + if (MotionStart != 0) MotionStart = 0; + return; + } + + // Set timer if new motion + if ((MotionStart == 0) && data.isMotion) { + if (debug_mouse) dprintf("Starting motion.\n"); + MotionStart = timer_read(); + } + + if (debug_mouse) { + dprintf("Delt] d: %d t: %u\n", abs(data.dx) + abs(data.dy), MotionStart); + } + if (debug_mouse) { + dprintf("Pre ] X: %d, Y: %d\n", data.dx, data.dy); + } +#if defined(PROFILE_LINEAR) + float scale = float(timer_elaspsed(MotionStart)) / 1000.0; + data.dx *= scale; + data.dy *= scale; +#elif defined(PROFILE_INVERSE) + // TODO +#else + // no post processing +#endif + // apply multiplier + // data.dx *= mouse_multiplier; + // data.dy *= mouse_multiplier; + + // Wrap to HID size + data.dx = constrain(data.dx, -127, 127); + data.dy = constrain(data.dy, -127, 127); + if (debug_mouse) dprintf("Cons] X: %d, Y: %d\n", data.dx, data.dy); + // dprintf("Elapsed:%u, X: %f Y: %\n", i, pgm_read_byte(firmware_data+i)); + + process_mouse_user(mouse_report, data.dx, data.dy); + } +} + +bool process_record_kb(uint16_t keycode, keyrecord_t* record) { + if (debug_mouse) { + dprintf("KL: kc: %u, col: %u, row: %u, pressed: %u\n", keycode, record->event.key.col, record->event.key.row, record->event.pressed); + } + + // Update Timer to prevent accidental scrolls + if ((record->event.key.col == 2) && (record->event.key.row == 0)) { + lastMidClick = timer_read(); + is_scroll_clicked = record->event.pressed; + } + +/* If Mousekeys is disabled, then use handle the mouse button + * keycodes. This makes things simpler, and allows usage of + * the keycodes in a consistent manner. But only do this if + * Mousekeys is not enable, so it's not handled twice. + */ +#ifndef MOUSEKEY_ENABLE + if (IS_MOUSEKEY_BUTTON(keycode)) { + report_mouse_t currentReport = pointing_device_get_report(); + if (record->event.pressed) { + if (keycode == KC_MS_BTN1) + currentReport.buttons |= MOUSE_BTN1; + else if (keycode == KC_MS_BTN2) + currentReport.buttons |= MOUSE_BTN2; + else if (keycode == KC_MS_BTN3) + currentReport.buttons |= MOUSE_BTN3; + else if (keycode == KC_MS_BTN4) + currentReport.buttons |= MOUSE_BTN4; + else if (keycode == KC_MS_BTN5) + currentReport.buttons |= MOUSE_BTN5; + } else { + if (keycode == KC_MS_BTN1) + currentReport.buttons &= ~MOUSE_BTN1; + else if (keycode == KC_MS_BTN2) + currentReport.buttons &= ~MOUSE_BTN2; + else if (keycode == KC_MS_BTN3) + currentReport.buttons &= ~MOUSE_BTN3; + else if (keycode == KC_MS_BTN4) + currentReport.buttons &= ~MOUSE_BTN4; + else if (keycode == KC_MS_BTN5) + currentReport.buttons &= ~MOUSE_BTN5; + } + pointing_device_set_report(currentReport); + } +#endif + + return process_record_user(keycode, record); +} + +// Hardware Setup +void keyboard_pre_init_kb(void) { + // debug_enable = true; + // debug_matrix = true; + // debug_mouse = true; + // debug_encoder = true; + + setPinInput(OPT_ENC1); + setPinInput(OPT_ENC2); + + // This is the debug LED. + setPinOutput(F7); + writePin(F7, debug_enable); + + /* Ground all output pins connected to ground. This provides additional + * pathways to ground. If you're messing with this, know this: driving ANY + * of these pins high will cause a short. On the MCU. Ka-blooey. + */ +#ifdef UNUSED_PINS + const pin_t unused_pins[] = UNUSED_PINS; + + for (uint8_t i = 0; i < (sizeof(unused_pins) / sizeof(pin_t)); i++) { + setPinOutput(unused_pins[i]); + writePinLow(unused_pins[i]); + } +#endif + keyboard_pre_init_user(); +} + +void pointing_device_init(void) { + // initialize ball sensor + pmw_spi_init(); + // initialize the scroll wheel's optical encoder + opt_encoder_init(); +} + +bool has_report_changed (report_mouse_t first, report_mouse_t second) { + return !( + (!first.buttons && first.buttons == second.buttons) && + (!first.x && first.x == second.x) && + (!first.y && first.y == second.y) && + (!first.h && first.h == second.h) && + (!first.v && first.v == second.v) ); +} + +void pointing_device_task(void) { + report_mouse_t mouse_report = pointing_device_get_report(); + process_wheel(&mouse_report); + process_mouse(&mouse_report); + + pointing_device_set_report(mouse_report); + if (has_report_changed(mouse_report, pointing_device_get_report())) { + pointing_device_send(); + } +} diff --git a/keyboards/ploopyco/trackball/trackball.h b/keyboards/ploopyco/trackball/trackball.h new file mode 100644 index 000000000000..959305a07e27 --- /dev/null +++ b/keyboards/ploopyco/trackball/trackball.h @@ -0,0 +1,40 @@ +/* Copyright 2020 Christopher Courtney, aka Drashna Jael're (@drashna) + * Copyright 2019 Sunjun Kim + * Copyright 2020 Ploopy Corporation + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License 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 "spi_master.h" +#include "pmw3600.h" +#include "analog.h" +#include "opt_encoder.h" +#include "pointing_device.h" + +// Sensor defs +#define OPT_ENC1 F0 +#define OPT_ENC2 F4 +#define OPT_ENC1_MUX 0 +#define OPT_ENC2_MUX 4 + +void process_mouse(report_mouse_t* mouse_report); +void process_mouse_user(report_mouse_t* mouse_report, int16_t x, int16_t y); +void process_wheel(report_mouse_t* mouse_report); +void process_wheel_user(report_mouse_t* mouse_report, int16_t h, int16_t v); + +#define LAYOUT(BL, BM, BR, BF, BB) \ + { {BL, BM, BR, BF, BB}, } From c7599bf49fd0f5f7b0d5e863440eaa85d0247690 Mon Sep 17 00:00:00 2001 From: MechMerlin <30334081+mechmerlin@users.noreply.github.com> Date: Sun, 27 Sep 2020 18:46:24 -0700 Subject: [PATCH 893/930] Swapparoo of bottom row keys (#10277) --- keyboards/tgr/910ce/910ce.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/keyboards/tgr/910ce/910ce.h b/keyboards/tgr/910ce/910ce.h index f1592b02899d..2d8f113e21fb 100644 --- a/keyboards/tgr/910ce/910ce.h +++ b/keyboards/tgr/910ce/910ce.h @@ -32,7 +32,7 @@ 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, k44, k45, k47, k49, k48, k4c, k4d, k4e \ + k40, k41, k42, k44, k45, k47, k48, k49, 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 }, \ @@ -47,7 +47,7 @@ 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, k49, k48, k4c, k4d, k4e \ + k40, k41, k42, k45, k48, k49, k4c, k4d, k4e \ ) { \ { 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 }, \ @@ -62,7 +62,7 @@ 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, k49, k48, k4c, k4d, k4e \ + k40, k41, k42, k45, k48, k49, k4c, k4d, k4e \ ) { \ { 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 }, \ From 2eeb30cd5ac755fcb8314ec6b39b56412f43baf1 Mon Sep 17 00:00:00 2001 From: Joel Schneider Date: Tue, 29 Sep 2020 00:25:53 -0400 Subject: [PATCH 894/930] [Keyboard] Add SiCK-PAD handwired keyboard (#10429) * Add sick_pad * Adjust setup for Proton C * Add readme * Add info.json * Make requested changes * Resolve PR issues --- keyboards/handwired/sick_pad/config.h | 47 +++++++++++++++++++ keyboards/handwired/sick_pad/info.json | 34 ++++++++++++++ .../sick_pad/keymaps/default/keymap.c | 27 +++++++++++ keyboards/handwired/sick_pad/readme.md | 15 ++++++ keyboards/handwired/sick_pad/rules.mk | 20 ++++++++ keyboards/handwired/sick_pad/sick_pad.c | 17 +++++++ keyboards/handwired/sick_pad/sick_pad.h | 33 +++++++++++++ 7 files changed, 193 insertions(+) create mode 100644 keyboards/handwired/sick_pad/config.h create mode 100644 keyboards/handwired/sick_pad/info.json create mode 100644 keyboards/handwired/sick_pad/keymaps/default/keymap.c create mode 100644 keyboards/handwired/sick_pad/readme.md create mode 100644 keyboards/handwired/sick_pad/rules.mk create mode 100644 keyboards/handwired/sick_pad/sick_pad.c create mode 100644 keyboards/handwired/sick_pad/sick_pad.h diff --git a/keyboards/handwired/sick_pad/config.h b/keyboards/handwired/sick_pad/config.h new file mode 100644 index 000000000000..f431daf38e39 --- /dev/null +++ b/keyboards/handwired/sick_pad/config.h @@ -0,0 +1,47 @@ +/* Copyright 2020 Joel Schneider + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License 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 0xDA20 +#define DEVICE_VER 0x0001 +#define MANUFACTURER FedorSosnin +#define PRODUCT SiCK-PAD + +/* key matrix size */ +#define MATRIX_ROWS 5 +#define MATRIX_COLS 4 + +/* key matrix pins */ +#define MATRIX_ROW_PINS { B0, B1, B2, B3, B4 } +#define MATRIX_COL_PINS { B9, B15, B14, B13 } +#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/sick_pad/info.json b/keyboards/handwired/sick_pad/info.json new file mode 100644 index 000000000000..68ff6b40e824 --- /dev/null +++ b/keyboards/handwired/sick_pad/info.json @@ -0,0 +1,34 @@ +{ + "keyboard_name": "sick_pad", + "url": "https://www.thingiverse.com/thing:3682168", + "maintainer": "jmschneider", + "width": 4, + "height": 5, + "layouts": { + "LAYOUT_numpad_5x4": { + "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} + ] + } + } +} diff --git a/keyboards/handwired/sick_pad/keymaps/default/keymap.c b/keyboards/handwired/sick_pad/keymaps/default/keymap.c new file mode 100644 index 000000000000..62e599faa3cf --- /dev/null +++ b/keyboards/handwired/sick_pad/keymaps/default/keymap.c @@ -0,0 +1,27 @@ +/* Copyright 2020 Joel Schneider + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public 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_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/sick_pad/readme.md b/keyboards/handwired/sick_pad/readme.md new file mode 100644 index 000000000000..5d3879c4050d --- /dev/null +++ b/keyboards/handwired/sick_pad/readme.md @@ -0,0 +1,15 @@ +# SiCK-PAD + +![SiCK-PAD](https://cdn.thingiverse.com/assets/79/f6/22/c5/93/IMG_7816.JPG) + +The SiCK-PAD is a custom 3D printed mechanical numpad built from scratch without the price tag often associated with one. + +- Keyboard Maintainer: [jmschneider](https://github.com/jmschneider) +- Hardware Supported: QMK Proton C +- Hardware Availability: [files to print and documentation](https://www.thingiverse.com/thing:3682168) + +Make example for this keyboard (after setting up your build environment): + + make handwired/sick_pad: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/sick_pad/rules.mk b/keyboards/handwired/sick_pad/rules.mk new file mode 100644 index 000000000000..bfe731ecce7c --- /dev/null +++ b/keyboards/handwired/sick_pad/rules.mk @@ -0,0 +1,20 @@ +# MCU name +MCU = STM32F303 + +# 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 +BLUETOOTH_ENABLE = no # Enable Bluetooth +AUDIO_ENABLE = no # Audio output +LAYOUTS = numpad_5x4 diff --git a/keyboards/handwired/sick_pad/sick_pad.c b/keyboards/handwired/sick_pad/sick_pad.c new file mode 100644 index 000000000000..3464545feff8 --- /dev/null +++ b/keyboards/handwired/sick_pad/sick_pad.c @@ -0,0 +1,17 @@ +/* Copyright 2020 Joel Schneider + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#include "sick_pad.h" diff --git a/keyboards/handwired/sick_pad/sick_pad.h b/keyboards/handwired/sick_pad/sick_pad.h new file mode 100644 index 000000000000..2fe82388de7e --- /dev/null +++ b/keyboards/handwired/sick_pad/sick_pad.h @@ -0,0 +1,33 @@ +/* Copyright 2020 Joel Schneider + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License 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_numpad_5x4( \ + K00, K01, K02, K03, \ + K10, K11, K12, \ + K20, K21, K22, K23, \ + K30, K31, K32, \ + K41, K42, K43 \ +) { \ + { K00, K01, K02, K03 }, \ + { K10, K11, K12, KC_NO }, \ + { K20, K21, K22, K23 }, \ + { K30, K31, K32, KC_NO }, \ + { KC_NO, K41, K42, K43 } \ +} From d844f5af7031e18d8933954e85903484d51d978a Mon Sep 17 00:00:00 2001 From: Sendy YK Date: Tue, 29 Sep 2020 11:32:38 +0700 Subject: [PATCH 895/930] Update mrsendyyk Community Layouts (#10338) * Add layouts/community/numpad_5x4/mrsendyyk * Update keymap.c * Update readme.md * Update readme.md * Update readme.md * Rename my community layouts * Rename * Rename * Cleanup my code * Update readme.md * Cleanup * Update keymap.c * Delete unnecessary files --- .../ai03/soyuz/keymaps/mrsendyyk/readme.md | 19 ---- keyboards/dz60/keymaps/mrsendyyk/keymap.c | 98 ------------------- keyboards/dz60/keymaps/mrsendyyk/readme.md | 85 ---------------- layouts/community/60_ansi_arrow/layout.json | 6 -- .../60_ansi_arrow/mrsendyyk/keymap.c | 15 ++- .../60_ansi_arrow/mrsendyyk/readme.md | 21 ++-- .../60_ansi_arrow/mrsendyyk/rules.mk | 2 +- layouts/community/60_ansi_arrow/readme.md | 94 ------------------ .../community/numpad_5x4}/mrsendyyk/keymap.c | 5 +- .../community/numpad_5x4/mrsendyyk/readme.md | 22 +++++ .../community/numpad_5x4/mrsendyyk/rules.mk | 1 + .../default_60_ansi_arrow/keymap.c | 7 +- layouts/default/60_ansi_arrow/info.json | 2 +- layouts/default/60_ansi_arrow/readme.md | 21 +++- 14 files changed, 74 insertions(+), 324 deletions(-) delete mode 100644 keyboards/ai03/soyuz/keymaps/mrsendyyk/readme.md delete mode 100644 keyboards/dz60/keymaps/mrsendyyk/keymap.c delete mode 100644 keyboards/dz60/keymaps/mrsendyyk/readme.md delete mode 100644 layouts/community/60_ansi_arrow/layout.json delete mode 100644 layouts/community/60_ansi_arrow/readme.md rename {keyboards/ai03/soyuz/keymaps => layouts/community/numpad_5x4}/mrsendyyk/keymap.c (88%) create mode 100644 layouts/community/numpad_5x4/mrsendyyk/readme.md create mode 100644 layouts/community/numpad_5x4/mrsendyyk/rules.mk diff --git a/keyboards/ai03/soyuz/keymaps/mrsendyyk/readme.md b/keyboards/ai03/soyuz/keymaps/mrsendyyk/readme.md deleted file mode 100644 index 0e5007e6fa9f..000000000000 --- a/keyboards/ai03/soyuz/keymaps/mrsendyyk/readme.md +++ /dev/null @@ -1,19 +0,0 @@ -# Sendy YK's Numpad 5x4 Layout and Keymap - -[https://mr.sendyyk.com](https://mr.sendyyk.com) - -## Numpad 5x4 Layout - -![LAYOUT_numpad_5x4](https://raw.githubusercontent.com/mrsendyyk/my_qmk/master/soyuz/assets/layout-numpad-5x4.png) - -## Keymap - -![_BASE](https://raw.githubusercontent.com/mrsendyyk/my_qmk/master/soyuz/assets/layout-numpad-5x4-keymap.png) - -## Build The Firmware - -You will need to build the firmware. To do so go to your terminal window and run the compile command: - - qmk compile -kb ai03/soyuz -km mrsendyyk - -See [The Complete Newbs Guide To QMK](https://docs.qmk.fm/#/newbs). diff --git a/keyboards/dz60/keymaps/mrsendyyk/keymap.c b/keyboards/dz60/keymaps/mrsendyyk/keymap.c deleted file mode 100644 index 80d03922b9a7..000000000000 --- a/keyboards/dz60/keymaps/mrsendyyk/keymap.c +++ /dev/null @@ -1,98 +0,0 @@ -/* Copyright (C) 2020 Sendy YK (https://mr.sendyyk.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 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public 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, // Default Layer - _FN, // Fn Layer 1 - _SETTINGS // Fn Layer 2 -}; - -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - // Default Layer - [_BASE] = LAYOUT_60_ansi_arrow( - 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_RSFT, KC_UP, KC_SLSH, - KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, LT(2, KC_RALT), LT(1, KC_RCTL), KC_LEFT, KC_DOWN, KC_RGHT - ), - // Fn Layer 1 - [_FN] = LAYOUT_60_ansi_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_BRIU, KC_TRNS, KC_TRNS, KC_END, RESET, KC_TRNS, KC_TRNS, KC_TRNS, KC_INS, KC_TRNS, KC_PSCR, KC_TRNS, KC_TRNS, KC_EJCT, - KC_BRID, KC_TRNS, KC_SLCK, KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MUTE, - KC_VOLU, KC_TRNS, KC_TRNS, KC_CALC, KC_TRNS, KC_TRNS, KC_NLCK, KC_MAIL, KC_TRNS, KC_TRNS, KC_PAUS, KC_PGUP, KC_TRNS, - KC_VOLD, KC_MRWD, KC_MFFD, KC_MPLY, KC_MSTP, KC_TRNS, KC_MPRV, KC_PGDN, KC_MNXT - ), - // Fn Layer 2 - [_SETTINGS] = LAYOUT_60_ansi_arrow( - KC_TRNS, KC_TRNS, KC_TRNS, 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_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, 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 - ) -}; - -void keyboard_post_init_user(void) { - rgblight_enable_noeeprom(); - rgblight_sethsv_noeeprom(0, 0, 0); -} - -// RGB Lighting/LED/Underglow as Caps Lock, Num Lock, Scroll Lock, and Layer Indicator -void update_led(void) { - // Num Lock Indicator - if (host_keyboard_led_state().num_lock) { - rgblight_setrgb(225, 8, 0); - } - // Scroll Lock Indicator - if (host_keyboard_led_state().scroll_lock) { - rgblight_setrgb(255, 110, 0); - } -} - -void led_set_user(uint8_t usb_led) { - // Caps Lock Indicator - if (IS_LED_ON(usb_led, USB_LED_CAPS_LOCK)) { - writePinLow(B2); - rgblight_setrgb(100, 255, 100); - } - // Layer Indicator - else { - switch (get_highest_layer(layer_state)) { - // Fn Layer 1 Indicator - case _FN: - rgblight_setrgb(100, 255, 100); - break; - // Fn Layer 2 Indicator - case _SETTINGS: - rgblight_setrgb(100, 255, 100); - break; - // Default Layer Indicator - case _BASE: - rgblight_setrgb(0, 0, 0); - break; - } - update_led(); - } -} - -layer_state_t layer_state_set_user(layer_state_t state) { - update_led(); - return state; -} diff --git a/keyboards/dz60/keymaps/mrsendyyk/readme.md b/keyboards/dz60/keymaps/mrsendyyk/readme.md deleted file mode 100644 index 838630221852..000000000000 --- a/keyboards/dz60/keymaps/mrsendyyk/readme.md +++ /dev/null @@ -1,85 +0,0 @@ -# Sendy YK's 60% ANSI Arrow Layout and Keymap - -[https://mr.sendyyk.com](https://mr.sendyyk.com) - -## 60% ANSI Arrow Layout - -![LAYOUT_60_ansi_arrow](https://raw.githubusercontent.com/mrsendyyk/my_qmk/master/dz60/assets/layout-60-ansi-arrow.png) - -## Keymap - -### Default Layer - -![_BASE](https://raw.githubusercontent.com/mrsendyyk/my_qmk/master/dz60/assets/layout-60-ansi-arrow-keymap---layer-0.png) - -### Fn Layer 1 - -Press and hold *right* **Ctrl** key. - -![_FN](https://raw.githubusercontent.com/mrsendyyk/my_qmk/master/dz60/assets/layout-60-ansi-arrow-keymap---layer-1.png) - -### Fn Layer 2 - -Press and hold *right* **Alt** key. - -![_SETTINGS](https://raw.githubusercontent.com/mrsendyyk/my_qmk/master/dz60/assets/layout-60-ansi-arrow-keymap---layer-2.png) - -### RGB Lighting/LED/Underglow as Caps Lock, Num Lock, Scroll Lock, and Layer Indicator - -#### Caps Lock Indicator - -```c - // Caps Lock Indicator - if (IS_LED_ON(usb_led, USB_LED_CAPS_LOCK)) { - writePinLow(B2); - rgblight_setrgb(100, 255, 100); - } -``` - -#### Num Lock Indicator - -```c - // Num Lock Indicator - if (host_keyboard_led_state().num_lock) { - rgblight_setrgb(225, 8, 0); - } -``` - -#### Scroll Lock Indicator -```c - // Scroll Lock Indicator - if (host_keyboard_led_state().scroll_lock) { - rgblight_setrgb(255, 110, 0); - } -``` - -#### Layer Indicator - -```c - // Layer Indicator - else { - switch (get_highest_layer(layer_state)) { - // Fn Layer 1 Indicator - case _FN: - rgblight_setrgb(100, 255, 100); - break; - // Fn Layer 2 Indicator - case _SETTINGS: - rgblight_setrgb(100, 255, 100); - break; - // Default Layer Indicator - case _BASE: - rgblight_setrgb(0, 0, 0); - break; - } - update_led(); - } -``` - -## Build The Firmware - -You will need to build the firmware. To do so go to your terminal window and run the compile command: - - qmk compile -kb dz60 -km mrsendyyk - -See [The Complete Newbs Guide To QMK](https://docs.qmk.fm/#/newbs). diff --git a/layouts/community/60_ansi_arrow/layout.json b/layouts/community/60_ansi_arrow/layout.json deleted file mode 100644 index 7fc631c3d1d1..000000000000 --- a/layouts/community/60_ansi_arrow/layout.json +++ /dev/null @@ -1,6 +0,0 @@ -[{a:7},"","","","","","","","","","","","","",{w:2},""], -[{w:1.5},"","","","","","","","","","","","","",{w:1.5},""], -[{w:1.75},"","","","","","","","","","","","",{w:2.25},""], -[{w:2.25},"","","","","","","","","","",{w:1.75},"","",""], -[{w:1.25},"",{w:1.25},"",{w:1.25},"",{w:6.25},"","","","","",""] - \ No newline at end of file diff --git a/layouts/community/60_ansi_arrow/mrsendyyk/keymap.c b/layouts/community/60_ansi_arrow/mrsendyyk/keymap.c index 80d03922b9a7..0f6bef4e4882 100644 --- a/layouts/community/60_ansi_arrow/mrsendyyk/keymap.c +++ b/layouts/community/60_ansi_arrow/mrsendyyk/keymap.c @@ -1,4 +1,5 @@ -/* Copyright (C) 2020 Sendy YK (https://mr.sendyyk.com). +/* + * Copyright (C) 2020 Sendy YK . * * This 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,7 +14,13 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ - + +/* + * 60% ANSI Arrow Keyboard Layout and Keymap + * with RGB Lighting/LED/Underglow as Caps Lock, Num Lock, Scroll Lock, and Layer Indicator + * by Sendy YK . + */ + #include QMK_KEYBOARD_H enum layer_names { @@ -22,7 +29,7 @@ enum layer_names { _SETTINGS // Fn Layer 2 }; -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { // Default Layer [_BASE] = LAYOUT_60_ansi_arrow( 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, @@ -73,7 +80,7 @@ void led_set_user(uint8_t usb_led) { rgblight_setrgb(100, 255, 100); } // Layer Indicator - else { + else { switch (get_highest_layer(layer_state)) { // Fn Layer 1 Indicator case _FN: diff --git a/layouts/community/60_ansi_arrow/mrsendyyk/readme.md b/layouts/community/60_ansi_arrow/mrsendyyk/readme.md index 838630221852..a6985cfb9cfd 100644 --- a/layouts/community/60_ansi_arrow/mrsendyyk/readme.md +++ b/layouts/community/60_ansi_arrow/mrsendyyk/readme.md @@ -1,28 +1,28 @@ # Sendy YK's 60% ANSI Arrow Layout and Keymap -[https://mr.sendyyk.com](https://mr.sendyyk.com) +60% ANSI Arrow keyboard layout and keymap with RGB lighting/LED/underglow as Caps Lock, Num Lock, Scroll Lock, and layer indicator by [Sendy YK](https://mr.sendyyk.com). ## 60% ANSI Arrow Layout -![LAYOUT_60_ansi_arrow](https://raw.githubusercontent.com/mrsendyyk/my_qmk/master/dz60/assets/layout-60-ansi-arrow.png) +![LAYOUT_60_ansi_arrow](https://raw.githubusercontent.com/mrsendyyk/files/public/qmk/firmware/layouts/community/60_ansi_arrow/mrsendyyk/images/layout-60-ansi-arrow.png) ## Keymap ### Default Layer -![_BASE](https://raw.githubusercontent.com/mrsendyyk/my_qmk/master/dz60/assets/layout-60-ansi-arrow-keymap---layer-0.png) +![_BASE](https://raw.githubusercontent.com/mrsendyyk/files/public/qmk/firmware/layouts/community/60_ansi_arrow/mrsendyyk/images/layout-60-ansi-arrow-keymap---layer-0.png) ### Fn Layer 1 Press and hold *right* **Ctrl** key. -![_FN](https://raw.githubusercontent.com/mrsendyyk/my_qmk/master/dz60/assets/layout-60-ansi-arrow-keymap---layer-1.png) +![_FN](https://raw.githubusercontent.com/mrsendyyk/files/public/qmk/firmware/layouts/community/60_ansi_arrow/mrsendyyk/images/layout-60-ansi-arrow-keymap---layer-1.png) ### Fn Layer 2 Press and hold *right* **Alt** key. -![_SETTINGS](https://raw.githubusercontent.com/mrsendyyk/my_qmk/master/dz60/assets/layout-60-ansi-arrow-keymap---layer-2.png) +![_SETTINGS](https://raw.githubusercontent.com/mrsendyyk/files/public/qmk/firmware/layouts/community/60_ansi_arrow/mrsendyyk/images/layout-60-ansi-arrow-keymap---layer-2.png) ### RGB Lighting/LED/Underglow as Caps Lock, Num Lock, Scroll Lock, and Layer Indicator @@ -57,7 +57,7 @@ Press and hold *right* **Alt** key. ```c // Layer Indicator - else { + else { switch (get_highest_layer(layer_state)) { // Fn Layer 1 Indicator case _FN: @@ -78,8 +78,11 @@ Press and hold *right* **Alt** key. ## Build The Firmware -You will need to build the firmware. To do so go to your terminal window and run the compile command: +Make example for keyboard (after setting up your build environment): - qmk compile -kb dz60 -km mrsendyyk + make :mrsendyyk -See [The Complete Newbs Guide To QMK](https://docs.qmk.fm/#/newbs). +More information: +* [Setting Up Your QMK Environment](https://docs.qmk.fm/#/getting_started_build_tools) +* [More Detailed make Instructions](https://docs.qmk.fm/#/getting_started_make_guide) +* [The Complete Newbs Guide To QMK](https://docs.qmk.fm/#/newbs) diff --git a/layouts/community/60_ansi_arrow/mrsendyyk/rules.mk b/layouts/community/60_ansi_arrow/mrsendyyk/rules.mk index 479eb15e246f..5c3115dc3337 100644 --- a/layouts/community/60_ansi_arrow/mrsendyyk/rules.mk +++ b/layouts/community/60_ansi_arrow/mrsendyyk/rules.mk @@ -1 +1 @@ -USER_NAME := mrsendyyk \ No newline at end of file +USER_NAME := mrsendyyk diff --git a/layouts/community/60_ansi_arrow/readme.md b/layouts/community/60_ansi_arrow/readme.md deleted file mode 100644 index 2fc165376e18..000000000000 --- a/layouts/community/60_ansi_arrow/readme.md +++ /dev/null @@ -1,94 +0,0 @@ -# 60_ansi_arrow - -This is the 60% ANSI Arrow keyboard layout. - -## Requirements - -### 1. Layout Defined - -A keyboard's `.h` file needs to have `LAYOUT_60_ansi_arrow` defined - -```c -#define LAYOUT_60_ansi_arrow( \ - 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, 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, KC_NO, k32, k33, k34, k35, k36, k37, k38, k39, k3a, KC_NO, k3c, k3d, k3e }, \ - { k40, k41, KC_NO, k43, KC_NO, KC_NO, k46, KC_NO, KC_NO, KC_NO, k4a, k4b, k4c, k4d, k4e } \ -} -``` - -![LAYOUT_60_ansi_arrow](https://raw.githubusercontent.com/mrsendyyk/my_qmk/master/dz60/assets/layout-60-ansi-arrow.png) - -### 2. Configuring rules.mk - -`rules.mk` needs to have the following line: - - LAYOUTS = 60_ansi_arrow - -### 3. Defining a Keymap - -A keymap must be defined at - - qmk_firmware/layouts/community/60_ansi_arrow/yourfoldername/keymap.c - -This keymap must have a `LAYOUT_60_ansi_arrow` layout defined. - -```c -#include QMK_KEYBOARD_H - -enum layer_names { - _BASE, // Default Layer - _FN, // Fn Layer 1 - _SETTINGS // Fn Layer 2 -}; - -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - // Default Layer - [_BASE] = LAYOUT_60_ansi_arrow( - 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_RSFT, KC_UP, KC_SLSH, - KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, LT(2, KC_RALT), LT(1, KC_RCTL), KC_LEFT, KC_DOWN, KC_RGHT - ), - // Fn Layer 1 - [_FN] = LAYOUT_60_ansi_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_BRIU, KC_TRNS, KC_TRNS, KC_END, RESET, KC_TRNS, KC_TRNS, KC_TRNS, KC_INS, KC_TRNS, KC_PSCR, KC_TRNS, KC_TRNS, KC_EJCT, - KC_BRID, KC_TRNS, KC_SLCK, KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MUTE, - KC_VOLU, KC_TRNS, KC_TRNS, KC_CALC, KC_TRNS, KC_TRNS, KC_NLCK, KC_MAIL, KC_TRNS, KC_TRNS, KC_PAUS, KC_PGUP, KC_TRNS, - KC_VOLD, KC_MRWD, KC_MFFD, KC_MPLY, KC_MSTP, KC_TRNS, KC_MPRV, KC_PGDN, KC_MNXT - ), - // Fn Layer 2 - [_SETTINGS] = LAYOUT_60_ansi_arrow( - KC_TRNS, KC_TRNS, KC_TRNS, 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_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, 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 - ) -}; -``` - -### Default Layer - -![_BASE](https://raw.githubusercontent.com/mrsendyyk/my_qmk/master/dz60/assets/layout-60-ansi-arrow-keymap---layer-0.png) - -### Fn Layer 1 - -Press and hold *right* **Ctrl** key. - -![_FN](https://raw.githubusercontent.com/mrsendyyk/my_qmk/master/dz60/assets/layout-60-ansi-arrow-keymap---layer-1.png) - -### Fn Layer 2 - -Press and hold *right* **Alt** key. - -![_SETTINGS](https://raw.githubusercontent.com/mrsendyyk/my_qmk/master/dz60/assets/layout-60-ansi-arrow-keymap---layer-2.png) diff --git a/keyboards/ai03/soyuz/keymaps/mrsendyyk/keymap.c b/layouts/community/numpad_5x4/mrsendyyk/keymap.c similarity index 88% rename from keyboards/ai03/soyuz/keymaps/mrsendyyk/keymap.c rename to layouts/community/numpad_5x4/mrsendyyk/keymap.c index 0b9793484f66..7854b12b4572 100644 --- a/keyboards/ai03/soyuz/keymaps/mrsendyyk/keymap.c +++ b/layouts/community/numpad_5x4/mrsendyyk/keymap.c @@ -1,4 +1,5 @@ -/* Copyright (C) 2020 Sendy YK (https://mr.sendyyk.com). +/* + * Copyright (C) 2020 Sendy YK . * * This 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,6 +15,8 @@ * along with this program. If not, see . */ +// Number Pad 5x4 Layout and Keymap by Sendy YK . + #include QMK_KEYBOARD_H enum layer_names { diff --git a/layouts/community/numpad_5x4/mrsendyyk/readme.md b/layouts/community/numpad_5x4/mrsendyyk/readme.md new file mode 100644 index 000000000000..a3c8a75283a3 --- /dev/null +++ b/layouts/community/numpad_5x4/mrsendyyk/readme.md @@ -0,0 +1,22 @@ +# Sendy YK's Numpad 5x4 Layout and Keymap + +Number Pad 5x4 layout and keymap by [Sendy YK](https://mr.sendyyk.com). + +## Numpad 5x4 Layout + +![LAYOUT_numpad_5x4](https://raw.githubusercontent.com/mrsendyyk/files/public/qmk/firmware/layouts/community/numpad_5x4/mrsendyyk/images/layout-numpad-5x4.png) + +## Keymap + +![_BASE](https://raw.githubusercontent.com/mrsendyyk/files/public/qmk/firmware/layouts/community/numpad_5x4/mrsendyyk/images/layout-numpad-5x4-keymap.png) + +## Build The Firmware + +Make example for keyboard (after setting up your build environment): + + make :mrsendyyk + +More information: +* [Setting Up Your QMK Environment](https://docs.qmk.fm/#/getting_started_build_tools) +* [More Detailed make Instructions](https://docs.qmk.fm/#/getting_started_make_guide) +* [The Complete Newbs Guide To QMK](https://docs.qmk.fm/#/newbs) diff --git a/layouts/community/numpad_5x4/mrsendyyk/rules.mk b/layouts/community/numpad_5x4/mrsendyyk/rules.mk new file mode 100644 index 000000000000..5c3115dc3337 --- /dev/null +++ b/layouts/community/numpad_5x4/mrsendyyk/rules.mk @@ -0,0 +1 @@ +USER_NAME := mrsendyyk diff --git a/layouts/default/60_ansi_arrow/default_60_ansi_arrow/keymap.c b/layouts/default/60_ansi_arrow/default_60_ansi_arrow/keymap.c index 4330c9ceedaa..75f2f1a7cbb3 100644 --- a/layouts/default/60_ansi_arrow/default_60_ansi_arrow/keymap.c +++ b/layouts/default/60_ansi_arrow/default_60_ansi_arrow/keymap.c @@ -1,4 +1,5 @@ -/* Copyright (C) 2020 Sendy YK (https://mr.sendyyk.com). +/* + * Copyright (C) 2020 Sendy YK . * * This 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,6 +15,8 @@ * along with this program. If not, see . */ +// Default 60% ANSI Arrow Keyboard Layout and Keymap by Sendy YK . + #include QMK_KEYBOARD_H enum layer_names { @@ -22,7 +25,7 @@ enum layer_names { _SETTINGS // Fn Layer 2 }; -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { // Default Layer [_BASE] = LAYOUT_60_ansi_arrow( 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, diff --git a/layouts/default/60_ansi_arrow/info.json b/layouts/default/60_ansi_arrow/info.json index 14c46a43d0f5..639433ea7af2 100644 --- a/layouts/default/60_ansi_arrow/info.json +++ b/layouts/default/60_ansi_arrow/info.json @@ -1,7 +1,7 @@ { "keyboard_name": "60% ANSI Arrow Layout", "url": "https://mr.sendyyk.com", - "maintainer": "Sendy YK", + "maintainer": "Sendy YK ", "width": 15, "height": 5, "layouts": { diff --git a/layouts/default/60_ansi_arrow/readme.md b/layouts/default/60_ansi_arrow/readme.md index 1a92c31de591..76c5cb4994b5 100644 --- a/layouts/default/60_ansi_arrow/readme.md +++ b/layouts/default/60_ansi_arrow/readme.md @@ -1,23 +1,36 @@ # 60_ansi_arrow and Keymap +Default 60% ANSI Arrow keyboard layout and keymap by [Sendy YK](https://mr.sendyyk.com). + ## 60% ANSI Arrow Layout -![LAYOUT_60_ansi_arrow](https://raw.githubusercontent.com/mrsendyyk/my_qmk/master/dz60/assets/layout-60-ansi-arrow.png) +![LAYOUT_60_ansi_arrow](https://raw.githubusercontent.com/mrsendyyk/files/public/qmk/firmware/layouts/community/60_ansi_arrow/mrsendyyk/images/layout-60-ansi-arrow.png) ## Keymap ### Default Layer -![_BASE](https://raw.githubusercontent.com/mrsendyyk/my_qmk/master/dz60/assets/layout-60-ansi-arrow-keymap---layer-0.png) +![_BASE](https://raw.githubusercontent.com/mrsendyyk/files/public/qmk/firmware/layouts/community/60_ansi_arrow/mrsendyyk/images/layout-60-ansi-arrow-keymap---layer-0.png) ### Fn Layer 1 Press and hold *right* **Ctrl** key. -![_FN](https://raw.githubusercontent.com/mrsendyyk/my_qmk/master/dz60/assets/layout-60-ansi-arrow-keymap---layer-1.png) +![_FN](https://raw.githubusercontent.com/mrsendyyk/files/public/qmk/firmware/layouts/community/60_ansi_arrow/mrsendyyk/images/layout-60-ansi-arrow-keymap---layer-1.png) ### Fn Layer 2 Press and hold *right* **Alt** key. -![_SETTINGS](https://raw.githubusercontent.com/mrsendyyk/my_qmk/master/dz60/assets/layout-60-ansi-arrow-keymap---layer-2.png) +![_SETTINGS](https://raw.githubusercontent.com/mrsendyyk/files/public/qmk/firmware/layouts/community/60_ansi_arrow/mrsendyyk/images/layout-60-ansi-arrow-keymap---layer-2.png) + +## Build The Firmware + +Make example for keyboard (after setting up your build environment): + + make :default_60_ansi_arrow + +More information: +* [Setting Up Your QMK Environment](https://docs.qmk.fm/#/getting_started_build_tools) +* [More Detailed make Instructions](https://docs.qmk.fm/#/getting_started_make_guide) +* [The Complete Newbs Guide To QMK](https://docs.qmk.fm/#/newbs) From 284a5267d5a0bbbeb6b83d4a88b8c64d7f4ab1ba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Reibl=20J=C3=A1nos=20D=C3=A1niel?= Date: Tue, 29 Sep 2020 06:48:35 +0200 Subject: [PATCH 896/930] Add Unicode modes for `handwired/riblee_f401:riblee` (#10461) * Add unicode modes * Update keyboards/handwired/riblee_f401/keymaps/riblee/config.h --- .../riblee_f401/keymaps/riblee/config.h | 18 ++++++++++++++++++ .../riblee_f401/keymaps/riblee/keymap.c | 4 ++-- .../riblee_f401/keymaps/riblee/readme.md | 2 +- 3 files changed, 21 insertions(+), 3 deletions(-) create mode 100644 keyboards/handwired/riblee_f401/keymaps/riblee/config.h diff --git a/keyboards/handwired/riblee_f401/keymaps/riblee/config.h b/keyboards/handwired/riblee_f401/keymaps/riblee/config.h new file mode 100644 index 000000000000..bc80ffdd71f0 --- /dev/null +++ b/keyboards/handwired/riblee_f401/keymaps/riblee/config.h @@ -0,0 +1,18 @@ +/* Copyright 2020 Daniel Reibl + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License 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 UNICODE_SELECTED_MODES UC_MAC, UC_LNX diff --git a/keyboards/handwired/riblee_f401/keymaps/riblee/keymap.c b/keyboards/handwired/riblee_f401/keymaps/riblee/keymap.c index 33319542a71b..eec732df5f65 100644 --- a/keyboards/handwired/riblee_f401/keymaps/riblee/keymap.c +++ b/keyboards/handwired/riblee_f401/keymaps/riblee/keymap.c @@ -286,7 +286,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |------+------+------+------+------+-------------+------+------+------+------+------| * | | |Mu mod|Aud on|AudOff|AGnorm|AGswap|Qwerty|Colemk|Dvorak| | | * |------+------+------+------+------+------|------+------+------+------+------+------| - * | | | | | | | NKRO | Swap |Un swp| | | | + * | | | | | | | NKRO | Swap |Un swp|UC Mod| | | * |------+------+------+------+------+------+------+------+------+------+------+------| * | | | | | | | | | | | | * `-----------------------------------------------------------------------------------' @@ -295,7 +295,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, _______, RESET, DEBUG, _______, _______, _______, _______, TERM_ON, TERM_OFF,_______, _______, KC_DEL, _______, _______, MU_MOD, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, _______, _______, - _______, _______, _______, _______, _______, _______, NK_TOGG, LCG_SWP, LCG_NRM, _______, _______, _______, + _______, _______, _______, _______, _______, _______, NK_TOGG, LCG_SWP, LCG_NRM, UC_MOD, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ ) diff --git a/keyboards/handwired/riblee_f401/keymaps/riblee/readme.md b/keyboards/handwired/riblee_f401/keymaps/riblee/readme.md index 1045c9881863..231f7afd35a1 100644 --- a/keyboards/handwired/riblee_f401/keymaps/riblee/readme.md +++ b/keyboards/handwired/riblee_f401/keymaps/riblee/readme.md @@ -77,7 +77,7 @@ Adjust (Lower + Raise) |------+------+------+------+------+-------------+------+------+------+------+------| | | |Mu mod|Aud on|AudOff|AGnorm|AGswap|Qwerty|Colemk|Dvorak| | | |------+------+------+------+------+------|------+------+------+------+------+------| -| | | | | | | NKRO | Swap |Un swp| | | | +| | | | | | | NKRO | Swap |Un swp|UC Mod| | | |------+------+------+------+------+------+------+------+------+------+------+------| | | | | | | | | | | | | `-----------------------------------------------------------------------------------' From 9f36aa640e9580354928d72d87187d6c80c69bc4 Mon Sep 17 00:00:00 2001 From: Brandon Claveria <48102030+swiftrax@users.noreply.github.com> Date: Tue, 29 Sep 2020 04:30:14 -0700 Subject: [PATCH 897/930] [Keyboard] Add astro65 handwired (#10449) * Add pandemic keyboard * Fix default keymap * Add via keymap * Fix via keymap * Fix keymaps and pandamic.h * add info.json * update info.json * Apply suggestions from code review * Update keyboards/handwired/swiftrax/pandamic/info.json * make suggested changes * Add astro65 * fix info.json * Apply suggestions from code review * add more layers for via * Apply suggestions from code review * halp * add other layout * fix astro65.h * commit suggestions * Update keyboards/handwired/swiftrax/astro65/info.json --- .../handwired/swiftrax/astro65/astro65.c | 17 +++++++ .../handwired/swiftrax/astro65/astro65.h | 36 ++++++++++++++ keyboards/handwired/swiftrax/astro65/config.h | 44 +++++++++++++++++ .../handwired/swiftrax/astro65/info.json | 12 +++++ .../swiftrax/astro65/keymaps/default/keymap.c | 35 +++++++++++++ .../swiftrax/astro65/keymaps/via/keymap.c | 49 +++++++++++++++++++ .../swiftrax/astro65/keymaps/via/rules.mk | 1 + .../handwired/swiftrax/astro65/readme.md | 13 +++++ keyboards/handwired/swiftrax/astro65/rules.mk | 24 +++++++++ 9 files changed, 231 insertions(+) create mode 100644 keyboards/handwired/swiftrax/astro65/astro65.c create mode 100644 keyboards/handwired/swiftrax/astro65/astro65.h create mode 100644 keyboards/handwired/swiftrax/astro65/config.h create mode 100644 keyboards/handwired/swiftrax/astro65/info.json create mode 100644 keyboards/handwired/swiftrax/astro65/keymaps/default/keymap.c create mode 100644 keyboards/handwired/swiftrax/astro65/keymaps/via/keymap.c create mode 100644 keyboards/handwired/swiftrax/astro65/keymaps/via/rules.mk create mode 100644 keyboards/handwired/swiftrax/astro65/readme.md create mode 100644 keyboards/handwired/swiftrax/astro65/rules.mk diff --git a/keyboards/handwired/swiftrax/astro65/astro65.c b/keyboards/handwired/swiftrax/astro65/astro65.c new file mode 100644 index 000000000000..57586550bb0b --- /dev/null +++ b/keyboards/handwired/swiftrax/astro65/astro65.c @@ -0,0 +1,17 @@ +/* +Copyright 2020 Swiftrax + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ +#include "astro65.h" diff --git a/keyboards/handwired/swiftrax/astro65/astro65.h b/keyboards/handwired/swiftrax/astro65/astro65.h new file mode 100644 index 000000000000..291a71aa447c --- /dev/null +++ b/keyboards/handwired/swiftrax/astro65/astro65.h @@ -0,0 +1,36 @@ +/* +Copyright 2020 Swiftrax + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License 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" + +// readability +#define XXXX KC_NO + +#define LAYOUT_65_ansi_blocker_split_bs( \ + 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, K115,\ + K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K215,\ + K300, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K314, K315,\ + K400, K401, K402, K406, K410, K411, K412, 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, XXXX, K115},\ + {K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, XXXX, XXXX, K215},\ + {K300, XXXX, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, XXXX, K314, K315},\ + {K400, K401, K402, XXXX, XXXX, XXXX, K406, XXXX, XXXX, XXXX, K410, K411, K412, XXXX, K414, K415} \ +} diff --git a/keyboards/handwired/swiftrax/astro65/config.h b/keyboards/handwired/swiftrax/astro65/config.h new file mode 100644 index 000000000000..84cc9b53c5c6 --- /dev/null +++ b/keyboards/handwired/swiftrax/astro65/config.h @@ -0,0 +1,44 @@ +/* +Copyright 2020 Swiftrax + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License 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 0xEAEF +#define DEVICE_VER 0x0001 +#define MANUFACTURER Swiftrax +#define PRODUCT Astro65 +/* key matrix size */ +#define MATRIX_ROWS 5 +#define MATRIX_COLS 16 + +// ROWS: Top to bottom, COLS: Left to right + +#define MATRIX_ROW_PINS { B0, B3, F7, B1, B2 } +#define MATRIX_COL_PINS { E6, D5, C7, C6, B6, B5, B4, D7, D6, D4, F0, F1, F4, F5, F6 } + +/* 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 diff --git a/keyboards/handwired/swiftrax/astro65/info.json b/keyboards/handwired/swiftrax/astro65/info.json new file mode 100644 index 000000000000..767ec70a227b --- /dev/null +++ b/keyboards/handwired/swiftrax/astro65/info.json @@ -0,0 +1,12 @@ +{ + "keyboard_name": "Astro65", + "url": "https://github.com/swiftrax", + "maintainer": "Swiftrax", + "width": 16, + "height": 5, + "layouts": { + "LAYOUT_65_ansi_blocker_split_bs": { + "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":"0,4", "x":4, "y":0}, {"label":"0,5", "x":5, "y":0}, {"label":"0,6", "x":6, "y":0}, {"label":"0,7", "x":7, "y":0}, {"label":"0,8", "x":8, "y":0}, {"label":"0,9", "x":9, "y":0}, {"label":"0,10", "x":10, "y":0}, {"label":"0,11", "x":11, "y":0}, {"label":"0,12", "x":12, "y":0}, {"label":"0,13", "x":13, "y":0}, {"label":"0,14", "x":14, "y":0}, {"label":"0,15", "x":15, "y":0}, {"label":"1,0", "x":0, "y":1, "w":1.5}, {"label":"1,1", "x":1.5, "y":1}, {"label":"1,2", "x":2.5, "y":1}, {"label":"1,3", "x":3.5, "y":1}, {"label":"1,4", "x":4.5, "y":1}, {"label":"1,5", "x":5.5, "y":1}, {"label":"1,6", "x":6.5, "y":1}, {"label":"1,7", "x":7.5, "y":1}, {"label":"1,8", "x":8.5, "y":1}, {"label":"1,9", "x":9.5, "y":1}, {"label":"1,10", "x":10.5, "y":1}, {"label":"1,11", "x":11.5, "y":1}, {"label":"1,12", "x":12.5, "y":1}, {"label":"1,13", "x":13.5, "y":1, "w":1.5}, {"label":"1,15", "x":15, "y":1}, {"label":"2,0", "x":0, "y":2, "w":1.75}, {"label":"2,1", "x":1.75, "y":2}, {"label":"2,2", "x":2.75, "y":2}, {"label":"2,3", "x":3.75, "y":2}, {"label":"2,4", "x":4.75, "y":2}, {"label":"2,5", "x":5.75, "y":2}, {"label":"2,6", "x":6.75, "y":2}, {"label":"2,7", "x":7.75, "y":2}, {"label":"2,8", "x":8.75, "y":2}, {"label":"2,9", "x":9.75, "y":2}, {"label":"2,10", "x":10.75, "y":2}, {"label":"2,11", "x":11.75, "y":2}, {"label":"2,12", "x":12.75, "y":2, "w":2.25}, {"label":"2,15", "x":15, "y":2}, {"label":"3,0", "x":0, "y":3, "w":2.25}, {"label":"3,2", "x":2.25, "y":3}, {"label":"3,3", "x":3.25, "y":3}, {"label":"3,4", "x":4.25, "y":3}, {"label":"3,5", "x":5.25, "y":3}, {"label":"3,6", "x":6.25, "y":3}, {"label":"3,7", "x":7.25, "y":3}, {"label":"3,8", "x":8.25, "y":3}, {"label":"3,9", "x":9.25, "y":3}, {"label":"3,10", "x":10.25, "y":3}, {"label":"3,11", "x":11.25, "y":3}, {"label":"3,12", "x":12.25, "y":3, "w":1.75}, {"label":"3,14", "x":14, "y":3}, {"label":"3,15", "x":15, "y":3}, {"label":"4,0", "x":0, "y":4, "w":1.25}, {"label":"4,1", "x":1.25, "y":4, "w":1.25}, {"label":"4,2", "x":2.5, "y":4, "w":1.25}, {"label":"4,6", "x":3.75, "y":4, "w":6.25}, {"label":"4,10", "x":10, "y":4, "w":1.25}, {"label":"4,11", "x":11.25, "y":4, "w":1.25}, {"label":"4,12", "x":13, "y":4}, {"label":"4,14", "x":14, "y":4}, {"label":"4,15", "x":15, "y":4}] + } + } +} diff --git a/keyboards/handwired/swiftrax/astro65/keymaps/default/keymap.c b/keyboards/handwired/swiftrax/astro65/keymaps/default/keymap.c new file mode 100644 index 000000000000..d9fab28c2a0e --- /dev/null +++ b/keyboards/handwired/swiftrax/astro65/keymaps/default/keymap.c @@ -0,0 +1,35 @@ +/* +Copyright 2020 Swiftrax + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public 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_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_BSPC, KC_BSLS, 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_LGUI,KC_LALT, KC_SPC, MO(1), KC_RGUI, KC_LEFT, KC_DOWN, KC_RGHT), + +[1] = LAYOUT_65_ansi_blocker_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, _______, _______, _______, + _______, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, + _______, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______, _______, + _______, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, + _______, _______,_______, _______, _______, _______, _______,_______,_______), +}; diff --git a/keyboards/handwired/swiftrax/astro65/keymaps/via/keymap.c b/keyboards/handwired/swiftrax/astro65/keymaps/via/keymap.c new file mode 100644 index 000000000000..839992fc3fed --- /dev/null +++ b/keyboards/handwired/swiftrax/astro65/keymaps/via/keymap.c @@ -0,0 +1,49 @@ +/* +Copyright 2020 Swiftrax + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public 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_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_BSPC, KC_BSLS, 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_LGUI,KC_LALT, KC_SPC, MO(1), KC_RGUI, KC_LEFT, KC_DOWN, KC_RGHT), + +[1] = LAYOUT_65_ansi_blocker_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, _______, _______, _______, + _______, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, + _______, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______, _______, + _______, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, + _______, _______,_______, _______, _______, _______, _______,_______,_______), + +[2] = LAYOUT_65_ansi_blocker_split_bs( + _______, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, + _______, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, + _______, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______, _______, + _______, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, + _______, _______,_______, _______, _______, _______, _______,_______,_______), + +[3] = LAYOUT_65_ansi_blocker_split_bs( + _______, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, + _______, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, + _______, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______, _______, + _______, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, + _______, _______,_______, _______, _______, _______, _______,_______,_______), +}; diff --git a/keyboards/handwired/swiftrax/astro65/keymaps/via/rules.mk b/keyboards/handwired/swiftrax/astro65/keymaps/via/rules.mk new file mode 100644 index 000000000000..036bd6d1c3ec --- /dev/null +++ b/keyboards/handwired/swiftrax/astro65/keymaps/via/rules.mk @@ -0,0 +1 @@ +VIA_ENABLE = yes \ No newline at end of file diff --git a/keyboards/handwired/swiftrax/astro65/readme.md b/keyboards/handwired/swiftrax/astro65/readme.md new file mode 100644 index 000000000000..b5bf429aec33 --- /dev/null +++ b/keyboards/handwired/swiftrax/astro65/readme.md @@ -0,0 +1,13 @@ +# Astro65 + +A 65% that uses Ai03's unified daughter board + +* Keyboard Maintainer: Swiftrax +* Hardware Supported: Astro65 +* Hardware Availability: https://github.com/swiftrax + +Make example for this keyboard (after setting up your build environment): + + make handwired/swiftrax/astro65: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/swiftrax/astro65/rules.mk b/keyboards/handwired/swiftrax/astro65/rules.mk new file mode 100644 index 000000000000..1a5f11e31aed --- /dev/null +++ b/keyboards/handwired/swiftrax/astro65/rules.mk @@ -0,0 +1,24 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +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 +BLUETOOTH_ENABLE = no # Enable Bluetooth +AUDIO_ENABLE = no # Audio output + +LAYOUTS = 65_ansi_blocker_split_bs From 8b90822f6e707830904426dc05501bffcb69ec18 Mon Sep 17 00:00:00 2001 From: MakotoKurauchi Date: Wed, 30 Sep 2020 06:46:49 +0900 Subject: [PATCH 898/930] add tester keymaps for yushakobo/quick7 (#10282) * update "Hardware Availability" * add a section of "How to build" * update "Hardware Supported" * add tester keymaps for yushakobo/quick7 * update license headers in keymaps/tester/config.h Co-authored-by: keyaki-namiki <28521374+keyaki-namiki@users.noreply.github.com> --- .../yushakobo/quick7/keymaps/tester/config.h | 27 +++ .../yushakobo/quick7/keymaps/tester/keymap.c | 157 ++++++++++++++++++ .../yushakobo/quick7/keymaps/tester/readme.md | 12 ++ 3 files changed, 196 insertions(+) create mode 100644 keyboards/yushakobo/quick7/keymaps/tester/config.h create mode 100644 keyboards/yushakobo/quick7/keymaps/tester/keymap.c create mode 100644 keyboards/yushakobo/quick7/keymaps/tester/readme.md diff --git a/keyboards/yushakobo/quick7/keymaps/tester/config.h b/keyboards/yushakobo/quick7/keymaps/tester/config.h new file mode 100644 index 000000000000..b9a075bfecb8 --- /dev/null +++ b/keyboards/yushakobo/quick7/keymaps/tester/config.h @@ -0,0 +1,27 @@ +/* +Copyright 2020 yushakobo + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#undef RGBLIGHT_LIMIT_VAL +#define RGBLIGHT_LIMIT_VAL 150 /* The maximum brightness level */ +#define RGBLIGHT_LAYERS +#define RGBLIGHT_MAX_LAYERS 4 +#define RGBLIGHT_LED_MAP {\ + 0, 1, 2,\ + 5, 4, 3,\ + 6, 7, 8,\ + 9, 10, 11, 12\ +} diff --git a/keyboards/yushakobo/quick7/keymaps/tester/keymap.c b/keyboards/yushakobo/quick7/keymaps/tester/keymap.c new file mode 100644 index 000000000000..57e4a28f3027 --- /dev/null +++ b/keyboards/yushakobo/quick7/keymaps/tester/keymap.c @@ -0,0 +1,157 @@ +/* Copyright 2020 yushakobo + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public 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 FAVORITE_COLOR HSV_CYAN + +// Defines names for use in layer keycodes and the keymap +enum layer_names { + _BASE +}; + +// Defines the keycodes used by our macros in process_record_user +enum custom_keycodes { + YUSHAURL = SAFE_RANGE, + KEY_00, + KEY_01, + KEY_02, + KEY_10, + KEY_11, + KEY_12, + KEY_20, + KEY_21, + KEY_22 +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* Base */ + [_BASE] = LAYOUT( + KEY_00, KEY_01, KEY_02, + KEY_10, KEY_11, KEY_12, + KEY_20, KEY_21, KEY_22 + ) +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case KEY_00: + if (record->event.pressed) { + rgblight_sethsv_at(FAVORITE_COLOR, 0); + } else { + rgblight_sethsv_at(HSV_WHITE, 0); + } + break; + case KEY_01: + if (record->event.pressed) { + rgblight_sethsv_at(FAVORITE_COLOR, 1); + } else { + rgblight_sethsv_at(HSV_WHITE, 1); + } + break; + case KEY_02: + if (record->event.pressed) { + rgblight_sethsv_at(FAVORITE_COLOR, 2); + } else { + rgblight_sethsv_at(HSV_WHITE, 2); + } + break; + case KEY_10: + if (record->event.pressed) { + rgblight_sethsv_at(FAVORITE_COLOR, 3); + } else { + rgblight_sethsv_at(HSV_WHITE, 3); + } + break; + case KEY_11: + if (record->event.pressed) { + rgblight_sethsv_at(FAVORITE_COLOR, 4); + } else { + rgblight_sethsv_at(HSV_WHITE, 4); + } + break; + case KEY_12: + if (record->event.pressed) { + rgblight_sethsv_at(FAVORITE_COLOR, 5); + } else { + rgblight_sethsv_at(HSV_WHITE, 5); + } + break; + case KEY_20: + if (record->event.pressed) { + rgblight_sethsv_at(FAVORITE_COLOR, 6); + } else { + rgblight_sethsv_at(HSV_WHITE, 6); + } + break; + case KEY_21: + if (record->event.pressed) { + rgblight_sethsv_at(FAVORITE_COLOR, 7); + } else { + rgblight_sethsv_at(HSV_WHITE, 7); + } + break; + case KEY_22: + if (record->event.pressed) { + rgblight_sethsv_at(FAVORITE_COLOR, 8); + } else { + rgblight_sethsv_at(HSV_WHITE, 8); + } + break; + } + return true; +} + +void encoder_update_user(uint8_t index, bool clockwise) { + if (index == 0) { // Left encoder + if (clockwise) { + tap_code(KC_VOLU); + } else { + tap_code(KC_VOLD); + } + } + else if (index == 1) { // Right encoder + if (clockwise) { + rgblight_decrease_hue_noeeprom(); + } else { + rgblight_increase_hue_noeeprom(); + } + } +} + +const rgblight_segment_t PROGMEM quick7_capslock[] = RGBLIGHT_LAYER_SEGMENTS( + {9,1,FAVORITE_COLOR}, + {12,1,FAVORITE_COLOR} +); +const rgblight_segment_t PROGMEM quick7_numlock[] = RGBLIGHT_LAYER_SEGMENTS( + {10,1,FAVORITE_COLOR}, + {11,1,FAVORITE_COLOR} +); + +const rgblight_segment_t* const PROGMEM quick7_rgb_layers[] = RGBLIGHT_LAYERS_LIST( + quick7_capslock, + quick7_numlock +); + +void keyboard_post_init_user(void){ + rgblight_layers = quick7_rgb_layers; + rgblight_sethsv(HSV_WHITE); +} + +bool led_update_user(led_t led_state){ + rgblight_set_layer_state(0, led_state.caps_lock); + rgblight_set_layer_state(1, led_state.num_lock); + return true; +} \ No newline at end of file diff --git a/keyboards/yushakobo/quick7/keymaps/tester/readme.md b/keyboards/yushakobo/quick7/keymaps/tester/readme.md new file mode 100644 index 000000000000..41ba72ffc086 --- /dev/null +++ b/keyboards/yushakobo/quick7/keymaps/tester/readme.md @@ -0,0 +1,12 @@ +# The default keymap for quick7 + +### Base Layer + +|Left/Right|Clockwise|Counter Clockwise| +|---|---|---| +|Left|Vol+|Vol-| +|Right|RGB HUE-|RGB HUE+| + +No input at all. You can just test how deep the key's actuation point is, and when does the key releases. + +4 underglow LEDs indicates the status of CapsLock and NumLock. From 5ecb1b2d39f5424979a1325e2642ac73db828c03 Mon Sep 17 00:00:00 2001 From: Keebz Dot Net <64744703+keebzdotnet@users.noreply.github.com> Date: Wed, 30 Sep 2020 01:50:55 -0700 Subject: [PATCH 899/930] Wazowski 23-19 VIA Support (#9730) * fixed keymap placement - online configurator keys were in the wrong location and needed to be fixed - fixed a key being to high on the y position * Create rules.mk * Create keymap.c * Update rules.mk added VIA support * Changed wazowski via keymap to include skipped switch * changed the vendor ID * Update keyboards/keebzdotnet/wazowski/config.h * Removed VIA enable from keyboard rules.mk * Update keyboards/keebzdotnet/wazowski/rules.mk * Fixed wazowski via keymap build errors * Added multi-layer support for Wazowski via keymap --- keyboards/keebzdotnet/wazowski/config.h | 2 +- .../keebzdotnet/wazowski/keymaps/via/keymap.c | 40 +++++++++++++++++++ .../keebzdotnet/wazowski/keymaps/via/rules.mk | 1 + keyboards/keebzdotnet/wazowski/rules.mk | 6 +-- 4 files changed, 45 insertions(+), 4 deletions(-) create mode 100644 keyboards/keebzdotnet/wazowski/keymaps/via/keymap.c create mode 100644 keyboards/keebzdotnet/wazowski/keymaps/via/rules.mk diff --git a/keyboards/keebzdotnet/wazowski/config.h b/keyboards/keebzdotnet/wazowski/config.h index 56f05515af0e..26c7ccd5e171 100644 --- a/keyboards/keebzdotnet/wazowski/config.h +++ b/keyboards/keebzdotnet/wazowski/config.h @@ -20,7 +20,7 @@ along with this program. If not, see . #include "config_common.h" /* USB Device descriptor parameter */ -#define VENDOR_ID 0xFEED +#define VENDOR_ID 0x4B5A // "KZ" #define PRODUCT_ID 0x53FC #define DEVICE_VER 0x0001 #define MANUFACTURER keebzdotnet diff --git a/keyboards/keebzdotnet/wazowski/keymaps/via/keymap.c b/keyboards/keebzdotnet/wazowski/keymaps/via/keymap.c new file mode 100644 index 000000000000..942142906797 --- /dev/null +++ b/keyboards/keebzdotnet/wazowski/keymaps/via/keymap.c @@ -0,0 +1,40 @@ +/* Copyright 2020 keebzdotnet + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public 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] = { + /* Base */ + [0] = LAYOUT( + 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 + ), + [1] = LAYOUT( + _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, + _______, _______, _______, _______ + ), + [2] = LAYOUT( + _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, + _______, _______, _______, _______ + ), + [3] = LAYOUT( + _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, + _______, _______, _______, _______ + ), +}; diff --git a/keyboards/keebzdotnet/wazowski/keymaps/via/rules.mk b/keyboards/keebzdotnet/wazowski/keymaps/via/rules.mk new file mode 100644 index 000000000000..1e5b99807cb7 --- /dev/null +++ b/keyboards/keebzdotnet/wazowski/keymaps/via/rules.mk @@ -0,0 +1 @@ +VIA_ENABLE = yes diff --git a/keyboards/keebzdotnet/wazowski/rules.mk b/keyboards/keebzdotnet/wazowski/rules.mk index b8ce67b680ea..e82d793bcce1 100644 --- a/keyboards/keebzdotnet/wazowski/rules.mk +++ b/keyboards/keebzdotnet/wazowski/rules.mk @@ -14,11 +14,11 @@ 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 = 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 From 482c9fbbf28c7e871145cacd01f22c9edf7d1ddf Mon Sep 17 00:00:00 2001 From: Ryan Date: Thu, 1 Oct 2020 04:10:02 +1000 Subject: [PATCH 900/930] MSYS2: Switch to arm-none-eabi-gcc package (#10421) --- util/activate_msys2.sh | 1 - util/msys2_install.sh | 47 ++++++------------------------------------ 2 files changed, 6 insertions(+), 42 deletions(-) diff --git a/util/activate_msys2.sh b/util/activate_msys2.sh index 3fc149dbb65a..b37bee8597d3 100755 --- a/util/activate_msys2.sh +++ b/util/activate_msys2.sh @@ -3,7 +3,6 @@ function export_variables { local util_dir=~/qmk_utils export PATH=$PATH:$util_dir - export PATH=$PATH:$util_dir/gcc-arm-none-eabi/bin } export_variables diff --git a/util/msys2_install.sh b/util/msys2_install.sh index b92199647df5..c223e52faee0 100755 --- a/util/msys2_install.sh +++ b/util/msys2_install.sh @@ -2,53 +2,18 @@ dir=$(cd -P -- "$(dirname -- "$0")" && pwd -P) download_dir=~/qmk_utils -armtools=gcc-arm-none-eabi util_dir=$(dirname "$0") echo "Installing dependencies needed for the installation" -pacman --needed --noconfirm --disable-download-timeout -Sy base-devel mingw-w64-x86_64-toolchain mingw-w64-x86_64-clang git mingw-w64-x86_64-python3-pip unzip +pacman --needed --noconfirm --disable-download-timeout -Sy \ + base-devel mingw-w64-x86_64-toolchain mingw-w64-x86_64-clang git unzip \ + mingw-w64-x86_64-python-pip \ + mingw-w64-x86_64-avr-binutils mingw-w64-x86_64-avr-gcc mingw-w64-x86_64-avr-libc \ + mingw-w64-x86_64-arm-none-eabi-binutils mingw-w64-x86_64-arm-none-eabi-gcc mingw-w64-x86_64-arm-none-eabi-newlib \ + mingw-w64-x86_64-avrdude mingw-w64-x86_64-bootloadhid mingw-w64-x86_64-dfu-programmer mingw-w64-x86_64-dfu-util mingw-w64-x86_64-teensy-loader-cli source "$dir/win_shared_install.sh" -function install_avr { - pacman --needed --noconfirm --disable-download-timeout -S \ - mingw-w64-x86_64-avr-binutils mingw-w64-x86_64-avr-gcc mingw-w64-x86_64-avr-libc \ - mingw-w64-x86_64-avrdude mingw-w64-x86_64-bootloadhid mingw-w64-x86_64-dfu-programmer mingw-w64-x86_64-teensy-loader-cli -} - -function install_arm { - rm -f -r "$armtools" - wget -O gcc-arm-none-eabi-8-2019-q3-update-win32.zip "https://developer.arm.com/-/media/Files/downloads/gnu-rm/8-2019q3/RC1.1/gcc-arm-none-eabi-8-2019-q3-update-win32.zip" - echo "Extracting ARM toolchain..." - unzip -q -d gcc-arm-none-eabi gcc-arm-none-eabi-8-2019-q3-update-win32.zip - rm gcc-arm-none-eabi-8-2019-q3-update-win32.zip - - pacman --needed --noconfirm --disable-download-timeout -S mingw-w64-x86_64-dfu-util -} - -pushd "$download_dir" - -install_avr - -if [ ! -d "$armtools" ]; then - echo - echo "The ARM toolchain is not installed." - echo "This is needed for building ARM based keyboards." - install_arm -else - while true; do - echo - echo "The ARM toolchain is already installed" - read -p "Do you want to reinstall? (Y/N) " res - case $res in - [Yy]* ) install_arm; break;; - [Nn]* ) break;; - * ) echo "Invalid answer";; - esac - done -fi -popd - pip3 install -r "${util_dir}/../requirements.txt" cp -f "$dir/activate_msys2.sh" "$download_dir/" From 11c308d436180974b7719ce78cdffdd83a1302c0 Mon Sep 17 00:00:00 2001 From: Drashna Jaelre Date: Wed, 30 Sep 2020 16:52:47 -0700 Subject: [PATCH 901/930] [Keyboard] Convert ErgoDox EZ to Matrix Lite (#10189) * Convert ErgoDox EZ to lite matrix * Add initial config from Dactyl config Based on ErinCall's work to generalize the mcp i/o expander matrix code * formatting * Fix number of pins * Remove unused defines --- keyboards/ergodox_ez/config.h | 10 + keyboards/ergodox_ez/ergodox_ez.c | 2 +- keyboards/ergodox_ez/ergodox_ez.h | 4 - keyboards/ergodox_ez/matrix.c | 333 ++++++++++++------------------ keyboards/ergodox_ez/rules.mk | 20 +- 5 files changed, 151 insertions(+), 218 deletions(-) diff --git a/keyboards/ergodox_ez/config.h b/keyboards/ergodox_ez/config.h index 8ef600b08922..eb0f2066da5b 100644 --- a/keyboards/ergodox_ez/config.h +++ b/keyboards/ergodox_ez/config.h @@ -32,6 +32,16 @@ along with this program. If not, see . #define MATRIX_ROWS_PER_SIDE (MATRIX_ROWS / 2) #define MATRIX_COLS 6 +#define COL_EXPANDED { true, true, true, true, true, true, true, false, false, false, false, false, false, false } +#define MATRIX_ONBOARD_ROW_PINS { 0, 0, 0, 0, 0, 0, 0, B0, B1, B2, B3, D2, D3, C6 } +#define MATRIX_ONBOARD_COL_PINS { F0, F1, F4, F5, F6, F7 } +#define DIODE_DIRECTION COL2ROW +#define EXPANDER_COL_REGISTER GPIOB +#define EXPANDER_ROW_REGISTER GPIOA +#define MATRIX_EXPANDER_COL_PINS { 5, 4, 3, 2, 1, 0 } +#define MATRIX_EXPANDER_ROW_PINS { 0, 1, 2, 3, 4, 5, 6 } + + #define MOUSEKEY_INTERVAL 20 #define MOUSEKEY_DELAY 0 #define MOUSEKEY_TIME_TO_MAX 60 diff --git a/keyboards/ergodox_ez/ergodox_ez.c b/keyboards/ergodox_ez/ergodox_ez.c index d313f7d5d994..6c0b74ec4629 100644 --- a/keyboards/ergodox_ez/ergodox_ez.c +++ b/keyboards/ergodox_ez/ergodox_ez.c @@ -1,4 +1,4 @@ -#include QMK_KEYBOARD_H +#include "ergodox_ez.h" extern inline void ergodox_board_led_on(void); extern inline void ergodox_right_led_1_on(void); diff --git a/keyboards/ergodox_ez/ergodox_ez.h b/keyboards/ergodox_ez/ergodox_ez.h index 88a0a2ee9fca..a8b02a96bdfd 100644 --- a/keyboards/ergodox_ez/ergodox_ez.h +++ b/keyboards/ergodox_ez/ergodox_ez.h @@ -4,10 +4,6 @@ #include #include #include "i2c_master.h" -#include - -#define CPU_PRESCALE(n) (CLKPR = 0x80, CLKPR = (n)) -#define CPU_16MHz 0x00 // I2C aliases and register addresses (see "mcp23018.md") #define I2C_ADDR 0b0100000 diff --git a/keyboards/ergodox_ez/matrix.c b/keyboards/ergodox_ez/matrix.c index 28dc37a09925..cfa76c1c39e1 100644 --- a/keyboards/ergodox_ez/matrix.c +++ b/keyboards/ergodox_ez/matrix.c @@ -30,7 +30,8 @@ along with this program. If not, see . #include "util.h" #include "matrix.h" #include "debounce.h" -#include QMK_KEYBOARD_H +#include "ergodox_ez.h" + /* * This constant define not debouncing time in msecs, assuming eager_pr. @@ -45,8 +46,8 @@ along with this program. If not, see . */ /* 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 matrix[MATRIX_ROWS]; // debounced values +extern matrix_row_t raw_matrix[MATRIX_ROWS]; // raw values static matrix_row_t read_cols(uint8_t row); static void init_cols(void); @@ -54,132 +55,62 @@ static void unselect_rows(void); static void select_row(uint8_t row); static uint8_t mcp23018_reset_loop; -// static uint16_t mcp23018_reset_loop; - -__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(); } -inline uint8_t matrix_rows(void) { return MATRIX_ROWS; } +void matrix_init_custom(void) { + // initialize row and col -inline uint8_t matrix_cols(void) { return MATRIX_COLS; } + mcp23018_status = init_mcp23018(); -void matrix_init(void) { - // initialize row and col - - mcp23018_status = init_mcp23018(); - - unselect_rows(); - init_cols(); - - // initialize matrix state: all keys off - for (uint8_t i = 0; i < MATRIX_ROWS; i++) { - matrix[i] = 0; - raw_matrix[i] = 0; - } - - debounce_init(MATRIX_ROWS); - matrix_init_quantum(); -} - -void matrix_power_up(void) { - mcp23018_status = init_mcp23018(); - - unselect_rows(); - init_cols(); - - // initialize matrix state: all keys off - for (uint8_t i = 0; i < MATRIX_ROWS; i++) { - matrix[i] = 0; - } + unselect_rows(); + init_cols(); } // Reads and stores a row, returning // whether a change occurred. static inline bool store_raw_matrix_row(uint8_t index) { - matrix_row_t temp = read_cols(index); - if (raw_matrix[index] != temp) { - raw_matrix[index] = temp; - return true; - } - return false; + matrix_row_t temp = read_cols(index); + if (raw_matrix[index] != temp) { + raw_matrix[index] = temp; + return true; + } + return false; } -uint8_t matrix_scan(void) { - if (mcp23018_status) { // if there was an error - if (++mcp23018_reset_loop == 0) { - // if (++mcp23018_reset_loop >= 1300) { - // since mcp23018_reset_loop is 8 bit - we'll try to reset once in 255 matrix scans - // this will be approx bit more frequent than once per second - print("trying to reset mcp23018\n"); - mcp23018_status = init_mcp23018(); - if (mcp23018_status) { - print("left side not responding\n"); - } else { - print("left side attached\n"); - ergodox_blink_all_leds(); +bool matrix_scan_custom(matrix_row_t current_matrix[]) { + if (mcp23018_status) { // if there was an error + if (++mcp23018_reset_loop == 0) { + print("trying to reset mcp23018\n"); + mcp23018_status = init_mcp23018(); + if (mcp23018_status) { + print("left side not responding\n"); + } else { + print("left side attached\n"); + ergodox_blink_all_leds(); #ifdef RGB_MATRIX_ENABLE - rgb_matrix_init(); // re-init driver on reconnect + rgb_matrix_init(); // re-init driver on reconnect #endif - } + } + } } - } #ifdef LEFT_LEDS - mcp23018_status = ergodox_left_leds_update(); + mcp23018_status = ergodox_left_leds_update(); #endif // LEFT_LEDS - bool changed = false; - for (uint8_t i = 0; i < MATRIX_ROWS_PER_SIDE; i++) { - // select rows from left and right hands - uint8_t left_index = i; - uint8_t right_index = i + MATRIX_ROWS_PER_SIDE; - select_row(left_index); - select_row(right_index); - - // we don't need a 30us delay anymore, because selecting a - // left-hand row requires more than 30us for i2c. - - changed |= store_raw_matrix_row(left_index); - changed |= store_raw_matrix_row(right_index); - - unselect_rows(); - } - - debounce(raw_matrix, matrix, MATRIX_ROWS, changed); - matrix_scan_quantum(); - - return 1; -} - -bool matrix_is_modified(void) // deprecated and evidently not called. -{ - 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("\nr/c 0123456789ABCDEF\n"); - for (uint8_t row = 0; row < MATRIX_ROWS; row++) { - phex(row); - print(": "); - pbin_reverse16(matrix_get_row(row)); - print("\n"); - } -} + bool changed = false; + for (uint8_t i = 0; i < MATRIX_ROWS_PER_SIDE; i++) { + // select rows from left and right hands + uint8_t left_index = i; + uint8_t right_index = i + MATRIX_ROWS_PER_SIDE; + select_row(left_index); + select_row(right_index); + + changed |= store_raw_matrix_row(left_index); + changed |= store_raw_matrix_row(right_index); + + unselect_rows(); + } -uint8_t matrix_key_count(void) { - uint8_t count = 0; - for (uint8_t i = 0; i < MATRIX_ROWS; i++) { - count += bitpop16(matrix[i]); - } - return count; + return changed; } /* Column pin configuration @@ -193,42 +124,43 @@ uint8_t matrix_key_count(void) { * pin: B5 B4 B3 B2 B1 B0 */ static void init_cols(void) { - // init on mcp23018 - // not needed, already done as part of init_mcp23018() - - // init on teensy - // Input with pull-up(DDR:0, PORT:1) - DDRF &= ~(1 << 7 | 1 << 6 | 1 << 5 | 1 << 4 | 1 << 1 | 1 << 0); - PORTF |= (1 << 7 | 1 << 6 | 1 << 5 | 1 << 4 | 1 << 1 | 1 << 0); + // init on mcp23018 + // not needed, already done as part of init_mcp23018() + + // init on teensy + setPinInputHigh(F0); + setPinInputHigh(F1); + setPinInputHigh(F4); + setPinInputHigh(F5); + setPinInputHigh(F6); + setPinInputHigh(F7); } static matrix_row_t read_cols(uint8_t row) { - if (row < 7) { - if (mcp23018_status) { // if there was an error - return 0; + if (row < 7) { + if (mcp23018_status) { // if there was an error + return 0; + } else { + uint8_t data = 0; + // 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); if (mcp23018_status < 0) goto out; + data = ~((uint8_t)mcp23018_status); + mcp23018_status = I2C_STATUS_SUCCESS; + out: + i2c_stop(); + return data; + } } else { - uint8_t data = 0; - // 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); - if (mcp23018_status < 0) goto out; - data = ~((uint8_t)mcp23018_status); - mcp23018_status = I2C_STATUS_SUCCESS; - out: - i2c_stop(); - return data; - } - } else { - /* read from teensy - * bitmask is 0b11110011, but we want those all - * in the lower six bits. - * we'll return 1s for the top two, but that's harmless. - */ + /* read from teensy + * bitmask is 0b11110011, but we want those all + * in the lower six bits. + * we'll return 1s for the top two, but that's harmless. + */ - return ~((PINF & 0x03) | ((PINF & 0xF0) >> 2)); - } + return ~((PINF & 0x03) | ((PINF & 0xF0) >> 2)); + } } /* Row pin configuration @@ -242,69 +174,64 @@ static matrix_row_t read_cols(uint8_t row) { * pin: A0 A1 A2 A3 A4 A5 A6 */ static void unselect_rows(void) { - // no need to unselect on mcp23018, because the select step sets all - // the other row bits high, and it's not changing to a different - // direction - - // unselect on teensy - // Hi-Z(DDR:0, PORT:0) to unselect - DDRB &= ~(1 << 0 | 1 << 1 | 1 << 2 | 1 << 3); - PORTB &= ~(1 << 0 | 1 << 1 | 1 << 2 | 1 << 3); - DDRD &= ~(1 << 2 | 1 << 3); - PORTD &= ~(1 << 2 | 1 << 3); - DDRC &= ~(1 << 6); - PORTC &= ~(1 << 6); + // no need to unselect on mcp23018, because the select step sets all + // the other row bits high, and it's not changing to a different + // direction + + // unselect on teensy + setPinInput(B0); + setPinInput(B1); + setPinInput(B2); + setPinInput(B3); + setPinInput(D2); + setPinInput(D3); + setPinInput(C6); } static void select_row(uint8_t row) { - if (row < 7) { - // select on mcp23018 - if (mcp23018_status) { // if there was an error - // do nothing + if (row < 7) { + // select on mcp23018 + if (!mcp23018_status) { + // set active row low : 0 + // set other rows hi-Z : 1 + mcp23018_status = i2c_start(I2C_ADDR_WRITE, ERGODOX_EZ_I2C_TIMEOUT); if (mcp23018_status) goto out; + mcp23018_status = i2c_write(GPIOA, ERGODOX_EZ_I2C_TIMEOUT); if (mcp23018_status) goto out; + mcp23018_status = i2c_write(0xFF & ~(1 << row), ERGODOX_EZ_I2C_TIMEOUT); if (mcp23018_status) goto out; + out: + i2c_stop(); + } } else { - // set active row low : 0 - // set other rows hi-Z : 1 - mcp23018_status = i2c_start(I2C_ADDR_WRITE, ERGODOX_EZ_I2C_TIMEOUT); - if (mcp23018_status) goto out; - mcp23018_status = i2c_write(GPIOA, ERGODOX_EZ_I2C_TIMEOUT); - if (mcp23018_status) goto out; - mcp23018_status = i2c_write(0xFF & ~(1 << row), ERGODOX_EZ_I2C_TIMEOUT); - if (mcp23018_status) goto out; - out: - i2c_stop(); - } - } else { - // select on teensy - // Output low(DDR:1, PORT:0) to select - switch (row) { - case 7: - DDRB |= (1 << 0); - PORTB &= ~(1 << 0); - break; - case 8: - DDRB |= (1 << 1); - PORTB &= ~(1 << 1); - break; - case 9: - DDRB |= (1 << 2); - PORTB &= ~(1 << 2); - break; - case 10: - DDRB |= (1 << 3); - PORTB &= ~(1 << 3); - break; - case 11: - DDRD |= (1 << 2); - PORTD &= ~(1 << 2); - break; - case 12: - DDRD |= (1 << 3); - PORTD &= ~(1 << 3); - break; - case 13: - DDRC |= (1 << 6); - PORTC &= ~(1 << 6); - break; + // select on teensy + // Output low(DDR:1, PORT:0) to select + switch (row) { + case 7: + setPinOutput(B0); + writePinLow(B0); + break; + case 8: + setPinOutput(B1); + writePinLow(B1); + break; + case 9: + setPinOutput(B2); + writePinLow(B2); + break; + case 10: + setPinOutput(B3); + writePinLow(B3); + break; + case 11: + setPinOutput(D2); + writePinLow(D2); + break; + case 12: + setPinOutput(D3); + writePinLow(D3); + break; + case 13: + setPinOutput(C6); + writePinLow(C6); + break; + } } - } } diff --git a/keyboards/ergodox_ez/rules.mk b/keyboards/ergodox_ez/rules.mk index 579e4f59de5c..9ad4eaa186e9 100644 --- a/keyboards/ergodox_ez/rules.mk +++ b/keyboards/ergodox_ez/rules.mk @@ -19,20 +19,20 @@ BOOTLOADER = halfkay # Build Options # comment out to disable the options. # -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 -UNICODE_ENABLE = yes # Unicode -SWAP_HANDS_ENABLE= yes # Allow swapping hands of keyboard +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 = lite # 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 +UNICODE_ENABLE = yes # Unicode +SWAP_HANDS_ENABLE= yes # Allow swapping hands of keyboard SLEEP_LED_ENABLE = no API_SYSEX_ENABLE = no RGBLIGHT_ENABLE = yes -RGB_MATRIX_ENABLE = no # enable later +RGB_MATRIX_ENABLE = no # enable later DEBOUNCE_TYPE = eager_pr # project specific files From 272b3309dd4121b49bc41e3c0213111aaf4962d7 Mon Sep 17 00:00:00 2001 From: Jean Potier Date: Thu, 1 Oct 2020 07:14:05 +0300 Subject: [PATCH 902/930] [Keymap] samae keymap for RGBKB Zen rev1 (#10350) * Add samae's keymap to zen rev1 * Docs update * Less animations * A few cleanups * Update keyboards/rgbkb/zen/rev1/keymaps/samae/keymap.c * Update keyboards/rgbkb/zen/rev1/keymaps/samae/keymap.c * Update keyboards/rgbkb/zen/rev1/keymaps/samae/keymap.c * Update keyboards/rgbkb/zen/rev1/keymaps/samae/keymap.c * Review fix: add copyright statement --- .../rgbkb/zen/rev1/keymaps/samae/config.h | 41 ++++++++++ .../rgbkb/zen/rev1/keymaps/samae/keymap.c | 79 +++++++++++++++++++ .../rgbkb/zen/rev1/keymaps/samae/rules.mk | 1 + 3 files changed, 121 insertions(+) create mode 100644 keyboards/rgbkb/zen/rev1/keymaps/samae/config.h create mode 100644 keyboards/rgbkb/zen/rev1/keymaps/samae/keymap.c create mode 100644 keyboards/rgbkb/zen/rev1/keymaps/samae/rules.mk diff --git a/keyboards/rgbkb/zen/rev1/keymaps/samae/config.h b/keyboards/rgbkb/zen/rev1/keymaps/samae/config.h new file mode 100644 index 000000000000..d7b37d525284 --- /dev/null +++ b/keyboards/rgbkb/zen/rev1/keymaps/samae/config.h @@ -0,0 +1,41 @@ +/* +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 + +#include "config_common.h" + +/* 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_EFFECT_BREATHING +#define RGBLIGHT_EFFECT_RAINBOW_MOOD +#define RGBLIGHT_EFFECT_RGB_TEST +#define RGBLIGHT_EFFECT_STATIC_GRADIENT +#define RGBLED_NUM 16 +#define RGBLIGHT_HUE_STEP 4 +#define RGBLIGHT_SAT_STEP 4 +#define RGBLIGHT_VAL_STEP 8 diff --git a/keyboards/rgbkb/zen/rev1/keymaps/samae/keymap.c b/keyboards/rgbkb/zen/rev1/keymaps/samae/keymap.c new file mode 100644 index 000000000000..673ea4054a6d --- /dev/null +++ b/keyboards/rgbkb/zen/rev1/keymaps/samae/keymap.c @@ -0,0 +1,79 @@ + /* Copyright 2020 Martin J. Potier + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public 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. +enum layer_number { + _QWERTY = 0, + _NAV +}; + + +enum custom_keycodes { + QWERTY = SAFE_RANGE, + NAV, + +}; + +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 | \ | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * |DELETE| A | S | D | F | G | | H | J | K | L | ; | " | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | Shift| Z | X | C | V | B | | N | M | , | . | / |RGBMOD| + * |------+------+------+------+------+------+------. .--------+------+------+------+------+------+------| + * | Ctrl | GUI | Alt |RGBTOG| NAV |Space | ESC | |Enter|Space/NAV| AltGr| NAV | | - | = | + * `------------------------------------------------' '--------------------------------------------------' + */ + [_QWERTY] = LAYOUT( + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS, + KC_DEL, 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, RGB_MOD, + KC_LCTL, KC_LGUI, KC_LALT, RGB_TOG, MO(_NAV), KC_SPC, KC_GESC, KC_ENT, LT(_NAV, KC_SPACE), KC_RALT, MO(_NAV), _______, KC_MINS, KC_EQL + ), + + /* NAV + * ,-----------------------------------------. .-----------------------------------------. + * | F1 | F2 | F3 | F4 | F5 | F6 | | F7 | F8 | F9 | F10 | F11 | F12 | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | |RGBSAI|RGBVAI|RGBSAD| | [ | | ] | Pgup | Up | Pgdn |Insert| Home | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | |RGBHUD|RGBVAD|RGBHUI| | | | | Left | Down | Right|Delete| End | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * |Shift | | | | | | | | | | Pause| Back | Next | + * |------+------+------+------+------+------+------. .------+------+------+------+------+------+------| + * | Ctrl | GUI | Alt |RGBMOD| | | | | RESET| | | | Mute | VOLUP| VOLDN| + * `------------------------------------------------' '------------------------------------------------' + */ + [_NAV] = 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_SAI, RGB_VAI, RGB_SAD, _______, KC_LBRC, KC_RBRC, KC_PGUP, KC_UP, KC_PGDN, KC_INS, KC_HOME, + _______, RGB_HUD, RGB_VAD, RGB_HUI, _______, _______, _______, KC_LEFT, KC_DOWN, KC_RGHT, KC_DEL, KC_END, + KC_LSFT, _______, _______, _______, _______, _______, _______, _______, _______, KC_MPLY, KC_MPRV, KC_MNXT, + KC_LCTL, KC_LGUI, KC_LALT, RGB_MOD, _______, _______, _______, RESET, _______, _______, _______, KC_MUTE, KC_VOLU, KC_VOLD + ), + +}; diff --git a/keyboards/rgbkb/zen/rev1/keymaps/samae/rules.mk b/keyboards/rgbkb/zen/rev1/keymaps/samae/rules.mk new file mode 100644 index 000000000000..1e3cebb14515 --- /dev/null +++ b/keyboards/rgbkb/zen/rev1/keymaps/samae/rules.mk @@ -0,0 +1 @@ +RGBLIGHT_ENABLE = yes From 76e35e02cc6caf88eb5bb06c9780619b78725d16 Mon Sep 17 00:00:00 2001 From: yiancar Date: Thu, 1 Oct 2020 08:27:18 +0100 Subject: [PATCH 903/930] Rename nebula65 -> nebula68 (#10490) Co-authored-by: Ryan --- keyboards/{nebula65 => nebula68}/chconf.h | 0 keyboards/{nebula65 => nebula68}/config.h | 5 +- keyboards/{nebula65 => nebula68}/halconf.h | 0 keyboards/{nebula65 => nebula68}/info.json | 2 +- .../keymaps/default/keymap.c | 0 .../keymaps/default/readme.md | 4 +- .../keymaps/via/keymap.c | 0 .../keymaps/via/readme.md | 4 +- .../keymaps/via/rules.mk | 0 keyboards/{nebula65 => nebula68}/mcuconf.h | 0 .../nebula65.c => nebula68/nebula68.c} | 6 +- .../nebula65.h => nebula68/nebula68.h} | 0 keyboards/{nebula65 => nebula68}/readme.md | 8 +- keyboards/{nebula65 => nebula68}/rules.mk | 0 keyboards/wilba_tech/wt_rgb_backlight.c | 80 +++++++++---------- 15 files changed, 54 insertions(+), 55 deletions(-) rename keyboards/{nebula65 => nebula68}/chconf.h (100%) rename keyboards/{nebula65 => nebula68}/config.h (97%) rename keyboards/{nebula65 => nebula68}/halconf.h (100%) rename keyboards/{nebula65 => nebula68}/info.json (98%) rename keyboards/{nebula65 => nebula68}/keymaps/default/keymap.c (100%) rename keyboards/{nebula65 => nebula68}/keymaps/default/readme.md (50%) rename keyboards/{nebula65 => nebula68}/keymaps/via/keymap.c (100%) rename keyboards/{nebula65 => nebula68}/keymaps/via/readme.md (50%) rename keyboards/{nebula65 => nebula68}/keymaps/via/rules.mk (100%) rename keyboards/{nebula65 => nebula68}/mcuconf.h (100%) rename keyboards/{nebula65/nebula65.c => nebula68/nebula68.c} (85%) rename keyboards/{nebula65/nebula65.h => nebula68/nebula68.h} (100%) rename keyboards/{nebula65 => nebula68}/readme.md (83%) rename keyboards/{nebula65 => nebula68}/rules.mk (100%) diff --git a/keyboards/nebula65/chconf.h b/keyboards/nebula68/chconf.h similarity index 100% rename from keyboards/nebula65/chconf.h rename to keyboards/nebula68/chconf.h diff --git a/keyboards/nebula65/config.h b/keyboards/nebula68/config.h similarity index 97% rename from keyboards/nebula65/config.h rename to keyboards/nebula68/config.h index efd413328714..1d6cb5e918bf 100755 --- a/keyboards/nebula65/config.h +++ b/keyboards/nebula68/config.h @@ -24,8 +24,7 @@ along with this program. If not, see . #define PRODUCT_ID 0x5336 #define DEVICE_VER 0x0001 #define MANUFACTURER Yiancar-Designs -#define PRODUCT NEBULA65 -#define DESCRIPTION "A 65-percent, tool-free RGB keyboard" +#define PRODUCT NEBULA68 /* key matrix size */ #define MATRIX_ROWS 5 @@ -106,7 +105,7 @@ along with this program. If not, see . #define RGB_BACKLIGHT_ENABLED 1 -#define RGB_BACKLIGHT_NEBULA65 +#define RGB_BACKLIGHT_NEBULA68 // they aren't really used if RGB_BACKLIGHT_NEBULA65 defined #define RGB_BACKLIGHT_USE_SPLIT_BACKSPACE 0 diff --git a/keyboards/nebula65/halconf.h b/keyboards/nebula68/halconf.h similarity index 100% rename from keyboards/nebula65/halconf.h rename to keyboards/nebula68/halconf.h diff --git a/keyboards/nebula65/info.json b/keyboards/nebula68/info.json similarity index 98% rename from keyboards/nebula65/info.json rename to keyboards/nebula68/info.json index c68e11ddad00..2cabbd616f00 100755 --- a/keyboards/nebula65/info.json +++ b/keyboards/nebula68/info.json @@ -1,5 +1,5 @@ { - "keyboard_name": "NEBULA65", + "keyboard_name": "NEBULA68", "url": "", "maintainer": "yiancar", "width": 17.25, diff --git a/keyboards/nebula65/keymaps/default/keymap.c b/keyboards/nebula68/keymaps/default/keymap.c similarity index 100% rename from keyboards/nebula65/keymaps/default/keymap.c rename to keyboards/nebula68/keymaps/default/keymap.c diff --git a/keyboards/nebula65/keymaps/default/readme.md b/keyboards/nebula68/keymaps/default/readme.md similarity index 50% rename from keyboards/nebula65/keymaps/default/readme.md rename to keyboards/nebula68/keymaps/default/readme.md index 324676b64e03..a8ae2ac8c775 100755 --- a/keyboards/nebula65/keymaps/default/readme.md +++ b/keyboards/nebula68/keymaps/default/readme.md @@ -1,7 +1,7 @@ -# The default keymap for Nebula65. VIA support disabled. +# The default keymap for Nebula68. VIA support disabled. ![Layer 0](https://i.imgur.com/dXyRwb1.png) ![Layer 1](https://i.imgur.com/4izTAFa.png) -Default layer is normal ANSI 65% +Default layer is normal ANSI 68% diff --git a/keyboards/nebula65/keymaps/via/keymap.c b/keyboards/nebula68/keymaps/via/keymap.c similarity index 100% rename from keyboards/nebula65/keymaps/via/keymap.c rename to keyboards/nebula68/keymaps/via/keymap.c diff --git a/keyboards/nebula65/keymaps/via/readme.md b/keyboards/nebula68/keymaps/via/readme.md similarity index 50% rename from keyboards/nebula65/keymaps/via/readme.md rename to keyboards/nebula68/keymaps/via/readme.md index d15266ea7c1e..e45ec36bb41f 100755 --- a/keyboards/nebula65/keymaps/via/readme.md +++ b/keyboards/nebula68/keymaps/via/readme.md @@ -1,7 +1,7 @@ -# The default keymap for Nebula65. VIA support enabled. +# The default keymap for Nebula68. VIA support enabled. ![Layer 0](https://i.imgur.com/dXyRwb1.png) ![Layer 1](https://i.imgur.com/4izTAFa.png) -Default layer is normal ANSI 65% +Default layer is normal ANSI 68% diff --git a/keyboards/nebula65/keymaps/via/rules.mk b/keyboards/nebula68/keymaps/via/rules.mk similarity index 100% rename from keyboards/nebula65/keymaps/via/rules.mk rename to keyboards/nebula68/keymaps/via/rules.mk diff --git a/keyboards/nebula65/mcuconf.h b/keyboards/nebula68/mcuconf.h similarity index 100% rename from keyboards/nebula65/mcuconf.h rename to keyboards/nebula68/mcuconf.h diff --git a/keyboards/nebula65/nebula65.c b/keyboards/nebula68/nebula68.c similarity index 85% rename from keyboards/nebula65/nebula65.c rename to keyboards/nebula68/nebula68.c index b3e7cc66399b..054a269bf623 100755 --- a/keyboards/nebula65/nebula65.c +++ b/keyboards/nebula68/nebula68.c @@ -13,8 +13,8 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -#ifndef RGB_BACKLIGHT_NEBULA65 -#error RGB_BACKLIGHT_NEBULA65 not defined, recheck config.h +#ifndef RGB_BACKLIGHT_NEBULA68 +#error RGB_BACKLIGHT_NEBULA68 not defined, recheck config.h #endif -#include "nebula65.h" +#include "nebula68.h" diff --git a/keyboards/nebula65/nebula65.h b/keyboards/nebula68/nebula68.h similarity index 100% rename from keyboards/nebula65/nebula65.h rename to keyboards/nebula68/nebula68.h diff --git a/keyboards/nebula65/readme.md b/keyboards/nebula68/readme.md similarity index 83% rename from keyboards/nebula65/readme.md rename to keyboards/nebula68/readme.md index 5189c049c37e..b990ed20dcde 100755 --- a/keyboards/nebula65/readme.md +++ b/keyboards/nebula68/readme.md @@ -1,9 +1,9 @@ -# Nebula65 +# Nebula68 -This is a standard fixed layout 65% PCB. It supports VIA, full per-key RGB and underglow RGB. +This is a standard fixed layout 68% PCB. It supports VIA, full per-key RGB and underglow RGB. * Keyboard Maintainer: [Yiancar](http://yiancar-designs.com/) and on [GitHub](https://github.com/yiancar) -* Hardware Supported: A 65% keyboard with STM32F303CC +* Hardware Supported: A 68% keyboard with STM32F303CC * Hardware Availability: https://spaceholdings.net/ ## Instructions @@ -12,7 +12,7 @@ This is a standard fixed layout 65% PCB. It supports VIA, full per-key RGB and u Make example for this keyboard (after setting up your build environment): - make nebula65:via + make nebula68: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/nebula65/rules.mk b/keyboards/nebula68/rules.mk similarity index 100% rename from keyboards/nebula65/rules.mk rename to keyboards/nebula68/rules.mk diff --git a/keyboards/wilba_tech/wt_rgb_backlight.c b/keyboards/wilba_tech/wt_rgb_backlight.c index 30c9c4c56d33..cd3fdd200fec 100644 --- a/keyboards/wilba_tech/wt_rgb_backlight.c +++ b/keyboards/wilba_tech/wt_rgb_backlight.c @@ -26,7 +26,7 @@ defined(RGB_BACKLIGHT_NK65) || \ defined(RGB_BACKLIGHT_NK87) || \ defined(RGB_BACKLIGHT_NEBULA12) || \ - defined(RGB_BACKLIGHT_NEBULA65) || \ + defined(RGB_BACKLIGHT_NEBULA68) || \ defined(RGB_BACKLIGHT_U80_A) || \ defined(RGB_BACKLIGHT_DAWN60) || \ defined(RGB_BACKLIGHT_WT60_B) || \ @@ -50,7 +50,7 @@ #include "wt_rgb_backlight_api.h" #include "wt_rgb_backlight_keycodes.h" -#if !defined(RGB_BACKLIGHT_HS60) && !defined(RGB_BACKLIGHT_NK65) && !defined(RGB_BACKLIGHT_NK87) && !defined(RGB_BACKLIGHT_NEBULA65) && !defined(RGB_BACKLIGHT_NEBULA12) +#if !defined(RGB_BACKLIGHT_HS60) && !defined(RGB_BACKLIGHT_NK65) && !defined(RGB_BACKLIGHT_NK87) && !defined(RGB_BACKLIGHT_NEBULA68) && !defined(RGB_BACKLIGHT_NEBULA12) #include #include "drivers/avr/i2c_master.h" #else @@ -81,7 +81,7 @@ LED_TYPE g_ws2812_leds[WS2812_LED_TOTAL]; #elif defined(RGB_BACKLIGHT_HS60) #include "drivers/issi/is31fl3733.h" #define BACKLIGHT_LED_COUNT 64 -#elif defined(RGB_BACKLIGHT_NK65) || defined(RGB_BACKLIGHT_NEBULA65) +#elif defined(RGB_BACKLIGHT_NK65) || defined(RGB_BACKLIGHT_NEBULA68) #include "drivers/issi/is31fl3733.h" #define BACKLIGHT_LED_COUNT 69 #elif defined(RGB_BACKLIGHT_NK87) @@ -227,7 +227,7 @@ const is31_led g_is31_leds[DRIVER_LED_TOTAL] = { {0, K_16, J_16, L_16}, //LA64 }; -#elif defined(RGB_BACKLIGHT_NK65) || defined(RGB_BACKLIGHT_NEBULA65) || defined(RGB_BACKLIGHT_NK87) +#elif defined(RGB_BACKLIGHT_NK65) || defined(RGB_BACKLIGHT_NEBULA68) || defined(RGB_BACKLIGHT_NK87) // 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) @@ -1061,7 +1061,7 @@ const Point g_map_led_to_point_polar[BACKLIGHT_LED_COUNT] PROGMEM = { {255,255}, {255,255}, {255,255}, {255,255}, {200,196}, {192,192}, {184,196}, {213,74} }; -#elif defined(RGB_BACKLIGHT_NEBULA65) +#elif defined(RGB_BACKLIGHT_NEBULA68) const Point g_map_led_to_point[BACKLIGHT_LED_COUNT] PROGMEM = { // LA1..LA60 {0,0}, {4,16}, {6,31}, {10,47}, {16,0}, {24,16}, {27,31}, {35,47}, {31,0}, {39,16}, {43,31}, {51,47}, @@ -1158,7 +1158,7 @@ const Point g_map_led_to_point_polar[BACKLIGHT_LED_COUNT] PROGMEM = { #elif defined(RGB_BACKLIGHT_M50_A) const Point g_map_led_to_point[BACKLIGHT_LED_COUNT] PROGMEM = { // LA0..LA17 - {255,255}, {104,16}, {88,16}, {72,16}, {56,16}, {40,16}, {24,16}, {255,255}, {255,255}, + {255,255}, {104,16}, {88,16}, {72,16}, {56,16}, {40,16}, {24,16}, {255,255}, {255,255}, {104,0}, {88,0}, {72,0}, {56,0}, {40,0}, {24,0}, {0,0}, {0,16}, {255,255}, // LB0..LB17 {255,255}, {120,0}, {136,0}, {152,0}, {168,0}, {184,0}, {200,0}, {255,255}, {255,255}, @@ -1197,7 +1197,7 @@ void map_led_to_point( uint8_t index, Point *point ) point->x = pgm_read_byte(addr); point->y = pgm_read_byte(addr+1); -#if defined(RGB_BACKLIGHT_M6_B) || defined(RGB_BACKLIGHT_M10_C) || defined(RGB_BACKLIGHT_HS60) || defined(RGB_BACKLIGHT_NK65) || defined(RGB_BACKLIGHT_NK87) || defined(RGB_BACKLIGHT_NEBULA65) || defined(RGB_BACKLIGHT_NEBULA12) +#if defined(RGB_BACKLIGHT_M6_B) || defined(RGB_BACKLIGHT_M10_C) || defined(RGB_BACKLIGHT_HS60) || defined(RGB_BACKLIGHT_NK65) || defined(RGB_BACKLIGHT_NK87) || defined(RGB_BACKLIGHT_NEBULA68) || defined(RGB_BACKLIGHT_NEBULA12) return; #endif @@ -1400,7 +1400,7 @@ const uint8_t g_map_row_column_to_led[MATRIX_ROWS][MATRIX_COLS] PROGMEM = { { 4-1, 48-1, 8-1, 12-1, 16-1, 20-1, 24-1, 28-1, 32-1, 36-1, 40-1, 44-1, 255, 52-1 }, { 57-1, 58-1, 59-1, 255, 255, 255, 60-1, 255, 255, 255, 62-1, 63-1, 64-1, 56-1 } }; -#elif defined(RGB_BACKLIGHT_NK65) || defined(RGB_BACKLIGHT_NEBULA65) +#elif defined(RGB_BACKLIGHT_NK65) || defined(RGB_BACKLIGHT_NEBULA68) // // LA1, LA5, LA9, LA13, LA17, LA21, LA25, LA29, LA33, LA37, LA41, LA45, LA49, LA53, LB1, // LA2, LA6, LA10, LA14, LA18, LA22, LA26, LA30, LA34, LA38, LA42, LA46, LA50, ---, LB2, @@ -1504,7 +1504,7 @@ void backlight_update_pwm_buffers(void) #elif defined(RGB_BACKLIGHT_HS60) IS31FL3733_update_pwm_buffers( ISSI_ADDR_1, 0 ); IS31FL3733_update_led_control_registers( ISSI_ADDR_1, 0 ); -#elif defined(RGB_BACKLIGHT_NK65) || defined(RGB_BACKLIGHT_NEBULA65) || defined(RGB_BACKLIGHT_NK87) +#elif defined(RGB_BACKLIGHT_NK65) || defined(RGB_BACKLIGHT_NEBULA68) || defined(RGB_BACKLIGHT_NK87) IS31FL3733_update_pwm_buffers( ISSI_ADDR_1, 0 ); IS31FL3733_update_pwm_buffers( ISSI_ADDR_2, 1 ); IS31FL3733_update_led_control_registers( ISSI_ADDR_1, 0 ); @@ -1542,7 +1542,7 @@ void backlight_set_color( int index, uint8_t red, uint8_t green, uint8_t blue ) { #if defined(RGB_BACKLIGHT_M6_B) IS31FL3218_set_color( index, red, green, blue ); -#elif defined(RGB_BACKLIGHT_HS60) || defined(RGB_BACKLIGHT_NK65) || defined(RGB_BACKLIGHT_NEBULA65) +#elif defined(RGB_BACKLIGHT_HS60) || defined(RGB_BACKLIGHT_NK65) || defined(RGB_BACKLIGHT_NEBULA68) IS31FL3733_set_color( index, red, green, blue ); #elif defined(RGB_BACKLIGHT_NK87) // This is done to avoid indicator LEDs being set @@ -1567,7 +1567,7 @@ 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) || defined(RGB_BACKLIGHT_NEBULA65) +#elif defined(RGB_BACKLIGHT_HS60) || defined(RGB_BACKLIGHT_NK65) || defined(RGB_BACKLIGHT_NEBULA68) // 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); @@ -1601,7 +1601,7 @@ void backlight_set_key_hit(uint8_t row, uint8_t column) g_any_key_hit = 0; } -#if !defined(RGB_BACKLIGHT_HS60) && !defined(RGB_BACKLIGHT_NK65) && !defined(RGB_BACKLIGHT_NEBULA65) && !defined(RGB_BACKLIGHT_NEBULA12) && !defined(RGB_BACKLIGHT_NK87) +#if !defined(RGB_BACKLIGHT_HS60) && !defined(RGB_BACKLIGHT_NK65) && !defined(RGB_BACKLIGHT_NEBULA68) && !defined(RGB_BACKLIGHT_NEBULA12) && !defined(RGB_BACKLIGHT_NK87) // This is (F_CPU/1024) / 20 Hz // = 15625 Hz / 20 Hz // = 781 @@ -1681,7 +1681,7 @@ void backlight_timer_disable(void) { gptStopTimer(&GPTD4); } -#endif //!defined(RGB_BACKLIGHT_HS60) && !defined(RGB_BACKLIGHT_NK65) && !defined(RGB_BACKLIGHT_NEBULA65) && !defined(RGB_BACKLIGHT_NEBULA12) && !defined(RGB_BACKLIGHT_NK87) +#endif //!defined(RGB_BACKLIGHT_HS60) && !defined(RGB_BACKLIGHT_NK65) && !defined(RGB_BACKLIGHT_NEBULA68) && !defined(RGB_BACKLIGHT_NEBULA12) && !defined(RGB_BACKLIGHT_NK87) void backlight_set_suspend_state(bool state) { @@ -1927,7 +1927,7 @@ void backlight_effect_cycle_all(void) for ( int i=0; i Date: Thu, 1 Oct 2020 10:33:18 -0700 Subject: [PATCH 904/930] [Keymap] VIA Support for Nein Macropad (#10496) Co-authored-by: Ryan --- keyboards/40percentclub/nein/config.h | 4 +- keyboards/40percentclub/nein/info.json | 2 +- .../40percentclub/nein/keymaps/via/keymap.c | 39 +++++++++++++++++++ .../40percentclub/nein/keymaps/via/rules.mk | 2 + 4 files changed, 44 insertions(+), 3 deletions(-) create mode 100644 keyboards/40percentclub/nein/keymaps/via/keymap.c create mode 100644 keyboards/40percentclub/nein/keymaps/via/rules.mk diff --git a/keyboards/40percentclub/nein/config.h b/keyboards/40percentclub/nein/config.h index e053b487fd4a..b96f5fbe5d71 100644 --- a/keyboards/40percentclub/nein/config.h +++ b/keyboards/40percentclub/nein/config.h @@ -19,8 +19,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 0x9999 #define DEVICE_VER 0x9999 #define MANUFACTURER di0ib #define PRODUCT The nein Keyboard diff --git a/keyboards/40percentclub/nein/info.json b/keyboards/40percentclub/nein/info.json index aaadc7186160..2a28ffc00869 100644 --- a/keyboards/40percentclub/nein/info.json +++ b/keyboards/40percentclub/nein/info.json @@ -1,6 +1,6 @@ { "keyboard_name": "nein", - "url": "", + "url": "http://www.40percent.club/2019/04/nein.html", "maintainer": "qmk", "width": 3, "height": 3, diff --git a/keyboards/40percentclub/nein/keymaps/via/keymap.c b/keyboards/40percentclub/nein/keymaps/via/keymap.c new file mode 100644 index 000000000000..528de8246d8a --- /dev/null +++ b/keyboards/40percentclub/nein/keymaps/via/keymap.c @@ -0,0 +1,39 @@ +/* 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 + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_ortho_3x3( + KC_MUTE, KC_HOME, KC_MPLY, + MO(1), KC_UP, KC_END, + KC_LEFT, KC_DOWN, KC_RGHT + ), + [1] = LAYOUT_ortho_3x3( + RESET, _______, KC_STOP, + _______, _______, RGB_MOD, + KC_MPRV, _______, KC_MNXT + ), + [2] = LAYOUT_ortho_3x3( + _______, _______, _______, + _______, _______, _______, + _______, _______, _______ + ), + [3] = LAYOUT_ortho_3x3( + _______, _______, _______, + _______, _______, _______, + _______, _______, _______ + ), +}; diff --git a/keyboards/40percentclub/nein/keymaps/via/rules.mk b/keyboards/40percentclub/nein/keymaps/via/rules.mk new file mode 100644 index 000000000000..36b7ba9cbc98 --- /dev/null +++ b/keyboards/40percentclub/nein/keymaps/via/rules.mk @@ -0,0 +1,2 @@ +VIA_ENABLE = yes +LTO_ENABLE = yes From 8fbea13a8fffaad3150846b334464f60b680b992 Mon Sep 17 00:00:00 2001 From: Adam Gwilliam Date: Thu, 1 Oct 2020 12:38:12 -0500 Subject: [PATCH 905/930] resolve extra param issue in boardsource/5x12 via keymap (#10501) Co-authored-by: James Young <18669334+noroadsleft@users.noreply.github.com> Co-authored-by: Danny Co-authored-by: Adam Gwilliam --- keyboards/boardsource/5x12/keymaps/via/keymap.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/keyboards/boardsource/5x12/keymaps/via/keymap.c b/keyboards/boardsource/5x12/keymaps/via/keymap.c index 5b97e9951da4..8601fa377c95 100644 --- a/keyboards/boardsource/5x12/keymaps/via/keymap.c +++ b/keyboards/boardsource/5x12/keymaps/via/keymap.c @@ -35,12 +35,13 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_CAPS, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY ), + [3] = LAYOUT_ortho_5x12( _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ ) }; From 1960e250485d4036623a045dd601e01343cafdd5 Mon Sep 17 00:00:00 2001 From: yiancar Date: Thu, 1 Oct 2020 19:05:47 +0100 Subject: [PATCH 906/930] Enable Mediakeys for yiancar's 328p keyboards (#10476) --- keyboards/barleycorn/keymaps/via/readme.md | 2 -- keyboards/barleycorn/keymaps/via/rules.mk | 2 -- keyboards/gingham/keymaps/via/keymap.c | 2 +- keyboards/gingham/keymaps/via/readme.md | 2 -- keyboards/gingham/keymaps/via/rules.mk | 2 -- 5 files changed, 1 insertion(+), 9 deletions(-) diff --git a/keyboards/barleycorn/keymaps/via/readme.md b/keyboards/barleycorn/keymaps/via/readme.md index a49e2c05684a..b82bc8e79f9c 100644 --- a/keyboards/barleycorn/keymaps/via/readme.md +++ b/keyboards/barleycorn/keymaps/via/readme.md @@ -1,3 +1 @@ # Compile with this keymap to use VIA - -Sadly right now when using VIA, extrakeys is disabled. This means volume control will not work. diff --git a/keyboards/barleycorn/keymaps/via/rules.mk b/keyboards/barleycorn/keymaps/via/rules.mk index 930e3552ad08..1e5b99807cb7 100644 --- a/keyboards/barleycorn/keymaps/via/rules.mk +++ b/keyboards/barleycorn/keymaps/via/rules.mk @@ -1,3 +1 @@ VIA_ENABLE = yes -MOUSEKEY_ENABLE = no -EXTRAKEY_ENABLE = no diff --git a/keyboards/gingham/keymaps/via/keymap.c b/keyboards/gingham/keymaps/via/keymap.c index 3f7f1c4229a5..f3034497392e 100644 --- a/keyboards/gingham/keymaps/via/keymap.c +++ b/keyboards/gingham/keymaps/via/keymap.c @@ -30,7 +30,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TRNS, KC_TRNS, KC_UP, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RESET , 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_TRNS, KC_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_VOLD, KC_MUTE, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), [2] = LAYOUT_60_iso_split_bs_rshift( /* 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, diff --git a/keyboards/gingham/keymaps/via/readme.md b/keyboards/gingham/keymaps/via/readme.md index a49e2c05684a..b82bc8e79f9c 100644 --- a/keyboards/gingham/keymaps/via/readme.md +++ b/keyboards/gingham/keymaps/via/readme.md @@ -1,3 +1 @@ # Compile with this keymap to use VIA - -Sadly right now when using VIA, extrakeys is disabled. This means volume control will not work. diff --git a/keyboards/gingham/keymaps/via/rules.mk b/keyboards/gingham/keymaps/via/rules.mk index 930e3552ad08..1e5b99807cb7 100644 --- a/keyboards/gingham/keymaps/via/rules.mk +++ b/keyboards/gingham/keymaps/via/rules.mk @@ -1,3 +1 @@ VIA_ENABLE = yes -MOUSEKEY_ENABLE = no -EXTRAKEY_ENABLE = no From 01d2a03258df465a7efcf33d9cc6f1751967c29a Mon Sep 17 00:00:00 2001 From: sol <1731279+s-ol@users.noreply.github.com> Date: Thu, 1 Oct 2020 20:17:03 +0200 Subject: [PATCH 907/930] Fix SPLIT_KEYBOARD compilation for ATMega*U2, which doesn't have VBUS/OTG control (#10460) Co-authored-by: s-ol --- quantum/split_common/split_util.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/quantum/split_common/split_util.c b/quantum/split_common/split_util.c index 90735eda4423..e8e944d710a2 100644 --- a/quantum/split_common/split_util.c +++ b/quantum/split_common/split_util.c @@ -72,7 +72,7 @@ bool usbIsActive(void) { return false; } -#elif defined(PROTOCOL_LUFA) +#elif defined(PROTOCOL_LUFA) && defined(OTGPADE) static inline bool usbIsActive(void) { USB_OTGPAD_On(); // enables VBUS pad wait_us(5); From 45f044907c8ac784d6169f3495b96c142d6d699d Mon Sep 17 00:00:00 2001 From: Tom Swartz Date: Thu, 1 Oct 2020 14:25:30 -0400 Subject: [PATCH 908/930] xd75re Multi-layer keymap (#10499) Co-authored-by: Ryan Co-authored-by: Erovia --- keyboards/xd75/keymaps/tomswartz07/keymap.c | 125 ++++++++++++++++++++ 1 file changed, 125 insertions(+) create mode 100644 keyboards/xd75/keymaps/tomswartz07/keymap.c diff --git a/keyboards/xd75/keymaps/tomswartz07/keymap.c b/keyboards/xd75/keymaps/tomswartz07/keymap.c new file mode 100644 index 000000000000..175ddb53b27c --- /dev/null +++ b/keyboards/xd75/keymaps/tomswartz07/keymap.c @@ -0,0 +1,125 @@ +/* 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 . + */ +#include QMK_KEYBOARD_H + +enum preonic_layers { + _QWERTY, + _LOWER, + _RAISE, + _ADJUST +}; + +// Defines the keycodes used by our macros in process_record_user +enum custom_keycodes { + QWERTY = SAFE_RANGE, + LOWER, + RAISE +}; + +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 | [ | ] | HOME | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------+--------| + * | ESC | A | S | D | F | G | H | J | K | L | ; | ENTER | | | END | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------------------------+--------| + * | LSHIFT | Z | X | C | V | B | N | M | , | . | / | ' | | | PG UP | + * |--------+--------+--------+--------+--------+-----------------+--------+--------+--------+--------+-----------------+--------+--------| + * | LCTRL | LGUI | LALT | LOWER | BKSP | ENTER | SPACE | RAISE | LEFT | DOWN | UP | RIGHT | | | PG DN | + * '--------------------------------------------------------------------------------------------------------------------------------------' + */ + + [_QWERTY] = LAYOUT_ortho_5x15( /* 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, 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_DEL, KC_LBRC, KC_RBRC, KC_HOME, + KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_ENT, KC_NO, KC_NO, 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_QUOT, KC_NO, KC_NO, KC_PGUP, + KC_LCTL, KC_LGUI, KC_LALT, LOWER, KC_BSPC, KC_ENT, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT,KC_RALT, KC_NO, KC_PGDN + ), + +/* LOWER + * .--------------------------------------------------------------------------------------------------------------------------------------. + * | ~ | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | BKSP | | | | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------| + * | ~ | | | | | | | | | | | | | | | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------+--------| + * | DEL | | | | | | | _ | + | { | } | | | | | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------------------------+--------| + * | | | | | | | | | | Home | End | | | | | + * |--------+--------+--------+--------+--------+-----------------+--------+--------+--------+--------+-----------------+--------+--------| + * | | | | | | | | | | Vol - | VOL + | | | | | + * '--------------------------------------------------------------------------------------------------------------------------------------' + */ + + [_LOWER] = LAYOUT_ortho_5x15( /* LOWER */ + 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_BSLS, + KC_TILD, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, KC_END, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_VOLD, KC_VOLU, _______, _______, _______, _______ + ), + +/* RAISE + * .--------------------------------------------------------------------------------------------------------------------------------------. + * | `~ | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | BKSP | | | | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------| + * | `~ | | | | | | | | | | | Del | | | | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------+--------| + * | DEL | | | | | | | - | = | [ | ] | \ | | | | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------------------------+--------| + * | | | | | | | | | | | | | | | | + * |--------+--------+--------+--------+--------+-----------------+--------+--------+--------+--------+-----------------+--------+--------| + * | | | | | | | | | | | | | | | | + * '--------------------------------------------------------------------------------------------------------------------------------------' + */ + + [_RAISE] = LAYOUT_ortho_5x15( /* RAISE */ + 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_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + +/* ADJUST + * .--------------------------------------------------------------------------------------------------------------------------------------. + * | | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | | | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + * | | | | | RGB HD | RGB HI | | | | | | | PR SCR | SCR LK | INSERT | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + * | PREV | PLAY | NEXT | | RGB SD | RGB SI | LEFT | DOWN | UP | RIGHT | | RESET | | | | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + * | VOL- | MUTE | VOL+ |RGB RMD | RGB VD | RGB VI | | | | | | | | | | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + * | RGB TG | RGB MD | | | | | | | | | | | | | | + * '--------------------------------------------------------------------------------------------------------------------------------------' + */ + + [_ADJUST] = LAYOUT_ortho_5x15( /* ADJUST */ + _______, KC_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_SLSH, + _______, RESET, _______, _______, RGB_HUD, RGB_HUI, _______, _______, _______, _______, _______, _______, KC_PSCR, KC_SLCK, KC_INS, + KC_MPRV, KC_MPLY, KC_MNXT, _______, RGB_SAD, RGB_SAI, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT,_______, RESET, _______, _______, _______, + KC_VOLD, KC_MUTE, KC_VOLU, RGB_RMOD,RGB_VAD, RGB_VAI, _______, _______, _______, _______, _______, _______, _______, _______, _______, + RGB_TOG, RGB_MOD, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ) +}; + +layer_state_t layer_state_set_user(layer_state_t state) { + return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST); +} From 7a2124db6bfea74672acd714d78c10eb9288732a Mon Sep 17 00:00:00 2001 From: yhr0x43 <58871693+yhr0x43@users.noreply.github.com> Date: Thu, 1 Oct 2020 13:41:21 -0500 Subject: [PATCH 909/930] Crkbd implementing return value for matrix_scan() (#10422) --- keyboards/crkbd/rev1/legacy/matrix.c | 18 +++++++++++------- keyboards/crkbd/rev1/legacy/split_util.h | 2 +- 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/keyboards/crkbd/rev1/legacy/matrix.c b/keyboards/crkbd/rev1/legacy/matrix.c index 46dead369fa8..8eb028137bd5 100644 --- a/keyboards/crkbd/rev1/legacy/matrix.c +++ b/keyboards/crkbd/rev1/legacy/matrix.c @@ -155,6 +155,7 @@ void matrix_init(void) uint8_t _matrix_scan(void) { + bool changed = false; // Right hand is stored after the left in the matirx so, we need to offset it int offset = isLeftHand ? 0 : (ROWS_PER_HAND); @@ -163,6 +164,7 @@ uint8_t _matrix_scan(void) _delay_us(30); // without this wait read unstable value. matrix_row_t cols = read_cols(); if (matrix_debouncing[i+offset] != cols) { + changed = true; matrix_debouncing[i+offset] = cols; debouncing = DEBOUNCE; } @@ -179,7 +181,7 @@ uint8_t _matrix_scan(void) } } - return 1; + return changed; } #ifdef USE_MATRIX_I2C @@ -237,16 +239,17 @@ int serial_transaction(int master_changed) { uint8_t matrix_scan(void) { + bool changed = false; if (is_master) { - matrix_master_scan(); + changed |= matrix_master_scan(); }else{ - matrix_slave_scan(); + changed |= matrix_slave_scan(); int offset = (isLeftHand) ? ROWS_PER_HAND : 0; memcpy(&matrix[offset], (void *)serial_master_buffer, SERIAL_MASTER_BUFFER_LENGTH); matrix_scan_quantum(); } - return 1; + return (uint8_t) changed; } @@ -297,8 +300,8 @@ uint8_t matrix_master_scan(void) { return ret; } -void matrix_slave_scan(void) { - _matrix_scan(); +uint8_t matrix_slave_scan(void) { + int ret = _matrix_scan(); int offset = (isLeftHand) ? 0 : ROWS_PER_HAND; @@ -314,7 +317,7 @@ void matrix_slave_scan(void) { for (int i = 0; i < ROWS_PER_HAND; ++i) { #ifdef SERIAL_USE_MULTI_TRANSACTION if( serial_slave_buffer[i] != matrix[offset+i] ) - change = 1; + change = 1; #endif serial_slave_buffer[i] = matrix[offset+i]; } @@ -322,6 +325,7 @@ void matrix_slave_scan(void) { slave_buffer_change_count += change; #endif #endif + return ret; } bool matrix_is_modified(void) diff --git a/keyboards/crkbd/rev1/legacy/split_util.h b/keyboards/crkbd/rev1/legacy/split_util.h index 414763bff268..b2ddc1f97a3d 100644 --- a/keyboards/crkbd/rev1/legacy/split_util.h +++ b/keyboards/crkbd/rev1/legacy/split_util.h @@ -27,7 +27,7 @@ along with this program. If not, see . extern volatile bool isLeftHand; // slave version of matix scan, defined in matrix.c -void matrix_slave_scan(void); +uint8_t matrix_slave_scan(void); void split_keyboard_setup(void); bool has_usb(void); From b31df1af94abdf26bb7bcbf5183c05be1c500005 Mon Sep 17 00:00:00 2001 From: MechMerlin <30334081+mechmerlin@users.noreply.github.com> Date: Thu, 1 Oct 2020 12:36:52 -0700 Subject: [PATCH 910/930] KBDFans KBD19x: VIA Support & LAYOUT macro fixing (#10401) * first pass at fixing the key labeling * second pass of fixing key labeling * third pass of this key naming * another pass of changing key naming * another pass * another pass * another pass * renamed it all * give a good vid and pid * add via keymap * add on to the comments * update readme and comments * one more small change --- keyboards/kbdfans/kbd19x/config.h | 4 +- keyboards/kbdfans/kbd19x/kbd19x.h | 77 ++++++++++--------- keyboards/kbdfans/kbd19x/keymaps/via/keymap.c | 56 ++++++++++++++ keyboards/kbdfans/kbd19x/keymaps/via/rules.mk | 2 + keyboards/kbdfans/kbd19x/readme.md | 6 +- 5 files changed, 102 insertions(+), 43 deletions(-) create mode 100644 keyboards/kbdfans/kbd19x/keymaps/via/keymap.c create mode 100644 keyboards/kbdfans/kbd19x/keymaps/via/rules.mk diff --git a/keyboards/kbdfans/kbd19x/config.h b/keyboards/kbdfans/kbd19x/config.h index 3fcda998c220..1146afa628be 100644 --- a/keyboards/kbdfans/kbd19x/config.h +++ b/keyboards/kbdfans/kbd19x/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 0x4B42 +#define PRODUCT_ID 0x0191 #define DEVICE_VER 0x0001 #define MANUFACTURER KBDFans #define PRODUCT kbd19x diff --git a/keyboards/kbdfans/kbd19x/kbd19x.h b/keyboards/kbdfans/kbd19x/kbd19x.h index 73f3cbe16c84..28ad831589c7 100644 --- a/keyboards/kbdfans/kbd19x/kbd19x.h +++ b/keyboards/kbdfans/kbd19x/kbd19x.h @@ -41,61 +41,62 @@ inline void kbd19x_nmlk_led_off(void) { DDRB &= ~(1<<2); PORTB &= ~(1<<2); } * represents the switch matrix. */ -// 2u backspace: XXX, k1e -// split backspace: k1d, k1e +// 2u backspace: XXX, k71 +// split backspace: k70, k71 -// 2u numpad +: k2i, XXX -// split numpad +: k2i, k3i +// 2u numpad +: k2c, XXX +// split numpad +: k2c, k3c -// 2u numpad enter: k4i, XXX -// split numpad enter: k4i, k5i +// 2u numpad enter: k4c, XXX +// split numpad enter: k4c, k5c // 2.25u lshift: k40, XXX // split (1.25u, 1u) lshift: k40, k41 -// ANSI enter or ISO enter: k3e -// backslash or NUHS: k2e +// ANSI enter or ISO enter: k38 +// Key next to ISO enter: k72 +// backslash or NUHS: k73 // left winkey: k50, k51, k52 // left WKL: k50, XXX, k52 -// right winkey: k59, k5a, k5b -// right WKL: k59, XXX, k5b +// right winkey: k55, k56, k57 +// right WKL: k55, XXX, k57 #define LAYOUT_all( \ - k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, 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, k2e, k2f, k2g, k2h, k2i, \ - k30, 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, k4e, k4f, k4g, k4h, k4i, \ - k50, k51, k52, k56, k59, k5a, k5b, k5d, k5e, k5f, k5g, k5h, k5i \ + k00, k01, k02, k03, k04, k60, k61, k62, k63, k05, k06, k07, k08, k72, k09, k0a, k0b, k0c, \ + k10, k11, k12, k13, k14, k64, k65, k66, k67, k15, k16, k17, k18, k70, k71, k19, k1a, k1b, k1c, \ + k20, k21, k22, k23, k24, k68, k69, k6a, k6b, k25, k26, k27, k28, k73, k29, k2a, k2b, k2c, \ + k30, k31, k32, k33, k34, k6c, k75, k76, k77, k35, k36, k37, k38, k39, k3a, k3b, k3c, \ + k40, k41, k42, k43, k44, k78, k79, k7a, k7b, k45, k46, k47, k48, k74, k49, k4a, k4b, k4c, \ + k50, k51, k52, k59, k55, k56, k57, k58, k53, k54, k5a, k5b, k5c \ )\ {\ - {k00, k01, k02, k03, k04, k09, k0a, k0b, k0c, k0f, k0g, k0h, k0i},\ - {k10, k11, k12, k13, k14, k19, k1a, k1b, k1c, k1f, k1g, k1h, k1i},\ - {k20, k21, k22, k23, k24, k29, k2a, k2b, k2c, k2f, k2g, k2h, k2i},\ - {k30, k32, k33, k34, k35, k3a, k3b, k3c, k3e, k3f, k3g, k3h, k3i},\ - {k40, k41, k42, k43, k44, k49, k4a, k4b, k4c, k4f, k4g, k4h, k4i},\ - {k50, k51, k52, k5e, k5f, k59, k5a, k5b, k5d, k56, k5g, k5h, k5i},\ - {k05, k06, k07, k08, k15, k16, k17, k18, k25, k26, k27, k28, k36},\ - {k1d, k1e, k0e, k2e, k4e, k37, k38, k39, k45, k46, k47, k48, XXX},\ + {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, k48, k49, k4a, k4b, k4c},\ + {k50, k51, k52, k53, k54, k55, k56, k57, k58, k59, k5a, k5b, k5c},\ + {k60, k61, k62, k63, k64, k65, k66, k67, k68, k69, k6a, k6b, k6c},\ + {k70, k71, k72, k73, k74, k75, k76, k77, k78, k79, k7a, k7b, XXX},\ } #define LAYOUT_ansi( \ - k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0e, k0f, k0g, k0h, k0i, \ - k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1e, k1f, k1g, k1h, k1i, \ - k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2e, k2f, k2g, k2h, k2i, \ - k30, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3e, k3f, k3g, k3h, \ - k40, k42, k43, k44, k45, k46, k47, k48, k49, k4a, k4b, k4c, k4e, k4f, k4g, k4h, k4i, \ - k50, k51, k52, k56, k59, k5a, k5b, k5d, k5e, k5f, k5g, k5h \ + k00, k01, k02, k03, k04, k60, k61, k62, k63, k05, k06, k07, k08, k72, k09, k0a, k0b, k0c, \ + k10, k11, k12, k13, k14, k64, k65, k66, k67, k15, k16, k17, k18, k71, k19, k1a, k1b, k1c, \ + k20, k21, k22, k23, k24, k68, k69, k6a, k6b, k25, k26, k27, k28, k73, k29, k2a, k2b, k2c, \ + k30, k31, k32, k33, k34, k6c, k75, k76, k77, k35, k36, k37, k38, k39, k3a, k3b, \ + k40, k42, k43, k44, k78, k79, k7a, k7b, k45, k46, k47, k48, k74, k49, k4a, k4b, k4c, \ + k50, k51, k52, k59, k55, k56, k57, k58, k53, k54, k5a, k5b \ )\ {\ - {k00, k01, k02, k03, k04, k09, k0a, k0b, k0c, k0f, k0g, k0h, k0i},\ - {k10, k11, k12, k13, k14, k19, k1a, k1b, k1c, k1f, k1g, k1h, k1i},\ - {k20, k21, k22, k23, k24, k29, k2a, k2b, k2c, k2f, k2g, k2h, k2i},\ - {k30, k32, k33, k34, k35, k3a, k3b, k3c, k3e, k3f, k3g, k3h, XXX},\ - {k40, XXX, k42, k43, k44, k49, k4a, k4b, k4c, k4f, k4g, k4h, k4i},\ - {k50, k51, k52, k5e, k5f, k59, k5a, k5b, k5d, k56, k5g, k5h, XXX},\ - {k05, k06, k07, k08, k15, k16, k17, k18, k25, k26, k27, k28, k36},\ - {XXX, k1e, k0e, k2e, k4e, k37, k38, k39, k45, k46, k47, k48, XXX},\ + {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, XXX},\ + {k40, XXX, k42, k43, k44, k45, k46, k47, k48, k49, k4a, k4b, k4c},\ + {k50, k51, k52, k53, k54, k55, k56, k57, k58, k59, k5a, k5b, XXX},\ + {k60, k61, k62, k63, k64, k65, k66, k67, k68, k69, k6a, k6b, k6c},\ + {XXX, k71, k72, k73, k74, k75, k76, k77, k78, k79, k7a, k7b, XXX},\ } diff --git a/keyboards/kbdfans/kbd19x/keymaps/via/keymap.c b/keyboards/kbdfans/kbd19x/keymaps/via/keymap.c new file mode 100644 index 000000000000..138fe97f1b2f --- /dev/null +++ b/keyboards/kbdfans/kbd19x/keymaps/via/keymap.c @@ -0,0 +1,56 @@ +/* +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_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, BL_STEP, KC_PSCR, KC_SLCK, KC_PAUS, 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_BSPC, 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_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, MO(1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT, KC_P0, KC_PDOT \ + ), + [1] = LAYOUT_ansi( /* Func */ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_TOG, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET, _______, _______, _______, _______, \ + _______, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ + ), + + [2] = LAYOUT_ansi( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ + ), + + [3] = LAYOUT_ansi( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ + ), +}; + + diff --git a/keyboards/kbdfans/kbd19x/keymaps/via/rules.mk b/keyboards/kbdfans/kbd19x/keymaps/via/rules.mk new file mode 100644 index 000000000000..36b7ba9cbc98 --- /dev/null +++ b/keyboards/kbdfans/kbd19x/keymaps/via/rules.mk @@ -0,0 +1,2 @@ +VIA_ENABLE = yes +LTO_ENABLE = yes diff --git a/keyboards/kbdfans/kbd19x/readme.md b/keyboards/kbdfans/kbd19x/readme.md index 50adfb77f0a1..da37474adc8c 100644 --- a/keyboards/kbdfans/kbd19x/readme.md +++ b/keyboards/kbdfans/kbd19x/readme.md @@ -10,9 +10,9 @@ The KBD19x is a compact-1800 keyboard kit produced by KBDfans, offering a number **Reset Sequence:** Using this firmware sets `BOOTLOADER_ENABLE` to `lite`. While plugging in, hold the top left key, commonly programmed as `Esc` to put your board into bootloader mode. -Keyboard Maintainer: [jshuf](https://github.com/jshuf) -Hardware Supported: KBD19x PCB -Hardware Availability: [KBDfans](https://kbdfans.cn) +* Keyboard Maintainer: [jshuf](https://github.com/jshuf), [MechMerlin](https://github.com/mechmerlin) +* Hardware Supported: KBD19x PCB +* Hardware Availability: [KBDfans](https://kbdfans.cn) Make example for this keyboard (after setting up your build environment): From a13e918d47487a70d238bbde8445b4778ccf970b Mon Sep 17 00:00:00 2001 From: Nic Lake Date: Thu, 1 Oct 2020 14:39:36 -0500 Subject: [PATCH 911/930] [Keymap] Adding 2x2u default layout for Boardwalk (#10486) * Adding 2x2u default layout for Boardwalk * Defining the _RAISE layer --- .../boardwalk/keymaps/default_2x2u/keymap.c | 90 +++++++++++++++++++ .../boardwalk/keymaps/default_2x2u/readme.md | 1 + 2 files changed, 91 insertions(+) create mode 100644 keyboards/boardwalk/keymaps/default_2x2u/keymap.c create mode 100644 keyboards/boardwalk/keymaps/default_2x2u/readme.md diff --git a/keyboards/boardwalk/keymaps/default_2x2u/keymap.c b/keyboards/boardwalk/keymaps/default_2x2u/keymap.c new file mode 100644 index 000000000000..f30d15c0f8f2 --- /dev/null +++ b/keyboards/boardwalk/keymaps/default_2x2u/keymap.c @@ -0,0 +1,90 @@ +/* + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public 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, + _RAISE, +}; + +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 | RAISE | SPACE | SPACE | LEFT | DOWN | UP | RIGHT | RCTRL | + * '-----------------------------------------------------------------------------------------------------------------------------' + */ + [_BASE] = LAYOUT_ortho_2x2u( + 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, MO(_RAISE), 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_2x2u( + 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, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + + /* Raise Layer + * .-----------------------------------------------------------------------------------------------------------------------------. + * | ` | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | DEL | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------| + * | | | MENU | | | | | | | | | | PRT SC | | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------+--------| + * | | | | | | | | | | | | | | RESET | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------------------------+--------| + * | | | | | | | | | | MUTE | VOL DN | VOL UP | \ | | + * |--------+--------+--------+--------+--------+-----------------+--------+--------+--------+-----------------+--------+--------| + * | | | | | | | | | | | | | + * '-----------------------------------------------------------------------------------------------------------------------------' + */ + [_RAISE] = LAYOUT_ortho_2x2u( + 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_2x2u/readme.md b/keyboards/boardwalk/keymaps/default_2x2u/readme.md new file mode 100644 index 000000000000..94a68e744f81 --- /dev/null +++ b/keyboards/boardwalk/keymaps/default_2x2u/readme.md @@ -0,0 +1 @@ +# The default_2x2u keymap for Boardwalk From b5d6f287d95d1af9128dc5acb3b7314d6e9ea337 Mon Sep 17 00:00:00 2001 From: ai03 Date: Fri, 2 Oct 2020 05:44:29 +0900 Subject: [PATCH 912/930] Southpaw Fullsize: Add VIA support (#10469) * Add via configurator support * Remove layers to fix via * Re-add extra via layers since it seems to work now * Replace tabs with spaces * Update readme.md --- .../southpaw_fullsize/keymaps/via/keymap.c | 60 +++++++++++++++++++ .../southpaw_fullsize/keymaps/via/readme.md | 3 + .../southpaw_fullsize/keymaps/via/rules.mk | 1 + 3 files changed, 64 insertions(+) create mode 100644 keyboards/switchplate/southpaw_fullsize/keymaps/via/keymap.c create mode 100644 keyboards/switchplate/southpaw_fullsize/keymaps/via/readme.md create mode 100644 keyboards/switchplate/southpaw_fullsize/keymaps/via/rules.mk diff --git a/keyboards/switchplate/southpaw_fullsize/keymaps/via/keymap.c b/keyboards/switchplate/southpaw_fullsize/keymaps/via/keymap.c new file mode 100644 index 000000000000..f8f8a1ce9258 --- /dev/null +++ b/keyboards/switchplate/southpaw_fullsize/keymaps/via/keymap.c @@ -0,0 +1,60 @@ +/* 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, + _FN1, + _FN2, + _FN3 +}; + +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 + ), + [_FN1] = LAYOUT_all ( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + [_FN2] = LAYOUT_all ( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + [_FN3] = LAYOUT_all ( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ) +}; diff --git a/keyboards/switchplate/southpaw_fullsize/keymaps/via/readme.md b/keyboards/switchplate/southpaw_fullsize/keymaps/via/readme.md new file mode 100644 index 000000000000..1335b773c505 --- /dev/null +++ b/keyboards/switchplate/southpaw_fullsize/keymaps/via/readme.md @@ -0,0 +1,3 @@ +# The via keymap for southpaw fullsize + +For use with VIA configurator \ No newline at end of file diff --git a/keyboards/switchplate/southpaw_fullsize/keymaps/via/rules.mk b/keyboards/switchplate/southpaw_fullsize/keymaps/via/rules.mk new file mode 100644 index 000000000000..036bd6d1c3ec --- /dev/null +++ b/keyboards/switchplate/southpaw_fullsize/keymaps/via/rules.mk @@ -0,0 +1 @@ +VIA_ENABLE = yes \ No newline at end of file From 10f5767010dbfc37e94ab3f5ab3549284073a570 Mon Sep 17 00:00:00 2001 From: James Young <18669334+noroadsleft@users.noreply.github.com> Date: Thu, 1 Oct 2020 13:57:56 -0700 Subject: [PATCH 913/930] Add 64_ansi and 64_iso Community Layouts (#10463) * Add 64_ansi Community Layout * Add 64_iso Community Layout * Add readme.md with layout drawings * Edit readme.md - fix layout drawings Fix 65_ansi_blocker_split_bs and 65_ansi_blocker_tsangan drawings. * Edit readme.md - suggestions per fauxpark Co-authored-by: Ryan Co-authored-by: Ryan --- .../default/64_ansi/default_64_ansi/keymap.c | 40 + layouts/default/64_ansi/info.json | 81 ++ layouts/default/64_ansi/layout.json | 5 + layouts/default/64_ansi/readme.md | 14 + .../default/64_iso/default_64_iso/keymap.c | 40 + layouts/default/64_iso/info.json | 82 ++ layouts/default/64_iso/layout.json | 5 + layouts/default/64_iso/readme.md | 14 + layouts/default/readme.md | 704 ++++++++++++++++++ 9 files changed, 985 insertions(+) create mode 100644 layouts/default/64_ansi/default_64_ansi/keymap.c create mode 100644 layouts/default/64_ansi/info.json create mode 100644 layouts/default/64_ansi/layout.json create mode 100644 layouts/default/64_ansi/readme.md create mode 100644 layouts/default/64_iso/default_64_iso/keymap.c create mode 100644 layouts/default/64_iso/info.json create mode 100644 layouts/default/64_iso/layout.json create mode 100644 layouts/default/64_iso/readme.md create mode 100644 layouts/default/readme.md diff --git a/layouts/default/64_ansi/default_64_ansi/keymap.c b/layouts/default/64_ansi/default_64_ansi/keymap.c new file mode 100644 index 000000000000..ff1356e953f2 --- /dev/null +++ b/layouts/default/64_ansi/default_64_ansi/keymap.c @@ -0,0 +1,40 @@ +/* Copyright 2020 noroadsleft + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public 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_64_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_UP, MO(1), + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT + ), + [1] = LAYOUT_64_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_PSCR, KC_SLCK, KC_PAUS, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_PGUP, _______, + _______, _______, _______, _______, _______, MO(2), KC_HOME, KC_PGDN, KC_END + ), + [2] = LAYOUT_64_ansi( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______ + ) +}; diff --git a/layouts/default/64_ansi/info.json b/layouts/default/64_ansi/info.json new file mode 100644 index 000000000000..f30a94e3c222 --- /dev/null +++ b/layouts/default/64_ansi/info.json @@ -0,0 +1,81 @@ +{ + "keyboard_name": "60% 64-key ANSI Layout", + "url": "", + "maintainer": "qmk", + "width": 15, + "height": 5, + "layouts": { + "LAYOUT_64_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":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}, + {"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}, + {"x":12, "y":3}, + {"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/layouts/default/64_ansi/layout.json b/layouts/default/64_ansi/layout.json new file mode 100644 index 000000000000..6fc5bbe700fb --- /dev/null +++ b/layouts/default/64_ansi/layout.json @@ -0,0 +1,5 @@ +["","","","","","","","","","","","","",{w:2},""], +[{w:1.5},"","","","","","","","","","","","","",{w:1.5},""], +[{w:1.75},"","","","","","","","","","","","",{w:2.25},""], +[{w:2},"","","","","","","","","","","","","",""], +[{w:1.25},"",{w:1.25},"",{w:1.25},"",{w:6.25},"","","","","",""] diff --git a/layouts/default/64_ansi/readme.md b/layouts/default/64_ansi/readme.md new file mode 100644 index 000000000000..5fd079d49981 --- /dev/null +++ b/layouts/default/64_ansi/readme.md @@ -0,0 +1,14 @@ +# 64_ansi + + LAYOUT_64_ansi + ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ + │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ + │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤ + │ │ │ │ │ │ │ │ │ │ │ │ │ │ + ├──────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬───┬───┤ + │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + ├────┬──┴─┬─┴──┬┴───┴───┴───┴───┴───┴───┼───┼───┼───┼───┼───┤ + │ │ │ │ │ │ │ │ │ │ + └────┴────┴────┴────────────────────────┴───┴───┴───┴───┴───┘ diff --git a/layouts/default/64_iso/default_64_iso/keymap.c b/layouts/default/64_iso/default_64_iso/keymap.c new file mode 100644 index 000000000000..a0ac1a151153 --- /dev/null +++ b/layouts/default/64_iso/default_64_iso/keymap.c @@ -0,0 +1,40 @@ +/* Copyright 2020 noroadsleft + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public 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_64_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_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, + 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, MO(1), + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT + ), + [1] = LAYOUT_64_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_PSCR, KC_SLCK, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_PGUP, _______, + _______, _______, _______, _______, _______, MO(2), KC_HOME, KC_PGDN, KC_END + ), + [2] = LAYOUT_64_iso( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______ + ) +}; diff --git a/layouts/default/64_iso/info.json b/layouts/default/64_iso/info.json new file mode 100644 index 000000000000..cc27984837ad --- /dev/null +++ b/layouts/default/64_iso/info.json @@ -0,0 +1,82 @@ +{ + "keyboard_name": "60% \"64-key\" ISO Layout", + "url": "", + "maintainer": "qmk", + "width": 15, + "height": 5, + "layouts": { + "LAYOUT_64_iso": { + "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":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}, + {"x":13.75, "y":1, "w":1.25, "h":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}, + {"x":12, "y":3}, + {"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/layouts/default/64_iso/layout.json b/layouts/default/64_iso/layout.json new file mode 100644 index 000000000000..8754c4d946b7 --- /dev/null +++ b/layouts/default/64_iso/layout.json @@ -0,0 +1,5 @@ +["","","","","","","","","","","","","",{w:2},""], +[{w:1.5},"","","","","","","","","","","","","",{w:1.5,w2:1.25,h2:2,x2:0.25},""], +[{w:1.75},"","","","","","","","","","","","",""], +["","","","","","","","","","","","","","",""], +[{w:1.25},"",{w:1.25},"",{w:1.25},"",{w:6.25},"","","","","",""] diff --git a/layouts/default/64_iso/readme.md b/layouts/default/64_iso/readme.md new file mode 100644 index 000000000000..f487382f09b0 --- /dev/null +++ b/layouts/default/64_iso/readme.md @@ -0,0 +1,14 @@ +# 64_iso + + LAYOUT_64_iso + ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ + │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ + │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐ │ + │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + ├───┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬───┤ + │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + ├───┴┬──┴─┬─┴──┬┴───┴───┴───┴───┴───┴───┼───┼───┼───┼───┼───┤ + │ │ │ │ │ │ │ │ │ │ + └────┴────┴────┴────────────────────────┴───┴───┴───┴───┴───┘ diff --git a/layouts/default/readme.md b/layouts/default/readme.md new file mode 100644 index 000000000000..881b1ec5bdc6 --- /dev/null +++ b/layouts/default/readme.md @@ -0,0 +1,704 @@ +# Community Layouts + +## Summary of Layouts + +### 60% Form Factor + +``` +LAYOUT_60_abnt2 +┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐ │ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┤ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬──┴─┬────┤ +│ │ │ │ │ │ │ │ │ +└────┴────┴────┴────────────────────────┴────┴────┴────┴────┘ +``` + +``` +LAYOUT_60_ansi +┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ +├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────────┤ +│ │ │ │ │ │ │ │ │ │ │ │ │ +├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤ +│ │ │ │ │ │ │ │ │ +└────┴────┴────┴────────────────────────┴────┴────┴────┴────┘ +``` + +``` +LAYOUT_60_ansi_arrow +┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ +├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴┬───┬───┤ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ +├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴──┬┴──┬───┼───┼───┤ +│ │ │ │ │ │ │ │ │ │ +└────┴────┴────┴────────────────────────┴───┴───┴───┴───┴───┘ +``` + +``` +LAYOUT_60_ansi_split_bs_rshift +┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┤ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ +├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┬───┤ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ +├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬┴───┤ +│ │ │ │ │ │ │ │ │ +└────┴────┴────┴────────────────────────┴────┴────┴────┴────┘ +``` + +``` +LAYOUT_60_ansi_tsangan +┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ +├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────────┤ +│ │ │ │ │ │ │ │ │ │ │ │ │ +├─────┬──┴┬──┴──┬┴───┴───┴───┴───┴───┴───┴──┬┴───┴┬───┬─────┤ +│ │ │ │ │ │ │ │ +└─────┴───┴─────┴───────────────────────────┴─────┴───┴─────┘ +``` + +``` +LAYOUT_60_hhkb +┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┤ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ +├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┬───┤ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ +└─────┬──┴┬──┴──┬┴───┴───┴───┴───┴───┴───┴──┬┴───┴┬───┬─┴───┘ + │ │ │ │ │ │ + └───┴─────┴───────────────────────────┴─────┴───┘ +``` + +``` +LAYOUT_60_iso +┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐ │ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴────┤ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ +├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤ +│ │ │ │ │ │ │ │ │ +└────┴────┴────┴────────────────────────┴────┴────┴────┴────┘ +``` + +``` +LAYOUT_60_iso_split_bs_rshift +┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┤ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐ │ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴┬───┤ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬┴───┤ +│ │ │ │ │ │ │ │ │ +└────┴────┴────┴────────────────────────┴────┴────┴────┴────┘ +``` + +``` +LAYOUT_60_iso_tsangan +┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐ │ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴────┤ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ +├────┴┬──┴┬──┴──┬┴───┴───┴───┴───┴───┴───┴──┬┴───┴┬───┬─────┤ +│ │ │ │ │ │ │ │ +└─────┴───┴─────┴───────────────────────────┴─────┴───┴─────┘ +``` + +``` +LAYOUT_60_tsangan_hhkb +┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┤ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ +├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┬───┤ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ +├─────┬──┴┬──┴──┬┴───┴───┴───┴───┴───┴───┴──┬┴───┴┬───┬─┴───┤ +│ │ │ │ │ │ │ │ +└─────┴───┴─────┴───────────────────────────┴─────┴───┴─────┘ +``` + +``` +LAYOUT_64_ansi +┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ +├──────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬───┬───┤ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +├────┬──┴─┬─┴──┬┴───┴───┴───┴───┴───┴───┼───┼───┼───┼───┼───┤ +│ │ │ │ │ │ │ │ │ │ +└────┴────┴────┴────────────────────────┴───┴───┴───┴───┴───┘ +``` + +``` +LAYOUT_64_iso +┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐ │ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +├───┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬───┤ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +├───┴┬──┴─┬─┴──┬┴───┴───┴───┴───┴───┴───┼───┼───┼───┼───┼───┤ +│ │ │ │ │ │ │ │ │ │ +└────┴────┴────┴────────────────────────┴───┴───┴───┴───┴───┘ +``` + +### 65%+ Form Factor + +``` +LAYOUT_65_ansi +┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┬───┐ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┼───┤ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┼───┤ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┬───┼───┤ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴──┬┴──┬┴──┬───┼───┼───┤ +│ │ │ │ │ │ │ │ │ │ │ +└────┴────┴────┴────────────────────────┴───┴───┴───┴───┴───┴───┘ +``` + +``` +LAYOUT_65_ansi_blocker +┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┬───┐ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┼───┤ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┼───┤ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┬───┼───┤ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬─┬───┼───┼───┤ +│ │ │ │ │ │ │ │ │ │ │ +└────┴────┴────┴────────────────────────┴────┴────┘ └───┴───┴───┘ +``` + +``` +LAYOUT_65_ansi_blocker_split_bs +┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┼───┤ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┼───┤ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┬───┼───┤ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬─┬───┼───┼───┤ +│ │ │ │ │ │ │ │ │ │ │ +└────┴────┴────┴────────────────────────┴────┴────┘ └───┴───┴───┘ +``` + +``` +LAYOUT_65_ansi_blocker_tsangan +┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┬───┐ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┼───┤ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┼───┤ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┬───┼───┤ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +├─────┬──┴┬──┴──┬┴───┴───┴───┴───┴───┴───┴──┬┴───┴┬─┬───┼───┼───┤ +│ │ │ │ │ │ │ │ │ │ +└─────┴───┴─────┴───────────────────────────┴─────┘ └───┴───┴───┘ +``` + +``` +LAYOUT_65_iso +┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┬───┐ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┼───┤ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐ ├───┤ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴┬───┼───┤ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴──┬┴──┬┴──┬───┼───┼───┤ +│ │ │ │ │ │ │ │ │ │ │ +└────┴────┴────┴────────────────────────┴───┴───┴───┴───┴───┴───┘ +``` + +``` +LAYOUT_65_iso_blocker +┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┬───┐ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┼───┤ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐ ├───┤ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴┬───┼───┤ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬─┬───┼───┼───┤ +│ │ │ │ │ │ │ │ │ │ │ +└────┴────┴────┴────────────────────────┴────┴────┘ └───┴───┴───┘ +``` + +``` +LAYOUT_66_ansi +┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ ┌───┐ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ ├───┤ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤ └───┘ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ +├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴──────┬─┴─┐ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ +├────┬───┼───┴┬──┴───┴───┴───┴───┴───┴─┬─┴──┬┴───┼────┬───┼───┼───┐ +│ │ │ │ │ │ │ │ │ │ │ +└────┴───┴────┴────────────────────────┴────┴────┴────┴───┴───┴───┘ +``` + +``` +LAYOUT_66_iso +┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ ┌───┐ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ ├───┤ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐ │ └───┘ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴──┬─┴─┐ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +├────┼───┼───┴┬──┴───┴───┴───┴───┴───┴─┬─┴──┬┴───┼────┬───┼───┼───┐ +│ │ │ │ │ │ │ │ │ │ │ +└────┴───┴────┴────────────────────────┴────┴────┴────┴───┴───┴───┘ +``` + +``` +LAYOUT_68_ansi +┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐┌───┬───┐ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ ││ │ │ +├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤├───┼───┤ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ ││ │ │ +├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤└───┴───┘ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ +├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────────┤┌───┐ +│ │ │ │ │ │ │ │ │ │ │ │ ││ │ +├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬─┬──┴┼───┼───┐ +│ │ │ │ │ │ │ │ │ │ │ │ +└────┴────┴────┴────────────────────────┴────┴────┴────┘ └───┴───┴───┘ +``` + +``` +LAYOUT_68_iso +┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐┌───┬───┐ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ ││ │ │ +├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤├───┼───┤ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ ││ │ │ +├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐ │└───┴───┘ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴────┤┌───┐ +│ │ │ │ │ │ │ │ │ │ │ │ │ ││ │ +├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬─┬──┴┼───┼───┐ +│ │ │ │ │ │ │ │ │ │ │ │ +└────┴────┴────┴────────────────────────┴────┴────┴────┘ └───┴───┴───┘ +``` + +### 75% Form Factor + +``` +LAYOUT_75_ansi +┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +├───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┴───┼───┤ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┼───┤ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┼───┤ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┬───┼───┤ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴──┬┴──┬┴──┬───┼───┼───┤ +│ │ │ │ │ │ │ │ │ │ │ +└────┴────┴────┴────────────────────────┴───┴───┴───┴───┴───┴───┘ +``` + +``` +LAYOUT_75_iso +┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +├───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┴───┼───┤ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┼───┤ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐ ├───┤ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴┬───┼───┤ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴──┬┴──┬┴──┬───┼───┼───┤ +│ │ │ │ │ │ │ │ │ │ │ +└────┴────┴────┴────────────────────────┴───┴───┴───┴───┴───┴───┘ +``` + +### Tenkeyless Layouts + +``` +LAYOUT_tkl_ansi +┌───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┐ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +└───┘ └───┴───┴───┴───┘ └───┴───┴───┴───┘ └───┴───┴───┴───┘ └───┴───┴───┘ +┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ ┌───┬───┬───┐ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ ├───┼───┼───┤ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤ └───┴───┴───┘ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ +├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────────┤ ┌───┐ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤ ┌───┼───┼───┐ +│ │ │ │ │ │ │ │ │ │ │ │ │ +└────┴────┴────┴────────────────────────┴────┴────┴────┴────┘ └───┴───┴───┘ +``` + +``` +LAYOUT_tkl_iso +┌───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┐ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +└───┘ └───┴───┴───┴───┘ └───┴───┴───┴───┘ └───┴───┴───┴───┘ └───┴───┴───┘ +┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ ┌───┬───┬───┐ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ ├───┼───┼───┤ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐ │ └───┴───┴───┘ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴────┤ ┌───┐ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤ ┌───┼───┼───┐ +│ │ │ │ │ │ │ │ │ │ │ │ │ +└────┴────┴────┴────────────────────────┴────┴────┴────┴────┘ └───┴───┴───┘ +``` + +### Fullsize Form Factor + +``` +LAYOUT_fullsize_ansi +┌───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┐ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +└───┘ └───┴───┴───┴───┘ └───┴───┴───┴───┘ └───┴───┴───┴───┘ └───┴───┴───┘ +┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ ┌───┬───┬───┐ ┌───┬───┬───┬───┐ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ ├───┼───┼───┤ ├───┼───┼───┼───┤ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤ └───┴───┴───┘ ├───┼───┼───┤ │ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────────┤ ┌───┐ ├───┼───┼───┼───┤ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤ ┌───┼───┼───┐ ├───┴───┼───┤ │ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +└────┴────┴────┴────────────────────────┴────┴────┴────┴────┘ └───┴───┴───┘ └───────┴───┴───┘ +``` + +``` +LAYOUT_fullsize_iso +┌───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┐ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +└───┘ └───┴───┴───┴───┘ └───┴───┴───┴───┘ └───┴───┴───┴───┘ └───┴───┴───┘ +┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ ┌───┬───┬───┐ ┌───┬───┬───┬───┐ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ ├───┼───┼───┤ ├───┼───┼───┼───┤ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐ │ └───┴───┴───┘ ├───┼───┼───┤ │ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴────┤ ┌───┐ ├───┼───┼───┼───┤ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤ ┌───┼───┼───┐ ├───┴───┼───┤ │ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +└────┴────┴────┴────────────────────────┴────┴────┴────┴────┘ └───┴───┴───┘ └───────┴───┴───┘ +``` + + +### Split Layouts + +``` +LAYOUT_ergodox +┌─────┬───┬───┬───┬───┬───┬───┐ ┌───┬───┬───┬───┬───┬───┬─────┐ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +├─────┼───┼───┼───┼───┼───┼───┤ ├───┼───┼───┼───┼───┼───┼─────┤ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +├─────┼───┼───┼───┼───┼───┤ │ │ ├───┼───┼───┼───┼───┼─────┤ +│ │ │ │ │ │ ├───┤ ├───┤ │ │ │ │ │ │ +├─────┼───┼───┼───┼───┼───┤ │ │ ├───┼───┼───┼───┼───┼─────┤ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +└─┬───┼───┼───┼───┼───┼───┴───┘ └───┴───┼───┼───┼───┼───┼───┬─┘ + │ │ │ │ │ │ ┌───┬───┐ ┌───┬───┐ │ │ │ │ │ │ + └───┴───┴───┴───┴───┘ │ │ │ │ │ │ └───┴───┴───┴───┴───┘ + ┌───┼───┼───┤ ├───┼───┼───┐ + │ │ │ │ │ │ │ │ + │ │ ├───┤ ├───┤ │ │ + │ │ │ │ │ │ │ │ + └───┴───┴───┘ └───┴───┴───┘ +``` + +``` +LAYOUT_split_3x5_3 +┌───┬───┬───┬───┬───┐ ┌───┬───┬───┬───┬───┐ +│ │ │ │ │ │ │ │ │ │ │ │ +├───┼───┼───┼───┼───┤ ├───┼───┼───┼───┼───┤ +│ │ │ │ │ │ │ │ │ │ │ │ +├───┼───┼───┼───┼───┤ ├───┼───┼───┼───┼───┤ +│ │ │ │ │ │ │ │ │ │ │ │ +└───┴───┴───┴───┴───┘ └───┴───┴───┴───┴───┘ + ┌───┬───┬───┐ ┌───┬───┬───┐ + │ │ │ │ │ │ │ │ + └───┴───┴───┘ └───┴───┴───┘ +``` + +``` +LAYOUT_split_3x6_3 +┌───┬───┬───┬───┬───┬───┐ ┌───┬───┬───┬───┬───┬───┐ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ +├───┼───┼───┼───┼───┼───┤ ├───┼───┼───┼───┼───┼───┤ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ +├───┼───┼───┼───┼───┼───┤ ├───┼───┼───┼───┼───┼───┤ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ +└───┴───┴───┴───┴───┴───┘ └───┴───┴───┴───┴───┴───┘ + ┌───┬───┬───┐ ┌───┬───┬───┐ + │ │ │ │ │ │ │ │ + └───┴───┴───┘ └───┴───┴───┘ +``` + +### Numpads + +``` +LAYOUT_numpad_4x4 +┌───┬───┬───┬───┐ +│ │ │ │ │ +├───┼───┼───┤ │ +│ │ │ │ │ +├───┼───┼───┼───┤ +│ │ │ │ │ +├───┴───┼───┤ │ +│ │ │ │ +└───────┴───┴───┘ +``` + +``` +LAYOUT_numpad_5x4 +┌───┬───┬───┬───┐ +│ │ │ │ │ +├───┼───┼───┼───┤ +│ │ │ │ │ +├───┼───┼───┤ │ +│ │ │ │ │ +├───┼───┼───┼───┤ +│ │ │ │ │ +├───┴───┼───┤ │ +│ │ │ │ +└───────┴───┴───┘ +``` + +``` +LAYOUT_numpad_5x6 +┌───┬───┬───┬───┬───┬───┐ +│ │ │ │ │ │ │ +├───┼───┼───┼───┼───┼───┤ +│ │ │ │ │ │ │ +├───┼───┼───┼───┼───┤ │ +│ │ │ │ │ │ │ +├───┼───┼───┼───┼───┼───┤ +│ │ │ │ │ │ │ +├───┼───┼───┴───┼───┤ │ +│ │ │ │ │ │ +└───┴───┴───────┴───┴───┘ +``` + +``` +LAYOUT_numpad_6x4 +┌───┬───┬───┬───┐ +│ │ │ │ │ +├───┼───┼───┼───┤ +│ │ │ │ │ +├───┼───┼───┼───┤ +│ │ │ │ │ +├───┼───┼───┤ │ +│ │ │ │ │ +├───┼───┼───┼───┤ +│ │ │ │ │ +├───┴───┼───┤ │ +│ │ │ │ +└───────┴───┴───┘ +``` + +### Ortholinear Layouts + +``` +LAYOUT_ortho_3x10 +┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐ +│ │ │ │ │ │ │ │ │ │ │ +├───┼───┼───┼───┼───┼───┼───┼───┼───┼───┤ +│ │ │ │ │ │ │ │ │ │ │ +├───┼───┼───┼───┼───┼───┼───┼───┼───┼───┤ +│ │ │ │ │ │ │ │ │ │ │ +└───┴───┴───┴───┴───┴───┴───┴───┴───┴───┘ +``` + +``` +LAYOUT_ortho_4x10 +┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐ +│ │ │ │ │ │ │ │ │ │ │ +├───┼───┼───┼───┼───┼───┼───┼───┼───┼───┤ +│ │ │ │ │ │ │ │ │ │ │ +├───┼───┼───┼───┼───┼───┼───┼───┼───┼───┤ +│ │ │ │ │ │ │ │ │ │ │ +├───┼───┼───┼───┼───┼───┼───┼───┼───┼───┤ +│ │ │ │ │ │ │ │ │ │ │ +└───┴───┴───┴───┴───┴───┴───┴───┴───┴───┘ +``` + +``` +LAYOUT_ortho_4x12 +┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐ +│ │ │ │ │ │ │ │ │ │ │ │ │ +├───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┤ +│ │ │ │ │ │ │ │ │ │ │ │ │ +├───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┤ +│ │ │ │ │ │ │ │ │ │ │ │ │ +├───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┤ +│ │ │ │ │ │ │ │ │ │ │ │ │ +└───┴───┴───┴───┴───┴───┴───┴───┴───┴───┴───┴───┘ +``` + +``` +LAYOUT_ortho_4x4 +┌───┬───┬───┬───┐ +│ │ │ │ │ +├───┼───┼───┼───┤ +│ │ │ │ │ +├───┼───┼───┼───┤ +│ │ │ │ │ +├───┼───┼───┼───┤ +│ │ │ │ │ +└───┴───┴───┴───┘ +``` + +``` +LAYOUT_ortho_5x12 +┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐ +│ │ │ │ │ │ │ │ │ │ │ │ │ +├───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┤ +│ │ │ │ │ │ │ │ │ │ │ │ │ +├───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┤ +│ │ │ │ │ │ │ │ │ │ │ │ │ +├───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┤ +│ │ │ │ │ │ │ │ │ │ │ │ │ +├───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┤ +│ │ │ │ │ │ │ │ │ │ │ │ │ +└───┴───┴───┴───┴───┴───┴───┴───┴───┴───┴───┴───┘ +``` + +``` +LAYOUT_ortho_5x14 +┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +├───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┤ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +├───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┤ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +├───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┤ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +├───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┤ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +└───┴───┴───┴───┴───┴───┴───┴───┴───┴───┴───┴───┴───┴───┘ +``` + +``` +LAYOUT_ortho_5x15 +┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +├───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┤ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +├───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┤ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +├───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┤ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +├───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┤ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +└───┴───┴───┴───┴───┴───┴───┴───┴───┴───┴───┴───┴───┴───┴───┘ +``` + +``` +LAYOUT_ortho_5x4 +┌───┬───┬───┬───┐ +│ │ │ │ │ +├───┼───┼───┼───┤ +│ │ │ │ │ +├───┼───┼───┼───┤ +│ │ │ │ │ +├───┼───┼───┼───┤ +│ │ │ │ │ +├───┼───┼───┼───┤ +│ │ │ │ │ +└───┴───┴───┴───┘ +``` + +``` +LAYOUT_ortho_6x4 +┌───┬───┬───┬───┐ +│ │ │ │ │ +├───┼───┼───┼───┤ +│ │ │ │ │ +├───┼───┼───┼───┤ +│ │ │ │ │ +├───┼───┼───┼───┤ +│ │ │ │ │ +├───┼───┼───┼───┤ +│ │ │ │ │ +├───┼───┼───┼───┤ +│ │ │ │ │ +└───┴───┴───┴───┘ +``` + +``` +LAYOUT_planck_mit +┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐ +│ │ │ │ │ │ │ │ │ │ │ │ │ +├───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┤ +│ │ │ │ │ │ │ │ │ │ │ │ │ +├───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┤ +│ │ │ │ │ │ │ │ │ │ │ │ │ +├───┼───┼───┼───┼───┼───┴───┼───┼───┼───┼───┼───┤ +│ │ │ │ │ │ │ │ │ │ │ │ +└───┴───┴───┴───┴───┴───────┴───┴───┴───┴───┴───┘ +``` From 2f01c6ee188986cc21a6485c65f1a404761a704f Mon Sep 17 00:00:00 2001 From: Juno Nguyen Date: Fri, 2 Oct 2020 05:13:13 +0800 Subject: [PATCH 914/930] Update make rules for community/ortho_4x12/junonum (#10467) --- layouts/community/ortho_4x12/junonum/keymap.c | 7 +++---- layouts/community/ortho_4x12/junonum/rules.mk | 10 +++++++--- 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/layouts/community/ortho_4x12/junonum/keymap.c b/layouts/community/ortho_4x12/junonum/keymap.c index 619de0d782af..e5eab8848bf4 100644 --- a/layouts/community/ortho_4x12/junonum/keymap.c +++ b/layouts/community/ortho_4x12/junonum/keymap.c @@ -40,7 +40,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, CTRLTAB, 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 + _______, KC_LCTL, KC_LGUI, KC_LALT, LOWER, SPACEFN, SPACEFN, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT ), [_COLEMAK] = LAYOUT_ortho_4x12( @@ -65,7 +65,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), [_RAISE] = LAYOUT_ortho_4x12( - KC_GRV, _______, _______, KC_LBRC, KC_RBRC, _______, _______, KC_7, KC_8, KC_9, KC_0, _______, + 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 @@ -125,8 +125,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { float dpad_song_off[][2] = SONG(MAJOR_SOUND); #endif -// Disable LED on Rev6 -#ifdef KEYBOARD_planck_rev6 +#ifndef BACKLIGHT_ENABLE layer_state_t layer_state_set_user(layer_state_t state) { return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST); } diff --git a/layouts/community/ortho_4x12/junonum/rules.mk b/layouts/community/ortho_4x12/junonum/rules.mk index e206273f82eb..9f5d7e986252 100644 --- a/layouts/community/ortho_4x12/junonum/rules.mk +++ b/layouts/community/ortho_4x12/junonum/rules.mk @@ -1,9 +1,13 @@ SRC += muse.c -ifeq ($(strip $(KEYBOARD)), planck/rev6) - BACKLIGHT_ENABLE = no -else +ifeq ($(strip $(KEYBOARD)),$(filter $(strip $(KEYBOARD)), planck/rev2 planck/rev3 planck/rev4 planck/rev5)) BACKLIGHT_ENABLE = yes +else + BACKLIGHT_ENABLE = no +endif + +ifeq ($(strip $(KEYBOARD)), vitamins_included/rev1) + NKRO_ENABLE = no endif MIDI_ENABLE=no From f68bb0cc3dc6883681919e721da70aca14440026 Mon Sep 17 00:00:00 2001 From: Danilo de Klerk <966801+ddeklerk@users.noreply.github.com> Date: Thu, 1 Oct 2020 23:14:46 +0200 Subject: [PATCH 915/930] Add ddeklerk split_3x6_3 layout (#10470) --- .../community/split_3x6_3/ddeklerk/keymap.c | 78 +++++++++++++++++++ 1 file changed, 78 insertions(+) create mode 100644 layouts/community/split_3x6_3/ddeklerk/keymap.c diff --git a/layouts/community/split_3x6_3/ddeklerk/keymap.c b/layouts/community/split_3x6_3/ddeklerk/keymap.c new file mode 100644 index 000000000000..6ffc5732cf08 --- /dev/null +++ b/layouts/community/split_3x6_3/ddeklerk/keymap.c @@ -0,0 +1,78 @@ +/* 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 + +enum layers { + _BASE, + _GAME, + _FN1, + _FN2, + _FN3, + _ADJUST +}; + +#define BASE DF(_BASE) +#define GAME DF(_GAME) +#define FN1 LT(_FN1, KC_BSPC) +#define FN2 LT(_FN2, KC_ENT) +#define FN3SPC LT(_FN3, KC_SPC) + +#define CTRLESC MT(MOD_LCTL, KC_ESC) +#define CTRLMIN MT(MOD_RCTL, KC_MINS) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_BASE] = LAYOUT_split_3x6_3( + KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, XXXXXXX, + CTRLESC, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, CTRLMIN, + 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, FN1, FN3SPC, FN3SPC, FN2, KC_RALT + ), + [_GAME] = LAYOUT_split_3x6_3( + KC_3, KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_BSPC, + KC_2, CTRLESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_UP, KC_ENT, + KC_1, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_LEFT, KC_DOWN, KC_RGHT, + KC_LALT, _______, KC_SPC, _______, _______, _______ + ), + [_FN1] = LAYOUT_split_3x6_3( + 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_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_PIPE, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______ + ), + [_FN2] = LAYOUT_split_3x6_3( + KC_GRV, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_LCBR, KC_RCBR, KC_QUES, KC_PLUS, _______, + KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_LBRC, KC_RBRC, KC_SLSH, KC_EQL, KC_BSLS, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______ + ), + [_FN3] = LAYOUT_split_3x6_3( + _______, KC_MPRV, KC_MPLY, KC_MNXT, _______, _______, KC_INS, KC_HOME, KC_UP, KC_END, KC_BSPC, _______, + _______, _______, KC_VOLD, KC_VOLU, KC_MUTE, _______, KC_PGUP, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, + _______, KC_APP, _______, _______, _______, _______, KC_PGDN, KC_DEL, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______ + ), + [_ADJUST] = LAYOUT_split_3x6_3( + XXXXXXX, RESET, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, GAME, BASE, XXXXXXX, XXXXXXX, XXXXXXX, + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX + ) +}; + +layer_state_t layer_state_set_user(layer_state_t state) { + return update_tri_layer_state(state, _FN1, _FN2, _ADJUST); +}; From f63a60a72a9a91580430ca63e431c71f4c095a1f Mon Sep 17 00:00:00 2001 From: Jordan <47953030+jordandoan@users.noreply.github.com> Date: Thu, 1 Oct 2020 14:19:01 -0700 Subject: [PATCH 916/930] Port mechmini v2 for VIA support (#10497) Co-authored-by: Erovia --- keyboards/mechmini/config.h | 28 --------------------- keyboards/mechmini/v2/config.h | 2 +- keyboards/mechmini/v2/keymaps/via/keymap.c | 29 ++++++++++++++++++++++ keyboards/mechmini/v2/keymaps/via/rules.mk | 1 + 4 files changed, 31 insertions(+), 29 deletions(-) delete mode 100644 keyboards/mechmini/config.h create mode 100644 keyboards/mechmini/v2/keymaps/via/keymap.c create mode 100644 keyboards/mechmini/v2/keymaps/via/rules.mk diff --git a/keyboards/mechmini/config.h b/keyboards/mechmini/config.h deleted file mode 100644 index 98c9fb65103b..000000000000 --- a/keyboards/mechmini/config.h +++ /dev/null @@ -1,28 +0,0 @@ -/* Copyright 2017 Luiz Ribeiro - * Copyright 2018 TurboMech /u/TurboMech @A9entOran9e#6134 - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - *This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . -*/ - -#include "config_common.h" - -#ifndef CONFIG_H -#define CONFIG_H - -#define VENDOR_ID 0xFEED -#define PRODUCT_ID 0xCA40 -#define MANUFACTURER MECHKEYS -#define PRODUCT Mechmini -#define DESCRIPTION 40% modular keyboard - -#endif diff --git a/keyboards/mechmini/v2/config.h b/keyboards/mechmini/v2/config.h index 9da3e5f0ad6c..f20540b941b7 100755 --- a/keyboards/mechmini/v2/config.h +++ b/keyboards/mechmini/v2/config.h @@ -18,7 +18,7 @@ #include "config_common.h" /* USB Device descriptor parameter */ -#define VENDOR_ID 0xFEED +#define VENDOR_ID 0xAF99 #define PRODUCT_ID 0xCA40 #define DEVICE_VER 0x0002 #define MANUFACTURER MECHKEYS diff --git a/keyboards/mechmini/v2/keymaps/via/keymap.c b/keyboards/mechmini/v2/keymaps/via/keymap.c new file mode 100644 index 000000000000..7c7c2103c0e0 --- /dev/null +++ b/keyboards/mechmini/v2/keymaps/via/keymap.c @@ -0,0 +1,29 @@ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [0] = LAYOUT_ortho( + KC_GESC, 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_CAPS, 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( + 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_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_LBRC, KC_RBRC, KC_MINS, KC_EQL, KC_BSLS, KC_DEL, + KC_TRNS, KC_TRNS, KC_TRNS, M(1), M(1), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_END, 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), + + [2] = LAYOUT_ortho( + KC_PWR, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_TRNS, + KC_TRNS, BL_TOGG, BL_STEP, BL_INC, BL_DEC, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_DEL, + KC_TRNS, RGB_TOG, RGB_MOD, RGB_VAI, RGB_VAD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, KC_HOME, KC_END, KC_TRNS, + RESET, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MNXT, KC_PGDN, KC_PGUP, KC_MPLY), + + [3] = LAYOUT_ortho( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + 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/mechmini/v2/keymaps/via/rules.mk b/keyboards/mechmini/v2/keymaps/via/rules.mk new file mode 100644 index 000000000000..036bd6d1c3ec --- /dev/null +++ b/keyboards/mechmini/v2/keymaps/via/rules.mk @@ -0,0 +1 @@ +VIA_ENABLE = yes \ No newline at end of file From 0cb7133e0dafc71937fcf6a6e9e7fb7068d3cbcb Mon Sep 17 00:00:00 2001 From: nopunin10did Date: Thu, 1 Oct 2020 17:19:57 -0400 Subject: [PATCH 917/930] Doc followup 9942 (#10473) * Update feature_advanced_keycodes.md * Update mod_tap.md --- docs/feature_advanced_keycodes.md | 33 ++++++++++++++++------------- docs/mod_tap.md | 35 +++++++++++++++++-------------- 2 files changed, 37 insertions(+), 31 deletions(-) diff --git a/docs/feature_advanced_keycodes.md b/docs/feature_advanced_keycodes.md index b8664074a7c3..745308b29efc 100644 --- a/docs/feature_advanced_keycodes.md +++ b/docs/feature_advanced_keycodes.md @@ -2,21 +2,24 @@ These allow you to combine a modifier with a keycode. When pressed, the keydown event for the modifier, then `kc` will be sent. On release, the keyup event for `kc`, then the modifier will be sent. -|Key |Aliases |Description | -|----------|-------------------------------|----------------------------------------------------| -|`LCTL(kc)`|`C(kc)` |Hold Left Control and press `kc` | -|`LSFT(kc)`|`S(kc)` |Hold Left Shift and press `kc` | -|`LALT(kc)`|`A(kc)`, `LOPT(kc)` |Hold Left Alt and press `kc` | -|`LGUI(kc)`|`G(kc)`, `LCMD(kc)`, `LWIN(kc)`|Hold Left GUI and press `kc` | -|`RCTL(kc)`| |Hold Right Control and press `kc` | -|`RSFT(kc)`| |Hold Right Shift and press `kc` | -|`RALT(kc)`|`ROPT(kc)`, `ALGR(kc)` |Hold Right Alt and press `kc` | -|`RGUI(kc)`|`RCMD(kc)`, `LWIN(kc)` |Hold Right GUI and press `kc` | -|`SGUI(kc)`|`SCMD(kc)`, `SWIN(kc)` |Hold Left Shift and GUI and press `kc` | -|`LCA(kc)` | |Hold Left Control and Alt and press `kc` | -|`LCAG(kc)`| |Hold Left Control, Alt and GUI and press `kc` | -|`MEH(kc)` | |Hold Left Control, Shift and Alt and press `kc` | -|`HYPR(kc)`| |Hold Left Control, Shift, Alt and GUI and press `kc`| +|Key |Aliases |Description | +|----------|-------------------------------|------------------------------------------------------| +|`LCTL(kc)`|`C(kc)` |Hold Left Control and press `kc` | +|`LSFT(kc)`|`S(kc)` |Hold Left Shift and press `kc` | +|`LALT(kc)`|`A(kc)`, `LOPT(kc)` |Hold Left Alt and press `kc` | +|`LGUI(kc)`|`G(kc)`, `LCMD(kc)`, `LWIN(kc)`|Hold Left GUI and press `kc` | +|`RCTL(kc)`| |Hold Right Control and press `kc` | +|`RSFT(kc)`| |Hold Right Shift and press `kc` | +|`RALT(kc)`|`ROPT(kc)`, `ALGR(kc)` |Hold Right Alt and press `kc` | +|`RGUI(kc)`|`RCMD(kc)`, `LWIN(kc)` |Hold Right GUI and press `kc` | +|`SGUI(kc)`|`SCMD(kc)`, `SWIN(kc)` |Hold Left Shift and GUI and press `kc` | +|`LCA(kc)` | |Hold Left Control and Alt and press `kc` | +|`LSA(kc)` | |Hold Left Shift and Left Alt and press `kc` | +|`RSA(kc)` |`SAGR(kc)` |Hold Right Shift and Right Alt (AltGr) and press `kc` | +|`RCS(kc)` | |Hold Right Control and Right Shift and press `kc` | +|`LCAG(kc)`| |Hold Left Control, Alt and GUI and press `kc` | +|`MEH(kc)` | |Hold Left Control, Shift and Alt and press `kc` | +|`HYPR(kc)`| |Hold Left Control, Shift, Alt and GUI and press `kc` | You can also chain them, for example `LCTL(LALT(KC_DEL))` or `C(A(KC_DEL))` makes a key that sends Control+Alt+Delete with a single keypress. diff --git a/docs/mod_tap.md b/docs/mod_tap.md index ced0beba99d0..1217b47f9277 100644 --- a/docs/mod_tap.md +++ b/docs/mod_tap.md @@ -27,22 +27,25 @@ This key would activate Left Control and Left Shift when held, and send Escape w For convenience, QMK includes some Mod-Tap shortcuts to make common combinations more compact in your keymap: -|Key |Aliases |Description | -|------------|-----------------------------------------------------------------|-------------------------------------------------------| -|`LCTL_T(kc)`|`CTL_T(kc)` |Left Control when held, `kc` when tapped | -|`LSFT_T(kc)`|`SFT_T(kc)` |Left Shift when held, `kc` when tapped | -|`LALT_T(kc)`|`LOPT_T(kc)`, `ALT_T(kc)`, `OPT_T(kc)` |Left Alt when held, `kc` when tapped | -|`LGUI_T(kc)`|`LCMD_T(kc)`, `LWIN_T(kc)`, `GUI_T(kc)`, `CMD_T(kc)`, `WIN_T(kc)`|Left GUI when held, `kc` when tapped | -|`RCTL_T(kc)`| |Right Control when held, `kc` when tapped | -|`RSFT_T(kc)`| |Right Shift when held, `kc` when tapped | -|`RALT_T(kc)`|`ROPT_T(kc)`, `ALGR_T(kc)` |Right Alt when held, `kc` when tapped | -|`RGUI_T(kc)`|`RCMD_T(kc)`, `RWIN_T(kc)` |Right GUI when held, `kc` when tapped | -|`SGUI_T(kc)`|`SCMD_T(kc)`, `SWIN_T(kc)` |Left Shift and GUI when held, `kc` when tapped | -|`LCA_T(kc)` | |Left Control and Alt when held, `kc` when tapped | -|`LCAG_T(kc)`| |Left Control, Alt and GUI when held, `kc` when tapped | -|`RCAG_T(kc)`| |Right Control, Alt and GUI when held, `kc` when tapped | -|`C_S_T(kc)` | |Left Control and Shift when held, `kc` when tapped | -|`MEH_T(kc)` | |Left Control, Shift and Alt when held, `kc` when tapped| +|Key |Aliases |Description | +|------------|-----------------------------------------------------------------|--------------------------------------------------------------| +|`LCTL_T(kc)`|`CTL_T(kc)` |Left Control when held, `kc` when tapped | +|`LSFT_T(kc)`|`SFT_T(kc)` |Left Shift when held, `kc` when tapped | +|`LALT_T(kc)`|`LOPT_T(kc)`, `ALT_T(kc)`, `OPT_T(kc)` |Left Alt when held, `kc` when tapped | +|`LGUI_T(kc)`|`LCMD_T(kc)`, `LWIN_T(kc)`, `GUI_T(kc)`, `CMD_T(kc)`, `WIN_T(kc)`|Left GUI when held, `kc` when tapped | +|`RCTL_T(kc)`| |Right Control when held, `kc` when tapped | +|`RSFT_T(kc)`| |Right Shift when held, `kc` when tapped | +|`RALT_T(kc)`|`ROPT_T(kc)`, `ALGR_T(kc)` |Right Alt when held, `kc` when tapped | +|`RGUI_T(kc)`|`RCMD_T(kc)`, `RWIN_T(kc)` |Right GUI when held, `kc` when tapped | +|`SGUI_T(kc)`|`SCMD_T(kc)`, `SWIN_T(kc)` |Left Shift and GUI when held, `kc` when tapped | +|`LCA_T(kc)` | |Left Control and Alt when held, `kc` when tapped | +|`LSA_T(kc)` | |Left Shift and Alt when held, `kc` when tapped | +|`RSA_T(kc)` |`SAGR_T(kc)` |Right Shift and Right Alt (AltGr) when held, `kc` when tapped | +|`RCS_T(kc)` | |Right Control and Right Shift when held, `kc` when tapped | +|`LCAG_T(kc)`| |Left Control, Alt and GUI when held, `kc` when tapped | +|`RCAG_T(kc)`| |Right Control, Alt and GUI when held, `kc` when tapped | +|`C_S_T(kc)` | |Left Control and Shift when held, `kc` when tapped | +|`MEH_T(kc)` | |Left Control, Shift and Alt when held, `kc` when tapped | |`HYPR_T(kc)`|`ALL_T(kc)` |Left Control, Shift, Alt and GUI when held, `kc` when tapped - more info [here](http://brettterpstra.com/2012/12/08/a-useful-caps-lock-key/)| ## Caveats From 1d7e57ab853c3ee70ea287298b8e0f32ffe54072 Mon Sep 17 00:00:00 2001 From: James Young <18669334+noroadsleft@users.noreply.github.com> Date: Thu, 1 Oct 2020 15:00:03 -0700 Subject: [PATCH 918/930] BM60RGB ISO: update default keymap and layout macro (#10494) * BM60RGB ISO: fix and extend default keymap - correctly assigns the Non-US Backslash and Hash keys - adds Function and Navigation keys - use KC_GESC instead of KC_ESC to make Grave accent available * Update layout macro The layout is the ISO equivalent of QMK's `LAYOUT_60_ansi_arrow`. --- keyboards/bm60rgb_iso/bm60rgb_iso.h | 4 ++- .../bm60rgb_iso/keymaps/default/keymap.c | 25 +++++++++---------- 2 files changed, 15 insertions(+), 14 deletions(-) diff --git a/keyboards/bm60rgb_iso/bm60rgb_iso.h b/keyboards/bm60rgb_iso/bm60rgb_iso.h index f521610821cf..fce8925a7a65 100644 --- a/keyboards/bm60rgb_iso/bm60rgb_iso.h +++ b/keyboards/bm60rgb_iso/bm60rgb_iso.h @@ -17,7 +17,7 @@ #include "quantum.h" -#define LAYOUT( \ +#define LAYOUT_60_iso_arrow( \ 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, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, K1D, \ @@ -30,3 +30,5 @@ { K30, 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 }, \ } + +#define LAYOUT LAYOUT_60_iso_arrow diff --git a/keyboards/bm60rgb_iso/keymaps/default/keymap.c b/keyboards/bm60rgb_iso/keymaps/default/keymap.c index 1cf1804b28ca..9eca076df9b1 100644 --- a/keyboards/bm60rgb_iso/keymaps/default/keymap.c +++ b/keyboards/bm60rgb_iso/keymaps/default/keymap.c @@ -16,19 +16,18 @@ #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_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_BSLS, 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 + [0] = LAYOUT_60_iso_arrow( + 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_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_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, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______ + [1] = LAYOUT_60_iso_arrow( + 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, + _______, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_PGUP, _______, + _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_END ), - }; From 726499553c3ab0324274a66df63571a5a355d5df Mon Sep 17 00:00:00 2001 From: ridingqwerty Date: Thu, 1 Oct 2020 18:58:13 -0400 Subject: [PATCH 919/930] New keyboard: wsk/g4m3ralpha (#10431) * adding alpha variants * adding cajal layouts * adding V2 PCB support adding additional layouts for new PCB version, and correecting incorrect image in info file * Cleanup master -- remove alpha9 * Cleanup master -- remove g4m3ralpha * Cleanup master -- remove cajal & sl40 * Master cleanup -- re-add sl40 * Master cleanup -- correct SL40 image * Add new keyboard: wsk/g4m3ralpha * Added license attribution to .{c,h} files * Update keyboards/wsk/g4m3ralpha/config.h Co-authored-by: Joel Challis * Update keyboards/wsk/g4m3ralpha/rules.mk Co-authored-by: Joel Challis * Update keyboards/wsk/g4m3ralpha/g4m3ralpha.c Co-authored-by: Joel Challis * Update keyboards/wsk/g4m3ralpha/keymaps/default/keymap.c Co-authored-by: Joel Challis * Update keyboards/wsk/g4m3ralpha/config.h Co-authored-by: James Young <18669334+noroadsleft@users.noreply.github.com> * Update keyboards/wsk/g4m3ralpha/info.json Co-authored-by: James Young <18669334+noroadsleft@users.noreply.github.com> * Update keyboards/wsk/g4m3ralpha/rules.mk Co-authored-by: Ryan Co-authored-by: worldspawn00 Co-authored-by: Joel Challis Co-authored-by: James Young <18669334+noroadsleft@users.noreply.github.com> Co-authored-by: Ryan --- keyboards/wsk/g4m3ralpha/config.h | 56 +++++++++++++ keyboards/wsk/g4m3ralpha/g4m3ralpha.c | 39 +++++++++ keyboards/wsk/g4m3ralpha/g4m3ralpha.h | 32 ++++++++ keyboards/wsk/g4m3ralpha/info.json | 12 +++ .../wsk/g4m3ralpha/keymaps/default/keymap.c | 81 +++++++++++++++++++ keyboards/wsk/g4m3ralpha/readme.md | 19 +++++ keyboards/wsk/g4m3ralpha/rules.mk | 22 +++++ 7 files changed, 261 insertions(+) create mode 100644 keyboards/wsk/g4m3ralpha/config.h create mode 100644 keyboards/wsk/g4m3ralpha/g4m3ralpha.c create mode 100644 keyboards/wsk/g4m3ralpha/g4m3ralpha.h create mode 100644 keyboards/wsk/g4m3ralpha/info.json create mode 100644 keyboards/wsk/g4m3ralpha/keymaps/default/keymap.c create mode 100644 keyboards/wsk/g4m3ralpha/readme.md create mode 100644 keyboards/wsk/g4m3ralpha/rules.mk diff --git a/keyboards/wsk/g4m3ralpha/config.h b/keyboards/wsk/g4m3ralpha/config.h new file mode 100644 index 000000000000..071b6ac04fe0 --- /dev/null +++ b/keyboards/wsk/g4m3ralpha/config.h @@ -0,0 +1,56 @@ +/* Copyright 2020 Worldspawn + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License 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 0x5753 // "WS" - Worldspawn00 +#define PRODUCT_ID 0x56D9 +#define DEVICE_VER 0x0001 +#define MANUFACTURER Worldspawn00 +#define PRODUCT G4M3Ralpha + +/* key matrix size */ +#define MATRIX_ROWS 4 +#define MATRIX_COLS 10 + +/* key matrix pins */ +#define MATRIX_ROW_PINS { D4, B4, B5, D1 } +#define MATRIX_COL_PINS { D7, E6, C6, B6, B2, B3, B1, F7, F6, F5 } +#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 F4 +#ifdef RGB_DI_PIN +#define RGBLIGHT_ANIMATIONS +#define RGBLED_NUM 5 +#define RGBLIGHT_HUE_STEP 8 +#define RGBLIGHT_SAT_STEP 8 +#define RGBLIGHT_VAL_STEP 8 +#endif diff --git a/keyboards/wsk/g4m3ralpha/g4m3ralpha.c b/keyboards/wsk/g4m3ralpha/g4m3ralpha.c new file mode 100644 index 000000000000..66652e3ddcc0 --- /dev/null +++ b/keyboards/wsk/g4m3ralpha/g4m3ralpha.c @@ -0,0 +1,39 @@ +/* Copyright 2020 Worldspawn + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#include "g4m3ralpha.h" + + +void matrix_init_kb(void) { + setPinOutput(D3); + writePinLow(D3); + setPinOutput(D2); + writePinLow(D2); + setPinOutput(D0); + writePinLow(D0); + + matrix_init_user(); +}; + +bool led_update_kb(led_t led_state) { + bool res = led_update_user(led_state); + if(res) { + writePin(D3, led_state.num_lock); + writePin(D0, led_state.caps_lock); + writePin(D2, led_state.scroll_lock); + } + return res; +} diff --git a/keyboards/wsk/g4m3ralpha/g4m3ralpha.h b/keyboards/wsk/g4m3ralpha/g4m3ralpha.h new file mode 100644 index 000000000000..53da90f9e5de --- /dev/null +++ b/keyboards/wsk/g4m3ralpha/g4m3ralpha.h @@ -0,0 +1,32 @@ +/* Copyright 2020 Worldspawn + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License 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, \ + K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, \ + K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, \ + K30, K31, K32, K33, K35, K37, K38, K39 \ +) { \ + { K00, K01, K02, K03, K04, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO}, \ + { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19 }, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29 }, \ + { K30, K31, K32, K33, KC_NO, K35, KC_NO, K37, K38, K39 } \ +} + diff --git a/keyboards/wsk/g4m3ralpha/info.json b/keyboards/wsk/g4m3ralpha/info.json new file mode 100644 index 000000000000..c55bc0226243 --- /dev/null +++ b/keyboards/wsk/g4m3ralpha/info.json @@ -0,0 +1,12 @@ +{ + "keyboard_name": "G4M3R Alpha", + "url": "", + "maintainer": "Worldspawn00", + "width": 10, + "height": 4, + "layouts": { + "LAYOUT": { + "layout": [{"label":"!", "x":0.5, "y":0}, {"label":"@", "x":1.5, "y":0}, {"label":"#", "x":2.5, "y":0}, {"label":"$", "x":3.5, "y":0}, {"label":"%", "x":4.5, "y":0}, {"label":"Q", "x":0, "y":1}, {"label":"W", "x":1, "y":1}, {"label":"E", "x":2, "y":1}, {"label":"R", "x":3, "y":1}, {"label":"T", "x":4, "y":1}, {"label":"Y", "x":5, "y":1}, {"label":"U", "x":6, "y":1}, {"label":"I", "x":7, "y":1}, {"label":"O", "x":8, "y":1}, {"label":"P", "x":9, "y":1}, {"label":"A", "x":0, "y":2}, {"label":"S", "x":1, "y":2}, {"label":"D", "x":2, "y":2}, {"label":"F", "x":3, "y":2}, {"label":"G", "x":4, "y":2}, {"label":"H", "x":5, "y":2}, {"label":"J", "x":6, "y":2}, {"label":"K", "x":7, "y":2}, {"label":"L", "x":8, "y":2}, {"label":"Enter", "x":9, "y":2}, {"label":"Z", "x":0.5, "y":3}, {"label":"X", "x":1.5, "y":3}, {"label":"C", "x":2.5, "y":3}, {"label":"V", "x":3.5, "y":3}, {"x":4.5, "y":3, "w":2}, {"label":"B", "x":6.5, "y":3}, {"label":"N", "x":7.5, "y":3}, {"label":"M", "x":8.5, "y":3}] + } + } +} diff --git a/keyboards/wsk/g4m3ralpha/keymaps/default/keymap.c b/keyboards/wsk/g4m3ralpha/keymaps/default/keymap.c new file mode 100644 index 000000000000..54ff0f9df50e --- /dev/null +++ b/keyboards/wsk/g4m3ralpha/keymaps/default/keymap.c @@ -0,0 +1,81 @@ +/* Copyright 2020 Worldspawn + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public 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 g4m3ralpha_layers { + _HOME, + _FN, + _FNCHAR, + _FKEYS, +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_HOME] = LAYOUT( + KC_1, KC_2, KC_3, KC_4, KC_5, + 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, + LCTL_T(KC_Z), LALT_T(KC_X), LT(_FN, KC_C), LT(_FNCHAR, KC_V), LSFT_T(KC_SPC), RGUI_T(KC_B), RALT_T(KC_N), RCTL_T(KC_M) + ), + + [_FN] = LAYOUT( + KC_6, KC_7, KC_8, KC_9, KC_0, + KC_ESC, KC_MUTE, KC_VOLD, KC_VOLU, KC_MPLY, KC_HOME, KC_PGDN, KC_PGUP, KC_END, KC_NO, + KC_TAB, KC_NO, KC_NO, KC_NO, KC_NO, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_BSPC, + KC_LCTL, KC_LALT, KC_TRNS, MO(_FKEYS), LSFT_T(KC_SPC), KC_RGUI, KC_RALT, KC_RCTL + ), + + [_FNCHAR] = LAYOUT( + RGB_TOG, RGB_VAD, RGB_VAI, RGB_MOD, RGB_SPD, + KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, + KC_GRV, KC_NO, KC_MINS, KC_EQL, KC_BSLS, KC_LBRC, KC_RBRC, KC_SCLN, KC_QUOT, KC_BSPC, + KC_LCTL, KC_LALT, MO(_FKEYS), KC_TRNS, LSFT_T(KC_SPC), KC_COMM, KC_DOT, KC_SLSH + ), + + [_FKEYS] = LAYOUT( + RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_SPI, + KC_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_NO, KC_NO, KC_DEL, + KC_LCTL, KC_LALT, KC_TRNS, KC_TRNS, LSFT_T(KC_SPC), KC_RGUI, KC_RALT, KC_RCTL + ), +}; + +layer_state_t layer_state_set_user(layer_state_t state) { + switch (get_highest_layer(state)) { + case _FN: + writePinHigh(D3); + writePinLow(D2); + break; + case _FNCHAR: + writePinLow(D3); + writePinHigh(D2); + break; + case _FKEYS: + writePinHigh(D3); + writePinHigh(D2); + break; + default: // for any other layers, or the default layer + writePinLow(D3); + writePinLow(D2); + break; + } + return state; +} + +bool led_update_user(led_t led_state) { + writePin(D0, led_state.caps_lock); + return false; +} diff --git a/keyboards/wsk/g4m3ralpha/readme.md b/keyboards/wsk/g4m3ralpha/readme.md new file mode 100644 index 000000000000..ae4f0655f8bd --- /dev/null +++ b/keyboards/wsk/g4m3ralpha/readme.md @@ -0,0 +1,19 @@ +# G4M3R Alpha + +![Alpha](https://i.imgur.com/kETSyyg.png) + +A modification based on the 28-key, semi-ortho keyboard designed by PyroL. + +* Keyboard Maintainer: [Worldspawn00](https://www.github.com/Worldspawn00) +* Hardware Supported: G4M3R Alpha PCB, Pro Micro +* Hardware Availability: https://www.etsy.com/shop/WorldspawnsKeebs + +Make example for this keyboard (after setting up your build environment): + + make wsk/g4m3ralpha:default + +Flashing example for this keyboard: + + make wsk/g4m3ralpha:default:flash + +See [build environment setup](https://docs.qmk.fm/install-build-tools) then the [make instructions](https://docs.qmk.fm/faq/build-compile-qmk) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). diff --git a/keyboards/wsk/g4m3ralpha/rules.mk b/keyboards/wsk/g4m3ralpha/rules.mk new file mode 100644 index 000000000000..676a400f7d40 --- /dev/null +++ b/keyboards/wsk/g4m3ralpha/rules.mk @@ -0,0 +1,22 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +BOOTLOADER = caterina + +# 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 = no # Console for debug +COMMAND_ENABLE = no # Commands for debug and configuration +# 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 +BLUETOOTH_ENABLE = no # Enable Bluetooth +AUDIO_ENABLE = no # Audio output From 8070b1ba8862f1a98bafd0b0dc0889f7659ea456 Mon Sep 17 00:00:00 2001 From: yulei Date: Fri, 2 Oct 2020 07:07:14 +0800 Subject: [PATCH 920/930] Added replacement pcb for the matrix cain keyboard (#10436) * added replacement pcb for the matrix cain keyboard * update usb descriptor * fixed led polarity * Update keyboards/matrix/cain/cain.c Co-authored-by: Joel Challis * Update keyboards/matrix/cain/rules.mk Co-authored-by: Ryan * Apply suggestions from code review Co-authored-by: James Young <18669334+noroadsleft@users.noreply.github.com> * rename from cain to cain_re * Update keyboards/matrix/cain_re/readme.md Co-authored-by: James Young <18669334+noroadsleft@users.noreply.github.com> Co-authored-by: Joel Challis Co-authored-by: Ryan Co-authored-by: James Young <18669334+noroadsleft@users.noreply.github.com> --- keyboards/matrix/cain_re/cain_re.c | 40 +++++++++++++ keyboards/matrix/cain_re/cain_re.h | 40 +++++++++++++ keyboards/matrix/cain_re/config.h | 58 +++++++++++++++++++ keyboards/matrix/cain_re/info.json | 12 ++++ .../matrix/cain_re/keymaps/default/keymap.c | 40 +++++++++++++ keyboards/matrix/cain_re/readme.md | 15 +++++ keyboards/matrix/cain_re/rules.mk | 22 +++++++ 7 files changed, 227 insertions(+) create mode 100644 keyboards/matrix/cain_re/cain_re.c create mode 100644 keyboards/matrix/cain_re/cain_re.h create mode 100644 keyboards/matrix/cain_re/config.h create mode 100644 keyboards/matrix/cain_re/info.json create mode 100644 keyboards/matrix/cain_re/keymaps/default/keymap.c create mode 100644 keyboards/matrix/cain_re/readme.md create mode 100644 keyboards/matrix/cain_re/rules.mk diff --git a/keyboards/matrix/cain_re/cain_re.c b/keyboards/matrix/cain_re/cain_re.c new file mode 100644 index 000000000000..e8d0a2b8034c --- /dev/null +++ b/keyboards/matrix/cain_re/cain_re.c @@ -0,0 +1,40 @@ +/** + * cain_re.c + * + Copyright 2020 astro + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . + */ + +#include "cain_re.h" + +void matrix_init_kb(void) +{ + setPinOutput(NUM_PIN); + setPinOutput(CAPS_PIN); + setPinOutput(SCROLL_PIN); + + matrix_init_user(); +} + +bool led_update_kb(led_t led_state) +{ + bool res = led_update_user(led_state); + if (res) { + writePin(NUM_PIN, led_state.num_lock); + writePin(CAPS_PIN, led_state.caps_lock); + writePin(SCROLL_PIN, led_state.scroll_lock); + } + return res; +} diff --git a/keyboards/matrix/cain_re/cain_re.h b/keyboards/matrix/cain_re/cain_re.h new file mode 100644 index 000000000000..0228177e1138 --- /dev/null +++ b/keyboards/matrix/cain_re/cain_re.h @@ -0,0 +1,40 @@ +/** + * cain_re.h + * + Copyright 2020 astro + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License 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( \ + 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, k116, k117, k118, k119, k120, \ + k200, k201, k202, k203, k204, k205, k206, k207, k208, k209, k210, k211, k212, k213, k214, k215, k216, k217, k218, k219, k220, \ + k300, k301, k302, k303, k304, k305, k306, k307, k308, k309, k310, k311, k312, k313, k314, k315, k316, \ + k400, k401, k402, k403, k404, k405, k406, k407, k408, k409, k410, k411, k412, k413, k414, k415, k416, \ + k500, k501, k502, k503, k504, k505, k506, k507, k508, k509, k510, k511, k512, k513 \ +) { \ + { 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, k303, k304, k305, k306, k307, k308, k309, k310, k311}, \ + { k400, k401, k402, k403, k404, k405, k406, k407, k408, k409, k410, k411}, \ + { k012, k113, k112, k212, k213, k312, k412, k413, k414, k415, k316, k315}, \ + { k114, k115, k116, k117, k217, k216, k215, k214, k313, k314, k416, KC_NO}, \ + { k013, k014, k015, k120, k119, k118, k218, k219, k220, k511, k512, k513}, \ + { k500, k501, k502, k503, k504, k505, k506, k507, k508, k509, k510, KC_NO} \ +} diff --git a/keyboards/matrix/cain_re/config.h b/keyboards/matrix/cain_re/config.h new file mode 100644 index 000000000000..6bacf1c94996 --- /dev/null +++ b/keyboards/matrix/cain_re/config.h @@ -0,0 +1,58 @@ +/** + * config.h + * + Copyright 2020 astro + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License 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 0x4D58 // MX +#define PRODUCT_ID 0x0106 // cain +#define DEVICE_VER 0x0001 +#define MANUFACTURER Matrix LAB +#define PRODUCT Matrix Cain Keyboard + +/* key matrix size */ +#define MATRIX_ROWS 9 +#define MATRIX_COLS 12 + +/* key matrix pins */ +#define MATRIX_ROW_PINS { F0, C7, C6, D5, D2, D4, D7, B7, D1 } +#define MATRIX_COL_PINS { F1, F4, F5, F6, B5, B6, B3, B2, B1, D0, B4, D6} +#define UNUSED_PINS + +/* COL2ROW or ROW2COL */ +#define DIODE_DIRECTION COL2ROW + +#define RGB_DI_PIN E6 + +#ifdef RGB_DI_PIN +#define RGBLIGHT_ANIMATIONS + +#define RGBLED_NUM 14 +#define RGBLIGHT_HUE_STEP 8 +#define RGBLIGHT_SAT_STEP 8 +#define RGBLIGHT_VAL_STEP 8 +#define RGBLIGHT_SLEEP +#define RGBLIGHT_LED_MAP { 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 0, 1, 2, 3 } +#endif + +#define CAPS_PIN D3 +#define NUM_PIN F7 +#define SCROLL_PIN B0 diff --git a/keyboards/matrix/cain_re/info.json b/keyboards/matrix/cain_re/info.json new file mode 100644 index 000000000000..3f65b7de7799 --- /dev/null +++ b/keyboards/matrix/cain_re/info.json @@ -0,0 +1,12 @@ +{ + "keyboard_name": "Matrix Cain Keyboard", + "url": "", + "maintainer": "qmk", + "width": 23, + "height": 6.5, + "layouts": { + "LAYOUT_all": { + "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":"PrtSc", "x":20, "y":0}, {"label":"Scroll Lock", "x":21, "y":0}, {"label":"Pause", "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":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":"Backspace", "x":13, "y":1.5, "w":2}, {"label":"Num Lock", "x":15.5, "y":1.5}, {"label":"/", "x":16.5, "y":1.5}, {"label":"*", "x":17.5, "y":1.5}, {"label":"-", "x":18.5, "y":1.5}, {"label":"Insert", "x":20, "y":1.5}, {"label":"Home", "x":21, "y":1.5}, {"label":"PgUp", "x":22, "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":"|", "x":13.5, "y":2.5, "w":1.5}, {"label":"7", "x":15.5, "y":2.5}, {"label":"8", "x":16.5, "y":2.5}, {"label":"9", "x":17.5, "y":2.5}, {"label":"+", "x":18.5, "y":2.5}, {"label":"Delete", "x":20, "y":2.5}, {"label":"End", "x":21, "y":2.5}, {"label":"PgDn", "x":22, "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":"Enter", "x":12.75, "y":3.5, "w":2.25}, {"label":"4", "x":15.5, "y":3.5}, {"label":"5", "x":16.5, "y":3.5}, {"label":"6", "x":17.5, "y":3.5}, {"label":"+", "x":18.5, "y":3.5}, {"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":2.75}, {"label":"1", "x":15.5, "y":4.5}, {"label":"2", "x":16.5, "y":4.5}, {"label":"3", "x":17.5, "y":4.5}, {"label":"Enter", "x":18.5, "y":4.5}, {"label":"\u2191", "x":21, "y":4.5}, {"label":"Ctrl", "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}, {"label":"0", "x":15.5, "y":5.5}, {"label":"0", "x":16.5, "y":5.5}, {"label":".", "x":17.5, "y":5.5}, {"label":"Enter", "x":18.5, "y":5.5}, {"label":"\u2190", "x":20, "y":5.5}, {"label":"\u2193", "x":21, "y":5.5}, {"label":"\u2192", "x":22, "y":5.5}] + } + } +} diff --git a/keyboards/matrix/cain_re/keymaps/default/keymap.c b/keyboards/matrix/cain_re/keymaps/default/keymap.c new file mode 100644 index 000000000000..1f2d3b4e255b --- /dev/null +++ b/keyboards/matrix/cain_re/keymaps/default/keymap.c @@ -0,0 +1,40 @@ +/** + * keymap.c + * + Copyright 2020 astro + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public 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, LT(1,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_NLCK, KC_PSLS, KC_PAST, KC_PMNS, 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_P7, KC_P8, KC_P9, KC_PPLS, 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_P4, KC_P5, KC_P6, KC_PPLS, + 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_PENT, KC_UP, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), KC_RCTL, KC_P0, KC_P0, KC_PDOT, KC_PENT, KC_LEFT, KC_DOWN, KC_RGHT), + + [1]=LAYOUT_all( + KC_MUTE, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,_______,_______,_______,_______, _______, _______, + KC_NLCK, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, _______, _______, _______, _______, _______, _______,_______,_______,_______,_______, _______, _______, + RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,_______,_______,_______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,_______,_______,_______, KC_VOLU, + _______, _______, _______, KC_MPLY, _______, _______, _______, _______,_______,_______,_______, KC_MPRV, KC_VOLD, KC_MNXT), +}; diff --git a/keyboards/matrix/cain_re/readme.md b/keyboards/matrix/cain_re/readme.md new file mode 100644 index 000000000000..13c86ea54a1a --- /dev/null +++ b/keyboards/matrix/cain_re/readme.md @@ -0,0 +1,15 @@ +# Matrix Cain replacement PCB + +This was the replacement PCB for the Matrix Cain keyboard. + +This firmware **DOES NOT** support the original PCB shipped with the Cain keyboard. + +* Keyboard Maintainer: [astro](https://github.com/yulei) +* Hardware Supported: Matrix Cain keyboard +* Hardware Availability: Matrix Lab + +Make example for this keyboard (after setting up your build environment): + + make matrix/cain_re: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/matrix/cain_re/rules.mk b/keyboards/matrix/cain_re/rules.mk new file mode 100644 index 000000000000..9bbb324e7ca9 --- /dev/null +++ b/keyboards/matrix/cain_re/rules.mk @@ -0,0 +1,22 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +BOOTLOADER = atmel-dfu + +# 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 = no # Console for debug +COMMAND_ENABLE = no # Commands for debug and configuration +# 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 +BLUETOOTH_ENABLE = no # Enable Bluetooth +AUDIO_ENABLE = no # Audio output From 6888165b48b1d5e6dddd744cd6a42e0b326a0a81 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=BDan=20Pevec?= Date: Fri, 2 Oct 2020 01:17:57 +0200 Subject: [PATCH 921/930] Fixed some small things and replaced deprecated definitions (#10414) * Fixed some small things and replaced deprecated definitions * Improvements * Reverted kemyap change --- keyboards/dz60/keymaps/pevecyan/keymap.c | 14 ++-- keyboards/planck/keymaps/pevecyan/keymap.c | 76 +++++++++++++--------- 2 files changed, 51 insertions(+), 39 deletions(-) diff --git a/keyboards/dz60/keymaps/pevecyan/keymap.c b/keyboards/dz60/keymaps/pevecyan/keymap.c index 897b6260bad4..8ae4899ac82e 100644 --- a/keyboards/dz60/keymaps/pevecyan/keymap.c +++ b/keyboards/dz60/keymaps/pevecyan/keymap.c @@ -8,11 +8,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [0] = LAYOUT( \ - KC_GESC,SI_1, SI_2, SI_3, SI_4, SI_5, SI_6, SI_7, SI_8, SI_9, SI_0, SI_QOT, SI_PLUS,XXXXXXX,KC_BSPC, \ - KC_TAB, SI_Q, SI_W, SI_E, SI_R, SI_T, SI_Z, SI_U, SI_I, SI_O, SI_P, SI_GRV, SI_TILD,CARON, \ - MO(2), SI_A, SI_S, SI_D, SI_F, SI_G, SI_H, SI_J, SI_K, SI_L, KC_SCLN,KC_QUOT,KC_ENT, \ + KC_GESC,SI_1, SI_2, SI_3, SI_4, SI_5, SI_6, SI_7, SI_8, SI_9, SI_0, SI_QUOT, SI_PLUS,XXXXXXX,KC_BSPC, \ + KC_TAB, SI_Q, SI_W, SI_E, SI_R, SI_T, SI_Z, SI_U, SI_I, SI_O, SI_P, SI_GRV, SI_TILD,CARON, \ + MO(2), SI_A, SI_S, SI_D, SI_F, SI_G, SI_H, SI_J, SI_K, SI_L, KC_SCLN, KC_QUOT,KC_ENT, \ KC_LSFT,XXXXXXX,SI_Y, SI_X, SI_C, SI_V, SI_B, SI_N, SI_M, SI_COMM,SI_DOT, SI_MINS, KC_RSFT,XXXXXXX, \ - KC_LCTL,KC_LGUI, KC_LALT,KC_SPC, KC_SPC, KC_SPC, KC_RALT,MO(3), XXXXXXX,MO(1), KC_F5 \ + KC_LCTL,KC_LGUI, KC_LALT,KC_SPC, KC_SPC, KC_SPC, KC_RALT,MO(3), XXXXXXX,MO(1), KC_F5 \ ), [1] = LAYOUT( \ @@ -33,9 +33,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [3] = LAYOUT( \ _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, \ - _______, _______,_______,_______,_______,_______,SI_ZV, _______,_______,_______,_______,_______,_______,_______, \ - _______, _______,SI_SV, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______, \ - _______,_______,_______,_______,SI_CV, _______,_______,_______,_______,_______,_______,_______, _______,_______, \ + _______, _______,_______,_______,_______,_______,SI_ZCAR,_______,_______,_______,_______,_______,_______,_______, \ + _______, _______,SI_SCAR, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______, \ + _______,_______,_______,_______,SI_CCAR, _______,_______,_______,_______,_______,_______,_______, _______,_______, \ _______,_______, _______,_______, _______, _______, _______,_______,_______,_______,_______ \ ), }; diff --git a/keyboards/planck/keymaps/pevecyan/keymap.c b/keyboards/planck/keymaps/pevecyan/keymap.c index 57f9f0e7f9c9..d2a0c8515908 100644 --- a/keyboards/planck/keymaps/pevecyan/keymap.c +++ b/keyboards/planck/keymaps/pevecyan/keymap.c @@ -44,7 +44,7 @@ enum planck_keycodes { #define CAPS MO(_CAPS) #define ALTGR MO(_ALTGR) #define MEMA MO(_MEMA) -#define CARON LT(_CARON, SI_QOT) +#define CARON LT(_CARON, SI_QUOT) const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { @@ -52,56 +52,57 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * ,-----------------------------------------------------------------------------------. * | Tab | Q | W | E | R | T | Z | U | I | O | P | Bksp | * |------+------+------+------+------+-------------+------+------+------+------+------| - * | CAPS | A | S | D | F | G | H | J | K | L | ; | " | + * | CAPS | A | S | D | F | G | H | J | K | L |CARON |Enter | * |------+------+------+------+------+------|------+------+------+------+------+------| - * | Shift| Y | X | C | V | B | N | M | , | . | / |Enter | + * | Shift| Y | X | C | V | B | N | M | , | . | / |Shift | * |------+------+------+------+------+------+------+------+------+------+------+------| - * | Ctrl | GUI | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | + * | Ctrl | GUI | Alt | GUI |LOWER | Space |RAISE | ALTGR| MEMA | F12 | F5 | * `-----------------------------------------------------------------------------------' */ [_QWERTY] = LAYOUT_planck_grid( KC_TAB, SI_Q, SI_W, SI_E, SI_R, SI_T, SI_Z, SI_U, SI_I, SI_O, SI_P, KC_BSPC, CAPS, SI_A, SI_S, SI_D, SI_F, SI_G, SI_H, SI_J, SI_K, SI_L, CARON, KC_ENT, - KC_LSFT, SI_Y, SI_X, SI_C, SI_V, SI_B, SI_N, SI_M, SI_COMM, SI_DOT, SI_MINS, KC_RSFT , - KC_LCTL, KC_LALT, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, ALTGR, MEMA, KC_F12, KC_F5 + KC_LSFT, SI_Y, SI_X, SI_C, SI_V, SI_B, SI_N, SI_M, SI_COMM, SI_DOT, SI_MINS, KC_RSFT, + KC_LCTL, KC_LALT, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, ALTGR, MEMA, KC_F12, KC_F5 ), /* Lower * ,-----------------------------------------------------------------------------------. * | ~ | ! | " | # | $ | % | & | / | ( | ) | = | Bksp | * |------+------+------+------+------+-------------+------+------+------+------+------| - * | Del | F1 | F2 | F3 | F4 | F5 | F6 | _ | + | { | } | | | + * | | F1 | F2 | F3 | F4 | F5 | F6 | ? | * | ` | + | | * |------+------+------+------+------+------|------+------+------+------+------+------| - * | | F7 | F8 | F9 | F10 | F11 | F12 |ISO ~ |ISO | | Home | End | | + * | | F7 | F8 | F9 | F10 | F11 | F12 | | < | > | | | * |------+------+------+------+------+------+------+------+------+------+------+------| - * | | | | | | | | Next | Vol- | Vol+ | Play | + * | | | | | | | | | | | | * `-----------------------------------------------------------------------------------' */ [_LOWER] = LAYOUT_planck_grid( - SI_TILD, SI_EXLM, SI_DQOT, KC_HASH, SI_DLR, SI_PERC, SI_AMPR, SI_SLSH, SI_LPRN, SI_RPRN, SI_EQL, _______, - KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_MINS, KC_PPLS, KC_ENT, - _______, 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 -), + SI_TILD, SI_EXLM, SI_DQUO, KC_HASH, SI_DLR, SI_PERC, SI_AMPR, SI_SLSH, SI_LPRN, SI_RPRN, SI_EQL, _______, + _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, SI_QUES, SI_ASTR, SI_GRV, SI_PLUS, _______, + _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, SI_LABK, SI_RABK, KC_END, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ +), /* Raise * ,-----------------------------------------------------------------------------------. * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | * |------+------+------+------+------+-------------+------+------+------+------+------| - * | Del | F1 | F2 | F3 | F4 | F5 | F6 | - | = | [ | ] | \ | + * | Del | | | | | | | - | = | [ | ] | \ | * |------+------+------+------+------+------|------+------+------+------+------+------| - * | | F7 | F8 | F9 | F10 | F11 | F12 |ISO # |ISO / |Pg Up |Pg Dn | | + * | | | | | | | |ISO # |ISO / |Pg Up |Pg Dn | | * |------+------+------+------+------+------+------+------+------+------+------+------| * | | | | | | | | 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_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 + _______, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ ), + /* Adjust (Lower + Raise) * ,-----------------------------------------------------------------------------------. * | | Reset| | | | | | | | | | Del | @@ -120,18 +121,29 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ ), -[_ALTGR] = LAYOUT_planck_grid( - _______, ALTG(KC_Q), ALTG(KC_W), ALTG(KC_E), _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, ALTG(KC_F), ALTG(KC_G), _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, ALTG(KC_V), ALTG(KC_B), ALTG(KC_N), _______, ALTG(KC_COMM), ALTG(KC_DOT), _______, _______ , - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ +/* Altgr <> + * ,-----------------------------------------------------------------------------------. + * | | \ | | | € | | | | | | | | | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | | | | [ | ] | | | | | | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | | | | @ | { | } | | < | > | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | + * `-----------------------------------------------------------------------------------' + */ +[_ALTGR] = LAYOUT_planck_grid(k + _______, SI_BSLS, SI_PIPE, SI_EURO, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, SI_LBRC, SI_RBRC, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, SI_AT, SI_LCBR, SI_RCBR, _______, SI_LABK, SI_RABK, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ ), [_CAPS] = LAYOUT_planck_grid( - KC_ESC , KC_BSPC, KC_UP , KC_DEL , _______, _______, _______, _______, _______, _______, _______, KC_DEL , - _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + KC_ESC , KC_BSPC, KC_UP , KC_DEL , _______, _______, _______, _______, _______, KC_HOME, KC_END, KC_DEL , + _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, _______, _______, _______, LCTL(KC_LEFT), LCTL(KC_RIGHT), _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ ), [_MEMA] = LAYOUT_planck_grid( @@ -142,9 +154,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), [_CARON] = LAYOUT_planck_grid( - _______, _______, _______, _______, _______, _______, SI_ZV , _______, _______, _______, _______, _______, - _______, _______, SI_SV, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, SI_CV, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, SI_ZCAR , _______, _______, _______, _______, _______, + _______, _______, SI_SCAR, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, SI_CCAR, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ ), From 1e5df7117d9fe4da459cde53e7288f7f25ee988c Mon Sep 17 00:00:00 2001 From: Peter Peterson Date: Thu, 1 Oct 2020 17:13:34 -0700 Subject: [PATCH 922/930] [keyboard] add BM60Poker support (#10475) * WIP working on new keymap * tweaking keymap * updated keymap * cleaned up a little bit * New preonic keymap * my preonic keymap * added mac layout * preonic map update * cleaning up old repo * cleaning up to match upstream * more cleanup * removing old keymaps * Added BM60 Poker * Apply suggestions from code review * Added license * updated license * updated license * Fixed remaining licenses and added layout to rules --- keyboards/bm60poker/bm60poker.c | 52 +++++++ keyboards/bm60poker/bm60poker.h | 32 ++++ keyboards/bm60poker/config.h | 70 +++++++++ keyboards/bm60poker/info.json | 74 +++++++++ keyboards/bm60poker/keymaps/default/keymap.c | 34 +++++ .../bm60poker/keymaps/ipetepete/keymap.c | 144 ++++++++++++++++++ .../bm60poker/keymaps/ipetepete/readme.md | 1 + .../bm60poker/keymaps/ipetepete/rules.mk | 1 + keyboards/bm60poker/readme.md | 15 ++ keyboards/bm60poker/rules.mk | 24 +++ 10 files changed, 447 insertions(+) create mode 100644 keyboards/bm60poker/bm60poker.c create mode 100644 keyboards/bm60poker/bm60poker.h create mode 100644 keyboards/bm60poker/config.h create mode 100644 keyboards/bm60poker/info.json create mode 100644 keyboards/bm60poker/keymaps/default/keymap.c create mode 100644 keyboards/bm60poker/keymaps/ipetepete/keymap.c create mode 100644 keyboards/bm60poker/keymaps/ipetepete/readme.md create mode 100644 keyboards/bm60poker/keymaps/ipetepete/rules.mk create mode 100644 keyboards/bm60poker/readme.md create mode 100644 keyboards/bm60poker/rules.mk diff --git a/keyboards/bm60poker/bm60poker.c b/keyboards/bm60poker/bm60poker.c new file mode 100644 index 000000000000..a7a335209754 --- /dev/null +++ b/keyboards/bm60poker/bm60poker.c @@ -0,0 +1,52 @@ +/* Copyright 2020 ipetepete + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#include "bm60poker.h" + +#ifdef RGB_MATRIX_ENABLE +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, NO_LED, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40 }, + { NO_LED, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, NO_LED, 52 }, + { 53, 54, 55, NO_LED, NO_LED, NO_LED, 56, NO_LED, NO_LED, 57, 58, NO_LED, 59, 60 } +}, { + // 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 }, + // Ctrl, GUI, Alt, Space, RAlt, FN, Left, Down, Right + { 3, 64 }, { 22, 64 }, { 33, 64 }, { 101, 64 }, { 135, 64 }, { 153, 64 }, { 210, 64 }, { 225, 64 }, + // UNDERGLOW + { 216, 32 }, { 180, 32 }, { 144, 32 }, { 108, 32 }, { 72, 32 }, { 36, 32 } +}, { + // 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, + // Ctrl, GUI, Alt, Space, RAlt, FN, Left, Down, Right + 1, 1, 1, 4, 1, 1, 1, 1, + // UNDERGLOW + 2, 2, 2, 2, 2, 2 +} }; +#endif diff --git a/keyboards/bm60poker/bm60poker.h b/keyboards/bm60poker/bm60poker.h new file mode 100644 index 000000000000..02a28377e625 --- /dev/null +++ b/keyboards/bm60poker/bm60poker.h @@ -0,0 +1,32 @@ +/* Copyright 2020 ipetepete + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License 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, 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, K3D, \ + K40, K41, K42, K46, K49, K4A, 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, KC_NO, K3D }, \ + { K40, K41, K42, KC_NO, KC_NO, KC_NO, K46, KC_NO, KC_NO, K49, K4A, KC_NO, K4C, K4D }, \ +} diff --git a/keyboards/bm60poker/config.h b/keyboards/bm60poker/config.h new file mode 100644 index 000000000000..5eb4ad2a77dd --- /dev/null +++ b/keyboards/bm60poker/config.h @@ -0,0 +1,70 @@ +/* +Copyright 2020 ipetepete + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License 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 0x4B50 // "KP" +#define PRODUCT_ID 0xEF8E +#define DEVICE_VER 0x0001 +#define MANUFACTURER KP Republic +#define PRODUCT BM60POKER + +/* 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 { 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 67 +#ifdef RGB_DI_PIN + #define RGBLED_NUM 67 + #define RGB_MATRIX_KEYPRESSES + #define RGBLIGHT_HUE_STEP 8 + #define RGBLIGHT_SAT_STEP 8 + #define RGBLIGHT_VAL_STEP 8 + #define RGBLIGHT_LIMIT_VAL 5 /* 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 diff --git a/keyboards/bm60poker/info.json b/keyboards/bm60poker/info.json new file mode 100644 index 000000000000..d2e13ca46de2 --- /dev/null +++ b/keyboards/bm60poker/info.json @@ -0,0 +1,74 @@ +{ + "keyboard_name": "BM60POKER", + "url": "", + "maintainer": "qmk", + "width": 15, + "height": 5, + "layouts": { + "LAYOUT_60_ansi": { + "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}, + {"label":"K3D (B3,F7)", "x":12.25, "y":3, "w":2.75}, + {"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, "w":1.25}, + {"label":"K4A (E6,B6)", "x":11.25, "y":4, "w":1.25}, + {"label":"K4C (E6,C7)", "x":12.5, "y":4, "w":1.25}, + {"label":"K4D (E6,F7)", "x":13.75, "y":4, "w":1.25} + ] + } + } +} diff --git a/keyboards/bm60poker/keymaps/default/keymap.c b/keyboards/bm60poker/keymaps/default/keymap.c new file mode 100644 index 000000000000..efd74ad134fc --- /dev/null +++ b/keyboards/bm60poker/keymaps/default/keymap.c @@ -0,0 +1,34 @@ +/* Copyright 2020 ipetepete + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public 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( + 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, + _______, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______ + ), + +}; diff --git a/keyboards/bm60poker/keymaps/ipetepete/keymap.c b/keyboards/bm60poker/keymaps/ipetepete/keymap.c new file mode 100644 index 000000000000..e59660242ed5 --- /dev/null +++ b/keyboards/bm60poker/keymaps/ipetepete/keymap.c @@ -0,0 +1,144 @@ +/* Copyright 2020 ipetepete + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public 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, +_gamer, +_colemak, +_fn, +_rgb, +_spcfn +}; + + +enum keycodes { +gamer = SAFE_RANGE, +qwerty, +colemak +}; + +#define KC_SPFN LT(_spcfn, KC_SPC) // press for space, hold for function layer (aka spacefn) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_qwerty] = 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, + 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_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_SPFN, KC_RALT, KC_RCTL, MO(_fn), MO(_rgb) + ), + // Gamer standard qwerty layout but with normal space for jumping etc + [_gamer] = LAYOUT_60_ansi( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, KC_SPACE, _______, _______, _______, _______ + ), + [_colemak] = LAYOUT_60_ansi( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, 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, KC_O, KC_QUOT, _______, + _______, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, _______, _______, _______, _______, + _______, _______, _______, KC_SPFN, _______, _______, _______, _______ + ), + [_fn] = 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_MPLY, KC_VOLD, KC_VOLU, KC_MUTE, _______, _______, NK_TOGG, _______, _______, KC_END, KC_PGDN, KC_MNXT, + qwerty, colemak, gamer, _______, _______, _______, _______, _______ + ), + [_rgb] = 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, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______ + ), + [_spcfn] = LAYOUT_60_ansi( + _______, SGUI(1), SGUI(2), SGUI(3), SGUI(4), SGUI(5), SGUI(6), SGUI(7), SGUI(8), SGUI(9), SGUI(0), _______, _______, KC_DEL, + _______, _______, _______, KC_PGUP, _______, KC_LBRC, KC_RBRC, _______, KC_UP, _______, _______, _______, _______, _______, + KC_CAPS, _______, _______, KC_PGDN, _______, KC_LCBR, KC_RCBR, KC_LEFT, KC_DOWN, KC_RIGHT, _______, _______, _______, + _______, _______, _______, _______, _______, KC_LPRN, KC_RPRN, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______ + ) +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case qwerty: + if (record->event.pressed) { + layer_clear(); + layer_on(_qwerty); + set_single_persistent_default_layer(_qwerty); + } + return false; + break; + case colemak: + if (record->event.pressed) { + layer_clear(); + layer_on(_colemak); + } + return false; + break; + case gamer: + if (record->event.pressed) { + layer_clear(); + layer_on(_gamer); + } + return false; + break; + + } + return true; +} + +void rgb_matrix_layer_helper (uint8_t red, uint8_t green, uint8_t blue) { + for (int i = 0; i < DRIVER_LED_TOTAL; i++) { + if (HAS_FLAGS(g_led_config.flags[i], LED_FLAG_MODIFIER)) { + rgb_matrix_set_color( i, red, green, blue ); + } + } +} + + +void rgb_matrix_indicators_kb(void) +{ + if (!g_suspend_state && rgb_matrix_config.enable) { + switch (get_highest_layer(layer_state)) { + //case _qwerty: + // rgb_matrix_set_color(26, 0xFF, 0x00, 0x00); + // break; + case _colemak: + rgb_matrix_set_color(55, 0xFF, 0xFF, 0xFF); + break; + case _spcfn: + rgb_matrix_set_color(22, 0xFF, 0x00, 0x00); + rgb_matrix_set_color(35, 0xFF, 0x00, 0x00); + rgb_matrix_set_color(36, 0xFF, 0x00, 0x00); + rgb_matrix_set_color(37, 0xFF, 0x00, 0x00); + break; + case _gamer: + rgb_matrix_set_color(16, 0xFF, 0x00, 0xFF); + rgb_matrix_set_color(29, 0xFF, 0x00, 0xFF); + rgb_matrix_set_color(30, 0xFF, 0x00, 0xFF); + rgb_matrix_set_color(31, 0xFF, 0x00, 0xFF); + break; + } + } +} diff --git a/keyboards/bm60poker/keymaps/ipetepete/readme.md b/keyboards/bm60poker/keymaps/ipetepete/readme.md new file mode 100644 index 000000000000..7d381ff125ba --- /dev/null +++ b/keyboards/bm60poker/keymaps/ipetepete/readme.md @@ -0,0 +1 @@ +# Simple 60% for coding diff --git a/keyboards/bm60poker/keymaps/ipetepete/rules.mk b/keyboards/bm60poker/keymaps/ipetepete/rules.mk new file mode 100644 index 000000000000..3a025ba3a393 --- /dev/null +++ b/keyboards/bm60poker/keymaps/ipetepete/rules.mk @@ -0,0 +1 @@ +NKRO_ENABLE = yes # USB Nkey Rollover diff --git a/keyboards/bm60poker/readme.md b/keyboards/bm60poker/readme.md new file mode 100644 index 000000000000..62dde405c469 --- /dev/null +++ b/keyboards/bm60poker/readme.md @@ -0,0 +1,15 @@ +# BM60 Poker 60% Mechanical Keyboard RGB PCB + +A 60% hotswap inswitch RGB (north facing) keyboard from KP Republic. + +* Keyboard Maintainer: [ipetepete](https://github.com/ipetepete) +* Hardware Supported: BM60 POKER RGB +* Hardware Availability: [KP Republic](https://kprepublic.com/products/bm60-rgb-poker-60-gh60-hot-swap-custom-mechanical-keyboard-pcb-program-qmk-underglow-type-c) + +Make example for this keyboard (after setting up your build environment): + + make bm60poker: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). + +Video tutorials for customizing the layout: [QMK Tutorials](https://www.youtube.com/playlist?list=PLZlceRZZjRugJFL-vnenYnDrbMc6wu_e_) - By MechMerlin diff --git a/keyboards/bm60poker/rules.mk b/keyboards/bm60poker/rules.mk new file mode 100644 index 000000000000..3f4a00ead5f9 --- /dev/null +++ b/keyboards/bm60poker/rules.mk @@ -0,0 +1,24 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +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 = no # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +BLUETOOTH_ENABLE = no # Enable Bluetooth +AUDIO_ENABLE = no # Audio output +RGB_MATRIX_ENABLE = WS2812 +LAYOUTS = 60_ansi From 6e9b4a83091968ea81942648f24670c03cdf06e3 Mon Sep 17 00:00:00 2001 From: Nic Lake Date: Fri, 2 Oct 2020 00:42:23 -0500 Subject: [PATCH 923/930] [Keymap] niclake keymap for Boardwalk (#10488) * Initializing Boardwalk layout * rules.mk newline * config.h newline * qwerty num toggle -> tap-toggle * errant K, and _LOWER momentary toggles * Lack of autosave sucks * Converting to HHKB layout * TT(_NUM) added to num layer * Final updates for Boardwalk initialization * Final refinements * newline * Removal of extra includes * Update keyboards/boardwalk/keymaps/niclake/config.h #pragma once * Removing comment block from rules * Updates to my layout --- keyboards/boardwalk/keymaps/niclake/config.h | 18 +++ keyboards/boardwalk/keymaps/niclake/keymap.c | 150 ++++++++++++++++++ keyboards/boardwalk/keymaps/niclake/readme.md | 8 + keyboards/boardwalk/keymaps/niclake/rules.mk | 3 + 4 files changed, 179 insertions(+) create mode 100644 keyboards/boardwalk/keymaps/niclake/config.h create mode 100644 keyboards/boardwalk/keymaps/niclake/keymap.c create mode 100644 keyboards/boardwalk/keymaps/niclake/readme.md create mode 100644 keyboards/boardwalk/keymaps/niclake/rules.mk diff --git a/keyboards/boardwalk/keymaps/niclake/config.h b/keyboards/boardwalk/keymaps/niclake/config.h new file mode 100644 index 000000000000..9028fcf9fbb0 --- /dev/null +++ b/keyboards/boardwalk/keymaps/niclake/config.h @@ -0,0 +1,18 @@ +/* + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License 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_TOGGLE 2 diff --git a/keyboards/boardwalk/keymaps/niclake/keymap.c b/keyboards/boardwalk/keymaps/niclake/keymap.c new file mode 100644 index 000000000000..2188660d019a --- /dev/null +++ b/keyboards/boardwalk/keymaps/niclake/keymap.c @@ -0,0 +1,150 @@ +/* + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public 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, + _QWERTY, + _FN, + _NUM, + _ADJ, +}; + +enum custom_keycodes { + QWERTY = SAFE_RANGE, + COLEMAK, + FN, + NUM, + ADJ, + MACWIN +}; + +#define QWERTY DF(_QWERTY) +#define COLEMAK DF(_BASE) +#define FN MO(_FN) +#define NUM TT(_NUM) +#define ADJ MO(_ADJ) +#define MACWIN AG_TOGG +#define RGB_ON RGB_MODE_PLAIN + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + /* Base Layer (Colemak) + * .-----------------------------------------------------------------------------------------------------------------------------. + * | ` | 1 | 2 | 3 | 4 | 5 | - | = | 6 | 7 | 8 | 9 | 0 | BACKSP | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------| + * | TAB | Q | W | F | P | G | [ | ] | J | L | U | Y | ; | \ | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------+--------| + * | _FN | A | R | S | T | D | HOME | PG UP | H | N | E | I | O | ' | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------------------------+--------| + * | LSHIFT | Z | X | C | V | B | END | PG DN | K | M | , | . | / | RSHIFT | + * '--------+--------+--------+--------+--------+-----------------+--------+--------+--------+-----------------+--------+--------' + * | LCTRL | LALT | LGUI | TG_NUM | ENTER | SPACE | LEFT | DOWN | UP | RIGHT | + * '-----------------------------------------------------------------------------------------------------------' + */ + [_BASE] = LAYOUT_ortho_hhkb( + KC_GRV, 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_F, KC_P, KC_G, KC_LBRC, KC_RBRC, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSLS, + FN, KC_A, KC_R, KC_S, KC_T, KC_D, KC_HOME, KC_PGUP, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, + KC_LSPO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_END, KC_PGDN, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSPC, + KC_LCTL, KC_LALT, KC_LGUI, NUM, KC_ENT, KC_SPC, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT + ), + + /* QWERTY + * .-----------------------------------------------------------------------------------------------------------------------------. + * | ` | 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 | HOME | PG UP | H | J | K | L | ; | ' | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------------------------+--------| + * | LSHIFT | Z | X | C | V | B | END | PG DN | N | M | , | . | / | RSHIFT | + * '--------+--------+--------+--------+--------+-----------------+--------+--------+--------+-----------------+--------+--------' + * | LCTRL | LALT | LGUI | TG_NUM | ENTER | SPACE | LEFT | DOWN | UP | RIGHT | + * '-----------------------------------------------------------------------------------------------------------' + */ + [_QWERTY] = LAYOUT_ortho_hhkb( + KC_GRV, 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_BSLS, + FN, 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_QUOT, + KC_LSPO, 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_RSPC, + KC_LCTL, KC_LALT, KC_LGUI, NUM, KC_ENT, KC_SPC, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT + ), + + /* FN + * .-----------------------------------------------------------------------------------------------------------------------------. + * | ESC | F1 | F2 | F3 | F4 | F5 | F11 | F12 | F6 | F7 | F8 | F9 | F10 | DEL | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------| + * | | Prev | Play | Next | | | | | | Pg Up | Up | Pg Dn | PRT SC | | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------+--------| + * | XXXXXX | | Mute | Vol Dn | Vol Up | | | | | Left | Down | Right | | | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------------------------+--------| + * | | | | | | | | | | Home | | End | | CapsLk | + * '--------+--------+--------+--------+--------+-----------------+--------+--------+--------+-----------------+--------+--------' + * | | | | _ADJ | | | | | | | + * '-----------------------------------------------------------------------------------------------------------' + */ + [_FN] = LAYOUT_ortho_hhkb( + KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F11, KC_F12, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_DEL, + _______, KC_MPRV, KC_MPLY, KC_MNXT, _______, _______, _______, _______, _______, KC_PGUP, KC_UP, KC_PGDN, KC_PSCR, _______, + _______, _______, KC_MUTE, KC_VOLD, KC_VOLU, _______, _______, _______, _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, _______, KC_END, _______, KC_CAPS, + _______, _______, _______, ADJ, _______, _______, _______, _______, _______, _______ + ), + + /* Num Pad (NUM) + * .-----------------------------------------------------------------------------------------------------------------------------. + * | | | | | | | | | Num Lk | KP / | KP * | KP - | Scr Lk | Pause | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------| + * | | | | | | | | | KP 7 | KP 8 | KP 9 | KP + | | | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------+--------| + * | _ADJ | | | | | | | | KP 4 | KP 5 | KP 6 | KP + | | | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------------------------+--------| + * | | | | | | | | | KP 1 | KP 2 | KP 3 | KP Ent | | | + * '--------+--------+--------+--------+--------+-----------------+--------+--------+--------+-----------------+--------+--------' + * | | | | XXXXXX | | KP 0 | KP 0 | KP . | KP Ent | | + * '-----------------------------------------------------------------------------------------------------------' + */ + [_NUM] = LAYOUT_ortho_hhkb( + _______, _______, _______, _______, _______, _______, _______, _______, KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS, KC_SLCK, KC_PAUS, + _______, _______, _______, _______, _______, _______, _______, _______, KC_KP_7, KC_KP_8, KC_KP_9, KC_PPLS, _______, _______, + ADJ, _______, _______, _______, _______, _______, _______, _______, 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_KP_0, KC_PDOT, KC_PENT, _______ + ), + + /* ADJUST + RGB Control + * .-----------------------------------------------------------------------------------------------------------------------------. + * | | Static | Breath | Rainbw | Swirl | Gradnt | Test | | | | | | | | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------| + * | | On/Off | ModeUp | Hue Up | Sat Up | Val Up | | | | | | | RESET | | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------+--------| + * | XXXXXX | MACWIN | | Hue Dn | Sat Dn | Val Dn | | | | | | | | | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------------------------+--------| + * | | Colemak| QWERTY | | | | | | | | | | | | + * '--------+--------+--------+--------+--------+-----------------+--------+--------+--------+-----------------+--------+--------' + * | | | | XXXXXX | | | | | | | + * '-----------------------------------------------------------------------------------------------------------' + */ + [_ADJ] = LAYOUT_ortho_hhkb( + _______, RGB_ON, RGB_M_B, RGB_M_R, RGB_M_SW, RGB_M_G, RGB_M_T, _______, _______, _______, _______, _______, _______, _______, + _______, RGB_TOG, RGB_MOD, RGB_HUI, RGB_SAI, RGB_VAI, _______, _______, _______, _______, _______, _______, RESET, _______, + _______, MACWIN, _______, RGB_HUD, RGB_SAD, RGB_VAD, _______, _______, _______, _______, _______, _______, _______, _______, + _______, COLEMAK, QWERTY, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ) + +}; diff --git a/keyboards/boardwalk/keymaps/niclake/readme.md b/keyboards/boardwalk/keymaps/niclake/readme.md new file mode 100644 index 000000000000..fb772a9a2578 --- /dev/null +++ b/keyboards/boardwalk/keymaps/niclake/readme.md @@ -0,0 +1,8 @@ +# Nic Lake's Boardwalk Layout + +This is Nic's Boardwalk layout, which is based off of the default Pok3r layout. + +- Colemak base layer w/ QWERTY support +- Bottom row set up for Mac usage (use `MACWIN`/`AG_TOGG` to toggle) +- Latching Numpad layer for data entry +- Uses [Space Cadet shift keys](https://docs.qmk.fm/#/feature_space_cadet?id=usage) \ No newline at end of file diff --git a/keyboards/boardwalk/keymaps/niclake/rules.mk b/keyboards/boardwalk/keymaps/niclake/rules.mk new file mode 100644 index 000000000000..000a2e1215db --- /dev/null +++ b/keyboards/boardwalk/keymaps/niclake/rules.mk @@ -0,0 +1,3 @@ +COMMAND_ENABLE = no +RGBLIGHT_ENABLE = yes +BOOTMAGIC_ENABLE = full From c01eb55109b9e5a5083d5bb213cecaeca2409a96 Mon Sep 17 00:00:00 2001 From: Sturek Date: Fri, 2 Oct 2020 07:52:30 +0200 Subject: [PATCH 924/930] [Keymap] VIA keymap for the Sofle (#10446) * Added via support * Now uses LTO_ENABLE * Deactivated console to save space * Update keyboards/sofle/keymaps/via/readme.md * Added GPL license * Update keyboards/sofle/keymaps/via/keymap.c * Update keyboards/sofle/keymaps/via/keymap.c * Update keyboards/sofle/keymaps/via/keymap.c * Update keyboards/sofle/keymaps/via/keymap.c --- keyboards/sofle/keymaps/via/config.h | 29 +++++++ keyboards/sofle/keymaps/via/encoder.c | 38 +++++++++ keyboards/sofle/keymaps/via/keymap.c | 113 ++++++++++++++++++++++++++ keyboards/sofle/keymaps/via/oled.c | 84 +++++++++++++++++++ keyboards/sofle/keymaps/via/readme.md | 14 ++++ keyboards/sofle/keymaps/via/rules.mk | 7 ++ 6 files changed, 285 insertions(+) create mode 100644 keyboards/sofle/keymaps/via/config.h create mode 100644 keyboards/sofle/keymaps/via/encoder.c create mode 100644 keyboards/sofle/keymaps/via/keymap.c create mode 100644 keyboards/sofle/keymaps/via/oled.c create mode 100644 keyboards/sofle/keymaps/via/readme.md create mode 100644 keyboards/sofle/keymaps/via/rules.mk diff --git a/keyboards/sofle/keymaps/via/config.h b/keyboards/sofle/keymaps/via/config.h new file mode 100644 index 000000000000..32139d8b1c22 --- /dev/null +++ b/keyboards/sofle/keymaps/via/config.h @@ -0,0 +1,29 @@ + /* Copyright 2020 Josef Adamcik + * Modification for VIA support and RGB underglow by Jens Bonk-Wiltfang + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License 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 way how "handedness" is decided (which half is which), +see https://docs.qmk.fm/#/feature_split_keyboard?id=setting-handedness +for more options. +*/ + +//Add RGB underglow +#define RGB_DI_PIN D3 +#define RGBLED_NUM 14 +#define RGBLED_SPLIT {7,7} +#define RGBLIGHT_ANIMATIONS \ No newline at end of file diff --git a/keyboards/sofle/keymaps/via/encoder.c b/keyboards/sofle/keymaps/via/encoder.c new file mode 100644 index 000000000000..8126d077a2db --- /dev/null +++ b/keyboards/sofle/keymaps/via/encoder.c @@ -0,0 +1,38 @@ + /* Copyright 2020 Josef Adamcik + * Modification for VIA support and RGB underglow by Jens Bonk-Wiltfang + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +//Setting up what encoder rotation does. If your encoder can be pressed as a button, that function can be set in Via. + +#ifdef ENCODER_ENABLE + +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_PGDOWN); + } else { + tap_code(KC_PGUP); + } + } +} + +#endif \ No newline at end of file diff --git a/keyboards/sofle/keymaps/via/keymap.c b/keyboards/sofle/keymaps/via/keymap.c new file mode 100644 index 000000000000..2f917f42dcf0 --- /dev/null +++ b/keyboards/sofle/keymaps/via/keymap.c @@ -0,0 +1,113 @@ + /* Copyright 2020 Josef Adamcik + * Modification for VIA support and RGB underglow by Jens Bonk-Wiltfang + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public 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 "oled.c" +#include "encoder.c" + +//Default keymap. This can be changed in Via. Use oled.c and encoder.c to change beavior that Via cannot change. + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +/* + * QWERTY + * ,-----------------------------------------. ,-----------------------------------------. + * | ` | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | ` | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | ESC | Q | W | E | R | T | | Y | U | I | O | P | Bspc | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | Tab | A | S | D | F | G |-------. ,-------| H | J | K | L | ; | ' | + * |------+------+------+------+------+------| | | |------+------+------+------+------+------| + * |LShift| Z | X | C | V | B |-------| |-------| N | M | , | . | / |RShift| + * `-----------------------------------------/ / \ \-----------------------------------------' + * | LGUI | LAlt | LCTR |LOWER | /Enter / \Space \ |RAISE | RCTR | RAlt | RGUI | + * | | | | |/ / \ \ | | | | | + * `----------------------------------' '------''---------------------------' + */ + +[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_GRV, + 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_MUTE, XXXXXXX,KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, + KC_LGUI,KC_LALT,KC_LCTRL, MO(2), KC_ENT, KC_SPC, MO(3), KC_RCTRL, KC_RALT, KC_RGUI +), +/* + * COLEMAK + * ,-----------------------------------------. ,-----------------------------------------. + * | ` | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | ` | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | ESC | Q | W | F | P | G | | J | L | U | Y | ; | Bspc | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | TAB | A | R | S | T | D |-------. ,-------| H | N | E | I | O | ' | + * |------+------+------+------+------+------| MUTE | | |------+------+------+------+------+------| + * |LShift| Z | X | C | V | B |-------| |-------| K | M | , | . | / |RShift| + * `-----------------------------------------/ / \ \-----------------------------------------' + * | LGUI | LAlt | LCTR |LOWER | /Enter / \Space \ |RAISE | RCTR | RAlt | RGUI | + * | | | | |/ / \ \ | | | | | + * `----------------------------------' '------''---------------------------' + */ + +[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_GRV, + 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_MUTE, XXXXXXX,KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, + KC_LGUI,KC_LALT,KC_LCTRL,KC_TRNS, KC_ENT, KC_SPC, KC_TRNS, KC_RCTRL, KC_RALT, KC_RGUI +), +/* LOWER + * ,-----------------------------------------. ,-----------------------------------------. + * | | F1 | F2 | F3 | F4 | F5 | | F6 | F7 | F8 | F9 | F10 | F11 | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | ` | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | F12 | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | Tab | ! | @ | # | $ | % |-------. ,-------| ^ | & | * | ( | ) | | | + * |------+------+------+------+------+------| MUTE | | |------+------+------+------+------+------| + * | Shift| = | - | + | { | } |-------| |-------| [ | ] | ; | : | \ | Shift| + * `-----------------------------------------/ / \ \-----------------------------------------' + * | LGUI | LAlt | LCTR |LOWER | /Enter / \Space \ |RAISE | RCTR | RAlt | RGUI | + * | | | | |/ / \ \ | | | | | + * `----------------------------------' '------''---------------------------' + */ +[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_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_F12, + _______, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_PIPE, + _______, KC_EQL, KC_MINS, KC_PLUS, KC_LCBR, KC_RCBR, _______, _______, KC_LBRC, KC_RBRC, KC_SCLN, KC_COLN, KC_BSLS, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ +), +/* RAISE + * ,----------------------------------------. ,-----------------------------------------. + * | | | | | | | | | | | | | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | Esc | Ins | Pscr | Menu | | | | | PWrd | Up | NWrd | DLine| Bspc | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | Tab | LAt | LCtl |LShift| | Caps |-------. ,-------| | Left | Down | Rigth| Del | Bspc | + * |------+------+------+------+------+------| MUTE | | |------+------+------+------+------+------| + * |Shift | Undo | Cut | Copy | Paste| |-------| |-------| | LStr | | LEnd | | Shift| + * `-----------------------------------------/ / \ \-----------------------------------------' + * | LGUI | LAlt | LCTR |LOWER | /Enter / \Space \ |RAISE | RCTR | RAlt | RGUI | + * | | | | |/ / \ \ | | | | | + * `----------------------------------' '------''---------------------------' + */ +[3] = LAYOUT( + _______, _______ , _______ , _______ , _______ , _______, _______, _______ , _______, _______ , _______ ,_______, + _______, KC_INS, KC_PSCR, KC_APP, XXXXXXX, XXXXXXX, KC_PGUP, _______, KC_UP, _______,_______, KC_BSPC, + _______, KC_LALT, KC_LCTL, KC_LSFT, XXXXXXX, KC_CAPS, KC_PGDN, KC_LEFT, KC_DOWN, KC_RGHT, KC_DEL, KC_BSPC, + _______,KC_UNDO, KC_CUT, KC_COPY, KC_PASTE, XXXXXXX, _______, _______, XXXXXXX, _______, XXXXXXX, _______, XXXXXXX, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ +) +}; diff --git a/keyboards/sofle/keymaps/via/oled.c b/keyboards/sofle/keymaps/via/oled.c new file mode 100644 index 000000000000..06839da17090 --- /dev/null +++ b/keyboards/sofle/keymaps/via/oled.c @@ -0,0 +1,84 @@ + /* Copyright 2020 Josef Adamcik + * Modification for VIA support and RGB underglow by Jens Bonk-Wiltfang + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +//Sets up what the OLED screens display. + +#ifdef OLED_DRIVER_ENABLE + +static void render_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); +} + +static void print_status_narrow(void) { + // Print current mode + oled_write_P(PSTR("\n\n"), false); + + switch (get_highest_layer(layer_state)) { + case 0: + oled_write_ln_P(PSTR("Qwrt"), false); + break; + case 1: + oled_write_ln_P(PSTR("Clmk"), false); + break; + default: + oled_write_P(PSTR("Mod\n"), false); + break; + } + oled_write_P(PSTR("\n\n"), false); + // Print current layer + oled_write_ln_P(PSTR("LAYER"), false); + switch (get_highest_layer(layer_state)) { + case 0: + case 1: + oled_write_P(PSTR("Base\n"), false); + break; + case 2: + oled_write_P(PSTR("Raise"), false); + break; + case 3: + oled_write_P(PSTR("Lower"), false); + break; + default: + oled_write_ln_P(PSTR("Undef"), false); + } + oled_write_P(PSTR("\n\n"), false); + led_t led_usb_state = host_keyboard_led_state(); + oled_write_ln_P(PSTR("CPSLK"), led_usb_state.caps_lock); +} + +oled_rotation_t oled_init_user(oled_rotation_t rotation) { + if (is_keyboard_master()) { + return OLED_ROTATION_270; + } + return rotation; +} + +void oled_task_user(void) { + if (is_keyboard_master()) { + print_status_narrow(); + } else { + render_logo(); + } +} + +#endif \ No newline at end of file diff --git a/keyboards/sofle/keymaps/via/readme.md b/keyboards/sofle/keymaps/via/readme.md new file mode 100644 index 000000000000..8470c69bcfbc --- /dev/null +++ b/keyboards/sofle/keymaps/via/readme.md @@ -0,0 +1,14 @@ +# VIA keymap for Sofle + +Layout in [Keyboard Layout Editor](http://www.keyboard-layout-editor.com/#/gists/76efb423a46cbbea75465cb468eef7ff) and [adjust layer](http://www.keyboard-layout-editor.com/#/gists/4bcf66f922cfd54da20ba04905d56bd4) + + +Features: + +- Symmetric modifiers (CMD/Super, Alt/Opt, Ctrl, Shift) +- Modes for Qwerty and Colemak support +- The OLED on master half shows selected mode and caps lock state and is rotated. +- Left encoder controls volume up/down/mute. Right encoder PGUP/PGDOWN. +- Via support +- RGB underglow support + diff --git a/keyboards/sofle/keymaps/via/rules.mk b/keyboards/sofle/keymaps/via/rules.mk new file mode 100644 index 000000000000..f482499d4b3f --- /dev/null +++ b/keyboards/sofle/keymaps/via/rules.mk @@ -0,0 +1,7 @@ +OLED_DRIVER_ENABLE = yes +ENCODER_ENABLE = yes +CONSOLE_ENABLE = no +EXTRAKEY_ENABLE = yes +VIA_ENABLE = yes +LTO_ENABLE = yes +RGBLIGHT_ENABLE = yes \ No newline at end of file From 266ff3339a72a9c44913cfd97e232adafe8feb51 Mon Sep 17 00:00:00 2001 From: AlisGraveNil <63020540+AlisGraveNil@users.noreply.github.com> Date: Thu, 1 Oct 2020 23:53:37 -0600 Subject: [PATCH 925/930] [Keyboard] FightPad! macropad by Clawsome (#10507) * 1 Oct 20 * Update keyboards/clawsome/fightpad/config.h * Update keyboards/clawsome/fightpad/rules.mk * Update keyboards/clawsome/fightpad/info.json * Update keyboards/clawsome/fightpad/readme.md * Update keyboards/clawsome/fightpad/readme.md * Update keyboards/clawsome/fightpad/info.json * Update keyboards/clawsome/fightpad/config.h --- keyboards/clawsome/fightpad/config.h | 45 +++++++++++++++++++ keyboards/clawsome/fightpad/fightpad.c | 16 +++++++ keyboards/clawsome/fightpad/fightpad.h | 26 +++++++++++ keyboards/clawsome/fightpad/info.json | 25 +++++++++++ .../fightpad/keymaps/default/keymap.c | 25 +++++++++++ keyboards/clawsome/fightpad/readme.md | 13 ++++++ keyboards/clawsome/fightpad/rules.mk | 22 +++++++++ 7 files changed, 172 insertions(+) create mode 100644 keyboards/clawsome/fightpad/config.h create mode 100644 keyboards/clawsome/fightpad/fightpad.c create mode 100644 keyboards/clawsome/fightpad/fightpad.h create mode 100644 keyboards/clawsome/fightpad/info.json create mode 100644 keyboards/clawsome/fightpad/keymaps/default/keymap.c create mode 100644 keyboards/clawsome/fightpad/readme.md create mode 100644 keyboards/clawsome/fightpad/rules.mk diff --git a/keyboards/clawsome/fightpad/config.h b/keyboards/clawsome/fightpad/config.h new file mode 100644 index 000000000000..6f2e78b6bbd8 --- /dev/null +++ b/keyboards/clawsome/fightpad/config.h @@ -0,0 +1,45 @@ +/* +Copyright 2020 AAClawson (AlisGraveNil) + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License 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 0x7767 +#define PRODUCT_ID 0x481C +#define DEVICE_VER 0x0001 +#define MANUFACTURER AlisGraveNil +#define PRODUCT FightPad +/* key matrix size */ +#define MATRIX_ROWS 2 +#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 { B5, B6 } +#define MATRIX_COL_PINS { D7, E6, B4, B2, B3, B1, F7 } + +#define DIODE_DIRECTION COL2ROW diff --git a/keyboards/clawsome/fightpad/fightpad.c b/keyboards/clawsome/fightpad/fightpad.c new file mode 100644 index 000000000000..f0dae8eaf3ed --- /dev/null +++ b/keyboards/clawsome/fightpad/fightpad.c @@ -0,0 +1,16 @@ +/* Copyright 2020 AAClawson (AlisGraveNil) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#include "fightpad.h" \ No newline at end of file diff --git a/keyboards/clawsome/fightpad/fightpad.h b/keyboards/clawsome/fightpad/fightpad.h new file mode 100644 index 000000000000..ff92afd6bb23 --- /dev/null +++ b/keyboards/clawsome/fightpad/fightpad.h @@ -0,0 +1,26 @@ +/* Copyright 2020 AAClawson (AlisGraveNil) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License 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( \ + K01, K03, K04, K05, K06, \ + K10, K11, K12, K13, K14, K15, K16 \ +) { \ + { KC_NO, K01, KC_NO, K03, K04, K05, K06 }, \ + { K10, K11, K12, K13, K14, K15, K16 }, \ +} diff --git a/keyboards/clawsome/fightpad/info.json b/keyboards/clawsome/fightpad/info.json new file mode 100644 index 000000000000..b5ad80effb3a --- /dev/null +++ b/keyboards/clawsome/fightpad/info.json @@ -0,0 +1,25 @@ +{ + "keyboard_name": "FightPad", + "url": "www.clawboards.xyz", + "maintainer": "AAClawson (AlisGraveNil)", + "width": 8, + "height": 2, + "layouts": { + "LAYOUT": { + "layout": [ + {"label":"K01 (B5,E6)", "x":1, "y":0}, + {"label":"K03 (B5,B2)", "x":4, "y":0}, + {"label":"K04 (B5,B3)", "x":5, "y":0}, + {"label":"K05 (B5,B1)", "x":6, "y":0}, + {"label":"K06 (B5,F7)", "x":7, "y":0}, + {"label":"K10 (B6,D7)", "x":0, "y":1}, + {"label":"K11 (B6,E6)", "x":1, "y":1}, + {"label":"K12 (B6,B4)", "x":2, "y":1}, + {"label":"K13 (B6,B2)", "x":4, "y":1}, + {"label":"K14 (B6,B3)", "x":5, "y":1}, + {"label":"K15 (B6,B1)", "x":6, "y":1}, + {"label":"K16 (B6,F7)", "x":7, "y":1} + ] + } + } +} diff --git a/keyboards/clawsome/fightpad/keymaps/default/keymap.c b/keyboards/clawsome/fightpad/keymaps/default/keymap.c new file mode 100644 index 000000000000..88db84c7d57b --- /dev/null +++ b/keyboards/clawsome/fightpad/keymaps/default/keymap.c @@ -0,0 +1,25 @@ +/* Copyright 2020 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 . + */ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT( + KC_W, KC_U, KC_I, KC_O, KC_P, + KC_A, KC_S, KC_D, KC_H, KC_J, KC_K, KC_L + ), + +}; + diff --git a/keyboards/clawsome/fightpad/readme.md b/keyboards/clawsome/fightpad/readme.md new file mode 100644 index 000000000000..eaca1535dfe0 --- /dev/null +++ b/keyboards/clawsome/fightpad/readme.md @@ -0,0 +1,13 @@ +# FightPad + +This is a 2x7 macropad. + +* Keyboard Maintainer: [AAClawson](https://github.com/AlisGraveNil) +* Hardware Supported: FightPad; Pro Micro or Elite-C +* Hardware Availability: [Clawsome Boards](https://www.clawboards.xyz/) + +Make example for this keyboard (after setting up your build environment): + + make clawsome/fightpad: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/clawsome/fightpad/rules.mk b/keyboards/clawsome/fightpad/rules.mk new file mode 100644 index 000000000000..fd76a52478f7 --- /dev/null +++ b/keyboards/clawsome/fightpad/rules.mk @@ -0,0 +1,22 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +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 = no # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +BLUETOOTH_ENABLE = no # Enable Bluetooth +AUDIO_ENABLE = no # Audio output From 4bbef61d60c9ee3f85569ddcc6366e362b687a54 Mon Sep 17 00:00:00 2001 From: Joe Strong Date: Fri, 2 Oct 2020 17:26:05 +0100 Subject: [PATCH 926/930] Add joestrong keymap for quefrency rev 2 (#10503) --- .../quefrency/keymaps/joestrong/README.md | 17 ++++++++ .../quefrency/keymaps/joestrong/config.h | 27 ++++++++++++ .../quefrency/keymaps/joestrong/keymap.c | 41 +++++++++++++++++++ 3 files changed, 85 insertions(+) create mode 100644 keyboards/keebio/quefrency/keymaps/joestrong/README.md create mode 100644 keyboards/keebio/quefrency/keymaps/joestrong/config.h create mode 100644 keyboards/keebio/quefrency/keymaps/joestrong/keymap.c diff --git a/keyboards/keebio/quefrency/keymaps/joestrong/README.md b/keyboards/keebio/quefrency/keymaps/joestrong/README.md new file mode 100644 index 000000000000..717b9ecd54c7 --- /dev/null +++ b/keyboards/keebio/quefrency/keymaps/joestrong/README.md @@ -0,0 +1,17 @@ +# JoeStrong's Quefrency layout - 60% ISO + +* Standard UK ISO qwerty layout +* Function key in place of Caps Lock +* Function layer provides vim-like arrows and various function keys + +## Default layer + +![Default layer layout](https://i.imgur.com/HXeKSGN.png) + +([KLE](http://www.keyboard-layout-editor.com/#/gists/f606625fbc4b84a0e9f82fff308aad29)) + +## Function layer + +![Function layer layout](https://i.imgur.com/cVKl9tB.png) + +([KLE](http://www.keyboard-layout-editor.com/#/gists/b75402b2838f36e319f1c0a7fef07dd6)) diff --git a/keyboards/keebio/quefrency/keymaps/joestrong/config.h b/keyboards/keebio/quefrency/keymaps/joestrong/config.h new file mode 100644 index 000000000000..f9efe78c5b56 --- /dev/null +++ b/keyboards/keebio/quefrency/keymaps/joestrong/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/joestrong/keymap.c b/keyboards/keebio/quefrency/keymaps/joestrong/keymap.c new file mode 100644 index 000000000000..ead47592cc4a --- /dev/null +++ b/keyboards/keebio/quefrency/keymaps/joestrong/keymap.c @@ -0,0 +1,41 @@ +/* Copyright 2020 Joseph Strong + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public 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_uk.h" + +// Defines names for use in layer keycodes and the keymap +enum layer_names { + _BASE, + _FN1 +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_BASE] = LAYOUT_60_iso( + 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(_FN1),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, UK_BSLS, 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, MO(_FN1), KC_LALT, KC_SPC, _______, KC_SPC, KC_RALT, MO(_FN1), _______, KC_LGUI, KC_RCTL + ), + + [_FN1] = LAYOUT_60_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, _______, _______, + RGB_TOG, RGB_MOD, _______, _______, _______, _______, _______, KC_PGDN, KC_PGUP, _______, _______, _______, _______, + _______, _______, KC__VOLDOWN, KC__VOLUP, KC__MUTE, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_DEL, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ) +}; From 9395a8700c47fcf6c3a8cc9ba201d66cc45f1cbe Mon Sep 17 00:00:00 2001 From: Nick Abe <57225836+2Moons-JP@users.noreply.github.com> Date: Sat, 3 Oct 2020 01:27:16 +0900 Subject: [PATCH 927/930] Add Slice RGB VIA Support (#10407) Co-authored-by: Erovia --- .../slice/rev1_rgb/keymaps/via/keymap.c | 127 ++++++++++++++++++ .../slice/rev1_rgb/keymaps/via/rules.mk | 1 + keyboards/basekeys/slice/rev1_rgb/rev1_rgb.h | 20 ++- 3 files changed, 147 insertions(+), 1 deletion(-) create mode 100644 keyboards/basekeys/slice/rev1_rgb/keymaps/via/keymap.c create mode 100644 keyboards/basekeys/slice/rev1_rgb/keymaps/via/rules.mk diff --git a/keyboards/basekeys/slice/rev1_rgb/keymaps/via/keymap.c b/keyboards/basekeys/slice/rev1_rgb/keymaps/via/keymap.c new file mode 100644 index 000000000000..5670f275ef88 --- /dev/null +++ b/keyboards/basekeys/slice/rev1_rgb/keymaps/via/keymap.c @@ -0,0 +1,127 @@ +/* Copyright 2020 2Moons + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public 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 "split_util.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, + _FN, + _LOWER, + _RAISE, +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_QWERTY] = LAYOUT_all( + //,------------------------------------------------------------------------| |---------------------------------------------------------------------------. + KC_ESC, 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_BSPACE, + //|------------------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+----------+----------| + RGB_MODE_FORWARD, KC_TAB, KC_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, + //|------------------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+----------+----------| + RGB_MODE_GRADIENT, 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, + //|------------------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+----------+----------| + RGB_MODE_XMAS, 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, + //|------------------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+----------+----------| + RGB_TOG, KC_LCTL, KC_LALT, KC_LALT, KC_SPC, KC_SPC, KC_SPC, KC_SPC, KC_SPC, KC_RALT, KC_RCTL, MO(_FN) + //`------------------------------------------------------------------------| |---------------------------------------------------------------------------' + ), + + [_FN] = LAYOUT_all( + //,-------------------------------------------------------------------------| |---------------------------------------------------------------------------. + KC_ESC, 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_BSPACE, + //|-------------------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+----------+----------| + _______, _______, _______, _______, _______, _______, _______, _______, KC_PSCR, KC_SLCK, KC_PAUSE, KC_UP, _______, _______, _______, + //|-------------------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+----------+----------| + _______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGUP, KC_LEFT,KC_RIGHT, _______, _______, + //|-------------------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+----------+----------| + _______, _______, _______, _______, _______, _______, _______, _______, KC_END, KC_PGDN, KC_DOWN, _______, _______, _______, _______, + //|-------------------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+----------+----------| + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + //`-------------------------------------------------------------------------| |---------------------------------------------------------------------------' + ), + + [_LOWER] = LAYOUT_all( + //,------------------------------------------------------------------------| |---------------------------------------------------------------------------. + KC_ESC, 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_BSPACE, + //|------------------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+----------+----------| + RGB_MODE_FORWARD, KC_TAB, KC_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, + //|------------------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+----------+----------| + RGB_MODE_GRADIENT, 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, + //|------------------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+----------+----------| + RGB_MODE_XMAS, 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, + //|------------------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+----------+----------| + RGB_TOG, KC_LCTL, KC_LALT, KC_LALT, KC_SPC, KC_SPC, KC_SPC, KC_SPC, KC_SPC, KC_RALT, KC_RCTL, MO(_FN) + //`------------------------------------------------------------------------| |---------------------------------------------------------------------------' + ), + + [_RAISE] = LAYOUT_all( + //,------------------------------------------------------------------------| |---------------------------------------------------------------------------. + KC_ESC, 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_BSPACE, + //|------------------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+----------+----------| + RGB_MODE_FORWARD, KC_TAB, KC_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, + //|------------------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+----------+----------| + RGB_MODE_GRADIENT, 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, + //|------------------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+----------+----------| + RGB_MODE_XMAS, 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, + //|------------------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+----------+----------| + RGB_TOG, KC_LCTL, KC_LALT, KC_LALT, KC_SPC, KC_SPC, KC_SPC, KC_SPC, KC_SPC, KC_RALT, KC_RCTL, MO(_FN) + //`------------------------------------------------------------------------| |---------------------------------------------------------------------------' + ) +}; + +#ifdef OLED_DRIVER_ENABLE + +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); +} + +oled_rotation_t oled_init_user(oled_rotation_t rotation) { + return isLeftHand ? OLED_ROTATION_180 : OLED_ROTATION_0; +} + +void oled_task_user(void) { + if (is_keyboard_master()) { + // 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("Function\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 + led_t led_usb_state = host_keyboard_led_state(); + oled_write_P(led_usb_state.num_lock ? PSTR("NUMLCK ") : PSTR(" "), false); + oled_write_P(led_usb_state.caps_lock ? PSTR("CAPLCK ") : PSTR(" "), false); + oled_write_P(led_usb_state.scroll_lock ? PSTR("SCRLCK ") : PSTR(" "), false); + } else { + render_qmk_logo(); + } +} +#endif diff --git a/keyboards/basekeys/slice/rev1_rgb/keymaps/via/rules.mk b/keyboards/basekeys/slice/rev1_rgb/keymaps/via/rules.mk new file mode 100644 index 000000000000..1e5b99807cb7 --- /dev/null +++ b/keyboards/basekeys/slice/rev1_rgb/keymaps/via/rules.mk @@ -0,0 +1 @@ +VIA_ENABLE = yes diff --git a/keyboards/basekeys/slice/rev1_rgb/rev1_rgb.h b/keyboards/basekeys/slice/rev1_rgb/rev1_rgb.h index 31110018d357..fdc5331585a5 100644 --- a/keyboards/basekeys/slice/rev1_rgb/rev1_rgb.h +++ b/keyboards/basekeys/slice/rev1_rgb/rev1_rgb.h @@ -76,5 +76,23 @@ { R40, R41, R42, R43, R44, KC_NO, KC_NO, KC_NO, KC_NO } \ } - +#define LAYOUT_all( \ + L00, L01, L02, L03, L04, L05, L06, L07, R00, R01, R02, R03, R04, R05, R06, \ + L10, L11, L12, L13, L14, L15, L16, R10, R11, R12, R13, R14, R15, R16, R17, \ + 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, R37,\ + L40, L41, L42, L43, L44, L45, L46, R40, R41, R42, R43, R44 \ + ) \ + { \ + { L00, L01, L02, L03, L04, L05, L06, L07, KC_NO }, \ + { L10, L11, L12, L13, L14, L15, L16, KC_NO, KC_NO }, \ + { L20, L21, L22, L23, L24, L25, L26, KC_NO, KC_NO }, \ + { L30, L31, L32, L33, L34, L35, L36, KC_NO, KC_NO }, \ + { L40, L41, L42, L43, L44, L45, L46, KC_NO, KC_NO }, \ + { R00, R01, R02, R03, R04, R05, R06, KC_NO, KC_NO }, \ + { R10, R11, R12, R13, R14, R15, R16, R17, KC_NO }, \ + { R20, R21, R22, R23, R24, R25, R26, KC_NO, KC_NO }, \ + { R30, R31, R32, R33, R34, R35, R36, R37, KC_NO }, \ + { R40, R41, R42, R43, R44, KC_NO, KC_NO, KC_NO, KC_NO } \ + } From eb4cf713bcfe6bdfaea337c84cf1e9af78078711 Mon Sep 17 00:00:00 2001 From: James Young <18669334+noroadsleft@users.noreply.github.com> Date: Fri, 2 Oct 2020 13:20:00 -0700 Subject: [PATCH 928/930] Update info.json for Slice RGB (#10514) - add data for LAYOUT_all macro - correct some rounding errors - make the indentation consistent - remove trailing whitespace --- keyboards/basekeys/slice/rev1_rgb/info.json | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/keyboards/basekeys/slice/rev1_rgb/info.json b/keyboards/basekeys/slice/rev1_rgb/info.json index 101da9758010..08ffb969f774 100644 --- a/keyboards/basekeys/slice/rev1_rgb/info.json +++ b/keyboards/basekeys/slice/rev1_rgb/info.json @@ -1,15 +1,18 @@ { - "keyboard_name": "slice", - "url": "https://www.basekeys.com", - "maintainer": "2Moons", - "width": 17.72, - "height": 5, + "keyboard_name": "slice", + "url": "https://www.basekeys.com", + "maintainer": "2Moons", + "width": 17.72, + "height": 5, "layouts": { "LAYOUT": { - "layout": [{"label":"Esc", "x":0, "y":0}, {"label":"~", "x":1.6600000000000001, "y":0}, {"label":"!", "x":2.66, "y":0}, {"label":"@", "x":3.66, "y":0}, {"label":"#", "x":4.66, "y":0}, {"label":"$", "x":5.66, "y":0}, {"label":"%", "x":6.66, "y":0}, {"label":"^", "x":7.66, "y":0}, {"label":"&", "x":9.32, "y":0}, {"label":"*", "x":10.32, "y":0}, {"label":"(", "x":11.32, "y":0}, {"label":")", "x":12.32, "y":0}, {"label":"_", "x":13.32, "y":0}, {"label":"+", "x":14.32, "y":0}, {"label":"Backspace", "x":15.32, "y":0, "w":2}, {"x":0, "y":1}, {"label":"Tab", "x":1.53, "y":1, "w":1.5}, {"label":"Q", "x":3.03, "y":1}, {"label":"W", "x":4.03, "y":1}, {"label":"E", "x":5.03, "y":1}, {"label":"R", "x":6.03, "y":1}, {"label":"T", "x":7.03, "y":1}, {"label":"Y", "x":9, "y":1}, {"label":"U", "x":10, "y":1}, {"label":"I", "x":11, "y":1}, {"label":"O", "x":12, "y":1}, {"label":"P", "x":13, "y":1}, {"label":"{", "x":14, "y":1}, {"label":"}", "x":15.05, "y":1}, {"label":"|", "x":16.1, "y":1, "w":1.5}, {"x":0, "y":2}, {"label":"Caps Lock", "x":1.3900000000000001, "y":2, "w":1.75}, {"label":"A", "x":3.14, "y":2}, {"label":"S", "x":4.14, "y":2}, {"label":"D", "x":5.14, "y":2}, {"label":"F", "x":6.14, "y":2}, {"label":"G", "x":7.14, "y":2}, {"label":"H", "x":9.34, "y":2}, {"label":"J", "x":10.34, "y":2}, {"label":"K", "x":11.34, "y":2}, {"label":"L", "x":12.34, "y":2}, {"label":":", "x":13.34, "y":2}, {"label":"\"", "x":14.34, "y":2}, {"label":"Enter", "x":15.34, "y":2, "w":2.25}, {"x":0, "y":3}, {"label":"Shift", "x":1.25, "y":3, "w":2.25}, {"label":"Z", "x":3.5, "y":3}, {"label":"X", "x":4.5, "y":3}, {"label":"C", "x":5.5, "y":3}, {"label":"V", "x":6.5, "y":3}, {"label":"B", "x":7.5, "y":3}, {"label":"B", "x":8.97, "y":3}, {"label":"N", "x":9.97, "y":3}, {"label":"M", "x":10.97, "y":3}, {"label":"<", "x":11.97, "y":3}, {"label":">", "x":12.97, "y":3}, {"label":"?", "x":13.97, "y":3}, {"label":"Shift", "x":14.97, "y":3, "w":1.75}, {"label":"Shift", "x":16.72, "y":3}, {"x":0, "y":4}, {"label":"Ctrl", "x":1.5, "y":4, "w":1.25}, {"label":"Alt", "x":2.75, "y":4, "w":1.25}, {"label":"\u21d3", "x":4.75, "y":4}, {"x":5.75, "y":4, "w":2.75}, {"x":8.97, "y":4, "w":2.25}, {"label":"\u21d1", "x":11.22, "y":4}, {"label":"Alt", "x":13.98, "y":4, "w":1.25}, {"label":"Ctrl", "x":15.23, "y":4, "w":1.25}, {"label":"Fn", "x":16.48, "y":4}] + "layout": [{"label":"Esc", "x":0, "y":0}, {"label":"~", "x":1.660, "y":0}, {"label":"!", "x":2.66, "y":0}, {"label":"@", "x":3.66, "y":0}, {"label":"#", "x":4.66, "y":0}, {"label":"$", "x":5.66, "y":0}, {"label":"%", "x":6.66, "y":0}, {"label":"^", "x":7.66, "y":0}, {"label":"&", "x":9.32, "y":0}, {"label":"*", "x":10.32, "y":0}, {"label":"(", "x":11.32, "y":0}, {"label":")", "x":12.32, "y":0}, {"label":"_", "x":13.32, "y":0}, {"label":"+", "x":14.32, "y":0}, {"label":"Backspace", "x":15.32, "y":0, "w":2}, {"x":0, "y":1}, {"label":"Tab", "x":1.53, "y":1, "w":1.5}, {"label":"Q", "x":3.03, "y":1}, {"label":"W", "x":4.03, "y":1}, {"label":"E", "x":5.03, "y":1}, {"label":"R", "x":6.03, "y":1}, {"label":"T", "x":7.03, "y":1}, {"label":"Y", "x":9, "y":1}, {"label":"U", "x":10, "y":1}, {"label":"I", "x":11, "y":1}, {"label":"O", "x":12, "y":1}, {"label":"P", "x":13, "y":1}, {"label":"{", "x":14, "y":1}, {"label":"}", "x":15.05, "y":1}, {"label":"|", "x":16.1, "y":1, "w":1.5}, {"x":0, "y":2}, {"label":"Caps Lock", "x":1.390, "y":2, "w":1.75}, {"label":"A", "x":3.14, "y":2}, {"label":"S", "x":4.14, "y":2}, {"label":"D", "x":5.14, "y":2}, {"label":"F", "x":6.14, "y":2}, {"label":"G", "x":7.14, "y":2}, {"label":"H", "x":9.34, "y":2}, {"label":"J", "x":10.34, "y":2}, {"label":"K", "x":11.34, "y":2}, {"label":"L", "x":12.34, "y":2}, {"label":":", "x":13.34, "y":2}, {"label":"\"", "x":14.34, "y":2}, {"label":"Enter", "x":15.34, "y":2, "w":2.25}, {"x":0, "y":3}, {"label":"Shift", "x":1.25, "y":3, "w":2.25}, {"label":"Z", "x":3.5, "y":3}, {"label":"X", "x":4.5, "y":3}, {"label":"C", "x":5.5, "y":3}, {"label":"V", "x":6.5, "y":3}, {"label":"B", "x":7.5, "y":3}, {"label":"B", "x":8.97, "y":3}, {"label":"N", "x":9.97, "y":3}, {"label":"M", "x":10.97, "y":3}, {"label":"<", "x":11.97, "y":3}, {"label":">", "x":12.97, "y":3}, {"label":"?", "x":13.97, "y":3}, {"label":"Shift", "x":14.97, "y":3, "w":1.75}, {"label":"Shift", "x":16.72, "y":3}, {"x":0, "y":4}, {"label":"Ctrl", "x":1.5, "y":4, "w":1.25}, {"label":"Alt", "x":2.75, "y":4, "w":1.25}, {"label":"\u21d3", "x":4.75, "y":4}, {"x":5.75, "y":4, "w":2.75}, {"x":8.97, "y":4, "w":2.25}, {"label":"\u21d1", "x":11.22, "y":4}, {"label":"Alt", "x":13.98, "y":4, "w":1.25}, {"label":"Ctrl", "x":15.23, "y":4, "w":1.25}, {"label":"Fn", "x":16.48, "y":4}] }, - "LAYOUT_split_left_space": { - "layout": [{"label":"Esc", "x":0, "y":0}, {"label":"~", "x":1.6600000000000001, "y":0}, {"label":"!", "x":2.66, "y":0}, {"label":"@", "x":3.66, "y":0}, {"label":"#", "x":4.66, "y":0}, {"label":"$", "x":5.66, "y":0}, {"label":"%", "x":6.66, "y":0}, {"label":"^", "x":7.66, "y":0}, {"label":"&", "x":9.32, "y":0}, {"label":"*", "x":10.32, "y":0}, {"label":"(", "x":11.32, "y":0}, {"label":")", "x":12.32, "y":0}, {"label":"_", "x":13.32, "y":0}, {"label":"+", "x":14.32, "y":0}, {"label":"Backspace", "x":15.32, "y":0, "w":2}, {"x":0, "y":1}, {"label":"Tab", "x":1.53, "y":1, "w":1.5}, {"label":"Q", "x":3.03, "y":1}, {"label":"W", "x":4.03, "y":1}, {"label":"E", "x":5.03, "y":1}, {"label":"R", "x":6.03, "y":1}, {"label":"T", "x":7.03, "y":1}, {"label":"Y", "x":9, "y":1}, {"label":"U", "x":10, "y":1}, {"label":"I", "x":11, "y":1}, {"label":"O", "x":12, "y":1}, {"label":"P", "x":13, "y":1}, {"label":"{", "x":14, "y":1}, {"label":"}", "x":15.05, "y":1}, {"label":"|", "x":16.1, "y":1, "w":1.5}, {"x":0, "y":2}, {"label":"Caps Lock", "x":1.3900000000000001, "y":2, "w":1.75}, {"label":"A", "x":3.14, "y":2}, {"label":"S", "x":4.14, "y":2}, {"label":"D", "x":5.14, "y":2}, {"label":"F", "x":6.14, "y":2}, {"label":"G", "x":7.14, "y":2}, {"label":"H", "x":9.34, "y":2}, {"label":"J", "x":10.34, "y":2}, {"label":"K", "x":11.34, "y":2}, {"label":"L", "x":12.34, "y":2}, {"label":":", "x":13.34, "y":2}, {"label":"\"", "x":14.34, "y":2}, {"label":"Enter", "x":15.34, "y":2, "w":2.25}, {"x":0, "y":3}, {"label":"Shift", "x":1.25, "y":3, "w":2.25}, {"label":"Z", "x":3.5, "y":3}, {"label":"X", "x":4.5, "y":3}, {"label":"C", "x":5.5, "y":3}, {"label":"V", "x":6.5, "y":3}, {"label":"B", "x":7.5, "y":3}, {"label":"B", "x":8.97, "y":3}, {"label":"N", "x":9.97, "y":3}, {"label":"M", "x":10.97, "y":3}, {"label":"<", "x":11.97, "y":3}, {"label":">", "x":12.97, "y":3}, {"label":"?", "x":13.97, "y":3}, {"label":"Shift", "x":14.97, "y":3, "w":1.75}, {"label":"Shift", "x":16.72, "y":3}, {"x":0, "y":4}, {"label":"Ctrl", "x":1.5, "y":4, "w":1.25}, {"label":"Alt", "x":2.75, "y":4, "w":1.25}, {"label":"\u21d3", "x":4.75, "y":4}, {"x":5.75, "y":4, "w":1.75}, {"x":7.5, "y":4}, {"x":8.97, "y":4, "w":2.25}, {"label":"\u21d1", "x":11.22, "y":4}, {"label":"Alt", "x":13.98, "y":4, "w":1.25}, {"label":"Ctrl", "x":15.23, "y":4, "w":1.25}, {"label":"Fn", "x":16.48, "y":4}] + "LAYOUT_split_left_space": { + "layout": [{"label":"Esc", "x":0, "y":0}, {"label":"~", "x":1.660, "y":0}, {"label":"!", "x":2.66, "y":0}, {"label":"@", "x":3.66, "y":0}, {"label":"#", "x":4.66, "y":0}, {"label":"$", "x":5.66, "y":0}, {"label":"%", "x":6.66, "y":0}, {"label":"^", "x":7.66, "y":0}, {"label":"&", "x":9.32, "y":0}, {"label":"*", "x":10.32, "y":0}, {"label":"(", "x":11.32, "y":0}, {"label":")", "x":12.32, "y":0}, {"label":"_", "x":13.32, "y":0}, {"label":"+", "x":14.32, "y":0}, {"label":"Backspace", "x":15.32, "y":0, "w":2}, {"x":0, "y":1}, {"label":"Tab", "x":1.53, "y":1, "w":1.5}, {"label":"Q", "x":3.03, "y":1}, {"label":"W", "x":4.03, "y":1}, {"label":"E", "x":5.03, "y":1}, {"label":"R", "x":6.03, "y":1}, {"label":"T", "x":7.03, "y":1}, {"label":"Y", "x":9, "y":1}, {"label":"U", "x":10, "y":1}, {"label":"I", "x":11, "y":1}, {"label":"O", "x":12, "y":1}, {"label":"P", "x":13, "y":1}, {"label":"{", "x":14, "y":1}, {"label":"}", "x":15.05, "y":1}, {"label":"|", "x":16.1, "y":1, "w":1.5}, {"x":0, "y":2}, {"label":"Caps Lock", "x":1.390, "y":2, "w":1.75}, {"label":"A", "x":3.14, "y":2}, {"label":"S", "x":4.14, "y":2}, {"label":"D", "x":5.14, "y":2}, {"label":"F", "x":6.14, "y":2}, {"label":"G", "x":7.14, "y":2}, {"label":"H", "x":9.34, "y":2}, {"label":"J", "x":10.34, "y":2}, {"label":"K", "x":11.34, "y":2}, {"label":"L", "x":12.34, "y":2}, {"label":":", "x":13.34, "y":2}, {"label":"\"", "x":14.34, "y":2}, {"label":"Enter", "x":15.34, "y":2, "w":2.25}, {"x":0, "y":3}, {"label":"Shift", "x":1.25, "y":3, "w":2.25}, {"label":"Z", "x":3.5, "y":3}, {"label":"X", "x":4.5, "y":3}, {"label":"C", "x":5.5, "y":3}, {"label":"V", "x":6.5, "y":3}, {"label":"B", "x":7.5, "y":3}, {"label":"B", "x":8.97, "y":3}, {"label":"N", "x":9.97, "y":3}, {"label":"M", "x":10.97, "y":3}, {"label":"<", "x":11.97, "y":3}, {"label":">", "x":12.97, "y":3}, {"label":"?", "x":13.97, "y":3}, {"label":"Shift", "x":14.97, "y":3, "w":1.75}, {"label":"Shift", "x":16.72, "y":3}, {"x":0, "y":4}, {"label":"Ctrl", "x":1.5, "y":4, "w":1.25}, {"label":"Alt", "x":2.75, "y":4, "w":1.25}, {"label":"\u21d3", "x":4.75, "y":4}, {"x":5.75, "y":4, "w":1.75}, {"x":7.5, "y":4}, {"x":8.97, "y":4, "w":2.25}, {"label":"\u21d1", "x":11.22, "y":4}, {"label":"Alt", "x":13.98, "y":4, "w":1.25}, {"label":"Ctrl", "x":15.23, "y":4, "w":1.25}, {"label":"Fn", "x":16.48, "y":4}] + }, + "LAYOUT_all": { + "layout": [{"label":"Esc", "x":0, "y":0}, {"label":"~", "x":1.660, "y":0}, {"label":"!", "x":2.66, "y":0}, {"label":"@", "x":3.66, "y":0}, {"label":"#", "x":4.66, "y":0}, {"label":"$", "x":5.66, "y":0}, {"label":"%", "x":6.66, "y":0}, {"label":"^", "x":7.66, "y":0}, {"label":"&", "x":9.32, "y":0}, {"label":"*", "x":10.32, "y":0}, {"label":"(", "x":11.32, "y":0}, {"label":")", "x":12.32, "y":0}, {"label":"_", "x":13.32, "y":0}, {"label":"+", "x":14.32, "y":0}, {"label":"Backspace", "x":15.32, "y":0, "w":2}, {"x":0, "y":1}, {"label":"Tab", "x":1.53, "y":1, "w":1.5}, {"label":"Q", "x":3.03, "y":1}, {"label":"W", "x":4.03, "y":1}, {"label":"E", "x":5.03, "y":1}, {"label":"R", "x":6.03, "y":1}, {"label":"T", "x":7.03, "y":1}, {"label":"Y", "x":9, "y":1}, {"label":"U", "x":10, "y":1}, {"label":"I", "x":11, "y":1}, {"label":"O", "x":12, "y":1}, {"label":"P", "x":13, "y":1}, {"label":"{", "x":14, "y":1}, {"label":"}", "x":15.05, "y":1}, {"label":"|", "x":16.1, "y":1, "w":1.5}, {"x":0, "y":2}, {"label":"Caps Lock", "x":1.390, "y":2, "w":1.75}, {"label":"A", "x":3.14, "y":2}, {"label":"S", "x":4.14, "y":2}, {"label":"D", "x":5.14, "y":2}, {"label":"F", "x":6.14, "y":2}, {"label":"G", "x":7.14, "y":2}, {"label":"H", "x":9.34, "y":2}, {"label":"J", "x":10.34, "y":2}, {"label":"K", "x":11.34, "y":2}, {"label":"L", "x":12.34, "y":2}, {"label":":", "x":13.34, "y":2}, {"label":"\"", "x":14.34, "y":2}, {"label":"Enter", "x":15.34, "y":2, "w":2.25}, {"x":0, "y":3}, {"label":"Shift", "x":1.25, "y":3, "w":2.25}, {"label":"Z", "x":3.5, "y":3}, {"label":"X", "x":4.5, "y":3}, {"label":"C", "x":5.5, "y":3}, {"label":"V", "x":6.5, "y":3}, {"label":"B", "x":7.5, "y":3}, {"label":"B", "x":8.97, "y":3}, {"label":"N", "x":9.97, "y":3}, {"label":"M", "x":10.97, "y":3}, {"label":"<", "x":11.97, "y":3}, {"label":">", "x":12.97, "y":3}, {"label":"?", "x":13.97, "y":3}, {"label":"Shift", "x":14.97, "y":3, "w":1.75}, {"label":"Shift", "x":16.72, "y":3}, {"x":0, "y":4}, {"label":"Ctrl", "x":1.5, "y":4, "w":1.25}, {"label":"Alt", "x":2.75, "y":4, "w":1.25}, {"label":"\u21d3", "x":4.75, "y":4}, {"x":5.75, "y":4, "w":0.917}, {"x":6.667, "y":4, "w":0.916}, {"x":7.583, "y":4, "w":0.917}, {"x":8.97, "y":4, "w":2.25}, {"label":"\u21d1", "x":11.22, "y":4}, {"label":"Alt", "x":13.98, "y":4, "w":1.25}, {"label":"Ctrl", "x":15.23, "y":4, "w":1.25}, {"label":"Fn", "x":16.48, "y":4}] } } -} \ No newline at end of file +} From 9e9b604234ee58fb822c37a862de2340bf95faec Mon Sep 17 00:00:00 2001 From: George Mao Date: Fri, 2 Oct 2020 16:42:11 -0700 Subject: [PATCH 929/930] Mark 'key_count' as optional within info.json docs (#10513) * Update reference_info_json.md key_count is now an optional field because it is better to get the keycount by counting the elements in the layout array. * Updated Japanese documentation as well --- docs/ja/reference_info_json.md | 2 +- docs/reference_info_json.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/ja/reference_info_json.md b/docs/ja/reference_info_json.md index 708f7c19ac3f..0fa1f9d3febd 100644 --- a/docs/ja/reference_info_json.md +++ b/docs/ja/reference_info_json.md @@ -36,7 +36,7 @@ * `height` * オプション: キー単位でのレイアウトの高さ * `key_count` - * **必須**: このレイアウトのキーの数 + * オプション: このレイアウトのキーの数 * `layout` * 物理レイアウトを説明するキー辞書のリスト。詳細は次のセクションを見てください。 diff --git a/docs/reference_info_json.md b/docs/reference_info_json.md index badfabd9120d..3ca62c719e70 100644 --- a/docs/reference_info_json.md +++ b/docs/reference_info_json.md @@ -31,7 +31,7 @@ Within our `info.json` file the `layouts` portion of the dictionary contains sev * `height` * Optional: The height of the layout in Key Units * `key_count` - * **Required**: The number of keys in this layout + * Optional: The number of keys in this layout * `layout` * A list of Key Dictionaries describing the physical layout. See the next section for more details. From a0467fda3816e7c87d8cd0b2584ed701ff78375e Mon Sep 17 00:00:00 2001 From: Simon Date: Sat, 3 Oct 2020 16:43:36 +0200 Subject: [PATCH 930/930] add info.json for XD75 keyboard (#10523) Currently the XD75 is missing a info.json attributing to non standardised use of QMK --- keyboards/xd75/info.json | 92 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 92 insertions(+) create mode 100644 keyboards/xd75/info.json diff --git a/keyboards/xd75/info.json b/keyboards/xd75/info.json new file mode 100644 index 000000000000..66b18c500f03 --- /dev/null +++ b/keyboards/xd75/info.json @@ -0,0 +1,92 @@ +{ + "keyboard_name": "XD75", + "url": "", + "maintainer": "qmk", + "width": 15, + "height": 5, + "layouts": { + "LAYOUT_ortho_5x15": { + "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}, + {"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":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":12, "y":2}, + {"x":13, "y":2}, + {"x":14, "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}, + {"x":12, "y":3}, + {"x":13, "y":3}, + {"x":14, "y":3}, + + {"x":0, "y":4}, + {"x":1, "y":4}, + {"x":2, "y":4}, + {"x":3, "y":4}, + {"x":4, "y":4}, + {"x":5, "y":4}, + {"x":6, "y":4}, + {"x":7, "y":4}, + {"x":8, "y":4}, + {"x":9, "y":4}, + {"x":10, "y":4}, + {"x":11, "y":4}, + {"x":12, "y":4}, + {"x":13, "y":4}, + {"x":14, "y":4} + ] + } + } +}